[SCM] eclipse - Powerful IDE written in java - Debian package. branch, master, updated. debian/3.6.2-exp-1-31-g0dbe3bb

Benjamin Drung bdrung at alioth.debian.org
Fri May 27 23:07:01 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, master has been updated
       via  0dbe3bbabed2d0a814bb91a0faeb400fcc096917 (commit)
       via  86771bddc0b97af36eba724fbb9d2c2c39bc255b (commit)
       via  551663bae7ec5be15e221297134ae191d83c94b3 (commit)
       via  81cf81d814ccb916c3389daf0585a692fd4e045f (commit)
       via  78aec30451f2d297a8603e967b95c034983d99c4 (commit)
       via  772857a338f41ea878bdc9460bd1f569b59cd4dd (commit)
       via  833f4e68f171c395f0724e83c604020675b95224 (commit)
       via  1573105a5334412fe8754281dc04337e9397d5bd (commit)
       via  b3e46fce37da8f279a1231eb1c399b9fc9685be5 (commit)
       via  d0947cc4dbe9046f31303dd490b8de1800e81943 (commit)
       via  1303aaed109bda5eef317459e2e8a5f495264504 (commit)
       via  07bf15c8f600b2f5af26cf9b0c369922fd9a5698 (commit)
       via  f84212103f42fc4fb2568c56e813585951a99910 (commit)
       via  01c9c672e475ad61a614b0b273473a752a0a444d (commit)
       via  b4c9881e977b67aefc2cf7e0ec917cd5098959ac (commit)
       via  5ed4451eb0e427abb2f74fd67bc4f321bab78dde (commit)
       via  3be277a2dc3782ba18b07b8159e33a8ddf8aa9d7 (commit)
       via  5be0ea49e099ddade64e6706b8293573ea412705 (commit)
       via  1cfb61901577e6b6631061a5aefcd562cd7bfb27 (commit)
       via  67606ea9f8b7dceb1db5324ce7c1d0f7c65744e4 (commit)
       via  b1f7200d44bff6cf2d930e8bc89ecdd0463e129f (commit)
       via  429276be1d704dce9f525c56adbf545514d91502 (commit)
       via  3de47f5fa1f94ea55e81fe6b727ac8e2ce192f42 (commit)
       via  abaa4f42637e7bf0c8bc4604935915c3f23f6f5e (commit)
       via  c84ecd1c5e414b7a3b8eddc4f8e58e69093f49c7 (commit)
       via  9d3a8cb25fbdbbea82c864a58815f614b905a3ef (commit)
       via  f4cd0b23f5e955c7e52df35314d7f3508bd62328 (commit)
       via  651ee494f83cbb7660ae02d26b2037e023e26cd9 (commit)
       via  8d24cb77f3cc24a0fce30a8a23dd46eb48207096 (commit)
       via  7a6726b069eb60ec7cea87e09fe200f513006ee7 (commit)
       via  87574fcfe8e6b79354259e824ca3e565079baa7f (commit)
       via  ce3e1314de425cf4385647df754276f00acd834d (commit)
       via  985a679c50b06b3ff14eb309fe6077f2ab328f12 (commit)
       via  c8119405f5861d89069738c590a94f2dddbf2e11 (commit)
       via  65aca3d333d2d581c17c4d207d5b18a0a83ab190 (commit)
       via  8a90f6f63427ad22deee2c59711513d728de82e4 (commit)
       via  ff028ae3cb9c3066288605b13c0bf61754aa5a5c (commit)
       via  68f899e621857ab6f44c7926b80c1da742bf7adf (commit)
       via  356d32c3a7f6fbe4f219f39826cb5e6f8fc1fef7 (commit)
       via  efc6fcd41f3869d993ddb4fbab4665bd23eeea24 (commit)
       via  f4480f058b86091f411f9d26c14f3b0d735ced88 (commit)
       via  c4581570d622c04e03188f20aeb9f2149dff5724 (commit)
       via  79b66fcf6c64b2876cdb5c815f73d6b845ff0b37 (commit)
       via  4b5c9cbf6e334773a6031e441e1772593f12ed53 (commit)
       via  5c7b26e0ecf68b3bc6f1f64a4c64bac6701fc9f9 (commit)
       via  aa280a9a95ea21046419e17773ff573bcff5fe43 (commit)
       via  2aa5198c7813004d6a9aaba384fdf72ee7f0d808 (commit)
       via  9dd085bba60fe373ff91eb2ebe2e14382292f0a5 (commit)
       via  c87c8524df271c61bd838a7b96c506efebfd8389 (commit)
       via  4f4ca62c1ff5956a882a7cceb59addaced1f8d31 (commit)
       via  6af0dd2867b54c1186da2e7c8121f7030164ed3f (commit)
       via  088de2fb40b252d6360b9b4efd2352306a060dbe (commit)
       via  8993080c6ffdd5903b729213373024d4f947a971 (commit)
       via  264e65a60e8df23aa0b76d0664da9608fa048ba0 (commit)
       via  ba44b74b0a40e9f0c184f5416b465a3b974a3d3c (commit)
       via  952b828402c054f67f9c5b942e85be07599e8fa8 (commit)
       via  256614afaef8835cf9741cae6317a10b80cfa410 (commit)
       via  1676b59c23e8593a3f17a5da19af2d73bb29d53a (commit)
       via  cea61d6b0ce2e600e1d04017b8ba9dadc188809e (commit)
       via  05e400e1d809a3b78e97b76e263c71569a8956ca (commit)
       via  d1bba732ef09fe688dbaea31fe8635ac089167c7 (commit)
       via  1e571bd03f6a324a729dd066ecf98a0f623be8d4 (commit)
       via  05536433516f7cd82ff3dab90e1cb4c0e768e69a (commit)
       via  6d163cc19ccb2692c42d1732023d5ed19250cf51 (commit)
       via  2a310b5331c28711d08f3f478ebf6d3b8049d48a (commit)
       via  13b0ec042a2419e041a87a20672dad994fcf1bb8 (commit)
       via  4fa8277a7eefe73e556cd70c61a24eb93622ec0f (commit)
       via  cc886b71ad448269f4a1f016f756425d6714d260 (commit)
       via  d57ae342b6d4013ff6ef79c155d8fd56c338b702 (commit)
       via  53d2849094b89b925c3ce585c01a6091c93914ac (commit)
       via  b88e2c7432783dd00b95096ce92209756698e550 (commit)
       via  f8e6177d9d2b741732cf353bb817102a12f66b20 (commit)
       via  2695d071a39ba0c6801b723e0e3e69b0cad6a1b6 (commit)
       via  444d6304a71c94d22b3ac6c64de48384bf7e07e5 (commit)
       via  74d2d6142e7e724b46e5fac2c8e0dddb36218c95 (commit)
       via  ffd4c7fade62cadfa92968d1cdd783694b5273f6 (commit)
       via  8fe50f845be670c5731d7cf0fb707571e8712987 (commit)
       via  2af97f22a96762d0393625c8b13d79fef438af6c (commit)
       via  16eacc10b0e447312cf80f8021d7070f21cf45d5 (commit)
       via  c9198d91db509f3417f4e7108604c69f3e8cbe8c (commit)
       via  83402ea3deb7844503e44a8ee9b2e89fa7555883 (commit)
       via  0d2be49df4b24291a1a14f8b5ec2428575900a5f (commit)
       via  d6d70dc2013fa9511530a978f07de0b0163afc33 (commit)
       via  2d309a0aa962f07029cd30c65767b21aa0616978 (commit)
       via  2d8e3824804aebc9858aadb99e6bdeae1470c478 (commit)
       via  ace84086f72747ac83cb11e2e34c26870addc420 (commit)
       via  9ab6b5b0727dcdf45250e2b0f11354c6bef80f62 (commit)
       via  d1d779898181e8501315d58082dd3296544c4c91 (commit)
       via  e33e4ad0ec056fe58071ef5f35163ae9d984e1e5 (commit)
       via  b245e3e1965867f96e9f8cef703b89fe0943dc71 (commit)
       via  d75660e30ece34ba1bea5c167eae788ad769fdc7 (commit)
       via  48a6933b48589329e92f339714d6de69e9f53963 (commit)
       via  e7b3a0d7a042dac31487e99c1f0227132dab1fc3 (commit)
       via  05397f23a02c26579f400c44d734cfc2fef0e5e1 (commit)
       via  9232b24715aa56e7ebec648952cd86ef065f4099 (commit)
       via  4f89cfed9d7ee55dbbe51188d514e7a284c70354 (commit)
       via  6657842d49758649ba325b55cf8d208151e463cb (commit)
       via  4e0670cd67bce5907a55ab0009027c0f5bdfb499 (commit)
       via  484e491b04fb7aa248ad3c388785ff2ee7d750f8 (commit)
       via  2e62f79e9de1a654302c69048e4593fe30f7efb8 (commit)
       via  586c801e016ce811d07fa5bb840d98228029cf82 (commit)
       via  b6644ea41047883fb4c3e53f4cdd159d3356da69 (commit)
       via  81547d0d3d2a10d4d6ca0778f09b7639a74f18eb (commit)
       via  08b3309ff2893e5c7ed757760db2aa17d688bcab (commit)
       via  66a6179b3ca2830c55aff9fd4a4e6a7cc5117ea9 (commit)
       via  c59e109793d9bbe6cd01fc2542b92bcb096fd6b8 (commit)
       via  dffec708f50cb105a624df98c50447547639e2f8 (commit)
       via  6c2bfcf0da43e0876d0a4e95961d1779a0f0c0ed (commit)
       via  1b62a3e13385d58f22d7571ec89070d6e7c3567d (commit)
       via  1b6b085381981b3f0d09e8801affb62f0d023a70 (commit)
       via  1db6191b6921eee9ff247e3d6905b34242a4931c (commit)
       via  aebb1cfed9645583c6711734c1f6ea2f791dcfb1 (commit)
       via  952996fa515c22af55e23eb4187e70bfaab875a5 (commit)
       via  86453f336af5185e252c18a8e5dd105f4d64c58e (commit)
       via  b8dd057bb7a11a1397a711986a1d46e72dadfaf2 (commit)
       via  453df6310e0ba2a47c8e72425cd8983115d7d14c (commit)
       via  af305acc40a0047c79328ed367998e92517319eb (commit)
       via  16bf758c7765c6d78e2a05d728d80e23dfe049e3 (commit)
       via  ba6f165da2991d4b17a6607b6dc36260459ce033 (commit)
       via  94f560ba5c66405729ac60024a91a3df74ee1782 (commit)
       via  5dc98a6fe8e928c8a11e307cfdb2d23ca7537089 (commit)
       via  d717f3941e584e1971c28bae7ba67ad22330ef53 (commit)
       via  4c1e991854c72168377ea0934ab7f62372ea09bb (commit)
       via  8fa2fe00aafcb952f6bca74ab4f61e2082756a5e (commit)
       via  8ba2be44ee0b8565b6cabe84fde23263a2b39756 (commit)
       via  66fa20e801be512c35e74cfb33c1d42902cb8ef6 (commit)
       via  f14af072718e4a59ea3628896219e30d0ab6f0ee (commit)
       via  82a3179e04d2566cd07935eef170050088a4e70b (commit)
       via  27e9e512a03a29cab80d39a8e0ec4a8dadd36ae4 (commit)
       via  43d52e504626eeb4b1783a5c2c29814989deed4a (commit)
       via  546fad80e8f6a9ced39ba850de384bfda2cfd215 (commit)
       via  3071195de2984bd2577c4e53d41b32eed4b11f09 (commit)
       via  0b7198f31e189e8e97cb520f4f62f57105cf1d45 (commit)
       via  a02a134b6ce820d330675209c36aa948629c766d (commit)
       via  542ad504b8ee120e49a76462349fe0c9a943e57c (commit)
       via  5a07ca455a59a2435fd00215bc8dabfbc69ff1ad (commit)
       via  eb719598be28d394ee373d598464ab69c1f81392 (commit)
       via  7094a836fe6a7aa22aafcd350d04b90e5330e208 (commit)
       via  8ff037d71c5a75a7c0b5583e719c983a730a6129 (commit)
       via  8f50d3e3452ba8e443be25c502e3dc47ee4467a6 (commit)
       via  da930493d1e3ab6835785797f2ce93f36906704e (commit)
       via  01f8d9a3b7cf4b428d500080d90bde3a8f972bee (commit)
       via  79977ad6a33842737bc09113f8e727226f8eebca (commit)
       via  2c7b8ad0806d80616b25d69b74a68a0c4420d7de (commit)
       via  de8f3c2e35ded833bb82dd559a68f2245e1d43fb (commit)
       via  7755c218acebd39317ecf4b8f47795cffee4ce1d (commit)
       via  c0afec40c7169874ff944b32206f9f901c85d4de (commit)
       via  1bd1a7500261c52a3b10b3ae739f54d854dfb658 (commit)
       via  e4f7363fe249d69d61860b11857c115aaacf04dd (commit)
       via  bbf6052c1ebf4549c6c93f1d8841c6ab35e9b724 (commit)
       via  0d4dcf4d295800fc38c9bb9fe31f83430d6dac1d (commit)
       via  9a8032742e9f879d8fa607be5a434753cafa78a2 (commit)
       via  a655c824c4c695bb3d771df443a3e4fa9d079f5c (commit)
       via  d4098c9a442f2c64cb9081e84d44c769a80bcff0 (commit)
       via  a6de11ca0ad4a1c57edc7caa3b1d2bc2c482073a (commit)
       via  631cd3736d7f842b233a248384733268fbf4a30b (commit)
       via  f22c7d784bf8a1d68330d550f8fb971732792228 (commit)
       via  a30b154308ad7a6370623277250ffb3476c1d1f0 (commit)
       via  5295335d61f8716426193f07fcaff6fc6352ca11 (commit)
       via  3ef767550bf16f0ccefe9cc5db7018ee14680886 (commit)
       via  98fa4c64db6db353ab0dcc89eccee6863e1cf659 (commit)
       via  c1dd2288369f88bf32397448f12702c9d0949a3d (commit)
       via  4a1fce418d7ff28a1840ffb858b346b8f56a6a73 (commit)
       via  33750c1bd7cbf8742ba6d772b4cf5434a19f5e24 (commit)
       via  bbe601372cb9b2ad20ad787b8ab170ec2a7487ed (commit)
       via  ee171d0e04741db886ea4b7ccea79765929845c4 (commit)
       via  401a435836465d14d9cd4e82b77b4f2b4133a4d6 (commit)
       via  00036864f31ae875cd4d7b42e98a1c46671d13d4 (commit)
       via  5b16962d4df44b80b5613757c838b86d2895f989 (commit)
       via  24c28b487dfba568f652f8a724cd1aaf4c30a5ba (commit)
       via  e99ddaa0212ad59404b7d82bdef924a0e9b42cd8 (commit)
       via  3dab1bfaa147ec841f827a6ce64c063bd2b685b8 (commit)
       via  448af370585bf2c3a772bfda2d50bae40d0f3ca1 (commit)
      from  2f5f7b8a4e4427bc152385662a78f9a8c2dc8abd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0dbe3bbabed2d0a814bb91a0faeb400fcc096917
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sat May 28 01:00:23 2011 +0200

    Update git-buildpackage configuration after merge.

commit 86771bddc0b97af36eba724fbb9d2c2c39bc255b
Merge: 551663b 81cf81d
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sat May 28 00:45:27 2011 +0200

    Merge branch 'master-3.6'

commit 551663bae7ec5be15e221297134ae191d83c94b3
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sat May 28 00:33:48 2011 +0200

    Unapply all patches.

-----------------------------------------------------------------------

Summary of changes:
 ABOUT.mediawiki                                    |   28 -
 ChangeLog                                          |  449 +-
 README.mediawiki                                   |   24 -
 TODO.mediawiki                                     |   18 -
 bootstrap/configuration/config.ini                 |   10 +-
 build.properties                                   |   49 +-
 build.sh                                           |   44 -
 build.xml                                          |  778 ++-
 buildEclipseBuildSource.sh                         |   25 +-
 buildSDKSource.sh                                  |   53 +-
 debian/changelog                                   |   58 +
 debian/control                                     |   37 +-
 debian/copyright                                   |  145 +-
 debian/eclipse-build-generatedScripts.tar.bz2      |  Bin 14715 -> 14413 bytes
 debian/eclipse-jdt.install                         |    4 +
 debian/eclipse-pde.install                         |    2 +
 debian/eclipse-platform-data.install               |   14 +-
 debian/eclipse-platform.install                    |    6 +-
 debian/eclipse-plugin-cvs.install                  |    2 -
 debian/eclipse-rcp.install                         |    2 +-
 debian/exclude_patterns.txt                        |    4 -
 debian/extra/bin/uname                             |   15 -
 debian/extra/copyright-gen.pl                      |   51 +-
 debian/extra/eclipse                               |   19 +-
 debian/extra/generate-copyright.sh                 |    6 +
 debian/extra/repack_jars.sh                        |   15 +
 debian/extract_patterns.txt                        |    1 -
 debian/gbp.conf                                    |    7 +-
 debian/patches/add-o.e.equinox.concurrent.patch    |   10 +-
 debian/patches/bp-ant-1.8.2-support.patch          | 5936 ++++++++-----
 debian/patches/bp-hover-visability.patch           |  428 -
 debian/patches/build-arch.patch                    |   47 -
 debian/patches/clean-source.patch                  |   55 +
 debian/patches/compile-IPluginDescriptor.patch     |   25 +-
 debian/patches/compile-jarinjarloader.patch        |   40 -
 debian/patches/debian-load-internal-swt.patch      |   19 +
 debian/patches/ecj-gccmain-java.patch              |    3 +-
 .../patches/eclipse-build-generatedScripts.patch   |   19 +-
 debian/patches/eclipse-manpage.patch               |   10 +-
 debian/patches/fix-bashism.patch                   |   43 -
 debian/patches/fix-help-contents.patch             |    2 +-
 debian/patches/fix-shell-script-perm.patch         |   15 -
 debian/patches/fix-tooltip-color.patch             |   65 -
 ...nerate-metadata-and-extract-swt-libraries.patch |   70 +
 debian/patches/gnomeproxy-pkg-config.patch         |   22 +
 debian/patches/lucene.patch                        |   16 -
 debian/patches/osgi-services-symlink-javax.patch   |   16 +-
 debian/patches/osgi-services.patch                 |   82 +-
 debian/patches/osgi-util.patch                     |   38 -
 debian/patches/pdebuild-path-copy-platform.patch   |    2 +-
 debian/patches/pdebuild-script.patch               |    2 +-
 debian/patches/remove-unnecessary-files.patch      |   16 +
 debian/patches/sat4j-version.patch                 |   17 -
 debian/patches/series                              |   38 +-
 debian/patches/strip-destDir.patch                 |   28 +
 debian/patches/swt-compile-xpt.patch               |   48 -
 debian/patches/symlink-system-files.patch          |   20 +-
 debian/patches/upstream-eclipse-build-repack.patch |   93 -
 debian/patches/use-ant-1.8.2.patch                 |  119 +
 debian/patches/use-stable-xulrunner.patch          |    2 +-
 debian/rules                                       |  185 +-
 debian/source/local-options                        |    1 +
 debian/watch                                       |    2 +-
 dependencies.properties                            |   22 +-
 .../META-INF/MANIFEST.MF                           | 3892 --------
 .../META-INF/MANIFEST.MF                           | 4238 +++++++++
 .../META-INF/MANIFEST.MF                           |  209 -
 .../META-INF/MANIFEST.MF                           |  209 +
 .../META-INF/MANIFEST.MF                           |    5 +-
 .../META-INF/MANIFEST.MF                           |   11 +-
 .../META-INF/MANIFEST.MF                           |  580 --
 .../META-INF/MANIFEST.MF                           |  580 ++
 .../META-INF/MANIFEST.MF                           |   86 -
 .../META-INF/MANIFEST.MF                           |   86 +
 .../META-INF/MANIFEST.MF                           |   35 +-
 .../META-INF/MANIFEST.MF                           |  111 -
 .../META-INF/MANIFEST.MF                           |  111 +
 .../META-INF/MANIFEST.MF                           |  916 --
 .../META-INF/MANIFEST.MF                           |  916 ++
 .../META-INF/MANIFEST.MF                           |  801 --
 .../META-INF/MANIFEST.MF                           |  828 ++
 .../META-INF/MANIFEST.MF                           |  358 -
 .../META-INF/MANIFEST.MF                           |  367 +
 .../META-INF/MANIFEST.MF                           |  514 --
 .../META-INF/MANIFEST.MF                           |  520 ++
 .../META-INF/MANIFEST.MF                           |  520 --
 .../META-INF/MANIFEST.MF                           |  544 ++
 .../META-INF/MANIFEST.MF                           |  289 -
 .../META-INF/MANIFEST.MF                           |  304 +
 eclipse-build-config/.project                      |   11 -
 eclipse-build-config/ChangeLog                     |   26 +
 .../productFiles/platform.sdk/p2.inf               |    8 +-
 .../productFiles/platform.sdk/platform.product     |  144 +-
 eclipse-build-config/productFiles/platform/p2.inf  |    8 +-
 .../productFiles/platform/platform.product         |  143 +-
 .../productFiles/rcp.sdk/rcp.product               |  132 +-
 eclipse-build-config/productFiles/rcp/rcp.product  |  132 +-
 eclipse-build-config/productFiles/sdk/p2.inf       |    8 +-
 eclipse-build-config/productFiles/sdk/sdk.product  |  137 +-
 eclipse-build-feature/.project                     |   11 -
 eclipse-build-feature/ChangeLog                    |   17 +
 eclipse-build-feature/feature.xml                  |    8 +-
 eclipse-build-generatedScripts.tar.bz2             |  Bin 14409 -> 21498 bytes
 eclipse.1.xml                                      |  616 --
 eclipse/directory.txt                              | 1006 ++--
 .../org.eclipse.ecf.filetransfer/.classpath        |    7 -
 .../.settings/org.eclipse.jdt.core.prefs           |  350 -
 .../META-INF/MANIFEST.MF                           |   28 -
 .../org.eclipse.ecf.filetransfer/build.properties  |   12 -
 .../eclipse/ecf/filetransfer/FileTransferJob.java  |   82 -
 .../IncomingFileTransferException.java             |   67 -
 .../IIncomingFileTransferReceiveResumedEvent.java  |  145 -
 .../IIncomingFileTransferReceiveStartEvent.java    |  132 -
 .../ecf/filetransfer/identity/FileIDFactory.java   |  105 -
 .../eclipse/ecf/filetransfer/identity/IFileID.java |   39 -
 .../ecf/internal/filetransfer/Messages.java        |   31 -
 .../ecf/internal/filetransfer/messages.properties  |    2 -
 eclipse/ecf-src/org.eclipse.ecf.identity/.options  |   15 -
 .../org.eclipse.ecf.identity/META-INF/MANIFEST.MF  |   23 -
 .../org.eclipse.ecf.identity/build.properties      |   21 -
 .../src/org/eclipse/ecf/core/identity/GUID.java    |  170 -
 .../org/eclipse/ecf/core/identity/IDFactory.java   |  349 -
 .../src/org/eclipse/ecf/core/identity/LongID.java  |  114 -
 .../org/eclipse/ecf/core/identity/Namespace.java   |  292 -
 .../org/eclipse/ecf/core/identity/StringID.java    |  150 -
 .../src/org/eclipse/ecf/core/util/Trace.java       |  550 --
 .../ecf/internal/core/identity/Activator.java      |  373 -
 .../core/identity/IdentityDebugOptions.java        |   23 -
 .../ecf/internal/core/identity/Messages.java       |   36 -
 .../ecf/internal/core/identity/messages.properties |    7 -
 .../.settings/org.eclipse.jdt.core.prefs           |  350 -
 .../META-INF/MANIFEST.MF                           |   12 -
 .../build.properties                               |   10 -
 .../.settings/org.eclipse.jdt.core.prefs           |  350 -
 .../META-INF/MANIFEST.MF                           |   30 -
 .../build.properties                               |   11 -
 .../filetransfer/httpclient/Activator.java         |  122 -
 .../HttpClientProxyCredentialProvider.java         |   51 -
 .../httpclient/HttpClientFileSystemBrowser.java    |  309 -
 .../filetransfer/httpclient/HttpClientOptions.java |   20 -
 .../httpclient/HttpClientRetrieveFileTransfer.java | 1052 ---
 .../build.properties                               |    8 -
 .../.settings/org.eclipse.jdt.core.prefs           |  350 -
 .../META-INF/MANIFEST.MF                           |   33 -
 .../build.properties                               |   12 -
 .../schema/browseFileTransferProtocolFactory.exsd  |  153 -
 .../retrieveFileTransferProtocolFactory.exsd       |  157 -
 .../schema/sendFileTransferProtocolFactory.exsd    |  153 -
 .../internal/provider/filetransfer/Activator.java  |  886 --
 .../internal/provider/filetransfer/Messages.java   |   80 -
 .../provider/filetransfer/messages.properties      |   61 -
 .../IFileTransferProtocolToFactoryMapper.java      |  158 -
 .../browse/AbstractFileSystemBrowser.java          |  287 -
 .../filetransfer/browse/URLFileSystemBrowser.java  |  200 -
 .../filetransfer/identity/FileTransferID.java      |   67 -
 .../identity/FileTransferNamespace.java            |   96 -
 .../outgoing/AbstractOutgoingFileTransfer.java     |  495 --
 .../outgoing/MultiProtocolOutgoingAdapter.java     |  146 -
 .../retrieve/AbstractRetrieveFileTransfer.java     |  923 --
 .../retrieve/MultiProtocolRetrieveAdapter.java     |  148 -
 .../UrlConnectionRetrieveFileTransfer.java         |  479 -
 .../provider/filetransfer/util/JREProxyHelper.java |   77 -
 .../filetransfer/util/PollingInputStream.java      |  241 -
 .../.settings/org.eclipse.pde.prefs                |    3 -
 .../org.eclipse.ecf.ssl/META-INF/MANIFEST.MF       |   12 -
 .../ecf-src/org.eclipse.ecf.ssl/build.properties   |    8 -
 .../.settings/org.eclipse.pde.prefs                |    3 -
 .../ecf-src/org.eclipse.ecf/META-INF/MANIFEST.MF   |   31 -
 eclipse/ecf-src/org.eclipse.ecf/build.properties   |   26 -
 eclipse/ecf-src/org.eclipse.ecf/javadoc.xml        |    6 -
 eclipse/ecf-src/org.eclipse.ecf/plugin.properties  |   10 -
 eclipse/ecf-src/org.eclipse.ecf/plugin.xml         |   14 -
 .../org.eclipse.ecf/schema/containerFactory.exsd   |  307 -
 .../org/eclipse/ecf/core/AbstractContainer.java    |   95 -
 .../src/org/eclipse/ecf/core/BaseContainer.java    |  129 -
 .../src/org/eclipse/ecf/core/ContainerFactory.java |  506 --
 .../eclipse/ecf/core/ContainerTypeDescription.java |  232 -
 .../org/eclipse/ecf/core/IContainerFactory.java    |  264 -
 .../core/provider/BaseContainerInstantiator.java   |   84 -
 .../ecf/core/provider/IContainerInstantiator.java  |  132 -
 .../eclipse/ecf/core/security/BooleanCallback.java |  111 -
 .../eclipse/ecf/core/security/NameCallback.java    |  115 -
 .../ecf/core/security/PassphraseCallback.java      |  115 -
 .../ecf/core/security/PasswordCallback.java        |  115 -
 .../src/org/eclipse/ecf/core/start/IECFStart.java  |   26 -
 .../ecf/core/status/SerializableMultiStatus.java   |  141 -
 .../ecf/core/status/SerializableStatus.java        |  281 -
 .../src/org/eclipse/ecf/core/user/IUser.java       |   43 -
 .../org/eclipse/ecf/internal/core/ECFPlugin.java   |  399 -
 .../org/eclipse/ecf/internal/core/Messages.java    |   37 -
 .../eclipse/ecf/internal/core/messages.properties  |   22 -
 .../org.eclipse.equinox.concurrent/.classpath      |    7 -
 .../org.eclipse.equinox.concurrent/.project        |   34 -
 .../.settings/org.eclipse.jdt.core.prefs           |    7 -
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   14 -
 .../build.properties                               |   17 -
 .../plugin.properties                              |   10 -
 .../concurrent/future/AbstractExecutor.java        |   40 -
 .../equinox/concurrent/future/AbstractFuture.java  |   34 -
 .../concurrent/future/FutureProgressMonitor.java   |  109 -
 .../equinox/concurrent/future/IExecutor.java       |   56 -
 .../eclipse/equinox/concurrent/future/IFuture.java |  153 -
 .../concurrent/future/IProgressRunnable.java       |   26 -
 .../concurrent/future/IRunnableExecutor.java       |   19 -
 .../concurrent/future/ISafeProgressRunner.java     |   20 -
 .../concurrent/future/ImmediateExecutor.java       |   41 -
 .../concurrent/future/SingleOperationFuture.java   |  160 -
 .../equinox/concurrent/future/ThreadsExecutor.java |   86 -
 .../concurrent/future/TimeoutException.java        |   37 -
 eclipse/featureVersions.properties                 |   55 +-
 eclipse/features/master-equinox-p2/feature.xml     |   14 +-
 .../.project                                       |    0
 .../build.properties                               |    0
 .../features/master-equinox-weaving/feature.xml    |   19 +
 eclipse/features/master-equinox/build.properties   |    4 +-
 eclipse/features/master-equinox/feature.xml        |   13 +-
 eclipse/features/master-jetty/feature.xml          |    2 +-
 eclipse/features/master/feature.xml                |    8 +-
 .../features/org.eclipse.cvs/feature.properties    |  125 +-
 eclipse/features/org.eclipse.cvs/feature.xml       |   21 +-
 eclipse/features/org.eclipse.cvs/license.html      |   94 +-
 .../features/org.eclipse.cvs/rootfiles/notice.html |   94 +-
 .../sourceTemplateFeature/feature.properties       |  124 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../feature.properties                             |  120 +-
 .../org.eclipse.equinox.compendium.sdk/feature.xml |    2 +-
 .../license.html                                   |   94 +-
 .../feature.properties                             |  120 +-
 .../org.eclipse.equinox.core.sdk/feature.xml       |    2 +-
 .../org.eclipse.equinox.core.sdk/license.html      |   94 +-
 .../org.eclipse.equinox.executable/.cproject       |  268 +-
 .../org.eclipse.equinox.executable/.project        |    2 +-
 .../.settings/org.eclipse.cdt.core.prefs           |  154 +-
 .../.settings/org.eclipse.cdt.ui.prefs             |    4 +
 .../macosx/ppc/Eclipse.app/Contents/Info.plist     |  146 +-
 .../macosx/x86/Eclipse.app/Contents/Info.plist     |  146 +-
 .../macosx/ppc/Eclipse.app/Contents/Info.plist     |    6 +-
 .../macosx/x86/Eclipse.app/Contents/Info.plist     |    6 +-
 .../macosx/x86_64/Eclipse.app/Contents/Info.plist  |    6 +-
 .../build.properties                               |    7 +-
 .../customBuildCallbacks.xml                       |    4 +
 .../feature.properties                             |  120 +-
 .../org.eclipse.equinox.executable/feature.xml     |   29 +-
 .../library/carbon/eclipseCarbon.c                 |  298 +-
 .../library/eclipse.c                              |  406 +-
 .../library/eclipseCommon.c                        |   70 +-
 .../library/eclipseCommon.h                        |   34 +-
 .../library/eclipseConfig.c                        |   11 +-
 .../library/eclipseConfig.h                        |    6 -
 .../library/eclipseJNI.c                           |  266 +-
 .../library/eclipseJNI.h                           |   23 +-
 .../library/eclipseMain.c                          |   76 +-
 .../library/eclipseMozilla.c                       |   64 +-
 .../library/eclipseNix.c                           |    2 +-
 .../library/eclipseOS.h                            |   35 +-
 .../library/eclipseShm.c                           |    7 +
 .../library/eclipseShm.h                           |    7 -
 .../library/eclipseUtil.c                          |   21 +-
 .../library/eclipseUtil.h                          |   12 +-
 .../library/gtk/build.sh                           |   32 +-
 .../library/gtk/eclipse.ini                        |    4 +
 .../library/gtk/eclipseGtk.c                       |  198 +-
 .../library/gtk/eclipseGtk.h                       |   16 +
 .../library/gtk/eclipseGtkCommon.c                 |    3 +
 .../library/gtk/eclipseGtkInit.c                   |   32 +-
 .../library/gtk/make_aix.mak                       |  104 +
 .../library/gtk/make_linux.mak                     |   12 +-
 .../library/gtk/make_solaris.mak                   |    4 +-
 .../library/make_version.mak                       |    2 +-
 .../library/motif/build.sh                         |    2 +
 .../library/motif/eclipseMotif.c                   |   19 +-
 .../library/motif/make_aix.mak                     |    2 +-
 .../library/motif/make_linux.mak                   |    2 +-
 .../library/win32/build.bat                        |    9 +-
 .../library/win32/eclipseWin.c                     |  151 +-
 .../library/win32/eclipseWinCommon.c               |   29 +-
 .../library/win32/make_mingw.mak                   |   43 +-
 .../library/win32/make_win32.mak                   |   42 +-
 .../library/win32/make_win64.mak                   |   41 +-
 .../library/win32/make_win64_ia64.mak              |   41 +-
 .../library/wpf/build.bat                          |    4 +-
 .../library/wpf/eclipseWpf.cpp                     |   20 +-
 .../org.eclipse.equinox.executable/license.html    |   94 +-
 .../target.build.properties                        |   10 +-
 .../target.build.xml                               |   28 +
 .../org.eclipse.equinox.p2.agent.feature/.project  |   17 -
 .../build.properties                               |   11 -
 .../feature.xml                                    |  228 -
 .../.project                                       |   17 -
 .../build.properties                               |   11 -
 .../feature.xml                                    |  187 -
 .../.project                                       |   17 +
 .../build.properties                               |   11 +
 .../epl-v10.html                                   |    0
 .../feature.properties                             |  171 +
 .../feature.xml                                    |   41 +
 .../license.html                                   |  107 +
 .../sourceTemplateFeature/build.properties         |    0
 .../sourceTemplateFeature}/eclipse_update_120.jpg  |  Bin 21695 -> 21695 bytes
 .../sourceTemplateFeature}/epl-v10.html            |    0
 .../sourceTemplateFeature/feature.properties       |  144 +
 .../sourceTemplateFeature}/license.html            |    0
 .../.project                                       |   17 -
 .../build.properties                               |   13 -
 .../customBuildCallbacks.xml                       |   39 -
 .../feature.xml                                    |  194 -
 .../org.eclipse.equinox.p2.sdk/build.properties    |    7 +-
 .../org.eclipse.equinox.p2.sdk/feature.properties  |  125 +-
 .../org.eclipse.equinox.p2.sdk/feature.xml         |   59 +-
 .../org.eclipse.equinox.p2.sdk/license.html        |  100 +-
 .../feature.properties                             |  122 +-
 .../org.eclipse.equinox.p2.user.ui/feature.xml     |   30 +-
 .../org.eclipse.equinox.p2.user.ui/license.html    |  102 +-
 .../org.eclipse.equinox.p2.user.ui/pom.xml         |   17 +
 .../sourceTemplateFeature/feature.properties       |  120 +-
 .../sourceTemplateFeature/license.html             |  102 +-
 .../org.eclipse.equinox.sdk/feature.properties     |  129 +-
 .../features/org.eclipse.equinox.sdk/feature.xml   |    6 +-
 .../features/org.eclipse.equinox.sdk/license.html  |   94 +-
 .../org.eclipse.equinox.server.core/.project       |   17 +
 .../build.properties                               |    3 +
 .../feature.properties                             |  164 +
 .../org.eclipse.equinox.server.core/feature.xml    |   79 +
 .../org.eclipse.equinox.server.core/license.html   |  107 +
 .../org.eclipse.equinox.server.jetty/.project      |   17 +
 .../build.properties                               |    3 +
 .../feature.properties                             |  164 +
 .../org.eclipse.equinox.server.jetty/feature.xml   |   50 +
 .../org.eclipse.equinox.server.jetty/license.html  |  107 +
 .../org.eclipse.equinox.server.p2/.project         |   17 +
 .../org.eclipse.equinox.server.p2/build.properties |   12 +
 .../feature.properties                             |  164 +
 .../org.eclipse.equinox.server.p2/feature.xml      |  243 +
 .../org.eclipse.equinox.server.p2/license.html     |  107 +
 .../.project                                       |   17 +
 .../build.properties                               |    5 +
 .../feature.properties                             |  164 +
 .../feature.xml                                    |   38 +
 .../license.html                                   |  107 +
 .../rootfiles/launch.ini                           |   12 +
 .../rootfiles/web.xml                              |   65 +
 .../org.eclipse.equinox.server.simple/.project     |   17 +
 .../build.properties                               |    3 +
 .../feature.properties                             |  164 +
 .../org.eclipse.equinox.server.simple/feature.xml  |   30 +
 .../org.eclipse.equinox.server.simple/license.html |  107 +
 .../feature.properties                             |  120 +-
 .../org.eclipse.equinox.serverside.sdk/feature.xml |   31 +-
 .../license.html                                   |   94 +-
 .../org.eclipse.equinox.weaving.sdk/.project       |   17 +
 .../build.properties                               |    9 +
 .../epl-v10.html                                   |    0
 .../feature.properties                             |  170 +
 .../org.eclipse.equinox.weaving.sdk/feature.xml    |   77 +
 .../org.eclipse.equinox.weaving.sdk/license.html   |  107 +
 .../features/org.eclipse.help/feature.properties   |  126 +-
 eclipse/features/org.eclipse.help/feature.xml      |    2 +-
 eclipse/features/org.eclipse.help/license.html     |   94 +-
 .../sourceTemplateFeature/feature.properties       |  124 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../features/org.eclipse.jdt/feature.properties    |  122 +-
 eclipse/features/org.eclipse.jdt/feature.xml       |   26 +-
 eclipse/features/org.eclipse.jdt/license.html      |   94 +-
 .../features/org.eclipse.jdt/rootfiles/notice.html |   94 +-
 .../sourceTemplateFeature/feature.properties       |  122 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../sourceTemplatePlugin/about.properties          |    4 +-
 .../sourceTemplatePlugin/plugin.properties         |    4 +-
 .../feature.properties                             |  128 +-
 .../license.html                                   |   94 +-
 .../org.eclipse.pde.api.tools.ee.fragments/p2.inf  |   15 +-
 .../features/org.eclipse.pde/feature.properties    |  126 +-
 eclipse/features/org.eclipse.pde/feature.xml       |   21 +-
 eclipse/features/org.eclipse.pde/license.html      |   94 +-
 .../sourceTemplateFeature/feature.properties       |  130 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../sourceTemplatePlugin/about.properties          |    4 +-
 .../about_files/linux.gtk.ppc/about.html           |    3 +-
 .../about_files/linux.gtk.x86/about.html           |   42 +-
 .../linux.gtk.x86/about_files/webkit-bsd.txt       |   20 +
 .../about_files/linux.gtk.x86_64/about.html        |   42 +-
 .../linux.gtk.x86_64/about_files/webkit-bsd.txt    |   20 +
 .../org.eclipse.platform/feature.properties        |  122 +-
 eclipse/features/org.eclipse.platform/feature.xml  |   63 +-
 eclipse/features/org.eclipse.platform/license.html |   94 +-
 .../org.eclipse.platform/rootfiles/.eclipseproduct |    2 +-
 .../org.eclipse.platform/rootfiles/notice.html     |   94 +-
 .../rootfiles/readme/readme_eclipse.html           | 2996 +++----
 .../sourceTemplateFeature/build.properties         |    4 +-
 .../sourceTemplateFeature/feature.properties       |  127 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../sourceTemplatePlugin/about.properties          |    4 +-
 .../features/org.eclipse.rcp/feature.properties    |  126 +-
 eclipse/features/org.eclipse.rcp/feature.xml       |  103 +-
 eclipse/features/org.eclipse.rcp/license.html      |   94 +-
 .../sourceTemplateFeature/feature.properties       |  124 +-
 .../sourceTemplateFeature/license.html             |   94 +-
 .../org.eclipse.releng.tools/feature.properties    |  126 +-
 .../features/org.eclipse.releng.tools/license.html |   94 +-
 eclipse/features/org.eclipse.sdk/build.properties  |    7 +-
 .../features/org.eclipse.sdk/feature.properties    |  128 +-
 eclipse/features/org.eclipse.sdk/feature.xml       |   16 +-
 eclipse/features/org.eclipse.sdk/license.html      |   94 +-
 eclipse/label.properties                           |    6 +-
 eclipse/maps/org.eclipse.releng/maps/ant.map       |   12 +-
 eclipse/maps/org.eclipse.releng/maps/base.map      |    8 -
 eclipse/maps/org.eclipse.releng/maps/compare.map   |   12 +-
 eclipse/maps/org.eclipse.releng/maps/core-hpux.map |    3 +-
 .../maps/org.eclipse.releng/maps/core-macosx.map   |    2 +-
 eclipse/maps/org.eclipse.releng/maps/core-qnx.map  |    3 -
 .../org.eclipse.releng/maps/core-variables.map     |    2 +-
 eclipse/maps/org.eclipse.releng/maps/core.map      |  177 +-
 eclipse/maps/org.eclipse.releng/maps/doc.map       |   10 +-
 .../org.eclipse.releng/maps/equinox-incubator.map  |   28 +-
 eclipse/maps/org.eclipse.releng/maps/feature.map   |   89 +-
 eclipse/maps/org.eclipse.releng/maps/jdtapt.map    |   16 +-
 eclipse/maps/org.eclipse.releng/maps/jdtcore.map   |   16 +-
 eclipse/maps/org.eclipse.releng/maps/jdtdebug.map  |   23 +-
 eclipse/maps/org.eclipse.releng/maps/jdtui.map     |   32 +-
 eclipse/maps/org.eclipse.releng/maps/orbit.map     |  109 +-
 eclipse/maps/org.eclipse.releng/maps/p2.map        |  121 +-
 eclipse/maps/org.eclipse.releng/maps/pde.map       |   55 +-
 eclipse/maps/org.eclipse.releng/maps/rcp.map       |    4 +-
 eclipse/maps/org.eclipse.releng/maps/releng.map    |   16 +-
 eclipse/maps/org.eclipse.releng/maps/swt.map       |   66 +-
 eclipse/maps/org.eclipse.releng/maps/team.map      |   37 +-
 .../maps/org.eclipse.releng/maps/testframework.map |    6 +-
 eclipse/maps/org.eclipse.releng/maps/text.map      |   24 +-
 eclipse/maps/org.eclipse.releng/maps/ui.map        |   70 +-
 eclipse/maps/org.eclipse.releng/maps/update.map    |   14 +-
 .../maps/org.eclipse.releng/maps/userassist.map    |   25 +-
 eclipse/pluginVersions.properties                  |  593 +-
 .../META-INF/ECLIPSEF.RSA                          |  Bin 5640 -> 0 bytes
 .../META-INF/ECLIPSEF.SF                           |  179 -
 .../META-INF/MANIFEST.MF                           |  234 -
 .../plugin.properties                              |   12 -
 .../META-INF/ECLIPSEF.RSA                          |  Bin 0 -> 5639 bytes
 .../META-INF/ECLIPSEF.SF                           |  179 +
 .../META-INF/MANIFEST.MF                           |  234 +
 .../META-INF/eclipse.inf                           |    0
 .../about.html                                     |    0
 .../about_files/LICENSE.dom.html                   |    0
 .../about_files/LICENSE.sax.txt                    |    0
 .../about_files/NOTICE                             |    0
 .../about_files}/asl-v20.txt                       |    0
 .../bin/ant                                        |    0
 .../bin/ant.bat                                    |    0
 .../bin/ant.cmd                                    |    0
 .../bin/antRun                                     |    0
 .../bin/antRun.bat                                 |    0
 .../bin/antRun.pl                                  |    0
 .../bin/antenv.cmd                                 |    0
 .../bin/complete-ant-cmd.pl                        |    0
 .../bin/envset.cmd                                 |    0
 .../bin/lcp.bat                                    |    0
 .../bin/runant.pl                                  |    0
 .../bin/runant.py                                  |    0
 .../bin/runrc.cmd                                  |    0
 .../etc/changelog.xsl                              |    0
 .../etc/checkstyle/checkstyle-frames.xsl           |    0
 .../etc/checkstyle/checkstyle-text.xsl             |    0
 .../etc/checkstyle/checkstyle-xdoc.xsl             |    0
 .../etc/coverage-frames.xsl                        |    0
 .../etc/jdepend-frames.xsl                         |    0
 .../etc/jdepend.xsl                                |    0
 .../etc/junit-frames-xalan1.xsl                    |    0
 .../etc/junit-frames.xsl                           |    0
 .../etc/junit-noframes.xsl                         |    0
 .../etc/log.xsl                                    |    0
 .../etc/maudit-frames.xsl                          |    0
 .../etc/mmetrics-frames.xsl                        |    0
 .../etc/tagdiff.xsl                                |    0
 .../plugin.properties                              |   12 +
 .../META-INF/MANIFEST.MF                           |   18 +
 .../META-INF/eclipse.inf                           |    2 +
 .../about.html                                     |   24 +
 .../plugin.properties                              |   13 +
 .../META-INF/MANIFEST.MF                           |   29 +
 .../META-INF/eclipse.inf                           |    2 +
 .../about.html                                     |   44 +
 .../plugin.properties                              |   13 +
 .../org.eclipse.ant.core/META-INF/MANIFEST.MF      |    4 +-
 eclipse/plugins/org.eclipse.ant.core/about.html    |    4 +-
 .../buildnotes_platform-ant.html                   |   87 +-
 eclipse/plugins/org.eclipse.ant.core/plugin.xml    |    5 +-
 ...-ant.html => r3_5_buildnotes_platform-ant.html} |    0
 .../org/eclipse/ant/core/AntCorePreferences.java   |   85 +-
 .../src/org/eclipse/ant/core/AntRunner.java        |    2 +-
 .../src/org/eclipse/ant/core/ProjectInfo.java      |    8 +-
 .../src/org/eclipse/ant/core/TargetInfo.java       |    6 +-
 .../ant/internal/core/AntClasspathEntry.java       |    6 +-
 .../org/eclipse/ant/internal/core/AntCoreUtil.java |    6 +-
 .../org/eclipse/ant/internal/core/AntObject.java   |    4 +-
 .../ant/internal/core/IAntCoreConstants.java       |   74 +-
 .../internal/core/contentDescriber/AntHandler.java |    8 +-
 .../ant/internal/core/ant/InternalAntRunner.java   |   11 +-
 .../internal/core/ant/ProgressBuildListener.java   |   18 +-
 .../plugins/org.eclipse.ant.launching/.classpath   |   10 +
 .../build common debug [Builder].launch            |   21 +
 .../build loggers [Builder].launch                 |   22 +
 .../build remote support [Builder].launch          |   21 +
 eclipse/plugins/org.eclipse.ant.launching/.project |   64 +
 .../.settings/org.eclipse.jdt.core.prefs           |   74 +
 .../.settings/org.eclipse.pde.prefs                |   25 +
 .../org.eclipse.ant.launching/META-INF/MANIFEST.MF |   25 +
 .../plugins/org.eclipse.ant.launching/about.html   |   53 +
 .../org.eclipse.ant.launching/build.properties     |   32 +
 .../buildfiles/buildCommonDebug.xml                |   39 +
 .../buildfiles/buildLoggers.xml                    |   39 +
 .../buildfiles/buildRemote.xml                     |   39 +
 .../common}/META-INF/eclipse.inf                   |    0
 .../internal/launching/debug/AntDebugState.java    |  530 ++
 .../launching/debug/IDebugBuildLogger.java         |   21 +
 .../loggers}/META-INF/eclipse.inf                  |    0
 .../runtime/logger/AntProcessBuildLogger.java      |  306 +
 .../runtime/logger/AntProcessDebugBuildLogger.java |  246 +
 .../launching/runtime/logger/NullBuildLogger.java  |  179 +
 .../launching/runtime/logger/RuntimeMessages.java  |   32 +
 .../runtime/logger/RuntimeMessages.properties      |   20 +
 .../org.eclipse.ant.launching/plugin.properties    |   24 +
 .../plugins/org.eclipse.ant.launching/plugin.xml   |  103 +
 .../remote}/META-INF/eclipse.inf                   |    0
 .../launching/remote/AntSecurityException.java     |   23 +
 .../launching/remote/AntSecurityManager.java       |  371 +
 .../launching/remote/DemuxInputStreamSetter.java   |   26 +
 .../launching/remote/EclipseDefaultExecutor.java   |   41 +
 .../remote/EclipseSingleCheckExecutor.java         |   39 +
 .../internal/launching/remote/ExecutorSetter.java  |   26 +
 .../launching/remote/InputHandlerSetter.java       |   44 +
 .../launching/remote/InternalAntRunner.java        | 1231 +++
 .../launching/remote/RemoteAntMessages.java        |   33 +
 .../launching/remote/RemoteAntMessages.properties  |   76 +
 .../remote/inputhandler/FailInputHandler.java      |   29 +
 .../launching/remote/logger/MessageIds.java        |   21 +
 .../remote/logger/RemoteAntBreakpoint.java         |   74 +
 .../remote/logger/RemoteAntBuildLogger.java        |  396 +
 .../remote/logger/RemoteAntDebugBuildLogger.java   |  353 +
 .../internal/launching/AntCoreModelMessages.java   |   25 +
 .../launching/AntCoreModelMessages.properties      |   14 +
 .../eclipse/ant/internal/launching/AntLaunch.java  |   57 +
 .../ant/internal/launching/AntLaunching.java       |  166 +
 .../AntLaunchingPreferenceInitializer.java         |   37 +
 .../ant/internal/launching/AntLaunchingUtil.java   |  541 ++
 .../IAntLaunchingPreferenceConstants.java          |   23 +
 .../ant/internal/launching/LinkDescriptor.java     |   73 +
 .../internal/launching/debug/AntDebugMessages.java |   23 +
 .../launching/debug/AntDebugMessages.properties    |   12 +
 .../launching/debug/AntSourceContainer.java        |   73 +
 .../launching/debug/AntSourceLookupDirector.java   |   36 +
 .../debug/AntSourceLookupParticipant.java          |   36 +
 .../debug/AntSourcePathComputerDelegate.java       |   33 +
 .../launching/debug/IAntDebugConstants.java        |   33 +
 .../launching/debug/IAntDebugController.java       |   66 +
 .../launching/debug/model/AntDebugElement.java     |   55 +
 .../launching/debug/model/AntDebugTarget.java      |  463 +
 .../launching/debug/model/AntLineBreakpoint.java   |  112 +
 .../launching/debug/model/AntProperties.java       |  109 +
 .../launching/debug/model/AntPropertiesValue.java  |   71 +
 .../launching/debug/model/AntProperty.java         |  121 +
 .../launching/debug/model/AntStackFrame.java       |  314 +
 .../internal/launching/debug/model/AntThread.java  |  479 +
 .../internal/launching/debug/model/AntValue.java   |   71 +
 .../launching/debug/model/DebugMessageIds.java     |   47 +
 .../launching/debug/model/DebugModelMessages.java  |   32 +
 .../debug/model/DebugModelMessages.properties      |   21 +
 .../debug/model/RemoteAntDebugBuildListener.java   |  321 +
 .../launchConfigurations/AntClasspathProvider.java |   50 +
 .../AntHomeClasspathEntry.java                     |  210 +
 .../AntJavaLaunchDelegate.java                     |   47 +
 .../AntLaunchConfigurationMessages.java            |   37 +
 .../AntLaunchConfigurationMessages.properties      |   26 +
 .../launchConfigurations/AntLaunchDelegate.java    |  898 ++
 .../launchConfigurations/AntMigrationDelegate.java |   77 +
 .../launching/launchConfigurations/AntProcess.java |  204 +
 .../launchConfigurations/AntStreamMonitor.java     |   83 +
 .../launchConfigurations/AntStreamsProxy.java      |   65 +
 .../ContributedClasspathEntriesEntry.java          |  245 +
 .../launching/launchConfigurations/MessageIds.java |   21 +
 .../RemoteAntBuildListener.java                    |  401 +
 .../RemoteAntProcessFactory.java                   |   34 +
 .../RemoteAntRuntimeProcess.java                   |   37 +
 .../eclipse/ant/launching/IAntLaunchConstants.java |  126 +
 .../src/org/eclipse/ant}/launching/package.html    |    0
 eclipse/plugins/org.eclipse.ant.ui/.classpath      |    5 +-
 .../.settings/org.eclipse.jdt.core.prefs           |    5 +-
 .../ui/editor/AntEditorCompletionProcessor.java    |   69 +-
 .../ui/editor/actions/RunToLineAdapter.java        |    8 +-
 .../editor/actions/ToggleLineBreakpointAction.java |    6 +-
 .../outline/AntEditorContentOutlinePage.java       |    7 +-
 .../ui/editor/text/AntAnnotationModel.java         |    4 +-
 .../ant/internal/ui/editor/text/XMLTextHover.java  |   36 +-
 .../internal/ui/antsupport/AntSupportMessages.java |   12 +-
 .../ui/antsupport/AntSupportMessages.properties    |   12 +-
 .../antsupport/logger/AntProcessBuildLogger.java   |  350 -
 .../logger/AntProcessDebugBuildLogger.java         |  247 -
 .../ui/antsupport/logger/NullBuildLogger.java      |  180 -
 .../internal/ui/AntUIPreferenceInitializer.java    |    6 +-
 .../org/eclipse/ant/internal/ui/AntUtil.java       |  309 +-
 .../eclipse/ant/internal/ui/IAntUIConstants.java   |    8 +-
 .../ant/internal/ui/IAntUIPreferenceConstants.java |    8 +-
 .../ui/console/AntConsoleColorProvider.java        |    8 +-
 .../internal/ui/datatransfer/BuildFileCreator.java |  187 +-
 .../ant/internal/ui/debug/AntDebugMessages.java    |   23 -
 .../internal/ui/debug/AntDebugMessages.properties  |   12 -
 .../ant/internal/ui/debug/AntSourceContainer.java  |   73 -
 .../internal/ui/debug/AntSourceLookupDirector.java |   36 -
 .../ui/debug/AntSourceLookupParticipant.java       |   36 -
 .../ui/debug/AntSourcePathComputerDelegate.java    |   33 -
 .../ant/internal/ui/debug/IAntDebugConstants.java  |   33 -
 .../ant/internal/ui/debug/IAntDebugController.java |   66 -
 .../internal/ui/debug/model/AntDebugElement.java   |   54 -
 .../ui/debug/model/AntDebugModelPresentation.java  |    7 +-
 .../internal/ui/debug/model/AntDebugTarget.java    |  463 -
 .../internal/ui/debug/model/AntLineBreakpoint.java |  112 -
 .../ant/internal/ui/debug/model/AntProperties.java |  109 -
 .../ui/debug/model/AntPropertiesValue.java         |   71 -
 .../ant/internal/ui/debug/model/AntProperty.java   |  121 -
 .../ant/internal/ui/debug/model/AntStackFrame.java |  314 -
 .../ant/internal/ui/debug/model/AntThread.java     |  479 -
 .../ant/internal/ui/debug/model/AntValue.java      |   71 -
 .../internal/ui/debug/model/DebugMessageIds.java   |   48 -
 .../ui/debug/model/DebugModelMessages.java         |   27 +-
 .../ui/debug/model/DebugModelMessages.properties   |   13 +-
 .../debug/model/RemoteAntDebugBuildListener.java   |  321 -
 .../launchConfigurations/AntBuilderTargetsTab.java |   60 +-
 .../launchConfigurations/AntClasspathProvider.java |   50 -
 .../ui/launchConfigurations/AntClasspathTab.java   |    3 +-
 .../AntHomeClasspathEntry.java                     |  209 -
 .../ui/launchConfigurations/AntJRETab.java         |  109 +-
 .../AntLaunchConfigurationMessages.java            |   18 +-
 .../AntLaunchConfigurationMessages.properties      |   16 +-
 .../ui/launchConfigurations/AntLaunchDelegate.java |  765 +--
 .../ui/launchConfigurations/AntLaunchShortcut.java |  120 +-
 .../ui/launchConfigurations/AntMainTab.java        |   15 +-
 .../launchConfigurations/AntMigrationDelegate.java |   77 -
 .../ui/launchConfigurations/AntProcess.java        |  193 -
 .../ui/launchConfigurations/AntPropertiesTab.java  |   14 +-
 .../ui/launchConfigurations/AntStreamMonitor.java  |   83 -
 .../ui/launchConfigurations/AntStreamsProxy.java   |   65 -
 .../ui/launchConfigurations/AntTabGroup.java       |    6 +-
 .../ui/launchConfigurations/AntTargetsTab.java     |   26 +-
 .../AntWorkingDirectoryBlock.java                  |    2 +-
 .../ContributedClasspathEntriesEntry.java          |  246 -
 .../EditAntHomeEntryAction.java                    |    3 +-
 .../IAntLaunchConfigurationConstants.java          |    4 +-
 .../ui/launchConfigurations/MessageIds.java        |   21 -
 .../RemoteAntBuildListener.java                    |  396 -
 .../RemoteAntProcessFactory.java                   |   34 -
 .../RemoteAntRuntimeProcess.java                   |   37 -
 .../ui/launchConfigurations/SetTargetsDialog.java  |    8 +-
 .../ui/launchConfigurations/TaskLinkManager.java   |  225 +-
 .../ant/internal/ui/model/AntElementNode.java      |    5 +
 .../eclipse/ant/internal/ui/model/AntModel.java    |   10 +-
 .../ant/internal/ui/model/AntModelCore.java        |    9 +-
 .../ant/internal/ui/model/AntModelProject.java     |  170 +-
 .../ant/internal/ui/model/AntProjectNode.java      |    7 +-
 .../ant/internal/ui/model/AntPropertyNode.java     |   17 +-
 .../eclipse/ant/internal/ui/model/AntRefTable.java |   53 -
 .../ant/internal/ui/model/AntTargetNode.java       |   27 +-
 .../internal/ui/model/InternalTargetFilter.java    |    8 +-
 .../internal/ui/preferences/AddCustomDialog.java   |    9 +-
 .../internal/ui/preferences/AntClasspathBlock.java |    9 +-
 .../ui/preferences/AntClasspathLabelProvider.java  |    4 +-
 .../ui/preferences/AntObjectLabelProvider.java     |    5 +-
 .../internal/ui/preferences/AntPreferencePage.java |   73 +-
 .../preferences/AntPreferencesMessages.properties  |    6 +-
 .../ui/preferences/AntPropertiesBlock.java         |    7 +-
 .../internal/ui/preferences/ClasspathEntry.java    |    5 +-
 .../ui/preferences/FileSelectionDialog.java        |    9 +-
 .../ant/internal/ui/preferences/MessageLine.java   |    5 +-
 .../LaunchConfigurationBuildfileChange.java        |   13 +-
 .../org/eclipse/ant/internal/ui/views/AntView.java |    5 +-
 .../ant/internal/ui/views/AntViewDropAdapter.java  |   22 +-
 .../views/actions/SearchForBuildFilesDialog.java   |    8 +-
 .../IAntLaunchConfigurationConstants.java          |   65 +-
 .../ui/antsupport/logger/util/AntDebugState.java   |  529 --
 .../ui/antsupport/logger/util/DebugMessageIds.java |   47 -
 .../antsupport/logger/util/IDebugBuildLogger.java  |   21 -
 .../org.eclipse.ant.ui/META-INF/MANIFEST.MF        |   15 +-
 .../ui/antsupport/AntSecurityException.java        |   23 -
 .../internal/ui/antsupport/AntSecurityManager.java |  371 -
 .../ui/antsupport/DemuxInputStreamSetter.java      |   26 -
 .../ui/antsupport/EclipseDefaultExecutor.java      |   41 -
 .../ui/antsupport/EclipseSingleCheckExecutor.java  |   39 -
 .../ant/internal/ui/antsupport/ExecutorSetter.java |   26 -
 .../internal/ui/antsupport/InputHandlerSetter.java |   44 -
 .../internal/ui/antsupport/InternalAntRunner.java  | 1232 ---
 .../internal/ui/antsupport/RemoteAntMessages.java  |   33 -
 .../ui/antsupport/RemoteAntMessages.properties     |   83 -
 .../antsupport/inputhandler/FailInputHandler.java  |   29 -
 .../antsupport/inputhandler/RemoteAntMessages.java |   33 +
 .../inputhandler/RemoteAntMessages.properties      |   17 +
 .../antsupport/inputhandler/SWTInputHandler.java   |    5 +-
 .../internal/ui/antsupport/logger/MessageIds.java  |   21 -
 .../ui/antsupport/logger/RemoteAntBuildLogger.java |  396 -
 .../logger/debug/RemoteAntBreakpoint.java          |   73 -
 .../logger/debug/RemoteAntDebugBuildLogger.java    |  354 -
 eclipse/plugins/org.eclipse.ant.ui/about.html      |    7 +-
 .../plugins/org.eclipse.ant.ui/build.properties    |   16 +-
 .../buildfiles/buildExtraJAR.xml                   |   16 +-
 .../buildfiles/buildRemoteExtraJAR.xml             |   16 +-
 .../icons/full/obj16/new_ant_project.gif           |  Bin 0 -> 244 bytes
 .../plugins/org.eclipse.ant.ui/plugin.properties   |    8 -
 eclipse/plugins/org.eclipse.ant.ui/plugin.xml      |   83 +-
 .../org.eclipse.compare.core/META-INF/MANIFEST.MF  |    2 +-
 .../compare/internal/core/ComparePlugin.java       |   21 +-
 .../src/org/eclipse/compare/internal/core/LCS.java |   22 +-
 .../eclipse/compare/internal/core/Messages.java    |    6 +-
 .../eclipse/compare/internal/core/TextLineLCS.java |   24 +-
 .../compare/internal/core/patch/DiffProject.java   |   12 +-
 .../internal/core/patch/FileDiffResult.java        |  100 +-
 .../compare/internal/core/patch/FilePatch2.java    |   70 +-
 .../eclipse/compare/internal/core/patch/Hunk.java  |   94 +-
 .../compare/internal/core/patch/HunkResult.java    |   90 +-
 .../compare/internal/core/patch/LineReader.java    |   40 +-
 .../compare/internal/core/patch/PatchReader.java   |   34 +-
 .../org/eclipse/compare/patch/PatchBuilder.java    |    4 +-
 .../eclipse/compare/patch/PatchConfiguration.java  |   24 +-
 .../src/org/eclipse/compare/patch/package.html     |   15 +
 .../rangedifferencer/DifferencesIterator.java      |   28 +-
 .../rangedifferencer/RangeComparatorLCS.java       |   44 +-
 .../compare/rangedifferencer/RangeDifference.java  |   25 +-
 .../compare/rangedifferencer/RangeDifferencer.java |   32 +-
 .../org.eclipse.compare.win32/META-INF/MANIFEST.MF |    2 +-
 .../compare/internal/win32/WordComparison.java     |   52 +-
 .../compare/internal/win32/WordMergeViewer.java    |   23 +-
 .../org.eclipse.compare/.settings/.api_filters     |   22 -
 .../org.eclipse.compare/META-INF/MANIFEST.MF       |    2 +-
 .../org/eclipse/compare/CompareEditorInput.java    |   51 +-
 .../compare/CompareViewerSwitchingPane.java        |   17 +-
 .../eclipse/compare/EditionSelectionDialog.java    |   56 +-
 .../contentmergeviewer/ContentMergeViewer.java     |    6 +-
 .../contentmergeviewer/TextMergeViewer.java        |  111 +-
 .../TextMergeViewerResources.properties            |    6 +-
 .../eclipse/compare/internal/AdapterFactory.java   |   43 +
 .../CompareContentViewerSwitchingPane.java         |   39 +-
 .../eclipse/compare/internal/CompareDialog.java    |   23 +-
 .../eclipse/compare/internal/CompareEditor.java    |   20 +-
 .../internal/CompareEditorSelectionProvider.java   |   54 +-
 .../eclipse/compare/internal/CompareMessages.java  |   15 +-
 .../compare/internal/CompareMessages.properties    |   15 +-
 .../internal/ComparePreferenceInitializer.java     |    4 +-
 .../compare/internal/ComparePreferencePage.java    |   25 +-
 .../CompareStructureViewerSwitchingPane.java       |    4 +-
 .../eclipse/compare/internal/CompareUIPlugin.java  |    5 +
 .../compare/internal/ContentChangeNotifier.java    |    8 +-
 .../org/eclipse/compare/internal/Utilities.java    |  108 +-
 .../compare/internal/merge/DocumentMerger.java     |   73 +-
 .../internal/patch/DiffViewerComparator.java       |   56 +
 .../compare/internal/patch/HunkDiffNode.java       |   12 +-
 .../compare/internal/patch/InputPatchPage.java     |  186 +-
 .../internal/patch/PatchCompareEditorInput.java    |   53 +-
 .../compare/internal/patch/PatchDiffNode.java      |   12 +-
 .../compare/internal/patch/PatchFileDiffNode.java  |   26 +-
 .../internal/patch/PatchFileTypedElement.java      |    5 +-
 .../compare/internal/patch/PatchMessages.java      |    8 +-
 .../internal/patch/PatchMessages.properties        |    8 +-
 .../internal/patch/PatchProjectDiffNode.java       |   12 +-
 .../compare/internal/patch/PatchTargetPage.java    |   23 +-
 .../compare/internal/patch/PatchWizard.java        |   41 +-
 .../eclipse/compare/internal/patch/Patcher.java    |    6 +-
 .../compare/internal/patch/PreviewPatchPage2.java  |    2 +
 .../internal/patch/WorkspaceFileDiffResult.java    |   16 +-
 .../eclipse/compare/patch/ApplyPatchOperation.java |    4 +-
 .../compare/org/eclipse/compare/patch/package.html |   18 -
 .../compare/structuremergeviewer/DiffNode.java     |   15 +-
 .../structuremergeviewer/DiffTreeViewer.java       |   41 +-
 .../icons/full/obj16}/message_info.gif             |  Bin 267 -> 267 bytes
 .../plugins/org.eclipse.compare/plugin.properties  |    3 +-
 eclipse/plugins/org.eclipse.compare/plugin.xml     |   10 +
 .../schema/structureCreators.exsd                  |   44 +-
 .../org.eclipse.core.boot/META-INF/MANIFEST.MF     |    2 +-
 .../org.eclipse.core.commands/META-INF/MANIFEST.MF |    2 +-
 .../commands/operations/TriggeredOperations.java   |   40 +-
 .../.settings/.api_filters                         |   17 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../eclipse/core/internal/content/ContentType.java |    4 +-
 .../core/internal/content/ContentTypeCatalog.java  |   54 +-
 .../core/internal/content/XMLContentDescriber.java |   45 +
 .../core/runtime/content/XMLContentDescriber.java  |  129 +-
 .../content/XMLRootElementContentDescriber.java    |   58 +-
 .../content/XMLRootElementContentDescriber2.java   |  110 +-
 .../.settings/org.moreunit.prefs                   |    5 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../beans/AnonymousBeanValueProperty.java          |    5 +-
 .../beans/AnonymousPojoValueProperty.java          |    5 +-
 .../databinding/beans/BeanListProperty.java        |   15 +-
 .../beans/BeanListPropertyDecorator.java           |   16 +-
 .../databinding/beans/BeanMapProperty.java         |   12 +-
 .../beans/BeanMapPropertyDecorator.java            |   16 +-
 .../databinding/beans/BeanSetProperty.java         |    6 +-
 .../beans/BeanSetPropertyDecorator.java            |   16 +-
 .../beans/BeanValuePropertyDecorator.java          |   10 +-
 .../databinding/beans/PojoListProperty.java        |   13 +-
 .../beans/PojoListPropertyDecorator.java           |   16 +-
 .../databinding/beans/PojoMapProperty.java         |    6 +-
 .../beans/PojoMapPropertyDecorator.java            |   16 +-
 .../databinding/beans/PojoSetProperty.java         |    6 +-
 .../beans/PojoSetPropertyDecorator.java            |   16 +-
 .../beans/PojoValuePropertyDecorator.java          |   10 +-
 .../.settings/org.moreunit.prefs                   |    5 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../eclipse/core/databinding/observable/Diffs.java |  184 +-
 .../databinding/observable/IDisposeListener.java   |    6 +-
 .../databinding/observable/ObservableTracker.java  |   91 +-
 .../core/databinding/observable/list/ListDiff.java |   98 +-
 .../observable/map/ComputedObservableMap.java      |   23 +-
 .../core/databinding/observable/map/MapDiff.java   |  221 +-
 .../core/databinding/observable/set/SetDiff.java   |  120 +-
 .../internal/databinding/identity/IdentityMap.java |   28 +-
 .../internal/databinding/identity/IdentitySet.java |   14 +-
 .../databinding/identity/IdentityWrapper.java      |   19 +-
 .../masterdetail/DetailObservableList.java         |  180 +-
 .../masterdetail/DetailObservableMap.java          |   90 +-
 .../masterdetail/DetailObservableSet.java          |  117 +-
 .../masterdetail/DetailObservableValue.java        |   66 +-
 .../.settings/org.moreunit.prefs                   |    5 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../property/list/DelegatingListProperty.java      |   20 +-
 .../databinding/property/list/IListProperty.java   |   52 +-
 .../databinding/property/list/ListProperty.java    |   86 +-
 .../property/list/MultiListProperty.java           |   68 +-
 .../property/list/SimpleListProperty.java          |   44 +-
 .../property/map/DelegatingMapProperty.java        |   20 +-
 .../databinding/property/map/IMapProperty.java     |   52 +-
 .../core/databinding/property/map/MapProperty.java |   88 +-
 .../property/map/SimpleMapProperty.java            |   40 +-
 .../property/set/DelegatingSetProperty.java        |   20 +-
 .../databinding/property/set/ISetProperty.java     |   53 +-
 .../core/databinding/property/set/SetProperty.java |   87 +-
 .../property/set/SimpleSetProperty.java            |   41 +-
 .../databinding/property/set/UnionSetProperty.java |   23 +-
 .../property/value/DelegatingValueProperty.java    |   10 +-
 .../databinding/property/value/IValueProperty.java |   32 +-
 .../property/value/SimpleValueProperty.java        |   36 +-
 .../databinding/property/value/ValueProperty.java  |   58 +-
 .../property/ListPropertyDetailValuesList.java     |   75 +-
 .../property/MapPropertyDetailValuesMap.java       |   71 +-
 .../property/SetPropertyDetailValuesMap.java       |   70 +-
 .../property/ValuePropertyDetailList.java          |   60 +-
 .../property/ValuePropertyDetailMap.java           |   58 +-
 .../property/ValuePropertyDetailSet.java           |   58 +-
 .../property/ValuePropertyDetailValue.java         |  108 +-
 .../property/list/SelfListProperty.java            |    6 +-
 .../list/SimplePropertyObservableList.java         |  271 +-
 .../databinding/property/map/SelfMapProperty.java  |    6 +-
 .../property/map/SimplePropertyObservableMap.java  |   88 +-
 .../property/set/SimplePropertyObservableSet.java  |  147 +-
 .../property/value/DelegatingCache.java            |   46 +-
 .../value/ListSimpleValueObservableList.java       |   40 +-
 .../value/MapSimpleValueObservableMap.java         |   49 +-
 .../value/SetSimpleValueObservableMap.java         |    5 +-
 .../.settings/org.moreunit.prefs                   |    5 +
 .../META-INF/MANIFEST.MF                           |    6 +-
 .../core/databinding/DataBindingContext.java       |   31 +-
 .../org/eclipse/core/databinding/ListBinding.java  |   19 +-
 .../org/eclipse/core/databinding/SetBinding.java   |   13 +-
 .../org/eclipse/core/databinding/ValueBinding.java |   13 +-
 .../databinding/validation/MultiValidator.java     |  106 +-
 .../DataBindingContextBindingsProperty.java        |   22 +-
 ...ngContextValidationStatusProvidersProperty.java |   17 +-
 .../core/internal/databinding/IdentityMap.java     |   28 +-
 .../core/internal/databinding/IdentitySet.java     |   14 +-
 .../core/internal/databinding/IdentityWrapper.java |   20 +-
 .../ValidationStatusProviderModelsProperty.java    |   17 +-
 .../ValidationStatusProviderTargetsProperty.java   |   17 +-
 .../conversion/StringToNumberParser.java           |   85 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.core.expressions/build.properties  |    1 +
 .../internal/expressions/ExpressionMessages.java   |    2 +-
 .../expressions/ExpressionMessages.properties      |    2 +-
 .../org.eclipse.core.externaltools}/.classpath     |    0
 .../org.eclipse.core.externaltools/.project        |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |   74 +
 .../.settings/org.eclipse.pde.prefs                |   25 +
 .../META-INF/MANIFEST.MF                           |   17 +
 .../org.eclipse.core.externaltools/about.html      |   28 +
 .../build.properties                               |   18 +
 .../plugin.properties                              |   16 +
 .../org.eclipse.core.externaltools/plugin.xml      |   43 +
 .../externaltools/internal/ExternalToolsCore.java  |  118 +
 .../internal/IExternalToolConstants.java           |  213 +
 .../BackgroundResourceRefresher.java               |   89 +
 .../ExternalToolsCoreUtil.java                     |  282 +
 .../ExternalToolsProgramMessages.java              |   30 +
 .../ExternalToolsProgramMessages.properties        |   19 +
 .../ProgramLaunchDelegate.java                     |  217 +
 .../internal/model/BuilderCoreUtils.java           |  340 +
 .../internal/model/ExternalToolBuilder.java        |  290 +
 .../internal/model/ExternalToolsModelMessages.java |   24 +
 .../model/ExternalToolsModelMessages.properties    |   13 +
 .../internal/registry/ExternalToolMigration.java   |  410 +
 .../registry/ExternalToolsMigrationMessages.java   |   25 +
 .../ExternalToolsMigrationMessages.properties      |   13 +
 .../.settings/.api_filters                         |   10 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../core/filebuffers/ISynchronizationContext.java  |   20 +-
 .../internal/filebuffers/FileBuffersMessages.java  |    3 +-
 .../filebuffers/FileBuffersMessages.properties     |    3 +-
 .../filebuffers/FileStoreTextFileBuffer.java       |   16 +-
 .../filebuffers/ResourceTextFileBuffer.java        |   12 +-
 .../filebuffers/TextFileBufferManager.java         |    5 +-
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   11 -
 .../META-INF/MANIFEST.MF                           |    9 -
 .../build.properties                               |   17 -
 .../fragment.properties                            |   12 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../BUILD_INFO.txt                                 |   12 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../BUILD_INFO.txt                                 |    8 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../org.eclipse.core.filesystem.qnx.x86/.project   |   11 -
 .../META-INF/MANIFEST.MF                           |    9 -
 .../build.properties                               |   17 -
 .../fragment.properties                            |   12 -
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../BUILD_INFO.txt                                 |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../build.properties                               |    2 +-
 .../fragment.properties                            |    2 +-
 .../natives/macosx/Makefile                        |   18 -
 .../natives/macosx/localfile.c                     |  350 -
 .../natives/unix/README.TXT                        |    4 +-
 .../natives/unix/aix/Makefile                      |   15 +-
 .../natives/unix/aix/include/os_custom.h           |   22 -
 .../natives/unix/hpux/PA_RISC.mak                  |    2 +-
 .../natives/unix/hpux/ia64_32.mak                  |    2 +-
 .../natives/unix/linux/Makefile                    |   35 +-
 .../natives/unix/linux/include/os_custom.h         |   23 -
 .../natives/unix/localfile.c                       |  329 -
 .../natives/unix/macosx/Makefile                   |   30 +
 .../natives/unix/solaris/Makefile                  |   18 +-
 .../natives/unix/solaris/include/os_custom.h       |   23 -
 .../natives/unix/unixfile.c                        |  292 +
 .../natives/unix/unixfile.h                        |  114 +
 .../natives/win32/localfile.c                      |    6 +-
 .../src/org/eclipse/core/filesystem/EFS.java       |  122 +-
 .../org/eclipse/core/filesystem/IFileStore.java    |   11 +
 .../src/org/eclipse/core/filesystem/URIUtil.java   |    5 +-
 .../eclipse/core/filesystem/provider/FileInfo.java |   41 +-
 .../core/filesystem/provider/FileSystem.java       |    4 +-
 .../eclipse/core/filesystem/provider/FileTree.java |    4 +-
 .../core/internal/filesystem/Activator.java        |    9 +-
 .../eclipse/core/internal/filesystem/Messages.java |    2 +-
 .../core/internal/filesystem/local/Convert.java    |   22 +-
 .../core/internal/filesystem/local/LocalFile.java  |   12 +-
 .../filesystem/local/LocalFileNatives.java         |   31 +-
 .../filesystem/local/LocalFileNativesManager.java  |   45 +
 .../internal/filesystem/local/LocalFileSystem.java |    6 +-
 .../internal/filesystem/local/unix/StructStat.java |   57 +
 .../filesystem/local/unix/UnixFileFlags.java       |   96 +
 .../filesystem/local/unix/UnixFileNatives.java     |  195 +
 .../core/internal/filesystem/messages.properties   |    2 +-
 eclipse/plugins/org.eclipse.core.jobs/.classpath   |    4 +-
 eclipse/plugins/org.eclipse.core.jobs/.options     |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   13 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |   54 +-
 .../org.eclipse.core.jobs/META-INF/MANIFEST.MF     |    2 +-
 .../org/eclipse/core/internal/jobs/Counter.java    |   27 +
 .../eclipse/core/internal/jobs/ImplicitJobs.java   |   81 +-
 .../eclipse/core/internal/jobs/InternalJob.java    |   66 +-
 .../eclipse/core/internal/jobs/InternalWorker.java |   75 +
 .../org/eclipse/core/internal/jobs/JobManager.java |  539 +-
 .../org/eclipse/core/internal/jobs/JobQueue.java   |   47 +-
 .../eclipse/core/internal/jobs/LockManager.java    |   20 +-
 .../eclipse/core/internal/jobs/OrderedLock.java    |   63 +-
 .../org/eclipse/core/internal/jobs/Semaphore.java  |   15 +-
 .../org/eclipse/core/internal/jobs/ThreadJob.java  |  255 +-
 .../src/org/eclipse/core/internal/jobs/Worker.java |    5 +-
 .../org/eclipse/core/runtime/jobs/IJobManager.java |   25 +-
 .../src/org/eclipse/core/runtime/jobs/Job.java     |   42 +-
 .../eclipse/core/runtime/jobs/LockListener.java    |   18 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.core.net.linux.x86_64/.classpath   |    7 +
 .../org.eclipse.core.net.linux.x86_64/.project     |   17 +
 .../BUILD_INFO.txt                                 |   10 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../org.eclipse.core.net.linux.x86_64}/about.html  |    0
 .../build.properties                               |   19 +
 .../fragment.properties                            |   12 +
 .../src/org/eclipse/core/net/ProxyProvider.java    |   16 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.core.net/META-INF/MANIFEST.MF      |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.core.net.linux.x86_64/.classpath   |    7 +
 .../org.eclipse.core.net.linux.x86_64/.project     |   17 +
 .../BUILD_INFO.txt                                 |   10 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../org.eclipse.core.net.linux.x86_64}/about.html  |    0
 .../build.properties                               |   19 +
 .../fragment.properties                            |   12 +
 .../src/org/eclipse/core/net/ProxyProvider.java    |   16 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../natives/unix/linux/makefile                    |    8 +-
 .../natives/unix/linux/x86_64/makefile             |   48 +
 .../eclipse/core/internal/net/ProxyManager.java    |    3 +-
 .../internal/net/proxy/unix/UnixProxyProvider.java |    8 +-
 .../.project                                       |   34 -
 .../.settings/org.eclipse.core.resources.prefs     |    3 -
 .../.settings/org.eclipse.jdt.core.prefs           |  350 -
 .../.settings/org.eclipse.jdt.ui.prefs             |    9 -
 .../META-INF/MANIFEST.MF                           |   14 -
 .../build.properties                               |   16 -
 .../internal/indexing/AbstractObjectPolicy.java    |   21 -
 .../core/internal/indexing/AbstractPagePolicy.java |   24 -
 .../core/internal/indexing/BinarySmallObject.java  |  109 -
 .../org/eclipse/core/internal/indexing/Buffer.java |  173 -
 .../eclipse/core/internal/indexing/Convert.java    |   42 -
 .../org/eclipse/core/internal/indexing/Field.java  |  148 -
 .../eclipse/core/internal/indexing/FieldArray.java |   73 -
 .../eclipse/core/internal/indexing/FieldDef.java   |   31 -
 .../org/eclipse/core/internal/indexing/Index.java  |   80 -
 .../core/internal/indexing/IndexAnchor.java        |  183 -
 .../core/internal/indexing/IndexCursor.java        |  389 -
 .../eclipse/core/internal/indexing/IndexNode.java  |  922 --
 .../core/internal/indexing/IndexedStore.java       |  389 -
 .../internal/indexing/IndexedStoreContext.java     |  173 -
 .../internal/indexing/IndexedStoreException.java   |  143 -
 .../core/internal/indexing/IndexedStoreObject.java |   87 -
 .../indexing/IndexedStoreObjectPolicy.java         |   51 -
 .../eclipse/core/internal/indexing/Insertable.java |   19 -
 .../org/eclipse/core/internal/indexing/Log.java    |   37 -
 .../eclipse/core/internal/indexing/LogReader.java  |  113 -
 .../eclipse/core/internal/indexing/LogWriter.java  |   89 -
 .../core/internal/indexing/ObjectAddress.java      |  103 -
 .../core/internal/indexing/ObjectHeader.java       |   51 -
 .../eclipse/core/internal/indexing/ObjectID.java   |   49 -
 .../eclipse/core/internal/indexing/ObjectPage.java |  264 -
 .../core/internal/indexing/ObjectStore.java        |  435 -
 .../internal/indexing/ObjectStoreException.java    |   82 -
 .../core/internal/indexing/ObjectStorePage.java    |   24 -
 .../internal/indexing/ObjectStorePagePolicy.java   |   24 -
 .../org/eclipse/core/internal/indexing/Page.java   |   76 -
 .../eclipse/core/internal/indexing/PageStore.java  |  461 -
 .../core/internal/indexing/PageStoreException.java |   74 -
 .../eclipse/core/internal/indexing/Pointer.java    |   47 -
 .../eclipse/core/internal/indexing/Referable.java  |   30 -
 .../core/internal/indexing/Reservation.java        |   60 -
 .../core/internal/indexing/ReservationTable.java   |   59 -
 .../core/internal/indexing/SpaceMapPage.java       |   83 -
 .../core/internal/indexing/StoreException.java     |   59 -
 .../core/internal/indexing/StoredObject.java       |  150 -
 .../core/internal/localstore/HistoryStore.java     |  609 --
 .../internal/localstore/HistoryStoreConverter.java |   81 -
 .../internal/localstore/HistoryStoreEntry.java     |  192 -
 .../internal/localstore/IHistoryStoreVisitor.java  |   22 -
 .../eclipse/core/internal/properties/IVisitor.java |   50 -
 .../internal/properties/IndexedStoreWrapper.java   |  211 -
 .../core/internal/properties/PropertyManager.java  |  293 -
 .../core/internal/properties/PropertyStore.java    |  491 -
 .../properties/PropertyStoreConverter.java         |   96 -
 .../core/internal/properties/QueryResults.java     |   64 -
 .../core/internal/properties/ResourceName.java     |   54 -
 .../eclipse/core/internal/properties/StoreKey.java |  160 -
 .../core/internal/properties/StoredProperty.java   |   32 -
 .../internal/resources/CompatibilityMessages.java  |  134 -
 .../internal/resources/ResourcesCompatibility.java |   78 -
 .../core/internal/resources/messages.properties    |  126 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../.settings/.api_filters                         |    8 +
 .../META-INF/MANIFEST.MF                           |    7 +-
 .../org.eclipse.core.resources/natives/ref.c       |   10 +
 .../org.eclipse.core.resources/natives/ref.h       |    2 +-
 .../org.eclipse.core.resources/plugin.properties   |    9 +-
 .../plugins/org.eclipse.core.resources/plugin.xml  |   46 +
 .../schema/filterMatchers.exsd                     |  187 +
 .../org.eclipse.core.resources/schema/natures.exsd |   58 +-
 .../schema/variableResolvers.exsd                  |  139 +
 .../core/internal/dtree/DataTreeReader.java        |   26 +-
 .../eclipse/core/internal/events/AutoBuildJob.java |    8 +-
 .../eclipse/core/internal/events/BuildManager.java |   27 +-
 .../core/internal/events/LifecycleEvent.java       |   11 +
 .../core/internal/events/ResourceComparator.java   |    8 +-
 .../core/internal/events/ResourceDelta.java        |    8 +-
 .../core/internal/localstore/CopyVisitor.java      |   35 +-
 .../core/internal/localstore/DeleteVisitor.java    |    4 +-
 .../core/internal/localstore/FileStoreRoot.java    |   43 +-
 .../localstore/FileSystemResourceManager.java      |   66 +-
 .../core/internal/localstore/HistoryStore2.java    |   26 +-
 .../localstore/RefreshLocalAliasVisitor.java       |   32 +-
 .../internal/localstore/RefreshLocalVisitor.java   |   11 +-
 .../core/internal/localstore/UnifiedTree.java      |   24 +-
 .../core/internal/properties/PropertyManager2.java |    9 +-
 .../propertytester/FilePropertyTester.java         |  100 +-
 .../eclipse/core/internal/refresh/RefreshJob.java  |    4 +-
 .../core/internal/resources/AliasManager.java      |   24 +-
 .../core/internal/resources/CharsetManager.java    |  344 +-
 .../internal/resources/ComputeProjectOrder.java    |    4 +-
 .../eclipse/core/internal/resources/Container.java |  127 +-
 .../resources/ContentDescriptionManager.java       |    6 +-
 .../org/eclipse/core/internal/resources/File.java  |   17 +-
 .../eclipse/core/internal/resources/Filter.java    |  156 +
 .../core/internal/resources/FilterDescription.java |  140 +
 .../core/internal/resources/FilterDescriptor.java  |   90 +
 .../core/internal/resources/FilterTypeManager.java |  106 +
 .../eclipse/core/internal/resources/Folder.java    |   18 +-
 .../core/internal/resources/ICoreConstants.java    |    8 +-
 .../internal/resources/IModelObjectConstants.java  |   15 +-
 .../core/internal/resources/LinkDescription.java   |   23 +-
 .../core/internal/resources/LocalMetaArea.java     |   20 +-
 .../core/internal/resources/LocationValidator.java |   35 +-
 .../eclipse/core/internal/resources/Marker.java    |   13 +-
 .../core/internal/resources/MarkerInfo.java        |   15 +-
 .../core/internal/resources/MarkerManager.java     |   10 +-
 .../core/internal/resources/ModelObjectWriter.java |   84 +-
 .../core/internal/resources/NatureManager.java     |   51 +-
 .../org/eclipse/core/internal/resources/OS.java    |   21 +-
 .../internal/resources/PathVariableManager.java    |  107 +-
 .../core/internal/resources/PathVariableUtil.java  |  508 ++
 .../internal/resources/PreferenceInitializer.java  |    4 +-
 .../eclipse/core/internal/resources/Project.java   |  209 +-
 .../internal/resources/ProjectDescription.java     |  251 +-
 .../resources/ProjectDescriptionReader.java        |  377 +-
 .../core/internal/resources/ProjectInfo.java       |   10 +-
 .../resources/ProjectPathVariableManager.java      |  487 +
 .../internal/resources/ProjectPreferences.java     |   71 +-
 .../resources/ProjectVariableProviderManager.java  |  115 +
 .../internal/resources/RegexFileInfoMatcher.java   |   49 +
 .../eclipse/core/internal/resources/Resource.java  |  371 +-
 .../core/internal/resources/ResourceTree.java      |   11 +-
 .../org/eclipse/core/internal/resources/Rules.java |   10 +-
 .../core/internal/resources/SaveContext.java       |   17 +-
 .../core/internal/resources/SaveManager.java       |  210 +-
 .../internal/resources/VariableDescription.java    |   71 +
 .../core/internal/resources/VirtualFileStore.java  |   71 +
 .../core/internal/resources/VirtualFileSystem.java |   30 +
 .../eclipse/core/internal/resources/Workspace.java |  213 +-
 .../internal/resources/WorkspaceDescription.java   |   29 +-
 .../resources/WorkspaceDescriptionReader.java      |    6 +-
 .../internal/resources/WorkspacePreferences.java   |   13 +-
 .../core/internal/resources/WorkspaceRoot.java     |   15 +-
 .../internal/resources/WorkspaceTreeReader.java    |   35 +-
 .../internal/resources/WorkspaceTreeReader_1.java  |   10 +-
 .../EclipseHomeProjectVariable.java                |   45 +
 .../projectvariables/ParentVariableResolver.java   |   63 +
 .../ProjectLocationVariableResolver.java           |   37 +
 .../WorkspaceLocationVariableResolver.java         |   34 +
 .../WorkspaceParentLocationVariableResolver.java   |   43 +
 .../org/eclipse/core/internal/utils/Messages.java  |   28 +-
 .../core/internal/utils/messages.properties        |   29 +-
 .../core/internal/watson/ElementTreeReader.java    |   34 +-
 .../internal/watson/ElementTreeReaderImpl_1.java   |   25 +-
 .../core/resources/FileInfoMatcherDescription.java |   71 +
 .../src/org/eclipse/core/resources/IContainer.java |   61 +-
 .../src/org/eclipse/core/resources/IFile.java      |   16 +-
 .../core/resources/IFilterMatcherDescriptor.java   |   84 +
 .../src/org/eclipse/core/resources/IFolder.java    |   22 +-
 .../src/org/eclipse/core/resources/IMarker.java    |    9 +-
 .../core/resources/IPathVariableManager.java       |  148 +-
 .../src/org/eclipse/core/resources/IProject.java   |   81 +-
 .../src/org/eclipse/core/resources/IResource.java  |  101 +-
 .../core/resources/IResourceChangeEvent.java       |   30 +-
 .../org/eclipse/core/resources/IResourceDelta.java |   19 +
 .../core/resources/IResourceFilterDescription.java |  119 +
 .../core/resources/IResourceRuleFactory.java       |   14 +-
 .../src/org/eclipse/core/resources/IWorkspace.java |   97 +-
 .../core/resources/IWorkspaceDescription.java      |   64 +-
 .../core/resources/IncrementalProjectBuilder.java  |   75 +-
 .../eclipse/core/resources/ResourceAttributes.java |    4 +-
 .../eclipse/core/resources/ResourcesPlugin.java    |   27 +
 .../org/eclipse/core/resources/WorkspaceLock.java  |    5 +-
 .../filtermatchers/AbstractFileInfoMatcher.java    |   49 +
 .../filtermatchers/CompoundFileInfoMatcher.java    |   49 +
 .../core/resources/filtermatchers/package.html     |   21 +
 .../core/resources/mapping/ModelProvider.java      |    5 +-
 .../core/resources/team/ResourceRuleFactory.java   |   16 +-
 .../variableresolvers/PathVariableResolver.java    |   52 +
 .../core/resources/variableresolvers/package.html  |   21 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../runtime/auth/AuthorizationDatabase.java        |    4 +-
 .../.settings/.api_filters                         |   17 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../src/org/eclipse/core/runtime/IExtension.java   |   21 +
 .../org/eclipse/core/runtime/IExtensionPoint.java  |   22 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.core.runtime/META-INF/MANIFEST.MF  |    4 +-
 .../core/internal/runtime/PlatformActivator.java   |   12 +-
 .../org/eclipse/core/runtime/PerformanceStats.java |    3 +-
 .../src/org/eclipse/core/runtime/Platform.java     |    7 +-
 .../src/org/eclipse/core/runtime/Plugin.java       |    9 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugins/org.eclipse.core.variables/plugin.xml  |    5 +-
 .../variables/EclipseHomeVariableResolver.java     |   16 +-
 .../internal/variables/StringVariableManager.java  |   51 +-
 .../plugins/org.eclipse.cvs/META-INF/MANIFEST.MF   |    2 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.debug.core/META-INF/MANIFEST.MF    |    2 +-
 .../org.eclipse.debug.core/build.properties        |    3 +-
 .../buildnotes_platform-debug.html                 |  380 +-
 .../core/org/eclipse/debug/core/DebugPlugin.java   |   22 +-
 .../eclipse/debug/core/ILaunchConfiguration.java   | 1198 ++--
 .../debug/core/ILaunchConfigurationType.java       |    8 +-
 .../core/ILaunchConfigurationWorkingCopy.java      |   14 +-
 .../org/eclipse/debug/core/ILaunchManager.java     |   48 +-
 .../core/org/eclipse/debug/core/RefreshUtil.java   |  293 +
 .../debug/core/commands/AbstractDebugCommand.java  |  407 +
 .../debug/core/commands/IDebugCommandHandler.java  |    4 +-
 .../debug/core/commands/IRestartHandler.java       |   27 +
 .../core/model/ILaunchConfigurationDelegate.java   |   14 +-
 .../core/model/ILaunchConfigurationDelegate2.java  |   14 +-
 .../eclipse/debug/core/model/RuntimeProcess.java   |   38 +-
 .../sourcelookup/AbstractSourceLookupDirector.java |   29 +-
 .../AbstractSourceLookupParticipant.java           |    4 +-
 .../AbstractSourceContainerTypeDelegate.java       |   14 +-
 .../containers/CompositeSourceContainer.java       |    6 +-
 .../containers/ContainerSourceContainer.java       |    4 +-
 .../debug/internal/core/BreakpointManager.java     |   13 +-
 .../debug/internal/core/DebugCoreMessages.java     |   37 +-
 .../internal/core/DebugCoreMessages.properties     |   26 +-
 .../internal/core/DebugPreferenceInitializer.java  |   13 +-
 .../debug/internal/core/ExpressionManager.java     |   10 +-
 .../debug/internal/core/IExpressionsListener2.java |   14 +-
 .../internal/core/IInternalDebugCoreConstants.java |    9 +-
 .../debug/internal/core/IMementoConstants.java     |   32 +
 .../debug/internal/core/InputStreamMonitor.java    |   34 +-
 .../debug/internal/core/LaunchConfiguration.java   |   14 +-
 .../internal/core/LaunchConfigurationInfo.java     |   17 +-
 .../internal/core/LaunchConfigurationType.java     |   29 +-
 .../core/LaunchConfigurationWorkingCopy.java       |   49 +-
 .../eclipse/debug/internal/core/LaunchManager.java |  185 +-
 .../internal/core/LogicalStructureManager.java     |   10 +-
 .../eclipse/debug/internal/core/Preferences.java   |  415 +
 .../core/PreferredDelegateModifyListener.java      |   55 +
 .../internal/core/RefreshScopeComparator.java      |   48 +
 .../debug/internal/core/ResourceFactory.java       |   73 +
 .../debug/internal/core/StepFilterManager.java     |    7 +-
 .../eclipse/debug/internal/core/StreamsProxy.java  |   42 +-
 .../debug/internal/core/WatchExpression.java       |   11 +-
 .../eclipse/debug/internal/core/XMLMemento.java    |  599 ++
 .../debug/internal/core/commands/DebugCommand.java |  324 -
 .../internal/core/commands/DisconnectCommand.java  |    5 +-
 .../internal/core/commands/DropToFrameCommand.java |    5 +-
 .../internal/core/commands/ForEachCommand.java     |    5 +-
 .../debug/internal/core/commands/Request.java      |   13 +-
 .../internal/core/commands/ResumeCommand.java      |    5 +-
 .../debug/internal/core/commands/StepCommand.java  |    5 +-
 .../internal/core/commands/StepFiltersCommand.java |    5 +-
 .../internal/core/commands/StepIntoCommand.java    |    5 +-
 .../internal/core/commands/StepOverCommand.java    |    5 +-
 .../internal/core/commands/StepReturnCommand.java  |    6 +-
 .../internal/core/commands/SuspendCommand.java     |    5 +-
 .../internal/core/commands/TerminateCommand.java   |    5 +-
 eclipse/plugins/org.eclipse.debug.core/plugin.xml  |   13 +-
 ...ug.html => r3_5_buildnotes_platform-debug.html} |    0
 eclipse/plugins/org.eclipse.debug.ui/.options      |    1 +
 .../.settings/org.eclipse.jdt.core.prefs           |  200 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.debug.ui/META-INF/MANIFEST.MF      |   22 +-
 .../plugins/org.eclipse.debug.ui/build.properties  |    3 +-
 .../icons/full/dlcl16/det_pane_auto.gif}           |  Bin 338 -> 338 bytes
 .../icons/full/dlcl16/restart_co.gif               |  Bin 0 -> 344 bytes
 .../icons/full/elcl16/det_pane_auto.gif}           |  Bin 358 -> 358 bytes
 .../icons/full/elcl16/restart_co.gif               |  Bin 0 -> 353 bytes
 .../plugins/org.eclipse.debug.ui/plugin.properties |   19 +-
 eclipse/plugins/org.eclipse.debug.ui/plugin.xml    |  130 +-
 .../schema/detailPaneFactories.exsd                |   11 +-
 .../schema/toggleBreakpointsTargetFactories.exsd   |    4 +-
 .../ui/AbstractDebugCheckboxSelectionDialog.java   |    7 +-
 .../ui/AbstractDebugListSelectionDialog.java       |    9 +-
 .../internal/ui/AbstractDebugSelectionDialog.java  |   25 +-
 .../debug/internal/ui/DebugPluginImages.java       |    6 +-
 .../debug/internal/ui/DebugUIAdapterFactory.java   |    8 +-
 .../eclipse/debug/internal/ui/DebugUIMessages.java |    7 +-
 .../debug/internal/ui/DebugUIMessages.properties   |    7 +-
 .../eclipse/debug/internal/ui/DebugUIPlugin.java   |   63 +-
 .../internal/ui/DebugUIPreferenceInitializer.java  |    6 +-
 .../debug/internal/ui/DefaultLabelProvider.java    |   41 +-
 .../internal/ui/IInternalDebugUIConstants.java     |    6 +-
 .../debug/internal/ui/ImageDescriptorRegistry.java |   18 +-
 .../debug/internal/ui/LazyModelPresentation.java   |    9 +-
 .../org/eclipse/debug/internal/ui/SWTFactory.java  |  160 +-
 .../ui/actions/AbstractDebugActionDelegate.java    |   19 +-
 .../debug/internal/ui/actions/ActionMessages.java  |   19 +-
 .../internal/ui/actions/ActionMessages.properties  |   15 +-
 .../ui/actions/RelaunchActionDelegate.java         |   55 +-
 .../ui/actions/ToggleBreakpointsTargetManager.java |    9 +-
 .../breakpointGroups/BreakpointGroupMessages.java  |    6 +-
 .../BreakpointGroupMessages.properties             |    6 +-
 .../breakpointGroups/CopyBreakpointsAction.java    |  136 -
 .../CopyBreakpointsActionDelegate.java             |  120 +
 .../EditBreakpointGroupAction.java                 |   34 +-
 .../breakpointGroups/GroupBreakpointsAction.java   |    4 +-
 .../breakpointGroups/GroupBreakpointsByAction.java |   12 +-
 .../breakpointGroups/GroupBreakpointsByDialog.java |    4 +-
 .../breakpointGroups/PasteBreakpointsAction.java   |   18 +-
 .../RemoveFromWorkingSetAction.java                |   98 +-
 .../breakpointGroups/ToggleDefaultGroupAction.java |    6 +-
 .../breakpoints/BreakpointsCollapseAllAction.java  |   12 +-
 .../breakpoints/BreakpointsExpandAllAction.java    |   11 +-
 .../breakpoints/EnableBreakpointsAction.java       |   41 +-
 .../breakpoints/OpenBreakpointMarkerAction.java    |    8 +-
 .../breakpoints/RemoveBreakpointAction.java        |   30 +-
 .../breakpoints/SelectAllBreakpointsAction.java    |   17 +-
 .../ShowSupportedBreakpointsAction.java            |   24 +-
 .../breakpoints/ShowTargetBreakpointsAction.java   |   63 +
 .../breakpoints/SkipAllBreakpointsAction.java      |   38 +-
 .../ToggleBreakpointObjectActionDelegate.java      |   18 +-
 .../actions/expressions/WatchExpressionDialog.java |   31 +-
 .../variables/ChangeVariableValueAction.java       |   15 +-
 .../actions/variables/ToggleDetailPaneAction.java  |   16 +-
 .../provisional/IBreakpointContainer.java          |   52 +
 .../provisional/IBreakpointOrganizer.java          |   63 +
 .../provisional/IBreakpointUIConstants.java        |   63 +
 .../provisional/OtherBreakpointCategory.java       |  103 +
 .../ui/commands/actions/ActionsUpdater.java        |    7 +-
 .../ui/commands/actions/DebugActionHandler.java    |  127 +
 .../ui/commands/actions/DebugCommandAction.java    |  269 -
 .../actions/DebugCommandActionDelegate.java        |   58 +-
 .../ui/commands/actions/DebugCommandService.java   |   14 +-
 .../commands/actions/DisconnectCommandAction.java  |    3 +-
 .../commands/actions/DropToFrameCommandAction.java |    3 +-
 .../ui/commands/actions/ICommandParticipant.java   |    4 +-
 .../ui/commands/actions/IEnabledTarget.java        |   18 +
 .../ui/commands/actions/RestartCommandAction.java  |   64 +
 .../actions/RestartCommandActionDelegate.java      |   55 +
 .../ui/commands/actions/RestartCommandHandler.java |   27 +
 .../ui/commands/actions/ResumeCommandAction.java   |    3 +-
 .../actions/ResumeCommandActionDelegate.java       |   40 +-
 .../ui/commands/actions/StepIntoCommandAction.java |    3 +-
 .../ui/commands/actions/StepOverCommandAction.java |    3 +-
 .../commands/actions/StepReturnCommandAction.java  |    3 +-
 .../ui/commands/actions/SuspendCommandAction.java  |    3 +-
 .../ui/commands/actions/TerminateAllAction.java    |   11 +-
 .../actions/TerminateAndRelaunchAction.java        |   51 +-
 .../actions/TerminateAndRelaunchHandler.java       |   26 +
 .../commands/actions/TerminateAndRemoveAction.java |  118 +-
 .../commands/actions/TerminateCommandAction.java   |    3 +-
 .../commands/actions/ToggleStepFiltersAction.java  |   10 +-
 .../ToggleStepFiltersCommandActionDelegate.java    |   15 +-
 .../ui/commands/actions/UpdateActionsRequest.java  |    5 +-
 .../ui/contextlaunching/ContextRunner.java         |    4 +-
 .../contextlaunching/LaunchingResourceManager.java |   34 +-
 .../contexts/DebugModelContextBindingManager.java  |  116 +-
 .../adapters/AsynchronousDebugLabelAdapter.java    |   51 +-
 .../adapters/DefaultBreakpointsViewInput.java      |   74 +
 .../adapters/DefaultViewerInputProvider.java       |   13 +-
 .../adapters/MemoryBlockContentAdapter.java        |    7 +-
 .../adapters/StackFrameViewerInputProvider.java    |   12 +-
 .../adapters/VariableColumnFactoryAdapter.java     |   18 +-
 .../adapters/WatchExpressionCellModifier.java      |   65 +
 .../breakpoints/EmbeddedBreakpointsViewer.java     |   64 +-
 .../breakpoints/ImportBreakpoints.java             |    6 +-
 .../CreateLaunchConfigurationAction.java           |    4 +-
 .../DuplicateLaunchConfigurationAction.java        |    4 +-
 .../LaunchConfigurationManager.java                |   19 +-
 .../LaunchConfigurationPresentationManager.java    |   28 +-
 .../LaunchConfigurationPropertiesDialog.java       |   42 +-
 .../LaunchConfigurationTabGroupViewer.java         |  368 +-
 .../LaunchConfigurationView.java                   |    6 +-
 .../LaunchConfigurationsDialog.java                |  395 +-
 .../LaunchConfigurationsMessages.java              |    2 +
 .../LaunchConfigurationsMessages.properties        |    5 +-
 .../ui/launchConfigurations/LaunchHistory.java     |   47 +-
 .../launchConfigurations/PerspectiveManager.java   |   16 +-
 .../provisional/AbstractAsyncTableRendering.java   |  105 +-
 .../provisional/MemoryViewPresentationContext.java |    6 +-
 .../elements/BreakpointContainerLabelProvider.java |  156 +
 .../BreakpointContainerMementoProvider.java        |   53 +
 .../model/elements/BreakpointContentProvider.java  |   46 +
 .../ui/model/elements/BreakpointLabelProvider.java |   60 +
 .../elements/BreakpointManagerContentProvider.java | 1102 +++
 .../BreakpointManagerInputMementoProvider.java     |   37 +
 .../model/elements/BreakpointMementoProvider.java  |   94 +
 .../model/elements/DebugTargetContentProvider.java |   11 +-
 .../ui/model/elements/ElementLabelProvider.java    |   86 +-
 .../model/elements/ExpressionContentProvider.java  |   53 +-
 .../ui/model/elements/ExpressionLabelProvider.java |  129 +-
 .../elements/ExpressionManagerContentProvider.java |  144 +-
 .../elements/MemoryRetrievalContentProvider.java   |   10 +-
 .../ui/model/elements/ProcessContentProvider.java  |   47 +
 .../ui/model/elements/VariableLabelProvider.java   |    6 +-
 .../ui/model/elements/ViewerInputProvider.java     |    4 +-
 .../ui/model/elements/WatchExpressionEditor.java   |   40 +
 .../ui/preferences/IDebugPreferenceConstants.java  |    5 +-
 .../LaunchConfigurationsPreferencePage.java        |   13 +-
 .../ui/sourcelookup/AddSourceContainerDialog.java  |  104 +-
 .../ui/sourcelookup/SourceLookupFacility.java      |    2 +-
 .../ui/sourcelookup/SourceLookupUIMessages.java    |    6 +-
 .../sourcelookup/SourceLookupUIMessages.properties |    8 +-
 .../StringSubstitutionMessages.java                |    9 +-
 .../StringSubstitutionMessages.properties          |    9 +-
 .../ui/viewers/AsynchronousTableModel.java         |   12 +-
 .../ui/viewers/PartPresentationContext.java        |   10 +-
 .../ui/viewers/breadcrumb/BreadcrumbViewer.java    |   39 +-
 .../ui/viewers/model/ChildrenCountUpdate.java      |   21 +-
 .../internal/ui/viewers/model/ChildrenUpdate.java  |   18 +-
 .../ui/viewers/model/ElementCompareRequest.java    |   25 +-
 .../ui/viewers/model/ElementMementoRequest.java    |    8 +-
 .../internal/ui/viewers/model/FilterTransform.java |    7 +-
 .../ui/viewers/model/HasChildrenUpdate.java        |   20 +-
 .../internal/ui/viewers/model/IMementoManager.java |    7 +-
 .../model/ITreeModelCheckProviderTarget.java       |   50 +
 .../viewers/model/ITreeModelContentProvider.java   |   85 +-
 .../model/ITreeModelContentProviderTarget.java     |   33 +-
 .../ui/viewers/model/ITreeModelViewer.java         |   46 +-
 .../ui/viewers/model/InternalTreeModelViewer.java  |  338 +-
 .../model/InternalVirtualTreeModelViewer.java      |  227 +-
 .../internal/ui/viewers/model/LabelUpdate.java     |   22 +-
 .../ui/viewers/model/ModelContentProvider.java     | 3391 +++++---
 .../ui/viewers/model/SubTreeModelViewer.java       |   67 +-
 .../model/TimeTriggeredProgressMonitorDialog.java  |  224 +
 .../internal/ui/viewers/model/TreeCursor.java      |    8 +-
 .../ui/viewers/model/TreeModelContentProvider.java |  142 +-
 .../ui/viewers/model/TreeModelLabelProvider.java   |   27 +-
 .../ui/viewers/model/ViewerAdapterService.java     |   16 +-
 .../ui/viewers/model/ViewerUpdateMonitor.java      |    7 +
 .../VirtualCopyToClipboardActionDelegate.java      |    4 +-
 .../ui/viewers/model/VirtualFindAction.java        |    4 +-
 .../internal/ui/viewers/model/VirtualItem.java     |   35 +-
 .../ui/viewers/model/provisional/ICheckUpdate.java |   36 +
 .../model/provisional/ICheckboxModelProxy.java     |   43 +
 .../ui/viewers/model/provisional/IModelDelta.java  |    1 +
 .../ui/viewers/model/provisional/IModelProxy.java  |    3 +-
 .../model/provisional/IModelProxyFactory2.java     |   48 +
 .../model/provisional/IPresentationContext.java    |   38 +-
 .../model/provisional/IStateUpdateListener.java    |   58 +
 .../ui/viewers/model/provisional/ModelDelta.java   |   13 +
 .../model/provisional/PresentationContext.java     |   73 +-
 .../viewers/model/provisional/TreeModelViewer.java |    2 +-
 .../model/provisional/ViewerInputService.java      |   16 +-
 .../ui/viewers/provisional/AbstractModelProxy.java |    5 +-
 .../viewers/update/BreakpointContainerProxy.java   |   57 +
 .../ui/viewers/update/BreakpointManagerProxy.java  |  182 +
 .../ui/viewers/update/BreakpointProxy.java         |   53 +
 .../ui/viewers/update/DebugEventHandler.java       |    4 +-
 .../viewers/update/DefaultModelProxyFactory.java   |   15 +-
 .../ui/viewers/update/EventHandlerModelProxy.java  |    8 +-
 .../update/ExpressionManagerModelProxy.java        |   39 +-
 .../ui/viewers/update/LaunchManagerProxy.java      |    8 +-
 .../internal/ui/viewers/update/LaunchProxy.java    |   10 +-
 .../ui/views/DebugModelPresentationContext.java    |   10 +-
 .../internal/ui/views/DebugUIViewsMessages.java    |    6 +-
 .../ui/views/DebugUIViewsMessages.properties       |    6 +-
 .../internal/ui/views/ViewContextService.java      |   79 +-
 .../ui/views/breakpoints/BreakpointContainer.java  |  655 ++-
 .../BreakpointContainerWorkbenchAdapter.java       |   44 +-
 .../breakpoints/BreakpointOrganizerExtension.java  |    3 +-
 .../breakpoints/BreakpointOrganizerManager.java    |    3 +-
 .../views/breakpoints/BreakpointSetOrganizer.java  |   19 +-
 .../BreakpointWorkingSetElementAdapter.java        |   13 +-
 .../breakpoints/BreakpointWorkingSetPage.java      |    7 +-
 .../breakpoints/BreakpointsContentProvider.java    |    6 +-
 .../views/breakpoints/BreakpointsDragAdapter.java  |   51 +-
 .../views/breakpoints/BreakpointsDropAdapter.java  |   59 +-
 .../ui/views/breakpoints/BreakpointsView.java      | 1230 ++--
 .../breakpoints/BreakpointsViewEventHandler.java   |  186 -
 .../ui/views/breakpoints/BreakpointsViewer.java    |   33 +-
 .../ui/views/breakpoints/ElementComparator.java    |  174 +
 .../ui/views/breakpoints/IBreakpointOrganizer.java |   58 -
 .../views/breakpoints/OtherBreakpointCategory.java |   95 -
 .../ui/views/breakpoints/WorkingSetCategory.java   |    6 +-
 .../internal/ui/views/console/ProcessConsole.java  |   19 +-
 .../ui/views/expression/ExpressionView.java        |   36 +-
 .../views/launch/DebugElementAdapterFactory.java   |   75 +-
 .../debug/internal/ui/views/launch/LaunchView.java |  179 +-
 .../ui/views/launch/LaunchViewBreadcrumb.java      |    7 +-
 .../ui/views/launch/SourceNotFoundEditor.java      |    9 +-
 .../ui/views/launch/TerminateAndRemoveHandler.java |   25 +
 .../ui/views/memory/AbstractMemoryViewPane.java    |   61 +-
 .../ui/views/memory/MemoryBlocksTreeViewPane.java  |   11 +-
 .../memory/MemoryViewSynchronizationService.java   |   12 +-
 .../memory/MemoryViewTreeModelContentProvider.java |   18 +-
 .../ui/views/memory/RenderingViewPane.java         |   13 +-
 .../renderings/AsyncCopyTableRenderingAction.java  |   37 +-
 .../renderings/AsyncPrintTableRenderingAction.java |   35 +-
 .../AsyncTableRenderingUpdatePolicy.java           |    6 +-
 .../renderings/AsyncTableRenderingViewer.java      |    9 +-
 .../renderings/FormatTableRenderingDialog.java     |   21 +-
 .../views/memory/renderings/GoToAddressDialog.java |   14 +-
 .../renderings/TableRenderingContentProvider.java  |    8 +-
 .../views/modules/ModulesViewMessages.properties   |    4 +-
 .../registers/RegistersViewMessages.properties     |    2 +-
 .../internal/ui/views/variables/VariablesView.java |  314 +-
 .../variables/VariablesViewMessages.properties     |   18 +-
 .../views/variables/details/DefaultDetailPane.java |   21 +-
 .../details/DefaultDetailPaneFactory.java          |   16 +-
 .../ui/views/variables/details/DetailMessages.java |    4 +-
 .../variables/details/DetailMessages.properties    |    4 +-
 .../views/variables/details/DetailPaneManager.java |    3 +-
 .../views/variables/details/DetailPaneProxy.java   |  167 +-
 .../views/variables/details/MessageDetailPane.java |  114 +
 .../ui/AbstractBreakpointOrganizerDelegate.java    |    4 +-
 .../ui/org/eclipse/debug/ui/AbstractDebugView.java |   16 +-
 .../debug/ui/AbstractLaunchConfigurationTab.java   |   67 +
 .../eclipse/debug/ui/BreakpointTypeCategory.java   |    6 +-
 .../ui/org/eclipse/debug/ui/CommonTab.java         |   55 +-
 .../ui/org/eclipse/debug/ui/DebugPopup.java        |    4 +-
 .../ui/org/eclipse/debug/ui/IDebugUIConstants.java |    3 +-
 .../ui/org/eclipse/debug/ui/IDetailPane3.java      |   46 +
 .../org/eclipse/debug/ui/InspectPopupDialog.java   |   10 +-
 .../ui/org/eclipse/debug/ui/RefreshTab.java        |  200 +-
 .../debug/ui/StringVariableSelectionDialog.java    |  139 +-
 .../eclipse/debug/ui/WorkingDirectoryBlock.java    |    2 +-
 .../ui/actions/AbstractLaunchHistoryAction.java    |  126 +-
 .../ui/actions/AbstractLaunchToolbarAction.java    |    5 +-
 .../actions/AddMemoryRenderingActionDelegate.java  |   41 +-
 .../debug/ui/actions/ContextualLaunchAction.java   |    4 +-
 .../debug/ui/actions/DebugCommandAction.java       |  350 +
 .../debug/ui/actions/DebugCommandHandler.java      |  279 +
 .../ui/actions/ImportBreakpointsOperation.java     |   18 +-
 .../debug/ui/actions/ToggleBreakpointAction.java   |    6 +-
 .../debug/ui/memory/AbstractTableRendering.java    |   21 +-
 .../debug/ui/sourcelookup/SourceLookupDialog.java  |    3 +-
 .../org.eclipse.ecf.filetransfer}/.classpath       |    0
 .../org.eclipse.ecf.filetransfer/.gitignore        |    1 +
 .../org.eclipse.ecf.filetransfer/.options          |    0
 .../org.eclipse.ecf.filetransfer/.project          |    0
 .../.settings/org.eclipse.jdt.core.prefs           |  350 +
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |    0
 .../META-INF/MANIFEST.MF                           |   27 +
 .../org.eclipse.ecf.filetransfer/about.html        |    0
 .../org.eclipse.ecf.filetransfer/build.properties  |   13 +
 .../org.eclipse.ecf.filetransfer/plugin.properties |    0
 .../org.eclipse.ecf.filetransfer/plugin.xml        |    0
 .../schema/urlStreamHandlerService.exsd            |    0
 .../filetransfer/BrowseFileTransferException.java  |    0
 .../eclipse/ecf/filetransfer/FileTransferInfo.java |    0
 .../eclipse/ecf/filetransfer/FileTransferJob.java  |   82 +
 .../ecf/filetransfer/IFileRangeSpecification.java  |    0
 .../eclipse/ecf/filetransfer/IFileTransfer.java    |    0
 .../ecf/filetransfer/IFileTransferInfo.java        |    0
 .../ecf/filetransfer/IFileTransferListener.java    |    0
 .../ecf/filetransfer/IFileTransferPausable.java    |    0
 .../ecf/filetransfer/IFileTransferRateControl.java |    0
 .../ecf/filetransfer/IFileTransferRunnable.java    |    0
 .../ecf/filetransfer/IIncomingFileTransfer.java    |    0
 .../IIncomingFileTransferRequestListener.java      |    0
 .../ecf/filetransfer/IOutgoingFileTransfer.java    |    0
 .../org/eclipse/ecf/filetransfer/IRemoteFile.java  |    0
 .../ecf/filetransfer/IRemoteFileAttributes.java    |    0
 .../eclipse/ecf/filetransfer/IRemoteFileInfo.java  |    0
 .../IRemoteFileSystemBrowserContainerAdapter.java  |    0
 .../filetransfer/IRemoteFileSystemListener.java    |    0
 .../ecf/filetransfer/IRemoteFileSystemRequest.java |    0
 .../IRetrieveFileTransferContainerAdapter.java     |    0
 .../filetransfer/IRetrieveFileTransferOptions.java |   44 +
 .../ISendFileTransferContainerAdapter.java         |    0
 .../ecf/filetransfer/ISendFileTransferOptions.java |   19 +
 .../IncomingFileTransferException.java             |  103 +
 .../InvalidFileRangeSpecificationException.java    |    0
 .../filetransfer/RemoteFileSystemException.java    |    0
 .../filetransfer/SendFileTransferException.java    |    0
 .../ecf/filetransfer/UserCancelledException.java   |    0
 .../events/IFileTransferConnectStartEvent.java     |    0
 .../filetransfer/events/IFileTransferEvent.java    |    0
 .../events/IFileTransferRequestEvent.java          |    0
 .../events/IIncomingFileTransferEvent.java         |    0
 .../IIncomingFileTransferReceiveDataEvent.java     |    0
 .../IIncomingFileTransferReceiveDoneEvent.java     |    0
 .../IIncomingFileTransferReceivePausedEvent.java   |    0
 .../IIncomingFileTransferReceiveResumedEvent.java  |  152 +
 .../IIncomingFileTransferReceiveStartEvent.java    |  140 +
 .../events/IOutgoingFileTransferEvent.java         |    0
 .../events/IOutgoingFileTransferResponseEvent.java |    0
 .../events/IOutgoingFileTransferSendDataEvent.java |    0
 .../events/IOutgoingFileTransferSendDoneEvent.java |    0
 .../IOutgoingFileTransferSendPausedEvent.java      |    0
 .../IOutgoingFileTransferSendResumedEvent.java     |    0
 .../events/IRemoteFileSystemBrowseEvent.java       |    0
 .../events/IRemoteFileSystemEvent.java             |    0
 .../events/socket/ISocketClosedEvent.java          |    0
 .../events/socket/ISocketConnectedEvent.java       |    0
 .../events/socket/ISocketCreatedEvent.java         |    0
 .../filetransfer/events/socket/ISocketEvent.java   |    0
 .../events/socket/ISocketEventSource.java          |    0
 .../events/socket/ISocketListener.java             |    0
 .../socketfactory/INonconnectedSocketFactory.java  |    0
 .../filetransfer/identity/FileCreateException.java |    0
 .../ecf/filetransfer/identity/FileIDFactory.java   |  126 +
 .../eclipse/ecf/filetransfer/identity/IFileID.java |   46 +
 .../ecf/filetransfer/identity/IFileIDFactory.java  |   89 +
 .../service/IRemoteFileSystemBrowser.java          |    0
 .../service/IRemoteFileSystemBrowserFactory.java   |    0
 .../service/IRetrieveFileTransfer.java             |    0
 .../service/IRetrieveFileTransferFactory.java      |    0
 .../filetransfer/service/ISendFileTransfer.java    |    0
 .../service/ISendFileTransferFactory.java          |    0
 .../ecf/internal/filetransfer/Activator.java       |    0
 .../filetransfer/FileTransferDebugOptions.java     |    0
 .../org.eclipse.ecf.identity}/.classpath           |    0
 .../plugins/org.eclipse.ecf.identity/.gitignore    |    1 +
 .../org.eclipse.ecf.identity/.project              |    0
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.core.prefs           |    0
 .../org.eclipse.ecf.identity/META-INF/MANIFEST.MF  |   22 +
 .../org.eclipse.ecf.identity/about.html            |    0
 .../org.eclipse.ecf.identity/build.properties      |   21 +
 .../org.eclipse.ecf.identity/plugin.properties     |    0
 .../org.eclipse.ecf.identity/plugin.xml            |    0
 .../org.eclipse.ecf.identity/schema/namespace.exsd |    0
 .../src/org/eclipse/ecf/core/identity/BaseID.java  |    0
 .../src/org/eclipse/ecf/core/identity/GUID.java    |  158 +
 .../src/org/eclipse/ecf/core/identity/ID.java      |    0
 .../ecf/core/identity/IDCreateException.java       |    0
 .../org/eclipse/ecf/core/identity/IDFactory.java   |  281 +
 .../org/eclipse/ecf/core/identity/IIDFactory.java  |    0
 .../eclipse/ecf/core/identity/IIdentifiable.java   |    0
 .../org/eclipse/ecf/core/identity/IResourceID.java |    0
 .../src/org/eclipse/ecf/core/identity/LongID.java  |  100 +
 .../org/eclipse/ecf/core/identity/Namespace.java   |  329 +
 .../ecf/core/identity/NamespacePermission.java     |    0
 .../org/eclipse/ecf/core/identity/StringID.java    |  136 +
 .../src/org/eclipse/ecf/core/identity/URIID.java   |    0
 .../org/eclipse/ecf/core/util/AbstractFactory.java |    0
 .../src/org/eclipse/ecf/core/util/Base64.java      |    0
 .../org/eclipse/ecf/core/util/ECFException.java    |    0
 .../eclipse/ecf/core/util/ECFRuntimeException.java |    0
 .../eclipse/ecf/core/util/IDFactoryTracker.java    |   33 +
 .../src/org/eclipse/ecf/core/util/LogHelper.java   |    0
 .../org/eclipse/ecf/core/util/PlatformHelper.java  |    0
 .../src/org/eclipse/ecf/core/util/StringUtils.java |    0
 .../eclipse/ecf/core/util/SystemLogService.java    |    0
 .../src/org/eclipse/ecf/core/util/Trace.java       |  582 ++
 .../ecf/internal/core/identity/Activator.java      |  333 +
 .../.classpath                                     |    0
 .../.gitignore                                     |    1 +
 .../.project                                       |    0
 .../.settings/org.eclipse.jdt.core.prefs           |  351 +
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.core.prefs           |    0
 .../.settings/org.eclipse.pde.prefs                |   27 +
 .../META-INF/MANIFEST.MF                           |   11 +
 .../about.html                                     |    0
 .../asl-v20.txt                                    |    0
 .../build.properties                               |   10 +
 .../plugin.properties                              |    0
 .../httpclient/ssl/SSLSocketFactoryModifier.java   |    0
 .../.classpath                                     |    0
 .../.gitignore                                     |    1 +
 .../.options                                       |    0
 .../.project                                       |    0
 .../.settings/org.eclipse.jdt.core.prefs           |  351 +
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |   27 +
 .../META-INF/MANIFEST.MF                           |   30 +
 .../about.html                                     |    0
 .../asl-v20.txt                                    |    0
 .../build.properties                               |   11 +
 .../plugin.properties                              |    0
 .../plugin.xml                                     |    0
 .../filetransfer/httpclient/Activator.java         |  130 +
 .../httpclient/ConnectingSocketMonitor.java        |    0
 .../filetransfer/httpclient/DebugOptions.java      |    0
 .../ECFHttpClientProtocolSocketFactory.java        |    0
 .../ECFHttpClientSecureProtocolSocketFactory.java  |    0
 .../HttpClientProxyCredentialProvider.java         |   78 +
 .../httpclient/ISSLSocketFactoryModifier.java      |    0
 .../httpclient/ISocketConnectionCallback.java      |    0
 .../provider/filetransfer/httpclient/Messages.java |    0
 .../filetransfer/httpclient/messages.properties    |    0
 .../HttpClientBrowseFileTransferFactory.java       |    0
 .../HttpClientDefaultSSLSocketFactoryModifier.java |    0
 .../httpclient/HttpClientFileSystemBrowser.java    |  332 +
 .../filetransfer/httpclient/HttpClientOptions.java |   47 +
 .../httpclient/HttpClientRetrieveFileTransfer.java | 1177 +++
 .../HttpClientRetrieveFileTransferFactory.java     |    0
 .../httpclient/HttpClientSslTrustManager.java      |    0
 .../filetransfer/httpclient/NTLMProxyDetector.java |    0
 .../.classpath                                     |    0
 .../.gitignore                                     |    1 +
 .../.project                                       |    0
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.core.prefs           |    0
 .../.settings/org.eclipse.pde.prefs                |    0
 .../META-INF/MANIFEST.MF                           |    0
 .../about.html                                     |    0
 .../build.properties                               |    7 +
 .../plugin.properties                              |    0
 .../filetransfer/ssl/ECFURLConnectionModifier.java |    0
 .../.classpath                                     |    0
 .../.gitignore                                     |    1 +
 .../org.eclipse.ecf.provider.filetransfer/.options |    0
 .../org.eclipse.ecf.provider.filetransfer/.project |    0
 .../.settings/org.eclipse.jdt.core.prefs           |  353 +
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |    0
 .../META-INF/MANIFEST.MF                           |   33 +
 .../about.html                                     |    0
 .../build.properties                               |   12 +
 .../plugin.properties                              |    0
 .../plugin.xml                                     |    0
 .../schema/browseFileTransferProtocolFactory.exsd  |  164 +
 .../retrieveFileTransferProtocolFactory.exsd       |  168 +
 .../schema/sendFileTransferProtocolFactory.exsd    |  164 +
 .../internal/provider/filetransfer/Activator.java  |  917 ++
 .../provider/filetransfer/DebugOptions.java        |    0
 .../filetransfer/IURLConnectionModifier.java       |    0
 .../internal/provider/filetransfer/Messages.java   |   79 +
 .../provider/filetransfer/messages.properties      |   60 +
 .../IFileTransferProtocolToFactoryMapper.java      |  227 +
 .../browse/AbstractFileSystemBrowser.java          |  261 +
 .../browse/LocalFileSystemBrowser.java             |    0
 .../filetransfer/browse/LocalRemoteFile.java       |    0
 .../browse/LocalRemoteFileAttributes.java          |    0
 .../MultiProtocolFileSystemBrowserAdapter.java     |    0
 ...ltiProtocolFileSystemBrowserAdapterFactory.java |    0
 .../filetransfer/browse/URLFileSystemBrowser.java  |  204 +
 .../filetransfer/browse/URLRemoteFile.java         |    0
 .../browse/URLRemoteFileAttributes.java            |    0
 .../events/socket/AbstractSocketEvent.java         |    0
 .../events/socket/AbstractSocketWrapper.java       |    0
 .../events/socket/SocketClosedEvent.java           |    0
 .../events/socket/SocketConnectedEvent.java        |    0
 .../events/socket/SocketCreatedEvent.java          |    0
 .../events/socket/SocketEventCreateUtil.java       |    0
 .../events/socket/SocketEventSource.java           |    0
 .../filetransfer/identity/FileTransferID.java      |   97 +
 .../identity/FileTransferNamespace.java            |   99 +
 .../outgoing/AbstractOutgoingFileTransfer.java     |  469 +
 .../AbstractUrlConnectionOutgoingFileTransfer.java |    0
 .../outgoing/LocalFileOutgoingFileTransfer.java    |    0
 .../outgoing/MultiProtocolOutgoingAdapter.java     |  163 +
 .../MultiProtocolOutgoingAdapterFactory.java       |    0
 .../retrieve/AbstractRetrieveFileTransfer.java     |  991 +++
 .../provider/filetransfer/retrieve/HttpHelper.java |    0
 .../retrieve/MultiProtocolRetrieveAdapter.java     |  162 +
 .../MultiProtocolRetrieveAdapterFactory.java       |    0
 .../UrlConnectionRetrieveFileTransfer.java         |  553 ++
 .../provider/filetransfer/util/JREProxyHelper.java |   90 +
 .../filetransfer/util/PollingInputStream.java      |  272 +
 .../filetransfer/util/ProxySetupHelper.java        |  101 +
 .../filetransfer/util/TimeoutInputStream.java      |    0
 .../org.eclipse.ecf.ssl}/.classpath                |    0
 eclipse/plugins/org.eclipse.ecf.ssl/.gitignore     |    1 +
 .../org.eclipse.ecf.ssl/.project                   |    0
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |    0
 .../org.eclipse.ecf.ssl/META-INF/MANIFEST.MF       |   13 +
 .../org.eclipse.ecf.ssl/about.html                 |    0
 .../plugins/org.eclipse.ecf.ssl/build.properties   |    7 +
 .../org.eclipse.ecf.ssl/plugin.properties          |    0
 .../ecf/internal/ssl/ECFCertificateException.java  |    0
 .../ecf/internal/ssl/ECFSSLSocketFactory.java      |    0
 .../eclipse/ecf/internal/ssl/ECFTrustManager.java  |    0
 .../.classpath                                     |    0
 eclipse/plugins/org.eclipse.ecf/.gitignore         |    1 +
 .../{ecf-src => plugins}/org.eclipse.ecf/.options  |    0
 .../{ecf-src => plugins}/org.eclipse.ecf/.project  |    0
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |    0
 .../plugins/org.eclipse.ecf/META-INF/MANIFEST.MF   |   30 +
 .../org.eclipse.ecf/about.html                     |    0
 .../{ecf-src => plugins}/org.eclipse.ecf/about.ini |    0
 .../org.eclipse.ecf/about.properties               |    0
 eclipse/plugins/org.eclipse.ecf/buckminster.cspex  |   42 +
 eclipse/plugins/org.eclipse.ecf/build.properties   |   26 +
 .../org.eclipse.ecf/dev.properties                 |    0
 .../{ecf-src => plugins}/org.eclipse.ecf/ecf32.png |  Bin 1680 -> 1680 bytes
 eclipse/plugins/org.eclipse.ecf/javadoc.xml        |   43 +
 eclipse/plugins/org.eclipse.ecf/plugin.properties  |   10 +
 eclipse/plugins/org.eclipse.ecf/plugin.xml         |   15 +
 .../plugins/org.eclipse.ecf/schema/container.exsd  |  174 +
 .../org.eclipse.ecf/schema/containerFactory.exsd   |  312 +
 .../org.eclipse.ecf/schema/start.exsd              |    0
 .../org/eclipse/ecf/core/AbstractContainer.java    |   97 +
 .../ecf/core/AbstractContainerAdapterFactory.java  |    0
 .../src/org/eclipse/ecf/core/BaseContainer.java    |  128 +
 .../ecf/core/ContainerAuthenticationException.java |    0
 .../ecf/core/ContainerConnectException.java        |    0
 .../eclipse/ecf/core/ContainerCreateException.java |    0
 .../src/org/eclipse/ecf/core/ContainerFactory.java |  604 ++
 .../eclipse/ecf/core/ContainerTypeDescription.java |  278 +
 .../src/org/eclipse/ecf/core/IContainer.java       |    0
 .../org/eclipse/ecf/core/IContainerFactory.java    |  333 +
 .../org/eclipse/ecf/core/IContainerListener.java   |    0
 .../org/eclipse/ecf/core/IContainerManager.java    |    0
 .../ecf/core/IContainerManagerListener.java        |    0
 .../org/eclipse/ecf/core/IReliableContainer.java   |    0
 .../ecf/core/events/ContainerConnectedEvent.java   |    0
 .../ecf/core/events/ContainerConnectingEvent.java  |    0
 .../core/events/ContainerDisconnectedEvent.java    |    0
 .../core/events/ContainerDisconnectingEvent.java   |    0
 .../ecf/core/events/ContainerDisposeEvent.java     |    0
 .../ecf/core/events/ContainerEjectedEvent.java     |    0
 .../ecf/core/events/IContainerConnectedEvent.java  |    0
 .../ecf/core/events/IContainerConnectingEvent.java |    0
 .../core/events/IContainerDisconnectedEvent.java   |    0
 .../core/events/IContainerDisconnectingEvent.java  |    0
 .../ecf/core/events/IContainerDisposeEvent.java    |    0
 .../ecf/core/events/IContainerEjectedEvent.java    |    0
 .../eclipse/ecf/core/events/IContainerEvent.java   |    0
 .../org/eclipse/ecf/core/jobs/JobsExecutor.java    |    0
 .../core/provider/BaseContainerInstantiator.java   |   76 +
 .../BaseRemoteServiceContainerInstantiator.java    |   36 +
 .../ecf/core/provider/IContainerInstantiator.java  |  124 +
 .../IRemoteServiceContainerInstantiator.java       |   82 +
 .../eclipse/ecf/core/security/BooleanCallback.java |  109 +
 .../org/eclipse/ecf/core/security/Callback.java    |    0
 .../eclipse/ecf/core/security/CallbackHandler.java |    0
 .../ecf/core/security/ConnectContextFactory.java   |    0
 .../eclipse/ecf/core/security/IConnectContext.java |    0
 .../ecf/core/security/IConnectHandlerPolicy.java   |    0
 .../ecf/core/security/IConnectInitiatorPolicy.java |    0
 .../ecf/core/security/IContainerPolicy.java        |    0
 .../eclipse/ecf/core/security/NameCallback.java    |  113 +
 .../eclipse/ecf/core/security/ObjectCallback.java  |    0
 .../ecf/core/security/PassphraseCallback.java      |  113 +
 .../ecf/core/security/PasswordCallback.java        |  113 +
 .../security/UnsupportedCallbackException.java     |    0
 .../org/eclipse/ecf/core/start/ECFStartJob.java    |    0
 .../src/org/eclipse/ecf/core/start/IECFStart.java  |   27 +
 .../ecf/core/status/SerializableMultiStatus.java   |  159 +
 .../ecf/core/status/SerializableStatus.java        |  283 +
 .../src/org/eclipse/ecf/core/user/IUser.java       |   44 +
 .../src/org/eclipse/ecf/core/user/User.java        |    0
 .../ecf/core/util/AdapterContainerFilter.java      |    0
 .../ecf/core/util/ConnectedContainerFilter.java    |    0
 .../ecf/core/util/ContainerFactoryTracker.java     |   31 +
 .../ecf/core/util/ContainerManagerTracker.java     |   30 +
 .../src/org/eclipse/ecf/core/util/Event.java       |    0
 .../eclipse/ecf/core/util/IContainerFilter.java    |    0
 .../org/eclipse/ecf/core/util/IEventProcessor.java |    0
 .../eclipse/ecf/core/util/IExceptionHandler.java   |    0
 .../src/org/eclipse/ecf/core/util/Proxy.java       |    0
 .../org/eclipse/ecf/core/util/ProxyAddress.java    |    0
 .../eclipse/ecf/internal/core/ECFDebugOptions.java |    0
 .../org/eclipse/ecf/internal/core/ECFPlugin.java   |  546 ++
 .../org/eclipse/ecf/internal/core/IDisposable.java |    0
 .../org.eclipse.equinox.app/META-INF/MANIFEST.MF   |    4 +-
 .../src/org/eclipse/equinox/app/IApplication.java  |   19 +-
 .../eclipse/equinox/app/IApplicationContext.java   |   61 +-
 .../internal/app/DefaultApplicationListener.java   |    6 +-
 .../equinox/internal/app/EclipseAppContainer.java  |  211 +-
 .../equinox/internal/app/EclipseAppHandle.java     |   61 +-
 .../org/eclipse/equinox/internal/app/Messages.java |    3 +-
 .../equinox/internal/app/messages.properties       |    3 +-
 eclipse/plugins/org.eclipse.equinox.cm/.project    |    6 +
 .../org.eclipse.equinox.cm/META-INF/MANIFEST.MF    |    2 +-
 .../equinox/internal/cm/ConfigurationImpl.java     |    3 +-
 .../META-INF/MANIFEST.MF                           |    5 +-
 .../core/internal/boot/PlatformURLConnection.java  |    4 +-
 .../core/internal/runtime/AdapterManager.java      |   13 +-
 .../core/internal/runtime/ResourceTranslator.java  |   26 +-
 .../src/org/eclipse/core/runtime/Assert.java       |   12 +-
 .../org/eclipse/core/runtime/CoreException.java    |   25 +-
 .../eclipse/core/runtime/NullProgressMonitor.java  |    2 +-
 .../src/org/eclipse/core/runtime/Status.java       |   14 +-
 .../src/org/eclipse/core/runtime/URIUtil.java      |    3 +-
 .../equinox/events/MemoryEventConstants.java       |   78 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugins/org.eclipse.equinox.device/.project    |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.equinox.ds/.settings/.api_filters  |   24 +
 .../org.eclipse.equinox.ds/META-INF/MANIFEST.MF    |   15 +-
 .../plugins/org.eclipse.equinox.ds/META-INF/p2.inf |    4 +
 eclipse/plugins/org.eclipse.equinox.ds/about.html  |   34 +
 .../about_files/LICENSE-2.0.txt                    |    0
 .../about_files/NOTICE.txt                         |    0
 .../org.eclipse.equinox.ds/build.properties        |    6 +-
 .../src/org/apache/felix/scr/Component.java        |  314 +
 .../src/org/apache/felix/scr/Reference.java        |  106 +
 .../src/org/apache/felix/scr/ScrService.java       |   66 +
 .../src/org/apache/felix/scr/package.html          |   15 +
 .../org/eclipse/equinox/internal/ds/Activator.java |  272 +-
 .../equinox/internal/ds/ConfigurationManager.java  |   48 -
 .../eclipse/equinox/internal/ds/FactoryReg.java    |    2 +-
 .../equinox/internal/ds/InstanceProcess.java       |  163 +-
 .../org/eclipse/equinox/internal/ds/Messages.java  |   34 +-
 .../org/eclipse/equinox/internal/ds/Reference.java |  128 +-
 .../org/eclipse/equinox/internal/ds/Resolver.java  |  317 +-
 .../equinox/internal/ds/SCRCommandProvider.java    |  132 +-
 .../eclipse/equinox/internal/ds/SCRManager.java    |  246 +-
 .../org/eclipse/equinox/internal/ds/SCRUtil.java   |  148 +
 .../equinox/internal/ds/SCRmessages.properties     |   37 +-
 .../equinox/internal/ds/ScrServiceImpl.java        |   47 +
 .../eclipse/equinox/internal/ds/ServiceReg.java    |   13 +-
 .../eclipse/equinox/internal/ds/WorkThread.java    |    9 +-
 .../internal/ds/impl/ComponentContextImpl.java     |    5 +-
 .../internal/ds/impl/ComponentFactoryImpl.java     |   39 +-
 .../internal/ds/impl/ComponentInstanceImpl.java    |   12 +-
 .../internal/ds/model/ComponentReference.java      |   75 +-
 .../internal/ds/model/DeclarationParser.java       |    2 +
 .../internal/ds/model/ServiceComponent.java        |  180 +-
 .../internal/ds/model/ServiceComponentProp.java    |  189 +-
 .../internal/ds/storage/file/FileStorage.java      |   50 +-
 .../internal/util/xml/impl/XMLParserImpl.java      |    2 +-
 eclipse/plugins/org.eclipse.equinox.event/.project |   11 +
 .../org.eclipse.equinox.event/META-INF/MANIFEST.MF |    4 +-
 .../OSGI-INF/component.xml                         |    7 +
 .../org.eclipse.equinox.event/build.properties     |   15 +-
 .../eclipse/equinox/internal/event/Activator.java  |   42 +-
 .../equinox/internal/event/EventComponent.java     |   41 +
 .../internal/event/EventHandlerWrapper.java        |   66 +-
 .../internal/event/mapper/EventAdapter.java        |    5 +-
 .../internal/event/mapper/EventRedeliverer.java    |   15 +-
 .../.project                                       |    5 +
 .../META-INF/MANIFEST.MF                           |   16 +-
 .../OSGI-INF/fwadmin.xml                           |   13 +
 .../build.properties                               |   15 +-
 .../pom.xml                                        |   14 +
 .../internal/frameworkadmin/equinox/Activator.java |   99 -
 .../equinox/EclipseLauncherParser.java             |   89 +-
 .../equinox/EquinoxBundlesState.java               |   54 +-
 .../frameworkadmin/equinox/EquinoxConstants.java   |   15 +-
 .../frameworkadmin/equinox/EquinoxFwAdminImpl.java |  117 +-
 .../equinox/EquinoxFwConfigFileParser.java         |   94 +-
 .../equinox/EquinoxManipulatorImpl.java            |   95 +-
 .../internal/frameworkadmin/equinox/Messages.java  |   29 +-
 .../frameworkadmin/equinox/ParserUtils.java        |   37 +-
 .../frameworkadmin/equinox/messages.properties     |   14 +-
 .../frameworkadmin/equinox/utils/FileUtils.java    |   25 +-
 .../org.eclipse.equinox.frameworkadmin/.classpath  |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  551 +-
 .../META-INF/MANIFEST.MF                           |   12 +-
 .../org.eclipse.equinox.frameworkadmin/pom.xml     |   14 +
 .../eclipse/equinox/frameworkadmin/BundleInfo.java |  331 +
 .../frameworkadmin/utils/SimpleBundlesState.java   |   10 +-
 .../internal/frameworkadmin/utils/Utils.java       |   28 +-
 .../ConfiguratorManipulator.java                   |    8 +-
 .../ConfiguratorManipulatorFactory.java            |    2 +-
 .../provisional/frameworkadmin/BundleInfo.java     |  231 -
 .../provisional/frameworkadmin/BundlesState.java   |   18 +-
 .../provisional/frameworkadmin/ConfigData.java     |   34 +-
 .../provisional/frameworkadmin/FrameworkAdmin.java |   10 +-
 .../provisional/frameworkadmin/LauncherData.java   |   51 +-
 .../provisional/frameworkadmin/Manipulator.java    |    4 +-
 .../equinox/http/jetty/JettyConfigurator.java      |    3 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugin.properties                              |    3 +-
 .../org.eclipse.equinox.http.registry/plugin.xml   |    1 +
 .../schema/filters.exsd                            |  208 +
 .../internal/DefaultRegistryHttpContext.java       |   25 +-
 .../http/registry/internal/FilterManager.java      |  200 +
 .../registry/internal/HttpRegistryManager.java     |   92 +-
 .../.settings/.api_filters                         |   11 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../equinox/http/servlet/ExtendedHttpService.java  |   55 +
 .../equinox/http/servlet/internal/Activator.java   |   12 +-
 .../http/servlet/internal/FilterChainImpl.java     |   30 +
 .../http/servlet/internal/FilterConfigImpl.java    |   52 +
 .../http/servlet/internal/FilterRegistration.java  |  112 +
 .../http/servlet/internal/HttpServiceFactory.java  |    2 +-
 .../http/servlet/internal/HttpServiceImpl.java     |   44 +-
 .../http/servlet/internal/ProxyServlet.java        |  156 +-
 .../http/servlet/internal/Registration.java        |   12 -
 .../servlet/internal/ResourceRegistration.java     |  194 -
 .../http/servlet/internal/ResourceServlet.java     |  186 +
 .../http/servlet/internal/ServletRegistration.java |   65 +-
 .../META-INF/MANIFEST.MF                           |    6 +-
 eclipse/plugins/org.eclipse.equinox.http/.project  |    6 +
 .../org.eclipse.equinox.http/META-INF/MANIFEST.MF  |    2 +-
 .../eclipse/equinox/http/HttpConfiguration.java    |   41 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 eclipse/plugins/org.eclipse.equinox.io/.project    |    6 +
 .../org.eclipse.equinox.io/META-INF/MANIFEST.MF    |    2 +-
 eclipse/plugins/org.eclipse.equinox.ip/.project    |    6 +
 .../org.eclipse.equinox.ip/META-INF/MANIFEST.MF    |    2 +-
 .../internal/ip/impl/ProvisioningAgent.java        |  241 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |   10 +-
 .../internal/jsp/jasper/JspClassLoader.java        |   15 -
 .../org/eclipse/equinox/jsp/jasper/JspServlet.java |   25 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   22 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../about.html                                     |    0
 .../build.properties                               |    7 +
 .../customBuildCallbacks.xml                       |    0
 .../launcher.gtk.aix.ppc64.properties              |   12 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   22 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../about.html                                     |    0
 .../build.properties                               |    7 +
 .../customBuildCallbacks.xml                       |    0
 .../launcher.gtk.linux.ppc64.properties            |   12 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   22 -
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   10 -
 .../build.properties                               |    7 -
 .../launcher.motif.hpux.PA_RISC.properties         |   12 -
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.classpath                                     |    7 -
 .../.project                                       |   22 -
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../build.properties                               |    6 -
 .../launcher.wpf.win32.x86.properties              |   12 -
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   22 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../about.html                                     |    0
 .../build.properties                               |    7 +
 .../customBuildCallbacks.xml                       |    0
 .../launcher.gtk.aix.ppc64.properties              |   12 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.project                                       |   22 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../about.html                                     |    0
 .../build.properties                               |    7 +
 .../customBuildCallbacks.xml                       |    0
 .../launcher.gtk.linux.ppc64.properties            |   12 +
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../build.properties                               |    1 +
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   10 -
 .../README.TXT                                     |    2 +
 .../build.properties                               |    7 -
 .../launcher.motif.hpux.PA_RISC.properties         |   12 -
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../org/eclipse/equinox/launcher/JNIBridge.java    |   31 +-
 .../src/org/eclipse/equinox/launcher/Main.java     |  249 +-
 .../org/eclipse/equinox/launcher/WebStartMain.java |    4 +-
 eclipse/plugins/org.eclipse.equinox.log/.project   |    6 +
 .../org.eclipse.equinox.log/META-INF/MANIFEST.MF   |    2 +-
 .../equinox/log/LogPermissionCollection.java       |    2 +-
 .../plugins/org.eclipse.equinox.metatype/.project  |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../.classpath                                     |    3 +-
 ...p2.artifact.repository buildAntTasks.xml.launch |   18 -
 .../.project                                       |    9 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   78 +-
 .../OSGI-INF/repositoryManager.xml                 |    8 +
 .../build.properties                               |   21 +-
 .../buildAntTasks.xml                              |    9 -
 .../plugin.xml                                     |   48 +-
 .../pom.xml                                        |   14 +
 .../schema/artifactRepositories.exsd               |   38 +-
 .../internal/p2/artifact/mirror/FileMirrorLog.java |  125 -
 .../p2/artifact/mirror/IArtifactMirrorLog.java     |   26 -
 .../p2/artifact/mirror/MirrorApplication.java      |  263 -
 .../internal/p2/artifact/mirror/Mirroring.java     |  273 -
 .../internal/p2/artifact/mirror/XMLMirrorLog.java  |  166 -
 .../processors/md5/MD5ArtifactComparator.java      |   41 -
 .../p2/artifact/processors/md5/MD5Verifier.java    |   11 +-
 .../p2/artifact/processors/md5/Messages.java       |    2 -
 .../p2/artifact/processors/md5/messages.properties |    3 -
 .../processors/pack200/Pack200ProcessorStep.java   |   28 +-
 .../internal/p2/artifact/repository/Activator.java |   18 +-
 .../repository/ArtifactRepositoryComponent.java    |   25 +
 .../repository/ArtifactRepositoryManager.java      |   52 +-
 .../p2/artifact/repository/ArtifactRequest.java    |   17 +-
 .../repository/CompositeArtifactRepository.java    |  418 +-
 .../CompositeArtifactRepositoryFactory.java        |  158 +-
 .../internal/p2/artifact/repository/Messages.java  |   12 +-
 .../p2/artifact/repository/MirrorRequest.java      |  108 +-
 .../p2/artifact/repository/MirrorSelector.java     |  174 +-
 .../p2/artifact/repository/RawMirrorRequest.java   |    7 +-
 .../p2/artifact/repository/SignatureVerifier.java  |    4 +-
 .../p2/artifact/repository/messages.properties     |   10 +-
 .../p2/artifact/repository/simple/BlobStore.java   |    9 +-
 .../p2/artifact/repository/simple/DownloadJob.java |   11 +-
 .../p2/artifact/repository/simple/KeyIndex.java    |   84 +
 .../p2/artifact/repository/simple/Mapper.java      |    4 +-
 .../simple/SimpleArtifactDescriptor.java           |   80 +
 .../simple/SimpleArtifactRepository.java           |  363 +-
 .../simple/SimpleArtifactRepositoryFactory.java    |  144 +
 .../simple/SimpleArtifactRepositoryIO.java         |   74 +-
 .../repository/ArtifactComparatorFactory.java      |   52 -
 .../p2/artifact/repository/ArtifactDescriptor.java |  191 -
 .../artifact/repository/IArtifactComparator.java   |   31 -
 .../artifact/repository/IArtifactDescriptor.java   |   62 -
 .../artifact/repository/IArtifactRepository.java   |  133 -
 .../repository/IArtifactRepositoryManager.java     |  149 -
 .../p2/artifact/repository/IArtifactRequest.java   |   33 -
 .../repository/IFileArtifactRepository.java        |   32 -
 .../repository/processing/ProcessingStep.java      |    6 +-
 .../processing/ProcessingStepDescriptor.java       |   89 -
 .../processing/ProcessingStepHandler.java          |   30 +-
 .../repository/AbstractArtifactRepository.java     |   78 -
 .../repository/ArtifactRepositoryFactory.java      |   75 -
 .../SimpleArtifactRepositoryFactory.java           |  129 -
 .../p2/artifact/repository/ant/AddChildTask.java   |   82 -
 .../p2/artifact/repository/ant/AntMirrorLog.java   |  105 -
 .../ant/CreateCompositeArtifactRepositoryTask.java |  120 -
 .../repository/ant/MirrorApplicationTask.java      |  221 -
 .../artifact/repository/ant/RemoveChildTask.java   |   76 -
 .../p2/artifact/repository/ant/ValidateTask.java   |   68 -
 .../org.eclipse.equinox.p2.console/.classpath      |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   30 +-
 .../.settings/org.eclipse.jdt.launching.prefs      |    3 +
 .../META-INF/MANIFEST.MF                           |   39 +-
 .../Provisioning console.launch                    |   12 +-
 .../build.properties                               |    2 +
 .../plugins/org.eclipse.equinox.p2.console/pom.xml |   14 +
 .../equinox/internal/p2/console/Activator.java     |   31 +-
 .../internal/p2/console/ProvCommandProvider.java   |  481 +-
 .../internal/p2/console/ProvisioningHelper.java    |  211 +-
 .../plugins/org.eclipse.equinox.p2.core/.classpath |    4 +-
 .../plugins/org.eclipse.equinox.p2.core/.options   |    5 +-
 .../plugins/org.eclipse.equinox.p2.core/.project   |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   15 +-
 .../META-INF/MANIFEST.MF                           |  130 +-
 .../OSGI-INF/agentProvider.xml                     |    7 +
 .../OSGI-INF/eventBus.xml                          |    8 +
 .../org.eclipse.equinox.p2.core/build.properties   |    9 +-
 .../plugins/org.eclipse.equinox.p2.core/pom.xml    |   14 +
 .../equinox/internal/p2/core/Activator.java        |   96 +-
 .../equinox/internal/p2/core/AgentLocation.java    |   35 +
 .../equinox/internal/p2/core/BasicLocation.java    |   98 -
 .../internal/p2/core/DefaultAgentProvider.java     |   46 +
 .../internal/p2/core/EventBusComponent.java        |   28 +
 .../internal/p2/core/ProvisioningAgent.java        |  188 +
 .../internal/p2/core/ProvisioningEventBus.java     |   37 +-
 .../equinox/internal/p2/core/StringPool.java       |   73 -
 .../internal/p2/core/helpers/CollectionUtils.java  |  263 +
 .../internal/p2/core/helpers/FileUtils.java        |   42 +-
 .../internal/p2/core/helpers/LogHelper.java        |    8 +-
 .../p2/core/helpers/OrderedProperties.java         |   88 +-
 .../internal/p2/core/helpers/QueryHelpers.java     |   51 -
 .../internal/p2/core/helpers/StringHelper.java     |    4 +-
 .../equinox/internal/p2/core/helpers/TarFile.java  |    6 +-
 .../equinox/internal/p2/core/helpers/Tracing.java  |    4 +
 .../equinox/internal/p2/core/helpers/URLUtil.java  |   40 +-
 .../provisional/p2/core/FormatException.java       |   24 -
 .../internal/provisional/p2/core/IServiceUI.java   |   71 -
 .../p2/core/IServiceUICheckUnsigned.java           |   24 -
 .../internal/provisional/p2/core/Messages.java     |  133 -
 .../provisional/p2/core/ProvisionException.java    |  133 -
 .../internal/provisional/p2/core/Version.java      |  502 --
 .../provisional/p2/core/VersionFormat.java         | 1245 ---
 .../provisional/p2/core/VersionFormatParser.java   |  528 --
 .../provisional/p2/core/VersionParser.java         |  364 -
 .../internal/provisional/p2/core/VersionRange.java |  498 --
 .../provisional/p2/core/VersionVector.java         |  367 -
 .../provisional/p2/core/VersionedName.java         |  118 -
 .../p2/core/location/AgentLocation.java            |   41 -
 .../provisional/p2/core/messages.properties        |   62 -
 .../internal/provisional/p2/query/Collector.java   |  136 -
 .../provisional/p2/query/CompositeQuery.java       |   64 -
 .../provisional/p2/query/CompoundQuery.java        |  218 -
 .../provisional/p2/query/CompoundQueryable.java    |   97 -
 .../provisional/p2/query/ContextQuery.java         |   61 -
 .../internal/provisional/p2/query/IMatchQuery.java |   58 -
 .../internal/provisional/p2/query/IQueryable.java  |   36 -
 .../internal/provisional/p2/query/MatchQuery.java  |  105 -
 .../internal/provisional/p2/query/Query.java       |   49 -
 .../eclipse/equinox/p2/core/IAgentLocation.java    |   44 +
 .../equinox/p2/core/IProvisioningAgent.java        |   93 +
 .../p2/core/IProvisioningAgentProvider.java        |   47 +
 .../equinox/p2/core/ProvisionException.java        |  134 +
 .../org/eclipse/equinox/p2/core/UIServices.java    |  137 +
 .../src/org/eclipse/equinox/p2/core/package.html   |   27 +
 .../eclipse/equinox/p2/core/spi/IAgentService.java |   38 +
 .../equinox/p2/core/spi/IAgentServiceFactory.java  |   39 +
 .../org/eclipse/equinox/p2/core/spi/package.html   |   20 +
 .../org.eclipse.equinox.p2.director.app/.classpath |    2 +-
 .../Build Director Ant Tasks.launch                |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   21 +-
 .../.settings/org.eclipse.jdt.launching.prefs      |    3 +
 .../META-INF/MANIFEST.MF                           |   44 +-
 .../build.properties                               |    2 +
 .../org.eclipse.equinox.p2.director.app/config.ini |    1 -
 .../director app.launch                            |   10 +-
 .../org.eclipse.equinox.p2.director.app/plugin.xml |    7 +
 .../org.eclipse.equinox.p2.director.app/pom.xml    |   14 +
 .../internal/p2/director/app/Application.java      |  274 +-
 .../p2/director/app/DirectorApplication.java       |  622 +-
 .../equinox/internal/p2/director/app/ILog.java     |   14 +
 .../equinox/internal/p2/director/app/Messages.java |   19 +-
 .../internal/p2/director/app/messages.properties   |   21 +-
 .../equinox/p2/director/app/ant/DirectorTask.java  |  265 +-
 .../org.eclipse.equinox.p2.director/.classpath     |    2 +-
 .../org.eclipse.equinox.p2.director/.project       |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   12 +-
 .../META-INF/MANIFEST.MF                           |   53 +-
 .../OSGI-INF/director.xml                          |    8 +
 .../OSGI-INF/planner.xml                           |    8 +
 .../build.properties                               |    7 +-
 .../org.eclipse.equinox.p2.director/pom.xml        |   14 +
 .../internal/p2/director/ApplicablePatchQuery.java |   47 +-
 .../internal/p2/director/AttachmentHelper.java     |   86 +-
 .../internal/p2/director/DirectorComponent.java    |   28 +
 .../equinox/internal/p2/director/Explanation.java  |  125 +-
 .../internal/p2/director/HasMatchCollector.java    |   30 -
 .../equinox/internal/p2/director/Messages.java     |    7 +
 .../internal/p2/director/OperationGenerator.java   |  155 +-
 .../internal/p2/director/PermissiveSlicer.java     |   19 +-
 .../internal/p2/director/PlannerComponent.java     |   24 +
 .../equinox/internal/p2/director/Projector.java    |  897 ++-
 .../internal/p2/director/QueryableArray.java       |  106 +-
 .../internal/p2/director/SimpleDirector.java       |   30 +-
 .../internal/p2/director/SimplePlanner.java        |  847 +-
 .../equinox/internal/p2/director/Slicer.java       |  178 +-
 .../equinox/internal/p2/director/TwoTierMap.java   |  354 -
 .../internal/p2/director/messages.properties       |    9 +-
 .../equinox/internal/p2/rollback/FormerState.java  |   96 +-
 .../provisional/p2/director/IDirector.java         |    9 +-
 .../internal/provisional/p2/director/IPlanner.java |   32 -
 .../p2/director/PlanExecutionHelper.java           |   12 +-
 .../provisional/p2/director/PlanVerifier.java      |   25 +
 .../provisional/p2/director/PlannerHelper.java     |   23 -
 .../provisional/p2/director/PlannerStatus.java     |  117 +
 .../p2/director/ProfileChangeRequest.java          |  243 +-
 .../provisional/p2/director/ProvisioningPlan.java  |  117 -
 .../provisional/p2/director/RequestStatus.java     |   39 +-
 .../org/eclipse/equinox/p2/planner/IPlanner.java   |   56 +
 .../equinox/p2/planner/IProfileChangeRequest.java  |  125 +
 .../equinox/p2/planner/ProfileInclusionRules.java  |   52 +
 .../org/eclipse/equinox/p2/planner/package.html    |   18 +
 .../.classpath                                     |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  594 +-
 .../META-INF/MANIFEST.MF                           |   41 +-
 .../build.properties                               |    2 +
 .../pom.xml                                        |   14 +
 .../provisional/p2/directorywatcher/Activator.java |    9 +-
 .../CachingArtifactRepository.java                 |  138 +-
 .../p2/directorywatcher/DirectoryWatcher.java      |   39 +-
 .../p2/directorywatcher/EntryAdvice.java           |   36 +-
 .../p2/directorywatcher/RepositoryListener.java    |  148 +-
 .../.classpath                                     |    0
 .../.gitignore                                     |    1 +
 .../.project                                       |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |  349 +
 .../.settings/org.eclipse.jdt.ui.prefs             |   57 +
 .../.settings/org.eclipse.mylyn.tasks.ui.prefs     |    4 +
 .../.settings/org.eclipse.mylyn.team.ui.prefs      |    3 +
 .../.settings/org.eclipse.pde.prefs                |   24 +
 .../META-INF/MANIFEST.MF                           |   16 +
 .../about.html                                     |   28 +
 .../build.properties                               |   22 +
 .../plugin.properties                              |   13 +
 .../plugin.xml                                     |   15 +
 .../pom.xml                                        |   14 +
 .../schema/connectorDiscovery.exsd                 |  434 +
 .../p2/discovery/compatibility/Activator.java      |   47 +
 .../compatibility/BundleDiscoverySource.java       |   41 +
 .../compatibility/BundleDiscoveryStrategy.java     |  104 +
 .../ConnectorDiscoveryExtensionReader.java         |  300 +
 .../p2/discovery/compatibility/Directory.java      |   70 +
 .../discovery/compatibility/DirectoryParser.java   |  129 +
 .../compatibility/DiscoveryRegistryStrategy.java   |  196 +
 .../compatibility/JarDiscoverySource.java          |   50 +
 .../p2/discovery/compatibility/Messages.java       |   97 +
 .../RemoteBundleDiscoveryStrategy.java             |  310 +
 .../p2/discovery/compatibility/SiteVerifier.java   |  131 +
 .../p2/discovery/compatibility/messages.properties |   43 +
 .../discovery/compatibility/util/CacheManager.java |  218 +
 .../compatibility/util/DefaultSaxErrorHandler.java |   35 +
 .../compatibility/util/IOWithCauseException.java   |   41 +
 .../compatibility/util/TransportUtil.java          |  150 +
 .../xsd/directory.xsd                              |   46 +
 .../org.eclipse.equinox.p2.discovery/.classpath    |   11 +
 .../org.eclipse.equinox.p2.discovery/.gitignore    |    1 +
 .../org.eclipse.equinox.p2.discovery/.project      |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |  349 +
 .../.settings/org.eclipse.jdt.ui.prefs             |   57 +
 .../org.eclipse.ltk.core.refactoring.prefs         |    3 +
 .../.settings/org.eclipse.mylyn.tasks.ui.prefs     |    4 +
 .../.settings/org.eclipse.mylyn.team.ui.prefs      |    3 +
 .../.settings/org.eclipse.pde.prefs                |   24 +
 .../META-INF/MANIFEST.MF                           |   13 +
 .../org.eclipse.equinox.p2.discovery/about.html    |   28 +
 .../build.properties                               |   17 +
 .../plugin.properties                              |   13 +
 .../org.eclipse.equinox.p2.discovery/pom.xml       |   14 +
 .../p2/discovery/AbstractCatalogSource.java        |   44 +
 .../p2/discovery/AbstractDiscoveryStrategy.java    |   76 +
 .../equinox/internal/p2/discovery/Catalog.java     |  318 +
 .../internal/p2/discovery/DiscoveryCore.java       |   40 +
 .../equinox/internal/p2/discovery/Messages.java    |   45 +
 .../equinox/internal/p2/discovery/Policy.java      |   42 +
 .../internal/p2/discovery/messages.properties      |   17 +
 .../p2/discovery/model/AbstractCatalogItem.java    |   29 +
 .../p2/discovery/model/CatalogCategory.java        |  152 +
 .../internal/p2/discovery/model/CatalogItem.java   |  366 +
 .../internal/p2/discovery/model/Certification.java |  102 +
 .../internal/p2/discovery/model/FeatureFilter.java |   69 +
 .../equinox/internal/p2/discovery/model/Group.java |   51 +
 .../equinox/internal/p2/discovery/model/Icon.java  |   74 +
 .../internal/p2/discovery/model/Messages.java      |   56 +
 .../internal/p2/discovery/model/Overview.java      |   85 +
 .../equinox/internal/p2/discovery/model/Tag.java   |  106 +
 .../p2/discovery/model/ValidationException.java    |   29 +
 .../p2/discovery/model/messages.properties         |   23 +
 .../discovery/util/CatalogCategoryComparator.java  |   50 +
 .../p2/discovery/util/CatalogItemComparator.java   |   71 +
 .../org.eclipse.equinox.p2.engine/.classpath       |    2 +-
 .../plugins/org.eclipse.equinox.p2.engine/.project |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../META-INF/MANIFEST.MF                           |   84 +-
 .../OSGI-INF/engine.xml                            |    8 +
 .../OSGI-INF/profileRegistry.xml                   |    8 +
 .../org.eclipse.equinox.p2.engine/build.properties |    5 +-
 .../plugins/org.eclipse.equinox.p2.engine/pom.xml  |   14 +
 .../schema/actions.exsd                            |   34 +-
 .../schema/touchpoints.exsd                        |   58 +-
 .../equinox/internal/p2/engine/ActionManager.java  |   21 +-
 .../internal/p2/engine/BeginOperationEvent.java    |   27 +
 .../internal/p2/engine/CommitOperationEvent.java   |   27 +
 .../equinox/internal/p2/engine/DebugHelper.java    |   49 +-
 .../internal/p2/engine/DownloadManager.java        |   97 +-
 .../eclipse/equinox/internal/p2/engine/Engine.java |  121 +
 .../internal/p2/engine/EngineActivator.java        |   42 +-
 .../internal/p2/engine/EngineComponent.java        |   32 +
 .../equinox/internal/p2/engine/EngineSession.java  |  401 +
 .../p2/engine/ISurrogateProfileHandler.java        |   33 +
 .../internal/p2/engine/InstallableUnitEvent.java   |   91 +
 .../internal/p2/engine/InstallableUnitOperand.java |   49 +
 .../internal/p2/engine/InstallableUnitPhase.java   |  122 +
 .../p2/engine/InstallableUnitPropertyOperand.java  |   46 +
 .../internal/p2/engine/InstructionParser.java      |   33 +-
 .../equinox/internal/p2/engine/Messages.java       |   90 +-
 .../equinox/internal/p2/engine/MissingAction.java  |   49 +
 .../p2/engine/MissingActionsException.java         |   52 +
 .../equinox/internal/p2/engine/Operand.java        |   21 +
 .../p2/engine/ParameterizedProvisioningAction.java |   27 +-
 .../eclipse/equinox/internal/p2/engine/Phase.java  |  325 +
 .../equinox/internal/p2/engine/PhaseSet.java       |  159 +
 .../equinox/internal/p2/engine/Profile.java        |  200 +-
 .../equinox/internal/p2/engine/ProfileEvent.java   |   67 +
 .../p2/engine/ProfileMetadataRepository.java       |   58 +-
 .../engine/ProfileMetadataRepositoryFactory.java   |   24 +-
 .../equinox/internal/p2/engine/ProfileParser.java  |   25 +-
 .../internal/p2/engine/ProfilePreferences.java     |  165 +-
 .../p2/engine/ProfileRegistryComponent.java        |   30 +
 .../equinox/internal/p2/engine/ProfileWriter.java  |   28 +-
 .../internal/p2/engine/ProfileXMLConstants.java    |   10 +-
 .../internal/p2/engine/PropertyOperand.java        |   55 +
 .../internal/p2/engine/ProvisioningPlan.java       |  150 +
 .../internal/p2/engine/RollbackOperationEvent.java |   34 +
 .../internal/p2/engine/SimpleProfileRegistry.java  |  264 +-
 .../equinox/internal/p2/engine/SizingPhaseSet.java |   38 +
 .../p2/engine/SurrogateProfileHandler.java         |  154 +-
 .../internal/p2/engine/TouchpointManager.java      |   18 +-
 .../internal/p2/engine/TransactionEvent.java       |   37 +
 .../equinox/internal/p2/engine/messages.properties |   59 +-
 .../p2/engine/phases/CertificateChecker.java       |  199 +
 .../internal/p2/engine/phases/CheckTrust.java      |   85 +
 .../equinox/internal/p2/engine/phases/Collect.java |   92 +
 .../internal/p2/engine/phases/Configure.java       |   57 +
 .../equinox/internal/p2/engine/phases/Install.java |  124 +
 .../internal/p2/engine/phases/Property.java        |  156 +
 .../equinox/internal/p2/engine/phases/Sizing.java  |  138 +
 .../internal/p2/engine/phases/Unconfigure.java     |   62 +
 .../internal/p2/engine/phases/Uninstall.java       |  124 +
 .../provisional/p2/engine/BeginOperationEvent.java |   20 -
 .../provisional/p2/engine/CertificateChecker.java  |  154 -
 .../p2/engine/CommitOperationEvent.java            |   20 -
 .../provisional/p2/engine/DefaultPhaseSet.java     |   63 -
 .../internal/provisional/p2/engine/Engine.java     |  108 -
 .../provisional/p2/engine/EngineSession.java       |  362 -
 .../internal/provisional/p2/engine/IEngine.java    |   23 -
 .../internal/provisional/p2/engine/IProfile.java   |  131 -
 .../provisional/p2/engine/IProfileRegistry.java    |  116 -
 .../p2/engine/ISurrogateProfileHandler.java        |   27 -
 .../p2/engine/IUProfilePropertyQuery.java          |   37 -
 .../p2/engine/InstallableUnitEvent.java            |   84 -
 .../p2/engine/InstallableUnitOperand.java          |   46 -
 .../p2/engine/InstallableUnitPhase.java            |  113 -
 .../p2/engine/InstallableUnitPropertyOperand.java  |   43 -
 .../internal/provisional/p2/engine/Memento.java    |   76 -
 .../internal/provisional/p2/engine/Messages.java   |   67 -
 .../provisional/p2/engine/MissingAction.java       |   45 -
 .../p2/engine/MissingActionsException.java         |   49 -
 .../internal/provisional/p2/engine/Operand.java    |   20 -
 .../internal/provisional/p2/engine/Phase.java      |  298 -
 .../internal/provisional/p2/engine/PhaseSet.java   |  151 -
 .../provisional/p2/engine/ProfileEvent.java        |   39 -
 .../provisional/p2/engine/ProfileScope.java        |   79 -
 .../provisional/p2/engine/PropertyOperand.java     |   52 -
 .../provisional/p2/engine/ProvisioningAction.java  |   37 -
 .../provisional/p2/engine/ProvisioningContext.java |   77 -
 .../p2/engine/RollbackOperationEvent.java          |   28 -
 .../internal/provisional/p2/engine/Touchpoint.java |   54 -
 .../provisional/p2/engine/TransactionEvent.java    |   31 -
 .../provisional/p2/engine/messages.properties      |   51 -
 .../provisional/p2/engine/phases/CheckTrust.java   |   78 -
 .../provisional/p2/engine/phases/Collect.java      |   80 -
 .../provisional/p2/engine/phases/Configure.java    |   52 -
 .../provisional/p2/engine/phases/Install.java      |  120 -
 .../provisional/p2/engine/phases/Messages.java     |   37 -
 .../provisional/p2/engine/phases/Property.java     |  157 -
 .../provisional/p2/engine/phases/Sizing.java       |  135 -
 .../provisional/p2/engine/phases/Unconfigure.java  |   57 -
 .../provisional/p2/engine/phases/Uninstall.java    |  119 -
 .../p2/engine/phases/messages.properties           |   20 -
 .../src/org/eclipse/equinox/p2/engine/IEngine.java |   70 +
 .../org/eclipse/equinox/p2/engine/IPhaseSet.java   |   28 +
 .../org/eclipse/equinox/p2/engine/IProfile.java    |  192 +
 .../eclipse/equinox/p2/engine/IProfileEvent.java   |   48 +
 .../equinox/p2/engine/IProfileRegistry.java        |  130 +
 .../equinox/p2/engine/IProvisioningPlan.java       |  176 +
 .../eclipse/equinox/p2/engine/ISizingPhaseSet.java |   23 +
 .../eclipse/equinox/p2/engine/PhaseSetFactory.java |  125 +
 .../eclipse/equinox/p2/engine/ProfileScope.java    |  100 +
 .../equinox/p2/engine/ProvisioningContext.java     |  390 +
 .../src/org/eclipse/equinox/p2/engine/package.html |   22 +
 .../p2/engine/query/IUProfilePropertyQuery.java    |   49 +
 .../p2/engine/query/UserVisibleRootQuery.java      |   40 +
 .../eclipse/equinox/p2/engine/query/package.html   |   17 +
 .../org/eclipse/equinox/p2/engine/spi/Memento.java |   79 +
 .../equinox/p2/engine/spi/ProvisioningAction.java  |   40 +
 .../eclipse/equinox/p2/engine/spi/Touchpoint.java  |  172 +
 .../org/eclipse/equinox/p2/engine/spi/package.html |   17 +
 .../.classpath                                     |    7 -
 .../org.eclipse.equinox.p2.exemplarysetup/.project |   34 -
 .../.settings/org.eclipse.jdt.core.prefs           |  339 -
 .../.settings/org.eclipse.jdt.ui.prefs             |   57 -
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   27 -
 .../build.properties                               |   17 -
 .../plugin.properties                              |   12 -
 .../internal/p2/exemplarysetup/Activator.java      |  152 -
 .../.classpath                                     |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../META-INF/MANIFEST.MF                           |   39 +-
 .../build.properties                               |    2 +
 .../pom.xml                                        |   14 +
 .../internal/p2/extensionlocation/Activator.java   |   37 +-
 .../BundlePoolFilteredListener.java                |   19 +-
 .../ExtensionLocationArtifactRepository.java       |   60 +-
 ...ExtensionLocationArtifactRepositoryFactory.java |   29 +-
 .../ExtensionLocationMetadataRepository.java       |   66 +-
 ...ExtensionLocationMetadataRepositoryFactory.java |   33 +-
 .../p2/extensionlocation/SiteListener.java         |   66 +-
 .../.classpath                                     |    4 +-
 .../.project                                       |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   16 +-
 .../META-INF/MANIFEST.MF                           |   35 +-
 .../OSGI-INF/garbagecollector.xml                  |    8 +
 .../build.properties                               |   17 +-
 .../pom.xml                                        |   14 +
 .../internal/p2/garbagecollector/Application.java  |   25 +-
 .../p2/garbagecollector/CoreGarbageCollector.java  |   42 +-
 .../internal/p2/garbagecollector/GCActivator.java  |   76 +-
 .../p2/garbagecollector/GarbageCollector.java      |  220 +-
 .../GarbageCollectorComponent.java                 |   28 +
 .../internal/p2/garbagecollector/MarkSet.java      |    4 +-
 .../p2/garbagecollector/MarkSetProvider.java       |    9 +-
 .../internal/p2/garbagecollector/Messages.java     |    3 +-
 .../p2/garbagecollector/messages.properties        |    3 +-
 .../org.eclipse.equinox.p2.installer/.classpath    |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   28 +-
 .../.settings/org.eclipse.jdt.launching.prefs      |    3 +
 .../.settings/org.eclipse.pde.api.tools.prefs      |   94 +
 .../.settings/org.eclipse.pde.prefs                |   31 +
 .../META-INF/MANIFEST.MF                           |   19 +-
 .../build.properties                               |    2 +
 .../installer.product                              |   24 +-
 .../org.eclipse.equinox.p2.installer/pom.xml       |   14 +
 .../internal/p2/installer/InstallApplication.java  |   33 +-
 .../p2/installer/InstallDescriptionParser.java     |   62 +-
 .../installer/InstallUpdateProductOperation.java   |   88 +-
 .../internal/p2/installer/InstallerActivator.java  |   30 +-
 .../equinox/internal/p2/installer/Messages.java    |   23 +-
 .../internal/p2/installer/messages.properties      |   23 +-
 .../internal/p2/installer/ui/InstallDialog.java    |   61 +-
 .../internal/p2/installer/ui/ProxiesDialog.java    |  312 +
 .../p2/installer/InstallDescription.java           |   14 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  619 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |   60 +-
 .../META-INF/MANIFEST.MF                           |    5 +-
 .../localbuild.xml                                 |    2 +
 .../org.eclipse.equinox.p2.jarprocessor/pom.xml    |   14 +
 .../internal/p2/jarprocessor/CommandStep.java      |   28 +-
 .../equinox/internal/p2/jarprocessor/PackStep.java |    6 +-
 .../internal/p2/jarprocessor/StreamProcessor.java  |   35 +-
 .../p2/jarprocessor/StreamProcessorJob.java        |   36 +
 .../equinox/internal/p2/jarprocessor/Utils.java    |    1 -
 .../internal/p2/jarprocessor/ZipProcessor.java     |   30 +-
 .../p2/jarprocessor/verifier/Verifier.java         |   58 +-
 .../p2/jarprocessor/verifier/VerifyStep.java       |    1 -
 .../equinox/p2/jarprocessor/JarProcessor.java      |  218 +-
 .../p2/jarprocessor/JarProcessorExecutor.java      |  139 +-
 .../ant/AntBasedProcessorExecutor.java             |   19 +-
 .../p2/jarprocessor/ant/JarProcessorTask.java      |    5 +-
 .../Build Metadata Generator Ant Tasks.launch      |    8 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   13 +-
 .../META-INF/MANIFEST.MF                           |   46 +-
 .../plugin.xml                                     |   13 -
 .../pom.xml                                        |   14 +
 .../generator/EclipseGeneratorApplication.java     |   90 +-
 .../p2/metadata/generator/ProductQuery.java        |   34 +-
 .../metadata/generator/features/SiteFeature.java   |    2 +-
 .../EclipseInstallGeneratorInfoProvider.java       |  144 +-
 .../p2/metadata/generator/FeatureEntry.java        |    2 +-
 .../p2/metadata/generator/Generator.java           |  123 +-
 .../p2/metadata/generator/GeneratorBundleInfo.java |    2 +-
 .../p2/metadata/generator/IGeneratorInfo.java      |    4 +-
 .../generator/MetadataGeneratorHelper.java         |  264 +-
 .../.classpath                                     |    2 +-
 ....p2.metadata.reposiroy buildAntTasks.xml.launch |    9 +-
 .../.project                                       |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../META-INF/MANIFEST.MF                           |   74 +-
 .../OSGI-INF/repositoryManager.xml                 |    8 +
 .../build.properties                               |    5 +-
 .../p2 tools - mirror metadata.launch              |   24 -
 .../plugin.xml                                     |   21 +-
 .../pom.xml                                        |   42 +
 .../schema/metadataRepositories.exsd               |   38 +-
 .../p2/metadata/mirror/MirrorApplication.java      |  175 -
 .../internal/p2/metadata/mirror/Mirroring.java     |   62 -
 .../internal/p2/metadata/mirror/RangeQuery.java    |   49 -
 .../p2/metadata/mirror/VersionRangedName.java      |   53 -
 .../internal/p2/metadata/repository/Activator.java |   61 +-
 .../p2/metadata/repository/CacheManager.java       |  420 -
 .../repository/CompositeMetadataRepository.java    |  202 +-
 .../CompositeMetadataRepositoryFactory.java        |   69 +-
 .../repository/LocalMetadataRepository.java        |  251 +-
 .../internal/p2/metadata/repository/Messages.java  |   11 +-
 .../repository/MetadataRepositoryComponent.java    |   26 +
 .../metadata/repository/MetadataRepositoryIO.java  |   91 +-
 .../repository/MetadataRepositoryManager.java      |  112 +-
 .../SimpleMetadataRepositoryFactory.java           |  147 +
 .../metadata/repository/URLMetadataRepository.java |   92 +-
 .../p2/metadata/repository/io/MetadataParser.java  |  416 +-
 .../p2/metadata/repository/io/MetadataWriter.java  |  271 +-
 .../p2/metadata/repository/io/XMLConstants.java    |   22 +-
 .../p2/metadata/repository/messages.properties     |    7 +-
 .../metadata/repository/IMetadataRepository.java   |   79 -
 .../repository/IMetadataRepositoryManager.java     |  155 -
 .../repository/AbstractMetadataRepository.java     |   72 -
 .../repository/MetadataRepositoryFactory.java      |  100 -
 .../metadata/repository/RepositoryReference.java   |   57 -
 .../SimpleMetadataRepositoryFactory.java           |  161 -
 .../metadata/repository/ant/AbstractMDRTask.java   |   31 +
 .../p2/metadata/repository/ant/AddChildTask.java   |   11 +-
 .../ant/CreateCompositeMetadataRepositoryTask.java |   18 +-
 .../repository/ant/MirrorApplicationTask.java      |  128 -
 .../metadata/repository/ant/RemoveChildTask.java   |   11 +-
 .../org.eclipse.equinox.p2.metadata/.classpath     |    4 +-
 .../org.eclipse.equinox.p2.metadata/.project       |    5 +
 .../.settings/.api_filters                         |   11 +
 .../.settings/org.eclipse.jdt.core.prefs           |   16 +-
 .../META-INF/MANIFEST.MF                           |   91 +-
 .../build.properties                               |    8 +-
 .../org.eclipse.equinox.p2.metadata/pom.xml        |   14 +
 .../equinox/internal/p2/metadata/ArtifactKey.java  |   34 +-
 .../equinox/internal/p2/metadata/BasicVersion.java |   83 +
 .../equinox/internal/p2/metadata/Copyright.java    |    3 +-
 .../internal/p2/metadata/IRequiredCapability.java  |   45 +
 .../equinox/internal/p2/metadata/IUMap.java        |  227 +
 .../internal/p2/metadata/InstallableUnit.java      |  230 +-
 .../p2/metadata/InstallableUnitFragment.java       |   26 +-
 .../internal/p2/metadata/InstallableUnitPatch.java |   50 +-
 .../equinox/internal/p2/metadata/License.java      |   17 +-
 .../equinox/internal/p2/metadata/Messages.java     |  148 +
 .../internal/p2/metadata/MetadataActivator.java    |   14 +-
 .../equinox/internal/p2/metadata/OSGiVersion.java  |  226 +
 .../equinox/internal/p2/metadata/OmniVersion.java  |  260 +
 .../internal/p2/metadata/ProvidedCapability.java   |   38 +-
 .../internal/p2/metadata/RequiredCapability.java   |  272 +-
 .../internal/p2/metadata/RequirementChange.java    |   46 +-
 .../p2/metadata/ResolvedInstallableUnit.java       |  164 +-
 .../internal/p2/metadata/TouchpointData.java       |   19 +-
 .../p2/metadata/TouchpointInstruction.java         |   21 +-
 .../internal/p2/metadata/TouchpointType.java       |    5 +-
 .../internal/p2/metadata/TranslationSupport.java   |  325 +
 .../internal/p2/metadata/UpdateDescriptor.java     |   39 +-
 .../internal/p2/metadata/VersionFormat.java        |  340 +
 .../internal/p2/metadata/VersionFormatParser.java  | 1548 ++++
 .../internal/p2/metadata/VersionParser.java        |  381 +
 .../internal/p2/metadata/VersionVector.java        |  337 +
 .../internal/p2/metadata/expression/All.java       |   42 +
 .../internal/p2/metadata/expression/And.java       |   50 +
 .../internal/p2/metadata/expression/Array.java     |   76 +
 .../p2/metadata/expression/Assignment.java         |   47 +
 .../internal/p2/metadata/expression/At.java        |   96 +
 .../internal/p2/metadata/expression/Binary.java    |  139 +
 .../p2/metadata/expression/BooleanFunction.java    |   39 +
 .../p2/metadata/expression/ClassFunction.java      |   39 +
 .../p2/metadata/expression/CoercingComparator.java |  392 +
 .../internal/p2/metadata/expression/Collect.java   |   66 +
 .../p2/metadata/expression/CollectionFilter.java   |  134 +
 .../internal/p2/metadata/expression/Compare.java   |   60 +
 .../p2/metadata/expression/CompoundIterator.java   |   84 +
 .../internal/p2/metadata/expression/Condition.java |   62 +
 .../p2/metadata/expression/ContextExpression.java  |   86 +
 .../expression/CurryedLambdaExpression.java        |   94 +
 .../internal/p2/metadata/expression/Equals.java    |   52 +
 .../p2/metadata/expression/EvaluationContext.java  |  157 +
 .../p2/metadata/expression/Everything.java         |   81 +
 .../internal/p2/metadata/expression/Exists.java    |   42 +
 .../p2/metadata/expression/Expression.java         |  490 +
 .../p2/metadata/expression/ExpressionFactory.java  |  293 +
 .../p2/metadata/expression/FilterFunction.java     |   35 +
 .../internal/p2/metadata/expression/First.java     |   43 +
 .../internal/p2/metadata/expression/Flatten.java   |   36 +
 .../internal/p2/metadata/expression/Function.java  |   77 +
 .../metadata/expression/IExpressionConstants.java  |   79 +
 .../metadata/expression/IRepeatableIterator.java   |   25 +
 .../internal/p2/metadata/expression/Intersect.java |   51 +
 .../p2/metadata/expression/LDAPApproximation.java  |   77 +
 .../p2/metadata/expression/LDAPFilter.java         |   74 +
 .../p2/metadata/expression/LambdaExpression.java   |   76 +
 .../internal/p2/metadata/expression/Latest.java    |   93 +
 .../internal/p2/metadata/expression/Limit.java     |   91 +
 .../internal/p2/metadata/expression/Literal.java   |  176 +
 .../p2/metadata/expression/MatchExpression.java    |   91 +
 .../metadata/expression/MatchIteratorFilter.java   |   71 +
 .../internal/p2/metadata/expression/Matches.java   |  144 +
 .../internal/p2/metadata/expression/Member.java    |  227 +
 .../p2/metadata/expression/MemberProvider.java     |  135 +
 .../internal/p2/metadata/expression/NAry.java      |   66 +
 .../internal/p2/metadata/expression/Not.java       |   48 +
 .../internal/p2/metadata/expression/Or.java        |   50 +
 .../internal/p2/metadata/expression/Parameter.java |   64 +
 .../internal/p2/metadata/expression/Pipe.java      |  171 +
 .../p2/metadata/expression/QueryResult.java        |  107 +
 .../p2/metadata/expression/RangeFunction.java      |   36 +
 .../p2/metadata/expression/RepeatableIterator.java |  184 +
 .../internal/p2/metadata/expression/Select.java    |   49 +
 .../p2/metadata/expression/SetFunction.java        |   36 +
 .../internal/p2/metadata/expression/Traverse.java  |   58 +
 .../internal/p2/metadata/expression/Unary.java     |   61 +
 .../metadata/expression/UnaryCollectionFilter.java |   42 +
 .../internal/p2/metadata/expression/Union.java     |   48 +
 .../internal/p2/metadata/expression/Unique.java    |   81 +
 .../internal/p2/metadata/expression/Variable.java  |   83 +
 .../p2/metadata/expression/VersionFunction.java    |   36 +
 .../p2/metadata/expression/WrappedIQuery.java      |   79 +
 .../expression/parser/ExpressionParser.java        |  631 ++
 .../expression/parser/LDAPFilterParser.java        |  283 +
 .../p2/metadata/expression/parser/QLParser.java    |  356 +
 .../p2/metadata/index/CapabilityIndex.java         |  204 +
 .../internal/p2/metadata/index/CompoundIndex.java  |   45 +
 .../internal/p2/metadata/index/IdIndex.java        |   46 +
 .../equinox/internal/p2/metadata/index/Index.java  |  149 +
 .../internal/p2/metadata/index/IndexProvider.java  |   23 +
 .../internal/p2/metadata/messages.properties       |   69 +
 .../internal/p2/metadata/query/UpdateQuery.java    |   46 +
 .../provisional/p2/metadata/IArtifactKey.java      |   50 -
 .../provisional/p2/metadata/ICopyright.java        |   38 -
 .../provisional/p2/metadata/IInstallableUnit.java  |  283 -
 .../p2/metadata/IInstallableUnitFragment.java      |   19 -
 .../p2/metadata/IInstallableUnitPatch.java         |   48 -
 .../internal/provisional/p2/metadata/ILicense.java |   60 -
 .../p2/metadata/IProvidedCapability.java           |   61 -
 .../p2/metadata/IRequiredCapability.java           |   88 -
 .../p2/metadata/IRequirementChange.java            |   35 -
 .../provisional/p2/metadata/ITouchpointData.java   |   50 -
 .../p2/metadata/ITouchpointInstruction.java        |   72 -
 .../provisional/p2/metadata/ITouchpointType.java   |   54 -
 .../provisional/p2/metadata/IUpdateDescriptor.java |   53 -
 .../provisional/p2/metadata/MetadataFactory.java   |  422 -
 .../p2/metadata/query/CapabilityQuery.java         |   62 -
 .../p2/metadata/query/IUPropertyQuery.java         |   51 -
 .../p2/metadata/query/InstallableUnitQuery.java    |   96 -
 .../p2/metadata/query/LatestIUVersionQuery.java    |   53 -
 .../provisional/p2/metadata/query/UpdateQuery.java |   40 -
 .../eclipse/equinox/p2/metadata/IArtifactKey.java  |   50 +
 .../eclipse/equinox/p2/metadata/ICopyright.java    |   39 +
 .../equinox/p2/metadata/IInstallableUnit.java      |  305 +
 .../p2/metadata/IInstallableUnitFragment.java      |   22 +
 .../equinox/p2/metadata/IInstallableUnitPatch.java |   52 +
 .../org/eclipse/equinox/p2/metadata/ILicense.java  |   58 +
 .../equinox/p2/metadata/IProvidedCapability.java   |   56 +
 .../eclipse/equinox/p2/metadata/IRequirement.java  |   84 +
 .../equinox/p2/metadata/IRequirementChange.java    |   53 +
 .../equinox/p2/metadata/ITouchpointData.java       |   51 +
 .../p2/metadata/ITouchpointInstruction.java        |   73 +
 .../equinox/p2/metadata/ITouchpointType.java       |   54 +
 .../equinox/p2/metadata/IUpdateDescriptor.java     |   53 +
 .../equinox/p2/metadata/IVersionFormat.java        |   50 +
 .../eclipse/equinox/p2/metadata/IVersionedId.java  |   33 +
 .../eclipse/equinox/p2/metadata/KeyWithLocale.java |   38 +
 .../equinox/p2/metadata/MetadataFactory.java       |  766 ++
 .../org/eclipse/equinox/p2/metadata/Version.java   |  198 +
 .../p2/metadata/VersionFormatException.java        |   25 +
 .../eclipse/equinox/p2/metadata/VersionRange.java  |  470 +
 .../eclipse/equinox/p2/metadata/VersionedId.java   |  111 +
 .../expression/ExpressionParseException.java       |   29 +
 .../p2/metadata/expression/ExpressionUtil.java     |  200 +
 .../p2/metadata/expression/IContextExpression.java |   59 +
 .../p2/metadata/expression/IEvaluationContext.java |   45 +
 .../p2/metadata/expression/IExpression.java        |   85 +
 .../p2/metadata/expression/IExpressionFactory.java |  400 +
 .../p2/metadata/expression/IExpressionParser.java  |   37 +
 .../p2/metadata/expression/IExpressionVisitor.java |   26 +
 .../p2/metadata/expression/IFilterExpression.java  |   48 +
 .../p2/metadata/expression/IMatchExpression.java   |   54 +
 .../p2/metadata/expression/IMemberProvider.java    |   31 +
 .../p2/metadata/expression/SimplePattern.java      |  205 +
 .../equinox/p2/metadata/expression/package.html    |   16 +
 .../eclipse/equinox/p2/metadata/index/IIndex.java  |   36 +
 .../equinox/p2/metadata/index/IIndexProvider.java  |   48 +
 .../equinox/p2/metadata/index/IQueryWithIndex.java |   32 +
 .../eclipse/equinox/p2/metadata/index/package.html |   18 +
 .../org/eclipse/equinox/p2/metadata/package.html   |   17 +
 .../eclipse/equinox/p2/query/CollectionResult.java |   57 +
 .../org/eclipse/equinox/p2/query/Collector.java    |  172 +
 .../equinox/p2/query/CompoundQueryable.java        |  167 +
 .../equinox/p2/query/ExpressionMatchQuery.java     |  102 +
 .../eclipse/equinox/p2/query/ExpressionQuery.java  |   87 +
 .../org/eclipse/equinox/p2/query/IMatchQuery.java  |   43 +
 .../src/org/eclipse/equinox/p2/query/IQuery.java   |   48 +
 .../org/eclipse/equinox/p2/query/IQueryResult.java |   57 +
 .../org/eclipse/equinox/p2/query/IQueryable.java   |   36 +
 .../org/eclipse/equinox/p2/query/MatchQuery.java   |  100 +
 .../org/eclipse/equinox/p2/query/QueryUtil.java    |  519 ++
 .../src/org/eclipse/equinox/p2/query/package.html  |   18 +
 .../.classpath                                     |    0
 .../org.eclipse.equinox.p2.operations/.project     |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |  329 +
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.core.prefs           |    0
 .../META-INF/MANIFEST.MF                           |   33 +
 .../about.html                                     |    0
 .../build.properties                               |   19 +
 .../plugin.properties                              |    0
 .../org.eclipse.equinox.p2.operations/pom.xml      |   14 +
 .../equinox/internal/p2/operations/Activator.java  |   34 +
 .../p2/operations/IFailedStatusEvaluator.java      |   25 +
 .../internal/p2/operations/IStatusCodes.java       |   51 +
 .../equinox/internal/p2/operations/Messages.java   |   76 +
 .../internal/p2/operations/PlanAnalyzer.java       |  163 +
 .../p2/operations/PlannerResolutionJob.java        |  123 +
 .../internal/p2/operations/ResolutionResult.java   |  125 +
 .../operations/SearchForUpdatesResolutionJob.java  |   54 +
 .../internal/p2/operations/messages.properties     |   44 +
 .../equinox/p2/operations/IProfileChangeJob.java   |   30 +
 .../equinox/p2/operations/InstallOperation.java    |  176 +
 .../p2/operations/ProfileChangeOperation.java      |  383 +
 .../p2/operations/ProfileModificationJob.java      |  115 +
 .../equinox/p2/operations/ProvisioningJob.java     |  227 +
 .../equinox/p2/operations/ProvisioningSession.java |  228 +
 .../equinox/p2/operations/RepositoryTracker.java   |  262 +
 .../equinox/p2/operations/UninstallOperation.java  |  106 +
 .../org/eclipse/equinox/p2/operations/Update.java  |   72 +
 .../equinox/p2/operations/UpdateOperation.java     |  343 +
 .../org/eclipse/equinox/p2/operations/package.html |   33 +
 .../org.eclipse.equinox.p2.publisher/.classpath    |    2 +-
 .../Build Publisher Ant Tasks.launch               |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   19 +-
 .../Eclipse install publisher.launch               |    6 +-
 .../META-INF/MANIFEST.MF                           |   80 +-
 .../build.properties                               |    5 +-
 .../org.eclipse.equinox.p2.publisher/plugin.xml    |   52 +-
 .../org.eclipse.equinox.p2.publisher/pom.xml       |   14 +
 .../equinox/internal/p2/publisher/Activator.java   |    6 +-
 .../internal/p2/publisher/FileSetDescriptor.java   |   23 +-
 .../equinox/internal/p2/publisher/Messages.java    |    6 +-
 .../internal/p2/publisher/QuotedTokenizer.java     |  138 +
 .../p2/publisher/SingleElementCollector.java       |   28 -
 .../compatibility/GeneratorApplication.java        |  137 +
 .../compatibility/IGeneratorConstants.java         |   54 +
 .../p2/publisher/eclipse/BrandingIron.java         |  102 +-
 .../internal/p2/publisher/eclipse/DataLoader.java  |  130 +-
 .../publisher/eclipse/ExecutablesDescriptor.java   |   30 +-
 .../publisher/eclipse/FeatureManifestParser.java   |    7 +-
 .../p2/publisher/eclipse/FeatureParser.java        |    8 +-
 .../p2/publisher/eclipse/GeneratorBundleInfo.java  |    4 +-
 .../p2/publisher/eclipse/IProductDescriptor.java   |   14 +-
 .../internal/p2/publisher/eclipse/ProductFile.java |   88 +-
 .../internal/p2/publisher/messages.properties      |    6 +-
 .../equinox/internal/p2/swt/tools/IconExe.java     | 6002 +++++++-------
 .../equinox/p2/publisher/AbstractAdvice.java       |    4 +-
 .../p2/publisher/AbstractPublisherAction.java      |  277 +-
 .../p2/publisher/AbstractPublisherApplication.java |  197 +-
 .../equinox/p2/publisher/IPublisherAdvice.java     |    2 +-
 .../equinox/p2/publisher/IPublisherInfo.java       |   15 +-
 .../equinox/p2/publisher/IPublisherResult.java     |   12 +-
 .../eclipse/equinox/p2/publisher/Publisher.java    |  149 +-
 .../equinox/p2/publisher/PublisherInfo.java        |   27 +-
 .../equinox/p2/publisher/PublisherResult.java      |  132 +-
 .../actions/IAdditionalInstallableUnitAdvice.java  |    5 +-
 .../p2/publisher/actions/ICapabilityAdvice.java    |   11 +-
 .../p2/publisher/actions/IFeatureRootAdvice.java   |   29 +
 .../p2/publisher/actions/IFilterAdvice.java        |    6 +-
 .../p2/publisher/actions/ILicenseAdvice.java       |    4 +-
 .../p2/publisher/actions/IPropertyAdvice.java      |   13 +-
 .../p2/publisher/actions/IRootIUAdvice.java        |    5 +-
 .../p2/publisher/actions/ITouchpointAdvice.java    |    2 +-
 .../p2/publisher/actions/IVersionAdvice.java       |    2 +-
 .../equinox/p2/publisher/actions/JREAction.java    |   53 +-
 .../p2/publisher/actions/MergeResultsAction.java   |    4 +-
 .../publisher/actions/QueryableFilterAdvice.java   |   28 +-
 .../p2/publisher/actions/RootFilesAction.java      |   61 +-
 .../equinox/p2/publisher/actions/RootIUAction.java |   52 +-
 .../equinox/p2/publisher/actions/RootIUAdvice.java |    6 +-
 .../actions/RootIUResultFilterAdvice.java          |   15 +-
 .../p2/publisher/actions/VersionAdvice.java        |   82 +-
 .../eclipse/AccumulateConfigDataAction.java        |   10 +-
 .../p2/publisher/eclipse/AdviceFileAdvice.java     |   78 +-
 .../p2/publisher/eclipse/AdviceFileParser.java     |  148 +-
 .../eclipse/ApplicationLauncherAction.java         |   58 +-
 .../p2/publisher/eclipse/BundleShapeAdvice.java    |    2 +-
 .../p2/publisher/eclipse/BundlesAction.java        |  282 +-
 .../equinox/p2/publisher/eclipse/ConfigAdvice.java |   11 +-
 .../p2/publisher/eclipse/ConfigCUsAction.java      |  135 +-
 .../p2/publisher/eclipse/DefaultCUsAction.java     |    3 +-
 .../p2/publisher/eclipse/EclipseInstallAction.java |   69 +-
 .../publisher/eclipse/EquinoxExecutableAction.java |  103 +-
 .../publisher/eclipse/EquinoxLauncherCUAction.java |   39 +-
 .../equinox/p2/publisher/eclipse/Feature.java      |   21 +-
 .../equinox/p2/publisher/eclipse/FeatureEntry.java |   19 +-
 .../p2/publisher/eclipse/FeaturesAction.java       |  397 +-
 .../FeaturesAndBundlesPublisherApplication.java    |   22 +-
 .../p2/publisher/eclipse/IBrandingAdvice.java      |    4 +-
 .../p2/publisher/eclipse/IConfigAdvice.java        |    6 +-
 .../eclipse/InstallPublisherApplication.java       |   41 +-
 .../p2/publisher/eclipse/ProductAction.java        |   35 +-
 .../p2/publisher/eclipse/ProductFileAdvice.java    |   85 +-
 .../eclipse/ProductPublisherApplication.java       |   22 +-
 .../equinox/p2/publisher/eclipse/URLEntry.java     |    1 +
 .../spi/p2/publisher/LocalizationHelper.java       |   40 +-
 .../equinox/spi/p2/publisher/PublisherHelper.java  |  154 +-
 .../p2/publisher/ant/AbstractPublishTask.java      |   54 +-
 .../ant/FeaturesAndBundlesPublisherTask.java       |   23 +-
 .../p2/publisher/ant/ProductPublisherTask.java     |   17 +-
 .../internal/p2/publisher/ant/PublisherTask.java   |   19 +-
 .../.classpath                                     |    0
 eclipse/plugins/org.eclipse.equinox.p2.ql/.project |   39 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |  347 +
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF |   15 +
 .../about.html                                     |    0
 .../org.eclipse.equinox.p2.ql/build.properties     |   20 +
 .../org.eclipse.equinox.p2.ql/model/p2ql.bnf       |   67 +
 .../org.eclipse.equinox.p2.ql/plugin.properties    |    8 +
 eclipse/plugins/org.eclipse.equinox.p2.ql/pom.xml  |   14 +
 .../org/eclipse/equinox/p2/ql/IQLExpression.java   |   22 +
 .../src/org/eclipse/equinox/p2/ql/IQLFactory.java  |   21 +
 .../src/org/eclipse/equinox/p2/ql/package.html     |   18 +
 .../.classpath                                     |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../Bootstrap.product                              |   16 +-
 .../META-INF/MANIFEST.MF                           |   41 +-
 .../build.properties                               |    5 +-
 .../config.ini                                     |   55 -
 .../pom.xml                                        |   14 +
 .../internal/p2/reconciler/dropins/Activator.java  |  205 +-
 .../dropins/DropinsRepositoryListener.java         |  105 +-
 .../internal/p2/reconciler/dropins/Messages.java   |    5 +-
 .../p2/reconciler/dropins/PlatformXmlListener.java |   65 +-
 .../p2/reconciler/dropins/ProfileSynchronizer.java |  597 +-
 .../p2/reconciler/dropins/messages.properties      |    6 +-
 .../.classpath                                     |    2 +-
 .../Build Repository Tools JARs.launch             |    6 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   18 +-
 .../META-INF/MANIFEST.MF                           |   54 +-
 .../build.properties                               |    5 +-
 .../plugin.xml                                     |  163 +-
 .../pom.xml                                        |   14 +
 ...lipse.equinox.p2.repository.tools.verifier.exsd |  109 +
 .../scripts/buildAntJARs.xml                       |    2 +
 .../internal/repository/comparator/Annotation.java |   90 -
 .../repository/comparator/AnnotationComponent.java |   60 -
 .../comparator/AnnotationComponentValue.java       |  277 -
 .../comparator/AnnotationDefaultAttribute.java     |   35 -
 .../comparator/AttributeNamesConstants.java        |  142 -
 .../repository/comparator/CharOperation.java       |  602 --
 .../repository/comparator/ClassFileAttribute.java  |   47 -
 .../repository/comparator/ClassFileReader.java     |  468 -
 .../repository/comparator/ClassFileStruct.java     |   82 -
 .../comparator/ClassFormatException.java           |   59 -
 .../repository/comparator/CodeAttribute.java       | 1114 ---
 .../repository/comparator/ConstantPool.java        |  104 -
 .../comparator/ConstantPoolConstant.java           |   39 -
 .../repository/comparator/ConstantPoolEntry.java   |  396 -
 .../comparator/ConstantValueAttribute.java         |   37 -
 .../comparator/DefaultBytecodeVisitor.java         | 2071 -----
 .../repository/comparator/Disassembler.java        | 1149 ---
 .../comparator/EnclosingMethodAttribute.java       |  101 -
 .../repository/comparator/ExceptionAttribute.java  |   61 -
 .../repository/comparator/ExceptionTableEntry.java |   70 -
 .../internal/repository/comparator/FieldInfo.java  |  170 -
 .../repository/comparator/IModifierConstants.java  |  104 -
 .../repository/comparator/IOpcodeMnemonics.java    |  220 -
 .../comparator/InnerClassesAttribute.java          |   56 -
 .../comparator/InnerClassesAttributeEntry.java     |  100 -
 .../repository/comparator/JarComparator.java       |  156 +-
 .../comparator/MD5ArtifactComparator.java          |   44 +
 .../internal/repository/comparator/Messages.java   |  107 -
 .../internal/repository/comparator/MethodInfo.java |  213 -
 .../repository/comparator/OpcodeStringValues.java  |  222 -
 .../repository/comparator/ParameterAnnotation.java |   63 -
 .../RuntimeInvisibleAnnotationsAttribute.java      |   56 -
 ...timeInvisibleParameterAnnotationsAttribute.java |   56 -
 .../RuntimeVisibleAnnotationsAttribute.java        |   56 -
 ...untimeVisibleParameterAnnotationsAttribute.java |   56 -
 .../internal/repository/comparator/Signature.java  | 1163 ---
 .../repository/comparator/SignatureAttribute.java  |   42 -
 .../repository/comparator/SourceFileAttribute.java |   49 -
 .../repository/comparator/TypeConstants.java       |  153 -
 .../p2/internal/repository/comparator/Utility.java |  689 --
 .../repository/comparator/java/Annotation.java     |   90 +
 .../comparator/java/AnnotationComponent.java       |   60 +
 .../comparator/java/AnnotationComponentValue.java  |  277 +
 .../java/AnnotationDefaultAttribute.java           |   35 +
 .../comparator/java/AttributeNamesConstants.java   |  142 +
 .../repository/comparator/java/CharOperation.java  |  602 ++
 .../comparator/java/ClassFileAttribute.java        |   47 +
 .../comparator/java/ClassFileReader.java           |  468 +
 .../comparator/java/ClassFileStruct.java           |   82 +
 .../comparator/java/ClassFormatException.java      |   59 +
 .../repository/comparator/java/CodeAttribute.java  | 1114 +++
 .../repository/comparator/java/ConstantPool.java   |  104 +
 .../comparator/java/ConstantPoolConstant.java      |   39 +
 .../comparator/java/ConstantPoolEntry.java         |  396 +
 .../comparator/java/ConstantValueAttribute.java    |   37 +
 .../comparator/java/DefaultBytecodeVisitor.java    | 2071 +++++
 .../repository/comparator/java/Disassembler.java   | 1167 +++
 .../comparator/java/EnclosingMethodAttribute.java  |  101 +
 .../comparator/java/ExceptionAttribute.java        |   61 +
 .../comparator/java/ExceptionTableEntry.java       |   70 +
 .../repository/comparator/java/FieldInfo.java      |  170 +
 .../comparator/java/IModifierConstants.java        |  104 +
 .../comparator/java/IOpcodeMnemonics.java          |  220 +
 .../comparator/java/InnerClassesAttribute.java     |   56 +
 .../java/InnerClassesAttributeEntry.java           |  100 +
 .../repository/comparator/java/Messages.java       |  126 +
 .../repository/comparator/java/MethodInfo.java     |  213 +
 .../comparator/java/OpcodeStringValues.java        |  222 +
 .../comparator/java/ParameterAnnotation.java       |   63 +
 .../java/RuntimeInvisibleAnnotationsAttribute.java |   56 +
 ...timeInvisibleParameterAnnotationsAttribute.java |   56 +
 .../java/RuntimeVisibleAnnotationsAttribute.java   |   56 +
 ...untimeVisibleParameterAnnotationsAttribute.java |   56 +
 .../repository/comparator/java/Signature.java      | 1163 +++
 .../comparator/java/SignatureAttribute.java        |   42 +
 .../comparator/java/SourceFileAttribute.java       |   49 +
 .../repository/comparator/java/TypeConstants.java  |  153 +
 .../repository/comparator/java/Utility.java        |  689 ++
 .../repository/comparator/java/messages.properties |  116 +
 .../repository/comparator/messages.properties      |   98 -
 .../repository/mirroring/FileMirrorLog.java        |  125 +
 .../repository/mirroring/IArtifactMirrorLog.java   |   26 +
 .../internal/repository/mirroring/Mirroring.java   |  309 +
 .../repository/mirroring/XMLMirrorLog.java         |  166 +
 .../repository/tools/AbstractApplication.java      |  149 +-
 .../p2/internal/repository/tools/Activator.java    |   53 +-
 .../tools/ArtifactRepositoryValidator.java         |   85 +
 .../tools/CompositeRepositoryApplication.java      |   66 +-
 .../p2/internal/repository/tools/Messages.java     |   23 +-
 .../repository/tools/MirrorApplication.java        |  237 +-
 .../tools/RecreateRepositoryApplication.java       |   72 +-
 .../internal/repository/tools/Repo2Runnable.java   |  126 +-
 .../repository/tools/RepositoryAnalyzer.java       |   75 +
 .../tools/RepositoryAnalyzerApplication.java       |   86 +
 .../repository/tools/RepositoryDescriptor.java     |   11 +-
 .../internal/repository/tools/SlicingOptions.java  |   21 +-
 .../tools/analyzer/CopyrightAnalyzer.java          |   44 +
 .../tools/analyzer/HostCheckAnalyzer.java          |   55 +
 .../repository/tools/analyzer/IUCounting.java      |   58 +
 .../repository/tools/analyzer/LicenseAnalyzer.java |   52 +
 .../tools/analyzer/UniqueIUAnalyzer.java           |   38 +
 .../tools/analyzer/UnzipFeatureJarAnalyzer.java    |   46 +
 .../repository/tools/analyzer/VersionAnalyzer.java |   53 +
 .../internal/repository/tools/messages.properties  |   28 +-
 .../p2/repository/tools/analyzer/IIUAnalyzer.java  |   38 +
 .../p2/repository/tools/analyzer/IUAnalyzer.java   |   47 +
 .../comparator/ArtifactComparatorFactory.java      |   55 +
 .../tools/comparator/IArtifactComparator.java      |   38 +
 .../tools/tasks/AbstractRepositoryTask.java        |   74 +-
 .../repository/tools/tasks/AntMirrorLog.java       |  106 +
 .../tools/tasks/ArtifactDescription.java           |   75 +
 .../tools/tasks/ComparatorDescription.java         |   18 +-
 .../tools/tasks/CompositeRepositoryTask.java       |   48 +-
 .../CreateCompositeArtifactRepositoryTask.java     |  118 +
 .../repository/tools/tasks/ElementList.java        |   29 +
 .../repository/tools/tasks/IUDescription.java      |   59 +-
 .../tools/tasks/MirrorArtifactsTask.java           |  181 +
 .../repository/tools/tasks/MirrorMetadataTask.java |   95 +
 .../repository/tools/tasks/MirrorTask.java         |   32 +-
 .../repository/tools/tasks/ProcessRepoTask.java    |   15 +-
 .../repository/tools/tasks/RemoveIUTask.java       |  128 +
 .../repository/tools/tasks/Repo2RunnableTask.java  |   22 +-
 .../repository/tools/tasks/RepositoryFileSet.java  |   14 +-
 .../repository/tools/tasks/RepositoryList.java     |    9 +-
 .../repository/tools/tasks/SlicingOption.java      |   12 +-
 .../repository/tools/tasks/TaskHelper.java         |   13 +-
 .../repository/tools/tasks/ValidateTask.java       |   71 +
 .../org.eclipse.equinox.p2.repository/.classpath   |    2 +-
 .../org.eclipse.equinox.p2.repository/.project     |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   67 +-
 .../OSGI-INF/cacheManager.xml                      |    8 +
 .../build.properties                               |   17 +-
 .../org.eclipse.equinox.p2.repository/pom.xml      |   14 +
 .../internal/p2/persistence/CompositeParser.java   |   28 +-
 .../p2/persistence/CompositeRepositoryIO.java      |    3 +-
 .../p2/persistence/CompositeRepositoryState.java   |    6 +-
 .../internal/p2/persistence/CompositeWriter.java   |    5 +-
 .../internal/p2/persistence/XMLConstants.java      |    4 +
 .../equinox/internal/p2/persistence/XMLParser.java |   24 +-
 .../equinox/internal/p2/persistence/XMLWriter.java |   19 +-
 .../equinox/internal/p2/repository/Activator.java  |   21 +-
 .../internal/p2/repository/CacheManager.java       |  359 +
 .../p2/repository/CacheManagerComponent.java       |   27 +
 .../internal/p2/repository/Credentials.java        |  452 +-
 .../equinox/internal/p2/repository/FileReader.java |   29 +-
 .../repository/JREHttpClientRequiredException.java |   13 +-
 .../equinox/internal/p2/repository/Messages.java   |   10 +-
 .../internal/p2/repository/ProgressStatistics.java |   39 +-
 .../internal/p2/repository/RepositoryStatus.java   |    3 +-
 .../p2/repository/RepositoryStatusHelper.java      |    5 +-
 .../p2/repository/RepositoryTransport.java         |   11 +-
 .../helpers/AbstractRepositoryManager.java         |  354 +-
 .../p2/repository/helpers/DebugHelper.java         |  124 +
 .../p2/repository/helpers/LocationProperties.java  |  210 +
 .../p2/repository/helpers/RepositoryHelper.java    |    4 +-
 .../internal/p2/repository/messages.properties     |   10 +-
 .../p2/repository/ICompositeRepository.java        |   41 -
 .../provisional/p2/repository/IRepository.java     |  188 -
 .../p2/repository/IRepositoryManager.java          |  211 -
 .../p2/repository/RepositoryCreationException.java |   21 -
 .../provisional/p2/repository/RepositoryEvent.java |   41 +-
 .../spi/p2/repository/AbstractRepository.java      |  135 -
 .../p2/repository/ICompositeRepository.java        |   57 +
 .../eclipse/equinox/p2/repository/IRepository.java |  207 +
 .../equinox/p2/repository/IRepositoryManager.java  |  246 +
 .../p2/repository/IRepositoryReference.java        |   47 +
 .../p2/repository/IRunnableWithProgress.java       |   32 +
 .../artifact/ArtifactDescriptorQuery.java          |   98 +
 .../p2/repository/artifact/ArtifactKeyQuery.java   |   80 +
 .../repository/artifact/IArtifactDescriptor.java   |  112 +
 .../repository/artifact/IArtifactRepository.java   |  183 +
 .../artifact/IArtifactRepositoryManager.java       |  157 +
 .../p2/repository/artifact/IArtifactRequest.java   |   53 +
 .../artifact/IFileArtifactRepository.java          |   40 +
 .../artifact/IProcessingStepDescriptor.java        |   54 +
 .../equinox/p2/repository/artifact/package.html    |   17 +
 .../artifact/spi/AbstractArtifactRepository.java   |  108 +
 .../artifact/spi/ArtifactDescriptor.java           |  175 +
 .../artifact/spi/ArtifactRepositoryFactory.java    |   99 +
 .../artifact/spi/ProcessingStepDescriptor.java     |  104 +
 .../p2/repository/artifact/spi/package.html        |   17 +
 .../repository/metadata/IMetadataRepository.java   |   84 +
 .../metadata/IMetadataRepositoryManager.java       |  145 +
 .../equinox/p2/repository/metadata/package.html    |   17 +
 .../metadata/spi/AbstractMetadataRepository.java   |  154 +
 .../metadata/spi/MetadataRepositoryFactory.java    |   94 +
 .../p2/repository/metadata/spi/package.html        |   17 +
 .../org/eclipse/equinox/p2/repository/package.html |   20 +
 .../p2/repository/spi/AbstractRepository.java      |  229 +
 .../p2/repository/spi/RepositoryReference.java     |  115 +
 .../eclipse/equinox/p2/repository/spi/package.html |   17 +
 .../plugins/org.eclipse.equinox.p2.tools/.project  |   34 -
 .../.settings/org.eclipse.jdt.core.prefs           |  343 -
 .../.settings/org.eclipse.jdt.ui.prefs             |   57 -
 .../.settings/org.eclipse.pde.core.prefs           |    4 -
 .../META-INF/MANIFEST.MF                           |   37 -
 .../org.eclipse.equinox.p2.tools/build.properties  |   18 -
 .../p2 tools - compare metadata.launch             |   24 -
 .../p2 tools - file server.launch                  |   24 -
 .../p2 tools - mirror.launch                       |   24 -
 .../org.eclipse.equinox.p2.tools/plugin.properties |   12 -
 .../org.eclipse.equinox.p2.tools/plugin.xml        |   22 -
 .../equinox/internal/p2/tools/Activator.java       |   29 -
 .../internal/p2/tools/FileServerApplication.java   |   94 -
 .../p2/tools/MetadataCompareApplication.java       |  238 -
 .../p2/tools/UpdateCheckerApplication.java         |  117 -
 .../p2/tools/mirror/MirrorApplication.java         |  150 -
 .../internal/p2/tools/mirror/RangeQuery.java       |   49 -
 .../p2/tools/mirror/RepositoryMirroring.java       |  254 -
 .../p2/tools/mirror/VersionRangedName.java         |   51 -
 .../updatechecker app.launch                       |   24 -
 .../.classpath                                     |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../META-INF/MANIFEST.MF                           |   49 +-
 .../build.properties                               |    2 +
 .../plugin.xml                                     |    2 +
 .../pom.xml                                        |   14 +
 .../eclipse/AggregatedBundleRepository.java        |   60 +-
 .../p2/touchpoint/eclipse/DirectorUtil.java        |   15 +-
 .../touchpoint/eclipse/EclipseMarkSetProvider.java |   97 +-
 .../p2/touchpoint/eclipse/EclipseTouchpoint.java   |   85 +-
 .../p2/touchpoint/eclipse/LazyManipulator.java     |   19 +-
 .../internal/p2/touchpoint/eclipse/Messages.java   |    1 +
 .../eclipse/PlatformConfigurationWrapper.java      |   34 +-
 .../p2/touchpoint/eclipse/PublisherUtil.java       |    6 +-
 .../p2/touchpoint/eclipse/SourceManipulator.java   |   25 +-
 .../internal/p2/touchpoint/eclipse/Util.java       |  210 +-
 .../p2/touchpoint/eclipse/WhatIsRunning.java       |    4 +-
 .../eclipse/actions/ActionConstants.java           |    5 +-
 .../eclipse/actions/AddJVMArgumentAction.java      |   25 +-
 .../eclipse/actions/AddProgramArgumentAction.java  |   33 +-
 .../eclipse/actions/AddRepositoryAction.java       |   36 +-
 .../eclipse/actions/AddSourceBundleAction.java     |   29 +-
 .../eclipse/actions/CheckTrustAction.java          |   29 +-
 .../p2/touchpoint/eclipse/actions/ChmodAction.java |   37 +-
 .../touchpoint/eclipse/actions/CollectAction.java  |   59 +-
 .../eclipse/actions/InstallBundleAction.java       |   43 +-
 .../eclipse/actions/InstallFeatureAction.java      |   29 +-
 .../p2/touchpoint/eclipse/actions/LinkAction.java  |   32 +-
 .../eclipse/actions/MarkStartedAction.java         |   48 +-
 .../eclipse/actions/RemoveJVMArgumentAction.java   |    8 +-
 .../actions/RemoveProgramArgumentAction.java       |   10 +-
 .../eclipse/actions/RemoveRepositoryAction.java    |   36 +-
 .../eclipse/actions/RemoveSourceBundleAction.java  |   29 +-
 .../eclipse/actions/RepositoryAction.java          |   69 +-
 .../eclipse/actions/SetLauncherNameAction.java     |   18 +-
 .../eclipse/actions/SetProgramPropertyAction.java  |   29 +-
 .../eclipse/actions/SetStartLevelAction.java       |   48 +-
 .../eclipse/actions/UninstallBundleAction.java     |   42 +-
 .../eclipse/actions/UninstallFeatureAction.java    |   23 +-
 .../p2/touchpoint/eclipse/messages.properties      |    1 +
 .../equinox/internal/p2/update/Configuration.java  |   14 +-
 .../internal/p2/update/ConfigurationCache.java     |   70 +
 .../internal/p2/update/ConfigurationIO.java        |   74 +
 .../internal/p2/update/ConfigurationParser.java    |   52 +-
 .../internal/p2/update/ConfigurationWriter.java    |   38 +-
 .../equinox/internal/p2/update/PathUtil.java       |   18 +-
 .../eclipse/equinox/internal/p2/update/Site.java   |   22 +-
 .../equinox/internal/p2/update/XMLWriter.java      |   12 +-
 .../touchpoint/eclipse/query/OSGiBundleQuery.java  |   39 +
 .../p2/touchpoint/eclipse/query/package.html       |   18 +
 .../.classpath                                     |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   16 +-
 .../META-INF/MANIFEST.MF                           |   35 +-
 .../build.properties                               |    2 +
 .../plugin.xml                                     |    2 +
 .../pom.xml                                        |   14 +
 .../p2/touchpoint/natives/BackupStore.java         |   29 +-
 .../p2/touchpoint/natives/NativeTouchpoint.java    |   38 +-
 .../internal/p2/touchpoint/natives/Util.java       |   38 +-
 .../natives/actions/ActionConstants.java           |    4 +-
 .../p2/touchpoint/natives/actions/ChmodAction.java |   11 +-
 .../natives/actions/CleanupcopyAction.java         |   17 +-
 .../natives/actions/CleanupzipAction.java          |   48 +-
 .../touchpoint/natives/actions/CollectAction.java  |   38 +-
 .../p2/touchpoint/natives/actions/CopyAction.java  |   44 +-
 .../p2/touchpoint/natives/actions/LinkAction.java  |   11 +-
 .../p2/touchpoint/natives/actions/MkdirAction.java |    6 +-
 .../touchpoint/natives/actions/RemoveAction.java   |    8 +-
 .../p2/touchpoint/natives/actions/RmdirAction.java |   16 +-
 .../p2/touchpoint/natives/actions/UnzipAction.java |   36 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../ProvAdminUI.launch                             |  507 +-
 .../org.eclipse.equinox.p2.ui.admin.rcp/config.ini |    1 -
 .../plugin.properties                              |    2 +-
 .../org.eclipse.equinox.p2.ui.admin.rcp/pom.xml    |   14 +
 .../rcp.product                                    |   52 +-
 .../ui/admin/rcp/ApplicationWorkbenchAdvisor.java  |    6 +-
 .../org.eclipse.equinox.p2.ui.admin/.classpath     |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   16 +-
 .../META-INF/MANIFEST.MF                           |   49 +-
 .../build.properties                               |    5 +-
 .../org.eclipse.equinox.p2.ui.admin/plugin.xml     |    8 +-
 .../org.eclipse.equinox.p2.ui.admin/pom.xml        |   14 +
 .../ui/admin/AddArtifactRepositoryOperation.java   |   46 -
 .../ui/admin/AddMetadataRepositoryOperation.java   |   46 -
 .../internal/p2/ui/admin/AddProfileJob.java        |   43 +
 .../p2/ui/admin/ArtifactRepositoriesView.java      |   40 +-
 .../p2/ui/admin/ArtifactRepositoryTracker.java     |   85 +
 .../p2/ui/admin/MetadataRepositoriesView.java      |   77 +-
 .../p2/ui/admin/MetadataRepositoryTracker.java     |   86 +
 .../internal/p2/ui/admin/ProfileFactory.java       |   79 +
 .../equinox/internal/p2/ui/admin/ProfilesView.java |   88 +-
 .../internal/p2/ui/admin/ProvAdminUIActivator.java |  107 +-
 .../internal/p2/ui/admin/ProvAdminUIMessages.java  |    9 -
 .../equinox/internal/p2/ui/admin/ProvView.java     |   50 +-
 .../RefreshArtifactRepositoriesOperation.java      |   50 -
 .../RefreshMetadataRepositoriesOperation.java      |   52 -
 .../admin/RemoveArtifactRepositoryOperation.java   |   38 -
 .../admin/RemoveMetadataRepositoryOperation.java   |   38 -
 .../internal/p2/ui/admin/RemoveProfilesJob.java    |   37 +
 .../internal/p2/ui/admin/RepositoriesView.java     |   64 +-
 .../admin/dialogs/AddArtifactRepositoryDialog.java |  109 +-
 .../admin/dialogs/AddMetadataRepositoryDialog.java |   23 +-
 .../p2/ui/admin/dialogs/AddProfileDialog.java      |   17 +-
 .../internal/p2/ui/admin/dialogs/IUGroup.java      |    6 +-
 .../p2/ui/admin/dialogs/IUImplementationGroup.java |   39 +-
 .../dialogs/IUImplementationPropertyPage.java      |    6 +-
 .../ui/admin/dialogs/IUProfilePropertiesGroup.java |   20 +-
 .../p2/ui/admin/dialogs/IUPropertiesGroup.java     |    5 +-
 .../ui/admin/dialogs/InstalledIUPropertyPage.java  |    2 +-
 .../internal/p2/ui/admin/dialogs/ProfileGroup.java |   21 +-
 .../p2/ui/admin/dialogs/ProfilePropertyPage.java   |    6 +-
 .../RepositoryImplementationPropertyPage.java      |   21 +-
 .../internal/p2/ui/admin/messages.properties       |    9 -
 .../.classpath                                     |    0
 .../org.eclipse.equinox.p2.ui.discovery/.gitignore |    1 +
 .../org.eclipse.equinox.p2.ui.discovery/.project   |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |  349 +
 .../.settings/org.eclipse.jdt.ui.prefs             |   57 +
 .../.settings/org.eclipse.mylyn.tasks.ui.prefs     |    4 +
 .../.settings/org.eclipse.mylyn.team.ui.prefs      |    3 +
 .../.settings/org.eclipse.pde.prefs                |   24 +
 .../META-INF/MANIFEST.MF                           |   27 +
 .../org.eclipse.equinox.p2.ui.discovery/about.html |   28 +
 .../build.properties                               |   19 +
 .../icons/etool16/find.png                         |  Bin 0 -> 380 bytes
 .../icons/obj16}/iu_disabled_obj.gif               |  Bin 237 -> 237 bytes
 .../icons/obj16}/iu_obj.gif                        |  Bin 585 -> 585 bytes
 .../icons/obj16}/iu_update_obj.gif                 |  Bin 332 -> 332 bytes
 .../icons/obj16}/message_info.gif                  |  Bin 267 -> 267 bytes
 .../icons/ovr32}/message_warning.gif               |  Bin 591 -> 591 bytes
 .../icons/wizban/banner-discovery.png              |  Bin 0 -> 4291 bytes
 .../plugin.properties                              |   13 +
 .../org.eclipse.equinox.p2.ui.discovery/plugin.xml |   51 +
 .../org.eclipse.equinox.p2.ui.discovery/pom.xml    |   14 +
 .../internal/p2/ui/discovery/DiscoveryImages.java  |  100 +
 .../internal/p2/ui/discovery/DiscoveryUi.java      |   63 +
 .../p2/ui/discovery/commands/Messages.java         |   33 +
 .../commands/ShowBundleCatalogCommandHandler.java  |   82 +
 .../ShowRepositoryCatalogCommandHandler.java       |   65 +
 .../p2/ui/discovery/commands/messages.properties   |    2 +
 .../operations/DiscoveryInstallOperation.java      |  295 +
 .../repository/RepositoryDiscoveryStrategy.java    |  205 +
 .../ui/discovery/repository/RepositorySource.java  |   39 +
 .../p2/ui/discovery/util/CommonColors.java         |  186 +
 .../p2/ui/discovery/util/ControlListItem.java      |  279 +
 .../p2/ui/discovery/util/ControlListViewer.java    |  499 ++
 .../p2/ui/discovery/util/FilteredViewer.java       |  245 +
 .../p2/ui/discovery/util/GradientCanvas.java       |  334 +
 .../p2/ui/discovery/util/GradientToolTip.java      |   78 +
 .../internal/p2/ui/discovery/util/Messages.java    |   40 +
 .../p2/ui/discovery/util/PatternFilter.java        |  340 +
 .../discovery/util/SelectionProviderAdapter.java   |   75 +
 .../p2/ui/discovery/util/TextSearchControl.java    |  416 +
 .../p2/ui/discovery/util/WorkbenchUtil.java        |  206 +
 .../p2/ui/discovery/util/messages.properties       |   14 +
 .../discovery/wizards/AbstractDiscoveryItem.java   |  105 +
 .../ui/discovery/wizards/CatalogConfiguration.java |  110 +
 .../p2/ui/discovery/wizards/CatalogFilter.java     |   23 +
 .../p2/ui/discovery/wizards/CatalogPage.java       |  106 +
 .../p2/ui/discovery/wizards/CatalogViewer.java     |  621 ++
 .../p2/ui/discovery/wizards/CategoryItem.java      |   88 +
 .../p2/ui/discovery/wizards/DiscoveryItem.java     |  246 +
 .../ui/discovery/wizards/DiscoveryResources.java   |  122 +
 .../p2/ui/discovery/wizards/DiscoveryWizard.java   |   76 +
 .../internal/p2/ui/discovery/wizards/Messages.java |   86 +
 .../p2/ui/discovery/wizards/OverviewToolTip.java   |  194 +
 .../p2/ui/discovery/wizards/messages.properties    |   39 +
 .../.classpath                                     |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   15 +-
 .../META-INF/MANIFEST.MF                           |   48 +-
 .../build.properties                               |    3 +
 .../icons/tool/close.gif                           |  Bin 73 -> 73 bytes
 .../icons/tool/close_hot.gif                       |  Bin 852 -> 852 bytes
 .../icons/tool/update.gif                          |  Bin 600 -> 600 bytes
 .../icons/tool/update_problems.gif                 |  Bin 1005 -> 1005 bytes
 .../pom.xml                                        |   14 +
 .../p2/ui/sdk/scheduler/AutomaticUpdateAction.java |  157 -
 .../ui/sdk/scheduler/AutomaticUpdateMessages.java  |    5 +-
 .../p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java |  106 +-
 .../ui/sdk/scheduler/AutomaticUpdateScheduler.java |   87 +-
 .../p2/ui/sdk/scheduler/AutomaticUpdater.java      |  499 +-
 .../p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java |    5 +-
 .../scheduler/AutomaticUpdatesPreferencePage.java  |  147 +-
 .../p2/ui/sdk/scheduler/PreferenceInitializer.java |   36 +-
 .../p2/ui/sdk/scheduler/messages.properties        |    7 +-
 .../org.eclipse.equinox.p2.ui.sdk/.classpath       |    4 +-
 .../.settings/.api_filters                         |   19 +
 .../.settings/org.eclipse.jdt.core.prefs           |   15 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |    2 +-
 .../META-INF/MANIFEST.MF                           |   50 +-
 .../OSGI-INF/licenseManager_component.xml          |    7 +
 .../OSGI-INF/policy_component.xml                  |    2 +-
 .../org.eclipse.equinox.p2.ui.sdk/build.properties |    2 +
 .../plugin.properties                              |    3 -
 .../org.eclipse.equinox.p2.ui.sdk/plugin.xml       |   41 +-
 .../plugins/org.eclipse.equinox.p2.ui.sdk/pom.xml  |   14 +
 .../p2/ui/sdk/InstallNewSoftwareHandler.java       |   38 +-
 .../p2/ui/sdk/PreloadingRepositoryHandler.java     |   93 +-
 .../internal/p2/ui/sdk/ProvSDKMessages.java        |    9 +-
 .../internal/p2/ui/sdk/ProvSDKUIActivator.java     |  124 +-
 .../p2/ui/sdk/RevertProfilePageWithCompare.java    |  230 +
 .../equinox/internal/p2/ui/sdk/SDKPolicy.java      |  102 +-
 .../internal/p2/ui/sdk/SimpleLicenseManager.java   |   92 +
 .../equinox/internal/p2/ui/sdk/UpdateHandler.java  |   83 +-
 .../equinox/internal/p2/ui/sdk/messages.properties |   14 +-
 .../p2/ui/sdk/prefs/PreferenceConstants.java       |    3 +-
 .../p2/ui/sdk/prefs/PreferenceInitializer.java     |   24 +-
 .../plugins/org.eclipse.equinox.p2.ui/.classpath   |    4 +-
 eclipse/plugins/org.eclipse.equinox.p2.ui/.project |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |   15 +-
 .../org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF |  103 +-
 .../OSGI-INF/repositoryTracker_component.xml       |    7 +
 .../OSGI-INF/serviceui.xml                         |    8 +
 .../org.eclipse.equinox.p2.ui/build.properties     |    5 +-
 .../org.eclipse.equinox.p2.ui/plugin.properties    |    4 +
 .../plugins/org.eclipse.equinox.p2.ui/plugin.xml   |   47 +-
 eclipse/plugins/org.eclipse.equinox.p2.ui/pom.xml  |   14 +
 .../internal/p2/ui/BatchChangeBeginningEvent.java  |   36 -
 .../internal/p2/ui/BatchChangeCompleteEvent.java   |   41 -
 .../internal/p2/ui/ColocatedRepositoryTracker.java |  232 +
 .../p2/ui/DefaultMetadataURLValidator.java         |   85 -
 .../internal/p2/ui/DefaultQueryProvider.java       |  191 -
 .../internal/p2/ui/ElementQueryDescriptor.java     |   81 +
 .../equinox/internal/p2/ui/ElementWrapper.java     |   58 +
 .../internal/p2/ui/IProvHelpContextIds.java        |   44 +
 .../equinox/internal/p2/ui/PlanAnalyzer.java       |  179 -
 .../org/eclipse/equinox/internal/p2/ui/ProvUI.java |  303 +
 .../equinox/internal/p2/ui/ProvUIActivator.java    |  105 +-
 .../internal/p2/ui/ProvUIAdapterFactory.java       |   17 +-
 .../equinox/internal/p2/ui/ProvUIImages.java       |   75 +
 .../equinox/internal/p2/ui/ProvUIMessages.java     |   93 +-
 .../internal/p2/ui/ProvUIProvisioningListener.java |  236 +
 .../p2/ui/ProvisioningOperationRunner.java         |  146 +
 .../equinox/internal/p2/ui/QueryProvider.java      |  192 +
 .../p2/ui/QueryableArtifactRepositoryManager.java  |   56 +
 .../p2/ui/QueryableMetadataRepositoryManager.java  |   55 +
 .../internal/p2/ui/QueryableRepositoryManager.java |  177 +
 .../internal/p2/ui/RepositoryLocationQuery.java    |   29 +
 .../p2/ui/RepositoryOperationBeginningEvent.java   |   35 +
 .../p2/ui/RepositoryOperationEndingEvent.java      |   79 +
 .../equinox/internal/p2/ui/ServiceUIComponent.java |   28 +
 .../internal/p2/ui/SimpleLicenseManager.java       |  120 -
 .../equinox/internal/p2/ui/UIRepositoryEvent.java  |   37 -
 .../internal/p2/ui/UpdateManagerCompatibility.java |  292 +
 .../internal/p2/ui/ValidationDialogServiceUI.java  |  189 +
 .../p2/ui/actions/ColocatedRepositoryAction.java   |   41 +
 .../p2/ui/actions/ExistingIUInProfileAction.java   |   97 +
 .../internal/p2/ui/actions/InstallAction.java      |   70 +
 .../p2/ui/actions/ProfileModificationAction.java   |  211 +
 .../p2/ui/actions/PropertyDialogAction.java        |   37 +
 .../internal/p2/ui/actions/ProvisioningAction.java |   91 +
 .../internal/p2/ui/actions/RefreshAction.java      |   63 +
 .../actions/RemoveColocatedRepositoryAction.java   |   28 +
 .../internal/p2/ui/actions/UninstallAction.java    |   56 +
 .../internal/p2/ui/actions/UpdateAction.java       |   72 +
 .../p2/ui/dialogs/AddRepositoryDialog.java         |  146 +
 .../p2/ui/dialogs/ApplyProfileChangesDialog.java   |    2 +-
 .../internal/p2/ui/dialogs/AvailableIUGroup.java   |  515 ++
 .../p2/ui/dialogs/AvailableIUPatternFilter.java    |    9 +-
 .../internal/p2/ui/dialogs/AvailableIUsPage.java   |  206 +-
 .../p2/ui/dialogs/ComboAutoCompleteField.java      |    8 +-
 .../p2/ui/dialogs/ContainerCheckedTreeViewer.java  |   10 +-
 .../internal/p2/ui/dialogs/CopyHandler.java        |    1 +
 .../equinox/internal/p2/ui/dialogs/CopyPopup.java  |    1 +
 .../equinox/internal/p2/ui/dialogs/CopyUtils.java  |    1 +
 .../p2/ui/dialogs/DelayedFilterCheckboxTree.java   |  157 +-
 .../equinox/internal/p2/ui/dialogs/ICopyable.java  |   23 -
 .../internal/p2/ui/dialogs/ILayoutConstants.java   |    5 +-
 .../p2/ui/dialogs/IPreFilterJobProvider.java       |   23 +
 .../p2/ui/dialogs/IRepositoryManipulationHook.java |   22 +
 .../ui/dialogs/IRepositorySelectionListener.java   |   29 +
 .../ui/dialogs/IResolutionErrorReportingPage.java  |    7 +-
 .../p2/ui/dialogs/IUCopyrightPropertyPage.java     |   80 +
 .../internal/p2/ui/dialogs/IUDetailsGroup.java     |    2 +-
 .../p2/ui/dialogs/IUGeneralInfoPropertyPage.java   |  141 +
 .../p2/ui/dialogs/IULicensePropertyPage.java       |   82 +
 .../internal/p2/ui/dialogs/IUPropertyPage.java     |    6 +-
 .../internal/p2/ui/dialogs/InstallWizard.java      |  229 +
 .../internal/p2/ui/dialogs/InstallWizardPage.java  |   16 +-
 .../internal/p2/ui/dialogs/InstalledIUGroup.java   |  111 +
 .../p2/ui/dialogs/PreselectedIUInstallWizard.java  |   85 +
 .../p2/ui/dialogs/ProvisioningOperationWizard.java |  343 +-
 .../p2/ui/dialogs/ProvisioningWizardDialog.java    |   62 +
 .../p2/ui/dialogs/ProvisioningWizardPage.java      |   24 +-
 .../dialogs/RepositoryManipulatorDropTarget.java   |   29 +-
 .../dialogs/RepositoryNameAndLocationDialog.java   |   45 +-
 .../p2/ui/dialogs/RepositorySelectionGroup.java    |  654 ++
 .../p2/ui/dialogs/ResolutionResultsWizardPage.java |  119 +-
 .../p2/ui/dialogs/ResolutionStatusPage.java        |   97 +-
 .../internal/p2/ui/dialogs/SelectableIUsPage.java  |  105 +-
 .../p2/ui/dialogs/SizeComputingWizardPage.java     |   62 +-
 .../internal/p2/ui/dialogs/StructuredIUGroup.java  |   39 +-
 .../internal/p2/ui/dialogs/UninstallWizard.java    |   91 +
 .../p2/ui/dialogs/UninstallWizardPage.java         |   22 +-
 .../internal/p2/ui/dialogs/UpdateSingleIUPage.java |   97 +
 .../p2/ui/dialogs/UpdateSingleIUWizard.java        |   71 +
 .../internal/p2/ui/dialogs/UpdateWizard.java       |  168 +
 .../internal/p2/ui/dialogs/UpdateWizardPage.java   |   18 +-
 .../p2/ui/dialogs/UserValidationDialog.java        |  113 +-
 .../internal/p2/ui/dialogs/WizardWithLicenses.java |   86 +-
 .../equinox/internal/p2/ui/messages.properties     |  123 +-
 .../internal/p2/ui/model/ArtifactElement.java      |    5 +-
 .../internal/p2/ui/model/ArtifactRepositories.java |   42 +
 .../p2/ui/model/ArtifactRepositoryElement.java     |  112 +-
 .../internal/p2/ui/model/AvailableIUElement.java   |   72 +-
 .../p2/ui/model/AvailableUpdateElement.java        |   24 +-
 .../internal/p2/ui/model/CategoryElement.java      |   53 +-
 .../equinox/internal/p2/ui/model/ElementUtils.java |  144 +-
 .../equinox/internal/p2/ui/model/IIUElement.java   |   25 +-
 .../internal/p2/ui/model/IRepositoryElement.java   |   35 +
 .../internal/p2/ui/model/IUElementListRoot.java    |   57 +
 .../internal/p2/ui/model/InstalledIUElement.java   |  127 +
 .../internal/p2/ui/model/MetadataRepositories.java |  101 +
 .../p2/ui/model/MetadataRepositoryElement.java     |   90 +-
 .../internal/p2/ui/model/ProfileElement.java       |   81 +
 .../internal/p2/ui/model/ProfileSnapshots.java     |   72 +-
 .../equinox/internal/p2/ui/model/Profiles.java     |   46 +
 .../equinox/internal/p2/ui/model/ProvElement.java  |    5 +-
 .../internal/p2/ui/model/QueriedElement.java       |   39 +-
 .../p2/ui/model/QueriedElementWrapper.java         |   36 +-
 .../internal/p2/ui/model/RemoteQueriedElement.java |   22 +
 .../p2/ui/model/RollbackProfileElement.java        |   30 +-
 .../equinox/internal/p2/ui/model/RootElement.java  |   28 +-
 .../equinox/internal/p2/ui/model/Updates.java      |   61 +
 .../p2/ui/query/AnyRequiredCapabilityQuery.java    |   43 -
 .../internal/p2/ui/query/ArtifactKeyWrapper.java   |   46 +
 .../ui/query/ArtifactRepositoryElementWrapper.java |   51 +
 .../internal/p2/ui/query/AvailableIUWrapper.java   |   28 +-
 .../p2/ui/query/CategoryElementWrapper.java        |   31 +-
 .../internal/p2/ui/query/IUViewQueryContext.java   |  169 +
 .../p2/ui/query/InstalledIUElementWrapper.java     |   10 +-
 .../ui/query/MetadataRepositoryElementWrapper.java |    9 +-
 .../p2/ui/query/ProfileElementWrapper.java         |    4 +-
 .../p2/ui/query/QueryableProfileRegistry.java      |   34 +-
 .../internal/p2/ui/query/QueryableUpdates.java     |   44 +-
 .../internal/p2/ui/query/RequiredIUsQuery.java     |   45 +
 .../ui/viewers/DeferredQueryContentProvider.java   |    9 +-
 .../internal/p2/ui/viewers/IUColumnConfig.java     |  173 +
 .../internal/p2/ui/viewers/IUComparator.java       |   82 +
 .../p2/ui/viewers/IUDetailsLabelProvider.java      |   32 +-
 .../internal/p2/ui/viewers/IUDragAdapter.java      |  128 +
 .../p2/ui/viewers/InstallIUDropAdapter.java        |  216 +
 .../p2/ui/viewers/ProvElementComparer.java         |   77 +
 .../p2/ui/viewers/ProvElementContentProvider.java  |  169 +
 .../p2/ui/viewers/ProvElementLabelProvider.java    |  146 +
 .../p2/ui/viewers/RepositoryContentProvider.java   |   35 +
 .../ui/viewers/RepositoryDetailsLabelProvider.java |   34 +-
 .../StructuredViewerProvisioningListener.java      |  173 +
 .../provisional/p2/ui/ElementQueryDescriptor.java  |   80 -
 .../internal/provisional/p2/ui/ElementWrapper.java |   57 -
 .../provisional/p2/ui/IProvHelpContextIds.java     |   45 -
 .../internal/provisional/p2/ui/IStatusCodes.java   |   48 -
 .../provisional/p2/ui/IUPropertyUtils.java         |  241 -
 .../internal/provisional/p2/ui/ProfileFactory.java |   81 -
 .../equinox/internal/provisional/p2/ui/ProvUI.java |  400 -
 .../internal/provisional/p2/ui/ProvUIImages.java   |   81 -
 .../p2/ui/ProvUIProvisioningListener.java          |  194 -
 .../p2/ui/ProvisioningOperationRunner.java         |  251 -
 .../p2/ui/QueryableArtifactRepositoryManager.java  |   72 -
 .../p2/ui/QueryableMetadataRepositoryManager.java  |   97 -
 .../p2/ui/QueryableRepositoryManager.java          |  238 -
 .../provisional/p2/ui/RepositoryLocationQuery.java |   67 -
 .../provisional/p2/ui/ResolutionResult.java        |  127 -
 .../p2/ui/UpdateManagerCompatibility.java          |  298 -
 .../p2/ui/ValidationDialogServiceUI.java           |  171 -
 .../p2/ui/actions/ColocatedRepositoryAction.java   |   49 -
 .../p2/ui/actions/ExistingIUInProfileAction.java   |  129 -
 .../provisional/p2/ui/actions/InstallAction.java   |  158 -
 .../p2/ui/actions/ProfileModificationAction.java   |  306 -
 .../p2/ui/actions/PropertyDialogAction.java        |   37 -
 .../p2/ui/actions/ProvisioningAction.java          |   74 -
 .../provisional/p2/ui/actions/RefreshAction.java   |   62 -
 .../actions/RemoveColocatedRepositoryAction.java   |   29 -
 .../provisional/p2/ui/actions/UninstallAction.java |   74 -
 .../provisional/p2/ui/actions/UpdateAction.java    |   99 -
 .../p2/ui/dialogs/AcceptLicensesWizardPage.java    |  373 -
 .../p2/ui/dialogs/AddRepositoryDialog.java         |  163 -
 .../p2/ui/dialogs/AvailableIUGroup.java            |  474 -
 .../ui/dialogs/IRepositorySelectionListener.java   |   29 -
 .../p2/ui/dialogs/IUCopyrightPropertyPage.java     |   82 -
 .../p2/ui/dialogs/IUGeneralInfoPropertyPage.java   |  143 -
 .../p2/ui/dialogs/IULicensePropertyPage.java       |   81 -
 .../provisional/p2/ui/dialogs/InstallWizard.java   |  137 -
 .../p2/ui/dialogs/InstalledIUGroup.java            |  114 -
 .../p2/ui/dialogs/InstalledSoftwarePage.java       |  233 -
 .../p2/ui/dialogs/PreselectedIUInstallWizard.java  |   93 -
 .../p2/ui/dialogs/ProvisioningWizardDialog.java    |   63 -
 .../p2/ui/dialogs/RepositoryManipulationPage.java  |  907 --
 .../p2/ui/dialogs/RepositorySelectionGroup.java    |  634 --
 .../p2/ui/dialogs/RevertProfilePage.java           |  316 -
 .../provisional/p2/ui/dialogs/UninstallWizard.java |   98 -
 .../provisional/p2/ui/dialogs/UpdateWizard.java    |  265 -
 .../p2/ui/model/ArtifactRepositories.java          |   43 -
 .../p2/ui/model/IRepositoryElement.java            |   36 -
 .../provisional/p2/ui/model/IUElementListRoot.java |   58 -
 .../p2/ui/model/InstalledIUElement.java            |  128 -
 .../p2/ui/model/MetadataRepositories.java          |  112 -
 .../provisional/p2/ui/model/ProfileElement.java    |   91 -
 .../internal/provisional/p2/ui/model/Profiles.java |   47 -
 .../internal/provisional/p2/ui/model/Updates.java  |   62 -
 .../AddColocatedRepositoryOperation.java           |   52 -
 .../p2/ui/operations/AddProfileOperation.java      |   37 -
 .../p2/ui/operations/AddRepositoryOperation.java   |   66 -
 .../p2/ui/operations/DownloadPhaseSet.java         |   24 -
 .../ui/operations/PlannerResolutionOperation.java  |   85 -
 .../operations/ProfileModificationOperation.java   |   71 -
 .../p2/ui/operations/ProvisioningOperation.java    |   86 -
 .../p2/ui/operations/ProvisioningUtil.java         |  450 -
 .../RemoveColocatedRepositoryOperation.java        |   39 -
 .../p2/ui/operations/RemoveProfilesOperation.java  |   37 -
 .../ui/operations/RemoveRepositoryOperation.java   |   26 -
 .../p2/ui/operations/RepositoryOperation.java      |   56 -
 .../p2/ui/operations/SizingPhaseSet.java           |   31 -
 .../ui/policy/ColocatedRepositoryManipulator.java  |  166 -
 .../provisional/p2/ui/policy/IProfileChooser.java  |   29 -
 .../p2/ui/policy/IUViewQueryContext.java           |  210 -
 .../provisional/p2/ui/policy/LicenseManager.java   |   47 -
 .../provisional/p2/ui/policy/PlanValidator.java    |   45 -
 .../internal/provisional/p2/ui/policy/Policy.java  |  289 -
 .../provisional/p2/ui/policy/QueryProvider.java    |   31 -
 .../p2/ui/policy/RepositoryLocationValidator.java  |   56 -
 .../p2/ui/policy/RepositoryManipulator.java        |  100 -
 .../provisional/p2/ui/viewers/IUColumnConfig.java  |   42 -
 .../provisional/p2/ui/viewers/IUComparator.java    |   84 -
 .../provisional/p2/ui/viewers/IUDragAdapter.java   |  128 -
 .../p2/ui/viewers/InstallIUDropAdapter.java        |  218 -
 .../p2/ui/viewers/ProvElementComparer.java         |   79 -
 .../p2/ui/viewers/ProvElementContentProvider.java  |   90 -
 .../p2/ui/viewers/ProvElementLabelProvider.java    |  147 -
 .../p2/ui/viewers/RepositoryContentProvider.java   |   36 -
 .../StructuredViewerProvisioningListener.java      |  168 -
 .../equinox/p2/ui/AcceptLicensesWizardPage.java    |  488 +
 .../src/org/eclipse/equinox/p2/ui/ICopyable.java   |   30 +
 .../equinox/p2/ui/InstalledSoftwarePage.java       |  256 +
 .../org/eclipse/equinox/p2/ui/LicenseManager.java  |   68 +
 .../equinox/p2/ui/LoadMetadataRepositoryJob.java   |  184 +
 .../src/org/eclipse/equinox/p2/ui/Policy.java      |  333 +
 .../org/eclipse/equinox/p2/ui/ProvisioningUI.java  |  438 +
 .../equinox/p2/ui/RepositoryManipulationPage.java  |  954 ++
 .../eclipse/equinox/p2/ui/RevertProfilePage.java   |  416 +
 .../src/org/eclipse/equinox/p2/ui/package.html     |   39 +
 .../.classpath                                     |    2 +-
 .../org.eclipse.equinox.p2.updatechecker/.project  |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |  594 +-
 .../META-INF/MANIFEST.MF                           |   32 +-
 .../OSGI-INF/updatechecker.xml                     |    8 +
 .../build.properties                               |   17 +-
 .../org.eclipse.equinox.p2.updatechecker/pom.xml   |   14 +
 .../internal/p2/updatechecker/Activator.java       |   36 -
 .../internal/p2/updatechecker/UpdateChecker.java   |   70 +-
 .../p2/updatechecker/UpdateCheckerComponent.java   |   27 +
 .../p2/updatechecker/IUpdateChecker.java           |    7 +-
 .../provisional/p2/updatechecker/UpdateEvent.java  |   10 +-
 .../org.eclipse.equinox.p2.updatesite/.classpath   |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   20 +-
 .../.settings/org.eclipse.jdt.launching.prefs      |    3 +
 .../META-INF/MANIFEST.MF                           |   59 +-
 .../build.properties                               |    5 +-
 .../org.eclipse.equinox.p2.updatesite/pom.xml      |   14 +
 .../internal/p2/updatesite/CategoryParser.java     |  773 ++
 .../updatesite/CategoryPublisherApplication.java   |   28 +
 .../internal/p2/updatesite/CategoryXMLAction.java  |   11 +-
 .../internal/p2/updatesite/DefaultSiteParser.java  |   20 +-
 .../internal/p2/updatesite/DigestParser.java       |    4 +-
 .../p2/updatesite/LocalUpdateSiteAction.java       |   21 +-
 .../equinox/internal/p2/updatesite/Messages.java   |    4 +
 .../p2/updatesite/RemoteFeaturesAction.java        |   13 +-
 .../p2/updatesite/RemoteUpdateSiteAction.java      |    6 +-
 .../internal/p2/updatesite/SiteCategory.java       |   20 +-
 .../internal/p2/updatesite/SiteFeature.java        |    8 +-
 .../equinox/internal/p2/updatesite/SiteIU.java     |  143 +
 .../equinox/internal/p2/updatesite/SiteModel.java  |   59 +-
 .../internal/p2/updatesite/SiteXMLAction.java      |  350 +-
 .../equinox/internal/p2/updatesite/UpdateSite.java |   74 +-
 .../updatesite/UpdateSitePublisherApplication.java |   26 +-
 .../p2/updatesite/VersionSuffixGenerator.java      |  296 +
 .../artifact/UpdateSiteArtifactRepository.java     |   45 +-
 .../UpdateSiteArtifactRepositoryFactory.java       |   47 +-
 .../internal/p2/updatesite/messages.properties     |    5 +-
 .../internal/p2/updatesite/metadata/Messages.java  |   30 -
 .../metadata/UpdateSiteMetadataRepository.java     |  112 +-
 .../UpdateSiteMetadataRepositoryFactory.java       |   37 +-
 .../p2/updatesite/metadata/messages.properties     |   14 -
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../preferences/BundleDefaultPreferences.java      |  111 +
 .../internal/preferences/DefaultPreferences.java   |   91 +-
 .../PreferenceServiceRegistryHelper.java           |   16 +-
 .../internal/preferences/PreferencesService.java   |   51 +-
 .../runtime/preferences/BundleDefaultsScope.java   |   73 +
 .../runtime/preferences/ConfigurationScope.java    |    3 +-
 .../core/runtime/preferences/DefaultScope.java     |    3 +-
 .../runtime/preferences/IPreferencesService.java   |   44 +-
 .../core/runtime/preferences/InstanceScope.java    |    3 +-
 .../runtime/preferences/PreferenceFilterEntry.java |   34 +-
 .../META-INF/MANIFEST.MF                           |    3 +-
 .../internal/registry/BaseExtensionHandle.java     |   12 +-
 .../registry/BaseExtensionPointHandle.java         |   14 +-
 .../internal/registry/ConfigurationElement.java    |   15 +-
 .../registry/ConfigurationElementHandle.java       |   10 +-
 .../registry/ConfigurationElementMulti.java        |  118 +
 .../eclipse/core/internal/registry/DirectMap.java  |  104 +
 .../eclipse/core/internal/registry/Extension.java  |   15 +-
 .../core/internal/registry/ExtensionMulti.java     |   36 +
 .../core/internal/registry/ExtensionPoint.java     |   12 +-
 .../internal/registry/ExtensionPointMulti.java     |   35 +
 .../core/internal/registry/ExtensionRegistry.java  |   65 +-
 .../core/internal/registry/ExtensionsParser.java   |    6 +-
 .../core/internal/registry/HashtableOfInt.java     |  153 -
 .../core/internal/registry/IRegistryConstants.java |    4 +-
 .../core/internal/registry/OffsetTable.java        |   66 +
 .../core/internal/registry/RegistryMessages.java   |    1 +
 .../core/internal/registry/RegistryObject.java     |   14 +-
 .../registry/RegistryObjectFactoryMulti.java       |   46 +
 .../internal/registry/RegistryObjectManager.java   |   11 +-
 .../core/internal/registry/TableReader.java        |   41 +-
 .../core/internal/registry/TableWriter.java        |   33 +-
 .../core/internal/registry/messages.properties     |    1 +
 .../core/internal/registry/osgi/Activator.java     |    4 +-
 .../registry/osgi/RegistryStrategyOSGI.java        |   41 +-
 .../spi/ConfigurationElementAttribute.java         |    2 +-
 .../core/runtime/IConfigurationElement.java        |   45 +-
 .../src/org/eclipse/core/runtime/IExtension.java   |   23 +-
 .../org/eclipse/core/runtime/IExtensionPoint.java  |   24 +-
 .../eclipse/core/runtime/IExtensionRegistry.java   |   19 +-
 .../org/eclipse/core/runtime/RegistryFactory.java  |    1 -
 .../eclipse/core/runtime/spi/RegistryStrategy.java |   61 +-
 .../org.eclipse.equinox.security.macosx/.project   |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugin.properties                              |    3 +
 .../org.eclipse.equinox.security.ui/plugin.xml     |   26 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../security/auth/nls/SecAuthMessages.java         |    1 +
 .../internal/security/auth/nls/messages.properties |    1 +
 .../security/storage/SecurePreferencesRoot.java    |   14 +-
 .../internal/security/storage/SlashEncode.java     |    4 +-
 .../.classpath                                     |    6 +
 .../.project                                       |   28 +
 .../.settings/org.eclipse.pde.prefs                |   25 +
 .../META-INF/MANIFEST.MF                           |   12 +
 .../META-INF/p2.inf                                |   12 +
 .../about.html                                     |   28 +
 .../build.properties                               |    3 +
 .../META-INF/MANIFEST.MF                           |    5 +-
 .../build.properties                               |   11 +-
 .../scripts/webappBuilder.xml                      |  100 -
 .../equinox/servletbridge/BridgeServlet.java       |    4 +-
 .../equinox/servletbridge/FrameworkLauncher.java   |  305 +-
 .../WEB-INF/eclipse/configuration/config.ini       |    3 -
 .../templates/WEB-INF/web.xml                      |   65 -
 .../.project                                       |    5 +
 .../.settings/org.eclipse.jdt.core.prefs           |  550 +-
 .../META-INF/MANIFEST.MF                           |   20 +-
 .../OSGI-INF/configurator.xml                      |   10 +
 .../build.properties                               |   17 +-
 .../pom.xml                                        |   14 +
 .../manipulator/SimpleConfiguratorManipulator.java |   43 -
 .../simpleconfigurator/manipulator/Activator.java  |   47 -
 .../SimpleConfiguratorManipulatorImpl.java         |  137 +-
 .../SimpleConfiguratorManipulatorUtils.java        |   84 +-
 .../manipulator/SimpleConfiguratorManipulator.java |   96 +
 .../.settings/org.eclipse.jdt.core.prefs           |  501 +-
 .../META-INF/MANIFEST.MF                           |    7 +-
 .../org.eclipse.equinox.simpleconfigurator/pom.xml |   14 +
 .../provisional/configurator/Configurator.java     |    4 +-
 .../simpleconfigurator/SimpleConfiguratorImpl.java |    2 +-
 .../simpleconfigurator/console/ApplyCommand.java   |    1 -
 .../console/ConfiguratorCommandProvider.java       |    2 +-
 .../simpleconfigurator/utils/EquinoxUtils.java     |   36 +-
 .../utils/SimpleConfiguratorUtils.java             |   66 +-
 .../org.eclipse.equinox.supplement/.project        |    6 +
 .../META-INF/MANIFEST.MF                           |   10 +-
 .../runtime/internal/adaptor/BasicLocation.java    |   21 +-
 .../adaptor/EclipseAdaptorMessages.properties      |    4 +-
 .../internal/adaptor/EclipseAdaptorMsg.java        |    2 +
 .../runtime/internal/adaptor/Locker_JavaNio.java   |   15 +-
 .../osgi/framework/debug/EclipseDebugTrace.java    |  268 +-
 .../framework/debug/FrameworkDebugOptions.java     |  340 +-
 .../framework/debug/FrameworkDebugTraceEntry.java  |   23 +-
 .../internal/core/ExternalMessages.properties      |    6 +-
 .../org/eclipse/osgi/framework/log/package.html    |   17 +
 .../eclipse/osgi/framework/util/SecureAction.java  |   39 +-
 .../osgi/service/datalocation/Location.java        |   25 +-
 .../eclipse/osgi/service/debug/DebugOptions.java   |   96 +-
 .../osgi/service/debug/DebugOptionsListener.java   |    8 +-
 .../org/eclipse/osgi/service/debug/DebugTrace.java |    7 +-
 .../org/eclipse/osgi/service/debug/package.html    |   17 +
 .../osgi/service/environment/Constants.java        |    7 +
 .../eclipse/osgi/service/environment/package.html  |   18 +
 .../osgi/service/localization/LocaleProvider.java  |   45 +
 .../eclipse/osgi/service/localization/package.html |   19 +
 .../osgi/service/runnable/ApplicationLauncher.java |    6 +-
 .../osgi/service/runnable/ApplicationRunnable.java |    6 +-
 .../service/runnable/ParameterizedRunnable.java    |    6 +-
 .../org/eclipse/osgi/service/runnable/package.html |   17 +
 .../osgi/storagemanager/StorageManager.java        |   32 +-
 .../org/eclipse/osgi/storagemanager/package.html   |   17 +
 .../src/org/eclipse/osgi/util/ManifestElement.java |   41 +-
 .../src/org/eclipse/osgi/util/NLS.java             |   16 +-
 .../org.eclipse.equinox.transforms.hook/.project   |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../internal/transforms/TransformedBundleFile.java |    7 +-
 .../org.eclipse.equinox.transforms.xslt/.project   |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugins/org.eclipse.equinox.useradmin/.project |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.equinox.util/META-INF/MANIFEST.MF  |    2 +-
 .../org.eclipse.equinox.weaving.aspectj/.classpath |    7 +
 .../org.eclipse.equinox.weaving.aspectj/.options   |    1 +
 .../org.eclipse.equinox.weaving.aspectj/.project   |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |  339 +
 .../.settings/org.eclipse.jdt.ui.prefs             |  114 +
 .../.settings/org.eclipse.pde.prefs                |   22 +
 .../META-INF/MANIFEST.MF                           |   18 +
 .../META-INF/optional-p2.inf                       |   10 +
 .../build.properties                               |    7 +
 .../equinox/weaving/aspectj/AspectAdmin.java       |  180 +
 .../weaving/aspectj/AspectConfiguration.java       |   70 +
 .../weaving/aspectj/AspectJWeavingActivator.java   |   64 +
 .../weaving/aspectj/AspectJWeavingService.java     |  165 +
 .../aspectj/AspectJWeavingServiceFactory.java      |   50 +
 .../weaving/aspectj/AspectJWeavingStarter.java     |  111 +
 .../weaving/aspectj/loadtime/AspectAdminImpl.java  |  464 +
 .../weaving/aspectj/loadtime/AspectResolver.java   |  259 +
 .../aspectj/loadtime/OSGiWeavingAdaptor.java       |  126 +
 .../aspectj/loadtime/OSGiWeavingContext.java       |   87 +
 .../.classpath                                     |    0
 .../.options                                       |    1 +
 .../.project                                       |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |  329 +
 .../.settings/org.eclipse.jdt.ui.prefs             |  114 +
 .../.settings/org.eclipse.pde.prefs                |   22 +
 .../META-INF/MANIFEST.MF                           |   12 +
 .../META-INF/p2.inf                                |    3 +
 .../build.properties                               |    6 +
 .../internal/caching/j9/CachingService.java        |  151 +
 .../internal/caching/j9/CachingServiceFactory.java |   37 +
 .../internal/caching/j9/CachingServicePlugin.java  |  125 +
 .../.classpath                                     |    0
 .../org.eclipse.equinox.weaving.caching/.options   |    1 +
 .../org.eclipse.equinox.weaving.caching/.project   |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |  339 +
 .../.settings/org.eclipse.jdt.ui.prefs             |  114 +
 .../.settings/org.eclipse.pde.core.prefs           |    4 +
 .../.settings/org.eclipse.pde.prefs                |   23 +
 .../META-INF/MANIFEST.MF                           |   13 +
 .../META-INF/p2.inf                                |    3 +
 .../build.properties                               |    4 +
 .../weaving/internal/caching/Activator.java        |  125 +
 .../internal/caching/BundleCachingService.java     |  264 +
 .../weaving/internal/caching/CacheItem.java        |   92 +
 .../weaving/internal/caching/CacheWriter.java      |  135 +
 .../internal/caching/CachingServiceFactory.java    |  151 +
 .../weaving/internal/caching/IBundleConstants.java |   25 +
 .../equinox/weaving/internal/caching/Log.java      |   63 +
 .../internal/caching/UnchangedCachingService.java  |   74 +
 .../org.eclipse.equinox.weaving.hook/.classpath    |    7 +
 .../org.eclipse.equinox.weaving.hook/.options      |    6 +
 .../org.eclipse.equinox.weaving.hook/.project      |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    3 +
 .../.settings/org.eclipse.jdt.core.prefs           |  339 +
 .../.settings/org.eclipse.jdt.ui.prefs             |  115 +
 .../.settings/org.eclipse.pde.prefs                |   22 +
 .../META-INF/MANIFEST.MF                           |   10 +
 .../build.properties                               |    8 +
 .../org.eclipse.equinox.weaving.hook/config.ini    |   11 +
 .../hookconfigurators.properties                   |    2 +
 .../org.eclipse.equinox.weaving.hook/readme.txt    |   15 +
 .../equinox/service/weaving/CacheEntry.java        |   65 +
 .../equinox/service/weaving/ICachingService.java   |   36 +
 .../service/weaving/ICachingServiceFactory.java    |   43 +
 .../service/weaving/ISupplementerRegistry.java     |   52 +
 .../equinox/service/weaving/IWeavingService.java   |   89 +
 .../service/weaving/IWeavingServiceFactory.java    |   47 +
 .../equinox/service/weaving/Supplementer.java      |  233 +
 .../eclipse/equinox/weaving/adaptors/Debug.java    |   70 +
 .../equinox/weaving/adaptors/IWeavingAdaptor.java  |   33 +
 .../equinox/weaving/adaptors/WeavingAdaptor.java   |  257 +
 .../weaving/adaptors/WeavingAdaptorFactory.java    |  297 +
 .../weaving/hooks/AbstractWeavingBundleFile.java   |  122 +
 .../equinox/weaving/hooks/AbstractWeavingHook.java |  266 +
 .../weaving/hooks/BaseWeavingBundleFile.java       |   25 +
 .../weaving/hooks/BundleAdaptorProvider.java       |   29 +
 .../weaving/hooks/CachedClassBundleEntry.java      |   93 +
 .../hooks/CachedGeneratedClassBundleEntry.java     |   88 +
 .../equinox/weaving/hooks/IAdaptorProvider.java    |   14 +
 .../weaving/hooks/SupplementBundleListener.java    |   37 +
 .../weaving/hooks/SupplementerRegistry.java        |  418 +
 .../equinox/weaving/hooks/WeavingBundleEntry.java  |   89 +
 .../equinox/weaving/hooks/WeavingBundleFile.java   |   95 +
 .../eclipse/equinox/weaving/hooks/WeavingHook.java |  245 +
 .../weaving/hooks/WeavingLoaderDelegateHook.java   |  250 +
 .../plugins/org.eclipse.equinox.wireadmin/.project |    6 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../equinox/internal/wireadmin/WireAdminImpl.java  |   10 +-
 .../internal/wireadmin/WireReDispatcher.java       |   12 +-
 .../org.eclipse.help.base/META-INF/MANIFEST.MF     |   21 +-
 .../plugins/org.eclipse.help.base/about.properties |    2 +-
 .../org.eclipse.help.base/plugin.properties        |    6 +-
 eclipse/plugins/org.eclipse.help.base/plugin.xml   |   21 +-
 .../plugins/org.eclipse.help.base/preferences.ini  |   33 +-
 .../schema/luceneSearchParticipants.exsd           |   66 +-
 .../org.eclipse.help.base/schema/scope.exsd        |  109 +
 .../schema/searchParticipant.exsd                  |  194 +
 .../org/eclipse/help/base/AbstractHelpScope.java   |   95 +
 .../eclipse/help/internal/base/BaseHelpSystem.java |   14 +-
 .../help/internal/base/HelpBaseResources.java      |    5 +-
 .../internal/base/HelpBaseResources.properties     |    5 +-
 .../eclipse/help/internal/base/HelpDisplay.java    |   17 +-
 .../help/internal/base/IHelpBaseConstants.java     |    7 +-
 .../base/remote/DefaultPreferenceFileHandler.java  |   23 +-
 .../help/internal/base/remote/HttpsUtility.java    |  227 +
 .../base/remote/PreferenceFileHandler.java         |   58 +-
 .../base/remote/RemoteContextProvider.java         |   46 +-
 .../base/remote/RemoteExtensionProvider.java       |   16 +-
 .../help/internal/base/remote/RemoteHelp.java      |   14 +-
 .../help/internal/base/remote/RemoteIC.java        |   28 +-
 .../internal/base/remote/RemoteIndexProvider.java  |   22 +-
 .../internal/base/remote/RemoteSearchManager.java  |   23 +-
 .../internal/base/remote/RemoteStatusData.java     |  126 +
 .../internal/base/remote/RemoteTocProvider.java    |   40 +-
 .../internal/base/scope/CriteriaHelpScope.java     |  115 +
 .../help/internal/base/scope/EnablementScope.java  |   51 +
 .../help/internal/base/scope/FilterScope.java      |   59 +
 .../internal/base/scope/IntersectionScope.java     |   95 +
 .../help/internal/base/scope/ScopeHandle.java      |   34 +
 .../help/internal/base/scope/ScopeRegistry.java    |  273 +
 .../help/internal/base/scope/ScopeUtils.java       |  229 +
 .../help/internal/base/scope/SearchScopeScope.java |   54 +
 .../help/internal/base/scope/UnionScope.java       |   95 +
 .../help/internal/base/scope/UniversalScope.java   |   45 +
 .../help/internal/base/scope/WorkingSetScope.java  |  206 +
 .../help/internal/base/util/CriteriaUtilities.java |   70 +
 .../help/internal/base/util/IndexUtils.java        |   72 +
 .../help/internal/protocols/HelpURLConnection.java |  181 +-
 .../internal/protocols/HelpURLStreamHandler.java   |    3 +
 .../internal/search/HTMLSearchParticipant.java     |   32 +-
 .../help/internal/search/ISearchHitCollector.java  |   11 +-
 .../help/internal/search/IndexingOperation.java    |    6 +-
 .../help/internal/search/LocalSearchManager.java   |  100 +-
 .../help/internal/search/LuceneSearchDocument.java |   61 +
 .../search/LuceneSearchParticipantAdapter.java     |   71 +
 .../eclipse/help/internal/search/SearchIndex.java  |   34 +-
 .../help/internal/search/SearchManager.java        |    6 +-
 .../internal/search/SearchProgressMonitor.java     |    6 +-
 .../help/internal/search/SearchResults.java        |  103 +-
 .../internal/search/XHTMLSearchParticipant.java    |    6 +-
 .../help/internal/search/federated/LocalHelp.java  |    8 +-
 .../help/internal/server/JettyHelpServer.java      |   24 +-
 .../help/internal/standalone/StandaloneHelp.java   |    4 +-
 .../internal/standalone/StandaloneInfocenter.java  |    4 +-
 .../help/internal/validation/TocValidator.java     |   31 +-
 .../internal/workingset/AdaptableSelectedToc.java  |   63 +
 .../workingset/AdaptableSelectedTopic.java         |   60 +
 .../help/internal/workingset/AdaptableToc.java     |    3 +
 .../workingset/IHelpWorkingSetManager.java         |   18 +-
 .../help/internal/workingset/WorkingSet.java       |   81 +-
 .../internal/workingset/WorkingSetManager.java     |  167 +-
 .../help/internal/xhtml/XHTMLCharsetHandler.java   |   23 +-
 .../org/eclipse/help/search/IHelpSearchIndex.java  |   55 +
 .../org/eclipse/help/search/ISearchDocument.java   |   67 +
 .../src/org/eclipse/help/search/ISearchIndex.java  |    9 +-
 .../help/search/LuceneSearchParticipant.java       |   10 +-
 .../org/eclipse/help/search/SearchParticipant.java |  190 +
 .../eclipse/help/search/SearchParticipantXML.java  |  385 +
 .../eclipse/help/search/XMLSearchParticipant.java  |    7 +-
 .../src/org/eclipse/help/standalone/package.html   |    8 +-
 .../org.eclipse.help.ui/META-INF/MANIFEST.MF       |   15 +-
 .../icons}/dlcl16/magnify_font.gif                 |  Bin 101 -> 101 bytes
 .../icons}/dlcl16/reduce_font.gif                  |  Bin 94 -> 94 bytes
 .../icons}/elcl16/magnify_font.gif                 |  Bin 108 -> 108 bytes
 .../icons}/elcl16/reduce_font.gif                  |  Bin 97 -> 97 bytes
 .../plugins/org.eclipse.help.ui/plugin.properties  |   13 +-
 eclipse/plugins/org.eclipse.help.ui/plugin.xml     |   59 +-
 .../help/ui/internal/ContextHelpDialog.java        |    4 +-
 .../eclipse/help/ui/internal/IHelpUIConstants.java |    6 +-
 .../src/org/eclipse/help/ui/internal/Messages.java |   25 +-
 .../eclipse/help/ui/internal/Messages.properties   |   28 +-
 .../internal/browser/embedded/EmbeddedBrowser.java |   16 +-
 .../handlers/OpenBundleResourceHandler.java        |   74 +
 .../help/ui/internal/preferences/AddICDialog.java  |   36 +-
 .../help/ui/internal/preferences/EditICDialog.java |   45 +-
 .../ui/internal/preferences/HelpContentBlock.java  |  103 +-
 .../preferences/HelpContentPreferencePage.java     |   86 +-
 .../preferences/RemoteICLabelProvider.java         |    8 +-
 .../help/ui/internal/preferences/RemoteICList.java |   21 +-
 .../ui/internal/preferences/RemoteICViewer.java    |   68 +-
 .../preferences/TestConnectionUtility.java         |   56 +-
 .../ui/internal/preferences/ViewICPropsDialog.java |   32 +-
 .../search/HelpCriteriaContentProvider.java        |  167 +
 .../internal/search/HelpCriteriaLabelProvider.java |   48 +
 .../help/ui/internal/search/LocalHelpPage.java     |  285 +-
 .../internal/search/LocalSearchScopeFactory.java   |    4 +-
 .../eclipse/help/ui/internal/util/FontUtils.java   |   34 +-
 .../help/ui/internal/views/BrowserPart.java        |   97 +-
 .../help/ui/internal/views/ContextHelpPart.java    |   91 +-
 .../ui/internal/views/EngineResultSection.java     |    4 +-
 .../eclipse/help/ui/internal/views/HelpTray.java   |    4 +-
 .../eclipse/help/ui/internal/views/HelpView.java   |    4 +-
 .../eclipse/help/ui/internal/views/IndexPart.java  |   57 +-
 .../help/ui/internal/views/RelatedTopicsPart.java  |    6 +-
 .../help/ui/internal/views/ReusableHelpPart.java   |   61 +-
 .../eclipse/help/ui/internal/views/SearchPart.java |   58 +-
 .../org.eclipse.help.webapp/META-INF/MANIFEST.MF   |   10 +-
 .../org.eclipse.help.webapp/advanced/advanced.jsp  |    6 +-
 .../advanced/bookmarksView.jsp                     |    4 +-
 .../advanced/confirmShowAll.jsp                    |    4 +-
 .../org.eclipse.help.webapp/advanced/content.jsp   |   21 +-
 .../advanced/contentToolbar.jsp                    |    2 +-
 .../advanced/deferredView.jsp                      |    4 +-
 .../org.eclipse.help.webapp/advanced/err.jsp       |    4 +-
 .../org.eclipse.help.webapp/advanced/fheader.jsp   |    6 +-
 .../org.eclipse.help.webapp/advanced/header.jsp    |    6 +-
 .../org.eclipse.help.webapp/advanced/help.jsp      |    4 +-
 .../advanced/helpToolbar.jsp                       |   39 +
 .../org.eclipse.help.webapp/advanced/helptree.js   |   98 +-
 .../advanced/helptreechildren.js                   |   35 +-
 .../org.eclipse.help.webapp/advanced/highlight.css |    8 +-
 .../org.eclipse.help.webapp/advanced/highlight.js  |   47 +-
 .../advanced/images/e_quick_search_multi.gif       |  Bin 0 -> 561 bytes
 .../org.eclipse.help.webapp/advanced/index.jsp     |   25 +-
 .../advanced/indexToolbar.jsp                      |    7 +-
 .../org.eclipse.help.webapp/advanced/indexView.css |    8 +-
 .../org.eclipse.help.webapp/advanced/indexView.js  |   15 +-
 .../org.eclipse.help.webapp/advanced/indexView.jsp |   17 +-
 .../org.eclipse.help.webapp/advanced/nav.jsp       |    4 +-
 .../org.eclipse.help.webapp/advanced/navActions.js |   32 +-
 .../org.eclipse.help.webapp/advanced/print.jsp     |   17 +-
 .../advanced/printAlert.css                        |   60 +
 .../advanced/printConfirm.jsp                      |   82 +
 .../advanced/printError.jsp                        |   66 +
 .../advanced/quickSearch.jsp                       |   11 +-
 .../advanced/searchScoped.jsp                      |   68 +-
 .../advanced/searchSimple.jsp                      |   38 +-
 .../advanced/searchView.jsp                        |    4 +-
 .../org.eclipse.help.webapp/advanced/tabs.jsp      |   20 +-
 .../advanced/tocToolbar.jsp                        |   23 +-
 .../org.eclipse.help.webapp/advanced/tocTree.js    |   30 +-
 .../org.eclipse.help.webapp/advanced/tocView.jsp   |    9 +-
 .../org.eclipse.help.webapp/advanced/toolbar.jsp   |   30 +-
 .../org.eclipse.help.webapp/advanced/utils.js      |   29 +-
 .../org.eclipse.help.webapp/advanced/view.jsp      |   19 +-
 .../org.eclipse.help.webapp/advanced/views.js      |   20 +-
 .../org.eclipse.help.webapp/advanced/views.jsp     |   39 +-
 .../advanced/workingSet.jsp                        |  342 +-
 .../advanced/workingSetManager.jsp                 |   11 +-
 .../plugins/org.eclipse.help.webapp/basic/err.jsp  |    4 +-
 .../org.eclipse.help.webapp/basic/header.jsp       |    3 +-
 .../plugins/org.eclipse.help.webapp/basic/help.jsp |    4 +-
 .../org.eclipse.help.webapp/basic/index.jsp        |   14 +-
 .../org.eclipse.help.webapp/basic/indexView.jsp    |    4 +-
 .../org.eclipse.help.webapp/basic/searchView.jsp   |    4 +-
 .../plugins/org.eclipse.help.webapp/basic/tabs.jsp |   23 +-
 .../org.eclipse.help.webapp/basic/tocView.jsp      |    4 +-
 .../org.eclipse.help.webapp/basic/toolbar.jsp      |    6 +-
 .../plugins/org.eclipse.help.webapp/basic/view.jsp |   14 +-
 .../org.eclipse.help.webapp/build.properties       |    3 +-
 eclipse/plugins/org.eclipse.help.webapp/index.jsp  |    6 +-
 eclipse/plugins/org.eclipse.help.webapp/plugin.xml |   33 +-
 .../org.eclipse.help.webapp/schema/frame.exsd      |   94 +
 .../schema/toolbarButton.exsd                      |   89 +
 .../org.eclipse.help.webapp/schema/view.exsd       |   89 +
 .../help/internal/webapp/StatusProducer.java       |  272 +
 .../help/internal/webapp/WebappResources.java      |   25 +-
 .../internal/webapp/WebappResources.properties     |   72 +-
 .../help/internal/webapp/data/ButtonData.java      |   76 +
 .../help/internal/webapp/data/CookiesData.java     |    8 +-
 .../eclipse/help/internal/webapp/data/CssUtil.java |   15 +-
 .../internal/webapp/data/EnabledTopicUtils.java    |   16 +-
 .../help/internal/webapp/data/FrameData.java       |  121 +
 .../help/internal/webapp/data/LayoutData.java      |  109 +-
 .../help/internal/webapp/data/PrintData.java       |  271 +-
 .../help/internal/webapp/data/RequestData.java     |    7 +-
 .../help/internal/webapp/data/RequestScope.java    |  176 +
 .../help/internal/webapp/data/SearchData.java      |   73 +-
 .../internal/webapp/data/ServletResources.java     |   27 +-
 .../eclipse/help/internal/webapp/data/TocData.java |   22 +-
 .../help/internal/webapp/data/ToolbarButton.java   |   18 +-
 .../help/internal/webapp/data/ToolbarData.java     |   71 +-
 .../help/internal/webapp/data/TopicFinder.java     |   78 +-
 .../eclipse/help/internal/webapp/data/UrlUtil.java |   38 +-
 .../eclipse/help/internal/webapp/data/View.java    |   36 +-
 .../internal/webapp/data/WebappPreferences.java    |   19 +
 .../help/internal/webapp/data/WorkingSetData.java  |  128 +-
 .../webapp/data/WorkingSetManagerData.java         |  142 +-
 .../internal/webapp/servlet/BreadcrumbsFilter.java |   16 +-
 .../internal/webapp/servlet/ChildLinkInserter.java |  120 +
 .../internal/webapp/servlet/ContentServlet.java    |    5 +-
 .../internal/webapp/servlet/ContextServlet.java    |   22 +-
 .../help/internal/webapp/servlet/CookieUtil.java   |   74 +-
 .../webapp/servlet/DynamicXHTMLFilter.java         |    6 +-
 .../internal/webapp/servlet/EclipseConnector.java  |   56 +-
 .../internal/webapp/servlet/FramesetFilter.java    |   14 +-
 .../internal/webapp/servlet/HighlightFilter.java   |    7 +-
 .../webapp/servlet/IndexFragmentServlet.java       |  159 +-
 .../help/internal/webapp/servlet/IndexServlet.java |    4 +-
 .../servlet/InfocenterWorkingSetManager.java       |  259 +-
 .../internal/webapp/servlet/InjectionFilter.java   |   16 +-
 .../help/internal/webapp/servlet/NavServlet.java   |   12 +-
 .../internal/webapp/servlet/PluginsRootFilter.java |   35 +
 .../webapp/servlet/PluginsRootResolvingStream.java |  227 +
 .../internal/webapp/servlet/SearchServlet.java     |   23 +-
 .../webapp/servlet/TocFragmentServlet.java         |   34 +-
 .../help/internal/webapp/servlet/TocServlet.java   |    6 +-
 .../webapp/servlet/WebappWorkingSetManager.java    |   44 +-
 .../org/eclipse/help/webapp/AbstractButton.java    |  124 +
 .../src/org/eclipse/help/webapp/AbstractFrame.java |   77 +
 .../src/org/eclipse/help/webapp/AbstractView.java  |   89 +
 .../WEB-INF/{eclipse => }/configuration/config.ini |    0
 .../web-archive/help/WEB-INF/eclipse/launch.ini    |   11 -
 .../web-archive/help/WEB-INF}/launch.ini           |    0
 .../.settings/org.eclipse.jdt.core.prefs           |   17 +-
 .../plugins/org.eclipse.help/META-INF/MANIFEST.MF  |   17 +-
 eclipse/plugins/org.eclipse.help/plugin.properties |    4 +-
 eclipse/plugins/org.eclipse.help/plugin.xml        |   27 +-
 eclipse/plugins/org.eclipse.help/preferences.ini   |   10 +
 .../schema/criteriaDefinition.exsd                 |  182 +
 .../org.eclipse.help/schema/criteriaProvider.exsd  |  102 +
 eclipse/plugins/org.eclipse.help/schema/index.exsd |   62 +-
 eclipse/plugins/org.eclipse.help/schema/toc.exsd   |   66 +-
 .../help/AbstractCriteriaDefinitionProvider.java   |   30 +
 .../org/eclipse/help/AbstractCriteriaProvider.java |   41 +
 .../src/org/eclipse/help/AbstractTocProvider.java  |   27 +-
 .../src/org/eclipse/help/ICriteria.java            |   37 +
 .../src/org/eclipse/help/ICriteriaDefinition.java  |   30 +
 .../help/ICriteriaDefinitionContribution.java      |   42 +
 .../src/org/eclipse/help/ICriterionDefinition.java |   42 +
 .../eclipse/help/ICriterionValueDefinition.java    |   35 +
 .../src/org/eclipse/help/IIndexEntry2.java         |   27 +
 .../src/org/eclipse/help/IIndexSee.java            |   36 +
 .../src/org/eclipse/help/IIndexSubpath.java        |   25 +
 .../src/org/eclipse/help/IToc2.java                |   42 +
 .../src/org/eclipse/help/ITopic2.java              |   43 +
 .../src/org/eclipse/help/internal/HelpPlugin.java  |   15 +-
 .../src/org/eclipse/help/internal/Topic.java       |   17 +-
 .../src/org/eclipse/help/internal/UAElement.java   |    8 +-
 .../eclipse/help/internal/UAElementFactory.java    |   26 +-
 .../help/internal/context/ContextFileProvider.java |  101 +-
 .../help/internal/context/ContextManager.java      |  134 +-
 .../eclipse/help/internal/criteria/Criteria.java   |   55 +
 .../help/internal/criteria/CriteriaDefinition.java |   40 +
 .../criteria/CriteriaDefinitionAssembler.java      |  108 +
 .../criteria/CriteriaDefinitionContribution.java   |   47 +
 .../criteria/CriteriaDefinitionDocumentReader.java |   61 +
 .../internal/criteria/CriteriaDefinitionFile.java  |   49 +
 .../criteria/CriteriaDefinitionFileParser.java     |   43 +
 .../criteria/CriteriaDefinitionFileProvider.java   |   94 +
 .../criteria/CriteriaDefinitionManager.java        |  195 +
 .../help/internal/criteria/CriteriaManager.java    |  106 +
 .../criteria/CriteriaProviderRegistry.java         |  129 +
 .../internal/criteria/CriterionDefinition.java     |   55 +
 .../help/internal/criteria/CriterionResource.java  |   97 +
 .../criteria/CriterionValueDefinition.java         |   48 +
 .../help/internal/dynamic/FilterResolver.java      |    4 +-
 .../extension/ContentExtensionFileParser.java      |    6 +-
 .../src/org/eclipse/help/internal/index/Index.java |   23 +-
 .../help/internal/index/IndexAssembler.java        |   58 +-
 .../eclipse/help/internal/index/IndexEntry.java    |   11 +-
 .../help/internal/index/IndexFileParser.java       |   19 +-
 .../help/internal/index/IndexFileProvider.java     |    5 +-
 .../eclipse/help/internal/index/IndexManager.java  |   43 +-
 .../org/eclipse/help/internal/index/IndexSee.java  |  111 +
 .../eclipse/help/internal/index/IndexSubpath.java  |   40 +
 .../src/org/eclipse/help/internal/toc/Toc.java     |   89 +-
 .../eclipse/help/internal/toc/TocAssembler.java    |   28 +-
 .../eclipse/help/internal/toc/TocFileParser.java   |   26 +-
 .../eclipse/help/internal/toc/TocFileProvider.java |   26 +-
 .../org/eclipse/help/internal/toc/TocManager.java  |   14 +-
 .../help/internal/toc/TocProviderComparator.java   |   32 +
 .../org/eclipse/help/internal/toc/TopicSorter.java |   80 +
 .../help/internal/util/ProductPreferences.java     |   10 +-
 .../help/internal/util/ResourceLocator.java        |   23 +-
 .../org/eclipse/help/internal/util/URLCoder.java   |   30 +-
 .../org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF  |    8 +-
 .../org.eclipse.jdt.apt.core/build_notes.html      |   44 +-
 .../org.eclipse.jdt.apt.core/design-notes.html     |  227 +
 .../plugins/org.eclipse.jdt.apt.core/plugin.xml    |   19 +
 .../scripts/exportplugin.xml                       |   11 +
 .../jdt/apt/core/internal/APTDispatchRunnable.java |   45 +-
 .../declaration/ASTBasedDeclarationImpl.java       |    2 +-
 .../internal/declaration/AnnotationValueImpl.java  |    5 +-
 .../internal/declaration/ClassDeclarationImpl.java |    2 +-
 .../internal/declaration/TypeDeclarationImpl.java  |    4 +-
 .../apt/core/internal/env/BaseProcessorEnv.java    |    2 +-
 .../core/internal/env/BinaryFileOutputStream.java  |    9 +-
 .../generatedfile/GeneratedFileManager.java        |    6 +-
 .../jdt/apt/core/internal/util/FileSystemUtil.java |    4 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.jdt.apt.pluggable.core/plugin.xml  |   11 +
 .../apt/pluggable/core/filer/IdeFilerImpl.java     |   14 +-
 .../core/filer/IdeNonSourceOutputStream.java       |    6 +-
 .../org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF    |    2 +-
 eclipse/plugins/org.eclipse.jdt.apt.ui/plugin.xml  |   11 +
 .../scripts/exportplugin.xml                       |   11 +
 .../preferences/AptConfigurationBlock.java         |    4 +-
 .../META-INF/MANIFEST.MF                           |    5 +-
 .../customBuildCallbacks.xml                       |   12 +-
 .../compiler/apt/model/AnnotationMirrorImpl.java   |   17 +-
 .../compiler/apt/util/EclipseFileManager.java      |   54 +-
 .../internal/compiler/tool/ArchiveFileObject.java  |   13 +
 .../internal/compiler/tool/EclipseCompiler.java    |   12 +-
 .../compiler/tool/EclipseCompilerImpl.java         |   99 +-
 .../internal/compiler/tool/EclipseFileManager.java |   73 +-
 .../jdt/internal/compiler/tool/Options.java        |    6 +-
 .../org.eclipse.jdt.core/.settings/.api_filters    |   48 -
 .../.settings/org.eclipse.jdt.core.prefs           |    5 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |   56 +-
 .../.settings/org.eclipse.pde.api.tools.prefs      |    8 +-
 .../.settings/org.eclipse.pde.prefs                |   21 +-
 .../org.eclipse.jdt.core/META-INF/MANIFEST.MF      |    2 +-
 .../org/eclipse/jdt/core/JDTCompilerAdapter.java   |  183 +-
 .../compiler/batch/ClasspathDirectory.java         |    7 +-
 .../jdt/internal/compiler/batch/ClasspathJar.java  |    3 +-
 .../jdt/internal/compiler/batch/FileSystem.java    |    4 +-
 .../jdt/internal/compiler/batch/GCCMain.java       |  501 --
 .../eclipse/jdt/internal/compiler/batch/Main.java  |  697 +-
 .../internal/compiler/batch/messages.properties    |   69 +-
 .../plugins/org.eclipse.jdt.core/build.properties  |   11 +-
 .../org.eclipse.jdt.core/buildnotes_jdt-core.html  | 3978 +++++-----
 .../jdt/internal/codeassist/CompletionEngine.java  |  100 +-
 .../InternalExtendedCompletionContext.java         |   23 +-
 .../internal/codeassist/RelevanceConstants.java    |   14 +-
 .../jdt/internal/codeassist/SelectionEngine.java   |  250 +-
 .../codeassist/complete/CompletionParser.java      |  141 +-
 .../codeassist/complete/CompletionScanner.java     |   45 +-
 .../jdt/internal/codeassist/impl/AssistParser.java |   38 +-
 .../jdt/internal/codeassist/impl/Engine.java       |    2 +-
 .../codeassist/select/SelectionParser.java         |   44 +
 .../eclipse/jdt/core/compiler/CharOperation.java   |    4 +-
 .../org/eclipse/jdt/core/compiler/IProblem.java    |   13 +-
 .../eclipse/jdt/internal/compiler/ClassFile.java   |   22 +-
 .../jdt/internal/compiler/CompilationResult.java   |    6 +-
 .../eclipse/jdt/internal/compiler/Compiler.java    |   22 +-
 .../eclipse/jdt/internal/compiler/ReadManager.java |   11 +-
 .../eclipse/jdt/internal/compiler/ast/ASTNode.java |   56 +-
 .../compiler/ast/AbstractMethodDeclaration.java    |    8 +-
 .../compiler/ast/AbstractVariableDeclaration.java  |    7 +-
 .../compiler/ast/AllocationExpression.java         |   10 +-
 .../jdt/internal/compiler/ast/Argument.java        |    8 +
 .../jdt/internal/compiler/ast/AssertStatement.java |    6 +-
 .../jdt/internal/compiler/ast/Assignment.java      |    8 +-
 .../eclipse/jdt/internal/compiler/ast/Block.java   |    6 +-
 .../jdt/internal/compiler/ast/CaseStatement.java   |    2 +-
 .../jdt/internal/compiler/ast/CastExpression.java  |   31 +-
 .../eclipse/jdt/internal/compiler/ast/Clinit.java  |    8 +-
 .../compiler/ast/CompilationUnitDeclaration.java   |   38 +-
 .../internal/compiler/ast/CompoundAssignment.java  |    5 +
 .../compiler/ast/ConditionalExpression.java        |   11 +-
 .../compiler/ast/ConstructorDeclaration.java       |   12 +-
 .../jdt/internal/compiler/ast/DoStatement.java     |    8 +-
 .../jdt/internal/compiler/ast/EqualExpression.java |   18 +-
 .../compiler/ast/ExplicitConstructorCall.java      |    2 +-
 .../jdt/internal/compiler/ast/Expression.java      |    8 +-
 .../internal/compiler/ast/FieldDeclaration.java    |   11 +-
 .../jdt/internal/compiler/ast/FieldReference.java  |   31 +-
 .../jdt/internal/compiler/ast/ForStatement.java    |   10 +-
 .../internal/compiler/ast/ForeachStatement.java    |   12 +-
 .../jdt/internal/compiler/ast/IfStatement.java     |  121 +-
 .../compiler/ast/InstanceOfExpression.java         |    7 +-
 .../eclipse/jdt/internal/compiler/ast/Javadoc.java |   12 +
 .../ast/JavadocQualifiedTypeReference.java         |    8 +-
 .../internal/compiler/ast/LocalDeclaration.java    |    6 +-
 .../jdt/internal/compiler/ast/MemberValuePair.java |   13 +-
 .../jdt/internal/compiler/ast/MessageSend.java     |   15 +-
 .../internal/compiler/ast/MethodDeclaration.java   |   41 +-
 .../internal/compiler/ast/OR_OR_Expression.java    |    7 +-
 .../ast/ParameterizedQualifiedTypeReference.java   |   34 +-
 .../ast/QualifiedAllocationExpression.java         |    6 +-
 .../compiler/ast/QualifiedNameReference.java       |   31 +-
 .../compiler/ast/QualifiedTypeReference.java       |    6 +-
 .../internal/compiler/ast/SingleNameReference.java |   22 +-
 .../internal/compiler/ast/SingleTypeReference.java |    4 +-
 .../jdt/internal/compiler/ast/Statement.java       |   47 +-
 .../jdt/internal/compiler/ast/SwitchStatement.java |   66 +-
 .../jdt/internal/compiler/ast/TryStatement.java    |   33 +-
 .../jdt/internal/compiler/ast/TypeDeclaration.java |    4 +-
 .../jdt/internal/compiler/ast/TypeReference.java   |   29 +-
 .../jdt/internal/compiler/ast/WhileStatement.java  |    9 +-
 .../internal/compiler/classfmt/AnnotationInfo.java |   32 +-
 .../compiler/classfmt/ClassFileReader.java         |   32 +-
 .../compiler/classfmt/ElementValuePairInfo.java    |   37 +-
 .../jdt/internal/compiler/codegen/CaseLabel.java   |    2 +-
 .../jdt/internal/compiler/codegen/CodeStream.java  |   10 +-
 .../internal/compiler/codegen/StackMapFrame.java   |    2 +-
 .../jdt/internal/compiler/env/AccessRuleSet.java   |    2 +-
 .../jdt/internal/compiler/env/ClassSignature.java  |   28 +-
 .../compiler/env/EnumConstantSignature.java        |   31 +-
 .../jdt/internal/compiler/env/IBinaryMethod.java   |    4 +-
 .../compiler/flow/ConditionalFlowInfo.java         |   20 +-
 .../internal/compiler/flow/FinallyFlowContext.java |  160 +-
 .../jdt/internal/compiler/flow/FlowContext.java    |  131 +-
 .../jdt/internal/compiler/flow/FlowInfo.java       |  101 +-
 .../internal/compiler/flow/LoopingFlowContext.java |  235 +-
 .../compiler/flow/UnconditionalFlowInfo.java       |  100 +-
 .../internal/compiler/impl/BooleanConstant.java    |   22 +-
 .../jdt/internal/compiler/impl/ByteConstant.java   |   20 +-
 .../jdt/internal/compiler/impl/CharConstant.java   |   20 +-
 .../internal/compiler/impl/CompilerOptions.java    |  116 +-
 .../jdt/internal/compiler/impl/CompilerStats.java  |    2 +-
 .../jdt/internal/compiler/impl/DoubleConstant.java |   21 +-
 .../jdt/internal/compiler/impl/FloatConstant.java  |   20 +-
 .../jdt/internal/compiler/impl/IntConstant.java    |   20 +-
 .../jdt/internal/compiler/impl/IrritantSet.java    |   93 +-
 .../jdt/internal/compiler/impl/LongConstant.java   |   20 +-
 .../jdt/internal/compiler/impl/ShortConstant.java  |   20 +-
 .../jdt/internal/compiler/impl/StringConstant.java |   27 +-
 .../compiler/lookup/BinaryTypeBinding.java         |   37 +-
 .../jdt/internal/compiler/lookup/BlockScope.java   |   12 +-
 .../jdt/internal/compiler/lookup/ClassScope.java   |   33 +-
 .../compiler/lookup/CompilationUnitScope.java      |   31 +-
 .../jdt/internal/compiler/lookup/FieldBinding.java |    6 +-
 .../internal/compiler/lookup/InvocationSite.java   |    3 +-
 .../internal/compiler/lookup/LocalTypeBinding.java |   13 +-
 .../compiler/lookup/LookupEnvironment.java         |   52 +-
 .../internal/compiler/lookup/MethodBinding.java    |  120 +-
 .../jdt/internal/compiler/lookup/MethodScope.java  |    6 +-
 .../internal/compiler/lookup/MethodVerifier.java   |   94 +-
 .../internal/compiler/lookup/MethodVerifier15.java |  151 +-
 .../lookup/ParameterizedGenericMethodBinding.java  |   11 +-
 .../lookup/ParameterizedMethodBinding.java         |   28 +-
 .../internal/compiler/lookup/RawTypeBinding.java   |   26 +-
 .../internal/compiler/lookup/ReferenceBinding.java |   17 +-
 .../jdt/internal/compiler/lookup/Scope.java        |   68 +-
 .../compiler/lookup/SourceTypeBinding.java         |  115 +-
 .../compiler/lookup/SyntheticMethodBinding.java    |   33 +-
 .../jdt/internal/compiler/lookup/TagBits.java      |   10 +-
 .../jdt/internal/compiler/lookup/TypeBinding.java  |   20 +-
 .../internal/compiler/lookup/WildcardBinding.java  |    5 +-
 .../jdt/internal/compiler/messages.properties      |    4 +-
 .../compiler/parser/AbstractCommentParser.java     |  112 +-
 .../jdt/internal/compiler/parser/Parser.java       |   84 +-
 .../internal/compiler/parser/RecoveredField.java   |   28 +-
 .../compiler/parser/RecoveredStatement.java        |    7 +
 .../jdt/internal/compiler/parser/Scanner.java      |  130 +-
 .../internal/compiler/problem/ProblemReporter.java |  197 +-
 .../compiler/problem/ProblemSeverities.java        |    2 +-
 .../internal/compiler/problem/messages.properties  |    9 +-
 .../internal/compiler/util/HashtableOfObject.java  |   30 +-
 .../eclipse/jdt/internal/compiler/util/Util.java   |  102 +-
 eclipse/plugins/org.eclipse.jdt.core/component.xml |    3 +-
 .../dom/org/eclipse/jdt/core/dom/AST.java          |    4 +-
 .../dom/org/eclipse/jdt/core/dom/ASTConverter.java |  151 +-
 .../dom/org/eclipse/jdt/core/dom/ASTParser.java    |  682 +-
 .../dom/org/eclipse/jdt/core/dom/ASTRequestor.java |   15 +-
 .../dom/org/eclipse/jdt/core/dom/ASTVisitor.java   |    3 +-
 .../dom/org/eclipse/jdt/core/dom/CatchClause.java  |    3 +-
 .../org/eclipse/jdt/core/dom/CompilationUnit.java  |    4 +-
 .../jdt/core/dom/CompilationUnitResolver.java      |  381 +-
 .../jdt/core/dom/DefaultBindingResolver.java       |   15 +-
 .../eclipse/jdt/core/dom/EnhancedForStatement.java |    7 +-
 .../org/eclipse/jdt/core/dom/FileASTRequestor.java |  108 +
 .../dom/org/eclipse/jdt/core/dom/IBinding.java     |    2 +-
 .../org/eclipse/jdt/core/dom/MethodBinding.java    |    7 +-
 .../eclipse/jdt/core/dom/MethodDeclaration.java    |    4 +-
 .../jdt/core/dom/NameEnviromentWithProgress.java   |   56 +
 .../dom/org/eclipse/jdt/core/dom/NodeFinder.java   |    8 +-
 .../org/eclipse/jdt/core/dom/PackageBinding.java   |   16 +-
 .../org/eclipse/jdt/core/dom/StringLiteral.java    |    5 +-
 .../dom/org/eclipse/jdt/core/dom/TypeBinding.java  |   31 +-
 .../org/eclipse/jdt/core/dom/VariableBinding.java  |   47 +-
 .../eclipse/jdt/core/dom/rewrite/ASTRewrite.java   |   14 +-
 .../jdt/core/dom/rewrite/ImportRewrite.java        |   89 +-
 .../core/dom/rewrite/ASTRewriteAnalyzer.java       |   79 +-
 .../core/dom/rewrite/ASTRewriteFlattener.java      |    2 +-
 .../core/dom/rewrite/ASTRewriteFormatter.java      |    6 +-
 .../core/dom/rewrite/ImportRewriteAnalyzer.java    |  208 +-
 .../eval/CodeSnippetAllocationExpression.java      |   57 +-
 .../jdt/internal/eval/CodeSnippetClassFile.java    |   18 +-
 .../jdt/internal/eval/CodeSnippetParser.java       |  181 +-
 .../jdt/internal/eval/CodeSnippetScope.java        |   14 +-
 .../jdt/internal/eval/CodeSnippetToCuMapper.java   |    4 +-
 .../jdt/internal/eval/EvaluationContext.java       |    4 +-
 .../jdt/internal/eval/EvaluationResult.java        |    8 +-
 .../eclipse/jdt/internal/eval/GlobalVariable.java  |    6 +-
 .../eclipse/jdt/core/formatter/CodeFormatter.java  |   67 +-
 .../formatter/DefaultCodeFormatterConstants.java   |  320 +-
 .../jdt/core/formatter/IndentManipulation.java     |   81 +-
 .../internal/formatter/CodeFormatterVisitor.java   |  822 +-
 .../internal/formatter/DefaultCodeFormatter.java   |  159 +-
 .../formatter/DefaultCodeFormatterOptions.java     |  127 +-
 .../jdt/internal/formatter/FormatJavadocBlock.java |   98 +-
 .../jdt/internal/formatter/FormatJavadocNode.java  |   13 +-
 .../jdt/internal/formatter/FormatJavadocText.java  |   22 +-
 .../internal/formatter/FormatterCommentParser.java |   37 +-
 .../eclipse/jdt/internal/formatter/Location.java   |   16 +-
 .../org/eclipse/jdt/internal/formatter/Scribe.java | 2027 +++--
 .../jdt/internal/formatter/align/Alignment.java    |  181 +-
 .../internal/formatter/comment/CommentLine.java    |  315 -
 .../internal/formatter/comment/CommentRange.java   |  262 -
 .../internal/formatter/comment/CommentRegion.java  |  576 --
 .../formatter/comment/IBorderAttributes.java       |   26 -
 .../formatter/comment/ICommentAttributes.java      |   65 -
 .../formatter/comment/IHtmlTagDelimiters.java      |   29 -
 .../internal/formatter/comment/JavaDocLine.java    |   52 -
 .../internal/formatter/comment/JavaDocRegion.java  |  365 -
 .../formatter/comment/MultiCommentLine.java        |  409 -
 .../formatter/comment/MultiCommentRegion.java      |  245 -
 .../formatter/comment/SingleCommentLine.java       |  115 -
 .../org/eclipse/jdt/core/BufferChangedEvent.java   |    6 +-
 .../org/eclipse/jdt/core/CompletionProposal.java   |    6 +-
 .../org/eclipse/jdt/core/CorrectionEngine.java     |   18 +-
 .../model/org/eclipse/jdt/core/IBuffer.java        |   10 +-
 .../org/eclipse/jdt/core/IClasspathAttribute.java  |    4 +-
 .../org/eclipse/jdt/core/IClasspathContainer.java  |   12 +-
 .../org/eclipse/jdt/core/IClasspathEntry.java      |   24 +-
 .../org/eclipse/jdt/core/ICompilationUnit.java     |   41 +-
 .../model/org/eclipse/jdt/core/IField.java         |   11 +-
 .../model/org/eclipse/jdt/core/IJavaModel.java     |    4 +-
 .../org/eclipse/jdt/core/IJavaModelMarker.java     |   13 +-
 .../jdt/core/IJavaModelStatusConstants.java        |    9 +-
 .../model/org/eclipse/jdt/core/IJavaProject.java   |   52 +-
 .../model/org/eclipse/jdt/core/IMember.java        |    5 +-
 .../org/eclipse/jdt/core/IMemberValuePair.java     |    4 +-
 .../model/org/eclipse/jdt/core/IMethod.java        |   11 +-
 .../org/eclipse/jdt/core/IPackageFragment.java     |    4 +-
 .../org/eclipse/jdt/core/IPackageFragmentRoot.java |   14 +-
 .../org/eclipse/jdt/core/ISourceManipulation.java  |    4 +-
 .../model/org/eclipse/jdt/core/ISourceRange.java   |   15 +-
 .../org/eclipse/jdt/core/ISourceReference.java     |    8 +-
 .../model/org/eclipse/jdt/core/IType.java          |   42 +-
 .../model/org/eclipse/jdt/core/ITypeHierarchy.java |   10 +-
 .../model/org/eclipse/jdt/core/ITypeParameter.java |   17 +-
 .../model/org/eclipse/jdt/core/IWorkingCopy.java   |    4 +-
 .../org/eclipse/jdt/core/JavaConventions.java      |   20 +-
 .../model/org/eclipse/jdt/core/JavaCore.java       |  109 +-
 .../org/eclipse/jdt/core/NamingConventions.java    |    4 +-
 .../model/org/eclipse/jdt/core/Signature.java      |   16 +-
 .../model/org/eclipse/jdt/core/SourceRange.java    |   88 +
 .../model/org/eclipse/jdt/core/ToolFactory.java    |   97 +-
 .../jdt/core/compiler/CompilationParticipant.java  |    4 +-
 .../jdt/core/compiler/ReconcileContext.java        |   17 +-
 .../jdt/core/util/ByteCodeVisitorAdapter.java      |   12 +-
 .../eclipse/jdt/core/util/IBytecodeVisitor.java    |   10 +-
 .../eclipse/jdt/core/util/IOpcodeMnemonics.java    |    6 +-
 .../eclipse/jdt/core/util/OpcodeStringValues.java  |    3 +-
 .../org/eclipse/jdt/internal/core/Annotation.java  |    1 +
 .../org/eclipse/jdt/internal/core/BinaryType.java  |    3 +-
 .../org/eclipse/jdt/internal/core/Buffer.java      |    8 +-
 .../internal/core/CancelableNameEnvironment.java   |   12 +-
 .../internal/core/ChangeClasspathOperation.java    |    6 +-
 .../org/eclipse/jdt/internal/core/ClassFile.java   |   41 +-
 .../eclipse/jdt/internal/core/ClassFileInfo.java   |    7 +-
 .../eclipse/jdt/internal/core/ClasspathEntry.java  |  124 +-
 .../eclipse/jdt/internal/core/CompilationUnit.java |    2 +-
 .../internal/core/CompilationUnitElementInfo.java  |    3 +-
 .../core/CompilationUnitProblemFinder.java         |  106 +-
 .../core/CompilationUnitStructureRequestor.java    |   16 +-
 .../jdt/internal/core/CopyElementsOperation.java   |    4 +-
 .../core/CopyResourceElementsOperation.java        |    2 +-
 .../eclipse/jdt/internal/core/DeltaProcessor.java  |   17 +-
 .../internal/core/DiscardWorkingCopyOperation.java |    4 +-
 .../jdt/internal/core/ExternalFoldersManager.java  |  193 +-
 .../internal/core/ExternalPackageFragmentRoot.java |    2 +-
 .../internal/core/INameEnviromentWithProgress.java |   36 +
 .../eclipse/jdt/internal/core/ImportContainer.java |    8 +-
 .../internal/core/InternalNamingConventions.java   |   28 +-
 .../jdt/internal/core/JarPackageFragmentRoot.java  |    2 +-
 .../org/eclipse/jdt/internal/core/JavaElement.java |   64 +-
 .../jdt/internal/core/JavaElementDelta.java        |   16 +-
 .../eclipse/jdt/internal/core/JavaElementInfo.java |    4 +-
 .../org/eclipse/jdt/internal/core/JavaModel.java   |    8 +-
 .../eclipse/jdt/internal/core/JavaModelCache.java  |    4 +-
 .../jdt/internal/core/JavaModelManager.java        |  206 +-
 .../jdt/internal/core/JavaModelOperation.java      |    4 +-
 .../org/eclipse/jdt/internal/core/JavaProject.java |  356 +-
 .../jdt/internal/core/JavadocConstants.java        |   36 +-
 .../eclipse/jdt/internal/core/JavadocContents.java |   79 +-
 .../eclipse/jdt/internal/core/LocalVariable.java   |   16 +-
 .../org/eclipse/jdt/internal/core/Member.java      |    6 +-
 .../eclipse/jdt/internal/core/ModelUpdater.java    |    4 +-
 .../org/eclipse/jdt/internal/core/NameLookup.java  |   12 +-
 .../eclipse/jdt/internal/core/PackageFragment.java |    4 +-
 .../jdt/internal/core/PackageFragmentRoot.java     |   18 +-
 .../jdt/internal/core/SetClasspathOperation.java   |   18 +-
 .../jdt/internal/core/SetContainerOperation.java   |    4 +-
 .../jdt/internal/core/SetVariablesOperation.java   |    4 +-
 .../jdt/internal/core/SortElementsOperation.java   |    4 +-
 .../eclipse/jdt/internal/core/SourceMapper.java    |   20 +-
 .../org/eclipse/jdt/internal/core/SourceRange.java |   62 -
 .../jdt/internal/core/SourceRefElementInfo.java    |    1 +
 .../eclipse/jdt/internal/core/TypeParameter.java   |   35 +-
 .../internal/core/TypeParameterElementInfo.java    |    7 +-
 .../jdt/internal/core/UserLibraryManager.java      |    2 +-
 .../core/builder/AbstractImageBuilder.java         |    4 +-
 .../core/builder/AdditionalTypeCollection.java     |    4 +-
 .../internal/core/builder/BatchImageBuilder.java   |    6 +-
 .../jdt/internal/core/builder/ClasspathJar.java    |    6 +-
 .../core/builder/ClasspathMultiDirectory.java      |    2 +-
 .../core/builder/IncrementalImageBuilder.java      |    2 +-
 .../internal/core/builder/ReferenceCollection.java |   20 +-
 .../eclipse/jdt/internal/core/builder/State.java   |    8 +-
 .../internal/core/hierarchy/HierarchyResolver.java |   29 +-
 .../core/hierarchy/IndexBasedHierarchyBuilder.java |    4 +-
 .../jdt/internal/core/hierarchy/TypeHierarchy.java |   14 +-
 .../jdt/internal/core/util/BindingKeyParser.java   |  119 +-
 .../jdt/internal/core/util/BindingKeyResolver.java |   11 +-
 .../jdt/internal/core/util/CodeAttribute.java      |   13 +
 .../internal/core/util/CommentRecorderParser.java  |    2 +-
 .../eclipse/jdt/internal/core/util/DOMFinder.java  |    6 +-
 .../internal/core/util/DefaultBytecodeVisitor.java |   23 +-
 .../jdt/internal/core/util/Disassembler.java       |  169 +-
 .../jdt/internal/core/util/HandleFactory.java      |    9 +-
 .../eclipse/jdt/internal/core/util/Messages.java   |    1 +
 .../jdt/internal/core/util/PublicScanner.java      |  114 +-
 .../org/eclipse/jdt/internal/core/util/Util.java   |  320 +-
 .../jdt/internal/core/util/messages.properties     |    7 +-
 .../org.eclipse.jdt.core/notes/API_changes.html    |    2 +-
 .../notes/R30_buildnotes_jdt-core.html             |    4 +-
 .../notes/R31_buildnotes_jdt-core.html             |    4 +-
 .../notes/R32_buildnotes_jdt-core.html             |    6 +-
 .../notes/R33_buildnotes_jdt-core.html             |    6 +-
 .../notes/R35_buildnotes_jdt-core.html             | 2266 +++++
 eclipse/plugins/org.eclipse.jdt.core/plugin.xml    |    5 +-
 .../org.eclipse.jdt.core/schema/codeFormatter.exsd |  201 +-
 .../org.eclipse.jdt.core/schema/compiler.dtd       |    4 +-
 .../scripts/META-INF/MANIFEST.MF                   |   25 -
 .../scripts/binary/META-INF/MANIFEST.MF            |   28 +
 .../org.eclipse.jdt.core/scripts/export-ecj.xml    |   26 +-
 .../org.eclipse.jdt.core/scripts/export-ejavac.xml |    3 +-
 .../scripts/export-ejavac2.xml                     |    3 +-
 .../scripts/export-ejavac2_linux.xml               |    3 +-
 .../scripts/export-ejavac_linux.xml                |    3 +-
 .../org.eclipse.jdt.core/scripts/exportplugin.xml  |   27 +-
 .../org.eclipse.jdt.core/scripts/ikvm_script.xml   |    3 +-
 .../scripts/oldexportplugin.xml                    |    3 +-
 .../scripts/source/META-INF/MANIFEST.MF            |    7 +
 .../org/eclipse/jdt/core/search/SearchEngine.java  |   39 +-
 .../eclipse/jdt/core/search/SearchParticipant.java |    8 +-
 .../org/eclipse/jdt/core/search/SearchPattern.java |  344 +-
 .../org/eclipse/jdt/core/search/TypeNameMatch.java |   23 +-
 .../eclipse/jdt/core/search/TypeNameRequestor.java |    8 +-
 .../jdt/core/search/TypeReferenceMatch.java        |   21 +-
 .../eclipse/jdt/internal/core/index/DiskIndex.java |   44 +-
 .../jdt/internal/core/index/EntryResult.java       |   19 +-
 .../org/eclipse/jdt/internal/core/index/Index.java |    5 +
 .../internal/core/search/BasicSearchEngine.java    |   23 +-
 .../jdt/internal/core/search/HierarchyScope.java   |  153 +-
 .../jdt/internal/core/search/IndexSelector.java    |   73 +-
 .../jdt/internal/core/search/JavaSearchScope.java  |   10 +-
 .../core/search/JavaSearchTypeNameMatch.java       |   22 +-
 .../jdt/internal/core/search/PatternSearchJob.java |    3 +-
 .../core/search/TypeNameMatchRequestorWrapper.java |   51 +-
 .../core/search/indexing/AddJarFileToIndex.java    |   40 +-
 .../core/search/indexing/IndexManager.java         |  222 +-
 .../search/indexing/RemoveFolderFromIndex.java     |    4 +-
 .../core/search/matching/IntersectingPattern.java  |    4 +-
 .../core/search/matching/MatchLocator.java         |  189 +-
 .../core/search/matching/MatchLocatorParser.java   |    6 +-
 .../search/matching/MemberDeclarationVisitor.java  |   22 +-
 .../core/search/matching/MethodLocator.java        |   53 +-
 .../core/search/matching/MethodPattern.java        |    5 +-
 .../search/matching/PackageReferenceLocator.java   |    3 +-
 .../search/matching/PackageReferencePattern.java   |    4 +-
 .../core/search/matching/PatternLocator.java       |   12 +-
 .../core/search/matching/TypeParameterLocator.java |    4 +-
 .../core/search/matching/TypeReferenceLocator.java |   41 +-
 .../core/search/matching/TypeReferencePattern.java |   16 +-
 .../plugins/org.eclipse.jdt.debug.ui/.classpath    |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  200 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF  |    3 +-
 .../org.eclipse.jdt.debug.ui/build.properties      |    4 +-
 .../icons/full/etool16/new_sbook.gif}              |  Bin 589 -> 589 bytes
 .../org.eclipse.jdt.debug.ui/plugin.properties     |   13 +-
 .../plugins/org.eclipse.jdt.debug.ui/plugin.xml    |  141 +-
 .../breakpoints/JavaBreakpointConditionEditor.java |  427 +
 .../eclipse/jdt/debug/ui/breakpoints/package.html  |   17 +
 .../ui/launchConfigurations/AppletMainTab.java     |   34 +-
 .../launchConfigurations/AppletParametersTab.java  |    4 +-
 .../JavaAppletLaunchShortcut.java                  |    4 +-
 .../JavaApplicationLaunchShortcut.java             |    8 +-
 .../ui/launchConfigurations/JavaArgumentsTab.java  |    2 +-
 .../ui/launchConfigurations/JavaConnectTab.java    |    4 +-
 .../debug/ui/launchConfigurations/JavaJRETab.java  |  107 +-
 .../launchConfigurations/JavaLaunchShortcut.java   |    5 +-
 .../debug/ui/launchConfigurations/JavaMainTab.java |    4 +-
 .../BreakpointRenameFieldParticipant.java          |   34 +-
 .../BreakpointRenameMethodParticipant.java         |   15 +-
 .../internal/debug/ui/BreakpointMarkerUpdater.java |   84 +-
 .../jdt/internal/debug/ui/DebugUIMessages.java     |    4 +-
 .../internal/debug/ui/DebugUIMessages.properties   |    3 +-
 .../internal/debug/ui/DetailFormatterDialog.java   |   72 +-
 .../debug/ui/EditLogicalStructureDialog.java       |    3 +-
 .../ui/ExpressionInformationControlCreator.java    |   12 +-
 .../debug/ui/HeapWalkingPreferencePage.java        |    3 +-
 .../debug/ui/HotCodeReplaceErrorDialog.java        |   46 +-
 .../jdt/internal/debug/ui/JDIDebugUIPlugin.java    |   10 +-
 .../jdt/internal/debug/ui/JavaDebugHover.java      |   36 +-
 .../internal/debug/ui/JavaDebugPreferencePage.java |    3 +-
 .../debug/ui/JavaDetailFormattersManager.java      |   17 +-
 .../ui/JavaLogicalStructuresPreferencePage.java    |    3 +-
 .../debug/ui/JavaStepFilterPreferencePage.java     |    3 +-
 .../jdt/internal/debug/ui/JavaWordFinder.java      |   25 +-
 .../eclipse/jdt/internal/debug/ui/SWTFactory.java  |  461 -
 .../ui/actions/BreakpointLocationVerifierJob.java  |  131 +-
 .../debug/ui/actions/EditStepFiltersAction.java    |    4 +-
 .../debug/ui/actions/ExpressionInputDialog.java    |    5 +-
 .../internal/debug/ui/actions/OpenTypeAction.java  |   73 +-
 .../debug/ui/actions/ProjectSelectionDialog.java   |    3 +-
 .../debug/ui/actions/ShowStratumAction.java        |   38 +-
 .../debug/ui/actions/StringValueInputDialog.java   |    4 +-
 .../debug/ui/actions/ToggleBreakpointAdapter.java  |  131 +-
 .../ui/actions/ValidBreakpointLocationLocator.java |   29 +
 .../debug/ui/breakpoints/AbstractDetailPane.java   |  288 +
 .../breakpoints/AbstractJavaBreakpointEditor.java  |  199 +
 .../debug/ui/breakpoints/AddExceptionAction.java   |   30 +-
 .../AddExceptionTypeDialogExtension.java           |    4 +-
 .../breakpoints/BreakpointDetailPaneFactory.java   |  137 +
 .../debug/ui/breakpoints/BreakpointMessages.java   |   17 +-
 .../ui/breakpoints/BreakpointMessages.properties   |   11 +-
 .../ui/breakpoints/CompositeBreakpointEditor.java  |  141 +
 .../breakpoints/ExceptionBreakpointDetailPane.java |   46 +
 .../ui/breakpoints/ExceptionBreakpointEditor.java  |   88 +
 .../JavaBreakpointTypeAdapterFactory.java          |    4 +-
 .../ui/breakpoints/LineBreakpointDetailPane.java   |   46 +
 .../ui/breakpoints/MethodBreakpointDetailPane.java |   49 +
 .../ui/breakpoints/MethodBreakpointEditor.java     |   80 +
 .../breakpoints/StandardBreakpointDetailPane.java  |   42 +
 .../breakpoints/StandardJavaBreakpointEditor.java  |  247 +
 .../debug/ui/breakpoints/WatchpointDetailPane.java |   45 +
 .../debug/ui/breakpoints/WatchpointEditor.java     |   81 +
 .../ui/heapwalking/AllInstancesActionDelegate.java |   74 +-
 .../heapwalking/InstanceCountActionDelegate.java   |   64 +
 .../internal/debug/ui/heapwalking/Messages.java    |   10 +-
 .../debug/ui/heapwalking/Messages.properties       |    6 +-
 .../jdt/internal/debug/ui/jres/EEVMPage.java       |   23 +-
 .../jres/ExecutionEnvironmentsPreferencePage.java  |    8 +-
 .../internal/debug/ui/jres/InstalledJREsBlock.java |   24 +-
 .../debug/ui/jres/JREContainerWizardPage.java      |   21 +-
 .../jdt/internal/debug/ui/jres/JREMessages.java    |   22 +-
 .../internal/debug/ui/jres/JREMessages.properties  |   12 +-
 .../jdt/internal/debug/ui/jres/JREsComboBlock.java |   46 +-
 .../internal/debug/ui/jres/JREsPreferencePage.java |    4 +-
 .../jdt/internal/debug/ui/jres/LibraryStandin.java |   26 +-
 .../jdt/internal/debug/ui/jres/StandardVMPage.java |   23 +-
 .../internal/debug/ui/jres/VMDetailsDialog.java    |    4 +-
 .../jdt/internal/debug/ui/jres/VMLibraryBlock.java |   19 +-
 .../jdt/internal/debug/ui/jres/VMTypePage.java     |   12 +-
 .../debug/ui/launcher/AbstractJavaMainTab.java     |   23 +-
 .../ui/launcher/JavaWorkingDirectoryBlock.java     |    7 +-
 .../debug/ui/launcher/NameValuePairDialog.java     |   25 +-
 .../ui/launcher/OpenPreferencePageResolution.java  |    4 +-
 .../debug/ui/launcher/SharedJavaMainTab.java       |   19 +-
 .../debug/ui/launcher/VMArgumentsBlock.java        |    4 +-
 .../ui/launcher/WorkspaceOperationRunner.java      |   16 +-
 .../debug/ui/monitors/JavaContendedMonitor.java    |   18 +-
 .../ui/monitors/JavaElementContentProvider.java    |    4 +-
 .../propertypages/BreakpointConditionEditor.java   |  229 -
 .../debug/ui/propertypages/JavaBreakpointPage.java |  272 +-
 .../propertypages/JavaExceptionBreakpointPage.java |  109 -
 .../ui/propertypages/JavaLineBreakpointPage.java   |  299 -
 .../ui/propertypages/PropertyPageMessages.java     |   31 +-
 .../propertypages/PropertyPageMessages.properties  |   37 +-
 .../propertypages/VMCapabilitiesPropertyPage.java  |    4 +-
 .../ui/snippeteditor/NewSnippetFileWizardPage.java |    5 +-
 .../ui/snippeteditor/SelectImportsDialog.java      |   42 +-
 .../ui/snippeteditor/SnippetMessages.properties    |    5 +-
 .../ui/threadgroups/JavaThreadEventHandler.java    |    2 +-
 .../variables/JavaVariableColumnPresentation.java  |   15 +-
 .../ui/variables/JavaVariableLabelProvider.java    |   96 +-
 .../debug/ui/variables/VariableMessages.java       |    3 +-
 .../debug/ui/variables/VariableMessages.properties |    3 +-
 .../debug/ui/variables/VariableOptionsAction.java  |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  201 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.jdt.debug/META-INF/MANIFEST.MF     |    2 +-
 .../buildnotes_jdt-debug.html                      |  166 +-
 .../eval/ast/engine/ASTInstructionCompiler.java    |  393 +-
 .../eval/ast/engine/AbstractRuntimeContext.java    |   87 +-
 .../eval/ast/engine/EvaluationEngineMessages.java  |    7 +-
 .../ast/engine/EvaluationEngineMessages.properties |    7 +-
 .../eval/ast/engine/EvaluationSourceGenerator.java |   74 +-
 .../ast/engine/SourceBasedSourceGenerator.java     |  101 +-
 .../debug/eval/ast/instructions/ArrayAccess.java   |   29 +-
 .../InstructionsEvaluationMessages.java            |    4 +-
 .../InstructionsEvaluationMessages.properties      |    3 +-
 .../eval/ast/instructions/PushArrayLength.java     |    7 +-
 .../jdi/org/eclipse/jdi/internal/MirrorImpl.java   |    4 +-
 .../eclipse/jdi/internal/VirtualMachineImpl.java   |    4 +-
 .../eclipse/jdt/debug/core/IJavaDebugTarget.java   |   52 +
 .../eclipse/jdt/debug/core/IJavaReferenceType.java |   14 +-
 .../org/eclipse/jdt/debug/core/IJavaThread.java    |    9 +
 .../org/eclipse/jdt/debug/core/JDIDebugModel.java  |   10 +-
 .../jdt/internal/debug/core/EventDispatcher.java   |    4 +-
 .../jdt/internal/debug/core/JavaDebugUtils.java    |   58 +-
 .../breakpoints/BreakpointListenerManager.java     |    4 +-
 .../breakpoints/JDIDebugBreakpointMessages.java    |    4 +-
 .../JDIDebugBreakpointMessages.properties          |    3 +-
 .../JavaBreakpointImportParticipant.java           |   32 +-
 .../breakpoints/JavaClassPrepareBreakpoint.java    |    4 +-
 .../core/breakpoints/JavaExceptionBreakpoint.java  |    2 +-
 .../debug/core/breakpoints/JavaLineBreakpoint.java |   46 +-
 .../core/breakpoints/JavaMethodBreakpoint.java     |   14 +-
 .../debug/core/breakpoints/JavaWatchpoint.java     |    2 +-
 .../ValidBreakpointLocationLocator.java            |   63 +-
 .../debug/core/hcr/JavaHotCodeReplaceManager.java  |   55 +-
 .../core/model/JDIDebugModelMessages.properties    |    4 +-
 .../internal/debug/core/model/JDIDebugTarget.java  |  180 +-
 .../internal/debug/core/model/JDIObjectValue.java  |    5 +-
 .../debug/core/model/JDIReferenceType.java         |   22 +-
 .../jdt/internal/debug/core/model/JDIThread.java   |   17 +-
 .../internal/debug/core/model/JDIThreadGroup.java  |    8 +-
 eclipse/plugins/org.eclipse.jdt.debug/plugin.xml   |    5 +-
 ...t-debug.html => r3_5_buildnotes_jdt-debug.html} |    0
 .../org.eclipse.jdt.doc.isv/META-INF/MANIFEST.MF   |    2 +-
 .../org.eclipse.jdt.doc.isv/about.properties       |    4 +-
 .../plugins/org.eclipse.jdt.doc.isv/buildDoc.xml   |   24 +-
 .../guide/CopyrightTabPage.html                    |   18 +-
 .../guide/jdt_api_codeformatter.htm                |    2 +-
 .../guide/jdt_api_compile.htm                      |  469 +-
 .../guide/jdt_api_contributing_a_cleanup.htm       |   60 +-
 .../guide/jdt_api_manip.htm                        |    2 +-
 .../guide/jdt_api_options.htm                      |  155 +-
 .../guide/jdt_api_wizards.htm                      |    2 +-
 .../org.eclipse.jdt.doc.isv/guide/jdt_int_core.htm |    2 +-
 .../plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt |   20 +-
 .../org.eclipse.jdt.doc.isv/jdtaptOptions.txt      |   27 +-
 .../plugins/org.eclipse.jdt.doc.isv/notices.html   |    4 +-
 eclipse/plugins/org.eclipse.jdt.doc.isv/plugin.xml |    3 +
 .../porting/3.2/recommended.html                   |    4 +-
 .../org.eclipse.jdt.doc.isv/porting/3.3/faq.html   |    2 +-
 .../porting/3.3/recommended.html                   |    2 +-
 .../org.eclipse.jdt.doc.isv/porting/3.6/faq.html   |   30 +
 .../porting/3.6/incompatibilities.html             |   97 +
 .../porting/3.6/recommended.html                   |   34 +
 .../porting/eclipse_3_6_porting_guide.html         |   39 +
 .../reference/misc/api-usage-rules.html            |  343 +
 .../reference/misc/overview-jdt.html               |   13 +-
 eclipse/plugins/org.eclipse.jdt.doc.isv/toc.xml    |    2 +-
 .../org.eclipse.jdt.doc.isv/topics_Porting.xml     |    6 +
 .../org.eclipse.jdt.doc.isv/topics_Reference.xml   |    2 +
 .../org.eclipse.jdt.doc.user/META-INF/MANIFEST.MF  |    2 +-
 .../org.eclipse.jdt.doc.user/about.properties      |    4 +-
 .../concepts/concept-java-editor.htm               |    4 +-
 .../concepts/concept-java-perspective.htm          |    8 +-
 .../concepts/concept-java-views-decorators.htm     |    4 +-
 .../concepts/concept-java-views-filtering.htm      |    4 +-
 .../concepts/concept-java-views-presentation.htm   |    4 +-
 .../concepts/concept-java-views.htm                |   14 +-
 .../org.eclipse.jdt.doc.user/contexts_JDT.xml      |   25 +-
 .../contexts_JDT_Debugger.xml                      |   12 +-
 .../view_package_explorer_open_type_hierarchy.png  |  Bin 7654 -> 12445 bytes
 .../images/view_typehierarchy_testcase.png         |  Bin 4444 -> 8412 bytes
 .../images/view_typehierarchy_testcase_focused.png |  Bin 5463 -> 11532 bytes
 .../images/view_typehierarchy_testcase_menu.png    |  Bin 6755 -> 14948 bytes
 .../view_typehierarchy_testcase_runtest_locked.png |  Bin 6516 -> 17677 bytes
 .../images/view_typehierarchy_testcase_small.png   |  Bin 4159 -> 8957 bytes
 .../images/view_typehierarchy_testcase_subtype.png |  Bin 4145 -> 9199 bytes
 .../view_typehierarchy_testcase_supertype.png      |  Bin 3775 -> 6813 bytes
 ...iew_typehierarchy_testcase_supertype_locked.png |  Bin 6369 -> 14914 bytes
 .../gettingStarted/qs-11.htm                       |    4 +-
 .../gettingStarted/qs-12.htm                       |    2 +-
 .../gettingStarted/qs-3.htm                        |    6 +-
 .../gettingStarted/qs-4.htm                        |    4 +-
 .../gettingStarted/qs-6.htm                        |   14 +-
 .../gettingStarted/qs-Navigate.htm                 |    8 +-
 .../ovr16/skip_breakpoint_ov.gif                   |  Bin 94 -> 94 bytes
 .../obj16/testfile_obj.gif                         |  Bin 370 -> 370 bytes
 .../org.eclipse.jdt.ui/obj16/correction_cast.png   |  Bin 326 -> 329 bytes
 .../org.eclipse.jdt.ui/obj16/correction_move.png   |  Bin 339 -> 500 bytes
 .../obj16/correction_multi_fix.gif                 |  Bin 0 -> 588 bytes
 .../images/org.eclipse.jdt.ui/obj16/jar_obj.png    |  Bin 761 -> 569 bytes
 .../org.eclipse.jdt.ui/obj16/jar_src_obj.png       |  Bin 782 -> 667 bytes
 .../ovr16/error_co_buildpath.png                   |  Bin 0 -> 303 bytes
 .../org.eclipse.jdt.ui/ovr16/transient_co.png      |  Bin 0 -> 178 bytes
 .../plugins/org.eclipse.jdt.doc.user/notices.html  |    4 +-
 .../breakpoints/images/ref-breakpoint_caught.PNG   |  Bin 25140 -> 17310 bytes
 .../images/ref-breakpoint_condition.PNG            |  Bin 28557 -> 20847 bytes
 .../breakpoints/images/ref-breakpoint_enabled.PNG  |  Bin 28595 -> 20729 bytes
 .../breakpoints/images/ref-breakpoint_entry.PNG    |  Bin 29913 -> 20531 bytes
 .../breakpoints/images/ref-breakpoint_exit.PNG     |  Bin 29923 -> 20477 bytes
 .../breakpoints/images/ref-breakpoint_hitcount.PNG |  Bin 28495 -> 20719 bytes
 .../images/ref-breakpoint_suspendpolicy.PNG        |  Bin 28472 -> 20771 bytes
 .../images/ref-breakpoint_suspendsubclass.PNG      |  Bin 24512 -> 17342 bytes
 .../breakpoints/images/ref-breakpoint_uncaught.PNG |  Bin 24488 -> 17356 bytes
 .../images/ref-watchpoint_access_option.PNG        |  Bin 21882 -> 15260 bytes
 .../breakpoints/images/ref-watchpoint_mod.PNG      |  Bin 21821 -> 15269 bytes
 .../reference/breakpoints/ref-access_option.htm    |    6 +-
 .../reference/breakpoints/ref-caught_option.htm    |    6 +-
 .../reference/breakpoints/ref-condition_option.htm |    6 +-
 .../reference/breakpoints/ref-enabled_option.htm   |    4 +-
 .../reference/breakpoints/ref-entry_option.htm     |    6 +-
 .../reference/breakpoints/ref-exit_option.htm      |    6 +-
 .../reference/breakpoints/ref-hitcount_option.htm  |    4 +-
 .../breakpoints/ref-modification_option.htm        |    6 +-
 .../breakpoints/ref-suspendpolicy_option.htm       |   10 +-
 .../breakpoints/ref-suspendsubclass_option.htm     |    6 +-
 .../reference/breakpoints/ref-uncaught_option.htm  |    6 +-
 .../formatter-condense-multi-lines-comments.png    |  Bin 0 -> 1134 bytes
 .../images/formatter-disabling-enabling-tags.png   |  Bin 0 -> 7427 bytes
 .../images/formatter-join-lines-after.png          |  Bin 2925 -> 2925 bytes
 .../images/formatter-join-lines-before.png         |  Bin 2785 -> 2785 bytes
 ...formatter-prefer-wrapping-outer-expressions.png |  Bin 0 -> 1731 bytes
 .../reference/menus/run/ref-dll_debug.htm          |    2 +-
 .../reference/menus/run/ref-rll_run.htm            |    4 +-
 .../java/codestyle/ref-preferences-cleanup.htm     |   10 +-
 .../java/codestyle/ref-preferences-formatter.htm   |   10 +-
 .../java/compiler/ref-preferences-building.htm     |    2 +-
 .../compiler/ref-preferences-errors-warnings.htm   |   94 +-
 .../reference/preferences/java/debug/ref-debug.htm |    2 +-
 .../java/debug/ref-detail_formatters.htm           |   16 +-
 .../java/debug/ref-primitive_display_options.htm   |    4 +-
 .../preferences/java/ref-preferences-compiler.htm  |    1 +
 .../reference/preferences/ref-preferences-java.htm |    6 +-
 .../preferences/run-debug/ref-console.htm          |   10 +-
 .../run-debug/ref-launch_configurations.htm        |    4 +-
 .../preferences/run-debug/ref-perspectives.htm     |    2 +-
 .../preferences/run-debug/ref-run_debug.htm        |   18 +-
 .../run-debug/ref-string_substitution.htm          |    2 +-
 .../preferences/run-debug/ref-view_management.htm  |    4 +-
 .../reference/ref-actions-toolbar.htm              |    6 +-
 .../reference/ref-apt-factoryPath.htm              |   12 +-
 .../reference/ref-apt-factoryPathOptions.htm       |    4 +-
 .../reference/ref-dialog-java-element-filters.htm  |    4 +-
 .../reference/ref-dialog-java-search.htm           |  155 +-
 .../reference/ref-dialog-javadoc-location.htm      |    4 +-
 .../reference/ref-dialog-tostring.htm              |   15 +
 .../reference/ref-icons.htm                        |   84 +-
 .../reference/ref-java-editor-formatter.htm        |  116 +
 .../reference/ref-java-editor-quickassist.htm      |    4 +-
 .../reference/ref-java-editor-quickfix.htm         |    4 +-
 .../reference/ref-jdt-faq.htm                      |    2 +-
 .../reference/ref-menu-navigate.htm                |   74 +-
 .../reference/ref-menu-refactor.htm                |   13 +-
 .../reference/ref-properties-build-path.htm        |    9 +-
 .../reference/ref-tostring-listcontent.htm         |    4 +-
 .../reference/ref-tostring-styles.htm              |    2 +-
 .../reference/ref-wizard-class.htm                 |    2 +-
 .../reference/ref-wizard-enum.htm                  |    2 +-
 .../reference/ref-wizard-java-project.htm          |   26 +-
 .../images/ref-views_breakpoint_details.PNG        |  Bin 0 -> 12490 bytes
 .../views/breakpoints/ref-breakpoints_view.htm     |   79 +-
 .../reference/views/expressions/ref-addwatch.htm   |    2 +-
 .../views/expressions/ref-expressions_view.htm     |    4 +-
 .../reference/views/ref-call-hierarchy.htm         |   23 +-
 .../reference/views/ref-java-editor.htm            |    4 +-
 .../reference/views/ref-type-hierarchy.htm         |    8 +-
 .../reference/views/ref-viewsandeditors.htm        |    8 +-
 .../reference/views/shared/ref-changevarvalue.htm  |    2 +-
 .../reference/views/shared/ref-forcereturn.htm     |    2 +-
 .../views/variables/ref-variables_view.htm         |    4 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-202.htm   |    2 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-33.htm    |    4 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-62.htm    |    4 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-63a.htm   |    2 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-74.htm    |    4 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-75.htm    |    4 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-76.htm    |    2 +-
 .../org.eclipse.jdt.doc.user/tasks/tasks-77.htm    |    4 +-
 .../tasks/tasks-java-local-configuration.htm       |    9 +-
 .../tips/images/build-path-error-decorator.png     |  Bin 0 -> 6940 bytes
 .../tips/images/hierarchy-lockview.png             |  Bin 7354 -> 18479 bytes
 .../tips/images/nls-problem-search.png             |  Bin 5638 -> 5610 bytes
 .../org.eclipse.jdt.debug.ui/all-instances.png     |  Bin 0 -> 8629 bytes
 .../breakpoint_condition.png                       |  Bin 6050 -> 4048 bytes
 .../class-load-breakpoint.png                      |  Bin 0 -> 17163 bytes
 .../debug-by-writing-to-console.png                |  Bin 0 -> 5934 bytes
 .../org.eclipse.jdt.debug.ui/method-breakpoint.png |  Bin 0 -> 10209 bytes
 .../org.eclipse.jdt.debug.ui/select-columns.png    |  Bin 0 -> 11479 bytes
 .../org.eclipse.jdt.debug.ui/show-references.png   |  Bin 0 -> 19846 bytes
 .../variable-view-columns.png                      |  Bin 0 -> 11991 bytes
 .../watchpoint_properties.png                      |  Bin 6581 -> 17940 bytes
 .../tips/images/package-abbreviations-off.png      |  Bin 0 -> 6757 bytes
 .../tips/images/package-abbreviations-on.png       |  Bin 0 -> 6601 bytes
 .../tips/images/sort-by-def.png                    |  Bin 5539 -> 11050 bytes
 .../org.eclipse.jdt.doc.user/tips/jdt_tips.html    |  168 +-
 .../org.eclipse.jdt.doc.user/topics_Reference.xml  |    1 +
 .../whatsNew/images/annotations-in-javadoc.png     |  Bin 0 -> 10352 bytes
 .../background-computation-of-type-hierarchy.png   |  Bin 0 -> 20643 bytes
 .../whatsNew/images/bp-details.png                 |  Bin 0 -> 25393 bytes
 .../whatsNew/images/browser-preferences.png        |  Bin 0 -> 11332 bytes
 .../whatsNew/images/build-path-dot-dot-path.png    |  Bin 11747 -> 0 bytes
 .../images/build-path-duplicate-entries.png        |  Bin 8413 -> 0 bytes
 .../whatsNew/images/build-path-error-decorator.png |  Bin 0 -> 6940 bytes
 .../whatsNew/images/build-path-invalid-dups.png    |  Bin 7929 -> 0 bytes
 .../whatsNew/images/build-path-problems.png        |  Bin 0 -> 9783 bytes
 .../whatsNew/images/class-path-header.png          |  Bin 20679 -> 0 bytes
 .../images/comparing-identical-values-example.png  |  Bin 4529 -> 0 bytes
 .../images/compiler-deadcode-diagnosis.png         |  Bin 7013 -> 0 bytes
 .../images/compiler-hashcode-diagnosis.png         |  Bin 2966 -> 0 bytes
 .../whatsNew/images/compliance-follows-ee.png      |  Bin 8991 -> 0 bytes
 .../whatsNew/images/constructor-completion.png     |  Bin 8423 -> 0 bytes
 .../whatsNew/images/delete-working-set.png         |  Bin 15993 -> 0 bytes
 .../whatsNew/images/dynamic-structure-compare.png  |  Bin 13370 -> 0 bytes
 .../whatsNew/images/edit-test-method.png           |  Bin 0 -> 8199 bytes
 .../whatsNew/images/expand-with-constructors.png   |  Bin 19659 -> 0 bytes
 .../whatsNew/images/export-all-profiles.png        |  Bin 0 -> 4900 bytes
 .../whatsNew/images/extract-method-continue.png    |  Bin 0 -> 1875 bytes
 .../extract-method-multiple-return-values.png      |  Bin 0 -> 8749 bytes
 .../images/find-externalized-strings-constants.png |  Bin 0 -> 7229 bytes
 ...matter-align-annotation-arguments-formatted.png |  Bin 0 -> 1137 bytes
 ...atter-align-annotation-arguments-preference.png |  Bin 0 -> 2502 bytes
 ...ormatter-align-method-declaration-formatted.png |  Bin 0 -> 1741 bytes
 ...rmatter-align-method-declaration-preference.png |  Bin 0 -> 2105 bytes
 ...ter-condense-multi-lines-comments-formatted.png |  Bin 0 -> 1134 bytes
 ...er-condense-multi-lines-comments-preference.png |  Bin 0 -> 2478 bytes
 ...formatter-disabling-enabling-tags-formatted.png |  Bin 0 -> 7427 bytes
 ...ormatter-disabling-enabling-tags-preference.png |  Bin 0 -> 12725 bytes
 .../formatter-new-line-after-label-formatted.png   |  Bin 0 -> 903 bytes
 .../formatter-new-line-after-label-preference.png  |  Bin 0 -> 2577 bytes
 ...prefer-wrapping-outer-expressions-formatted.png |  Bin 0 -> 1731 bytes
 ...refer-wrapping-outer-expressions-preference.png |  Bin 0 -> 3691 bytes
 ...matter-skip-first-column-comments-formatted.png |  Bin 0 -> 1376 bytes
 ...atter-skip-first-column-comments-preference.png |  Bin 0 -> 3654 bytes
 .../whatsNew/images/generate-tostring-dialog.png   |  Bin 32126 -> 0 bytes
 .../whatsNew/images/hashcode-and-equals-wizard.png |  Bin 6683 -> 0 bytes
 .../whatsNew/images/instance-counts.png            |  Bin 0 -> 10770 bytes
 .../whatsNew/images/jar-export.png                 |  Bin 8618 -> 0 bytes
 .../whatsNew/images/java-compare-assist.png        |  Bin 10857 -> 0 bytes
 .../whatsNew/images/java-compare-hover.png         |  Bin 10706 -> 0 bytes
 .../whatsNew/images/java-compare-hyperlinking.png  |  Bin 12009 -> 0 bytes
 .../whatsNew/images/java-compare-outline.png       |  Bin 8094 -> 0 bytes
 .../whatsNew/images/javadoc-header-links.png       |  Bin 5332 -> 0 bytes
 .../whatsNew/images/javadoc-hover.png              |  Bin 9345 -> 0 bytes
 .../whatsNew/images/junit-import-url.png           |  Bin 0 -> 11123 bytes
 .../whatsNew/images/junit-view-import.png          |  Bin 8942 -> 0 bytes
 .../whatsNew/images/missing-synchronized.png       |  Bin 5843 -> 0 bytes
 .../images/move-type-to-new-file-refactoring.png   |  Bin 0 -> 10598 bytes
 .../whatsNew/images/multifix-problem-hover.png     |  Bin 0 -> 4522 bytes
 .../images/open-implementation-command.png         |  Bin 0 -> 2855 bytes
 .../whatsNew/images/open-implementation.png        |  Bin 4709 -> 0 bytes
 .../whatsNew/images/open-in-junit-view.png         |  Bin 4037 -> 0 bytes
 .../whatsNew/images/open-in-properties-file.png    |  Bin 7895 -> 0 bytes
 .../whatsNew/images/open-type.png                  |  Bin 14199 -> 0 bytes
 .../whatsNew/images/override.png                   |  Bin 0 -> 6236 bytes
 .../whatsNew/images/package-abbreviations-off.png  |  Bin 0 -> 6743 bytes
 .../whatsNew/images/package-abbreviations-on.png   |  Bin 0 -> 6613 bytes
 .../images/preference-transfer-appearance.png      |  Bin 0 -> 9942 bytes
 .../whatsNew/images/preference-transfer-code.png   |  Bin 0 -> 10022 bytes
 .../images/preference-transfer-compiler.png        |  Bin 0 -> 10118 bytes
 .../whatsNew/images/refresh-element-action.png     |  Bin 0 -> 5626 bytes
 .../whatsNew/images/remove-from-view-action.png    |  Bin 0 -> 11248 bytes
 .../whatsNew/images/rename-in-workspace.png        |  Bin 2356 -> 0 bytes
 .../whatsNew/images/runnable-jar-in-jar-export.png |  Bin 21332 -> 0 bytes
 .../whatsNew/images/sort-working-sets.png          |  Bin 6685 -> 0 bytes
 .../source-attachments-in-referenced-JARs.png      |  Bin 0 -> 17017 bytes
 .../whatsNew/images/suppress-optional-errors.png   |  Bin 0 -> 6549 bytes
 .../whatsNew/images/switch-case-fall-through.png   |  Bin 4382 -> 0 bytes
 .../whatsNew/images/unused-object-allocation.png   |  Bin 0 -> 6302 bytes
 .../whatsNew/images/value-in-javadoc.png           |  Bin 0 -> 7031 bytes
 .../whatsNew/jdt_whatsnew.html                     |  714 +-
 .../.classpath                                     |    0
 .../plugins/org.eclipse.jdt.junit.core/.project    |   34 +
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.launching.prefs      |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.prefs                |    0
 .../META-INF/MANIFEST.MF                           |   29 +
 .../about.html                                     |    0
 .../org.eclipse.jdt.junit.core/build.properties    |   20 +
 .../org.eclipse.jdt.junit.core/plugin.properties   |   77 +
 .../plugins/org.eclipse.jdt.junit.core/plugin.xml  |  126 +
 .../schema/internal_testKinds.exsd                 |    0
 .../schema/testRunListeners.exsd                   |  116 +
 .../scripts/exportplugin.xml                       |   57 +
 .../jdt/internal/junit/BasicElementLabels.java     |  132 +
 .../jdt/internal/junit/JUnitCorePlugin.java        |  281 +
 .../eclipse/jdt/internal/junit/JUnitMessages.java  |   65 +
 .../jdt/internal/junit/JUnitMessages.properties    |   29 +
 .../internal/junit/JUnitPreferencesConstants.java  |  150 +
 .../jdt/internal/junit/JUnitPropertyTester.java    |  120 +
 .../internal/junit/JunitPreferenceInitializer.java |   66 +
 .../org/eclipse/jdt/internal/junit/Messages.java   |    0
 .../internal/junit/buildpath/BuildPathSupport.java |  179 +
 .../junit/buildpath/JUnitContainerInitializer.java |  255 +
 .../junit/buildpath/JUnitHomeInitializer.java      |   60 +
 .../jdt/internal/junit/buildpath/P2Utils.java      |  139 +
 .../junit/launcher/ContainerComparator.java        |    0
 .../jdt/internal/junit/launcher/ITestFinder.java   |    0
 .../jdt/internal/junit/launcher/ITestKind.java     |    0
 .../internal/junit/launcher/JUnit3TestFinder.java  |   96 +
 .../internal/junit/launcher/JUnit4TestFinder.java  |  256 +
 .../JUnitLaunchConfigurationConstants.java         |   80 +
 .../junit/launcher/JUnitMigrationDelegate.java     |    0
 .../junit/launcher/JUnitRuntimeClasspathEntry.java |    0
 .../jdt/internal/junit/launcher/TestKind.java      |  129 +
 .../internal/junit/launcher/TestKindRegistry.java  |  146 +
 .../internal/junit/launcher/TestSearchResult.java  |    0
 .../internal/junit/model/ITestRunListener2.java    |    0
 .../junit/model/ITestRunSessionListener.java       |    0
 .../internal/junit/model/ITestSessionListener.java |    0
 .../eclipse/jdt/internal/junit/model/IXMLTags.java |   83 +
 .../jdt/internal/junit/model/JUnitModel.java       |  569 ++
 .../jdt/internal/junit/model/ModelMessages.java    |   29 +
 .../internal/junit/model/ModelMessages.properties  |   14 +
 .../junit/model/RemoteTestRunnerClient.java        |  552 ++
 .../jdt/internal/junit/model/TestCaseElement.java  |   75 +
 .../jdt/internal/junit/model/TestElement.java      |    0
 .../eclipse/jdt/internal/junit/model/TestRoot.java |    0
 .../jdt/internal/junit/model/TestRunHandler.java   |  269 +
 .../junit/model/TestRunListenerAdapter.java        |  139 +
 .../jdt/internal/junit/model/TestRunSession.java   |  826 ++
 .../junit/model/TestRunSessionSerializer.java      |  262 +
 .../jdt/internal/junit/model/TestSuiteElement.java |    0
 .../internal/junit/util/CoreTestSearchEngine.java  |  255 +
 .../internal/junit/util/IJUnitStatusConstants.java |    0
 .../org/eclipse/jdt/junit/ITestRunListener.java    |    0
 .../src/org/eclipse/jdt/junit/JUnitCore.java       |  133 +
 .../src/org/eclipse/jdt/junit/TestRunListener.java |   94 +
 .../launcher/JUnitLaunchConfigurationDelegate.java |  456 +
 .../org/eclipse/jdt/junit/launcher/package.html    |    0
 .../eclipse/jdt/junit/model/ITestCaseElement.java  |    0
 .../org/eclipse/jdt/junit/model/ITestElement.java  |  190 +
 .../jdt/junit/model/ITestElementContainer.java     |    0
 .../eclipse/jdt/junit/model/ITestRunSession.java   |   43 +
 .../eclipse/jdt/junit/model/ITestSuiteElement.java |    0
 .../src/org/eclipse/jdt/junit/model/package.html   |    0
 .../src/org/eclipse/jdt/junit/package.html         |    0
 .../org.eclipse.jdt.junit.runtime/.classpath       |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |   10 +-
 .../.settings/org.eclipse.pde.prefs                |   15 +-
 .../META-INF/MANIFEST.MF                           |    6 +-
 .../org.eclipse.jdt.junit.runtime/build.properties |    3 +-
 .../plugin.properties                              |    4 +-
 .../internal/junit/runner/RemoteTestRunner.java    |    8 +-
 eclipse/plugins/org.eclipse.jdt.junit/.classpath   |    1 +
 .../org.eclipse.jdt.junit/META-INF/MANIFEST.MF     |   14 +-
 .../plugins/org.eclipse.jdt.junit/build.properties |    5 +-
 .../junit/launcher/TestSelectionDialog.java        |   82 +
 .../org.eclipse.jdt.junit/plugin.properties        |    3 +-
 eclipse/plugins/org.eclipse.jdt.junit/plugin.xml   |  154 +-
 .../schema/testRunListeners.exsd                   |  127 -
 .../jdt/internal/junit/BasicElementLabels.java     |  134 -
 .../jdt/internal/junit/JUnitPropertyTester.java    |  119 -
 .../internal/junit/buildpath/BuildPathSupport.java |  179 -
 ...ClasspathVariableMarkerResolutionGenerator.java |    7 +-
 .../junit/buildpath/JUnitContainerInitializer.java |  257 -
 .../junit/buildpath/JUnitContainerWizardPage.java  |   14 +-
 .../junit/buildpath/JUnitHomeInitializer.java      |   60 -
 .../jdt/internal/junit/buildpath/P2Utils.java      |  187 -
 .../internal/junit/launcher/AssertionVMArg.java    |   15 +-
 .../internal/junit/launcher/JUnit3TestFinder.java  |   97 -
 .../internal/junit/launcher/JUnit4TestFinder.java  |  259 -
 .../JUnitLaunchConfigurationConstants.java         |   80 -
 .../junit/launcher/LaunchErrorStatusHandler.java   |   57 +
 .../jdt/internal/junit/launcher/TestKind.java      |  129 -
 .../internal/junit/launcher/TestKindRegistry.java  |  139 -
 .../junit/launcher/TestSelectionDialog.java        |   76 -
 .../eclipse/jdt/internal/junit/model/IXMLTags.java |   81 -
 .../jdt/internal/junit/model/JUnitModel.java       |  543 --
 .../jdt/internal/junit/model/ModelMessages.java    |   27 -
 .../internal/junit/model/ModelMessages.properties  |   12 -
 .../junit/model/RemoteTestRunnerClient.java        |  552 --
 .../jdt/internal/junit/model/TestCaseElement.java  |   64 -
 .../jdt/internal/junit/model/TestRunHandler.java   |  253 -
 .../junit/model/TestRunListenerAdapter.java        |  139 -
 .../jdt/internal/junit/model/TestRunSession.java   |  816 --
 .../junit/model/TestRunSessionSerializer.java      |  227 -
 .../junit/refactoring/TypeRenameParticipant.java   |    7 +-
 .../internal/junit/ui/EnableStackFilterAction.java |    8 +-
 .../jdt/internal/junit/ui/FailureTrace.java        |    7 +-
 .../internal/junit/ui/JUnitAddLibraryProposal.java |    5 +-
 .../junit/ui/JUnitClasspathFixProcessor.java       |    5 +-
 .../jdt/internal/junit/ui/JUnitMessages.java       |   65 +-
 .../jdt/internal/junit/ui/JUnitMessages.properties |   49 +-
 .../eclipse/jdt/internal/junit/ui/JUnitPlugin.java |  175 +-
 .../jdt/internal/junit/ui/JUnitPreferencePage.java |   45 +-
 .../junit/ui/JUnitPreferencesConstants.java        |  120 -
 .../internal/junit/ui/JUnitQuickFixProcessor.java  |    8 +-
 .../junit/ui/JunitPreferenceInitializer.java       |   45 -
 .../jdt/internal/junit/ui/OpenEditorAction.java    |   11 +-
 .../junit/ui/TestMethodSelectionDialog.java        |    7 +-
 .../jdt/internal/junit/ui/TestRunnerViewPart.java  |  286 +-
 .../jdt/internal/junit/ui/UITestRunListener.java   |   30 +
 .../jdt/internal/junit/util/JUnitStubUtility.java  |   11 +-
 .../eclipse/jdt/internal/junit/util/Resources.java |    8 +-
 .../jdt/internal/junit/util/TestSearchEngine.java  |  199 +-
 .../junit/wizards/NewTestCaseCreationWizard.java   |    7 +-
 .../junit/wizards/SuiteClassesContentProvider.java |   12 +-
 .../internal/junit/wizards/UpdateTestSuite.java    |   10 +-
 .../jdt/internal/junit/wizards/WizardMessages.java |    6 +-
 .../junit/wizards/WizardMessages.properties        |   14 +-
 .../src/org/eclipse/jdt/junit/JUnitCore.java       |  102 -
 .../src/org/eclipse/jdt/junit/TestRunListener.java |   78 -
 .../launcher/JUnitLaunchConfigurationDelegate.java |  506 --
 .../launcher/JUnitLaunchConfigurationTab.java      |  241 +-
 .../jdt/junit/launcher/JUnitLaunchShortcut.java    |    5 +-
 .../org/eclipse/jdt/junit/model/ITestElement.java  |  190 -
 .../eclipse/jdt/junit/model/ITestRunSession.java   |   33 -
 .../junit/wizards/NewTestCaseWizardPageOne.java    |   27 +-
 .../jdt/junit/wizards/NewTestSuiteWizardPage.java  |   21 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../plugin.properties                              |    4 +-
 .../junit4/runner/FailuresFirstSorter.java         |   75 +
 .../junit4/runner/JUnit4TestClassReference.java    |    6 +-
 .../internal/junit4/runner/JUnit4TestLoader.java   |   17 +-
 .../junit4/runner/JUnit4TestMethodReference.java   |    6 +-
 .../junit4/runner/JUnit4TestReference.java         |    7 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../macosx/MacOSXLauncherMessages.properties       |    5 +-
 .../launching/macosx/MacOSXVMInstallType.java      |  126 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugins/org.eclipse.jdt.launching/.classpath   |    2 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  200 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.jdt.launching/META-INF/MANIFEST.MF |    4 +-
 .../org.eclipse.jdt.launching/build.properties     |    3 +-
 .../launching/JREContainerInitializer.java         |   41 +-
 .../internal/launching/JavaSourceLookupUtil.java   |    3 +-
 .../jdt/internal/launching/LaunchingPlugin.java    |  173 +-
 .../internal/launching/RuntimeClasspathEntry.java  |    4 +-
 .../jdt/internal/launching/StandardVMType.java     |   45 +-
 .../environments/DefaultAccessRuleParticipant.java |    5 +-
 .../environments/ExecutionEnvironmentAnalyzer.java |   10 +-
 .../eclipse/jdt/launching/AbstractVMInstall.java   |    4 +-
 .../eclipse/jdt/launching/AbstractVMRunner.java    |   14 +-
 .../org/eclipse/jdt/launching/JavaRuntime.java     |  346 +-
 .../org.eclipse.jdt.launching/plugin.properties    |   15 +-
 .../plugins/org.eclipse.jdt.launching/plugin.xml   |    9 +-
 .../scripts/customBuild.xml                        |   28 -
 eclipse/plugins/org.eclipse.jdt.ui/.classpath      |    1 +
 .../Build Jar in Jar Loader.launch                 |    7 +-
 .../org.eclipse.jdt.ui/.settings/.api_filters      |    8 +
 .../org.eclipse.jdt.ui/JavadocHoverStyleSheet.css  |    4 +-
 .../org.eclipse.jdt.ui/JavadocViewStyleSheet.css   |    4 +-
 .../org.eclipse.jdt.ui/META-INF/MANIFEST.MF        |   10 +-
 .../plugins/org.eclipse.jdt.ui/build.properties    |    9 +-
 .../jdt/internal/corext/CorextMessages.java        |    5 +-
 .../jdt/internal/corext/CorextMessages.properties  |    5 +-
 .../eclipse/jdt/internal/corext/SourceRange.java   |  119 -
 .../jdt/internal/corext/SourceRangeFactory.java    |   29 +
 .../corext/callhierarchy/CallerMethodWrapper.java  |   18 +-
 .../corext/callhierarchy/MethodWrapper.java        |   10 +
 .../AddCustomConstructorOperation.java             |   10 +-
 .../AddDelegateMethodsOperation.java               |   11 +-
 .../codemanipulation/AddGetterSetterOperation.java |   56 +-
 .../codemanipulation/AddImportsOperation.java      |   19 +-
 .../codemanipulation/AddJavaDocStubOperation.java  |   20 +-
 .../AddUnimplementedConstructorsOperation.java     |    6 +-
 .../AddUnimplementedMethodsOperation.java          |    7 +-
 .../codemanipulation/CodeGenerationMessages.java   |    3 -
 .../CodeGenerationMessages.properties              |   10 +-
 .../ContextSensitiveImportRewriteContext.java      |   31 +-
 .../GenerateHashCodeEqualsOperation.java           |   25 +-
 .../codemanipulation/OrganizeImportsOperation.java |    4 +-
 .../corext/codemanipulation/StubUtility.java       |   23 +-
 .../corext/codemanipulation/StubUtility2.java      |   20 +-
 .../GenerateToStringOperation.java                 |    4 +-
 .../jdt/internal/corext/dom/ASTNodeFactory.java    |    1 +
 .../eclipse/jdt/internal/corext/dom/ASTNodes.java  |   85 +-
 .../eclipse/jdt/internal/corext/dom/Bindings.java  |   57 +-
 .../jdt/internal/corext/dom/LinkedNodeFinder.java  |    6 +-
 .../jdt/internal/corext/dom/NodeFinder.java        |  169 -
 .../jdt/internal/corext/dom/ScopeAnalyzer.java     |   16 +-
 .../corext/dom/fragments/ASTFragmentFactory.java   |   24 +-
 .../AssociativeInfixExpressionFragment.java        |   27 +-
 .../jdt/internal/corext/dom/fragments/Util.java    |   29 +-
 .../fix/AddUnimplementedMethodsOperation.java      |   16 +-
 .../jdt/internal/corext/fix/CleanUpConstants.java  |  131 +-
 .../corext/fix/CleanUpPostSaveListener.java        |  109 +-
 .../jdt/internal/corext/fix/CodeStyleFix.java      |   20 +-
 .../corext/fix/ConvertIterableLoopOperation.java   |    4 +-
 .../jdt/internal/corext/fix/ExpressionsFix.java    |    4 +-
 .../jdt/internal/corext/fix/FixMessages.java       |   10 +-
 .../jdt/internal/corext/fix/FixMessages.properties |   14 +-
 .../eclipse/jdt/internal/corext/fix/Java50Fix.java |   82 +-
 .../eclipse/jdt/internal/corext/fix/StringFix.java |    7 +-
 .../jdt/internal/corext/fix/UnusedCodeFix.java     |   16 +-
 .../corext/fix/VariableDeclarationFix.java         |   61 +-
 .../corext/javadoc/JavaDocCommentReader.java       |    9 +-
 .../internal/corext/javadoc/JavaDocLocations.java  |   38 +-
 .../template/java/JavaTemplateMessages.properties  |    5 +-
 .../internal/corext/template/java/TemplateSet.java |   20 +-
 .../corext/util/DelegateEntryComparator.java       |   81 +
 .../eclipse/jdt/internal/corext/util/History.java  |    4 +-
 .../jdt/internal/corext/util/JavaModelUtil.java    |   45 +-
 .../util/MethodsSourcePositionComparator.java      |  133 +
 .../jdt/internal/corext/util/OpenTypeHistory.java  |    6 +-
 .../jdt/internal/corext/util/Resources.java        |    8 +-
 .../eclipse/jdt/internal/corext/util/Strings.java  |   91 +-
 .../jdt/internal/corext/refactoring/Checks.java    |   22 +-
 .../internal/corext/refactoring/ExceptionInfo.java |   29 +-
 .../refactoring/RefactoringAvailabilityTester.java |   14 +-
 .../refactoring/RefactoringCoreMessages.java       |  179 +-
 .../corext/refactoring/TypeContextChecker.java     |    7 +-
 .../corext/refactoring/base/JavaStatusContext.java |    4 +-
 .../corext/refactoring/code/CallInliner.java       |    7 +-
 .../code/ConvertAnonymousToNestedRefactoring.java  |    4 +-
 .../code/ExtractConstantRefactoring.java           |   29 +-
 .../refactoring/code/ExtractMethodAnalyzer.java    |  135 +-
 .../refactoring/code/ExtractMethodRefactoring.java |  122 +-
 .../refactoring/code/ExtractTempRefactoring.java   |   27 +-
 .../code/InlineConstantRefactoring.java            |   45 +-
 .../refactoring/code/InlineTempRefactoring.java    |   52 +-
 .../code/IntroduceFactoryRefactoring.java          |   13 +-
 .../code/IntroduceIndirectionRefactoring.java      |   23 +-
 .../code/IntroduceParameterRefactoring.java        |    7 +-
 .../code/ReplaceInvocationsRefactoring.java        |    4 +-
 .../corext/refactoring/code/SnippetFinder.java     |   31 +-
 .../corext/refactoring/code/SourceProvider.java    |   36 +-
 .../corext/refactoring/code/TargetProvider.java    |   57 +-
 .../corext/refactoring/code/flow/FlowInfo.java     |   41 +-
 .../refactoring/code/flow/InputFlowAnalyzer.java   |    7 +-
 .../generics/InferTypeArgumentsRefactoring.java    |    9 +-
 .../generics/InferTypeArgumentsTCModel.java        |   10 +-
 .../corext/refactoring/nls/NLSHintHelper.java      |   28 +-
 .../corext/refactoring/nls/NLSMessages.properties  |    4 +-
 .../corext/refactoring/nls/NLSRefactoring.java     |    2 +-
 .../corext/refactoring/nls/NLSScanner.java         |   21 +-
 .../refactoring/nls/PropertyFileDocumentModel.java |   15 +-
 .../nls/changes/NLSChangesMessages.java            |    4 +-
 .../nls/changes/NLSChangesMessages.properties      |    4 +-
 .../corext/refactoring/refactoring.properties      |  138 +-
 .../refactoring/rename/RefactoringAnalyzeUtil.java |    8 +-
 .../refactoring/rename/RenameAnalyzeUtil.java      |   16 +-
 .../refactoring/rename/RenameFieldProcessor.java   |    4 +-
 .../rename/RenameLocalVariableProcessor.java       |    2 +-
 .../refactoring/rename/RenameMethodProcessor.java  |    4 +-
 .../rename/RenameNonVirtualMethodProcessor.java    |    4 +-
 .../refactoring/rename/RenamePackageProcessor.java |   21 +-
 .../rename/RenameTypeParameterProcessor.java       |  149 +-
 .../corext/refactoring/reorg/IReorgPolicy.java     |    6 +-
 .../refactoring/reorg/JavaDeleteProcessor.java     |   18 +-
 .../refactoring/reorg/JavaMoveProcessor.java       |   11 +-
 .../corext/refactoring/reorg/ParentChecker.java    |   86 +-
 .../refactoring/reorg/ReorgPolicyFactory.java      |  144 +-
 .../corext/refactoring/reorg/ReorgUtils.java       |   22 +-
 .../corext/refactoring/sef/AccessAnalyzer.java     |    6 +-
 .../sef/SelfEncapsulateFieldRefactoring.java       |   31 +-
 .../refactoring/structure/ASTNodeSearchUtil.java   |    7 +-
 .../structure/ChangeSignatureProcessor.java        |   51 +-
 .../structure/ChangeTypeRefactoring.java           |    4 +-
 .../structure/CompilationUnitRewrite.java          |   38 +-
 .../structure/ExtractClassRefactoring.java         |    4 +-
 .../structure/ExtractInterfaceProcessor.java       |   51 +-
 .../structure/ExtractSupertypeProcessor.java       |   19 +-
 .../refactoring/structure/ImportRewriteUtil.java   |   17 +-
 .../IntroduceParameterObjectProcessor.java         |   27 +-
 .../structure/MemberVisibilityAdjustor.java        |    4 +-
 .../structure/MoveInnerToTopRefactoring.java       |   19 +-
 .../structure/MoveInstanceMethodProcessor.java     |   14 +-
 .../structure/MoveStaticMemberAnalyzer.java        |   26 +-
 .../structure/MoveStaticMembersProcessor.java      |   37 +-
 .../structure/ParameterObjectFactory.java          |   34 +-
 .../structure/PullUpRefactoringProcessor.java      |   31 +-
 .../structure/PushDownRefactoringProcessor.java    |   12 +-
 .../structure/UseSuperTypeProcessor.java           |    9 +-
 .../constraints/SuperTypeConstraintsCreator.java   |    4 +-
 .../constraints/SuperTypeConstraintsModel.java     |    4 +-
 .../constraints/SuperTypeRefactoringProcessor.java |   10 +-
 .../surround/SurroundWithTryCatchRefactoring.java  |    7 +-
 .../typeconstraints/CompilationUnitRange.java      |   11 +-
 .../typeconstraints/ConstraintCollector.java       |   25 +-
 .../typeconstraints/FullConstraintCreator.java     |   20 +-
 .../corext/refactoring/util/JavaElementUtil.java   |   15 +-
 .../refactoring/util/RefactoringASTParser.java     |    7 +-
 .../util/SelectionAwareSourceRangeComputer.java    |   14 +-
 .../corext/refactoring/util/StatementAnalyzer.java |    4 +-
 .../dictionaries/en_GB.dictionary                  |    2 +
 .../dictionaries/en_US.dictionary                  |    2 +
 .../{external_browser.gif => open_browser.gif}     |  Bin 583 -> 583 bytes
 .../icons/full/dtool16/newjworkingSet_wiz.gif      |  Bin 341 -> 0 bytes
 .../{external_browser.gif => open_browser.gif}     |  Bin 621 -> 621 bytes
 .../icons/full/etool16/newjworkingSet_wiz.gif      |  Bin 589 -> 363 bytes
 .../icons/full/obj16/correction_multi_fix.gif      |  Bin 0 -> 588 bytes
 .../icons/full/ovr16/error_co_buildpath.gif        |  Bin 0 -> 178 bytes
 .../eclipse/jdt/internal/corext/SourceRange.java   |  124 +
 .../jdt/internal/corext/dom/NodeFinder.java        |  173 +
 .../refactoring/changes/CompilationUnitChange.java |   59 +
 .../jdt/internal/ui/dialogs/TypeInfoViewer.java    | 1589 ++++
 .../ui/dialogs/TypeSelectionComponent.java         |  445 +
 .../internal/ui/dialogs/TypeSelectionDialog2.java  |  342 +
 .../ui/refactoring/RefactoringSaveHelper.java      |  236 +
 .../jdt/internal/ui/util/PixelConverter.java       |   68 +
 .../jdt/internal/jarinjarloader/JIJConstants.java  |   35 +
 .../jdt/internal/jarinjarloader/JarRsrcLoader.java |   22 +-
 .../internal/jarinjarloader/RsrcURLConnection.java |    3 +-
 .../jarinjarloader/RsrcURLStreamHandler.java       |    9 +-
 .../RsrcURLStreamHandlerFactory.java               |    3 +-
 .../plugins/org.eclipse.jdt.ui/plugin.properties   |   41 +-
 eclipse/plugins/org.eclipse.jdt.ui/plugin.xml      |  176 +-
 .../templates/default-codetemplates.xml            |    2 +-
 .../ui/refactoring/ChangeExceptionsControl.java    |    6 +-
 .../ui/refactoring/ExtractClassWizard.java         |    3 +-
 .../ui/refactoring/ExtractInterfaceWizard.java     |   20 +-
 .../refactoring/IntroduceIndirectionInputPage.java |    4 +-
 .../internal/ui/refactoring/MoveMembersWizard.java |   13 +-
 .../ui/refactoring/ParameterEditDialog.java        |   14 +-
 .../internal/ui/refactoring/PullUpMemberPage.java  |   71 +-
 .../internal/ui/refactoring/PullUpMethodPage.java  |   10 +-
 .../internal/ui/refactoring/PushDownWizard.java    |   19 +-
 .../ui/refactoring/RefactoringMessages.java        |  116 +-
 .../ui/refactoring/actions/InlineMethodAction.java |   13 +-
 .../actions/RenameJavaElementAction.java           |   24 +-
 .../refactoring/code/ExtractMethodInputPage.java   |   18 +-
 .../ui/refactoring/nls/MultiStateCellEditor.java   |    5 +-
 .../internal/ui/refactoring/nls/NLSUIMessages.java |    3 +-
 .../ui/refactoring/nls/NLSUIMessages.properties    |    3 +-
 .../refactoring/nls/search/NLSSearchMessages.java  |    4 +-
 .../nls/search/NLSSearchMessages.properties        |    3 +-
 .../ui/refactoring/nls/search/NLSSearchQuery.java  |    4 +-
 .../nls/search/NLSSearchResultRequestor.java       |  102 +-
 .../ui/refactoring/refactoringui.properties        |   83 +-
 .../refactoring/reorg/CopyToClipboardAction.java   |  123 +-
 .../ui/refactoring/reorg/DeleteWizard.java         |    8 +-
 .../internal/ui/refactoring/reorg/PasteAction.java |   28 +-
 .../refactoring/reorg/RenameInformationPopup.java  |   12 +-
 .../ui/refactoring/reorg/RenameLinkedMode.java     |    5 +-
 .../ui/refactoring/reorg/ReorgMessages.java        |  113 +-
 .../ui/refactoring/reorg/ReorgMessages.properties  |  120 +-
 .../ui/refactoring/reorg/ReorgMoveWizard.java      |   29 +-
 .../jdt/internal/ui/EditorInputAdapterFactory.java |    4 +-
 .../jdt/internal/ui/IJavaHelpContextIds.java       |   17 +-
 .../jdt/internal/ui/InitializeAfterLoadJob.java    |    6 +-
 .../jdt/internal/ui/JavaElementAdapterFactory.java |    5 +-
 .../ui/JavaHierarchyPerspectiveFactory.java        |   17 +-
 .../jdt/internal/ui/JavaPerspectiveFactory.java    |   23 +-
 .../ui/org/eclipse/jdt/internal/ui/JavaPlugin.java |   11 +-
 .../eclipse/jdt/internal/ui/JavaPluginImages.java  |   14 +-
 .../eclipse/jdt/internal/ui/JavaUIMessages.java    |   75 +-
 .../jdt/internal/ui/JavaUIMessages.properties      |   30 +-
 .../jdt/internal/ui/actions/ActionMessages.java    |   62 +-
 .../internal/ui/actions/ActionMessages.properties  |   75 +-
 .../ui/actions/CopyQualifiedNameAction.java        |   98 +-
 .../internal/ui/actions/JarImportWizardAction.java |    8 +-
 .../jdt/internal/ui/actions/OpenBrowserUtil.java   |   63 +-
 .../ui/actions/OpenExternalBrowserAction.java      |  153 -
 .../internal/ui/actions/SelectionConverter.java    |   42 +-
 .../jdt/internal/ui/browsing/JavaBrowsingPart.java |    7 +-
 .../browsing/JavaBrowsingPerspectiveFactory.java   |   22 +-
 .../jdt/internal/ui/browsing/PackagesView.java     |    5 +-
 .../jdt/internal/ui/browsing/ProjectsView.java     |    6 +-
 .../jdt/internal/ui/browsing/TypesView.java        |    6 +-
 .../CallHierarchyContentProvider.java              |  104 +-
 .../callhierarchy/CallHierarchyLabelProvider.java  |    6 +-
 .../ui/callhierarchy/CallHierarchyMessages.java    |   37 +-
 .../callhierarchy/CallHierarchyMessages.properties |   65 +-
 .../ui/callhierarchy/CallHierarchyViewPart.java    |   81 +-
 .../ui/callhierarchy/CopyCallHierarchyAction.java  |   85 +-
 .../ExpandWithConstructorsConfigurationBlock.java  |  619 ++
 .../ExpandWithConstructorsDialog.java              |   99 +-
 .../ui/callhierarchy/LocationCopyAction.java       |    3 +-
 .../ui/callhierarchy/OpenLocationAction.java       |   14 +-
 .../internal/ui/callhierarchy/RefreshAction.java   |   40 -
 .../ui/callhierarchy/RefreshElementAction.java     |  104 +
 .../ui/callhierarchy/RefreshViewAction.java        |   39 +
 .../ui/callhierarchy/RemoveFromViewAction.java     |  122 +
 .../jdt/internal/ui/compare/CompareMessages.java   |    4 +-
 .../internal/ui/compare/CompareMessages.properties |    8 +-
 .../internal/ui/compare/JavaHistoryActionImpl.java |    4 +-
 .../jdt/internal/ui/compare/JavaMergeViewer.java   |   39 +-
 .../compare/JavaReplaceWithEditionActionImpl.java  |    6 +-
 .../ui/compare/JavaStructureDiffViewer.java        |    5 +-
 .../ui/dialogs/FilteredTypesSelectionDialog.java   |   17 +-
 .../ui/dialogs/GenerateToStringDialog.java         |   31 +-
 .../ui/dnd/ResourceTransferDragAdapter.java        |   13 +-
 .../jdt/internal/ui/filters/FilterMessages.java    |    3 +-
 .../internal/ui/filters/FilterMessages.properties  |    3 +-
 .../internal/ui/filters/InnerClassFilesFilter.java |    3 +-
 .../jdt/internal/ui/fix/AbstractCleanUp.java       |    3 +-
 .../eclipse/jdt/internal/ui/fix/Java50CleanUp.java |   81 +-
 .../jdt/internal/ui/fix/MultiFixMessages.java      |   18 +-
 .../internal/ui/fix/MultiFixMessages.properties    |   18 +-
 .../fix/PotentialProgrammingProblemsCleanUp.java   |    4 +-
 .../internal/ui/fix/SaveParticipantMessages.java   |    8 +-
 .../ui/fix/SaveParticipantMessages.properties      |    7 +-
 .../eclipse/jdt/internal/ui/fix/StringCleanUp.java |   11 +-
 .../internal/ui/infoviews/InfoViewMessages.java    |    5 +-
 .../ui/infoviews/InfoViewMessages.properties       |    5 +-
 .../jdt/internal/ui/infoviews/JavadocView.java     |  134 +-
 .../ui/infoviews/TextSelectionConverter.java       |   17 +-
 .../jdt/internal/ui/jarimport/JarImportWizard.java |    5 +-
 .../internal/ui/jarimport/JarImportWizardPage.java |   10 +-
 .../ui/jarpackager/JarFileExportOperation.java     |   25 +-
 .../internal/ui/jarpackager/JarPackageReader.java  |    4 +-
 .../internal/ui/jarpackager/JarPackageWriter.java  |    2 +-
 .../ui/jarpackager/JarPackagerMessages.java        |    2 -
 .../ui/jarpackager/JarPackagerMessages.properties  |    5 +-
 .../FatJarPackagerMessages.properties              |    4 +-
 .../jarpackagerfat/FatJarRsrcUrlAntExporter.java   |    9 +-
 .../FatJarRsrcUrlManifestProvider.java             |   25 +-
 .../internal/ui/jarpackagerfat/JIJConstants.java   |   33 +
 .../ui/javadocexport/JavadocExportMessages.java    |    7 +-
 .../javadocexport/JavadocExportMessages.properties |    7 +-
 .../internal/ui/javadocexport/JavadocLinkRef.java  |    4 +-
 .../internal/ui/javadocexport/JavadocReader.java   |   16 +-
 .../javadocexport/JavadocSpecificsWizardPage.java  |    7 +-
 .../internal/ui/javadocexport/JavadocWizard.java   |    9 +-
 .../jdt/internal/ui/javaeditor/ASTProvider.java    |   34 +-
 .../ui/javaeditor/ClassFileDocumentProvider.java   |   55 +-
 .../internal/ui/javaeditor/ClassFileEditor.java    |   20 +-
 .../ui/javaeditor/ClassFileEditorInputFactory.java |    4 +-
 .../CompilationUnitDocumentProvider.java           |   77 +-
 .../ui/javaeditor/CompilationUnitEditor.java       |    6 +-
 .../ConstructedJavaEditorMessages.properties       |    8 +-
 .../internal/ui/javaeditor/DocumentAdapter.java    |   65 +-
 .../jdt/internal/ui/javaeditor/EditorUtility.java  |   24 +-
 .../ICompilationUnitDocumentProvider.java          |    9 +-
 .../internal/ui/javaeditor/IJavaAnnotation.java    |   19 +-
 .../javaeditor/InternalClassFileEditorInput.java   |    8 +-
 .../jdt/internal/ui/javaeditor/JavaEditor.java     |   80 +-
 .../ui/javaeditor/JavaEditorBreadcrumb.java        |    8 +-
 .../internal/ui/javaeditor/JavaEditorMessages.java |   22 -
 .../ui/javaeditor/JavaEditorMessages.properties    |   37 +-
 ...JavaElementHyperlinkImplementationDetector.java |    2 +-
 .../JavaElementImplementationHyperlink.java        |  129 +-
 .../internal/ui/javaeditor/JavaTemplatesPage.java  |    4 +-
 .../ui/javaeditor/NLSKeyHyperlinkDetector.java     |    4 +-
 .../javaeditor/OverrideIndicatorImageProvider.java |    4 +-
 .../javaeditor/SemanticHighlightingPresenter.java  |    9 +-
 .../ui/javaeditor/SemanticHighlightings.java       |    5 +-
 .../ui/javaeditor/ToggleCommentAction.java         |   12 +-
 .../ui/javaeditor/breadcrumb/BreadcrumbViewer.java |   33 +-
 .../saveparticipant/SaveParticipantMessages.java   |    3 +-
 .../SaveParticipantMessages.properties             |    5 +-
 .../GoToNextPreviousMemberAction.java              |    5 +-
 .../selectionactions/StructureSelectionAction.java |    7 +-
 .../internal/ui/model/JavaModelLabelProvider.java  |   24 +-
 .../ui/navigator/JavaDropAdapterAssistant.java     |   11 +-
 .../ui/navigator/JavaNavigatorContentProvider.java |    9 +-
 .../jdt/internal/ui/navigator/OpenAndExpand.java   |    6 +-
 .../ui/packageview/FileTransferDropAdapter.java    |    8 +-
 .../PackageExplorerContentProvider.java            |    7 +-
 .../ui/packageview/PackageExplorerPart.java        |   16 +-
 .../PackageExplorerProblemsDecorator.java          |   25 +-
 .../internal/ui/packageview/PackagesMessages.java  |   35 +-
 .../ui/packageview/PackagesMessages.properties     |   42 +-
 .../ui/preferences/AppearancePreferencePage.java   |   57 +-
 .../internal/ui/preferences/BulletListBlock.java   |    6 +-
 .../preferences/CodeAssistConfigurationBlock.java  |   37 +-
 .../CodeAssistFavoritesConfigurationBlock.java     |   20 +-
 .../CodeAssistFavoritesPreferencePage.java         |   11 +-
 .../internal/ui/preferences/CodeTemplateBlock.java |   10 +-
 .../preferences/ComplianceConfigurationBlock.java  |  130 +-
 .../ui/preferences/EditTemplateDialog.java         |   32 +-
 .../ImportOrganizeConfigurationBlock.java          |    2 +-
 .../ui/preferences/JavaBasePreferencePage.java     |    4 +-
 .../JavaEditorAppearanceConfigurationBlock.java    |   10 +-
 .../JavaEditorColoringConfigurationBlock.java      |    8 +-
 .../ui/preferences/JavaElementInfoPage.java        |  151 -
 .../ui/preferences/JavadocConfigurationBlock.java  |   25 +-
 .../JavadocConfigurationPropertyPage.java          |    9 +-
 .../JavadocProblemsConfigurationBlock.java         |   28 +-
 .../preferences/JavadocProblemsPreferencePage.java |   16 +-
 .../preferences/NativeLibrariesPropertyPage.java   |   22 +-
 .../ui/preferences/OptionsConfigurationBlock.java  |   23 +-
 .../ui/preferences/PreferencesMessages.java        |   73 +-
 .../ui/preferences/PreferencesMessages.properties  |  108 +-
 .../ProblemSeveritiesConfigurationBlock.java       |   42 +-
 .../ProblemSeveritiesPreferencePage.java           |   13 +-
 .../preferences/SourceAttachmentPropertyPage.java  |   45 +-
 .../ui/preferences/TodoTaskPreferencePage.java     |   13 +-
 .../ui/preferences/UserLibraryPreferencePage.java  |    4 +-
 .../ui/preferences/cleanup/CleanUpMessages.java    |    4 +-
 .../preferences/cleanup/CleanUpMessages.properties |    7 +-
 .../ui/preferences/cleanup/CleanUpTabPage.java     |   64 +-
 .../ui/preferences/cleanup/MissingCodeTabPage.java |   17 +-
 .../preferences/formatter/AlreadyExistsDialog.java |   20 +-
 .../ui/preferences/formatter/BracesTabPage.java    |   22 +-
 .../ui/preferences/formatter/CommentsTabPage.java  |   96 +-
 .../formatter/ControlStatementsTabPage.java        |   20 +-
 .../preferences/formatter/CreateProfileDialog.java |   19 +-
 .../preferences/formatter/FormatterMessages.java   |   29 +-
 .../formatter/FormatterMessages.properties         |   79 +-
 .../formatter/FormatterModifyDialog.java           |   12 +-
 .../ui/preferences/formatter/FormatterTabPage.java |   23 +-
 .../preferences/formatter/IndentationTabPage.java  |   10 +-
 .../ui/preferences/formatter/JavaPreview.java      |    6 +-
 .../preferences/formatter/LineWrappingTabPage.java |   79 +-
 .../preferences/formatter/ModifyDialogTabPage.java |  167 +-
 .../ui/preferences/formatter/NewLinesTabPage.java  |   24 +-
 .../ui/preferences/formatter/OffOnTagsTabPage.java |  138 +
 .../formatter/ProfileConfigurationBlock.java       |   96 +-
 .../propertiesfileeditor/PropertiesFileEditor.java |    5 +-
 .../PropertiesFileEditorMessages.java              |    5 +-
 .../PropertiesFileEditorMessages.properties        |    5 +-
 .../PropertiesFileSourceViewerConfiguration.java   |    6 +-
 .../ui/search/BreakContinueTargetFinder.java       |    4 +-
 .../ui/search/ExceptionOccurrencesFinder.java      |    4 +-
 .../ui/search/ImplementOccurrencesFinder.java      |    4 +-
 .../jdt/internal/ui/search/JavaMatchFilter.java    |   11 +-
 .../jdt/internal/ui/search/JavaSearchPage.java     |   31 +-
 .../ui/search/JavaSearchPageScoreComputer.java     |    9 +-
 .../internal/ui/search/JavaSearchResultPage.java   |    6 +-
 .../ui/search/LevelTreeContentProvider.java        |   26 +-
 .../jdt/internal/ui/search/MatchLocations.java     |   22 +-
 .../jdt/internal/ui/search/MethodExitsFinder.java  |    4 +-
 .../jdt/internal/ui/search/OccurrencesFinder.java  |    4 +-
 .../jdt/internal/ui/search/SearchMessages.java     |    4 +-
 .../internal/ui/search/SearchMessages.properties   |   20 +-
 .../jdt/internal/ui/text/JavaWordFinder.java       |   20 +-
 .../eclipse/jdt/internal/ui/text/TextMessages.java |    6 +-
 .../jdt/internal/ui/text/TextMessages.properties   |    7 +-
 .../internal/ui/text/correction/ASTResolving.java  |    9 +-
 .../correction/AdvancedQuickAssistProcessor.java   |   96 +-
 .../internal/ui/text/correction/AssistContext.java |   29 +-
 .../text/correction/CorrectionCommandHandler.java  |   16 +-
 .../ui/text/correction/CorrectionMessages.java     |   29 +-
 .../text/correction/CorrectionMessages.properties  |   35 +-
 .../GetterSetterCorrectionSubProcessor.java        |    6 +
 .../text/correction/JavaCorrectionProcessor.java   |    3 +-
 .../text/correction/JavadocTagsSubProcessor.java   |    7 +-
 .../correction/LocalCorrectionsSubProcessor.java   |   77 +-
 .../correction/ModifierCorrectionSubProcessor.java |   12 +-
 .../ui/text/correction/ProblemLocation.java        |   22 +-
 .../ui/text/correction/QuickAssistProcessor.java   |  273 +-
 .../ui/text/correction/QuickFixProcessor.java      |   15 +-
 .../ui/text/correction/ReturnTypeSubProcessor.java |   11 +-
 .../correction/SuppressWarningsSubProcessor.java   |   93 +-
 .../internal/ui/text/correction/SurroundWith.java  |   11 +-
 .../text/correction/TypeMismatchSubProcessor.java  |   57 +-
 .../correction/UnresolvedElementsSubProcessor.java |   37 +-
 .../proposals/AddTypeParameterProposal.java        |    7 +-
 .../proposals/CastCorrectionProposal.java          |   31 +-
 .../proposals/ChangeCorrectionProposal.java        |  101 +-
 .../proposals/ChangeMethodSignatureProposal.java   |   16 +-
 .../ConstructorFromSuperclassProposal.java         |   19 +-
 .../proposals/FixCorrectionProposal.java           |   18 +-
 .../proposals/ImplementInterfaceProposal.java      |    7 +-
 .../proposals/LinkedNamesAssistProposal.java       |    2 +-
 .../MissingAnnotationAttributesProposal.java       |   20 +-
 .../proposals/NewAnnotationMemberProposal.java     |    7 +-
 .../proposals/NewMethodCorrectionProposal.java     |   16 +-
 .../proposals/NewVariableCorrectionProposal.java   |   28 +-
 .../RemoveDeclarationCorrectionProposal.java       |    4 +-
 .../proposals/RenameNodeCorrectionProposal.java    |    5 +-
 .../proposals/TypeChangeCorrectionProposal.java    |   26 +-
 .../text/java/AbstractJavaCompletionProposal.java  |  173 +-
 .../text/java/AnonymousTypeCompletionProposal.java |    2 +-
 .../ui/text/java/ContentAssistHistory.java         |    4 +-
 .../text/java/GetterSetterCompletionProposal.java  |   19 +-
 .../ui/text/java/JavaAutoIndentStrategy.java       |   12 +-
 .../internal/ui/text/java/JavaTextMessages.java    |    3 +-
 .../ui/text/java/JavaTextMessages.properties       |    2 -
 .../ui/text/java/LazyGenericTypeProposal.java      |    8 +-
 .../text/java/LazyJavaTypeCompletionProposal.java  |    5 +
 .../ui/text/java/OverrideCompletionProposal.java   |    5 +-
 .../ui/text/java/PartitionDoubleClickSelector.java |   20 +-
 .../text/java/hover/AbstractAnnotationHover.java   |   64 +-
 .../java/hover/AnnotationExpansionControl.java     |    4 +-
 .../ui/text/java/hover/BestMatchHover.java         |   32 +-
 .../ui/text/java/hover/JavaHoverMessages.java      |    2 +-
 .../text/java/hover/JavaHoverMessages.properties   |    3 +-
 .../internal/ui/text/java/hover/JavadocHover.java  |  426 +-
 .../ui/text/java/hover/NLSStringHover.java         |   43 +-
 .../internal/ui/text/java/hover/ProblemHover.java  |   15 +-
 .../java/hover/SourceViewerInformationControl.java |   40 +-
 .../ui/text/javadoc/JavaDocAutoIndentStrategy.java |    7 +-
 .../internal/ui/text/javadoc/JavaDocMessages.java  |    3 +-
 .../ui/text/javadoc/JavaDocMessages.properties     |    4 +-
 .../ui/text/javadoc/JavadocContentAccess2.java     |  141 +-
 .../internal/ui/text/spelling/AddWordProposal.java |   28 +-
 .../ui/text/spelling/ChangeCaseProposal.java       |   23 +-
 .../spelling/DisableSpellCheckingProposal.java     |   10 +-
 .../ui/text/spelling/JavaSpellingEngine.java       |    6 +-
 .../ui/text/spelling/JavaSpellingProblem.java      |   14 +-
 .../spelling/JavaSpellingReconcileStrategy.java    |    6 +-
 .../spelling/PropertiesFileSpellingEngine.java     |    6 +-
 .../ui/text/spelling/SpellCheckEngine.java         |   28 +-
 .../ui/text/spelling/SpellCheckIterator.java       |   22 +-
 .../ui/text/spelling/WordCorrectionProposal.java   |   12 +-
 .../ui/text/spelling/WordIgnoreProposal.java       |   17 +-
 .../ui/text/spelling/WordQuickFixProcessor.java    |   15 +-
 .../spelling/engine/AbstractSpellDictionary.java   |  172 +-
 .../engine/LocaleSensitiveSpellDictionary.java     |   12 +-
 .../ui/typehierarchy/SubTypeHierarchyViewer.java   |   13 +-
 .../ui/typehierarchy/SuperTypeHierarchyViewer.java |   13 +-
 .../typehierarchy/TraditionalHierarchyViewer.java  |   13 +-
 .../TypeHierarchyContentProvider.java              |   34 +-
 .../ui/typehierarchy/TypeHierarchyLifeCycle.java   |  175 +-
 .../ui/typehierarchy/TypeHierarchyMessages.java    |   12 +-
 .../typehierarchy/TypeHierarchyMessages.properties |   44 +-
 .../ui/typehierarchy/TypeHierarchyViewPart.java    |  212 +-
 .../ui/typehierarchy/TypeHierarchyViewer.java      |    8 +-
 .../jdt/internal/ui/util/JavadocHelpContext.java   |    5 +-
 .../jdt/internal/ui/util/TableLayoutComposite.java |    5 +-
 .../viewsupport/AppearanceAwareLabelProvider.java  |   10 +-
 .../ui/viewsupport/BasicElementLabels.java         |   23 +-
 .../FilteredElementTreeSelectionDialog.java        |    8 +-
 .../ui/viewsupport/HistoryDropDownAction.java      |    5 +-
 .../ui/viewsupport/JavaElementLabelComposer.java   |  272 +-
 .../internal/ui/viewsupport/JavaElementLinks.java  |   81 +-
 .../jdt/internal/ui/wizards/ClassPathDetector.java |   70 +-
 .../jdt/internal/ui/wizards/NewElementWizard.java  |   13 +-
 .../ui/wizards/NewSourceFolderWizardPage.java      |   14 +-
 .../jdt/internal/ui/wizards/NewWizardMessages.java |   32 +-
 .../ui/wizards/NewWizardMessages.properties        |   38 +-
 .../ui/wizards/SuperInterfaceSelectionDialog.java  |    4 +-
 .../buildpaths/AddSourceFolderWizardPage.java      |   10 +-
 .../ui/wizards/buildpaths/ArchiveFileFilter.java   |    4 +-
 .../ui/wizards/buildpaths/BuildPathSupport.java    |   54 +-
 .../ui/wizards/buildpaths/BuildPathsBlock.java     |    9 +-
 .../ui/wizards/buildpaths/CPListLabelProvider.java |   26 +-
 .../buildpaths/ClasspathFixSelectionDialog.java    |   26 +-
 .../CreateMultipleSourceFoldersDialog.java         |   16 +-
 .../wizards/buildpaths/LibrariesWorkbookPage.java  |    4 +-
 .../wizards/buildpaths/SourceAttachmentBlock.java  |    7 +-
 .../ui/wizards/buildpaths/VariableBlock.java       |    8 +-
 .../newsourcepage/AddFolderToBuildpathAction.java  |    7 +-
 .../newsourcepage/RemoveFromBuildpathAction.java   |   10 +-
 .../ui/wizards/dialogfields/LayoutUtil.java        |   16 +-
 .../ui/wizards/dialogfields/StringDialogField.java |   24 +-
 .../wizards/dialogfields/TextBoxDialogField.java   |   52 +
 .../ui/workingsets/JavaWorkingSetUpdater.java      |    9 +-
 .../workingsets/WorkingSetConfigurationDialog.java |   21 +-
 .../ui/workingsets/WorkingSetMessages.java         |   14 -
 .../ui/workingsets/WorkingSetMessages.properties   |   17 -
 .../internal/ui/workingsets/WorkingSetModel.java   |   40 +-
 .../eclipse/jdt/ui/JavaElementImageDescriptor.java |   12 +-
 .../ui/org/eclipse/jdt/ui/JavaElementLabels.java   |    6 +-
 .../ui/org/eclipse/jdt/ui/JavaUI.java              |   15 +-
 .../jdt/ui/OverrideIndicatorLabelDecorator.java    |   17 +-
 .../ui/org/eclipse/jdt/ui/PreferenceConstants.java |  111 +-
 .../org/eclipse/jdt/ui/ProblemsLabelDecorator.java |   25 +-
 .../jdt/ui/actions/AddDelegateMethodsAction.java   |   21 +-
 .../jdt/ui/actions/AddGetterSetterAction.java      |   18 +-
 .../jdt/ui/actions/AddJavaDocStubAction.java       |   25 +-
 .../AddUnimplementedConstructorsAction.java        |    4 +-
 .../jdt/ui/actions/ExternalizeStringsAction.java   |    4 +-
 .../ui/actions/FindImplementOccurrencesAction.java |    6 +-
 .../actions/FindMethodExitOccurrencesAction.java   |    6 +-
 .../ui/actions/FindOccurrencesInFileAction.java    |    6 +-
 .../ui/actions/FindStringsToExternalizeAction.java |    4 +-
 .../jdt/ui/actions/GenerateActionGroup.java        |    5 +-
 .../ui/actions/GenerateHashCodeEqualsAction.java   |   50 +-
 .../ui/actions/GenerateMethodAbstractAction.java   |    6 +-
 .../jdt/ui/actions/GenerateToStringAction.java     |   57 +-
 .../ui/actions/IJavaEditorActionDefinitionIds.java |   19 +-
 .../jdt/ui/actions/InferTypeArgumentsAction.java   |    6 +-
 .../org/eclipse/jdt/ui/actions/InlineAction.java   |    4 +-
 .../eclipse/jdt/ui/actions/InlineTempAction.java   |    6 +-
 .../jdt/ui/actions/IntroduceFactoryAction.java     |    6 +-
 .../jdt/ui/actions/IntroduceIndirectionAction.java |    6 +-
 .../jdt/ui/actions/IntroduceParameterAction.java   |    6 +-
 .../eclipse/jdt/ui/actions/JdtActionConstants.java |   19 +-
 .../jdt/ui/actions/ModifyParametersAction.java     |    6 +-
 .../jdt/ui/actions/OpenAttachedJavadocAction.java  |  248 +
 .../jdt/ui/actions/OpenExternalJavadocAction.java  |  198 +-
 .../jdt/ui/actions/OpenImplementationAction.java   |  156 +
 .../ui/actions/OpenSuperImplementationAction.java  |    3 +-
 .../jdt/ui/actions/OpenTypeHierarchyAction.java    |    4 +-
 .../jdt/ui/actions/OpenViewActionGroup.java        |   64 +-
 .../jdt/ui/actions/OrganizeImportsAction.java      |   14 +-
 .../eclipse/jdt/ui/actions/ProjectActionGroup.java |    4 +-
 .../org/eclipse/jdt/ui/actions/PullUpAction.java   |    6 +-
 .../org/eclipse/jdt/ui/actions/PushDownAction.java |    6 +-
 .../jdt/ui/actions/RefactorActionGroup.java        |   13 +-
 .../jdt/ui/actions/SelfEncapsulateFieldAction.java |    6 +-
 .../jdt/ui/actions/ShowInNavigatorViewAction.java  |    7 +-
 .../eclipse/jdt/ui/actions/UseSupertypeAction.java |    6 +-
 .../eclipse/jdt/ui/refactoring/RenameSupport.java  |    5 +-
 .../DefaultJavaFoldingStructureProvider.java       |   31 +-
 .../ui/text/java/CompletionProposalCollector.java  |    2 +-
 .../text/java/CompletionProposalLabelProvider.java |   47 +-
 .../java/JavaContentAssistInvocationContext.java   |   17 +-
 .../jdt/ui/wizards/JavadocExportWizardPage.java    |   14 +-
 .../jdt/ui/wizards/NewContainerWizardPage.java     |   17 +-
 .../ui/wizards/NewJavaProjectWizardPageOne.java    |  121 +-
 .../jdt/ui/wizards/NewPackageWizardPage.java       |    8 +-
 .../eclipse/jdt/ui/wizards/NewTypeWizardPage.java  |   27 +-
 .../plugins/org.eclipse.jdt/META-INF/MANIFEST.MF   |    2 +-
 eclipse/plugins/org.eclipse.jdt/about.properties   |    4 +-
 eclipse/plugins/org.eclipse.jdt/plugin.properties  |    4 +-
 .../.settings/.api_filters                         |   28 -
 .../.settings/org.moreunit.prefs                   |    5 +
 .../META-INF/MANIFEST.MF                           |   16 +-
 .../databinding/dialog/DialogPageSupport.java      |  117 +-
 .../dialog/IValidationMessageProvider.java         |   53 +
 .../MaxSeverityValidationStatusProvider.java       |   51 +
 .../databinding/dialog/TitleAreaDialogSupport.java |  112 +-
 .../dialog/ValidationMessageProvider.java          |   71 +
 .../fieldassist/ControlDecorationSupport.java      |  293 +
 .../fieldassist/ControlDecorationUpdater.java      |  101 +
 .../preference/PreferencePageSupport.java          |    7 +-
 .../jface/databinding/swt/WidgetValueProperty.java |   80 +-
 .../viewers/ObservableMapCellLabelProvider.java    |   14 +-
 .../viewers/ObservableMapLabelProvider.java        |   18 +-
 .../viewers/ObservableValueEditingSupport.java     |   31 +-
 .../databinding/viewers/ViewerProperties.java      |   34 +-
 .../databinding/viewers/ViewersObservables.java    |   97 +-
 .../fieldassist/ControlDecorationSupport.java      |  267 -
 .../fieldassist/ControlDecorationUpdater.java      |  116 -
 .../provisional/swt/CompositeUpdater.java          |   49 +-
 .../databinding/swt/CComboItemsProperty.java       |    5 +-
 .../swt/CComboSingleSelectionIndexProperty.java    |    7 +-
 .../databinding/swt/ComboItemsProperty.java        |    5 +-
 .../swt/ComboSingleSelectionIndexProperty.java     |    8 +-
 .../databinding/swt/ControlFocusedProperty.java    |   40 +-
 .../databinding/swt/ControlStringListProperty.java |   11 +-
 .../databinding/swt/ListItemsProperty.java         |    5 +-
 .../swt/ListSingleSelectionIndexProperty.java      |    8 +-
 .../swt/SWTDelayedObservableValueDecorator.java    |    2 +-
 .../swt/SingleSelectionIndexProperty.java          |   30 +
 .../swt/TableSingleSelectionIndexProperty.java     |    8 +-
 .../internal/databinding/swt/WidgetListener.java   |  102 +
 .../internal/databinding/util/JFaceProperty.java   |   21 +-
 .../viewers/CheckableCheckedElementsProperty.java  |   23 +-
 ...CheckboxTableViewerCheckedElementsProperty.java |    6 +-
 .../CheckboxTreeViewerCheckedElementsProperty.java |    6 +-
 .../CheckboxViewerCheckedElementsProperty.java     |   11 +-
 .../viewers/SelectionChangedListener.java          |   24 +-
 ...SelectionProviderMultipleSelectionProperty.java |   26 +-
 .../SelectionProviderSingleSelectionProperty.java  |   22 +-
 .../viewers/StructuredViewerFiltersProperty.java   |    6 +-
 .../org.eclipse.jface.text/.settings/.api_filters  |    8 -
 .../org.eclipse.jface.text/META-INF/MANIFEST.MF    |    5 +-
 .../source/projection/ProjectionAnnotation.java    |    7 +-
 .../text/source/projection/ProjectionViewer.java   |    5 +-
 .../projection/SourceViewerInformationControl.java |    1 +
 .../text/source/projection/images/collapsed.png    |  Bin 0 -> 446 bytes
 .../text/source/projection/images/expanded.png     |  Bin 0 -> 412 bytes
 .../jface/internal/text/SelectionProcessor.java    |    2 +-
 .../text/html/BrowserInformationControl.java       |   94 +-
 .../jface/internal/text/html/HTMLPrinter.java      |   39 +-
 .../contentassist/CompletionProposalPopup2.java    |    7 +-
 .../contentassist/ContextInformationPopup2.java    |    5 +-
 .../internal/text/revisions/RevisionPainter.java   |   29 +-
 .../AbstractHoverInformationControlManager.java    |   10 +-
 .../jface/text/AbstractInformationControl.java     |   53 +-
 .../text/AbstractInformationControlManager.java    |    2 +-
 .../jface/text/DefaultInformationControl.java      |    4 +-
 .../org/eclipse/jface/text/DefaultUndoManager.java |   12 +-
 ...laceDocumentAdapterContentProposalProvider.java |   51 +-
 .../src/org/eclipse/jface/text/TextViewer.java     |   39 +-
 .../contentassist/AdditionalInfoController.java    |    8 +-
 .../contentassist/CompletionProposalPopup.java     |   25 +-
 .../jface/text/contentassist/ContentAssistant.java |   30 +-
 .../contentassist/ContextInformationPopup.java     |   41 +-
 .../jface/text/contentassist/PopupCloser.java      |   12 +-
 .../jface/text/hyperlink/HyperlinkManager.java     |   29 +-
 .../text/hyperlink/MultipleHyperlinkPresenter.java |    7 +-
 .../org/eclipse/jface/text/link/LinkedModeUI.java  |    9 +-
 .../text/presentation/PresentationReconciler.java  |   16 +-
 .../jface/text/revisions/RevisionInformation.java  |    8 +-
 .../jface/text/rules/DefaultDamagerRepairer.java   |   14 +-
 .../org/eclipse/jface/text/rules/PatternRule.java  |   10 +-
 .../src/org/eclipse/jface/text/rules/WordRule.java |   24 +-
 .../text/source/AnnotationBarHoverManager.java     |   15 +-
 .../jface/text/source/AnnotationPainter.java       |   70 +-
 .../jface/text/source/AnnotationRulerColumn.java   |   22 +-
 .../jface/text/source/ChangeRulerColumn.java       |   21 +-
 .../jface/text/source/ContentAssistantFacade.java  |    4 +-
 .../text/source/DefaultCharacterPairMatcher.java   |   31 +-
 .../eclipse/jface/text/source/IOverviewRuler.java  |    6 +-
 .../eclipse/jface/text/source/ISourceViewer.java   |   13 +-
 .../text/source/LineNumberChangeRulerColumn.java   |    4 +-
 .../jface/text/source/LineNumberRulerColumn.java   |   32 +-
 .../eclipse/jface/text/source/OverviewRuler.java   |   61 +-
 .../eclipse/jface/text/source/SourceViewer.java    |  112 +-
 .../eclipse/jface/text/source/VerticalRuler.java   |   22 +-
 .../persistence/TemplateReaderWriter.java          |   29 +-
 .../org.eclipse.jface/.settings/.api_filters       |   19 -
 .../plugins/org.eclipse.jface/META-INF/MANIFEST.MF |    6 +-
 .../org/eclipse/jface/action/CoolBarManager.java   |    2 +
 .../eclipse/jface/action/LegacyActionTools.java    |   60 +-
 .../src/org/eclipse/jface/action/StatusLine.java   |   27 +-
 .../jface/action/StatusLineContributionItem.java   |   41 +-
 .../eclipse/jface/action/StatusLineManager.java    |    8 +-
 .../org/eclipse/jface/action/ToolBarManager.java   |    4 +-
 .../org/eclipse/jface/bindings/BindingManager.java |   24 +-
 .../eclipse/jface/bindings/CachedBindingSet.java   |   10 +-
 .../eclipse/jface/bindings/keys/IKeyLookup.java    |   37 +-
 .../eclipse/jface/bindings/keys/SWTKeyLookup.java  |   17 +-
 .../formatting/AbstractKeyFormatter.properties     |   10 +-
 .../keys/formatting/NativeKeyFormatter.java        |    3 +-
 .../org/eclipse/jface/dialogs/DialogSettings.java  |   64 +-
 .../src/org/eclipse/jface/dialogs/ErrorDialog.java |   86 +-
 .../jface/dialogs/IconAndMessageDialog.java        |    9 +-
 .../org/eclipse/jface/dialogs/MessageDialog.java   |    9 +-
 .../src/org/eclipse/jface/dialogs/PopupDialog.java |    1 +
 .../jface/dialogs/ProgressMonitorDialog.java       |    8 +-
 .../org/eclipse/jface/dialogs/TitleAreaDialog.java |  121 +-
 .../eclipse/jface/fieldassist/ContentProposal.java |  151 +
 .../jface/fieldassist/ContentProposalAdapter.java  |   52 +-
 .../jface/fieldassist/ControlDecoration.java       |   56 +-
 .../jface/fieldassist/IContentProposal.java        |   13 +-
 .../fieldassist/IContentProposalProvider.java      |    6 +-
 .../fieldassist/SimpleContentProposalProvider.java |   29 +-
 .../src/org/eclipse/jface/messages.properties      |   15 +-
 .../jface/preference/DirectoryFieldEditor.java     |   21 +-
 .../eclipse/jface/preference/FileFieldEditor.java  |   33 +-
 .../eclipse/jface/preference/PreferenceStore.java  |    5 +-
 .../eclipse/jface/resource/URLImageDescriptor.java |    6 +-
 .../eclipse/jface/resource/jfacefonts.properties   |    6 +-
 .../jface/resource/jfacefonts_aix.properties       |    4 +-
 .../jface/resource/jfacefonts_hp-ux.properties     |    4 +-
 .../jface/resource/jfacefonts_linux.properties     |    4 +-
 .../jface/resource/jfacefonts_linux_gtk.properties |    4 +-
 .../jface/resource/jfacefonts_macosx.properties    |    4 +-
 .../jface/resource/jfacefonts_qnx.properties       |    5 +-
 .../jface/resource/jfacefonts_sunos.properties     |    4 +-
 .../resource/jfacefonts_windows2000.properties     |    6 +-
 .../jface/resource/jfacefonts_windows98.properties |    6 +-
 .../jface/resource/jfacefonts_windowsnt.properties |    6 +-
 .../jface/resource/jfacefonts_windowsxp.properties |    6 +-
 .../src/org/eclipse/jface/util/Util.java           |   26 +-
 .../eclipse/jface/viewers/AbstractTreeViewer.java  |   67 +-
 .../jface/viewers/ILazyTreeContentProvider.java    |    9 +-
 .../viewers/ILazyTreePathContentProvider.java      |   13 +-
 .../jface/viewers/IStructuredContentProvider.java  |    9 +-
 .../jface/viewers/ITreeContentProvider.java        |   14 +-
 .../jface/viewers/ITreePathContentProvider.java    |   15 +-
 .../eclipse/jface/viewers/SWTFocusCellManager.java |    9 +-
 .../eclipse/jface/viewers/StructuredViewer.java    |   38 +-
 .../jface/viewers/StructuredViewerInternals.java   |   10 +-
 .../jface/viewers/StyledCellLabelProvider.java     |    2 +-
 .../jface/viewers/TableViewerFocusCellManager.java |    2 +-
 .../org/eclipse/jface/viewers/TextCellEditor.java  |   14 +-
 .../src/org/eclipse/jface/viewers/TreeViewer.java  |   27 +-
 .../jface/viewers/TreeViewerFocusCellManager.java  |    2 +-
 .../org/eclipse/jface/viewers/ViewerColumn.java    |   13 +-
 .../src/org/eclipse/jface/window/ToolTip.java      |   51 +-
 .../eclipse/jface/wizard/ProgressMonitorPart.java  |  233 +-
 .../src/org/eclipse/jface/wizard/WizardDialog.java |  188 +-
 .../src/org/eclipse/jface/wizard/images/stop.gif   |  Bin 0 -> 210 bytes
 .../org.eclipse.jsch.core/META-INF/MANIFEST.MF     |    3 +-
 .../org/eclipse/jsch/internal/core/IConstants.java |    4 +-
 .../src/org/eclipse/jsch/internal/core/Utils.java  |   36 +-
 .../org.eclipse.jsch.ui/META-INF/MANIFEST.MF       |    2 +-
 .../src/org/eclipse/jsch/internal/ui/Messages.java |    5 +
 .../eclipse/jsch/internal/ui/messages.properties   |    5 +
 .../internal/ui/preference/PreferencePage.java     |  232 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org/eclipse/ltk/core/refactoring/Change.java   |   22 +-
 .../ltk/core/refactoring/DocumentChange.java       |   57 +-
 .../src/org/eclipse/ltk/core/refactoring/Lock.java |   23 -
 .../core/refactoring/MultiStateTextFileChange.java |    3 +-
 .../core/refactoring/PerformChangeOperation.java   |    8 +-
 .../eclipse/ltk/core/refactoring/Refactoring.java  |    6 +-
 .../ltk/core/refactoring/TextFileChange.java       |    3 +-
 .../ltk/core/refactoring/UndoTextFileChange.java   |   76 +-
 .../ltk/internal/core/refactoring/Lock.java        |   23 +
 .../core/refactoring/ParticipantDescriptor.java    |    5 +-
 .../core/refactoring/RefactoringCoreMessages.java  |   14 +-
 .../refactoring/RefactoringCoreMessages.properties |   10 +-
 .../ltk/internal/core/refactoring/Resources.java   |    8 +-
 .../core/refactoring/UndoDocumentChange.java       |   56 +-
 .../UndoableOperation2ChangeAdapter.java           |   14 +-
 .../history/RefactoringHistoryManager.java         |    8 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../ui/refactoring/RefactoringStatusDialog.java    |   16 +-
 .../ui/refactoring/RefactoringUIMessages.java      |   34 +-
 .../refactoring/RefactoringUIMessages.properties   |   27 +-
 .../ui/refactoring/RefactoringWizardDialog2.java   |   11 +-
 .../history/RefactoringDescriptorDeleteQuery.java  |   22 +-
 .../refactoring/scripting/ScriptingMessages.java   |    4 +-
 .../scripting/ScriptingMessages.properties         |    3 +-
 .../ltk/internal/ui/refactoring/util/Strings.java  |    5 +-
 .../ltk/ui/refactoring/RefactoringWizard.java      |   31 +-
 .../RefactoringWizardOpenOperation.java            |   53 +-
 .../history/RefactoringHistoryLabelProvider.java   |   29 +-
 .../model/AbstractResourceMappingMerger.java       |    9 +-
 .../org.eclipse.osgi.services/META-INF/MANIFEST.MF |   14 +-
 .../org.eclipse.osgi.util/META-INF/MANIFEST.MF     |    7 +-
 eclipse/plugins/org.eclipse.osgi/.options          |    5 +
 .../org.eclipse.osgi/.settings/.api_filters        | 1364 ++--
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../.settings/org.eclipse.jdt.launching.prefs      |    3 +
 .../plugins/org.eclipse.osgi/JavaSE-1.7.profile    |  198 +
 .../plugins/org.eclipse.osgi/META-INF/MANIFEST.MF  |   15 +-
 eclipse/plugins/org.eclipse.osgi/build.properties  |    4 +-
 .../framework/internal/core/ConsoleManager.java    |  204 +-
 .../internal/core/ConsoleMessages.properties       |    9 -
 .../osgi/framework/internal/core/ConsoleMsg.java   |   12 +-
 .../internal/core/FrameworkCommandInterpreter.java |   16 +-
 .../internal/core/FrameworkCommandProvider.java    |  251 +-
 .../framework/internal/core/FrameworkConsole.java  |  360 +-
 .../internal/core/FrameworkConsoleSession.java     |   58 +
 .../framework/adaptor/BundleProtectionDomain.java  |   45 +-
 .../framework/adaptor/ClassLoaderDelegate.java     |   22 +-
 .../framework/adaptor/ClassLoaderDelegateHook.java |    3 +-
 .../eclipse/osgi/framework/util/ObjectPool.java    |   58 +
 .../service/resolver/NativeCodeDescription.java    |    7 +-
 .../eclipse/osgi/service/resolver/StateHelper.java |   45 +-
 .../osgi/service/resolver/StateObjectFactory.java  |    5 +-
 .../org/eclipse/osgi/service/resolver/package.html |   17 +
 .../osgi/framework/console/CommandInterpreter.java |   19 +-
 .../osgi/framework/console/ConsoleSession.java     |   95 +
 .../eclipse/osgi/framework/console/package.html    |   17 +
 .../eclipse/osgi/framework/eventmgr/package.html   |   17 +
 .../framework/internal/core/AbstractBundle.java    |   63 +-
 .../framework/internal/core/BundleFragment.java    |    4 +-
 .../osgi/framework/internal/core/BundleHost.java   |   71 +-
 .../osgi/framework/internal/core/FilterImpl.java   |    2 +-
 .../osgi/framework/internal/core/Framework.java    |   18 +-
 .../internal/core/InternalSystemBundle.java        |    7 +-
 .../framework/internal/core/PackageAdminImpl.java  |   21 +-
 .../framework/internal/core/StartLevelManager.java |   44 +-
 .../eclipse/osgi/framework/internal/core/Util.java |   12 +-
 .../internal/protocol/ContentHandlerFactory.java   |    4 +-
 .../internal/protocol/MultiplexingFactory.java     |   83 +-
 .../protocol/MultiplexingURLStreamHandler.java     |   22 +-
 .../internal/protocol/StreamHandlerFactory.java    |   60 +-
 .../URLStreamHandlerFactoryProxyFor15.java         |    4 +-
 .../eclipse/osgi/internal/loader/BundleLoader.java |   16 +-
 .../osgi/internal/loader/SystemBundleLoader.java   |   59 +-
 .../osgi/internal/loader/buddy/SystemPolicy.java   |    4 +-
 .../permadmin/EquinoxProtectionDomain.java         |   29 -
 .../permadmin/PermissionInfoCollection.java        |   32 +-
 .../osgi/internal/permadmin/SecurityAdmin.java     |   28 +-
 .../serviceregistry/ServiceRegistrationImpl.java   |   40 +-
 .../internal/serviceregistry/ServiceRegistry.java  |   26 +-
 .../osgi/internal/serviceregistry/ServiceUse.java  |    4 +-
 .../framework/org/eclipse/osgi/launch/Equinox.java |  103 +-
 .../eclipse/osgi/launch/EquinoxFWClassLoader.java  |   12 +-
 .../framework/org/eclipse/osgi/launch/package.html |   17 +
 .../org/eclipse/osgi/baseadaptor/BaseAdaptor.java  |   11 +-
 .../src/org/eclipse/osgi/baseadaptor/BaseData.java |    4 +-
 .../osgi/baseadaptor/loader/ClasspathManager.java  |    8 +-
 .../internal/core/BundleResourceHandler.java       |    4 +-
 .../protocol/reference/ReferenceURLConnection.java |   46 +-
 .../osgi/internal/baseadaptor/AdaptorMsg.java      |    4 +-
 .../osgi/internal/baseadaptor/AdaptorUtil.java     |    6 +-
 .../osgi/internal/baseadaptor/BaseStorage.java     |   77 +-
 .../osgi/internal/baseadaptor/BaseStorageHook.java |    7 +-
 .../internal/baseadaptor/DefaultClassLoader.java   |   17 +-
 .../internal/baseadaptor/DevClassLoadingHook.java  |   22 +-
 .../baseadaptor/ExternalMessages.properties        |    4 +-
 .../osgi/internal/baseadaptor/StateManager.java    |   21 +-
 .../eclipse/core/runtime/adaptor/EclipseLog.java   |    8 +-
 .../core/runtime/adaptor/EclipseStarter.java       |   47 +-
 .../core/runtime/adaptor/LocationManager.java      |   31 +-
 .../runtime/internal/adaptor/CachedManifest.java   |   19 +-
 .../runtime/internal/adaptor/ContextFinder.java    |    6 +-
 .../internal/adaptor/DefaultStartupMonitor.java    |    6 +-
 .../internal/adaptor/EclipseAdaptorHook.java       |   51 +-
 .../internal/adaptor/EclipseClassLoadingHook.java  |   72 +-
 .../internal/adaptor/EclipseEnvironmentInfo.java   |    4 +-
 .../internal/adaptor/EclipseLazyStarter.java       |   28 +-
 .../runtime/internal/adaptor/MessageHelper.java    |   17 +-
 .../internal/adaptor/PluginConverterImpl.java      |  116 +-
 .../src/org/osgi/framework/PackagePermission.java  |    8 +-
 .../src/org/osgi/framework/ServicePermission.java  |    8 +-
 .../osgi/framework/hooks/service/EventHook.java    |    2 +-
 .../org/osgi/framework/hooks/service/FindHook.java |    2 +-
 .../osgi/framework/hooks/service/ListenerHook.java |    2 +-
 eclipse/plugins/org.eclipse.osgi/profile.list      |    1 +
 .../osgi/internal/module/GroupingChecker.java      |   54 +-
 .../eclipse/osgi/internal/module/MappedList.java   |   33 +-
 .../osgi/internal/module/ResolverConstraint.java   |    4 -
 .../eclipse/osgi/internal/module/ResolverImpl.java |   44 +-
 .../osgi/internal/module/VersionHashMap.java       |   50 +-
 .../internal/resolver/BundleDescriptionImpl.java   |    4 +-
 .../osgi/internal/resolver/StateBuilder.java       |   10 +-
 .../osgi/internal/resolver/StateHelperImpl.java    |  162 +-
 .../eclipse/osgi/internal/resolver/StateImpl.java  |   12 +-
 .../osgi/internal/resolver/StateReader.java        |   33 +-
 .../service/security/KeyStoreTrustEngine.java      |   55 +-
 .../signedcontent/LegacyVerifierFactory.java       |    6 +-
 .../internal/signedcontent/PKCS7Processor.java     |    4 +-
 .../internal/signedcontent/SignedBundleHook.java   |   17 +-
 .../signedcontent/SignedContentMessages.java       |    4 +-
 .../signedcontent/SignedContentMessages.properties |    5 +-
 .../internal/signedcontent/SignedStorageHook.java  |    6 +-
 .../plugins/org.eclipse.osgi/supplement/.project   |    6 +
 .../supplement/META-INF/MANIFEST.MF                |   10 +-
 .../runtime/internal/adaptor/BasicLocation.java    |   21 +-
 .../adaptor/EclipseAdaptorMessages.properties      |    4 +-
 .../internal/adaptor/EclipseAdaptorMsg.java        |    2 +
 .../runtime/internal/adaptor/Locker_JavaNio.java   |   15 +-
 .../osgi/framework/debug/EclipseDebugTrace.java    |  268 +-
 .../framework/debug/FrameworkDebugOptions.java     |  340 +-
 .../framework/debug/FrameworkDebugTraceEntry.java  |   21 +-
 .../internal/core/ExternalMessages.properties      |    6 +-
 .../org/eclipse/osgi/framework/log/package.html    |   17 +
 .../eclipse/osgi/framework/util/SecureAction.java  |   39 +-
 .../osgi/service/datalocation/Location.java        |   25 +-
 .../eclipse/osgi/service/debug/DebugOptions.java   |   96 +-
 .../osgi/service/debug/DebugOptionsListener.java   |    8 +-
 .../org/eclipse/osgi/service/debug/DebugTrace.java |    7 +-
 .../org/eclipse/osgi/service/debug/package.html    |   17 +
 .../osgi/service/environment/Constants.java        |    7 +
 .../eclipse/osgi/service/environment/package.html  |   18 +
 .../osgi/service/localization/LocaleProvider.java  |   45 +
 .../eclipse/osgi/service/localization/package.html |   19 +
 .../osgi/service/runnable/ApplicationLauncher.java |    6 +-
 .../osgi/service/runnable/ApplicationRunnable.java |    6 +-
 .../service/runnable/ParameterizedRunnable.java    |    6 +-
 .../org/eclipse/osgi/service/runnable/package.html |   17 +
 .../osgi/storagemanager/StorageManager.java        |   32 +-
 .../org/eclipse/osgi/storagemanager/package.html   |   17 +
 .../src/org/eclipse/osgi/util/ManifestElement.java |   41 +-
 .../supplement/src/org/eclipse/osgi/util/NLS.java  |   16 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../.settings/org.eclipse.jdt.core.prefs           |    8 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../META-INF/MANIFEST.MF                           |    7 +-
 .../icons/full/elcl16}/text_edit.gif               |  Bin 577 -> 577 bytes
 .../org.eclipse.pde.api.tools.ui/plugin.properties |   21 +-
 .../org.eclipse.pde.api.tools.ui/plugin.xml        |   41 +-
 .../tools/ui/internal/ApiToolsLabelProvider.java   |   86 +-
 .../pde/api/tools/ui/internal/ApiUIPlugin.java     |   24 +-
 .../api/tools/ui/internal/IApiToolsConstants.java  |   10 +-
 .../tools/ui/internal/IApiToolsHelpContextIds.java |   31 +-
 .../tools/ui/internal/actions/ActionMessages.java  |    5 +-
 .../tools/ui/internal/actions/DeltaSession.java    |   15 +-
 .../ui/internal/actions/ExportSessionAction.java   |   25 +-
 .../ui/internal/actions/actionmessages.properties  |    5 +-
 .../APIToolsJavadocCompletionProposalComputer.java |   11 +-
 .../markers/AddNoReferenceTagOperation.java        |  118 -
 .../markers/AddNoReferenceTagResolution.java       |   84 -
 .../markers/ApiMarkerResolutionGenerator.java      |   25 +-
 .../internal/markers/CreateApiFilterOperation.java |   64 +-
 .../internal/markers/FilterProblemResolution.java  |   16 +-
 .../FilterProblemWithCommentResolution.java        |   64 +
 .../tools/ui/internal/markers/MarkerMessages.java  |    8 +-
 .../markers/OpenPropertyPageResolution.java        |    6 +-
 .../markers/RemoveFilterProblemResolution.java     |   72 +-
 .../ui/internal/markers/SinceTagResolution.java    |    6 +-
 .../markers/UpdateProjectSettingsOperation.java    |    7 +-
 .../markers/VersionNumberingResolution.java        |    4 +-
 .../ui/internal/markers/markermessages.properties  |    8 +-
 .../preferences/ApiBaselinePreferencePage.java     |   23 +-
 .../ApiBaselinesConfigurationBlock.java            |   10 +-
 .../ApiErrorsWarningsConfigurationBlock.java       |   66 +-
 .../ApiErrorsWarningsPreferencePage.java           |    4 +-
 .../internal/preferences/PreferenceMessages.java   |    3 +-
 .../preferences/ProjectSelectionDialog.java        |    4 +-
 .../preferences/preferencemessages.properties      |   47 +-
 .../properties/ApiErrorsWarningsPropertyPage.java  |    6 +-
 .../properties/ApiFiltersPropertyPage.java         |  206 +-
 .../ui/internal/properties/PropertiesMessages.java |    6 +-
 .../properties/propertiesmessages.properties       |    6 +-
 .../ui/internal/refactoring/RefactoringUtils.java  |    8 +-
 .../ui/internal/use/ApiUseLaunchDelegate.java      |  108 +
 .../tools/ui/internal/use/ApiUsePatternTab.java    |  395 +
 .../api/tools/ui/internal/use/ApiUseScanJob.java   |  523 ++
 .../api/tools/ui/internal/use/ApiUseScanTab.java   |  749 ++
 .../api/tools/ui/internal/use/ApiUseTabGroup.java  |   36 +
 .../tools/ui/internal/use/ArchivePatternPage.java  |  144 +
 .../ui/internal/use/DescriptionPatternPage.java    |  135 +
 .../pde/api/tools/ui/internal/use/Messages.java    |  120 +
 .../ui/internal/use/PatternSelectionPage.java      |  161 +
 .../api/tools/ui/internal/use/PatternWizard.java   |  113 +
 .../tools/ui/internal/use/ReportPatternPage.java   |  143 +
 .../api/tools/ui/internal/use/UsePatternPage.java  |   58 +
 .../api/tools/ui/internal/use/messages.properties  |  104 +
 .../tools/ui/internal/views/APIToolingView.java    |   22 +-
 .../ui/internal/wizards/ApiBaselineWizardPage.java |   10 +-
 .../wizards/ApiToolingSetupWizardPage.java         |   31 +-
 .../ui/internal/wizards/CompareOperation.java      |    6 +-
 .../wizards/CompareToBaselineWizardPage.java       |    6 +-
 .../ui/internal/wizards/ProjectUpdateChange.java   |   20 +-
 .../Build Api Tools Ant Support Jar.launch         |   11 +-
 eclipse/plugins/org.eclipse.pde.api.tools/.options |    6 +
 eclipse/plugins/org.eclipse.pde.api.tools/.project |    1 -
 .../.settings/org.eclipse.jdt.core.prefs           |   14 +-
 .../.settings/org.eclipse.pde.prefs                |   41 +-
 .../org.eclipse.pde.api.tools/META-INF/MANIFEST.MF |    4 +-
 .../org.eclipse.pde.api.tools/build.properties     |   10 +-
 .../buildnotes_api_tools.html                      |   36 +-
 .../org.eclipse.pde.api.tools/plugin.properties    |    3 +-
 .../plugins/org.eclipse.pde.api.tools/plugin.xml   |  124 +-
 .../scripts/api-tasks.properties                   |    3 +-
 .../scripts/api-tasks.xml                          |    3 +-
 .../scripts/buildApiToolsAntSupportJar.xml         |    2 +-
 .../eclipse/pde/api/tools/internal/ApiAccess.java  |    2 +-
 .../pde/api/tools/internal/ApiBaselineManager.java |  305 +-
 .../pde/api/tools/internal/ApiDescription.java     |  130 +-
 .../api/tools/internal/ApiDescriptionManager.java  |  137 +-
 .../tools/internal/ApiDescriptionProcessor.java    |    9 +-
 .../tools/internal/ApiDescriptionXmlCreator.java   |    2 +-
 .../pde/api/tools/internal/ApiFilterStore.java     |  201 +-
 .../internal/ApiPluginPreferenceInitializer.java   |    4 +-
 .../eclipse/pde/api/tools/internal/CRCVisitor.java |   64 +
 .../tools/internal/CompositeApiDescription.java    |   38 +-
 .../pde/api/tools/internal/CoreMessages.java       |    1 +
 .../pde/api/tools/internal/IApiCoreConstants.java  |    4 +-
 .../pde/api/tools/internal/IApiXmlConstants.java   |   25 +-
 .../tools/internal/NonApiProjectDescription.java   |    8 +-
 .../api/tools/internal/ProjectApiDescription.java  |  291 +-
 .../pde/api/tools/internal/TypeAnnotations.java    |   50 +
 .../tools/internal/WorkspaceDeltaProcessor.java    |  275 +
 .../builder/AbstractIllegalMethodReference.java    |   19 +-
 .../builder/AbstractIllegalTypeReference.java      |   14 +-
 .../internal/builder/AbstractProblemDetector.java  |   42 +-
 .../internal/builder/AbstractTypeLeakDetector.java |    4 +-
 .../tools/internal/builder/ApiAnalysisBuilder.java |  172 +-
 .../tools/internal/builder/BaseApiAnalyzer.java    |  593 +-
 .../api/tools/internal/builder/BuildContext.java   |  150 +-
 .../api/tools/internal/builder/BuildStamps.java    |   53 +
 .../pde/api/tools/internal/builder/BuildState.java |   67 +-
 .../tools/internal/builder/BuilderMessages.java    |    5 +
 .../builder/IllegalFieldReferenceDetector.java     |   16 +-
 .../internal/builder/IncrementalApiBuilder.java    |  397 +-
 .../builder/LeakExtendsProblemDetector.java        |    4 +-
 .../tools/internal/builder/MethodLeakDetector.java |   13 +-
 .../internal/builder/ProblemDetectorBuilder.java   |  197 +-
 .../pde/api/tools/internal/builder/Reference.java  |  186 +-
 .../tools/internal/builder/ReferenceAnalyzer.java  |  152 +-
 .../tools/internal/builder/ReferenceExtractor.java |  242 +-
 .../tools/internal/builder/ReferenceResolver.java  |    2 +-
 .../tools/internal/builder/SystemApiDetector.java  |   18 +-
 .../pde/api/tools/internal/builder/TypeScope.java  |   12 +-
 .../internal/builder/buildermessages.properties    |    7 +-
 .../internal/comparator/ClassFileComparator.java   |  171 +-
 .../pde/api/tools/internal/comparator/Delta.java   |    4 +-
 .../api/tools/internal/comparator/Messages.java    |   63 +-
 .../comparator/comparatormessages.properties       |    4 +-
 .../compatible_delta_messages.properties           |    8 +-
 .../pde/api/tools/internal/coremessages.properties |    1 +
 .../descriptors/ComponentDescriptorImpl.java       |   26 +-
 .../tools/internal/model/AbstractApiComponent.java |  181 -
 .../internal/model/AbstractApiTypeContainer.java   |   14 +-
 .../tools/internal/model/AbstractApiTypeRoot.java  |   48 +-
 .../pde/api/tools/internal/model/ApiBaseline.java  |   82 +-
 .../pde/api/tools/internal/model/ApiElement.java   |    2 +-
 .../api/tools/internal/model/ApiModelCache.java    |  370 +
 .../api/tools/internal/model/ApiModelFactory.java  |   51 +-
 .../pde/api/tools/internal/model/ApiType.java      |   11 +-
 .../internal/model/ArchiveApiTypeContainer.java    |  189 +-
 .../tools/internal/model/BundleApiComponent.java   | 1123 ---
 .../api/tools/internal/model/BundleComponent.java  | 1317 +++
 .../pde/api/tools/internal/model/Component.java    |  181 +
 .../internal/model/DirectoryApiTypeContainer.java  |  101 +-
 .../internal/model/FolderApiTypeContainer.java     |  206 -
 .../pde/api/tools/internal/model/Messages.java     |    4 +-
 .../api/tools/internal/model/Messages.properties   |    4 +-
 .../pde/api/tools/internal/model/MethodKey.java    |   44 +-
 .../internal/model/PluginProjectApiComponent.java  |  384 -
 .../api/tools/internal/model/ProjectComponent.java |  423 +
 .../tools/internal/model/ProjectTypeContainer.java |  225 +
 .../tools/internal/model/ResourceApiTypeRoot.java  |   29 +-
 .../api/tools/internal/model/StubApiComponent.java |   11 +-
 .../model/StubArchiveApiTypeContainer.java         |   81 +-
 .../internal/model/SystemLibraryApiComponent.java  |   18 +-
 .../tools/internal/model/TypeStructureBuilder.java |   43 +-
 .../tools/internal/model/WorkspaceBaseline.java    |   66 +
 .../api/tools/internal/problems/ApiProblem.java    |    8 +-
 .../tools/internal/problems/ApiProblemFactory.java |  100 +-
 .../tools/internal/problems/ApiProblemFilter.java  |   26 +-
 .../internal/problems/problemmessages.properties   |   16 +-
 .../api/tools/internal/provisional/ApiPlugin.java  |  124 +-
 .../api/tools/internal/provisional/Factory.java    |   41 +-
 .../internal/provisional/IApiBaselineManager.java  |   12 +-
 .../internal/provisional/IApiDescription.java      |   17 +-
 .../internal/provisional/IApiMarkerConstants.java  |    8 +-
 .../internal/provisional/VisibilityModifiers.java  |   15 +-
 .../internal/provisional/builder/IApiAnalyzer.java |    2 +-
 .../provisional/builder/IBuildContext.java         |   63 +-
 .../internal/provisional/builder/IReference.java   |   16 +-
 .../provisional/comparator/ApiComparator.java      |  397 +-
 .../internal/provisional/comparator/ApiScope.java  |   43 +-
 .../comparator/CompareApiScopeVisitor.java         |   26 +-
 .../provisional/comparator/DeltaProcessor.java     |    6 +-
 .../internal/provisional/comparator/IDelta.java    |   16 +-
 .../descriptors/IComponentDescriptor.java          |    8 +
 .../provisional/model/ApiTypeContainerVisitor.java |   29 +-
 .../internal/provisional/model/IApiComponent.java  |   26 +-
 .../internal/provisional/model/IApiMember.java     |    4 +-
 .../internal/provisional/model/IApiScope.java      |   23 +-
 .../provisional/model/IApiTypeContainer.java       |   31 +-
 .../internal/provisional/model/IApiTypeRoot.java   |    4 +-
 .../internal/provisional/problems/IApiProblem.java |   61 +-
 .../provisional/problems/IApiProblemFilter.java    |   13 +-
 .../provisional/problems/IApiProblemTypes.java     |   11 +-
 .../internal/provisional/scanner/TagScanner.java   |   67 +-
 .../provisional/search/ApiSearchEngine.java        |  135 +-
 .../provisional/search/IApiSearchReporter.java     |    7 +
 .../provisional/search/IApiSearchRequestor.java    |   38 +-
 .../provisional/search/IApiSearchScope.java        |   39 -
 .../internal/provisional/search/IMetadata.java     |   33 +
 .../internal/search/ApiDescriptionModifier.java    |  137 +
 .../internal/search/ApiUseReportConverter.java     |  995 ---
 .../internal/search/ApiUseSearchRequestor.java     |  241 -
 .../tools/internal/search/ApiUseSearchScope.java   |   68 -
 .../api/tools/internal/search/HTMLConvertor.java   |  171 +
 .../internal/search/IReferenceDescriptor.java      |   93 +
 .../internal/search/MigrationReportConvertor.java  |  127 +
 .../tools/internal/search/ReferenceDescriptor.java |  142 +
 .../internal/search/ReferenceLookupVisitor.java    |  281 +
 .../api/tools/internal/search/SearchMessages.java  |  135 +-
 .../tools/internal/search/SkippedComponent.java    |  105 +-
 .../pde/api/tools/internal/search/UseMetadata.java |  375 +
 .../tools/internal/search/UseReportConverter.java  | 1918 ++++
 .../api/tools/internal/search/UseScanParser.java   |  448 +
 .../api/tools/internal/search/UseScanVisitor.java  |  107 +
 .../tools/internal/search/UseSearchRequestor.java  |  263 +
 .../internal/search/XMLApiSearchReporter.java      |  521 --
 .../search/XmlReferenceDescriptorWriter.java       |  522 ++
 .../tools/internal/search/XmlSearchReporter.java   |  185 +
 .../internal/search/searchmessages.properties      |  272 +-
 .../api/tools/internal/util/ExcludedElements.java  |   99 +
 .../pde/api/tools/internal/util/FileManager.java   |   88 +
 .../pde/api/tools/internal/util/Signatures.java    |  113 +-
 .../pde/api/tools/internal/util/TarFile.java       |    7 +-
 .../eclipse/pde/api/tools/internal/util/Util.java  |  267 +-
 .../pde/api/tools/internal/util/UtilMessages.java  |    3 +-
 .../tools/internal/util/utilmessages.properties    |    5 +-
 .../tasks/APIDeprecationReportConversionTask.java  |  401 +
 .../tools/internal/tasks/APIDeprecationTask.java   |  243 +
 .../tasks/APIFreezeReportConversionTask.java       |   92 +-
 .../api/tools/internal/tasks/APIFreezeTask.java    |   21 +-
 .../tools/internal/tasks/APIToolsAnalysisTask.java |   50 +-
 .../tasks/AnalysisReportConversionTask.java        |   23 +-
 .../internal/tasks/ApiFileGenerationTask.java      |   61 +-
 .../tasks/ApiMigrationReportConversionTask.java    |  127 +
 .../api/tools/internal/tasks/ApiMigrationTask.java |  358 +
 .../internal/tasks/ApiUseReportConversionTask.java |   31 +-
 .../pde/api/tools/internal/tasks/ApiUseTask.java   |  434 +-
 .../api/tools/internal/tasks/CommonUtilsTask.java  |   97 +-
 .../pde/api/tools/internal/tasks/CompareTask.java  |   41 +-
 .../internal/tasks/ExcludeListDeltaVisitor.java    |  152 +-
 .../pde/api/tools/internal/tasks/Messages.java     |   23 +-
 .../tools/internal/tasks/PluggableApiUseTask.java  |  223 -
 .../pde/api/tools/internal/tasks/UseTask.java      |  316 -
 .../api/tools/internal/tasks/messages.properties   |   48 +-
 .../org.eclipse.pde.api.tools/xslt/compare.xsl     |  219 +-
 .../org.eclipse.pde.api.tools/xslt/notsearched.xsl |  117 +
 .../org.eclipse.pde.api.tools/xslt/references.xsl  |   26 +-
 .../.settings/org.eclipse.jdt.core.prefs           |  642 +-
 .../org.eclipse.pde.build/META-INF/MANIFEST.MF     |   52 +-
 .../org.eclipse.pde.build/data/env.properties      |   17 +-
 .../feature/rootfiles}/cpl-v10.html                |    0
 eclipse/plugins/org.eclipse.pde.build/plugin.xml   |   24 +-
 .../scripts/genericTargets.xml                     |   83 +-
 .../scripts/productBuild/productBuild.xml          |   19 +-
 .../src/org/eclipse/pde/build/Constants.java       |   19 +-
 .../src/org/eclipse/pde/build/IAntScript.java      |   82 +-
 .../src/org/eclipse/pde/build/IFetchFactory.java   |   18 +-
 .../internal/build/AbstractScriptGenerator.java    |  279 +-
 .../build/AssembleConfigScriptGenerator.java       |   50 +-
 .../internal/build/AssembleScriptGenerator.java    |   26 +-
 .../pde/internal/build/AssemblyInformation.java    |    2 +-
 .../eclipse/pde/internal/build/BrandingIron.java   |   26 +-
 .../pde/internal/build/BuildApplication.java       |   92 +-
 .../pde/internal/build/BuildScriptGenerator.java   |   33 +-
 .../eclipse/pde/internal/build/BundleHelper.java   |   73 +-
 .../pde/internal/build/FeatureGenerator.java       |  160 +-
 .../eclipse/pde/internal/build/FeatureWriter.java  |   16 +-
 .../pde/internal/build/FetchScriptGenerator.java   |  107 +-
 .../internal/build/IBuildPropertiesConstants.java  |   17 +-
 .../pde/internal/build/IPDEBuildConstants.java     |   18 +-
 .../eclipse/pde/internal/build/IXMLConstants.java  |    5 +-
 .../org/eclipse/pde/internal/build/Messages.java   |   22 +-
 .../internal/build/P2ConfigScriptGenerator.java    |   48 +-
 .../src/org/eclipse/pde/internal/build/Policy.java |   75 -
 .../eclipse/pde/internal/build/ProductFile.java    |    6 +-
 .../pde/internal/build/ProductGenerator.java       |  116 +-
 .../src/org/eclipse/pde/internal/build/Utils.java  |   87 +-
 .../eclipse/pde/internal/build/ant/AntScript.java  |   77 +-
 .../eclipse/pde/internal/build/ant/Condition.java  |   90 -
 .../pde/internal/build/ant/ConditionTask.java      |   47 -
 .../pde/internal/build/ant/IScriptRunner.java      |   21 +
 .../eclipse/pde/internal/build/ant/JavacTask.java  |   85 +-
 .../builder/AbstractBuildScriptGenerator.java      |   52 +-
 .../pde/internal/build/builder/BuildDirector.java  |   42 +-
 .../build/builder/ClasspathComputer2_1.java        |   35 +-
 .../build/builder/ClasspathComputer3_0.java        |   87 +-
 .../internal/build/builder/DevClassPathHelper.java |    7 +-
 .../build/builder/FeatureBuildScriptGenerator.java |   42 +-
 .../build/builder/ModelBuildScriptGenerator.java   |  237 +-
 .../internal/build/builder/SourceGenerator.java    |   96 +-
 .../internal/build/fetch/CVSFetchTaskFactory.java  |  110 +-
 .../pde/internal/build/fetch/GETFetchFactory.java  |   37 +-
 .../pde/internal/build/fetch/P2IUFetchFactory.java |  175 +-
 .../eclipse/pde/internal/build/messages.properties |    9 +-
 .../build/packager/DeltaPackScriptGenerator.java   |    4 +-
 .../packager/PackageConfigScriptGenerator.java     |   44 +-
 .../build/packager/PackageScriptGenerator.java     |   17 +-
 .../internal/build/packager/PackagerGenerator.java |   16 +-
 .../internal/build/packager/UnzipperGenerator.java |    2 +-
 .../build/publisher/FeatureRootAdvice.java         |   54 +-
 .../build/publisher/GatherBundleAction.java        |   20 +-
 .../build/publisher/GatherFeatureAction.java       |   97 +-
 .../compatibility/AssembledConfigAdvice.java       |   88 +
 .../compatibility/GeneratorApplication.java        |  179 +
 .../compatibility/IncrementalGenerator.java        |   70 +
 .../compatibility/RootFileParentAction.java        |   69 +
 .../compatibility/RootFileTouchpointAdvice.java    |   72 +
 .../pde/internal/build/site/BuildTimeSite.java     |   51 +-
 .../build/site/BuildTimeSiteContentProvider.java   |   65 +-
 .../eclipse/pde/internal/build/site/P2Utils.java   |   35 +-
 .../eclipse/pde/internal/build/site/PDEState.java  |  104 +-
 .../pde/internal/build/site/PluginPathFinder.java  |   22 +-
 .../pde/internal/build/site/QualifierReplacer.java |   42 +-
 .../internal/build/generator/GeneratorTask.java    |  240 +
 .../pde/internal/build/publisher/BrandP2Task.java  |  105 +-
 .../build/publisher/FeaturesAndBundlesTask.java    |   38 +-
 .../build/publisher/GatherFeatureTask.java         |   61 +-
 .../pde/internal/build/tasks/AntScriptRunner.java  |   50 +
 .../build/tasks/BuildScriptGeneratorTask.java      |   20 +-
 .../pde/internal/build/tasks/CompileErrorTask.java |  103 +
 .../eclipse/pde/internal/build/tasks/Config.java   |   16 +-
 .../internal/build/tasks/FeatureGeneratorTask.java |   20 +-
 .../pde/internal/build/tasks/FetchTask.java        |    5 +-
 .../build/tasks/GenericVersionReplacer.java        |   21 +-
 .../pde/internal/build/tasks/ManifestModifier.java |    8 +-
 .../internal/build/tasks/SimpleBuildLogger.java    |    7 +-
 .../pde/internal/build/tasks/TaskMessages.java     |   10 +-
 .../pde/internal/build/tasks/messages.properties   |   12 +-
 .../templates/headless-build/build.properties      |    4 +-
 .../templates/plugins/customBuildCallbacks.xml     |    2 +-
 .../org.eclipse.pde.core/.settings/.api_filters    |  283 -
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.pde.core/META-INF/MANIFEST.MF      |   33 +-
 .../plugins/org.eclipse.pde.core/macosx/Info.plist |   34 +-
 .../plugins/org.eclipse.pde.core/plugin.properties |   17 +-
 eclipse/plugins/org.eclipse.pde.core/plugin.xml    |   29 +-
 .../schema/bundleImporters.exsd                    |  156 +
 .../src/org/eclipse/pde/core/build/IBuild.java     |    4 +-
 .../org/eclipse/pde/core/build/IBuildModel.java    |    4 +-
 .../eclipse/pde/core/plugin/PluginRegistry.java    |  205 +-
 .../pde/core/project/IBundleClasspathEntry.java    |   65 +
 .../core/project/IBundleProjectDescription.java    |  612 ++
 .../pde/core/project/IBundleProjectService.java    |  127 +
 .../eclipse/pde/core/project/IHostDescription.java |   40 +
 .../core/project/IPackageExportDescription.java    |   53 +
 .../core/project/IPackageImportDescription.java    |   47 +
 .../core/project/IRequiredBundleDescription.java   |   54 +
 .../src/org/eclipse/pde/core/project/package.html  |   14 +
 .../internal/core/BundleValidationOperation.java   |   44 +-
 .../pde/internal/core/ClasspathComputer.java       |   11 +-
 .../eclipse/pde/internal/core/ClasspathHelper.java |   44 +-
 .../pde/internal/core/ClasspathUtilCore.java       |    5 +-
 .../pde/internal/core/DependencyManager.java       |  143 +-
 .../internal/core/ExternalFeatureModelManager.java |  186 +-
 .../pde/internal/core/ExternalModelManager.java    |  132 +-
 .../pde/internal/core/FeatureModelManager.java     |   43 +-
 .../org/eclipse/pde/internal/core/FileAdapter.java |    5 +-
 .../eclipse/pde/internal/core/ICoreConstants.java  |   69 +-
 .../internal/core/JavaElementChangeListener.java   |   23 +-
 .../pde/internal/core/JavadocLocationManager.java  |   12 +-
 .../eclipse/pde/internal/core/MinimalState.java    |   22 +-
 .../src/org/eclipse/pde/internal/core/P2Utils.java |  215 +-
 .../pde/internal/core/PDEAuxiliaryState.java       |   19 +-
 .../src/org/eclipse/pde/internal/core/PDECore.java |   97 +-
 .../eclipse/pde/internal/core/PDECoreMessages.java |   62 +-
 .../pde/internal/core/PDEPreferencesManager.java   |    4 +-
 .../org/eclipse/pde/internal/core/PDEState.java    |   52 +-
 .../pde/internal/core/PluginModelManager.java      |  165 +-
 .../pde/internal/core/PreferenceInitializer.java   |   13 +-
 .../core/RequiredPluginsClasspathContainer.java    |    7 +-
 .../internal/core/SearchablePluginsManager.java    |   36 +-
 .../pde/internal/core/TargetPlatformHelper.java    |   40 +-
 .../core/TargetPreferenceModifyListener.java       |    4 +-
 .../pde/internal/core/TracingOptionsManager.java   |   10 +-
 .../core/WorkspaceFeatureModelManager.java         |   19 +-
 .../pde/internal/core/WorkspaceModelManager.java   |   28 +-
 .../internal/core/WorkspacePluginModelManager.java |   53 +-
 .../pde/internal/core/build/BuildEntry.java        |   74 +-
 .../internal/core/build/ExternalBuildModel.java    |    7 +-
 .../internal/core/builders/BuildErrorReporter.java |  691 ++-
 .../core/builders/BundleErrorReporter.java         |   16 +-
 .../pde/internal/core/builders/CompilerFlags.java  |   10 +-
 .../core/builders/ExtensionsErrorReporter.java     |    5 +-
 .../core/builders/FeatureConsistencyChecker.java   |   10 +-
 .../core/builders/FeatureErrorReporter.java        |   40 +-
 .../core/builders/ManifestConsistencyChecker.java  |   56 +-
 .../internal/core/builders/PDEMarkerFactory.java   |    9 +-
 .../core/builders/SchemaErrorReporter.java         |   61 +-
 .../core/builders/SourceEntryErrorReporter.java    |  763 ++
 .../eclipse/pde/internal/core/bundle/Bundle.java   |    5 +-
 .../pde/internal/core/bundle/BundleModel.java      |   26 +-
 .../pde/internal/core/bundle/BundlePluginBase.java |   80 +-
 .../internal/core/bundle/WorkspaceBundleModel.java |    3 +-
 .../bundle/WorkspaceBundlePluginModelBase.java     |    4 +-
 .../core/content/DefaultDocumentFactory.java       |   25 +
 .../core/converter/PDEPluginConverter.java         |    6 +-
 .../internal/core/converter/PluginConverter.java   |   19 +-
 .../core/exports/FeatureBasedExportOperation.java  |  247 +-
 .../core/exports/FeatureExportOperation.java       |   64 +-
 .../core/exports/PluginExportOperation.java        |   11 +-
 .../core/exports/ProductExportOperation.java       |  942 +-
 .../internal/core/exports/SiteBuildOperation.java  |  418 +-
 .../core/exports/WorkspaceExportHelper.java        |   15 +-
 .../pde/internal/core/feature/FeatureChild.java    |   40 +-
 .../pde/internal/core/feature/FeatureData.java     |   36 +-
 .../pde/internal/core/feature/FeatureImport.java   |   40 +-
 .../eclipse/pde/internal/core/ibundle/IBundle.java |    9 +-
 .../pde/internal/core/ibundle/IBundleModel.java    |    4 +-
 .../pde/internal/core/ifeature/IFeatureChild.java  |   18 +-
 .../pde/internal/core/ifeature/IFeatureEntry.java  |   25 +-
 .../pde/internal/core/ifeature/IFeatureImport.java |    6 +-
 .../pde/internal/core/ifeature/IFeatureModel.java  |    4 +-
 .../core/importing/BundleImporterExtension.java    |   92 +
 .../core/importing/CvsBundleImportDescription.java |   66 +
 .../core/importing/CvsBundleImporterDelegate.java  |  200 +
 .../internal/core/importing/IBundleImporter.java   |   49 +
 .../provisional/BundleImportDescription.java       |  113 +
 .../provisional/IBundleImporterDelegate.java       |   66 +
 .../core/importing/provisional/package.html        |   23 +
 .../pde/internal/core/iproduct/IJREInfo.java       |   15 +-
 .../pde/internal/core/pderesources.properties      |   48 +-
 .../pde/internal/core/plugin/PluginElement.java    |    1 +
 .../core/plugin/WorkspaceExtensionsModel.java      |    7 +-
 .../eclipse/pde/internal/core/product/JREInfo.java |   58 +-
 .../core/project/BundleClasspathSpecification.java |  114 +
 .../core/project/BundleProjectDescription.java     |  867 ++
 .../core/project/BundleProjectService.java         |  308 +
 .../pde/internal/core/project/HostDescriptoin.java |   31 +
 .../pde/internal/core/project/Messages.java        |   30 +
 .../pde/internal/core/project/Messages.properties  |   13 +
 .../pde/internal/core/project/PDEProject.java      |  263 +
 .../core/project/PackageExportDescription.java     |  153 +
 .../core/project/PackageImportDescription.java     |   34 +
 .../core/project/ProjectModifyOperation.java       |  945 ++
 .../core/project/RequiredBundleDescription.java    |   35 +
 .../core/project/RequirementSpecification.java     |  113 +
 .../eclipse/pde/internal/core/schema/Schema.java   | 2088 +++---
 .../core/target/AbstractBundleContainer.java       |  290 +-
 .../internal/core/target/AbstractTargetHandle.java |   10 +-
 .../core/target/DirectoryBundleContainer.java      |   17 +-
 .../core/target/ExternalFileTargetHandle.java      |   18 +-
 .../core/target/FeatureBundleContainer.java        |  523 +-
 .../internal/core/target/IUBundleContainer.java    |  342 +-
 .../eclipse/pde/internal/core/target/Messages.java |    6 +-
 .../pde/internal/core/target/Messages.properties   |    6 +-
 .../core/target/NameVersionDescriptor.java         |   70 -
 .../core/target/ProfileBundleContainer.java        |  146 +-
 .../pde/internal/core/target/ResolvedBundle.java   |    4 +-
 .../pde/internal/core/target/TargetDefinition.java |  605 ++-
 .../target/TargetDefinitionPersistenceHelper.java  |  645 +--
 .../core/target/TargetMetadataCollector.java       |   80 +
 .../core/target/TargetPersistence34Helper.java     |  299 +
 .../core/target/TargetPersistence35Helper.java     |  300 +
 .../core/target/TargetPersistence36Helper.java     |  233 +
 .../core/target/TargetPlatformService.java         |   82 +-
 .../core/target/provisional/IBundleContainer.java  |   77 +-
 .../core/target/provisional/IResolvedBundle.java   |   11 +-
 .../core/target/provisional/ITargetDefinition.java |   87 +-
 .../target/provisional/ITargetPlatformService.java |    8 +-
 .../provisional/LoadTargetDefinitionJob.java       |  178 +-
 .../target/provisional/NameVersionDescriptor.java  |  147 +
 .../pde/internal/core/util/CoreUtility.java        |   33 +-
 .../org/eclipse/pde/internal/core/util/IdUtil.java |    2 +-
 .../pde/internal/core/util/ManifestUtils.java      |    5 +-
 .../eclipse/pde/internal/core/util/SchemaUtil.java |   43 +-
 .../pde/internal/core/util/VersionUtil.java        |   17 +-
 .../pde/internal/core/ant/ConvertSchemaToHTML.java |    6 +-
 .../pde/internal/core/text/DocumentHandler.java    |    5 +-
 .../pde/internal/core/text/DocumentObject.java     |    8 +-
 .../pde/internal/core/text/build/BuildEntry.java   |   66 +-
 eclipse/plugins/org.eclipse.pde.doc.user/.project  |   44 +-
 .../org.eclipse.pde.doc.user/META-INF/MANIFEST.MF  |    2 +-
 eclipse/plugins/org.eclipse.pde.doc.user/about.ini |   23 -
 .../org.eclipse.pde.doc.user/about.properties      |    4 +-
 .../org.eclipse.pde.doc.user/api_contexts.xml      |   54 +-
 .../org.eclipse.pde.doc.user/build.properties      |   32 +-
 eclipse/plugins/org.eclipse.pde.doc.user/build.xml |   98 -
 .../plugins/org.eclipse.pde.doc.user/buildDoc.xml  |   12 +-
 .../org.eclipse.pde.doc.user/concepts/feature.htm  |    2 +-
 .../org.eclipse.pde.doc.user/concepts/target.htm   |    2 +-
 .../concepts/update_site.htm                       |   32 +-
 .../org.eclipse.pde.doc.user/contexts_PDE.xml      |   20 +-
 .../customBuildCallbacks.xml                       |   28 +
 .../guide/images/import_wizards/plugin_import.png  |  Bin 12078 -> 12523 bytes
 .../launchers/launcher_eclipse_configuration.png   |  Bin 11283 -> 14175 bytes
 .../images/launchers/launcher_eclipse_features.png |  Bin 0 -> 228157 bytes
 .../images/launchers/launcher_eclipse_plugins.png  |  Bin 24437 -> 30256 bytes
 .../launchers/launcher_junit_configuration.PNG     |  Bin 12371 -> 0 bytes
 .../images/launchers/launcher_junit_plugins.png    |  Bin 24265 -> 0 bytes
 .../images/new_wizards/new_ctx_hlp_wizard.png      |  Bin 0 -> 18942 bytes
 .../guide/images/new_wizards/user_assistance.png   |  Bin 0 -> 2684 bytes
 .../guide/images/plugin_editor/internal.png        |  Bin 0 -> 509 bytes
 .../guide/images/plugin_editor/public.png          |  Bin 0 -> 444 bytes
 .../guide/images/plugin_editor/xfriend.png         |  Bin 0 -> 535 bytes
 .../guide/images/preferences/compilers_plugin.png  |  Bin 17355 -> 16163 bytes
 .../images/preferences/plugin_development.png      |  Bin 8665 -> 94913 bytes
 .../guide/images/product_editor/launcher_ee.png    |  Bin 0 -> 6448 bytes
 .../guide/images/product_editor/launcher_jre.png   |  Bin 9159 -> 0 bytes
 .../images/schema_editor/schema_identifier.png     |  Bin 0 -> 28478 bytes
 .../guide/images/target_editor/content_page.png    |  Bin 21530 -> 36754 bytes
 .../target_editor/content_page_feature_mode.png    |  Bin 0 -> 37275 bytes
 .../target_shared/edit_target_content_tab.png      |  Bin 18114 -> 35387 bytes
 .../edit_target_content_tab_feature_mode.png       |  Bin 0 -> 37183 bytes
 .../guide/images/tasks/import-as-repo.png          |  Bin 0 -> 4005 bytes
 .../guide/images/tasks/import-from-active.png      |  Bin 0 -> 6131 bytes
 .../images/tasks/import-from-plugins-view.png      |  Bin 0 -> 11145 bytes
 .../guide/images/tasks/import-version.png          |  Bin 0 -> 3582 bytes
 .../guide/intro/pde_overview.htm                   |    2 +-
 .../tools/editors/manifest_editor/access_rules.htm |    2 +-
 .../guide/tools/editors/manifest_editor/build.htm  |    6 +-
 .../tools/editors/manifest_editor/runtime.htm      |    6 +
 .../tools/editors/product_editor/launching.htm     |    6 +-
 .../schema_editor/page_schema_definition.htm       |    9 +-
 .../tools/editors/target_editor/content_page.htm   |   16 +-
 .../guide/tools/file_wizards/new_cheat_sheet.htm   |   25 +-
 .../guide/tools/file_wizards/new_ctx_help.htm      |   50 +
 .../guide/tools/file_wizards/new_file_wizards.htm  |   36 +-
 .../guide/tools/file_wizards/new_toc.htm           |   25 +-
 .../guide/tools/import_wizards/import_plugins.htm  |    3 +-
 .../guide/tools/launchers/arguments.htm            |   46 +
 .../guide/tools/launchers/common.htm               |   15 +
 .../guide/tools/launchers/configuration.htm        |   27 +-
 .../launchers/eclipse_application_launcher.htm     |   10 +-
 .../guide/tools/launchers/eclipse_args.htm         |   31 -
 .../guide/tools/launchers/eclipse_main.htm         |   14 +
 .../guide/tools/launchers/eclipse_plugins.htm      |   28 -
 .../guide/tools/launchers/environment.htm          |   27 +-
 .../guide/tools/launchers/equinox_args.htm         |   13 +
 .../guide/tools/launchers/equinox_launcher.htm     |    7 +
 .../guide/tools/launchers/equinox_plugins.htm      |   17 +-
 .../guide/tools/launchers/equinox_settings.htm     |   13 +
 .../guide/tools/launchers/junit_configuration.htm  |   38 -
 .../guide/tools/launchers/junit_launcher.htm       |   12 +-
 .../guide/tools/launchers/junit_main.htm           |   14 +
 .../guide/tools/launchers/junit_plugins.htm        |   27 -
 .../guide/tools/launchers/junit_test.htm           |   15 +
 .../guide/tools/launchers/plugins.htm              |   45 +
 .../guide/tools/launchers/tracing.htm              |   19 +-
 .../tools/preference_pages/plug_in_development.htm |   22 +-
 .../target_shared/edit_target_content_tab.htm      |   15 +-
 .../guide/tools/views/target_platform_state.htm    |    4 +-
 .../plugins/org.eclipse.pde.doc.user/notices.html  |    4 +-
 .../org.eclipse.pde.doc.user/pdeOptions.txt        |   73 +-
 .../plugins/org.eclipse.pde.doc.user/plugin.xml    |    3 +-
 .../api-tooling/ant-tasks/analysis-ant-task.htm    |   21 +-
 .../analysis-reportconversion-ant-task.htm         |   23 +-
 .../api-tooling/ant-tasks/apifreeze-ant-task.htm   |   21 +-
 .../apifreeze-reportconversion-ant-task.htm        |   23 +-
 .../ant-tasks/apimigration-ant-task.htm            |  146 +
 .../apimigration-reportconversion-ant-task.htm     |  122 +
 .../api-tooling/ant-tasks/apiuse-ant-task.htm      |  135 +-
 .../ant-tasks/apiuse-reportconversion-ant-task.htm |   45 +-
 .../api-tooling/ant-tasks/deprecation-ant-task.htm |  138 +
 .../deprecation-reportconversion-ant-task.htm      |   83 +
 .../ant-tasks/filegeneration-ant-task.htm          |   23 +-
 .../ant-tasks/pluggableapiuse-ant-task.htm         |  174 -
 .../api-tooling/images/api-problem-filter-prop.png |  Bin 8500 -> 13642 bytes
 .../images/api-use-pattern-wizard-archive-page.png |  Bin 0 -> 18161 bytes
 .../api-use-pattern-wizard-conversion-page.png     |  Bin 0 -> 19101 bytes
 .../images/api-use-pattern-wizard-package-page.png |  Bin 0 -> 18250 bytes
 .../api-tooling/images/api-use-pattern-wizard.png  |  Bin 0 -> 21129 bytes
 .../api-tooling/images/use-ui-patterns.png         |  Bin 0 -> 17675 bytes
 .../reference/api-tooling/images/use-ui.png        |  Bin 0 -> 49223 bytes
 .../api-tooling/wizards/ref-api-use-dialog.htm     |  198 +
 .../wizards/ref-apiuse-patterns-wizard.htm         |  165 +
 .../reference/extension-points/index.html          |    2 +
 .../reference/misc/api-usage-rules.html            |    0
 .../reference/misc/overview-pde.html               |    6 +-
 .../reference/pde_builder_config.htm               |   16 +
 .../reference/pde_feature_generating_build.htm     |   17 +-
 .../tasks/pde_compilation_env.htm                  |    6 +-
 .../tasks/pde_compiler_options.htm                 |   83 +
 .../tasks/pde_controlling_output.htm               |   14 +-
 .../tasks/pde_custom_callbacks.htm                 |   19 +-
 .../tasks/pde_feature_build.htm                    |    4 +-
 .../pde_feature_generating_antcommandline.htm      |    4 +-
 .../tasks/pde_fetch_phase.htm                      |   22 +-
 .../tasks/pde_p2_builds.htm                        |    2 +-
 .../tasks/pde_p2_buildtasks.htm                    |   24 +-
 .../tasks/pde_p2_configuringproducts.htm           |    2 +-
 .../tasks/pde_p2_featurebuilds.htm                 |    2 +-
 .../tasks/pde_p2_featuremetadata.htm               |    2 +-
 .../tasks/pde_p2_integration.htm                   |    2 +-
 .../tasks/pde_p2_productbuilds.htm                 |    4 +-
 .../tasks/pde_packager.htm                         |   22 +-
 .../tasks/pde_product_build.htm                    |    8 +-
 .../tasks/pde_source_generation.htm                |   19 +-
 .../tasks/ui_import_from_cvs.htm                   |   58 +
 .../org.eclipse.pde.doc.user/tips/pde_tips.htm     |   30 +-
 .../org.eclipse.pde.doc.user/topics_Reference.xml  |   60 +-
 .../org.eclipse.pde.doc.user/topics_Tasks.xml      |    6 +-
 .../whatsNew/images/add-plugins.png                |  Bin 0 -> 4916 bytes
 .../whatsNew/images/add-to-target.png              |  Bin 0 -> 15745 bytes
 .../whatsNew/images/api-deprecation.png            |  Bin 0 -> 11963 bytes
 .../whatsNew/images/api-filters.png                |  Bin 0 -> 16482 bytes
 .../whatsNew/images/api-scan.png                   |  Bin 0 -> 21483 bytes
 .../whatsNew/images/apichanges.png                 |  Bin 17204 -> 0 bytes
 .../whatsNew/images/archive-wizard.png             |  Bin 0 -> 17881 bytes
 .../whatsNew/images/archive.png                    |  Bin 0 -> 7853 bytes
 .../whatsNew/images/avail.png                      |  Bin 0 -> 10614 bytes
 .../whatsNew/images/build-severities.png           |  Bin 0 -> 21561 bytes
 .../whatsNew/images/buildproperties.png            |  Bin 0 -> 5153 bytes
 .../whatsNew/images/categorydef.png                |  Bin 10716 -> 0 bytes
 .../whatsNew/images/categoryexport.png             |  Bin 44320 -> 0 bytes
 .../whatsNew/images/click-install.png              |  Bin 40319 -> 0 bytes
 .../whatsNew/images/console-menu.png               |  Bin 0 -> 4114 bytes
 .../whatsNew/images/consolelog.png                 |  Bin 0 -> 5485 bytes
 .../whatsNew/images/description.png                |  Bin 0 -> 8140 bytes
 .../whatsNew/images/dstemplate.png                 |  Bin 26429 -> 0 bytes
 .../whatsNew/images/ee-validation-pref.png         |  Bin 11343 -> 0 bytes
 .../whatsNew/images/ee-validation.png              |  Bin 7456 -> 0 bytes
 .../whatsNew/images/err-warn.png                   |  Bin 22389 -> 0 bytes
 .../whatsNew/images/export-options.png             |  Bin 43294 -> 0 bytes
 .../whatsNew/images/export-target.png              |  Bin 0 -> 17687 bytes
 .../whatsNew/images/feature-launch.png             |  Bin 0 -> 28203 bytes
 .../whatsNew/images/filter-quick-fix.png           |  Bin 10553 -> 0 bytes
 .../whatsNew/images/from-repo.png                  |  Bin 0 -> 3586 bytes
 .../whatsNew/images/head-version.png               |  Bin 0 -> 4072 bytes
 .../whatsNew/images/hover-quick-fix.png            |  Bin 0 -> 13409 bytes
 .../whatsNew/images/installcategory.png            |  Bin 33866 -> 0 bytes
 .../whatsNew/images/installed.png                  |  Bin 30612 -> 0 bytes
 .../whatsNew/images/keypass.png                    |  Bin 37797 -> 0 bytes
 .../whatsNew/images/menuspy.png                    |  Bin 7863 -> 0 bytes
 .../whatsNew/images/nl-fragments.png               |  Bin 34988 -> 0 bytes
 .../whatsNew/images/non-ui-thread.png              |  Bin 3614 -> 0 bytes
 .../whatsNew/images/options-editor.png             |  Bin 4596 -> 0 bytes
 .../whatsNew/images/pattern-wizard.png             |  Bin 0 -> 21736 bytes
 .../whatsNew/images/patterns.png                   |  Bin 0 -> 7425 bytes
 .../whatsNew/images/pde-binarycycles.png           |  Bin 38372 -> 0 bytes
 .../whatsNew/images/pde-ds.png                     |  Bin 20029 -> 0 bytes
 .../whatsNew/images/pde-jumpconsole.png            |  Bin 14636 -> 0 bytes
 .../whatsNew/images/pde-registryview.png           |  Bin 24527 -> 0 bytes
 .../whatsNew/images/pde-versioning.png             |  Bin 13581 -> 0 bytes
 .../whatsNew/images/registryfragments.png          |  Bin 13851 -> 0 bytes
 .../whatsNew/images/scandetails.png                |  Bin 0 -> 16094 bytes
 .../whatsNew/images/soft-install.png               |  Bin 0 -> 2334 bytes
 .../whatsNew/images/spell-check.png                |  Bin 0 -> 6612 bytes
 .../whatsNew/images/src-builds.png                 |  Bin 0 -> 12009 bytes
 .../whatsNew/images/start-levels.png               |  Bin 16991 -> 0 bytes
 .../whatsNew/images/synch-settings.png             |  Bin 0 -> 2496 bytes
 .../whatsNew/images/synch-warnings.png             |  Bin 0 -> 3789 bytes
 .../whatsNew/images/target-editor.png              |  Bin 23547 -> 0 bytes
 .../whatsNew/images/target-features.png            |  Bin 0 -> 43702 bytes
 .../whatsNew/images/target-platform.png            |  Bin 21336 -> 0 bytes
 .../whatsNew/images/target-search.png              |  Bin 0 -> 3083 bytes
 .../whatsNew/images/targetstateview.png            |  Bin 18741 -> 0 bytes
 .../whatsNew/images/xml-errors.png                 |  Bin 0 -> 4184 bytes
 .../whatsNew/pde_whatsnew.htm                      |  861 ++-
 .../org.eclipse.pde.ds.core/META-INF/MANIFEST.MF   |    2 +-
 .../org.eclipse.pde.ds.core/build.properties       |   10 +
 .../org.eclipse.pde.ds.core/plugin.properties      |   10 +
 eclipse/plugins/org.eclipse.pde.ds.core/plugin.xml |   13 +-
 .../ds/core/builders/XMLErrorReporter.java         |    2 +-
 .../pde/internal/ds/core/messages.properties       |    2 +-
 .../pde/internal/ds/core/text/DSObject.java        |    2 +-
 .../org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF     |    2 +-
 .../plugins/org.eclipse.pde.ds.ui/build.properties |   10 +
 .../org.eclipse.pde.ds.ui/plugin.properties        |   10 +
 eclipse/plugins/org.eclipse.pde.ds.ui/plugin.xml   |   11 +
 .../ds/ui/editor/DSSourceViewerConfiguration.java  |    1 +
 .../contentassist/TypeCompletionProposal.java      |   12 +-
 .../ds/ui/wizards/DSCreationOperation.java         |   14 +-
 .../internal/ds/ui/wizards/DSFileWizardPage.java   |    8 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../plugin.properties                              |    4 +-
 .../org.eclipse.pde.junit.runtime/plugin.xml       |    5 +-
 .../junit/runtime/RemotePluginTestRunner.java      |   13 +-
 .../internal/junit/runtime/UITestApplication.java  |   18 +-
 .../org.eclipse.pde.launching}/.classpath          |    0
 eclipse/plugins/org.eclipse.pde.launching/.project |   34 +
 .../.settings/org.eclipse.core.resources.prefs     |    0
 .../.settings/org.eclipse.jdt.core.prefs           |    0
 .../.settings/org.eclipse.jdt.ui.prefs             |    0
 .../.settings/org.eclipse.pde.core.prefs           |    0
 .../.settings/org.eclipse.pde.prefs                |   27 +
 .../org.eclipse.pde.launching/META-INF/MANIFEST.MF |   24 +
 .../about.html                                     |    0
 .../org.eclipse.pde.launching/build.properties     |   19 +
 .../org.eclipse.pde.launching/plugin.properties    |   32 +
 .../plugins/org.eclipse.pde.launching/plugin.xml   |   85 +
 .../schema/osgiFrameworks.exsd                     |  167 +
 .../launching/ILaunchingPreferenceConstants.java   |   25 +
 .../pde/internal/launching/IPDEConstants.java      |   41 +
 .../pde/internal/launching/PDELaunchingPlugin.java |  209 +
 .../pde/internal/launching/PDEMessages.java        |   44 +
 .../internal/launching/PreferenceInitializer.java  |   51 +
 .../launching/launcher/BundleLauncherHelper.java   |  603 ++
 .../launcher/EclipsePluginValidationOperation.java |   88 +
 .../launching/launcher/EquinoxInitializer.java     |  131 +
 .../launching/launcher/LaunchArgumentsHelper.java  |  332 +
 .../launcher/LaunchConfigurationHelper.java        |  482 +
 .../launcher/LaunchConfigurationListener.java      |   59 +
 .../launching/launcher/LaunchListener.java         |  187 +
 .../launching/launcher/LaunchPluginValidator.java  |  129 +
 .../launcher/LaunchValidationOperation.java        |  161 +
 .../internal/launching/launcher/LauncherUtils.java |  347 +
 .../launching/launcher/OSGiFrameworkManager.java   |  147 +
 .../launching/launcher/OSGiMigrationDelegate.java  |   43 +
 .../launcher/OSGiValidationOperation.java          |   28 +
 .../launching/launcher/PDEMigrationDelegate.java   |   58 +
 .../launcher/ProductValidationOperation.java       |   54 +
 .../launching/launcher/RequirementHelper.java      |  103 +
 .../pde/internal/launching/launcher/VMHelper.java  |   95 +
 .../pde/internal/launching/pderesources.properties |   32 +
 .../sourcelookup/PDESourceLookupDirector.java      |  242 +
 .../sourcelookup/PDESourceLookupQuery.java         |  285 +
 .../launching/AbstractPDELaunchConfiguration.java  |  419 +
 .../EclipseApplicationLaunchConfiguration.java     |  294 +
 .../pde/launching/EquinoxLaunchConfiguration.java  |  219 +
 .../pde/launching/IPDELauncherConstants.java       |  493 ++
 .../JUnitLaunchConfigurationDelegate.java          |  503 ++
 .../launching/OSGiLaunchConfigurationDelegate.java |   65 +
 .../OSGiLaunchConfigurationInitializer.java        |  116 +
 .../pde/launching/PDESourcePathProvider.java       |  143 +
 .../src/org/eclipse/pde/launching/package.html     |   14 +
 .../org.eclipse.pde.runtime/META-INF/MANIFEST.MF   |    2 +-
 .../org.eclipse.pde.runtime/plugin.properties      |    7 +-
 eclipse/plugins/org.eclipse.pde.runtime/plugin.xml |   11 +-
 .../pde/internal/runtime/PDERuntimeMessages.java   |    3 +-
 .../runtime/pderuntimeresources.properties         |    5 +-
 .../runtime/registry/RegistryFilteredTree.java     |    2 +-
 .../runtime/spy/dialogs/MenuSpyDialog.java         |    2 +-
 .../runtime/spy/sections/ActiveMenuSection.java    |   40 +-
 .../runtime/spy/sections/ActivePartSection.java    |    6 +-
 .../org.eclipse.pde.ua.core/META-INF/MANIFEST.MF   |    2 +-
 .../core/ctxhelp/text/CtxHelpDocumentHandler.java  |   48 +-
 .../ua/core/ctxhelp/text/CtxHelpMarkerManager.java |   68 +
 .../ua/core/ctxhelp/text/CtxHelpModel.java         |   37 +-
 .../ua/core/toc/text/TocDocumentHandler.java       |   47 +-
 .../ua/core/toc/text/TocMarkerManager.java         |   72 +
 .../pde/internal/ua/core/toc/text/TocModel.java    |   44 +-
 .../org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF     |    2 +-
 .../ua/ui/editor/cheatsheet/comp/CompCSPage.java   |   55 +-
 .../cheatsheet/simple/SimpleCSDefinitionPage.java  |   71 +-
 .../simple/SimpleCSMasterTreeSection.java          |   11 +-
 .../simple/details/SimpleCSHelpDetails.java        |  101 +-
 .../simple/details/SimpleCSItemDetails.java        |    5 +-
 .../ua/ui/editor/ctxhelp/CtxHelpEditor.java        |   35 +-
 .../internal/ua/ui/editor/ctxhelp/CtxHelpPage.java |   58 +-
 .../pde/internal/ua/ui/editor/toc/TocEditor.java   |  166 +-
 .../pde/internal/ua/ui/editor/toc/TocPage.java     |   55 +-
 .../ua/ui/wizards/ctxhelp/messages.properties      |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.pde.ui.templates/build.properties  |    5 +-
 .../org.eclipse.pde.ui.templates/plugin.properties |    6 +
 .../org.eclipse.pde.ui.templates/plugin.xml        |   17 +-
 .../internal/ui/templates/PDETemplateMessages.java |   26 +-
 .../internal/ui/templates/PDETemplateSection.java  |    8 +-
 .../ui/templates/osgi/OSGiEventAdminTemplate.java  |  101 +
 .../osgi/OSGiEventAdminTemplateWizard.java         |   44 +
 .../internal/ui/templates/pderesources.properties  |   27 +-
 .../internal/ui/templates/rcp/ViewRCPTemplate.java |   62 +-
 .../propertyPages/java/$className$.java            |    1 +
 .../helloRCP/java/$applicationClass$.java          |    4 +-
 .../helloRCP/java/ApplicationWorkbenchAdvisor.java |    2 +-
 .../java/ApplicationWorkbenchWindowAdvisor.java    |    2 +-
 .../templates_3.3/intro/java/Application.java      |    4 +-
 .../mail/java/$applicationClass$.java              |    4 +-
 .../viewRCP/java/$applicationClass$.java           |    4 +-
 .../viewRCP/java/ApplicationActionBarAdvisor.java  |   26 -
 .../templates_3.3/viewRCP/java/Perspective.java    |    2 -
 .../templates_3.3/viewRCP/java/View.java           |    8 +-
 .../OSGiEventAdmin/OSGI-INF/component.xml          |    8 +
 .../OSGiEventAdmin}/build.properties               |    0
 .../OSGiEventAdmin/java/ServiceComponent.java      |   14 +
 .../org.eclipse.pde.ui/.settings/.api_filters      |   87 -
 .../.settings/org.eclipse.pde.prefs                |   16 +-
 .../org.eclipse.pde.ui/META-INF/MANIFEST.MF        |   24 +-
 .../icons/etool16/export_target.gif                |  Bin 0 -> 981 bytes
 .../icons/eview16/osgiconsole.gif                  |  Bin 0 -> 619 bytes
 .../plugins/org.eclipse.pde.ui/plugin.properties   |   28 +-
 eclipse/plugins/org.eclipse.pde.ui/plugin.xml      |  206 +-
 .../schema/bundleImportPages.exsd                  |  147 +
 .../org.eclipse.pde.ui/schema/launchShortcuts.exsd |   14 +-
 .../org.eclipse.pde.ui/schema/osgiFrameworks.exsd  |  159 -
 .../eclipse/pde/internal/ui/IHelpContextIds.java   |    9 +-
 .../eclipse/pde/internal/ui/IPDEUIConstants.java   |   26 +-
 .../pde/internal/ui/IPreferenceConstants.java      |   13 +-
 .../eclipse/pde/internal/ui/PDELabelProvider.java  |   39 +-
 .../src/org/eclipse/pde/internal/ui/PDEPlugin.java |   95 +-
 .../org/eclipse/pde/internal/ui/PDEUIMessages.java |  168 +-
 .../src/org/eclipse/pde/internal/ui/Utilities.java |  111 +
 .../pde/internal/ui/build/BaseBuildAction.java     |    5 +-
 .../pde/internal/ui/build/BuildPluginAction.java   |   15 +-
 .../pde/internal/ui/build/FeatureExportJob.java    |   26 +
 .../pde/internal/ui/build/PluginExportJob.java     |   26 +
 .../pde/internal/ui/build/RuntimeInstallJob.java   |  424 +-
 .../ui/compare/PluginStructureCreator.java         |    5 +-
 .../ui/correction/AddBuildEntryResolution.java     |   15 +-
 .../ui/correction/ExternalizeResolution.java       |   11 +-
 .../internal/ui/correction/MultiFixResolution.java |  116 +
 .../ui/correction/RemoveBuildEntryResolution.java  |   20 +-
 .../ui/correction/ReplaceBuildEntryResolution.java |   47 +
 .../ui/correction/ResolutionGenerator.java         |   31 +-
 .../ui/correction/java/JavaResolutionFactory.java  |   21 +-
 .../ui/correction/java/QuickFixProcessor.java      |    6 +-
 .../java/SearchRepositoriesForIUProposal.java      |   78 +
 .../pde/internal/ui/editor/OpenManifestAction.java |   10 +-
 .../pde/internal/ui/editor/PDEFormPage.java        |   19 +-
 .../internal/ui/editor/PDELauncherFormEditor.java  |   47 +-
 .../ui/editor/PDEMultiPageContentOutline.java      |    5 +-
 .../pde/internal/ui/editor/build/BinSection.java   |    8 +-
 .../ui/editor/build/BuildContentsSection.java      |   30 +-
 .../pde/internal/ui/editor/build/BuildEditor.java  |    5 +-
 .../pde/internal/ui/editor/build/BuildPage.java    |   16 +-
 .../internal/ui/editor/build/BuildSourcePage.java  |    8 +-
 .../pde/internal/ui/editor/build/SrcSection.java   |    4 +-
 .../internal/ui/editor/category/FeaturesPage.java  |    2 +-
 .../contentassist/TypeCompletionProposal.java      |   24 +-
 .../contentassist/XMLCompletionProposal.java       |   25 +-
 .../display/BrowserInformationControl.java         |  563 --
 .../contentassist/display/HTML2TextReader.java     |  312 -
 .../display/JavaDocCommentReader.java              |   12 +-
 .../contentassist/display/SingleCharReader.java    |   60 -
 .../display/SubstitutionTextReader.java            |  156 -
 .../editor/context/XMLDocumentSetupParticpant.java |   10 +-
 .../ui/editor/context/XMLInputContext.java         |    9 +-
 .../internal/ui/editor/feature/DataSection.java    |    5 +-
 .../ui/editor/feature/FeatureAdvancedPage.java     |   16 +-
 .../ui/editor/feature/FeatureDependenciesPage.java |   16 +-
 .../internal/ui/editor/feature/FeatureEditor.java  |   32 +-
 .../feature/FeatureEditorMatchingStrategy.java     |   18 +-
 .../ui/editor/feature/FeatureFormPage.java         |   16 +-
 .../ui/editor/feature/FeatureIncludesPage.java     |   16 +-
 .../ui/editor/feature/FeatureReferencePage.java    |   16 +-
 .../internal/ui/editor/feature/InfoFormPage.java   |   16 +-
 .../ui/editor/plugin/CreateManifestOperation.java  |   10 +-
 .../ui/editor/plugin/DependenciesPage.java         |   16 +-
 .../editor/plugin/DependencyManagementSection.java |   16 +-
 .../ui/editor/plugin/ExtensionPointsPage.java      |   16 +-
 .../internal/ui/editor/plugin/ExtensionsPage.java  |   16 +-
 .../ui/editor/plugin/ExtensionsSection.java        |   14 +-
 .../ui/editor/plugin/GeneralInfoSection.java       |   25 +-
 .../ui/editor/plugin/ImportPackageSection.java     |    5 +-
 .../ui/editor/plugin/JavaAttributeWizardPage.java  |    9 +-
 .../internal/ui/editor/plugin/LibrarySection.java  |   36 +-
 .../internal/ui/editor/plugin/ManifestEditor.java  |   67 +-
 .../plugin/ManifestEditorMatchingStrategy.java     |   10 +-
 .../internal/ui/editor/plugin/OverviewPage.java    |    7 +-
 .../ui/editor/plugin/PluginExportAction.java       |   35 +-
 .../pde/internal/ui/editor/plugin/RuntimePage.java |   18 +-
 .../internal/ui/editor/product/BrandingPage.java   |   16 +-
 .../ui/editor/product/DependenciesPage.java        |    2 +-
 .../pde/internal/ui/editor/product/JRESection.java |   44 +-
 .../internal/ui/editor/product/LaunchingPage.java  |   16 +-
 .../internal/ui/editor/product/OverviewPage.java   |    2 +-
 .../ui/editor/product/ProductValidateAction.java   |    2 +-
 .../pde/internal/ui/editor/product/SplashPage.java |   20 +-
 .../internal/ui/editor/product/VersionDialog.java  |    3 +-
 .../internal/ui/editor/schema/SchemaFormPage.java  |    5 +-
 .../ui/editor/schema/SchemaOverviewPage.java       |    8 +-
 .../pde/internal/ui/editor/site/ArchivePage.java   |   16 +-
 .../internal/ui/editor/site/CategorySection.java   |   45 +-
 .../pde/internal/ui/editor/site/FeaturesPage.java  |   16 +-
 .../editor/targetdefinition/ArgumentsSection.java  |    8 +-
 .../ui/editor/targetdefinition/ContentPage.java    |    3 +-
 .../ui/editor/targetdefinition/ContentSection.java |    7 +-
 .../ui/editor/targetdefinition/DefinitionPage.java |    3 +-
 .../editor/targetdefinition/EnvironmentPage.java   |    3 +-
 .../targetdefinition/EnvironmentSection.java       |   45 +-
 .../ImplicitDependenciesSection.java               |   33 +-
 .../ui/editor/targetdefinition/JRESection.java     |    2 +-
 .../editor/targetdefinition/LocationsSection.java  |    2 +-
 .../ui/editor/targetdefinition/TargetEditor.java   |   20 +-
 .../text/ChangeAwareSourceViewerConfiguration.java |    7 +-
 .../pde/internal/ui/editor/text/HTMLPrinter.java   |  291 -
 .../ui/editor/text/ManifestConfiguration.java      |    3 +-
 .../ui/editor/text/PDEQuickAssistAssistant.java    |  115 +-
 .../ui/editor/text/PluginXMLConfiguration.java     |   15 +-
 .../internal/ui/editor/text/XMLConfiguration.java  |   44 +-
 .../ui/editor/text/XMLReconcilingStrategy.java     |  155 +
 .../ui/editor/text/XMLStringPartitionScanner.java  |   36 +
 .../internal/ui/launcher/AbstractPluginBlock.java  |  103 +-
 .../pde/internal/ui/launcher/BaseBlock.java        |    4 +-
 .../pde/internal/ui/launcher/BlockAdapter.java     |  142 +
 .../internal/ui/launcher/BundleLauncherHelper.java |  313 -
 .../ui/launcher/ConfigurationAreaBlock.java        |    5 +-
 .../ui/launcher/ConfigurationTemplateBlock.java    |    5 +-
 .../launcher/EclipsePluginValidationOperation.java |  122 -
 .../internal/ui/launcher/EquinoxInitializer.java   |  130 -
 .../pde/internal/ui/launcher/FeatureBlock.java     | 1192 +++
 .../internal/ui/launcher/FilteredCheckboxTree.java |   15 +-
 .../ui/launcher/GenericExceptionStatusHandler.java |   25 +
 .../eclipse/pde/internal/ui/launcher/JREBlock.java |    5 +-
 .../internal/ui/launcher/JUnitProgramBlock.java    |   26 +-
 .../pde/internal/ui/launcher/LaunchAction.java     |   46 +-
 .../ui/launcher/LaunchArgumentsHelper.java         |  332 -
 .../ui/launcher/LaunchConfigurationHelper.java     |  453 -
 .../ui/launcher/LaunchConfigurationListener.java   |   48 -
 .../pde/internal/ui/launcher/LaunchListener.java   |  208 -
 .../ui/launcher/LaunchPluginValidator.java         |  133 -
 .../launcher/LaunchTerminationStatusHandler.java   |   87 +
 .../ui/launcher/LaunchValidationOperation.java     |  161 -
 .../pde/internal/ui/launcher/LauncherUtils.java    |  413 -
 .../ui/launcher/LauncherUtilsStatusHandler.java    |  148 +
 .../pde/internal/ui/launcher/OSGiBundleBlock.java  |    5 +-
 .../internal/ui/launcher/OSGiFrameworkBlock.java   |  296 +-
 .../internal/ui/launcher/OSGiFrameworkManager.java |  141 -
 .../ui/launcher/OSGiMigrationDelegate.java         |   42 -
 .../ui/launcher/OSGiValidationOperation.java       |   28 -
 .../pde/internal/ui/launcher/OpenLogDialog.java    |    8 +-
 .../internal/ui/launcher/PDELogFileProvider.java   |    3 +-
 .../internal/ui/launcher/PDEMigrationDelegate.java |   56 -
 .../ui/launcher/PDESourceLookupDirector.java       |  242 -
 .../internal/ui/launcher/PDESourceLookupQuery.java |  258 -
 .../pde/internal/ui/launcher/PluginBlock.java      |   87 +-
 .../internal/ui/launcher/PluginStatusDialog.java   |   12 +-
 .../ui/launcher/PluginValidationStatusHandler.java |   57 +
 .../ui/launcher/ProductValidationOperation.java    |   54 -
 .../pde/internal/ui/launcher/ProgramBlock.java     |    5 +-
 .../internal/ui/launcher/SoftwareInstallBlock.java |   96 +
 .../pde/internal/ui/launcher/TracingBlock.java     |    5 +-
 .../ui/launcher/TracingPropertySource.java         |    2 +-
 .../eclipse/pde/internal/ui/launcher/VMHelper.java |   94 -
 .../internal/ui/launcher/WorkspaceDataBlock.java   |   20 +-
 .../ui/nls/ExternalizeStringsOperation.java        |   12 +-
 .../eclipse/pde/internal/ui/nls/ModelChange.java   |   19 +-
 .../pde/internal/ui/nls/NLSFragmentGenerator.java  |   10 +-
 .../eclipse/pde/internal/ui/parts/FormEntry.java   |    4 +-
 .../pde/internal/ui/pderesources.properties        |  165 +-
 .../ui/preferences/AddToJavaSearchJob.java         |  174 +
 .../ui/preferences/MainPreferencePage.java         |   50 +-
 .../preferences/OSGiFrameworkPreferencePage.java   |   43 +-
 .../PDECompilersConfigurationBlock.java            |   24 +-
 .../ui/preferences/PreferenceInitializer.java      |    4 +-
 .../preferences/TargetPlatformPreferencePage.java  |   59 +-
 .../ui/properties/PluginDevelopmentPage.java       |   28 +-
 .../ui/provisional/IBundeImportWizardPage.java     |   58 +
 .../ui/refactoring/ContainerRenameParticipant.java |   13 +-
 .../refactoring/CreateHeaderChangeOperation.java   |    6 +-
 .../ManifestPackageMoveParticipant.java            |   10 +-
 .../refactoring/ManifestTypeMoveParticipant.java   |    9 +-
 .../ui/refactoring/PDEMoveParticipant.java         |   11 +-
 .../ui/refactoring/PDERenameParticipant.java       |   15 +-
 .../ui/refactoring/PluginManifestChange.java       |   17 +-
 .../refactoring/RenameExtensionPointProcessor.java |    6 +-
 .../ui/refactoring/RenamePluginProcessor.java      |    6 +-
 .../ui/refactoring/ResourceMoveParticipant.java    |   11 +-
 .../internal/ui/search/FindReferencesAction.java   |   38 +-
 .../pde/internal/ui/search/SearchResult.java       |    5 +-
 .../internal/ui/search/ShowDescriptionAction.java  |    3 +-
 .../dependencies/AddNewDependenciesOperation.java  |    7 +-
 .../dependencies/CalculateUsesOperation.java       |   20 +-
 .../search/dependencies/UnusedImportsDialog.java   |   15 +-
 .../search/dialogs/FilteredIUSelectionDialog.java  |  271 +
 .../pde/internal/ui/search/dialogs/IUPackage.java  |   62 +
 .../dialogs/TargetRepositorySearchHandler.java     |   98 +
 .../ui/shared/CachedCheckboxTreeViewer.java        |  258 +
 .../internal/ui/shared/FilteredCheckboxTree.java   |  134 +
 .../target/AddBundleContainerSelectionPage.java    |    5 +-
 .../ui/shared/target/AddFeatureContainersPage.java |    4 +-
 .../ArgumentsFromContainerSelectionDialog.java     |    2 -
 .../shared/target/EditDirectoryContainerPage.java  |   10 +-
 .../ui/shared/target/EditIUContainerPage.java      |   65 +-
 .../ui/shared/target/EditProfileContainerPage.java |    9 +-
 .../pde/internal/ui/shared/target/Messages.java    |   13 +-
 .../ui/shared/target/PreviewContainerPage.java     |    6 +-
 .../shared/target/StyledBundleLabelProvider.java   |   68 +-
 .../ui/shared/target/TargetContentsGroup.java      |  947 ++-
 .../ui/shared/target/TargetLocationsGroup.java     |  190 +-
 .../internal/ui/shared/target/messages.properties  |   25 +-
 .../pde/internal/ui/util/ModelModification.java    |   16 +-
 .../eclipse/pde/internal/ui/util/OSGiConsole.java  |   74 +
 .../pde/internal/ui/util/OSGiConsoleFactory.java   |   61 +
 .../ui/util/OSGiConsolePageParticipant.java        |   63 +
 .../pde/internal/ui/util/PDEJavaHelperUI.java      |    6 +-
 .../pde/internal/ui/util/PDEModelUtility.java      |   34 +-
 .../pde/internal/ui/util/PluginWorkingSet.java     |    1 +
 .../ui/views/plugins/ImportActionGroup.java        |   65 +-
 .../ui/views/plugins/JavaSearchActionGroup.java    |   30 +-
 .../pde/internal/ui/views/plugins/PluginsView.java |    9 +-
 .../ui/wizards/exports/AbstractExportTab.java      |    4 +-
 .../wizards/exports/AntGeneratingExportWizard.java |    5 +-
 .../ui/wizards/exports/BaseExportWizard.java       |    8 +-
 .../ui/wizards/exports/ExportActiveTargetJob.java  |  161 +
 .../ui/wizards/exports/ExportDestinationTab.java   |   13 +-
 .../ui/wizards/exports/ExportOptionsTab.java       |    2 +-
 .../ui/wizards/exports/ExportTargetMetadata.java   |   85 +
 .../ui/wizards/exports/FeatureOptionsTab.java      |   15 +-
 .../ui/wizards/exports/PluginExportWizardPage.java |    7 +-
 .../wizards/exports/ProductDestinationGroup.java   |    5 +-
 .../ui/wizards/exports/ProductExportWizard.java    |  334 +-
 .../wizards/exports/ProductExportWizardPage.java   |    7 +-
 .../exports/TargetDefinitionExportWizard.java      |   53 +
 .../exports/TargetDefinitionExportWizardPage.java  |  167 +
 .../ui/wizards/extension/PointSelectionPage.java   |   43 +-
 .../feature/AbstractCreateFeatureOperation.java    |   12 +-
 .../CreateFeatureProjectFromLaunchOperation.java   |    6 +-
 .../ui/wizards/feature/PluginListPage.java         |    5 +-
 .../imports/BaseImportWizardSecondPage.java        |  104 +-
 .../ui/wizards/imports/CVSBundleImportPage.java    |  227 +
 .../ui/wizards/imports/FeatureImportOperation.java |    5 +-
 .../wizards/imports/FeatureImportWizardPage.java   | 1009 ++-
 .../imports/OverwriteProjectsSelectionDialog.java  |  204 +
 .../wizards/imports/PluginImportLabelProvider.java |   69 +
 .../ui/wizards/imports/PluginImportOperation.java  |  580 +-
 .../ui/wizards/imports/PluginImportWizard.java     |   79 +-
 .../imports/PluginImportWizardDetailedPage.java    |   58 +-
 .../imports/PluginImportWizardExpressPage.java     |   14 +-
 .../imports/PluginImportWizardFirstPage.java       |  286 +-
 .../ui/wizards/imports/RepositoryImportWizard.java |  149 +
 .../internal/ui/wizards/plugin/ContentPage.java    |   17 +-
 .../plugin/NewLibraryPluginCreationOperation.java  |   15 +-
 .../plugin/NewLibraryPluginCreationPage.java       |    4 +-
 .../plugin/NewProjectCreationOperation.java        |   16 +-
 .../ui/wizards/plugin/NewProjectCreationPage.java  |    6 +-
 .../wizards/plugin/PluginClassCodeGenerator.java   |   21 +-
 .../ui/wizards/plugin/PluginContentPage.java       |   12 +-
 .../ui/wizards/product/BaseManifestOperation.java  |    8 +-
 .../ui/wizards/product/ProductFileWizardPage.java  |    3 +-
 .../product/ProductFromConfigOperation.java        |   27 +-
 .../ui/wizards/product/ProductIntroOperation.java  |    7 +-
 .../ui/wizards/product/ProductIntroWizardPage.java |   12 +-
 .../product/UpdateSplashProgressOperation.java     |    6 +-
 .../wizards/target/NewTargetDefinitionWizard.java  |   12 +-
 .../target/TargetDefinitionContentPage.java        |   91 +-
 .../tools/ConvertProjectToPluginOperation.java     |   13 +-
 .../ui/wizards/tools/OrganizeManifest.java         |    6 +-
 .../ui/wizards/tools/OrganizeManifestsAction.java  |    6 +-
 .../wizards/tools/OrganizeManifestsWizardPage.java |    8 +-
 .../pde/ui/launcher/AbstractLaunchShortcut.java    |    5 +-
 .../pde/ui/launcher/AbstractLauncherTab.java       |    9 +-
 .../launcher/AbstractPDELaunchConfiguration.java   |  405 +-
 .../AbstractPDELaunchConfigurationTabGroup.java    |   15 +-
 .../org/eclipse/pde/ui/launcher/BundlesTab.java    |   33 +-
 .../eclipse/pde/ui/launcher/ConfigurationTab.java  |   14 +-
 .../EclipseApplicationLaunchConfiguration.java     |   28 +-
 .../pde/ui/launcher/EclipseLaunchShortcut.java     |   19 +-
 .../pde/ui/launcher/EclipseLauncherTabGroup.java   |    7 +-
 .../ui/launcher/EquinoxLaunchConfiguration.java    |   18 +-
 .../pde/ui/launcher/IPDELauncherConstants.java     |  377 +-
 .../launcher/JUnitLaunchConfigurationDelegate.java |  473 +-
 .../org/eclipse/pde/ui/launcher/JUnitTabGroup.java |    4 +-
 .../ui/launcher/JUnitWorkbenchLaunchShortcut.java  |   17 +-
 .../launcher/OSGiLaunchConfigurationDelegate.java  |   43 +-
 .../OSGiLaunchConfigurationInitializer.java        |   93 +-
 .../pde/ui/launcher/OSGiLaunchShortcut.java        |    8 +-
 .../pde/ui/launcher/OSGiLauncherTabGroup.java      |    6 +-
 .../eclipse/pde/ui/launcher/OSGiSettingsTab.java   |    4 +-
 .../pde/ui/launcher/PDESourcePathProvider.java     |  123 +-
 .../org/eclipse/pde/ui/launcher/PluginsTab.java    |   65 +-
 .../src/org/eclipse/pde/ui/launcher/TestTab.java   |    2 +
 .../org/eclipse/pde/ui/launcher/TracingTab.java    |    4 +-
 .../NewPluginProjectFromTemplateWizard.java        |    8 +-
 .../pde/ui/templates/OptionTemplateWizardPage.java |   15 +-
 .../pde/internal/ui/samples/ReviewPage.java        |    3 +-
 .../pde/internal/ui/samples/ShowSampleAction.java  |  137 +-
 .../plugins/org.eclipse.pde/META-INF/MANIFEST.MF   |    2 +-
 eclipse/plugins/org.eclipse.pde/about.properties   |    4 +-
 .../cheatsheets/helloworld/helloworld-create.xml   |   20 +-
 .../cheatsheets/helloworld/helloworld-feature.xml  |   16 +-
 .../cheatsheets/helloworld/helloworld-install.xml  |    4 +
 .../cheatsheets/helloworld/helloworld-update.xml   |    6 +-
 .../cheatsheets/rcpapp/rcpapp-create.xml           |    7 +-
 .../cheatsheets/rcpapp/rcpapp-customize.xml        |    8 +-
 .../cheatsheets/rcpapp/rcpapp-export.xml           |    4 +-
 .../cheatsheets/rcpapp/rcpapp-feature-product.xml  |    6 +-
 .../cheatsheets/rcpapp/rcpapp-plugin-product.xml   |   12 +-
 .../setup-apitools-existing-projects.xml           |   68 +
 eclipse/plugins/org.eclipse.pde/plugin.properties  |    7 +-
 eclipse/plugins/org.eclipse.pde/plugin.xml         |   12 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.platform.doc.isv/buildDoc.xml      |    5 +-
 .../org.eclipse.platform.doc.isv/guide/arch.htm    |    2 +-
 .../guide/arch_struct.htm                          |    2 +-
 .../guide/bundle_security.html                     |    4 +-
 .../guide/compare_contentviewer.htm                |    5 +-
 .../guide/debug_breakpoints.htm                    |    2 +-
 .../guide/debug_ui.htm                             |    2 +-
 .../guide/forms_editors.htm                        |    2 +-
 .../guide/images/p2allbundles.png                  |  Bin 0 -> 520017 bytes
 .../guide/images/p2allbundlesinstalled.png         |  Bin 0 -> 398491 bytes
 .../guide/images/p2cloudinstall.png                |  Bin 0 -> 141807 bytes
 .../guide/images/p2forcedupdate.png                |  Bin 0 -> 40432 bytes
 .../guide/images/p2reuse.png                       |  Bin 0 -> 154102 bytes
 .../guide/int_eclipse.htm                          |    6 +-
 .../org.eclipse.platform.doc.isv/guide/jface.htm   |    4 +-
 .../guide/p2_actions_touchpoints.html              |  627 ++
 .../guide/p2_api_overview.htm                      |  217 +
 .../guide/p2_customizing_metadata.html             |    4 +-
 .../guide/p2_director.html                         |   15 +-
 .../guide/p2_metadata.html                         |    2 +-
 .../guide/p2_overview.htm                          |    2 +-
 .../guide/p2_publisher.html                        |    2 +-
 .../guide/p2_publishingtasks.htm                   |    2 +-
 .../guide/p2_repositorytasks.htm                   |   62 +-
 .../guide/p2_startup.htm                           |   82 +
 .../org.eclipse.platform.doc.isv/guide/p2_ui.htm   |   33 +
 .../guide/p2_uipolicy.htm                          |  260 +
 .../guide/p2_uireuse.htm                           |   88 +
 .../org.eclipse.platform.doc.isv/guide/product.htm |    2 +-
 .../guide/product_def_feature.htm                  |    2 +-
 .../guide/product_def_plugins.htm                  |   12 +-
 .../guide/product_extension.htm                    |    2 +-
 .../guide/product_open_file.htm                    |  174 +
 .../org.eclipse.platform.doc.isv/guide/rcp.htm     |    4 +-
 .../guide/rcp_browser.htm                          |    4 +-
 .../guide/rcp_define.htm                           |    2 +-
 .../guide/rcp_extensions.htm                       |    2 +-
 .../org.eclipse.platform.doc.isv/guide/resAdv.htm  |    1 +
 .../guide/resAdv_natures.htm                       |    2 +-
 .../guide/resAdv_variables.htm                     |   43 +
 .../org.eclipse.platform.doc.isv/guide/resInt.htm  |    2 +
 .../guide/resInt_filters.htm                       |   31 +
 .../guide/resInt_virtual.htm                       |   30 +
 .../guide/runtime_jobs.htm                         |    9 +
 .../guide/runtime_model.htm                        |    2 +-
 .../guide/runtime_model_bundles.htm                |    2 +-
 .../guide/swt_widgets_events.htm                   |   17 +-
 .../guide/team_howto.htm                           |    2 +-
 .../guide/team_model_model.htm                     |    4 +-
 .../guide/team_model_repo.htm                      |    8 +-
 .../guide/team_provider_repository.htm             |    2 +-
 .../guide/ua_dynamic_filters.htm                   |   12 +-
 .../guide/ua_help_abstract_scope.htm               |   53 +
 .../guide/ua_help_content_child_links.htm          |   31 +
 .../guide/ua_help_content_criteria.htm             |  116 +
 .../guide/ua_help_content_nested.htm               |    2 +-
 .../guide/ua_help_content_process.htm              |    4 +-
 .../guide/ua_help_content_remote.htm               |    4 +-
 .../guide/ua_help_content_xhtml.htm                |   26 +-
 .../guide/ua_help_infocenter_preferences.htm       |   12 +-
 .../guide/ua_help_setup.htm                        |    4 +-
 .../guide/ua_help_setup_about.htm                  |    6 +-
 .../guide/ua_help_setup_infocenter.htm             |   80 +-
 .../guide/ua_help_setup_preferences.htm            |   66 +-
 .../guide/ua_help_setup_standalone.htm             |   15 +-
 .../guide/ua_help_war.htm                          |   19 +-
 .../guide/workbench.htm                            |    2 +-
 .../guide/workbench_advext_activities.htm          |    8 +-
 .../guide/workbench_advext_contexts.htm            |    2 +-
 .../guide/workbench_advext_decorators.htm          |    4 +-
 .../guide/workbench_basicext_popupMenus.htm        |    3 +-
 .../guide/workbench_cmd_menus.htm                  |    8 +-
 .../guide/workbench_perspectives.htm               |   20 +-
 .../guide/workbench_scalability.htm                |    4 +-
 .../guide/wrkAdv_services.htm                      |    8 +-
 .../org.eclipse.platform.doc.isv/notices.html      |    4 +-
 .../platformOptions.txt                            |  266 +-
 .../org.eclipse.platform.doc.isv/plugin.xml        |    8 +
 .../porting/3.3/faq.html                           |   41 -
 .../porting/3.3/incompatibilities.html             |  274 -
 .../porting/3.3/recommended.html                   |  231 -
 .../porting/3.6/faq.html                           |   42 +
 .../porting/3.6/incompatibilities.html             |  131 +
 .../porting/3.6/recommended.html                   |   47 +
 .../porting/eclipse_3_3_porting_guide.html         |   36 -
 .../porting/eclipse_3_6_porting_guide.html         |   35 +
 .../porting/removals.html                          |  123 +
 .../questions/index.html                           |    2 +-
 .../reference/extension-points/index.html          |   22 +-
 .../reference/misc/bundle_manifest.html            |   23 +-
 .../reference/misc/eclipsestarter.html             |    2 +-
 .../reference/misc/overview-platform.html          |   67 +-
 .../reference/misc/runtime-options.html            |   62 +-
 .../plugins/org.eclipse.platform.doc.isv/toc.xml   |    2 +-
 .../org.eclipse.platform.doc.isv/topics_Guide.xml  |   28 +-
 .../topics_Porting.xml                             |   13 +-
 .../topics_Reference.xml                           |   49 +-
 .../whatsNew/images/blockselection.png             |  Bin 40683 -> 0 bytes
 .../whatsNew/images/browserclose.png               |  Bin 0 -> 53626 bytes
 .../whatsNew/images/button-order.png               |  Bin 72816 -> 0 bytes
 .../whatsNew/images/cairoaix.png                   |  Bin 25605 -> 0 bytes
 .../whatsNew/images/cocoartl.PNG                   |  Bin 0 -> 14883 bytes
 .../whatsNew/images/datetime-dropdown.png          |  Bin 18711 -> 0 bytes
 .../whatsNew/images/dnd.png                        |  Bin 29114 -> 0 bytes
 .../whatsNew/images/editor.png                     |  Bin 40171 -> 0 bytes
 .../whatsNew/images/filtered-tree.png              |  Bin 6936 -> 0 bytes
 .../whatsNew/images/footer.png                     |  Bin 0 -> 93716 bytes
 .../whatsNew/images/injection_graph_func.js        |  463 -
 .../whatsNew/images/jnigen.png                     |  Bin 48242 -> 0 bytes
 .../whatsNew/images/link.png                       |  Bin 16524 -> 0 bytes
 .../whatsNew/images/margins.png                    |  Bin 14613 -> 0 bytes
 .../whatsNew/images/menu-mac.png                   |  Bin 0 -> 174924 bytes
 .../whatsNew/images/menu-win32.png                 |  Bin 0 -> 150303 bytes
 .../whatsNew/images/modified.png                   |  Bin 21756 -> 0 bytes
 .../whatsNew/images/multi-font-labels.png          |  Bin 9970 -> 0 bytes
 .../whatsNew/images/nautiluscopy.png               |  Bin 43966 -> 0 bytes
 .../whatsNew/images/newctab.png                    |  Bin 0 -> 4691 bytes
 .../whatsNew/images/newscope.png                   |  Bin 0 -> 15719 bytes
 .../whatsNew/images/overlayimage.png               |  Bin 0 -> 27617 bytes
 .../whatsNew/images/overlaytext.png                |  Bin 0 -> 45477 bytes
 .../whatsNew/images/printdialog.png                |  Bin 40765 -> 0 bytes
 .../whatsNew/images/progress.png                   |  Bin 0 -> 31260 bytes
 .../whatsNew/images/rss.png                        |  Bin 0 -> 47547 bytes
 .../whatsNew/images/search.png                     |  Bin 31550 -> 0 bytes
 .../whatsNew/images/see.png                        |  Bin 0 -> 6759 bytes
 .../whatsNew/images/segments-chars.png             |  Bin 0 -> 9242 bytes
 .../whatsNew/images/sheet-prompt.png               |  Bin 82302 -> 0 bytes
 .../whatsNew/images/sheet.png                      |  Bin 73811 -> 0 bytes
 .../whatsNew/images/showwelcome.png                |  Bin 17233 -> 0 bytes
 .../whatsNew/images/slate-intro.png                |  Bin 28022 -> 0 bytes
 .../whatsNew/images/slate-overview.png             |  Bin 36099 -> 0 bytes
 .../whatsNew/images/solarisx86-browser.png         |  Bin 78769 -> 0 bytes
 .../whatsNew/images/sttabs.png                     |  Bin 0 -> 22943 bytes
 .../whatsNew/images/tablednd.png                   |  Bin 0 -> 20407 bytes
 .../whatsNew/images/text_search.png                |  Bin 0 -> 7817 bytes
 .../whatsNew/images/uiabout1.png                   |  Bin 33879 -> 0 bytes
 .../whatsNew/images/uiabout2.png                   |  Bin 18993 -> 0 bytes
 .../whatsNew/images/variable-tab-stops.png         |  Bin 0 -> 13069 bytes
 .../whatsNew/images/webappextn.png                 |  Bin 0 -> 81421 bytes
 .../whatsNew/images/webkitgtk.png                  |  Bin 0 -> 54756 bytes
 .../whatsNew/images/wrap-indent.png                |  Bin 0 -> 20434 bytes
 .../whatsNew/platform_isv_whatsnew.html            |  825 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.platform.doc.user/build.properties |    2 +-
 .../concepts/accessibility/text_editor.htm         |   61 +-
 .../concepts/concepts-13.htm                       |   12 +
 .../concepts/concepts-21.htm                       |   13 +-
 .../concepts/cpathvars.htm                         |   21 +-
 .../concepts/resourcefilters.htm                   |   77 +
 .../concepts/virtualfolders.htm                    |   45 +
 .../concepts/welcome.htm                           |    7 +-
 .../contexts_UserAssistance.xml                    |    2 +-
 .../contexts_Workbench.xml                         |   63 +-
 .../gettingStarted/qs-12.htm                       |    6 +-
 .../gettingStarted/qs-24a.xhtml                    |   11 +-
 .../gettingStarted/qs-31b.htm                      |   18 +-
 .../gettingStarted/qs-36b.htm                      |    4 +-
 .../gettingStarted/qs-responsiveUI.htm             |    8 +-
 .../images/Image209_workspace.png                  |  Bin 16484 -> 28040 bytes
 .../images/Image219_pref_cv2.png                   |  Bin 55951 -> 49993 bytes
 .../images/Image222_pref_lh.png                    |  Bin 14519 -> 24474 bytes
 .../images/Image223_pref_persp.png                 |  Bin 18045 -> 33474 bytes
 .../images/Image262_import_file.png                |  Bin 13361 -> 36896 bytes
 .../images/Image36_linkedresources.png             |  Bin 14663 -> 35590 bytes
 .../images/Image39_import_tree.png                 |  Bin 14638 -> 33918 bytes
 .../images/Image_file_folder_operation.png         |  Bin 0 -> 16349 bytes
 .../images/Image_file_operation.png                |  Bin 0 -> 14868 bytes
 .../images/Image_team_pref.png                     |  Bin 25365 -> 28321 bytes
 .../images/help_preference.png                     |  Bin 25602 -> 32002 bytes
 .../images/help_preference_content.png             |  Bin 40863 -> 31923 bytes
 .../images/help_preference_infocenter.png          |  Bin 12301 -> 11040 bytes
 .../images/help_preference_server.png              |  Bin 23754 -> 0 bytes
 .../images/help_scope_criteria.png                 |  Bin 0 -> 21248 bytes
 .../images/help_scope_link.png                     |  Bin 0 -> 4403 bytes
 .../images/help_scope_new.png                      |  Bin 0 -> 12888 bytes
 .../images/help_scope_select.png                   |  Bin 0 -> 14325 bytes
 .../images/help_view_context.png                   |  Bin 15073 -> 10712 bytes
 .../images/help_window.png                         |  Bin 120784 -> 102409 bytes
 .../images/res_blocked.png                         |  Bin 23033 -> 61897 bytes
 .../images/res_build.png                           |  Bin 14054 -> 31508 bytes
 .../images/res_details.png                         |  Bin 8840 -> 7220 bytes
 .../images/res_otherjobs.png                       |  Bin 9254 -> 45942 bytes
 .../images/res_pref.png                            |  Bin 4185 -> 22241 bytes
 .../images/welcome.png                             |  Bin 121576 -> 85570 bytes
 .../org.eclipse.platform.doc.user/notices.html     |    4 +-
 .../reference/help_preferences.htm                 |   33 +-
 .../reference/help_preferences_content.htm         |   50 +-
 .../reference/ref-11.htm                           |    7 +
 .../reference/ref-14.htm                           |   13 +-
 .../reference/ref-15.htm                           |   20 +-
 .../reference/ref-19.htm                           |    7 +-
 .../reference/ref-32.htm                           |    4 +-
 .../reference/ref-37.htm                           |    2 +-
 .../reference/ref-38.htm                           |    8 +-
 .../reference/ref-3a.htm                           |    7 +-
 .../reference/ref-58.htm                           |    4 +
 .../reference/ref-70.htm                           |   41 +
 .../reference/ref-73.htm                           |   16 +-
 .../reference/ref-9.htm                            |   11 +-
 .../reference/ref-anteditor.htm                    |    8 +-
 .../reference/ref-cvs-decorations.htm              |    4 +-
 .../reference/ref-dialog-open-resource.htm         |  170 +
 .../tasks/help_navigate.htm                        |   10 -
 .../tasks/help_scope.htm                           |   51 +
 .../tasks/running_eclipse.htm                      |   12 +-
 .../tasks/tasks-126.htm                            |    5 +-
 .../tasks/tasks-132.htm                            |    2 +-
 .../tasks/tasks-1e.htm                             |    6 +-
 .../tasks/tasks-3.htm                              |    2 +-
 .../tasks/tasks-45.htm                             |    9 +-
 .../tasks/tasks-45a.htm                            |   53 +
 .../tasks/tasks-46ag.htm                           |    3 +
 .../tasks/tasks-68c.htm                            |   76 +-
 .../tasks/tasks-88.htm                             |    2 +
 .../tasks/tasks-97.htm                             |   46 +
 .../tasks/tasks-9c.htm                             |    8 +-
 .../tasks/timpandexp.htm                           |   32 +-
 .../tasks/topenmode.htm                            |    4 +-
 .../tips/images/preference-transfer-compiler.png   |  Bin 0 -> 10118 bytes
 .../{ => tips}/images/res_build.png                |  Bin 14054 -> 14054 bytes
 .../tips/platform_tips.html                        |   19 +-
 .../topics_Concepts.xml                            |    2 +
 .../topics_Reference.xml                           |    1 +
 .../org.eclipse.platform.doc.user/topics_Tasks.xml |    7 +-
 .../whatsNew/images/alternate.png                  |  Bin 27019 -> 0 bytes
 .../images/apply-patch-in-sync-view-preference.png |  Bin 0 -> 18629 bytes
 .../whatsNew/images/apply-patch-syncview.png       |  Bin 20148 -> 0 bytes
 .../whatsNew/images/apply-patch-ws.png             |  Bin 0 -> 20191 bytes
 .../whatsNew/images/block-selection-mode.png       |  Bin 3722 -> 0 bytes
 .../whatsNew/images/breakpoint-details.png         |  Bin 0 -> 22941 bytes
 .../whatsNew/images/cnf-gointo.png                 |  Bin 9877 -> 0 bytes
 .../whatsNew/images/cocoa.png                      |  Bin 37207 -> 0 bytes
 .../whatsNew/images/collapse-projection.png        |  Bin 2074 -> 0 bytes
 .../whatsNew/images/commitWizardLogicalModels.png  |  Bin 0 -> 23923 bytes
 .../whatsNew/images/configure-branches.png         |  Bin 0 -> 33587 bytes
 .../images/contentMergeViewerSwitching.png         |  Bin 2857 -> 0 bytes
 .../whatsNew/images/customicon.png                 |  Bin 14420 -> 0 bytes
 .../whatsNew/images/customize-perspective.png      |  Bin 30692 -> 0 bytes
 .../whatsNew/images/debug-breadcrumb-1.png         |  Bin 4477 -> 0 bytes
 .../whatsNew/images/debug-breadcrumb-2.png         |  Bin 10178 -> 0 bytes
 .../whatsNew/images/debug-breadcrumb-3.png         |  Bin 10370 -> 0 bytes
 .../whatsNew/images/dynamicPathVariables.png       |  Bin 0 -> 33475 bytes
 .../whatsNew/images/edit-button-in-property.png    |  Bin 0 -> 14076 bytes
 .../whatsNew/images/expressions-columns.png        |  Bin 0 -> 12470 bytes
 .../whatsNew/images/file-attributes-ui.png         |  Bin 0 -> 6307 bytes
 .../whatsNew/images/file-system-import.png         |  Bin 0 -> 43899 bytes
 .../whatsNew/images/gotoLine.png                   |  Bin 13667 -> 0 bytes
 .../whatsNew/images/hide-fvb.png                   |  Bin 0 -> 22580 bytes
 .../whatsNew/images/import-type-dialog.png         |  Bin 0 -> 23236 bytes
 .../whatsNew/images/import-zip.png                 |  Bin 0 -> 18994 bytes
 .../whatsNew/images/inaccessible-projects-page.png |  Bin 0 -> 23233 bytes
 .../whatsNew/images/injection_graph_func.js        |  463 -
 .../whatsNew/images/installhistory.png             |  Bin 0 -> 18574 bytes
 .../whatsNew/images/linkedResourcesPropPage.png    |  Bin 0 -> 28183 bytes
 .../whatsNew/images/localHistoryLimitSize.png      |  Bin 0 -> 19024 bytes
 .../images/matching-might-not-be-optimal.png       |  Bin 0 -> 10552 bytes
 .../whatsNew/images/multi-instance-properties.png  |  Bin 20070 -> 0 bytes
 .../whatsNew/images/open-in-compare-editor.png     |  Bin 0 -> 26432 bytes
 .../whatsNew/images/open-resource-boosting.png     |  Bin 0 -> 16517 bytes
 .../whatsNew/images/open-resource-dialog.png       |  Bin 8315 -> 0 bytes
 .../images/open-resource-path-relative.png         |  Bin 0 -> 22075 bytes
 .../whatsNew/images/open-resource-path.png         |  Bin 0 -> 10423 bytes
 .../whatsNew/images/p2-license.png                 |  Bin 0 -> 118086 bytes
 .../whatsNew/images/p2install-details-wizard.png   |  Bin 29745 -> 0 bytes
 .../whatsNew/images/p2install.png                  |  Bin 33599 -> 0 bytes
 .../whatsNew/images/p2installwizard.png            |  Bin 31146 -> 0 bytes
 .../whatsNew/images/p2menu.png                     |  Bin 4602 -> 0 bytes
 .../whatsNew/images/p2repoprefs2.png               |  Bin 12100 -> 0 bytes
 .../whatsNew/images/p2revert.png                   |  Bin 20635 -> 0 bytes
 .../whatsNew/images/p2updatewizard1.png            |  Bin 27982 -> 0 bytes
 .../whatsNew/images/p2updatewizard2.png            |  Bin 22637 -> 0 bytes
 .../whatsNew/images/patch-options-in-sync-view.png |  Bin 0 -> 18127 bytes
 .../whatsNew/images/proxy-settings-ui.png          |  Bin 19756 -> 0 bytes
 .../whatsNew/images/quickaccess-bindings.png       |  Bin 0 -> 5430 bytes
 .../whatsNew/images/quicksearch.png                |  Bin 9049 -> 0 bytes
 .../whatsNew/images/resize-popups-gtk.png          |  Bin 0 -> 19306 bytes
 .../whatsNew/images/resourceFilters.png            |  Bin 0 -> 31550 bytes
 .../whatsNew/images/save-dialog.png                |  Bin 0 -> 5702 bytes
 .../images/show-ruler-annotation-tooltip.png       |  Bin 0 -> 4150 bytes
 .../whatsNew/images/solarisx86.png                 |  Bin 54654 -> 0 bytes
 .../whatsNew/images/switch-editors.png             |  Bin 10616 -> 0 bytes
 .../whatsNew/images/sync-schedule.png              |  Bin 13664 -> 0 bytes
 .../whatsNew/images/syncViewLinkWithEditor.png     |  Bin 0 -> 10082 bytes
 .../whatsNew/images/tag-history.png                |  Bin 13527 -> 0 bytes
 .../whatsNew/images/taskbarprogress.png            |  Bin 0 -> 37451 bytes
 .../whatsNew/images/textSelection.png              |  Bin 10955 -> 0 bytes
 .../whatsNew/images/virtual-folder-properties.png  |  Bin 0 -> 9541 bytes
 .../whatsNew/images/virtual-folder.png             |  Bin 0 -> 26743 bytes
 .../whatsNew/images/visible-folded-annotations.png |  Bin 0 -> 1503 bytes
 .../whatsNew/images/webkitgtk.png                  |  Bin 0 -> 54756 bytes
 .../whatsNew/images/welcomescale.png               |  Bin 1722 -> 0 bytes
 .../whatsNew/images/wizardstop.png                 |  Bin 0 -> 16597 bytes
 .../whatsNew/images/wordinplace.png                |  Bin 11656 -> 0 bytes
 .../whatsNew/images/workspaces-preference-page.png |  Bin 28883 -> 0 bytes
 .../whatsNew/platform_whatsnew.html                |  638 +-
 .../org.eclipse.platform/META-INF/MANIFEST.MF      |   10 +-
 .../plugins/org.eclipse.platform/about.properties  |    4 +-
 .../cheatsheets/cvs_checkout.xml                   |    2 +-
 .../intro/whatsnewExtensionContent2.xml            |    2 +-
 .../intro/whatsnewExtensionContent3.xml            |    4 +-
 .../plugins/org.eclipse.platform/plugin.properties |    4 +-
 .../org.eclipse.platform/plugin_customization.ini  |    2 +-
 eclipse/plugins/org.eclipse.platform/splash.bmp    |  Bin 403616 -> 403614 bytes
 .../platform/internal/EclipseRSSViewer.java        |  381 -
 .../org/eclipse/platform/internal/Messages.java    |   32 -
 .../eclipse/platform/internal/messages.properties  |   12 -
 .../plugins/org.eclipse.rcp/META-INF/MANIFEST.MF   |    2 +-
 .../org.eclipse.releng.tools/META-INF/MANIFEST.MF  |    2 +-
 .../org/eclipse/releng/tools/BuildNotesPage.java   |   72 +-
 .../eclipse/releng/tools/FixCopyrightAction.java   |    4 +
 .../org/eclipse/releng/tools/GetBugsOperation.java |   10 +-
 .../eclipse/releng/tools/ProjectSelectionPage.java |   25 +-
 .../releng/tools/ProjectValidationDialog.java      |   29 +-
 .../org/eclipse/releng/tools/ReleaseWizard.java    |  103 +-
 .../src/org/eclipse/releng/tools/TagPage.java      |   24 +-
 .../src/org/eclipse/releng/tools/ValidatePage.java |   52 +
 .../org/eclipse/releng/tools/messages.properties   |   62 +-
 .../plugins/org.eclipse.sdk/META-INF/MANIFEST.MF   |    2 +-
 eclipse/plugins/org.eclipse.sdk/plugin.properties  |    9 +-
 eclipse/plugins/org.eclipse.sdk/plugin.xml         |    2 +-
 .../org.eclipse.sdk/plugin_customization.ini       |    2 +-
 .../org.eclipse.search/META-INF/MANIFEST.MF        |    4 +-
 .../search/ui/text/AbstractTextSearchViewPage.java |   56 +-
 .../internal/ui/SearchHistorySelectionDialog.java  |    4 +-
 .../eclipse/search2/internal/ui/SearchView.java    |    3 +-
 .../org.eclipse.search/schema/searchPages.exsd     |   19 +-
 .../core/text/FileCharSequenceProvider.java        |    4 +-
 .../search/internal/ui/CopyToClipboardAction.java  |    5 +-
 .../org/eclipse/search/internal/ui/ScopePart.java  |    8 +-
 .../eclipse/search/internal/ui/SearchDialog.java   |    5 +-
 .../eclipse/search/internal/ui/SearchManager.java  |    9 +-
 .../search/internal/ui/SearchMessages.properties   |   12 +-
 .../search/internal/ui/SearchPageDescriptor.java   |   21 +-
 .../eclipse/search/internal/ui/SearchPlugin.java   |    6 +-
 .../search/internal/ui/text/FileSearchPage.java    |   45 +-
 .../internal/ui/text/ReplaceConfigurationPage.java |    4 +-
 .../search/internal/ui/text/TextSearchPage.java    |   71 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.carbon.macosx/build.xml        |  371 +-
 .../org.eclipse.swt.cocoa.macosx.x86_64/.project   |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.cocoa.macosx.x86_64/build.xml  |  411 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../plugins/org.eclipse.swt.cocoa.macosx/build.xml |  373 +-
 .../plugins/org.eclipse.swt.gtk.aix.ppc64/.project |   11 +
 .../META-INF/MANIFEST.MF                           |   19 +
 .../org.eclipse.swt.gtk.aix.ppc64/about.html       |  301 +
 .../about_files/IJG_README                         |    0
 .../about_files/about_cairo.html                   |    0
 .../about_files/lgpl-v21.txt                       |    0
 .../about_files/mpl-v11.txt                        |    0
 .../about_files/pixman-licenses.txt                |    0
 .../about_files/webkit-bsd.txt                     |   20 +
 .../build.properties                               |    0
 .../org.eclipse.swt.gtk.aix.ppc64/build.xml        |   12 +
 .../fragment.properties                            |    0
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.linux.ppc/about.html       |    3 +-
 .../org.eclipse.swt.gtk.linux.ppc/build.xml        |  395 +-
 .../buildLibraries.csh                             |   21 -
 .../org.eclipse.swt.gtk.linux.ppc/console.txt      |   91 -
 .../.project                                       |    0
 .../META-INF/MANIFEST.MF                           |   19 +
 .../org.eclipse.swt.gtk.linux.ppc64/about.html     |  261 +
 .../about_files/IJG_README                         |    0
 .../about_files/about_cairo.html                   |    0
 .../about_files/lgpl-v21.txt                       |    0
 .../about_files/mpl-v11.txt                        |    0
 .../about_files/pixman-licenses.txt                |    0
 .../build.properties                               |    0
 .../org.eclipse.swt.gtk.linux.ppc64/build.xml      |   12 +
 .../fragment.properties                            |    0
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.linux.s390/about.html      |    3 +-
 .../org.eclipse.swt.gtk.linux.s390/build.xml       |  422 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.linux.s390x/about.html     |    3 +-
 .../org.eclipse.swt.gtk.linux.s390x/build.xml      |  513 +--
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.linux.x86/about.html       |   42 +-
 .../about_files/webkit-bsd.txt                     |   20 +
 .../org.eclipse.swt.gtk.linux.x86/build.xml        |  422 +-
 .../buildLibraries_rhel3.csh                       |   27 -
 .../buildLibraries_rhel4.csh                       |   23 -
 .../org.eclipse.swt.gtk.linux.x86/console.txt      |   51 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.linux.x86_64/about.html    |   42 +-
 .../about_files/webkit-bsd.txt                     |   20 +
 .../org.eclipse.swt.gtk.linux.x86_64/build.xml     |  432 +-
 .../buildLibraries_rhel3.csh                       |   38 -
 .../buildLibraries_rhel4.csh                       |   24 -
 .../org.eclipse.swt.gtk.linux.x86_64/console.txt   |  163 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.solaris.sparc/about.html   |    3 +-
 .../org.eclipse.swt.gtk.solaris.sparc/build.xml    |  394 +-
 .../buildLibraries.csh                             |   15 -
 .../org.eclipse.swt.gtk.solaris.sparc/console.txt  |   44 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.gtk.solaris.x86/about.html     |    3 +-
 .../org.eclipse.swt.gtk.solaris.x86/build.xml      |  397 +-
 .../buildLibraries.csh                             |   22 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.motif.aix.ppc/build.xml        |  428 +-
 .../buildLibraries.csh                             |   13 -
 .../org.eclipse.swt.motif.hpux.PA_RISC/.project    |   28 -
 .../META-INF/MANIFEST.MF                           |   19 -
 .../org.eclipse.swt.motif.hpux.PA_RISC/about.html  |  152 -
 .../org.eclipse.swt.motif.hpux.PA_RISC/build.xml   |  412 -
 .../buildLibraries.csh                             |    8 -
 .../fragment.properties                            |   12 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.motif.hpux.ia64_32/build.xml   |  428 +-
 .../buildLibraries.csh                             |    8 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.motif.linux.x86/build.xml      |  432 +-
 .../buildLibraries_rhel3.csh                       |   31 -
 .../buildLibraries_rhel4.csh                       |   23 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.motif.solaris.sparc/build.xml  |  428 +-
 .../buildLibraries.csh                             |   11 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.photon.qnx.x86/build.xml       |  379 +-
 eclipse/plugins/org.eclipse.swt.tools/.classpath   |   13 -
 eclipse/plugins/org.eclipse.swt.tools/.project     |   30 -
 .../.settings/org.eclipse.jdt.core.prefs           |   12 -
 .../org/eclipse/swt/tools/internal/IconExe.java    | 3290 -------
 .../org/eclipse/swt/tools/internal/test_16_4.bmp   |  Bin 246 -> 0 bytes
 .../org/eclipse/swt/tools/internal/test_16_8.bmp   |  Bin 1334 -> 0 bytes
 .../org/eclipse/swt/tools/internal/test_32_4.bmp   |  Bin 630 -> 0 bytes
 .../org/eclipse/swt/tools/internal/test_32_8.bmp   |  Bin 2102 -> 0 bytes
 .../org/eclipse/swt/tools/internal/test_48_4.bmp   |  Bin 1270 -> 0 bytes
 .../org/eclipse/swt/tools/internal/test_48_8.bmp   |  Bin 3382 -> 0 bytes
 .../org/eclipse/swt/tools/internal/ASTClass.java   |  190 -
 .../org/eclipse/swt/tools/internal/ASTField.java   |  137 -
 .../org/eclipse/swt/tools/internal/ASTItem.java    |   68 -
 .../org/eclipse/swt/tools/internal/ASTMethod.java  |  204 -
 .../eclipse/swt/tools/internal/ASTParameter.java   |   93 -
 .../org/eclipse/swt/tools/internal/ASTType.java    |  214 -
 .../eclipse/swt/tools/internal/AbstractItem.java   |   90 -
 .../eclipse/swt/tools/internal/CleanupClass.java   |  127 -
 .../swt/tools/internal/CleanupConstants.java       |   96 -
 .../eclipse/swt/tools/internal/CleanupNatives.java |   95 -
 .../swt/tools/internal/ConstantsGenerator.java     |   65 -
 .../eclipse/swt/tools/internal/EmbedMetaData.java  |  119 -
 .../org/eclipse/swt/tools/internal/Flags.java      |   37 -
 .../org/eclipse/swt/tools/internal/JNIClass.java   |   30 -
 .../org/eclipse/swt/tools/internal/JNIField.java   |   38 -
 .../eclipse/swt/tools/internal/JNIGenerator.java   |  322 -
 .../swt/tools/internal/JNIGeneratorApp.java        |  497 --
 .../swt/tools/internal/JNIGeneratorAppUI.java      | 1241 ---
 .../org/eclipse/swt/tools/internal/JNIItem.java    |   33 -
 .../org/eclipse/swt/tools/internal/JNIMethod.java  |   42 -
 .../eclipse/swt/tools/internal/JNIParameter.java   |   30 -
 .../org/eclipse/swt/tools/internal/JNIType.java    |   37 -
 .../eclipse/swt/tools/internal/LockGenerator.java  |  143 -
 .../org/eclipse/swt/tools/internal/MetaData.java   |   73 -
 .../swt/tools/internal/MetaDataGenerator.java      |  104 -
 .../swt/tools/internal/NativesGenerator.java       |  982 ---
 .../swt/tools/internal/ProgressMonitor.java        |   19 -
 .../eclipse/swt/tools/internal/ReflectClass.java   |  125 -
 .../eclipse/swt/tools/internal/ReflectField.java   |  133 -
 .../eclipse/swt/tools/internal/ReflectItem.java    |  106 -
 .../eclipse/swt/tools/internal/ReflectMethod.java  |  240 -
 .../swt/tools/internal/ReflectParameter.java       |  112 -
 .../eclipse/swt/tools/internal/ReflectType.java    |  142 -
 .../swt/tools/internal/SizeofGenerator.java        |   70 -
 .../eclipse/swt/tools/internal/StatsGenerator.java |  224 -
 .../swt/tools/internal/StructsGenerator.java       |  579 --
 ...lipse.swt.internal.accessibility.gtk.properties |   25 -
 .../org.eclipse.swt.internal.cairo.properties      |   31 -
 .../org.eclipse.swt.internal.gnome.properties      |   25 -
 .../org.eclipse.swt.internal.gtk.properties        |   25 -
 .../internal/org.eclipse.swt.internal.properties   |   53 -
 .../org.eclipse.swt.tools/META-INF/MANIFEST.MF     |   18 -
 .../org/eclipse/swt/tools/internal/DOMWriter.java  |    1 -
 .../eclipse/swt/tools/internal/MacGenerator.java   | 1675 ----
 .../eclipse/swt/tools/internal/MacGeneratorUI.java |  622 --
 .../swt/tools/internal/MozillaGenerator.java       |  692 --
 .../eclipse/swt/tools/internal/NativeStats.java    |  218 -
 .../org/eclipse/swt/tools/internal/Sleak.java      |  320 -
 eclipse/plugins/org.eclipse.swt.tools/about.html   |   28 -
 .../plugins/org.eclipse.swt.tools/build.properties |   25 -
 .../plugins/org.eclipse.swt.tools/icons/mac.gif    |  Bin 355 -> 0 bytes
 .../plugins/org.eclipse.swt.tools/icons/sleak.gif  |  Bin 1105 -> 0 bytes
 .../plugins/org.eclipse.swt.tools/icons/spy.gif    |  Bin 1075 -> 0 bytes
 .../org.eclipse.swt.tools/plugin.properties        |   17 -
 eclipse/plugins/org.eclipse.swt.tools/plugin.xml   |   83 -
 .../src/org/eclipse/swt/tools/Activator.java       |   71 -
 .../builders/Check64CompilationParticipant.java    |  293 -
 .../swt/tools/builders/Check64EnableAction.java    |   35 -
 .../org/eclipse/swt/tools/builders/JNIBuilder.java |   90 -
 .../eclipse/swt/tools/views/MacGeneratorView.java  |  165 -
 .../src/org/eclipse/swt/tools/views/SleakView.java |  102 -
 .../src/org/eclipse/swt/tools/views/SpyView.java   |  488 -
 .../templates/jnitemplates.xml                     |    7 -
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.win32.wce_ppc.arm/build.xml    |  303 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.win32.win32.x86/build.xml      |  369 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.swt.win32.win32.x86_64/build.xml   |  403 +-
 .../plugins/org.eclipse.swt.wpf.win32.x86/.project |   28 -
 .../META-INF/MANIFEST.MF                           |   13 -
 .../org.eclipse.swt.wpf.win32.x86/about.html       |  152 -
 .../org.eclipse.swt.wpf.win32.x86/build.properties |   11 -
 .../org.eclipse.swt.wpf.win32.x86/build.xml        |  373 -
 .../fragment.properties                            |   12 -
 eclipse/plugins/org.eclipse.swt/.classpath_carbon  |    1 +
 .../plugins/org.eclipse.swt/.classpath_carbon_j2me |    1 +
 eclipse/plugins/org.eclipse.swt/.classpath_gtk     |    2 +
 .../plugins/org.eclipse.swt/.classpath_gtk_j2me    |    1 +
 eclipse/plugins/org.eclipse.swt/.classpath_motif   |    1 +
 .../plugins/org.eclipse.swt/.classpath_motif_j2me  |    1 +
 eclipse/plugins/org.eclipse.swt/.classpath_photon  |    1 +
 .../plugins/org.eclipse.swt/.classpath_photon_j2me |    1 +
 eclipse/plugins/org.eclipse.swt/.classpath_wpf     |    1 +
 .../plugins/org.eclipse.swt/.settings/.api_filters | 2164 +++--
 .../.settings/org.eclipse.pde.api.tools.prefs      |   11 +-
 .../Eclipse SWT AWT/cocoa/library/swt_awt.c        |    5 +-
 .../cocoa/org/eclipse/swt/awt/SWT_AWT.java         |  394 +-
 .../org/eclipse/swt/accessibility/Accessible.java  |  498 ++-
 .../org/eclipse/swt/accessibility/Accessible.java  | 2857 +++++-
 .../swt/accessibility/AccessibleTableColumn.java   |  100 +
 .../swt/accessibility/AccessibleTableHeader.java   |  102 +
 .../swt/accessibility/AccessibleTableRow.java      |  167 +
 .../org/eclipse/swt/accessibility/Relation.java    |   81 +
 .../swt/accessibility/SWTAccessibleDelegate.java   |   30 +-
 .../swt/accessibility/TableAccessibleDelegate.java |  288 +
 .../common/org/eclipse/swt/accessibility/ACC.java  |  681 ++-
 .../swt/accessibility/AccessibleActionAdapter.java |   94 +
 .../swt/accessibility/AccessibleActionEvent.java   |   59 +
 .../accessibility/AccessibleActionListener.java    |   97 +
 .../accessibility/AccessibleAttributeAdapter.java  |   62 +
 .../accessibility/AccessibleAttributeEvent.java    |   65 +
 .../accessibility/AccessibleAttributeListener.java |   65 +
 .../accessibility/AccessibleControlAdapter.java    |   39 +-
 .../accessibility/AccessibleControlListener.java   |   35 +-
 .../accessibility/AccessibleHyperlinkAdapter.java  |   84 +
 .../accessibility/AccessibleHyperlinkEvent.java    |   60 +
 .../accessibility/AccessibleHyperlinkListener.java |   87 +
 .../swt/accessibility/AccessibleTableAdapter.java  |  341 +
 .../accessibility/AccessibleTableCellAdapter.java  |  111 +
 .../accessibility/AccessibleTableCellEvent.java    |   57 +
 .../accessibility/AccessibleTableCellListener.java |  114 +
 .../swt/accessibility/AccessibleTableEvent.java    |   70 +
 .../swt/accessibility/AccessibleTableListener.java |  344 +
 .../AccessibleTextAttributeEvent.java              |   57 +
 .../swt/accessibility/AccessibleTextEvent.java     |   27 +-
 .../AccessibleTextExtendedAdapter.java             |  292 +
 .../AccessibleTextExtendedListener.java            |  293 +
 .../swt/accessibility/AccessibleValueAdapter.java  |   71 +
 .../swt/accessibility/AccessibleValueEvent.java    |   50 +
 .../swt/accessibility/AccessibleValueListener.java |   74 +
 .../org/eclipse/swt/accessibility/Accessible.java  |  415 +-
 .../org/eclipse/swt/accessibility/Accessible.java  |  586 ++-
 .../swt/accessibility/AccessibleFactory.java       |  471 +-
 .../swt/accessibility/AccessibleObject.java        | 4155 +++++++---
 .../org/eclipse/swt/accessibility/Accessible.java  | 5421 ++++++++++--
 .../org/eclipse/swt/accessibility/Relation.java    |  193 +
 .../carbon/org/eclipse/swt/browser/Safari.java     |  720 +-
 .../cocoa/org/eclipse/swt/browser/Safari.java      |  578 +-
 .../common/org/eclipse/swt/browser/Browser.java    |  168 +-
 .../common/org/eclipse/swt/browser/WebBrowser.java |  125 +-
 .../org/eclipse/swt/browser/WindowEvent.java       |    2 +-
 .../forms/org/eclipse/swt/browser/IE.java          |   10 +-
 .../photon/org/eclipse/swt/browser/Voyager.java    |   10 +-
 .../win32/org/eclipse/swt/browser/IE.java          |  789 ++-
 .../win32/org/eclipse/swt/browser/WebSite.java     |  251 +-
 .../wpf/org/eclipse/swt/browser/IE.java            |   10 +-
 .../org/eclipse/swt/custom/BidiSegmentEvent.java   |   31 +-
 .../common/org/eclipse/swt/custom/CCombo.java      |  179 +-
 .../common/org/eclipse/swt/custom/CLabel.java      |  223 +-
 .../common/org/eclipse/swt/custom/CTabFolder.java  | 1366 +---
 .../org/eclipse/swt/custom/CTabFolderLayout.java   |   22 +-
 .../org/eclipse/swt/custom/CTabFolderRenderer.java | 1755 ++++
 .../common/org/eclipse/swt/custom/CTabItem.java    |  653 +--
 .../org/eclipse/swt/custom/LineStyleEvent.java     |   18 +-
 .../common/org/eclipse/swt/custom/StackLayout.java |    3 +-
 .../common/org/eclipse/swt/custom/StyledText.java  |  887 ++-
 .../org/eclipse/swt/custom/StyledTextEvent.java    |    5 +-
 .../org/eclipse/swt/custom/StyledTextListener.java |    5 +-
 .../org/eclipse/swt/custom/StyledTextRenderer.java |   85 +-
 .../org/eclipse/swt/custom/ViewFormLayout.java     |    5 +-
 .../carbon/org/eclipse/swt/dnd/DragSource.java     |   44 +-
 .../carbon/org/eclipse/swt/dnd/DropTarget.java     |   19 +-
 .../carbon/org/eclipse/swt/dnd/HTMLTransfer.java   |   43 +-
 .../carbon/org/eclipse/swt/dnd/TextTransfer.java   |   36 +-
 .../carbon/org/eclipse/swt/dnd/TransferData.java   |    8 +-
 .../cocoa/org/eclipse/swt/dnd/Clipboard.java       |    4 +-
 .../cocoa/org/eclipse/swt/dnd/DragSource.java      |   73 +-
 .../cocoa/org/eclipse/swt/dnd/DropTarget.java      |   42 +-
 .../cocoa/org/eclipse/swt/dnd/TextTransfer.java    |    6 +
 .../cocoa/org/eclipse/swt/dnd/TransferData.java    |    6 +-
 .../common/org/eclipse/swt/dnd/DND.java            |   11 +-
 .../org/eclipse/swt/dnd/DropTargetListener.java    |    8 +-
 .../emulated/org/eclipse/swt/dnd/TextTransfer.java |    6 +
 .../emulated/org/eclipse/swt/dnd/TransferData.java |    6 +-
 .../gtk/org/eclipse/swt/dnd/ClipboardProxy.java    |   21 +-
 .../gtk/org/eclipse/swt/dnd/ImageTransfer.java     |    5 +-
 .../org/eclipse/swt/dnd/TableDropTargetEffect.java |   12 +-
 .../gtk/org/eclipse/swt/dnd/TextTransfer.java      |    6 +
 .../gtk/org/eclipse/swt/dnd/TransferData.java      |   12 +-
 .../motif/org/eclipse/swt/dnd/TextTransfer.java    |    6 +
 .../motif/org/eclipse/swt/dnd/TransferData.java    |   12 +-
 .../photon/org/eclipse/swt/dnd/TextTransfer.java   |    6 +
 .../photon/org/eclipse/swt/dnd/TransferData.java   |   10 +-
 .../org/eclipse/swt/dnd/OleEnumFORMATETC.java      |    2 +-
 .../org/eclipse/swt/dnd/TableDropTargetEffect.java |   32 +-
 .../win32/org/eclipse/swt/dnd/TextTransfer.java    |    8 +-
 .../win32/org/eclipse/swt/dnd/TransferData.java    |   12 +-
 .../win32/org/eclipse/swt/dnd/URLTransfer.java     |   96 +-
 .../wpf/org/eclipse/swt/dnd/TextTransfer.java      |    6 +
 .../wpf/org/eclipse/swt/dnd/TransferData.java      |    6 +-
 .../org/eclipse/swt/browser/MozillaDelegate.java   |   52 +-
 .../org/eclipse/swt/browser/MozillaDelegate.java   |   20 +-
 .../common/library/swt_xpcom.rc                    |    2 +-
 .../common/library/xpcom_custom.cpp                |   42 +
 .../common/library/xpcom_custom.h                  |    1 +
 .../common/library/xpcom_stats.cpp                 |    4 +-
 .../common/library/xpcom_stats.h                   |    4 +-
 .../eclipse/swt/browser/AppFileLocProvider.java    |   48 +-
 .../common/org/eclipse/swt/browser/Download.java   |    6 +-
 .../org/eclipse/swt/browser/Download_1_8.java      |    6 +-
 .../common/org/eclipse/swt/browser/External.java   |    7 +-
 .../org/eclipse/swt/browser/InputStream.java       |    7 +-
 .../common/org/eclipse/swt/browser/Mozilla.java    | 2750 ++++---
 .../org/eclipse/swt/browser/PromptDialog.java      |    4 +-
 .../org/eclipse/swt/browser/PromptService2.java    |   13 +-
 .../org/eclipse/swt/browser/WindowCreator2.java    |    8 +-
 .../org/eclipse/swt/internal/mozilla/XPCOM.java    |   19 +-
 .../swt/internal/mozilla/nsICookieService.java     |  127 +-
 .../swt/internal/mozilla/nsICookieService_1_9.java |  118 +-
 .../org/eclipse/swt/internal/mozilla/nsID.java     |   72 +-
 .../eclipse/swt/internal/mozilla/nsIDataType.java  |   28 +-
 .../swt/internal/mozilla/nsIMIMEInputStream.java   |   59 +
 .../mozilla/nsISecurityCheckedComponent.java       |   28 +-
 .../swt/internal/mozilla/nsIWritableVariant.java   |   28 +-
 .../org/eclipse/swt/browser/MozillaDelegate.java   |   15 +-
 .../org/eclipse/swt/browser/MozillaDelegate.java   |   15 +-
 .../org/eclipse/swt/browser/MozillaDelegate.java   |   22 +-
 .../org/eclipse/swt/ole/win32/OleAutomation.java   |   93 +-
 .../org/eclipse/swt/ole/win32/OleClientSite.java   |   20 +-
 .../org/eclipse/swt/ole/win32/OleControlSite.java  |   36 +-
 .../win32/org/eclipse/swt/ole/win32/OleFrame.java  |    8 +-
 .../win32/org/eclipse/swt/ole/win32/Variant.java   |    6 +-
 .../Eclipse SWT PI/cairo/library/cairo_custom.h    |   16 +-
 .../Eclipse SWT PI/carbon/library/build.xml        |   36 -
 .../Eclipse SWT PI/carbon/library/cocoa.c          |   78 +-
 .../Eclipse SWT PI/carbon/library/cocoa_custom.c   |   50 +-
 .../Eclipse SWT PI/carbon/library/cocoa_stats.c    |   14 +-
 .../Eclipse SWT PI/carbon/library/cocoa_stats.h    |   10 +-
 .../Eclipse SWT PI/carbon/library/make_macosx.mak  |    6 +-
 .../Eclipse SWT PI/carbon/library/os.c             |  373 +-
 .../Eclipse SWT PI/carbon/library/os.h             |    5 +-
 .../Eclipse SWT PI/carbon/library/os_custom.c      |   20 +-
 .../Eclipse SWT PI/carbon/library/os_custom.h      |   68 +-
 .../Eclipse SWT PI/carbon/library/os_stats.c       |   34 +-
 .../Eclipse SWT PI/carbon/library/os_stats.h       |   30 +-
 .../carbon/org/eclipse/swt/internal/carbon/OS.java |  163 +-
 .../org/eclipse/swt/internal/cocoa/Cocoa.java      |   59 +-
 .../Eclipse SWT PI/cocoa/library/build.xml         |   70 -
 .../Eclipse SWT PI/cocoa/library/make_macosx.mak   |   13 +-
 .../Eclipse SWT PI/cocoa/library/os.c              | 1610 ++++-
 .../Eclipse SWT PI/cocoa/library/os.h              |    5 +-
 .../Eclipse SWT PI/cocoa/library/os_custom.c       |  116 +-
 .../Eclipse SWT PI/cocoa/library/os_custom.h       |    7 +-
 .../Eclipse SWT PI/cocoa/library/os_stats.c        |  176 +-
 .../Eclipse SWT PI/cocoa/library/os_stats.h        |  172 +-
 .../Eclipse SWT PI/cocoa/library/os_structs.c      |  117 +
 .../Eclipse SWT PI/cocoa/library/os_structs.h      |   36 +
 .../internal/cocoa/AppKitFull.bridgesupport.extras | 3037 ++++---
 .../org/eclipse/swt/internal/cocoa/CFRange.java    |   17 +
 .../swt/internal/cocoa/CGAffineTransform.java      |   21 +
 .../internal/cocoa/CTParagraphStyleSetting.java    |   21 +
 .../cocoa/CoreFoundationFull.bridgesupport.extras  |   79 +-
 .../cocoa/CoreGraphicsFull.bridgesupport.extras    |  313 +-
 .../cocoa/CoreTextFull.bridgesupport.extras        |   62 +
 .../eclipse/swt/internal/cocoa/DOMMouseEvent.java  |   18 +-
 .../eclipse/swt/internal/cocoa/DOMWheelEvent.java  |   18 +-
 .../cocoa/FoundationFull.bridgesupport.extras      |  510 +-
 .../eclipse/swt/internal/cocoa/NSApplication.java  |   16 +-
 .../swt/internal/cocoa/NSAssertionHandler.java     |   40 +
 .../org/eclipse/swt/internal/cocoa/NSBox.java      |    4 +
 .../eclipse/swt/internal/cocoa/NSButtonCell.java   |    5 +
 .../org/eclipse/swt/internal/cocoa/NSCell.java     |    4 +
 .../org/eclipse/swt/internal/cocoa/NSComboBox.java |    6 +-
 .../org/eclipse/swt/internal/cocoa/NSControl.java  |    4 +
 .../org/eclipse/swt/internal/cocoa/NSDockTile.java |   36 +
 .../eclipse/swt/internal/cocoa/NSFileManager.java  |    4 +
 .../org/eclipse/swt/internal/cocoa/NSFont.java     |   17 +-
 .../swt/internal/cocoa/NSGraphicsContext.java      |    4 +
 .../swt/internal/cocoa/NSLayoutManager.java        |   14 +-
 .../org/eclipse/swt/internal/cocoa/NSMenuItem.java |   16 +-
 .../internal/cocoa/NSMutableAttributedString.java  |    4 +
 .../internal/cocoa/NSMutableParagraphStyle.java    |    8 +
 .../swt/internal/cocoa/NSMutableString.java        |   13 +
 .../swt/internal/cocoa/NSMutableURLRequest.java    |   12 +
 .../swt/internal/cocoa/NSNotificationCenter.java   |    6 +-
 .../org/eclipse/swt/internal/cocoa/NSObject.java   |   22 +-
 .../org/eclipse/swt/internal/cocoa/NSScreen.java   |    4 +
 .../org/eclipse/swt/internal/cocoa/NSScroller.java |   10 +
 .../eclipse/swt/internal/cocoa/NSStatusBar.java    |    6 +-
 .../org/eclipse/swt/internal/cocoa/NSString.java   |   16 +
 .../eclipse/swt/internal/cocoa/NSTabViewItem.java  |   10 +
 .../eclipse/swt/internal/cocoa/NSTableView.java    |   19 +-
 .../org/eclipse/swt/internal/cocoa/NSText.java     |    8 +
 .../swt/internal/cocoa/NSTextAttachment.java       |   10 +-
 .../org/eclipse/swt/internal/cocoa/NSTextView.java |   31 +-
 .../org/eclipse/swt/internal/cocoa/NSURL.java      |   12 +-
 .../org/eclipse/swt/internal/cocoa/NSView.java     |   10 +-
 .../org/eclipse/swt/internal/cocoa/NSWindow.java   |   37 +-
 .../eclipse/swt/internal/cocoa/NSWorkspace.java    |   11 +-
 .../cocoa/org/eclipse/swt/internal/cocoa/OS.java   |  550 ++-
 .../swt/internal/cocoa/SFCertificatePanel.java     |   39 +
 .../internal/cocoa/SFCertificateTrustPanel.java    |   40 +
 .../eclipse/swt/internal/cocoa/SWTTabViewItem.java |   15 +
 .../swt/internal/cocoa/SWTTextAttachmentCell.java  |   15 +
 .../SecurityInterfaceFull.bridgesupport.extras     |   27 +
 .../org/eclipse/swt/internal/cocoa/WebFrame.java   |    6 +-
 .../internal/cocoa/WebKitFull.bridgesupport.extras |  288 +-
 .../org/eclipse/swt/internal/cocoa/WebView.java    |   11 +-
 .../org/eclipse/swt/internal/Library.java          |    4 +-
 .../org/eclipse/swt/internal/Library.java          |   69 +-
 .../Eclipse SWT PI/gtk/library/atk.c               |  503 ++-
 .../Eclipse SWT PI/gtk/library/atk.h               |   10 +-
 .../Eclipse SWT PI/gtk/library/atk_stats.c         |   78 +-
 .../Eclipse SWT PI/gtk/library/atk_stats.h         |   74 +-
 .../Eclipse SWT PI/gtk/library/atk_structs.c       |  311 +-
 .../Eclipse SWT PI/gtk/library/atk_structs.h       |   62 +-
 .../Eclipse SWT PI/gtk/library/build.sh            |   78 +-
 .../Eclipse SWT PI/gtk/library/build.xml           |   65 -
 .../Eclipse SWT PI/gtk/library/make_aix.mak        |  198 +
 .../Eclipse SWT PI/gtk/library/make_freebsd.mak    |   40 +-
 .../Eclipse SWT PI/gtk/library/make_linux.mak      |   67 +-
 .../Eclipse SWT PI/gtk/library/make_solaris.mak    |   34 +-
 .../gtk/library/make_solaris_x86.mak               |   38 +-
 .../Eclipse SWT PI/gtk/library/os.c                | 1526 +++-
 .../Eclipse SWT PI/gtk/library/os.h                |    3 +-
 .../Eclipse SWT PI/gtk/library/os_custom.c         |   50 +-
 .../Eclipse SWT PI/gtk/library/os_custom.h         |  441 +-
 .../Eclipse SWT PI/gtk/library/os_stats.c          |  114 +-
 .../Eclipse SWT PI/gtk/library/os_stats.h          |  110 +-
 .../Eclipse SWT PI/gtk/library/os_structs.c        |  109 +-
 .../Eclipse SWT PI/gtk/library/os_structs.h        |   26 +-
 .../swt/internal/accessibility/gtk/ATK.java        |  253 +-
 .../internal/accessibility/gtk/AtkAttribute.java   |   25 +
 .../internal/accessibility/gtk/AtkObjectClass.java |    4 +-
 .../internal/accessibility/gtk/AtkTableIface.java  |   91 +
 .../internal/accessibility/gtk/AtkTextIface.java   |    6 +-
 .../internal/accessibility/gtk/AtkTextRange.java   |   27 +
 .../accessibility/gtk/AtkTextRectangle.java        |   25 +
 .../internal/accessibility/gtk/AtkValueIface.java  |   27 +
 .../eclipse/swt/internal/gtk/GdkEventMotion.java   |   84 +-
 .../eclipse/swt/internal/gtk/GdkEventProperty.java |   29 +
 .../gtk/org/eclipse/swt/internal/gtk/OS.java       |  741 ++-
 .../org/eclipse/swt/internal/gtk/XButtonEvent.java |   26 -
 .../Eclipse SWT PI/motif/library/build.sh          |    2 +-
 .../Eclipse SWT PI/motif/library/build.xml         |   39 -
 .../Eclipse SWT PI/motif/library/make_aix.mak      |    2 +-
 .../motif/library/make_hpux_ia64_32.mak            |    2 +-
 .../Eclipse SWT PI/motif/library/make_linux.mak    |    6 +-
 .../Eclipse SWT PI/motif/library/os.c              |   18 +-
 .../Eclipse SWT PI/motif/library/os_stats.c        |    7 +-
 .../Eclipse SWT PI/motif/library/os_stats.h        |    3 +-
 .../motif/org/eclipse/swt/internal/motif/OS.java   |   22 +-
 .../Eclipse SWT PI/photon/library/build.xml        |   36 -
 .../Eclipse SWT PI/win32/library/build-ce.bat      |    1 +
 .../Eclipse SWT PI/win32/library/build.bat         |   39 +-
 .../Eclipse SWT PI/win32/library/build.xml         |  104 -
 .../Eclipse SWT PI/win32/library/com.c             |  275 +-
 .../Eclipse SWT PI/win32/library/com_custom.c      |   15 +-
 .../Eclipse SWT PI/win32/library/com_custom.h      |    3 +-
 .../Eclipse SWT PI/win32/library/com_stats.c       |   55 +-
 .../Eclipse SWT PI/win32/library/com_stats.h       |   51 +-
 .../Eclipse SWT PI/win32/library/make_win32.mak    |    6 +-
 .../Eclipse SWT PI/win32/library/os.c              |  809 ++-
 .../Eclipse SWT PI/win32/library/os.h              |   31 +-
 .../Eclipse SWT PI/win32/library/os_custom.h       |    7 +-
 .../Eclipse SWT PI/win32/library/os_stats.c        |  116 +-
 .../Eclipse SWT PI/win32/library/os_stats.h        |  112 +-
 .../Eclipse SWT PI/win32/library/os_structs.c      |  184 +-
 .../Eclipse SWT PI/win32/library/os_structs.h      |   50 +-
 .../org/eclipse/swt/internal/ole/win32/COM.java    |  138 +-
 .../eclipse/swt/internal/ole/win32/IOleObject.java |    5 +-
 .../swt/internal/ole/win32/IServiceProvider.java   |   21 +
 .../eclipse/swt/internal/win32/DOCHOSTUIINFO.java  |   13 +-
 .../eclipse/swt/internal/win32/LVINSERTMARK.java   |   19 +
 .../win32/org/eclipse/swt/internal/win32/OS.java   |  172 +-
 .../eclipse/swt/internal/win32/PROPERTYKEY.java    |   18 +
 .../org/eclipse/swt/internal/win32/SAFEARRAY.java  |   24 +
 .../eclipse/swt/internal/win32/SAFEARRAYBOUND.java |   17 +
 .../Eclipse SWT PI/wpf/library/build.xml           |   34 -
 .../Eclipse SWT PI/wpf/library/os.cpp              |   28 +-
 .../Eclipse SWT PI/wpf/library/os_stats.cpp        |    8 +-
 .../Eclipse SWT PI/wpf/library/os_stats.h          |    4 +-
 .../wpf/org/eclipse/swt/internal/wpf/OS.java       | 3683 ++++----
 .../org/eclipse/swt/printing/PrintDialog.java      |    9 +-
 .../carbon/org/eclipse/swt/printing/Printer.java   |    6 +-
 .../org/eclipse/swt/printing/PrintDialog.java      |   16 +-
 .../cocoa/org/eclipse/swt/printing/Printer.java    |   27 +-
 .../org/eclipse/swt/printing/PrinterData.java      |    6 +-
 .../org/eclipse/swt/printing/PrintDialog.java      |    3 +-
 .../emulated/org/eclipse/swt/printing/Printer.java |    6 +-
 .../gtk/org/eclipse/swt/printing/PrintDialog.java  |    9 +-
 .../gtk/org/eclipse/swt/printing/Printer.java      |   13 +-
 .../org/eclipse/swt/printing/PrintDialog.java      |    3 +-
 .../motif/org/eclipse/swt/printing/Printer.java    |    6 +-
 .../org/eclipse/swt/printing/PrintDialog.java      |    3 +-
 .../photon/org/eclipse/swt/printing/Printer.java   |    6 +-
 .../org/eclipse/swt/printing/PrintDialog.java      |  336 +-
 .../win32/org/eclipse/swt/printing/Printer.java    |    8 +-
 .../wpf/org/eclipse/swt/printing/PrintDialog.java  |    3 +-
 .../wpf/org/eclipse/swt/printing/Printer.java      |    6 +-
 .../carbon/org/eclipse/swt/program/Program.java    |  343 +-
 .../cocoa/org/eclipse/swt/program/Program.java     |  129 +-
 .../emulated/org/eclipse/swt/program/Program.java  |   23 +
 .../Eclipse SWT Program/gnome/library/gnome.c      |   46 +-
 .../Eclipse SWT Program/gnome/library/gnome.h      |   14 +-
 .../gnome/library/gnome_stats.c                    |    9 +-
 .../gnome/library/gnome_stats.h                    |    5 +-
 .../org/eclipse/swt/internal/gnome/GNOME.java      |   39 +-
 .../gtk/org/eclipse/swt/program/Program.java       |  422 +-
 .../motif/org/eclipse/swt/program/Program.java     |   71 +-
 .../photon/org/eclipse/swt/program/Program.java    |   23 +
 .../win32/org/eclipse/swt/program/Program.java     |   36 +-
 .../wpf/org/eclipse/swt/program/Program.java       |   23 +
 .../Eclipse SWT WebKit/gtk/library/webkitgtk.c     | 1232 +++
 .../Eclipse SWT WebKit/gtk/library/webkitgtk.h     |   34 +
 .../gtk/library/webkitgtk_stats.c                  |  143 +
 .../gtk/library/webkitgtk_stats.h                  |  129 +
 .../gtk/library/webkitgtk_structs.c                |   97 +
 .../gtk/library/webkitgtk_structs.h                |   29 +
 .../gtk/org/eclipse/swt/browser/WebKit.java        | 1861 ++++
 .../swt/internal/webkit/JSClassDefinition.java     |   54 +
 .../org/eclipse/swt/internal/webkit/WebKitGTK.java | 1368 +++
 .../cairo/org/eclipse/swt/graphics/Path.java       |    4 +-
 .../cairo/org/eclipse/swt/graphics/Pattern.java    |    4 +-
 .../cairo/org/eclipse/swt/graphics/Transform.java  |    4 +-
 .../carbon/org/eclipse/swt/graphics/Color.java     |    6 +-
 .../carbon/org/eclipse/swt/graphics/Cursor.java    |   10 +-
 .../carbon/org/eclipse/swt/graphics/Device.java    |    6 +-
 .../carbon/org/eclipse/swt/graphics/Font.java      |   12 +-
 .../carbon/org/eclipse/swt/graphics/FontData.java  |   10 +-
 .../carbon/org/eclipse/swt/graphics/GC.java        |   62 +-
 .../carbon/org/eclipse/swt/graphics/Image.java     |   16 +-
 .../carbon/org/eclipse/swt/graphics/Path.java      |    4 +-
 .../carbon/org/eclipse/swt/graphics/Pattern.java   |    2 +-
 .../carbon/org/eclipse/swt/graphics/Region.java    |    4 +-
 .../org/eclipse/swt/graphics/TextLayout.java       |  233 +-
 .../carbon/org/eclipse/swt/graphics/Transform.java |    4 +-
 .../carbon/org/eclipse/swt/widgets/Button.java     |   18 +-
 .../carbon/org/eclipse/swt/widgets/Canvas.java     |   18 +-
 .../org/eclipse/swt/widgets/ColorDialog.java       |    3 +
 .../carbon/org/eclipse/swt/widgets/Combo.java      |   20 +-
 .../carbon/org/eclipse/swt/widgets/Composite.java  |  198 +-
 .../carbon/org/eclipse/swt/widgets/Control.java    |  222 +-
 .../carbon/org/eclipse/swt/widgets/DateTime.java   |    6 +-
 .../org/eclipse/swt/widgets/Decorations.java       |   15 +-
 .../org/eclipse/swt/widgets/DirectoryDialog.java   |    6 +
 .../carbon/org/eclipse/swt/widgets/Display.java    |  346 +-
 .../carbon/org/eclipse/swt/widgets/FileDialog.java |   85 +-
 .../carbon/org/eclipse/swt/widgets/FontDialog.java |    2 +
 .../carbon/org/eclipse/swt/widgets/Label.java      |   47 +-
 .../carbon/org/eclipse/swt/widgets/Link.java       |   18 +-
 .../carbon/org/eclipse/swt/widgets/List.java       |    8 +-
 .../carbon/org/eclipse/swt/widgets/Menu.java       |   29 +-
 .../carbon/org/eclipse/swt/widgets/MenuItem.java   |   23 +-
 .../carbon/org/eclipse/swt/widgets/MessageBox.java |    3 +
 .../org/eclipse/swt/widgets/ProgressBar.java       |   16 +-
 .../carbon/org/eclipse/swt/widgets/Sash.java       |    8 +-
 .../carbon/org/eclipse/swt/widgets/Scale.java      |    2 +-
 .../carbon/org/eclipse/swt/widgets/ScrollBar.java  |   88 +-
 .../carbon/org/eclipse/swt/widgets/Scrollable.java |   12 +-
 .../carbon/org/eclipse/swt/widgets/Shell.java      |  135 +-
 .../carbon/org/eclipse/swt/widgets/Slider.java     |   16 +-
 .../carbon/org/eclipse/swt/widgets/Spinner.java    |   60 +-
 .../carbon/org/eclipse/swt/widgets/TabFolder.java  |   17 +-
 .../carbon/org/eclipse/swt/widgets/Table.java      |   51 +-
 .../carbon/org/eclipse/swt/widgets/TableItem.java  |    8 +-
 .../carbon/org/eclipse/swt/widgets/Text.java       |   15 +-
 .../carbon/org/eclipse/swt/widgets/ToolBar.java    |   40 +-
 .../carbon/org/eclipse/swt/widgets/ToolItem.java   |   12 +-
 .../carbon/org/eclipse/swt/widgets/ToolTip.java    |    2 +-
 .../carbon/org/eclipse/swt/widgets/Tracker.java    |    5 +
 .../carbon/org/eclipse/swt/widgets/TrayItem.java   |   99 +-
 .../carbon/org/eclipse/swt/widgets/Tree.java       |   53 +-
 .../carbon/org/eclipse/swt/widgets/TreeItem.java   |   10 +-
 .../carbon/org/eclipse/swt/widgets/Widget.java     |  129 +-
 .../cocoa/org/eclipse/swt/graphics/Color.java      |    6 +-
 .../cocoa/org/eclipse/swt/graphics/Cursor.java     |   10 +-
 .../cocoa/org/eclipse/swt/graphics/Device.java     |   67 +-
 .../cocoa/org/eclipse/swt/graphics/Font.java       |    8 +-
 .../cocoa/org/eclipse/swt/graphics/FontData.java   |   10 +-
 .../cocoa/org/eclipse/swt/graphics/GC.java         |  236 +-
 .../cocoa/org/eclipse/swt/graphics/GCData.java     |    7 +-
 .../cocoa/org/eclipse/swt/graphics/Image.java      |   33 +-
 .../cocoa/org/eclipse/swt/graphics/Path.java       |    4 +-
 .../cocoa/org/eclipse/swt/graphics/Pattern.java    |    2 +-
 .../cocoa/org/eclipse/swt/graphics/Region.java     |    5 +-
 .../cocoa/org/eclipse/swt/graphics/TextLayout.java |  568 +-
 .../cocoa/org/eclipse/swt/graphics/Transform.java  |    4 +-
 .../cocoa/org/eclipse/swt/widgets/Button.java      |  117 +-
 .../cocoa/org/eclipse/swt/widgets/Canvas.java      |   35 +-
 .../cocoa/org/eclipse/swt/widgets/ColorDialog.java |    3 +
 .../cocoa/org/eclipse/swt/widgets/Combo.java       |  263 +-
 .../cocoa/org/eclipse/swt/widgets/Composite.java   |  344 +-
 .../cocoa/org/eclipse/swt/widgets/Control.java     |  532 +-
 .../cocoa/org/eclipse/swt/widgets/DateTime.java    |   32 +-
 .../cocoa/org/eclipse/swt/widgets/Decorations.java |   15 +-
 .../org/eclipse/swt/widgets/DirectoryDialog.java   |   10 +-
 .../cocoa/org/eclipse/swt/widgets/Display.java     |  814 ++-
 .../cocoa/org/eclipse/swt/widgets/FileDialog.java  |   73 +-
 .../cocoa/org/eclipse/swt/widgets/FontDialog.java  |   16 +-
 .../cocoa/org/eclipse/swt/widgets/Group.java       |   32 +-
 .../cocoa/org/eclipse/swt/widgets/IME.java         |    8 +-
 .../cocoa/org/eclipse/swt/widgets/Label.java       |  119 +-
 .../cocoa/org/eclipse/swt/widgets/Link.java        |  287 +-
 .../cocoa/org/eclipse/swt/widgets/List.java        |  107 +-
 .../cocoa/org/eclipse/swt/widgets/Menu.java        |   96 +-
 .../cocoa/org/eclipse/swt/widgets/MenuItem.java    |   69 +-
 .../cocoa/org/eclipse/swt/widgets/MessageBox.java  |   16 +-
 .../cocoa/org/eclipse/swt/widgets/ProgressBar.java |    1 +
 .../cocoa/org/eclipse/swt/widgets/Sash.java        |   18 +-
 .../cocoa/org/eclipse/swt/widgets/Scale.java       |    2 +-
 .../cocoa/org/eclipse/swt/widgets/ScrollBar.java   |  115 +-
 .../cocoa/org/eclipse/swt/widgets/Scrollable.java  |   58 +-
 .../cocoa/org/eclipse/swt/widgets/Shell.java       |  354 +-
 .../cocoa/org/eclipse/swt/widgets/Slider.java      |   23 +-
 .../cocoa/org/eclipse/swt/widgets/Spinner.java     |   74 +-
 .../cocoa/org/eclipse/swt/widgets/TabFolder.java   |   42 +-
 .../cocoa/org/eclipse/swt/widgets/TabItem.java     |   91 +-
 .../cocoa/org/eclipse/swt/widgets/Table.java       |  360 +-
 .../cocoa/org/eclipse/swt/widgets/TableColumn.java |    2 +-
 .../cocoa/org/eclipse/swt/widgets/TableItem.java   |   63 +-
 .../cocoa/org/eclipse/swt/widgets/TaskBar.java     |  195 +
 .../cocoa/org/eclipse/swt/widgets/TaskItem.java    |  484 +
 .../cocoa/org/eclipse/swt/widgets/Text.java        |  156 +-
 .../cocoa/org/eclipse/swt/widgets/ToolBar.java     |  208 +-
 .../cocoa/org/eclipse/swt/widgets/ToolItem.java    |  138 +-
 .../cocoa/org/eclipse/swt/widgets/Tracker.java     |    9 +
 .../cocoa/org/eclipse/swt/widgets/TrayItem.java    |    2 +-
 .../cocoa/org/eclipse/swt/widgets/Tree.java        |  317 +-
 .../cocoa/org/eclipse/swt/widgets/TreeItem.java    |   75 +-
 .../cocoa/org/eclipse/swt/widgets/Widget.java      |  232 +-
 .../Eclipse SWT/common/library/callback.c          |  544 ++-
 .../Eclipse SWT/common/library/callback.h          |    8 +-
 .../Eclipse SWT/common/library/make_common.mak     |    6 +-
 .../Eclipse SWT/common/library/swt.h               |    7 +-
 .../Eclipse SWT/common/org/eclipse/swt/SWT.java    |  213 +-
 .../common/org/eclipse/swt/events/KeyEvent.java    |   37 +-
 .../common/org/eclipse/swt/events/MouseEvent.java  |    5 +-
 .../common/org/eclipse/swt/graphics/Drawable.java  |    6 +-
 .../common/org/eclipse/swt/graphics/ImageData.java |    6 +-
 .../common/org/eclipse/swt/graphics/Resource.java  |    5 +-
 .../eclipse/swt/internal/image/PNGFileFormat.java  |   22 +-
 .../org/eclipse/swt/internal/image/PngEncoder.java |   24 +-
 .../swt/internal/image/PngLzBlockReader.java       |   17 +-
 .../eclipse/swt/internal/image/TIFFDirectory.java  |   60 +-
 .../eclipse/swt/internal/image/TIFFFileFormat.java |   18 +-
 .../swt/internal/image/WinBMPFileFormat.java       |  125 +-
 .../common/org/eclipse/swt/layout/GridData.java    |   14 +-
 .../common/org/eclipse/swt/widgets/Event.java      |   36 +-
 .../common/org/eclipse/swt/widgets/Tray.java       |   11 +
 .../org/eclipse/swt/widgets/TypedListener.java     |    8 +-
 .../org.eclipse.swt/Eclipse SWT/common/version.txt |    2 +-
 .../org/eclipse/swt/internal/Compatibility.java    |   32 +-
 .../org/eclipse/swt/internal/Compatibility.java    |   28 +-
 .../eclipse/swt/internal/SWTMessages.properties    |   23 +-
 .../swt/internal/SWTMessages_de._properties        |    4 +-
 .../swt/internal/SWTMessages_es._properties        |   11 +-
 .../swt/internal/SWTMessages_et._properties        |   23 +
 .../swt/internal/SWTMessages_fr._properties        |    4 +-
 .../swt/internal/SWTMessages_ru._properties        |    4 +-
 .../swt/internal/SWTMessages_tr._properties        |   45 +-
 .../swt/internal/SWTMessages_uk._properties        |    3 +-
 .../swt/internal/SWTMessages_zh._properties        |    4 +-
 .../coolbar/org/eclipse/swt/widgets/CoolBar.java   |   13 +
 .../coolbar/org/eclipse/swt/widgets/CoolItem.java  |    3 +-
 .../expand/org/eclipse/swt/widgets/ExpandBar.java  |   10 +
 .../graphics/org/eclipse/swt/graphics/Path.java    |    4 +-
 .../graphics/org/eclipse/swt/graphics/Pattern.java |    4 +-
 .../org/eclipse/swt/graphics/Transform.java        |    4 +-
 .../org/eclipse/swt/widgets/TabFolder.java         |   10 +
 .../taskbar/org/eclipse/swt/widgets/TaskBar.java   |  181 +
 .../taskbar/org/eclipse/swt/widgets/TaskItem.java  |  372 +
 .../org/eclipse/swt/graphics/TextLayout.java       |  107 +-
 .../tooltip/org/eclipse/swt/widgets/ToolTip.java   |    2 +-
 .../treetable/org/eclipse/swt/widgets/Table.java   |   64 +-
 .../org/eclipse/swt/widgets/TableItem.java         |   10 +-
 .../treetable/org/eclipse/swt/widgets/Tree.java    |   56 +-
 .../org/eclipse/swt/widgets/TreeItem.java          |   12 +-
 .../gtk/org/eclipse/swt/graphics/Color.java        |    6 +-
 .../gtk/org/eclipse/swt/graphics/Cursor.java       |   10 +-
 .../gtk/org/eclipse/swt/graphics/Device.java       |   35 +-
 .../gtk/org/eclipse/swt/graphics/DeviceData.java   |   46 +-
 .../gtk/org/eclipse/swt/graphics/Font.java         |    6 +-
 .../gtk/org/eclipse/swt/graphics/FontData.java     |   10 +-
 .../gtk/org/eclipse/swt/graphics/GC.java           |   25 +-
 .../gtk/org/eclipse/swt/graphics/Image.java        |   65 +-
 .../gtk/org/eclipse/swt/graphics/Region.java       |    4 +-
 .../gtk/org/eclipse/swt/graphics/TextLayout.java   |  293 +-
 .../gtk/org/eclipse/swt/widgets/Button.java        |   10 +-
 .../gtk/org/eclipse/swt/widgets/Canvas.java        |   13 +-
 .../gtk/org/eclipse/swt/widgets/ColorDialog.java   |    6 +-
 .../gtk/org/eclipse/swt/widgets/Combo.java         |  130 +-
 .../gtk/org/eclipse/swt/widgets/Composite.java     |  196 +-
 .../gtk/org/eclipse/swt/widgets/Control.java       |  324 +-
 .../gtk/org/eclipse/swt/widgets/DateTime.java      |   10 +-
 .../gtk/org/eclipse/swt/widgets/Decorations.java   |   17 +-
 .../org/eclipse/swt/widgets/DirectoryDialog.java   |    6 +-
 .../gtk/org/eclipse/swt/widgets/Display.java       |  277 +-
 .../gtk/org/eclipse/swt/widgets/ExpandBar.java     |   11 +
 .../gtk/org/eclipse/swt/widgets/FileDialog.java    |   25 +-
 .../gtk/org/eclipse/swt/widgets/FontDialog.java    |    6 +-
 .../gtk/org/eclipse/swt/widgets/Label.java         |   10 +-
 .../gtk/org/eclipse/swt/widgets/Link.java          |   48 +-
 .../gtk/org/eclipse/swt/widgets/List.java          |    6 +-
 .../gtk/org/eclipse/swt/widgets/Menu.java          |    9 +
 .../gtk/org/eclipse/swt/widgets/MenuItem.java      |   37 +-
 .../gtk/org/eclipse/swt/widgets/MessageBox.java    |   12 +-
 .../gtk/org/eclipse/swt/widgets/Sash.java          |    8 +-
 .../gtk/org/eclipse/swt/widgets/Scale.java         |    2 +-
 .../gtk/org/eclipse/swt/widgets/ScrollBar.java     |  121 +-
 .../gtk/org/eclipse/swt/widgets/Scrollable.java    |    6 +
 .../gtk/org/eclipse/swt/widgets/Shell.java         |  252 +-
 .../gtk/org/eclipse/swt/widgets/Slider.java        |   18 +-
 .../gtk/org/eclipse/swt/widgets/Spinner.java       |   36 +-
 .../gtk/org/eclipse/swt/widgets/TabFolder.java     |   23 +-
 .../gtk/org/eclipse/swt/widgets/Table.java         |  150 +-
 .../gtk/org/eclipse/swt/widgets/TableColumn.java   |   31 +-
 .../gtk/org/eclipse/swt/widgets/TableItem.java     |    6 +-
 .../gtk/org/eclipse/swt/widgets/Text.java          |   59 +-
 .../gtk/org/eclipse/swt/widgets/ToolBar.java       |   13 +-
 .../gtk/org/eclipse/swt/widgets/ToolItem.java      |   21 +-
 .../gtk/org/eclipse/swt/widgets/ToolTip.java       |    9 +-
 .../gtk/org/eclipse/swt/widgets/Tracker.java       |    1 +
 .../gtk/org/eclipse/swt/widgets/TrayItem.java      |    8 +-
 .../gtk/org/eclipse/swt/widgets/Tree.java          |  153 +-
 .../gtk/org/eclipse/swt/widgets/TreeColumn.java    |   31 +-
 .../gtk/org/eclipse/swt/widgets/TreeItem.java      |    8 +-
 .../gtk/org/eclipse/swt/widgets/Widget.java        |  178 +-
 .../motif/org/eclipse/swt/graphics/Color.java      |    4 +-
 .../motif/org/eclipse/swt/graphics/Cursor.java     |    8 +-
 .../motif/org/eclipse/swt/graphics/Device.java     |   12 +-
 .../motif/org/eclipse/swt/graphics/Font.java       |    6 +-
 .../motif/org/eclipse/swt/graphics/FontData.java   |   30 +-
 .../motif/org/eclipse/swt/graphics/GC.java         |   23 +-
 .../motif/org/eclipse/swt/graphics/Image.java      |   14 +-
 .../motif/org/eclipse/swt/graphics/Region.java     |    4 +-
 .../motif/org/eclipse/swt/graphics/TextLayout.java |  114 +-
 .../motif/org/eclipse/swt/widgets/Button.java      |    6 +
 .../motif/org/eclipse/swt/widgets/Canvas.java      |   13 +-
 .../motif/org/eclipse/swt/widgets/Combo.java       |    2 +-
 .../motif/org/eclipse/swt/widgets/Composite.java   |  200 +-
 .../motif/org/eclipse/swt/widgets/Control.java     |  207 +-
 .../motif/org/eclipse/swt/widgets/Decorations.java |   13 +-
 .../motif/org/eclipse/swt/widgets/Display.java     |  148 +-
 .../motif/org/eclipse/swt/widgets/Link.java        |   12 +
 .../motif/org/eclipse/swt/widgets/Menu.java        |    8 +
 .../motif/org/eclipse/swt/widgets/MenuItem.java    |   14 +-
 .../motif/org/eclipse/swt/widgets/ProgressBar.java |   14 +-
 .../motif/org/eclipse/swt/widgets/ScrollBar.java   |  123 +-
 .../motif/org/eclipse/swt/widgets/Scrollable.java  |    5 +
 .../motif/org/eclipse/swt/widgets/Shell.java       |  244 +-
 .../motif/org/eclipse/swt/widgets/Slider.java      |   12 +-
 .../motif/org/eclipse/swt/widgets/Spinner.java     |   14 +-
 .../motif/org/eclipse/swt/widgets/Text.java        |    2 +-
 .../motif/org/eclipse/swt/widgets/ToolBar.java     |    9 +
 .../motif/org/eclipse/swt/widgets/ToolItem.java    |    6 +
 .../motif/org/eclipse/swt/widgets/Tracker.java     |    1 +
 .../motif/org/eclipse/swt/widgets/Widget.java      |  115 +-
 .../photon/org/eclipse/swt/graphics/Color.java     |    4 +-
 .../photon/org/eclipse/swt/graphics/Cursor.java    |   10 +-
 .../photon/org/eclipse/swt/graphics/Device.java    |    6 +-
 .../photon/org/eclipse/swt/graphics/Font.java      |    4 +-
 .../photon/org/eclipse/swt/graphics/FontData.java  |   10 +-
 .../org/eclipse/swt/graphics/FontMetrics.java      |    4 +-
 .../photon/org/eclipse/swt/graphics/GC.java        |    7 +-
 .../photon/org/eclipse/swt/graphics/Image.java     |   12 +-
 .../photon/org/eclipse/swt/graphics/Region.java    |    4 +-
 .../photon/org/eclipse/swt/widgets/Button.java     |    6 +
 .../photon/org/eclipse/swt/widgets/Canvas.java     |    8 +-
 .../photon/org/eclipse/swt/widgets/Combo.java      |    2 +-
 .../photon/org/eclipse/swt/widgets/Composite.java  |  183 +-
 .../photon/org/eclipse/swt/widgets/Control.java    |  196 +-
 .../org/eclipse/swt/widgets/Decorations.java       |   14 +-
 .../photon/org/eclipse/swt/widgets/Display.java    |  151 +-
 .../photon/org/eclipse/swt/widgets/Link.java       |   12 +
 .../photon/org/eclipse/swt/widgets/Menu.java       |    9 +
 .../photon/org/eclipse/swt/widgets/MenuItem.java   |   15 +-
 .../photon/org/eclipse/swt/widgets/ScrollBar.java  |   51 +-
 .../photon/org/eclipse/swt/widgets/Scrollable.java |    6 +
 .../photon/org/eclipse/swt/widgets/Shell.java      |   10 +
 .../photon/org/eclipse/swt/widgets/Slider.java     |   12 +-
 .../photon/org/eclipse/swt/widgets/Spinner.java    |    8 +-
 .../photon/org/eclipse/swt/widgets/TabFolder.java  |   10 +
 .../photon/org/eclipse/swt/widgets/Text.java       |    2 +-
 .../photon/org/eclipse/swt/widgets/ToolBar.java    |   10 +
 .../photon/org/eclipse/swt/widgets/ToolItem.java   |    6 +
 .../photon/org/eclipse/swt/widgets/Tracker.java    |    1 +
 .../photon/org/eclipse/swt/widgets/Widget.java     |   69 +-
 .../win32/org/eclipse/swt/graphics/Color.java      |    8 +-
 .../win32/org/eclipse/swt/graphics/Cursor.java     |   72 +-
 .../win32/org/eclipse/swt/graphics/Device.java     |    8 +-
 .../win32/org/eclipse/swt/graphics/Font.java       |    8 +-
 .../win32/org/eclipse/swt/graphics/FontData.java   |    9 +-
 .../org/eclipse/swt/graphics/FontMetrics.java      |    6 +-
 .../win32/org/eclipse/swt/graphics/GC.java         |  506 +-
 .../win32/org/eclipse/swt/graphics/Image.java      |   20 +-
 .../win32/org/eclipse/swt/graphics/Path.java       |    6 +-
 .../win32/org/eclipse/swt/graphics/Pattern.java    |    6 +-
 .../win32/org/eclipse/swt/graphics/Region.java     |    8 +-
 .../win32/org/eclipse/swt/graphics/TextLayout.java |  196 +-
 .../win32/org/eclipse/swt/graphics/Transform.java  |    6 +-
 .../win32/org/eclipse/swt/internal/ImageList.java  |    4 +-
 .../win32/org/eclipse/swt/widgets/Button.java      |   14 +-
 .../win32/org/eclipse/swt/widgets/Canvas.java      |   19 +-
 .../win32/org/eclipse/swt/widgets/Combo.java       |  110 +-
 .../win32/org/eclipse/swt/widgets/Composite.java   |  200 +-
 .../win32/org/eclipse/swt/widgets/Control.java     |  265 +-
 .../win32/org/eclipse/swt/widgets/CoolBar.java     |   12 +-
 .../win32/org/eclipse/swt/widgets/DateTime.java    |    8 +-
 .../win32/org/eclipse/swt/widgets/Decorations.java |   27 +-
 .../win32/org/eclipse/swt/widgets/Display.java     |  286 +-
 .../win32/org/eclipse/swt/widgets/ExpandBar.java   |   10 +
 .../win32/org/eclipse/swt/widgets/Group.java       |    6 +-
 .../win32/org/eclipse/swt/widgets/Label.java       |   11 +
 .../win32/org/eclipse/swt/widgets/Link.java        |   73 +-
 .../win32/org/eclipse/swt/widgets/List.java        |   13 +-
 .../win32/org/eclipse/swt/widgets/Menu.java        |   13 +-
 .../win32/org/eclipse/swt/widgets/MenuItem.java    |   22 +-
 .../win32/org/eclipse/swt/widgets/ProgressBar.java |   27 +-
 .../win32/org/eclipse/swt/widgets/Sash.java        |    8 +-
 .../win32/org/eclipse/swt/widgets/Scale.java       |    4 +-
 .../win32/org/eclipse/swt/widgets/ScrollBar.java   |  111 +-
 .../win32/org/eclipse/swt/widgets/Scrollable.java  |   19 +-
 .../win32/org/eclipse/swt/widgets/Shell.java       |   38 +-
 .../win32/org/eclipse/swt/widgets/Slider.java      |   14 +-
 .../win32/org/eclipse/swt/widgets/Spinner.java     |   60 +-
 .../win32/org/eclipse/swt/widgets/TabFolder.java   |   18 +-
 .../win32/org/eclipse/swt/widgets/Table.java       |  427 +-
 .../win32/org/eclipse/swt/widgets/TableColumn.java |    4 +-
 .../win32/org/eclipse/swt/widgets/TableItem.java   |   10 +-
 .../win32/org/eclipse/swt/widgets/TaskBar.java     |  558 ++
 .../win32/org/eclipse/swt/widgets/TaskItem.java    |  564 ++
 .../win32/org/eclipse/swt/widgets/Text.java        |   35 +-
 .../win32/org/eclipse/swt/widgets/ToolBar.java     |   24 +-
 .../win32/org/eclipse/swt/widgets/ToolItem.java    |   13 +-
 .../win32/org/eclipse/swt/widgets/Tracker.java     |   20 +-
 .../win32/org/eclipse/swt/widgets/TrayItem.java    |    6 +-
 .../win32/org/eclipse/swt/widgets/Tree.java        |  101 +-
 .../win32/org/eclipse/swt/widgets/TreeItem.java    |   14 +-
 .../win32/org/eclipse/swt/widgets/Widget.java      |  192 +-
 .../wpf/org/eclipse/swt/graphics/Color.java        |    6 +-
 .../wpf/org/eclipse/swt/graphics/Cursor.java       |   10 +-
 .../wpf/org/eclipse/swt/graphics/Device.java       |    6 +-
 .../wpf/org/eclipse/swt/graphics/Font.java         |    8 +-
 .../wpf/org/eclipse/swt/graphics/FontData.java     |   14 +-
 .../wpf/org/eclipse/swt/graphics/GC.java           |   23 +-
 .../wpf/org/eclipse/swt/graphics/Image.java        |   14 +-
 .../wpf/org/eclipse/swt/graphics/Path.java         |    4 +-
 .../wpf/org/eclipse/swt/graphics/Pattern.java      |    4 +-
 .../wpf/org/eclipse/swt/graphics/Region.java       |    6 +-
 .../wpf/org/eclipse/swt/graphics/TextLayout.java   |  110 +-
 .../wpf/org/eclipse/swt/graphics/Transform.java    |    4 +-
 .../wpf/org/eclipse/swt/widgets/Button.java        |    6 +
 .../wpf/org/eclipse/swt/widgets/Canvas.java        |    8 +-
 .../wpf/org/eclipse/swt/widgets/Combo.java         |    2 +-
 .../wpf/org/eclipse/swt/widgets/Composite.java     |  160 +-
 .../wpf/org/eclipse/swt/widgets/Control.java       |  196 +-
 .../wpf/org/eclipse/swt/widgets/CoolBar.java       |   10 +
 .../wpf/org/eclipse/swt/widgets/Decorations.java   |   14 +-
 .../wpf/org/eclipse/swt/widgets/Display.java       |  114 +-
 .../wpf/org/eclipse/swt/widgets/ExpandBar.java     |   14 +
 .../wpf/org/eclipse/swt/widgets/Link.java          |   12 +
 .../wpf/org/eclipse/swt/widgets/Menu.java          |    9 +
 .../wpf/org/eclipse/swt/widgets/MenuItem.java      |   15 +-
 .../wpf/org/eclipse/swt/widgets/ScrollBar.java     |   70 +-
 .../wpf/org/eclipse/swt/widgets/Scrollable.java    |    6 +
 .../wpf/org/eclipse/swt/widgets/Shell.java         |   16 +-
 .../wpf/org/eclipse/swt/widgets/Slider.java        |   12 +-
 .../wpf/org/eclipse/swt/widgets/Spinner.java       |   14 +-
 .../wpf/org/eclipse/swt/widgets/TabFolder.java     |   12 +
 .../wpf/org/eclipse/swt/widgets/Table.java         |   18 +
 .../wpf/org/eclipse/swt/widgets/TableItem.java     |    6 +-
 .../wpf/org/eclipse/swt/widgets/Text.java          |    2 +-
 .../wpf/org/eclipse/swt/widgets/ToolBar.java       |   12 +
 .../wpf/org/eclipse/swt/widgets/ToolItem.java      |    6 +
 .../wpf/org/eclipse/swt/widgets/Tracker.java       |    1 +
 .../wpf/org/eclipse/swt/widgets/Tree.java          |   18 +
 .../wpf/org/eclipse/swt/widgets/TreeItem.java      |    8 +-
 .../wpf/org/eclipse/swt/widgets/Widget.java        |   68 +-
 .../plugins/org.eclipse.swt/META-INF/MANIFEST.MF   |    2 +-
 eclipse/plugins/org.eclipse.swt/build.xml          |    2 +-
 eclipse/plugins/org.eclipse.swt/buildFragment.xml  |  563 ++
 .../plugins/org.eclipse.swt/buildnotes_swt.html    | 9263 +-------------------
 eclipse/plugins/org.eclipse.swt/oldnotes_swt.html  | 9315 ++++++++++++++++++++
 eclipse/plugins/org.eclipse.swt/tasks/build.xml    |  663 ++-
 .../plugins/org.eclipse.swt/tasks/classpath.xls    |   25 +
 .../plugins/org.eclipse.swt/tasks/properties.xml   |   15 +
 eclipse/plugins/org.eclipse.swt/tasks/swtmap.xls   |   36 +-
 .../org.eclipse.team.core/.settings/.api_filters   |   42 +-
 .../org.eclipse.team.core/META-INF/MANIFEST.MF     |    2 +-
 .../org.eclipse.team.core/buildnotes_team.html     |  380 +-
 .../src/org/eclipse/team/core/Team.java            |    7 +-
 .../eclipse/team/core/mapping/IMergeContext.java   |    4 +-
 .../team/core/mapping/IResourceMappingMerger.java  |    8 +-
 .../core/mapping/ISynchronizationScopeManager.java |    4 +-
 .../team/core/mapping/provider/MergeContext.java   |    9 +-
 .../provider/SynchronizationScopeManager.java      |   12 +-
 .../eclipse/team/core/subscribers/Subscriber.java  |   25 +-
 .../eclipse/team/core/synchronize/SyncInfo.java    |   19 +-
 .../variants/ResourceVariantTreeSubscriber.java    |    4 +-
 .../team/core/variants/ThreeWaySubscriber.java     |    4 +-
 .../internal/core/ResourceVariantCacheEntry.java   |    8 +-
 .../eclipse/team/internal/core/StringMatcher.java  |  113 +-
 .../core/streams/SizeConstrainedInputStream.java   |    4 +-
 .../core/subscribers/SubscriberEventHandler.java   |   10 +-
 .../subscribers/SubscriberResourceCollector.java   |    3 +-
 .../subscribers/SubscriberSyncInfoCollector.java   |    8 +-
 .../SubscriberSyncInfoEventHandler.java            |   15 +-
 .../org.eclipse.team.cvs.core/META-INF/MANIFEST.MF |    2 +-
 .../plugins/org.eclipse.team.cvs.core/about.html   |    4 +-
 .../internal/ccvs/core/CVSMergeSubscriber.java     |   16 +-
 .../team/internal/ccvs/core/CVSMergeSyncInfo.java  |   18 +-
 .../ccvs/core/CVSProjectSetCapability.java         |  311 +-
 .../ccvs/core/CVSRepositoryLocationMatcher.java    |  211 +
 .../eclipse/team/internal/ccvs/core/CVSTag.java    |   16 +-
 .../team/internal/ccvs/core/CVSTeamProvider.java   |   12 +-
 .../ccvs/core/client/listeners/LogListener.java    |   18 +-
 .../core/connection/CVSRepositoryLocation.java     |    6 +-
 .../core/resources/RemoteFolderMemberFetcher.java  |   22 +-
 .../ccvs/core/syncinfo/CVSResourceVariantTree.java |    4 +-
 .../ccvs/core/syncinfo/ResourceSyncInfo.java       |    6 +-
 .../internal/ccvs/core/util/SyncFileWriter.java    |   23 +-
 .../plugins/org.eclipse.team.cvs.ssh/.classpath    |    7 -
 eclipse/plugins/org.eclipse.team.cvs.ssh/.options  |    7 -
 eclipse/plugins/org.eclipse.team.cvs.ssh/.project  |   34 -
 .../.settings/org.eclipse.jdt.core.prefs           |   62 -
 .../.settings/org.eclipse.jdt.ui.prefs             |    3 -
 .../org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF  |   15 -
 .../plugins/org.eclipse.team.cvs.ssh/about.html    |  114 -
 .../org.eclipse.team.cvs.ssh/build.properties      |   18 -
 .../org.eclipse.team.cvs.ssh/plugin.properties     |   12 -
 .../eclipse/team/internal/ccvs/ssh/Blowfish.java   | 1220 ---
 .../team/internal/ccvs/ssh/CVSSSHMessages.java     |   46 -
 .../org/eclipse/team/internal/ccvs/ssh/Cipher.java |   25 -
 .../org/eclipse/team/internal/ccvs/ssh/Client.java |  709 --
 .../team/internal/ccvs/ssh/ClientPacket.java       |   53 -
 .../eclipse/team/internal/ccvs/ssh/KnownHosts.java |  156 -
 .../org/eclipse/team/internal/ccvs/ssh/Misc.java   |  473 -
 .../org/eclipse/team/internal/ccvs/ssh/Packet.java |   20 -
 .../org/eclipse/team/internal/ccvs/ssh/Policy.java |   25 -
 .../eclipse/team/internal/ccvs/ssh/SSHMethod.java  |   34 -
 .../eclipse/team/internal/ccvs/ssh/SSHPlugin.java  |   42 -
 .../internal/ccvs/ssh/SSHServerConnection.java     |   89 -
 .../team/internal/ccvs/ssh/ServerPacket.java       |  164 -
 .../team/internal/ccvs/ssh/messages.properties     |   38 -
 .../org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF |    2 +-
 .../team/internal/ccvs/ssh2/JSchSession.java       |    6 +-
 .../org.eclipse.team.cvs.ui/.settings/.api_filters |   19 +
 .../org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF   |    5 +-
 .../org.eclipse.team.cvs.ui/plugin.properties      |    5 +-
 eclipse/plugins/org.eclipse.team.cvs.ui/plugin.xml |  125 +-
 .../ccvs/ui/AddToVersionControlDialog.java         |    2 +-
 .../internal/ccvs/ui/CVSHistoryTableProvider.java  |   42 +-
 .../team/internal/ccvs/ui/CVSPerspective.java      |   11 +-
 .../internal/ccvs/ui/CVSProjectPropertiesPage.java |   11 +-
 .../ccvs/ui/CommentTemplatesPreferencePage.java    |    2 +-
 .../ccvs/ui/ConfigureRepositoryLocationsTable.java |   18 +-
 .../team/internal/ccvs/ui/TableViewerAction.java   |   11 +-
 .../ui/actions/RestoreFromRepositoryAction.java    |   14 +-
 .../ccvs/ui/actions/ShowAnnotationAction.java      |   12 +-
 .../ui/actions/ShowResourceInHistoryAction.java    |    2 +-
 .../ccvs/ui/mappings/AbstractCommitAction.java     |    6 +-
 .../ccvs/ui/mappings/ApplyPatchAction.java         |    4 +-
 .../ccvs/ui/mappings/ChangeSetActionProvider.java  |   53 +-
 .../team/internal/ccvs/ui/messages.properties      |    4 +-
 .../internal/ccvs/ui/model/CVSModelElement.java    |    4 +-
 .../ccvs/ui/model/CVSRepositoryRootElement.java    |   11 +-
 .../internal/ccvs/ui/operations/DiffOperation.java |   77 +-
 .../ui/operations/RepositoryProviderOperation.java |   12 +-
 .../ui/operations/ShowAnnotationOperation.java     |   10 +-
 .../ccvs/ui/repo/CopyRepositoryNameAction.java     |    9 +-
 .../ccvs/ui/repo/PasteConnectionStringAction.java  |   22 +-
 .../ccvs/ui/repo/RepositoryComparator.java         |    6 +-
 .../team/internal/ccvs/ui/repo/RepositoryRoot.java |   19 +-
 .../ccvs/ui/subscriber/ApplyPatchAction.java       |    4 +-
 .../ccvs/ui/subscriber/SafeUpdateOperation.java    |   91 +-
 .../internal/ccvs/ui/subscriber/UpdateDialog.java  |    2 +-
 .../ccvs/ui/tags/TagSourceResourceAdapter.java     |    4 +-
 .../internal/ccvs/ui/wizards/CVSWizardPage.java    |   10 +-
 .../wizards/CheckoutAsLocationSelectionPage.java   |   25 +-
 .../ccvs/ui/wizards/CheckoutAsMainPage.java        |    4 +
 .../internal/ccvs/ui/wizards/CommitWizard.java     |  206 +-
 .../ccvs/ui/wizards/CommitWizardCommitPage.java    |  123 +-
 .../ccvs/ui/wizards/CommitWizardParticipant.java   |   99 +-
 .../ccvs/ui/wizards/GenerateDiffFileWizard.java    |    7 +-
 .../team/internal/ccvs/ui/wizards/ICVSWizard.java  |   25 +-
 .../team/internal/ccvs/ui/wizards/MergeWizard.java |   13 +-
 .../RestoreFromRepositoryFileSelectionPage.java    |   26 +-
 .../ccvs/ui/wizards/SharingWizardSyncPage.java     |   24 +-
 eclipse/plugins/org.eclipse.team.ui/.options       |    5 +-
 .../org.eclipse.team.ui/.settings/.api_filters     |   35 +-
 .../org.eclipse.team.ui/META-INF/MANIFEST.MF       |    6 +-
 .../icons/full/obj}/hunk_obj.gif                   |  Bin 598 -> 598 bytes
 .../plugins/org.eclipse.team.ui/plugin.properties  |   10 +-
 eclipse/plugins/org.eclipse.team.ui/plugin.xml     |  148 +-
 .../ui/DefaultUIFileModificationValidator.java     |    2 +-
 .../eclipse/team/internal/ui/IPreferenceIds.java   |    9 +-
 .../src/org/eclipse/team/internal/ui/Policy.java   |   11 +-
 .../eclipse/team/internal/ui/TeamUIMessages.java   |   35 +-
 .../org/eclipse/team/internal/ui/TeamUIPlugin.java |    3 +-
 .../src/org/eclipse/team/internal/ui/Utils.java    |   58 +-
 .../team/internal/ui/actions/ApplyPatchAction.java |    4 +-
 .../team/internal/ui/actions/CompareAction.java    |    9 +-
 .../internal/ui/actions/CompareRevisionAction.java |   51 +-
 .../team/internal/ui/actions/TeamAction.java       |   42 +-
 .../team/internal/ui/actions/actions.properties    |   18 +-
 .../team/internal/ui/dialogs/DetailsDialog.java    |    2 +-
 .../ui/dialogs/MappingSelectionDialog.java         |  191 -
 .../ui/history/CompareFileRevisionEditorInput.java |    7 +-
 .../internal/ui/mapping/CommonViewerAdvisor.java   |   47 +-
 .../ui/mapping/CompareInputChangeNotifier.java     |    3 +-
 .../ui/mapping/DiffTreeChangesSection.java         |    6 +-
 .../team/internal/ui/mapping/FuzzFactorAction.java |   52 +
 .../team/internal/ui/mapping/FuzzFactorDialog.java |  161 +
 .../internal/ui/mapping/GererateRejFileAction.java |   42 +
 .../mapping/IgnoreLeadingPathSegmentsAction.java   |   83 +
 .../ui/mapping/ModelCompareEditorInput.java        |    8 +-
 .../ui/mapping/ModelElementSelectionPage.java      |    6 +-
 .../internal/ui/mapping/ModelSynchronizePage.java  |    2 +-
 .../ui/mapping/ResourceDragAdapterAssistant.java   |  128 +
 .../ui/mapping/ResourceModelContentProvider.java   |    4 +-
 .../mapping/ResourceModelTraversalCalculator.java  |    4 +-
 .../internal/ui/mapping/ReversePatchAction.java    |   52 +
 .../eclipse/team/internal/ui/messages.properties   |   47 +-
 .../ui/preferences/SyncViewerPreferencePage.java   |   12 +-
 .../AbstractSynchronizeModelProvider.java          |   42 +-
 .../ui/synchronize/CompositeModelProvider.java     |   14 +-
 .../GlobalRefreshResourceSelectionPage.java        |   12 +-
 .../ui/synchronize/ISynchronizeModelProvider.java  |    7 +-
 .../ui/synchronize/LocalResourceTypedElement.java  |   16 +-
 .../ui/synchronize/NavigationActionGroup.java      |   12 +-
 .../ui/synchronize/RefreshModelParticipantJob.java |    5 +-
 .../ui/synchronize/RefreshParticipantJob.java      |    8 +-
 .../RefreshSubscriberParticipantJob.java           |    4 +-
 .../synchronize/SaveablesCompareEditorInput.java   |  174 +-
 .../synchronize/ScopableSubscriberParticipant.java |   10 +-
 .../ui/synchronize/StructuredViewerAdvisor.java    |   16 +-
 .../ui/synchronize/SynchronizeManager.java         |   24 +-
 .../ui/synchronize/SynchronizeModelManager.java    |   69 +-
 .../internal/ui/synchronize/SynchronizeView.java   |  410 +-
 .../synchronize/TeamSynchronizingPerspective.java  |    5 +-
 .../synchronize/UnchangedResourceModelElement.java |    5 +-
 .../synchronize/actions/OpenInCompareAction.java   |   68 +-
 .../ui/synchronize/actions/PasteAction.java        |  153 +
 .../synchronize/actions/RefactorActionGroup.java   |   11 +-
 .../actions/StatusLineContributionGroup.java       |   18 +-
 .../synchronize/actions/ToggleLinkingAction.java   |   36 +
 .../ui/synchronize/patch/AdapterFactory.java       |   62 +
 .../patch/ApplyPatchModelCompareEditorInput.java   |  108 +
 .../ApplyPatchModelSynchronizeParticipant.java     |  145 +
 .../ui/synchronize/patch/ApplyPatchOperation.java  |  251 +
 .../ui/synchronize/patch/ApplyPatchSubscriber.java |  185 +
 .../patch/ApplyPatchSubscriberMergeContext.java    |  119 +
 .../ApplyPatchSynchronizationActionProvider.java   |   63 +
 .../patch/ApplyPatchSynchronizationWizard.java     |  172 +
 .../patch/DiffProjectResourceMapping.java          |   73 +
 .../patch/FilePatchResourceMapping.java            |   54 +
 .../ui/synchronize/patch/HunkResourceMapping.java  |   54 +
 .../ui/synchronize/patch/PatchCompareAdapter.java  |   48 +
 .../ui/synchronize/patch/PatchModelProvider.java   |  125 +
 .../ui/synchronize/patch/PatchParsedPage.java      |   47 +
 .../patch/PatchSyncContentProvider.java            |  116 +
 .../synchronize/patch/PatchSyncLabelProvider.java  |   71 +
 .../synchronize/patch/PatchWorkbenchAdapter.java   |   48 +
 .../patch/PatchWorkbenchLabelProvider.java         |   63 +
 .../ui/synchronize/patch/PatchWorkspace.java       |  131 +
 .../ui/synchronize/patch/PatchedFileVariant.java   |   79 +
 .../patch/PatchedFileVariantComparator.java        |   34 +
 .../wizards/GlobalRefreshWizardSelectionPage.java  |   23 +-
 .../ui/wizards/PatchInaccessibleProjectsPage.java  |  173 +
 .../team/ui/IConfigurationWizardExtension.java     |    3 +-
 .../src/org/eclipse/team/ui/PageSaveablePart.java  |    4 +-
 .../ui/mapping/SynchronizationCompareAdapter.java  |    6 +-
 .../team/ui/mapping/SynchronizationOperation.java  |    7 +-
 .../AbstractSynchronizeLabelProvider.java          |   10 +-
 .../AbstractSynchronizeParticipant.java            |    6 +-
 .../synchronize/ISynchronizePageConfiguration.java |   16 +-
 .../ui/synchronize/ISynchronizeParticipant.java    |    2 +-
 .../team/ui/synchronize/ISynchronizeView.java      |    7 +-
 .../team/ui/synchronize/ModelMergeOperation.java   |    4 +-
 .../synchronize/ModelSynchronizeParticipant.java   |    8 +-
 .../ModelSynchronizeParticipantActionGroup.java    |    4 +-
 .../team/ui/synchronize/ParticipantPagePane.java   |    6 +-
 .../ui/synchronize/SaveableCompareEditorInput.java |   79 +-
 .../team/ui/synchronize/SubscriberParticipant.java |    4 +-
 .../team/ui/synchronize/SyncInfoCompareInput.java  |   16 +-
 .../jface/text/projection/ProjectionDocument.java  |    7 +-
 .../org/eclipse/jface/text/AbstractDocument.java   |  105 +-
 .../eclipse/jface/text/CopyOnWriteTextStore.java   |   26 +-
 .../jface/text/FindReplaceDocumentAdapter.java     |    8 +-
 .../eclipse/jface/text/source/AnnotationModel.java |    6 +-
 .../org/eclipse/text/undo/DocumentUndoManager.java |    8 +-
 .../org.eclipse.ui.browser/META-INF/MANIFEST.MF    |    6 +-
 .../org.eclipse.ui.browser/plugin.properties       |    2 +-
 eclipse/plugins/org.eclipse.ui.browser/plugin.xml  |   25 +-
 .../ui/internal/browser/BrowserDescriptor.java     |    2 +-
 .../internal/browser/BrowserDescriptorDialog.java  |    2 +-
 .../browser/BrowserDescriptorWorkingCopy.java      |    2 +-
 .../ui/internal/browser/BrowserManager.java        |    6 +-
 .../eclipse/ui/internal/browser/BrowserViewer.java |    4 +-
 .../ui/internal/browser/DefaultBrowserSupport.java |    4 +-
 .../internal/browser/ExternalBrowserInstance.java  |    4 +-
 .../ui/internal/browser/IBrowserDescriptor.java    |    4 +-
 .../browser/IBrowserDescriptorWorkingCopy.java     |    4 +-
 .../internal/browser/IBrowserViewerContainer.java  |    4 +-
 .../ui/internal/browser/Messages.properties        |   30 +-
 .../internal/browser/SystemBrowserDescriptor.java  |    4 +-
 .../ui/internal/browser/WebBrowserEditorInput.java |   30 +-
 .../internal/browser/WebBrowserPreferencePage.java |   25 +-
 .../ui/internal/browser/WebBrowserUtil.java        |   29 +-
 .../org.eclipse.ui.carbon/META-INF/MANIFEST.MF     |    2 +-
 .../fragment-carbon.properties                     |    5 +-
 eclipse/plugins/org.eclipse.ui.carbon/fragment.xml |   27 +
 .../ui/internal/carbon/CloseDialogHandler.java     |   37 +
 .../META-INF/MANIFEST.MF                           |   17 +-
 .../plugins/org.eclipse.ui.cheatsheets/plugin.xml  |    7 +-
 .../schema/cheatSheetContentFileSpec.exsd          |   34 +-
 .../schema/cheatSheetContentFileSpec.html          |   27 +-
 .../cheatsheets/CheatsheetSearchParticipant.java   |    6 +-
 .../cheatsheets/data/CheatSheetParser.java         |   44 +-
 .../ui/internal/cheatsheets/data/SubItem.java      |   13 +-
 .../CheatSheetCategoryBasedSelectionDialog.java    |   18 +-
 .../registry/CheatSheetRegistryReader.java         |   34 +-
 .../cheatsheets/views/CheatSheetViewer.java        |   16 +-
 .../ui/internal/cheatsheets/views/CoreItem.java    |   21 +-
 .../org.eclipse.ui.cocoa/META-INF/MANIFEST.MF      |    2 +-
 .../org.eclipse.ui.cocoa/fragment-cocoa.properties |    5 +-
 eclipse/plugins/org.eclipse.ui.cocoa/fragment.xml  |   26 +
 .../ui/internal/cocoa/CloseDialogHandler.java      |   38 +
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../org.eclipse.ui.console/META-INF/MANIFEST.MF    |    2 +-
 .../org.eclipse.ui.console/build.properties        |    3 +-
 eclipse/plugins/org.eclipse.ui.console/plugin.xml  |    5 +-
 .../schema/consolePatternMatchListeners.exsd       |    2 +-
 .../src/org/eclipse/ui/console/MessageConsole.java |   20 +-
 .../ui/internal/console/ConsoleManager.java        |   56 +-
 .../ui/internal/console/ConsoleMessages.java       |    4 +-
 .../ui/internal/console/ConsoleMessages.properties |    3 +-
 .../eclipse/ui/internal/console/ConsoleView.java   |   22 +-
 .../org.eclipse.ui.editors/META-INF/MANIFEST.MF    |    4 +-
 .../org.eclipse.ui.editors/plugin.properties       |    5 +-
 eclipse/plugins/org.eclipse.ui.editors/plugin.xml  |    6 +
 .../org.eclipse.ui.editors/schema/templates.exsd   |   13 +-
 .../ui/editors/text/FileBufferOperationAction.java |    4 +-
 .../editors/text/FileBufferOperationHandler.java   |    4 +-
 .../ui/editors/text/FileDocumentProvider.java      |   10 +-
 .../ui/editors/text/ITextEditorHelpContextIds.java |   22 +-
 .../org/eclipse/ui/editors/text/TextEditor.java    |   19 +-
 .../ui/editors/text/TextFileDocumentProvider.java  |    2 +-
 .../text/TextSourceViewerConfiguration.java        |    6 +-
 .../quickdiff/LastSaveReferenceProvider.java       |    4 +-
 .../editors/quickdiff/RevertLineAction.java        |   14 +-
 .../editors/text/AccessibilityPreferencePage.java  |   14 +-
 .../editors/text/QuickDiffConfigurationBlock.java  |   71 +-
 .../internal/editors/text/TextEditorMessages.java  |    2 +
 .../editors/text/TextEditorMessages.properties     |    2 +
 .../ui/internal/texteditor/LineNumberColumn.java   |    4 +-
 .../texteditor/SourceViewerInformationControl.java |    1 +
 .../ui/texteditor/AbstractDecoratedTextEditor.java |  226 +-
 .../ui/texteditor/ChainedPreferenceStore.java      |    6 +-
 .../ui/texteditor/ChangeEncodingAction.java        |   15 +-
 .../ConstructedTextEditorMessages.properties       |    9 +-
 .../texteditor/DefaultMarkerAnnotationAccess.java  |    9 +-
 .../ui/texteditor/FocusedInformationPresenter.java |  170 -
 .../org/eclipse/ui/texteditor/MessageRegion.java   |    4 +-
 .../eclipse/ui/texteditor/TextEditorMessages.java  |    6 +-
 .../ui/texteditor/TextEditorMessages.properties    |    4 +-
 .../.settings/org.eclipse.pde.prefs                |   33 +-
 .../ExternalToolsBuildTab.java                     |   51 +-
 .../ExternalToolsBuilderTab.java                   |   23 +-
 .../ExternalToolsLaunchConfigurationMessages.java  |    5 +-
 ...rnalToolsLaunchConfigurationMessages.properties |    4 +-
 .../launchConfigurations/ExternalToolsMainTab.java |    7 +-
 .../launchConfigurations/ExternalToolsUtil.java    |   78 +-
 .../internal/menu/ExternalToolMenuDelegate.java    |    2 +-
 .../menu/OpenExternalToolsConfigurations.java      |    2 +-
 .../externaltools/internal/model/BuilderUtils.java |  233 +-
 .../internal/model/ExternalToolBuilder.java        |  288 -
 .../internal/model/ExternalToolsImages.java        |    2 +-
 .../internal/model/ExternalToolsModelMessages.java |    4 +-
 .../model/ExternalToolsModelMessages.properties    |    4 +-
 .../internal/model/ExternalToolsPlugin.java        |  139 +-
 .../internal/model/IExternalToolConstants.java     |   86 +-
 .../internal/model/ImageDescriptorRegistry.java    |    2 +-
 .../internal/registry/ExternalToolMigration.java   |  411 -
 .../internal/ui/BuilderLabelProvider.java          |    4 +-
 .../internal/ui/BuilderPropertyPage.java           |   19 +-
 .../internal/ui/ExternalToolsUIMessages.java       |    4 +-
 .../internal/ui/ExternalToolsUIMessages.properties |    4 +-
 .../internal/variables/BuildFilesResolver.java     |    4 +-
 .../internal/variables/BuildProjectResolver.java   |    9 +-
 .../internal/variables/BuildTypeResolver.java      |    4 +-
 .../internal/variables/SystemPathResolver.java     |    7 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../BackgroundResourceRefresher.java               |   87 -
 .../ExternalToolsProgramMessages.java              |    4 +-
 .../ExternalToolsProgramMessages.properties        |    4 +-
 .../ProgramLaunchDelegate.java                     |  246 -
 .../org.eclipse.ui.externaltools/build.properties  |    3 +-
 .../org.eclipse.ui.externaltools/plugin.properties |    4 +-
 .../org.eclipse.ui.externaltools/plugin.xml        |   45 +-
 .../org.eclipse.ui.forms/META-INF/MANIFEST.MF      |    8 +-
 .../org/eclipse/ui/forms/editor/FormEditor.java    |    8 +-
 .../ui/forms/editor/SharedHeaderFormEditor.java    |    7 +-
 .../org/eclipse/ui/forms/widgets/ColumnLayout.java |    5 +-
 .../ui/forms/widgets/ExpandableComposite.java      |   11 +-
 .../src/org/eclipse/ui/forms/widgets/FormText.java |   14 +-
 .../org/eclipse/ui/forms/widgets/FormToolkit.java  |    8 +-
 .../src/org/eclipse/ui/forms/widgets/Section.java  |    6 +-
 .../ui/forms/widgets/SharedScrolledComposite.java  |   10 +-
 .../ui/internal/forms/widgets/FormFonts.java       |   20 +-
 .../ui/internal/forms/widgets/FormHeading.java     |   10 +-
 .../ui/internal/forms/widgets/FormImages.java      |   31 +-
 .../ui/internal/forms/widgets/FormUtil.java        |    5 +-
 .../forms/widgets/ResourceManagerManger.java       |   55 +
 .../forms/widgets/TextHyperlinkSegment.java        |    6 +-
 .../ui/internal/forms/widgets/TextSegment.java     |   16 +-
 .../META-INF/MANIFEST.MF                           |   10 +-
 .../plugin.properties                              |    4 +-
 .../ide/application/DelayedEventsProcessor.java    |  132 +
 .../internal/ide/application/IDEApplication.java   |    6 +-
 .../ide/application/IDEWorkbenchAdvisor.java       |  174 +-
 .../ide/application/IDEWorkbenchWindowAdvisor.java |   63 +-
 .../ide/application/ResourcePerspective.java       |   13 +-
 .../dialogs/RecentWorkspacesPreferencePage.java    |   13 +-
 .../org.eclipse.ui.ide/.settings/.api_filters      |   18 -
 .../org.eclipse.ui.ide/META-INF/MANIFEST.MF        |    9 +-
 eclipse/plugins/org.eclipse.ui.ide/about.html      |    4 +-
 .../org/eclipse/ui/actions/BuildAction.java        |    6 +-
 .../eclipse/ui/actions/CloseResourceAction.java    |   19 +-
 .../ui/actions/CloseUnrelatedProjectsAction.java   |   56 +-
 .../ui/actions/CopyFilesAndFoldersOperation.java   |  278 +-
 .../org/eclipse/ui/actions/CopyResourceAction.java |    4 +-
 .../org/eclipse/ui/actions/GlobalBuildAction.java  |    5 +-
 .../org/eclipse/ui/actions/OpenResourceAction.java |   58 +-
 .../eclipse/ui/actions/OpenSystemEditorAction.java |   12 +-
 .../org/eclipse/ui/actions/OpenWithMenu.java       |   35 +-
 .../org/eclipse/ui/actions/TextActionHandler.java  |   27 +-
 .../dialogs/FilteredResourcesSelectionDialog.java  |  308 +-
 .../org/eclipse/ui/dialogs/NewFolderDialog.java    |    6 +-
 .../ui/dialogs/WizardExportResourcesPage.java      |    2 +
 .../ui/dialogs/WizardNewFileCreationPage.java      |  144 +-
 .../ui/dialogs/WizardNewFolderMainPage.java        |  336 +-
 .../org/eclipse/ui/part/ResourceTransfer.java      |    8 +-
 .../icons/full/etool16/newgroup_wiz.gif            |  Bin 0 -> 366 bytes
 .../icons/full/eview16/pview.gif                   |  Bin 219 -> 339 bytes
 .../icons/full/obj16/excludeMode_filter.gif        |  Bin 0 -> 217 bytes
 .../icons/full/obj16/fileFolderType_filter.gif     |  Bin 0 -> 583 bytes
 .../icons/full/obj16/fileType_filter.gif           |  Bin 0 -> 596 bytes
 .../org.eclipse.ui.ide/icons/full/obj16/folder.gif |  Bin 0 -> 325 bytes
 .../icons/full/obj16/folderType_filter.gif         |  Bin 0 -> 216 bytes
 .../icons/full/obj16/includeMode_filter.gif        |  Bin 0 -> 317 bytes
 .../icons/full/obj16/inheritable_filter.gif        |  Bin 0 -> 211 bytes
 .../icons/full/ovr16/filterapplied_ovr.gif         |  Bin 0 -> 82 bytes
 .../icons/full/ovr16/virt_ovr.gif                  |  Bin 0 -> 104 bytes
 .../icons/full/wizban/newgroup_wiz.png             |  Bin 0 -> 5926 bytes
 .../plugins/org.eclipse.ui.ide/plugin.properties   |   26 +-
 eclipse/plugins/org.eclipse.ui.ide/plugin.xml      |  149 +-
 .../src/org/eclipse/ui/ide/IDE.java                |  102 +-
 .../src/org/eclipse/ui/ide/IDEActionFactory.java   |   29 +-
 .../org/eclipse/ui/ide/ResourceSelectionUtil.java  |  111 +
 .../eclipse/ui/ide/dialogs/ImportTypeDialog.java   |  507 ++
 .../ide/dialogs/PathVariableSelectionDialog.java   |   56 +-
 .../ide/dialogs/ResourceEncodingFieldEditor.java   |    1 -
 .../ide/dialogs/UIResourceFilterDescription.java   |   63 +
 .../undo/AbstractCopyOrMoveResourcesOperation.java |   20 +-
 .../ui/ide/undo/AbstractResourcesOperation.java    |    5 +-
 .../ui/ide/undo/AbstractWorkspaceOperation.java    |    8 +-
 .../eclipse/ui/ide/undo/CopyProjectOperation.java  |    6 +-
 .../ui/ide/undo/CopyResourcesOperation.java        |   11 +-
 .../eclipse/ui/ide/undo/CreateFileOperation.java   |   11 +-
 .../eclipse/ui/ide/undo/CreateFolderOperation.java |   41 +-
 .../ui/ide/undo/CreateProjectOperation.java        |    8 +-
 .../ui/ide/undo/DeleteResourcesOperation.java      |    8 +-
 .../eclipse/ui/ide/undo/MoveProjectOperation.java  |    6 +-
 .../ui/ide/undo/MoveResourcesOperation.java        |   10 +-
 .../eclipse/ui/ide/undo/ResourceDescription.java   |    4 +-
 .../org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java |  223 +-
 .../ui/internal/ide/ContentTypeDecorator.java      |    6 +-
 .../ui/internal/ide/IDEInternalPreferences.java    |   36 +-
 .../ui/internal/ide/IDEPreferenceInitializer.java  |   10 +-
 .../ui/internal/ide/IDEWorkbenchMessages.java      |  164 +-
 .../ui/internal/ide/IDEWorkbenchPlugin.java        |   25 +-
 .../ui/internal/ide/IIDEHelpContextIds.java        |   29 +-
 .../ui/internal/ide/LinkedResourceDecorator.java   |    4 +-
 .../ui/internal/ide/ResourceDragAndDropEditor.java |  216 +
 .../ui/internal/ide/ResourceFilterDecorator.java   |   67 +
 .../ui/internal/ide/VirtualResourceDecorator.java  |   82 +
 .../ui/internal/ide/WorkbenchActionBuilder.java    |   25 +-
 .../ui/internal/ide/actions/BuildUtilities.java    |   20 +-
 .../ide/dialogs/ConfigurationLogUpdateSection.java |   18 +-
 .../ide/dialogs/CreateLinkedResourceGroup.java     |  208 +-
 .../ui/internal/ide/dialogs/FileStatesPage.java    |   88 +-
 .../ide/dialogs/FileSystemSelectionArea.java       |    9 +-
 .../internal/ide/dialogs/IDEResourceInfoUtils.java |   23 +-
 .../ide/dialogs/IDEWorkspacePreferencePage.java    |   58 +-
 .../internal/ide/dialogs/LinkedResourceEditor.java |  981 ++
 .../ide/dialogs/LinkedResourcesPreferencePage.java |   40 +-
 .../internal/ide/dialogs/PathVariableDialog.java   |  318 +-
 .../ide/dialogs/PathVariableEditDialog.java        |  145 +
 .../internal/ide/dialogs/PathVariablesGroup.java   |  369 +-
 .../ide/dialogs/ProjectLinkedResourcePage.java     |  208 +
 .../ide/dialogs/RelativePathVariableGroup.java     |  354 +
 .../ide/dialogs/ResourceFilterEditDialog.java      |  151 +
 .../internal/ide/dialogs/ResourceFilterGroup.java  | 3332 +++++++
 .../internal/ide/dialogs/ResourceFilterPage.java   |   71 +
 .../ui/internal/ide/dialogs/ResourceInfoPage.java  |  587 +-
 .../ide/dialogs/ResourceTreeAndListGroup.java      |   90 +-
 .../ide/dialogs/ResourceWorkingSetPage.java        |    2 +-
 .../filesystem/FileSystemStructureProvider.java    |   74 +-
 .../ui/internal/ide/filesystem/PrefixPool.java     |  210 -
 .../ide/handlers/BuildAllProjectsHandler.java      |   59 +
 .../eclipse/ui/internal/ide/messages.properties    |  165 +-
 .../ui/internal/ide/misc/AndFileInfoMatcher.java   |   34 +
 .../ui/internal/ide/misc/AndResourceFilter.java    |   10 +
 .../ide/misc/FileInfoAttributesMatcher.java        |  420 +
 .../ui/internal/ide/misc/NotFileInfoMatcher.java   |   34 +
 .../ui/internal/ide/misc/OrFileInfoMatcher.java    |   37 +
 .../internal/ide/misc/StringFileInfoMatcher.java   |   53 +
 .../ui/internal/ide/undo/ContainerDescription.java |   41 +-
 .../ui/internal/ide/undo/FolderDescription.java    |   16 +-
 .../eclipse/ui/internal/ide/undo/UndoMessages.java |    3 +-
 .../ui/internal/ide/undo/messages.properties       |    3 +-
 .../ui/internal/views/markers/BookmarksView.java   |    9 -
 .../views/markers/CachedMarkerBuilder.java         | 1454 +---
 .../CompatibilityMarkerFieldFilterGroup.java       |    8 +-
 .../internal/views/markers/DeltaMarkerEntry.java   |  106 +
 .../views/markers/ExtendedMarkersView.java         | 1356 ++--
 .../views/markers/FiltersConfigurationDialog.java  |  203 +-
 .../internal/views/markers/GroupsContribution.java |    4 +-
 .../internal/views/markers/IncrementUpdateJob.java |  305 +
 .../ui/internal/views/markers/MarkerCategory.java  |  140 +-
 .../views/markers/MarkerCompletionField.java       |    5 +-
 .../views/markers/MarkerContentGenerator.java      | 1302 ++-
 .../views/markers/MarkerDescriptionField.java      |    9 +-
 .../ui/internal/views/markers/MarkerEntry.java     |  145 +-
 .../views/markers/MarkerFieldFilterGroup.java      |  149 +-
 .../views/markers/MarkerHelpAdapterFactory.java    |    6 +-
 .../ui/internal/views/markers/MarkerMap.java       |  142 -
 .../views/markers/MarkerPreferencesDialog.java     |    8 +-
 .../views/markers/MarkerPriorityField.java         |    4 +-
 .../internal/views/markers/MarkerResourceUtil.java |  466 +
 .../ui/internal/views/markers/MarkerSortUtil.java  |   58 +-
 .../markers/MarkerSupportInternalUtilities.java    |   36 +
 .../ui/internal/views/markers/MarkerUpdateJob.java |  220 +
 .../views/markers/MarkerViewerContentProvider.java |  110 +
 .../eclipse/ui/internal/views/markers/Markers.java |  435 +
 .../views/markers/MarkersChangeListener.java       |  814 ++
 .../views/markers/MarkersPropertyPage.java         |   18 +-
 .../internal/views/markers/MarkersTreeViewer.java  |   28 +-
 .../ui/internal/views/markers/MockMarkerEntry.java |   10 +
 .../ui/internal/views/markers/ProblemsView.java    |    7 -
 .../ui/internal/views/markers/QuickFixHandler.java |   26 +-
 .../ui/internal/views/markers/ScopeArea.java       |   19 +
 .../views/markers/SortFieldContribution.java       |    6 +-
 .../ui/internal/views/markers/TasksView.java       |   10 -
 .../views/markers/TypesConfigurationArea.java      |   32 +-
 .../ui/internal/views/markers/UIUpdateJob.java     |  167 +
 .../datatransfer/ArchiveFileExportOperation.java   |    2 +-
 .../wizards/datatransfer/DataTransferMessages.java |    9 +-
 .../wizards/datatransfer/IFileExporter.java        |   13 +-
 .../datatransfer/MinimizedFileSystemElement.java   |  132 +-
 .../wizards/datatransfer/TarFileExporter.java      |   20 +-
 .../WizardArchiveFileResourceImportPage1.java      |   20 +-
 .../WizardFileSystemResourceImportPage1.java       |  355 +-
 .../wizards/datatransfer/ZipFileExporter.java      |    9 +-
 .../wizards/datatransfer/messages.properties       |    9 +-
 .../wizards/newresource/ResourceMessages.java      |    2 +-
 .../wizards/newresource/messages.properties        |    2 +-
 .../ui/views/markers/FilterConfigurationArea.java  |    2 +-
 .../org/eclipse/ui/views/markers/MarkerField.java  |   12 +-
 .../internal/ContentGeneratorDescriptor.java       |  325 +
 .../ui/views/markers/internal/MarkerGroup.java     |    4 +-
 .../ui/views/markers/internal/MarkerMessages.java  |    4 +
 .../markers/internal/MarkerSupportRegistry.java    |   57 +-
 .../ui/views/markers/internal/messages.properties  |   16 +-
 .../ui/views/navigator/NavigatorDropAdapter.java   |  132 +-
 .../ui/views/navigator/ResourceNavigator.java      |    2 +-
 .../ui/views/navigator/ResourceSelectionUtil.java  |    4 +-
 .../ui/wizards/datatransfer/ImportOperation.java   |  127 +-
 .../META-INF/MANIFEST.MF                           |   10 +-
 .../build.properties                               |    5 +-
 .../introContent.xml                               |   17 +-
 .../org.eclipse.ui.intro.universal/plugin.xml      |   19 +-
 .../intro/universal/IUniversalIntroConstants.java  |   14 +-
 .../ui/internal/intro/universal/Messages.java      |   14 +-
 .../internal/intro/universal/Messages.properties   |   14 +-
 .../ui/intro/universal/ExtensionFactory.java       |   14 +-
 .../graphics/icons/ctool/arrow_rtl.gif             |  Bin 54 -> 54 bytes
 .../themes/circles/html/font-relative.css          |    2 +-
 .../themes/circles/html/rtl.css                    |    2 +-
 .../themes/circles/html/shared.css                 |    5 +
 .../themes/purpleMesh/html/rtl.css                 |   25 +-
 .../themes/shared/graphics/icons/ctool}/arrow.gif  |  Bin 54 -> 54 bytes
 .../themes/shared/html/shared.css                  |    7 +-
 .../graphics/contentpage/banner_extension.jpg      |  Bin 0 -> 4130 bytes
 .../slate/graphics/contentpage/fs_banner.jpg       |  Bin 69318 -> 10539 bytes
 .../slate/graphics/contentpage/mi_banner.jpg       |  Bin 68770 -> 10401 bytes
 .../slate/graphics/contentpage/ov_banner.jpg       |  Bin 69392 -> 10393 bytes
 .../slate/graphics/contentpage/sa_banner.jpg       |  Bin 68719 -> 10439 bytes
 .../slate/graphics/contentpage/tu_banner.jpg       |  Bin 68726 -> 10397 bytes
 .../slate/graphics/contentpage/wn_banner.jpg       |  Bin 69325 -> 10551 bytes
 .../slate/graphics/contentpage/wr_banner.jpg       |  Bin 68776 -> 10321 bytes
 .../graphics/icons/ctool/arrow_rtl.gif             |  Bin 54 -> 54 bytes
 .../themes/slate/graphics/rootpage/root_banner.jpg |  Bin 7938 -> 4096 bytes
 .../themes/slate/html/font-relative.css            |    8 +-
 .../themes/slate/html/root.css                     |   79 +-
 .../themes/slate/html/rtl.css                      |   45 +-
 .../themes/slate/html/shared.css                   |   35 +-
 .../org.eclipse.ui.intro/META-INF/MANIFEST.MF      |   14 +-
 .../plugins/org.eclipse.ui.intro/build.properties  |    5 +-
 .../icons}/arrow.gif                               |  Bin 54 -> 54 bytes
 eclipse/plugins/org.eclipse.ui.intro/plugin.xml    |   19 +-
 .../ui/internal/intro/impl/IntroPlugin.java        |   74 +-
 .../eclipse/ui/internal/intro/impl/Messages.java   |    8 +
 .../ui/internal/intro/impl/Messages.properties     |    8 +
 .../intro/impl/model/AbstractIntroContainer.java   |    6 +-
 .../intro/impl/model/IntroSearchParticipant.java   |   58 +-
 .../intro/contentproviders/EclipseRSSViewer.java   |  550 ++
 .../.settings/.api_filters                         |   74 +-
 .../META-INF/MANIFEST.MF                           |   18 +-
 .../plugin.properties                              |    4 +-
 .../org.eclipse.ui.navigator.resources/plugin.xml  |   17 +-
 .../resources/actions/EditActionGroup.java         |    4 +-
 .../resources/actions/OpenActionProvider.java      |    4 +-
 .../resources/actions/RefactorActionGroup.java     |    3 +-
 .../resources/actions/ResourceSelectionUtil.java   |  111 -
 .../resources/actions/TextActionHandler.java       |  565 --
 .../actions/WorkingSetActionProvider.java          |  168 +-
 .../actions/WorkingSetRootModeActionGroup.java     |   47 +-
 .../TabbedPropertySheetAdapterFactory.java         |    7 +-
 .../workingsets/WorkingSetsContentProvider.java    |    5 +-
 .../ui/navigator/resources/ProjectExplorer.java    |    3 +-
 .../resources/ResourceDropAdapterAssistant.java    |  258 +-
 .../.settings/.api_filters                         |  129 -
 .../.settings/org.eclipse.jdt.core.prefs           |    6 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |    4 +-
 .../org.eclipse.ui.navigator/META-INF/MANIFEST.MF  |    8 +-
 .../schema/navigatorContent.exsd                   |   74 +-
 .../navigator/CommonNavigatorMessages.java         |    4 +-
 .../internal/navigator/ContributorTrackingSet.java |   40 +-
 .../ui/internal/navigator/CustomAndExpression.java |   38 +-
 .../navigator/NavigatorActivationService.java      |   23 +-
 .../navigator/NavigatorContentService.java         |  245 +-
 .../NavigatorContentServiceContentProvider.java    |  785 +--
 .../NavigatorContentServiceLabelProvider.java      |    2 +-
 .../internal/navigator/NavigatorFilterService.java |  120 +-
 .../navigator/NavigatorPipelineService.java        |  322 +-
 .../ui/internal/navigator/NavigatorPlugin.java     |   51 +-
 .../internal/navigator/NavigatorSafeRunnable.java  |   74 +
 .../navigator/NavigatorSaveablesService.java       |    8 +-
 .../actions/CommonActionProviderDescriptor.java    |   59 +-
 .../navigator/actions/LinkEditorAction.java        |   49 +-
 .../navigator/dnd/CommonDropAdapterDescriptor.java |   32 +-
 .../navigator/dnd/CommonDropDescriptorManager.java |    6 +-
 .../navigator/dnd/NavigatorDnDService.java         |   28 +-
 .../ui/internal/navigator/extensions/Binding.java  |    9 +-
 .../extensions/CommonDragAssistantDescriptor.java  |   23 +-
 .../extensions/ExtensionPriorityComparator.java    |   82 -
 .../ExtensionSequenceNumberComparator.java         |   82 +
 .../INavigatorContentExtPtConstants.java           |   11 +-
 .../navigator/extensions/LinkHelperDescriptor.java |   44 +-
 .../navigator/extensions/LinkHelperManager.java    |   28 +-
 .../extensions/NavigatorContentDescriptor.java     |  167 +-
 .../NavigatorContentDescriptorManager.java         |  108 +-
 .../extensions/NavigatorContentExtension.java      |  210 +-
 .../extensions/NavigatorViewerDescriptor.java      |    8 +-
 .../NavigatorViewerDescriptorManager.java          |    6 +-
 .../SafeDelegateTreeContentProvider.java           |   58 +-
 .../extensions/StructuredViewerManager.java        |   51 +-
 .../filters/CommonFilterContentProvider.java       |    8 +-
 .../navigator/filters/CommonFilterDescriptor.java  |   67 +-
 .../filters/CommonFilterDescriptorManager.java     |   42 +-
 .../filters/CommonFilterSelectionDialog.java       |   28 +-
 .../navigator/filters/CoreExpressionFilter.java    |   12 +-
 .../filters/UpdateActiveFiltersOperation.java      |   94 +-
 .../ui/internal/navigator/messages.properties      |    4 +-
 .../navigator/sorters/CommonSorterDescriptor.java  |   27 +-
 .../sorters/CommonSorterDescriptorManager.java     |   30 +-
 .../navigator/sorters/NavigatorSorterService.java  |   68 +-
 .../navigator/wizards/CommonWizardDescriptor.java  |   19 +-
 .../wizards/CommonWizardDescriptorManager.java     |   68 +-
 .../eclipse/ui/navigator/CommonDragAdapter.java    |  124 +-
 .../eclipse/ui/navigator/CommonDropAdapter.java    |  103 +-
 .../org/eclipse/ui/navigator/CommonNavigator.java  |   62 +-
 .../ui/navigator/CommonNavigatorManager.java       |   25 +-
 .../src/org/eclipse/ui/navigator/CommonViewer.java |    7 +-
 .../eclipse/ui/navigator/CommonViewerSorter.java   |   63 +-
 .../ui/navigator/INavigatorContentDescriptor.java  |   39 +-
 .../ui/navigator/INavigatorFilterService.java      |   17 +-
 .../ui/navigator/INavigatorPipelineService.java    |    9 +-
 .../ui/navigator/INavigatorViewerDescriptor.java   |    9 +-
 .../navigator/IPipelinedTreeContentProvider.java   |   68 +-
 .../navigator/IPipelinedTreeContentProvider2.java  |   61 +
 .../ui/navigator/NavigatorActionService.java       |  132 +-
 .../ui/navigator/PipelinedShapeModification.java   |   12 +-
 .../org.eclipse.ui.net/META-INF/MANIFEST.MF        |    2 +-
 .../ui/internal/net/ProxyPreferencePage.java       |    4 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../.settings/org.eclipse.pde.prefs                |   14 +-
 .../ui/internal/views/log/EventDetailsDialog.java  |   15 +-
 .../ui/internal/views/log/FilterDialog.java        |    9 +-
 .../eclipse/ui/internal/views/log/LogEntry.java    |  349 +-
 .../eclipse/ui/internal/views/log/LogReader.java   |   37 +-
 .../org/eclipse/ui/internal/views/log/LogView.java |   63 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.ui.views/META-INF/MANIFEST.MF      |    2 +-
 .../views/properties/PinPropertySheetAction.java   |    6 +-
 .../eclipse/ui/views/properties/PropertySheet.java |  132 +-
 .../org.eclipse.ui.win32/META-INF/MANIFEST.MF      |    2 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../META-INF/MANIFEST.MF                           |    4 +-
 .../texteditor/FocusedInformationPresenter.java    |  165 +
 .../texteditor/HippieCompletionEngine.java         |  720 ++-
 .../spelling/SpellingEngineRegistry.java           |    4 +-
 .../ui/texteditor/AbstractDocumentProvider.java    |    6 +-
 .../eclipse/ui/texteditor/AbstractTextEditor.java  |  222 +-
 .../org/eclipse/ui/texteditor/EditorMessages.java  |    4 +-
 .../ui/texteditor/EditorMessages.properties        |    1 +
 .../org/eclipse/ui/texteditor/FindNextAction.java  |    4 +-
 .../eclipse/ui/texteditor/FindReplaceDialog.java   |   93 +-
 .../org/eclipse/ui/texteditor/GotoLineAction.java  |  123 +-
 .../ui/texteditor/HippieCompleteAction.java        |  208 +-
 .../src/org/eclipse/ui/texteditor/ITextEditor.java |   10 +-
 .../ui/texteditor/ITextEditorActionConstants.java  |   18 +-
 .../texteditor/ITextEditorActionDefinitionIds.java |   18 +-
 .../ui/texteditor/IncrementalFindTarget.java       |   20 +-
 .../texteditor/KeyBindingSupportForAssistant.java  |   12 +-
 .../texteditor/SourceViewerDecorationSupport.java  |    4 +-
 .../ui/texteditor/StatusLineContributionItem.java  |   25 +-
 .../eclipse/ui/texteditor/StatusTextEditor.java    |   16 +-
 .../ui/texteditor/TextViewerDeleteLineTarget.java  |    2 +-
 .../spelling/SpellingCorrectionProcessor.java      |    4 +-
 .../templates/AbstractTemplatesPage.java           |   13 +-
 .../ui/texteditor/templates/ColumnLayout.java      |    4 +-
 .../ui/texteditor/templates/ITemplatesPage.java    |   20 +-
 .../templates/ITemplatesPageExtension.java         |   44 +
 .../templates/TemplatePreferencePage.java          |   55 +-
 .../ui/texteditor/templates/TemplatesMessages.java |    6 +-
 .../templates/TemplatesMessages.properties         |   17 +-
 .../ui/texteditor/templates/TemplatesView.java     |   36 +-
 .../.settings/.api_filters                         |   72 -
 .../.settings/org.eclipse.jdt.core.prefs           |    2 +-
 .../.settings/org.eclipse.jdt.ui.prefs             |    8 +-
 .../eclipse/ui/IEditorActionBarContributor.java    |   32 +-
 .../org/eclipse/ui/IEditorReference.java           |   25 +-
 .../Eclipse UI/org/eclipse/ui/IMemento.java        |   40 +-
 .../Eclipse UI/org/eclipse/ui/IPageLayout.java     |   30 +-
 .../Eclipse UI/org/eclipse/ui/ISizeProvider.java   |    3 +-
 .../Eclipse UI/org/eclipse/ui/IViewSite.java       |   18 +-
 .../Eclipse UI/org/eclipse/ui/IWorkbench.java      |   15 +-
 .../org/eclipse/ui/IWorkbenchCommandConstants.java |  140 +-
 .../Eclipse UI/org/eclipse/ui/IWorkbenchPage.java  |   21 +-
 .../Eclipse UI/org/eclipse/ui/IWorkbenchPart.java  |    4 +-
 .../eclipse/ui/IWorkbenchPreferenceConstants.java  |    7 +-
 .../Eclipse UI/org/eclipse/ui/XMLMemento.java      |   29 +-
 .../ui/actions/CompoundContributionItem.java       |   23 +-
 .../ui/actions/ContributionItemFactory.java        |    3 +-
 .../org/eclipse/ui/actions/NewWizardAction.java    |   30 +-
 .../ui/actions/NewWizardDropDownAction.java        |   10 +-
 .../ui/actions/WorkingSetFilterActionGroup.java    |    7 +-
 .../eclipse/ui/application/WorkbenchAdvisor.java   |    4 +-
 .../eclipse/ui/dialogs/EditorSelectionDialog.java  |   96 +-
 .../ui/dialogs/FilteredItemsSelectionDialog.java   |   65 +-
 .../org/eclipse/ui/dialogs/FilteredTree.java       |   43 +-
 .../org/eclipse/ui/dialogs/PreferencesUtil.java    |   49 +-
 .../org/eclipse/ui/dialogs/SearchPattern.java      |   37 +-
 .../fieldassist/ContentAssistCommandAdapter.java   |  137 +-
 .../org/eclipse/ui/handlers/ExpandAllHandler.java  |   80 +
 .../ui/handlers/ShowPerspectiveHandler.java        |   18 +-
 .../org/eclipse/ui/handlers/ShowViewHandler.java   |   13 +-
 .../eclipse/ui/internal/ActivateEditorHandler.java |    3 +-
 .../ui/internal/ChangeToPerspectiveMenu.java       |    5 +-
 .../org/eclipse/ui/internal/CycleBaseHandler.java  |   27 +-
 .../ui/internal/DefaultAnimationFeedback.java      |  138 +
 .../org/eclipse/ui/internal/DragCursors.java       |    9 +-
 .../org/eclipse/ui/internal/EditorActionBars.java  |    6 +-
 .../eclipse/ui/internal/EditorAreaTrimToolBar.java |   13 +-
 .../org/eclipse/ui/internal/EditorHistory.java     |    7 +-
 .../org/eclipse/ui/internal/EditorHistoryItem.java |    7 +-
 .../org/eclipse/ui/internal/EditorManager.java     |   16 +-
 .../org/eclipse/ui/internal/EditorReference.java   |   10 +-
 .../eclipse/ui/internal/EditorSashContainer.java   |    2 +-
 .../internal/EditorSiteDragAndDropServiceImpl.java |   29 +-
 .../org/eclipse/ui/internal/FastViewManager.java   |   37 +-
 .../eclipse/ui/internal/IPreferenceConstants.java  |   20 +-
 .../eclipse/ui/internal/IWorkbenchConstants.java   |    6 +-
 .../ui/internal/IWorkbenchHelpContextIds.java      |    8 +-
 .../org/eclipse/ui/internal/JFaceUtil.java         |    9 +-
 .../org/eclipse/ui/internal/PartStack.java         |   12 +-
 .../org/eclipse/ui/internal/Perspective.java       |   62 +-
 .../eclipse/ui/internal/PerspectiveSwitcher.java   |   34 +-
 .../ui/internal/PlatformUIPreferenceListener.java  |   14 +-
 .../org/eclipse/ui/internal/PluginActionSet.java   |    2 +-
 .../ui/internal/PluginActionSetBuilder.java        |    2 +-
 .../org/eclipse/ui/internal/ProductInfo.java       |   33 +-
 .../org/eclipse/ui/internal/ProductProperties.java |   25 +-
 .../eclipse/ui/internal/RectangleAnimation.java    |  257 +
 .../org/eclipse/ui/internal/SaveableHelper.java    |   29 +-
 .../org/eclipse/ui/internal/SaveablesList.java     |    4 +-
 .../org/eclipse/ui/internal/ShowInHandler.java     |   12 +-
 .../org/eclipse/ui/internal/ShowInMenu.java        |   19 +-
 .../org/eclipse/ui/internal/ShowViewMenu.java      |   16 +-
 .../org/eclipse/ui/internal/StickyViewManager.java |   42 +-
 .../org/eclipse/ui/internal/UILockListener.java    |   11 +-
 .../org/eclipse/ui/internal/ViewFactory.java       |    4 +-
 .../eclipse/ui/internal/ViewIntroAdapterPart.java  |   20 +-
 .../org/eclipse/ui/internal/ViewReference.java     |   10 +-
 .../org/eclipse/ui/internal/WWinPartService.java   |   13 +-
 .../org/eclipse/ui/internal/Workbench.java         |  376 +-
 .../org/eclipse/ui/internal/WorkbenchImages.java   |   21 +-
 .../eclipse/ui/internal/WorkbenchIntroManager.java |    2 +-
 .../org/eclipse/ui/internal/WorkbenchMessages.java |   14 +-
 .../org/eclipse/ui/internal/WorkbenchPage.java     |   56 +-
 .../org/eclipse/ui/internal/WorkbenchPlugin.java   |   22 +-
 .../internal/WorkbenchPreferenceInitializer.java   |    7 +-
 .../org/eclipse/ui/internal/WorkbenchWindow.java   |   71 +-
 .../ui/internal/WorkbenchWindowConfigurer.java     |    4 +-
 .../org/eclipse/ui/internal/WorkingSetManager.java |    5 +-
 .../eclipse/ui/internal/about/AboutBundleData.java |   11 +-
 .../ui/internal/about/AboutFeaturesPage.java       |   11 +-
 .../ui/internal/about/AboutPluginsPage.java        |   83 +-
 .../eclipse/ui/internal/about/AboutSystemPage.java |   26 +-
 .../ui/internal/about/BundleSigningInfo.java       |   61 +-
 .../ui/internal/about/InstallationDialog.java      |   24 +-
 .../activities/ExtensionActivityRegistry.java      |   54 +-
 .../activities/MutableActivityManager.java         |   39 +-
 .../browser/DefaultWorkbenchBrowserSupport.java    |    7 +-
 .../internal/decorators/DecoratorDefinition.java   |   13 +-
 .../ui/internal/decorators/DecoratorManager.java   |   14 +-
 .../eclipse/ui/internal/dialogs/AboutDialog.java   |   30 +-
 .../dialogs/CustomizePerspectiveDialog.java        |   43 +-
 .../internal/dialogs/FilteredPreferenceDialog.java |   53 +-
 .../ui/internal/dialogs/ImportExportPage.java      |    5 +-
 .../org/eclipse/ui/internal/dialogs/NewWizard.java |   17 +-
 .../ui/internal/dialogs/NewWizardNewPage.java      |    3 +-
 .../dialogs/PerspectivesPreferencePage.java        |   61 +-
 .../dialogs/PreferenceBoldLabelProvider.java       |    9 +-
 .../internal/dialogs/SelectPerspectiveDialog.java  |    4 +-
 .../ui/internal/dialogs/ShowViewDialog.java        |   21 +-
 .../ui/internal/dialogs/StartupPreferencePage.java |   33 +-
 .../ui/internal/dialogs/ViewLabelProvider.java     |   14 +-
 .../ui/internal/dialogs/WizardPatternFilter.java   |   16 +-
 .../internal/dialogs/WorkbenchEditorsDialog.java   |   35 +-
 .../internal/dialogs/WorkbenchWizardElement.java   |   21 +-
 .../dialogs/WorkingSetSelectionDialog.java         |   66 +-
 .../internal/handlers/ClosePerspectiveHandler.java |    9 +-
 .../eclipse/ui/internal/handlers/HandlerProxy.java |    8 +-
 .../handlers/ShowPreferencePageHandler.java        |    9 +-
 .../eclipse/ui/internal/handlers/SpyHandler.java   |  156 +
 .../ui/internal/handlers/TraversePageHandler.java  |   62 +
 .../ui/internal/handlers/WidgetMethodHandler.java  |   13 +-
 .../ui/internal/handlers/WizardHandler.java        |    9 +-
 .../ui/internal/help/WorkbenchHelpSystem.java      |   57 +-
 .../internal/keys/AbstractKeyFormatter.properties  |   10 +-
 .../ui/internal/keys/BindingPersistence.java       |   16 +
 .../eclipse/ui/internal/keys/KeyAssistDialog.java  |    7 +-
 .../eclipse/ui/internal/keys/MacKeyFormatter.java  |    3 +-
 .../ui/internal/keys/NativeKeyFormatter.java       |    3 +-
 .../ui/internal/keys/WorkbenchKeyboard.java        |   99 +-
 .../ui/internal/keys/model/KeyController.java      |    7 +-
 .../menus/DynamicToolBarContributionItem.java      |  212 +
 .../menus/InternalControlContribution.java         |    6 +-
 .../ui/internal/menus/LegacyActionPersistence.java |   72 +-
 .../ui/internal/menus/MenuAdditionCacheEntry.java  |   83 +-
 .../ui/internal/menus/TrimContributionManager.java |   42 +-
 .../ui/internal/menus/WorkbenchMenuService.java    |  106 +-
 .../org/eclipse/ui/internal/messages.properties    |   12 +-
 .../eclipse/ui/internal/misc/ExternalEditor.java   |   11 +-
 .../org/eclipse/ui/internal/misc/Policy.java       |    5 +-
 .../preferences/PreferenceTransferElement.java     |  297 +-
 .../WorkbenchPreferenceExtensionNode.java          |    7 +-
 .../AbstractTableInformationControl.java           |   58 +-
 .../presentations/NativeStackPresentation.java     |  899 +-
 .../ui/internal/presentations/PaneFolder.java      |   15 +-
 .../defaultpresentation/DefaultTabFolder.java      |   59 +-
 .../defaultpresentation/DefaultTabItem.java        |   13 +-
 .../defaultpresentation/NativeTabFolder.java       |  599 +-
 .../presentations/util/AbstractTabFolder.java      |    6 +-
 .../ui/internal/presentations/util/PartInfo.java   |    2 +-
 .../presentations/util/PresentablePartFolder.java  |    4 +-
 .../ui/internal/progress/AnimationItem.java        |    9 +-
 .../ui/internal/progress/BlockedJobsDialog.java    |   11 +-
 .../internal/progress/DetailedProgressViewer.java  |   10 +-
 .../eclipse/ui/internal/progress/ErrorInfo.java    |   15 +-
 .../eclipse/ui/internal/progress/GroupInfo.java    |   12 +-
 .../org/eclipse/ui/internal/progress/JobInfo.java  |    7 +-
 .../ui/internal/progress/JobTreeElement.java       |   13 +-
 .../internal/progress/ProgressAnimationItem.java   |   92 +-
 .../ui/internal/progress/ProgressInfoItem.java     |  188 +-
 .../ui/internal/progress/ProgressManager.java      |  237 +-
 .../eclipse/ui/internal/progress/ProgressView.java |    9 +-
 .../eclipse/ui/internal/progress/SubTaskInfo.java  |    4 +-
 .../internal/progress/TaskBarProgressManager.java  |  290 +
 .../progress/WorkbenchSiteProgressService.java     |   82 +-
 .../ui/internal/quickaccess/ActionElement.java     |    4 +-
 .../ui/internal/quickaccess/CommandElement.java    |   57 +-
 .../ui/internal/quickaccess/EditorElement.java     |    4 +-
 .../ui/internal/quickaccess/PreferenceElement.java |    4 +-
 .../ui/internal/quickaccess/QuickAccessDialog.java |   20 +-
 .../internal/quickaccess/QuickAccessElement.java   |    4 +-
 .../ui/internal/quickaccess/QuickAccessEntry.java  |   22 +-
 .../ui/internal/quickaccess/ViewElement.java       |   21 +-
 .../ui/internal/quickaccess/WizardElement.java     |    4 +-
 .../ui/internal/registry/EditorRegistry.java       |   41 +-
 .../ui/internal/registry/FileEditorMapping.java    |   19 +-
 .../registry/IWorkbenchRegistryConstants.java      |    8 +
 .../internal/registry/PerspectiveDescriptor.java   |    7 +-
 .../ui/internal/registry/PerspectiveRegistry.java  |    8 +-
 .../registry/PreferenceTransferRegistryReader.java |   30 +-
 .../ui/internal/registry/UIExtensionTracker.java   |    8 +-
 .../services/SourcePriorityNameMapping.java        |    2 +-
 .../services/WorkbenchServiceRegistry.java         |   13 +-
 .../internal/services/WorkbenchSourceProvider.java |   17 +-
 .../statushandlers/DefaultDetailsArea.java         |  184 +-
 .../statushandlers/DetailsAreaManager.java         |   92 +
 .../statushandlers/IStatusDialogConstants.java     |  125 +-
 .../ui/internal/statushandlers/InternalDialog.java | 1088 +++
 .../statushandlers/LabelProviderWrapper.java       |  542 ++
 .../statushandlers/StackTraceSupportArea.java      |    7 +-
 .../ui/internal/statushandlers/SupportTray.java    |  349 +
 .../WorkbenchStatusDialogManagerImpl.java          |  540 ++
 .../internal/testing/ContributionInfoMessages.java |   47 +
 .../testing/PluginContributionAdapterFactory.java  |   96 +
 .../ui/internal/testing/messages.properties        |   29 +
 .../org/eclipse/ui/internal/util/Util.java         |   20 +-
 .../preferences/PreferencesContentProvider.java    |   52 +
 .../preferences/WizardPreferencesExportPage1.java  |   28 +-
 .../preferences/WizardPreferencesImportPage1.java  |   36 +-
 .../wizards/preferences/WizardPreferencesPage.java |  375 +-
 .../eclipse/ui/menus/CommandContributionItem.java  |   58 +-
 .../ui/menus/ExtensionContributionFactory.java     |    8 +-
 .../Eclipse UI/org/eclipse/ui/menus/MenuUtil.java  |   32 +-
 .../menus/WorkbenchWindowControlContribution.java  |   21 +-
 .../org/eclipse/ui/part/AbstractMultiEditor.java   |   54 +-
 .../Eclipse UI/org/eclipse/ui/part/EditorPart.java |   14 +-
 .../org/eclipse/ui/part/IShowInSource.java         |   13 +-
 .../org/eclipse/ui/part/IShowInTarget.java         |   13 +-
 .../org/eclipse/ui/part/IShowInTargetList.java     |   29 +-
 .../org/eclipse/ui/part/MultiPageEditorPart.java   |   15 +-
 .../org/eclipse/ui/part/MultiPageEditorSite.java   |    2 +-
 .../org/eclipse/ui/part/PageBookView.java          |    7 +-
 .../org/eclipse/ui/plugin/AbstractUIPlugin.java    |    9 +-
 .../ui/progress/DeferredTreeContentManager.java    |   65 +-
 .../eclipse/ui/progress/IProgressConstants.java    |   50 +-
 .../eclipse/ui/progress/IProgressConstants2.java   |   63 +
 .../ui/progress/IWorkbenchSiteProgressService.java |   83 +-
 .../eclipse/ui/splash/AbstractSplashHandler.java   |    8 +-
 .../statushandlers/AbstractStatusAreaProvider.java |   23 +-
 .../ui/statushandlers/WorkbenchErrorHandler.java   |    2 +
 .../WorkbenchStatusDialogManager.java              | 2232 +-----
 .../org/eclipse/ui/testing/ContributionInfo.java   |   68 +
 .../Eclipse UI/org/eclipse/ui/testing/package.html |    2 +-
 .../org.eclipse.ui.workbench/META-INF/MANIFEST.MF  |    8 +-
 .../plugins/org.eclipse.ui/META-INF/MANIFEST.MF    |    2 +-
 .../org.eclipse.ui/buildnotes_workbench.html       |  805 ++-
 .../icons/full/elcl16/expandall.gif                |  Bin 165 -> 165 bytes
 .../icons/full/ovr16/error_ovr.gif}                |  Bin 82 -> 82 bytes
 .../icons/full/ovr16/running_ovr.gif               |  Bin 0 -> 171 bytes
 .../icons/full/ovr16/warning_ovr.gif               |  Bin 173 -> 173 bytes
 .../icons/full/progress/progress_error.gif         |  Bin 375 -> 577 bytes
 .../icons/full/progress/progress_none.gif          |  Bin 219 -> 342 bytes
 .../icons/full/progress/progress_ok.gif            |  Bin 265 -> 328 bytes
 .../icons/full/progress/progress_task.gif          |  Bin 200 -> 316 bytes
 .../org.eclipse.ui/icons/full/progress/pview.gif   |  Bin 219 -> 339 bytes
 eclipse/plugins/org.eclipse.ui/plugin.properties   |   11 +-
 eclipse/plugins/org.eclipse.ui/plugin.xml          |   72 +
 .../plugins/org.eclipse.ui/schema/commands.exsd    |    4 +-
 .../org.eclipse.ui/schema/exportWizards.exsd       |   85 +-
 .../org.eclipse.ui/schema/importWizards.exsd       |   85 +-
 eclipse/plugins/org.eclipse.ui/schema/intro.exsd   |   15 +-
 .../plugins/org.eclipse.ui/schema/keywords.exsd    |   17 +-
 eclipse/plugins/org.eclipse.ui/schema/menus.exsd   |   57 +-
 .../plugins/org.eclipse.ui/schema/newWizards.exsd  |   89 +-
 .../plugins/org.eclipse.ui/schema/popupMenus.exsd  |  196 +-
 .../org.eclipse.ui/schema/preferenceTransfer.exsd  |   45 +-
 .../org.eclipse.ui/schema/propertiesView.exsd      |  111 +
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../update/configurator/ConfiguratorUtils.java     |    6 +-
 .../configurator/IPlatformConfiguration.java       |    6 +-
 .../IPlatformConfigurationFactory.java             |    6 +-
 .../configurator/BundleGroupComponent.java         |    9 +-
 .../configurator/ConfigurationActivator.java       |   28 +-
 .../internal/configurator/ConfigurationParser.java |    6 +-
 .../configurator/PlatformConfiguration.java        |  259 +-
 .../update/internal/configurator/Utils.java        |    6 +-
 .../configurator/branding/IniFileReader.java       |    8 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.update.core.linux/src/update.c     |    4 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../src/make_ia64.bat                              |    2 +-
 .../org.eclipse.update.core/META-INF/MANIFEST.MF   |    2 +-
 eclipse/plugins/org.eclipse.update.core/plugin.xml |    7 +-
 .../eclipse/update/configuration/IActivity.java    |    6 +-
 .../update/configuration/IConfiguredSite.java      |    6 +-
 .../IConfiguredSiteChangedListener.java            |    6 +-
 .../configuration/IInstallConfiguration.java       |    6 +-
 .../IInstallConfigurationChangedListener.java      |    6 +-
 .../update/configuration/IInstallDeltaHandler.java |    5 +-
 .../eclipse/update/configuration/ILocalSite.java   |    6 +-
 .../configuration/ILocalSiteChangedListener.java   |    6 +-
 .../configuration/ILocalSystemInfoListener.java    |    6 +-
 .../update/configuration/IProblemHandler.java      |    6 +-
 .../update/configuration/ISessionDelta.java        |    3 +-
 .../org/eclipse/update/configuration/IVolume.java  |    6 +-
 .../update/configuration/LocalSystemInfo.java      |    6 +-
 .../org/eclipse/update/configuration/package.html  |    6 +-
 .../org/eclipse/update/core/ArchiveReference.java  |    6 +-
 .../eclipse/update/core/BaseFeatureFactory.java    |    6 +-
 .../eclipse/update/core/BaseInstallHandler.java    |    6 +-
 .../org/eclipse/update/core/BaseSiteFactory.java   |    6 +-
 .../src/org/eclipse/update/core/Category.java      |    6 +-
 .../org/eclipse/update/core/ContentReference.java  |    6 +-
 .../src/org/eclipse/update/core/Feature.java       |    4 +-
 .../update/core/FeatureContentProvider.java        |    6 +-
 .../org/eclipse/update/core/FeatureReference.java  |    6 +-
 .../org/eclipse/update/core/IArchiveReference.java |    6 +-
 .../src/org/eclipse/update/core/ICategory.java     |    6 +-
 .../org/eclipse/update/core/IContentConsumer.java  |    6 +-
 .../src/org/eclipse/update/core/IFeature.java      |    4 +-
 .../update/core/IFeatureContentConsumer.java       |    6 +-
 .../update/core/IFeatureContentProvider.java       |    6 +-
 .../org/eclipse/update/core/IFeatureFactory.java   |    6 +-
 .../org/eclipse/update/core/IFeatureReference.java |    6 +-
 .../src/org/eclipse/update/core/IImport.java       |    6 +-
 .../update/core/IIncludedFeatureReference.java     |    6 +-
 .../org/eclipse/update/core/IInstallHandler.java   |    6 +-
 .../eclipse/update/core/IInstallHandlerEntry.java  |    6 +-
 .../update/core/IInstallHandlerWithFilter.java     |    6 +-
 .../org/eclipse/update/core/INonPluginEntry.java   |    6 +-
 .../eclipse/update/core/IPlatformEnvironment.java  |    6 +-
 .../src/org/eclipse/update/core/IPluginEntry.java  |    6 +-
 .../src/org/eclipse/update/core/ISite.java         |    6 +-
 .../eclipse/update/core/ISiteContentProvider.java  |    6 +-
 .../src/org/eclipse/update/core/ISiteFactory.java  |    6 +-
 .../eclipse/update/core/ISiteFactoryExtension.java |    6 +-
 .../eclipse/update/core/ISiteFeatureReference.java |    6 +-
 .../org/eclipse/update/core/ISiteWithMirrors.java  |    8 +-
 .../src/org/eclipse/update/core/IURLEntry.java     |    6 +-
 .../org/eclipse/update/core/IUpdateConstants.java  |    6 +-
 .../eclipse/update/core/IVerificationListener.java |    6 +-
 .../eclipse/update/core/IVerificationResult.java   |    6 +-
 .../src/org/eclipse/update/core/IVerifier.java     |    6 +-
 .../src/org/eclipse/update/core/Import.java        |    6 +-
 .../update/core/IncludedFeatureReference.java      |    6 +-
 .../eclipse/update/core/InstallHandlerEntry.java   |    6 +-
 .../org/eclipse/update/core/InstallMonitor.java    |    6 +-
 .../eclipse/update/core/JarContentReference.java   |    6 +-
 .../update/core/JarEntryContentReference.java      |    6 +-
 .../org/eclipse/update/core/NonPluginEntry.java    |    6 +-
 .../src/org/eclipse/update/core/PluginEntry.java   |    6 +-
 .../src/org/eclipse/update/core/Site.java          |    6 +-
 .../eclipse/update/core/SiteContentProvider.java   |    6 +-
 .../eclipse/update/core/SiteFeatureReference.java  |    6 +-
 .../update/core/SiteFeatureReferenceModel.java     |    6 +-
 .../src/org/eclipse/update/core/SiteManager.java   |    6 +-
 .../src/org/eclipse/update/core/URLEntry.java      |    6 +-
 .../src/org/eclipse/update/core/Utilities.java     |    6 +-
 .../src/org/eclipse/update/core/Verifier.java      |    6 +-
 .../eclipse/update/core/VersionedIdentifier.java   |    6 +-
 .../update/core/model/ArchiveReferenceModel.java   |    6 +-
 .../eclipse/update/core/model/CategoryModel.java   |    6 +-
 .../update/core/model/ContentEntryModel.java       |    6 +-
 .../update/core/model/DefaultFeatureParser.java    |    6 +-
 .../update/core/model/DefaultSiteParser.java       |    6 +-
 .../eclipse/update/core/model/FeatureModel.java    |    4 +-
 .../update/core/model/FeatureModelFactory.java     |    6 +-
 .../update/core/model/FeatureReferenceModel.java   |    6 +-
 .../org/eclipse/update/core/model/ImportModel.java |    6 +-
 .../core/model/IncludedFeatureReferenceModel.java  |    6 +-
 .../update/core/model/InstallAbortedException.java |    6 +-
 .../core/model/InstallHandlerEntryModel.java       |    6 +-
 .../core/model/InvalidSiteTypeException.java       |    6 +-
 .../org/eclipse/update/core/model/ModelObject.java |    6 +-
 .../update/core/model/NonPluginEntryModel.java     |    8 +-
 .../update/core/model/PluginEntryModel.java        |    6 +-
 .../org/eclipse/update/core/model/SiteModel.java   |    6 +-
 .../update/core/model/SiteModelFactory.java        |    6 +-
 .../eclipse/update/core/model/URLEntryModel.java   |    6 +-
 .../src/org/eclipse/update/core/model/package.html |    4 +
 .../src/org/eclipse/update/core/package.html       |    4 +
 .../internal/core/InternalFeatureParser.java       |   39 +-
 .../update/internal/core/SiteStatusAnalyzer.java   |   85 +-
 .../eclipse/update/internal/core/UpdateCore.java   |    4 +-
 .../internal/operations/OperationValidator.java    |  711 +-
 .../update/internal/verifier/PlanVerifier.java     |   30 +
 .../eclipse/update/operations/IBatchOperation.java |    6 +-
 .../update/operations/IConfigFeatureOperation.java |    6 +-
 .../update/operations/IFeatureOperation.java       |    6 +-
 .../operations/IInstallFeatureOperation.java       |    6 +-
 .../org/eclipse/update/operations/IOperation.java  |    6 +-
 .../update/operations/IOperationFactory.java       |    6 +-
 .../update/operations/IOperationListener.java      |    6 +-
 .../update/operations/IOperationValidator.java     |    6 +-
 .../IReplaceFeatureVersionOperation.java           |    6 +-
 .../operations/IRevertConfigurationOperation.java  |    6 +-
 .../update/operations/IToggleSiteOperation.java    |    6 +-
 .../operations/IUnconfigFeatureOperation.java      |    6 +-
 .../operations/IUninstallFeatureOperation.java     |    6 +-
 .../operations/IUpdateModelChangedListener.java    |    6 +-
 .../update/operations/OperationsManager.java       |    6 +-
 .../src/org/eclipse/update/operations/package.html |    6 +-
 .../org/eclipse/update/search/BackLevelFilter.java |    6 +-
 .../src/org/eclipse/update/search/BaseFilter.java  |    6 +-
 .../eclipse/update/search/EnvironmentFilter.java   |    6 +-
 .../update/search/IQueryUpdateSiteAdapter.java     |    6 +-
 .../update/search/IUpdateSearchCategory.java       |    6 +-
 .../eclipse/update/search/IUpdateSearchFilter.java |    6 +-
 .../eclipse/update/search/IUpdateSearchQuery.java  |    6 +-
 .../search/IUpdateSearchResultCollector.java       |    6 +-
 .../IUpdateSearchResultCollectorFromMirror.java    |    6 +-
 .../eclipse/update/search/IUpdateSearchSite.java   |    6 +-
 .../eclipse/update/search/IUpdateSiteAdapter.java  |    6 +-
 .../eclipse/update/search/UpdateSearchRequest.java |    6 +-
 .../eclipse/update/search/UpdateSearchScope.java   |    6 +-
 .../update/search/VersionedIdentifiersFilter.java  |    6 +-
 .../src/org/eclipse/update/search/package.html     |    7 +-
 .../eclipse/update/standalone/AddSiteCommand.java  |    6 +-
 .../org/eclipse/update/standalone/CmdLineArgs.java |    6 +-
 .../eclipse/update/standalone/DisableCommand.java  |    6 +-
 .../eclipse/update/standalone/EnableCommand.java   |    6 +-
 .../eclipse/update/standalone/InstallCommand.java  |    6 +-
 .../update/standalone/ListFeaturesCommand.java     |    6 +-
 .../update/standalone/RemoveSiteCommand.java       |    6 +-
 .../eclipse/update/standalone/ScriptedCommand.java |    6 +-
 .../eclipse/update/standalone/SearchCommand.java   |    6 +-
 .../standalone/StandaloneUpdateApplication.java    |    6 +-
 .../update/standalone/UninstallCommand.java        |    6 +-
 .../eclipse/update/standalone/UpdateCommand.java   |    6 +-
 .../src/org/eclipse/update/standalone/package.html |    6 +-
 .../META-INF/MANIFEST.MF                           |    2 +-
 .../org.eclipse.update.ui/META-INF/MANIFEST.MF     |    2 +-
 eclipse/plugins/org.eclipse.update.ui/plugin.xml   |    7 +-
 .../src/org/eclipse/update/ui/UpdateJob.java       |    3 +-
 .../src/org/eclipse/update/ui/UpdateManagerUI.java |    3 +-
 eclipse/plugins/org.junit4/.classpath              |    1 -
 eclipse/plugins/org.junit4/META-INF/MANIFEST.MF    |   29 +-
 eclipse/plugins/org.junit4/about.html              |   57 +-
 eclipse/plugins/org.junit4/build.properties        |   11 +-
 .../plugins/org.junit4/customBuildCallbacks.xml    |  161 -
 .../META-INF/ECLIPSEF.RSA                          |  Bin 5641 -> 0 bytes
 .../META-INF/ECLIPSEF.SF                           |   20 -
 .../META-INF/MANIFEST.MF                           |   29 -
 .../plugin.properties                              |   13 -
 .../META-INF/ECLIPSEF.RSA                          |  Bin 0 -> 5639 bytes
 .../META-INF/ECLIPSEF.SF                           |   20 +
 .../META-INF/MANIFEST.MF                           |   29 +
 .../META-INF/eclipse.inf                           |    0
 .../about.html                                     |    0
 .../about_files/cpl-v10.html                       |    0
 .../plugin.properties                              |   13 +
 .../META-INF/ECLIPSEF.RSA                          |  Bin 0 -> 5639 bytes
 .../META-INF/ECLIPSEF.SF                           |   20 +
 .../META-INF/MANIFEST.MF                           |   46 +
 .../META-INF/eclipse.inf                           |    0
 .../about.html                                     |   90 +
 .../about_files}/cpl-v10.html                      |    0
 .../plugin.properties                              |   13 +
 eclipse/sourceReferences.properties                |  301 +
 extract_patterns.txt                               |    1 +
 jdtdependencies.properties                         |    1 +
 jdtnonosgidependencies.properties                  |    3 +
 junitHelper.xml                                    |    8 +-
 nonosgidependencies.properties                     |   41 +-
 patches/bz318912.patch                             |   20 +
 patches/bz319476-compile-jar-in-jar-loader.patch   |  197 +
 .../donotsetjavahomeandoptimizeliblocalfile.patch  |   29 +-
 patches/donotstorebuildlogsinfiles.patch           |   51 +-
 patches/droppluginversions.patch                   |   65 -
 patches/eclipse-add-archs-executable.patch         |   47 +-
 patches/eclipse-add-archs-filesystem.patch         |   10 +-
 patches/eclipse-add-archs-swt.patch                |   14 +-
 patches/eclipse-add-ppc64-sparc64-s390-s390x.patch |   21 +-
 patches/eclipse-addArchesAnd64bitSWT.patch         |   22 +-
 patches/eclipse-buildswtnatives.patch              |   87 +-
 patches/eclipse-no-jetty5.patch                    |    4 -
 .../eclipse-nosourcebundlesfordependencies.patch   |   35 +-
 patches/eclipse-pde.build-add-package-build.patch  |   36 +-
 patches/eclipse-removeSkipMapsCheck.patch          |   16 +
 patches/eclipse-swt-buildagainstxulrunner.patch    |   10 +-
 patches/eclipse-swt-compile-xpt.patch              |   31 -
 patches/eclipse-use-newer-commons-codec.patch      |   22 +-
 patches/gnomeproxy-makefile.patch                  |   14 +-
 patches/java-home.patch                            |   15 +
 patches/junit4-nochecksum.patch                    |   22 +
 patches/no-gnome-vfs.patch                         |   96 +
 patches/osgi-services-build.patch                  |   58 -
 patches/osgi-util.patch                            |   20 -
 patches/tests-nop2discoverytests.patch             |   25 +
 patches/tests-org.eclipse.ant.tests.core.patch     |   27 +
 patches/tests-org.eclipse.ant.tests.ui.patch       |   51 +
 ...e.pde.ui.tests-LocalTargetDefinitionTests.patch |   21 +
 patches/tooltip-color.patch                        |   47 -
 patches/webkitgtk.patch                            |   11 +
 pdebuild.properties                                |   44 +-
 pdebuild.xml                                       |   17 +-
 pdebuild/eclipse-pdebuild.sh                       |   42 +-
 publishProduct.xml                                 |    3 +-
 regenerateBootstrapFiles.sh                        |   30 +-
 runtests.sh                                        |  146 +-
 sdkdependencies.properties                         |    1 +
 stubs/org/eclipse/core/runtime/CoreException.java  |    4 -
 stubs/org/eclipse/core/runtime/IExtension.java     |    2 -
 .../org/eclipse/core/runtime/IExtensionPoint.java  |    2 -
 stubs/org/eclipse/core/runtime/ILibrary.java       |    2 -
 stubs/org/eclipse/core/runtime/IPath.java          |    2 -
 .../eclipse/core/runtime/IPluginPrerequisite.java  |    2 -
 stubs/org/eclipse/core/runtime/Plugin.java         |    2 -
 .../core/runtime/PluginVersionIdentifier.java      |    2 -
 9263 files changed, 439274 insertions(+), 260542 deletions(-)

diff --git a/ABOUT.mediawiki b/ABOUT.mediawiki
deleted file mode 100644
index 8bc0aa8..0000000
--- a/ABOUT.mediawiki
+++ /dev/null
@@ -1,28 +0,0 @@
-'''About building the Eclipse SDK''' 
-
-Building the Eclipse SDK is not a simple process. You can not simply download a
-tarball from eclipse.org and build it. There are a lot of manual interactions 
-needed.
-
-'''About eclipse-build''' 
-
-With eclipse-build we hope to simplify the build significantly.
-Current plan is to create:
-# Working ant build.
-# Common place and infrastructure for storing/applying patches needed for clean build on various Linux distributions.
-# Standardize the usage of system libraries. 
-
-'''Patches and Bugs'''
-
-We are always open to patches to document, clean up, or improve our process.  Please open a bug against Technology -> Linux Tools -> Packaging Tools with an attached patch.  Please put "[eclipse-build]" at the start of the bug title.  Here is a link to follow to open a bug:
-
-http://preview.tinyurl.com/eclipse-build-bug
-
-The current list of open bugs is available via this query:
-
-http://preview.tinyurl.com/eclipse-build-openbugs
-
-'''Current status'''
-
-As of 2009-06-22, it is possible to build the Eclipse SDK entirely from a tarball of the sources.  The build procedure is ''very'' similar to 
-what is done by the upstream release engineers.  The resulting provisioned SDK can be run and have additional software installed into it.  See README.mediawiki for more information.
\ No newline at end of file
diff --git a/ChangeLog b/ChangeLog
index e4bc5d2..1e78614 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,452 @@
+2011-03-28  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* patches/webkitgtk.patch: Change patch to use pkg-config instead of hardcoding options.
+	
+2011-03-28  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* patches/no-gnome-vfs.patch: New file.
+	* build.xml: Apply patch to fix working without gnome-vfs.
+
+2011-03-16  Stephen Shaw <sshaw at decriptor.com>
+
+	* build.properties:
+	* pdebuild.properties: accounts for jvm being in
+	/usr/lib64 on 64bit machines
+
+2011-03-11  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* buildEclipseBuildSource.sh: Adapt for the move to git.
+
+2011-03-09  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* build.xml: Override files when symlinking.
+
+2011-03-07 Alexander Kurtakov  <akurtako at redhat.com>
+
+	* buildSDKSource.sh: Cleanup temp resources.
+
+2011-01-19  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Aggregate test results with proper JUNIT.XSL.
+
+2011-01-18  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #334716
+
+	* build.xml: Provision SDK and test framework for use by tests.
+	* runtests.sh: Use SDK and test framework provisioned by build.xml.
+
+2011-01-11  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #319476
+
+	* patches/bz319476-compile-jar-in-jar-loader.patch: Backport patch to
+	build jar-in-jar-loader in JDT UI (bz324794).
+	* build.xml: Add patch to build jar-in-jar-loader.
+
+2010-12-10  Severin Gehwolf <sgehwolf at redhat.com>
+
+	* patches/eclipse-help-webapps-xss-BZ329582.patch: Backport patch for XSS vulnerability
+	  of org.eclipse.help.webapp.
+	* build.xml: Add backport patch to applyPatches target.
+
+2010-10-26  Severin Gehwolf <sgehwolf at redhat.com>
+
+	* patches/eclipse-pde.build-add-package-build.patch: Fix the
+	  patch. Earlier version produced syntax errors such as:
+	  'prepare-build-dir.sh: line 60: [: argument expected'
+
+2010-10-02  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* build.properties: Update for 3.6.1.
+	* build.xml: Better fail messages.
+	* pdebuild.properties: Update for 3.6.1
+
+2010-10-01  Alexander Kurtakov  <akurtako at redhat.com>
+    Update buildSDKSource.sh for 3.6.1 release. (Chris Aniszczyk bz#326597)
+	* patches/eclipse-removeSkipMapsCheck.patch: New file.
+	* buildSDKSource.sh: Update to 3.6.1.
+
+2010-08-23  Roland Grunberg  <rgrunber at redhat.com>
+
+	* runtests.sh: Remove org.junit4/ and junit4.jar during the launch of the
+	o.e.pde.ui.tests. They are recognized as plugins but not as bundles.
+	This causes some failures.
+
+2010-08-17  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Use ${label} instead of "3.5.2" for SWT JAR
+	symlinks.  Pass in profile to use when installing.  Further
+	clean installation of build path references.  Apply patch from
+	Benjamin Drung to clean up some of these references (bug
+	#322283).
+
+2010-08-17  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #294114
+
+	* build.xml: New target 'provisionSDKinDropins' which copies JDT
+	and SDK into the dropins directory of the installation.  New
+	target 'installPlatformAndCVS' which wraps provision.cvs and
+	install.
+	* jdtnonosgidependencies.properties: Re-name from
+	sdknonosgidependencies.properties.
+	* sdknonosgidependencies.properties: Renamed.
+	* jdtdependencies.properties: New file.  OSGi dependencies
+	present in the JDT but not the Platform.
+	* sdkdependencies.properties: Move JDT bits to
+	jdtdependencies.properties.
+
+2010-08-11  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Make symlink to eclipse.ini absolute again to
+	please our Debian friends.
+
+2010-08-11  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #293731
+
+	* build.xml: Add ability to provision just the platform or just the
+	platform and the CVS feature (default is still entire SDK).  Parametrize
+	JUnit4 JAR location.  Replace @qualifier@ also in platform.product since
+	we're using it now.  No longer copy content.{xml,jar} over for debugging
+	during publishing.  Extract publishing of SDK into a common target that
+	can be used by other publishing tasks.  Extract provisioning of SDK into
+	common target.  Add installPlatform/installPlatformAndCVS targets for
+	installing just the platform/platform+CVS.
+	* publishProduct.xml: Parametrize the product file to use.
+	* sdknonosgidependencies.properties: New file.  Non-OSGi dependencies
+	present in the SDK but not the platform.
+	* sdkdependencies.properties: New file.  OSGi dependencies present in the
+	SDK but not the platform.
+	* nonosgidependencies.properties: Strip SDK-only dependencies.
+	* dependencies.properties: Likewise.
+
+2010-08-11  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Make symlink to eclipse.ini relative.
+	* Xvnc.cfg: Add to svn:ignore.
+
+2010-08-09  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Apply ant core and UI test patch to not be so strict with
+	ant -version output.
+
+2010-08-06  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #286825
+
+	* patches/donotstorebuildlogsinfiles.patch: Output SWT build information
+	to stdout and not a log file (Niels Thykier).
+
+2010-08-04  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #321612
+
+	* build.xml: Add ability to pass through -v and -d flags to runtests.sh.
+	Use -DdebugTests=true or -DverboseTests=true.
+	* runtests.sh: Add verbose option (-v).  Pass -data option to test runs.
+
+2010-08-04  Andrew Overholt  <overholt at redhat.com>
+ 
+	Bug #321660
+
+	* build.xml: Remove sdk-tests.properties in clean-sdk task and tests_* in
+	distclean task.  Clean up formatting a bit. 
+
+2010-08-03  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #321284
+
+	* build.xml: Set installation directory after resolving libdir.
+
+2010-07-29  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #319479
+
+	* patches/eclipse-swt-compile-xpt.patch: New file.  Patch from Benjamin
+	Drung to build .xpt file for SWT.
+	* build.xml: Apply above patch.
+
+2010-07-28  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Use bootstrap JARs to build Equinox Initializer.
+
+2010-07-28  Andrew Overholt  <overholt at redhat.com>
+
+	* runtests.sh: Properly canonicalize test build and installation
+	directories.
+
+2010-07-28  Andrew Overholt  <overholt at redhat.com>
+
+	* build.properties: Property-ify test framework.
+	* build.xml: Use variables for provision and installation directories.
+	Build Equinox Initializer application in build target and not in
+	provision.sdk target.  Pass tests build directory and provisioned SDK
+	directory to runtests.sh.
+	* runtests.sh: Take passed-in tests build directory and provisioned SDK
+	directory.  Pass testframework variable to runtests.sh.
+	* junitHelper.xml: Use property of testframework.
+
+2010-07-28  Andrew Overholt  <overholt at redhat.com>
+
+	* build.xml: Fix version of org.eclipse.test (3.2.0 -> 3.3.0).
+	* junitHelper.xml: Likewise.
+	* runtests.sh: Likewise.
+	* sdk-tests.properties: Add to svn:ignore.
+	* tests_*: Add to svn:ignore.
+
+2010-07-23  Andrew Overholt  <overholt at redhat.com>
+
+	* dependencies.properties: 
+	* junitHelper.xml: 
+	* runtests.sh: 
+	* patches/tests-nop2discoverytests.patch: New file.  Don't build the p2
+	discovery tests since that feature isn't part of the SDK.
+	* patches/org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch: Removed.
+	* patches/tests-org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch:
+	Renamed to clarify that it's a patch for the tests. 
+	* build.xml: Correct typo with LocationTargetDefinitionTests patch name.
+	
+2010-07-27  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #295098
+
+	* patches/org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch: New
+	file.  Patch out checking for source bundles not likely to be present in
+	distros.
+	* build.xml: Apply above patch to tests.
+	* symlinks-stamp: Add to svn:ignore.
+	* task-bin: Likewise.
+
+2010-07-27  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #320328
+
+	* pdebuild.xml: Use ${label} instead of hard-coding "3.5.0".
+	* build.xml: Use PDE Build of built SDK to build SDK tests.
+	
+
+2010-07-19  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #319110
+
+	* build.xml: Apply patch from Benjamin Drung to rename some ant targets
+	(distclean -> clean, clean -> clean-sdk).  "distclean" now removes *.log.
+
+2010-07-19  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #319473
+
+	* build.xml: Apply patch from Benjamin Drung to extract SWT .so files.
+	* extract_patterns.txt: New file.  Filename patterns to extract
+	("initialize") from bundle JARs. 
+
+2010-07-14  Andrew Overholt  <overholt at redhat.com>
+
+	* additionalArchs/rename.sh: Add svn:executable property.
+	* pdebuild/eclipse-copy-platform.sh: Likewise.
+	* regenerateBootstrapFiles.sh: Likewise.
+	* runtests.sh: Likewise.
+	* swt_bundle.sh: Likewise.
+
+2010-07-14  Andrew Overholt  <overholt at redhat.com>
+ 
+	Bug #319474
+
+	* patches/eclipse-pde.build-add-package-build.patch: Apply patch from
+	Adnan Hodzic to remove bash-isms from prepare-build-dir.sh.
+
+2010-07-08  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* patches/bz318912.patch: New file.
+	* build.xml: Apply the new patch.
+
+2010-07-07  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* build.xml: Fix strip of the patch.
+	* patches/junit4-nochecksum.patch: Rediff patch.
+	
+
+2010-07-07  Alexander Kurtakov  <akurtako at redhat.com>
+    Remove mediawiki pages which are outdated.
+	* ABOUT.mediawiki: Removed.
+	* README.mediawiki: Removed.
+	* TODO.mediawiki: Removed.
+	
+2010-07-07  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* build.sh: Removed.
+	* build.xml: Save output to log file.
+
+2010-07-06  Alexander Kurtakov  <akurtako at redhat.com>
+    Fix for bz#317391 (Benjamin Drung).
+	* build.properties: Remove buildArch it's autoset by buildscript.
+	* build.sh: Remove buildArch checking code.
+	* build.xml: Determine buildArch by ant.
+	
+2010-07-06  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* regenerateBootstrapFiles.sh: Let launcher dir be a parameter.
+
+2010-07-05  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* buildSDKSource.sh: Remove *.orig files. (Benjamin Drung bz#316525)
+	
+2010-07-05  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* patches/java-home.patch: New file.
+	* build.xml: Do not blindly override JAVA_HOME.
+	* dependencies.properties:  Add icu4j for Debian (Benjamin Drung).
+	
+2010-07-05  Alexander Kurtakov  <akurtako at redhat.com>
+    Refresh all patches. (Benjamin Drung)
+	* build.xml: Make every patch applies in build directory.
+	* dependencies.properties: Remove my testing leftovers.
+	* patches/donotsetjavahomeandoptimizeliblocalfile.patch: Update patch for Helios. 
+	* patches/donotstorebuildlogsinfiles.patch: Likewise.
+	* patches/eclipse-add-archs-executable.patch: Likewise.
+	* patches/eclipse-add-archs-filesystem.patch: Likewise.
+	* patches/eclipse-add-archs-swt.patch: Likewise.
+	* patches/eclipse-add-ppc64-sparc64-s390-s390x.patch: Likewise. 
+	* patches/eclipse-addArchesAnd64bitSWT.patch: Likewise.
+	* patches/eclipse-buildswtnatives.patch: Likewise.
+	* patches/eclipse-no-jetty5.patch: Likewise.
+	* patches/eclipse-nosourcebundlesfordependencies.patch: Likewise. 
+	* patches/eclipse-pde.build-add-package-build.patch: Likewise.
+	* patches/eclipse-swt-buildagainstxulrunner.patch: Likewise.
+	* patches/eclipse-use-newer-commons-codec.patch: Likewise.
+	* patches/gnomeproxy-makefile.patch: Likewise.
+	* patches/junit4-nochecksum.patch: Likewise.
+	* patches/osgi-util.patch: Likewise.
+
+2010-06-23  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* dependencies.properties: Fix jetty and jetty utils lists.
+
+2010-06-11  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* patches/swt_webkit.patch: Removed. Applied upstream.
+	* bootstrap/configuration/config.ini: Start o.e.e.event.
+	* build.xml: Drop patch applied upstream. Don't unzip o.e.e.util/src.zip it's done by the buildSDKSource.sh now.
+
+2010-06-10  Andrew Overholt  <overholt at redhat.com>
+
+	* build.properties: Update release ID.
+	* buildSDKSource.sh: Update release ID.  Unpack osgi.util src.zip into
+	osgi.util/src.
+
+2010-06-10  Andrew Overholt  <overholt at redhat.com>
+
+	* dependencyManifests/org.apache.commons.codec_1.3.0.v20080530-1600.jar/META-INF/MANIFEST.MF:
+	Update to latest SDK-included dependency manifest.
+	* dependencyManifests/org.apache.commons.el_1.0.0.v200806031608.jar/META-INF/MANIFEST.MF:
+	Likewise. 
+	* dependencyManifests/org.apache.jasper_5.5.17.v200903231320.jar/META-INF/MANIFEST.MF:
+	Likewise. 
+
+2010-06-10  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* build.xml: Unzip o.e.equinox.osgi.util src.zip.
+	* nonosgidependencies.properties: Fix junit names.
+	
+2010-06-10  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* dependencyManifests/com.ibm.icu_4.2.1.v20100212.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.apache.commons.logging_1.0.4.v200904062259.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.apache.lucene.analysis_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.apache.lucene_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.mortbay.jetty.server_6.1.15.v200905151201.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.mortbay.jetty.util_6.1.15.v200905182336.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.sat4j.pb_2.2.0.v20100225.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/com.ibm.icu_4.2.1.v20100412.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.apache.commons.logging_1.0.4.v201005080501.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.apache.lucene.analysis_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.apache.lucene_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.mortbay.jetty.server_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.mortbay.jetty.util_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.sat4j.core_2.2.0.v20100429.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.sat4j.pb_2.2.0.v20100429.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.apache.commons.httpclient_3.1.0.v201005080502.jar/META-INF/MANIFEST.MF: New file.
+	* build.xml: Fix source preparations.
+	* dependencies.properties: Update to new deps.
+	* nonosgidependencies.properties: Update to new deps.
+	* eclipse-build-generatedScripts.tar.bz2: Regenerated.
+	* patches/eclipse-use-newer-commons-codec.patch: Reset other deps versions too.
+	* pdebuild.xml: Add apache commons to bootstrap.
+
+2010-05-27 Alexander Kurtakov    <akurtako at redhat.com>
+
+	* patches/osgi-util.patch: New patch fixing o.e.osgi.util build from source. (Author: Niels Thykier)
+	* build.xml: Apply the patch.
+
+2010-04-22  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* patches/swt_webkit.patch: New file.
+	* build.xml: Apply webkit patch.
+	* patches/eclipse-buildswtnatives.patch: Add webkit sources.
+
+2010-04-21  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* build.xml: Adapt to the new source tarball structure. Ecf-src is where it belongs to.
+	There is no need to trouble with bootstrap/p2 content. 
+	
+2010-04-21  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* buildSDKSource.sh: New I-build. Put ecf in the main plugins/features directories.
+
+2010-04-21  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* patches/junit4-nochecksum.patch: New file.
+	* build.xml: Apply junit4 checksum patch and remove all checksum files.
+
+2010-04-20  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* bootstrap/configuration/config.ini: Add equinox.ds and deps. 
+	* pdebuild.xml: Likewise.
+
+2010-04-19  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* dependencyManifests/com.ibm.icu_4.0.1.v20090822.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/javax.servlet_2.5.0.v200806031605.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.objectweb.asm_3.1.0.v200803061910.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.sat4j.core_2.1.1.v20090825.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/org.sat4j.pb_2.1.1.v20090825.jar/META-INF/MANIFEST.MF: Removed.
+	* dependencyManifests/com.ibm.icu_4.2.1.v20100212.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/javax.servlet_2.5.0.v200910301333.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.objectweb.asm_3.2.0.v200909071300.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.sat4j.core_2.2.0.v20100225.jar/META-INF/MANIFEST.MF: New file.
+	* dependencyManifests/org.sat4j.pb_2.2.0.v20100225.jar/META-INF/MANIFEST.MF: New file.
+	* bootstrap/configuration/config.ini: Add org.hamcrest.core to the list of bundles to load.
+	* build.properties: Update for 3.6.
+	* build.xml: Likewise.
+	* dependencies.properties: Likewise.
+	* eclipse-build-generatedScripts.tar.bz2: Regenerated.
+	* nonosgidependencies.properties: Likewise.
+	* patches/donotsetjavahomeandoptimizeliblocalfile.patch: Likewise.
+	* patches/donotstorebuildlogsinfiles.patch: Likewise.
+	* patches/eclipse-add-archs-executable.patch: Likewise.
+	* patches/eclipse-add-ppc64-sparc64-s390-s390x.patch: Likewise.
+	* patches/eclipse-addArchesAnd64bitSWT.patch: Likewise.
+	* patches/eclipse-buildswtnatives.patch: Likewise.
+	* patches/gnomeproxy-makefile.patch: Likewise.
+	* pdebuild.properties: Likewise.
+	* pdebuild.xml: Likewise.
+	* regenerateBootstrapFiles.sh: Likewise. 
+
+2010-04-13  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* buildSDKSource.sh: Make it generate 3.6 stream tarballs.
+
+2010-03-18  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* buildEclipseBuildSource.sh: Produce bzipped tarballs.
+	
 2010-03-18  Alexander Kurtakov  <akurtako at redhat.com>
 
-	* patches/droppluginversions.patch: New file.
-	* build.xml: Apply patch to match upstream qualifiers.
+	* patches/droppluginversions.patch: New file..
+	* build.xml: Apply patch to match upstream 3.5.2 qualifiers.
 
 2010-03-12  Andrew Overholt  <overholt at redhat.com>
 
diff --git a/README.mediawiki b/README.mediawiki
deleted file mode 100644
index a51157a..0000000
--- a/README.mediawiki
+++ /dev/null
@@ -1,24 +0,0 @@
-This project should provide a simplified build for the Eclipse SDK on Linux 
-distributions.  The current state is producing a usable eclipse build under build/(build Id)/installation. 
-Tasks completed so far:
-# Build pdebuild-ant and its dependencies in the directory bootstrap/plugins (not yet enabled by default)
-# Generate source tarball of entire Eclipse SDK and required other files (buildSDKSource.sh)
-# All plugins and features of org.eclipse.sdk built
-# Use p2 publisher to create metadata for all built components
-# Provision org.eclipse.sdk using p2 director
-
-To test it do the following:
-
-<!-- FIXME:  Include SVN instructions as an alternative -->
-* generate source using <tt>./buildSource.sh</tt> (alternatively, look for 3.5.1 sources here:  http://download.eclipse.org/technology/linuxtools/eclipse-build/ -- get the tarball for 3.5.1:  eclipse-R3_5_1-fetched-src.tar.bz2 and verify its md5sum matches)
-** <tt>./buildSource.sh -workdir /tmp/eclipseSDKBuild</tt>
-* if you are using pre-generated source tarballs, check out basebuilder:
-** <tt>mkdir -p /tmp/eclipseSDKBuild; cd /tmp/eclipseSDKBuild; cvs -d:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse co -r R35_M7 org.eclipse.releng.basebuilder</tt>
-* ensure the directory in which you are running the build contains the generated source tarball of the Eclipse SDK: eclipse-I20090611-1540-fetched-src.tar.bz2 .  A symlink is also acceptable.
-* run the build using an existing basebuilder checkout ('''note''':  YOUR_ARCH should be in the way eclipse defines archs, e.g i*86 becomes x86, x86_64 is the same.  We have yet to test with other archs.  Any help is welcome.)
-** <tt>java -jar <basebuilder>/plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar -consolelog -data $(pwd)/baseworkspace -Duser.home=$(pwd)/userhome -application org.eclipse.ant.core.antRunner -DbuildArch=YOUR_ARCH -DbaseBuilder=<basebuilder> -Dlauncher=<basebuilder>/plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar -Declipse.pdebuild.scripts=<basebuilder>/plugins/org.eclipse.pde.build_3.5.0.v20090430-1420 -DskipFetch=true 2>&1 | tee build.log</tt>
-
-You should get:
-<!-- Not anymore.  We need to fix this.
-* all the dependencies of pdebuild-ant in the bootstrap/plugins folder. -->
-* working Eclipse SDK 3.5.1 build in build/(build Id)/installation directory
\ No newline at end of file
diff --git a/TODO.mediawiki b/TODO.mediawiki
deleted file mode 100644
index 3a0c55b..0000000
--- a/TODO.mediawiki
+++ /dev/null
@@ -1,18 +0,0 @@
-Eclipse-build aims at ease the building of the Eclipse SDK especially for Linux distributions. 
-
-'''Detailed TODO:'''
-* Fix broken features build.xml caused by source features/plugins generation. 
-Workaround for now: Copy back the original after generation is done.
-* Migrate plugins with custom build.xml files to customCallbacks.
-* Check naming of org.eclipse.equinox.http.jetty_1.1.0 with upstream. Version should 
-not be part of the name. According to Kim Moir there are 2 equino.http.jetty plugins used in different
-part of the build problem.
-* Hook native compilation in the build.xml.
-* Add a target to create an all-in-one tarball - srcIncluded zip, patches, missing bundles from srcIncluded and the build scripts 
-
-'''Overall PLAN:'''
-# Create a working build with upstream srcIncluded build.
-# Create a script to fetch sources from cvs.
-# Fix to properly build with the fetched sources.
-# Put all patches we have in Fedora srpm here so other distros can easily reuse them.
-Others are welcome.
\ No newline at end of file
diff --git a/additionalArchs/rename.sh b/additionalArchs/rename.sh
old mode 100644
new mode 100755
diff --git a/bootstrap/configuration/config.ini b/bootstrap/configuration/config.ini
index 6978511..134afb1 100644
--- a/bootstrap/configuration/config.ini
+++ b/bootstrap/configuration/config.ini
@@ -4,7 +4,7 @@ osgi.bundles=com.ibm.icu,\
              org.eclipse.core.contenttype,\
              org.eclipse.core.jobs,\
              org.eclipse.core.net,\
-             org.eclipse.core.runtime at start,\
+             org.eclipse.core.runtime at 2:start,\
              org.eclipse.core.runtime.compatibility.auth,\
              org.eclipse.core.variables,\
              org.eclipse.ecf,\
@@ -13,6 +13,8 @@ osgi.bundles=com.ibm.icu,\
              org.eclipse.ecf.identity,\
              org.eclipse.equinox.app,\
              org.eclipse.equinox.common at 2:start,\
+             org.eclipse.equinox.ds at 2:start,\
+             org.eclipse.equinox.event at 2:start,\
              org.eclipse.equinox.frameworkadmin,\
              org.eclipse.equinox.frameworkadmin.equinox,\
              org.eclipse.equinox.launcher,\
@@ -20,7 +22,6 @@ osgi.bundles=com.ibm.icu,\
              org.eclipse.equinox.p2.artifact.repository,\
              org.eclipse.equinox.p2.core,\
              org.eclipse.equinox.p2.console,\
-             org.eclipse.equinox.p2.exemplarysetup,\
              org.eclipse.equinox.p2.garbagecollector,\
              org.eclipse.equinox.p2.jarprocessor,\
              org.eclipse.equinox.p2.metadata,\
@@ -39,6 +40,7 @@ osgi.bundles=com.ibm.icu,\
 		     org.eclipse.equinox.p2.repository.tools,\
 		     org.eclipse.equinox.p2.touchpoint.eclipse,\
 		     org.eclipse.equinox.p2.touchpoint.natives,\
+		     org.eclipse.equinox.util,\
              org.eclipse.pde.build,\
              org.eclipse.update.configurator,\
              org.eclipse.update.core,\
@@ -56,6 +58,7 @@ osgi.bundles=com.ibm.icu,\
              org.eclipse.equinox.http.servlet,\
              javax.servlet,\
              org.eclipse.pde.core,\
+             org.eclipse.swt,\
              org.eclipse.core.filesystem,\
 		     org.eclipse.core.resources,\
 		     org.eclipse.core.commands,\
@@ -69,7 +72,8 @@ osgi.bundles=com.ibm.icu,\
 		     org.eclipse.jdt.debug,\
 		     org.eclipse.jdt.launching,\
 		     org.eclipse.pde.api.tools,\
-		     org.objectweb.asm
+		     org.objectweb.asm,\
+		     org.hamcrest.core
 osgi.install.area=.
 
 eof=eof
diff --git a/build.properties b/build.properties
index 41a89a3..741f1aa 100644
--- a/build.properties
+++ b/build.properties
@@ -1,15 +1,17 @@
 #baseLocation=${basedir}/bootstrap
 # Note:  this is also in pdebuild.properties
-buildId=M20100211-1343
-buildTag=vM20100211-1343
-label=3.5.2
-testsBuildLabel=3.5.2
+buildId=M20110210-1200
+buildTag=vI20100603-1500
+label=3.6.2
+testsBuildLabel=3.6.2
+testframework=org.eclipse.test_3.3.0
 p2.director.version=${testsBuildLabel}
 testsBuildId=v20100211
 featureToBuild=eclipse-build-feature
 skipBase=true
 skipFetch=true
 individualSourceBundles=true
+buildArch=x86
 ws=gtk
 os=linux
 includeLaunchers=true
@@ -17,6 +19,7 @@ runPackager=true
 groupConfigurations=true
 p2.gathering=true
 generate.p2.metadata=true
+p2.generate.metadata=true
 p2.metadata.repo = file:${repo}
 p2.artifact.repo = file:${repo}
 p2.flavor = tooling
@@ -26,7 +29,7 @@ generateAPIDescription=false
 collectingFolder=eclipse
 archivePrefix=eclipse
 generateFeatureVersionSuffix=true
-bootclasspath=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
+bootclasspath=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
 build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
 JavaSE-1.6=${bootclasspath}
 CDC-1.0/Foundation-1.0=${bootclasspath}
@@ -47,21 +50,21 @@ CDC-1.0/PersonalJava-1.0=${bootclasspath}
 CDC-1.1/PersonalBasis-1.1=${bootclasspath}
 CDC-1.1/PersonalJava-1.1=${bootclasspath}
 # Somehow bootclasspath isn't expanded when used by antRunner
-JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/Foundation-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/Foundation-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-JRE-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.3=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.4=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.5=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-PersonalJava-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/PersonalBasis-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/PersonalJava-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/PersonalBasis-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
+JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/Foundation-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/Foundation-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+JRE-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.3=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.4=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.5=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+PersonalJava-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/PersonalBasis-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/PersonalJava-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/PersonalBasis-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 53808ac..0000000
--- a/build.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-if `uname -m > /dev/null 2>&1`; then
-	arch=`uname -m`
-else
-	arch=`uname -p`
-fi
-
-# Massage arch for Eclipse-uname differences
-case ${arch} in
-	arm*)
-		arch=arm ;;
-	i[0-9]*86)
-		arch=x86 ;;
-	ia64)
-		arch=ia64 ;;
-	mips*)
-		if which dpkg-architecture >/dev/null 2>&1; then
-			arch=`dpkg-architecture -qDEB_HOST_ARCH`
-		fi ;;
-	parisc*)
-		arch=PA_RISC ;;
-	ppc)
-		arch=ppc ;;
-	ppc64)
-		arch=ppc64 ;;
-	x86_64)
-		arch=x86_64 ;;
-	sparc)
-		arch=sparc ;;
-	sparcv9)
-		arch=sparc ;;
-	sparc64)
-		arch=sparc64 ;;
-	*)
-		echo "Unrecognized architecture:  $arch" 1>&2
-		exit 1 ;;
-esac
-DATE=`date +%Y%m%d%H%M%S`
-
-ant -DbuildArch=${arch} 2>&1 | tee build_${DATE}.log
-EXIT_CODE=$?
-echo "Build log is available in build_${DATE}.log"
-exit $?
diff --git a/build.xml b/build.xml
index b938024..cf3d05d 100644
--- a/build.xml
+++ b/build.xml
@@ -1,4 +1,9 @@
 <project name="Eclipse SDK build" default="provision.sdk" basedir=".">
+	<tstamp>
+		<format property="timestamp" pattern="yyyyMMddHHmmss" />
+	</tstamp>
+	<record name="build_${timestamp}.log" />
+	<echo message="Build log is available in build_${timestamp}.log" />
 	<property name="baseBuilder" value="${basedir}/bootstrap" />
 	<property name="launcher" value="${basedir}/bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
 	<property name="eclipse.pdebuild.scripts" value="${basedir}/bootstrap/plugins/org.eclipse.pde.build/scripts" />
@@ -21,7 +26,7 @@
 		</or>
 	</condition>
 
-	<available file="${basedir}/debian/eclipse-build-generatedScripts.tar.bz2" property="scriptsPresent" value="true" />
+	<available file="eclipse-build-generatedScripts.tar.bz2" property="scriptsPresent" value="true" />
 	<available file="eclipse-sdktests-${label}-src.tar.bz2" property="testsSourcePresent" value="true" />
 	<available file="eclipse-sdktests-${label}-scripts.tar.bz2" property="testsScriptsPresent" value="true" />
 
@@ -31,14 +36,16 @@
 	<uptodate property="buildId.complete" srcfile="unpack-stamp" targetfile="buildId-stamp" />
 	<uptodate property="patch.complete" srcfile="unpack-stamp" targetfile="patch-stamp" />
 	<uptodate property="symlinks.complete" srcfile="patch-stamp" targetfile="symlinks-stamp" />
-	<uptodate property="prebootstrap.complete" srcfile="symlinks-stamp" targetfile="prebootstrap-stamp" />
 	<uptodate property="testspatch.complete" srcfile="testsunpack-stamp" targetfile="testspatch-stamp" />
 	<uptodate property="compilelibs.complete" srcfile="unpack-stamp" targetfile="compilelibs-stamp" />
 	<uptodate property="build.complete" srcfile="patch-stamp" targetfile="build-stamp" />
 	<uptodate property="p2prep.complete" srcfile="build-stamp" targetfile="p2prep-stamp" />
 	<uptodate property="testsbuild.complete" srcfile="testspatch-stamp" targetfile="testsbuild-stamp" />
+	<uptodate property="provision.platform.complete" srcfile="build-stamp" targetfile="provision.platform-stamp" />
+	<uptodate property="provision.cvs.complete" srcfile="build-stamp" targetfile="provision.cvs-stamp" />
 	<uptodate property="provision.sdk.complete" srcfile="build-stamp" targetfile="provision.sdk-stamp" />
 	<uptodate property="provision.tests.complete" srcfile="testsbuild-stamp" targetfile="provision.tests-stamp" />
+	<uptodate property="provisionSDKinDropins.complete" srcfile="build-stamp" targetfile="provisionSDKinDropins-stamp" />
 	<available file="bootstrap/plugins" property="bootstrapped" value="true" />
 
 	<property name="topBuildDir" value="${basedir}/build" />
@@ -52,30 +59,40 @@
 	<property name="buildConfig" value="${buildConfigs}/eclipse-build-config" />
 	<property name="productFiles" value="${buildConfig}/productFiles" />
 	<property name="reposource" value="${buildDirectory}/reposource" />
+	<property name="provisionDir" value="${buildDirectory}/installation" />
+	<property name="provisionWithTestsDir" value="${buildDirectory}/installationWithTests" />
+
+	<!-- Distros with alternative JUnit 4 JAR locations should pass this
+	     parameter in to ant -->
+	<property name="junit4JarLocation" value="/usr/share/java/junit4.jar" />
 
 	<!-- Determine host architecture -->
 	<exec executable="uname" outputproperty="uname-m">
 		<arg line="-m" />
 	</exec>
 	<condition property="hostArch" value="arm">
-		<matches pattern="^arm.*" string="${uname-m}"/>
+		<matches pattern="^arm.*" string="${uname-m}" />
 	</condition>
 	<condition property="hostArch" value="x86">
-		<matches pattern="i[0-9]*86" string="${uname-m}"/>
+		<matches pattern="i[0-9]*86" string="${uname-m}" />
 	</condition>
 	<condition property="hostArch" value="PA_RISC">
-		<matches pattern="^parisc.*" string="${uname-m}"/>
+		<matches pattern="^parisc.*" string="${uname-m}" />
 	</condition>
 	<condition property="hostArch" value="sparc">
-		<matches pattern="sparcv9" string="${uname-m}"/>
+		<matches pattern="sparcv9" string="${uname-m}" />
 	</condition>
 	<condition property="hostArch" value="${uname-m}">
-		<not><isset property="hostArch" /></not>
+		<not>
+			<isset property="hostArch" />
+		</not>
 	</condition>
 	<condition property="buildArch" value="${hostArch}">
-		<not><isset property="buildArch" /></not>
+		<not>
+			<isset property="buildArch" />
+		</not>
 	</condition>
-	<echo message="uname -m: ${uname-m}. Build eclipse on ${hostArch} for ${buildArch}."/>
+	<echo message="uname -m: ${uname-m}. Build eclipse on ${hostArch} for ${buildArch}." />
 
 	<property name="destDir" value="" />
 	<property name="prefix" value="/usr/local" />
@@ -101,6 +118,7 @@
 
 	<target name="setLibDir" depends="setLib64Dir">
 		<property name="libDir" value="lib" />
+		<property name="installationDir" value="${destDir}${prefix}/${libDir}/eclipse" />
 	</target>
 
 	<target name="getInstallationDir" depends="setLibDir">
@@ -122,19 +140,19 @@
 	</target>
 
 	<target name="fetch" unless="sdkSourceTarballPresent">
-		<fail message="SDK source tarball is not present.  Please either download a file such as eclipse-I20090611-1540-fetched-src.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
+		<fail message="SDK source tarball is not present.  Please either download a file such as eclipse-3.6.1-src.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
 	</target>
 
 	<target name="fetchTestSources" unless="testsSourcePresent">
-		<fail message="SDK tests source tarball is not present.  Please either download a file such as eclipse-sdktests-I20090611-1540-fetched-src.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
+		<fail message="SDK tests source tarball is not present.  Please either download a file such as eclipse-sdktests-3.6.1-sources.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
 	</target>
 
 	<target name="fetchTestScripts" unless="testsScriptsPresent">
-		<fail message="Scripts for the SDK tests tarball is not present.  Please either download a file such as eclipse-sdktests-I20090611-1540-fetched-scripts.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
+		<fail message="Scripts for the SDK tests tarball is not present.  Please either download a file such as eclipse-sdktests-3.6.1-scripts.tar.bz2 from http://www.eclipse.org/downloads/download.php?file=/technology/linuxtools/eclipse-build or generate one by running ./buildSDKSource.sh." />
 	</target>
 
 	<target name="extractBuildXmls" if="scriptsPresent">
-		<untar compression="bzip2" dest="${basedir}/build/eclipse-${label}-src" src="${basedir}/debian/eclipse-build-generatedScripts.tar.bz2" />
+		<untar compression="bzip2" dest="${basedir}/build/eclipse-${label}-src" src="${basedir}/eclipse-build-generatedScripts.tar.bz2" />
 		<!--
 		<fail message="Build scripts to bootstrap PDE Build must be generated and present in eclipse-build-generatedScripts.tar.bz2.  See pdebuild.xml for details."/>
 		-->
@@ -184,6 +202,10 @@
 		<copy todir="${buildDirectory}/features/eclipse-build-feature">
 			<fileset dir="eclipse-build-feature" />
 		</copy>
+		<delete verbose="true">
+			<fileset dir="${buildDirectory}/plugins" includes="**/ECLIPSEF.SF" />
+			<fileset dir="${buildDirectory}/plugins" includes="**/ECLIPSEF.RSA" />
+		</delete>
 		<!-- add additional archs -->
 		<untar compression="bzip2" dest="${basedir}/build/eclipse-${label}-src/plugins" src="${basedir}/eclipse-build-additionalArchs.tar.bz2" />
 		<!-- prepare ecf build tree -->
@@ -192,12 +214,6 @@
 			<fileset dir="${buildDirectory}/plugins" includes="org.mortbay.jetty_5*" />
 		</delete>
 		<delete dir="${buildDirectory}/plugins/org.eclipse.equinox.http.jetty_1.1.100" />
-		<move todir="${buildDirectory}/plugins">
-			<fileset dir="${buildDirectory}/ecf-src">
-				<filename name="org.eclipse*/**" />
-			</fileset>
-		</move>
-
 		<!-- Create a stamp file -->
 		<echo file="unpack-stamp" />
 	</target>
@@ -229,7 +245,7 @@
 		<echo file="testsunpack-stamp" />
 	</target>
 
-	<target name="clean">
+	<target name="clean-sdk">
 		<delete dir="${homeDir}" />
 		<delete dir="${baseworkspace}" />
 		<delete dir="${buildworkspace}" />
@@ -242,9 +258,10 @@
 		<delete>
 			<fileset dir="." includes="*-stamp" />
 		</delete>
+		<delete file="sdk-tests.properties" />
 	</target>
 
-	<target name="distclean" depends="clean">
+	<target name="clean" depends="clean-sdk">
 		<delete dir="bootstrap/configuration/org.eclipse.core.runtime" />
 		<delete dir="bootstrap/configuration/org.eclipse.equinox.app" />
 		<delete dir="bootstrap/configuration/org.eclipse.osgi" />
@@ -253,6 +270,15 @@
 		<delete dir="bootstrap/workspace" />
 	</target>
 
+	<target name="distclean" depends="clean">
+		<delete>
+			<fileset dir="." includes="*.log" />
+		</delete>
+		<delete includeemptydirs="true">
+			<fileset dir="." includes="tests_*/**" />
+		</delete>
+	</target>
+
 	<target name="insertBuildId" depends="unpack" unless="buildId.complete">
 		<replace dir="${buildDirectory}/plugins" value="${buildId}" token="@build@">
 			<include name="**/about.mappings" />
@@ -265,148 +291,88 @@
 
 	<target name="applyPatches" depends="insertBuildId" unless="patch.complete">
 		<!-- eclipse-build-only patches -->
-		<patch patchfile="${basedir}/patches/eclipse-buildswtnatives.patch" dir="${buildDirectory}" strip="0" />
-		<patch patchfile="${basedir}/patches/eclipse-jdt_launch-customBuild.patch" dir="${buildDirectory}" strip="0" />
-		<patch patchfile="${basedir}/patches/eclipse-swt-buildagainstxulrunner.patch" dir="${buildDirectory}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" strip="3" />
-		<patch patchfile="${basedir}/patches/eclipse-addArchesAnd64bitSWT.patch" dir="${buildDirectory}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" strip="6" />
-		<patch patchfile="${basedir}/patches/eclipse-add-archs-filesystem.patch" dir="${buildDirectory}" strip="0" />
-		<patch patchfile="${basedir}/patches/eclipse-add-archs-swt.patch" dir="${buildDirectory}" strip="0" />
-		<patch patchfile="${basedir}/patches/eclipse-add-archs-executable.patch" dir="${buildDirectory}/features/org.eclipse.equinox.executable" strip="0" />
-		<patch patchfile="${basedir}/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch" dir="${buildDirectory}" strip="0" />
-		<patch patchfile="${basedir}/patches/donotstorebuildlogsinfiles.patch" dir="${buildDirectory}" strip="3" />
-		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
-		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
-		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
+		<patch patchfile="${basedir}/patches/eclipse-buildswtnatives.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-swt-buildagainstxulrunner.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-addArchesAnd64bitSWT.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-add-archs-filesystem.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-add-archs-swt.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-add-archs-executable.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/donotstorebuildlogsinfiles.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}" strip="1" />
 		<patch patchfile="${basedir}/patches/gnomeproxy-makefile.patch" dir="${buildDirectory}" strip="1" />
 		<patch patchfile="${basedir}/patches/eclipse-no-jetty5.patch" dir="${buildDirectory}" strip="1" />
 		<patch patchfile="${basedir}/patches/eclipse-nosourcebundlesfordependencies.patch" dir="${buildDirectory}" strip="1" />
-		<patch patchfile="${basedir}/patches/eclipse-use-newer-commons-codec.patch" dir="${buildDirectory}"  strip="0" />
-		<patch patchfile="${basedir}/patches/addEcfQualifiers.patch" dir="${buildDirectory}"  strip="0" />
-		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
+		<patch patchfile="${basedir}/patches/eclipse-use-newer-commons-codec.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/junit4-nochecksum.patch" dir="${buildDirectory}" strip="0" />
+		<patch patchfile="${basedir}/patches/bz318912.patch" dir="${buildDirectory}" strip="0" />
 		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
-		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
-		<symlink link="${buildDirectory}/plugins/org.eclipse.osgi.services/src/javax" resource="../../org.eclipse.equinox.io/src/javax/" />
 		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
-		<patch patchfile="${basedir}/patches/tooltip-color.patch" dir="${buildDirectory}" strip="1" />
+		<patch patchfile="${basedir}/patches/no-gnome-vfs.patch" dir="${buildDirectory}" strip="0" />
 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
 		<!-- end eclipse-build-only patches -->
 		<!-- back-ported patches -->
+		<patch patchfile="${basedir}/patches/bz319476-compile-jar-in-jar-loader.patch" dir="${buildDirectory}/plugins/org.eclipse.jdt.ui" strip="0" />
 		<!-- end back-ported patches -->
 		<!-- Only build for one target (bug #293952) -->
 		<copy file="${buildConfigs}/eclipse-build-config/build.properties.in" tofile="${buildConfigs}/eclipse-build-config/build.properties" />
 		<replace file="${buildConfigs}/eclipse-build-config/build.properties" token="@build_arch@" value="${buildArch}" />
+		<patch patchfile="${basedir}/patches/java-home.patch" dir="${buildDirectory}" strip="2" />
+		<patch patchfile="${basedir}/patches/webkitgtk.patch" dir="${buildDirectory}" strip="0" />
 		<echo file="patch-stamp" />
 	</target>
 
 	<target name="applyTestPatches" depends="unpackTests" unless="testspatch.complete">
 		<patch patchfile="${basedir}/patches/tests-noapttests.patch" dir="${testsBuildDirectory}/features/org.eclipse.sdk.tests" strip="0" />
-		<patch patchfile="${basedir}/patches/tests-nostyletask.patch" dir="${testsBuildDirectory}" strip="0" />
 		<patch patchfile="${basedir}/patches/tests-BZ295666.patch" dir="${testsBuildDirectory}" strip="0" />
+		<patch patchfile="${basedir}/patches/tests-org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch" dir="${testsBuildDirectory}/plugins/org.eclipse.pde.ui.tests" strip="0" />
+		<patch patchfile="${basedir}/patches/tests-nop2discoverytests.patch" dir="${testsBuildDirectory}/features/org.eclipse.sdk.tests" strip="0" />
+		<patch patchfile="${basedir}/patches/tests-org.eclipse.ant.tests.core.patch" dir="${testsBuildDirectory}/plugins/org.eclipse.ant.tests.core" strip="0" />
+		<patch patchfile="${basedir}/patches/tests-org.eclipse.ant.tests.ui.patch" dir="${testsBuildDirectory}/plugins/org.eclipse.ant.tests.ui" strip="0" />
 		<echo file="testspatch-stamp" />
 	</target>
 
 	<target name="buildHelperTask">
-		<mkdir dir="task-bin"/>
-		<javac compiler="modern" target="1.5" source="1.5" debug="true"
-		       srcdir="${basedir}/task-src" destdir="${basedir}/task-bin"/>
+		<mkdir dir="task-bin" />
+		<javac compiler="modern" target="1.5" source="1.5" debug="true" srcdir="${basedir}/task-src" destdir="${basedir}/task-bin" />
 	</target>
 
 	<target name="defineTasks" depends="buildHelperTask">
-		<taskdef name="symlinkOSGiJars"
-			classname="org.eclipse.linuxtools.eclipsebuild.SymlinkOSGiJars"
-			classpath="${basedir}/task-bin" />
-		<taskdef name="symlinkInstalledOSGiJars"
-			classname="org.eclipse.linuxtools.eclipsebuild.SymlinkInstalledOSGiJars"
-			classpath="${basedir}/task-bin" />
-		<taskdef name="symlinkNonOSGiJars"
-			classname="org.eclipse.linuxtools.eclipsebuild.SymlinkNonOSGiJars"
-			classpath="${basedir}/task-bin" />
-	</target>
-	
+		<taskdef name="symlinkOSGiJars" classname="org.eclipse.linuxtools.eclipsebuild.SymlinkOSGiJars" classpath="${basedir}/task-bin" />
+		<taskdef name="symlinkInstalledOSGiJars" classname="org.eclipse.linuxtools.eclipsebuild.SymlinkInstalledOSGiJars" classpath="${basedir}/task-bin" />
+		<taskdef name="symlinkNonOSGiJars" classname="org.eclipse.linuxtools.eclipsebuild.SymlinkNonOSGiJars" classpath="${basedir}/task-bin" />
+	</target>
+
 	<target name="symlinkDeps" depends="applyPatches,defineTasks" unless="symlinks.complete">
-	  	<symlinkOSGiJars dependencies="${basedir}/dependencies.properties" 
-	  		topLevelDir="${buildDirectory}/plugins"
-		    manifests="${basedir}/dependencyManifests"/>
-	  	<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties"
-	  		topLevelDir="${buildDirectory}/plugins"/>
-                <!-- If we leave these and symlink the JARs only, we get "you tampered
-                     with the JAR!" exceptions at the p2 director phase -->
-                <delete verbose="true">
-                        <fileset dir="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF">
-                                <include name="ECLIPSEF.RSA" />
-                                <include name="ECLIPSEF.SF" />
-                        </fileset>
-                        <fileset dir="${buildDirectory}/plugins/org.junit_3.8.2.v20090203-1005/META-INF">
-                                <include name="ECLIPSEF.RSA" />
-                                <include name="ECLIPSEF.SF" />
-                        </fileset>
-                </delete>
-                <replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/MANIFEST.MF" flags="m,g,s">
-			<regexp pattern="^Name.*"/>
-			<substitution expression=""/>
+		<symlinkOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${buildDirectory}/plugins" manifests="${basedir}/dependencyManifests" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${buildDirectory}/plugins" />
+		<symlinkOSGiJars dependencies="${basedir}/jdtdependencies.properties" topLevelDir="${buildDirectory}/plugins" manifests="${basedir}/dependencyManifests" />
+		<symlinkNonOSGiJars dependencies="${basedir}/jdtnonosgidependencies.properties" topLevelDir="${buildDirectory}/plugins" />
+		<symlinkOSGiJars dependencies="${basedir}/sdkdependencies.properties" topLevelDir="${buildDirectory}/plugins" manifests="${basedir}/dependencyManifests" />
+		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF" flags="m,g,s">
+			<regexp pattern="^Name.*" />
+			<substitution expression="" />
 		</replaceregexp>
-                <replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/MANIFEST.MF" flags="m,g,s">
-			<regexp pattern="^SHA1-Digest.*"/>
-			<substitution expression=""/>
+		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF" flags="m,g,s">
+			<regexp pattern="^SHA1-Digest.*" />
+			<substitution expression="" />
 		</replaceregexp>
-                <replaceregexp file="${buildDirectory}/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF" flags="m,g,s">
-			<regexp pattern="^Name.*"/>
-			<substitution expression=""/>
+		<replaceregexp file="${buildDirectory}/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF" flags="m,g,s">
+			<regexp pattern="^Name.*" />
+			<substitution expression="" />
 		</replaceregexp>
-                <replaceregexp file="${buildDirectory}/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF" flags="m,g,s">
-			<regexp pattern="^SHA1-Digest.*"/>
-			<substitution expression=""/>
+		<replaceregexp file="${buildDirectory}/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF" flags="m,g,s">
+			<regexp pattern="^SHA1-Digest.*" />
+			<substitution expression="" />
 		</replaceregexp>
 
 		<!-- Create a stamp file -->
 		<echo file="symlinks-stamp" />
 	</target>
 
-	<target name="prebootstrap" depends="symlinkDeps" unless="prebootstrap.complete">
-		<mkdir dir="${basedir}/temp/" />
-		<javac destdir="${basedir}/temp"
-			srcdir="${buildDirectory}/plugins/org.eclipse.jdt.ui/jar in jar loader/"
-			source="1.3"
-			target="1.1"
-			debug="true"
-			optimize="true"
-			fork="true"
-			compiler="modern" />
-		<zip destfile="${buildDirectory}/plugins/org.eclipse.jdt.ui/jar-in-jar-loader.zip"
-			basedir="${basedir}/temp/"/>
-		<delete dir="${basedir}/temp/"/>
-		<mkdir dir="${basedir}/temp/" />
-		<copy todir="${basedir}/temp/" >
-			<fileset dir="${basedir}/stubs/">
-				<include name="**/*.java" />
-			</fileset>
-		</copy>
-		<copy todir="${basedir}/temp" >
-			<fileset dir="${buildDirectory}/plugins/org.eclipse.core.runtime/src/">
-				<include name="org/eclipse/core/runtime/IPluginDescriptor.java" />
-			</fileset>
-		</copy>
-		<javac destdir="${basedir}/temp"
-			srcdir="${basedir}/temp"
-			source="1.3"
-			target="1.1"
-			debug="true"
-			optimize="true"
-			fork="true"
-			compiler="modern" />
-		<mkdir dir="${buildDirectory}/plugins/org.eclipse.core.runtime.compatibility.registry/classes/org/eclipse/core/runtime/" />
-		<copy todir="${buildDirectory}/plugins/org.eclipse.core.runtime.compatibility.registry/classes/" >
-			<fileset dir="${basedir}/temp/">
-				<include name="org/eclipse/core/runtime/IPluginDescriptor.class" />
-			</fileset>
-		</copy>
-		<delete dir="${basedir}/temp/"/>
-		<!-- Create a stamp file -->
-		<echo file="prebootstrap-stamp" />
-	</target>
-
-	<target name="build" depends="applyPatches,symlinkDeps,prebootstrap,bootstrap,compilelibs" unless="build.complete">
+	<target name="build" depends="applyPatches,symlinkDeps,bootstrap,compilelibs" unless="build.complete">
 		<echo message="build.xml:  eclipse.pdebuild.scripts = ${eclipse.pdebuild.scripts}" />
 		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${basedir}" failonerror="true">
 			<classpath>
@@ -421,6 +387,19 @@
 			<arg line="-consolelog " />
 			<jvmarg value="-Xmx512M" />
 		</java>
+		<!-- build equinox initializer -->
+		<mkdir dir="${buildDirectory}/home" />
+		<java classname="org.eclipse.core.launcher.Main" dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer" fork="true">
+			<classpath>
+				<pathelement path="bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
+			</classpath>
+			<arg line="-data ${buildworkspace} " />
+			<arg line="-Duser.home=${buildDirectory}/home" />
+			<arg line="-application org.eclipse.ant.core.antRunner" />
+			<arg line="-f build.xml" />
+			<arg line="build.update.jar" />
+			<jvmarg value="-Xmx512M" />
+		</java>
 		<!--
 		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}">
 			<property name="arch" value="${buildArch}"/>
@@ -447,29 +426,38 @@
 	-->
 
 	<target name="buildTests" depends="provision.sdk,applyTestPatches" unless="testsbuild.complete">
+
+		<path id="pdebuilddir.id">
+			<dirset dir="${provisionDir}/plugins">
+				<include name="org.eclipse.pde.build_*" />
+			</dirset>
+		</path>
+
+		<property name="pdebuilddir" refid="pdebuilddir.id" />
+
 		<!-- Test framework -->
-		<exec executable="${buildDirectory}/installation/eclipse">
+		<exec executable="${provisionDir}/eclipse">
 			<arg line="-nosplash " />
 			<arg line="-consolelog " />
 			<arg line="-application org.eclipse.ant.core.antRunner " />
-			<arg line="-buildfile ${eclipse.pdebuild.scripts}/build.xml" />
+			<arg line="-buildfile ${pdebuilddir}/scripts/build.xml" />
 			<arg line="-propertyfile ${basedir}/build.properties " />
 			<arg line="-DbuildDirectory=${testsBuildDirectory} " />
 			<arg line="-Dtype=feature -Did=org.eclipse.test " />
-			<arg line="-DbaseLocation=${buildDirectory}/installation " />
+			<arg line="-DbaseLocation=${provisionDir} " />
 			<arg line="-DbuildLabel=${testsBuildLabel} " />
 			<arg line="-data ${buildworkspace} " />
 		</exec>
 		<!-- SDK tests -->
-		<exec executable="${buildDirectory}/installation/eclipse">
+		<exec executable="${provisionDir}/eclipse">
 			<arg line="-nosplash " />
 			<arg line="-consolelog " />
 			<arg line="-application org.eclipse.ant.core.antRunner " />
-			<arg line="-buildfile ${eclipse.pdebuild.scripts}/build.xml" />
+			<arg line="-buildfile ${pdebuilddir}/scripts/build.xml" />
 			<arg line="-propertyfile ${basedir}/build.properties " />
 			<arg line="-DbuildDirectory=${testsBuildDirectory} " />
 			<arg line="-Dtype=feature -Did=org.eclipse.sdk.tests " />
-			<arg line="-DbaseLocation=${buildDirectory}/installation " />
+			<arg line="-DbaseLocation=${provisionDir} " />
 			<arg line="-DbuildLabel=${testsBuildLabel} " />
 			<arg line="-data ${buildworkspace} " />
 		</exec>
@@ -510,7 +498,7 @@
 
 		<!-- build liblocalfile -->
 		<exec dir="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/linux" executable="make" failonerror="true" />
-		<move file="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/linux/liblocalfile_1_0_0.so" todir="${buildDirectory}/plugins/org.eclipse.core.filesystem.linux.${buildArch}/os/linux/${buildArch}">
+		<move file="${buildDirectory}/plugins/org.eclipse.core.filesystem/natives/unix/linux/libunixfile_1_0_0.so" todir="${buildDirectory}/plugins/org.eclipse.core.filesystem.linux.${buildArch}/os/linux/${buildArch}">
 		</move>
 		<!-- build libgnomeproxy -->
 		<antcall target="compile.libgnomeproxy" />
@@ -527,24 +515,15 @@
 		<property name="builtZip" value="${buildDirectory}/I.${buildId}/eclipse-SDK-${buildId}.zip" />
 		<!--<property name="builtZip" value="${basedir}/eclipse-SDK-${buildId}.zip"/>-->
 		<replace token="@qualifier@" file="${productFiles}/sdk/sdk.product" value="${buildId}" />
+		<replace token="@qualifier@" file="${productFiles}/platform/platform.product" value="${buildId}" />
 		<property name="tempexec" value="${buildDirectory}/tempexec" />
 
 		<antcall target="createRepo" />
-
-		<copy file="${reposource}/content.xml" tofile="${reposource}/content.xml.orig" failonerror="false" />
-
 		<antcall target="extractLauncher" />
 		<antcall target="publishLauncher" />
-
-		<copy file="${reposource}/content.xml" tofile="${reposource}/content.xml.afterlauncher" failonerror="false" />
-		<copy file="${reposource}/content.jar" tofile="${reposource}/content.jar.afterlauncher" failonerror="false" />
-
 		<antcall target="createAndPublishLauncherFeature" />
-
-		<copy file="${reposource}/content.xml" tofile="${reposource}/content.xml.afterrcpConfig" failonerror="false" />
-		<copy file="${reposource}/content.jar" tofile="${reposource}/content.jar.afterrcpConfig" failonerror="false" />
-
 		<antcall target="publishSDK" />
+		<antcall target="publishPlatform" />
 
 		<echo file="p2prep-stamp" />
 	</target>
@@ -633,11 +612,23 @@
 		-->
 	</target>
 
+	<target name="publishPlatform">
+		<antcall target="publishProduct">
+			<param name="productFile" value="${productFiles}/platform/platform.product" />
+		</antcall>
+	</target>
+
 	<target name="publishSDK">
-		<!-- This next part publishes the entire SDK -->
+		<antcall target="publishProduct">
+			<param name="productFile" value="${productFiles}/sdk/sdk.product" />
+		</antcall>
+	</target>
+
+	<target name="publishProduct">
+		<!-- http://wiki.eclipse.org/Equinox/p2/Publisher -->
 		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${basedir}" failonerror="true">
 			<classpath>
-				<pathelement path="bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
+				<pathelement path="${launcher}" />
 			</classpath>
 			<arg line="-configuration configuration " />
 			<arg line="-application org.eclipse.ant.core.antRunner " />
@@ -646,68 +637,187 @@
 			<arg line="-DbuildArch=${buildArch} " />
 			<arg line="-Dreposource=${reposource} " />
 			<arg line="-DbuildConfig=${buildConfig} " />
-			<arg line="-DproductFiles=${productFiles} " />
+			<arg line="-DproductFile=${productFile} " />
 			<arg line="-DbuildDirectory=${buildDirectory} " />
 			<arg line="-consolelog " />
 			<jvmarg value="-Xmx512M" />
 		</java>
+		<!-- The following (using the app. instead of the ant task) doesn't work
+		     as of 2010-08-11 -->
+		<!--
+		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${basedir}" failonerror="true">
+			<classpath>
+				<pathelement path="bootstrap/plugins/org.eclipse.equinox.launcher.jar" />
+			</classpath>
+			<arg line="-configuration configuration " />
+		                 <arg line="-consoleLog" />
+			<arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher " />
+		                 <arg line="-flavor tooling" />
+		                 <arg line="-configs gtk.linux.${buildArch}" />
+		                 <arg line="-productFile ${productFile}" />
+		                 <arg line="-metadataRepository file:${reposource}" />
+		                 <arg line="-artifactRepository file:${reposource}" />
+		                 <arg line="-compress" />
+			<arg line="-featureVersions ${buildDirectory}/finalFeaturesVersions.properties" />
+		                 <arg line="-pluginVersions ${buildDirectory}/finalPluginsVersions.properties" />
+		</java>
+		-->
+	</target>
+
+	<target name="provision.platform" depends="p2prep" unless="provision.platform.complete">
+		<echo message="Installing into:  ${provisionDir}" />
+		<antcall target="provision">
+			<param name="p2.director.installIU" value="org.eclipse.platform.ide" />
+			<param name="profileName" value="PlatformProfile" />
+		</antcall>
+
+		<!-- Re-symlink system JARs -->
+		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<echo file="provision.platform-stamp" />
+	</target>
+
+	<!-- This is here as a convenience task for distributions which want
+	     CVS functionality to be present in "platform" installations. -->
+	<target name="provision.cvs" depends="p2prep" unless="provision.cvs.complete">
+		<echo message="Installing into:  ${provisionDir}" />
+		<antcall target="provision">
+			<param name="p2.director.installIU" value="org.eclipse.platform.ide,org.eclipse.cvs.feature.group" />
+			<param name="profileName" value="PlatformProfile" />
+		</antcall>
+
+		<!-- Re-symlink system JARs -->
+		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<echo file="provision.cvs-stamp" />
 	</target>
 
 	<target name="provision.sdk" depends="p2prep" unless="provision.sdk.complete">
-		<echo message="Installing into:  ${buildDirectory}/installation" />
-		<antcall target="run.director">
+		<echo message="Installing into:  ${provisionDir}" />
+		<antcall target="provision">
 			<param name="p2.director.installIU" value="org.eclipse.sdk.ide" />
+			<param name="profileName" value="SDKProfile" />
+		</antcall>
+
+		<fileset id="junit4.jar" dir="${provisionDir}/plugins">
+			<include name="**/org.junit4_**/junit.jar" />
+		</fileset>
+		<property name="junit4jar.path" refid="junit4.jar" />
+
+		<delete file="${provisionDir}/plugins/${junit4jar.path}" />
+		<symlink link="${provisionDir}/plugins/${junit4jar.path}" resource="${junit4JarLocation}" />
+
+		<!-- Re-symlink system JARs -->
+		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkInstalledOSGiJars dependencies="${basedir}/jdtdependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/jdtnonosgidependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkInstalledOSGiJars dependencies="${basedir}/sdkdependencies.properties" topLevelDir="${provisionDir}/plugins" />
+
+		<echo file="provision.sdk-stamp" />
+	</target>
+
+	<target name="provision" depends="p2prep">
+		<echo message="Installing into:  ${provisionDir}" />
+		<antcall target="run.director">
+			<param name="p2.director.installIU" value="${p2.director.installIU}" />
 			<param name="p2.director.version" value="${p2.director.version}" />
-			<param name="p2.director.profile" value="SDKProfile" />
-			<param name="p2.director.install.path" value="${buildDirectory}/installation" />
+			<param name="p2.director.profile" value="${profileName}" />
+			<param name="p2.director.install.path" value="${provisionDir}" />
 			<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
 			<param name="p2.os" value="linux" />
 			<param name="p2.ws" value="gtk" />
 			<param name="p2.arch" value="${buildArch}" />
 			<param name="p2.repo" value="${reposource}" />
 		</antcall>
-		<!-- build equinox initializer -->
-		<mkdir dir="${buildDirectory}/home" />
-		<java classname="org.eclipse.core.launcher.Main" dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer" fork="true">
-			<classpath>
-				<fileset dir="${buildDirectory}/installation/plugins">
-					<include name="org.eclipse.equinox.launcher_*.jar" />
-				</fileset>
-			</classpath>
-			<arg line="-data ${buildworkspace} " />
-			<arg line="-Duser.home=${buildDirectory}/home" />
-			<arg line="-application org.eclipse.ant.core.antRunner" />
-			<arg line="-f build.xml" />
-			<arg line="build.update.jar" />
-			<jvmarg value="-Xmx512M" />
-		</java>
-		<copy todir="${buildDirectory}/installation/plugins">
+
+		<copy todir="${provisionDir}/plugins">
 			<fileset dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer">
 				<include name="org.eclipse.equinox.initializer*.jar" />
 			</fileset>
 		</copy>
+	</target>
 
-		<!-- Re-symlink system JARs -->
-		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" 
-			topLevelDir="${buildDirectory}/installation/plugins"/>
-		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties"
-			topLevelDir="${buildDirectory}/installation/plugins"/>
-
-		<fileset id="junit4.jar" dir="${buildDirectory}/installation/plugins">
-		  	<include name="**/org.junit4_**/junit.jar"/>
-	  	</fileset>
-	  	<property name="junit4jar.path" refid="junit4.jar"/>
-	  	
-		<delete file="${buildDirectory}/installation/plugins/${junit4jar.path}" />
-
-		<!-- FIXME:  Watch out for other distros with different
-		     locations of junit4's system JAR. -->
-		<symlink link="${buildDirectory}/installation/plugins/${junit4jar.path}"
-			resource="/usr/share/java/junit4.jar" />		
-		<echo file="provision.sdk-stamp" />
+	<target name="provision.installed" depends="p2prep">
+		<echo message="Installing into:  ${provisionDir}" />
+		<property name="directorToRun" value="${provisionDir}/eclipse" />
+		<antcall target="run.installed.director">
+			<param name="p2.director.installIU" value="${p2.director.installIU}" />
+			<param name="p2.director.version" value="${p2.director.version}" />
+			<param name="p2.director.profile" value="${profileName}" />
+			<param name="p2.director.install.path" value="${provisionDir}" />
+			<param name="p2.director.extraArgs" value="-profileProperties org.eclipse.update.install.features=true" />
+			<param name="p2.os" value="linux" />
+			<param name="p2.ws" value="gtk" />
+			<param name="p2.arch" value="${buildArch}" />
+			<param name="p2.repo" value="${reposource}" />
+		</antcall>
+
+		<copy todir="${provisionDir}/plugins">
+			<fileset dir="${buildDirectory}/plugins/org.eclipse.equinox.initializer">
+				<include name="org.eclipse.equinox.initializer*.jar" />
+			</fileset>
+		</copy>
 	</target>
 
-	<target name="runTests" depends="buildTests">
+	<target name="checkDebugAndVerbose">
+		<condition property="bothDebugAndVerbose.set">
+			<and>
+				<isset property="debugTests" />
+				<isset property="verboseTests" />
+			</and>
+		</condition>
+	</target>
+
+	<target name="setDebugAndVerbose" depends="checkDebugAndVerbose" if="bothDebugAndVerbose.set">
+		<property name="testSwitches" value="-dv" />
+	</target>
+
+	<target name="setDebugTests" if="debugTests">
+		<property name="testSwitches" value="-d" />
+	</target>
+
+	<target name="setVerboseTests" if="verboseTests">
+		<property name="testSwitches" value="-v" />
+	</target>
+
+	<target name="setDebugAndVerboseArgs" depends="setDebugAndVerbose,setDebugTests,setVerboseTests" />
+
+	<target name="runTests" depends="buildTests,setDebugAndVerboseArgs">
+		<!-- These two next calls just set the properties to an empty string if they are not previously set -->
+		<property name="debugTestsSwitch" value="" />
+		<property name="verboseTestsSwitch" value="" />
+
+		<!-- Install a clean SDK for testing -->
+		<antcall target="provision">
+			<param name="provisionDir" value="${provisionWithTestsDir}"/>
+			<param name="p2.director.installIU" value="org.eclipse.sdk.ide" />
+			<param name="profileName" value="SDKProfile" />
+		</antcall>
+
+		<fileset id="junit4.jar" dir="${provisionWithTestsDir}/plugins">
+			<include name="**/org.junit4_**/junit.jar" />
+		</fileset>
+		<property name="junit4jar.path" refid="junit4.jar" />
+
+		<delete file="${provisionWithTestsDir}/plugins/${junit4jar.path}" />
+		<symlink link="${provisionWithTestsDir}/plugins/${junit4jar.path}" resource="${junit4JarLocation}" />
+
+		<!-- Re-symlink system JARs -->
+		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${provisionWithTestsDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${provisionWithTestsDir}/plugins" />
+		<symlinkInstalledOSGiJars dependencies="${basedir}/jdtdependencies.properties" topLevelDir="${provisionWithTestsDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/jdtnonosgidependencies.properties" topLevelDir="${provisionWithTestsDir}/plugins" />
+		<symlinkInstalledOSGiJars dependencies="${basedir}/sdkdependencies.properties" topLevelDir="${provisionWithTestsDir}/plugins" />
+		
+		<!-- Install test framework -->
+		<antcall target="provision">
+			<param name="provisionDir" value="${provisionWithTestsDir}"/>
+			<param name="reposource" value="${testsBuildDirectory}/buildRepo" />
+			<param name="p2.director.installIU" value="org.eclipse.test.feature.group" />
+			<param name="profileName" value="SDKProfile" />
+		</antcall>
+		
 		<echo message="###################################################################" />
 		<echo message="#                                                                 #" />
 		<echo message="#             Please post and discuss results here:               #" />
@@ -719,8 +829,14 @@
 			<format property="timestamp" pattern="yyyyMMddHHmmss" />
 		</tstamp>
 		<chmod perm="ugo+rx" file="${basedir}/runtests.sh" />
+		<!--
+		<echo message="Calling runtests with (debug, verbose) = (${testSwitches})" />
+		-->
 		<exec executable="${basedir}/runtests.sh" dir="${basedir}">
 			<arg value="-t${timestamp}" />
+			<arg value="-b ${testsBuildDirectory}" />
+			<arg value="-p ${provisionWithTestsDir}" />
+			<arg value="${testSwitches}" />
 		</exec>
 		<property name="testResultDir" value="${basedir}/tests_${timestamp}/results" />
 		<!-- Copy over the XML to generate a top-level report for all of the tests -->
@@ -744,13 +860,11 @@
 			<fileset dir="${testResultDir}/origXml" includes="*.xml" />
 		</junitreport>
 		<!-- Generate top-level HTML report -->
-		<xslt style="${basedir}/tests_${timestamp}/installation/plugins/org.eclipse.test_3.2.0/JUNIT.XSL" basedir="${testResultDir}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${testResultDir}/html" />
+		<xslt style="${provisionWithTestsDir}/plugins/${testframework}/JUNIT.XSL" basedir="${testResultDir}/xml" includes="org.eclipse.sdk.tests.xml" destdir="${testResultDir}/html" />
 	</target>
 
 	<target name="run.director">
 		<property name="baseBuilderConfig" value="${baseBuilder}/p2" />
-		<echo message="Moving ${baseBuilderConfig} to ${baseBuilderConfig}.bak" />
-		<move failonerror="false" file="${baseBuilderConfig}" tofile="${baseBuilderConfig}.bak" />
 		<!-- FIXME:  When we move to bootstrap by default, investigate using <exec> on the bootstrapped launcher
 		     like in eclipsebuilder's equinox.prov/run.xml -->
 		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${baseBuilder}" failonerror="true">
@@ -787,47 +901,44 @@
 			<jvmarg value="-Declipse.p2.data.area=${p2.director.install.path}/p2" />
 			<jvmarg value="-Xmx512M" />
 		</java>
-		<delete dir="${baseBuilderConfig}" includeemptydirs="true" failonerror="false" />
-		<move file="${baseBuilderConfig}.bak" tofile="${baseBuilderConfig}" />
 	</target>
 
 	<target name="run.installed.director">
 		<chmod perm="ugo+rx" file="${directorToRun}" />
 		<exec executable="${directorToRun}">
 			<arg line="-nosplash " />
-			<arg line="-application org.eclipse.equinox.p2.director " />
-			<arg line="-data ${buildworkspace} " />
 			<arg line="-consoleLog" />
+			<arg line="-data ${buildworkspace} " />
+			<arg line="-application org.eclipse.equinox.p2.director " />
 			<arg line="-flavor ${p2.flavor}" />
 			<arg line="-installIU ${p2.director.installIU}" />
-			<arg line="-p2.os ${p2.os}" />
-			<arg line="-p2.ws ${p2.ws}" />
-			<arg line="-p2.arch ${p2.arch}" />
-			<arg line="-roaming" />
-			<arg line="-profile ${p2.director.profile}" />
 			<arg line="${p2.director.extraArgs}" />
 			<arg line="-metadatarepository file:${p2.repo}" />
 			<arg line="-artifactrepository file:${p2.repo}" />
-			<arg line="-destination ${p2.director.install.path}" />
-			<arg line="-bundlepool ${p2.director.install.path}" />
-			<arg line="-vmargs" />
-			<arg line="-Declipse.p2.data.area=${p2.director.install.path}/p2" />
-			<arg line="-Declipse.p2.MD5Check=false" />
-			<arg line="-Declipse.p2.profile=@none" />
-			<arg line="-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=" />
-			<arg line="-Declipse.p2.data.area=${p2.director.install.path}/p2" />
-			<arg line="-propertyfile ${basedir}/build.properties " />
 		</exec>
 	</target>
 
 	<target name="install" depends="provision.sdk">
-		<mkdir dir="${destDir}${prefix}/${libDir}/eclipse" />
+		<antcall target="installIntoDestDir">
+			<param name="profile" value="SDKProfile" />
+		</antcall>
+	</target>
+
+	<target name="installSDKinDropins" depends="provisionSDKinDropins">
+		<antcall target="installIntoDestDir">
+			<param name="profile" value="PlatformProfile" />
+		</antcall>
+	</target>
+
+	<target name="installIntoDestDir">
+		<mkdir dir="${installationDir}" />
 		<exec executable="cp" failonerror="true">
 			<arg value="-rd" />
 			<arg value="--no-target-directory" />
-			<arg value="${buildDirectory}/installation" />
-			<arg value="${destDir}${prefix}/${libDir}/eclipse" />
+			<arg value="${provisionDir}" />
+			<arg value="${installationDir}" />
 		</exec>
+
 		<!-- install desktop file -->
 		<copy file="eclipse.desktop" todir="${destDir}${prefix}/share/applications" />
 		<!-- install icons -->
@@ -835,36 +946,245 @@
 		<copy file="${buildDirectory}/plugins/org.eclipse.platform/eclipse32.png" tofile="${destDir}${prefix}/share/icons/hicolor/32x32/apps/eclipse.png" />
 		<copy file="${buildDirectory}/plugins/org.eclipse.platform/eclipse48.png" tofile="${destDir}${prefix}/share/icons/hicolor/48x48/apps/eclipse.png" />
 		<mkdir dir="${destDir}${prefix}/share/pixmaps" />
-		<symlink link="${destDir}${prefix}/share/pixmaps/eclipse.png" resource="../icons/hicolor/48x48/apps/eclipse.png" />
-		<!--shared dropins folder-->
+		<symlink link="${destDir}${prefix}/share/pixmaps/eclipse.png" resource="../icons/hicolor/48x48/apps/eclipse.png" overwrite="true"/>
+		<!--shared dropins folder for architecture-independent plugins-->
 		<mkdir dir="${destDir}${prefix}/share/eclipse/dropins" />
 		<!-- eclipse binary -->
 		<mkdir dir="${destDir}${prefix}/bin" />
-		<symlink link="${destDir}${prefix}/bin/eclipse" resource="../${libDir}/eclipse/eclipse" />
-		<!-- eclipse manpage -->
-		<mkdir dir="${destDir}${prefix}/share/man/man1" />
-		<exec executable="docbook2x-man" failonerror="true">
-			<arg value="eclipse.1.xml" />
-		</exec>
-		<move file="eclipse.1" tofile="${destDir}${prefix}/share/man/man1/eclipse.1" />
+		<symlink link="${destDir}${prefix}/bin/eclipse" resource="../${libDir}/eclipse/eclipse" overwrite="true"/>
+		<!-- FIXME:  we really shouldn't need this anymore but at least pdebuild.sh will need to be updated -->
 		<!-- Create the "startup.jar" symlink -->
-		<fileset dir="${destDir}/${prefix}/${libDir}/eclipse/plugins" includes="org.eclipse.equinox.launcher_*" id="startupjar" />
+		<fileset dir="${installationDir}/plugins" includes="org.eclipse.equinox.launcher_*" id="startupjar" />
 		<property name="startupjarpath" refid="startupjar" />
-		<symlink link="${destDir}/${prefix}/${libDir}/eclipse/startup.jar" resource="plugins/${startupjarpath}" />
+		<symlink link="${installationDir}/startup.jar" resource="plugins/${startupjarpath}" overwrite="true"/>
 		<!-- Create the "swt.jar" and friends symlinks  -->
-		<fileset dir="${destDir}/${prefix}/${libDir}/eclipse/plugins" includes="org.eclipse.swt.gtk.linux.${buildArch}_*" id="swtjar" />
+		<fileset dir="${installationDir}/plugins" includes="org.eclipse.swt.gtk.linux.${buildArch}_*" id="swtjar" />
 		<property name="swtjarpath" refid="swtjar" />
-		<symlink link="${destDir}/${prefix}/${libDir}/eclipse/swt-gtk-3.5.2.jar" resource="plugins/${swtjarpath}" />
-		<symlink link="${destDir}/${prefix}/${libDir}/eclipse/swt-gtk.jar" resource="plugins/${swtjarpath}" />
-		<symlink link="${destDir}/${prefix}/${libDir}/eclipse/swt.jar" resource="plugins/${swtjarpath}" />
+		<symlink link="${installationDir}/swt-gtk-${label}.jar" resource="plugins/${swtjarpath}" overwrite="true"/>
+		<symlink link="${installationDir}/swt-gtk.jar" resource="plugins/${swtjarpath}" overwrite="true"/>
+		<symlink link="${installationDir}/swt.jar" resource="plugins/${swtjarpath}" overwrite="true"/>
+
+		<echo append="true" file="${installationDir}/eclipse.ini" message="-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=${prefix}/share/eclipse/dropins" />
+
+		<!-- Extract SWT JNI .so files -->
+		<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true" dir="${destDir}">
+			<classpath>
+				<fileset dir="${installationDir}/plugins">
+					<include name="org.eclipse.equinox.launcher_*.jar" />
+				</fileset>
+			</classpath>
+			<arg value="-application" />
+			<arg value="org.eclipse.equinox.initializer.configInitializer" />
+			<arg value="-debug" />
+			<arg value="-consolelog" />
+			<arg value="-metadataRepository" />
+			<arg value="file:${installationDir}/metadata/" />
+			<arg value="-artifactRepository" />
+			<arg value="file:${installationDir}/metadata/" />
+			<arg value="-data" />
+			<arg value="${buildworkspace}" />
+			<arg value="-fileInitializer" />
+			<arg value="${basedir}/extract_patterns.txt" />
+			<jvmarg value="-Dosgi.sharedConfiguration.area=${installationDir}/configuration" />
+		</java>
+
+		<!-- Remove unnecessary configuration data -->
+		<delete dir="${installationDir}/configuration/org.eclipse.core.runtime" />
+		<delete dir="${installationDir}/configuration/org.eclipse.equinox.app" />
+		<delete includeemptydirs="true" verbose="true">
+			<fileset dir="${installationDir}/configuration" includes="*.log" />
+			<fileset dir="${installationDir}/configuration" includes="**/data/**" />
+			<fileset dir="${installationDir}/configuration" includes="org.eclipse.update/**" />
+		</delete>
 		
-		<echo append="true" file="${destDir}${prefix}/${libDir}/eclipse/eclipse.ini" message="-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=${prefix}/share/eclipse/dropins" />
+		<!-- Fix paths in p2 data -->
+		<delete includeemptydirs="true" failonerror="false">
+			<fileset dir="${installationDir}/p2/org.eclipse.equinox.p2.core" includes="cache/**" />
+		</delete>
 
+		<property name="profileDir" value="p2/org.eclipse.equinox.p2.engine/profileRegistry/${profile}.profile" />
+		
+		<!-- Strip some build artifacts from installation -->
+		<exec executable="sed" inputstring="${destDir}" outputproperty="destDirWithUnderscores" failonerror="true">
+			<arg value="s@/@_ at g" />
+		</exec>
+
+		<exec executable="sed" inputstring="${reposource}" outputproperty="reposourceWithUnderscores" failonerror="true">
+			<arg value="s@/@_ at g" />
+		</exec>
+		<exec executable="sed" inputstring="${provisionDir}" outputproperty="provisionDirWithUnderscores" failonerror="true">
+			<arg value="s@/@_ at g" />
+		</exec>
+		<apply executable="sed" failonerror="true" verbose="true">
+			<arg value="-i" />
+			<arg value="\@${destDir}@d;\@${destDirWithUnderscores}@d;\@${reposourceWithUnderscores}@d;\@${provisionDirWithUnderscores}@d" />
+			<srcfile />
+			<fileset dir="${installationDir}">
+				<include name="metadata/content.xml" />
+				<include name="p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs" />
+				<include name="p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.artifact.repository.prefs" />
+				<include name="${profileDir}/.data/.settings/org.eclipse.equinox.p2.metadata.repository.prefs" />
+				<include name="${profileDir}/.data/.settings/org.eclipse.equinox.p2.artifact.repository.prefs" />
+				<include name="eclipse.ini" />
+			</fileset>
+		</apply>
+
+		<!-- Clean up profile files -->
+		<echo message="${provisionDir}"/>
+		<apply executable="gunzip" failonerror="true" verbose="true">
+			<srcfile />
+			<fileset dir="${installationDir}/${profileDir}">
+				<include name="*.gz" />
+			</fileset>
+		</apply>
+		<apply executable="sed" failonerror="true" verbose="true">
+			<arg value="-i" />
+			<arg value="s@${provisionDir}@${installationDir}@g;s@${installationDir}@${prefix}/${libDir}/eclipse at g" />
+			<srcfile />
+			<fileset dir="${installationDir}/${profileDir}">
+				<include name="*.profile" />
+			</fileset>
+		</apply>
+		<apply executable="gzip" failonerror="true" verbose="true">
+			<srcfile />
+			<fileset dir="${installationDir}/${profileDir}">
+				<include name="*.profile" />
+			</fileset>
+		</apply>
+		
 		<!-- Move config file to /etc -->
 		<mkdir dir="${destDir}/etc" />
-		<move file="${destDir}${prefix}/${libDir}/eclipse/eclipse.ini" tofile="${destDir}/etc/eclipse.ini" />
-		<symlink link="${destDir}${prefix}/${libDir}/eclipse/eclipse.ini" resource="/etc/eclipse.ini" />
+		<move file="${installationDir}/eclipse.ini" tofile="${destDir}/etc/eclipse.ini" />
+		<symlink link="${installationDir}/eclipse.ini" resource="/etc/eclipse.ini" overwrite="true"/>
+
+	</target>
+
+	<target name="installPlatform" depends="provision.platform,install">
+		<echo message="Installing Eclipse Platform" />
+	</target>
+
+	<target name="installPlatformAndCVS" depends="provision.cvs,install">
+		<echo message="Installing Eclipse Platform and CVS feature" />
+	</target>
+
+	<target name="provisionSDKinDropins" depends="provision.cvs" unless="provisionSDKinDropins.complete">
+		<property name="platformAndCVSInstallation" value="${provisionDir}.cvs"/>
+		
+		<property name="jdtDropinsName" value="jdt"/>
+		<property name="sdkDropinsName" value="sdk"/>
+
+		<property name="jdtDropinsDir" value="${provisionDir}/dropins/${jdtDropinsName}"/>
+		<property name="sdkDropinsDir" value="${provisionDir}/dropins/${sdkDropinsName}"/>
+
+		<!-- make a copy of the clean platform+CVS installation -->
+		<exec executable="cp" failonerror="true">
+			<arg value="-rd" />
+			<arg value="--no-target-directory" />
+			<arg value="${provisionDir}" />
+			<arg value="${platformAndCVSInstallation}" />
+		</exec>
+
+		<!-- Install JDT -->
+		<property name="jdtInstallation" value="${provisionDir}.jdt"/>
+		<antcall target="provision.installed">
+			<param name="p2.director.installIU" value="org.eclipse.jdt.feature.group" />
+			<param name="profileName" value="PlatformProfile" />
+		</antcall>
+		<!-- rename the JDT installation -->
+		<move file="${provisionDir}"
+			tofile="${jdtInstallation}"/>
+		<!-- make a second copy of the clean JDT installation -->
+		<exec executable="cp" failonerror="true">
+			<arg value="-rd" />
+			<arg value="--no-target-directory" />
+			<arg value="${jdtInstallation}" />
+			<arg value="${jdtInstallation}.orig" />
+		</exec>
+		
+		<!-- restore clean platform+CVS installation -->
+		<exec executable="cp" failonerror="true">
+			<arg value="-rd" />
+			<arg value="--no-target-directory" />
+			<arg value="${platformAndCVSInstallation}" />
+			<arg value="${provisionDir}" />
+		</exec>
 		
+		<!-- Install SDK -->
+		<property name="sdkInstallation" value="${provisionDir}.sdk"/>
+		<antcall target="provision.installed">
+			<param name="p2.director.installIU" value="org.eclipse.sdk.feature.group" />
+			<param name="profileName" value="PlatformProfile" />
+		</antcall>
+		<!-- rename the entire SDK installation -->
+		<move file="${provisionDir}"
+			tofile="${sdkInstallation}"/>
+		
+		<!-- restore clean platform+CVS installation -->
+		<exec executable="cp" failonerror="true">
+			<arg value="-rd" />
+			<arg value="--no-target-directory" />
+			<arg value="${platformAndCVSInstallation}" />
+			<arg value="${provisionDir}" />
+		</exec>
+		
+		<!-- diff of platform+CVS and JDT goes into platform+CVS/dropins/jdt -->
+		<antcall target="moveNewStuffToDropins">
+			<param name="orig" value="${provisionDir}" />
+			<param name="new" value="${jdtInstallation}" />
+			<param name="dropinsDir" value="${jdtDropinsName}" />
+		</antcall>
+		
+		<!-- restore clean JDT installation for comparison -->
+		<delete dir="${jdtInstallation}" />
+		<move file="${jdtInstallation}.orig"
+			tofile="${jdtInstallation}"/>
+		
+		<!-- diff of JDT and SDK ... -->
+		<antcall target="moveNewStuffToDropins">
+			<param name="orig" value="${jdtInstallation}" />
+			<param name="new" value="${sdkInstallation}" />
+			<param name="dropinsDir" value="${sdkDropinsName}" />
+		</antcall>
+		<!-- ... goes into platform+CVS/dropins/pde -->
+		<move file="${jdtInstallation}/dropins/${sdkDropinsName}"
+			todir="${provisionDir}/dropins"/>
+		
+		<!-- Re-symlink system JARs -->
+		<fileset id="junit4.jar" dir="${jdtDropinsDir}/plugins">
+			<include name="**/org.junit4_**/junit.jar" />
+		</fileset>
+		<property name="junit4jar.path" refid="junit4.jar" />
+
+		<delete file="${jdtDropinsDir}/plugins/${junit4jar.path}" />
+		<symlink link="${jdtDropinsDir}/plugins/${junit4jar.path}" resource="${junit4JarLocation}" />
+
+		<symlinkInstalledOSGiJars dependencies="${basedir}/dependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/nonosgidependencies.properties" topLevelDir="${provisionDir}/plugins" />
+		
+		<symlinkInstalledOSGiJars dependencies="${basedir}/jdtdependencies.properties" topLevelDir="${jdtDropinsDir}/plugins" />
+		<symlinkNonOSGiJars dependencies="${basedir}/jdtnonosgidependencies.properties" topLevelDir="${jdtDropinsDir}/plugins" />
+		
+		<symlinkInstalledOSGiJars dependencies="${basedir}/sdkdependencies.properties" topLevelDir="${sdkDropinsDir}/plugins" />
+		
+		<delete dir="${platformAndCVSInstallation}" />
+		<delete dir="${jdtInstallation}" />
+		<delete dir="${sdkInstallation}" />
+
+		<echo file="provisionSDKinDropins-stamp" />
+	</target>
+
+	<target name="moveNewStuffToDropins">
+		<property name="dropinsDirectory" value="${orig}/dropins/${dropinsDir}" />		
+		<move todir="${dropinsDirectory}/features" includeemptydirs="true">
+			<fileset dir="${new}/features" id="newFeatures.fileset">
+				<present present="srconly" targetdir="${orig}/features"/>
+			</fileset>
+		</move>
+		<move todir="${dropinsDirectory}/plugins" includeemptydirs="true">
+			<fileset dir="${new}/plugins" id="newPlugins.fileset">
+				<present present="srconly" targetdir="${orig}/plugins"/>
+			</fileset>
+		</move>
 	</target>
 
 	<target name="package.extract.swt">
diff --git a/buildEclipseBuildSource.sh b/buildEclipseBuildSource.sh
old mode 100755
new mode 100644
index 28084d1..da0fc02
--- a/buildEclipseBuildSource.sh
+++ b/buildEclipseBuildSource.sh
@@ -2,9 +2,9 @@
 
 baseDir=$(pwd)
 workDirectory=
-eclipsebuildTag="R0_3_1"
+eclipsebuildTag="master"
 
-usage="usage:  <eclipse-build tag (ex. R0_3_1)> [-workdir <working directory>] [-eclipseBuildTag <eclipse-build tag to check out>]"
+usage="usage:  <eclipse-build tag (ex. 0.7.0)> [-workdir <working directory>] [-eclipseBuildTag <eclipse-build tag to check out>]"
 
 while [ $# -gt 0 ]
 do
@@ -29,16 +29,23 @@ fi
 
 echo "Going to create source tarball for eclipse-build ${eclipsebuildTag}."
 
-mkdir -p "${workDirectory}"
+mkdir "${workDirectory}"
 cd "${workDirectory}"
-svn export svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools/eclipse-build/tags/${eclipsebuildTag}/eclipse-build
-mv eclipse-build eclipse-build-${eclipsebuildTag}
+git clone git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.eclipse-build.git .
+cd "${workDirectory}"
+git archive --format=tar --prefix=eclipse-build-${eclipsebuildTag}/ ${eclipsebuildTag} | gzip >eclipse-build-${eclipsebuildTag}-tmp.tar.gz 
+tar -xf eclipse-build-${eclipsebuildTag}-tmp.tar.gz
 cd eclipse-build-${eclipsebuildTag}
+mv eclipse-build eclipse-build-${eclipsebuildTag}
 rm -rf .project .settings
-svn export svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools/eclipse-build/tags/${eclipsebuildTag}/eclipse-build-config
-svn export svn://dev.eclipse.org/svnroot/technology/org.eclipse.linuxtools/eclipse-build/tags/${eclipsebuildTag}/eclipse-build-feature
+mv -f eclipse-build-config eclipse-build-${eclipsebuildTag}
+mv -f eclipse-build-feature eclipse-build-${eclipsebuildTag}
+mv -f eclipse-build-${eclipsebuildTag}/* .
+rm -fr eclipse-build-${eclipsebuildTag}
 cd ..
-tar czf eclipse-build-${eclipsebuildTag}.tar.gz eclipse-build-${eclipsebuildTag}
+
+
+tar caf eclipse-build-${eclipsebuildTag}.tar.bz2 eclipse-build-${eclipsebuildTag}
 cd "${baseDir}"
 
-echo "Built ${workDirectory}/eclipse-build-${eclipsebuildTag}.tar.gz"
+echo "Built ${workDirectory}/eclipse-build-${eclipsebuildTag}.tar.bz2"
diff --git a/buildSDKSource.sh b/buildSDKSource.sh
old mode 100755
new mode 100644
index 98f5bbe..677846c
--- a/buildSDKSource.sh
+++ b/buildSDKSource.sh
@@ -6,13 +6,12 @@ workDirectory=
 baseBuilder=
 eclipseBuilder=
 
-buildID="R3_5_2"
-baseBuilderTag="R3_5"
-eclipseBuilderTag="R3_5_2"
-label="3.5.2"
+buildID="R3_6_2"
+baseBuilderTag="R3_6_1"
+eclipseBuilderTag="R3_6_1"
+label="3.6.2"
 fetchTests="yes"
-equinoxTag="R35x_v20100209"
-ecfTag="v20090831-1453"
+ecfTag="R-Release_3_3-sdk_feature-22-2010_09_13"
 
 usage="usage:  <build ID> [-workdir <working directory>] [-baseBuilder <path to org.eclipse.releng.basebuilder checkout>] [-eclipseBuilder <path to org.eclipse.releng.eclipsebuilder checkout>] [-baseBuilderTag <org.eclipse.releng.basebuilder tag to check out>] [-noTests]"
 
@@ -83,6 +82,7 @@ if [ ! -e ${eclipseBuilder} ]; then
   cvs -d${cvsRepo} co -r ${eclipseBuilderTag} org.eclipse.releng.eclipsebuilder
   cd "${eclipseBuilder}"
   patch -p0 < "${baseDir}"/patches/eclipse-addFetchMasterAndTestsTargets.patch
+  patch -p0 < "${baseDir}"/patches/eclipse-removeSkipMapsCheck.patch
   cd "${baseDir}"
 fi
 
@@ -121,40 +121,41 @@ fetchMasterFeature \
 
 cd "${fetchDirectory}"
 
-mkdir ecf-src
+# Extract osgi.util src for rebuilding
+pushd plugins/org.eclipse.osgi.util
+  unzip -q -d src src.zip
+popd
 
-# Source for ECF bits that aren't part of SDK map files
+git clone git://git.eclipse.org/gitroot/ecf/org.eclipse.ecf.git
+cd org.eclipse.ecf
+git archive --format=tar --prefix=ecf-3.4.0/ R-Release_3_4-sdk_feature-8_2010-10-29_09-13-51 | gzip >ecf-3.4.0.tar.gz
+cp ecf-3.4.0.tar.gz ../
+cd ..
+rm -fr org.eclipse.ecf
+tar -xf ecf-3.4.0.tar.gz
+rm -fr ecf-3.4.0.tar.gz
+cd ecf-3.4.0
+
+# Source for ECF bthat aren't part of SDK map files
 for f in \
     org.eclipse.ecf \
     org.eclipse.ecf.filetransfer \
     org.eclipse.ecf.identity \
     org.eclipse.ecf.ssl \
 ; do
-cvs -d :pserver:anonymous at dev.eclipse.org:/cvsroot/rt \
-export -r ${ecfTag} org.eclipse.ecf/framework/bundles/$f;
+mv framework/bundles/$f ../plugins;
 done
 
-mv org.eclipse.ecf/framework/bundles/* ecf-src
-rm -fr org.eclipse.ecf/framework
-
 for f in \
     org.eclipse.ecf.provider.filetransfer \
     org.eclipse.ecf.provider.filetransfer.httpclient \
     org.eclipse.ecf.provider.filetransfer.httpclient.ssl \
     org.eclipse.ecf.provider.filetransfer.ssl \
 ; do
-cvs -d :pserver:anonymous at dev.eclipse.org:/cvsroot/rt \
-export -r ${ecfTag} org.eclipse.ecf/providers/bundles/$f;
+mv  providers/bundles/$f ../plugins;
 done
-
-mv org.eclipse.ecf/providers/bundles/* ecf-src
-rm -fr org.eclipse.ecf
-
-cvs -d :pserver:anonymous at dev.eclipse.org:/cvsroot/rt \
-export -r ${buildID} org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent;
-
-mv org.eclipse.equinox/components/bundles/* ecf-src
-rm -rf org.eclipse.equinox
+cd ..
+rm -fr ecf-3.4.0
 
 cd "${fetchDirectory}"
 # We don't want to re-ship these as those bundles inside will already be
@@ -184,6 +185,9 @@ rm fetch_*
 rm -rf features/org.eclipse.sdk.examples
 rm -rf plugins/*.examples*
 
+# Remove temporary files
+find -name '*.orig' -delete
+
 # Remove empty directories
 find -type d -empty -delete
 
@@ -206,6 +210,7 @@ java -jar \
 fetchSdkTestsFeature \
 -DbuildDirectory="${fetchDirectory}" \
 -DskipBase=true \
+-Dhuson=true \
 -DmapsRepo=${cvsRepo} \
 -DmapCvsRoot=${cvsRepo} \
 -DmapsCvsRoot=${cvsRepo} \
diff --git a/debian/changelog b/debian/changelog
index 45ff6f0..5a1769d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,61 @@
+eclipse (3.6.2~exp-1) experimental; urgency=low
+
+  [ Anders Kaseorg ]
+  * debian/patches/gnomeproxy-pkg-config.patch: Use pkg-config to find
+    include files and libraries for libgnomeproxy.  (LP: #749218)
+
+  [ Benjamin Drung ]
+  * New upstream version (Closes: #587742, LP: #604390).
+    - Allows kernels with weird versions (LP: #600584).
+  * Use a svn e3.6 branch snapshot of eclipse-build.
+  * Drop four backported patches.
+  * Drop fix-shell-script-perm.patch.
+  * Refresh remaining patches.
+  * Drop removed plugins and install new plugins.
+  * Drop uname workaround.
+  * Add six new patches.
+  * Add three patches that moves commands from debian/rules into the ant build
+    process.
+  * Drop seven patches that are accepted upstream.
+
+  [ Niels Thykier ]
+  * Removed Adrian Perez, thanks for your support.
+  * Updated debian/copyright.
+  * Bumped B-D on icu4j.
+  * Added B-D to build swt with webkit support.
+  * Use mh_clean to clean up after the maven-repo-helper.
+  * Pulled the eclipse-platform.NEWS from the master branch and removed the
+    old NEWS file.
+  * Reduced eclipse-plugins-cvs to a Suggests for eclipse-jdt.  (LP: #657286)
+  * Made eclipse-plugin-cvs an architecture all package.
+  * Made SWT load its JNI from well defined location to prevent occasional
+    extraction to ~/.eclipse.
+
+  [ Andres Mejia ]
+  * Numerous changes to eclipse packaging just to get eclipse building using
+    sbuild.
+    - Changes introduced to eclipse so that it builds with latest ant (1.8.2).
+      This required updating eclipse-build-generatedScripts.tar.bz2 inside the
+      debian directory and reactivating the
+      eclipse-build-generatedScripts.patch. This also requires renaming
+      eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145 to
+      eclipse/plugins/org.apache.ant_1.8.2.v20101227-1145 during build time.
+    - Ensure osgi.services is built. This requires activating the
+      osgi-services-symlink-javax.patch.
+    - In the patch to generate metadata and extract the swt libraries, the
+      option -Declipse.p2.data.area should not be used. Also, the value passed
+      with -profile should be SDKProfile.
+  * Refresh patches and update descriptions.
+  * Install swt*.jar symlinks in eclipse-platform package.
+  * Add myself as Uploader.
+  * Bump to Standards-Version 3.9.2.
+  * Include needed dependency on libswt-gtk-3.6-jni for eclipse-rcp.
+  * Update eclipse script for new upstream release.
+  * Update script to implement better search for *.prefs files.
+  * Fix generation of metadata needed to be able to install third party plugins.
+
+ -- Andres Mejia <mcitadel at gmail.com>  Sun, 08 May 2011 22:06:51 -0400
+
 eclipse (3.5.2-10) unstable; urgency=low
 
   [ Benjamin Drung ]
diff --git a/debian/control b/debian/control
index 24708fb..a6b177a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,8 @@ Priority: optional
 Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Niels Thykier <niels at thykier.net>,
            Benjamin Drung <bdrung at debian.org>,
-           Adnan Hodzic <adnan at foolcontrol.org>
+           Adnan Hodzic <adnan at foolcontrol.org>,
+           Andres Mejia <mcitadel at gmail.com>
 Build-Depends: ant (>= 1.8.2),
                ant-optional,
                debhelper (>= 7.0.50~),
@@ -25,7 +26,7 @@ Build-Depends: ant (>= 1.8.2),
                libgnomeui-dev,
                libgtk2.0-dev,
                libhamcrest-java (>= 1.1-8~),
-               libicu4j-java (>= 4.0.1.1),
+               libicu4j-4.2-java (>= 4.2),
                libjasper-java,
                libjetty-java (>= 6.1.24-4~),
                libjsch-java (>= 0.1.37-3),
@@ -33,6 +34,7 @@ Build-Depends: ant (>= 1.8.2),
                liblucene2-java (<< 2.9.5),
                libpango1.0-dev,
                libservlet2.5-java (>= 6.0.20-8),
+               libwebkit-dev,
                libxt-dev,
                libxtst-dev,
                lsb-release,
@@ -71,13 +73,12 @@ Package: eclipse-jdt
 Architecture: any
 Depends: default-jre | java5-runtime | java6-runtime,
          eclipse-platform (= ${binary:Version}),
-         eclipse-plugin-cvs (= ${binary:Version}),
          junit (>= 3.8.2-4),
          junit4 (>= 4.7-3),
          libhamcrest-java (>= 1.1-8~),
          ${misc:Depends}
 Recommends: default-jdk | sun-java6-jdk
-Suggests: eclipse
+Suggests: eclipse, eclipse-plugin-cvs (>= ${source:Version})
 Replaces: eclipse-jdt-gcj
 Description: Eclipse Java Development Tools (JDT)
  The Eclipse Platform is an open and extensible platform for anything and yet
@@ -145,10 +146,10 @@ Replaces: eclipse-jdt (<< 3.5.1+repack~3),
           eclipse-source (<= 3.1.1-3),
           libeclipse-jni
 Breaks: eclipse-source (<= 3.1.1-3)
-Conflicts: eclipse-platform-common,
-           libeclipse-jni,
+Conflicts: eclipse-common-nls,
+           eclipse-platform-common,
            eclipse-platform-nls,
-           eclipse-common-nls
+           libeclipse-jni
 Suggests: eclipse-jdt
 Description: Eclipse platform without plug-ins to develop any language
  The Eclipse Platform is an open and extensible platform for anything and yet
@@ -193,9 +194,9 @@ Description: Eclipse platform without plug-ins to develop any language (data)
  This package contains the architecture-independent data files.
 
 Package: eclipse-plugin-cvs
-Architecture: any
+Architecture: all
 Depends: default-jre | java5-runtime | java6-runtime,
-         eclipse-platform (= ${binary:Version}),
+         eclipse-platform (>= ${source:Version}),
          ${misc:Depends}
 Replaces: eclipse-cvs
 Description: Eclipse Team Integration (CVS support)
@@ -212,18 +213,18 @@ Package: eclipse-rcp
 Architecture: any
 Depends: default-jre | java5-runtime | java6-runtime,
          libequinox-osgi-java (= ${source:Version}),
-         libicu4j-java (>= 4.0.1.1),
-         ${shlibs:Depends},
-         ${misc:Depends}
+         libicu4j-4.2-java (>= 4.2),
+         ${misc:Depends},
+         ${shlibs:Depends}
 Recommends: ${shlibs:Recommends}
 Suggests: eclipse
 Replaces: eclipse-rcp-gcj,
-          libswt3.2-gtk-java,
-          libswt3.2-gtk-gcj,
-          libswt3.2-gtk-jni,
           libswt-gtk-3.4-java,
           libswt-gtk-3.4-jni,
-          libswt-gtk-3.5-jni (<< 3.5.1+repack)
+          libswt-gtk-3.5-jni (<< 3.5.1+repack),
+          libswt3.2-gtk-gcj,
+          libswt3.2-gtk-java,
+          libswt3.2-gtk-jni
 Description: Eclipse Rich Client Platform (RCP)
  The Eclipse Platform is an open and extensible platform for anything and yet
  nothing in particular. It provides a foundation for constructing and running
@@ -247,8 +248,7 @@ Section: java
 Depends: ${misc:Depends}
 Recommends: libservlet2.5-java
 Breaks: eclipse-rcp (<< 3.5.1-0ubuntu3)
-Replaces: eclipse-platform-gcj,
-          eclipse-rcp-gcj
+Replaces: eclipse-platform-gcj, eclipse-rcp-gcj
 Description: Equinox OSGi framework
  The Eclipse Platform is an open and extensible platform for anything and yet
  nothing in particular. It provides a foundation for constructing and running
@@ -258,4 +258,3 @@ Description: Equinox OSGi framework
  .
  This package includes only the Eclipse Equinox OSGi framework, which can
  be used outside Eclipse.
-
diff --git a/debian/copyright b/debian/copyright
index 871171d..e8f5490 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -18,74 +18,160 @@ Copyright: 2008-2009, Adobe Systems, Inc. and others
            2007-2008, Brad Reynolds and others
            2008, Bredex GmbH and others
            2006-2009, Cerner Corporation and others
-           2006-2009, Cloudsmith Inc
+           2006-2010, Cloudsmith Inc
+           2009, Cloudsmith Inc and others
            2009, Cloudsmith Inc, and other
-           2009, Cloudsmith Inc. and others
+           2009-2010, Cloudsmith Inc. and others
            2009, Cloudsmith and others
-           2008-2009, Code 9 Corporation and others
-           2008-2009, Code 9 and others
+           2008-2010, Code 9 Corporation and others
+           2008-2010, Code 9 and others
            2006, Cognos Incorporated
            2006-2008, Cognos Incorporated, IBM Corporation
-           2004-2008, Composent, Inc
-           2004-2009, Composent, Inc. and others
-           2004-2009, Composent, Inc., IBM
+           2004-2010, Composent, Inc
+           2004-2010, Composent, Inc. and others
+           2004-2010, Composent, Inc., IBM
            2004, Composent, Inc., Peter Nehrer, Boris Bokowski
            2008, Cypal Solutions
            2009, Daniel Le Berre and others
-           2004-2006, Eclipse Foundation and others
-           2008-2009, EclipseSource Corporation and others
-           2008-2009, EclipseSource and others
+           2004-2010, Eclipse Foundation and others
+           2008-2010, EclipseSource Corporation and others
+           2008-2010, EclipseSource and others
            2009, EclipseSource, Inc
            2007-2008, Ecliptical Software Inc. and others
-           2009, Eric Rizzo and others
+           2009-2010, Eric Rizzo and others
+           2008-2010, Freescale Semiconductor and others
            2002-2008, GEBIT Gesellschaft fuer EDV-Beratung
            2008-2009, Genuitec, LLC and others
            2005-2008, Gunnar Wagenknecht and others
-           1999-2009, IBM Corporation
+           2008-2009, Heiko Seeberger and others
+           1999-2010, IBM Corporation
            2000-2007, IBM Corporation, BEA Systems, Inc., and others
-           2000-2009, IBM and others.
+           2000-2010, IBM and others.
            2007, IBM, Composent Inc. and others
            2006, IBM, Inc and Composent, Inc
-           2005-2008, Intel Corporation and others
+           2005-2010, Intel Corporation and others
            2007, JCraft,Inc. and others
            2008, Jay Rosenthal
            2008, Jay Rosenthal and others
            2000-2006, John-Mason P. Shackelford and others
            2000-2007, Keith Seitz and others
-           2005, Maik Schreiber
+           2005-2006, Maik Schreiber
            2008, Marko Topolnik and others
-           2008-2009, Mateusz Matela and others
+           2008-2009, Martin Lippert and others
+           2008-2010, Mateusz Matela and others
            2005-2009, Matt Carter and others
            2000-2005, Matt Conway and others
-           2007, Matthew Conway and others
-           2007-2009, Matthew Hall and others
+           2007-2009, Matthew Conway and others
+           2007-2010, Matthew Hall and others
            2008, Micah Hainline and others
-           2008-2009, Oakland Software Incorporated and others
+           2008-2010, Oakland Software Incorporated and others
            2009, Oakland Software and others
            2002-2006, Object Factory Inc
+           2009-2010, Ovidio Mallo and others
            2008-2009, Peter Centgraf and others
-           1997-2009, ProSyst Software GmbH
+           1997-2010, ProSyst Software GmbH
            2004-2008, QNX Software Systems and others
            2010, Red Hat Inc. and others
-           2004-2008, Red Hat Incorporated and others
+           2004-2010, Red Hat Incorporated and others
+           2010, Red Hat and others
            2005-2007, Remy Suen
            2004-2009, Richard Hoefter and others
+           2010, Sonatype, Inc and others
+           2009, SpringSource and others
+           2009, Task top Technologies and others
+           2004-2010, Tasktop Technologies and others
+           2009-2010, Texas Instruments and others
            2009, ThoughtWorks, Inc. and others
            2006-2009, Tom Schindl and others
            2008, Versant Corporation
-           2008-2009, Versant Corporation. and others
+           2008-2010, Versant Corporation. and others
            2009, Vladimir Piskarev and others
-           2006-2009, Wind River Systems and others
-           2007-2008, Wind River Systems, Inc. and others
+           2006-2010, Wind River Systems and others
+           2007-2010, Wind River Systems, Inc. and others
            2007-2008, aQute and others
            2007-2009, compeople AG and others
            2005-2008, db4objects Inc. (http://www.db4o.com) and others
            2005-2009, db4objects Inc. http://www.db4o.com
            2005-2007, db4objects Inc. http://www.db4o.com and others
+           2009, eXXcellent solutions gmbh and others
+           2009, eXXcellent solutions gmbh, EclipseSource Corporation
 License: EPL-1.0
 
+Files: "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_custom.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_custom.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/Platform.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/*",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GInterfaceInfo.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GObjectClass.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeInfo.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTypeQuery.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkColor.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkDragContext.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventProperty.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventScroll.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventVisibility.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGCValues.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkImage.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkVisual.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAdjustment.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAllocation.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBorder.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCombo.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFixed.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkSelectionData.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkTargetEntry.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkTargetPair.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidgetClass.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoAttrColor.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoAttrInt.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoAttribute.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoItem.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoLayoutLine.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoLayoutRun.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoLogAttr.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/PangoRectangle.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif_gtk/library/*",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/*",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/org/eclipse/swt/internal/gnome/*",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/*",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/*"
+Copyright: 2000-2010, IBM Corporation and others
+License: LGPL-2.1
+
 Files: eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/*,
        eclipse/plugins/org.eclipse.equinox.app/src/org/osgi/service/application/*,
+       eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/*,
        eclipse/plugins/org.eclipse.equinox.preferences/src/org/osgi/service/prefs/*,
        eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ReferenceMap.java,
        eclipse/plugins/org.eclipse.help.base/src_demo/org/apache/lucene/demo/html/*,
@@ -150,6 +236,7 @@ Files: "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/s
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMUIEvent.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMWindow.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDOMWindowCollection.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDataType.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDirectoryService.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider2.java",
@@ -172,6 +259,7 @@ Files: "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/s
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIInterfaceRequestor.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIJSContextStack.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsILocalFile.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIMemory.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIObserverService.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIPrefBranch.java",
@@ -187,6 +275,7 @@ Files: "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/s
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISSLStatus.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager_1_9.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager_1_9_1.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISecurityCheckedComponent.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISerializable.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIServiceManager.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISimpleEnumerator.java",
@@ -212,6 +301,7 @@ Files: "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/s
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWindowCreator.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWindowCreator2.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWindowWatcher.java",
+       "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509Cert.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java",
        "eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIXPCSecurityManager.java",
@@ -271,6 +361,12 @@ Files: debian/*
 Copyright: 2010, Debian Orbital Alignment Team <pkg-java-maintainers at lists.alioth.debian.org>
 License: EPL-1.0
 
+License: LGPL-2.1
+ On Debian systems, the full text of the GNU
+ Lesser General Public License (LGPL) version
+ 2.1 can be found in the file
+ `/usr/share/common-licenses/LGPL-2.1'.
+
 License: Apache-2.0
  On Debian systems, the full text of the Apache
  License version 2 can be found in the file
@@ -964,4 +1060,3 @@ License: MPL-v1.1
       the notices in the Source Code files of the Original Code. You should
       use the text of this Exhibit A rather than the text found in the
       Original Code Source Code for Your Modifications.]
- 
diff --git a/debian/eclipse-build-generatedScripts.tar.bz2 b/debian/eclipse-build-generatedScripts.tar.bz2
index f02282e..8b28cfa 100644
Binary files a/debian/eclipse-build-generatedScripts.tar.bz2 and b/debian/eclipse-build-generatedScripts.tar.bz2 differ
diff --git a/debian/eclipse-jdt.install b/debian/eclipse-jdt.install
index 144a991..c7a2250 100644
--- a/debian/eclipse-jdt.install
+++ b/debian/eclipse-jdt.install
@@ -1,5 +1,6 @@
 usr/*/eclipse/features/org.eclipse.jdt.source_*
 usr/*/eclipse/features/org.eclipse.jdt_*
+usr/lib/eclipse/plugins/junit4.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.apt.core.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.apt.core_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core.source_*.jar
@@ -20,6 +21,8 @@ usr/lib/eclipse/plugins/org.eclipse.jdt.debug.ui_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.debug_*
 usr/lib/eclipse/plugins/org.eclipse.jdt.doc.isv_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.doc.user_*.jar
+usr/lib/eclipse/plugins/org.eclipse.jdt.junit.core.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.jdt.junit.core_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.junit.runtime.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.junit.runtime_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.junit.source_*.jar
@@ -33,5 +36,6 @@ usr/lib/eclipse/plugins/org.eclipse.jdt.ui.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt.ui_*.jar
 usr/lib/eclipse/plugins/org.eclipse.jdt_*.jar
 usr/lib/eclipse/plugins/org.hamcrest.core_*.jar
+usr/lib/eclipse/plugins/org.junit4/junit.jar
 usr/lib/eclipse/plugins/org.junit4_*
 usr/lib/eclipse/plugins/org.junit_*
diff --git a/debian/eclipse-pde.install b/debian/eclipse-pde.install
index a9e16e1..3238841 100644
--- a/debian/eclipse-pde.install
+++ b/debian/eclipse-pde.install
@@ -16,6 +16,8 @@ usr/lib/eclipse/plugins/org.eclipse.pde.ds.ui.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.ds.ui_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.junit.runtime.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.junit.runtime_*.jar
+usr/lib/eclipse/plugins/org.eclipse.pde.launching.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.pde.launching_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.runtime.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.runtime_*.jar
 usr/lib/eclipse/plugins/org.eclipse.pde.source_*.jar
diff --git a/debian/eclipse-platform-data.install b/debian/eclipse-platform-data.install
index 3e9a184..6320d14 100644
--- a/debian/eclipse-platform-data.install
+++ b/debian/eclipse-platform-data.install
@@ -1,18 +1,20 @@
 usr/lib/eclipse/plugins/org.eclipse.ant.core.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.ant.launching.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.ant.launching_*.jar
 usr/lib/eclipse/plugins/org.eclipse.ant.ui.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.compare.core.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.compare.core_*.jar
 usr/lib/eclipse/plugins/org.eclipse.compare.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.compare_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.boot_*.jar
+usr/lib/eclipse/plugins/org.eclipse.core.externaltools.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.core.externaltools_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.filebuffers.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.filebuffers_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.filesystem.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.filesystem_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.net.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.net_*.jar
-usr/lib/eclipse/plugins/org.eclipse.core.resources.compatibility.source_*.jar
-usr/lib/eclipse/plugins/org.eclipse.core.resources.compatibility_*
 usr/lib/eclipse/plugins/org.eclipse.core.resources.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_*
@@ -42,6 +44,8 @@ usr/lib/eclipse/plugins/org.eclipse.ecf.ssl_*.jar
 usr/lib/eclipse/plugins/org.eclipse.ecf_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.concurrent.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.concurrent_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.event.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.event_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.frameworkadmin.source_*.jar
@@ -69,8 +73,6 @@ usr/lib/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.engine.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.engine_*.jar
-usr/lib/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup.source_*.jar
-usr/lib/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector.source_*.jar
@@ -80,7 +82,11 @@ usr/lib/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.metadata.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.metadata_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.p2.operations.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.p2.operations_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.publisher.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.p2.ql.source_*.jar
+usr/lib/eclipse/plugins/org.eclipse.equinox.p2.ql_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins_*.jar
 usr/lib/eclipse/plugins/org.eclipse.equinox.p2.repository.source_*.jar
diff --git a/debian/eclipse-platform.install b/debian/eclipse-platform.install
index 282dbaf..308707f 100644
--- a/debian/eclipse-platform.install
+++ b/debian/eclipse-platform.install
@@ -1,3 +1,5 @@
+debian/reportbug/eclipse-platform usr/share/bug/
+debian/source_eclipse.py usr/share/apport/package-hooks
 etc
 usr/bin
 usr/lib/eclipse/.eclipseproduct
@@ -5,7 +7,6 @@ usr/lib/eclipse/artifacts.xml
 usr/lib/eclipse/configuration/config.ini
 usr/lib/eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
 usr/lib/eclipse/configuration/org.eclipse.equinox.source
-usr/lib/eclipse/configuration/org.eclipse.update/
 usr/lib/eclipse/eclipse
 usr/lib/eclipse/eclipse.ini
 usr/lib/eclipse/features/org.eclipse.equinox.p2.user.ui.source_*
@@ -48,7 +49,6 @@ usr/lib/eclipse/plugins/org.mortbay.jetty.util_*.jar
 usr/lib/eclipse/plugins/org.sat4j.core_*.jar
 usr/lib/eclipse/plugins/org.sat4j.pb_*.jar
 usr/lib/eclipse/startup.jar
+usr/lib/eclipse/swt*.jar
 usr/share/applications
 usr/share/man
-debian/source_eclipse.py usr/share/apport/package-hooks
-debian/reportbug/eclipse-platform usr/share/bug/
diff --git a/debian/eclipse-plugin-cvs.install b/debian/eclipse-plugin-cvs.install
index 8412ce3..229dcc8 100644
--- a/debian/eclipse-plugin-cvs.install
+++ b/debian/eclipse-plugin-cvs.install
@@ -4,10 +4,8 @@ usr/lib/eclipse/plugins/org.eclipse.cvs.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.cvs_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.core.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.core_*.jar
-usr/lib/eclipse/plugins/org.eclipse.team.cvs.ssh.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.ssh2.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.ssh2_*.jar
-usr/lib/eclipse/plugins/org.eclipse.team.cvs.ssh_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.ui.source_*.jar
 usr/lib/eclipse/plugins/org.eclipse.team.cvs.ui_*.jar
 usr/share/eclipse/features/org.eclipse.cvs.source_*
diff --git a/debian/eclipse-rcp.install b/debian/eclipse-rcp.install
index ce10a87..d978c9e 100644
--- a/debian/eclipse-rcp.install
+++ b/debian/eclipse-rcp.install
@@ -1,6 +1,6 @@
+eclipse/plugins/org.eclipse.swt/about_files/IJG_README usr/lib/eclipse/about_files
 usr/*/eclipse/features/org.eclipse.rcp.source_*
 usr/*/eclipse/features/org.eclipse.rcp_*
-eclipse/plugins/org.eclipse.swt/about_files/IJG_README usr/lib/eclipse/about_files
 usr/lib/eclipse/configuration/org.eclipse.osgi/
 usr/lib/eclipse/plugins/com.ibm.icu_*.jar
 usr/lib/eclipse/plugins/org.eclipse.core.commands.source_*.jar
diff --git a/debian/exclude_patterns.txt b/debian/exclude_patterns.txt
deleted file mode 100644
index f5fb22d..0000000
--- a/debian/exclude_patterns.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-*.png
-*.gif
-*.jpg
-*.bmp
diff --git a/debian/extra/bin/uname b/debian/extra/bin/uname
deleted file mode 100644
index c44b74b..0000000
--- a/debian/extra/bin/uname
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-uname "$@"
-RET=$?
-
-if [ $? != 0 ] ; then
-   exit $RET
-fi
-
-RESULT=`uname "$@"`
-
-if [ "x$RESULT" = "xunknown" ] ; then
-   exit 1
-fi
-
-exit 0
diff --git a/debian/extra/copyright-gen.pl b/debian/extra/copyright-gen.pl
index 5b267da..6b99e0f 100755
--- a/debian/extra/copyright-gen.pl
+++ b/debian/extra/copyright-gen.pl
@@ -3,30 +3,48 @@
 use strict;
 use warnings;
 
+my $licpatterns = {
+    'LGPL-2.1' => qr/GNU Lesser General Public License \(LGPL\) Version 2.1/o,
+    'EPL-1.0' => qr/Eclipse Public License v1.0/o,
+};
 my $assumed = "EPL-1.0";
 my $dcp = 'IBM\s+Corporation\s*,?\s*and\s+others?';
 my $curFile = '';
 
-my $lic = {$assumed => {'IBM and others.' => ["2000-2009"]},
+my $lic = {$assumed => {'IBM and others.' => ["2000-2010"]},
            "Apache (v2.0)" => {"Apache Software Foundation" => [[], ["eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antrun.p[ly]",
 								     "eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun.pl", 
-								     "eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl"]]} };
-my $lf = {'eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin' => [4, "Apache (v2.0)"] };
+								     "eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl",
+								     "eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/*"]]} };
+my $lf = {
+    'eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin' => [4, "Apache (v2.0)"],
+    'eclipse/plugins/org.eclipse.equinox.ds/src/org/apache' => [1, "Apache (v2.0)"],
+};
 my $slash = '/';
 my $at = '@';
 
 open(CP, "licensecheck -r --copyright * | ") or choke("Cannot run licensecheck: $!");
 
 while(my $line = <CP>){
+    my ($file, $license);
     chomp($line);
     next if($line eq '');
-    $line =~ s/UNKNOWN/$assumed/og;	
+    if($line =~ m/UNKNOWN/o){
+        ($file, undef) = split(/:\s*+/o, $line, 2);
+        $license = read_license($file);
+        if(!defined($license)){
+            print STDERR "I: Cannot find the license of $file, assuming $assumed\n" unless($file =~ m@^debian/@o or $file =~ m/templates/o);
+            $license = $assumed;
+        }
+    } else {
+        ($file, $license) = split(/:\s*+/o, $line);
+        $license =~ s/\s+$//o;
+    }
 
     if($line !~ m/\*No copyright\*/){
 	my $cpline = <CP>;
-	my ($file, $license) = split(/:\s*+/o, $line);
 	my @cps = ();
-	$license =~ s/\s+$//o;
+
 	next if($license =~ m/GENERATED FILE/o);
 	next if($file =~ m@^debian/@o or $file =~ m at eclipse/plugins/org.eclipse.jdt.apt.core/src/com/sun/mirror/@o);
 	if($file =~m at eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/@){
@@ -209,6 +227,27 @@ close(CP);
 
 exit(0);
 
+sub read_license{
+    my $file = shift;
+    my $i = 0;
+    my $limit = 15;
+    my $l = undef;
+    open(my $fd,  "<", $file) or die("$file: $!");
+    READ: while( my $line = <$fd> ){
+        chomp($line);
+        while ( my ($lic, $pat) = each(%$licpatterns) ){
+            if($line =~ $pat){
+                $l = $lic;
+                last READ;
+            }
+        }
+        $i++;
+        last READ if($i >= $limit)
+    }
+    close($fd);
+    return $l;
+}
+
 sub choke{
     my $msg = shift;
     print STDERR "$msg\n";
diff --git a/debian/extra/eclipse b/debian/extra/eclipse
index 9b20395..a5bcc8a 100644
--- a/debian/extra/eclipse
+++ b/debian/extra/eclipse
@@ -15,10 +15,10 @@ inject_update_site(){
 	return 1
     fi
     cat - >>"$1" <<EOF
-repositories/http\:__download.eclipse.org_releases_galileo/enabled=true
-repositories/http\:__download.eclipse.org_releases_galileo/isSystem=false
-repositories/http\:__download.eclipse.org_releases_galileo/nickname=Galileo Update Site
-repositories/http\:__download.eclipse.org_releases_galileo/uri=http\://download.eclipse.org/releases/galileo/
+repositories/http\:__download.eclipse.org_releases_helios/enabled=true
+repositories/http\:__download.eclipse.org_releases_helios/isSystem=false
+repositories/http\:__download.eclipse.org_releases_helios/nickname=Helios Update Site
+repositories/http\:__download.eclipse.org_releases_helios/uri=http\://download.eclipse.org/releases/helios/
 EOF
 
 }
@@ -26,12 +26,15 @@ EOF
 
 if [ ! -d ~/.eclipse/ ] ; then
     $ECLIPSE -clean -initialize || exit $?
-    settings=`echo ~/.eclipse/org.eclipse.platform_*/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/.data/.settings/`
-    if [ ! -d "$settings" ] ; then
+    artifact=$(find ~/.eclipse \
+        -name org.eclipse.equinox.p2.artifact.repository.prefs)
+    metadata=$(find ~/.eclipse \
+        -name org.eclipse.equinox.p2.metadata.repository.prefs)
+    if [ -z "$artifact" ] || [ -z "$metadata" ]; then
 	echo "W: Cannot inject update-sites, cannot find the correct config." 2>&1
     else
-	( inject_update_site "$settings/org.eclipse.equinox.p2.metadata.repository.prefs" && \
-	  inject_update_site "$settings/org.eclipse.equinox.p2.artifact.repository.prefs" && \
+	( inject_update_site "$artifact" && \
+	  inject_update_site "$metadata" && \
 	  echo "I: Injected update sites" ) || echo "W: Could not inject update sites." 2>&1
     fi
 fi
diff --git a/debian/extra/generate-copyright.sh b/debian/extra/generate-copyright.sh
index 07b1ae6..90ffd4b 100755
--- a/debian/extra/generate-copyright.sh
+++ b/debian/extra/generate-copyright.sh
@@ -14,6 +14,12 @@ EOF
 perl debian/extra/copyright-gen.pl >> debian/copyright
 
 cat <<EOF >> debian/copyright
+License: LGPL-2.1
+ On Debian systems, the full text of the GNU
+ Lesser General Public License (LGPL) version
+ 2.1 can be found in the file
+ \`/usr/share/common-licenses/LGPL-2.1'.
+
 License: Apache-2.0
  On Debian systems, the full text of the Apache
  License version 2 can be found in the file
diff --git a/debian/extra/repack_jars.sh b/debian/extra/repack_jars.sh
new file mode 100755
index 0000000..1ba2837
--- /dev/null
+++ b/debian/extra/repack_jars.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+PLUGINS="$1"
+
+
+for P in "$PLUGINS"/org.eclipse.swt.gtk.*.jar ; do
+    if echo "$P" | grep -q ".source_" ; then
+	# skip source jars.
+	continue
+    fi
+    zip -d "$P" "*.so" "*.xpt"
+done
+
diff --git a/debian/extract_patterns.txt b/debian/extract_patterns.txt
deleted file mode 100644
index 5d0d319..0000000
--- a/debian/extract_patterns.txt
+++ /dev/null
@@ -1 +0,0 @@
-.* = *.so
diff --git a/debian/gbp.conf b/debian/gbp.conf
index a7cda7e..587f768 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,2 +1,7 @@
 [DEFAULT]
-compression=bzip2
+compression = bzip2
+upstream-branch = upstream
+debian-branch = master
+
+[git-dch]
+meta = True
diff --git a/debian/patches/add-o.e.equinox.concurrent.patch b/debian/patches/add-o.e.equinox.concurrent.patch
index 3c02190..3cffcfb 100644
--- a/debian/patches/add-o.e.equinox.concurrent.patch
+++ b/debian/patches/add-o.e.equinox.concurrent.patch
@@ -2,16 +2,14 @@ Description: Adds org.eclipse.equinox.concurrent as one of the plugins to be
  installed.
  .
  This is a Debian specific patch.
-Author: Niels Thykier <niels at thykier.net>
+From: Niels Thykier <niels at thykier.net>
 Bug-Debian: #585178
 Forwarded: not needed
 
-diff --git a/eclipse/features/org.eclipse.platform/feature.xml b/eclipse/features/org.eclipse.platform/feature.xml
-index a85e2dd..49fd699 100644
 --- a/eclipse/features/org.eclipse.platform/feature.xml
 +++ b/eclipse/features/org.eclipse.platform/feature.xml
-@@ -625,5 +625,12 @@
-          fragment="true"
+@@ -620,4 +620,12 @@
+          version="0.0.0"
           unpack="false"/>
  
 +   <plugin
@@ -21,5 +19,5 @@ index a85e2dd..49fd699 100644
 +         version="0.0.0"
 +         fragment="true"
 +         unpack="false"/>
- 
++
  </feature>
diff --git a/debian/patches/bp-ant-1.8.2-support.patch b/debian/patches/bp-ant-1.8.2-support.patch
index 9da6e7a..f7d51f3 100644
--- a/debian/patches/bp-ant-1.8.2-support.patch
+++ b/debian/patches/bp-ant-1.8.2-support.patch
@@ -1,2152 +1,3794 @@
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
-index 3834493..5c3d03b 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
-@@ -99,7 +99,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		}
- 
- 		public String toString() {
--			return from.toString() + "->" + (to == null ? "" : to.toString()); //$NON-NLS-1$//$NON-NLS-2$
-+			return from.toString() + "->" + (to == null ? IAntCoreConstants.EMPTY_STRING : to.toString()); //$NON-NLS-1$
- 		}
- 	}
- 
-@@ -206,7 +206,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreTasks(Preferences prefs) {
- 		 String tasks = prefs.getString(IAntCoreConstants.PREFERENCE_TASKS);
--		 if (tasks.equals("")) { //$NON-NLS-1$
-+		 if (tasks.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			 customTasks = new Task[0];
- 		 } else {
- 			 customTasks = extractTasks(prefs, getArrayFromString(tasks));
-@@ -215,7 +215,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreTypes(Preferences prefs) {
- 		String types = prefs.getString(IAntCoreConstants.PREFERENCE_TYPES);
--		if (types.equals("")) {//$NON-NLS-1$
-+		if (types.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			customTypes = new Type[0];
- 		} else {
- 			customTypes = extractTypes(prefs, getArrayFromString(types));
-@@ -224,14 +224,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreAntHomeEntries(Preferences prefs) {
- 		String entries = prefs.getString("ant_urls"); //old constant //$NON-NLS-1$
--		if (entries.equals("")) {//$NON-NLS-1$
-+		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			entries= prefs.getString(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES);
- 		} else {
- 			prefs.setToDefault("ant_urls"); //$NON-NLS-1$
- 			antHomeEntries= migrateURLEntries(getArrayFromString(entries));
- 			return;
- 		}
--		if (entries.equals("")) {//$NON-NLS-1$
-+		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			antHomeEntries= getDefaultAntHomeEntries();
- 		} else {
- 			antHomeEntries= extractEntries(getArrayFromString(entries));
-@@ -240,14 +240,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreAdditionalEntries(Preferences prefs) {
- 		String entries = prefs.getString("urls"); //old constant //$NON-NLS-1$
--		if (entries.equals("")) {//$NON-NLS-1$
-+		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			entries = prefs.getString(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES);
- 		} else {
- 			prefs.setToDefault("urls"); //$NON-NLS-1$
- 			additionalEntries= migrateURLEntries(getArrayFromString(entries));
- 			return;
- 		}
--		if (entries.equals("")) {//$NON-NLS-1$
-+		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
- 			List userLibs= getUserLibraries();
- 			if (toolsJarEntry == null) {
-@@ -314,7 +314,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreCustomProperties(Preferences prefs) {
- 		String properties = prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTIES);
--		if (properties.equals("")) {//$NON-NLS-1$
-+		if (properties.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			customProperties = new Property[0];
- 		} else {
- 			customProperties = extractProperties(prefs, getArrayFromString(properties));
-@@ -323,7 +323,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	
- 	private void restoreCustomPropertyFiles(Preferences prefs) {
- 		String propertyFiles= prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTY_FILES);
--		if (propertyFiles.equals("")) { //$NON-NLS-1$
-+		if (propertyFiles.equals(IAntCoreConstants.EMPTY_STRING)) {
- 			customPropertyFiles= new String[0];
- 		} else {
- 			customPropertyFiles= getArrayFromString(propertyFiles);
-@@ -342,7 +342,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 			task.setTaskName(taskName);
- 			task.setClassName(values[0]);
- 			String library= values[1];
--			if (library.startsWith("file:")) { //$NON-NLS-1$
-+			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
- 				//old format where URLs were persisted
- 				library= library.substring(5);
- 			}
-@@ -364,7 +364,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 			type.setTypeName(typeName);
- 			type.setClassName(values[0]);
- 			String library= values[1];
--			if (library.startsWith("file:")) { //$NON-NLS-1$
-+			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
- 				//old format where URLs were persisted
- 				library= library.substring(5);
- 			}
-@@ -552,7 +552,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 				continue;
- 			}
- 			Task task = new Task();
--			task.setTaskName(element.getAttribute(AntCorePlugin.NAME));
-+			task.setTaskName(element.getAttribute(IAntCoreConstants.NAME));
- 			task.setClassName(element.getAttribute(AntCorePlugin.CLASS));
- 			
- 			configureAntObject(result, element, task, task.getTaskName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_task);
-@@ -587,7 +587,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 				continue;
- 			}
- 			Type type = new Type();
--			type.setTypeName(element.getAttribute(AntCorePlugin.NAME));
-+			type.setTypeName(element.getAttribute(IAntCoreConstants.NAME));
- 			type.setClassName(element.getAttribute(AntCorePlugin.CLASS));
- 			
- 			configureAntObject(result, element, type, type.getTypeName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_type);
-@@ -708,11 +708,11 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 			if (!relevantRunningHeadless(element)) {
- 				continue;
- 			}
--			String name = element.getAttribute(AntCorePlugin.NAME);
-+			String name = element.getAttribute(IAntCoreConstants.NAME);
- 			if (name == null) {
- 				continue;
- 			}
--			String value = element.getAttribute(AntCorePlugin.VALUE);
-+			String value = element.getAttribute(IAntCoreConstants.VALUE);
- 			Property property= null;
- 			if (value != null) {
- 				property = new Property(name, value);
-@@ -746,16 +746,17 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	 * @since 3.0
- 	 */
- 	public IAntClasspathEntry getToolsJarEntry(IPath javaHomePath) {
--		if ("jre".equalsIgnoreCase(javaHomePath.lastSegment())) { //$NON-NLS-1$
--			javaHomePath = javaHomePath.removeLastSegments(1);
-+		IPath newjh = javaHomePath;
-+		if ("jre".equalsIgnoreCase(newjh.lastSegment())) { //$NON-NLS-1$
-+			newjh = newjh.removeLastSegments(1);
- 		}
--		javaHomePath= javaHomePath.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
--		File tools= javaHomePath.toFile();
-+		newjh= newjh.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
-+		File tools= newjh.toFile();
- 		if (!tools.exists()) {
- 			//attempt to find in the older 1.1.* 
--			javaHomePath= javaHomePath.removeLastSegments(1);
--			javaHomePath= javaHomePath.append("classes.zip"); //$NON-NLS-1$
--			tools= javaHomePath.toFile();
-+			newjh= newjh.removeLastSegments(1);
-+			newjh= newjh.append("classes.zip"); //$NON-NLS-1$
-+			tools= newjh.toFile();
- 			if (!tools.exists()) {
- 				return null;
- 			}
-@@ -892,7 +893,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	private void addLibraries(Bundle source, List destination) throws IOException, MalformedURLException {
- 		ManifestElement[] libraries = null;
- 		try {
--			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders("").get(Constants.BUNDLE_CLASSPATH)); //$NON-NLS-1$
-+			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders(IAntCoreConstants.EMPTY_STRING).get(Constants.BUNDLE_CLASSPATH));
- 		} catch (BundleException e) {
- 			IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.AntCorePreferences_0, e);
- 			AntCorePlugin.getPlugin().getLog().log(status);
-@@ -1503,13 +1504,13 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	 */
- 	protected String[] getArrayFromString(String list) {
- 		String separator= ","; //$NON-NLS-1$
--		if (list == null || list.trim().equals("")) { //$NON-NLS-1$
-+		if (list == null || list.trim().equals(IAntCoreConstants.EMPTY_STRING)) {
- 			return new String[0];
- 		}
- 		ArrayList result = new ArrayList();
- 		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- 			String token = tokens.nextToken().trim();
--			if (!token.equals("")) { //$NON-NLS-1$
-+			if (!token.equals(IAntCoreConstants.EMPTY_STRING)) {
- 				result.add(token);
- 			}
- 		}
-@@ -1547,7 +1548,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		}	
- 		
- 		if (customTasks.length == 0) {
--			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, ""); //$NON-NLS-1$
-+			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, IAntCoreConstants.EMPTY_STRING);
- 			return;
- 		}
- 		StringBuffer tasks = new StringBuffer();
-@@ -1569,7 +1570,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		}	
- 				
- 		if (customTypes.length == 0) {
--			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, ""); //$NON-NLS-1$
-+			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, IAntCoreConstants.EMPTY_STRING);
- 			return;
- 		}
- 		StringBuffer types = new StringBuffer();
-@@ -1591,7 +1592,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		}
- 		
- 		if (customProperties.length == 0) {
--			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, ""); //$NON-NLS-1$
-+			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, IAntCoreConstants.EMPTY_STRING);
- 			return;
- 		}
- 		StringBuffer properties = new StringBuffer();
-@@ -1604,8 +1605,8 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	}
- 
- 	protected void updateAdditionalEntries(Preferences prefs) {
--		prefs.setValue("urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
--		String serialized= ""; //$NON-NLS-1$
-+		prefs.setValue("urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
-+		String serialized= IAntCoreConstants.EMPTY_STRING;
- 		IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
- 		List userLibs= getUserLibraries();
- 		if (userLibs == null) {
-@@ -1635,7 +1636,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		
- 		prefs.setValue(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES, serialized);
- 		
--		String prefAntHome= ""; //$NON-NLS-1$
-+		String prefAntHome= IAntCoreConstants.EMPTY_STRING;
- 		if (antHome != null && !antHome.equals(getDefaultAntHome())) {
- 			prefAntHome= antHome;
- 		} 
-@@ -1643,7 +1644,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 	}
- 	
- 	protected void updateAntHomeEntries(Preferences prefs) {
--		prefs.setValue("ant_urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
-+		prefs.setValue("ant_urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
- 		
- 		//see if the custom entries are just the default entries
- 		IAntClasspathEntry[] defaultEntries= getDefaultAntHomeEntries();
-@@ -1660,7 +1661,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
- 		if (dflt) {
- 			//always want to recalculate the default Ant urls
- 			//to pick up any changes in the default Ant classpath
--			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, ""); //$NON-NLS-1$
-+			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, IAntCoreConstants.EMPTY_STRING);
- 			return;
- 		}
- 		StringBuffer entries = new StringBuffer();
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
-index edddfbf..2797399 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
-@@ -340,7 +340,7 @@ public class AntRunner implements IApplication {
- 			
- 			if (buildLoggerClassName == null) {
- 				//indicate that the default logger is not to be used
--				buildLoggerClassName= ""; //$NON-NLS-1$
-+				buildLoggerClassName= IAntCoreConstants.EMPTY_STRING;
- 			}
- 			// add build logger
- 			Method addBuildLogger = classInternalAntRunner.getMethod("addBuildLogger", new Class[] { String.class }); //$NON-NLS-1$
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
-index 41b1605..0db8c2a 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -10,6 +10,8 @@
-  *******************************************************************************/
- package org.eclipse.ant.core;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
-+
- 
- /**
-  * Represents information about a project within an Ant build file.
-@@ -28,12 +30,12 @@ public class ProjectInfo {
- 	 * Create a project information
- 	 * 
- 	 * @param name project name
--	 * @param description a brief explanation of the project's purpose 		or
-+	 * @param description a brief explanation of the project's purpose or
- 	 * <code>null</code> if not specified
- 	 */
- 	/*package*/
- 	ProjectInfo(String name, String description) {
--		this.name = name == null ? "" : name; //$NON-NLS-1$
-+		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
- 		this.description = description;
- 	}
- 
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
-index bfec707..7eede73 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -10,6 +10,8 @@
-  *******************************************************************************/
- package org.eclipse.ant.core;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
-+
- 
- /**
-  * Represents information about a target within an Ant build file.
-@@ -38,7 +40,7 @@ public class TargetInfo {
- 	 */
- 	/*package*/
- 	TargetInfo(ProjectInfo project, String name, String description, String[] dependencies, boolean isDefault) {
--		this.name = name == null ? "" : name; //$NON-NLS-1$
-+		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
- 		this.description = description;
- 		this.project = project;
- 		this.dependencies = dependencies;
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
-index 45d19ec..9069438 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -42,10 +42,10 @@ public class AntClasspathEntry implements IAntClasspathEntry {
- 		}
- 		try {
- 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(entryString);
--			return new URL("file:" + expanded); //$NON-NLS-1$
-+			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
- 		} catch (CoreException e) {
- 			try {
--				return new URL("file:" + entryString); //$NON-NLS-1$
-+				return new URL(IAntCoreConstants.FILE_PROTOCOL + entryString);
- 			} catch (MalformedURLException e1) {
- 				return null;
- 			}
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
-index 483b4b3..0e54eeb 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
-@@ -73,12 +73,12 @@ public class AntCoreUtil {
- 		}
- 		commands.remove(index);
- 		if (index == commands.size()) {// if this is the last command
--			return ""; //$NON-NLS-1$
-+			return IAntCoreConstants.EMPTY_STRING;
- 		}
- 		
- 		String command = (String) commands.get(index);
- 		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
--			return ""; //$NON-NLS-1$
-+			return IAntCoreConstants.EMPTY_STRING;
- 		}
- 		commands.remove(index);
- 		return command;
-@@ -94,7 +94,7 @@ public class AntCoreUtil {
- 				int posEq = name.indexOf("="); //$NON-NLS-1$
- 				if (posEq == 0) {
- 					value= name.substring(1);
--					name= ""; //$NON-NLS-1$
-+					name= IAntCoreConstants.EMPTY_STRING;
- 				} else if (posEq > 0 && posEq != name.length() - 1) {
- 					value = name.substring(posEq + 1).trim();
- 					name = name.substring(0, posEq);
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
-index 2b0fc00..30ab90f 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2006 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -82,7 +82,7 @@ public abstract class AntObject {
- 	 * @see java.lang.Object#toString()
- 	 */
- 	public String toString() {
--		if (fURI == null || fURI.equals("") || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$//$NON-NLS-2$
-+		if (fURI == null || fURI.equals(IAntCoreConstants.EMPTY_STRING) || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$
-             return fName;
-         }
- 		return fURI + ':' + fName;
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
-index 30c2dbc..1c84381 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -10,6 +10,8 @@
-  *******************************************************************************/
- package org.eclipse.ant.internal.core;
- 
-+import org.eclipse.ant.core.AntCorePlugin;
-+
- 
- /**
-  * Common constants.
-@@ -43,4 +45,74 @@ public interface IAntCoreConstants {
- 	public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
- 	public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
- 	public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
-+
-+	/**
-+	 * Constant for the word 'default'
-+	 * <br><br>
-+	 * Value is: <code>default</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String DEFAULT = "default"; //$NON-NLS-1$
-+
-+	/**
-+	 * Constant for the word 'dir'
-+	 * <br><br>
-+	 * Value is: <code>dir</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String DIR = "dir"; //$NON-NLS-1$
-+	
-+	/**
-+	 * Constant for the empty {@link String}
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
-+	
-+	/**
-+	 * Constant for the word 'file'
-+	 * <br><br>
-+	 * Value is: <code>file</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String FILE = "file"; //$NON-NLS-1$
-+
-+	/**
-+	 * Constant representing a file URL protocol
-+	 * <br><br>
-+	 * Value is: <code>file:</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
-+	
-+	/**
-+	 * Constant for the word 'name'
-+	 * <br><br>
-+	 * Value is: <code>name</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String NAME = AntCorePlugin.NAME;
-+
-+	/**
-+	 * Constant for the word 'value'
-+	 * <br><br>
-+	 * Value is: <code>value</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String VALUE = AntCorePlugin.VALUE;
-+
-+	/**
-+	 * Constant for the word 'description'
-+	 * <br><br>
-+	 * Value is: <code>description</code>
-+	 * 
-+	 * @since org.eclipse.ant.core 3.2.200
-+	 */
-+	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
- }
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
-index 22d5b4b..2a48c60 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2004, 2006 IBM Corporation and others.
-+ * Copyright (c) 2004, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -18,6 +18,7 @@ import javax.xml.parsers.ParserConfigurationException;
- import javax.xml.parsers.SAXParser;
- import javax.xml.parsers.SAXParserFactory;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.xml.sax.Attributes;
- import org.xml.sax.InputSource;
- import org.xml.sax.SAXException;
-@@ -55,7 +56,6 @@ public final class AntHandler extends DefaultHandler {
-         }
-     }
- 
--    private static final String DEFAULT_ATTRIBUTE= "default"; //$NON-NLS-1$
-     private static final String PROJECT = "project"; //$NON-NLS-1$
-     private static final String TARGET= "target"; //$NON-NLS-1$
-     private static final String MACRODEF= "macrodef"; //$NON-NLS-1$
-@@ -141,7 +141,7 @@ public final class AntHandler extends DefaultHandler {
-      * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
-      */
-     public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
--        return new InputSource(new StringReader("")); //$NON-NLS-1$
-+        return new InputSource(new StringReader(IAntCoreConstants.EMPTY_STRING));
-     }
- 
-     /*
-@@ -158,7 +158,7 @@ public final class AntHandler extends DefaultHandler {
-                 throw new StopParsingException();
-             }
-             if (attributes != null) {
--                fDefaultAttributeFound= attributes.getValue(DEFAULT_ATTRIBUTE) != null;
-+                fDefaultAttributeFound= attributes.getValue(IAntCoreConstants.DEFAULT) != null;
-                 if (fDefaultAttributeFound) {
-                     throw new StopParsingException();
-                 }
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
-index 4b69c48..752c21a 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- *  Copyright (c) 2000, 2009 IBM Corporation and others.
-+ *  Copyright (c) 2000, 2011 IBM Corporation and others.
-  *  All rights reserved. This program and the accompanying materials
-  *  are made available under the terms of the Eclipse Public License v1.0
-  *  which accompanies this distribution, and is available at
-@@ -55,6 +55,7 @@ import org.eclipse.ant.core.Type;
- import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
- import org.eclipse.ant.internal.core.AntCoreUtil;
- import org.eclipse.ant.internal.core.AntSecurityManager;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.core.runtime.CoreException;
- import org.eclipse.core.runtime.FileLocator;
- import org.eclipse.core.runtime.IPath;
-@@ -739,7 +740,7 @@ public class InternalAntRunner {
- 	private BuildLogger createLogger() {
- 		if (loggerClassname == null) {
- 			buildLogger= new DefaultLogger();
--		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
-+		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
- 			try {
- 				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
- 			} catch (ClassCastException e) {
-@@ -837,8 +838,8 @@ public class InternalAntRunner {
- 			project.log(message, priority);	
- 		} else {
- 			if (buildListeners != null) {
--				project = new Project();
--				BuildEvent event = new BuildEvent(project);
-+				Project p = new Project();
-+				BuildEvent event = new BuildEvent(p);
- 				event.setMessage(message, priority);
- 				//notify the build listeners that are not registered as
- 				//no project existed
-@@ -1163,7 +1164,7 @@ public class InternalAntRunner {
- 		if (p < 0) { return; }
- 
- 		// remove everything preceding that last '-arg'
--		String s = ""; //$NON-NLS-1$
-+		String s = IAntCoreConstants.EMPTY_STRING;
- 		for (int i = 0; i <= p; i++) {
- 			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
- 			commands.remove(0);
-diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
-index f192299..c069c4c 100644
---- a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
-+++ b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- *  Copyright (c) 2000, 2009 IBM Corporation and others.
-+ *  Copyright (c) 2000, 2011 IBM Corporation and others.
-  *  All rights reserved. This program and the accompanying materials
-  *  are made available under the terms of the Eclipse Public License v1.0
-  *  which accompanies this distribution, and is available at
-@@ -28,6 +28,7 @@ import org.apache.tools.ant.Task;
- import org.apache.tools.ant.taskdefs.Ant;
- import org.apache.tools.ant.taskdefs.CallTarget;
- import org.eclipse.ant.core.AntCorePlugin;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.core.runtime.IProgressMonitor;
- import org.eclipse.core.runtime.NullProgressMonitor;
- import org.eclipse.core.runtime.OperationCanceledException;
-@@ -94,10 +95,11 @@ public class ProgressBuildListener implements BuildListener {
- 		projects = new HashMap();
- 		mainProject = project;
- 		ProjectMonitors monitors = new ProjectMonitors();
--		if (monitor == null) {
--			monitor= new NullProgressMonitor();
-+		IProgressMonitor localmonitor = monitor;
-+		if (localmonitor == null) {
-+			localmonitor= new NullProgressMonitor();
- 		}
--		monitors.setMainMonitor(monitor);
-+		monitors.setMainMonitor(localmonitor);
- 		projects.put(mainProject, monitors);
- 		List targets= new ArrayList(targetNames.size());
- 		for (int i = 0; i < targetNames.size(); i++) {
-@@ -108,7 +110,7 @@ public class ProgressBuildListener implements BuildListener {
- 			}
- 		}
- 		int work = computeWork(targets);
--		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
-+		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
- 	}
- 
- 	/* (non-Javadoc)
-@@ -190,7 +192,7 @@ public class ProgressBuildListener implements BuildListener {
- 
- 		monitors.setTargetMonitor(subMonitorFor(monitors.getMainMonitor(), 1));
- 		int work = (target != null) ? target.getTasks().length : 100;
--		monitors.getTargetMonitor().beginTask("", work);  //$NON-NLS-1$
-+		monitors.getTargetMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
- 	}
- 
- 	protected ProjectMonitors createMonitors(Project currentProject, Target target) {
-@@ -209,7 +211,7 @@ public class ProgressBuildListener implements BuildListener {
- 			parentProject = null;
- 			monitors.setMainMonitor(subMonitorFor(parentMonitors.getTaskMonitor(), 1));
- 		}
--		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
-+		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
- 		projects.put(currentProject, monitors);
- 		return monitors;
- 	}
-@@ -255,7 +257,7 @@ public class ProgressBuildListener implements BuildListener {
- 		}
- 		currentTaskThread= Thread.currentThread();
- 		monitors.setTaskMonitor(subMonitorFor(monitors.getTargetMonitor(), 1));
--		monitors.getTaskMonitor().beginTask("", 1);  //$NON-NLS-1$
-+		monitors.getTaskMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, 1);
- 		// If this script is calling another one, track the project chain.
- 		if (task instanceof Ant) {
- 			parentProject = currentProject;
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java
-index b563d0f..58c824e 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2002, 2008 GEBIT Gesellschaft fuer EDV-Beratung
-+ * Copyright (c) 2002, 2011 GEBIT Gesellschaft fuer EDV-Beratung
-  * und Informatik-Technologien mbH, 
-  * Berlin, Duesseldorf, Frankfurt (Germany) and others.
-  * All rights reserved. This program and the accompanying materials 
-@@ -42,6 +42,7 @@ import org.apache.tools.ant.taskdefs.MacroDef;
- import org.apache.tools.ant.taskdefs.MacroInstance;
- import org.apache.tools.ant.types.EnumeratedAttribute;
- import org.apache.tools.ant.types.Reference;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIImages;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
-@@ -299,12 +300,13 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
- 		ITextSelection selection= (ITextSelection) viewer.getSelectionProvider().getSelection();
- 
- 		// adjust offset to end of normalized selection
--		if (selection.getOffset() == offset) {
--			offset= selection.getOffset() + selection.getLength();
-+		int newoffset = offset;
-+		if (selection.getOffset() == newoffset) {
-+			newoffset= selection.getOffset() + selection.getLength();
- 		}
- 
--		String prefix= extractPrefix(viewer, offset);
--		Region region= new Region(offset - prefix.length(), prefix.length());
-+		String prefix= extractPrefix(viewer, newoffset);
-+		Region region= new Region(newoffset - prefix.length(), prefix.length());
- 		TemplateContext context= createContext(viewer, region);
- 		if (context == null) {
- 			return new ICompletionProposal[0];
-@@ -487,14 +489,14 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
-         }
-         
-         if (proposals.length > 0) {
--        	errorMessage= ""; //$NON-NLS-1$
-+        	errorMessage= IAntCoreConstants.EMPTY_STRING;
-         }
-         return proposals;
- 
-     }
-     
-     private ICompletionProposal[] getProjectAttributeValueProposals(String prefix, String attributeName) {
--		if (attributeName.equalsIgnoreCase("default")) { //$NON-NLS-1$
-+		if (attributeName.equalsIgnoreCase(IAntCoreConstants.DEFAULT)) {
- 			return getDefaultValueProposals(prefix);
- 		}
- 
-@@ -826,7 +828,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
- 			}
- 			String description = getDescriptionProvider().getDescriptionForTaskAttribute(taskName, attrName);
- 			if(description != null) {
--			    proposalInfo = (proposalInfo == null ? "" : proposalInfo); //$NON-NLS-1$
-+			    proposalInfo = (proposalInfo == null ? IAntCoreConstants.EMPTY_STRING : proposalInfo);
- 			    proposalInfo += description;
- 			}
- 		}
-@@ -1320,7 +1322,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
-         if (startOfWordToken != anOffset) {
-             currentPrefix= aDocumentText.substring(startOfWordToken, anOffset).toLowerCase();
-         } else {
--            currentPrefix= ""; //$NON-NLS-1$
-+            currentPrefix= IAntCoreConstants.EMPTY_STRING;
-         }
-         return currentPrefix;
-     }
-@@ -1384,14 +1386,19 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
-             int spaceIndex = stringToPrefix.lastIndexOf(' ');
-             int lessThanIndex = stringToPrefix.lastIndexOf('<');
-             int greaterThanIndex = stringToPrefix.lastIndexOf('>');
--            
-             // Task proposal
--            if(lessThanIndex > spaceIndex && greaterThanIndex < lessThanIndex) {
--                int slashIndex = stringToPrefix.lastIndexOf('/');
--                if(slashIndex == lessThanIndex +1) {
--                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
--                }
--                return PROPOSAL_MODE_TASK_PROPOSAL;
-+            if(greaterThanIndex < lessThanIndex) {
-+            	//we are inside an open element
-+            	if(lastChar == '$') {
-+            		return PROPOSAL_MODE_PROPERTY_PROPOSAL;
-+            	}
-+            	if(lessThanIndex > spaceIndex) {
-+	                int slashIndex = stringToPrefix.lastIndexOf('/');
-+	                if(slashIndex == lessThanIndex +1) {
-+	                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
-+	                }
-+	                return PROPOSAL_MODE_TASK_PROPOSAL;
-+            	}
-             }
-             if(lessThanIndex < greaterThanIndex) {
-             	if (isPropertyProposalMode(stringToPrefix)) {
-@@ -1565,7 +1572,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
-     		node= antModel.getOpenElement();
-     	}
-     	if (node == null) {
--    		return ""; //$NON-NLS-1$
-+    		return IAntCoreConstants.EMPTY_STRING;
-     	} else if (node instanceof AntTaskNode) {
-     		String name= node.getName();
-     		if (offset <= node.getOffset() + name.length() - 1) {
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java
-index 2bf7d3c..c162383 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
-@@ -21,6 +21,8 @@ import org.apache.tools.ant.types.PatternSet;
- 
- import org.eclipse.swt.widgets.Shell;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
-+
- import org.eclipse.ant.internal.ui.debug.model.AntProperty;
- import org.eclipse.ant.internal.ui.debug.model.AntStackFrame;
- import org.eclipse.ant.internal.ui.debug.model.AntValue;
-@@ -208,8 +210,8 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
- 				HTMLPrinter.addBullet(buffer, includes[i]);
- 			}
- 		}
--		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
--		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
-+		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
-+		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
- 		if (excludes != null && excludes.length > 0) {
- 			HTMLPrinter.addSmallHeader(buffer, AntEditorTextMessages.XMLTextHover_6);
- 			for (int i = 0; i < excludes.length; i++) {
-@@ -309,24 +311,25 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
- 
- 	private static IRegion cleanRegionForNonProperty(int offset, IDocument document, IRegion region) throws BadLocationException {
- 		//do not allow spaces in region that is not a property
--		String text= document.get(region.getOffset(), region.getLength());
-+		IRegion r = region;
-+		String text= document.get(r.getOffset(), r.getLength());
- 		if (text.startsWith("/")) { //$NON-NLS-1$
- 			text= text.substring(1);
--			region= new Region(region.getOffset() + 1, region.getLength() - 1);
-+			r= new Region(r.getOffset() + 1, r.getLength() - 1);
- 		}
- 		StringTokenizer tokenizer= new StringTokenizer(text, " "); //$NON-NLS-1$
- 		if (tokenizer.countTokens() != 1) {
- 		    while(tokenizer.hasMoreTokens()) {
- 		        String token= tokenizer.nextToken();
- 		        int index= text.indexOf(token);
--		        if (region.getOffset() + index <= offset && region.getOffset() + index + token.length() >= offset) {
--		            region= new Region(region.getOffset() + index, token.length());
-+		        if (r.getOffset() + index <= offset && r.getOffset() + index + token.length() >= offset) {
-+		            r= new Region(r.getOffset() + index, token.length());
- 		            break;
- 		        }
- 		    }
- 		}
- 		
--		return region;
-+		return r;
- 	}
- 	
- 	/* (non-Javadoc)
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java
-index c1a4a08..7fbff2b 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2004, 2009 Richard Hoefter and others.
-+ * Copyright (c) 2004, 2011 Richard Hoefter and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -38,7 +38,9 @@ import javax.xml.transform.TransformerConfigurationException;
- import javax.xml.transform.TransformerException;
- import javax.xml.transform.TransformerFactoryConfigurationError;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
-+import org.eclipse.ant.internal.ui.model.IAntModelConstants;
- import org.eclipse.core.resources.IFile;
- import org.eclipse.core.runtime.CoreException;
- import org.eclipse.core.runtime.IPath;
-@@ -264,8 +266,8 @@ public class BuildFileCreator
-             String key = (String) iterator.next();
-             String value = (String) variable2valueMap.get(key);
-             Element prop = doc.createElement("property"); //$NON-NLS-1$
--            prop.setAttribute("name", key); //$NON-NLS-1$
--            prop.setAttribute("value", value); //$NON-NLS-1$
-+            prop.setAttribute(IAntCoreConstants.NAME, key);
-+            prop.setAttribute(IAntCoreConstants.VALUE, value);
-             if (first)
-             {
-                 first = false;               
-@@ -290,8 +292,8 @@ public class BuildFileCreator
-     {   
-         // <project name="hello" default="build" basedir=".">
-         root = doc.createElement("project"); //$NON-NLS-1$
--        root.setAttribute("name" , projectName); //$NON-NLS-1$
--        root.setAttribute("default" , "build"); //$NON-NLS-1$ //$NON-NLS-2$
-+        root.setAttribute(IAntCoreConstants.NAME , projectName);
-+        root.setAttribute(IAntCoreConstants.DEFAULT , "build"); //$NON-NLS-1$
-         root.setAttribute("basedir" , "."); //$NON-NLS-1$ //$NON-NLS-2$
-         doc.appendChild(root);
-         
-@@ -419,7 +421,7 @@ public class BuildFileCreator
-             else
-             {
-                 // prefix with ${project.location}
--                String prefix = ""; //$NON-NLS-1$
-+                String prefix = IAntCoreConstants.EMPTY_STRING;
-                 if (!entry.startsWith("${") &&                                  // no variable ${var}/classes //$NON-NLS-1$
-                     !projectName.equals(currentProject.getProject().getName())) // not main project 
-                 {
-@@ -431,7 +433,7 @@ public class BuildFileCreator
-                 }
-                 Element pathElement = doc.createElement("pathelement"); //$NON-NLS-1$
-                 String path = ExportUtil.getRelativePath(prefix + entry, projectRoot);
--                pathElement.setAttribute("location", path); //$NON-NLS-1$
-+                pathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, path);
-                 element.appendChild(pathElement);
-             }
-         }
-@@ -478,7 +480,7 @@ public class BuildFileCreator
-                 }
-                 jarFile = ExportUtil.getRelativePath(jarFile, projectRoot);
-                 Element userPathElement = doc.createElement("pathelement"); //$NON-NLS-1$
--                userPathElement.setAttribute("location", jarFile); //$NON-NLS-1$
-+                userPathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, jarFile);
-                 userElement.appendChild(userPathElement);
-             }
-             addToClasspathBlock(userElement);
-@@ -494,11 +496,11 @@ public class BuildFileCreator
-         // <fileset dir="${java.home}/lib" includes="*.jar"/>
-         // <fileset dir="${java.home}/lib/ext" includes="*.jar"/>
-         Element pathElement = doc.createElement("fileset"); //$NON-NLS-1$
--        pathElement.setAttribute("dir", "${java.home}/lib"); //$NON-NLS-1$ //$NON-NLS-2$
-+        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib"); //$NON-NLS-1$
-         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
-         element.appendChild(pathElement);
-         pathElement = doc.createElement("fileset"); //$NON-NLS-1$
--        pathElement.setAttribute("dir", "${java.home}/lib/ext"); //$NON-NLS-1$ //$NON-NLS-2$
-+        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib/ext"); //$NON-NLS-1$
-         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
-         element.appendChild(pathElement);
-     }
-@@ -547,7 +549,7 @@ public class BuildFileCreator
-         //     <mkdir dir="classes"/>
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "init"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "init"); //$NON-NLS-1$
-         List classDirsUnique = ExportUtil.removeDuplicates(classDirs);        
-         for (Iterator iterator = classDirsUnique.iterator(); iterator.hasNext();)
-         {            
-@@ -556,7 +558,7 @@ public class BuildFileCreator
-                 !EclipseClasspath.isReference(classDir))
-             {
-                 Element pathElement = doc.createElement("mkdir"); //$NON-NLS-1$
--                pathElement.setAttribute("dir", classDir); //$NON-NLS-1$
-+                pathElement.setAttribute(IAntCoreConstants.DIR, classDir);
-                 element.appendChild(pathElement);
-             }
-         }
-@@ -600,7 +602,7 @@ public class BuildFileCreator
-                 copyElement.setAttribute("todir", classDir); //$NON-NLS-1$
-                 copyElement.setAttribute("includeemptydirs", "false"); //$NON-NLS-1$ //$NON-NLS-2$
-                 Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
--                filesetElement.setAttribute("dir", srcDir); //$NON-NLS-1$
-+                filesetElement.setAttribute(IAntCoreConstants.DIR, srcDir);
- 
-                 List inclusions = (List) inclusionLists.get(i);
-                 List exclusions = (List) exclusionLists.get(i);
-@@ -609,21 +611,21 @@ public class BuildFileCreator
-                 {
-                     String inclusion = (String) iter.next();
-                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
--                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
-+                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
-                     filesetElement.appendChild(includeElement);
-                 }           
-                 for (Iterator iter = filters.iterator(); iter.hasNext();)
-                 {
-                     String exclusion = (String) iter.next();
-                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
--                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
-+                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
-                     filesetElement.appendChild(excludeElement);
-                 }
-                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
-                 {
-                     String exclusion = (String) iter.next();
-                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
--                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
-+                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
-                     filesetElement.appendChild(excludeElement);
-                 }
-                 
-@@ -643,7 +645,7 @@ public class BuildFileCreator
-         //     <delete dir="classes"/>
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "clean"); //$NON-NLS-1$
-         List classDirUnique = ExportUtil.removeDuplicates(classDirs);
-         for (Iterator iterator = classDirUnique.iterator(); iterator.hasNext();)
-         {
-@@ -652,7 +654,7 @@ public class BuildFileCreator
-                 !EclipseClasspath.isReference(classDir))
-             {
-                 Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
--                deleteElement.setAttribute("dir", classDir); //$NON-NLS-1$
-+                deleteElement.setAttribute(IAntCoreConstants.DIR, classDir);
-                 element.appendChild(deleteElement);
-             }
-         }
-@@ -667,7 +669,7 @@ public class BuildFileCreator
-         {
-             Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
-             Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
--            filesetElement.setAttribute("dir", "."); //$NON-NLS-1$ //$NON-NLS-2$
-+            filesetElement.setAttribute(IAntCoreConstants.DIR, "."); //$NON-NLS-1$
-             filesetElement.setAttribute("includes", "**/*.class"); //$NON-NLS-1$ //$NON-NLS-2$
-             deleteElement.appendChild(filesetElement);           
-             element.appendChild(deleteElement);           
-@@ -683,7 +685,7 @@ public class BuildFileCreator
-         //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" inheritAll="false" target="clean"/>
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "cleanall"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "cleanall"); //$NON-NLS-1$
-         element.setAttribute("depends", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
-         List subProjects = ExportUtil.getClasspathProjectsRecursive(project);
-         for (Iterator iterator = subProjects.iterator(); iterator.hasNext();)
-@@ -710,7 +712,7 @@ public class BuildFileCreator
-     {
-         // <target name="build" depends="build-subprojects,build-project"/>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "build"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "build"); //$NON-NLS-1$
-         element.setAttribute("depends", "build-subprojects,build-project"); //$NON-NLS-1$ //$NON-NLS-2$
-         root.appendChild(element);
-         
-@@ -749,7 +751,7 @@ public class BuildFileCreator
-         //     </javac>    
-         // </target>        
-         element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "build-project"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "build-project"); //$NON-NLS-1$
-         element.setAttribute("depends", "init"); //$NON-NLS-1$ //$NON-NLS-2$
-         Element echoElement = doc.createElement("echo"); //$NON-NLS-1$
-         echoElement.setAttribute("message", "${ant.project.name}: ${ant.file}"); //$NON-NLS-1$ //$NON-NLS-2$
-@@ -777,14 +779,14 @@ public class BuildFileCreator
-                 {
-                     String inclusion = (String) iter.next();
-                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
--                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
-+                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
-                     javacElement.appendChild(includeElement);
-                 }           
-                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
-                 {
-                     String exclusion = (String) iter.next();
-                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
--                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
-+                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
-                     javacElement.appendChild(excludeElement);
-                 }           
-                 Element classpathRefElement = doc.createElement("classpath"); //$NON-NLS-1$
-@@ -821,8 +823,8 @@ public class BuildFileCreator
-         //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" target="build" inheritAll="false"/> 
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "build-refprojects"); //$NON-NLS-1$ //$NON-NLS-2$
--        element.setAttribute("description", "Build all projects which " + //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "build-refprojects"); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.DESCRIPTION, "Build all projects which " + //$NON-NLS-1$ 
-                 "reference this project. Useful to propagate changes."); //$NON-NLS-1$
-         for (Iterator iter = refProjects.iterator(); iter.hasNext();) {
-             IJavaProject p = (IJavaProject) iter.next();
-@@ -879,12 +881,12 @@ public class BuildFileCreator
-         //     </unzip>
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "init-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
--        element.setAttribute("description", "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "init-eclipse-compiler"); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.DESCRIPTION, "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ 
-         Element copyElement = doc.createElement("copy"); //$NON-NLS-1$
-         copyElement.setAttribute("todir", "${ant.library.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-         Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
--        filesetElement.setAttribute("dir", "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$ //$NON-NLS-2$
-+        filesetElement.setAttribute(IAntCoreConstants.DIR, "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$
-         filesetElement.setAttribute("includes", "org.eclipse.jdt.core_*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
-         copyElement.appendChild(filesetElement);
-         element.appendChild(copyElement);
-@@ -908,11 +910,11 @@ public class BuildFileCreator
-         //     <antcall target="build" />
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "build-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
--        element.setAttribute("description", "compile project with Eclipse compiler"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "build-eclipse-compiler"); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.DESCRIPTION, "compile project with Eclipse compiler"); //$NON-NLS-1$ 
-         Element propertyElement = doc.createElement("property"); //$NON-NLS-1$
--        propertyElement.setAttribute("name", "build.compiler"); //$NON-NLS-1$ //$NON-NLS-2$
--        propertyElement.setAttribute("value", "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$ //$NON-NLS-2$
-+        propertyElement.setAttribute(IAntCoreConstants.NAME, "build.compiler"); //$NON-NLS-1$
-+        propertyElement.setAttribute(IAntCoreConstants.VALUE, "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$
-         element.appendChild(propertyElement);
-         Element antcallElement = doc.createElement("antcall"); //$NON-NLS-1$
-         antcallElement.setAttribute("target", "build"); //$NON-NLS-1$ //$NON-NLS-2$
-@@ -972,7 +974,7 @@ public class BuildFileCreator
-         for (int i = 0; i < confs.length; i++)
-         {
-             ILaunchConfiguration conf = confs[i];
--            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""))) //$NON-NLS-1$
-+            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, IAntCoreConstants.EMPTY_STRING)))
-             {
-                 continue;
-             }
-@@ -1007,25 +1009,25 @@ public class BuildFileCreator
-     public void addJavaApplication(Map variable2value, ILaunchConfiguration conf) throws CoreException
-     {
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
-         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
-         javaElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
--        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "")); //$NON-NLS-1$ //$NON-NLS-2$
-+        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING)); //$NON-NLS-1$
-         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
--        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
-+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
-         ExportUtil.addVariable(variable2value, dir, projectRoot);                
--        if (!dir.equals("")) //$NON-NLS-1$
-+        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
-         {
--            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
-+            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
-         }
-         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
-         {
-             javaElement.setAttribute("newenvironment", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-         }
-         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
--        addElements(props, doc, javaElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
--        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
--        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-+        addElements(props, doc, javaElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
-+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
-+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
-         element.appendChild(javaElement);
-         
-         addRuntimeClasspath(conf, javaElement);
-@@ -1044,8 +1046,8 @@ public class BuildFileCreator
-      */
-     public void addApplet(Map variable2value, ILaunchConfiguration conf) throws CoreException, TransformerFactoryConfigurationError, UnsupportedEncodingException
-     {
--        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
--        if (dir.equals("")) //$NON-NLS-1$
-+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
-+        if (dir.equals(IAntCoreConstants.EMPTY_STRING))
-         {
-             dir = projectRoot;
-         }
-@@ -1085,17 +1087,17 @@ public class BuildFileCreator
-         }
-         
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
-         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
-         javaElement.setAttribute("fork", "yes");  //$NON-NLS-1$//$NON-NLS-2$
-         javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_APPLETVIEWER_CLASS, "sun.applet.AppletViewer")); //$NON-NLS-1$ //$NON-NLS-2$
-         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-         if (value != null)
-         {
--            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
-+            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
-         }
--        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
--        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
-+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
-         addElement(conf.getName() + ".html", doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-         element.appendChild(javaElement);
-         addRuntimeClasspath(conf, javaElement);
-@@ -1121,22 +1123,22 @@ public class BuildFileCreator
-         //         <classpath refid="project.classpath"/>
-         //     </junit>
-         // </target>
--        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ""); //$NON-NLS-1$
-+        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING);
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
-+        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
-         
-         Element mkdirElement = doc.createElement("mkdir"); //$NON-NLS-1$
--        mkdirElement.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-+        mkdirElement.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
-         element.appendChild(mkdirElement);
-         
-         Element junitElement = doc.createElement("junit"); //$NON-NLS-1$
-         junitElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
-         junitElement.setAttribute("printsummary", "withOutAndErr"); //$NON-NLS-1$ //$NON-NLS-2$
--        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
-+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
-         ExportUtil.addVariable(variable2value, dir, projectRoot);                
--        if (!dir.equals("")) //$NON-NLS-1$
-+        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
-         {
--            junitElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
-+            junitElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
-         }
-         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
-         {
-@@ -1145,32 +1147,32 @@ public class BuildFileCreator
-         Element formatterElement = doc.createElement("formatter"); //$NON-NLS-1$
-         formatterElement.setAttribute("type", "xml");  //$NON-NLS-1$//$NON-NLS-2$
-         junitElement.appendChild(formatterElement);
--        if (!testClass.equals("")) //$NON-NLS-1$
-+        if (!testClass.equals(IAntCoreConstants.EMPTY_STRING))
-         {
-             // Case 1: Single JUnit class
-             Element testElement = doc.createElement("test"); //$NON-NLS-1$
--            testElement.setAttribute("name", testClass); //$NON-NLS-1$
-+            testElement.setAttribute(IAntCoreConstants.NAME, testClass);
-             testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-             junitElement.appendChild(testElement);                       
-         }
-         else
-         {
-             // Case 2: Run all tests in project, package or source folder
--            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, ""); //$NON-NLS-1$ //$NON-NLS-2$
-+            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, IAntCoreConstants.EMPTY_STRING); //$NON-NLS-1$
-             IType[] types = ExportUtil.findTestsInContainer(container);
-             Set sortedTypes = new TreeSet(ExportUtil.getITypeComparator());
-             sortedTypes.addAll(Arrays.asList(types));
-             for (Iterator iter = sortedTypes.iterator(); iter.hasNext();) {
-                 IType type = (IType) iter.next();
-                 Element testElement = doc.createElement("test"); //$NON-NLS-1$
--                testElement.setAttribute("name", type.getFullyQualifiedName()); //$NON-NLS-1$
-+                testElement.setAttribute(IAntCoreConstants.NAME, type.getFullyQualifiedName());
-                 testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-                 junitElement.appendChild(testElement);                       
-             }
-         }
-         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
--        addElements(props, doc, junitElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
--        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-+        addElements(props, doc, junitElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
-+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
-         element.appendChild(junitElement);
-         addRuntimeClasspath(conf, junitElement);
-         addRuntimeBootClasspath(conf, junitElement);
-@@ -1193,14 +1195,14 @@ public class BuildFileCreator
-         //     </junitreport>
-         // </target>
-         Element element = doc.createElement("target"); //$NON-NLS-1$
--        element.setAttribute("name", "junitreport"); //$NON-NLS-1$ //$NON-NLS-2$
-+        element.setAttribute(IAntCoreConstants.NAME, "junitreport"); //$NON-NLS-1$
-         Element junitreport = doc.createElement("junitreport"); //$NON-NLS-1$
-         junitreport.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-         Element fileset = doc.createElement("fileset"); //$NON-NLS-1$
--        fileset.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
-+        fileset.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
-         junitreport.appendChild(fileset);
-         Element include = doc.createElement("include"); //$NON-NLS-1$
--        include.setAttribute("name", "TEST-*.xml"); //$NON-NLS-1$ //$NON-NLS-2$
-+        include.setAttribute(IAntCoreConstants.NAME, "TEST-*.xml"); //$NON-NLS-1$
-         fileset.appendChild(include);
-         Element report = doc.createElement("report"); //$NON-NLS-1$
-         report.setAttribute("format", "frames"); //$NON-NLS-1$ //$NON-NLS-2$
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
-index ea91ab8..6b8887c 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
-@@ -348,7 +348,7 @@ public class AntModel implements IAntModel {
-         // to determine the actual location of the file. Though the file 
-         // contents will not be parsed. We parse the passed document string
-         File file = getEditedFile();
--        String filePath= ""; //$NON-NLS-1$
-+        String filePath= IAntCoreConstants.EMPTY_STRING;
-         if (file != null) {
-             filePath= file.getAbsolutePath();
-         }
-@@ -836,7 +836,7 @@ public class AntModel implements IAntModel {
-         } else if(taskName.equalsIgnoreCase("antcall")) { //$NON-NLS-1$
-             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_TARGET));
-         } else if(taskName.equalsIgnoreCase("mkdir")) { //$NON-NLS-1$
--            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DIR));
-+            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntCoreConstants.DIR));
-         } else if(taskName.equalsIgnoreCase("copy")) { //$NON-NLS-1$
-             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DESTFILE));
-         } else if(taskName.equalsIgnoreCase("tar")  //$NON-NLS-1$
-@@ -869,11 +869,11 @@ public class AntModel implements IAntModel {
-             newNode= new AntAntNode(newTask, attributes);
-         } else if(taskName.equalsIgnoreCase("delete")) { //$NON-NLS-1$
-             String label = "delete "; //$NON-NLS-1$
--            String file = attributes.getValue(IAntModelConstants.ATTR_FILE);
-+            String file = attributes.getValue(IAntCoreConstants.FILE);
-             if(file != null) {
-                 label+= file;
-             } else {
--                file = attributes.getValue(IAntModelConstants.ATTR_DIR);
-+                file = attributes.getValue(IAntCoreConstants.DIR);
-                 if(file != null) {
-                     label+= file;
-                 }
-@@ -916,7 +916,7 @@ public class AntModel implements IAntModel {
-         }
-         String taskName= newTask.getTaskName();
-         if ("attribute".equals(taskName) || "element".equals(taskName)) { //$NON-NLS-1$ //$NON-NLS-2$
--            String name= attributes.getValue("name"); //$NON-NLS-1$
-+            String name= attributes.getValue(IAntCoreConstants.NAME);
-             if (name != null) {
-                 newNode.setBaseLabel(name);
-             }
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java
-index ff4d049..d8faf4e 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * Portions Copyright  2000-2004 The Apache Software Foundation
-  * All rights reserved. This program and the accompanying materials are made 
-  * available under the terms of the Apache Software License v2.0 which 
-@@ -13,14 +13,22 @@
- package org.eclipse.ant.internal.ui.model;
- 
- import java.io.File;
-+import java.util.Collections;
- import java.util.Enumeration;
-+import java.util.HashMap;
- import java.util.Hashtable;
-+import java.util.Iterator;
-+import java.util.Map;
-+import java.util.Map.Entry;
- 
- import org.apache.tools.ant.AntClassLoader;
- import org.apache.tools.ant.BuildException;
- import org.apache.tools.ant.BuildListener;
- import org.apache.tools.ant.Project;
-+import org.apache.tools.ant.PropertyHelper;
-+import org.apache.tools.ant.UnknownElement;
- import org.apache.tools.ant.types.Path;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- 
- /**
-  * Derived from the original Ant Project class
-@@ -32,22 +40,54 @@ import org.apache.tools.ant.types.Path;
-  */
- public class AntModelProject extends Project {
- 	
--	private Hashtable fBaseProperties;
--	private Hashtable fCurrentProperties= new Hashtable();
-+	/**
-+	 * Delegate to maintain property chaining - to make sure our project is alerted 
-+	 * to new properties being set
-+	 */
-+	class AntPropertyHelper implements PropertyHelper.PropertySetter {
-+		/* (non-Javadoc)
-+		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#setNew(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
-+		 */
-+		public boolean setNew(String property, Object value, PropertyHelper propertyHelper) {
-+			setNewProperty(property, value.toString());
-+			return false;
-+		}
-+
-+		/* (non-Javadoc)
-+		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#set(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
-+		 */
-+		public boolean set(String property, Object value, PropertyHelper propertyHelper) {
-+			return false;
-+		}
-+	}
-+	
- 	private AntPropertyNode fCurrentConfiguringPropertyNode;
-+	private Map idrefs = Collections.synchronizedMap(new HashMap());
-+	private static Object loaderLock = new Object();
-+	private Hashtable loaders = null;
-+	private AntRefTable references = new AntRefTable();
-+	
-+	/**
-+	 * Constructor
-+	 * <p>
-+	 * Allows us to register a {@link PropertyHelper.PropertySetter} delegate for this project
-+	 * </p>
-+	 * @noreference This constructor is not intended to be referenced by clients.
-+	 */
-+	public AntModelProject() {
-+		PropertyHelper.getPropertyHelper(this).add(new AntPropertyHelper());
-+	}
- 	
- 	/* (non-Javadoc)
- 	 * @see org.apache.tools.ant.Project#setNewProperty(java.lang.String, java.lang.String)
- 	 */
- 	public void setNewProperty(String name, String value) {
--		
--		if (fCurrentProperties.get(name) != null) {
-+		if(PropertyHelper.getPropertyHelper(this).getProperty(name) != null) {
- 			return;
--		} 
-+		}
- 		//allows property values to be over-written for this parse session
- 		//there is currently no way to remove properties from the Apache Ant project
- 		//the project resets it properties for each parse...see reset()
--		fCurrentProperties.put(name, value);
- 		if (fCurrentConfiguringPropertyNode != null) {
- 			fCurrentConfiguringPropertyNode.addProperty(name, value);
- 		}
-@@ -66,13 +106,26 @@ public class AntModelProject extends Project {
- 		}
- 	}
- 	
-+	/**
-+	 * Reset the project
-+	 */
- 	public void reset() {
- 		getTargets().clear();
- 		setDefault(null);
- 		setDescription(null);
--		setName(""); //$NON-NLS-1$
--		//reset the properties to the initial set
--		fCurrentProperties= new Hashtable(fBaseProperties);
-+		setName(IAntCoreConstants.EMPTY_STRING);
-+		synchronized (loaderLock) {
-+			if(loaders != null) {
-+				Iterator i = loaders.entrySet().iterator();
-+				Entry e = null;
-+				while(i.hasNext()) {
-+					e = (Entry) i.next();
-+					AntClassLoader acl = (AntClassLoader) e.getValue();
-+					acl.cleanup();
-+					acl.clearAssertionStatus();
-+				}
-+			}
-+		}
- 	}
- 	
- 	/* (non-Javadoc)
-@@ -80,39 +133,55 @@ public class AntModelProject extends Project {
- 	 */
- 	public String getProperty(String name) {
- 		//override as we cannot remove properties from the Apache Ant project
--		String result= (String)fCurrentProperties.get(name);
-+		String result= super.getProperty(name);
- 		if (result == null) {
--			result= getUserProperty(name);
-+			return getUserProperty(name);
- 		}
- 		return result;
- 	}
- 	
- 	/* (non-Javadoc)
-+	 * @see org.apache.tools.ant.Project#addIdReference(java.lang.String, java.lang.Object)
-+	 */
-+	public void addIdReference(String id, Object value) {
-+		//XXX hack because we cannot look up references by id in Ant 1.8.x
-+		//see https://issues.apache.org/bugzilla/show_bug.cgi?id=49659
-+		idrefs.put(id, value);
-+	}
-+	
-+	/* (non-Javadoc)
-+	 * @see org.apache.tools.ant.Project#getReference(java.lang.String)
-+	 */
-+	public Object getReference(String key) {
-+		Object ref = references.get(key);
-+		if(ref == null) {
-+			ref = idrefs.get(key);
-+			if(ref instanceof UnknownElement) {
-+				UnknownElement ue = (UnknownElement) ref;
-+				ue.maybeConfigure();
-+				return ue.getRealThing();
-+			}
-+		}
-+		return ref;
-+	}
-+	
-+	/* (non-Javadoc)
- 	 * @see org.apache.tools.ant.Project#getProperties()
- 	 */
- 	public Hashtable getProperties() {
- 		//override as we cannot remove properties from the Apache Ant project
--		Hashtable allProps= new Hashtable(fCurrentProperties);
-+		Hashtable allProps = super.getProperties();
- 		allProps.putAll(getUserProperties());
- 		allProps.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
- 		return allProps;
- 	}
- 	
- 	/* (non-Javadoc)
--	 * @see org.apache.tools.ant.Project#init()
--	 */
--	public void init() throws BuildException {
--		super.init();
--		fBaseProperties= super.getProperties();
--		fCurrentProperties= super.getProperties();
--	}
--	
--	/* (non-Javadoc)
- 	 * @see org.apache.tools.ant.Project#setBaseDir(java.io.File)
- 	 */
- 	public void setBaseDir(File baseDir) throws BuildException {
- 		super.setBaseDir(baseDir);
--		fCurrentProperties.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
-+		setNewProperty("basedir", getBaseDir().getPath()); //$NON-NLS-1$
- 	}
- 
- 	/**
-@@ -126,12 +195,53 @@ public class AntModelProject extends Project {
-      * @see org.apache.tools.ant.Project#createClassLoader(org.apache.tools.ant.types.Path)
-      */
-     public AntClassLoader createClassLoader(Path path) {
--    	AntClassLoader loader= super.createClassLoader(path);
--    	if (path == null) {
--    		//use the "fake" Eclipse runtime classpath for Ant
--    		loader.setClassPath(Path.systemClasspath);
--    	}
--        
--        return loader;
-+    	synchronized (loaderLock) {
-+    		if(loaders == null) {
-+    			loaders = new Hashtable(8);
-+    		}
-+    		Path p = path;
-+    		if(p == null) {
-+    			p = new Path(this);
-+    		}
-+    		String pstr = p.toString();
-+    		AntClassLoader loader = (AntClassLoader) loaders.get(pstr);
-+    		if(loader == null) {
-+    			loader = super.createClassLoader(path);
-+    	    	if (path == null) {
-+    	    		//use the "fake" Eclipse runtime classpath for Ant
-+    	    		loader.setClassPath(Path.systemClasspath);
-+    	    	}
-+    	    	loaders.put(pstr, loader);
-+    		}
-+    		return loader;
-+		}
-+    }
-+    
-+    /* (non-Javadoc)
-+     * @see org.apache.tools.ant.Project#addReference(java.lang.String, java.lang.Object)
-+     */
-+    public void addReference(String referenceName, Object value) {
-+    	references.put(referenceName, value);
-+    }
-+    
-+    /* (non-Javadoc)
-+     * @see org.apache.tools.ant.Project#getReferences()
-+     */
-+    public Hashtable getReferences() {
-+    	return references;
-+    }
-+    
-+    /* (non-Javadoc)
-+     * @see org.apache.tools.ant.Project#getCopyOfReferences()
-+     */
-+    public Map getCopyOfReferences() {
-+    	return new Hashtable(references);
-+    }
-+    
-+    /* (non-Javadoc)
-+     * @see org.apache.tools.ant.Project#hasReference(java.lang.String)
-+     */
-+    public boolean hasReference(String key) {
-+    	return references.contains(key);
-     }
- }
-\ No newline at end of file
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java
-index c56db72..f4cca85 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
-@@ -15,6 +15,7 @@ import java.util.ArrayList;
- import java.util.List;
- 
- import org.apache.tools.ant.Project;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIImages;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
- import org.eclipse.core.resources.IFile;
-@@ -129,9 +130,9 @@ public class AntProjectNode extends AntElementNode {
-         	return null;
-         }
-         List results= new ArrayList(1);
--    	identifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
--    	int defaultTargetNameOffset= textToSearch.indexOf("default"); //$NON-NLS-1$
--    	defaultTargetNameOffset= textToSearch.indexOf(identifier, defaultTargetNameOffset);
-+    	String newidentifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
-+    	int defaultTargetNameOffset= textToSearch.indexOf(IAntCoreConstants.DEFAULT);
-+    	defaultTargetNameOffset= textToSearch.indexOf(newidentifier, defaultTargetNameOffset);
-     	results.add(new Integer(getOffset() + defaultTargetNameOffset + 1));
-         return results;
-     }
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java
-index 6a04c21..b21e3a5 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2004, 2006 IBM Corporation and others.
-+ * Copyright (c) 2004, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -19,6 +19,7 @@ import java.util.Map;
- import org.apache.tools.ant.BuildException;
- import org.apache.tools.ant.Task;
- import org.eclipse.ant.core.AntSecurityException;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIImages;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
- import org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor;
-@@ -31,7 +32,7 @@ public class AntPropertyNode extends AntTaskNode {
- 	
- 	private String fValue= null;
- 	private String fReferencedName;
--    private String fOccurrencesStartingPoint= IAntModelConstants.ATTR_VALUE;
-+    private String fOccurrencesStartingPoint= IAntCoreConstants.VALUE;
-     private String fOccurrencesIdentifier;
-     
- 	/*
-@@ -42,9 +43,9 @@ public class AntPropertyNode extends AntTaskNode {
- 	
- 	public AntPropertyNode(Task task, Attributes attributes) {
- 		super(task);
--		 String label = attributes.getValue(IAntModelConstants.ATTR_NAME);
-+		 String label = attributes.getValue(IAntCoreConstants.NAME);
-          if (label == null) {
--			label = attributes.getValue(IAntModelConstants.ATTR_FILE);
-+			label = attributes.getValue(IAntCoreConstants.FILE);
-          	if (label != null) {
-          		fReferencedName= label;
-          		label=  "file="+label; //$NON-NLS-1$
-@@ -67,7 +68,7 @@ public class AntPropertyNode extends AntTaskNode {
-          		}
-          	}
-          } else {
--         	fValue= attributes.getValue(IAntModelConstants.ATTR_VALUE);
-+         	fValue= attributes.getValue(IAntCoreConstants.VALUE);
-             if (fValue == null) {
-                 fOccurrencesStartingPoint= IAntModelConstants.ATTR_LOCATION;
-                 fValue= attributes.getValue(fOccurrencesStartingPoint);
-@@ -140,7 +141,7 @@ public class AntPropertyNode extends AntTaskNode {
- 			String textToSearch= getAntModel().getText(getOffset(), offset - getOffset());
- 			if (textToSearch != null && textToSearch.length() != 0) {
- 				String attributeString = AntEditorCompletionProcessor.getAttributeStringFromDocumentStringToPrefix(textToSearch);
--				if ("file".equals(attributeString) || "resource".equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-+				if (IAntCoreConstants.FILE.equals(attributeString) || IAntModelConstants.ATTR_RESOURCE.equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$
- 					return fReferencedName;
- 				}
- 			}
-@@ -214,7 +215,7 @@ public class AntPropertyNode extends AntTaskNode {
-         List results= new ArrayList();
-         if (fBaseLabel != null) {
-             if (fBaseLabel.equals(identifier)) {
--                int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
-+                int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
-                 nameOffset= textToSearch.indexOf(identifier, nameOffset + 1);
-                 results.add(new Integer(getOffset() + nameOffset));
-             }
-@@ -249,7 +250,7 @@ public class AntPropertyNode extends AntTaskNode {
-          if (textToSearch == null || textToSearch.length() == 0) {
-          	return false;
-          }
--         int nameStartOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
-+         int nameStartOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
-          nameStartOffset= textToSearch.indexOf("\"", nameStartOffset); //$NON-NLS-1$
-          int nameEndOffset= textToSearch.indexOf("\"", nameStartOffset + 1); //$NON-NLS-1$
-          nameEndOffset+=offset;
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java
-index 0413e66..bf37cd4 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
-@@ -17,6 +17,7 @@ import java.util.List;
- import java.util.Map;
- 
- import org.apache.tools.ant.Target;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIImages;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
-@@ -179,7 +180,7 @@ public class AntTargetNode extends AntElementNode {
-         }
-         List results= new ArrayList();
-         if (getTargetName().equals(identifier)) {
--            int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
-+            int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
-             nameOffset= textToSearch.indexOf(identifier, nameOffset);
-             results.add(new Integer(getOffset() + nameOffset));
-         } else {
-@@ -236,7 +237,7 @@ public class AntTargetNode extends AntElementNode {
- 		}
- 		if (checkReferenceRegion(region, textToSearch, "depends")) { //$NON-NLS-1$
- 			return true;
--		} else if (checkReferenceRegion(region, textToSearch, "name")) { //$NON-NLS-1$
-+		} else if (checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME)) {
- 			return true;
- 		} else if (checkReferenceRegion(region, textToSearch, "if")) { //$NON-NLS-1$
- 			return true;
-@@ -252,6 +253,6 @@ public class AntTargetNode extends AntElementNode {
-          if (textToSearch == null || textToSearch.length() == 0) {
-          	return false;
-          }
--         return checkReferenceRegion(region, textToSearch, "name"); //$NON-NLS-1$
-+         return checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME);
- 	}
- }
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
-index bb9894d..515b256 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2006 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -22,6 +22,7 @@ import java.util.zip.ZipException;
- import java.util.zip.ZipFile;
- 
- import org.eclipse.ant.core.IAntClasspathEntry;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.core.runtime.CoreException;
- import org.eclipse.core.runtime.IPath;
-@@ -82,9 +83,9 @@ public class AddCustomDialog extends StatusDialog {
- 	
- 	private Text nameField;
- 	
--	private String name=""; //$NON-NLS-1$
-+	private String name= IAntCoreConstants.EMPTY_STRING;
- 	private IAntClasspathEntry library= null;
--	private String className=""; //$NON-NLS-1$
-+	private String className= IAntCoreConstants.EMPTY_STRING;
- 	
- 	private boolean editing= false;
- 	
-@@ -394,7 +395,7 @@ public class AddCustomDialog extends StatusDialog {
- 		// Use an empty label so that display of the element's full name
- 		// doesn't include a confusing label
- 		MinimizedFileSystemElement dummyParent =
--			new MinimizedFileSystemElement("", null, true);//$NON-NLS-1$
-+			new MinimizedFileSystemElement(IAntCoreConstants.EMPTY_STRING, null, true);
- 		dummyParent.setPopulated();
- 		MinimizedFileSystemElement result =
- 			new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
-index 09c43a7..f0b1067 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -20,6 +20,7 @@ import java.util.Iterator;
- import java.util.List;
- 
- import org.eclipse.ant.core.IAntClasspathEntry;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
- import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
-@@ -221,7 +222,7 @@ public class AntClasspathBlock {
- 		String result = dialog.open();
- 		if (result != null) {
- 			try {
--				URL url = new URL("file:" + result + "/"); //$NON-NLS-2$;//$NON-NLS-1$;
-+				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + result + "/"); //$NON-NLS-1$;
- 				((AntClasspathContentProvider)treeViewer.getContentProvider()).add(currentParent, url);
- 			} catch (MalformedURLException e) {
- 			}
-@@ -252,7 +253,7 @@ public class AntClasspathBlock {
- 			String jarName = results[i];
- 			try {
- 				IPath path = filterPath.append(jarName).makeAbsolute();
--				URL url = new URL("file:" + path.toOSString()); //$NON-NLS-1$;
-+				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + path.toOSString());
- 				contentProvider.add(currentParent, url);
- 			} catch (MalformedURLException e) {
- 			}
-@@ -497,7 +498,7 @@ public class AntClasspathBlock {
- 				File file = new File(rootDir, names[i]);
- 				if (file.isFile() && file.getPath().endsWith(".jar")) { //$NON-NLS-1$
- 					try {
--						URL url = new URL("file:" +  file.getAbsolutePath()); //$NON-NLS-1$
-+						URL url = new URL(IAntCoreConstants.FILE_PROTOCOL +  file.getAbsolutePath());
- 						contentProvider.add(ClasspathModel.ANT_HOME, url);
- 					} catch (MalformedURLException e) {
- 					}
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java
-index e284013..5d7c070 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2006 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -13,6 +13,7 @@ package org.eclipse.ant.internal.ui.preferences;
- import org.eclipse.ant.core.Property;
- import org.eclipse.ant.core.Task;
- import org.eclipse.ant.internal.core.AntObject;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIImages;
- import org.eclipse.ant.internal.ui.IAntUIConstants;
- import org.eclipse.jface.viewers.IColorProvider;
-@@ -98,7 +99,7 @@ public class AntObjectLabelProvider extends LabelProvider implements ITableLabel
-                     return property.getPluginLabel();
-                 }
-         }
--        return ""; //$NON-NLS-1$
-+        return IAntCoreConstants.EMPTY_STRING;
-     }
-     
- 	public static Image getTypeImage() {
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
-index fcdc7da..20d7f2b 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2009 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -16,6 +16,7 @@ import java.util.List;
- import java.util.Map;
- 
- import org.eclipse.ant.core.Property;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.ant.internal.ui.AntUtil;
- import org.eclipse.ant.internal.ui.ColumnSorter;
-@@ -404,7 +405,7 @@ public class AntPropertiesBlock {
- 		String lastUsedPath;
- 		lastUsedPath= dialogSettings.get(IAntUIConstants.DIALOGSTORE_LASTEXTFILE);
- 		if (lastUsedPath == null) {
--			lastUsedPath= ""; //$NON-NLS-1$
-+			lastUsedPath= IAntCoreConstants.EMPTY_STRING;
- 		}
- 		FileDialog dialog = new FileDialog(fileTableViewer.getControl().getShell(), SWT.MULTI);
- 		dialog.setFilterExtensions(new String[] { "*.properties", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$;
-@@ -438,7 +439,7 @@ public class AntPropertiesBlock {
- 	 */
- 	private void addProperty() {
- 		String title = AntPreferencesMessages.AntPropertiesBlock_Add_Property_2;
--		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{"", ""}); //$NON-NLS-1$ //$NON-NLS-2$
-+		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{IAntCoreConstants.EMPTY_STRING, IAntCoreConstants.EMPTY_STRING});
- 		if (dialog.open() == Window.CANCEL) {
- 			return;
- 		}
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java
-index a7681cb..fabbad7 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui.preferences;
- import java.net.MalformedURLException;
- import java.net.URL;
- import org.eclipse.ant.core.IAntClasspathEntry;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.core.runtime.CoreException;
- import org.eclipse.core.variables.VariablesPlugin;
-@@ -99,7 +100,7 @@ public class ClasspathEntry extends AbstractClasspathEntry {
- 			
- 		try {
- 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fVariableString);
--			return new URL("file:" + expanded); //$NON-NLS-1$
-+			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
- 		} catch (CoreException e) {
- 			AntUIPlugin.log(e);
- 		} catch (MalformedURLException e) {
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java
-index e9c9588..d91b721 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2006 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -12,6 +12,7 @@ package org.eclipse.ant.internal.ui.preferences;
- 
- import java.util.List;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.core.resources.IFile;
- import org.eclipse.core.resources.IResource;
-@@ -55,14 +56,14 @@ public class FileSelectionDialog extends ElementTreeSelectionDialog {
- 		ISelectionStatusValidator validator= new ISelectionStatusValidator() {
- 			public IStatus validate(Object[] selection) {
- 				if (selection.length == 0) {
--					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
-+					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
- 				}
- 				for (int i= 0; i < selection.length; i++) {
- 					if (!(selection[i] instanceof IFile)) {
--						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
-+						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
- 					}
- 				}
--				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
-+				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
- 			}			
- 		};
- 		setValidator(validator);
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java
-index 5ebb895..0745969 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -11,6 +11,7 @@
- package org.eclipse.ant.internal.ui.preferences;
- 
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.core.runtime.IStatus;
- 
- import org.eclipse.swt.SWT;
-@@ -79,7 +80,7 @@ public class MessageLine extends CLabel {
- 				return;
- 			}
- 		}
--		setText(""); //$NON-NLS-1$
-+		setText(IAntCoreConstants.EMPTY_STRING);
- 		setImage(null);
- 		setBackground(fNormalMsgAreaBackground);
- 	}
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java
-index 2630adf..1c752d2 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
-@@ -14,6 +14,7 @@ import java.util.ArrayList;
- import java.util.List;
- 
- import org.eclipse.ant.core.AntCorePlugin;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUtil;
- import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
- import org.eclipse.core.resources.IContainer;
-@@ -208,7 +209,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
- 	 */
- 	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- 		if (fLaunchConfiguration.exists()) {
--			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
-+			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
- 			if (fOldBuildfileLocation == null || (buildFileLocation.endsWith(fOldBuildfileLocation + '}') || buildFileLocation.endsWith(fOldBuildfileLocation))) {
- 				String projectName= fLaunchConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
- 				if (fOldProjectName.equals(projectName)) {
-@@ -233,7 +234,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
-             fNewLaunchConfiguration.setContainer(container);
-         }
- 
--		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
-+		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
- 		String oldProjectName;
- 		if (fNewBuildfileLocation != null) {
-             String newBuildFileLocation= oldBuildfileLocation.replaceFirst(fOldBuildfileLocation, fNewBuildfileLocation);
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
-index b8c1861..b987ecf 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2007 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -17,6 +17,7 @@ import java.util.Enumeration;
- import java.util.Iterator;
- import java.util.List;
- 
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
- import org.eclipse.ant.internal.ui.model.AntElementNode;
- import org.eclipse.ant.internal.ui.model.AntModelLabelProvider;
-@@ -575,7 +576,7 @@ public class AntView extends ViewPart implements IResourceChangeListener, IShowI
- 
- 			AntProjectNodeProxy project = null;
- 			if (nameString == null) {
--				nameString = ""; //$NON-NLS-1$
-+				nameString = IAntCoreConstants.EMPTY_STRING;
- 			}
- 			project = new AntProjectNodeProxy(nameString, pathString);
- 			if (errorString != null && Boolean.valueOf(errorString).booleanValue()) {
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java
-index 09c8d5d..e88cfe2 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2005 IBM Corporation and others.
-+ * Copyright (c) 2000, 2011 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -16,6 +16,8 @@ import java.util.Iterator;
- import java.util.List;
- import java.util.regex.Matcher;
- import java.util.regex.Pattern;
-+
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.AntUIPlugin;
- import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
- import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
-@@ -96,7 +98,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
- 			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_SEARCH_STRING, "build.xml"); //$NON-NLS-1$
- 		}
- 		if (settings.get(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE) == null) {
--			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, ""); //$NON-NLS-1$
-+			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, IAntCoreConstants.EMPTY_STRING); 
- 		} 
- 	}
- 
-@@ -303,7 +305,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
- 	private void setWorkingSet(IWorkingSet set) {
- 		if (set == null) {
- 			searchScopes= null;
--			workingSetText.setText(""); //$NON-NLS-1$
-+			workingSetText.setText(IAntCoreConstants.EMPTY_STRING); 
- 			validateInput();
- 			return;
- 		}
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java
-index 9d228a9..3dacffc 100644
---- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java	
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java	
-@@ -46,6 +46,7 @@ import org.apache.tools.ant.Target;
- import org.apache.tools.ant.Task;
- import org.apache.tools.ant.TaskAdapter;
- import org.apache.tools.ant.util.FileUtils;
-+import org.eclipse.ant.internal.core.IAntCoreConstants;
- import org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger;
- 
- /**
-@@ -222,7 +223,7 @@ public class InternalAntRunner {
- 		//notify the logger that project help message are coming
- 		//since there is no buildstarted or targetstarted to 
- 		//to be used to establish the connection
--		logMessage(project, "", MSG_PROJECT_HELP); //$NON-NLS-1$
-+		logMessage(project, IAntCoreConstants.EMPTY_STRING, MSG_PROJECT_HELP);
- 		// find the target with the longest name
- 		int maxLength = 0;
- 		Enumeration ptargets = project.getTargets().elements();
-@@ -255,7 +256,7 @@ public class InternalAntRunner {
- 		Collections.sort(topDescriptions);
- 		
- 		String defaultTargetName = project.getDefaultTarget();
--		if (defaultTargetName != null && !"".equals(defaultTargetName)) { // shouldn't need to check but... //$NON-NLS-1$
-+		if (defaultTargetName != null && !IAntCoreConstants.EMPTY_STRING.equals(defaultTargetName)) { // shouldn't need to check but...
- 			List defaultName = new ArrayList(1);
- 			List defaultDesc = null;
- 			defaultName.add(defaultTargetName);
-@@ -521,7 +522,7 @@ public class InternalAntRunner {
- 	private BuildLogger createLogger() {
- 		if (loggerClassname == null) {
- 			buildLogger= new DefaultLogger();
--		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
-+		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
- 			try {
- 				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
- 			} catch (ClassCastException e) {
-@@ -586,8 +587,8 @@ public class InternalAntRunner {
- 			project.log(message, priority);	
- 		} else {
- 			if (buildListeners != null) {
--				project = new Project();
--				BuildEvent event = new BuildEvent(project);
-+				Project p = new Project();
-+				BuildEvent event = new BuildEvent(p);
- 				event.setMessage(message, priority);
- 				//notify the build listeners that are not registered as
- 				//no project existed
-@@ -879,7 +880,7 @@ public class InternalAntRunner {
- 		if (p < 0) { return; }
- 
- 		// remove everything preceding that last '-arg'
--		String s = ""; //$NON-NLS-1$
-+		String s = IAntCoreConstants.EMPTY_STRING;
- 		for (int i = 0; i <= p; i++) {
- 			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
- 			commands.remove(0);
-@@ -981,7 +982,7 @@ public class InternalAntRunner {
- 				int posEq = name.indexOf("="); //$NON-NLS-1$
- 				if (posEq == 0) {
- 					value= name.substring(1);
--					name= ""; //$NON-NLS-1$
-+					name= IAntCoreConstants.EMPTY_STRING;
- 				} else if (posEq > 0 && posEq != name.length() - 1) {
- 					value = name.substring(posEq + 1).trim();
- 					name = name.substring(0, posEq);
-@@ -1138,12 +1139,12 @@ public class InternalAntRunner {
- 		}
- 		commands.remove(index);
- 		if (index == commands.size()) {// if this is the last command
--			return ""; //$NON-NLS-1$
-+			return IAntCoreConstants.EMPTY_STRING;
- 		}
- 		
- 		String command = (String) commands.get(index);
- 		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
--			return ""; //$NON-NLS-1$
-+			return IAntCoreConstants.EMPTY_STRING;
- 		}
- 		
- 		commands.remove(index);
-diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java
+From c02e33ea8706fc928f71ac134c1ebafc82b46651 Mon Sep 17 00:00:00 2001
+From: Niels Thykier <niels at thykier.net>
+Date: Fri, 13 May 2011 13:21:46 +0200
+Subject: [PATCH] Backported patch for ant 1.8.2 support (#340426)
+Forwarded: yes
+Origin: upstream, https://bugs.eclipse.org/bugs/show_bug.cgi?id=340426
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=340426
+
+
+---
+ build.xml                            |    1 +
+ .../patches/bz340426-ant-1.8.2-support.patch       | 3757 ++++++++++++++++++++
+ 3 files changed, 3763 insertions(+), 0 deletions(-)
+ create mode 100644 eclipse-build/patches/bz340426-ant-1.8.2-support.patch
+
+diff --git a/eclipse-build/build.xml b/eclipse-build/build.xml
+index 6dc9b5d..85f3442 100644
+--- a/build.xml
++++ b/build.xml
+@@ -317,6 +317,7 @@
+ 		<!-- end eclipse-build-only patches -->
+ 		<!-- back-ported patches -->
+ 		<patch patchfile="${basedir}/patches/bz319476-compile-jar-in-jar-loader.patch" dir="${buildDirectory}/plugins/org.eclipse.jdt.ui" strip="0" />
++		<patch patchfile="${basedir}/patches/bz340426-ant-1.8.2-support.patch" dir="${buildDirectory}/" strip="1" />
+ 		<!-- end back-ported patches -->
+ 		<!-- Only build for one target (bug #293952) -->
+ 		<copy file="${buildConfigs}/eclipse-build-config/build.properties.in" tofile="${buildConfigs}/eclipse-build-config/build.properties" />
+diff --git a/eclipse-build/patches/bz340426-ant-1.8.2-support.patch b/eclipse-build/patches/bz340426-ant-1.8.2-support.patch
 new file mode 100644
-index 0000000..1f04ae6
+index 0000000..c1fa4d1
 --- /dev/null
-+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java	
-@@ -0,0 +1,53 @@
-+package org.eclipse.ant.internal.ui.model;
-+
-+import java.util.Hashtable;
-+
-+import org.apache.tools.ant.UnknownElement;
-+
-+/**
-+ * This class has been copied in its entirety from the static
-+ * inner class AntRefTable from {@link org.apache.tools.ant.Project}
-+ */
-+public class AntRefTable extends Hashtable {
-+
-+	private static final long serialVersionUID = 1L;
++++ b/patches/bz340426-ant-1.8.2-support.patch
+@@ -0,0 +1,3758 @@
++From 904bdd71b806f1cb1cc0a8a60e88ab7ed0ac8314 Mon Sep 17 00:00:00 2001
++From: Niels Thykier <niels at thykier.net>
++Date: Fri, 13 May 2011 13:14:09 +0200
++Subject: [PATCH] Backport of ant 1.8.2 support for eclipse 3.6.2
 +
-+	AntRefTable() {
-+        super();
-+    }
++---
++ .../org/eclipse/ant/core/AntCorePreferences.java   |   69 ++++----
++ .../src/org/eclipse/ant/core/AntRunner.java        |    2 +-
++ .../src/org/eclipse/ant/core/ProjectInfo.java      |    8 +-
++ .../src/org/eclipse/ant/core/TargetInfo.java       |    6 +-
++ .../ant/internal/core/AntClasspathEntry.java       |    6 +-
++ .../org/eclipse/ant/internal/core/AntCoreUtil.java |    6 +-
++ .../org/eclipse/ant/internal/core/AntObject.java   |    4 +-
++ .../ant/internal/core/IAntCoreConstants.java       |   74 +++++++++-
++ .../internal/core/contentDescriber/AntHandler.java |    8 +-
++ .../ant/internal/core/ant/InternalAntRunner.java   |   11 +-
++ .../internal/core/ant/ProgressBuildListener.java   |   18 ++-
++ .../internal/launching/debug/AntDebugState.java    |    5 +-
++ .../runtime/logger/AntProcessBuildLogger.java      |    3 +-
++ .../launching/remote/InternalAntRunner.java        |   21 ++--
++ .../remote/logger/RemoteAntBuildLogger.java        |    7 +-
++ .../ant/internal/launching/AntLaunchingUtil.java   |    5 +-
++ .../ContributedClasspathEntriesEntry.java          |    5 +-
++ .../eclipse/ant/internal/ui/dtd/schema/Model.java  |    6 +-
++ .../internal/ui/editor/AntCompletionProposal.java  |    5 +-
++ .../eclipse/ant/internal/ui/editor/AntEditor.java  |    5 +-
++ .../ui/editor/AntEditorCompletionProcessor.java    |   41 +++--
++ .../editor/AntEditorSourceViewerConfiguration.java |    3 +-
++ .../ui/editor/TaskDescriptionProvider.java         |    9 +-
++ .../ui/editor/formatter/FormattingPreferences.java |    5 +-
++ .../ui/editor/formatter/XmlDocumentFormatter.java  |    5 +-
++ .../internal/ui/editor/formatter/XmlFormatter.java |    8 +-
++ .../ui/editor/outline/AntEditorMarkerUpdater.java  |    5 +-
++ .../templates/AntTemplatePreferencePage.java       |    5 +-
++ .../ant/internal/ui/editor/text/XMLTextHover.java  |   18 ++-
++ .../internal/ui/editor/utils/ProjectHelper.java    |    7 +-
++ .../antsupport/inputhandler/AntInputHandler.java   |    5 +-
++ .../org/eclipse/ant/internal/ui/AntUIPlugin.java   |    7 +-
++ .../org/eclipse/ant/internal/ui/AntUtil.java       |    7 +-
++ .../org/eclipse/ant/internal/ui/ColumnSorter.java  |    7 +-
++ .../ui/datatransfer/AntNewJavaProjectPage.java     |   11 +-
++ .../ant/internal/ui/datatransfer/AppletUtil.java   |    5 +-
++ .../internal/ui/datatransfer/BuildFileCreator.java |  144 +++++++++--------
++ .../internal/ui/datatransfer/EclipseClasspath.java |    9 +-
++ .../ant/internal/ui/datatransfer/ExportUtil.java   |    8 +-
++ .../ui/datatransfer/JavacTableLabelProvider.java   |    5 +-
++ .../ui/debug/model/AntDebugModelPresentation.java  |    5 +-
++ .../launchConfigurations/AntBuilderTargetsTab.java |    3 +-
++ .../AntJavaLaunchDelegate.java                     |    5 +-
++ .../ui/launchConfigurations/AntLaunchShortcut.java |    5 +-
++ .../ui/launchConfigurations/AntMainTab.java        |    5 +-
++ .../ui/launchConfigurations/SetTargetsDialog.java  |    5 +-
++ .../TargetTableLabelProvider.java                  |    5 +-
++ .../ui/launchConfigurations/TaskLinkManager.java   |    5 +-
++ .../eclipse/ant/internal/ui/model/AntAntNode.java  |    3 +-
++ .../ant/internal/ui/model/AntDefiningTaskNode.java |    5 +-
++ .../ant/internal/ui/model/AntElementNode.java      |   31 +---
++ .../ant/internal/ui/model/AntImportNode.java       |    5 +-
++ .../eclipse/ant/internal/ui/model/AntModel.java    |   10 +-
++ .../ant/internal/ui/model/AntModelProject.java     |  170 ++++++++++++++++----
++ .../ant/internal/ui/model/AntProjectNode.java      |    7 +-
++ .../ant/internal/ui/model/AntPropertyNode.java     |   17 +-
++ .../eclipse/ant/internal/ui/model/AntRefTable.java |   53 ++++++
++ .../ant/internal/ui/model/AntTargetNode.java       |    9 +-
++ .../ant/internal/ui/model/IAntModelConstants.java  |   13 +--
++ .../internal/ui/preferences/AddCustomDialog.java   |    9 +-
++ .../internal/ui/preferences/AntClasspathBlock.java |    9 +-
++ .../ui/preferences/AntObjectLabelProvider.java     |    5 +-
++ .../ui/preferences/AntPropertiesBlock.java         |    7 +-
++ .../internal/ui/preferences/ClasspathEntry.java    |    5 +-
++ .../ui/preferences/FileSelectionDialog.java        |    9 +-
++ .../ant/internal/ui/preferences/MessageLine.java   |    5 +-
++ .../LaunchConfigurationBuildfileChange.java        |    7 +-
++ .../org/eclipse/ant/internal/ui/views/AntView.java |    5 +-
++ .../views/actions/SearchForBuildFilesDialog.java   |    8 +-
++ .../externaltools/internal/ExternalToolsCore.java  |    6 +-
++ .../internal/IExternalToolConstants.java           |   10 +-
++ .../ProgramLaunchDelegate.java                     |    4 +-
++ .../ExternalToolsBuilderTab.java                   |    2 +-
++ .../launchConfigurations/ExternalToolsMainTab.java |   14 +-
++ .../internal/model/ExternalToolsPlugin.java        |    8 +-
++ .../internal/ui/BuilderPropertyPage.java           |    4 +-
++ 76 files changed, 672 insertions(+), 394 deletions(-)
++ create mode 100644 plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java
 +
-+    /** 
-+     * Returns the unmodified original object.
-+     * This method should be called internally to
-+     * get the "real" object.
-+     * The normal get method will do the replacement
-+     * of UnknownElement (this is similar with the JDNI
-+     * refs behavior).
-+     */
-+    private Object getReal(Object key) {
-+        return super.get(key);
-+    }
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
++index 61d38c4..ef9d1de 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2010 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -99,7 +99,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		}
++ 
++ 		public String toString() {
++-			return from.toString() + "->" + (to == null ? "" : to.toString()); //$NON-NLS-1$//$NON-NLS-2$
+++			return from.toString() + "->" + (to == null ? IAntCoreConstants.EMPTY_STRING : to.toString()); //$NON-NLS-1$
++ 		}
++ 	}
++ 
++@@ -206,7 +206,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreTasks(Preferences prefs) {
++ 		 String tasks = prefs.getString(IAntCoreConstants.PREFERENCE_TASKS);
++-		 if (tasks.equals("")) { //$NON-NLS-1$
+++		 if (tasks.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			 customTasks = new Task[0];
++ 		 } else {
++ 			 customTasks = extractTasks(prefs, getArrayFromString(tasks));
++@@ -215,7 +215,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreTypes(Preferences prefs) {
++ 		String types = prefs.getString(IAntCoreConstants.PREFERENCE_TYPES);
++-		if (types.equals("")) {//$NON-NLS-1$
+++		if (types.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			customTypes = new Type[0];
++ 		} else {
++ 			customTypes = extractTypes(prefs, getArrayFromString(types));
++@@ -224,14 +224,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreAntHomeEntries(Preferences prefs) {
++ 		String entries = prefs.getString("ant_urls"); //old constant //$NON-NLS-1$
++-		if (entries.equals("")) {//$NON-NLS-1$
+++		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			entries= prefs.getString(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES);
++ 		} else {
++ 			prefs.setToDefault("ant_urls"); //$NON-NLS-1$
++ 			antHomeEntries= migrateURLEntries(getArrayFromString(entries));
++ 			return;
++ 		}
++-		if (entries.equals("")) {//$NON-NLS-1$
+++		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			antHomeEntries= getDefaultAntHomeEntries();
++ 		} else {
++ 			antHomeEntries= extractEntries(getArrayFromString(entries));
++@@ -240,14 +240,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreAdditionalEntries(Preferences prefs) {
++ 		String entries = prefs.getString("urls"); //old constant //$NON-NLS-1$
++-		if (entries.equals("")) {//$NON-NLS-1$
+++		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			entries = prefs.getString(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES);
++ 		} else {
++ 			prefs.setToDefault("urls"); //$NON-NLS-1$
++ 			additionalEntries= migrateURLEntries(getArrayFromString(entries));
++ 			return;
++ 		}
++-		if (entries.equals("")) {//$NON-NLS-1$
+++		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
++ 			List userLibs= getUserLibraries();
++ 			if (toolsJarEntry == null) {
++@@ -314,7 +314,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreCustomProperties(Preferences prefs) {
++ 		String properties = prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTIES);
++-		if (properties.equals("")) {//$NON-NLS-1$
+++		if (properties.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			customProperties = new Property[0];
++ 		} else {
++ 			customProperties = extractProperties(prefs, getArrayFromString(properties));
++@@ -323,7 +323,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	
++ 	private void restoreCustomPropertyFiles(Preferences prefs) {
++ 		String propertyFiles= prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTY_FILES);
++-		if (propertyFiles.equals("")) { //$NON-NLS-1$
+++		if (propertyFiles.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			customPropertyFiles= new String[0];
++ 		} else {
++ 			customPropertyFiles= getArrayFromString(propertyFiles);
++@@ -342,7 +342,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 			task.setTaskName(taskName);
++ 			task.setClassName(values[0]);
++ 			String library= values[1];
++-			if (library.startsWith("file:")) { //$NON-NLS-1$
+++			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
++ 				//old format where URLs were persisted
++ 				library= library.substring(5);
++ 			}
++@@ -364,7 +364,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 			type.setTypeName(typeName);
++ 			type.setClassName(values[0]);
++ 			String library= values[1];
++-			if (library.startsWith("file:")) { //$NON-NLS-1$
+++			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
++ 				//old format where URLs were persisted
++ 				library= library.substring(5);
++ 			}
++@@ -552,7 +552,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 				continue;
++ 			}
++ 			Task task = new Task();
++-			task.setTaskName(element.getAttribute(AntCorePlugin.NAME));
+++			task.setTaskName(element.getAttribute(IAntCoreConstants.NAME));
++ 			task.setClassName(element.getAttribute(AntCorePlugin.CLASS));
++ 			
++ 			configureAntObject(result, element, task, task.getTaskName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_task);
++@@ -587,7 +587,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 				continue;
++ 			}
++ 			Type type = new Type();
++-			type.setTypeName(element.getAttribute(AntCorePlugin.NAME));
+++			type.setTypeName(element.getAttribute(IAntCoreConstants.NAME));
++ 			type.setClassName(element.getAttribute(AntCorePlugin.CLASS));
++ 			
++ 			configureAntObject(result, element, type, type.getTypeName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_type);
++@@ -708,11 +708,11 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 			if (!relevantRunningHeadless(element)) {
++ 				continue;
++ 			}
++-			String name = element.getAttribute(AntCorePlugin.NAME);
+++			String name = element.getAttribute(IAntCoreConstants.NAME);
++ 			if (name == null) {
++ 				continue;
++ 			}
++-			String value = element.getAttribute(AntCorePlugin.VALUE);
+++			String value = element.getAttribute(IAntCoreConstants.VALUE);
++ 			Property property= null;
++ 			if (value != null) {
++ 				property = new Property(name, value);
++@@ -746,16 +746,17 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	 * @since 3.0
++ 	 */
++ 	public IAntClasspathEntry getToolsJarEntry(IPath javaHomePath) {
++-		if ("jre".equalsIgnoreCase(javaHomePath.lastSegment())) { //$NON-NLS-1$
++-			javaHomePath = javaHomePath.removeLastSegments(1);
+++		IPath newjh = javaHomePath;
+++		if ("jre".equalsIgnoreCase(newjh.lastSegment())) { //$NON-NLS-1$
+++			newjh = newjh.removeLastSegments(1);
++ 		}
++-		javaHomePath= javaHomePath.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
++-		File tools= javaHomePath.toFile();
+++		newjh= newjh.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
+++		File tools= newjh.toFile();
++ 		if (!tools.exists()) {
++ 			//attempt to find in the older 1.1.* 
++-			javaHomePath= javaHomePath.removeLastSegments(1);
++-			javaHomePath= javaHomePath.append("classes.zip"); //$NON-NLS-1$
++-			tools= javaHomePath.toFile();
+++			newjh= newjh.removeLastSegments(1);
+++			newjh= newjh.append("classes.zip"); //$NON-NLS-1$
+++			tools= newjh.toFile();
++ 			if (!tools.exists()) {
++ 				return null;
++ 			}
++@@ -892,7 +893,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	private void addLibraries(Bundle source, List destination) throws IOException, MalformedURLException {
++ 		ManifestElement[] libraries = null;
++ 		try {
++-			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders("").get(Constants.BUNDLE_CLASSPATH)); //$NON-NLS-1$
+++			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders(IAntCoreConstants.EMPTY_STRING).get(Constants.BUNDLE_CLASSPATH));
++ 		} catch (BundleException e) {
++ 			IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.AntCorePreferences_0, e);
++ 			AntCorePlugin.getPlugin().getLog().log(status);
++@@ -1503,13 +1504,13 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	 */
++ 	protected String[] getArrayFromString(String list) {
++ 		String separator= ","; //$NON-NLS-1$
++-		if (list == null || list.trim().equals("")) { //$NON-NLS-1$
+++		if (list == null || list.trim().equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			return new String[0];
++ 		}
++ 		ArrayList result = new ArrayList();
++ 		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
++ 			String token = tokens.nextToken().trim();
++-			if (!token.equals("")) { //$NON-NLS-1$
+++			if (!token.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 				result.add(token);
++ 			}
++ 		}
++@@ -1547,7 +1548,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		}	
++ 		
++ 		if (customTasks.length == 0) {
++-			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, ""); //$NON-NLS-1$
+++			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, IAntCoreConstants.EMPTY_STRING);
++ 			return;
++ 		}
++ 		StringBuffer tasks = new StringBuffer();
++@@ -1569,7 +1570,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		}	
++ 				
++ 		if (customTypes.length == 0) {
++-			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, ""); //$NON-NLS-1$
+++			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, IAntCoreConstants.EMPTY_STRING);
++ 			return;
++ 		}
++ 		StringBuffer types = new StringBuffer();
++@@ -1591,7 +1592,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		}
++ 		
++ 		if (customProperties.length == 0) {
++-			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, ""); //$NON-NLS-1$
+++			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, IAntCoreConstants.EMPTY_STRING);
++ 			return;
++ 		}
++ 		StringBuffer properties = new StringBuffer();
++@@ -1604,8 +1605,8 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	}
++ 
++ 	protected void updateAdditionalEntries(Preferences prefs) {
++-		prefs.setValue("urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
++-		String serialized= ""; //$NON-NLS-1$
+++		prefs.setValue("urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
+++		String serialized= IAntCoreConstants.EMPTY_STRING;
++ 		IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
++ 		List userLibs= getUserLibraries();
++ 		if (userLibs == null) {
++@@ -1635,7 +1636,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		
++ 		prefs.setValue(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES, serialized);
++ 		
++-		String prefAntHome= ""; //$NON-NLS-1$
+++		String prefAntHome= IAntCoreConstants.EMPTY_STRING;
++ 		if (antHome != null && !antHome.equals(getDefaultAntHome())) {
++ 			prefAntHome= antHome;
++ 		} 
++@@ -1643,7 +1644,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 	}
++ 	
++ 	protected void updateAntHomeEntries(Preferences prefs) {
++-		prefs.setValue("ant_urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
+++		prefs.setValue("ant_urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
++ 		
++ 		//see if the custom entries are just the default entries
++ 		IAntClasspathEntry[] defaultEntries= getDefaultAntHomeEntries();
++@@ -1660,7 +1661,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
++ 		if (dflt) {
++ 			//always want to recalculate the default Ant urls
++ 			//to pick up any changes in the default Ant classpath
++-			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, ""); //$NON-NLS-1$
+++			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, IAntCoreConstants.EMPTY_STRING);
++ 			return;
++ 		}
++ 		StringBuffer entries = new StringBuffer();
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
++index edddfbf..2797399 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
++@@ -340,7 +340,7 @@ public class AntRunner implements IApplication {
++ 			
++ 			if (buildLoggerClassName == null) {
++ 				//indicate that the default logger is not to be used
++-				buildLoggerClassName= ""; //$NON-NLS-1$
+++				buildLoggerClassName= IAntCoreConstants.EMPTY_STRING;
++ 			}
++ 			// add build logger
++ 			Method addBuildLogger = classInternalAntRunner.getMethod("addBuildLogger", new Class[] { String.class }); //$NON-NLS-1$
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
++index 41b1605..0db8c2a 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2008 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,8 @@
++  *******************************************************************************/
++ package org.eclipse.ant.core;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
+++
++ 
++ /**
++  * Represents information about a project within an Ant build file.
++@@ -28,12 +30,12 @@ public class ProjectInfo {
++ 	 * Create a project information
++ 	 * 
++ 	 * @param name project name
++-	 * @param description a brief explanation of the project's purpose 		or
+++	 * @param description a brief explanation of the project's purpose or
++ 	 * <code>null</code> if not specified
++ 	 */
++ 	/*package*/
++ 	ProjectInfo(String name, String description) {
++-		this.name = name == null ? "" : name; //$NON-NLS-1$
+++		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
++ 		this.description = description;
++ 	}
++ 
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
++index bfec707..7eede73 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2008 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,8 @@
++  *******************************************************************************/
++ package org.eclipse.ant.core;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
+++
++ 
++ /**
++  * Represents information about a target within an Ant build file.
++@@ -38,7 +40,7 @@ public class TargetInfo {
++ 	 */
++ 	/*package*/
++ 	TargetInfo(ProjectInfo project, String name, String description, String[] dependencies, boolean isDefault) {
++-		this.name = name == null ? "" : name; //$NON-NLS-1$
+++		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
++ 		this.description = description;
++ 		this.project = project;
++ 		this.dependencies = dependencies;
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
++index 45d19ec..9069438 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -42,10 +42,10 @@ public class AntClasspathEntry implements IAntClasspathEntry {
++ 		}
++ 		try {
++ 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(entryString);
++-			return new URL("file:" + expanded); //$NON-NLS-1$
+++			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
++ 		} catch (CoreException e) {
++ 			try {
++-				return new URL("file:" + entryString); //$NON-NLS-1$
+++				return new URL(IAntCoreConstants.FILE_PROTOCOL + entryString);
++ 			} catch (MalformedURLException e1) {
++ 				return null;
++ 			}
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
++index 483b4b3..0e54eeb 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
++@@ -73,12 +73,12 @@ public class AntCoreUtil {
++ 		}
++ 		commands.remove(index);
++ 		if (index == commands.size()) {// if this is the last command
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		
++ 		String command = (String) commands.get(index);
++ 		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		commands.remove(index);
++ 		return command;
++@@ -94,7 +94,7 @@ public class AntCoreUtil {
++ 				int posEq = name.indexOf("="); //$NON-NLS-1$
++ 				if (posEq == 0) {
++ 					value= name.substring(1);
++-					name= ""; //$NON-NLS-1$
+++					name= IAntCoreConstants.EMPTY_STRING;
++ 				} else if (posEq > 0 && posEq != name.length() - 1) {
++ 					value = name.substring(posEq + 1).trim();
++ 					name = name.substring(0, posEq);
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
++index 2b0fc00..30ab90f 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2006 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -82,7 +82,7 @@ public abstract class AntObject {
++ 	 * @see java.lang.Object#toString()
++ 	 */
++ 	public String toString() {
++-		if (fURI == null || fURI.equals("") || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$//$NON-NLS-2$
+++		if (fURI == null || fURI.equals(IAntCoreConstants.EMPTY_STRING) || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$
++             return fName;
++         }
++ 		return fURI + ':' + fName;
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
++index 30c2dbc..1c84381 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,8 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.core;
++ 
+++import org.eclipse.ant.core.AntCorePlugin;
+++
++ 
++ /**
++  * Common constants.
++@@ -43,4 +45,74 @@ public interface IAntCoreConstants {
++ 	public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
++ 	public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
++ 	public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
+++
+++	/**
+++	 * Constant for the word 'default'
+++	 * <br><br>
+++	 * Value is: <code>default</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String DEFAULT = "default"; //$NON-NLS-1$
+++
+++	/**
+++	 * Constant for the word 'dir'
+++	 * <br><br>
+++	 * Value is: <code>dir</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String DIR = "dir"; //$NON-NLS-1$
+++	
+++	/**
+++	 * Constant for the empty {@link String}
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+++	
+++	/**
+++	 * Constant for the word 'file'
+++	 * <br><br>
+++	 * Value is: <code>file</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String FILE = "file"; //$NON-NLS-1$
+++
+++	/**
+++	 * Constant representing a file URL protocol
+++	 * <br><br>
+++	 * Value is: <code>file:</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
+++	
+++	/**
+++	 * Constant for the word 'name'
+++	 * <br><br>
+++	 * Value is: <code>name</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String NAME = AntCorePlugin.NAME;
+++
+++	/**
+++	 * Constant for the word 'value'
+++	 * <br><br>
+++	 * Value is: <code>value</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String VALUE = AntCorePlugin.VALUE;
+++
+++	/**
+++	 * Constant for the word 'description'
+++	 * <br><br>
+++	 * Value is: <code>description</code>
+++	 * 
+++	 * @since org.eclipse.ant.core 3.2.200
+++	 */
+++	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
++ }
++diff --git a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
++index 22d5b4b..2a48c60 100644
++--- a/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
+++++ b/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2006 IBM Corporation and others.
+++ * Copyright (c) 2004, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -18,6 +18,7 @@ import javax.xml.parsers.ParserConfigurationException;
++ import javax.xml.parsers.SAXParser;
++ import javax.xml.parsers.SAXParserFactory;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.xml.sax.Attributes;
++ import org.xml.sax.InputSource;
++ import org.xml.sax.SAXException;
++@@ -55,7 +56,6 @@ public final class AntHandler extends DefaultHandler {
++         }
++     }
++ 
++-    private static final String DEFAULT_ATTRIBUTE= "default"; //$NON-NLS-1$
++     private static final String PROJECT = "project"; //$NON-NLS-1$
++     private static final String TARGET= "target"; //$NON-NLS-1$
++     private static final String MACRODEF= "macrodef"; //$NON-NLS-1$
++@@ -141,7 +141,7 @@ public final class AntHandler extends DefaultHandler {
++      * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
++      */
++     public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
++-        return new InputSource(new StringReader("")); //$NON-NLS-1$
+++        return new InputSource(new StringReader(IAntCoreConstants.EMPTY_STRING));
++     }
++ 
++     /*
++@@ -158,7 +158,7 @@ public final class AntHandler extends DefaultHandler {
++                 throw new StopParsingException();
++             }
++             if (attributes != null) {
++-                fDefaultAttributeFound= attributes.getValue(DEFAULT_ATTRIBUTE) != null;
+++                fDefaultAttributeFound= attributes.getValue(IAntCoreConstants.DEFAULT) != null;
++                 if (fDefaultAttributeFound) {
++                     throw new StopParsingException();
++                 }
++diff --git a/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java b/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
++index 4b69c48..752c21a 100644
++--- a/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
+++++ b/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+++ *  Copyright (c) 2000, 2011 IBM Corporation and others.
++  *  All rights reserved. This program and the accompanying materials
++  *  are made available under the terms of the Eclipse Public License v1.0
++  *  which accompanies this distribution, and is available at
++@@ -55,6 +55,7 @@ import org.eclipse.ant.core.Type;
++ import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
++ import org.eclipse.ant.internal.core.AntCoreUtil;
++ import org.eclipse.ant.internal.core.AntSecurityManager;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.runtime.FileLocator;
++ import org.eclipse.core.runtime.IPath;
++@@ -739,7 +740,7 @@ public class InternalAntRunner {
++ 	private BuildLogger createLogger() {
++ 		if (loggerClassname == null) {
++ 			buildLogger= new DefaultLogger();
++-		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
+++		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
++ 			try {
++ 				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
++ 			} catch (ClassCastException e) {
++@@ -837,8 +838,8 @@ public class InternalAntRunner {
++ 			project.log(message, priority);	
++ 		} else {
++ 			if (buildListeners != null) {
++-				project = new Project();
++-				BuildEvent event = new BuildEvent(project);
+++				Project p = new Project();
+++				BuildEvent event = new BuildEvent(p);
++ 				event.setMessage(message, priority);
++ 				//notify the build listeners that are not registered as
++ 				//no project existed
++@@ -1163,7 +1164,7 @@ public class InternalAntRunner {
++ 		if (p < 0) { return; }
++ 
++ 		// remove everything preceding that last '-arg'
++-		String s = ""; //$NON-NLS-1$
+++		String s = IAntCoreConstants.EMPTY_STRING;
++ 		for (int i = 0; i <= p; i++) {
++ 			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
++ 			commands.remove(0);
++diff --git a/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java b/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
++index f192299..c069c4c 100644
++--- a/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
+++++ b/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+++ *  Copyright (c) 2000, 2011 IBM Corporation and others.
++  *  All rights reserved. This program and the accompanying materials
++  *  are made available under the terms of the Eclipse Public License v1.0
++  *  which accompanies this distribution, and is available at
++@@ -28,6 +28,7 @@ import org.apache.tools.ant.Task;
++ import org.apache.tools.ant.taskdefs.Ant;
++ import org.apache.tools.ant.taskdefs.CallTarget;
++ import org.eclipse.ant.core.AntCorePlugin;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.core.runtime.IProgressMonitor;
++ import org.eclipse.core.runtime.NullProgressMonitor;
++ import org.eclipse.core.runtime.OperationCanceledException;
++@@ -94,10 +95,11 @@ public class ProgressBuildListener implements BuildListener {
++ 		projects = new HashMap();
++ 		mainProject = project;
++ 		ProjectMonitors monitors = new ProjectMonitors();
++-		if (monitor == null) {
++-			monitor= new NullProgressMonitor();
+++		IProgressMonitor localmonitor = monitor;
+++		if (localmonitor == null) {
+++			localmonitor= new NullProgressMonitor();
++ 		}
++-		monitors.setMainMonitor(monitor);
+++		monitors.setMainMonitor(localmonitor);
++ 		projects.put(mainProject, monitors);
++ 		List targets= new ArrayList(targetNames.size());
++ 		for (int i = 0; i < targetNames.size(); i++) {
++@@ -108,7 +110,7 @@ public class ProgressBuildListener implements BuildListener {
++ 			}
++ 		}
++ 		int work = computeWork(targets);
++-		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
+++		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
++ 	}
++ 
++ 	/* (non-Javadoc)
++@@ -190,7 +192,7 @@ public class ProgressBuildListener implements BuildListener {
++ 
++ 		monitors.setTargetMonitor(subMonitorFor(monitors.getMainMonitor(), 1));
++ 		int work = (target != null) ? target.getTasks().length : 100;
++-		monitors.getTargetMonitor().beginTask("", work);  //$NON-NLS-1$
+++		monitors.getTargetMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
++ 	}
++ 
++ 	protected ProjectMonitors createMonitors(Project currentProject, Target target) {
++@@ -209,7 +211,7 @@ public class ProgressBuildListener implements BuildListener {
++ 			parentProject = null;
++ 			monitors.setMainMonitor(subMonitorFor(parentMonitors.getTaskMonitor(), 1));
++ 		}
++-		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
+++		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
++ 		projects.put(currentProject, monitors);
++ 		return monitors;
++ 	}
++@@ -255,7 +257,7 @@ public class ProgressBuildListener implements BuildListener {
++ 		}
++ 		currentTaskThread= Thread.currentThread();
++ 		monitors.setTaskMonitor(subMonitorFor(monitors.getTargetMonitor(), 1));
++-		monitors.getTaskMonitor().beginTask("", 1);  //$NON-NLS-1$
+++		monitors.getTaskMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, 1);
++ 		// If this script is calling another one, track the project chain.
++ 		if (task instanceof Ant) {
++ 			parentProject = currentProject;
++diff --git a/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java b/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
++index 27592ec..d480a1d 100644
++--- a/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
+++++ b/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
++@@ -24,6 +24,7 @@ import org.apache.tools.ant.Project;
++ import org.apache.tools.ant.Target;
++ import org.apache.tools.ant.Task;
++ import org.apache.tools.ant.taskdefs.MacroInstance;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
++ 
++ public class AntDebugState {
++@@ -366,7 +367,7 @@ public class AntDebugState {
++         }
++         
++ 		if (!isAfterTaskEvent()) {
++-			appendToStack(stackRepresentation, targetExecuting.getName(), "", getLocation(targetExecuting)); //$NON-NLS-1$
+++			appendToStack(stackRepresentation, targetExecuting.getName(), IAntCoreConstants.EMPTY_STRING, getLocation(targetExecuting));
++ 		}
++ 		for (int i = tasks.size() - 1; i >= 0 ; i--) {
++ 			Task task= (Task) tasks.get(i);
++@@ -406,7 +407,7 @@ public class AntDebugState {
++ 	     	for (int i = startIndex; i <= dependancyStackDepth; i++) {
++ 	     		stackTarget= (Target) buildSequence.get(i);
++ 	            if (stackTarget.dependsOn(targetExecuting.getName())) {
++-	     		    appendToStack(stackRepresentation, stackTarget.getName(), "", getLocation(stackTarget)); //$NON-NLS-1$
+++	     		    appendToStack(stackRepresentation, stackTarget.getName(), IAntCoreConstants.EMPTY_STRING, getLocation(stackTarget));
++ 	            }
++ 	     	}
++ 	     }
++diff --git a/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java b/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java
++index f8acbe4..9dc2adb 100644
++--- a/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java
+++++ b/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java
++@@ -21,6 +21,7 @@ import org.apache.tools.ant.Location;
++ import org.apache.tools.ant.Project;
++ import org.apache.tools.ant.Target;
++ import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.AntLaunch;
++ import org.eclipse.ant.internal.launching.AntLaunching;
++ import org.eclipse.ant.internal.launching.AntLaunchingUtil;
++@@ -217,7 +218,7 @@ public class AntProcessBuildLogger extends NullBuildLogger {
++     				}
++     				line = r.readLine();
++     			}
++-    			logMessage("", event, Project.MSG_ERR); //$NON-NLS-1$
+++    			logMessage(IAntCoreConstants.EMPTY_STRING, event, Project.MSG_ERR);
++     		} catch (IOException e) {
++     		}
++         }
++diff --git a/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java b/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
++index 1119f39..990a5e6 100644
++--- a/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
+++++ b/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * Portions Copyright  2000-2005 The Apache Software Foundation
++  * All rights reserved. This program and the accompanying materials are made 
++  * available under the terms of the Apache Software License v2.0 which 
++@@ -46,6 +46,7 @@ import org.apache.tools.ant.Target;
++ import org.apache.tools.ant.Task;
++ import org.apache.tools.ant.TaskAdapter;
++ import org.apache.tools.ant.util.FileUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.remote.logger.RemoteAntBuildLogger;
++ 
++ /**
++@@ -222,7 +223,7 @@ public class InternalAntRunner {
++ 		//notify the logger that project help message are coming
++ 		//since there is no buildstarted or targetstarted to 
++ 		//to be used to establish the connection
++-		logMessage(project, "", MSG_PROJECT_HELP); //$NON-NLS-1$
+++		logMessage(project, IAntCoreConstants.EMPTY_STRING, MSG_PROJECT_HELP);
++ 		// find the target with the longest name
++ 		int maxLength = 0;
++ 		Enumeration ptargets = project.getTargets().elements();
++@@ -255,7 +256,7 @@ public class InternalAntRunner {
++ 		Collections.sort(topDescriptions);
++ 		
++ 		String defaultTargetName = project.getDefaultTarget();
++-		if (defaultTargetName != null && !"".equals(defaultTargetName)) { // shouldn't need to check but... //$NON-NLS-1$
+++		if (defaultTargetName != null && !IAntCoreConstants.EMPTY_STRING.equals(defaultTargetName)) { // shouldn't need to check but...
++ 			List defaultName = new ArrayList(1);
++ 			List defaultDesc = null;
++ 			defaultName.add(defaultTargetName);
++@@ -521,7 +522,7 @@ public class InternalAntRunner {
++ 	private BuildLogger createLogger() {
++ 		if (loggerClassname == null) {
++ 			buildLogger= new DefaultLogger();
++-		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
+++		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
++ 			try {
++ 				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
++ 			} catch (ClassCastException e) {
++@@ -586,8 +587,8 @@ public class InternalAntRunner {
++ 			project.log(message, priority);	
++ 		} else {
++ 			if (buildListeners != null) {
++-				project = new Project();
++-				BuildEvent event = new BuildEvent(project);
+++				Project p = new Project();
+++				BuildEvent event = new BuildEvent(p);
++ 				event.setMessage(message, priority);
++ 				//notify the build listeners that are not registered as
++ 				//no project existed
++@@ -879,7 +880,7 @@ public class InternalAntRunner {
++ 		if (p < 0) { return; }
++ 
++ 		// remove everything preceding that last '-arg'
++-		String s = ""; //$NON-NLS-1$
+++		String s = IAntCoreConstants.EMPTY_STRING;
++ 		for (int i = 0; i <= p; i++) {
++ 			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
++ 			commands.remove(0);
++@@ -981,7 +982,7 @@ public class InternalAntRunner {
++ 				int posEq = name.indexOf("="); //$NON-NLS-1$
++ 				if (posEq == 0) {
++ 					value= name.substring(1);
++-					name= ""; //$NON-NLS-1$
+++					name= IAntCoreConstants.EMPTY_STRING;
++ 				} else if (posEq > 0 && posEq != name.length() - 1) {
++ 					value = name.substring(posEq + 1).trim();
++ 					name = name.substring(0, posEq);
++@@ -1138,12 +1139,12 @@ public class InternalAntRunner {
++ 		}
++ 		commands.remove(index);
++ 		if (index == commands.size()) {// if this is the last command
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		
++ 		String command = (String) commands.get(index);
++ 		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		
++ 		commands.remove(index);
++diff --git a/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java b/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
++index fcaa8dd..95aad77 100644
++--- a/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
+++++ b/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2003, 2009 IBM Corporation and others.
+++ * Copyright (c) 2003, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -29,6 +29,7 @@ import org.apache.tools.ant.Location;
++ import org.apache.tools.ant.Project;
++ import org.apache.tools.ant.Target;
++ import org.apache.tools.ant.util.StringUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.debug.AntDebugState;
++ import org.eclipse.ant.internal.launching.remote.AntSecurityException;
++ import org.eclipse.ant.internal.launching.remote.InternalAntRunner;
++@@ -55,7 +56,7 @@ public class RemoteAntBuildLogger extends DefaultLogger {
++     /**
++      * Host to connect to, default is the localhost
++      */
++-    protected String fHost= ""; //$NON-NLS-1$
+++    protected String fHost= IAntCoreConstants.EMPTY_STRING;
++     /**
++      * Port to connect to.
++      */
++@@ -311,7 +312,7 @@ public class RemoteAntBuildLogger extends DefaultLogger {
++         StringBuffer message;
++         String taskName= event.getTask().getTaskName();
++         if (taskName != null && taskName.equals(fLastTaskName)) {
++-            taskName= ""; //$NON-NLS-1$
+++            taskName= IAntCoreConstants.EMPTY_STRING;
++         } else {
++             fLastTaskName= taskName;
++         }
++diff --git a/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java b/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java
++index 3acfd09..9d59fb5 100644
++--- a/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java
+++++ b/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2010 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -21,6 +21,7 @@ import java.util.StringTokenizer;
++ 
++ import org.apache.tools.ant.BuildException;
++ import org.apache.tools.ant.util.FileUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.launchConfigurations.AntHomeClasspathEntry;
++ import org.eclipse.ant.internal.launching.launchConfigurations.AntProcess;
++ import org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntRuntimeProcess;
++@@ -254,7 +255,7 @@ public final class AntLaunchingUtil {
++ 		for (int i = 0; i < entries.length; i++) {
++ 			IRuntimeClasspathEntry entry = entries[i];
++ 			try {
++-				urls[i] = new URL("file:" + entry.getLocation()); //$NON-NLS-1$
+++				urls[i] = new URL(IAntCoreConstants.FILE_PROTOCOL + entry.getLocation());
++ 			} catch (MalformedURLException e) {
++ 				throw new CoreException(new Status(IStatus.ERROR, AntLaunching
++ 						.getUniqueIdentifier(), AntLaunching.INTERNAL_ERROR,
++diff --git a/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java b/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java
++index 71ac04c..09c42e0 100644
++--- a/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java
+++++ b/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -21,6 +21,7 @@ import java.util.List;
++ import org.eclipse.ant.core.AntCorePlugin;
++ import org.eclipse.ant.core.AntCorePreferences;
++ import org.eclipse.ant.core.IAntClasspathEntry;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.AntLaunching;
++ import org.eclipse.ant.internal.launching.AntLaunchingUtil;
++ import org.eclipse.core.runtime.CoreException;
++@@ -155,7 +156,7 @@ public class ContributedClasspathEntriesEntry extends AbstractRuntimeClasspathEn
++                    continue;
++                 }
++                 String urlFileName= bundleURL.getFile();
++-                if (urlFileName.startsWith("file:")) { //$NON-NLS-1$
+++                if (urlFileName.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
++                     try {
++                         urlFileName= new URL(urlFileName).getFile();
++                         if (urlFileName.endsWith("!/")) { //$NON-NLS-1$
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Model.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Model.java
++index 53ff464..9625ff0 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Model.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/dtd/schema/Model.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2002, 2005 Object Factory Inc.
+++ * Copyright (c) 2002, 2011 Object Factory Inc.
++  * All rights reserved. This program and the accompanying materials 
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -7,12 +7,14 @@
++  * 
++  * Contributors:
++  *		Object Factory Inc. - Initial implementation
+++ *		IBM Corporation - bug fixes
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.dtd.schema;
++ import java.util.Iterator;
++ import java.util.LinkedList;
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.dtd.IAtom;
++ import org.eclipse.ant.internal.ui.dtd.IModel;
++ 
++@@ -207,7 +209,7 @@ public class Model implements IModel {
++ 	 * @see org.eclipse.ant.internal.ui.dtd.IModel#getQualifier()
++ 	 */
++ 	public String getQualifier() {
++-		return fMin == 1 ? (fMax == UNBOUNDED ? "+" : "") : (fMax == UNBOUNDED ? "*" : "?"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+++		return fMin == 1 ? (fMax == UNBOUNDED ? "+" : IAntCoreConstants.EMPTY_STRING) : (fMax == UNBOUNDED ? "*" : "?"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++ 	}
++ 	
++ 	/**
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntCompletionProposal.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntCompletionProposal.java
++index a91e5f2..70762dd 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntCompletionProposal.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntCompletionProposal.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2003, 2005 IBM Corporation and others.
+++ * Copyright (c) 2003, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -11,6 +11,7 @@
++ 
++ package org.eclipse.ant.internal.ui.editor;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.jface.text.BadLocationException;
++ import org.eclipse.jface.text.DocumentEvent;
++ import org.eclipse.jface.text.IDocument;
++@@ -92,7 +93,7 @@ public class AntCompletionProposal implements ICompletionProposal, ICompletionPr
++ 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
++ 	 */
++ 	public boolean validate(IDocument document, int offset, DocumentEvent event) {
++-		String enteredText= ""; //$NON-NLS-1$
+++		String enteredText= IAntCoreConstants.EMPTY_STRING;
++ 		try {
++ 			enteredText = document.get(fReplacementOffset, offset-fReplacementOffset);
++ 		} catch (BadLocationException e) {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java
++index 7a56061..90f3fe3 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditor.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2002, 2008 GEBIT Gesellschaft fuer EDV-Beratung
+++ * Copyright (c) 2002, 2011 GEBIT Gesellschaft fuer EDV-Beratung
++  * und Informatik-Technologien mbH,
++  * Berlin, Duesseldorf, Frankfurt (Germany) and others.
++  * All rights reserved. This program and the accompanying materials
++@@ -23,6 +23,7 @@ import java.util.List;
++ import java.util.Map;
++ import java.util.ResourceBundle;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.ExternalHyperlink;
++@@ -924,7 +925,7 @@ public class AntEditor extends TextEditor implements IReconcilingParticipant, IP
++             return null;
++         }
++         
++-		return ""; //$NON-NLS-1$
+++		return IAntCoreConstants.EMPTY_STRING;
++ 	}
++ 	
++ 	/* (non-Javadoc)
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java
++index d31247b..4ffe3ac 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2002, 2008 GEBIT Gesellschaft fuer EDV-Beratung
+++ * Copyright (c) 2002, 2011 GEBIT Gesellschaft fuer EDV-Beratung
++  * und Informatik-Technologien mbH, 
++  * Berlin, Duesseldorf, Frankfurt (Germany) and others.
++  * All rights reserved. This program and the accompanying materials 
++@@ -43,6 +43,7 @@ import org.apache.tools.ant.taskdefs.MacroDef;
++ import org.apache.tools.ant.taskdefs.MacroInstance;
++ import org.apache.tools.ant.types.EnumeratedAttribute;
++ import org.apache.tools.ant.types.Reference;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -300,12 +301,13 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++ 		ITextSelection selection= (ITextSelection) viewer.getSelectionProvider().getSelection();
++ 
++ 		// adjust offset to end of normalized selection
++-		if (selection.getOffset() == offset) {
++-			offset= selection.getOffset() + selection.getLength();
+++		int newoffset = offset;
+++		if (selection.getOffset() == newoffset) {
+++			newoffset= selection.getOffset() + selection.getLength();
++ 		}
++ 
++-		String prefix= extractPrefix(viewer, offset);
++-		Region region= new Region(offset - prefix.length(), prefix.length());
+++		String prefix= extractPrefix(viewer, newoffset);
+++		Region region= new Region(newoffset - prefix.length(), prefix.length());
++ 		TemplateContext context= createContext(viewer, region);
++ 		if (context == null) {
++ 			return new ICompletionProposal[0];
++@@ -488,14 +490,14 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++         }
++         
++         if (proposals.length > 0) {
++-        	errorMessage= ""; //$NON-NLS-1$
+++        	errorMessage= IAntCoreConstants.EMPTY_STRING;
++         }
++         return proposals;
++ 
++     }
++     
++     private ICompletionProposal[] getProjectAttributeValueProposals(String prefix, String attributeName) {
++-		if (attributeName.equalsIgnoreCase("default")) { //$NON-NLS-1$
+++		if (attributeName.equalsIgnoreCase(IAntCoreConstants.DEFAULT)) {
++ 			return getDefaultValueProposals(prefix);
++ 		}
++ 
++@@ -848,7 +850,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++ 			}
++ 			String description = getDescriptionProvider().getDescriptionForTaskAttribute(taskName, attrName);
++ 			if(description != null) {
++-			    proposalInfo = (proposalInfo == null ? "" : proposalInfo); //$NON-NLS-1$
+++			    proposalInfo = (proposalInfo == null ? IAntCoreConstants.EMPTY_STRING : proposalInfo);
++ 			    proposalInfo += description;
++ 			}
++ 		}
++@@ -1342,7 +1344,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++         if (startOfWordToken != anOffset) {
++             currentPrefix= aDocumentText.substring(startOfWordToken, anOffset).toLowerCase();
++         } else {
++-            currentPrefix= ""; //$NON-NLS-1$
+++            currentPrefix= IAntCoreConstants.EMPTY_STRING;
++         }
++         return currentPrefix;
++     }
++@@ -1406,14 +1408,19 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++             int spaceIndex = stringToPrefix.lastIndexOf(' ');
++             int lessThanIndex = stringToPrefix.lastIndexOf('<');
++             int greaterThanIndex = stringToPrefix.lastIndexOf('>');
++-            
++             // Task proposal
++-            if(lessThanIndex > spaceIndex && greaterThanIndex < lessThanIndex) {
++-                int slashIndex = stringToPrefix.lastIndexOf('/');
++-                if(slashIndex == lessThanIndex +1) {
++-                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
++-                }
++-                return PROPOSAL_MODE_TASK_PROPOSAL;
+++            if(greaterThanIndex < lessThanIndex) {
+++            	//we are inside an open element
+++            	if(lastChar == '$') {
+++            		return PROPOSAL_MODE_PROPERTY_PROPOSAL;
+++            	}
+++            	if(lessThanIndex > spaceIndex) {
+++	                int slashIndex = stringToPrefix.lastIndexOf('/');
+++	                if(slashIndex == lessThanIndex +1) {
+++	                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
+++	                }
+++	                return PROPOSAL_MODE_TASK_PROPOSAL;
+++            	}
++             }
++             if(lessThanIndex < greaterThanIndex) {
++             	if (isPropertyProposalMode(stringToPrefix)) {
++@@ -1587,7 +1594,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
++     		node= antModel.getOpenElement();
++     	}
++     	if (node == null) {
++-    		return ""; //$NON-NLS-1$
+++    		return IAntCoreConstants.EMPTY_STRING;
++     	} else if (node instanceof AntTaskNode) {
++     		String name= node.getName();
++     		if (offset <= node.getOffset() + name.length() - 1) {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorSourceViewerConfiguration.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorSourceViewerConfiguration.java
++index d4eaf62..2e0273f 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorSourceViewerConfiguration.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorSourceViewerConfiguration.java	
++@@ -20,6 +20,7 @@ import java.util.ArrayList;
++ import java.util.List;
++ import java.util.Map;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntSourceViewerConfiguration;
++ import org.eclipse.ant.internal.ui.editor.formatter.XmlDocumentFormattingStrategy;
++ import org.eclipse.ant.internal.ui.editor.formatter.XmlElementFormattingStrategy;
++@@ -262,7 +263,7 @@ public class AntEditorSourceViewerConfiguration extends AntSourceViewerConfigura
++ 			list.add(prefix.toString());
++ 		}
++ 
++-		list.add(""); //$NON-NLS-1$
+++		list.add(IAntCoreConstants.EMPTY_STRING);
++ 		
++ 		return (String[]) list.toArray(new String[list.size()]);
++ 	}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/TaskDescriptionProvider.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/TaskDescriptionProvider.java
++index b8f1882..f546401 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/TaskDescriptionProvider.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/TaskDescriptionProvider.java	
++@@ -24,6 +24,7 @@ import javax.xml.parsers.DocumentBuilder;
++ import javax.xml.parsers.DocumentBuilderFactory;
++ import javax.xml.parsers.ParserConfigurationException;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.runtime.IProgressMonitor;
++ import org.eclipse.jface.operation.IRunnableWithProgress;
++@@ -62,8 +63,6 @@ public class TaskDescriptionProvider {
++     public static final String XML_TAG_ATTRIBUTES = "attributes"; //$NON-NLS-1$
++     public static final String XML_TAG_ELEMENT = "element"; //$NON-NLS-1$
++     public static final String XML_TAG_STRUCTURE = "structure"; //$NON-NLS-1$
++-    public static final String XML_TAG_DESCRIPTION = "description"; //$NON-NLS-1$
++-    public static final String XML_ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
++     public static final String XML_ATTRIBUTE_REQUIRED = "required"; //$NON-NLS-1$
++     
++     private static TaskDescriptionProvider fgDefault;
++@@ -110,7 +109,7 @@ public class TaskDescriptionProvider {
++                 String tempTagName = tempNode.getNodeName();
++                 if(tempTagName.equals(XML_TAG_TASK)) {
++                     NamedNodeMap tempAttributes = tempNode.getAttributes();
++-                    Node tempAttributeNode = tempAttributes.getNamedItem(XML_ATTRIBUTE_NAME);
+++                    Node tempAttributeNode = tempAttributes.getNamedItem(IAntCoreConstants.NAME);
++                     if(tempAttributeNode != null) {
++                         String tempTaskName = tempAttributeNode.getNodeValue();
++                         if(tempTaskName != null) {
++@@ -181,7 +180,7 @@ public class TaskDescriptionProvider {
++         NodeList tempChildNodes = aNode.getChildNodes();
++         for (int i=0; i<tempChildNodes.getLength(); i++) {
++             Node tempNode = tempChildNodes.item(i);
++-            if(tempNode instanceof Element && XML_TAG_DESCRIPTION.equals(tempNode.getNodeName())) {
+++            if(tempNode instanceof Element && IAntCoreConstants.DESCRIPTION.equals(tempNode.getNodeName())) {
++                 Element tempDescriptionElement = (Element)tempNode;
++                 Node tempChildNode = tempDescriptionElement.getFirstChild();
++                 if(tempChildNode instanceof Text) {
++@@ -373,7 +372,7 @@ public class TaskDescriptionProvider {
++      */
++     public String getTaskAttributeName(Node aTaskAttributeNode) {
++     	NamedNodeMap tmpNamedNodeMap = aTaskAttributeNode.getAttributes();	
++-    	return tmpNamedNodeMap.getNamedItem(XML_ATTRIBUTE_NAME).getNodeValue();
+++    	return tmpNamedNodeMap.getNamedItem(IAntCoreConstants.NAME).getNodeValue();
++     }
++     
++     /**
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/FormattingPreferences.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/FormattingPreferences.java
++index a7b5f4a..7a2fbd9 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/FormattingPreferences.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/FormattingPreferences.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2005 John-Mason P. Shackelford and others.
+++ * Copyright (c) 2004, 2011 John-Mason P. Shackelford and others.
++  * All rights reserved. This program and the accompanying materials 
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -11,6 +11,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.editor.formatter;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.preferences.AntEditorPreferenceConstants;
++ import org.eclipse.jface.preference.IPreferenceStore;
++@@ -25,7 +26,7 @@ public class FormattingPreferences {
++        if (!useSpacesInsteadOfTabs()) {
++             canonicalIndent = "\t"; //$NON-NLS-1$
++         } else {
++-            String tab = ""; //$NON-NLS-1$
+++            String tab = IAntCoreConstants.EMPTY_STRING;
++             for (int i = 0; i < getTabWidth(); i++) {
++                 tab = tab.concat(" "); //$NON-NLS-1$
++             }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlDocumentFormatter.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlDocumentFormatter.java
++index a9dbfb7..4d9abf6 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlDocumentFormatter.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlDocumentFormatter.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2006s John-Mason P. Shackelford and others.
+++ * Copyright (c) 2004, 2011 John-Mason P. Shackelford and others.
++  * All rights reserved. This program and the accompanying materials 
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -16,6 +16,7 @@ import java.io.IOException;
++ import java.io.Reader;
++ import java.io.StringReader;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.preferences.AntEditorPreferenceConstants;
++ import org.eclipse.core.runtime.Assert;
++@@ -206,7 +207,7 @@ public class XmlDocumentFormatter {
++          * @see org.eclipse.ant.internal.ui.editor.formatter.XmlDocumentFormatter.TagReader#getStartOfTag()
++          */
++         public String getStartOfTag() {
++-            return ""; //$NON-NLS-1$
+++            return IAntCoreConstants.EMPTY_STRING;
++         }
++ 
++         /* (non-Javadoc)
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlFormatter.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlFormatter.java
++index 9891a45..9273679 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlFormatter.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/formatter/XmlFormatter.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2006 John-Mason P. Shackelford and others.
+++ * Copyright (c) 2004, 2011 John-Mason P. Shackelford and others.
++  * All rights reserved. This program and the accompanying materials 
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -7,6 +7,7 @@
++  * 
++  * Contributors:
++  *     John-Mason P. Shackelford - initial API and implementation
+++ *     IBM Corporation - bug fixes
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.editor.formatter;
++ 
++@@ -14,6 +15,7 @@ import java.util.ArrayList;
++ import java.util.Arrays;
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.editor.templates.AntContext;
++ import org.eclipse.ant.internal.ui.editor.text.AntDocumentSetupParticipant;
++ import org.eclipse.ant.internal.ui.editor.text.AntEditorPartitionScanner;
++@@ -222,11 +224,11 @@ public class XmlFormatter {
++ 	private static String getLeadingText(IDocument document, IAntModel model, int completionOffset) {
++ 		AntProjectNode project= model.getProjectNode(false);
++ 		if (project == null) {
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		AntElementNode node= project.getNode(completionOffset);// - fAccumulatedChange);
++ 		if (node == null) {
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		
++ 		StringBuffer buf= new StringBuffer();
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorMarkerUpdater.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorMarkerUpdater.java
++index 834afb7..392a891 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorMarkerUpdater.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorMarkerUpdater.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2005 IBM Corporation and others.
+++ * Copyright (c) 2004, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -18,6 +18,7 @@ import java.util.List;
++ import java.util.Map;
++ 
++ import org.eclipse.ant.core.AntCorePlugin;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.model.IAntModel;
++ import org.eclipse.ant.internal.ui.model.IProblem;
++@@ -51,7 +52,7 @@ public class AntEditorMarkerUpdater {
++ 		 */
++ 		public IStatus runInWorkspace(IProgressMonitor monitor) {
++ 			updateMarkers0(fProblems);
++-			return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), IStatus.OK, "", null); //$NON-NLS-1$
+++			return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), IStatus.OK, IAntCoreConstants.EMPTY_STRING, null);
++ 		}
++ 	}
++ 	
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplatePreferencePage.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplatePreferencePage.java
++index 41b3227..ada3f5f 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplatePreferencePage.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/templates/AntTemplatePreferencePage.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005  John-Mason P. Shackelford and others.
+++ * Copyright (c) 2000, 2011  John-Mason P. Shackelford and others.
++  * All rights reserved. This program and the accompanying materials 
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -11,6 +11,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.editor.templates;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.editor.formatter.FormattingPreferences;
++ import org.eclipse.ant.internal.ui.editor.formatter.XmlFormatter;
++@@ -95,7 +96,7 @@ public class AntTemplatePreferencePage extends TemplatePreferencePage {
++ 				viewer.getDocument().set(template.getPattern());
++ 			}
++ 		} else {
++-			viewer.getDocument().set(""); //$NON-NLS-1$
+++			viewer.getDocument().set(IAntCoreConstants.EMPTY_STRING);
++ 		}		
++ 	}
++ 	/* (non-Javadoc)
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java
++index 90f616b..a8f6c6c 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -18,6 +18,7 @@ import org.apache.tools.ant.Project;
++ import org.apache.tools.ant.types.AbstractFileSet;
++ import org.apache.tools.ant.types.Path;
++ import org.apache.tools.ant.types.PatternSet;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.debug.model.AntProperty;
++ import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
++ import org.eclipse.ant.internal.launching.debug.model.AntValue;
++@@ -201,8 +202,8 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
++ 				HTMLPrinter.addBullet(buffer, includes[i]);
++ 			}
++ 		}
++-		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
++-		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
+++		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
+++		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
++ 		if (excludes != null && excludes.length > 0) {
++ 			HTMLPrinter.addSmallHeader(buffer, AntEditorTextMessages.XMLTextHover_6);
++ 			for (int i = 0; i < excludes.length; i++) {
++@@ -302,24 +303,25 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
++ 
++ 	private static IRegion cleanRegionForNonProperty(int offset, IDocument document, IRegion region) throws BadLocationException {
++ 		//do not allow spaces in region that is not a property
++-		String text= document.get(region.getOffset(), region.getLength());
+++		IRegion r = region;
+++		String text= document.get(r.getOffset(), r.getLength());
++ 		if (text.startsWith("/")) { //$NON-NLS-1$
++ 			text= text.substring(1);
++-			region= new Region(region.getOffset() + 1, region.getLength() - 1);
+++			r= new Region(r.getOffset() + 1, r.getLength() - 1);
++ 		}
++ 		StringTokenizer tokenizer= new StringTokenizer(text, " "); //$NON-NLS-1$
++ 		if (tokenizer.countTokens() != 1) {
++ 		    while(tokenizer.hasMoreTokens()) {
++ 		        String token= tokenizer.nextToken();
++ 		        int index= text.indexOf(token);
++-		        if (region.getOffset() + index <= offset && region.getOffset() + index + token.length() >= offset) {
++-		            region= new Region(region.getOffset() + index, token.length());
+++		        if (r.getOffset() + index <= offset && r.getOffset() + index + token.length() >= offset) {
+++		            r= new Region(r.getOffset() + index, token.length());
++ 		            break;
++ 		        }
++ 		    }
++ 		}
++ 		
++-		return region;
+++		return r;
++ 	}
++ 	
++ 	/* (non-Javadoc)
++diff --git a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java
++index 1dc834e..1018626 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/utils/ProjectHelper.java	
++@@ -37,6 +37,7 @@ import org.apache.tools.ant.helper.AntXMLContext;
++ import org.apache.tools.ant.helper.ProjectHelper2;
++ import org.apache.tools.ant.util.FileUtils;
++ import org.apache.tools.ant.util.JAXPUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.model.IAntModel;
++ import org.eclipse.jface.text.BadLocationException;
++ import org.xml.sax.Attributes;
++@@ -158,7 +159,7 @@ public class ProjectHelper extends ProjectHelper2 {
++             String fileName= contextLocator.getSystemId();
++             String normalizedFileName= (String) fNormalizedFileNames.get(fileName);
++             if (normalizedFileName == null) {
++-                if (fileName.startsWith("file:")) { //$NON-NLS-1$
+++                if (fileName.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
++                     normalizedFileName= getFileUtils().fromURI(fileName);
++                     fNormalizedFileNames.put(fileName, normalizedFileName);
++                 } else {
++@@ -298,7 +299,7 @@ public class ProjectHelper extends ProjectHelper2 {
++ 			}
++             if (context.getCurrentTarget() == null) {
++                 //exception occurred creating the project
++-                context.getProject().addTarget("", context.getImplicitTarget()); //$NON-NLS-1$
+++                context.getProject().addTarget(IAntCoreConstants.EMPTY_STRING, context.getImplicitTarget());
++                 context.setCurrentTarget(context.getImplicitTarget());
++             }
++ 			if (currentImportStackSize == 1) {
++@@ -636,7 +637,7 @@ public class ProjectHelper extends ProjectHelper2 {
++             try {
++                 Target newCurrent = new Target();
++                 newCurrent.setProject(project);
++-                newCurrent.setName(""); //$NON-NLS-1$
+++                newCurrent.setName(IAntCoreConstants.EMPTY_STRING);
++                 context.setCurrentTarget(newCurrent);
++                 context.setCurrentTargets(new HashMap());
++                 context.setImplicitTarget(newCurrent);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java b/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java
++index 655ec18..8c2f191 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/AntInputHandler.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2007 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui.antsupport.inputhandler;
++ import org.apache.tools.ant.BuildException;
++ import org.apache.tools.ant.input.DefaultInputHandler;
++ import org.apache.tools.ant.input.InputRequest;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.antsupport.AntSupportMessages;
++ import org.eclipse.jface.dialogs.IInputValidator;
++ import org.eclipse.jface.dialogs.InputDialog;
++@@ -59,7 +60,7 @@ public class AntInputHandler extends DefaultInputHandler {
++ 						} 
++ 						if (fFirstValidation) {
++ 						    fFirstValidation= false;
++-						    return ""; //$NON-NLS-1$
+++						    return IAntCoreConstants.EMPTY_STRING;
++ 						}
++ 						return AntSupportMessages.AntInputHandler_Invalid_input_2;
++ 					}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPlugin.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPlugin.java
++index 778b9d5..5128cde 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPlugin.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPlugin.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2008 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui;
++ 
++ import java.util.Locale;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.editor.DecayCodeCompletionDataStructuresThread;
++ import org.eclipse.ant.internal.ui.editor.text.AntEditorDocumentProvider;
++ import org.eclipse.core.runtime.IStatus;
++@@ -53,8 +54,6 @@ public class AntUIPlugin extends AbstractUIPlugin {
++ 	 */
++ 	public static final String PI_ANTUI = "org.eclipse.ant.ui"; //$NON-NLS-1$
++ 	
++-	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
++-	
++ 	/**
++ 	 * The combined preference store.
++ 	 * @since 3.1
++@@ -139,7 +138,7 @@ public class AntUIPlugin extends AbstractUIPlugin {
++ 	 */
++ 	public static IStatus newErrorStatus(String message, Throwable exception) {
++ 		if (message == null) {
++-			message= EMPTY_STRING; 
+++			message= IAntCoreConstants.EMPTY_STRING; 
++ 		}		
++ 		return new Status(IStatus.ERROR, IAntUIConstants.PLUGIN_ID, 0, message, exception);
++ 	}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
++index 05b7cd5..72d106d 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -24,6 +24,7 @@ import java.util.regex.Pattern;
++ import org.apache.tools.ant.Target;
++ import org.eclipse.ant.core.AntCorePlugin;
++ import org.eclipse.ant.internal.core.AntCoreUtil;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.AntLaunchingUtil;
++ import org.eclipse.ant.internal.ui.editor.AntEditor;
++ import org.eclipse.ant.internal.ui.model.AntElementNode;
++@@ -247,7 +248,7 @@ public final class AntUtil {
++ 		AntTargetNode[] targets= getTargets(project);
++         if (targets == null) {
++             Hashtable antTargets= project.getProject().getTargets();
++-            Target implicitTarget= (Target) antTargets.get(""); //$NON-NLS-1$
+++            Target implicitTarget= (Target) antTargets.get(IAntCoreConstants.EMPTY_STRING);
++             if (implicitTarget != null) {
++                 AntTargetNode implicitTargetNode= new AntTargetNode(implicitTarget);
++                 project.addChildNode(implicitTargetNode);
++@@ -397,7 +398,7 @@ public final class AntUtil {
++ 		if (path.length() == 0) {
++ 			return null;
++ 		}
++-		if (path.startsWith("file:")) { //$NON-NLS-1$
+++		if (path.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
++ 			// remove "file:"
++ 			path= path.substring(5, path.length());
++ 		}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColumnSorter.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColumnSorter.java
++index df0ea2b..9ced695 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColumnSorter.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColumnSorter.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2009 IBM Corporation and others.
+++ * Copyright (c) 2009, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.preferences.AntObjectLabelProvider;
++ import org.eclipse.jface.viewers.ColumnViewer;
++ import org.eclipse.jface.viewers.Viewer;
++@@ -92,11 +93,11 @@ public abstract class ColumnSorter extends ViewerComparator {
++ 	public int compare(Viewer viewer, Object e1, Object e2) {
++ 		String text1 = getCompareText(e1, this.columnidx);
++ 		if(text1 == null) {
++-			text1 = ""; //$NON-NLS-1$
+++			text1 = IAntCoreConstants.EMPTY_STRING; 
++ 		}
++ 		String text2 = getCompareText(e2, this.columnidx);
++ 		if(text2 == null) {
++-			text2 = ""; //$NON-NLS-1$
+++			text2 = IAntCoreConstants.EMPTY_STRING; 
++ 		}
++ 		return (this.direction == SWT.UP ? -1 : 1) * 
++ 			text1.compareTo(text2);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java
++index bec0e91..0b5dbed 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AntNewJavaProjectPage.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2008 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -21,6 +21,7 @@ import java.util.List;
++ import org.apache.tools.ant.Task;
++ import org.apache.tools.ant.UnknownElement;
++ import org.apache.tools.ant.taskdefs.Javac;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.model.AntElementNode;
++@@ -249,7 +250,7 @@ public class AntNewJavaProjectPage extends WizardPage {
++ 	 */
++ 	private String getProjectNameFieldValue() {
++ 		if (fProjectNameField == null) {
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		} 
++ 		return fProjectNameField.getText().trim();
++ 	}
++@@ -268,7 +269,7 @@ public class AntNewJavaProjectPage extends WizardPage {
++ 	 */
++ 	private void handleBrowseButtonPressed() {
++ 		
++-		String lastUsedPath= ""; //$NON-NLS-1$
+++		String lastUsedPath= IAntCoreConstants.EMPTY_STRING;
++ 		FileDialog dialog = new FileDialog(getShell(), SWT.SINGLE);
++ 		dialog.setFilterExtensions(new String[] { "*.xml" }); //$NON-NLS-1$;
++ 		dialog.setFilterPath(lastUsedPath);
++@@ -295,13 +296,13 @@ public class AntNewJavaProjectPage extends WizardPage {
++ 
++ 		String locationFieldContents = getProjectLocationFieldValue();
++ 
++-		if (locationFieldContents.equals("")) { //$NON-NLS-1$
+++		if (locationFieldContents.equals(IAntCoreConstants.EMPTY_STRING)) {
++ 			setErrorMessage(null);
++ 			setMessage(DataTransferMessages.AntNewJavaProjectPage_15);
++ 			return false;
++ 		}
++ 
++-		IPath path = new Path(""); //$NON-NLS-1$
+++		IPath path = new Path(IAntCoreConstants.EMPTY_STRING);
++ 		if (!path.isValidPath(locationFieldContents)) {
++ 			setErrorMessage(DataTransferMessages.AntNewJavaProjectPage_16);
++ 			return false;
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AppletUtil.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AppletUtil.java
++index 5846e39..b6c8457 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AppletUtil.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/AppletUtil.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2006 Richard Hoefter and others.
+++ * Copyright (c) 2004, 2011 Richard Hoefter and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -16,6 +16,7 @@ import java.util.HashMap;
++ import java.util.Iterator;
++ import java.util.Map;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.runtime.IProgressMonitor;
++ import org.eclipse.debug.core.ILaunch;
++@@ -59,7 +60,7 @@ public class AppletUtil
++         b.append("        <applet code="); //$NON-NLS-1$
++         b.append(getQuotedString(name + ".class")); //$NON-NLS-1$
++         String appletName = configuration.getAttribute(
++-                IJavaLaunchConfigurationConstants.ATTR_APPLET_NAME, ""); //$NON-NLS-1$
+++                IJavaLaunchConfigurationConstants.ATTR_APPLET_NAME, IAntCoreConstants.EMPTY_STRING);
++         if (appletName.length() != 0)
++         {
++             b.append(" name=\"" + appletName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java
++index 46542a2..91860b2 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2009 Richard Hoefter and others.
+++ * Copyright (c) 2004, 2011 Richard Hoefter and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -38,7 +38,9 @@ import javax.xml.transform.TransformerConfigurationException;
++ import javax.xml.transform.TransformerException;
++ import javax.xml.transform.TransformerFactoryConfigurationError;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
+++import org.eclipse.ant.internal.ui.model.IAntModelConstants;
++ import org.eclipse.core.resources.IFile;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.runtime.IPath;
++@@ -265,8 +267,8 @@ public class BuildFileCreator
++             String key = (String) iterator.next();
++             String value = (String) variable2valueMap.get(key);
++             Element prop = doc.createElement("property"); //$NON-NLS-1$
++-            prop.setAttribute("name", key); //$NON-NLS-1$
++-            prop.setAttribute("value", value); //$NON-NLS-1$
+++            prop.setAttribute(IAntCoreConstants.NAME, key);
+++            prop.setAttribute(IAntCoreConstants.VALUE, value);
++             if (first)
++             {
++                 first = false;               
++@@ -291,8 +293,8 @@ public class BuildFileCreator
++     {   
++         // <project name="hello" default="build" basedir=".">
++         root = doc.createElement("project"); //$NON-NLS-1$
++-        root.setAttribute("name" , projectName); //$NON-NLS-1$
++-        root.setAttribute("default" , "build"); //$NON-NLS-1$ //$NON-NLS-2$
+++        root.setAttribute(IAntCoreConstants.NAME , projectName);
+++        root.setAttribute(IAntCoreConstants.DEFAULT , "build"); //$NON-NLS-1$
++         root.setAttribute("basedir" , "."); //$NON-NLS-1$ //$NON-NLS-2$
++         doc.appendChild(root);
++         
++@@ -335,7 +337,7 @@ public class BuildFileCreator
++                     if (node instanceof ProcessingInstruction &&  
++                             IMPORT_BUILDFILE_PROCESSING_TARGET.equals(((ProcessingInstruction) node).getTarget().trim())) {
++                         Element element = doc.createElement("import"); //$NON-NLS-1$
++-                        element.setAttribute("file", file.getName()); //$NON-NLS-1$
+++                        element.setAttribute(IAntCoreConstants.FILE, file.getName());
++                         root.appendChild(element);
++                         break;
++                     }
++@@ -424,7 +426,7 @@ public class BuildFileCreator
++             else
++             {
++                 // prefix with ${project.location}
++-                String prefix = ""; //$NON-NLS-1$
+++                String prefix = IAntCoreConstants.EMPTY_STRING;
++                 if (!entry.startsWith("${") &&                                  // no variable ${var}/classes //$NON-NLS-1$
++                     !projectName.equals(currentProject.getProject().getName())) // not main project 
++                 {
++@@ -436,7 +438,7 @@ public class BuildFileCreator
++                 }
++                 Element pathElement = doc.createElement("pathelement"); //$NON-NLS-1$
++                 String path = ExportUtil.getRelativePath(prefix + entry, projectRoot);
++-                pathElement.setAttribute("location", path); //$NON-NLS-1$
+++                pathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, path);
++                 element.appendChild(pathElement);
++             }
++         }
++@@ -483,7 +485,7 @@ public class BuildFileCreator
++                 }
++                 jarFile = ExportUtil.getRelativePath(jarFile, projectRoot);
++                 Element userPathElement = doc.createElement("pathelement"); //$NON-NLS-1$
++-                userPathElement.setAttribute("location", jarFile); //$NON-NLS-1$
+++                userPathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, jarFile);
++                 userElement.appendChild(userPathElement);
++             }
++             addToClasspathBlock(userElement);
++@@ -499,11 +501,11 @@ public class BuildFileCreator
++         // <fileset dir="${java.home}/lib" includes="*.jar"/>
++         // <fileset dir="${java.home}/lib/ext" includes="*.jar"/>
++         Element pathElement = doc.createElement("fileset"); //$NON-NLS-1$
++-        pathElement.setAttribute("dir", "${java.home}/lib"); //$NON-NLS-1$ //$NON-NLS-2$
+++        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib"); //$NON-NLS-1$
++         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
++         element.appendChild(pathElement);
++         pathElement = doc.createElement("fileset"); //$NON-NLS-1$
++-        pathElement.setAttribute("dir", "${java.home}/lib/ext"); //$NON-NLS-1$ //$NON-NLS-2$
+++        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib/ext"); //$NON-NLS-1$
++         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
++         element.appendChild(pathElement);
++     }
++@@ -552,7 +554,7 @@ public class BuildFileCreator
++         //     <mkdir dir="classes"/>
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "init"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "init"); //$NON-NLS-1$
++         List classDirsUnique = ExportUtil.removeDuplicates(classDirs);        
++         for (Iterator iterator = classDirsUnique.iterator(); iterator.hasNext();)
++         {            
++@@ -561,7 +563,7 @@ public class BuildFileCreator
++                 !EclipseClasspath.isReference(classDir))
++             {
++                 Element pathElement = doc.createElement("mkdir"); //$NON-NLS-1$
++-                pathElement.setAttribute("dir", classDir); //$NON-NLS-1$
+++                pathElement.setAttribute(IAntCoreConstants.DIR, classDir);
++                 element.appendChild(pathElement);
++             }
++         }
++@@ -605,7 +607,7 @@ public class BuildFileCreator
++                 copyElement.setAttribute("todir", classDir); //$NON-NLS-1$
++                 copyElement.setAttribute("includeemptydirs", "false"); //$NON-NLS-1$ //$NON-NLS-2$
++                 Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
++-                filesetElement.setAttribute("dir", srcDir); //$NON-NLS-1$
+++                filesetElement.setAttribute(IAntCoreConstants.DIR, srcDir);
++ 
++                 List inclusions = (List) inclusionLists.get(i);
++                 List exclusions = (List) exclusionLists.get(i);
++@@ -614,21 +616,21 @@ public class BuildFileCreator
++                 {
++                     String inclusion = (String) iter.next();
++                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
++-                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
+++                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
++                     filesetElement.appendChild(includeElement);
++                 }           
++                 for (Iterator iter = filters.iterator(); iter.hasNext();)
++                 {
++                     String exclusion = (String) iter.next();
++                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
++-                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
+++                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
++                     filesetElement.appendChild(excludeElement);
++                 }
++                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
++                 {
++                     String exclusion = (String) iter.next();
++                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
++-                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
+++                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
++                     filesetElement.appendChild(excludeElement);
++                 }
++                 
++@@ -648,7 +650,7 @@ public class BuildFileCreator
++         //     <delete dir="classes"/>
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "clean"); //$NON-NLS-1$
++         List classDirUnique = ExportUtil.removeDuplicates(classDirs);
++         for (Iterator iterator = classDirUnique.iterator(); iterator.hasNext();)
++         {
++@@ -657,7 +659,7 @@ public class BuildFileCreator
++                 !EclipseClasspath.isReference(classDir))
++             {
++                 Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
++-                deleteElement.setAttribute("dir", classDir); //$NON-NLS-1$
+++                deleteElement.setAttribute(IAntCoreConstants.DIR, classDir);
++                 element.appendChild(deleteElement);
++             }
++         }
++@@ -672,7 +674,7 @@ public class BuildFileCreator
++         {
++             Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
++             Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
++-            filesetElement.setAttribute("dir", "."); //$NON-NLS-1$ //$NON-NLS-2$
+++            filesetElement.setAttribute(IAntCoreConstants.DIR, "."); //$NON-NLS-1$
++             filesetElement.setAttribute("includes", "**/*.class"); //$NON-NLS-1$ //$NON-NLS-2$
++             deleteElement.appendChild(filesetElement);           
++             element.appendChild(deleteElement);           
++@@ -688,7 +690,7 @@ public class BuildFileCreator
++         //     <ant antfile="build.xml" dir="${hello.location}" inheritAll="false" target="clean"/>
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "cleanall"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "cleanall"); //$NON-NLS-1$
++         element.setAttribute("depends", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
++         List subProjects = ExportUtil.getClasspathProjectsRecursive(project);
++         for (Iterator iterator = subProjects.iterator(); iterator.hasNext();)
++@@ -696,7 +698,7 @@ public class BuildFileCreator
++             IJavaProject subProject = (IJavaProject) iterator.next();
++             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
++             antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
++-            antElement.setAttribute("dir", "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++            antElement.setAttribute(IAntCoreConstants.DIR, "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("target", "clean");  //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
++             element.appendChild(antElement);
++@@ -715,7 +717,7 @@ public class BuildFileCreator
++     {
++         // <target name="build" depends="build-subprojects,build-project"/>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "build"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "build"); //$NON-NLS-1$
++         element.setAttribute("depends", "build-subprojects,build-project"); //$NON-NLS-1$ //$NON-NLS-2$
++         root.appendChild(element);
++         
++@@ -723,20 +725,20 @@ public class BuildFileCreator
++         //     <ant antfile="build.xml" dir="${hello.location}" inheritAll="false" target="build-project"/>
++         // </target>
++         element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "build-subprojects"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "build-subprojects"); //$NON-NLS-1$
++         List subProjects = ExportUtil.getClasspathProjectsRecursive(project);
++         for (Iterator iterator = subProjects.iterator(); iterator.hasNext();)
++         {
++             IJavaProject subProject = (IJavaProject) iterator.next();
++             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
++             antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
++-            antElement.setAttribute("dir", "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++            antElement.setAttribute(IAntCoreConstants.DIR, "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("target", "build-project");  //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
++             if (CREATE_ECLIPSE_COMPILE_TARGET) {
++                 Element propertysetElement = doc.createElement("propertyset"); //$NON-NLS-1$
++                 Element propertyrefElement = doc.createElement("propertyref"); //$NON-NLS-1$
++-                propertyrefElement.setAttribute("name", "build.compiler");  //$NON-NLS-1$ //$NON-NLS-2$
+++                propertyrefElement.setAttribute(IAntCoreConstants.NAME, "build.compiler");  //$NON-NLS-1$
++                 propertysetElement.appendChild(propertyrefElement);
++                 antElement.appendChild(propertysetElement);
++             }
++@@ -754,7 +756,7 @@ public class BuildFileCreator
++         //     </javac>    
++         // </target>        
++         element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "build-project"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "build-project"); //$NON-NLS-1$
++         element.setAttribute("depends", "init"); //$NON-NLS-1$ //$NON-NLS-2$
++         Element echoElement = doc.createElement("echo"); //$NON-NLS-1$
++         echoElement.setAttribute("message", "${ant.project.name}: ${ant.file}"); //$NON-NLS-1$ //$NON-NLS-2$
++@@ -782,14 +784,14 @@ public class BuildFileCreator
++                 {
++                     String inclusion = (String) iter.next();
++                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
++-                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
+++                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
++                     javacElement.appendChild(includeElement);
++                 }           
++                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
++                 {
++                     String exclusion = (String) iter.next();
++                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
++-                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
+++                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
++                     javacElement.appendChild(excludeElement);
++                 }           
++                 Element classpathRefElement = doc.createElement("classpath"); //$NON-NLS-1$
++@@ -826,8 +828,8 @@ public class BuildFileCreator
++         //     <ant antfile="build.xml" dir="${hello.location}" target="build" inheritAll="false"/> 
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "build-refprojects"); //$NON-NLS-1$ //$NON-NLS-2$
++-        element.setAttribute("description", "Build all projects which " + //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "build-refprojects"); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.DESCRIPTION, "Build all projects which " + //$NON-NLS-1$ 
++                 "reference this project. Useful to propagate changes."); //$NON-NLS-1$
++         for (Iterator iter = refProjects.iterator(); iter.hasNext();) {
++             IJavaProject p = (IJavaProject) iter.next();
++@@ -839,20 +841,20 @@ public class BuildFileCreator
++ 
++             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
++             antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
++-            antElement.setAttribute("dir", "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++            antElement.setAttribute(IAntCoreConstants.DIR, "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("target", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("inheritAll", "false"); //$NON-NLS-1$ //$NON-NLS-2$
++             element.appendChild(antElement);
++             
++             antElement = doc.createElement("ant"); //$NON-NLS-1$
++             antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
++-            antElement.setAttribute("dir", "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++            antElement.setAttribute(IAntCoreConstants.DIR, "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("target", "build"); //$NON-NLS-1$ //$NON-NLS-2$
++             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
++             if (CREATE_ECLIPSE_COMPILE_TARGET) {
++                 Element propertysetElement = doc.createElement("propertyset"); //$NON-NLS-1$
++                 Element propertyrefElement = doc.createElement("propertyref"); //$NON-NLS-1$
++-                propertyrefElement.setAttribute("name", "build.compiler");  //$NON-NLS-1$ //$NON-NLS-2$
+++                propertyrefElement.setAttribute(IAntCoreConstants.NAME, "build.compiler");  //$NON-NLS-1$
++                 propertysetElement.appendChild(propertyrefElement);
++                 antElement.appendChild(propertysetElement);
++             }
++@@ -884,12 +886,12 @@ public class BuildFileCreator
++         //     </unzip>
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "init-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
++-        element.setAttribute("description", "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "init-eclipse-compiler"); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.DESCRIPTION, "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ 
++         Element copyElement = doc.createElement("copy"); //$NON-NLS-1$
++         copyElement.setAttribute("todir", "${ant.library.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
++         Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
++-        filesetElement.setAttribute("dir", "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$ //$NON-NLS-2$
+++        filesetElement.setAttribute(IAntCoreConstants.DIR, "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$
++         filesetElement.setAttribute("includes", "org.eclipse.jdt.core_*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
++         copyElement.appendChild(filesetElement);
++         element.appendChild(copyElement);
++@@ -913,11 +915,11 @@ public class BuildFileCreator
++         //     <antcall target="build" />
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "build-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
++-        element.setAttribute("description", "compile project with Eclipse compiler"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "build-eclipse-compiler"); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.DESCRIPTION, "compile project with Eclipse compiler"); //$NON-NLS-1$ 
++         Element propertyElement = doc.createElement("property"); //$NON-NLS-1$
++-        propertyElement.setAttribute("name", "build.compiler"); //$NON-NLS-1$ //$NON-NLS-2$
++-        propertyElement.setAttribute("value", "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$ //$NON-NLS-2$
+++        propertyElement.setAttribute(IAntCoreConstants.NAME, "build.compiler"); //$NON-NLS-1$
+++        propertyElement.setAttribute(IAntCoreConstants.VALUE, "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$
++         element.appendChild(propertyElement);
++         Element antcallElement = doc.createElement("antcall"); //$NON-NLS-1$
++         antcallElement.setAttribute("target", "build"); //$NON-NLS-1$ //$NON-NLS-2$
++@@ -977,7 +979,7 @@ public class BuildFileCreator
++         for (int i = 0; i < confs.length; i++)
++         {
++             ILaunchConfiguration conf = confs[i];
++-            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""))) //$NON-NLS-1$
+++            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, IAntCoreConstants.EMPTY_STRING)))
++             {
++                 continue;
++             }
++@@ -1012,25 +1014,25 @@ public class BuildFileCreator
++     public void addJavaApplication(Map variable2value, ILaunchConfiguration conf) throws CoreException
++     {
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
++         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
++         javaElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
++-        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "")); //$NON-NLS-1$ //$NON-NLS-2$
+++        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING)); //$NON-NLS-1$
++         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
++-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
+++        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
++         ExportUtil.addVariable(variable2value, dir, projectRoot);                
++-        if (!dir.equals("")) //$NON-NLS-1$
+++        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
++         {
++-            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
+++            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
++         }
++         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
++         {
++             javaElement.setAttribute("newenvironment", "true"); //$NON-NLS-1$ //$NON-NLS-2$
++         }
++         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
++-        addElements(props, doc, javaElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++        addElements(props, doc, javaElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
+++        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
+++        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
++         element.appendChild(javaElement);
++         
++         addRuntimeClasspath(conf, javaElement);
++@@ -1049,8 +1051,8 @@ public class BuildFileCreator
++      */
++     public void addApplet(Map variable2value, ILaunchConfiguration conf) throws CoreException, TransformerFactoryConfigurationError, UnsupportedEncodingException
++     {
++-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
++-        if (dir.equals("")) //$NON-NLS-1$
+++        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
+++        if (dir.equals(IAntCoreConstants.EMPTY_STRING))
++         {
++             dir = projectRoot;
++         }
++@@ -1090,17 +1092,17 @@ public class BuildFileCreator
++         }
++         
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
++         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
++         javaElement.setAttribute("fork", "yes");  //$NON-NLS-1$//$NON-NLS-2$
++         javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_APPLETVIEWER_CLASS, "sun.applet.AppletViewer")); //$NON-NLS-1$ //$NON-NLS-2$
++         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
++         if (value != null)
++         {
++-            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
+++            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
++         }
++-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
++-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+++        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
+++        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
++         addElement(conf.getName() + ".html", doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++         element.appendChild(javaElement);
++         addRuntimeClasspath(conf, javaElement);
++@@ -1126,22 +1128,22 @@ public class BuildFileCreator
++         //         <classpath refid="project.classpath"/>
++         //     </junit>
++         // </target>
++-        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ""); //$NON-NLS-1$
+++        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING);
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
+++        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
++         
++         Element mkdirElement = doc.createElement("mkdir"); //$NON-NLS-1$
++-        mkdirElement.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
+++        mkdirElement.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
++         element.appendChild(mkdirElement);
++         
++         Element junitElement = doc.createElement("junit"); //$NON-NLS-1$
++         junitElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
++         junitElement.setAttribute("printsummary", "withOutAndErr"); //$NON-NLS-1$ //$NON-NLS-2$
++-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
+++        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
++         ExportUtil.addVariable(variable2value, dir, projectRoot);                
++-        if (!dir.equals("")) //$NON-NLS-1$
+++        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
++         {
++-            junitElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
+++            junitElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
++         }
++         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
++         {
++@@ -1150,32 +1152,32 @@ public class BuildFileCreator
++         Element formatterElement = doc.createElement("formatter"); //$NON-NLS-1$
++         formatterElement.setAttribute("type", "xml");  //$NON-NLS-1$//$NON-NLS-2$
++         junitElement.appendChild(formatterElement);
++-        if (!testClass.equals("")) //$NON-NLS-1$
+++        if (!testClass.equals(IAntCoreConstants.EMPTY_STRING))
++         {
++             // Case 1: Single JUnit class
++             Element testElement = doc.createElement("test"); //$NON-NLS-1$
++-            testElement.setAttribute("name", testClass); //$NON-NLS-1$
+++            testElement.setAttribute(IAntCoreConstants.NAME, testClass);
++             testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
++             junitElement.appendChild(testElement);                       
++         }
++         else
++         {
++             // Case 2: Run all tests in project, package or source folder
++-            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, ""); //$NON-NLS-1$ //$NON-NLS-2$
+++            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, IAntCoreConstants.EMPTY_STRING); //$NON-NLS-1$
++             IType[] types = ExportUtil.findTestsInContainer(container);
++             Set sortedTypes = new TreeSet(ExportUtil.getITypeComparator());
++             sortedTypes.addAll(Arrays.asList(types));
++             for (Iterator iter = sortedTypes.iterator(); iter.hasNext();) {
++                 IType type = (IType) iter.next();
++                 Element testElement = doc.createElement("test"); //$NON-NLS-1$
++-                testElement.setAttribute("name", type.getFullyQualifiedName()); //$NON-NLS-1$
+++                testElement.setAttribute(IAntCoreConstants.NAME, type.getFullyQualifiedName());
++                 testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
++                 junitElement.appendChild(testElement);                       
++             }
++         }
++         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
++-        addElements(props, doc, junitElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+++        addElements(props, doc, junitElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
+++        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
++         element.appendChild(junitElement);
++         addRuntimeClasspath(conf, junitElement);
++         addRuntimeBootClasspath(conf, junitElement);
++@@ -1198,14 +1200,14 @@ public class BuildFileCreator
++         //     </junitreport>
++         // </target>
++         Element element = doc.createElement("target"); //$NON-NLS-1$
++-        element.setAttribute("name", "junitreport"); //$NON-NLS-1$ //$NON-NLS-2$
+++        element.setAttribute(IAntCoreConstants.NAME, "junitreport"); //$NON-NLS-1$
++         Element junitreport = doc.createElement("junitreport"); //$NON-NLS-1$
++         junitreport.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
++         Element fileset = doc.createElement("fileset"); //$NON-NLS-1$
++-        fileset.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
+++        fileset.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
++         junitreport.appendChild(fileset);
++         Element include = doc.createElement("include"); //$NON-NLS-1$
++-        include.setAttribute("name", "TEST-*.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+++        include.setAttribute(IAntCoreConstants.NAME, "TEST-*.xml"); //$NON-NLS-1$
++         fileset.appendChild(include);
++         Element report = doc.createElement("report"); //$NON-NLS-1$
++         report.setAttribute("format", "frames"); //$NON-NLS-1$ //$NON-NLS-2$
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/EclipseClasspath.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/EclipseClasspath.java
++index 8de43fc..fa05d2a 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/EclipseClasspath.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/EclipseClasspath.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2008 Richard Hoefter and others.
+++ * Copyright (c) 2004, 2011 Richard Hoefter and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -20,6 +20,7 @@ import java.util.LinkedHashMap;
++ import java.util.List;
++ import java.util.Map;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.resources.IFile;
++ import org.eclipse.core.resources.ResourcesPlugin;
++@@ -218,7 +219,7 @@ public class EclipseClasspath
++             }
++             else
++             {
++-                String relativePath = ExportUtil.getRelativePath(file.getLocation() + "", //$NON-NLS-1$
+++                String relativePath = ExportUtil.getRelativePath(file.getLocation() + IAntCoreConstants.EMPTY_STRING,
++                         projectRoot);
++                 variable2valueMap.put(srcDir + ".link", relativePath); //$NON-NLS-1$
++             }
++@@ -307,7 +308,7 @@ public class EclipseClasspath
++                 index = e.indexOf('\\');
++             }
++             String variable = e;
++-            String path = ""; //$NON-NLS-1$
+++            String path = IAntCoreConstants.EMPTY_STRING;
++             if (index != -1)
++             {
++                 variable = e.substring(0, index);
++@@ -324,7 +325,7 @@ public class EclipseClasspath
++             else if (variable2valueMap.get(variable) == null)
++             {
++                 // only add empty value, if variable is new 
++-                variable2valueMap.put(variable, ""); //$NON-NLS-1$
+++                variable2valueMap.put(variable, IAntCoreConstants.EMPTY_STRING);
++             }
++             rawClassPathEntriesAbsolute.add(value + path);
++             rawClassPathEntries.add("${" + variable + "}" + path); //$NON-NLS-1$ //$NON-NLS-2$
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/ExportUtil.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/ExportUtil.java
++index b7a07bd..b9f3026 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/ExportUtil.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/ExportUtil.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2009 Richard Hoefter and others.
+++ * Copyright (c) 2004, 2011 Richard Hoefter and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *     IBM Corporation - NLS'ing and incorporating into Eclipse. 
++  *                     - Bug 177833 Class created from combination of all utility classes of contribution 
++  *                     - Bug 267459 Java project with an external jar file from C:\ on the build path throws a NPE during the Ant Buildfile generation.
+++ *                     - bug fixing
++  *******************************************************************************/
++ 
++ package org.eclipse.ant.internal.ui.datatransfer;
++@@ -47,6 +48,7 @@ import javax.xml.transform.TransformerFactoryConfigurationError;
++ import javax.xml.transform.dom.DOMSource;
++ import javax.xml.transform.stream.StreamResult;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.resources.IFile;
++ import org.eclipse.core.resources.IMarker;
++@@ -712,7 +714,7 @@ public class ExportUtil {
++ 	 */
++ 	public static void addVariable(Map variable2valueMap, String s,
++ 			String projectRoot) {
++-		if (s == null || s.equals("")) //$NON-NLS-1$
+++		if (s == null || s.equals(IAntCoreConstants.EMPTY_STRING))
++ 		{
++ 			return;
++ 		}
++@@ -758,7 +760,7 @@ public class ExportUtil {
++ 		}
++ 		int baseCount = base.segmentCount();
++ 		int count = base.matchingFirstSegments(location);
++-		String temp = ""; //$NON-NLS-1$
+++		String temp = IAntCoreConstants.EMPTY_STRING;
++ 		for (int j = 0; j < baseCount - count; j++) {
++ 			temp += "../"; //$NON-NLS-1$
++ 		}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/JavacTableLabelProvider.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/JavacTableLabelProvider.java
++index c0dabf8..1d5b070 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/JavacTableLabelProvider.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/JavacTableLabelProvider.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2006 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -12,6 +12,7 @@ package org.eclipse.ant.internal.ui.datatransfer;
++ 
++ import com.ibm.icu.text.MessageFormat;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.model.AntElementNode;
++ import org.eclipse.ant.internal.ui.model.AntModelLabelProvider;
++ 
++@@ -25,7 +26,7 @@ public class JavacTableLabelProvider extends AntModelLabelProvider {
++ 	public String getText(Object element) {
++ 		AntElementNode parent= ((AntElementNode)element).getParentNode();
++ 		if (parent == null) {
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		String targetName= super.getText(parent);
++         return MessageFormat.format(DataTransferMessages.JavacTableLabelProvider_0, new String[] {targetName});
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java
++index c043082..8d4e7a0 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2009 IBM Corporation and others.
+++ * Copyright (c) 2004, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -13,6 +13,7 @@ package org.eclipse.ant.internal.ui.debug.model;
++ 
++ import java.io.File;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint;
++ import org.eclipse.ant.internal.launching.debug.model.AntProperties;
++ import org.eclipse.ant.internal.launching.debug.model.AntProperty;
++@@ -133,7 +134,7 @@ public class AntDebugModelPresentation extends LabelProvider implements IDebugMo
++ 	 * @see org.eclipse.debug.ui.IDebugModelPresentation#computeDetail(org.eclipse.debug.core.model.IValue, org.eclipse.debug.ui.IValueDetailListener)
++ 	 */
++ 	public void computeDetail(IValue value, IValueDetailListener listener) {
++-		String detail = ""; //$NON-NLS-1$
+++		String detail = IAntCoreConstants.EMPTY_STRING;
++ 		try {
++ 			detail = value.getValueString();
++ 		} catch (DebugException e) {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java
++index 4f4673c..db713e3 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java	
++@@ -13,6 +13,7 @@ package org.eclipse.ant.internal.ui.launchConfigurations;
++ import java.util.HashMap;
++ import java.util.Map;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++@@ -270,7 +271,7 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
++     private void initializeBuildKinds(ILaunchConfiguration configuration) {
++         String buildKindString= null;
++         try {
++-            buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, ""); //$NON-NLS-1$
+++            buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, IAntCoreConstants.EMPTY_STRING);
++         } catch (CoreException e) {
++             AntUIPlugin.log("Error reading configuration", e); //$NON-NLS-1$
++         }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java
++index 8234c55..2ffad58 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJavaLaunchDelegate.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.launchConfigurations;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.runtime.IProgressMonitor;
++ import org.eclipse.debug.core.ILaunchConfiguration;
++@@ -42,6 +43,6 @@ public class AntJavaLaunchDelegate extends JavaLaunchDelegate {
++ 			return super.getProgramArguments(configuration);
++ 		} catch (CoreException ce) {
++ 		}
++-		return configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
+++		return configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING);
++ 	}
++ }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java
++index ef417b9..bd5bc7f 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui.launchConfigurations;
++ import java.util.ArrayList;
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -320,7 +321,7 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
++ 			if (!DebugUITools.saveBeforeLaunch()) {
++ 				return;
++ 			}
++-			IStatus status = new Status(IStatus.INFO, IAntUIConstants.PLUGIN_ID, IAntUIConstants.STATUS_INIT_RUN_ANT, "", null); //$NON-NLS-1$
+++			IStatus status = new Status(IStatus.INFO, IAntUIConstants.PLUGIN_ID, IAntUIConstants.STATUS_INIT_RUN_ANT, IAntCoreConstants.EMPTY_STRING, null);
++ 			String groupId;
++ 			if (mode.equals(ILaunchManager.DEBUG_MODE)) {
++ 			    groupId= IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java
++index 209aa6c..e3b9a54 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.launchConfigurations;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -96,7 +97,7 @@ public class AntMainTab extends ExternalToolsMainTab {
++ 
++ 	private void updateProjectName(ILaunchConfigurationWorkingCopy configuration) {
++         IFile file = getIFile(configuration);
++-        String projectName= ""; //$NON-NLS-1$
+++        String projectName= IAntCoreConstants.EMPTY_STRING;
++         if (file != null) {
++             projectName= file.getProject().getName();
++         }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java
++index 1b8065f..7f41b76 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2005, 2009 IBM Corporation and others.
+++ * Copyright (c) 2005, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.launchConfigurations;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.launching.IAntLaunchConstants;
++ import org.eclipse.core.runtime.CoreException;
++@@ -61,7 +62,7 @@ public class SetTargetsDialog extends Dialog {
++     protected String getTargetsSelected() {
++ 		String defaultValue= null;
++ 		if (!fTargetsTab.isTargetSelected()) {
++-			defaultValue= ""; //$NON-NLS-1$
+++			defaultValue= IAntCoreConstants.EMPTY_STRING;
++ 		}
++         try {
++             return fConfiguration.getAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, defaultValue);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TargetTableLabelProvider.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TargetTableLabelProvider.java
++index a377e9c..752e137 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TargetTableLabelProvider.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TargetTableLabelProvider.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -10,6 +10,7 @@
++  *******************************************************************************/
++ package org.eclipse.ant.internal.ui.launchConfigurations;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.model.AntModelLabelProvider;
++ import org.eclipse.ant.internal.ui.model.AntTargetNode;
++ import org.eclipse.jface.viewers.ITableLabelProvider;
++@@ -39,7 +40,7 @@ public class TargetTableLabelProvider extends AntModelLabelProvider implements I
++ 		}
++ 		String desc= ((AntTargetNode)element).getTarget().getDescription();
++ 		if (desc == null) {
++-			return ""; //$NON-NLS-1$
+++			return IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		return desc;
++ 	}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java
++index c6d8515..d27be10 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -17,6 +17,7 @@ import java.util.List;
++ import java.util.Map;
++ 
++ import org.apache.tools.ant.util.FileUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.launching.AntLaunch;
++ import org.eclipse.ant.internal.launching.AntLaunchingUtil;
++ import org.eclipse.ant.internal.launching.LinkDescriptor;
++@@ -137,7 +138,7 @@ public class TaskLinkManager {
++ 
++ 	private static boolean linkBuildFileMessage(IConsole console, IRegion region) {
++ 		
++-		String message= ""; //$NON-NLS-1$
+++		String message= IAntCoreConstants.EMPTY_STRING;
++ 		int offset= region.getOffset();
++ 		try {
++ 			message = console.getDocument().get(offset, region.getLength());
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntAntNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntAntNode.java
++index 9b99709..c761dd0 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntAntNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntAntNode.java	
++@@ -14,6 +14,7 @@ import java.io.File;
++ 
++ import org.apache.tools.ant.Task;
++ import org.apache.tools.ant.util.FileUtils;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor;
++ import org.xml.sax.Attributes;
++ 
++@@ -24,7 +25,7 @@ public class AntAntNode extends AntTaskNode {
++     public AntAntNode(Task task, Attributes attributes) {
++         super(task);
++         StringBuffer label= new StringBuffer("ant "); //$NON-NLS-1$
++-        fFile= attributes.getValue(IAntModelConstants.ATTR_DIR);
+++        fFile= attributes.getValue(IAntCoreConstants.DIR);
++         if (fFile != null) {
++         	if (!FileUtils.isAbsolutePath(fFile)) {
++         		File basedir= task.getProject().getBaseDir();
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntDefiningTaskNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntDefiningTaskNode.java
++index 9b6940f..2529b4e 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntDefiningTaskNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntDefiningTaskNode.java	
++@@ -26,6 +26,7 @@ import org.apache.tools.ant.UnknownElement;
++ import org.eclipse.ant.core.AntCorePlugin;
++ import org.eclipse.ant.core.AntCorePreferences;
++ import org.eclipse.ant.core.AntSecurityException;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -40,11 +41,11 @@ public class AntDefiningTaskNode extends AntTaskNode {
++     
++     public AntDefiningTaskNode(Task task, Attributes attributes) {
++         super(task);
++-        String label= attributes.getValue(IAntModelConstants.ATTR_NAME);
+++        String label= attributes.getValue(IAntCoreConstants.NAME);
++         if (label == null) {
++             label= task.getTaskName();
++         
++-            String file= attributes.getValue(IAntModelConstants.ATTR_FILE);
+++            String file= attributes.getValue(IAntCoreConstants.FILE);
++             if(file != null) {
++                 label=  label + " " + file; //$NON-NLS-1$
++                 fIdentifier= file;
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java
++index a1e95d6..8e21c82 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2002, 2008 GEBIT Gesellschaft fuer EDV-Beratung
+++ * Copyright (c) 2002, 2011 GEBIT Gesellschaft fuer EDV-Beratung
++  * und Informatik-Technologien mbH, 
++  * Berlin, Duesseldorf, Frankfurt (Germany) and others.
++  * All rights reserved. This program and the accompanying materials 
++@@ -23,6 +23,7 @@ import java.util.ArrayList;
++ import java.util.Iterator;
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntImageDescriptor;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUtil;
++@@ -333,7 +334,7 @@ public class AntElementNode implements IAdaptable, IAntElement {
++ 			if (buildFileName != null) {
++ 				buffer.append(buildFileName);
++ 			}
++-			buffer.append(getParentNode() != null ? getParentNode().getElementPath() : ""); //$NON-NLS-1$
+++			buffer.append(getParentNode() != null ? getParentNode().getElementPath() : IAntCoreConstants.EMPTY_STRING);
++ 			buffer.append('/');
++ 			buffer.append(getElementIdentifier());
++ 			buffer.append('[');
++@@ -347,9 +348,9 @@ public class AntElementNode implements IAdaptable, IAntElement {
++ 
++ 	private String getElementIdentifier() {
++ 		if (fElementIdentifier == null) {
++-			StringBuffer buffer= escape(new StringBuffer(getName() != null ? getName() : ""), '\\', "$/[]\\"); //$NON-NLS-1$ //$NON-NLS-2$
+++			StringBuffer buffer= escape(new StringBuffer(getName() != null ? getName() : IAntCoreConstants.EMPTY_STRING), '\\', "$/[]\\"); //$NON-NLS-1$
++ 			buffer.append('$');
++-			buffer.append(escape(new StringBuffer(getLabel() != null ? getLabel() : ""), '\\', "$/[]\\").toString()); //$NON-NLS-1$ //$NON-NLS-2$
+++			buffer.append(escape(new StringBuffer(getLabel() != null ? getLabel() : IAntCoreConstants.EMPTY_STRING), '\\', "$/[]\\").toString()); //$NON-NLS-1$
++ 			
++ 			fElementIdentifier= buffer.toString();
++ 		}
++@@ -366,28 +367,6 @@ public class AntElementNode implements IAdaptable, IAntElement {
++ 		return sb;
++ 	}
++ 
++-//	private int getElementIndexOf(AntElementNode child) {
++-//		if (getChildNodes() == null) {
++-//			return -1;
++-//		}
++-//		
++-//		int result= -1;
++-//		
++-//		Iterator iter= getChildNodes().iterator();
++-//		AntElementNode current= null;
++-//		while (current != child && iter.hasNext()) {
++-//			current= (AntElementNode) iter.next();
++-//			if (child.getElementIdentifier().equals(current.getElementIdentifier()))
++-//				result++;
++-//		}
++-//		
++-//		if (current != child) {
++-//			return -1;
++-//		}
++-//		
++-//		return result;
++-//	}
++-
++ 	/* (non-Javadoc)
++ 	 * @see java.lang.Object#equals(java.lang.Object)
++ 	 */
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntImportNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntImportNode.java
++index 9270ba2..d1eaaf5 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntImportNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntImportNode.java	
++@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui.model;
++ import org.apache.tools.ant.BuildException;
++ import org.apache.tools.ant.Task;
++ import org.eclipse.ant.core.AntSecurityException;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -29,7 +30,7 @@ public class AntImportNode extends AntTaskNode {
++ 	
++ 	public AntImportNode(Task task, Attributes attributes) {
++ 		super(task);
++-         fFile= attributes.getValue(IAntModelConstants.ATTR_FILE);
+++         fFile= attributes.getValue(IAntCoreConstants.FILE);
++ 	}
++ 	
++ 	public String getFile() {
++@@ -98,7 +99,7 @@ public class AntImportNode extends AntTaskNode {
++ 			String textToSearch= getAntModel().getText(getOffset(), offset - getOffset());
++ 			if (textToSearch != null && textToSearch.length() != 0) {
++ 				String attributeString = AntEditorCompletionProcessor.getAttributeStringFromDocumentStringToPrefix(textToSearch);
++-				if (IAntModelConstants.ATTR_FILE.equals(attributeString)) {
+++				if (IAntCoreConstants.FILE.equals(attributeString)) {
++ 					return fFile;
++ 				}
++ 			}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
++index ea91ab8..6b8887c 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
++@@ -348,7 +348,7 @@ public class AntModel implements IAntModel {
++         // to determine the actual location of the file. Though the file 
++         // contents will not be parsed. We parse the passed document string
++         File file = getEditedFile();
++-        String filePath= ""; //$NON-NLS-1$
+++        String filePath= IAntCoreConstants.EMPTY_STRING;
++         if (file != null) {
++             filePath= file.getAbsolutePath();
++         }
++@@ -836,7 +836,7 @@ public class AntModel implements IAntModel {
++         } else if(taskName.equalsIgnoreCase("antcall")) { //$NON-NLS-1$
++             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_TARGET));
++         } else if(taskName.equalsIgnoreCase("mkdir")) { //$NON-NLS-1$
++-            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DIR));
+++            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntCoreConstants.DIR));
++         } else if(taskName.equalsIgnoreCase("copy")) { //$NON-NLS-1$
++             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DESTFILE));
++         } else if(taskName.equalsIgnoreCase("tar")  //$NON-NLS-1$
++@@ -869,11 +869,11 @@ public class AntModel implements IAntModel {
++             newNode= new AntAntNode(newTask, attributes);
++         } else if(taskName.equalsIgnoreCase("delete")) { //$NON-NLS-1$
++             String label = "delete "; //$NON-NLS-1$
++-            String file = attributes.getValue(IAntModelConstants.ATTR_FILE);
+++            String file = attributes.getValue(IAntCoreConstants.FILE);
++             if(file != null) {
++                 label+= file;
++             } else {
++-                file = attributes.getValue(IAntModelConstants.ATTR_DIR);
+++                file = attributes.getValue(IAntCoreConstants.DIR);
++                 if(file != null) {
++                     label+= file;
++                 }
++@@ -916,7 +916,7 @@ public class AntModel implements IAntModel {
++         }
++         String taskName= newTask.getTaskName();
++         if ("attribute".equals(taskName) || "element".equals(taskName)) { //$NON-NLS-1$ //$NON-NLS-2$
++-            String name= attributes.getValue("name"); //$NON-NLS-1$
+++            String name= attributes.getValue(IAntCoreConstants.NAME);
++             if (name != null) {
++                 newNode.setBaseLabel(name);
++             }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java
++index ff4d049..ebb00fa 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * Portions Copyright  2000-2004 The Apache Software Foundation
++  * All rights reserved. This program and the accompanying materials are made 
++  * available under the terms of the Apache Software License v2.0 which 
++@@ -13,14 +13,22 @@
++ package org.eclipse.ant.internal.ui.model;
++ 
++ import java.io.File;
+++import java.util.Collections;
++ import java.util.Enumeration;
++ import java.util.Hashtable;
+++import java.util.Iterator;
+++import java.util.Map;
+++import java.util.Map.Entry;
+++import java.util.HashMap;
++ 
++ import org.apache.tools.ant.AntClassLoader;
++ import org.apache.tools.ant.BuildException;
++ import org.apache.tools.ant.BuildListener;
++ import org.apache.tools.ant.Project;
+++import org.apache.tools.ant.PropertyHelper;
+++import org.apache.tools.ant.UnknownElement;
++ import org.apache.tools.ant.types.Path;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ 
++ /**
++  * Derived from the original Ant Project class
++@@ -32,22 +39,54 @@ import org.apache.tools.ant.types.Path;
++  */
++ public class AntModelProject extends Project {
++ 	
++-	private Hashtable fBaseProperties;
++-	private Hashtable fCurrentProperties= new Hashtable();
+++	/**
+++	 * Delegate to maintain property chaining - to make sure our project is alerted 
+++	 * to new properties being set
+++	 */
+++	class AntPropertyHelper implements PropertyHelper.PropertySetter {
+++		/* (non-Javadoc)
+++		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#setNew(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
+++		 */
+++		public boolean setNew(String property, Object value, PropertyHelper propertyHelper) {
+++			setNewProperty(property, value.toString());
+++			return false;
+++		}
+++
+++		/* (non-Javadoc)
+++		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#set(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
+++		 */
+++		public boolean set(String property, Object value, PropertyHelper propertyHelper) {
+++			return false;
+++		}
+++	}
+++	
++ 	private AntPropertyNode fCurrentConfiguringPropertyNode;
+++	private Map idrefs = Collections.synchronizedMap(new HashMap());
+++	private static Object loaderLock = new Object();
+++	private Hashtable loaders = null;
+++	private AntRefTable references = new AntRefTable();
+++	
+++	/**
+++	 * Constructor
+++	 * <p>
+++	 * Allows us to register a {@link PropertyHelper.PropertySetter} delegate for this project
+++	 * </p>
+++	 * @noreference This constructor is not intended to be referenced by clients.
+++	 */
+++	public AntModelProject() {
+++		PropertyHelper.getPropertyHelper(this).add(new AntPropertyHelper());
+++	}
++ 	
++ 	/* (non-Javadoc)
++ 	 * @see org.apache.tools.ant.Project#setNewProperty(java.lang.String, java.lang.String)
++ 	 */
++ 	public void setNewProperty(String name, String value) {
++-		
++-		if (fCurrentProperties.get(name) != null) {
+++		if(PropertyHelper.getPropertyHelper(this).getProperty(name) != null) {
++ 			return;
++-		} 
+++		}
++ 		//allows property values to be over-written for this parse session
++ 		//there is currently no way to remove properties from the Apache Ant project
++ 		//the project resets it properties for each parse...see reset()
++-		fCurrentProperties.put(name, value);
++ 		if (fCurrentConfiguringPropertyNode != null) {
++ 			fCurrentConfiguringPropertyNode.addProperty(name, value);
++ 		}
++@@ -66,13 +105,26 @@ public class AntModelProject extends Project {
++ 		}
++ 	}
++ 	
+++	/**
+++	 * Reset the project
+++	 */
++ 	public void reset() {
++ 		getTargets().clear();
++ 		setDefault(null);
++ 		setDescription(null);
++-		setName(""); //$NON-NLS-1$
++-		//reset the properties to the initial set
++-		fCurrentProperties= new Hashtable(fBaseProperties);
+++		setName(IAntCoreConstants.EMPTY_STRING);
+++		synchronized (loaderLock) {
+++			if(loaders != null) {
+++				Iterator i = loaders.entrySet().iterator();
+++				Entry e = null;
+++				while(i.hasNext()) {
+++					e = (Entry) i.next();
+++					AntClassLoader acl = (AntClassLoader) e.getValue();
+++					acl.cleanup();
+++					acl.clearAssertionStatus();
+++				}
+++			}
+++		}
++ 	}
++ 	
++ 	/* (non-Javadoc)
++@@ -80,39 +132,55 @@ public class AntModelProject extends Project {
++ 	 */
++ 	public String getProperty(String name) {
++ 		//override as we cannot remove properties from the Apache Ant project
++-		String result= (String)fCurrentProperties.get(name);
+++		String result= super.getProperty(name);
++ 		if (result == null) {
++-			result= getUserProperty(name);
+++			return getUserProperty(name);
++ 		}
++ 		return result;
++ 	}
++ 	
++ 	/* (non-Javadoc)
+++	 * @see org.apache.tools.ant.Project#addIdReference(java.lang.String, java.lang.Object)
+++	 */
+++	public void addIdReference(String id, Object value) {
+++		//XXX hack because we cannot look up references by id in Ant 1.8.x
+++		//see https://issues.apache.org/bugzilla/show_bug.cgi?id=49659
+++		idrefs.put(id, value);
+++	}
+++	
+++	/* (non-Javadoc)
+++	 * @see org.apache.tools.ant.Project#getReference(java.lang.String)
+++	 */
+++	public Object getReference(String key) {
+++		Object ref = references.get(key);
+++		if(ref == null) {
+++			ref = idrefs.get(key);
+++			if(ref instanceof UnknownElement) {
+++				UnknownElement ue = (UnknownElement) ref;
+++				ue.maybeConfigure();
+++				return ue.getRealThing();
+++			}
+++		}
+++		return ref;
+++	}
+++	
+++	/* (non-Javadoc)
++ 	 * @see org.apache.tools.ant.Project#getProperties()
++ 	 */
++ 	public Hashtable getProperties() {
++ 		//override as we cannot remove properties from the Apache Ant project
++-		Hashtable allProps= new Hashtable(fCurrentProperties);
+++		Hashtable allProps = super.getProperties();
++ 		allProps.putAll(getUserProperties());
++ 		allProps.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
++ 		return allProps;
++ 	}
++ 	
++ 	/* (non-Javadoc)
++-	 * @see org.apache.tools.ant.Project#init()
++-	 */
++-	public void init() throws BuildException {
++-		super.init();
++-		fBaseProperties= super.getProperties();
++-		fCurrentProperties= super.getProperties();
++-	}
++-	
++-	/* (non-Javadoc)
++ 	 * @see org.apache.tools.ant.Project#setBaseDir(java.io.File)
++ 	 */
++ 	public void setBaseDir(File baseDir) throws BuildException {
++ 		super.setBaseDir(baseDir);
++-		fCurrentProperties.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
+++		setNewProperty("basedir", getBaseDir().getPath()); //$NON-NLS-1$
++ 	}
++ 
++ 	/**
++@@ -126,12 +194,53 @@ public class AntModelProject extends Project {
++      * @see org.apache.tools.ant.Project#createClassLoader(org.apache.tools.ant.types.Path)
++      */
++     public AntClassLoader createClassLoader(Path path) {
++-    	AntClassLoader loader= super.createClassLoader(path);
++-    	if (path == null) {
++-    		//use the "fake" Eclipse runtime classpath for Ant
++-    		loader.setClassPath(Path.systemClasspath);
++-    	}
++-        
++-        return loader;
+++    	synchronized (loaderLock) {
+++    		if(loaders == null) {
+++    			loaders = new Hashtable(8);
+++    		}
+++    		Path p = path;
+++    		if(p == null) {
+++    			p = new Path(this);
+++    		}
+++    		String pstr = p.toString();
+++    		AntClassLoader loader = (AntClassLoader) loaders.get(pstr);
+++    		if(loader == null) {
+++    			loader = super.createClassLoader(path);
+++    	    	if (path == null) {
+++    	    		//use the "fake" Eclipse runtime classpath for Ant
+++    	    		loader.setClassPath(Path.systemClasspath);
+++    	    	}
+++    	    	loaders.put(pstr, loader);
+++    		}
+++    		return loader;
+++		}
+++    }
+++    
+++    /* (non-Javadoc)
+++     * @see org.apache.tools.ant.Project#addReference(java.lang.String, java.lang.Object)
+++     */
+++    public void addReference(String referenceName, Object value) {
+++    	references.put(referenceName, value);
+++    }
+++    
+++    /* (non-Javadoc)
+++     * @see org.apache.tools.ant.Project#getReferences()
+++     */
+++    public Hashtable getReferences() {
+++    	return references;
+++    }
+++    
+++    /* (non-Javadoc)
+++     * @see org.apache.tools.ant.Project#getCopyOfReferences()
+++     */
+++    public Map getCopyOfReferences() {
+++    	return new Hashtable(references);
+++    }
+++    
+++    /* (non-Javadoc)
+++     * @see org.apache.tools.ant.Project#hasReference(java.lang.String)
+++     */
+++    public boolean hasReference(String key) {
+++    	return references.contains(key);
++     }
++ }
++\ No newline at end of file
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java
++index c56db72..f4cca85 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
++@@ -15,6 +15,7 @@ import java.util.ArrayList;
++ import java.util.List;
++ 
++ import org.apache.tools.ant.Project;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++ import org.eclipse.core.resources.IFile;
++@@ -129,9 +130,9 @@ public class AntProjectNode extends AntElementNode {
++         	return null;
++         }
++         List results= new ArrayList(1);
++-    	identifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
++-    	int defaultTargetNameOffset= textToSearch.indexOf("default"); //$NON-NLS-1$
++-    	defaultTargetNameOffset= textToSearch.indexOf(identifier, defaultTargetNameOffset);
+++    	String newidentifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
+++    	int defaultTargetNameOffset= textToSearch.indexOf(IAntCoreConstants.DEFAULT);
+++    	defaultTargetNameOffset= textToSearch.indexOf(newidentifier, defaultTargetNameOffset);
++     	results.add(new Integer(getOffset() + defaultTargetNameOffset + 1));
++         return results;
++     }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java
++index 6a04c21..b21e3a5 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2006 IBM Corporation and others.
+++ * Copyright (c) 2004, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -19,6 +19,7 @@ import java.util.Map;
++ import org.apache.tools.ant.BuildException;
++ import org.apache.tools.ant.Task;
++ import org.eclipse.ant.core.AntSecurityException;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++ import org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor;
++@@ -31,7 +32,7 @@ public class AntPropertyNode extends AntTaskNode {
++ 	
++ 	private String fValue= null;
++ 	private String fReferencedName;
++-    private String fOccurrencesStartingPoint= IAntModelConstants.ATTR_VALUE;
+++    private String fOccurrencesStartingPoint= IAntCoreConstants.VALUE;
++     private String fOccurrencesIdentifier;
++     
++ 	/*
++@@ -42,9 +43,9 @@ public class AntPropertyNode extends AntTaskNode {
++ 	
++ 	public AntPropertyNode(Task task, Attributes attributes) {
++ 		super(task);
++-		 String label = attributes.getValue(IAntModelConstants.ATTR_NAME);
+++		 String label = attributes.getValue(IAntCoreConstants.NAME);
++          if (label == null) {
++-			label = attributes.getValue(IAntModelConstants.ATTR_FILE);
+++			label = attributes.getValue(IAntCoreConstants.FILE);
++          	if (label != null) {
++          		fReferencedName= label;
++          		label=  "file="+label; //$NON-NLS-1$
++@@ -67,7 +68,7 @@ public class AntPropertyNode extends AntTaskNode {
++          		}
++          	}
++          } else {
++-         	fValue= attributes.getValue(IAntModelConstants.ATTR_VALUE);
+++         	fValue= attributes.getValue(IAntCoreConstants.VALUE);
++             if (fValue == null) {
++                 fOccurrencesStartingPoint= IAntModelConstants.ATTR_LOCATION;
++                 fValue= attributes.getValue(fOccurrencesStartingPoint);
++@@ -140,7 +141,7 @@ public class AntPropertyNode extends AntTaskNode {
++ 			String textToSearch= getAntModel().getText(getOffset(), offset - getOffset());
++ 			if (textToSearch != null && textToSearch.length() != 0) {
++ 				String attributeString = AntEditorCompletionProcessor.getAttributeStringFromDocumentStringToPrefix(textToSearch);
++-				if ("file".equals(attributeString) || "resource".equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+++				if (IAntCoreConstants.FILE.equals(attributeString) || IAntModelConstants.ATTR_RESOURCE.equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$
++ 					return fReferencedName;
++ 				}
++ 			}
++@@ -214,7 +215,7 @@ public class AntPropertyNode extends AntTaskNode {
++         List results= new ArrayList();
++         if (fBaseLabel != null) {
++             if (fBaseLabel.equals(identifier)) {
++-                int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
+++                int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
++                 nameOffset= textToSearch.indexOf(identifier, nameOffset + 1);
++                 results.add(new Integer(getOffset() + nameOffset));
++             }
++@@ -249,7 +250,7 @@ public class AntPropertyNode extends AntTaskNode {
++          if (textToSearch == null || textToSearch.length() == 0) {
++          	return false;
++          }
++-         int nameStartOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
+++         int nameStartOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
++          nameStartOffset= textToSearch.indexOf("\"", nameStartOffset); //$NON-NLS-1$
++          int nameEndOffset= textToSearch.indexOf("\"", nameStartOffset + 1); //$NON-NLS-1$
++          nameEndOffset+=offset;
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java
++new file mode 100644
++index 0000000..1f04ae6
++--- /dev/null
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java	
++@@ -0,0 +1,53 @@
+++package org.eclipse.ant.internal.ui.model;
+++
+++import java.util.Hashtable;
+++
+++import org.apache.tools.ant.UnknownElement;
+++
+++/**
+++ * This class has been copied in its entirety from the static
+++ * inner class AntRefTable from {@link org.apache.tools.ant.Project}
+++ */
+++public class AntRefTable extends Hashtable {
+++
+++	private static final long serialVersionUID = 1L;
+++
+++	AntRefTable() {
+++        super();
+++    }
+++
+++    /** 
+++     * Returns the unmodified original object.
+++     * This method should be called internally to
+++     * get the "real" object.
+++     * The normal get method will do the replacement
+++     * of UnknownElement (this is similar with the JDNI
+++     * refs behavior).
+++     */
+++    private Object getReal(Object key) {
+++        return super.get(key);
+++    }
+++
+++    /** 
+++     * Get method for the reference table.
+++     *  It can be used to hook dynamic references and to modify
+++     * some references on the fly--for example for delayed
+++     * evaluation.
+++     *
+++     * It is important to make sure that the processing that is
+++     * done inside is not calling get indirectly.
+++     *
+++     * @param key lookup key.
+++     * @return mapped value.
+++     */
+++    public synchronized Object get(Object key) {
+++        Object o = getReal(key);
+++        if (o instanceof UnknownElement) {
+++            // Make sure that
+++            UnknownElement ue = (UnknownElement) o;
+++            ue.maybeConfigure();
+++            o = ue.getRealThing();
+++        }
+++        return o;
+++    }
+++}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java
++index 0bd4c1c..c59e984 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2004, 2009 IBM Corporation and others.
+++ * Copyright (c) 2004, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -17,6 +17,7 @@ import java.util.List;
++ import java.util.Map;
++ 
++ import org.apache.tools.ant.Target;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++@@ -179,7 +180,7 @@ public class AntTargetNode extends AntElementNode {
++         }
++         List results= new ArrayList();
++         if (getTargetName().equals(identifier)) {
++-            int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
+++            int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
++             nameOffset= textToSearch.indexOf(identifier, nameOffset);
++             results.add(new Integer(getOffset() + nameOffset));
++         } else {
++@@ -236,7 +237,7 @@ public class AntTargetNode extends AntElementNode {
++ 		}
++ 		if (checkReferenceRegion(region, textToSearch, "depends")) { //$NON-NLS-1$
++ 			return true;
++-		} else if (checkReferenceRegion(region, textToSearch, "name")) { //$NON-NLS-1$
+++		} else if (checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME)) {
++ 			return true;
++ 		} else if (checkReferenceRegion(region, textToSearch, "if")) { //$NON-NLS-1$
++ 			return true;
++@@ -252,6 +253,6 @@ public class AntTargetNode extends AntElementNode {
++          if (textToSearch == null || textToSearch.length() == 0) {
++          	return false;
++          }
++-         return checkReferenceRegion(region, textToSearch, "name"); //$NON-NLS-1$
+++         return checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME);
++ 	}
++ }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntModelConstants.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntModelConstants.java
++index f9c4f6e..b54be37 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntModelConstants.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/IAntModelConstants.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -15,23 +15,14 @@ package org.eclipse.ant.internal.ui.model;
++  */
++ public interface IAntModelConstants {
++ 	
++-	/**
++-	 * Attributes of Ant elements
++-	 */
++-	public static final String ATTR_NAME= "name"; //$NON-NLS-1$
++-	public static final String ATTR_VALUE= "value"; //$NON-NLS-1$
++-    public static final String ATTR_LOCATION= "location"; //$NON-NLS-1$
++-	public static final String ATTR_DEFAULT= "default"; //$NON-NLS-1$
+++	public static final String ATTR_LOCATION= "location"; //$NON-NLS-1$
++ 	public static final String ATTR_RESOURCE= "resource"; //$NON-NLS-1$
++ 	public static final String ATTR_ENVIRONMENT= "environment"; //$NON-NLS-1$
++ 	public static final String ATTR_TARGET= "target"; //$NON-NLS-1$
++-	public static final String ATTR_DIR= "dir"; //$NON-NLS-1$
++-	public static final String ATTR_FILE= "file"; //$NON-NLS-1$
++ 	public static final String ATTR_DESTFILE= "destfile"; //$NON-NLS-1$
++ 	public static final String ATTR_SRC= "src"; //$NON-NLS-1$
++ 	public static final String ATTR_ZIPFILE= "zipfile"; //$NON-NLS-1$
++ 	public static final String ATTR_COMMAND= "command"; //$NON-NLS-1$
++ 	public static final String ATTR_EXECUTABLE= "executable"; //$NON-NLS-1$
++-	public static final String ATTR_DESCRIPTION= "description"; //$NON-NLS-1$
++ 	public static final String ATTR_ANT_FILE= "antfile"; //$NON-NLS-1$
++ }
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
++index bb9894d..515b256 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2006 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -22,6 +22,7 @@ import java.util.zip.ZipException;
++ import java.util.zip.ZipFile;
++ 
++ import org.eclipse.ant.core.IAntClasspathEntry;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.runtime.IPath;
++@@ -82,9 +83,9 @@ public class AddCustomDialog extends StatusDialog {
++ 	
++ 	private Text nameField;
++ 	
++-	private String name=""; //$NON-NLS-1$
+++	private String name= IAntCoreConstants.EMPTY_STRING;
++ 	private IAntClasspathEntry library= null;
++-	private String className=""; //$NON-NLS-1$
+++	private String className= IAntCoreConstants.EMPTY_STRING;
++ 	
++ 	private boolean editing= false;
++ 	
++@@ -394,7 +395,7 @@ public class AddCustomDialog extends StatusDialog {
++ 		// Use an empty label so that display of the element's full name
++ 		// doesn't include a confusing label
++ 		MinimizedFileSystemElement dummyParent =
++-			new MinimizedFileSystemElement("", null, true);//$NON-NLS-1$
+++			new MinimizedFileSystemElement(IAntCoreConstants.EMPTY_STRING, null, true);
++ 		dummyParent.setPopulated();
++ 		MinimizedFileSystemElement result =
++ 			new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
++index 09c43a7..f0b1067 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2008 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -20,6 +20,7 @@ import java.util.Iterator;
++ import java.util.List;
++ 
++ import org.eclipse.ant.core.IAntClasspathEntry;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++ import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
++@@ -221,7 +222,7 @@ public class AntClasspathBlock {
++ 		String result = dialog.open();
++ 		if (result != null) {
++ 			try {
++-				URL url = new URL("file:" + result + "/"); //$NON-NLS-2$;//$NON-NLS-1$;
+++				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + result + "/"); //$NON-NLS-1$;
++ 				((AntClasspathContentProvider)treeViewer.getContentProvider()).add(currentParent, url);
++ 			} catch (MalformedURLException e) {
++ 			}
++@@ -252,7 +253,7 @@ public class AntClasspathBlock {
++ 			String jarName = results[i];
++ 			try {
++ 				IPath path = filterPath.append(jarName).makeAbsolute();
++-				URL url = new URL("file:" + path.toOSString()); //$NON-NLS-1$;
+++				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + path.toOSString());
++ 				contentProvider.add(currentParent, url);
++ 			} catch (MalformedURLException e) {
++ 			}
++@@ -497,7 +498,7 @@ public class AntClasspathBlock {
++ 				File file = new File(rootDir, names[i]);
++ 				if (file.isFile() && file.getPath().endsWith(".jar")) { //$NON-NLS-1$
++ 					try {
++-						URL url = new URL("file:" +  file.getAbsolutePath()); //$NON-NLS-1$
+++						URL url = new URL(IAntCoreConstants.FILE_PROTOCOL +  file.getAbsolutePath());
++ 						contentProvider.add(ClasspathModel.ANT_HOME, url);
++ 					} catch (MalformedURLException e) {
++ 					}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java
++index e284013..5d7c070 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2006 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -13,6 +13,7 @@ package org.eclipse.ant.internal.ui.preferences;
++ import org.eclipse.ant.core.Property;
++ import org.eclipse.ant.core.Task;
++ import org.eclipse.ant.internal.core.AntObject;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIImages;
++ import org.eclipse.ant.internal.ui.IAntUIConstants;
++ import org.eclipse.jface.viewers.IColorProvider;
++@@ -98,7 +99,7 @@ public class AntObjectLabelProvider extends LabelProvider implements ITableLabel
++                     return property.getPluginLabel();
++                 }
++         }
++-        return ""; //$NON-NLS-1$
+++        return IAntCoreConstants.EMPTY_STRING;
++     }
++     
++ 	public static Image getTypeImage() {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
++index fcdc7da..20d7f2b 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -16,6 +16,7 @@ import java.util.List;
++ import java.util.Map;
++ 
++ import org.eclipse.ant.core.Property;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.internal.ui.ColumnSorter;
++@@ -404,7 +405,7 @@ public class AntPropertiesBlock {
++ 		String lastUsedPath;
++ 		lastUsedPath= dialogSettings.get(IAntUIConstants.DIALOGSTORE_LASTEXTFILE);
++ 		if (lastUsedPath == null) {
++-			lastUsedPath= ""; //$NON-NLS-1$
+++			lastUsedPath= IAntCoreConstants.EMPTY_STRING;
++ 		}
++ 		FileDialog dialog = new FileDialog(fileTableViewer.getControl().getShell(), SWT.MULTI);
++ 		dialog.setFilterExtensions(new String[] { "*.properties", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$;
++@@ -438,7 +439,7 @@ public class AntPropertiesBlock {
++ 	 */
++ 	private void addProperty() {
++ 		String title = AntPreferencesMessages.AntPropertiesBlock_Add_Property_2;
++-		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{"", ""}); //$NON-NLS-1$ //$NON-NLS-2$
+++		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{IAntCoreConstants.EMPTY_STRING, IAntCoreConstants.EMPTY_STRING});
++ 		if (dialog.open() == Window.CANCEL) {
++ 			return;
++ 		}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java
++index a7681cb..fabbad7 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -14,6 +14,7 @@ package org.eclipse.ant.internal.ui.preferences;
++ import java.net.MalformedURLException;
++ import java.net.URL;
++ import org.eclipse.ant.core.IAntClasspathEntry;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.runtime.CoreException;
++ import org.eclipse.core.variables.VariablesPlugin;
++@@ -99,7 +100,7 @@ public class ClasspathEntry extends AbstractClasspathEntry {
++ 			
++ 		try {
++ 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fVariableString);
++-			return new URL("file:" + expanded); //$NON-NLS-1$
+++			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
++ 		} catch (CoreException e) {
++ 			AntUIPlugin.log(e);
++ 		} catch (MalformedURLException e) {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java
++index e9c9588..d91b721 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2006 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -12,6 +12,7 @@ package org.eclipse.ant.internal.ui.preferences;
++ 
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.core.resources.IFile;
++ import org.eclipse.core.resources.IResource;
++@@ -55,14 +56,14 @@ public class FileSelectionDialog extends ElementTreeSelectionDialog {
++ 		ISelectionStatusValidator validator= new ISelectionStatusValidator() {
++ 			public IStatus validate(Object[] selection) {
++ 				if (selection.length == 0) {
++-					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
+++					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
++ 				}
++ 				for (int i= 0; i < selection.length; i++) {
++ 					if (!(selection[i] instanceof IFile)) {
++-						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
+++						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
++ 					}
++ 				}
++-				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
+++				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
++ 			}			
++ 		};
++ 		setValidator(validator);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java
++index 5ebb895..0745969 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -11,6 +11,7 @@
++ package org.eclipse.ant.internal.ui.preferences;
++ 
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.core.runtime.IStatus;
++ 
++ import org.eclipse.swt.SWT;
++@@ -79,7 +80,7 @@ public class MessageLine extends CLabel {
++ 				return;
++ 			}
++ 		}
++-		setText(""); //$NON-NLS-1$
+++		setText(IAntCoreConstants.EMPTY_STRING);
++ 		setImage(null);
++ 		setBackground(fNormalMsgAreaBackground);
++ 	}
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java
++index 5a05584..307b310 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2003, 2009 IBM Corporation and others.
+++ * Copyright (c) 2003, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -14,6 +14,7 @@ import java.util.ArrayList;
++ import java.util.List;
++ 
++ import org.eclipse.ant.core.AntCorePlugin;
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUtil;
++ import org.eclipse.ant.launching.IAntLaunchConstants;
++ import org.eclipse.core.externaltools.internal.IExternalToolConstants;
++@@ -208,7 +209,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
++ 	 */
++ 	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
++ 		if (fLaunchConfiguration.exists()) {
++-			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
+++			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
++ 			if (fOldBuildfileLocation == null || (buildFileLocation.endsWith(fOldBuildfileLocation + '}') || buildFileLocation.endsWith(fOldBuildfileLocation))) {
++ 				String projectName= fLaunchConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
++ 				if (fOldProjectName.equals(projectName)) {
++@@ -233,7 +234,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
++             fNewLaunchConfiguration.setContainer(container);
++         }
++ 
++-		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
+++		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
++ 		String oldProjectName;
++ 		if (fNewBuildfileLocation != null) {
++             String newBuildFileLocation= oldBuildfileLocation.replaceFirst(fOldBuildfileLocation, fNewBuildfileLocation);
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
++index b8c1861..b987ecf 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2007 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -17,6 +17,7 @@ import java.util.Enumeration;
++ import java.util.Iterator;
++ import java.util.List;
++ 
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
++ import org.eclipse.ant.internal.ui.model.AntElementNode;
++ import org.eclipse.ant.internal.ui.model.AntModelLabelProvider;
++@@ -575,7 +576,7 @@ public class AntView extends ViewPart implements IResourceChangeListener, IShowI
++ 
++ 			AntProjectNodeProxy project = null;
++ 			if (nameString == null) {
++-				nameString = ""; //$NON-NLS-1$
+++				nameString = IAntCoreConstants.EMPTY_STRING;
++ 			}
++ 			project = new AntProjectNodeProxy(nameString, pathString);
++ 			if (errorString != null && Boolean.valueOf(errorString).booleanValue()) {
++diff --git a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java
++index 09c8d5d..e88cfe2 100644
++--- a/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
+++++ b/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2005 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -16,6 +16,8 @@ import java.util.Iterator;
++ import java.util.List;
++ import java.util.regex.Matcher;
++ import java.util.regex.Pattern;
+++
+++import org.eclipse.ant.internal.core.IAntCoreConstants;
++ import org.eclipse.ant.internal.ui.AntUIPlugin;
++ import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
++ import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
++@@ -96,7 +98,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
++ 			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_SEARCH_STRING, "build.xml"); //$NON-NLS-1$
++ 		}
++ 		if (settings.get(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE) == null) {
++-			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, ""); //$NON-NLS-1$
+++			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, IAntCoreConstants.EMPTY_STRING); 
++ 		} 
++ 	}
++ 
++@@ -303,7 +305,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
++ 	private void setWorkingSet(IWorkingSet set) {
++ 		if (set == null) {
++ 			searchScopes= null;
++-			workingSetText.setText(""); //$NON-NLS-1$
+++			workingSetText.setText(IAntCoreConstants.EMPTY_STRING); 
++ 			validateInput();
++ 			return;
++ 		}
++diff --git a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
++index e14df99..b0e2bf1 100644
++--- a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
+++++ b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2009 IBM Corporation and others.
+++ * Copyright (c) 2009, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -24,8 +24,6 @@ public class ExternalToolsCore extends Plugin {
++ 	// The plug-in ID
++ 	public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$
++ 	
++-	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
++-	
++ 	/**
++ 	 * Status code indicating an unexpected internal error.
++ 	 * @since 2.1
++@@ -102,7 +100,7 @@ public class ExternalToolsCore extends Plugin {
++ 	 */
++ 	public static IStatus newErrorStatus(String message, Throwable exception) {
++ 		if (message == null) {
++-			message= EMPTY_STRING; 
+++			return new Status(IStatus.ERROR, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, exception); 
++ 		}		
++ 		return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
++ 	}
++diff --git a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
++index 4641a0e..b276e21 100644
++--- a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
+++++ b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -18,6 +18,14 @@ package org.eclipse.core.externaltools.internal;
++  * </p>
++  */
++ public interface IExternalToolConstants {
+++	
+++	/**
+++	 * Constant for the empty {@link String}
+++	 * 
+++	 * @since org.eclipse.core.externaltools 1.0.100
+++	 */
+++	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+++	
++ 	/**
++ 	 * Plug-in identifier for external tools UI (value <code>org.eclipse.ui.externaltools</code>).
++ 	 */
++diff --git a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
++index 00d1c63..a1ae3a6 100644
++--- a/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
+++++ b/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2010 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -166,7 +166,7 @@ public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
++ 
++ 	private String generateCommandLine(String[] commandLine) {
++ 		if (commandLine.length < 1)
++-			return ""; //$NON-NLS-1$
+++			return IExternalToolConstants.EMPTY_STRING;
++ 		StringBuffer buf = new StringBuffer();
++ 		for (int i = 0; i < commandLine.length; i++) {
++ 			buf.append(' ');
++diff --git a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
++index 5b0c0a4..bd32a5e 100644
++--- a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java	
+++++ b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java	
++@@ -316,7 +316,7 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
++ 		String buildKindString= null;
++ 		String buildScope= null;
++ 		try {
++-			buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, ""); //$NON-NLS-1$
+++			buildKindString= configuration.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, IExternalToolConstants.EMPTY_STRING);
++ 			buildScope= configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_SCOPE, (String)null);
++ 		} catch (CoreException e) {
++ 		}
++diff --git a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
++index d1bf2d9..1d3a11e 100644
++--- a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java	
+++++ b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -307,9 +307,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
++ 	 * configuration.
++ 	 */
++ 	protected void updateWorkingDirectory(ILaunchConfiguration configuration) {
++-		String workingDir= ""; //$NON-NLS-1$
+++		String workingDir= IExternalToolConstants.EMPTY_STRING; 
++ 		try {
++-			workingDir= configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
+++			workingDir= configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, IExternalToolConstants.EMPTY_STRING); 
++ 		} catch (CoreException ce) {
++ 			ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_10, ce);
++ 		}
++@@ -321,9 +321,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
++ 	 * configuration.
++ 	 */
++ 	protected void updateLocation(ILaunchConfiguration configuration) {
++-		String location= ""; //$NON-NLS-1$
+++		String location= IExternalToolConstants.EMPTY_STRING; 
++ 		try {
++-			location= configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
+++			location= configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IExternalToolConstants.EMPTY_STRING); 
++ 		} catch (CoreException ce) {
++ 			ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_10, ce);
++ 		}
++@@ -335,9 +335,9 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
++ 	 * configuration.
++ 	 */
++ 	protected void updateArgument(ILaunchConfiguration configuration) {
++-		String arguments= ""; //$NON-NLS-1$
+++		String arguments= IExternalToolConstants.EMPTY_STRING; 
++ 		try {
++-			arguments= configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, ""); //$NON-NLS-1$
+++			arguments= configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, IExternalToolConstants.EMPTY_STRING); 
++ 		} catch (CoreException ce) {
++ 			ExternalToolsPlugin.getDefault().log(ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Error_reading_configuration_7, ce);
++ 		}
++diff --git a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java
++index f3b82cb..16c945a 100644
++--- a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java	
+++++ b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -48,12 +48,10 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin implements
++ 	/**
++ 	 * Status representing no problems encountered during operation.
++ 	 */
++-	public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+++	public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, null);
++ 		
++ 	private static ExternalToolsPlugin plugin;
++ 
++-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
++-
++ 	private static IWindowListener fWindowListener;
++ 
++ 	private static ILaunchManager launchManager;
++@@ -134,7 +132,7 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin implements
++ 	 */
++ 	public static IStatus newErrorStatus(String message, Throwable exception) {
++ 		if (message == null) {
++-			message= EMPTY_STRING; 
+++			return new Status(IStatus.ERROR, PLUGIN_ID, 0, IExternalToolConstants.EMPTY_STRING, exception); 
++ 		}		
++ 		return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
++ 	}
++diff --git a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
++index 3f97506..67c457c 100644
++--- a/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java	
+++++ b/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java	
++@@ -1,5 +1,5 @@
++ /*******************************************************************************
++- * Copyright (c) 2000, 2009 IBM Corporation and others.
+++ * Copyright (c) 2000, 2011 IBM Corporation and others.
++  * All rights reserved. This program and the accompanying materials
++  * are made available under the terms of the Eclipse Public License v1.0
++  * which accompanies this distribution, and is available at
++@@ -209,7 +209,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
++ 	
++ 		boolean projectNeedsMigration= false;
++ 		for (int i = 0; i < commands.length; i++) {
++-			String[] version= new String[] {""}; //$NON-NLS-1$
+++			String[] version= new String[] {IExternalToolConstants.EMPTY_STRING};
++ 			ILaunchConfiguration config = BuilderUtils.configFromBuildCommandArgs(project, commands[i].getArguments(), version);
++ 			if (BuilderCoreUtils.VERSION_2_1.equals(version[0])) {
++ 				// Storing the .project file of a project with 2.1 configs, will
++-- 
++1.7.4.4
 +
-+    /** 
-+     * Get method for the reference table.
-+     *  It can be used to hook dynamic references and to modify
-+     * some references on the fly--for example for delayed
-+     * evaluation.
-+     *
-+     * It is important to make sure that the processing that is
-+     * done inside is not calling get indirectly.
-+     *
-+     * @param key lookup key.
-+     * @return mapped value.
-+     */
-+    public synchronized Object get(Object key) {
-+        Object o = getReal(key);
-+        if (o instanceof UnknownElement) {
-+            // Make sure that
-+            UnknownElement ue = (UnknownElement) o;
-+            ue.maybeConfigure();
-+            o = ue.getRealThing();
-+        }
-+        return o;
-+    }
-+}
+-- 
+1.7.4.4
+
diff --git a/debian/patches/bp-hover-visability.patch b/debian/patches/bp-hover-visability.patch
deleted file mode 100644
index 5d2f9f7..0000000
--- a/debian/patches/bp-hover-visability.patch
+++ /dev/null
@@ -1,428 +0,0 @@
-Description: Backported fix for hover text visability problem.
-Origin: Upstream, https://bugs.eclipse.org/bugs/show_bug.cgi?id=312966
-Bug-Ubuntu: https://launchpad.net/bugs/540332
-
---- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
-+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2010 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -48,7 +48,9 @@
- import org.eclipse.jface.text.source.ISourceViewer;
- import org.eclipse.jface.text.source.SourceViewer;
- 
-+import org.eclipse.jdt.ui.JavaUI;
- import org.eclipse.jdt.ui.PreferenceConstants;
-+import org.eclipse.jdt.ui.text.IJavaColorConstants;
- import org.eclipse.jdt.ui.text.IJavaPartitions;
- 
- import org.eclipse.jdt.internal.ui.JavaPlugin;
-@@ -90,6 +92,11 @@
- 	 */
- 	private Font fStatusTextFont;
- 	/**
-+	 * The color of the optional status text label or <code>null</code> if none.
-+	 * @since 3.6
-+	 */
-+	private Color fStatusTextForegroundColor;
-+	/**
- 	 * The width size constraint.
- 	 * @since 3.2
- 	 */
-@@ -198,15 +205,42 @@
- 			fStatusField.setFont(fStatusTextFont);
- 			GridData gd2= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- 			fStatusField.setLayoutData(gd2);
--
--			// Regarding the color see bug 41128
--			fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-+			
-+			RGB javaDefaultColor= JavaUI.getColorManager().getColor(IJavaColorConstants.JAVA_DEFAULT).getRGB();
-+			fStatusTextForegroundColor= new Color(fStatusField.getDisplay(), blend(fBackgroundColor.getRGB(), javaDefaultColor, 0.56f));
-+			fStatusField.setForeground(fStatusTextForegroundColor);
- 			fStatusField.setBackground(fBackgroundColor);
- 		}
- 
- 		addDisposeListener(this);
- 	}
- 
-+	/**
-+	 * Returns an RGB that lies between the given foreground and background
-+	 * colors using the given mixing factor. A <code>factor</code> of 1.0 will produce a
-+	 * color equal to <code>fg</code>, while a <code>factor</code> of 0.0 will produce one
-+	 * equal to <code>bg</code>.
-+	 * @param bg the background color
-+	 * @param fg the foreground color
-+	 * @param factor the mixing factor, must be in [0, 1]
-+	 *
-+	 * @return the interpolated color
-+	 * @since 3.6
-+	 */
-+	private static RGB blend(RGB bg, RGB fg, float factor) {
-+		// copy of org.eclipse.jface.internal.text.revisions.Colors#blend(..)
-+		Assert.isLegal(bg != null);
-+		Assert.isLegal(fg != null);
-+		Assert.isLegal(factor >= 0f && factor <= 1f);
-+		
-+		float complement= 1f - factor;
-+		return new RGB(
-+				(int) (complement * bg.red + factor * fg.red),
-+				(int) (complement * bg.green + factor * fg.green),
-+				(int) (complement * bg.blue + factor * fg.blue)
-+		);
-+	}
-+	
- 	private void initializeColors() {
- 		RGB bgRGB= getHoverBackgroundColorRGB();
- 		if (bgRGB != null) {
-@@ -274,8 +308,12 @@
- 	public void widgetDisposed(DisposeEvent event) {
- 		if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
- 			fStatusTextFont.dispose();
--
- 		fStatusTextFont= null;
-+
-+		if (fStatusTextForegroundColor != null && !fStatusTextForegroundColor.isDisposed())
-+			fStatusTextForegroundColor.dispose();
-+		fStatusTextForegroundColor= null;
-+
- 		fTextFont= null;
- 		fShell= null;
- 		fText= null;
---- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
-+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2005, 2008 IBM Corporation and others.
-+ * Copyright (c) 2005, 2010 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -14,6 +14,7 @@
- import java.util.ArrayList;
- import java.util.List;
- 
-+import org.eclipse.core.runtime.Assert;
- import org.eclipse.jface.action.Action;
- import org.eclipse.jface.action.GroupMarker;
- import org.eclipse.jface.action.IAction;
-@@ -36,9 +37,11 @@
- import org.eclipse.swt.graphics.Font;
- import org.eclipse.swt.graphics.FontData;
- import org.eclipse.swt.graphics.Point;
-+import org.eclipse.swt.graphics.RGB;
- import org.eclipse.swt.graphics.Rectangle;
- import org.eclipse.swt.widgets.Composite;
- import org.eclipse.swt.widgets.Control;
-+import org.eclipse.swt.widgets.Display;
- import org.eclipse.swt.widgets.Event;
- import org.eclipse.swt.widgets.Label;
- import org.eclipse.swt.widgets.Listener;
-@@ -321,6 +324,12 @@
- 	private Control titleSeparator, infoSeparator;
- 
- 	/**
-+	 * Color to be used for the info area text.
-+	 * @since 3.6
-+	 */
-+	private Color infoColor;
-+	
-+	/**
- 	 * Font to be used for the info area text. Computed based on the dialog's
- 	 * font.
- 	 */
-@@ -856,12 +865,42 @@
- 		
- 		GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL,
- 				SWT.BEGINNING).applyTo(infoLabel);
--		infoLabel.setForeground(parent.getDisplay().getSystemColor(
--				SWT.COLOR_WIDGET_DARK_SHADOW));
-+		Display display = parent.getDisplay();
-+		infoColor = new Color(display, blend(
-+				display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB(),
-+				display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB(),
-+				0.56f));
-+		infoLabel.setForeground(infoColor);
- 		return infoLabel;
- 	}
- 
- 	/**
-+	 * Returns an RGB that lies between the given foreground and background
-+	 * colors using the given mixing factor. A <code>factor</code> of 1.0 will produce a
-+	 * color equal to <code>fg</code>, while a <code>factor</code> of 0.0 will produce one
-+	 * equal to <code>bg</code>.
-+	 * @param bg the background color
-+	 * @param fg the foreground color
-+	 * @param factor the mixing factor, must be in [0, 1]
-+	 *
-+	 * @return the interpolated color
-+	 * @since 3.6
-+	 */
-+	private static RGB blend(RGB bg, RGB fg, float factor) {
-+		// copy of org.eclipse.jface.internal.text.revisions.Colors#blend(..)
-+		Assert.isLegal(bg != null);
-+		Assert.isLegal(fg != null);
-+		Assert.isLegal(factor >= 0f && factor <= 1f);
-+		
-+		float complement = 1f - factor;
-+		return new RGB(
-+				(int) (complement * bg.red + factor * fg.red),
-+				(int) (complement * bg.green + factor * fg.green),
-+				(int) (complement * bg.blue + factor * fg.blue)
-+		);
-+	}
-+	
-+	/**
- 	 * Create a horizontal separator for the given parent.
- 	 * 
- 	 * @param parent
-@@ -1586,6 +1625,10 @@
- 	 * 
- 	 */
- 	private void handleDispose() {
-+		if (infoColor != null && !infoColor.isDisposed()) {
-+			infoColor.dispose();
-+		}
-+		infoColor = null;
- 		if (infoFont != null && !infoFont.isDisposed()) {
- 			infoFont.dispose();
- 		}
---- a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
-+++ b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2010 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -22,6 +22,7 @@
- import org.eclipse.swt.graphics.FontData;
- import org.eclipse.swt.graphics.GC;
- import org.eclipse.swt.graphics.Point;
-+import org.eclipse.swt.graphics.RGB;
- import org.eclipse.swt.graphics.Rectangle;
- import org.eclipse.swt.layout.GridData;
- import org.eclipse.swt.layout.GridLayout;
-@@ -31,6 +32,8 @@
- import org.eclipse.swt.widgets.Label;
- import org.eclipse.swt.widgets.Shell;
- 
-+import org.eclipse.core.runtime.Assert;
-+
- import org.eclipse.jface.resource.JFaceResources;
- 
- import org.eclipse.jface.text.Document;
-@@ -67,6 +70,11 @@
- 	private Label fSeparator;
- 	/** The font of the optional status text label.*/
- 	private Font fStatusTextFont;
-+	/**
-+	 * The color of the optional status text label or <code>null</code> if none.
-+	 * @since 3.6
-+	 */
-+	private Color fStatusTextForegroundColor;
- 	/** The maximal widget width. */
- 	private int fMaxWidth;
- 	/** The maximal widget height. */
-@@ -158,8 +166,8 @@
- 			GridData gd2= new GridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
- 			fStatusField.setLayoutData(gd2);
- 
--			// Regarding the color see bug 41128
--			fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-+			fStatusTextForegroundColor= new Color(fStatusField.getDisplay(), blend(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB(), display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB(), 0.56f));
-+			fStatusField.setForeground(fStatusTextForegroundColor);
- 
- 			fStatusField.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- 		}
-@@ -168,6 +176,32 @@
- 	}
- 
- 	/**
-+	 * Returns an RGB that lies between the given foreground and background
-+	 * colors using the given mixing factor. A <code>factor</code> of 1.0 will produce a
-+	 * color equal to <code>fg</code>, while a <code>factor</code> of 0.0 will produce one
-+	 * equal to <code>bg</code>.
-+	 * @param bg the background color
-+	 * @param fg the foreground color
-+	 * @param factor the mixing factor, must be in [0, 1]
-+	 *
-+	 * @return the interpolated color
-+	 * @since 3.6
-+	 */
-+	private static RGB blend(RGB bg, RGB fg, float factor) {
-+		// copy of org.eclipse.jface.internal.text.revisions.Colors#blend(..)
-+		Assert.isLegal(bg != null);
-+		Assert.isLegal(fg != null);
-+		Assert.isLegal(factor >= 0f && factor <= 1f);
-+		
-+		float complement= 1f - factor;
-+		return new RGB(
-+				(int) (complement * bg.red + factor * fg.red),
-+				(int) (complement * bg.green + factor * fg.green),
-+				(int) (complement * bg.blue + factor * fg.blue)
-+		);
-+	}
-+	
-+	/**
- 	 * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
- 	 * @param input the input object
- 	 */
-@@ -204,8 +238,11 @@
- 	public void widgetDisposed(DisposeEvent event) {
- 		if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
- 			fStatusTextFont.dispose();
--
- 		fStatusTextFont= null;
-+		if (fStatusTextForegroundColor != null && !fStatusTextForegroundColor.isDisposed())
-+			fStatusTextForegroundColor.dispose();
-+		fStatusTextForegroundColor= null;
-+		
- 		fTextFont= null;
- 		fShell= null;
- 		fText= null;
---- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
-+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
-@@ -43,6 +43,7 @@
- import org.eclipse.core.runtime.ListenerList;
- 
- import org.eclipse.jface.action.ToolBarManager;
-+import org.eclipse.jface.internal.text.revisions.Colors;
- import org.eclipse.jface.resource.JFaceResources;
- import org.eclipse.jface.util.Geometry;
- 
-@@ -85,6 +86,11 @@
- 	 * @since 3.4.2
- 	 */
- 	private Font fStatusLabelFont;
-+	/**
-+	 * Color for the label in the status line or <code>null</code> if none.
-+	 * @since 3.6
-+	 */
-+	private Color fStatusLabelForeground;
- 	/** The toolbar manager used by the toolbar or <code>null</code> if none. */
- 	private final ToolBarManager fToolBarManager;
- 	/** Status line toolbar or <code>null</code> if none. */
-@@ -224,8 +230,9 @@
- 		}
- 		fStatusLabelFont= new Font(fStatusLabel.getDisplay(), fontDatas);
- 		fStatusLabel.setFont(fStatusLabelFont);
--
--		fStatusLabel.setForeground(fStatusLabel.getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-+		
-+		fStatusLabelForeground= new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f));
-+		fStatusLabel.setForeground(fStatusLabelForeground);
- 		fStatusLabel.setBackground(background);
- 		setColor(fStatusComposite, foreground, background);
- 	}
-@@ -672,6 +679,10 @@
- 			fShell.removeListener(SWT.Deactivate, fShellListener);
- 			fShellListener= null;
- 		}
-+		if (fStatusLabelForeground != null) {
-+			fStatusLabelForeground.dispose();
-+			fStatusLabelForeground= null;
-+		}
- 	}
- 
- 	/**
---- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java
-+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java
-@@ -1,5 +1,5 @@
- /*******************************************************************************
-- * Copyright (c) 2000, 2008 IBM Corporation and others.
-+ * Copyright (c) 2000, 2010 IBM Corporation and others.
-  * All rights reserved. This program and the accompanying materials
-  * are made available under the terms of the Eclipse Public License v1.0
-  * which accompanies this distribution, and is available at
-@@ -22,6 +22,7 @@
- import org.eclipse.swt.graphics.FontData;
- import org.eclipse.swt.graphics.GC;
- import org.eclipse.swt.graphics.Point;
-+import org.eclipse.swt.graphics.RGB;
- import org.eclipse.swt.graphics.Rectangle;
- import org.eclipse.swt.layout.GridData;
- import org.eclipse.swt.layout.GridLayout;
-@@ -31,6 +32,8 @@
- import org.eclipse.swt.widgets.Label;
- import org.eclipse.swt.widgets.Shell;
- 
-+import org.eclipse.core.runtime.Assert;
-+
- import org.eclipse.jface.resource.JFaceResources;
- 
- import org.eclipse.jface.text.BadLocationException;
-@@ -73,6 +76,11 @@
- 	private Label fSeparator;
- 	/** The font of the optional status text label.*/
- 	private Font fStatusTextFont;
-+	/**
-+	 * The color of the optional status text label or <code>null</code> if none.
-+	 * @since 3.6
-+	 */
-+	private Color fStatusTextForegroundColor;
- 	/** The maximal widget width. */
- 	private int fMaxWidth;
- 	/** The maximal widget height. */
-@@ -167,8 +175,8 @@
- 			GridData gd2= new GridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
- 			fStatusField.setLayoutData(gd2);
- 
--			// Regarding the color see bug 41128
--			fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-+			fStatusTextForegroundColor= new Color(fStatusField.getDisplay(), blend(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB(), display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB(), 0.56f));
-+			fStatusField.setForeground(fStatusTextForegroundColor);
- 
- 			fStatusField.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- 		}
-@@ -176,6 +184,32 @@
- 		addDisposeListener(this);
- 	}
- 
-+	/**
-+	 * Returns an RGB that lies between the given foreground and background
-+	 * colors using the given mixing factor. A <code>factor</code> of 1.0 will produce a
-+	 * color equal to <code>fg</code>, while a <code>factor</code> of 0.0 will produce one
-+	 * equal to <code>bg</code>.
-+	 * @param bg the background color
-+	 * @param fg the foreground color
-+	 * @param factor the mixing factor, must be in [0, 1]
-+	 *
-+	 * @return the interpolated color
-+	 * @since 3.6
-+	 */
-+	private static RGB blend(RGB bg, RGB fg, float factor) {
-+		// copy of org.eclipse.jface.internal.text.revisions.Colors#blend(..)
-+		Assert.isLegal(bg != null);
-+		Assert.isLegal(fg != null);
-+		Assert.isLegal(factor >= 0f && factor <= 1f);
-+		
-+		float complement= 1f - factor;
-+		return new RGB(
-+				(int) (complement * bg.red + factor * fg.red),
-+				(int) (complement * bg.green + factor * fg.green),
-+				(int) (complement * bg.blue + factor * fg.blue)
-+		);
-+	}
-+	
- 	/*
- 	 * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
- 	 */
-@@ -217,8 +251,11 @@
- 	public void widgetDisposed(DisposeEvent event) {
- 		if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
- 			fStatusTextFont.dispose();
--
- 		fStatusTextFont= null;
-+		if (fStatusTextForegroundColor != null && !fStatusTextForegroundColor.isDisposed())
-+			fStatusTextForegroundColor.dispose();
-+		fStatusTextForegroundColor= null;
-+		
- 		fTextFont= null;
- 		fShell= null;
- 		fText= null;
diff --git a/debian/patches/build-arch.patch b/debian/patches/build-arch.patch
deleted file mode 100644
index 7f70dd9..0000000
--- a/debian/patches/build-arch.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Description: Determine build architecture automatically
-Author: Benjamin Drung <bdrung at ubuntu.com>
-Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=317391
-
---- eclipse-3.5.2.orig/build.xml
-+++ eclipse-3.5.2/build.xml
-@@ -53,6 +53,30 @@
- 	<property name="productFiles" value="${buildConfig}/productFiles" />
- 	<property name="reposource" value="${buildDirectory}/reposource" />
- 
-+	<!-- Determine host architecture -->
-+	<exec executable="uname" outputproperty="uname-m">
-+		<arg line="-m" />
-+	</exec>
-+	<condition property="hostArch" value="arm">
-+		<matches pattern="^arm.*" string="${uname-m}"/>
-+	</condition>
-+	<condition property="hostArch" value="x86">
-+		<matches pattern="i[0-9]*86" string="${uname-m}"/>
-+	</condition>
-+	<condition property="hostArch" value="PA_RISC">
-+		<matches pattern="^parisc.*" string="${uname-m}"/>
-+	</condition>
-+	<condition property="hostArch" value="sparc">
-+		<matches pattern="sparcv9" string="${uname-m}"/>
-+	</condition>
-+	<condition property="hostArch" value="${uname-m}">
-+		<not><isset property="hostArch" /></not>
-+	</condition>
-+	<condition property="buildArch" value="${hostArch}">
-+		<not><isset property="buildArch" /></not>
-+	</condition>
-+	<echo message="uname -m: ${uname-m}. Build eclipse on ${hostArch} for ${buildArch}."/>
-+
- 	<property name="destDir" value="" />
- 	<property name="prefix" value="/usr/local" />
- 	<!-- Do we want /usr/lib64 if it's a 64-bit architecture? -->
---- eclipse-3.5.2.orig/build.properties
-+++ eclipse-3.5.2/build.properties
-@@ -10,7 +10,6 @@ featureToBuild=eclipse-build-feature
- skipBase=true
- skipFetch=true
- individualSourceBundles=true
--buildArch=x86
- ws=gtk
- os=linux
- includeLaunchers=true
diff --git a/debian/patches/clean-source.patch b/debian/patches/clean-source.patch
new file mode 100644
index 0000000..bc7ed0c
--- /dev/null
+++ b/debian/patches/clean-source.patch
@@ -0,0 +1,55 @@
+Description: Clean binary files from source tarball
+From: Benjamin Drung <bdrung at ubuntu.com>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=304112
+
+--- a/buildSDKSource.sh
++++ b/buildSDKSource.sh
+@@ -163,21 +163,18 @@
+ rm -rf ecfBundles orbitRepo
+ 
+ # Remove files from the version control system
+-find -depth -name CVS -exec rm -rf {} \;
++find -depth \( -name CVS -o -name .cvsignore \) -exec rm -rf {} \;
+ 
+ # Remove prebuilt binaries
+ find \( -name '*.exe' -o -name '*.dll' \) -delete
+ find \( -name '*.so' -o -name '*.so.2' -o -name '*.a' \) -delete
+ find \( -name '*.sl' -o -name '*.jnilib' \) -delete
+ find features/org.eclipse.equinox.executable -name eclipse -delete
+-find \( -name '*.cvsignore' \) -delete
++find -name '*.xpt' -delete
+ 
+ # Remove unnecessary repo
+ rm -rf tempSite
+ 
+-# Remove binary JARs
+-find -name '*.jar' -delete
+-
+ # Remove fetch logs
+ rm fetch_*
+ 
+@@ -188,6 +185,24 @@
+ # Remove temporary files
+ find -name '*.orig' -delete
+ 
++# Remove binary JARs
++find -name '*.jar' -delete
++find -name '*.class' -delete
++
++# Extract source .zip files
++cd plugins/org.eclipse.osgi.services
++unzip src.zip -d src
++cd ../org.eclipse.osgi.util
++unzip src.zip -d src
++cd ../..
++# Remove zip files
++find -name '*.zip' -delete
++
++# Correct permissions
++find -type d -print0 | xargs -0 chmod 755
++find -type f -print0 | xargs -0 chmod 644
++find -type f -name '*.sh' -print0 | xargs -0 chmod 755
++
+ # Remove empty directories
+ find -type d -empty -delete
+ 
diff --git a/debian/patches/compile-IPluginDescriptor.patch b/debian/patches/compile-IPluginDescriptor.patch
index 85997e7..9c88c66 100644
--- a/debian/patches/compile-IPluginDescriptor.patch
+++ b/debian/patches/compile-IPluginDescriptor.patch
@@ -1,13 +1,15 @@
 Description: Compiles IPluginDescriptor from source.
-Author: Niels Thykier <niels at thykier.net>
-Forwarded: no
+From: Niels Thykier <niels at thykier.net>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=319478
 
 --- a/build.xml
 +++ b/build.xml
-@@ -349,6 +349,32 @@
- 		<zip destfile="${buildDirectory}/plugins/org.eclipse.jdt.ui/jar-in-jar-loader.zip"
- 			basedir="${basedir}/temp/"/>
- 		<delete dir="${basedir}/temp/"/>
+@@ -372,7 +372,38 @@
+ 		<echo file="symlinks-stamp" />
+ 	</target>
+ 
+-	<target name="build" depends="applyPatches,symlinkDeps,bootstrap,compilelibs" unless="build.complete">
++	<target name="prebootstrap" depends="symlinkDeps" unless="prebootstrap.complete">
 +		<mkdir dir="${basedir}/temp/" />
 +		<copy todir="${basedir}/temp/" >
 +			<fileset dir="${basedir}/stubs/">
@@ -34,9 +36,14 @@ Forwarded: no
 +			</fileset>
 +		</copy>
 +		<delete dir="${basedir}/temp/"/>
- 		<!-- Create a stamp file -->
- 		<echo file="prebootstrap-stamp" />
- 	</target>
++		<!-- Create a stamp file -->
++		<echo file="prebootstrap-stamp" />
++	</target>
++
++	<target name="build" depends="applyPatches,symlinkDeps,prebootstrap,bootstrap,compilelibs" unless="build.complete">
+ 		<echo message="build.xml:  eclipse.pdebuild.scripts = ${eclipse.pdebuild.scripts}" />
+ 		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${basedir}" failonerror="true">
+ 			<classpath>
 --- /dev/null
 +++ b/stubs/org/eclipse/core/runtime/CoreException.java
 @@ -0,0 +1,4 @@
diff --git a/debian/patches/compile-jarinjarloader.patch b/debian/patches/compile-jarinjarloader.patch
deleted file mode 100644
index 5f498b7..0000000
--- a/debian/patches/compile-jarinjarloader.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Description: Regenerates the jar-in-jar-loader.zip file from source.
-Author: Niels Thykier <niels at thykier.net>
-Forwarded: no
-
---- a/build.xml
-+++ b/build.xml
-@@ -31,6 +31,7 @@
- 	<uptodate property="buildId.complete" srcfile="unpack-stamp" targetfile="buildId-stamp" />
- 	<uptodate property="patch.complete" srcfile="unpack-stamp" targetfile="patch-stamp" />
- 	<uptodate property="symlinks.complete" srcfile="patch-stamp" targetfile="symlinks-stamp" />
-+	<uptodate property="prebootstrap.complete" srcfile="symlinks-stamp" targetfile="prebootstrap-stamp" />
- 	<uptodate property="testspatch.complete" srcfile="testsunpack-stamp" targetfile="testspatch-stamp" />
- 	<uptodate property="compilelibs.complete" srcfile="unpack-stamp" targetfile="compilelibs-stamp" />
- 	<uptodate property="build.complete" srcfile="patch-stamp" targetfile="build-stamp" />
-@@ -335,7 +336,24 @@
- 		<echo file="symlinks-stamp" />
- 	</target>
- 
--	<target name="build" depends="applyPatches,symlinkDeps,bootstrap,compilelibs" unless="build.complete">
-+	<target name="prebootstrap" depends="symlinkDeps" unless="prebootstrap.complete">
-+		<mkdir dir="${basedir}/temp/" />
-+		<javac destdir="${basedir}/temp"
-+			srcdir="${buildDirectory}/plugins/org.eclipse.jdt.ui/jar in jar loader/"
-+			source="1.3"
-+			target="1.1"
-+			debug="true"
-+			optimize="true"
-+			fork="true"
-+			compiler="modern" />
-+		<zip destfile="${buildDirectory}/plugins/org.eclipse.jdt.ui/jar-in-jar-loader.zip"
-+			basedir="${basedir}/temp/"/>
-+		<delete dir="${basedir}/temp/"/>
-+		<!-- Create a stamp file -->
-+		<echo file="prebootstrap-stamp" />
-+	</target>
-+
-+	<target name="build" depends="applyPatches,symlinkDeps,prebootstrap,bootstrap,compilelibs" unless="build.complete">
- 		<echo message="build.xml:  eclipse.pdebuild.scripts = ${eclipse.pdebuild.scripts}" />
- 		<java classname="org.eclipse.equinox.launcher.Main" fork="true" dir="${basedir}" failonerror="true">
- 			<classpath>
diff --git a/debian/patches/debian-load-internal-swt.patch b/debian/patches/debian-load-internal-swt.patch
new file mode 100644
index 0000000..43d92dc
--- /dev/null
+++ b/debian/patches/debian-load-internal-swt.patch
@@ -0,0 +1,19 @@
+Description: Make eclipse load the internal SWT from a special location.
+ This together with the removal of .so files from the bundle prevents eclipse
+ from extracting SWT to the users HOME directory.
+ .
+ This patch is Debian specific; Fedora does not seem to suffer from this problem.
+Author: Niels Thykier <niels at thykier.net>
+
+--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java	
++++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java	
+@@ -235,6 +235,9 @@ public static void loadLibrary (String name, boolean mapName) {
+ 	/* Try loading library from java library path */
+ 	if (load (libName1, message)) return;
+ 	if (mapName && load (libName2, message)) return;
++	/* Try the Debian location /usr/lib/eclipse/debian-swt/ */
++	if (load ("/usr/lib/eclipse/debian-swt" + SEPARATOR + mappedName1, message)) return;
++	if (mapName && load ("/usr/lib/eclipse/debian-swt" + SEPARATOR + mappedName2, message)) return;
+ 
+ 	/* Try loading library from the tmp directory if swt library path is not specified */
+ 	String fileName1 = mappedName1;
diff --git a/debian/patches/ecj-gccmain-java.patch b/debian/patches/ecj-gccmain-java.patch
index 5f765e1..62b0137 100644
--- a/debian/patches/ecj-gccmain-java.patch
+++ b/debian/patches/ecj-gccmain-java.patch
@@ -1,5 +1,6 @@
 Description: Adds better support for gcc.
 Origin: Vendor, http://packages.qa.debian.org/e/ecj.html
+From: Niels Thykier <niels at thykier.net>
 
 --- /dev/null
 +++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/GCCMain.java
@@ -507,7 +508,7 @@ Origin: Vendor, http://packages.qa.debian.org/e/ecj.html
 +}
 --- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
 +++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
-@@ -300,3 +300,8 @@
+@@ -334,3 +334,8 @@
  \      uselessTypeCheck     unnecessary cast/instanceof operation\n\
  \      varargsCast        + varargs argument need explicit cast\n\
  \      warningToken       + unsupported or unnecessary @SuppressWarnings\n
diff --git a/debian/patches/eclipse-build-generatedScripts.patch b/debian/patches/eclipse-build-generatedScripts.patch
index 2594177..14cbe48 100644
--- a/debian/patches/eclipse-build-generatedScripts.patch
+++ b/debian/patches/eclipse-build-generatedScripts.patch
@@ -1,10 +1,12 @@
 Description: Use modified eclipse-build-generatedScripts tarball.
-Author: Benjamin Drung <bdrung at ubuntu.com>
+ NOTE: The tarball itself is usually generated by doing 'ant generateBuildXmls'
+ in the top level source directory.
+From: Benjamin Drung <bdrung at ubuntu.com>
 Forwarded: not-needed
 
 --- a/build.xml
 +++ b/build.xml
-@@ -21,7 +21,7 @@
+@@ -26,7 +26,7 @@
  		</or>
  	</condition>
  
@@ -13,7 +15,7 @@ Forwarded: not-needed
  	<available file="eclipse-sdktests-${label}-src.tar.bz2" property="testsSourcePresent" value="true" />
  	<available file="eclipse-sdktests-${label}-scripts.tar.bz2" property="testsScriptsPresent" value="true" />
  
-@@ -110,7 +110,7 @@
+@@ -152,7 +152,7 @@
  	</target>
  
  	<target name="extractBuildXmls" if="scriptsPresent">
@@ -22,3 +24,14 @@ Forwarded: not-needed
  		<!--
  		<fail message="Build scripts to bootstrap PDE Build must be generated and present in eclipse-build-generatedScripts.tar.bz2.  See pdebuild.xml for details."/>
  		-->
+--- a/pdebuild.xml
++++ b/pdebuild.xml
+@@ -152,7 +152,7 @@
+ 			<fileset dir="${sdkSource}/plugins/"
+ 			         includes="${generatedBuildXmls}" />
+ 		</copy>
+-		<tar destfile="eclipse-build-generatedScripts.tar.bz2"
++		<tar destfile="debian/eclipse-build-generatedScripts.tar.bz2"
+ 		     compression="bzip2"
+ 		     basedir="generatedScripts"
+ 		     includes="**/*" />
diff --git a/debian/patches/eclipse-manpage.patch b/debian/patches/eclipse-manpage.patch
index 176cc51..c6f8b53 100644
--- a/debian/patches/eclipse-manpage.patch
+++ b/debian/patches/eclipse-manpage.patch
@@ -1,5 +1,5 @@
 Description: Add eclipse manpage
-Author: Pablo Duboue <pablo.duboue at gmail.com>
+From: Pablo Duboue <pablo.duboue at gmail.com>
 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=30107
 Bug-Ubuntu: https://launchpad.net/bugs/494065
 
@@ -624,16 +624,16 @@ Bug-Ubuntu: https://launchpad.net/bugs/494065
 +</refentry>
 --- a/build.xml
 +++ b/build.xml
-@@ -770,6 +770,12 @@
+@@ -952,6 +952,12 @@
  		<!-- eclipse binary -->
  		<mkdir dir="${destDir}${prefix}/bin" />
- 		<symlink link="${destDir}${prefix}/bin/eclipse" resource="../${libDir}/eclipse/eclipse" />
+ 		<symlink link="${destDir}${prefix}/bin/eclipse" resource="../${libDir}/eclipse/eclipse" overwrite="true"/>
 +		<!-- eclipse manpage -->
 +		<mkdir dir="${destDir}${prefix}/share/man/man1" />
 +		<exec executable="docbook2x-man" failonerror="true">
 +			<arg value="eclipse.1.xml" />
 +		</exec>
 +		<move file="eclipse.1" tofile="${destDir}${prefix}/share/man/man1/eclipse.1" />
+ 		<!-- FIXME:  we really shouldn't need this anymore but at least pdebuild.sh will need to be updated -->
  		<!-- Create the "startup.jar" symlink -->
- 		<fileset dir="${destDir}/${prefix}/${libDir}/eclipse/plugins" includes="org.eclipse.equinox.launcher_*" id="startupjar" />
- 		<property name="startupjarpath" refid="startupjar" />
+ 		<fileset dir="${installationDir}/plugins" includes="org.eclipse.equinox.launcher_*" id="startupjar" />
diff --git a/debian/patches/fix-bashism.patch b/debian/patches/fix-bashism.patch
deleted file mode 100644
index a6be8ae..0000000
--- a/debian/patches/fix-bashism.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Author: Adnan Hodzic <adnan at foolcontrol.org>
-Subject: Fix bashisms in Eclipse (in /bin/sh scripts)
-Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581099
-Last-Update: 2010-06-18
-
---- eclipse-3.5.2.orig/patches/eclipse-pde.build-add-package-build.patch
-+++ eclipse-3.5.2/patches/eclipse-pde.build-add-package-build.patch
-@@ -53,7 +53,7 @@ diff -N templates/package-build/prepare-
- +  PROJECTDIR=$(dirname "$f")
- +  inSDK=1
- +  inSDK=$(echo $PROJECTDIR | grep -c $BUILDDIR)
--+  if [ $inSDK == 0 ]; then
-++  if [ $inSDK = 0 ]; then
- +    PROJECTNAME=$(ant -Dbasedir="$PROJECTDIR" -f $BUILDDIR/tmp/feature-build.xml 2>&1 | grep echo | cut --delimiter=' ' -f 7)
- +    ERROR=""
- +    if [ -z "$PROJECTNAME" ]; then
-@@ -66,7 +66,7 @@ diff -N templates/package-build/prepare-
- +    fi
- +
- +    if [ "x$ERROR" != "xyes" ]; then
--+      if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
-++      if [ $TESTING != true -o `echo $PROJECTNAME | grep "org.eclipse"` ]; then
- +        echo "  making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
- +        ln -sfT "$PROJECTDIR" $BUILDDIR/features/"$PROJECTNAME"
- +      fi
-@@ -81,7 +81,7 @@ diff -N templates/package-build/prepare-
- +  ERROR=""
- +  inSDK=1
- +  inSDK=$(echo $dir | grep -c $BUILDDIR)
--+  if [ $inSDK == 0 ]; then
-++  if [ $inSDK = 0 ]; then
- +    if [ -e "$dir/META-INF/MANIFEST.MF" ]; then
- +      PROJECTNAME=$(grep Bundle-SymbolicName $dir/META-INF/MANIFEST.MF | cut --delimiter=';' -f 1 | cut --delimiter=' ' -f 2)
- +    elif [ -e "$dir/plugin.xml" ]; then
-@@ -100,7 +100,7 @@ diff -N templates/package-build/prepare-
- +    fi
- +
- +    if [ "x$ERROR" != "xyes" ]; then
--+      if [[ $TESTING != true || `echo $PROJECTNAME | grep "org.eclipse"` ]]; then
-++      if [ $TESTING != true -o `echo $PROJECTNAME | grep "org.eclipse"` ]; then
- +        echo "  making symlink: $BUILDDIR/plugins/$PROJECTNAME -> $dir"
- +        ln -sfT "$dir" $BUILDDIR/plugins/"$PROJECTNAME"
- +      fi
diff --git a/debian/patches/fix-help-contents.patch b/debian/patches/fix-help-contents.patch
index 920d0ff..447b541 100644
--- a/debian/patches/fix-help-contents.patch
+++ b/debian/patches/fix-help-contents.patch
@@ -2,7 +2,7 @@ Description: Fixes the problem with the servlet compiler being unable
  to find the classes it needs.
  .
  This problem is Debian specific.
-Author: Niels Thykier <niels at thykier.net>
+From: Niels Thykier <niels at thykier.net>
 Forwarded: not needed
 
 --- a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
diff --git a/debian/patches/fix-shell-script-perm.patch b/debian/patches/fix-shell-script-perm.patch
deleted file mode 100644
index 3db3707..0000000
--- a/debian/patches/fix-shell-script-perm.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: correct permission after applying patch
-Author: Benjamin Drung <bdrung at ubuntu.com>
-Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=295526
-Applied-Upstream: no
-
---- a/build.xml
-+++ b/build.xml
-@@ -251,6 +251,7 @@
- 		<patch patchfile="${basedir}/patches/donotstorebuildlogsinfiles.patch" dir="${buildDirectory}" strip="3" />
- 		<patch patchfile="${basedir}/patches/donotsetjavahomeandoptimizeliblocalfile.patch" dir="${buildDirectory}" strip="3" />
- 		<patch patchfile="${basedir}/patches/eclipse-pde.build-add-package-build.patch" dir="${buildDirectory}/plugins/org.eclipse.pde.build" strip="0" />
-+		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<patch patchfile="${basedir}/patches/gnomeproxy-makefile.patch" dir="${buildDirectory}" strip="1" />
- 		<patch patchfile="${basedir}/patches/eclipse-no-jetty5.patch" dir="${buildDirectory}" strip="1" />
- 		<patch patchfile="${basedir}/patches/eclipse-nosourcebundlesfordependencies.patch" dir="${buildDirectory}" strip="1" />
diff --git a/debian/patches/fix-tooltip-color.patch b/debian/patches/fix-tooltip-color.patch
deleted file mode 100644
index 7f536e0..0000000
--- a/debian/patches/fix-tooltip-color.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Description: Backported fix for LP: #540332, poor tooltip text colors
- with certain themes.
-Origin: Upstream, https://bugs.eclipse.org/bugs/show_bug.cgi?id=309907
-Bug-Ubuntu: https://launchpad.net/bugs/540332
-
---- a/build.xml
-+++ b/build.xml
-@@ -263,6 +263,7 @@
- 		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
- 		<symlink link="${buildDirectory}/plugins/org.eclipse.osgi.services/src/javax" resource="../../org.eclipse.equinox.io/src/javax/" />
- 		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
-+		<patch patchfile="${basedir}/patches/tooltip-color.patch" dir="${buildDirectory}" strip="1" />
- 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
- 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<!-- end eclipse-build-only patches -->
---- /dev/null
-+++ b/patches/tooltip-color.patch
-@@ -0,0 +1,47 @@
-+diff -u -r1.25 ToolTip.java
-+--- a/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	2 Dec 2009 15:52:39 -0000
-++++ b/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	13 May 2010 15:59:10 -0000
-+@@ -48,6 +48,7 @@
-+ 	TrayItem item;
-+ 	int x, y, timerId;
-+ 	int /*long*/ layoutText = 0, layoutMessage = 0;
-++	Color layoutTextColor, layoutMessageColor;
-+ 	int [] borderPolygon;
-+ 	boolean spikeAbove, autohide;
-+ 	
-+@@ -498,6 +499,9 @@
-+ 			x += IMAGE_SIZE;
-+ 		}
-+ 		x += INSET;
-++		if (layoutTextColor != null) {
-++			OS.gdk_gc_set_foreground(gdkGC, layoutTextColor.handle);
-++		}
-+ 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutText);
-+ 		int [] w = new int [1], h = new int [1];
-+ 		OS.pango_layout_get_size (layoutText, w, h);
-+@@ -505,6 +509,9 @@
-+ 	}
-+ 	if (layoutMessage != 0) {
-+ 		x = BORDER + PADDING + INSET;
-++		if (layoutMessageColor != null) {
-++			OS.gdk_gc_set_foreground(gdkGC, layoutMessageColor.handle);
-++		}
-+ 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutMessage);
-+ 	}
-+ 	OS.g_object_unref (gdkGC);
-+@@ -708,6 +715,7 @@
-+ 	if (layoutMessage != 0) OS.g_object_unref (layoutMessage);
-+ 	layoutMessage = 0;
-+ 	if (message.length () != 0) {
-++		layoutMessageColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
-+ 		byte [] buffer = Converter.wcsToMbcs (null, message, true);
-+ 		layoutMessage = OS.gtk_widget_create_pango_layout (handle, buffer);
-+ 		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
-+@@ -739,6 +747,7 @@
-+ 	if (layoutText != 0) OS.g_object_unref (layoutText);
-+ 	layoutText = 0;
-+ 	if (text.length () != 0) {
-++		layoutTextColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
-+ 		byte [] buffer = Converter.wcsToMbcs (null, text, true);
-+ 		layoutText = OS.gtk_widget_create_pango_layout (handle, buffer);
-+ 		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
diff --git a/debian/patches/generate-metadata-and-extract-swt-libraries.patch b/debian/patches/generate-metadata-and-extract-swt-libraries.patch
new file mode 100644
index 0000000..46bb56c
--- /dev/null
+++ b/debian/patches/generate-metadata-and-extract-swt-libraries.patch
@@ -0,0 +1,70 @@
+Description: Generate metadata and extract the swt libraries
+ This patch moved the calls from debian/rules into the build.xml file.
+ NOTE, -Declipse.p2.data.area should not be used. See
+ https://bugs.eclipse.org/bugs/show_bug.cgi?id=310041
+From: Benjamin Drung <bdrung at ubuntu.com>
+
+--- a/build.xml
++++ b/build.xml
+@@ -1007,6 +1007,61 @@
+ 
+ 		<echo append="true" file="${installationDir}/eclipse.ini" message="-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=${prefix}/share/eclipse/dropins" />
+ 
++		<!-- Generate metadata -->
++		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/p2" />
++		<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true" dir="${destDir}">
++			<classpath>
++				<fileset dir="${destDir}/${prefix}/${libDir}/eclipse/plugins">
++					<include name="org.eclipse.equinox.launcher_*.jar" />
++				</fileset>
++			</classpath>
++			<arg value="-application" /><arg value="org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" />
++			<arg value="-debug" />
++			<arg value="-consolelog" />
++			<arg value="-metadataRepository" /><arg value="file:${destDir}/${prefix}/${libDir}/eclipse/metadata/" />
++			<arg value="-artifactRepository" /><arg value="file:${destDir}/${prefix}/${libDir}/eclipse/metadata/" />
++			<arg value="-data" /><arg value="${buildworkspace}" />
++			<arg value="-flavor" /><arg value="tooling" />
++			<arg value="-source" /><arg value="${destDir}/${prefix}/${libDir}/eclipse" />
++			<arg value="-root" /><arg value="Eclipse Platform" />
++			<arg value="-rootVersion" /><arg value="${label}" />
++			<arg value="-publishArtifacts" />
++			<arg value="-append" />
++			<arg value="-artifactRepositoryName" /><arg value="Eclipse Platform" />
++			<arg value="-metadataRepositoryName" /><arg value="Eclipse Platform" />
++		</java>
++
++		<!-- Backup eclipse.ini before running the next program, then restore -->
++		<move file="${installationDir}/eclipse.ini" tofile="${installationDir}/eclipse.ini.bak"
++		      force="true" />
++		<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true" dir="${destDir}">
++			<classpath>
++				<fileset dir="${destDir}/${prefix}/${libDir}/eclipse/plugins">
++					<include name="org.eclipse.equinox.launcher_*.jar" />
++				</fileset>
++			</classpath>
++			<arg value="-application" /><arg value="org.eclipse.equinox.p2.director" />
++			<arg value="-debug" />
++			<arg value="-consolelog" />
++			<arg value="-metadataRepository" /><arg value="file:${destDir}/${prefix}/${libDir}/eclipse/metadata/" />
++			<arg value="-artifactRepository" /><arg value="file:${destDir}/${prefix}/${libDir}/eclipse/metadata/" />
++			<arg value="-data" /><arg value="${buildworkspace}" />
++			<arg value="-flavor" /><arg value="tooling" />
++			<arg value="-installIU" /><arg value="Eclipse Platform" />
++			<arg value="-p2.os" /><arg value="linux" />
++			<arg value="-p2.ws" /><arg value="gtk" />
++			<arg value="-p2.arch" /><arg value="${buildArch}" />
++			<arg value="-roaming" />
++			<arg value="-profile" /><arg value="SDKProfile" />
++			<arg value="-profileProperties" /><arg value="org.eclipse.update.install.features=true" />
++			<arg value="-destination" /><arg value="${destDir}/${prefix}/${libDir}/eclipse" />
++			<arg value="-bundlepool" /><arg value="${destDir}/${prefix}/${libDir}/eclipse" />
++			<arg value="-shared" /><arg value="file:${destDir}/${prefix}/${libDir}/eclipse/p2"/>
++			<jvmarg value="-Declipse.p2.MD5Check=false"/>
++		</java>
++		<move file="${installationDir}/eclipse.ini.bak" tofile="${installationDir}/eclipse.ini"
++		      force="true" />
++
+ 		<!-- Extract SWT JNI .so files -->
+ 		<java classname="org.eclipse.core.launcher.Main" fork="true" failonerror="true" dir="${destDir}">
+ 			<classpath>
diff --git a/debian/patches/gnomeproxy-pkg-config.patch b/debian/patches/gnomeproxy-pkg-config.patch
new file mode 100644
index 0000000..c08ef16
--- /dev/null
+++ b/debian/patches/gnomeproxy-pkg-config.patch
@@ -0,0 +1,22 @@
+Description: Use pkg-config to find include files and libraries for libgnomeproxy
+Author: Anders Kaseorg <andersk at mit.edu>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/749218
+Last-Update: 2011-05-19
+
+diff --git a/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
+index 0aa0cbe..ff2a54c 100644
+--- a/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
++++ b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
+@@ -20,10 +20,10 @@ LIB_NAME_FULL = libgnomeproxy-1.0.0.so
+ 
+ OS_TYPE = linux
+ JDK_INCLUDE = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
+-INCLUDE = -I/usr/include/gconf/2/ -I/usr/include/orbit-2.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/
++INCLUDE =  $(shell pkg-config --cflags gconf-2.0 glib-2.0)
+ COMPILER_FLAGS = -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32
+ 
+-LIBS := -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0
++LIBS :=  $(shell pkg-config --libs gconf-2.0 glib-2.0)
+ LINKER_FLAGS= -m32
+ 
+ all: link
diff --git a/debian/patches/lucene.patch b/debian/patches/lucene.patch
deleted file mode 100644
index 8308818..0000000
--- a/debian/patches/lucene.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Removed expected version for lucene2, since our version is "too new".
-Author: Niels Thykier <niels at thykier.net>
-
---- a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
-+++ b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
-@@ -36,8 +36,8 @@
-  org.eclipse.help.search,
-  org.eclipse.help.server,
-  org.eclipse.help.standalone
--Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
-- org.apache.lucene.analysis;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
-+Require-Bundle: org.apache.lucene;visibility:=reexport,
-+ org.apache.lucene.analysis;visibility:=reexport,
-  org.eclipse.ant.core;bundle-version="3.2.100";resolution:=optional,
-  org.eclipse.core.runtime;bundle-version="3.3.0",
-  org.eclipse.help;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
diff --git a/debian/patches/osgi-services-symlink-javax.patch b/debian/patches/osgi-services-symlink-javax.patch
index f017bc9..17a1210 100644
--- a/debian/patches/osgi-services-symlink-javax.patch
+++ b/debian/patches/osgi-services-symlink-javax.patch
@@ -1,14 +1,16 @@
-Description: Add javax to org.eclipse.osgi.services
-Author: Benjamin Drung <bdrung at ubuntu.com>
-Forwarded: No
+Description: Add javax to org.eclipse.osgi.services.
+ This is a hack to get org.eclipse.osgi.services building without having to
+ build org.eclipse.equinox.io.
+From: Benjamin Drung <bdrung at ubuntu.com>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=304710
 
 --- a/build.xml
 +++ b/build.xml
-@@ -261,6 +261,7 @@
- 		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
+@@ -311,6 +311,7 @@
+ 		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
+ 		<patch patchfile="${basedir}/patches/no-gnome-vfs.patch" dir="${buildDirectory}" strip="0" />
  		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
 +		<symlink link="${buildDirectory}/plugins/org.eclipse.osgi.services/src/javax" resource="../../org.eclipse.equinox.io/src/javax/" />
- 		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
  		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
  		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
+ 		<!-- end eclipse-build-only patches -->
diff --git a/debian/patches/osgi-services.patch b/debian/patches/osgi-services.patch
index f5c273c..3efdd39 100644
--- a/debian/patches/osgi-services.patch
+++ b/debian/patches/osgi-services.patch
@@ -1,30 +1,20 @@
-Description: Makes o.e.osgi.services build from source.
-Author: Niels Thykier <niels at thykier.net>
+Description: Need to build org.eclipse.osgi.services before
+ org.eclipse.equinox.app.
+From: Niels Thykier <niels at thykier.net>
 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=304710
 Applied-Upstream: no
 
---- a/build.xml
-+++ b/build.xml
-@@ -258,6 +258,7 @@
- 		<patch patchfile="${basedir}/patches/addEcfQualifiers.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
-+		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
- 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
- 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<!-- end eclipse-build-only patches -->
 --- a/pdebuild.xml
 +++ b/pdebuild.xml
-@@ -30,6 +30,8 @@
+@@ -30,6 +30,7 @@
  		<file name="org.eclipse.equinox.preferences" />
  		<file name="org.eclipse.core.runtime.compatibility.auth" />
  		<file name="org.eclipse.core.contenttype" />
-+		<file name="org.eclipse.equinox.transforms.hook" />
 +		<file name="org.eclipse.osgi.services" />
  		<file name="org.eclipse.equinox.app" />
  		<file name="org.eclipse.core.runtime" />
  		<file name="org.eclipse.core.variables" />
-@@ -64,7 +66,6 @@
+@@ -64,7 +65,6 @@
  		<file name="org.eclipse.equinox.p2.updatesite" />
  		<file name="org.eclipse.pde.build" />
  		<file name="org.eclipse.equinox.launcher" />
@@ -34,12 +24,12 @@ Applied-Upstream: no
  		<file name="org.eclipse.update.core" />
 --- /dev/null
 +++ b/patches/osgi-services-build.patch
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,21 @@
 +diff --git a/eclipse/plugins/org.eclipse.osgi.services/build.properties b/eclipse/plugins/org.eclipse.osgi.services/build.properties
 +index 7962dc5..ca55afb 100644
 +--- a/plugins/org.eclipse.osgi.services/build.properties
 ++++ b/plugins/org.eclipse.osgi.services/build.properties
-+@@ -11,11 +11,11 @@
++@@ -11,11 +11,10 @@
 + bin.includes = plugin.properties,\
 +                about.html,\
 +                META-INF/,\
@@ -55,41 +45,23 @@ Applied-Upstream: no
 +-source.. = .
 ++source.. = src/
 + output.. = .
-+ customBuildCallbacks=customBuildCallbacks.xml
-+diff --git a/eclipse/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-+index 9187112..dbd6075 100644
-+--- a/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-++++ b/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-+@@ -104,6 +104,7 @@
-+ 	<!--   target.folder - destination folder                                  -->
-+ 	<!-- ===================================================================== -->
-+ 	<target name="post.gather.bin.parts">
-++	  <delete dir="${target.folder}/javax" />
-+ 	</target>
-+ 
-+ 	<!-- ===================================================================== -->
-+@@ -120,8 +121,7 @@
-+ 	<!--   destination.temp.folder - destination folder                        -->
-+ 	<!-- ===================================================================== -->
-+ 	<target name="post.gather.sources">
-+-		<unzip src="${target.folder}/src.zip" dest="${target.folder}" overwrite="false"/>
-+-		<delete file="${destination.temp.folder}/src.zip" />	
-++	  <delete dir="${destination.temp.folder}/javax" />
-+ 	</target>
-+ 
-+ 	<!-- ===================================================================== -->
-+@@ -146,7 +146,6 @@
-+ 	<!--   destination.temp.folder - destination folder                        -->
-+ 	<!-- ===================================================================== -->
-+ 	<target name="pre.clean">  
-+-		<move  file="src.zip" tofile="services_src.zip"/>
-+ 	</target>
-+ 
-+ 	<!-- ===================================================================== -->
-+@@ -157,6 +156,5 @@
-+ 	<!--   temp.folder - temporary folder                                      -->
-+ 	<!-- ===================================================================== -->
-+ 	<target name="post.clean">
-+-		<move file="services_src.zip" tofile="src.zip"/>
-+ 	</target>
-+ </project>
++-customBuildCallbacks=customBuildCallbacks.xml
+--- a/build.xml
++++ b/build.xml
+@@ -310,6 +310,7 @@
+ 		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
+ 		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
+ 		<patch patchfile="${basedir}/patches/no-gnome-vfs.patch" dir="${buildDirectory}" strip="0" />
++		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
+ 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
+ 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
+ 		<!-- end eclipse-build-only patches -->
+@@ -321,6 +322,8 @@
+ 		<replace file="${buildConfigs}/eclipse-build-config/build.properties" token="@build_arch@" value="${buildArch}" />
+ 		<patch patchfile="${basedir}/patches/java-home.patch" dir="${buildDirectory}" strip="2" />
+ 		<patch patchfile="${basedir}/patches/webkitgtk.patch" dir="${buildDirectory}" strip="0" />
++		<delete dir="${buildDirectory}/plugins/org.eclipse.equinox.io/" />
++		<delete dir="${buildDirectory}/plugins/org.eclipse.osgi.services/src/org/osgi/service/io/" />
+ 		<echo file="patch-stamp" />
+ 	</target>
+ 
diff --git a/debian/patches/osgi-util.patch b/debian/patches/osgi-util.patch
deleted file mode 100644
index 80edf18..0000000
--- a/debian/patches/osgi-util.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Description: Updates o.e.osgi.util's build properties so it builds from source.
-Author: Niels Thykier <niels at thykier.net>
-Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=305244
-Applied-Upstream: no
-
---- /dev/null
-+++ b/patches/osgi-util.patch
-@@ -0,0 +1,20 @@
-+diff --git a/eclipse/plugins/org.eclipse.osgi.util/build.properties b/eclipse/plugins/org.eclipse.osgi.util/build.properties
-+index 2a015f5..270afcd 100644
-+--- a/plugins/org.eclipse.osgi.util/build.properties
-++++ b/plugins/org.eclipse.osgi.util/build.properties
-+@@ -12,10 +12,10 @@ bin.includes = plugin.properties,\
-+                org/,\
-+                about.html,\
-+                META-INF/,\
-++               about_files/,\
-++               .
-++src.includes = about.html,\
-+                about_files/
-+-src.includes = src.zip,\
-+-               about.html,\
-+-               about_files/
-+-source.. = .
-++source.. = src/
-+ output.. = .
-+-customBuildCallbacks=customBuildCallbacks.xml
-++#customBuildCallbacks=customBuildCallbacks.xml
---- a/build.xml
-+++ b/build.xml
-@@ -257,6 +257,7 @@
- 		<patch patchfile="${basedir}/patches/eclipse-use-newer-commons-codec.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/addEcfQualifiers.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
-+		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
- 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
- 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<!-- end eclipse-build-only patches -->
diff --git a/debian/patches/pdebuild-path-copy-platform.patch b/debian/patches/pdebuild-path-copy-platform.patch
index 142908a..bc692b8 100644
--- a/debian/patches/pdebuild-path-copy-platform.patch
+++ b/debian/patches/pdebuild-path-copy-platform.patch
@@ -1,7 +1,7 @@
 Description: Substitute the path to copy-platform with a variable.
  This patch is only of interest to Debian, as we want to install
  pdebuild in a different path.
-Author: Niels Thykier <niels at thykier.net>
+From: Niels Thykier <niels at thykier.net>
 Forwarded: not-needed
 
 --- a/pdebuild/eclipse-pdebuild.sh
diff --git a/debian/patches/pdebuild-script.patch b/debian/patches/pdebuild-script.patch
index 9803679..80eb1cf 100644
--- a/debian/patches/pdebuild-script.patch
+++ b/debian/patches/pdebuild-script.patch
@@ -1,5 +1,5 @@
 Description: Remove Fedora specific parts and change paths
-Author: Niels Thykier <niels at thykier.net>
+From: Niels Thykier <niels at thykier.net>
 
 --- a/pdebuild/eclipse-pdebuild.sh
 +++ b/pdebuild/eclipse-pdebuild.sh
diff --git a/debian/patches/remove-unnecessary-files.patch b/debian/patches/remove-unnecessary-files.patch
new file mode 100644
index 0000000..10ce0f5
--- /dev/null
+++ b/debian/patches/remove-unnecessary-files.patch
@@ -0,0 +1,16 @@
+Description: Remove unnecessary configuration data and metadata
+From: Benjamin Drung <bdrung at ubuntu.com>
+
+--- a/build.xml
++++ b/build.xml
+@@ -1089,6 +1089,10 @@
+ 			</fileset>
+ 		</apply>
+ 		
++		<!-- Remove unnecessary metadata -->
++		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/binary" />
++		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/features" />
++		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/plugins" />
+ 		<!-- Move config file to /etc -->
+ 		<mkdir dir="${destDir}/etc" />
+ 		<move file="${installationDir}/eclipse.ini" tofile="${destDir}/etc/eclipse.ini" />
diff --git a/debian/patches/sat4j-version.patch b/debian/patches/sat4j-version.patch
deleted file mode 100644
index ac265dd..0000000
--- a/debian/patches/sat4j-version.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Loosen the version requirements for sat4j.
-Author: Niels Thykier <niels at thykier.net>
-Forwarded: Not needed.
-
-diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
-index e5918c6..a9e7496 100644
---- a/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
-+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
-@@ -36,6 +36,6 @@ Eclipse-LazyStart: true
- Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
-  J2SE-1.4
- Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
-- org.sat4j.core;bundle-version="2.1.0",
-- org.sat4j.pb;bundle-version="2.1.0",
-+ org.sat4j.core;bundle-version="[2.1.0,2.3)",
-+ org.sat4j.pb;bundle-version="[2.1.0,2.3)",
-  org.eclipse.core.jobs;bundle-version="3.3.0"
diff --git a/debian/patches/series b/debian/patches/series
index 8439669..18a1645 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,30 +1,20 @@
-upstream-eclipse-build-repack.patch
-osgi-util.patch
-osgi-services.patch
-fix-shell-script-perm.patch
-lucene.patch
 eclipse-manpage.patch
-pdebuild-script.patch
-pdebuild-path-copy-platform.patch
-symlink-system-files.patch
-compile-jarinjarloader.patch
 compile-IPluginDescriptor.patch
 use-stable-xulrunner.patch
-swt-compile-xpt.patch
-eclipse-build-generatedScripts.patch
-osgi-services-symlink-javax.patch
+add-o.e.equinox.concurrent.patch
 ecj-gccmain-java.patch
 fix-help-contents.patch
-fix-tooltip-color.patch
-bp-hover-visability.patch
-fix-bashism.patch
-build-arch.patch
-sat4j-version.patch
-add-o.e.equinox.concurrent.patch
-pdebuild-workspace.patch
-bp-osgi-ignore-root-CA.patch
-bp-osgi-allow-illegal-os-qualifier.patch
-bp-eclipse-help-webapps-xss-BZ661901.patch
-bp-build-with-ant-1.8.2.patch
+pdebuild-path-copy-platform.patch
+pdebuild-script.patch
+symlink-system-files.patch
+remove-unnecessary-files.patch
+strip-destDir.patch
+clean-source.patch
+osgi-services.patch
+osgi-services-symlink-javax.patch
+use-ant-1.8.2.patch
+eclipse-build-generatedScripts.patch
+generate-metadata-and-extract-swt-libraries.patch
 bp-ant-1.8.2-support.patch
-bp-pdebuild-fixes.patch
+debian-load-internal-swt.patch
+gnomeproxy-pkg-config.patch
diff --git a/debian/patches/strip-destDir.patch b/debian/patches/strip-destDir.patch
new file mode 100644
index 0000000..df20fff
--- /dev/null
+++ b/debian/patches/strip-destDir.patch
@@ -0,0 +1,28 @@
+Description: Strip ${destDir} from path
+From: Benjamin Drung <bdrung at ubuntu.com>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=319473
+
+--- a/build.xml
++++ b/build.xml
+@@ -1093,6 +1093,21 @@
+ 		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/binary" />
+ 		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/features" />
+ 		<delete dir="${destDir}/${prefix}/${libDir}/eclipse/metadata/plugins" />
++		<!-- Strip ${destDir} from path -->
++		<exec executable="sed" inputstring="${destDir}" outputproperty="destDirWithUnderscores" failonerror="true">
++			<arg value="s@/@_ at g" />
++		</exec>
++		<apply executable="sed" failonerror="true" verbose="true">
++			<arg value="-i" />
++			<arg value="s@${destDir}@@g;s@${destDirWithUnderscores}@@g" />
++			<srcfile />
++			<fileset dir="${destDir}/${prefix}/${libDir}/eclipse">
++				<include name="metadata/content.xml" />
++				<include name="p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs" />
++				<include name="p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.artifact.repository.prefs" />
++				<include name="eclipse.ini" />
++			</fileset>
++		</apply>
+ 		<!-- Move config file to /etc -->
+ 		<mkdir dir="${destDir}/etc" />
+ 		<move file="${installationDir}/eclipse.ini" tofile="${destDir}/etc/eclipse.ini" />
diff --git a/debian/patches/swt-compile-xpt.patch b/debian/patches/swt-compile-xpt.patch
deleted file mode 100644
index 85919f2..0000000
--- a/debian/patches/swt-compile-xpt.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Description: Build .xpt file if it does not exit
-Author: Benjamin Drung
-Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=304112
-
---- a/build.xml
-+++ b/build.xml
-@@ -261,6 +261,7 @@
- 		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/osgi-util.patch" dir="${buildDirectory}" strip="1" />
- 		<patch patchfile="${basedir}/patches/osgi-services-build.patch" dir="${buildDirectory}" strip="1" />
-+		<patch patchfile="${basedir}/patches/eclipse-swt-compile-xpt.patch" dir="${buildDirectory}" strip="1" />
- 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
- 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<!-- end eclipse-build-only patches -->
---- /dev/null
-+++ b/patches/eclipse-swt-compile-xpt.patch
-@@ -0,0 +1,31 @@
-+Description: Build .xpt file if it does not exit
-+Author: Benjamin Drung
-+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=305569
-+
-+--- a/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
-++++ b/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
-+@@ -24,6 +24,24 @@ if [ "${CC}" = "" ]; then
-+ 	export CC
-+ fi
-+ 
-++COMPONENTS_DIR=$(pwd)/../../org.eclipse.swt/components
-++# Check if we have to compile external.xpt from external.idl
-++if test ! -f ${COMPONENTS_DIR}/external.xpt; then
-++	if test ! -f ${COMPONENTS_DIR}/external.idl; then
-++		echo "Can't find ${COMPONENTS_DIR}/external.idl"
-++		exit 1
-++	fi
-++
-++	IDLDIR=$(pkg-config --variable=idldir libxul | sed 's@/stable$@@')/unstable
-++	if test ! -d ${IDLDIR}; then
-++		IDLDIR=$(pkg-config --variable=idldir libxul)
-++	fi
-++	XPIDL=$(pkg-config --variable=sdkdir libxul)/bin/xpidl
-++
-++	echo "${XPIDL} -m typelib -I ${IDLDIR} -e ${COMPONENTS_DIR}/external.xpt ${COMPONENTS_DIR}/external.idl"
-++	${XPIDL} -m typelib -I ${IDLDIR} -e ${COMPONENTS_DIR}/external.xpt ${COMPONENTS_DIR}/external.idl
-++fi
-++
-+ # Determine which OS we are on
-+ if [ "${OS}" = "" ]; then
-+ 	OS=`uname -s`
diff --git a/debian/patches/symlink-system-files.patch b/debian/patches/symlink-system-files.patch
index 877467b..18eb14a 100644
--- a/debian/patches/symlink-system-files.patch
+++ b/debian/patches/symlink-system-files.patch
@@ -1,14 +1,14 @@
 Description: Symlink system ant files
-Author: Benjamin Drung <bdrung at ubuntu.com>
+From: Benjamin Drung <bdrung at ubuntu.com>
 
 --- a/nonosgidependencies.properties
 +++ b/nonosgidependencies.properties
-@@ -18,3 +18,8 @@
- org.apache.ant_1.7.1.v20090120-1145/lib/ant-trax.jar=/usr/share/java/ant/ant-trax.jar:/usr/share/java/ant-trax.jar
- org.junit_3.8.2.v20090203-1005/junit.jar=/usr/share/java/junit.jar
- org.junit4/junit.jar=/usr/share/java/junit4.jar
-+org.apache.ant_1.7.1.v20090120-1145/bin/ant=/usr/share/ant/bin/ant
-+org.apache.ant_1.7.1.v20090120-1145/bin/antRun=/usr/share/ant/bin/antRun
-+org.apache.ant_1.7.1.v20090120-1145/bin/antRun.pl=/usr/share/ant/bin/antRun.pl
-+org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl=/usr/share/ant/bin/complete-ant-cmd.pl
-+org.apache.ant_1.7.1.v20090120-1145/bin/runant.pl=/usr/share/ant/bin/runant.pl
+@@ -1,3 +1,8 @@
++org.apache.ant_1.7.1.v20100518-1145/bin/ant=/usr/share/ant/bin/ant
++org.apache.ant_1.7.1.v20100518-1145/bin/antRun=/usr/share/ant/bin/antRun
++org.apache.ant_1.7.1.v20100518-1145/bin/antRun.pl=/usr/share/ant/bin/antRun.pl
++org.apache.ant_1.7.1.v20100518-1145/bin/complete-ant-cmd.pl=/usr/share/ant/bin/complete-ant-cmd.pl
++org.apache.ant_1.7.1.v20100518-1145/bin/runant.pl=/usr/share/ant/bin/runant.pl
+ org.apache.ant_1.7.1.v20100518-1145/lib/ant-antlr.jar=/usr/share/java/ant/ant-antlr.jar:/usr/share/java/ant-antlr.jar
+ org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bcel.jar=/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ant-apache-bcel.jar
+ org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bsf.jar=/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/ant-apache-bsf.jar
diff --git a/debian/patches/upstream-eclipse-build-repack.patch b/debian/patches/upstream-eclipse-build-repack.patch
deleted file mode 100644
index 6f69342..0000000
--- a/debian/patches/upstream-eclipse-build-repack.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-Description: This patch contains the diff between the first version and the
- updated version eclipse-build 0.5.0
-Origin: upstream
-
---- a/build.xml
-+++ b/build.xml
-@@ -256,6 +256,7 @@
- 		<patch patchfile="${basedir}/patches/eclipse-nosourcebundlesfordependencies.patch" dir="${buildDirectory}" strip="1" />
- 		<patch patchfile="${basedir}/patches/eclipse-use-newer-commons-codec.patch" dir="${buildDirectory}"  strip="0" />
- 		<patch patchfile="${basedir}/patches/addEcfQualifiers.patch" dir="${buildDirectory}"  strip="0" />
-+		<patch patchfile="${basedir}/patches/droppluginversions.patch" dir="${buildDirectory}"  strip="0" />
- 		<replace file="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build/build.properties" token="/usr/share/eclipse" value="/usr/${libDir}/eclipse" />
- 		<chmod dir="${buildDirectory}/plugins/org.eclipse.pde.build/templates/package-build" includes="*.sh" perm="a+x" />
- 		<!-- end eclipse-build-only patches -->
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,8 @@
-+2010-03-18  Alexander Kurtakov  <akurtako at redhat.com>
-+
-+	* patches/droppluginversions.patch: New file.
-+	* build.xml: Apply patch to match upstream qualifiers.
-+
- 2010-03-12  Andrew Overholt  <overholt at redhat.com>
- 
- 	* build.xml: Remove unnecessary copying of test result XML files.
---- /dev/null
-+++ b/patches/droppluginversions.patch
-@@ -0,0 +1,65 @@
-+--- pluginVersions.properties.sav	2010-03-18 13:10:05.000000000 +0200
-++++ pluginVersions.properties	2010-03-18 13:14:44.477528467 +0200
-+@@ -27,7 +27,7 @@ org.eclipse.equinox.simpleconfigurator.m
-+ org.eclipse.pde.api.tools.ui,0.0.0=v20090820
-+ org.eclipse.jdt.debug,0.0.0=v20090526
-+ org.eclipse.sdk.examples,0.0.0=v20080612
-+-org.eclipse.pde,0.0.0=v20090527
-++org.eclipse.pde,0.0.0=v201002111343
-+ org.eclipse.compare.core,0.0.0=I20090430-0408
-+ org.eclipse.equinox.p2.engine,0.0.0=R35x_v20091117
-+ org.eclipse.equinox.launcher.motif.hpux.ia64_32,0.0.0=v20090519
-+@@ -38,7 +38,7 @@ org.eclipse.equinox.p2.ui.admin,0.0.0=v2
-+ org.eclipse.equinox.transforms.xslt,0.0.0=R35x_v20100209
-+ org.eclipse.jface.databinding,0.0.0=M20090826-0800
-+ org.eclipse.equinox.p2.touchpoint.eclipse,0.0.0=R35x_20090820-1821
-+-org.eclipse.help.base,0.0.0=v20090526
-++org.eclipse.help.base,0.0.0=v201002111343
-+ org.eclipse.ui.presentations.r21,0.0.0=M20091015-0930
-+ org.eclipse.equinox.frameworkadmin,0.0.0=v20090520-1905
-+ org.eclipse.ui.intro,0.0.0=v20100111_35x
-+@@ -76,7 +76,7 @@ org.eclipse.team.ui,0.0.0=I20090430-0408
-+ org.eclipse.equinox.p2.metadata,0.0.0=R35x_v20100112
-+ org.eclipse.swt.cocoa.macosx.x86_64,0.0.0=v3557f
-+ org.eclipse.jdt.compiler.tool,0.0.0=v_981_R35x
-+-org.eclipse.platform,0.0.0=R35x_v20100121
-++org.eclipse.platform,0.0.0=v201002111343
-+ org.eclipse.core.databinding.observable,0.0.0=M20090902-0800
-+ org.eclipse.team.examples.filesystem,0.0.0=I20090210-0800
-+ org.eclipse.pde.core,0.0.0=v20100104
-+@@ -191,7 +191,7 @@ org.eclipse.pde.api.tools.ee.javase16,0.
-+ org.eclipse.compare.win32,0.0.0=I20090430-0408
-+ org.eclipse.equinox.p2.installer,0.0.0=R35x_v20090717
-+ org.eclipse.debug.examples.core,0.0.0=v20090504
-+-org.eclipse.rcp,0.0.0=R35x_v20100119
-++org.eclipse.rcp,0.0.0=v201002111343
-+ org.eclipse.pde.ds.core,0.0.0=v20100118
-+ org.eclipse.equinox.registry,0.0.0=v20090520-1800
-+ org.eclipse.ui.examples.readmetool,0.0.0=I20090526-2000
-+@@ -233,7 +233,7 @@ org.eclipse.update.configurator,0.0.0=v2
-+ org.eclipse.core.filesystem.win32.x86,0.0.0=v20080604-1400
-+ org.eclipse.equinox.p2.core,0.0.0=R35x_v20090819
-+ org.eclipse.swt.examples,0.0.0=v3557f
-+-org.eclipse.cvs,0.0.0=R35x_v20100119
-++org.eclipse.cvs,0.0.0=v201002111343
-+ org.eclipse.swt.gtk.linux.x86,0.0.0=v3557f
-+ org.eclipse.equinox.log,0.0.0=v20090520-1800
-+ org.eclipse.equinox.jmx.client,0.0.0=v20070515
-+@@ -250,7 +250,7 @@ org.eclipse.platform.doc.user,0.0.0=r352
-+ org.eclipse.equinox.security.macosx,0.0.0=v20090520-1800
-+ org.eclipse.equinox.supplement,0.0.0=v20090518
-+ org.eclipse.team.cvs.ssh,0.0.0=I20090508-2000
-+-org.eclipse.sdk,0.0.0=R35x_v20100204
-++org.eclipse.sdk,0.0.0=v201002111343
-+ org.eclipse.jsch.ui,0.0.0=r35x_20100210-1114
-+ org.eclipse.core.filesystem.win32.x86_64,0.0.0=v20090316-0910
-+ org.eclipse.equinox.security.win32.x86,0.0.0=v20090520-1800
-+@@ -289,7 +289,7 @@ org.eclipse.equinox.p2.ui.sdk.scheduler,
-+ org.eclipse.ui.editors,0.0.0=v20090527-2000
-+ org.eclipse.core.filebuffers,0.0.0=v20090526-2000
-+ org.eclipse.equinox.ip,0.0.0=R35x_v20090803
-+-org.eclipse.jdt,0.0.0=r352_v20100106-0800
-++org.eclipse.jdt,0.0.0=v201002111343
-+ org.eclipse.ecf,0.0.0=v20090831-1906
-+ org.eclipse.ecf.filetransfer,0.0.0=v20090831-1906
-+ org.eclipse.ecf.identity,0.0.0=v20090831-1906
diff --git a/debian/patches/use-ant-1.8.2.patch b/debian/patches/use-ant-1.8.2.patch
new file mode 100644
index 0000000..1c125e2
--- /dev/null
+++ b/debian/patches/use-ant-1.8.2.patch
@@ -0,0 +1,119 @@
+Description: Patch to convert to using ant-1.8.2.
+ NOTE: The build.xml files within eclipse-build-generatedScripts.tar.bz2 must
+ also have entries pointing to the old ant version updated to use and-1.8.2.
+ In other words, an 'ant generateBuildXmls' run must be done.
+Author: Andres Mejia <mcitadel at gmail.com>
+
+--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
++++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
+@@ -33,7 +33,7 @@
+ -classpath @rt@
+ ;../com.ibm.icu_4.2.1.v20100412.jar
+ ;../org.eclipse.jdt.apt.core/mirrorapi.jar
+-;../org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar
++;../org.apache.ant_1.8.2.v20101227-1145/lib/ant.jar
+ ;../org.eclipse.ant.core/@dot
+ ;../org.eclipse.compare/@dot
+ ;../org.eclipse.compare.core/@dot
+--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt
++++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt
+@@ -30,7 +30,7 @@
+ -classpath ${bootclasspath}
+ ;../com.ibm.icu_4.2.1.v20100412.jar
+ ;../org.eclipse.jdt.apt.core/mirrorapi.jar
+-;../org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar
++;../org.apache.ant_1.8.2.v20101227-1145/lib/ant.jar
+ ;../org.eclipse.ant.core/@dot
+ ;../org.eclipse.compare/@dot
+ ;../org.eclipse.compare.core/@dot
+--- a/nonosgidependencies.properties
++++ b/nonosgidependencies.properties
+@@ -1,23 +1,23 @@
+-org.apache.ant_1.7.1.v20100518-1145/bin/ant=/usr/share/ant/bin/ant
+-org.apache.ant_1.7.1.v20100518-1145/bin/antRun=/usr/share/ant/bin/antRun
+-org.apache.ant_1.7.1.v20100518-1145/bin/antRun.pl=/usr/share/ant/bin/antRun.pl
+-org.apache.ant_1.7.1.v20100518-1145/bin/complete-ant-cmd.pl=/usr/share/ant/bin/complete-ant-cmd.pl
+-org.apache.ant_1.7.1.v20100518-1145/bin/runant.pl=/usr/share/ant/bin/runant.pl
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-antlr.jar=/usr/share/java/ant/ant-antlr.jar:/usr/share/java/ant-antlr.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bcel.jar=/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ant-apache-bcel.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bsf.jar=/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/ant-apache-bsf.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-log4j.jar=/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/ant-apache-log4j.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-oro.jar=/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/ant-apache-oro.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-regexp.jar=/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/ant-apache-regexp.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-resolver.jar=/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/ant-apache-resolver.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-commons-logging.jar=/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/ant-commons-logging.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-commons-net.jar=/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant-commons-net.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar=/usr/share/java/ant.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-javamail.jar=/usr/share/java/ant/ant-javamail.jar:/usr/share/java/ant-javamail.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-jdepend.jar=/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant-jdepend.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-jsch.jar=/usr/share/java/ant/ant-jsch.jar:/usr/share/java/ant-jsch.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-junit.jar=/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant-junit.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-launcher.jar=/usr/share/java/ant-launcher.jar:/usr/share/java/ant-launcher.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-nodeps.jar=/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant-nodeps.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-swing.jar=/usr/share/java/ant/ant-swing.jar:/usr/share/java/ant-swing.jar
+-org.apache.ant_1.7.1.v20100518-1145/lib/ant-trax.jar=/usr/share/java/ant/ant-trax.jar:/usr/share/java/ant-trax.jar
++org.apache.ant_1.8.2.v20101227-1145/bin/ant=/usr/share/ant/bin/ant
++org.apache.ant_1.8.2.v20101227-1145/bin/antRun=/usr/share/ant/bin/antRun
++org.apache.ant_1.8.2.v20101227-1145/bin/antRun.pl=/usr/share/ant/bin/antRun.pl
++org.apache.ant_1.8.2.v20101227-1145/bin/complete-ant-cmd.pl=/usr/share/ant/bin/complete-ant-cmd.pl
++org.apache.ant_1.8.2.v20101227-1145/bin/runant.pl=/usr/share/ant/bin/runant.pl
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-antlr.jar=/usr/share/java/ant/ant-antlr.jar:/usr/share/java/ant-antlr.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-bcel.jar=/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ant-apache-bcel.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-bsf.jar=/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/ant-apache-bsf.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-log4j.jar=/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/ant-apache-log4j.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-oro.jar=/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/ant-apache-oro.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-regexp.jar=/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/ant-apache-regexp.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-resolver.jar=/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/ant-apache-resolver.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-apache-xalan2.jar=/usr/share/java/ant/ant-apache-xalan2.jar:/usr/share/java/ant-apache-xalan2.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-commons-logging.jar=/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/ant-commons-logging.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-commons-net.jar=/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant-commons-net.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant.jar=/usr/share/java/ant.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-javamail.jar=/usr/share/java/ant/ant-javamail.jar:/usr/share/java/ant-javamail.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-jdepend.jar=/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant-jdepend.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-jmf.jar=/usr/share/java/ant/ant-jmf.jar:/usr/share/java/ant-jmf.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-jsch.jar=/usr/share/java/ant/ant-jsch.jar:/usr/share/java/ant-jsch.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-junit.jar=/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant-junit.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-launcher.jar=/usr/share/java/ant-launcher.jar:/usr/share/java/ant-launcher.jar
++org.apache.ant_1.8.2.v20101227-1145/lib/ant-swing.jar=/usr/share/java/ant/ant-swing.jar:/usr/share/java/ant-swing.jar
+--- a/build.xml
++++ b/build.xml
+@@ -355,11 +355,11 @@
+ 		<symlinkOSGiJars dependencies="${basedir}/jdtdependencies.properties" topLevelDir="${buildDirectory}/plugins" manifests="${basedir}/dependencyManifests" />
+ 		<symlinkNonOSGiJars dependencies="${basedir}/jdtnonosgidependencies.properties" topLevelDir="${buildDirectory}/plugins" />
+ 		<symlinkOSGiJars dependencies="${basedir}/sdkdependencies.properties" topLevelDir="${buildDirectory}/plugins" manifests="${basedir}/dependencyManifests" />
+-		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF" flags="m,g,s">
++		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.8.2.v20101227-1145/META-INF/MANIFEST.MF" flags="m,g,s">
+ 			<regexp pattern="^Name.*" />
+ 			<substitution expression="" />
+ 		</replaceregexp>
+-		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF" flags="m,g,s">
++		<replaceregexp file="${buildDirectory}/plugins/org.apache.ant_1.8.2.v20101227-1145/META-INF/MANIFEST.MF" flags="m,g,s">
+ 			<regexp pattern="^SHA1-Digest.*" />
+ 			<substitution expression="" />
+ 		</replaceregexp>
+--- a/eclipse/maps/org.eclipse.releng/maps/orbit.map
++++ b/eclipse/maps/org.eclipse.releng/maps/orbit.map
+@@ -15,8 +15,8 @@
+ plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+-plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20100518-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+-plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20100518-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
++plugin at org.apache.ant,1.8.2=p2IU,id=org.apache.ant,version=1.8.2.v20101227-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
++plugin at org.apache.ant.source,1.8.2=p2IU,id=org.apache.ant.source,version=1.8.2.v20101227-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v201004212143,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+--- a/eclipse/directory.txt
++++ b/eclipse/directory.txt
+@@ -323,8 +323,8 @@
+ plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+-plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20100518-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+-plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20100518-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
++plugin at org.apache.ant,1.8.2=p2IU,id=org.apache.ant,version=1.8.2.v20101227-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
++plugin at org.apache.ant.source,1.8.2=p2IU,id=org.apache.ant.source,version=1.8.2.v20101227-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+ plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v201004212143,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
diff --git a/debian/patches/use-stable-xulrunner.patch b/debian/patches/use-stable-xulrunner.patch
index d97ab0d..aafe9e9 100644
--- a/debian/patches/use-stable-xulrunner.patch
+++ b/debian/patches/use-stable-xulrunner.patch
@@ -1,5 +1,5 @@
 Description: Use stable libxul instead of libxul-unstable
-Author: Benjamin Drung <bdrung at ubuntu.com>
+From: Benjamin Drung <bdrung at ubuntu.com>
 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306119
 
 --- a/patches/eclipse-swt-buildagainstxulrunner.patch
diff --git a/debian/rules b/debian/rules
index e0faf3d..7317d28 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,77 +2,55 @@
 
 export JAVA_HOME=/usr/lib/jvm/default-java
 
-# We need this for overriding uname, upstream expects a slightly
-# different behaviour than Debian's uname.
-export PATH:=$(CURDIR)/debian/extra/bin:$(PATH)
-
 %:
 	dh --with xulrunner $@
 
+# The renaming of org.apache.ant_* directory is done so that eclipse is built
+# using the latest ant version in Debian.
+override_dh_auto_build:
+	test ! -d eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145 || \
+		mv eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145 \
+		eclipse/plugins/org.apache.ant_1.8.2.v20101227-1145
+	ant build
+
 override_dh_auto_clean:
 	ant distclean
 	mh_clean
+	test ! -d eclipse/plugins/org.apache.ant_1.8.2.v20101227-1145 || \
+		mv eclipse/plugins/org.apache.ant_1.8.2.v20101227-1145 \
+		eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145
 
 override_dh_auto_install:
 	ant install -Dprefix=/usr -DdestDir=$(CURDIR)/debian/tmp
 
+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 JNI_SO_PATH = debian/eclipse-rcp/usr/lib/eclipse/configuration/org.eclipse.osgi/bundles/*/1/.cp
+SWT_SO_PATH := $(CURDIR)/debian/eclipse-rcp/usr/lib/eclipse/debian-swt
 LAUNCHER_LIB = debian/eclipse-rcp/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.*/eclipse_*.so
 
 override_dh_shlibdeps:
 	dh_shlibdeps -peclipse-rcp -l$(JAVA_HOME)/jre/lib/$(DEB_HOST_ARCH_CPU) \
 		-- -dDepends \
-			$(JNI_SO_PATH)/libswt-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-atk-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-awt-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-cairo-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-pi-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-xpcominit-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-xulrunner-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-atk-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-awt-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-cairo-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-pi-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-xpcominit-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-xulrunner-gtk-*.so \
 			$(shell find $(JNI_SO_PATH) -name '*.so' | grep -v libswt-) \
 			$(LAUNCHER_LIB) \
 		-dRecommends \
-			$(JNI_SO_PATH)/libswt-gnome-gtk-*.so \
-			$(JNI_SO_PATH)/libswt-glx-gtk-*.so
+			$(SWT_SO_PATH)/libswt-gnome-gtk-*.so \
+			$(SWT_SO_PATH)/libswt-glx-gtk-*.so
 	dh_shlibdeps --remaining-packages
 
-unapply-patches:
-	for P in `tac debian/patches/series` ; do \
-		patch -p1 -R < debian/patches/$$P || exit 1;\
-	done
-
-apply-patches:
-	for P in `cat debian/patches/series` ; do \
-		patch -p1 < debian/patches/$$P || exit 1;\
-	done
-
-refresh-patches: unapply-patches
-	for P in `cat debian/patches/series` ; do \
-		(QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null push || test $$? = 2) || exit 1 ;\
-		QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null refresh -p ab --no-index --no-timestamps || exit 1 ;\
-	done
-	rm -fr .pc
-
-# TODO: Turn all commands below this comment into patches and send them to eclipse-build.
-
 # This has to go in an arch package, as some of the version numbers
 # depend on which arch it was build one.
 COPY_PLATFORM:=/usr/lib/eclipse/buildscripts/copy-platform
 COPY_PLATFORM_INSTALL:=debian/tmp$(COPY_PLATFORM)
 PDEBUILD_INSTALL:=debian/tmp/usr/lib/eclipse/buildscripts/pde-build
-
-DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
-DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
-DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
-BUILD_TAG := $(shell grep ^buildTag= build.properties | sed "s/^buildTag=//")
-SOURCE_DIR := $(CURDIR)/build/eclipse-$(UPSTREAM_VERSION)-src
-RESULT_DIR := $(SOURCE_DIR)/installation/
-DEBIAN_PACK_LIBDIR := $(CURDIR)/debian/tmp/usr/lib/eclipse
-PROFILE_ID := PlatformProfile
-
-LAUNCHERVERSION = $(shell ls $(DEBIAN_PACK_LIBDIR)/plugins | grep equinox.launcher_ | sed 's/org.eclipse.equinox.launcher_//')
-PDEBUILDVERSION = $(shell ls $(DEBIAN_PACK_LIBDIR)/plugins | grep org.eclipse.pde.build_ | sed 's/org.eclipse.pde.build_//')
-UPSTREAM_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed "s/+repack.*$$//")
+PDEBUILDVERSION = $(shell ls debian/tmp/usr/lib/eclipse/plugins | grep org.eclipse.pde.build_ | sed 's/org.eclipse.pde.build_//')
 
 XULVERSION := $(shell pkg-config --modversion libxul)
 XULVERSION_STRIP1 := $(shell echo $(XULVERSION) | sed "s/\.[^\.]*$$//")
@@ -84,129 +62,45 @@ XULRUNNER_PATH := $(shell if test -d /usr/lib/xulrunner-$(shell $(XULRUNNER) --g
 	then echo '/usr/lib/xulrunner-$$($(XULRUNNER) --gre-version)'; \
 	else pkg-config --variable=sdkdir libxul | sed "s/-devel//"; fi)
 
-DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-ifneq (,$(filter $(DEB_HOST_ARCH_CPU),i386 i486 i586 i686))
-	ECLIPSE_BUILD_ARCH=x86
-endif
-ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),arm))
-	ECLIPSE_BUILD_ARCH=arm
-endif
-ifeq ($(DEB_HOST_ARCH_CPU),amd64)
-	ECLIPSE_BUILD_ARCH=x86_64
-endif
-ifneq (,$(findstring $(DEB_HOST_ARCH_CPU),mips))
-	ECLIPSE_BUILD_ARCH=$(DEB_HOST_ARCH)
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH_CPU),parisc parisc64))
-	ECLIPSE_BUILD_ARCH=PA_RISC
-endif
-ifeq ($(DEB_HOST_ARCH_CPU),powerpc)
-	ECLIPSE_BUILD_ARCH=ppc
-endif
-ifeq ($(ECLIPSE_BUILD_ARCH),)
-	ECLIPSE_BUILD_ARCH=$(DEB_HOST_ARCH_CPU)
-endif
-
-POMS := debian/poms/pom-equinox-osgi.xml debian/poms/pom-equinox-osgi.services.xml debian/poms/pom-equinox-osgi.util.xml
-
 override_dh_install:
-	# Turn all following commands into patches and send them to eclipse-build
-	# Remove some bad arguments that causes eclipse to fail
-	perl -i -ne 'print $$_ unless(m/^-XX/);' debian/tmp/etc/eclipse.ini
-	# Replace symlink with a copy - The absolute symlink causes eclipse to fail
-	# and some of the commands attempt to modify eclipse.ini.
-	rm -f debian/tmp/usr/lib/eclipse/eclipse.ini
-	cp -f debian/tmp/etc/eclipse.ini debian/tmp/usr/lib/eclipse/
 	# move images from /usr/lib to /usr/share
 	cd debian/tmp/usr && find lib/ -type f \( -name '*.bmp' -o -name '*.gif' -o -name '*.jpg' -o -name '*.png' \) | perl ../../../debian/extra/imagemv.pl
-	rm -fr $(DEBIAN_PACK_LIBDIR)/p2/
-	# Generate metadata and extract the swt libraries.
-	cd debian/tmp && java \
-			-cp $(DEBIAN_PACK_LIBDIR)/plugins/org.eclipse.equinox.launcher_$(LAUNCHERVERSION) \
-			org.eclipse.core.launcher.Main \
-			-application \
-			org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
-			-debug -consolelog \
-			-metadataRepository file:$(DEBIAN_PACK_LIBDIR)/metadata/ \
-			-artifactRepository file:$(DEBIAN_PACK_LIBDIR)/metadata/ \
-			-source $(DEBIAN_PACK_LIBDIR) \
-			-root "Eclipse Platform" \
-			-rootVersion $(UPSTREAM_VERSION) \
-			-flavor tooling \
-			-publishArtifacts \
-			-data $(CURDIR)/workspace \
-			-append \
-			-artifactRepositoryName "Eclipse Platform" \
-			-metadataRepositoryName "Eclipse Platform"
-	cd debian/tmp && java \
-			-Declipse.p2.data.area=file:$(DEBIAN_PACK_LIBDIR)/p2 \
-			-Declipse.p2.MD5Check=false \
-			-cp $(DEBIAN_PACK_LIBDIR)/plugins/org.eclipse.equinox.launcher_$(LAUNCHERVERSION) \
-			org.eclipse.core.launcher.Main \
-			-application \
-			org.eclipse.equinox.p2.director \
-			-debug -consolelog \
-			-flavor tooling \
-			-installIU "Eclipse Platform" \
-			-p2.os linux \
-			-p2.ws gtk \
-			-p2.arch $(ECLIPSE_BUILD_ARCH) \
-			-roaming \
-			-data $(CURDIR)/workspace \
-			-profile $(PROFILE_ID) \
-			-profileProperties org.eclipse.update.install.features=true \
-			-metadataRepository file:$(DEBIAN_PACK_LIBDIR)/metadata/ \
-			-artifactRepository file:$(DEBIAN_PACK_LIBDIR)/metadata/ \
-			-destination $(DEBIAN_PACK_LIBDIR) \
-			-bundlepool $(DEBIAN_PACK_LIBDIR)
-	cd debian/tmp && java -Dosgi.sharedConfiguration.area=$(DEBIAN_PACK_LIBDIR)/configuration \
-			-cp $(DEBIAN_PACK_LIBDIR)/plugins/org.eclipse.equinox.launcher_$(LAUNCHERVERSION) \
-			org.eclipse.core.launcher.Main \
-			-debug -consolelog \
-			-data $(CURDIR)/workspace \
-			-metadataRepository file:$(DEBIAN_PACK_LIBDIR)/metadata \
-			-artifactRepository file:$(DEBIAN_PACK_LIBDIR)/metadata \
-			-application org.eclipse.equinox.initializer.configInitializer \
-			-fileInitializer $(CURDIR)/debian/extract_patterns.txt
-	# Normalize the paths.
-	grep --exclude-from=debian/exclude_patterns.txt -l -I -r debian/tmp debian/tmp/ | xargs sed -i s@$(CURDIR)/debian/tmp@@g
-	TO_CORRECT=`echo $(CURDIR)/debian/tmp | sed s@/@_ at g` ; grep --exclude-from=debian/exclude_patterns.txt \
-	        -l -I -r debian_tmp debian/tmp/ | xargs sed -i s@$${TO_CORRECT}@@g
+	# repack some jars
+	debian/extra/repack_jars.sh debian/tmp/usr/lib/eclipse/plugins
 	# remove extra licence file
-	rm -f debian/tmp/usr/lib/eclipse/plugins/org.apache.ant_*/about_files/LICENSE.sax.txt
+	rm -f debian/tmp/usr/lib/eclipse/plugins/org.apache.ant_*/about_files/LICENSE.sax.txt \
+		debian/tmp/usr/lib/eclipse/epl-v10.html \
+		debian/tmp/usr/lib/eclipse/about_files/lgpl-v21.txt \
+		debian/tmp/usr/lib/eclipse/about_files/mpl-v11.txt \
+		debian/tmp/usr/lib/eclipse/about_files/webkit-bsd.txt \
+		debian/tmp/usr/lib/eclipse/about_files/pixman-licenses.txt \
+		debian/tmp/usr/lib/eclipse/about_files/about_cairo.html
 	# wrapper script for setting MOZILLA_FIVE_HOME
 	rm -f debian/tmp/usr/bin/eclipse
 	sed 's|@XULRUNNER_PATH@|$(XULRUNNER_PATH)|' debian/extra/eclipse > debian/tmp/usr/bin/eclipse
 	chmod 755 debian/tmp/usr/bin/eclipse
-	# Correct the profile in config.ini - else eclipse will refuse to open the update/install menus.
-	sed -i 's/SDKProfile/PlatformProfile/' debian/tmp/usr/lib/eclipse/configuration/config.ini
 	# Set a saner default file limit than "unlimited".
 	echo 'osgi.bundlefile.limit=100' >> debian/tmp/usr/lib/eclipse/configuration/config.ini
 	# Remove the unnecessary configuration data (taken from Fedora spec)
-	rm -r $(DEBIAN_PACK_LIBDIR)/configuration/org.eclipse.core.runtime
-	rm -r $(DEBIAN_PACK_LIBDIR)/configuration/org.eclipse.equinox.app
-	rm -rf $(DEBIAN_PACK_LIBDIR)/configuration/*.log
-	find $(DEBIAN_PACK_LIBDIR)/configuration -depth -type d -name data -exec rm -rf {} \;
-	find $(DEBIAN_PACK_LIBDIR) -depth -type d -empty -delete
+	find debian/tmp/usr/lib/eclipse -depth -type d -empty -delete
 	# fix permissions of scripts
 	chmod +x debian/tmp/usr/lib/eclipse/plugins/org.eclipse.pde.build_*/templates/package-build/*.sh
-	# Regenerate the eclipse.ini symlink.
-	ln -sf /etc/eclipse.ini debian/tmp/usr/lib/eclipse/eclipse.ini
 	@echo "*** generate-pdebuild-scripts ***"
 	mkdir -p `dirname $(COPY_PLATFORM_INSTALL)` `dirname $(PDEBUILD_INSTALL)`
 	install -m 755 pdebuild/eclipse-copy-platform.sh $(COPY_PLATFORM_INSTALL)
 	( \
-	  cd $(DEBIAN_PACK_LIBDIR) ; \
+	  cd debian/tmp/usr/lib/eclipse; \
 	  ls -d * | egrep -v '^(plugins|features|about_files|dropins|buildscripts)$$' ; \
 	  ls -d * plugins/* features/* ; \
 	) | sed -e's,^\(.*\),[ ! -e \1 ] \&\& ln -s $$eclipse/\1 \1,' >> $(COPY_PLATFORM_INSTALL)
 	sed -e "s/@PDEBUILDVERSION@/$(PDEBUILDVERSION)/g" -e "s:@COPY_PLATFORM@:$(COPY_PLATFORM):g" < pdebuild/eclipse-pdebuild.sh > $(PDEBUILD_INSTALL)
 	chmod a+x $(PDEBUILD_INSTALL)
-	dh_install
-	# Fix some weird exec permission
-	chmod a-x debian/eclipse-rcp/usr/lib/eclipse/about_files/IJG_README
+	dh_install --list-missing
 	$(if $(wildcard debian/tmp/usr/lib/eclipse/plugins/org.eclipse.core.net.linux.*.jar),dh_install -peclipse-platform debian/tmp/usr/lib/eclipse/plugins/org.eclipse.core.net.linux.*.jar /usr/lib/eclipse/plugins)
 	$(if $(wildcard debian/tmp/usr/lib/eclipse/plugins/org.eclipse.update.core.linux*.jar),dh_install -peclipse-platform debian/tmp/usr/lib/eclipse/plugins/org.eclipse.update.core.linux*.jar /usr/lib/eclipse/plugins)
+	mkdir "$(SWT_SO_PATH)"
+	find $(JNI_SO_PATH) -name 'libswt*.so' -exec mv {} "$(SWT_SO_PATH)" \;
+	find $(JNI_SO_PATH) -depth -type d -empty -delete
 	# Check if we are doing a -B build
 	[ ! -d debian/eclipse-platform-data ] || debian/rules override_dh_install_indep
 
@@ -214,6 +108,7 @@ override_dh_install:
 override_dh_install_indep:
 	# mv arch-indep plugins from lib to share
 	cd debian/eclipse-platform-data/usr && find lib/ -type f -path '*lib/eclipse/plugins/*' | perl ../../../debian/extra/imagemv.pl
+	cd debian/eclipse-plugin-cvs/usr && find lib/ -type f -path '*lib/eclipse/*' | perl ../../../debian/extra/imagemv.pl
 	# Expose osgi jars
 	mkdir -p debian/libequinox-osgi-java/usr/share/java
 	cd debian/libequinox-osgi-java/usr/share/java && \
@@ -222,7 +117,7 @@ override_dh_install_indep:
 		ln -s $$FILE `basename $$FILE | sed 's/_.*$$//g'`.jar ; \
 	  done
 	# Install poms and jars into Maven repo
-	 for pom in $(POMS); do \
+	 for pom in $(wildcard debian/poms/*.xml); do \
 		mh_installpom -v -plibequinox-osgi-java $$pom; \
 		SUFFIX=`basename $$pom .xml | sed 's/pom-equinox-//'`; \
 		mh_installjar -v -plibequinox-osgi-java  $$pom debian/libequinox-osgi-java/usr/share/java/org.eclipse.$$SUFFIX.jar; \
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..4aceb10
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+unapply-patches
diff --git a/debian/watch b/debian/watch
index e946044..82b1a41 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
 version=3
 # http://download.eclipse.org/technology/linuxtools/eclipse-build/
-http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/technology/linuxtools/eclipse-build/eclipse-([\d\.]*)-src\.tar\.bz2
+ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/technology/linuxtools/eclipse-build/3.6.x_Helios/eclipse-([\d\.]*)-src\.tar\.bz2
diff --git a/dependencies.properties b/dependencies.properties
index 110e638..7b91808 100644
--- a/dependencies.properties
+++ b/dependencies.properties
@@ -1,17 +1,15 @@
-com.ibm.icu_4.0.1.v20090822.jar=/usr/lib/eclipse/plugins/com.ibm.icu_4.0.1.v20090415.jar:/usr/lib64/eclipse/plugins/com.ibm.icu_4.0.1.v20090415.jar::/usr/share/java/com.ibm.icu.jar
+com.ibm.icu_4.2.1.v20100412.jar=/usr/lib/eclipse/plugins/com.ibm.icu_4.2.1.v20100412.jar:/usr/lib64/eclipse/plugins/com.ibm.icu_4.2.1.v20100412.jar:/usr/share/java/com.ibm.icu-4.2.jar:/usr/share/java/com.ibm.icu.jar
 com.jcraft.jsch_0.1.41.v200903070017.jar=/usr/share/java/jsch.jar
-javax.servlet_2.5.0.v200806031605.jar=/usr/share/java/tomcat6-servlet-2.5-api.jar:/usr/share/java/servlet-api-2.5.jar
+javax.servlet_2.5.0.v200910301333.jar=/usr/share/java/tomcat6-servlet-2.5-api.jar:/usr/share/java/servlet-api-2.5.jar
 javax.servlet.jsp_2.0.0.v200806031607.jar=/usr/share/java/tomcat5-jsp-2.0-api.jar:/usr/share/java/jsp-api-2.0.jar
 org.apache.commons.codec_1.3.0.v20080530-1600.jar=/usr/share/java/commons-codec.jar
 org.apache.commons.el_1.0.0.v200806031608.jar=/usr/share/java/commons-el.jar
-org.apache.commons.httpclient_3.1.0.v20080605-1935.jar=/usr/share/java/commons-httpclient.jar
-org.apache.commons.logging_1.0.4.v200904062259.jar=/usr/share/java/commons-logging.jar
+org.apache.commons.httpclient_3.1.0.v201005080502.jar=/usr/share/java/commons-httpclient.jar
+org.apache.commons.logging_1.0.4.v201005080501.jar=/usr/share/java/commons-logging.jar
 org.apache.jasper_5.5.17.v200903231320.jar=/usr/share/eclipse/plugins/org.apache.jasper_5.5.17.v200706111724.jar:/usr/share/java/jasper-5.5.26.jar
-org.apache.lucene_1.9.1.v20080530-1600.jar=/usr/share/java/lucene.jar:/usr/share/java/lucene-core.jar
-org.apache.lucene.analysis_1.9.1.v20080530-1600.jar=/usr/share/java/lucene-contrib/lucene-analyzers.jar:/usr/share/java/lucene-analyzers.jar
-org.hamcrest.core_1.1.0.v20090501071000.jar=/usr/share/java/hamcrest/core.jar:/usr/share/java/hamcrest-core.jar
-org.mortbay.jetty.server_6.1.15.v200905151201.jar=/usr/share/java/jetty/jetty-6.1.20.jar:/usr/share/java/jetty/jetty.jar:/usr/share/java/jetty.jar
-org.mortbay.jetty.util_6.1.15.v200905182336.jar=/usr/share/java/jetty/jetty-util-6.1.20.jar:/usr/share/java/jetty/jetty-util.jar:/usr/share/java/jetty-util.jar
-org.objectweb.asm_3.1.0.v200803061910.jar=/usr/share/java/objectweb-asm/asm-all.jar:/usr/share/java/asm3-all.jar
-org.sat4j.core_2.1.1.v20090825.jar=/usr/share/java/org.sat4j.core.jar:/usr/share/sat4j/org.sat4j.core.jar
-org.sat4j.pb_2.1.1.v20090825.jar=/usr/share/java/org.sat4j.pb.jar:/usr/share/sat4j/org.sat4j.pb.jar
+org.apache.lucene_1.9.1.v20100518-1140.jar=/usr/share/java/lucene.jar:/usr/share/java/lucene-core.jar
+org.apache.lucene.analysis_1.9.1.v20100518-1140.jar=/usr/share/java/lucene-contrib/lucene-analyzers.jar:/usr/share/java/lucene-analyzers.jar
+org.mortbay.jetty.util_6.1.23.v201004211559.jar=/usr/share/java/jetty/jetty-util.jar:/usr/share/java/jetty-util.jar
+org.mortbay.jetty.server_6.1.23.v201004211559.jar=/usr/share/java/jetty/jetty.jar:/usr/share/java/jetty.jar
+org.sat4j.core_2.2.0.v20100429.jar=/usr/share/java/org.sat4j.core.jar:/usr/share/sat4j/org.sat4j.core.jar
+org.sat4j.pb_2.2.0.v20100429.jar=/usr/share/java/org.sat4j.pb.jar:/usr/share/sat4j/org.sat4j.pb.jar
diff --git a/dependencyManifests/com.ibm.icu_4.0.1.v20090822.jar/META-INF/MANIFEST.MF b/dependencyManifests/com.ibm.icu_4.0.1.v20090822.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index 15b509d..0000000
--- a/dependencyManifests/com.ibm.icu_4.0.1.v20090822.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3892 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
-Eclipse-LazyStart: true
-Bundle-SymbolicName: com.ibm.icu; singleton:=true
-Export-Package: com.ibm.icu.lang;base=true;full=true;version="4.0.1.1"
- ,com.ibm.icu.math;base=true;full=true;version="4.0.1.1",com.ibm.icu.t
- ext;base=true;full=true;version="4.0.1.1",com.ibm.icu.util;base=true;
- full=true;version="4.0.1.1",com.ibm.icu.impl;x-internal:=true,com.ibm
- .icu.impl.data;x-internal:=true,com.ibm.icu.impl.data.icudt40b;x-inte
- rnal:=true,com.ibm.icu.impl.data.icudt40b.brkitr;x-internal:=true,com
- .ibm.icu.impl.data.icudt40b.coll;x-internal:=true,com.ibm.icu.impl.da
- ta.icudt40b.rbnf;x-internal:=true,com.ibm.icu.impl.data.icudt40b.tran
- slit;x-internal:=true
-Bundle-Version: 4.0.1.v20090822
-Bundle-ClassPath: icu-jse4.jar,icu-data.jar,.
-Bundle-Vendor: %providerName
-Bundle-Name: %pluginName
-Eclipse-ExtensibleAPI: true
-Bundle-Copyright: Licensed Materials - Property of IBM (C) Copyright I
- BM Corp. 2000, 2009. All Rights Reserved. IBM is a registered tradema
- rk of IBM Corp.
-Bundle-ManifestVersion: 2
-
-Name: com/ibm/icu/text/EscapeTransliterator.class
-SHA1-Digest: YXPxHZn0uCu6crcG4IqVG3oVBnU=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_GB.res
-SHA1-Digest: Y/rEzWG/vycxnIidM2WsfPrCYr0=
-
-Name: com/ibm/icu/text/NumberFormat$SimpleNumberFormatFactory.class
-SHA1-Digest: uKc9wL0J3OqcoHQsAtHgB542Sqs=
-
-Name: com/ibm/icu/impl/duration/impl/Utils$ChineseDigits.class
-SHA1-Digest: xbghwuZOvqj0GdC1C/PXv1XcH0I=
-
-Name: com/ibm/icu/impl/data/icudt40b/hy.res
-SHA1-Digest: BGju5e6g1+02kk7uLRk0YrqzU48=
-
-Name: com/ibm/icu/text/UnicodeCompressor.class
-SHA1-Digest: MamRaHWdqY/NzE+Pr/pRuFcw/k4=
-
-Name: com/ibm/icu/util/TimeZoneTransition.class
-SHA1-Digest: nsjOT2dDaZctakgY5wlp1Cn+ixY=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_DO.res
-SHA1-Digest: VTS63fHAc8/xW+f7EEjrV+OwqCE=
-
-Name: com/ibm/icu/impl/data/icudt40b/mt_MT.res
-SHA1-Digest: oYZDwDx16wqVnD0Sw7JhmCIzenU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kn_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/UCharacterName$AlgorithmName.class
-SHA1-Digest: PYl6PNBKDsuWCPtMTBAej3qiWEs=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_fr_FR.class
-SHA1-Digest: kukMBLawmMI5NEK5Rr8YN8hdz1g=
-
-Name: com/ibm/icu/impl/duration/impl/Utils.class
-SHA1-Digest: gf7gRgQu1u5OgPdlHnExgWFX9Bc=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_de.class
-SHA1-Digest: omXX4XRR9Iqy0R0YPtSZfqKU0k4=
-
-Name: com/ibm/icu/text/AbsoluteValueSubstitution.class
-SHA1-Digest: WpmUOxKayx6Trx3wFMgRfHy7twY=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Arab.res
-SHA1-Digest: LaQgmbvgG3SgMS8YE4pvj0ykiwc=
-
-Name: com/ibm/icu/text/RBBIDataWrapper$TrieFoldingFunc.class
-SHA1-Digest: Qf62ZKq9AjB9w31sh/QS1De+vpI=
-
-Name: com/ibm/icu/text/Normalizer$NFDMode.class
-SHA1-Digest: xg6Q8tYy7KxwlfYm+Grf+3XV3fM=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceInt.class
-SHA1-Digest: PK/s8z+DVKB6V/yZ7axygXLKwrs=
-
-Name: com/ibm/icu/util/CopticCalendar.class
-SHA1-Digest: oRNvFtdVo3HZ2IOcg2AjOGhm9I8=
-
-Name: com/ibm/icu/impl/data/icudt40b/eu.res
-SHA1-Digest: eL49MhUVLzq2utgE/XI4nsm5mq4=
-
-Name: com/ibm/icu/text/RuleBasedBreakIterator.class
-SHA1-Digest: lmsH55Jx5/nlzIpCryhdcfXJWEQ=
-
-Name: com/ibm/icu/text/CharsetRecog_2022.class
-SHA1-Digest: F0nf0CFBMOFv2vrd0mvZ7OY43mY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hant_TW.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EUnitVariant.class
-SHA1-Digest: F2a3jCGNTvPEMDmL8BeOOTEQ1iI=
-
-Name: com/ibm/icu/lang/UCharacter$StringContextIterator.class
-SHA1-Digest: SfI2q78Bjfp4JRfgusUGWSlOBtY=
-
-Name: com/ibm/icu/text/NumeratorSubstitution.class
-SHA1-Digest: OUN0jYaSs1EVmpOIzPyyJT64SqI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_CN.res
-SHA1-Digest: OqOcERNgY90GdftreFDuBO3TG1M=
-
-Name: com/ibm/icu/text/DecimalFormat.class
-SHA1-Digest: Y+T+MScjh5sGiyYGCDha0bsDr0g=
-
-Name: com/ibm/icu/text/RuleBasedTransliterator.class
-SHA1-Digest: vMJr4mB8fbIrPGdPvb7xWF/d03M=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/uk.res
-SHA1-Digest: bgj9AbomA2oEx1HurgPTEK5JIF4=
-
-Name: com/ibm/icu/text/DigitList.class
-SHA1-Digest: DbK/2LnHbTcnTDiY4krPxVDuMKw=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_VE.res
-SHA1-Digest: 13S2V+eGrWYVTEFdRmMWXvWdSME=
-
-Name: com/ibm/icu/util/Holiday.class
-SHA1-Digest: lI3HeWyJdOjBOZRCfPDxmf+FDF4=
-
-Name: com/ibm/icu/lang/UCharacter$EastAsianWidth.class
-SHA1-Digest: BsCL841cISRA8tJI4hy44L/8/XI=
-
-Name: com/ibm/icu/impl/duration/OneOrTwoUnitBuilder.class
-SHA1-Digest: 7tXupKMbK43D/WZFBFs3uAn18IY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/he_IL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ru.res
-SHA1-Digest: NfKgCBMLYhB23t1e+u+cH3rwJYo=
-
-Name: com/ibm/icu/text/Bidi.class
-SHA1-Digest: 6nudWWFpHh/Y5CYpdYhDR2sO+U8=
-
-Name: com/ibm/icu/util/CurrencyServiceShim$CFService.class
-SHA1-Digest: rBBK+/s+rspq0n4MHaBKyH6qgeY=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_US.res
-SHA1-Digest: Klt2KXgTQyPMIrxY7qzbAA2M4f4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de__PHONEBOOK.res
-SHA1-Digest: IwSg0o/LpBjuSIHpx4oTw6trYHc=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fa.res
-SHA1-Digest: v0mqgFY3h0JhtIKc3kirX4sMIZM=
-
-Name: com/ibm/icu/impl/data/icudt40b/ro_RO.res
-SHA1-Digest: xs+YdOUs++AkcZ6MKq8ODtsRIyk=
-
-Name: com/ibm/icu/text/BreakIterator.class
-SHA1-Digest: 1McPZer5dsYHVvftuxv1mulZJCQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/kl.res
-SHA1-Digest: ov+gJHD2izYJ3yylp8U8OHPDJtc=
-
-Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieNodeFlags.class
-SHA1-Digest: NHSMsJK1/XaK+qxiN89ct8gnfeM=
-
-Name: com/ibm/icu/impl/TextTrieMap$ResultHandler.class
-SHA1-Digest: NfDOnUJ6MEMaHwTl+N0ovE9ddws=
-
-Name: com/ibm/icu/impl/data/icudt40b/sv.res
-SHA1-Digest: PvkIwOQm76C/IYGJY3P3GKk1L3Q=
-
-Name: com/ibm/icu/text/TransliteratorParser$ParseData.class
-SHA1-Digest: Dn7Je/kb/X250NHCsSx5KHbvA44=
-
-Name: com/ibm/icu/impl/data/icudt40b/si_LK.res
-SHA1-Digest: 4w4/q4Vm6hUJwfkL2AzOCaDdt5s=
-
-Name: com/ibm/icu/impl/data/icudt40b/translit/en.res
-SHA1-Digest: lOD2KZjZY+4pQnEyWvgj0DI4RDk=
-
-Name: com/ibm/icu/impl/data/icudt40b/el_CY.res
-SHA1-Digest: BCpdqE5UzzLT4apnKYBSTXHHPyU=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/title.brk
-SHA1-Digest: 0ooeJ21Wpz+DxFZVd1B/6WH7hSM=
-
-Name: com/ibm/icu/text/BidiRun.class
-SHA1-Digest: avCgX+jnUdUaVQw1eu8cbNqvVm0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_UY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/lang/UScript.class
-SHA1-Digest: 3w16iRUxHmnyHUVzmLB3ZgSIR6I=
-
-Name: com/ibm/icu/impl/duration/impl/ResourceBasedPeriodFormatterDataS
- ervice.class
-SHA1-Digest: JqOOr2sq7TcizCQJs9oL4g6So4I=
-
-Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022CN.class
-SHA1-Digest: DbHd1CyG/Msa9UPMr2wH2DF7trc=
-
-Name: com/ibm/icu/impl/data/icudt40b/eu_ES.res
-SHA1-Digest: dvuDzjkHsk+GlTVTsX/W9powonA=
-
-Name: com/ibm/icu/impl/data/icudt40b/lt_LT.res
-SHA1-Digest: HBGgtK6uBX5mTD4/2lLLEcX1OWQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sq.res
-SHA1-Digest: yg6PoC7Ih5KnXAf9PgcomVxzuFs=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_NZ.res
-SHA1-Digest: asbvdLFHl0VEfKl0D+VMT1M477I=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn_CS.res
-SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
-
-Name: com/ibm/icu/text/UppercaseTransliterator$1.class
-SHA1-Digest: G0JYUB6wT8GAYj5owWpsz9/Ftw8=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ETimeLimit.class
-SHA1-Digest: 4ZMtPxvIotXIqFOqbPO7ya0XlMY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/root.res
-SHA1-Digest: EXKuGXlII059gx+N9dV0SrjAQ2M=
-
-Name: com/ibm/icu/text/CharsetDetector.class
-SHA1-Digest: 6d7SpFXdU5R2xw3rjigKaFsKSRo=
-
-Name: com/ibm/icu/impl/URLHandler.class
-SHA1-Digest: vvqGkYkIa4xQWAeWynhhHrqpw10=
-
-Name: com/ibm/icu/text/CharsetRecog_UTF8.class
-SHA1-Digest: e0rv0rA2OtgVcjPnmTwV8XCoHvY=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_sv.class
-SHA1-Digest: WT/YYphyMHOOAy4Gk0pFCHKWzH4=
-
-Name: com/ibm/icu/lang/UCharacterNameIterator.class
-SHA1-Digest: UOMCEcLCGIcaMeDNVQfP5K8B03k=
-
-Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieVerticalNode.class
-SHA1-Digest: FlLd/KEtCwedIf/Im9rWvJ8pkmE=
-
-Name: com/ibm/icu/text/BidiClassifier.class
-SHA1-Digest: qHIgRlSezo4EHOqco6N3sYKCgt8=
-
-Name: com/ibm/icu/impl/ICULocaleService.class
-SHA1-Digest: wgOreXadv+Y6G64zD6iDwr3d/MY=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_AT.res
-SHA1-Digest: 0OcWAa3F8XxEY0S7a0iV7n4mKfU=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_CA.res
-SHA1-Digest: 3NyuTYfnknvbFer24TMUqQIcpaI=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/res_index.res
-SHA1-Digest: bhLVVA75go3p0Fnwhg4jF0y5ASM=
-
-Name: com/ibm/icu/util/DateRule.class
-SHA1-Digest: 9ppWbONa89XFnzd2NUTKAtIj7gs=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/en_US.res
-SHA1-Digest: +/LVRKi4A8LFr24NwK7dKO0oWpw=
-
-Name: com/ibm/icu/impl/data/icudt40b/te_IN.res
-SHA1-Digest: YLAhZFEWvJg6CjuXX81pCN9WhP0=
-
-Name: com/ibm/icu/text/RemoveTransliterator.class
-SHA1-Digest: otKJ/1nx4yCw6WLjSuLHwvCL2bc=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hans_CN.res
-SHA1-Digest: nLXdUqHHN3xyhjoPzTXzbjEHlRI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/tr.res
-SHA1-Digest: 9AUsl+FwZSIWXtFeX+kWYI9bx8E=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_BE.res
-SHA1-Digest: wdwrBMP4MQ0Cyz05UxDJ878VlR4=
-
-Name: com/ibm/icu/impl/data/icudt40b/ii.res
-SHA1-Digest: 38Wgc6QFfzJ05JQ9RbWm3hGmZfM=
-
-Name: com/ibm/icu/text/BreakTransliterator.class
-SHA1-Digest: 5j+5ezoVKgpv+cDfcyQp8CkSXHM=
-
-Name: com/ibm/icu/impl/UtilityExtensions.class
-SHA1-Digest: QHfN5QTMSujGJ608wEP4hPhWEF0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_VI.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/de.res
-SHA1-Digest: PMT1Ho2h02Uu/jEOVFQ3cfxH0M4=
-
-Name: com/ibm/icu/lang/UCharacterEnums$ECharacterDirection.class
-SHA1-Digest: H8qH9/fT9hc7M4JiYaHxEZrAaKY=
-
-Name: com/ibm/icu/impl/data/icudt40b/ne_NP.res
-SHA1-Digest: TSuWet290ynKXar0ahPzsCpWO3s=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/pt.res
-SHA1-Digest: THKx2sUj1ro8pwg1cDnF8V+ttAk=
-
-Name: com/ibm/icu/impl/ICUData.class
-SHA1-Digest: 3erV0Mc2+xO14bQ2k81EbRknNRw=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_US.res
-SHA1-Digest: 1PhOcTq/Q4qEPJBl0NIMANLO2sI=
-
-Name: com/ibm/icu/impl/data/icudt40b/et.res
-SHA1-Digest: tHznsmmWKkGRh0rbQzh8/GiVVLE=
-
-Name: com/ibm/icu/text/DateIntervalFormat$BestMatchInfo.class
-SHA1-Digest: f02Yk/Y/frG7aYB8od7vRAkfdic=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_SV.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/be_BY.res
-SHA1-Digest: xs+YdOUs++AkcZ6MKq8ODtsRIyk=
-
-Name: com/ibm/icu/impl/data/icudt40b/vi.res
-SHA1-Digest: Rq+HjS/4VeIKwQVLwLOyX/zF38o=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr_BE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/Normalizer$IsNextBoundary.class
-SHA1-Digest: CKZMxdzbwLro2Z+QmdJ/ciVY2PA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/id.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_SD.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_CR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/mk_MK.res
-SHA1-Digest: QxFTOhMYYws4DkDtnJOJY4I7rwo=
-
-Name: com/ibm/icu/impl/NormalizerImpl$CmpEquivLevel.class
-SHA1-Digest: dQTjAcpSF2DECctfvlbSo0KO1aU=
-
-Name: com/ibm/icu/impl/data/icudt40b/no.res
-SHA1-Digest: QKT2L/mn+LtpRofMA4whD6vFbe0=
-
-Name: com/ibm/icu/impl/data/icudt40b/nl_BE.res
-SHA1-Digest: Uv/1NZ20FGkrtib5kBiXXWWpzGA=
-
-Name: com/ibm/icu/text/NameUnicodeTransliterator$1.class
-SHA1-Digest: DpWM8KnhkmbxGZXZFeHCngsH69o=
-
-Name: com/ibm/icu/impl/data/icudt40b/ms_MY.res
-SHA1-Digest: XY7X4+98IChY345/6PZ+SzgR+h0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_TW_STROKE.res
-SHA1-Digest: nTng09tRvciGRT5csduFwNCuFMw=
-
-Name: com/ibm/icu/util/Measure.class
-SHA1-Digest: tdThka2MjzjdA6DePYmqlKSNMiE=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ETimeDirection.class
-SHA1-Digest: N9UUzovPmIuRsQk9R1s/tDmtyIs=
-
-Name: com/ibm/icu/impl/Grego.class
-SHA1-Digest: zWvAJJGSE83MwTp03wOwpTHerdM=
-
-Name: com/ibm/icu/impl/duration/PeriodBuilder.class
-SHA1-Digest: dV/Szp96Rd+0gIGLoutRicRFViU=
-
-Name: com/ibm/icu/impl/UCharacterNameChoice.class
-SHA1-Digest: mMAuTd72u2gcqx8i1UYo0FKAc9w=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/en_GB.res
-SHA1-Digest: 0PEMXRPZyYz8u0+Z29Hr4fcFvwA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/eo.res
-SHA1-Digest: n73sCbZvdJe2tD3O//vC5HPvVf8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/it.res
-SHA1-Digest: h1orvsveYL/exf9D+HtZT04HgZU=
-
-Name: com/ibm/icu/util/RangeDateRule.class
-SHA1-Digest: msIx2SRP5ec64ZXKKDuwMKIaJuY=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_MH.res
-SHA1-Digest: nLXdUqHHN3xyhjoPzTXzbjEHlRI=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn_BA.res
-SHA1-Digest: eihRC4jiYXMl42/hqbCUD0w15Io=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_hu.class
-SHA1-Digest: NwEc3xUoDo5FyVMYu5aN6UYFGKU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_PR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_CA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Cyrl_RS.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/SimpleDateFormat$PatternItem.class
-SHA1-Digest: Nm0O5B0Ys2gZHot+kbOrb433v04=
-
-Name: com/ibm/icu/text/CollationRuleParser$IndirectBoundaries.class
-SHA1-Digest: 0AbZRXsqPif5tIO0chF3JJ4YPDo=
-
-Name: com/ibm/icu/impl/UCaseProps.class
-SHA1-Digest: 9SpqGe4cR8whuq7T5M6Y9f5mqcw=
-
-Name: com/ibm/icu/impl/NormalizerImpl$DecomposeArgs.class
-SHA1-Digest: hDKbUGlZBenhxVha4ofAGKYcZvk=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_en.class
-SHA1-Digest: wLcQHijwQPcw+2QLT5p2j7vrFmU=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EGender.class
-SHA1-Digest: J/zw3EDVDp2DIUnLU7Ns1Auk8+s=
-
-Name: com/ibm/icu/text/EscapeTransliterator$1.class
-SHA1-Digest: BmF+vui9JoLsiiWA4fkM9uw0XGw=
-
-Name: com/ibm/icu/impl/data/icudt40b/ca.res
-SHA1-Digest: S55Mq+2aqFxECfyOtvpMYLDvhH0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ro.res
-SHA1-Digest: 3BtXO/RXYt1psjx81ueztOWA6FA=
-
-Name: com/ibm/icu/impl/data/icudt40b/kk.res
-SHA1-Digest: x+DtzXID3TyTy7DtFnyS09YCz6s=
-
-Name: com/ibm/icu/impl/RelativeDateFormat$URelativeString.class
-SHA1-Digest: 4JcRrl0CkaM/+e6/P6hm+woduY0=
-
-Name: com/ibm/icu/util/TaiwanCalendar.class
-SHA1-Digest: seXD8m1jm3Pi1ii97cHCx0DVb5g=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_5.class
-SHA1-Digest: 0gO2o0KFjCbB/E3Z9fJlGfQz2x0=
-
-Name: com/ibm/icu/impl/data/icudt40b/gv.res
-SHA1-Digest: KJ1MShzbYw1JSDs7/Ps3JWZsTtw=
-
-Name: com/ibm/icu/text/NFSubstitution.class
-SHA1-Digest: Tf3idfc3xXqihVo1OfmhIdhv45U=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa.res
-SHA1-Digest: CAMv03sdS1E5K/NQePZc/aBtMOM=
-
-Name: com/ibm/icu/util/ChineseCalendar.class
-SHA1-Digest: WQWKdDs3f7TMMA12mRdX2FpNkx8=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/char.brk
-SHA1-Digest: /c7WY+FC8T8r3HD0vuhOrgbkH+0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_US_POSIX.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$Horizon.class
-SHA1-Digest: tqn4oqVKoLNURBeQA94T77HmV80=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_CL.res
-SHA1-Digest: 0mdvmv9TWpuCQTnVkTOh/73mcoY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ga.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_QA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/th_TH.res
-SHA1-Digest: HAxWzSIhkVEnB+Bb6jNjek4iDe4=
-
-Name: com/ibm/icu/impl/data/icudt40b/ucase.icu
-SHA1-Digest: NbsONvF25QGxx3Uj+0gDMZjJwUs=
-
-Name: com/ibm/icu/impl/ICUService$CacheEntry.class
-SHA1-Digest: lZ0Rre/AW1WALU0phN0pn/Cb1BI=
-
-Name: com/ibm/icu/util/Calendar.class
-SHA1-Digest: NYChxfD07QN9MemQoKirXKNJrAQ=
-
-Name: com/ibm/icu/impl/ResourceBundleWrapper.class
-SHA1-Digest: rIKZx1wCuiXfe5QkMHVctB9728E=
-
-Name: com/ibm/icu/impl/data/icudt40b/fa_IR.res
-SHA1-Digest: GDvB8ZdP/IQ8W6qc+qhBz/LlIy8=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_windows_1251.cla
- ss
-SHA1-Digest: lone8O0GaPuisPd3AJ0lV/ChLvE=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_BZ.res
-SHA1-Digest: rXFHY5xj1+UWaomRK5ULjmBHWys=
-
-Name: com/ibm/icu/impl/data/icudt40b/ca_ES.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ta.res
-SHA1-Digest: MT55z9WtL0nDFq9JQkpm0m28Yuk=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_IN.res
-SHA1-Digest: aABsNcBcPMaMcFhBGb0doQYhb68=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_iw_IL.class
-SHA1-Digest: YUizshYwzLdXoy05Q8wxj4mQut0=
-
-Name: com/ibm/icu/impl/NormalizerImpl$PrevArgs.class
-SHA1-Digest: cOomgZl+/yp6SYjdUoYbL7JbQk8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/bn_IN.res
-SHA1-Digest: 4w4/q4Vm6hUJwfkL2AzOCaDdt5s=
-
-Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022JP.class
-SHA1-Digest: w2BjrE208VvJdVSAPaTr1kLTqvA=
-
-Name: com/ibm/icu/lang/UScriptRun$ParenStackEntry.class
-SHA1-Digest: hjJuPZ/fOXQd2FMPfdIN4fRyuUI=
-
-Name: com/ibm/icu/text/FractionalPartSubstitution.class
-SHA1-Digest: SHuTvRh+jN9/cyAEmbfI0sD9mOE=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/th.res
-SHA1-Digest: 2ARfBe8Mrgi7b+cH9gypW2yvxdM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hu_HU.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_es.class
-SHA1-Digest: 3SErfzPsT82mvGwkW2uM2+Y+V3g=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pl.res
-SHA1-Digest: 1kUQi2mkbnCN3ouFx7RpKsr3Vng=
-
-Name: com/ibm/icu/text/NumberFormatServiceShim.class
-SHA1-Digest: //FGNMPaFta9ctprIx22Q+oJjbE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/el_GR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/EscapeTransliterator$6.class
-SHA1-Digest: PFEkFXg8eBaBKVeFY55vhS2mLAM=
-
-Name: com/ibm/icu/text/RuleBasedCollator$UCAConstants.class
-SHA1-Digest: s5CcIsUVxym6jbrYS095b8nqJmI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ru_UA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUNotifier.class
-SHA1-Digest: lglpVgoxE78xm+dGjGgI1+vH8Go=
-
-Name: com/ibm/icu/impl/data/icudt40b/so_DJ.res
-SHA1-Digest: ccZAL11xhV6f11BS1f4Ei9YBzAY=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$AliasEntry.class
-SHA1-Digest: VVsoRHCiofSdXgz5txKcKInbG98=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hr.res
-SHA1-Digest: INGN8q/AMzMLppp+s1z88+UOap0=
-
-Name: com/ibm/icu/text/UnicodeSet$VersionFilter.class
-SHA1-Digest: 0ArZGJl0qm4EKupsvo7rU4tnzYM=
-
-Name: com/ibm/icu/impl/data/icudt40b/es.res
-SHA1-Digest: BJ+Z0SNSmIWBPXiXDj4nGv0kZoU=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_PK.res
-SHA1-Digest: 6skKvi2KWpVVsQxV081RnugDdKc=
-
-Name: com/ibm/icu/impl/data/icudt40b/likelySubtags.res
-SHA1-Digest: g9aZkbt30UoH9qIeVFoHpIOaSiY=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$3.class
-SHA1-Digest: 0k60My0lEzUBHKhLLnROQxfwBNQ=
-
-Name: com/ibm/icu/impl/LocaleUtility.class
-SHA1-Digest: BX7DKr4qa3fDsh7bKxjRqrIdN1k=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_YE.res
-SHA1-Digest: 72/6O1GCmkBq0mFaKRXdoZO8kew=
-
-Name: com/ibm/icu/text/BreakIteratorFactory$1$RBBreakIteratorFactory.c
- lass
-SHA1-Digest: +2C+74R/GkAukYK6BWok4d5+X18=
-
-Name: com/ibm/icu/util/UResourceBundleIterator.class
-SHA1-Digest: IrH/7eAb+2WBO5XParE13Y5/z+k=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_MX.res
-SHA1-Digest: 6URG5rdiOWGAS8UB8FAmnUg+TOQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sk_SK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/hr_HR.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/impl/data/icudt40b/lv_LV.res
-SHA1-Digest: 9ayr7p0RXC2YnnTNoYNovRzaAzQ=
-
-Name: com/ibm/icu/text/RBBIRuleScanner$RBBIRuleChar.class
-SHA1-Digest: kC+Xrx41egV8Kvu+0Tj5IkbGsA0=
-
-Name: com/ibm/icu/text/CollatorServiceShim.class
-SHA1-Digest: Q4ZG7PCzdW1h8iOCWNiPzdnXP0o=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ga_IE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle.class
-SHA1-Digest: eped8S2PIpsw0xNnRZ5/97cXdR4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ur.res
-SHA1-Digest: aqoZIWxVmnfgzAYieJuw2YEikKo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_PA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/Calendar$FormatConfiguration.class
-SHA1-Digest: NQmw7pOFcfrZYbg+lFgMBSoIhRM=
-
-Name: com/ibm/icu/impl/data/icudt40b/nn.res
-SHA1-Digest: uAKgUSIOfLvcI4lE5+zVgfI62uo=
-
-Name: com/ibm/icu/impl/data/icudt40b/ka_GE.res
-SHA1-Digest: TfPr1TNXJSo6eXzJAS349QAbKHY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en.res
-SHA1-Digest: h1orvsveYL/exf9D+HtZT04HgZU=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_NI.res
-SHA1-Digest: VTS63fHAc8/xW+f7EEjrV+OwqCE=
-
-Name: com/ibm/icu/text/TransliteratorRegistry.class
-SHA1-Digest: ok9Ndai/dUJKojAW993dNSufsO8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/is.res
-SHA1-Digest: alpToQgNI6raQVYTkZ5zevrwlYM=
-
-Name: com/ibm/icu/impl/duration/impl/XMLRecordWriter.class
-SHA1-Digest: PWYSZ4u8g1IfpbLoDoF3ftIAb4Q=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_it.class
-SHA1-Digest: OktsKpVHM8a/vzx7CVntYU1obCk=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ECountVariant.class
-SHA1-Digest: aJHVQ300aVD+BmC2P8llIq3pg9c=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh.res
-SHA1-Digest: Noq8pEaOROmxrE/0JKN7yo9pc9g=
-
-Name: com/ibm/icu/util/CurrencyAmount.class
-SHA1-Digest: PNIjQXIaQ2oYJyUT0ItTyTqEkoU=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_windows_1256.cla
- ss
-SHA1-Digest: fH/O9fm3wzL1d7vIucNWFagAlKg=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_IQ.res
-SHA1-Digest: MVGJFkVfmjEFYd75NPIDMemK3mU=
-
-Name: com/ibm/icu/util/VTimeZone.class
-SHA1-Digest: qRYBs/HFY63RxXI0l6S0jZAnHSk=
-
-Name: com/ibm/icu/impl/DateNumberFormat.class
-SHA1-Digest: FmOXq4qdFqtwGi3AUoir6eVm4us=
-
-Name: com/ibm/icu/text/NumberFormatServiceShim$NFService.class
-SHA1-Digest: tbq28jH7lu6i82zGqfz3TzCU2zw=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_9_tr.class
-SHA1-Digest: GKHMyPsfNbTncpLjiW/Ps+88E8s=
-
-Name: com/ibm/icu/impl/data/icudt40b/kok_IN.res
-SHA1-Digest: okkjn+HQyRh5jKjChdz/gX+5GJg=
-
-Name: com/ibm/icu/text/CollationRuleParser$OptionSet.class
-SHA1-Digest: NQEcyavf02KCzAUy8eUxp2bm0ik=
-
-Name: com/ibm/icu/impl/data/icudt40b/af_ZA.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sh_YU.res
-SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
-
-Name: com/ibm/icu/text/CurrencyFormat.class
-SHA1-Digest: BIYocngM/7NiKCWXni1oy8dw6UE=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_no.class
-SHA1-Digest: AgzkQ+8Au9ZoXsAG/aYElEp/OA0=
-
-Name: com/ibm/icu/impl/data/icudt40b/translit/el.res
-SHA1-Digest: 8pcLhZA5frBXKUIf3AD59p6DT2o=
-
-Name: com/ibm/icu/lang/UCharacter$HangulSyllableType.class
-SHA1-Digest: FX4QLFcLemKiu2KiOmBPbxuoTgA=
-
-Name: com/ibm/icu/impl/NormalizerImpl$RecomposeArgs.class
-SHA1-Digest: JcTG/vr+4vL+lvoLih+JchLOwys=
-
-Name: com/ibm/icu/impl/duration/BasicDurationFormatter.class
-SHA1-Digest: zh16hEdh2ONzmmsS1JDrmJiNlRk=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/ru.res
-SHA1-Digest: PDqDGGUP9NkCGqu0t6Mi6w4zO1E=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fo.res
-SHA1-Digest: NkeMy1Zv54qyDaLcMZTyxlfoXPs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ja_JP.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_EC.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/TransliteratorIDParser$SingleID.class
-SHA1-Digest: Ufnlmb9l7qkXF0nQiTQKfC0SUN4=
-
-Name: com/ibm/icu/impl/data/icudt40b/gu.res
-SHA1-Digest: LZb42cCC34XgwULKFC8P2CxoHq8=
-
-Name: com/ibm/icu/text/CollatorReader$2.class
-SHA1-Digest: VstzQGGxGrBfAGwLsKAmINjoHdE=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_6_ar.class
-SHA1-Digest: x2joXvhCA0AghvT2a9Lkse/GM4w=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_ZW.res
-SHA1-Digest: pTpiRlqKb/mHDDExNgW+7wn/0kQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/te.res
-SHA1-Digest: 9NgA+guOiSVo340frajutTc9tKk=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_BH.res
-SHA1-Digest: MVGJFkVfmjEFYd75NPIDMemK3mU=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs.class
-SHA1-Digest: Cm9oybD5OV4zN5zzsIe5Ty8ewJM=
-
-Name: com/ibm/icu/impl/data/BreakIteratorRules.class
-SHA1-Digest: gCMOKah34u1kPKbKDFFkZ7q4Yns=
-
-Name: com/ibm/icu/impl/SimpleCache.class
-SHA1-Digest: gkYKNngE0GE4oKeUP2E1tXk1jM8=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_US_POSIX.res
-SHA1-Digest: RIkikuFyHK50rXzj0FF6loZn5gk=
-
-Name: com/ibm/icu/impl/data/icudt40b/hy_AM.res
-SHA1-Digest: xs+YdOUs++AkcZ6MKq8ODtsRIyk=
-
-Name: com/ibm/icu/text/UnicodeNameTransliterator$1.class
-SHA1-Digest: KaMVjn1QaHf34mD7oxjgwJ5ahIQ=
-
-Name: com/ibm/icu/impl/ZoneMeta.class
-SHA1-Digest: s0PiUx5dEwRWJ/YAMBboiRLLekA=
-
-Name: com/ibm/icu/text/ComposedCharIter.class
-SHA1-Digest: rChNG7UYDnRxDj7UbX1y0qWs5dk=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_ES.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/da.res
-SHA1-Digest: 0StLVPAwIMijPREG/p6UB7PjNE8=
-
-Name: com/ibm/icu/impl/data/icudt40b/ko_KR.res
-SHA1-Digest: BkdH2Z6KTw6vYxlfIu+nrN2M+o8=
-
-Name: com/ibm/icu/impl/ICUBinary.class
-SHA1-Digest: sSY3Nr1xFNDxtMCJmvvgUU8AbJk=
-
-Name: com/ibm/icu/impl/JavaTimeZone.class
-SHA1-Digest: RGmGX6YF1kdSgSbPkP1pPUkdprM=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EHalfPlacement.class
-SHA1-Digest: hXh33TmrbYTnw55gCgxA0u+L1aU=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/sv.res
-SHA1-Digest: 1aOTm4T9fN0N87Vtm1mOKw+oNzo=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_ko.xml
-SHA1-Digest: LG2K3AossetiNbz4AZgdAZbPlJM=
-
-Name: com/ibm/icu/text/PluralRules$BinaryConstraint.class
-SHA1-Digest: o8OrR+sTvNkqLirSd9OsATPhKaQ=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$CEGenerator.class
-SHA1-Digest: /DJVLxMf9OcAzOZjQCcQi63elb8=
-
-Name: com/ibm/icu/text/PluralFormat.class
-SHA1-Digest: wvb1qOi5OoX+3GHwJtRoDAoJ4po=
-
-Name: com/ibm/icu/util/CaseInsensitiveString.class
-SHA1-Digest: rQq82lJnOBEXasFGvZ877r9VDQ4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_BO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/XMLRecordReader.class
-SHA1-Digest: QJMPA09yTVHzesG3SnsuYOZF1gI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mr_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_iw.class
-SHA1-Digest: ToeHtdFUCxUdmrVnWpfyfJZK4PI=
-
-Name: com/ibm/icu/impl/data/icudt40b/it_IT.res
-SHA1-Digest: rgPmGVUb9Y/IOdVYtWCKbi2jow0=
-
-Name: com/ibm/icu/impl/data/icudt40b/ml.res
-SHA1-Digest: p7vxIShXTP/4MsijuOVC+7WvU78=
-
-Name: com/ibm/icu/util/TimeZone.class
-SHA1-Digest: BD+3a48MCrvxCiuc3X9kH4u9Ank=
-
-Name: com/ibm/icu/impl/data/icudt40b/res_index.txt
-SHA1-Digest: Xv9Bnzzzf1xNMxCdV9qI2da5pkg=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$BasicContractionTabl
- e.class
-SHA1-Digest: jWsjLfFERZXorGeHalRwZJi4O5I=
-
-Name: com/ibm/icu/impl/data/icudt40b/ml_IN.res
-SHA1-Digest: lu/FZOhIYxc96Wdn18/QTMgeA7Q=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_LU.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ur_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_TN.res
-SHA1-Digest: CLj1csfWVVit1PqXSJFKqaZ/U54=
-
-Name: com/ibm/icu/lang/UCharacter$SentenceBreak.class
-SHA1-Digest: v60WgOObH7LMxSp6BLkx12kbK2o=
-
-Name: com/ibm/icu/text/UnicodeSet$Filter.class
-SHA1-Digest: NBMNANpxG2nLvO2DvN1HxX60dOA=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hans_SG.xml
-SHA1-Digest: C7v6sFGidPy95Sqf/9HzGcQjeCQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/lv.res
-SHA1-Digest: Fu8EHw1wr6jTtNkj8lfzcqY70YA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_da.class
-SHA1-Digest: jzjS6XsqunKSZ7YAmPaebKHAeQo=
-
-Name: com/ibm/icu/impl/data/icudt40b/am.res
-SHA1-Digest: 5jlg4RHy3iAYG7ov6cRyl2aZijo=
-
-Name: com/ibm/icu/impl/data/icudt40b/iw.res
-SHA1-Digest: WZP9bAErSkXNMGcS7Cigt2GwNKw=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_en_GB.class
-SHA1-Digest: HXDh6JDRFbipCxMfi/8pXpp5d1k=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pt_PT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CollationElementIterator.class
-SHA1-Digest: Zdigo3vWjZN3Pi/5eD6KcTLIm7s=
-
-Name: com/ibm/icu/text/Normalizer.class
-SHA1-Digest: NjfW4+6zne8UcJXRJ/pLy5XfkA4=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_DZ.res
-SHA1-Digest: khdm2PI+baLZdPFHm2WElooUf1w=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_OM.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUService$Factory.class
-SHA1-Digest: JjbkqvP4n+0KVYf1xulU5Z4eAl4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sv_SE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/bn.res
-SHA1-Digest: 5EefV9UXfl1gFapc1zHJY6GWgQE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/om_ET.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn_RS.res
-SHA1-Digest: 9Q3HYufcBd03MgJYLcAPKfZ9LRU=
-
-Name: com/ibm/icu/impl/data/icudt40b/pnames.icu
-SHA1-Digest: gyIxR5pJTCsfhNix+jeZk17v24M=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$InverseUCA.class
-SHA1-Digest: rsj7nP8njlED4xOwiB6ZnMbOh1I=
-
-Name: com/ibm/icu/util/ULocale.class
-SHA1-Digest: bsdvO282AdVpiADvQvHBACuRtfw=
-
-Name: com/ibm/icu/text/DecompData.class
-SHA1-Digest: /NZFm0m+Y3ZTpmzhS3cecFVYHhg=
-
-Name: com/ibm/icu/impl/data/icudt40b/ucadata.icu
-SHA1-Digest: Q0NSXQYbhwdZrWPlvg7mwKfQqzM=
-
-Name: com/ibm/icu/lang/UCharacter$GraphemeClusterBreak.class
-SHA1-Digest: Bp5r7WDyc/oPgoQ4mDo35RSePh4=
-
-Name: com/ibm/icu/text/UForwardCharacterIterator.class
-SHA1-Digest: GWke+hdTckf+I7Ox5eLwBIW2PDk=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Cyrl_UZ.res
-SHA1-Digest: y1+/EXQfdIrchtckExpNr9mgIEg=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_DE.res
-SHA1-Digest: HIMOtw7NWCOSLF/oQ0570Kjm+wY=
-
-Name: com/ibm/icu/impl/data/icudt40b/no_NO.res
-SHA1-Digest: AgYfyOH+DuzgYK7m3vioTfRNJGM=
-
-Name: com/ibm/icu/impl/data/icudt40b/kk_Cyrl_KZ.res
-SHA1-Digest: +/LVRKi4A8LFr24NwK7dKO0oWpw=
-
-Name: com/ibm/icu/impl/ICULocaleService$SimpleLocaleKeyFactory.class
-SHA1-Digest: 5JDiO36tIyr7uFW1suvdDYu9k8U=
-
-Name: com/ibm/icu/text/RuleBasedTransliterator$Data.class
-SHA1-Digest: INjgv979MVyDLH/Ok0DXmTUNICo=
-
-Name: com/ibm/icu/text/CollatorReader.class
-SHA1-Digest: iy0zlbPxakN8t74H9k8l8FiSNws=
-
-Name: com/ibm/icu/util/CECalendar.class
-SHA1-Digest: MJpYb58EzbUFt5pzMamW81vqcS4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hi__DIRECT.res
-SHA1-Digest: MSzM/HDeF/P11vq8UxQLYalDeoo=
-
-Name: com/ibm/icu/impl/data/icudt40b/af_NA.res
-SHA1-Digest: BN2NBskxp8gs09hI6ESj+NcpxrQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/kk_Cyrl.res
-SHA1-Digest: tkYP15HdpFkRboPsshFawi3W2LM=
-
-Name: com/ibm/icu/lang/UCharacter$NumericType.class
-SHA1-Digest: wwSYkQeTFo9hTCY2UOHS67woY5Y=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_cs.class
-SHA1-Digest: G8wulecnFyUMHZFyjLB86O7Uueg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_LY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUData$2.class
-SHA1-Digest: dK5G1/f28l6pLwsD3POwMCuv4gg=
-
-Name: com/ibm/icu/impl/data/icudt40b/sh_CS.res
-SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
-
-Name: com/ibm/icu/impl/TimeZoneAdapter.class
-SHA1-Digest: 8G41pZZL4p+FC/QCOYTOkk8CMJ8=
-
-Name: com/ibm/icu/impl/CharTrie$FriendAgent.class
-SHA1-Digest: RUX1V8Xjj+l9ekbRAoT+rlLyDgU=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_FR.res
-SHA1-Digest: CSxCNjyUdiuO+J/xwf1NNn68GBI=
-
-Name: com/ibm/icu/impl/data/icudt40b/he.res
-SHA1-Digest: APCFNsuI76OqjyIJIJTa2mPvJNg=
-
-Name: com/ibm/icu/impl/data/icudt40b/invuca.icu
-SHA1-Digest: nV2nXv49GlRcOAAkPjQ+2jd2Pyg=
-
-Name: com/ibm/icu/impl/data/icudt40b/cnvalias.icu
-SHA1-Digest: F8lrhsZVN4iTiGO1eORlvbH5xOw=
-
-Name: com/ibm/icu/impl/ICUService.class
-SHA1-Digest: aUc+r0p341fLp6N8wsDJkzwlSlU=
-
-Name: com/ibm/icu/text/RBBIDataWrapper.class
-SHA1-Digest: Rz1+//cPD5Auu7G0zvWKasM4qkY=
-
-Name: com/ibm/icu/impl/data/icudt40b/fa_AF.res
-SHA1-Digest: uHJG7LmH+wyjreBlAcyQgHaJNAY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pt_BR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/Normalizer$QuickCheckResult.class
-SHA1-Digest: 4afP7XvgOX4RQMmvMVq4EjWPFhY=
-
-Name: com/ibm/icu/impl/duration/TimeUnitConstants.class
-SHA1-Digest: 1ialH7qT9mVU7EXDscwlOkAGYEk=
-
-Name: com/ibm/icu/impl/data/icudt40b/kk_KZ.res
-SHA1-Digest: Pv1X4jlPvVlxVZcgVveM6ghr16s=
-
-Name: com/ibm/icu/impl/data/icudt40b/hu.res
-SHA1-Digest: EM9Btv7eMpaWiycZHgPhVK4ODkY=
-
-Name: com/ibm/icu/text/NormalizationTransliterator$3.class
-SHA1-Digest: KXjxH+Pbhe/oQsKli3FOja0GFZM=
-
-Name: com/ibm/icu/lang/UCharacterEnums.class
-SHA1-Digest: UcwiRTq/PVmX4Q9pROsYy7tIAtA=
-
-Name: com/ibm/icu/impl/TrieIterator.class
-SHA1-Digest: ZF8qBmw9SWQ4xLPigq+ttP0HH5s=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hant_HK.res
-SHA1-Digest: McZyFYTdkOFBykVI05FiTNGYRTw=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_HK.res
-SHA1-Digest: speOMn/V2KXsedph/5CkSZvBY08=
-
-Name: com/ibm/icu/text/SimpleDateFormat.class
-SHA1-Digest: 0s2S5j6DArxzk+oElvHnCRMvtwM=
-
-Name: com/ibm/icu/util/BuddhistCalendar.class
-SHA1-Digest: tpxOhBNizv5BVRDFxPSV1yBYa08=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator.class
-SHA1-Digest: ejIr//gdqoTjYEBWP7J2IaH3diI=
-
-Name: com/ibm/icu/impl/data/icudt40b/mk.res
-SHA1-Digest: SnuE9m9GzF7OCZY5d8tescB6/Jk=
-
-Name: com/ibm/icu/impl/data/icudt40b/sw_TZ.res
-SHA1-Digest: A2RjRhMcmBAkqidVuV7/6xVUdJQ=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$Spec.class
-SHA1-Digest: 3RxGRg3E2bGFjmsOPvBl3WKb67Y=
-
-Name: com/ibm/icu/text/LowercaseTransliterator$1.class
-SHA1-Digest: WrihvGS3ytjsiLTN9AGLdG5T98c=
-
-Name: com/ibm/icu/impl/data/icudt40b/vi_VN.res
-SHA1-Digest: YvxxIPS7C4BJJUrpcRXfDeEEq6U=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ms_BN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/RBBIRuleParseTable.class
-SHA1-Digest: xdkPFmEyodQyRifzCGIsIJUHB6A=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator$DateTimeMatcher.class
-SHA1-Digest: /63lD0ZOBVqj9HhtJUen7prdiWU=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$3.class
-SHA1-Digest: qnlQ060pQEA1KSYweMl7L+WyYWw=
-
-Name: com/ibm/icu/impl/TrieBuilder$DataManipulate.class
-SHA1-Digest: OCqpw+WLzXMwly6HCsEkd99Kwnc=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_de_AT.class
-SHA1-Digest: mZlLi8ZXE09fTN+C/W91y/Kb70M=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_fr_CA.class
-SHA1-Digest: TFDs6Ohrc//BJh5oVarP/HomTS4=
-
-Name: com/ibm/icu/impl/NormalizerImpl$NextCCArgs.class
-SHA1-Digest: JVR0BDY6pHtaCtJ+yJdL31rn+pQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Arab_AF.res
-SHA1-Digest: NHdiJsx6D9wX9qoopGUL4KMcz2M=
-
-Name: com/ibm/icu/text/UnicodeSet$IntPropertyFilter.class
-SHA1-Digest: 2JlKc1JDnCFWxGjLHvZXeMWnGVE=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ESeparatorVariant.clas
- s
-SHA1-Digest: 7pGgIgI/YrwXlt9D6TxW9wM4nf8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_SA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/om_KE.res
-SHA1-Digest: dZ85jPwCGKxo0ai7lOcWkL8/IkE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_CO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/haw.res
-SHA1-Digest: Yqnfb+eTsUzxMI8y9Xy5j4RbpXg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_GT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/nl.res
-SHA1-Digest: BPzgLF/xk4O1BzBoXrRBTi7sBPM=
-
-Name: com/ibm/icu/impl/data/icudt40b/sh_BA.res
-SHA1-Digest: vYOnYIQEmwDnRfySDiGCAZETvgI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/el.res
-SHA1-Digest: 3Vo/uZDqEP87t5I2NxKWfRIcDhQ=
-
-Name: com/ibm/icu/text/PluralRules$Rule.class
-SHA1-Digest: lnr5ZZiLWyfabx3PfQFUQ4kRXag=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Latn_ME.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr.res
-SHA1-Digest: aDbQE31+8s8Hd0/H1UR5PC7uYM0=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_en.class
-SHA1-Digest: FXI2biLPdDj9gZOjNUrm9kY1JzE=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_AE.res
-SHA1-Digest: 3SO9bf66F2eGXmPvqmOn+sjfqy4=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/es.res
-SHA1-Digest: 31gCJPBD5t4AOPFr1BPHvAKzqsg=
-
-Name: com/ibm/icu/text/RBBISetBuilder$RangeDescriptor.class
-SHA1-Digest: IYaOR5Li53wz+/ew5LMCgHCEOK8=
-
-Name: com/ibm/icu/text/Bidi$Point.class
-SHA1-Digest: /nEbU1o/kL95SdccPjl2wmfvoMY=
-
-Name: com/ibm/icu/text/CharsetMatch.class
-SHA1-Digest: ON88NxwVmEi9K6MOVo5BKhXlBeE=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_el.class
-SHA1-Digest: FXpaa3HqUKNZXl0Ip10yyAIvKJE=
-
-Name: com/ibm/icu/util/CalendarServiceShim.class
-SHA1-Digest: 2YFXPZlzRNcLB8lQ5RzNzGpJYts=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_KW.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh__PINYIN.res
-SHA1-Digest: UxTeb9sqoN5EU+1Sec5WMwnCfNA=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc$CharsetRecog
- _euc_kr.class
-SHA1-Digest: oJ0ItqPy76y7oJBc0o8ujS8uesY=
-
-Name: com/ibm/icu/impl/data/icudt40b/om.res
-SHA1-Digest: +2kWciu5jWu3EL/+BoXIhFN2Tog=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr.res
-SHA1-Digest: QjPew0ZuibSRmZ2bn0NkCaVwR9Q=
-
-Name: com/ibm/icu/text/NumberFormat$NumberFormatFactory.class
-SHA1-Digest: PKfrJI/mSa/Tlg4cH4F520NcQNk=
-
-Name: com/ibm/icu/util/HebrewCalendar.class
-SHA1-Digest: ZLiKbjSyHovxTVdRTu827rxk9E8=
-
-Name: com/ibm/icu/text/ChineseDateFormatSymbols.class
-SHA1-Digest: 1ALrkiOxWoANjLRxcz45HYxFRK4=
-
-Name: com/ibm/icu/text/DurationFormat.class
-SHA1-Digest: 79FoB/9CdUcOY6Cnd6yUqRcjliw=
-
-Name: com/ibm/icu/util/LocaleData.class
-SHA1-Digest: ARGzM7a4gFDAUyXhC3PszlFdqxk=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EDecimalHandling.class
-SHA1-Digest: 2SOoR+mng47ZN9oI3av7Xv9KiWY=
-
-Name: com/ibm/icu/impl/UCharacterNameReader.class
-SHA1-Digest: 5p7BvE7VGf5aCt90xzrSojTkzwQ=
-
-Name: com/ibm/icu/text/PluralRules$OrConstraint.class
-SHA1-Digest: KuMMTxCfkDNJcpjw90x/WT1GTFM=
-
-Name: com/ibm/icu/impl/data/BreakIteratorRules_th.class
-SHA1-Digest: nwliB5sJL3Z30p35rPoMRZFxgpY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/as_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/FunctionReplacer.class
-SHA1-Digest: Y59QnXwARkfmXDY5Kx9F88nCa34=
-
-Name: com/ibm/icu/text/PluralRules$2.class
-SHA1-Digest: NI0lJzMoRqzNI+n2G9Rx1AKHjl0=
-
-Name: com/ibm/icu/text/Transliterator$Factory.class
-SHA1-Digest: HlRT/XtlhZKVGY1Pkx98liTP3Es=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ps_AF.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_pl.class
-SHA1-Digest: Hrs48Nb3aaVzsQz3HoDurJJjMKI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_CH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_7_el.class
-SHA1-Digest: X3Gt/9UHhl004qdd7RU5VETtUwk=
-
-Name: com/ibm/icu/impl/URLHandler$FileURLHandler.class
-SHA1-Digest: Nk3C/NyoD1irVs/E83xe3usluFU=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_BW.res
-SHA1-Digest: YodrVv+Zw5a/rSD2PJgCPqDG1jA=
-
-Name: com/ibm/icu/impl/data/icudt40b/nb_NO.res
-SHA1-Digest: rgPmGVUb9Y/IOdVYtWCKbi2jow0=
-
-Name: com/ibm/icu/util/IslamicCalendar.class
-SHA1-Digest: HPQc24WncyidJMQA7tU0ltnWnCE=
-
-Name: com/ibm/icu/impl/data/icudt40b/plurals.res
-SHA1-Digest: UW54AVgCl6ABh9y8bppAniGf49s=
-
-Name: com/ibm/icu/impl/data/icudt40b/et_EE.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_IE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStrings.class
-SHA1-Digest: LT77mr3fGtsNpmPnp/38Fzt0DpI=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_es.class
-SHA1-Digest: T7/LyJv1/qJcNhbMoCBPamZUp24=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_ME.res
-SHA1-Digest: oXaqBhMExiV5rKnE2flXWVVHyzM=
-
-Name: com/ibm/icu/text/StringPrepParseException.class
-SHA1-Digest: 7hwrnIatfmyZ81dOSQRxXm/WgQA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/cy.res
-SHA1-Digest: TbMzhk+FCseuVsvRxMaWIqhW2RE=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_PY.res
-SHA1-Digest: Mob9sBUUWFEKRiDY+Kg6BWSIZQ4=
-
-Name: com/ibm/icu/text/AnyTransliterator$ScriptRunIterator.class
-SHA1-Digest: sz2JPJr5380xMnB6sfRTbgvuuhE=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_th.xml
-SHA1-Digest: NZFidl0zlqGiXQ9iNVK0jGnJ17c=
-
-Name: com/ibm/icu/impl/ZoneStringFormat.class
-SHA1-Digest: n/o7n8o6xt+CofHyIZIyKbP6MLE=
-
-Name: com/ibm/icu/impl/data/icudt40b/fi_FI.res
-SHA1-Digest: HIMOtw7NWCOSLF/oQ0570Kjm+wY=
-
-Name: com/ibm/icu/impl/data/icudt40b/ru_RU.res
-SHA1-Digest: A2RjRhMcmBAkqidVuV7/6xVUdJQ=
-
-Name: com/ibm/icu/text/EscapeTransliterator$4.class
-SHA1-Digest: NOPq/bUbsneMkFbx2hOqAYvNdiw=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_LB.res
-SHA1-Digest: tHTwuf2VeRWn6dF1Yms7nnkKiOA=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/da.res
-SHA1-Digest: wdu0nLOhwkKQz3HAE+3GBjktVmU=
-
-Name: com/ibm/icu/impl/data/icudt40b/az_Latn_AZ.res
-SHA1-Digest: KpJ0Crjkm0MVOKaEEWxs0mNvBHY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kok.res
-SHA1-Digest: N5n5OvwnnNAyo5Fbfrk5OCwKShU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hans_SG.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/word.brk
-SHA1-Digest: wjMT14IRax3ld4gSuw06jXnYiVY=
-
-Name: com/ibm/icu/impl/data/icudt40b/gl_ES.res
-SHA1-Digest: ruw+sDe2ietW6vAdNMPYSRMLOE0=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_hi.xml
-SHA1-Digest: tEvUXgi/dG/+BCnpnPDVSxP+Zcc=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/lt.res
-SHA1-Digest: SmzUmfIaMqgjkNYnXKxpdtqa688=
-
-Name: com/ibm/icu/impl/NormalizerImpl$FCDTrieImpl.class
-SHA1-Digest: mnwJsoHXLlYPybUU9/TYlZBsois=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_PH.res
-SHA1-Digest: 3DvbKIBlAOMDLG+RVE0pvO5lNqo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hant.res
-SHA1-Digest: oWOYnjDgt8S7gJVTaqZi+IJoLPE=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_CS.res
-SHA1-Digest: aduEqkdKeplfC5eiWemPKHmW34A=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8.class
-SHA1-Digest: 5+Idjixs8vq1psKknwqDHbbvNvQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/uk_UA.res
-SHA1-Digest: XY7X4+98IChY345/6PZ+SzgR+h0=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$1.class
-SHA1-Digest: Vf971NEaFuoVyyRUPsqjQ9QqHts=
-
-Name: com/ibm/icu/text/TitlecaseTransliterator$1.class
-SHA1-Digest: ekTC9gWzv3dYRBtoQqNHqbKkuCc=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs.class
-SHA1-Digest: zb96ltRlnZu1B4er1dwcZW9Eeno=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_fr.class
-SHA1-Digest: 9O29pqbYd82G8WZDF65YDtjKYYU=
-
-Name: com/ibm/icu/impl/data/icudt40b/fa.res
-SHA1-Digest: KxnNRQ7Brdqw9WqjJpexpjrDNaA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hi_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/fa_AF.res
-SHA1-Digest: P8N1zdp933oIIAsmg63kGkfj4tY=
-
-Name: com/ibm/icu/text/TransliterationRule.class
-SHA1-Digest: utxfpe1JXSDmAHVABKr61kRepHo=
-
-Name: com/ibm/icu/impl/ICULocaleService$ICUResourceBundleFactory.class
-SHA1-Digest: h1B76yfcjcij4GLO0XPL6DQsluA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sq_AL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/UnicodeReplacer.class
-SHA1-Digest: Y0PfDc+j6xXLIk74hykjzB1JKC4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_GB.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/TransliteratorParser$RuleHalf.class
-SHA1-Digest: DVuc1/3MSssDTpC+VlJf48tk6I4=
-
-Name: com/ibm/icu/text/LowercaseTransliterator.class
-SHA1-Digest: u+1+BuvXsLbtGmHL1x9ql9YS2eA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ja.res
-SHA1-Digest: ncbDO/NYc4alM7kaVQ+LRCssFKQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_DO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ubidi.icu
-SHA1-Digest: 8PG8LlE9FD31PSbCFlqH8ikBN/E=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_MT.res
-SHA1-Digest: 1/9H/5AFPaHUqILlGPP4NV0S1P8=
-
-Name: com/ibm/icu/text/TransliteratorIDParser$Specs.class
-SHA1-Digest: z/LW93onXArAMvnRSrRW2DAb8FQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mt_MT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sq.res
-SHA1-Digest: LKZlW8dYg2fNEsfKWjVZ04eR2M0=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl_CS.res
-SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
-
-Name: com/ibm/icu/util/SimpleDateRule.class
-SHA1-Digest: myCDNTkS4hL2rfFvE1xyost/B2c=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_SG.res
-SHA1-Digest: 99MTdXPuizTQKIDtoLc37T5PHW0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/bg.res
-SHA1-Digest: jC5g1xV3C0wP8HfkSZOqb4JGAjY=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$Equatorial.class
-SHA1-Digest: 5Vz1H3GN/CL7MoCyC4MwaiglnEM=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_AU.res
-SHA1-Digest: 52jSEtg57lOL840+ybLI3ENCAnc=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_ru.xml
-SHA1-Digest: kfu6bHTkqffOiCrvznVcteTbSyM=
-
-Name: com/ibm/icu/impl/data/icudt40b/kw.res
-SHA1-Digest: r4OP17k/8f1OdeiWY4BugvTwCxA=
-
-Name: com/ibm/icu/text/StringTransform.class
-SHA1-Digest: 87UqNV3vGCvS/7/a4HFvPbzqBx0=
-
-Name: com/ibm/icu/text/CollatorServiceShim$1$CollatorFactory.class
-SHA1-Digest: IUiQtyUJz/x7IlDn83zxWxc1Vl4=
-
-Name: com/ibm/icu/impl/ZoneMeta$OlsonToMetaMappingEntry.class
-SHA1-Digest: jMAXn6iZ534dhea0f8K7S48YqI0=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_JO.res
-SHA1-Digest: Kk8446OPANEbmBAWcACLa+k9j2E=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_en_CA.class
-SHA1-Digest: JDt2Epln27M6w0EISNH/fPRsNUA=
-
-Name: com/ibm/icu/util/EasterHoliday.class
-SHA1-Digest: gU3zJqbUJQ0nepfR/f0MSnuGU5Y=
-
-Name: com/ibm/icu/text/CollationRuleParser.class
-SHA1-Digest: QOwn/ESmdLXciNhbTTbM9Z9oyUo=
-
-Name: com/ibm/icu/text/CompoundTransliterator.class
-SHA1-Digest: RD/wMqaohRC9NQiHxT6pZJbYvQU=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$6.class
-SHA1-Digest: i9ZJrC+QqcKPKdQWsfHcPqq+Vig=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sl.res
-SHA1-Digest: LqZtH2wkCBjeKl2HDVogTL1HpC4=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_gb_18030.class
-SHA1-Digest: iC854J7dr3cHe4KoWoNTPy9TBe8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pa_Arab_PK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/IndianCalendar.class
-SHA1-Digest: 3XPNa9IES+iIV8QeLY7IhVDwa94=
-
-Name: com/ibm/icu/impl/duration/SingleUnitBuilder.class
-SHA1-Digest: BbdO2vPITWDJSjKvEcirWklo/jQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_VE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_BA.res
-SHA1-Digest: 6q0h04Ey+gEIoBcrzyHzzX1kkzA=
-
-Name: com/ibm/icu/impl/data/icudt40b/tr.res
-SHA1-Digest: S/W8At6KpHbat99GPtSVwNc7cPY=
-
-Name: com/ibm/icu/text/NumberFormatServiceShim$1$RBNumberFormatFactory
- .class
-SHA1-Digest: KWv7WM8vztOPnESv5qbk99bAZIU=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/root.res
-SHA1-Digest: paZntOH7lwqnm4ngkmma5eBXYqs=
-
-Name: com/ibm/icu/impl/data/icudt40b/hy_AM_REVISED.res
-SHA1-Digest: L70qxwgwN02P2QVsoNH0d9lphgk=
-
-Name: com/ibm/icu/text/PluralRules$RuleChain.class
-SHA1-Digest: r8enzv6Hu7jgvkLfxh2ISESaPD0=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/root.res
-SHA1-Digest: n9+2iCnjOpUpAk9HC+JDf/18AQI=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodBuilderFactory.class
-SHA1-Digest: KVbzRjWDqCiRmgfYM+XojdWDQeA=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceTable.class
-SHA1-Digest: I6khLCo2DaxntrU0S6DIrA+yfWg=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/res_index.res
-SHA1-Digest: ajtks6oPXl401k2BxBgtJRH3r+k=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$CombinClassTable.cla
- ss
-SHA1-Digest: 62or7OA9Pd50cK/U9LRAwN+8qfc=
-
-Name: com/ibm/icu/util/BasicTimeZone.class
-SHA1-Digest: iA1Cz7Bac9X3mEDrrYE6rVqDd10=
-
-Name: com/ibm/icu/impl/ICULocaleService$LocaleKeyFactory.class
-SHA1-Digest: TGAXraAIjv/MY/Qk5GpoVe6jtYw=
-
-Name: com/ibm/icu/lang/UCharacter.class
-SHA1-Digest: omSmnqzCvJf2YrdjlcIJv0f99e4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/res_index.res
-SHA1-Digest: 24ueYHzFXJweffbRRhREyfhPIUI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_US.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ImplicitCEGenerator.class
-SHA1-Digest: mDdS1NF/0Pa0Skz4/d5y0u6v/W0=
-
-Name: com/ibm/icu/text/RBBISymbolTable$RBBISymbolTableEntry.class
-SHA1-Digest: h641TWqk5EPYgd6C7RW3Gr+tqdg=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_HN.res
-SHA1-Digest: K+vbqy0Xo3qfM11Tei/MLssaefw=
-
-Name: com/ibm/icu/util/JapaneseCalendar.class
-SHA1-Digest: +8wtGviyuipl+1qCJpbadJP+hfw=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$iteratedChar.class
-SHA1-Digest: nsKXKdueSf7brr92FCIhz1Qsm3I=
-
-Name: com/ibm/icu/text/CollationRuleParser$ParsedToken.class
-SHA1-Digest: 7qAThOKZIWiUm2sHRH0bGr5atnY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hi_.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/id.res
-SHA1-Digest: 89DeLiO7HTW5wmb3mwoy8564Ouc=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ro_RO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/MultiUnitBuilder.class
-SHA1-Digest: CNeTQuo8vrmsjswrcv6oRHOfKWI=
-
-Name: com/ibm/icu/impl/ICUNotifier$NotifyThread.class
-SHA1-Digest: 0r/5F6NJvmNs1rsa4kEJrpfpDd8=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_da.class
-SHA1-Digest: rGruFVHUOPQiHvF7Xd0vlyymK2I=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/he.res
-SHA1-Digest: 6kZ1Mo891LI8X/2WOkg5IGfsVQc=
-
-Name: com/ibm/icu/impl/data/icudt40b/translit/res_index.txt
-SHA1-Digest: mP0z/MQ7HIq2bxM621Bm4b4l6FA=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/word_ja.brk
-SHA1-Digest: I9Qp3E+vUoTIQSBYeIDL8aAmrZ0=
-
-Name: com/ibm/icu/impl/data/icudt40b/eo.res
-SHA1-Digest: D7XwMguqfe/pVQ+nOgNKzNhl1HY=
-
-Name: com/ibm/icu/util/GregorianCalendar.class
-SHA1-Digest: hZTv4c+Oq9tB7TFdrSEav8ryhNQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/it.res
-SHA1-Digest: /Vdi7+2MrR+axZvIOCwMRYYlwnE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hans.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl_BA.res
-SHA1-Digest: Q1p7FViDlmzplgshlgx50Nh9Nyo=
-
-Name: com/ibm/icu/impl/data/icudt40b/supplementalData.res
-SHA1-Digest: anzyADvh9/ExsjaPAv/2MWXRi4s=
-
-Name: com/ibm/icu/util/TimeUnitAmount.class
-SHA1-Digest: kKMAWqaFaxqx6Ho5WH9BzkAKWW4=
-
-Name: com/ibm/icu/impl/ICURWLock.class
-SHA1-Digest: rfmo0U2aNAWxwkb5eqhh/tH4YIo=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_MO.res
-SHA1-Digest: K0sKinko64INKTDfbkgnrEzo0W4=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hant_MO.res
-SHA1-Digest: /xDDqvfD+A3bRbkP8MYWJOjB3z8=
-
-Name: com/ibm/icu/impl/UPropertyAliases$Builder.class
-SHA1-Digest: k9NaPB5XdTlDku/+HPGL7fC6Gm4=
-
-Name: com/ibm/icu/impl/ICUService$SimpleFactory.class
-SHA1-Digest: 40JBDsy4Y4/ocfF1VsvWDCiXbeA=
-
-Name: com/ibm/icu/impl/data/icudt40b/az.res
-SHA1-Digest: /qNTllNHecROSEyIryxC+B/w7gc=
-
-Name: com/ibm/icu/util/TimeZoneRule.class
-SHA1-Digest: CVj+0zrNL5CgUOnjhErAPxD+Qew=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/lt_LT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ro.res
-SHA1-Digest: kge8aY6At23zA59xWJbxZ8Yx1FA=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_16_BE.cla
- ss
-SHA1-Digest: I9kxMzXZX9R/Bv0nFXJfzDaoVNQ=
-
-Name: com/ibm/icu/impl/ICUResourceBundle$2.class
-SHA1-Digest: IFkFqEVEdgHTFM+lqi88yXVJdU0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_NZ.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/InitialTimeZoneRule.class
-SHA1-Digest: mp5EGBn+TXpMfmVdHm8bpsRyC/Y=
-
-Name: com/ibm/icu/text/TimeUnitFormat.class
-SHA1-Digest: 6G4bsfbMQ81nwJybRmnZDSFOjAg=
-
-Name: com/ibm/icu/impl/duration/DurationFormatter.class
-SHA1-Digest: 7rl/7uxutvms1EpNIkEwbDLA8dk=
-
-Name: com/ibm/icu/text/DateIntervalFormat$SkeletonAndItsBestMatch.clas
- s
-SHA1-Digest: FjMdSIHkAniUcBNaDIDAfpVWJ5I=
-
-Name: com/ibm/icu/impl/CharacterIteratorWrapper.class
-SHA1-Digest: quQ/R+xXqDAhzjuDqhIFhHv2obo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mt.res
-SHA1-Digest: Bg5E5sC7hXPgLw6pifbJBxOxfDg=
-
-Name: com/ibm/icu/impl/data/icudt40b/ii_CN.res
-SHA1-Digest: Y9OmJgxCUhTfSQ4yAugti4lHSUI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr_CA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_AT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/te_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/UResourceBundle$ResourceCacheKey.class
-SHA1-Digest: LyD0LiZ83Swv13HoT4bpFBNSW6w=
-
-Name: com/ibm/icu/impl/ByteBuffer.class
-SHA1-Digest: 2avDnOjCfRWUuHxfYRMmiAjDeGg=
-
-Name: com/ibm/icu/impl/ICUResourceBundleReader.class
-SHA1-Digest: hcTMaVt1ZwyR3u8r5PKnJGdAA1E=
-
-Name: com/ibm/icu/text/NullTransliterator.class
-SHA1-Digest: vK7McK9EiV3VXgWmey860vIG26U=
-
-Name: com/ibm/icu/impl/ICUService$LocaleRef.class
-SHA1-Digest: D8+zmtHUjnAaTkgfBK27ykkjH+E=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_IN.res
-SHA1-Digest: fvwNZ5ye7WfbM9Tzy2kb/1fVRZk=
-
-Name: com/ibm/icu/impl/data/icudt40b/ga.res
-SHA1-Digest: OkuBej7KUdxjzEgd8H7DGiPQLtc=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$MoonAge.class
-SHA1-Digest: vqyfPuE8UInzHXP7zsDHkL/+0jY=
-
-Name: com/ibm/icu/impl/data/icudt40b/bg_BG.res
-SHA1-Digest: BrxU4vyKbJ6duV+iCG+BLT2hS1Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_BE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/haw_US.res
-SHA1-Digest: 1S7OrT6rE0ImXuxdjAwUzTHmuRs=
-
-Name: com/ibm/icu/impl/duration/Period.class
-SHA1-Digest: ru7kTkDzjLIia6nozhpZsvwQYmE=
-
-Name: com/ibm/icu/impl/data/icudt40b/kl_GL.res
-SHA1-Digest: sjaSJBOiaHiElWpi7OawYunZS+g=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/nl.res
-SHA1-Digest: z1jTBNDQmw911JJ+EpbglfUMkP4=
-
-Name: com/ibm/icu/text/Normalizer$NFKCMode.class
-SHA1-Digest: TWOmWft4uNIwIw/VnhPk2RWCIeg=
-
-Name: com/ibm/icu/impl/data/icudt40b/da_DK.res
-SHA1-Digest: HBGgtK6uBX5mTD4/2lLLEcX1OWQ=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_pt.class
-SHA1-Digest: wIHj1ne+mBLMZeCkORLND1UfAlU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_US.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ta.res
-SHA1-Digest: AM0n7Ysun5VOrC/gpSbV4+Ccigk=
-
-Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieNodes.class
-SHA1-Digest: WxDBuCTnfcAYbQPXgF1zvrAkLyU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/be_BY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUResourceBundle.class
-SHA1-Digest: Hq6rg9vkKvmAXp5zVvCbH5gSfdU=
-
-Name: com/ibm/icu/impl/CalendarData.class
-SHA1-Digest: HWoBbrXF/nIYH3G2AcxH3CmpHrY=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/fr.res
-SHA1-Digest: TxVa5PSBV8yB14G/xEBRNL1gQVI=
-
-Name: com/ibm/icu/math/BigDecimal.class
-SHA1-Digest: U3tdqN30PTKmoBTo1UoyyzsCQ2k=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator$VariableField.class
-SHA1-Digest: gdMWADrvqpqDzT872SzX7e6yD/M=
-
-Name: com/ibm/icu/impl/data/icudt40b/gu_IN.res
-SHA1-Digest: vVhgwD0EbrcznlWi4rwRoaQFnV4=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EPluralization.class
-SHA1-Digest: QAZDpJnhDQNiCMJAw3YezWa1OFU=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_BE.res
-SHA1-Digest: qDjFxTxtVgspO7R6Op5c+uoPI/M=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sk.res
-SHA1-Digest: B9L9W6GU5RrWGeeV6Zs2ApGFjt0=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8_he.class
-SHA1-Digest: kptR2sKYUDqNZsQdJa8qp7pVo1k=
-
-Name: com/ibm/icu/util/AnnualTimeZoneRule.class
-SHA1-Digest: KS0yZPziZiVKPTAtBKFClJu/iiU=
-
-Name: com/ibm/icu/util/UniversalTimeScale$TimeScaleData.class
-SHA1-Digest: Go0JjviIig8ojaJuujyCC7l68A0=
-
-Name: com/ibm/icu/text/RBNFPostProcessor.class
-SHA1-Digest: q/ZhdtLQ26/YmVXQIltghNEEnR0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mk_MK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/pl.res
-SHA1-Digest: QSdhUdsQm2KG9BUxsh8omfO3FOQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nl_BE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$WeightRange.class
-SHA1-Digest: 7IwnBaT3SvD2aSO6KJcD8ska5Vo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ms_MY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_el_GR.class
-SHA1-Digest: 6Du4+mKi2hTN7hFK2dVFi+jEGhs=
-
-Name: com/ibm/icu/text/RuleBasedCollator$contContext.class
-SHA1-Digest: DiHfrfKH4NQKbzm6WgPo0oG+3VA=
-
-Name: com/ibm/icu/impl/data/icudt40b/hr.res
-SHA1-Digest: GWtN4H1bE0QrTEFTVEZ3J2FwIfU=
-
-Name: com/ibm/icu/text/RuleBasedCollator$ContractionInfo.class
-SHA1-Digest: c9vy2P2kVLvYjvx+whU6+tmThIM=
-
-Name: com/ibm/icu/text/NormalizationTransliterator$1.class
-SHA1-Digest: cZMNujQoi0deKyrTfzaAbqu4xBM=
-
-Name: com/ibm/icu/text/CollatorServiceShim$1$CFactory.class
-SHA1-Digest: gBfd+RD2EyDVs8x+UvpPSNkqlHs=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_TW.res
-SHA1-Digest: FI8SXUxAHIZ4WAdjGjq/j705WQs=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hant_TW.res
-SHA1-Digest: ONXYFNign+A88QUdB40AqHKuAVQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_SY.res
-SHA1-Digest: XdzjqBMhC/wBsAoc4rg0DL9InFE=
-
-Name: com/ibm/icu/text/StringSearch.class
-SHA1-Digest: 2/qKN8gDomjJplfZWowovT9UiWc=
-
-Name: com/ibm/icu/util/Currency.class
-SHA1-Digest: oQkOoSqqYUig48yPPjyINKHEiM4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/id_ID.res
-SHA1-Digest: xs+YdOUs++AkcZ6MKq8ODtsRIyk=
-
-Name: com/ibm/icu/impl/data/icudt40b/ur.res
-SHA1-Digest: W9Wi9B2xCfL7LgzPcKBt26CpqWk=
-
-Name: com/ibm/icu/text/UTF16.class
-SHA1-Digest: Q4h4K07luaFe7fKxRKOTAJkrdGI=
-
-Name: com/ibm/icu/impl/TextTrieMap$LongestMatchHandler.class
-SHA1-Digest: X2PVGUt63YZq67tVXXkc1NhcBOE=
-
-Name: com/ibm/icu/impl/data/icudt40b/en.res
-SHA1-Digest: RXb3EY/1SriPt1RB+X+K+x9Q8nk=
-
-Name: com/ibm/icu/impl/data/icudt40b/is.res
-SHA1-Digest: 5aGDlVzPLGvSvOt40Qv+F4+NhO0=
-
-Name: com/ibm/icu/util/SimpleHoliday.class
-SHA1-Digest: fnGw7XmpwBT8phMTJdA9jyQHhD4=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hant.res
-SHA1-Digest: 8bUHgxNx2Z4PJP0LB93G08m2+qM=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh.res
-SHA1-Digest: vzPMs6PCsRjBDC2jMEZkK3BxqBU=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$1.class
-SHA1-Digest: a5usj8Vu8lcl6yCFt3nQYfGh6Is=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$MaxExpansionTable.cl
- ass
-SHA1-Digest: LG8DbaGsK2TfOuSxhSzlNE8uGNA=
-
-Name: com/ibm/icu/impl/duration/PeriodBuilderFactory.class
-SHA1-Digest: o8AJwExYFUA9EIb3yKT50montjs=
-
-Name: com/ibm/icu/impl/UCharacterPropertyReader.class
-SHA1-Digest: LVkg/Qc9VbHmjBZ1icn4Ig+BrrQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_CL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/th_TH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/haw.res
-SHA1-Digest: +g0CmQciwuL3+3/v6w8sQkjuIIQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_MA.res
-SHA1-Digest: FZXtO0s102DorVbF+1h60vzQfWM=
-
-Name: com/ibm/icu/impl/duration/impl/PeriodFormatterData.class
-SHA1-Digest: QHSkfrspxJbAlPznfeeS/ZL3KY4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/in.res
-SHA1-Digest: 4yHeO3OZURAGnQ+2Akh1AsFcJ6M=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ms.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/fo.res
-SHA1-Digest: TdRwuN6CYeAmqaQPLjnL2MqqZDU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fa_IR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/en.res
-SHA1-Digest: +/LVRKi4A8LFr24NwK7dKO0oWpw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ca_ES.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_EG.res
-SHA1-Digest: 64i0eoP4N4JcRNd6JvC8T7cmfHk=
-
-Name: about_files/license.html
-SHA1-Digest: qgmm4hdKqgmltFsQdToOx+7jQq4=
-
-Name: com/ibm/icu/text/AnyTransliterator.class
-SHA1-Digest: Enwvfr3W+tPrslawrr8DFQnIxrw=
-
-Name: com/ibm/icu/text/UnicodeMatcher.class
-SHA1-Digest: FT3g8JBh7zBjeL0/HM+DZ5NKiS8=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$BuildTable.class
-SHA1-Digest: j0lpHNvFTFZ5kI2HSuuOmOUaLnI=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_es.xml
-SHA1-Digest: HwTaH+DzCXwlwgWRwNBQuaHaOf4=
-
-Name: com/ibm/icu/text/CollationRuleParser$TokenListHeader.class
-SHA1-Digest: zmfkMc1gnmRjkVm1DPXnpDrjaFc=
-
-Name: com/ibm/icu/impl/data/icudt40b/it_CH.res
-SHA1-Digest: /P5DOWCL9X2OQy22JVtjyX2ISdo=
-
-Name: com/ibm/icu/text/ArabicShapingException.class
-SHA1-Digest: aXkH6QCASAmw0W1Yryw5kjrwtmY=
-
-Name: com/ibm/icu/text/MultiplierSubstitution.class
-SHA1-Digest: m2h61dS2htdkYl1Vz01v6HsmrWU=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_sjis.class
-SHA1-Digest: n60qSSB7U+3PM5pNZ4wiPRV2y/k=
-
-Name: com/ibm/icu/impl/NormalizerDataReader.class
-SHA1-Digest: P3mxrBlY1iY4G5WbZubfkQTbcjg=
-
-Name: com/ibm/icu/impl/data/icudt40b/so.res
-SHA1-Digest: Ta4Uin1TxExibRG+vwO1dyuguys=
-
-Name: com/ibm/icu/text/DateIntervalInfo.class
-SHA1-Digest: x75zE/zdb51haUDPRKwWgcSqEfU=
-
-Name: com/ibm/icu/util/GlobalizationPreferences.class
-SHA1-Digest: LWxbbuIZxeJxmE+lpITnkWw4LMQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/fa.res
-SHA1-Digest: Xg3xe6Qp3qxoYecUQs5KZbWMDnY=
-
-Name: com/ibm/icu/impl/duration/impl/RecordWriter.class
-SHA1-Digest: v/lue5U+YnhX5R+ax7Lkrub9gbs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/be.res
-SHA1-Digest: jC5g1xV3C0wP8HfkSZOqb4JGAjY=
-
-Name: com/ibm/icu/text/PluralRules.class
-SHA1-Digest: mMh7fkydPtQcxaxgB/OwvC2ocJk=
-
-Name: com/ibm/icu/impl/UBiDiProps$IsAcceptable.class
-SHA1-Digest: 1ur4xU6L4zqknyOmC8MbBZC6ljk=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1.class
-SHA1-Digest: gXAWNvE6qd8umqqMIo+Ghnx3QLM=
-
-Name: com/ibm/icu/text/PluralRules$Constraint.class
-SHA1-Digest: rJu0vOah/TG2QnsK0fyVM3oMlQc=
-
-Name: com/ibm/icu/impl/UCaseProps$IsAcceptable.class
-SHA1-Digest: XLBgMJUK+hW8gwWAPk6GJb5ZEac=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_RH.res
-SHA1-Digest: hX7gbcKf4kxMliOSk1FTXIZlq6o=
-
-Name: com/ibm/icu/text/UnicodeNameTransliterator.class
-SHA1-Digest: eqMuvZwA/4Wp1OxCC8BiAZ64Wqc=
-
-Name: com/ibm/icu/impl/NormalizerImpl.class
-SHA1-Digest: psXmrnorztotY9mEQw4DVruLnyc=
-
-Name: com/ibm/icu/text/MessageFormat.class
-SHA1-Digest: J+OjyA4RxHTws0ueI7ivGIcNHtg=
-
-Name: com/ibm/icu/impl/NormalizerImpl$NextCombiningArgs.class
-SHA1-Digest: YXiOb8g3mw7ovg7aVwC2WPly75U=
-
-Name: com/ibm/icu/util/SimpleTimeZone.class
-SHA1-Digest: KeQnetCxO0mRXLqy+KWIARkr/94=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_16_LE.cla
- ss
-SHA1-Digest: ii9bW2z/WhsUtyQfhc5yIR27ZXI=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodFormatterFactory$Customizat
- ions.class
-SHA1-Digest: uwx71FwrVlYiNlMCHBsf/Pcfb2U=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_YE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/BreakCTDictionary.class
-SHA1-Digest: pn7slJgjKRKLtEMgior12sDz1ak=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_MX.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ha.res
-SHA1-Digest: q4q55zlK54ebym7TQP6pBFvp4VY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/lv_LV.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hr_HR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/pl_PL.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_RS.res
-SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
-
-Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStringInfo.class
-SHA1-Digest: n4BHwkI2E/e4k+1fX5xPOLfXTd8=
-
-Name: com/ibm/icu/impl/ICUConfig.class
-SHA1-Digest: i6brhWFD1e9foqBetYHQjtW99Fg=
-
-Name: com/ibm/icu/lang/UCharacterEnums$ECharacterCategory.class
-SHA1-Digest: kq95RgOd7C81QGqvQ9TDGG7vGus=
-
-Name: com/ibm/icu/impl/Trie.class
-SHA1-Digest: faI/WsgoUlZyHaMpB9pbgiXR8jQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/cs_CZ.res
-SHA1-Digest: tx8SC6fCV47Mvk2YdaJ3HIBWzHw=
-
-Name: com/ibm/icu/text/Normalizer$FCDMode.class
-SHA1-Digest: cxxYxkX9o5W0IvoRzvKlbNaztGk=
-
-Name: com/ibm/icu/text/BreakDictionary.class
-SHA1-Digest: UP8ASYdqL29Glsr8/OQKevINEb4=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$Elements.class
-SHA1-Digest: f4elhHsP3zglY0Jy2yfnI9kTrSs=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$ContractionTable.cla
- ss
-SHA1-Digest: 8fuUD6JzPWZqtbTsPDfOVKtHiws=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_NI.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/lv.res
-SHA1-Digest: I/O970MCv5VlRNIlV5YXKjCjV9c=
-
-Name: com/ibm/icu/text/DictionaryBasedBreakIterator.class
-SHA1-Digest: KeNnKYC6BsmOvho5Y6DchAtPgCA=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_SN.res
-SHA1-Digest: 4w4/q4Vm6hUJwfkL2AzOCaDdt5s=
-
-Name: com/ibm/icu/text/Transliterator$Position.class
-SHA1-Digest: Jkv3rNTZsJ+xkVJJUBpOaTT76s8=
-
-Name: com/ibm/icu/text/DecimalFormatSymbols.class
-SHA1-Digest: X0wZVdNIJ1F85yLWoqIhfPT/oKY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_IQ.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/CompactByteArray.class
-SHA1-Digest: cc6CYflTyn7tNMxUw4ASBITqJMY=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_KOI8_R.class
-SHA1-Digest: oxYDR6fjbI5DNKYukHPJCLFMx1w=
-
-Name: com/ibm/icu/impl/data/icudt40b/zoneinfo.res
-SHA1-Digest: lJVdTlIHJ8pXl/9QANBgPBXKRxY=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_es_MX.class
-SHA1-Digest: aJj0AuIV6cPRpCUHraAMoiitYAE=
-
-Name: com/ibm/icu/text/EscapeTransliterator$2.class
-SHA1-Digest: 7pXr2tZ5BIPS54TSTMYnCxzJ9ds=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EFractionHandling.clas
- s
-SHA1-Digest: w8RJoRmgHZR1YWbZyKBeT/G8z2I=
-
-Name: com/ibm/icu/impl/data/icudt40b/kok.res
-SHA1-Digest: F+p6uZhJJElR01dmlJbIX46Gi4w=
-
-Name: com/ibm/icu/text/TransliteratorParser$RuleArray.class
-SHA1-Digest: NLIGxX1AEW5zfySnaLl/68nMovU=
-
-Name: com/ibm/icu/impl/duration/BasicDurationFormat.class
-SHA1-Digest: udccTJD6aKauWEMAQrpFdBqZbE8=
-
-Name: com/ibm/icu/text/UnescapeTransliterator.class
-SHA1-Digest: HSvMH1HFNAHlDiIhMPqbMqRlkc0=
-
-Name: com/ibm/icu/text/StringReplacer.class
-SHA1-Digest: 7NR3/R3qL7pu/FLsNhafHAXzpRE=
-
-Name: com/ibm/icu/text/CollationRuleParser$Token.class
-SHA1-Digest: 2pGTO1X0k52exJqKxvbIByhLPzQ=
-
-Name: com/ibm/icu/util/UResourceBundle.class
-SHA1-Digest: I1/PsbLczf35D3hc/uT1ddrYL6o=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hans.res
-SHA1-Digest: SC74os1b47UU+BOl+CrUzdcYSig=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_6.class
-SHA1-Digest: iXP68bDBccPY+Fm5eQ7p92eXb3c=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_fr.class
-SHA1-Digest: OrUWgL8VPmoFKtXm0K+AMbmNqeM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_ZW.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl_RS.res
-SHA1-Digest: kRwrop6zphbfiaFjvwFLc/+aK8o=
-
-Name: com/ibm/icu/impl/duration/impl/RecordReader.class
-SHA1-Digest: otdlfBIBwfQJI/LpPGORqmfxHAY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_BH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ScopeData.class
-SHA1-Digest: CUN2vXzRoglrcSJRSshk6n63o0s=
-
-Name: com/ibm/icu/impl/data/icudt40b/iw_IL.res
-SHA1-Digest: Ndcrw5xpVXzCNkJpNiv+lI2hixc=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/sent.brk
-SHA1-Digest: rwPeAXtahzYyDrqpj5CIEVTPsjw=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_HK.res
-SHA1-Digest: BZjNWQ71w2GNk/axQyDNqy41bfA=
-
-Name: com/ibm/icu/text/BreakIteratorFactory.class
-SHA1-Digest: xh+HZgIXUL0MwPwEYNJKFL/1xPE=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_LU.res
-SHA1-Digest: ej6KHf0lX8gJXJRBojkkTBH78vk=
-
-Name: com/ibm/icu/util/DateTimeRule.class
-SHA1-Digest: 6Y2wXwNKzW42QtQFndLjZ5eA2Vs=
-
-Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieHeader.class
-SHA1-Digest: Lvk8zfGOkbWKdXgHfCdB/5w8qhg=
-
-Name: com/ibm/icu/lang/UCharacterDirection.class
-SHA1-Digest: mzsqJB3oC2e9hT9G3B+QQ8lNOvo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ko_KR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$SolarLongitude.class
-SHA1-Digest: C+U0AZa67vUwMns4qF4TRna4Qw0=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32_BE.cla
- ss
-SHA1-Digest: TwM3Y0RU/24b0vY2ND6aAzh5IOU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mr.res
-SHA1-Digest: bfTLwBFNoTnML4knO4RJmQXslcM=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Latn.res
-SHA1-Digest: jq7Gzy1SJqJvCEX7Kr4wHzfear4=
-
-Name: com/ibm/icu/text/TransliteratorIDParser.class
-SHA1-Digest: gIkT1ALBXArAjCoC5O6xiugzImo=
-
-Name: com/ibm/icu/text/BreakIterator$BreakIteratorCache.class
-SHA1-Digest: phLZKKu4L32+t3q5BhoPs59gUSM=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/eo.res
-SHA1-Digest: PJHYa+tlTlD3oSNEcjMdPfD9RBQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/it.res
-SHA1-Digest: tGln+K1qm0TbanoLfrNVSQ+xuJQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/as.res
-SHA1-Digest: 5cGz2/Zt2kRSPL6s+lpWaKmaYeM=
-
-Name: com/ibm/icu/impl/OlsonTimeZone.class
-SHA1-Digest: ScTx1h8Y6zS3i1LS+CfxeZ0vB/U=
-
-Name: com/ibm/icu/impl/data/icudt40b/in_ID.res
-SHA1-Digest: 8zlBXCvSDwjZG5pjJeRB/oOjkYQ=
-
-Name: com/ibm/icu/impl/RelativeDateFormat.class
-SHA1-Digest: aOVOuyO14f3Iv1luLGbNF47b/dk=
-
-Name: com/ibm/icu/impl/data/icudt40b/sl_SI.res
-SHA1-Digest: ruw+sDe2ietW6vAdNMPYSRMLOE0=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodFormatter.class
-SHA1-Digest: YQxVtZg5JGrmmU+2ORW4dsAnhhY=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_ZA.res
-SHA1-Digest: 4hinDLNejYPf5hJfsBtzzf34zXQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/it_IT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/UPropertyAliases$NameToEnum.class
-SHA1-Digest: C1QPFFxwQ5RxZBplypwCO3L6CMg=
-
-Name: com/ibm/icu/impl/data/icudt40b/translit/root.res
-SHA1-Digest: SM2EWnMV0aAeF4smpQItm8S/jPE=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder.class
-SHA1-Digest: SybX4sTXAEHaYJdYogcpBmeDHFE=
-
-Name: com/ibm/icu/impl/duration/PeriodFormatterFactory.class
-SHA1-Digest: Gz2jDCMozbAi0EtSygOfpwiDEaU=
-
-Name: com/ibm/icu/text/EscapeTransliterator$7.class
-SHA1-Digest: Z7n+wBbeA8TUZHsmYBlqk13sMzY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fi.res
-SHA1-Digest: 51I4YNtJSQmXDwUS0TpBiGkAI9I=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_TN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/lang/UScriptRun.class
-SHA1-Digest: w95JD/6qCUnxRZfmQTKPmPKrvWM=
-
-Name: com/ibm/icu/util/MeasureUnit.class
-SHA1-Digest: Lm2xF6VH+OjPTxITaAOlgBpG12k=
-
-Name: com/ibm/icu/text/RuleBasedCollator$shiftValues.class
-SHA1-Digest: iqFJFznuvJ8QiNSRh8boK5ca34c=
-
-Name: com/ibm/icu/impl/data/icudt40b/ha_Latn.res
-SHA1-Digest: gUjIMR75waYbR9kdGpiz7Ke2hTY=
-
-Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022KR.class
-SHA1-Digest: uIlFjt23o0muOFs/AzAwDT/30n8=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_JM.res
-SHA1-Digest: FHGJGmczIq7FVSZJMk+8Io4xTpA=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$4.class
-SHA1-Digest: VbbBBBlf7X8KBWgLvQAzkycRwTM=
-
-Name: com/ibm/icu/text/Collator.class
-SHA1-Digest: 4Jg1NegpftR41WkbHYjyqwx3iO0=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/ga.res
-SHA1-Digest: diM6xlOrTN4n6H3tbBrbabIOduE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_DZ.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_PE.res
-SHA1-Digest: Qm3Aj4ae7YtvgVsF3Cl3UwgbSj8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ko.res
-SHA1-Digest: hTo5Jakbx3YMROBJRtDRZhu+k/s=
-
-Name: com/ibm/icu/text/UnicodeFilter.class
-SHA1-Digest: my9i+rgEySYx94ptWNTO7DEK0CI=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc.class
-SHA1-Digest: JyXQVNCIPLJ3ETcNa/dGzQw07Jg=
-
-Name: com/ibm/icu/impl/UCharacterName.class
-SHA1-Digest: JEvKHqhpR6YEcE0KICaAkE0MDN0=
-
-Name: com/ibm/icu/text/ReplaceableContextIterator.class
-SHA1-Digest: uh1kGQxSFFvCdOfvwtMV/RFp+eM=
-
-Name: com/ibm/icu/impl/PatternTokenizer.class
-SHA1-Digest: gs1cCTRtoRWvrb+oFfectqAAqKM=
-
-Name: com/ibm/icu/text/UnicodeDecompressor.class
-SHA1-Digest: P0CxO6PopQd9eYsRcbgFjhhJAAo=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord.class
-SHA1-Digest: yQwxbsPMAMJZtW92px2Azs09o+k=
-
-Name: com/ibm/icu/util/DateInterval.class
-SHA1-Digest: odg/iqH8T1pWPchh5BUgYq5HFX0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de_DE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/no_NO.res
-SHA1-Digest: AgYfyOH+DuzgYK7m3vioTfRNJGM=
-
-Name: com/ibm/icu/impl/UCharacterUtility.class
-SHA1-Digest: RYgGg5aVfygChVLyTQtG7xXr5wE=
-
-Name: com/ibm/icu/text/RemoveTransliterator$1.class
-SHA1-Digest: adHlF+kCdJ8Wpc4GRnP5ZOoybWY=
-
-Name: com/ibm/icu/lang/UCharacter$WordBreak.class
-SHA1-Digest: zJGbZhxPqMpVRK0/corQLR+o4dY=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/pl.res
-SHA1-Digest: tLEbU+xcBiULse6VbbZRdNgxcd0=
-
-Name: com/ibm/icu/text/RuleBasedCollator$Attribute.class
-SHA1-Digest: 8sK3ftAAk+yvM8ElgkX7lH50YuU=
-
-Name: com/ibm/icu/util/CurrencyServiceShim$1$CurrencyFactory.class
-SHA1-Digest: BKDqfNuidFYkbVc2arHWlh4IrPg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pa_Guru_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/el.res
-SHA1-Digest: s5Z7D0U4/6e+RAR6264cEHyXBGo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Cyrl_ME.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/RuleBasedCollator$DataManipulate.class
-SHA1-Digest: hn7tPwffVpqHMlzCJTK0MvHPNu4=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator$FormatParser.class
-SHA1-Digest: pQhwHjMyKYPOTHWQNL/cjGYwNgU=
-
-Name: com/ibm/icu/text/RawCollationKey.class
-SHA1-Digest: 3p8QSf4RMy7FWuzJxVK0vTyzxm8=
-
-Name: com/ibm/icu/impl/StringPrepDataReader.class
-SHA1-Digest: 5+x+D/q2Tfss85/OnRNjggZLa+8=
-
-Name: com/ibm/icu/text/PluralRules$AndConstraint.class
-SHA1-Digest: dtzHJ/r79wfCk0Q5QMDUIo/zhtY=
-
-Name: com/ibm/icu/util/ULocale$Type.class
-SHA1-Digest: +MHd8j/Ue1Ymr1Uz9uJGOffTKps=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/uk.res
-SHA1-Digest: cRmtsGmWiiPUpyqvFuSfyN49ve0=
-
-Name: com/ibm/icu/impl/data/icudt40b/km_KH.res
-SHA1-Digest: j3vj7M96eDiCBgcqjKURIkXspcQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/ur_PK.res
-SHA1-Digest: mrlv0XI7yuqMhyWbk5vI6pIKkT4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr_FR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodFormatterFactory.class
-SHA1-Digest: 93Ha1HovBfFi0sXu/RlW024g4qQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/nl_NL.res
-SHA1-Digest: ZhCUrYfyqQK8VgHNixAJfsN0EHs=
-
-Name: com/ibm/icu/impl/data/icudt40b/tr_TR.res
-SHA1-Digest: 9ayr7p0RXC2YnnTNoYNovRzaAzQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_AR.res
-SHA1-Digest: 99Yuu3tRa4ffkuj4nPqlANq6DJc=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fa_AF.res
-SHA1-Digest: OaEIXLVTgIw6jVzaciOoXrRPtqQ=
-
-Name: com/ibm/icu/text/RuleBasedCollator.class
-SHA1-Digest: DOpqRG+qed0xiQijmi7rStYb4dE=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_ar_EG.xml.escaped
-SHA1-Digest: 2Q/54oo+NhU+n5wxhYxSFjTVB84=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kk_KZ.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Latn.res
-SHA1-Digest: hVqDFTSGoarQj6zwl/deodCudYU=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/en.res
-SHA1-Digest: By1E1pLwYmFvl2TDQsLCBD9GluI=
-
-Name: com/ibm/icu/impl/data/icudt40b/so_ET.res
-SHA1-Digest: Cm9Y0IiKUp6RCu7IpAhigH3dd28=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_HK.res
-SHA1-Digest: speOMn/V2KXsedph/5CkSZvBY08=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar.res
-SHA1-Digest: lGD8/doSqAswKSloGV4cFRX+d3g=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$IDEnumeration.class
-SHA1-Digest: 74amdxMNJNhmTUp/bulLHwa6i2c=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nb.res
-SHA1-Digest: dAkrnnQkw9FNKWa0lXk+Icg9Jvc=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es__TRADITIONAL.res
-SHA1-Digest: FmpAb3TmF+UYaintHRcBMM2MgOc=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_LI.res
-SHA1-Digest: /j6rJXRkitJFP6NzkM92KN749fI=
-
-Name: com/ibm/icu/text/BidiLine.class
-SHA1-Digest: jKOX3AurU/M65CYpHs3YvYETEek=
-
-Name: com/ibm/icu/impl/StringUCharacterIterator.class
-SHA1-Digest: ekMX227GRJphyERiR/umNms9kM4=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/res_index.txt
-SHA1-Digest: P8o73a+SnnEk+LCAFPsyRCOUg84=
-
-Name: com/ibm/icu/impl/data/icudt40b/fo_FO.res
-SHA1-Digest: G1tSRKiB2s0ik5YShpzV7z84/W0=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_AF.res
-SHA1-Digest: 3kSYT3BSkfVCuxqLdPwlECtg5XA=
-
-Name: com/ibm/icu/util/ValueIterator$Element.class
-SHA1-Digest: Z/T9wKiHNB+APS2ppz/rMGcZNDM=
-
-Name: com/ibm/icu/impl/data/icudt40b/or_IN.res
-SHA1-Digest: E3IjbWd9g098ARz5k3S8h/CH8GM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/res_index.txt
-SHA1-Digest: aisV6KC4AdKwRa7caKTq5sxiC/I=
-
-Name: com/ibm/icu/impl/ICUDebug.class
-SHA1-Digest: 5boW5TxFT20DOHt5Wt/6PpTHviY=
-
-Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStringSearchResultHandler.
- class
-SHA1-Digest: LMx6fX9ssgic1h0nl2dKtKoN06k=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/vi_VN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/ULocale$1.class
-SHA1-Digest: 5EERAd4FJLes/tjJVD7LTjYLVrU=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_5_ru.class
-SHA1-Digest: d03t1ZW1vjvrb6OtTn8Ce4erHEU=
-
-Name: com/ibm/icu/impl/data/icudt40b/ha_Latn_NG.res
-SHA1-Digest: KZepP8eU9CQCLRIiUEhGZTN1/9k=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_NA.res
-SHA1-Digest: EDALbI/hd/oAy2XqrvaWtQUY86g=
-
-Name: com/ibm/icu/impl/CalendarCache.class
-SHA1-Digest: 978G+98m5Rh9L1p42o178Ly9eKs=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceTable32.class
-SHA1-Digest: WPNlKMDc2Tuy/gugJ/bvNQR8L0w=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_fr.xml
-SHA1-Digest: U8Q6ytKBKHaqtz4hPkJT6Iqxr88=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sh.res
-SHA1-Digest: 5xIT4uaABWOSZbAPadn5pBVATSA=
-
-Name: com/ibm/icu/impl/data/icudt40b/cy.res
-SHA1-Digest: jHbYTZhi7eIOcDiw2rUen4YPHEE=
-
-Name: com/ibm/icu/text/DateIntervalInfo$PatternInfo.class
-SHA1-Digest: iacFJmIL24zVqePHDGTBOWefAFQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/om_KE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/RBBIRuleBuilder.class
-SHA1-Digest: lg7MPOym9rNtMJUUA8ulzJGlDS8=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32_LE.cla
- ss
-SHA1-Digest: X95uQTiQ2wmoXpevIRmZTrG3YRQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/sv_FI.res
-SHA1-Digest: CAsp9M5OuA+phWey/IhJwnCbDlY=
-
-Name: com/ibm/icu/impl/data/icudt40b/nn_NO.res
-SHA1-Digest: rgPmGVUb9Y/IOdVYtWCKbi2jow0=
-
-Name: com/ibm/icu/impl/data/icudt40b/am_ET.res
-SHA1-Digest: eAx+UeibP8E9Wto2cmUyopQRw8Q=
-
-Name: com/ibm/icu/impl/data/icudt40b/az_Cyrl_AZ.res
-SHA1-Digest: UHkUxJybdczBqlBmTsapOS+VIao=
-
-Name: com/ibm/icu/text/TransliteratorParser$RuleBody.class
-SHA1-Digest: S553okNpfAHCKnzwyKY7B+22Nsk=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kn.res
-SHA1-Digest: bfTLwBFNoTnML4knO4RJmQXslcM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sh_BA.res
-SHA1-Digest: vYOnYIQEmwDnRfySDiGCAZETvgI=
-
-Name: com/ibm/icu/util/CompactCharArray.class
-SHA1-Digest: HTvkUkdGiggb8cA8jgTTErrJDKY=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_SG.res
-SHA1-Digest: pr3YxzV26CJbtcYoZQZ6Zs48cJg=
-
-Name: com/ibm/icu/impl/data/icudt40b/lt.res
-SHA1-Digest: 9YE7qdtQEpde0mRGtLRQv6lF6dY=
-
-Name: com/ibm/icu/impl/data/icudt40b/gv_GB.res
-SHA1-Digest: 9ayr7p0RXC2YnnTNoYNovRzaAzQ=
-
-Name: com/ibm/icu/lang/UCharacter$JoiningGroup.class
-SHA1-Digest: RFbRF6cgexKGY8nzvWunz1c+lRs=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/word_POSIX.brk
-SHA1-Digest: 00DSOECJVSNJlHmt6DIfMhico7o=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_ja_JP.class
-SHA1-Digest: 94Q//J7nEmgNgIHchnp3upyZK80=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_AE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/TransformTransliterator.class
-SHA1-Digest: Bp5EzBliTjSPluXDEnQ2DTLVlSY=
-
-Name: com/ibm/icu/text/PluralRules$ConstrainedRule.class
-SHA1-Digest: 9dgnPrg4GeLyqAsy4k+NONmky1g=
-
-Name: com/ibm/icu/impl/data/icudt40b/ta_IN.res
-SHA1-Digest: vVhgwD0EbrcznlWi4rwRoaQFnV4=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_CH.res
-SHA1-Digest: Tn9xSpsA5GwQWjURFrOJ3PkxxH0=
-
-Name: com/ibm/icu/text/IntegralPartSubstitution.class
-SHA1-Digest: TpSmcVNsIPtTQutvMY/1h5r0QF8=
-
-Name: com/ibm/icu/text/RBBIRuleScanner.class
-SHA1-Digest: 0RP3vDuerOEXvN9NKZne6g4wAwA=
-
-Name: com/ibm/icu/text/RBBIRuleScanner$RBBISetTableEl.class
-SHA1-Digest: JpF+4iKnyWa++SXFikL1jG9QE2A=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/de.res
-SHA1-Digest: 8J0aUfUPgOzjKjENIXvpOZt27aE=
-
-Name: com/ibm/icu/impl/UCharArrayIterator.class
-SHA1-Digest: fD55q09R46pQmMVkSx1qnl6ZwK4=
-
-Name: com/ibm/icu/impl/data/icudt40b/af.res
-SHA1-Digest: im6KL/LdzTwQ/mkwXSnaX+m9sIg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pt.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/TitlecaseTransliterator.class
-SHA1-Digest: tXpjeR9ROFwNlV9dZ/7tyGMxxzE=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn_YU.res
-SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8_I_he.clas
- s
-SHA1-Digest: iVb3EMhfEZ71txzmEitLojmG6uU=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl.class
-SHA1-Digest: eY4eVJw+5MgftU/m31xLoSUdVEo=
-
-Name: com/ibm/icu/impl/UPropertyAliases$ContiguousEnumToShort.class
-SHA1-Digest: VocwoXZtxBY03CkA/C/toDEVjPU=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hans_HK.res
-SHA1-Digest: CElGmusFN0ZPs8Bp98QNTJEc/j8=
-
-Name: com/ibm/icu/impl/data/icudt40b/az_Latn.res
-SHA1-Digest: 7q24aHSQvUkVuTB/3x/cUI63kEk=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_en_US.class
-SHA1-Digest: mfCx2hYc8gNROIoHOAWQvReUKBk=
-
-Name: com/ibm/icu/util/RuleBasedTimeZone.class
-SHA1-Digest: HxVjW9VAJOwSxr0ARCJVWuSYh+U=
-
-Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieHorizontalNode.cla
- ss
-SHA1-Digest: 8ubK2FFiCZ8rL211dzKm7vhqZw4=
-
-Name: com/ibm/icu/impl/duration/PeriodFormatter.class
-SHA1-Digest: fgmgm7tQREqM8kA9uECAJQvWXcA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ja.res
-SHA1-Digest: ZjpDKSH+7nmYt6vEoAwCCotJUHo=
-
-Name: com/ibm/icu/impl/ICUData$3.class
-SHA1-Digest: SNoX0DZtpC0NoTAfFC8Skxnk19c=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hans_CN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/is_IS.res
-SHA1-Digest: RkfxcM/+lVWsYAFZjo8U3j/R3fc=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$CompoundRBTEntry.class
-SHA1-Digest: EPnpi9TAxVaO3NeV1adWIdFgrYk=
-
-Name: com/ibm/icu/impl/data/icudt40b/bg.res
-SHA1-Digest: yWJwc2veOcyOZZRnLaydMkvzQYs=
-
-Name: com/ibm/icu/impl/ICUBinary$Authenticate.class
-SHA1-Digest: L3EQHZn7xcd114K4mUWT1FJmgiM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_BW.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nb_NO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/InvalidFormatException.class
-SHA1-Digest: KQj97EUEqC/UjllyMtFzgCozy9s=
-
-Name: about_files/ucdterms.txt
-SHA1-Digest: VSl7MUMAroQl6WS17r4Mov82WGE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/et_EE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/SCSU.class
-SHA1-Digest: gtL+Jw2NeLaYqamDE4o+5Mj8fwI=
-
-Name: com/ibm/icu/text/NormalizationTransliterator$4.class
-SHA1-Digest: zxwhI6zKlhVTIwG+EoxHm5GuwsI=
-
-Name: com/ibm/icu/impl/duration/TimeUnit.class
-SHA1-Digest: +J6ylhxAa9t5D3hJsleaDIcefRo=
-
-Name: com/ibm/icu/impl/UCharacterProperty.class
-SHA1-Digest: EGf0odFveR04ELoJmanxuz3cznQ=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hant.xml
-SHA1-Digest: +wXcNbrrm98Vj1YeEQT4BytIUxY=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_PY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceArray.class
-SHA1-Digest: n20Yw5n5uQ+BIumrifw1rJ+ib4Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/ja.res
-SHA1-Digest: JvSF9gjOLJGjbnDwtW+adnCvW0E=
-
-Name: com/ibm/icu/util/OverlayBundle.class
-SHA1-Digest: VA09j//ouBzZfRljhs43EWH1UWg=
-
-Name: com/ibm/icu/impl/UPropertyAliases$EnumToShort.class
-SHA1-Digest: qCCoaX1zSCkCReWgxReTup/2G44=
-
-Name: com/ibm/icu/impl/data/icudt40b/sl.res
-SHA1-Digest: wBZBHUV/AaDl2cvB0yZzvPs7H/Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fi_FI.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ru_RU.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pa_Arab.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/kn_IN.res
-SHA1-Digest: lAvzIGepyhgppxhCwc8Hyj5bXgo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_LB.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/util/Range.class
-SHA1-Digest: Gdt1lwgw36pXsWkU5+00HqS3QIg=
-
-Name: com/ibm/icu/text/CollationParsedRuleBuilder$MaxJamoExpansionTabl
- e.class
-SHA1-Digest: Eok++JuBprd94P5XKo5qwmWXWrU=
-
-Name: com/ibm/icu/impl/duration/DateFormatter.class
-SHA1-Digest: oJjB/+u4BmY6gz/1nLFC/kPqZwk=
-
-Name: com/ibm/icu/text/Normalizer$NFCMode.class
-SHA1-Digest: WfCJwh7saeRB031INtF1nyrY/eA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_PH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/TransliteratorParser.class
-SHA1-Digest: IKXStwXEKSaiKeU9Ao5AK6T29+U=
-
-Name: com/ibm/icu/impl/IntTrie.class
-SHA1-Digest: Emz1DpkrwDLpkWJrLwen4ogwy38=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Latn_BA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$4.class
-SHA1-Digest: TWFpivaDmTZyNPWR0TZvAtsI/nQ=
-
-Name: com/ibm/icu/util/LocaleData$MeasurementSystem.class
-SHA1-Digest: clMI0Fy8Q3cp0F/yjo6u6mgC9qg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/uk_UA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/UppercaseTransliterator.class
-SHA1-Digest: K65rOhkHFPPJvTXVS2GDDskDrTw=
-
-Name: com/ibm/icu/lang/UCharacter$LineBreak.class
-SHA1-Digest: WedFMmAGGCS+5uNafKaQHQNgmb4=
-
-Name: com/ibm/icu/util/TimeUnit.class
-SHA1-Digest: 5hSdHC5A8xfl4EXMWgiMzmvpTb4=
-
-Name: about.html
-SHA1-Digest: P+UYtCGGWcwXuKpa1z+qM3ufNLs=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_CN.res
-SHA1-Digest: OqOcERNgY90GdftreFDuBO3TG1M=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pa_Guru.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/km.res
-SHA1-Digest: 3OQrrlEjbm4f9qSur3ZjMl7c4LM=
-
-Name: com/ibm/icu/impl/data/icudt40b/he_IL.res
-SHA1-Digest: AC21nXWeBW8Y4D8lBWLG+JeqxDs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/or.res
-SHA1-Digest: fesWFTDfaQovI9ATKSgn/UqlU18=
-
-Name: com/ibm/icu/util/TimeArrayTimeZoneRule.class
-SHA1-Digest: JrMCVEvM6EXDzfMLF4hLxx/UTu8=
-
-Name: com/ibm/icu/impl/BOCU.class
-SHA1-Digest: 5zGkejToe99lZmFfgN60Aw1CGLg=
-
-Name: com/ibm/icu/util/RangeValueIterator.class
-SHA1-Digest: C7gsvse8Hi7kFuiOsp6IH6N6LZs=
-
-Name: com/ibm/icu/impl/duration/impl/YMDDateFormatter.class
-SHA1-Digest: 04ea5xJyxIHWp8noFNHjcF8WY/M=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$ResourceEntry.class
-SHA1-Digest: enFBOMFozjzH7zQDyyzk5JQMSyI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/cs.res
-SHA1-Digest: FVXF9o0FCrBBra8pzLJSj5rmbA0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/th.res
-SHA1-Digest: BhI1ovzrtSddK8Dd4mgrl4wRIF8=
-
-Name: com/ibm/icu/impl/data/icudt40b/uprops.icu
-SHA1-Digest: 8vLNyqXGunE4QYH2blIKAhRC1JA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_MT.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/NormalizerImpl$NormTrieImpl.class
-SHA1-Digest: GBex0A5HCO3NbnOqR1hsq7uCKdM=
-
-Name: com/ibm/icu/text/PluralRules$RangeConstraint.class
-SHA1-Digest: Jy5DS3I7FC3ZI7zZVBLoEPHZuG8=
-
-Name: com/ibm/icu/text/NFRuleSet.class
-SHA1-Digest: 1GByNNvXKrSTMnA9hus0dsma2ZQ=
-
-Name: com/ibm/icu/impl/ICUBinaryStream.class
-SHA1-Digest: hwmYmhWRwl1SLll0fs1fViSKoKk=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hi.res
-SHA1-Digest: x/FrWUZkCIb9KOqtD1ItfaFRsY4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_SG.res
-SHA1-Digest: 99MTdXPuizTQKIDtoLc37T5PHW0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ps.res
-SHA1-Digest: Ps2g5yWyudWQpUz25Y0dPXMwvLI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_AU.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/mt.res
-SHA1-Digest: d/IUeDKzkpGIv4ka6fLqAbfAzqU=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn_ME.res
-SHA1-Digest: nR+fxF5FDeDc1FJ13CkchISgcrI=
-
-Name: com/ibm/icu/lang/UCharacterCategory.class
-SHA1-Digest: DKoDFXBwKD0rTGW0gmri0Gv1V1M=
-
-Name: com/ibm/icu/text/Transliterator.class
-SHA1-Digest: DRWD3gvRhdyY2n/onQtUkH/d+lk=
-
-Name: com/ibm/icu/impl/Assert.class
-SHA1-Digest: 7EflTLK1aav09w+8J9byWrzxwJ8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_JO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EHalfSupport.class
-SHA1-Digest: xaZ+Li5POYKVmpZR06xzhQbgAYA=
-
-Name: com/ibm/icu/text/SearchIterator.class
-SHA1-Digest: eSteDarFySmrnoW7QrhHbfS2eiU=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_UY.res
-SHA1-Digest: hWGILRGHUmF86E6NRPWolO4+Lu8=
-
-Name: com/ibm/icu/impl/duration/DurationFormatterFactory.class
-SHA1-Digest: e6pCRwBCGl1NmEZzElE0lt+Tf5Q=
-
-Name: com/ibm/icu/text/NameUnicodeTransliterator.class
-SHA1-Digest: xKXUkrHKrAt4N+ALLEuv/LRumKw=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_ar_EG.xml
-SHA1-Digest: 4cLOSYkD1EoYG/amrhZniv3Igmg=
-
-Name: com/ibm/icu/impl/data/icudt40b/ne.res
-SHA1-Digest: ua4O7EqxGYhzF4j9Lae/mbg4Lw0=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hant_HK.xml
-SHA1-Digest: ws9sUv/ZF1stls2/7dm6Dctxaxg=
-
-Name: com/ibm/icu/impl/TextTrieMap.class
-SHA1-Digest: i01hKmZ+v9n2opn7bBp8Ekh4DmI=
-
-Name: com/ibm/icu/impl/data/ResourceReader.class
-SHA1-Digest: KvaIhFKr51gH4b5+O0z6jeVOxKQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_BA.res
-SHA1-Digest: 6q0h04Ey+gEIoBcrzyHzzX1kkzA=
-
-Name: com/ibm/icu/lang/UProperty.class
-SHA1-Digest: twc3qgeSyXtpY7eshpN6PrAr9Eo=
-
-Name: com/ibm/icu/text/Bidi$LevState.class
-SHA1-Digest: hm7ATFUkZNGKBm88ZmXjf3KiWK8=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_MC.res
-SHA1-Digest: NU5b4Hkf/mEDVYAA3T3uoLY6Ceg=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$Ecliptic.class
-SHA1-Digest: fpxm9HdwYfU8XsM2YRX/Ez8LqHU=
-
-Name: com/ibm/icu/impl/duration/PeriodFormatterService.class
-SHA1-Digest: AMUsoC/LowGM8ijioxYAKxEAi7c=
-
-Name: com/ibm/icu/impl/NormalizerImpl$ComposePartArgs.class
-SHA1-Digest: JECwXa9jCR5hR94sygRyPH+MfiY=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Latn.res
-SHA1-Digest: AC6xU/ExvRA9AP/QzqlLyQB7f5g=
-
-Name: com/ibm/icu/util/Freezable.class
-SHA1-Digest: Nett7+AkkXCiNnrJnxflPvqpmL8=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_it.xml
-SHA1-Digest: R3SsAd0XOpq/q4qhEPR0YEkLj3U=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/fr_CH.res
-SHA1-Digest: 0BG9gdncljECD6SegylAscqiVcA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_HN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hans.xml
-SHA1-Digest: NptAdDNpDmgZI2/4D116fCGYm/g=
-
-Name: com/ibm/icu/impl/URLHandler$JarURLHandler.class
-SHA1-Digest: 0VxcRVI+Vxl9YOEnZcJsyz8HxkM=
-
-Name: com/ibm/icu/impl/data/icudt40b/ka.res
-SHA1-Digest: +0IeAlpua7Yo93DC8P3C5Oh0aSw=
-
-Name: com/ibm/icu/text/BreakTransliterator$ReplaceableCharacterIterato
- r.class
-SHA1-Digest: cwcoXguflrDaGjAiatJfM62U/So=
-
-Name: com/ibm/icu/impl/data/icudt40b/sk.res
-SHA1-Digest: WZByy4wpiCN+Qm+i53Jh36TyFO4=
-
-Name: com/ibm/icu/text/Normalizer$IsNextNFDSafe.class
-SHA1-Digest: HjqQUnj1PZDJ6LWbo4bH4Dy/Nmc=
-
-Name: com/ibm/icu/text/StringPrep.class
-SHA1-Digest: DOeZLYykH5j+oF7vXNeMLPFlZcg=
-
-Name: com/ibm/icu/text/SameValueSubstitution.class
-SHA1-Digest: I0Yb/iaWoL/Q9SmDdVKSI2PDow8=
-
-Name: com/ibm/icu/text/BidiWriter.class
-SHA1-Digest: A55m2XvTflUUWjb06MWmUIQZ/r4=
-
-Name: com/ibm/icu/util/CalendarServiceShim$1$RBCalendarFactory.class
-SHA1-Digest: 2YX6s5iEVSM09fEEo9af6TIxI8w=
-
-Name: com/ibm/icu/text/NumberFormat.class
-SHA1-Digest: 7iCNtl1FdcDO/90u1aGhUw13jXg=
-
-Name: com/ibm/icu/text/Replaceable.class
-SHA1-Digest: P9D/42FBm3mI1gq3AcY65zHa1Z0=
-
-Name: com/ibm/icu/text/NullSubstitution.class
-SHA1-Digest: +6wpF/F6MDXvXvoY/e5I0AXXLpU=
-
-Name: com/ibm/icu/text/EscapeTransliterator$5.class
-SHA1-Digest: hgNOnYM6NClu2fcKurTQsExqArw=
-
-Name: com/ibm/icu/impl/RuleCharacterIterator.class
-SHA1-Digest: sBDGFbddtrFMZ+nuE/bOogHcYGo=
-
-Name: com/ibm/icu/util/CurrencyServiceShim.class
-SHA1-Digest: 3WT0WExVrjao5LldttE1zyrYqXU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ru.res
-SHA1-Digest: CZqbE+e4gk0W7H8gkPTqDBmxyPY=
-
-Name: com/ibm/icu/impl/ICUResourceBundle$AvailEntry.class
-SHA1-Digest: Feq/Kt+oQJgMA5/1A14EqT7GG2Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/gl.res
-SHA1-Digest: ru0X4vbkqhQkHb+phbE2wplfu3w=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/thaidict.ctd
-SHA1-Digest: gVXFdzI5HRQFyRNxiLJh5P9n9bQ=
-
-Name: com/ibm/icu/impl/TrieBuilder.class
-SHA1-Digest: swpyE6nI4Sr7KpJbd42Y0cERBzs=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_VI.res
-SHA1-Digest: BuisaL6VJz1qQcXdQFGlx3HghJ4=
-
-Name: com/ibm/icu/impl/data/icudt40b/kw_GB.res
-SHA1-Digest: 9ayr7p0RXC2YnnTNoYNovRzaAzQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_MO.res
-SHA1-Digest: K0sKinko64INKTDfbkgnrEzo0W4=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_9.class
-SHA1-Digest: klATjnYZa7AjiLlI8tt8eToz6ng=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_SV.res
-SHA1-Digest: VTS63fHAc8/xW+f7EEjrV+OwqCE=
-
-Name: com/ibm/icu/impl/data/icudt40b/fr_BE.res
-SHA1-Digest: OmN4KFDhTirTzjTH5Qbcb6OzuFA=
-
-Name: com/ibm/icu/impl/data/icudt40b/uidna.spp
-SHA1-Digest: tqFgaA9mZKzEeyVBJHP3C3fLH5w=
-
-Name: com/ibm/icu/text/RBBINode.class
-SHA1-Digest: oR1BJYBbEC9i1uC84s7oLN237ZU=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$2.class
-SHA1-Digest: bo4DZ9p24LQ5XQYJVaZxkWr/JJ0=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_SD.res
-SHA1-Digest: UHYhQtrBrQHYhQdUuQnB0EI4oZc=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_CR.res
-SHA1-Digest: U6mv7o2V2wFMDKGHdlTBBckrpfs=
-
-Name: com/ibm/icu/text/CollationRuleParser$TokenOption.class
-SHA1-Digest: X5GQBJR2uKMv0v6z9Ni79EHUiZ0=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_ro.class
-SHA1-Digest: T/ma+SRhOBjrCrOAKtsjfoRR0Zk=
-
-Name: com/ibm/icu/lang/UProperty$NameChoice.class
-SHA1-Digest: yFtZ9Irist4OxZVIo2vlmVFMR+o=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kl.res
-SHA1-Digest: 7n/lQ8es5K8UPNoAn0zN2y0q+UU=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hans_SG.res
-SHA1-Digest: 4kDCzE34cyv+VWN1yRZ+AI5xWCM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sv.res
-SHA1-Digest: kW6wLzmideDpOobOit/X5sik+HU=
-
-Name: com/ibm/icu/impl/data/TokenIterator.class
-SHA1-Digest: aVl9NEiavWU3YjMYXsmRqECSMcA=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_PR.res
-SHA1-Digest: cR58xMbAcvnXtZd0uZC22MH0HIU=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_CA.res
-SHA1-Digest: PDP/oon1Mxes6lRTEiteVt7QH2w=
-
-Name: com/ibm/icu/text/CanonicalIterator.class
-SHA1-Digest: xnw2H+5eqcNRKWtbdizobk+l3cw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/IntTrieBuilder.class
-SHA1-Digest: ZR3vLaX/II6ocmZnF1dab3EX7jo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/bg_BG.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kl_GL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CharsetRecognizer.class
-SHA1-Digest: ULmVva2M/Asi4KaInjapEMNfMvg=
-
-Name: com/ibm/icu/text/RBBITableBuilder$RBBIStateDescriptor.class
-SHA1-Digest: 5CbyXkVPOCRgvm43RVB1fSE8vdk=
-
-Name: com/ibm/icu/text/Normalizer$NFKDMode.class
-SHA1-Digest: hGcahPb4PoOii4Nm7MUVXKgV3Pg=
-
-Name: com/ibm/icu/impl/data/icudt40b/in.res
-SHA1-Digest: 4yHeO3OZURAGnQ+2Akh1AsFcJ6M=
-
-Name: com/ibm/icu/text/BreakIteratorFactory$BFService.class
-SHA1-Digest: trG7yIeZRtCmuuC+oW1rJ3ILKi8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/da_DK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ms.res
-SHA1-Digest: d1+D/maLPtNLN+HGNSatQy++waA=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodFormatterService.class
-SHA1-Digest: /IhFZk0vqWB/qEymixjz0UUB6XU=
-
-Name: com/ibm/icu/text/TransliterationRuleSet.class
-SHA1-Digest: z9OCJccykmEAzuzoAQwJy/ZwmTE=
-
-Name: com/ibm/icu/util/Calendar$CalendarFactory.class
-SHA1-Digest: kWkDibAH7A1FOV+vbonLuOIitHo=
-
-Name: com/ibm/icu/text/CollatorReader$1.class
-SHA1-Digest: XfneLo+da605Z0T7kr87N0IzpzM=
-
-Name: com/ibm/icu/ICUConfig.properties
-SHA1-Digest: SCRFZaOrbKPIS/W7+VFVzS5d3nQ=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$ENumberSystem.class
-SHA1-Digest: fnqsq9Lfsiorohk0u/wBJwmRCVM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/gu_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_BE.res
-SHA1-Digest: J5LinINX10g4u4iHkvaeoyfnDxg=
-
-Name: com/ibm/icu/text/CollationElementIterator$Backup.class
-SHA1-Digest: QTiFlEWotNTTMe1M31LxBytjQ8s=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$7.class
-SHA1-Digest: 1COLbKa0Athi2T/UgjA7hFrBhfs=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator$DistanceInfo.class
-SHA1-Digest: qAX3RrBTQ3IU9SNZ71fsx1TYUTU=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_QA.res
-SHA1-Digest: Eyon2u3c0/lFLy07y/fdw9E9O+0=
-
-Name: com/ibm/icu/impl/data/icudt40b/metazoneInfo.res
-SHA1-Digest: CZMRhNFZ3f4UaXE9IPmLpqcFh54=
-
-Name: com/ibm/icu/text/RBBISetBuilder$RBBIDataManipulate.class
-SHA1-Digest: Po1bvO+0klNcFrP5dy8s3h307p8=
-
-Name: com/ibm/icu/impl/TextTrieMap$CharacterNode.class
-SHA1-Digest: s1XpJZR+JPGA7ecglSnL42531qo=
-
-Name: com/ibm/icu/impl/duration/FixedUnitBuilder.class
-SHA1-Digest: P416S2intDofP3mF7ZNqNCMy0UU=
-
-Name: com/ibm/icu/impl/data/icudt40b/be.res
-SHA1-Digest: s08/ngmH+V/KB4i7TGcMQtjjp5U=
-
-Name: com/ibm/icu/text/Collator$ServiceShim.class
-SHA1-Digest: SpGn1WoqPKf9vs7YCrIY8tvv8I8=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Cyrl.res
-SHA1-Digest: qWkj4dGht79KmtujyO3zbyhZYmI=
-
-Name: com/ibm/icu/impl/data/icudt40b/no_NO_NY.res
-SHA1-Digest: 2NYID4Vq+YppdI5emYl/jXROPPs=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_big5.class
-SHA1-Digest: z/Onqges6+n2jM8mPFe65NmKmU8=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_en.xml
-SHA1-Digest: NTwEzV3UZzK2UUBbZoGG9oE1Hig=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/et.res
-SHA1-Digest: 5gO1gNeQ9MbXrVI8ija8J+1eY8E=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_SY.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_TW.res
-SHA1-Digest: FI8SXUxAHIZ4WAdjGjq/j705WQs=
-
-Name: com/ibm/icu/impl/data/icudt40b/zh_Hans_MO.res
-SHA1-Digest: CElGmusFN0ZPs8Bp98QNTJEc/j8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/vi.res
-SHA1-Digest: OqlohIWll4auJ5GzMYsGAJkBO2o=
-
-Name: com/ibm/icu/impl/data/icudt40b/bn_IN.res
-SHA1-Digest: UFlEFzGMpx6ogtpEYWNLghxP5Do=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_Arab_PK.res
-SHA1-Digest: 54obSz+NvCor327seupVYVdOOZs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/id_ID.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/ja.res
-SHA1-Digest: zEfF+/HJwmsG/hzQ4n4bIf/fuWs=
-
-Name: com/ibm/icu/impl/data/icudt40b/hu_HU.res
-SHA1-Digest: 9ayr7p0RXC2YnnTNoYNovRzaAzQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_Arab.res
-SHA1-Digest: i+VVc+bFuH8vV8MVQKXKCT0F3wo=
-
-Name: com/ibm/icu/impl/UPropertyAliases$NonContiguousEnumToShort.class
-SHA1-Digest: PGcslyVHe6P0g7+f91kAhSA/rno=
-
-Name: com/ibm/icu/impl/data/icudt40b/el_GR.res
-SHA1-Digest: A2RjRhMcmBAkqidVuV7/6xVUdJQ=
-
-Name: com/ibm/icu/util/Currency$ServiceShim.class
-SHA1-Digest: YxiWTWXWu5qtGZvRgwioFuPzwNA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/no.res
-SHA1-Digest: QKT2L/mn+LtpRofMA4whD6vFbe0=
-
-Name: com/ibm/icu/text/ModulusSubstitution.class
-SHA1-Digest: ejqkE7UO4iF3YILImA3/n3UKwPY=
-
-Name: com/ibm/icu/text/DateIntervalFormat.class
-SHA1-Digest: YS80IXv7+zt4SKmONHgNAYXucs4=
-
-Name: com/ibm/icu/impl/data/icudt40b/ru_UA.res
-SHA1-Digest: HIHrgsIKksiJYIk+osE7g7frWyE=
-
-Name: com/ibm/icu/text/UnicodeSet$GeneralCategoryMaskFilter.class
-SHA1-Digest: wJC1eFj7CZnmDP5GmtpnJwwPihM=
-
-Name: com/ibm/icu/impl/RelativeDateFormat$1.class
-SHA1-Digest: Mu67qo996RWf6OVrrtMjhr7liDE=
-
-Name: com/ibm/icu/text/DateFormatSymbols.class
-SHA1-Digest: Lbdw+yH5COUKQUyu4WwQ0WIUK00=
-
-Name: com/ibm/icu/text/NumberFormat$NumberFormatShim.class
-SHA1-Digest: xLBy3wJ+kd4RxDc51Y4uq1GHpJs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Latn_RS.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/Trie$DataManipulate.class
-SHA1-Digest: NjCImLHFdiP4sIuw4t+T3gauSsY=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/en_US_POSIX.res
-SHA1-Digest: beFWtWkxc9Yvx9alkk9FkhNbb+0=
-
-Name: com/ibm/icu/impl/ReplaceableUCharacterIterator.class
-SHA1-Digest: SCfl0/ZO54BfqdOBp++1QT4rfpI=
-
-Name: com/ibm/icu/util/CalendarServiceShim$CalFactory.class
-SHA1-Digest: BLNj+HZvoR2oJ1GngEFz2M+5/dc=
-
-Name: com/ibm/icu/text/Punycode.class
-SHA1-Digest: S0lDn5VOPAmHt0ZMsonQK/f5EG8=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_Guru.res
-SHA1-Digest: /U56mex00stt5CppT3sA6/lioUo=
-
-Name: com/ibm/icu/impl/data/icudt40b/sk_SK.res
-SHA1-Digest: rgPmGVUb9Y/IOdVYtWCKbi2jow0=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ca.res
-SHA1-Digest: nTIhqZg7W0/y7mOQM2jOv2ChNBw=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_MA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ga_IE.res
-SHA1-Digest: HAxWzSIhkVEnB+Bb6jNjek4iDe4=
-
-Name: com/ibm/icu/impl/UPropertyAliases$ValueMap.class
-SHA1-Digest: i9yakyznF+uxdpcjA324oR7y9tQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_PA.res
-SHA1-Digest: Ul0GL8ck5E0B5NzazAo+DymIP+o=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/kk.res
-SHA1-Digest: DPf7kyQ1AfvK7COgD6qKIhcbhfA=
-
-Name: com/ibm/icu/util/Calendar$CalendarShim.class
-SHA1-Digest: qPjG7U77CXIItHb6Exlehu6NuFw=
-
-Name: com/ibm/icu/impl/duration/PeriodBuilderImpl.class
-SHA1-Digest: BOf+b5VZrqvW1jgad5N0/unnYDU=
-
-Name: com/ibm/icu/impl/data/icudt40b/ne_IN.res
-SHA1-Digest: QUbuZg3mFrCAEgD1rHlSMeACdTk=
-
-Name: com/ibm/icu/text/RBBISetBuilder.class
-SHA1-Digest: hOwxqGfQ9WZ+C+1viKYFlquVJ6Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ar_EG.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/UCaseProps$ContextIterator.class
-SHA1-Digest: +nY8j0+ipna4v+xfK1dGRgOkPps=
-
-Name: com/ibm/icu/impl/URLHandler$URLVisitor.class
-SHA1-Digest: M6++xkYESTi5/TwYg71K8EXraas=
-
-Name: com/ibm/icu/util/EthiopicCalendar.class
-SHA1-Digest: cZlXcHpU7yDDQrivFoycnC++BFo=
-
-Name: com/ibm/icu/impl/data/icudt40b/brkitr/line.brk
-SHA1-Digest: WAo+2QXIGw8lLfhBjto9GOHExLY=
-
-Name: com/ibm/icu/text/ReplaceableString.class
-SHA1-Digest: UxYu+CpdztHGbYqnZGrVLnZl12Y=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceBinary.class
-SHA1-Digest: f3nrmF+ItqGshFfYle9KMXxQVsU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pa.res
-SHA1-Digest: MT55z9WtL0nDFq9JQkpm0m28Yuk=
-
-Name: com/ibm/icu/util/LocaleData$PaperSize.class
-SHA1-Digest: QMqZnyke/3rRF5PJbPNDqndsBbs=
-
-Name: com/ibm/icu/impl/UCharacterProperty$BinaryProperties.class
-SHA1-Digest: 88MTxoOMUU86d/+Rc+zp/hlpn90=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/it_CH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ti_ET.res
-SHA1-Digest: fypOFvd1bfwL6YkMWRsrgZ1XbG4=
-
-Name: com/ibm/icu/text/Normalizer$IsPrevNFDSafe.class
-SHA1-Digest: FEvTne7AOYLR7yBDdbToaG5OzNs=
-
-Name: com/ibm/icu/impl/duration/impl/PeriodFormatterDataService.class
-SHA1-Digest: NlLuVww7FdYnMgZsWlql28eWh+E=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceString.class
-SHA1-Digest: NyTmwv3AMT6t/Sdgv0HU1yhA47g=
-
-Name: com/ibm/icu/text/ChineseDateFormat.class
-SHA1-Digest: HEa6lg0RW+Z6yzvo703yrJFOLWA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sh_YU.res
-SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
-
-Name: com/ibm/icu/impl/data/icudt40b/mr.res
-SHA1-Digest: 6NkQpkQBbdWRV/ksHo2bboyGf40=
-
-Name: com/ibm/icu/impl/data/icudt40b/ja_JP.res
-SHA1-Digest: K2WisqO0fUxgMHnayk9p/K2H1Ko=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_EC.res
-SHA1-Digest: jlwpItGsqvys1RFr0aBTuJBh47I=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/fr_BE.res
-SHA1-Digest: zkcU25Kf0+n8wxrJz3kBBza4xiI=
-
-Name: com/ibm/icu/text/NFRule.class
-SHA1-Digest: Rx9mug/qARQn0CQx6EgEv3p9sXY=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_de.class
-SHA1-Digest: ygZcTpEeS+fUbX2LmGkujQog71U=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
-
-Name: com/ibm/icu/impl/data/icudt40b/as.res
-SHA1-Digest: 5oDf34T4BYZX0SFRsw0oBuFz1Jk=
-
-Name: com/ibm/icu/text/StringMatcher.class
-SHA1-Digest: xITSJP51+Xr6DNo/i7rkfcjYb5M=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hant_HK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode.class
-SHA1-Digest: TEkDt3CyBmLK35HAONcI0Z4Oq0M=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$CoordFunc.class
-SHA1-Digest: sDrz6H27/DjBw7a5xhBZ5SnIung=
-
-Name: com/ibm/icu/impl/UCharacterIteratorWrapper.class
-SHA1-Digest: BHZVRNGt4elX2sQxXvP4T0j31Sk=
-
-Name: com/ibm/icu/impl/ICUData$1.class
-SHA1-Digest: PvBDMlt+QLDywoMQsAuPVV2o0OU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/pl_PL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_ES.res
-SHA1-Digest: a69S9ERPE06S29UVQ2Jf8+zC900=
-
-Name: com/ibm/icu/text/UCharacterIterator.class
-SHA1-Digest: 7eshEISwTUGWA0M1JbdxsxvKOjg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_RS.res
-SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
-
-Name: com/ibm/icu/impl/duration/impl/data/index.txt
-SHA1-Digest: FkA15Au4OLN50iprhPfono8TCr4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/cs_CZ.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/fi.res
-SHA1-Digest: DC/h2j59zyyFMOPIe+HHm/0c6O4=
-
-Name: com/ibm/icu/text/Bidi$InsertPoints.class
-SHA1-Digest: ubjVRYFa+T2TLR28UUNqO5YEs1s=
-
-Name: com/ibm/icu/impl/SortedSetRelation.class
-SHA1-Digest: hJ7h15Rga71Xh6ytr9ebvNoujrc=
-
-Name: com/ibm/icu/text/MeasureFormat.class
-SHA1-Digest: G+oN8QPH7T64tfQ/PzVyNIkuMI0=
-
-Name: com/ibm/icu/impl/data/icudt40b/rbnf/mt.res
-SHA1-Digest: Fv2UzFieF7Ad3O+G+BxZj5X4oHE=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Cyrl.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/NormalizationTransliterator$2.class
-SHA1-Digest: QZdmY3bzdbLEBYzqdo7YflZk3D4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es.res
-SHA1-Digest: DYT+oVSW5rOOQBqMOJ8u0GnXWKE=
-
-Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceIntVector.class
-SHA1-Digest: 0rFrR7ZGQyhwiGAo8HUbmBl8sEg=
-
-Name: com/ibm/icu/impl/ICUCache.class
-SHA1-Digest: jro2JA35cDczsxETdBk2XDQbGs8=
-
-Name: com/ibm/icu/text/CollationKey.class
-SHA1-Digest: wkX8AB6BlSkkeVbdYd2rqCecDQw=
-
-Name: com/ibm/icu/impl/data/icudt40b/si.res
-SHA1-Digest: 9P4BKHNeMST+UI01yb7J6PNgSFA=
-
-Name: com/ibm/icu/text/StringPrep$Values.class
-SHA1-Digest: O7w1SPJdcnYUTT5Pct3pQ1M4s5E=
-
-Name: plugin.properties
-SHA1-Digest: TOPBr3CgISdwU5nKSIJc674x0oY=
-
-Name: com/ibm/icu/text/RBBIDataWrapper$RBBIDataHeader.class
-SHA1-Digest: s2SFgLptUnyHVB4j6qLUvpCVLHQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_BO.res
-SHA1-Digest: uVjhPJ1fqCUdh1+nw1l53leN8D4=
-
-Name: com/ibm/icu/impl/data/icudt40b/az_AZ.res
-SHA1-Digest: /aK65NhD+NN4VpffHy3dVw5HOJA=
-
-Name: com/ibm/icu/impl/data/icudt40b/mr_IN.res
-SHA1-Digest: lAvzIGepyhgppxhCwc8Hyj5bXgo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nn.res
-SHA1-Digest: dAkrnnQkw9FNKWa0lXk+Icg9Jvc=
-
-Name: com/ibm/icu/impl/data/icudt40b/ko.res
-SHA1-Digest: C/48wr/qjvCKEC5OntnR3BTYHIY=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_LU.res
-SHA1-Digest: lN1ZGnmfaiPrUDShXAeK7ChxlVc=
-
-Name: com/ibm/icu/impl/data/icudt40b/ur_IN.res
-SHA1-Digest: H2gWOfbaJMJHWFx9p3DQ+buitJY=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_PK.res
-SHA1-Digest: k8xeatwjEZzFAMf4h66cJnIKCRc=
-
-Name: com/ibm/icu/text/SymbolTable.class
-SHA1-Digest: 0PXEovA8ijSuu464CTlOg2PiB9E=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$2.class
-SHA1-Digest: oEcFAH9NQgt9Z7aF8UWcLS4MS20=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/iw_IL.res
-SHA1-Digest: Ndcrw5xpVXzCNkJpNiv+lI2hixc=
-
-Name: com/ibm/icu/impl/data/icudt40b/bn_BD.res
-SHA1-Digest: awt6fhgfw7ND8HuOTIZ/qDdRUYM=
-
-Name: com/ibm/icu/impl/data/icudt40b/sw_KE.res
-SHA1-Digest: HSb/76Vcv5oIHGPFuNPp/04gvcM=
-
-Name: com/ibm/icu/impl/data/icudt40b/ja_JP_TRADITIONAL.res
-SHA1-Digest: DCIG4K+9A5S+ggUNe8mClIrukoo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_HK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/lang/UCharacterTypeIterator.class
-SHA1-Digest: F3yCHVIRgN27D/vKNqVvRmrf+qY=
-
-Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc$CharsetRecog
- _euc_jp.class
-SHA1-Digest: nuKNP2brqweBc9DnIoDug0H4sYs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr_LU.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/CharTrie.class
-SHA1-Digest: o1fM6Qeko2xGz/44ni7MO/fjnsI=
-
-Name: com/ibm/icu/impl/data/icudt40b/pt_PT.res
-SHA1-Digest: HCq9LaAtsROIeaYxNbZu1cYdIJY=
-
-Name: com/ibm/icu/util/HebrewHoliday.class
-SHA1-Digest: 9plTcLM/MHJX1jTdVZ+N2JNniRs=
-
-Name: com/ibm/icu/text/UnicodeSet.class
-SHA1-Digest: +n+0vqgDdICZC5QPfuUCvHb/atY=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_da_DK.class
-SHA1-Digest: Z8EQ9WVNleLLPUzQl8VVuq7qWZw=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_OM.res
-SHA1-Digest: X7ZRJS+EOHa7td2tXMkYV+30dog=
-
-Name: com/ibm/icu/impl/ICURWLock$Stats.class
-SHA1-Digest: ex/PVbI1KYmkp/ut40s2yE7A/gI=
-
-Name: com/ibm/icu/impl/data/icudt40b/sv_SE.res
-SHA1-Digest: STFheQ9AqcRDNu2kja6E/vcZ48w=
-
-Name: com/ibm/icu/util/VersionInfo.class
-SHA1-Digest: O7SYTKPrfV+T+GFp7s9b5jkOPFE=
-
-Name: com/ibm/icu/impl/data/icudt40b/om_ET.res
-SHA1-Digest: 6w4g/tV4Y2a919h8zwQXr2aYKTw=
-
-Name: com/ibm/icu/text/UnicodeSetIterator.class
-SHA1-Digest: 5PZljkAXUr64Qf6CXa+v4MF8JM4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/gu.res
-SHA1-Digest: 4HbJLDEingQvo4Jb8hutOJil4Ww=
-
-Name: com/ibm/icu/impl/duration/BasicDurationFormatterFactory.class
-SHA1-Digest: EB4OgPKWaVAhyEk+rVpdxxGSGig=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/in_ID.res
-SHA1-Digest: 8zlBXCvSDwjZG5pjJeRB/oOjkYQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/te.res
-SHA1-Digest: /akHOHARzc+GyVvTJYqFKLr/RWg=
-
-Name: com/ibm/icu/lang/UCharacter$UnicodeBlock.class
-SHA1-Digest: JcRzi+Q51JVmQhAff3KE6MkriVs=
-
-Name: com/ibm/icu/text/BreakIterator$BreakIteratorServiceShim.class
-SHA1-Digest: 5eN/bw4J8zmQ8FofuCoTNWqhqwY=
-
-Name: com/ibm/icu/impl/CalendarAstronomer$AngleFunc.class
-SHA1-Digest: rVdjYM+4RcFjXlXZUO1mGuF27OQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/uk.res
-SHA1-Digest: ivg9/P3ItcMe9O4m0zh0ZzFDt9Y=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sl_SI.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_ZA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EMilliSupport.class
-SHA1-Digest: tHYpjRBpYkW31F2S300nGvCtDPs=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/da.res
-SHA1-Digest: tvgdwNmEHCIvFTOZwqWSapXhJSA=
-
-Name: com/ibm/icu/text/Normalizer$IsNextTrueStarter.class
-SHA1-Digest: JJyfbs5ohjCnNyKqCGbQmeau1ZI=
-
-Name: com/ibm/icu/text/Collator$CollatorFactory.class
-SHA1-Digest: Jyrn1hJdWH4x3qIx4s/ANKG2JkM=
-
-Name: com/ibm/icu/impl/data/icudt40b/root.res
-SHA1-Digest: fzcbTlrNk2HfQmTmQbTq44C09E0=
-
-Name: com/ibm/icu/text/ThaiBreakIterator$PossibleWord.class
-SHA1-Digest: wRfuI08KGbivEoAkKDjOwaAyXsI=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2.class
-SHA1-Digest: hSFI4JwZdbjF0Qwamy5OyD3JQek=
-
-Name: com/ibm/icu/impl/ICULocaleService$LocaleKey.class
-SHA1-Digest: rtnL7+tkntl4p4b+lMDlqJ1bzL8=
-
-Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32.class
-SHA1-Digest: ZDq8dtsVIcaonxiUBRmdxF4B7jc=
-
-Name: com/ibm/icu/text/UnicodeSet$NumericValueFilter.class
-SHA1-Digest: mbOqzhM8VCn3ZY0ln8ym03sF694=
-
-Name: com/ibm/icu/util/STZInfo.class
-SHA1-Digest: XsJezh5Etql7hjL6GCfZwp0r1hc=
-
-Name: com/ibm/icu/util/ULocale$1$ULocaleAcceptLanguageQ.class
-SHA1-Digest: dYt2UuTj3rP9XNZ/TRl2fDVl9gM=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar.res
-SHA1-Digest: pQ5WZXXVTNg+trcyuujb5/Bl7Kk=
-
-Name: com/ibm/icu/text/Quantifier.class
-SHA1-Digest: AUgzA371mdcIosAD/wJDlI0QPmM=
-
-Name: com/ibm/icu/text/PluralRules$1.class
-SHA1-Digest: WzFyrUkxNCiPH4ZAI6U5XamluHA=
-
-Name: com/ibm/icu/impl/data/icudt40b/az_Cyrl.res
-SHA1-Digest: athInAP8XrP71lLvl00UQCaxnPA=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_TT.res
-SHA1-Digest: MoNaEN9HaJv8GfS57DVZT6JIZH8=
-
-Name: com/ibm/icu/impl/data/icudt40b/nb.res
-SHA1-Digest: u5XIWOBLJvOneeE+LUuk0NuABxw=
-
-Name: com/ibm/icu/util/UniversalTimeScale.class
-SHA1-Digest: MGfU9oOVqd37uvK6hN3Z+jIBLqM=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_LY.res
-SHA1-Digest: MVGJFkVfmjEFYd75NPIDMemK3mU=
-
-Name: com/ibm/icu/text/UTF16$StringComparator.class
-SHA1-Digest: gJ11UGOVR5t9/WQJPS9XJei+NM4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ml.res
-SHA1-Digest: gaY1XpVz7BRQsTV9VTGWfzJyZHA=
-
-Name: com/ibm/icu/text/NormalizationTransliterator.class
-SHA1-Digest: ffPUES6DbpwiMALn5Cs1HUgIXQk=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_PE.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/duration/impl/DataRecord$EZeroHandling.class
-SHA1-Digest: KA1jBtQJdKV5Lx+5fOCRDAjIVSg=
-
-Name: com/ibm/icu/text/RBBIRuleParseTable$RBBIRuleTableElement.class
-SHA1-Digest: uy3Kqj72GGl03zzgGLDnj4+75Nw=
-
-Name: com/ibm/icu/impl/data/icudt40b/pt_BR.res
-SHA1-Digest: A2RjRhMcmBAkqidVuV7/6xVUdJQ=
-
-Name: com/ibm/icu/impl/PluralRulesLoader.class
-SHA1-Digest: gf200rYVX9IyNLaUqH8RtmSEZ+4=
-
-Name: com/ibm/icu/util/EasterRule.class
-SHA1-Digest: ekwooe0stj5lYCyIKQSfFnDc9ms=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/iw.res
-SHA1-Digest: WZP9bAErSkXNMGcS7Cigt2GwNKw=
-
-Name: com/ibm/icu/text/Normalizer$Mode.class
-SHA1-Digest: dY9mIdzi0rOgMGZeH459HuJvVrQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/sh.res
-SHA1-Digest: 5xIT4uaABWOSZbAPadn5pBVATSA=
-
-Name: com/ibm/icu/impl/UBiDiProps.class
-SHA1-Digest: GM/PDbLWDDcGmUdIc7D9wBCZz0c=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_YU.res
-SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_UZ.res
-SHA1-Digest: I6JdX5ppPd/ts7HMPlhQYE6F6dg=
-
-Name: com/ibm/icu/text/EscapeTransliterator$3.class
-SHA1-Digest: jK9CaWfYl+SP8pxqsfoOhg4zVlc=
-
-Name: com/ibm/icu/impl/ICUService$Key.class
-SHA1-Digest: U0MKQCZGOZoIrEzDrP4hJ8+iNtk=
-
-Name: com/ibm/icu/text/StringSearch$Pattern.class
-SHA1-Digest: HSW2Lzu4JdDg9c2c8JMprLBkFis=
-
-Name: com/ibm/icu/impl/CalendarAstronomer.class
-SHA1-Digest: FblwZDonS/4z+RAlvXI72Y7ppAM=
-
-Name: com/ibm/icu/impl/data/icudt40b/kn.res
-SHA1-Digest: szb2nTH/syARba/408uRoFDD3uE=
-
-Name: com/ibm/icu/impl/data/icudt40b/ms_BN.res
-SHA1-Digest: 4UKBJO1g0/UuMO8oJ57PIWmqF/k=
-
-Name: com/ibm/icu/text/CollatorServiceShim$CService.class
-SHA1-Digest: Ra7UApcf6HkIRW2eQjAkdvYL+kY=
-
-Name: com/ibm/icu/impl/NormalizerImpl$AuxTrieImpl.class
-SHA1-Digest: LBKL8Eh9I/jq5YmSou5JFNUu+PU=
-
-Name: com/ibm/icu/util/UResourceTypeMismatchException.class
-SHA1-Digest: xOMv05bQxowTViXu5xAHut1jm8Q=
-
-Name: com/ibm/icu/util/Calendar$WeekData.class
-SHA1-Digest: wJjmixWaAxtegXKh5cDpV4np310=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_he_IL.xml
-SHA1-Digest: 6JxLEX0ooI3J9NRuYN3fCNXNuSw=
-
-Name: com/ibm/icu/util/StringTokenizer.class
-SHA1-Digest: UPYT3yD30H3/E28l/qTiVVS06lg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/bn.res
-SHA1-Digest: N5n5OvwnnNAyo5Fbfrk5OCwKShU=
-
-Name: com/ibm/icu/lang/UCharacter$DecompositionType.class
-SHA1-Digest: euqzd0lb9CphqzkruwZwZuFLra8=
-
-Name: com/ibm/icu/impl/data/icudt40b/unames.icu
-SHA1-Digest: E/oDzXc4m34RIDn+MkqvTruEPkM=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_7.class
-SHA1-Digest: y2VlPLK2mtgbC7iLMeTyGbVYgsc=
-
-Name: com/ibm/icu/impl/data/icudt40b/ti.res
-SHA1-Digest: vUC2760/sTsegpmm/vB+PQ8I0wA=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_SA.res
-SHA1-Digest: O4AegvoITsaJ9MGm7sSQ1uSzd3g=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ur_PK.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz_Latn_UZ.res
-SHA1-Digest: y1+/EXQfdIrchtckExpNr9mgIEg=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_CO.res
-SHA1-Digest: dwyCCG1C/nku/WtB9q6pLHVIWqo=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nl_NL.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/tr_TR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/es_GT.res
-SHA1-Digest: mHLIwjM3Tu6vxWehMrcKkd4Fhb4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_AR.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/de.res
-SHA1-Digest: YuyKDxeDV694BOaXAqs9ZIYiexs=
-
-Name: com/ibm/icu/impl/data/icudt40b/pt.res
-SHA1-Digest: ZDwmcpBuRXE8UcON4gn039yiY2o=
-
-Name: com/ibm/icu/text/PluralRules$RuleList.class
-SHA1-Digest: macoH+mfZLvQ9L4VCb1xPOWT75c=
-
-Name: com/ibm/icu/impl/data/icudt40b/unorm.icu
-SHA1-Digest: EiYFJ1deC4G7h7B8izp/B42f6tU=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl_YU.res
-SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/es_.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$NGramParser.class
-SHA1-Digest: 1AIDq9tKM370fey8+S/vtZwdtSg=
-
-Name: com/ibm/icu/impl/ResourceBundleWrapper$1.class
-SHA1-Digest: kCsDjJuZOKWBBdcjq1EL7cRJ6TQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/ti_ER.res
-SHA1-Digest: lUhhpTijT/1ITo2x5QDNKkep4Wg=
-
-Name: com/ibm/icu/impl/data/icudt40b/ar_KW.res
-SHA1-Digest: 2Fg5iw7/Yl8VAolu7uj5brt2vgw=
-
-Name: com/ibm/icu/text/RuleBasedCollator$AttributeValue.class
-SHA1-Digest: p/R33glIBQNiZM4jz/a2dwFPdxk=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fo_FO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/lang/UCharacter$JoiningType.class
-SHA1-Digest: j4VycQg9ZS1LiXpE9k5QyO67S8s=
-
-Name: com/ibm/icu/impl/UPropertyAliases.class
-SHA1-Digest: +2YWoBGytZOGPlFsX5ZhgK5VVGU=
-
-Name: com/ibm/icu/impl/data/icudt40b/ha_NG.res
-SHA1-Digest: /Pw+JNU9+Ymdp0EpFOGKcUwuK4o=
-
-Name: com/ibm/icu/text/UFormat.class
-SHA1-Digest: zBnM/5aT4hYiJW62XsmCv2f4f+U=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/he.res
-SHA1-Digest: 3Vo/uZDqEP87t5I2NxKWfRIcDhQ=
-
-Name: com/ibm/icu/text/RBBITableBuilder.class
-SHA1-Digest: JLRKP3X5o6AhLZ3hKTpisqonWTI=
-
-Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_nl.class
-SHA1-Digest: G7tku42QybAELhjjbZA9vs5/QVY=
-
-Name: com/ibm/icu/impl/data/icudt40b/cy_GB.res
-SHA1-Digest: QxFTOhMYYws4DkDtnJOJY4I7rwo=
-
-Name: com/ibm/icu/text/ThaiBreakIterator.class
-SHA1-Digest: 4uoicVPzfT9RZueI6JhB2wtnPX0=
-
-Name: com/ibm/icu/impl/data/icudt40b/uz.res
-SHA1-Digest: qQKcbDyO1koblrYNiagPUZpXh9E=
-
-Name: com/ibm/icu/util/ValueIterator.class
-SHA1-Digest: Szw1uZNxy/0e7SH/zkTJofhQrFo=
-
-Name: com/ibm/icu/text/RuleBasedNumberFormat.class
-SHA1-Digest: 46A9+Qo2LdVvJOI9m4evIsVMibE=
-
-Name: com/ibm/icu/text/IDNA.class
-SHA1-Digest: +qgc0cfl6cz6mKm5DXKdI4B/06w=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/hu.res
-SHA1-Digest: frsO+sQm6vm96nWZopJRdsXz0Sw=
-
-Name: com/ibm/icu/text/UnicodeSet$XSymbolTable.class
-SHA1-Digest: SCwv1osVvJ2EU0nMcfZHtJAjzH0=
-
-Name: com/ibm/icu/impl/data/icudt40b/as_IN.res
-SHA1-Digest: 5KDZVkiNfCXOBKG4VzR2pHsoTqQ=
-
-Name: com/ibm/icu/text/DateTimePatternGenerator$PatternInfo.class
-SHA1-Digest: oPx1SkAvMbrKM+AsCLwZ34frWvQ=
-
-Name: com/ibm/icu/math/MathContext.class
-SHA1-Digest: h8rJ4mm+Brut7OkxEQd1s364ks8=
-
-Name: com/ibm/icu/text/UnescapeTransliterator$5.class
-SHA1-Digest: 8623ohgLqGOBZAm9/nGxM2W4dWI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sv_FI.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nn_NO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_it_IT.class
-SHA1-Digest: YEn8aLHR6KvomlHHNjAtWP3vtwA=
-
-Name: com/ibm/icu/text/TransliteratorRegistry$LocaleEntry.class
-SHA1-Digest: 3f73aUODZzYwa/TNAVoZMf5oQkg=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/mk.res
-SHA1-Digest: jC5g1xV3C0wP8HfkSZOqb4JGAjY=
-
-Name: com/ibm/icu/impl/data/icudt40b/ps_AF.res
-SHA1-Digest: hrS7DG1K/r8r3CYJrjgbt1sRYyo=
-
-Name: com/ibm/icu/util/RangeValueIterator$Element.class
-SHA1-Digest: 0mSf5xDlhcy2OMrOuhwQYFSuhMI=
-
-Name: com/ibm/icu/impl/data/icudt40b/de_CH.res
-SHA1-Digest: Q4Sdiid2q3JgKhTXiE6+dCBBUJE=
-
-Name: com/ibm/icu/impl/data/icudt40b/th_TH_TRADITIONAL.res
-SHA1-Digest: dm/VvqW10ZR3pUBSFUpvtHbOtyM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/en_SG.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/RBNFChinesePostProcessor.class
-SHA1-Digest: WgnI0I67l+vetDYBGLSTp5umIBc=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl.res
-SHA1-Digest: b+LcfsnbkPy3/ivYHYayoJIbh4A=
-
-Name: com/ibm/icu/text/CollationKey$BoundMode.class
-SHA1-Digest: dHIdMHMrCLK+OKR3yTl5uq7EQYI=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr_Cyrl_BA.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/en_IE.res
-SHA1-Digest: fz1/HVUqEccCM+a+g6QTw/aCoqI=
-
-Name: com/ibm/icu/text/RBBISymbolTable.class
-SHA1-Digest: petb00eGDCm6DASsXqEnEwQdXeo=
-
-Name: com/ibm/icu/impl/data/icudt40b/res_index.res
-SHA1-Digest: SdZe+ETm+nNm3O75pTonnynjGH8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/zh_Hant_MO.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/ta_IN.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr_CH.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_ME.res
-SHA1-Digest: oXaqBhMExiV5rKnE2flXWVVHyzM=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_it.class
-SHA1-Digest: qg5xRQpUKRpo+/D+hBCn72ZllJ4=
-
-Name: com/ibm/icu/impl/duration/impl/data/pfd_ja.xml
-SHA1-Digest: DDsDzGTKwy7mzz2+g2k++KmzATI=
-
-Name: com/ibm/icu/impl/Trie$DefaultGetFoldingOffset.class
-SHA1-Digest: Vsf8DJGMroq9xMLyeGulHzkntoU=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/nl.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/text/Normalizer$IsPrevTrueStarter.class
-SHA1-Digest: DTUl+dkJai1Yq1ApIspI756Oaz0=
-
-Name: com/ibm/icu/util/CalendarServiceShim$CalService.class
-SHA1-Digest: 6oWTNuffqEEvVsd3WO+sreuPZQs=
-
-Name: com/ibm/icu/impl/data/icudt40b/km.res
-SHA1-Digest: INWVfk/eKL5r9sizo9m7p+YoZPk=
-
-Name: com/ibm/icu/impl/data/icudt40b/or.res
-SHA1-Digest: 3X7AWq+N7JWBQrKfjnzYJnk7dq0=
-
-Name: com/ibm/icu/text/ArabicShaping.class
-SHA1-Digest: 4oDi82YffZqcQ1eU43kH+rZZkGQ=
-
-Name: com/ibm/icu/impl/data/icudt40b/sw.res
-SHA1-Digest: EZkjrH+mBYDTzYXfRX8CBBjniNY=
-
-Name: com/ibm/icu/util/ByteArrayWrapper.class
-SHA1-Digest: ZVPa0b5L3JXdi2ciMfStGq8GxCE=
-
-Name: com/ibm/icu/impl/duration/BasicPeriodBuilderFactory$Settings.cla
- ss
-SHA1-Digest: QI4KspATBpnU3uF18kHbauAQHW0=
-
-Name: com/ibm/icu/text/Bidi$ImpTabPair.class
-SHA1-Digest: q8CsVl7lq2JqXFBnK92q3xIZDaM=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/fr.res
-SHA1-Digest: 5NambHycd7UStnJU69v2TrR/GUQ=
-
-Name: com/ibm/icu/text/NumberFormatServiceShim$NFFactory.class
-SHA1-Digest: 5AuziSUiCTjGZgz2iYJ2kxS67RE=
-
-Name: com/ibm/icu/impl/ZoneMeta$MetaToOlsonMappingEntry.class
-SHA1-Digest: KlVLmwdBbuSU+WelGuzQxfmFb+s=
-
-Name: com/ibm/icu/impl/data/icudt40b/cs.res
-SHA1-Digest: eS2vt6erfRprgt/ycGg0TstzXAY=
-
-Name: com/ibm/icu/impl/Utility.class
-SHA1-Digest: LbUQFYYZZ1lRH0XAtlYGkYlFQAM=
-
-Name: com/ibm/icu/impl/USerializedSet.class
-SHA1-Digest: YVXfT+4kECAxhhBblpeLPbs7r/E=
-
-Name: com/ibm/icu/impl/data/icudt40b/th.res
-SHA1-Digest: uvi5UwhQBF4hVfZgOcCDLHc3R0A=
-
-Name: com/ibm/icu/util/ULocale$IDParser.class
-SHA1-Digest: dxSKLjJ2gT3JuVcWbHCtf4dyLZM=
-
-Name: com/ibm/icu/text/StringCharacterIterator.class
-SHA1-Digest: FX1SK52aDgBrcnluC7wnMDSpmPo=
-
-Name: com/ibm/icu/text/Normalizer$IsPrevBoundary.class
-SHA1-Digest: sNtIavcqXEl7v91qG5y1zkLKI2s=
-
-Name: com/ibm/icu/impl/data/icudt40b/so_KE.res
-SHA1-Digest: YvIl7ZUL3bnx1djvuoNNGMx+mj8=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/is_IS.res
-SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
-
-Name: com/ibm/icu/impl/ICUResourceBundle$1.class
-SHA1-Digest: eN4vEXYyGEHcwshQVo8jv8PPrEI=
-
-Name: com/ibm/icu/impl/data/icudt40b/so_SO.res
-SHA1-Digest: 6w4g/tV4Y2a919h8zwQXr2aYKTw=
-
-Name: com/ibm/icu/impl/data/HolidayBundle_de_DE.class
-SHA1-Digest: VWQHfSEyMLKcSvN5ziecgQLn7U4=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/om.res
-SHA1-Digest: /I5HAoJc7zf8W0rwDVIUZgQ6m5c=
-
-Name: com/ibm/icu/impl/data/icudt40b/coll/sr.res
-SHA1-Digest: zZSSQbCKWr62GmKhHLFqBt4c9YQ=
-
-Name: com/ibm/icu/text/DateFormat.class
-SHA1-Digest: gtnPHVHtC/5aKOS+Z4mvO3G4mZ0=
-
-Name: com/ibm/icu/impl/data/icudt40b/hi.res
-SHA1-Digest: +tX9WerwH3QeIif1SDmyVe7zvek=
-
-Name: com/ibm/icu/impl/data/icudt40b/hi_IN.res
-SHA1-Digest: YLAhZFEWvJg6CjuXX81pCN9WhP0=
-
-Name: com/ibm/icu/impl/data/icudt40b/ps.res
-SHA1-Digest: KcuOULDTgIuVjVxfGVVHaKYVXVg=
-
-Name: com/ibm/icu/impl/data/icudt40b/pa_Guru_IN.res
-SHA1-Digest: cjK0r61PSZoyxm5dDNLenvxle+M=
-
-Name: com/ibm/icu/impl/data/icudt40b/sr_Cyrl_ME.res
-SHA1-Digest: kRwrop6zphbfiaFjvwFLc/+aK8o=
-
-Name: com/ibm/icu/impl/ICUService$ServiceListener.class
-SHA1-Digest: 4WpmZStQ2bjgfg3tSpEaxW2muNU=
-
-Name: com/ibm/icu/impl/data/icudt40b/sq_AL.res
-SHA1-Digest: QxFTOhMYYws4DkDtnJOJY4I7rwo=
-
diff --git a/dependencyManifests/com.ibm.icu_4.2.1.v20100412.jar/META-INF/MANIFEST.MF b/dependencyManifests/com.ibm.icu_4.2.1.v20100412.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..daeb971
--- /dev/null
+++ b/dependencyManifests/com.ibm.icu_4.2.1.v20100412.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,4238 @@
+Manifest-Version: 1.0
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
+Bundle-SymbolicName: com.ibm.icu; singleton:=true
+Eclipse-LazyStart: true
+Bundle-Version: 4.2.1.v20100412
+Export-Package: com.ibm.icu.lang;base=true;full=true;version="4.2.1.1"
+ ,com.ibm.icu.math;base=true;full=true;version="4.2.1.1",com.ibm.icu.t
+ ext;base=true;full=true;version="4.2.1.1",com.ibm.icu.util;base=true;
+ full=true;version="4.2.1.1",com.ibm.icu.impl;x-internal:=true,com.ibm
+ .icu.impl.data;x-internal:=true,com.ibm.icu.impl.data.icudt42b;x-inte
+ rnal:=true,com.ibm.icu.impl.data.icudt42b.brkitr;x-internal:=true,com
+ .ibm.icu.impl.data.icudt42b.coll;x-internal:=true,com.ibm.icu.impl.da
+ ta.icudt42b.rbnf;x-internal:=true,com.ibm.icu.impl.data.icudt42b.tran
+ slit;x-internal:=true
+Bundle-ClassPath: icu-jse4.jar,icu-data.jar,.
+Bundle-Vendor: %providerName
+Bundle-Name: %pluginName
+Eclipse-ExtensibleAPI: true
+Bundle-Copyright: Licensed Materials - Property of IBM (C) Copyright I
+ BM Corp. 2000, 2010. All Rights Reserved. IBM is a registered tradema
+ rk of IBM Corp.
+Bundle-ManifestVersion: 2
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/is.res
+SHA1-Digest: j2CvJA3Cm/aqqU6CYhr47wtC2L8=
+
+Name: com/ibm/icu/text/EscapeTransliterator.class
+SHA1-Digest: YXPxHZn0uCu6crcG4IqVG3oVBnU=
+
+Name: com/ibm/icu/impl/data/icudt42b/hu.res
+SHA1-Digest: 3JfUzYiRweroYW/plfnvsLDQb1I=
+
+Name: com/ibm/icu/text/NumberFormat$SimpleNumberFormatFactory.class
+SHA1-Digest: E6rM+nNhOSNMheNR4AiKxfCrgSo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar.res
+SHA1-Digest: PwC+9Pf6YSgK3V57C+Sjfqnpr3I=
+
+Name: com/ibm/icu/impl/duration/impl/Utils$ChineseDigits.class
+SHA1-Digest: xbghwuZOvqj0GdC1C/PXv1XcH0I=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/zh.res
+SHA1-Digest: kwZeMD+wckT1m/ZkisNoWScHlHQ=
+
+Name: com/ibm/icu/impl/IllegalIcuArgumentException.class
+SHA1-Digest: 0yNJLTuTzmaf61MWdRlz8OCXFiY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nb.res
+SHA1-Digest: XcezM2Ezj9IKqt2x1dUw8UTqXB8=
+
+Name: com/ibm/icu/text/UnicodeCompressor.class
+SHA1-Digest: MamRaHWdqY/NzE+Pr/pRuFcw/k4=
+
+Name: com/ibm/icu/util/TimeZoneTransition.class
+SHA1-Digest: nsjOT2dDaZctakgY5wlp1Cn+ixY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_IQ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/locale/InternalLocaleBuilder.class
+SHA1-Digest: V7c6Go6aFXvHqvjIGGnfMXDzSp0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/kn_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/UCharacterName$AlgorithmName.class
+SHA1-Digest: PYl6PNBKDsuWCPtMTBAej3qiWEs=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_fr_FR.class
+SHA1-Digest: kukMBLawmMI5NEK5Rr8YN8hdz1g=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/af_ZA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/mk.res
+SHA1-Digest: +16iURHtlT11MXFHeQ5YdVWG9XU=
+
+Name: com/ibm/icu/impl/duration/impl/Utils.class
+SHA1-Digest: gf7gRgQu1u5OgPdlHnExgWFX9Bc=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_de.class
+SHA1-Digest: TeJeBzkTwkAFHb/iKE80Zc0XicI=
+
+Name: com/ibm/icu/text/AbsoluteValueSubstitution.class
+SHA1-Digest: ZolTHiOYyGLQwXWY00LnhUJsdME=
+
+Name: com/ibm/icu/text/RBBIDataWrapper$TrieFoldingFunc.class
+SHA1-Digest: Qf62ZKq9AjB9w31sh/QS1De+vpI=
+
+Name: com/ibm/icu/text/Normalizer$NFDMode.class
+SHA1-Digest: xg6Q8tYy7KxwlfYm+Grf+3XV3fM=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fo.res
+SHA1-Digest: bL+GlmE1Y5OoN/A/uUVVOCpXTKA=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceInt.class
+SHA1-Digest: PK/s8z+DVKB6V/yZ7axygXLKwrs=
+
+Name: com/ibm/icu/util/CopticCalendar.class
+SHA1-Digest: oRNvFtdVo3HZ2IOcg2AjOGhm9I8=
+
+Name: com/ibm/icu/text/RuleBasedBreakIterator.class
+SHA1-Digest: ge0GS1yzlXkRSC/RdBcTRZNf3og=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl_RS.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_ZW.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CharsetRecog_2022.class
+SHA1-Digest: F0nf0CFBMOFv2vrd0mvZ7OY43mY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_BH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sh.res
+SHA1-Digest: 5xIT4uaABWOSZbAPadn5pBVATSA=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EUnitVariant.class
+SHA1-Digest: F2a3jCGNTvPEMDmL8BeOOTEQ1iI=
+
+Name: com/ibm/icu/lang/UCharacter$StringContextIterator.class
+SHA1-Digest: lNpq2qWpIAGB742B0mS87r+hpsQ=
+
+Name: com/ibm/icu/text/NumeratorSubstitution.class
+SHA1-Digest: 7GMpPOT/EuYAKhFUqfg3TQ7pAYA=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_CN.res
+SHA1-Digest: OqOcERNgY90GdftreFDuBO3TG1M=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa_Arab_PK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/DecimalFormat.class
+SHA1-Digest: U33/Ve3RZCN03mBl06HVLRmJtnU=
+
+Name: com/ibm/icu/text/RuleBasedTransliterator.class
+SHA1-Digest: RIDjkJ3ien3vG4tB1vgS4iuRFP8=
+
+Name: com/ibm/icu/text/DigitList.class
+SHA1-Digest: DbK/2LnHbTcnTDiY4krPxVDuMKw=
+
+Name: com/ibm/icu/util/Holiday.class
+SHA1-Digest: lI3HeWyJdOjBOZRCfPDxmf+FDF4=
+
+Name: com/ibm/icu/impl/data/icudt42b/nl.res
+SHA1-Digest: xy35sFvnPSYIBCf0u3kc01UzIHc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ko_KR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/he_IL.res
+SHA1-Digest: xx8x6c6TfbSBUuCgTOFqYfTB9Vs=
+
+Name: com/ibm/icu/lang/UCharacter$EastAsianWidth.class
+SHA1-Digest: BsCL841cISRA8tJI4hy44L/8/XI=
+
+Name: com/ibm/icu/impl/duration/OneOrTwoUnitBuilder.class
+SHA1-Digest: 6vDwEr9CWsHzaKmMdGNTAsFihLM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kn.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/text/Bidi.class
+SHA1-Digest: AgMeGBZRm0TYecerF6aysJ7PT9k=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Latn.res
+SHA1-Digest: njORFhp1f/q+5Iunh8RUfI1YhXs=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr.res
+SHA1-Digest: uLgs0BZfEG5SKg4oCnu7DjddatA=
+
+Name: com/ibm/icu/util/CurrencyServiceShim$CFService.class
+SHA1-Digest: rBBK+/s+rspq0n4MHaBKyH6qgeY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/it_IT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/BreakIterator.class
+SHA1-Digest: 1McPZer5dsYHVvftuxv1mulZJCQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de.res
+SHA1-Digest: udXs6mDgaFlXCDLufyFIaPqL0mA=
+
+Name: com/ibm/icu/impl/data/icudt42b/om.res
+SHA1-Digest: kXlJcOU2EYYVZHUnQgPRoNED2jA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr.res
+SHA1-Digest: tGIJx/BHQmB3/P21GhxRf0tHIck=
+
+Name: com/ibm/icu/impl/data/icudt42b/haw_US.res
+SHA1-Digest: qXwLlsGY/3vEgZHppDA+hTle9kE=
+
+Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieNodeFlags.class
+SHA1-Digest: NHSMsJK1/XaK+qxiN89ct8gnfeM=
+
+Name: com/ibm/icu/impl/TextTrieMap$ResultHandler.class
+SHA1-Digest: NfDOnUJ6MEMaHwTl+N0ovE9ddws=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pt.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorParser$ParseData.class
+SHA1-Digest: qzjqmwgM41enjJzYKlm1GmSsxVo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_TN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/lv.res
+SHA1-Digest: FNsqY1pX+nP5Q5tA0F/KTsIeKQs=
+
+Name: com/ibm/icu/text/BidiRun.class
+SHA1-Digest: NVDG2+p7aEOg0Y7eJMKRrGzcIBM=
+
+Name: com/ibm/icu/impl/data/icudt42b/az_Latn.res
+SHA1-Digest: GuGMZSWyJJqxdmm9EzD7CnSl2IU=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_UY.res
+SHA1-Digest: ctg1v3Q44rmRhqm49FQHKrrmIMA=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/sent.brk
+SHA1-Digest: 5QkJZyN+UYeCLr8NqkrhshFfAcQ=
+
+Name: com/ibm/icu/lang/UScript.class
+SHA1-Digest: 5uNMnkZHEDId9P+L36R63jpUhyI=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/en_US_POSIX.res
+SHA1-Digest: beFWtWkxc9Yvx9alkk9FkhNbb+0=
+
+Name: com/ibm/icu/impl/duration/impl/ResourceBasedPeriodFormatterDataS
+ ervice.class
+SHA1-Digest: JqOOr2sq7TcizCQJs9oL4g6So4I=
+
+Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022CN.class
+SHA1-Digest: DbHd1CyG/Msa9UPMr2wH2DF7trc=
+
+Name: com/ibm/icu/impl/PropsVectors$DefaultGetFoldedValue.class
+SHA1-Digest: Lwmpr2KCuPKMqaGtEnlFLz/wuqo=
+
+Name: com/ibm/icu/text/UppercaseTransliterator$1.class
+SHA1-Digest: G0JYUB6wT8GAYj5owWpsz9/Ftw8=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ETimeLimit.class
+SHA1-Digest: 4ZMtPxvIotXIqFOqbPO7ya0XlMY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_DZ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CharsetDetector.class
+SHA1-Digest: gYZx7hbJUm5FKRv7KdQ97H4GweY=
+
+Name: com/ibm/icu/impl/URLHandler.class
+SHA1-Digest: vvqGkYkIa4xQWAeWynhhHrqpw10=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_MC.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/CharsetRecog_UTF8.class
+SHA1-Digest: e0rv0rA2OtgVcjPnmTwV8XCoHvY=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/el.res
+SHA1-Digest: U0c1hk1kb+krIvZR8cJGcxzSWOY=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_sv.class
+SHA1-Digest: E4MDrKpNuLO4thhe8eWFznL4mmk=
+
+Name: com/ibm/icu/lang/UCharacterNameIterator.class
+SHA1-Digest: UOMCEcLCGIcaMeDNVQfP5K8B03k=
+
+Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieVerticalNode.class
+SHA1-Digest: FlLd/KEtCwedIf/Im9rWvJ8pkmE=
+
+Name: com/ibm/icu/text/BidiClassifier.class
+SHA1-Digest: jNruu2s6m5HmirvSejWNh5tTzPg=
+
+Name: com/ibm/icu/impl/ICULocaleService.class
+SHA1-Digest: wgOreXadv+Y6G64zD6iDwr3d/MY=
+
+Name: com/ibm/icu/util/DateRule.class
+SHA1-Digest: 9ppWbONa89XFnzd2NUTKAtIj7gs=
+
+Name: com/ibm/icu/text/RemoveTransliterator.class
+SHA1-Digest: otKJ/1nx4yCw6WLjSuLHwvCL2bc=
+
+Name: com/ibm/icu/impl/data/icudt42b/zoneinfo.res
+SHA1-Digest: lyR8PCY1r2O2fwcPzFCmV+03kek=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_DE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/no_NO.res
+SHA1-Digest: AgYfyOH+DuzgYK7m3vioTfRNJGM=
+
+Name: com/ibm/icu/text/BreakTransliterator.class
+SHA1-Digest: 5j+5ezoVKgpv+cDfcyQp8CkSXHM=
+
+Name: com/ibm/icu/impl/UtilityExtensions.class
+SHA1-Digest: QHfN5QTMSujGJ608wEP4hPhWEF0=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_VI.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/lang/UCharacterEnums$ECharacterDirection.class
+SHA1-Digest: H8qH9/fT9hc7M4JiYaHxEZrAaKY=
+
+Name: com/ibm/icu/impl/ICUData.class
+SHA1-Digest: 3erV0Mc2+xO14bQ2k81EbRknNRw=
+
+Name: com/ibm/icu/impl/data/icudt42b/kw_GB.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/af_NA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/numberingSystems.res
+SHA1-Digest: CwVj0WaVMbqB1Mpxp0Kqbk2gWKc=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_SV.res
+SHA1-Digest: DqUgxafBny6RSK/5q4mvOxc7iio=
+
+Name: com/ibm/icu/text/DateIntervalFormat$BestMatchInfo.class
+SHA1-Digest: sV0Mx7TGY10SraT/jykvrPl7Q5U=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_BE.res
+SHA1-Digest: t5kA5x031c55chPP3IyBYNE2tHA=
+
+Name: com/ibm/icu/text/Normalizer$IsNextBoundary.class
+SHA1-Digest: CKZMxdzbwLro2Z+QmdJ/ciVY2PA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_SD.res
+SHA1-Digest: 8jPOUtil+92lPKtgn16fuUJT/xs=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_CR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/fa.res
+SHA1-Digest: 5Bs2cr+U6j+dypoDNaMPSbsUf0I=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr_FR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/NormalizerImpl$CmpEquivLevel.class
+SHA1-Digest: dQTjAcpSF2DECctfvlbSo0KO1aU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/km.res
+SHA1-Digest: +iJyrhf9PCl28WxihRkDq1Ef6Lw=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/or.res
+SHA1-Digest: InVjaf5clp2rxTeqI9/0JIYSNB8=
+
+Name: com/ibm/icu/text/NameUnicodeTransliterator$1.class
+SHA1-Digest: DpWM8KnhkmbxGZXZFeHCngsH69o=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3920node.spp
+SHA1-Digest: 4IYXUODtnB6gfa7RDUKiacm7TG8=
+
+Name: com/ibm/icu/util/Measure.class
+SHA1-Digest: 9mL4N0Vyl9+I6qKvkwVl14lMQkc=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ETimeDirection.class
+SHA1-Digest: N9UUzovPmIuRsQk9R1s/tDmtyIs=
+
+Name: com/ibm/icu/impl/Grego.class
+SHA1-Digest: ByHxVGjXDj6wtd4aKgZcIkKZqQk=
+
+Name: com/ibm/icu/impl/duration/PeriodBuilder.class
+SHA1-Digest: dV/Szp96Rd+0gIGLoutRicRFViU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fa_AF.res
+SHA1-Digest: GxFG7kSjMBkfuBfHcrlK9JEMIUk=
+
+Name: com/ibm/icu/impl/UCharacterNameChoice.class
+SHA1-Digest: mMAuTd72u2gcqx8i1UYo0FKAc9w=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kk_KZ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/RangeDateRule.class
+SHA1-Digest: msIx2SRP5ec64ZXKKDuwMKIaJuY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/cs.res
+SHA1-Digest: 6ewJaKyRixh1EaHQDrPSPclAH1s=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_PR.res
+SHA1-Digest: XbM/LpRizF51mvHs+PUyZEXY/hQ=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_hu.class
+SHA1-Digest: pBbf8rLCbWkUdL2JrvCE8OAp+BQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_CA.res
+SHA1-Digest: Q8VylXqubeMUQ0gbkGBmmW5FoW8=
+
+Name: com/ibm/icu/text/SimpleDateFormat$PatternItem.class
+SHA1-Digest: YAu3YeIk7pw3PNa524tZW2WuBIE=
+
+Name: com/ibm/icu/text/CollationRuleParser$IndirectBoundaries.class
+SHA1-Digest: 0AbZRXsqPif5tIO0chF3JJ4YPDo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/th.res
+SHA1-Digest: h7X9C37HwUru0u4cVd+B3afa9HA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_HK.res
+SHA1-Digest: speOMn/V2KXsedph/5CkSZvBY08=
+
+Name: com/ibm/icu/impl/UCaseProps.class
+SHA1-Digest: uOAVyXrL6DlQ5Sw5t2fW7uXhxDg=
+
+Name: com/ibm/icu/impl/NormalizerImpl$DecomposeArgs.class
+SHA1-Digest: hDKbUGlZBenhxVha4ofAGKYcZvk=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_en.class
+SHA1-Digest: wLcQHijwQPcw+2QLT5p2j7vrFmU=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EGender.class
+SHA1-Digest: J/zw3EDVDp2DIUnLU7Ns1Auk8+s=
+
+Name: com/ibm/icu/text/EscapeTransliterator$1.class
+SHA1-Digest: BmF+vui9JoLsiiWA4fkM9uw0XGw=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa_Arab.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sq.res
+SHA1-Digest: YGEaYRH54BnepCoO05Xr1A89Cjk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hi.res
+SHA1-Digest: YESl1anaFaTG/Cg+h8qp06YkSWc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ps.res
+SHA1-Digest: jcSG2XNQ01J2cSZYHsb3WmuoqpY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/vi_VN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_Latn_NG.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/RelativeDateFormat$URelativeString.class
+SHA1-Digest: 4JcRrl0CkaM/+e6/P6hm+woduY0=
+
+Name: com/ibm/icu/util/TaiwanCalendar.class
+SHA1-Digest: seXD8m1jm3Pi1ii97cHCx0DVb5g=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_5.class
+SHA1-Digest: knuUFp80QD6HqAgIaUwvSZ4e2XI=
+
+Name: com/ibm/icu/impl/data/icudt42b/kw.res
+SHA1-Digest: XhDdKpjngOgIwwhY9wzLH08YYF0=
+
+Name: com/ibm/icu/text/NFSubstitution.class
+SHA1-Digest: Tf3idfc3xXqihVo1OfmhIdhv45U=
+
+Name: com/ibm/icu/util/ChineseCalendar.class
+SHA1-Digest: pJlfi7MLmf32IriffIOhnZKxFqg=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM420_ar_rtl.cl
+ ass
+SHA1-Digest: Pv7T9lB2nfQWV7y6z+DzAU9ztnw=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$Horizon.class
+SHA1-Digest: tqn4oqVKoLNURBeQA94T77HmV80=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_QA.res
+SHA1-Digest: f4UrB2kdWt/+ODJfpHLPtXUcdas=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/om_KE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa_Guru.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/ICUService$CacheEntry.class
+SHA1-Digest: lZ0Rre/AW1WALU0phN0pn/Cb1BI=
+
+Name: com/ibm/icu/impl/data/icudt42b/tr.res
+SHA1-Digest: 76WaJA6WKs5PIRKZtCsS4o72LX0=
+
+Name: com/ibm/icu/impl/data/icudt42b/az_Cyrl_AZ.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/util/Calendar.class
+SHA1-Digest: thvM7e735GDNg3hS2lLIuJRMBV4=
+
+Name: com/ibm/icu/impl/ResourceBundleWrapper.class
+SHA1-Digest: rIKZx1wCuiXfe5QkMHVctB9728E=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sh_BA.res
+SHA1-Digest: vYOnYIQEmwDnRfySDiGCAZETvgI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/el.res
+SHA1-Digest: AGQ9gc90hsqcnPV6yQmFHA/1osQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn.res
+SHA1-Digest: uO1DdkPQdwIhPSDZ+yzcrPCwz88=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_windows_1251.cla
+ ss
+SHA1-Digest: SXkn/Uww9Gzw7b/Un5t7GkFakCE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_AE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_iw_IL.class
+SHA1-Digest: YUizshYwzLdXoy05Q8wxj4mQut0=
+
+Name: com/ibm/icu/impl/data/icudt42b/bn_IN.res
+SHA1-Digest: bv0pDsctpdozqqzI1wej2hasy9c=
+
+Name: com/ibm/icu/impl/NormalizerImpl$PrevArgs.class
+SHA1-Digest: cOomgZl+/yp6SYjdUoYbL7JbQk8=
+
+Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022JP.class
+SHA1-Digest: w2BjrE208VvJdVSAPaTr1kLTqvA=
+
+Name: com/ibm/icu/lang/UScriptRun$ParenStackEntry.class
+SHA1-Digest: hjJuPZ/fOXQd2FMPfdIN4fRyuUI=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/ja.res
+SHA1-Digest: JvSF9gjOLJGjbnDwtW+adnCvW0E=
+
+Name: com/ibm/icu/text/FractionalPartSubstitution.class
+SHA1-Digest: Ynmu31KNNJxNN6NJpdaL6yBfREo=
+
+Name: com/ibm/icu/impl/data/icudt42b/hu_HU.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_es.class
+SHA1-Digest: 3SErfzPsT82mvGwkW2uM2+Y+V3g=
+
+Name: com/ibm/icu/impl/data/icudt42b/id.res
+SHA1-Digest: /v6DtD31JMnx4TFGPb1tAs3bJ58=
+
+Name: com/ibm/icu/impl/data/icudt42b/translit/root.res
+SHA1-Digest: W9W31JFWrx9S4rOkkKDBHLnYrmI=
+
+Name: com/ibm/icu/impl/data/icudt42b/el_GR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/NumberFormatServiceShim.class
+SHA1-Digest: 5g5rFy1SGHdAii8w/LXUSFEhh2s=
+
+Name: com/ibm/icu/text/EscapeTransliterator$6.class
+SHA1-Digest: PFEkFXg8eBaBKVeFY55vhS2mLAM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ru.res
+SHA1-Digest: VXbAmZCJZJeWtwmyerLwaGhkQqk=
+
+Name: com/ibm/icu/text/RuleBasedCollator$UCAConstants.class
+SHA1-Digest: s5CcIsUVxym6jbrYS095b8nqJmI=
+
+Name: com/ibm/icu/impl/data/icudt42b/ru_UA.res
+SHA1-Digest: IXZDpxA+m9jyEDvaDLUtuycklI4=
+
+Name: com/ibm/icu/impl/ICUNotifier.class
+SHA1-Digest: lglpVgoxE78xm+dGjGgI1+vH8Go=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$AliasEntry.class
+SHA1-Digest: VVsoRHCiofSdXgz5txKcKInbG98=
+
+Name: com/ibm/icu/impl/data/icudt42b/eo.res
+SHA1-Digest: kBkTnKWiCx/5QFeXkXT2AXgknWE=
+
+Name: com/ibm/icu/text/UnicodeSet$VersionFilter.class
+SHA1-Digest: a9gj5vKVl+/+AHgbAB0gZ7dN8l8=
+
+Name: com/ibm/icu/impl/data/icudt42b/it.res
+SHA1-Digest: WsShTh/aQbQ/ZhxRGg7Ag7CBx7g=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn_YU.res
+SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hans_HK.res
+SHA1-Digest: wQNfmmf0h/hyQoWk7DLPyxuDo2U=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$3.class
+SHA1-Digest: 0k60My0lEzUBHKhLLnROQxfwBNQ=
+
+Name: com/ibm/icu/impl/LocaleUtility.class
+SHA1-Digest: BX7DKr4qa3fDsh7bKxjRqrIdN1k=
+
+Name: com/ibm/icu/text/BreakIteratorFactory$1$RBBreakIteratorFactory.c
+ lass
+SHA1-Digest: +2C+74R/GkAukYK6BWok4d5+X18=
+
+Name: com/ibm/icu/util/UResourceBundleIterator.class
+SHA1-Digest: IrH/7eAb+2WBO5XParE13Y5/z+k=
+
+Name: com/ibm/icu/impl/data/icudt42b/sk_SK.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/az.res
+SHA1-Digest: ZMWs0VOdiKvJNL4AFWqFkUJSFhs=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc4013.spp
+SHA1-Digest: kRrkLaCSp2+yZ8BOpLlwwoi02PI=
+
+Name: com/ibm/icu/impl/data/icudt42b/ga_IE.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/RBBIRuleScanner$RBBIRuleChar.class
+SHA1-Digest: J0Y4X3G8nAQ2u1NdqdAgiryBeGs=
+
+Name: com/ibm/icu/text/CollatorServiceShim.class
+SHA1-Digest: hAgfcsXlTzaL/w4/gL0N9iCOUYo=
+
+Name: com/ibm/icu/impl/data/HolidayBundle.class
+SHA1-Digest: eped8S2PIpsw0xNnRZ5/97cXdR4=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_PA.res
+SHA1-Digest: nBhqgNbBYXfEOuIJnwG/Q4teyVM=
+
+Name: com/ibm/icu/impl/data/icudt42b/ro.res
+SHA1-Digest: FOBd+W6c9Uszw+S2FdiRgo7ISJo=
+
+Name: com/ibm/icu/util/Calendar$FormatConfiguration.class
+SHA1-Digest: HMfqjsjj92/mRd+LB6GWlX9Rz8A=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM424_he_rtl.cl
+ ass
+SHA1-Digest: J+B9CfPJsTC9wgQE4/ZkMBES4nY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kl.res
+SHA1-Digest: 0jsw6UtoVk4zt3ILXicpfV7biTk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sv.res
+SHA1-Digest: egUhPtCoHrry2yDZn92p5O6n5N8=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/sent_el.brk
+SHA1-Digest: 8i9iN5U7DqUoIo4MK4oyQZS9P3g=
+
+Name: com/ibm/icu/impl/data/icudt42b/ne_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_BW.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorRegistry.class
+SHA1-Digest: A/P7G4aaYuPu5xXL/ZkBbE18hwI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nb_NO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/duration/impl/XMLRecordWriter.class
+SHA1-Digest: PWYSZ4u8g1IfpbLoDoF3ftIAb4Q=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_it.class
+SHA1-Digest: cDFTSttIyUcOXqLd9D2T6tp/HZk=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ECountVariant.class
+SHA1-Digest: aJHVQ300aVD+BmC2P8llIq3pg9c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/et_EE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/CurrencyAmount.class
+SHA1-Digest: PNIjQXIaQ2oYJyUT0ItTyTqEkoU=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_windows_1256.cla
+ ss
+SHA1-Digest: DrTHr4sUWIbklSdEgWU28WoUbhA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ti_ET.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/util/VTimeZone.class
+SHA1-Digest: 1TPDKEs1DSITvWxMUvckjGndB4Q=
+
+Name: com/ibm/icu/impl/DateNumberFormat.class
+SHA1-Digest: cjx+PVDKOUW7D4ujcB6HlUvHvGs=
+
+Name: com/ibm/icu/text/NumberFormatServiceShim$NFService.class
+SHA1-Digest: tbq28jH7lu6i82zGqfz3TzCU2zw=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_PY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/cy.res
+SHA1-Digest: 19rDUBcwJVut4iH/bVmNX3Q7FOI=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_9_tr.class
+SHA1-Digest: L3qSOBh58ZoDcsPpSVwC2ZJVA70=
+
+Name: com/ibm/icu/impl/data/icudt42b/ga.res
+SHA1-Digest: +eLSqa91+kUpqOvCWHDTWpeia+0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fi_FI.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ru_RU.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CollationRuleParser$OptionSet.class
+SHA1-Digest: NQEcyavf02KCzAUy8eUxp2bm0ik=
+
+Name: com/ibm/icu/impl/data/icudt42b/sh_YU.res
+SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_LB.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CurrencyFormat.class
+SHA1-Digest: BIYocngM/7NiKCWXni1oy8dw6UE=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_no.class
+SHA1-Digest: xv4d+++Lz/qnbkyyhqENFT7eu0k=
+
+Name: com/ibm/icu/lang/UCharacter$HangulSyllableType.class
+SHA1-Digest: FX4QLFcLemKiu2KiOmBPbxuoTgA=
+
+Name: com/ibm/icu/impl/NormalizerImpl$RecomposeArgs.class
+SHA1-Digest: JcTG/vr+4vL+lvoLih+JchLOwys=
+
+Name: com/ibm/icu/impl/duration/BasicDurationFormatter.class
+SHA1-Digest: zh16hEdh2ONzmmsS1JDrmJiNlRk=
+
+Name: com/ibm/icu/impl/PropsVectors.class
+SHA1-Digest: wI4264ILYDdbtojBjMmkuDjmmUY=
+
+Name: com/ibm/icu/impl/data/icudt42b/ja_JP.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_EC.res
+SHA1-Digest: m0kpaMOPvIMFxZxiXL7bN0HH7wk=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/lt.res
+SHA1-Digest: rb4HPjXWqwrgfjBmwldQmaCBJ9c=
+
+Name: com/ibm/icu/text/TransliteratorIDParser$SingleID.class
+SHA1-Digest: Ufnlmb9l7qkXF0nQiTQKfC0SUN4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_PH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CollatorReader$2.class
+SHA1-Digest: VstzQGGxGrBfAGwLsKAmINjoHdE=
+
+Name: com/ibm/icu/impl/data/icudt42b/ta.res
+SHA1-Digest: UIyNBGqa1phd6lRvgnG2rxHojNI=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_6_ar.class
+SHA1-Digest: xn1RXUAMmznOTgrhrUQpwv5QlOQ=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs.class
+SHA1-Digest: QqTdh0CH4Vf7dqv8SgIqkDzUFSU=
+
+Name: com/ibm/icu/impl/data/BreakIteratorRules.class
+SHA1-Digest: gCMOKah34u1kPKbKDFFkZ7q4Yns=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/uk_UA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/SimpleCache.class
+SHA1-Digest: gkYKNngE0GE4oKeUP2E1tXk1jM8=
+
+Name: com/ibm/icu/text/UnicodeNameTransliterator$1.class
+SHA1-Digest: KaMVjn1QaHf34mD7oxjgwJ5ahIQ=
+
+Name: com/ibm/icu/impl/ZoneMeta.class
+SHA1-Digest: r0glyuuqmD6LFhOLNsnp1xng+pU=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_ES.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/ComposedCharIter.class
+SHA1-Digest: rChNG7UYDnRxDj7UbX1y0qWs5dk=
+
+Name: com/ibm/icu/impl/CollectionUtilities$MultiComparator.class
+SHA1-Digest: w+RtoKXIAzU2JSHL2lRzb/vNpkk=
+
+Name: com/ibm/icu/impl/data/icudt42b/pl.res
+SHA1-Digest: ycc7jjxh5sAJ1hGkiVLYLBbGIL4=
+
+Name: com/ibm/icu/impl/ICUBinary.class
+SHA1-Digest: sSY3Nr1xFNDxtMCJmvvgUU8AbJk=
+
+Name: com/ibm/icu/impl/JavaTimeZone.class
+SHA1-Digest: RGmGX6YF1kdSgSbPkP1pPUkdprM=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Cyrl.res
+SHA1-Digest: ofu0p2h5HG++q/Yi5O9ZawldKoI=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EHalfPlacement.class
+SHA1-Digest: hXh33TmrbYTnw55gCgxA0u+L1aU=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/af.res
+SHA1-Digest: 6ZZdsbmX402QmyeJfRkOd0UDHiQ=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_ko.xml
+SHA1-Digest: eOSUSyUSndb5fF2lk9BJK2jpGXo=
+
+Name: com/ibm/icu/text/PluralRules$BinaryConstraint.class
+SHA1-Digest: 1JkBPbgxMsMN5YV/Rcxbgs+kVXU=
+
+Name: com/ibm/icu/impl/data/icudt42b/hr.res
+SHA1-Digest: WMsS49dfMXa65cAp+IQNie57DAU=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$CEGenerator.class
+SHA1-Digest: /DJVLxMf9OcAzOZjQCcQi63elb8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/et.res
+SHA1-Digest: gY9889U6aBhiQd1g82sqQbwkwU4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/vi.res
+SHA1-Digest: fPZhu1BtbXnuJ3eUSAXmbnsSKPk=
+
+Name: com/ibm/icu/text/PluralFormat.class
+SHA1-Digest: rO5A57/apGQ9E2S9YwO746MktFQ=
+
+Name: com/ibm/icu/util/CaseInsensitiveString.class
+SHA1-Digest: rQq82lJnOBEXasFGvZ877r9VDQ4=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_BO.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ja.res
+SHA1-Digest: JU096ryb1j2ZPt0LeW9mREJ8Pkg=
+
+Name: com/ibm/icu/impl/data/icudt42b/az_AZ.res
+SHA1-Digest: /aK65NhD+NN4VpffHy3dVw5HOJA=
+
+Name: com/ibm/icu/impl/data/icudt42b/mr_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/duration/impl/XMLRecordReader.class
+SHA1-Digest: QJMPA09yTVHzesG3SnsuYOZF1gI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_MT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_Arab.res
+SHA1-Digest: V6CBcJq6TVrLkip5q/d1wIChIZA=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_iw.class
+SHA1-Digest: ToeHtdFUCxUdmrVnWpfyfJZK4PI=
+
+Name: com/ibm/icu/impl/data/icudt42b/ur.res
+SHA1-Digest: pxo8RnCdTUGMw6cWnSY8rLlTodw=
+
+Name: com/ibm/icu/util/TimeZone.class
+SHA1-Digest: Hm32xTzR86BFdisNVSy85b+qs8c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/no.res
+SHA1-Digest: QKT2L/mn+LtpRofMA4whD6vFbe0=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$BasicContractionTabl
+ e.class
+SHA1-Digest: jWsjLfFERZXorGeHalRwZJi4O5I=
+
+Name: com/ibm/icu/impl/data/icudt42b/ur_IN.res
+SHA1-Digest: 79kksnJjwoXz04PonmMn5+6V9E4=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_LU.res
+SHA1-Digest: pmLIFVklW+f3qKAzKg4pvCbRRMw=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_SG.res
+SHA1-Digest: 99MTdXPuizTQKIDtoLc37T5PHW0=
+
+Name: com/ibm/icu/impl/locale/BaseLocale.class
+SHA1-Digest: o6PyMobTa1XPoMEYCtn9erCRJfg=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_PK.res
+SHA1-Digest: k8xeatwjEZzFAMf4h66cJnIKCRc=
+
+Name: com/ibm/icu/lang/UCharacter$SentenceBreak.class
+SHA1-Digest: v60WgOObH7LMxSp6BLkx12kbK2o=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/bg.res
+SHA1-Digest: FAjQiRZGQsGv60+ineKz2cfWHhA=
+
+Name: com/ibm/icu/text/UnicodeSet$Filter.class
+SHA1-Digest: NBMNANpxG2nLvO2DvN1HxX60dOA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_AU.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hans_SG.xml
+SHA1-Digest: TJYCrJvOY2vR1NyyLtm2gdpw0fs=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn_ME.res
+SHA1-Digest: cYLkZ9Z18u/K8BYFefs2WDDNvII=
+
+Name: com/ibm/icu/impl/data/icudt42b/en.res
+SHA1-Digest: qVsjlL/wvdmhN0kYI0qz0fpJpVQ=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_da.class
+SHA1-Digest: jzjS6XsqunKSZ7YAmPaebKHAeQo=
+
+Name: com/ibm/icu/impl/data/icudt42b/is.res
+SHA1-Digest: 5Ryn6dHXd2TJjS6IoT03GIT+kJ8=
+
+Name: com/ibm/icu/util/IllformedLocaleException.class
+SHA1-Digest: CQ4rkK3nOjNNdiw7Fep5cCnsdNA=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh.res
+SHA1-Digest: wBR2aHtqcWVBRNX06qSePIeEmzw=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_en_GB.class
+SHA1-Digest: HXDh6JDRFbipCxMfi/8pXpp5d1k=
+
+Name: com/ibm/icu/impl/data/icudt42b/sw_KE.res
+SHA1-Digest: LVqZFqGyXHp7aC7dpmH9EzAcg5g=
+
+Name: com/ibm/icu/impl/data/icudt42b/bn_BD.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_JO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_Guru.res
+SHA1-Digest: X24m6J85tpyg/p+Y9+fILCxpvbs=
+
+Name: com/ibm/icu/impl/data/icudt42b/pt_PT.res
+SHA1-Digest: g32vD04+VGf7M8VvrjDhUXPsgbQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sl.res
+SHA1-Digest: f5g+aVg5/3/Hq5zwLSZLz0A6zfM=
+
+Name: com/ibm/icu/text/CollationElementIterator.class
+SHA1-Digest: xIVrdY7/w63ttuNlWyMX4Jc3dRo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ca.res
+SHA1-Digest: /znnLEtvYR7zUSGs2gi6rwMM40s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_BA.res
+SHA1-Digest: 6q0h04Ey+gEIoBcrzyHzzX1kkzA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kk.res
+SHA1-Digest: wjaQf987WfInc+RWdb82wWwvJt0=
+
+Name: com/ibm/icu/text/Normalizer.class
+SHA1-Digest: NjfW4+6zne8UcJXRJ/pLy5XfkA4=
+
+Name: com/ibm/icu/impl/data/icudt42b/metazoneInfo.res
+SHA1-Digest: WrI+gjlkpqmXT7L8kiIFL/2lFfc=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_OM.res
+SHA1-Digest: 8jPOUtil+92lPKtgn16fuUJT/xs=
+
+Name: com/ibm/icu/impl/ICUService$Factory.class
+SHA1-Digest: JjbkqvP4n+0KVYf1xulU5Z4eAl4=
+
+Name: com/ibm/icu/impl/CalendarUtil.class
+SHA1-Digest: mXCxBGek45OV2AToojzS6lWPWwk=
+
+Name: com/ibm/icu/impl/data/icudt42b/sv_SE.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/fo.res
+SHA1-Digest: Gx/55iuk1yQeF8uV3HC9lx8Fawg=
+
+Name: com/ibm/icu/impl/data/icudt42b/om_ET.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fr_CH.res
+SHA1-Digest: w8kmzHDlCJGcUPey8IvdVJrfvQg=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$InverseUCA.class
+SHA1-Digest: rsj7nP8njlED4xOwiB6ZnMbOh1I=
+
+Name: com/ibm/icu/util/ULocale.class
+SHA1-Digest: yFjDW+f2stg60ntA5KZ4Gd7EU70=
+
+Name: com/ibm/icu/text/DecompData.class
+SHA1-Digest: /NZFm0m+Y3ZTpmzhS3cecFVYHhg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_HN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/lang/UCharacter$GraphemeClusterBreak.class
+SHA1-Digest: Bp5r7WDyc/oPgoQ4mDo35RSePh4=
+
+Name: com/ibm/icu/text/UForwardCharacterIterator.class
+SHA1-Digest: GWke+hdTckf+I7Ox5eLwBIW2PDk=
+
+Name: com/ibm/icu/impl/data/icudt42b/so.res
+SHA1-Digest: 1d0UHZi+M76i5kcQHo+keHSdnPc=
+
+Name: com/ibm/icu/impl/ICULocaleService$SimpleLocaleKeyFactory.class
+SHA1-Digest: 5JDiO36tIyr7uFW1suvdDYu9k8U=
+
+Name: com/ibm/icu/text/RuleBasedTransliterator$Data.class
+SHA1-Digest: INjgv979MVyDLH/Ok0DXmTUNICo=
+
+Name: com/ibm/icu/text/CollatorReader.class
+SHA1-Digest: hqzCgrVAzf5eo0v1BfYjejlBWvE=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_Latn_NE.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa_Guru_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Cyrl_ME.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/CECalendar.class
+SHA1-Digest: xHdrfhO2lA5NqpJm9kYkfHRoBIY=
+
+Name: com/ibm/icu/lang/UCharacter$NumericType.class
+SHA1-Digest: wwSYkQeTFo9hTCY2UOHS67woY5Y=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_MO.res
+SHA1-Digest: K0sKinko64INKTDfbkgnrEzo0W4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_TT.res
+SHA1-Digest: Gft7qBQnQOHLgK9veVL4VPW1bLI=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_cs.class
+SHA1-Digest: rN+qbASYhwZSvUlobMZ66ntMB8w=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_LY.res
+SHA1-Digest: PlPVnMH+m0uWLvQE+P1Ghs8d0QU=
+
+Name: com/ibm/icu/impl/ICUData$2.class
+SHA1-Digest: dK5G1/f28l6pLwsD3POwMCuv4gg=
+
+Name: com/ibm/icu/impl/TimeZoneAdapter.class
+SHA1-Digest: 8G41pZZL4p+FC/QCOYTOkk8CMJ8=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha.res
+SHA1-Digest: iXuHivvaoOD4e+oDCXA6ydCmtnI=
+
+Name: com/ibm/icu/impl/CharTrie$FriendAgent.class
+SHA1-Digest: RUX1V8Xjj+l9ekbRAoT+rlLyDgU=
+
+Name: com/ibm/icu/impl/ICUService.class
+SHA1-Digest: aUc+r0p341fLp6N8wsDJkzwlSlU=
+
+Name: com/ibm/icu/text/RBBIDataWrapper.class
+SHA1-Digest: Rz1+//cPD5Auu7G0zvWKasM4qkY=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hans_SG.res
+SHA1-Digest: sVTnOyfR0DUfh+/LCStQmRG02Eg=
+
+Name: com/ibm/icu/impl/data/icudt42b/pt_BR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/Normalizer$QuickCheckResult.class
+SHA1-Digest: 4afP7XvgOX4RQMmvMVq4EjWPFhY=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/mt.res
+SHA1-Digest: 2zzk4SVdV+RHOrFH6uqySBZ4kAs=
+
+Name: com/ibm/icu/impl/duration/TimeUnitConstants.class
+SHA1-Digest: 1ialH7qT9mVU7EXDscwlOkAGYEk=
+
+Name: com/ibm/icu/impl/data/icudt42b/lv.res
+SHA1-Digest: MtixZySEwlk+bBmUgDrZeJ6hJFs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es.res
+SHA1-Digest: xm9Nb0xqt7ETfugH1AdIsKD0su0=
+
+Name: com/ibm/icu/text/NormalizationTransliterator$3.class
+SHA1-Digest: KXjxH+Pbhe/oQsKli3FOja0GFZM=
+
+Name: com/ibm/icu/lang/UCharacterEnums.class
+SHA1-Digest: UcwiRTq/PVmX4Q9pROsYy7tIAtA=
+
+Name: com/ibm/icu/impl/TrieIterator.class
+SHA1-Digest: ZF8qBmw9SWQ4xLPigq+ttP0HH5s=
+
+Name: com/ibm/icu/text/SimpleDateFormat.class
+SHA1-Digest: YL3ZxvKdmixMzA5GJ1JYmnyXnH8=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_YU.res
+SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
+
+Name: com/ibm/icu/util/BuddhistCalendar.class
+SHA1-Digest: tpxOhBNizv5BVRDFxPSV1yBYa08=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator.class
+SHA1-Digest: SynHDhMaw6OQEXkI/GQyOn4Ry0s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_UZ.res
+SHA1-Digest: I6JdX5ppPd/ts7HMPlhQYE6F6dg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/bg_BG.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nn.res
+SHA1-Digest: XcezM2Ezj9IKqt2x1dUw8UTqXB8=
+
+Name: com/ibm/icu/impl/data/icudt42b/ms_BN.res
+SHA1-Digest: 9OEKuI9x6WgXToTg+xw0rxotDZA=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$Spec.class
+SHA1-Digest: Vy2f3Bml0rf/oH9/y62TnIos89M=
+
+Name: com/ibm/icu/text/LowercaseTransliterator$1.class
+SHA1-Digest: WrihvGS3ytjsiLTN9AGLdG5T98c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kl_GL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/da_DK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/RBBIRuleParseTable.class
+SHA1-Digest: xdkPFmEyodQyRifzCGIsIJUHB6A=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator$DateTimeMatcher.class
+SHA1-Digest: D/0YiLLDTmGNsL98lPRd2ySDzi0=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$3.class
+SHA1-Digest: qnlQ060pQEA1KSYweMl7L+WyYWw=
+
+Name: com/ibm/icu/impl/TrieBuilder$DataManipulate.class
+SHA1-Digest: OCqpw+WLzXMwly6HCsEkd99Kwnc=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_de_AT.class
+SHA1-Digest: mZlLi8ZXE09fTN+C/W91y/Kb70M=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_fr_CA.class
+SHA1-Digest: TFDs6Ohrc//BJh5oVarP/HomTS4=
+
+Name: com/ibm/icu/impl/NormalizerImpl$NextCCArgs.class
+SHA1-Digest: JVR0BDY6pHtaCtJ+yJdL31rn+pQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/gu_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_BE.res
+SHA1-Digest: d6p6QyamvvXx+48Iwc7Atit9vNg=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_SA.res
+SHA1-Digest: JlgFRnI4nJlpLF9wvg2ugwSyEA0=
+
+Name: com/ibm/icu/text/UnicodeSet$IntPropertyFilter.class
+SHA1-Digest: nxEUGXEzCiRAnu8lisd33Fq3DoU=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ESeparatorVariant.clas
+ s
+SHA1-Digest: 7pGgIgI/YrwXlt9D6TxW9wM4nf8=
+
+Name: com/ibm/icu/impl/data/icudt42b/bo_CN.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_CO.res
+SHA1-Digest: JnYWZQ6ke5cRCVbjf8xGaBkF4xQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ka.res
+SHA1-Digest: h6UURuYopfcAy8xyXw2FL3eUQRU=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_GT.res
+SHA1-Digest: ce9Gf1FyWcMT9DFQTVm8ACnzw+c=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc4011.spp
+SHA1-Digest: +ydyHT5jXvaoMiFf+YNzgsQYXno=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sk.res
+SHA1-Digest: cIy+1Q8Sk7iWZHnwFFLM5ijFS2s=
+
+Name: com/ibm/icu/impl/data/icudt42b/unorm.icu
+SHA1-Digest: EiYFJ1deC4G7h7B8izp/B42f6tU=
+
+Name: com/ibm/icu/text/PluralRules$Rule.class
+SHA1-Digest: lnr5ZZiLWyfabx3PfQFUQ4kRXag=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_en.class
+SHA1-Digest: sdmnpOeq6vHUauAbQhnicxzCi1M=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/gu.res
+SHA1-Digest: L++AewHZn8F7ttXBFwV5flJChn4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Cyrl.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/te.res
+SHA1-Digest: 36kvibmsQgAZv0iYQqoLhwXD1K0=
+
+Name: com/ibm/icu/impl/data/icudt42b/ti_ER.res
+SHA1-Digest: KLcLOArdZ8CRPN8SrJMVRiSU8U0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_SY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_TW.res
+SHA1-Digest: FI8SXUxAHIZ4WAdjGjq/j705WQs=
+
+Name: com/ibm/icu/text/RBBISetBuilder$RangeDescriptor.class
+SHA1-Digest: IYaOR5Li53wz+/ew5LMCgHCEOK8=
+
+Name: com/ibm/icu/text/Bidi$Point.class
+SHA1-Digest: WrjHFUDw+BfBg0zVo+hiO51s+rk=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hans_MO.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/CharsetMatch.class
+SHA1-Digest: ON88NxwVmEi9K6MOVo5BKhXlBeE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de__PHONEBOOK.res
+SHA1-Digest: IwSg0o/LpBjuSIHpx4oTw6trYHc=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_KW.res
+SHA1-Digest: 8jPOUtil+92lPKtgn16fuUJT/xs=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_el.class
+SHA1-Digest: FXpaa3HqUKNZXl0Ip10yyAIvKJE=
+
+Name: com/ibm/icu/util/CalendarServiceShim.class
+SHA1-Digest: Ba0xioCD4rnLV4TjtjW/mDMtZoY=
+
+Name: com/ibm/icu/text/NumberingSystem.class
+SHA1-Digest: LHwENSoYEPnE0QgQuTRPQTYT3ZU=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc$CharsetRecog
+ _euc_kr.class
+SHA1-Digest: oJ0ItqPy76y7oJBc0o8ujS8uesY=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_NG.res
+SHA1-Digest: /Pw+JNU9+Ymdp0EpFOGKcUwuK4o=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/da.res
+SHA1-Digest: lTZX0wyZxIXjbMXSAs28sY5Mkaw=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_Arab_PK.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/id_ID.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/cy_GB.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/NumberFormat$NumberFormatFactory.class
+SHA1-Digest: sdLRJildSf87YuWQG6Z+Zu5THvw=
+
+Name: com/ibm/icu/util/HebrewCalendar.class
+SHA1-Digest: ZLiKbjSyHovxTVdRTu827rxk9E8=
+
+Name: com/ibm/icu/text/ChineseDateFormatSymbols.class
+SHA1-Digest: 1ALrkiOxWoANjLRxcz45HYxFRK4=
+
+Name: com/ibm/icu/text/DurationFormat.class
+SHA1-Digest: 4/LajaAa+l1ghTwrDguApZUPRRA=
+
+Name: com/ibm/icu/util/LocaleData.class
+SHA1-Digest: iZPzvsWVCXF02iLV3wufQnrAlXg=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EDecimalHandling.class
+SHA1-Digest: 2SOoR+mng47ZN9oI3av7Xv9KiWY=
+
+Name: com/ibm/icu/impl/UCharacterNameReader.class
+SHA1-Digest: 5p7BvE7VGf5aCt90xzrSojTkzwQ=
+
+Name: com/ibm/icu/text/CaseFoldTransliterator$1.class
+SHA1-Digest: my4KH6UvZH61LmQJ9by169BpIsQ=
+
+Name: com/ibm/icu/text/PluralRules$OrConstraint.class
+SHA1-Digest: pK3u/wijq+F9xqRcXY3lqHdSTCM=
+
+Name: com/ibm/icu/impl/data/BreakIteratorRules_th.class
+SHA1-Digest: nwliB5sJL3Z30p35rPoMRZFxgpY=
+
+Name: com/ibm/icu/impl/data/icudt42b/as_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/FunctionReplacer.class
+SHA1-Digest: Y59QnXwARkfmXDY5Kx9F88nCa34=
+
+Name: com/ibm/icu/impl/data/icudt42b/az_Cyrl.res
+SHA1-Digest: ZzI6/TgVFKDdc1kW6Ys5cDDLMUU=
+
+Name: com/ibm/icu/text/PluralRules$2.class
+SHA1-Digest: dyLZMC0oL6LAsBLMZtBpQremE4Q=
+
+Name: com/ibm/icu/text/Transliterator$Factory.class
+SHA1-Digest: HlRT/XtlhZKVGY1Pkx98liTP3Es=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM420_ar_ltr.cl
+ ass
+SHA1-Digest: Zvm4Bvw3w6cly319y6Cb0g8QW/c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hans_CN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ps_AF.res
+SHA1-Digest: Ft7S6n/o3/L7Am77oNmqkNnADP0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ml.res
+SHA1-Digest: FOVr1j2HVkMtmdpGcqpE6FG3ioQ=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_pl.class
+SHA1-Digest: xzeBYxtH9Oi6Ympb/AoJpA+r8Xg=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_CH.res
+SHA1-Digest: iWggUFP9iWQM6vz4u4uvosBlSTw=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_MA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_7_el.class
+SHA1-Digest: lwusdP/j7kumOfUmZXcKVWR9ZuY=
+
+Name: com/ibm/icu/impl/URLHandler$FileURLHandler.class
+SHA1-Digest: Nk3C/NyoD1irVs/E83xe3usluFU=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ms.res
+SHA1-Digest: zyhWSB/F90DTVxyce1M1kcFjT3w=
+
+Name: com/ibm/icu/util/IslamicCalendar.class
+SHA1-Digest: HPQc24WncyidJMQA7tU0ltnWnCE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/iw.res
+SHA1-Digest: WZP9bAErSkXNMGcS7Cigt2GwNKw=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_IE.res
+SHA1-Digest: 5T6abhg/OLVnv8VFyHI/P09LHHg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_EG.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStrings.class
+SHA1-Digest: X35OcO7tw/xR4NaU9TTPyAXDMH0=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_es.class
+SHA1-Digest: J8bXijecxdlToXRrGS1GjZlmxzI=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_ME.res
+SHA1-Digest: dcZDvDDLm120rqoRa2rrkl/voxA=
+
+Name: com/ibm/icu/text/StringPrepParseException.class
+SHA1-Digest: 7hwrnIatfmyZ81dOSQRxXm/WgQA=
+
+Name: com/ibm/icu/impl/data/icudt42b/uprops.icu
+SHA1-Digest: 8vLNyqXGunE4QYH2blIKAhRC1JA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/it_CH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/AnyTransliterator$ScriptRunIterator.class
+SHA1-Digest: J7xT4P19qEBaVUL8ReOU7m5Wmhc=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_th.xml
+SHA1-Digest: NP0IwbGJwQJTVPp+VdZ6leVSYjU=
+
+Name: com/ibm/icu/impl/ZoneStringFormat.class
+SHA1-Digest: n3jJDl78ykXRjY9ytbsnH+fUwDA=
+
+Name: com/ibm/icu/text/EscapeTransliterator$4.class
+SHA1-Digest: NOPq/bUbsneMkFbx2hOqAYvNdiw=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/be.res
+SHA1-Digest: EU4hzpM72nJWgBnQtxdAF/Sqvrs=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_hi.xml
+SHA1-Digest: x48QdYWUXtpPWcdQKeU/uQwWBkg=
+
+Name: com/ibm/icu/impl/locale/LocaleExtensions.class
+SHA1-Digest: YEytk8PbUUmLkD5IxZtRfgy8ua8=
+
+Name: com/ibm/icu/impl/data/icudt42b/el.res
+SHA1-Digest: Qfral1uhzYOA18MgSYiOUVffZgI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/bn.res
+SHA1-Digest: cxctNEMzXGKFExa+BKr81cP6bTk=
+
+Name: com/ibm/icu/impl/NormalizerImpl$FCDTrieImpl.class
+SHA1-Digest: mnwJsoHXLlYPybUU9/TYlZBsois=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Latn_BA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8.class
+SHA1-Digest: 5kkX0Pb1WfSU60ydJwyKCr5ko8c=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fr_BE.res
+SHA1-Digest: PGu/zJ5BoapgXVlTTdEaIZ32IRc=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$1.class
+SHA1-Digest: Vf971NEaFuoVyyRUPsqjQ9QqHts=
+
+Name: com/ibm/icu/text/TitlecaseTransliterator$1.class
+SHA1-Digest: ekTC9gWzv3dYRBtoQqNHqbKkuCc=
+
+Name: com/ibm/icu/impl/data/icudt42b/so_KE.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs.class
+SHA1-Digest: zb96ltRlnZu1B4er1dwcZW9Eeno=
+
+Name: com/ibm/icu/impl/data/icudt42b/so_SO.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_fr.class
+SHA1-Digest: 9O29pqbYd82G8WZDF65YDtjKYYU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pl_PL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/hi_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM424_he_ltr.cl
+ ass
+SHA1-Digest: tVJXdjtBCoXEFZOxSH6FEtwZ3gY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_RS.res
+SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/cs_CZ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliterationRule.class
+SHA1-Digest: utxfpe1JXSDmAHVABKr61kRepHo=
+
+Name: com/ibm/icu/impl/data/icudt42b/sq_AL.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/word_POSIX.brk
+SHA1-Digest: H+ArIep4Jx2N4RbYEuTJCwNYzYs=
+
+Name: com/ibm/icu/impl/ICULocaleService$ICUResourceBundleFactory.class
+SHA1-Digest: tQphcQBErAwyMomKnr3pUKqj+Zc=
+
+Name: com/ibm/icu/text/UnicodeReplacer.class
+SHA1-Digest: Y0PfDc+j6xXLIk74hykjzB1JKC4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_GB.res
+SHA1-Digest: ZIcHjRFXCXCsVODe36+7mgA4Vbk=
+
+Name: com/ibm/icu/impl/data/icudt42b/no_NO_NY.res
+SHA1-Digest: 2NYID4Vq+YppdI5emYl/jXROPPs=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/line.brk
+SHA1-Digest: ZVQKdnj8YFefqEk0OYpqSafj4NY=
+
+Name: com/ibm/icu/text/TransliteratorParser$RuleHalf.class
+SHA1-Digest: uSw9Oxx+Uh9GJR8BTp4E/cqeF5A=
+
+Name: com/ibm/icu/text/LowercaseTransliterator.class
+SHA1-Digest: u+1+BuvXsLbtGmHL1x9ql9YS2eA=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM424_he.class
+SHA1-Digest: DxswcWySGwwfX1xRpMeBtysMgms=
+
+Name: com/ibm/icu/impl/locale/LanguageTag.class
+SHA1-Digest: n1pLB+RCZsWN6sqpa1jkFKt3xVU=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_DO.res
+SHA1-Digest: DqUgxafBny6RSK/5q4mvOxc7iio=
+
+Name: com/ibm/icu/impl/data/icudt42b/mt_MT.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/TransliteratorIDParser$Specs.class
+SHA1-Digest: z/LW93onXArAMvnRSrRW2DAb8FQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/he.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/util/SimpleDateRule.class
+SHA1-Digest: myCDNTkS4hL2rfFvE1xyost/B2c=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$Equatorial.class
+SHA1-Digest: 5Vz1H3GN/CL7MoCyC4MwaiglnEM=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_ru.xml
+SHA1-Digest: +MhXs1pUJCowfzBjMIxV5Y7SOd0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hu.res
+SHA1-Digest: 1CzulnzZCBDXuQhyvA3QUmTBzKU=
+
+Name: com/ibm/icu/text/StringTransform.class
+SHA1-Digest: 87UqNV3vGCvS/7/a4HFvPbzqBx0=
+
+Name: com/ibm/icu/text/CollatorServiceShim$1$CollatorFactory.class
+SHA1-Digest: G9MKwe3Z6MWx5EgeoOjvxQzJzsA=
+
+Name: com/ibm/icu/impl/ZoneMeta$OlsonToMetaMappingEntry.class
+SHA1-Digest: hTd2gMHlAkWuHlqds37sqFpn75s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/iw_IL.res
+SHA1-Digest: Ndcrw5xpVXzCNkJpNiv+lI2hixc=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_en_CA.class
+SHA1-Digest: JDt2Epln27M6w0EISNH/fPRsNUA=
+
+Name: com/ibm/icu/util/EasterHoliday.class
+SHA1-Digest: gU3zJqbUJQ0nepfR/f0MSnuGU5Y=
+
+Name: com/ibm/icu/text/CollationRuleParser.class
+SHA1-Digest: QOwn/ESmdLXciNhbTTbM9Z9oyUo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_HK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/cy.res
+SHA1-Digest: IjwvDB8dPSFSrF+1EmdSfxUkbQw=
+
+Name: com/ibm/icu/text/CompoundTransliterator.class
+SHA1-Digest: 5OVDmXwjxdOHAtd2CYFA+uBa9B4=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$6.class
+SHA1-Digest: i9ZJrC+QqcKPKdQWsfHcPqq+Vig=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_gb_18030.class
+SHA1-Digest: iC854J7dr3cHe4KoWoNTPy9TBe8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr_LU.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/IndianCalendar.class
+SHA1-Digest: 3XPNa9IES+iIV8QeLY7IhVDwa94=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_VE.res
+SHA1-Digest: 4VOwBf/mE6cdbFyqhsrKCRr/XOo=
+
+Name: com/ibm/icu/impl/duration/SingleUnitBuilder.class
+SHA1-Digest: 7Lbd45pTs05yTZT6LHsAVLwrDUk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mk.res
+SHA1-Digest: NK/D6puvIc4L5KgtFCBg8xnqYgU=
+
+Name: com/ibm/icu/text/NumberFormatServiceShim$1$RBNumberFormatFactory
+ .class
+SHA1-Digest: KWv7WM8vztOPnESv5qbk99bAZIU=
+
+Name: com/ibm/icu/text/PluralRules$RuleChain.class
+SHA1-Digest: xY33n67OiMo6cmfx7GzC+Nxam70=
+
+Name: com/ibm/icu/impl/data/icudt42b/lt.res
+SHA1-Digest: RCVCO7vMMVR7mU3BXzP2jYRCrcg=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodBuilderFactory.class
+SHA1-Digest: N8R3x3V8zFVPD8VcvNKR+AaxYfE=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl.res
+SHA1-Digest: ofu0p2h5HG++q/Yi5O9ZawldKoI=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceTable.class
+SHA1-Digest: I6khLCo2DaxntrU0S6DIrA+yfWg=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$CombinClassTable.cla
+ ss
+SHA1-Digest: 62or7OA9Pd50cK/U9LRAwN+8qfc=
+
+Name: com/ibm/icu/util/BasicTimeZone.class
+SHA1-Digest: IZl/327nYe0DJhVM90gOKrGT8Js=
+
+Name: com/ibm/icu/impl/ICULocaleService$LocaleKeyFactory.class
+SHA1-Digest: TGAXraAIjv/MY/Qk5GpoVe6jtYw=
+
+Name: com/ibm/icu/lang/UCharacter.class
+SHA1-Digest: yl1/93oXbkl3h1CO6QPdj6BsQB4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_US.res
+SHA1-Digest: qXwLlsGY/3vEgZHppDA+hTle9kE=
+
+Name: com/ibm/icu/impl/ImplicitCEGenerator.class
+SHA1-Digest: mDdS1NF/0Pa0Skz4/d5y0u6v/W0=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/res_index.res
+SHA1-Digest: bL+dIdb2KUnRa93fXxewvMLJI2I=
+
+Name: com/ibm/icu/text/RBBISymbolTable$RBBISymbolTableEntry.class
+SHA1-Digest: h641TWqk5EPYgd6C7RW3Gr+tqdg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/in_ID.res
+SHA1-Digest: 8zlBXCvSDwjZG5pjJeRB/oOjkYQ=
+
+Name: com/ibm/icu/util/JapaneseCalendar.class
+SHA1-Digest: DoUUa2voWgbgoPWcSB/MgDkeYMU=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$iteratedChar.class
+SHA1-Digest: nsKXKdueSf7brr92FCIhz1Qsm3I=
+
+Name: com/ibm/icu/text/CollationRuleParser$ParsedToken.class
+SHA1-Digest: 7qAThOKZIWiUm2sHRH0bGr5atnY=
+
+Name: com/ibm/icu/impl/data/icudt42b/ro_RO.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sl_SI.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_ZA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nl.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/duration/MultiUnitBuilder.class
+SHA1-Digest: pjtW/QoFrwOxa/rvRgfkavI1GTQ=
+
+Name: com/ibm/icu/impl/ICUNotifier$NotifyThread.class
+SHA1-Digest: 0r/5F6NJvmNs1rsa4kEJrpfpDd8=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_da.class
+SHA1-Digest: 1AUxaJOgwtqynl88sHyX8dyqaMI=
+
+Name: com/ibm/icu/impl/data/icudt42b/si_LK.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/thaidict.ctd
+SHA1-Digest: HlyfpuQK4BpjbhSyj4gjqbruK+s=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fi.res
+SHA1-Digest: npbQkpd8AZHPoLRmfuzowEfTFzc=
+
+Name: com/ibm/icu/impl/locale/AsciiUtil.class
+SHA1-Digest: 3b1TgQKu1k/RPxuKUd3w6/zig7A=
+
+Name: com/ibm/icu/impl/data/icudt42b/af.res
+SHA1-Digest: 52DLxOkAYfg0y4pBFgFNe3IQyxg=
+
+Name: com/ibm/icu/impl/data/icudt42b/el_CY.res
+SHA1-Digest: 8jQYdbnXrngEdw2KPXMdGZG6DyA=
+
+Name: com/ibm/icu/util/GregorianCalendar.class
+SHA1-Digest: hZTv4c+Oq9tB7TFdrSEav8ryhNQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr.res
+SHA1-Digest: oJNZ0c5MEQBKMUWuJvOmIDoeLmI=
+
+Name: com/ibm/icu/util/TimeUnitAmount.class
+SHA1-Digest: pu+pMpTaGhmoBMq6unPA0qA2BA0=
+
+Name: com/ibm/icu/impl/ICURWLock.class
+SHA1-Digest: rfmo0U2aNAWxwkb5eqhh/tH4YIo=
+
+Name: com/ibm/icu/impl/UPropertyAliases$Builder.class
+SHA1-Digest: k9NaPB5XdTlDku/+HPGL7fC6Gm4=
+
+Name: com/ibm/icu/impl/ICUService$SimpleFactory.class
+SHA1-Digest: 40JBDsy4Y4/ocfF1VsvWDCiXbeA=
+
+Name: com/ibm/icu/impl/data/icudt42b/eu_ES.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/ja.res
+SHA1-Digest: Cbc5IhZH1+duwYviZZEpgIFYZoE=
+
+Name: com/ibm/icu/impl/data/icudt42b/lt_LT.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/util/TimeZoneRule.class
+SHA1-Digest: CVj+0zrNL5CgUOnjhErAPxD+Qew=
+
+Name: com/ibm/icu/impl/data/icudt42b/zu.res
+SHA1-Digest: W4VI0r+O7mZMeiYpDq0vxwobosM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/om.res
+SHA1-Digest: fajgkySjDcJyt/T3YaC1+UuLCTI=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_16_BE.cla
+ ss
+SHA1-Digest: I9kxMzXZX9R/Bv0nFXJfzDaoVNQ=
+
+Name: com/ibm/icu/impl/ICUResourceBundle$2.class
+SHA1-Digest: ZIsBMVavHvGZF9ZX1DYO/P56qpU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr.res
+SHA1-Digest: NK/D6puvIc4L5KgtFCBg8xnqYgU=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_NZ.res
+SHA1-Digest: jCgI1jet1172J3Hh2GIFozz94S4=
+
+Name: com/ibm/icu/util/InitialTimeZoneRule.class
+SHA1-Digest: mp5EGBn+TXpMfmVdHm8bpsRyC/Y=
+
+Name: com/ibm/icu/text/TimeUnitFormat.class
+SHA1-Digest: ViP9oKJVDmPPCKcmLxc6ZeyoGl4=
+
+Name: com/ibm/icu/impl/duration/DurationFormatter.class
+SHA1-Digest: 7rl/7uxutvms1EpNIkEwbDLA8dk=
+
+Name: com/ibm/icu/impl/PropsVectors$DefaultGetFoldingOffset.class
+SHA1-Digest: 86s/fZUL0lJFgEsOlUHS5f95Uv8=
+
+Name: com/ibm/icu/text/DateIntervalFormat$SkeletonAndItsBestMatch.clas
+ s
+SHA1-Digest: 6wwt+Vn3RzhR7U9CnMWVzVP9DLQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_PE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/CharacterIteratorWrapper.class
+SHA1-Digest: quQ/R+xXqDAhzjuDqhIFhHv2obo=
+
+Name: com/ibm/icu/impl/data/icudt42b/bg.res
+SHA1-Digest: tNkdCAZjNp729CWY3Sryb1QYBtY=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ko.res
+SHA1-Digest: evbr5I+KAhPVScEH+fkA3JSA8/I=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_AT.res
+SHA1-Digest: 5pyTTAp1eNGel5widQkojp7s/BU=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_CA.res
+SHA1-Digest: c+Rn5vM/x0zcQS45Lxndnn6EitQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/te_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/util/UResourceBundle$ResourceCacheKey.class
+SHA1-Digest: GqXyodIg+d1ra8syzVxhyeATfP8=
+
+Name: com/ibm/icu/impl/ByteBuffer.class
+SHA1-Digest: DSdhbgYfq3wv3eGhF781djGuoNQ=
+
+Name: com/ibm/icu/impl/ICUResourceBundleReader.class
+SHA1-Digest: hcTMaVt1ZwyR3u8r5PKnJGdAA1E=
+
+Name: com/ibm/icu/text/NullTransliterator.class
+SHA1-Digest: vK7McK9EiV3VXgWmey860vIG26U=
+
+Name: com/ibm/icu/impl/ICUService$LocaleRef.class
+SHA1-Digest: D8+zmtHUjnAaTkgfBK27ykkjH+E=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_NE.res
+SHA1-Digest: 4952wbbl9STSZr19VAGXk33hPag=
+
+Name: com/ibm/icu/impl/data/icudt42b/sl.res
+SHA1-Digest: XnoEYlBTMvQ2fq/7rNoqSzA+ops=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$MoonAge.class
+SHA1-Digest: vqyfPuE8UInzHXP7zsDHkL/+0jY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/invuca.icu
+SHA1-Digest: nV2nXv49GlRcOAAkPjQ+2jd2Pyg=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_BE.res
+SHA1-Digest: csz++MM2eyh0NxqWiki+7CJowF4=
+
+Name: com/ibm/icu/impl/duration/Period.class
+SHA1-Digest: ru7kTkDzjLIia6nozhpZsvwQYmE=
+
+Name: com/ibm/icu/text/Normalizer$NFKCMode.class
+SHA1-Digest: TWOmWft4uNIwIw/VnhPk2RWCIeg=
+
+Name: com/ibm/icu/impl/data/icudt42b/ne_NP.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_pt.class
+SHA1-Digest: O1Ekqzlef6BbkYYhHKYFTuXZaZI=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Arab.res
+SHA1-Digest: KmaUQEJGKBgyBCSQZqT0GbCojcc=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_US.res
+SHA1-Digest: NbniVg0+hlwZgs9vL21zvZKZ8ZY=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc4518ci.spp
+SHA1-Digest: jwS5uyK3B8J+UxFK0NWKcqWhWuQ=
+
+Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieNodes.class
+SHA1-Digest: WxDBuCTnfcAYbQPXgF1zvrAkLyU=
+
+Name: com/ibm/icu/impl/data/icudt42b/be_BY.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/ICUResourceBundle.class
+SHA1-Digest: z9RbTjSpZ57D2J3yOMhnscmHC/0=
+
+Name: com/ibm/icu/impl/CalendarData.class
+SHA1-Digest: oKetVzyIxB1uqfYeKJcCRe00iCo=
+
+Name: com/ibm/icu/math/BigDecimal.class
+SHA1-Digest: bmlV5Au0e6B9r/dnfVMTXXrdnKE=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator$VariableField.class
+SHA1-Digest: 7NVd830iC3dxssfuPtPgddVNpsw=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EPluralization.class
+SHA1-Digest: QAZDpJnhDQNiCMJAw3YezWa1OFU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_US_POSIX.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/uk.res
+SHA1-Digest: m1LMujAxbn500RtZ2EOHgHrtZFE=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8_he.class
+SHA1-Digest: NrYU4M6ztrXzPGifXzmNojF6CwE=
+
+Name: com/ibm/icu/util/AnnualTimeZoneRule.class
+SHA1-Digest: KS0yZPziZiVKPTAtBKFClJu/iiU=
+
+Name: com/ibm/icu/impl/data/icudt42b/mk_MK.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/util/UniversalTimeScale$TimeScaleData.class
+SHA1-Digest: Go0JjviIig8ojaJuujyCC7l68A0=
+
+Name: com/ibm/icu/text/RBNFPostProcessor.class
+SHA1-Digest: q/ZhdtLQ26/YmVXQIltghNEEnR0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ur_PK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/locale/LocaleObjectCache.class
+SHA1-Digest: Rs3T4xei1iQRxNEvWL2gpUbSR64=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Latn_UZ.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nl_NL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/tr_TR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/nl_BE.res
+SHA1-Digest: e3Jm+rsG7JODkDrlMvj2AKGDp0U=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_AR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ms_MY.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$WeightRange.class
+SHA1-Digest: 7IwnBaT3SvD2aSO6KJcD8ska5Vo=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_el_GR.class
+SHA1-Digest: 6Du4+mKi2hTN7hFK2dVFi+jEGhs=
+
+Name: com/ibm/icu/text/RuleBasedCollator$contContext.class
+SHA1-Digest: DiHfrfKH4NQKbzm6WgPo0oG+3VA=
+
+Name: com/ibm/icu/text/RuleBasedCollator$ContractionInfo.class
+SHA1-Digest: c9vy2P2kVLvYjvx+whU6+tmThIM=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl_YU.res
+SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_MH.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/NormalizationTransliterator$1.class
+SHA1-Digest: cZMNujQoi0deKyrTfzaAbqu4xBM=
+
+Name: com/ibm/icu/text/CollatorServiceShim$1$CFactory.class
+SHA1-Digest: gBfd+RD2EyDVs8x+UvpPSNkqlHs=
+
+Name: com/ibm/icu/impl/data/icudt42b/res_index.res
+SHA1-Digest: j/Y5C0w9IN1smPiYvtAALi7EP1I=
+
+Name: com/ibm/icu/impl/CollectionUtilities.class
+SHA1-Digest: bnviw1N7SbN1CA9YpbdHFo0i34c=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ar.res
+SHA1-Digest: mxn+DOdoFnY8cE6VINsu1sWF6k8=
+
+Name: com/ibm/icu/text/StringSearch.class
+SHA1-Digest: 2/qKN8gDomjJplfZWowovT9UiWc=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/nb.res
+SHA1-Digest: pC1VnSBS4uAHkkfeBfRT14btvFc=
+
+Name: com/ibm/icu/util/Currency.class
+SHA1-Digest: Vd+sQ7K38RWwBzmQDfPjZymtDgM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fa.res
+SHA1-Digest: lP6J92JPZzTjZeQqTriXh3t7pwc=
+
+Name: com/ibm/icu/text/UTF16.class
+SHA1-Digest: Q4h4K07luaFe7fKxRKOTAJkrdGI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fo_FO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/TextTrieMap$LongestMatchHandler.class
+SHA1-Digest: X2PVGUt63YZq67tVXXkc1NhcBOE=
+
+Name: com/ibm/icu/impl/data/icudt42b/mt.res
+SHA1-Digest: f6x9Y8U63J6N4ZfylHTnFiUrpt4=
+
+Name: com/ibm/icu/util/SimpleHoliday.class
+SHA1-Digest: fnGw7XmpwBT8phMTJdA9jyQHhD4=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$1.class
+SHA1-Digest: a5usj8Vu8lcl6yCFt3nQYfGh6Is=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$MaxExpansionTable.cl
+ ass
+SHA1-Digest: LG8DbaGsK2TfOuSxhSzlNE8uGNA=
+
+Name: com/ibm/icu/impl/duration/PeriodBuilderFactory.class
+SHA1-Digest: enn/L+fRJf2sKmAFxTbtz3YDP1A=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Latn_RS.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3530csci.spp
+SHA1-Digest: hT8tQfqBYuaf33sYa1GreAYgtv0=
+
+Name: com/ibm/icu/impl/UCharacterPropertyReader.class
+SHA1-Digest: LVkg/Qc9VbHmjBZ1icn4Ig+BrrQ=
+
+Name: com/ibm/icu/impl/PropsVectors$1.class
+SHA1-Digest: 5FqEUvWVuM7lLyDsjCUgEe9FjZo=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_CL.res
+SHA1-Digest: obu9OW7kMF1Nx3L0IM98PGbHXeo=
+
+Name: com/ibm/icu/impl/data/icudt42b/ne.res
+SHA1-Digest: duMJizZp8RorX2N+3+Zjso72SfI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/pt_PT.res
+SHA1-Digest: kCSqbmr0loDY9alATTUHZXexntk=
+
+Name: com/ibm/icu/impl/data/icudt42b/th_TH.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/ucase.icu
+SHA1-Digest: NbsONvF25QGxx3Uj+0gDMZjJwUs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sq.res
+SHA1-Digest: ZciRWcJ84VGX656FvAxiXm1eMRM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sv_FI.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nn_NO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/duration/impl/PeriodFormatterData.class
+SHA1-Digest: QHSkfrspxJbAlPznfeeS/ZL3KY4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_SG.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/fa_IR.res
+SHA1-Digest: Ft7S6n/o3/L7Am77oNmqkNnADP0=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_BZ.res
+SHA1-Digest: gNiSAh8b/u1Z0rqHV3hhBfBfN3g=
+
+Name: com/ibm/icu/impl/data/icudt42b/ca_ES.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: about_files/license.html
+SHA1-Digest: qgmm4hdKqgmltFsQdToOx+7jQq4=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_IN.res
+SHA1-Digest: aABsNcBcPMaMcFhBGb0doQYhb68=
+
+Name: com/ibm/icu/text/AnyTransliterator.class
+SHA1-Digest: vtTVdzD2QPGEGb0k2+llmPwTDoM=
+
+Name: com/ibm/icu/text/UnicodeMatcher.class
+SHA1-Digest: FT3g8JBh7zBjeL0/HM+DZ5NKiS8=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$BuildTable.class
+SHA1-Digest: j0lpHNvFTFZ5kI2HSuuOmOUaLnI=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/th.res
+SHA1-Digest: PrgXwx6kvPd60L7cLcZM/Q2JxO0=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_es.xml
+SHA1-Digest: MwvLXsR3TbSMZUVdFeyCStptuqE=
+
+Name: com/ibm/icu/text/CollationRuleParser$TokenListHeader.class
+SHA1-Digest: zmfkMc1gnmRjkVm1DPXnpDrjaFc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ta_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr_CH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ka.res
+SHA1-Digest: IkWJQAKvj+7KlPqpDS7It99krKk=
+
+Name: com/ibm/icu/text/ArabicShapingException.class
+SHA1-Digest: aXkH6QCASAmw0W1Yryw5kjrwtmY=
+
+Name: com/ibm/icu/text/MultiplierSubstitution.class
+SHA1-Digest: m2h61dS2htdkYl1Vz01v6HsmrWU=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_sjis.class
+SHA1-Digest: n60qSSB7U+3PM5pNZ4wiPRV2y/k=
+
+Name: com/ibm/icu/impl/data/icudt42b/sk.res
+SHA1-Digest: 8VrUr5n/mwDmSvfsNJT3z93GLG0=
+
+Name: com/ibm/icu/impl/NormalizerDataReader.class
+SHA1-Digest: P3mxrBlY1iY4G5WbZubfkQTbcjg=
+
+Name: com/ibm/icu/text/DateIntervalInfo.class
+SHA1-Digest: qfnul6lLpgX/VCWKk/J7uy85KM8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/tr.res
+SHA1-Digest: GfEOcunXuaSfRHU0te0gfJt0pkI=
+
+Name: com/ibm/icu/util/GlobalizationPreferences.class
+SHA1-Digest: LWxbbuIZxeJxmE+lpITnkWw4LMQ=
+
+Name: com/ibm/icu/impl/duration/impl/RecordWriter.class
+SHA1-Digest: v/lue5U+YnhX5R+ax7Lkrub9gbs=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/de.res
+SHA1-Digest: 0x3/6f5+CvSAa9mRWPvA62HPxKY=
+
+Name: com/ibm/icu/text/PluralRules.class
+SHA1-Digest: hHCiObLK9UFKzwKst1WWs3zt/QA=
+
+Name: com/ibm/icu/impl/data/icudt42b/so_DJ.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/impl/UBiDiProps$IsAcceptable.class
+SHA1-Digest: 1ur4xU6L4zqknyOmC8MbBZC6ljk=
+
+Name: com/ibm/icu/impl/data/icudt42b/gl.res
+SHA1-Digest: cD6A+WwrV1sCc9Q66vd6zzqw5DE=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/pt.res
+SHA1-Digest: ZUY8ahQ/8zCngGEBaPCKQdmtBb0=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1.class
+SHA1-Digest: Jrl1xlYN8m4PHJ0Rg3ZRATbFmGw=
+
+Name: com/ibm/icu/text/PluralRules$Constraint.class
+SHA1-Digest: rJu0vOah/TG2QnsK0fyVM3oMlQc=
+
+Name: com/ibm/icu/impl/UCaseProps$IsAcceptable.class
+SHA1-Digest: XLBgMJUK+hW8gwWAPk6GJb5ZEac=
+
+Name: com/ibm/icu/text/UnicodeNameTransliterator.class
+SHA1-Digest: eqMuvZwA/4Wp1OxCC8BiAZ64Wqc=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_PK.res
+SHA1-Digest: 4TV69vD1W7j1+XOtCT7MJ3bMN4k=
+
+Name: com/ibm/icu/impl/NormalizerImpl.class
+SHA1-Digest: rNltEt8QQ+yHyIbAJdq/ikmt5fI=
+
+Name: com/ibm/icu/text/MessageFormat.class
+SHA1-Digest: Xiw7CkMW5rwz2Yio5gZnLrxNK4w=
+
+Name: com/ibm/icu/impl/NormalizerImpl$NextCombiningArgs.class
+SHA1-Digest: YXiOb8g3mw7ovg7aVwC2WPly75U=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hant_HK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/SimpleTimeZone.class
+SHA1-Digest: i6ayoQBb7deeWACvzugp6qhZ8tM=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/title.brk
+SHA1-Digest: 3DcL4WBfEzn6DVCGWNU8f+H7wD4=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_16_LE.cla
+ ss
+SHA1-Digest: ii9bW2z/WhsUtyQfhc5yIR27ZXI=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodFormatterFactory$Customizat
+ ions.class
+SHA1-Digest: uwx71FwrVlYiNlMCHBsf/Pcfb2U=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_YE.res
+SHA1-Digest: JlgFRnI4nJlpLF9wvg2ugwSyEA0=
+
+Name: com/ibm/icu/text/BreakCTDictionary.class
+SHA1-Digest: pn7slJgjKRKLtEMgior12sDz1ak=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_MX.res
+SHA1-Digest: av934CdFdzvgow13hWU6wmuLg1w=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/id.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/hr_HR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/lv_LV.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/is_IS.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStringInfo.class
+SHA1-Digest: pbsSMUYtHO4Id/0apErFc7LK2xs=
+
+Name: com/ibm/icu/impl/ICUConfig.class
+SHA1-Digest: i6brhWFD1e9foqBetYHQjtW99Fg=
+
+Name: com/ibm/icu/lang/UCharacterEnums$ECharacterCategory.class
+SHA1-Digest: kq95RgOd7C81QGqvQ9TDGG7vGus=
+
+Name: com/ibm/icu/impl/Trie.class
+SHA1-Digest: faI/WsgoUlZyHaMpB9pbgiXR8jQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/ka_GE.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/Normalizer$FCDMode.class
+SHA1-Digest: cxxYxkX9o5W0IvoRzvKlbNaztGk=
+
+Name: com/ibm/icu/text/BreakDictionary.class
+SHA1-Digest: UP8ASYdqL29Glsr8/OQKevINEb4=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa_Guru_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$Elements.class
+SHA1-Digest: f4elhHsP3zglY0Jy2yfnI9kTrSs=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_NI.res
+SHA1-Digest: DqUgxafBny6RSK/5q4mvOxc7iio=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$ContractionTable.cla
+ ss
+SHA1-Digest: 8fuUD6JzPWZqtbTsPDfOVKtHiws=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl_ME.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/eo.res
+SHA1-Digest: +oVARzO29K91tHbe3FnahinyelY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/it.res
+SHA1-Digest: Y1cpTHeoNVfdEXGVZ93BmxkHEHM=
+
+Name: com/ibm/icu/text/DictionaryBasedBreakIterator.class
+SHA1-Digest: KeNnKYC6BsmOvho5Y6DchAtPgCA=
+
+Name: com/ibm/icu/text/Transliterator$Position.class
+SHA1-Digest: Jkv3rNTZsJ+xkVJJUBpOaTT76s8=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_Latn_GH.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/DecimalFormatSymbols.class
+SHA1-Digest: 0mxMIxZUhCv/Q2ygAhwk0UEP9a8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_IQ.res
+SHA1-Digest: PlPVnMH+m0uWLvQE+P1Ghs8d0QU=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/en_US.res
+SHA1-Digest: +/LVRKi4A8LFr24NwK7dKO0oWpw=
+
+Name: com/ibm/icu/util/CompactByteArray.class
+SHA1-Digest: cc6CYflTyn7tNMxUw4ASBITqJMY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/az.res
+SHA1-Digest: H2uhvCqKkzlwlK8rnknx1A78Q/E=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_KOI8_R.class
+SHA1-Digest: riRX0XvAPQb+UDxa7TzhQ5BTOhA=
+
+Name: com/ibm/icu/util/Calendar$PatternData.class
+SHA1-Digest: QvNuOomKswixg40xWPLtLjJ7Tx4=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_es_MX.class
+SHA1-Digest: aJj0AuIV6cPRpCUHraAMoiitYAE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ro.res
+SHA1-Digest: l9Mio86mPE7IXVIwDYesBpvvuaY=
+
+Name: com/ibm/icu/text/EscapeTransliterator$2.class
+SHA1-Digest: 7pXr2tZ5BIPS54TSTMYnCxzJ9ds=
+
+Name: com/ibm/icu/impl/data/icudt42b/af_ZA.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EFractionHandling.clas
+ s
+SHA1-Digest: w8RJoRmgHZR1YWbZyKBeT/G8z2I=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kn_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/DecimalFormat$AffixForCurrency.class
+SHA1-Digest: YM0iVPOvosSdWPkdTjvpaFgBaG8=
+
+Name: com/ibm/icu/text/TransliteratorParser$RuleArray.class
+SHA1-Digest: 9+5ONRBkEMeDc+pM08gGAlFKUPM=
+
+Name: com/ibm/icu/impl/duration/BasicDurationFormat.class
+SHA1-Digest: udccTJD6aKauWEMAQrpFdBqZbE8=
+
+Name: com/ibm/icu/impl/data/icudt42b/in.res
+SHA1-Digest: 4yHeO3OZURAGnQ+2Akh1AsFcJ6M=
+
+Name: com/ibm/icu/text/UnescapeTransliterator.class
+SHA1-Digest: HSvMH1HFNAHlDiIhMPqbMqRlkc0=
+
+Name: com/ibm/icu/impl/data/icudt42b/ms.res
+SHA1-Digest: gDIEZDP6L8ZZEta2qRcYp4hWuOk=
+
+Name: com/ibm/icu/text/StringReplacer.class
+SHA1-Digest: 7NR3/R3qL7pu/FLsNhafHAXzpRE=
+
+Name: com/ibm/icu/text/CollationRuleParser$Token.class
+SHA1-Digest: 2pGTO1X0k52exJqKxvbIByhLPzQ=
+
+Name: com/ibm/icu/util/UResourceBundle.class
+SHA1-Digest: GZeE/aPMAyoTiFXvkI4KS+TWO7M=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_6.class
+SHA1-Digest: 7DtfuirDtGTVCrV0L0bnydon7G4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_ZW.res
+SHA1-Digest: FgBSoPD44rFUuOLPQRCrOHAc3tk=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_fr.class
+SHA1-Digest: q3zdWAt/DWCYaQCMAZ1T2gEJAK0=
+
+Name: com/ibm/icu/impl/PropsVectors$CompactHandler.class
+SHA1-Digest: ggK2FbvQCDVeXFFIwoX/ew6A1+E=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_BH.res
+SHA1-Digest: PlPVnMH+m0uWLvQE+P1Ghs8d0QU=
+
+Name: com/ibm/icu/impl/duration/impl/RecordReader.class
+SHA1-Digest: otdlfBIBwfQJI/LpPGORqmfxHAY=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ScopeData.class
+SHA1-Digest: CUN2vXzRoglrcSJRSshk6n63o0s=
+
+Name: com/ibm/icu/impl/data/icudt42b/hy_AM.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/BreakIteratorFactory.class
+SHA1-Digest: C9b/3h/+ymneQJsc7NRtmTZidrE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ga.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_CN.res
+SHA1-Digest: OqOcERNgY90GdftreFDuBO3TG1M=
+
+Name: com/ibm/icu/util/DateTimeRule.class
+SHA1-Digest: 6Y2wXwNKzW42QtQFndLjZ5eA2Vs=
+
+Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieHeader.class
+SHA1-Digest: Lvk8zfGOkbWKdXgHfCdB/5w8qhg=
+
+Name: com/ibm/icu/lang/UCharacterDirection.class
+SHA1-Digest: mzsqJB3oC2e9hT9G3B+QQ8lNOvo=
+
+Name: com/ibm/icu/impl/data/icudt42b/ko_KR.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$SolarLongitude.class
+SHA1-Digest: C+U0AZa67vUwMns4qF4TRna4Qw0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/root.res
+SHA1-Digest: AckNe2H2q3g8FCoDvSBSbO+kme4=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3722.spp
+SHA1-Digest: O+oXDpXLu3SpyBxRnC5bJn+JZKc=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32_BE.cla
+ ss
+SHA1-Digest: TwM3Y0RU/24b0vY2ND6aAzh5IOU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/he_IL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/be.res
+SHA1-Digest: 52+8V1switFgz1JwlTRd9TU5AY0=
+
+Name: com/ibm/icu/impl/data/icudt42b/zu_ZA.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/TransliteratorIDParser.class
+SHA1-Digest: gIkT1ALBXArAjCoC5O6xiugzImo=
+
+Name: com/ibm/icu/text/BreakIterator$BreakIteratorCache.class
+SHA1-Digest: phLZKKu4L32+t3q5BhoPs59gUSM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ta.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/impl/locale/LanguageTag$Extension.class
+SHA1-Digest: hP1cjTyvX4J0MRjxpyyrEDzCJQ4=
+
+Name: com/ibm/icu/impl/OlsonTimeZone.class
+SHA1-Digest: 79gXZSUmqX9nyoCpNAVgO+DWdZE=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/cs.res
+SHA1-Digest: uSebe78HXFnRtd479ROo8v36RzU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ucadata.icu
+SHA1-Digest: Q0NSXQYbhwdZrWPlvg7mwKfQqzM=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/th.res
+SHA1-Digest: E5WgEa5K8Jv2uSWGq8c6bmuy7RA=
+
+Name: com/ibm/icu/impl/RelativeDateFormat.class
+SHA1-Digest: oMXqzEz0mVQhGcIkNs9yjZBB+rc=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodFormatter.class
+SHA1-Digest: YQxVtZg5JGrmmU+2ORW4dsAnhhY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pl.res
+SHA1-Digest: M0bmX8ggP1RA4n9g+mfeuf4w2vI=
+
+Name: com/ibm/icu/impl/data/icudt42b/it_IT.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/UPropertyAliases$NameToEnum.class
+SHA1-Digest: 1UWDuuszFPV1T89n2Vlmt+eGCmc=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder.class
+SHA1-Digest: SybX4sTXAEHaYJdYogcpBmeDHFE=
+
+Name: com/ibm/icu/impl/duration/PeriodFormatterFactory.class
+SHA1-Digest: Gz2jDCMozbAi0EtSygOfpwiDEaU=
+
+Name: com/ibm/icu/impl/data/icudt42b/ml_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/EscapeTransliterator$7.class
+SHA1-Digest: Z7n+wBbeA8TUZHsmYBlqk13sMzY=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_TN.res
+SHA1-Digest: 9ITuE03Z0uIKcoax3BwbvIc/tT0=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/hi.res
+SHA1-Digest: zbX53lArZJM2PBtNDPSPxrjs/Y0=
+
+Name: com/ibm/icu/lang/UScriptRun.class
+SHA1-Digest: w95JD/6qCUnxRZfmQTKPmPKrvWM=
+
+Name: com/ibm/icu/util/MeasureUnit.class
+SHA1-Digest: Lm2xF6VH+OjPTxITaAOlgBpG12k=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hr.res
+SHA1-Digest: XuzR5SbWs2nW9osDEAfha6cGa2M=
+
+Name: com/ibm/icu/text/RuleBasedCollator$shiftValues.class
+SHA1-Digest: iqFJFznuvJ8QiNSRh8boK5ca34c=
+
+Name: com/ibm/icu/util/ULocale$Builder.class
+SHA1-Digest: aCQyYl7o/IWttOB6d9NmA+DJhQA=
+
+Name: com/ibm/icu/impl/data/icudt42b/unames.icu
+SHA1-Digest: E/oDzXc4m34RIDn+MkqvTruEPkM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_UY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/hy.res
+SHA1-Digest: VIG9x5xgEQ9Whs1CREdMyHneEdc=
+
+Name: com/ibm/icu/text/CharsetRecog_2022$CharsetRecog_2022KR.class
+SHA1-Digest: uIlFjt23o0muOFs/AzAwDT/30n8=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$4.class
+SHA1-Digest: VbbBBBlf7X8KBWgLvQAzkycRwTM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ur.res
+SHA1-Digest: M3vpShSeTW+pZKWO1dTIOU1PiQM=
+
+Name: com/ibm/icu/text/Collator.class
+SHA1-Digest: LRS6CYoxVdosNtHhOcqxwUunut0=
+
+Name: com/ibm/icu/text/CurrencyPluralInfo.class
+SHA1-Digest: mI9XG4Gzqdj+U1kyn6hVFIT1GmI=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_DZ.res
+SHA1-Digest: IDE7op9Yf3rbmNaFIehSXw7XkZ4=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn_CS.res
+SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/az_Latn_AZ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3920res.spp
+SHA1-Digest: FOk27XPxxzqY/o7PdaVE9NkudcM=
+
+Name: com/ibm/icu/text/UnicodeFilter.class
+SHA1-Digest: my9i+rgEySYx94ptWNTO7DEK0CI=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc.class
+SHA1-Digest: JyXQVNCIPLJ3ETcNa/dGzQw07Jg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en.res
+SHA1-Digest: Y1cpTHeoNVfdEXGVZ93BmxkHEHM=
+
+Name: com/ibm/icu/impl/UCharacterName.class
+SHA1-Digest: juBrLaL8p8sCuOOVHQ1TnJMsUlY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/is.res
+SHA1-Digest: 6hK47oZwKTuGT9iPhseedM8jlF8=
+
+Name: com/ibm/icu/text/ReplaceableContextIterator.class
+SHA1-Digest: uh1kGQxSFFvCdOfvwtMV/RFp+eM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh.res
+SHA1-Digest: 6jCCDw85GO2YKFjyVbmJrz3CiPA=
+
+Name: com/ibm/icu/impl/PatternTokenizer.class
+SHA1-Digest: gs1cCTRtoRWvrb+oFfectqAAqKM=
+
+Name: com/ibm/icu/text/UnicodeDecompressor.class
+SHA1-Digest: P0CxO6PopQd9eYsRcbgFjhhJAAo=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord.class
+SHA1-Digest: yQwxbsPMAMJZtW92px2Azs09o+k=
+
+Name: com/ibm/icu/util/DateInterval.class
+SHA1-Digest: +yUQ3agmmyHDT5HONUXlJWwUCug=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_DE.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/no_NO.res
+SHA1-Digest: AgYfyOH+DuzgYK7m3vioTfRNJGM=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hans_CN.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/UCharacterUtility.class
+SHA1-Digest: RYgGg5aVfygChVLyTQtG7xXr5wE=
+
+Name: com/ibm/icu/text/RemoveTransliterator$1.class
+SHA1-Digest: adHlF+kCdJ8Wpc4GRnP5ZOoybWY=
+
+Name: com/ibm/icu/lang/UCharacter$WordBreak.class
+SHA1-Digest: zJGbZhxPqMpVRK0/corQLR+o4dY=
+
+Name: com/ibm/icu/text/RuleBasedCollator$Attribute.class
+SHA1-Digest: 8sK3ftAAk+yvM8ElgkX7lH50YuU=
+
+Name: com/ibm/icu/impl/data/icudt42b/root.res
+SHA1-Digest: /jAvBLb66EQZJz5i6Gq4tq6HSvI=
+
+Name: com/ibm/icu/impl/data/icudt42b/translit/en.res
+SHA1-Digest: lOD2KZjZY+4pQnEyWvgj0DI4RDk=
+
+Name: com/ibm/icu/util/CurrencyServiceShim$1$CurrencyFactory.class
+SHA1-Digest: BKDqfNuidFYkbVc2arHWlh4IrPg=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ru.res
+SHA1-Digest: iRI+TvON4CitbxJC2tml5Gwbm24=
+
+Name: com/ibm/icu/impl/data/icudt42b/mr.res
+SHA1-Digest: UHvxkZBfSMdipoSIt5zozq5bjl0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fo.res
+SHA1-Digest: vbVaz1xXlVn5yEQRlonKgJvyGWM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_VI.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/af_NA.res
+SHA1-Digest: ZJhpBjdCUjCGufR3nIYX3msnGzU=
+
+Name: com/ibm/icu/text/RuleBasedCollator$DataManipulate.class
+SHA1-Digest: hn7tPwffVpqHMlzCJTK0MvHPNu4=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator$FormatParser.class
+SHA1-Digest: vMY8S4QsTo3/NkiuMAfJlS/FmHY=
+
+Name: com/ibm/icu/text/RawCollationKey.class
+SHA1-Digest: 3p8QSf4RMy7FWuzJxVK0vTyzxm8=
+
+Name: com/ibm/icu/impl/data/icudt42b/ja_JP_TRADITIONAL.res
+SHA1-Digest: DCIG4K+9A5S+ggUNe8mClIrukoo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_SV.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/as.res
+SHA1-Digest: kNF0lmyepvyJY1OATWVPOyN5cuQ=
+
+Name: com/ibm/icu/impl/StringPrepDataReader.class
+SHA1-Digest: 5+x+D/q2Tfss85/OnRNjggZLa+8=
+
+Name: com/ibm/icu/text/PluralRules$AndConstraint.class
+SHA1-Digest: 7JpT5jTip4AmnvLsoq0vkCgsH2U=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr_BE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/ULocale$Type.class
+SHA1-Digest: NsX83h5T3oxdnE9NRCaf11wzYAw=
+
+Name: com/ibm/icu/impl/data/icudt42b/sh_CS.res
+SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_FR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodFormatterFactory.class
+SHA1-Digest: 93Ha1HovBfFi0sXu/RlW024g4qQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_SD.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_CR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/kl.res
+SHA1-Digest: +XCe59JTx811cO0BnIbor0pY4oU=
+
+Name: com/ibm/icu/impl/data/icudt42b/fa_AF.res
+SHA1-Digest: MCUzt2dbZquysJJ9Wyftv1v2Aw0=
+
+Name: com/ibm/icu/impl/data/icudt42b/fi.res
+SHA1-Digest: egnljVIZU7/PrmmGTn7xPIB5vYQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sv.res
+SHA1-Digest: 1GxvJ+dugNpfnkBvZhyhTVjIhz8=
+
+Name: com/ibm/icu/impl/PVecToTrieCompactHandler.class
+SHA1-Digest: jagBKk3dAK8PALAgc9WB+CemdWU=
+
+Name: com/ibm/icu/impl/data/icudt42b/kk_KZ.res
+SHA1-Digest: Pv1X4jlPvVlxVZcgVveM6ghr16s=
+
+Name: com/ibm/icu/text/RuleBasedCollator.class
+SHA1-Digest: 2HzBICFjeZ8/8lk1GXdwZU41tlU=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_ar_EG.xml.escaped
+SHA1-Digest: 89IJ4u72v6STQ+GkOaiPXvgvl4s=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_HK.res
+SHA1-Digest: speOMn/V2KXsedph/5CkSZvBY08=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn_BA.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_PR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$IDEnumeration.class
+SHA1-Digest: 74amdxMNJNhmTUp/bulLHwa6i2c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_CA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/si.res
+SHA1-Digest: 6M3GODokvo4JZ45IPc4pyGHIYEY=
+
+Name: com/ibm/icu/text/BidiLine.class
+SHA1-Digest: jKOX3AurU/M65CYpHs3YvYETEek=
+
+Name: com/ibm/icu/impl/StringUCharacterIterator.class
+SHA1-Digest: ekMX227GRJphyERiR/umNms9kM4=
+
+Name: com/ibm/icu/impl/data/icudt42b/sw_TZ.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/util/ValueIterator$Element.class
+SHA1-Digest: Z/T9wKiHNB+APS2ppz/rMGcZNDM=
+
+Name: com/ibm/icu/impl/data/icudt42b/vi_VN.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/ICUDebug.class
+SHA1-Digest: SspfDg59S2oDuGoH8+SkpBx8s90=
+
+Name: com/ibm/icu/impl/ZoneStringFormat$ZoneStringSearchResultHandler.
+ class
+SHA1-Digest: BYPDhs+w8cmo9wAbabRKm1NFmC0=
+
+Name: com/ibm/icu/util/ULocale$1.class
+SHA1-Digest: L5DCd7IW6ovpmPR11P7CCnuArHo=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_5_ru.class
+SHA1-Digest: a/FsoaP2fh5J5wU2qkxQBUWJb/4=
+
+Name: com/ibm/icu/impl/data/icudt42b/ko.res
+SHA1-Digest: tOu85iYUlfDaTDxuuVMYkyJYoHk=
+
+Name: com/ibm/icu/impl/CalendarCache.class
+SHA1-Digest: 978G+98m5Rh9L1p42o178Ly9eKs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/lv.res
+SHA1-Digest: 4SzArVsgHZrdCIIUzut2PY4nrj8=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceTable32.class
+SHA1-Digest: WPNlKMDc2Tuy/gugJ/bvNQR8L0w=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_fr.xml
+SHA1-Digest: q6GC/B2UeKvgMaDcH227hHVFGZY=
+
+Name: com/ibm/icu/text/DateIntervalInfo$PatternInfo.class
+SHA1-Digest: 4/oklHbdHf13PMYRQkAzk38U1tk=
+
+Name: com/ibm/icu/impl/data/icudt42b/om_KE.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/text/RBBIRuleBuilder.class
+SHA1-Digest: lg7MPOym9rNtMJUUA8ulzJGlDS8=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32_LE.cla
+ ss
+SHA1-Digest: X95uQTiQ2wmoXpevIRmZTrG3YRQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_QA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorParser$RuleBody.class
+SHA1-Digest: Xong52pzaxRFJy7oUm3qakdrrWU=
+
+Name: com/ibm/icu/impl/data/icudt42b/sh_BA.res
+SHA1-Digest: vYOnYIQEmwDnRfySDiGCAZETvgI=
+
+Name: com/ibm/icu/util/CompactCharArray.class
+SHA1-Digest: HTvkUkdGiggb8cA8jgTTErrJDKY=
+
+Name: com/ibm/icu/lang/UCharacter$JoiningGroup.class
+SHA1-Digest: RFbRF6cgexKGY8nzvWunz1c+lRs=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_ja_JP.class
+SHA1-Digest: 94Q//J7nEmgNgIHchnp3upyZK80=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Cyrl_BA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3530cs.spp
+SHA1-Digest: X/hcRTFL9xucSczvJdQ5nhEtyjY=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_AE.res
+SHA1-Digest: xB4LS1AXeLApkNRYIagiSn8fWm8=
+
+Name: com/ibm/icu/text/TransformTransliterator.class
+SHA1-Digest: Bp5EzBliTjSPluXDEnQ2DTLVlSY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hant_MO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/et.res
+SHA1-Digest: 5sefqgiyK6TsRUJsBZNq6rdoSFo=
+
+Name: com/ibm/icu/text/PluralRules$ConstrainedRule.class
+SHA1-Digest: mwS5RQX34YK/F18R/1DjGO5s3yk=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/vi.res
+SHA1-Digest: SKKBSmXiXjkfCso9m0wB8fcRO0k=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/bn_IN.res
+SHA1-Digest: cxctNEMzXGKFExa+BKr81cP6bTk=
+
+Name: com/ibm/icu/text/IntegralPartSubstitution.class
+SHA1-Digest: TpSmcVNsIPtTQutvMY/1h5r0QF8=
+
+Name: com/ibm/icu/impl/data/icudt42b/uk.res
+SHA1-Digest: t0VnKz31Xa+/q0TbAqWqkzNO0ek=
+
+Name: com/ibm/icu/text/RBBIRuleScanner.class
+SHA1-Digest: OE2CMGT9R6AY2Vy88H38N3iSw38=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hu_HU.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/RBBIRuleScanner$RBBISetTableEl.class
+SHA1-Digest: rEFw4whXXbI9r6JfLgXUytOyvv4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/el_GR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/translit/res_index.txt
+SHA1-Digest: ccDO61RRoZeVanV00Bh3R8N3sAM=
+
+Name: com/ibm/icu/impl/UCharArrayIterator.class
+SHA1-Digest: fD55q09R46pQmMVkSx1qnl6ZwK4=
+
+Name: com/ibm/icu/impl/Punycode.class
+SHA1-Digest: 33Cw/TgF+Vpe0qFLg9EfQzF/TqE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ru_UA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/kk_Cyrl.res
+SHA1-Digest: ofu0p2h5HG++q/Yi5O9ZawldKoI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/zh_Hant.res
+SHA1-Digest: BUFDOhxml2zt0sarXan2QbEgDVI=
+
+Name: com/ibm/icu/text/TitlecaseTransliterator.class
+SHA1-Digest: tXpjeR9ROFwNlV9dZ/7tyGMxxzE=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_8_I_he.clas
+ s
+SHA1-Digest: HwGee4XXYIs8h31ApYcJg+M2AGg=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/char.brk
+SHA1-Digest: 24ckRQ8bFjANmi7CJB+e3SdfxOo=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl.class
+SHA1-Digest: eY4eVJw+5MgftU/m31xLoSUdVEo=
+
+Name: com/ibm/icu/impl/UPropertyAliases$ContiguousEnumToShort.class
+SHA1-Digest: sJi+BMHZTNNTiJrR7+adqFkrbK4=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_en_US.class
+SHA1-Digest: mfCx2hYc8gNROIoHOAWQvReUKBk=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar.res
+SHA1-Digest: kdMpoz4d3X5Q0VX7vpBMTpahZHo=
+
+Name: com/ibm/icu/impl/locale/BaseLocale$BaseLocaleKey.class
+SHA1-Digest: y3N56aqGeOurXb25ANv5Lpv+JZM=
+
+Name: com/ibm/icu/impl/data/icudt42b/nb.res
+SHA1-Digest: P1WTbgYJCRRiiqBeiKzVSgyfN+M=
+
+Name: com/ibm/icu/util/RuleBasedTimeZone.class
+SHA1-Digest: Hz3GJvEjL+DaZg4d7cV1ykMvJCU=
+
+Name: com/ibm/icu/text/BreakCTDictionary$CompactTrieHorizontalNode.cla
+ ss
+SHA1-Digest: 8ubK2FFiCZ8rL211dzKm7vhqZw4=
+
+Name: com/ibm/icu/impl/duration/PeriodFormatter.class
+SHA1-Digest: fgmgm7tQREqM8kA9uECAJQvWXcA=
+
+Name: com/ibm/icu/impl/ICUData$3.class
+SHA1-Digest: SNoX0DZtpC0NoTAfFC8Skxnk19c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sk_SK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$CompoundRBTEntry.class
+SHA1-Digest: EPnpi9TAxVaO3NeV1adWIdFgrYk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ga_IE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_PA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ca.res
+SHA1-Digest: NttIT6YBvTg34r7iqmE6HXsLm2Y=
+
+Name: com/ibm/icu/impl/ICUBinary$Authenticate.class
+SHA1-Digest: L3EQHZn7xcd114K4mUWT1FJmgiM=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_BW.res
+SHA1-Digest: yPOqHpP+lfKjwqoLwMj9q+MFsh4=
+
+Name: com/ibm/icu/impl/data/icudt42b/nb_NO.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/InvalidFormatException.class
+SHA1-Digest: KQj97EUEqC/UjllyMtFzgCozy9s=
+
+Name: about_files/ucdterms.txt
+SHA1-Digest: VSl7MUMAroQl6WS17r4Mov82WGE=
+
+Name: com/ibm/icu/impl/data/icudt42b/et_EE.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/SCSU.class
+SHA1-Digest: gtL+Jw2NeLaYqamDE4o+5Mj8fwI=
+
+Name: com/ibm/icu/text/NormalizationTransliterator$4.class
+SHA1-Digest: zxwhI6zKlhVTIwG+EoxHm5GuwsI=
+
+Name: com/ibm/icu/impl/duration/TimeUnit.class
+SHA1-Digest: +J6ylhxAa9t5D3hJsleaDIcefRo=
+
+Name: com/ibm/icu/impl/UCharacterProperty.class
+SHA1-Digest: wkAjE+pktFKGcDpWVWaZJkrTEaA=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hant.xml
+SHA1-Digest: oqiUHHJv27k8wMntxWNJWm5cuyU=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_PY.res
+SHA1-Digest: 2ELEXjaQo8G5C0a6Hy/Hkz7rMSU=
+
+Name: com/ibm/icu/impl/data/icudt42b/sh.res
+SHA1-Digest: 5xIT4uaABWOSZbAPadn5pBVATSA=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceArray.class
+SHA1-Digest: n20Yw5n5uQ+BIumrifw1rJ+ib4Y=
+
+Name: com/ibm/icu/util/OverlayBundle.class
+SHA1-Digest: VA09j//ouBzZfRljhs43EWH1UWg=
+
+Name: com/ibm/icu/impl/UPropertyAliases$EnumToShort.class
+SHA1-Digest: qCCoaX1zSCkCReWgxReTup/2G44=
+
+Name: com/ibm/icu/impl/data/icudt42b/ru_RU.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/fi_FI.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/res_index.txt
+SHA1-Digest: zMIWnk6WM/vR2hqXFYMQNXNgZOA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_LB.res
+SHA1-Digest: y01P6EzYLLwoVlSjXJeuBgiLjCM=
+
+Name: com/ibm/icu/util/Range.class
+SHA1-Digest: Gdt1lwgw36pXsWkU5+00HqS3QIg=
+
+Name: com/ibm/icu/impl/data/icudt42b/gl_ES.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sh_YU.res
+SHA1-Digest: 63xXzYBbV2uVP5NlLgeUyp8SVsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/kn.res
+SHA1-Digest: SVYFAxtKC+g1SO17ypdtiXirQ+U=
+
+Name: com/ibm/icu/text/CollationParsedRuleBuilder$MaxJamoExpansionTabl
+ e.class
+SHA1-Digest: Eok++JuBprd94P5XKo5qwmWXWrU=
+
+Name: com/ibm/icu/impl/duration/DateFormatter.class
+SHA1-Digest: oJjB/+u4BmY6gz/1nLFC/kPqZwk=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_PH.res
+SHA1-Digest: 6BW6lipgAJqQsAKKGoMdtSasfBY=
+
+Name: com/ibm/icu/text/Normalizer$NFCMode.class
+SHA1-Digest: WfCJwh7saeRB031INtF1nyrY/eA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_CS.res
+SHA1-Digest: aduEqkdKeplfC5eiWemPKHmW34A=
+
+Name: com/ibm/icu/text/TransliteratorParser.class
+SHA1-Digest: uTVZldbPwZNIfoTa/80LFyt47jg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ja_JP.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_EC.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/IntTrie.class
+SHA1-Digest: Emz1DpkrwDLpkWJrLwen4ogwy38=
+
+Name: com/ibm/icu/impl/data/icudt42b/uk_UA.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$4.class
+SHA1-Digest: TWFpivaDmTZyNPWR0TZvAtsI/nQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hant_TW.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3530mixp.spp
+SHA1-Digest: k7n909A1REAMmV/8LzfjYnuVV9E=
+
+Name: com/ibm/icu/util/LocaleData$MeasurementSystem.class
+SHA1-Digest: dTfJgF/KG451ruH4/XBUID8h6vI=
+
+Name: com/ibm/icu/impl/data/icudt42b/ro_MD.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/UppercaseTransliterator.class
+SHA1-Digest: K65rOhkHFPPJvTXVS2GDDskDrTw=
+
+Name: com/ibm/icu/lang/UCharacter$LineBreak.class
+SHA1-Digest: WedFMmAGGCS+5uNafKaQHQNgmb4=
+
+Name: com/ibm/icu/impl/data/icudt42b/ti.res
+SHA1-Digest: WLeTLbxjrlBE8fDMGACkk1zylsk=
+
+Name: com/ibm/icu/util/TimeUnit.class
+SHA1-Digest: YYv+j0u/3WBB/3MsB5Up+pODuoU=
+
+Name: about.html
+SHA1-Digest: rVxS5BfocAAiJOoDz/y0EGBqWJQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_ES.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/th_TH_TRADITIONAL.res
+SHA1-Digest: dm/VvqW10ZR3pUBSFUpvtHbOtyM=
+
+Name: com/ibm/icu/impl/data/icudt42b/de.res
+SHA1-Digest: r2YFTqYDh43kuN8P+52svTSa2QM=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_GH.res
+SHA1-Digest: UpQPUoCUtlF8gu6zJzaxTmrcrd4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/el.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/impl/data/icudt42b/pt.res
+SHA1-Digest: PIlKrQuWNHvwerC93IMwogMB2w8=
+
+Name: com/ibm/icu/util/TimeArrayTimeZoneRule.class
+SHA1-Digest: JrMCVEvM6EXDzfMLF4hLxx/UTu8=
+
+Name: com/ibm/icu/impl/BOCU.class
+SHA1-Digest: 5zGkejToe99lZmFfgN60Aw1CGLg=
+
+Name: com/ibm/icu/util/RangeValueIterator.class
+SHA1-Digest: C7gsvse8Hi7kFuiOsp6IH6N6LZs=
+
+Name: com/ibm/icu/impl/duration/impl/YMDDateFormatter.class
+SHA1-Digest: 04ea5xJyxIHWp8noFNHjcF8WY/M=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$ResourceEntry.class
+SHA1-Digest: enFBOMFozjzH7zQDyyzk5JQMSyI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/es.res
+SHA1-Digest: 2+qJ2wsZOqcH8UavAC/5OT+BWN0=
+
+Name: com/ibm/icu/impl/data/icudt42b/ubidi.icu
+SHA1-Digest: 8PG8LlE9FD31PSbCFlqH8ikBN/E=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_MT.res
+SHA1-Digest: Pcke7lFGpfc23L9mplirDz06oEU=
+
+Name: com/ibm/icu/impl/NormalizerImpl$NormTrieImpl.class
+SHA1-Digest: GBex0A5HCO3NbnOqR1hsq7uCKdM=
+
+Name: com/ibm/icu/text/PluralRules$RangeConstraint.class
+SHA1-Digest: q40jS31nQeUuwXHCU/LJExfrtBQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_BO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mr_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CaseFoldTransliterator.class
+SHA1-Digest: SZ9RH9iVqmQKyXe+4EodLH2yFJE=
+
+Name: com/ibm/icu/text/NFRuleSet.class
+SHA1-Digest: YOae4QHYvx66WmYCpkPIjpXAgSE=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_SG.res
+SHA1-Digest: 99MTdXPuizTQKIDtoLc37T5PHW0=
+
+Name: com/ibm/icu/impl/ICUBinaryStream.class
+SHA1-Digest: hwmYmhWRwl1SLll0fs1fViSKoKk=
+
+Name: com/ibm/icu/impl/data/icudt42b/translit/el.res
+SHA1-Digest: 8pcLhZA5frBXKUIf3AD59p6DT2o=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/nn.res
+SHA1-Digest: 3MUK/nZAIdYhsFmqdH72FN13NGo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_LU.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ur_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_AU.res
+SHA1-Digest: RyQf0wElkKbRCCBLJXA8u2TsY50=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz.res
+SHA1-Digest: N3L5iQmIl1raILWLrrGf95ussYk=
+
+Name: com/ibm/icu/lang/UCharacterCategory.class
+SHA1-Digest: DKoDFXBwKD0rTGW0gmri0Gv1V1M=
+
+Name: com/ibm/icu/text/Transliterator.class
+SHA1-Digest: qEg4h7YGt0qhMDM74Imk2Wxc7ik=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_JO.res
+SHA1-Digest: NNqZL3oR7R1bDqOqiHpw7PObhUw=
+
+Name: com/ibm/icu/impl/Assert.class
+SHA1-Digest: 7EflTLK1aav09w+8J9byWrzxwJ8=
+
+Name: com/ibm/icu/impl/data/icudt42b/supplementalData.res
+SHA1-Digest: iHFo2qpbPrI0GGNg8gDE+iognNA=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EHalfSupport.class
+SHA1-Digest: xaZ+Li5POYKVmpZR06xzhQbgAYA=
+
+Name: com/ibm/icu/text/SearchIterator.class
+SHA1-Digest: eSteDarFySmrnoW7QrhHbfS2eiU=
+
+Name: com/ibm/icu/impl/duration/DurationFormatterFactory.class
+SHA1-Digest: e6pCRwBCGl1NmEZzElE0lt+Tf5Q=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_US_POSIX.res
+SHA1-Digest: uhAY7D8tk/T13H2LeMxceizSn2M=
+
+Name: com/ibm/icu/text/NameUnicodeTransliterator.class
+SHA1-Digest: xKXUkrHKrAt4N+ALLEuv/LRumKw=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_ar_EG.xml
+SHA1-Digest: oIUIfYHf6QfubBGuBMOOiC8BhKo=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hant_HK.xml
+SHA1-Digest: CC3kTS07LVUlBxSGdrmbKrxeHT4=
+
+Name: com/ibm/icu/impl/TextTrieMap.class
+SHA1-Digest: i01hKmZ+v9n2opn7bBp8Ekh4DmI=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_BA.res
+SHA1-Digest: 6q0h04Ey+gEIoBcrzyHzzX1kkzA=
+
+Name: com/ibm/icu/impl/data/ResourceReader.class
+SHA1-Digest: KvaIhFKr51gH4b5+O0z6jeVOxKQ=
+
+Name: com/ibm/icu/lang/UProperty.class
+SHA1-Digest: twc3qgeSyXtpY7eshpN6PrAr9Eo=
+
+Name: com/ibm/icu/text/Bidi$LevState.class
+SHA1-Digest: 0UyGHDenyloCdjPmWuzEhGzlGaY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pt_PT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$Ecliptic.class
+SHA1-Digest: fpxm9HdwYfU8XsM2YRX/Ez8LqHU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_OM.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/plurals.res
+SHA1-Digest: AMk9el/59ihFhiQR5IwA4pDu4YA=
+
+Name: com/ibm/icu/impl/duration/PeriodFormatterService.class
+SHA1-Digest: AMUsoC/LowGM8ijioxYAKxEAi7c=
+
+Name: com/ibm/icu/impl/NormalizerImpl$ComposePartArgs.class
+SHA1-Digest: JECwXa9jCR5hR94sygRyPH+MfiY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sv_SE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/Freezable.class
+SHA1-Digest: Nett7+AkkXCiNnrJnxflPvqpmL8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/om_ET.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_it.xml
+SHA1-Digest: 7xCHchUQRlpLbS/+eVSne7fiYyA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Latn_RS.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_HN.res
+SHA1-Digest: hbFcqJVXRt+6y3H4Ur0GA+QDhkA=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_zh_Hans.xml
+SHA1-Digest: BIlCGllGabqtfsLAKABjzjniGb0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/cy.res
+SHA1-Digest: cxctNEMzXGKFExa+BKr81cP6bTk=
+
+Name: com/ibm/icu/impl/URLHandler$JarURLHandler.class
+SHA1-Digest: 0VxcRVI+Vxl9YOEnZcJsyz8HxkM=
+
+Name: com/ibm/icu/text/BreakTransliterator$ReplaceableCharacterIterato
+ r.class
+SHA1-Digest: cwcoXguflrDaGjAiatJfM62U/So=
+
+Name: com/ibm/icu/text/Normalizer$IsNextNFDSafe.class
+SHA1-Digest: HjqQUnj1PZDJ6LWbo4bH4Dy/Nmc=
+
+Name: com/ibm/icu/text/StringPrep.class
+SHA1-Digest: r2/v9NTIfI7t6heL+JGrJrnGlX8=
+
+Name: com/ibm/icu/text/SameValueSubstitution.class
+SHA1-Digest: I0Yb/iaWoL/Q9SmDdVKSI2PDow8=
+
+Name: com/ibm/icu/text/BidiWriter.class
+SHA1-Digest: A55m2XvTflUUWjb06MWmUIQZ/r4=
+
+Name: com/ibm/icu/util/CalendarServiceShim$1$RBCalendarFactory.class
+SHA1-Digest: 2YX6s5iEVSM09fEEo9af6TIxI8w=
+
+Name: com/ibm/icu/text/NumberFormat.class
+SHA1-Digest: r4oRPG04+89iIchE/IRijGjG3Hg=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Cyrl_UZ.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/Replaceable.class
+SHA1-Digest: P9D/42FBm3mI1gq3AcY65zHa1Z0=
+
+Name: com/ibm/icu/text/NullSubstitution.class
+SHA1-Digest: GYmVmxF/d4gycD7IaPPH3ue7oW8=
+
+Name: com/ibm/icu/text/EscapeTransliterator$5.class
+SHA1-Digest: hgNOnYM6NClu2fcKurTQsExqArw=
+
+Name: com/ibm/icu/impl/RuleCharacterIterator.class
+SHA1-Digest: sBDGFbddtrFMZ+nuE/bOogHcYGo=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/da.res
+SHA1-Digest: SQhrgOFBLruGpF1nEAx0nghlEPE=
+
+Name: com/ibm/icu/impl/data/icudt42b/kk_Cyrl_KZ.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/util/CurrencyServiceShim.class
+SHA1-Digest: Ryy1dcxGmbqQSMzOmlzsIwBwo8Q=
+
+Name: com/ibm/icu/impl/data/icudt42b/km.res
+SHA1-Digest: scC5i45GluFETfMFwK1q6dVLqJA=
+
+Name: com/ibm/icu/impl/ICUResourceBundle$AvailEntry.class
+SHA1-Digest: tceD5Z5nfKTPImhuz0s3aCBQlRM=
+
+Name: com/ibm/icu/impl/data/icudt42b/or.res
+SHA1-Digest: NZx4uyUBm4F3N8JBtgqNShVHVwA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sw.res
+SHA1-Digest: bCl8PqEwPU6p4brWqdea4WicFAI=
+
+Name: com/ibm/icu/impl/TrieBuilder.class
+SHA1-Digest: swpyE6nI4Sr7KpJbd42Y0cERBzs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/lt.res
+SHA1-Digest: U6Kwjj5lfZ28Tt7BX0tmcXZ4E+s=
+
+Name: com/ibm/icu/impl/data/icudt42b/gsw.res
+SHA1-Digest: GL/X7TK/JJbVmM9jS3+u2HYHpjU=
+
+Name: com/ibm/icu/impl/locale/InternalLocaleBuilder$FieldHandler.class
+SHA1-Digest: ssy5lCqgMOaIKIYOIYrXDrURwNU=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_MO.res
+SHA1-Digest: K0sKinko64INKTDfbkgnrEzo0W4=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_9.class
+SHA1-Digest: qoKPPirLpeq2ZK0FxFiMzSfPAxE=
+
+Name: com/ibm/icu/impl/data/icudt42b/likelySubtags.res
+SHA1-Digest: 9YPzb4vut3wWJCZNsmHTdNra3IM=
+
+Name: com/ibm/icu/impl/data/icudt42b/cs.res
+SHA1-Digest: 1JJ0+mG6GvYpDOZx8HrpvRXc9Lo=
+
+Name: com/ibm/icu/impl/data/icudt42b/bo_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/RBBINode.class
+SHA1-Digest: oR1BJYBbEC9i1uC84s7oLN237ZU=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$2.class
+SHA1-Digest: bo4DZ9p24LQ5XQYJVaZxkWr/JJ0=
+
+Name: com/ibm/icu/impl/data/icudt42b/th.res
+SHA1-Digest: MTUh6AsBSzgZqIBn4ktBHyNSRSc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_LY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/haw.res
+SHA1-Digest: NP6/LJllJv4b3gO3iY93kXOjiTo=
+
+Name: com/ibm/icu/text/CollationRuleParser$TokenOption.class
+SHA1-Digest: X5GQBJR2uKMv0v6z9Ni79EHUiZ0=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2_ro.class
+SHA1-Digest: 5qkdYEq4AOVDGPc5TWqPRUyNw8g=
+
+Name: com/ibm/icu/lang/UProperty$NameChoice.class
+SHA1-Digest: yFtZ9Irist4OxZVIo2vlmVFMR+o=
+
+Name: com/ibm/icu/impl/data/icudt42b/hi.res
+SHA1-Digest: X4CpJX4+Li9pyDS8x9tzZmCPCLg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/af.res
+SHA1-Digest: oR99rVvv+PeTWvs0iCiGEd0dFV0=
+
+Name: com/ibm/icu/impl/data/icudt42b/ps.res
+SHA1-Digest: 2/K9VtxxLDzS0u3szgd5VtFR7Dc=
+
+Name: com/ibm/icu/impl/data/icudt42b/ii_CN.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pt_BR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/TokenIterator.class
+SHA1-Digest: aVl9NEiavWU3YjMYXsmRqECSMcA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/res_index.res
+SHA1-Digest: uHnJT3lzNstJ+buwWlS+sOdWFSA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Cyrl_RS.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/am.res
+SHA1-Digest: kfAb0g/do/S4zkVbGOq95YiBdAc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/res_index.res
+SHA1-Digest: 1qlBKagoG9eeh1jKNQ+iO9OTzgM=
+
+Name: com/ibm/icu/impl/data/icudt42b/hy.res
+SHA1-Digest: NOel2U/i+2WvxpGEd3vzPQlspgY=
+
+Name: com/ibm/icu/text/CanonicalIterator.class
+SHA1-Digest: xnw2H+5eqcNRKWtbdizobk+l3cw=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hant_HK.res
+SHA1-Digest: tDBSVpaxCAkm5VCMjAMGx7lKjsQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ja.res
+SHA1-Digest: nYn3Ybdhw+lhVbLhXx5qDlUiCj4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_IN.res
+SHA1-Digest: ypWKEdk5Rt3Nr8XEnGYHLR8Yjlo=
+
+Name: com/ibm/icu/impl/data/icudt42b/bg_BG.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/IntTrieBuilder.class
+SHA1-Digest: ZR3vLaX/II6ocmZnF1dab3EX7jo=
+
+Name: com/ibm/icu/impl/data/icudt42b/kl_GL.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/text/CharsetRecognizer.class
+SHA1-Digest: ULmVva2M/Asi4KaInjapEMNfMvg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/bg.res
+SHA1-Digest: NK/D6puvIc4L5KgtFCBg8xnqYgU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ms_BN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/RBBITableBuilder$RBBIStateDescriptor.class
+SHA1-Digest: 5CbyXkVPOCRgvm43RVB1fSE8vdk=
+
+Name: com/ibm/icu/text/Normalizer$NFKDMode.class
+SHA1-Digest: hGcahPb4PoOii4Nm7MUVXKgV3Pg=
+
+Name: com/ibm/icu/impl/data/icudt42b/da_DK.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/BreakIteratorFactory$BFService.class
+SHA1-Digest: trG7yIeZRtCmuuC+oW1rJ3ILKi8=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/word_ja.brk
+SHA1-Digest: tceghqHRl7z9Gx4ul5FP7AtQCys=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodFormatterService.class
+SHA1-Digest: /IhFZk0vqWB/qEymixjz0UUB6XU=
+
+Name: com/ibm/icu/text/TransliterationRuleSet.class
+SHA1-Digest: z9OCJccykmEAzuzoAQwJy/ZwmTE=
+
+Name: com/ibm/icu/util/Calendar$CalendarFactory.class
+SHA1-Digest: hAO3/qAyMaCOjNMsf/1xDvyDlxw=
+
+Name: com/ibm/icu/text/CollatorReader$1.class
+SHA1-Digest: XfneLo+da605Z0T7kr87N0IzpzM=
+
+Name: com/ibm/icu/ICUConfig.properties
+SHA1-Digest: SCRFZaOrbKPIS/W7+VFVzS5d3nQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hant.res
+SHA1-Digest: Vzijs9UOpZ0iyXvC+RIPDtTey2E=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$ENumberSystem.class
+SHA1-Digest: fnqsq9Lfsiorohk0u/wBJwmRCVM=
+
+Name: com/ibm/icu/impl/data/icudt42b/eu.res
+SHA1-Digest: yE58IZubFCmb2mUi71FPTddERCo=
+
+Name: com/ibm/icu/impl/data/icudt42b/gu_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_BE.res
+SHA1-Digest: zof7Bj2xRNFP0GiZuuIlf4V020s=
+
+Name: com/ibm/icu/text/CollationElementIterator$Backup.class
+SHA1-Digest: QTiFlEWotNTTMe1M31LxBytjQ8s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sl.res
+SHA1-Digest: xWu0zgcmdp3t9avBdcWj8WpO0VA=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Arab_AF.res
+SHA1-Digest: Ft7S6n/o3/L7Am77oNmqkNnADP0=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$7.class
+SHA1-Digest: 1COLbKa0Athi2T/UgjA7hFrBhfs=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator$DistanceInfo.class
+SHA1-Digest: wjoYmQEQ09veIvhZYWHApPNDtNA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_SA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_CO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_GT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/RBBISetBuilder$RBBIDataManipulate.class
+SHA1-Digest: Po1bvO+0klNcFrP5dy8s3h307p8=
+
+Name: com/ibm/icu/impl/TextTrieMap$CharacterNode.class
+SHA1-Digest: s1XpJZR+JPGA7ecglSnL42531qo=
+
+Name: com/ibm/icu/impl/duration/FixedUnitBuilder.class
+SHA1-Digest: HSbqvtuBILCgbZTCDtUgG5WDFeg=
+
+Name: com/ibm/icu/impl/data/icudt42b/ru.res
+SHA1-Digest: 2tpiQqm9vibO03vrWglGYayiVfs=
+
+Name: com/ibm/icu/text/Collator$ServiceShim.class
+SHA1-Digest: VBfc7pG0uiVRhlFmGqm+C7kR4eQ=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_big5.class
+SHA1-Digest: z/Onqges6+n2jM8mPFe65NmKmU8=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_en.xml
+SHA1-Digest: yhRPJdLgfaPae0/Oq7Pnf/JEu+4=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_TW.res
+SHA1-Digest: FI8SXUxAHIZ4WAdjGjq/j705WQs=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_SY.res
+SHA1-Digest: 84JDwhg4qOWQWIAPO46GEkV0i64=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es__TRADITIONAL.res
+SHA1-Digest: FmpAb3TmF+UYaintHRcBMM2MgOc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_KW.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/id_ID.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/kok_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/UPropertyAliases$NonContiguousEnumToShort.class
+SHA1-Digest: syk6fjKZM2e9hx/QajWdR9zWcbk=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/he.res
+SHA1-Digest: 5g/JP/rIqxKTtDBuAn7T9oKOJBQ=
+
+Name: com/ibm/icu/util/Currency$ServiceShim.class
+SHA1-Digest: ZLvnyC+Wx1tf5IkKTyW6cTGag9U=
+
+Name: com/ibm/icu/impl/data/icudt42b/kl.res
+SHA1-Digest: qEj3QAIRkho3t0RhL0CPP1RJY74=
+
+Name: com/ibm/icu/impl/data/icudt42b/kok.res
+SHA1-Digest: 0Cq49xx+kBa1hTzjtrV5Ml3qEhA=
+
+Name: com/ibm/icu/util/Currency$CurrencyNameResultHandler.class
+SHA1-Digest: P+l9cS7yf4SjldSpTgQrZbqIk5c=
+
+Name: com/ibm/icu/impl/data/icudt42b/sv.res
+SHA1-Digest: t7f2hjU7Bu0g5ZvKa/TDCURG4Ts=
+
+Name: com/ibm/icu/text/ModulusSubstitution.class
+SHA1-Digest: ejqkE7UO4iF3YILImA3/n3UKwPY=
+
+Name: com/ibm/icu/text/DateIntervalFormat.class
+SHA1-Digest: hQsyM1rFuioogc6Dr9YOB7rELdc=
+
+Name: com/ibm/icu/text/UnicodeSet$GeneralCategoryMaskFilter.class
+SHA1-Digest: csLBiNOv8bCRCxNEY4c82QWb3Bs=
+
+Name: com/ibm/icu/impl/RelativeDateFormat$1.class
+SHA1-Digest: c6NqvKh9OBRUelKlq4M5mpxy/co=
+
+Name: com/ibm/icu/text/DateFormatSymbols.class
+SHA1-Digest: To1yZxWJc+Z4aax1Nj00KjMZUq0=
+
+Name: com/ibm/icu/impl/locale/InternalLocaleBuilder$FieldType.class
+SHA1-Digest: aefyDKK0a/KKJ+zqgrAGcH//F0E=
+
+Name: com/ibm/icu/text/NumberFormat$NumberFormatShim.class
+SHA1-Digest: k/tLYkRBt9Uh0ohxoe1VGXZR6XU=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/hu.res
+SHA1-Digest: o2xBye9kIqHcld2KlMZVqRy1Nko=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/as_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/Trie$DataManipulate.class
+SHA1-Digest: NjCImLHFdiP4sIuw4t+T3gauSsY=
+
+Name: com/ibm/icu/impl/ReplaceableUCharacterIterator.class
+SHA1-Digest: SCfl0/ZO54BfqdOBp++1QT4rfpI=
+
+Name: com/ibm/icu/util/CalendarServiceShim$CalFactory.class
+SHA1-Digest: BLNj+HZvoR2oJ1GngEFz2M+5/dc=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_MA.res
+SHA1-Digest: MFQlFcLk5eSGKWIWSDw3N8mg35Q=
+
+Name: com/ibm/icu/impl/UPropertyAliases$ValueMap.class
+SHA1-Digest: i9yakyznF+uxdpcjA324oR7y9tQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ps_AF.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/mk.res
+SHA1-Digest: FAjQiRZGQsGv60+ineKz2cfWHhA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_CH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/cnvalias.icu
+SHA1-Digest: MQcDdLr4J2MXhjRPlVmJxHtaqNg=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_TW_STROKE.res
+SHA1-Digest: nTng09tRvciGRT5csduFwNCuFMw=
+
+Name: com/ibm/icu/util/Calendar$CalendarShim.class
+SHA1-Digest: fnvc55VsYKwsxpqvv6JBeX6/cVo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mt.res
+SHA1-Digest: FtyaJu5NPuKD6jpdEs08AbHnvgI=
+
+Name: com/ibm/icu/impl/duration/PeriodBuilderImpl.class
+SHA1-Digest: AqUSShdrzMMa6z7Un+uub3tI4R0=
+
+Name: com/ibm/icu/util/Currency$CurrencyStringInfo.class
+SHA1-Digest: g9WFvoeBrb7FGiGOdzUItwknUMU=
+
+Name: com/ibm/icu/text/RBBISetBuilder.class
+SHA1-Digest: hOwxqGfQ9WZ+C+1viKYFlquVJ6Y=
+
+Name: com/ibm/icu/impl/data/icudt42b/ar_EG.res
+SHA1-Digest: CGs2xVIS8J7/2gE7N9P/54X0p7A=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_IBM420_ar.class
+SHA1-Digest: AOyK/U3m5/aFbRqi1LDp2saonus=
+
+Name: com/ibm/icu/impl/UCaseProps$ContextIterator.class
+SHA1-Digest: +nY8j0+ipna4v+xfK1dGRgOkPps=
+
+Name: com/ibm/icu/impl/URLHandler$URLVisitor.class
+SHA1-Digest: M6++xkYESTi5/TwYg71K8EXraas=
+
+Name: com/ibm/icu/util/EthiopicCalendar.class
+SHA1-Digest: cZlXcHpU7yDDQrivFoycnC++BFo=
+
+Name: com/ibm/icu/text/ReplaceableString.class
+SHA1-Digest: UxYu+CpdztHGbYqnZGrVLnZl12Y=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_IE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceBinary.class
+SHA1-Digest: f3nrmF+ItqGshFfYle9KMXxQVsU=
+
+Name: com/ibm/icu/util/LocaleData$PaperSize.class
+SHA1-Digest: EEQ1lZiV9UtR4+v4CHhD4oSr6uE=
+
+Name: com/ibm/icu/impl/UCharacterProperty$BinaryProperties.class
+SHA1-Digest: 88MTxoOMUU86d/+Rc+zp/hlpn90=
+
+Name: com/ibm/icu/impl/data/icudt42b/it_CH.res
+SHA1-Digest: VZ5J7mHHX7dBZ/OyTYm/qSJ4rfQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_ME.res
+SHA1-Digest: oXaqBhMExiV5rKnE2flXWVVHyzM=
+
+Name: com/ibm/icu/text/Normalizer$IsPrevNFDSafe.class
+SHA1-Digest: FEvTne7AOYLR7yBDdbToaG5OzNs=
+
+Name: com/ibm/icu/impl/duration/impl/PeriodFormatterDataService.class
+SHA1-Digest: NlLuVww7FdYnMgZsWlql28eWh+E=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceString.class
+SHA1-Digest: NyTmwv3AMT6t/Sdgv0HU1yhA47g=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/nl.res
+SHA1-Digest: kF6Z/y1F/oCaBRK2OFjLSCKoce0=
+
+Name: com/ibm/icu/impl/data/icudt42b/ii.res
+SHA1-Digest: UBcD2E0maByd3NeIqAsFZSv6EIY=
+
+Name: com/ibm/icu/text/ChineseDateFormat.class
+SHA1-Digest: yAfgPqcBendEMrN5CAkQhg+5Mbg=
+
+Name: com/ibm/icu/impl/data/icudt42b/az_Latn_AZ.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_RH.res
+SHA1-Digest: hX7gbcKf4kxMliOSk1FTXIZlq6o=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hans.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fr.res
+SHA1-Digest: MGwC1Tjcpsv7MdNJwx1cF5yqU+g=
+
+Name: com/ibm/icu/text/NFRule.class
+SHA1-Digest: Rx9mug/qARQn0CQx6EgEv3p9sXY=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_de.class
+SHA1-Digest: ygZcTpEeS+fUbX2LmGkujQog71U=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
+
+Name: com/ibm/icu/impl/data/icudt42b/et.res
+SHA1-Digest: N67CbxU4QoG5hjGVdgzrhPwDM2U=
+
+Name: com/ibm/icu/text/StringMatcher.class
+SHA1-Digest: xITSJP51+Xr6DNo/i7rkfcjYb5M=
+
+Name: com/ibm/icu/impl/data/icudt42b/vi.res
+SHA1-Digest: IvGtt5n71/Q5+lcboUp9t20/jg4=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode.class
+SHA1-Digest: TEkDt3CyBmLK35HAONcI0Z4Oq0M=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$CoordFunc.class
+SHA1-Digest: sDrz6H27/DjBw7a5xhBZ5SnIung=
+
+Name: com/ibm/icu/impl/UCharacterIteratorWrapper.class
+SHA1-Digest: BHZVRNGt4elX2sQxXvP4T0j31Sk=
+
+Name: com/ibm/icu/impl/ICUData$1.class
+SHA1-Digest: PvBDMlt+QLDywoMQsAuPVV2o0OU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sk.res
+SHA1-Digest: kipbhMMMAsrPAg578s6fieZ/kT4=
+
+Name: com/ibm/icu/impl/data/icudt42b/pl_PL.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_RS.res
+SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/haw.res
+SHA1-Digest: bzZfFLhZ0XFaoPpbkBhyr5xxIr8=
+
+Name: com/ibm/icu/text/UCharacterIterator.class
+SHA1-Digest: 7eshEISwTUGWA0M1JbdxsxvKOjg=
+
+Name: com/ibm/icu/impl/duration/impl/data/index.txt
+SHA1-Digest: MNpQEGeqnTio7sP8urAKSdbCCDA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hi_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/cs_CZ.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sr.res
+SHA1-Digest: 5q4QgJkmNbD3r8nJxAw9e2fb5iY=
+
+Name: com/ibm/icu/impl/data/icudt42b/no.res
+SHA1-Digest: QKT2L/mn+LtpRofMA4whD6vFbe0=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fa_AF.res
+SHA1-Digest: egzqOqtIj9Z4IANVn7nmOPmrOTA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/root.res
+SHA1-Digest: usraVU9nl82Tjj7gaVTZGlt2WiM=
+
+Name: com/ibm/icu/text/Bidi$InsertPoints.class
+SHA1-Digest: U4tvL3b5yD6lGG7VqbG9pdd4YlY=
+
+Name: com/ibm/icu/impl/SortedSetRelation.class
+SHA1-Digest: hJ7h15Rga71Xh6ytr9ebvNoujrc=
+
+Name: com/ibm/icu/text/MeasureFormat.class
+SHA1-Digest: G+oN8QPH7T64tfQ/PzVyNIkuMI0=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_SN.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sq_AL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/NormalizationTransliterator$2.class
+SHA1-Digest: QZdmY3bzdbLEBYzqdo7YflZk3D4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_GB.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/ICUResourceBundleImpl$ResourceIntVector.class
+SHA1-Digest: 0rFrR7ZGQyhwiGAo8HUbmBl8sEg=
+
+Name: com/ibm/icu/impl/ICUCache.class
+SHA1-Digest: jro2JA35cDczsxETdBk2XDQbGs8=
+
+Name: com/ibm/icu/text/CollationKey.class
+SHA1-Digest: wkX8AB6BlSkkeVbdYd2rqCecDQw=
+
+Name: com/ibm/icu/impl/data/icudt42b/pnames.icu
+SHA1-Digest: gyIxR5pJTCsfhNix+jeZk17v24M=
+
+Name: com/ibm/icu/text/StringPrep$Values.class
+SHA1-Digest: VoXm2UjTrNPtQCTomlkmDgo4c/8=
+
+Name: plugin.properties
+SHA1-Digest: TOPBr3CgISdwU5nKSIJc674x0oY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_DO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/RBBIDataWrapper$RBBIDataHeader.class
+SHA1-Digest: s2SFgLptUnyHVB4j6qLUvpCVLHQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mt_MT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/ca.res
+SHA1-Digest: Y1b8+7d7xRxE0/4BvMsJ0ROnlVw=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl_CS.res
+SHA1-Digest: 2ii6FCYOQG4t2sunNcYMfTFp8rA=
+
+Name: com/ibm/icu/impl/data/icudt42b/kk.res
+SHA1-Digest: ZeMQZ0ZpJ9wpELJbCXgVCkxeKT4=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/word.brk
+SHA1-Digest: 4Qm9wAWKejtKem4xRAJwpzpim+o=
+
+Name: com/ibm/icu/text/SymbolTable.class
+SHA1-Digest: 0PXEovA8ijSuu464CTlOg2PiB9E=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hant.res
+SHA1-Digest: 4a6oYxgReRIfuwClplCK/M3LeY8=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$2.class
+SHA1-Digest: oEcFAH9NQgt9Z7aF8UWcLS4MS20=
+
+Name: com/ibm/icu/impl/data/icudt42b/iw_IL.res
+SHA1-Digest: Ndcrw5xpVXzCNkJpNiv+lI2hixc=
+
+Name: com/ibm/icu/impl/data/icudt42b/gv.res
+SHA1-Digest: 2rOn4o47ACz+j6XYLqt0C+MXTFM=
+
+Name: com/ibm/icu/impl/data/icudt42b/pa.res
+SHA1-Digest: x7pO0zURQuIhsuA/yVI4yuI3Q9A=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_HK.res
+SHA1-Digest: tmRVbpRLOdnIjYsMrH4S9Ez8IQI=
+
+Name: com/ibm/icu/lang/UCharacterTypeIterator.class
+SHA1-Digest: F3yCHVIRgN27D/vKNqVvRmrf+qY=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_LU.res
+SHA1-Digest: 73jNcohlNN3z53Gm4lMn64LoR8k=
+
+Name: com/ibm/icu/text/CharsetRecog_mbcs$CharsetRecog_euc$CharsetRecog
+ _euc_jp.class
+SHA1-Digest: nuKNP2brqweBc9DnIoDug0H4sYs=
+
+Name: com/ibm/icu/impl/CharTrie.class
+SHA1-Digest: o1fM6Qeko2xGz/44ni7MO/fjnsI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_VE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/util/HebrewHoliday.class
+SHA1-Digest: 9plTcLM/MHJX1jTdVZ+N2JNniRs=
+
+Name: com/ibm/icu/text/UnicodeSet.class
+SHA1-Digest: /I6RzJ+st33nq/itiDGvBbi3QKc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/in.res
+SHA1-Digest: 4yHeO3OZURAGnQ+2Akh1AsFcJ6M=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ms.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc4518.spp
+SHA1-Digest: bqdXrbNNNrdbz/hbrFTh9vv0QmY=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_da_DK.class
+SHA1-Digest: Z8EQ9WVNleLLPUzQl8VVuq7qWZw=
+
+Name: com/ibm/icu/impl/ICURWLock$Stats.class
+SHA1-Digest: ex/PVbI1KYmkp/ut40s2yE7A/gI=
+
+Name: com/ibm/icu/util/VersionInfo.class
+SHA1-Digest: 1AZUnfjAsd39Pm7SfAkIh8nphUs=
+
+Name: com/ibm/icu/text/UnicodeSetIterator.class
+SHA1-Digest: 6Yk5bfw7+mwdkskhZOJpZ63pebo=
+
+Name: com/ibm/icu/impl/duration/BasicDurationFormatterFactory.class
+SHA1-Digest: D9izOXoz72xnd0nFgm6gR68YR5Y=
+
+Name: com/ibm/icu/impl/data/icudt42b/in_ID.res
+SHA1-Digest: 8zlBXCvSDwjZG5pjJeRB/oOjkYQ=
+
+Name: com/ibm/icu/lang/UCharacter$UnicodeBlock.class
+SHA1-Digest: PckbIWeAkjlzTlI1d7wfxFOrbpY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_US.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/BreakIterator$BreakIteratorServiceShim.class
+SHA1-Digest: 5eN/bw4J8zmQ8FofuCoTNWqhqwY=
+
+Name: com/ibm/icu/impl/CalendarAstronomer$AngleFunc.class
+SHA1-Digest: rVdjYM+4RcFjXlXZUO1mGuF27OQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/char_th.brk
+SHA1-Digest: F33yOBJlUAalrd9ZWRXhvmhdgsU=
+
+Name: com/ibm/icu/impl/data/icudt42b/sl_SI.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_ZA.res
+SHA1-Digest: layRKBnE4SCKRdgDL9oXO0wk8SQ=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EMilliSupport.class
+SHA1-Digest: tHYpjRBpYkW31F2S300nGvCtDPs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ro_RO.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/fa.res
+SHA1-Digest: eaVRU4NKYc2t26hjrI20QFR+HCg=
+
+Name: com/ibm/icu/text/Normalizer$IsNextTrueStarter.class
+SHA1-Digest: JJyfbs5ohjCnNyKqCGbQmeau1ZI=
+
+Name: com/ibm/icu/text/Collator$CollatorFactory.class
+SHA1-Digest: rZ0lb5hRMGSFoEX1r4A+7i0xDrk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/be.res
+SHA1-Digest: NK/D6puvIc4L5KgtFCBg8xnqYgU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/kok.res
+SHA1-Digest: cxctNEMzXGKFExa+BKr81cP6bTk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/si_LK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hi__DIRECT.res
+SHA1-Digest: MSzM/HDeF/P11vq8UxQLYalDeoo=
+
+Name: com/ibm/icu/text/ThaiBreakIterator$PossibleWord.class
+SHA1-Digest: wRfuI08KGbivEoAkKDjOwaAyXsI=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_2.class
+SHA1-Digest: ewwtpG9RmVUT4ermxD6Lr54k/os=
+
+Name: com/ibm/icu/impl/ICULocaleService$LocaleKey.class
+SHA1-Digest: rtnL7+tkntl4p4b+lMDlqJ1bzL8=
+
+Name: com/ibm/icu/text/CharsetRecog_Unicode$CharsetRecog_UTF_32.class
+SHA1-Digest: ZDq8dtsVIcaonxiUBRmdxF4B7jc=
+
+Name: com/ibm/icu/text/UnicodeSet$NumericValueFilter.class
+SHA1-Digest: m+azrsC1VjWHpLoit1Rl0xcF7oE=
+
+Name: com/ibm/icu/util/STZInfo.class
+SHA1-Digest: XsJezh5Etql7hjL6GCfZwp0r1hc=
+
+Name: com/ibm/icu/impl/locale/LocaleObjectCache$WeakValueRef.class
+SHA1-Digest: LasoYp/1je+O3xMGvD9QiraiAJY=
+
+Name: com/ibm/icu/impl/data/icudt42b/sr_Cyrl_BA.res
+SHA1-Digest: gfZbK6gGbnv2WGwmT9G5nQ0kvR4=
+
+Name: com/ibm/icu/impl/data/icudt42b/es.res
+SHA1-Digest: hjABJWCM10eYZ22psOFsL0XZG0U=
+
+Name: com/ibm/icu/util/ULocale$1$ULocaleAcceptLanguageQ.class
+SHA1-Digest: 319gxxl65USHkgzy55fh+IyQNOc=
+
+Name: com/ibm/icu/text/Quantifier.class
+SHA1-Digest: AUgzA371mdcIosAD/wJDlI0QPmM=
+
+Name: com/ibm/icu/text/PluralRules$1.class
+SHA1-Digest: CZKMS2w946JZMZvLui0l7aHObIE=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hant_MO.res
+SHA1-Digest: Ad5HFg6bkw7I9xN38HtDOY3lZes=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_JM.res
+SHA1-Digest: KfuFrcCWLYbRLAnUqTrJRbq6tXM=
+
+Name: com/ibm/icu/util/UniversalTimeScale.class
+SHA1-Digest: MGfU9oOVqd37uvK6hN3Z+jIBLqM=
+
+Name: com/ibm/icu/text/UTF16$StringComparator.class
+SHA1-Digest: gJ11UGOVR5t9/WQJPS9XJei+NM4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/lt_LT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/NormalizationTransliterator.class
+SHA1-Digest: ffPUES6DbpwiMALn5Cs1HUgIXQk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/en_NZ.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/root.res
+SHA1-Digest: paZntOH7lwqnm4ngkmma5eBXYqs=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sq.res
+SHA1-Digest: 5rzM45UdCmsolf7m4jjmMZPruh8=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_PE.res
+SHA1-Digest: cWoAMJRdJUPrsVkh6oOUl2Vn4/w=
+
+Name: com/ibm/icu/impl/data/icudt42b/nn.res
+SHA1-Digest: J/5BC/ijGvdPFXzC02frRPSuFwc=
+
+Name: com/ibm/icu/impl/duration/impl/DataRecord$EZeroHandling.class
+SHA1-Digest: KA1jBtQJdKV5Lx+5fOCRDAjIVSg=
+
+Name: com/ibm/icu/text/RBBIRuleParseTable$RBBIRuleTableElement.class
+SHA1-Digest: uy3Kqj72GGl03zzgGLDnj4+75Nw=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/sr_Latn.res
+SHA1-Digest: Vpk/OA4qSNayFgrZpomjWEZymAg=
+
+Name: com/ibm/icu/impl/PluralRulesLoader.class
+SHA1-Digest: ceOZDqspRg5TuJ18WiU7VCsiRwc=
+
+Name: com/ibm/icu/util/EasterRule.class
+SHA1-Digest: ekwooe0stj5lYCyIKQSfFnDc9ms=
+
+Name: com/ibm/icu/impl/data/icudt42b/bo.res
+SHA1-Digest: hfuL5b5bB3UDf65XjgurbrhPWsE=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fr_CA.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_AT.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/te_IN.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/Normalizer$Mode.class
+SHA1-Digest: dY9mIdzi0rOgMGZeH459HuJvVrQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc3491.spp
+SHA1-Digest: tqFgaA9mZKzEeyVBJHP3C3fLH5w=
+
+Name: com/ibm/icu/impl/UBiDiProps.class
+SHA1-Digest: /G+eUk2x84zjN580BezPQmrQWIA=
+
+Name: com/ibm/icu/text/EscapeTransliterator$3.class
+SHA1-Digest: jK9CaWfYl+SP8pxqsfoOhg4zVlc=
+
+Name: com/ibm/icu/impl/ICUService$Key.class
+SHA1-Digest: U0MKQCZGOZoIrEzDrP4hJ8+iNtk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/de_BE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/StringSearch$Pattern.class
+SHA1-Digest: HSW2Lzu4JdDg9c2c8JMprLBkFis=
+
+Name: com/ibm/icu/impl/CalendarAstronomer.class
+SHA1-Digest: FblwZDonS/4z+RAlvXI72Y7ppAM=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/tr.res
+SHA1-Digest: p0GdQBs8tCYpyEPEMfpEarAxfAg=
+
+Name: com/ibm/icu/text/CollatorServiceShim$CService.class
+SHA1-Digest: Ra7UApcf6HkIRW2eQjAkdvYL+kY=
+
+Name: com/ibm/icu/impl/locale/LocaleSyntaxException.class
+SHA1-Digest: ON+fieCZRXGgMeeQo+eaoS2hWzg=
+
+Name: com/ibm/icu/impl/NormalizerImpl$AuxTrieImpl.class
+SHA1-Digest: LBKL8Eh9I/jq5YmSou5JFNUu+PU=
+
+Name: com/ibm/icu/util/UResourceTypeMismatchException.class
+SHA1-Digest: xOMv05bQxowTViXu5xAHut1jm8Q=
+
+Name: com/ibm/icu/util/Calendar$WeekData.class
+SHA1-Digest: BQEs7Sf+cjEPvf/VnjyCHik1Kw8=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_he_IL.xml
+SHA1-Digest: zELCMUyNNl4RO9SlMdqwBaDlUZQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hans.res
+SHA1-Digest: R8wwL8X3XtJKhsKArcmfuZsjt4U=
+
+Name: com/ibm/icu/util/StringTokenizer.class
+SHA1-Digest: UPYT3yD30H3/E28l/qTiVVS06lg=
+
+Name: com/ibm/icu/lang/UCharacter$DecompositionType.class
+SHA1-Digest: euqzd0lb9CphqzkruwZwZuFLra8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_US.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_7.class
+SHA1-Digest: G/9IaxKk9myd90vftVBa6QfX12U=
+
+Name: com/ibm/icu/impl/data/icudt42b/gu.res
+SHA1-Digest: MidOcLpsKiTWmzxP0lyKQqZtqEk=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/be_BY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/te.res
+SHA1-Digest: ul4UuJ0VZj6SHZeVet3JTN2pTJQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/km_KH.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/ur_PK.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/tr_TR.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/nl_NL.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mk_MK.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/es_AR.res
+SHA1-Digest: rMqZU2Hdymr8o4Uys7XNvdwq0/8=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/id.res
+SHA1-Digest: c8WvrfkePrOoWwGwNSrTz97NqGU=
+
+Name: com/ibm/icu/impl/data/icudt42b/da.res
+SHA1-Digest: XjFoTQRV7RGgYA439j7U7tXbVlU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/nl_BE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/mr.res
+SHA1-Digest: m20WWXMhMf9Jguc91WRlhm7fov0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ms_MY.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_Latn.res
+SHA1-Digest: aQm/BzP4r1t4WUuWQd832zW1CAI=
+
+Name: com/ibm/icu/text/PluralRules$RuleList.class
+SHA1-Digest: macoH+mfZLvQ9L4VCb1xPOWT75c=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/sr_Latn_ME.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/brkitr/en.res
+SHA1-Digest: +/LVRKi4A8LFr24NwK7dKO0oWpw=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/eo.res
+SHA1-Digest: eo5kYmGw83lHMVAq9bnVf+k51C8=
+
+Name: com/ibm/icu/impl/data/icudt42b/so_ET.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/it.res
+SHA1-Digest: iTRdh/vkBMgOPp2DXDXSDZW9oRY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/as.res
+SHA1-Digest: 9NRwXg3YwS7RznQrHB4Ev20w3ZU=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$NGramParser.class
+SHA1-Digest: Jvlt1Yg4aigxvvrUN+VLovmImfY=
+
+Name: com/ibm/icu/impl/data/icudt42b/zh_Hant_TW.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/ResourceBundleWrapper$1.class
+SHA1-Digest: kCsDjJuZOKWBBdcjq1EL7cRJ6TQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh__PINYIN.res
+SHA1-Digest: UxTeb9sqoN5EU+1Sec5WMwnCfNA=
+
+Name: com/ibm/icu/impl/data/icudt42b/de_LI.res
+SHA1-Digest: f5YAC+BLQHRMdRQW9Z41LfU46nE=
+
+Name: com/ibm/icu/impl/data/icudt42b/uz_AF.res
+SHA1-Digest: 3kSYT3BSkfVCuxqLdPwlECtg5XA=
+
+Name: com/ibm/icu/impl/data/icudt42b/fo_FO.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/data/icudt42b/gsw_CH.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/RuleBasedCollator$AttributeValue.class
+SHA1-Digest: p/R33glIBQNiZM4jz/a2dwFPdxk=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/az.res
+SHA1-Digest: ZXg9H4iW+xC+iLzF4uLY7bNY/qM=
+
+Name: com/ibm/icu/lang/UCharacter$JoiningType.class
+SHA1-Digest: j4VycQg9ZS1LiXpE9k5QyO67S8s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hi_.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/UPropertyAliases.class
+SHA1-Digest: Kar/z1VDskzA6mFIGaJLR3CPe3c=
+
+Name: com/ibm/icu/impl/data/icudt42b/or_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/text/UFormat.class
+SHA1-Digest: zBnM/5aT4hYiJW62XsmCv2f4f+U=
+
+Name: com/ibm/icu/text/RBBITableBuilder.class
+SHA1-Digest: JLRKP3X5o6AhLZ3hKTpisqonWTI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ro.res
+SHA1-Digest: 3HwDNE8cqTvVBlwJk03kNJOZ/eg=
+
+Name: com/ibm/icu/impl/data/icudt42b/ml.res
+SHA1-Digest: OC5hDnqlCQJyZq9SkmhhfpJIbm0=
+
+Name: com/ibm/icu/text/CharsetRecog_sbcs$CharsetRecog_8859_1_nl.class
+SHA1-Digest: 784pJZ3/LPRarW7umQ2WmURh6+0=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fi.res
+SHA1-Digest: JjSueyJ2R6YL3OPfZ3gjbiCmsSQ=
+
+Name: com/ibm/icu/text/ThaiBreakIterator.class
+SHA1-Digest: 4uoicVPzfT9RZueI6JhB2wtnPX0=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_NA.res
+SHA1-Digest: GjW9A44EB13F1Q3P5nlS02U5AEY=
+
+Name: com/ibm/icu/util/ValueIterator.class
+SHA1-Digest: Szw1uZNxy/0e7SH/zkTJofhQrFo=
+
+Name: com/ibm/icu/text/RuleBasedNumberFormat.class
+SHA1-Digest: RPWy9pa6wgfdPiotqqYrCumgiYI=
+
+Name: com/ibm/icu/text/IDNA.class
+SHA1-Digest: p+yyMwf8VbEuiBTiIYmS2507xNI=
+
+Name: com/ibm/icu/impl/data/icudt42b/am.res
+SHA1-Digest: CsWaIrKfED9xWRbpmw3hksrKjoo=
+
+Name: com/ibm/icu/text/UnicodeSet$XSymbolTable.class
+SHA1-Digest: zADve81mpe9lI1D/iMHpggNB54k=
+
+Name: com/ibm/icu/impl/data/icudt42b/iw.res
+SHA1-Digest: WZP9bAErSkXNMGcS7Cigt2GwNKw=
+
+Name: com/ibm/icu/impl/data/icudt42b/ha_Latn.res
+SHA1-Digest: GuGMZSWyJJqxdmm9EzD7CnSl2IU=
+
+Name: com/ibm/icu/text/DateTimePatternGenerator$PatternInfo.class
+SHA1-Digest: nASsxWb5tR5jQDzIry/ep3HPvf0=
+
+Name: com/ibm/icu/math/MathContext.class
+SHA1-Digest: h8rJ4mm+Brut7OkxEQd1s364ks8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/az_Latn.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/si.res
+SHA1-Digest: mt7l6JWbY0adEfwsfBz1tGz/qB4=
+
+Name: com/ibm/icu/text/UnescapeTransliterator$5.class
+SHA1-Digest: 8623ohgLqGOBZAm9/nGxM2W4dWI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_CL.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/sv_FI.res
+SHA1-Digest: EI2GVWEnzehzEvkpFlQJ+eJdN3w=
+
+Name: com/ibm/icu/impl/data/icudt42b/nn_NO.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ga.res
+SHA1-Digest: yxKFFNoEoM6o+wZMx7ZpFw8ERxU=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_it_IT.class
+SHA1-Digest: YEn8aLHR6KvomlHHNjAtWP3vtwA=
+
+Name: com/ibm/icu/impl/data/icudt42b/am_ET.res
+SHA1-Digest: vLe6xnVtFOY1XQsLbWAyg++v4R8=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/th_TH.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/TransliteratorRegistry$LocaleEntry.class
+SHA1-Digest: 3f73aUODZzYwa/TNAVoZMf5oQkg=
+
+Name: com/ibm/icu/util/RangeValueIterator$Element.class
+SHA1-Digest: 0mSf5xDlhcy2OMrOuhwQYFSuhMI=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ko.res
+SHA1-Digest: S8mHQ8DFrNEUyRtewLid8Yn89xQ=
+
+Name: com/ibm/icu/impl/data/icudt42b/hy_AM_REVISED.res
+SHA1-Digest: lm7DmdHMLEkr9zC2PWR1fkLDaJ4=
+
+Name: com/ibm/icu/impl/data/icudt42b/en_SG.res
+SHA1-Digest: ZAwUZU8vXFPu1hfLcvD7Y3YautA=
+
+Name: com/ibm/icu/impl/data/icudt42b/gv_GB.res
+SHA1-Digest: vqZaev/jL0MbnAu0zgdP7py0gng=
+
+Name: com/ibm/icu/text/RBNFChinesePostProcessor.class
+SHA1-Digest: WgnI0I67l+vetDYBGLSTp5umIBc=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/fa_IR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ca_ES.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/bn.res
+SHA1-Digest: sWgBOeggQMgNfyEhTT4wVx57d50=
+
+Name: com/ibm/icu/text/CollationKey$BoundMode.class
+SHA1-Digest: dHIdMHMrCLK+OKR3yTl5uq7EQYI=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/ta.res
+SHA1-Digest: Wu0FVc6oWUdNse9LmU5JYc6gHTQ=
+
+Name: com/ibm/icu/text/RBBISymbolTable.class
+SHA1-Digest: petb00eGDCm6DASsXqEnEwQdXeo=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/pa_IN.res
+SHA1-Digest: aABsNcBcPMaMcFhBGb0doQYhb68=
+
+Name: com/ibm/icu/impl/data/icudt42b/ta_IN.res
+SHA1-Digest: CrX+t/3l7qQ+Iu1abDKV2D7/ZDk=
+
+Name: com/ibm/icu/impl/data/icudt42b/fr_CH.res
+SHA1-Digest: IldwcfKtl7UR9+npadXkIc9MS/c=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_it.class
+SHA1-Digest: qg5xRQpUKRpo+/D+hBCn72ZllJ4=
+
+Name: com/ibm/icu/impl/duration/impl/data/pfd_ja.xml
+SHA1-Digest: qh+Yqa1vTI+OXIkNGUpSsPd0gPI=
+
+Name: com/ibm/icu/impl/Trie$DefaultGetFoldingOffset.class
+SHA1-Digest: Vsf8DJGMroq9xMLyeGulHzkntoU=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/res_index.txt
+SHA1-Digest: 0TAI7vdTd1uyMm6olP7g9gLNlsg=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/pl.res
+SHA1-Digest: Ad/7wwraaDLUa78yiU1lUPzLkkc=
+
+Name: com/ibm/icu/text/Normalizer$IsPrevTrueStarter.class
+SHA1-Digest: DTUl+dkJai1Yq1ApIspI756Oaz0=
+
+Name: com/ibm/icu/util/CalendarServiceShim$CalService.class
+SHA1-Digest: 6oWTNuffqEEvVsd3WO+sreuPZQs=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/res_index.txt
+SHA1-Digest: wkQnar8Thb5Bt07mzBSVvEE2OqY=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/zh_Hans_SG.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/text/ArabicShaping.class
+SHA1-Digest: XZ637UBwbDJxDqnmrFiEZWHzXXM=
+
+Name: com/ibm/icu/impl/data/icudt42b/rfc4505.spp
+SHA1-Digest: lced9aQC6CKcBNAOUdswjJV5a3o=
+
+Name: com/ibm/icu/util/ByteArrayWrapper.class
+SHA1-Digest: ZVPa0b5L3JXdi2ciMfStGq8GxCE=
+
+Name: com/ibm/icu/impl/duration/BasicPeriodBuilderFactory$Settings.cla
+ ss
+SHA1-Digest: wFb1STxQpexvv9kY98DOJ6pLcas=
+
+Name: com/ibm/icu/text/Bidi$ImpTabPair.class
+SHA1-Digest: JtJVWt+BIGkanGetL2Gy3tBYpIc=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/hr.res
+SHA1-Digest: zqFkwdSPOIWYVmNwaGrje8EPrEw=
+
+Name: com/ibm/icu/text/NumberFormatServiceShim$NFFactory.class
+SHA1-Digest: 5AuziSUiCTjGZgz2iYJ2kxS67RE=
+
+Name: com/ibm/icu/impl/ZoneMeta$MetaToOlsonMappingEntry.class
+SHA1-Digest: uuyCy9JX3+tbs+0dxZoqB9LlyRM=
+
+Name: com/ibm/icu/impl/Utility.class
+SHA1-Digest: lIuCLUW7/AO3EOWjrcN/5/jsoA8=
+
+Name: com/ibm/icu/impl/USerializedSet.class
+SHA1-Digest: YVXfT+4kECAxhhBblpeLPbs7r/E=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/uk.res
+SHA1-Digest: 4bMeR4aqC2oC52qXHLjKto3XRcU=
+
+Name: com/ibm/icu/util/ULocale$IDParser.class
+SHA1-Digest: mHlXMwt76mZ0TRLLKNgk8DhPzdc=
+
+Name: com/ibm/icu/text/StringCharacterIterator.class
+SHA1-Digest: FX1SK52aDgBrcnluC7wnMDSpmPo=
+
+Name: com/ibm/icu/text/Normalizer$IsPrevBoundary.class
+SHA1-Digest: sNtIavcqXEl7v91qG5y1zkLKI2s=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/ar_YE.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_MX.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/is_IS.res
+SHA1-Digest: WJudThz/FQIC6MeClH53YjyURrM=
+
+Name: com/ibm/icu/impl/ICUResourceBundle$1.class
+SHA1-Digest: u9NgLyd+lX4ZbAXONIfOE+S34/U=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/hr_HR.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/HolidayBundle_de_DE.class
+SHA1-Digest: VWQHfSEyMLKcSvN5ziecgQLn7U4=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/lv_LV.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/he.res
+SHA1-Digest: aaZFRs5PYKUa91qL/ii/KXbrSYY=
+
+Name: com/ibm/icu/text/DateFormat.class
+SHA1-Digest: xbpnpqFm/gb1+B3C+NVJc6sHjVo=
+
+Name: com/ibm/icu/impl/ICUService$ServiceListener.class
+SHA1-Digest: 4WpmZStQ2bjgfg3tSpEaxW2muNU=
+
+Name: com/ibm/icu/impl/data/icudt42b/coll/es_NI.res
+SHA1-Digest: sToAZL21NCHxRINlvBFxo19BefA=
+
+Name: com/ibm/icu/impl/data/icudt42b/rbnf/en.res
+SHA1-Digest: Qnn0ucolCR9FEek9/220U2OiUHg=
+
diff --git a/dependencyManifests/javax.servlet_2.5.0.v200806031605.jar/META-INF/MANIFEST.MF b/dependencyManifests/javax.servlet_2.5.0.v200806031605.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index e29a07e..0000000
--- a/dependencyManifests/javax.servlet_2.5.0.v200806031605.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,209 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %bundleProvider
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
-Bundle-Name: %bundleName
-Bundle-SymbolicName: javax.servlet
-Export-Package: javax.servlet;version="2.5",javax.servlet.http;version
- ="2.5",javax.servlet.resources;version="2.5"
-Bundle-Version: 2.5.0.v200806031605
-Bundle-ManifestVersion: 2
-
-Name: javax/servlet/http/HttpServletRequest.class
-SHA1-Digest: cZEqv/EjAPpg1GIqtRM4yyXo24c=
-
-Name: javax/servlet/resources/web-jsptaglibrary_2_0.xsd
-SHA1-Digest: OPBaWTFgVdgYhf/G/Ihgm8bbqjU=
-
-Name: javax/servlet/resources/xml.xsd
-SHA1-Digest: 67xOpsC5yFOUU4W1NU08KubpNkw=
-
-Name: javax/servlet/Filter.class
-SHA1-Digest: PscRB6zod5A5KQvErg2zFbjV6ys=
-
-Name: javax/servlet/LocalStrings.properties
-SHA1-Digest: lJgZQAtOACfwT0+fdtYj115M8UQ=
-
-Name: javax/servlet/http/HttpServletRequestWrapper.class
-SHA1-Digest: XP2MXG+OiQW7Is05dQqtRSOdMos=
-
-Name: javax/servlet/http/HttpSessionListener.class
-SHA1-Digest: hvG5fYCqYV6bUuWZcGObyxtNpRE=
-
-Name: javax/servlet/ServletContextListener.class
-SHA1-Digest: hlbWgriGorzKKV/6N+P9HJOZ1HI=
-
-Name: javax/servlet/ServletResponse.class
-SHA1-Digest: 4O6Jr097CpG3QgWbytJq6q605kE=
-
-Name: javax/servlet/http/HttpUtils.class
-SHA1-Digest: 631+g1izaxXD5RXqAwT2CsGLIp0=
-
-Name: javax/servlet/http/LocalStrings_es.properties
-SHA1-Digest: pVaN8pbLEEEn0cTQGOlztbq6x/k=
-
-Name: javax/servlet/ServletRequestWrapper.class
-SHA1-Digest: KNqRnt2oqkkRyBo1nLsN3llAYL0=
-
-Name: javax/servlet/ServletRequestEvent.class
-SHA1-Digest: vK64h8xobSZTJYdNjiSgaKhCe2o=
-
-Name: javax/servlet/ServletRequest.class
-SHA1-Digest: vNuxheE5jLqSw4XpmtS0P5yo2Zk=
-
-Name: javax/servlet/http/HttpSessionBindingListener.class
-SHA1-Digest: q/L8u16/BwGgjEZUnPizyWXd7fM=
-
-Name: javax/servlet/http/HttpSessionEvent.class
-SHA1-Digest: wd8x2VwBGYg2faQtsa+MVKE9LHc=
-
-Name: javax/servlet/http/HttpServlet.class
-SHA1-Digest: RQhdmVq8CCOBGOi5rVnsK2a79Is=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: javax/servlet/http/LocalStrings.properties
-SHA1-Digest: aGOtTdQmrTuCfVrU6UDSktcCKPA=
-
-Name: javax/servlet/FilterConfig.class
-SHA1-Digest: 3q3TV3p6e56g88k6my7HATU3fdo=
-
-Name: javax/servlet/http/HttpSessionBindingEvent.class
-SHA1-Digest: 8s6euhxgb6XbT27OD9hEuXf4KPU=
-
-Name: javax/servlet/ServletOutputStream.class
-SHA1-Digest: C04Rw7AFY/HSEAQTyNth7l2HrU8=
-
-Name: javax/servlet/LocalStrings_fr.properties
-SHA1-Digest: 8gKJTnm8gx2uvTCh5KChJmoqnJU=
-
-Name: javax/servlet/resources/XMLSchema.dtd
-SHA1-Digest: 9RaoC7SKJ0yiTvz0jmFl+EhFKEY=
-
-Name: javax/servlet/http/LocalStrings_fr.properties
-SHA1-Digest: t7YF68xQ6ow8Zpp3h7LuZaKo7lc=
-
-Name: javax/servlet/resources/j2ee_web_services_1_1.xsd
-SHA1-Digest: IzKI/p9spq2Wldjs7QIhm0+omA0=
-
-Name: javax/servlet/http/NoBodyResponse.class
-SHA1-Digest: GQ7qm3xR+yDst0jZqM+SAbX0Zb8=
-
-Name: javax/servlet/ServletInputStream.class
-SHA1-Digest: ua3sPNmcO20TTkNlXjBDhl7hYcY=
-
-Name: javax/servlet/http/Cookie.class
-SHA1-Digest: 814NxBOAi6tFirMlovn4iyo5v8A=
-
-Name: javax/servlet/http/HttpSession.class
-SHA1-Digest: SjKVkHc0ykZO/HLzQ87otNRm9wE=
-
-Name: javax/servlet/resources/j2ee_1_4.xsd
-SHA1-Digest: c8kzVWpPNCgLHRWyPv1i4NELaXI=
-
-Name: javax/servlet/ServletContext.class
-SHA1-Digest: JQhgC8zgRchLxCPmLZLEn/i2LHk=
-
-Name: javax/servlet/RequestDispatcher.class
-SHA1-Digest: VtTooRyxQcLz6OibT+6V2TXSKdQ=
-
-Name: javax/servlet/resources/web-app_2_4.xsd
-SHA1-Digest: sptEiMDlwibb6o6ALbYzFxH+p3I=
-
-Name: javax/servlet/SingleThreadModel.class
-SHA1-Digest: nGe2xtSCDI5nOuQGQcgVL5h7tQg=
-
-Name: javax/servlet/http/HttpSessionActivationListener.class
-SHA1-Digest: bNruhJ6ZbTPgDO0tM/4nXw7aBR4=
-
-Name: javax/servlet/resources/web-app_2_5.xsd
-SHA1-Digest: gReNDd6zWih2Z4/n8tI7UdaKzvE=
-
-Name: javax/servlet/http/HttpServletResponseWrapper.class
-SHA1-Digest: GqvyqkJxdmAdjdw1CJsLLJcWSBI=
-
-Name: javax/servlet/http/HttpServletResponse.class
-SHA1-Digest: gkD7wj625s1DIMvChaV3zSEbJ8A=
-
-Name: javax/servlet/resources/web-app_2_2.dtd
-SHA1-Digest: CsTOp3Fqc11szliK2GRigMk9kaA=
-
-Name: javax/servlet/resources/web-app_2_3.dtd
-SHA1-Digest: PSOL4NYWvQiqx/Z4dd50wweluIk=
-
-Name: javax/servlet/resources/datatypes.dtd
-SHA1-Digest: negXBG4KrEM4DWsA6UixiG75o+4=
-
-Name: javax/servlet/ServletContextAttributeListener.class
-SHA1-Digest: u95pwjMLiOsuv2G/NLarwR8JLTc=
-
-Name: plugin.properties
-SHA1-Digest: JtGYoCHNOhBEWT6RKg2GmaW/WHQ=
-
-Name: javax/servlet/ServletConfig.class
-SHA1-Digest: AM1umCP9IBTU0wsUYicpsId8tDI=
-
-Name: javax/servlet/FilterChain.class
-SHA1-Digest: 1XdxRcxMp8mUi8Tp2pM128cIiHE=
-
-Name: javax/servlet/http/NoBodyOutputStream.class
-SHA1-Digest: 80hWgv50daD9O4JPxZLiBumvEOU=
-
-Name: javax/servlet/ServletRequestAttributeEvent.class
-SHA1-Digest: YTeP3O+o1o/24K/bDclWimcMzuA=
-
-Name: javax/servlet/resources/j2ee_web_services_client_1_1.xsd
-SHA1-Digest: tjC+1adG43GwDqyo+1Rui04RxpA=
-
-Name: javax/servlet/ServletException.class
-SHA1-Digest: OdGKjU8KYnKyBSC6gp84VnGnVSA=
-
-Name: javax/servlet/resources/jspxml.xsd
-SHA1-Digest: 8RLiUK0701Mes80qw1V0d2zjlOo=
-
-Name: javax/servlet/resources/jsp_2_0.xsd
-SHA1-Digest: gjhhIJg1PHUuQyGIZ6LYu35sKJw=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: javax/servlet/ServletResponseWrapper.class
-SHA1-Digest: /nW0NAMS27Gp9B1fSCu4TxbqPtY=
-
-Name: javax/servlet/LocalStrings_ja.properties
-SHA1-Digest: fWcC0+8BY/is7Mz+ifqv+xn3YWk=
-
-Name: javax/servlet/http/LocalStrings_ja.properties
-SHA1-Digest: CkWj6ZiL0tmjIdivjxbZXbw1kwE=
-
-Name: javax/servlet/ServletRequestListener.class
-SHA1-Digest: Kl7zeOGhl4GL9mVLC6Nf+H8jndY=
-
-Name: about.html
-SHA1-Digest: DOXgjdJkCfshjNaMxgtw+S1kFxQ=
-
-Name: javax/servlet/Servlet.class
-SHA1-Digest: S596bI4xC+N2r87RPWKe202ztJQ=
-
-Name: javax/servlet/UnavailableException.class
-SHA1-Digest: O+Wm6u4FMTD2mod58+6vvI4GFLY=
-
-Name: javax/servlet/ServletRequestAttributeListener.class
-SHA1-Digest: VVGi6p/vaccOjQHVmKUF4eTBWZk=
-
-Name: javax/servlet/http/HttpSessionContext.class
-SHA1-Digest: tSXw8uG5shVb9ms8rgkvZleYKbQ=
-
-Name: javax/servlet/http/HttpSessionAttributeListener.class
-SHA1-Digest: ePuZtdVoakXZflRHli3dWYFqjbU=
-
-Name: javax/servlet/ServletContextAttributeEvent.class
-SHA1-Digest: I1VRvE2SczWAzUq4id+dC+h/XjI=
-
-Name: javax/servlet/ServletContextEvent.class
-SHA1-Digest: aZJ4fTxTddNe3L2OWUCBW12q5LQ=
-
-Name: javax/servlet/GenericServlet.class
-SHA1-Digest: e0c6/5OOiebOSXd/d8x1hPgqi9c=
-
diff --git a/dependencyManifests/javax.servlet_2.5.0.v200910301333.jar/META-INF/MANIFEST.MF b/dependencyManifests/javax.servlet_2.5.0.v200910301333.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3a2a76a
--- /dev/null
+++ b/dependencyManifests/javax.servlet_2.5.0.v200910301333.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,209 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,J2SE-1.4
+Bundle-Name: %bundleName
+Bundle-SymbolicName: javax.servlet
+Export-Package: javax.servlet;version="2.5",javax.servlet.http;version
+ ="2.5",javax.servlet.resources;version="2.5"
+Bundle-Version: 2.5.0.v200910301333
+Bundle-ManifestVersion: 2
+
+Name: javax/servlet/http/HttpServletRequest.class
+SHA1-Digest: cZEqv/EjAPpg1GIqtRM4yyXo24c=
+
+Name: javax/servlet/resources/web-jsptaglibrary_2_0.xsd
+SHA1-Digest: OPBaWTFgVdgYhf/G/Ihgm8bbqjU=
+
+Name: javax/servlet/resources/xml.xsd
+SHA1-Digest: 67xOpsC5yFOUU4W1NU08KubpNkw=
+
+Name: javax/servlet/Filter.class
+SHA1-Digest: PscRB6zod5A5KQvErg2zFbjV6ys=
+
+Name: javax/servlet/LocalStrings.properties
+SHA1-Digest: lJgZQAtOACfwT0+fdtYj115M8UQ=
+
+Name: javax/servlet/http/HttpServletRequestWrapper.class
+SHA1-Digest: XP2MXG+OiQW7Is05dQqtRSOdMos=
+
+Name: javax/servlet/http/HttpSessionListener.class
+SHA1-Digest: hvG5fYCqYV6bUuWZcGObyxtNpRE=
+
+Name: javax/servlet/ServletContextListener.class
+SHA1-Digest: hlbWgriGorzKKV/6N+P9HJOZ1HI=
+
+Name: javax/servlet/ServletResponse.class
+SHA1-Digest: 4O6Jr097CpG3QgWbytJq6q605kE=
+
+Name: javax/servlet/http/HttpUtils.class
+SHA1-Digest: 631+g1izaxXD5RXqAwT2CsGLIp0=
+
+Name: javax/servlet/http/LocalStrings_es.properties
+SHA1-Digest: pVaN8pbLEEEn0cTQGOlztbq6x/k=
+
+Name: javax/servlet/ServletRequestWrapper.class
+SHA1-Digest: KNqRnt2oqkkRyBo1nLsN3llAYL0=
+
+Name: javax/servlet/ServletRequestEvent.class
+SHA1-Digest: vK64h8xobSZTJYdNjiSgaKhCe2o=
+
+Name: javax/servlet/ServletRequest.class
+SHA1-Digest: vNuxheE5jLqSw4XpmtS0P5yo2Zk=
+
+Name: javax/servlet/http/HttpSessionBindingListener.class
+SHA1-Digest: q/L8u16/BwGgjEZUnPizyWXd7fM=
+
+Name: javax/servlet/http/HttpSessionEvent.class
+SHA1-Digest: wd8x2VwBGYg2faQtsa+MVKE9LHc=
+
+Name: javax/servlet/http/HttpServlet.class
+SHA1-Digest: RQhdmVq8CCOBGOi5rVnsK2a79Is=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: javax/servlet/http/LocalStrings.properties
+SHA1-Digest: aGOtTdQmrTuCfVrU6UDSktcCKPA=
+
+Name: javax/servlet/FilterConfig.class
+SHA1-Digest: 3q3TV3p6e56g88k6my7HATU3fdo=
+
+Name: javax/servlet/http/HttpSessionBindingEvent.class
+SHA1-Digest: 8s6euhxgb6XbT27OD9hEuXf4KPU=
+
+Name: javax/servlet/ServletOutputStream.class
+SHA1-Digest: C04Rw7AFY/HSEAQTyNth7l2HrU8=
+
+Name: javax/servlet/LocalStrings_fr.properties
+SHA1-Digest: 8gKJTnm8gx2uvTCh5KChJmoqnJU=
+
+Name: javax/servlet/resources/XMLSchema.dtd
+SHA1-Digest: 9RaoC7SKJ0yiTvz0jmFl+EhFKEY=
+
+Name: javax/servlet/http/LocalStrings_fr.properties
+SHA1-Digest: t7YF68xQ6ow8Zpp3h7LuZaKo7lc=
+
+Name: javax/servlet/resources/j2ee_web_services_1_1.xsd
+SHA1-Digest: IzKI/p9spq2Wldjs7QIhm0+omA0=
+
+Name: javax/servlet/http/NoBodyResponse.class
+SHA1-Digest: GQ7qm3xR+yDst0jZqM+SAbX0Zb8=
+
+Name: javax/servlet/ServletInputStream.class
+SHA1-Digest: ua3sPNmcO20TTkNlXjBDhl7hYcY=
+
+Name: javax/servlet/http/Cookie.class
+SHA1-Digest: 814NxBOAi6tFirMlovn4iyo5v8A=
+
+Name: javax/servlet/http/HttpSession.class
+SHA1-Digest: SjKVkHc0ykZO/HLzQ87otNRm9wE=
+
+Name: javax/servlet/resources/j2ee_1_4.xsd
+SHA1-Digest: c8kzVWpPNCgLHRWyPv1i4NELaXI=
+
+Name: javax/servlet/ServletContext.class
+SHA1-Digest: JQhgC8zgRchLxCPmLZLEn/i2LHk=
+
+Name: javax/servlet/RequestDispatcher.class
+SHA1-Digest: VtTooRyxQcLz6OibT+6V2TXSKdQ=
+
+Name: javax/servlet/resources/web-app_2_4.xsd
+SHA1-Digest: sptEiMDlwibb6o6ALbYzFxH+p3I=
+
+Name: javax/servlet/SingleThreadModel.class
+SHA1-Digest: nGe2xtSCDI5nOuQGQcgVL5h7tQg=
+
+Name: javax/servlet/http/HttpSessionActivationListener.class
+SHA1-Digest: bNruhJ6ZbTPgDO0tM/4nXw7aBR4=
+
+Name: javax/servlet/resources/web-app_2_5.xsd
+SHA1-Digest: gReNDd6zWih2Z4/n8tI7UdaKzvE=
+
+Name: javax/servlet/http/HttpServletResponseWrapper.class
+SHA1-Digest: GqvyqkJxdmAdjdw1CJsLLJcWSBI=
+
+Name: javax/servlet/http/HttpServletResponse.class
+SHA1-Digest: gkD7wj625s1DIMvChaV3zSEbJ8A=
+
+Name: javax/servlet/resources/web-app_2_2.dtd
+SHA1-Digest: CsTOp3Fqc11szliK2GRigMk9kaA=
+
+Name: javax/servlet/resources/web-app_2_3.dtd
+SHA1-Digest: PSOL4NYWvQiqx/Z4dd50wweluIk=
+
+Name: javax/servlet/resources/datatypes.dtd
+SHA1-Digest: negXBG4KrEM4DWsA6UixiG75o+4=
+
+Name: javax/servlet/ServletContextAttributeListener.class
+SHA1-Digest: u95pwjMLiOsuv2G/NLarwR8JLTc=
+
+Name: plugin.properties
+SHA1-Digest: JtGYoCHNOhBEWT6RKg2GmaW/WHQ=
+
+Name: javax/servlet/ServletConfig.class
+SHA1-Digest: AM1umCP9IBTU0wsUYicpsId8tDI=
+
+Name: javax/servlet/FilterChain.class
+SHA1-Digest: 1XdxRcxMp8mUi8Tp2pM128cIiHE=
+
+Name: javax/servlet/http/NoBodyOutputStream.class
+SHA1-Digest: 80hWgv50daD9O4JPxZLiBumvEOU=
+
+Name: javax/servlet/ServletRequestAttributeEvent.class
+SHA1-Digest: YTeP3O+o1o/24K/bDclWimcMzuA=
+
+Name: javax/servlet/resources/j2ee_web_services_client_1_1.xsd
+SHA1-Digest: tjC+1adG43GwDqyo+1Rui04RxpA=
+
+Name: javax/servlet/ServletException.class
+SHA1-Digest: OdGKjU8KYnKyBSC6gp84VnGnVSA=
+
+Name: javax/servlet/resources/jspxml.xsd
+SHA1-Digest: 8RLiUK0701Mes80qw1V0d2zjlOo=
+
+Name: javax/servlet/resources/jsp_2_0.xsd
+SHA1-Digest: 3AmjZ0u0APIuuAB0cez9iK53QdI=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: javax/servlet/ServletResponseWrapper.class
+SHA1-Digest: /nW0NAMS27Gp9B1fSCu4TxbqPtY=
+
+Name: javax/servlet/LocalStrings_ja.properties
+SHA1-Digest: fWcC0+8BY/is7Mz+ifqv+xn3YWk=
+
+Name: javax/servlet/http/LocalStrings_ja.properties
+SHA1-Digest: CkWj6ZiL0tmjIdivjxbZXbw1kwE=
+
+Name: javax/servlet/ServletRequestListener.class
+SHA1-Digest: Kl7zeOGhl4GL9mVLC6Nf+H8jndY=
+
+Name: about.html
+SHA1-Digest: DOXgjdJkCfshjNaMxgtw+S1kFxQ=
+
+Name: javax/servlet/Servlet.class
+SHA1-Digest: S596bI4xC+N2r87RPWKe202ztJQ=
+
+Name: javax/servlet/UnavailableException.class
+SHA1-Digest: O+Wm6u4FMTD2mod58+6vvI4GFLY=
+
+Name: javax/servlet/ServletRequestAttributeListener.class
+SHA1-Digest: VVGi6p/vaccOjQHVmKUF4eTBWZk=
+
+Name: javax/servlet/http/HttpSessionContext.class
+SHA1-Digest: tSXw8uG5shVb9ms8rgkvZleYKbQ=
+
+Name: javax/servlet/http/HttpSessionAttributeListener.class
+SHA1-Digest: ePuZtdVoakXZflRHli3dWYFqjbU=
+
+Name: javax/servlet/ServletContextAttributeEvent.class
+SHA1-Digest: I1VRvE2SczWAzUq4id+dC+h/XjI=
+
+Name: javax/servlet/ServletContextEvent.class
+SHA1-Digest: aZJ4fTxTddNe3L2OWUCBW12q5LQ=
+
+Name: javax/servlet/GenericServlet.class
+SHA1-Digest: e0c6/5OOiebOSXd/d8x1hPgqi9c=
+
diff --git a/dependencyManifests/org.apache.commons.codec_1.3.0.v20080530-1600.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.codec_1.3.0.v20080530-1600.jar/META-INF/MANIFEST.MF
index 53cf454..739fa0f 100644
--- a/dependencyManifests/org.apache.commons.codec_1.3.0.v20080530-1600.jar/META-INF/MANIFEST.MF
+++ b/dependencyManifests/org.apache.commons.codec_1.3.0.v20080530-1600.jar/META-INF/MANIFEST.MF
@@ -1,13 +1,14 @@
 Manifest-Version: 1.0
 Bundle-Vendor: %bundleProvider
 Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.apache.commons.codec
 Export-Package: org.apache.commons.codec;version="1.3.0",org.apache.co
  mmons.codec.binary;version="1.3.0",org.apache.commons.codec.digest;ve
  rsion="1.3.0",org.apache.commons.codec.language;version="1.3.0",org.a
  pache.commons.codec.net;version="1.3.0"
-Bundle-Version: 1.3.0.v20080530-1600
+Bundle-Version: 1.3.0.v20100518-1140
 Bundle-ManifestVersion: 2
 
 Name: org/apache/commons/codec/language/DoubleMetaphone.class
@@ -38,7 +39,7 @@ Name: org/apache/commons/codec/binary/Hex.class
 SHA1-Digest: 3HCzfhHisCVj80SpQp9ocGLzQo0=
 
 Name: plugin.properties
-SHA1-Digest: TPF3gR0+r9XYebyNaf3SbSKDfYY=
+SHA1-Digest: 5MZzEYQvuEeJGsdwKs9rkvRxvis=
 
 Name: org/apache/commons/codec/net/StringEncodings.class
 SHA1-Digest: qf4vuSsKwlYm8Pp74YiPdoYk3Yc=
diff --git a/dependencyManifests/org.apache.commons.el_1.0.0.v200806031608.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.el_1.0.0.v200806031608.jar/META-INF/MANIFEST.MF
index d4bced3..474cde9 100644
--- a/dependencyManifests/org.apache.commons.el_1.0.0.v200806031608.jar/META-INF/MANIFEST.MF
+++ b/dependencyManifests/org.apache.commons.el_1.0.0.v200806031608.jar/META-INF/MANIFEST.MF
@@ -6,12 +6,13 @@ Bundle-Name: %bundleName
 Bundle-SymbolicName: org.apache.commons.el
 Export-Package: org.apache.commons.el;version="1.0.0",org.apache.commo
  ns.el.parser;version="1.0.0"
-Bundle-Version: 1.0.0.v200806031608
+Bundle-Version: 1.0.0.v201004212143
 Bundle-ManifestVersion: 2
-Import-Package: javax.servlet;version="2.4",javax.servlet.http;version
- ="2.4",javax.servlet.jsp;version="2.0",javax.servlet.jsp.el;version="
- 2.0",javax.servlet.jsp.resources;version="2.0",javax.servlet.jsp.tage
- xt;version="2.0",javax.servlet.resources;version="2.4"
+Import-Package: javax.servlet;version="[2.4, 3.0)",javax.servlet.http;
+ version="[2.4, 3.0)",javax.servlet.jsp;version="[2.0, 2.1)",javax.ser
+ vlet.jsp.el;version="[2.0, 2.1)",javax.servlet.jsp.resources;version=
+ "[2.0, 2.1)",javax.servlet.jsp.tagext;version="[2.0, 2.1)",javax.serv
+ let.resources;version="[2.4, 3.0)"
 
 Name: org/apache/commons/el/ImplicitObjects$6.class
 SHA1-Digest: yk3eN531Co8H5mcmuI/jBgzMK7M=
diff --git a/dependencyManifests/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index d3c004d..0000000
--- a/dependencyManifests/org.apache.commons.httpclient_3.1.0.v20080605-1935.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,580 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %bundleProvider
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.apache.commons.httpclient
-Export-Package: org.apache.commons.httpclient;version="3.1.0",org.apac
- he.commons.httpclient.auth;version="3.1.0",org.apache.commons.httpcli
- ent.cookie;version="3.1.0",org.apache.commons.httpclient.methods;vers
- ion="3.1.0",org.apache.commons.httpclient.methods.multipart;version="
- 3.1.0",org.apache.commons.httpclient.params;version="3.1.0",org.apach
- e.commons.httpclient.protocol;version="3.1.0",org.apache.commons.http
- client.util;version="3.1.0"
-Bundle-Version: 3.1.0.v20080605-1935
-Bundle-ManifestVersion: 2
-Import-Package: javax.crypto;resolution:=optional,javax.crypto.spec;re
- solution:=optional,javax.net;resolution:=optional,javax.net.ssl;resol
- ution:=optional,org.apache.commons.codec;version="[1.2.0,2.0.0)",org.
- apache.commons.codec.binary;version="[1.2.0,2.0.0)",org.apache.common
- s.codec.net;version="[1.2.0,2.0.0)",org.apache.commons.logging;versio
- n="[1.0.4,2.0.0)"
-
-Name: org/apache/commons/httpclient/util/HttpURLConnection.class
-SHA1-Digest: M5H11qNIDOZBHaCmLncaqphkGEY=
-
-Name: org/apache/commons/httpclient/params/HttpParams.class
-SHA1-Digest: gd5vFFjKddkgcgefyCxgudrwzBA=
-
-Name: org/apache/commons/httpclient/ProtocolException.class
-SHA1-Digest: f1V1jhP6io5eMxZkYIi03TP5jr8=
-
-Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
- tory.class
-SHA1-Digest: SxExE5QMDa6cEkZO9IY6SJVfjc4=
-
-Name: org/apache/commons/httpclient/params/HttpMethodParams.class
-SHA1-Digest: y5ySQ4ycdSVKbb03H92zamF5uO8=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $ConnectionSource.class
-SHA1-Digest: FbYC54mA6yVzB7cooeMvEcq2Xho=
-
-Name: org/apache/commons/httpclient/methods/FileRequestEntity.class
-SHA1-Digest: PJNFqHBLR3DtPRQQz8zFJDUwFxc=
-
-Name: org/apache/commons/httpclient/HttpConnection.class
-SHA1-Digest: dnWkhTT5BtPgzx7A/gXNcLccjPc=
-
-Name: org/apache/commons/httpclient/StatusLine.class
-SHA1-Digest: lJ3I9SKLS87J6FG17u2A0fDWrfY=
-
-Name: org/apache/commons/httpclient/auth/CredentialsNotAvailableExcept
- ion.class
-SHA1-Digest: Yzajb6gwEXqvkpELzWX/UFseN8E=
-
-Name: org/apache/commons/httpclient/HttpParser.class
-SHA1-Digest: siaMgideCrC7ewcnwHfzEDtwdEk=
-
-Name: org/apache/commons/httpclient/HttpMethodBase$1.class
-SHA1-Digest: jeppq+NPzWDvdXxIlHIpgsRVjM8=
-
-Name: org/apache/commons/httpclient/auth/AuthSchemeBase.class
-SHA1-Digest: SPtf4ZkwrZLbWW/1lrI0gFjhgpk=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieSecureAtt
- ributeHandler.class
-SHA1-Digest: jgzM2QvKcpMAaY2k3Y86rzsvvP8=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $HttpConnectionAdapter.class
-SHA1-Digest: zUalBMLBat5guyjEYFA/m3fGWLw=
-
-Name: org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.class
-SHA1-Digest: NWvscU+nOL6kuWhATdweJOEk+08=
-
-Name: org/apache/commons/httpclient/auth/NTLM.class
-SHA1-Digest: O1wT56/IOlUEccgEsNkq0VDqZQk=
-
-Name: org/apache/commons/httpclient/methods/PutMethod.class
-SHA1-Digest: qWSToOJmW/WXz8kk62qb8up4BB0=
-
-Name: org/apache/commons/httpclient/methods/RequestEntity.class
-SHA1-Digest: xtvEtDt6w2q2BHtwyZh0unVQL0M=
-
-Name: org/apache/commons/httpclient/NTCredentials.class
-SHA1-Digest: yUjHchcJTYwFC6raSFMuOk+iDwY=
-
-Name: org/apache/commons/httpclient/params/HostParams.class
-SHA1-Digest: EkAGiT3itAQDwHtuwvYt3Db/trg=
-
-Name: org/apache/commons/httpclient/methods/PostMethod.class
-SHA1-Digest: D3zeoHsV2RP8DgJLpmMTr02/1yQ=
-
-Name: org/apache/commons/httpclient/methods/ByteArrayRequestEntity.cla
- ss
-SHA1-Digest: CT5PsgrQ8psEvkCikkxLHwIWlrc=
-
-Name: org/apache/commons/httpclient/auth/AuthPolicy.class
-SHA1-Digest: jIE/f2TA7Xd5bAzA8xJt/+oSI5o=
-
-Name: org/apache/commons/httpclient/auth/InvalidCredentialsException.c
- lass
-SHA1-Digest: VKey4KfgBiPHnJQFK8ZEsW0EIDE=
-
-Name: org/apache/commons/httpclient/cookie/Cookie2.class
-SHA1-Digest: OO+fB8y+GJplf5cPjvfPCXx4mnY=
-
-Name: org/apache/commons/httpclient/methods/OptionsMethod.class
-SHA1-Digest: ShP3G6LiPXHu4YWUGdaF04aU/Vc=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec.class
-SHA1-Digest: KJwlsRvB96zWot0Mn3cm6+KKOvE=
-
-Name: org/apache/commons/httpclient/ConnectionPoolTimeoutException.cla
- ss
-SHA1-Digest: kkBAYW5TvUmalKKLaTYwBzO3+SA=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieDiscardAt
- tributeHandler.class
-SHA1-Digest: h47xOxglhq6oK7IbM9NKcw2dGP0=
-
-Name: org/apache/commons/httpclient/HttpConnectionManager.class
-SHA1-Digest: RZCW+QDMNbWitnlqhhafy2SI5Sc=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieCommentAt
- tributeHandler.class
-SHA1-Digest: bcfVg3vx39bRVW9FshVzVQWbDcs=
-
-Name: org/apache/commons/httpclient/WireLogInputStream.class
-SHA1-Digest: TBUSbC0KYticV5iNp7O3Zk7nIq8=
-
-Name: org/apache/commons/httpclient/cookie/CookieSpec.class
-SHA1-Digest: udJRUHfXflDCbGflHgUCCOeeI00=
-
-Name: org/apache/commons/httpclient/methods/multipart/Part.class
-SHA1-Digest: mU4MxJyQK7Vi3/IaJKyQPa7cgkE=
-
-Name: org/apache/commons/httpclient/RedirectException.class
-SHA1-Digest: yB2Da9zE9J8/qJwJbZ6dlwHz8xU=
-
-Name: org/apache/commons/httpclient/auth/HttpAuthRealm.class
-SHA1-Digest: PnHwTxDtNmaEQyXiWab0tbTOIaY=
-
-Name: org/apache/commons/httpclient/util/DateParseException.class
-SHA1-Digest: LFIrArqrO0XPveG1sMvBsn7KfbA=
-
-Name: org/apache/commons/httpclient/util/DateParser.class
-SHA1-Digest: FIoDKmkpdPf/iI0rmyCb2+dcsjA=
-
-Name: org/apache/commons/httpclient/cookie/MalformedCookieException.cl
- ass
-SHA1-Digest: WHzKrol3clO5Yy3LCTUVDyCdX14=
-
-Name: org/apache/commons/httpclient/cookie/CookieAttributeHandler.clas
- s
-SHA1-Digest: T3Wv0mkkrR8Rmn+UBRSckVYJFgk=
-
-Name: org/apache/commons/httpclient/util/URIUtil.class
-SHA1-Digest: uWf5XSQhk33R2FSslGYJV/IXw3Q=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2DomainAt
- tributeHandler.class
-SHA1-Digest: muTPfBnkD/QKKk4M4c2/CvpvyCs=
-
-Name: org/apache/commons/httpclient/MethodRetryHandler.class
-SHA1-Digest: lwmNO3TSgSBkYTxM3jlPyeUQ6IE=
-
-Name: org/apache/commons/httpclient/util/EncodingUtil.class
-SHA1-Digest: jtQapjwd8iiotd9ZfX9iCXQSI24=
-
-Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
- tory$SocketTask.class
-SHA1-Digest: fYx3FiKV3NjWOKQ2vK+hWFf/E64=
-
-Name: org/apache/commons/httpclient/params/DefaultHttpParamsFactory.cl
- ass
-SHA1-Digest: 46RMC9DLGEuVUCX0hm7eVLN1kwc=
-
-Name: org/apache/commons/httpclient/methods/multipart/MultipartRequest
- Entity.class
-SHA1-Digest: 7hhbGYES5CNwNRPUh0UCvRDHQ58=
-
-Name: org/apache/commons/httpclient/methods/StringRequestEntity.class
-SHA1-Digest: eYz1Exh5nrMwkDOFXL8tQHELg7w=
-
-Name: org/apache/commons/httpclient/NoHttpResponseException.class
-SHA1-Digest: 68FfPfHeFKNfFaFlAVQJrBcepFc=
-
-Name: org/apache/commons/httpclient/cookie/CookieVersionSupport.class
-SHA1-Digest: cNb2B9LiK+kez2gQaY/V4Dbl3w8=
-
-Name: org/apache/commons/httpclient/HttpMethod.class
-SHA1-Digest: R3eTaxAjjvOG5KJTLlV/tm+rd5s=
-
-Name: org/apache/commons/httpclient/methods/TraceMethod.class
-SHA1-Digest: shrN5SLuo11/f5DAY7/oJXT2Dlk=
-
-Name: org/apache/commons/httpclient/cookie/CookiePathComparator.class
-SHA1-Digest: ZLSaZYd1MyzClrehA+xx5OAkMgs=
-
-Name: org/apache/commons/httpclient/ConnectMethod.class
-SHA1-Digest: H2uv0hPLDYgEv3Xso6KNVw2cSnA=
-
-Name: org/apache/commons/httpclient/methods/multipart/FilePart.class
-SHA1-Digest: 0fEhjwhgukDxEvkC1cQ60mLc9Zk=
-
-Name: org/apache/commons/httpclient/methods/EntityEnclosingMethod.clas
- s
-SHA1-Digest: 8BBmStAGNnnp0DgCTs3lXFnZJM4=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: YSrWUKMomQCHlZQWp+L9Fgsdrqk=
-
-Name: org/apache/commons/httpclient/HostConfiguration.class
-SHA1-Digest: Lp4IZhsO+5v3slBHQ4e1xsqctQQ=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $ReferenceQueueThread.class
-SHA1-Digest: XS3RidBEW5QfERue78kfi90MUzg=
-
-Name: org/apache/commons/httpclient/auth/AuthScheme.class
-SHA1-Digest: 7O0U+B4VYLF4yw7whuu+QhbVQ0Q=
-
-Name: org/apache/commons/httpclient/protocol/DefaultProtocolSocketFact
- ory.class
-SHA1-Digest: pCMNDCSYBUD1XDTVwT6fHlrg3Vo=
-
-Name: org/apache/commons/httpclient/SimpleHttpConnectionManager.class
-SHA1-Digest: pZBoheTMh40ed5y/VoYMXiV2jkE=
-
-Name: org/apache/commons/httpclient/cookie/CookieOrigin.class
-SHA1-Digest: qoAwz+8hkwrOslPZ4h8oJVAnYb4=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2MaxageAt
- tributeHandler.class
-SHA1-Digest: JFyn9KGk6T1GVlwd3JwoO8B51yI=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $WaitingThread.class
-SHA1-Digest: 4OpOABRT5v1w9quC/wgukRhKz1o=
-
-Name: org/apache/commons/httpclient/ProxyHost.class
-SHA1-Digest: VExm1spKfNKZtqmHj8e1k1KcAqc=
-
-Name: org/apache/commons/httpclient/HttpRecoverableException.class
-SHA1-Digest: cIcalBmR7lJRNL27xtXBynu5Q2U=
-
-Name: org/apache/commons/httpclient/util/ParameterParser.class
-SHA1-Digest: xmTAfMmYV5Bh0oJhC7jgX7hlFIA=
-
-Name: org/apache/commons/httpclient/URI$LocaleToCharsetMap.class
-SHA1-Digest: i/wGKnjJCZyqdYx/1wcYk1lvrqQ=
-
-Name: org/apache/commons/httpclient/methods/HeadMethod.class
-SHA1-Digest: jmxpPCYu+A3W2RcMnM+yqmtVGTY=
-
-Name: org/apache/commons/httpclient/Credentials.class
-SHA1-Digest: 61bWWbjIPuIr8MqYVWhdmpoZYZ4=
-
-Name: org/apache/commons/httpclient/auth/MalformedChallengeException.c
- lass
-SHA1-Digest: ZrjesARvKh5rLHb9GHSfIr2wZw0=
-
-Name: org/apache/commons/httpclient/methods/multipart/ByteArrayPartSou
- rce.class
-SHA1-Digest: QGqR1c41IDMj1H8RNMgh8WL2CH8=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2PathAttr
- ibuteHandler.class
-SHA1-Digest: VcnOFcArvFNSvb/BgDxtfF4OwGo=
-
-Name: org/apache/commons/httpclient/WireLogOutputStream.class
-SHA1-Digest: JqsOymVvW/kRFDoFlpeW/lxV6nE=
-
-Name: org/apache/commons/httpclient/auth/AuthState.class
-SHA1-Digest: lY36L7bego6QLewxL93nE1A3bJ8=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieCommentUr
- lAttributeHandler.class
-SHA1-Digest: BfVpGKfYF2JANl8YAo8AayaQeU4=
-
-Name: about.html
-SHA1-Digest: 81B4LsrnAS8gv/nojW9sAPUekYA=
-
-Name: org/apache/commons/httpclient/cookie/CookiePolicy.class
-SHA1-Digest: jdplyN7/WVhHgICETBTdwzqgkHg=
-
-Name: org/apache/commons/httpclient/methods/multipart/PartBase.class
-SHA1-Digest: ZZORnzrMImYDw9nw6N+TF2k9rn8=
-
-Name: org/apache/commons/httpclient/Cookie.class
-SHA1-Digest: 73kuBw2j0c8mEkfn+f/jHQd2IiI=
-
-Name: org/apache/commons/httpclient/InvalidRedirectLocationException.c
- lass
-SHA1-Digest: p5xeNdT9h0OxoUg5B2K7Gt9T4ZE=
-
-Name: org/apache/commons/httpclient/HttpURL.class
-SHA1-Digest: Yl8fsxgMiYUmPqrEMcs2b52RCyA=
-
-Name: org/apache/commons/httpclient/HttpMethodRetryHandler.class
-SHA1-Digest: JJDNuLjnUIY8Db7JYDQ4q5Q/320=
-
-Name: org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.clas
- s
-SHA1-Digest: vFQBBVRqMPSTD3PDSYQFVnKqKaI=
-
-Name: org/apache/commons/httpclient/ChunkedOutputStream.class
-SHA1-Digest: redzXbKEF2JcxjLWIWxMuC/2Qxc=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $1.class
-SHA1-Digest: /eRmLFDXNeEAPb9/YDfmAG7/VG0=
-
-Name: org/apache/commons/httpclient/ProxyClient$DummyConnectionManager
- .class
-SHA1-Digest: MgjQJgwCDgfkbW78+sXI6IbTy20=
-
-Name: org/apache/commons/httpclient/auth/DigestScheme.class
-SHA1-Digest: RKGrp7pbdjAz0kI8q6IZAZ69zL4=
-
-Name: org/apache/commons/httpclient/params/HttpParamsFactory.class
-SHA1-Digest: 2u7xGjGpikQlpZdnwpXxak2MP+8=
-
-Name: org/apache/commons/httpclient/auth/AuthChallengeParser.class
-SHA1-Digest: CbRVLjiJPDIrG6yWiYTNzWi+7/g=
-
-Name: org/apache/commons/httpclient/protocol/ReflectionSocketFactory.c
- lass
-SHA1-Digest: etFv80ERsAh60++SvHnos7A9RPY=
-
-Name: org/apache/commons/httpclient/params/HttpConnectionParams.class
-SHA1-Digest: ih57V7GDfsl0vE7Icj42yLUbfpY=
-
-Name: org/apache/commons/httpclient/HttpClientError.class
-SHA1-Digest: 7nkJlPNK+8ksL0FVuQAF9hCgcmo=
-
-Name: org/apache/commons/httpclient/HttpContentTooLargeException.class
-SHA1-Digest: j2ykUVQlTl90R5Bf+ddcieiT82M=
-
-Name: org/apache/commons/httpclient/auth/RFC2617Scheme.class
-SHA1-Digest: WDJCLcx80fBb3wyFIWxqX85Ji9Q=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2VersionA
- ttributeHandler.class
-SHA1-Digest: flPeLYzNa9Y+ke1Y9qZJBjrZgA8=
-
-Name: org/apache/commons/httpclient/HttpMethodBase.class
-SHA1-Digest: Be5Icj+zO9CU9/UTUjsLvAJKz1I=
-
-Name: org/apache/commons/httpclient/ProxyClient.class
-SHA1-Digest: tWyI7oOpPCgtOBw8sMB1hS+pYbs=
-
-Name: org/apache/commons/httpclient/ChunkedInputStream.class
-SHA1-Digest: r46JNhT2Smpi0sz7RgbWHbDn+0M=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $HostConnectionPool.class
-SHA1-Digest: eoBHP15bbfDJSm8V8iFu4rk0Wow=
-
-Name: org/apache/commons/httpclient/Wire.class
-SHA1-Digest: lTwoUBuDq2QmKjkTjSFK/kIlreE=
-
-Name: org/apache/commons/httpclient/params/DefaultHttpParams.class
-SHA1-Digest: IXy540IoaOCAQ9C7wQQoN5wCO8U=
-
-Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
- tory$1.class
-SHA1-Digest: 6YMNn/1PUFqsSyFlXgGDJERPsjk=
-
-Name: org/apache/commons/httpclient/HttpException.class
-SHA1-Digest: VyuEjuKncmBIXj2GoooK/zx8er4=
-
-Name: org/apache/commons/httpclient/HttpConstants.class
-SHA1-Digest: eTSzIzmBpxV/DPLWuL9t7LzOSn4=
-
-Name: org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.c
- lass
-SHA1-Digest: 6bIWr60DDKHhx323Q58XT8PLrTE=
-
-Name: org/apache/commons/httpclient/auth/BasicScheme.class
-SHA1-Digest: VZ2UEgGkvCOw/P/P2jM8b5b+wQc=
-
-Name: org/apache/commons/httpclient/HttpHost.class
-SHA1-Digest: xJrNJPpMsjUMAu6jcONPc+KS02M=
-
-Name: org/apache/commons/httpclient/HeaderElement.class
-SHA1-Digest: ZQp3reakv7kMPG0m02xW8fCpJF4=
-
-Name: org/apache/commons/httpclient/HttpVersion.class
-SHA1-Digest: Fd1ip6t30zxGtWbinsWXFgPA3Ng=
-
-Name: org/apache/commons/httpclient/CircularRedirectException.class
-SHA1-Digest: MGK6J0y5XHAVHUxooNJipyTa57g=
-
-Name: org/apache/commons/httpclient/HttpStatus.class
-SHA1-Digest: OqGd2T52pdVtuMhWoPLCnX5ASq8=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/apache/commons/httpclient/auth/AuthChallengeException.class
-SHA1-Digest: /LER1uwsk0gU+6lRl3SRpwweP+I=
-
-Name: org/apache/commons/httpclient/methods/ExpectContinueMethod.class
-SHA1-Digest: Somz8+YRIf0ErsT8bcQuaT62baQ=
-
-Name: org/apache/commons/httpclient/auth/AuthChallengeProcessor.class
-SHA1-Digest: c7xZLOXrHvpylvY/OBOC1bdfMQY=
-
-Name: org/apache/commons/httpclient/AutoCloseInputStream.class
-SHA1-Digest: q4RRQKm+J5yBVF6qKvhIi2EW5ig=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- .class
-SHA1-Digest: vRGshiG9ZC7/gIOYEJ1ihr14ebc=
-
-Name: org/apache/commons/httpclient/auth/CredentialsProvider.class
-SHA1-Digest: 1zGiE0KcrmIQ5wXN8Wf39gJTYP0=
-
-Name: org/apache/commons/httpclient/methods/DeleteMethod.class
-SHA1-Digest: RJH1FMWuVuhGTKk9h4Nbpn7k9V0=
-
-Name: org/apache/commons/httpclient/ContentLengthInputStream.class
-SHA1-Digest: sMqxHAqtWZI8TVNEWYdmqDXRSQA=
-
-Name: org/apache/commons/httpclient/protocol/SSLProtocolSocketFactory.
- class
-SHA1-Digest: kpdyPOPV7pJkky+a6J2JHOiytJM=
-
-Name: org/apache/commons/httpclient/methods/multipart/PartSource.class
-SHA1-Digest: jGln/FX0GAdnnsys2euqTuDbP2M=
-
-Name: org/apache/commons/httpclient/HttpClient.class
-SHA1-Digest: 5z0toeWVnbpnLtHTGWPWQTnAeDE=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $ConnectionPool.class
-SHA1-Digest: LzBN3hdgG81VZcvNaLH5JS304qo=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2PortAttr
- ibuteHandler.class
-SHA1-Digest: rWZiikRkb0h9R65v8Mc8oiwWm0M=
-
-Name: org/apache/commons/httpclient/NameValuePair.class
-SHA1-Digest: 7u1eVUyuFFzR2MhQsCEjkCJIpyY=
-
-Name: org/apache/commons/httpclient/ProxyClient$ConnectResponse.class
-SHA1-Digest: KKZ2rGp48e2Oqn3oCr14RDrQdHs=
-
-Name: org/apache/commons/httpclient/URIException.class
-SHA1-Digest: utVkCQL1Kz5lBpBodSbdRybrsZk=
-
-Name: org/apache/commons/httpclient/util/TimeoutController$TimeoutExce
- ption.class
-SHA1-Digest: J57RCG+B9/6jFOI6HlO8lRnSxGM=
-
-Name: org/apache/commons/httpclient/HttpsURL.class
-SHA1-Digest: yl4mq2XxFuDYTFNnLkC0ChC9iHk=
-
-Name: plugin.properties
-SHA1-Digest: bz9KlcwPsnqGuJ4JsFYpRtiztlI=
-
-Name: org/apache/commons/httpclient/methods/InputStreamRequestEntity.c
- lass
-SHA1-Digest: 3JoEGzvxYfh9yYny5SkW+iIN/rk=
-
-Name: org/apache/commons/httpclient/DefaultMethodRetryHandler.class
-SHA1-Digest: mdl5VSbRxzTMnmbeZpnr/usCpAM=
-
-Name: org/apache/commons/httpclient/cookie/NetscapeDraftSpec.class
-SHA1-Digest: FPRiDsHfbyX9j7hu4p0BioUm7eo=
-
-Name: org/apache/commons/httpclient/ProxyClient$1.class
-SHA1-Digest: m/id1SY9mECjQ/JzNgegQcEFrC8=
-
-Name: org/apache/commons/httpclient/methods/multipart/FilePartSource.c
- lass
-SHA1-Digest: ZiwTc4ME4VDopnaTbcAafvJLtp4=
-
-Name: org/apache/commons/httpclient/util/IdleConnectionHandler.class
-SHA1-Digest: En7LN+ky/haGxbNEzVKEaakvN0I=
-
-Name: org/apache/commons/httpclient/HttpState.class
-SHA1-Digest: 31/wG6K9RFWzhszxZo/31YZOX60=
-
-Name: org/apache/commons/httpclient/Header.class
-SHA1-Digest: 95NNazEW75vhEzmkICD/Uolzd+4=
-
-Name: org/apache/commons/httpclient/UsernamePasswordCredentials.class
-SHA1-Digest: TlPa0rulzadghK5nN0CANOHZFL0=
-
-Name: org/apache/commons/httpclient/URI.class
-SHA1-Digest: KEuzWRxwJnCpUu/ViLJt0eSJztM=
-
-Name: org/apache/commons/httpclient/util/TimeoutController.class
-SHA1-Digest: WZT9bmcEmdAH9W6gs8of9cue/8w=
-
-Name: org/apache/commons/httpclient/auth/AuthenticationException.class
-SHA1-Digest: re/5467dBY73EL9B1vQs1R5xdi8=
-
-Name: org/apache/commons/httpclient/protocol/Protocol.class
-SHA1-Digest: 6uTzccmhns8AMcW/rqM08LB9wJg=
-
-Name: org/apache/commons/httpclient/HeaderGroup.class
-SHA1-Digest: Rekrq+rInHXOO00YDlqed7Qbos0=
-
-Name: org/apache/commons/httpclient/ResponseConsumedWatcher.class
-SHA1-Digest: l45UnEsj6FFG5Q9thfaGZA4cOUM=
-
-Name: org/apache/commons/httpclient/auth/NTLMScheme.class
-SHA1-Digest: QCfRHNQ1ugLcKYvWIOx1SofHaOw=
-
-Name: org/apache/commons/httpclient/util/LangUtils.class
-SHA1-Digest: 4xl0SC1PgFkH5vqR5BhXXuhakmU=
-
-Name: org/apache/commons/httpclient/ConnectTimeoutException.class
-SHA1-Digest: xZYvEhOGpF/RJEyIvH4c2AK+uds=
-
-Name: org/apache/commons/httpclient/methods/GetMethod.class
-SHA1-Digest: HM+zYksFlqaAlUsv9prKQEnZvC0=
-
-Name: org/apache/commons/httpclient/cookie/CookieSpecBase.class
-SHA1-Digest: UL154mUBP2sH5wgZgFHoddFZKPU=
-
-Name: org/apache/commons/httpclient/util/DateUtil.class
-SHA1-Digest: tMdK+ZwmAoXFM3/hqWFe5wLFifc=
-
-Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
- $HttpConnectionWithReference.class
-SHA1-Digest: jShe9cWyFMnksi/modf4xPltFNQ=
-
-Name: org/apache/commons/httpclient/util/URIUtil$Coder.class
-SHA1-Digest: dW8QbtFItPsmc+18mxjYtr0m734=
-
-Name: org/apache/commons/httpclient/util/ExceptionUtil.class
-SHA1-Digest: U+VIh2cqmO0m7Ms43+BoUxQyae4=
-
-Name: org/apache/commons/httpclient/params/HttpConnectionManagerParams
- .class
-SHA1-Digest: ZKqDTU2B0C2BUIkqUJflHgMy87M=
-
-Name: org/apache/commons/httpclient/params/HttpClientParams.class
-SHA1-Digest: EfNdnfaevrv0NoT4mAJJ3eDfz4o=
-
-Name: org/apache/commons/httpclient/methods/multipart/StringPart.class
-SHA1-Digest: mXG8VVvsOMLkQzDaDIwJlinL5ec=
-
-Name: org/apache/commons/httpclient/auth/HttpAuthenticator.class
-SHA1-Digest: 16hu28gqgS10acWqISP2kBG2IBA=
-
-Name: org/apache/commons/httpclient/auth/AuthScope.class
-SHA1-Digest: gQ77L3NdDa1SWCyNS1SAdnQZ4+A=
-
-Name: org/apache/commons/httpclient/cookie/RFC2109Spec.class
-SHA1-Digest: QblMUFcAJboAOIhcaZGfmroJMGs=
-
-Name: org/apache/commons/httpclient/protocol/ProtocolSocketFactory.cla
- ss
-SHA1-Digest: 1VpnixH6x64r+GTp6DgBwoFrO9I=
-
-Name: org/apache/commons/httpclient/util/ParameterFormatter.class
-SHA1-Digest: MYU9Z6oyj7l/KGH7/RR+n0Y7nqI=
-
-Name: org/apache/commons/httpclient/protocol/SecureProtocolSocketFacto
- ry.class
-SHA1-Digest: 0GIhQLSmAURMizHQKhvpzz67OYM=
-
-Name: org/apache/commons/httpclient/methods/MultipartPostMethod.class
-SHA1-Digest: 1KLLLaQ5dTnYU9k2CQ0DpdWyEIY=
-
-Name: org/apache/commons/httpclient/cookie/RFC2965Spec$1.class
-SHA1-Digest: 4SbL6fMCs5vy1n6US6CImHZovYo=
-
-Name: org/apache/commons/httpclient/URI$DefaultCharsetChanged.class
-SHA1-Digest: H9SQF8D/uqp8n0dh6NRgQ+Rpwls=
-
-Name: org/apache/commons/httpclient/HttpMethodDirector.class
-SHA1-Digest: 3pn5QSLxTBNu5IN6wSyG4cHhI2U=
-
diff --git a/dependencyManifests/org.apache.commons.httpclient_3.1.0.v201005080502.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.httpclient_3.1.0.v201005080502.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..43dd0d8
--- /dev/null
+++ b/dependencyManifests/org.apache.commons.httpclient_3.1.0.v201005080502.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,580 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.apache.commons.httpclient
+Export-Package: org.apache.commons.httpclient;version="3.1.0",org.apac
+ he.commons.httpclient.auth;version="3.1.0",org.apache.commons.httpcli
+ ent.cookie;version="3.1.0",org.apache.commons.httpclient.methods;vers
+ ion="3.1.0",org.apache.commons.httpclient.methods.multipart;version="
+ 3.1.0",org.apache.commons.httpclient.params;version="3.1.0",org.apach
+ e.commons.httpclient.protocol;version="3.1.0",org.apache.commons.http
+ client.util;version="3.1.0"
+Bundle-Version: 3.1.0.v201005080502
+Bundle-ManifestVersion: 2
+Import-Package: javax.crypto;resolution:=optional,javax.crypto.spec;re
+ solution:=optional,javax.net;resolution:=optional,javax.net.ssl;resol
+ ution:=optional,org.apache.commons.codec;version="[1.2.0,2.0.0)",org.
+ apache.commons.codec.binary;version="[1.2.0,2.0.0)",org.apache.common
+ s.codec.net;version="[1.2.0,2.0.0)",org.apache.commons.logging;versio
+ n="[1.0.4,2.0.0)"
+
+Name: org/apache/commons/httpclient/util/HttpURLConnection.class
+SHA1-Digest: M5H11qNIDOZBHaCmLncaqphkGEY=
+
+Name: org/apache/commons/httpclient/params/HttpParams.class
+SHA1-Digest: gd5vFFjKddkgcgefyCxgudrwzBA=
+
+Name: org/apache/commons/httpclient/ProtocolException.class
+SHA1-Digest: f1V1jhP6io5eMxZkYIi03TP5jr8=
+
+Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
+ tory.class
+SHA1-Digest: SxExE5QMDa6cEkZO9IY6SJVfjc4=
+
+Name: org/apache/commons/httpclient/params/HttpMethodParams.class
+SHA1-Digest: y5ySQ4ycdSVKbb03H92zamF5uO8=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $ConnectionSource.class
+SHA1-Digest: FbYC54mA6yVzB7cooeMvEcq2Xho=
+
+Name: org/apache/commons/httpclient/methods/FileRequestEntity.class
+SHA1-Digest: PJNFqHBLR3DtPRQQz8zFJDUwFxc=
+
+Name: org/apache/commons/httpclient/HttpConnection.class
+SHA1-Digest: dnWkhTT5BtPgzx7A/gXNcLccjPc=
+
+Name: org/apache/commons/httpclient/StatusLine.class
+SHA1-Digest: lJ3I9SKLS87J6FG17u2A0fDWrfY=
+
+Name: org/apache/commons/httpclient/auth/CredentialsNotAvailableExcept
+ ion.class
+SHA1-Digest: Yzajb6gwEXqvkpELzWX/UFseN8E=
+
+Name: org/apache/commons/httpclient/HttpParser.class
+SHA1-Digest: siaMgideCrC7ewcnwHfzEDtwdEk=
+
+Name: org/apache/commons/httpclient/HttpMethodBase$1.class
+SHA1-Digest: jeppq+NPzWDvdXxIlHIpgsRVjM8=
+
+Name: org/apache/commons/httpclient/auth/AuthSchemeBase.class
+SHA1-Digest: SPtf4ZkwrZLbWW/1lrI0gFjhgpk=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieSecureAtt
+ ributeHandler.class
+SHA1-Digest: jgzM2QvKcpMAaY2k3Y86rzsvvP8=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $HttpConnectionAdapter.class
+SHA1-Digest: zUalBMLBat5guyjEYFA/m3fGWLw=
+
+Name: org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.class
+SHA1-Digest: NWvscU+nOL6kuWhATdweJOEk+08=
+
+Name: org/apache/commons/httpclient/auth/NTLM.class
+SHA1-Digest: O1wT56/IOlUEccgEsNkq0VDqZQk=
+
+Name: org/apache/commons/httpclient/methods/PutMethod.class
+SHA1-Digest: qWSToOJmW/WXz8kk62qb8up4BB0=
+
+Name: org/apache/commons/httpclient/methods/RequestEntity.class
+SHA1-Digest: xtvEtDt6w2q2BHtwyZh0unVQL0M=
+
+Name: org/apache/commons/httpclient/NTCredentials.class
+SHA1-Digest: yUjHchcJTYwFC6raSFMuOk+iDwY=
+
+Name: org/apache/commons/httpclient/params/HostParams.class
+SHA1-Digest: EkAGiT3itAQDwHtuwvYt3Db/trg=
+
+Name: org/apache/commons/httpclient/methods/PostMethod.class
+SHA1-Digest: D3zeoHsV2RP8DgJLpmMTr02/1yQ=
+
+Name: org/apache/commons/httpclient/methods/ByteArrayRequestEntity.cla
+ ss
+SHA1-Digest: CT5PsgrQ8psEvkCikkxLHwIWlrc=
+
+Name: org/apache/commons/httpclient/auth/AuthPolicy.class
+SHA1-Digest: jIE/f2TA7Xd5bAzA8xJt/+oSI5o=
+
+Name: org/apache/commons/httpclient/auth/InvalidCredentialsException.c
+ lass
+SHA1-Digest: VKey4KfgBiPHnJQFK8ZEsW0EIDE=
+
+Name: org/apache/commons/httpclient/cookie/Cookie2.class
+SHA1-Digest: OO+fB8y+GJplf5cPjvfPCXx4mnY=
+
+Name: org/apache/commons/httpclient/methods/OptionsMethod.class
+SHA1-Digest: ShP3G6LiPXHu4YWUGdaF04aU/Vc=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec.class
+SHA1-Digest: KJwlsRvB96zWot0Mn3cm6+KKOvE=
+
+Name: org/apache/commons/httpclient/ConnectionPoolTimeoutException.cla
+ ss
+SHA1-Digest: kkBAYW5TvUmalKKLaTYwBzO3+SA=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieDiscardAt
+ tributeHandler.class
+SHA1-Digest: h47xOxglhq6oK7IbM9NKcw2dGP0=
+
+Name: org/apache/commons/httpclient/HttpConnectionManager.class
+SHA1-Digest: RZCW+QDMNbWitnlqhhafy2SI5Sc=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieCommentAt
+ tributeHandler.class
+SHA1-Digest: bcfVg3vx39bRVW9FshVzVQWbDcs=
+
+Name: org/apache/commons/httpclient/WireLogInputStream.class
+SHA1-Digest: TBUSbC0KYticV5iNp7O3Zk7nIq8=
+
+Name: org/apache/commons/httpclient/cookie/CookieSpec.class
+SHA1-Digest: udJRUHfXflDCbGflHgUCCOeeI00=
+
+Name: org/apache/commons/httpclient/methods/multipart/Part.class
+SHA1-Digest: mU4MxJyQK7Vi3/IaJKyQPa7cgkE=
+
+Name: org/apache/commons/httpclient/RedirectException.class
+SHA1-Digest: yB2Da9zE9J8/qJwJbZ6dlwHz8xU=
+
+Name: org/apache/commons/httpclient/auth/HttpAuthRealm.class
+SHA1-Digest: PnHwTxDtNmaEQyXiWab0tbTOIaY=
+
+Name: org/apache/commons/httpclient/util/DateParseException.class
+SHA1-Digest: LFIrArqrO0XPveG1sMvBsn7KfbA=
+
+Name: org/apache/commons/httpclient/util/DateParser.class
+SHA1-Digest: FIoDKmkpdPf/iI0rmyCb2+dcsjA=
+
+Name: org/apache/commons/httpclient/cookie/MalformedCookieException.cl
+ ass
+SHA1-Digest: WHzKrol3clO5Yy3LCTUVDyCdX14=
+
+Name: org/apache/commons/httpclient/cookie/CookieAttributeHandler.clas
+ s
+SHA1-Digest: T3Wv0mkkrR8Rmn+UBRSckVYJFgk=
+
+Name: org/apache/commons/httpclient/util/URIUtil.class
+SHA1-Digest: uWf5XSQhk33R2FSslGYJV/IXw3Q=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2DomainAt
+ tributeHandler.class
+SHA1-Digest: muTPfBnkD/QKKk4M4c2/CvpvyCs=
+
+Name: org/apache/commons/httpclient/MethodRetryHandler.class
+SHA1-Digest: lwmNO3TSgSBkYTxM3jlPyeUQ6IE=
+
+Name: org/apache/commons/httpclient/util/EncodingUtil.class
+SHA1-Digest: jtQapjwd8iiotd9ZfX9iCXQSI24=
+
+Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
+ tory$SocketTask.class
+SHA1-Digest: fYx3FiKV3NjWOKQ2vK+hWFf/E64=
+
+Name: org/apache/commons/httpclient/params/DefaultHttpParamsFactory.cl
+ ass
+SHA1-Digest: 46RMC9DLGEuVUCX0hm7eVLN1kwc=
+
+Name: org/apache/commons/httpclient/methods/multipart/MultipartRequest
+ Entity.class
+SHA1-Digest: 7hhbGYES5CNwNRPUh0UCvRDHQ58=
+
+Name: org/apache/commons/httpclient/methods/StringRequestEntity.class
+SHA1-Digest: eYz1Exh5nrMwkDOFXL8tQHELg7w=
+
+Name: org/apache/commons/httpclient/NoHttpResponseException.class
+SHA1-Digest: 68FfPfHeFKNfFaFlAVQJrBcepFc=
+
+Name: org/apache/commons/httpclient/cookie/CookieVersionSupport.class
+SHA1-Digest: cNb2B9LiK+kez2gQaY/V4Dbl3w8=
+
+Name: org/apache/commons/httpclient/HttpMethod.class
+SHA1-Digest: R3eTaxAjjvOG5KJTLlV/tm+rd5s=
+
+Name: org/apache/commons/httpclient/methods/TraceMethod.class
+SHA1-Digest: shrN5SLuo11/f5DAY7/oJXT2Dlk=
+
+Name: org/apache/commons/httpclient/cookie/CookiePathComparator.class
+SHA1-Digest: ZLSaZYd1MyzClrehA+xx5OAkMgs=
+
+Name: org/apache/commons/httpclient/ConnectMethod.class
+SHA1-Digest: H2uv0hPLDYgEv3Xso6KNVw2cSnA=
+
+Name: org/apache/commons/httpclient/methods/multipart/FilePart.class
+SHA1-Digest: 0fEhjwhgukDxEvkC1cQ60mLc9Zk=
+
+Name: org/apache/commons/httpclient/methods/EntityEnclosingMethod.clas
+ s
+SHA1-Digest: 8BBmStAGNnnp0DgCTs3lXFnZJM4=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: YSrWUKMomQCHlZQWp+L9Fgsdrqk=
+
+Name: org/apache/commons/httpclient/HostConfiguration.class
+SHA1-Digest: Lp4IZhsO+5v3slBHQ4e1xsqctQQ=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $ReferenceQueueThread.class
+SHA1-Digest: XS3RidBEW5QfERue78kfi90MUzg=
+
+Name: org/apache/commons/httpclient/auth/AuthScheme.class
+SHA1-Digest: 7O0U+B4VYLF4yw7whuu+QhbVQ0Q=
+
+Name: org/apache/commons/httpclient/protocol/DefaultProtocolSocketFact
+ ory.class
+SHA1-Digest: pCMNDCSYBUD1XDTVwT6fHlrg3Vo=
+
+Name: org/apache/commons/httpclient/SimpleHttpConnectionManager.class
+SHA1-Digest: pZBoheTMh40ed5y/VoYMXiV2jkE=
+
+Name: org/apache/commons/httpclient/cookie/CookieOrigin.class
+SHA1-Digest: qoAwz+8hkwrOslPZ4h8oJVAnYb4=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2MaxageAt
+ tributeHandler.class
+SHA1-Digest: JFyn9KGk6T1GVlwd3JwoO8B51yI=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $WaitingThread.class
+SHA1-Digest: 4OpOABRT5v1w9quC/wgukRhKz1o=
+
+Name: org/apache/commons/httpclient/ProxyHost.class
+SHA1-Digest: VExm1spKfNKZtqmHj8e1k1KcAqc=
+
+Name: org/apache/commons/httpclient/HttpRecoverableException.class
+SHA1-Digest: cIcalBmR7lJRNL27xtXBynu5Q2U=
+
+Name: org/apache/commons/httpclient/util/ParameterParser.class
+SHA1-Digest: xmTAfMmYV5Bh0oJhC7jgX7hlFIA=
+
+Name: org/apache/commons/httpclient/URI$LocaleToCharsetMap.class
+SHA1-Digest: i/wGKnjJCZyqdYx/1wcYk1lvrqQ=
+
+Name: org/apache/commons/httpclient/methods/HeadMethod.class
+SHA1-Digest: jmxpPCYu+A3W2RcMnM+yqmtVGTY=
+
+Name: org/apache/commons/httpclient/Credentials.class
+SHA1-Digest: 61bWWbjIPuIr8MqYVWhdmpoZYZ4=
+
+Name: org/apache/commons/httpclient/auth/MalformedChallengeException.c
+ lass
+SHA1-Digest: ZrjesARvKh5rLHb9GHSfIr2wZw0=
+
+Name: org/apache/commons/httpclient/methods/multipart/ByteArrayPartSou
+ rce.class
+SHA1-Digest: QGqR1c41IDMj1H8RNMgh8WL2CH8=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2PathAttr
+ ibuteHandler.class
+SHA1-Digest: VcnOFcArvFNSvb/BgDxtfF4OwGo=
+
+Name: org/apache/commons/httpclient/WireLogOutputStream.class
+SHA1-Digest: JqsOymVvW/kRFDoFlpeW/lxV6nE=
+
+Name: org/apache/commons/httpclient/auth/AuthState.class
+SHA1-Digest: lY36L7bego6QLewxL93nE1A3bJ8=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$CookieCommentUr
+ lAttributeHandler.class
+SHA1-Digest: BfVpGKfYF2JANl8YAo8AayaQeU4=
+
+Name: about.html
+SHA1-Digest: 81B4LsrnAS8gv/nojW9sAPUekYA=
+
+Name: org/apache/commons/httpclient/cookie/CookiePolicy.class
+SHA1-Digest: jdplyN7/WVhHgICETBTdwzqgkHg=
+
+Name: org/apache/commons/httpclient/methods/multipart/PartBase.class
+SHA1-Digest: ZZORnzrMImYDw9nw6N+TF2k9rn8=
+
+Name: org/apache/commons/httpclient/Cookie.class
+SHA1-Digest: 73kuBw2j0c8mEkfn+f/jHQd2IiI=
+
+Name: org/apache/commons/httpclient/InvalidRedirectLocationException.c
+ lass
+SHA1-Digest: p5xeNdT9h0OxoUg5B2K7Gt9T4ZE=
+
+Name: org/apache/commons/httpclient/HttpURL.class
+SHA1-Digest: Yl8fsxgMiYUmPqrEMcs2b52RCyA=
+
+Name: org/apache/commons/httpclient/HttpMethodRetryHandler.class
+SHA1-Digest: JJDNuLjnUIY8Db7JYDQ4q5Q/320=
+
+Name: org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.clas
+ s
+SHA1-Digest: vFQBBVRqMPSTD3PDSYQFVnKqKaI=
+
+Name: org/apache/commons/httpclient/ChunkedOutputStream.class
+SHA1-Digest: redzXbKEF2JcxjLWIWxMuC/2Qxc=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $1.class
+SHA1-Digest: /eRmLFDXNeEAPb9/YDfmAG7/VG0=
+
+Name: org/apache/commons/httpclient/ProxyClient$DummyConnectionManager
+ .class
+SHA1-Digest: MgjQJgwCDgfkbW78+sXI6IbTy20=
+
+Name: org/apache/commons/httpclient/auth/DigestScheme.class
+SHA1-Digest: RKGrp7pbdjAz0kI8q6IZAZ69zL4=
+
+Name: org/apache/commons/httpclient/params/HttpParamsFactory.class
+SHA1-Digest: 2u7xGjGpikQlpZdnwpXxak2MP+8=
+
+Name: org/apache/commons/httpclient/auth/AuthChallengeParser.class
+SHA1-Digest: CbRVLjiJPDIrG6yWiYTNzWi+7/g=
+
+Name: org/apache/commons/httpclient/protocol/ReflectionSocketFactory.c
+ lass
+SHA1-Digest: etFv80ERsAh60++SvHnos7A9RPY=
+
+Name: org/apache/commons/httpclient/params/HttpConnectionParams.class
+SHA1-Digest: ih57V7GDfsl0vE7Icj42yLUbfpY=
+
+Name: org/apache/commons/httpclient/HttpClientError.class
+SHA1-Digest: 7nkJlPNK+8ksL0FVuQAF9hCgcmo=
+
+Name: org/apache/commons/httpclient/HttpContentTooLargeException.class
+SHA1-Digest: j2ykUVQlTl90R5Bf+ddcieiT82M=
+
+Name: org/apache/commons/httpclient/auth/RFC2617Scheme.class
+SHA1-Digest: WDJCLcx80fBb3wyFIWxqX85Ji9Q=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2VersionA
+ ttributeHandler.class
+SHA1-Digest: flPeLYzNa9Y+ke1Y9qZJBjrZgA8=
+
+Name: org/apache/commons/httpclient/HttpMethodBase.class
+SHA1-Digest: Be5Icj+zO9CU9/UTUjsLvAJKz1I=
+
+Name: org/apache/commons/httpclient/ProxyClient.class
+SHA1-Digest: tWyI7oOpPCgtOBw8sMB1hS+pYbs=
+
+Name: org/apache/commons/httpclient/ChunkedInputStream.class
+SHA1-Digest: r46JNhT2Smpi0sz7RgbWHbDn+0M=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $HostConnectionPool.class
+SHA1-Digest: eoBHP15bbfDJSm8V8iFu4rk0Wow=
+
+Name: org/apache/commons/httpclient/Wire.class
+SHA1-Digest: lTwoUBuDq2QmKjkTjSFK/kIlreE=
+
+Name: org/apache/commons/httpclient/params/DefaultHttpParams.class
+SHA1-Digest: IXy540IoaOCAQ9C7wQQoN5wCO8U=
+
+Name: org/apache/commons/httpclient/protocol/ControllerThreadSocketFac
+ tory$1.class
+SHA1-Digest: 6YMNn/1PUFqsSyFlXgGDJERPsjk=
+
+Name: org/apache/commons/httpclient/HttpException.class
+SHA1-Digest: VyuEjuKncmBIXj2GoooK/zx8er4=
+
+Name: org/apache/commons/httpclient/HttpConstants.class
+SHA1-Digest: eTSzIzmBpxV/DPLWuL9t7LzOSn4=
+
+Name: org/apache/commons/httpclient/util/IdleConnectionTimeoutThread.c
+ lass
+SHA1-Digest: 6bIWr60DDKHhx323Q58XT8PLrTE=
+
+Name: org/apache/commons/httpclient/auth/BasicScheme.class
+SHA1-Digest: VZ2UEgGkvCOw/P/P2jM8b5b+wQc=
+
+Name: org/apache/commons/httpclient/HttpHost.class
+SHA1-Digest: xJrNJPpMsjUMAu6jcONPc+KS02M=
+
+Name: org/apache/commons/httpclient/HeaderElement.class
+SHA1-Digest: ZQp3reakv7kMPG0m02xW8fCpJF4=
+
+Name: org/apache/commons/httpclient/HttpVersion.class
+SHA1-Digest: Fd1ip6t30zxGtWbinsWXFgPA3Ng=
+
+Name: org/apache/commons/httpclient/CircularRedirectException.class
+SHA1-Digest: MGK6J0y5XHAVHUxooNJipyTa57g=
+
+Name: org/apache/commons/httpclient/HttpStatus.class
+SHA1-Digest: OqGd2T52pdVtuMhWoPLCnX5ASq8=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/apache/commons/httpclient/auth/AuthChallengeException.class
+SHA1-Digest: /LER1uwsk0gU+6lRl3SRpwweP+I=
+
+Name: org/apache/commons/httpclient/methods/ExpectContinueMethod.class
+SHA1-Digest: Somz8+YRIf0ErsT8bcQuaT62baQ=
+
+Name: org/apache/commons/httpclient/auth/AuthChallengeProcessor.class
+SHA1-Digest: c7xZLOXrHvpylvY/OBOC1bdfMQY=
+
+Name: org/apache/commons/httpclient/AutoCloseInputStream.class
+SHA1-Digest: q4RRQKm+J5yBVF6qKvhIi2EW5ig=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ .class
+SHA1-Digest: vRGshiG9ZC7/gIOYEJ1ihr14ebc=
+
+Name: org/apache/commons/httpclient/auth/CredentialsProvider.class
+SHA1-Digest: 1zGiE0KcrmIQ5wXN8Wf39gJTYP0=
+
+Name: org/apache/commons/httpclient/methods/DeleteMethod.class
+SHA1-Digest: RJH1FMWuVuhGTKk9h4Nbpn7k9V0=
+
+Name: org/apache/commons/httpclient/ContentLengthInputStream.class
+SHA1-Digest: sMqxHAqtWZI8TVNEWYdmqDXRSQA=
+
+Name: org/apache/commons/httpclient/protocol/SSLProtocolSocketFactory.
+ class
+SHA1-Digest: kpdyPOPV7pJkky+a6J2JHOiytJM=
+
+Name: org/apache/commons/httpclient/methods/multipart/PartSource.class
+SHA1-Digest: jGln/FX0GAdnnsys2euqTuDbP2M=
+
+Name: org/apache/commons/httpclient/HttpClient.class
+SHA1-Digest: 5z0toeWVnbpnLtHTGWPWQTnAeDE=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $ConnectionPool.class
+SHA1-Digest: LzBN3hdgG81VZcvNaLH5JS304qo=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$Cookie2PortAttr
+ ibuteHandler.class
+SHA1-Digest: rWZiikRkb0h9R65v8Mc8oiwWm0M=
+
+Name: org/apache/commons/httpclient/NameValuePair.class
+SHA1-Digest: 7u1eVUyuFFzR2MhQsCEjkCJIpyY=
+
+Name: org/apache/commons/httpclient/ProxyClient$ConnectResponse.class
+SHA1-Digest: KKZ2rGp48e2Oqn3oCr14RDrQdHs=
+
+Name: org/apache/commons/httpclient/URIException.class
+SHA1-Digest: utVkCQL1Kz5lBpBodSbdRybrsZk=
+
+Name: org/apache/commons/httpclient/util/TimeoutController$TimeoutExce
+ ption.class
+SHA1-Digest: J57RCG+B9/6jFOI6HlO8lRnSxGM=
+
+Name: org/apache/commons/httpclient/HttpsURL.class
+SHA1-Digest: yl4mq2XxFuDYTFNnLkC0ChC9iHk=
+
+Name: plugin.properties
+SHA1-Digest: c71LL539Is/0vMwn+1EEc3AysVs=
+
+Name: org/apache/commons/httpclient/methods/InputStreamRequestEntity.c
+ lass
+SHA1-Digest: 3JoEGzvxYfh9yYny5SkW+iIN/rk=
+
+Name: org/apache/commons/httpclient/DefaultMethodRetryHandler.class
+SHA1-Digest: mdl5VSbRxzTMnmbeZpnr/usCpAM=
+
+Name: org/apache/commons/httpclient/cookie/NetscapeDraftSpec.class
+SHA1-Digest: FPRiDsHfbyX9j7hu4p0BioUm7eo=
+
+Name: org/apache/commons/httpclient/ProxyClient$1.class
+SHA1-Digest: m/id1SY9mECjQ/JzNgegQcEFrC8=
+
+Name: org/apache/commons/httpclient/methods/multipart/FilePartSource.c
+ lass
+SHA1-Digest: ZiwTc4ME4VDopnaTbcAafvJLtp4=
+
+Name: org/apache/commons/httpclient/util/IdleConnectionHandler.class
+SHA1-Digest: En7LN+ky/haGxbNEzVKEaakvN0I=
+
+Name: org/apache/commons/httpclient/HttpState.class
+SHA1-Digest: 31/wG6K9RFWzhszxZo/31YZOX60=
+
+Name: org/apache/commons/httpclient/Header.class
+SHA1-Digest: 95NNazEW75vhEzmkICD/Uolzd+4=
+
+Name: org/apache/commons/httpclient/UsernamePasswordCredentials.class
+SHA1-Digest: TlPa0rulzadghK5nN0CANOHZFL0=
+
+Name: org/apache/commons/httpclient/URI.class
+SHA1-Digest: KEuzWRxwJnCpUu/ViLJt0eSJztM=
+
+Name: org/apache/commons/httpclient/util/TimeoutController.class
+SHA1-Digest: WZT9bmcEmdAH9W6gs8of9cue/8w=
+
+Name: org/apache/commons/httpclient/auth/AuthenticationException.class
+SHA1-Digest: re/5467dBY73EL9B1vQs1R5xdi8=
+
+Name: org/apache/commons/httpclient/protocol/Protocol.class
+SHA1-Digest: 6uTzccmhns8AMcW/rqM08LB9wJg=
+
+Name: org/apache/commons/httpclient/HeaderGroup.class
+SHA1-Digest: Rekrq+rInHXOO00YDlqed7Qbos0=
+
+Name: org/apache/commons/httpclient/ResponseConsumedWatcher.class
+SHA1-Digest: l45UnEsj6FFG5Q9thfaGZA4cOUM=
+
+Name: org/apache/commons/httpclient/auth/NTLMScheme.class
+SHA1-Digest: QCfRHNQ1ugLcKYvWIOx1SofHaOw=
+
+Name: org/apache/commons/httpclient/util/LangUtils.class
+SHA1-Digest: 4xl0SC1PgFkH5vqR5BhXXuhakmU=
+
+Name: org/apache/commons/httpclient/ConnectTimeoutException.class
+SHA1-Digest: xZYvEhOGpF/RJEyIvH4c2AK+uds=
+
+Name: org/apache/commons/httpclient/methods/GetMethod.class
+SHA1-Digest: HM+zYksFlqaAlUsv9prKQEnZvC0=
+
+Name: org/apache/commons/httpclient/cookie/CookieSpecBase.class
+SHA1-Digest: UL154mUBP2sH5wgZgFHoddFZKPU=
+
+Name: org/apache/commons/httpclient/util/DateUtil.class
+SHA1-Digest: tMdK+ZwmAoXFM3/hqWFe5wLFifc=
+
+Name: org/apache/commons/httpclient/MultiThreadedHttpConnectionManager
+ $HttpConnectionWithReference.class
+SHA1-Digest: jShe9cWyFMnksi/modf4xPltFNQ=
+
+Name: org/apache/commons/httpclient/util/URIUtil$Coder.class
+SHA1-Digest: dW8QbtFItPsmc+18mxjYtr0m734=
+
+Name: org/apache/commons/httpclient/util/ExceptionUtil.class
+SHA1-Digest: U+VIh2cqmO0m7Ms43+BoUxQyae4=
+
+Name: org/apache/commons/httpclient/params/HttpConnectionManagerParams
+ .class
+SHA1-Digest: ZKqDTU2B0C2BUIkqUJflHgMy87M=
+
+Name: org/apache/commons/httpclient/params/HttpClientParams.class
+SHA1-Digest: EfNdnfaevrv0NoT4mAJJ3eDfz4o=
+
+Name: org/apache/commons/httpclient/methods/multipart/StringPart.class
+SHA1-Digest: mXG8VVvsOMLkQzDaDIwJlinL5ec=
+
+Name: org/apache/commons/httpclient/auth/HttpAuthenticator.class
+SHA1-Digest: 16hu28gqgS10acWqISP2kBG2IBA=
+
+Name: org/apache/commons/httpclient/auth/AuthScope.class
+SHA1-Digest: gQ77L3NdDa1SWCyNS1SAdnQZ4+A=
+
+Name: org/apache/commons/httpclient/cookie/RFC2109Spec.class
+SHA1-Digest: QblMUFcAJboAOIhcaZGfmroJMGs=
+
+Name: org/apache/commons/httpclient/protocol/ProtocolSocketFactory.cla
+ ss
+SHA1-Digest: 1VpnixH6x64r+GTp6DgBwoFrO9I=
+
+Name: org/apache/commons/httpclient/util/ParameterFormatter.class
+SHA1-Digest: MYU9Z6oyj7l/KGH7/RR+n0Y7nqI=
+
+Name: org/apache/commons/httpclient/protocol/SecureProtocolSocketFacto
+ ry.class
+SHA1-Digest: 0GIhQLSmAURMizHQKhvpzz67OYM=
+
+Name: org/apache/commons/httpclient/methods/MultipartPostMethod.class
+SHA1-Digest: 1KLLLaQ5dTnYU9k2CQ0DpdWyEIY=
+
+Name: org/apache/commons/httpclient/cookie/RFC2965Spec$1.class
+SHA1-Digest: 4SbL6fMCs5vy1n6US6CImHZovYo=
+
+Name: org/apache/commons/httpclient/URI$DefaultCharsetChanged.class
+SHA1-Digest: H9SQF8D/uqp8n0dh6NRgQ+Rpwls=
+
+Name: org/apache/commons/httpclient/HttpMethodDirector.class
+SHA1-Digest: 3pn5QSLxTBNu5IN6wSyG4cHhI2U=
+
diff --git a/dependencyManifests/org.apache.commons.logging_1.0.4.v200904062259.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.logging_1.0.4.v200904062259.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index 2757d1b..0000000
--- a/dependencyManifests/org.apache.commons.logging_1.0.4.v200904062259.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,86 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %bundleProvider
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.apache.commons.logging
-Export-Package: org.apache.commons.logging;version="1.0.4",org.apache.
- commons.logging.impl;version="1.0.4"
-Bundle-Version: 1.0.4.v200904062259
-Bundle-ManifestVersion: 2
-
-Name: org/apache/commons/logging/package.html
-SHA1-Digest: jsD27d4EQN9p+MEqH9rxe+TqY6k=
-
-Name: org/apache/commons/logging/LogFactory$1.class
-SHA1-Digest: whsbEKcn7vZ+LwmHJKw87HJFY0Y=
-
-Name: org/apache/commons/logging/impl/NoOpLog.class
-SHA1-Digest: 7muE+A0Hp5h9Ldjb3A17zUL+DcI=
-
-Name: org/apache/commons/logging/LogFactory$2.class
-SHA1-Digest: XhxoQexG77inagakRQpY47nf2Hw=
-
-Name: org/apache/commons/logging/LogFactory$3.class
-SHA1-Digest: cP92Yy4h/3//T+eQKhYs4o+/kxA=
-
-Name: org/apache/commons/logging/impl/LogKitLogger.class
-SHA1-Digest: JgEBM/Zjn++pJ3QCDczXs8t1uCM=
-
-Name: plugin.properties
-SHA1-Digest: eJc0Xfim3ircNl67Q4hNcRBHZ4A=
-
-Name: org/apache/commons/logging/impl/LogFactoryImpl.class
-SHA1-Digest: L9ELLQHx5ta6lwQNphKvXoMlDHE=
-
-Name: org/apache/commons/logging/impl/package.html
-SHA1-Digest: ETgtEWz0bVC946lreSXMDxD/W/M=
-
-Name: org/apache/commons/logging/impl/Log4JCategoryLog.class
-SHA1-Digest: dyjRTsIYBaFNOMWnkoM9H1vtbXI=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: org/apache/commons/logging/impl/SimpleLog.class
-SHA1-Digest: zJhWPvXEZO1vevxyXNhCOy6cz8A=
-
-Name: org/apache/commons/logging/impl/AvalonLogger.class
-SHA1-Digest: nKHbAlItxYHJfrTWYkuuygYlrBs=
-
-Name: org/apache/commons/logging/LogSource.class
-SHA1-Digest: Z9b0alPnXvv2DwtG48Rf5+WEwA8=
-
-Name: org/apache/commons/logging/impl/Log4jFactory.class
-SHA1-Digest: yy8M0J5SMcx9NBTEzXk+aftfq3M=
-
-Name: org/apache/commons/logging/impl/LogFactoryImpl$1.class
-SHA1-Digest: FFwXrpZdN6g84E23AGrHbw7ZG7g=
-
-Name: org/apache/commons/logging/Log.class
-SHA1-Digest: nrLaPNgvcs4drS/+jOOCSUhxDYw=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: about_files/NOTICE.txt
-SHA1-Digest: BZ6V8A2KQoLkbfaPI0+XTqMx4MM=
-
-Name: org/apache/commons/logging/impl/SimpleLog$1.class
-SHA1-Digest: ObQShIwqwR5yN6YOSoB1mHZ/yQE=
-
-Name: org/apache/commons/logging/impl/Jdk14Logger.class
-SHA1-Digest: YJYHNRBcu9a9Yn34fN7zno3JKfc=
-
-Name: about.html
-SHA1-Digest: t52DM/J1zwDrpXQH8P8uu5iW66c=
-
-Name: org/apache/commons/logging/impl/Log4JLogger.class
-SHA1-Digest: byCy5cx2pB4Q5vIPEs3vyhx/W/w=
-
-Name: org/apache/commons/logging/LogConfigurationException.class
-SHA1-Digest: zFgkyDpbQCooU2Hk4XaYIe9gdSo=
-
-Name: org/apache/commons/logging/LogFactory.class
-SHA1-Digest: 9VDDUlKvp2ogMQxPqj/IuTZxuyA=
-
diff --git a/dependencyManifests/org.apache.commons.logging_1.0.4.v201005080501.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.commons.logging_1.0.4.v201005080501.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..4f4290f
--- /dev/null
+++ b/dependencyManifests/org.apache.commons.logging_1.0.4.v201005080501.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,86 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %bundleProvider
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.apache.commons.logging
+Export-Package: org.apache.commons.logging;version="1.0.4",org.apache.
+ commons.logging.impl;version="1.0.4"
+Bundle-Version: 1.0.4.v201005080501
+Bundle-ManifestVersion: 2
+
+Name: org/apache/commons/logging/package.html
+SHA1-Digest: jsD27d4EQN9p+MEqH9rxe+TqY6k=
+
+Name: org/apache/commons/logging/LogFactory$1.class
+SHA1-Digest: whsbEKcn7vZ+LwmHJKw87HJFY0Y=
+
+Name: org/apache/commons/logging/impl/NoOpLog.class
+SHA1-Digest: 7muE+A0Hp5h9Ldjb3A17zUL+DcI=
+
+Name: org/apache/commons/logging/LogFactory$2.class
+SHA1-Digest: XhxoQexG77inagakRQpY47nf2Hw=
+
+Name: org/apache/commons/logging/LogFactory$3.class
+SHA1-Digest: cP92Yy4h/3//T+eQKhYs4o+/kxA=
+
+Name: org/apache/commons/logging/impl/LogKitLogger.class
+SHA1-Digest: JgEBM/Zjn++pJ3QCDczXs8t1uCM=
+
+Name: plugin.properties
+SHA1-Digest: MvpejpigNq4m1El2Z+t2IL06PUk=
+
+Name: org/apache/commons/logging/impl/LogFactoryImpl.class
+SHA1-Digest: L9ELLQHx5ta6lwQNphKvXoMlDHE=
+
+Name: org/apache/commons/logging/impl/package.html
+SHA1-Digest: ETgtEWz0bVC946lreSXMDxD/W/M=
+
+Name: org/apache/commons/logging/impl/Log4JCategoryLog.class
+SHA1-Digest: dyjRTsIYBaFNOMWnkoM9H1vtbXI=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: org/apache/commons/logging/impl/SimpleLog.class
+SHA1-Digest: zJhWPvXEZO1vevxyXNhCOy6cz8A=
+
+Name: org/apache/commons/logging/impl/AvalonLogger.class
+SHA1-Digest: nKHbAlItxYHJfrTWYkuuygYlrBs=
+
+Name: org/apache/commons/logging/LogSource.class
+SHA1-Digest: Z9b0alPnXvv2DwtG48Rf5+WEwA8=
+
+Name: org/apache/commons/logging/impl/Log4jFactory.class
+SHA1-Digest: yy8M0J5SMcx9NBTEzXk+aftfq3M=
+
+Name: org/apache/commons/logging/impl/LogFactoryImpl$1.class
+SHA1-Digest: FFwXrpZdN6g84E23AGrHbw7ZG7g=
+
+Name: org/apache/commons/logging/Log.class
+SHA1-Digest: nrLaPNgvcs4drS/+jOOCSUhxDYw=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: about_files/NOTICE.txt
+SHA1-Digest: BZ6V8A2KQoLkbfaPI0+XTqMx4MM=
+
+Name: org/apache/commons/logging/impl/SimpleLog$1.class
+SHA1-Digest: ObQShIwqwR5yN6YOSoB1mHZ/yQE=
+
+Name: org/apache/commons/logging/impl/Jdk14Logger.class
+SHA1-Digest: YJYHNRBcu9a9Yn34fN7zno3JKfc=
+
+Name: about.html
+SHA1-Digest: t52DM/J1zwDrpXQH8P8uu5iW66c=
+
+Name: org/apache/commons/logging/impl/Log4JLogger.class
+SHA1-Digest: byCy5cx2pB4Q5vIPEs3vyhx/W/w=
+
+Name: org/apache/commons/logging/LogConfigurationException.class
+SHA1-Digest: zFgkyDpbQCooU2Hk4XaYIe9gdSo=
+
+Name: org/apache/commons/logging/LogFactory.class
+SHA1-Digest: 9VDDUlKvp2ogMQxPqj/IuTZxuyA=
+
diff --git a/dependencyManifests/org.apache.jasper_5.5.17.v200903231320.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.jasper_5.5.17.v200903231320.jar/META-INF/MANIFEST.MF
index c7a86a3..902f800 100644
--- a/dependencyManifests/org.apache.jasper_5.5.17.v200903231320.jar/META-INF/MANIFEST.MF
+++ b/dependencyManifests/org.apache.jasper_5.5.17.v200903231320.jar/META-INF/MANIFEST.MF
@@ -6,23 +6,26 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.4,CDC-1.0/Foundation-1.0,J
  2SE-1.3
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.apache.jasper
-Export-Package: org.apache.jasper,org.apache.jasper.compiler,org.apach
- e.jasper.compiler.tagplugin,org.apache.jasper.resources,org.apache.ja
- sper.runtime,org.apache.jasper.security,org.apache.jasper.servlet,org
- .apache.jasper.tagplugins.jstl,org.apache.jasper.tagplugins.jstl.core
- ,org.apache.jasper.util,org.apache.jasper.xmlparser
-Bundle-Version: 5.5.17.v200903231320
+Export-Package: org.apache.jasper;version="5.5.17",org.apache.jasper.c
+ ompiler;version="5.5.17",org.apache.jasper.compiler.tagplugin;version
+ ="5.5.17",org.apache.jasper.resources;version="5.5.17",org.apache.jas
+ per.runtime;version="5.5.17",org.apache.jasper.security;version="5.5.
+ 17",org.apache.jasper.servlet;version="5.5.17",org.apache.jasper.tagp
+ lugins.jstl;version="5.5.17",org.apache.jasper.tagplugins.jstl.core;v
+ ersion="5.5.17",org.apache.jasper.util;version="5.5.17",org.apache.ja
+ sper.xmlparser;version="5.5.17"
+Bundle-Version: 5.5.17.v201004212143
 Bundle-ManifestVersion: 2
-Import-Package: javax.servlet;version="2.4",javax.servlet.http;version
- ="2.4",javax.servlet.jsp;version="2.0",javax.servlet.jsp.el;version="
- 2.0",javax.servlet.jsp.resources;version="2.0",javax.servlet.jsp.tage
- xt;version="2.0",javax.servlet.resources;version="2.4",javax.xml.pars
- ers,org.apache.commons.el;version="[1.0.0,2.0.0)",org.apache.commons.
- logging;version="[1.0.0,2.0.0)",org.apache.tools.ant;resolution:=opti
- onal,org.apache.tools.ant.taskdefs;resolution:=optional,org.apache.to
- ols.ant.types;resolution:=optional,org.apache.tools.ant.util;resoluti
- on:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.ext,org.xml.sax.help
- ers
+Import-Package: javax.servlet;version="[2.4, 3.0)",javax.servlet.http;
+ version="[2.4, 3.0)",javax.servlet.jsp;version="[2.0, 2.1)",javax.ser
+ vlet.jsp.el;version="[2.0, 2.1)",javax.servlet.jsp.resources;version=
+ "[2.0, 2.1)",javax.servlet.jsp.tagext;version="[2.0, 2.1)",javax.serv
+ let.resources;version="[2.4, 3.0)",javax.xml.parsers,org.apache.commo
+ ns.el;version="[1.0.0,2.0.0)",org.apache.commons.logging;version="[1.
+ 0.0,2.0.0)",org.apache.tools.ant;resolution:=optional,org.apache.tool
+ s.ant.taskdefs;resolution:=optional,org.apache.tools.ant.types;resolu
+ tion:=optional,org.apache.tools.ant.util;resolution:=optional,org.w3c
+ .dom,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
 
 Name: org/eclipse/jdt/internal/compiler/ast/Reference.class
 SHA1-Digest: nXdqXTJDnncze18Rj41PmY2rKDM=
diff --git a/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index fa6460e..0000000
--- a/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,111 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.apache.lucene.analysis
-Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visib
- ility:=reexport
-Export-Package: org.apache.lucene.analysis.br,org.apache.lucene.analys
- is.cjk,org.apache.lucene.analysis.cn,org.apache.lucene.analysis.cz,or
- g.apache.lucene.analysis.de,org.apache.lucene.analysis.el,org.apache.
- lucene.analysis.fr,org.apache.lucene.analysis.nl,org.apache.lucene.an
- alysis.ru
-Bundle-Version: 1.9.1.v20080530-1600
-Bundle-ManifestVersion: 2
-
-Name: org/apache/lucene/analysis/de/GermanStemmer.class
-SHA1-Digest: ptBFhWqh4Jodi0WL7cvcHf+gqg0=
-
-Name: org/apache/lucene/analysis/fr/FrenchStemFilter.class
-SHA1-Digest: oJgrpubIKl6KO78NKNmR2Uxn/Tw=
-
-Name: org/apache/lucene/analysis/cjk/CJKAnalyzer.class
-SHA1-Digest: cZLarbfuVj5fFLiVIFJ5/zEnrHc=
-
-Name: plugin.properties
-SHA1-Digest: 5Uk2UWIkoUduQ0MzpBPlc7yxZ/E=
-
-Name: org/apache/lucene/analysis/ru/RussianStemFilter.class
-SHA1-Digest: XH17jc0ZSkA7sGsQ4fkCEfjWcEY=
-
-Name: org/apache/lucene/analysis/fr/FrenchAnalyzer.class
-SHA1-Digest: lh3UVyTKYGQXRQYg2et8QYJCwl8=
-
-Name: org/apache/lucene/analysis/ru/RussianAnalyzer.class
-SHA1-Digest: ENqDGbUqFOGnyiWtRbo/qZdx3I8=
-
-Name: org/apache/lucene/analysis/ru/RussianCharsets.class
-SHA1-Digest: d6+ABztO/n24mFIvpQj5rhFCNXE=
-
-Name: org/apache/lucene/analysis/br/BrazilianStemmer.class
-SHA1-Digest: dnN9Z2ziWywplrbDAiWLnTM7bFA=
-
-Name: org/apache/lucene/analysis/cn/ChineseAnalyzer.class
-SHA1-Digest: HXr1adnRJCVPIUBqY4/8qyMZ3BE=
-
-Name: org/apache/lucene/analysis/ru/RussianLetterTokenizer.class
-SHA1-Digest: /jA513fmbCxx0ZJ+bgOrTuJ1pQc=
-
-Name: about_files/asl-v20.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: org/apache/lucene/analysis/nl/WordlistLoader.class
-SHA1-Digest: JJlnPmIXmcCGlubr3x30DRAVVUM=
-
-Name: org/apache/lucene/analysis/cn/ChineseTokenizer.class
-SHA1-Digest: 3BZaKVGa4mY4fVTzkEdcRFxFkZE=
-
-Name: org/apache/lucene/analysis/nl/DutchStemFilter.class
-SHA1-Digest: 2R8MjLYtGSRIZvArk+DRnZyiKog=
-
-Name: org/apache/lucene/analysis/de/GermanStemFilter.class
-SHA1-Digest: 31FkswsN6rEUF8UdnfTJ1f2yLKI=
-
-Name: org/apache/lucene/analysis/nl/DutchAnalyzer.class
-SHA1-Digest: QoYJvdmTFCaVhK1TOpOtlzEyQB4=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/apache/lucene/analysis/cjk/CJKTokenizer.class
-SHA1-Digest: 3hykOUinkCYzhl6qAvrriUdHp6k=
-
-Name: org/apache/lucene/analysis/el/GreekAnalyzer.class
-SHA1-Digest: J/5GtD7Iw9xW1ehdZath/nPdq+M=
-
-Name: org/apache/lucene/analysis/el/GreekCharsets.class
-SHA1-Digest: 27NfiUKlK8EG53cXiX8dXDoayvI=
-
-Name: org/apache/lucene/analysis/cz/CzechAnalyzer.class
-SHA1-Digest: xQEEXYR6PzPb4/EU0uNj/7tcgvA=
-
-Name: org/apache/lucene/analysis/cn/ChineseFilter.class
-SHA1-Digest: EN1IENyubAQsCv/lqFWSRxJEm2k=
-
-Name: org/apache/lucene/analysis/de/GermanAnalyzer.class
-SHA1-Digest: PgbAbqwnxNURMLJFk9eFiqXzYXM=
-
-Name: org/apache/lucene/analysis/nl/DutchStemmer.class
-SHA1-Digest: kzgHYabhNmHxYCcBtVXP24Che3Y=
-
-Name: about.html
-SHA1-Digest: Fq88jcaAsG48Z06Ru60Co9116aM=
-
-Name: org/apache/lucene/analysis/ru/RussianLowerCaseFilter.class
-SHA1-Digest: D1g5fHlksdj+sl+TeVsYOJ2fvwg=
-
-Name: org/apache/lucene/analysis/br/BrazilianStemFilter.class
-SHA1-Digest: ZbW+hV1dQ6owqowfCKOMJfU9oSM=
-
-Name: org/apache/lucene/analysis/br/BrazilianAnalyzer.class
-SHA1-Digest: 8Uwcd7gNQuNT8l3aIWPCRxhzbjQ=
-
-Name: org/apache/lucene/analysis/ru/RussianStemmer.class
-SHA1-Digest: RTaA5IcFEgMR/QJ3OGkWW58SjNE=
-
-Name: org/apache/lucene/analysis/fr/FrenchStemmer.class
-SHA1-Digest: zn2DJflYMf2jhP3i7+F2uN26i8A=
-
-Name: org/apache/lucene/analysis/el/GreekLowerCaseFilter.class
-SHA1-Digest: wQMLA/syAU5Q4LVMPkJFLvmCQvY=
-
diff --git a/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5257126
--- /dev/null
+++ b/dependencyManifests/org.apache.lucene.analysis_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,111 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.lucene.analysis
+Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visib
+ ility:=reexport
+Export-Package: org.apache.lucene.analysis.br,org.apache.lucene.analys
+ is.cjk,org.apache.lucene.analysis.cn,org.apache.lucene.analysis.cz,or
+ g.apache.lucene.analysis.de,org.apache.lucene.analysis.el,org.apache.
+ lucene.analysis.fr,org.apache.lucene.analysis.nl,org.apache.lucene.an
+ alysis.ru
+Bundle-Version: 1.9.1.v20100518-1140
+Bundle-ManifestVersion: 2
+
+Name: org/apache/lucene/analysis/de/GermanStemmer.class
+SHA1-Digest: ptBFhWqh4Jodi0WL7cvcHf+gqg0=
+
+Name: org/apache/lucene/analysis/fr/FrenchStemFilter.class
+SHA1-Digest: oJgrpubIKl6KO78NKNmR2Uxn/Tw=
+
+Name: org/apache/lucene/analysis/cjk/CJKAnalyzer.class
+SHA1-Digest: cZLarbfuVj5fFLiVIFJ5/zEnrHc=
+
+Name: plugin.properties
+SHA1-Digest: CAra4G4ycNGtrROzydO/KFuDwEo=
+
+Name: org/apache/lucene/analysis/ru/RussianStemFilter.class
+SHA1-Digest: XH17jc0ZSkA7sGsQ4fkCEfjWcEY=
+
+Name: org/apache/lucene/analysis/fr/FrenchAnalyzer.class
+SHA1-Digest: lh3UVyTKYGQXRQYg2et8QYJCwl8=
+
+Name: org/apache/lucene/analysis/ru/RussianAnalyzer.class
+SHA1-Digest: ENqDGbUqFOGnyiWtRbo/qZdx3I8=
+
+Name: org/apache/lucene/analysis/ru/RussianCharsets.class
+SHA1-Digest: d6+ABztO/n24mFIvpQj5rhFCNXE=
+
+Name: org/apache/lucene/analysis/br/BrazilianStemmer.class
+SHA1-Digest: dnN9Z2ziWywplrbDAiWLnTM7bFA=
+
+Name: org/apache/lucene/analysis/cn/ChineseAnalyzer.class
+SHA1-Digest: HXr1adnRJCVPIUBqY4/8qyMZ3BE=
+
+Name: org/apache/lucene/analysis/ru/RussianLetterTokenizer.class
+SHA1-Digest: /jA513fmbCxx0ZJ+bgOrTuJ1pQc=
+
+Name: about_files/asl-v20.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: org/apache/lucene/analysis/nl/WordlistLoader.class
+SHA1-Digest: JJlnPmIXmcCGlubr3x30DRAVVUM=
+
+Name: org/apache/lucene/analysis/cn/ChineseTokenizer.class
+SHA1-Digest: 3BZaKVGa4mY4fVTzkEdcRFxFkZE=
+
+Name: org/apache/lucene/analysis/nl/DutchStemFilter.class
+SHA1-Digest: 2R8MjLYtGSRIZvArk+DRnZyiKog=
+
+Name: org/apache/lucene/analysis/de/GermanStemFilter.class
+SHA1-Digest: 31FkswsN6rEUF8UdnfTJ1f2yLKI=
+
+Name: org/apache/lucene/analysis/nl/DutchAnalyzer.class
+SHA1-Digest: QoYJvdmTFCaVhK1TOpOtlzEyQB4=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/apache/lucene/analysis/cjk/CJKTokenizer.class
+SHA1-Digest: 3hykOUinkCYzhl6qAvrriUdHp6k=
+
+Name: org/apache/lucene/analysis/el/GreekAnalyzer.class
+SHA1-Digest: J/5GtD7Iw9xW1ehdZath/nPdq+M=
+
+Name: org/apache/lucene/analysis/el/GreekCharsets.class
+SHA1-Digest: 27NfiUKlK8EG53cXiX8dXDoayvI=
+
+Name: org/apache/lucene/analysis/cz/CzechAnalyzer.class
+SHA1-Digest: xQEEXYR6PzPb4/EU0uNj/7tcgvA=
+
+Name: org/apache/lucene/analysis/cn/ChineseFilter.class
+SHA1-Digest: EN1IENyubAQsCv/lqFWSRxJEm2k=
+
+Name: org/apache/lucene/analysis/de/GermanAnalyzer.class
+SHA1-Digest: PgbAbqwnxNURMLJFk9eFiqXzYXM=
+
+Name: org/apache/lucene/analysis/nl/DutchStemmer.class
+SHA1-Digest: kzgHYabhNmHxYCcBtVXP24Che3Y=
+
+Name: about.html
+SHA1-Digest: Fq88jcaAsG48Z06Ru60Co9116aM=
+
+Name: org/apache/lucene/analysis/ru/RussianLowerCaseFilter.class
+SHA1-Digest: D1g5fHlksdj+sl+TeVsYOJ2fvwg=
+
+Name: org/apache/lucene/analysis/br/BrazilianStemFilter.class
+SHA1-Digest: ZbW+hV1dQ6owqowfCKOMJfU9oSM=
+
+Name: org/apache/lucene/analysis/br/BrazilianAnalyzer.class
+SHA1-Digest: 8Uwcd7gNQuNT8l3aIWPCRxhzbjQ=
+
+Name: org/apache/lucene/analysis/ru/RussianStemmer.class
+SHA1-Digest: RTaA5IcFEgMR/QJ3OGkWW58SjNE=
+
+Name: org/apache/lucene/analysis/fr/FrenchStemmer.class
+SHA1-Digest: zn2DJflYMf2jhP3i7+F2uN26i8A=
+
+Name: org/apache/lucene/analysis/el/GreekLowerCaseFilter.class
+SHA1-Digest: wQMLA/syAU5Q4LVMPkJFLvmCQvY=
+
diff --git a/dependencyManifests/org.apache.lucene_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.lucene_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index b020825..0000000
--- a/dependencyManifests/org.apache.lucene_1.9.1.v20080530-1600.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,916 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.apache.lucene
-Export-Package: org.apache.lucene,org.apache.lucene.analysis,org.apach
- e.lucene.analysis.de,org.apache.lucene.analysis.standard,org.apache.l
- ucene.document,org.apache.lucene.index,org.apache.lucene.queryParser,
- org.apache.lucene.search,org.apache.lucene.search.spans,org.apache.lu
- cene.store,org.apache.lucene.util
-Bundle-Version: 1.9.1.v20080530-1600
-Bundle-ManifestVersion: 2
-
-Name: org/apache/lucene/search/ScoreDoc.class
-SHA1-Digest: 7bjm4VNJWLvCbvZrL09UCN6Vwkc=
-
-Name: org/apache/lucene/util/PriorityQueue.class
-SHA1-Digest: 6vsZ0ARE/duPH/LymakfXS0Hndc=
-
-Name: org/apache/lucene/document/Document.class
-SHA1-Digest: tgvlVvkhU3giFGk9aoe3uXO7E48=
-
-Name: org/apache/lucene/store/MMapDirectory.class
-SHA1-Digest: j+ABTcgB/j3xfXw8x3CRMvxY5Eo=
-
-Name: org/apache/lucene/index/MultiTermPositions.class
-SHA1-Digest: gVLesn6633CjgqAUiGQYKvBOCTI=
-
-Name: org/apache/lucene/store/Lock$With.class
-SHA1-Digest: fomd1EnFYlJBXNg8BBUOtcLUauY=
-
-Name: org/apache/lucene/search/ScoreDocComparator$2.class
-SHA1-Digest: +0g0LFX6KKJHzLTKm/MCu0yI7Uc=
-
-Name: org/apache/lucene/search/PhrasePrefixQuery$PhrasePrefixWeight.cl
- ass
-SHA1-Digest: sbmUoBqziG78KDK85MfAfPY2eMA=
-
-Name: org/apache/lucene/search/NonMatchingScorer.class
-SHA1-Digest: +boEsB5arDElY0qA8IpgVdJkh6E=
-
-Name: org/apache/lucene/index/FilterIndexReader$FilterTermDocs.class
-SHA1-Digest: mTbOob59dhq9knpcc5/5ysYvM9M=
-
-Name: org/apache/lucene/store/FSDirectory.class
-SHA1-Digest: JFiUh85BntOHvy3KC775KN8503c=
-
-Name: org/apache/lucene/index/CompoundFileWriter$1.class
-SHA1-Digest: /LT+jHUDDY1dj38fOrFbelj2ZrU=
-
-Name: org/apache/lucene/queryParser/QueryParserTokenManager.class
-SHA1-Digest: vs1zA825hUIJLbM5GgyUXLxVo7k=
-
-Name: org/apache/lucene/search/QueryFilter$1.class
-SHA1-Digest: J44IDJigW5BQX1PypLEj3i/1a84=
-
-Name: org/apache/lucene/search/TopDocs.class
-SHA1-Digest: 8+5aAvFKqcZZxiMDbbHvv3JhWog=
-
-Name: org/apache/lucene/store/FSIndexOutput.class
-SHA1-Digest: UdVO3XUTc/qY2MDtT+84vAJsmmI=
-
-Name: org/apache/lucene/search/spans/SpanNotQuery$1.class
-SHA1-Digest: pVEdQSGMM06s64ffOXMD4Ku3Pwc=
-
-Name: org/apache/lucene/index/DocumentWriter.class
-SHA1-Digest: bQSVc3xILw6ssVMbW4Gp26UE70Y=
-
-Name: org/apache/lucene/analysis/LowerCaseTokenizer.class
-SHA1-Digest: zFZaJEMmSMN4ji7E9NOg+cEz5Vo=
-
-Name: org/apache/lucene/analysis/StopAnalyzer.class
-SHA1-Digest: rTqcULxqdedHcmpx9h+3Yuf04/I=
-
-Name: org/apache/lucene/analysis/standard/StandardTokenizer.class
-SHA1-Digest: b4c/4uzm2X796kFbsg4Q/YEtiwc=
-
-Name: org/apache/lucene/store/FSDirectory$1.class
-SHA1-Digest: XdSPoigqCXSX879hC6POxb2oldA=
-
-Name: org/apache/lucene/search/spans/SpanOrQuery$SpanQueue.class
-SHA1-Digest: S94pciGFqnBZwriMK3qr2DTETLs=
-
-Name: org/apache/lucene/analysis/standard/FastCharStream.class
-SHA1-Digest: Qn/pKkP7YJgN/g4dqFxfqnZlYrU=
-
-Name: org/apache/lucene/search/BooleanScorer2$2.class
-SHA1-Digest: Sh7yOdYUdXhr6CI/zzcwbz+2eV0=
-
-Name: org/apache/lucene/search/spans/SpanTermQuery$1.class
-SHA1-Digest: wSmVtbqucCtxKo/cx9HJx/57tuU=
-
-Name: org/apache/lucene/index/IndexFileNames.class
-SHA1-Digest: 4NRpZaMCqpWrmqoprs/2Zdd4AME=
-
-Name: org/apache/lucene/index/TermVectorsWriter$TVTerm.class
-SHA1-Digest: bIs4kRqrR4gViDU1pdlPolKKZu0=
-
-Name: org/apache/lucene/analysis/LetterTokenizer.class
-SHA1-Digest: f8KO9plk6lagj90PQzV0Ca5yDAk=
-
-Name: org/apache/lucene/search/HitDoc.class
-SHA1-Digest: 4E2DntT+KZVs5lM/dag7SLlLEj8=
-
-Name: org/apache/lucene/search/DisjunctionMaxQuery.class
-SHA1-Digest: bt3YPEc+6SebTWxudmvFZji5/nk=
-
-Name: org/apache/lucene/index/SegmentTermPositionVector.class
-SHA1-Digest: BVMa//BO27JUehpxojUHZ25CsG0=
-
-Name: org/apache/lucene/search/FieldCacheImpl.class
-SHA1-Digest: dJsZRDF03VZoHmO8q45j7YHXTXs=
-
-Name: org/apache/lucene/store/RAMOutputStream.class
-SHA1-Digest: 0QLV7pj+w3AjhCX8CkiRVRGiwiw=
-
-Name: org/apache/lucene/analysis/Tokenizer.class
-SHA1-Digest: AJ1A/ijWWP1PS4RRSKkT+204lTU=
-
-Name: org/apache/lucene/index/IndexWriter$1.class
-SHA1-Digest: LGSFbntDpUpWTU2zU/XKVj94REI=
-
-Name: org/apache/lucene/store/RAMDirectory$1.class
-SHA1-Digest: NIoE1aOvfe0s8i7NOeluZQxfGi8=
-
-Name: org/apache/lucene/search/Hit.class
-SHA1-Digest: qBpyJ9VyA0cvIg8zIwHp3Z4rREQ=
-
-Name: org/apache/lucene/index/TermVectorOffsetInfo.class
-SHA1-Digest: D+Z+rsrjxvJ9JjsRcsQd1CnR7MA=
-
-Name: org/apache/lucene/store/InputStream.class
-SHA1-Digest: iGfX9U4+f9xq1opv2qFzPBNvW90=
-
-Name: org/apache/lucene/search/RangeFilter.class
-SHA1-Digest: zMTAiV5wWEPxvsWSAnVHpk/hbVU=
-
-Name: org/apache/lucene/search/FieldCacheImpl$2.class
-SHA1-Digest: 3CGCPkvgeMAl1os3ZTG9g9A2LZ8=
-
-Name: org/apache/lucene/search/Explanation.class
-SHA1-Digest: VwdwwLPI/BIwqnlMpaeGuundFAg=
-
-Name: org/apache/lucene/search/ReqExclScorer.class
-SHA1-Digest: sPnuooK9oRbtPEg0gPC99b+KJhc=
-
-Name: org/apache/lucene/util/SmallFloat.class
-SHA1-Digest: 2D3SgpzTa7+mpX8fQM5oAP/5h/s=
-
-Name: org/apache/lucene/LucenePackage.class
-SHA1-Digest: Pm6fOCuDLIce6EedPm217ldPpk4=
-
-Name: org/apache/lucene/search/BooleanClause$Occur.class
-SHA1-Digest: kXVwnrBYYUtKFO6oYT8QNOP3ZdI=
-
-Name: org/apache/lucene/search/spans/NearSpans$SpansCell.class
-SHA1-Digest: H5uaQQMGbpUOnvNfncbRA1W57hs=
-
-Name: org/apache/lucene/search/ConjunctionScorer$1.class
-SHA1-Digest: +2al0t+x14aNAweSAI3AAlDpNcY=
-
-Name: org/apache/lucene/queryParser/CharStream.class
-SHA1-Digest: lz7SB3wtE0rAVwTZ9Tcl9YSarlA=
-
-Name: org/apache/lucene/queryParser/QueryParser$1.class
-SHA1-Digest: jEBkXmXluLYTqApsLdanR/jeZ9M=
-
-Name: org/apache/lucene/document/Field$TermVector.class
-SHA1-Digest: bYHWZsTnDi1/rMIzLx2IuPTP0/w=
-
-Name: org/apache/lucene/search/spans/SpanTermQuery.class
-SHA1-Digest: lh9Z9CegLslPfAHlAHcZ9T8Y584=
-
-Name: org/apache/lucene/search/TermQuery$TermWeight.class
-SHA1-Digest: S+jllXFFRxVOSCexUuac1eoCbdI=
-
-Name: org/apache/lucene/search/SortComparatorSource.class
-SHA1-Digest: skCXBc8OhjnzkD5b5bQc5CpvE88=
-
-Name: org/apache/lucene/analysis/WhitespaceAnalyzer.class
-SHA1-Digest: 1rEcnJTNPmB93sjT+V4DnC6KpUw=
-
-Name: org/apache/lucene/index/FilterIndexReader$FilterTermEnum.class
-SHA1-Digest: KE9LJk4J8WrUe3Jr5uxVyz0dNj8=
-
-Name: org/apache/lucene/index/CompoundFileWriter$FileEntry.class
-SHA1-Digest: XO8itXR2+2ENqsHpnxHKhiSOL1M=
-
-Name: org/apache/lucene/index/TermVectorsWriter.class
-SHA1-Digest: idqpzhQYfvIDRjEkSIempnIXS4o=
-
-Name: org/apache/lucene/search/FieldCacheImpl$Entry.class
-SHA1-Digest: kcwGvC8UzQcMLLCe/xnEEZv52SI=
-
-Name: org/apache/lucene/search/spans/SpanQuery.class
-SHA1-Digest: 4HZ3md/wniUYvyajd6Ytiagx1Yo=
-
-Name: org/apache/lucene/index/FilterIndexReader.class
-SHA1-Digest: MyJtTPiKpc2WDbjvTNqIn2oFKbA=
-
-Name: org/apache/lucene/search/FuzzyQuery$ScoreTermQueue.class
-SHA1-Digest: mm274kcfdYBJE11Yw3yIQit5Rhg=
-
-Name: org/apache/lucene/search/MultiSearcher$1.class
-SHA1-Digest: ESsXZ/hkh6BNZE99tbB5wzuORls=
-
-Name: org/apache/lucene/index/FilterIndexReader$FilterTermPositions.cl
- ass
-SHA1-Digest: PAE0/Miiyao6eSnJyKo2pi4/htI=
-
-Name: org/apache/lucene/document/Field$Index.class
-SHA1-Digest: bZChQDVVOF6Yb53oFIR6MbQRUDs=
-
-Name: org/apache/lucene/index/CompoundFileReader$1.class
-SHA1-Digest: M2By0aR15OV2q1PCiIIkzkF+v9Y=
-
-Name: org/apache/lucene/index/MultipleTermPositions$IntQueue.class
-SHA1-Digest: e855MfMQjDFOj0r51U2FIuANkQI=
-
-Name: org/apache/lucene/search/Sort.class
-SHA1-Digest: vjRLnlmU4D9hQPyZqgLYrggV7pM=
-
-Name: org/apache/lucene/index/TermVectorsWriter$1.class
-SHA1-Digest: i1o6lw8i3tRrrIOzt9xOS5Flg7U=
-
-Name: org/apache/lucene/store/RAMInputStream.class
-SHA1-Digest: 53bFE4r8ECQeFWilFa2GOrgQwBI=
-
-Name: org/apache/lucene/search/BooleanScorer2$SingleMatchScorer.class
-SHA1-Digest: vkZ68S4+ljAeWk28fUSZmq7iF5M=
-
-Name: org/apache/lucene/store/RAMDirectory.class
-SHA1-Digest: h6qwDTDUR7w9+b/NpVDdT+RJmiA=
-
-Name: org/apache/lucene/document/NumberTools.class
-SHA1-Digest: gC9SkiuUrduXA+vGYhgLSMV0BX8=
-
-Name: org/apache/lucene/search/PhraseQuery$PhraseWeight.class
-SHA1-Digest: xJagdTugwuVYfMefjy5Glfcxt44=
-
-Name: org/apache/lucene/analysis/standard/StandardAnalyzer.class
-SHA1-Digest: oMN21CsCs3hMEodLIa83EIr5ZYo=
-
-Name: org/apache/lucene/document/DateTools$Resolution.class
-SHA1-Digest: txT1oKhHlLH8DXI04FteBkwum8w=
-
-Name: org/apache/lucene/search/spans/SpanOrQuery.class
-SHA1-Digest: PLfPR/VaBiw2C1fVv/W6A6GmqPI=
-
-Name: org/apache/lucene/search/BooleanQuery$TooManyClauses.class
-SHA1-Digest: Xs5D1syy8OgXG4gBoR8BqyFZ8KI=
-
-Name: org/apache/lucene/analysis/standard/StandardFilter.class
-SHA1-Digest: L0iwHdbDD13AG9ql5KwZ4+4gwdE=
-
-Name: org/apache/lucene/analysis/standard/StandardTokenizerConstants.c
- lass
-SHA1-Digest: ozuDrFUpLHSugS9/BlvgtSHdPr4=
-
-Name: org/apache/lucene/index/TermPositionVector.class
-SHA1-Digest: PtDf5XWR/rEqvEE7wKI1qcTftkg=
-
-Name: org/apache/lucene/index/IndexReader$1.class
-SHA1-Digest: uQiqmGeM7ZgsFT9gNL/H+6Xo8Qs=
-
-Name: org/apache/lucene/search/Hits.class
-SHA1-Digest: A1atDsYCshkJTyJx1hl+Lxg26pM=
-
-Name: org/apache/lucene/store/RAMFile.class
-SHA1-Digest: bret0GXLoSol5zLIl592a2m3vW4=
-
-Name: org/apache/lucene/store/MMapDirectory$MultiMMapIndexInput.class
-SHA1-Digest: YtCjntYTMVQIcv2JIes/w97VAcs=
-
-Name: org/apache/lucene/search/spans/SpanNotQuery.class
-SHA1-Digest: 8aOUI9j106cEChqKe+ra/k5IkeY=
-
-Name: org/apache/lucene/search/BooleanScorer$Bucket.class
-SHA1-Digest: MhFPaxsu4wyeQ7KVnFw+nAqrhyc=
-
-Name: org/apache/lucene/search/spans/SpanFirstQuery.class
-SHA1-Digest: KyvVZEIC6s/6XBW34kZXXDdCI78=
-
-Name: org/apache/lucene/search/BooleanScorer$BucketTable.class
-SHA1-Digest: JsuQ4igWMAqOV6kCYpwcgonMlwE=
-
-Name: org/apache/lucene/queryParser/QueryParser$JJCalls.class
-SHA1-Digest: JL4zdB/YvPnLDPAVMxYntYh/k5Q=
-
-Name: org/apache/lucene/search/BooleanScorer2.class
-SHA1-Digest: Xv3AD/UNtYOLwoJW7rLqWYvRmzQ=
-
-Name: org/apache/lucene/search/RangeQuery.class
-SHA1-Digest: 3PsYUDXgYtWtKqgP3+UZimq2LuM=
-
-Name: org/apache/lucene/queryParser/QueryParser$Operator.class
-SHA1-Digest: +kCmT4LTjdwb9fHIitW5+wBk888=
-
-Name: org/apache/lucene/search/ParallelMultiSearcher$1.class
-SHA1-Digest: eOwFuFxDruAIep/yurXl89swzPk=
-
-Name: org/apache/lucene/store/MMapDirectory$1.class
-SHA1-Digest: OBVJSjdshz6Oc21VYroUlSCZXq0=
-
-Name: org/apache/lucene/store/FSIndexInput.class
-SHA1-Digest: VWrQ/o024wUxu2uTnvr8vpaTKRY=
-
-Name: org/apache/lucene/queryParser/TokenMgrError.class
-SHA1-Digest: yxieSsykzV1IsDCyPo8U4gjn8Fs=
-
-Name: org/apache/lucene/analysis/standard/CharStream.class
-SHA1-Digest: y7ehNZnDj+kCKgq16R8JSXXdSnA=
-
-Name: org/apache/lucene/search/FieldDoc.class
-SHA1-Digest: pqYK6pQZqf8DpOptlLMgCTjZVfc=
-
-Name: about_files/asl-v20.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: org/apache/lucene/index/CompoundFileReader$FileEntry.class
-SHA1-Digest: ICger7P3Izjw+cAKbKneg5cwwwY=
-
-Name: org/apache/lucene/search/DisjunctionMaxScorer.class
-SHA1-Digest: PREHEN1EkFOby5RjdlkTsYRUZ64=
-
-Name: org/apache/lucene/index/TermVectorsReader.class
-SHA1-Digest: 4x8xkUM29KBpQTfT91WJtxYWQzE=
-
-Name: org/apache/lucene/search/FieldSortedHitQueue$2.class
-SHA1-Digest: qogFhiWGQzLxb7MuzWTtkX+DNFQ=
-
-Name: org/apache/lucene/search/FieldCache$StringIndex.class
-SHA1-Digest: SVoWi3HpbKmcWP9XQBEpbeLeBQI=
-
-Name: org/apache/lucene/search/spans/NearSpans$CellQueue.class
-SHA1-Digest: tEWVgFZ968LeU6llcVZIfVFbfC0=
-
-Name: org/apache/lucene/analysis/standard/StandardTokenizerTokenManage
- r.class
-SHA1-Digest: H1bggRgSC9xJik0chExrc89DfLo=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/apache/lucene/queryParser/ParseException.class
-SHA1-Digest: g87EmK0qh0zShyjUJ+g1nIC9238=
-
-Name: org/apache/lucene/search/CachingWrapperFilter.class
-SHA1-Digest: G+U+21bQx7btxYG6zX2dgKy1dnc=
-
-Name: org/apache/lucene/index/IndexFileNameFilter.class
-SHA1-Digest: 1BqCQlzqw5IjoTAaL8l29PmB+mM=
-
-Name: org/apache/lucene/search/spans/SpanScorer.class
-SHA1-Digest: bEOZVy/lAcTdiz/IOcdoZDa+/E8=
-
-Name: org/apache/lucene/index/IndexWriter$3.class
-SHA1-Digest: ogNFaUsO6ivuM9t4JBEGyRW4xms=
-
-Name: org/apache/lucene/index/SegmentInfos.class
-SHA1-Digest: 70tQadpo7YL9Y+iqy23VcP2xvn0=
-
-Name: org/apache/lucene/search/PhraseQueue.class
-SHA1-Digest: scERKFV3aS8mVt7mi1oMMghToO8=
-
-Name: org/apache/lucene/search/DisjunctionMaxQuery$DisjunctionMaxWeigh
- t.class
-SHA1-Digest: khZrJ0/Fetp49FMbZ/EfGMheRRs=
-
-Name: org/apache/lucene/search/Filter.class
-SHA1-Digest: uNWfIXyl4o1431ng9+wwbdwJaPM=
-
-Name: org/apache/lucene/search/PhraseScorer.class
-SHA1-Digest: mIkctuGCQyJPmzloUWfq3nrP2mc=
-
-Name: org/apache/lucene/search/BooleanQuery$BooleanWeight.class
-SHA1-Digest: qAjQwsVP1UPVFXxHb5HYAkqZtxU=
-
-Name: org/apache/lucene/index/CompoundFileWriter.class
-SHA1-Digest: 2AGpw7osJFG4t3fmFLbCnn4Gwrg=
-
-Name: org/apache/lucene/search/BooleanQuery.class
-SHA1-Digest: ranzU1V20FYqb6/wdgvmZC/ugto=
-
-Name: org/apache/lucene/search/Searchable.class
-SHA1-Digest: JnV6/nA6ZBJDfbzJjllmnHENJ9I=
-
-Name: org/apache/lucene/analysis/SimpleAnalyzer.class
-SHA1-Digest: GdqItnsh5NoLErzppmoaQXiNcwE=
-
-Name: org/apache/lucene/analysis/PerFieldAnalyzerWrapper.class
-SHA1-Digest: SEgp4hoYw/y+QxrEQxXPkHcpmc4=
-
-Name: org/apache/lucene/util/StringHelper.class
-SHA1-Digest: 13ySjur+fIHrGE7iqYhD/JIIYnw=
-
-Name: org/apache/lucene/index/SegmentMergeQueue.class
-SHA1-Digest: WbD0w6gV+VX3Z9cSGLmeCFyBsG8=
-
-Name: org/apache/lucene/index/TermInfosWriter.class
-SHA1-Digest: 0pDHlY08nLgElNNJQI/THFIluHU=
-
-Name: org/apache/lucene/search/ScoreDocComparator$1.class
-SHA1-Digest: rlMWOPxjSLdI0w6eKzzw+JObEJ0=
-
-Name: org/apache/lucene/analysis/LengthFilter.class
-SHA1-Digest: nsKnR8/NQ1Sdq4mntmUVYMGzhJ8=
-
-Name: org/apache/lucene/index/SegmentTermPositions.class
-SHA1-Digest: t8axf0mk+fK5+ZfaFjzfKCbTQL8=
-
-Name: plugin.properties
-SHA1-Digest: TC1O/cZ3S0G6tgFu48TI7A0aTvE=
-
-Name: org/apache/lucene/search/MultiSearcher$CachedDfSource.class
-SHA1-Digest: Y/ym3JF0j/clrbwFgy2tz3PogLY=
-
-Name: org/apache/lucene/store/OutputStream.class
-SHA1-Digest: LnDNd6jVIuMRsSTf2qCDMYKM+Sg=
-
-Name: org/apache/lucene/search/BooleanScorer2$1.class
-SHA1-Digest: cKLngQ4SgTleNCGXXCHzrPkP/PA=
-
-Name: org/apache/lucene/search/FilteredQuery$2.class
-SHA1-Digest: dIOT1PEANvqvwq5Jed6aTti6hYg=
-
-Name: org/apache/lucene/analysis/standard/TokenMgrError.class
-SHA1-Digest: lhAtuEa7itUKeyQ3Ib27HSPWrFg=
-
-Name: org/apache/lucene/analysis/StopFilter.class
-SHA1-Digest: 3YOOoIWnEuFgcBSu+aneBpbBGV4=
-
-Name: org/apache/lucene/search/IndexSearcher.class
-SHA1-Digest: C1dsbrNFl0zOqJ+z4gZ4PFIIgSw=
-
-Name: org/apache/lucene/analysis/WordlistLoader.class
-SHA1-Digest: HNaZI1vqval6rG1wJYsT/Sq00nA=
-
-Name: org/apache/lucene/analysis/WhitespaceTokenizer.class
-SHA1-Digest: jU/mPCZkGwRrJ6iD5m7lrJbDilA=
-
-Name: org/apache/lucene/search/MatchAllDocsQuery$MatchAllScorer.class
-SHA1-Digest: UXu+tSR7JhDJ7TOa/zDwiLQRIT8=
-
-Name: org/apache/lucene/analysis/standard/Token.class
-SHA1-Digest: QdP79CrXXW6I2TdCrRIRKfxJYOw=
-
-Name: org/apache/lucene/search/FieldCacheImpl$1.class
-SHA1-Digest: 2VKcEOnGdKP/xTL7cCP4cF/Xy5E=
-
-Name: org/apache/lucene/search/ReqOptSumScorer.class
-SHA1-Digest: jDzScmevd6Asd2HG7kvyHsmmayU=
-
-Name: org/apache/lucene/search/BooleanScorer2$Coordinator.class
-SHA1-Digest: JA57kPSLU8jYgqqVeY26gayWR+o=
-
-Name: org/apache/lucene/search/ConjunctionScorer.class
-SHA1-Digest: f1Lia/6jOhoQP6ijpiFAVh11oww=
-
-Name: org/apache/lucene/index/SegmentMergeInfo.class
-SHA1-Digest: sbghx5OWT3jnYSjtIbCjoBSIQaw=
-
-Name: org/apache/lucene/queryParser/MultiFieldQueryParser.class
-SHA1-Digest: 5azzTZVzpPnR7Qav86xJPWNXrU4=
-
-Name: org/apache/lucene/search/FuzzyQuery$ScoreTerm.class
-SHA1-Digest: USxS1rn4llcVzkjCmgCfzbsInJg=
-
-Name: org/apache/lucene/search/ScoreDocComparator.class
-SHA1-Digest: SAx98JZat5kjVM7990y7uvASCXU=
-
-Name: org/apache/lucene/search/BooleanScorer$SubScorer.class
-SHA1-Digest: e0Hlkp1oUYNN4PuAZpLUSeZI0+I=
-
-Name: org/apache/lucene/search/FilteredTermEnum.class
-SHA1-Digest: 3Wvgct4AsyyhBQhfU3aqadO+qZI=
-
-Name: org/apache/lucene/search/spans/SpanWeight.class
-SHA1-Digest: rdYmpJkaACMJ90rcvLJWyJkgnFg=
-
-Name: org/apache/lucene/util/Constants.class
-SHA1-Digest: toyjFl2zAETPRuaoYTfNtKgbyAc=
-
-Name: org/apache/lucene/index/SegmentMerger.class
-SHA1-Digest: qcAzO3oXDziqeOjixmvGkyXjbIY=
-
-Name: org/apache/lucene/search/DisjunctionSumScorer.class
-SHA1-Digest: AR2XhIDtamQ/Ge8OVwbn8tlOJ0w=
-
-Name: org/apache/lucene/store/BufferedIndexInput.class
-SHA1-Digest: AfAKxHfbH5P1fzPSwh+q9aKbFPM=
-
-Name: org/apache/lucene/store/IndexInput.class
-SHA1-Digest: YjURuZvuYKTKBt+iNr76nXQzy3o=
-
-Name: org/apache/lucene/index/MultipleTermPositions$TermPositionsQueue
- .class
-SHA1-Digest: y+TEHuOHPpYE64CA5CHqFSquLOI=
-
-Name: org/apache/lucene/search/MultiSearcher.class
-SHA1-Digest: fnXxP7qoTrx6CObO9RjBxJNTiPo=
-
-Name: org/apache/lucene/index/CompoundFileReader.class
-SHA1-Digest: jwdII6XcQY519s0eG21yYTvJp5E=
-
-Name: org/apache/lucene/search/spans/SpanNearQuery.class
-SHA1-Digest: +vEdaaydjlLBe9oLmxC6T0fSXqY=
-
-Name: org/apache/lucene/search/FilteredQuery.class
-SHA1-Digest: chVxELhQBlktjWYk1XJW24ylybs=
-
-Name: org/apache/lucene/index/SegmentTermDocs.class
-SHA1-Digest: ofBe6PXg60uUXwGk4YcKLp9Psjg=
-
-Name: org/apache/lucene/index/TermInfosReader.class
-SHA1-Digest: 6lbor7Wx14baiIaYVacxP+mD5KA=
-
-Name: org/apache/lucene/search/FieldDocSortedHitQueue.class
-SHA1-Digest: lJhzxTVREqox1YQ6Utmz7ydgygU=
-
-Name: org/apache/lucene/search/SortComparator$1.class
-SHA1-Digest: Vex+Tar/46QFcvFAE6hN8/Ja5/8=
-
-Name: org/apache/lucene/store/MMapDirectory$MMapIndexInput.class
-SHA1-Digest: JBDHhkl/gR+dmjFd6ps8c6Ouzww=
-
-Name: org/apache/lucene/search/FieldSortedHitQueue$4.class
-SHA1-Digest: g7ycmhwAmqzOhNKa8DDlPPU22OY=
-
-Name: org/apache/lucene/search/RemoteSearchable.class
-SHA1-Digest: HOEvnB3ba5QGgFFuYUVIuUKDj8s=
-
-Name: org/apache/lucene/index/MultipleTermPositions.class
-SHA1-Digest: i/JY8fyn49afHz1AlHccZOd2cFI=
-
-Name: org/apache/lucene/document/Field$Store.class
-SHA1-Digest: 0x2pDQRArQcmaOwSDCgCM3qm2rk=
-
-Name: org/apache/lucene/search/ConstantScoreQuery$ConstantScorer.class
-SHA1-Digest: sS32g1J4R3nrQssLp6gJhlhy/+M=
-
-Name: org/apache/lucene/search/PhraseQuery.class
-SHA1-Digest: fxvZzMO9D7cffiQJUisL7ETCHbI=
-
-Name: org/apache/lucene/search/MatchAllDocsQuery.class
-SHA1-Digest: 0/c1OD1DPdAk0Xj9s84vufa5i8U=
-
-Name: org/apache/lucene/index/IndexWriter$5.class
-SHA1-Digest: ipKgCbCPFGbn5yFsmkLFwJXp3PY=
-
-Name: org/apache/lucene/store/Directory.class
-SHA1-Digest: HVSs9ie8a8nbYDGyBiiLnazG4K0=
-
-Name: org/apache/lucene/search/MultiSearcherThread.class
-SHA1-Digest: f3DlEPXeACHcXW0kapAGs7iBlI4=
-
-Name: org/apache/lucene/search/TopFieldDocCollector.class
-SHA1-Digest: J7rWN7FRp0M1ljrr6r473IctaHk=
-
-Name: org/apache/lucene/analysis/PorterStemFilter.class
-SHA1-Digest: r2MK9sN8xaQCMUhIY5YnAu3yrQQ=
-
-Name: org/apache/lucene/index/SegmentInfo.class
-SHA1-Digest: tAG2BkY3Ig1EXAMGoxrWh4370Zg=
-
-Name: org/apache/lucene/analysis/LowerCaseFilter.class
-SHA1-Digest: 1iwO3GIiTW/5OrvG92PhnULzMDM=
-
-Name: org/apache/lucene/index/Posting.class
-SHA1-Digest: j46POb21t/1Q2k46OA3ZvzFZAIs=
-
-Name: org/apache/lucene/search/QueryFilter.class
-SHA1-Digest: LCL705rmBVhZ7xv96tBzD/Cb/Qg=
-
-Name: org/apache/lucene/queryParser/FastCharStream.class
-SHA1-Digest: oshmewtnf253/FFnPxtEv/ZHBps=
-
-Name: org/apache/lucene/search/HitIterator.class
-SHA1-Digest: Fxux1HUPYjQAPQSqxOdxCPSCs+A=
-
-Name: org/apache/lucene/index/ParallelReader$ParallelTermDocs.class
-SHA1-Digest: cIgEzpTlwqr7ARmacT0RSaBYKjY=
-
-Name: org/apache/lucene/index/FieldInfo.class
-SHA1-Digest: sc1s/aAuqTzV+1CpGyGnA3e2Gsc=
-
-Name: org/apache/lucene/index/TermVectorsWriter$TVField.class
-SHA1-Digest: uNeiCgblbVKtN8HWGmX4S+r0aFQ=
-
-Name: org/apache/lucene/search/BooleanScorer.class
-SHA1-Digest: TB2NGTsUQXVyi+xFqw6XlezqOHc=
-
-Name: org/apache/lucene/index/TermFreqVector.class
-SHA1-Digest: 1zzNq6ebHY3/8Vfu0QChVc5Ohpc=
-
-Name: org/apache/lucene/queryParser/QueryParser$LookaheadSuccess.class
-SHA1-Digest: mT10lpxNHoMFPkZAuvTQSd2TjmI=
-
-Name: org/apache/lucene/index/ParallelReader.class
-SHA1-Digest: hJHZ05ZbT6m4y67xBvw7N2w3krw=
-
-Name: org/apache/lucene/search/BooleanScorer$Collector.class
-SHA1-Digest: n+4ZcIzEq3Ba6AqwuEdHvheSN0I=
-
-Name: org/apache/lucene/search/SortComparator.class
-SHA1-Digest: Hd6FFtq0Caq+MCLc0JATXW/p/po=
-
-Name: org/apache/lucene/search/spans/SpanFirstQuery$1.class
-SHA1-Digest: /e1MMaY/OwmkpYjyA7nFkst6aBU=
-
-Name: org/apache/lucene/search/MultiPhraseQuery.class
-SHA1-Digest: s1Xvbq53ZauPagC+fKWIbUSqThk=
-
-Name: org/apache/lucene/search/QueryTermVector.class
-SHA1-Digest: b9g8vNoS8Dg/ocVrCSdOrey0guE=
-
-Name: org/apache/lucene/search/BooleanClause.class
-SHA1-Digest: M2rcK4Luy9wP0TXgLHkE4BIp1rE=
-
-Name: org/apache/lucene/search/FuzzyTermEnum.class
-SHA1-Digest: gnpLsDH3B+4F60oia8+Kt79sxoA=
-
-Name: org/apache/lucene/index/TermPositions.class
-SHA1-Digest: iS9aGBlZ1qT4LwAHcl5VfSwm48E=
-
-Name: org/apache/lucene/index/SegmentTermEnum.class
-SHA1-Digest: jcXaOop8d48s1QHn0TCFGu/BvbM=
-
-Name: org/apache/lucene/index/SegmentTermVector.class
-SHA1-Digest: eRCJjKIdINnTpRMABNRE0GErZnU=
-
-Name: org/apache/lucene/search/Scorer.class
-SHA1-Digest: GTAMkGqqDzRhBGqZEZJoux9vAUI=
-
-Name: org/apache/lucene/index/ParallelReader$ParallelTermPositions.cla
- ss
-SHA1-Digest: vdAScaxuqoVRmrVWcA0b/NoBXug=
-
-Name: org/apache/lucene/search/FieldSortedHitQueue$1.class
-SHA1-Digest: UwslrcQlrvZKbVuShEdTZoAfWL8=
-
-Name: org/apache/lucene/analysis/TokenFilter.class
-SHA1-Digest: ESIbMh6L7xPrGj7lLw336heiHnA=
-
-Name: org/apache/lucene/analysis/TokenStream.class
-SHA1-Digest: LMWJrhxbRSGa+IKyX/rZohlqbGw=
-
-Name: org/apache/lucene/search/WildcardQuery.class
-SHA1-Digest: +4d02dtzyy6nKCvxOGe1GxpRAFQ=
-
-Name: org/apache/lucene/index/IndexWriter$2.class
-SHA1-Digest: hBVSj62Zsa4nSRYEx8xfJLkkq8A=
-
-Name: about.html
-SHA1-Digest: 606g8JTFVKK8SEHTGMPs4ku0x6k=
-
-Name: org/apache/lucene/analysis/Analyzer.class
-SHA1-Digest: tIVSoruMcHEtdEwiKw3HeFcbyhc=
-
-Name: org/apache/lucene/index/MultipleTermPositions$1.class
-SHA1-Digest: y3nf3/nCRu8yi+EgkI5Ho/LGB0A=
-
-Name: org/apache/lucene/queryParser/QueryParser.class
-SHA1-Digest: LICirs71lFzDvZXUiaIFZYim14E=
-
-Name: org/apache/lucene/index/IndexReader$FieldOption.class
-SHA1-Digest: yGIf+w/OLNGjB3WNLwqrC3OOhII=
-
-Name: org/apache/lucene/document/DateField.class
-SHA1-Digest: phSAs9B8lwprci5xC+GyZvyGu2w=
-
-Name: org/apache/lucene/search/FieldCache$FloatParser.class
-SHA1-Digest: 2F7UlZScmx/hM9HWF/NoqvbNRNk=
-
-Name: org/apache/lucene/analysis/standard/ParseException.class
-SHA1-Digest: TeRVPbyW9zux/QRYn1VqeRUmVk0=
-
-Name: org/apache/lucene/search/MultiTermQuery.class
-SHA1-Digest: mKqxjRg5FQEhwLtqfm8ajDnMTH8=
-
-Name: org/apache/lucene/index/IndexModifier.class
-SHA1-Digest: 3SArf/KaTO8e20H0fVmPj9cxOVg=
-
-Name: org/apache/lucene/search/ConstantScoreQuery$ConstantWeight.class
-SHA1-Digest: v5YDwklGJLs3LGiTZ9lqe1/Ho9s=
-
-Name: org/apache/lucene/search/DateFilter.class
-SHA1-Digest: l6GtJ6iptkd2+lZjC9SrhCLN0RQ=
-
-Name: org/apache/lucene/search/WildcardTermEnum.class
-SHA1-Digest: WJwXGhkrjTo1UbvvfK2KEUgLzpM=
-
-Name: org/apache/lucene/search/ParallelMultiSearcher.class
-SHA1-Digest: SoSh0ZCO3UEsNi4gS8WGkipm6u4=
-
-Name: org/apache/lucene/search/TopDocCollector.class
-SHA1-Digest: PR06RpviepTTbs2V0zdYdcyrxV4=
-
-Name: org/apache/lucene/index/ParallelReader$ParallelTermEnum.class
-SHA1-Digest: 4xNGgTE8OYxr20Gm2VKHi9GutVE=
-
-Name: org/apache/lucene/analysis/Token.class
-SHA1-Digest: DHuG6qSS5C5KUU27bOigrciRa3Q=
-
-Name: org/apache/lucene/document/Field.class
-SHA1-Digest: KGl8aNZy1wdVFGed8qXkVSGZFKE=
-
-Name: org/apache/lucene/search/BooleanQuery$1.class
-SHA1-Digest: K9ZrK/LrTyFGVPTvoCXF2BTG5Fs=
-
-Name: org/apache/lucene/index/SegmentReader$Norm.class
-SHA1-Digest: Ce/jz/SalZI24Xl4Hl6/EVGekgw=
-
-Name: org/apache/lucene/index/FieldInfos.class
-SHA1-Digest: mrLs8m4oawZYdKYKHGMch5CC0uo=
-
-Name: org/apache/lucene/index/Term.class
-SHA1-Digest: 8IB+s6V0CzwIB17/WtrBTYkWp5c=
-
-Name: org/apache/lucene/search/FieldCache$IntParser.class
-SHA1-Digest: GfjQbl6zZjc+iILIQNWZ+Speg2k=
-
-Name: org/apache/lucene/search/BooleanQuery$BooleanWeight2.class
-SHA1-Digest: RRSVtFpqdJAFBP/KGvpS9UQMuFk=
-
-Name: org/apache/lucene/queryParser/QueryParserConstants.class
-SHA1-Digest: gzGcN/Ibxuq8DA/KuSELgoQnwy8=
-
-Name: org/apache/lucene/search/ConstantScoreRangeQuery.class
-SHA1-Digest: pdwLNi84IobYY+X/87uMIa4gTiA=
-
-Name: org/apache/lucene/search/spans/NearSpans.class
-SHA1-Digest: 5nfVQ+u60qpG7K3iq6zri8gQCxI=
-
-Name: org/apache/lucene/search/TermQuery.class
-SHA1-Digest: nAw3TNqihv8kIP3sKzbecCPy3IY=
-
-Name: org/apache/lucene/search/SloppyPhraseScorer.class
-SHA1-Digest: kpGn3kP+YJbtX2wTfLV9h5f1ZQQ=
-
-Name: org/apache/lucene/index/MultiTermDocs.class
-SHA1-Digest: 3Qcbf6bRm+SkmmBLadOBlcbOIko=
-
-Name: org/apache/lucene/index/CompoundFileReader$CSIndexInput.class
-SHA1-Digest: fOKy1TxyhGOsw6u/tb2RUy+31W0=
-
-Name: org/apache/lucene/search/FilteredQuery$1.class
-SHA1-Digest: Atgl8mgT3pIROumJ/yNMxpNvQZU=
-
-Name: org/apache/lucene/search/FuzzyQuery.class
-SHA1-Digest: jQRvApB9SOEIl6BbFOeRmV07u/k=
-
-Name: org/apache/lucene/store/Lock.class
-SHA1-Digest: oAE7Ns57cFrSfLvn2nIb7Mh91/g=
-
-Name: org/apache/lucene/document/DateTools.class
-SHA1-Digest: vwjjGyyQ7yXIOz8Lhzsha+LeP9A=
-
-Name: org/apache/lucene/index/IndexWriter.class
-SHA1-Digest: 2aTyrINyFDG1ADA5vKB9jDuDKjw=
-
-Name: org/apache/lucene/search/MatchAllDocsQuery$MatchAllDocsWeight.cl
- ass
-SHA1-Digest: HMPBRLg5Pxg4Y4YbC8Q5QCH56ks=
-
-Name: org/apache/lucene/search/Query.class
-SHA1-Digest: BYTC3fRKGi0ok3dgbRE8WOQ1pZw=
-
-Name: org/apache/lucene/util/BitVector.class
-SHA1-Digest: K+ea69DGgqnUE5N0hKlMi1tWdvw=
-
-Name: org/apache/lucene/queryParser/Token.class
-SHA1-Digest: C4DtErVRaqgbN6mG0iPi0wdtd9U=
-
-Name: org/apache/lucene/index/TermDocs.class
-SHA1-Digest: I96Q4NkmiSHu9usQUa5XOFODAMc=
-
-Name: org/apache/lucene/index/FieldsWriter.class
-SHA1-Digest: MBSjN1OLGMcH14zcNMrVi6yZd1g=
-
-Name: org/apache/lucene/search/PrefixQuery.class
-SHA1-Digest: 4rCkMusGaylOwMK5LwseQ7lhRns=
-
-Name: org/apache/lucene/analysis/PorterStemmer.class
-SHA1-Digest: Gm0tuF2GCaV2+3jPL7USzrLJwfw=
-
-Name: org/apache/lucene/search/Weight.class
-SHA1-Digest: ITlpv6Zqbh48FPnQMhChk3gLZ80=
-
-Name: org/apache/lucene/search/ExactPhraseScorer.class
-SHA1-Digest: vIkDqUkj1hWXqlreMnsSgqwJAEs=
-
-Name: org/apache/lucene/store/FSIndexInput$Descriptor.class
-SHA1-Digest: 8Ef8hMdgX0dP2CBYOa5Dl3PtvWQ=
-
-Name: org/apache/lucene/index/IndexReader$2.class
-SHA1-Digest: 79Hy+bova28+FloyX7FoVuHZVsM=
-
-Name: org/apache/lucene/search/TopFieldDocs.class
-SHA1-Digest: QINP25DEswgAibI3aSJw9l+uqSI=
-
-Name: org/apache/lucene/analysis/KeywordAnalyzer.class
-SHA1-Digest: cD86XBElctG4hQ1kiAyBH3wJnMc=
-
-Name: org/apache/lucene/search/PhrasePositions.class
-SHA1-Digest: IcC3zPhnRml39EwGfqbhkbrzeS8=
-
-Name: org/apache/lucene/index/SegmentReader.class
-SHA1-Digest: FTp9gqXZV7RzHjItSrh+bEkBmo4=
-
-Name: org/apache/lucene/search/Searcher.class
-SHA1-Digest: HzbGl9c9rFsDQl4kwFxLINA7dGY=
-
-Name: org/apache/lucene/search/FieldSortedHitQueue.class
-SHA1-Digest: I7dxT7TQ+6Q/V1Kba7KXMDl2CXY=
-
-Name: org/apache/lucene/search/DisjunctionSumScorer$ScorerQueue.class
-SHA1-Digest: TW1wrW1IcuTp1VwJzUwUh+al/9k=
-
-Name: org/apache/lucene/index/MultiReader.class
-SHA1-Digest: qk0zrFgwtPCxxZKxWup2TtnMHGg=
-
-Name: org/apache/lucene/search/ConstantScoreQuery.class
-SHA1-Digest: K+ZOSrHlrqjtioTN0151CM81pNk=
-
-Name: org/apache/lucene/search/SortField.class
-SHA1-Digest: TV1JnRtjD54nvyJN7fS3smRpQyw=
-
-Name: org/apache/lucene/index/TermInfo.class
-SHA1-Digest: NDr62CWz3Qkeiul5NcXKOSHji3s=
-
-Name: org/apache/lucene/util/ToStringUtils.class
-SHA1-Digest: RY0n2Q8+mfBEXc9cr5jls4JL5R8=
-
-Name: org/apache/lucene/store/BufferedIndexOutput.class
-SHA1-Digest: Yp3lKLOh3uDQ50v/XRtb+esGtho=
-
-Name: org/apache/lucene/index/MultiTermEnum.class
-SHA1-Digest: xPB3GDvVlUMt7aedaMi9mCOzmeg=
-
-Name: org/apache/lucene/util/Parameter.class
-SHA1-Digest: u3OayJFhJs0ZnTGxbEiTtohOLK4=
-
-Name: org/apache/lucene/search/spans/Spans.class
-SHA1-Digest: kkUVybRufgN7xCfpwojrQh8Jfcg=
-
-Name: org/apache/lucene/search/Similarity.class
-SHA1-Digest: 7/o86tOa7hK8D0aHx5Tv0Qxp0vQ=
-
-Name: org/apache/lucene/search/DefaultSimilarity.class
-SHA1-Digest: bSPAmStF3Ool73ndxYwAbqPl1KU=
-
-Name: org/apache/lucene/search/FieldSortedHitQueue$3.class
-SHA1-Digest: bRlP5iPxfItHEOILQyD6QA1eCso=
-
-Name: org/apache/lucene/search/RemoteSearchable_Stub.class
-SHA1-Digest: Yl+Sy0YYl+WTOx2NSBTImfyrjzw=
-
-Name: org/apache/lucene/analysis/ISOLatin1AccentFilter.class
-SHA1-Digest: YJEG5hBJeBIwgyOI+07B1AiVkWk=
-
-Name: org/apache/lucene/search/FieldCache.class
-SHA1-Digest: 6iTTSM6XO59WuPUz3W7BuBMwxk8=
-
-Name: org/apache/lucene/search/TermScorer.class
-SHA1-Digest: PZu/+PWxQSmvV3rssETvLmpyM6I=
-
-Name: org/apache/lucene/index/TermBuffer.class
-SHA1-Digest: +BBKwYMnqSy7wMSTjJPMeQWx1Pk=
-
-Name: org/apache/lucene/index/IndexWriter$4.class
-SHA1-Digest: nJtK7WGxH+/Culs3gdu1P8HmnT8=
-
-Name: org/apache/lucene/index/IndexReader.class
-SHA1-Digest: acC7pOi02iSBiSpK+2Z+shC/ips=
-
-Name: org/apache/lucene/index/TermEnum.class
-SHA1-Digest: sIvf0kyRY/G1FUuQdWLo2tqrGqc=
-
-Name: org/apache/lucene/search/IndexSearcher$1.class
-SHA1-Digest: CbPX0Tt4EBdyyVArS1rJc9Vo50M=
-
-Name: org/apache/lucene/analysis/CharTokenizer.class
-SHA1-Digest: 5kbj4/Jwt4yMG4NJMwkme+m90OY=
-
-Name: org/apache/lucene/analysis/KeywordTokenizer.class
-SHA1-Digest: DI9MFEDKK/h2bKsKZ8QnOynbsfM=
-
-Name: org/apache/lucene/search/HitCollector.class
-SHA1-Digest: RwQeC1/koC3njYW0/Q8Tg2oYgwM=
-
-Name: org/apache/lucene/search/MultiPhraseQuery$MultiPhraseWeight.clas
- s
-SHA1-Digest: +nAeivQU/DOjqS9tBDhu28j8UBs=
-
-Name: org/apache/lucene/search/PhrasePrefixQuery.class
-SHA1-Digest: t6B7eGTge6q1nySqzjeshB5Fb00=
-
-Name: org/apache/lucene/analysis/de/WordlistLoader.class
-SHA1-Digest: dMKX2ZhElTV3Re9Wv5WG4TeBK3Q=
-
-Name: org/apache/lucene/store/IndexOutput.class
-SHA1-Digest: SE0gulpmKIFsRZ2nIPPSkCKWm2Q=
-
-Name: org/apache/lucene/search/HitQueue.class
-SHA1-Digest: 1Mldeg5/JXq6nleDgsMIVrb9y+U=
-
-Name: org/apache/lucene/search/SimilarityDelegator.class
-SHA1-Digest: iDfU1uAoa6zU3XdvZ/rAZrSfUj4=
-
-Name: org/apache/lucene/index/FieldsReader.class
-SHA1-Digest: yLZMOlUTwvlQAErCVBeZZKnJXLc=
-
-Name: org/apache/lucene/search/spans/SpanOrQuery$1.class
-SHA1-Digest: fe8g4PeuM6gIzKFFtE5ZhZbgGxU=
-
diff --git a/dependencyManifests/org.apache.lucene_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.apache.lucene_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..72bfd15
--- /dev/null
+++ b/dependencyManifests/org.apache.lucene_1.9.1.v20100518-1140.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,916 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.lucene
+Export-Package: org.apache.lucene,org.apache.lucene.analysis,org.apach
+ e.lucene.analysis.de,org.apache.lucene.analysis.standard,org.apache.l
+ ucene.document,org.apache.lucene.index,org.apache.lucene.queryParser,
+ org.apache.lucene.search,org.apache.lucene.search.spans,org.apache.lu
+ cene.store,org.apache.lucene.util
+Bundle-Version: 1.9.1.v20100518-1140
+Bundle-ManifestVersion: 2
+
+Name: org/apache/lucene/search/ScoreDoc.class
+SHA1-Digest: 7bjm4VNJWLvCbvZrL09UCN6Vwkc=
+
+Name: org/apache/lucene/util/PriorityQueue.class
+SHA1-Digest: 6vsZ0ARE/duPH/LymakfXS0Hndc=
+
+Name: org/apache/lucene/document/Document.class
+SHA1-Digest: tgvlVvkhU3giFGk9aoe3uXO7E48=
+
+Name: org/apache/lucene/store/MMapDirectory.class
+SHA1-Digest: j+ABTcgB/j3xfXw8x3CRMvxY5Eo=
+
+Name: org/apache/lucene/index/MultiTermPositions.class
+SHA1-Digest: gVLesn6633CjgqAUiGQYKvBOCTI=
+
+Name: org/apache/lucene/store/Lock$With.class
+SHA1-Digest: fomd1EnFYlJBXNg8BBUOtcLUauY=
+
+Name: org/apache/lucene/search/ScoreDocComparator$2.class
+SHA1-Digest: +0g0LFX6KKJHzLTKm/MCu0yI7Uc=
+
+Name: org/apache/lucene/search/PhrasePrefixQuery$PhrasePrefixWeight.cl
+ ass
+SHA1-Digest: sbmUoBqziG78KDK85MfAfPY2eMA=
+
+Name: org/apache/lucene/search/NonMatchingScorer.class
+SHA1-Digest: +boEsB5arDElY0qA8IpgVdJkh6E=
+
+Name: org/apache/lucene/index/FilterIndexReader$FilterTermDocs.class
+SHA1-Digest: mTbOob59dhq9knpcc5/5ysYvM9M=
+
+Name: org/apache/lucene/store/FSDirectory.class
+SHA1-Digest: JFiUh85BntOHvy3KC775KN8503c=
+
+Name: org/apache/lucene/index/CompoundFileWriter$1.class
+SHA1-Digest: /LT+jHUDDY1dj38fOrFbelj2ZrU=
+
+Name: org/apache/lucene/queryParser/QueryParserTokenManager.class
+SHA1-Digest: vs1zA825hUIJLbM5GgyUXLxVo7k=
+
+Name: org/apache/lucene/search/QueryFilter$1.class
+SHA1-Digest: J44IDJigW5BQX1PypLEj3i/1a84=
+
+Name: org/apache/lucene/search/TopDocs.class
+SHA1-Digest: 8+5aAvFKqcZZxiMDbbHvv3JhWog=
+
+Name: org/apache/lucene/store/FSIndexOutput.class
+SHA1-Digest: UdVO3XUTc/qY2MDtT+84vAJsmmI=
+
+Name: org/apache/lucene/search/spans/SpanNotQuery$1.class
+SHA1-Digest: pVEdQSGMM06s64ffOXMD4Ku3Pwc=
+
+Name: org/apache/lucene/index/DocumentWriter.class
+SHA1-Digest: bQSVc3xILw6ssVMbW4Gp26UE70Y=
+
+Name: org/apache/lucene/analysis/LowerCaseTokenizer.class
+SHA1-Digest: zFZaJEMmSMN4ji7E9NOg+cEz5Vo=
+
+Name: org/apache/lucene/analysis/StopAnalyzer.class
+SHA1-Digest: rTqcULxqdedHcmpx9h+3Yuf04/I=
+
+Name: org/apache/lucene/analysis/standard/StandardTokenizer.class
+SHA1-Digest: b4c/4uzm2X796kFbsg4Q/YEtiwc=
+
+Name: org/apache/lucene/store/FSDirectory$1.class
+SHA1-Digest: XdSPoigqCXSX879hC6POxb2oldA=
+
+Name: org/apache/lucene/search/spans/SpanOrQuery$SpanQueue.class
+SHA1-Digest: S94pciGFqnBZwriMK3qr2DTETLs=
+
+Name: org/apache/lucene/analysis/standard/FastCharStream.class
+SHA1-Digest: Qn/pKkP7YJgN/g4dqFxfqnZlYrU=
+
+Name: org/apache/lucene/search/BooleanScorer2$2.class
+SHA1-Digest: Sh7yOdYUdXhr6CI/zzcwbz+2eV0=
+
+Name: org/apache/lucene/search/spans/SpanTermQuery$1.class
+SHA1-Digest: wSmVtbqucCtxKo/cx9HJx/57tuU=
+
+Name: org/apache/lucene/index/IndexFileNames.class
+SHA1-Digest: 4NRpZaMCqpWrmqoprs/2Zdd4AME=
+
+Name: org/apache/lucene/index/TermVectorsWriter$TVTerm.class
+SHA1-Digest: bIs4kRqrR4gViDU1pdlPolKKZu0=
+
+Name: org/apache/lucene/analysis/LetterTokenizer.class
+SHA1-Digest: f8KO9plk6lagj90PQzV0Ca5yDAk=
+
+Name: org/apache/lucene/search/HitDoc.class
+SHA1-Digest: 4E2DntT+KZVs5lM/dag7SLlLEj8=
+
+Name: org/apache/lucene/search/DisjunctionMaxQuery.class
+SHA1-Digest: bt3YPEc+6SebTWxudmvFZji5/nk=
+
+Name: org/apache/lucene/index/SegmentTermPositionVector.class
+SHA1-Digest: BVMa//BO27JUehpxojUHZ25CsG0=
+
+Name: org/apache/lucene/search/FieldCacheImpl.class
+SHA1-Digest: dJsZRDF03VZoHmO8q45j7YHXTXs=
+
+Name: org/apache/lucene/store/RAMOutputStream.class
+SHA1-Digest: 0QLV7pj+w3AjhCX8CkiRVRGiwiw=
+
+Name: org/apache/lucene/analysis/Tokenizer.class
+SHA1-Digest: AJ1A/ijWWP1PS4RRSKkT+204lTU=
+
+Name: org/apache/lucene/index/IndexWriter$1.class
+SHA1-Digest: LGSFbntDpUpWTU2zU/XKVj94REI=
+
+Name: org/apache/lucene/store/RAMDirectory$1.class
+SHA1-Digest: NIoE1aOvfe0s8i7NOeluZQxfGi8=
+
+Name: org/apache/lucene/search/Hit.class
+SHA1-Digest: qBpyJ9VyA0cvIg8zIwHp3Z4rREQ=
+
+Name: org/apache/lucene/index/TermVectorOffsetInfo.class
+SHA1-Digest: D+Z+rsrjxvJ9JjsRcsQd1CnR7MA=
+
+Name: org/apache/lucene/store/InputStream.class
+SHA1-Digest: iGfX9U4+f9xq1opv2qFzPBNvW90=
+
+Name: org/apache/lucene/search/RangeFilter.class
+SHA1-Digest: zMTAiV5wWEPxvsWSAnVHpk/hbVU=
+
+Name: org/apache/lucene/search/FieldCacheImpl$2.class
+SHA1-Digest: 3CGCPkvgeMAl1os3ZTG9g9A2LZ8=
+
+Name: org/apache/lucene/search/Explanation.class
+SHA1-Digest: VwdwwLPI/BIwqnlMpaeGuundFAg=
+
+Name: org/apache/lucene/search/ReqExclScorer.class
+SHA1-Digest: sPnuooK9oRbtPEg0gPC99b+KJhc=
+
+Name: org/apache/lucene/util/SmallFloat.class
+SHA1-Digest: 2D3SgpzTa7+mpX8fQM5oAP/5h/s=
+
+Name: org/apache/lucene/LucenePackage.class
+SHA1-Digest: Pm6fOCuDLIce6EedPm217ldPpk4=
+
+Name: org/apache/lucene/search/BooleanClause$Occur.class
+SHA1-Digest: kXVwnrBYYUtKFO6oYT8QNOP3ZdI=
+
+Name: org/apache/lucene/search/spans/NearSpans$SpansCell.class
+SHA1-Digest: H5uaQQMGbpUOnvNfncbRA1W57hs=
+
+Name: org/apache/lucene/search/ConjunctionScorer$1.class
+SHA1-Digest: +2al0t+x14aNAweSAI3AAlDpNcY=
+
+Name: org/apache/lucene/queryParser/CharStream.class
+SHA1-Digest: lz7SB3wtE0rAVwTZ9Tcl9YSarlA=
+
+Name: org/apache/lucene/queryParser/QueryParser$1.class
+SHA1-Digest: jEBkXmXluLYTqApsLdanR/jeZ9M=
+
+Name: org/apache/lucene/document/Field$TermVector.class
+SHA1-Digest: bYHWZsTnDi1/rMIzLx2IuPTP0/w=
+
+Name: org/apache/lucene/search/spans/SpanTermQuery.class
+SHA1-Digest: lh9Z9CegLslPfAHlAHcZ9T8Y584=
+
+Name: org/apache/lucene/search/TermQuery$TermWeight.class
+SHA1-Digest: S+jllXFFRxVOSCexUuac1eoCbdI=
+
+Name: org/apache/lucene/search/SortComparatorSource.class
+SHA1-Digest: skCXBc8OhjnzkD5b5bQc5CpvE88=
+
+Name: org/apache/lucene/analysis/WhitespaceAnalyzer.class
+SHA1-Digest: 1rEcnJTNPmB93sjT+V4DnC6KpUw=
+
+Name: org/apache/lucene/index/FilterIndexReader$FilterTermEnum.class
+SHA1-Digest: KE9LJk4J8WrUe3Jr5uxVyz0dNj8=
+
+Name: org/apache/lucene/index/CompoundFileWriter$FileEntry.class
+SHA1-Digest: XO8itXR2+2ENqsHpnxHKhiSOL1M=
+
+Name: org/apache/lucene/index/TermVectorsWriter.class
+SHA1-Digest: idqpzhQYfvIDRjEkSIempnIXS4o=
+
+Name: org/apache/lucene/search/FieldCacheImpl$Entry.class
+SHA1-Digest: kcwGvC8UzQcMLLCe/xnEEZv52SI=
+
+Name: org/apache/lucene/search/spans/SpanQuery.class
+SHA1-Digest: 4HZ3md/wniUYvyajd6Ytiagx1Yo=
+
+Name: org/apache/lucene/index/FilterIndexReader.class
+SHA1-Digest: MyJtTPiKpc2WDbjvTNqIn2oFKbA=
+
+Name: org/apache/lucene/search/FuzzyQuery$ScoreTermQueue.class
+SHA1-Digest: mm274kcfdYBJE11Yw3yIQit5Rhg=
+
+Name: org/apache/lucene/search/MultiSearcher$1.class
+SHA1-Digest: ESsXZ/hkh6BNZE99tbB5wzuORls=
+
+Name: org/apache/lucene/index/FilterIndexReader$FilterTermPositions.cl
+ ass
+SHA1-Digest: PAE0/Miiyao6eSnJyKo2pi4/htI=
+
+Name: org/apache/lucene/document/Field$Index.class
+SHA1-Digest: bZChQDVVOF6Yb53oFIR6MbQRUDs=
+
+Name: org/apache/lucene/index/CompoundFileReader$1.class
+SHA1-Digest: M2By0aR15OV2q1PCiIIkzkF+v9Y=
+
+Name: org/apache/lucene/index/MultipleTermPositions$IntQueue.class
+SHA1-Digest: e855MfMQjDFOj0r51U2FIuANkQI=
+
+Name: org/apache/lucene/search/Sort.class
+SHA1-Digest: vjRLnlmU4D9hQPyZqgLYrggV7pM=
+
+Name: org/apache/lucene/index/TermVectorsWriter$1.class
+SHA1-Digest: i1o6lw8i3tRrrIOzt9xOS5Flg7U=
+
+Name: org/apache/lucene/store/RAMInputStream.class
+SHA1-Digest: 53bFE4r8ECQeFWilFa2GOrgQwBI=
+
+Name: org/apache/lucene/search/BooleanScorer2$SingleMatchScorer.class
+SHA1-Digest: vkZ68S4+ljAeWk28fUSZmq7iF5M=
+
+Name: org/apache/lucene/store/RAMDirectory.class
+SHA1-Digest: h6qwDTDUR7w9+b/NpVDdT+RJmiA=
+
+Name: org/apache/lucene/document/NumberTools.class
+SHA1-Digest: gC9SkiuUrduXA+vGYhgLSMV0BX8=
+
+Name: org/apache/lucene/search/PhraseQuery$PhraseWeight.class
+SHA1-Digest: xJagdTugwuVYfMefjy5Glfcxt44=
+
+Name: org/apache/lucene/analysis/standard/StandardAnalyzer.class
+SHA1-Digest: oMN21CsCs3hMEodLIa83EIr5ZYo=
+
+Name: org/apache/lucene/document/DateTools$Resolution.class
+SHA1-Digest: txT1oKhHlLH8DXI04FteBkwum8w=
+
+Name: org/apache/lucene/search/spans/SpanOrQuery.class
+SHA1-Digest: PLfPR/VaBiw2C1fVv/W6A6GmqPI=
+
+Name: org/apache/lucene/search/BooleanQuery$TooManyClauses.class
+SHA1-Digest: Xs5D1syy8OgXG4gBoR8BqyFZ8KI=
+
+Name: org/apache/lucene/analysis/standard/StandardFilter.class
+SHA1-Digest: L0iwHdbDD13AG9ql5KwZ4+4gwdE=
+
+Name: org/apache/lucene/analysis/standard/StandardTokenizerConstants.c
+ lass
+SHA1-Digest: ozuDrFUpLHSugS9/BlvgtSHdPr4=
+
+Name: org/apache/lucene/index/TermPositionVector.class
+SHA1-Digest: PtDf5XWR/rEqvEE7wKI1qcTftkg=
+
+Name: org/apache/lucene/index/IndexReader$1.class
+SHA1-Digest: uQiqmGeM7ZgsFT9gNL/H+6Xo8Qs=
+
+Name: org/apache/lucene/search/Hits.class
+SHA1-Digest: A1atDsYCshkJTyJx1hl+Lxg26pM=
+
+Name: org/apache/lucene/store/RAMFile.class
+SHA1-Digest: bret0GXLoSol5zLIl592a2m3vW4=
+
+Name: org/apache/lucene/store/MMapDirectory$MultiMMapIndexInput.class
+SHA1-Digest: YtCjntYTMVQIcv2JIes/w97VAcs=
+
+Name: org/apache/lucene/search/spans/SpanNotQuery.class
+SHA1-Digest: 8aOUI9j106cEChqKe+ra/k5IkeY=
+
+Name: org/apache/lucene/search/BooleanScorer$Bucket.class
+SHA1-Digest: MhFPaxsu4wyeQ7KVnFw+nAqrhyc=
+
+Name: org/apache/lucene/search/spans/SpanFirstQuery.class
+SHA1-Digest: KyvVZEIC6s/6XBW34kZXXDdCI78=
+
+Name: org/apache/lucene/search/BooleanScorer$BucketTable.class
+SHA1-Digest: JsuQ4igWMAqOV6kCYpwcgonMlwE=
+
+Name: org/apache/lucene/queryParser/QueryParser$JJCalls.class
+SHA1-Digest: JL4zdB/YvPnLDPAVMxYntYh/k5Q=
+
+Name: org/apache/lucene/search/BooleanScorer2.class
+SHA1-Digest: Xv3AD/UNtYOLwoJW7rLqWYvRmzQ=
+
+Name: org/apache/lucene/search/RangeQuery.class
+SHA1-Digest: 3PsYUDXgYtWtKqgP3+UZimq2LuM=
+
+Name: org/apache/lucene/queryParser/QueryParser$Operator.class
+SHA1-Digest: +kCmT4LTjdwb9fHIitW5+wBk888=
+
+Name: org/apache/lucene/search/ParallelMultiSearcher$1.class
+SHA1-Digest: eOwFuFxDruAIep/yurXl89swzPk=
+
+Name: org/apache/lucene/store/MMapDirectory$1.class
+SHA1-Digest: OBVJSjdshz6Oc21VYroUlSCZXq0=
+
+Name: org/apache/lucene/store/FSIndexInput.class
+SHA1-Digest: VWrQ/o024wUxu2uTnvr8vpaTKRY=
+
+Name: org/apache/lucene/queryParser/TokenMgrError.class
+SHA1-Digest: yxieSsykzV1IsDCyPo8U4gjn8Fs=
+
+Name: org/apache/lucene/analysis/standard/CharStream.class
+SHA1-Digest: y7ehNZnDj+kCKgq16R8JSXXdSnA=
+
+Name: org/apache/lucene/search/FieldDoc.class
+SHA1-Digest: pqYK6pQZqf8DpOptlLMgCTjZVfc=
+
+Name: about_files/asl-v20.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: org/apache/lucene/index/CompoundFileReader$FileEntry.class
+SHA1-Digest: ICger7P3Izjw+cAKbKneg5cwwwY=
+
+Name: org/apache/lucene/search/DisjunctionMaxScorer.class
+SHA1-Digest: PREHEN1EkFOby5RjdlkTsYRUZ64=
+
+Name: org/apache/lucene/index/TermVectorsReader.class
+SHA1-Digest: 4x8xkUM29KBpQTfT91WJtxYWQzE=
+
+Name: org/apache/lucene/search/FieldSortedHitQueue$2.class
+SHA1-Digest: qogFhiWGQzLxb7MuzWTtkX+DNFQ=
+
+Name: org/apache/lucene/search/FieldCache$StringIndex.class
+SHA1-Digest: SVoWi3HpbKmcWP9XQBEpbeLeBQI=
+
+Name: org/apache/lucene/search/spans/NearSpans$CellQueue.class
+SHA1-Digest: tEWVgFZ968LeU6llcVZIfVFbfC0=
+
+Name: org/apache/lucene/analysis/standard/StandardTokenizerTokenManage
+ r.class
+SHA1-Digest: H1bggRgSC9xJik0chExrc89DfLo=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/apache/lucene/queryParser/ParseException.class
+SHA1-Digest: g87EmK0qh0zShyjUJ+g1nIC9238=
+
+Name: org/apache/lucene/search/CachingWrapperFilter.class
+SHA1-Digest: G+U+21bQx7btxYG6zX2dgKy1dnc=
+
+Name: org/apache/lucene/index/IndexFileNameFilter.class
+SHA1-Digest: 1BqCQlzqw5IjoTAaL8l29PmB+mM=
+
+Name: org/apache/lucene/search/spans/SpanScorer.class
+SHA1-Digest: bEOZVy/lAcTdiz/IOcdoZDa+/E8=
+
+Name: org/apache/lucene/index/IndexWriter$3.class
+SHA1-Digest: ogNFaUsO6ivuM9t4JBEGyRW4xms=
+
+Name: org/apache/lucene/index/SegmentInfos.class
+SHA1-Digest: 70tQadpo7YL9Y+iqy23VcP2xvn0=
+
+Name: org/apache/lucene/search/PhraseQueue.class
+SHA1-Digest: scERKFV3aS8mVt7mi1oMMghToO8=
+
+Name: org/apache/lucene/search/DisjunctionMaxQuery$DisjunctionMaxWeigh
+ t.class
+SHA1-Digest: khZrJ0/Fetp49FMbZ/EfGMheRRs=
+
+Name: org/apache/lucene/search/Filter.class
+SHA1-Digest: uNWfIXyl4o1431ng9+wwbdwJaPM=
+
+Name: org/apache/lucene/search/PhraseScorer.class
+SHA1-Digest: mIkctuGCQyJPmzloUWfq3nrP2mc=
+
+Name: org/apache/lucene/search/BooleanQuery$BooleanWeight.class
+SHA1-Digest: qAjQwsVP1UPVFXxHb5HYAkqZtxU=
+
+Name: org/apache/lucene/index/CompoundFileWriter.class
+SHA1-Digest: 2AGpw7osJFG4t3fmFLbCnn4Gwrg=
+
+Name: org/apache/lucene/search/BooleanQuery.class
+SHA1-Digest: ranzU1V20FYqb6/wdgvmZC/ugto=
+
+Name: org/apache/lucene/search/Searchable.class
+SHA1-Digest: JnV6/nA6ZBJDfbzJjllmnHENJ9I=
+
+Name: org/apache/lucene/analysis/SimpleAnalyzer.class
+SHA1-Digest: GdqItnsh5NoLErzppmoaQXiNcwE=
+
+Name: org/apache/lucene/analysis/PerFieldAnalyzerWrapper.class
+SHA1-Digest: SEgp4hoYw/y+QxrEQxXPkHcpmc4=
+
+Name: org/apache/lucene/util/StringHelper.class
+SHA1-Digest: 13ySjur+fIHrGE7iqYhD/JIIYnw=
+
+Name: org/apache/lucene/index/SegmentMergeQueue.class
+SHA1-Digest: WbD0w6gV+VX3Z9cSGLmeCFyBsG8=
+
+Name: org/apache/lucene/index/TermInfosWriter.class
+SHA1-Digest: 0pDHlY08nLgElNNJQI/THFIluHU=
+
+Name: org/apache/lucene/search/ScoreDocComparator$1.class
+SHA1-Digest: rlMWOPxjSLdI0w6eKzzw+JObEJ0=
+
+Name: org/apache/lucene/analysis/LengthFilter.class
+SHA1-Digest: nsKnR8/NQ1Sdq4mntmUVYMGzhJ8=
+
+Name: org/apache/lucene/index/SegmentTermPositions.class
+SHA1-Digest: t8axf0mk+fK5+ZfaFjzfKCbTQL8=
+
+Name: plugin.properties
+SHA1-Digest: VoyAYH13PaywpT3tZ+7AJ5ooMJE=
+
+Name: org/apache/lucene/search/MultiSearcher$CachedDfSource.class
+SHA1-Digest: Y/ym3JF0j/clrbwFgy2tz3PogLY=
+
+Name: org/apache/lucene/store/OutputStream.class
+SHA1-Digest: LnDNd6jVIuMRsSTf2qCDMYKM+Sg=
+
+Name: org/apache/lucene/search/BooleanScorer2$1.class
+SHA1-Digest: cKLngQ4SgTleNCGXXCHzrPkP/PA=
+
+Name: org/apache/lucene/search/FilteredQuery$2.class
+SHA1-Digest: dIOT1PEANvqvwq5Jed6aTti6hYg=
+
+Name: org/apache/lucene/analysis/standard/TokenMgrError.class
+SHA1-Digest: lhAtuEa7itUKeyQ3Ib27HSPWrFg=
+
+Name: org/apache/lucene/analysis/StopFilter.class
+SHA1-Digest: 3YOOoIWnEuFgcBSu+aneBpbBGV4=
+
+Name: org/apache/lucene/search/IndexSearcher.class
+SHA1-Digest: C1dsbrNFl0zOqJ+z4gZ4PFIIgSw=
+
+Name: org/apache/lucene/analysis/WordlistLoader.class
+SHA1-Digest: HNaZI1vqval6rG1wJYsT/Sq00nA=
+
+Name: org/apache/lucene/analysis/WhitespaceTokenizer.class
+SHA1-Digest: jU/mPCZkGwRrJ6iD5m7lrJbDilA=
+
+Name: org/apache/lucene/search/MatchAllDocsQuery$MatchAllScorer.class
+SHA1-Digest: UXu+tSR7JhDJ7TOa/zDwiLQRIT8=
+
+Name: org/apache/lucene/analysis/standard/Token.class
+SHA1-Digest: QdP79CrXXW6I2TdCrRIRKfxJYOw=
+
+Name: org/apache/lucene/search/FieldCacheImpl$1.class
+SHA1-Digest: 2VKcEOnGdKP/xTL7cCP4cF/Xy5E=
+
+Name: org/apache/lucene/search/ReqOptSumScorer.class
+SHA1-Digest: jDzScmevd6Asd2HG7kvyHsmmayU=
+
+Name: org/apache/lucene/search/BooleanScorer2$Coordinator.class
+SHA1-Digest: JA57kPSLU8jYgqqVeY26gayWR+o=
+
+Name: org/apache/lucene/search/ConjunctionScorer.class
+SHA1-Digest: f1Lia/6jOhoQP6ijpiFAVh11oww=
+
+Name: org/apache/lucene/index/SegmentMergeInfo.class
+SHA1-Digest: sbghx5OWT3jnYSjtIbCjoBSIQaw=
+
+Name: org/apache/lucene/queryParser/MultiFieldQueryParser.class
+SHA1-Digest: 5azzTZVzpPnR7Qav86xJPWNXrU4=
+
+Name: org/apache/lucene/search/FuzzyQuery$ScoreTerm.class
+SHA1-Digest: USxS1rn4llcVzkjCmgCfzbsInJg=
+
+Name: org/apache/lucene/search/ScoreDocComparator.class
+SHA1-Digest: SAx98JZat5kjVM7990y7uvASCXU=
+
+Name: org/apache/lucene/search/BooleanScorer$SubScorer.class
+SHA1-Digest: e0Hlkp1oUYNN4PuAZpLUSeZI0+I=
+
+Name: org/apache/lucene/search/FilteredTermEnum.class
+SHA1-Digest: 3Wvgct4AsyyhBQhfU3aqadO+qZI=
+
+Name: org/apache/lucene/search/spans/SpanWeight.class
+SHA1-Digest: rdYmpJkaACMJ90rcvLJWyJkgnFg=
+
+Name: org/apache/lucene/util/Constants.class
+SHA1-Digest: toyjFl2zAETPRuaoYTfNtKgbyAc=
+
+Name: org/apache/lucene/index/SegmentMerger.class
+SHA1-Digest: qcAzO3oXDziqeOjixmvGkyXjbIY=
+
+Name: org/apache/lucene/search/DisjunctionSumScorer.class
+SHA1-Digest: AR2XhIDtamQ/Ge8OVwbn8tlOJ0w=
+
+Name: org/apache/lucene/store/BufferedIndexInput.class
+SHA1-Digest: AfAKxHfbH5P1fzPSwh+q9aKbFPM=
+
+Name: org/apache/lucene/store/IndexInput.class
+SHA1-Digest: YjURuZvuYKTKBt+iNr76nXQzy3o=
+
+Name: org/apache/lucene/index/MultipleTermPositions$TermPositionsQueue
+ .class
+SHA1-Digest: y+TEHuOHPpYE64CA5CHqFSquLOI=
+
+Name: org/apache/lucene/search/MultiSearcher.class
+SHA1-Digest: fnXxP7qoTrx6CObO9RjBxJNTiPo=
+
+Name: org/apache/lucene/index/CompoundFileReader.class
+SHA1-Digest: jwdII6XcQY519s0eG21yYTvJp5E=
+
+Name: org/apache/lucene/search/spans/SpanNearQuery.class
+SHA1-Digest: +vEdaaydjlLBe9oLmxC6T0fSXqY=
+
+Name: org/apache/lucene/search/FilteredQuery.class
+SHA1-Digest: chVxELhQBlktjWYk1XJW24ylybs=
+
+Name: org/apache/lucene/index/SegmentTermDocs.class
+SHA1-Digest: ofBe6PXg60uUXwGk4YcKLp9Psjg=
+
+Name: org/apache/lucene/index/TermInfosReader.class
+SHA1-Digest: 6lbor7Wx14baiIaYVacxP+mD5KA=
+
+Name: org/apache/lucene/search/FieldDocSortedHitQueue.class
+SHA1-Digest: lJhzxTVREqox1YQ6Utmz7ydgygU=
+
+Name: org/apache/lucene/search/SortComparator$1.class
+SHA1-Digest: Vex+Tar/46QFcvFAE6hN8/Ja5/8=
+
+Name: org/apache/lucene/store/MMapDirectory$MMapIndexInput.class
+SHA1-Digest: JBDHhkl/gR+dmjFd6ps8c6Ouzww=
+
+Name: org/apache/lucene/search/FieldSortedHitQueue$4.class
+SHA1-Digest: g7ycmhwAmqzOhNKa8DDlPPU22OY=
+
+Name: org/apache/lucene/search/RemoteSearchable.class
+SHA1-Digest: HOEvnB3ba5QGgFFuYUVIuUKDj8s=
+
+Name: org/apache/lucene/index/MultipleTermPositions.class
+SHA1-Digest: i/JY8fyn49afHz1AlHccZOd2cFI=
+
+Name: org/apache/lucene/document/Field$Store.class
+SHA1-Digest: 0x2pDQRArQcmaOwSDCgCM3qm2rk=
+
+Name: org/apache/lucene/search/ConstantScoreQuery$ConstantScorer.class
+SHA1-Digest: sS32g1J4R3nrQssLp6gJhlhy/+M=
+
+Name: org/apache/lucene/search/PhraseQuery.class
+SHA1-Digest: fxvZzMO9D7cffiQJUisL7ETCHbI=
+
+Name: org/apache/lucene/search/MatchAllDocsQuery.class
+SHA1-Digest: 0/c1OD1DPdAk0Xj9s84vufa5i8U=
+
+Name: org/apache/lucene/index/IndexWriter$5.class
+SHA1-Digest: ipKgCbCPFGbn5yFsmkLFwJXp3PY=
+
+Name: org/apache/lucene/store/Directory.class
+SHA1-Digest: HVSs9ie8a8nbYDGyBiiLnazG4K0=
+
+Name: org/apache/lucene/search/MultiSearcherThread.class
+SHA1-Digest: f3DlEPXeACHcXW0kapAGs7iBlI4=
+
+Name: org/apache/lucene/search/TopFieldDocCollector.class
+SHA1-Digest: J7rWN7FRp0M1ljrr6r473IctaHk=
+
+Name: org/apache/lucene/analysis/PorterStemFilter.class
+SHA1-Digest: r2MK9sN8xaQCMUhIY5YnAu3yrQQ=
+
+Name: org/apache/lucene/index/SegmentInfo.class
+SHA1-Digest: tAG2BkY3Ig1EXAMGoxrWh4370Zg=
+
+Name: org/apache/lucene/analysis/LowerCaseFilter.class
+SHA1-Digest: 1iwO3GIiTW/5OrvG92PhnULzMDM=
+
+Name: org/apache/lucene/index/Posting.class
+SHA1-Digest: j46POb21t/1Q2k46OA3ZvzFZAIs=
+
+Name: org/apache/lucene/search/QueryFilter.class
+SHA1-Digest: LCL705rmBVhZ7xv96tBzD/Cb/Qg=
+
+Name: org/apache/lucene/queryParser/FastCharStream.class
+SHA1-Digest: oshmewtnf253/FFnPxtEv/ZHBps=
+
+Name: org/apache/lucene/search/HitIterator.class
+SHA1-Digest: Fxux1HUPYjQAPQSqxOdxCPSCs+A=
+
+Name: org/apache/lucene/index/ParallelReader$ParallelTermDocs.class
+SHA1-Digest: cIgEzpTlwqr7ARmacT0RSaBYKjY=
+
+Name: org/apache/lucene/index/FieldInfo.class
+SHA1-Digest: sc1s/aAuqTzV+1CpGyGnA3e2Gsc=
+
+Name: org/apache/lucene/index/TermVectorsWriter$TVField.class
+SHA1-Digest: uNeiCgblbVKtN8HWGmX4S+r0aFQ=
+
+Name: org/apache/lucene/search/BooleanScorer.class
+SHA1-Digest: TB2NGTsUQXVyi+xFqw6XlezqOHc=
+
+Name: org/apache/lucene/index/TermFreqVector.class
+SHA1-Digest: 1zzNq6ebHY3/8Vfu0QChVc5Ohpc=
+
+Name: org/apache/lucene/queryParser/QueryParser$LookaheadSuccess.class
+SHA1-Digest: mT10lpxNHoMFPkZAuvTQSd2TjmI=
+
+Name: org/apache/lucene/index/ParallelReader.class
+SHA1-Digest: hJHZ05ZbT6m4y67xBvw7N2w3krw=
+
+Name: org/apache/lucene/search/BooleanScorer$Collector.class
+SHA1-Digest: n+4ZcIzEq3Ba6AqwuEdHvheSN0I=
+
+Name: org/apache/lucene/search/SortComparator.class
+SHA1-Digest: Hd6FFtq0Caq+MCLc0JATXW/p/po=
+
+Name: org/apache/lucene/search/spans/SpanFirstQuery$1.class
+SHA1-Digest: /e1MMaY/OwmkpYjyA7nFkst6aBU=
+
+Name: org/apache/lucene/search/MultiPhraseQuery.class
+SHA1-Digest: s1Xvbq53ZauPagC+fKWIbUSqThk=
+
+Name: org/apache/lucene/search/QueryTermVector.class
+SHA1-Digest: b9g8vNoS8Dg/ocVrCSdOrey0guE=
+
+Name: org/apache/lucene/search/BooleanClause.class
+SHA1-Digest: M2rcK4Luy9wP0TXgLHkE4BIp1rE=
+
+Name: org/apache/lucene/search/FuzzyTermEnum.class
+SHA1-Digest: gnpLsDH3B+4F60oia8+Kt79sxoA=
+
+Name: org/apache/lucene/index/TermPositions.class
+SHA1-Digest: iS9aGBlZ1qT4LwAHcl5VfSwm48E=
+
+Name: org/apache/lucene/index/SegmentTermEnum.class
+SHA1-Digest: jcXaOop8d48s1QHn0TCFGu/BvbM=
+
+Name: org/apache/lucene/index/SegmentTermVector.class
+SHA1-Digest: eRCJjKIdINnTpRMABNRE0GErZnU=
+
+Name: org/apache/lucene/search/Scorer.class
+SHA1-Digest: GTAMkGqqDzRhBGqZEZJoux9vAUI=
+
+Name: org/apache/lucene/index/ParallelReader$ParallelTermPositions.cla
+ ss
+SHA1-Digest: vdAScaxuqoVRmrVWcA0b/NoBXug=
+
+Name: org/apache/lucene/search/FieldSortedHitQueue$1.class
+SHA1-Digest: UwslrcQlrvZKbVuShEdTZoAfWL8=
+
+Name: org/apache/lucene/analysis/TokenFilter.class
+SHA1-Digest: ESIbMh6L7xPrGj7lLw336heiHnA=
+
+Name: org/apache/lucene/analysis/TokenStream.class
+SHA1-Digest: LMWJrhxbRSGa+IKyX/rZohlqbGw=
+
+Name: org/apache/lucene/search/WildcardQuery.class
+SHA1-Digest: +4d02dtzyy6nKCvxOGe1GxpRAFQ=
+
+Name: org/apache/lucene/index/IndexWriter$2.class
+SHA1-Digest: hBVSj62Zsa4nSRYEx8xfJLkkq8A=
+
+Name: about.html
+SHA1-Digest: 606g8JTFVKK8SEHTGMPs4ku0x6k=
+
+Name: org/apache/lucene/analysis/Analyzer.class
+SHA1-Digest: tIVSoruMcHEtdEwiKw3HeFcbyhc=
+
+Name: org/apache/lucene/index/MultipleTermPositions$1.class
+SHA1-Digest: y3nf3/nCRu8yi+EgkI5Ho/LGB0A=
+
+Name: org/apache/lucene/queryParser/QueryParser.class
+SHA1-Digest: LICirs71lFzDvZXUiaIFZYim14E=
+
+Name: org/apache/lucene/index/IndexReader$FieldOption.class
+SHA1-Digest: yGIf+w/OLNGjB3WNLwqrC3OOhII=
+
+Name: org/apache/lucene/document/DateField.class
+SHA1-Digest: phSAs9B8lwprci5xC+GyZvyGu2w=
+
+Name: org/apache/lucene/search/FieldCache$FloatParser.class
+SHA1-Digest: 2F7UlZScmx/hM9HWF/NoqvbNRNk=
+
+Name: org/apache/lucene/analysis/standard/ParseException.class
+SHA1-Digest: TeRVPbyW9zux/QRYn1VqeRUmVk0=
+
+Name: org/apache/lucene/search/MultiTermQuery.class
+SHA1-Digest: mKqxjRg5FQEhwLtqfm8ajDnMTH8=
+
+Name: org/apache/lucene/index/IndexModifier.class
+SHA1-Digest: 3SArf/KaTO8e20H0fVmPj9cxOVg=
+
+Name: org/apache/lucene/search/ConstantScoreQuery$ConstantWeight.class
+SHA1-Digest: v5YDwklGJLs3LGiTZ9lqe1/Ho9s=
+
+Name: org/apache/lucene/search/DateFilter.class
+SHA1-Digest: l6GtJ6iptkd2+lZjC9SrhCLN0RQ=
+
+Name: org/apache/lucene/search/WildcardTermEnum.class
+SHA1-Digest: WJwXGhkrjTo1UbvvfK2KEUgLzpM=
+
+Name: org/apache/lucene/search/ParallelMultiSearcher.class
+SHA1-Digest: SoSh0ZCO3UEsNi4gS8WGkipm6u4=
+
+Name: org/apache/lucene/search/TopDocCollector.class
+SHA1-Digest: PR06RpviepTTbs2V0zdYdcyrxV4=
+
+Name: org/apache/lucene/index/ParallelReader$ParallelTermEnum.class
+SHA1-Digest: 4xNGgTE8OYxr20Gm2VKHi9GutVE=
+
+Name: org/apache/lucene/analysis/Token.class
+SHA1-Digest: DHuG6qSS5C5KUU27bOigrciRa3Q=
+
+Name: org/apache/lucene/document/Field.class
+SHA1-Digest: KGl8aNZy1wdVFGed8qXkVSGZFKE=
+
+Name: org/apache/lucene/search/BooleanQuery$1.class
+SHA1-Digest: K9ZrK/LrTyFGVPTvoCXF2BTG5Fs=
+
+Name: org/apache/lucene/index/SegmentReader$Norm.class
+SHA1-Digest: Ce/jz/SalZI24Xl4Hl6/EVGekgw=
+
+Name: org/apache/lucene/index/FieldInfos.class
+SHA1-Digest: mrLs8m4oawZYdKYKHGMch5CC0uo=
+
+Name: org/apache/lucene/index/Term.class
+SHA1-Digest: 8IB+s6V0CzwIB17/WtrBTYkWp5c=
+
+Name: org/apache/lucene/search/FieldCache$IntParser.class
+SHA1-Digest: GfjQbl6zZjc+iILIQNWZ+Speg2k=
+
+Name: org/apache/lucene/search/BooleanQuery$BooleanWeight2.class
+SHA1-Digest: RRSVtFpqdJAFBP/KGvpS9UQMuFk=
+
+Name: org/apache/lucene/queryParser/QueryParserConstants.class
+SHA1-Digest: gzGcN/Ibxuq8DA/KuSELgoQnwy8=
+
+Name: org/apache/lucene/search/ConstantScoreRangeQuery.class
+SHA1-Digest: pdwLNi84IobYY+X/87uMIa4gTiA=
+
+Name: org/apache/lucene/search/spans/NearSpans.class
+SHA1-Digest: 5nfVQ+u60qpG7K3iq6zri8gQCxI=
+
+Name: org/apache/lucene/search/TermQuery.class
+SHA1-Digest: nAw3TNqihv8kIP3sKzbecCPy3IY=
+
+Name: org/apache/lucene/search/SloppyPhraseScorer.class
+SHA1-Digest: kpGn3kP+YJbtX2wTfLV9h5f1ZQQ=
+
+Name: org/apache/lucene/index/MultiTermDocs.class
+SHA1-Digest: 3Qcbf6bRm+SkmmBLadOBlcbOIko=
+
+Name: org/apache/lucene/index/CompoundFileReader$CSIndexInput.class
+SHA1-Digest: fOKy1TxyhGOsw6u/tb2RUy+31W0=
+
+Name: org/apache/lucene/search/FilteredQuery$1.class
+SHA1-Digest: Atgl8mgT3pIROumJ/yNMxpNvQZU=
+
+Name: org/apache/lucene/search/FuzzyQuery.class
+SHA1-Digest: jQRvApB9SOEIl6BbFOeRmV07u/k=
+
+Name: org/apache/lucene/store/Lock.class
+SHA1-Digest: oAE7Ns57cFrSfLvn2nIb7Mh91/g=
+
+Name: org/apache/lucene/document/DateTools.class
+SHA1-Digest: vwjjGyyQ7yXIOz8Lhzsha+LeP9A=
+
+Name: org/apache/lucene/index/IndexWriter.class
+SHA1-Digest: 2aTyrINyFDG1ADA5vKB9jDuDKjw=
+
+Name: org/apache/lucene/search/MatchAllDocsQuery$MatchAllDocsWeight.cl
+ ass
+SHA1-Digest: HMPBRLg5Pxg4Y4YbC8Q5QCH56ks=
+
+Name: org/apache/lucene/search/Query.class
+SHA1-Digest: BYTC3fRKGi0ok3dgbRE8WOQ1pZw=
+
+Name: org/apache/lucene/util/BitVector.class
+SHA1-Digest: K+ea69DGgqnUE5N0hKlMi1tWdvw=
+
+Name: org/apache/lucene/queryParser/Token.class
+SHA1-Digest: C4DtErVRaqgbN6mG0iPi0wdtd9U=
+
+Name: org/apache/lucene/index/TermDocs.class
+SHA1-Digest: I96Q4NkmiSHu9usQUa5XOFODAMc=
+
+Name: org/apache/lucene/index/FieldsWriter.class
+SHA1-Digest: MBSjN1OLGMcH14zcNMrVi6yZd1g=
+
+Name: org/apache/lucene/search/PrefixQuery.class
+SHA1-Digest: 4rCkMusGaylOwMK5LwseQ7lhRns=
+
+Name: org/apache/lucene/analysis/PorterStemmer.class
+SHA1-Digest: Gm0tuF2GCaV2+3jPL7USzrLJwfw=
+
+Name: org/apache/lucene/search/Weight.class
+SHA1-Digest: ITlpv6Zqbh48FPnQMhChk3gLZ80=
+
+Name: org/apache/lucene/search/ExactPhraseScorer.class
+SHA1-Digest: vIkDqUkj1hWXqlreMnsSgqwJAEs=
+
+Name: org/apache/lucene/store/FSIndexInput$Descriptor.class
+SHA1-Digest: 8Ef8hMdgX0dP2CBYOa5Dl3PtvWQ=
+
+Name: org/apache/lucene/index/IndexReader$2.class
+SHA1-Digest: 79Hy+bova28+FloyX7FoVuHZVsM=
+
+Name: org/apache/lucene/search/TopFieldDocs.class
+SHA1-Digest: QINP25DEswgAibI3aSJw9l+uqSI=
+
+Name: org/apache/lucene/analysis/KeywordAnalyzer.class
+SHA1-Digest: cD86XBElctG4hQ1kiAyBH3wJnMc=
+
+Name: org/apache/lucene/search/PhrasePositions.class
+SHA1-Digest: IcC3zPhnRml39EwGfqbhkbrzeS8=
+
+Name: org/apache/lucene/index/SegmentReader.class
+SHA1-Digest: FTp9gqXZV7RzHjItSrh+bEkBmo4=
+
+Name: org/apache/lucene/search/Searcher.class
+SHA1-Digest: HzbGl9c9rFsDQl4kwFxLINA7dGY=
+
+Name: org/apache/lucene/search/FieldSortedHitQueue.class
+SHA1-Digest: I7dxT7TQ+6Q/V1Kba7KXMDl2CXY=
+
+Name: org/apache/lucene/search/DisjunctionSumScorer$ScorerQueue.class
+SHA1-Digest: TW1wrW1IcuTp1VwJzUwUh+al/9k=
+
+Name: org/apache/lucene/index/MultiReader.class
+SHA1-Digest: qk0zrFgwtPCxxZKxWup2TtnMHGg=
+
+Name: org/apache/lucene/search/ConstantScoreQuery.class
+SHA1-Digest: K+ZOSrHlrqjtioTN0151CM81pNk=
+
+Name: org/apache/lucene/search/SortField.class
+SHA1-Digest: TV1JnRtjD54nvyJN7fS3smRpQyw=
+
+Name: org/apache/lucene/index/TermInfo.class
+SHA1-Digest: NDr62CWz3Qkeiul5NcXKOSHji3s=
+
+Name: org/apache/lucene/util/ToStringUtils.class
+SHA1-Digest: RY0n2Q8+mfBEXc9cr5jls4JL5R8=
+
+Name: org/apache/lucene/store/BufferedIndexOutput.class
+SHA1-Digest: Yp3lKLOh3uDQ50v/XRtb+esGtho=
+
+Name: org/apache/lucene/index/MultiTermEnum.class
+SHA1-Digest: xPB3GDvVlUMt7aedaMi9mCOzmeg=
+
+Name: org/apache/lucene/util/Parameter.class
+SHA1-Digest: u3OayJFhJs0ZnTGxbEiTtohOLK4=
+
+Name: org/apache/lucene/search/spans/Spans.class
+SHA1-Digest: kkUVybRufgN7xCfpwojrQh8Jfcg=
+
+Name: org/apache/lucene/search/Similarity.class
+SHA1-Digest: 7/o86tOa7hK8D0aHx5Tv0Qxp0vQ=
+
+Name: org/apache/lucene/search/DefaultSimilarity.class
+SHA1-Digest: bSPAmStF3Ool73ndxYwAbqPl1KU=
+
+Name: org/apache/lucene/search/FieldSortedHitQueue$3.class
+SHA1-Digest: bRlP5iPxfItHEOILQyD6QA1eCso=
+
+Name: org/apache/lucene/search/RemoteSearchable_Stub.class
+SHA1-Digest: Yl+Sy0YYl+WTOx2NSBTImfyrjzw=
+
+Name: org/apache/lucene/analysis/ISOLatin1AccentFilter.class
+SHA1-Digest: YJEG5hBJeBIwgyOI+07B1AiVkWk=
+
+Name: org/apache/lucene/search/FieldCache.class
+SHA1-Digest: 6iTTSM6XO59WuPUz3W7BuBMwxk8=
+
+Name: org/apache/lucene/search/TermScorer.class
+SHA1-Digest: PZu/+PWxQSmvV3rssETvLmpyM6I=
+
+Name: org/apache/lucene/index/TermBuffer.class
+SHA1-Digest: +BBKwYMnqSy7wMSTjJPMeQWx1Pk=
+
+Name: org/apache/lucene/index/IndexWriter$4.class
+SHA1-Digest: nJtK7WGxH+/Culs3gdu1P8HmnT8=
+
+Name: org/apache/lucene/index/IndexReader.class
+SHA1-Digest: acC7pOi02iSBiSpK+2Z+shC/ips=
+
+Name: org/apache/lucene/index/TermEnum.class
+SHA1-Digest: sIvf0kyRY/G1FUuQdWLo2tqrGqc=
+
+Name: org/apache/lucene/search/IndexSearcher$1.class
+SHA1-Digest: CbPX0Tt4EBdyyVArS1rJc9Vo50M=
+
+Name: org/apache/lucene/analysis/CharTokenizer.class
+SHA1-Digest: 5kbj4/Jwt4yMG4NJMwkme+m90OY=
+
+Name: org/apache/lucene/analysis/KeywordTokenizer.class
+SHA1-Digest: DI9MFEDKK/h2bKsKZ8QnOynbsfM=
+
+Name: org/apache/lucene/search/HitCollector.class
+SHA1-Digest: RwQeC1/koC3njYW0/Q8Tg2oYgwM=
+
+Name: org/apache/lucene/search/MultiPhraseQuery$MultiPhraseWeight.clas
+ s
+SHA1-Digest: +nAeivQU/DOjqS9tBDhu28j8UBs=
+
+Name: org/apache/lucene/search/PhrasePrefixQuery.class
+SHA1-Digest: t6B7eGTge6q1nySqzjeshB5Fb00=
+
+Name: org/apache/lucene/analysis/de/WordlistLoader.class
+SHA1-Digest: dMKX2ZhElTV3Re9Wv5WG4TeBK3Q=
+
+Name: org/apache/lucene/store/IndexOutput.class
+SHA1-Digest: SE0gulpmKIFsRZ2nIPPSkCKWm2Q=
+
+Name: org/apache/lucene/search/HitQueue.class
+SHA1-Digest: 1Mldeg5/JXq6nleDgsMIVrb9y+U=
+
+Name: org/apache/lucene/search/SimilarityDelegator.class
+SHA1-Digest: iDfU1uAoa6zU3XdvZ/rAZrSfUj4=
+
+Name: org/apache/lucene/index/FieldsReader.class
+SHA1-Digest: yLZMOlUTwvlQAErCVBeZZKnJXLc=
+
+Name: org/apache/lucene/search/spans/SpanOrQuery$1.class
+SHA1-Digest: fe8g4PeuM6gIzKFFtE5ZhZbgGxU=
+
diff --git a/dependencyManifests/org.mortbay.jetty.server_6.1.15.v200905151201.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.mortbay.jetty.server_6.1.15.v200905151201.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index 9ce5586..0000000
--- a/dependencyManifests/org.mortbay.jetty.server_6.1.15.v200905151201.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,801 +0,0 @@
-Manifest-Version: 1.0
-Bundle-DocURL: http://jetty.mortbay.org
-mode: development
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Built-By: jesse
-package: org.mortbay
-Bundle-SymbolicName: org.mortbay.jetty.server
-Ignore-Package: org.mortbay.jetty.bio,org.mortbay.servlet.jetty,org.mo
- rtbay.jetty.nio,org.mortbay.resource,org.mortbay.io.nio,org.mortbay.j
- etty.security,org.mortbay.jetty.deployer,org.mortbay.xml,org.mortbay.
- io.bio,org.mortbay.jetty.servlet,org.mortbay.jetty.handler,org.mortba
- y.io,org.mortbay.jetty,org.mortbay.jetty.webapp
-Export-Package: org.mortbay.jetty.bio;uses:="org.mortbay.log,org.mortb
- ay.thread,org.mortbay.io.bio,org.mortbay.io,org.mortbay.jetty";versio
- n="6.1.15",org.mortbay.servlet.jetty;uses:="javax.servlet.http,org.mo
- rtbay.servlet,org.mortbay.jetty";version="6.1.15",org.mortbay.jetty.n
- io;uses:="org.mortbay.log,org.mortbay.thread,org.mortbay.io,org.mortb
- ay.jetty,org.mortbay.util.ajax,org.mortbay.io.nio";version="6.1.15",o
- rg.mortbay.resource;uses:="org.mortbay.log,org.mortbay.util";version=
- "6.1.15",org.mortbay.io.nio;uses:="org.mortbay.log,org.mortbay.compon
- ent,org.mortbay.thread,org.mortbay.io,org.mortbay.jetty";version="6.1
- .15",org.mortbay.jetty.security;uses:="org.mortbay.util,org.mortbay.c
- omponent,javax.servlet.http,org.mortbay.jetty.bio,javax.security.cert
- ,org.mortbay.resource,org.mortbay.log,javax.servlet,org.mortbay.io.bi
- o,org.mortbay.jetty.servlet,org.mortbay.io,org.mortbay.jetty.handler,
- org.mortbay.jetty.webapp,org.mortbay.jetty,javax.net.ssl";version="6.
- 1.15",org.mortbay.jetty.deployer;uses:="org.mortbay.util,org.mortbay.
- component,org.mortbay.resource,org.mortbay.log,org.mortbay.xml,org.mo
- rtbay.jetty.handler,org.mortbay.jetty,org.mortbay.jetty.webapp";versi
- on="6.1.15",org.mortbay.xml;uses:="org.mortbay.util,org.mortbay.compo
- nent,org.xml.sax,org.mortbay.resource,org.mortbay.log,javax.xml.parse
- rs,org.xml.sax.helpers";version="6.1.15",org.mortbay.io.bio;uses:="or
- g.mortbay.log,org.mortbay.io";version="6.1.15",org.mortbay.jetty.serv
- let;uses:="org.mortbay.util,javax.servlet.http,org.mortbay.component,
- org.mortbay.jetty.nio,org.mortbay.resource,org.mortbay.io.nio,org.mor
- tbay.jetty.security,org.mortbay.log,javax.servlet,org.mortbay.io,org.
- mortbay.jetty.handler,org.mortbay.jetty";version="6.1.15",org.mortbay
- .io;uses:="org.mortbay.util";version="6.1.15",org.mortbay.jetty.handl
- er;uses:="org.mortbay.util,org.mortbay.component,javax.servlet.http,o
- rg.mortbay.resource,org.mortbay.log,javax.servlet,org.mortbay.jetty.s
- ervlet,org.mortbay.io,org.mortbay.jetty.webapp,org.mortbay.jetty";ver
- sion="6.1.15",org.mortbay.jetty;uses:="org.mortbay.util,org.mortbay.c
- omponent,javax.servlet.http,org.mortbay.jetty.bio,org.mortbay.thread,
- org.mortbay.resource,org.mortbay.io.nio,org.mortbay.jetty.security,or
- g.mortbay.log,javax.servlet,org.mortbay.jetty.servlet,org.mortbay.jet
- ty.handler,org.mortbay.io,org.mortbay.jetty.webapp,org.mortbay.util.a
- jax";version="6.1.15",org.mortbay.jetty.webapp;uses:="org.mortbay.uti
- l,javax.servlet.http,org.mortbay.resource,org.mortbay.jetty.security,
- org.mortbay.jetty.deployer,org.mortbay.log,javax.servlet,org.mortbay.
- xml,org.mortbay.jetty.servlet,org.mortbay.jetty.handler,org.mortbay.j
- etty";version="6.1.15"
-Bundle-Version: 6.1.15.v200905151201
-url: http://jetty.mortbay.org/project/modules/jetty
-Bundle-Description: Jetty server core
-Build-Jdk: 1.5.0_16
-Bundle-Vendor: Mort Bay Consulting
-Bnd-LastModified: 1236265002054
-Bundle-Name: Jetty Server
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
-Tool: Bnd-0.0.238
-Archiver-Version: Plexus Archiver
-Created-By: 1.5.0_16 (Apple Inc.)
-implementation-version: 6.1.15
-Import-Package: javax.net.ssl,javax.security.cert,javax.servlet;versio
- n="2.5",javax.servlet.http;version="2.5",javax.servlet.jsp;resolution
- :=optional,javax.servlet.resources;resolution:=optional;version="2.5"
- ,javax.xml.parsers,org.apache.jasper.servlet;resolution:=optional,org
- .mortbay.component;version="6.1",org.mortbay.jetty.handler.management
- ;resolution:=optional,org.mortbay.log;version="6.1",org.mortbay.servl
- et;version="6.1",org.mortbay.thread;version="6.1",org.mortbay.util;ve
- rsion="6.1",org.mortbay.util.ajax;version="6.1",org.xml.sax,org.xml.s
- ax.helpers
-Bundle-ManifestVersion: 2
-
-Name: org/mortbay/jetty/AbstractConnector$Acceptor.class
-SHA1-Digest: CM6nolwuYbxOZozFhsv98Sqg1fQ=
-
-Name: org/mortbay/jetty/RetryRequest.class
-SHA1-Digest: 8yswLo4q4oqrWqWHn0ymm0OpKZc=
-
-Name: org/mortbay/io/nio/SelectChannelEndPoint.class
-SHA1-Digest: 42ESqYKs5D7Dmd/oDuW9G4D/bpk=
-
-Name: org/mortbay/jetty/Server$1.class
-SHA1-Digest: NusMjKANBtCMOxIHAK75YI02fBI=
-
-Name: org/mortbay/jetty/Request$1.class
-SHA1-Digest: I6MECLnusq+DcWghK3RPb4p6RfE=
-
-Name: org/mortbay/jetty/security/HashUserRealm$1.class
-SHA1-Digest: N8OifVKOdKQ+RnX2rn7P25/cgDA=
-
-Name: org/mortbay/jetty/Server$Graceful.class
-SHA1-Digest: 3RBhO5d1oTG7r8Hn4AJvOecv6bI=
-
-Name: org/mortbay/jetty/servlet/ErrorPageErrorHandler$ErrorCodeRange.c
- lass
-SHA1-Digest: g92Yh+kfgsbi9SDHCJIe0nCAlJE=
-
-Name: org/mortbay/jetty/security/B64Code.class
-SHA1-Digest: XrEyLzpDAM3T1ZYsbOgZsb5Cf5A=
-
-Name: org/mortbay/jetty/security/HashUserRealm$User.class
-SHA1-Digest: PJvvXW8I61xH+FaWoamO8NgY0+U=
-
-Name: org/mortbay/jetty/handler/MovedContextHandler.class
-SHA1-Digest: 3oYHOqn2XN5rC0ZeI+CAHXF4KmI=
-
-Name: org/mortbay/jetty/nio/SelectChannelConnector$ConnectorEndPoint.c
- lass
-SHA1-Digest: azWquJPl/jVZIBfvUfOqLAot1Os=
-
-Name: org/mortbay/jetty/servlet/FilterMapping.class
-SHA1-Digest: H07NmICdA1sjHnee+ldAuM0MsFo=
-
-Name: org/mortbay/jetty/deployer/ConfigurationManager.class
-SHA1-Digest: VBccFln3qO6JfPMvSgn03n4BGOI=
-
-Name: org/mortbay/jetty/servlet/DefaultServlet$UnCachedContent.class
-SHA1-Digest: YNooAhqezXTJ6PXsMJqKMYqRYuY=
-
-Name: org/mortbay/jetty/webapp/TagLibConfiguration.class
-SHA1-Digest: f1MFeSrSYxPm4ZXsNUGgAblgjqI=
-
-Name: org/mortbay/jetty/HttpConnection$RequestHandler.class
-SHA1-Digest: UQXyoqhPv/O0yPFnsyOtzQ6HJ4o=
-
-Name: org/mortbay/jetty/HttpFields$3.class
-SHA1-Digest: 8CTvRBfWfXaDa4yUv+6My0LZlpw=
-
-Name: org/mortbay/jetty/AbstractBuffers$1.class
-SHA1-Digest: RW2XzNrqCKIzBgZ9k6zwCLZPB+Y=
-
-Name: org/mortbay/jetty/RequestLog.class
-SHA1-Digest: WBMkhirDKioswtv61GfJHiREL24=
-
-Name: org/mortbay/jetty/security/FormAuthenticator$FormCredential.clas
- s
-SHA1-Digest: TbSCRsGYFdyW4S+JmKEDWR/PTVA=
-
-Name: org/mortbay/jetty/security/UserRealm.class
-SHA1-Digest: BP7gGpkmJpWsZ9Mcij8vRRC0M5o=
-
-Name: org/mortbay/jetty/SessionManager.class
-SHA1-Digest: 7Ga3Xrx40z+FGVAs9pt4mkcMgWE=
-
-Name: org/mortbay/io/Buffers.class
-SHA1-Digest: pDHzsMctp9H7IfNaTW6NMUvarjY=
-
-Name: org/mortbay/jetty/handler/AbstractHandler.class
-SHA1-Digest: 7KNfTEon0XexY4rAtsJpyXXWftg=
-
-Name: org/mortbay/jetty/HttpSchemes.class
-SHA1-Digest: d/oYz8yJLNVt/MEh7Dhx3BUXh4o=
-
-Name: org/mortbay/jetty/security/Credential.class
-SHA1-Digest: ZfIFbqSN/EgfGA6uXqEOl5LIzNw=
-
-Name: org/mortbay/jetty/handler/ContextHandlerCollection.class
-SHA1-Digest: VrxUXYppoAmBKAbLDye7LFX9m14=
-
-Name: org/mortbay/jetty/ResourceCache$Content.class
-SHA1-Digest: chgn/sTAW0rYAsnnpICLXdVBKHY=
-
-Name: org/mortbay/jetty/Handler.class
-SHA1-Digest: aEQUI9GnbiLQnx0ZS0SKia4Pm7s=
-
-Name: org/mortbay/jetty/handler/ContextHandler.class
-SHA1-Digest: Kfs3uU4qn1rBCXTNfYrp7cT1nYE=
-
-Name: org/mortbay/jetty/Connector.class
-SHA1-Digest: rezyGaNYviCCxcLjYli9QnMr/Fk=
-
-Name: org/mortbay/jetty/HttpConnection.class
-SHA1-Digest: R1YqEcz+BROsozgz0WzI6lp7il8=
-
-Name: org/mortbay/jetty/security/HashUserRealm.class
-SHA1-Digest: 1+0HWITvAnsJkeGHeQtBXjkawz4=
-
-Name: org/mortbay/jetty/Generator.class
-SHA1-Digest: yg0gWmThGEZ+flnfF/HvVuOhQSE=
-
-Name: org/mortbay/jetty/servlet/ServletHolder$1.class
-SHA1-Digest: 7fHdIzbn8gH6crGRtL35dEtdMnk=
-
-Name: org/mortbay/io/Portable.class
-SHA1-Digest: Ow6VUrT6qGUmnJt4Wy3MgEpxSZc=
-
-Name: org/mortbay/io/Connection.class
-SHA1-Digest: ElR1xTLY29NF4SMzltdXbhrjkwM=
-
-Name: org/mortbay/jetty/nio/SelectChannelConnector$1.class
-SHA1-Digest: Z1tZl86Iu1y55xo3CSDE07C811I=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionManager$SessionIf.class
-SHA1-Digest: lDwH2Ib25ZCq5QrzrOmXG42Hr3I=
-
-Name: org/mortbay/servlet/jetty/IncludableGzipFilter.class
-SHA1-Digest: EArIz9mAN3VQwLMTlunWMN8vJWw=
-
-Name: org/mortbay/jetty/HttpConnection$1.class
-SHA1-Digest: TBk2wKjcDUxSjQ+hZSc3tBsvtns=
-
-Name: org/mortbay/resource/ResourceCollection.class
-SHA1-Digest: /M7z4t/C5fK8oJCBfPUMv0bsRoc=
-
-Name: org/mortbay/jetty/HttpHeaders.class
-SHA1-Digest: plrZBZrSVSYhRbcoAdmCPvV9b8U=
-
-Name: org/mortbay/jetty/AbstractGenerator$Output.class
-SHA1-Digest: CnIkz1Qf+mxegUbUoEZ4kNxH+Y8=
-
-Name: org/mortbay/jetty/servlet/HashSessionIdManager.class
-SHA1-Digest: 0rFBF0qLBUIsIgAfyeNEcxVFsgw=
-
-Name: org/mortbay/io/ByteArrayBuffer.class
-SHA1-Digest: VZeBvuLpF/GOr1bLL/hbzNPs2AM=
-
-Name: org/mortbay/servlet/jetty/IncludableGzipFilter$IncludableGzipStr
- eam.class
-SHA1-Digest: zz++r+nGsCTUM7iy3ykzokQxljc=
-
-Name: org/mortbay/io/nio/SelectorManager.class
-SHA1-Digest: uOEN1pmQ1AbRqT9ZDUb2IqFZZOI=
-
-Name: org/mortbay/io/BufferDateCache.class
-SHA1-Digest: v1H+zDScvOIXGja3PXSRWso87lU=
-
-Name: org/mortbay/jetty/HttpFields.class
-SHA1-Digest: vwqEP16aCqkMTL1cF0DIYvW20Z8=
-
-Name: org/mortbay/jetty/AbstractBuffers.class
-SHA1-Digest: WE5WEYUbccrXxg0cnw25RkM5iIo=
-
-Name: org/mortbay/io/BufferCache.class
-SHA1-Digest: sOQ2nrW2aiLSQFeScfp4cJ3IPXo=
-
-Name: org/mortbay/jetty/security/SecurityHandler$1.class
-SHA1-Digest: ER49Vtrcg6WGZmhr6QIYaH6qYVQ=
-
-Name: org/mortbay/jetty/deployer/WebAppDeployer.class
-SHA1-Digest: FFwbii4sZhZGD6D1D4ubNKxxhyA=
-
-Name: org/mortbay/jetty/security/HashUserRealm$WrappedUser.class
-SHA1-Digest: +48I9jIihdKNki/SNyYIf9IrAYc=
-
-Name: org/mortbay/jetty/NCSARequestLog.class
-SHA1-Digest: qRqDudlPG6BRZ9plboFhPJCORDw=
-
-Name: org/mortbay/xml/configure_6_0.dtd
-SHA1-Digest: hXdKbI2G1glglLoW5D86j8VbVO8=
-
-Name: org/mortbay/jetty/Main.class
-SHA1-Digest: y4R7YsfG7wkIi6p4Yt2DCVoD48Q=
-
-Name: org/mortbay/jetty/servlet/Context$SContext.class
-SHA1-Digest: Fijv/WHwdkCEFCe14CZ9qNnGqs4=
-
-Name: org/mortbay/jetty/nio/SelectChannelConnector$RetryContinuation.c
- lass
-SHA1-Digest: KbWE87O0MER50OAVx2VX/ZNhIh8=
-
-Name: org/mortbay/jetty/servlet/HashSessionManager$2.class
-SHA1-Digest: zhGiTYyrioZlawxhE6UaTmBtUJ8=
-
-Name: org/mortbay/jetty/security/DigestAuthenticator$Digest.class
-SHA1-Digest: NgriRBbuHRYh8ysTRaVnH0npR7c=
-
-Name: org/mortbay/io/nio/NIOBuffer.class
-SHA1-Digest: QQL110lHCDEKgr3X+srYMXWWaAw=
-
-Name: org/mortbay/jetty/Response.class
-SHA1-Digest: 8AM9i4Ne6o/PV/zzOggJPhdZUnU=
-
-Name: org/mortbay/jetty/HttpTokens.class
-SHA1-Digest: cNQhFFjHKPZY4eBnUdRQ/4b356k=
-
-Name: org/mortbay/xml/XmlParser.class
-SHA1-Digest: N2k8K7Ua+l97B03CGCkRrioOpYc=
-
-Name: org/mortbay/xml/XmlConfiguration.class
-SHA1-Digest: V5ArIkt7Aw+N6uvTBZIo310jR5M=
-
-Name: org/mortbay/jetty/InclusiveByteRange.class
-SHA1-Digest: QINsln7jqVsW6aD/RTVH0aVZ4Bg=
-
-Name: org/mortbay/xml/XmlParser$Handler.class
-SHA1-Digest: 5SmhzrwrPIXaEfo6NCZKzavjdzg=
-
-Name: META-INF/p2.inf
-SHA1-Digest: IM0jnOHZgRf5b1nhCMKDWgObbR0=
-
-Name: org/mortbay/jetty/servlet/DefaultServlet$NIOResourceCache.class
-SHA1-Digest: krVhMX/C8MC/h13Q4qnlt7C93tw=
-
-Name: org/mortbay/io/BufferCache$CachedBuffer.class
-SHA1-Digest: nav4HMJr6m/RQ9lUeexlRPaMfvo=
-
-Name: org/mortbay/io/View.class
-SHA1-Digest: GXbHr2lg43nbI7tqWKzOC7+ygno=
-
-Name: org/mortbay/jetty/HttpFields$Field.class
-SHA1-Digest: 0SsKISviqwj4JhoR/j032dCVvm8=
-
-Name: org/mortbay/jetty/MimeTypes.class
-SHA1-Digest: kjHQ4FE1U+x9ADEx5ySG9oDA5fk=
-
-Name: org/mortbay/jetty/servlet/SessionHandler.class
-SHA1-Digest: oauiteFDU8VX9Z6F0WDG7xqErWY=
-
-Name: org/mortbay/jetty/webapp/webdefault.xml
-SHA1-Digest: wT92QK2n/e8BnGOTkcVewHJABKg=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/mortbay/jetty/servlet/Invoker.class
-SHA1-Digest: 1wIgiOVYR5s4NToN5v9M5d9fZiQ=
-
-Name: org/mortbay/jetty/AbstractBuffers$ThreadBuffers.class
-SHA1-Digest: AOm6kLkY7TutAdcdI0O+smdPa6I=
-
-Name: org/mortbay/io/Buffer.class
-SHA1-Digest: bB+gaVIBkYIkQanAkDXR5IFq3ns=
-
-Name: org/mortbay/jetty/servlet/Dispatcher.class
-SHA1-Digest: EcZTSc3HERs0fwdjz15xHodn45k=
-
-Name: org/mortbay/jetty/HttpFields$5.class
-SHA1-Digest: 1G1p9Ep3xAKlKQhM0puUwch59Eo=
-
-Name: org/mortbay/jetty/deployer/ContextDeployer$1.class
-SHA1-Digest: U5PNetJDnuhV5hbUlfBOMEiD/y0=
-
-Name: org/mortbay/jetty/deployer/ContextDeployer$ScannerListener.class
-SHA1-Digest: cs180KLdV7Kmn6KTvmV3N5H2eUA=
-
-Name: org/mortbay/jetty/nio/InheritedChannelConnector.class
-SHA1-Digest: 2psM48K7NJ+dfob+jxUPEEpA3Mk=
-
-Name: org/mortbay/jetty/AbstractConnector.class
-SHA1-Digest: jh9stri1NZI+e9OJMd2T7f3Y9mU=
-
-Name: org/mortbay/jetty/AbstractGenerator.class
-SHA1-Digest: J95Ndse0ruuTYbkBBPQc4yXKsHA=
-
-Name: org/mortbay/jetty/HttpConnection$OutputWriter.class
-SHA1-Digest: DnIr/Z/HJo37ToLsOxczXKtiWIE=
-
-Name: org/mortbay/jetty/bio/SocketConnector.class
-SHA1-Digest: ldPdfKus6eBp6txJgHX8OmNOdeQ=
-
-Name: org/mortbay/io/ByteArrayEndPoint.class
-SHA1-Digest: DOW5nNO8ioCVD5IrE4YQn6io1vU=
-
-Name: org/mortbay/io/BufferUtil.class
-SHA1-Digest: uEZPViRrhpjAE7E+ifK/LefYIec=
-
-Name: org/mortbay/resource/JarFileResource.class
-SHA1-Digest: LYrS3OmWCgyhudm+MUQgL3lEjMY=
-
-Name: org/mortbay/jetty/security/HTAccessHandler$DummyPrincipal.class
-SHA1-Digest: fSpn0w0eaXciSrJO4X9x+pZ5XpI=
-
-Name: org/mortbay/jetty/security/SslSocketConnector$SslConnection.clas
- s
-SHA1-Digest: eFAJnjxTYVbH6+Lr+P3zobrCWv8=
-
-Name: org/mortbay/jetty/HttpStatus.class
-SHA1-Digest: ggVBWFZNMAMdIYn8B9HjHF4uBtA=
-
-Name: org/mortbay/jetty/security/JDBCUserRealm.class
-SHA1-Digest: RhDhOtVfYatQq4Lv4aFOa4xHsCc=
-
-Name: org/mortbay/xml/XmlParser$Attribute.class
-SHA1-Digest: GNFmWxxWM4u/06VUeyEUFgaorEU=
-
-Name: org/mortbay/jetty/LocalConnector.class
-SHA1-Digest: EzJ9fnRwujDW+PxXFEvOWIAlJbA=
-
-Name: org/mortbay/jetty/servlet/PathMap.class
-SHA1-Digest: G44XixZsv8SolA4csKxll935E6I=
-
-Name: org/mortbay/jetty/HttpParser$EventHandler.class
-SHA1-Digest: QYGP7pUogONx8ePWZo4GQCSfpk4=
-
-Name: org/mortbay/io/EndPoint.class
-SHA1-Digest: HYJLZMgUXX/3S/MoERB+aETJ1CI=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionIdManager.class
-SHA1-Digest: joBJWaEDSRn8/9CRm8oyeDtyOPw=
-
-Name: org/mortbay/io/bio/StreamEndPoint.class
-SHA1-Digest: Oyb0nEIUu8wSvIk5WsEpIh+P3/M=
-
-Name: org/mortbay/jetty/handler/DefaultHandler.class
-SHA1-Digest: q8QZNrfBU1QnOGU0hB/jR66bRPo=
-
-Name: org/mortbay/jetty/servlet/FilterHolder$Config.class
-SHA1-Digest: FT0qGu2qW+q+symvoJjSQ0YbNg0=
-
-Name: org/mortbay/jetty/useragents
-SHA1-Digest: L1Que0HQzz2k/A35ASuFKDf/KRw=
-
-Name: org/mortbay/jetty/HttpFields$2.class
-SHA1-Digest: dX2cIT4UgWXPEtvbQEErGEiZgHU=
-
-Name: org/mortbay/io/AbstractBuffer.class
-SHA1-Digest: KH7MuTDMEjVgaueXtnjvt6eKJjM=
-
-Name: org/mortbay/jetty/EofException.class
-SHA1-Digest: 2xJjv7c1csBEm5DjkGg9SVM2Eos=
-
-Name: org/mortbay/jetty/webapp/Configuration.class
-SHA1-Digest: eN9BC2JA+hwLofblJH2rmJvv6JE=
-
-Name: org/mortbay/jetty/mime.properties
-SHA1-Digest: Mb0BP+D4h15t2hwAJPnJoEPzDrk=
-
-Name: org/mortbay/jetty/encoding.properties
-SHA1-Digest: nawjyXyYOBX2cP3pQM1j23xQW4U=
-
-Name: org/mortbay/jetty/servlet/ServletHolder$SingleThreadedWrapper.cl
- ass
-SHA1-Digest: Td36cwwAWtePWfdXVQ1JWSA16oQ=
-
-Name: org/mortbay/jetty/security/DigestAuthenticator.class
-SHA1-Digest: htUJRcczgbYBektClNeT96SRsT4=
-
-Name: org/mortbay/jetty/nio/SelectChannelConnector.class
-SHA1-Digest: PhOijv//xgYglMgLl+ejgWoIHXA=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionManager.class
-SHA1-Digest: QKfDCAEVUxi1WcHugfPWTO8vUME=
-
-Name: org/mortbay/resource/JarResource$1.class
-SHA1-Digest: cOkmwnDjE9YBqxXPrz7IZhAbQVw=
-
-Name: org/mortbay/jetty/HttpContent.class
-SHA1-Digest: /kSoFcq2FXm7l6i4wSDFS0qT8a4=
-
-Name: org/mortbay/jetty/favicon.ico
-SHA1-Digest: cRUhA6ENfShwQf9zSllBtY4JlYE=
-
-Name: org/mortbay/jetty/handler/ErrorHandler.class
-SHA1-Digest: pUaQ+YuD3XAvJYubTUNMDpqm9j4=
-
-Name: org/mortbay/jetty/servlet/ServletHandler$CachedChain.class
-SHA1-Digest: SUXUbGQ9rEkU+3d7VkbWBjMG5Mo=
-
-Name: org/mortbay/jetty/security/FormAuthenticator$1.class
-SHA1-Digest: QFS1O/bBg7xuFX9Blul4ulrNUuk=
-
-Name: org/mortbay/jetty/handler/HandlerWrapper.class
-SHA1-Digest: w5uIkDK4j7ZYov8FAX2AoEa+ttU=
-
-Name: org/mortbay/jetty/servlet/PathMap$Entry.class
-SHA1-Digest: 2QSLCwIBi9jFFQKTi4TSCN8/sL0=
-
-Name: org/mortbay/jetty/security/HashSSORealm.class
-SHA1-Digest: gdfDzlQgPF9ioFzz9q5/ti19uAw=
-
-Name: org/mortbay/jetty/security/SecurityHandler$NotChecked.class
-SHA1-Digest: vfc71m/m6rGspC/SoCH2SavLnjQ=
-
-Name: org/mortbay/jetty/security/SslSocketConnector.class
-SHA1-Digest: Xjr4tj8Giy50XN/O0u/lfu+odfM=
-
-Name: org/mortbay/jetty/security/Credential$MD5.class
-SHA1-Digest: XXhsWyy1HjZXlck+r5rGUx5MFz8=
-
-Name: org/mortbay/jetty/HandlerContainer.class
-SHA1-Digest: 9QOyV01dV1b4G8zDel9HnmUfkEE=
-
-Name: org/mortbay/jetty/HttpOnlyCookie.class
-SHA1-Digest: SkBdN89U6HRJrQupDfO3WGELwDI=
-
-Name: org/mortbay/jetty/SessionIdManager.class
-SHA1-Digest: +IN6TsR2F5bP45Xt4uOx1Og1E+4=
-
-Name: org/mortbay/jetty/Parser.class
-SHA1-Digest: MPtg+rigrVEN81IXQh7Jq7i0NE4=
-
-Name: org/mortbay/jetty/HttpGenerator.class
-SHA1-Digest: G1IHGzpsrRQRm06EHPhpZGlgSMM=
-
-Name: org/mortbay/jetty/security/ConstraintMapping.class
-SHA1-Digest: Pd+RoMxwKVlpsVuLUSoWf07NLv8=
-
-Name: org/mortbay/jetty/servlet/ErrorPageErrorHandler.class
-SHA1-Digest: /nwVQ6JjVMxrWmaLhaJtTLWlOQY=
-
-Name: org/mortbay/jetty/deployer/ContextDeployer.class
-SHA1-Digest: oqZGxaMa90tPI3Fh9bXYK+T7Sxk=
-
-Name: org/mortbay/servlet/jetty/IncludableGzipFilter$IncludableRespons
- eWrapper.class
-SHA1-Digest: 4H9CBcN6QYHrO2r4+sCdx9Sg8fg=
-
-Name: org/mortbay/jetty/bio/SocketConnector$Connection.class
-SHA1-Digest: SEPGiT43zsk9+TCMzbzGhmKzCPw=
-
-Name: org/mortbay/io/Buffer$CaseInsensitve.class
-SHA1-Digest: 1C3B/XyrB1lQhnH9rS94Ab5gzIc=
-
-Name: org/mortbay/jetty/servlet/Invoker$Request.class
-SHA1-Digest: BtE1VqPADos5BVmZ5j6vkmO5f0Q=
-
-Name: org/mortbay/resource/JarResource.class
-SHA1-Digest: yeNh+uZNcHuO3yRTxFl7vXuTAXI=
-
-Name: org/mortbay/jetty/security/SslSocketConnector$CachedInfo.class
-SHA1-Digest: hcXZ+Y5fmduJhpVrqfS3xbkH1CQ=
-
-Name: org/mortbay/jetty/HttpURI.class
-SHA1-Digest: 8MgExJ6bWBGtSLdS8B8+Utk0AS4=
-
-Name: org/mortbay/jetty/handler/MovedContextHandler$Redirector.class
-SHA1-Digest: QRrGlmrEy7Q/ltz7v1Vunhi0cpw=
-
-Name: org/mortbay/jetty/servlet/HashSessionManager$1.class
-SHA1-Digest: EPu3QyHdjMs4GwY8sll73HNFJz4=
-
-Name: org/mortbay/jetty/handler/AbstractHandlerContainer.class
-SHA1-Digest: FyJfbsk/rqR6sDopRH328LOUDZs=
-
-Name: org/mortbay/jetty/security/Constraint.class
-SHA1-Digest: WwmUOCea80wARoTzP97V4gwXZpM=
-
-Name: org/mortbay/jetty/Server.class
-SHA1-Digest: jjIYsncGamwiWgHuw/2wa0Av8/A=
-
-Name: org/mortbay/jetty/HttpParser.class
-SHA1-Digest: ak+HEXNSBBVtij4V7TLkKPItuF8=
-
-Name: org/mortbay/xml/XmlParser$NoopHandler.class
-SHA1-Digest: O/MfKJ1qqsgCaS98JxlEs5lJQaE=
-
-Name: org/mortbay/resource/ResourceFactory.class
-SHA1-Digest: wZ67pVhYTVplq6ta7dPf97nbCuE=
-
-Name: org/mortbay/jetty/ResourceCache.class
-SHA1-Digest: ZUmsnmLJqMKQox09zvhBBCwV50g=
-
-Name: org/mortbay/jetty/security/BasicAuthenticator.class
-SHA1-Digest: auF5+vHL/idgArKIpQZvu9UfaAA=
-
-Name: org/mortbay/jetty/servlet/Dispatcher$IncludeAttributes.class
-SHA1-Digest: c7JKpIV6fDOa7MrBe5MPmaNe3yE=
-
-Name: org/mortbay/jetty/servlet/ServletHandler.class
-SHA1-Digest: X+R5cf4K1vKOrdfBFwhznSlXyus=
-
-Name: org/mortbay/io/nio/IndirectNIOBuffer.class
-SHA1-Digest: bXPU3mo7Fd/3HOxXqLQWzt40Ar4=
-
-Name: org/mortbay/jetty/servlet/HashSessionManager$ClassLoadingObjectI
- nputStream.class
-SHA1-Digest: dF/xTxQBx6G2atIc9PeGpwXbL+A=
-
-Name: org/mortbay/jetty/security/ClientCertAuthenticator.class
-SHA1-Digest: CBhAu/ilrTZggCUUbVd6tark3Yg=
-
-Name: org/mortbay/jetty/security/HashUserRealm$2.class
-SHA1-Digest: n911I5uw+PSqzqRK5LcFkR5Ag7c=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionManager$Session.class
-SHA1-Digest: wYvu7uniu35y1t76Cq8DZ3vloA8=
-
-Name: org/mortbay/io/nio/DirectNIOBuffer.class
-SHA1-Digest: PA4bt4yJdDV0AghfQNw/DpKYGuA=
-
-Name: org/mortbay/jetty/handler/StatisticsHandler.class
-SHA1-Digest: EPNI/ahktRhoHZR1uchIVbEgQis=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: org/mortbay/io/nio/SelectorManager$SelectSet.class
-SHA1-Digest: qRj58T4YsSxazGjbE9BqXCg9kk0=
-
-Name: org/mortbay/jetty/security/HTAccessHandler$HTAccess.class
-SHA1-Digest: yLADpUgo0M2axb65sXTt7Kv/mnY=
-
-Name: org/mortbay/xml/XmlParser$Node$1.class
-SHA1-Digest: r/kZ2OA0IU6djUNsceul4gK4Dm8=
-
-Name: about_files/NOTICE.txt
-SHA1-Digest: S2mLpZqjAF/cOLO7xor4ncakiKA=
-
-Name: org/mortbay/jetty/security/SSORealm.class
-SHA1-Digest: HnETZ6rHzsPLQcoha9xo0oP5glE=
-
-Name: org/mortbay/io/SimpleBuffers.class
-SHA1-Digest: Iv/wvMFR1S6v2s029pMyDixL+ww=
-
-Name: org/mortbay/jetty/servlet/Dispatcher$ForwardAttributes.class
-SHA1-Digest: M59bLoiDjLRGKkUcaB2AsigAkgc=
-
-Name: org/mortbay/jetty/security/HTAccessHandler.class
-SHA1-Digest: o9DV0aHzcK1JRrVwX1nVEi64qCI=
-
-Name: org/mortbay/jetty/security/ServletSSL.class
-SHA1-Digest: C8x8CpeOCnAetZFU79QBFPLtGio=
-
-Name: about.html
-SHA1-Digest: Wn0eDew/J21UnMI/Vzte/e/1dHQ=
-
-Name: org/mortbay/jetty/servlet/HashSessionManager.class
-SHA1-Digest: aPhKZnPcgWUs+SishHKGuPNKy/Q=
-
-Name: org/mortbay/jetty/HttpFields$4.class
-SHA1-Digest: wcdkN6lkI6OytFEyrLRt9o+rAIE=
-
-Name: org/mortbay/jetty/servlet/Holder.class
-SHA1-Digest: xS9gxiRpCaQDAn+RVB8A2nMgFw8=
-
-Name: org/mortbay/jetty/handler/ContextHandler$SContext.class
-SHA1-Digest: rNxzqKWza4JCbtPnP3ngldbYjzU=
-
-Name: org/mortbay/jetty/nio/AbstractNIOConnector.class
-SHA1-Digest: DlZlR3al8PO2Gy/ysBjw2XvuG5c=
-
-Name: org/mortbay/jetty/HttpHeaderValues.class
-SHA1-Digest: QmP7JiHBnfMTV00OWO+9yEOaMDo=
-
-Name: org/mortbay/jetty/handler/HandlerCollection.class
-SHA1-Digest: HY5lefKJ3wZtmYYhDiNDl9QCcMU=
-
-Name: org/mortbay/jetty/handler/HandlerList.class
-SHA1-Digest: OOtuK/89xDDfVAnuoFU3d7WtAz8=
-
-Name: org/mortbay/jetty/nio/BlockingChannelConnector.class
-SHA1-Digest: CBmIX1CAu+Dc/sGbHr7sPrzLg+0=
-
-Name: org/mortbay/jetty/HttpMethods.class
-SHA1-Digest: VNmXttXuM2d1tEsmInL9z2PKd9g=
-
-Name: org/mortbay/jetty/security/FormAuthenticator.class
-SHA1-Digest: OUnhvMMLnPPOSSkgR55IdjmgZUI=
-
-Name: org/mortbay/jetty/Response$NullOutput.class
-SHA1-Digest: Fz5gmPloi4KgsPiOaMxKKRwnD4w=
-
-Name: org/mortbay/jetty/HttpVersions.class
-SHA1-Digest: 0nbQ0ITNkJ1uM6MegRjBPnJwpmM=
-
-Name: org/mortbay/jetty/handler/RewriteHandler.class
-SHA1-Digest: RgLSDxqwvFhrDIB7S7V3EN/WCBU=
-
-Name: org/mortbay/jetty/handler/RequestLogHandler.class
-SHA1-Digest: Q6CNlI89cS9gfPzyLzug3Dzm/wg=
-
-Name: org/mortbay/jetty/webapp/WebInfConfiguration.class
-SHA1-Digest: tTMHOBbJ34VXQa48RRwls/lhQDw=
-
-Name: org/mortbay/resource/URLResource.class
-SHA1-Digest: MZXjuKy2B3JIa8OqtRypX3M47J4=
-
-Name: org/mortbay/jetty/servlet/ServletHandler$Chain.class
-SHA1-Digest: dUSqZfICnHDgw9a38wmT+IhdI3Y=
-
-Name: org/mortbay/io/nio/SelectChannelEndPoint$IdleTask.class
-SHA1-Digest: wshigKLS0ibu94aUh3VWnsQSyTk=
-
-Name: org/mortbay/jetty/servlet/DefaultServlet.class
-SHA1-Digest: BOSPuEIbcTdUM21CjBxJAQ9EVzI=
-
-Name: org/mortbay/jetty/webapp/WebXmlConfiguration.class
-SHA1-Digest: KdvWnG6P9k7plNTikIIQgc9Omq4=
-
-Name: org/mortbay/io/ByteArrayBuffer$CaseInsensitive.class
-SHA1-Digest: 2xamn1YgD+fsMKu9zyaepQ5fsZE=
-
-Name: org/mortbay/jetty/EncodedHttpURI.class
-SHA1-Digest: B8qu5uWDPMEZWUn+1t4cBh/I6+w=
-
-Name: org/mortbay/jetty/security/PKCS12Import.class
-SHA1-Digest: 9zymEuVguSUmc018LpZxZD2aIkY=
-
-Name: org/mortbay/xml/XmlParser$Node.class
-SHA1-Digest: TFiuI8i0uLbN6mYCM9pANF4Rrq4=
-
-Name: org/mortbay/jetty/security/SecurityHandler.class
-SHA1-Digest: UPhg+IcnrfN9wjG2gGlCCy4nCqM=
-
-Name: org/mortbay/jetty/servlet/Context.class
-SHA1-Digest: FnmZMZ9Cx2nufi/yTup+hDa8FR0=
-
-Name: org/mortbay/jetty/HttpException.class
-SHA1-Digest: +dzPrFH//oa6F+3QMdE8IZYZqEI=
-
-Name: org/mortbay/io/bio/SocketEndPoint.class
-SHA1-Digest: 6DNjLkyMeFP5+EJi78gWDkJVHWU=
-
-Name: org/mortbay/resource/BadResource.class
-SHA1-Digest: hh5secKW/qlMxxNbRy9Awg0fvpM=
-
-Name: org/mortbay/io/nio/ChannelEndPoint.class
-SHA1-Digest: Swkq9TcTTiYSywSCKdK012U9/Pk=
-
-Name: org/mortbay/jetty/security/Credential$Crypt.class
-SHA1-Digest: hf1nO5edbrcKl6Iswxd1I/ZO9W4=
-
-Name: org/mortbay/jetty/security/SecurityHandler$2.class
-SHA1-Digest: 14yN2GZ1ykHpMGyWTeJJnZBBXzE=
-
-Name: org/mortbay/jetty/HttpFields$1.class
-SHA1-Digest: bB/48eatAWNvrN0KHeY5zqWeAYg=
-
-Name: org/mortbay/jetty/security/HashUserRealm$KnownUser.class
-SHA1-Digest: Rat9DSGqMnMGiGSG/mked2lBVrs=
-
-Name: org/mortbay/jetty/nio/NIOConnector.class
-SHA1-Digest: MmB3371QbSQNJp6RrvcEnx2qqeI=
-
-Name: org/mortbay/jetty/webapp/WebAppClassLoader.class
-SHA1-Digest: URnPrL/diFLMn/pJAJb7xtUIx0s=
-
-Name: org/mortbay/io/bio/StringEndPoint.class
-SHA1-Digest: pc6A63fnCCl69h6AFQkX0BekI3I=
-
-Name: org/mortbay/jetty/webapp/WebAppContext.class
-SHA1-Digest: NXpb5e0EMGtCnmTg6wc1jck9mCc=
-
-Name: org/mortbay/jetty/servlet/HashSessionManager$Session.class
-SHA1-Digest: 8jk6VxdCtf0C3nHyHNP9ySqccvI=
-
-Name: org/mortbay/jetty/deployer/FileConfigurationManager.class
-SHA1-Digest: wsA+iDcd1fBYgvWTkJV+L4JLXWY=
-
-Name: org/mortbay/jetty/Request.class
-SHA1-Digest: kwkpLd86OURzCAZTL+U1mOGt/qU=
-
-Name: org/mortbay/jetty/webapp/JettyWebXmlConfiguration.class
-SHA1-Digest: bjp9V5ZVcsQi7KzXbaONS/By+8Y=
-
-Name: org/mortbay/jetty/HttpParser$Input.class
-SHA1-Digest: M4H5oMORpygi0da+P+iMJ+fTzIM=
-
-Name: org/mortbay/jetty/handler/ResourceHandler.class
-SHA1-Digest: Wh4zQbJGc/furGOsLRpbVLEP//c=
-
-Name: org/mortbay/jetty/Response$1.class
-SHA1-Digest: GoyoNHwuG0WWh9NjZ8Ekwh/mB8I=
-
-Name: org/mortbay/jetty/servlet/FilterHolder.class
-SHA1-Digest: cQAHZ4fJIwD7nTgKWCyV6Xs50wQ=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionManager$1.class
-SHA1-Digest: 8vezj+7QLXkQFlxzKaQbQNffhyA=
-
-Name: org/mortbay/io/View$CaseInsensitive.class
-SHA1-Digest: QKfPWtOtlqro6VprkvpZtl3zBAg=
-
-Name: org/mortbay/jetty/servlet/ServletMapping.class
-SHA1-Digest: R5KFnvXLgXB/5E5Q6FQFH0+HhCA=
-
-Name: org/mortbay/resource/Resource.class
-SHA1-Digest: OL80vqTKU+jmpJdwJDxBzQOqg3o=
-
-Name: org/mortbay/jetty/Server$ShutdownHookThread.class
-SHA1-Digest: LMVv2WRsFKpu12KRkltuB4FAC3c=
-
-Name: org/mortbay/jetty/nio/BlockingChannelConnector$Connection.class
-SHA1-Digest: LXEVMj8nuaSS37GyGAqLsWBhxJ8=
-
-Name: org/mortbay/jetty/servlet/ServletHolder$Config.class
-SHA1-Digest: 1FWTUXjLbGGXl6haSoe56xdK1cU=
-
-Name: org/mortbay/io/WriterOutputStream.class
-SHA1-Digest: 6w8kikUy1Fqr8x3QmNVFoHTcumo=
-
-Name: org/mortbay/jetty/security/Authenticator.class
-SHA1-Digest: 4TgK7FW7Lq8+9NuZCdaAJmgmB3g=
-
-Name: org/mortbay/jetty/AbstractGenerator$OutputWriter.class
-SHA1-Digest: GCKZ67usO0c71cgOb6EfiwjKM8o=
-
-Name: org/mortbay/jetty/handler/MovedContextHandler$1.class
-SHA1-Digest: tkCLRcIrZ71TFe6T19qyQWlCAvA=
-
-Name: org/mortbay/resource/FileResource.class
-SHA1-Digest: 8R9x/n/BT1vEzBCevY4O50M0+D0=
-
-Name: org/mortbay/jetty/HttpConnection$Output.class
-SHA1-Digest: oBwgQkWH7v2Jrvj/pZI+GKuV1JM=
-
-Name: org/mortbay/jetty/security/UnixCrypt.class
-SHA1-Digest: E9KW4Wz7KvSa2RLRxJ7HsXbAqGg=
-
-Name: org/mortbay/jetty/servlet/AbstractSessionManager$NullSessionCont
- ext.class
-SHA1-Digest: s4EU5/rQQ+dVlQ7yMcWpmzMN0PM=
-
-Name: org/mortbay/jetty/servlet/ServletHolder.class
-SHA1-Digest: 7ntt9QB5B6fTmWNVEKR5IcqeNZw=
-
-Name: org/mortbay/jetty/security/Password.class
-SHA1-Digest: 3BfDTF4usdyyMw6RU0qUO1+Y3og=
-
diff --git a/dependencyManifests/org.mortbay.jetty.server_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.mortbay.jetty.server_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..fb5a205
--- /dev/null
+++ b/dependencyManifests/org.mortbay.jetty.server_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,828 @@
+Manifest-Version: 1.0
+Bundle-DocURL: http://jetty.mortbay.org
+mode: development
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Built-By: jesse
+package: org.mortbay
+Bundle-SymbolicName: org.mortbay.jetty.server
+Ignore-Package: org.mortbay.jetty,org.mortbay.servlet.jetty,org.mortba
+ y.io.nio,org.mortbay.jetty.bio,org.mortbay.io,org.mortbay.jetty.secur
+ ity,org.mortbay.jetty.webapp,org.mortbay.jetty.nio,org.mortbay.xml,or
+ g.mortbay.jetty.handler,org.mortbay.resource,org.mortbay.jetty.servle
+ t,org.mortbay.io.bio,org.mortbay.jetty.deployer
+Originally-Created-By: 1.6.0_16 (Sun Microsystems Inc.)
+Export-Package: org.mortbay.jetty;uses:="org.mortbay.log,org.mortbay.i
+ o.nio,org.mortbay.jetty.bio,org.mortbay.io,org.mortbay.jetty.security
+ ,org.mortbay.jetty.webapp,org.mortbay.jetty.handler,org.mortbay.resou
+ rce,javax.servlet,org.mortbay.jetty.servlet,org.mortbay.util.ajax,org
+ .mortbay.thread,org.mortbay.component,org.mortbay.util,javax.servlet.
+ http";version="6.1.23",org.mortbay.io.nio;uses:="org.mortbay.jetty,or
+ g.mortbay.log,org.mortbay.io,org.mortbay.thread,org.mortbay.component
+ ";version="6.1.23",org.mortbay.servlet.jetty;uses:="org.mortbay.jetty
+ ,javax.servlet,org.mortbay.io,org.mortbay.servlet,javax.servlet.http"
+ ;version="6.1.23",org.mortbay.io;uses:="org.mortbay.log,org.mortbay.u
+ til";version="6.1.23",org.mortbay.jetty.bio;uses:="org.mortbay.log,or
+ g.mortbay.jetty,org.mortbay.io,org.mortbay.thread,org.mortbay.io.bio"
+ ;version="6.1.23",org.mortbay.jetty.security;uses:="org.mortbay.jetty
+ ,org.mortbay.log,org.mortbay.io,org.mortbay.jetty.bio,org.mortbay.jet
+ ty.webapp,org.mortbay.resource,org.mortbay.jetty.handler,javax.servle
+ t,org.mortbay.jetty.servlet,javax.security.cert,javax.net.ssl,org.mor
+ tbay.component,org.mortbay.util,org.mortbay.io.bio,javax.servlet.http
+ ";version="6.1.23",org.mortbay.jetty.webapp;uses:="org.mortbay.jetty,
+ org.mortbay.log,org.mortbay.jetty.security,org.mortbay.xml,org.mortba
+ y.resource,org.mortbay.jetty.handler,javax.servlet,org.mortbay.jetty.
+ servlet,org.mortbay.util,org.mortbay.jetty.deployer,javax.servlet.htt
+ p";version="6.1.23",org.mortbay.xml;uses:="org.mortbay.log,javax.xml.
+ parsers,org.xml.sax,org.mortbay.resource,org.mortbay.component,org.mo
+ rtbay.util,org.xml.sax.helpers";version="6.1.23",org.mortbay.jetty.ni
+ o;uses:="org.mortbay.log,org.mortbay.jetty,org.mortbay.io.nio,org.mor
+ tbay.util.ajax,org.mortbay.io,org.mortbay.thread";version="6.1.23",or
+ g.mortbay.jetty.handler;uses:="org.mortbay.log,org.mortbay.jetty,org.
+ mortbay.io,org.mortbay.jetty.webapp,org.mortbay.resource,javax.servle
+ t,org.mortbay.jetty.servlet,org.mortbay.component,org.mortbay.util,ja
+ vax.servlet.http";version="6.1.23",org.mortbay.resource;uses:="org.mo
+ rtbay.log,org.mortbay.util";version="6.1.23",org.mortbay.jetty.servle
+ t;uses:="org.mortbay.log,org.mortbay.jetty,org.mortbay.io.nio,org.mor
+ tbay.io,org.mortbay.jetty.security,org.mortbay.jetty.nio,org.mortbay.
+ resource,org.mortbay.jetty.handler,javax.servlet,org.mortbay.componen
+ t,org.mortbay.util,javax.servlet.http";version="6.1.23",org.mortbay.i
+ o.bio;uses:="org.mortbay.log,org.mortbay.io";version="6.1.23",org.mor
+ tbay.jetty.deployer;uses:="org.mortbay.log,org.mortbay.jetty,org.mort
+ bay.jetty.webapp,org.mortbay.xml,org.mortbay.jetty.handler,org.mortba
+ y.resource,org.mortbay.util,org.mortbay.component";version="6.1.23"
+Bundle-Version: 6.1.23.v201004211559
+url: http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty
+Bundle-Description: Jetty server core
+Build-Jdk: 1.6.0_16
+Bundle-Vendor: Mort Bay Consulting
+Bnd-LastModified: 1270506714511
+Bundle-Name: Jetty Server
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0, http://www
+ .eclipse.org/org/documents/epl-v10.php
+Tool: Bnd-0.0.238
+Archiver-Version: Plexus Archiver
+Created-By: 1.6.0_16 (Sun Microsystems Inc.)
+implementation-version: 6.1.23
+Import-Package: javax.net.ssl,javax.security.cert,javax.servlet;versio
+ n="2.5",javax.servlet.http;version="2.5",javax.servlet.jsp;resolution
+ :=optional,javax.servlet.resources;resolution:=optional;version="2.5"
+ ,javax.xml.parsers,org.apache.jasper.servlet;resolution:=optional,org
+ .mortbay.component;version="6.1",org.mortbay.jetty.handler.management
+ ;resolution:=optional,org.mortbay.log;version="6.1",org.mortbay.servl
+ et;version="6.1",org.mortbay.thread;version="6.1",org.mortbay.util;ve
+ rsion="6.1",org.mortbay.util.ajax;version="6.1",org.xml.sax,org.xml.s
+ ax.helpers
+Bundle-ManifestVersion: 2
+
+Name: org/mortbay/jetty/AbstractConnector$Acceptor.class
+SHA1-Digest: Ccmoh2Sy0ZPeAIx/UWU5vG8jyXk=
+
+Name: org/mortbay/jetty/RetryRequest.class
+SHA1-Digest: 8yswLo4q4oqrWqWHn0ymm0OpKZc=
+
+Name: org/mortbay/io/nio/SelectChannelEndPoint.class
+SHA1-Digest: 42ESqYKs5D7Dmd/oDuW9G4D/bpk=
+
+Name: org/mortbay/jetty/Server$1.class
+SHA1-Digest: NusMjKANBtCMOxIHAK75YI02fBI=
+
+Name: org/mortbay/jetty/Request$1.class
+SHA1-Digest: DTxsytUAShdSP8ASKpTTuQYiUg4=
+
+Name: org/mortbay/jetty/security/HashUserRealm$1.class
+SHA1-Digest: OFARap1NrP5XyxRfppSLdCnwq9A=
+
+Name: org/mortbay/jetty/Server$Graceful.class
+SHA1-Digest: 3RBhO5d1oTG7r8Hn4AJvOecv6bI=
+
+Name: org/mortbay/jetty/servlet/ErrorPageErrorHandler$ErrorCodeRange.c
+ lass
+SHA1-Digest: g92Yh+kfgsbi9SDHCJIe0nCAlJE=
+
+Name: org/mortbay/jetty/security/B64Code.class
+SHA1-Digest: XrEyLzpDAM3T1ZYsbOgZsb5Cf5A=
+
+Name: org/mortbay/jetty/security/HashUserRealm$User.class
+SHA1-Digest: PJvvXW8I61xH+FaWoamO8NgY0+U=
+
+Name: org/mortbay/jetty/handler/MovedContextHandler.class
+SHA1-Digest: 3oYHOqn2XN5rC0ZeI+CAHXF4KmI=
+
+Name: org/mortbay/jetty/nio/SelectChannelConnector$ConnectorEndPoint.c
+ lass
+SHA1-Digest: azWquJPl/jVZIBfvUfOqLAot1Os=
+
+Name: org/mortbay/jetty/servlet/FilterMapping.class
+SHA1-Digest: H07NmICdA1sjHnee+ldAuM0MsFo=
+
+Name: org/mortbay/jetty/security/SslSocketConnector$SslConnection$1.cl
+ ass
+SHA1-Digest: Ds56+oaJ2QVNYkI4hiND6yTYXts=
+
+Name: org/mortbay/io/nio/SelectorManager$SelectSet$1.class
+SHA1-Digest: 4xfPd18SBVxp+loAhqTakX8h8Gg=
+
+Name: org/mortbay/jetty/deployer/ConfigurationManager.class
+SHA1-Digest: VBccFln3qO6JfPMvSgn03n4BGOI=
+
+Name: org/mortbay/jetty/servlet/DefaultServlet$UnCachedContent.class
+SHA1-Digest: IjTzWf2MGt7amiEusBRZoBQoaHM=
+
+Name: org/mortbay/jetty/webapp/TagLibConfiguration.class
+SHA1-Digest: f/K4VkeWrez/ci6O0ynu7a5A2hY=
+
+Name: org/mortbay/jetty/HttpConnection$RequestHandler.class
+SHA1-Digest: 1bj2MNzXDnnNgAGWjdLnAO1QlVI=
+
+Name: org/mortbay/jetty/HttpFields$3.class
+SHA1-Digest: hH3ch8YdDEfCVvC6XOkPc3uN7b4=
+
+Name: org/mortbay/jetty/AbstractBuffers$1.class
+SHA1-Digest: lNOFcZZGP2UsL6He9FUebkjeBsI=
+
+Name: org/mortbay/jetty/RequestLog.class
+SHA1-Digest: WBMkhirDKioswtv61GfJHiREL24=
+
+Name: org/mortbay/jetty/security/FormAuthenticator$FormCredential.clas
+ s
+SHA1-Digest: OeeJLxx5B2cPWQaDI6V3z9idTV4=
+
+Name: org/mortbay/jetty/security/UserRealm.class
+SHA1-Digest: BP7gGpkmJpWsZ9Mcij8vRRC0M5o=
+
+Name: org/mortbay/jetty/SessionManager.class
+SHA1-Digest: 7Ga3Xrx40z+FGVAs9pt4mkcMgWE=
+
+Name: org/mortbay/io/Buffers.class
+SHA1-Digest: pDHzsMctp9H7IfNaTW6NMUvarjY=
+
+Name: org/mortbay/jetty/handler/AbstractHandler.class
+SHA1-Digest: 7KNfTEon0XexY4rAtsJpyXXWftg=
+
+Name: org/mortbay/jetty/HttpSchemes.class
+SHA1-Digest: d/oYz8yJLNVt/MEh7Dhx3BUXh4o=
+
+Name: org/mortbay/jetty/security/Credential.class
+SHA1-Digest: ZfIFbqSN/EgfGA6uXqEOl5LIzNw=
+
+Name: org/mortbay/jetty/handler/ContextHandlerCollection.class
+SHA1-Digest: 24IjSMFKa2p3gOjiMZb0Crn/SaY=
+
+Name: org/mortbay/jetty/ResourceCache$Content.class
+SHA1-Digest: HFmbD08iXb8E1sIPPG+N+9JReOw=
+
+Name: org/mortbay/jetty/Handler.class
+SHA1-Digest: aEQUI9GnbiLQnx0ZS0SKia4Pm7s=
+
+Name: org/mortbay/jetty/handler/ContextHandler.class
+SHA1-Digest: cFOhwmfFms0/kj7tNdFbUTotqY8=
+
+Name: org/mortbay/jetty/Connector.class
+SHA1-Digest: rezyGaNYviCCxcLjYli9QnMr/Fk=
+
+Name: org/mortbay/jetty/HttpConnection.class
+SHA1-Digest: 8zRlgVhamkK2ZmZY4P2UdQomj58=
+
+Name: org/mortbay/jetty/security/HashUserRealm.class
+SHA1-Digest: 1+0HWITvAnsJkeGHeQtBXjkawz4=
+
+Name: org/mortbay/jetty/Generator.class
+SHA1-Digest: yg0gWmThGEZ+flnfF/HvVuOhQSE=
+
+Name: org/mortbay/jetty/servlet/ServletHolder$1.class
+SHA1-Digest: 7fHdIzbn8gH6crGRtL35dEtdMnk=
+
+Name: org/mortbay/io/Portable.class
+SHA1-Digest: Ow6VUrT6qGUmnJt4Wy3MgEpxSZc=
+
+Name: org/mortbay/io/Connection.class
+SHA1-Digest: ElR1xTLY29NF4SMzltdXbhrjkwM=
+
+Name: org/mortbay/jetty/nio/SelectChannelConnector$1.class
+SHA1-Digest: bu06jar+dj3E4xfAbQ+hwPvuYLA=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionManager$SessionIf.class
+SHA1-Digest: lDwH2Ib25ZCq5QrzrOmXG42Hr3I=
+
+Name: org/mortbay/servlet/jetty/IncludableGzipFilter.class
+SHA1-Digest: 4xUQ1Hcs6pDhxeIioX+OKP+rjYs=
+
+Name: org/mortbay/jetty/HttpConnection$1.class
+SHA1-Digest: xqJtQYWeizuZbE2Pk2PJSJofjvA=
+
+Name: org/mortbay/resource/ResourceCollection.class
+SHA1-Digest: FtjLaeDP7dcUcbYkZa536AFa5Qs=
+
+Name: org/mortbay/jetty/servlet/HashSessionIdManager.class
+SHA1-Digest: +OfaiHUsMqeiYOlySxM2ZiH0FiQ=
+
+Name: org/mortbay/jetty/HttpHeaders.class
+SHA1-Digest: plrZBZrSVSYhRbcoAdmCPvV9b8U=
+
+Name: org/mortbay/jetty/AbstractGenerator$Output.class
+SHA1-Digest: 1ItqwfWNpdZCaLOohKFnEXQNPcc=
+
+Name: org/mortbay/io/ByteArrayBuffer.class
+SHA1-Digest: vf3OavTIPmKgKfrzKPUG8bKcWEA=
+
+Name: org/mortbay/servlet/jetty/IncludableGzipFilter$IncludableGzipStr
+ eam.class
+SHA1-Digest: DnL4zxLuUDqqe+T3oaGvoWZho2E=
+
+Name: org/mortbay/io/nio/SelectorManager.class
+SHA1-Digest: rKJSnsPjT+j9eHGcOSU6bSBOg64=
+
+Name: org/mortbay/io/BufferDateCache.class
+SHA1-Digest: v1H+zDScvOIXGja3PXSRWso87lU=
+
+Name: org/mortbay/jetty/HttpFields.class
+SHA1-Digest: vKYR5fHBV6rw2+c43MsjT+oymTE=
+
+Name: org/mortbay/jetty/AbstractBuffers.class
+SHA1-Digest: HN8XBY484ofQVT12cRnVrspXR1s=
+
+Name: org/mortbay/io/BufferCache.class
+SHA1-Digest: sOQ2nrW2aiLSQFeScfp4cJ3IPXo=
+
+Name: org/mortbay/jetty/security/SecurityHandler$1.class
+SHA1-Digest: cChDDum37rhTqMGTVZZ2h8EJCyU=
+
+Name: org/mortbay/jetty/deployer/WebAppDeployer.class
+SHA1-Digest: H9sz7daf4H3zidv5FrW1j50ZX/c=
+
+Name: org/mortbay/jetty/security/HashUserRealm$WrappedUser.class
+SHA1-Digest: +48I9jIihdKNki/SNyYIf9IrAYc=
+
+Name: org/mortbay/jetty/NCSARequestLog.class
+SHA1-Digest: qRqDudlPG6BRZ9plboFhPJCORDw=
+
+Name: org/mortbay/xml/configure_6_0.dtd
+SHA1-Digest: hXdKbI2G1glglLoW5D86j8VbVO8=
+
+Name: org/mortbay/jetty/Main.class
+SHA1-Digest: HgJCWoYuOAjF2cIb5MZXSnDbLng=
+
+Name: org/mortbay/jetty/servlet/Context$SContext.class
+SHA1-Digest: Fijv/WHwdkCEFCe14CZ9qNnGqs4=
+
+Name: org/mortbay/jetty/nio/SelectChannelConnector$RetryContinuation.c
+ lass
+SHA1-Digest: KbWE87O0MER50OAVx2VX/ZNhIh8=
+
+Name: org/mortbay/jetty/servlet/HashSessionManager$2.class
+SHA1-Digest: KWJVswZUY5K2Zlu/qZw8te6XqdQ=
+
+Name: org/mortbay/jetty/security/DigestAuthenticator$Digest.class
+SHA1-Digest: NgriRBbuHRYh8ysTRaVnH0npR7c=
+
+Name: org/mortbay/io/nio/NIOBuffer.class
+SHA1-Digest: QQL110lHCDEKgr3X+srYMXWWaAw=
+
+Name: org/mortbay/jetty/Response.class
+SHA1-Digest: LE+ZaTGRLKAY/MHaZXOrg9EG3pM=
+
+Name: org/mortbay/jetty/HttpTokens.class
+SHA1-Digest: cNQhFFjHKPZY4eBnUdRQ/4b356k=
+
+Name: org/mortbay/xml/XmlParser.class
+SHA1-Digest: N2k8K7Ua+l97B03CGCkRrioOpYc=
+
+Name: org/mortbay/xml/XmlConfiguration.class
+SHA1-Digest: V5ArIkt7Aw+N6uvTBZIo310jR5M=
+
+Name: org/mortbay/jetty/InclusiveByteRange.class
+SHA1-Digest: 0nsUai3+TvA+hLY6aUpkTADtAiM=
+
+Name: org/mortbay/xml/XmlParser$Handler.class
+SHA1-Digest: qvfqZVq4hvnrJRUXOYWEJ77h1P8=
+
+Name: META-INF/p2.inf
+SHA1-Digest: IM0jnOHZgRf5b1nhCMKDWgObbR0=
+
+Name: org/mortbay/jetty/servlet/DefaultServlet$NIOResourceCache.class
+SHA1-Digest: ZmBnHUOG8T3PXhwfHfWey4Ytmug=
+
+Name: org/mortbay/io/BufferCache$CachedBuffer.class
+SHA1-Digest: nav4HMJr6m/RQ9lUeexlRPaMfvo=
+
+Name: org/mortbay/io/View.class
+SHA1-Digest: GXbHr2lg43nbI7tqWKzOC7+ygno=
+
+Name: org/mortbay/jetty/HttpFields$Field.class
+SHA1-Digest: Sp65Xu1ohdTfsYGihi+2MbHzUwc=
+
+Name: org/mortbay/jetty/MimeTypes.class
+SHA1-Digest: kjHQ4FE1U+x9ADEx5ySG9oDA5fk=
+
+Name: org/mortbay/jetty/handler/DebugHandler.class
+SHA1-Digest: 7M6U6YpGE7jy+R+689jishjg8vM=
+
+Name: org/mortbay/jetty/servlet/SessionHandler.class
+SHA1-Digest: wCsUkzuc3RxcUYbvFv/cAHwufjU=
+
+Name: org/mortbay/jetty/webapp/webdefault.xml
+SHA1-Digest: hUzsKWjnEozfb/6AQVGIRfKKAFc=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/mortbay/jetty/servlet/Invoker.class
+SHA1-Digest: 1wIgiOVYR5s4NToN5v9M5d9fZiQ=
+
+Name: org/mortbay/jetty/AbstractBuffers$ThreadBuffers.class
+SHA1-Digest: AOm6kLkY7TutAdcdI0O+smdPa6I=
+
+Name: org/mortbay/io/Buffer.class
+SHA1-Digest: bB+gaVIBkYIkQanAkDXR5IFq3ns=
+
+Name: org/mortbay/jetty/servlet/Dispatcher.class
+SHA1-Digest: w11Jheu9gxRRTgTQNABN2FY0nDM=
+
+Name: org/mortbay/jetty/HttpFields$5.class
+SHA1-Digest: OdCFYJ1pVqH+f13rYPV7NrwnNrY=
+
+Name: org/mortbay/jetty/deployer/ContextDeployer$1.class
+SHA1-Digest: /D230NyAznmQjVfvakohyIOe65M=
+
+Name: org/mortbay/jetty/deployer/ContextDeployer$ScannerListener.class
+SHA1-Digest: cs180KLdV7Kmn6KTvmV3N5H2eUA=
+
+Name: org/mortbay/jetty/nio/InheritedChannelConnector.class
+SHA1-Digest: UtTW2oAyNfKA62VUpZFiRDG5b9Q=
+
+Name: org/mortbay/jetty/AbstractConnector.class
+SHA1-Digest: hvyXVbhIVZxK2OwsCMMaC06MNCw=
+
+Name: org/mortbay/jetty/AbstractGenerator.class
+SHA1-Digest: QcMBhae//OFu+zjV1GQ2jAPPmVQ=
+
+Name: org/mortbay/jetty/HttpConnection$OutputWriter.class
+SHA1-Digest: lh22EgD5yGQW4uiWZHQ2zOJ+gWw=
+
+Name: org/mortbay/jetty/bio/SocketConnector.class
+SHA1-Digest: ldPdfKus6eBp6txJgHX8OmNOdeQ=
+
+Name: org/mortbay/io/ByteArrayEndPoint.class
+SHA1-Digest: DOW5nNO8ioCVD5IrE4YQn6io1vU=
+
+Name: org/mortbay/io/BufferUtil.class
+SHA1-Digest: uEZPViRrhpjAE7E+ifK/LefYIec=
+
+Name: org/mortbay/io/nio/SelectorManager$ChangeSelectableChannel.class
+SHA1-Digest: w9kKtFeBWuXBZdrD6RpGhfMmf9Q=
+
+Name: org/mortbay/resource/JarFileResource.class
+SHA1-Digest: LYrS3OmWCgyhudm+MUQgL3lEjMY=
+
+Name: org/mortbay/jetty/security/HTAccessHandler$DummyPrincipal.class
+SHA1-Digest: fSpn0w0eaXciSrJO4X9x+pZ5XpI=
+
+Name: org/mortbay/io/nio/SelectorManager$ChangeTask.class
+SHA1-Digest: Tj8rSiEgIEe317yyH947JCr4GOc=
+
+Name: org/mortbay/jetty/handler/AbstractStatisticsHandler.class
+SHA1-Digest: aR1YFI5obC4Z8n7EK70+ngji5eI=
+
+Name: org/mortbay/jetty/security/SslSocketConnector$SslConnection.clas
+ s
+SHA1-Digest: Rwmf8bI252NFEGBAtLaucbTZGks=
+
+Name: org/mortbay/jetty/HttpStatus.class
+SHA1-Digest: ggVBWFZNMAMdIYn8B9HjHF4uBtA=
+
+Name: org/mortbay/jetty/security/JDBCUserRealm.class
+SHA1-Digest: TFQBY2fIgQ+JnzVL20U2TjmdrXw=
+
+Name: org/mortbay/xml/XmlParser$Attribute.class
+SHA1-Digest: GNFmWxxWM4u/06VUeyEUFgaorEU=
+
+Name: org/mortbay/jetty/LocalConnector.class
+SHA1-Digest: EzJ9fnRwujDW+PxXFEvOWIAlJbA=
+
+Name: org/mortbay/jetty/servlet/PathMap.class
+SHA1-Digest: B4DOtsLjmJgblctTap2ccqmlzhg=
+
+Name: org/mortbay/jetty/HttpParser$EventHandler.class
+SHA1-Digest: 9ox7SybWfPROEM9MKlzD89pvkxg=
+
+Name: org/mortbay/io/EndPoint.class
+SHA1-Digest: HYJLZMgUXX/3S/MoERB+aETJ1CI=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionIdManager.class
+SHA1-Digest: JBSOKTLpRxshwgBAQo6r3v+NSxg=
+
+Name: org/mortbay/io/bio/StreamEndPoint.class
+SHA1-Digest: Oyb0nEIUu8wSvIk5WsEpIh+P3/M=
+
+Name: org/mortbay/jetty/servlet/FilterHolder$Config.class
+SHA1-Digest: FT0qGu2qW+q+symvoJjSQ0YbNg0=
+
+Name: org/mortbay/jetty/handler/DefaultHandler.class
+SHA1-Digest: q8QZNrfBU1QnOGU0hB/jR66bRPo=
+
+Name: org/mortbay/jetty/useragents
+SHA1-Digest: L1Que0HQzz2k/A35ASuFKDf/KRw=
+
+Name: org/mortbay/jetty/HttpFields$2.class
+SHA1-Digest: N4Zm+3YVobIogcUklmBsS+S8DjQ=
+
+Name: org/mortbay/io/AbstractBuffer.class
+SHA1-Digest: o4P7RbefvtGgP1q0mOtQqvcgw6I=
+
+Name: org/mortbay/jetty/EofException.class
+SHA1-Digest: 2xJjv7c1csBEm5DjkGg9SVM2Eos=
+
+Name: org/mortbay/jetty/webapp/Configuration.class
+SHA1-Digest: eN9BC2JA+hwLofblJH2rmJvv6JE=
+
+Name: org/mortbay/jetty/mime.properties
+SHA1-Digest: Mb0BP+D4h15t2hwAJPnJoEPzDrk=
+
+Name: org/mortbay/jetty/encoding.properties
+SHA1-Digest: nawjyXyYOBX2cP3pQM1j23xQW4U=
+
+Name: org/mortbay/jetty/servlet/ServletHolder$SingleThreadedWrapper.cl
+ ass
+SHA1-Digest: Tinb9G1hu+KX5S73O3iS4Gt6VcY=
+
+Name: org/mortbay/jetty/security/DigestAuthenticator.class
+SHA1-Digest: hsSYSa+pzNFIXwvIT4NIlpBR/c4=
+
+Name: org/mortbay/jetty/nio/SelectChannelConnector.class
+SHA1-Digest: PhOijv//xgYglMgLl+ejgWoIHXA=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionManager.class
+SHA1-Digest: 4CAG3ZoZA+3wdzymdaguLzNMDSM=
+
+Name: org/mortbay/resource/JarResource$1.class
+SHA1-Digest: 8arYCH48fQ4bE00AwdtsHHzorTA=
+
+Name: org/mortbay/jetty/HttpContent.class
+SHA1-Digest: /kSoFcq2FXm7l6i4wSDFS0qT8a4=
+
+Name: org/mortbay/jetty/favicon.ico
+SHA1-Digest: cRUhA6ENfShwQf9zSllBtY4JlYE=
+
+Name: org/mortbay/jetty/handler/ErrorHandler.class
+SHA1-Digest: RAPaq2scCBCAlMQ+pAgeyzJ9z8k=
+
+Name: org/mortbay/jetty/servlet/ServletHandler$CachedChain.class
+SHA1-Digest: VgnoKyDWR0jBPVeB/lPe1bk89A8=
+
+Name: org/mortbay/jetty/security/FormAuthenticator$1.class
+SHA1-Digest: QFS1O/bBg7xuFX9Blul4ulrNUuk=
+
+Name: org/mortbay/jetty/handler/HandlerWrapper.class
+SHA1-Digest: w5uIkDK4j7ZYov8FAX2AoEa+ttU=
+
+Name: org/mortbay/jetty/servlet/PathMap$Entry.class
+SHA1-Digest: PEHukuzSybU4MAdBMN/66eAAnpM=
+
+Name: org/mortbay/jetty/security/HashSSORealm.class
+SHA1-Digest: XPDCO0yAGjNRvS6scQM1yXb4EN4=
+
+Name: org/mortbay/jetty/security/SecurityHandler$NotChecked.class
+SHA1-Digest: vfc71m/m6rGspC/SoCH2SavLnjQ=
+
+Name: org/mortbay/jetty/security/SslSocketConnector.class
+SHA1-Digest: V/f1gUyVzImrkkvfXvTQIFURv8A=
+
+Name: org/mortbay/jetty/security/Credential$MD5.class
+SHA1-Digest: XXhsWyy1HjZXlck+r5rGUx5MFz8=
+
+Name: org/mortbay/jetty/HandlerContainer.class
+SHA1-Digest: 9QOyV01dV1b4G8zDel9HnmUfkEE=
+
+Name: org/mortbay/jetty/HttpOnlyCookie.class
+SHA1-Digest: SkBdN89U6HRJrQupDfO3WGELwDI=
+
+Name: org/mortbay/jetty/SessionIdManager.class
+SHA1-Digest: +IN6TsR2F5bP45Xt4uOx1Og1E+4=
+
+Name: org/mortbay/jetty/Parser.class
+SHA1-Digest: MPtg+rigrVEN81IXQh7Jq7i0NE4=
+
+Name: org/mortbay/jetty/HttpGenerator.class
+SHA1-Digest: 8X+cNiGC1oqCmdWiyrSn2WMnAyE=
+
+Name: org/mortbay/io/RuntimeIOException.class
+SHA1-Digest: 903Jytw4hzZ87TPsYtAoWtTOrx4=
+
+Name: org/mortbay/jetty/security/ConstraintMapping.class
+SHA1-Digest: Pd+RoMxwKVlpsVuLUSoWf07NLv8=
+
+Name: org/mortbay/jetty/servlet/ErrorPageErrorHandler.class
+SHA1-Digest: vHebkIftoTlpJmv0xsx6GFdf+pM=
+
+Name: org/mortbay/jetty/deployer/ContextDeployer.class
+SHA1-Digest: oqZGxaMa90tPI3Fh9bXYK+T7Sxk=
+
+Name: org/mortbay/servlet/jetty/IncludableGzipFilter$IncludableRespons
+ eWrapper.class
+SHA1-Digest: VXOfL8cpStxgWLY4pvdhYkBKCa8=
+
+Name: org/mortbay/jetty/bio/SocketConnector$Connection.class
+SHA1-Digest: SEPGiT43zsk9+TCMzbzGhmKzCPw=
+
+Name: org/mortbay/io/Buffer$CaseInsensitve.class
+SHA1-Digest: 1C3B/XyrB1lQhnH9rS94Ab5gzIc=
+
+Name: org/mortbay/jetty/servlet/Invoker$Request.class
+SHA1-Digest: BtE1VqPADos5BVmZ5j6vkmO5f0Q=
+
+Name: org/mortbay/resource/JarResource.class
+SHA1-Digest: 16NA3NpDtWNmPTICQ3azLu2PO0Q=
+
+Name: org/mortbay/jetty/security/SslSocketConnector$CachedInfo.class
+SHA1-Digest: 5wptJZfdiKZg59l3uypJFN5PMmo=
+
+Name: org/mortbay/jetty/HttpURI.class
+SHA1-Digest: 8MgExJ6bWBGtSLdS8B8+Utk0AS4=
+
+Name: org/mortbay/jetty/handler/MovedContextHandler$Redirector.class
+SHA1-Digest: QRrGlmrEy7Q/ltz7v1Vunhi0cpw=
+
+Name: org/mortbay/jetty/servlet/HashSessionManager$1.class
+SHA1-Digest: U2+qAtIpsQmOHm8Ie3gTsgX452Q=
+
+Name: org/mortbay/jetty/handler/AbstractHandlerContainer.class
+SHA1-Digest: FyJfbsk/rqR6sDopRH328LOUDZs=
+
+Name: org/mortbay/jetty/security/Constraint.class
+SHA1-Digest: v/kwhzlTtSTsAzWKtxBRlZ6pf4Q=
+
+Name: org/mortbay/jetty/Server.class
+SHA1-Digest: 6yUlLnjfBuKzv3yLawmZtI3fq9Y=
+
+Name: org/mortbay/jetty/HttpParser.class
+SHA1-Digest: 63WKQKyrqGjHIG579xqxzLxEqRE=
+
+Name: org/mortbay/xml/XmlParser$NoopHandler.class
+SHA1-Digest: O/MfKJ1qqsgCaS98JxlEs5lJQaE=
+
+Name: org/mortbay/resource/ResourceFactory.class
+SHA1-Digest: wZ67pVhYTVplq6ta7dPf97nbCuE=
+
+Name: org/mortbay/jetty/ResourceCache.class
+SHA1-Digest: cXTKbOJ1x1RFGlvmAVXuGJOBW8c=
+
+Name: org/mortbay/jetty/security/BasicAuthenticator.class
+SHA1-Digest: auF5+vHL/idgArKIpQZvu9UfaAA=
+
+Name: org/mortbay/jetty/servlet/Dispatcher$IncludeAttributes.class
+SHA1-Digest: ejNOHjuPmTI66cOLD35McregPY8=
+
+Name: org/mortbay/jetty/servlet/ServletHandler.class
+SHA1-Digest: pHV5ldFNjT0gsDJdQApFf1PTnA0=
+
+Name: org/mortbay/io/nio/IndirectNIOBuffer.class
+SHA1-Digest: bXPU3mo7Fd/3HOxXqLQWzt40Ar4=
+
+Name: org/mortbay/jetty/servlet/HashSessionManager$ClassLoadingObjectI
+ nputStream.class
+SHA1-Digest: uWJBtFEIzVoepp5lUcoq+UrK9SE=
+
+Name: org/mortbay/jetty/security/ClientCertAuthenticator.class
+SHA1-Digest: CBhAu/ilrTZggCUUbVd6tark3Yg=
+
+Name: org/mortbay/jetty/security/HashUserRealm$2.class
+SHA1-Digest: IAnJKLo4m3tEOrwbIk68ekcngHk=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionManager$Session.class
+SHA1-Digest: hT8D8gdxVka/fGUO3VitqO2Qbo8=
+
+Name: org/mortbay/io/nio/DirectNIOBuffer.class
+SHA1-Digest: xbFi6PWIkRCVmyeCKG6CABqX/mo=
+
+Name: org/mortbay/jetty/handler/StatisticsHandler.class
+SHA1-Digest: eIm1txaecIMnKwVV2sNIexp5HSk=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: org/mortbay/io/nio/SelectorManager$SelectSet.class
+SHA1-Digest: J/wzrBmDFWNze+ARrvtTk6r4AFc=
+
+Name: org/mortbay/jetty/security/HTAccessHandler$HTAccess.class
+SHA1-Digest: VrJ4lxpYiGJqCd7dk/NxwR25ztw=
+
+Name: org/mortbay/xml/XmlParser$Node$1.class
+SHA1-Digest: PqPV1MYTSutSlBwFGi9G51W6bvo=
+
+Name: about_files/NOTICE.txt
+SHA1-Digest: S2mLpZqjAF/cOLO7xor4ncakiKA=
+
+Name: org/mortbay/jetty/security/SSORealm.class
+SHA1-Digest: HnETZ6rHzsPLQcoha9xo0oP5glE=
+
+Name: org/mortbay/io/SimpleBuffers.class
+SHA1-Digest: Iv/wvMFR1S6v2s029pMyDixL+ww=
+
+Name: org/mortbay/jetty/servlet/Dispatcher$ForwardAttributes.class
+SHA1-Digest: MYjhltRsG8RZ48m6+p3wKfSDar0=
+
+Name: org/mortbay/jetty/security/HTAccessHandler.class
+SHA1-Digest: o9DV0aHzcK1JRrVwX1nVEi64qCI=
+
+Name: org/mortbay/jetty/security/ServletSSL.class
+SHA1-Digest: C8x8CpeOCnAetZFU79QBFPLtGio=
+
+Name: about.html
+SHA1-Digest: +X6Cx/k/lpvHRYvE8jw1f4r0VIk=
+
+Name: org/mortbay/jetty/servlet/HashSessionManager.class
+SHA1-Digest: nS9uprpt+x+XQDyMNLQxiTOzYBg=
+
+Name: org/mortbay/jetty/HttpFields$4.class
+SHA1-Digest: zYj6y/ypvVUBNY9nWEx9SA06twg=
+
+Name: org/mortbay/jetty/servlet/Holder.class
+SHA1-Digest: xS9gxiRpCaQDAn+RVB8A2nMgFw8=
+
+Name: org/mortbay/jetty/handler/ContextHandler$SContext.class
+SHA1-Digest: sGRaN984j1Ut7upcGM1sTh3VuH4=
+
+Name: org/mortbay/jetty/nio/AbstractNIOConnector.class
+SHA1-Digest: DlZlR3al8PO2Gy/ysBjw2XvuG5c=
+
+Name: org/mortbay/jetty/HttpHeaderValues.class
+SHA1-Digest: QmP7JiHBnfMTV00OWO+9yEOaMDo=
+
+Name: org/mortbay/jetty/handler/HandlerCollection.class
+SHA1-Digest: 3qHGoJXa5nQZk+8Oc8SWJajBQP0=
+
+Name: org/mortbay/jetty/handler/HandlerList.class
+SHA1-Digest: OOtuK/89xDDfVAnuoFU3d7WtAz8=
+
+Name: org/mortbay/jetty/nio/BlockingChannelConnector.class
+SHA1-Digest: CBmIX1CAu+Dc/sGbHr7sPrzLg+0=
+
+Name: org/mortbay/jetty/HttpMethods.class
+SHA1-Digest: VNmXttXuM2d1tEsmInL9z2PKd9g=
+
+Name: org/mortbay/jetty/security/FormAuthenticator.class
+SHA1-Digest: THxsXhVkNJ+kDqp9sNOcWzxZc+U=
+
+Name: org/mortbay/jetty/Response$NullOutput.class
+SHA1-Digest: TVT8rDEwzcAPn/WG6L8iHAwgfGo=
+
+Name: org/mortbay/jetty/HttpVersions.class
+SHA1-Digest: 0nbQ0ITNkJ1uM6MegRjBPnJwpmM=
+
+Name: org/mortbay/jetty/handler/RewriteHandler.class
+SHA1-Digest: RgLSDxqwvFhrDIB7S7V3EN/WCBU=
+
+Name: org/mortbay/jetty/handler/RequestLogHandler.class
+SHA1-Digest: Q6CNlI89cS9gfPzyLzug3Dzm/wg=
+
+Name: org/mortbay/jetty/webapp/WebInfConfiguration.class
+SHA1-Digest: tTMHOBbJ34VXQa48RRwls/lhQDw=
+
+Name: org/mortbay/resource/URLResource.class
+SHA1-Digest: 8aWaAPXWlc9lkVSJO0xPelJ1fV4=
+
+Name: org/mortbay/jetty/servlet/ServletHandler$Chain.class
+SHA1-Digest: U/o06yXL51tHNov6fEvTSj1NMFk=
+
+Name: org/mortbay/io/nio/SelectChannelEndPoint$IdleTask.class
+SHA1-Digest: wshigKLS0ibu94aUh3VWnsQSyTk=
+
+Name: org/mortbay/jetty/servlet/DefaultServlet.class
+SHA1-Digest: sMRlFtX3sFVEuQc1D2h/QNl9VbI=
+
+Name: org/mortbay/jetty/webapp/WebXmlConfiguration.class
+SHA1-Digest: ScLBNOfTFWvtsNZ7oNVMAtyFMZ0=
+
+Name: org/mortbay/io/ByteArrayBuffer$CaseInsensitive.class
+SHA1-Digest: 2xamn1YgD+fsMKu9zyaepQ5fsZE=
+
+Name: org/mortbay/jetty/EncodedHttpURI.class
+SHA1-Digest: B8qu5uWDPMEZWUn+1t4cBh/I6+w=
+
+Name: org/mortbay/jetty/security/PKCS12Import.class
+SHA1-Digest: 9zymEuVguSUmc018LpZxZD2aIkY=
+
+Name: org/mortbay/xml/XmlParser$Node.class
+SHA1-Digest: TFiuI8i0uLbN6mYCM9pANF4Rrq4=
+
+Name: org/mortbay/jetty/security/SecurityHandler.class
+SHA1-Digest: RGa61TBOsWnclI5BhFLX7Bt2syE=
+
+Name: org/mortbay/jetty/servlet/Context.class
+SHA1-Digest: FnmZMZ9Cx2nufi/yTup+hDa8FR0=
+
+Name: org/mortbay/jetty/HttpException.class
+SHA1-Digest: +dzPrFH//oa6F+3QMdE8IZYZqEI=
+
+Name: org/mortbay/io/bio/SocketEndPoint.class
+SHA1-Digest: 6DNjLkyMeFP5+EJi78gWDkJVHWU=
+
+Name: org/mortbay/resource/BadResource.class
+SHA1-Digest: hh5secKW/qlMxxNbRy9Awg0fvpM=
+
+Name: org/mortbay/io/nio/ChannelEndPoint.class
+SHA1-Digest: 9/9rFNjYg/U8c+DT5zFmza4pYKc=
+
+Name: org/mortbay/jetty/security/Credential$Crypt.class
+SHA1-Digest: hf1nO5edbrcKl6Iswxd1I/ZO9W4=
+
+Name: org/mortbay/jetty/security/SecurityHandler$2.class
+SHA1-Digest: 5XiHd4NpL7LublzhxAiJoDoQkCM=
+
+Name: org/mortbay/jetty/HttpFields$1.class
+SHA1-Digest: 7UHGbgs/VReBlOOCvEc2py8yiA4=
+
+Name: org/mortbay/jetty/security/HashUserRealm$KnownUser.class
+SHA1-Digest: Rat9DSGqMnMGiGSG/mked2lBVrs=
+
+Name: org/mortbay/jetty/nio/NIOConnector.class
+SHA1-Digest: MmB3371QbSQNJp6RrvcEnx2qqeI=
+
+Name: org/mortbay/jetty/webapp/WebAppClassLoader.class
+SHA1-Digest: PGE1f7ZwlGmWaQHXcSrkXdPgzdk=
+
+Name: org/mortbay/io/bio/StringEndPoint.class
+SHA1-Digest: pc6A63fnCCl69h6AFQkX0BekI3I=
+
+Name: org/mortbay/jetty/webapp/WebAppContext.class
+SHA1-Digest: 92a2wknKfKIjINOA7h/eYkcA3K4=
+
+Name: org/mortbay/jetty/servlet/HashSessionManager$Session.class
+SHA1-Digest: HCzMDTzZCmusnGL2mxCN3iH/EP4=
+
+Name: org/mortbay/jetty/deployer/FileConfigurationManager.class
+SHA1-Digest: wsA+iDcd1fBYgvWTkJV+L4JLXWY=
+
+Name: org/mortbay/jetty/Request.class
+SHA1-Digest: YPNWIfDu6BGgg/uzrq9+1nzP5CQ=
+
+Name: org/mortbay/jetty/webapp/JettyWebXmlConfiguration.class
+SHA1-Digest: VoISL5s9Pm1u75olgDKA4TI5mtg=
+
+Name: org/mortbay/jetty/HttpParser$Input.class
+SHA1-Digest: 5RPTCzmNpmJlDUd9/mh7cmmHges=
+
+Name: org/mortbay/jetty/handler/ResourceHandler.class
+SHA1-Digest: HD3D1zUlJ7TDGvbojQrHOxoUM/I=
+
+Name: org/mortbay/jetty/servlet/FilterHolder.class
+SHA1-Digest: cQAHZ4fJIwD7nTgKWCyV6Xs50wQ=
+
+Name: org/mortbay/jetty/Response$1.class
+SHA1-Digest: GoyoNHwuG0WWh9NjZ8Ekwh/mB8I=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionManager$1.class
+SHA1-Digest: 8vezj+7QLXkQFlxzKaQbQNffhyA=
+
+Name: org/mortbay/io/View$CaseInsensitive.class
+SHA1-Digest: QKfPWtOtlqro6VprkvpZtl3zBAg=
+
+Name: org/mortbay/jetty/servlet/ServletMapping.class
+SHA1-Digest: R5KFnvXLgXB/5E5Q6FQFH0+HhCA=
+
+Name: org/mortbay/resource/Resource.class
+SHA1-Digest: 1X/nnrvINF3fCpGf2i4qQjxvFW0=
+
+Name: org/mortbay/jetty/Server$ShutdownHookThread.class
+SHA1-Digest: 6Hxky24L21x+IrKi1pzaYRUwx9c=
+
+Name: org/mortbay/jetty/nio/BlockingChannelConnector$Connection.class
+SHA1-Digest: f/rsO/qRMu7aPa86nmxjp1Ed+xc=
+
+Name: org/mortbay/jetty/servlet/ServletHolder$Config.class
+SHA1-Digest: 1obduCiuR+60nFMOs1mZGhLV/bQ=
+
+Name: org/mortbay/io/UncheckedPrintWriter.class
+SHA1-Digest: ngVpXdXwCV9552pl6H5nMNDog1Q=
+
+Name: org/mortbay/io/WriterOutputStream.class
+SHA1-Digest: 6w8kikUy1Fqr8x3QmNVFoHTcumo=
+
+Name: org/mortbay/jetty/security/Authenticator.class
+SHA1-Digest: 4TgK7FW7Lq8+9NuZCdaAJmgmB3g=
+
+Name: org/mortbay/jetty/AbstractGenerator$OutputWriter.class
+SHA1-Digest: Q37gbKGLww88AHLqDRTKJ49iikE=
+
+Name: org/mortbay/jetty/handler/MovedContextHandler$1.class
+SHA1-Digest: tkCLRcIrZ71TFe6T19qyQWlCAvA=
+
+Name: org/mortbay/resource/FileResource.class
+SHA1-Digest: IDutF8duALa38zmaq7z47poTI9g=
+
+Name: org/mortbay/jetty/HttpConnection$Output.class
+SHA1-Digest: e1oH9mxyB49vHIO7vpfT7R/pMsU=
+
+Name: org/mortbay/jetty/security/UnixCrypt.class
+SHA1-Digest: E9KW4Wz7KvSa2RLRxJ7HsXbAqGg=
+
+Name: org/mortbay/jetty/servlet/AbstractSessionManager$NullSessionCont
+ ext.class
+SHA1-Digest: 78j47fsnIH4JFoy6AL0Bf14nK1M=
+
+Name: org/mortbay/jetty/servlet/ServletHolder.class
+SHA1-Digest: XkcAfaOKF9ONGey/LgroolIpDS0=
+
+Name: org/mortbay/jetty/security/Password.class
+SHA1-Digest: 3BfDTF4usdyyMw6RU0qUO1+Y3og=
+
diff --git a/dependencyManifests/org.mortbay.jetty.util_6.1.15.v200905182336.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.mortbay.jetty.util_6.1.15.v200905182336.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index 78bc2d0..0000000
--- a/dependencyManifests/org.mortbay.jetty.util_6.1.15.v200905182336.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,358 +0,0 @@
-Manifest-Version: 1.0
-Bundle-DocURL: http://jetty.mortbay.org
-mode: development
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Built-By: jesse
-package: org.mortbay
-Bundle-SymbolicName: org.mortbay.jetty.util
-Ignore-Package: org.mortbay.log,org.mortbay.util,org.mortbay.component
- ,org.mortbay.thread,org.mortbay.servlet,org.mortbay.util.ajax
-Export-Package: org.mortbay.util;uses:="org.mortbay.log,org.mortbay.th
- read";version="6.1.15",org.mortbay.log;uses:="org.mortbay.util,org.sl
- f4j";version="6.1.15",org.mortbay.component;uses:="org.mortbay.util,o
- rg.mortbay.log";version="6.1.15",org.mortbay.thread;uses:="org.mortba
- y.log,org.mortbay.component";version="6.1.15",org.mortbay.servlet;use
- s:="org.mortbay.log,org.mortbay.util,javax.servlet.http,javax.servlet
- ,org.mortbay.util.ajax";version="6.1.15",org.mortbay.util.ajax;uses:=
- "org.mortbay.log,org.mortbay.util,javax.servlet.http,javax.servlet";v
- ersion="6.1.15"
-Bundle-Version: 6.1.15.v200905182336
-url: http://jetty.mortbay.org/project/jetty-util
-Bundle-Description: Utility classes for Jetty
-Build-Jdk: 1.5.0_16
-Bundle-Vendor: Mort Bay Consulting
-Bnd-LastModified: 1236264972685
-Bundle-Name: Jetty Utilities
-Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
-Tool: Bnd-0.0.238
-Archiver-Version: Plexus Archiver
-Created-By: 1.5.0_16 (Apple Inc.)
-implementation-version: 6.1.15
-Import-Package: javax.servlet,javax.servlet.http,org.slf4j;resolution:
- =optional;version="1.3"
-Bundle-ManifestVersion: 2
-
-Name: org/mortbay/servlet/MultiPartFilter.class
-SHA1-Digest: VqNNp538vvqUuqbQOguazG4O/Ks=
-
-Name: org/mortbay/util/ajax/JSON$1.class
-SHA1-Digest: 80Cw+oHjEGTy/7ftLCS7Gn0D9ao=
-
-Name: org/mortbay/util/StringUtil.class
-SHA1-Digest: krUHgodhKdr1Fnm5T493ouIznLU=
-
-Name: org/mortbay/util/ajax/JSON$Generator.class
-SHA1-Digest: 9v8sUxj+JzC7OIbbog4Oa277wFg=
-
-Name: org/mortbay/util/Scanner$Listener.class
-SHA1-Digest: dphFM3+xc+BkvnHmDqH34YhECR4=
-
-Name: org/mortbay/util/ajax/JSONEnumConvertor.class
-SHA1-Digest: ftpQZLJC1YTuUKVs1Vcq3kTaGjA=
-
-Name: org/mortbay/util/Utf8StringBuffer.class
-SHA1-Digest: 0FONfUjzuTCgCdImWzk3YtQzRxA=
-
-Name: org/mortbay/servlet/WelcomeFilter.class
-SHA1-Digest: ZqlL5wEmF5SW/uvgFSnQwVSdOfM=
-
-Name: org/mortbay/servlet/NoJspServlet.class
-SHA1-Digest: a7XoUxkKTtyX+3bQ1/UK6tlx3U4=
-
-Name: org/mortbay/util/IO.class
-SHA1-Digest: xw+WPVkZr7Jay69gCKN//FqanQo=
-
-Name: org/mortbay/component/AbstractLifeCycle.class
-SHA1-Digest: pd94Wmv+ywTeJeAa5vxpnhoPW0c=
-
-Name: org/mortbay/log/Log.class
-SHA1-Digest: 8+II4ETtU9TZ2PEuBLKhO7th7cg=
-
-Name: org/mortbay/util/ajax/JSON$Output.class
-SHA1-Digest: G/JSpoe5+s7YPo3yy2bZjtUAJlI=
-
-Name: org/mortbay/thread/QueuedThreadPool.class
-SHA1-Digest: AHXCvPzqZ/uUi91xJB9sZaYXXUw=
-
-Name: org/mortbay/util/IO$1.class
-SHA1-Digest: 4UchuVj3PbWrH/eSJPRQ/OeQrNM=
-
-Name: org/mortbay/servlet/GzipFilter$GzipStream.class
-SHA1-Digest: aEaelO+F5lKzOeXXsPGsf9PT8Ns=
-
-Name: org/mortbay/util/ajax/AjaxFilter.class
-SHA1-Digest: HP6IqxdlRXD7gczCyZEQ/3mcen0=
-
-Name: org/mortbay/log/Logger.class
-SHA1-Digest: RjJsF4iqUOBtku9BIAr1VQ7NJHg=
-
-Name: org/mortbay/servlet/GzipFilter.class
-SHA1-Digest: Jk/vv66vZeyqDWGjizNqJtkN/1w=
-
-Name: org/mortbay/util/Scanner$1.class
-SHA1-Digest: jB0RHtLvFJTOzR8ZUCcSN/hnQb4=
-
-Name: org/mortbay/util/IO$NullWrite.class
-SHA1-Digest: otpf6e6NNjlhFPnM5H5IEnU7XpQ=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor.class
-SHA1-Digest: y3ImpdNH83jrSabzW58GgwpUz4g=
-
-Name: org/mortbay/servlet/UserAgentFilter.class
-SHA1-Digest: ZzajjUBryNgAazlVKkw2EyOvVL0=
-
-Name: org/mortbay/util/TypeUtil.class
-SHA1-Digest: MtItcY5xlMlUb+PBfwExc18GuEo=
-
-Name: org/mortbay/util/URIUtil.class
-SHA1-Digest: hvGw3+A4W3eGhM3KXIvrivimF5g=
-
-Name: org/mortbay/util/IO$ClosedIS.class
-SHA1-Digest: l/dilUA81ve7YNskm0l6+RIrdr0=
-
-Name: org/mortbay/servlet/ThrottlingFilter.class
-SHA1-Digest: 2jJb97ClRbwjFk7YGNIvpTZaDGg=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$2.class
-SHA1-Digest: /M2FD/d2MsKcyCxuXpsTRvOhX+g=
-
-Name: org/mortbay/log/StdErrLog.class
-SHA1-Digest: UP6Q6k2VX3f8qqQuLIV9EymJXKM=
-
-Name: org/mortbay/util/Scanner$BulkListener.class
-SHA1-Digest: wEJ4s9e5P7+Hz/XIKzajCYsU8ok=
-
-Name: org/mortbay/util/MultiPartWriter.class
-SHA1-Digest: i6HP+mTqsipLmzfwIOuml97SE4M=
-
-Name: org/mortbay/util/ajax/JSON$2.class
-SHA1-Digest: j4iwWtQOcnjw7kd3C9n2eH+FzLg=
-
-Name: org/mortbay/thread/ThreadPool.class
-SHA1-Digest: 2t4QBtw+8slaDUgZuhe6nIKxdCw=
-
-Name: org/mortbay/thread/Timeout$Task.class
-SHA1-Digest: UM0N7ZWr4XtolwroLbLqHSx0b+A=
-
-Name: org/mortbay/util/StringMap$NullEntry.class
-SHA1-Digest: k1cKx9H36e1yXoADBwfl/QR0FFM=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: org/mortbay/thread/QueuedThreadPool$Lock.class
-SHA1-Digest: nIQRKhL/65cpOTXD6Dl9Fy3l1Qw=
-
-Name: org/mortbay/util/IO$Singleton.class
-SHA1-Digest: 4oy7KzyUsWHZ6sh037mWq7M0yXE=
-
-Name: org/mortbay/servlet/CGI.class
-SHA1-Digest: 8c8zMEkL9kcSWhQLTPnoiFBaidY=
-
-Name: org/mortbay/util/ajax/JSON$Literal.class
-SHA1-Digest: kl63dz5kwOPTKUh/45JpJ9unt7E=
-
-Name: about_files/NOTICE.txt
-SHA1-Digest: S2mLpZqjAF/cOLO7xor4ncakiKA=
-
-Name: org/mortbay/util/Scanner$DiscreteListener.class
-SHA1-Digest: FxKt/gjoL5hwJEGH4BZdpcvEX40=
-
-Name: org/mortbay/util/SingletonList.class
-SHA1-Digest: F6yXNk8w5Obg4Vbx8ItE4dVcAIg=
-
-Name: about.html
-SHA1-Digest: CelGeeynscojcax5hCWrX63sgOc=
-
-Name: org/mortbay/servlet/CGI$1.class
-SHA1-Digest: Sb6OwO20+Y2ngBoIFa66hC6jWo8=
-
-Name: org/mortbay/util/StringMap$Node.class
-SHA1-Digest: W1WyQLTzFoXNg5TaAW99Elwxyug=
-
-Name: org/mortbay/servlet/ProxyServlet.class
-SHA1-Digest: ZH5E0AwQSCMY+Vo4n/GBEmyixv4=
-
-Name: org/mortbay/thread/QueuedThreadPool$1.class
-SHA1-Digest: aZa69reSgyF7reYqhQo1UqI0tg8=
-
-Name: org/mortbay/util/ajax/AjaxFilter$1.class
-SHA1-Digest: 3afyNlC34YoglDiEQVR3NGjxya0=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$3.class
-SHA1-Digest: VohO+Ntjn0JGeTeUVe6+AsjQB9A=
-
-Name: org/mortbay/util/LazyList.class
-SHA1-Digest: Uv4xvzoVAPC9Ac8Ccj4RUiIi1p8=
-
-Name: org/mortbay/util/ajax/WaitingContinuation.class
-SHA1-Digest: uixAkRa27ntmbZEuvfoRxk7KPZE=
-
-Name: org/mortbay/servlet/CGI$EnvList.class
-SHA1-Digest: PWRiR8m8hC81TNOLAFSplLxiVUw=
-
-Name: META-INF/p2.inf
-SHA1-Digest: DpuFsRinmO5PqRyIWyTMgUWJ+98=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$NumberType.class
-SHA1-Digest: HBg9vrxT9WHKQNVZZH2x4e/PkAg=
-
-Name: org/mortbay/servlet/MultiPartFilter$Wrapper.class
-SHA1-Digest: Omajmitlqs2AFpfR6YxlY09XQtA=
-
-Name: org/mortbay/util/ajax/JSONObjectConvertor.class
-SHA1-Digest: Q+n61SqhHI2Kc4hBkcqcczVLFbE=
-
-Name: org/mortbay/component/Container.class
-SHA1-Digest: GnIoyaOJ9TEZWlmLcYEzEpsJxQQ=
-
-Name: org/mortbay/util/RolloverFileOutputStream$RollTask.class
-SHA1-Digest: gabHbTBYempsRlOP7lRmSMNKDwc=
-
-Name: org/mortbay/util/ByteArrayISO8859Writer.class
-SHA1-Digest: NSK21QslS/tjGwUVmJrF8zCKk6c=
-
-Name: org/mortbay/component/LifeCycle.class
-SHA1-Digest: a+Y+aSGqB7I3xei+2as2kb6OK6E=
-
-Name: org/mortbay/util/ajax/JSON$ReaderSource.class
-SHA1-Digest: ty7fnGiQ0t0nV3mAd4mlTK7NaAM=
-
-Name: org/mortbay/util/Scanner.class
-SHA1-Digest: PqLtJeojDx4ZgaSBkmJBrqgW//w=
-
-Name: org/mortbay/component/Container$1.class
-SHA1-Digest: HdgJxH+45j1d9XhC6yXzyMcF6PY=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/mortbay/servlet/RestFilter.class
-SHA1-Digest: eN0fUgTJmAPiZ2hkAv8m5QBAGAA=
-
-Name: org/mortbay/util/AttributesMap.class
-SHA1-Digest: 2FmL5G5t4F4QEWkAHGmjz1Gwsp0=
-
-Name: org/mortbay/util/MultiException.class
-SHA1-Digest: SdGd2v2vfxA+qmF5nbhlWJAh/Ec=
-
-Name: org/mortbay/util/Attributes.class
-SHA1-Digest: /24Xti5PMlWOuyYzuIpre2N0oTE=
-
-Name: org/mortbay/log/Log$1.class
-SHA1-Digest: YbXkW+W9wkqIv0lSPCKPcwpyUnA=
-
-Name: org/mortbay/util/StringMap.class
-SHA1-Digest: ItCzFPCKZADHgNOkWW4CzCBPuSs=
-
-Name: org/mortbay/util/ajax/AjaxFilter$AjaxResponse.class
-SHA1-Digest: +CBLuP0xAAs4cG1eaS3G0DWF6gY=
-
-Name: org/mortbay/util/ajax/JSON.class
-SHA1-Digest: 4DEt0GM2k3Ui8hntbKHBxE8Dce0=
-
-Name: org/mortbay/util/ajax/JSON$Convertible.class
-SHA1-Digest: ypfKpkxFnms8zQxMS8RZniZYwME=
-
-Name: org/mortbay/thread/QueuedThreadPool$PoolThread.class
-SHA1-Digest: VEthoqhNjg4RtKWOcpwXb9xZAPU=
-
-Name: org/mortbay/log/Slf4jLog.class
-SHA1-Digest: 67yw8ds7MSii3g7WD8Ll+7o95oo=
-
-Name: org/mortbay/util/ajax/JSON$Source.class
-SHA1-Digest: u17LoVtqQKsv5FIRFtYk+soy0O4=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$4.class
-SHA1-Digest: DKZW5w+WdoEZqb5POUHy3ZWUvsg=
-
-Name: org/mortbay/util/RolloverFileOutputStream.class
-SHA1-Digest: ZrQcuvVlgCCTyZF4CGfz//JlbnM=
-
-Name: org/mortbay/util/ajax/JSONDateConvertor.class
-SHA1-Digest: DcvaRsnit3tJ0XxN0mUiKw9QaHE=
-
-Name: org/mortbay/thread/Timeout.class
-SHA1-Digest: 5cbpTTZQCnPQWa6uC699gzMHIig=
-
-Name: org/mortbay/util/IO$NullOS.class
-SHA1-Digest: lLMYCmSStAYgJDQfdvkql2oR0VM=
-
-Name: org/mortbay/util/ajax/JSON$Convertor.class
-SHA1-Digest: 1KLq3uUz5kS2UEPMw/2DpvP/T+4=
-
-Name: org/mortbay/util/RolloverFileOutputStream$1.class
-SHA1-Digest: XIoJcJTHjcJzBe6EOAZOLR/lenQ=
-
-Name: org/mortbay/util/IO$Job.class
-SHA1-Digest: B0o5Jmt6pq5lT7G+fSOhufXsGNU=
-
-Name: org/mortbay/util/ByteArrayOutputStream2.class
-SHA1-Digest: J26S5E4zrmIrvy/lKQQNY2wx8lE=
-
-Name: org/mortbay/util/DateCache.class
-SHA1-Digest: jRpyBcLp0sJ11WXB65ZXIGrvjjY=
-
-Name: org/mortbay/component/Container$Listener.class
-SHA1-Digest: WROMJCf2yfWUYJM2xUZDny22oqc=
-
-Name: org/mortbay/component/Container$Relationship.class
-SHA1-Digest: srBf3tzEsabpOu8rCeZ15/peqg8=
-
-Name: org/mortbay/servlet/GzipFilter$GZIPResponseWrapper.class
-SHA1-Digest: q56XO4UnNZmWdP1cSecKZIutCEM=
-
-Name: org/mortbay/util/QuotedStringTokenizer.class
-SHA1-Digest: 4IXAzRAMFBhLg3nhOQ8+ugxdyo4=
-
-Name: org/mortbay/util/Loader.class
-SHA1-Digest: X4QQVs+XJ58IdgZ9jPXNSRnuAcc=
-
-Name: org/mortbay/util/SingletonList$SIterator.class
-SHA1-Digest: VYbj4iKsu4CRoYUrMiBpmTsEz0k=
-
-Name: org/mortbay/util/ajax/Continuation.class
-SHA1-Digest: LnpOvdnWyK7aWv1UtiCFLpIqYsw=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$Setter.class
-SHA1-Digest: JizvreKAkxgr/ekNBP3EkULzJVE=
-
-Name: org/mortbay/thread/BoundedThreadPool.class
-SHA1-Digest: w3ihPOThqSAiKRVN40krku8nCwA=
-
-Name: org/mortbay/util/ajax/JSON$StringSource.class
-SHA1-Digest: ehAlAfPWt+ThH00pjFHPdNSM0kQ=
-
-Name: org/mortbay/servlet/ConcatServlet.class
-SHA1-Digest: 4Zej8juhXUfobJ9jyEAApLi/8nI=
-
-Name: org/mortbay/component/LifeCycle$Listener.class
-SHA1-Digest: 1J5RoCQKTK9L9Mhmpp7jdAFS+q4=
-
-Name: org/mortbay/util/MultiPartOutputStream.class
-SHA1-Digest: VAuK3duPHlUGo+0MmqSltrgdOzU=
-
-Name: org/mortbay/thread/BoundedThreadPool$PoolThread.class
-SHA1-Digest: bCajlkpk0J9AIHgajyL7UhJQPwU=
-
-Name: org/mortbay/util/UrlEncoded.class
-SHA1-Digest: lPE2ZVGfQYT5AXINhkU6mz4kcmk=
-
-Name: org/mortbay/util/MultiMap.class
-SHA1-Digest: bgpAtpuF9Ae5MxKV2St4lPOrcaA=
-
-Name: org/mortbay/util/StringMap$1.class
-SHA1-Digest: 2O2VDt9X13+m6GDsH0Lxh5WDOkE=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$1.class
-SHA1-Digest: dwK3/xoi5dofS+WBTrpPIkQ4K0c=
-
-Name: org/mortbay/util/ajax/ContinuationSupport.class
-SHA1-Digest: l7BTUOBIVURAvjocWmUiSB0MrC0=
-
-Name: org/mortbay/util/IntrospectionUtil.class
-SHA1-Digest: PpLGbS5Rkjl8iw1QM9n9o8UgNWA=
-
-Name: org/mortbay/util/ajax/JSONPojoConvertor$5.class
-SHA1-Digest: J/GXHddgAE9YjEm9i/XzJ0u3Q5A=
-
diff --git a/dependencyManifests/org.mortbay.jetty.util_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.mortbay.jetty.util_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..60467f9
--- /dev/null
+++ b/dependencyManifests/org.mortbay.jetty.util_6.1.23.v201004211559.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,367 @@
+Manifest-Version: 1.0
+Bundle-DocURL: http://jetty.mortbay.org
+mode: development
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Built-By: jesse
+package: org.mortbay
+Bundle-SymbolicName: org.mortbay.jetty.util
+Ignore-Package: org.mortbay.log,org.mortbay.util.ajax,org.mortbay.serv
+ let,org.mortbay.thread,org.mortbay.util,org.mortbay.component
+Originally-Created-By: 1.6.0_16 (Sun Microsystems Inc.)
+Export-Package: org.mortbay.log;uses:="org.mortbay.util,org.slf4j";ver
+ sion="6.1.23",org.mortbay.util.ajax;uses:="org.mortbay.log,javax.serv
+ let,org.mortbay.util,javax.servlet.http";version="6.1.23",org.mortbay
+ .servlet;uses:="org.mortbay.log,javax.servlet,org.mortbay.util.ajax,o
+ rg.mortbay.util,javax.servlet.http";version="6.1.23",org.mortbay.thre
+ ad;uses:="org.mortbay.log,org.mortbay.component";version="6.1.23",org
+ .mortbay.util;uses:="org.mortbay.log,org.mortbay.thread";version="6.1
+ .23",org.mortbay.component;uses:="org.mortbay.log,org.mortbay.util";v
+ ersion="6.1.23"
+Bundle-Version: 6.1.23.v201004211559
+url: http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty-u
+ til
+Bundle-Description: Utility classes for Jetty
+Build-Jdk: 1.6.0_16
+Bundle-Vendor: Mort Bay Consulting
+Bnd-LastModified: 1270506691374
+Bundle-Name: Jetty Utilities
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0, http://www
+ .eclipse.org/org/documents/epl-v10.php
+Tool: Bnd-0.0.238
+Archiver-Version: Plexus Archiver
+Created-By: 1.6.0_16 (Sun Microsystems Inc.)
+implementation-version: 6.1.23
+Import-Package: javax.servlet,javax.servlet.http,org.slf4j;resolution:
+ =optional;version="1.3"
+Bundle-ManifestVersion: 2
+
+Name: org/mortbay/servlet/MultiPartFilter.class
+SHA1-Digest: /7D1u8vQSfh/9WZlrsHLO6jpiGE=
+
+Name: org/mortbay/util/ajax/JSON$1.class
+SHA1-Digest: giSeGVZIjbDkQ4S/M90/KZJo3pA=
+
+Name: org/mortbay/util/StringUtil.class
+SHA1-Digest: fgMbIUEqRGhBfYIliXeXYVrzt74=
+
+Name: org/mortbay/util/ajax/JSON$Generator.class
+SHA1-Digest: 9v8sUxj+JzC7OIbbog4Oa277wFg=
+
+Name: org/mortbay/util/Scanner$Listener.class
+SHA1-Digest: dphFM3+xc+BkvnHmDqH34YhECR4=
+
+Name: org/mortbay/util/ajax/JSONEnumConvertor.class
+SHA1-Digest: ftpQZLJC1YTuUKVs1Vcq3kTaGjA=
+
+Name: org/mortbay/util/Utf8StringBuffer.class
+SHA1-Digest: 0FONfUjzuTCgCdImWzk3YtQzRxA=
+
+Name: org/mortbay/servlet/WelcomeFilter.class
+SHA1-Digest: ZqlL5wEmF5SW/uvgFSnQwVSdOfM=
+
+Name: org/mortbay/servlet/NoJspServlet.class
+SHA1-Digest: a7XoUxkKTtyX+3bQ1/UK6tlx3U4=
+
+Name: org/mortbay/util/IO.class
+SHA1-Digest: 5yW8jIbvg+ixofGyDQD1MX5Iegs=
+
+Name: org/mortbay/component/AbstractLifeCycle.class
+SHA1-Digest: qkjyaBrTnXLYaaqfjmoR50lK8Os=
+
+Name: org/mortbay/log/Log.class
+SHA1-Digest: 8+II4ETtU9TZ2PEuBLKhO7th7cg=
+
+Name: org/mortbay/util/ajax/JSON$Output.class
+SHA1-Digest: G/JSpoe5+s7YPo3yy2bZjtUAJlI=
+
+Name: org/mortbay/thread/QueuedThreadPool.class
+SHA1-Digest: xnf0ubfvFDvmKITKHsDWh+NMbQU=
+
+Name: org/mortbay/util/IO$1.class
+SHA1-Digest: 4UchuVj3PbWrH/eSJPRQ/OeQrNM=
+
+Name: org/mortbay/servlet/GzipFilter$GzipStream.class
+SHA1-Digest: IfFXYdfg5mX//xlWTOC66o7nCrE=
+
+Name: org/mortbay/util/ajax/AjaxFilter.class
+SHA1-Digest: IqcLGUkpr2JEph5RHhfA2LHUii4=
+
+Name: org/mortbay/log/Logger.class
+SHA1-Digest: RjJsF4iqUOBtku9BIAr1VQ7NJHg=
+
+Name: org/mortbay/servlet/GzipFilter.class
+SHA1-Digest: 8bu1Y7qhtmMWe9thcktOkkivQrQ=
+
+Name: org/mortbay/util/Scanner$1.class
+SHA1-Digest: jnk2FHmiQJ5ouY4lBBnZmgZOMco=
+
+Name: org/mortbay/util/IO$NullWrite.class
+SHA1-Digest: IkALK0nc6WToQWCOs/To0g8m9Eg=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor.class
+SHA1-Digest: y3ImpdNH83jrSabzW58GgwpUz4g=
+
+Name: org/mortbay/servlet/UserAgentFilter.class
+SHA1-Digest: s738bUCXbjuguwJfKHg7Au0cCEs=
+
+Name: org/mortbay/util/TypeUtil.class
+SHA1-Digest: MtItcY5xlMlUb+PBfwExc18GuEo=
+
+Name: org/mortbay/util/URIUtil.class
+SHA1-Digest: l52yT3vEhLOsiPcwISqgz19ZYSE=
+
+Name: org/mortbay/util/IO$ClosedIS.class
+SHA1-Digest: 6OHLJnyK/DBEmRVtIzdaeQW0fHg=
+
+Name: org/mortbay/servlet/ThrottlingFilter.class
+SHA1-Digest: v8pLDLO45cWv6jcrMmms79dblyE=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$2.class
+SHA1-Digest: JAcv4ZuPMqy5PcvHrOx3LEM6X5s=
+
+Name: org/mortbay/log/StdErrLog.class
+SHA1-Digest: 8byz8+sVBzoPPPBQ+k1db7MDink=
+
+Name: org/mortbay/util/Scanner$BulkListener.class
+SHA1-Digest: wEJ4s9e5P7+Hz/XIKzajCYsU8ok=
+
+Name: org/mortbay/util/MultiPartWriter.class
+SHA1-Digest: i6HP+mTqsipLmzfwIOuml97SE4M=
+
+Name: org/mortbay/util/ajax/JSON$2.class
+SHA1-Digest: jAaAKg3gvcOBgU/9C7fUBC0+Zmc=
+
+Name: org/mortbay/thread/ThreadPool.class
+SHA1-Digest: 2t4QBtw+8slaDUgZuhe6nIKxdCw=
+
+Name: org/mortbay/thread/Timeout$Task.class
+SHA1-Digest: y7EAPHq2SBTr7mQeEQf4/fBcPvw=
+
+Name: org/mortbay/util/StringMap$NullEntry.class
+SHA1-Digest: k1cKx9H36e1yXoADBwfl/QR0FFM=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: org/mortbay/thread/QueuedThreadPool$Lock.class
+SHA1-Digest: ISHQoKisSjmRhAApOGEqCn5T5Tk=
+
+Name: org/mortbay/util/IO$Singleton.class
+SHA1-Digest: 2l+ck6rj4ozQmmdPMbZETNTc2J0=
+
+Name: org/mortbay/servlet/CGI.class
+SHA1-Digest: JNf50BhIFJVsvijZMBe0hLBdHKg=
+
+Name: org/mortbay/util/ajax/JSON$Literal.class
+SHA1-Digest: wkNP1EZCy5CxzPZBBdxLOE2+YfA=
+
+Name: about_files/NOTICE.txt
+SHA1-Digest: S2mLpZqjAF/cOLO7xor4ncakiKA=
+
+Name: org/mortbay/util/Scanner$DiscreteListener.class
+SHA1-Digest: FxKt/gjoL5hwJEGH4BZdpcvEX40=
+
+Name: org/mortbay/util/SingletonList.class
+SHA1-Digest: F6yXNk8w5Obg4Vbx8ItE4dVcAIg=
+
+Name: about.html
+SHA1-Digest: xyqgUGPZ8YrXXQWVL0E/PlqJtRw=
+
+Name: org/mortbay/servlet/CGI$1.class
+SHA1-Digest: dnt1qsXID63oG6GO2d/NndeeRB4=
+
+Name: org/mortbay/util/StringMap$Node.class
+SHA1-Digest: W1WyQLTzFoXNg5TaAW99Elwxyug=
+
+Name: org/mortbay/servlet/ProxyServlet.class
+SHA1-Digest: MLQ6PSDIk8B7OXJ9+SbJPz3nRuQ=
+
+Name: org/mortbay/thread/QueuedThreadPool$1.class
+SHA1-Digest: aZa69reSgyF7reYqhQo1UqI0tg8=
+
+Name: org/mortbay/util/ajax/AjaxFilter$1.class
+SHA1-Digest: 3afyNlC34YoglDiEQVR3NGjxya0=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$3.class
+SHA1-Digest: PON1RqRnzG1SQ708aCo7MROp5vk=
+
+Name: org/mortbay/util/LazyList.class
+SHA1-Digest: 3GOVzQK04rXCWYyvWdj/hJ2IrRk=
+
+Name: org/mortbay/util/ajax/WaitingContinuation.class
+SHA1-Digest: 4VI4ytFJS+FdB9TJwaKBJqHxWN4=
+
+Name: org/mortbay/servlet/CGI$EnvList.class
+SHA1-Digest: VXZw7MYeFVZaim7kJ9s2ql5WVdc=
+
+Name: META-INF/p2.inf
+SHA1-Digest: DpuFsRinmO5PqRyIWyTMgUWJ+98=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$NumberType.class
+SHA1-Digest: HBg9vrxT9WHKQNVZZH2x4e/PkAg=
+
+Name: org/mortbay/servlet/MultiPartFilter$Wrapper.class
+SHA1-Digest: /74w/qZoABbjrTQrb+/AyOISHM4=
+
+Name: org/mortbay/util/ajax/JSONObjectConvertor.class
+SHA1-Digest: Q+n61SqhHI2Kc4hBkcqcczVLFbE=
+
+Name: org/mortbay/component/Container.class
+SHA1-Digest: xwv2IobdI0434hn75jb4F0xXX0M=
+
+Name: org/mortbay/util/RolloverFileOutputStream$RollTask.class
+SHA1-Digest: kQwbmBlQVlZvUw4/C0bO+ERB8xc=
+
+Name: org/mortbay/util/ByteArrayISO8859Writer.class
+SHA1-Digest: NSK21QslS/tjGwUVmJrF8zCKk6c=
+
+Name: org/mortbay/component/LifeCycle.class
+SHA1-Digest: a+Y+aSGqB7I3xei+2as2kb6OK6E=
+
+Name: org/mortbay/util/ajax/JSON$ReaderSource.class
+SHA1-Digest: djwcc6KGzyoBUOhfk1Q6lAHECRg=
+
+Name: org/mortbay/util/Scanner.class
+SHA1-Digest: PqLtJeojDx4ZgaSBkmJBrqgW//w=
+
+Name: org/mortbay/component/Container$1.class
+SHA1-Digest: HdgJxH+45j1d9XhC6yXzyMcF6PY=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/mortbay/servlet/RestFilter.class
+SHA1-Digest: eN0fUgTJmAPiZ2hkAv8m5QBAGAA=
+
+Name: org/mortbay/util/AttributesMap.class
+SHA1-Digest: 2FmL5G5t4F4QEWkAHGmjz1Gwsp0=
+
+Name: org/mortbay/util/MultiException.class
+SHA1-Digest: SdGd2v2vfxA+qmF5nbhlWJAh/Ec=
+
+Name: org/mortbay/util/Attributes.class
+SHA1-Digest: /24Xti5PMlWOuyYzuIpre2N0oTE=
+
+Name: org/mortbay/log/Log$1.class
+SHA1-Digest: 6ABMXS6GqATRkMaSIYgMMT2X0dE=
+
+Name: org/mortbay/util/StringMap.class
+SHA1-Digest: ItCzFPCKZADHgNOkWW4CzCBPuSs=
+
+Name: org/mortbay/util/ajax/AjaxFilter$AjaxResponse.class
+SHA1-Digest: SErndTUx65ix0gZLZgwVa0yCfSk=
+
+Name: org/mortbay/util/ajax/JSON.class
+SHA1-Digest: q0QmoTrSaezl8zxN96qj27/9S5I=
+
+Name: org/mortbay/util/ajax/JSON$Convertible.class
+SHA1-Digest: ypfKpkxFnms8zQxMS8RZniZYwME=
+
+Name: org/mortbay/thread/QueuedThreadPool$PoolThread.class
+SHA1-Digest: 0vQZKZImpCuj4FSFRFdfvymypoo=
+
+Name: org/mortbay/log/Slf4jLog.class
+SHA1-Digest: 67yw8ds7MSii3g7WD8Ll+7o95oo=
+
+Name: org/mortbay/util/ajax/JSON$Source.class
+SHA1-Digest: u17LoVtqQKsv5FIRFtYk+soy0O4=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$4.class
+SHA1-Digest: H/1PjuqJbla85f6YmfuP/p/J6Sw=
+
+Name: org/mortbay/util/RolloverFileOutputStream.class
+SHA1-Digest: pOP2Yiy7HDHNddNjvEqBGF4EmSw=
+
+Name: org/mortbay/util/ajax/JSONDateConvertor.class
+SHA1-Digest: DcvaRsnit3tJ0XxN0mUiKw9QaHE=
+
+Name: org/mortbay/thread/Timeout.class
+SHA1-Digest: 8XGVdLejHbLkwcdNXXtYzGpjapE=
+
+Name: org/mortbay/util/IO$NullOS.class
+SHA1-Digest: Cf0t/kmjgA6qFk3Tp9VYVquaoGg=
+
+Name: org/mortbay/util/ajax/JSON$Convertor.class
+SHA1-Digest: 1KLq3uUz5kS2UEPMw/2DpvP/T+4=
+
+Name: org/mortbay/util/RolloverFileOutputStream$1.class
+SHA1-Digest: XIoJcJTHjcJzBe6EOAZOLR/lenQ=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertorFactory.class
+SHA1-Digest: HOtThBnlSoDR6gIqFaSABgYzqsg=
+
+Name: org/mortbay/util/IO$Job.class
+SHA1-Digest: qHPvnu8mHWk1bVFXuyNTCJ0QTr4=
+
+Name: org/mortbay/util/ByteArrayOutputStream2.class
+SHA1-Digest: J26S5E4zrmIrvy/lKQQNY2wx8lE=
+
+Name: org/mortbay/util/DateCache.class
+SHA1-Digest: jRpyBcLp0sJ11WXB65ZXIGrvjjY=
+
+Name: org/mortbay/component/Container$Listener.class
+SHA1-Digest: WROMJCf2yfWUYJM2xUZDny22oqc=
+
+Name: org/mortbay/component/Container$Relationship.class
+SHA1-Digest: srBf3tzEsabpOu8rCeZ15/peqg8=
+
+Name: org/mortbay/servlet/GzipFilter$GZIPResponseWrapper.class
+SHA1-Digest: R76w8voWYqfEKK3i/ijEvVrDUDM=
+
+Name: org/mortbay/util/QuotedStringTokenizer.class
+SHA1-Digest: cKfJi2FomuGrRu+i1ZfO21YSD5w=
+
+Name: org/mortbay/util/Loader.class
+SHA1-Digest: X4QQVs+XJ58IdgZ9jPXNSRnuAcc=
+
+Name: org/mortbay/util/SingletonList$SIterator.class
+SHA1-Digest: VYbj4iKsu4CRoYUrMiBpmTsEz0k=
+
+Name: org/mortbay/util/ajax/Continuation.class
+SHA1-Digest: LnpOvdnWyK7aWv1UtiCFLpIqYsw=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$Setter.class
+SHA1-Digest: JizvreKAkxgr/ekNBP3EkULzJVE=
+
+Name: org/mortbay/thread/BoundedThreadPool.class
+SHA1-Digest: w3ihPOThqSAiKRVN40krku8nCwA=
+
+Name: org/mortbay/util/ajax/JSON$StringSource.class
+SHA1-Digest: 54Rtah0hj1oJWxLrkMeBRC0eqTI=
+
+Name: org/mortbay/servlet/ConcatServlet.class
+SHA1-Digest: 4Zej8juhXUfobJ9jyEAApLi/8nI=
+
+Name: org/mortbay/component/LifeCycle$Listener.class
+SHA1-Digest: 1J5RoCQKTK9L9Mhmpp7jdAFS+q4=
+
+Name: org/mortbay/util/MultiPartOutputStream.class
+SHA1-Digest: VAuK3duPHlUGo+0MmqSltrgdOzU=
+
+Name: org/mortbay/thread/BoundedThreadPool$PoolThread.class
+SHA1-Digest: bCajlkpk0J9AIHgajyL7UhJQPwU=
+
+Name: org/mortbay/util/UrlEncoded.class
+SHA1-Digest: xe7Jcm/Ir/jI13SYxx2rRvYSI30=
+
+Name: org/mortbay/util/MultiMap.class
+SHA1-Digest: bgpAtpuF9Ae5MxKV2St4lPOrcaA=
+
+Name: org/mortbay/util/StringMap$1.class
+SHA1-Digest: 2O2VDt9X13+m6GDsH0Lxh5WDOkE=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$1.class
+SHA1-Digest: XOaFnZO4SPJ+EFe2IP9DIwTPt+I=
+
+Name: org/mortbay/util/ajax/ContinuationSupport.class
+SHA1-Digest: l7BTUOBIVURAvjocWmUiSB0MrC0=
+
+Name: org/mortbay/servlet/ProxyServlet$Transparent.class
+SHA1-Digest: zn672lNFU5ocULHk5zgsn7gpeaM=
+
+Name: org/mortbay/util/IntrospectionUtil.class
+SHA1-Digest: PpLGbS5Rkjl8iw1QM9n9o8UgNWA=
+
+Name: org/mortbay/util/ajax/JSONPojoConvertor$5.class
+SHA1-Digest: tSoTUe8VaMGRyGpBt+N6c9HqH3g=
+
diff --git a/dependencyManifests/org.objectweb.asm_3.1.0.v200803061910.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.objectweb.asm_3.1.0.v200803061910.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index b897e50..0000000
--- a/dependencyManifests/org.objectweb.asm_3.1.0.v200803061910.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,514 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.3
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.objectweb.asm
-Export-Package: org.objectweb.asm;version="3.1.0",org.objectweb.asm.co
- mmons;version="3.1.0",org.objectweb.asm.signature;version="3.1.0",org
- .objectweb.asm.tree;version="3.1.0",org.objectweb.asm.tree.analysis;v
- ersion="3.1.0",org.objectweb.asm.util;version="3.1.0",org.objectweb.a
- sm.xml;version="3.1.0"
-Bundle-Version: 3.1.0.v200803061910
-Bundle-ManifestVersion: 2
-
-Name: org/objectweb/asm/xml/Processor$SubdocumentHandlerFactory.class
-SHA1-Digest: IRLJnMucw00HQe5leaIn7CmT8GQ=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$OpcodesRule.class
-SHA1-Digest: 2sIqYjDzSgC2rDZbQqVgfbZFQNY=
-
-Name: org/objectweb/asm/util/AbstractVisitor.class
-SHA1-Digest: +XBJOVryRZDHON70nu/wM5vD8Xc=
-
-Name: org/objectweb/asm/util/CheckMethodAdapter.class
-SHA1-Digest: hW2B/PGUKT+uJUKM128jWag/qdk=
-
-Name: org/objectweb/asm/signature/SignatureWriter.class
-SHA1-Digest: HPJAV23RIOlAzGwMoVui33DnuN4=
-
-Name: org/objectweb/asm/tree/AbstractInsnNode.class
-SHA1-Digest: 3ud3mL3b8p9ltWAKZZ7oBptQhrQ=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$RuleSet.class
-SHA1-Digest: P7YJzHvEC2OH8yUDz2wZjgNeFGA=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$OuterClassRule.class
-SHA1-Digest: D8JrQR9Z5b9r5J/SF81LGucKxI0=
-
-Name: org/objectweb/asm/ByteVector.class
-SHA1-Digest: 4XmwwSYu+z0APWv4TAjsdqefqTI=
-
-Name: org/objectweb/asm/tree/analysis/SourceInterpreter.class
-SHA1-Digest: xmhDnGhzu81i+D5Qdw85sXdev4Y=
-
-Name: org/objectweb/asm/AnnotationVisitor.class
-SHA1-Digest: UQnecRexGB31Cr2kvGgwghcuRoU=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$LabelRule.class
-SHA1-Digest: /QFTnyt5V8mrN+fNORET+Bf5mrA=
-
-Name: org/objectweb/asm/tree/JumpInsnNode.class
-SHA1-Digest: ZT5Fsmfm2TcjySaNJ2yU3EPt18k=
-
-Name: org/objectweb/asm/commons/JSRInlinerAdapter$Subroutine.class
-SHA1-Digest: oAdEhdePVGjucFwgvPf0/QZIn8o=
-
-Name: org/objectweb/asm/xml/SAXFieldAdapter.class
-SHA1-Digest: b6+QKfUnSgXiKGyZlMkhRpjfduk=
-
-Name: org/objectweb/asm/ClassAdapter.class
-SHA1-Digest: sG+h9Nx43aJ24SAFAmhX5JyEoWY=
-
-Name: org/objectweb/asm/ClassWriter.class
-SHA1-Digest: rz/dEpfColzXe+X+dqsM9Hm/elo=
-
-Name: org/objectweb/asm/tree/analysis/Frame.class
-SHA1-Digest: rUU9OCuwlA2+/pBadq7Rf4CYsZs=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$LookupSwitchRule.class
-SHA1-Digest: xTR9SXki1Tbeq4ERivaeNWfGZPA=
-
-Name: org/objectweb/asm/MethodVisitor.class
-SHA1-Digest: XWyF4JSLXzdQ3blTUyqFeK71K1o=
-
-Name: org/objectweb/asm/tree/MemberNode.class
-SHA1-Digest: r7nOTK/tk+JWO98Yl0xidvQ0ifc=
-
-Name: org/objectweb/asm/tree/TypeInsnNode.class
-SHA1-Digest: lEEY4vKQs/wrYuOMQR+WB5O0kNg=
-
-Name: org/objectweb/asm/tree/analysis/SmallSet.class
-SHA1-Digest: 06b7ysIDpOBym31p1q21JhA30hY=
-
-Name: org/objectweb/asm/tree/analysis/Value.class
-SHA1-Digest: umvNo9wKI0Z5t2GzuxWN8jPdh4k=
-
-Name: org/objectweb/asm/commons/LocalVariablesSorter.class
-SHA1-Digest: vP0IeoabCJaR3zdNmSREfBXShLs=
-
-Name: org/objectweb/asm/tree/LineNumberNode.class
-SHA1-Digest: 4aGbm34h4RkQSsSt40aDb9ud8ug=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$FrameTypeRule.class
-SHA1-Digest: MVTrxjurBweukkcvEOg8A/LUYXs=
-
-Name: org/objectweb/asm/util/TraceAbstractVisitor.class
-SHA1-Digest: U4GTihzkPOqGnwoIefu2FtgLO3U=
-
-Name: org/objectweb/asm/AnnotationWriter.class
-SHA1-Digest: FmuG+CTjzZcypuTUnTnO7FB50BY=
-
-Name: org/objectweb/asm/commons/GeneratorAdapter.class
-SHA1-Digest: 8zh9XT2+CXcGAlS5Z9wvcyfMhiA=
-
-Name: org/objectweb/asm/xml/Processor$OutputSlicingHandler.class
-SHA1-Digest: eiwNlDsKD3EE2D/WVvPBdQmHQSQ=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$ExceptionRule.class
-SHA1-Digest: 7xMDX6KfTVQ8sIKxjAZxMtKxDQg=
-
-Name: org/objectweb/asm/tree/InsnList$1.class
-SHA1-Digest: jxdwoUhxl+cSuk/Vad29up9hkKs=
-
-Name: org/objectweb/asm/tree/FieldInsnNode.class
-SHA1-Digest: DG5wGiblh5xDqpHF45xDBPoXVFM=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationDefaultRule.cl
- ass
-SHA1-Digest: sXhgnQD6ytDsV7YC8B/tWXbkD3w=
-
-Name: org/objectweb/asm/signature/SignatureVisitor.class
-SHA1-Digest: DenxenpQSJ8ZkbIrDLDnIORqIeg=
-
-Name: org/objectweb/asm/util/ASMifierFieldVisitor.class
-SHA1-Digest: u57BDY+jeu2N+FLz4pnSm+wHCoU=
-
-Name: org/objectweb/asm/tree/LookupSwitchInsnNode.class
-SHA1-Digest: VtdlA51X8LelF/FXyederEOaL+M=
-
-Name: org/objectweb/asm/xml/SAXCodeAdapter.class
-SHA1-Digest: /lcfq6Eid+x77Z2Zv8pgMe7VntU=
-
-Name: org/objectweb/asm/util/ASMifierAnnotationVisitor.class
-SHA1-Digest: Moha0L4npqm6bIh5n4/9IKG1ca4=
-
-Name: org/objectweb/asm/xml/Processor$1.class
-SHA1-Digest: VY02tzcvGflUxFJtl9DTesplcFk=
-
-Name: about_files/README.txt
-SHA1-Digest: g+hfjp6RL2xeop0L2gLHmlqdZkM=
-
-Name: org/objectweb/asm/commons/RemappingSignatureAdapter.class
-SHA1-Digest: xJNzU4FusNhuyFzRIqsl4QWK6Q0=
-
-Name: org/objectweb/asm/Frame.class
-SHA1-Digest: gTKoIL+qGA5wI8yOHMjwQokKEgI=
-
-Name: org/objectweb/asm/MethodAdapter.class
-SHA1-Digest: CBaMBHTAVqdtcyccqACLya21N5U=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$Opcode.class
-SHA1-Digest: phl1rJ4ZcRaC+4w4ssWXULQEmPg=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$MaxRule.class
-SHA1-Digest: I317BA+By0H1RMYsRuXHrRLiWg8=
-
-Name: org/objectweb/asm/tree/InsnNode.class
-SHA1-Digest: vC+88k/JTevh3L73VNg4stN/0bA=
-
-Name: org/objectweb/asm/tree/analysis/SourceValue.class
-SHA1-Digest: nqxOTo/7dSXuRgLxMtXj8N/Ok98=
-
-Name: org/objectweb/asm/tree/InnerClassNode.class
-SHA1-Digest: pEOWq01oj7BmhKWosLBtXOXE6Q8=
-
-Name: org/objectweb/asm/tree/LabelNode.class
-SHA1-Digest: PdzjM3fjKYjvGt56p3jMwHI6zYU=
-
-Name: org/objectweb/asm/tree/analysis/Subroutine.class
-SHA1-Digest: VEH4EsYcgrbYaCZBHREGdKxN5hE=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$FrameRule.class
-SHA1-Digest: ltmo3xrXYpULi7Wj1K+lXue1FOU=
-
-Name: org/objectweb/asm/commons/Method.class
-SHA1-Digest: StheOp6ryDnXdnZ3frCA1tO4U/A=
-
-Name: org/objectweb/asm/util/TraceFieldVisitor.class
-SHA1-Digest: jvDDCoH5PH4mUaaWa0kxPx7myw4=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$OpcodeGroup.class
-SHA1-Digest: obho4UaPGv7y2hnzjtVY6GgwlaE=
-
-Name: org/objectweb/asm/signature/SignatureReader.class
-SHA1-Digest: vk56OWDIbFd5xWa4FyNBl+Rc+Kk=
-
-Name: org/objectweb/asm/MethodWriter.class
-SHA1-Digest: tAQSbqtxUDVRUutdLKEjjcgivWE=
-
-Name: about_files/LICENSE.txt
-SHA1-Digest: j2BeL98mo7ztDyqaEc5IJfnL2Q4=
-
-Name: org/objectweb/asm/xml/SAXClassAdapter.class
-SHA1-Digest: DXfn9mg3ag9r+FYHr6bCsdsSFIM=
-
-Name: org/objectweb/asm/xml/Processor$SAXWriterFactory.class
-SHA1-Digest: hcIU5AlK6Rg6p4OFBZUQVyCzQjE=
-
-Name: org/objectweb/asm/Type.class
-SHA1-Digest: VcP79weymiaXhihgwP23KMFIfAE=
-
-Name: org/objectweb/asm/commons/Remapper.class
-SHA1-Digest: uL1tIWzAaPTviLE0Rus2iybo1YM=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueRule.clas
- s
-SHA1-Digest: /tmOGK+Uh9n3NIchYUJ5Kw1k/oY=
-
-Name: org/objectweb/asm/tree/LdcInsnNode.class
-SHA1-Digest: Fw84mSRWaEXY0s07fQE9OMj1sjs=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$LookupSwitchLabelRule.cl
- ass
-SHA1-Digest: YV7f8lqABKILqNF88Tb0Hu8C/uI=
-
-Name: org/objectweb/asm/tree/IntInsnNode.class
-SHA1-Digest: ldzNDWzyE8eFAC3Hb/K64NgHWLU=
-
-Name: org/objectweb/asm/tree/analysis/BasicValue.class
-SHA1-Digest: u+ajv9i+fPQu35JqSIx3VZFB5fU=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$InterfacesRule.class
-SHA1-Digest: Jlaz19FDzjkW8wLgzbAd0mj7RFw=
-
-Name: org/objectweb/asm/commons/JSRInlinerAdapter.class
-SHA1-Digest: Vh1W3a7SabgnnOTgAhQKx1lXTOw=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$SourceRule.class
-SHA1-Digest: 7QzD7amb7F9H6z7u8uJo6FLL1XA=
-
-Name: org/objectweb/asm/commons/CodeSizeEvaluator.class
-SHA1-Digest: 5Opixrkd6aIRPSISHEkxVPZYSR4=
-
-Name: org/objectweb/asm/commons/SerialVersionUIDAdder.class
-SHA1-Digest: adE+ylaR9qMmKYW6KHMpA2wOxsE=
-
-Name: org/objectweb/asm/ClassReader.class
-SHA1-Digest: abZvVwVL87MvcLgTpPHZTO93Dvw=
-
-Name: about.html
-SHA1-Digest: I57Qp1rW+KFTTt5W45bduakoSmk=
-
-Name: org/objectweb/asm/util/ASMifierClassVisitor.class
-SHA1-Digest: J+jE/eN8ovotfqqkpwHWNNvd4ec=
-
-Name: org/objectweb/asm/util/CheckFieldAdapter.class
-SHA1-Digest: 9TsvqSjZ1ShfcnjhVNRlF8TUz90=
-
-Name: org/objectweb/asm/tree/AnnotationNode.class
-SHA1-Digest: yWBnFAyxolE1o3AZSm5DltsN8xA=
-
-Name: org/objectweb/asm/util/CheckSignatureAdapter.class
-SHA1-Digest: fOlTXO7sisxUUoU2GAoS5xAUv+E=
-
-Name: org/objectweb/asm/util/CheckAnnotationAdapter.class
-SHA1-Digest: msNK6I+i+m40dvLSnzQLJWbULMg=
-
-Name: org/objectweb/asm/commons/JSRInlinerAdapter$1.class
-SHA1-Digest: 8sBeJr95ErmH2gAv0r9i6bEf9Yw=
-
-Name: org/objectweb/asm/Item.class
-SHA1-Digest: TgVbXRlAOBaM4RM7JLv1QDXOrpY=
-
-Name: org/objectweb/asm/util/TraceAnnotationVisitor.class
-SHA1-Digest: zFw28cbyz3V6NpHvYadyqT/8Y1E=
-
-Name: org/objectweb/asm/tree/analysis/AnalyzerException.class
-SHA1-Digest: SH8CzSiMmHxMd/bnWkB+FeZDGGw=
-
-Name: org/objectweb/asm/tree/IincInsnNode.class
-SHA1-Digest: 7bZTrS9yacS4Vg6cd08tKDCsJsE=
-
-Name: org/objectweb/asm/tree/FrameNode.class
-SHA1-Digest: sqSthxQKJfeMqluOEpwYFhi8ejc=
-
-Name: org/objectweb/asm/xml/ASMContentHandler.class
-SHA1-Digest: qyG2UMdizOLODvzdxUkh930qdGQ=
-
-Name: org/objectweb/asm/Label.class
-SHA1-Digest: fk+9HlscBJX1PeFL3kNnJcFlNYk=
-
-Name: org/objectweb/asm/tree/MethodInsnNode.class
-SHA1-Digest: aWfe0NHpqTp5Ft3eMc1f+gTsMVk=
-
-Name: org/objectweb/asm/tree/MultiANewArrayInsnNode.class
-SHA1-Digest: bQR874E6oSxJ5rXxtpHoiY67EU0=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueArrayRule
- .class
-SHA1-Digest: niN72cpSZGnRhjlouGPAYLWGMq8=
-
-Name: org/objectweb/asm/util/TraceMethodVisitor.class
-SHA1-Digest: K4rcGUcUW24+N+eGk4ZD0Y1NBn8=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$LocalVarRule.class
-SHA1-Digest: Rgua1UYDJGEfzrFsUISyy3zR7m8=
-
-Name: org/objectweb/asm/xml/Processor$InputSlicingHandler.class
-SHA1-Digest: G+Ax5kcWIEh+7GdwSIlzhQSiWKQ=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$TryCatchRule.class
-SHA1-Digest: DKoP68Q/SBrj5WT2f6xez8JifOI=
-
-Name: org/objectweb/asm/commons/RemappingAnnotationAdapter.class
-SHA1-Digest: vZfz8aOYPqTNVM6Fu9V5TbUGOC0=
-
-Name: org/objectweb/asm/util/TraceClassVisitor.class
-SHA1-Digest: QRkAjGy7g+HlbvX4Hea2Kqb6Qhg=
-
-Name: org/objectweb/asm/xml/Processor$ZipEntryElement.class
-SHA1-Digest: V+gN98rxE4ZT31622nKyi/TZXys=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$1.class
-SHA1-Digest: UsgmbbpFXDnf4mekRkUGs7qO6ac=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$ExceptionsRule.class
-SHA1-Digest: +q3LAcxsdgDck3xw44vby0BlZWI=
-
-Name: org/objectweb/asm/tree/analysis/BasicVerifier.class
-SHA1-Digest: sQDutl7My2BRKqyT2vdDLbzaGQg=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$ClassRule.class
-SHA1-Digest: N9OTGu9X5iQ6pU4uGrabNoEaa98=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$InterfaceRule.class
-SHA1-Digest: PlXOJT3jubWutfWOS4L5+yaP6es=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$FieldRule.class
-SHA1-Digest: tw2TrKcqdR5yOct57lZ9e9+Qsss=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationParameterRule.
- class
-SHA1-Digest: 1+AtncmccYk+UNlBnbsjRQucDFo=
-
-Name: org/objectweb/asm/Handler.class
-SHA1-Digest: 7slFCwpzMai2GjSAMIoYDyjjkNM=
-
-Name: org/objectweb/asm/tree/LocalVariableNode.class
-SHA1-Digest: cdUfT0n1g0uiJ5KnpGfe/V3faj0=
-
-Name: org/objectweb/asm/tree/VarInsnNode.class
-SHA1-Digest: iONkO5hz0yyMfIESLEXJuuQSCu4=
-
-Name: org/objectweb/asm/commons/RemappingMethodAdapter.class
-SHA1-Digest: FQ6mgaNFT6lBrP8Tpgr9tlZu17Y=
-
-Name: org/objectweb/asm/FieldWriter.class
-SHA1-Digest: AVLwL6LPOTjaRJYzkwOVktJR0Dc=
-
-Name: org/objectweb/asm/xml/SAXAdapter.class
-SHA1-Digest: Rq0XGG1YBhNZ/s/0wS4GnqjKkeU=
-
-Name: org/objectweb/asm/xml/Processor$ContentHandlerFactory.class
-SHA1-Digest: Iql3AcTuk/Zv7KT1J682FAagE6o=
-
-Name: org/objectweb/asm/Edge.class
-SHA1-Digest: zPhU4kuh2C3K2hX7JxP3HRTWciQ=
-
-Name: org/objectweb/asm/commons/StaticInitMerger.class
-SHA1-Digest: CEb0IMAmNTzKt9hH9q7DFJXwr6o=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
-
-Name: org/objectweb/asm/util/ASMifierAbstractVisitor.class
-SHA1-Digest: iwAhqNDyL1BHfSFnZfrd6RIMFq8=
-
-Name: org/objectweb/asm/tree/MethodNode.class
-SHA1-Digest: 9Ui4OqySX4ZhDAxgafQLSQe+Y/E=
-
-Name: org/objectweb/asm/xml/Processor$ProtectedInputStream.class
-SHA1-Digest: vBANXwaSsHj+RhBWagXgXxqkYS8=
-
-Name: org/objectweb/asm/tree/analysis/Interpreter.class
-SHA1-Digest: YB+d+Q+EoFidGHgrhIRRnH4miY8=
-
-Name: org/objectweb/asm/util/ASMifiable.class
-SHA1-Digest: gc/zNMznah6L9OMNiYH1VJ9u3Fo=
-
-Name: org/objectweb/asm/xml/Processor.class
-SHA1-Digest: hpFDjSzpzfci6PLqgu7+Xf4dXx8=
-
-Name: org/objectweb/asm/tree/analysis/Analyzer.class
-SHA1-Digest: puOijdXIRC448+Cc+/wy8AJKyro=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$LineNumberRule.class
-SHA1-Digest: 9et/hOWpBROIuG+/k+xkJK+MTRs=
-
-Name: org/objectweb/asm/Attribute.class
-SHA1-Digest: vSTLCi1osXUWM/PbcGSBbi3YEuk=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueAnnotatio
- nRule.class
-SHA1-Digest: agaZ0tlyW10p+fYfQU8LgdJ2ddQ=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$Rule.class
-SHA1-Digest: n9CeqYim0bgtoyHcECMF8svTcZc=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$MethodRule.class
-SHA1-Digest: rnJXYV8UK9InZWOOQ8srNnBwd3c=
-
-Name: org/objectweb/asm/commons/SimpleRemapper.class
-SHA1-Digest: zv/T3hyl6UOT5r4B6pkE/OIcU2s=
-
-Name: org/objectweb/asm/tree/MethodNode$1.class
-SHA1-Digest: 5zBNe6C11uWFHmbcDr6NqlqCc0M=
-
-Name: org/objectweb/asm/util/CheckClassAdapter.class
-SHA1-Digest: zvceyMnB3MybUgofyZ1ye48q1Dc=
-
-Name: org/objectweb/asm/FieldVisitor.class
-SHA1-Digest: RsQ0nH9tT2R9G0QyTkzysSutYuc=
-
-Name: org/objectweb/asm/commons/RemappingFieldAdapter.class
-SHA1-Digest: WgkGC80DuWf5goaTo6apndXfr4U=
-
-Name: org/objectweb/asm/commons/TableSwitchGenerator.class
-SHA1-Digest: XwcnM4llF8WZlI/6bzZS+t4vcWU=
-
-Name: org/objectweb/asm/xml/Processor$TransformerHandlerFactory.class
-SHA1-Digest: T63icHvIwoDqm5rkuigZo/Ihtso=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueEnumRule.
- class
-SHA1-Digest: 5v7E7TumkN2CrUnGlKRG0JfcJJ8=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$TableSwitchLabelRule.cla
- ss
-SHA1-Digest: hshWVfWz+nGCeCZCPnkdtMSlxxo=
-
-Name: org/objectweb/asm/tree/TryCatchBlockNode.class
-SHA1-Digest: nxjxIm42S5nwsdFxwP0yRaOiMTU=
-
-Name: org/objectweb/asm/tree/InsnList$InsnListIterator.class
-SHA1-Digest: 3eWhjGGpTCIbXnkwE8fcYmZ7WtU=
-
-Name: org/objectweb/asm/util/ASMifierMethodVisitor.class
-SHA1-Digest: bgim3+SBylSeWcHpVejW6peu0qc=
-
-Name: org/objectweb/asm/xml/Processor$ASMContentHandlerFactory.class
-SHA1-Digest: aIIdIIZh6DHrAMLYI3nMY/uhWac=
-
-Name: org/objectweb/asm/commons/EmptyVisitor.class
-SHA1-Digest: ghmu5cSBwOS1Rak+5iLvUhtAPjs=
-
-Name: org/objectweb/asm/tree/ClassNode.class
-SHA1-Digest: zqBnODeb+oeCViRL1aiCYXMZB+4=
-
-Name: plugin.properties
-SHA1-Digest: broAt0N2NCO6dmEOZSReP9HHaVc=
-
-Name: org/objectweb/asm/tree/FieldNode.class
-SHA1-Digest: GceIhUqJVYxrp3KCWPYFiUJgwjY=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$InnerClassRule.class
-SHA1-Digest: ETHmGw4G8zrRcXRlmRPZdxI1zsU=
-
-Name: org/objectweb/asm/util/TraceSignatureVisitor.class
-SHA1-Digest: tLGOLzBjyFpysmpUNzZ576OmHrg=
-
-Name: org/objectweb/asm/tree/TableSwitchInsnNode.class
-SHA1-Digest: DdbiGEY+a5ySYT32U8IHKSXOziA=
-
-Name: org/objectweb/asm/xml/Processor$SingleDocElement.class
-SHA1-Digest: ygtbYlpFZeaixpnllKygxLwEXMI=
-
-Name: org/objectweb/asm/tree/InsnList.class
-SHA1-Digest: +MYIPQxeKoYUwWZJmCNV9h/g128=
-
-Name: org/objectweb/asm/commons/AdviceAdapter.class
-SHA1-Digest: pmXvi/VdlfTzsH9KIveDGdZ8o58=
-
-Name: org/objectweb/asm/xml/Processor$SAXWriter.class
-SHA1-Digest: Q0fQrePnZOGod+OaXW6f6+QgUDc=
-
-Name: org/objectweb/asm/tree/analysis/SimpleVerifier.class
-SHA1-Digest: NQeNOExaixEYRVP+DDgG+1RTxBw=
-
-Name: org/objectweb/asm/xml/SAXAnnotationAdapter.class
-SHA1-Digest: r3BQAFpY7/Q2nTxEiyHtIlxBDAQ=
-
-Name: org/objectweb/asm/tree/analysis/BasicInterpreter.class
-SHA1-Digest: Bd7F2v/yP6g3MqmIFEBvN40c9gE=
-
-Name: org/objectweb/asm/commons/JSRInlinerAdapter$Instantiation.class
-SHA1-Digest: QFmfvsSjrQ9FcqYsMH442tTZfrY=
-
-Name: org/objectweb/asm/commons/AnalyzerAdapter.class
-SHA1-Digest: FcSd2hnjWWeqG+whi8Vyfm/NRA8=
-
-Name: org/objectweb/asm/util/Traceable.class
-SHA1-Digest: HqsPJ6VdYlqA2zfcbaEFZHi5JlY=
-
-Name: org/objectweb/asm/Opcodes.class
-SHA1-Digest: dmxBjCOYVgMiF7FyMg2HQVTusZg=
-
-Name: org/objectweb/asm/xml/Processor$EntryElement.class
-SHA1-Digest: wSv5vSSIZmVGc6X96zR4zgeyOaw=
-
-Name: org/objectweb/asm/ClassVisitor.class
-SHA1-Digest: rHZ01JJcZ/yuuHU2MWVSh+gkdmA=
-
-Name: org/objectweb/asm/commons/RemappingClassAdapter.class
-SHA1-Digest: OSJ2ySTT/e+q1LPqe++Gfptwa40=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationRule.class
-SHA1-Digest: 5uAmOEdZEg8jqv/pHMM544PclNY=
-
-Name: org/objectweb/asm/xml/ASMContentHandler$TableSwitchRule.class
-SHA1-Digest: WKbzAXrPew2jURpwEnv8Wz71LxA=
-
-Name: org/objectweb/asm/commons/SerialVersionUIDAdder$Item.class
-SHA1-Digest: gnwpyOJGWyLNa36ns62ubxr8gPI=
-
diff --git a/dependencyManifests/org.objectweb.asm_3.2.0.v200909071300.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.objectweb.asm_3.2.0.v200909071300.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5fdcedc
--- /dev/null
+++ b/dependencyManifests/org.objectweb.asm_3.2.0.v200909071300.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,520 @@
+Manifest-Version: 1.0
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.3
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.objectweb.asm
+Export-Package: org.objectweb.asm;version="3.2.0",org.objectweb.asm.co
+ mmons;version="3.2.0",org.objectweb.asm.signature;version="3.2.0",org
+ .objectweb.asm.tree;version="3.2.0",org.objectweb.asm.tree.analysis;v
+ ersion="3.2.0",org.objectweb.asm.util;version="3.2.0",org.objectweb.a
+ sm.xml;version="3.2.0"
+Bundle-Version: 3.2.0.v200909071300
+Bundle-ManifestVersion: 2
+
+Name: org/objectweb/asm/xml/Processor$SubdocumentHandlerFactory.class
+SHA1-Digest: IRLJnMucw00HQe5leaIn7CmT8GQ=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$OpcodesRule.class
+SHA1-Digest: 6nAEhtBEso+8+Zf49xjgbyFrF34=
+
+Name: org/objectweb/asm/util/AbstractVisitor.class
+SHA1-Digest: tVMZs8Aq7KyTNJOs+OoYy1f72TM=
+
+Name: org/objectweb/asm/util/CheckMethodAdapter.class
+SHA1-Digest: eL7V8t4lH53vZvYVs9h33U/haFc=
+
+Name: org/objectweb/asm/signature/SignatureWriter.class
+SHA1-Digest: HPJAV23RIOlAzGwMoVui33DnuN4=
+
+Name: org/objectweb/asm/tree/AbstractInsnNode.class
+SHA1-Digest: 3ud3mL3b8p9ltWAKZZ7oBptQhrQ=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$RuleSet.class
+SHA1-Digest: P7YJzHvEC2OH8yUDz2wZjgNeFGA=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$OuterClassRule.class
+SHA1-Digest: D8JrQR9Z5b9r5J/SF81LGucKxI0=
+
+Name: org/objectweb/asm/ByteVector.class
+SHA1-Digest: h4ZyM8B9dY7thBKmXUzu0x13Y5s=
+
+Name: org/objectweb/asm/tree/analysis/SourceInterpreter.class
+SHA1-Digest: 2WPgesQkgGp8/RXySfAGnuTSUcs=
+
+Name: org/objectweb/asm/AnnotationVisitor.class
+SHA1-Digest: UQnecRexGB31Cr2kvGgwghcuRoU=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$LabelRule.class
+SHA1-Digest: /QFTnyt5V8mrN+fNORET+Bf5mrA=
+
+Name: org/objectweb/asm/tree/JumpInsnNode.class
+SHA1-Digest: ZT5Fsmfm2TcjySaNJ2yU3EPt18k=
+
+Name: org/objectweb/asm/commons/JSRInlinerAdapter$Subroutine.class
+SHA1-Digest: oAdEhdePVGjucFwgvPf0/QZIn8o=
+
+Name: org/objectweb/asm/xml/SAXFieldAdapter.class
+SHA1-Digest: b6+QKfUnSgXiKGyZlMkhRpjfduk=
+
+Name: org/objectweb/asm/ClassAdapter.class
+SHA1-Digest: sG+h9Nx43aJ24SAFAmhX5JyEoWY=
+
+Name: org/objectweb/asm/ClassWriter.class
+SHA1-Digest: lxlh7golUn1zGQXvuB1yA18BL14=
+
+Name: org/objectweb/asm/tree/analysis/Frame.class
+SHA1-Digest: 6otWk0F5/4TnMpZlXOFXk8k7YtI=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$LookupSwitchRule.class
+SHA1-Digest: xTR9SXki1Tbeq4ERivaeNWfGZPA=
+
+Name: org/objectweb/asm/MethodVisitor.class
+SHA1-Digest: XWyF4JSLXzdQ3blTUyqFeK71K1o=
+
+Name: org/objectweb/asm/tree/MemberNode.class
+SHA1-Digest: r7nOTK/tk+JWO98Yl0xidvQ0ifc=
+
+Name: org/objectweb/asm/tree/TypeInsnNode.class
+SHA1-Digest: lEEY4vKQs/wrYuOMQR+WB5O0kNg=
+
+Name: org/objectweb/asm/tree/analysis/SmallSet.class
+SHA1-Digest: anfshk1bBQr/rWNOLAdHdIYBr0Y=
+
+Name: org/objectweb/asm/tree/analysis/Value.class
+SHA1-Digest: umvNo9wKI0Z5t2GzuxWN8jPdh4k=
+
+Name: org/objectweb/asm/commons/LocalVariablesSorter.class
+SHA1-Digest: vP0IeoabCJaR3zdNmSREfBXShLs=
+
+Name: org/objectweb/asm/tree/LineNumberNode.class
+SHA1-Digest: 4aGbm34h4RkQSsSt40aDb9ud8ug=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$FrameTypeRule.class
+SHA1-Digest: MVTrxjurBweukkcvEOg8A/LUYXs=
+
+Name: org/objectweb/asm/util/TraceAbstractVisitor.class
+SHA1-Digest: U4GTihzkPOqGnwoIefu2FtgLO3U=
+
+Name: org/objectweb/asm/AnnotationWriter.class
+SHA1-Digest: FmuG+CTjzZcypuTUnTnO7FB50BY=
+
+Name: org/objectweb/asm/commons/GeneratorAdapter.class
+SHA1-Digest: fpgaUrvu85Gnfi/sgXm/y9DrJ+Y=
+
+Name: org/objectweb/asm/xml/Processor$OutputSlicingHandler.class
+SHA1-Digest: eiwNlDsKD3EE2D/WVvPBdQmHQSQ=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$ExceptionRule.class
+SHA1-Digest: 7xMDX6KfTVQ8sIKxjAZxMtKxDQg=
+
+Name: org/objectweb/asm/tree/InsnList$1.class
+SHA1-Digest: jxdwoUhxl+cSuk/Vad29up9hkKs=
+
+Name: org/objectweb/asm/tree/FieldInsnNode.class
+SHA1-Digest: DG5wGiblh5xDqpHF45xDBPoXVFM=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationDefaultRule.cl
+ ass
+SHA1-Digest: sXhgnQD6ytDsV7YC8B/tWXbkD3w=
+
+Name: org/objectweb/asm/signature/SignatureVisitor.class
+SHA1-Digest: DenxenpQSJ8ZkbIrDLDnIORqIeg=
+
+Name: org/objectweb/asm/util/ASMifierFieldVisitor.class
+SHA1-Digest: u57BDY+jeu2N+FLz4pnSm+wHCoU=
+
+Name: org/objectweb/asm/tree/LookupSwitchInsnNode.class
+SHA1-Digest: VtdlA51X8LelF/FXyederEOaL+M=
+
+Name: org/objectweb/asm/xml/SAXCodeAdapter.class
+SHA1-Digest: G7mAHjX8WYnGsDuLk08NTdL1s8I=
+
+Name: org/objectweb/asm/util/ASMifierAnnotationVisitor.class
+SHA1-Digest: Moha0L4npqm6bIh5n4/9IKG1ca4=
+
+Name: org/objectweb/asm/xml/Processor$1.class
+SHA1-Digest: VY02tzcvGflUxFJtl9DTesplcFk=
+
+Name: about_files/README.txt
+SHA1-Digest: g+hfjp6RL2xeop0L2gLHmlqdZkM=
+
+Name: org/objectweb/asm/commons/RemappingSignatureAdapter.class
+SHA1-Digest: xJNzU4FusNhuyFzRIqsl4QWK6Q0=
+
+Name: org/objectweb/asm/Frame.class
+SHA1-Digest: 8/3CB7SL0A11IjVxcwA9YBByXd0=
+
+Name: org/objectweb/asm/MethodAdapter.class
+SHA1-Digest: CBaMBHTAVqdtcyccqACLya21N5U=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$Opcode.class
+SHA1-Digest: phl1rJ4ZcRaC+4w4ssWXULQEmPg=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$MaxRule.class
+SHA1-Digest: I317BA+By0H1RMYsRuXHrRLiWg8=
+
+Name: org/objectweb/asm/tree/InsnNode.class
+SHA1-Digest: vC+88k/JTevh3L73VNg4stN/0bA=
+
+Name: org/objectweb/asm/tree/analysis/SourceValue.class
+SHA1-Digest: nqxOTo/7dSXuRgLxMtXj8N/Ok98=
+
+Name: org/objectweb/asm/tree/InnerClassNode.class
+SHA1-Digest: pEOWq01oj7BmhKWosLBtXOXE6Q8=
+
+Name: org/objectweb/asm/tree/LabelNode.class
+SHA1-Digest: PdzjM3fjKYjvGt56p3jMwHI6zYU=
+
+Name: org/objectweb/asm/tree/analysis/Subroutine.class
+SHA1-Digest: VEH4EsYcgrbYaCZBHREGdKxN5hE=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$FrameRule.class
+SHA1-Digest: ltmo3xrXYpULi7Wj1K+lXue1FOU=
+
+Name: org/objectweb/asm/commons/Method.class
+SHA1-Digest: XWef2eUPLlfEHe0u0jhuFu27Cas=
+
+Name: org/objectweb/asm/commons/InstructionAdapter.class
+SHA1-Digest: N/njcXj5ROpW19md2jKB5GSj8kA=
+
+Name: org/objectweb/asm/util/TraceFieldVisitor.class
+SHA1-Digest: jvDDCoH5PH4mUaaWa0kxPx7myw4=
+
+Name: org/objectweb/asm/util/CheckMethodAdapter$1.class
+SHA1-Digest: QaEcobQ1/7qZfizGWppVIO58OFA=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$OpcodeGroup.class
+SHA1-Digest: obho4UaPGv7y2hnzjtVY6GgwlaE=
+
+Name: org/objectweb/asm/signature/SignatureReader.class
+SHA1-Digest: vk56OWDIbFd5xWa4FyNBl+Rc+Kk=
+
+Name: org/objectweb/asm/MethodWriter.class
+SHA1-Digest: 1VcoZgt+3jK9m694wYBd9p3nKM0=
+
+Name: about_files/LICENSE.txt
+SHA1-Digest: j2BeL98mo7ztDyqaEc5IJfnL2Q4=
+
+Name: org/objectweb/asm/xml/SAXClassAdapter.class
+SHA1-Digest: DXfn9mg3ag9r+FYHr6bCsdsSFIM=
+
+Name: org/objectweb/asm/xml/Processor$SAXWriterFactory.class
+SHA1-Digest: hcIU5AlK6Rg6p4OFBZUQVyCzQjE=
+
+Name: org/objectweb/asm/Type.class
+SHA1-Digest: +Q5udvHkBDr1MeGVdQtq0EXXl0s=
+
+Name: org/objectweb/asm/commons/Remapper.class
+SHA1-Digest: uL1tIWzAaPTviLE0Rus2iybo1YM=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueRule.clas
+ s
+SHA1-Digest: /tmOGK+Uh9n3NIchYUJ5Kw1k/oY=
+
+Name: org/objectweb/asm/tree/LdcInsnNode.class
+SHA1-Digest: xrVsKJm2iQgaUF9Ngszl3bzRhVs=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$LookupSwitchLabelRule.cl
+ ass
+SHA1-Digest: YV7f8lqABKILqNF88Tb0Hu8C/uI=
+
+Name: org/objectweb/asm/tree/IntInsnNode.class
+SHA1-Digest: ldzNDWzyE8eFAC3Hb/K64NgHWLU=
+
+Name: org/objectweb/asm/tree/analysis/BasicValue.class
+SHA1-Digest: u+ajv9i+fPQu35JqSIx3VZFB5fU=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$InterfacesRule.class
+SHA1-Digest: Jlaz19FDzjkW8wLgzbAd0mj7RFw=
+
+Name: org/objectweb/asm/commons/JSRInlinerAdapter.class
+SHA1-Digest: Vh1W3a7SabgnnOTgAhQKx1lXTOw=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$SourceRule.class
+SHA1-Digest: 7QzD7amb7F9H6z7u8uJo6FLL1XA=
+
+Name: org/objectweb/asm/commons/CodeSizeEvaluator.class
+SHA1-Digest: JLljG0VtqfiHbHyK0g0ssoXQiTo=
+
+Name: org/objectweb/asm/commons/SerialVersionUIDAdder.class
+SHA1-Digest: hySS/J//j/qRD8eE5b1hIvMVHU0=
+
+Name: org/objectweb/asm/ClassReader.class
+SHA1-Digest: q9zMQ2joqNDyB3v9/lhj9ykJWeg=
+
+Name: about.html
+SHA1-Digest: Pb3bKmCEKrJSO6koFKmxLZ5w78U=
+
+Name: org/objectweb/asm/util/ASMifierClassVisitor.class
+SHA1-Digest: J+jE/eN8ovotfqqkpwHWNNvd4ec=
+
+Name: org/objectweb/asm/util/CheckFieldAdapter.class
+SHA1-Digest: 9TsvqSjZ1ShfcnjhVNRlF8TUz90=
+
+Name: org/objectweb/asm/tree/AnnotationNode.class
+SHA1-Digest: yWBnFAyxolE1o3AZSm5DltsN8xA=
+
+Name: org/objectweb/asm/util/CheckSignatureAdapter.class
+SHA1-Digest: fOlTXO7sisxUUoU2GAoS5xAUv+E=
+
+Name: org/objectweb/asm/util/CheckAnnotationAdapter.class
+SHA1-Digest: msNK6I+i+m40dvLSnzQLJWbULMg=
+
+Name: org/objectweb/asm/commons/JSRInlinerAdapter$1.class
+SHA1-Digest: 8sBeJr95ErmH2gAv0r9i6bEf9Yw=
+
+Name: org/objectweb/asm/Item.class
+SHA1-Digest: u2HwR+Leq4I0TAxbXj+uS7QlWvw=
+
+Name: org/objectweb/asm/util/TraceAnnotationVisitor.class
+SHA1-Digest: zFw28cbyz3V6NpHvYadyqT/8Y1E=
+
+Name: org/objectweb/asm/tree/analysis/AnalyzerException.class
+SHA1-Digest: SH8CzSiMmHxMd/bnWkB+FeZDGGw=
+
+Name: org/objectweb/asm/tree/IincInsnNode.class
+SHA1-Digest: 7bZTrS9yacS4Vg6cd08tKDCsJsE=
+
+Name: org/objectweb/asm/tree/FrameNode.class
+SHA1-Digest: sqSthxQKJfeMqluOEpwYFhi8ejc=
+
+Name: org/objectweb/asm/xml/ASMContentHandler.class
+SHA1-Digest: M6PXpbjoHoWdAqecbBF6J3rQ4wM=
+
+Name: org/objectweb/asm/Label.class
+SHA1-Digest: 5oU9OGYiW2Pn4hjoN26dLqf+Z8k=
+
+Name: org/objectweb/asm/tree/MethodInsnNode.class
+SHA1-Digest: aWfe0NHpqTp5Ft3eMc1f+gTsMVk=
+
+Name: org/objectweb/asm/tree/MultiANewArrayInsnNode.class
+SHA1-Digest: bQR874E6oSxJ5rXxtpHoiY67EU0=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueArrayRule
+ .class
+SHA1-Digest: niN72cpSZGnRhjlouGPAYLWGMq8=
+
+Name: org/objectweb/asm/util/TraceMethodVisitor.class
+SHA1-Digest: K4rcGUcUW24+N+eGk4ZD0Y1NBn8=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$LocalVarRule.class
+SHA1-Digest: Rgua1UYDJGEfzrFsUISyy3zR7m8=
+
+Name: org/objectweb/asm/xml/Processor$InputSlicingHandler.class
+SHA1-Digest: G+Ax5kcWIEh+7GdwSIlzhQSiWKQ=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$TryCatchRule.class
+SHA1-Digest: DKoP68Q/SBrj5WT2f6xez8JifOI=
+
+Name: org/objectweb/asm/commons/RemappingAnnotationAdapter.class
+SHA1-Digest: vZfz8aOYPqTNVM6Fu9V5TbUGOC0=
+
+Name: org/objectweb/asm/util/TraceClassVisitor.class
+SHA1-Digest: QRkAjGy7g+HlbvX4Hea2Kqb6Qhg=
+
+Name: org/objectweb/asm/xml/Processor$ZipEntryElement.class
+SHA1-Digest: V+gN98rxE4ZT31622nKyi/TZXys=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$1.class
+SHA1-Digest: UsgmbbpFXDnf4mekRkUGs7qO6ac=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$ExceptionsRule.class
+SHA1-Digest: +q3LAcxsdgDck3xw44vby0BlZWI=
+
+Name: org/objectweb/asm/tree/analysis/BasicVerifier.class
+SHA1-Digest: W+zQ+de/KfqSflNq+pkYY1A13CM=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$ClassRule.class
+SHA1-Digest: N9OTGu9X5iQ6pU4uGrabNoEaa98=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$InterfaceRule.class
+SHA1-Digest: PlXOJT3jubWutfWOS4L5+yaP6es=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$FieldRule.class
+SHA1-Digest: tw2TrKcqdR5yOct57lZ9e9+Qsss=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationParameterRule.
+ class
+SHA1-Digest: 1+AtncmccYk+UNlBnbsjRQucDFo=
+
+Name: org/objectweb/asm/Handler.class
+SHA1-Digest: 7slFCwpzMai2GjSAMIoYDyjjkNM=
+
+Name: org/objectweb/asm/tree/LocalVariableNode.class
+SHA1-Digest: cdUfT0n1g0uiJ5KnpGfe/V3faj0=
+
+Name: org/objectweb/asm/tree/VarInsnNode.class
+SHA1-Digest: iONkO5hz0yyMfIESLEXJuuQSCu4=
+
+Name: org/objectweb/asm/commons/RemappingMethodAdapter.class
+SHA1-Digest: FQ6mgaNFT6lBrP8Tpgr9tlZu17Y=
+
+Name: org/objectweb/asm/FieldWriter.class
+SHA1-Digest: AVLwL6LPOTjaRJYzkwOVktJR0Dc=
+
+Name: org/objectweb/asm/xml/SAXAdapter.class
+SHA1-Digest: Rq0XGG1YBhNZ/s/0wS4GnqjKkeU=
+
+Name: org/objectweb/asm/xml/Processor$ContentHandlerFactory.class
+SHA1-Digest: Iql3AcTuk/Zv7KT1J682FAagE6o=
+
+Name: org/objectweb/asm/Edge.class
+SHA1-Digest: zPhU4kuh2C3K2hX7JxP3HRTWciQ=
+
+Name: org/objectweb/asm/commons/StaticInitMerger.class
+SHA1-Digest: CEb0IMAmNTzKt9hH9q7DFJXwr6o=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: KyT9FF7C7t86NoBoa2kZT3ZJBfw=
+
+Name: org/objectweb/asm/util/ASMifierAbstractVisitor.class
+SHA1-Digest: iwAhqNDyL1BHfSFnZfrd6RIMFq8=
+
+Name: org/objectweb/asm/tree/MethodNode.class
+SHA1-Digest: ARt9uAC8EXHdxhpyIGa/Bvcmf8Q=
+
+Name: org/objectweb/asm/xml/Processor$ProtectedInputStream.class
+SHA1-Digest: vBANXwaSsHj+RhBWagXgXxqkYS8=
+
+Name: org/objectweb/asm/tree/analysis/Interpreter.class
+SHA1-Digest: TGyQTdIapOWWZCMxzp2qP24URLg=
+
+Name: org/objectweb/asm/util/ASMifiable.class
+SHA1-Digest: gc/zNMznah6L9OMNiYH1VJ9u3Fo=
+
+Name: org/objectweb/asm/xml/Processor.class
+SHA1-Digest: hpFDjSzpzfci6PLqgu7+Xf4dXx8=
+
+Name: org/objectweb/asm/tree/analysis/Analyzer.class
+SHA1-Digest: Ii+3w7PXpEfUp5F0qRU/218t9Uc=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$LineNumberRule.class
+SHA1-Digest: 9et/hOWpBROIuG+/k+xkJK+MTRs=
+
+Name: org/objectweb/asm/Attribute.class
+SHA1-Digest: vSTLCi1osXUWM/PbcGSBbi3YEuk=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueAnnotatio
+ nRule.class
+SHA1-Digest: agaZ0tlyW10p+fYfQU8LgdJ2ddQ=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$Rule.class
+SHA1-Digest: n9CeqYim0bgtoyHcECMF8svTcZc=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$MethodRule.class
+SHA1-Digest: rnJXYV8UK9InZWOOQ8srNnBwd3c=
+
+Name: org/objectweb/asm/commons/SimpleRemapper.class
+SHA1-Digest: zv/T3hyl6UOT5r4B6pkE/OIcU2s=
+
+Name: org/objectweb/asm/tree/MethodNode$1.class
+SHA1-Digest: WtSvtR/B+yqOfEIoRnTyc9ghUHo=
+
+Name: org/objectweb/asm/util/CheckClassAdapter.class
+SHA1-Digest: Nms3O04QL5NpaG0H14CaduKSBU4=
+
+Name: org/objectweb/asm/FieldVisitor.class
+SHA1-Digest: RsQ0nH9tT2R9G0QyTkzysSutYuc=
+
+Name: org/objectweb/asm/commons/RemappingFieldAdapter.class
+SHA1-Digest: WgkGC80DuWf5goaTo6apndXfr4U=
+
+Name: org/objectweb/asm/commons/TableSwitchGenerator.class
+SHA1-Digest: XwcnM4llF8WZlI/6bzZS+t4vcWU=
+
+Name: org/objectweb/asm/xml/Processor$TransformerHandlerFactory.class
+SHA1-Digest: T63icHvIwoDqm5rkuigZo/Ihtso=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationValueEnumRule.
+ class
+SHA1-Digest: 5v7E7TumkN2CrUnGlKRG0JfcJJ8=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$TableSwitchLabelRule.cla
+ ss
+SHA1-Digest: hshWVfWz+nGCeCZCPnkdtMSlxxo=
+
+Name: org/objectweb/asm/tree/TryCatchBlockNode.class
+SHA1-Digest: nxjxIm42S5nwsdFxwP0yRaOiMTU=
+
+Name: org/objectweb/asm/tree/InsnList$InsnListIterator.class
+SHA1-Digest: 3eWhjGGpTCIbXnkwE8fcYmZ7WtU=
+
+Name: org/objectweb/asm/util/ASMifierMethodVisitor.class
+SHA1-Digest: bgim3+SBylSeWcHpVejW6peu0qc=
+
+Name: org/objectweb/asm/xml/Processor$ASMContentHandlerFactory.class
+SHA1-Digest: aIIdIIZh6DHrAMLYI3nMY/uhWac=
+
+Name: org/objectweb/asm/commons/EmptyVisitor.class
+SHA1-Digest: ghmu5cSBwOS1Rak+5iLvUhtAPjs=
+
+Name: org/objectweb/asm/tree/ClassNode.class
+SHA1-Digest: zqBnODeb+oeCViRL1aiCYXMZB+4=
+
+Name: plugin.properties
+SHA1-Digest: broAt0N2NCO6dmEOZSReP9HHaVc=
+
+Name: org/objectweb/asm/tree/FieldNode.class
+SHA1-Digest: gIE6CQON87o29iqIhjzRcyzXXc8=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$InnerClassRule.class
+SHA1-Digest: ETHmGw4G8zrRcXRlmRPZdxI1zsU=
+
+Name: org/objectweb/asm/util/TraceSignatureVisitor.class
+SHA1-Digest: tLGOLzBjyFpysmpUNzZ576OmHrg=
+
+Name: org/objectweb/asm/tree/TableSwitchInsnNode.class
+SHA1-Digest: DdbiGEY+a5ySYT32U8IHKSXOziA=
+
+Name: org/objectweb/asm/xml/Processor$SingleDocElement.class
+SHA1-Digest: ygtbYlpFZeaixpnllKygxLwEXMI=
+
+Name: org/objectweb/asm/tree/InsnList.class
+SHA1-Digest: +MYIPQxeKoYUwWZJmCNV9h/g128=
+
+Name: org/objectweb/asm/commons/AdviceAdapter.class
+SHA1-Digest: PwFMoK8/T+Gm7t33cVp7pBsIB2w=
+
+Name: org/objectweb/asm/xml/Processor$SAXWriter.class
+SHA1-Digest: Q0fQrePnZOGod+OaXW6f6+QgUDc=
+
+Name: org/objectweb/asm/tree/analysis/SimpleVerifier.class
+SHA1-Digest: cWtugHusbNXtBlmSnH5iDgM56rs=
+
+Name: org/objectweb/asm/xml/SAXAnnotationAdapter.class
+SHA1-Digest: r3BQAFpY7/Q2nTxEiyHtIlxBDAQ=
+
+Name: org/objectweb/asm/tree/analysis/BasicInterpreter.class
+SHA1-Digest: Qqynj1ZI6tDZcHqo0K67hrQB+9E=
+
+Name: org/objectweb/asm/commons/JSRInlinerAdapter$Instantiation.class
+SHA1-Digest: QFmfvsSjrQ9FcqYsMH442tTZfrY=
+
+Name: org/objectweb/asm/commons/AnalyzerAdapter.class
+SHA1-Digest: 4enpDz2sTNEtcF6/nlLP3rm90ck=
+
+Name: org/objectweb/asm/util/Traceable.class
+SHA1-Digest: HqsPJ6VdYlqA2zfcbaEFZHi5JlY=
+
+Name: org/objectweb/asm/Opcodes.class
+SHA1-Digest: kZovfm82Efc7mxvoDryLJq42IWA=
+
+Name: org/objectweb/asm/xml/Processor$EntryElement.class
+SHA1-Digest: wSv5vSSIZmVGc6X96zR4zgeyOaw=
+
+Name: org/objectweb/asm/ClassVisitor.class
+SHA1-Digest: rHZ01JJcZ/yuuHU2MWVSh+gkdmA=
+
+Name: org/objectweb/asm/commons/RemappingClassAdapter.class
+SHA1-Digest: OSJ2ySTT/e+q1LPqe++Gfptwa40=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$AnnotationRule.class
+SHA1-Digest: 5uAmOEdZEg8jqv/pHMM544PclNY=
+
+Name: org/objectweb/asm/xml/ASMContentHandler$TableSwitchRule.class
+SHA1-Digest: WKbzAXrPew2jURpwEnv8Wz71LxA=
+
+Name: org/objectweb/asm/commons/SerialVersionUIDAdder$Item.class
+SHA1-Digest: gnwpyOJGWyLNa36ns62ubxr8gPI=
+
diff --git a/dependencyManifests/org.sat4j.core_2.1.1.v20090825.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.sat4j.core_2.1.1.v20090825.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index 5337d8f..0000000
--- a/dependencyManifests/org.sat4j.core_2.1.1.v20090825.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,520 +0,0 @@
-Manifest-Version: 1.0
-Implementation-Vendor: CRIL CNRS UMR 8188 - Universite d'Artois
-Bundle-Localization: plugin
-Main-Class: org.sat4j.BasicLauncher
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Built-By: Daniel Le Berre
-Bundle-SymbolicName: org.sat4j.core
-Bundle-Version: 2.1.1.v20090825
-Export-Package: org.sat4j;version="2.1.1.v20090825",org.sat4j.core;ver
- sion="2.1.1.v20090825",org.sat4j.minisat;version="2.1.1.v20090825",or
- g.sat4j.minisat.constraints;version="2.1.1.v20090825",org.sat4j.minis
- at.constraints.card;version="2.1.1.v20090825",org.sat4j.minisat.const
- raints.cnf;version="2.1.1.v20090825",org.sat4j.minisat.core;version="
- 2.1.1.v20090825",org.sat4j.minisat.learning;version="2.1.1.v20090825"
- ,org.sat4j.minisat.orders;version="2.1.1.v20090825",org.sat4j.minisat
- .restarts;version="2.1.1.v20090825",org.sat4j.minisat.uip;version="2.
- 1.1.v20090825",org.sat4j.opt;version="2.1.1.v20090825",org.sat4j.read
- er;version="2.1.1.v20090825",org.sat4j.specs;version="2.1.1.v20090825
- ",org.sat4j.tools;version="2.1.1.v20090825",org.sat4j.tools.xplain;ve
- rsion="2.1.1.v20090825"
-Specification-Version: NA
-Specification-Title: SAT4J
-Specification-Vendor: Daniel Le Berre
-Ant-Version: Apache Ant 1.7.0
-Bundle-Vendor: %providerName
-Bundle-Name: %bundleName
-Created-By: 1.5.0_19-137 (Apple Inc.)
-Implementation-Version: 2.1.1.v20090825 
-Implementation-Title: SAT4J
-Bundle-ManifestVersion: 2
-
-Name: overview.html
-SHA1-Digest: dn/2qZIKrR/o7110Zst9XnBMJQs=
-
-Name: org/sat4j/tools/GateTranslator.class
-SHA1-Digest: p1auMO6ckQnpGeiJeWurr9xJgOQ=
-
-Name: org/sat4j/minisat/core/IOrder.class
-SHA1-Digest: tRCHKHS8fwQUsZOjFwLReL2i1AA=
-
-Name: org/sat4j/minisat/core/Solver$6.class
-SHA1-Digest: l2Sge3VeKB6vUseMfZ52H+Jny4A=
-
-Name: org/sat4j/tools/SingleSolutionDetector.class
-SHA1-Digest: M68kxQF2o6IqN6qRPZTi7/X+Dc4=
-
-Name: org/sat4j/minisat/constraints/AbstractDataStructureFactory.class
-SHA1-Digest: EbvruIL+tV1ZAgNgArgVAm5AznM=
-
-Name: sat4j.version
-SHA1-Digest: UgKBJX7GPz4p9y5XWFsDaO4zhLk=
-
-Name: org/sat4j/tools/xplain/Xplain.class
-SHA1-Digest: CuUPyfn8eAZU9Xqvin6z5RXBhnA=
-
-Name: org/sat4j/minisat/constraints/CardinalityDataStructureYanMin.cla
- ss
-SHA1-Digest: XJTWvQptCJ8w1CGONDrY3VJBEwk=
-
-Name: org/sat4j/minisat/orders/VarOrderHeap.class
-SHA1-Digest: itXQLmPO+V/Bjs++CsdgBuFUkEQ=
-
-Name: org/sat4j/minisat/constraints/cnf/OriginalWLClause.class
-SHA1-Digest: Xsd+XA2i59558PYJsdkD5f83gRc=
-
-Name: org/sat4j/minisat/core/ConflictTimerContainer.class
-SHA1-Digest: +vCiT4UVesvRt+thu/kz7Ov7qw4=
-
-Name: org/sat4j/minisat/core/Solver$4$1.class
-SHA1-Digest: mavEK7PmJ7sr8Dk2SfEOC7o6Akw=
-
-Name: org/sat4j/minisat/core/Solver$5$1.class
-SHA1-Digest: 5JQw8WJWA5UZ8KSFKOEUmCoJRkE=
-
-Name: org/sat4j/minisat/learning/LimitedLearning.class
-SHA1-Digest: YG41S3AarTG5HwL9sQQoVA7+j/Q=
-
-Name: org/sat4j/minisat/restarts/MiniSATRestarts.class
-SHA1-Digest: vBJtAinHl6DRqOUPUtsoKtNOEUg=
-
-Name: org/sat4j/Messages.class
-SHA1-Digest: iHoU76sF1psIxBXbRcCqfFPHkyo=
-
-Name: org/sat4j/minisat/core/ConflictTimerAdapter.class
-SHA1-Digest: ZTcGokFYFS6NYk0O3OpqJukv8dk=
-
-Name: org/sat4j/minisat/core/RestartStrategy.class
-SHA1-Digest: SR7+hV5KU8WEyrL8iB3mLfT75VU=
-
-Name: org/sat4j/minisat/restarts/LubyRestarts.class
-SHA1-Digest: zRRmQi4bnV0ctnEZkjBIt++EAfI=
-
-Name: org/sat4j/minisat/orders/NegativeLiteralSelectionStrategy.class
-SHA1-Digest: NXANZrpr7OX8k6aPYPg8O0lMowk=
-
-Name: org/sat4j/minisat/constraints/ClausalDataStructureCBWL.class
-SHA1-Digest: CNvXz7wl6EtjGSbzEbwaEbooyjs=
-
-Name: org/sat4j/minisat/constraints/AbstractCardinalityDataStructure.c
- lass
-SHA1-Digest: xJoKj6HfBZS37lXTm3imIX6Z6HA=
-
-Name: org/sat4j/minisat/constraints/cnf/LearntHTClause.class
-SHA1-Digest: wsAKb4JG0wy4IWSCntU1qPw2/s4=
-
-Name: org/sat4j/tools/ConstrGroup.class
-SHA1-Digest: LWxgTu+ibMg5k8Iqrdl5G/j4RgY=
-
-Name: org/sat4j/specs/IOptimizationProblem.class
-SHA1-Digest: 23YapXgOrZpR2zjJe8HB39uh/xo=
-
-Name: org/sat4j/minisat/orders/RandomLiteralSelectionStrategy.class
-SHA1-Digest: r/Cl5DoV+4bjcOoge31nxHaq+pA=
-
-Name: org/sat4j/minisat/core/Learner.class
-SHA1-Digest: OFG+QVmz9ER0MEfRYU+p+5f23jQ=
-
-Name: org/sat4j/AbstractLauncher.class
-SHA1-Digest: eeNIr9xmYTG58EP6YfxkCUejZKI=
-
-Name: org/sat4j/minisat/orders/UserFixedPhaseSelectionStrategy.class
-SHA1-Digest: Hu24ARx+sMPYuy470L3KMUYCKb0=
-
-Name: org/sat4j/minisat/constraints/card/MaxWatchCard.class
-SHA1-Digest: MePCmQqpn0x1mAJaY/BqrvQ0YEM=
-
-Name: org/sat4j/minisat/core/Solver.class
-SHA1-Digest: Zsf4LVEzA32b0juk/NBM91lhVoU=
-
-Name: org/sat4j/specs/ISolver.class
-SHA1-Digest: r01ZGrpkBmch/8OQrPRQpAqrkvE=
-
-Name: org/sat4j/minisat/constraints/cnf/LearntBinaryClause.class
-SHA1-Digest: fOj5m4RL4n8yAehoMvP7mjH4MT8=
-
-Name: org/sat4j/minisat/core/Pair.class
-SHA1-Digest: /cKJ3PtsZFC4Z67/6FtxUNRrf9o=
-
-Name: org/sat4j/messages.properties
-SHA1-Digest: DkI1sg89OFvS+e7y3E13YjlTmXU=
-
-Name: org/sat4j/AbstractLauncher$2.class
-SHA1-Digest: JoBloirMHJuH//oeRTSy9G/xEx8=
-
-Name: org/sat4j/core/ReadOnlyVecInt.class
-SHA1-Digest: QQ0uX6WOPRMVNIEUbmva30WDJoM=
-
-Name: org/sat4j/minisat/core/Solver$3.class
-SHA1-Digest: VWc5xP44eGb/TlRUgaBDM9nT8yw=
-
-Name: org/sat4j/minisat/core/TextOutputListener.class
-SHA1-Digest: HhC8++0LKTeL1k+kQQakApL0pyc=
-
-Name: org/sat4j/tools/SolverDecorator.class
-SHA1-Digest: AbhmETdvG0hY1r1YTLRUntiNHXI=
-
-Name: org/sat4j/minisat/learning/NoLearningButHeuristics.class
-SHA1-Digest: pEaHnh72l4L40dO8JaB79f3RamM=
-
-Name: org/sat4j/minisat/constraints/MixedDataStructureDanielCBWL.class
-SHA1-Digest: 1Fdj7E6eTLdKuKDh7IEJcwuyOnc=
-
-Name: org/sat4j/minisat/core/Solver$7.class
-SHA1-Digest: heg+MmlEUQrO6zCunVpLnP4YKs8=
-
-Name: org/sat4j/minisat/constraints/cnf/Clauses.class
-SHA1-Digest: gcyIv7HVuGxBn4vHWl45wJOGLB8=
-
-Name: org/sat4j/core/VecInt$1.class
-SHA1-Digest: DP0VW5OEA/I547Wc+E9zx2VLn4E=
-
-Name: org/sat4j/minisat/core/SolverStats.class
-SHA1-Digest: OkmZzA30hBsH5lRvtColP196PJo=
-
-Name: org/sat4j/core/LiteralsUtils.class
-SHA1-Digest: g6aSPmcnPkxfoAriirbez+Tl/ME=
-
-Name: org/sat4j/minisat/uip/FirstUIP.class
-SHA1-Digest: 8zGGvlsI/6Wrg5N/fcxQ2lIZVDg=
-
-Name: org/sat4j/minisat/core/ConstrActivityListener.class
-SHA1-Digest: qYaPPFPIRnTdoLPyhecMgHXoQt0=
-
-Name: org/sat4j/tools/xplain/Pair.class
-SHA1-Digest: A/bE0VETebdDrFVg8kkk6L6sBAA=
-
-Name: org/sat4j/tools/OptToSatAdapter.class
-SHA1-Digest: mZd2/iR8F0BhBUeMKgBlEhBcplQ=
-
-Name: org/sat4j/core/DefaultComparator.class
-SHA1-Digest: ByrKGBVmfYhbm42VFDnX5w6vsUI=
-
-Name: org/sat4j/tools/ExtendedDimacsArrayReader.class
-SHA1-Digest: p2RfkaKQZsTUyntGmfw0kChnWAI=
-
-Name: org/sat4j/core/ASolverFactory.class
-SHA1-Digest: wFc3Pa+2bZ0Kqunm3oss2hHs0FY=
-
-Name: org/sat4j/minisat/constraints/cnf/OriginalBinaryClause.class
-SHA1-Digest: WDoQcH8Ak1/mcDwczxIdRhptXe8=
-
-Name: org/sat4j/tools/xplain/XplainStrategy.class
-SHA1-Digest: JeUaH4EGFOuVbEzvxzspQRi6CCI=
-
-Name: org/sat4j/minisat/core/Solver$ISimplifier.class
-SHA1-Digest: WsNbL6LQODFQ9xIZVeYpUBDB+4Y=
-
-Name: org/sat4j/minisat/constraints/CardinalityDataStructure.class
-SHA1-Digest: 9ZTb295+AZKhIpO5Ck+6URjZSEk=
-
-Name: org/sat4j/minisat/orders/PhaseInLastLearnedClauseSelectionStrate
- gy.class
-SHA1-Digest: q9RLVWH8/7O928BiCVMhQEjCi2c=
-
-Name: org/sat4j/minisat/constraints/cnf/CBClause.class
-SHA1-Digest: 0Fg6Lt8eukel+ShvaDxSEbz6JqQ=
-
-Name: org/sat4j/minisat/SolverFactory.class
-SHA1-Digest: 5F7fXzH40ZyS9RhJsk7E1WXCMxA=
-
-Name: org/sat4j/minisat/orders/AbstractPhaserecordingSelectionStrategy
- .class
-SHA1-Digest: CHZYHsjrC/VHsnOYbs8DkpvNdUA=
-
-Name: org/sat4j/minisat/learning/NoLearningNoHeuristics.class
-SHA1-Digest: YSPGDmEgo9rB6PDum2sL6Gi1gFM=
-
-Name: org/sat4j/minisat/constraints/cnf/UnitClause.class
-SHA1-Digest: 5sj9vFz7Gm9/JCiSKRN6hXasuwo=
-
-Name: org/sat4j/minisat/constraints/cnf/LearntWLClause.class
-SHA1-Digest: UzAdKMpm9GzxXJabXfkEg1d7BZY=
-
-Name: org/sat4j/core/ReadOnlyVec.class
-SHA1-Digest: 3qgarJ3/1Z5jHB/YvhSrRdGeP/Y=
-
-Name: about.html
-SHA1-Digest: VQALUQ8mEUiqGR5WSJCocKmV5BQ=
-
-Name: org/sat4j/minisat/orders/RSATPhaseSelectionStrategy.class
-SHA1-Digest: UKmaEp90eyODlTVolKRtxLk6ZrM=
-
-Name: org/sat4j/minisat/learning/FixedLengthLearning.class
-SHA1-Digest: bOIRyrLxoNi4EaFE+9DnW48svwc=
-
-Name: org/sat4j/tools/xplain/QuickXplainStrategy.class
-SHA1-Digest: tDWM8pU3axlS8P6TD8E/WKIyWYk=
-
-Name: org/sat4j/minisat/core/Propagatable.class
-SHA1-Digest: 85pnnHa2lyWfV0kR1LBXlBjr9ic=
-
-Name: org/sat4j/minisat/core/UnitPropagationListener.class
-SHA1-Digest: L3VQjGp9P+YjtoHD25ofbMORbIE=
-
-Name: org/sat4j/reader/EfficientScanner.class
-SHA1-Digest: PjWd65/gDVANvrpg+kaYl+Z05K4=
-
-Name: org/sat4j/BasicLauncher.class
-SHA1-Digest: 0Iguj6ji5KIbqdU/uHKMg0oaHII=
-
-Name: org/sat4j/tools/Minimal4InclusionModel.class
-SHA1-Digest: 7UyduCnCdhpnCnuAqrkfZf+ypr0=
-
-Name: org/sat4j/reader/LecteurDimacs.class
-SHA1-Digest: tSDBtynGx+1aDCG8saDcIVQ78os=
-
-Name: org/sat4j/minisat/core/ILits.class
-SHA1-Digest: yOYad9UFyQ5cb5n0lxWuvb4VfQQ=
-
-Name: org/sat4j/minisat/constraints/ClausalDataStructureWL.class
-SHA1-Digest: CKF3IpClG2lOhiFhhy1b668GdSA=
-
-Name: org/sat4j/minisat/constraints/card/MinWatchCard.class
-SHA1-Digest: MWUqQvXj+GqZZ2jPXeDMMcGUtOw=
-
-Name: org/sat4j/minisat/core/ActivityListener.class
-SHA1-Digest: izh2dySki3x6TCRyNFJlus75Luk=
-
-Name: org/sat4j/minisat/core/Solver$4.class
-SHA1-Digest: T+PUEbx4sHsNuDSdnOa21b1BXHA=
-
-Name: org/sat4j/minisat/learning/PercentLengthLearning.class
-SHA1-Digest: KnWQ+ndy/7FP7xvq/LTLBoHhHls=
-
-Name: org/sat4j/minisat/learning/ActiveLearning.class
-SHA1-Digest: WDu6pKVpdrd/VsqVs7Ij4FQqPm8=
-
-Name: org/sat4j/minisat/core/AssertingClauseGenerator.class
-SHA1-Digest: nHhnBBENuim1PRqaFzmelwqXslw=
-
-Name: org/sat4j/core/VecInt$2.class
-SHA1-Digest: r1oC/uIoZg4R0XD2igDPwExTvRk=
-
-Name: org/sat4j/minisat/constraints/ClausalDataStructureCB.class
-SHA1-Digest: dehop29m0+FjMhoDdo397lcwhUY=
-
-Name: org/sat4j/tools/Minimal4CardinalityModel.class
-SHA1-Digest: kkFTNxMxX7vkf5LvOMEciOSVae8=
-
-Name: org/sat4j/minisat/core/Constr.class
-SHA1-Digest: JO8FENep/+dOa+elUjRi9yzO7Ag=
-
-Name: org/sat4j/specs/TimeoutException.class
-SHA1-Digest: sxFCWKMB6nI0II258ASRZos1TRM=
-
-Name: org/sat4j/specs/IConstr.class
-SHA1-Digest: +oZnXjKZG3s8/ExERcNzONlXczY=
-
-Name: org/sat4j/minisat/constraints/cnf/HTClause.class
-SHA1-Digest: Kt4BjtEUUldaXEMHo3gjd/yV024=
-
-Name: org/sat4j/minisat/constraints/cnf/Lits.class
-SHA1-Digest: ZO5g9OrNFrwWoXQ3THcxqSzdanU=
-
-Name: org/sat4j/specs/IProblem.class
-SHA1-Digest: TkiA7RBUQTdYfKqJKG4aqsyDLjs=
-
-Name: org/sat4j/minisat/constraints/card/AtLeast.class
-SHA1-Digest: y0HLqapvBduuC6+lnsl+X1if7AE=
-
-Name: org/sat4j/minisat/uip/DecisionUIP.class
-SHA1-Digest: 90HecSwUDwPyHFZLCeoHsuvDtUk=
-
-Name: org/sat4j/minisat/constraints/CardinalityDataStructureYanMax.cla
- ss
-SHA1-Digest: 4MJOls7+VbPCwm5Nue5ft6ZBVaA=
-
-Name: org/sat4j/minisat/core/Undoable.class
-SHA1-Digest: OTIRrmdpAx5FoBHFs51im78dctk=
-
-Name: org/sat4j/reader/Reader.class
-SHA1-Digest: qgHXePpE1XajNgm5uSpb9K9hVYI=
-
-Name: org/sat4j/specs/ContradictionException.class
-SHA1-Digest: 67tbBINzyosWbUT46F7G6+e+j+w=
-
-Name: org/sat4j/reader/AIGReader.class
-SHA1-Digest: 23awhyKwoOdqMPnw4w30Wa9W8YQ=
-
-Name: org/sat4j/minisat/constraints/cnf/UnitClauses.class
-SHA1-Digest: Roc74LSyyQhPavzUyJN4/K9ZVus=
-
-Name: org/sat4j/tools/xplain/ReplayXplainStrategy.class
-SHA1-Digest: VHBpdV4RE1qXZbjjkj4FMCTCyxo=
-
-Name: org/sat4j/minisat/core/VarActivityListener.class
-SHA1-Digest: cNa8R8bWHVJNrEGGRr1txEdBzl4=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
-
-Name: org/sat4j/minisat/constraints/cnf/BinaryClause.class
-SHA1-Digest: wc1eLetDDPsiZn/RMtlmSAPdreQ=
-
-Name: org/sat4j/reader/AAGReader.class
-SHA1-Digest: Ny22Nyxt3/llixDwrXo4F9I2obo=
-
-Name: org/sat4j/minisat/core/SearchParams.class
-SHA1-Digest: OPXyI/djZPWDD2TKgdt5KF7L7MY=
-
-Name: org/sat4j/core/Vec.class
-SHA1-Digest: hRPn3IAvjDiSRGnKmTfXc/tS5Js=
-
-Name: org/sat4j/ExitCode.class
-SHA1-Digest: sIpAgOxa6R47sUw+gsGDce84qKE=
-
-Name: org/sat4j/specs/IteratorInt.class
-SHA1-Digest: 58L02W+TVGn9FmJn3tNSxz+3BO4=
-
-Name: org/sat4j/core/VecInt.class
-SHA1-Digest: A5zYL4u3MT3Na8MMu+yFk/yUgkA=
-
-Name: org/sat4j/tools/RemiUtils.class
-SHA1-Digest: IFPtQlz9JeErZXUesaezOGF7220=
-
-Name: org/sat4j/minisat/restarts/NoRestarts.class
-SHA1-Digest: LxmiR+IeI7KYLPJUwep0ogzJcEs=
-
-Name: org/sat4j/minisat/core/Solver$1.class
-SHA1-Digest: V7JGcdzaeNXiOFzpRPsuYiOejqs=
-
-Name: org/sat4j/reader/ParseFormatException.class
-SHA1-Digest: hkqpnixAHGbu5MJ2QzKjwU+6HMw=
-
-Name: org/sat4j/minisat/core/IntQueue.class
-SHA1-Digest: hNHgRE8CS8PmcYgENdKR9lE1pAA=
-
-Name: org/sat4j/minisat/core/Solver$5.class
-SHA1-Digest: P1Rl8jx+upMxfH1S4Te//zY+O+Y=
-
-Name: org/sat4j/minisat/constraints/cnf/OriginalHTClause.class
-SHA1-Digest: TFJUbkiWiy1vA5Lu1oXFzxn1kFM=
-
-Name: org/sat4j/minisat/restarts/ArminRestarts.class
-SHA1-Digest: GpJHNb5OWOgEHH7kNEkoA5UU4s8=
-
-Name: org/sat4j/minisat/orders/ValuedLit.class
-SHA1-Digest: /3X33UfJEJZYBEwOPXmH7QWANyk=
-
-Name: org/sat4j/minisat/constraints/cnf/MixableCBClause.class
-SHA1-Digest: CWjjNeTWHOukcvQLLNkC6j8SIS8=
-
-Name: org/sat4j/reader/DimacsReader.class
-SHA1-Digest: XYVakVuVqYu9zPwotX5B8vR8hzk=
-
-Name: org/sat4j/minisat/learning/MiniSATLearning.class
-SHA1-Digest: jx3Nmzi3zbt+4f6ZQvvNz/BJrJ0=
-
-Name: org/sat4j/minisat/core/Heap.class
-SHA1-Digest: O9rEGAuO7livCB/xqSrRAXU+UrM=
-
-Name: org/sat4j/specs/IVec.class
-SHA1-Digest: EU8j4nKfgd0Wss4YqXGhK01LTlE=
-
-Name: org/sat4j/tools/DimacsArrayReader.class
-SHA1-Digest: 5cfgVZtz5HtoL5lCNWdKX1VaueI=
-
-Name: org/sat4j/minisat/core/ConflictTimer.class
-SHA1-Digest: SKaJ+IDvWxXTISboP/KavJAU8IU=
-
-Name: org/sat4j/minisat/core/LearningStrategy.class
-SHA1-Digest: fElmg3kag2dQKlUS6Tqv6ERIvhI=
-
-Name: plugin.properties
-SHA1-Digest: t0bd67OgJQf7Vs75aUOH2ysVGf4=
-
-Name: org/sat4j/tools/ModelIterator.class
-SHA1-Digest: XaQqPHi/Eb5VmUL3c5wJ8tRxjZo=
-
-Name: org/sat4j/reader/InstanceReader.class
-SHA1-Digest: rAuoW01As4ksonkYhXaqCXBvy3I=
-
-Name: org/sat4j/opt/MinOneDecorator.class
-SHA1-Digest: QeXv+fKCjVonHdtlJee84NnWyq0=
-
-Name: org/sat4j/tools/DimacsOutputSolver.class
-SHA1-Digest: 0MtoAJd5JqCiiS2Yv3EO5Se11PM=
-
-Name: org/sat4j/specs/IVecInt.class
-SHA1-Digest: nIT+nQ6idNVMsSIUPBqaSxANaGM=
-
-Name: org/sat4j/minisat/constraints/cnf/WLClause.class
-SHA1-Digest: S1X5wvVn0x1EJnL+agwpv0TPwec=
-
-Name: org/sat4j/minisat/constraints/MixedDataStructureDanielHT.class
-SHA1-Digest: Ibf2gWAf469AVT+3SN0FU1BIafw=
-
-Name: org/sat4j/tools/SolutionCounter.class
-SHA1-Digest: Wyv0LgjUze3c5F7LMEMTRszS/LU=
-
-Name: org/sat4j/specs/SearchListener.class
-SHA1-Digest: 6oayn8Nynr3ZzGXp6EgARdXM6rQ=
-
-Name: org/sat4j/LightFactory.class
-SHA1-Digest: ZunjrKZ5cHKiwXxjk7ahM8+BavQ=
-
-Name: org/sat4j/minisat/core/DotSearchListener.class
-SHA1-Digest: FT1x/eXliZqZVD2tuvJbcIilYC4=
-
-Name: org/sat4j/minisat/core/Solver$LearnedConstraintsDeletionStrategy
- .class
-SHA1-Digest: jm16KB7HmT7cOU2tBjUmysF6sgE=
-
-Name: org/sat4j/minisat/learning/AbstractLearning.class
-SHA1-Digest: 6PvXqP0K9SqwbXYgyOoQniTaKtQ=
-
-Name: org/sat4j/minisat/orders/PositiveLiteralSelectionStrategy.class
-SHA1-Digest: eM5p+GMOZAh6uvkCi3M73e2t0FI=
-
-Name: org/sat4j/minisat/core/ActivityComparator.class
-SHA1-Digest: Atth5u1Lq9Ls5xSba13R2lbu9Y4=
-
-Name: org/sat4j/minisat/constraints/MixedDataStructureDanielWL.class
-SHA1-Digest: zCtUaC2EbAcMF/sFSf83IWR1BNI=
-
-Name: org/sat4j/minisat/core/IPhaseSelectionStrategy.class
-SHA1-Digest: MWAl0WsOu5v0XN4DK0QVH1A3cgw=
-
-Name: org/sat4j/tools/DimacsStringSolver.class
-SHA1-Digest: 4DBv8gqpmoZwzOLF8YxMdnGkCoc=
-
-Name: org/sat4j/opt/MaxSatDecorator.class
-SHA1-Digest: 9ujaphP8oJjQTORphF+FcGRBJIA=
-
-Name: org/sat4j/opt/AbstractSelectorVariablesDecorator.class
-SHA1-Digest: dR44QhhnEe8lutTH83XLfqO7bSY=
-
-Name: org/sat4j/specs/Lbool.class
-SHA1-Digest: g+x6qic4xPd4d5CTuY1gfXJefNQ=
-
-Name: org/sat4j/minisat/orders/PureOrder.class
-SHA1-Digest: SzwgnD84QZnFH+zuQAapgwkipTQ=
-
-Name: org/sat4j/minisat/core/Counter.class
-SHA1-Digest: 7JfLpyr+6gvzYP/1puak7zdtBio=
-
-Name: org/sat4j/minisat/learning/ClauseOnlyLearning.class
-SHA1-Digest: PyWPpAeZiOKuOfHdlqMW3Pc+LFU=
-
-Name: org/sat4j/AbstractOptimizationLauncher.class
-SHA1-Digest: 1/W+gQl6XlhdxlxfdlHvDOiHlwo=
-
-Name: org/sat4j/AbstractLauncher$1.class
-SHA1-Digest: uxLOnn2vJkVSAeg4sMTwLEDAC8I=
-
-Name: org/sat4j/core/Vec$1.class
-SHA1-Digest: OpDP1Bz9Dl/4qawOu/swOeyYZNc=
-
-Name: org/sat4j/MoreThanSAT.class
-SHA1-Digest: L26im+uwmoF+OyOmzBGu5Na2sto=
-
-Name: org/sat4j/minisat/core/DataStructureFactory.class
-SHA1-Digest: NZQi8uIEow5odB0Va/l+GoaeOXI=
-
-Name: org/sat4j/minisat/core/Solver$2.class
-SHA1-Digest: wZfMJor7apl/qOEaM49BeNeGwAs=
-
-Name: org/sat4j/minisat/core/NullSearchListener.class
-SHA1-Digest: luAjAq557jZ0f/xupFJnDOs3KpI=
-
diff --git a/dependencyManifests/org.sat4j.core_2.2.0.v20100429.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.sat4j.core_2.2.0.v20100429.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3b90cfa
--- /dev/null
+++ b/dependencyManifests/org.sat4j.core_2.2.0.v20100429.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,544 @@
+Manifest-Version: 1.0
+Implementation-Vendor: CRIL CNRS UMR 8188 - Universite d'Artois
+Bundle-Localization: plugin
+Main-Class: org.sat4j.BasicLauncher
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Built-By: Daniel Le Berre
+Bundle-SymbolicName: org.sat4j.core
+Bundle-Version: 2.2.0.v20100429
+Export-Package: org.sat4j;version="2.2.0.v20100429",org.sat4j.core;ver
+ sion="2.2.0.v20100429",org.sat4j.minisat;version="2.2.0.v20100429",or
+ g.sat4j.minisat.constraints;version="2.2.0.v20100429",org.sat4j.minis
+ at.constraints.card;version="2.2.0.v20100429",org.sat4j.minisat.const
+ raints.cnf;version="2.2.0.v20100429",org.sat4j.minisat.core;version="
+ 2.2.0.v20100429",org.sat4j.minisat.learning;version="2.2.0.v20100429"
+ ,org.sat4j.minisat.orders;version="2.2.0.v20100429",org.sat4j.minisat
+ .restarts;version="2.2.0.v20100429",org.sat4j.minisat.uip;version="2.
+ 2.0.v20100429",org.sat4j.opt;version="2.2.0.v20100429",org.sat4j.read
+ er;version="2.2.0.v20100429",org.sat4j.specs;version="2.2.0.v20100429
+ ",org.sat4j.tools;version="2.2.0.v20100429",org.sat4j.tools.xplain;ve
+ rsion="2.2.0.v20100429"
+Specification-Version: NA
+Specification-Title: SAT4J
+Specification-Vendor: Daniel Le Berre
+Ant-Version: Apache Ant 1.7.1
+Bundle-Vendor: %providerName
+Bundle-Name: %bundleName
+Created-By: 14.0-b16 (Sun Microsystems Inc.)
+Implementation-Version: 2.2.0.v20100429 
+Implementation-Title: SAT4J
+Bundle-ManifestVersion: 2
+
+Name: overview.html
+SHA1-Digest: dn/2qZIKrR/o7110Zst9XnBMJQs=
+
+Name: org/sat4j/tools/GateTranslator.class
+SHA1-Digest: Yh6sCzxURtlx8qrFaI+xhO7taJM=
+
+Name: org/sat4j/minisat/core/IOrder.class
+SHA1-Digest: X18Zt59LqRUfn0D/p7+Yulvx6A4=
+
+Name: org/sat4j/minisat/core/Solver$6.class
+SHA1-Digest: A9NaKDVPCX8avbQtiIcVsSUi0AQ=
+
+Name: org/sat4j/tools/SingleSolutionDetector.class
+SHA1-Digest: xRDSLeA8py9/4oqlAOAZCB5FuBo=
+
+Name: org/sat4j/minisat/constraints/AbstractDataStructureFactory.class
+SHA1-Digest: QC7DJMLxn40aJ6PtPaZzka0do/4=
+
+Name: sat4j.version
+SHA1-Digest: NZ/fetT1tL14CPqc4oXVd0YSLH4=
+
+Name: org/sat4j/minisat/core/VoidTracing.class
+SHA1-Digest: qab4ylcy9igxerjR3oNVShe7oUg=
+
+Name: org/sat4j/tools/xplain/Xplain.class
+SHA1-Digest: 1jX6dpnW8uoWTkXC5s16bjMuF0I=
+
+Name: org/sat4j/minisat/constraints/CardinalityDataStructureYanMin.cla
+ ss
+SHA1-Digest: XvPtjZJs9rA05nolsi/QNsXXlvU=
+
+Name: org/sat4j/minisat/orders/VarOrderHeap.class
+SHA1-Digest: IfBRX8A9zzfGV1SbWEpHN2hyqmA=
+
+Name: org/sat4j/minisat/constraints/cnf/OriginalWLClause.class
+SHA1-Digest: e5hXI5VqiNVDnFSAf3+N9cWe+2c=
+
+Name: org/sat4j/minisat/core/ConflictTimerContainer.class
+SHA1-Digest: WZnSTl/i/51xiYxIutjbXSBBrzM=
+
+Name: org/sat4j/minisat/core/Solver$4$1.class
+SHA1-Digest: NkmAx0lapXofeVNwuxwX8QdoNsU=
+
+Name: org/sat4j/minisat/core/Solver$5$1.class
+SHA1-Digest: 8wcs6u5RIDbL8/R64JGfFlClLWk=
+
+Name: org/sat4j/minisat/learning/LimitedLearning.class
+SHA1-Digest: ErjN2ShX727XdTOXJhv363hP9bI=
+
+Name: org/sat4j/minisat/restarts/MiniSATRestarts.class
+SHA1-Digest: k/KhiR/OfC034e0ZPySapkgveAE=
+
+Name: org/sat4j/Messages.class
+SHA1-Digest: N9cs+sh8DpqhA5oV0QFAVAIY91w=
+
+Name: org/sat4j/tools/DecisionLevelTracing.class
+SHA1-Digest: bqc7u8t12qSXuXrIo9Vr5G8s56I=
+
+Name: org/sat4j/minisat/core/ConflictTimerAdapter.class
+SHA1-Digest: EOpIpvS+DhOiAnF4CKrEjlJIDpo=
+
+Name: org/sat4j/minisat/core/RestartStrategy.class
+SHA1-Digest: SV48tRost4rdjsXHcfllFOHsNXE=
+
+Name: org/sat4j/minisat/restarts/LubyRestarts.class
+SHA1-Digest: EEerNSUBAlbld5M7LP7mN2zs9Ts=
+
+Name: org/sat4j/minisat/orders/NegativeLiteralSelectionStrategy.class
+SHA1-Digest: gB+OVkgcdZHx1JonmB7tnCO7Oyc=
+
+Name: org/sat4j/minisat/constraints/ClausalDataStructureCBWL.class
+SHA1-Digest: rP/p+6+pYZiKHSfrrQIRemLWE0w=
+
+Name: org/sat4j/minisat/constraints/AbstractCardinalityDataStructure.c
+ lass
+SHA1-Digest: GSCvrYhJoXJ3OrNG6+VkuyfThuY=
+
+Name: org/sat4j/minisat/constraints/cnf/LearntHTClause.class
+SHA1-Digest: MFUNHhZuO01qFAkEy0swU0CfF3w=
+
+Name: org/sat4j/minisat/orders/PhaseCachingAutoEraseStrategy.class
+SHA1-Digest: vaZ7i3+fm0kWgbsdpPmyV9++was=
+
+Name: org/sat4j/tools/ConstrGroup.class
+SHA1-Digest: 8dJf1rUYdJ5D/5q7CzmA3Mzc/jw=
+
+Name: org/sat4j/specs/IOptimizationProblem.class
+SHA1-Digest: BzbKf8Uu0CXX6Z7/80WgezxoyJ0=
+
+Name: org/sat4j/minisat/orders/RandomLiteralSelectionStrategy.class
+SHA1-Digest: tropHGTOmwv8DbIEqkHbW8cVJ28=
+
+Name: org/sat4j/minisat/core/Learner.class
+SHA1-Digest: zZl+IKIJohUSLCPKiPsh54DbG74=
+
+Name: org/sat4j/AbstractLauncher.class
+SHA1-Digest: BTH8yMwC7xiwd2oHaXS2kaEy3CM=
+
+Name: org/sat4j/minisat/orders/UserFixedPhaseSelectionStrategy.class
+SHA1-Digest: IKCHFMe/zjI/CRjw2fDR7EzNwnQ=
+
+Name: org/sat4j/minisat/constraints/card/MaxWatchCard.class
+SHA1-Digest: owfh9LqCYYiwpXaQFVQYe3jM+5k=
+
+Name: org/sat4j/minisat/core/Solver.class
+SHA1-Digest: tWS14McPuDt+bdAm8dWQcbpZzhM=
+
+Name: org/sat4j/specs/ISolver.class
+SHA1-Digest: 7JoFkvIfa9MiC/Uv2a8Conam6DU=
+
+Name: org/sat4j/minisat/constraints/cnf/LearntBinaryClause.class
+SHA1-Digest: BEa+zhrRDpf0D2PK3lHs+m1I0CM=
+
+Name: org/sat4j/minisat/core/Pair.class
+SHA1-Digest: 2CR/EMVg/UZQzmTptUlYTxZTiJw=
+
+Name: org/sat4j/messages.properties
+SHA1-Digest: DkI1sg89OFvS+e7y3E13YjlTmXU=
+
+Name: org/sat4j/AbstractLauncher$2.class
+SHA1-Digest: bcjQuEMkF58of3TUdhfOwxn8i/A=
+
+Name: org/sat4j/core/ReadOnlyVecInt.class
+SHA1-Digest: +v4PIGKi0soP5B90qdmwq8T57hA=
+
+Name: org/sat4j/minisat/core/Solver$3.class
+SHA1-Digest: Kn8DQvvP9QTKo92sfjycbOI2cPM=
+
+Name: org/sat4j/tools/SolverDecorator.class
+SHA1-Digest: VKG/qEQRDQF05dukzLzJJbQpaJI=
+
+Name: org/sat4j/minisat/learning/NoLearningButHeuristics.class
+SHA1-Digest: AQZggH2/k1qVmdC5jvHIAsCJk2I=
+
+Name: org/sat4j/minisat/constraints/MixedDataStructureDanielCBWL.class
+SHA1-Digest: SkYz32iGpeD0D1DoqaHSN8dIE6g=
+
+Name: org/sat4j/minisat/core/Solver$7.class
+SHA1-Digest: Qz0RkGh3arqLFVZjAsEZ7S0FALs=
+
+Name: org/sat4j/minisat/constraints/cnf/Clauses.class
+SHA1-Digest: PGKpp8V5ZSPDszbstf1rYyuIlaw=
+
+Name: org/sat4j/core/VecInt$1.class
+SHA1-Digest: MOlk3IOOGQOh+ItwyuWZfbLV5vE=
+
+Name: org/sat4j/minisat/core/SolverStats.class
+SHA1-Digest: aG5C74srGKadm2/55hkoqZmlfco=
+
+Name: org/sat4j/core/LiteralsUtils.class
+SHA1-Digest: X7TVqVeRHM0IPsg3VV6Llla0xl4=
+
+Name: org/sat4j/minisat/uip/FirstUIP.class
+SHA1-Digest: DT6VUSPEPccVmQsslUxhocuq03g=
+
+Name: org/sat4j/minisat/core/ConstrActivityListener.class
+SHA1-Digest: MZT8g6wjSOyxwYxQPbIFqUOzrDw=
+
+Name: org/sat4j/tools/xplain/Pair.class
+SHA1-Digest: P1Tkq8qH5itdUzZdfBCbm0/KyUE=
+
+Name: org/sat4j/tools/OptToSatAdapter.class
+SHA1-Digest: 9094OVY04hay9fCU8Zkj+xLajWY=
+
+Name: org/sat4j/core/DefaultComparator.class
+SHA1-Digest: Oc+iZAlu+B3SwdOkkvXhrC66xMA=
+
+Name: org/sat4j/tools/ExtendedDimacsArrayReader.class
+SHA1-Digest: iUP8Szu2/7qXIpD5LCC0yclTsnE=
+
+Name: org/sat4j/core/ASolverFactory.class
+SHA1-Digest: r8lJPwCRTvP8SJrsNz3GbM/D1Iw=
+
+Name: org/sat4j/minisat/constraints/cnf/OriginalBinaryClause.class
+SHA1-Digest: HwwUr0wePfbLsvgrQU6bC698E9c=
+
+Name: org/sat4j/tools/xplain/XplainStrategy.class
+SHA1-Digest: KcQau9GPcW2R6Fjyqp5jaeWTdWk=
+
+Name: org/sat4j/minisat/core/Solver$ISimplifier.class
+SHA1-Digest: 4tVyB/nROzHJWlVqmRwOtuVc5ws=
+
+Name: org/sat4j/minisat/constraints/CardinalityDataStructure.class
+SHA1-Digest: wTFZUhwJuPgfIpOUZqzt4BtHZtI=
+
+Name: target/META-INF/MANIFEST.MF
+SHA1-Digest: HUftYWvUbxYRZEc5UfTrflINdHA=
+
+Name: org/sat4j/minisat/orders/PhaseInLastLearnedClauseSelectionStrate
+ gy.class
+SHA1-Digest: K97bk3JNYx0tk7Bi157aRr69gn0=
+
+Name: org/sat4j/minisat/constraints/cnf/CBClause.class
+SHA1-Digest: aL8ef8Q6JhWndr8w29VH4i/RTaI=
+
+Name: org/sat4j/minisat/SolverFactory.class
+SHA1-Digest: Z+80DpzGQVxhYxrSHdy/834VjY0=
+
+Name: org/sat4j/minisat/orders/AbstractPhaserecordingSelectionStrategy
+ .class
+SHA1-Digest: Ku63mzSsCDrWuploozqcRdmkuko=
+
+Name: org/sat4j/minisat/learning/NoLearningNoHeuristics.class
+SHA1-Digest: ee/1IsqLwl8UIMDFY3B5ByoXC5M=
+
+Name: org/sat4j/minisat/constraints/cnf/UnitClause.class
+SHA1-Digest: QYp29Pf3B+TII1c5QtZ5nUGtxh4=
+
+Name: org/sat4j/minisat/constraints/cnf/LearntWLClause.class
+SHA1-Digest: iXDeBwTa2tEbw4qyfYAuajPahvg=
+
+Name: org/sat4j/core/ReadOnlyVec.class
+SHA1-Digest: 6rMIHJ0cX0CVpomOamEselGaXTQ=
+
+Name: about.html
+SHA1-Digest: ohuwRciYYMwr4+zXRG6vJTiqjlg=
+
+Name: org/sat4j/tools/DotSearchTracing.class
+SHA1-Digest: wzcwTGIxcUVRgOo9wBN2d7TSVQ0=
+
+Name: org/sat4j/minisat/orders/RandomWalkDecorator.class
+SHA1-Digest: bp+eWwcuxZZhZfm6yhziLeyFqTw=
+
+Name: org/sat4j/minisat/orders/RSATPhaseSelectionStrategy.class
+SHA1-Digest: Z9qkW17407uDjMbfkzO9y8QMZiY=
+
+Name: org/sat4j/minisat/learning/FixedLengthLearning.class
+SHA1-Digest: jvMhRyshWO+UGPAB6YkECmjSTdY=
+
+Name: org/sat4j/tools/xplain/QuickXplainStrategy.class
+SHA1-Digest: SjaqwyoYqMxlQmO/nabGhNYSTng=
+
+Name: org/sat4j/minisat/core/Propagatable.class
+SHA1-Digest: O0oTleJry9VDLuyD5aAfUnszVP0=
+
+Name: org/sat4j/minisat/core/UnitPropagationListener.class
+SHA1-Digest: p1znVXCjplcP6DuzMM12Mvlha4Q=
+
+Name: org/sat4j/reader/EfficientScanner.class
+SHA1-Digest: wHkLMQUCF1oW7I4gqgQzcizjpyQ=
+
+Name: org/sat4j/BasicLauncher.class
+SHA1-Digest: p7Jqj9M9ZpUavYfBUPG4VToj5Ks=
+
+Name: org/sat4j/tools/Minimal4InclusionModel.class
+SHA1-Digest: BCd89TeXxrwPQFfIhb759bR8rtU=
+
+Name: org/sat4j/reader/LecteurDimacs.class
+SHA1-Digest: 4Lc66LfuY3q/XiwdUTCGytBQOLk=
+
+Name: org/sat4j/minisat/core/ILits.class
+SHA1-Digest: VjUNRaTLDHQugxPBDHitvhH+wG8=
+
+Name: org/sat4j/minisat/constraints/ClausalDataStructureWL.class
+SHA1-Digest: ffoF+WFZBin6+8QH/GgAykHIS0w=
+
+Name: org/sat4j/minisat/constraints/card/MinWatchCard.class
+SHA1-Digest: q7dA0RILYtAqoS5G8VDWwJ8B+zc=
+
+Name: org/sat4j/minisat/core/ActivityListener.class
+SHA1-Digest: ZroatMN6iWIhRyiEJ/ZmdFq9JAc=
+
+Name: org/sat4j/minisat/core/Solver$4.class
+SHA1-Digest: 17HruTEcxPRso7T0xjA3SdDZcrM=
+
+Name: org/sat4j/minisat/learning/PercentLengthLearning.class
+SHA1-Digest: stM1IxYEvXcwY67YJKkLdu5FdXU=
+
+Name: org/sat4j/minisat/learning/ActiveLearning.class
+SHA1-Digest: /UKTVjAZgSr0gd3NW5liJQhzVXY=
+
+Name: org/sat4j/minisat/core/AssertingClauseGenerator.class
+SHA1-Digest: n1TtEGxXGTmCNtlOmrDJywmVZX4=
+
+Name: org/sat4j/core/VecInt$2.class
+SHA1-Digest: nqKZ6/mfZoAu5eUzuCoFfcN8X0Y=
+
+Name: org/sat4j/minisat/constraints/ClausalDataStructureCB.class
+SHA1-Digest: DQ+WOVB9VKsC6plLm6AHIjvLTuc=
+
+Name: org/sat4j/tools/Minimal4CardinalityModel.class
+SHA1-Digest: vA1Z9OaXi5zi6CXITzmuee9OSn4=
+
+Name: org/sat4j/minisat/core/Constr.class
+SHA1-Digest: gI2BzvdyzWDWZbIJXhhybvGyzmk=
+
+Name: org/sat4j/tools/ConflictLevelTracing.class
+SHA1-Digest: AsJ3xdPG/+T5p+PPRDrmIDnYtNs=
+
+Name: org/sat4j/specs/TimeoutException.class
+SHA1-Digest: l3TRwZEfDOxtce6QQ6UxlC23zXQ=
+
+Name: org/sat4j/specs/IConstr.class
+SHA1-Digest: fcsTeyTUhjLxclDuPNheWb60Nik=
+
+Name: org/sat4j/minisat/constraints/cnf/HTClause.class
+SHA1-Digest: BITYwr9toXIK4fOH5GkdD+LoN8Y=
+
+Name: org/sat4j/minisat/constraints/cnf/Lits.class
+SHA1-Digest: rlweU4B5vm9zh2s859Qo2Npuxjw=
+
+Name: org/sat4j/core/VecInt$1$1.class
+SHA1-Digest: 52axwE4a/5xaCBBiBW7sPOAHd3o=
+
+Name: org/sat4j/specs/IProblem.class
+SHA1-Digest: jEM7LkKzd591iLMZyg4EggQngu4=
+
+Name: org/sat4j/minisat/constraints/card/AtLeast.class
+SHA1-Digest: 5t2/PBFWiSW2fePcSdxhjAA7Kk4=
+
+Name: org/sat4j/minisat/uip/DecisionUIP.class
+SHA1-Digest: 08gofaQpbrVsVfAJ54ZRJn5VXig=
+
+Name: org/sat4j/minisat/constraints/CardinalityDataStructureYanMax.cla
+ ss
+SHA1-Digest: y4OYLw+8K76jFI9FBrscL4nfFr8=
+
+Name: org/sat4j/minisat/core/Undoable.class
+SHA1-Digest: JlBAZdp2+IV3L38pKFCjKE0XbVA=
+
+Name: org/sat4j/reader/Reader.class
+SHA1-Digest: G1FxrKF1uWVL2FRlKyCB+OtfjbU=
+
+Name: org/sat4j/specs/ContradictionException.class
+SHA1-Digest: r1UYadzl/slay7uG5fgp2wNba3c=
+
+Name: org/sat4j/tools/DecisionTracing.class
+SHA1-Digest: Bot9owQNrQt/OYGdWJM0wXEmFBE=
+
+Name: org/sat4j/reader/AIGReader.class
+SHA1-Digest: UE5/U2zDJmqF+WoaYvaLlEogfyg=
+
+Name: org/sat4j/minisat/constraints/cnf/UnitClauses.class
+SHA1-Digest: P+j5C5cmNPQXQodvVnPXOhFC30U=
+
+Name: org/sat4j/tools/xplain/ReplayXplainStrategy.class
+SHA1-Digest: sL+4Coo1SK3Mglx2xB1V7jrktu4=
+
+Name: org/sat4j/minisat/core/VarActivityListener.class
+SHA1-Digest: n4xDxXyrKcY2NTF3EG5Td2eGKuk=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
+
+Name: org/sat4j/minisat/constraints/cnf/BinaryClause.class
+SHA1-Digest: XsywFiKmf/+/N5R1FaKtqRgUf/w=
+
+Name: org/sat4j/reader/AAGReader.class
+SHA1-Digest: trW8fG34QnCclxbTvL7j9N5b1+8=
+
+Name: org/sat4j/minisat/core/SearchParams.class
+SHA1-Digest: Obh/FcMTRJ1sNs9nmKxnMIA/CKI=
+
+Name: org/sat4j/tools/LearnedClauseSizeTracing.class
+SHA1-Digest: 7eIqj9Lxk9dkEt4wEy+7T22kg2I=
+
+Name: org/sat4j/tools/TextOutputTracing.class
+SHA1-Digest: UCrX0HDxtr/vopL3ZgEFXveuKds=
+
+Name: org/sat4j/core/Vec.class
+SHA1-Digest: lE23BQ58AXB3uzpLEGx1XjF6o3o=
+
+Name: org/sat4j/ExitCode.class
+SHA1-Digest: V5DfojXDofFKw5jKg2UlW44ID1k=
+
+Name: org/sat4j/specs/IteratorInt.class
+SHA1-Digest: 1Qw+nLBznA9xfE1k0NrCk1ZL12U=
+
+Name: org/sat4j/core/VecInt.class
+SHA1-Digest: 20p4G5/a9+z16EKfMnEpBfdBU04=
+
+Name: org/sat4j/tools/RemiUtils.class
+SHA1-Digest: FOYt8rXW11SzMi1XWT+zrLooXmo=
+
+Name: org/sat4j/minisat/restarts/NoRestarts.class
+SHA1-Digest: ZJt2YbQAK0pH0rahOGmBGxcD0iY=
+
+Name: org/sat4j/minisat/core/Solver$1.class
+SHA1-Digest: Har1eRgn67d9nkWdXEB76785ABY=
+
+Name: org/sat4j/reader/ParseFormatException.class
+SHA1-Digest: r+ff4ZThrCgnOr3nHx/9TwYYQPo=
+
+Name: org/sat4j/minisat/core/IntQueue.class
+SHA1-Digest: rA0Ji2sWaNzFPNWmQIoiWB8vaDw=
+
+Name: org/sat4j/minisat/core/Solver$5.class
+SHA1-Digest: 4S9CfrpO0dreVFpmCVv5Ge7YRZg=
+
+Name: org/sat4j/minisat/constraints/cnf/OriginalHTClause.class
+SHA1-Digest: yyLzkGGZmajG9BlwV+uplq4AxP0=
+
+Name: org/sat4j/minisat/restarts/ArminRestarts.class
+SHA1-Digest: P0Cnayj1WSNFLwVQfahcFcQ3/G8=
+
+Name: org/sat4j/minisat/orders/ValuedLit.class
+SHA1-Digest: nJs3StPJtLykgfQ1RAM9auCOTWY=
+
+Name: org/sat4j/minisat/constraints/cnf/MixableCBClause.class
+SHA1-Digest: Y3rGogVleu8GyMCiVL/Kpg/0owY=
+
+Name: org/sat4j/reader/DimacsReader.class
+SHA1-Digest: QTAdRnvX9GYGQGpgXTS4JLgSdvA=
+
+Name: org/sat4j/minisat/learning/MiniSATLearning.class
+SHA1-Digest: zKTO0CcnZQGRkMveUBuAXZJauW8=
+
+Name: org/sat4j/minisat/core/Heap.class
+SHA1-Digest: NfjIWQkaul6hYWtfsCftt1B+zuc=
+
+Name: org/sat4j/specs/IVec.class
+SHA1-Digest: ViymudVBXcOLO3BSJL2o1ejW3xg=
+
+Name: org/sat4j/tools/DimacsArrayReader.class
+SHA1-Digest: MQJ5QjAj+eb9gkW+Dq1ltLpYlc8=
+
+Name: org/sat4j/minisat/core/ConflictTimer.class
+SHA1-Digest: wBGYIZwmGm5yU49qu7QyJ2qXuG8=
+
+Name: org/sat4j/minisat/core/LearningStrategy.class
+SHA1-Digest: KOVMl4sz6I11jK2OXRUF46XxKoo=
+
+Name: plugin.properties
+SHA1-Digest: t0bd67OgJQf7Vs75aUOH2ysVGf4=
+
+Name: org/sat4j/tools/ModelIterator.class
+SHA1-Digest: gbZ+AxzpF5uOc4dUthOALy9rPmY=
+
+Name: org/sat4j/reader/InstanceReader.class
+SHA1-Digest: 8sjRko3rsU7XeZsQxycrAOcYjf0=
+
+Name: org/sat4j/opt/MinOneDecorator.class
+SHA1-Digest: FZpFT9loWBkBR+eVjVbc5MUYXYM=
+
+Name: org/sat4j/tools/DimacsOutputSolver.class
+SHA1-Digest: 1bM6Jq6L+XRXGuaYgTd9PBt5pNg=
+
+Name: org/sat4j/specs/IVecInt.class
+SHA1-Digest: s8rPWLP40S8PSFlm1S+fXu2i908=
+
+Name: org/sat4j/minisat/constraints/cnf/WLClause.class
+SHA1-Digest: /azcSLRSN7iKmvwoOk1a21MyEkE=
+
+Name: org/sat4j/minisat/constraints/MixedDataStructureDanielHT.class
+SHA1-Digest: X3AOESzN+Ai0088Po83JgsYf3IA=
+
+Name: org/sat4j/tools/SolutionCounter.class
+SHA1-Digest: c6y7VipHT+iHQkJnjRZOzJOxVCM=
+
+Name: org/sat4j/specs/SearchListener.class
+SHA1-Digest: dE+pqRw9CHWEYw9HPGm/PL1MS3w=
+
+Name: org/sat4j/LightFactory.class
+SHA1-Digest: y3vlDHbXmiThTEdaCClNtKhbBUk=
+
+Name: org/sat4j/minisat/core/Solver$LearnedConstraintsDeletionStrategy
+ .class
+SHA1-Digest: RmLTVjBWD8y95SwnJ6/erR6iNDg=
+
+Name: org/sat4j/minisat/learning/AbstractLearning.class
+SHA1-Digest: S13vJv++vfR80BGDLi8imFCndiQ=
+
+Name: org/sat4j/minisat/orders/PositiveLiteralSelectionStrategy.class
+SHA1-Digest: 20jMN1A+acBGM1F51N+IlCRCuCY=
+
+Name: org/sat4j/minisat/core/ActivityComparator.class
+SHA1-Digest: YOQ17ebH2Qn6Fm2wT8e0RC/QOOQ=
+
+Name: org/sat4j/minisat/constraints/MixedDataStructureDanielWL.class
+SHA1-Digest: FaMTZx802nGMGk5F4CPwkpQizk4=
+
+Name: org/sat4j/minisat/core/IPhaseSelectionStrategy.class
+SHA1-Digest: rDjzB1H+97Ak1X7IvTAhhrJzu9Y=
+
+Name: org/sat4j/tools/DimacsStringSolver.class
+SHA1-Digest: 4aybBXJd0kpsio0qkMaDzv+4mtU=
+
+Name: org/sat4j/opt/MaxSatDecorator.class
+SHA1-Digest: sL9aW1K32uO0EzwpF4n0MNsDPgU=
+
+Name: org/sat4j/opt/AbstractSelectorVariablesDecorator.class
+SHA1-Digest: sXVhRd7oT84ewBW0tV3P8sz1OSE=
+
+Name: org/sat4j/specs/Lbool.class
+SHA1-Digest: NvK9fv0aVpTWlIHuMRBxgMDHGPM=
+
+Name: org/sat4j/minisat/orders/PureOrder.class
+SHA1-Digest: XXadIuZAlvYKyov44IWn12jTyEE=
+
+Name: org/sat4j/minisat/core/Counter.class
+SHA1-Digest: w5M/JC6k2IzZvkXiDMJmy9yHT3Q=
+
+Name: org/sat4j/minisat/learning/ClauseOnlyLearning.class
+SHA1-Digest: OhALcZTHlmXDBrgx5FPPIIiCY9k=
+
+Name: org/sat4j/AbstractOptimizationLauncher.class
+SHA1-Digest: yJSczPYnz6oI60x2qyvUeOLGnao=
+
+Name: org/sat4j/AbstractLauncher$1.class
+SHA1-Digest: Fex2k4SAbvtlf17yuFWNOHW6DiM=
+
+Name: org/sat4j/core/Vec$1.class
+SHA1-Digest: ws7WosmOOr7ItmXAq4dmuFDStbs=
+
+Name: org/sat4j/MoreThanSAT.class
+SHA1-Digest: zcZWXGo/kZbMlsfsgm/hqMvKaKI=
+
+Name: org/sat4j/minisat/core/DataStructureFactory.class
+SHA1-Digest: 5dnenVHIhwUvoRdLPk2jm+ZDZIc=
+
+Name: org/sat4j/minisat/core/Solver$2.class
+SHA1-Digest: tSYoi7MLi0qIXv6NdEQNPTALFVE=
+
diff --git a/dependencyManifests/org.sat4j.pb_2.1.1.v20090825.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.sat4j.pb_2.1.1.v20090825.jar/META-INF/MANIFEST.MF
deleted file mode 100644
index d5f4568..0000000
--- a/dependencyManifests/org.sat4j.pb_2.1.1.v20090825.jar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,289 +0,0 @@
-Manifest-Version: 1.0
-Implementation-Vendor: CRIL CNRS UMR 8188 - Universite d'Artois
-Main-Class: org.sat4j.pb.LanceurPseudo2007
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Built-By: Daniel Le Berre
-Bundle-SymbolicName: org.sat4j.pb
-Require-Bundle: org.sat4j.core
-Bundle-Version: 2.1.1.v20090825
-Export-Package: org.sat4j.pb;version="2.1.1.v20090825",org.sat4j.pb.co
- nstraints;version="2.1.1.v20090825",org.sat4j.pb.constraints.pb;versi
- on="2.1.1.v20090825",org.sat4j.pb.core;version="2.1.1.v20090825",org.
- sat4j.pb.orders;version="2.1.1.v20090825",org.sat4j.pb.reader;version
- ="2.1.1.v20090825",org.sat4j.pb.tools;version="2.1.1.v20090825"
-Specification-Version: NA
-Specification-Title: SAT4J
-Specification-Vendor: Daniel Le Berre
-Ant-Version: Apache Ant 1.7.0
-Bundle-Vendor: %providerName
-Bundle-Name: %bundleName
-Class-Path: org.sat4j.core.jar
-Created-By: 1.5.0_19-137 (Apple Inc.)
-Implementation-Version: 2.1.1.v20090825 
-Implementation-Title: SAT4J
-Bundle-ManifestVersion: 2
-
-Name: overview.html
-SHA1-Digest: dn/2qZIKrR/o7110Zst9XnBMJQs=
-
-Name: org/sat4j/pb/constraints/pb/IDataStructurePB.class
-SHA1-Digest: Xm8N/YZD386M5Szy496fNVKhnxQ=
-
-Name: org/sat4j/pb/constraints/pb/OriginalBinaryClausePB.class
-SHA1-Digest: FXq7CXA7nVqbHlqWie4D+B/LCzs=
-
-Name: org/sat4j/pb/UserFriendlyPBStringSolver$1.class
-SHA1-Digest: qj0ejfU2Vss7cjIpNHUNFxuriSQ=
-
-Name: org/sat4j/pb/reader/OPBReader2006.class
-SHA1-Digest: 4/csvovsMfxq9N/Kcm5rhUGcKs8=
-
-Name: org/sat4j/pb/tools/ImplicationNamer.class
-SHA1-Digest: ziwXUaHB8fUeycst0fxudZamcsM=
-
-Name: org/sat4j/pb/core/PBSolverMerging.class
-SHA1-Digest: Tgkc0vEHBg3USeK1ihjHTQu1ZCk=
-
-Name: org/sat4j/pb/constraints/CompetMinHTmixedClauseCardConstrDataStr
- uctureFactory.class
-SHA1-Digest: ymznHWJ6cS9bbm7svSbN3CeeWj8=
-
-Name: org/sat4j/pb/constraints/PBMaxCBClauseCardConstrDataStructure.cl
- ass
-SHA1-Digest: qtb3h7ezTc25u0V91B6UgU6j8g8=
-
-Name: org/sat4j/pb/core/PBSolverCP.class
-SHA1-Digest: 7wQP6GA3DsYUM7UMbd3OghvoC/Y=
-
-Name: org/sat4j/pb/constraints/pb/AtLeastPB.class
-SHA1-Digest: JQiubiWgx2a8SmYOS5v58HPNCFY=
-
-Name: org/sat4j/pb/constraints/pb/MinWatchCardPB.class
-SHA1-Digest: ns6fcl5QM98lbWv3f9zd7of3mXQ=
-
-Name: org/sat4j/pb/constraints/pb/ConflictMap.class
-SHA1-Digest: UxNdD+FbCMRpi/dQ440bbw7hZH0=
-
-Name: org/sat4j/pb/constraints/pb/MapPb.class
-SHA1-Digest: z2xnvkt2OrGQYiC8Wz9SPQQPv+I=
-
-Name: org/sat4j/pb/constraints/pb/UnitClausePB.class
-SHA1-Digest: eL08jOjSXet1kotPw1R8/AZ0nuc=
-
-Name: org/sat4j/pb/LanceurPseudo2007Eclipse.class
-SHA1-Digest: Ondv1bY707Bu6EpfiDvUZumX0Cg=
-
-Name: org/sat4j/pb/tools/DependencyHelper.class
-SHA1-Digest: pQ1lVUAFzcfGbmqDIA7ajHj3yXc=
-
-Name: org/sat4j/pb/tools/ImplicationAnd.class
-SHA1-Digest: 3EMAiUN8U2VAat8nOowPC8Mcc0g=
-
-Name: org/sat4j/pb/constraints/PBMaxDataStructure.class
-SHA1-Digest: KdfVH5MegXa7QJz//2vmo0GanZQ=
-
-Name: org/sat4j/pb/constraints/pb/Pseudos.class
-SHA1-Digest: ZTIgOsK2tNXB6q21b5qbIaiL/hQ=
-
-Name: org/sat4j/pb/constraints/CompetPBMaxMixedHTClauseCardConstrDataS
- tructure.class
-SHA1-Digest: GBFELGtF4Sl71dvDst5BBkOGJPI=
-
-Name: org/sat4j/pb/constraints/PBMinClauseCardConstrDataStructure.clas
- s
-SHA1-Digest: J1dlVXjpzwzp60hXjtKyC9rXLFY=
-
-Name: org/sat4j/pb/constraints/pb/ConflictMapClause.class
-SHA1-Digest: K3bEjfd5QJvyvv2Pv1ONaFihqBo=
-
-Name: org/sat4j/pb/constraints/PuebloPBMinClauseAtLeastConstrDataStruc
- ture.class
-SHA1-Digest: LEz9LEXISALqSOWN8cl3oZM/VSA=
-
-Name: org/sat4j/pb/tools/Operator.class
-SHA1-Digest: P1wVpGCzhJIwFYPtG7MvqYARavk=
-
-Name: org/sat4j/pb/constraints/PBContainer.class
-SHA1-Digest: k2SiN6MVkmZIAs2BZthHKU3qcFI=
-
-Name: org/sat4j/pb/PBSolverDecorator.class
-SHA1-Digest: YS4E5EwsxgIn07GKYJUGAckh+Yg=
-
-Name: org/sat4j/pb/constraints/pb/LearntBinaryClausePB.class
-SHA1-Digest: 1uKM2LYXMUY3jqZEyLEI5T+TFys=
-
-Name: org/sat4j/pb/SolverFactory.class
-SHA1-Digest: TgUmMl+LiQGfnGFpBAn0DA5UPqE=
-
-Name: org/sat4j/pb/constraints/PuebloPBMinClauseCardConstrDataStructur
- e.class
-SHA1-Digest: 1pnfP92omkXRDw0bV72PXXaKC+I=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
-
-Name: org/sat4j/pb/orders/VarOrderHeapObjective.class
-SHA1-Digest: 0r9qtnJj06vLagscrBnbAHhpp4s=
-
-Name: org/sat4j/pb/core/PBSolverWithImpliedClause.class
-SHA1-Digest: s3vJJYzwhHfqI4mPwbb4bzzLbSU=
-
-Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$2.class
-SHA1-Digest: EhM/UQ2C7VSwcXqMJsYz/xQqIzY=
-
-Name: org/sat4j/pb/core/PBSolverResolution.class
-SHA1-Digest: AZp/t8RZx0PAVmhFxXs94jBpX7o=
-
-Name: org/sat4j/pb/constraints/pb/MaxWatchPb.class
-SHA1-Digest: X8P8VXwa+yDKhDb7nFU1ezzOLKg=
-
-Name: org/sat4j/pb/constraints/pb/OriginalHTClausePB.class
-SHA1-Digest: W6+8jzOVBcPkTxlWPFNJuxb3i/c=
-
-Name: org/sat4j/pb/core/PBSolverClause.class
-SHA1-Digest: DrQWdAgg/bIiPz7g0/M2g2bVefo=
-
-Name: org/sat4j/pb/constraints/pb/PBConstr.class
-SHA1-Digest: cGyEna1FuiRo+wXsHc7OT0GYebA=
-
-Name: org/sat4j/pb/OPBStringSolver.class
-SHA1-Digest: 4+gFeA8L00L0eSV2gcblKIDCxKs=
-
-Name: org/sat4j/pb/constraints/pb/InternalMapPBStructure.class
-SHA1-Digest: msE7EZm/lhBUjPo38MnC/Q7zmaA=
-
-Name: org/sat4j/pb/tools/DisjunctionRHS.class
-SHA1-Digest: GtIF7KXULi+FxXpG1e/ZpUiFe/Q=
-
-Name: org/sat4j/pb/constraints/AbstractPBClauseCardConstrDataStructure
- .class
-SHA1-Digest: SQ7Sc1COj1LyKNRcfYsgwvgbk8g=
-
-Name: org/sat4j/pb/PseudoIteratorDecorator.class
-SHA1-Digest: BhUpeltagfb+ncnDFH6dShTpwxM=
-
-Name: org/sat4j/pb/tools/ImplicationRHS.class
-SHA1-Digest: 0+xFfbp0bY/Rmqssr3R5XUsvdNI=
-
-Name: org/sat4j/pb/constraints/pb/IConflict.class
-SHA1-Digest: 8nZSuHaXuhcRcWKr06QojwiERko=
-
-Name: org/sat4j/pb/tools/XplainPB.class
-SHA1-Digest: BXQRrRzHdOaCZYY6OZsvhSpQzR8=
-
-Name: org/sat4j/pb/constraints/pb/PuebloMinWatchPb.class
-SHA1-Digest: INjF4GR0Wi1F7zgaWCGFExFLtE0=
-
-Name: org/sat4j/pb/reader/OPBReader2005.class
-SHA1-Digest: cLQGT09CLKWD2grA37xGVfNad3U=
-
-Name: org/sat4j/pb/reader/OPBEclipseReader2007.class
-SHA1-Digest: QXk2fFoGvXwX6TWMtEDAxj69XXM=
-
-Name: org/sat4j/pb/reader/OPBReader2007.class
-SHA1-Digest: 9magqTJPJDdDGwOiza161gssd2A=
-
-Name: org/sat4j/pb/constraints/pb/WatchPb.class
-SHA1-Digest: N/zZenM5UGpzyHnOM8uHwbklAAc=
-
-Name: org/sat4j/pb/tools/Not.class
-SHA1-Digest: 8YA9tp3TRdDjEA/OjKuVsHHsvno=
-
-Name: org/sat4j/pb/constraints/PBMaxClauseCardConstrDataStructure.clas
- s
-SHA1-Digest: Fnue5BdVN3UJjr8vdKYKmFxl3I4=
-
-Name: org/sat4j/pb/tools/StringNegator.class
-SHA1-Digest: 5hqcNuNipwSHlWRMK8CsUb2quTM=
-
-Name: org/sat4j/pb/constraints/pb/LearntHTClausePB.class
-SHA1-Digest: 69kMYVXrer4sH/CtkmHQpIdzPlk=
-
-Name: plugin.properties
-SHA1-Digest: jH6bKyeXDNDTAFPXOMVz3/1taug=
-
-Name: org/sat4j/pb/constraints/pb/ConflictMapCardinality.class
-SHA1-Digest: +UGaZ29Dnlug4VLVBWv68Ic2ppw=
-
-Name: org/sat4j/pb/OptToPBSATAdapter.class
-SHA1-Digest: VcRq6SPzxV3AkaQKGLMG9kRnkLg=
-
-Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory.class
-SHA1-Digest: KbWxvAgA/DjvJg8p1hSn5MSc86Q=
-
-Name: org/sat4j/pb/constraints/PBMaxClauseAtLeastConstrDataStructure.c
- lass
-SHA1-Digest: wRI1whrQwLGTZ3pZ/j7Bupxn59A=
-
-Name: org/sat4j/pb/ObjectiveFunction.class
-SHA1-Digest: Cl6LLzfd+admmGGCG9y5GK+Yzpw=
-
-Name: org/sat4j/pb/core/PBSolver.class
-SHA1-Digest: 6LTSgHG3T+9YeoG97HW575CdJOA=
-
-Name: org/sat4j/pb/reader/PBInstanceReader.class
-SHA1-Digest: 841SaTCkyCwfpCbSv3Q3UJI0yOw=
-
-Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$INormali
- zer.class
-SHA1-Digest: /x1oLIqX9C4G5v/MbO3jxnwrOGY=
-
-Name: org/sat4j/pb/tools/DependencyHelper$1.class
-SHA1-Digest: lgSW79aBpPxi6tZXileYAtxzPGo=
-
-Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$1.class
-SHA1-Digest: ozJo8RWFS2GYobtqdcqVKmGzUWw=
-
-Name: org/sat4j/pb/LanceurPseudo2005.class
-SHA1-Digest: DSYqBS2w0CShFdfHPxAwrfXQPWw=
-
-Name: org/sat4j/pb/LanceurPseudo2007.class
-SHA1-Digest: vtzhaYh1w0ZCqmO85iqqRHJeXnc=
-
-Name: org/sat4j/pb/constraints/PBMinDataStructure.class
-SHA1-Digest: i9T88nBohU1KyFHdXU12xaL4G2A=
-
-Name: about.html
-SHA1-Digest: szdHudKq/UbdO7xVm6oGmBn6MHA=
-
-Name: org/sat4j/pb/core/PBDataStructureFactory.class
-SHA1-Digest: SVE05s58+D09wvruE9GkbENW2xo=
-
-Name: org/sat4j/pb/PseudoOptDecorator.class
-SHA1-Digest: xli8ey+0tngwdMUE35+2qgWgI8M=
-
-Name: org/sat4j/pb/constraints/PuebloPBMinDataStructure.class
-SHA1-Digest: I/SZKGmZNbhC3wHXbgslmkrOJdM=
-
-Name: org/sat4j/pb/constraints/CompetResolutionPBMixedHTClauseCardCons
- trDataStructure.class
-SHA1-Digest: maMvMtHVmqKoZchGLzsiC8BsZqU=
-
-Name: org/sat4j/pb/tools/WeightedObject.class
-SHA1-Digest: cG/cFfxPnONOuuSUkBW5W0Z8ogQ=
-
-Name: org/sat4j/pb/UserFriendlyPBStringSolver.class
-SHA1-Digest: 2kgQ/5diOikudgV/HS9tnxa1J4k=
-
-Name: org/sat4j/pb/IPBSolver.class
-SHA1-Digest: NSY5VClcnzT5VrJEsesJsz4a148=
-
-Name: org/sat4j/pb/tools/INegator.class
-SHA1-Digest: c0W2kSseyjOrq8qD92jkBkk3uiI=
-
-Name: org/sat4j/pb/tools/IFormula.class
-SHA1-Digest: 8G5qTAatvyP2vpjLzBOKEfXv31E=
-
-Name: org/sat4j/pb/constraints/pb/ConflictMapMerging.class
-SHA1-Digest: q5RklWH/y83juvCTN2hbr492npM=
-
-Name: org/sat4j/pb/constraints/pb/MixableCBClausePB.class
-SHA1-Digest: hMww2jpOT2pbhBugGxsTP+JEyy4=
-
-Name: org/sat4j/pb/OPBStringSolver$1.class
-SHA1-Digest: QmoFt6y7YxhfX0sm4crhlN1ix5g=
-
-Name: org/sat4j/pb/constraints/pb/MinWatchPb.class
-SHA1-Digest: +7UA53CaNGh35hZgePEUORGZQQg=
-
diff --git a/dependencyManifests/org.sat4j.pb_2.2.0.v20100429.jar/META-INF/MANIFEST.MF b/dependencyManifests/org.sat4j.pb_2.2.0.v20100429.jar/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..31d1d86
--- /dev/null
+++ b/dependencyManifests/org.sat4j.pb_2.2.0.v20100429.jar/META-INF/MANIFEST.MF
@@ -0,0 +1,304 @@
+Manifest-Version: 1.0
+Implementation-Vendor: CRIL CNRS UMR 8188 - Universite d'Artois
+Main-Class: org.sat4j.pb.LanceurPseudo2007
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Built-By: Daniel Le Berre
+Bundle-SymbolicName: org.sat4j.pb
+Require-Bundle: org.sat4j.core
+Bundle-Version: 2.2.0.v20100429
+Export-Package: org.sat4j.pb;version="2.2.0.v20100429",org.sat4j.pb.co
+ nstraints;version="2.2.0.v20100429",org.sat4j.pb.constraints.pb;versi
+ on="2.2.0.v20100429",org.sat4j.pb.core;version="2.2.0.v20100429",org.
+ sat4j.pb.orders;version="2.2.0.v20100429",org.sat4j.pb.reader;version
+ ="2.2.0.v20100429",org.sat4j.pb.tools;version="2.2.0.v20100429"
+Specification-Version: NA
+Specification-Title: SAT4J
+Specification-Vendor: Daniel Le Berre
+Ant-Version: Apache Ant 1.7.1
+Bundle-Vendor: %providerName
+Bundle-Name: %bundleName
+Class-Path: org.sat4j.core.jar
+Created-By: 14.0-b16 (Sun Microsystems Inc.)
+Implementation-Version: 2.2.0.v20100429 
+Implementation-Title: SAT4J
+Bundle-ManifestVersion: 2
+
+Name: overview.html
+SHA1-Digest: dn/2qZIKrR/o7110Zst9XnBMJQs=
+
+Name: org/sat4j/pb/core/PBSolverCautious.class
+SHA1-Digest: G6PE+jY5a6fBYlvCCJ80DIRQttg=
+
+Name: org/sat4j/pb/constraints/pb/IDataStructurePB.class
+SHA1-Digest: K8hIGafz38gYco1roO+km+62nUI=
+
+Name: org/sat4j/pb/constraints/pb/OriginalBinaryClausePB.class
+SHA1-Digest: 2u9IrZTRMP8k/+Pgirz48qiZ7/0=
+
+Name: org/sat4j/pb/UserFriendlyPBStringSolver$1.class
+SHA1-Digest: gKdki2AgPWZsKfQrO3rcO8Xdsp8=
+
+Name: org/sat4j/pb/reader/OPBReader2006.class
+SHA1-Digest: Za8OEzrefdDt2z98j51EBX3xj3A=
+
+Name: org/sat4j/pb/tools/ImplicationNamer.class
+SHA1-Digest: uaNnc29kUvqltyMLCZ6SEoetrnc=
+
+Name: org/sat4j/pb/core/PBSolverMerging.class
+SHA1-Digest: djmzlzPZAInJVw6wMQ7MCGQT6F4=
+
+Name: org/sat4j/pb/constraints/CompetResolutionPBMixedWLClauseCardCons
+ trDataStructure.class
+SHA1-Digest: nloc0/mY93BZDB4uTWIOeP1WHY4=
+
+Name: org/sat4j/pb/constraints/CompetMinHTmixedClauseCardConstrDataStr
+ uctureFactory.class
+SHA1-Digest: GO7p5Za7oIPox69KRZ053C99kLg=
+
+Name: org/sat4j/pb/constraints/PBMaxCBClauseCardConstrDataStructure.cl
+ ass
+SHA1-Digest: 8B4zKn975+9WwnkxYqODzGgNMtA=
+
+Name: org/sat4j/pb/core/PBSolverCP.class
+SHA1-Digest: +Qc17V3GJ6vqbTiGdEC/NiVaSRE=
+
+Name: org/sat4j/pb/constraints/pb/AtLeastPB.class
+SHA1-Digest: NasfzFaI5jhvxcIXI67cTVOg124=
+
+Name: org/sat4j/pb/constraints/pb/ConflictMapSwitchToClause.class
+SHA1-Digest: mx8XOflLPBSXnWWc3bXlHIYyj6A=
+
+Name: org/sat4j/pb/constraints/pb/MinWatchCardPB.class
+SHA1-Digest: crONz2vRhajI5wwzRVtND9P37RI=
+
+Name: org/sat4j/pb/constraints/pb/ConflictMap.class
+SHA1-Digest: y16ySy2IGCLtsK0U50yhENNC6W0=
+
+Name: org/sat4j/pb/constraints/pb/MapPb.class
+SHA1-Digest: NXbo9EEw7HqKORoEXNbOk2hCeq8=
+
+Name: org/sat4j/pb/constraints/pb/UnitClausePB.class
+SHA1-Digest: 4n3MLmHlk2tAJbg1EgAp8mQf64o=
+
+Name: org/sat4j/pb/LanceurPseudo2007Eclipse.class
+SHA1-Digest: +QTEdsoG7bzmL/YI28W57v47CAk=
+
+Name: org/sat4j/pb/tools/DependencyHelper.class
+SHA1-Digest: OMY1u4aMLJ3UoL+za68NnMiocyY=
+
+Name: org/sat4j/pb/tools/ImplicationAnd.class
+SHA1-Digest: +k7ETPN3t0C+UZAnZcW8u7eFomw=
+
+Name: org/sat4j/pb/constraints/PBMaxDataStructure.class
+SHA1-Digest: w0Xjba3ddTPxB2dVW1HvWpfGIq4=
+
+Name: org/sat4j/pb/constraints/pb/Pseudos.class
+SHA1-Digest: ose+x3/CGsc7AjXEunLkqmNm63I=
+
+Name: org/sat4j/pb/constraints/PBMinClauseCardConstrDataStructure.clas
+ s
+SHA1-Digest: 3x3BBKrLLuA5SCj3X+IH41yAsr8=
+
+Name: org/sat4j/pb/constraints/pb/ConflictMapClause.class
+SHA1-Digest: dSLvmwcCiD9ZFlvFrTw8bneJCI4=
+
+Name: org/sat4j/pb/constraints/PuebloPBMinClauseAtLeastConstrDataStruc
+ ture.class
+SHA1-Digest: w309O/LZInrUh++d8phGpdJEZtA=
+
+Name: org/sat4j/pb/core/PBSolverResCP.class
+SHA1-Digest: zCdBCthIUAVA6/i4k1D5o9Te7e8=
+
+Name: org/sat4j/pb/constraints/PBContainer.class
+SHA1-Digest: kcNv1+UXugI/PV/+sSoMgLAIftU=
+
+Name: org/sat4j/pb/PBSolverDecorator.class
+SHA1-Digest: GD0qkZZprzxUHS2LGjSka/FTl+0=
+
+Name: org/sat4j/pb/constraints/pb/LearntBinaryClausePB.class
+SHA1-Digest: QL6nsPydh+z3nKNQYe7jwE1CgHo=
+
+Name: org/sat4j/pb/SolverFactory.class
+SHA1-Digest: NBohv7locQ+NEAky27a7fek+8SY=
+
+Name: org/sat4j/pb/constraints/PuebloPBMinClauseCardConstrDataStructur
+ e.class
+SHA1-Digest: ZT86iNkY8IXjLjUr72UiFPplKLw=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: 6mDW8kS/T9pK7w1by/wcxy21Z20=
+
+Name: org/sat4j/pb/tools/DependencyHelper$2.class
+SHA1-Digest: aLYin0QkwOIijO/rXnY0UmXqTpc=
+
+Name: org/sat4j/pb/orders/VarOrderHeapObjective.class
+SHA1-Digest: 2FsAP/pICHcMCNdPadbMBG7y/do=
+
+Name: org/sat4j/pb/core/PBSolverWithImpliedClause.class
+SHA1-Digest: xue1+JX1bmghjnwSZpBO+vz1WMI=
+
+Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$2.class
+SHA1-Digest: rKuP05A+NpTct21Ak6zGVQ7vAHc=
+
+Name: org/sat4j/pb/core/PBSolverResolution.class
+SHA1-Digest: SRfvQmnFA/QRlfyWvt9nqRR/lns=
+
+Name: org/sat4j/pb/constraints/pb/MaxWatchPb.class
+SHA1-Digest: jwNLXKfu0MZJqHvWUU87nuz9r1Q=
+
+Name: org/sat4j/pb/constraints/pb/OriginalHTClausePB.class
+SHA1-Digest: +TRdmilQ15C9Xic9IlZeDbLBMM0=
+
+Name: org/sat4j/pb/core/PBSolverClause.class
+SHA1-Digest: trpkB4UWxuGDFj3J+dGk8DIKFtI=
+
+Name: org/sat4j/pb/constraints/pb/PBConstr.class
+SHA1-Digest: qaZnIWUyx9dxXNAti4MebxloBjE=
+
+Name: org/sat4j/pb/OPBStringSolver.class
+SHA1-Digest: gdLAcb+mUTxzOM6kk/5p88mp0qY=
+
+Name: org/sat4j/pb/constraints/pb/InternalMapPBStructure.class
+SHA1-Digest: W+CVWLpOBzqKrTm71l0sCPWuZyc=
+
+Name: org/sat4j/pb/core/PBSolverStats.class
+SHA1-Digest: i1V3lr1ohpwMObvUCO6yu3+jNlY=
+
+Name: org/sat4j/pb/tools/DisjunctionRHS.class
+SHA1-Digest: MqBHzo9QkDUG85zHorqZaUHoDoU=
+
+Name: org/sat4j/pb/constraints/AbstractPBClauseCardConstrDataStructure
+ .class
+SHA1-Digest: QXWQslhjncOBuirq/A6ldLhfOdE=
+
+Name: org/sat4j/pb/PseudoIteratorDecorator.class
+SHA1-Digest: K3JFS3H4wD0Net76iHilpaP/ijA=
+
+Name: org/sat4j/pb/tools/ImplicationRHS.class
+SHA1-Digest: 6N5qhFgu8eCcUJgR/nyZnm9QAO0=
+
+Name: org/sat4j/pb/constraints/pb/IConflict.class
+SHA1-Digest: PHI0OOz1wRQfxXGh8PLGIidS1zg=
+
+Name: org/sat4j/pb/tools/XplainPB.class
+SHA1-Digest: DRGrsuFqXjYIrNN5TreQyylIxKo=
+
+Name: org/sat4j/pb/constraints/pb/PuebloMinWatchPb.class
+SHA1-Digest: 1ALpLOsAU3mfsrmmAVrk5duTFbM=
+
+Name: org/sat4j/pb/reader/OPBReader2005.class
+SHA1-Digest: pKJb39oplIXV3JlrwxWrZBcMk6g=
+
+Name: org/sat4j/pb/reader/OPBEclipseReader2007.class
+SHA1-Digest: cNvV2IRw/CmiGv9Xcp7GkZmMhyg=
+
+Name: org/sat4j/pb/reader/OPBReader2007.class
+SHA1-Digest: bHOST+J41ibjBKz0b7FSbOsyKlY=
+
+Name: org/sat4j/pb/constraints/pb/WatchPb.class
+SHA1-Digest: Wl9nlz4WzhuGaXqZBA8eyw8yzg8=
+
+Name: org/sat4j/pb/tools/ConflictTracing.class
+SHA1-Digest: bNwGBc0F0AQRb65r+fYJ83nYdfs=
+
+Name: org/sat4j/pb/constraints/PBMaxClauseCardConstrDataStructure.clas
+ s
+SHA1-Digest: vXE4DWIWLt9Xmnhfq5IB4dIhav0=
+
+Name: org/sat4j/pb/tools/StringNegator.class
+SHA1-Digest: k0hKqdrMlxYBJhCJ8S1QmhrOLJE=
+
+Name: org/sat4j/pb/constraints/pb/LearntHTClausePB.class
+SHA1-Digest: aJhiQFddE3ZDaXaeX/23LeHN1g8=
+
+Name: plugin.properties
+SHA1-Digest: jH6bKyeXDNDTAFPXOMVz3/1taug=
+
+Name: org/sat4j/pb/constraints/pb/ConflictMapCardinality.class
+SHA1-Digest: kYQEQKAQns7W6rY6Y+ZYX9bBpWk=
+
+Name: org/sat4j/pb/OptToPBSATAdapter.class
+SHA1-Digest: MXj/pFl1iZd0sYLMBIrF/1agANM=
+
+Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory.class
+SHA1-Digest: tPyl3mGH0TFhhdNVWHTDSKj9o3s=
+
+Name: org/sat4j/pb/constraints/PBMaxClauseAtLeastConstrDataStructure.c
+ lass
+SHA1-Digest: uKBmKVPD6QYIT3RVFqCUC6kD9qA=
+
+Name: org/sat4j/pb/ObjectiveFunction.class
+SHA1-Digest: F3NAF2DIaLsJAGzMLGIvo97AWeY=
+
+Name: target/META-INF/MANIFEST.MF
+SHA1-Digest: hQv/s0DLOeak/5OqsUcxm3guLeU=
+
+Name: org/sat4j/pb/core/PBSolver.class
+SHA1-Digest: gxJCEd2FqXuZuDpUXEc9kGdprNY=
+
+Name: org/sat4j/pb/reader/PBInstanceReader.class
+SHA1-Digest: J9s9zvTyMXHShX1KupSLAqns3Hw=
+
+Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$INormali
+ zer.class
+SHA1-Digest: 2iRa3YBib1gXCgoE57DR3NF6x+I=
+
+Name: org/sat4j/pb/tools/DependencyHelper$1.class
+SHA1-Digest: 7fORyR0FINvIRM6pfII4nQmLLhk=
+
+Name: org/sat4j/pb/constraints/AbstractPBDataStructureFactory$1.class
+SHA1-Digest: Ko42eIS8RwhywU09NkfV1pawdlI=
+
+Name: org/sat4j/pb/LanceurPseudo2005.class
+SHA1-Digest: Ka03bnbg7X84LZly4Ncsg/HuWys=
+
+Name: org/sat4j/pb/LanceurPseudo2007.class
+SHA1-Digest: ed4pLqCMTL1Yc4W9hkerdqO6YiQ=
+
+Name: org/sat4j/pb/tools/DependencyHelper$Negation.class
+SHA1-Digest: Rw1JeScc9GREEsMFgDyL7Ebok68=
+
+Name: org/sat4j/pb/constraints/PBMinDataStructure.class
+SHA1-Digest: sKRfSps0qSzK9KigQwTOxj2WagU=
+
+Name: about.html
+SHA1-Digest: GrW2Mel5Q31SWUprDqfCckmZlc8=
+
+Name: org/sat4j/pb/core/PBDataStructureFactory.class
+SHA1-Digest: H8EuqbIE5W7Tphq3qKi7sH6qn/M=
+
+Name: org/sat4j/pb/PseudoOptDecorator.class
+SHA1-Digest: z65sDBvX3JjybTNhUe4IHGtJTcg=
+
+Name: org/sat4j/pb/constraints/PuebloPBMinDataStructure.class
+SHA1-Digest: SM8ErxquNZp0yqPAkjtxKEce+lo=
+
+Name: org/sat4j/pb/constraints/CompetResolutionPBMixedHTClauseCardCons
+ trDataStructure.class
+SHA1-Digest: m0yfuYuZXnykAZA/7AUKQXAH21E=
+
+Name: org/sat4j/pb/tools/WeightedObject.class
+SHA1-Digest: 0Ftz4Xdwv6BlICjIiLtQmqig+Fc=
+
+Name: org/sat4j/pb/UserFriendlyPBStringSolver.class
+SHA1-Digest: alT+ejzhY34Amp3w9ibn2W9Pxzw=
+
+Name: org/sat4j/pb/IPBSolver.class
+SHA1-Digest: fYQnDxuLMJKMVYHfvWwgAQFPamk=
+
+Name: org/sat4j/pb/tools/INegator.class
+SHA1-Digest: wcPOwhE1FJYCkyldqzJ4L5++ksM=
+
+Name: org/sat4j/pb/constraints/pb/ConflictMapMerging.class
+SHA1-Digest: F0BQSKqM/+RWB3eVBD/l6Zg6TEw=
+
+Name: org/sat4j/pb/constraints/pb/MixableCBClausePB.class
+SHA1-Digest: kQR6fpZJWXeRbyTtDqVfNuUyMKY=
+
+Name: org/sat4j/pb/OPBStringSolver$1.class
+SHA1-Digest: 5AYRMJJhrIzA0BjEjRSf4DQbeYo=
+
+Name: org/sat4j/pb/constraints/pb/MinWatchPb.class
+SHA1-Digest: USLVxnCfcv8nQNOf627OseH5DIM=
+
diff --git a/eclipse-build-config/.project b/eclipse-build-config/.project
deleted file mode 100644
index caa03f5..0000000
--- a/eclipse-build-config/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>eclipse-build-config</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>
diff --git a/eclipse-build-config/ChangeLog b/eclipse-build-config/ChangeLog
index 3ee0400..8c49040 100644
--- a/eclipse-build-config/ChangeLog
+++ b/eclipse-build-config/ChangeLog
@@ -1,3 +1,29 @@
+2010-07-14  Andrew Overholt  <overholt at redhat.com>
+
+	* build.properties.in: Remove svn:executable property.
+	* customAssembly.xml: Likewise.
+	* customTargets.xml: Likewise.
+
+2010-06-11  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* productFiles/platform.sdk/p2.inf: Update to 3.6.0. 
+	* productFiles/platform.sdk/platform.product: Likewise
+	* productFiles/platform/p2.inf: Likewise.
+	* productFiles/platform/platform.product: Likewise. 
+	* productFiles/rcp.sdk/rcp.product: Likewise.
+	* productFiles/rcp/rcp.product: Likewise.
+	* productFiles/sdk/p2.inf: Likewise.
+	* productFiles/sdk/sdk.product: Likewise.
+
+2010-05-31  Andrew Overholt  <overholt at redhat.com>
+
+	Bug #313079
+
+	* productFiles/platform.sdk/platform.product: Add ability to open a file
+	from the launcher.
+	* productFiles/platform/platform.product: Likewise.
+	* productFiles/sdk/sdk.product: Likewise.
+
 2010-03-06  Alexander Kurtakov  <akurtako at redhat.com>
 
 	* productFiles/sdk/sdk.product: Do not break platform provisioning.
diff --git a/eclipse-build-config/build.properties.in b/eclipse-build-config/build.properties.in
old mode 100755
new mode 100644
diff --git a/eclipse-build-config/customAssembly.xml b/eclipse-build-config/customAssembly.xml
old mode 100755
new mode 100644
diff --git a/eclipse-build-config/customTargets.xml b/eclipse-build-config/customTargets.xml
old mode 100755
new mode 100644
diff --git a/eclipse-build-config/productFiles/platform.sdk/p2.inf b/eclipse-build-config/productFiles/platform.sdk/p2.inf
index b3c30c1..f981ffc 100644
--- a/eclipse-build-config/productFiles/platform.sdk/p2.inf
+++ b/eclipse-build-config/productFiles/platform.sdk/p2.inf
@@ -1,8 +1,8 @@
 instructions.configure=\
-addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:0,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
   mkdir(path:${installFolder}/dropins);
 requires.1.namespace=org.eclipse.equinox.p2.iu
 requires.1.name=toolingorg.eclipse.configuration.macosx
diff --git a/eclipse-build-config/productFiles/platform.sdk/platform.product b/eclipse-build-config/productFiles/platform.sdk/platform.product
index d14b121..be10b2e 100644
--- a/eclipse-build-config/productFiles/platform.sdk/platform.product
+++ b/eclipse-build-config/productFiles/platform.sdk/platform.product
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.4"?>
+<?pde version="3.5"?>
 
-<product name="Eclipse Platform SDK" id="org.eclipse.platform.sdk" application="org.eclipse.ui.ide.workbench" version="3.5.0. at qualifier@" useFeatures="true">
+<product name="Eclipse Platform SDK" uid="org.eclipse.platform.sdk" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="3.6.0. at qualifier@" useFeatures="true" includeLaunchers="true">
 
    <configIni use="default">
    </configIni>
 
-  <launcherArgs>
-      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m</programArgs>
-      <vmArgs>-Xms40m -Xmx256m</vmArgs>
+   <launcherArgs>
+      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile</programArgs>
+      <vmArgs>-Xms40m -Xmx384m</vmArgs>
       <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
    </launcherArgs>
 
@@ -24,6 +24,134 @@
    <vm>
    </vm>
 
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+April 14, 2010
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository ("Repository") in software modules ("Modules") and made available
+as downloadable archives ("Downloads").
+
+       - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),
+         plug-in fragments ("Fragments"), and features ("Features").
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named "plugins".
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named "features".
+         Within a Feature, files named "feature.xml" may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features ("Included Features"). Within a Feature, files
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and Included Features should be contained
+in files named "license.html" ("Feature Licenses"). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named "src" of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license ("Feature 
+Update License") during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively "Installable Software"). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software ("Installable Software Agreement") and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
    <plugins>
    </plugins>
 
@@ -33,17 +161,15 @@
       <feature id="org.eclipse.equinox.p2.user.ui"/>
       <feature id="org.eclipse.rcp.configuration"/>
    </features>
-   
+
    <configurations>
       <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
       <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
-      <property name="org.eclipse.update.reconcile" value="false" />                                        
-      <property name="osgi.bundles.defaultStartLevel" value="4" />   
-      <property name="eclipse.buildId" value="@qualifier@"/>
    </configurations>
 
 </product>
diff --git a/eclipse-build-config/productFiles/platform/p2.inf b/eclipse-build-config/productFiles/platform/p2.inf
index b3c30c1..f981ffc 100644
--- a/eclipse-build-config/productFiles/platform/p2.inf
+++ b/eclipse-build-config/productFiles/platform/p2.inf
@@ -1,8 +1,8 @@
 instructions.configure=\
-addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:0,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
   mkdir(path:${installFolder}/dropins);
 requires.1.namespace=org.eclipse.equinox.p2.iu
 requires.1.name=toolingorg.eclipse.configuration.macosx
diff --git a/eclipse-build-config/productFiles/platform/platform.product b/eclipse-build-config/productFiles/platform/platform.product
index 7b58492..5dac54e 100644
--- a/eclipse-build-config/productFiles/platform/platform.product
+++ b/eclipse-build-config/productFiles/platform/platform.product
@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.4"?>
+<?pde version="3.5"?>
 
-<product name="Eclipse Platform" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="3.5.0. at qualifier@" useFeatures="true">
+<product name="Eclipse Platform" id="org.eclipse.platform.ide" application="org.eclipse.ui.ide.workbench" version="3.6.0. at qualifier@" useFeatures="true">
 
    <configIni use="default">
    </configIni>
 
    <launcherArgs>
-      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m</programArgs>
-      <vmArgs>-Xms40m -Xmx256m</vmArgs>
+      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile</programArgs>
+      <vmArgs>-Xms40m -Xmx384m</vmArgs>
       <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
    </launcherArgs>
 
-  <splash
+   <splash
       location="org.eclipse.platform" />
    <launcher name="eclipse">
       <solaris/>
@@ -20,10 +20,138 @@
          <bmp/>
       </win>
    </launcher>
-   
+
    <vm>
    </vm>
 
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+April 14, 2010
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository ("Repository") in software modules ("Modules") and made available
+as downloadable archives ("Downloads").
+
+       - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),
+         plug-in fragments ("Fragments"), and features ("Features").
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named "plugins".
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named "features".
+         Within a Feature, files named "feature.xml" may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features ("Included Features"). Within a Feature, files
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and Included Features should be contained
+in files named "license.html" ("Feature Licenses"). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named "src" of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license ("Feature 
+Update License") during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively "Installable Software"). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software ("Installable Software Agreement") and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
    <plugins>
    </plugins>
 
@@ -32,11 +160,12 @@
       <feature id="org.eclipse.equinox.p2.user.ui"/>
       <feature id="org.eclipse.rcp.configuration"/>
    </features>
-   
+
    <configurations>
       <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
       <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
diff --git a/eclipse-build-config/productFiles/rcp.sdk/rcp.product b/eclipse-build-config/productFiles/rcp.sdk/rcp.product
index abd3db2..33be0ba 100644
--- a/eclipse-build-config/productFiles/rcp.sdk/rcp.product
+++ b/eclipse-build-config/productFiles/rcp.sdk/rcp.product
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Eclipse RCP SDK" uid="org.eclipse.rcp.sdk.id" version="3.5.2. at qualifier@" useFeatures="true" includeLaunchers="true">
+<product name="Eclipse RCP SDK" uid="org.eclipse.rcp.sdk.id" version="3.6.0. at qualifier@" useFeatures="true" includeLaunchers="true">
 
    <configIni use="default">
    </configIni>
 
    <launcherArgs>
       <programArgs>--launcher.XXMaxPermSize 256m</programArgs>
-      <vmArgs>-Xms40m -Xmx256m</vmArgs>
+      <vmArgs>-Xms40m -Xmx384m</vmArgs>
       <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
    </launcherArgs>
 
@@ -22,6 +22,134 @@
    <vm>
    </vm>
 
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+April 14, 2010
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository ("Repository") in software modules ("Modules") and made available
+as downloadable archives ("Downloads").
+
+       - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),
+         plug-in fragments ("Fragments"), and features ("Features").
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named "plugins".
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named "features".
+         Within a Feature, files named "feature.xml" may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features ("Included Features"). Within a Feature, files
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and Included Features should be contained
+in files named "license.html" ("Feature Licenses"). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named "src" of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license ("Feature 
+Update License") during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively "Installable Software"). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software ("Installable Software Agreement") and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
    <plugins>
    </plugins>
 
diff --git a/eclipse-build-config/productFiles/rcp/rcp.product b/eclipse-build-config/productFiles/rcp/rcp.product
index f143e45..9fadde5 100644
--- a/eclipse-build-config/productFiles/rcp/rcp.product
+++ b/eclipse-build-config/productFiles/rcp/rcp.product
@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Eclipse RCP" uid="org.eclipse.rcp.id" version="3.5.0. at qualifier@" useFeatures="true" includeLaunchers="true">
+<product name="Eclipse RCP" uid="org.eclipse.rcp.id" version="3.6.0. at qualifier@" useFeatures="true" includeLaunchers="true">
 
    <configIni use="default">
    </configIni>
 
    <launcherArgs>
       <programArgs>--launcher.XXMaxPermSize 256m</programArgs>
-      <vmArgs>-Xms40m -Xmx256m</vmArgs>
+      <vmArgs>-Xms40m -Xmx384m</vmArgs>
       <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
    </launcherArgs>
 
@@ -22,6 +22,134 @@
    <vm>
    </vm>
 
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+April 14, 2010
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository ("Repository") in software modules ("Modules") and made available
+as downloadable archives ("Downloads").
+
+       - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),
+         plug-in fragments ("Fragments"), and features ("Features").
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named "plugins".
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named "features".
+         Within a Feature, files named "feature.xml" may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features ("Included Features"). Within a Feature, files
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and Included Features should be contained
+in files named "license.html" ("Feature Licenses"). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named "src" of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license ("Feature 
+Update License") during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively "Installable Software"). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software ("Installable Software Agreement") and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+s
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
    <plugins>
    </plugins>
 
diff --git a/eclipse-build-config/productFiles/sdk/p2.inf b/eclipse-build-config/productFiles/sdk/p2.inf
index c2c39a9..e3cd47c 100644
--- a/eclipse-build-config/productFiles/sdk/p2.inf
+++ b/eclipse-build-config/productFiles/sdk/p2.inf
@@ -1,8 +1,8 @@
 instructions.configure=\
-addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.5,name:The Eclipse Project Updates);\
-addRepository(type:0,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
-addRepository(type:1,location:http${#58}//download.eclipse.org/releases/galileo,name:Galileo);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/eclipse/updates/3.6,name:The Eclipse Project Updates);\
+addRepository(type:0,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
+addRepository(type:1,location:http${#58}//download.eclipse.org/releases/helios,name:Helios);\
   mkdir(path:${installFolder}/dropins);
 requires.1.namespace=org.eclipse.equinox.p2.iu
 requires.1.name=toolingorg.eclipse.configuration.macosx
diff --git a/eclipse-build-config/productFiles/sdk/sdk.product b/eclipse-build-config/productFiles/sdk/sdk.product
index d482448..b841c96 100644
--- a/eclipse-build-config/productFiles/sdk/sdk.product
+++ b/eclipse-build-config/productFiles/sdk/sdk.product
@@ -1,16 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Eclipse SDK" id="org.eclipse.sdk.ide" application="org.eclipse.ui.ide.workbench" version="3.5.2. at qualifier@" useFeatures="true" includeLaunchers="true">
+<product name="Eclipse SDK" id="org.eclipse.sdk.ide" application="org.eclipse.ui.ide.workbench" version="3.6.0. at qualifier@" useFeatures="true">
 
    <configIni use="default">
    </configIni>
 
    <launcherArgs>
-      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m</programArgs>
-      <vmArgs>-Xms128m -Xmx512m</vmArgs>
-      <!-- This is currently breaking provisioning the platform only -->
-      <!--vmArgs>-Xms128m -Xmx512m -XX:CompileCommand=exclude${#44}org/eclipse/core/internal/dtree/DataTreeNode${#44}forwardDeltaWith -XX:CompileCommand=exclude${#44}org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding${#44}<init> -XX:CompileCommand=exclude${#44}org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates${#44}instantiateTemplate -XX:CompileCommand=exclude${#44}org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage${#44}addBinding -XX:CompileCommand=exclude${#44}org/python/pydev/editor/codecompletion/revisited/PythonPathHelper${#44}isValidSourceFile -XX:CompileCommand=exclude${#44}org/python/pydev/ui/filetypes/FileTypesPreferencesPage${#44}getDottedValidSourceFiles</vmArgs-->
+      <programArgs>-showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile</programArgs>
+      <vmArgs>-Xms40m -Xmx384m</vmArgs>
       <vmArgsMac>-Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
    </launcherArgs>
 
@@ -28,6 +26,134 @@
    <vm>
    </vm>
 
+   <license>
+        <url>http://eclipse.org/legal/epl/notice.php</url>
+        <text>
+   Eclipse Foundation Software User Agreement
+April 14, 2010
+
+Usage Of Content
+
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+BELOW, THEN YOU MAY NOT USE THE CONTENT.
+
+Applicable Licenses
+
+Unless otherwise indicated, all Content made available by the
+Eclipse Foundation is provided to you under the terms and conditions of
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+Content includes, but is not limited to, source code, object code,
+documentation and other files maintained in the Eclipse Foundation source code
+repository ("Repository") in software modules ("Modules") and made available
+as downloadable archives ("Downloads").
+
+       - Content may be structured and packaged into modules to facilitate delivering,
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),
+         plug-in fragments ("Fragments"), and features ("Features").
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)
+         in a directory named "plugins".
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.
+         Each Feature may be packaged as a sub-directory in a directory named "features".
+         Within a Feature, files named "feature.xml" may contain a list of the names and version
+         numbers of the Plug-ins and/or Fragments associated with that Feature.
+       - Features may also include other Features ("Included Features"). Within a Feature, files
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.
+
+The terms and conditions governing Plug-ins and Fragments should be
+contained in files named "about.html" ("Abouts"). The terms and
+conditions governing Features and Included Features should be contained
+in files named "license.html" ("Feature Licenses"). Abouts and Feature
+Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:
+
+       - The top-level (root) directory
+       - Plug-in and Fragment directories
+       - Inside Plug-ins and Fragments packaged as JARs
+       - Sub-directories of the directory named "src" of certain Plug-ins
+       - Feature directories
+
+Note: if a Feature made available by the Eclipse Foundation is installed using the
+Provisioning Technology (as defined below), you must agree to a license ("Feature 
+Update License") during the installation process. If the Feature contains
+Included Features, the Feature Update License should either provide you
+with the terms and conditions governing the Included Features or inform
+you where you can locate them. Feature Update Licenses may be found in
+the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the
+terms and conditions (or references to such terms and conditions) that
+govern your use of the associated Content in that directory.
+
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):
+
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License
+is provided, please contact the Eclipse Foundation to determine what terms and conditions
+govern that particular Content.
+
+Use of Provisioning Technology
+
+The Eclipse Foundation makes available provisioning software, examples of which include,
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for
+the purpose of allowing users to install software, documentation, information and/or
+other materials (collectively "Installable Software"). This capability is provided with
+the intent of allowing such users to install, extend and update Eclipse-based products.
+Information about packaging Installable Software is available at
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").
+
+You may use Provisioning Technology to allow other parties to install Installable Software.
+You shall be responsible for enabling the applicable license agreements relating to the
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+in accordance with the Specification. By using Provisioning Technology in such a manner and
+making it available in accordance with the Specification, you further acknowledge your
+agreement to, and the acquisition of all necessary rights to permit the following:
+
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,
+          extending or updating the functionality of an Eclipse-based product.
+       2. During the Provisioning Process, the Provisioning Technology may cause third party
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that
+          govern the use of the Installable Software ("Installable Software Agreement") and such
+          Installable Software Agreement shall be accessed from the Target Machine in accordance
+          with the Specification. Such Installable Software Agreement must inform the user of the
+          terms and conditions that govern the Installable Software and must solicit acceptance by
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such
+          indication of agreement by the user, the provisioning Technology will complete installation
+          of the Installable Software.
+
+Cryptography
+
+Content may contain encryption software. The country in which you are
+currently may have restrictions on the import, possession, and use,
+and/or re-export to another country, of encryption software. BEFORE
+using any encryption software, please check the country's laws,
+regulations and policies concerning the import, possession, or use, and
+re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.
+         </text>
+   </license>
+
    <plugins>
    </plugins>
 
@@ -41,6 +167,7 @@
       <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
       <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
diff --git a/eclipse-build-feature/.project b/eclipse-build-feature/.project
deleted file mode 100644
index d9e97c4..0000000
--- a/eclipse-build-feature/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>eclipse-build-feature</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>
diff --git a/eclipse-build-feature/ChangeLog b/eclipse-build-feature/ChangeLog
index adcf153..681e569 100644
--- a/eclipse-build-feature/ChangeLog
+++ b/eclipse-build-feature/ChangeLog
@@ -1,3 +1,20 @@
+2011-03-09  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* feature.xml: Update to 3.6.2.
+
+2010-07-14  Andrew Overholt  <overholt at redhat.com>
+
+	* build.properties: Remove svn:executable property.
+	* feature.xml: Likewise.
+
+2010-06-11  Alexander Kurtakov  <akurtako at redhat.com>
+
+	* feature.xml: Update to 3.6.0.
+
+2010-04-19  Alexander Kurtakov    <akurtako at redhat.com>
+
+	* feature.xml: Remove dependency on o.e.swt.tools.
+
 2010-02-26  Andrew Overholt  <overholt at redhat.com>
 
 	* feature.xml: Remove dependency on icu4j source bundle.
diff --git a/eclipse-build-feature/build.properties b/eclipse-build-feature/build.properties
old mode 100755
new mode 100644
diff --git a/eclipse-build-feature/feature.xml b/eclipse-build-feature/feature.xml
old mode 100755
new mode 100644
index bca9710..2129124
--- a/eclipse-build-feature/feature.xml
+++ b/eclipse-build-feature/feature.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="eclipse-build-feature"
-      version="3.5.2.qualifier">
+      version="3.6.2.qualifier">
 
    <includes
          id="master-jetty"
@@ -16,12 +16,6 @@
          version="0.0.0"/>
 
    <plugin
-         id="org.eclipse.swt.tools"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"/>
-
-   <plugin
          id="org.eclipse.equinox.initializer"
          download-size="0"
          install-size="0"
diff --git a/eclipse-build-generatedScripts.tar.bz2 b/eclipse-build-generatedScripts.tar.bz2
index 5534238..c2835f3 100644
Binary files a/eclipse-build-generatedScripts.tar.bz2 and b/eclipse-build-generatedScripts.tar.bz2 differ
diff --git a/eclipse.1.xml b/eclipse.1.xml
deleted file mode 100644
index 1d93aaf..0000000
--- a/eclipse.1.xml
+++ /dev/null
@@ -1,616 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-<!-- lifted from troff+man by doclifter -->
-<refentry id='eclipse1'>
-<refmeta>
-<refentrytitle>eclipse</refentrytitle>
-<manvolnum>1</manvolnum>
-</refmeta>
-<refnamediv id='name'>
-<refname>eclipse</refname>
-<refpurpose>extensible tool platform and Java IDE</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv id='synopsis'>
-<cmdsynopsis>
-  <command>eclipse</command>
-    <arg choice='opt'><arg choice='plain'><replaceable>platform</replaceable></arg><arg choice='plain'><replaceable>options</replaceable></arg></arg>
-    <arg choice='opt'><arg choice='plain'><option>-vmargs </option></arg><arg choice='opt'><arg choice='plain'><replaceable>Java</replaceable></arg><arg choice='plain'><replaceable>VM</replaceable></arg><arg choice='plain'><replaceable>arguments</replaceable></arg></arg></arg>
-</cmdsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 id='description'><title>DESCRIPTION</title>
-<para>
-The <command>Eclipse</command> Platform is an open and
- extensible platform for anything and yet nothing in particular. It provides a
- foundation for constructing and running integrated software-development tools.
- The <command>Eclipse</command> Platform allows tool builders
- to independently develop tools that integrate with other people's tools so
- seamlessly you can't tell where one tool ends and another starts.</para>
-
- <para>When invoked without selecting any particular application, the <command>eclipse</command>
- command will start the <command>Eclipse</command> Platform with the Java Development
- Tools (JDT) functionality enabled and ready to use.</para>
-
-<para>This manual page documents the command-line arguments for the
-<command>Eclipse</command> Platform and it is based on the
-Runtime Options help item in the <command>Eclipse</command>
-<ulink url="#authors" xrefstyle="AUTHORS">online help</ulink><!-- (see xref endterm="authors" linkend="authors" xrefstyle="AUTHORS"></xref> AUTHORS below)-->.</para>
-
-</refsect1>
-
-<refsect1 id='platform_options'><title>PLATFORM OPTIONS</title>
-<para>  Listed below are the command line arguments processed by various parts of the
-<command>Eclipse</command> runtime.
-Many of these values can also be specified using System properties either on the command line
-using <command>-D VM</command> arguments, by specifying their values in a <filename>config.ini</filename> file or by using a
-<filename><launcher>.ini</filename> file. Using the two latter techniques it is possible to customize
-<command>Eclipse</command> without using command line arguments at all.</para>
-
-<para>For each argument in the list, its corresponding System property key is given (in {}). Also
-given is the <command>Eclipse</command> runtime layer in which the
-command line argument is processed (in ()). </para>
-
-<variablelist remap='TP'>
-
-<varlistentry>
-        <term><option>
-          -application <id> (Runtime)
-        </option></term>
-        <listitem>
-        <para>
-        The identifier of the application to run. The value given here
-            overrides any application defined by the product being run.</para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>eclipse.application</emphasis> to
-            <id>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -arch <architecture> (OSGi)
-        </option></term>
-        <listitem>
-        <para>The processor architecture value.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.arch</emphasis> to
-            <architecture>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -clean (OSGi)
-        </option></term>
-        <listitem>
-         <para>
-            Wipe clean any cached data used by the OSGi
-            framework and <command>eclipse</command> runtime. This will clean
-            the caches used to store bundle dependency resolution and <command>eclipse</command>
-            extension registry data. Using this option will force <command>eclipse</command> to
-            reinitialize these caches.
-          </para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.clean</emphasis> to
-            "true".
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -configuration <location> (Main)
-        </option></term>
-        <listitem>
-        <para>The configuration location for this run of the platform. The
-            configuration determines what plug-ins will run as well as various
-            other system settings. See the On-line Help for details (SEE ALSO below).</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.configuration.area</emphasis>
-            to <location>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -console [port] (OSGi)
-        </option></term>
-        <listitem>
-        <para>Enable the OSGi console (if installed). If the [port] value is a suitable integer, it is interpreted as
-            the port on which the console listens and directs its output to the
-            given port. Handy for investigating the state of the system.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.console</emphasis> to [port] or the
-            empty string if the default port is to be used (i.e., when the port is not specified).
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -consoleLog (Runtime)
-        </option></term>
-        <listitem>
-        <para>Any log output is also sent to Java's
-            System.out (typically back to the command shell if any). Handy when
-            combined with <command>-debug</command>.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>eclipse.consoleLog</emphasis> to
-            "true".
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -data <location> (OSGi)<literallayout></literallayout>
-        </option></term>
-        <listitem>
-        <para>The instance data location for this session. Plug-ins use this
-            location to store their data. For example, the Resources plug-in
-            uses this as the default location for projects (aka the workspace).
-            See the On-line Help for details (SEE ALSO below).
-        </para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.instance.area</emphasis> to
-            <location>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -debug [options file] (OSGi)
-        </option></term>
-        <listitem>
-        <para>Put the platform in debug mode. If [options file] is given, it is interpreted as the location of the
-            <filename>.options</filename> file. This file indicates what debug points are available
-            for a plug-in and whether or not they are enabled. If a location is
-            not specified, the platform searches for the<filename> .options</filename> file under
-            the install directory.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.debug</emphasis> to
-            [options file] or the empty string to simply enable debug (i.e., if
-            the options file location is not specified).
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -dev [entries] (OSGi)
-        </option></term>
-        <listitem>
-        <para>Turn on dev mode. If given, [entries] should be a comma-separated class path entries
-            which are added to the class path of each plug-in or a URL to a
-            Java properties file containing custom classpath additions for a
-            set of plug-ins. For each plug-in requiring a customized dev time
-            classpath the file will contain an entry of the
-            form.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.dev</emphasis> to
-            [entries] or the empty string to simply enable dev mode (i.e., if
-            entries are not specified).
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -eclipse.keyring <file path> (Equinox)
-        </option></term>
-        <listitem>
-          <para>
-            Set to override location of the default secure storage.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -eclipse.password <file path> (Equinox)
-        </option></term>
-        <listitem>
-          <para>
-            If specified, the secure storage treats contents of the file as a
-            default password. When not set, password providers are used to
-            obtain a password.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -feature <feature id> (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            Set the identifier of the product being run. This controls various
-            branding information and what application is used.
-          </para>
-           <para>
-            This is equivalent to setting the property <emphasis>eclipse.product</emphasis> to <feature
-            id>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -framework <location> (Main)
-        </option></term>
-        <listitem>
-        <para>
-            Set the URL location of the OSGi framework. Useful if the <command>Eclipse</command>
-            install is disjoint. See the On-line Help for details (SEE ALSO below).</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.framework</emphasis> to
-            <location>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -initialize (Main)
-        </option></term>
-        <listitem>
-          <para>
-            Initializes the configuration being run. All runtime related data
-            structures and caches are refreshed. Any user/plug-in defined
-            configuration data is not purged. No application is run, any
-            product specifications are ignored and no UI is presented (e.g.,
-            the splash screen is not drawn).
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -install <location> (Main)
-        </option></term>
-        <listitem>
-        <para>Set the install location of the platform. This option indicates the
-            location of the basic <command>Eclipse</command> plug-ins and is useful if the <command>Eclipse</command>
-            install is disjoint.</para>
-          <para>
-            This is equivalent to setting the property <emphasis>osgi.install.area</emphasis> to
-            <location>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -keyring <location> (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            The location of the authorization database on disk. This argument
-            has to be used together with the <command>-password</command> argument.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          --launcher.library <location> (Executable)
-        </option></term>
-        <listitem>
-          <para>
-            The location of the <command>eclipse</command> executable's companion shared
-            library. If not specified the executable looks in the plugins
-            directory for the appropriate
-            <emphasis>org.eclipse.equinox.launcher.[platform] fragment</emphasis> with the highest
-            version and uses the shared library named <filename>eclipse_*</filename> inside.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          --launcher.ini <location> (Executable)
-        </option></term>
-        <listitem>
-          <para>
-            The location of the product .ini file to use. If not
-            specified the executable will look for a file beside the launcher
-            with the same name and the extension <filename>.ini</filename>. (ie., <filename>/usr/bin/eclipse</filename>
-            looks for <filename>eclipse.ini</filename>, <filename>/opt/product</filename> looks for
-            <filename>product.ini</filename>).
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          --launcher.suppressErrors (Executable)
-        </option></term>
-        <listitem>
-          <para>
-            If specified the executable will not display any error or message
-            dialogs. This is useful if the executable is being used in an
-            unattended situation.
-          </para>
-        </listitem>
-      </varlistentry>
-     <varlistentry>
-        <term><option>
-          --launcher.XXMaxPermSize <value> (Executable)
-        </option></term>
-        <listitem>
-          <para>
-            If specified, and the executable detects that the VM being used is
-            a Sun VM, then the launcher will automatically add the
-            <option>-XX:MaxPermSize=<value></option> vm argument. The executable is
-            not capable of detecting Sun VMs on all
-            platforms.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -name <string>
-        </option></term>
-        <listitem>
-          <para>
-            The name to be displayed in task bar item when the application
-            starts up. When not set, the name is the name of the executable.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -nl <locale> (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            The name of the locale on which <command>Eclipse</command> platform will run. NL
-            values should follow the standard Java locale naming conventions.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>osgi.nl</emphasis> to
-            <locale>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -noExit (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            Disable automatic termination of the VM after the <command>eclipse</command>
-            application has ended. This is useful for examining the OSGi
-            framework after the <command>eclipse</command> application has ended.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>osgi.noShutdown</emphasis> to
-            "true".
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -noLazyRegistryCacheLoading (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            Deactivate the platform's plug-in registry cache loading
-            optimization. By default, configuration elements are
-            loaded from the registry cache (when available) only on demand,
-            reducing memory footprint. This option forces the registry cache to
-            be fully loaded at startup.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>eclipse.noLazyRegistryCacheLoading</emphasis>
-            to "true".
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -noRegistryCache (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            The internal extension registry cache will
-            neither be read nor written.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>eclipse.noRegistryCache</emphasis>
-            to "true".
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -noSplash (Executable, Main)
-        </option></term>
-        <listitem>
-          <para>
-            Controls whether or not the splash screen is shown.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -os <operating system> (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            The operating system value. The value should be one of the <command>Eclipse</command>
-            processor architecture names known to <command>Eclipse</command> (e.g., x86, sparc,
-            ...).
-          </para>          <para>
-            This is equivalent to setting the property
-            <emphasis>osgi.os</emphasis> to
-            <operating system>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -password <password> (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            The password for the authorization database.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -pluginCustomization <location> (Runtime)
-        </option></term>
-        <listitem>
-          <para>
-            The file system location of a properties file containing default
-            settings for plug-in preferences. These default settings override
-            default settings specified in the primary feature. Relative paths
-            are interpreted relative to the current working directory for
-            <command>eclipse</command> itself.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>eclipse.pluginCustomization</emphasis>
-            to <location>
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -product <id> (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            The identifier of the product being run. This controls various
-            branding information and what application is used.
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>eclipse.product</emphasis> to <id>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -showSplash <bitmap> (Executable, Main)
-        </option></term>
-        <listitem>
-          <para>
-            Specifies the bitmap to use in the splash screen. If specified, the
-            launcher may be able to show the splash screen before starting the
-            Java VM. If not specified, Main will find the bitmap using
-            the <emphasis>osgi.splashLocation</emphasis> and <emphasis>osgi.splashPath</emphasis>
-            properties.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -startup <location> (Executable)
-        </option></term>
-        <listitem>
-          <para>
-            The location of jar used to startup <command>eclipse</command>. The jar referred to
-            should have the <emphasis>Main-Class</emphasis> attribute set to
-            <emphasis>org.eclipse.equinox.launcher.Main</emphasis>. If this parameter is not set,
-            the executable will look in the plugins directory for
-            the <emphasis>org.eclipse.equinox.launcher bundle</emphasis> with the highest
-            version.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -user <location> (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            Set the location of the user area. The user area contains data (e.g.,
-            preferences) specific to the OS user and independent of any <command>Eclipse</command>
-            install, configuration or instance. See the On-line Help for details (SEE ALSO below).
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>osgi.user.area</emphasis> to
-            <location>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -vm <path to java vm> (Executable, Main)
-        </option></term>
-        <listitem>
-          <para>
-            When passed to the <command>Eclipse</command> executable, this option is used to
-            locate the Java VM to use to run <command>Eclipse</command>. It should be the full
-            file system path to an appropriate: Java<filename> jre/bin</filename> directory, Java
-            Executable, Java shared library (<filename>libjvm.so</filename>), or a Java
-            VM Execution Environment description file. If not specified,
-            the <command>Eclipse</command> executable uses a search algorithm to locate a suitable
-            VM. In any event, the executable then passes the path to the actual
-            VM used to Java Main using the <command>-vm</command> argument. Java Main then stores
-            this value in <emphasis>eclipse.vm</emphasis>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -vmargs [vmargs*] (Executable, Main)
-        </option></term>
-        <listitem>
-          <para>
-            when passed to the <command>Eclipse</command>, this option is used to customize the
-            operation of the Java VM to use to run <command>Eclipse</command>. If specified, this
-            option must come at the end of the command line. Even if not
-            specified on the executable command line, the executable will
-            automatically add the relevant arguments (including the class being
-            launched) to the command line passed into Java using the <command>-vmargs</command>
-            argument. Java Main then stores this value in
-            <emphasis>eclipse.vmargs</emphasis>.
-          </para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><option>
-          -ws <window system> (OSGi)
-        </option></term>
-        <listitem>
-          <para>
-            Set the window system value. The value should be one of the <command>Eclipse</command>
-            window system names known to <command>Eclipse</command> (e.g., win32, motif, ...).
-          </para>
-          <para>
-            This is equivalent to setting the property
-            <emphasis>osgi.ws</emphasis> to
-            <window system>.
-          </para>
-        </listitem>
-      </varlistentry>
-
-  </variablelist>
-</refsect1>
-
-<refsect1 id='see_also'><title>SEE ALSO</title>
-<para><citerefentry><refentrytitle>java</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-<citerefentry><refentrytitle>ecj</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
-<para><command>Eclipse</command> On-line Help <ulink url='http://help.eclipse.org/'>http://help.eclipse.org/</ulink>
-<glossterm>Platform Plug-in Developer Guide</glossterm> > <glossterm>Reference</glossterm> > <glossterm>Other reference information</glossterm>  >
-<glossterm>Runtime Options</glossterm>.</para>
-
-</refsect1>
-
-<refsect1 id='files'><title>FILES</title>
-<para>The system wide config.ini file is <filename>/etc/eclipse.ini</filename>. User level Configuration file is
-<filename>$HOME/.eclipse/org.eclipse.platform_<version>_<id>/configuration/config.ini</filename>.</para>
-</refsect1>
-
-<refsect1 XrefLabel="AUTHORS" id="authors"><title>AUTHORS</title>
-<para>
-The <command>Eclipse</command> Project was originally created by IBM in November 2001 and
-supported by a consortium of software vendors. The <command>Eclipse</command> Foundation was
-created in January 2004 as an independent not-for-profit corporation to act as the steward of the
-<command>Eclipse</command> community.
-</para>
-<para>This manual page was semi-automatically transformed from the
-Runtime Options HTML help using <command>pandoc</command> and
-<command>docbook2x-man</command> by Pablo Duboue <pablo.duboue at gmail.com>.</para>
-
-</refsect1>
-</refentry>
diff --git a/eclipse/directory.txt b/eclipse/directory.txt
index f442ca7..bc08b3c 100644
--- a/eclipse/directory.txt
+++ b/eclipse/directory.txt
@@ -1,475 +1,495 @@
 !***************  ANT CONTRIBUTION  ******************************************************** 
 
 #plugin at org.apache.ant=v20070416,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ant.core=v20091110_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.core=v20110203_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.launching=v20101020_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ant.ui=v20091204_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.ui=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.externaltools=v20090504,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.externaltools=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.externaltools=v20100831_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ant.tests.core=v20091110_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ant.tests.ui=v20090504,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-! map file used as input to custom Ant task <fetch.base> implemented in org.eclipse.releng.basebuilder.
-! Generates a fetch script which populates a baseLocation with prebuilt plug-ins or features.
-
-#base.plugin at com.ibm.icu=v20070123,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu_3.6.0.20061215.jar
-#base.plugin at com.ibm.icu.source=v20070123,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.source_3.6.0.20061215
-
-#base.plugin at com.ibm.icu.base=v20070123,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.base_3.6.0.20061215.jar
-#base.plugin at com.ibm.icu.base.source=v20070123,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.base.source_3.6.0.20061215
+plugin at org.eclipse.ant.tests.core=v20091214,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.tests.ui=v20100602-1000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  COMPARE CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.compare=r35x_20100113-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare
-plugin at org.eclipse.compare.core=I20090430-0408,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.core
-plugin at org.eclipse.compare.win32=I20090430-0408,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.win32
+plugin at org.eclipse.compare=R36x_v20100929-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare
+plugin at org.eclipse.compare.core=R36x_v20100929-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.core
+plugin at org.eclipse.compare.win32=R36x_v20101103-0618,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.win32
 
-plugin at org.eclipse.compare.examples=v20060606,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.compare.examples.xml=I20080604,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.compare.examples=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.compare.examples.xml=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.compare.tests=I20090527-0620,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.compare.tests=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  CORE (HP-UX) CONTRIBUTION  ************************************************ 
 
-fragment at org.eclipse.core.filesystem.hpux.ia64_32=v20080604-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.hpux.PA_RISC=v20080604-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.hpux.ia64_32=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  CORE (MacOSX) CONTRIBUTION  ************************************************ 
 
-fragment at org.eclipse.core.filesystem.macosx=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-!***************  CORE (QNX) CONTRIBUTION  *************************************************** 
-
-fragment at org.eclipse.core.filesystem.qnx.x86=v20080604-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.macosx=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  CORE VARIABLES CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.core.variables=v20090521,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.variables=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  CORE CONTRIBUTION  ******************************************************** 
 
 !**** OSGi
-plugin at org.eclipse.osgi=R35x_v20100126,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi
-plugin at org.eclipse.osgi.services=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.services
-plugin at org.eclipse.osgi.util=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.util
+plugin at org.eclipse.osgi=R36x_v20110210,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi
+plugin at org.eclipse.osgi.services=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.services
+plugin at org.eclipse.osgi.util=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.util
 
 !**** Equinox
-plugin at org.eclipse.equinox.common=R35x_v20090807-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.common
-plugin at org.eclipse.equinox.preferences=R35x_v20091117,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences
-plugin at org.eclipse.equinox.registry=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry
-plugin at org.eclipse.equinox.supplement=v20090518,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi/supplement
-plugin at org.eclipse.equinox.app=R35x_v20091203,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app
-plugin at org.eclipse.equinox.device=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.device
-plugin at org.eclipse.equinox.event=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.event
-plugin at org.eclipse.equinox.http=R35x_v20090728,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http
-plugin at org.eclipse.equinox.log=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.log
-plugin at org.eclipse.equinox.metatype=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.metatype
-plugin at org.eclipse.equinox.useradmin=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.useradmin
-plugin at org.eclipse.equinox.http.jetty,2.0.0=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6
-plugin at org.eclipse.equinox.http.jetty,1.1.100=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty5
-plugin at org.eclipse.equinox.http.servlet=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet
-plugin at org.eclipse.equinox.http.servletbridge=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge
-plugin at org.eclipse.equinox.http.registry=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.registry
-plugin at org.eclipse.equinox.servletbridge=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge
-bundle at org.eclipse.equinox.jsp.jasper=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper
-bundle at org.eclipse.equinox.jsp.jasper.registry=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper.registry
-plugin at org.eclipse.equinox.cm=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm
-plugin at org.eclipse.equinox.concurrent=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent
+plugin at org.eclipse.equinox.common=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.common
+plugin at org.eclipse.equinox.preferences=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences
+plugin at org.eclipse.equinox.registry=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry
+plugin at org.eclipse.equinox.supplement=R36x_v20101021,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi/supplement
+plugin at org.eclipse.equinox.app=R36x_v20100803,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app
+plugin at org.eclipse.equinox.device=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.device
+plugin at org.eclipse.equinox.event=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.event
+plugin at org.eclipse.equinox.http=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http
+plugin at org.eclipse.equinox.log=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.log
+plugin at org.eclipse.equinox.metatype=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.metatype
+plugin at org.eclipse.equinox.useradmin=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.useradmin
+plugin at org.eclipse.equinox.http.jetty,2.0.0=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6
+plugin at org.eclipse.equinox.http.jetty,1.1.100=v20100519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty5
+plugin at org.eclipse.equinox.http.servlet=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet
+plugin at org.eclipse.equinox.http.servletbridge=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge
+plugin at org.eclipse.equinox.http.registry=R36x_v20101103,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.registry
+plugin at org.eclipse.equinox.servletbridge=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge
+fragment at org.eclipse.equinox.servletbridge.extensionbundle=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge.extensionbundle
+bundle at org.eclipse.equinox.jsp.jasper=R36x_v20101103,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper
+bundle at org.eclipse.equinox.jsp.jasper.registry=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper.registry
+plugin at org.eclipse.equinox.cm=v20100520,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm
+plugin at org.eclipse.equinox.concurrent=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent
 
 !**** Prosyst Contributions
-plugin at org.eclipse.equinox.ds=R35x_v20090806,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds
-plugin at org.eclipse.equinox.io=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.io
-plugin at org.eclipse.equinox.ip=R35x_v20090803,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ip
-plugin at org.eclipse.equinox.util=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util
-plugin at org.eclipse.equinox.wireadmin=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.wireadmin
+plugin at org.eclipse.equinox.ds=R36x_v20100803,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds
+plugin at org.eclipse.equinox.io=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.io
+plugin at org.eclipse.equinox.ip=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ip
+plugin at org.eclipse.equinox.util=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util
+plugin at org.eclipse.equinox.wireadmin=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.wireadmin
 
 !**** Security Contributions
-plugin at org.eclipse.equinox.security=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security
+plugin at org.eclipse.equinox.security=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security
 plugin at org.eclipse.equinox.security.tests=v20080722-0430,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.tests
-plugin at org.eclipse.equinox.security.ui=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.ui
-fragment at org.eclipse.equinox.security.win32.x86=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.win32.x86
-fragment at org.eclipse.equinox.security.macosx=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.macosx
+plugin at org.eclipse.equinox.security.ui=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.ui
+fragment at org.eclipse.equinox.security.win32.x86=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.win32.x86
+fragment at org.eclipse.equinox.security.macosx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.macosx
+
 !**** Transforms
-plugin at org.eclipse.equinox.transforms.xslt=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.xslt
-fragment at org.eclipse.equinox.transforms.hook=v20090520-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.hook
+plugin at org.eclipse.equinox.transforms.xslt=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.xslt
+fragment at org.eclipse.equinox.transforms.hook=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.hook
 
+!**** Weaving
+plugin at org.eclipse.equinox.weaving.aspectj=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.aspectj
+plugin at org.eclipse.equinox.weaving.caching=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching
+plugin at org.eclipse.equinox.weaving.caching.j9=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching.j9
+fragment at org.eclipse.equinox.weaving.hook=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.hook
 
 !****launcher, startup.jar
-plugin at org.eclipse.equinox.launcher=R35x_v20090715,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher
-fragment at org.eclipse.equinox.launcher.win32.win32.x86=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86
-fragment at org.eclipse.equinox.launcher.win32.win32.x86_64=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64
-fragment at org.eclipse.equinox.launcher.win32.win32.ia64=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64
-fragment at org.eclipse.equinox.launcher.wpf.win32.x86=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86
-fragment at org.eclipse.equinox.launcher.carbon.macosx=v20090520-1835,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx
-fragment at org.eclipse.equinox.launcher.cocoa.macosx=R35x_v20090707,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx
-fragment at org.eclipse.equinox.launcher.cocoa.macosx.x86_64=R35x_v20090707,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64
-fragment at org.eclipse.equinox.launcher.gtk.linux.x86=v20090520,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86
-fragment at org.eclipse.equinox.launcher.gtk.linux.x86_64=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64
-fragment at org.eclipse.equinox.launcher.gtk.linux.ppc=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc
-fragment at org.eclipse.equinox.launcher.motif.hpux.PA_RISC=v20090306-1900,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC
-fragment at org.eclipse.equinox.launcher.motif.hpux.ia64_32=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32
-fragment at org.eclipse.equinox.launcher.motif.aix.ppc=R35x_v20091211,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc
-fragment at org.eclipse.equinox.launcher.motif.linux.x86=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86
-fragment at org.eclipse.equinox.launcher.gtk.solaris.sparc=R35x_v20090720,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc
+plugin at org.eclipse.equinox.launcher=R36x_v20101122_1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher
+fragment at org.eclipse.equinox.launcher.win32.win32.x86=R36x_v20101222,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86
+fragment at org.eclipse.equinox.launcher.win32.win32.x86_64=R36x_v20101222,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64
+fragment at org.eclipse.equinox.launcher.win32.win32.ia64=R36x_v20101222,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64
+fragment at org.eclipse.equinox.launcher.wpf.win32.x86=R36x_v20101222,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86
+fragment at org.eclipse.equinox.launcher.carbon.macosx=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx
+fragment at org.eclipse.equinox.launcher.cocoa.macosx=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx
+fragment at org.eclipse.equinox.launcher.cocoa.macosx.x86_64=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64
+fragment at org.eclipse.equinox.launcher.gtk.linux.x86=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86
+fragment at org.eclipse.equinox.launcher.gtk.linux.x86_64=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64
+fragment at org.eclipse.equinox.launcher.gtk.linux.ppc=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc
+fragment at org.eclipse.equinox.launcher.gtk.linux.ppc64=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64
+fragment at org.eclipse.equinox.launcher.gtk.aix.ppc64=R36x_v20101102,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64
+fragment at org.eclipse.equinox.launcher.motif.hpux.ia64_32=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32
+fragment at org.eclipse.equinox.launcher.motif.aix.ppc=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc
+fragment at org.eclipse.equinox.launcher.motif.linux.x86=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86
+fragment at org.eclipse.equinox.launcher.gtk.solaris.sparc=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc
+plugin at org.eclipse.equinox.launcher.releng=R36x_v20101019,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/releng/org.eclipse.equinox.launcher.releng
 
 !****contributed fragments
-fragment at org.eclipse.equinox.launcher.gtk.linux.s390=v20090426-1530,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390
-fragment at org.eclipse.equinox.launcher.gtk.linux.s390x=v20090426-1530,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x
-fragment at org.eclipse.equinox.launcher.gtk.solaris.x86=R35x_v20090720,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86
-fragment at org.eclipse.equinox.launcher.motif.solaris.sparc=R35x_20090929,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc
+fragment at org.eclipse.equinox.launcher.gtk.linux.s390=R36x_v20110125,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390
+fragment at org.eclipse.equinox.launcher.gtk.linux.s390x=R36x_v20110125,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x
+fragment at org.eclipse.equinox.launcher.gtk.solaris.x86=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86
+fragment at org.eclipse.equinox.launcher.motif.solaris.sparc=R36x_v20101019_1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc
 
-feature at org.eclipse.equinox.executable=R35x_v20091211,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable
+feature at org.eclipse.equinox.executable=R36x_v20110125,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable
 
 !**** Runtime
-plugin at org.eclipse.core.runtime=v20090525,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.contenttype=R35x_v20090826-0451,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.jobs=v20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.contenttype=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.jobs=R36x_v20100824,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Expressions
-plugin at org.eclipse.core.expressions=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.expressions.tests=v20090324-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.expressions=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.expressions.tests=v20091203,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Resources
-plugin at org.eclipse.core.resources=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.win32=v20080508,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.win32.x86=v20081020,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.resources=R36x_v20110131-1630,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.win32=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.win32.x86=v20100505-1345,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.core.resources.win32.ia64=v20081020,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.compatibility=R35x_v20100113-0530,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.compatibility=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** File System
-plugin at org.eclipse.core.filesystem=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.x86=v20080604-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.x86_64=v20090316-0910,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.ia64=v20071121,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.x86=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.x86_64=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.ppc=v20080604-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.solaris.sparc=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.aix.ppc=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc
+plugin at org.eclipse.core.filesystem=R36x_v20100727-0745,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.x86=R36x_v20100727-0745,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.x86_64=R36x_v20100727-0745,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.ia64=R36x_v20100727-0745,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.x86=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.x86_64=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.ppc=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.solaris.sparc=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.aix.ppc=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc
 
 !**** Legacy Runtime
-plugin at org.eclipse.core.boot=v20080218,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.runtime.compatibility=v20090413,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.runtime.compatibility.auth=v20090413,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.runtime.compatibility.registry=v20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.boot=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime.compatibility=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime.compatibility.auth=v20100517,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.runtime.compatibility.registry=v20100520,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Other Core Code
-plugin at org.eclipse.pde.build=R35x_20100114,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build
-plugin at org.eclipse.pde.build.tests=R35x_20091105,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build.tests
+plugin at org.eclipse.pde.build=R36x_20110203,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build
+plugin at org.eclipse.pde.build.tests=R36x_v20110111,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build.tests
 feature at org.eclipse.pde.builder=v20040624a,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build/feature
 
 !**** Test Suites
-plugin at org.eclipse.core.tests.harness=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.resources=R35x_v20091203-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.runtime=R35x_v20090807-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.osgi.tests=R35x_v20100126,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi.tests
+plugin at org.eclipse.core.tests.harness=v20100505-1235,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.resources=R36x_v20110131-1630,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.runtime=R36x_v20101213,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.osgi.tests=R36x_v20101103,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi.tests
 !***************  DOC CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.platform.doc.user=r352_v20091111-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.platform.doc.isv=r352_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.platform.doc.user=r362_v20101117-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.platform.doc.isv=r362_v20110111,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.doc.user=r352_v20091015,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.doc.isv=r351_v20090831,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.doc.user=r361_v20100721-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.doc.isv=r362_v20101117-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.pde.doc.user=v20090818,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/doc/org.eclipse.pde.doc.user
+plugin at org.eclipse.pde.doc.user=v20101118_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/doc/org.eclipse.pde.doc.user
 !***************  Equinox Incubator Contribution ***************************
 
 !**** Initializer bundle
-bundle at org.eclipse.equinox.initializer=v20071015,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/framework/bundles/org.eclipse.equinox.initializer
+bundle at org.eclipse.equinox.initializer=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/framework/bundles/org.eclipse.equinox.initializer
 
 !**** Resource Monitoring ****
 
 !** Client **
-plugin at org.eclipse.equinox.jmx.client=v20070515,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client
-plugin at org.eclipse.equinox.jmx.client.rmi=v20080610-1530,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.rmi
-plugin at org.eclipse.equinox.jmx.client.xmlrpc=v20070515,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.xmlrpc
+plugin at org.eclipse.equinox.jmx.client=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client
+plugin at org.eclipse.equinox.jmx.client.rmi=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.rmi
+plugin at org.eclipse.equinox.jmx.client.xmlrpc=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.xmlrpc
 feature at org.eclipse.equinox.jmx.client.feature=v20081124,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.feature
 
 !** Common **
-plugin at org.eclipse.equinox.jmx.common=R35x_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common
+plugin at org.eclipse.equinox.jmx.common=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common
 feature at org.eclipse.equinox.jmx.common.feature=v20070507,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common.feature
 
 !** Server **
-plugin at org.eclipse.equinox.jmx.server=v20071015,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server
-plugin at org.eclipse.equinox.jmx.server.rmi=v20070510,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.rmi
-plugin at org.eclipse.equinox.jmx.server.xmlrpc=v20070608,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.xmlrpc
-plugin at org.eclipse.equinox.jmx.vm=v20070515,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.vm
-plugin at org.eclipse.equinox.preferences.jmx=v20070510,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.preferences.jmx
-plugin at org.eclipse.equinox.registry.jmx=v20080610-1530,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.registry.jmx
-plugin at org.eclipse.osgi.jmx=v20080610-1530,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.osgi.jmx
-plugin at org.eclipse.swt.jmx=v20090331,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.swt.jmx
-plugin at org.eclipse.core.resources.jmx=v20070510,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.core.resources.jmx
+plugin at org.eclipse.equinox.jmx.server=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server
+plugin at org.eclipse.equinox.jmx.server.rmi=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.rmi
+plugin at org.eclipse.equinox.jmx.server.xmlrpc=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.xmlrpc
+plugin at org.eclipse.equinox.jmx.vm=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.vm
+plugin at org.eclipse.equinox.preferences.jmx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.preferences.jmx
+plugin at org.eclipse.equinox.registry.jmx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.registry.jmx
+plugin at org.eclipse.osgi.jmx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.osgi.jmx
+plugin at org.eclipse.swt.jmx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.swt.jmx
+plugin at org.eclipse.core.resources.jmx=v20100503,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.core.resources.jmx
 feature at org.eclipse.equinox.jmx.server.feature=v20081124,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.feature
 !***************  FEATURE CONTRIBUTION  ******************************************************
-feature at org.eclipse.sdk=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.sdk
-plugin at org.eclipse.sdk=R35x_v20100204,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.jdt=r352_v20100108,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.jdt-feature
-feature at org.eclipse.jdt.sdk=v20080507,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.jdt.sdk
-
-feature at org.eclipse.pde=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.pde-feature
-feature at org.eclipse.pde.sdk=v20080313a,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.sdk
-feature at org.eclipse.pde.api.tools.ee.cdcfoundation10_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10-feature
-feature at org.eclipse.pde.api.tools.ee.cdcfoundation11_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11-feature
-feature at org.eclipse.pde.api.tools.ee.j2se12_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12-feature
-feature at org.eclipse.pde.api.tools.ee.j2se13_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13-feature
-feature at org.eclipse.pde.api.tools.ee.j2se14_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14-feature
-feature at org.eclipse.pde.api.tools.ee.j2se15_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15-feature
-feature at org.eclipse.pde.api.tools.ee.javase16_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16-feature
-feature at org.eclipse.pde.api.tools.ee.jre11_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum10_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum11_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum12_feature=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12-feature
-
-feature at org.eclipse.platform=R35x_v20100210-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.platform-feature
-feature at org.eclipse.platform.sdk=v20080314,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.platform.sdk
-
-plugin at org.eclipse.platform=R35x_v20100121,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.sdk.examples=v20080717,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.examples-feature
-plugin at org.eclipse.sdk.examples=v20080612,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.sdk.tests=v20090227,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/features/org.eclipse.sdk.tests
+feature at org.eclipse.sdk=r362_v20100929,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.sdk
+plugin at org.eclipse.sdk=r362_v20110202,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.jdt=r362_v20101117-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.jdt-feature
+
+feature at org.eclipse.pde=r362_v20110203,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.pde-feature
+feature at org.eclipse.pde.api.tools.ee.cdcfoundation10_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10-feature
+feature at org.eclipse.pde.api.tools.ee.cdcfoundation11_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11-feature
+feature at org.eclipse.pde.api.tools.ee.j2se12_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12-feature
+feature at org.eclipse.pde.api.tools.ee.j2se13_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13-feature
+feature at org.eclipse.pde.api.tools.ee.j2se14_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14-feature
+feature at org.eclipse.pde.api.tools.ee.j2se15_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15-feature
+feature at org.eclipse.pde.api.tools.ee.javase16_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16-feature
+feature at org.eclipse.pde.api.tools.ee.jre11_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum10_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum11_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum12_feature=v20091027-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12-feature
+
+feature at org.eclipse.platform=r362_v20110210,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.platform-feature
+plugin at org.eclipse.platform=r362_v20110120,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.sdk.examples=r362_v20101014,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.examples-feature
+plugin at org.eclipse.sdk.examples=v20100527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.sdk.tests=r361_v20100714-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/features/org.eclipse.sdk.tests
 plugin at org.eclipse.sdk.tests=v20060605,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-feature at org.eclipse.equinox=v20090407,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox
-feature at org.eclipse.equinox.sdk=r352_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox.sdk
+feature at org.eclipse.equinox.sdk=r362_v20110210b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox.sdk
+
+feature at org.eclipse.cvs=r362_v20101111,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.cvs-feature
+plugin at org.eclipse.cvs=v20100414,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.cvs
+
+feature at org.eclipse.help=r362_v20101111,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help-feature
 
-feature at org.eclipse.cvs=R35x_v20100125,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.cvs-feature
-feature at org.eclipse.cvs.sdk=v20080507,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.cvs.sdk
-plugin at org.eclipse.cvs=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.cvs
+feature at org.eclipse.equinox.p2.user.ui=r361_v20100903,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui
 
-feature at org.eclipse.help=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help-feature
-feature at org.eclipse.help.sdk=v20080314,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help.sdk
+feature at org.eclipse.equinox.p2.sdk=CVS,tag=R36x_v20110120,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.sdk
+feature at org.eclipse.equinox.p2.discovery.feature=CVS,tag=R36x_v20110210,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.discovery.feature
+feature at org.eclipse.equinox.core.sdk=CVS,tag=r36x_v20110210,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/framework/features/org.eclipse.equinox.core.sdk
+feature at org.eclipse.equinox.compendium.sdk=CVS,tag=R36x_v20101014,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/compendium/features/org.eclipse.equinox.compendium.sdk
 
-feature at org.eclipse.equinox.p2.user.ui=R35x_v20091106,:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui
-feature at org.eclipse.equinox.p2.agent.feature=CVS,tag=R35x_v20090811,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature
-feature at org.eclipse.equinox.p2.generator.feature=CVS,tag=R35x_v20090811,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature
-feature at org.eclipse.equinox.p2.director.feature=CVS,tag=R35x_v20090811,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature
+feature at org.eclipse.equinox.serverside.sdk=CVS,tag=R36x_v20101014,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.serverside.sdk
+feature at org.eclipse.equinox.server.core=CVS,tag=R36x_v20101007,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.core
+feature at org.eclipse.equinox.server.jetty=CVS,tag=v20100510,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.jetty
+feature at org.eclipse.equinox.server.p2=CVS,tag=R36x_v20101007,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.p2
+feature at org.eclipse.equinox.server.servletbridge=CVS,tag=v20100510,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.servletbridge
+feature at org.eclipse.equinox.server.simple=CVS,tag=v20100510,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.simple
 
-feature at org.eclipse.equinox.p2.sdk=CVS,tag=R35x_v20090811,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.sdk
-feature at org.eclipse.equinox.core.sdk=CVS,tag=R35x_v20100105,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/framework/features/org.eclipse.equinox.core.sdk
-feature at org.eclipse.equinox.compendium.sdk=CVS,tag=R35x_v20100105,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/compendium/features/org.eclipse.equinox.compendium.sdk
-feature at org.eclipse.equinox.serverside.sdk=CVS,tag=v20090505,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.serverside.sdk
+feature at org.eclipse.equinox.weaving.sdk=CVS,tag=v20100421,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/weaving/features/org.eclipse.equinox.weaving.sdk
 
-feature at org.eclipse.pde.api.tools.ee.fragments=v20090512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.api.tools.ee.fragments
+feature at org.eclipse.pde.api.tools.ee.fragments=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.api.tools.ee.fragments
 
-!***************  JDT APT CONTRIBUTION  [R3_5_maintenance] *******************************************
+!***************  JDT APT CONTRIBUTION *******************************************
 
-plugin at org.eclipse.jdt.apt.core=R35x_v20091130-2300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.ui=v20090930-2100_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.tests=R35x_v20091130-2300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.jdt.compiler.apt=R35x_v20090925-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.compiler.apt.tests=R35x_v20090925-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.pluggable.core=R35x_v20090925-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.pluggable.tests=R35x_v20090925-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.core=R36_v20110120-1000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.ui=v20100513-0845,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.tests=R36x_v20100707-0100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.jdt.compiler.apt=v20100513-0845,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.compiler.apt.tests=v20100513-0845,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.pluggable.core=R36_v20100727-0110,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.pluggable.tests=v20100513-0845,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-!***************  JDT CORE CONTRIBUTION  [20100211-0800] ******************************************* 
+!*********************************** JDT CORE CONTRIBUTION ******************************************* 
 
-plugin at org.eclipse.jdt.core=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.jdt.compiler.tool=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.jdt.compiler.tool=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.core.tests.builder=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.compiler=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.model=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.performance=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.compiler.tool.tests=v_981_R35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.builder=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.compiler=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.model=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.performance=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.compiler.tool.tests=v_A76_R36x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  DEBUG CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.debug.core=v20091103_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.debug.ui=v20091028_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.debug=v20090526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.debug.ui=v20090811_r351,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching=v20100108_r352,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching.macosx=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching.ui.macosx=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.core=v20100519,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.ui=v20101201_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug=v20100715_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug.ui=v20100928a_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching=v20110105_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching.macosx=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching.ui.macosx=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.console=v20090513,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.console=v20100526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.debug.tests=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug.tests=v20100526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.tests=v20100624_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.debug.examples.core=v20090504,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.debug.examples.ui=v20090519,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.examples.core=v20100505,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.examples.ui=v20100526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  JDT UI CONTRIBUTION  ******************************************************** 
-plugin at org.eclipse.search=r351_v20090708-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.search.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.search=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.search.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ltk.core.refactoring=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.core.refactoring.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.ui.refactoring=r352_v20100209,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.ui.refactoring.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.core.refactoring=r362_v20101117-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.core.refactoring.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.ui.refactoring=v20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.ui.refactoring.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt=r352_v20100106-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt=r361_v20100714-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.core.manipulation=v20090603,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.manipulation=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.ui=r352_v20100106-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.examples.projects=v20090603,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.tests=v20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.tests.refactoring=r351_v20090708-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui=r362_v20110203,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui.tests=r361_v20100818-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui.tests.refactoring=v20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.junit=r352_v20100113-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.junit.runtime=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.junit4.runtime=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit=r361_v20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit.core=r361_v20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit.runtime=v20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit4.runtime=v20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.junit4=v20090824,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.junit4=v20100525,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  ORBIT CONTRIBUTION  ********************************************************
-plugin at com.ibm.icu,4.0.1=p2IU,id=com.ibm.icu,version=4.0.1.v20090822,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.base,4.0.1=p2IU,id=com.ibm.icu.base,version=4.0.1.v20090822,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.base.source,4.0.1=p2IU,id=com.ibm.icu.base.source,version=4.0.1.v20090822,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.source,4.0.1=p2IU,id=com.ibm.icu.source,version=4.0.1.v20090822,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.jcraft.jsch,0.1.41=p2IU,id=com.jcraft.jsch,version=0.1.41.v200903070017,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.jcraft.jsch.source,0.1.41=p2IU,id=com.jcraft.jsch.source,version=0.1.41.v200903070017,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.management,1.2.0=p2IU,id=javax.management,version=1.2.0.v200803061811,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.management.remote,1.0.0=p2IU,id=javax.management.remote,version=1.0.0.v200803061811,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet,2.4.0=p2IU,id=javax.servlet,version=2.4.0.v200806031604,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet,2.5.0=p2IU,id=javax.servlet,version=2.5.0.v200806031605,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.source,2.4.0=p2IU,id=javax.servlet.source,version=2.4.0.v200806031604,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.source,2.5.0=p2IU,id=javax.servlet.source,version=2.5.0.v200806031605,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.jsp,2.0.0=p2IU,id=javax.servlet.jsp,version=2.0.0.v200806031607,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v200803061811,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v200803061811,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20090120-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20090120-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20080530-1600,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20080530-1600,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v200806031608,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.el.source,1.0.0=p2IU,id=org.apache.commons.el.source,version=1.0.0.v200806031608,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.httpclient,3.1.0=p2IU,id=org.apache.commons.httpclient,version=3.1.0.v20080605-1935,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.httpclient.source,3.1.0=p2IU,id=org.apache.commons.httpclient.source,version=3.1.0.v20080605-1935,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.logging,1.0.4=p2IU,id=org.apache.commons.logging,version=1.0.4.v200904062259,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.logging.source,1.0.4=p2IU,id=org.apache.commons.logging.source,version=1.0.4.v200904062259,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.jasper,5.5.17=p2IU,id=org.apache.jasper,version=5.5.17.v200903231320,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.jasper.source,5.5.17=p2IU,id=org.apache.jasper.source,version=5.5.17.v200903231320,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene,1.9.1=p2IU,id=org.apache.lucene,version=1.9.1.v20080530-1600,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene.analysis,1.9.1=p2IU,id=org.apache.lucene.analysis,version=1.9.1.v20080530-1600,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene.analysis.source,1.9.1=p2IU,id=org.apache.lucene.analysis.source,version=1.9.1.v20080530-1600,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ws.commons.util,1.0.0=p2IU,id=org.apache.ws.commons.util,version=1.0.0.v20081204,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ws.jaxme,0.5.1=p2IU,id=org.apache.ws.jaxme,version=0.5.1.v20080530-1550,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.xmlrpc,3.0.0=p2IU,id=org.apache.xmlrpc,version=3.0.0.v20080530-1550,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.easymock,2.4.0=p2IU,id=org.easymock,version=2.4.0.v20090202-0900,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.easymock.source,2.4.0=p2IU,id=org.easymock.source,version=2.4.0.v20090202-0900,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.hamcrest.core,1.1.0=p2IU,id=org.hamcrest.core,version=1.1.0.v20090501071000,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.hamcrest.core.source,1.1.0=p2IU,id=org.hamcrest.core.source,version=1.1.0.v20090501071000,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.junit,3.8.2=p2IU,id=org.junit,version=3.8.2.v20090203-1005,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.junit.source,3.8.2=p2IU,id=org.junit.source,version=3.8.2.v20090203-1005,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty,5.1.14=p2IU,id=org.mortbay.jetty,version=5.1.14.v200806031611,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.source,5.1.14=p2IU,id=org.mortbay.jetty.source,version=5.1.14.v200806031611,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.server,6.1.15=p2IU,id=org.mortbay.jetty.server,version=6.1.15.v200905151201,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.server.source,6.1.15=p2IU,id=org.mortbay.jetty.server.source,version=6.1.15.v200905151201,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.util,6.1.15=p2IU,id=org.mortbay.jetty.util,version=6.1.15.v200905182336,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.util.source,6.1.15=p2IU,id=org.mortbay.jetty.util.source,version=6.1.15.v200905182336,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
+plugin at com.ibm.icu,4.2.1=p2IU,id=com.ibm.icu,version=4.2.1.v20100412,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.base,4.2.1=p2IU,id=com.ibm.icu.base,version=4.2.1.v20100412,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.base.source,4.2.1=p2IU,id=com.ibm.icu.base.source,version=4.2.1.v20100412,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.source,4.2.1=p2IU,id=com.ibm.icu.source,version=4.2.1.v20100412,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.jcraft.jsch,0.1.41=p2IU,id=com.jcraft.jsch,version=0.1.41.v200903070017,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.jcraft.jsch.source,0.1.41=p2IU,id=com.jcraft.jsch.source,version=0.1.41.v200903070017,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.management,1.2.0=p2IU,id=javax.management,version=1.2.0.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.management.remote,1.0.0=p2IU,id=javax.management.remote,version=1.0.0.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet,2.4.0=p2IU,id=javax.servlet,version=2.4.0.v200806031604,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet,2.5.0=p2IU,id=javax.servlet,version=2.5.0.v200910301333,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.source,2.4.0=p2IU,id=javax.servlet.source,version=2.4.0.v200806031604,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.source,2.5.0=p2IU,id=javax.servlet.source,version=2.5.0.v200910301333,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.jsp,2.0.0=p2IU,id=javax.servlet.jsp,version=2.0.0.v200806031607,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20100518-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20100518-1145,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v201004212143,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.el.source,1.0.0=p2IU,id=org.apache.commons.el.source,version=1.0.0.v201004212143,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.httpclient,3.1.0=p2IU,id=org.apache.commons.httpclient,version=3.1.0.v201005080502,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.httpclient.source,3.1.0=p2IU,id=org.apache.commons.httpclient.source,version=3.1.0.v201005080502,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.logging,1.0.4=p2IU,id=org.apache.commons.logging,version=1.0.4.v201005080501,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.logging.source,1.0.4=p2IU,id=org.apache.commons.logging.source,version=1.0.4.v201005080501,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.jasper,5.5.17=p2IU,id=org.apache.jasper,version=5.5.17.v201004212143,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.jasper.source,5.5.17=p2IU,id=org.apache.jasper.source,version=5.5.17.v201004212143,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene,1.9.1=p2IU,id=org.apache.lucene,version=1.9.1.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene.analysis,1.9.1=p2IU,id=org.apache.lucene.analysis,version=1.9.1.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene.analysis.source,1.9.1=p2IU,id=org.apache.lucene.analysis.source,version=1.9.1.v20100518-1140,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ws.commons.util,1.0.0=p2IU,id=org.apache.ws.commons.util,version=1.0.0.v20100518-1135,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ws.jaxme,0.5.1=p2IU,id=org.apache.ws.jaxme,version=0.5.1.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.xmlrpc,3.0.0=p2IU,id=org.apache.xmlrpc,version=3.0.0.v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.easymock,2.4.0=p2IU,id=org.easymock,version=2.4.0.v20090202-0900,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.easymock.source,2.4.0=p2IU,id=org.easymock.source,version=2.4.0.v20090202-0900,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.hamcrest.core,1.1.0=p2IU,id=org.hamcrest.core,version=1.1.0.v20090501071000,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.hamcrest.core.source,1.1.0=p2IU,id=org.hamcrest.core.source,version=1.1.0.v20090501071000,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit,3.8.2=p2IU,id=org.junit,version=3.8.2.v3_8_2_v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit.source,3.8.2=p2IU,id=org.junit.source,version=3.8.2.v3_8_2_v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit,4.8.1=p2IU,id=org.junit,version=4.8.1.v4_8_1_v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit.source,4.8.1=p2IU,id=org.junit.source,version=4.8.1.v4_8_1_v20100427-1100,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty,5.1.14=p2IU,id=org.mortbay.jetty,version=5.1.14.v200806031611,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.source,5.1.14=p2IU,id=org.mortbay.jetty.source,version=5.1.14.v200806031611,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.server,6.1.23=p2IU,id=org.mortbay.jetty.server,version=6.1.23.v201004211559,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.server.source,6.1.23=p2IU,id=org.mortbay.jetty.server.source,version=6.1.23.v201004211559,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.util,6.1.23=p2IU,id=org.mortbay.jetty.util,version=6.1.23.v201004211559,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.util.source,6.1.23=p2IU,id=org.mortbay.jetty.util.source,version=6.1.23.v201004211559,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
 
 # Bundles from Orbit for p2
-plugin at org.apache.xml.resolver,1.2.0=p2IU,id=org.apache.xml.resolver,version=1.2.0.v200902170519,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.xerces,2.8.0=p2IU,id=org.apache.xerces,version=2.8.0.v200803070308,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.sat4j.core,2.1.1=p2IU,id=org.sat4j.core,version=2.1.1.v20090825,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.sat4j.pb,2.1.1=p2IU,id=org.sat4j.pb,version=2.1.1.v20090825,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
+plugin at org.apache.xml.resolver,1.2.0=p2IU,id=org.apache.xml.resolver,version=1.2.0.v201005080400,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.xerces,2.8.0=p2IU,id=org.apache.xerces,version=2.8.0.v200803070308,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.sat4j.core,2.2.0=p2IU,id=org.sat4j.core,version=2.2.0.v20100429,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.sat4j.pb,2.2.0=p2IU,id=org.sat4j.pb,version=2.2.0.v20100429,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
 
 # Orbit bundles for API tooling
-plugin at org.objectweb.asm,3.1.0=p2IU,id=org.objectweb.asm,version=3.1.0.v200803061910,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.objectweb.asm.source,3.1.0=p2IU,id=org.objectweb.asm.source,version=3.1.0.v200803061910,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100114021427/updateSite
-
-plugin at org.eclipse.equinox.frameworkadmin=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin
-plugin at org.eclipse.equinox.frameworkadmin.equinox=CVS,tag=R35x_v20091214,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox
-plugin at org.eclipse.equinox.frameworkadmin.test=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test
-plugin at org.eclipse.equinox.p2.artifact.repository=CVS,tag=R35x_v20090721,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository
-plugin at org.eclipse.equinox.p2.console=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console
-plugin at org.eclipse.equinox.p2.core=CVS,tag=R35x_v20090819,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core
-plugin at org.eclipse.equinox.p2.director=CVS,tag=R35x_v20100112,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director
-plugin at org.eclipse.equinox.p2.director.app=CVS,tag=R35x_v20091106,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app
-plugin at org.eclipse.equinox.p2.directorywatcher=CVS,tag=v20090525,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher
-plugin at org.eclipse.equinox.p2.engine=CVS,tag=R35x_v20091117,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine
-plugin at org.eclipse.equinox.p2.exemplarysetup=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.exemplarysetup
-plugin at org.eclipse.equinox.p2.extensionlocation=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation
-plugin at org.eclipse.equinox.p2.garbagecollector=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector
-plugin at org.eclipse.equinox.p2.installer=CVS,tag=R35x_v20090717,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer
-plugin at org.eclipse.equinox.p2.jarprocessor=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor
-plugin at org.eclipse.equinox.p2.metadata=CVS,tag=R35x_v20100112,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata
-plugin at org.eclipse.equinox.p2.metadata.generator=CVS,tag=R35x_20100114,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator
-plugin at org.eclipse.equinox.p2.metadata.repository=CVS,tag=R35x_v20090812,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository
-plugin at org.eclipse.equinox.p2.publisher=CVS,tag=R35x_20100105,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher
-plugin at org.eclipse.equinox.p2.reconciler.dropins=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins
-plugin at org.eclipse.equinox.p2.repository=CVS,tag=R35x_v20100105,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository
-plugin at org.eclipse.equinox.p2.repository.tools=CVS,tag=R35x_20100111,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools
-plugin at org.eclipse.equinox.p2.selfhosting=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.selfhosting
-plugin at org.eclipse.equinox.p2.tools=CVS,tag=v20090525,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tools
-plugin at org.eclipse.equinox.p2.touchpoint.eclipse=CVS,tag=R35x_20090820-1821,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse
-plugin at org.eclipse.equinox.p2.touchpoint.natives=CVS,tag=R35x_v20090806,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives
-plugin at org.eclipse.equinox.p2.ui=CVS,tag=R35x_v20090819,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui
-plugin at org.eclipse.equinox.p2.ui.admin=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin
-plugin at org.eclipse.equinox.p2.ui.sdk=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk
-plugin at org.eclipse.equinox.p2.ui.sdk.scheduler=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
-plugin at org.eclipse.equinox.p2.ui.admin.rcp=CVS,tag=v20090820,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp
-plugin at org.eclipse.equinox.p2.updatechecker=CVS,tag=v20090520-1905,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker
-plugin at org.eclipse.equinox.p2.updatesite=CVS,tag=R35x_20100105,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite
-plugin at org.eclipse.equinox.simpleconfigurator=CVS,tag=R35x_v20090807-1100,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator
-plugin at org.eclipse.equinox.simpleconfigurator.manipulator=CVS,tag=R35x_v20100209,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator
-plugin at org.eclipse.equinox.p2.tests=CVS,tag=R35x_v20090903,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests
-plugin at org.eclipse.equinox.p2.tests.ui=CVS,tag=v20090527-1812,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui
+plugin at org.objectweb.asm,3.2.0=p2IU,id=org.objectweb.asm,version=3.2.0.v200909071300,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.objectweb.asm.source,3.2.0=p2IU,id=org.objectweb.asm.source,version=3.2.0.v200909071300,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/repository
+
+#aspectj plugins for equinox weaving plugins
+plugin at org.aspectj.weaver,1.6.7=p2IU,id=org.aspectj.weaver,version=1.6.7.20091231194938,repository=http://download.eclipse.org/tools/ajdt/aspectj/update																   
+plugin at org.aspectj.runtime,1.6.7=p2IU,id=org.aspectj.runtime,version=1.6.7.20091231194938,repository=http://download.eclipse.org/tools/ajdt/aspectj/update
+plugin at org.eclipse.equinox.frameworkadmin=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin
+plugin at org.eclipse.equinox.frameworkadmin.equinox=CVS,tag=v20100505,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox
+plugin at org.eclipse.equinox.frameworkadmin.test=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test
+plugin at org.eclipse.equinox.p2.artifact.repository=CVS,tag=R36x_v20100901,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository
+plugin at org.eclipse.equinox.p2.console=CVS,tag=v20100601,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console
+plugin at org.eclipse.equinox.p2.core=CVS,tag=R36x_v20110111,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core
+plugin at org.eclipse.equinox.p2.director=CVS,tag=R36x_v20101117-1018,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director
+plugin at org.eclipse.equinox.p2.director.app=CVS,tag=R36x_v20100823,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app
+plugin at org.eclipse.equinox.p2.directorywatcher=CVS,tag=R36x_v20101220,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher
+plugin at org.eclipse.equinox.p2.discovery=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery
+plugin at org.eclipse.equinox.p2.discovery.compatibility=CVS,tag=v20110204-1323,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility
+plugin at org.eclipse.equinox.p2.engine=CVS,tag=R36x_v20110201,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine
+plugin at org.eclipse.equinox.p2.extensionlocation=CVS,tag=v20100518,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation
+plugin at org.eclipse.equinox.p2.garbagecollector=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector
+plugin at org.eclipse.equinox.p2.installer=CVS,tag=v20100503a,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer
+plugin at org.eclipse.equinox.p2.jarprocessor=CVS,tag=v20100503a,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor
+plugin at org.eclipse.equinox.p2.metadata=CVS,tag=R36x_v20101202,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata
+plugin at org.eclipse.equinox.p2.metadata.generator=CVS,tag=R36x_v20101208-1400,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator
+plugin at org.eclipse.equinox.p2.metadata.repository=CVS,tag=v20100513,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository
+plugin at org.eclipse.equinox.p2.operations=CVS,tag=v20100510,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations
+plugin at org.eclipse.equinox.p2.publisher=CVS,tag=v20100824-2220,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher
+plugin at org.eclipse.equinox.p2.reconciler.dropins=CVS,tag=R36x_v20110114,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins
+plugin at org.eclipse.equinox.p2.repository=CVS,tag=R36x_v20110111-1500,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository
+plugin at org.eclipse.equinox.p2.repository.tools=CVS,tag=R36x_v20100823,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools
+plugin at org.eclipse.equinox.p2.touchpoint.eclipse=CVS,tag=R36x_v20101202,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse
+plugin at org.eclipse.equinox.p2.touchpoint.natives=CVS,tag=R36x_v20110111,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives
+plugin at org.eclipse.equinox.p2.ui=CVS,tag=v20100518,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui
+plugin at org.eclipse.equinox.p2.ui.admin=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin
+plugin at org.eclipse.equinox.p2.ui.discovery=CVS,tag=v20100519,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery
+plugin at org.eclipse.equinox.p2.ui.sdk=CVS,tag=v20100513,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk
+plugin at org.eclipse.equinox.p2.ui.sdk.scheduler=CVS,tag=v20100507-1815,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
+plugin at org.eclipse.equinox.p2.ui.admin.rcp=CVS,tag=R36x_v20100823,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp
+plugin at org.eclipse.equinox.p2.updatechecker=CVS,tag=R36x_v20100823,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker
+plugin at org.eclipse.equinox.p2.updatesite=CVS,tag=R36x_v20100823,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite
+plugin at org.eclipse.equinox.simpleconfigurator=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator
+plugin at org.eclipse.equinox.simpleconfigurator.manipulator=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator
+plugin at org.eclipse.equinox.p2.tests=CVS,tag=R36x_v20101202,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests
+plugin at org.eclipse.equinox.p2.tests.discovery=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery
+plugin at org.eclipse.equinox.p2.tests.ui=CVS,tag=v20100513,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui
+plugin at org.eclipse.equinox.p2.tests.verifier=CVS,tag=v20100503,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier
+plugin at org.eclipse.equinox.p2.ql=CVS,tag=v20100503a,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql
+
+!# p2 examples
+plugin at org.eclipse.equinox.p2.examples.rcp.cloud=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud
+plugin at org.eclipse.equinox.p2.examples.rcp.cloud.releng=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.discovery=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.discovery
+plugin at org.eclipse.equinox.p2.examples.rcp.discovery.releng=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.prestartupdate=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate
+plugin at org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility
+plugin at org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates
+plugin at org.eclipse.equinox.p2.examples.rcp.sdkui=CVS,tag=v20100604,cvsRoot=:pserver:anonymous at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkui
 
 !# Bundles from ECF
-plugin at org.eclipse.ecf,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.source,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.ssl,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.ssl.source,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.identity,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.identity_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.identity.source,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.identity.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.filetransfer,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.filetransfer_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.filetransfer.source,3.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.filetransfer.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer,3.0.1=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer_3.0.1.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.source,3.0.1=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.source_3.0.1.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.ssl,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.ssl.source,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.httpclient,3.0.1=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient_3.0.1.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.httpclient.source,3.0.1=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.source_3.0.1.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source,1.0.0=GET,http://download.eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
+plugin at org.eclipse.ecf,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.ssl,1.0.100=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.ssl_1.0.100.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.ssl.source,1.0.100=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.ssl.source_1.0.100.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.identity,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.identity_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.identity.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.identity.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.filetransfer,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.filetransfer_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.filetransfer.source,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.filetransfer.source_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.ssl,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.ssl.source,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.ssl.source_1.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.httpclient,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.httpclient.source,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.source_4.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl_1.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source_1.0.0.v20100906-1425.jar,usetimestamp=true
 !***************  PDE CONTRIBUTION  ******************************************************** 
 
 
-plugin at org.eclipse.pde=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde
-plugin at org.eclipse.pde.core=v20100104,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.core
-plugin at org.eclipse.pde.junit.runtime=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.junit.runtime
-plugin at org.eclipse.pde.runtime=v20090731,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.runtime
-plugin at org.eclipse.pde.ui=v201001121200,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui
-plugin at org.eclipse.pde.ui.templates=v20090527,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.templates
-plugin at org.eclipse.pde.ui.tests=v20090824a,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.tests
-
-plugin at org.eclipse.ui.views.log=v20090731,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.ui.views.log
-plugin at org.eclipse.pde.api.tools=v20090714,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools
-plugin at org.eclipse.pde.api.tools.ui=v20090820,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ui
-plugin at org.eclipse.pde.api.tools.tests=v20090714,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.tests
-fragment at org.eclipse.pde.api.tools.ee.cdcfoundation10=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10
-fragment at org.eclipse.pde.api.tools.ee.cdcfoundation11=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11
-fragment at org.eclipse.pde.api.tools.ee.j2se12=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12
-fragment at org.eclipse.pde.api.tools.ee.j2se13=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13
-fragment at org.eclipse.pde.api.tools.ee.j2se14=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14
-fragment at org.eclipse.pde.api.tools.ee.j2se15=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15
-fragment at org.eclipse.pde.api.tools.ee.javase16=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16
-fragment at org.eclipse.pde.api.tools.ee.jre11=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum10=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum11=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum12=v20090407-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12
-
-plugin at org.eclipse.pde.ds.core=v20100118,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.core
-plugin at org.eclipse.pde.ds.ui=v20100209-maintenance,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.ui
-plugin at org.eclipse.pde.ds.tests=v20090420,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.tests
-
-plugin at org.eclipse.pde.ua.core=v20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.core
-plugin at org.eclipse.pde.ua.ui=v20090511,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.ui
-feature at org.eclipse.rcp=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp
+plugin at org.eclipse.pde=v20100625_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde
+plugin at org.eclipse.pde.core=v20110210_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.core
+plugin at org.eclipse.pde.junit.runtime=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.junit.runtime
+plugin at org.eclipse.pde.runtime=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.runtime
+plugin at org.eclipse.pde.launching=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.launching
+plugin at org.eclipse.pde.ui=v20110210_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui
+plugin at org.eclipse.pde.ui.templates=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.templates
+plugin at org.eclipse.pde.ui.tests=v20101210_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.tests
+
+plugin at org.eclipse.ui.views.log=v20110210_r362,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.ui.views.log
+plugin at org.eclipse.pde.api.tools=v20100820_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools
+plugin at org.eclipse.pde.api.tools.ui=v20100820_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ui
+plugin at org.eclipse.pde.api.tools.tests=v20100820_r361,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.tests
+fragment at org.eclipse.pde.api.tools.ee.cdcfoundation10=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10
+fragment at org.eclipse.pde.api.tools.ee.cdcfoundation11=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11
+fragment at org.eclipse.pde.api.tools.ee.j2se12=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12
+fragment at org.eclipse.pde.api.tools.ee.j2se13=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13
+fragment at org.eclipse.pde.api.tools.ee.j2se14=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14
+fragment at org.eclipse.pde.api.tools.ee.j2se15=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15
+fragment at org.eclipse.pde.api.tools.ee.javase16=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16
+fragment at org.eclipse.pde.api.tools.ee.jre11=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum10=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum11=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum12=v20100506-0900,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12
+
+plugin at org.eclipse.pde.ds.core=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.core
+plugin at org.eclipse.pde.ds.ui=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.ui
+plugin at org.eclipse.pde.ds.tests=v20100601,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.tests
+
+plugin at org.eclipse.pde.ua.core=v20100504,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.core
+plugin at org.eclipse.pde.ua.ui=v20100504,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.ui
+feature at org.eclipse.rcp=r362_v20101104,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp
 feature at org.eclipse.rcp.sdk=v20080507,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp.sdk
-plugin at org.eclipse.rcp=R35x_v20100119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.rcp
+plugin at org.eclipse.rcp=v20100527-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.rcp
 !****************  RELENG CONTRIBUTION  ******************************************************** 
-feature at master=v20090425,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master
-feature at master-equinox=v20090413,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox
-feature at master-equinox-p2=v20080506,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-p2
-feature at master-jetty=v20090305,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-jetty
+feature at master=v20091019,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master
+feature at master-equinox=r362_v20101118,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox
+feature at master-equinox-p2=v20091106,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-p2
+feature at master-equinox-weaving=v20090817,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-weaving
+feature at master-jetty=r362_v20101014,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-jetty
 feature at master-ecf=v20090316,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-ecf
 
 feature at com.ibm.icu.base=v20090119,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/com.ibm.icu.base
 
-feature at master-root=v20081208,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-root
-feature at org.eclipse.releng.tools=v20090520,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.releng.tools
+feature at org.eclipse.releng.tools=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.releng.tools
 
-plugin at org.eclipse.releng.tools=R35x_v20090812,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.releng.tests=R35x_v20100208,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.releng.tools=v20100531,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.releng.tests=r362_v20110203,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 plugin at org.eclipse.pde.tools.versioning=r20080922,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/plugins/org.eclipse.pde.tools.versioning
 
@@ -478,77 +498,76 @@ feature at org.eclipse.jdt.test.feature.sample=HEAD,:pserver:anonymous at dev.eclipse.
 !***************  SWT CONTRIBUTION  ******************************************************** 
 
 !*** SWT Plugin
-plugin at org.eclipse.swt=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt=v3659c,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Platform Fragments
-fragment at org.eclipse.swt.carbon.macosx=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.cocoa.macosx=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.cocoa.macosx.x86_64=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.ppc=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.x86_64=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.solaris.sparc=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.solaris.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.aix.ppc=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.hpux.ia64_32=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.linux.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.solaris.sparc=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.photon.qnx.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.wce_ppc.arm=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.wpf.win32.x86=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.x86_64=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.ia64=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-fragment at org.eclipse.swt.gtk.linux.s390=v3550b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.s390x=v3550b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-fragment at org.eclipse.swt.gtk.linux.ia64=R3_5,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.hpux.PA_RISC=R3_5,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.carbon.macosx=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.cocoa.macosx=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.cocoa.macosx.x86_64=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.ppc=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.ppc64=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.x86=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.x86_64=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.solaris.sparc=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.solaris.x86=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.aix.ppc64=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.aix.ppc=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.hpux.ia64_32=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.linux.x86=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.solaris.sparc=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.photon.qnx.x86=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.wce_ppc.arm=v3659c,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.x86=v3659c,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.x86_64=v3659c,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.ia64=v3659c,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+fragment at org.eclipse.swt.gtk.linux.s390=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.s390x=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Examples
-plugin at org.eclipse.swt.examples=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.browser=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.browser.demos=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.controls=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.launcher=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.layouts=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.ole.win32=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.paint=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.browser=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.browser.demos=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.controls=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.launcher=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.layouts=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.ole.win32=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.paint=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Tests and Tools
-plugin at org.eclipse.swt.tests=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.tools=v3557f,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.tests=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.tools=v3659b,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  TEAM CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.team.core=r35x_20100113-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.core=I20090430-0408,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ssh=I20090508-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ssh2=I20090508-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.ui=I20090430-0408,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ui=r35x_20090930-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.core.net=r35x_20090812-1200,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.net=r35x_20090812-1200,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.net=I20090126-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.core=I20090430-0408,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.ui=r35x_20100210-1114,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.tests=I20080604,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.team.examples.filesystem=I20090210-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.team.tests.core=I20090304-1015,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.tests.cvs.core=I20090527-0620,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.net.win32.x86=I20080909,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86
-fragment at org.eclipse.core.net.linux.x86=I20081021,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86
-fragment at org.eclipse.core.net.win32.x86_64=I20090306-1030,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64
+plugin at org.eclipse.team.core=R36x_v20110203-1036,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.core=R36x_v20110119-0815,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ssh=I20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ssh2=I20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.ui=R36x_v20110203-1036,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ui=R36x_v20110203-1036,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.core.net=I20100511-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.net=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.net=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.core=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.ui=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.tests=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.team.examples.filesystem=I20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.team.tests.core=I20100511-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.tests.cvs.core=R36x_v20110119-0815,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.net.win32.x86=I20100511-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86
+fragment at org.eclipse.core.net.linux.x86=R36x_v20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86
+fragment at org.eclipse.core.net.linux.x86_64=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64
+fragment at org.eclipse.core.net.win32.x86_64=I20100505-1245,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64
 !***************  Test Framework CONTRIBUTION  ******************************************************** 
-feature at org.eclipse.test=r20080925,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.test-feature
+feature at org.eclipse.test=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.test-feature
 
-plugin at org.eclipse.test=v20081002,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.test=v20100118,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.ant.optional.junit=v20080717,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.test.performance=v20090511,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.test.performance=v20100122,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.test.performance.win32=v20070530,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 plugin at org.eclipse.test.performance.data=v20050415,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
@@ -556,96 +575,97 @@ plugin at org.eclipse.test.performance.data=v20050415,:pserver:anonymous at dev.eclips
 plugin at org.eclipse.test.dispatcher=HEAD,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.test.dispatcher
 !***************  TEXT CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.text=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.text=r352_v20091118-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench.texteditor=r352_v20100105,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.editors=v20090527-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.filebuffers=v20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.text=v20100601-1300,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.text=r361_v20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench.texteditor=r361_v20100714-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.editors=r361_v20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.filebuffers=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.examples.javaeditor=v20090528-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.javaeditor=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.text.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.text.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.filebuffers.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench.texteditor.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.editors.tests=v20090513-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.text.tests=v20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.text.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.text.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.filebuffers.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench.texteditor.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.editors.tests=v20100520-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.text.tests=v20100526-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  UI CONTRIBUTION  ********************************************************* 
 
-plugin at org.eclipse.core.commands=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface=M20100120-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding=M20090819-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.observable=M20090902-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.property=M20090819-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.beans=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.databinding=M20090826-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui=M20100120-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.ide=M20100113-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.ide.application=M20090826-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.presentations.r21=M20091015-0930,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.views=M20090826-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench=M20100113-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.workbench.compatibility=I20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.win32=v20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.carbon=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.cocoa=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-
-plugin at org.eclipse.jface.examples.databinding=M20090826-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.multipageeditor=I20070605-0010,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.propertysheet=M20100210-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.readmetool=I20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.undo=I20080204-0800a,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.views.properties.tabbed.article=I20060605-1400,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.ui.examples.views.properties.tabbed/org.eclipse.ui.examples.views.properties.tabbed.article
-plugin at org.eclipse.ui.examples.fieldassist=I20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.contributions=I20090526-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.ui.navigator=M20100120-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.navigator.resources=M20090826-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.ui.views.properties.tabbed=I20090429-1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-
-plugin at org.eclipse.jface.tests.databinding=M20090909-1039,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.tests.databinding.conformance=M20090819-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests=M20100107-0100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.commands=I20100512-1500,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface=M20110210-1200,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.observable=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.property=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.beans=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.databinding=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui=M20110203-1100,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.ide=M20101201-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.ide.application=M20100707-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.presentations.r21=I20100517-1500,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.views=M20110202-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench=M20110210-1200,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.workbench.compatibility=I20100511-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.win32=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.carbon=M20101124-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.cocoa=M20101124-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+
+plugin at org.eclipse.jface.examples.databinding=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.multipageeditor=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.propertysheet=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.readmetool=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.undo=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.views.properties.tabbed.article=I20100517-1500,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.ui.examples.views.properties.tabbed/org.eclipse.ui.examples.views.properties.tabbed.article
+plugin at org.eclipse.ui.examples.fieldassist=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.contributions=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.ui.navigator=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.navigator.resources=M20101124-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.ui.views.properties.tabbed=I20100509-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+
+plugin at org.eclipse.jface.tests.databinding=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.tests.databinding.conformance=I20090818-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests=M20100825-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 plugin at org.eclipse.ui.tests.rcp=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.navigator=M20100120-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.views.properties.tabbed=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.performance=I20090527-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.harness=I20090525-2000,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.navigator=M20101201-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.views.properties.tabbed=M20110202-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.performance=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.harness=I20100601-0800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  UPDATE CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.update.configurator=v20090312,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.core=v20090525,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.scheduler=v20081127,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.ui=R35x_v20090813,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.configurator=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.core=R36x_v20100629,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.scheduler=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.ui=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-fragment at org.eclipse.update.core.win32=v20080107,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.update.core.linux=v20081008,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.update.core.win32=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.update.core.linux=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.update.tests.core=v20090525,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.tests.core=v20100512,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 !***************  UA CONTRIBUTION  *********************************************
 
 !**** Help
-plugin at org.eclipse.help=v20090805_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.appserver=v20090429_1800,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.base=v20090526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.ui=v20090819_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.webapp=v20091009_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help=v20100524,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.appserver=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.base=r36_20101123,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.ui=r36_20101116,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.webapp=r36_20101130,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Welcome
-plugin at org.eclipse.ui.intro=v20100111_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.intro.universal=v20090526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.intro=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.intro.universal=r36_v20100702,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Cheat sheets
-plugin at org.eclipse.ui.cheatsheets=v20090526,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.cheatsheets=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Browser
-plugin at org.eclipse.ui.browser=v20091215_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.browser=r36_20101216,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Forms
-plugin at org.eclipse.ui.forms=v20090714_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.forms=r36_v20100702,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Tests
-plugin at org.eclipse.ua.tests=v20090805_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.forms=v20090714_35x,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ua.tests=r36_r20100816,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ua.tests.doc=v20100427,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.forms=v20100517,:pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse,
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.classpath b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.classpath
deleted file mode 100644
index c2ce266..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6619e08..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Mon May 04 17:44:34 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF
deleted file mode 100644
index 18a2308..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.filetransfer;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.ecf.internal.filetransfer.Activator
-Bundle-Vendor: %plugin.provider
-Eclipse-LazyStart: true
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
-Export-Package: org.eclipse.ecf.filetransfer,
- org.eclipse.ecf.filetransfer.events,
- org.eclipse.ecf.filetransfer.events.socket;version:="1.0";x-internal:="true",
- org.eclipse.ecf.filetransfer.events.socketfactory,
- org.eclipse.ecf.filetransfer.identity,
- org.eclipse.ecf.filetransfer.service,
- org.eclipse.ecf.internal.filetransfer;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.registry,
- org.eclipse.ecf
-Import-Package: org.eclipse.core.runtime.jobs,
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.service.url;version="1.0.0",
- org.osgi.util.tracker;version="1.3.2"
-Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/build.properties b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/build.properties
deleted file mode 100644
index d1a70d0..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-output.. = bin/
-bin.includes = .,\
-               META-INF/,\
-               about.html,\
-               plugin.xml,\
-               plugin.properties,\
-               schema/
-src.includes = about.html,\
-               schema/,\
-               plugin.properties
-jars.compile.order = .
-source.. = src/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java
deleted file mode 100644
index 3b22284..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:  Contributors: Cloudsmith, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.filetransfer;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent;
-import org.eclipse.ecf.internal.filetransfer.Messages;
-
-/**
- * {@link Job} subclass for executing file transfers.  This class should
- * be subclassed to create a customized {@link Job} for passing to
- * an incoming or outgoing file transfer.  For example, to use a custom
- * job for doing a file transfer retrieval via {@link IIncomingFileTransferReceiveStartEvent#receive(java.io.File, FileTransferJob)}:
- * <pre>
- * class MyFileTransferJob extends FileTransferJob {
- * 		public MyFileTransferJob(String name) {
- * 			super(name);
- * 		}
- * 
- * 		public boolean belongsTo(Object o) {
- * 			// insert own logic to decide whether
- *  		// this file transfer job should be part
- *  		// of a group
- *  		//
- * 		}
- * }
- * 
- * MyFileTransferJob myJob = new MyFileTransferJob("myname");
- * incomingfiletransfer = event.receive(outputstream,myJob);
- * </pre>
- * @since 2.0
- */
-public class FileTransferJob extends Job {
-
-	private IFileTransferRunnable fileTransferRunnable;
-	private IFileTransfer fileTransfer;
-
-	/**
-	 * @param name the name for this file transfer job.  Should not be <code>null</code>.
-	 */
-	public FileTransferJob(String name) {
-		super(name);
-	}
-
-	public final void setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable) {
-		this.fileTransferRunnable = fileTransferRunnable;
-	}
-
-	/**
-	 * @since 3.0
-	 */
-	public final void setFileTransfer(IFileTransfer fileTransfer) {
-		this.fileTransfer = fileTransfer;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected final IStatus run(IProgressMonitor mntr) {
-		if (this.fileTransferRunnable == null)
-			return new Status(IStatus.ERROR, org.eclipse.ecf.internal.filetransfer.Activator.PLUGIN_ID, IStatus.ERROR, Messages.FileTransferJob_STATUSERROR_NO_RUNNABLE, null);
-		if (this.fileTransfer == null)
-			return new Status(IStatus.ERROR, org.eclipse.ecf.internal.filetransfer.Activator.PLUGIN_ID, IStatus.ERROR, Messages.FileTransferJob_STATUSERROR_NO_TRANSFER, null);
-		return this.fileTransferRunnable.performFileTransfer(mntr);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.jobs.Job#canceling()
-	 */
-	protected void canceling() {
-		fileTransfer.cancel();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java
deleted file mode 100644
index 89b4dcd..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.filetransfer;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.ecf.core.util.ECFException;
-
-/**
- * Exception thrown upon incoming file transfer problem
- * 
- */
-public class IncomingFileTransferException extends ECFException {
-
-	private static final long serialVersionUID = 2438441801862623371L;
-
-	private int errorCode = -1;
-
-	public IncomingFileTransferException(IStatus status) {
-		super(status);
-	}
-
-	public IncomingFileTransferException() {
-		// null constructor
-	}
-
-	public IncomingFileTransferException(int errorCode) {
-		this();
-		this.errorCode = errorCode;
-	}
-
-	public IncomingFileTransferException(String message) {
-		super(message);
-	}
-
-	public IncomingFileTransferException(String message, int errorCode) {
-		super(message);
-		this.errorCode = errorCode;
-	}
-
-	public IncomingFileTransferException(Throwable cause) {
-		super(cause);
-	}
-
-	public IncomingFileTransferException(Throwable cause, int errorCode) {
-		super(cause);
-		this.errorCode = errorCode;
-	}
-
-	public IncomingFileTransferException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	public IncomingFileTransferException(String message, Throwable cause, int errorCode) {
-		super(message, cause);
-		this.errorCode = errorCode;
-	}
-
-	public int getErrorCode() {
-		return errorCode;
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java
deleted file mode 100644
index aa934af..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- *               Cloudsmith, Inc. - additional API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.filetransfer.events;
-
-import java.io.*;
-import org.eclipse.ecf.filetransfer.*;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-
-/**
- * Event sent to {@link IFileTransferListener} associated with
- * {@link IIncomingFileTransfer} instances when file transfer is resumed.
- * 
- */
-public interface IIncomingFileTransferReceiveResumedEvent extends IIncomingFileTransferEvent {
-
-	/**
-	 * Get IFileID for incoming file
-	 * 
-	 * @return IFileID for this file transfer event. Will not be
-	 *         <code>null</code>.
-	 */
-	public IFileID getFileID();
-
-	/**
-	 * Get incoming file transfer object by specifying a local File instance to
-	 * save the received contents to.
-	 * 
-	 * @param localFileToSave
-	 *            the file on the local file system to receive and save the
-	 *            remote file. Must not be <code>null</code>.
-	 * @param append
-	 *            if <code>true</code>, and data received is appended to the
-	 *            given localFileToSave. If <code>false</code>, data are written
-	 *            to the beginning of the given localFileToSave, and any
-	 *            existing contents are overwritten.
-	 * @return IIncomingFileTransfer the incoming file transfer object. Will not
-	 *         be <code>null</code>.
-	 * @throws IOException
-	 *             if localFileToSave cannot be opened for writing.
-	 * @since 2.0
-	 */
-	public IIncomingFileTransfer receive(File localFileToSave, boolean append) throws IOException;
-
-	/**
-	 * Just like {@link #receive(File,boolean)} but this method also give the
-	 * caller a chance to provide a factory that creates the job that will
-	 * perform the actual file transfer. The intended use for this is when the
-	 * user of the framework needs more elaborate control over such jobs such as
-	 * waiting for a group of parallel file transfers to complete. Such
-	 * functionality can for instance exploit the Eclipse runtime concept of Job
-	 * families.
-	 * 
-	 * @param localFileToSave
-	 *            the file on the local file system to receive and save the
-	 *            remote file. Must not be <code>null</code>.
-	 * @param append
-	 *            if <code>true</code>, and data received is appended to the
-	 *            given localFileToSave. If <code>false</code>, data are written
-	 *            to the beginning of the given localFileToSave, and any
-	 *            existing contents are overwritten.
-	 * @param fileTransferJob
-	 *            A subclass of {@link FileTransferJob} to use to run the actual
-	 *            transfer. If <code>null</code>, provider will create default
-	 *            implementation. NOTE: the given job should *not* be
-	 *            scheduled/started prior to being provided as parameter to this
-	 *            method.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guarantee that the data received is actually written to the given
-	 *         OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing.
-	 * @since 2.0
-	 */
-	public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob, boolean append) throws IOException;
-
-	/**
-	 * Get incoming file transfer by specifying an OutputStream instance to save
-	 * the received contents to. NOTE: the caller is responsible for calling
-	 * {@link OutputStream#close()} on the OutputStream provided. If the stream
-	 * provided is buffered, then {@link BufferedOutputStream#flush()} should be
-	 * called to guaranteed that the data received is actually written to the
-	 * given OutputStream.
-	 * 
-	 * @param streamToStore
-	 *            the output stream to store the incoming file. Must not be
-	 *            <code>null</code>.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guarantee that the data received is actually written to the given
-	 *         OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing
-	 */
-	public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException;
-
-	/**
-	 * Just like {@link #receive(OutputStream)} but this method also give the
-	 * caller a chance to provide a factory that creates the job that will
-	 * perform the actual file transfer. The intended use for this is when the
-	 * user of the framework needs more elaborate control over such jobs such as
-	 * waiting for a group of parallel file transfers to complete. Such
-	 * functionality can for instance exploit the Eclipse runtime concept of Job
-	 * families.
-	 * 
-	 * @param streamToStore
-	 *            the output stream to store the incoming file. Must not be
-	 *            <code>null</code>.
-	 * @param fileTransferJob
-	 *            A subclass of {@link FileTransferJob} to use to run the actual
-	 *            transfer. If <code>null</code>, provider will create default
-	 *            implementation. NOTE: the given job should *not* be
-	 *            scheduled/started prior to being provided as a parameter to
-	 *            this method.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guarantee that the data received is actually written to the given
-	 *         OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing
-	 */
-	public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException;
-
-	/**
-	 * Cancel incoming file transfer
-	 */
-	public void cancel();
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java
deleted file mode 100644
index 3705e36..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- *               Cloudsmith, Inc. - additional API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.filetransfer.events;
-
-import java.io.*;
-import org.eclipse.ecf.filetransfer.*;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-
-/**
- * Event sent to {@link IFileTransferListener} associated with
- * {@link IIncomingFileTransfer} instances
- * 
- */
-public interface IIncomingFileTransferReceiveStartEvent extends IIncomingFileTransferEvent {
-
-	/**
-	 * Get IFileID for incoming file
-	 * 
-	 * @return IFileID for this file transfer event. Will not be
-	 *         <code>null</code>.
-	 */
-	public IFileID getFileID();
-
-	/**
-	 * Get incoming file transfer object by specifying a local File instance to
-	 * save the received contents to.
-	 * 
-	 * @param localFileToSave
-	 *            the file on the local file system to receive and save the
-	 *            remote file. Must not be <code>null</code>. If the file
-	 *            already exists, its content will be overwritten by any data
-	 *            received.
-	 * @return IIncomingFileTransfer the incoming file transfer object. Will not
-	 *         be <code>null</code>.
-	 * @throws IOException
-	 *             if localFileToSave cannot be opened for writing
-	 */
-	public IIncomingFileTransfer receive(File localFileToSave) throws IOException;
-
-	/**
-	 * Just like {@link #receive(File)} but this method also give the caller
-	 * a chance to provide a factory that creates the job that will perform the
-	 * actual file transfer. The intended use for this is when the user of the
-	 * framework needs more elaborate control over such jobs such as waiting for a
-	 * group of parallel file transfers to complete. Such functionality can for
-	 * instance exploit the Eclipse runtime concept of Job families.
-	 * 
-	 * @param localFileToSave
-	 *            the file on the local file system to receive and save the
-	 *            remote file. Must not be <code>null</code>. If the file
-	 *            already exists, its content will be overwritten by any data
-	 *            received.
-	 * @param fileTransferJob A subclass of {@link FileTransferJob} to use to run the actual transfer.  If
-	 *         <code>null</code>, provider will create default implementation.  NOTE: the given job should
-	 *         *not* be scheduled/started prior to being provided as a parameter to this method.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guaranteed that the data received is actually written to the
-	 *         given OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing
-	 *             
-	 * @since 2.0
-	 */
-	public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob) throws IOException;
-
-	/**
-	 * Get incoming file transfer by specifying an OutputStream instance to save
-	 * the received contents to. NOTE: the caller is responsible for calling
-	 * {@link OutputStream#close()} on the OutputStream provided. If the stream
-	 * provided is buffered, then {@link BufferedOutputStream#flush()} should be
-	 * called to guaranteed that the data received is actually written to the
-	 * given OutputStream.
-	 * 
-	 * @param streamToStore
-	 *            the output stream to store the incoming file. Must not be
-	 *            <code>null</code>.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guaranteed that the data received is actually written to the
-	 *         given OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing
-	 */
-	public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException;
-
-	/**
-	 * Just like {@link #receive(OutputStream)} but this method also give the caller
-	 * a chance to provide a factory that creates the job that will perform the
-	 * actual file transfer. The intended use for this is when the user of the
-	 * framework needs more elaborate control over such jobs such as waiting for a
-	 * group of parallel file transfers to complete. Such functionality can for
-	 * instance exploit the Eclipse runtime concept of Job families.
-	 * 
-	 * @param streamToStore
-	 *            the output stream to store the incoming file. Must not be
-	 *            <code>null</code>.
-	 * @param fileTransferJob A subclass of {@link FileTransferJob} to use to run the actual transfer.  If
-	 *         <code>null</code>, provider will create default implementation.  NOTE: the given job should
-	 *         *not* be scheduled/started prior to being provided as a parameter to this method.
-	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
-	 *         the caller is responsible for calling
-	 *         {@link OutputStream#close()} on the OutputStream provided. If the
-	 *         stream provided is buffered, then
-	 *         {@link BufferedOutputStream#flush()} should be called to
-	 *         guaranteed that the data received is actually written to the
-	 *         given OutputStream.
-	 * @throws IOException
-	 *             if streamToStore cannot be opened for writing
-	 *             
-	 * @since 2.0
-	 */
-	public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException;
-
-	/**
-	 * Cancel incoming file transfer
-	 */
-	public void cancel();
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java
deleted file mode 100644
index 35efabb..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.filetransfer.identity;
-
-import java.net.URL;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
-import org.eclipse.ecf.internal.filetransfer.Activator;
-import org.eclipse.ecf.internal.filetransfer.FileTransferDebugOptions;
-
-/**
- * Factory class entry point for creating IFileID instances.
- * 
- */
-public class FileIDFactory {
-
-	protected static FileIDFactory instance = null;
-
-	static {
-		instance = new FileIDFactory();
-	}
-
-	/**
-	 * Get singleton instance
-	 * 
-	 * @return FileIDFactory singleton instance. Will not be <code>null</code>.
-	 */
-	public static FileIDFactory getDefault() {
-		return instance;
-	}
-
-	/**
-	 * Create an IFileID from a Namespace and a String.
-	 * 
-	 * @param namespace
-	 *            the namespace to use to create the IFileID. Can use
-	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
-	 *            Must not be <code>null</code>.
-	 * @param remoteFile
-	 *            the remote filename to use. Must not be <code>null</code>.
-	 * @return IFileID instance. Will not return <code>null</code>.
-	 * @throws FileCreateException
-	 *             thrown if some problem creating IFileID from given namespace
-	 *             and filename
-	 */
-	public IFileID createFileID(Namespace namespace, URL remoteFile) throws FileCreateException {
-		return createFileID(namespace, new Object[] {remoteFile});
-	}
-
-	/**
-	 * Create an IFileID from a Namespace and a String.
-	 * 
-	 * @param namespace
-	 *            the namespace to use to create the IFileID. Can use
-	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
-	 *            Must not be null.
-	 * @param remoteFile
-	 *            the remote filename to use. Must not be <code>null</code>.
-	 * @return IFileID instance. Will not return <code>null</code>.
-	 * @throws FileCreateException
-	 *             thrown if some problem creating IFileID from given namespace
-	 *             and filename
-	 */
-	public IFileID createFileID(Namespace namespace, String remoteFile) throws FileCreateException {
-		return createFileID(namespace, new Object[] {remoteFile});
-	}
-
-	/**
-	 * Create an IFileID from a Namespace and a String.
-	 * 
-	 * @param namespace
-	 *            the namespace to use to create the IFileID. Can use
-	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
-	 *            Must not be <code>null</code>.
-	 * @param arguments
-	 *            Object [] of arguments to use to create file ID. These
-	 *            arguments will be passed to the
-	 *            {@link Namespace#createInstance(Object[])} method of the
-	 *            appropriate Namespace setup by the provider
-	 * @return IFileID instance. Will not return <code>null</code>.
-	 * @throws FileCreateException
-	 *             thrown if some problem creating IFileID from given namespace
-	 *             and filename
-	 */
-	public IFileID createFileID(Namespace namespace, Object[] arguments) throws FileCreateException {
-		Trace.entering(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_ENTERING, this.getClass(), "createFileID", new Object[] {namespace, arguments}); //$NON-NLS-1$
-		try {
-			IFileID result = (IFileID) IDFactory.getDefault().createID(namespace, arguments);
-			Trace.exiting(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_EXITING, this.getClass(), "createFileID", result); //$NON-NLS-1$
-			return result;
-		} catch (Exception e) {
-			Trace.throwing(Activator.PLUGIN_ID, FileTransferDebugOptions.EXCEPTIONS_THROWING, FileIDFactory.class, "createFileID", e); //$NON-NLS-1$
-			throw new FileCreateException("Exception in createFileID", e); //$NON-NLS-1$
-		}
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java
deleted file mode 100644
index cbd2e60..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.filetransfer.identity;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.ecf.core.identity.ID;
-
-/**
- * ID for a remote file.
- * 
- */
-public interface IFileID extends ID {
-
-	/**
-	 * Get the file name from this IFileID. This will return just the filename
-	 * portion of a more complex file ID, e.g. index.html from IFileID created
-	 * with value "http://www.composent.com/index.html"
-	 * 
-	 * @return String just the file name and extension (if any) for this given
-	 *         IFileID. Will not be <code>null</code>.
-	 */
-	public String getFilename();
-
-	/**
-	 * Get the url associated with the file identified by this IFileID.
-	 * 
-	 * @return URL associated with this IFileID.  Will not be null.
-	 * @exception MalformedURLException thrown if URL cannot be created for this IFileID
-	 */
-	public URL getURL() throws MalformedURLException;
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Messages.java b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Messages.java
deleted file mode 100644
index 9614e49..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Messages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.filetransfer;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.filetransfer.messages"; //$NON-NLS-1$
-	public static String FileTransferJob_STATUSERROR_NO_RUNNABLE;
-	public static String FileTransferJob_STATUSERROR_NO_TRANSFER;
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// private null constructor
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/messages.properties b/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/messages.properties
deleted file mode 100644
index ffecf8e..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-FileTransferJob_STATUSERROR_NO_RUNNABLE=No runnable for file transfer
-FileTransferJob_STATUSERROR_NO_TRANSFER=No file transfer
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.options b/eclipse/ecf-src/org.eclipse.ecf.identity/.options
deleted file mode 100644
index a82aa7c..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/.options
+++ /dev/null
@@ -1,15 +0,0 @@
-# Debugging options for the org.eclipse.ecf.identity plug-in
-
-# Turn on general debugging for the org.eclipse.ecf.identity plug-in
-org.eclipse.ecf.identity/debug=true
-
-# Trace when exceptions are caught
-org.eclipse.ecf.identity/debug/exceptions/catching=false
-# Trace when exceptions are thrown
-org.eclipse.ecf.identity/debug/exceptions/throwing=false
-
-# Trace when methods are entered
-org.eclipse.ecf.identity/debug/methods/entering=false
-# Trace when methods are exited
-org.eclipse.ecf.identity/debug/methods/exiting=false
-
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
deleted file mode 100644
index 0417321..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.identity;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.ecf.internal.core.identity.Activator
-Bundle-Localization: plugin
-Bundle-Vendor: %plugin.provider
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.ecf.core.identity;version="3.0.0",
- org.eclipse.ecf.core.util;version="3.0.0",
- org.eclipse.ecf.internal.core.identity;version="3.0.0";x-internal:=true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Import-Package: org.eclipse.osgi.service.debug;version="1.0.0",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.util.tracker;version="1.3.2"
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.registry
-Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.ecf.core.util"
-
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/build.properties b/eclipse/ecf-src/org.eclipse.ecf.identity/build.properties
deleted file mode 100644
index 5edf718..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2006. Composent, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     Composent Inc. - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               about.html,\
-               schema/,\
-               plugin.properties
-src.includes = about.html,\
-               schema/,\
-               plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
deleted file mode 100644
index 3e725d9..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.identity;
-
-import java.security.SecureRandom;
-import org.eclipse.ecf.core.util.Base64;
-import org.eclipse.ecf.internal.core.identity.Messages;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Globally unique ID implementation class. Uses
- * {@link java.security.SecureRandom} to create a unique number of given byte
- * length. Default byte length for secure number is 20 bytes. Default algorithm
- * used for creating a SecureRandom instance is SHA1PRNG.
- */
-public class GUID extends StringID {
-	private static final long serialVersionUID = 3545794369039972407L;
-
-	public static class GUIDNamespace extends Namespace {
-		private static final long serialVersionUID = -8546568877571886386L;
-
-		public GUIDNamespace() {
-			super(GUID.class.getName(), Messages.GUID_GUID_Namespace_Description_Default);
-		}
-
-		private String getInitFromExternalForm(Object[] args) {
-			if (args == null || args.length < 1 || args[0] == null)
-				return null;
-			if (args[0] instanceof String) {
-				String arg = (String) args[0];
-				if (arg.startsWith(getScheme() + Namespace.SCHEME_SEPARATOR)) {
-					int index = arg.indexOf(Namespace.SCHEME_SEPARATOR);
-					if (index >= arg.length())
-						return null;
-					return arg.substring(index + 1);
-				}
-			}
-			return null;
-		}
-
-		public ID createInstance(Object[] args) throws IDCreateException {
-			try {
-				String init = getInitFromExternalForm(args);
-				if (init != null)
-					return new GUID(this, init);
-				if (args == null || args.length <= 0)
-					return new GUID(this);
-				else if (args.length == 1 && args[0] instanceof Integer)
-					return new GUID(this, ((Integer) args[0]).intValue());
-				else if (args.length == 1 && args[0] instanceof String)
-					return new GUID(this, ((String) args[0]));
-				else
-					return new GUID(this);
-			} catch (Exception e) {
-				throw new IDCreateException(NLS.bind("{0} createInstance()", getName()), e); //$NON-NLS-1$
-			}
-		}
-
-		public String getScheme() {
-			return GUID.class.getName();
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance()
-		 */
-		public Class[][] getSupportedParameterTypes() {
-			return new Class[][] { {}, {Integer.class}};
-		}
-
-	}
-
-	public static final String SR_DEFAULT_ALGO = null;
-
-	public static final String SR_DEFAULT_PROVIDER = null;
-
-	public static final int DEFAULT_BYTE_LENGTH = 20;
-
-	// Class specific SecureRandom instance
-	protected static transient SecureRandom random;
-
-	/**
-	 * Protected constructor for factory-based construction
-	 * 
-	 * @param n
-	 *            the Namespace this identity will belong to
-	 * @param provider
-	 *            the name of the algorithm to use. See {@link SecureRandom}
-	 * @param byteLength
-	 *            the length of the target number (in bytes)
-	 */
-	protected GUID(Namespace n, String algo, String provider, int byteLength) throws IDCreateException {
-		super(n, ""); //$NON-NLS-1$
-		// Get SecureRandom instance for class
-		try {
-			getRandom(algo, provider);
-		} catch (Exception e) {
-			throw new IDCreateException(Messages.GUID_GUID_Creation_Failure + e.getMessage());
-		}
-		// make sure we have reasonable byteLength
-		if (byteLength <= 0)
-			byteLength = 1;
-		byte[] newBytes = new byte[byteLength];
-		// Fill up random bytes
-		random.nextBytes(newBytes);
-		// Set value
-		value = Base64.encode(newBytes);
-	}
-
-	protected GUID(Namespace n, String value) {
-		super(n, value);
-	}
-
-	protected GUID(Namespace n, int byteLength) throws IDCreateException {
-		this(n, SR_DEFAULT_ALGO, SR_DEFAULT_PROVIDER, byteLength);
-	}
-
-	protected GUID(Namespace n) throws IDCreateException {
-		this(n, DEFAULT_BYTE_LENGTH);
-	}
-
-	/**
-	 * Get SecureRandom instance for creation of random number.
-	 * 
-	 * @param algo
-	 *            the String algorithm specification (e.g. "SHA1PRNG") for
-	 *            creation of the SecureRandom instance
-	 * @param provider
-	 *            the provider of the implementation of the given algorighm
-	 *            (e.g. "SUN")
-	 * @return SecureRandom
-	 * @exception Exception
-	 *                thrown if SecureRandom instance cannot be created/accessed
-	 */
-	protected static synchronized SecureRandom getRandom(String algo, String provider) throws Exception {
-		// Given algo and provider, get SecureRandom instance
-		if (random == null) {
-			initializeRandom(algo, provider);
-		}
-		return random;
-	}
-
-	protected static synchronized void initializeRandom(String algo, String provider) throws Exception {
-		if (provider == null) {
-			if (algo == null) {
-				try {
-					random = SecureRandom.getInstance(Messages.GUID_IBM_SECURE_RANDOM);
-				} catch (Exception e) {
-					random = SecureRandom.getInstance(Messages.GUID_SHA1);
-				}
-			} else
-				random = SecureRandom.getInstance(algo);
-		} else {
-			random = SecureRandom.getInstance(algo, provider);
-		}
-	}
-
-	public String toString() {
-		StringBuffer sb = new StringBuffer("GUID["); //$NON-NLS-1$
-		sb.append(value).append("]"); //$NON-NLS-1$
-		return sb.toString();
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
deleted file mode 100644
index 68e67ec..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.identity;
-
-import java.security.AccessController;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.internal.core.identity.Activator;
-import org.eclipse.ecf.internal.core.identity.IdentityDebugOptions;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A factory class for creating ID instances. This is the factory for plugins to
- * manufacture ID instances.
- * 
- */
-public class IDFactory implements IIDFactory {
-	public static final String SECURITY_PROPERTY = IDFactory.class.getName()
-			+ ".security"; //$NON-NLS-1$
-
-	private static final int IDENTITY_CREATION_ERRORCODE = 2001;
-
-	private static Hashtable namespaces = new Hashtable();
-
-	private static boolean securityEnabled = false;
-
-	protected static IIDFactory instance = null;
-
-	static {
-		instance = new IDFactory();
-		addNamespace0(new StringID.StringIDNamespace());
-		addNamespace0(new GUID.GUIDNamespace());
-		addNamespace0(new LongID.LongNamespace());
-	}
-
-	private synchronized static void initialize() {
-		if (!initialized) {
-			Trace.entering(Activator.PLUGIN_ID,
-					IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-					"initialize");
-			Activator a = Activator.getDefault();
-			if (a != null)
-				a.setupNamespaceExtensionPoint();
-			initialized = true;
-			Trace.exiting(Activator.PLUGIN_ID,
-					IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-					"initialize");
-		}
-	}
-
-	private static boolean initialized = false;
-
-	public synchronized static IIDFactory getDefault() {
-		return instance;
-	}
-
-	private IDFactory() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#addNamespace(org.eclipse.ecf
-	 * .core.identity.Namespace)
-	 */
-	public Namespace addNamespace(Namespace namespace) throws SecurityException {
-		if (namespace == null)
-			return null;
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"addNamespace", namespace); //$NON-NLS-1$
-		checkPermission(new NamespacePermission(namespace.toString(),
-				NamespacePermission.ADD_NAMESPACE));
-		initialize();
-		Namespace result = addNamespace0(namespace);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"addNamespace", result); //$NON-NLS-1$
-		return result;
-	}
-
-	public final static Namespace addNamespace0(Namespace namespace) {
-		if (namespace == null)
-			return null;
-		return (Namespace) namespaces.put(namespace.getName(), namespace);
-	}
-
-	protected final static void checkPermission(
-			NamespacePermission namespacepermission) throws SecurityException {
-		if (securityEnabled)
-			AccessController.checkPermission(namespacepermission);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#containsNamespace(org.eclipse
-	 * .ecf.core.identity.Namespace)
-	 */
-	public boolean containsNamespace(Namespace namespace)
-			throws SecurityException {
-		if (namespace == null)
-			return false;
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"containsNamespace", namespace); //$NON-NLS-1$
-		checkPermission(new NamespacePermission(namespace.toString(),
-				NamespacePermission.CONTAINS_NAMESPACE));
-		initialize();
-		boolean result = containsNamespace0(namespace);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"containsNamespace", new Boolean(result)); //$NON-NLS-1$
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIDFactory#getNamespaces()
-	 */
-	public List getNamespaces() {
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"getNamespaces"); //$NON-NLS-1$
-		initialize();
-		return new ArrayList(namespaces.values());
-	}
-
-	public final static boolean containsNamespace0(Namespace n) {
-		if (n == null)
-			return false;
-		return namespaces.containsKey(n.getName());
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#getNamespace(org.eclipse.ecf
-	 * .core.identity.Namespace)
-	 */
-	public Namespace getNamespace(Namespace namespace) throws SecurityException {
-		if (namespace == null)
-			return null;
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"getNamespace", namespace); //$NON-NLS-1$
-		checkPermission(new NamespacePermission(namespace.toString(),
-				NamespacePermission.GET_NAMESPACE));
-		initialize();
-		Namespace result = getNamespace0(namespace);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"getNamespace", result); //$NON-NLS-1$
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#getNamespaceByName(java.lang
-	 * .String)
-	 */
-	public Namespace getNamespaceByName(String name) throws SecurityException {
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"getNamespaceByName", name); //$NON-NLS-1$
-		initialize();
-		Namespace result = getNamespace0(name);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"getNamespaceByName", result); //$NON-NLS-1$
-		return result;
-	}
-
-	protected final static Namespace getNamespace0(Namespace n) {
-		if (n == null)
-			return null;
-		return (Namespace) namespaces.get(n.getName());
-	}
-
-	protected final static Namespace getNamespace0(String name) {
-		if (name == null)
-			return null;
-		return (Namespace) namespaces.get(name);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIDFactory#createGUID()
-	 */
-	public ID createGUID() throws IDCreateException {
-		return createGUID(GUID.DEFAULT_BYTE_LENGTH);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIDFactory#createGUID(int)
-	 */
-	public ID createGUID(int length) throws IDCreateException {
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"createGUID", new Integer(length)); //$NON-NLS-1$
-		Namespace namespace = new GUID.GUIDNamespace();
-		ID result = createID(namespace, new Integer[] { new Integer(length) });
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"createGUID", result); //$NON-NLS-1$
-		return result;
-	}
-
-	protected static void logAndThrow(String s, Throwable t)
-			throws IDCreateException {
-		IDCreateException e = null;
-		if (t != null) {
-			e = new IDCreateException(s + ": " + t.getClass().getName() + ": " //$NON-NLS-1$ //$NON-NLS-2$
-					+ t.getMessage(), t);
-		} else {
-			e = new IDCreateException(s);
-		}
-		Trace.throwing(Activator.PLUGIN_ID,
-				IdentityDebugOptions.EXCEPTIONS_THROWING, IDFactory.class,
-				"logAndThrow", e); //$NON-NLS-1$
-		Activator.getDefault().log(
-				new Status(IStatus.ERROR, Activator.PLUGIN_ID,
-						IDENTITY_CREATION_ERRORCODE, s, e));
-		throw e;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#createID(org.eclipse.ecf.core
-	 * .identity.Namespace, java.lang.Object[])
-	 */
-	public ID createID(Namespace n, Object[] args) throws IDCreateException {
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"createID", new Object[] { n, Trace.getArgumentsString(args) }); //$NON-NLS-1$
-		// Verify namespace is non-null
-		if (n == null)
-			logAndThrow("Namespace cannot be null", null); //$NON-NLS-1$
-		initialize();
-		// Make sure that namespace is in table of known namespace. If not,
-		// throw...we don't create any instances that we don't know about!
-		Namespace ns = getNamespace0(n);
-		if (ns == null)
-			logAndThrow(NLS.bind("Namespace {0} not found", n.getName()), null); //$NON-NLS-1$
-		// We're OK, go ahead and setup array of classes for call to
-		// instantiator
-		// Ask instantiator to actually create instance
-		ID result = ns.createInstance(args);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"createID", result); //$NON-NLS-1$
-		return result;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIDFactory#createID(java.lang.String,
-	 * java.lang.Object[])
-	 */
-	public ID createID(String namespaceName, Object[] args)
-			throws IDCreateException {
-		Namespace n = getNamespaceByName(namespaceName);
-		if (n == null)
-			throw new IDCreateException(NLS.bind(
-					"Namespace {0} not found", namespaceName)); //$NON-NLS-1$
-		return createID(n, args);
-	}
-
-	public ID createID(Namespace namespace, String uri)
-			throws IDCreateException {
-		return createID(namespace, new Object[] { uri });
-	}
-
-	public ID createID(String namespace, String uri) throws IDCreateException {
-		return createID(namespace, new Object[] { uri });
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#createStringID(java.lang.String)
-	 */
-	public ID createStringID(String idstring) throws IDCreateException {
-		if (idstring == null)
-			throw new IDCreateException("StringID cannot be null"); //$NON-NLS-1$
-		Namespace n = new StringID.StringIDNamespace();
-		return createID(n, new String[] { idstring });
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIDFactory#createLongID(long)
-	 */
-	public ID createLongID(long l) throws IDCreateException {
-		Namespace n = new LongID.LongNamespace();
-		return createID(n, new Long[] { new Long(l) });
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.core.identity.IIDFactory#removeNamespace(org.eclipse.
-	 * ecf.core.identity.Namespace)
-	 */
-	public Namespace removeNamespace(Namespace n) throws SecurityException {
-		if (n == null)
-			return null;
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, IDFactory.class,
-				"removeNamespace", n); //$NON-NLS-1$
-		checkPermission(new NamespacePermission(n.toString(),
-				NamespacePermission.REMOVE_NAMESPACE));
-		initialize();
-		Namespace result = removeNamespace0(n);
-		Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, IDFactory.class,
-				"removeNamespace", result); //$NON-NLS-1$
-		return result;
-	}
-
-	protected final static Namespace removeNamespace0(Namespace n) {
-		if (n == null)
-			return null;
-		return (Namespace) namespaces.remove(n.getName());
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
deleted file mode 100644
index d091008..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.identity;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A unique ID class based upon Long/long
- * 
- */
-public class LongID extends BaseID {
-	private static final long serialVersionUID = 4049072748317914423L;
-
-	Long value = null;
-
-	public static class LongNamespace extends Namespace {
-		private static final long serialVersionUID = -1580533392719331665L;
-
-		public LongNamespace() {
-			super(LongID.class.getName(), "LongID Namespace"); //$NON-NLS-1$
-		}
-
-		private String getInitFromExternalForm(Object[] args) {
-			if (args == null || args.length < 1 || args[0] == null)
-				return null;
-			if (args[0] instanceof String) {
-				String arg = (String) args[0];
-				if (arg.startsWith(getScheme() + Namespace.SCHEME_SEPARATOR)) {
-					int index = arg.indexOf(Namespace.SCHEME_SEPARATOR);
-					if (index >= arg.length())
-						return null;
-					return arg.substring(index + 1);
-				}
-			}
-			return null;
-		}
-
-		/**
-		 * @param args must not be <code>null></code>
-		 * @return ID created.  Will not be <code>null</code>.
-		 * @throws IDCreateException never thrown
-		 */
-		public ID createInstance(Object[] args) throws IDCreateException {
-			try {
-				String init = getInitFromExternalForm(args);
-				if (init != null)
-					return new LongID(this, Long.decode(init));
-				return new LongID(this, (Long) args[0]);
-			} catch (Exception e) {
-				throw new IDCreateException(NLS.bind("{0} createInstance()", getName()), e); //$NON-NLS-1$
-			}
-		}
-
-		public String getScheme() {
-			return LongID.class.toString();
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance()
-		 */
-		public Class[][] getSupportedParameterTypes() {
-			return new Class[][] {{Long.class}};
-		}
-	}
-
-	protected LongID(Namespace n, Long v) {
-		super(n);
-		value = v;
-	}
-
-	protected LongID(Namespace n, long v) {
-		super(n);
-		value = new Long(v);
-	}
-
-	protected int namespaceCompareTo(BaseID o) {
-		Long ovalue = ((LongID) o).value;
-		return value.compareTo(ovalue);
-	}
-
-	protected boolean namespaceEquals(BaseID o) {
-		if (!(o instanceof LongID))
-			return false;
-		LongID obj = (LongID) o;
-		return value.equals(obj.value);
-	}
-
-	protected String namespaceGetName() {
-		return value.toString();
-	}
-
-	protected int namespaceHashCode() {
-		return value.hashCode();
-	}
-
-	public long longValue() {
-		return value.longValue();
-	}
-
-	public String toString() {
-		StringBuffer sb = new StringBuffer("LongID["); //$NON-NLS-1$
-		sb.append(value).append("]"); //$NON-NLS-1$
-		return sb.toString();
-
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
deleted file mode 100644
index 0378a82..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.identity;
-
-import java.io.Serializable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.internal.core.identity.Activator;
-
-/**
- * Namespace base class.
- * <p>
- * This class and subclasses define a namespace for the creation and management
- * of ID instances. Creation of ID instances is accomplished via the
- * {@link #createInstance(Object[])} method, implemented by subclasses of this
- * Namespace superclass.
- * <p>
- * All Namespace instances must have a unique name passed to the Namespace upon
- * construction.
- * <p>
- * Typically Namespace instances are created via plugins that define extensions
- * of the org.eclipse.ecf.namespace extension point. For example, to define a
- * new Namespace subclass XMPPNamespace with name "ecf.xmpp" and add it to the
- * ECF extension registry:
- * 
- * <pre>
- *        <extension
- *             point="org.eclipse.ecf.namespace">
- *          <namespace
- *                class="XMPPNamespace"
- *                name="ecf.xmpp"/>
- *        </extension>
- * </pre>
- * 
- * @see ID
- */
-public abstract class Namespace implements Serializable, IAdaptable {
-
-	private static final long serialVersionUID = 3976740272094720312L;
-
-	public static final String SCHEME_SEPARATOR = ":"; //$NON-NLS-1$
-
-	private String name;
-
-	private String description;
-
-	private int hashCode;
-
-	private boolean isInitialized = false;
-
-	public Namespace() {
-		// public null constructor
-	}
-
-	public final boolean initialize(String n, String desc) {
-		Assert.isNotNull(n, "Namespace<init> name cannot be null"); //$NON-NLS-1$
-		if (!isInitialized) {
-			this.name = n;
-			this.description = desc;
-			this.hashCode = name.hashCode();
-			this.isInitialized = true;
-			return true;
-		}
-		return false;
-	}
-
-	public Namespace(String name, String desc) {
-		initialize(name, desc);
-	}
-
-	/**
-	 * Override of Object.equals. This equals method returns true if the
-	 * provided Object is also a Namespace instance, and the names of the two
-	 * instances match.
-	 * 
-	 * @param other
-	 *            the Object to test for equality
-	 */
-	public boolean equals(Object other) {
-		if (!(other instanceof Namespace))
-			return false;
-		return ((Namespace) other).name.equals(name);
-	}
-
-	/**
-	 * Hashcode implementation.  Subclasses should not override.
-	 * 
-	 * @return int hashCode for this Namespace.  Should be unique.
-	 */
-	public int hashCode() {
-		return hashCode;
-	}
-
-	/**
-	 * Test whether two IDs are equal to one another.
-	 * @param first the first ID.  Must not be <code>null</code>.
-	 * @param second the second ID.  Must not be <code>null</code>.
-	 * @return <code>true</code> if this ID is equal to the given ID.  <code>false</code> otherwise.
-	 */
-	protected boolean testIDEquals(BaseID first, BaseID second) {
-		// First check that namespaces are the same and non-null
-		Namespace sn = second.getNamespace();
-		if (sn == null || !this.equals(sn))
-			return false;
-		return first.namespaceEquals(second);
-	}
-
-	/**
-	 * The default implementation of this method is to call id.namespaceGetName().  Subclasses may
-	 * override.
-	 * 
-	 * @param id the ID to get the name for.  Must not be <code>null</code>.
-	 * @return String that is the unique name for the given id within this Namespace.
-	 */
-	protected String getNameForID(BaseID id) {
-		return id.namespaceGetName();
-	}
-
-	/**
-	 * The default implementation of this method is to call first.namespaceCompareTo(second).  Subclasses may
-	 * override.
-	 * 
-	 * @param first the first id to compare.  Must not be <code>null</code>.
-	 * @param second the second id to compare. Must not be <code>null</code>.
-	 * @return int as specified by {@link Comparable}.
-	 */
-	protected int getCompareToForObject(BaseID first, BaseID second) {
-		return first.namespaceCompareTo(second);
-	}
-
-	/**
-	 * The default implementation of this method is to call id.namespaceHashCode().  Subclasses may
-	 * override.
-	 * 
-	 * @param id the id in this Namespace to get the hashcode for. Must not be <code>null</code>.
-	 * @return the hashcode for the given id.  Returned value must be unique within this process.
-	 */
-	protected int getHashCodeForID(BaseID id) {
-		return id.namespaceHashCode();
-	}
-
-	/**
-	 * The default implementation of this method is to call id.namespaceToExternalForm().  Subclasses may
-	 * override.
-	 * 
-	 * @param id the id in this Namespace to convert to external form.
-	 * @return String that represents the given id in an external form.  Note that
-	 * this external form may at some later time be passed to {@link #createInstance(Object[])} as a single
-	 * String parameter, and should result in a valid ID instance of the appropriate Namespace.
-	 */
-	protected String toExternalForm(BaseID id) {
-		return id.namespaceToExternalForm();
-	}
-
-	/**
-	 * Get the name of this namespace. Must not return <code>null</code>.
-	 * 
-	 * @return String name of Namespace instance.  Must not return <code>null</code>, and
-	 * the returned value should be a globally unique name for this Namespace subclass.
-	 * 
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * Get the description, associated with this Namespace. The returned value
-	 * may be <code>null</code>.
-	 * 
-	 * @return the description associated with this Namespace.  May be <code>null</code>.
-	 */
-	public String getDescription() {
-		return description;
-	}
-
-	/**
-	 * Make an instance of this namespace. Namespace subclasses, provided by
-	 * plugins must implement this method to construct ID instances for the
-	 * given namespace.
-	 * <p>
-	 * </p>
-	 * See {@link #getSupportedParameterTypes()} to get information relevant to
-	 * deciding what parameter types are expected by this method.
-	 * <p>
-	 * </p>
-	 * 
-	 * @param parameters
-	 *            an Object[] of parameters for creating ID instances. May be
-	 *            null.
-	 * 
-	 * @return a non-null ID instance. The class used may extend BaseID or may
-	 *         implement the ID interface directly
-	 * @throws IDCreateException
-	 *             if construction fails
-	 */
-	public abstract ID createInstance(Object[] parameters) throws IDCreateException;
-
-	/**
-	 * Get the primary scheme associated with this namespace. Subclasses must
-	 * provide an implementation that returns a non-<code>null</code> scheme
-	 * identifier.  Note that the returned scheme should <b>not</b> contain the
-	 * Namespace.SCHEME_SEPARATOR (\":\").  
-	 * 
-	 * @return a String scheme identifier. Must not be <code>null</code>.
-	 */
-	public abstract String getScheme();
-
-	/**
-	 * Get an array of schemes supported by this Namespace instance. Subclasses
-	 * may override to support multiple schemes.
-	 * 
-	 * @return String[] of schemes supported by this Namespace. Will not be
-	 *         <code>null</code>, but returned array may be of length 0.
-	 */
-	public String[] getSupportedSchemes() {
-		return new String[0];
-	}
-
-	/**
-	 * Get the supported parameter types for IDs created via subsequent calls to
-	 * {@link #createInstance(Object[])}. Callers may use this method to
-	 * determine the available parameter types, and then create and pass in
-	 * conforming Object arrays to to {@link #createInstance(Object[])}.
-	 * <p>
-	 * </p>
-	 * An empty two-dimensional array (new Class[0][0]) is the default returned
-	 * by this abstract superclass. This means that the Object [] passed to
-	 * {@link #createInstance(Object[])} will be ignored.
-	 * <p>
-	 * </p>
-	 * Subsclasses should override this method to specify the parameters that
-	 * they will accept in calls to {@link #createInstance(Object[])}. The rows
-	 * of the returned Class array are the acceptable types for a given
-	 * invocation of createInstance.
-	 * <p>
-	 * </p>
-	 * Consider the following example:
-	 * <p>
-	 * </p>
-	 * 
-	 * <pre>
-	 * public Class[][] getSupportedParameterTypes() {
-	 * 	return new Class[][] { { String.class }, { String.class, String.class } };
-	 * }
-	 * </pre>
-	 * 
-	 * The above means that there are two acceptable values for the Object []
-	 * passed into {@link #createInstance(Object[])}: 1) a single String, and
-	 * 2) two Strings. These would therefore be acceptable as input to
-	 * createInstance:
-	 * 
-	 * <pre>
-	 *        ID newID1 = namespace.createInstance(new Object[] { "Hello" });
-	 *        ID newID2 = namespace.createInstance(new Object[] { "Hello", "There"}};
-	 * </pre>
-	 * 
-	 * @return Class [][] an array of class []s. Rows of the returned
-	 *         two-dimensional array define the acceptable parameter types for a
-	 *         single call to {@link #createInstance(Object[])}. If zero-length
-	 *         Class arrays are returned (i.e. Class[0][0]), then Object []
-	 *         parameters to {@link #createInstance(Object[])} will be ignored.
-	 */
-	public Class[][] getSupportedParameterTypes() {
-		return new Class[][] {{}};
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter.isInstance(this)) {
-			return this;
-		}
-		IAdapterManager manager = Activator.getDefault().getAdapterManager();
-		if (manager == null)
-			return null;
-		return manager.loadAdapter(this, adapter.getName());
-	}
-
-	public String toString() {
-		StringBuffer b = new StringBuffer("Namespace["); //$NON-NLS-1$
-		b.append("name=").append(name).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-		b.append("scheme=").append(getScheme()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-		b.append("description=").append("]"); //$NON-NLS-1$ //$NON-NLS-2$
-		return b.toString();
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
deleted file mode 100644
index 9e4a3b4..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.identity;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A string-based identity
- * 
- */
-public class StringID extends BaseID {
-	private static final long serialVersionUID = 3256437019155446068L;
-
-	public static class StringIDNamespace extends Namespace {
-		private static final long serialVersionUID = 7924280015192029963L;
-
-		public StringIDNamespace(String name, String desc) {
-			super(name, desc);
-		}
-
-		public StringIDNamespace() {
-			super(StringID.class.getName(), "StringID Namespace"); //$NON-NLS-1$
-		}
-
-		private String getInitFromExternalForm(Object[] args) {
-			if (args == null || args.length < 1 || args[0] == null)
-				return null;
-			if (args[0] instanceof String) {
-				String arg = (String) args[0];
-				if (arg.startsWith(getScheme() + Namespace.SCHEME_SEPARATOR)) {
-					int index = arg.indexOf(Namespace.SCHEME_SEPARATOR);
-					if (index >= arg.length())
-						return null;
-					return arg.substring(index + 1);
-				}
-			}
-			return null;
-		}
-
-		public ID createInstance(Object[] parameters) throws IDCreateException {
-			try {
-				String init = getInitFromExternalForm(parameters);
-				if (init != null)
-					return new StringID(this, init);
-				return new StringID(this, (String) parameters[0]);
-			} catch (Exception e) {
-				throw new IDCreateException(NLS.bind("{0} createInstance()", StringIDNamespace.this.getName()), e); //$NON-NLS-1$
-			}
-		}
-
-		public String getScheme() {
-			return StringID.class.getName();
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance()
-		 */
-		public Class[][] getSupportedParameterTypes() {
-			return new Class[][] {{String.class}};
-		}
-	}
-
-	protected String value;
-
-	/**
-	 * Protected constructor for factory-based construction
-	 * 
-	 * @param n
-	 *            the Namespace this identity will belong to
-	 * @param s
-	 *            the String defining this StringID
-	 */
-	protected StringID(Namespace n, String s) {
-		super(n);
-		value = s;
-		setEmptyNamespace();
-	}
-
-	public int compareTo(Object o) {
-		setEmptyNamespace();
-		return super.compareTo(o);
-	}
-
-	public boolean equals(Object o) {
-		setEmptyNamespace();
-		return super.equals(o);
-	}
-
-	public String getName() {
-		setEmptyNamespace();
-		return super.getName();
-	}
-
-	public int hashCode() {
-		setEmptyNamespace();
-		return super.hashCode();
-	}
-
-	public Namespace getNamespace() {
-		setEmptyNamespace();
-		return namespace;
-	}
-
-	public String toExternalForm() {
-		setEmptyNamespace();
-		return super.toExternalForm();
-	}
-
-	public String toString() {
-		setEmptyNamespace();
-		int strlen = value.length();
-		StringBuffer sb = new StringBuffer(strlen + 10);
-		sb.insert(0, "StringID[").insert(9, value).insert(strlen + 9, ']'); //$NON-NLS-1$
-		return sb.toString();
-	}
-
-	protected int namespaceCompareTo(BaseID obj) {
-		return getName().compareTo(obj.getName());
-	}
-
-	protected boolean namespaceEquals(BaseID obj) {
-		if (!(obj instanceof StringID))
-			return false;
-		StringID o = (StringID) obj;
-		return value.equals(o.getName());
-	}
-
-	protected String namespaceGetName() {
-		return value;
-	}
-
-	protected int namespaceHashCode() {
-		return value.hashCode() ^ getClass().hashCode();
-	}
-
-	protected synchronized void setEmptyNamespace() {
-		if (namespace == null) {
-			namespace = IDFactory.getDefault().getNamespaceByName(StringID.class.getName());
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
deleted file mode 100644
index d71635e..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.util;
-
-import java.text.SimpleDateFormat;
-import java.util.*;
-import org.eclipse.ecf.internal.core.identity.Activator;
-import org.eclipse.ecf.internal.core.identity.Messages;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * A utility for tracing debug information. Provides a simple interface for
- * filtering and generating trace output.
- * 
- */
-public class Trace {
-
-	/**
-	 * private constructor for the static class.
-	 */
-	private Trace() {
-		super();
-	}
-
-	/**
-	 * String containing an open parenthesis.
-	 * 
-	 */
-	protected static final String PARENTHESIS_OPEN = "("; //$NON-NLS-1$
-
-	/**
-	 * String containing a close parenthesis.
-	 * 
-	 */
-	protected static final String PARENTHESIS_CLOSE = ")"; //$NON-NLS-1$
-
-	/**
-	 * String containing TRACE
-	 * 
-	 */
-	protected static final String TRACE_STR = "TRACE"; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the changing of values.
-	 * 
-	 */
-	protected static final String PREFIX_TRACING = "TRACING "; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the changing of values.
-	 * 
-	 */
-	protected static final String PREFIX_CHANGING = "CHANGING "; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the catching of throwables.
-	 * 
-	 */
-	protected static final String PREFIX_CATCHING = "CAUGHT "; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the throwing of throwables.
-	 * 
-	 */
-	protected static final String PREFIX_THROWING = "THROWN "; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the entering of methods.
-	 * 
-	 */
-	protected static final String PREFIX_ENTERING = "ENTERING "; //$NON-NLS-1$
-
-	/**
-	 * Prefix for tracing the exiting of methods.
-	 * 
-	 */
-	protected static final String PREFIX_EXITING = "EXITING "; //$NON-NLS-1$
-
-	/**
-	 * Separator for methods.
-	 * 
-	 */
-	protected static final String SEPARATOR_METHOD = "#"; //$NON-NLS-1$
-
-	/**
-	 * Separator for parameters.
-	 * 
-	 */
-	protected static final String SEPARATOR_PARAMETER = ", "; //$NON-NLS-1$
-
-	/**
-	 * Separator for return values.
-	 * 
-	 */
-	protected static final String SEPARATOR_RETURN = ":"; //$NON-NLS-1$
-
-	/**
-	 * Separator containing a space.
-	 * 
-	 */
-	protected static final String SEPARATOR_SPACE = " "; //$NON-NLS-1$
-
-	/**
-	 * Label indicating old value.
-	 * 
-	 */
-	protected static final String LABEL_OLD_VALUE = "old="; //$NON-NLS-1$
-
-	/**
-	 * Label indicating new value.
-	 * 
-	 */
-	protected static final String LABEL_NEW_VALUE = "new="; //$NON-NLS-1$
-
-	/**
-	 * The cached debug options (for optimization).
-	 */
-	private static final Map cachedOptions = new HashMap();
-
-	/**
-	 * Retrieves a Boolean value indicating whether tracing is enabled for the
-	 * specified plug-in.
-	 * 
-	 * @return Whether tracing is enabled for the plug-in.
-	 * @param pluginId
-	 *            The symbolic plugin id for which to determine trace enablement.
-	 * 
-	 */
-	protected static boolean shouldTrace(String pluginId) {
-		return shouldTrace0(pluginId + "/debug"); //$NON-NLS-1$
-	}
-
-	protected static boolean shouldTrace0(String option) {
-		if (option == null)
-			return false;
-		Activator activator = Activator.getDefault();
-		if (activator == null)
-			return false;
-		DebugOptions debugOptions = activator.getDebugOptions();
-		if (debugOptions == null)
-			return false;
-		String result = debugOptions.getOption(option);
-		return (result == null) ? false : result.equalsIgnoreCase("true"); //$NON-NLS-1$
-	}
-
-	/**
-	 * Retrieves a Boolean value indicating whether tracing is enabled for the
-	 * specified debug option of the specified plug-in.
-	 * 
-	 * @return Whether tracing is enabled for the debug option of the plug-in.
-	 * @param pluginId
-	 *            The plug-in for which to determine trace enablement.
-	 * @param option
-	 *            The debug option for which to determine trace enablement.
-	 * 
-	 */
-	public static boolean shouldTrace(String pluginId, String option) {
-		if (pluginId == null)
-			return false;
-		if (shouldTrace(pluginId)) {
-			Boolean value = null;
-
-			synchronized (cachedOptions) {
-				value = (Boolean) cachedOptions.get(option);
-				if (null == value) {
-					value = shouldTrace0(option) ? Boolean.TRUE : Boolean.FALSE;
-					cachedOptions.put(option, value);
-				}
-			}
-
-			return value.booleanValue();
-		}
-
-		return false;
-	}
-
-	/**
-	 * Retrieves a textual representation of the specified argument.
-	 * 
-	 * @return A textual representation of the specified argument.
-	 * @param argument
-	 *            The argument for which to retrieve a textual representation.
-	 * 
-	 */
-	public static String getArgumentString(Object argument) {
-		if (argument == null)
-			return "null"; //$NON-NLS-1$
-		if (argument instanceof byte[])
-			return getStringFromByteArray((byte[]) argument);
-		if (argument.getClass().isArray())
-			return getArgumentsString((Object[]) argument);
-		return String.valueOf(argument);
-	}
-
-	private static String getStringFromByteArray(byte[] bytes) {
-		StringBuffer buf = new StringBuffer("["); //$NON-NLS-1$
-		for (int i = 0; i < bytes.length; i++) {
-			buf.append(bytes[i]);
-			if (i == (bytes.length - 1))
-				buf.append("]"); //$NON-NLS-1$
-			else
-				buf.append(","); //$NON-NLS-1$
-		}
-		return buf.toString();
-	}
-
-	/**
-	 * Retrieves a textual representation of the specified arguments.
-	 * 
-	 * @return A textual representation of the specified arguments.
-	 * @param arguments
-	 *            The arguments for which to retrieve a textual representation.
-	 * 
-	 */
-	public static String getArgumentsString(Object[] arguments) {
-		if (arguments == null)
-			return "[]"; //$NON-NLS-1$
-		StringBuffer buffer = new StringBuffer("["); //$NON-NLS-1$
-
-		for (int i = 0; i < arguments.length; i++) {
-			buffer.append(getArgumentString(arguments[i]));
-
-			if (i < arguments.length - 1)
-				buffer.append(SEPARATOR_PARAMETER);
-		}
-		buffer.append("]"); //$NON-NLS-1$
-		return buffer.toString();
-	}
-
-	/**
-	 * Traces the specified message.
-	 * 
-	 * @param message
-	 *            The message to be traced.
-	 * 
-	 */
-	protected static void trace(String message) {
-		StringBuffer buf = new StringBuffer(PARENTHESIS_OPEN);
-		buf.append(TRACE_STR).append(PARENTHESIS_CLOSE).append(getTimeString()).append(message).append(SEPARATOR_SPACE);
-		System.out.println(buf.toString());
-	}
-
-	/**
-	 * Get date and time string
-	 * 
-	 * @return String with current date and time
-	 */
-	protected static String getTimeString() {
-		Date d = new Date();
-		SimpleDateFormat df = new SimpleDateFormat(Messages.Trace_Date_Time_Format);
-		return df.format(d);
-	}
-
-	/**
-	 * Traces the specified message from the specified plug-in.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param message
-	 *            The message to be traced.
-	 * 
-	 */
-	public static void trace(String pluginId, String message) {
-		if (shouldTrace(pluginId))
-			trace(message);
-	}
-
-	/**
-	 * Traces the specified message from the specified plug-in for the specified
-	 * debug option.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param message
-	 *            The message to be traced.
-	 * 
-	 */
-	public static void trace(String pluginId, String option, String message) {
-		if (shouldTrace(pluginId, option))
-			trace(message);
-	}
-
-	/**
-	 * Traces the specified message from the specified plug-in for the specified
-	 * debug option.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being entered.
-	 * @param methodName
-	 *            The name of method that is being entered.
-	 * @param message
-	 *            The message to be traced.
-	 * 
-	 */
-	public static void trace(String pluginId, String option, Class clazz, String methodName, String message) {
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_TRACING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName);
-			buf.append(PARENTHESIS_OPEN).append(message).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-	}
-
-	/**
-	 * Traces the changing of a value.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param valueDescription
-	 *            The description of the value which is changing.
-	 * @param oldValue
-	 *            The old value.
-	 * @param newValue
-	 *            The new value.
-	 */
-	public static void changing(String pluginId, String option, String valueDescription, Object oldValue, Object newValue) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
-			buf.append(valueDescription).append(SEPARATOR_SPACE).append(LABEL_OLD_VALUE).append(getArgumentString(oldValue));
-			buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE).append(getArgumentString(newValue));
-			trace(buf.toString());
-		}
-	}
-
-	/**
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class in which the value is changing.
-	 * @param methodName
-	 *            The name of the method in which the value is changing.
-	 * @param valueDescription
-	 *            The description of the value which is changing.
-	 * @param oldValue
-	 *            The old value.
-	 * @param newValue
-	 *            The new value.
-	 */
-	public static void changing(String pluginId, String option, Class clazz, String methodName, String valueDescription, Object oldValue, Object newValue) {
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
-			buf.append(valueDescription).append(SEPARATOR_SPACE).append(LABEL_OLD_VALUE).append(getArgumentString(oldValue));
-			buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE).append(getArgumentString(newValue));
-			buf.append(SEPARATOR_SPACE).append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
-			buf.append(methodName).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-	}
-
-	/**
-	 * Traces the catching of the specified throwable in the specified method of
-	 * the specified class.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class in which the throwable is being caught.
-	 * @param methodName
-	 *            The name of the method in which the throwable is being caught.
-	 * @param throwable
-	 *            The throwable that is being caught.
-	 * 
-	 */
-	public static void catching(String pluginId, String option, Class clazz, String methodName, Throwable throwable) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
-			buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
-			buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
-			buf.append(methodName).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-			throwable.printStackTrace(System.err);
-		}
-	}
-
-	/**
-	 * Traces the throwing of the specified throwable from the specified method
-	 * of the specified class.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class from which the throwable is being thrown.
-	 * @param methodName
-	 *            The name of the method from which the throwable is being
-	 *            thrown.
-	 * @param throwable
-	 *            The throwable that is being thrown.
-	 * 
-	 */
-	public static void throwing(String pluginId, String option, Class clazz, String methodName, Throwable throwable) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_THROWING);
-			buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
-			buf.append(PARENTHESIS_OPEN).append(clazz.getName()).append(SEPARATOR_METHOD);
-			buf.append(methodName).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-			throwable.printStackTrace(System.err);
-		}
-	}
-
-	/**
-	 * Traces the entering into the specified method of the specified class.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being entered.
-	 * @param methodName
-	 *            The name of method that is being entered.
-	 * 
-	 */
-	public static void entering(String pluginId, String option, Class clazz, String methodName) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName).append(PARENTHESIS_OPEN).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-	}
-
-	/**
-	 * Traces the entering into the specified method of the specified class,
-	 * with the specified parameter.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being entered.
-	 * @param methodName
-	 *            The name of method that is being entered.
-	 * @param parameter
-	 *            The parameter to the method being entered.
-	 * 
-	 */
-	public static void entering(String pluginId, String option, Class clazz, String methodName, Object parameter) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName);
-			buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameter)).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-
-	}
-
-	/**
-	 * Traces the entering into the specified method of the specified class,
-	 * with the specified parameters.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being entered.
-	 * @param methodName
-	 *            The name of method that is being entered.
-	 * @param parameters
-	 *            The parameters to the method being entered.
-	 * 
-	 */
-	public static void entering(String pluginId, String option, Class clazz, String methodName, Object[] parameters) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName);
-			buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameters)).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-
-	}
-
-	/**
-	 * Traces the exiting from the specified method of the specified class.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being exited.
-	 * @param methodName
-	 *            The name of method that is being exited.
-	 * 
-	 */
-	public static void exiting(String pluginId, String option, Class clazz, String methodName) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName);
-			trace(buf.toString());
-		}
-	}
-
-	/**
-	 * Traces the exiting from the specified method of the specified class, with
-	 * the specified return value.
-	 * 
-	 * @param pluginId
-	 *            The plug-in from which to trace.
-	 * @param option
-	 *            The debug option for which to trace.
-	 * @param clazz
-	 *            The class whose method is being exited.
-	 * @param methodName
-	 *            The name of method that is being exited.
-	 * @param returnValue
-	 *            The return value of the method being exited.
-	 * 
-	 */
-	public static void exiting(String pluginId, String option, Class clazz, String methodName, Object returnValue) {
-
-		if (shouldTrace(pluginId, option)) {
-			StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz.getName());
-			buf.append(SEPARATOR_METHOD).append(methodName);
-			buf.append(PARENTHESIS_OPEN).append(getArgumentString(returnValue)).append(PARENTHESIS_CLOSE);
-			trace(buf.toString());
-		}
-
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
deleted file mode 100644
index 401b218..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.internal.core.identity;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.core.identity.*;
-import org.eclipse.ecf.core.util.*;
-import org.eclipse.osgi.service.debug.DebugOptions;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator implements BundleActivator {
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.eclipse.ecf.identity"; //$NON-NLS-1$
-
-	protected static final String NAMESPACE_NAME = "namespace"; //$NON-NLS-1$
-
-	protected static final String NAMESPACE_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
-			+ NAMESPACE_NAME;
-
-	protected static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
-
-	protected static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
-
-	protected static final int REMOVE_NAMESPACE_ERRORCODE = 100;
-
-	protected static final int FACTORY_NAME_COLLISION_ERRORCODE = 200;
-
-	protected static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
-
-	// The shared instance
-	private static Activator plugin;
-
-	private BundleContext context = null;
-
-	private IRegistryChangeListener registryManager = null;
-
-	private ServiceRegistration idFactoryServiceRegistration = null;
-
-	private ServiceTracker extensionRegistryTracker = null;
-
-	private ServiceTracker debugOptionsTracker = null;
-
-	private ServiceTracker logServiceTracker = null;
-
-	private LogService logService = null;
-
-	private ServiceTracker adapterManagerTracker = null;
-
-	public synchronized IAdapterManager getAdapterManager() {
-		if (this.context == null)
-			return null;
-		// First, try to get the adapter manager via
-		if (adapterManagerTracker == null) {
-			adapterManagerTracker = new ServiceTracker(this.context,
-					IAdapterManager.class.getName(), null);
-			adapterManagerTracker.open();
-		}
-		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker
-				.getService();
-		// Then, if the service isn't there, try to get from Platform class via
-		// PlatformHelper class
-		if (adapterManager == null)
-			adapterManager = PlatformHelper.getPlatformAdapterManager();
-		if (adapterManager == null)
-			getDefault().log(
-					new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR,
-							"Cannot get adapter manager", null)); //$NON-NLS-1$
-		return adapterManager;
-	}
-
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-		// public null constructor
-	}
-
-	public synchronized IExtensionRegistry getExtensionRegistry() {
-		if (this.context == null)
-			return null;
-		if (extensionRegistryTracker == null) {
-			extensionRegistryTracker = new ServiceTracker(context,
-					IExtensionRegistry.class.getName(), null);
-			extensionRegistryTracker.open();
-		}
-		return (IExtensionRegistry) extensionRegistryTracker.getService();
-	}
-
-	public synchronized DebugOptions getDebugOptions() {
-		if (context == null)
-			return null;
-		if (debugOptionsTracker == null) {
-			debugOptionsTracker = new ServiceTracker(context,
-					DebugOptions.class.getName(), null);
-			debugOptionsTracker.open();
-		}
-		return (DebugOptions) debugOptionsTracker.getService();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext ctxt) throws Exception {
-		plugin = this;
-		this.context = ctxt;
-		// Register IIDFactory service
-		idFactoryServiceRegistration = context.registerService(IIDFactory.class
-				.getName(), IDFactory.getDefault(), null);
-
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null) {
-			this.registryManager = new IdentityRegistryManager();
-			reg.addRegistryChangeListener(registryManager);
-		}
-	}
-
-	public BundleContext getBundleContext() {
-		return context;
-	}
-
-	protected class IdentityRegistryManager implements IRegistryChangeListener {
-		public void registryChanged(IRegistryChangeEvent event) {
-			final IExtensionDelta delta[] = event.getExtensionDeltas(PLUGIN_ID,
-					NAMESPACE_NAME);
-			for (int i = 0; i < delta.length; i++) {
-				switch (delta[i].getKind()) {
-				case IExtensionDelta.ADDED:
-					addNamespaceExtensions(delta[i].getExtension()
-							.getConfigurationElements());
-					break;
-				case IExtensionDelta.REMOVED:
-					removeNamespaceExtensions(delta[i].getExtension()
-							.getConfigurationElements());
-					break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Remove extensions for identity namespace extension point
-	 * 
-	 * @param members
-	 *            the members to remove
-	 */
-	protected void removeNamespaceExtensions(IConfigurationElement[] members) {
-		org.eclipse.ecf.core.util.Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, Activator.class,
-				"removeNamespaceExtensions", members); //$NON-NLS-1$
-		for (int m = 0; m < members.length; m++) {
-			final IConfigurationElement member = members[m];
-			String name = null;
-			try {
-				name = member.getAttribute(NAME_ATTRIBUTE);
-				if (name == null) {
-					name = member.getAttribute(CLASS_ATTRIBUTE);
-				}
-				if (name == null)
-					continue;
-				final IIDFactory factory = IDFactory.getDefault();
-				final Namespace n = factory.getNamespaceByName(name);
-				if (n == null || !factory.containsNamespace(n)) {
-					continue;
-				}
-				// remove
-				factory.removeNamespace(n);
-				org.eclipse.ecf.core.util.Trace.trace(Activator.PLUGIN_ID,
-						IdentityDebugOptions.DEBUG,
-						"removeNamespaceExtensions.removedNamespace(" //$NON-NLS-1$
-								+ n + ")"); //$NON-NLS-1$
-			} catch (final Exception e) {
-				org.eclipse.ecf.core.util.Trace.catching(Activator.PLUGIN_ID,
-						IdentityDebugOptions.EXCEPTIONS_CATCHING,
-						Activator.class, "removeNamespaceExtensions", e); //$NON-NLS-1$
-				getDefault().log(
-						new Status(IStatus.ERROR, Activator.PLUGIN_ID,
-								REMOVE_NAMESPACE_ERRORCODE,
-								"Exception removing namespace", e)); //$NON-NLS-1$
-			}
-		}
-		org.eclipse.ecf.core.util.Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, Activator.class,
-				"removeNamespaceExtensions", members); //$NON-NLS-1$
-	}
-
-	public Bundle getBundle() {
-		if (context == null)
-			return null;
-		return context.getBundle();
-	}
-
-	protected synchronized LogService getLogService() {
-		if (this.context == null)
-			return null;
-		if (logServiceTracker == null) {
-			logServiceTracker = new ServiceTracker(this.context,
-					LogService.class.getName(), null);
-			logServiceTracker.open();
-		}
-		logService = (LogService) logServiceTracker.getService();
-		if (logService == null)
-			logService = new SystemLogService(PLUGIN_ID);
-		return logService;
-	}
-
-	public void log(IStatus status) {
-		if (logService == null)
-			logService = getLogService();
-
-		if (logService != null)
-			logService.log(LogHelper.getLogCode(status), LogHelper
-					.getLogMessage(status), status.getException());
-	}
-
-	/**
-	 * Add identity namespace extension point extensions
-	 * 
-	 * @param members
-	 *            the members to add
-	 */
-	protected void addNamespaceExtensions(IConfigurationElement[] members) {
-		org.eclipse.ecf.core.util.Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_ENTERING, Activator.class,
-				"addNamespaceExtensions", members); //$NON-NLS-1$
-		final String bundleName = getDefault().getBundle().getSymbolicName();
-		for (int m = 0; m < members.length; m++) {
-			final IConfigurationElement member = members[m];
-			// Get the label of the extender plugin and the ID of the
-			// extension.
-			final IExtension extension = member.getDeclaringExtension();
-			String nsName = null;
-			try {
-				final Namespace ns = (Namespace) member
-						.createExecutableExtension(CLASS_ATTRIBUTE);
-				final String clazz = ns.getClass().getName();
-				nsName = member.getAttribute(NAME_ATTRIBUTE);
-				if (nsName == null) {
-					nsName = clazz;
-				}
-				final String nsDescription = member
-						.getAttribute(DESCRIPTION_ATTRIBUTE);
-				ns.initialize(nsName, nsDescription);
-				org.eclipse.ecf.core.util.Trace.trace(Activator.PLUGIN_ID,
-						IdentityDebugOptions.DEBUG,
-						"addNamespaceExtensions.createdNamespace(" + ns + ")"); //$NON-NLS-1$ //$NON-NLS-2$
-				// Check to see if we have a namespace name collision
-				if (!IDFactory.containsNamespace0(ns)) {
-					// Now add to known namespaces
-					IDFactory.addNamespace0(ns);
-					org.eclipse.ecf.core.util.Trace
-							.trace(
-									Activator.PLUGIN_ID,
-									IdentityDebugOptions.DEBUG,
-									"addNamespaceExtensions.addedNamespaceToFactory(" + ns //$NON-NLS-1$
-											+ ")"); //$NON-NLS-1$
-				} else {
-					getDefault().log(
-							new Status(IStatus.WARNING, Activator.PLUGIN_ID,
-									IStatus.WARNING,
-									"Namespace collision for name=" + nsName,
-									null));
-				}
-			} catch (final CoreException e) {
-				getDefault().log(e.getStatus());
-				org.eclipse.ecf.core.util.Trace.catching(Activator.PLUGIN_ID,
-						IdentityDebugOptions.EXCEPTIONS_CATCHING,
-						Activator.class, "addNamespaceExtensions", e); //$NON-NLS-1$
-			} catch (final Exception e) {
-				getDefault()
-						.log(
-								new Status(
-										IStatus.ERROR,
-										bundleName,
-										FACTORY_NAME_COLLISION_ERRORCODE,
-										"name=" //$NON-NLS-1$
-												+ nsName
-												+ ";extension point id=" //$NON-NLS-1$
-												+ extension
-														.getExtensionPointUniqueIdentifier(),
-										null));
-				org.eclipse.ecf.core.util.Trace.catching(Activator.PLUGIN_ID,
-						IdentityDebugOptions.EXCEPTIONS_CATCHING,
-						Activator.class, "addNamespaceExtensions", e); //$NON-NLS-1$
-			}
-		}
-		org.eclipse.ecf.core.util.Trace.exiting(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, Activator.class,
-				"addNamespaceExtensions"); //$NON-NLS-1$
-	}
-
-	/**
-	 * Setup identity namespace extension point
-	 * 
-	 */
-	public void setupNamespaceExtensionPoint() {
-		// Process extension points
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null) {
-			final IExtensionPoint extensionPoint = reg
-					.getExtensionPoint(NAMESPACE_EPOINT);
-			if (extensionPoint == null) {
-				return;
-			}
-			addNamespaceExtensions(extensionPoint.getConfigurationElements());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
-	 */
-	public void stop(BundleContext ctxt) throws Exception {
-		Trace.entering(Activator.PLUGIN_ID,
-				IdentityDebugOptions.METHODS_EXITING, Activator.class, "stop"); //$NON-NLS-1$
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null)
-			reg.removeRegistryChangeListener(registryManager);
-		registryManager = null;
-		if (logServiceTracker != null) {
-			logServiceTracker.close();
-			logServiceTracker = null;
-			logService = null;
-		}
-		if (debugOptionsTracker != null) {
-			debugOptionsTracker.close();
-			debugOptionsTracker = null;
-		}
-		if (extensionRegistryTracker != null) {
-			extensionRegistryTracker.close();
-			extensionRegistryTracker = null;
-		}
-		if (idFactoryServiceRegistration != null) {
-			idFactoryServiceRegistration.unregister();
-			idFactoryServiceRegistration = null;
-		}
-		if (adapterManagerTracker != null) {
-			adapterManagerTracker.close();
-			adapterManagerTracker = null;
-		}
-		context = null;
-		plugin = null;
-	}
-
-	/**
-	 * Returns the shared instance
-	 * 
-	 * @return the shared instance
-	 */
-	public synchronized static Activator getDefault() {
-		if (plugin == null) {
-			plugin = new Activator();
-		}
-		return plugin;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/IdentityDebugOptions.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/IdentityDebugOptions.java
deleted file mode 100644
index 4480e48..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/IdentityDebugOptions.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.internal.core.identity;
-
-public interface IdentityDebugOptions {
-
-	public static final String DEBUG = Activator.PLUGIN_ID + "/debug"; //$NON-NLS-1$
-
-	public static final String EXCEPTIONS_CATCHING = DEBUG + "/exceptions/catching"; //$NON-NLS-1$
-
-	public static final String EXCEPTIONS_THROWING = DEBUG + "/exceptions/throwing"; //$NON-NLS-1$
-
-	public static final String METHODS_ENTERING = DEBUG + "/methods/entering"; //$NON-NLS-1$
-
-	public static final String METHODS_EXITING = DEBUG + "/methods/exiting"; //$NON-NLS-1$
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java
deleted file mode 100644
index eff592d..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Messages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.core.identity;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.core.identity.messages"; //$NON-NLS-1$
-	public static String Base64_Input_Data_Not_Null;
-	public static String Base64_Invalid_Value;
-	public static String GUID_GUID_Creation_Failure;
-	public static String GUID_GUID_Namespace_Description_Default;
-	public static String GUID_IBM_SECURE_RANDOM;
-	public static String GUID_SHA1;
-	public static String Trace_Date_Time_Format;
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// private null constructor
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties b/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties
deleted file mode 100644
index 1a55598..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/messages.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-GUID_GUID_Namespace_Description_Default=GUID Namespace
-GUID_IBM_SECURE_RANDOM=IBMSECURERANDOM
-GUID_SHA1=SHA1PRNG
-Trace_Date_Time_Format=[MM/dd/yy;HH:mm:ss:SSS]
-Base64_Input_Data_Not_Null=Input data cannot be null
-Base64_Invalid_Value=Invalid value "{0}" in base64 string
-GUID_GUID_Creation_Failure=GUID creation failure: 
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e074f31..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Mon May 04 19:10:49 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF
deleted file mode 100644
index 3a9f532..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer.httpclient.ssl
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %plugin.provider
-Fragment-Host: org.eclipse.ecf.provider.filetransfer.httpclient
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Bundle-Localization: plugin
-Import-Package: org.apache.commons.httpclient.protocol
-
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties
deleted file mode 100644
index 01e33c5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               asl-v20.txt,\
-               plugin.properties
-src.includes = plugin.properties,\
-               asl-v20.txt,\
-               about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 899955f..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Mon May 04 15:22:38 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF
deleted file mode 100644
index 5278cc1..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer.httpclient;singleton:=true
-Bundle-Version: 3.0.1.qualifier
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.ecf.provider.filetransfer,
- org.eclipse.ecf,
- org.eclipse.ecf.filetransfer
-Eclipse-LazyStart: true
-Import-Package: org.apache.commons.httpclient;version="[3.0.1,3.1.0]",
- org.apache.commons.httpclient.auth;version="[3.0.1,3.1.0]",
- org.apache.commons.httpclient.methods;version="[3.0.1,3.1.0]",
- org.apache.commons.httpclient.params;version="[3.0.1,3.1.0]",
- org.apache.commons.httpclient.protocol;version="[3.0.1,3.1.0]",
- org.apache.commons.httpclient.util;version="[3.0.1,3.1.0]",
- org.eclipse.core.runtime.jobs,
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.service.url;version="1.0.0",
- org.osgi.util.tracker;version="1.3.2"
-Export-Package: org.eclipse.ecf.internal.provider.filetransfer.httpclient;x-internal:=true,
- org.eclipse.ecf.provider.filetransfer.httpclient
-Bundle-Vendor: %plugin.provider
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties
deleted file mode 100644
index c60ae16..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               about.html,\
-               plugin.properties,\
-               asl-v20.txt
-src.includes = about.html,\
-               plugin.properties,\
-               asl-v20.txt
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java
deleted file mode 100644
index 92a18dd..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2007 IBM, Composent Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Chris Aniszczyk - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.internal.provider.filetransfer.httpclient;
-
-import javax.net.ssl.SSLSocketFactory;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ecf.core.util.LogHelper;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator implements BundleActivator {
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.eclipse.ecf.provider.filetransfer.httpclient"; //$NON-NLS-1$
-
-	// The shared instance
-	private static Activator plugin;
-	private BundleContext context = null;
-
-	private ServiceTracker logServiceTracker = null;
-
-	private ServiceTracker sslSocketFactoryTracker;
-
-	private ISSLSocketFactoryModifier sslSocketFactoryModifier;
-
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-		//
-	}
-
-	public BundleContext getContext() {
-		return context;
-	}
-
-	public void start(BundleContext ctxt) throws Exception {
-		plugin = this;
-		this.context = ctxt;
-		// initialize the default sslSocketFactoryModifier.  This instance is then used within HttpClientRetrieveFileTransfer.setupHostAndPort
-		// to set the socket factory for the specific proxy and httpclient instance
-		try {
-			Class socketFactoryModifierClass = Class.forName("org.eclipse.ecf.internal.provider.filetransfer.httpclient.ssl.SSLSocketFactoryModifier"); //$NON-NLS-1$
-			sslSocketFactoryModifier = (ISSLSocketFactoryModifier) socketFactoryModifierClass.newInstance();
-		} catch (ClassNotFoundException e) {
-			// will occur if fragment is not installed or not on proper execution environment
-		} catch (Throwable t) {
-			log(new Status(IStatus.ERROR, PLUGIN_ID, "Unexpected Error in Activator.start", t)); //$NON-NLS-1$
-		}
-
-	}
-
-	public ISSLSocketFactoryModifier getSSLSocketFactoryModifier() {
-		return sslSocketFactoryModifier;
-	}
-
-	public void stop(BundleContext ctxt) throws Exception {
-		if (sslSocketFactoryModifier != null) {
-			sslSocketFactoryModifier.dispose();
-			sslSocketFactoryModifier = null;
-		}
-
-		if (sslSocketFactoryTracker != null) {
-			sslSocketFactoryTracker.close();
-		}
-
-		if (logServiceTracker != null) {
-			logServiceTracker.close();
-		}
-		this.context = null;
-		plugin = null;
-	}
-
-	/**
-	 * Returns the shared instance
-	 *
-	 * @return the shared instance
-	 */
-	public synchronized static Activator getDefault() {
-		if (plugin == null) {
-			plugin = new Activator();
-		}
-		return plugin;
-	}
-
-	protected LogService getLogService() {
-		if (logServiceTracker == null) {
-			logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
-			logServiceTracker.open();
-		}
-		return (LogService) logServiceTracker.getService();
-	}
-
-	public void log(IStatus status) {
-		LogService logService = getLogService();
-		if (logService != null) {
-			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
-		}
-	}
-
-	public SSLSocketFactory getSSLSocketFactory() {
-		if (sslSocketFactoryTracker == null) {
-			sslSocketFactoryTracker = new ServiceTracker(this.context, SSLSocketFactory.class.getName(), null);
-			sslSocketFactoryTracker.open();
-		}
-		return (SSLSocketFactory) sslSocketFactoryTracker.getService();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java
deleted file mode 100644
index 8606dc8..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ecf.internal.provider.filetransfer.httpclient;
-
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScheme;
-import org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
-import org.apache.commons.httpclient.auth.CredentialsProvider;
-import org.eclipse.ecf.core.util.Proxy;
-
-public abstract class HttpClientProxyCredentialProvider implements CredentialsProvider {
-
-	abstract protected Proxy getECFProxy();
-
-	abstract protected Credentials getNTLMCredentials(Proxy proxy);
-
-	/**
-	 * @throws CredentialsNotAvailableException  
-	 */
-	public Credentials getCredentials(AuthScheme scheme, String host, int port, boolean isProxyAuthenticating) throws CredentialsNotAvailableException {
-		if (!isProxyAuthenticating) {
-			return null;
-		}
-		Proxy proxy = getECFProxy();
-		if (proxy == null) {
-			return null;
-		}
-		if ("ntlm".equalsIgnoreCase(scheme.getSchemeName())) { //$NON-NLS-1$
-			return getNTLMCredentials(proxy);
-		} else if ("basic".equalsIgnoreCase(scheme.getSchemeName()) || //$NON-NLS-1$
-				"digest".equalsIgnoreCase(scheme.getSchemeName())) { //$NON-NLS-1$
-			final String proxyUsername = proxy.getUsername();
-			final String proxyPassword = proxy.getPassword();
-			if (proxyUsername != null) {
-				Credentials credentials = new UsernamePasswordCredentials(proxyUsername, proxyPassword);
-				return credentials;
-			}
-		}
-
-		return null;
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java
deleted file mode 100644
index 75cacb5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008, 2009 Composent, Inc., IBM and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *    Henrich Kraemer - bug 263869, testHttpsReceiveFile fails using HTTP proxy
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.httpclient;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.Socket;
-import java.net.URL;
-import java.util.Iterator;
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.auth.CredentialsProvider;
-import org.apache.commons.httpclient.methods.HeadMethod;
-import org.apache.commons.httpclient.util.DateUtil;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.security.Callback;
-import org.eclipse.ecf.core.security.CallbackHandler;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.security.NameCallback;
-import org.eclipse.ecf.core.security.ObjectCallback;
-import org.eclipse.ecf.core.security.UnsupportedCallbackException;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.core.util.ProxyAddress;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IRemoteFile;
-import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
-import org.eclipse.ecf.filetransfer.IRemoteFileSystemRequest;
-import org.eclipse.ecf.filetransfer.events.socket.ISocketEventSource;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ConnectingSocketMonitor;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.DebugOptions;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.HttpClientProxyCredentialProvider;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Messages;
-import org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser;
-import org.eclipse.ecf.provider.filetransfer.browse.URLRemoteFile;
-import org.eclipse.ecf.provider.filetransfer.events.socket.SocketEventSource;
-import org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer.HostConfigHelper;
-import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class HttpClientFileSystemBrowser extends AbstractFileSystemBrowser {
-
-	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
-	protected static final int DEFAULT_CONNECTION_TIMEOUT = 120000;
-
-	private static final String USERNAME_PREFIX = "Username:"; //$NON-NLS-1$
-
-	private JREProxyHelper proxyHelper = null;
-
-	private ConnectingSocketMonitor connectingSockets;
-
-	protected String username = null;
-
-	protected String password = null;
-
-	protected HttpClient httpClient = null;
-
-	protected volatile HeadMethod headMethod;
-
-	protected HostConfigHelper hostConfigHelper;
-
-	/**
-	 * @param directoryOrFileID
-	 * @param listener
-	 */
-	public HttpClientFileSystemBrowser(HttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) {
-		super(directoryOrFileID, listener, directoryOrFileURL, connectContext, proxy);
-		Assert.isNotNull(httpClient);
-		this.httpClient = httpClient;
-		this.proxyHelper = new JREProxyHelper();
-		this.connectingSockets = new ConnectingSocketMonitor(1);
-
-	}
-
-	class HttpClientRemoteFileSystemRequest extends RemoteFileSystemRequest {
-		protected SocketEventSource socketEventSource;
-
-		HttpClientRemoteFileSystemRequest() {
-			this.socketEventSource = new SocketEventSource() {
-				public Object getAdapter(Class adapter) {
-					if (adapter == null) {
-						return null;
-					}
-					if (adapter.isInstance(this)) {
-						return this;
-					}
-					if (adapter.isInstance(HttpClientRemoteFileSystemRequest.this)) {
-						return HttpClientRemoteFileSystemRequest.this;
-					}
-					return null;
-				}
-			};
-		}
-
-		public Object getAdapter(Class adapter) {
-			if (adapter == null) {
-				return null;
-			}
-			return socketEventSource.getAdapter(adapter);
-		}
-
-		public void cancel() {
-			HttpClientFileSystemBrowser.this.cancel();
-		}
-	}
-
-	protected IRemoteFileSystemRequest createRemoteFileSystemRequest() {
-		return new HttpClientRemoteFileSystemRequest();
-	}
-
-	protected void cancel() {
-		if (isCanceled()) {
-			return; // break job cancel recursion
-		}
-		setCanceled(getException());
-		super.cancel();
-		if (headMethod != null) {
-			if (!headMethod.isAborted()) {
-				headMethod.abort();
-			}
-		}
-		if (connectingSockets != null) {
-			// this should unblock socket connect calls, if any
-			for (Iterator iterator = connectingSockets.getConnectingSockets().iterator(); iterator.hasNext();) {
-				Socket socket = (Socket) iterator.next();
-				try {
-					socket.close();
-				} catch (IOException e) {
-					Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "cancel", e); //$NON-NLS-1$
-				}
-			}
-		}
-
-	}
-
-	protected boolean hasForceNTLMProxyOption() {
-		return (System.getProperties().getProperty(HttpClientOptions.FORCE_NTLM_PROP) != null);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser#runRequest()
-	 */
-	protected void runRequest() throws Exception {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "runRequest"); //$NON-NLS-1$
-		setupProxies();
-		// set timeout
-		httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_CONNECTION_TIMEOUT);
-		httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
-		httpClient.getParams().setConnectionManagerTimeout(DEFAULT_CONNECTION_TIMEOUT);
-
-		String urlString = directoryOrFile.toString();
-		CredentialsProvider credProvider = new HttpClientProxyCredentialProvider() {
-
-			protected Proxy getECFProxy() {
-				return getProxy();
-			}
-
-			protected Credentials getNTLMCredentials(Proxy lp) {
-				if (hasForceNTLMProxyOption())
-					return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp);
-				return null;
-			}
-
-		};
-		// setup authentication
-		setupAuthentication(urlString);
-		// setup https host and port
-		setupHostAndPort(credProvider, urlString);
-
-		headMethod = new HeadMethod(hostConfigHelper.getTargetRelativePath());
-		headMethod.setFollowRedirects(true);
-		// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
-		// Seems to be another way to select the credentials.
-		headMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
-		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
-		headMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
-
-		long lastModified = 0;
-		long fileLength = -1;
-		connectingSockets.clear();
-		int code = -1;
-		try {
-			Trace.trace(Activator.PLUGIN_ID, "browse=" + urlString); //$NON-NLS-1$
-
-			code = httpClient.executeMethod(getHostConfiguration(), headMethod);
-
-			Trace.trace(Activator.PLUGIN_ID, "browse resp=" + code); //$NON-NLS-1$
-
-			// Check for NTLM proxy in response headers 
-			// This check is to deal with bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=252002
-			boolean ntlmProxyFound = NTLMProxyDetector.detectNTLMProxy(headMethod);
-			if (ntlmProxyFound && !hasForceNTLMProxyOption())
-				throw new BrowseFileTransferException("HttpClient Provider is not configured to support NTLM proxy authentication.", HttpClientOptions.NTLM_PROXY_RESPONSE_CODE); //$NON-NLS-1$
-
-			if (code == HttpURLConnection.HTTP_OK) {
-				fileLength = headMethod.getResponseContentLength();
-				lastModified = getLastModifiedTimeFromHeader();
-			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-				throw new BrowseFileTransferException(NLS.bind("File not found: {0}", urlString), code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-				throw new BrowseFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code);
-			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-				throw new BrowseFileTransferException("Forbidden", code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-				throw new BrowseFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code);
-			} else {
-				throw new BrowseFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code);
-			}
-			remoteFiles = new IRemoteFile[1];
-			remoteFiles[0] = new URLRemoteFile(lastModified, fileLength, fileID);
-		} catch (Exception e) {
-			Trace.throwing(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_THROWING, this.getClass(), "runRequest", e); //$NON-NLS-1$
-			BrowseFileTransferException ex = (BrowseFileTransferException) ((e instanceof BrowseFileTransferException) ? e : new BrowseFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code));
-			throw ex;
-		} finally {
-			headMethod.releaseConnection();
-		}
-	}
-
-	private long getLastModifiedTimeFromHeader() throws IOException {
-		Header lastModifiedHeader = headMethod.getResponseHeader("Last-Modified"); //$NON-NLS-1$
-		if (lastModifiedHeader == null)
-			return 0L;
-		String lastModifiedString = lastModifiedHeader.getValue();
-		long lastModified = 0;
-		if (lastModifiedString != null) {
-			try {
-				lastModified = DateUtil.parseDate(lastModifiedString).getTime();
-			} catch (Exception e) {
-				throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPITION_INVALID_LAST_MODIFIED_FROM_SERVER);
-			}
-		}
-		return lastModified;
-	}
-
-	Proxy getProxy() {
-		return proxy;
-	}
-
-	protected void setupHostAndPort(CredentialsProvider credProvider, String urlString) {
-		getHostConfiguration(); // creates hostConfigHelper if needed
-		hostConfigHelper.setTargetHostByURL(credProvider, urlString);
-	}
-
-	protected Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOException {
-		if (connectContext == null)
-			return null;
-		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
-		if (callbackHandler == null)
-			return null;
-		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
-		final ObjectCallback passwordCallback = new ObjectCallback();
-		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
-		username = usernameCallback.getName();
-		password = (String) passwordCallback.getObject();
-		return new UsernamePasswordCredentials(username, password);
-	}
-
-	protected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException {
-		Credentials credentials = null;
-		if (username == null) {
-			credentials = getFileRequestCredentials();
-		}
-
-		if (credentials != null && username != null) {
-			final AuthScope authScope = new AuthScope(HttpClientRetrieveFileTransfer.getHostFromURL(urlString), HttpClientRetrieveFileTransfer.getPortFromURL(urlString), AuthScope.ANY_REALM);
-			Trace.trace(Activator.PLUGIN_ID, "browse credentials=" + credentials); //$NON-NLS-1$
-			httpClient.getState().setCredentials(authScope, credentials);
-		}
-	}
-
-	private HostConfiguration getHostConfiguration() {
-		if (hostConfigHelper == null) {
-			ISocketEventSource source = (ISocketEventSource) job.getRequest().getAdapter(ISocketEventSource.class);
-			hostConfigHelper = new HostConfigHelper(source, connectingSockets);
-		}
-		return hostConfigHelper.getHostConfiguration();
-	}
-
-	protected void setupProxy(Proxy proxy) {
-		if (proxy.getType().equals(Proxy.Type.HTTP)) {
-			final ProxyAddress address = proxy.getAddress();
-			getHostConfiguration().setProxy(address.getHostName(), address.getPort());
-		} else if (proxy.getType().equals(Proxy.Type.SOCKS)) {
-			Trace.trace(Activator.PLUGIN_ID, "brows socksproxy=" + proxy.getAddress()); //$NON-NLS-1$
-			proxyHelper.setupProxy(proxy);
-		}
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java
deleted file mode 100644
index 6a030df..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.httpclient;
-
-public interface HttpClientOptions {
-	// HttpClient response code that indicates that NTLM proxy is asking for authentication
-	// and httpclient cannot handle NTLMv2 proxies
-	public int NTLM_PROXY_RESPONSE_CODE = 477;
-	// System property that indicates that NTLM proxy usage should be forced (i.e. not rejected)
-	// The property key is:  org.eclipse.ecf.provider.filetransfer.httpclient.options.ForceNTLMProxy
-	// The value of the property must be non-null, but is not otherwise used.
-	public String FORCE_NTLM_PROP = "org.eclipse.ecf.provider.filetransfer.httpclient.options.ForceNTLMProxy"; //$NON-NLS-1$
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
deleted file mode 100644
index fc13fbc..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
+++ /dev/null
@@ -1,1052 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Composent, Inc., IBM All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: 
- *  Composent, Inc. - initial API and implementation
- *  Maarten Meijer - bug 237936, added gzip encoded transfer default
- *  Henrich Kraemer - bug 263869, testHttpsReceiveFile fails using HTTP proxy
- *  Henrich Kraemer - bug 263613, [transport] Update site contacting / downloading is not cancelable
- ******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.httpclient;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.Socket;
-import java.util.Iterator;
-import java.util.Map;
-import javax.net.SocketFactory;
-import org.apache.commons.httpclient.Credentials;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpConnection;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpState;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.HttpVersion;
-import org.apache.commons.httpclient.NTCredentials;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.auth.CredentialsProvider;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.protocol.Protocol;
-import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
-import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
-import org.apache.commons.httpclient.util.DateUtil;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.security.Callback;
-import org.eclipse.ecf.core.security.CallbackHandler;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.security.NameCallback;
-import org.eclipse.ecf.core.security.ObjectCallback;
-import org.eclipse.ecf.core.security.UnsupportedCallbackException;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.core.util.ProxyAddress;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.filetransfer.FileTransferJob;
-import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
-import org.eclipse.ecf.filetransfer.IFileTransferPausable;
-import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.ecf.filetransfer.InvalidFileRangeSpecificationException;
-import org.eclipse.ecf.filetransfer.events.IFileTransferConnectStartEvent;
-import org.eclipse.ecf.filetransfer.events.socket.ISocketEventSource;
-import org.eclipse.ecf.filetransfer.events.socket.ISocketListener;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ConnectingSocketMonitor;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.DebugOptions;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientProtocolSocketFactory;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientSecureProtocolSocketFactory;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.HttpClientProxyCredentialProvider;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ISSLSocketFactoryModifier;
-import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Messages;
-import org.eclipse.ecf.provider.filetransfer.events.socket.SocketEventSource;
-import org.eclipse.ecf.provider.filetransfer.identity.FileTransferID;
-import org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer;
-import org.eclipse.ecf.provider.filetransfer.retrieve.HttpHelper;
-import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
-import org.eclipse.osgi.util.NLS;
-
-public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer {
-
-	/**
-	 * gzip encoding wrapper for httpclient class. Copied from Mylyn project, bug 205708
-	 *
-	 */
-	public class GzipGetMethod extends GetMethod {
-
-		private static final String CONTENT_ENCODING = "Content-Encoding"; //$NON-NLS-1$
-		private static final String ACCEPT_ENCODING = "Accept-encoding"; //$NON-NLS-1$
-		private static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
-
-		private static final String CONTENT_ENCODING_ACCEPTED = CONTENT_ENCODING_GZIP;
-
-		private boolean gzipReceived = false;
-
-		public GzipGetMethod(String urlString) {
-			super(urlString);
-		}
-
-		private boolean isZippedResponse() {
-			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=269018
-			boolean contentEncodingGzip = (null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP));
-			Trace.trace(Activator.PLUGIN_ID, "Content-Encoding: gzip header " + (contentEncodingGzip ? "PRESENT" : "ABSENT")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			boolean hasGzSuffix = targetHasGzSuffix(remoteFileName);
-			return contentEncodingGzip && !hasGzSuffix;
-		}
-
-		public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
-			Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "GzipGetMethod.execute"); //$NON-NLS-1$
-			// Insert accept-encoding header
-			int result = super.execute(state, conn);
-			// Code to deal with implications described on bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261881
-			switch (result) {
-				case HttpStatus.SC_MOVED_TEMPORARILY :
-				case HttpStatus.SC_MOVED_PERMANENTLY :
-				case HttpStatus.SC_SEE_OTHER :
-				case HttpStatus.SC_TEMPORARY_REDIRECT :
-					Trace.trace(Activator.PLUGIN_ID, "GzipGetMethod.execute.  Received redirect=" + result + ".  Removing gzip accept encoding"); //$NON-NLS-1$ //$NON-NLS-2$
-					gzipReceived = false;
-					removeRequestHeader(GzipGetMethod.ACCEPT_ENCODING);
-				default :
-			}
-			// test what is sent back
-			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "GzipGetMethod.execute", new Integer(result)); //$NON-NLS-1$
-			return result;
-		}
-
-		public InputStream getResponseBodyAsUnzippedStream() throws IOException {
-			gzipReceived = isZippedResponse();
-			InputStream input = super.getResponseBodyAsStream();
-			try {
-				if (gzipReceived) {
-					Trace.trace(Activator.PLUGIN_ID, "Using gzip input stream to decode"); //$NON-NLS-1$
-					// extract on the fly
-					return new java.util.zip.GZIPInputStream(input);
-				}
-				Trace.trace(Activator.PLUGIN_ID, "Not using gzip input stream"); //$NON-NLS-1$
-			} catch (IOException e) {
-				Activator.getDefault().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, "Exception creating gzip input stream", e)); //$NON-NLS-1$ 
-				throw e;
-			}
-			return input;
-		}
-
-		private Object releaseLock = new Object();
-
-		// This override is a workaround for 
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=279457
-		// This makes GetMethod.releaseConnection non-reentrant,
-		// as with reentrancy under some circumstances a NPE can be 
-		// thrown with multithreaded access
-		public void releaseConnection() {
-			synchronized (releaseLock) {
-				super.releaseConnection();
-			}
-		}
-	}
-
-	static final class HostConfigHelper {
-		private ISocketEventSource source;
-		private ISocketListener socketListener;
-		private String targetURL;
-		private String targetRelativePath;
-
-		private HostConfiguration hostConfiguration;
-
-		public HostConfigHelper(ISocketEventSource source, ISocketListener socketListener) {
-			Assert.isNotNull(source);
-			this.source = source;
-			this.socketListener = socketListener;
-			hostConfiguration = new HostConfiguration();
-		}
-
-		public HostConfiguration getHostConfiguration() {
-			return hostConfiguration;
-		}
-
-		// drops the scheme server and port (e.g http://server:8080/a/b.html -> /a/b.html
-		private static String getTargetRelativePathFromURL(String url) {
-			// RFC 3986
-			/* 
-			 *      
-			 *     URI    = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
-
-			      hier-part =  "//" authority path-abempty
-			                 / path-absolute
-			                 / path-rootless
-			                 / path-empty     
-			 *      
-			 *      path  = path-abempty    ; begins with "/" or is empty
-			              / path-absolute   ; begins with "/" but not "//"
-			              / path-noscheme   ; begins with a non-colon segment
-			              / path-rootless   ; begins with a segment
-			              / path-empty      ; zero characters
-
-			 * 
-			 */
-			// This routine is supposed to remove authority information from the url
-			// to make this a 'relative path' for
-			// HttpClients method constructor (for example GetMethod(String uri)) as
-			// ECF executes methods passing in a HostConfiguration which represents the
-			// authority.
-			final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
-			if (colonSlashSlash < 0)
-				return url;
-
-			// '://' indicates there must be an authority.
-			// the authority must not contain a '/' character.
-			final int nextSlash = url.indexOf('/', colonSlashSlash + 3);
-			if (nextSlash == -1) {
-				// try root? or should it be empty?
-				return ""; //$NON-NLS-1$ 
-			}
-			String relativeURL = url.substring(nextSlash); // include the slash
-			// This is a workaround for multiple consecutive slashes after the authority.
-			// HttpClient will parse this as another authority instead of using 
-			// it as a path. In anticipation we add "//example.com" so that this will
-			// be removed instead of the first path segment. 
-			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=270749#c28 
-			// for a full explanation
-			if (relativeURL.startsWith("//")) { //$NON-NLS-1$
-				final String host = "example.com"; //$NON-NLS-1$
-				relativeURL = "//" + host + relativeURL; //$NON-NLS-1$
-
-			}
-			return relativeURL;
-		}
-
-		public void setTargetHostByURL(CredentialsProvider credProvider, String url) {
-			this.targetURL = url;
-			this.targetRelativePath = getTargetRelativePathFromURL(targetURL);
-			String host = getHostFromURL(targetURL);
-			int port = getPortFromURL(targetURL);
-
-			if (HttpClientRetrieveFileTransfer.urlUsesHttps(targetURL)) {
-				ISSLSocketFactoryModifier sslSocketFactoryModifier = Activator.getDefault().getSSLSocketFactoryModifier();
-				if (sslSocketFactoryModifier == null) {
-					sslSocketFactoryModifier = new HttpClientDefaultSSLSocketFactoryModifier();
-				}
-				SecureProtocolSocketFactory psf = new ECFHttpClientSecureProtocolSocketFactory(sslSocketFactoryModifier, source, socketListener);
-				Protocol sslProtocol = new Protocol(HttpClientRetrieveFileTransfer.HTTPS, (ProtocolSocketFactory) psf, HTTPS_PORT);
-
-				Trace.trace(Activator.PLUGIN_ID, "retrieve host=" + host + ";port=" + port); //$NON-NLS-1$ //$NON-NLS-2$
-				hostConfiguration.setHost(host, port, sslProtocol);
-				hostConfiguration.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
-
-			} else {
-				ProtocolSocketFactory psf = new ECFHttpClientProtocolSocketFactory(SocketFactory.getDefault(), source, socketListener);
-				Protocol protocol = new Protocol(HttpClientRetrieveFileTransfer.HTTP, psf, HTTP_PORT);
-				Trace.trace(Activator.PLUGIN_ID, "retrieve host=" + host + ";port=" + port); //$NON-NLS-1$ //$NON-NLS-2$
-				hostConfiguration.setHost(host, port, protocol);
-				hostConfiguration.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
-			}
-		}
-
-		public String getTargetRelativePath() {
-			return targetRelativePath;
-		}
-
-	}
-
-	private static final String USERNAME_PREFIX = Messages.HttpClientRetrieveFileTransfer_Username_Prefix;
-
-	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
-	protected static final int DEFAULT_CONNECTION_TIMEOUT = 120000;
-	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
-	protected static final int DEFAULT_READ_TIMEOUT = 120000;
-
-	protected static final int HTTP_PORT = 80;
-
-	protected static final int HTTPS_PORT = 443;
-
-	protected static final int MAX_RETRY = 2;
-
-	protected static final String HTTPS = Messages.FileTransferNamespace_Https_Protocol;
-
-	protected static final String HTTP = Messages.FileTransferNamespace_Http_Protocol;
-
-	protected static final String[] supportedProtocols = {HTTP, HTTPS};
-
-	private static final String LAST_MODIFIED_HEADER = "Last-Modified"; //$NON-NLS-1$
-
-	private GzipGetMethod getMethod = null;
-
-	private HttpClient httpClient = null;
-
-	private String username;
-
-	private String password;
-
-	private int responseCode = -1;
-	private volatile boolean doneFired = false;
-
-	private String remoteFileName;
-
-	protected int httpVersion = 1;
-
-	protected IFileID fileid = null;
-
-	protected JREProxyHelper proxyHelper = null;
-
-	private HostConfigHelper hostConfigHelper;
-	private SocketEventSource socketEventSource;
-
-	private ConnectingSocketMonitor connectingSockets;
-	private FileTransferJob connectJob;
-
-	public HttpClientRetrieveFileTransfer(HttpClient httpClient) {
-		this.httpClient = httpClient;
-		Assert.isNotNull(this.httpClient);
-		proxyHelper = new JREProxyHelper();
-		connectingSockets = new ConnectingSocketMonitor(1);
-		socketEventSource = new SocketEventSource() {
-			public Object getAdapter(Class adapter) {
-				if (adapter == null) {
-					return null;
-				}
-				if (adapter.isInstance(this)) {
-					return this;
-				}
-				return HttpClientRetrieveFileTransfer.this.getAdapter(adapter);
-			}
-
-		};
-
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#getRemoteFileName()
-	 */
-	public String getRemoteFileName() {
-		return remoteFileName;
-	}
-
-	public synchronized void cancel() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "cancel"); //$NON-NLS-1$
-		if (isCanceled()) {
-			return; // break job cancel recursion
-		}
-		setDoneCanceled(exception);
-		boolean fireDoneEvent = true;
-		if (connectJob != null) {
-			Trace.trace(Activator.PLUGIN_ID, "calling connectJob.cancel()"); //$NON-NLS-1$
-			connectJob.cancel();
-		}
-		synchronized (jobLock) {
-			if (job != null) {
-				// Its the transfer jobs responsibility to throw the event.
-				fireDoneEvent = false;
-				Trace.trace(Activator.PLUGIN_ID, "calling transfer job.cancel()"); //$NON-NLS-1$
-				job.cancel();
-			}
-		}
-		if (getMethod != null) {
-			if (!getMethod.isAborted()) {
-				Trace.trace(Activator.PLUGIN_ID, "calling getMethod.abort()"); //$NON-NLS-1$
-				getMethod.abort();
-			}
-		}
-		if (connectingSockets != null) {
-			// this should unblock socket connect calls, if any
-			for (Iterator iterator = connectingSockets.getConnectingSockets().iterator(); iterator.hasNext();) {
-				Socket socket = (Socket) iterator.next();
-				try {
-					Trace.trace(Activator.PLUGIN_ID, "Call socket.close() for socket=" + socket.toString()); //$NON-NLS-1$
-					socket.close();
-				} catch (IOException e) {
-					Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "cancel", e); //$NON-NLS-1$
-				}
-			}
-		}
-		hardClose();
-		if (fireDoneEvent) {
-			fireTransferReceiveDoneEvent();
-		}
-		Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "cancel");//$NON-NLS-1$
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#hardClose()
-	 */
-	protected void hardClose() {
-		super.hardClose();
-		if (getMethod != null) {
-			getMethod.releaseConnection();
-			getMethod = null;
-		}
-		responseCode = -1;
-		if (proxyHelper != null) {
-			proxyHelper.dispose();
-			proxyHelper = null;
-		}
-	}
-
-	protected Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOException {
-		if (connectContext == null)
-			return null;
-		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
-		if (callbackHandler == null)
-			return null;
-		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
-		final ObjectCallback passwordCallback = new ObjectCallback();
-		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
-		username = usernameCallback.getName();
-		password = (String) passwordCallback.getObject();
-		return new UsernamePasswordCredentials(username, password);
-	}
-
-	protected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException {
-		Credentials credentials = null;
-		if (username == null) {
-			credentials = getFileRequestCredentials();
-		}
-
-		if (credentials != null && username != null) {
-			final AuthScope authScope = new AuthScope(getHostFromURL(urlString), getPortFromURL(urlString), AuthScope.ANY_REALM);
-			Trace.trace(Activator.PLUGIN_ID, "retrieve credentials=" + credentials); //$NON-NLS-1$
-			httpClient.getState().setCredentials(authScope, credentials);
-		}
-	}
-
-	protected void setupHostAndPort(CredentialsProvider credProvider, String urlString) {
-		getHostConfiguration(); // creates hostConfigHelper if needed
-		hostConfigHelper.setTargetHostByURL(credProvider, urlString);
-	}
-
-	protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
-		final IFileRangeSpecification rangeSpec = getFileRangeSpecification();
-		if (rangeSpec != null) {
-			final long startPosition = rangeSpec.getStartPosition();
-			final long endPosition = rangeSpec.getEndPosition();
-			if (startPosition < 0)
-				throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO, rangeSpec);
-			if (endPosition != -1L && endPosition <= startPosition)
-				throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START, rangeSpec);
-			String rangeHeader = "bytes=" + startPosition + "-" + ((endPosition == -1L) ? "" : ("" + endPosition)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			Trace.trace(Activator.PLUGIN_ID, "retrieve range header=" + rangeHeader); //$NON-NLS-1$
-			setRangeHeader(rangeHeader);
-		}
-		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
-		getMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
-	}
-
-	private void setRangeHeader(String value) {
-		getMethod.addRequestHeader("Range", value); //$NON-NLS-1$
-	}
-
-	private boolean isHTTP11() {
-		return (httpVersion >= 1);
-	}
-
-	public int getResponseCode() {
-		if (responseCode != -1)
-			return responseCode;
-		HttpVersion version = getMethod.getEffectiveVersion();
-		if (version == null) {
-			responseCode = -1;
-			httpVersion = 1;
-			return responseCode;
-		}
-		httpVersion = version.getMinor();
-		responseCode = getMethod.getStatusCode();
-		return responseCode;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
-	 */
-	public ID getID() {
-		return fileid;
-	}
-
-	private long getLastModifiedTimeFromHeader() throws IOException {
-		Header lastModifiedHeader = getMethod.getResponseHeader(LAST_MODIFIED_HEADER);
-		if (lastModifiedHeader == null)
-			throw new IOException(Messages.HttpClientRetrieveFileTransfer_INVALID_LAST_MODIFIED_TIME);
-
-		String lastModifiedString = lastModifiedHeader.getValue();
-		long lastModified = 0;
-		if (lastModifiedString != null) {
-			try {
-				lastModified = DateUtil.parseDate(lastModifiedString).getTime();
-			} catch (Exception e) {
-				throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPITION_INVALID_LAST_MODIFIED_FROM_SERVER);
-			}
-		}
-		return lastModified;
-	}
-
-	protected void getResponseHeaderValues() throws IOException {
-		if (getResponseCode() == -1)
-			throw new IOException(Messages.HttpClientRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST);
-		Header lastModifiedHeader = getMethod.getResponseHeader(LAST_MODIFIED_HEADER);
-		if (lastModifiedHeader != null) {
-			setLastModifiedTime(getLastModifiedTimeFromHeader());
-		}
-		setFileLength(getMethod.getResponseContentLength());
-		fileid = new FileTransferID(getRetrieveNamespace(), getRemoteFileURL());
-
-		// Get content disposition header and get remote file name from it if possible.
-		Header contentDispositionHeader = getMethod.getResponseHeader(HttpHelper.CONTENT_DISPOSITION_HEADER);
-		if (contentDispositionHeader != null) {
-			remoteFileName = HttpHelper.getRemoteFileNameFromContentDispositionHeader(contentDispositionHeader.getValue());
-		}
-		// If still null, get the path from httpclient.getMethod()
-		if (remoteFileName == null) {
-			// No name could be extracted using Content-Disposition. Let's try the
-			// path from the getMethod.
-			String pathStr = getMethod.getPath();
-			if (pathStr != null && pathStr.length() > 0) {
-				IPath path = Path.fromPortableString(pathStr);
-				if (path.segmentCount() > 0)
-					remoteFileName = path.lastSegment();
-			}
-			// If still null, use the input file name
-			if (remoteFileName == null)
-				// Last resort. Use the path of the initial URL request
-				remoteFileName = super.getRemoteFileName();
-		}
-	}
-
-	final class ECFCredentialsProvider extends HttpClientProxyCredentialProvider {
-
-		protected Proxy getECFProxy() {
-			return getProxy();
-		}
-
-		protected Credentials getNTLMCredentials(Proxy lp) {
-			if (hasForceNTLMProxyOption())
-				return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp);
-			return null;
-		}
-
-	}
-
-	Proxy getProxy() {
-		return proxy;
-	}
-
-	protected void setInputStream(InputStream ins) {
-		remoteFileContents = ins;
-	}
-
-	protected InputStream wrapTransferReadInputStream(InputStream inputStream, IProgressMonitor monitor) {
-		return inputStream;
-	}
-
-	protected boolean hasForceNTLMProxyOption() {
-		Map localOptions = getOptions();
-		if (localOptions != null && localOptions.get(HttpClientOptions.FORCE_NTLM_PROP) != null)
-			return true;
-		return (System.getProperties().getProperty(HttpClientOptions.FORCE_NTLM_PROP) != null);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#openStreams()
-	 */
-	protected void openStreams() throws IncomingFileTransferException {
-
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreams"); //$NON-NLS-1$
-		final String urlString = getRemoteFileURL().toString();
-		this.doneFired = false;
-
-		int code = -1;
-
-		try {
-			httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_READ_TIMEOUT);
-			httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
-			httpClient.getParams().setConnectionManagerTimeout(DEFAULT_CONNECTION_TIMEOUT);
-
-			setupAuthentication(urlString);
-
-			CredentialsProvider credProvider = new ECFCredentialsProvider();
-			setupHostAndPort(credProvider, urlString);
-
-			getMethod = new GzipGetMethod(hostConfigHelper.getTargetRelativePath());
-			getMethod.setFollowRedirects(true);
-			// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
-			// Seems to be another way to select the credentials.
-			getMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
-			setRequestHeaderValues();
-
-			Trace.trace(Activator.PLUGIN_ID, "retrieve=" + urlString); //$NON-NLS-1$
-			// Set request header for possible gzip encoding, but only if
-			// 1) The file range specification is null (we want the whole file)
-			// 2) The target remote file does *not* end in .gz (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280205)
-			if (getFileRangeSpecification() == null && !targetHasGzSuffix(super.getRemoteFileName())) {
-				Trace.trace(Activator.PLUGIN_ID, "Accept-Encoding: gzip added to request header"); //$NON-NLS-1$
-				getMethod.setRequestHeader(GzipGetMethod.ACCEPT_ENCODING, GzipGetMethod.CONTENT_ENCODING_ACCEPTED);
-			} else {
-				Trace.trace(Activator.PLUGIN_ID, "Accept-Encoding NOT added to header"); //$NON-NLS-1$
-			}
-
-			fireConnectStartEvent();
-			if (checkAndHandleDone()) {
-				return;
-			}
-
-			connectingSockets.clear();
-			// Actually execute get and get response code (since redirect is set to true, then
-			// redirect response code handled internally
-			if (connectJob == null) {
-				performConnect(new NullProgressMonitor());
-			} else {
-				connectJob.schedule();
-				connectJob.join();
-				connectJob = null;
-			}
-			if (checkAndHandleDone()) {
-				return;
-			}
-
-			code = responseCode;
-			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + code); //$NON-NLS-1$
-
-			// Check for NTLM proxy in response headers 
-			// This check is to deal with bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=252002
-			boolean ntlmProxyFound = NTLMProxyDetector.detectNTLMProxy(getMethod);
-			if (ntlmProxyFound && !hasForceNTLMProxyOption())
-				throw new IncomingFileTransferException("HttpClient Provider is not configured to support NTLM proxy authentication.", HttpClientOptions.NTLM_PROXY_RESPONSE_CODE); //$NON-NLS-1$
-
-			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
-				getResponseHeaderValues();
-				setInputStream(getMethod.getResponseBodyAsUnzippedStream());
-				fireReceiveStartEvent();
-			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", urlString), code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code);
-			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException("Forbidden", code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code);
-			} else {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code);
-			}
-		} catch (final Exception e) {
-			Trace.throwing(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_THROWING, this.getClass(), "openStreams", e); //$NON-NLS-1$
-			if (code == -1) {
-				if (!isDone()) {
-					setDoneException(e);
-				}
-				fireTransferReceiveDoneEvent();
-			} else {
-				IncomingFileTransferException ex = (IncomingFileTransferException) ((e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code));
-				throw ex;
-			}
-		}
-		Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreams"); //$NON-NLS-1$
-	}
-
-	private boolean checkAndHandleDone() {
-		if (isDone()) {
-			// for cancel the done event should have been fired always.
-			if (!doneFired) {
-				fireTransferReceiveDoneEvent();
-			}
-			return true;
-		}
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		super.setConnectContextForAuthentication(connectContext);
-		this.username = null;
-		this.password = null;
-	}
-
-	protected static String getHostFromURL(String url) {
-		String result = url;
-		final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
-		if (colonSlashSlash < 0)
-			return ""; //$NON-NLS-1$
-		if (colonSlashSlash >= 0) {
-			result = url.substring(colonSlashSlash + 3);
-		}
-
-		final int colonPort = result.indexOf(':');
-		final int requestPath = result.indexOf('/');
-
-		int substringEnd;
-
-		if (colonPort > 0 && requestPath > 0)
-			substringEnd = Math.min(colonPort, requestPath);
-		else if (colonPort > 0)
-			substringEnd = colonPort;
-		else if (requestPath > 0)
-			substringEnd = requestPath;
-		else
-			substringEnd = result.length();
-
-		return result.substring(0, substringEnd);
-
-	}
-
-	protected static int getPortFromURL(String url) {
-		final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
-		if (colonSlashSlash < 0)
-			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
-		// This is wrong as if the url has no colonPort before '?' then it should return the default
-
-		final int colonPort = url.indexOf(':', colonSlashSlash + 1);
-		if (colonPort < 0)
-			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
-		// Make sure that the colonPort is not from some part of the rest of the URL
-		int nextSlash = url.indexOf('/', colonSlashSlash + 3);
-		if (nextSlash != -1 && colonPort > nextSlash)
-			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
-
-		final int requestPath = url.indexOf('/', colonPort + 1);
-
-		int end;
-		if (requestPath < 0)
-			end = url.length();
-		else
-			end = requestPath;
-
-		return Integer.parseInt(url.substring(colonPort + 1, end));
-	}
-
-	protected static boolean urlUsesHttps(String url) {
-		url = url.trim();
-		return url.startsWith(HTTPS);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.internal.provider.filetransfer.AbstractRetrieveFileTransfer#supportsProtocol(java.lang.String)
-	 */
-	public static boolean supportsProtocol(String protocolString) {
-		for (int i = 0; i < supportedProtocols.length; i++)
-			if (supportedProtocols[i].equalsIgnoreCase(protocolString))
-				return true;
-		return false;
-	}
-
-	protected boolean isConnected() {
-		return (getMethod != null);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#doPause()
-	 */
-	protected boolean doPause() {
-		if (isPaused() || !isConnected() || isDone())
-			return false;
-		this.paused = true;
-		return this.paused;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#doResume()
-	 */
-	protected boolean doResume() {
-		if (!isPaused() || isConnected())
-			return false;
-		return openStreamsForResume();
-	}
-
-	protected void setResumeRequestHeaderValues() throws IOException {
-		if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)
-			throw new IOException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_ERROR);
-		setRangeHeader("bytes=" + this.bytesReceived + "-"); //$NON-NLS-1$ //$NON-NLS-2$
-		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
-		getMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
-	}
-
-	private boolean openStreamsForResume() {
-
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreamsForResume"); //$NON-NLS-1$
-		final String urlString = getRemoteFileURL().toString();
-		this.doneFired = false;
-
-		int code = -1;
-
-		try {
-			httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_READ_TIMEOUT);
-			httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
-			httpClient.getParams().setConnectionManagerTimeout(DEFAULT_CONNECTION_TIMEOUT);
-
-			CredentialsProvider credProvider = new ECFCredentialsProvider();
-			setupAuthentication(urlString);
-
-			setupHostAndPort(credProvider, urlString);
-
-			getMethod = new GzipGetMethod(hostConfigHelper.getTargetRelativePath());
-			getMethod.setFollowRedirects(true);
-			// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
-			// Seems to be another way to select the credentials.
-			getMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
-			setResumeRequestHeaderValues();
-
-			Trace.trace(Activator.PLUGIN_ID, "resume=" + urlString); //$NON-NLS-1$
-
-			// Gzip encoding is not an option for resume
-			fireConnectStartEvent();
-			if (checkAndHandleDone()) {
-				return false;
-			}
-
-			connectingSockets.clear();
-			// Actually execute get and get response code (since redirect is set to true, then
-			// redirect response code handled internally
-			if (connectJob == null) {
-				performConnect(new NullProgressMonitor());
-			} else {
-				connectJob.schedule();
-				connectJob.join();
-				connectJob = null;
-			}
-			if (checkAndHandleDone()) {
-				return false;
-			}
-
-			code = responseCode;
-			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + code); //$NON-NLS-1$
-
-			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
-				getResumeResponseHeaderValues();
-				setInputStream(getMethod.getResponseBodyAsUnzippedStream());
-				this.paused = false;
-				fireReceiveResumedEvent();
-			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", urlString), code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code);
-			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException("Forbidden", code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code);
-			} else {
-				getMethod.releaseConnection();
-				throw new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code);
-			}
-			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreamsForResume", Boolean.TRUE); //$NON-NLS-1$
-			return true;
-		} catch (final Exception e) {
-			Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "openStreamsForResume", e); //$NON-NLS-1$
-			if (code == -1) {
-				if (!isDone()) {
-					setDoneException(e);
-				}
-			} else {
-				setDoneException((e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code));
-			}
-			fireTransferReceiveDoneEvent();
-			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreamsForResume", Boolean.FALSE); //$NON-NLS-1$
-			return false;
-		}
-	}
-
-	protected void getResumeResponseHeaderValues() throws IOException {
-		if (getResponseCode() != HttpURLConnection.HTTP_PARTIAL)
-			throw new IOException();
-		if (lastModifiedTime != getLastModifiedTimeFromHeader())
-			throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		if (adapter.equals(IFileTransferPausable.class) && isHTTP11())
-			return this;
-		if (adapter.equals(ISocketEventSource.class))
-			return this.socketEventSource;
-		return super.getAdapter(adapter);
-	}
-
-	private HostConfiguration getHostConfiguration() {
-		if (hostConfigHelper == null) {
-			hostConfigHelper = new HostConfigHelper(socketEventSource, connectingSockets);
-		}
-		return hostConfigHelper.getHostConfiguration();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#setupProxy(org.eclipse.ecf.core.util.Proxy)
-	 */
-	protected void setupProxy(Proxy proxy) {
-		if (proxy.getType().equals(Proxy.Type.HTTP)) {
-			final ProxyAddress address = proxy.getAddress();
-			getHostConfiguration().setProxy(address.getHostName(), address.getPort());
-		} else if (proxy.getType().equals(Proxy.Type.SOCKS)) {
-			Trace.trace(Activator.PLUGIN_ID, "retrieve socksproxy=" + proxy.getAddress()); //$NON-NLS-1$
-			proxyHelper.setupProxy(proxy);
-		}
-	}
-
-	public static NTCredentials createNTLMCredentials(Proxy p) {
-		if (p == null) {
-			return null;
-		}
-		String un = getNTLMUserName(p);
-		String domain = getNTLMDomainName(p);
-		if (un == null || domain == null)
-			return null;
-		return new NTCredentials(un, p.getPassword(), p.getAddress().getHostName(), domain);
-	}
-
-	protected static String getNTLMDomainName(Proxy p) {
-		String domainUsername = p.getUsername();
-		if (domainUsername == null)
-			return null;
-		int slashloc = domainUsername.indexOf('\\');
-		if (slashloc == -1)
-			return null;
-		return domainUsername.substring(0, slashloc);
-	}
-
-	protected static String getNTLMUserName(Proxy p) {
-		String domainUsername = p.getUsername();
-		if (domainUsername == null)
-			return null;
-		int slashloc = domainUsername.indexOf('\\');
-		if (slashloc == -1)
-			return null;
-		return domainUsername.substring(slashloc + 1);
-	}
-
-	protected void fireConnectStartEvent() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireConnectStartEvent"); //$NON-NLS-1$ 
-		// TODO: should the following be in super.fireReceiveStartEvent();
-		listener.handleTransferEvent(new IFileTransferConnectStartEvent() {
-			public IFileID getFileID() {
-				return remoteFileID;
-			}
-
-			public void cancel() {
-				HttpClientRetrieveFileTransfer.this.cancel();
-			}
-
-			public FileTransferJob prepareConnectJob(FileTransferJob j) {
-				return HttpClientRetrieveFileTransfer.this.prepareConnectJob(j);
-			}
-
-			public void connectUsingJob(FileTransferJob j) {
-				HttpClientRetrieveFileTransfer.this.connectUsingJob(j);
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IFileTransferConnectStartEvent["); //$NON-NLS-1$
-				sb.append(getFileID());
-				sb.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-
-			public Object getAdapter(Class adapter) {
-				return HttpClientRetrieveFileTransfer.this.getAdapter(adapter);
-			}
-		});
-	}
-
-	protected String createConnectJobName() {
-		return getRemoteFileURL().toString() + createRangeName() + Messages.HttpClientRetrieveFileTransfer_CONNECTING_JOB_NAME;
-	}
-
-	protected FileTransferJob prepareConnectJob(FileTransferJob cjob) {
-		if (cjob == null) {
-			// Create our own
-			cjob = new FileTransferJob(createJobName());
-		}
-		cjob.setFileTransfer(this);
-		cjob.setFileTransferRunnable(fileConnectRunnable);
-		return cjob;
-	}
-
-	protected void connectUsingJob(FileTransferJob cjob) {
-		Assert.isNotNull(cjob);
-		this.connectJob = cjob;
-	}
-
-	private IFileTransferRunnable fileConnectRunnable = new IFileTransferRunnable() {
-		public IStatus performFileTransfer(IProgressMonitor monitor) {
-			return performConnect(monitor);
-		}
-	};
-
-	private IStatus performConnect(IProgressMonitor monitor) {
-		// there might be more ticks in the future perhaps for 
-		// connect socket, certificate validation, send request, authenticate,
-		int ticks = 1;
-		monitor.beginTask(getRemoteFileURL().toString() + Messages.HttpClientRetrieveFileTransfer_CONNECTING_TASK_NAME, ticks);
-		try {
-			if (monitor.isCanceled())
-				throw newUserCancelledException();
-			responseCode = httpClient.executeMethod(getHostConfiguration(), getMethod);
-			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + responseCode); //$NON-NLS-1$
-		} catch (final Exception e) {
-			Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "performConnect", e); //$NON-NLS-1$
-			if (!isDone()) {
-				setDoneException(e);
-			}
-		} finally {
-			monitor.done();
-		}
-		return Status.OK_STATUS;
-
-	}
-
-	protected void fireReceiveResumedEvent() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireReceiveResumedEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
-		super.fireReceiveResumedEvent();
-	}
-
-	protected void fireTransferReceiveDataEvent() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceiveDataEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
-		super.fireTransferReceiveDataEvent();
-	}
-
-	protected void fireTransferReceiveDoneEvent() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceiveDoneEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
-		this.doneFired = true;
-		super.fireTransferReceiveDoneEvent();
-	}
-
-	protected void fireTransferReceivePausedEvent() {
-		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceivePausedEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
-		super.fireTransferReceivePausedEvent();
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/build.properties b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/build.properties
deleted file mode 100644
index fca2093..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties
-src.includes = plugin.properties,\
-               about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e9ecb61..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Wed Feb 18 10:08:46 PST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
deleted file mode 100644
index 7e1affd..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer;singleton:=true
-Bundle-Version: 3.0.1.qualifier
-Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.Activator
-Bundle-Vendor: %plugin.provider
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.ecf,
- org.eclipse.ecf.filetransfer,
- org.eclipse.equinox.registry
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Import-Package: org.eclipse.core.net.proxy;resolution:=optional,
- org.eclipse.core.runtime.jobs,
- org.eclipse.ecf.provider.filetransfer.events.socket;version="[1.0.0,2.0.0)",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.service.url;version="1.0.0",
- org.osgi.util.tracker;version="1.3.2"
-Bundle-ClassPath: .
-Export-Package: org.eclipse.ecf.internal.provider.filetransfer;x-internal:=true,
- org.eclipse.ecf.provider.filetransfer;x-friends:="org.eclipse.equinox.p2.repository",
- org.eclipse.ecf.provider.filetransfer.browse,
- org.eclipse.ecf.provider.filetransfer.events.socket;version="1.0";x-friends:="org.eclipse.ecf.provider.filetransfer.httpclient",
- org.eclipse.ecf.provider.filetransfer.identity;x-internal:=false,
- org.eclipse.ecf.provider.filetransfer.outgoing,
- org.eclipse.ecf.provider.filetransfer.retrieve;x-internal:=false,
- org.eclipse.ecf.provider.filetransfer.util
-Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/build.properties b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/build.properties
deleted file mode 100644
index 1f4914e..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-output.. = bin/
-bin.includes = .,\
-               META-INF/,\
-               plugin.xml,\
-               about.html,\
-               plugin.properties,\
-               schema/
-src.includes = about.html,\
-               schema/,\
-               plugin.properties
-jars.compile.order = .
-source.. = src/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
deleted file mode 100644
index 2a0a9b3..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
-      <appinfo>
-         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="browseFileTransferProtocolFactory" name="browseFileTransferProtocolFactory"/>
-      </appinfo>
-      <documentation>
-         This extension point allows IRemoteFileSystemBrowserFactorys to be defined for given file transfer protocols.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="browseFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute translatable="true"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="browseFileTransferProtocolFactory">
-      <annotation>
-         <documentation>
-            Browse remote file system protocol factory extention point
-         </documentation>
-      </annotation>
-      <complexType>
-         <attribute name="protocol" type="string" use="required">
-            <annotation>
-               <documentation>
-                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory</b>
-               </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-         <attribute name="priority" type="string">
-            <annotation>
-               <documentation>
-                  Priority relative to other browseFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="since"/>
-      </appinfo>
-      <documentation>
-         1.0.0
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="examples"/>
-      </appinfo>
-      <documentation>
-         <pre>
-   <extension
-         point="org.eclipse.ecf.provider.filetransfer.browseFileTransferProtocolFactory">
-      <browseFileTransferProtocolFactory
-            class="org.eclipse.ecf.provider.filetransfer.ssh.ScpBrowseFileTransferFactory"
-            protocol="scp"
-            priority="90">
-      </browseFileTransferProtocolFactory>
-   </extension>
-
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="apiInfo"/>
-      </appinfo>
-      <documentation>
-         Here is the <b>org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory</b>
-
-<pre>
-/**
- * Remote file browser factory. This service interface is used by clients to
- * create a new IRemoteFileSystemBrowser instance.
- */
-public interface IRemoteFileSystemBrowserFactory {
-
- /**
-  * Get new instance of IRemoteFileSystemBrowser.
-  * 
-  * @return IRemoteFileSystemBrowser for initiating a retrieval of a remote file.
-  */
- public IRemoteFileSystemBrowser newInstance();
-
-}
-</pre>
-      </documentation>
-   </annotation>
-
-
-   <annotation>
-      <appinfo>
-         <meta.section type="implementation"/>
-      </appinfo>
-      <documentation>
-         None
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="copyright"/>
-      </appinfo>
-      <documentation>
-         Copyright (c) 2004 Composent, Inc., IBM and others.
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
deleted file mode 100644
index 91f9ddb..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
-      <appinfo>
-         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="retrieveFileTransferProtocolFactory" name="retrieveFileTransferProtocolFactory"/>
-      </appinfo>
-      <documentation>
-         This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="retrieveFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute translatable="true"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="retrieveFileTransferProtocolFactory">
-      <annotation>
-         <documentation>
-            Retrieve file transfer protocol factory extention point
-         </documentation>
-      </annotation>
-      <complexType>
-         <attribute name="protocol" type="string" use="required">
-            <annotation>
-               <documentation>
-                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
-               </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-         <attribute name="priority" type="string">
-            <annotation>
-               <documentation>
-                  Priority relative to other retrieveFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="since"/>
-      </appinfo>
-      <documentation>
-         1.0.0
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="examples"/>
-      </appinfo>
-      <documentation>
-         <pre>
-   <extension
-         point="org.eclipse.ecf.provider.filetransfer.retrieveFileTransferProtocolFactory">
-      <retrieveFileTransferProtocolFactory
-            class="org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory"
-            protocol="http"
-            priority="10">
-      </retrieveFileTransferProtocolFactory>
-      <retrieveFileTransferProtocolFactory
-            class="org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory"
-            protocol="https">
-      </retrieveFileTransferProtocolFactory>
-   </extension>
-
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="apiInfo"/>
-      </appinfo>
-      <documentation>
-         Here is the <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
-
-<pre>
-/**
- * Retrieve file transfer factory. This service interface is used by clients to
- * create a new IRetrieveFileTransfer instance.
- */
-public interface IRetrieveFileTransferFactory {
-
- /**
-  * Get new instance of IRetrieveFileTransfer.
-  * 
-  * @return IRetrieveFileTransfer for a given file transfer
-  */
- public IRetrieveFileTransfer newInstance();
-
-}
-</pre>
-      </documentation>
-   </annotation>
-
-
-   <annotation>
-      <appinfo>
-         <meta.section type="implementation"/>
-      </appinfo>
-      <documentation>
-         None
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="copyright"/>
-      </appinfo>
-      <documentation>
-         Copyright (c) 2004 Composent, Inc., IBM and others.
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
deleted file mode 100644
index c6e22d7..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
-      <appinfo>
-         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="sendFileTransferProtocolFactory" name="sendFileTransferProtocolFactory"/>
-      </appinfo>
-      <documentation>
-         This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="sendFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appinfo>
-                  <meta.attribute translatable="true"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="sendFileTransferProtocolFactory">
-      <annotation>
-         <documentation>
-            Send  file transfer protocol factory extention point
-         </documentation>
-      </annotation>
-      <complexType>
-         <attribute name="protocol" type="string" use="required">
-            <annotation>
-               <documentation>
-                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory</b>
-               </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory"/>
-               </appinfo>
-            </annotation>
-         </attribute>
-         <attribute name="priority" type="string">
-            <annotation>
-               <documentation>
-                  Priority relative to other sendFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="since"/>
-      </appinfo>
-      <documentation>
-         1.0.0
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="examples"/>
-      </appinfo>
-      <documentation>
-         <pre>
-   <extension
-         point="org.eclipse.ecf.provider.filetransfer.sendFileTransferProtocolFactory">
-      <sendFileTransferProtocolFactory
-            class="org.eclipse.ecf.provider.filetransfer.ssh.ScpOutgoingFileTransferFactory"
-            protocol="scp"
-            priority="50">
-      </sendFileTransferProtocolFactory>
-   </extension>
-
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="apiInfo"/>
-      </appinfo>
-      <documentation>
-         Here is the <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
-
-<pre>
-/**
- * Retrieve file transfer factory. This service interface is used by clients to
- * create a new IRetrieveFileTransfer instance.
- */
-public interface IRetrieveFileTransferFactory {
-
- /**
-  * Get new instance of IRetrieveFileTransfer.
-  * 
-  * @return IRetrieveFileTransfer for a given file transfer
-  */
- public IRetrieveFileTransfer newInstance();
-
-}
-</pre>
-      </documentation>
-   </annotation>
-
-
-   <annotation>
-      <appinfo>
-         <meta.section type="implementation"/>
-      </appinfo>
-      <documentation>
-         None
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appinfo>
-         <meta.section type="copyright"/>
-      </appinfo>
-      <documentation>
-         Copyright (c) 2004 Composent, Inc., IBM and others.
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
deleted file mode 100644
index 9478ae5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
+++ /dev/null
@@ -1,886 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2006, 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.internal.provider.filetransfer;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionDelta;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IRegistryChangeEvent;
-import org.eclipse.core.runtime.IRegistryChangeListener;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ecf.core.util.LogHelper;
-import org.eclipse.ecf.core.util.PlatformHelper;
-import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowser;
-import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
-import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
-import org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory;
-import org.eclipse.ecf.provider.filetransfer.IFileTransferProtocolToFactoryMapper;
-import org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-import org.osgi.service.url.AbstractURLStreamHandlerService;
-import org.osgi.service.url.URLConstants;
-import org.osgi.service.url.URLStreamHandlerService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator implements BundleActivator, IFileTransferProtocolToFactoryMapper {
-
-	// This is the name of a system property 'org.eclipse.ecf.provider.filetransfer.excludeContributors' 
-	// that allows people to defeat the priority system for the browse, send, and retrieve factory contributions.
-	// If a plugin (symbolic id) is given in this property (multiples separated by comma), then
-	// that plugin's contributions will *not* be added to the browse, send, and retrieve protocol factories
-	public static final String PLUGIN_EXCLUDED_SYS_PROP_NAME = Activator.PLUGIN_ID + ".excludeContributors"; //$NON-NLS-1$
-
-	private static final String CLASS_ATTR = "class"; //$NON-NLS-1$
-	private static final String PRIORITY_ATTR = "priority"; //$NON-NLS-1$
-	private static final int DEFAULT_PRIORITY = 100;
-	private static final String PROTOCOL_ATTR = "protocol"; //$NON-NLS-1$
-	private static final String[] jvmSchemes = new String[] {Messages.FileTransferNamespace_Http_Protocol, Messages.FileTransferNamespace_Ftp_Protocol, Messages.FileTransferNamespace_File_Protocol, Messages.FileTransferNamespace_Jar_Protocol, Messages.FileTransferNamespace_Https_Protocol, Messages.FileTransferNamespace_Mailto_Protocol, Messages.FileTransferNamespace_Gopher_Protocol};
-
-	private static final String URL_HANDLER_PROTOCOL_NAME = "url.handler.protocol"; //$NON-NLS-1$
-
-	private static final String URLSTREAM_HANDLER_SERVICE_NAME = "org.osgi.service.url.URLStreamHandlerService"; //$NON-NLS-1$
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.eclipse.ecf.provider.filetransfer"; //$NON-NLS-1$
-
-	private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "retrieveFileTransferProtocolFactory"; //$NON-NLS-1$
-
-	private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
-			+ RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
-
-	private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "sendFileTransferProtocolFactory"; //$NON-NLS-1$
-
-	private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
-			+ SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
-
-	private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "browseFileTransferProtocolFactory"; //$NON-NLS-1$
-
-	private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
-			+ BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
-
-	// The shared instance
-	private static Activator plugin;
-
-	private BundleContext context = null;
-
-	private ServiceRegistration fileTransferServiceRegistration;
-
-	private ServiceTracker logServiceTracker = null;
-	private ServiceTracker extensionRegistryTracker = null;
-
-	private Map retrieveFileTransferProtocolMap;
-
-	private Map sendFileTransferProtocolMap;
-
-	private Map browseFileTransferProtocolMap;
-
-	private ServiceTracker adapterManagerTracker = null;
-
-	private ServiceTracker proxyServiceTracker = null;
-
-	private IURLConnectionModifier urlConnectionModifier = null;
-
-	private String[] excludedPlugins = null;
-
-	private ServiceRegistration protocolMapperRegistration;
-
-	private IRegistryChangeListener registryChangeListener = new IRegistryChangeListener() {
-
-		public void registryChanged(IRegistryChangeEvent event) {
-			final IExtensionDelta retrieveDelta[] = event.getExtensionDeltas(PLUGIN_ID, RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
-			for (int i = 0; i < retrieveDelta.length; i++) {
-				switch (retrieveDelta[i].getKind()) {
-					case IExtensionDelta.ADDED :
-						addRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
-						break;
-					case IExtensionDelta.REMOVED :
-						removeRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
-						break;
-				}
-			}
-			final IExtensionDelta sendDelta[] = event.getExtensionDeltas(PLUGIN_ID, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
-			for (int i = 0; i < sendDelta.length; i++) {
-				switch (sendDelta[i].getKind()) {
-					case IExtensionDelta.ADDED :
-						addSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
-						break;
-					case IExtensionDelta.REMOVED :
-						removeSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
-						break;
-				}
-			}
-			final IExtensionDelta browseDelta[] = event.getExtensionDeltas(PLUGIN_ID, BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
-			for (int i = 0; i < browseDelta.length; i++) {
-				switch (browseDelta[i].getKind()) {
-					case IExtensionDelta.ADDED :
-						addBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
-						break;
-					case IExtensionDelta.REMOVED :
-						removeBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
-						break;
-				}
-			}
-		}
-
-	};
-
-	private String[] parseExcludedPlugins() {
-		String prop = System.getProperty(PLUGIN_EXCLUDED_SYS_PROP_NAME);
-		if (prop == null)
-			return new String[0];
-		StringTokenizer tok = new StringTokenizer(prop, ","); //$NON-NLS-1$
-		int count = tok.countTokens();
-		String[] results = new String[count];
-		for (int i = 0; i < count; i++) {
-			results[i] = tok.nextToken();
-		}
-		return results;
-	}
-
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-		//
-	}
-
-	protected LogService getLogService() {
-		synchronized (this) {
-			if (this.context == null)
-				return null;
-			if (logServiceTracker == null) {
-				logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
-				logServiceTracker.open();
-			}
-			return (LogService) logServiceTracker.getService();
-		}
-	}
-
-	public IProxyService getProxyService() {
-		try {
-			if (proxyServiceTracker == null) {
-				proxyServiceTracker = new ServiceTracker(this.context, IProxyService.class.getName(), null);
-				proxyServiceTracker.open();
-			}
-			return (IProxyService) proxyServiceTracker.getService();
-		} catch (Exception e) {
-			logNoProxyWarning(e);
-		} catch (NoClassDefFoundError e) {
-			logNoProxyWarning(e);
-		}
-		return null;
-	}
-
-	public static void logNoProxyWarning(Throwable e) {
-		getDefault().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.ERROR, "Warning: Platform proxy API not available", e)); //$NON-NLS-1$
-	}
-
-	public void log(IStatus status) {
-		if (this.context == null)
-			return;
-		final LogService logService = getLogService();
-		if (logService != null) {
-			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
-		}
-	}
-
-	public Bundle getBundle() {
-		if (context == null)
-			return null;
-		return context.getBundle();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext ctxt) throws Exception {
-		plugin = this;
-		this.context = ctxt;
-		this.retrieveFileTransferProtocolMap = new HashMap(3);
-		this.sendFileTransferProtocolMap = new HashMap(3);
-		this.browseFileTransferProtocolMap = new HashMap(3);
-
-		// initialize the default url connection modifier for ssl
-		try {
-			Class urlConnectionModifierClass = Class.forName("org.eclipse.ecf.internal.provider.filetransfer.ssl.ECFURLConnectionModifier"); //$NON-NLS-1$
-			urlConnectionModifier = (IURLConnectionModifier) urlConnectionModifierClass.newInstance();
-			urlConnectionModifier.init(ctxt);
-		} catch (ClassNotFoundException e) {
-			// will occur if fragment is not installed or not on proper execution environment
-		} catch (Throwable t) {
-			log(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), "Unexpected Error in Activator.start", t)); //$NON-NLS-1$
-		}
-
-		fileTransferServiceRegistration = ctxt.registerService(IRetrieveFileTransferFactory.class.getName(), new IRetrieveFileTransferFactory() {
-			public IRetrieveFileTransfer newInstance() {
-				return new MultiProtocolRetrieveAdapter();
-			}
-		}, null);
-		this.extensionRegistryTracker = new ServiceTracker(ctxt, IExtensionRegistry.class.getName(), null);
-		this.extensionRegistryTracker.open();
-		final IExtensionRegistry registry = getExtensionRegistry();
-		if (registry != null) {
-			registry.addRegistryChangeListener(registryChangeListener);
-		}
-		// Can't be lazy about this, as schemes need to be registered with
-		// platform
-		loadProtocolHandlers();
-		// Finally, register this object as a IFileTransferProtocolToFactoryMapper service
-		protocolMapperRegistration = context.registerService(IFileTransferProtocolToFactoryMapper.class.getName(), this, null);
-	}
-
-	public boolean reinitialize() {
-		try {
-			loadProtocolHandlers();
-			return true;
-		} catch (Exception e) {
-			return false;
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
-	 */
-	public void stop(BundleContext ctxt) throws Exception {
-		final IExtensionRegistry registry = getExtensionRegistry();
-		if (registry != null) {
-			registry.removeRegistryChangeListener(registryChangeListener);
-		}
-
-		if (urlConnectionModifier != null) {
-			urlConnectionModifier.dispose();
-			urlConnectionModifier = null;
-		}
-		if (extensionRegistryTracker != null) {
-			extensionRegistryTracker.close();
-			extensionRegistryTracker = null;
-		}
-		if (fileTransferServiceRegistration != null) {
-			fileTransferServiceRegistration.unregister();
-			fileTransferServiceRegistration = null;
-		}
-		if (adapterManagerTracker != null) {
-			adapterManagerTracker.close();
-			adapterManagerTracker = null;
-		}
-		if (proxyServiceTracker != null) {
-			proxyServiceTracker.close();
-			proxyServiceTracker = null;
-		}
-		if (this.retrieveFileTransferProtocolMap != null) {
-			this.retrieveFileTransferProtocolMap.clear();
-			this.retrieveFileTransferProtocolMap = null;
-		}
-		if (this.sendFileTransferProtocolMap != null) {
-			this.sendFileTransferProtocolMap.clear();
-			this.sendFileTransferProtocolMap = null;
-		}
-		if (this.browseFileTransferProtocolMap != null) {
-			this.browseFileTransferProtocolMap.clear();
-			this.browseFileTransferProtocolMap = null;
-		}
-		if (this.protocolMapperRegistration != null) {
-			this.protocolMapperRegistration.unregister();
-			this.protocolMapperRegistration = null;
-		}
-
-		synchronized (this) {
-			this.context = null;
-		}
-		plugin = null;
-	}
-
-	/**
-	 * Returns the shared instance
-	 * 
-	 * @return the shared instance
-	 */
-	public synchronized static Activator getDefault() {
-		if (plugin == null) {
-			plugin = new Activator();
-		}
-		return plugin;
-	}
-
-	public String[] getPlatformSupportedSchemes() {
-		final ServiceTracker handlers = new ServiceTracker(context, URLSTREAM_HANDLER_SERVICE_NAME, null);
-		handlers.open();
-		final ServiceReference[] refs = handlers.getServiceReferences();
-		final Set protocols = new HashSet();
-		if (refs != null)
-			for (int i = 0; i < refs.length; i++) {
-				final Object protocol = refs[i].getProperty(URL_HANDLER_PROTOCOL_NAME);
-				if (protocol instanceof String)
-					protocols.add(protocol);
-				else if (protocol instanceof String[]) {
-					final String[] ps = (String[]) protocol;
-					for (int j = 0; j < ps.length; j++)
-						protocols.add(ps[j]);
-				}
-			}
-		handlers.close();
-		for (int i = 0; i < jvmSchemes.length; i++)
-			protocols.add(jvmSchemes[i]);
-		return (String[]) protocols.toArray(new String[] {});
-	}
-
-	public IExtensionRegistry getExtensionRegistry() {
-		if (extensionRegistryTracker == null) {
-			this.extensionRegistryTracker = new ServiceTracker(context, IExtensionRegistry.class.getName(), null);
-			this.extensionRegistryTracker.open();
-		}
-		return (IExtensionRegistry) extensionRegistryTracker.getService();
-	}
-
-	static class ProtocolFactory implements Comparable {
-		Object factory;
-		int priority = 0;
-		String id;
-
-		public ProtocolFactory(Object factory, int priority, String id) {
-			this.factory = factory;
-			this.priority = priority;
-			this.id = id;
-		}
-
-		public Object getFactory() {
-			return factory;
-		}
-
-		public String getID() {
-			return id;
-		}
-
-		public int getPriority() {
-			return priority;
-		}
-
-		/* (non-Javadoc)
-		 * @see java.lang.Comparable#compareTo(java.lang.Object)
-		 */
-		public int compareTo(Object another) {
-			if (!(another instanceof ProtocolFactory))
-				return -1;
-			ProtocolFactory other = (ProtocolFactory) another;
-			if (this.priority == other.priority)
-				return 0;
-			return (this.priority < other.priority) ? -1 : 1;
-		}
-	}
-
-	private int getPriority(IConfigurationElement configElement, String warning, String protocol) {
-		// Get priority for new entry, if optional priority attribute specified
-		final String priorityString = configElement.getAttribute(PRIORITY_ATTR);
-		int priority = DEFAULT_PRIORITY;
-		if (priorityString != null) {
-			try {
-				priority = new Integer(priorityString).intValue();
-				// Make sure that any negative values are reset to 0 (highest priority)
-				priority = (priority < 0) ? 0 : priority;
-			} catch (NumberFormatException e) {
-				// Give warning
-				Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for {1} from {2} has invalid priority {3}. Priority will be set to {4}", new Object[] {warning, protocol, configElement.getDeclaringExtension().getContributor().getName(), priorityString, String.valueOf(DEFAULT_PRIORITY)}), null)); //$NON-NLS-1$
-			}
-		}
-		return priority;
-	}
-
-	boolean pluginExcluded(String pluginId) {
-		if (excludedPlugins == null) {
-			excludedPlugins = parseExcludedPlugins();
-		}
-		List l = Arrays.asList(excludedPlugins);
-		return l.contains(pluginId);
-	}
-
-	void addRetrieveExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String CONTRIBUTION_WARNING = "File retrieve contribution"; //$NON-NLS-1$
-			try {
-				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
-				// Only add the factories if the contributor plugin has not been excluded
-				if (!pluginExcluded(pluginId)) {
-					// First create factory clazz 
-					final IRetrieveFileTransferFactory retrieveFactory = (IRetrieveFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
-					// Get priority for new entry, if optional priority attribute specified
-					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
-					String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();
-					// Now add new ProtocolFactory
-					setRetrieveFileTransferFactory(protocol, contributorName, retrieveFactory, priority);
-				} else {
-					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing retrieve factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			} catch (final CoreException e) {
-				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
-			}
-		}
-	}
-
-	void removeRetrieveExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String id = getRetrieveFileTransferFactoryId(protocol);
-			if (id != null)
-				removeRetrieveFileTransferFactory(id);
-		}
-	}
-
-	void addSendExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String CONTRIBUTION_WARNING = "File send contribution"; //$NON-NLS-1$
-			try {
-				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
-				// Only add the factories if the contributor plugin has not been excluded
-				if (!pluginExcluded(pluginId)) {
-					// First create factory clazz 
-					final ISendFileTransferFactory clazz = (ISendFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
-					// Get priority for new entry, if optional priority attribute specified
-					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
-					setSendFileTransferFactory(protocol, pluginId, clazz, priority);
-				} else {
-					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing send factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			} catch (final CoreException e) {
-				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
-			}
-		}
-	}
-
-	void removeSendExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String id = getSendFileTransferFactoryId(protocol);
-			if (id != null)
-				removeSendFileTransferFactory(id);
-		}
-	}
-
-	void addBrowseExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String CONTRIBUTION_WARNING = "File browse contribution"; //$NON-NLS-1$
-			try {
-				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
-				// Only add the factories if the contributor plugin has not been excluded
-				if (!pluginExcluded(pluginId)) {
-					// First create factory clazz 
-					final IRemoteFileSystemBrowserFactory clazz = (IRemoteFileSystemBrowserFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
-					// Get priority for new entry, if optional priority attribute specified
-					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
-					setBrowseFileTransferFactory(protocol, pluginId, clazz, priority);
-				} else {
-					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing browse factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			} catch (final CoreException e) {
-				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
-			}
-		}
-	}
-
-	void removeBrowseExtensions(IConfigurationElement[] configElements) {
-		for (int i = 0; i < configElements.length; i++) {
-			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
-			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-				return;
-			String id = getBrowseFileTransferFactoryId(protocol);
-			if (id != null)
-				removeBrowseFileTransferFactory(id);
-		}
-	}
-
-	private void loadProtocolHandlers() {
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null) {
-			final IExtensionPoint retrieveExtensionPoint = reg.getExtensionPoint(RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
-			if (retrieveExtensionPoint != null)
-				addRetrieveExtensions(retrieveExtensionPoint.getConfigurationElements());
-			// Now do it with send
-			final IExtensionPoint sendExtensionPoint = reg.getExtensionPoint(SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
-			if (sendExtensionPoint != null)
-				addSendExtensions(sendExtensionPoint.getConfigurationElements());
-			// Now for browse
-			final IExtensionPoint browseExtensionPoint = reg.getExtensionPoint(BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
-			if (browseExtensionPoint != null)
-				addBrowseExtensions(browseExtensionPoint.getConfigurationElements());
-		}
-	}
-
-	private boolean isSchemeRegistered(String protocol, String[] schemes) {
-		for (int i = 0; i < schemes.length; i++) {
-			if (protocol.equals(schemes[i]))
-				return true;
-		}
-		return false;
-	}
-
-	class DummyURLStreamHandlerService extends AbstractURLStreamHandlerService {
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.osgi.service.url.AbstractURLStreamHandlerService#openConnection(java.net.URL)
-		 */
-		public URLConnection openConnection(URL u) throws IOException {
-			throw new IOException(NLS.bind("URLConnection cannot be created for {0}", u.toExternalForm())); //$NON-NLS-1$
-		}
-
-	}
-
-	private final DummyURLStreamHandlerService dummyService = new DummyURLStreamHandlerService();
-
-	private void registerScheme(String protocol) {
-		final Hashtable properties = new Hashtable();
-		properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] {protocol});
-		context.registerService(URLStreamHandlerService.class.getName(), dummyService, properties);
-	}
-
-	public IRetrieveFileTransfer getFileTransfer(String protocol) {
-		ProtocolFactory protocolFactory = null;
-		synchronized (retrieveFileTransferProtocolMap) {
-			protocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
-		}
-		if (protocolFactory == null)
-			return null;
-		final IRetrieveFileTransferFactory factory = (IRetrieveFileTransferFactory) protocolFactory.getFactory();
-		if (factory != null)
-			return factory.newInstance();
-		return null;
-	}
-
-	public ISendFileTransfer getSendFileTransfer(String protocol) {
-		ProtocolFactory protocolFactory = null;
-		synchronized (sendFileTransferProtocolMap) {
-			protocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
-		}
-		if (protocolFactory == null)
-			return null;
-		final ISendFileTransferFactory factory = (ISendFileTransferFactory) protocolFactory.getFactory();
-		if (factory != null)
-			return factory.newInstance();
-		return null;
-	}
-
-	public IRemoteFileSystemBrowser getBrowseFileTransfer(String protocol) {
-		ProtocolFactory protocolFactory = null;
-		synchronized (browseFileTransferProtocolMap) {
-			protocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
-		}
-		if (protocolFactory == null)
-			return null;
-		final IRemoteFileSystemBrowserFactory factory = (IRemoteFileSystemBrowserFactory) protocolFactory.getFactory();
-		if (factory != null)
-			return factory.newInstance();
-		return null;
-	}
-
-	public IAdapterManager getAdapterManager() {
-		// First, try to get the adapter manager via
-		if (adapterManagerTracker == null) {
-			adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null);
-			adapterManagerTracker.open();
-		}
-		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService();
-		// Then, if the service isn't there, try to get from Platform class via
-		// PlatformHelper class
-		if (adapterManager == null)
-			adapterManager = PlatformHelper.getPlatformAdapterManager();
-		return adapterManager;
-	}
-
-	public IURLConnectionModifier getURLConnectionModifier() {
-		return urlConnectionModifier;
-	}
-
-	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority) {
-		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-			return false;
-		if (id == null)
-			return false;
-		if (factory == null)
-			return false;
-		if (!pluginExcluded(id)) {
-			// Now create new ProtocolFactory
-			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
-			synchronized (retrieveFileTransferProtocolMap) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
-				// If found, choose between them based upon comparing their priority
-				if (oldProtocolFactory != null) {
-					// Now, compare priorities and pick winner
-					String CONTRIBUTION_WARNING = "File retrieve contribution"; //$NON-NLS-1$
-					int result = oldProtocolFactory.compareTo(newProtocolFactory);
-					if (result < 0) {
-						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
-						return false;
-					} else if (result == 0) {
-						// Warn that we are using new one because they have the same priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
-					} else if (result > 0) {
-						// Warn that we are using new one because it has higher priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
-					}
-				}
-				String[] existingSchemes = getPlatformSupportedSchemes();
-				if (!isSchemeRegistered(protocol, existingSchemes))
-					registerScheme(protocol);
-				// Finally, put clazz in map with protocol as key
-				retrieveFileTransferProtocolMap.put(protocol, newProtocolFactory);
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public String getRetrieveFileTransferFactoryId(String protocol) {
-		if (protocol == null)
-			return null;
-		synchronized (retrieveFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return null;
-			return oldProtocolFactory.getID();
-		}
-	}
-
-	public int getRetrieveFileTransferPriority(String protocol) {
-		if (protocol == null)
-			return -1;
-		synchronized (retrieveFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return -1;
-			return oldProtocolFactory.getPriority();
-		}
-	}
-
-	public boolean removeRetrieveFileTransferFactory(String id) {
-		if (id == null)
-			return false;
-		boolean removed = false;
-		synchronized (retrieveFileTransferProtocolMap) {
-			for (Iterator i = retrieveFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(i.next());
-				if (oldProtocolFactory == null)
-					continue;
-				if (id.equals(oldProtocolFactory.getID())) {
-					i.remove();
-					removed = true;
-				}
-			}
-			return removed;
-		}
-	}
-
-	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority) {
-		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-			return false;
-		if (id == null)
-			return false;
-		if (factory == null)
-			return false;
-		if (!pluginExcluded(id)) {
-			// Now create new ProtocolFactory
-			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
-			synchronized (browseFileTransferProtocolMap) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
-				// If found, choose between them based upon comparing their priority
-				if (oldProtocolFactory != null) {
-					// Now, compare priorities and pick winner
-					String CONTRIBUTION_WARNING = "File browse contribution"; //$NON-NLS-1$
-					int result = oldProtocolFactory.compareTo(newProtocolFactory);
-					if (result < 0) {
-						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
-						return false;
-					} else if (result == 0) {
-						// Warn that we are using new one because they have the same priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
-					} else if (result > 0) {
-						// Warn that we are using new one because it has higher priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
-					}
-				}
-				String[] existingSchemes = getPlatformSupportedSchemes();
-				if (!isSchemeRegistered(protocol, existingSchemes))
-					registerScheme(protocol);
-				// Finally, put clazz in map with protocol as key
-				browseFileTransferProtocolMap.put(protocol, newProtocolFactory);
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public String getBrowseFileTransferFactoryId(String protocol) {
-		if (protocol == null)
-			return null;
-		synchronized (browseFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return null;
-			return oldProtocolFactory.getID();
-		}
-	}
-
-	public int getBrowseFileTransferPriority(String protocol) {
-		if (protocol == null)
-			return -1;
-		synchronized (browseFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return -1;
-			return oldProtocolFactory.getPriority();
-		}
-	}
-
-	public boolean removeBrowseFileTransferFactory(String id) {
-		if (id == null)
-			return false;
-		boolean removed = false;
-		synchronized (browseFileTransferProtocolMap) {
-			for (Iterator i = browseFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(i.next());
-				if (oldProtocolFactory == null)
-					continue;
-				if (id.equals(oldProtocolFactory.getID())) {
-					i.remove();
-					removed = true;
-				}
-			}
-			return removed;
-		}
-	}
-
-	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority) {
-		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
-			return false;
-		if (id == null)
-			return false;
-		if (factory == null)
-			return false;
-		if (!pluginExcluded(id)) {
-			// Now create new ProtocolFactory
-			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
-			synchronized (sendFileTransferProtocolMap) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
-				// If found, choose between them based upon comparing their priority
-				if (oldProtocolFactory != null) {
-					// Now, compare priorities and pick winner
-					String CONTRIBUTION_WARNING = "File send contribution"; //$NON-NLS-1$
-					int result = oldProtocolFactory.compareTo(newProtocolFactory);
-					if (result < 0) {
-						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
-						return false;
-					} else if (result == 0) {
-						// Warn that we are using new one because they have the same priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
-					} else if (result > 0) {
-						// Warn that we are using new one because it has higher priority.
-						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
-					}
-				}
-				String[] existingSchemes = getPlatformSupportedSchemes();
-				if (!isSchemeRegistered(protocol, existingSchemes))
-					registerScheme(protocol);
-				// Finally, put clazz in map with protocol as key
-				sendFileTransferProtocolMap.put(protocol, newProtocolFactory);
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public String getSendFileTransferFactoryId(String protocol) {
-		if (protocol == null)
-			return null;
-		synchronized (sendFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return null;
-			return oldProtocolFactory.getID();
-		}
-	}
-
-	public int getSendFileTransferPriority(String protocol) {
-		if (protocol == null)
-			return -1;
-		synchronized (sendFileTransferProtocolMap) {
-			ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
-			if (oldProtocolFactory == null)
-				return -1;
-			return oldProtocolFactory.getPriority();
-		}
-	}
-
-	public boolean removeSendFileTransferFactory(String id) {
-		if (id == null)
-			return false;
-		boolean removed = false;
-		synchronized (sendFileTransferProtocolMap) {
-			for (Iterator i = sendFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
-				ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(i.next());
-				if (oldProtocolFactory == null)
-					continue;
-				if (id.equals(oldProtocolFactory.getID())) {
-					i.remove();
-					removed = true;
-				}
-			}
-			return removed;
-		}
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
deleted file mode 100644
index 328a1f0..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.provider.filetransfer;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * 
- */
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.filetransfer.messages"; //$NON-NLS-1$
-	public static String AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL;
-	public static String AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY;
-	public static String AbstractRetrieveFileTransfer_TransferRateFormat;
-	public static String AbstractRetrieveFileTransfer_MalformedURLException;
-	public static String AbstractRetrieveFileTransfer_Progress_Data;
-	public static String AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY;
-	public static String AbstractRetrieveFileTransfer_Exception_User_Cancelled;
-	public static String AbstractRetrieveFileTransfer_InfoTransferRate;
-	public static String AbstractRetrieveFileTransfer_RemoteFileID_Not_Null;
-	public static String AbstractRetrieveFileTransfer_SizeUnitBytes;
-	public static String AbstractRetrieveFileTransfer_SizeUnitGB;
-	public static String AbstractRetrieveFileTransfer_SizeUnitKB;
-	public static String AbstractRetrieveFileTransfer_SizeUnitMB;
-	public static String AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK;
-	public static String AbstractRetrieveFileTransfer_Status_Transfer_Exception;
-	public static String AbstractRetrieveFileTransfer_TransferListener_Not_Null;
-	public static String AbstractOutgoingFileTransfer_MalformedURLException;
-	public static String AbstractOutgoingFileTransfer_Progress_Data;
-	public static String AbstractOutgoingFileTransfer_Exception_User_Cancelled;
-	public static String AbstractOutgoingFileTransfer_RemoteFileID_Not_Null;
-	public static String AbstractOutgoingFileTransfer_Status_Transfer_Completed_OK;
-	public static String AbstractOutgoingFileTransfer_Status_Transfer_Exception;
-	public static String AbstractOutgoingFileTransfer_TransferListener_Not_Null;
-	public static String UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR;
-	public static String UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST;
-	public static String UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START;
-	public static String UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED;
-	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS;
-	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT;
-	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE;
-	public static String UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO;
-	public static String UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException;
-	public static String UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
-	public static String UrlConnectionOutgoingFileTransfer_EXCEPTION_COULD_NOT_CONNECT;
-	public static String FileSystemBrowser_EXCEPTION_DIRECTORY_DOES_NOT_EXIST;
-	public static String FileTransferNamespace_Exception_Args_Null;
-	public static String FileTransferNamespace_Exception_Create_Instance;
-	public static String FileTransferNamespace_Exception_Create_Instance_Failed;
-	public static String FileTransferNamespace_File_Protocol;
-	public static String FileTransferNamespace_Ftp_Protocol;
-	public static String FileTransferNamespace_Http_Protocol;
-	public static String FileTransferNamespace_Https_Protocol;
-	public static String FileTransferNamespace_Jar_Protocol;
-	public static String FileTransferNamespace_Mailto_Protocol;
-	public static String FileTransferNamespace_Gopher_Protocol;
-	public static String FileTransferNamespace_Namespace_Protocol;
-	public static String FileTransferID_Exception_Url_Not_Null;
-	public static String LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_INPUT;
-	public static String LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_OUTPUT;
-	public static String MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER;
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		//
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
deleted file mode 100644
index b3d5566..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
+++ /dev/null
@@ -1,61 +0,0 @@
-################################################################################
-# Copyright (c) 2006, 2007 Composent, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#    Composent, Inc. - initial API and implementation
-################################################################################
-
-AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL=File transfer info cannot be null.
-AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY=Exception in send done event handler.
-AbstractRetrieveFileTransfer_TransferRateFormat=0.00 {0}
-AbstractRetrieveFileTransfer_Progress_Data=\ - data 
-AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY=Exception in receive done/paused event handler.
-AbstractRetrieveFileTransfer_Exception_User_Cancelled=Cancelled by user
-AbstractRetrieveFileTransfer_InfoTransferRate=({0}/s)
-AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK=Transfer Completed OK
-UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED=not connected
-UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS=file modified since last access
-UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT=Exception connecting to {0}.
-UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE=invalid server response
-UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST=invalid server response to partial range request
-UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START=end position cannot be less than or equal to start position
-UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR=resume start error
-UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO=start position cannot be less then 0
-UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException=Password not provided from callback.
-UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT=Username: 
-UrlConnectionOutgoingFileTransfer_EXCEPTION_COULD_NOT_CONNECT=Exception connecting to {0}.
-AbstractRetrieveFileTransfer_Status_Transfer_Exception=Transfer Exception
-AbstractRetrieveFileTransfer_RemoteFileID_Not_Null=remoteFileID cannot be null
-AbstractRetrieveFileTransfer_TransferListener_Not_Null=transferListener cannot be null
-AbstractOutgoingFileTransfer_Progress_Data=\ - data 
-AbstractOutgoingFileTransfer_Exception_User_Cancelled=Canceled by user
-AbstractOutgoingFileTransfer_Status_Transfer_Completed_OK=Transfer Completed OK
-AbstractOutgoingFileTransfer_Status_Transfer_Exception=Transfer Exception
-AbstractOutgoingFileTransfer_RemoteFileID_Not_Null=remoteFileID cannot be null
-AbstractOutgoingFileTransfer_TransferListener_Not_Null=transferListener cannot be null
-AbstractOutgoingFileTransfer_MalformedURLException=Invalid URL
-AbstractRetrieveFileTransfer_MalformedURLException=Exception creating URL for {0}
-AbstractRetrieveFileTransfer_SizeUnitBytes=bytes
-AbstractRetrieveFileTransfer_SizeUnitGB=GB
-AbstractRetrieveFileTransfer_SizeUnitKB=KB
-AbstractRetrieveFileTransfer_SizeUnitMB=MB
-FileSystemBrowser_EXCEPTION_DIRECTORY_DOES_NOT_EXIST=Directory {0} does not exist.
-FileTransferNamespace_Namespace_Protocol=ecf.provider.filetransfer
-FileTransferNamespace_Http_Protocol=http
-FileTransferNamespace_Ftp_Protocol=ftp
-FileTransferNamespace_File_Protocol=file
-FileTransferNamespace_Jar_Protocol=jar
-FileTransferNamespace_Https_Protocol=https
-FileTransferNamespace_Mailto_Protocol=mailto
-FileTransferNamespace_Gopher_Protocol=mailto
-FileTransferNamespace_Exception_Args_Null=FileTransferID<init> arguments are empty
-FileTransferNamespace_Exception_Create_Instance=Exception in createInstance
-FileTransferNamespace_Exception_Create_Instance_Failed=arguments not correct to create instance of FileTransferNamespace
-FileTransferID_Exception_Url_Not_Null=FileTransferID<init> URL cannot be null
-LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_INPUT=Exception opening file {0} for input.
-LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_OUTPUT=Exception opening {0} for output.
-MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER=No protocol handler for {0}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java
deleted file mode 100644
index 42bdf82..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer;
-
-import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
-import org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory;
-
-/**
- * 
- * @since 3.0.1
- *
- */
-public interface IFileTransferProtocolToFactoryMapper {
-
-	/**
-	 * <p>
-	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
-	 * requests for the given protocol will use the given factory.  </p>
-	 * <p>For this method to be successful the protocol has to be
-	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
-	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
-	 * given protocol.  The default priority is 100, and the highest priority is 0.
-	 * </p>
-	 * @param protocol the protocol (e.g. http/https) to map the factory to.
-	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
-	 * @param factory the factory to associate with the given protocol
-	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
-	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
-	 */
-	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority);
-
-	/**
-	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
-	 * active factory, returns <code>null</code>.
-	 * 
-	 * @param protocol the protocol to get the id for (e.g. http/https)
-	 * 
-	 * @return id of the factory associated with the given protocol
-	 */
-	public String getRetrieveFileTransferFactoryId(String protocol);
-
-	/**
-	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
-	 * 
-	 * @param protocol the protocol to get the priority for (e.g. http/https)
-	 * 
-	 * @return int priority for the given protocol
-	 */
-	public int getRetrieveFileTransferPriority(String protocol);
-
-	/**
-	 * Remove the factory with the given id.
-	 * @param id the id of the factory to remove.
-	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
-	 */
-	public boolean removeRetrieveFileTransferFactory(String id);
-
-	/**
-	 * <p>
-	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
-	 * requests for the given protocol will use the given factory.  </p>
-	 * <p>For this method to be successful the protocol has to be
-	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
-	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
-	 * given protocol.  The default priority is 100, and the highest priority is 0.
-	 * </p>
-	 * @param protocol the protocol (e.g. http/https) to map the factory to.
-	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
-	 * @param factory the factory to associate with the given protocol
-	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
-	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
-	 */
-	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority);
-
-	/**
-	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
-	 * active factory, returns <code>null</code>.
-	 * 
-	 * @param protocol the protocol to get the id for (e.g. http/https)
-	 * 
-	 * @return id of the factory associated with the given protocol
-	 */
-	public String getBrowseFileTransferFactoryId(String protocol);
-
-	/**
-	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
-	 * 
-	 * @param protocol the protocol to get the priority for (e.g. http/https)
-	 * 
-	 * @return int priority for the given protocol
-	 */
-	public int getBrowseFileTransferPriority(String protocol);
-
-	/**
-	 * Remove the factory with the given id.
-	 * @param id the id of the factory to remove.
-	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
-	 */
-	public boolean removeBrowseFileTransferFactory(String id);
-
-	/**
-	 * <p>
-	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
-	 * requests for the given protocol will use the given factory.  </p>
-	 * <p>For this method to be successful the protocol has to be
-	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
-	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
-	 * given protocol.  The default priority is 100, and the highest priority is 0.
-	 * </p>
-	 * @param protocol the protocol (e.g. http/https) to map the factory to.
-	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
-	 * @param factory the factory to associate with the given protocol
-	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
-	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
-	 */
-	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority);
-
-	/**
-	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
-	 * active factory, returns <code>null</code>.
-	 * 
-	 * @param protocol the protocol to get the id for (e.g. http/https)
-	 * 
-	 * @return id of the factory associated with the given protocol
-	 */
-	public String getSendFileTransferFactoryId(String protocol);
-
-	/**
-	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
-	 * 
-	 * @param protocol the protocol to get the priority for (e.g. http/https)
-	 * 
-	 * @return int priority for the given protocol
-	 */
-	public int getSendFileTransferPriority(String protocol);
-
-	/**
-	 * Remove the factory with the given id.
-	 * @param id the id of the factory to remove.
-	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
-	 */
-	public boolean removeSendFileTransferFactory(String id);
-
-	/**
-	 * Reinitialized protocol to factory mapping defined via extension registry/extension points.
-	 * @return true if reinitialization succeeds, false if not
-	 */
-	public boolean reinitialize();
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
deleted file mode 100644
index 331bedc..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2007, 2009 Composent, Inc., IBM and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *    Henrich Kraemer - bug 263613, [transport] Update site contacting / downloading is not cancelable
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.browse;
-
-import java.net.URI;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.core.util.ProxyAddress;
-import org.eclipse.ecf.filetransfer.IRemoteFile;
-import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
-import org.eclipse.ecf.filetransfer.IRemoteFileSystemRequest;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent;
-import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemEvent;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-
-/**
- * Abstract class for browsing an efs file system.
- */
-public abstract class AbstractFileSystemBrowser {
-
-	protected IFileID fileID = null;
-	protected IRemoteFileSystemListener listener = null;
-
-	private Exception exception = null;
-	protected IRemoteFile[] remoteFiles = null;
-
-	protected Proxy proxy;
-	protected URL directoryOrFile;
-
-	protected IConnectContext connectContext;
-
-	protected DirectoryJob job = null;
-
-	Object lock = new Object();
-
-	protected class DirectoryJob extends Job {
-
-		private IRemoteFileSystemRequest request;
-
-		public DirectoryJob() {
-			super(fileID.getName());
-		}
-
-		protected IStatus run(IProgressMonitor monitor) {
-			try {
-				if (monitor.isCanceled())
-					throw newUserCancelledException();
-				runRequest();
-			} catch (Exception e) {
-				AbstractFileSystemBrowser.this.setException(e);
-			} finally {
-				listener.handleRemoteFileEvent(createRemoteFileEvent());
-				cleanUp();
-			}
-			return Status.OK_STATUS;
-		}
-
-		public void setRequest(IRemoteFileSystemRequest request) {
-			this.request = request;
-		}
-
-		public IRemoteFileSystemRequest getRequest() {
-			return request;
-		}
-
-		protected void canceling() {
-			request.cancel();
-		}
-
-	}
-
-	protected void cancel() {
-		synchronized (lock) {
-			if (job != null) {
-				job.cancel();
-			}
-		}
-
-	}
-
-	protected void cleanUp() {
-		synchronized (lock) {
-			job = null;
-		}
-	}
-
-	/**
-	 * Run the actual request.  This method is called within the job created to actually get the
-	 * directory or file information.
-	 * @throws Exception if some problem with making the request or receiving response to the request.
-	 */
-	protected abstract void runRequest() throws Exception;
-
-	public AbstractFileSystemBrowser(IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL url, IConnectContext connectContext, Proxy proxy) {
-		Assert.isNotNull(directoryOrFileID);
-		this.fileID = directoryOrFileID;
-		Assert.isNotNull(listener);
-		this.listener = listener;
-		this.directoryOrFile = url;
-		this.connectContext = connectContext;
-		this.proxy = proxy;
-	}
-
-	public abstract class RemoteFileSystemRequest implements IRemoteFileSystemRequest {
-		public void cancel() {
-			synchronized (lock) {
-				if (job != null)
-					job.cancel();
-			}
-		}
-
-		public IFileID getFileID() {
-			return fileID;
-		}
-
-		public IRemoteFileSystemListener getRemoteFileListener() {
-			return listener;
-		}
-
-	}
-
-	public IRemoteFileSystemRequest sendBrowseRequest() {
-		job = new DirectoryJob();
-
-		IRemoteFileSystemRequest request = createRemoteFileSystemRequest();
-		job.setRequest(request);
-
-		job.schedule();
-		return request;
-	}
-
-	protected IRemoteFileSystemRequest createRemoteFileSystemRequest() {
-		return new RemoteFileSystemRequest() {
-			public Object getAdapter(Class adapter) {
-				if (adapter == null) {
-					return null;
-				}
-				if (adapter.isInstance(this)) {
-					return this;
-				}
-				return null;
-			}
-
-		};
-	}
-
-	/**
-	 * @return file system directory event
-	 */
-	protected IRemoteFileSystemEvent createRemoteFileEvent() {
-		return new IRemoteFileSystemBrowseEvent() {
-
-			public IFileID getFileID() {
-				return fileID;
-			}
-
-			public Exception getException() {
-				return exception;
-			}
-
-			public String toString() {
-				StringBuffer buf = new StringBuffer("RemoteFileSystemBrowseEvent["); //$NON-NLS-1$
-				buf.append("fileID=").append(fileID).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-				List list = (remoteFiles != null) ? Arrays.asList(remoteFiles) : null;
-				buf.append("files=").append(list).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
-				return buf.toString();
-			}
-
-			public IRemoteFile[] getRemoteFiles() {
-				return remoteFiles;
-			}
-		};
-	}
-
-	protected abstract void setupProxy(Proxy proxy);
-
-	/**
-	 * Select a single proxy from a set of proxies available for the given host.  This implementation
-	 * selects in the following manner:  1) If proxies provided is null or array of 0 length, null 
-	 * is returned.  If only one proxy is available (array of length 1) then the entry is returned.
-	 * If proxies provided is length > 1, then if the type of a proxy in the array matches the given
-	 * protocol (e.g. http, https), then the first matching proxy is returned.  If the protocol does
-	 * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned.  Subclasses may
-	 * override if desired.
-	 * 
-	 * @param protocol the target protocol (e.g. http, https, scp, etc).  Will not be <code>null</code>.
-	 * @param proxies the proxies to select from.  May be <code>null</code> or array of length 0.
-	 * @return proxy data selected from the proxies provided.  
-	 */
-	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
-		if (proxies == null || proxies.length == 0)
-			return null;
-		// If only one proxy is available, then use that
-		if (proxies.length == 1)
-			return proxies[0];
-		// If more than one proxy is available, then if http/https protocol then look for that
-		// one...if not found then use first
-		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
-					return proxies[i];
-			}
-		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
-					return proxies[i];
-			}
-		}
-		// If we haven't found it yet, then return the first one.
-		return proxies[0];
-	}
-
-	protected void setupProxies() {
-		// If it's been set directly (via ECF API) then this overrides platform settings
-		if (proxy == null) {
-			try {
-				IProxyService proxyService = Activator.getDefault().getProxyService();
-				// Only do this if platform service exists
-				if (proxyService != null && proxyService.isProxiesEnabled()) {
-					// Setup via proxyService entry
-					URI target = new URI(directoryOrFile.toExternalForm());
-					final IProxyData[] proxies = proxyService.select(target);
-					IProxyData selectedProxy = selectProxyFromProxies(target.getScheme(), proxies);
-					if (selectedProxy != null) {
-						proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
-					}
-				}
-			} catch (Exception e) {
-				// If we don't even have the classes for this (i.e. the org.eclipse.core.net plugin not available)
-				// then we simply log and ignore
-				Activator.logNoProxyWarning(e);
-			} catch (NoClassDefFoundError e) {
-				Activator.logNoProxyWarning(e);
-			}
-		}
-		if (proxy != null)
-			setupProxy(proxy);
-	}
-
-	protected synchronized void setException(Exception exception) {
-		this.exception = exception;
-	}
-
-	protected synchronized Exception getException() {
-		return this.exception;
-	}
-
-	protected synchronized boolean isCanceled() {
-		return exception instanceof UserCancelledException;
-	}
-
-	protected synchronized void setCanceled(Exception e) {
-		if (e instanceof UserCancelledException) {
-			exception = e;
-		} else {
-			exception = newUserCancelledException();
-		}
-	}
-
-	protected UserCancelledException newUserCancelledException() {
-		return new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
deleted file mode 100644
index 4f00dc7..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.browse;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.Authenticator;
-import java.net.HttpURLConnection;
-import java.net.PasswordAuthentication;
-import java.net.URL;
-import java.net.URLConnection;
-import org.eclipse.ecf.core.security.Callback;
-import org.eclipse.ecf.core.security.CallbackHandler;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.security.NameCallback;
-import org.eclipse.ecf.core.security.ObjectCallback;
-import org.eclipse.ecf.core.security.UnsupportedCallbackException;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IRemoteFile;
-import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.IURLConnectionModifier;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class URLFileSystemBrowser extends AbstractFileSystemBrowser {
-
-	private static final String USERNAME_PREFIX = Messages.UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
-
-	private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
-
-	private static final String DEFAULT_CONNECT_TIMEOUT = "30000"; //$NON-NLS-1$
-
-	private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
-
-	private static final String DEFAULT_READ_TIMEOUT = "30000"; //$NON-NLS-1$
-
-	private JREProxyHelper proxyHelper = null;
-
-	protected String username = null;
-
-	protected String password = null;
-
-	/**
-	 * @param directoryOrFileID
-	 * @param listener
-	 */
-	public URLFileSystemBrowser(IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) {
-		super(directoryOrFileID, listener, directoryOrFileURL, connectContext, proxy);
-		proxyHelper = new JREProxyHelper();
-	}
-
-	private void setupTimeouts() {
-		String existingTimeout = System.getProperty(JRE_CONNECT_TIMEOUT_PROPERTY);
-		if (existingTimeout == null) {
-			System.setProperty(JRE_CONNECT_TIMEOUT_PROPERTY, DEFAULT_CONNECT_TIMEOUT);
-		}
-		existingTimeout = System.getProperty(JRE_READ_TIMEOUT_PROPERTY);
-		if (existingTimeout == null) {
-			System.setProperty(JRE_READ_TIMEOUT_PROPERTY, DEFAULT_READ_TIMEOUT);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser#runRequest()
-	 */
-	protected void runRequest() throws Exception {
-		int code = -1;
-		try {
-			setupProxies();
-			setupAuthentication();
-			setupTimeouts();
-			URLConnection urlConnection = (URLConnection) directoryOrFile.openConnection();
-			// set cache to off if using jar protocol
-			// this is for addressing bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=235933
-			if (directoryOrFile.getProtocol().equalsIgnoreCase("jar")) { //$NON-NLS-1$
-				urlConnection.setUseCaches(false);
-			}
-			// Add http 1.1 'Connection: close' header in order to potentially avoid
-			// server issue described here https://bugs.eclipse.org/bugs/show_bug.cgi?id=234916#c13
-			// See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247197
-			// also see http 1.1 rfc section 14-10 in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
-			urlConnection.setRequestProperty("Connection", "close"); //$NON-NLS-1$ //$NON-NLS-2$
-
-			IURLConnectionModifier connectionModifier = Activator.getDefault().getURLConnectionModifier();
-			if (connectionModifier != null) {
-				connectionModifier.setSocketFactoryForConnection(urlConnection);
-			}
-			if (urlConnection instanceof HttpURLConnection) {
-				HttpURLConnection httpConnection = (HttpURLConnection) urlConnection;
-				httpConnection.setRequestMethod("HEAD"); //$NON-NLS-1$
-				httpConnection.connect();
-			} else {
-				InputStream ins = urlConnection.getInputStream();
-				ins.close();
-			}
-			code = getResponseCode(urlConnection);
-			if (isHTTP()) {
-				if (code == HttpURLConnection.HTTP_OK) {
-					// do nothing
-				} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-					throw new BrowseFileTransferException(NLS.bind("File not found: {0}", directoryOrFile.toString()), code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-					throw new BrowseFileTransferException("Unauthorized", code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-					throw new BrowseFileTransferException("Forbidden", code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-					throw new BrowseFileTransferException("Proxy auth required", code); //$NON-NLS-1$
-				} else {
-					throw new BrowseFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code); //$NON-NLS-1$
-				}
-			}
-			remoteFiles = new IRemoteFile[1];
-			remoteFiles[0] = new URLRemoteFile(urlConnection.getLastModified(), urlConnection.getContentLength(), fileID);
-		} catch (final FileNotFoundException e) {
-			throw new IncomingFileTransferException(NLS.bind("File not found: {0}", directoryOrFile.toString()), 404); //$NON-NLS-1$
-		} catch (Exception e) {
-			Exception except = (e instanceof BrowseFileTransferException) ? e : new BrowseFileTransferException(NLS.bind("Could not connect to {0}", directoryOrFile), e, code); //$NON-NLS-1$
-			throw except;
-		}
-	}
-
-	private boolean isHTTP() {
-		final String protocol = directoryOrFile.getProtocol();
-		if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) //$NON-NLS-1$ //$NON-NLS-2$
-			return true;
-		return false;
-	}
-
-	private int getResponseCode(URLConnection urlConnection) {
-		int responseCode = -1;
-		String response = urlConnection.getHeaderField(0);
-		if (response == null) {
-			responseCode = -1;
-			return responseCode;
-		}
-		if (!response.startsWith("HTTP/")) //$NON-NLS-1$
-			return -1;
-		response = response.trim();
-		final int mark = response.indexOf(" ") + 1; //$NON-NLS-1$
-		if (mark == 0)
-			return -1;
-		int last = mark + 3;
-		if (last > response.length())
-			last = response.length();
-		responseCode = Integer.parseInt(response.substring(mark, last));
-		return responseCode;
-
-	}
-
-	protected void setupAuthentication() throws IOException, UnsupportedCallbackException {
-		if (connectContext == null)
-			return;
-		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
-		if (callbackHandler == null)
-			return;
-		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
-		final ObjectCallback passwordCallback = new ObjectCallback();
-		// Call callback with username and password callbacks
-		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
-		username = usernameCallback.getName();
-		Object o = passwordCallback.getObject();
-		if (!(o instanceof String))
-			throw new UnsupportedCallbackException(passwordCallback, Messages.UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException);
-		password = (String) passwordCallback.getObject();
-		// Now set authenticator to our authenticator with user and password
-		Authenticator.setDefault(new UrlConnectionAuthenticator());
-	}
-
-	class UrlConnectionAuthenticator extends Authenticator {
-		/* (non-Javadoc)
-		 * @see java.net.Authenticator#getPasswordAuthentication()
-		 */
-		protected PasswordAuthentication getPasswordAuthentication() {
-			return new PasswordAuthentication(username, password.toCharArray());
-		}
-	}
-
-	protected void setupProxy(final Proxy proxy2) {
-		proxyHelper.setupProxy(proxy2);
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java
deleted file mode 100644
index 378c1f3..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2006, 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.identity;
-
-import java.net.URL;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.identity.BaseID;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-
-public class FileTransferID extends BaseID implements IFileID {
-
-	private static final long serialVersionUID = 1274308869502156992L;
-
-	URL fileURL;
-
-	public FileTransferID(Namespace namespace, URL url) {
-		super(namespace);
-		Assert.isNotNull(url, Messages.FileTransferID_Exception_Url_Not_Null);
-		this.fileURL = url;
-	}
-
-	protected int namespaceCompareTo(BaseID o) {
-		return this.fileURL.toExternalForm().compareTo(((FileTransferID) o).toExternalForm());
-	}
-
-	protected boolean namespaceEquals(BaseID o) {
-		return this.fileURL.equals(((FileTransferID) o).fileURL);
-	}
-
-	protected String namespaceGetName() {
-		return this.fileURL.toExternalForm();
-	}
-
-	protected int namespaceHashCode() {
-		return this.fileURL.hashCode();
-	}
-
-	public String getFilename() {
-		return getFileNameOnly();
-	}
-
-	public URL getURL() {
-		return this.fileURL;
-	}
-
-	protected String getFileNameOnly() {
-		final String path = this.fileURL.getPath();
-		return path.substring(path.lastIndexOf("/") + 1); //$NON-NLS-1$;
-	}
-
-	public String toString() {
-		final StringBuffer b = new StringBuffer("FileTransferID["); //$NON-NLS-1$
-		b.append(toExternalForm());
-		b.append("]"); //$NON-NLS-1$
-		return b.toString();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java
deleted file mode 100644
index cc1cede..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.identity;
-
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.identity.IDCreateException;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-
-/**
- * URL file namespace class. This defines a namespace that understands how to
- * create IFileID instances from arbitary URLs
- */
-public class FileTransferNamespace extends Namespace {
-
-	private static final long serialVersionUID = 8204058147686930765L;
-
-	public static final String PROTOCOL = Messages.FileTransferNamespace_Namespace_Protocol;
-
-	private String getInitFromExternalForm(Object[] args) {
-		if (args == null || args.length < 1 || args[0] == null)
-			return null;
-		if (args[0] instanceof String) {
-			String arg = (String) args[0];
-			if (arg.startsWith(getScheme() + Namespace.SCHEME_SEPARATOR)) {
-				int index = arg.indexOf(Namespace.SCHEME_SEPARATOR);
-				if (index >= arg.length())
-					return null;
-				return arg.substring(index + 1);
-			}
-		}
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object[])
-	 */
-	public ID createInstance(Object[] args) throws IDCreateException {
-		try {
-			String init = getInitFromExternalForm(args);
-			if (init != null)
-				return new FileTransferID(this, new URL(init));
-			if (args[0] instanceof URL)
-				return new FileTransferID(this, (URL) args[0]);
-			if (args[0] instanceof String)
-				return new FileTransferID(this, new URL((String) args[0]));
-		} catch (Exception e) {
-			throw new IDCreateException(Messages.FileTransferNamespace_Exception_Create_Instance, e);
-		}
-		throw new IDCreateException(Messages.FileTransferNamespace_Exception_Create_Instance_Failed);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedSchemes()
-	 */
-	public String[] getSupportedSchemes() {
-		Set result = new HashSet();
-		String[] platformSchemes = Activator.getDefault().getPlatformSupportedSchemes();
-		for (int i = 0; i < platformSchemes.length; i++)
-			result.add(platformSchemes[i]);
-		return (String[]) result.toArray(new String[] {});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.Namespace#getScheme()
-	 */
-	public String getScheme() {
-		return PROTOCOL;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance()
-	 */
-	public Class[][] getSupportedParameterTypes() {
-		return new Class[][] { {URL.class}, {String.class}};
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java
deleted file mode 100644
index fca6b41..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- *               Cloudsmith, Inc. - additional API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.outgoing;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.Map;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.core.util.ProxyAddress;
-import org.eclipse.ecf.filetransfer.FileTransferInfo;
-import org.eclipse.ecf.filetransfer.FileTransferJob;
-import org.eclipse.ecf.filetransfer.IFileTransferInfo;
-import org.eclipse.ecf.filetransfer.IFileTransferListener;
-import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
-import org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener;
-import org.eclipse.ecf.filetransfer.IOutgoingFileTransfer;
-import org.eclipse.ecf.filetransfer.SendFileTransferException;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent;
-import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferSendDataEvent;
-import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferSendDoneEvent;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public abstract class AbstractOutgoingFileTransfer implements IOutgoingFileTransfer, ISendFileTransfer {
-
-	public static final int DEFAULT_BUF_LENGTH = 4096;
-
-	private static final int FILETRANSFER_ERRORCODE = 1001;
-
-	protected Job job;
-
-	protected URL remoteFileURL;
-
-	protected IFileID remoteFileID;
-
-	protected IFileTransferListener listener;
-
-	protected int buff_length = DEFAULT_BUF_LENGTH;
-
-	protected boolean done = false;
-
-	protected long bytesSent = 0;
-
-	protected InputStream localFileContents;
-
-	protected OutputStream remoteFileContents;
-
-	protected Exception exception;
-
-	protected IFileTransferInfo fileTransferInfo;
-
-	protected Map options = null;
-
-	protected IConnectContext connectContext;
-
-	protected Proxy proxy;
-
-	private final IFileTransferRunnable fileTransferRunnable = new IFileTransferRunnable() {
-		public IStatus performFileTransfer(IProgressMonitor monitor) {
-			final byte[] buf = new byte[buff_length];
-			final long totalWork = ((fileTransferInfo.getFileSize() == -1) ? 100 : fileTransferInfo.getFileSize());
-			double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
-			int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
-			monitor.beginTask(getRemoteFileURL().toString() + Messages.AbstractOutgoingFileTransfer_Progress_Data, work);
-			try {
-				while (!isDone()) {
-					if (monitor.isCanceled())
-						throw new UserCancelledException(Messages.AbstractOutgoingFileTransfer_Exception_User_Cancelled);
-					final int bytes = localFileContents.read(buf);
-					if (bytes != -1) {
-						bytesSent += bytes;
-						remoteFileContents.write(buf, 0, bytes);
-						fireTransferSendDataEvent();
-						monitor.worked((int) Math.round(factor * bytes));
-					} else {
-						done = true;
-					}
-				}
-			} catch (final Exception e) {
-				exception = e;
-				done = true;
-			} finally {
-				hardClose();
-				monitor.done();
-				try {
-					fireTransferSendDoneEvent();
-				} catch (Exception e) {
-					Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY, e));
-				}
-			}
-			return getFinalStatus(exception);
-		}
-	};
-
-	FileTransferJob fileTransferJob;
-
-	protected URL getRemoteFileURL() {
-		return remoteFileURL;
-	}
-
-	protected void setInputStream(InputStream ins) {
-		localFileContents = ins;
-	}
-
-	protected void setOutputStream(OutputStream outs) {
-		remoteFileContents = outs;
-	}
-
-	protected IFileTransferInfo getFileTransferInfo() {
-		return fileTransferInfo;
-	}
-
-	protected Map getOptions() {
-		return options;
-	}
-
-	public AbstractOutgoingFileTransfer() {
-		//
-	}
-
-	protected IStatus getFinalStatus(Throwable exception1) {
-		if (exception1 == null)
-			return new Status(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(), 0, Messages.AbstractOutgoingFileTransfer_Status_Transfer_Completed_OK, null);
-		else if (exception1 instanceof UserCancelledException)
-			return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, FILETRANSFER_ERRORCODE, Messages.AbstractOutgoingFileTransfer_Exception_User_Cancelled, exception1);
-		else
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, FILETRANSFER_ERRORCODE, Messages.AbstractOutgoingFileTransfer_Status_Transfer_Exception, exception1);
-	}
-
-	protected void hardClose() {
-		try {
-			if (remoteFileContents != null)
-				remoteFileContents.close();
-		} catch (final IOException e) {
-			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
-		}
-		try {
-			if (localFileContents != null)
-				localFileContents.close();
-		} catch (final IOException e) {
-			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
-		}
-		job = null;
-		remoteFileContents = null;
-		localFileContents = null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
-	 */
-	public ID getID() {
-		return remoteFileID;
-	}
-
-	protected void fireTransferSendDoneEvent() {
-		listener.handleTransferEvent(new IOutgoingFileTransferSendDoneEvent() {
-
-			private static final long serialVersionUID = -2686266564645210722L;
-
-			public IOutgoingFileTransfer getSource() {
-				return AbstractOutgoingFileTransfer.this;
-			}
-
-			public Exception getException() {
-				return AbstractOutgoingFileTransfer.this.getException();
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferSendDoneEvent["); //$NON-NLS-1$
-				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
-						.append(";fileLength=").append(fileTransferInfo.getFileSize()).append(";exception=").append(getException()) //$NON-NLS-1$ //$NON-NLS-2$
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-		});
-	}
-
-	protected void fireTransferSendDataEvent() {
-		listener.handleTransferEvent(new IOutgoingFileTransferSendDataEvent() {
-
-			private static final long serialVersionUID = -2916500675859842392L;
-
-			public IOutgoingFileTransfer getSource() {
-				return AbstractOutgoingFileTransfer.this;
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferSendDataEvent["); //$NON-NLS-1$
-				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
-						.append(";fileLength=").append(fileTransferInfo.getFileSize()) //$NON-NLS-1$ 
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-		});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.IOutgoingFileTransfer#getBytesSent()
-	 */
-	public long getBytesSent() {
-		return bytesSent;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#cancel()
-	 */
-	public void cancel() {
-		if (job != null)
-			job.cancel();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getException()
-	 */
-	public Exception getException() {
-		return exception;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getPercentComplete()
-	 */
-	public double getPercentComplete() {
-		long fileLength = getFileLength();
-		if (fileLength == -1 || fileLength == 0)
-			return fileLength;
-		return ((double) bytesSent / (double) fileLength);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getFileLength()
-	 */
-	public long getFileLength() {
-		return fileTransferInfo.getFileSize();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#isDone()
-	 */
-	public boolean isDone() {
-		return done;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		if (adapter.isInstance(this)) {
-			return this;
-		}
-		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
-		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, adapter.getName());
-	}
-
-	/**
-	 * Open incoming and outgoing streams associated with this file transfer.
-	 * Subclasses must implement this method to open input and output streams.
-	 * The <code>remoteFileContents</code> and <code>localFileContent</code>
-	 * must be non-<code>null</code> after successful completion of the
-	 * implementation of this method.
-	 * 
-	 * @throws SendFileTransferException
-	 */
-	protected abstract void openStreams() throws SendFileTransferException;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#getOutgoingNamespace()
-	 */
-	public Namespace getOutgoingNamespace() {
-		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
-	}
-
-	public IFileTransferListener getListener() {
-		return listener;
-	}
-
-	protected String createJobName() {
-		return getRemoteFileURL().toString();
-	}
-
-	protected void setupAndScheduleJob() {
-		if (fileTransferJob == null)
-			fileTransferJob = new FileTransferJob(createJobName());
-		fileTransferJob.setFileTransferRunnable(fileTransferRunnable);
-		fileTransferJob.setFileTransfer(this);
-		job = fileTransferJob;
-		job.schedule();
-	}
-
-	protected void fireSendStartEvent() {
-		listener.handleTransferEvent(new IOutgoingFileTransferResponseEvent() {
-
-			private static final long serialVersionUID = 2171381825030082432L;
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferResponseEvent["); //$NON-NLS-1$
-				sb.append("isdone=").append(done).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-
-			/* (non-Javadoc)
-			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent#requestAccepted()
-			 */
-			public boolean requestAccepted() {
-				return true;
-			}
-
-			/* (non-Javadoc)
-			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferEvent#getSource()
-			 */
-			public IOutgoingFileTransfer getSource() {
-				return AbstractOutgoingFileTransfer.this;
-			}
-
-			/* (non-Javadoc)
-			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent#setFileTransferJob(org.eclipse.ecf.filetransfer.FileTransferJob)
-			 */
-			public void setFileTransferJob(org.eclipse.ecf.filetransfer.FileTransferJob ftj) {
-				AbstractOutgoingFileTransfer.this.fileTransferJob = ftj;
-			}
-
-		});
-	}
-
-	protected abstract void setupProxy(Proxy proxy);
-
-	protected void setupProxies() {
-		// If it's been set directly (via ECF API) then this overrides platform settings
-		if (proxy == null) {
-			try {
-				IProxyService proxyService = Activator.getDefault().getProxyService();
-				// Only do this if platform service exists
-				if (proxyService != null && proxyService.isProxiesEnabled()) {
-					// Setup via proxyService entry
-					URI target = new URI(getRemoteFileURL().toExternalForm());
-					String type = IProxyData.SOCKS_PROXY_TYPE;
-					if (target.getScheme().equalsIgnoreCase(IProxyData.HTTP_PROXY_TYPE)) {
-						type = IProxyData.HTTP_PROXY_TYPE;
-					} else if (target.getScheme().equalsIgnoreCase(IProxyData.HTTPS_PROXY_TYPE)) {
-						type = IProxyData.HTTPS_PROXY_TYPE;
-					}
-					final IProxyData[] proxyDatas = proxyService.select(target);
-					final IProxyData proxyData = selectProxyFromProxies(target.getScheme(), proxyDatas);
-					if (proxyData != null) {
-						proxy = new Proxy(((type.equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(proxyData.getHost(), proxyData.getPort()), proxyData.getUserId(), proxyData.getPassword());
-					}
-				}
-			} catch (Exception e) {
-				// If we don't even have the classes for this (i.e. the org.eclipse.core.net plugin not available)
-				// then we simply log and ignore
-				Activator.logNoProxyWarning(e);
-			} catch (NoClassDefFoundError e) {
-				Activator.logNoProxyWarning(e);
-			}
-		}
-		if (proxy != null)
-			setupProxy(proxy);
-
-	}
-
-	/**
-	 * Select a single proxy from a set of proxies available for the given host.  This implementation
-	 * selects in the following manner:  1) If proxies provided is null or array of 0 length, null 
-	 * is returned.  If only one proxy is available (array of length 1) then the entry is returned.
-	 * If proxies provided is length > 1, then if the type of a proxy in the array matches the given
-	 * protocol (e.g. http, https), then the first matching proxy is returned.  If the protocol does
-	 * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned.  Subclasses may
-	 * override if desired.
-	 * 
-	 * @param protocol the target protocol (e.g. http, https, scp, etc).  Will not be <code>null</code>.
-	 * @param proxies the proxies to select from.  May be <code>null</code> or array of length 0.
-	 * @return proxy data selected from the proxies provided.  
-	 */
-	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
-		if (proxies == null || proxies.length == 0)
-			return null;
-		// If only one proxy is available, then use that
-		if (proxies.length == 1)
-			return proxies[0];
-		// If more than one proxy is available, then if http/https protocol then look for that
-		// one...if not found then use first
-		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
-					return proxies[i];
-			}
-		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
-					return proxies[i];
-			}
-		}
-		// If we haven't found it yet, then return the first one.
-		return proxies[0];
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, org.eclipse.ecf.filetransfer.IFileTransferInfo, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendOutgoingRequest(IFileID targetReceiver, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map ops) throws SendFileTransferException {
-		Assert.isNotNull(targetReceiver, Messages.AbstractOutgoingFileTransfer_RemoteFileID_Not_Null);
-		Assert.isNotNull(transferListener, Messages.AbstractOutgoingFileTransfer_TransferListener_Not_Null);
-		Assert.isNotNull(localFileToSend, Messages.AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL);
-		this.done = false;
-		this.bytesSent = 0;
-		this.exception = null;
-		this.fileTransferInfo = localFileToSend;
-		this.remoteFileID = targetReceiver;
-		this.options = ops;
-
-		try {
-			this.remoteFileURL = targetReceiver.getURL();
-		} catch (final MalformedURLException e) {
-			throw new SendFileTransferException(NLS.bind(Messages.AbstractOutgoingFileTransfer_MalformedURLException, targetReceiver), e);
-		}
-		this.listener = transferListener;
-		setupProxies();
-		openStreams();
-		fireSendStartEvent();
-		setupAndScheduleJob();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, java.io.File, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendOutgoingRequest(IFileID targetReceiver, final File localFileToSend, IFileTransferListener transferListener, Map ops) throws SendFileTransferException {
-		sendOutgoingRequest(targetReceiver, new FileTransferInfo(localFileToSend, null, null), transferListener, ops);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#addListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
-	 */
-	public void addListener(IIncomingFileTransferRequestListener l) {
-		// Not needed
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#removeListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
-	 */
-	public boolean removeListener(IIncomingFileTransferRequestListener l) {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		this.connectContext = connectContext;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
-	 */
-	public void setProxy(Proxy proxy) {
-		this.proxy = proxy;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java
deleted file mode 100644
index 466038c..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004, 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.outgoing;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.Map;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.filetransfer.IFileTransferInfo;
-import org.eclipse.ecf.filetransfer.IFileTransferListener;
-import org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener;
-import org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter;
-import org.eclipse.ecf.filetransfer.SendFileTransferException;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Multi protocol handler for outgoing file transfer. Multiplexes between Apache
- * httpclient 3.0.1-based file retriever and the URLConnection-based file
- * retriever.
- */
-public class MultiProtocolOutgoingAdapter implements ISendFileTransfer {
-
-	IConnectContext connectContext = null;
-	Proxy proxy = null;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#getOutgoingNamespace()
-	 */
-	public Namespace getOutgoingNamespace() {
-		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		this.connectContext = connectContext;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
-	 */
-	public void setProxy(Proxy proxy) {
-		this.proxy = proxy;
-	}
-
-	public void sendOutgoingRequest(IFileID targetID, File outgoingFile, IFileTransferListener transferListener, Map options) throws SendFileTransferException {
-		String protocol = null;
-		try {
-			protocol = targetID.getURL().getProtocol();
-		} catch (final MalformedURLException e) {
-			throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
-		}
-
-		ISendFileTransferContainerAdapter fileTransfer = null;
-		fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);
-
-		// If no handler setup for this protocol then throw
-		if (fileTransfer == null) {
-			if (protocol.equalsIgnoreCase("file")) { //$NON-NLS-1$
-				fileTransfer = new LocalFileOutgoingFileTransfer();
-			}
-		}
-
-		if (fileTransfer == null) {
-			throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
-		}
-
-		fileTransfer.setConnectContextForAuthentication(connectContext);
-		fileTransfer.setProxy(proxy);
-		fileTransfer.sendOutgoingRequest(targetID, outgoingFile, transferListener, options);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#addListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
-	 */
-	public void addListener(IIncomingFileTransferRequestListener listener) {
-		// We don't have any listeners
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#removeListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
-	 */
-	public boolean removeListener(IIncomingFileTransferRequestListener listener) {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, org.eclipse.ecf.filetransfer.IFileTransferInfo, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendOutgoingRequest(IFileID targetID, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map options) throws SendFileTransferException {
-		String protocol = null;
-		try {
-			protocol = targetID.getURL().getProtocol();
-		} catch (final MalformedURLException e) {
-			throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
-		}
-
-		ISendFileTransferContainerAdapter fileTransfer = null;
-		fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);
-
-		// If no handler setup for this protocol then throw
-		if (fileTransfer == null) {
-			throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
-		}
-
-		fileTransfer.setConnectContextForAuthentication(connectContext);
-		fileTransfer.setProxy(proxy);
-		fileTransfer.sendOutgoingRequest(targetID, localFileToSend, transferListener, options);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
-		if (adapterManager == null)
-			return null;
-		return adapterManager.loadAdapter(this, adapter.getName());
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
deleted file mode 100644
index c19179d..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
+++ /dev/null
@@ -1,923 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *    Benjamin Cabe <benjamin.cabe at anyware-tech.com> - bug 220258
- ******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.retrieve;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.text.DecimalFormat;
-import java.util.Date;
-import java.util.Map;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.core.util.ProxyAddress;
-import org.eclipse.ecf.filetransfer.FileTransferJob;
-import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
-import org.eclipse.ecf.filetransfer.IFileTransferListener;
-import org.eclipse.ecf.filetransfer.IFileTransferPausable;
-import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
-import org.eclipse.ecf.filetransfer.IIncomingFileTransfer;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDataEvent;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDoneEvent;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceivePausedEvent;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveResumedEvent;
-import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
-import org.eclipse.ecf.provider.filetransfer.util.PollingInputStream;
-import org.eclipse.ecf.provider.filetransfer.util.TimeoutInputStream;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTransfer, IRetrieveFileTransfer, IFileTransferPausable {
-
-	public static final int DEFAULT_BUF_LENGTH = 4096;
-
-	private static final int FILETRANSFER_ERRORCODE = 1001;
-
-	protected static final int POLLING_RETRY_ATTEMPTS = 20;
-
-	protected static final int TIMEOUT_INPUTSTREAM_BUFFER_SIZE = 8192;
-
-	protected static final int READ_TIMEOUT = 1000;
-
-	protected static final int CLOSE_TIMEOUT = 1000;
-
-	protected Object jobLock = new Object();
-	protected Job job;
-
-	protected URL remoteFileURL;
-
-	protected IFileID remoteFileID;
-
-	protected IFileTransferListener listener;
-
-	protected int buff_length = DEFAULT_BUF_LENGTH;
-
-	protected boolean done = false;
-
-	protected volatile long bytesReceived = 0;
-
-	protected InputStream remoteFileContents;
-
-	protected OutputStream localFileContents;
-
-	protected boolean closeOutputStream = true;
-
-	protected Exception exception;
-
-	protected long fileLength = -1;
-
-	protected long lastModifiedTime = 0L;
-
-	protected Map options = null;
-
-	protected boolean paused = false;
-
-	protected IFileRangeSpecification rangeSpecification = null;
-
-	protected Proxy proxy;
-
-	protected IConnectContext connectContext;
-
-	protected long transferStartTime;
-
-	protected double downloadRateBytesPerSecond = 0L;
-
-	public AbstractRetrieveFileTransfer() {
-		//
-	}
-
-	protected InputStream wrapTransferReadInputStream(InputStream inputStream, IProgressMonitor monitor) {
-		return new PollingInputStream(remoteFileContents, POLLING_RETRY_ATTEMPTS, monitor);
-	}
-
-	private IFileTransferRunnable fileTransferRunnable = new IFileTransferRunnable() {
-		public IStatus performFileTransfer(IProgressMonitor monitor) {
-			transferStartTime = System.currentTimeMillis();
-			final byte[] buf = new byte[buff_length];
-			final long totalWork = ((fileLength == -1) ? 100 : fileLength);
-			double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
-			int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
-			monitor.beginTask(getRemoteFileURL().toString() + Messages.AbstractRetrieveFileTransfer_Progress_Data, work);
-			InputStream readInputStream = wrapTransferReadInputStream(remoteFileContents, monitor);
-			try {
-				while (!isDone() && !isPaused()) {
-					try {
-						final int bytes = readInputStream.read(buf);
-						handleReceivedData(buf, bytes, factor, monitor);
-					} catch (OperationCanceledException e) {
-						throw new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
-					}
-				}
-			} catch (final Exception e) {
-				if (!isDone()) {
-					setDoneException(e);
-				}
-			} finally {
-				try {
-					if (readInputStream != null)
-						readInputStream.close();
-				} catch (final IOException e) {
-					Activator a = Activator.getDefault();
-					if (a != null)
-						a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
-				}
-				hardClose();
-				monitor.done();
-				try {
-					if (isPaused())
-						fireTransferReceivePausedEvent();
-					else
-						fireTransferReceiveDoneEvent();
-				} catch (Exception e) {
-					// simply log
-					Activator a = Activator.getDefault();
-					if (a != null)
-						a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY, e));
-				}
-			}
-			return getFinalStatus(exception);
-		}
-
-	};
-
-	protected URL getRemoteFileURL() {
-		return remoteFileURL;
-	}
-
-	protected void setInputStream(InputStream ins) {
-		remoteFileContents = new TimeoutInputStream(ins, TIMEOUT_INPUTSTREAM_BUFFER_SIZE, READ_TIMEOUT, CLOSE_TIMEOUT);
-	}
-
-	protected void setOutputStream(OutputStream outs) {
-		localFileContents = outs;
-	}
-
-	protected void setCloseOutputStream(boolean close) {
-		closeOutputStream = close;
-	}
-
-	protected void setFileLength(long length) {
-		fileLength = length;
-	}
-
-	protected void setLastModifiedTime(long timestamp) {
-		lastModifiedTime = timestamp;
-	}
-
-	protected Map getOptions() {
-		return options;
-	}
-
-	protected synchronized void handleReceivedData(byte[] buf, int bytes, double factor, IProgressMonitor monitor) throws IOException {
-		if (bytes != -1) {
-			bytesReceived += bytes;
-			localFileContents.write(buf, 0, bytes);
-			downloadRateBytesPerSecond = (bytesReceived / ((System.currentTimeMillis() + 1 - transferStartTime) / 1000.0));
-			monitor.setTaskName(createJobName() + Messages.AbstractRetrieveFileTransfer_Progress_Data + NLS.bind(Messages.AbstractRetrieveFileTransfer_InfoTransferRate, toHumanReadableBytes(downloadRateBytesPerSecond)));
-			monitor.worked((int) Math.round(factor * bytes));
-			fireTransferReceiveDataEvent();
-		} else
-			setDone(true);
-	}
-
-	public static String toHumanReadableBytes(double size) {
-		double convertedSize;
-		String unit;
-
-		if (size / (1024 * 1024 * 1024) >= 1) {
-			convertedSize = size / (1024 * 1024 * 1024);
-			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitGB;
-		} else if (size / (1024 * 1024) >= 1) {
-			convertedSize = size / (1024 * 1024);
-			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitMB;
-		} else if (size / 1024 >= 1) {
-			convertedSize = size / 1024;
-			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitKB;
-		} else {
-			convertedSize = size;
-			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitBytes;
-		}
-
-		DecimalFormat df = new DecimalFormat(NLS.bind(Messages.AbstractRetrieveFileTransfer_TransferRateFormat, unit));
-		return df.format(convertedSize);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
-	 */
-	public ID getID() {
-		return remoteFileID;
-	}
-
-	protected IStatus getFinalStatus(Throwable exception1) {
-		if (exception1 == null)
-			return new Status(IStatus.OK, Activator.PLUGIN_ID, 0, Messages.AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK, null);
-		else if (exception1 instanceof UserCancelledException)
-			return new Status(IStatus.CANCEL, Activator.PLUGIN_ID, FILETRANSFER_ERRORCODE, Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled, exception1);
-		else
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, FILETRANSFER_ERRORCODE, Messages.AbstractRetrieveFileTransfer_Status_Transfer_Exception, exception1);
-	}
-
-	protected void hardClose() {
-		try {
-			if (remoteFileContents != null)
-				remoteFileContents.close();
-		} catch (final IOException e) {
-			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
-		}
-		try {
-			if (localFileContents != null && closeOutputStream)
-				localFileContents.close();
-		} catch (final IOException e) {
-			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
-		}
-		// leave job intact to ensure only one done event is fired
-		remoteFileContents = null;
-		localFileContents = null;
-	}
-
-	protected void fireTransferReceivePausedEvent() {
-		listener.handleTransferEvent(new IIncomingFileTransferReceivePausedEvent() {
-
-			private static final long serialVersionUID = -1317411290525985140L;
-
-			public IIncomingFileTransfer getSource() {
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceivePausedEvent["); //$NON-NLS-1$
-				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
-						.append(";fileLength=").append(fileLength).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
-				return sb.toString();
-			}
-		});
-	}
-
-	protected void fireTransferReceiveDoneEvent() {
-		listener.handleTransferEvent(new IIncomingFileTransferReceiveDoneEvent() {
-
-			private static final long serialVersionUID = 6925524078226825710L;
-
-			public IIncomingFileTransfer getSource() {
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			public Exception getException() {
-				return AbstractRetrieveFileTransfer.this.getException();
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveDoneEvent["); //$NON-NLS-1$
-				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
-						.append(";fileLength=").append(fileLength).append(";exception=").append(getException()) //$NON-NLS-1$ //$NON-NLS-2$
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-		});
-	}
-
-	protected void fireTransferReceiveDataEvent() {
-		listener.handleTransferEvent(new IIncomingFileTransferReceiveDataEvent() {
-			private static final long serialVersionUID = -5656328374614130161L;
-
-			public IIncomingFileTransfer getSource() {
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveDataEvent["); //$NON-NLS-1$
-				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
-						.append(";fileLength=").append(fileLength) //$NON-NLS-1$ 
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-		});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
-	 * setConnectContextForAuthentication
-	 * (org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		this.connectContext = connectContext;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy
-	 * (org.eclipse.ecf.core.util.Proxy)
-	 */
-	public void setProxy(Proxy proxy) {
-		this.proxy = proxy;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getBytesReceived()
-	 */
-	public long getBytesReceived() {
-		return bytesReceived;
-	}
-
-	// TODO: replace other instances.
-	/**
-	 * @since 3.0
-	 */
-	protected UserCancelledException newUserCancelledException() {
-		return new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
-	}
-
-	protected synchronized void resetDoneAndException() {
-		setDone(false);
-		this.exception = null;
-	}
-
-	protected synchronized void setDone(boolean done) {
-		this.done = done;
-	}
-
-	protected synchronized void setDoneException(Exception e) {
-		this.done = true;
-		this.exception = e;
-	}
-
-	protected synchronized boolean isCanceled() {
-		return done && exception instanceof UserCancelledException;
-	}
-
-	protected void setDoneCanceled() {
-		setDoneCanceled(newUserCancelledException());
-	}
-
-	protected synchronized void setDoneCanceled(Exception e) {
-		this.done = true;
-		if (e instanceof UserCancelledException) {
-			exception = e;
-		} else {
-			exception = newUserCancelledException();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#cancel()
-	 */
-	public void cancel() {
-		if (isPaused()) {
-			setDoneCanceled();
-			fireTransferReceiveDoneEvent();
-			return;
-		}
-		synchronized (jobLock) {
-			if (job != null)
-				job.cancel();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getException()
-	 */
-	public synchronized Exception getException() {
-		return exception;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getPercentComplete()
-	 */
-	public double getPercentComplete() {
-		if (fileLength == -1 || fileLength == 0)
-			return fileLength;
-		return ((double) bytesReceived / (double) fileLength);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getFileLength()
-	 */
-	public long getFileLength() {
-		return fileLength;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #getRemoteLastModified()
-	 */
-	public Date getRemoteLastModified() {
-		return lastModifiedTime == 0L ? null : new Date(lastModifiedTime);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#isDone()
-	 */
-	public synchronized boolean isDone() {
-		return done;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		if (adapter.isInstance(this)) {
-			return this;
-		}
-		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
-		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, adapter.getName());
-	}
-
-	/**
-	 * Open incoming and outgoing streams associated with this file transfer.
-	 * Subclasses must implement this method to open input and output streams.
-	 * The <code>remoteFileContents</code> and <code>localFileContent</code>
-	 * must be non-<code>null</code> after successful completion of the
-	 * implementation of this method.
-	 * 
-	 * @throws IncomingFileTransferException
-	 */
-	protected abstract void openStreams() throws IncomingFileTransferException;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
-	 * sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
-	 * org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendRetrieveRequest(final IFileID remoteFileID1, IFileTransferListener transferListener, Map options1) throws IncomingFileTransferException {
-		sendRetrieveRequest(remoteFileID1, null, transferListener, options1);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
-	 * getRetrieveNamespace()
-	 */
-	public Namespace getRetrieveNamespace() {
-		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#isPaused()
-	 */
-	public boolean isPaused() {
-		return paused;
-	}
-
-	/**
-	 * Subclass overridable version of {@link #pause()}. Subclasses must provide
-	 * an implementation of this method to support {@link IFileTransferPausable}
-	 * .
-	 * 
-	 * @return true if the pause is successful. <code>false</code> otherwise.
-	 */
-	protected abstract boolean doPause();
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#pause()
-	 */
-	public boolean pause() {
-		return doPause();
-	}
-
-	/**
-	 * Subclass overridable version of {@link #resume()}. Subclasses must
-	 * provide an implementation of this method to support
-	 * {@link IFileTransferPausable}.
-	 * 
-	 * @return true if the resume is successful. <code>false</code> otherwise.
-	 */
-	protected abstract boolean doResume();
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#resume()
-	 */
-	public boolean resume() {
-		return doResume();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getListener()
-	 */
-	public IFileTransferListener getListener() {
-		return listener;
-	}
-
-	protected String createRangeName() {
-		if (rangeSpecification == null)
-			return ""; //$NON-NLS-1$
-		return "[" + rangeSpecification.getStartPosition() + "," + rangeSpecification.getEndPosition() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-
-	protected String createJobName() {
-		return getRemoteFileURL().toString() + createRangeName();
-	}
-
-	protected void setupAndScheduleJob(FileTransferJob fileTransferJob) {
-		if (fileTransferJob == null) {
-			// Create our own
-			fileTransferJob = new FileTransferJob(createJobName());
-		}
-		// Now set to our runnable
-		fileTransferJob.setFileTransferRunnable(fileTransferRunnable);
-		fileTransferJob.setFileTransfer(this);
-		if (isDone()) {
-			return;
-		}
-		synchronized (jobLock) {
-			job = fileTransferJob;
-			job.schedule();
-		}
-	}
-
-	protected void fireReceiveStartEvent() {
-		listener.handleTransferEvent(new IIncomingFileTransferReceiveStartEvent() {
-			private static final long serialVersionUID = -513800598918052184L;
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferEvent#getFileID()
-			 */
-			public IIncomingFileTransfer getSource() {
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferReceiveStartEvent#getFileID()
-			 */
-			public IFileID getFileID() {
-				return remoteFileID;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferReceiveStartEvent
-			 * #receive(java.io.File)
-			 */
-			public IIncomingFileTransfer receive(File localFileToSave) throws IOException {
-				return receive(localFileToSave, null);
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferReceiveStartEvent
-			 * #receive(java.io.File,
-			 * org.eclipse.ecf.filetransfer.FileTransferJob)
-			 */
-			public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob) throws IOException {
-				setOutputStream(new BufferedOutputStream(new FileOutputStream(localFileToSave)));
-				setupAndScheduleJob(fileTransferJob);
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			/**
-			 * @param streamToStore
-			 * @return incoming file transfer instance.
-			 * @throws IOException
-			 *             not thrown in this implementation.
-			 */
-			public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException {
-				return receive(streamToStore, null);
-			}
-
-			/**
-			 * @throws IOException
-			 *             not actually thrown by this implementation.
-			 */
-			public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException {
-				setOutputStream(streamToStore);
-				setCloseOutputStream(false);
-				setupAndScheduleJob(fileTransferJob);
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferReceiveStartEvent#cancel()
-			 */
-			public void cancel() {
-				AbstractRetrieveFileTransfer.this.cancel();
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see java.lang.Object#toString()
-			 */
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveStartEvent["); //$NON-NLS-1$
-				sb.append("isdone=").append(isDone()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-
-		});
-	}
-
-	protected void fireReceiveResumedEvent() {
-		listener.handleTransferEvent(new IIncomingFileTransferReceiveResumedEvent() {
-
-			private static final long serialVersionUID = 7111739642849612839L;
-
-			public IIncomingFileTransfer getSource() {
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			public IFileID getFileID() {
-				return remoteFileID;
-			}
-
-			public IIncomingFileTransfer receive(File localFileToSave, boolean append) throws IOException {
-				return receive(localFileToSave, null, append);
-			}
-
-			public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob, boolean append) throws IOException {
-				setOutputStream(new BufferedOutputStream(new FileOutputStream(localFileToSave.getName(), append)));
-				setupAndScheduleJob(fileTransferJob);
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			/**
-			 * @param streamToStore
-			 * @return incoming file transfer instance.
-			 * @throws IOException
-			 *             not thrown in this implementation.
-			 */
-			public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException {
-				return receive(streamToStore, null);
-			}
-
-			/**
-			 * @throws IOException
-			 *             not actually thrown by this implementation.
-			 */
-			public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException {
-				setOutputStream(streamToStore);
-				setCloseOutputStream(false);
-				setupAndScheduleJob(fileTransferJob);
-				return AbstractRetrieveFileTransfer.this;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.ecf.filetransfer.events.
-			 * IIncomingFileTransferReceiveStartEvent#cancel()
-			 */
-			public void cancel() {
-				hardClose();
-			}
-
-			public String toString() {
-				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveResumedEvent["); //$NON-NLS-1$
-				sb.append("isdone=").append(isDone()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
-						.append("]"); //$NON-NLS-1$
-				return sb.toString();
-			}
-
-		});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getFileRangeSpecification
-	 * ()
-	 */
-	public IFileRangeSpecification getFileRangeSpecification() {
-		return rangeSpecification;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
-	 * sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
-	 * org.eclipse.ecf.filetransfer.IFileRangeSpecification,
-	 * org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendRetrieveRequest(IFileID rFileID, IFileRangeSpecification rangeSpec, IFileTransferListener transferListener, Map ops) throws IncomingFileTransferException {
-		Assert.isNotNull(rFileID, Messages.AbstractRetrieveFileTransfer_RemoteFileID_Not_Null);
-		Assert.isNotNull(transferListener, Messages.AbstractRetrieveFileTransfer_TransferListener_Not_Null);
-		synchronized (jobLock) {
-			this.job = null;
-		}
-		this.remoteFileURL = null;
-		this.remoteFileID = rFileID;
-		this.listener = transferListener;
-		this.remoteFileContents = null;
-		this.localFileContents = null;
-		this.closeOutputStream = true;
-		resetDoneAndException();
-		this.bytesReceived = 0;
-		this.fileLength = -1;
-		this.options = ops;
-		this.paused = false;
-		this.rangeSpecification = rangeSpec;
-
-		try {
-			this.remoteFileURL = rFileID.getURL();
-		} catch (final MalformedURLException e) {
-			setDoneException(e);
-			fireTransferReceiveDoneEvent();
-			return;
-		}
-		try {
-			setupProxies();
-			openStreams();
-		} catch (final IncomingFileTransferException e) {
-			setDoneException(e);
-			fireTransferReceiveDoneEvent();
-		}
-	}
-
-	/**
-	 * Setup ECF proxy. Subclasses must override this method to do appropriate
-	 * proxy setup. This method will be called from within
-	 * {@link #sendRetrieveRequest(IFileID, IFileTransferListener, Map)} and
-	 * {@link #sendRetrieveRequest(IFileID, IFileRangeSpecification, IFileTransferListener, Map)}
-	 * , prior to the actual call to {@link #openStreams()}.
-	 * 
-	 * @param proxy
-	 *            the proxy to be setup. Will not be <code>null</code>.
-	 */
-	protected abstract void setupProxy(Proxy proxy);
-
-	/**
-	 * Select a single proxy from a set of proxies available for the given host.
-	 * This implementation selects in the following manner: 1) If proxies
-	 * provided is null or array of 0 length, null is returned. If only one
-	 * proxy is available (array of length 1) then the entry is returned. If
-	 * proxies provided is length > 1, then if the type of a proxy in the array
-	 * matches the given protocol (e.g. http, https), then the first matching
-	 * proxy is returned. If the protocol does not match any of the proxies,
-	 * then the *first* proxy (i.e. proxies[0]) is returned. Subclasses may
-	 * override if desired.
-	 * 
-	 * @param protocol
-	 *            the target protocol (e.g. http, https, scp, etc). Will not be
-	 *            <code>null</code>.
-	 * @param proxies
-	 *            the proxies to select from. May be <code>null</code> or array
-	 *            of length 0.
-	 * @return proxy data selected from the proxies provided.
-	 */
-	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
-		if (proxies == null || proxies.length == 0)
-			return null;
-		// If only one proxy is available, then use that
-		if (proxies.length == 1)
-			return proxies[0];
-		// If more than one proxy is available, then if http/https protocol then
-		// look for that
-		// one...if not found then use first
-		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
-					return proxies[i];
-			}
-		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
-			for (int i = 0; i < proxies.length; i++) {
-				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
-					return proxies[i];
-			}
-		}
-		// If we haven't found it yet, then return the first one.
-		return proxies[0];
-	}
-
-	protected void setupProxies() {
-		// If it's been set directly (via ECF API) then this overrides platform
-		// settings
-		if (proxy == null) {
-			try {
-				IProxyService proxyService = Activator.getDefault().getProxyService();
-				// Only do this if platform service exists
-				if (proxyService != null && proxyService.isProxiesEnabled()) {
-					// Setup via proxyService entry
-					URI target = new URI(getRemoteFileURL().toExternalForm());
-					final IProxyData[] proxies = proxyService.select(target);
-					IProxyData selectedProxy = selectProxyFromProxies(target.getScheme(), proxies);
-					if (selectedProxy != null) {
-						proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
-					}
-				}
-			} catch (Exception e) {
-				// If we don't even have the classes for this (i.e. the
-				// org.eclipse.core.net plugin not available)
-				// then we simply log and ignore
-				Activator.logNoProxyWarning(e);
-			} catch (NoClassDefFoundError e) {
-				Activator.logNoProxyWarning(e);
-			}
-		}
-		if (proxy != null)
-			setupProxy(proxy);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getRemoteFileName()
-	 */
-	public String getRemoteFileName() {
-		String pathStr = getRemoteFileURL().getPath();
-		if (pathStr.length() > 0) {
-			IPath path = Path.fromPortableString(pathStr);
-			if (path.segmentCount() > 0)
-				return path.lastSegment();
-		}
-		return null;
-	}
-
-	protected boolean targetHasGzSuffix(String target) {
-		if (target == null)
-			return false;
-		if (target.endsWith(".gz")) //$NON-NLS-1$
-			return true;
-		return false;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java
deleted file mode 100644
index b3f1cd3..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004, 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.retrieve;
-
-import java.net.MalformedURLException;
-import java.util.Map;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.ecf.core.identity.IDFactory;
-import org.eclipse.ecf.core.identity.Namespace;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
-import org.eclipse.ecf.filetransfer.IFileTransferListener;
-import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.ecf.filetransfer.identity.IFileID;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
-
-/**
- * Multi protocol handler for retrieve file transfer. Multiplexes between Apache
- * httpclient 3.0.1-based file retriever and the URLConnection-based file
- * retriever.
- */
-public class MultiProtocolRetrieveAdapter implements IRetrieveFileTransfer {
-
-	IConnectContext connectContext = null;
-	Proxy proxy = null;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()
-	 */
-	public Namespace getRetrieveNamespace() {
-		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		this.connectContext = connectContext;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
-	 */
-	public void setProxy(Proxy proxy) {
-		this.proxy = proxy;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
-	 *      org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendRetrieveRequest(IFileID remoteFileID, IFileTransferListener transferListener, Map options) throws IncomingFileTransferException {
-
-		String protocol = null;
-		try {
-			protocol = remoteFileID.getURL().getProtocol();
-		} catch (final MalformedURLException e) {
-			throw new IncomingFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
-		}
-
-		IRetrieveFileTransferContainerAdapter fileTransfer = null;
-		fileTransfer = Activator.getDefault().getFileTransfer(protocol);
-
-		// We will default to JRE-provided file transfer if nothing else
-		// available
-		// for given protocol
-		if (fileTransfer == null)
-			fileTransfer = new UrlConnectionRetrieveFileTransfer();
-
-		// Set connect context
-		fileTransfer.setConnectContextForAuthentication(connectContext);
-		// Set Proxy
-		fileTransfer.setProxy(proxy);
-
-		// send request using given file transfer protocol
-		fileTransfer.sendRetrieveRequest(remoteFileID, transferListener, options);
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
-	 *      org.eclipse.ecf.filetransfer.IFileRangeSpecification,
-	 *      org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
-	 */
-	public void sendRetrieveRequest(IFileID remoteFileID, IFileRangeSpecification rangeSpecification, IFileTransferListener transferListener, Map options) throws IncomingFileTransferException {
-		String protocol = null;
-		try {
-			protocol = remoteFileID.getURL().getProtocol();
-		} catch (final MalformedURLException e) {
-			throw new IncomingFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
-		}
-
-		IRetrieveFileTransferContainerAdapter fileTransfer = null;
-		fileTransfer = Activator.getDefault().getFileTransfer(protocol);
-
-		// We will default to JRE-provided file transfer if nothing else
-		// available
-		// for given protocol
-		if (fileTransfer == null)
-			fileTransfer = new UrlConnectionRetrieveFileTransfer();
-
-		// Set connect context
-		fileTransfer.setConnectContextForAuthentication(connectContext);
-		// Set Proxy
-		fileTransfer.setProxy(proxy);
-
-		// send request using given file transfer protocol
-		fileTransfer.sendRetrieveRequest(remoteFileID, rangeSpecification, transferListener, options);
-
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
-		if (adapterManager == null)
-			return null;
-		return adapterManager.loadAdapter(this, adapter.getName());
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
deleted file mode 100644
index c205bcc..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: Composent, Inc. - initial API and implementation
- * 				 Maarten Meijer - bug 237936, added gzip encoded transfer default
- ******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.retrieve;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.Authenticator;
-import java.net.ConnectException;
-import java.net.HttpURLConnection;
-import java.net.PasswordAuthentication;
-import java.net.URL;
-import java.net.URLConnection;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.ecf.core.security.Callback;
-import org.eclipse.ecf.core.security.CallbackHandler;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.core.security.NameCallback;
-import org.eclipse.ecf.core.security.ObjectCallback;
-import org.eclipse.ecf.core.security.UnsupportedCallbackException;
-import org.eclipse.ecf.core.util.Proxy;
-import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
-import org.eclipse.ecf.filetransfer.IFileTransferPausable;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.ecf.filetransfer.InvalidFileRangeSpecificationException;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-import org.eclipse.ecf.internal.provider.filetransfer.IURLConnectionModifier;
-import org.eclipse.ecf.internal.provider.filetransfer.Messages;
-import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
-import org.eclipse.osgi.util.NLS;
-
-public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTransfer {
-
-	private static final String USERNAME_PREFIX = Messages.UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
-
-	private static final int HTTP_RANGE_RESPONSE = 206;
-
-	private static final int OK_RESPONSE_CODE = 200;
-
-	private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
-
-	private static final String DEFAULT_CONNECT_TIMEOUT = "15000"; //$NON-NLS-1$
-
-	private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
-
-	private static final String DEFAULT_READ_TIMEOUT = "1000"; //$NON-NLS-1$
-
-	protected URLConnection urlConnection;
-
-	protected int httpVersion = 1;
-
-	protected int responseCode = -1;
-
-	private String remoteFileName;
-
-	protected String responseMessage = null;
-
-	private JREProxyHelper proxyHelper = null;
-
-	protected String username = null;
-
-	protected String password = null;
-
-	public UrlConnectionRetrieveFileTransfer() {
-		super();
-		proxyHelper = new JREProxyHelper();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #getRemoteFileName()
-	 */
-	public String getRemoteFileName() {
-		return remoteFileName;
-	}
-
-	protected void connect() throws IOException {
-		setupTimeouts();
-		urlConnection = getRemoteFileURL().openConnection();
-		// set cache to off if using jar protocol
-		// this is for addressing bug
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=235933
-		if (getRemoteFileURL().getProtocol().equalsIgnoreCase("jar")) { //$NON-NLS-1$
-			urlConnection.setUseCaches(false);
-		}
-		IURLConnectionModifier connectionModifier = Activator.getDefault().getURLConnectionModifier();
-		if (connectionModifier != null) {
-			connectionModifier.setSocketFactoryForConnection(urlConnection);
-		}
-	}
-
-	protected boolean isConnected() {
-		return (urlConnection != null);
-	}
-
-	protected void setResumeRequestHeaderValues() throws IOException {
-		if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)
-			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR);
-		setRangeHeader("bytes=" + this.bytesReceived + "-"); //$NON-NLS-1$ //$NON-NLS-2$
-		// set max-age for cache control to 0 for bug
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
-		urlConnection.setRequestProperty("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
-	}
-
-	protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
-		final IFileRangeSpecification rangeSpec = getFileRangeSpecification();
-		if (rangeSpec != null && isHTTP()) {
-			final long startPosition = rangeSpec.getStartPosition();
-			final long endPosition = rangeSpec.getEndPosition();
-			if (startPosition < 0)
-				throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO, rangeSpec);
-			if (endPosition != -1L && endPosition <= startPosition)
-				throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START, rangeSpec);
-			setRangeHeader("bytes=" + startPosition + "-" + ((endPosition == -1L) ? "" : ("" + endPosition))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		}
-		// Add http 1.1 'Connection: close' header in order to potentially avoid
-		// server issue described here
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=234916#c13
-		// See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247197
-		// also see http 1.1 rfc section 14-10 in
-		// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
-		urlConnection.setRequestProperty("Connection", "close"); //$NON-NLS-1$ //$NON-NLS-2$
-		// set max-age for cache control to 0 for bug
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
-		urlConnection.setRequestProperty("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
-	}
-
-	private void setRangeHeader(String value) {
-		urlConnection.setRequestProperty("Range", value); //$NON-NLS-1$
-	}
-
-	public int getResponseCode() {
-		if (responseCode != -1)
-			return responseCode;
-		if (isHTTP()) {
-			String response = urlConnection.getHeaderField(0);
-			if (response == null) {
-				responseCode = -1;
-				httpVersion = 1;
-				return responseCode;
-			}
-			if (!response.startsWith("HTTP/")) //$NON-NLS-1$
-				return -1;
-			response = response.trim();
-			final int mark = response.indexOf(" ") + 1; //$NON-NLS-1$
-			if (mark == 0)
-				return -1;
-			if (response.charAt(mark - 2) != '1')
-				httpVersion = 0;
-			int last = mark + 3;
-			if (last > response.length())
-				last = response.length();
-			responseCode = Integer.parseInt(response.substring(mark, last));
-			if (last + 1 <= response.length())
-				responseMessage = response.substring(last + 1);
-		} else {
-			responseCode = OK_RESPONSE_CODE;
-			responseMessage = "OK"; //$NON-NLS-1$
-		}
-
-		return responseCode;
-
-	}
-
-	private boolean isHTTP() {
-		final String protocol = getRemoteFileURL().getProtocol();
-		if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) //$NON-NLS-1$ //$NON-NLS-2$
-			return true;
-		return false;
-	}
-
-	private boolean isHTTP11() {
-		return (isHTTP() && httpVersion >= 1);
-	}
-
-	protected void getResponseHeaderValues() throws IOException {
-		if (!isConnected())
-			throw new ConnectException(Messages.UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED);
-		if (getResponseCode() == -1)
-			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE);
-		setLastModifiedTime(urlConnection.getLastModified());
-		setFileLength(urlConnection.getContentLength());
-
-		String contentDispositionValue = urlConnection.getHeaderField(HttpHelper.CONTENT_DISPOSITION_HEADER);
-		if (contentDispositionValue != null) {
-			remoteFileName = HttpHelper.getRemoteFileNameFromContentDispositionHeader(contentDispositionValue);
-		}
-
-		if (remoteFileName == null) {
-			String pathStr = urlConnection.getURL().getPath();
-			if (pathStr != null) {
-				IPath path = Path.fromPortableString(pathStr);
-				if (path.segmentCount() > 0)
-					remoteFileName = path.lastSegment();
-			}
-			if (remoteFileName == null)
-				remoteFileName = super.getRemoteFileName();
-		}
-	}
-
-	protected void getResumeResponseHeaderValues() throws IOException {
-		if (!isConnected())
-			throw new ConnectException(Messages.UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED);
-		if (getResponseCode() != HTTP_RANGE_RESPONSE)
-			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST);
-		if (lastModifiedTime != urlConnection.getLastModified())
-			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS);
-	}
-
-	/**
-	 * @param proxy2
-	 *            the ECF proxy to setup
-	 */
-	protected void setupProxy(final Proxy proxy2) {
-		proxyHelper.setupProxy(proxy2);
-	}
-
-	protected void setupAuthentication() throws IOException, UnsupportedCallbackException {
-		if (connectContext == null)
-			return;
-		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
-		if (callbackHandler == null)
-			return;
-		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
-		final ObjectCallback passwordCallback = new ObjectCallback();
-		// Call callback with username and password callbacks
-		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
-		username = usernameCallback.getName();
-		Object o = passwordCallback.getObject();
-		if (!(o instanceof String))
-			throw new UnsupportedCallbackException(passwordCallback, Messages.UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException);
-		password = (String) passwordCallback.getObject();
-		// Now set authenticator to our authenticator with user and password
-		Authenticator.setDefault(new UrlConnectionAuthenticator());
-	}
-
-	class UrlConnectionAuthenticator extends Authenticator {
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see java.net.Authenticator#getPasswordAuthentication()
-		 */
-		protected PasswordAuthentication getPasswordAuthentication() {
-			return new PasswordAuthentication(username, password.toCharArray());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
-	 * setConnectContextForAuthentication
-	 * (org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void setConnectContextForAuthentication(IConnectContext connectContext) {
-		super.setConnectContextForAuthentication(connectContext);
-		this.username = null;
-		this.password = null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #openStreams()
-	 */
-	protected void openStreams() throws IncomingFileTransferException {
-		int code = -1;
-		try {
-			setupAuthentication();
-			connect();
-			setRequestHeaderValues();
-			// Make actual GET request
-			// need to get response header about encoding before setting stream
-			setCompressionRequestHeader();
-			setInputStream(getDecompressedStream());
-			code = getResponseCode();
-			if (isHTTP()) {
-				if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
-					fireReceiveStartEvent();
-				} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-					throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-					throw new IncomingFileTransferException("Unauthorized", code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-					throw new IncomingFileTransferException("Forbidden", code); //$NON-NLS-1$
-				} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-					throw new IncomingFileTransferException("Proxy authentication required", code); //$NON-NLS-1$
-				} else {
-					throw new IncomingFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code); //$NON-NLS-1$
-				}
-			} else {
-				fireReceiveStartEvent();
-			}
-		} catch (final FileNotFoundException e) {
-			throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), 404); //$NON-NLS-1$
-		} catch (final Exception e) {
-			IncomingFileTransferException except = (e instanceof IncomingFileTransferException) ? (IncomingFileTransferException) e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, getRemoteFileURL().toString()), e, code);
-			hardClose();
-			throw except;
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #hardClose()
-	 */
-	protected void hardClose() {
-		super.hardClose();
-		urlConnection = null;
-		responseCode = -1;
-		if (proxyHelper != null) {
-			proxyHelper.dispose();
-			proxyHelper = null;
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #doPause()
-	 */
-	protected boolean doPause() {
-		if (isPaused() || !isConnected() || isDone())
-			return false;
-		this.paused = true;
-		return this.paused;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #doResume()
-	 */
-	protected boolean doResume() {
-		if (!isPaused() || isConnected())
-			return false;
-		return openStreamsForResume();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
-	 * #getAdapter(java.lang.Class)
-	 */
-	public Object getAdapter(Class adapter) {
-		if (adapter == null)
-			return null;
-		if (adapter.equals(IFileTransferPausable.class) && isHTTP11())
-			return this;
-		return super.getAdapter(adapter);
-	}
-
-	private void setupTimeouts() {
-		String existingTimeout = System.getProperty(JRE_CONNECT_TIMEOUT_PROPERTY);
-		if (existingTimeout == null) {
-			System.setProperty(JRE_CONNECT_TIMEOUT_PROPERTY, DEFAULT_CONNECT_TIMEOUT);
-		}
-		existingTimeout = System.getProperty(JRE_READ_TIMEOUT_PROPERTY);
-		if (existingTimeout == null) {
-			System.setProperty(JRE_READ_TIMEOUT_PROPERTY, DEFAULT_READ_TIMEOUT);
-		}
-	}
-
-	/**
-	 * @return <code>true</code> if streams successfully, <code>false</code>
-	 *         otherwise.
-	 */
-	private boolean openStreamsForResume() {
-		final URL theURL = getRemoteFileURL();
-		int code = -1;
-		try {
-			remoteFileURL = new URL(theURL.toString());
-			setupAuthentication();
-			connect();
-			setResumeRequestHeaderValues();
-			// Make actual GET request
-			setInputStream(urlConnection.getInputStream());
-			code = getResponseCode();
-			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
-				getResumeResponseHeaderValues();
-				this.paused = false;
-				fireReceiveResumedEvent();
-				return true;
-			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
-				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
-				throw new IncomingFileTransferException("Unauthorized", code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
-				throw new IncomingFileTransferException("Forbidden", code); //$NON-NLS-1$
-			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
-				throw new IncomingFileTransferException("Proxy authentication required", code); //$NON-NLS-1$
-			} else {
-				throw new IncomingFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code); //$NON-NLS-1$
-			}
-		} catch (final Exception e) {
-			this.exception = (e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, getRemoteFileURL().toString()), e, code);
-			this.done = true;
-			hardClose();
-			fireTransferReceiveDoneEvent();
-			return false;
-		}
-	}
-
-	private static final String ACCEPT_ENCODING = "Accept-encoding"; //$NON-NLS-1$
-	private static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
-
-	private static final String CONTENT_ENCODING_ACCEPTED = CONTENT_ENCODING_GZIP; // +
-
-	private static class Compression {
-
-		private String type;
-
-		private Compression(String i) {
-			this.type = i;
-		}
-
-		static Compression NONE = new Compression("none"); //$NON-NLS-1$
-
-		static Compression GZIP = new Compression("gzip"); //$NON-NLS-1$
-
-		public String toString() {
-			return type;
-		}
-	}
-
-	private void setCompressionRequestHeader() {
-		// Set request header for possible gzip encoding, but only if
-		// 1) The file range specification is null (we want the whole file)
-		// 2) The target remote file does *not* end in .gz (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280205)
-		if (getFileRangeSpecification() == null && !targetHasGzSuffix(super.getRemoteFileName()))
-			urlConnection.setRequestProperty(ACCEPT_ENCODING, CONTENT_ENCODING_ACCEPTED);
-	}
-
-	private Compression getCompressionResponseHeader() {
-		String encoding = urlConnection.getContentEncoding();
-		if (null == encoding) {
-			return Compression.NONE;
-			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=269018
-		} else if (encoding.equalsIgnoreCase(CONTENT_ENCODING_GZIP) && !targetHasGzSuffix(remoteFileName)) {
-			return Compression.GZIP;
-		}
-		return Compression.NONE;
-	}
-
-	private InputStream getDecompressedStream() throws IOException {
-		InputStream input = urlConnection.getInputStream();
-		getResponseHeaderValues();
-		Compression type = getCompressionResponseHeader();
-
-		if (Compression.GZIP == type) {
-			return new java.util.zip.GZIPInputStream(input);
-			// } else if (Compression.DEFLATE == type) {
-			// return new java.util.zip.InflaterInputStream(input);
-		}
-		return input;
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java
deleted file mode 100644
index 611a32e..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.provider.filetransfer.util;
-
-import java.net.Authenticator;
-import java.net.PasswordAuthentication;
-import java.util.Properties;
-import org.eclipse.ecf.core.util.Proxy;
-
-/**
- * Helper class for setting the JRE proxy value (http and socks).
- */
-public class JREProxyHelper {
-
-	private static final String SOCKS_PROXY_PORT_SYSTEM_PROPERTY = "socksProxyPort"; //$NON-NLS-1$
-
-	private static final String SOCKS_PROXY_HOST_SYSTEM_PROPERTY = "socksProxyHost"; //$NON-NLS-1$
-
-	private static final String HTTP_PROXY_PORT_SYSTEM_PROPERTY = "http.proxyPort"; //$NON-NLS-1$
-
-	private static final String HTTP_PROXY_HOST_SYSTEM_PROPERTY = "http.proxyHost"; //$NON-NLS-1$
-
-	private String proxyHostProperty;
-	private String proxyPortProperty;
-
-	private String oldHost;
-	private String oldPort;
-
-	public void setupProxy(final Proxy proxy2) {
-		Properties systemProperties = System.getProperties();
-		proxyHostProperty = (proxy2.getType().equals(Proxy.Type.HTTP)) ? HTTP_PROXY_HOST_SYSTEM_PROPERTY : SOCKS_PROXY_HOST_SYSTEM_PROPERTY;
-		proxyPortProperty = (proxy2.getType().equals(Proxy.Type.HTTP)) ? HTTP_PROXY_PORT_SYSTEM_PROPERTY : SOCKS_PROXY_PORT_SYSTEM_PROPERTY;
-		oldHost = systemProperties.getProperty(proxyHostProperty);
-		if (oldHost != null) {
-			oldPort = systemProperties.getProperty(proxyPortProperty);
-		}
-		systemProperties.setProperty(proxyHostProperty, proxy2.getAddress().getHostName());
-		int proxyPort = proxy2.getAddress().getPort();
-		if (proxyPort != -1)
-			systemProperties.setProperty(proxyPortProperty, proxyPort + ""); //$NON-NLS-1$
-		final String username = proxy2.getUsername();
-		if (username != null && !username.equals("")) { //$NON-NLS-1$
-			final String password = (proxy2.getPassword() == null) ? "" : proxy2.getPassword(); //$NON-NLS-1$
-			if (proxy2.hasCredentials()) {
-				Authenticator.setDefault(new Authenticator() {
-					/* (non-Javadoc)
-					 * @see java.net.Authenticator#getPasswordAuthentication()
-					 */
-					protected PasswordAuthentication getPasswordAuthentication() {
-						return new PasswordAuthentication(username, password.toCharArray());
-					}
-				});
-			}
-		}
-	}
-
-	public void dispose() {
-		// reset old values
-		if (oldHost != null) {
-			System.getProperties().setProperty(proxyHostProperty, oldHost);
-			oldHost = null;
-			if (oldPort != null) {
-				System.getProperties().setProperty(proxyPortProperty, oldPort);
-				oldPort = null;
-			}
-		}
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java b/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java
deleted file mode 100644
index a21ff68..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - modification after copying to ECF filetransfer provider
- *******************************************************************************/
-package org.eclipse.ecf.provider.filetransfer.util;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.ecf.internal.provider.filetransfer.Activator;
-
-/**
- * Polls a progress monitor periodically and handles timeouts over extended
- * durations. For this class to be effective, a high numAttempts should be
- * specified, and the underlying stream should time out frequently on reads
- * (every second or so).
- * 
- * Supports resuming partially completed operations after an
- * InterruptedIOException if the underlying stream does. Check the
- * bytesTransferred field to determine how much of the operation completed;
- * conversely, at what point to resume.
- * 
- * @since 3.0
- */
-public class PollingInputStream extends FilterInputStream {
-	private int numAttempts;
-	private IProgressMonitor monitor;
-	private boolean cancellable;
-
-	/**
-	 * Creates a new polling input stream.
-	 * 
-	 * @param in
-	 *            the underlying input stream
-	 * @param numAttempts
-	 *            the number of attempts before issuing an
-	 *            InterruptedIOException, if 0, retries indefinitely until
-	 *            canceled
-	 * @param monitor
-	 *            the progress monitor to be polled for cancellation
-	 */
-	public PollingInputStream(InputStream in, int numAttempts, IProgressMonitor monitor) {
-		super(in);
-		this.numAttempts = numAttempts;
-		this.monitor = monitor;
-		this.cancellable = true;
-	}
-
-	/**
-	 * Wraps the underlying stream's method. It may be important to wait for an
-	 * input stream to be closed because it holds an implicit lock on a system
-	 * resource (such as a file) while it is open. Closing a stream may take
-	 * time if the underlying stream is still servicing a previous request.
-	 * 
-	 * @throws OperationCanceledException
-	 *             if the progress monitor is canceled
-	 * @throws InterruptedIOException
-	 *             if the underlying operation times out numAttempts times
-	 */
-	public void close() throws InterruptedIOException {
-		int attempts = 0;
-		try {
-			readPendingInput();
-		} catch (IOException e) {
-			// We shouldn't get an exception when we're getting the available
-			// input.
-			// If we do, just log it so we can close.
-			logError(e.getMessage(), e);
-		} finally {
-			boolean stop = false;
-			while (!stop) {
-				try {
-					if (in != null)
-						in.close();
-					stop = true;
-				} catch (InterruptedIOException e) {
-					if (checkCancellation())
-						throw new OperationCanceledException();
-					if (++attempts == numAttempts)
-						throw new InterruptedIOException("Timeout while closing input stream"); //$NON-NLS-1$
-				} catch (IOException e) {
-					// ignore it - see
-					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=203423#c10
-				}
-			}
-		}
-	}
-
-	private void logError(String message, IOException e) {
-		Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, message, e));
-	}
-
-	/**
-	 * Wraps the underlying stream's method.
-	 * 
-	 * @return the next byte of data, or -1 if the end of the stream is reached.
-	 * @throws OperationCanceledException
-	 *             if the progress monitor is canceled
-	 * @throws InterruptedIOException
-	 *             if the underlying operation times out numAttempts times and
-	 *             no data was received, bytesTransferred will be zero
-	 * @throws IOException
-	 *             if an i/o error occurs
-	 */
-	public int read() throws IOException {
-		int attempts = 0;
-		for (;;) {
-			if (checkCancellation())
-				throw new OperationCanceledException();
-			try {
-				return in.read();
-			} catch (InterruptedIOException e) {
-				if (++attempts == numAttempts)
-					throw new InterruptedIOException("Timeout while reading input stream"); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/**
-	 * Wraps the underlying stream's method.
-	 * 
-	 * @param buffer
-	 *            - the buffer into which the data is read.
-	 * @param off
-	 *            - the start offset of the data.
-	 * @param len
-	 *            - the maximum number of bytes read.
-	 * @return the total number of bytes read into the buffer, or -1 if there is
-	 *         no more data because the end of the stream has been reached.
-	 * @throws OperationCanceledException
-	 *             if the progress monitor is canceled
-	 * @throws InterruptedIOException
-	 *             if the underlying operation times out numAttempts times and
-	 *             no data was received, bytesTransferred will be zero
-	 * @throws IOException
-	 *             if an i/o error occurs
-	 */
-	public int read(byte[] buffer, int off, int len) throws IOException {
-		int attempts = 0;
-		for (;;) {
-			if (checkCancellation())
-				throw new OperationCanceledException();
-			try {
-				return in.read(buffer, off, len);
-			} catch (InterruptedIOException e) {
-				if (e.bytesTransferred != 0)
-					return e.bytesTransferred; // keep partial transfer
-				if (++attempts == numAttempts)
-					throw new InterruptedIOException("Timeout while reading input stream"); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/**
-	 * Wraps the underlying stream's method.
-	 * 
-	 * @param count
-	 *            - the number of bytes to be skipped.
-	 * @return the actual number of bytes skipped.
-	 * @throws OperationCanceledException
-	 *             if the progress monitor is canceled
-	 * @throws InterruptedIOException
-	 *             if the underlying operation times out numAttempts times and
-	 *             no data was received, bytesTransferred will be zero
-	 * @throws IOException
-	 *             if an i/o error occurs
-	 */
-	public long skip(long count) throws IOException {
-		int attempts = 0;
-		for (;;) {
-			if (checkCancellation())
-				throw new OperationCanceledException();
-			try {
-				return in.skip(count);
-			} catch (InterruptedIOException e) {
-				if (e.bytesTransferred != 0)
-					return e.bytesTransferred; // keep partial transfer
-				if (++attempts == numAttempts)
-					throw new InterruptedIOException("Timeout while reading input stream"); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/**
-	 * Reads any pending input from the input stream so that the stream can
-	 * savely be closed.
-	 */
-	protected void readPendingInput() throws IOException {
-		byte[] buffer = new byte[2048];
-		while (true) {
-			int available = in.available();
-			if (available < 1)
-				break;
-			if (available > buffer.length)
-				available = buffer.length;
-			if (in.read(buffer, 0, available) < 1)
-				break;
-		}
-	}
-
-	/**
-	 * Called to set whether cancellation will be checked by this stream.
-	 * Turning cancellation checking off can be very useful for protecting
-	 * critical portions of a protocol that shouldn't be interrupted. For
-	 * example, it is often necessary to protect login sequences.
-	 * 
-	 * @param cancellable
-	 *            a flag controlling whether this stream will check for
-	 *            cancellation.
-	 */
-	public void setIsCancellable(boolean cancellable) {
-		this.cancellable = cancellable;
-	}
-
-	/**
-	 * Checked whether the monitor for this stream has been cancelled. If the
-	 * cancellable flag is <code>false</code> then the monitor is never
-	 * cancelled.
-	 * 
-	 * @return <code>true</code> if the monitor has been cancelled and
-	 *         <code>false</code> otherwise.
-	 */
-	private boolean checkCancellation() {
-		if (cancellable) {
-			return monitor.isCanceled();
-		}
-		return false;
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.prefs b/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 6686ccd..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Apr 19 20:30:05 GMT-08:00 2007
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF
deleted file mode 100644
index 8a14b1d..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf.ssl
-Bundle-Version: 1.0.0.qualifier
-Fragment-Host: org.eclipse.ecf
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Import-Package: org.eclipse.osgi.service.security,
- javax.net.ssl
-Bundle-Localization: plugin
-Export-Package: org.eclipse.ecf.internal.ssl;x-internal:=true
-Bundle-Vendor: %plugin.provider
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/build.properties b/eclipse/ecf-src/org.eclipse.ecf.ssl/build.properties
deleted file mode 100644
index fca2093..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf.ssl/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties
-src.includes = plugin.properties,\
-               about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.pde.prefs b/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 6686ccd..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Apr 19 20:30:05 GMT-08:00 2007
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/eclipse/ecf-src/org.eclipse.ecf/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.ecf/META-INF/MANIFEST.MF
deleted file mode 100644
index 130352e..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,31 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Name: %plugin.name
-Bundle-SymbolicName: org.eclipse.ecf;singleton:=true
-Bundle-Version: 3.0.0.qualifier
-Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin
-Bundle-Vendor: %plugin.provider
-Bundle-Localization: plugin
-Eclipse-LazyStart: true
-Bundle-ManifestVersion: 2
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.3
-Export-Package: org.eclipse.ecf.core;version="3.0.0",
- org.eclipse.ecf.core.events,
- org.eclipse.ecf.core.jobs;version="1.0";x-internal:=true,
- org.eclipse.ecf.core.provider,
- org.eclipse.ecf.core.security,
- org.eclipse.ecf.core.start,
- org.eclipse.ecf.core.status;version="1.0";x-internal:=true,
- org.eclipse.ecf.core.user,
- org.eclipse.ecf.core.util,
- org.eclipse.ecf.internal.core;x-internal:=true
-Import-Package: org.eclipse.core.runtime.jobs,
- org.eclipse.equinox.concurrent.future;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.util.tracker;version="1.3.2"
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.registry,
- org.eclipse.ecf.identity;visibility:=reexport
-Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf/build.properties b/eclipse/ecf-src/org.eclipse.ecf/build.properties
deleted file mode 100644
index 3737b77..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2006. Composent, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     Composent Inc. - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               about.html,\
-               plugin.properties,\
-               schema/,\
-               about.properties,\
-               ecf32.png,\
-               about.ini
-src.includes = about.html,\
-               schema/,\
-               about.properties,\
-               plugin.properties,\
-               about.ini
diff --git a/eclipse/ecf-src/org.eclipse.ecf/javadoc.xml b/eclipse/ecf-src/org.eclipse.ecf/javadoc.xml
deleted file mode 100644
index 29a700f..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/javadoc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project default="javadoc">
-    <target name="javadoc">
-        <javadoc access="protected" additionalparam="-J-Xmx256m  -tag model:a:Model -tag generated:a:Generated -tag noreference:tcmf:DoNotReference -tag ordered:a:Ordered " author="false" classpath="../org.eclipse.ecf.remoteservice/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.concurrent_1.0.0.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.security_1.0.100.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.filebuffers_3.5.0.v20090526-2000.jar;../org.eclipse.ecf.presence.ui/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.views_3.4.0.I20090525-2000.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.objectweb.asm_3.1.0.v200803061910.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800\runtime_registry_compatibility.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.registry_3.4.100.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.osgi_3.5.0.v20090520.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.forms_3.4.0.v20090526.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.apache.commons.logging_1.0.4.v200904062259.jar;../org.eclipse.emf.ecore.change/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.ide_3.5.0.I20090525-2000.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.editors_3.5.0.v20090527-2000.jar;../org.eclipse.ecf.provider.remoteservice/bin;../org.eclipse.ecf.presence/bin;../org.eclipse.ecf.provider.xmpp/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.app_1.2.0.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.osgi.services_3.2.0.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.jobs_3.4.100.v20090429-1800.jar;bin;../org.apache.commons.httpclient;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui_3.5.0.I20090604-2000.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.jface.text_3.5.0.v20090602.jar;../org.eclipse.ecf.provider.datashare/bin;../org.eclipse.ecf.discovery.ui.edit/bin;../org.eclipse.ecf.sync/bin;../org.jivesoftware.smack/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.console_3.4.0.v20090513.jar;../org.apache.commons.codec;../org.eclipse.ecf.provider.filetransfer/bin;../org.eclipse.ecf.identity/bin;../org.eclipse.emf.ecore/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.ui.workbench.texteditor_3.5.0.v20090603.jar;../org.eclipse.ecf.ui/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.filesystem_1.2.0.v20090507.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.preferences_3.2.300.v20090520-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.contenttype_3.4.0.v20090429-1800.jar;../org.jivesoftware.smack/jars/xpp.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.expressions_3.4.100.v20090429-1800.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.jface_3.5.0.I20090525-2000.jar;../org.eclipse.emf.edit/bin;../org.eclipse.ecf.telephony.call/bin;../org.eclipse.ecf.sharedobject/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.swt_3.5.0.v3550a.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.resources_3.5.0.v20090512.jar;../org.eclipse.ecf.osgi.services/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.commands_3.5.0.I20090525-2000.jar;../org.eclipse.emf.edit.ui/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.runtime_3.5.0.v20090525.jar;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.core.net_1.2.0.I20090522-1010.jar;../org.eclipse.ecf.filetransfer/bin;../org.eclipse.ecf.provider/bin;../ch.ethz.iks.slp/bin;../org.eclipse.ecf.discovery/bin;../org.eclipse.ecf.datashare/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.text_3.5.0.v20090513-2000.jar;../ch.ethz.iks.r_osgi.remote/bin;../org.eclipse.emf.common.ui/bin;../org.eclipse.ecf.discovery.ui.model/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.equinox.common_3.5.0.v20090520-1800.jar;../org.eclipse.emf.common/bin;../org.eclipse.ecf.discovery.ui/bin;../org.eclipse.ecf.osgi.services.discovery/bin;C:\eclipse3.5.rc4\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.5.0.v3550a.jar" destdir="../ecf documentation/org.eclipse.ecf.docs/api" doctitle="Eclipse Communication Framework (ECF) 3.0.0" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="org.eclipse.ecf.ui.hyperlink,org.eclipse.ecf.core.sharedobject.util,org.eclipse.ecf.filetransfer.ui,org.eclipse.ecf.core.sharedobject.provider,org.eclipse.ecf.example.clients,org.eclipse.ecf.presence.im,org.eclipse.ecf.ui.actions,org.eclipse.ecf.telephony.call.ui.actions,org.eclipse.ecf.core.provider,org.eclipse.ecf.discovery.service,org.eclipse.ecf.presence.bot,org.eclipse.ecf.remoteservice,org.eclipse.ecf.provider.remoteservice,org.eclipse.ecf.core.sharedobject.events,org.eclipse.ecf.provider.jslp.identity,org.eclipse.ecf.telephony.call.events,org.eclipse.ecf.presence.collab.ui,org.eclipse.ecf.core.identity,org.eclipse.ecf.provider.remoteservice.generic,org.eclipse.ecf.docshare,org.eclipse.ecf.presence.collab.ui.url,org.eclipse.ecf.internal.docshare,org.eclipse.ecf.presence.roster,org.eclipse.ecf.core.events,org.eclipse.ecf.discovery.ui.model,org.eclipse.ecf.provider.discovery,org.eclipse.ecf.provider.filetransfer.events.socket,org.eclipse.ecf.provider.generic.gmm,org.eclipse.ecf.presence.collab.ui.screencapture,org.eclipse.ecf.provider.filetransfer.outgoing,org.eclipse.ecf.filetransfer.events,org.eclipse.ecf.datashare.service,org.eclipse.ecf.filetransfer.ui.actions,org.eclipse.ecf.core.sharedobject,org.eclipse.ecf.filetransfer.events.socket,org.eclipse.ecf.sync.doc,org.eclipse.ecf.ui.util,org.eclipse.ecf.core.sharedobject.security,org.eclipse.ecf.provider.filetransfer.retrieve,org.eclipse.ecf.core.user,org.eclipse.ecf.presence.chatroom,org.eclipse.ecf.provider.filetransfer.identity,org.eclipse.ecf.remoteservices.ui,org.eclipse.ecf.provider.generic,org.eclipse.ecf.presence.ui.dnd,org.eclipse.ecf.presence.bot.application,org.eclipse.ecf.ui.screencapture,org.eclipse.ecf.provider.comm,org.eclipse.ecf.presence.search.message,org.eclipse.ecf.provider.jslp.container,org.eclipse.ecf.provider.ui.wizards,org.eclipse.ecf.ui.dialogs,org.eclipse.ecf.ui.wizards,org.eclipse.ecf.presence.history,org.eclipse.ecf.core.start,org.eclipse.ecf.presence.collab.ui.view,org.eclipse.ecf.osgi.services.distribution,org.eclipse.ecf.docshare.messages,org.eclipse.ecf.provider.filetransfer.browse,org.eclipse.ecf.core.security,org.eclipse.ecf.protocol.bittorrent,org.eclipse.ecf.discovery.ui.model.resource,org.eclipse.ecf.presence.ui.menu,org.eclipse.ecf.protocol.msn.events,org.eclipse.ecf.presence.search,org.eclipse.ecf.ui,org.eclipse.ecf.provider.comm.tcp,org.eclipse.ecf.protocol.msn,org.eclipse.ecf.remoteservice.util.tracker,org.eclipse.ecf.presence.bot.impl,org.eclipse.ecf.presence.ui,org.eclipse.ecf.storage,org.eclipse.ecf.osgi.services.discovery,org.eclipse.ecf.filetransfer.events.socketfactory,org.eclipse.ecf.presence.ui.chatroom,org.eclipse.ecf.server.generic,org.eclipse.ecf.provider.xmpp.identity,org.eclipse.ecf.docshare.menu,org.eclipse.ecf.datashare.events,org.eclipse.ecf.example.clients.applications,org.eclipse.ecf.provider.jmdns.identity,org.eclipse.ecf.telephony.call.service,org.eclipse.ecf.filetransfer.identity,org.eclipse.ecf.telephony.call,org.eclipse.ecf.server.generic.app,org.eclipse.ecf.datashare,org.eclipse.ecf.provider.xmpp,org.eclipse.ecf.discovery.ui.model.provider,org.eclipse.ecf.provider.r_osgi.identity,org.eclipse.ecf.remoteservice.util,org.eclipse.ecf.sync,org.eclipse.ecf.discovery.ui.model.impl,org.eclipse.ecf.presence.collab.ui.console,org.eclipse.ecf.provider.jmdns.container,org.eclipse.ecf.datashare.mergeable,org.eclipse.ecf.discovery.identity,org.eclipse.ecf.provider.util,org.eclipse.ecf.presence.ui.roster,org.eclipse.ecf.examples.provider.trivial,org.eclipse.ecf.filetransfer.service,org.eclipse.ecf.discovery.ui.model.util,org.eclipse.ecf.presence.service,org.eclipse.ecf.core.util,org.eclipse.ecf.provider.datashare,org.eclipse.ecf.provider.filetransfer.httpclient,org.eclipse.ecf.provider.filetransfer.util,org.eclipse.ecf.core.jobs,org.eclipse.ecf.remoteservice.events,org.eclipse.ecf.core.status" source="1.4" sourcefiles="../org.eclipse.ecf.discovery.ui/src/org/eclipse/ecf/discovery/ui/DiscoveryPropertyTesterUtil.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceContainerAdapter.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRunnable.java,src/org/eclipse/ecf/core/ContainerTypeDescription.java,src/org/eclipse/ecf/core/IContainerManager.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceProperties.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IMMessage.java,src/org/eclipse/ecf/core/IContainerFactory.java,../org.eclipse.ecf.discovery.ui/src/org/eclipse/ecf/discovery/ui/DiscoveryHandlerUtil.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IFQID.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFile.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceProperties.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java,../org.eclipse.ecf.server/src/org/eclipse/ecf/server/IServiceClientManager.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/UserCancelledException.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/BrowseFileTransferException.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/AbstractDiscoveryContainerAdapter.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransferRequestListener.java,src/org/eclipse/ecf/core/BaseContainer.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IAccountManager.java,src/org/eclipse/ecf/core/AbstractContainerAdapterFactory.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransfer.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/SendFileTransferException.java,src/org/eclipse/ecf/core/ContainerFactory.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceTypeContainerEvent.java,src/org/eclipse/ecf/core/ContainerCreateException.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceEvent.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeListener.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRateControl.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferContainerAdapter.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IIMMessageListener.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceListener.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemRequest.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresence.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceTypeEvent.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IDiscoveryContainerAdapter.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/AbstractPresenceContainer.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileAttributes.java,src/org/eclipse/ecf/core/IContainerManagerListener.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IServiceInfo.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IOutgoingFileTransfer.java,src/org/eclipse/ecf/core/AbstractContainer.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceInfo.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IIMMessageEvent.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferInfo.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/Presence.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceSender.java,../org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IIMMessage.java,src/org/eclipse/ecf/core/IReliableContainer.java,src/org/eclipse/ecf/core/IContainerListener.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileInfo.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/ServiceContainerEvent.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferInfo.java,../org.eclipse.ecf.server/src/org/eclipse/ecf/server/IServiceClient.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/IContainerServiceInfoAdapter.java,../org.eclipse.ecf.server/src/org/eclipse/ecf/server/IServiceHost.java,../org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java,src/org/eclipse/ecf/core/ContainerAuthenticationException.java,../org.eclipse.ecf.discovery/src/org/eclipse/ecf/discovery/DiscoveryContainerConfig.java,src/org/eclipse/ecf/core/IContainer.java,src/org/eclipse/ecf/core/ContainerConnectException.java" sourcepath="../org.eclipse.ecf.provider.jslp/src;../org.eclipse.ecf.provider.ui/src;../org.eclipse.ecf.provider/src;../org.eclipse.ecf.identity/src;../org.eclipse.ecf.datashare/src;../org.eclipse.ecf.ui/src;../org.eclipse.ecf.presence.bot/src;src;../org.eclipse.ecf.osgi.services.discovery/src;../org.eclipse.ecf.presence.collab.ui/src;../org.eclipse.ecf.storage/src;../org.eclipse.ecf.examples.provider.trivial/src;../org.eclipse.ecf.discovery.ui.edit/src;../org.eclipse.ecf.telephony.call/src;../org.eclipse.ecf.presence.ui/src;../org.eclipse.ecf.sharedobject/src;../org.eclipse.ecf.sync/src;../org.eclipse.ecf.provider.discovery/src;../org.eclipse.ecf.remoteservice.ui/src;../org.eclipse.ecf.server/src;../org.eclipse.ecf.docshare/src;../org.eclipse.ecf.provider.datashare/src;../org.eclipse.ecf.provider.r_osgi/src;../org.eclipse.ecf.discovery/src;../org.eclipse.ecf.provider.remoteservice/src;../org.eclipse.ecf.protocol.bittorrent/src;../org.eclipse.ecf.provider.jmdns/jmdns;../org.eclipse.ecf.osgi.services.distribution/src;../org.eclipse.ecf.provider.filetransfer/src;../org.eclipse.ecf.presence/src;../org.eclipse.ecf.filetransfer.ui/src;../org.eclipse.ecf.telephony.call.ui/src;../org.eclipse.ecf.provider.xmpp/src;../org.eclipse.ecf.example.clients/src;../org.eclipse.ecf.discovery.ui.model/src;../org.eclipse.ecf.protocol.msn/src;../org.eclipse.ecf.server.generic/src;../org.eclipse.ecf.provider.filetransfer.httpclient/src;../org.eclipse.ecf.filetransfer/src;../org.eclipse.ecf.discovery.ui/src;../org.eclipse.ecf.remoteservice/src;../org.eclipse.ecf.provider.jmdns/src" splitindex="true" use="true" version="true"/>
-    </target>
-</project>
diff --git a/eclipse/ecf-src/org.eclipse.ecf/plugin.properties b/eclipse/ecf-src/org.eclipse.ecf/plugin.properties
deleted file mode 100644
index aba5caa..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/plugin.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-############################################################################
-# Copyright (c) 2007 Composent Inc., IBM Corp. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-############################################################################
-plugin.name=Eclipse Communication Framework (ECF)
-plugin.provider=Eclipse.org - ECF
diff --git a/eclipse/ecf-src/org.eclipse.ecf/plugin.xml b/eclipse/ecf-src/org.eclipse.ecf/plugin.xml
deleted file mode 100644
index 33208f5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.1"?>
-<plugin>
-   <extension-point id="containerFactory" name="ECF Container Factory" schema="schema/containerFactory.exsd"/>
-   <extension-point id="start" name="ECF start" schema="schema/start.exsd"/>
-   <extension
-         point="org.eclipse.ecf.containerFactory">
-      <containerFactory
-            class="org.eclipse.ecf.core.BaseContainer$Instantiator"
-            description="ECF Base Container"
-            name="ecf.base">
-      </containerFactory>
-   </extension>
-</plugin>
diff --git a/eclipse/ecf-src/org.eclipse.ecf/schema/containerFactory.exsd b/eclipse/ecf-src/org.eclipse.ecf/schema/containerFactory.exsd
deleted file mode 100644
index 17c88c5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/schema/containerFactory.exsd
+++ /dev/null
@@ -1,307 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ecf">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.eclipse.ecf" id="containerFactory" name="ECF Container Factory"/>
-      </appInfo>
-      <documentation>
-         This extension allows plugins to register themselves as 'providers' of ECF containers.  Once registered via this extension point, plugins can then provide there own implementations of  IContainer in response to client request of the ECF container factory (<b>org.eclipse.ecf.core.ContainerFactory</b>).
-<p>Plugins using this extension point can define a new implementation of any desired communications protocol, and expose that protocol as an instance of an <b>IContainer</b>.  When client requests are made to ECF ContainerFactory to create <b>IContainer</b> instances, those requests will be re-directed to the given IContainer implementer.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="containerFactory" minOccurs="1" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="containerFactory">
-      <annotation>
-         <documentation>
-            The container factory extension point.  Can optionally contain a list of 'defaultargument' elements that describe the arguments (and provide default values) to be passed to provider implementation
-         </documentation>
-      </annotation>
-      <complexType>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  The fully qualified name of the class implementing the <b>org.eclipse.ecf.core.provider.IContainerInstantiator</b> interface.
-               </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.ecf.core.provider.IContainerInstantiator"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  An optional name for the extension.  If no name is explicitly provided by the extension, the containerFactory class name is used as the name.  Note that this name must <b>not</b> conflict with any other name in the ECF SharedFactory in order to be successfully registered in the container factory.  Care should therefore be taken in selection of a name such that it does not conflict with other pre-existing names for this factory implementations
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="description" type="string">
-            <annotation>
-               <documentation>
-                  A description of the container factory suitable for presentation in a user interface.
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="server" type="boolean">
-            <annotation>
-               <documentation>
-                  Flag to indicate whether the factory is for creating servers.  Default is false.
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="hidden" type="boolean">
-            <annotation>
-               <documentation>
-                  Flag for whether the given container factory should be hidden in the user interface.  Default is false.
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         0.0.1
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
-         Here's an extension that associates a class org.eclipse.ecf.test.FooContainerFactory with name 'foo' in the ECF <b>ContainerFactory</b>:
-
-<pre>
-<extension point="org.eclipse.ecf.containerFactory">
-    <containerFactory name="foo" class="org.eclipse.ecf.test.FooInstantiator" description="My container factory"/>
-</extension>
-</pre>
-
-Here is some example code to implement this class:
-
-<pre>
-package org.eclipse.ecf.test;
-
-import org.eclipse.ecf.core.IContainer;
-import org.eclipse.ecf.core.ContainerInstantiationException;
-import org.eclipse.ecf.core.provider.IContainerInstantiator;
-
-public class FooInstantiator implements IContainerInstantiator {
-
-    public FooInstantiator() {
-        super();
-    }
-    public IContainer createInstance(ContainerTypeDescription description, Class[] argTypes, Object[] args)
-            throws ContainerInstantiationException {
-        // Create/return instance of FooContainer
-        // Note that FooContainer class must
-        // implement IContainer
-        return new FooContainer();
-    }
-}
-</pre>
-
-In this example, the given class implements the <b>IContainerInstantiator</b>.createInstance method by creating and returning a new instance of FooInstantiator, a class also defined in the extension plugin.  As noted in the code, this class must implement <b>IContainer</b>, so that it can successfully be returned from createInstance.
-
-<h3>Example Usage of Container by Clients</h3>
-
-Clients that wish to use the 'foo' container implementation can do so simply by making the following call to create an <b>IContainer</b>:
-
-<pre>
-IContainer newContainer = ContainerFactory.getDefault().createContainer('foo'); 
-// Further use of newContainer instance here
-
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         The API for this extension point is provided by the <b>org.eclipse.ecf.core.ContainerFactory.getDefault()</b> methods.  Specifically, the 'createContainer' methods are to be used by clients.  The functionality provided by the extension point mechanism can be used at runtime via the <b>ContainerFactory.getDefault().addDescription(ContainerTypeDescription)</b> method.  Here is the IContainerFactory interface
-contract:
-
-<pre>
-/**
- * Container factory contract {@link ContainerFactory} for default
- * implementation.
- */
-public interface IContainerFactory {
- /**
-  * Add a ContainerTypeDescription to the set of known ContainerDescriptions.
-  * 
-  * @param description
-  *            the ContainerTypeDescription to add to this factory. Must not
-  *            be null.
-  * @return ContainerTypeDescription the old description of the same name,
-  *         null if none found
-  */
- public ContainerTypeDescription addDescription(ContainerTypeDescription description);
-
- /**
-  * Get a collection of the ContainerDescriptions currently known to this
-  * factory. This allows clients to query the factory to determine what if
-  * any other ContainerDescriptions are currently registered with the
-  * factory, and if so, what they are.
-  * 
-  * @return List of ContainerTypeDescription instances
-  */
- public List /* ContainerTypeDescription */ getDescriptions();
-
- /**
-  * Check to see if a given named description is already contained by this
-  * factory
-  * 
-  * @param description
-  *            the ContainerTypeDescription to look for
-  * @return true if description is already known to factory, false otherwise
-  */
- public boolean containsDescription(ContainerTypeDescription description);
-
- /**
-  * Get the known ContainerTypeDescription given it's name.
-  * 
-  * @param name
-  *            the name to use as key to find ContainerTypeDescription
-  * @return ContainerTypeDescription found. Null if not found.
-  */
- public ContainerTypeDescription getDescriptionByName(String name);
-
- /**
-  * Make IContainer instance. Given a ContainerTypeDescription object, a
-  * String [] of argument types, and an Object [] of parameters, this method
-  * will
-  * <p>
-  * <ul>
-  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-  * <li>if found, will retrieve or create an IContainerInstantiator for that
-  * description</li>
-  * <li>Call the IContainerInstantiator.createInstance method to return an
-  * instance of IContainer</li>
-  * </ul>
-  * 
-  * @param description
-  *            the ContainerTypeDescription to use to create the instance
-  * @param parameters
-  *            an Object [] of parameters passed to the createInstance method
-  *            of the IContainerInstantiator
-  * @return a valid instance of IContainer
-  * @throws ContainerCreateException
-  */
- public IContainer createContainer(ContainerTypeDescription description,
-   Object[] parameters) throws ContainerCreateException;
-
- /**
-  * Make IContainer instance. Given a ContainerTypeDescription name, this
-  * method will
-  * <p>
-  * <ul>
-  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-  * <li>if found, will retrieve or create an IContainerInstantiator for that
-  * description</li>
-  * <li>Call the IContainerInstantiator.createInstance method to return an
-  * instance of IContainer</li>
-  * </ul>
-  * 
-  * @param descriptionName
-  *            the ContainerTypeDescription name to lookup
-  * @return a valid instance of IContainer
-  * @throws ContainerCreateException
-  */
- public IContainer createContainer(String descriptionName)
-   throws ContainerCreateException;
-
- /**
-  * Make IContainer instance. Given a ContainerTypeDescription name, this
-  * method will
-  * <p>
-  * <ul>
-  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-  * <li>if found, will retrieve or create an IContainerInstantiator for that
-  * description</li>
-  * <li>Call the IContainerInstantiator.createInstance method to return an
-  * instance of IContainer</li>
-  * </ul>
-  * 
-  * @param descriptionName
-  *            the ContainerTypeDescription name to lookup
-  * @param parameters
-  *            the Object [] of parameters passed to the
-  *            IContainerInstantiator.createInstance method
-  * @return a valid instance of IContainer
-  * @throws ContainerCreateException
-  */
- public IContainer createContainer(String descriptionName, Object[] parameters)
-   throws ContainerCreateException;
-
- /**
-  * Remove given description from set known to this factory.
-  * 
-  * @param description
-  *            the ContainerTypeDescription to remove
-  * @return the removed ContainerTypeDescription, null if nothing removed
-  */
- public ContainerTypeDescription removeDescription(
-   ContainerTypeDescription description);
-}
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         The supplied implementations of this extension point are:
-
-org.eclipse.ecf.provider.generic.GenericContainerInstantiator
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="copyright"/>
-      </appInfo>
-      <documentation>
-         Copyright (c) 2004 Composent, Inc. and others.
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation.
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java
deleted file mode 100644
index 7601da0..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM, Inc and Composent, Inc. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Chris Aniszczyk <zx at us.ibm.com> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core;
-
-import java.util.*;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.ecf.core.events.ContainerDisposeEvent;
-import org.eclipse.ecf.core.events.IContainerEvent;
-import org.eclipse.ecf.core.security.*;
-import org.eclipse.ecf.internal.core.ECFPlugin;
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Abstract implementation of IContainer. Provides implementations of listener
- * methods that subsclasses may use to avoid having to implement them
- * themselves. This class may be subclassed as needed.
- * 
- */
-public abstract class AbstractContainer implements IContainer {
-
-	private final List containerListeners = new ArrayList(5);
-
-	public void addListener(IContainerListener l) {
-		synchronized (containerListeners) {
-			containerListeners.add(l);
-		}
-	}
-
-	public void removeListener(IContainerListener l) {
-		synchronized (containerListeners) {
-			containerListeners.remove(l);
-		}
-	}
-
-	public void dispose() {
-		fireContainerEvent(new ContainerDisposeEvent(getID()));
-		synchronized (containerListeners) {
-			containerListeners.clear();
-		}
-	}
-
-	/**
-	 * Fires a container event
-	 * 
-	 * @param event
-	 */
-	protected void fireContainerEvent(IContainerEvent event) {
-		List toNotify = null;
-		// Copy array
-		synchronized (containerListeners) {
-			toNotify = new ArrayList(containerListeners);
-		}
-		// Notify all in toNotify
-		for (Iterator i = toNotify.iterator(); i.hasNext();) {
-			IContainerListener l = (IContainerListener) i.next();
-			l.handleEvent(event);
-		}
-	}
-
-	public Object getAdapter(Class serviceType) {
-		if (serviceType == null)
-			return null;
-		if (serviceType.isInstance(this)) {
-			return this;
-		}
-		IAdapterManager adapterManager = ECFPlugin.getDefault().getAdapterManager();
-		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, serviceType.getName());
-	}
-
-	protected String getPasswordFromConnectContext(IConnectContext connectContext) throws ContainerConnectException {
-		String pw = null;
-		try {
-			Callback[] callbacks = new Callback[1];
-			callbacks[0] = new ObjectCallback();
-			if (connectContext != null) {
-				CallbackHandler handler = connectContext.getCallbackHandler();
-				if (handler != null) {
-					handler.handle(callbacks);
-				}
-			}
-			ObjectCallback cb = (ObjectCallback) callbacks[0];
-			pw = (String) cb.getObject();
-		} catch (Exception e) {
-			throw new ContainerConnectException(Messages.AbstractContainer_Exception_Callback_Handler, e);
-		}
-		return pw;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java
deleted file mode 100644
index 94e6215..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.core;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.ecf.core.identity.*;
-import org.eclipse.ecf.core.provider.BaseContainerInstantiator;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Base implementation of IContainer. Subclasses may be created to fill out the
- * behavior of this base implementation. Also, adapter factories may be created
- * via adapterFactory extension point to allow adapters to be added to this
- * BaseContainer implementation without the need to create a separate IContainer
- * implementation class.
- */
-public class BaseContainer extends AbstractContainer {
-
-	public static class Instantiator extends BaseContainerInstantiator {
-		private static long nextBaseContainerID = 0L;
-
-		public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException {
-			try {
-				if (parameters != null && parameters.length > 0) {
-					if (parameters[0] instanceof ID)
-						return new BaseContainer((ID) parameters[0]);
-					if (parameters[0] instanceof String)
-						return new BaseContainer(IDFactory.getDefault().createStringID((String) parameters[0]));
-				}
-			} catch (IDCreateException e) {
-				throw new ContainerCreateException(Messages.BaseContainer_EXCEPTION_COULD_NOT_CREATE_ID);
-			}
-			return new BaseContainer(nextBaseContainerID++);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedAdapterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
-		 */
-		public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
-			return getInterfacesAndAdaptersForClass(BaseContainer.class);
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.ecf.core.provider.BaseContainerInstantiator#getSupportedParameterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
-		 */
-		public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
-			return new Class[][] { {}, {ID.class}, {String.class}};
-		}
-
-	}
-
-	private ID id = null;
-
-	protected BaseContainer(long idl) throws ContainerCreateException {
-		try {
-			this.id = IDFactory.getDefault().createLongID(idl);
-		} catch (IDCreateException e) {
-			throw new ContainerCreateException(Messages.BaseContainer_EXCEPTION_COULD_NOT_CREATE_ID, e);
-		}
-	}
-
-	protected BaseContainer(ID id) {
-		Assert.isNotNull(id);
-		this.id = id;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainer#connect(org.eclipse.ecf.core.identity.ID,
-	 *      org.eclipse.ecf.core.security.IConnectContext)
-	 */
-	public void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException {
-		throw new ContainerConnectException(Messages.BaseContainer_EXCEPTION_CONNECT_NOT_SUPPORT);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainer#disconnect()
-	 */
-	public void disconnect() {
-		// Nothing to disconnect
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainer#getConnectNamespace()
-	 */
-	public Namespace getConnectNamespace() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainer#getConnectedID()
-	 */
-	public ID getConnectedID() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
-	 */
-	public ID getID() {
-		return id;
-	}
-
-	public String toString() {
-		StringBuffer sb = new StringBuffer("BaseContainer["); //$NON-NLS-1$
-		sb.append("id=").append(getID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
-		return sb.toString();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
deleted file mode 100644
index b742b25..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.core.identity.ID;
-import org.eclipse.ecf.core.provider.IContainerInstantiator;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.internal.core.*;
-
-/**
- * Factory for creating {@link IContainer} instances. This class provides ECF
- * clients an entry point to constructing {@link IContainer} instances. <br>
- * <br>
- * Here is an example use of the ContainerFactory to construct an instance of
- * the 'standalone' container (has no connection to other containers): <br>
- * <br>
- * <code>
- * 	    IContainer container = <br>
- * 			ContainerFactory.getDefault().createContainer("ecf.generic.client");
- *      <br><br>
- *      ...further use of container here...
- * </code> For more details on the creation
- * and lifecycle of IContainer instances created via this factory see
- * {@link IContainer}.
- * 
- * @see IContainer
- * @see IContainerFactory
- */
-public class ContainerFactory implements IContainerFactory, IContainerManager {
-
-	public static final String BASE_CONTAINER_NAME = Messages.ContainerFactory_Base_Container_Name;
-
-	static final Map containerdescriptions = new HashMap();
-
-	static final Map containers = new HashMap();
-
-	static final List managerListeners = new ArrayList();
-
-	private static IContainerFactory instance = null;
-
-	static {
-		instance = new ContainerFactory();
-	}
-
-	class ContainerEntry {
-		private final IContainer container;
-		private final ContainerTypeDescription typeDescription;
-
-		public ContainerEntry(IContainer container, ContainerTypeDescription typeDescription) {
-			this.container = container;
-			this.typeDescription = typeDescription;
-		}
-
-		public IContainer getContainer() {
-			return this.container;
-		}
-
-		public ContainerTypeDescription getContainerTypeDescription() {
-			return this.typeDescription;
-		}
-	}
-
-	public static IContainerFactory getDefault() {
-		return instance;
-	}
-
-	protected ContainerFactory() {
-		ECFPlugin.getDefault().addDisposable(new IDisposable() {
-			public void dispose() {
-				synchronized (containers) {
-					for (Iterator i = containers.keySet().iterator(); i.hasNext();) {
-						ContainerEntry entry = (ContainerEntry) containers.get(i.next());
-						if (entry != null) {
-							IContainer c = entry.getContainer();
-							try {
-								c.dispose();
-							} catch (Throwable e) {
-								// Log exception
-								ECFPlugin.getDefault().log(new Status(IStatus.ERROR, ECFPlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "container dispose error", e)); //$NON-NLS-1$
-								Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ContainerFactory.class, "doDispose", e); //$NON-NLS-1$
-							}
-						}
-					}
-					containers.clear();
-				}
-				containerdescriptions.clear();
-				managerListeners.clear();
-			}
-		});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#addDescription(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription) {
-		return addDescription0(containerTypeDescription);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptions()
-	 */
-	public List getDescriptions() {
-		return getDescriptions0();
-	}
-
-	protected List getDescriptions0() {
-		synchronized (containerdescriptions) {
-			return new ArrayList(containerdescriptions.values());
-		}
-	}
-
-	protected ContainerTypeDescription addDescription0(ContainerTypeDescription containerTypeDescription) {
-		if (containerTypeDescription == null)
-			return null;
-		synchronized (containerdescriptions) {
-			return (ContainerTypeDescription) containerdescriptions.put(containerTypeDescription.getName(), containerTypeDescription);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#containsDescription(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public boolean containsDescription(ContainerTypeDescription containerTypeDescription) {
-		return containsDescription0(containerTypeDescription);
-	}
-
-	protected boolean containsDescription0(ContainerTypeDescription containerTypeDescription) {
-		if (containerTypeDescription == null)
-			return false;
-		synchronized (containerdescriptions) {
-			return containerdescriptions.containsKey(containerTypeDescription.getName());
-		}
-	}
-
-	protected ContainerTypeDescription getDescription0(ContainerTypeDescription containerTypeDescription) {
-		if (containerTypeDescription == null)
-			return null;
-		synchronized (containerdescriptions) {
-			return (ContainerTypeDescription) containerdescriptions.get(containerTypeDescription.getName());
-		}
-	}
-
-	protected ContainerTypeDescription getDescription0(String containerTypeDescriptionName) {
-		if (containerTypeDescriptionName == null)
-			return null;
-		synchronized (containerdescriptions) {
-			return (ContainerTypeDescription) containerdescriptions.get(containerTypeDescriptionName);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptionByName(java.lang.String)
-	 */
-	public ContainerTypeDescription getDescriptionByName(String containerTypeDescriptionName) {
-		return getDescription0(containerTypeDescriptionName);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#removeDescription(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription) {
-		return removeDescription0(containerTypeDescription);
-
-	}
-
-	protected ContainerTypeDescription removeDescription0(ContainerTypeDescription containerTypeDescription) {
-		if (containerTypeDescription == null)
-			return null;
-		synchronized (containerdescriptions) {
-			return (ContainerTypeDescription) containerdescriptions.remove(containerTypeDescription.getName());
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptionsForContainerAdapter(java.lang.Class)
-	 */
-	public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter) {
-		if (containerAdapter == null)
-			throw new NullPointerException(Messages.ContainerFactory_Exception_Adapter_Not_Null);
-		List result = new ArrayList();
-		List descriptions = getDescriptions();
-		for (Iterator i = descriptions.iterator(); i.hasNext();) {
-			ContainerTypeDescription description = (ContainerTypeDescription) i.next();
-			String[] supportedAdapters = description.getSupportedAdapterTypes();
-			if (supportedAdapters != null) {
-				for (int j = 0; j < supportedAdapters.length; j++) {
-					if (supportedAdapters[j].equals(containerAdapter.getName()))
-						result.add(description);
-				}
-			}
-		}
-		return (ContainerTypeDescription[]) result.toArray(new ContainerTypeDescription[] {});
-	}
-
-	protected void throwContainerCreateException(String message, Throwable cause, String method) throws ContainerCreateException {
-		ContainerCreateException except = (cause == null) ? new ContainerCreateException(message) : new ContainerCreateException(message, cause);
-		Trace.throwing(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_THROWING, ContainerFactory.class, method, except);
-		throw except;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer()
-	 */
-	public IContainer createContainer() throws ContainerCreateException {
-		return createContainer(BASE_CONTAINER_NAME);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.identity.ID)
-	 */
-	public IContainer createContainer(ID containerID) throws ContainerCreateException {
-		if (containerID == null)
-			throw new ContainerCreateException(Messages.ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL);
-		return createContainer(BASE_CONTAINER_NAME, new Object[] {containerID});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription) throws ContainerCreateException {
-		return createContainer(containerTypeDescription, (Object[]) null);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String)
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException {
-		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), (Object[]) null);
-	}
-
-	private ContainerTypeDescription getDescriptionByNameWithException(String containerTypeDescriptionName) throws ContainerCreateException {
-		ContainerTypeDescription typeDescription = getDescriptionByName(containerTypeDescriptionName);
-		if (typeDescription == null)
-			throw new ContainerCreateException("Container type description with name=" + containerTypeDescriptionName + " not found.  This may indicate that the desired provider is not available or not startable within runtime."); //$NON-NLS-1$ //$NON-NLS-2$
-		return typeDescription;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription,
-	 *      java.lang.Object[])
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters) throws ContainerCreateException {
-		String method = "createContainer"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ContainerFactory.class, method, new Object[] {containerTypeDescription, Trace.getArgumentsString(parameters)});
-		if (containerTypeDescription == null)
-			throwContainerCreateException(Messages.ContainerFactory_Exception_Create_Container, null, method);
-		ContainerTypeDescription cd = getDescription0(containerTypeDescription);
-		if (cd == null)
-			throwContainerCreateException("ContainerTypeDescription '" //$NON-NLS-1$
-					+ containerTypeDescription.getName() + "' not found", null, method); //$NON-NLS-1$
-		IContainerInstantiator instantiator = null;
-		try {
-			instantiator = cd.getInstantiator();
-		} catch (Exception e) {
-			throwContainerCreateException("createContainer cannot get IContainerInstantiator for description : " //$NON-NLS-1$
-					+ containerTypeDescription, e, method);
-		}
-		// Ask instantiator to actually create instance
-		IContainer container = instantiator.createInstance(containerTypeDescription, parameters);
-		if (container == null)
-			throwContainerCreateException("Instantiator returned null for '" //$NON-NLS-1$
-					+ cd.getName() + "'", null, method); //$NON-NLS-1$
-		// Add to containers map if container.getID() provides a valid value.
-		ID containerID = container.getID();
-		if (containerID != null)
-			addContainer(container, cd);
-		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, ContainerFactory.class, method, container);
-		return container;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String,
-	 *      java.lang.Object[])
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException {
-		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), parameters);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, org.eclipse.ecf.core.identity.ID, java.lang.Object[])
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters) throws ContainerCreateException {
-		if (containerID == null)
-			throw new ContainerCreateException(Messages.ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL);
-		Object[] params = (parameters == null || parameters.length == 0) ? new Object[1] : new Object[parameters.length + 1];
-		params[0] = containerID;
-		if (parameters != null && parameters.length != 0)
-			System.arraycopy(parameters, 0, params, 1, parameters.length);
-		return createContainer(containerTypeDescription, params);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String, org.eclipse.ecf.core.identity.ID, java.lang.Object[])
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException {
-		if (containerID == null)
-			throw new ContainerCreateException(Messages.ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL);
-		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerID, parameters);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, org.eclipse.ecf.core.identity.ID)
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID) throws ContainerCreateException {
-		if (containerID == null)
-			throw new ContainerCreateException(Messages.ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL);
-		return createContainer(containerTypeDescription, new Object[] {containerID});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String, org.eclipse.ecf.core.identity.ID)
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException {
-		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), new Object[] {containerID});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerManager#getAllContainers()
-	 */
-	public IContainer[] getAllContainers() {
-		List containerValues = new ArrayList();
-		synchronized (containers) {
-			Collection containerEntrys = containers.values();
-			for (Iterator i = containerEntrys.iterator(); i.hasNext();) {
-				ContainerEntry entry = (ContainerEntry) i.next();
-				containerValues.add(entry.getContainer());
-			}
-		}
-		return (IContainer[]) containerValues.toArray(new IContainer[] {});
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerManager#getContainer(org.eclipse.ecf.core.identity.ID)
-	 */
-	public IContainer getContainer(ID containerID) {
-		if (containerID == null)
-			return null;
-		synchronized (containers) {
-			ContainerEntry entry = (ContainerEntry) containers.get(containerID);
-			if (entry == null)
-				return null;
-			return entry.getContainer();
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerManager#hasContainer(org.eclipse.ecf.core.identity.ID)
-	 */
-	public boolean hasContainer(ID containerID) {
-		Assert.isNotNull(containerID);
-		synchronized (containers) {
-			return containers.containsKey(containerID);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerManager#addListener(org.eclipse.ecf.core.IContainerManagerListener)
-	 */
-	public boolean addListener(IContainerManagerListener listener) {
-		Assert.isNotNull(listener);
-		synchronized (managerListeners) {
-			return managerListeners.add(listener);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.IContainerManager#removeListener(org.eclipse.ecf.core.IContainerManagerListener)
-	 */
-	public boolean removeListener(IContainerManagerListener listener) {
-		Assert.isNotNull(listener);
-		synchronized (managerListeners) {
-			return managerListeners.remove(listener);
-		}
-	}
-
-	public IContainer addContainer(IContainer container, ContainerTypeDescription typeDescription) {
-		Assert.isNotNull(container);
-		Assert.isNotNull(typeDescription);
-		ID containerID = container.getID();
-		Assert.isNotNull(containerID, Messages.ContainerFactory_EXCEPTION_CONTAINER_ID_NOT_NULL);
-		ContainerEntry result = null;
-		synchronized (containers) {
-			result = (ContainerEntry) containers.put(containerID, new ContainerEntry(container, typeDescription));
-		}
-		if (result == null)
-			fireContainerAdded(container);
-		return container;
-	}
-
-	/**
-	 * @param result
-	 */
-	private void fireContainerAdded(IContainer result) {
-		List toNotify = null;
-		synchronized (managerListeners) {
-			toNotify = new ArrayList(managerListeners);
-		}
-		for (Iterator i = toNotify.iterator(); i.hasNext();) {
-			IContainerManagerListener cml = (IContainerManagerListener) i.next();
-			cml.containerAdded(result);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ecf.core.IContainerManager#removeContainer(org.eclipse.ecf.core.IContainer)
-	 */
-	public IContainer removeContainer(IContainer container) {
-		Assert.isNotNull(container);
-		ID containerID = container.getID();
-		if (containerID == null)
-			return null;
-		return removeContainer(containerID);
-	}
-
-	public IContainer removeContainer(ID containerID) {
-		Assert.isNotNull(containerID);
-		ContainerEntry result = null;
-		synchronized (containers) {
-			result = (ContainerEntry) containers.remove(containerID);
-		}
-		IContainer resultContainer = null;
-		if (result != null) {
-			resultContainer = result.getContainer();
-			fireContainerRemoved(resultContainer);
-		}
-		return resultContainer;
-	}
-
-	/**
-	 * @param result
-	 */
-	private void fireContainerRemoved(IContainer result) {
-		List toNotify = null;
-		synchronized (managerListeners) {
-			toNotify = new ArrayList(managerListeners);
-		}
-		for (Iterator i = toNotify.iterator(); i.hasNext();) {
-			IContainerManagerListener cml = (IContainerManagerListener) i.next();
-			cml.containerRemoved(result);
-		}
-	}
-
-	public ContainerTypeDescription getContainerTypeDescription(ID containerID) {
-		if (containerID == null)
-			return null;
-		synchronized (containers) {
-			ContainerEntry entry = (ContainerEntry) containers.get(containerID);
-			if (entry == null)
-				return null;
-			return entry.getContainerTypeDescription();
-		}
-	}
-
-	public IContainerFactory getContainerFactory() {
-		return this;
-	}
-
-	public void removeAllContainers() {
-		synchronized (containers) {
-			for (Iterator i = containers.keySet().iterator(); i.hasNext();) {
-				ID key = (ID) i.next();
-				ContainerEntry entry = (ContainerEntry) containers.get(key);
-				i.remove();
-				fireContainerRemoved(entry.getContainer());
-			}
-		}
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
deleted file mode 100644
index cd2b09f..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.core.provider.IContainerInstantiator;
-import org.eclipse.ecf.core.util.Trace;
-import org.eclipse.ecf.internal.core.ECFDebugOptions;
-import org.eclipse.ecf.internal.core.ECFPlugin;
-
-/**
- * Description of an {@link IContainer} type.  Instances of this class are used to represent {@link IContainerInstantiator}s
- * in the {@link ContainerFactory}
- * 
- * @see ContainerFactory IContainerInstantiator
- */
-public class ContainerTypeDescription {
-
-	protected String name = null;
-
-	protected String instantiatorClass = null;
-
-	protected IContainerInstantiator instantiator = null;
-
-	protected String description = null;
-
-	protected int hashCode = 0;
-
-	protected boolean server;
-
-	protected boolean hidden;
-
-	public ContainerTypeDescription(String name, String instantiatorClass, String description) {
-		this(name, instantiatorClass, description, false, false);
-	}
-
-	public ContainerTypeDescription(String name, String instantiatorClass, String description, boolean server, boolean hidden) {
-		Assert.isNotNull(name, "ContainerTypeDescription<init> name cannot be null"); //$NON-NLS-1$
-		this.name = name;
-		this.hashCode = name.hashCode();
-		Assert.isNotNull(instantiatorClass, "ContainerTypeDescription<init> instantiatorClass cannot be null"); //$NON-NLS-1$
-		this.instantiatorClass = instantiatorClass;
-		this.description = description;
-		this.server = server;
-		this.hidden = hidden;
-	}
-
-	public ContainerTypeDescription(String name, IContainerInstantiator instantiator, String description) {
-		this(name, instantiator, description, false, false);
-	}
-
-	public ContainerTypeDescription(String name, IContainerInstantiator inst, String desc, boolean server, boolean hidden) {
-		Assert.isNotNull(name, "ContainerTypeDescription<init> name cannot be null"); //$NON-NLS-1$
-		this.name = name;
-		this.hashCode = name.hashCode();
-		Assert.isNotNull(inst, "ContainerTypeDescription<init> instantiator instance cannot be null"); //$NON-NLS-1$
-		this.instantiator = inst;
-		this.description = desc;
-		this.server = server;
-		this.hidden = hidden;
-	}
-
-	/**
-	 * Get ContainerTypeDescription name
-	 * 
-	 * @return String name for the ContainerTypeDescription. Will not be null.
-	 */
-	public String getName() {
-		return name;
-	}
-
-	public boolean equals(Object other) {
-		if (!(other instanceof ContainerTypeDescription))
-			return false;
-		ContainerTypeDescription scd = (ContainerTypeDescription) other;
-		return scd.name.equals(name);
-	}
-
-	public int hashCode() {
-		return hashCode;
-	}
-
-	public String toString() {
-		StringBuffer b = new StringBuffer("ContainerTypeDescription["); //$NON-NLS-1$
-		b.append("name=").append(name).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (instantiator == null)
-			b.append("instantiatorClass=").append(instantiatorClass) //$NON-NLS-1$
-					.append(";"); //$NON-NLS-1$
-		else
-			b.append("instantiator=").append(instantiator).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-		b.append("desc=").append(description).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
-		return b.toString();
-	}
-
-	protected IContainerInstantiator getInstantiator() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
-		synchronized (this) {
-			if (instantiator == null)
-				initializeInstantiator();
-			return instantiator;
-		}
-	}
-
-	private void initializeInstantiator() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
-		// Load instantiator class
-		Class clazz = Class.forName(instantiatorClass);
-		// Make new instance
-		instantiator = (IContainerInstantiator) clazz.newInstance();
-	}
-
-	/**
-	 * Get the String description associated with this ContainerTypeDescription
-	 * instance
-	 * 
-	 * @return String description. May be null.
-	 */
-	public String getDescription() {
-		return description;
-	}
-
-	public boolean isServer() {
-		return server;
-	}
-
-	public boolean isHidden() {
-		return hidden;
-	}
-
-	/**
-	 * Get array of supported adapters for this container type description. The
-	 * returned array entries will be the fully qualified names of the adapter
-	 * classes.
-	 * 
-	 * Note that the returned types do not guarantee that a subsequent call to
-	 * {@link IContainer#getAdapter(Class)} with the same type name as a
-	 * returned value will return a non-<code>null</code result. In other words, even if the
-	 * class name is in the returned array, subsequent calls to
-	 * {@link IContainer#getAdapter(Class)} may still return <code>null</code>.
-	 * 
-	 * @return String[] of supported adapters. The entries in the returned array
-	 *         will be the fully qualified class names of adapters supported by
-	 *         the given description. An empty string array (String[0]) will be
-	 *         returned if no adapters are supported.
-	 */
-	public String[] getSupportedAdapterTypes() {
-		String method = "getSupportedAdapterTypes"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
-		String[] result = new String[0];
-		try {
-			String[] r = getInstantiator().getSupportedAdapterTypes(this);
-			if (r != null)
-				result = r;
-		} catch (Exception e) {
-			traceAndLogException(IStatus.ERROR, method, e);
-		}
-		List resultList = new ArrayList();
-		for (int i = 0; i < result.length; i++) {
-			resultList.add(result[i]);
-		}
-		if (!resultList.contains(IContainer.class.getName()))
-			resultList.add(IContainer.class.getName());
-		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
-		return (String[]) resultList.toArray(new String[] {});
-	}
-
-	protected void traceAndLogException(int code, String method, Throwable e) {
-		Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, this.getClass(), method, e);
-		ECFPlugin.getDefault().log(new Status(IStatus.ERROR, ECFPlugin.PLUGIN_ID, code, method, e));
-	}
-
-	/**
-	 * Get array of parameter types for this ContainerTypeDescription. Each of
-	 * the rows of the returned array specifies a Class[] of parameter types.
-	 * These parameter types correspond to the types of Objects that can be
-	 * passed into the second parameter of
-	 * {@link IContainerInstantiator#createInstance(ContainerTypeDescription, Object[])}.
-	 * For example, if this method returns a Class [] = {{ String.class,
-	 * String.class }, { String.class }} this indicates that a call to
-	 * createInstance(description,new String[] { "hello", "there" }) and a call
-	 * to createInstance(description,new String[] { "hello" }) will be
-	 * understood by the underlying provider implementation.
-	 * 
-	 * @return Class[][] array of Class arrays. Each row corresponds to a
-	 *         Class[] that describes the types of Objects for second parameter
-	 *         to
-	 *         {@link IContainerInstantiator#createInstance(ContainerTypeDescription, Object[])}.
-	 *         If no parameter types are understood as arguments, a Class[0][0]
-	 *         array will be returned
-	 */
-	public Class[][] getSupportedParameterTypes() {
-		String method = "getParameterTypes"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
-		Class[][] result = new Class[0][0];
-		try {
-			Class[][] r = getInstantiator().getSupportedParameterTypes(this);
-			if (r != null)
-				result = r;
-		} catch (Exception e) {
-			traceAndLogException(IStatus.ERROR, method, e);
-		}
-		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
-		return result;
-	}
-
-	/**
-	 * @return String[] of container's intents.
-	 * 
-	 * @since 3.0
-	 */
-	public String[] getSupportedIntents() {
-		String method = "getSupportedIntents"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
-		String[] result = new String[0];
-		try {
-			String[] r = getInstantiator().getSupportedIntents(this);
-			if (r != null)
-				result = r;
-		} catch (Exception e) {
-			traceAndLogException(IStatus.ERROR, method, e);
-		}
-		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
-		return result;
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java
deleted file mode 100644
index b8fe32c..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core;
-
-import java.util.List;
-import org.eclipse.ecf.core.identity.ID;
-
-/**
- * Container factory contract {@link ContainerFactory} for default
- * implementation.
- */
-public interface IContainerFactory {
-	/**
-	 * Add a ContainerTypeDescription to the set of known ContainerDescriptions.
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to add to this factory. Must not
-	 *            be <code>null</code>.
-	 * @return ContainerTypeDescription the old description of the same name,
-	 *         null if none found
-	 */
-	public ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription);
-
-	/**
-	 * Get a collection of the ContainerDescriptions currently known to this
-	 * factory. This allows clients to query the factory to determine what if
-	 * any other ContainerDescriptions are currently registered with the
-	 * factory, and if so, what they are.
-	 * 
-	 * @return List of ContainerTypeDescription instances
-	 */
-	public List /* ContainerTypeDescription */getDescriptions();
-
-	/**
-	 * Check to see if a given named description is already contained by this
-	 * factory
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to look for
-	 * @return true if description is already known to factory, false otherwise
-	 */
-	public boolean containsDescription(ContainerTypeDescription containerTypeDescription);
-
-	/**
-	 * Get the known ContainerTypeDescription given it's name.
-	 * 
-	 * @param containerTypeDescriptionName
-	 *            the name to use as key to find ContainerTypeDescription.  Must not be <code>null</code>.
-	 * @return ContainerTypeDescription found. Null if not found.
-	 */
-	public ContainerTypeDescription getDescriptionByName(String containerTypeDescriptionName);
-
-	/**
-	 * Remove given description from set known to this factory.
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to remove
-	 * @return the removed ContainerTypeDescription, null if nothing removed
-	 */
-	public ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription);
-
-	/**
-	 * Get container type descriptions that support the given containerAdapter
-	 * 
-	 * @param containerAdapter the container adapter.  Must not be null.
-	 * @return ContainerTypeDescription[] of descriptions that support the given container adapter.  If no 
-	 * ContainerTypeDescriptions found that support the given adapter, an empty array will be returned.
-	 */
-	public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter);
-
-	/**
-	 * Make a base IContainer instance.
-	 * 
-	 * @return IContainer instance.  A non-<code>null</code> instance will be returned.
-	 * @throws ContainerCreateException if some problem creating a base IContainer instance.
-	 */
-	public IContainer createContainer() throws ContainerCreateException;
-
-	/**
-	 * Make a base IContainer instance.
-	 * 
-	 * @param containerID the container's new ID.  Must not be <code>null</code>.
-	 * @return IContainer instance.  A non-<code>null</code>. instance will be returned.
-	 * @throws ContainerCreateException if some problem creating a base IContainer instance.
-	 */
-	public IContainer createContainer(ID containerID) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription name to use. Must not be <code>null</code>.
-	 * @return a valid instance of IContainer. Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription name, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescriptionName
-	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
-	 * @return a valid instance of IContainer. Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription object, a
-	 * String [] of argument types, and an Object [] of parameters, this method
-	 * will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to use to create the instance. Must not be <code>null</code>.
-	 * @param parameters
-	 *            an Object [] of parameters passed to the createInstance method
-	 *            of the IContainerInstantiator
-	 * @return a valid instance of IContainer. A non-<code>null</code>. instance will be returned.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription name, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescriptionName
-	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
-	 * @param parameters
-	 *            the Object [] of parameters passed to the
-	 *            IContainerInstantiator.createInstance method.  May be <code>null</code>.
-	 * @return a valid instance of IContainer. Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription object, a
-	 * String [] of argument types, and an Object [] of parameters, this method
-	 * will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
-	 * @param containerID the container's new ID.  Must not be <code>null</code>.
-	 * @param parameters
-	 *            an Object [] of parameters passed to the createInstance method
-	 *            of the IContainerInstantiator
-	 * @return a valid instance of IContainer
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription name, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerTypeDescriptionName
-	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
-	 * @param containerID the new container's id.  Must not be <code>null</code>.
-	 * @param parameters
-	 *            the Object [] of parameters passed to the
-	 *            IContainerInstantiator.createInstance method.  May be <code>null</code>.
-	 * @return a valid instance of IContainer. Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerID the new container's id.  Must not be <code>null</code>.
-	 * @param containerTypeDescription
-	 *            the ContainerTypeDescription to lookup.  Must not be <code>null</code>.
-	 * @return a valid instance of IContainer.  Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID) throws ContainerCreateException;
-
-	/**
-	 * Make IContainer instance. Given a ContainerTypeDescription name, this
-	 * method will
-	 * <p>
-	 * <ul>
-	 * <li>lookup the known ContainerDescriptions to find one of matching name</li>
-	 * <li>if found, will retrieve or create an IContainerInstantiator for that
-	 * description</li>
-	 * <li>Call the IContainerInstantiator.createInstance method to return an
-	 * instance of IContainer</li>
-	 * </ul>
-	 * 
-	 * @param containerID the new container's id.  Must not be <code>null</code>.
-	 * @param containerTypeDescriptionName
-	 *            the ContainerTypeDescription name to lookup.  Must not be <code>null</code>.
-	 * @return a valid instance of IContainer.  Will not be <code>null</code>.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException;
-
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
deleted file mode 100644
index 41c7a48..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.core.provider;
-
-import java.util.*;
-import org.eclipse.core.runtime.IAdapterManager;
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.internal.core.ECFPlugin;
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- *
- */
-public class BaseContainerInstantiator implements IContainerInstantiator {
-
-	protected static String[] NO_ADAPTERS_ARRAY = new String[] {IContainer.class.getName()};
-	protected static String[] EMPTY_STRING_ARRAY = new String[] {};
-	protected static Class[][] EMPTY_CLASS_ARRAY = new Class[][] {{}};
-
-	protected Set getAdaptersForClass(Class clazz) {
-		Set result = new HashSet();
-		IAdapterManager adapterManager = ECFPlugin.getDefault().getAdapterManager();
-		if (adapterManager != null)
-			result.addAll(Arrays.asList(adapterManager.computeAdapterTypes(clazz)));
-		return result;
-	}
-
-	protected Set getInterfacesForClass(Set s, Class clazz) {
-		if (clazz.equals(Object.class))
-			return s;
-		s.addAll(getInterfacesForClass(s, clazz.getSuperclass()));
-		s.addAll(Arrays.asList(clazz.getInterfaces()));
-		return s;
-	}
-
-	protected Set getInterfacesForClass(Class clazz) {
-		Set clazzes = getInterfacesForClass(new HashSet(), clazz);
-		int index = 0;
-		Set result = new HashSet();
-		for (Iterator i = clazzes.iterator(); i.hasNext(); index++)
-			result.add(((Class) i.next()).getName());
-		return result;
-	}
-
-	protected String[] getInterfacesAndAdaptersForClass(Class clazz) {
-		Set result = getAdaptersForClass(clazz);
-		result.addAll(getInterfacesForClass(clazz));
-		return (String[]) result.toArray(new String[] {});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#createInstance(org.eclipse.ecf.core.ContainerTypeDescription, java.lang.Object[])
-	 */
-	public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException {
-		throw new ContainerCreateException(Messages.BaseContainerInstantiator_EXCEPTION_CREATEINSTANCE_NOT_SUPPORTED);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedAdapterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
-		return NO_ADAPTERS_ARRAY;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedParameterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
-	 */
-	public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
-		return EMPTY_CLASS_ARRAY;
-	}
-
-	public String[] getSupportedIntents(ContainerTypeDescription description) {
-		return EMPTY_STRING_ARRAY;
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java
deleted file mode 100644
index 9987b40..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.provider;
-
-import org.eclipse.ecf.core.*;
-
-/**
- * Interface that must be implemented by extensions of the containerFactory
- * extension point
- * 
- */
-public interface IContainerInstantiator {
-	/**
-	 * Create instance of IContainer. This is the interface that container
-	 * provider implementations must implement for the containerFactory
-	 * extension point. The caller may optionally specify both argument types
-	 * and arguments that will be passed into this method (and therefore to the
-	 * provider implementation implementing this method). For example:
-	 * <p>
-	 * </p>
-	 * <p>
-	 * <b> ContainerFactory.getDefault().createContainer("foocontainer",new
-	 * Object { "hello" });</b>
-	 * </p>
-	 * <p>
-	 * </p>
-	 * 
-	 * @param description
-	 *            the ContainerTypeDescription associated with the registered
-	 *            container provider implementation
-	 * @param parameters
-	 *            parameters specified by the caller. May be null if no
-	 *            parameters are passed in by caller to
-	 *            ContainerFactory.getDefault().createContainer(...)
-	 * @return IContainer instance. The provider implementation must return a
-	 *         valid object implementing IContainer OR throw a
-	 *         ContainerCreateException. Null will not be returned.
-	 * @throws ContainerCreateException
-	 */
-	public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException;
-
-	/**
-	 * Get array of supported adapters for the given container type description.
-	 * Providers implement this method to allow clients to inspect the adapter
-	 * types exposed by the container described by the given description.
-	 * 
-	 * The returned array entries will be the fully qualified names of the
-	 * adapter classes.
-	 * 
-	 * Note that the returned types do not guarantee that a subsequent call to
-	 * {@link IContainer#getAdapter(Class)} with the same type name as a
-	 * returned value will return a non-<code>null</code> result. In other
-	 * words, even if the class name is in the returned array, subsequent calls
-	 * to {@link IContainer#getAdapter(Class)} may still return
-	 * <code>null</code>.
-	 * 
-	 * @param description
-	 *            the ContainerTypeDescription to report adapters for. Must not
-	 *            be <code>null</code>.
-	 * @return String[] of supported adapters. The entries in the returned array
-	 *         will be the fully qualified class names of adapters supported by
-	 *         the given description. <code>null</code> may be returned by
-	 *         the provider if no adapters are supported for this description.
-	 */
-	public String[] getSupportedAdapterTypes(ContainerTypeDescription description);
-
-	/**
-	 * Get array of parameter types for given container type description.
-	 * Providers implement this method to allow clients to inspect the available
-	 * set of parameter types understood for calls to
-	 * {@link #createInstance(ContainerTypeDescription, Object[])}.
-	 * <p>
-	 * </p>
-	 * Each of the rows of the returned array specifies a Class[] of parameter
-	 * types. These parameter types correspond to the types of Object[] that can
-	 * be passed into the second parameter of
-	 * {@link #createInstance(ContainerTypeDescription, Object[])}.
-	 * <p>
-	 * </p>
-	 * Consider the following example:
-	 * <p>
-	 * </p>
-	 * 
-	 * <pre>
-	 * public Class[][] getSupportedParameterTypes() {
-	 * 	return new Class[][] { { String.class }, { String.class, String.class } };
-	 * }
-	 * </pre>
-	 * 
-	 * The above means that there are two acceptable values for the Object []
-	 * passed into {@link #createInstance(ContainerTypeDescription, Object[])}:
-	 * 1) a single String, and 2) two Strings. These would therefore be
-	 * acceptable as input to createInstance:
-	 * 
-	 * <pre>
-	 * IContainer container = ContainerFactory.getDefault().createContainer(
-	 * 		description, new Object[] { "Hello" });
-	 * 
-	 * IContainer container2 = ContainerFactory.getDefault().createContainer(
-	 * 		description, new Object[] { "Hello" });
-	 * </pre>
-	 * 
-	 * <p>
-	 * </p>
-	 * 
-	 * @param description
-	 *            the ContainerTypeDescription to return parameter types for
-	 * @return Class[][] array of Class[]s. Each row in the table corresponds to
-	 *         a Class[] that describes the types of Objects in Object[] for
-	 *         second parameter to
-	 *         {@link #createInstance(ContainerTypeDescription, Object[])}.
-	 *         <code>null</code> returned if no parameter types supported for
-	 *         given description.
-	 */
-	public Class[][] getSupportedParameterTypes(ContainerTypeDescription description);
-
-	/**
-	 * Get supported intents for the container instantiated by this instantiator.
-	 * 
-	 * @param description the ContainerTypeDescription to return the intents for
-	 * @return String[] supported intents.  <code>null</code> may be returned by
-	 *         the provider if no intents are supported for this description.	 
-	 */
-	public String[] getSupportedIntents(ContainerTypeDescription description);
-
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java
deleted file mode 100644
index c2179a1..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.security;
-
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Callback that handles Boolean types
- * 
- */
-public class BooleanCallback implements Callback, java.io.Serializable {
-
-	private static final long serialVersionUID = 8660509222691671868L;
-
-	private String prompt;
-
-	private boolean defaultValue;
-
-	private boolean value;
-
-	/**
-	 * Construct a <code>BooleanCallback</code> with a prompt.
-	 * 
-	 * <p>
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the boolean value.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null or if <code>prompt</code>
-	 *                has a length of 0.
-	 */
-	public BooleanCallback(String prompt) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-	}
-
-	/**
-	 * Construct a <code>NameCallback</code> with a prompt and default name.
-	 * 
-	 * <p>
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the information.
-	 *            <p>
-	 * 
-	 * @param defaultValue
-	 *            the value to be used as the default value displayed with the
-	 *            prompt.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public BooleanCallback(String prompt, boolean defaultValue) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-
-		this.prompt = prompt;
-		this.defaultValue = defaultValue;
-	}
-
-	/**
-	 * Get the prompt.
-	 * 
-	 * @return the prompt value.
-	 */
-	public String getPrompt() {
-		return prompt;
-	}
-
-	/**
-	 * Get the default value.
-	 * 
-	 * @return the default value, or null if this <code>BooleanCallback</code> was
-	 *         not instantiated with a <code>defaultValue</code>.
-	 */
-	public boolean getDefaultValue() {
-		return defaultValue;
-	}
-
-	/**
-	 * Set the retrieved name.
-	 * 
-	 * @param val
-	 *            the retrieved value <code>true</code> or <code>false</code>.
-	 * 
-	 * @see #getValue
-	 */
-	public void setValue(boolean val) {
-		this.value = val;
-	}
-
-	/**
-	 * Get the retrieved value.
-	 * 
-	 * @return the retrieved value <code>true</code> or <code>false</code>.
-	 * 
-	 * @see #setValue
-	 */
-	public boolean getValue() {
-		return value;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java
deleted file mode 100644
index b8bb4d5..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.security;
-
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Callback that handles String types
- * 
- */
-public class NameCallback implements Callback, java.io.Serializable {
-
-	private static final long serialVersionUID = -2506493444608585718L;
-
-	private String prompt;
-
-	private String defaultName;
-
-	private String inputName;
-
-	/**
-	 * Construct a <code>NameCallback</code> with a prompt.
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the name.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public NameCallback(String prompt) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-	}
-
-	/**
-	 * Construct a <code>NameCallback</code> with a prompt and default name.
-	 * 
-	 * <p>
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the information.
-	 *            <p>
-	 * 
-	 * @param defaultName
-	 *            the name to be used as the default name displayed with the
-	 *            prompt.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public NameCallback(String prompt, String defaultName) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-		this.defaultName = defaultName;
-	}
-
-	/**
-	 * Get the prompt.
-	 * 
-	 * <p>
-	 * 
-	 * @return the prompt.
-	 */
-	public String getPrompt() {
-		return prompt;
-	}
-
-	/**
-	 * Get the default name.
-	 * 
-	 * <p>
-	 * 
-	 * @return the default name, or null if this <code>NameCallback</code> was
-	 *         not instantiated with a <code>defaultName</code>.
-	 */
-	public String getDefaultName() {
-		return defaultName;
-	}
-
-	/**
-	 * Set the retrieved name.
-	 * 
-	 * <p>
-	 * 
-	 * @param name
-	 *            the retrieved name (which may be null).
-	 * 
-	 * @see #getName
-	 */
-	public void setName(String name) {
-		this.inputName = name;
-	}
-
-	/**
-	 * Get the retrieved name.
-	 * 
-	 * <p>
-	 * 
-	 * @return the retrieved name (which may be null)
-	 * 
-	 * @see #setName
-	 */
-	public String getName() {
-		return inputName;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java
deleted file mode 100644
index 8f14358..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.security;
-
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Callback that handles passphrases
- * 
- */
-public class PassphraseCallback implements Callback, java.io.Serializable {
-
-	private static final long serialVersionUID = -6036907502015127266L;
-
-	private String prompt;
-
-	private String defaultPassphrase;
-
-	private String inputPassphrase;
-
-	/**
-	 * Construct a <code>PassphraseCallback</code> with a prompt.
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the passphrase.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public PassphraseCallback(String prompt) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-	}
-
-	/**
-	 * Construct a <code>PassphraseCallback</code> with a prompt and default passphrase.
-	 * 
-	 * <p>
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the information.
-	 *            <p>
-	 * 
-	 * @param defaultPassphrase
-	 *            the name to be used as the default name displayed with the
-	 *            prompt.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public PassphraseCallback(String prompt, String defaultPassphrase) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-		this.defaultPassphrase = defaultPassphrase;
-	}
-
-	/**
-	 * Get the prompt.
-	 * 
-	 * <p>
-	 * 
-	 * @return the prompt.
-	 */
-	public String getPrompt() {
-		return prompt;
-	}
-
-	/**
-	 * Get the default passphrase.
-	 * 
-	 * <p>
-	 * 
-	 * @return the default passphrase, or <code>null</code> if this <code>PassphraseCallback</code> was
-	 *         not instantiated with a <code>defaultPassphrase</code>.
-	 */
-	public String getDefaultPassphrase() {
-		return defaultPassphrase;
-	}
-
-	/**
-	 * Set the retrieved passphrase.
-	 * 
-	 * <p>
-	 * 
-	 * @param pw
-	 *            the passphrase (which may be null).
-	 * 
-	 * @see #getPassphrase
-	 */
-	public void setPassphrase(String pw) {
-		this.inputPassphrase = pw;
-	}
-
-	/**
-	 * Get the retrieved passphrase.
-	 * 
-	 * <p>
-	 * 
-	 * @return the retrieved passphrase (which may be null)
-	 * 
-	 * @see #setPassphrase
-	 */
-	public String getPassphrase() {
-		return inputPassphrase;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java
deleted file mode 100644
index d8fb35f..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.security;
-
-import org.eclipse.ecf.internal.core.Messages;
-
-/**
- * Callback that handles passwords
- * 
- */
-public class PasswordCallback implements Callback, java.io.Serializable {
-
-	private static final long serialVersionUID = 6940002988125290335L;
-
-	private String prompt;
-
-	private String defaultPassword;
-
-	private String inputPassword;
-
-	/**
-	 * Construct a <code>PasswordCallback</code> with a prompt.
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the name.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public PasswordCallback(String prompt) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-	}
-
-	/**
-	 * Construct a <code>PasswordCallback</code> with a prompt and default password.
-	 * 
-	 * <p>
-	 * 
-	 * @param prompt
-	 *            the prompt used to request the information.
-	 *            <p>
-	 * 
-	 * @param defaultPassword
-	 *            the name to be used as the default name displayed with the
-	 *            prompt.
-	 * 
-	 * @exception IllegalArgumentException
-	 *                if <code>prompt</code> is null.
-	 */
-	public PasswordCallback(String prompt, String defaultPassword) {
-		if (prompt == null)
-			throw new IllegalArgumentException(Messages.BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT);
-		this.prompt = prompt;
-		this.defaultPassword = defaultPassword;
-	}
-
-	/**
-	 * Get the prompt.
-	 * 
-	 * <p>
-	 * 
-	 * @return the prompt.
-	 */
-	public String getPrompt() {
-		return prompt;
-	}
-
-	/**
-	 * Get the default password.
-	 * 
-	 * <p>
-	 * 
-	 * @return the default password, or <code>null</code> if this <code>PasswordCallback</code> was
-	 *         not instantiated with a <code>defaultPassword</code>.
-	 */
-	public String getDefaultPassword() {
-		return defaultPassword;
-	}
-
-	/**
-	 * Set the retrieved password.
-	 * 
-	 * <p>
-	 * 
-	 * @param pw
-	 *            the password (which may be null).
-	 * 
-	 * @see #getPassword
-	 */
-	public void setPassword(String pw) {
-		this.inputPassword = pw;
-	}
-
-	/**
-	 * Get the retrieved password.
-	 * 
-	 * <p>
-	 * 
-	 * @return the retrieved password (which may be null)
-	 * 
-	 * @see #setPassword
-	 */
-	public String getPassword() {
-		return inputPassword;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java
deleted file mode 100644
index 7e91952..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.start;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * Interface that must be implemented by extensions of the org.eclipse.ecf.start
- * extension point. Such extensions will have their start method called by a new
- * Job upon ECF startup.
- */
-public interface IECFStart {
-	/**
-	 * Run some startup task.
-	 * 
-	 * @return IStatus the status of the start
-	 */
-	public IStatus run(IProgressMonitor monitor);
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java
deleted file mode 100644
index 61c9578..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 EclipseSource and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.status;
-
-import org.eclipse.core.runtime.*;
-
-public class SerializableMultiStatus extends SerializableStatus {
-
-	private static final long serialVersionUID = 2971900808938367039L;
-	/**
-	 * List of child statuses.
-	 */
-	private IStatus[] children;
-
-	public SerializableMultiStatus(MultiStatus multiStatus) {
-		this(multiStatus.getPlugin(), multiStatus.getCode(), multiStatus.getMessage(), multiStatus.getException());
-		IStatus[] childs = multiStatus.getChildren();
-		for (int i = 0; i < childs.length; i++) {
-			if (childs[i].isMultiStatus()) {
-				add(new SerializableMultiStatus((MultiStatus) childs[i]));
-			} else {
-				add(new SerializableStatus(childs[i]));
-			}
-		}
-	}
-
-	public SerializableMultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) {
-		this(pluginId, code, message, exception);
-		Assert.isLegal(newChildren != null);
-		int maxSeverity = getSeverity();
-		for (int i = 0; i < newChildren.length; i++) {
-			Assert.isLegal(newChildren[i] != null);
-			int severity = newChildren[i].getSeverity();
-			if (severity > maxSeverity)
-				maxSeverity = severity;
-		}
-		this.children = new IStatus[newChildren.length];
-		setSeverity(maxSeverity);
-		System.arraycopy(newChildren, 0, this.children, 0, newChildren.length);
-	}
-
-	public SerializableMultiStatus(String pluginId, int code, String message, Throwable exception) {
-		super(OK, pluginId, code, message, exception);
-		children = new IStatus[0];
-	}
-
-	/**
-	 * Adds the given status to this multi-status.
-	 * 
-	 * @param status
-	 *            the new child status
-	 */
-	public void add(SerializableStatus status) {
-		Assert.isLegal(status != null);
-		IStatus[] result = new IStatus[children.length + 1];
-		System.arraycopy(children, 0, result, 0, children.length);
-		result[result.length - 1] = status;
-		children = result;
-		int newSev = status.getSeverity();
-		if (newSev > getSeverity()) {
-			setSeverity(newSev);
-		}
-	}
-
-	/**
-	 * Adds all of the children of the given status to this multi-status. Does
-	 * nothing if the given status has no children (which includes the case
-	 * where it is not a multi-status).
-	 * 
-	 * @param status
-	 *            the status whose children are to be added to this one
-	 */
-	public void addAll(SerializableStatus status) {
-		Assert.isLegal(status != null);
-		SerializableStatus[] statuses = (SerializableStatus[]) status.getChildren();
-		for (int i = 0; i < statuses.length; i++) {
-			add(statuses[i]);
-		}
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public IStatus[] getChildren() {
-		return children;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public boolean isMultiStatus() {
-		return true;
-	}
-
-	/**
-	 * Merges the given status into this multi-status. Equivalent to
-	 * <code>add(status)</code> if the given status is not a multi-status.
-	 * Equivalent to <code>addAll(status)</code> if the given status is a
-	 * multi-status.
-	 * 
-	 * @param status
-	 *            the status to merge into this one
-	 * @see #add(SerializableStatus)
-	 * @see #addAll(SerializableStatus)
-	 */
-	public void merge(SerializableStatus status) {
-		Assert.isLegal(status != null);
-		if (!status.isMultiStatus()) {
-			add(status);
-		} else {
-			addAll(status);
-		}
-	}
-
-	/**
-	 * Returns a string representation of the status, suitable for debugging
-	 * purposes only.
-	 */
-	public String toString() {
-		StringBuffer buf = new StringBuffer(super.toString());
-		buf.append(" children=["); //$NON-NLS-1$
-		for (int i = 0; i < children.length; i++) {
-			if (i != 0) {
-				buf.append(" "); //$NON-NLS-1$
-			}
-			buf.append(children[i].toString());
-		}
-		buf.append("]"); //$NON-NLS-1$
-		return buf.toString();
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java
deleted file mode 100644
index fbf1e34..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 EclipseSource and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.core.status;
-
-import java.io.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.internal.core.ECFPlugin;
-import org.eclipse.osgi.util.NLS;
-
-public class SerializableStatus implements IStatus, Serializable {
-
-	private static final long serialVersionUID = -1874392357776889683L;
-
-	public static final IStatus OK_STATUS = new SerializableStatus(OK, ECFPlugin.PLUGIN_ID, OK, "ok", null); //$NON-NLS-1$
-	public static final IStatus CANCEL_STATUS = new SerializableStatus(CANCEL, ECFPlugin.PLUGIN_ID, 1, "", null); //$NON-NLS-1$
-
-	/**
-	 * The severity. One of
-	 * <ul>
-	 * <li><code>CANCEL</code></li>
-	 * <li><code>ERROR</code></li>
-	 * <li><code>WARNING</code></li>
-	 * <li><code>INFO</code></li>
-	 * <li>or <code>OK</code> (0)</li>
-	 * </ul>
-	 */
-	private int severity = OK;
-
-	/**
-	 * Unique identifier of plug-in.
-	 */
-	private String pluginId;
-
-	/**
-	 * Plug-in-specific status code.
-	 */
-	private int code;
-
-	/**
-	 * Message, localized to the current locale.
-	 */
-	private String message;
-
-	/**
-	 * Wrapped exception, or <code>null</code> if none.
-	 */
-	private Throwable exception = null;
-
-	/**
-	 * Constant to avoid generating garbage.
-	 */
-	private static final IStatus[] theEmptyStatusArray = new IStatus[0];
-
-	public SerializableStatus(IStatus status) {
-		setSeverity(status.getSeverity());
-		setPlugin(status.getPlugin());
-		setCode(status.getCode());
-		setMessage(status.getMessage());
-		setException(status.getException());
-	}
-
-	public SerializableStatus(int severity, String pluginId, int code, String message, Throwable exception) {
-		setSeverity(severity);
-		setPlugin(pluginId);
-		setCode(code);
-		setMessage(message);
-		setException(exception);
-	}
-
-	public SerializableStatus(int severity, String pluginId, String message, Throwable exception) {
-		setSeverity(severity);
-		setPlugin(pluginId);
-		setMessage(message);
-		setException(exception);
-		setCode(OK);
-	}
-
-	public SerializableStatus(int severity, String pluginId, String message) {
-		setSeverity(severity);
-		setPlugin(pluginId);
-		setMessage(message);
-		setCode(OK);
-		setException(null);
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public IStatus[] getChildren() {
-		return theEmptyStatusArray;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public int getCode() {
-		return code;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public Throwable getException() {
-		return exception;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public String getMessage() {
-		return message;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public String getPlugin() {
-		return pluginId;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public int getSeverity() {
-		return severity;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public boolean isMultiStatus() {
-		return false;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public boolean isOK() {
-		return severity == OK;
-	}
-
-	/*
-	 * (Intentionally not javadoc'd) Implements the corresponding method on
-	 * <code>IStatus</code>.
-	 */
-	public boolean matches(int severityMask) {
-		return (severity & severityMask) != 0;
-	}
-
-	/**
-	 * Sets the status code.
-	 * 
-	 * @param code
-	 *            the plug-in-specific status code, or <code>OK</code>
-	 */
-	protected void setCode(int code) {
-		this.code = code;
-	}
-
-	/**
-	 * Sets the exception.
-	 * 
-	 * @param exception
-	 *            a low-level exception, or <code>null</code> if not applicable
-	 */
-	protected void setException(Throwable exception) {
-		this.exception = checkForSerializable(exception);
-	}
-
-	private Throwable checkForSerializable(Throwable exception2) {
-		ObjectOutputStream oos = null;
-		try {
-			oos = new ObjectOutputStream(new ByteArrayOutputStream());
-			oos.writeObject(exception2);
-		} catch (IOException e) {
-			ECFPlugin.getDefault().log(new Status(IStatus.WARNING, ECFPlugin.PLUGIN_ID, IStatus.WARNING, NLS.bind("Exception {0} could not be serialized for SerializableStatus", exception2), e)); //$NON-NLS-1$
-			// In this case, we'll create a new exception that can be serialized
-			return createNewExceptionFor(exception2);
-		} finally {
-			try {
-				if (oos != null)
-					oos.close();
-			} catch (IOException e) {
-				// do nothing
-			}
-		}
-		return exception2;
-	}
-
-	private Throwable createNewExceptionFor(Throwable exception2) {
-		Exception re = new Exception(exception2.getMessage());
-		// setStackTrace not in Foundation 1.1 as per
-		// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261781
-		// re.setStackTrace(exception2.getStackTrace());
-		return re;
-	}
-
-	/**
-	 * Sets the message. If null is passed, message is set to an empty string.
-	 * 
-	 * @param message
-	 *            a human-readable message, localized to the current locale
-	 */
-	protected void setMessage(String message) {
-		if (message == null)
-			this.message = ""; //$NON-NLS-1$
-		else
-			this.message = message;
-	}
-
-	/**
-	 * Sets the plug-in id.
-	 * 
-	 * @param pluginId
-	 *            the unique identifier of the relevant plug-in
-	 */
-	protected void setPlugin(String pluginId) {
-		Assert.isLegal(pluginId != null && pluginId.length() > 0);
-		this.pluginId = pluginId;
-	}
-
-	/**
-	 * Sets the severity.
-	 * 
-	 * @param severity
-	 *            the severity; one of <code>OK</code>, <code>ERROR</code>,
-	 *            <code>INFO</code>, <code>WARNING</code>, or
-	 *            <code>CANCEL</code>
-	 */
-	protected void setSeverity(int severity) {
-		Assert.isLegal(severity == OK || severity == ERROR || severity == WARNING || severity == INFO || severity == CANCEL);
-		this.severity = severity;
-	}
-
-	/**
-	 * Returns a string representation of the status, suitable for debugging
-	 * purposes only.
-	 */
-	public String toString() {
-		StringBuffer buf = new StringBuffer();
-		buf.append("SerializableStatus "); //$NON-NLS-1$
-		if (severity == OK) {
-			buf.append("OK"); //$NON-NLS-1$
-		} else if (severity == ERROR) {
-			buf.append("ERROR"); //$NON-NLS-1$
-		} else if (severity == WARNING) {
-			buf.append("WARNING"); //$NON-NLS-1$
-		} else if (severity == INFO) {
-			buf.append("INFO"); //$NON-NLS-1$
-		} else if (severity == CANCEL) {
-			buf.append("CANCEL"); //$NON-NLS-1$
-		} else {
-			buf.append("severity="); //$NON-NLS-1$
-			buf.append(severity);
-		}
-		buf.append(": "); //$NON-NLS-1$
-		buf.append(pluginId);
-		buf.append(" code="); //$NON-NLS-1$
-		buf.append(code);
-		buf.append(' ');
-		buf.append(message);
-		buf.append(' ');
-		buf.append(exception);
-		return buf.toString();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java
deleted file mode 100644
index 501c9a3..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.core.user;
-
-import java.io.Serializable;
-import java.util.Map;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.ecf.core.identity.IIdentifiable;
-
-/**
- * Interface for arbitrary ECF system user. Instances represent a user within
- * ECF providers and/or clients.
- */
-public interface IUser extends IIdentifiable, Serializable, IAdaptable {
-	/**
-	 * Get basic name for user. Will not return <code>null</.
-	 */
-	public String getName();
-
-	/**
-	 * Get nick name for user.
-	 * 
-	 * @return String the user's nickname. May be <code>null</code> if user
-	 *         has no nickname.
-	 */
-	public String getNickname();
-
-	/**
-	 * Get map of properties associated with this user. May be <code>null</code>.
-	 * 
-	 * @return Map
-	 */
-	public Map getProperties();
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
deleted file mode 100644
index 0646517..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: Composent, Inc. - initial API and implementation
- ******************************************************************************/
-package org.eclipse.ecf.internal.core;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.core.provider.IContainerInstantiator;
-import org.eclipse.ecf.core.start.ECFStartJob;
-import org.eclipse.ecf.core.start.IECFStart;
-import org.eclipse.ecf.core.util.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class ECFPlugin implements BundleActivator {
-
-	public static final String PLUGIN_ID = "org.eclipse.ecf"; //$NON-NLS-1$
-
-	private static final String ECFNAMESPACE = PLUGIN_ID;
-
-	private static final String CONTAINER_FACTORY_NAME = "containerFactory"; //$NON-NLS-1$
-
-	private static final String CONTAINER_FACTORY_EPOINT = ECFNAMESPACE + "." + CONTAINER_FACTORY_NAME; //$NON-NLS-1$
-
-	private static final String STARTUP_NAME = "start"; //$NON-NLS-1$
-
-	public static final String START_EPOINT = ECFNAMESPACE + "." + STARTUP_NAME; //$NON-NLS-1$
-
-	public static final String PLUGIN_RESOURCE_BUNDLE = ECFNAMESPACE + ".ECFPluginResources"; //$NON-NLS-1$
-
-	public static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
-
-	public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
-
-	public static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
-
-	public static final String VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
-
-	public static final String SERVER_ATTRIBUTE = "server"; //$NON-NLS-1$
-
-	public static final String HIDDEN_ATTRIBUTE = "hidden"; //$NON-NLS-1$
-
-	public static final String ASYNCH_ATTRIBUTE = "asynchronous"; //$NON-NLS-1$
-
-	// The shared instance.
-	private static ECFPlugin plugin;
-
-	private BundleContext context = null;
-
-	private ServiceTracker extensionRegistryTracker = null;
-
-	private Map disposables = new WeakHashMap();
-
-	private IRegistryChangeListener registryManager = null;
-
-	private ServiceRegistration containerFactoryServiceRegistration;
-
-	private ServiceRegistration containerManagerServiceRegistration;
-
-	private ServiceTracker logServiceTracker = null;
-
-	private LogService logService = null;
-
-	private ServiceTracker adapterManagerTracker = null;
-
-	private BundleActivator ecfTrustManager;
-
-	public IAdapterManager getAdapterManager() {
-		// First, try to get the adapter manager via
-		if (adapterManagerTracker == null) {
-			adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null);
-			adapterManagerTracker.open();
-		}
-		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService();
-		// Then, if the service isn't there, try to get from Platform class via
-		// PlatformHelper class
-		if (adapterManager == null)
-			adapterManager = PlatformHelper.getPlatformAdapterManager();
-		if (adapterManager == null)
-			getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Cannot get adapter manager", null)); //$NON-NLS-1$
-		return adapterManager;
-	}
-
-	public ECFPlugin() {
-		// null constructor
-	}
-
-	public void addDisposable(IDisposable disposable) {
-		disposables.put(disposable, null);
-	}
-
-	public void removeDisposable(IDisposable disposable) {
-		disposables.remove(disposable);
-	}
-
-	protected void fireDisposables() {
-		for (final Iterator i = disposables.keySet().iterator(); i.hasNext();) {
-			final IDisposable d = (IDisposable) i.next();
-			if (d != null)
-				d.dispose();
-		}
-	}
-
-	public Bundle getBundle() {
-		if (context == null)
-			return null;
-		return context.getBundle();
-	}
-
-	protected LogService getLogService() {
-		if (logServiceTracker == null) {
-			logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
-			logServiceTracker.open();
-		}
-		logService = (LogService) logServiceTracker.getService();
-		if (logService == null)
-			logService = new SystemLogService(PLUGIN_ID);
-		return logService;
-	}
-
-	public void log(IStatus status) {
-		if (logService == null)
-			logService = getLogService();
-		if (logService != null)
-			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
-	}
-
-	protected void logException(IStatus status, String method, Throwable exception) {
-		log(status);
-		Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ECFPlugin.class, method, exception);
-	}
-
-	/**
-	 * Remove extensions for container factory extension point
-	 * 
-	 * @param members
-	 *            the members to remove
-	 */
-	protected void removeContainerFactoryExtensions(IConfigurationElement[] members) {
-		final String method = "removeContainerFactoryExtensions"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
-		// For each configuration element
-		for (int m = 0; m < members.length; m++) {
-			final IConfigurationElement member = members[m];
-			// Get the label of the extender plugin and the ID of the extension.
-			final IExtension extension = member.getDeclaringExtension();
-			String name = null;
-			try {
-				// Get name and get version, if available
-				name = member.getAttribute(NAME_ATTRIBUTE);
-				if (name == null) {
-					name = member.getAttribute(CLASS_ATTRIBUTE);
-				}
-				final IContainerFactory factory = ContainerFactory.getDefault();
-				final ContainerTypeDescription cd = factory.getDescriptionByName(name);
-				if (cd == null || !factory.containsDescription(cd)) {
-					continue;
-				}
-				// remove
-				factory.removeDescription(cd);
-				Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".removed " + cd + " from factory"); //$NON-NLS-1$ //$NON-NLS-2$
-			} catch (final Exception e) {
-				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, NLS.bind(Messages.ECFPlugin_Container_Name_Collision_Prefix, name, extension.getExtensionPointUniqueIdentifier()), null), method, e);
-			}
-		}
-	}
-
-	/**
-	 * Add container factory extension point extensions
-	 * 
-	 * @param members
-	 *            to add
-	 */
-	protected void addContainerFactoryExtensions(IConfigurationElement[] members) {
-		final String method = "addContainerFactoryExtensions"; //$NON-NLS-1$
-		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
-		// For each configuration element
-		for (int m = 0; m < members.length; m++) {
-			final IConfigurationElement member = members[m];
-			// Get the label of the extender plugin and the ID of the extension.
-			final IExtension extension = member.getDeclaringExtension();
-			Object exten = null;
-			String name = null;
-			try {
-				// The only required attribute is "class"
-				exten = member.createExecutableExtension(CLASS_ATTRIBUTE);
-				final String clazz = exten.getClass().getName();
-				// Get name and get version, if available
-				name = member.getAttribute(NAME_ATTRIBUTE);
-				if (name == null) {
-					name = clazz;
-				}
-				// Get description, if present
-				String description = member.getAttribute(DESCRIPTION_ATTRIBUTE);
-				if (description == null) {
-					description = ""; //$NON-NLS-1$
-				}
-
-				String s = member.getAttribute(SERVER_ATTRIBUTE);
-				final boolean server = (s == null) ? false : Boolean.valueOf(s).booleanValue();
-				s = member.getAttribute(HIDDEN_ATTRIBUTE);
-				final boolean hidden = (s == null) ? false : Boolean.valueOf(s).booleanValue();
-
-				// Now make description instance
-				final ContainerTypeDescription scd = new ContainerTypeDescription(name, (IContainerInstantiator) exten, description, server, hidden);
-
-				final IContainerFactory factory = ContainerFactory.getDefault();
-
-				if (factory.containsDescription(scd)) {
-					throw new CoreException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, NLS.bind(Messages.ECFPlugin_Container_Name_Collision_Prefix, name, extension.getExtensionPointUniqueIdentifier()), null));
-				}
-				// Now add the description and we're ready to go.
-				factory.addDescription(scd);
-				Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".added " + scd + " to factory " + factory); //$NON-NLS-1$ //$NON-NLS-2$
-			} catch (final CoreException e) {
-				logException(e.getStatus(), method, e);
-			} catch (final Exception e) {
-				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, NLS.bind(Messages.ECFPlugin_Container_Name_Collision_Prefix, name, extension.getExtensionPointUniqueIdentifier()), null), method, e);
-			}
-		}
-	}
-
-	/**
-	 * Setup container factory extension point
-	 * 
-	 * @param bc
-	 *            the BundleContext for this bundle
-	 */
-	protected void setupContainerFactoryExtensionPoint(BundleContext bc) {
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null) {
-			final IExtensionPoint extensionPoint = reg.getExtensionPoint(CONTAINER_FACTORY_EPOINT);
-			if (extensionPoint == null) {
-				return;
-			}
-			addContainerFactoryExtensions(extensionPoint.getConfigurationElements());
-		}
-	}
-
-	public IExtensionRegistry getExtensionRegistry() {
-		return (IExtensionRegistry) extensionRegistryTracker.getService();
-	}
-
-	/**
-	 * Setup start extension point
-	 * 
-	 * @param bc
-	 *            the BundleContext fro this bundle
-	 */
-	protected void setupStartExtensionPoint(BundleContext bc) {
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null) {
-			final IExtensionPoint extensionPoint = reg.getExtensionPoint(START_EPOINT);
-			if (extensionPoint == null) {
-				return;
-			}
-			runStartExtensions(extensionPoint.getConfigurationElements());
-		}
-	}
-
-	protected void runStartExtensions(IConfigurationElement[] configurationElements) {
-		final String method = "runStartExtensions"; //$NON-NLS-1$
-		// For each configuration element
-		for (int m = 0; m < configurationElements.length; m++) {
-			final IConfigurationElement member = configurationElements[m];
-			try {
-				// The only required attribute is "class"
-				boolean sync = (member.getAttribute(ASYNCH_ATTRIBUTE) == null);
-				IECFStart clazz = (IECFStart) member.createExecutableExtension(CLASS_ATTRIBUTE);
-				startExtension(clazz.getClass().getName(), clazz, sync);
-			} catch (final CoreException e) {
-				logException(e.getStatus(), method, e);
-			} catch (final Exception e) {
-				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "Unknown start exception", e), method, e); //$NON-NLS-1$
-			}
-		}
-	}
-
-	private void startExtension(String name, IECFStart exten, boolean synchronous) {
-		// Create job to do start, and schedule
-		if (synchronous) {
-			IStatus result = null;
-			try {
-				result = exten.run(new NullProgressMonitor());
-			} catch (final Throwable e) {
-				final String message = "startup extension error"; //$NON-NLS-1$
-				logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, e), message, e);
-			}
-			if (result != null && !result.isOK())
-				logException(result, result.getMessage(), result.getException());
-		} else {
-			final ECFStartJob job = new ECFStartJob(name, exten);
-			job.schedule();
-		}
-	}
-
-	/**
-	 * This method is called upon plug-in activation
-	 */
-	public void start(BundleContext ctxt) throws Exception {
-		plugin = this;
-		this.context = ctxt;
-
-		// initialize the default ssl socket factory 
-		try {
-			Class ecfSocketFactoryClass = Class.forName("org.eclipse.ecf.internal.ssl.ECFTrustManager"); //$NON-NLS-1$
-			ecfTrustManager = (BundleActivator) ecfSocketFactoryClass.newInstance();
-			ecfTrustManager.start(ctxt);
-		} catch (ClassNotFoundException e) {
-			// will occur if fragment is not installed or not on proper execution environment
-		} catch (Throwable t) {
-			log(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), "Unexpected Error in ECFPlugin.start", t)); //$NON-NLS-1$
-		}
-
-		this.extensionRegistryTracker = new ServiceTracker(ctxt, IExtensionRegistry.class.getName(), null);
-		this.extensionRegistryTracker.open();
-		final IExtensionRegistry registry = getExtensionRegistry();
-		if (registry != null) {
-			this.registryManager = new ECFRegistryManager();
-			registry.addRegistryChangeListener(registryManager);
-		}
-		containerFactoryServiceRegistration = ctxt.registerService(IContainerFactory.class.getName(), ContainerFactory.getDefault(), null);
-		containerManagerServiceRegistration = ctxt.registerService(IContainerManager.class.getName(), ContainerFactory.getDefault(), null);
-		setupContainerFactoryExtensionPoint(ctxt);
-		setupStartExtensionPoint(ctxt);
-	}
-
-	protected class ECFRegistryManager implements IRegistryChangeListener {
-		public void registryChanged(IRegistryChangeEvent event) {
-			final IExtensionDelta delta[] = event.getExtensionDeltas(ECFNAMESPACE, CONTAINER_FACTORY_NAME);
-			for (int i = 0; i < delta.length; i++) {
-				switch (delta[i].getKind()) {
-					case IExtensionDelta.ADDED :
-						addContainerFactoryExtensions(delta[i].getExtension().getConfigurationElements());
-						break;
-					case IExtensionDelta.REMOVED :
-						removeContainerFactoryExtensions(delta[i].getExtension().getConfigurationElements());
-						break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * This method is called when the plug-in is stopped
-	 */
-	public void stop(BundleContext ctxt) throws Exception {
-		fireDisposables();
-		this.disposables = null;
-		final IExtensionRegistry reg = getExtensionRegistry();
-		if (reg != null)
-			reg.removeRegistryChangeListener(registryManager);
-		this.registryManager = null;
-		if (ecfTrustManager != null) {
-			ecfTrustManager.stop(ctxt);
-			ecfTrustManager = null;
-		}
-		if (logServiceTracker != null) {
-			logServiceTracker.close();
-			logServiceTracker = null;
-			logService = null;
-		}
-		if (extensionRegistryTracker != null) {
-			extensionRegistryTracker.close();
-			extensionRegistryTracker = null;
-		}
-		if (containerFactoryServiceRegistration != null) {
-			containerFactoryServiceRegistration.unregister();
-			containerFactoryServiceRegistration = null;
-		}
-		if (containerManagerServiceRegistration != null) {
-			containerManagerServiceRegistration.unregister();
-			containerManagerServiceRegistration = null;
-		}
-		if (adapterManagerTracker != null) {
-			adapterManagerTracker.close();
-			adapterManagerTracker = null;
-		}
-		this.context = null;
-	}
-
-	/**
-	 * Returns the shared instance.
-	 */
-	public synchronized static ECFPlugin getDefault() {
-		if (plugin == null) {
-			plugin = new ECFPlugin();
-		}
-		return plugin;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Messages.java b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Messages.java
deleted file mode 100644
index 4bf8c57..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/Messages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Composent, Inc. - initial API and implementation
- *****************************************************************************/
-
-package org.eclipse.ecf.internal.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.core.messages"; //$NON-NLS-1$
-	public static String AbstractContainer_Exception_Callback_Handler;
-	public static String BaseContainer_EXCEPTION_CONNECT_NOT_SUPPORT;
-	public static String BaseContainer_EXCEPTION_COULD_NOT_CREATE_ID;
-	public static String BaseContainerInstantiator_EXCEPTION_CREATEINSTANCE_NOT_SUPPORTED;
-	public static String BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT;
-	public static String ContainerFactory_Base_Container_Name;
-	public static String ContainerFactory_Exception_Adapter_Not_Null;
-	public static String ContainerFactory_EXCEPTION_CONTAINER_ID_NOT_NULL;
-	public static String ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL;
-	public static String ContainerFactory_Exception_Create_Container;
-	public static String ECFPlugin_Container_Name_Collision_Prefix;
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// private null constructor
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/messages.properties b/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/messages.properties
deleted file mode 100644
index 19d3464..0000000
--- a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/messages.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################################################
-# Copyright (c) 2004, 2007 Composent, Inc. and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     Composent, Inc. - initial API and implementation
-################################################################################
-
-ContainerFactory_Base_Container_Name = ecf.base
-ContainerFactory_Exception_Create_Container = ContainerTypeDescription cannot be null
-ContainerFactory_Exception_Adapter_Not_Null = containerAdapter cannot be null
-ContainerFactory_EXCEPTION_CONTAINER_ID_NOT_NULL=container ID cannot be null
-ContainerFactory_EXCEPTION_CONTAINERID_NOT_NULL=Container ID cannot be null
-AbstractContainer_Exception_Callback_Handler = Exception in CallbackHandler.handle(<callbacks>)
-ECFPlugin_Container_Name_Collision_Prefix = ECF container factory with name {0} already found. Ignoring registration for containerFactory extension point {1}.
-BaseContainer_EXCEPTION_CONNECT_NOT_SUPPORT=Connect not supported
-BaseContainer_EXCEPTION_COULD_NOT_CREATE_ID=Could not create ID for basecontainer
-BaseContainerInstantiator_EXCEPTION_CREATEINSTANCE_NOT_SUPPORTED=createInstance not supported
-BooleanCallback_EXCEPTION_INVALID_BOOLEAN_ARGUMENT=Prompt cannot be null.
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.classpath b/eclipse/ecf-src/org.eclipse.equinox.concurrent/.classpath
deleted file mode 100644
index c2ce266..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.project b/eclipse/ecf-src/org.eclipse.equinox.concurrent/.project
deleted file mode 100644
index f985ba5..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.concurrent</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.jdt.core.prefs b/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b20e547..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Jan 23 14:28:15 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.pde.core.prefs b/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 5073147..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Jan 16 14:55:08 PST 2009
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF b/eclipse/ecf-src/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF
deleted file mode 100644
index ab6f5e4..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.concurrent
-Bundle-Version: 1.0.1.qualifier
-Bundle-Vendor: %pluginProvider
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
-Import-Package: org.eclipse.core.runtime;version="3.4.0";common=split,
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.concurrent.future;version="1.0";x-internal:="true"
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/build.properties b/eclipse/ecf-src/org.eclipse.equinox.concurrent/build.properties
deleted file mode 100644
index 52632e2..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-#################################################################################
-# Copyright (c) 2008 EclipseSource and others. All rights reserved. This
-# program and the accompanying materials are made available under the terms of
-# the Eclipse Public License v1.0 which accompanies this distribution, and is
-#
-# Contributors:
-#   EclipseSource - initial API and implementation
-#################################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.properties,\
-               about.html
-src.includes = plugin.properties,\
-               about.html,\
-               META-INF/
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/plugin.properties b/eclipse/ecf-src/org.eclipse.equinox.concurrent/plugin.properties
deleted file mode 100644
index 927e0ac..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/plugin.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#################################################################################
-# Copyright (c) 2008 EclipseSource and others. All rights reserved. This
-# program and the accompanying materials are made available under the terms of
-# the Eclipse Public License v1.0 which accompanies this distribution, and is
-#
-# Contributors:
-#   EclipseSource - initial API and implementation
-#################################################################################
-pluginName=Equinox Concurrent API
-pluginProvider=Eclipse.org - Equinox
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractExecutor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractExecutor.java
deleted file mode 100644
index c270d92..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractExecutor.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Abstract implementation of {@link IExecutor} and {@link IRunnableExecutor}.
- *
- */
-public abstract class AbstractExecutor implements IRunnableExecutor, IExecutor {
-
-	public void execute(final Runnable runnable) {
-		execute(new IProgressRunnable() {
-			public Object run(IProgressMonitor monitor) throws Exception {
-				runnable.run();
-				return null;
-			}
-		}, null);
-	}
-
-	public abstract IFuture execute(IProgressRunnable runnable, IProgressMonitor monitor);
-
-	/**
-	 * Create an {@link AbstractFuture} instance.  Subclasses must override to define 
-	 * the concrete type of future to return from  {@link #execute(IProgressRunnable, IProgressMonitor)}.
-	 * @param progressMonitor any progress monitor to provide to the future upon construction.  May be
-	 * <code>null</code>.
-	 * @return the created future
-	 */
-	protected abstract AbstractFuture createFuture(IProgressMonitor progressMonitor);
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractFuture.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractFuture.java
deleted file mode 100644
index f2d4237..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/AbstractFuture.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Abstract implementation of {@link IFuture} and {@link ISafeProgressRunner}.
- *
- */
-public abstract class AbstractFuture implements IFuture, ISafeProgressRunner {
-
-	/**
-	 * Returns <code>true</code> if this future has been previously canceled, <code>false</code>
-	 * otherwise.  Subclasses must override.
-	 * @return <code>true</code> if this future has been previously canceled, <code>false</code>
-	 * otherwise
-	 */
-	public abstract boolean isCanceled();
-
-	/**
-	 * Return a progress monitor for this future.  Subclasses must override.
-	 * @return the progress monitor for this future.
-	 */
-	public abstract IProgressMonitor getProgressMonitor();
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/FutureProgressMonitor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/FutureProgressMonitor.java
deleted file mode 100644
index c1f0f30..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/FutureProgressMonitor.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ProgressMonitorWrapper;
-
-/**
- * Progress Monitor for use with future.  This progress monitor provides a wrapper
- * for potentially two progress monitors:  one provided by the {@link IFuture} 
- * client in a method call, the other (a child progress monitor) provided by the 
- * IExecutor that creates the future instance.
- *
- */
-public class FutureProgressMonitor extends ProgressMonitorWrapper {
-
-	private IProgressMonitor monitor;
-	private Object lock = new Object();
-
-	/**
-	 * Create a new progress monitor wrappering the given monitor. The nested
-	 * monitor is the one exposed to clients of futures.
-	 * @param progressMonitor the client-facing monitor used with a future.  May be <code>null</code>.
-	 * 
-	 * @see #setChildProgressMonitor(IProgressMonitor)
-	 */
-	public FutureProgressMonitor(IProgressMonitor progressMonitor) {
-		super(progressMonitor);
-	}
-
-	public void beginTask(String name, int totalWork) {
-		super.beginTask(name, totalWork);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.beginTask(name, totalWork);
-		}
-	}
-
-	public void done() {
-		super.done();
-		synchronized (lock) {
-			monitor.done();
-			monitor = null;
-		}
-	}
-
-	public void internalWorked(double work) {
-		super.internalWorked(work);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.internalWorked(work);
-		}
-	}
-
-	public void setCanceled(boolean value) {
-		super.setCanceled(value);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.setCanceled(value);
-		}
-	}
-
-	public void setTaskName(String name) {
-		super.setTaskName(name);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.setTaskName(name);
-		}
-	}
-
-	public void subTask(String name) {
-		super.subTask(name);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.subTask(name);
-		}
-	}
-
-	public void worked(int work) {
-		super.worked(work);
-		synchronized (lock) {
-			if (monitor != null)
-				monitor.worked(work);
-		}
-	}
-
-	/**
-	 * Set the client-facing progress monitor to the given value.
-	 * 
-	 * @param value a second (child) monitor to report progress/take cancelation from.
-	 * If the parent progress monitor has been previously canceled, the child progress monitor's
-	 * setCanceled method will be called.
-	 */
-	public void setChildProgressMonitor(IProgressMonitor value) {
-		synchronized (lock) {
-			this.monitor = value;
-			if (monitor != null && isCanceled())
-				this.monitor.setCanceled(true);
-		}
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IExecutor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IExecutor.java
deleted file mode 100644
index 3d3dc68..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IExecutor.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * <p>
- * Contract for the actual execution of {@link IProgressRunnable}s.  Instances of
- * this interface must be able to provide resources to eventually execute a given
- * {@link IProgressRunnable}, upon calling {@link #execute(IProgressRunnable, IProgressMonitor)}. 
- * </p>
- * <p>
- * Note that implementations may decide what/how to execute the given IProgressRunnable (i.e.
- * via a {@link Thread}, or a Job, or a ThreadPool or some other invocation mechanism.  
- * But the intended contract of {@link #execute(IProgressRunnable, IProgressMonitor)} is that
- * the {@link IProgressRunnable#run(IProgressMonitor)} method will be invoked by
- * this executor in a timely manner <b>without</b> blocking.
- * </p>
- * 
- * @see IProgressRunnable
- * @see IFuture
- * @see #execute(IProgressRunnable, IProgressMonitor)
- */
-public interface IExecutor {
-
-	/**
-	 * <p>
-	 * Execute the given {@link IProgressRunnable} (i.e. call {@link IProgressRunnable#run(IProgressMonitor)}.
-	 * Will return a non-<code>null</code> instance of {@link IFuture} that allows
-	 * clients to inspect the state of the execution and retrieve any results via {@link IFuture#get()}
-	 * or {@link IFuture#get(long)}.
-	 * </p>
-	 * <p>
-	 * Note that implementers may decide whether to invoke {@link IProgressRunnable#run(IProgressMonitor)} 
-	 * asynchronously or synchronously, but since IProgressRunnables are frequently going to be longer-running
-	 * operations, implementers should proceed carefully before implementing with synchronous (blocking)
-	 * invocation.  Implementers should typically implement via some non-blocking asynchronous invocation 
-	 * mechanism, e.g. Threads, Jobs, ThreadPools etc.
-	 * </p>
-	 * @param runnable the {@link IProgressRunnable} to invoke.  Must not be <code>null</code>.
-	 * @param monitor any {@link IProgressMonitor} to be passed to the runnable.  May be <code>null</code>.
-	 * @return {@link IFuture} to allow for inspection of the state of the computation by clients,
-	 * as well as access to any return values of {@link IProgressRunnable#run(IProgressMonitor)}.  Will not
-	 * be <code>null</code>.
-	 */
-	IFuture execute(IProgressRunnable runnable, IProgressMonitor monitor);
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IFuture.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IFuture.java
deleted file mode 100644
index 30e6121..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IFuture.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-
-/**
- * <p>
- * A future represents the future outcome of some operation(s).
- * </p>
- * <p>
- * The expected usage of a future is as a return value from some operation 
- * that is to be executed asynchronously and then return some result.  
- * </p>
- * <p>
- * So, for example, a simple usage of an IFuture would be:
- * <pre>
- * IFuture future = foo();
- * ...
- * Object result = future.get();
- * </pre>
- * Clients generally will hold onto the future for some amount of time, and then call
- * {@link #get()} or {@link #get(long)} to retrieve the result of the operation.  They
- * may also call {@link #hasValue()} to determine whether any values have been provided
- * to the future (if <code>true</code>, meaning that subsequent calls to 
- * {@link #get()} will not block), or {@link #isDone()} to determine if <b>all</b> 
- * operations and results have been completed.
- * </p>
- * <p>
- * If {@link #hasValue()} is true, then the client may access status information
- * associated with the completed operation(s) via {@link #getStatus()}.  Until {@link #hasValue()}
- * is <code>true</code>, {@link #getStatus()} will be <code>null</code>.
- * </p>
- * 
- * @see IStatus
- * 
- */
-public interface IFuture {
-
-	/**
-	 * Cancel the operation
-	 * @return <tt>false</tt> if the operation could not be canceled,
-	 * typically because it has already completed normally;
-	 * <tt>true</tt> otherwise
-	 */
-	public boolean cancel();
-
-	/**
-	 * Waits if necessary for one or more operations to complete, and then returns result(s).
-	 * This method will block until either a) at least one result is available; or b) at 
-	 * least one operation throws an exception.
-	 * 
-	 * @return Object result of the asynchronous operation(s)
-	 * @throws InterruptedException
-	 *             if thread calling this method is interrupted.
-	 * @throws OperationCanceledException
-	 *             if the operation has been canceled via progress monitor {@link #getProgressMonitor()}.
-	 */
-	Object get() throws InterruptedException, OperationCanceledException;
-
-	/**
-	 * Waits if necessary for one or more operations to complete, and then returns result(s).
-	 * This method will block until either a) at least one result is available; or b) at 
-	 * least one operation throws an exception.
-	 * 
-	 * @param waitTimeInMillis
-	 *            the maximum time to wait in milliseconds for the operation(s) to complete.
-	 * @return Object result of the asynchronous operation(s)
-	 * @throws InterruptedException
-	 *             if thread calling this method is interrupted.
-	 * @throws TimeoutException
-	 *             if the given wait time is exceeded without getting result.
-	 * @throws OperationCanceledException
-	 *             if the operation has been canceled via progress monitor {@link #getProgressMonitor()}.
-	 */
-	Object get(long waitTimeInMillis) throws InterruptedException, TimeoutException, OperationCanceledException;
-
-	/**
-	 * <p>
-	 * Get status for operation.  Will return <code>null</code> until at least one operation(s) are
-	 * complete.
-	 * </p>
-	 * <p>
-	 * If {@link #hasValue()} returns <code>true</code>, this method will return a non-<code>null</code>
-	 * IStatus.  If {@link #hasValue()} returns <code>false</code>, this method will return <code>null</code>.
-	 * </p>
-	 * <p>
-	 * Note that the returned IStatus instance may be an IMultiStatus, meaning that multiple operations have
-	 * completed or are pending completion.
-	 * </p>
-	 * @return IStatus the status of completed operation(s).  Will return <code>null</code> if {@link #hasValue()}
-	 * returns <code>false</code>.
-	 * 
-	 * @see #hasValue()
-	 */
-	public IStatus getStatus();
-
-	/**
-	 * <p>
-	 * Returns <tt>true</tt> if <b>any</b> underlying operation(s) have completed.
-	 * </p>
-	 * <p>
-	 * If this future represents access to just one operation, then this method
-	 * and {@link #isDone()} will always return the same value.  That is, when a single
-	 * operation has a value, it is then considered done/completed and both
-	 * {@link #isDone()} and this method will return <code>true</code>.
-	 * </p>
-	 * <p>
-	 * If this future represents multiple operations, then this method will 
-	 * return <code>true</code> when <b>any</b> of the operations have 
-	 * completed.  Until the first operation is completed, it will 
-	 * return <code>false</code>.
-	 * </p>
-	 * @return <tt>true</tt> if any operations represented by this future have 
-	 * completed.
-	 */
-	boolean hasValue();
-
-	/**
-	 * <p>
-	 * Returns <tt>true</tt> if <b>all</b> underlying operation(s) have been completed.  
-	 * </p>
-	 * <p>
-	 * If this future represents access to just one operation, then this method
-	 * and {@link #hasValue()} will always return the same value.  That is, when a single
-	 * operation has a value, it is then considered done/completed and both
-	 * {@link #hasValue()} and #isDone will return <code>true</code>.
-	 * </p>
-	 * <p>
-	 * If this future represents multiple operations, then this method will only
-	 * return <code>true</code> when <b>all</b> of the operations have 
-	 * completed.  Until all operations have completed, it will return <code>false</code>.
-	 * </p>
-	 * <p>
-	 * Completion can be due to normal operation completion, an exception, or
-	 * user cancellation -- in all of these cases, this method will return
-	 * <tt>true</tt> if all underlying operation(s) have been completed.
-	 * </p>
-	 * 
-	 * @return <tt>true</tt> if all operation(s) have completed in some manner.
-	 */
-	boolean isDone();
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IProgressRunnable.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IProgressRunnable.java
deleted file mode 100644
index ba08d7d..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IProgressRunnable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Interface defining a block of code that can be run, return an Object result,
- * and throw an arbitrary Exception.
- * 
- */
-public interface IProgressRunnable {
-	/** Perform some action that returns a result or throws an exception
-	 * @param monitor the IProgressMonitor associated with this callable
-	 * @return result from the call
-	 * @throws Exception
-	 */
-	Object run(IProgressMonitor monitor) throws Exception;
-}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IRunnableExecutor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IRunnableExecutor.java
deleted file mode 100644
index dbf3a43..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/IRunnableExecutor.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-/**
- * An executor that can execute Runnables, rather than {@link IProgressRunnable}s.
- *
- * @see IExecutor#execute(IProgressRunnable, org.eclipse.core.runtime.IProgressMonitor)
- */
-public interface IRunnableExecutor {
-	void execute(Runnable runnable);
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ISafeProgressRunner.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ISafeProgressRunner.java
deleted file mode 100644
index 56c9413..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ISafeProgressRunner.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-/**
- * A runner that can execute {@link IProgressRunnable}s safely.  Running
- * an {@link IProgressRunnable} safely means not throwing any {@link Exception}
- * possibly thrown by the given {@link IProgressRunnable}.
- *
- */
-public interface ISafeProgressRunner {
-	void runWithProgress(IProgressRunnable runnable);
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ImmediateExecutor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ImmediateExecutor.java
deleted file mode 100644
index b5c936c..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ImmediateExecutor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * <p>
- * Executes {@link IProgressRunnable} instances immediately.
- * </p>
- * <p>
- * <b>NOTE</b>:  {@link #execute(IProgressRunnable, IProgressMonitor)} should be used with some
- * degree of caution with this implementation, as unlike other implementations the {@link IProgressRunnable#run(IProgressMonitor)}
- * method will be called by the thread that calls {@link #execute(IProgressRunnable, IProgressMonitor)}, meaning
- * that calling #execute(IProgressRunnable, IProgressMonitor) may block the calling thread indefinitely.
- * </p>
- * @see ThreadsExecutor
- */
-public class ImmediateExecutor extends AbstractExecutor implements IExecutor, IRunnableExecutor {
-
-	protected AbstractFuture createFuture(IProgressMonitor monitor) {
-		return new SingleOperationFuture(monitor);
-	}
-
-	public IFuture execute(IProgressRunnable runnable, IProgressMonitor monitor) {
-		Assert.isNotNull(runnable);
-		AbstractFuture sof = createFuture(monitor);
-		// Actually run the runnable immediately.  See NOTE above
-		sof.runWithProgress(runnable);
-		return sof;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationFuture.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationFuture.java
deleted file mode 100644
index 3f6a416..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/SingleOperationFuture.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.*;
-
-/**
- * <p>
- * Future implementation for a single operation.
- * </p>
- * <p>
- * Subclasses may be created if desired.  Note that if subclasses are created, that 
- * they should/must be very careful with respect to overriding the synchronized
- * methods in this class.
- * </p>
- */
-public class SingleOperationFuture extends AbstractFuture {
-	private static final String PLUGIN_ID = "org.eclipse.equinox.concurrent";
-
-	private Object resultValue = null;
-	private IStatus status = null;
-	private TimeoutException timeoutException = null;
-	protected IProgressMonitor progressMonitor;
-
-	public SingleOperationFuture() {
-		this((IProgressMonitor) null);
-	}
-
-	public SingleOperationFuture(IProgressMonitor progressMonitor) {
-		super();
-		this.progressMonitor = new FutureProgressMonitor((progressMonitor == null) ? new NullProgressMonitor() : progressMonitor);
-	}
-
-	public synchronized Object get() throws InterruptedException, OperationCanceledException {
-		throwIfCanceled();
-		while (!isDone())
-			wait();
-		throwIfCanceled();
-		return resultValue;
-	}
-
-	public synchronized Object get(long waitTimeInMillis) throws InterruptedException, TimeoutException, OperationCanceledException {
-		// If waitTime out of bounds then throw illegal argument exception
-		if (waitTimeInMillis < 0)
-			throw new IllegalArgumentException("waitTimeInMillis must be => 0"); //$NON-NLS-1$
-		// If we've been canceled then throw
-		throwIfCanceled();
-		// If we've previously experienced a timeout then throw
-		if (timeoutException != null)
-			throw timeoutException;
-		// If we're already done, then return result
-		if (isDone())
-			return resultValue;
-		// Otherwise, wait for some time, then throw if canceled during wait, return value if
-		// Compute start time and set waitTime
-		long startTime = System.currentTimeMillis();
-		long waitTime = waitTimeInMillis;
-		// we've received one during wait or throw timeout exception if too much time has elapsed
-		for (;;) {
-			wait(waitTime);
-			throwIfCanceled();
-			if (isDone())
-				return resultValue;
-			waitTime = waitTimeInMillis - (System.currentTimeMillis() - startTime);
-			if (waitTime <= 0)
-				throw createTimeoutException(waitTimeInMillis);
-		}
-	}
-
-	public synchronized boolean isDone() {
-		return (status != null);
-	}
-
-	/**
-	 * This method is not intended to be called by clients.  Rather it should only be used by {@link IExecutor}s.
-	 * 
-	 * @noreference
-	 */
-	public void runWithProgress(final IProgressRunnable runnable) {
-		Assert.isNotNull(runnable);
-		if (!isCanceled()) {
-			SafeRunner.run(new ISafeRunnable() {
-				public void handleException(Throwable exception) {
-					if (!isCanceled())
-						setException(exception);
-				}
-
-				public void run() throws Exception {
-					Object result = runnable.run(getProgressMonitor());
-					if (!isCanceled())
-						set(result);
-				}
-			});
-		}
-	}
-
-	public synchronized IStatus getStatus() {
-		return status;
-	}
-
-	public boolean hasValue() {
-		// for a single operation future, hasValue means that the single 
-		// operation has completed, and there will be no more.
-		return isDone();
-	}
-
-	public synchronized boolean cancel() {
-		if (isDone())
-			return false;
-		if (isCanceled())
-			return false;
-		setStatus(new Status(IStatus.CANCEL, PLUGIN_ID, IStatus.CANCEL, "Operation canceled", null)); //$NON-NLS-1$ //$NON-NLS-2$
-		getProgressMonitor().setCanceled(true);
-		notifyAll();
-		return true;
-	}
-
-	protected synchronized void setException(Throwable ex) {
-		setStatus(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Exception during operation", ex)); //$NON-NLS-1$ //$NON-NLS-2$
-		notifyAll();
-	}
-
-	protected synchronized void set(Object newValue) {
-		resultValue = newValue;
-		setStatus(Status.OK_STATUS);
-		notifyAll();
-	}
-
-	private synchronized void setStatus(IStatus status) {
-		this.status = status;
-	}
-
-	private TimeoutException createTimeoutException(long timeout) {
-		setStatus(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Operation timeout after " + timeout + "ms", null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		timeoutException = new TimeoutException("Single operation timeout", timeout); //$NON-NLS-1$
-		return timeoutException;
-	}
-
-	private void throwIfCanceled() throws OperationCanceledException {
-		IProgressMonitor pm = getProgressMonitor();
-		if (pm != null && pm.isCanceled()) {
-			throw new OperationCanceledException("Single operation canceled"); //$NON-NLS-1$
-		}
-	}
-
-	public synchronized IProgressMonitor getProgressMonitor() {
-		return progressMonitor;
-	}
-
-	public synchronized boolean isCanceled() {
-		return getProgressMonitor().isCanceled();
-	}
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ThreadsExecutor.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ThreadsExecutor.java
deleted file mode 100644
index 84ab74e..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/ThreadsExecutor.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * <p>
- * An executor that implements running the given{@link IProgressRunnable}s
- * via a new {@link Thread}.
- * </p>
- * <p>
- * The {@link #execute(IProgressRunnable, IProgressMonitor)} method on this class will
- * create a new Thread (with name provided as result of {@link #createThreadName(IProgressRunnable)},
- * that will run the {@link IProgressRunnable} and set the result in the future returned
- * from {@link #execute(IProgressRunnable, IProgressMonitor)}.
- * <p>
- * Subclasses may extend the behavior of this ThreadsExecutor.
- * </p>
- */
-public class ThreadsExecutor extends AbstractExecutor {
-
-	public ThreadsExecutor() {
-		// nothing
-	}
-
-	protected String createThreadName(IProgressRunnable runnable) {
-		return "ThreadsExecutor(" + runnable.toString() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	/**
-	 * Create a runnable given an {@link IProgressRunnable} and an {@link ISafeProgressRunner} to
-	 * run the runnable.
-	 * @param runner the safe progress runner to run the runnable
-	 * @param progressRunnable the runnable to run.
-	 * @return Runnable that when run will use the safe progress runner to run the progressRunnable
-	 */
-	protected Runnable createRunnable(final ISafeProgressRunner runner, final IProgressRunnable progressRunnable) {
-		return new Runnable() {
-			public void run() {
-				runner.runWithProgress(progressRunnable);
-			}
-		};
-	}
-
-	/**
-	 * Configure the given thread prior to starting it.  Subclasses may override as
-	 * appropriate to configure the given thread appropriately.  The default implementation
-	 * calls {@link Thread#setDaemon(boolean)}.
-	 * 
-	 * @param thread the thread to configure
-	 */
-	protected void configureThreadForExecution(Thread thread) {
-		// By default, we'll make the thread a daemon thread
-		thread.setDaemon(true);
-	}
-
-	/**
-	 * Create an {@link AbstractFuture} with the given IProgressMonitor.
-	 * @param monitor a progress monitor to associate with the future.  May be <code>null</code>.
-	 */
-	protected AbstractFuture createFuture(IProgressMonitor monitor) {
-		return new SingleOperationFuture(monitor);
-	}
-
-	public synchronized IFuture execute(IProgressRunnable runnable, IProgressMonitor monitor) throws IllegalThreadStateException {
-		Assert.isNotNull(runnable);
-		// Now create future
-		AbstractFuture sof = createFuture(monitor);
-		// Create the thread for this operation
-		Thread thread = new Thread(createRunnable(sof, runnable), createThreadName(runnable));
-		configureThreadForExecution(thread);
-		// start thread
-		thread.start();
-		return sof;
-	}
-
-}
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/TimeoutException.java b/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/TimeoutException.java
deleted file mode 100644
index dfc772a..0000000
--- a/eclipse/ecf-src/org.eclipse.equinox.concurrent/src/org/eclipse/equinox/concurrent/future/TimeoutException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.concurrent.future;
-
-/**
- * Timeout exception thrown when timeout occurs
- */
-public class TimeoutException extends Exception {
-
-	private static final long serialVersionUID = -3198307514925924297L;
-
-	private final long duration;
-
-	public TimeoutException(long time) {
-		duration = time;
-	}
-
-	public TimeoutException(String message, long time) {
-		super(message);
-		this.duration = time;
-	}
-
-	/**
-	 * Return the timeout duration.
-	 * @return long the timeout duration that caused this timeout exception.
-	 */
-	public long getDuration() {
-		return duration;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/featureVersions.properties b/eclipse/featureVersions.properties
index b8e1b39..9e7778f 100644
--- a/eclipse/featureVersions.properties
+++ b/eclipse/featureVersions.properties
@@ -1,30 +1,35 @@
-#Mon Mar 08 13:09:12 EST 2010
-org.eclipse.equinox.compendium.sdk,0.0.0=R35x_v20100105
-org.eclipse.equinox.p2.director.feature,0.0.0=R35x_v20090811
-org.eclipse.platform,0.0.0=R35x_v20100210-0800
-master-equinox,0.0.0=v20090413
-org.eclipse.rcp,0.0.0=R35x_v20100119
-org.eclipse.equinox.p2.sdk,0.0.0=R35x_v20090811
+#Tue Mar 08 14:12:31 EST 2011
+org.eclipse.equinox.compendium.sdk,0.0.0=R36x_v20101014
+org.eclipse.equinox.weaving.sdk,0.0.0=v20100421
+org.eclipse.platform,0.0.0=r362_v20110210
+master-equinox,0.0.0=r362_v20101118
+org.eclipse.rcp,0.0.0=r362_v20101104
+org.eclipse.equinox.p2.sdk,0.0.0=R36x_v20110120
 com.ibm.icu.base,0.0.0=v20090119
-master,0.0.0=v20090425
-org.eclipse.cvs,0.0.0=R35x_v20100125
-org.eclipse.releng.tools,0.0.0=v20090520
-org.eclipse.equinox.core.sdk,0.0.0=R35x_v20100105
-org.eclipse.equinox.p2.user.ui,0.0.0=R35x_v20091106
-org.eclipse.sdk,0.0.0=R35x_v20100119
-master-jetty,0.0.0=v20090305
-org.eclipse.equinox.p2.agent.feature,0.0.0=R35x_v20090811
-org.eclipse.jdt,0.0.0=r352_v20100108
+master,0.0.0=v20091019
+org.eclipse.cvs,0.0.0=r362_v20101111
+org.eclipse.equinox.server.simple,0.0.0=v20100510
+org.eclipse.equinox.server.core,0.0.0=R36x_v20101007
+org.eclipse.releng.tools,0.0.0=v20100427
+org.eclipse.equinox.p2.discovery.feature,0.0.0=R36x_v20110210
+org.eclipse.equinox.core.sdk,0.0.0=r36x_v20110210
+org.eclipse.equinox.p2.user.ui,0.0.0=r361_v20100903
+org.eclipse.equinox.server.p2,0.0.0=R36x_v20101007
+org.eclipse.sdk,0.0.0=r362_v20100929
+master-equinox-weaving,0.0.0=v20090817
+master-jetty,0.0.0=r362_v20101014
+org.eclipse.jdt,0.0.0=r362_v20101117-0800
 org.eclipse.equinox.jmx.server.feature,0.0.0=v20081124
-org.eclipse.equinox.p2.generator.feature,0.0.0=R35x_v20090811
+org.eclipse.equinox.server.servletbridge,0.0.0=v20100510
 master-ecf,0.0.0=v20090316
 org.eclipse.equinox.jmx.client.feature,0.0.0=v20081124
-org.eclipse.sdk.examples,0.0.0=v20080717
+org.eclipse.sdk.examples,0.0.0=r362_v20101014
 org.eclipse.equinox.jmx.common.feature,0.0.0=v20070507
-org.eclipse.equinox.sdk,0.0.0=r352_v20100209
-org.eclipse.pde.api.tools.ee.fragments,0.0.0=v20090512
-org.eclipse.pde,0.0.0=R35x_v20100119
-org.eclipse.equinox.serverside.sdk,0.0.0=v20090505
-org.eclipse.equinox.executable,0.0.0=R35x_v20091211
-org.eclipse.help,0.0.0=R35x_v20100119
-master-equinox-p2,0.0.0=v20080506
+org.eclipse.equinox.sdk,0.0.0=r362_v20110210b
+org.eclipse.pde.api.tools.ee.fragments,0.0.0=v20100427
+org.eclipse.equinox.serverside.sdk,0.0.0=R36x_v20101014
+org.eclipse.pde,0.0.0=r362_v20110203
+org.eclipse.equinox.server.jetty,0.0.0=v20100510
+org.eclipse.equinox.executable,0.0.0=R36x_v20110125
+org.eclipse.help,0.0.0=r362_v20101111
+master-equinox-p2,0.0.0=v20091106
diff --git a/eclipse/features/master-equinox-p2/feature.xml b/eclipse/features/master-equinox-p2/feature.xml
index 4550490..d407bd4 100644
--- a/eclipse/features/master-equinox-p2/feature.xml
+++ b/eclipse/features/master-equinox-p2/feature.xml
@@ -3,19 +3,7 @@
       id="master-equinox-p2"
       label="build utility feature for equinox p2 plugins"
       version="1.0.0.qualifier">
-
-   <includes
-         id="org.eclipse.equinox.p2.agent.feature"
-         version="0.0.0"/>
-
-   <includes
-         id="org.eclipse.equinox.p2.generator.feature"
-         version="0.0.0"/>
-
-   <includes
-         id="org.eclipse.equinox.p2.director.feature"
-         version="0.0.0"/>
-
+  
    <plugin
          id="org.eclipse.equinox.p2.installer"
          download-size="0"
diff --git a/eclipse/features/master-ecf/.project b/eclipse/features/master-equinox-weaving/.project
similarity index 100%
copy from eclipse/features/master-ecf/.project
copy to eclipse/features/master-equinox-weaving/.project
diff --git a/eclipse/features/master-ecf/build.properties b/eclipse/features/master-equinox-weaving/build.properties
similarity index 100%
copy from eclipse/features/master-ecf/build.properties
copy to eclipse/features/master-equinox-weaving/build.properties
diff --git a/eclipse/features/master-equinox-weaving/feature.xml b/eclipse/features/master-equinox-weaving/feature.xml
new file mode 100644
index 0000000..160ed04
--- /dev/null
+++ b/eclipse/features/master-equinox-weaving/feature.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="master-equinox-weaving"
+      label="build utility feature for bundles required to compile equinox weaving bundles"
+      version="1.0.0.qualifier">
+
+  <plugin
+         id="org.aspectj.weaver"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>        
+         
+  <plugin
+         id="org.aspectj.runtime"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+</feature>
diff --git a/eclipse/features/master-equinox/build.properties b/eclipse/features/master-equinox/build.properties
index 326dc76..62626c8 100644
--- a/eclipse/features/master-equinox/build.properties
+++ b/eclipse/features/master-equinox/build.properties
@@ -15,5 +15,5 @@ generate.feature at org.eclipse.equinox.source=org.eclipse.equinox,\
   plugin at org.apache.commons.el.source;version=1.0.0.qualifier;unpack="false",\
   plugin at javax.servlet.source;version=2.5.0.qualifier;unpack="false",\
   plugin at org.apache.commons.logging.source;version=1.0.4.qualifier;unpack="false",\
-  plugin at org.mortbay.jetty.util.source;version=6.1.15.qualifier;unpack="false",\
-  plugin at org.mortbay.jetty.server.source;version=6.1.15.qualifier;unpack="false"
+  plugin at org.mortbay.jetty.util.source;version=6.1.23.qualifier;unpack="false",\
+  plugin at org.mortbay.jetty.server.source;version=6.1.23.qualifier;unpack="false"
diff --git a/eclipse/features/master-equinox/feature.xml b/eclipse/features/master-equinox/feature.xml
index ff7ccf1..f1fd3b9 100644
--- a/eclipse/features/master-equinox/feature.xml
+++ b/eclipse/features/master-equinox/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="master-equinox"
       label="build utility feature for equinox plugins"
-      version="1.1.0.qualifier">
+      version="1.1.1.qualifier">
 
    <includes
          id="org.eclipse.equinox.sdk"
@@ -131,5 +131,14 @@
          
  <includes
          id="master-equinox-p2"
-         version="0.0.0"/>           
+         version="0.0.0"/>        
+         
+ <includes
+         id="master-equinox-weaving"
+         version="0.0.0"/>
+         
+ <includes
+         id="org.eclipse.equinox.weaving.sdk"
+         version="0.0.0"/>    
+                  
 </feature>
diff --git a/eclipse/features/master-jetty/feature.xml b/eclipse/features/master-jetty/feature.xml
index a23c475..7151d93 100644
--- a/eclipse/features/master-jetty/feature.xml
+++ b/eclipse/features/master-jetty/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="master-jetty"
       label="build utility feature for equinox http jetty plugins"
-      version="1.0.0.qualifier">
+      version="1.0.1.qualifier">
 
    <plugin
          id="org.eclipse.osgi"
diff --git a/eclipse/features/master/feature.xml b/eclipse/features/master/feature.xml
index ea55016..5cad475 100644
--- a/eclipse/features/master/feature.xml
+++ b/eclipse/features/master/feature.xml
@@ -37,13 +37,7 @@
          
     <includes
          id="org.eclipse.equinox.executable"
-         version="0.0.0"/>
-
-   <plugin
-         id="org.eclipse.swt.tools"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"/>
+         version="0.0.0"/>  
          
   <plugin
          id="com.ibm.icu.source"
diff --git a/eclipse/features/org.eclipse.cvs/feature.properties b/eclipse/features/org.eclipse.cvs/feature.properties
index 97b28db..871667c 100644
--- a/eclipse/features/org.eclipse.cvs/feature.properties
+++ b/eclipse/features/org.eclipse.cvs/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -23,6 +23,9 @@ providerName=Eclipse.org
 # "updateSiteName" property - label for the update site
 updateSiteName=The Eclipse Project Updates
 
+# "secondarySiteName" property - label for the secondary update site
+secondaryUpdateSiteName=Helios Discovery Site
+
 # "description" property - description of the feature
 description=Eclipse CVS Client. (Binary runtime and user documentation.)
 
@@ -45,8 +48,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +57,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +97,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.cvs/feature.xml b/eclipse/features/org.eclipse.cvs/feature.xml
index c2f7702..41353a0 100644
--- a/eclipse/features/org.eclipse.cvs/feature.xml
+++ b/eclipse/features/org.eclipse.cvs/feature.xml
@@ -2,29 +2,29 @@
 <feature
       id="org.eclipse.cvs"
       label="%featureName"
-      version="1.1.101.qualifier"
+      version="1.2.1.qualifier"
       provider-name="%providerName">
 
    <description>
       %description
    </description>
-   
+
    <copyright>
       %copyright
-   </copyright>   
+   </copyright>
 
    <license url="%licenseURL">
       %license
    </license>
 
    <url>
-      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/galileo"/>
+      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/helios"/>
    </url>
 
    <requires>
-      <import feature="org.eclipse.platform" version="3.3.0" match="compatible"/>
+      <import feature="org.eclipse.platform" version="3.6.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
@@ -42,13 +42,6 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.team.cvs.ssh"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.team.cvs.ssh2"
          download-size="0"
          install-size="0"
diff --git a/eclipse/features/org.eclipse.cvs/license.html b/eclipse/features/org.eclipse.cvs/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.cvs/license.html
+++ b/eclipse/features/org.eclipse.cvs/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.cvs/rootfiles/notice.html b/eclipse/features/org.eclipse.cvs/rootfiles/notice.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.cvs/rootfiles/notice.html
+++ b/eclipse/features/org.eclipse.cvs/rootfiles/notice.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/feature.properties
index b819d24..b7a1aec 100644
--- a/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.cvs/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.properties
index dde5410..9be70e8 100644
--- a/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.properties
@@ -48,8 +48,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -57,42 +57,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -101,47 +97,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.xml
index 8089b54..54ee035 100644
--- a/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.compendium.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.compendium.sdk"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/eclipse/features/org.eclipse.equinox.compendium.sdk/license.html b/eclipse/features/org.eclipse.equinox.compendium.sdk/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.equinox.compendium.sdk/license.html
+++ b/eclipse/features/org.eclipse.equinox.compendium.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.core.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.core.sdk/feature.properties
index c5f54aa..f9c9561 100644
--- a/eclipse/features/org.eclipse.equinox.core.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.core.sdk/feature.properties
@@ -49,8 +49,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -58,42 +58,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -102,47 +98,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.core.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.core.sdk/feature.xml
index 1695458..c0e9d25 100644
--- a/eclipse/features/org.eclipse.equinox.core.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.core.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.core.sdk"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.1.qualifier"
       provider-name="%providerName">
 
    <description>
diff --git a/eclipse/features/org.eclipse.equinox.core.sdk/license.html b/eclipse/features/org.eclipse.equinox.core.sdk/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.equinox.core.sdk/license.html
+++ b/eclipse/features/org.eclipse.equinox.core.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.executable/.cproject b/eclipse/features/org.eclipse.equinox.executable/.cproject
index 37c3bb2..214395b 100644
--- a/eclipse/features/org.eclipse.equinox.executable/.cproject
+++ b/eclipse/features/org.eclipse.equinox.executable/.cproject
@@ -1,131 +1,137 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="converted.config.1797282818">
-<storageModule moduleId="scannerConfiguration">
-<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="true" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="true"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="makefileGenerator">
-<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
-<buildOutputProvider>
-<openAction enabled="false" filePath=""/>
-<parser enabled="true"/>
-</buildOutputProvider>
-<scannerInfoProvider id="specsFile">
-<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
-<parser enabled="false"/>
-</scannerInfoProvider>
-</profile>
-</storageModule>
-<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1797282818" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.MachO" point="org.eclipse.cdt.core.BinaryParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
-<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
-<buildTargets>
-<target name="all" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_macosx.mak</buildArguments>
-<buildTarget>all</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="clean" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_macosx.mak</buildArguments>
-<buildTarget>clean</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="all-mingw" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_mingw.mak JAVA_HOME=C:/Dev/Java/IBM_1.5.0</buildArguments>
-<buildTarget>all</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="clean" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_mingw.mak</buildArguments>
-<buildTarget>clean</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="linux-all" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak JAVA_HOME=/usr/java/1.5 DEFAULT_WS=motif MOTIF_HOME=/eclipse/motif21</buildArguments>
-<buildTarget>all</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="clean" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak</buildArguments>
-<buildTarget>clean</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="linux-all" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak</buildArguments>
-<buildTarget>all</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-<target name="clean" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
-<buildCommand>make</buildCommand>
-<buildArguments>-f make_linux.mak</buildArguments>
-<buildTarget>clean</buildTarget>
-<stopOnError>false</stopOnError>
-<useDefaultCommand>false</useDefaultCommand>
-</target>
-</buildTargets>
-</storageModule>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
-<storageModule moduleId="org.eclipse.cdt.core.pathentry">
-<pathentry include="/usr/X11R6/include" kind="inc" path="" system="true"/>
-<pathentry include="/opt/gnome/include/gtk-2.0" kind="inc" path="" system="true"/>
-<pathentry include="/opt/gnome/include/glib-2.0" kind="inc" path="" system="true"/>
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</storageModule>
-</cconfiguration>
-</storageModule>
-</cproject>
+<?xml version="1.0" encoding="UTF-8"?><?fileVersion 4.0.0?><cproject>
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="converted.config.1797282818">
+			<storageModule moduleId="scannerConfiguration">
+				<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+				<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="true" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+						<parser enabled="true"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+					<buildOutputProvider>
+						<openAction enabled="false" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="makefileGenerator">
+						<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+						<parser enabled="false"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="false" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+						<parser enabled="false"/>
+					</scannerInfoProvider>
+				</profile>
+				<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+					<buildOutputProvider>
+						<openAction enabled="false" filePath=""/>
+						<parser enabled="true"/>
+					</buildOutputProvider>
+					<scannerInfoProvider id="specsFile">
+						<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+						<parser enabled="false"/>
+					</scannerInfoProvider>
+				</profile>
+			</storageModule>
+			<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1797282818" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.MachO" point="org.eclipse.cdt.core.BinaryParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+			<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+			<storageModule moduleId="org.eclipse.cdt.core.pathentry">
+				<pathentry kind="mac" name="JNIEXPORT" path="" value=""/>
+				<pathentry include="/usr/X11R6/include" kind="inc" path="" system="true"/>
+				<pathentry include="/opt/gnome/include/gtk-2.0" kind="inc" path="" system="true"/>
+				<pathentry include="/opt/gnome/include/glib-2.0" kind="inc" path="" system="true"/>
+				<pathentry kind="src" path=""/>
+				<pathentry kind="out" path=""/>
+				<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+				<buildTargets>
+					<target name="linux-all" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_linux.mak DEFAULT_OS_ARCH=x86_64 JAVA_HOME=/usr/java/ibm-150</buildArguments>
+						<buildTarget>all</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="clean" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_linux.mak</buildArguments>
+						<buildTarget>clean</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="all" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_macosx.mak</buildArguments>
+						<buildTarget>all</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="clean" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_macosx.mak</buildArguments>
+						<buildTarget>clean</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="all-mingw" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_mingw.mak JAVA_HOME=C:/Dev/Java/IBM-1.6.0-20090519-SR5</buildArguments>
+						<buildTarget>all</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="clean" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_mingw.mak</buildArguments>
+						<buildTarget>clean</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="linux-all" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_linux.mak JAVA_HOME=/usr/java/1.5 DEFAULT_WS=motif MOTIF_HOME=/eclipse/motif21</buildArguments>
+						<buildTarget>all</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+					<target name="clean" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder">
+						<buildCommand>make</buildCommand>
+						<buildArguments>-f make_linux.mak</buildArguments>
+						<buildTarget>clean</buildTarget>
+						<stopOnError>false</stopOnError>
+						<useDefaultCommand>false</useDefaultCommand>
+						<runAllBuilders>true</runAllBuilders>
+					</target>
+				</buildTargets>
+			</storageModule>
+		</cconfiguration>
+	</storageModule>
+</cproject>
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.equinox.executable/.project b/eclipse/features/org.eclipse.equinox.executable/.project
index adabd60..e9419d7 100644
--- a/eclipse/features/org.eclipse.equinox.executable/.project
+++ b/eclipse/features/org.eclipse.equinox.executable/.project
@@ -59,7 +59,7 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.environment</key>
-					<value>MOTIF_HOME=/usr/X11|X11_HOME=/usr/X11R6|DEFAULT_OS_ARCH=${system_property:osgi.arch}|DEFAULT_WS=${system_property:osgi.ws}|DEFAULT_OS=${system_property:osgi.os}|</value>
+					<value>DEFAULT_WS=${system_property:osgi.ws}|DEFAULT_OS=${system_property:osgi.os}|DEFAULT_OS_ARCH=${system_property:osgi.arch}|X11_HOME=/usr/X11R6|PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig:/opt/gnome/share/pkgconfig|MOTIF_HOME=/usr/X11|</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
diff --git a/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.core.prefs b/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.core.prefs
index 5fef304..06ad8fe 100644
--- a/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.core.prefs
+++ b/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.core.prefs
@@ -1,4 +1,154 @@
-#Sat Mar 17 13:50:53 EDT 2007
-eclipse.preferences.version=1
+#Thu Feb 04 13:33:58 EST 2010
+org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
+org.eclipse.cdt.core.formatter.continuation_indentation=2
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=insert
+org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
+org.eclipse.cdt.core.formatter.tabulation.size=4
+org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=false
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.cdt.core.formatter.tabulation.char=tab
+org.eclipse.cdt.core.formatter.lineSplit=800
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=16
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
+org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
+org.eclipse.cdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
+org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.cdt.core.formatter.alignment_for_compact_if=0
+org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.indent_empty_lines=false
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=16
+org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=true
+org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
+org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
 indexer/indexerId=org.eclipse.cdt.core.fastIndexer
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
+org.eclipse.cdt.core.formatter.indentation.size=4
+org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false
+org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+eclipse.preferences.version=1
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.cdt.core.formatter.compact_else_if=true
+org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
+org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=end_of_line
+org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
 indexerId=org.eclipse.cdt.core.fastIndexer
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
+org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
+org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
+org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
diff --git a/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.ui.prefs b/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.ui.prefs
new file mode 100644
index 0000000..05a38d4
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.executable/.settings/org.eclipse.cdt.ui.prefs
@@ -0,0 +1,4 @@
+#Thu Feb 04 13:33:58 EST 2010
+formatter_settings_version=1
+eclipse.preferences.version=1
+formatter_profile=_Equinox
diff --git a/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/ppc/Eclipse.app/Contents/Info.plist b/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/ppc/Eclipse.app/Contents/Info.plist
index 99e7358..ca325a6 100644
--- a/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/ppc/Eclipse.app/Contents/Info.plist
+++ b/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/ppc/Eclipse.app/Contents/Info.plist
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-
-<dict>
-	<key>CFBundleExecutable</key>
-		<string>eclipse</string>
-	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.5 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string>
-	<key>CFBundleIconFile</key>
-		<string>Eclipse.icns</string>
-	<key>CFBundleIdentifier</key>
-		<string>org.eclipse.eclipse</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-		<string>6.0</string>
-	<key>CFBundleName</key>
-		<string>Eclipse</string>
-	<key>CFBundlePackageType</key>
-		<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-		<string>3.5</string>
-	<key>CFBundleSignature</key>
-		<string>????</string>
-	<key>CFBundleVersion</key>
-		<string>3.5</string>
-	<key>CFBundleDevelopmentRegion</key>
-		<string>English</string>
-	<key>CFBundleLocalizations</key>
-		<array>
-			<string>ar</string>
-			<string>cs</string>
-			<string>da</string>
-			<string>el</string>
-			<string>en</string>
-			<string>es</string>
-			<string>de</string>
-			<string>fi</string>
-			<string>fr</string>
-			<string>hu</string>
-			<string>it</string>
-			<string>iw</string>
-			<string>ja</string>
-			<string>ko</string>
-			<string>nl</string>
-			<string>no</string>
-			<string>pl</string>
-			<string>pt_BR</string>
-			<string>pt</string>
-			<string>ru</string>
-			<string>sv</string>
-			<string>tr</string>
-			<string>zh_HK</string>
-			<string>zh_TW</string>
-			<string>zh</string>
-		</array>
-		
-	<key>Eclipse</key>
-		<array>
-			<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
-				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
-				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
-			-->
-			<string>-keyring</string><string>~/.eclipse_keyring</string>
-			<string>-showlocation</string>
-			<!-- WARNING:
-				If you try to add a single VM argument (-vmargs) here,
-				*all* vmargs specified in eclipse.ini will be ignored.
-				We recommend to add all arguments in eclipse.ini
-			 -->
-		</array>
-</dict>
-
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+
+<dict>
+	<key>CFBundleExecutable</key>
+		<string>eclipse</string>
+	<key>CFBundleGetInfoString</key>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
+	<key>CFBundleIconFile</key>
+		<string>Eclipse.icns</string>
+	<key>CFBundleIdentifier</key>
+		<string>org.eclipse.eclipse</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+	<key>CFBundleName</key>
+		<string>Eclipse</string>
+	<key>CFBundlePackageType</key>
+		<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+		<string>3.6</string>
+	<key>CFBundleSignature</key>
+		<string>????</string>
+	<key>CFBundleVersion</key>
+		<string>3.6</string>
+	<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+	<key>CFBundleLocalizations</key>
+		<array>
+			<string>ar</string>
+			<string>cs</string>
+			<string>da</string>
+			<string>el</string>
+			<string>en</string>
+			<string>es</string>
+			<string>de</string>
+			<string>fi</string>
+			<string>fr</string>
+			<string>hu</string>
+			<string>it</string>
+			<string>iw</string>
+			<string>ja</string>
+			<string>ko</string>
+			<string>nl</string>
+			<string>no</string>
+			<string>pl</string>
+			<string>pt_BR</string>
+			<string>pt</string>
+			<string>ru</string>
+			<string>sv</string>
+			<string>tr</string>
+			<string>zh_HK</string>
+			<string>zh_TW</string>
+			<string>zh</string>
+		</array>
+		
+	<key>Eclipse</key>
+		<array>
+			<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
+				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
+				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
+			-->
+			<string>-keyring</string><string>~/.eclipse_keyring</string>
+			<string>-showlocation</string>
+			<!-- WARNING:
+				If you try to add a single VM argument (-vmargs) here,
+				*all* vmargs specified in eclipse.ini will be ignored.
+				We recommend to add all arguments in eclipse.ini
+			 -->
+		</array>
+</dict>
+
+</plist>
diff --git a/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/x86/Eclipse.app/Contents/Info.plist b/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/x86/Eclipse.app/Contents/Info.plist
index 40da89c..3f47b4b 100644
--- a/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/x86/Eclipse.app/Contents/Info.plist
+++ b/eclipse/features/org.eclipse.equinox.executable/bin/carbon/macosx/x86/Eclipse.app/Contents/Info.plist
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-
-<dict>
-	<key>CFBundleExecutable</key>
-		<string>eclipse</string>
-	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.5 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string>
-	<key>CFBundleIconFile</key>
-		<string>Eclipse.icns</string>
-	<key>CFBundleIdentifier</key>
-		<string>org.eclipse.eclipse</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-		<string>6.0</string>
-	<key>CFBundleName</key>
-		<string>Eclipse</string>
-	<key>CFBundlePackageType</key>
-		<string>APPL</string>
-	<key>CFBundleShortVersionString</key>
-		<string>3.5</string>
-	<key>CFBundleSignature</key>
-		<string>????</string>
-	<key>CFBundleVersion</key>
-		<string>3.5</string>
-	<key>CFBundleDevelopmentRegion</key>
-		<string>English</string>
-	<key>CFBundleLocalizations</key>
-		<array>
-			<string>ar</string>
-			<string>cs</string>
-			<string>da</string>
-			<string>el</string>
-			<string>en</string>
-			<string>es</string>
-			<string>de</string>
-			<string>fi</string>
-			<string>fr</string>
-			<string>hu</string>
-			<string>it</string>
-			<string>iw</string>
-			<string>ja</string>
-			<string>ko</string>
-			<string>nl</string>
-			<string>no</string>
-			<string>pl</string>
-			<string>pt_BR</string>
-			<string>pt</string>
-			<string>ru</string>
-			<string>sv</string>
-			<string>tr</string>
-			<string>zh_HK</string>
-			<string>zh_TW</string>
-			<string>zh</string>
-		</array>
-
-	<key>Eclipse</key>
-		<array>
-			<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
-				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
-				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
-			-->
-			<string>-keyring</string><string>~/.eclipse_keyring</string>
-			<string>-showlocation</string>
-			<!-- WARNING:
-				If you try to add a single VM argument (-vmargs) here,
-				*all* vmargs specified in eclipse.ini will be ignored.
-				We recommend to add all arguments in eclipse.ini
-			 -->
-		</array>
-</dict>
-
-</plist>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+
+<dict>
+	<key>CFBundleExecutable</key>
+		<string>eclipse</string>
+	<key>CFBundleGetInfoString</key>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
+	<key>CFBundleIconFile</key>
+		<string>Eclipse.icns</string>
+	<key>CFBundleIdentifier</key>
+		<string>org.eclipse.eclipse</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+	<key>CFBundleName</key>
+		<string>Eclipse</string>
+	<key>CFBundlePackageType</key>
+		<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+		<string>3.6</string>
+	<key>CFBundleSignature</key>
+		<string>????</string>
+	<key>CFBundleVersion</key>
+		<string>3.6</string>
+	<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+	<key>CFBundleLocalizations</key>
+		<array>
+			<string>ar</string>
+			<string>cs</string>
+			<string>da</string>
+			<string>el</string>
+			<string>en</string>
+			<string>es</string>
+			<string>de</string>
+			<string>fi</string>
+			<string>fr</string>
+			<string>hu</string>
+			<string>it</string>
+			<string>iw</string>
+			<string>ja</string>
+			<string>ko</string>
+			<string>nl</string>
+			<string>no</string>
+			<string>pl</string>
+			<string>pt_BR</string>
+			<string>pt</string>
+			<string>ru</string>
+			<string>sv</string>
+			<string>tr</string>
+			<string>zh_HK</string>
+			<string>zh_TW</string>
+			<string>zh</string>
+		</array>
+
+	<key>Eclipse</key>
+		<array>
+			<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
+				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
+				<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
+			-->
+			<string>-keyring</string><string>~/.eclipse_keyring</string>
+			<string>-showlocation</string>
+			<!-- WARNING:
+				If you try to add a single VM argument (-vmargs) here,
+				*all* vmargs specified in eclipse.ini will be ignored.
+				We recommend to add all arguments in eclipse.ini
+			 -->
+		</array>
+</dict>
+
+</plist>
diff --git a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist
index ef79e22..ca325a6 100644
--- a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist
+++ b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist
@@ -6,7 +6,7 @@
 	<key>CFBundleExecutable</key>
 		<string>eclipse</string>
 	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.5 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
 	<key>CFBundleIconFile</key>
 		<string>Eclipse.icns</string>
 	<key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleSignature</key>
 		<string>????</string>
 	<key>CFBundleVersion</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleDevelopmentRegion</key>
 		<string>English</string>
 	<key>CFBundleLocalizations</key>
diff --git a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist
index ef79e22..ca325a6 100644
--- a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist
+++ b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist
@@ -6,7 +6,7 @@
 	<key>CFBundleExecutable</key>
 		<string>eclipse</string>
 	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.5 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
 	<key>CFBundleIconFile</key>
 		<string>Eclipse.icns</string>
 	<key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleSignature</key>
 		<string>????</string>
 	<key>CFBundleVersion</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleDevelopmentRegion</key>
 		<string>English</string>
 	<key>CFBundleLocalizations</key>
diff --git a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
index ef79e22..ca325a6 100644
--- a/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
+++ b/eclipse/features/org.eclipse.equinox.executable/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist
@@ -6,7 +6,7 @@
 	<key>CFBundleExecutable</key>
 		<string>eclipse</string>
 	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.5 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
 	<key>CFBundleIconFile</key>
 		<string>Eclipse.icns</string>
 	<key>CFBundleIdentifier</key>
@@ -18,11 +18,11 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleSignature</key>
 		<string>????</string>
 	<key>CFBundleVersion</key>
-		<string>3.5</string>
+		<string>3.6</string>
 	<key>CFBundleDevelopmentRegion</key>
 		<string>English</string>
 	<key>CFBundleLocalizations</key>
diff --git a/eclipse/features/org.eclipse.equinox.executable/build.properties b/eclipse/features/org.eclipse.equinox.executable/build.properties
index d30c7a1..d156bd9 100644
--- a/eclipse/features/org.eclipse.equinox.executable/build.properties
+++ b/eclipse/features/org.eclipse.equinox.executable/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -20,9 +20,10 @@ bin.includes = bin/,\
                target.build.xml,\
                license.html,\
                epl-v10.html,\
-               eclipse_update_120.jpg
+               eclipse_update_120.jpg,\
+               contributed/
 
 #Bug 139066 Launcher feature should not contain icons and splash screen
-bin.excludes=bin/**/Eclipse.icns,bin/**/icon.xpm,bin/**/sparc/*.pm,bin/**/splash.bmp
+bin.excludes=bin/**/Eclipse.icns,bin/**/icon.xpm,bin/**/*.pm,bin/**/splash.bmp
 # If we need to regenerate the build.xml, this line must be included at the end of the gather.bin.parts target.
 #	<move file="${feature.base}/features/org.eclipse.platform.launchers_3.1.0/target.build.properties" tofile="${feature.base}/features/org.eclipse.platform.launchers_3.1.0/build.properties"/>
diff --git a/eclipse/features/org.eclipse.equinox.executable/customBuildCallbacks.xml b/eclipse/features/org.eclipse.equinox.executable/customBuildCallbacks.xml
index be5eaae..eaed1dd 100644
--- a/eclipse/features/org.eclipse.equinox.executable/customBuildCallbacks.xml
+++ b/eclipse/features/org.eclipse.equinox.executable/customBuildCallbacks.xml
@@ -72,6 +72,10 @@
 			<fileset dir="${feature.directory}/bin" />
 			<regexpmapper from="^(.*[/\\])eclipse(.exe)?$" to="\1launcher\2"/>
 		</move>
+		<move todir="${feature.directory}/contributed" verbose="true">
+			<fileset dir="${feature.directory}/contributed" />
+			<regexpmapper from="^(.*[/\\])eclipse(.exe)?$" to="\1launcher\2"/>
+		</move>
 	</target>
 	
 	<!-- ===================================================================== -->
diff --git a/eclipse/features/org.eclipse.equinox.executable/feature.properties b/eclipse/features/org.eclipse.equinox.executable/feature.properties
index f09398b..bc7b44d 100644
--- a/eclipse/features/org.eclipse.equinox.executable/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.executable/feature.properties
@@ -30,8 +30,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to by "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -39,42 +39,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -83,47 +79,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.executable/feature.xml b/eclipse/features/org.eclipse.equinox.executable/feature.xml
index 631a1b5..b8b7ea3 100644
--- a/eclipse/features/org.eclipse.equinox.executable/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.executable/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.executable"
       label="%featureName"
-      version="3.3.201.qualifier">
+      version="3.4.2.qualifier">
 
    <description>
       %description
@@ -99,6 +99,16 @@
          fragment="true"/>
 
    <plugin
+         id="org.eclipse.equinox.launcher.gtk.linux.ppc64"
+         os="linux"
+         ws="gtk"
+         arch="ppc64"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"/>
+         
+   <plugin
          id="org.eclipse.equinox.launcher.gtk.linux.x86"
          os="linux"
          ws="gtk"
@@ -127,18 +137,18 @@
          install-size="0"
          version="0.0.0"
          fragment="true"/>
-
-   <plugin
-         id="org.eclipse.equinox.launcher.motif.hpux.PA_RISC"
-         os="hpux"
-         ws="motif"
-         arch="PA_RISC"
+         
+	<plugin
+         id="org.eclipse.equinox.launcher.gtk.aix.ppc64"
+         os="aix"
+         ws="gtk"
+         arch="ppc64"
          download-size="0"
          install-size="0"
          version="0.0.0"
          fragment="true"/>
-         
-	<plugin
+
+   <plugin
          id="org.eclipse.equinox.launcher.motif.hpux.ia64_32"
          os="hpux"
          ws="motif"
@@ -218,4 +228,5 @@
          version="0.0.0"
          fragment="true"/>
 
+
 </feature>
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c b/eclipse/features/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
index e5da4e6..4773996 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
@@ -8,6 +8,7 @@
  * Contributors:
  *    IBM Corporation - initial API and implementation
  * 	  Andre Weinand (OTI Labs)
+ *    David Green - OpenJDK bsd port integration
  */
  
 /* MacOS X Carbon specific logic for displaying the splash screen. */
@@ -15,8 +16,10 @@
 #include "eclipseOS.h"
 #include "eclipseCommon.h"
 #include "eclipseJNI.h"
+#include "eclipseUtil.h"
 
 #include <unistd.h>
+#include <sys/stat.h>
 #include <CoreServices/CoreServices.h>
 #ifdef COCOA
 #include <Cocoa/Cocoa.h>
@@ -35,6 +38,8 @@
 
 #define DEBUG 0
 
+static _TCHAR* noForkingMsg = _T_ECLIPSE("Internal Error, forking the jvm is not supported on MacOS.\n");
+
 char *findCommand(char *command);
 
 /* Global Variables */
@@ -42,6 +47,29 @@ char*  defaultVM     = "java";
 char*  vmLibrary	 = "JavaVM";
 char*  shippedVMDir  = "jre/bin/";
 
+static void adjustLibraryPath(char * vmLibrary);
+static char * findLib(char * command);
+
+#ifdef i386
+#define JAVA_ARCH "i386"
+#elif defined(__ppc__) || defined(__powerpc64__)
+#define JAVA_ARCH "ppc"
+#elif defined(__amd64__) || defined(__x86_64__)
+#define JAVA_ARCH "amd64"
+#else
+#define JAVA_ARCH DEFAULT_OS_ARCH
+#endif
+
+#define LIB_PATH_VAR _T_ECLIPSE("LD_LIBRARY_PATH")
+#define DYLD_FALLBACK_VAR _T_ECLIPSE("DYLD_FALLBACK_LIBRARY_PATH")
+
+#define MAX_LOCATION_LENGTH 40 /* none of the jvmLocations strings should be longer than this */
+#define MAX_JVMLIB_LENGTH   15 /* none of the jvmLibs strings should be longer than this */
+static const char* jvmLocations[] = { "../lib/" JAVA_ARCH "/client",
+									  "../lib/" JAVA_ARCH "/server", "../jre/lib/" JAVA_ARCH "/client",
+									  "../jre/lib/" JAVA_ARCH "/server", NULL };
+static const char* jvmLibs[] = { "libjvm.dylib", "libjvm.jnilib", "libjvm.so", NULL };
+
 /* Define the window system arguments for the various Java VMs. */
 static char*  argVM_JAVA[] = { "-XstartOnFirstThread", NULL };
 
@@ -51,7 +79,7 @@ typedef struct {
 	_TCHAR ** vmArgs;
 	_TCHAR ** progArgs;
 	_TCHAR * jarFile;
-	int result;
+	JavaResults* result;
 } StartVMArgs;
 
 #ifdef COCOA
@@ -71,17 +99,81 @@ static NSWindow* window = nil;
 }
 
 @end
+
+ at interface AppleEventDelegate : NSObject
+- (void)handleOpenDocuments:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
+ at end
+ at implementation AppleEventDelegate
+	NSTimer *timer;
+	NSMutableArray *files;
+	
+- (void)handleOpenDocuments:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent {
+	NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+    int count = [event numberOfItems];
+    int index = 1;
+    
+ 	if (!files) {
+		files = [NSMutableArray arrayWithCapacity:count];
+		[files retain];
+	}
+		
+	for (index = 1; index<=count; index++) {
+		NSAppleEventDescriptor *desc = [event descriptorAtIndex:index];
+		if (desc) {
+			desc = [desc coerceToDescriptorType:typeFSRef];
+			CFURLRef url = CFURLCreateFromFSRef(kCFAllocatorDefault, [[desc data] bytes]);
+			if (url) {
+				NSString *pathName = (NSString *)CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
+				[files addObject:pathName];
+				[pathName release];
+				CFRelease(url);
+			}
+		}
+	}
+	
+	if (!timer) {
+		timer = [NSTimer scheduledTimerWithTimeInterval: 1.0
+												 target: self
+											   selector: @selector(handleTimer:)
+											   userInfo: nil
+												repeats: YES];
+	}
+	[pool release];
+}
+- (void) handleTimer: (NSTimer *) timer {
+	NSObject *delegate = [[NSApplication sharedApplication] delegate];
+	if (delegate != NULL && [delegate respondsToSelector: @selector(application:openFiles:)]) {
+		[delegate performSelector:@selector(application:openFiles:)	withObject:[NSApplication sharedApplication] withObject:files];
+		[files release];
+		[timer invalidate];
+	}
+}
+ at end
 #endif
 
 static CFRunLoopRef loopRef = NULL;
 static void * startThread(void * init); 
 static void runEventLoop(CFRunLoopRef ref);
 static void dummyCallback(void * info) {}
+#ifndef COCOA
+static CFMutableArrayRef files;
+static EventHandlerRef appHandler;
+static int SWT_CLASS = 'SWT-';
+static int SWT_OPEN_FILE_KIND = 1;
+static int SWT_OPEN_FILE_PARAM = 'odoc';
+#endif
 
 int main() {
 	return -1;
 }
 
+void installAppleEventHandler();
+
+int reuseWorkbench(_TCHAR** filePath, int timeout) {
+	installAppleEventHandler();
+	return 0;
+}
+
 #ifdef COCOA
 
 /* Show the Splash Window
@@ -147,6 +239,8 @@ typedef CGImageRef (*CGImageSourceCreateImageAtIndex_FUNC)(CGImageSourceRef, siz
 static CGImageSourceCreateWithURL_FUNC createWithURL = NULL;
 static CGImageSourceCreateImageAtIndex_FUNC createAtIndex = NULL;
 
+static pascal OSErr openDocumentsProc(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon);
+
 static OSStatus drawProc (EventHandlerCallRef eventHandlerCallRef, EventRef eventRef, void * data) {
 	int result = CallNextEventHandler(eventHandlerCallRef, eventRef);
 	if (image) {
@@ -181,6 +275,66 @@ void loadImageFns()
 	}
 }
 
+static OSStatus appleEventProc(EventHandlerCallRef inCaller, EventRef theEvent, void* inRefcon) {
+	EventRecord eventRecord;
+	Boolean release = false;
+	EventQueueRef queue;
+	
+	queue = GetCurrentEventQueue();
+	if (IsEventInQueue (queue, theEvent)) {
+		RetainEvent (theEvent);
+		release = true;
+		RemoveEventFromQueue (queue, theEvent);
+	}
+	ConvertEventRefToEventRecord (theEvent, &eventRecord);
+	AEProcessAppleEvent (&eventRecord);
+	if (release) ReleaseEvent (theEvent);
+	return noErr;
+}
+
+static void timerProc(EventLoopTimerRef timer, void *userData) {
+	EventTargetRef target = GetApplicationEventTarget();
+	CFIndex count = CFArrayGetCount  (files);
+	int i;
+	for (i=0; i<count; i++) {
+		CFStringRef file = (CFStringRef) CFArrayGetValueAtIndex(files, i);
+		EventRef event = NULL;
+		CreateEvent (NULL, SWT_CLASS, SWT_OPEN_FILE_KIND, 0, kEventAttributeNone, &event);
+		SetEventParameter (event, SWT_OPEN_FILE_PARAM, typeCFStringRef, sizeof(file), &file);
+		OSStatus status = SendEventToEventTarget(event, target);
+		ReleaseEvent(event);
+		if (status == eventNotHandledErr) return;
+	}
+	CFRelease(files);
+	RemoveEventLoopTimer(timer);
+	RemoveEventHandler(appHandler);
+	AERemoveEventHandler(kCoreEventClass, kAEOpenDocuments, NewAEEventHandlerUPP(openDocumentsProc), false);
+}
+ 
+static pascal OSErr openDocumentsProc(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon) {
+    AEDescList  docList;
+    FSRef       theFSRef;
+    long        index;
+    long        count = 0;
+    
+    AEGetParamDesc(theAppleEvent, keyDirectObject, typeAEList, &docList);
+	AECountItems(&docList, &count);
+	for(index = 1; index <= count; index++) {
+        AEGetNthPtr(&docList, index, typeFSRef, NULL, NULL, &theFSRef, sizeof(FSRef), NULL);
+		CFURLRef url = CFURLCreateFromFSRef(kCFAllocatorDefault, &theFSRef);
+		CFStringRef pathName = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
+		if (!files) {
+			files = CFArrayCreateMutable(kCFAllocatorDefault, count, &kCFTypeArrayCallBacks);		
+            InstallEventLoopTimer(GetMainEventLoop(), 1, 1, NewEventLoopTimerUPP(timerProc), NULL, NULL); 
+		}
+		CFArrayAppendValue(files, pathName);
+		CFRelease(pathName);
+		CFRelease(url);
+    }
+    AEDisposeDesc(&docList);
+    return noErr;
+}
+
 /* Show the Splash Window
  *
  * Create the splash window, load the bitmap and display the splash window.
@@ -277,6 +431,25 @@ void dispatchMessages() {
 }
 #endif	
 
+void installAppleEventHandler() {
+#ifdef COCOA
+	NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+	AppleEventDelegate *appleEventDelegate = [[AppleEventDelegate alloc] init];
+	[NSApplication sharedApplication];
+	NSAppleEventManager *manager = [NSAppleEventManager sharedAppleEventManager];
+	[manager setEventHandler:appleEventDelegate 
+				 andSelector:@selector(handleOpenDocuments:withReplyEvent:) 
+			   forEventClass:kCoreEventClass 
+				  andEventID:kAEOpenDocuments];
+//	[appleEventDelegate release];
+	[pool release];
+#else	
+	EventTypeSpec kEvents[] = { {kEventClassAppleEvent, kEventAppleEvent} };
+	InstallApplicationEventHandler(NewEventHandlerUPP(appleEventProc), GetEventTypeCount(kEvents), kEvents, 0, &appHandler);
+	AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, NewAEEventHandlerUPP(openDocumentsProc), 0, false);
+#endif
+}
+
 jlong getSplashHandle() {
 	return (jlong)window;
 }
@@ -320,13 +493,119 @@ char * findVMLibrary( char* command ) {
 			
 			free(version);
 		} 
+	} else if (strstr(command, "/JavaVM.framework/") == NULL) {
+		char * lib = findLib(command);
+		if (lib != NULL) {
+			adjustLibraryPath(lib);
+			return lib;
+		}
 	}
 	return JAVA_FRAMEWORK;
 }
 
+static char * findLib(char * command) {
+	int i, q;
+	int pathLength;
+	struct stat stats;
+	char * path; /* path to resulting jvm shared library */
+	char * location; /* points to begining of jvmLocations section of path */
+
+	if (command != NULL) {
+		/*check first to see if command already points to the library */
+		if (isVMLibrary(command)) {
+			if (stat(command, &stats) == 0 && (stats.st_mode & S_IFREG) != 0) { /* found it */
+				return strdup(command);
+			}
+			return NULL;
+		}
 
-void restartLauncher( char* program, char* args[] ) 
-{
+		location = strrchr(command, dirSeparator) + 1;
+		pathLength = location - command;
+		path = malloc((pathLength + MAX_LOCATION_LENGTH + 1 + MAX_JVMLIB_LENGTH	+ 1) * sizeof(char));
+		strncpy(path, command, pathLength);
+		location = &path[pathLength];
+
+		/*
+		 * We are trying base/jvmLocations[*]/vmLibrary
+		 * where base is the directory containing the given java command, normally jre/bin
+		 */
+		for (q = 0; jvmLibs[q] != NULL; ++q) {
+			const char *jvmLib = jvmLibs[q];
+			i = -1;
+			while (jvmLocations[++i] != NULL) {
+				sprintf(location, "%s%c%s", jvmLocations[i], dirSeparator, jvmLib);
+				/*fprintf(stderr,"checking path: %s\n",path);*/
+				if (stat(path, &stats) == 0 && (stats.st_mode & S_IFREG) != 0) 
+				{ /* found it */
+					return path;
+				}
+			}
+		}
+	}
+	return NULL;
+}
+
+/* adjust the LD_LIBRARY_PATH for the vmLibrary */
+static void adjustLibraryPath(char * vmLibrary) {
+	char * c;
+	char * ldPath, *dylibPath;
+	char * newPath;
+	int i;
+	int numPaths = 0;
+	int length = 0;
+	int needAdjust = 0, needDylibAdjust = 0;
+
+	char ** paths = getVMLibrarySearchPath(vmLibrary);
+
+	ldPath = (char*) getenv(LIB_PATH_VAR);
+	if (!ldPath) {
+		ldPath = _T_ECLIPSE("");
+		needAdjust = 1;
+	} else {
+		needAdjust = !containsPaths(ldPath, paths);
+	}
+
+	dylibPath = (char*) getenv(DYLD_FALLBACK_VAR);
+	if (!dylibPath) {
+		dylibPath = _T_ECLIPSE("");
+		needDylibAdjust = 1;
+	} else {
+		needDylibAdjust = !containsPaths(dylibPath, paths);
+	}
+
+	if (!needAdjust && !needDylibAdjust) {
+		for (i = 0; paths[i] != NULL; i++)
+			free(paths[i]);
+		free(paths);
+		return;
+	}
+
+	c = concatStrings(paths);
+	
+	/* set the value for LD_LIBRARY_PATH */
+	length = strlen(ldPath);
+	newPath = malloc((_tcslen(c) + length + 1) * sizeof(_TCHAR));
+	_stprintf(newPath, _T_ECLIPSE("%s%s"), c, ldPath);
+	setenv(LIB_PATH_VAR, newPath, 1);
+	free(newPath);
+	
+	/* set the value for DYLD_FALLBACK_LIBRARY_PATH */
+	length = strlen(dylibPath);
+	newPath =  malloc((_tcslen(c) + length + 1) * sizeof(_TCHAR));
+	_stprintf(newPath, _T_ECLIPSE("%s%s"), c, dylibPath);
+	setenv(DYLD_FALLBACK_VAR, newPath, 1);
+	free(newPath);
+	free(c);
+	
+	for (i = 0; i < numPaths; i++)
+		free(paths[i]);
+	free(paths);
+
+	/* now we must restart for this to take affect*/
+	restartLauncher(initialArgv[0], initialArgv);
+}
+
+void restartLauncher(char* program, char* args[]) {
 	pid_t pid= fork();
 	if (pid == 0) {
 		/* Child process ... start the JVM */
@@ -334,16 +613,22 @@ void restartLauncher( char* program, char* args[] )
 
 		/* The JVM would not start ... return error code to parent process. */
 		_exit(errno);
+	} else {
+		exit(0);
 	}
 }
 
-int launchJavaVM( _TCHAR* args[] )
+JavaResults* launchJavaVM( _TCHAR* args[] )
 {
 	/*for now always do JNI on Mac, should not come in here */
-	return -1;
+	JavaResults * results = malloc(sizeof(JavaResults));
+	results->launchResult = -1;
+	results->runResult = 0;
+	results->errorMessage = _tcsdup(noForkingMsg);
+	return results;
 }
 
-int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
+JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
 {
 	if (secondThread == 0) {
 		/* Set an environment variable that tells the AWT (if started) we started the JVM on the main thread. */
@@ -379,6 +664,7 @@ int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 	args.vmArgs = vmArgs;
 	args.progArgs = progArgs;
 	args.jarFile = jarFile;
+	args.result = 0;
 	
 	loopRef = CFRunLoopGetCurrent();
 	
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipse.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipse.c
index 633dfef..4709007 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipse.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipse.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -187,6 +187,8 @@ _TCHAR** initialArgv = NULL;
 
 /* Define error messages. (non-NLS) */
 static _TCHAR* exitMsg = _T_ECLIPSE("JVM terminated. Exit code=%d\n%s");
+static _TCHAR* javaFailureMsg = _T_ECLIPSE("Internal Error, unable to determine the results of running the JVM.");
+static _TCHAR* returnCodeMsg = _T_ECLIPSE("Java was started but returned exit code=%d\n%s");
 static _TCHAR* goVMMsg = _T_ECLIPSE("Start VM: %s\n");
 static _TCHAR* pathMsg = _T_ECLIPSE("%s in your current PATH");
 static _TCHAR* shareMsg = _T_ECLIPSE("No exit data available.");
@@ -225,6 +227,9 @@ home directory.");
 #define CLASSPATH    _T_ECLIPSE("-classpath")
 #define JAR 		 _T_ECLIPSE("-jar")
 
+#define OPENFILE	  _T_ECLIPSE("--launcher.openFile")
+#define DEFAULTACTION _T_ECLIPSE("--launcher.defaultAction")
+#define TIMEOUT		  _T_ECLIPSE("--launcher.timeout")
 #define LIBRARY		  _T_ECLIPSE("--launcher.library")
 #define SUPRESSERRORS _T_ECLIPSE("--launcher.suppressErrors")
 #define INI			  _T_ECLIPSE("--launcher.ini")
@@ -232,6 +237,7 @@ home directory.");
 #define PERM_GEN	  _T_ECLIPSE("--launcher.XXMaxPermSize")
 
 #define XXPERMGEN	  _T_ECLIPSE("-XX:MaxPermSize=")
+#define ACTION_OPENFILE _T_ECLIPSE("openFile")
 
 /* constants for ee options file */
 #define EE_EXECUTABLE 			_T_ECLIPSE("-Dee.executable=")
@@ -254,17 +260,18 @@ static _TCHAR*  splashBitmap  = NULL;			/* the actual splash bitmap */
 static _TCHAR * startupArg    = NULL;			/* path of the startup.jar the user wants to run relative to the program path */
 static _TCHAR*  vmName        = NULL;     		/* Java VM that the user wants to run */
 static _TCHAR*  name          = NULL;			/* program name */	
-static _TCHAR*  library       = NULL;			/* the shared library */
-#ifdef AIX
-	   _TCHAR*  eclipseLibrary = NULL;			/* global, eclipse shared library, same as library */
-#endif
 static _TCHAR*  permGen  	  = NULL;			/* perm gen size for sun */
+static _TCHAR**  filePath	  = NULL;			/* list of files to open */
+static _TCHAR*  timeoutString = NULL;			/* timeout value for opening a file */
+static _TCHAR*  defaultAction = NULL;			/* default action for non '-' command line arguments */ 
 
 /* variables for ee options */
 static _TCHAR* eeExecutable = NULL;
 static _TCHAR* eeConsole = NULL;
 static _TCHAR* eeLibrary = NULL;
+
 _TCHAR* eeLibPath = NULL;			/* this one is global so others can see it */
+_TCHAR*  eclipseLibrary = NULL;	/* the shared library */
 
 /* Define a table for processing command line options. */
 typedef struct
@@ -273,17 +280,15 @@ typedef struct
 	void*  value;		/* the variable where the option value is saved */
 						/* value is a _TCHAR** or int* depending on if VALUE_IS_FLAG is set */
 	int    flag;		/* flags */
-	int    remove;		/* the number of argments to remove from the list */
+	int    remove;		/* the number of argments to remove from the list, -1 can be used with VALUE_IS_LIST */
 } Option;
 
 /* flags for the Option struct */
-#define VALUE_IS_FLAG 	1   /* value is an int*, if not set, value is a _TCHAR** */
+#define VALUE_IS_FLAG 	1   /* value is an int*, if not set, value is a _TCHAR** or _TCHAR*** (VALUE_IS_LIST) */
 #define OPTIONAL_VALUE  2  	/* value is optional, if next arg does not start with '-', */
 							/* don't assign it and only remove (remove - 1) arguments  */
-
-/* flags being used by EE options */
-#define EE_ADJUST_PATH	4   /* value is a path, do processing on relative paths to try and make them absolute */
-#define EE_PATH_LIST	8   /* value is a list of paths */
+#define ADJUST_PATH		4  	/* value is a path, do processing on relative paths to try and make them absolute */
+#define VALUE_IS_LIST	8  	/* value is a pointer to a tokenized _TCHAR* string for EE files, or a _TCHAR** list for the command line */
 
 static Option options[] = {
     { CONSOLE,		&needConsole,	VALUE_IS_FLAG,	0 },
@@ -301,14 +306,17 @@ static Option options[] = {
     { VM,           &vmName,		0,			2 },
     { NAME,         &name,			0,			2 },
     { PERM_GEN,		&permGen,		0,			2 },
+    { OPENFILE,		&filePath,		ADJUST_PATH | VALUE_IS_LIST, -1 },
+    { TIMEOUT,		&timeoutString, 0,          2 },
+    { DEFAULTACTION,&defaultAction, 0,			2 },
     { WS,			&wsArg,			0,			2 } };
 static int optionsSize = (sizeof(options) / sizeof(options[0]));
 
 static Option eeOptions[] = {
-	{ EE_EXECUTABLE,	&eeExecutable, 	EE_ADJUST_PATH, 0 },
-	{ EE_CONSOLE,	 	&eeConsole,		EE_ADJUST_PATH, 0 },
-	{ EE_VM_LIBRARY, 	&eeLibrary,		EE_ADJUST_PATH, 0 },
-	{ EE_LIBRARY_PATH,	&eeLibPath, 	EE_ADJUST_PATH | EE_PATH_LIST, 0 }
+	{ EE_EXECUTABLE,	&eeExecutable, 	ADJUST_PATH, 0 },
+	{ EE_CONSOLE,	 	&eeConsole,		ADJUST_PATH, 0 },
+	{ EE_VM_LIBRARY, 	&eeLibrary,		ADJUST_PATH, 0 },
+	{ EE_LIBRARY_PATH,	&eeLibPath, 	ADJUST_PATH | VALUE_IS_LIST, 0 }
 };
 static int eeOptionsSize = (sizeof(eeOptions) / sizeof(eeOptions[0]));
 
@@ -322,8 +330,10 @@ static int nEEargs = 0;
 
 /* Local methods */
 static void     parseArgs( int* argc, _TCHAR* argv[] );
+static void 	processDefaultAction(int argc, _TCHAR* argv[]);
 static void     getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmArgv[], _TCHAR **progArgv[] );
 static int 		determineVM(_TCHAR** msg);
+static int 		vmEEProps(_TCHAR* eeFile, _TCHAR** msg);
 static int 		processEEProps(_TCHAR* eeFile);
 static _TCHAR** buildLaunchCommand( _TCHAR* program, _TCHAR** vmArgs, _TCHAR** progArgs );
 static _TCHAR** parseArgList( _TCHAR *data );
@@ -336,16 +346,16 @@ static const _TCHAR* getVMArch();
 
 #ifdef _WIN32
 static void     createConsole();
+static void		fixDLLSearchPath();
+static int 		isConsoleLauncher();
 #endif
+static int      consoleLauncher = 0;
 
 /* Record the arguments that were used to start the original executable */
 JNIEXPORT void setInitialArgs(int argc, _TCHAR** argv, _TCHAR* lib) {
 	initialArgc = argc;
 	initialArgv = argv;
-	library = lib;
-#ifdef AIX
 	eclipseLibrary = lib;
-#endif
 }
 
 /* this method must match the RunMethod typedef in eclipseMain.c */
@@ -357,7 +367,7 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
     _TCHAR**  progCommandArgs = NULL;
     _TCHAR**  relaunchCommand = NULL;
     _TCHAR*   errorMsg = NULL, *msg = NULL;
-    int       exitCode = 0;
+    JavaResults* javaResults = NULL;
     int 	  launchMode;
     int 	  running = 1;
 	 
@@ -371,12 +381,35 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
 	/* Initialize official program name */
    	officialName = name != NULL ? _tcsdup( name ) : getDefaultOfficialName();
     
+   	if (defaultAction != NULL) {
+   		processDefaultAction(initialArgc, initialArgv);
+   	}
+   	
+   	/* try to open the specified file in an already running eclipse */
+   	/* on Mac we are only registering an event handler here, always do this */
+#ifndef MACOSX
+	if (filePath != NULL && filePath[0] != NULL)
+#endif
+	{
+		int timeout = 60;
+		if (timeoutString != NULL)
+			_stscanf(timeoutString, _T_ECLIPSE("%d"), &timeout);
+		if (reuseWorkbench(filePath, timeout) > 0)
+			return 0;
+	}
+
 #ifdef MACOSX
    	/* Most platforms, we will initialize the window system later before trying to do any
    	 * graphics.  On Mac, we need it initialized to get the dock icon properly, so always do 
    	 * it now.
    	 */
     initWindowSystem( &argc, argv, !noSplash );
+#elif _WIN32
+    /* this must be before doing any console stuff, platforms other than win32 leave this set to 0 */
+    consoleLauncher = isConsoleLauncher();
+    
+    /*fix the DLL search path for security */
+    fixDLLSearchPath();
 #endif
     
     /* Find the directory where the Eclipse program is installed. */
@@ -475,12 +508,20 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
 		if (debug) _tprintf( goVMMsg, msg );
 
 		if(launchMode == LAUNCH_JNI) {
-			exitCode = startJavaVM(jniLib, vmCommandArgs, progCommandArgs, jarFile);
+			javaResults = startJavaVM(jniLib, vmCommandArgs, progCommandArgs, jarFile);
 		} else {
-			exitCode = launchJavaVM(vmCommand);
+			javaResults = launchJavaVM(vmCommand);
+		}
+		
+		if (javaResults == NULL) {
+			/* shouldn't happen, but just in case */
+			javaResults = malloc(sizeof(JavaResults));
+			javaResults->launchResult = -11;
+			javaResults->runResult = 0;
+			javaResults->errorMessage = _tcsdup(javaFailureMsg);
 		}
 		
-	    switch( exitCode ) {
+	    switch( javaResults->launchResult + javaResults->runResult ) {
 	        case 0: /* normal exit */
 	        	running = 0;
 	            break;
@@ -553,8 +594,18 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
 	                }
 	            }
 	            if (errorMsg == NULL) {
-	                errorMsg = malloc( (_tcslen(exitMsg) + _tcslen(msg) + 10) * sizeof(_TCHAR) );
-	                _stprintf( errorMsg, exitMsg, exitCode, msg );
+	            	if (javaResults->runResult) {
+	            		/* java was started ok, but returned non-zero exit code */
+	            		errorMsg = malloc( (_tcslen(returnCodeMsg) + _tcslen(msg) + 10) *sizeof(_TCHAR));
+	            		_stprintf(errorMsg, returnCodeMsg,javaResults->runResult, msg);
+	            	} else if (javaResults->errorMessage != NULL){
+	            		/* else we had a problem launching java, use custom error message */
+	            		errorMsg = javaResults->errorMessage;
+	            	} else {
+	            		/* no custom message, use generic message */
+						errorMsg = malloc( (_tcslen(exitMsg) + _tcslen(msg) + 10) * sizeof(_TCHAR) );
+						_stprintf( errorMsg, exitMsg, javaResults->launchResult, msg );
+	            	}
 	            }
 	            
 	            if (_tcslen(errorMsg) > 0) {
@@ -575,7 +626,7 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
     	restartLauncher(NULL, relaunchCommand);
     	
     if (launchMode == LAUNCH_JNI)
-    	cleanupVM(exitCode);
+    	cleanupVM(javaResults->launchResult ? javaResults->launchResult : javaResults->runResult);
     
     if (sharedID != NULL) {
     	destroySharedData( sharedID );
@@ -595,7 +646,13 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
     if ( exitData != NULL )		 free( exitData );
     if ( splashBitmap != NULL )  free( splashBitmap );
 
-    return exitCode;
+    if (javaResults == NULL)
+    	return -1;
+    
+    /* reuse the running variable for convenience */
+    running = javaResults->launchResult != 0 ? javaResults->launchResult : javaResults->runResult;
+    free(javaResults);
+    return running;
 }
 
 static _TCHAR** buildLaunchCommand( _TCHAR* program, _TCHAR** vmArgs, _TCHAR** progArgs ) {
@@ -612,67 +669,109 @@ static _TCHAR** buildLaunchCommand( _TCHAR* program, _TCHAR** vmArgs, _TCHAR** p
 	memcpy(result + 1 + nVM, progArgs, nProg * sizeof(_TCHAR*));
 	return result;
 }
+
+static void processDefaultAction(int argc, _TCHAR* argv[]) {
+	/* scan the arg list, no default if any start with '-' */
+	int i = 0;
+	for (i = 0; i < argc; i++) {
+		if (argv[i][0] == _T_ECLIPSE('-'))
+			return;
+	}
+	/* argv[0] is the program (eclipse),  we process the default actions by inserting
+	 * the appropriate -argument at argv[1]
+	 */
+	if (argc <= 1)
+		return;
+
+	if (_tcsicmp(defaultAction, ACTION_OPENFILE) == 0) {
+		int newArgc = argc + 1;
+		_TCHAR ** newArgv = malloc((newArgc + 1) * sizeof(_TCHAR*));
+		newArgv[0] = argv[0];
+		newArgv[1] = OPENFILE;
+		memcpy(&newArgv[2], &argv[1], argc * sizeof(_TCHAR*));
+		parseArgs(&newArgc, newArgv);
+		free(newArgv);
+	}
+}
+
 /*
  * Parse arguments of the command.
  */
-static void parseArgs( int* pArgc, _TCHAR* argv[] )
-{
+static void parseArgs(int* pArgc, _TCHAR* argv[]) {
 	Option* option;
-    int     remArgs;
-    int     index;
-    int     i;
-
-    /* Ensure the list of user argument is NULL terminated. */
-    /*argv[ *pArgc ] = NULL;*/
+	int remArgs;
+	int index;
+	int i;
+	_TCHAR * c;
 
 	/* For each user defined argument (excluding the program) */
-    for (index = 1; index < *pArgc; index++){
-        remArgs = 0;
+	for (index = 1; index < *pArgc; index++) {
+		remArgs = 0;
+
+		/* Find the corresponding argument is a option supported by the launcher */
+		option = NULL;
+		for (i = 0; option == NULL && i < optionsSize; i++) {
+			if (_tcsicmp(argv[index], options[i].name) == 0) {
+				option = &options[i];
+				break;
+			}
+		}
 
-        /* Find the corresponding argument is a option supported by the launcher */
-        option = NULL;
-        for (i = 0; option == NULL && i < optionsSize; i++)
-        {
-        	if (_tcsicmp( argv[ index ], options[ i ].name ) == 0) {
-        	    option = &options[ i ];
-        	    break;
-        	}
-       	}
+		/* If the option is recognized by the launcher */
+		if (option != NULL) {
+			int optional = 0;
+			c = option->name;
+			/* If the option requires a value and there is one, extract the value. */
+			if (option->value != NULL) {
+				if (option->flag & VALUE_IS_FLAG)
+					*((int *) option->value) = 1;
+				else {
+					int count = 1;
+					if (option->flag & VALUE_IS_LIST) {
+						/* count how many args, this is the -argument itself + following the non'-' args */
+						while(count + index < *pArgc && argv[count + index][0] != _T_ECLIPSE('-'))
+							count++;
+						
+						/* allocate memory for a _TCHAR* list and initialize it with NULLs*/
+						*((void**) option->value) = malloc(count * sizeof(_TCHAR *));
+						memset(*((void **) option->value), 0, count * sizeof(_TCHAR *));
+						
+						if (option->remove != 0)
+							option->remove = count;
+					}
+
+					for (i = 0; i < count; i++) {
+						if ((index + i + 1) < *pArgc) {
+							_TCHAR * next = argv[index + i + 1];
+							if (option->flag & ADJUST_PATH)
+								next = checkPath(next, getProgramDir(), 0);
+							if (next[0] != _T_ECLIPSE('-')) {
+								if (option->flag & VALUE_IS_LIST)
+									(*((_TCHAR***) option->value))[i] = next;
+								else
+									*((_TCHAR**) option->value) = next;
+							} else if (option->flag & OPTIONAL_VALUE){
+								/* value was optional, and the next arg starts with '-' */
+								optional = 1;
+							}
+						}
+					}
+				}
+			}
 
-       	/* If the option is recognized by the launcher */
-       	if (option != NULL)
-       	{
-       		int optional = 0;
-       		/* If the option requires a value and there is one, extract the value. */
-       		if (option->value != NULL) {
-       			if (option->flag & VALUE_IS_FLAG)
-       				*((int *)option->value) = 1;
-       			else if((index + 1) < *pArgc) {
-       				_TCHAR * next = argv[index + 1];
-       				if(!((option->flag & OPTIONAL_VALUE) && next[0] == _T_ECLIPSE('-'))) {
-       					*((_TCHAR**)option->value) = next;
-       				} else {
-       					/* value was optional, and the next arg starts with '-' */
-       					optional = 1;
-       				}
-       			}
-       		}
-
-       		/* If the option requires a flag to be set, set it. */
-       		remArgs = option->remove - optional;
-       	}
+			/* If the option requires a flag to be set, set it. */
+			remArgs = option->remove - optional;
+		}
 
 		/* Remove any matched arguments from the list. */
-        if (remArgs > 0)
-        {
-            for (i = (index + remArgs); i <= *pArgc; i++)
-            {
-                argv[ i - remArgs ] = argv[ i ];
-            }
-            index--;
-            *pArgc -= remArgs;
-        }
-    }
+		if (remArgs > 0) {
+			for (i = (index + remArgs); i <= *pArgc; i++) {
+				argv[i - remArgs] = argv[i];
+			}
+			index--;
+			*pArgc -= remArgs;
+		}
+	}
 }
 
 /*
@@ -824,9 +923,9 @@ static void getVMCommand( int launchMode, int argc, _TCHAR* argv[], _TCHAR **vmA
 	(*progArgv)[ dst++ ] = 	officialName;
 	
 	/* And the shared library */
-	if (library != NULL) {
+	if (eclipseLibrary != NULL) {
 		(*progArgv)[ dst++ ] = LIBRARY;
-		(*progArgv)[ dst++ ] = library;
+		(*progArgv)[ dst++ ] = eclipseLibrary;
 	}
 	
 	/* the startup jar */
@@ -908,7 +1007,7 @@ static _TCHAR*  formatVmCommandMsg( _TCHAR* args[], _TCHAR* vmArgs[], _TCHAR* pr
 	while(list != NULL) {
 		for (index = 0; list[index] != NULL; index++)
 		{
-			if (list[index][0] == _T_ECLIPSE('-') && *(ch-1) == _T_ECLIPSE(' '))
+			if (ch != message && list[index][0] == _T_ECLIPSE('-') && *(ch-1) == _T_ECLIPSE(' '))
 				*(ch-1) = _T_ECLIPSE('\n');
 			_tcscpy( ch, list[index] );
 			ch += _tcslen( list[index] );
@@ -926,6 +1025,18 @@ _TCHAR* getOfficialName() {
 	return officialName;
 }
 
+void setOfficialName(_TCHAR* name) {
+	officialName = name;
+}
+
+_TCHAR* getProgramPath() {
+	return program;
+}
+
+void setProgramPath(_TCHAR* path) {
+	program = path;
+}
+
 /*
  * Determine the default official application name
  *
@@ -1076,7 +1187,7 @@ static _TCHAR* findStartupJar(){
 		/* startup jar was specified on the command line */
 		ch = _tcsdup(startupArg);
 		/* check path will check relative paths against programDir and workingDir */
-		file = checkPath(ch, programDir, 0);
+		file = checkPath(ch, programDir, 1);
 		if(file != ch)
 			free(ch);
 		/* check existence */
@@ -1108,9 +1219,10 @@ static _TCHAR* findStartupJar(){
 		return file;
 	
 	/* old startup.jar? */
-	file = checkPath(OLD_STARTUP, programDir, 0);
+	ch = OLD_STARTUP;
+	file = checkPath(ch, programDir, 1);
 	if (_tstat( file, &stats ) == 0)
-		return (file == OLD_STARTUP) ? _tcsdup(OLD_STARTUP) : file;
+		return (file == ch) ? _tcsdup(ch) : file;
 		
 	return NULL;
 }
@@ -1193,8 +1305,68 @@ static void createConsole() {
 		*stderr = *fp;
 	}
 }
+
+/* Determine if the launcher was the eclipsec.exe or not based on whether we have an attached console.
+ * This will only be correct if called before createConsole.
+ */
+static int isConsoleLauncher() {
+	HWND (WINAPI *GetConsoleWindow)();
+	void * handle = loadLibrary(_T_ECLIPSE("Kernel32.dll"));
+	if (handle != NULL) {
+		if ( (GetConsoleWindow = findSymbol(handle, _T_ECLIPSE("GetConsoleWindow"))) != NULL) {
+			return GetConsoleWindow() != NULL;
+		}
+	}
+	return 0;
+}
+
+static void fixDLLSearchPath() {
+#ifdef UNICODE
+	_TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryW");
+#else
+	_TCHAR* functionName = _T_ECLIPSE("SetDllDirectoryA");
 #endif
 
+	BOOL (WINAPI *SetDLLDirectory)(LPCTSTR);
+	void * handle = loadLibrary(_T_ECLIPSE("Kernel32.dll"));
+	if (handle != NULL) {
+		if ( (SetDLLDirectory = findSymbol(handle, functionName)) != NULL) {
+			SetDLLDirectory(_T_ECLIPSE(""));
+		}
+	}
+}
+
+#endif
+
+/* Set the vm to use based on the given .ee file.
+ */
+static int vmEEProps(_TCHAR * eeFile, _TCHAR ** msg) {
+	if (processEEProps(eeFile) != 0) {
+		*msg = _tcsdup(eeFile);
+		return -1;
+	}
+	if (eeLibrary != NULL) {
+		jniLib = findVMLibrary(eeLibrary);
+		if (jniLib != NULL)
+			return LAUNCH_JNI;
+	}
+		
+	if (eeConsole != NULL && (debug || needConsole || consoleLauncher) ) {
+		javaVM = findSymlinkCommand(eeConsole, 0);
+		if (javaVM != NULL)
+			return LAUNCH_EXE;
+	}
+	
+	if (eeExecutable != NULL) {
+		javaVM = findSymlinkCommand(eeExecutable, 0);
+		if (javaVM != NULL)
+			return LAUNCH_EXE;
+	}
+	
+	*msg = _tcsdup(eeFile);
+	return -1;
+}
+
 /*
  * determine the vm to use.
  * return LAUNCH_JNI for launching with JNI invocation API. jniLib contains the name of the library
@@ -1206,8 +1378,14 @@ static int determineVM(_TCHAR** msg) {
 	_TCHAR* ch  = NULL;
 	_TCHAR* result = NULL;
 	_TCHAR* vmSearchPath = NULL;
+	_TCHAR* defaultJava = defaultVM; /* default exe to look for */
 	int type = 0;
 	
+#ifdef _WIN32
+	if (debug || needConsole || consoleLauncher)
+		defaultJava = consoleVM; /* windows will want java.exe for the console, not javaw.exe */
+#endif
+	
 	/* vmName is passed in on command line with -vm */
     if (vmName != NULL) {
     	size_t length = _tcslen(vmName);
@@ -1216,7 +1394,7 @@ static int determineVM(_TCHAR** msg) {
     		vmName[length - 1] = 0;
     	}
     	
-    	vmName = checkPath(vmName, programDir, 0);
+    	vmName = checkPath(vmName, programDir, 1);
     	type = checkProvidedVMType(vmName);
     	switch (type) {
     	case VM_DIRECTORY:
@@ -1228,8 +1406,8 @@ static int determineVM(_TCHAR** msg) {
     		free(ch);
     		if (result == NULL) {
     			/* No default.ee file, look for default VM */
-    			ch = malloc((_tcslen(vmName) + 1 + _tcslen(defaultVM) + 1) * sizeof(_TCHAR));
-    			_stprintf( ch, _T_ECLIPSE("%s%c%s"), vmName, dirSeparator, defaultVM );
+    			ch = malloc((_tcslen(vmName) + 1 + _tcslen(defaultJava) + 1) * sizeof(_TCHAR));
+    			_stprintf( ch, _T_ECLIPSE("%s%c%s"), vmName, dirSeparator, defaultJava );
     			javaVM = findSymlinkCommand(ch, 0);
     			free(ch);
     			if (javaVM == NULL) {
@@ -1243,9 +1421,9 @@ static int determineVM(_TCHAR** msg) {
     					return LAUNCH_JNI;
     				}
     				/* found nothing, return error */
-    				*msg = malloc( (3 * (_tcslen(vmName) + 2) + _tcslen(DEFAULT_EE) + _tcslen(defaultVM) + _tcslen(vmLibrary) + 1) * sizeof(_TCHAR));
+    				*msg = malloc( (3 * (_tcslen(vmName) + 2) + _tcslen(DEFAULT_EE) + _tcslen(defaultJava) + _tcslen(vmLibrary) + 1) * sizeof(_TCHAR));
     				_stprintf( *msg, _T_ECLIPSE("%s%c%s\n%s%c%s\n%s%c%s"), vmName, dirSeparator, DEFAULT_EE, 
-    																	   vmName, dirSeparator, defaultVM,
+    																	   vmName, dirSeparator, defaultJava,
     																	   vmName, dirSeparator, vmLibrary);
     				return -1;
     			}
@@ -1256,30 +1434,7 @@ static int determineVM(_TCHAR** msg) {
     		vmName = result;
     		/* fall through to VM_EE_PROPS*/
     	case VM_EE_PROPS:
-    		if (processEEProps(vmName) != 0) {
-    			*msg = _tcsdup(vmName);
-    			return -1;
-    		}
-    		if (eeLibrary != NULL) {
-    			jniLib = findVMLibrary(eeLibrary);
-    			if (jniLib != NULL)
-    				return LAUNCH_JNI;
-    		}
-    			
-    		if (eeConsole != NULL && (debug || needConsole) ) {
-    			javaVM = findSymlinkCommand(eeConsole, 0);
-    			if (javaVM != NULL)
-    				return LAUNCH_EXE;
-    		}
-    		
-    		if (eeExecutable != NULL) {
-    			javaVM = findSymlinkCommand(eeExecutable, 0);
-    			if (javaVM != NULL)
-    				return LAUNCH_EXE;
-    		}
-    		
-    		*msg = _tcsdup(vmName);
-    		return -1;
+    		return vmEEProps(vmName, msg);
     		
     	case VM_LIBRARY:
     		ch = findCommand(vmName);
@@ -1324,8 +1479,21 @@ static int determineVM(_TCHAR** msg) {
     
     if (vmName == NULL) {
     	/* no vm specified, Try to find the VM shipped with eclipse. */
-        ch = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( defaultVM ) + 10) * sizeof(_TCHAR) );
-        _stprintf( ch, _T_ECLIPSE("%s%s%s"), programDir, shippedVMDir, defaultVM );
+    	
+    	/* look first for default.ee */
+    	ch = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( DEFAULT_EE ) + 1) * sizeof(_TCHAR) );
+		_stprintf( ch, _T_ECLIPSE("%s%s%s"), programDir, shippedVMDir, DEFAULT_EE );
+		result = findCommand(ch);
+		free(ch);
+    	if (result != NULL) {
+    		type = vmEEProps(result, msg);
+    		free(result);
+    		return type;
+    	}
+    	
+    	/* then look for java(w).exe */
+        ch = malloc( (_tcslen( programDir ) + _tcslen( shippedVMDir ) + _tcslen( defaultJava ) + 10) * sizeof(_TCHAR) );
+        _stprintf( ch, _T_ECLIPSE("%s%s%s"), programDir, shippedVMDir, defaultJava );
         vmSearchPath = _tcsdup(ch);
  
         javaVM = findSymlinkCommand( ch, 0 );
@@ -1334,11 +1502,11 @@ static int determineVM(_TCHAR** msg) {
     
     if (javaVM == NULL) {
     	/* vm not found yet, look for one on the search path, but don't resolve symlinks */
-    	javaVM = findSymlinkCommand(defaultVM, 0);
+    	javaVM = findSymlinkCommand(defaultJava, 0);
     	if (javaVM == NULL) {
     		/* can't find vm, error */
-    		ch = malloc( (_tcslen(pathMsg) + _tcslen(defaultVM) + 1) * sizeof(_TCHAR));
-    		_stprintf(ch, pathMsg, defaultVM);
+    		ch = malloc( (_tcslen(pathMsg) + _tcslen(defaultJava) + 1) * sizeof(_TCHAR));
+    		_stprintf(ch, pathMsg, defaultJava);
     		
     		if(vmSearchPath != NULL) {
     			*msg = malloc((_tcslen(ch) + 1 + _tcslen(vmSearchPath) + 1) * sizeof(_TCHAR));
@@ -1421,11 +1589,11 @@ static int processEEProps(_TCHAR* eeFile)
         	else {
         		c1 = malloc( (_tcslen(argv[index]) - _tcslen(option->name) + 1) *sizeof(_TCHAR));
             	_tcscpy(c1, argv[index] + _tcslen(option->name));
-        		if (option->flag & EE_ADJUST_PATH && option->flag & EE_PATH_LIST) {
+        		if (option->flag & ADJUST_PATH && option->flag & VALUE_IS_LIST) {
         			c2 = checkPathList(c1, eeDir, 1);
        				free(c1);
     				c1 = c2;
-        		} else if (option->flag & EE_ADJUST_PATH) {
+        		} else if (option->flag & ADJUST_PATH) {
         			c2 = checkPath(c1, eeDir, 1);
         			if (c2 != c1) {
         				free(c1);
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.c
index 1a8cf16..56c1a71 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.c
@@ -46,6 +46,8 @@ _TCHAR* wsArg        = _T_ECLIPSE(DEFAULT_WS);	/* the SWT supported GUI to be us
 static _TCHAR* filterPrefix = NULL;  /* prefix for the find files filter */
 static size_t  prefixLength = 0;
 
+static int isFolder(const _TCHAR* path, const _TCHAR* entry);
+
 typedef struct {
 	int segment[3];
 	_TCHAR * qualifier;
@@ -345,33 +347,48 @@ char * resolveSymlinks( char * path ) {
 #endif
 
 #ifdef _WIN32
-static int filter(_TCHAR* candidate) {
+static int filter(_TCHAR* candidate, int isFolder) {
 #else
 #ifdef MACOSX
-static int filter(struct dirent *dir) {
+static int filter(struct dirent *dir, int isFolder) {
 #else
-static int filter(const struct dirent *dir) {
+static int filter(const struct dirent *dir, int isFolder) {
 #endif
-	char * candidate = dir->d_name;
+	char * candidate = (char *)dir->d_name;
 #endif
-	_TCHAR *c1, *c2;
+	_TCHAR *lastDot, *lastUnderscore;
+	int result;
 	
 	if(_tcslen(candidate) <= prefixLength)
 		return 0;
-	if (_tcsncmp(candidate, filterPrefix, prefixLength) == 0 &&
-		candidate[prefixLength] == '_') 
-	{
-		c1 = _tcschr(&candidate[prefixLength + 1], '_');
-		if(c1 != NULL) {
-			c2 = _tcschr(&candidate[prefixLength + 1], '.');
-			if (c2 != NULL) {
-				return c2 < c1;
-			} else 
-				return 0;
-		} else 
-			return 1;
+	if (_tcsncmp(candidate, filterPrefix, prefixLength) != 0 ||	candidate[prefixLength] != _T_ECLIPSE('_'))
+		return 0;
+	
+	candidate = _tcsdup(candidate);
+	
+	/* remove trailing .jar and .zip extensions, leave other extensions because we need the '.'  */
+	lastDot = _tcsrchr(candidate, _T_ECLIPSE('.'));
+	if (!isFolder && lastDot != NULL && (_tcscmp(lastDot, _T_ECLIPSE(".jar")) == 0 || _tcscmp(lastDot, _T_ECLIPSE(".zip")) == 0)) {
+		*lastDot = 0;
+		lastDot = _tcsrchr(candidate, _T_ECLIPSE('.'));
+	}
+	
+	if (lastDot < &candidate[prefixLength]) {
+		free(candidate);
+		return 0;
 	}
-	return 0;
+	
+	lastUnderscore = _tcsrchr(candidate, _T_ECLIPSE('_'));
+	
+	/* get past all the '_' that are part of the qualifier */
+	while(lastUnderscore > lastDot) {
+		*lastUnderscore = 0;
+		lastUnderscore = _tcsrchr(candidate, _T_ECLIPSE('_')); 
+	}
+	/* is this the underscore at the end of the prefix? */
+	result = (lastUnderscore == &candidate[prefixLength]);
+	free(candidate);
+	return result;
 }
 
  /* 
@@ -416,10 +433,10 @@ _TCHAR* findFile( _TCHAR* path, _TCHAR* prefix)
 	
 	handle = FindFirstFile(fileName, &data);
 	if(handle != INVALID_HANDLE_VALUE) {
-		if (filter(data.cFileName))
+		if (filter(data.cFileName, isFolder(path, data.cFileName)))
 			candidate = _tcsdup(data.cFileName);
 		while(FindNextFile(handle, &data) != 0) {
-			if (filter(data.cFileName)) {
+			if (filter(data.cFileName, isFolder(path, data.cFileName))) {
 				if (candidate == NULL) {
 					candidate = _tcsdup(data.cFileName);
 				} else if( compareVersions(candidate + prefixLength + 1, data.cFileName + prefixLength + 1) < 0) {
@@ -438,7 +455,7 @@ _TCHAR* findFile( _TCHAR* path, _TCHAR* prefix)
 	}
 
 	while ((entry = readdir(dir)) != NULL) {
-		if (filter(entry)) {
+		if (filter(entry, isFolder(path, entry->d_name))) {
 			if (candidate == NULL) {
 				candidate = _tcsdup(entry->d_name);
 			} else if (compareVersions(candidate + prefixLength + 1, entry->d_name + prefixLength + 1) < 0) {
@@ -462,6 +479,17 @@ _TCHAR* findFile( _TCHAR* path, _TCHAR* prefix)
 	return result;
 }
 
+int isFolder(const _TCHAR* path, const _TCHAR* entry) {
+	int result = 0;
+	struct _stat stats;
+	_TCHAR * fullPath = malloc((_tcslen(path) + _tcslen(entry) + 2) * sizeof(_TCHAR));
+	_stprintf(fullPath, _T_ECLIPSE("%s%c%s"), path, dirSeparator, entry);
+	
+	result = _tstat(fullPath, &stats);
+	free(fullPath);
+	return (result == 0 && (stats.st_mode & S_IFDIR) != 0);
+}
+
 /*
  * If path is relative, attempt to make it absolute by 
  * 1) check relative to working directory
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.h
index 342a684..655f901 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseCommon.h
@@ -20,31 +20,8 @@
 #define MAX_PATH_LENGTH   2000
 
 #ifdef UNICODE
-#define pathSeparator pathSeparatorW
-#define dirSeparator dirSeparatorW
-#define getOfficialName getOfficialNameW
-#define parseArgs parseArgsW
-#define displayMessage displayMessageW
-#define getProgramDir getProgramDirW
-#define findCommand findCommandW
-#define findSymlinkCommand findSymlinkCommandW
-#define findFile findFileW
-#define loadLibrary loadLibraryW
-#define unloadLibrary unloadLibraryW
-#define findSymbol findSymbolW
 #define run runW
 #define setInitialArgs setInitialArgsW
-#define toNarrow toNarrowW
-#define osArg osArgW
-#define wsArg wsArgW
-#define osArchArg osArchArgW
-#define resolveSymlinks resolveSymlinksW
-#define checkPath checkPathW
-#define lastDirSeparator lastDirSeparatorW
-#define firstDirSeparator firstDirSeparatorW
-#endif
-
-#ifdef UNICODE
 #define RUN_METHOD		 _T_ECLIPSE("runW")
 #define SET_INITIAL_ARGS _T_ECLIPSE("setInitialArgsW")
 #else
@@ -68,10 +45,7 @@ extern _TCHAR*  wsArg;
 
 extern _TCHAR   dirSeparator;         /* '/' or '\\' */
 extern _TCHAR   pathSeparator;        /* separator used in PATH variable */
-
-#ifdef AIX
-extern _TCHAR*	eclipseLibrary;			/* the location of this eclipse_<ver>.so library */
-#endif
+extern _TCHAR* eclipseLibrary;		/* path the the eclipse_<ver>.so shared library */
 
 extern char *toNarrow(const _TCHAR* src);
 
@@ -94,6 +68,12 @@ extern _TCHAR* getProgramDir();
 
 extern _TCHAR* getOfficialName();
 
+extern void setOfficialName(_TCHAR * name);
+
+extern _TCHAR* getProgramPath();
+
+extern void setProgramPath(_TCHAR* name);
+
 extern _TCHAR* resolveSymlinks( _TCHAR* path );
 
 /** Display a Message
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.c
index 8212c4e..29e7f33 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *	   Martin Oberhuber (Wind River) - [316975] memory leak on failure reading .ini file
  *******************************************************************************/
 
 #include "eclipseOS.h"
@@ -84,10 +85,6 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
 	size_t bufferSize = 1024;
 	size_t length;
 	
-	/* allocate buffers */
-	buffer =  (_TCHAR*)malloc(bufferSize * sizeof(_TCHAR));
-	argument = (_TCHAR*)malloc(bufferSize * sizeof(_TCHAR));
-	
 	/* Open the config file as a text file 
 	 * Note that carriage return-linefeed combination \r\n are automatically
 	 * translated into single linefeeds on input in the t (translated) mode
@@ -96,6 +93,10 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
 	file = _tfopen(config_file, _T_ECLIPSE("rt"));	
 	if (file == NULL) return -3;
 
+	/* allocate buffers */
+	buffer =  (_TCHAR*)malloc(bufferSize * sizeof(_TCHAR));
+	argument = (_TCHAR*)malloc(bufferSize * sizeof(_TCHAR));
+
 	*argv = (_TCHAR **)malloc((1 + maxArgs) * sizeof(_TCHAR*));
 	
 	index = 0;
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.h
index 012f710..5315beb 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseConfig.h
@@ -12,12 +12,6 @@
 #ifndef ECLIPSE_CONFIG_H
 #define ECLIPSE_CONFIG_H
 
-#ifdef UNICODE
-#define readIniFile readIniFileW
-#define readConfigFile readConfigFileW
-#define freeConfig freeConfigW
-#endif
-
 /* Configuration file reading utilities */
 
 /**
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.c
index 226b5fb..845c646 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.c
@@ -18,117 +18,136 @@
 #include <stdlib.h>
 #include <string.h>
 
+
+static _TCHAR* failedToLoadLibrary = _T_ECLIPSE("Failed to load the JNI shared library \"%s\".\n");
+static _TCHAR* createVMSymbolNotFound = _T_ECLIPSE("The JVM shared library \"%s\"\ndoes not contain the JNI_CreateJavaVM symbol.\n");
+static _TCHAR* failedCreateVM = _T_ECLIPSE("Failed to create the Java Virtual Machine.\n");
+static _TCHAR* internalExpectedVMArgs = _T_ECLIPSE("Internal Error, the JVM argument list is empty.\n");
+static _TCHAR* mainClassNotFound = _T_ECLIPSE("Failed to find a Main Class in \"%s\".\n");
+
 static JNINativeMethod natives[] = {{"_update_splash", "()V", (void *)&update_splash},
 									{"_get_splash_handle", "()J", (void *)&get_splash_handle},
 									{"_set_exit_data", "(Ljava/lang/String;Ljava/lang/String;)V", (void *)&set_exit_data},
+									{"_set_launcher_info", "(Ljava/lang/String;Ljava/lang/String;)V", (void *)&set_launcher_info},
 									{"_show_splash", "(Ljava/lang/String;)V", (void *)&show_splash},
 									{"_takedown_splash", "()V", (void *)&takedown_splash}};
-  
-#ifdef UNICODE
-#define setExitData setExitDataW
-#elif WIN32
-extern void setExitDataW(JNIEnv *env, jstring id, jstring s);
-#endif
 
 /* local methods */
 static jstring newJavaString(JNIEnv *env, _TCHAR * str);
-static void splash(JNIEnv *env, jstring s);
 static void registerNatives(JNIEnv *env);
 static int shouldShutdown(JNIEnv *env);
 static void JNI_ReleaseStringChars(JNIEnv *env, jstring s, const _TCHAR* data);
 static const _TCHAR* JNI_GetStringChars(JNIEnv *env, jstring str);
 static char * getMainClass(JNIEnv *env, _TCHAR * jarFile);
-#ifdef AIX
 static void setLibraryLocation(JNIEnv *env, jobject obj);
-#endif
-
-void setExitData(JNIEnv *env, jstring id, jstring s);
 
 static JavaVM * jvm = 0;
 static JNIEnv *env = 0;
 
-/* JNI Methods                                 
- * we only want one version of the JNI functions 
- * Because there are potentially ANSI and UNICODE versions of everything, we need to be
- * able to call out to either, so we will set hooks depending on which version of 
- * registerNatives gets called.
- */
-#if (!defined(UNICODE) || defined(VISTA))
-void (* exitDataHook)(JNIEnv *env, jstring id, jstring s);
-void (* dispatchHook)();
-jlong (* splashHandleHook)();
-void (* showSplashHook)(JNIEnv *env, jstring s);
-void (* takeDownHook)();
-#else
-extern void (* exitDataHook)(JNIEnv *env, jstring id, jstring s);
-extern void (* dispatchHook)();
-extern jlong (* splashHandleHook)();
-extern void (* showSplashHook)(JNIEnv *env, jstring s);
-extern void (* takeDownHook)();
+/* cache String class and methods to avoid looking them up all the time */
+static jclass string_class = NULL;
+#if !defined(UNICODE) && !defined(MACOSX)
+static jmethodID string_getBytesMethod = NULL;
+static jmethodID string_ctor = NULL;
 #endif
 
-#if (!defined(UNICODE) || defined(VISTA)) 
 /* JNI Callback methods */
 JNIEXPORT void JNICALL set_exit_data(JNIEnv * env, jobject obj, jstring id, jstring s){
-	if(exitDataHook != NULL)
-		exitDataHook(env, id, s);
-	else /* hook was not set, just call the ANSI version */
-#if (defined(_WIN32) || defined(VISTA))
-		setExitDataW(env, id, s);
-#else
-		setExitData(env, id, s);
-#endif
+	const _TCHAR* data = NULL;
+	const _TCHAR* sharedId = NULL;
+	size_t length;
+	 
+	if(s != NULL) {
+		length = (*env)->GetStringLength(env, s);
+		if(!(*env)->ExceptionOccurred(env)) {
+			data = JNI_GetStringChars(env, s);
+			if (data != NULL) {
+				if(id != NULL) {
+					sharedId = JNI_GetStringChars(env, id);
+					if(sharedId != NULL) {
+						setSharedData(sharedId, data);
+						JNI_ReleaseStringChars(env, id, sharedId);
+					}
+				} else {
+					exitData = malloc((length + 1) * sizeof(_TCHAR*));
+					_tcsncpy( exitData, data, length);
+					exitData[length] = _T_ECLIPSE('\0');
+				}
+				JNI_ReleaseStringChars(env, s, data);
+			}
+		}
+		if(data == NULL && sharedId == NULL) {
+			(*env)->ExceptionDescribe(env);
+			(*env)->ExceptionClear(env);
+		}
+	}
+}
+
+JNIEXPORT void JNICALL set_launcher_info(JNIEnv * env, jobject obj, jstring launcher, jstring name){
+	const _TCHAR* launcherPath = NULL;
+	const _TCHAR* launcherName = NULL;
+	
+	if (launcher != NULL) {
+		launcherPath = JNI_GetStringChars(env, launcher);
+		if (launcherPath != NULL) {
+			setProgramPath(_tcsdup(launcherPath));
+			JNI_ReleaseStringChars(env, launcher, launcherPath);
+		}
+	}
+	
+	if (name != NULL) {
+		launcherName = JNI_GetStringChars(env, name);
+		if (launcherName != NULL) {
+			setOfficialName(_tcsdup(launcherName));
+			JNI_ReleaseStringChars(env, name, launcherName);
+		}
+	}
 }
 
+
 JNIEXPORT void JNICALL update_splash(JNIEnv * env, jobject obj){
-	if(dispatchHook != NULL)
-		dispatchHook();
-	else
-		dispatchMessages();
+	dispatchMessages();
 }
 
 JNIEXPORT jlong JNICALL get_splash_handle(JNIEnv * env, jobject obj){
-	if(splashHandleHook != NULL)
-		return splashHandleHook();
-	else
-		return getSplashHandle();
+	return getSplashHandle();
 }
 
 JNIEXPORT void JNICALL show_splash(JNIEnv * env, jobject obj, jstring s){
-#ifdef AIX
+	const _TCHAR* data = NULL;
+	
 	setLibraryLocation(env, obj);
-#endif
-
-	if(showSplashHook != NULL)
-		showSplashHook(env, s);
-	else
-		splash(env, s);	
+	
+	if(s != NULL) {
+		data = JNI_GetStringChars(env, s);
+		if(data != NULL) {
+			showSplash(data);
+			JNI_ReleaseStringChars(env, s, data);
+		} else {
+			(*env)->ExceptionDescribe(env);
+			(*env)->ExceptionClear(env);
+		}
+	}
 }
 
 JNIEXPORT void JNICALL takedown_splash(JNIEnv * env, jobject obj){
-	if(takeDownHook != NULL)
-		takeDownHook();
-	else
-		takeDownSplash();
+	takeDownSplash();
 }
-#endif
 
-
-#ifdef AIX
 /*
  * On AIX we need the location of the eclipse shared library so that we
  * can find the libeclipse-motif.so library.  Reach into the JNIBridge
  * object to get the "library" field.
  */
-void setLibraryLocation(JNIEnv * env, jobject obj) {
+static void setLibraryLocation(JNIEnv * env, jobject obj) {
 	jclass bridge = (*env)->FindClass(env, "org/eclipse/equinox/launcher/JNIBridge");
 	if (bridge != NULL) {
 		jfieldID libraryField = (*env)->GetFieldID(env, bridge, "library", "Ljava/lang/String;");
 		if (libraryField != NULL) {
 			jstring stringObject = (jstring) (*env)->GetObjectField(env, obj, libraryField);
 			if (stringObject != NULL) {
-				const char * str = JNI_GetStringChars(env, stringObject);
-				eclipseLibrary = strdup(str);
+				const _TCHAR * str = JNI_GetStringChars(env, stringObject);
+				eclipseLibrary = _tcsdup(str);
 				JNI_ReleaseStringChars(env, stringObject, str);
 			}
 		}
@@ -138,7 +157,6 @@ void setLibraryLocation(JNIEnv * env, jobject obj) {
 		(*env)->ExceptionClear(env);
 	}
 }
-#endif
 
 static void registerNatives(JNIEnv *env) {
 	jclass bridge = (*env)->FindClass(env, "org/eclipse/equinox/launcher/JNIBridge");
@@ -150,58 +168,8 @@ static void registerNatives(JNIEnv *env) {
 		(*env)->ExceptionDescribe(env);
 		(*env)->ExceptionClear(env);
 	}
-	/*set hooks*/
-	splashHandleHook = &getSplashHandle;
-	exitDataHook = &setExitData;
-	dispatchHook = &dispatchMessages;
-	showSplashHook = &splash;
-	takeDownHook = &takeDownSplash;
 }
 
-static void splash(JNIEnv *env, jstring s) {
-	const _TCHAR* data = NULL;
-	if(s != NULL) {
-		data = JNI_GetStringChars(env, s);
-		if(data != NULL) {
-			showSplash(data);
-			JNI_ReleaseStringChars(env, s, data);
-		} else {
-			(*env)->ExceptionDescribe(env);
-			(*env)->ExceptionClear(env);
-		}
-	}
-}
-
-void setExitData(JNIEnv *env, jstring id, jstring s){
-	const _TCHAR* data = NULL;
-	const _TCHAR* sharedId = NULL;
-	size_t length;
-	 
-	if(s != NULL) {
-		length = (*env)->GetStringLength(env, s);
-		if(!(*env)->ExceptionOccurred(env)) {
-			data = JNI_GetStringChars(env, s);
-			if (data != NULL) {
-				if(id != NULL) {
-					sharedId = JNI_GetStringChars(env, id);
-					if(sharedId != NULL) {
-						setSharedData(sharedId, data);
-						JNI_ReleaseStringChars(env, id, sharedId);
-					}
-				} else {
-					exitData = malloc((length + 1) * sizeof(_TCHAR*));
-					_tcsncpy( exitData, data, length);
-					exitData[length] = _T_ECLIPSE('\0');
-				}
-				JNI_ReleaseStringChars(env, s, data);
-			}
-		}
-		if(data == NULL && sharedId == NULL) {
-			(*env)->ExceptionDescribe(env);
-			(*env)->ExceptionClear(env);
-		}
-	}
-}
 
 /* Get a _TCHAR* from a jstring, string should be released later with JNI_ReleaseStringChars */
 static const _TCHAR * JNI_GetStringChars(JNIEnv *env, jstring str) {
@@ -221,11 +189,13 @@ static const _TCHAR * JNI_GetStringChars(JNIEnv *env, jstring str) {
 #else
 	/* Other platforms, use java's default encoding */ 
 	_TCHAR* buffer = NULL;
-	jclass stringClass = (*env)->FindClass(env, "java/lang/String");
-	if (stringClass != NULL) {
-		jmethodID getBytesMethod = (*env)->GetMethodID(env, stringClass, "getBytes", "()[B");
-		if (getBytesMethod != NULL) {
-			jbyteArray bytes = (*env)->CallObjectMethod(env, str, getBytesMethod);
+	if (string_class == NULL)
+		string_class = (*env)->FindClass(env, "java/lang/String");
+	if (string_class != NULL) {
+		if (string_getBytesMethod == NULL)
+			string_getBytesMethod = (*env)->GetMethodID(env, string_class, "getBytes", "()[B");
+		if (string_getBytesMethod != NULL) {
+			jbyteArray bytes = (*env)->CallObjectMethod(env, str, string_getBytesMethod);
 			if (!(*env)->ExceptionOccurred(env)) {
 				jsize length = (*env)->GetArrayLength(env, bytes);
 				buffer = malloc( (length + 1) * sizeof(_TCHAR*));
@@ -267,13 +237,15 @@ static jstring newJavaString(JNIEnv *env, _TCHAR * str)
 	size_t length = _tcslen(str);
 	jbyteArray bytes = (*env)->NewByteArray(env, length);
 	if(bytes != NULL) {
-		(*env)->SetByteArrayRegion(env, bytes, 0, length, str);
+		(*env)->SetByteArrayRegion(env, bytes, 0, length, (jbyte *)str);
 		if (!(*env)->ExceptionOccurred(env)) {
-			jclass stringClass = (*env)->FindClass(env, "java/lang/String");
-			if(stringClass != NULL) {
-				jmethodID ctor = (*env)->GetMethodID(env, stringClass, "<init>",  "([B)V");
-				if(ctor != NULL) {
-					newString = (*env)->NewObject(env, stringClass, ctor, bytes);
+			if (string_class == NULL)
+				string_class = (*env)->FindClass(env, "java/lang/String");
+			if(string_class != NULL) {
+				if (string_ctor == NULL)
+					string_ctor = (*env)->GetMethodID(env, string_class, "<init>",  "([B)V");
+				if(string_ctor != NULL) {
+					newString = (*env)->NewObject(env, string_class, string_ctor, bytes);
 				}
 			}
 		}
@@ -289,16 +261,16 @@ static jstring newJavaString(JNIEnv *env, _TCHAR * str)
 
 static jobjectArray createRunArgs( JNIEnv *env, _TCHAR * args[] ) {
 	int index = 0, length = -1;
-	jclass stringClass;
 	jobjectArray stringArray = NULL;
 	jstring string;
 	
 	/*count the number of elements first*/
 	while(args[++length] != NULL);
 	
-	stringClass = (*env)->FindClass(env, "java/lang/String");
-	if(stringClass != NULL) {
-		stringArray = (*env)->NewObjectArray(env, length, stringClass, 0);
+	if (string_class == NULL)
+		string_class = (*env)->FindClass(env, "java/lang/String");
+	if(string_class != NULL) {
+		stringArray = (*env)->NewObjectArray(env, length, string_class, 0);
 		if(stringArray != NULL) {
 			for( index = 0; index < length; index++) {
 				string = newJavaString(env, args[index]);
@@ -321,16 +293,16 @@ static jobjectArray createRunArgs( JNIEnv *env, _TCHAR * args[] ) {
 	return stringArray;
 }
 					 
-int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
+JavaResults * startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
 {
 	int i;
 	int numVMArgs = -1;
-	int jvmExitCode = -1;
 	void * jniLibrary;
 	JNI_createJavaVM createJavaVM;
 	JavaVMInitArgs init_args;
 	JavaVMOption * options;
 	char * mainClassName = NULL;
+	JavaResults * results = NULL;
 	
 	/* JNI reflection */
 	jclass mainClass = NULL;			/* The Main class to load */
@@ -339,14 +311,23 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 	jmethodID runMethod = NULL;			/* Main.run(String[]) */
 	jobjectArray methodArgs = NULL;		/* Arguments to pass to run */
 	
+	results = malloc(sizeof(JavaResults));
+	memset(results, 0, sizeof(JavaResults));
+	
 	jniLibrary = loadLibrary(libPath);
 	if(jniLibrary == NULL) {
-		return -1; /*error*/
+		results->launchResult = -1;
+		results->errorMessage = malloc((_tcslen(failedToLoadLibrary) + _tcslen(libPath) + 1) * sizeof(_TCHAR));
+		_stprintf(results->errorMessage, failedToLoadLibrary, libPath);
+		return results; /*error*/
 	}
 
 	createJavaVM = (JNI_createJavaVM)findSymbol(jniLibrary, _T_ECLIPSE("JNI_CreateJavaVM"));
 	if(createJavaVM == NULL) {
-		return -1; /*error*/
+		results->launchResult = -2;
+		results->errorMessage = malloc((_tcslen(createVMSymbolNotFound) + _tcslen(libPath) + 1) * sizeof(_TCHAR));
+		_stprintf(results->errorMessage, createVMSymbolNotFound, libPath);
+		return results; /*error*/
 	}
 	
 	/* count the vm args */
@@ -354,7 +335,9 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 	
 	if(numVMArgs <= 0) {
 		/*error, we expect at least the required vm arg */
-		return -1;
+		results->launchResult = -3;
+		results->errorMessage = _tcsdup(internalExpectedVMArgs);
+		return results;
 	}
 	
 	options = malloc(numVMArgs * sizeof(JavaVMOption));
@@ -390,6 +373,7 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 		}	
 
 		if(mainClass != NULL) {
+			results->launchResult = -6; /* this will be reset to 0 below on success */
 			mainConstructor = (*env)->GetMethodID(env, mainClass, "<init>", "()V");
 			if(mainConstructor != NULL) {
 				mainObject = (*env)->NewObject(env, mainClass, mainConstructor);
@@ -398,19 +382,27 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 					if(runMethod != NULL) {
 						methodArgs = createRunArgs(env, progArgs);
 						if(methodArgs != NULL) {
-							jvmExitCode = (*env)->CallIntMethod(env, mainObject, runMethod, methodArgs);
+							results->launchResult = 0;
+							results->runResult = (*env)->CallIntMethod(env, mainObject, runMethod, methodArgs);
 							(*env)->DeleteLocalRef(env, methodArgs);
 						}
 					}
 					(*env)->DeleteLocalRef(env, mainObject);
 				}
 			}
-		} 
+		} else {
+			results->launchResult = -5;
+			results->errorMessage = malloc((_tcslen(mainClassNotFound) + _tcslen(jarFile) + 1) * sizeof(_TCHAR));
+			_stprintf(results->errorMessage, mainClassNotFound, jarFile);
+		}
 		if((*env)->ExceptionOccurred(env)){
 			(*env)->ExceptionDescribe(env);
 			(*env)->ExceptionClear(env);
 		}
 		
+	} else {
+		results->launchResult = -4;
+		results->errorMessage = _tcsdup(failedCreateVM);
 	}
 
 	/* toNarrow allocated new strings, free them */
@@ -418,7 +410,7 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR*
 		free( options[i].optionString );
 	}
 	free(options);
-	return jvmExitCode;
+	return results;
 }
 
 static char * getMainClass(JNIEnv *env, _TCHAR * jarFile) {
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.h
index 331751b..3ef4b89 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseJNI.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -14,19 +14,18 @@
 #include "eclipseUnicode.h"
 #include <jni.h>
 
-#ifdef UNICODE
-#define loadVMLibrary loadVMLibraryW
-#define unloadVMLibrary unloadVMLibraryW
-#define getInvocationFunction getInvocationFunctionW
-#define startJavaJNI startJavaJNIW
-#define cleanupVM cleanupVMW
-#endif
+typedef struct {
+	int launchResult;
+	int runResult;
+	_TCHAR * errorMessage;
+} JavaResults;
 
 typedef jint (JNICALL *JNI_createJavaVM)(JavaVM **pvm, JNIEnv **env, void *args);
 
 /* JNI Callback methods */
 /* Use name mangling since we may be linking these from java with System.LoadLibrary */
 #define set_exit_data 		Java_org_eclipse_equinox_launcher_JNIBridge__1set_1exit_1data
+#define set_launcher_info	Java_org_eclipse_equinox_launcher_JNIBridge__1set_1launcher_1info
 #define update_splash 		Java_org_eclipse_equinox_launcher_JNIBridge__1update_1splash
 #define show_splash			Java_org_eclipse_equinox_launcher_JNIBridge__1show_1splash
 #define get_splash_handle 	Java_org_eclipse_equinox_launcher_JNIBridge__1get_1splash_1handle
@@ -42,6 +41,12 @@ extern "C" {
 JNIEXPORT void JNICALL set_exit_data(JNIEnv *, jobject, jstring, jstring);
 
 /*
+ * org_eclipse_equinox_launcher_JNIBridge#_set_launcher_info
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL set_launcher_info(JNIEnv *, jobject, jstring, jstring);
+
+/*
  * org_eclipse_equinox_launcher_JNIBridge#_update_splash
  * Signature: ()V
  */
@@ -76,7 +81,7 @@ JNIEXPORT void JNICALL takedown_splash(JNIEnv *, jobject);
  * be returned to the main launcher, which will display a message if
  * the termination was not normal.
  */
-extern int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile );
+extern JavaResults* startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile );
 
 extern void cleanupVM( int );
 #endif
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseMain.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseMain.c
index 6265ed3..fe52730 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseMain.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseMain.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -43,7 +43,6 @@ typedef void (*SetInitialArgs)(int argc, _TCHAR*argv[], _TCHAR* library);
 static _TCHAR*  name          = NULL;			/* program name */
 static _TCHAR** userVMarg     = NULL;     		/* user specific args for the Java VM  */
 static _TCHAR*  programDir	  = NULL;			/* directory where program resides */
-static _TCHAR*  library		  = NULL;			/* pathname of the eclipse shared library */
 static _TCHAR*  officialName  = NULL;
 static int      suppressErrors = 0;				/* supress error dialogs */
 
@@ -57,47 +56,39 @@ static _TCHAR*  checkForIni(int argc, _TCHAR* argv[]);
 static int initialArgc;
 static _TCHAR** initialArgv;
 
-#ifdef AIX
-_TCHAR * eclipseLibrary = NULL;
-#endif
+_TCHAR* eclipseLibrary = NULL; /* path to the eclipse shared library */
 
-#if (defined(_WIN32) || defined(VISTA))
 #ifdef UNICODE
 extern int main(int, char**);
 int mainW(int, wchar_t**);
 int wmain( int argc, wchar_t** argv ) {
-#ifndef VISTA
-	OSVERSIONINFOW info;
-	info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
+	return mainW(argc, argv);
+}
+
+int main(int argc, char* argv[]) {
 	/*
-	* If the OS supports UNICODE functions, run the UNICODE version
-	* of the main function. Otherwise, convert the arguments to
-	* MBCS and run the ANSI version of the main function.
+	* Run the UNICODE version, convert the arguments from MBCS to UNICODE
 	*/
-	if (!GetVersionExW (&info)) {
-		int i, result;
-		char **newArgv = malloc(argc * sizeof(char *));
-		for (i=0; i<argc; i++) {
-			wchar_t *oldArg = argv[i];
-			int byteCount = WideCharToMultiByte (CP_ACP, 0, oldArg, -1, NULL, 0, NULL, NULL);
-			char *newArg  = malloc(byteCount+1);
-			newArg[byteCount] = 0;
-			WideCharToMultiByte (CP_ACP, 0, oldArg, -1, newArg, byteCount, NULL, NULL);
-			newArgv[i] = newArg;
-		}
-		result = main(argc, newArgv);
-		for (i=0; i<argc; i++) {
-			free(newArgv[i]);
-		}
-		free(newArgv);
-		return result;
+	int i, result;
+	wchar_t **newArgv = malloc(argc * sizeof(wchar_t *));
+	for (i=0; i<argc; i++) {
+		char *oldArg = argv[i];
+		int numChars = MultiByteToWideChar(CP_ACP, 0, oldArg, -1, NULL, 0);
+		wchar_t *newArg  = malloc((numChars + 1) * sizeof(wchar_t));
+		newArg[numChars] = 0;
+		MultiByteToWideChar(CP_ACP, 0, oldArg, -1, newArg, numChars);
+		newArgv[i] = newArg;
 	}
-#endif
-	return mainW(argc, argv);
+	result = mainW(argc, newArgv);
+	for (i=0; i<argc; i++) {
+		free(newArgv[i]);
+	}
+	free(newArgv);
+	return result;
 }
+
 #define main mainW
 #endif /* UNICODE */
-#endif /* _WIN32 */
 
 int main( int argc, _TCHAR* argv[] )
 {
@@ -164,13 +155,10 @@ int main( int argc, _TCHAR* argv[] )
     programDir = getProgramDir(program);
 
 	/* Find the eclipse library */
-	library = findLibrary(library, program);
-#ifdef AIX
-	eclipseLibrary = library;
-#endif
+    eclipseLibrary = findLibrary(eclipseLibrary, program);
 		
-	if(library != NULL)
-		handle = loadLibrary(library);
+	if(eclipseLibrary != NULL)
+		handle = loadLibrary(eclipseLibrary);
 	if(handle == NULL) {
 		errorMsg = malloc( (_tcslen(libraryMsg) + _tcslen(officialName) + 10) * sizeof(_TCHAR) );
         _stprintf( errorMsg, libraryMsg, officialName );
@@ -184,7 +172,7 @@ int main( int argc, _TCHAR* argv[] )
 
 	setArgs = (SetInitialArgs)findSymbol(handle, SET_INITIAL_ARGS);
 	if(setArgs != NULL)
-		setArgs(initialArgc, initialArgv, library);
+		setArgs(initialArgc, initialArgv, eclipseLibrary);
 	else {
 		if(!suppressErrors)
 			displayMessage(officialName, entryMsg);
@@ -205,7 +193,7 @@ int main( int argc, _TCHAR* argv[] )
 	}
 	unloadLibrary(handle);
 	
-	free( library );
+	free( eclipseLibrary );
     free( programDir );
     free( program );
     free( officialName );
@@ -213,6 +201,10 @@ int main( int argc, _TCHAR* argv[] )
 	return exitCode;
 }
 
+_TCHAR* getProgramPath() {
+	return NULL;
+}
+
 static _TCHAR* findProgram(_TCHAR* argv[]) {
 	_TCHAR * program;
 #ifdef _WIN32
@@ -266,7 +258,7 @@ static void parseArgs( int* pArgc, _TCHAR* argv[] )
         } else if(_tcsicmp(argv[index], NAME) == 0) {
         	name = argv[++index];
         } else if(_tcsicmp(argv[index], LIBRARY) == 0) {
-        	library = argv[++index];
+        	eclipseLibrary = argv[++index];
         } else if(_tcsicmp(argv[index], SUPRESSERRORS) == 0) {
         	suppressErrors = 1;
         } 
@@ -404,7 +396,7 @@ static _TCHAR* findLibrary(_TCHAR* library, _TCHAR* program)
 	struct _stat stats;
 	
 	if (library != NULL) {
-		path = checkPath(library, programDir, 0);
+		path = checkPath(library, programDir, 1);
 		if (_tstat(path, &stats) == 0 && (stats.st_mode & S_IFDIR) != 0) 
         {
             /* directory, find the highest version eclipse_* library */
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseMozilla.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseMozilla.c
index 45a01d6..956ae17 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseMozilla.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseMozilla.c
@@ -27,12 +27,15 @@
 int filter(const struct dirent *dir)
 {
 	char* prefixes[] = {
-		"xulrunner-",
-		"mozilla-seamonkey-",
-		"seamonkey-",
-		"mozilla-",
-		"mozilla-firefox-",
-		"firefox-",
+		"xulrunner\0",
+		"xulrunner-1",
+		"mozilla-seamonkey-1",
+		"seamonkey-1",
+		"mozilla-1",
+		"mozilla-firefox-2",
+		"firefox-2",
+		"mozilla-firefox-3",
+		"firefox-3",
 		NULL
 	};
 	int XULRUNNER_INDEX = 0;
@@ -68,22 +71,16 @@ int filter(const struct dirent *dir)
 			 */
 			if (index == XULRUNNER_INDEX) return 1;	/* include in scandir result */
 
-			/* Check if the first character following the prefix is a numeric digit.
-			 * This ensures that the suffix represents a version number like
-			 * "mozilla-1.7.3", and not a different product like "mozilla-thunderbird".
-			 */
 			int dirLength = strlen(dirname);
-			if (dirLength == prefixLength || ('0' <= dirname[prefixLength] && dirname[prefixLength] <= '9')) {
-				char* testpath = malloc (strlen(root) + dirLength + strlen(testlib) + 1);
-				strcpy(testpath, root);
-				strcat(testpath, dirname);
-				strcat(testpath, testlib);
-				int success = stat(testpath, &buf) == 0;
-				free(testpath);
-				if (success)
-				{
-					return 1;	/* include in scandir result */
-				}
+			char* testpath = malloc (strlen(root) + dirLength + strlen(testlib) + 1);
+			strcpy(testpath, root);
+			strcat(testpath, dirname);
+			strcat(testpath, testlib);
+			int success = stat(testpath, &buf) == 0;
+			free(testpath);
+			if (success)
+			{
+				return 1;	/* include in scandir result */
 			}
 		}
 		prefix = prefixes [++index];
@@ -200,7 +197,7 @@ void fixEnvForMozilla() {
 		/* Try some common installation locations. */
 		if (grePath == NULL)
 		{
-			/* try xulrunner-*, mozilla-*, firefox-* directories in /usr/lib/ */
+			/* try xulrunner-1*, mozilla-1*, firefox-2/3*, seamonkey-1* directories in /usr/lib/ */
 #if defined(__amd64__) || defined(__x86_64__) || defined(__powerpc64__)
 			char* dir = "/usr/lib64/";
 #else
@@ -215,8 +212,8 @@ void fixEnvForMozilla() {
 			int count = scandir(dir, &namelist, filter, alphasort);
 			if (count > 0)
 			{
-				/* count-1 is used below in an attempt to get the matched directory
-				 * with the latest version number.
+				/* count-1 is used below in an attempt to choose XULRunner
+				 * any time one is found
 				 */
 				char* name = namelist [count - 1]->d_name;
 #endif
@@ -308,11 +305,20 @@ void fixEnvForMozilla() {
 
 		if (grePath != NULL)
 		{
-			ldPath = (char*)realloc(ldPath, strlen(ldPath) + strlen(grePath) + 2);
-			if (strlen(ldPath) > 0) strcat(ldPath, ":");
-			strcat(ldPath, grePath);
-			setenv("LD_LIBRARY_PATH", ldPath, 1);
-			
+			/* If grePath contains "xul" then do not change the LD_LIBRARY_PATH,
+			 * since it is likely that a xulrunner (not a mozilla or firefox)
+			 * will be found at runtime.  Note that MOZILLA_FIVE_HOME is still
+			 * updated if grePath contains "xul" since this variable can act as
+			 * a backup GRE to try if an initially-detected one fails to load.
+			 */
+			char* current = strrchr(grePath, 'x');
+			if (current == NULL || strncmp(current, "xul", 3) != 0) {
+				ldPath = (char*)realloc(ldPath, strlen(ldPath) + strlen(grePath) + 2);
+				if (strlen(ldPath) > 0) strcat(ldPath, ":");
+				strcat(ldPath, grePath);
+				setenv("LD_LIBRARY_PATH", ldPath, 1);
+			}
+
 			if (mozillaFiveHome == NULL) setenv("MOZILLA_FIVE_HOME", grePath, 1);
 			free(grePath);
 		}
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseNix.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseNix.c
index acd302e..37a08ef 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseNix.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseNix.c
@@ -169,7 +169,7 @@ void processVMArgs(_TCHAR **vmargs[] ) {
 	/* nothing yet */
 }
 
-int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
+JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
 {
 	return startJavaJNI(libPath, vmArgs, progArgs, jarFile);
 }
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseOS.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseOS.h
index 2cb9ff4..859bad4 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseOS.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseOS.h
@@ -13,33 +13,9 @@
 #ifndef ECLIPSE_OS_H
 #define ECLIPSE_OS_H
 
-#include <jni.h>
+#include "eclipseJNI.h"
 #include "eclipseUnicode.h"
 
-#ifdef UNICODE
-#define shippedVMDir shippedVMDirW
-#define defaultVM defaultVMW
-#define initWindowSystem initWindowSystemW
-#define showSplash showSplashW
-#define getArgVM getArgVMW
-#define findCommand findCommandW
-#define exitData exitDataW
-#define vmLibrary vmLibraryW
-#define findVMLibrary findVMLibraryW
-#define dispatchMessages dispatchMessagesW
-#define getSplashHandle getSplashHandleW
-#define takeDownSplash takeDownSplashW
-#define restartLauncher restartLauncherW
-#define launchJavaVM launchJavaVMW
-#define startJavaVM startJavaVMW
-#define eeLibPath eeLibPathW
-#define processVMArgs processVMArgsW
-#define initialArgv initialArgvW
-#define secondThread secondThreadW
-#define isSunVM isSunVMW
-#define getVMLibrarySearchPath getVMLibrarySearchPathW
-#endif
-
 #ifdef MACOSX
 #define JAVA_FRAMEWORK "/System/Library/Frameworks/JavaVM.framework"
 #endif
@@ -50,6 +26,9 @@
 
 /* Global Variables */
 extern _TCHAR*  defaultVM;   			/* name of VM to use normally      */
+#ifdef _WIN32
+extern _TCHAR*  consoleVM;				/* windows needs a different vm executable for the console */
+#endif
 extern _TCHAR*  shippedVMDir;			/* VM bin directory with separator */
 extern _TCHAR*  exitData;		  		/* exit data set from Java */
 extern _TCHAR*  vmLibrary;				/* name of the VM shared library */
@@ -122,10 +101,10 @@ extern void takeDownSplash();
 extern void restartLauncher( _TCHAR* program, _TCHAR* args[] );
 
 /* launch the vm in a separate process and wait for it to finish */
-extern int launchJavaVM( _TCHAR* args[] );
+extern JavaResults* launchJavaVM( _TCHAR* args[] );
 
 /* launch the vm in this process using JNI invocation */
-extern int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile );
+extern JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile );
 
 /* do any platform specific processing of the user vmargs */
 extern void processVMArgs(_TCHAR **vmargs[] );
@@ -136,5 +115,7 @@ extern int isSunVM( _TCHAR * javaVM, _TCHAR * jniLib );
 /* an array of paths that will need to be on the search path to load the vm shared library */
 extern _TCHAR ** getVMLibrarySearchPath(_TCHAR * vmLibrary);
 
+extern int reuseWorkbench(_TCHAR** filePath, int timeout);
+
 #endif /* ECLIPSE_OS_H */
 
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.c
index 7ed3b81..9934fe5 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.c
@@ -13,6 +13,8 @@
 #include "eclipseOS.h"
 #include "eclipseShm.h"
 
+static _TCHAR* ECLIPSE_UNITIALIZED = _T_ECLIPSE("ECLIPSE_UNINITIALIZED");
+
 #ifdef _WIN32
 
 #include <stdio.h>
@@ -32,6 +34,8 @@ int createSharedData(_TCHAR** id, int size) {
 		_stprintf(*id, _T_ECLIPSE("%lx_%lx"), GetCurrentProcessId(), (DWORD) mapHandle);
 #endif
 	}
+	/* set the shared data to "uninitialized" */
+	setSharedData(*id, ECLIPSE_UNITIALIZED);
 	return 0;
 }
 
@@ -75,6 +79,7 @@ int getSharedData(_TCHAR* id, _TCHAR** data) {
 	if (mapHandle == NULL) return -1;
 	sharedData = MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, 0);
 	if (sharedData == NULL) return -1;
+	if (_tcscmp(sharedData, ECLIPSE_UNITIALIZED)== 0) return 0;
 	if (data != NULL) {
 		size_t length = (_tcslen(sharedData) + 1) * sizeof(_TCHAR);
 		newData = malloc(length);
@@ -208,6 +213,7 @@ int createSharedData(char** id, int size) {
 		*id = malloc(9 * sizeof(char));
 		sprintf(*id, "%x", shmid);
 	}
+	setSharedData(*id, ECLIPSE_UNITIALIZED);
 	return 0;
 }
 
@@ -233,6 +239,7 @@ int getSharedData( char* id, char** data ) {
 	if (shmid == -1) return -1;
  	sharedData = shmat(shmid, (void *)0, 0);
     if (sharedData == (char *)(-1)) return -1;
+    if (_tcscmp(sharedData, ECLIPSE_UNITIALIZED) == 0) return 0;
     length = strlen(sharedData) + 1;
     newData = malloc(length);
     memcpy(newData, sharedData, length);
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.h
index be3b5d3..750d780 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseShm.h
@@ -13,13 +13,6 @@
 #ifndef ECLIPSE_SHM_H
 #define ECLIPSE_SHM_H
 
-#ifdef UNICODE
-#define createSharedData createSharedDataW
-#define destroySharedData destroySharedDataW
-#define getSharedData getSharedDataW
-#define setSharedData setSharedDataW
-#endif
-
 /* Shared memory utilities */
 
 /**
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.c b/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.c
index 47790c4..9ed7b68 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.c
@@ -78,7 +78,7 @@ int checkProvidedVMType( _TCHAR* vm )
 #ifdef _WIN32
 	if (_tcsicmp(ch, _T_ECLIPSE(".dll")) == 0)
 #else
-	if (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0)
+	if ((_tcsicmp(ch, _T_ECLIPSE(".so")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".jnilib")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".dylib")) == 0))
 #endif
 	{
 		return VM_LIBRARY;
@@ -133,20 +133,27 @@ _TCHAR * checkPathList( _TCHAR* pathList, _TCHAR* programDir, int reverseOrder)
     return result;
 }
 
-_TCHAR * concatStrings(_TCHAR** strs) {
+_TCHAR * concatStrings(_TCHAR**strs) {
+	return concatPaths(strs, 0);
+}
+
+_TCHAR * concatPaths(_TCHAR** strs, _TCHAR separator) {
+	_TCHAR separatorString[] = { separator, 0 };
 	_TCHAR * result;
 	int i = -1;
 	size_t length = 0;
 	/* first count how large a buffer we need */
-	while( strs[++i] != NULL) {
-		length += _tcslen(strs[i]);
+	while (strs[++i] != NULL) {
+		length += _tcslen(strs[i]) + (separator != 0 ? 1 : 0);
 	}
-	
+
 	result = malloc((length + 1) * sizeof(_TCHAR));
 	result[0] = 0;
 	i = -1;
-	while(strs[++i] != NULL) {
+	while (strs[++i] != NULL) {
 		result = _tcscat(result, strs[i]);
+		if (separator != 0)
+			result = _tcscat(result, separatorString);
 	}
 	return result;
 }
@@ -188,7 +195,7 @@ int isVMLibrary( _TCHAR* vm )
 #ifdef _WIN32
 	return (_tcsicmp(ch, _T_ECLIPSE(".dll")) == 0);
 #else
-	return (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0);
+	return (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".jnilib")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".dylib")) == 0);
 #endif
 }
 
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.h b/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.h
index 68086c3..970aba3 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/eclipseUtil.h
@@ -13,15 +13,6 @@
 #ifndef ECLIPSE_UTIL_H
 #define ECLIPSE_UTIL_H
 
-#ifdef UNICODE
-#define isJ9VM isJ9VMW
-#define isVMLibrary isVMLibraryW
-#define checkProvidedVMType checkProvidedVMTypeW
-#define checkPathList checkPathListW
-#define concatStrings concatStringsW
-#define containsPaths containsPathsW
-#endif
-
 /* constants for checkProvidedVMType */
 #define VM_NOTHING		0		/* NULL was given as input */
 #define VM_OTHER		1		/* don't know, could be executable or could be nothing */
@@ -46,6 +37,9 @@ extern _TCHAR * checkPathList( _TCHAR* pathList, _TCHAR* programDir, int reverse
 /* take a NULL terminated array of strings and concatenate them together into one string */
 extern _TCHAR * concatStrings(_TCHAR** strs);
 
+/* take a NULL terminated array of strings and concatenate them together using the give pathSeparator */
+extern _TCHAR* concatPaths(_TCHAR** paths, _TCHAR pathSeparator);
+
 /* check that the buffer contains all the given paths */
 extern int containsPaths(_TCHAR * str, _TCHAR** paths);
 
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh b/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh
index 7c9941d..f821793 100755
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #*******************************************************************************
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at 
@@ -57,7 +57,7 @@ case $OS in
 			"x86_64")
 				defaultOSArch="x86_64"
 				defaultJava=DEFAULT_JAVA_EXEC
-				javaHome="/usr/java64/1.5"
+				[ -d /usr/java64/1.5 ] && javaHome="/usr/java64/1.5"
 				OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
 				;;
 			i?86)
@@ -94,10 +94,16 @@ case $OS in
 				;;
 		esac
 		;;
+	"AIX")
+		makefile="make_aix.mak"
+		defaultOS="aix"
+		defaultOSArch="ppc64"
+		javaHome="/bluebird/teamswt/swt-builddir/JDKs/AIX/PPC64/j564/sdk"
+	;;
 	"SunOS")
 		makefile="make_solaris.mak"
 		defaultOS="solaris"
-		javaHome="/usr/jdk/jdk1.5.0_01"
+		[ -d /usr/jdk/jdk1.5.0_01 ] && javaHome="/usr/jdk/jdk1.5.0_01"
 		OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
 		#PATH=/usr/ccs/bin:/opt/SUNWspro/bin:$PATH
 		PATH=/usr/ccs/bin:/export/home/SUNWspro/bin:$PATH
@@ -153,13 +159,29 @@ PROGRAM_OUTPUT="$programOutput"
 DEFAULT_OS="$defaultOS"
 DEFAULT_OS_ARCH="$defaultOSArch"
 DEFAULT_WS="$defaultWS"
-JAVA_HOME=$javaHome
 DEFAULT_JAVA=$defaultJava
 
+if [ -n  $javaHome ]; then
+	JAVA_HOME=$javaHome
+	export JAVA_HOME
+fi
+
+if [ "$defaultOSArch" = "ppc64" ];  then
+	if [ "$defaultOS" = "aix" ];  then
+		M_ARCH=-maix64
+	else
+		M_ARCH=-m64
+	fi
+	export M_ARCH
+elif [ "$defaultOSArch" = "s390" ];  then
+	M_ARCH=-m31
+	export M_ARCH
+fi
+
 LIBRARY_DIR="../../../org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.$defaultWS.$defaultOS.$defaultOSArch"
 OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
 
-export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS JAVA_HOME DEFAULT_JAVA LIBRARY_DIR
+export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS DEFAULT_JAVA LIBRARY_DIR
 
 # If the OS is supported (a makefile exists)
 if [ "$makefile" != "" ]; then
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipse.ini b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipse.ini
new file mode 100644
index 0000000..f640dd2
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipse.ini
@@ -0,0 +1,4 @@
+--launcher.defaultAction
+openFile
+--launcher.library
+./eclipse_1305.so
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
index 343aeb3..9aeee5f 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -32,6 +32,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <locale.h>
+#include <semaphore.h>
+#include <fcntl.h>
 
 /* Global Variables */
 char*  defaultVM     = "java";
@@ -47,10 +49,189 @@ static GtkWidget*   shellHandle = 0;
 static GdkPixbuf*	pixbuf = 0;
 static GtkWidget*   image = 0;
 
+static sem_t* mutex;
+static Atom appWindowAtom, launcherWindowAtom;
+static _TCHAR** openFilePath = NULL; /* the files we want to open */
+static int openFileTimeout = 60; /* number of seconds to wait before timeout */
+
+static struct sigaction quitAction;
+static struct sigaction intAction;
+
 /* Local functions */
-static void log_handler(const gchar* domain, GLogLevelFlags flags, const gchar* msg, gpointer data) {
+static void catch_signal(int sig) {
+	//catch signals, free the lock, reinstall the original
+	//signal handlers and reraise the signal.
+	sem_post(mutex);
+	sem_close(mutex);
+	sigaction(SIGINT, &intAction, NULL);
+	sigaction(SIGQUIT, &intAction, NULL);
+	raise(sig);
+}
+
+typedef int (*LockFunc)();
+int executeWithLock(char *name, LockFunc func) {
+	int result = -1;
+	int lock = -1;
+	struct sigaction action;
+
+	mutex = sem_open(name, O_CREAT | O_EXCL, S_IRWXU | S_IRWXG | S_IRWXO, 1);
+	if (mutex == SEM_FAILED) {
+		//create failed. Probably lock is already created so try opening the existing lock.
+		mutex = sem_open(name, 0);
+	}
+	if (mutex == SEM_FAILED)
+		return -1; //this is an error.
+
+	// install signal handler to free the lock if something bad happens.
+	// sem_t is not freed automatically when a process ends.
+	action.sa_handler = catch_signal;
+	sigaction(SIGINT, &action, &intAction);
+	sigaction(SIGQUIT, &action, &quitAction);
+
+	while ((lock = sem_trywait(mutex)) != 0) {
+		if (errno == EAGAIN) {
+			//couldn't acquire lock, sleep a bit and try again
+			sleep(1);
+			if (--openFileTimeout > 0)
+				continue;
+		}
+		break;
+	}
+
+	if (lock == 0)
+		result = func();
+
+	sem_post(mutex);
+	sem_close(mutex);
+
+	//reinstall the original signal handlers
+	sigaction(SIGINT, &intAction, NULL);
+	sigaction(SIGQUIT, &quitAction, NULL);
+	return result;
+}
+
+static void log_handler(const gchar* domain, GLogLevelFlags flags,	const gchar* msg, gpointer data) {
 	/* nothing */
 }
+
+/* Create a "SWT_Window_" + APP_NAME string with optional suffix.
+ * Caller should free the memory when finished */
+static char * createSWTWindowString(char * suffix, int semaphore) {
+#ifdef SOLARIS
+	/* solaris requires semaphore names to start with '/' */
+	char * prefix = semaphore != 0 ? _T_ECLIPSE("/SWT_Window_") : _T_ECLIPSE("SWT_Window_");
+#else
+	char * prefix = _T_ECLIPSE("SWT_Window_");
+#endif
+	
+	char * result = malloc((_tcslen(prefix) + _tcslen(getOfficialName()) + (suffix != NULL ? _tcslen(suffix) : 0) + 1) * sizeof(char));
+	if (suffix != NULL)
+		_stprintf(result, _T_ECLIPSE("%s%s%s"), prefix, getOfficialName(), suffix);
+	else
+		_stprintf(result, _T_ECLIPSE("%s%s"), prefix, getOfficialName());
+	return result;
+}
+
+static int setAppWindowPropertyFn() {
+	Window appWindow;
+	GdkWindow *propWindow;
+	GdkAtom propAtom;
+	_TCHAR *propVal;
+
+	//Look for the SWT window. If it's there, set a property on it.
+	appWindow = gtk.XGetSelectionOwner(gtk_GDK_DISPLAY, appWindowAtom);
+	//appWindow = XGetSelectionOwner(GDK_DISPLAY(), appWindowAtom);
+	if (appWindow) {
+		propAtom = gtk.gdk_atom_intern("org.eclipse.swt.filePath.message", FALSE);
+		//append a colon delimiter in case more than one file gets appended to the app windows property.
+		propVal = concatPaths(openFilePath, _T_ECLIPSE(':'));
+		propWindow = gtk.gdk_window_foreign_new(appWindow);
+		if (propWindow != NULL) {
+			gtk.gdk_property_change(propWindow, propAtom, propAtom, 8, GDK_PROP_MODE_APPEND, (guchar *) propVal, _tcslen(propVal));
+			free(propVal);
+			return 1;
+		} //else the window got destroyed between XGetSelectionOwner and here (?)
+		free(propVal);
+	}
+	return 0;
+}
+
+/* set the Application window property by executing _setWindowPropertyFn within a semaphore */
+int setAppWindowProperty() {
+	int result;
+	char * mutexName = createSWTWindowString(NULL, 1);
+	result = executeWithLock(mutexName, setAppWindowPropertyFn);
+	gtk.XSync(gtk_GDK_DISPLAY, False);
+	free(mutexName);
+	return result;
+}
+
+/* timer callback function to call setAppWindowProperty */
+static gboolean setAppWindowTimerProc(gpointer data) {
+	//try to set the app window property. If unsuccessful return true to reschedule the timer.
+	openFileTimeout--;
+	return !setAppWindowProperty() && openFileTimeout > 0;
+}
+
+int createLauncherWindow() {
+	Window window, launcherWindow;
+	//check if a launcher window exists. If none exists, we know we are the first and we should be launching the app.
+	window = gtk.XGetSelectionOwner(gtk_GDK_DISPLAY, launcherWindowAtom);
+	if (window == 0) {
+		//create a launcher window that other processes can find.
+		launcherWindow = gtk.XCreateWindow(gtk_GDK_DISPLAY, gtk.XRootWindow(gtk_GDK_DISPLAY, gtk.XDefaultScreen(gtk_GDK_DISPLAY)), -10, -10, 1,
+				1, 0, 0, InputOnly, CopyFromParent, (unsigned long) 0, (XSetWindowAttributes *) NULL);
+		//for some reason Set and Get are both necessary. Set alone does nothing.
+		gtk.XSetSelectionOwner(gtk_GDK_DISPLAY, launcherWindowAtom, launcherWindow, CurrentTime);
+		gtk.XGetSelectionOwner(gtk_GDK_DISPLAY, launcherWindowAtom);
+		//add a timeout to set the property on the apps window once the app is launched.
+		gtk.g_timeout_add(1000, setAppWindowTimerProc, 0);
+		return 0;
+	}
+	return 1;
+}
+
+int reuseWorkbench(_TCHAR** filePath, int timeout) {
+	char *appName, *launcherName;
+	int result = 0;
+
+	if (initWindowSystem(&initialArgc, initialArgv, 1) != 0)
+		return -1;
+
+	openFileTimeout = timeout;
+	openFilePath = filePath;
+	
+	//App name is defined in SWT as well. Values must be consistent.
+	appName = createSWTWindowString(NULL, 0);
+	appWindowAtom = gtk.XInternAtom(gtk_GDK_DISPLAY, appName, FALSE);
+	free(appName);
+
+	//check if app is already running. Just set property if it is.
+	if (setAppWindowProperty() > 0)
+		return 1;
+
+	/* app is not running, create a launcher window to act as a mutex so we don't need to keep the semaphore locked */
+	launcherName = createSWTWindowString(_T_ECLIPSE("_Launcher"), 1);
+	launcherWindowAtom = gtk.XInternAtom(gtk_GDK_DISPLAY, launcherName, FALSE);
+	result = executeWithLock(launcherName, createLauncherWindow);
+	free(launcherName);
+
+	if (result == 1) {
+		//The app is already being launched in another process.  Set the property on that app window and exit
+		while (openFileTimeout > 0) {
+			if (setAppWindowProperty() > 0)
+				return 1; //success
+			else {
+				openFileTimeout--;
+				sleep(1);
+			}
+		}
+		//timed out trying to set the app property
+		result = 0;
+	}
+	return result;
+}
+
 /* Create and Display the Splash Window */
 int showSplash( const char* featureImage )
 {
@@ -151,9 +332,9 @@ char** getArgVM( char* vm )
     return result;
 }
 
-int launchJavaVM( char* args[] )
+JavaResults* launchJavaVM( char* args[] )
 {
-	int     jvmExitCode = 1;
+	JavaResults* jvmResults = NULL;
   	pid_t   jvmProcess;
   	int     exitCode;
   	
@@ -168,16 +349,21 @@ int launchJavaVM( char* args[] )
       	execv(args[0], args);
 
       	/* The JVM would not start ... return error code to parent process. */
+      	/* TODO, how to distinguish this as a launch problem to the other process? */
       	_exit(errno);
     }
 
+  	jvmResults = malloc(sizeof(JavaResults));
+  	memset(jvmResults, 0, sizeof(JavaResults));
+  	
 	/* If the JVM is still running, wait for it to terminate. */
 	if (jvmProcess != 0)
 	{
 		waitpid(jvmProcess, &exitCode, 0);
       	if (WIFEXITED(exitCode))
-			jvmExitCode = WEXITSTATUS(exitCode);
+      		/* TODO, this should really be a runResult if we could distinguish the launch problem above */
+			jvmResults->launchResult = WEXITSTATUS(exitCode);
     }
 
-	return jvmExitCode;
+	return jvmResults;
 }
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.h b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.h
index 280e647..c78ceaa 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.h
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtk.h
@@ -13,6 +13,7 @@
 
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk/gdkx.h>
 
 struct GTK_PTRS { 
 	short not_initialized;
@@ -43,6 +44,8 @@ struct GTK_PTRS {
 	gboolean	(*g_main_context_iteration)	(GMainContext*, gboolean);
 	void		(*g_object_unref)			(gpointer);
 	GObject*	(*g_object_new)				(GType, const gchar*, ...);
+	guint       (*g_timeout_add)			(guint, GSourceFunc, gpointer);
+
 #ifdef SOLARIS
 	GString* 	(*g_string_insert_c) 		(GString *, gssize, gchar);
 #endif	
@@ -51,8 +54,21 @@ struct GTK_PTRS {
 	int			(*gdk_pixbuf_get_width)		(const GdkPixbuf*);
 	int			(*gdk_pixbuf_get_height)	(const GdkPixbuf*);
 	void		(*gdk_set_program_class)	(const char*);
+	GdkWindow*  (*gdk_window_foreign_new)   (GdkNativeWindow);
+	void        (*gdk_property_change)		(GdkWindow*, GdkAtom, GdkAtom, gint, GdkPropMode, const guchar*, gint);
+	GdkAtom     (*gdk_atom_intern)			(const gchar*, gboolean);
+	
+	Window 		(*XGetSelectionOwner)		(Display*, Atom);
+	void		(*XSetSelectionOwner)		(Display*, Atom, Window, Time);
+	Window 		(*XCreateWindow)			(Display*, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual*, unsigned long, XSetWindowAttributes*);
+	void		(*XSync)					(Display*, Bool);
+	int			(*XDefaultScreen)			(Display*);
+	Window		(*XRootWindow)				(Display*, int);
+	Atom 			(*XInternAtom)					(Display*, _Xconst char*, Bool	);
+	Display          **gdk_display;
 };
 
+#define gtk_GDK_DISPLAY *(gtk.gdk_display)
 extern struct GTK_PTRS gtk;
 
 #define FN_TABLE_ENTRY(fn) { (void**)& gtk.fn, #fn } 
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c
index a6dfe17..84eca11 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c
@@ -71,6 +71,9 @@ int initWindowSystem(int* pArgc, char* argv[], int showSplash)
     if (loadGtk() != 0)
     	return -1;
     
+    if (getOfficialName() != NULL) 
+    	defaultArgv[0] = getOfficialName();
+    
 	if (argv == NULL) {
 		/* gtk_init_check on Solaris 9 doesn't like NULL or empty argv */
 		pArgc = &defaultArgc;
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkInit.c b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkInit.c
index bb09a27..995c7cf 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkInit.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/eclipseGtkInit.c
@@ -44,6 +44,10 @@ static FN_TABLE gtkFunctions[] = { 	FN_TABLE_ENTRY(gtk_adjustment_new),
 								 };
 /* functions from libgdk-x11-2.0 */
 static FN_TABLE gdkFunctions[] = {	FN_TABLE_ENTRY(gdk_set_program_class), 
+									FN_TABLE_ENTRY(gdk_property_change),
+									FN_TABLE_ENTRY(gdk_atom_intern),
+									FN_TABLE_ENTRY(gdk_window_foreign_new),
+									FN_TABLE_ENTRY(gdk_display), /* not a function */
 									{ NULL, NULL } 
 						  		 };
 /* functions from libgdk_pixbuf-2.0 */
@@ -57,12 +61,24 @@ static FN_TABLE gobjFunctions[] = {	FN_TABLE_ENTRY(g_log_set_handler),
 									FN_TABLE_ENTRY(g_log_remove_handler),
 									FN_TABLE_ENTRY(g_main_context_iteration),
 									FN_TABLE_ENTRY(g_object_unref),
+									FN_TABLE_ENTRY(g_timeout_add),
 #ifdef SOLARIS
 									FN_TABLE_ENTRY(g_string_insert_c),
 #endif
 									{ NULL, NULL }
 						   		  };
 
+/* functions from libX11 */
+static FN_TABLE x11Functions[] = {	FN_TABLE_ENTRY(XGetSelectionOwner),
+									FN_TABLE_ENTRY(XSetSelectionOwner),
+									FN_TABLE_ENTRY(XCreateWindow),
+									FN_TABLE_ENTRY(XSync),
+									FN_TABLE_ENTRY(XRootWindow),
+									FN_TABLE_ENTRY(XDefaultScreen),
+									FN_TABLE_ENTRY(XInternAtom),
+									{ NULL, NULL } 
+								};
+
 
 static int loadGtkSymbols( void * library, FN_TABLE * table) {
 	int i = 0;
@@ -78,10 +94,17 @@ static int loadGtkSymbols( void * library, FN_TABLE * table) {
 }
 
 int loadGtk() {
-	void * objLib = dlopen(GOBJ_LIB, RTLD_LAZY);
-	void * gdkLib = dlopen(GDK_LIB, RTLD_LAZY);
-	void * pixLib = dlopen(PIXBUF_LIB, RTLD_LAZY);
-	void * gtkLib = dlopen(GTK_LIB, RTLD_LAZY);
+#ifdef AIX 
+#define FLAGS RTLD_LAZY | RTLD_MEMBER
+#else
+#define FLAGS RTLD_LAZY
+#endif
+
+	void * objLib = dlopen(GOBJ_LIB, FLAGS);
+	void * gdkLib = dlopen(GDK_LIB, FLAGS);
+	void * pixLib = dlopen(PIXBUF_LIB, FLAGS);
+	void * gtkLib = dlopen(GTK_LIB, FLAGS);
+	void * x11Lib = dlopen(X11_LIB, FLAGS);
 	
 	/* initialize ptr struct to 0's */
 	memset(&gtk, 0, sizeof(struct GTK_PTRS));
@@ -90,6 +113,7 @@ int loadGtk() {
 	if ( gdkLib == NULL || loadGtkSymbols(gdkLib, gdkFunctions)  != 0) return -1;
 	if ( pixLib == NULL || loadGtkSymbols(pixLib, pixFunctions)  != 0) return -1;
 	if ( objLib == NULL || loadGtkSymbols(objLib, gobjFunctions) != 0) return -1;
+	if ( x11Lib == NULL || loadGtkSymbols(x11Lib, x11Functions) != 0) return -1;
 	
 	return 0;
 }
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_aix.mak b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_aix.mak
new file mode 100644
index 0000000..05b8acd
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_aix.mak
@@ -0,0 +1,104 @@
+#*******************************************************************************
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at 
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     Kevin Cornell (Rational Software Corporation)
+#     Tom Tromey (Red Hat, Inc.)
+#*******************************************************************************
+include ../make_version.mak
+# Makefile for creating the GTK eclipse launcher program.
+#
+# This makefile expects the utility "pkg-config" to be in the PATH.
+
+# This makefile expects the following environment variables set:
+#
+# PROGRAM_OUTPUT  - the filename of the output executable
+# DEFAULT_OS      - the default value of the "-os" switch
+# DEFAULT_OS_ARCH - the default value of the "-arch" switch
+# DEFAULT_WS      - the default value of the "-ws" switch
+# JAVA_HOME      - JAVA_HOME for jni headers      
+#default value for PROGRAM_OUTPUT
+
+PROGRAM_OUTPUT=eclipse
+PROGRAM_LIBRARY=$(PROGRAM_OUTPUT)_$(LIB_VERSION).so
+
+
+# Define the object modules to be compiled and flags.
+CC=gcc
+MAIN_OBJS = eclipseMain.o
+COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseGtkCommon.o eclipseGtkInit.o
+DLL_OBJS	= eclipse.o eclipseGtk.o eclipseUtil.o eclipseJNI.o eclipseMozilla.o eclipseShm.o eclipseNix.o
+
+EXEC = $(PROGRAM_OUTPUT)
+DLL = $(PROGRAM_LIBRARY)
+#LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread -ldl -lX11
+LIBS = -lpthread -ldl
+GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.a(libgtk-x11-2.0.so.0)\"" -DGDK_LIB="\"libgdk-x11-2.0.a(libgdk-x11-2.0.so.0)\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.a(libgdk_pixbuf-2.0.so.0)\"" -DGOBJ_LIB="\"libgobject-2.0.a(libgobject-2.0.so.0)\"" -DX11_LIB="\"libX11.a(shr_64.o)\""
+LFLAGS = ${M_ARCH} -shared
+CFLAGS = ${M_ARCH} -g -s -Wall\
+	-fpic \
+	-DAIX \
+	-DMOZILLA_FIX \
+	-DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+	-DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
+	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
+	-D$(DEFAULT_JAVA) \
+	$(GTK_LIBS) \
+	-I. \
+	-I.. \
+	-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
+	`pkg-config --cflags gtk+-2.0`
+
+all: $(EXEC) $(DLL)
+
+eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
+	$(CC) $(CFLAGS) -c ../eclipse.c -o eclipse.o
+
+eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
+	$(CC) $(CFLAGS) -c ../eclipseMain.c -o eclipseMain.o
+	
+eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
+	$(CC) $(CFLAGS) -c ../eclipseCommon.c
+
+eclipseGtkCommon.o: ../eclipseCommon.h ../eclipseOS.h eclipseGtk.h eclipseGtkCommon.c
+	$(CC) $(CFLAGS) -c eclipseGtkCommon.c -o eclipseGtkCommon.o
+	
+eclipseGtkInit.o: ../eclipseCommon.h eclipseGtk.h eclipseGtkInit.c
+	$(CC) $(CFLAGS) -c eclipseGtkInit.c -o eclipseGtkInit.o
+	
+eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
+	$(CC) $(CFLAGS) -c ../eclipseUtil.c -o eclipseUtil.o
+
+eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
+	$(CC) $(CFLAGS) -c ../eclipseJNI.c -o eclipseJNI.o
+	
+eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
+	$(CC) $(CFLAGS) -c ../eclipseConfig.c -o eclipseConfig.o
+	
+eclipseMozilla.o: ../eclipseMozilla.c ../eclipseMozilla.h ../eclipseOS.h
+	$(CC) $(CFLAGS) -c ../eclipseMozilla.c -o eclipseMozilla.o
+
+eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
+	$(CC) $(CFLAGS) -c ../eclipseShm.c -o eclipseShm.o
+
+eclipseNix.o: ../eclipseNix.c
+	$(CC) $(CFLAGS) -c ../eclipseNix.c -o eclipseNix.o
+
+$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
+	$(CC) ${M_ARCH} -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+	
+$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
+	$(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
+
+install: all
+	cp $(EXEC) $(OUTPUT_DIR)
+	cp $(DLL) $(LIBRARY_DIR)
+	rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
+
+clean:
+	rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_linux.mak b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_linux.mak
index 8cd49b6..a040cd7 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_linux.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_linux.mak
@@ -34,18 +34,18 @@ ifeq ($(DEFAULT_JAVA),)
 endif
 
 # Define the object modules to be compiled and flags.
-CC=gcc
+CC?=gcc
 MAIN_OBJS = eclipseMain.o
 COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseGtkCommon.o eclipseGtkInit.o
 DLL_OBJS	= eclipse.o eclipseGtk.o eclipseUtil.o eclipseJNI.o eclipseMozilla.o eclipseShm.o eclipseNix.o
 
 EXEC = $(PROGRAM_OUTPUT)
 DLL = $(PROGRAM_LIBRARY)
-#LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread -ldl
+#LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread -ldl -lX11
 LIBS = -lpthread -ldl
-GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\""
-LFLAGS = -shared -fpic -Wl,--export-dynamic 
-CFLAGS = -g -s -Wall\
+GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\"" -DX11_LIB="\"libX11.so.6\""
+LFLAGS = ${M_ARCH} -shared -fpic -Wl,--export-dynamic 
+CFLAGS = ${M_ARCH} -g -s -Wall\
 	-fpic \
 	-DLINUX \
 	-DMOZILLA_FIX \
@@ -95,7 +95,7 @@ eclipseNix.o: ../eclipseNix.c
 	$(CC) $(CFLAGS) -c ../eclipseNix.c -o eclipseNix.o
 
 $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
-	$(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+	$(CC) ${M_ARCH} -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 	
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
 	$(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_solaris.mak b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_solaris.mak
index 2833e20..7b9b3f4 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_solaris.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/gtk/make_solaris.mak
@@ -42,8 +42,8 @@ OPTFLAG = -O -s
 EXEC = $(PROGRAM_OUTPUT)
 DLL = $(PROGRAM_LIBRARY)
 #LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lglib-2.0 -lthread -ldl -lc
-LIBS = -lthread -ldl -lc
-GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\""
+LIBS = -lthread -ldl -lc -lrt
+GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\"" -DX11_LIB="\"libX11.so.4\""
 LFLAGS = -G
 CFLAGS = $(OPTFLAG) \
 	-DSOLARIS \
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/make_version.mak b/eclipse/features/org.eclipse.equinox.executable/library/make_version.mak
index 5626cf0..05aaff2 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/make_version.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/make_version.mak
@@ -10,5 +10,5 @@
 #*******************************************************************************
 
 maj_ver=1
-min_ver=208
+min_ver=312
 LIB_VERSION = $(maj_ver)$(min_ver)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/motif/build.sh b/eclipse/features/org.eclipse.equinox.executable/library/motif/build.sh
index 9fd6751..12c0942 100755
--- a/eclipse/features/org.eclipse.equinox.executable/library/motif/build.sh
+++ b/eclipse/features/org.eclipse.equinox.executable/library/motif/build.sh
@@ -92,6 +92,8 @@ case $OS in
 				OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
 				javaHome="/opt/java1.5"
 				defaultJava=DEFAULT_JAVA_EXEC
+				PATH=/opt/hp-gcc/bin:$PATH
+				export PATH
 				;;
         	*)
 				makefile="make_hpux_PA_RISC.mak"
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/motif/eclipseMotif.c b/eclipse/features/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
index 8b32bcb..4d5f8f1 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -274,8 +274,9 @@ void   fixEnvForNetscape()
 }
 #endif /* NETSCAPE_FIX */
 
-int launchJavaVM( char* args[] ) 
+JavaResults* launchJavaVM( char* args[] ) 
 {
+	JavaResults* jvmResults = NULL;
     int    exitCode;
 
 #ifdef NETSCAPE_FIX
@@ -309,17 +310,27 @@ int launchJavaVM( char* args[] )
 		execv( args[0], args );
 		
 		/* The JVM would not start ... return error code to parent process. */
+		/* TODO, how to distinguish this as a launch problem to the other process? */
 		jvmExitCode = errno;
         exit( jvmExitCode );
 	}
 	
+	jvmResults = malloc(sizeof(JavaResults));
+	memset(jvmResults, 0, sizeof(JavaResults));
+	
 	/* If the JVM is still running, wait for it to terminate. */
 	if (jvmProcess != 0)
 	{
 		waitpid(jvmProcess, &exitCode, 0);
-		jvmExitCode = ((exitCode & 0x00ff) == 0 ? (exitCode >> 8) : exitCode); /* see wait(2) */
+  		/* TODO, this should really be a runResult if we could distinguish the launch problem above */
+		jvmResults->launchResult = ((exitCode & 0x00ff) == 0 ? (exitCode >> 8) : exitCode); /* see wait(2) */
 	}
 	
 	/* Return the exit code from the JVM. */
-	return jvmExitCode;
+	return jvmResults;
+}
+
+int reuseWorkbench(_TCHAR** filePath, int timeout) {
+	/* not yet implemented on motif */
+	return -1;
 }
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/motif/make_aix.mak b/eclipse/features/org.eclipse.equinox.executable/library/motif/make_aix.mak
index bb36612..1d4689e 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/motif/make_aix.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/motif/make_aix.mak
@@ -95,7 +95,7 @@ $(SHIM): $(SHIM_OBJS)
 		
 install: all
 	cp $(EXEC) $(OUTPUT_DIR)
-	cp $(SHIM) $(LIBRARY_DIR)
+	cp $(SHIM) $(OUTPUT_DIR)
 	cp  $(DLL) $(LIBRARY_DIR)
 	rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
 
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/motif/make_linux.mak b/eclipse/features/org.eclipse.equinox.executable/library/motif/make_linux.mak
index 25ccd2b..cd8d51d 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/motif/make_linux.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/motif/make_linux.mak
@@ -34,7 +34,7 @@ ifeq ($(DEFAULT_JAVA),)
 endif
 
 # Define the object modules to be compiled and flags.
-CC=gcc
+CC?=gcc
 MAIN_OBJS = eclipseMain.o
 COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseMotifCommon.o eclipseMotifInit.o
 DLL_OBJS	= eclipse.o eclipseMotif.o eclipseUtil.o eclipseJNI.o eclipseMozilla.o eclipseShm.o eclipseNix.o \
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/build.bat b/eclipse/features/org.eclipse.equinox.executable/library/win32/build.bat
index 03f413a..b1c49fc 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/build.bat
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/build.bat
@@ -37,13 +37,13 @@ IF x.%1==x.x86_64 GOTO X86_64
 IF x.%1==x.ia64 GOTO IA64
 
 :X86
-IF x.%JAVA_HOME%==x. set JAVA_HOME=C:\Dev\Java\IBM-1.5.0
+IF x.%JAVA_HOME%==x. set JAVA_HOME=C:\Dev\Java\IBM-1.5.0-20090707-SR10
 set javaHome=%JAVA_HOME%
-if not "%MSVC_HOME%" == "" goto MAKE
-set MSVC_HOME=k:\dev\products\msvc60\vc98
+if not x.%MSVC_HOME% == x. goto MAKE
+set MSVC_HOME="C:\Program Files\MS_PLAT_SDK\msvc60\VC98"
 call %MSVC_HOME%\bin\vcvars32.bat
 if not "%mssdk%" == "" goto MAKE
-set mssdk=K:\dev\PRODUCTS\PLATSDK\feb2003
+set mssdk="C:\Program Files\MS_PLAT_SDK\feb2003"
 call %mssdk%\setenv.bat
 IF x.%1==x.x86 shift
 set defaultOSArch=x86
@@ -110,6 +110,7 @@ if "%1" == "" goto WHILE_END
 		goto NEXT )
 	if "%1" == "-java" (
 		set javaHome=%2
+		echo %javaHome%
 		shift
 		goto NEXT )
 :LAST_ARG
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWin.c b/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWin.c
index 40bd96d..770b464 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWin.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWin.c
@@ -14,6 +14,7 @@
 #include "eclipseUtil.h"
 #include "eclipseCommon.h"
 #include "eclipseJNI.h"
+#include "eclipseShm.h"
 
 #include <windows.h>
 #include <commctrl.h>
@@ -31,18 +32,28 @@ extern HWND topWindow;
 
 /* Global Variables */
 _TCHAR*  defaultVM     = _T("javaw.exe");
+_TCHAR*  consoleVM     = _T("java.exe");
 _TCHAR*  vmLibrary 	   = _T("jvm.dll");
 _TCHAR*  shippedVMDir  = _T("jre\\bin\\");
 
+/* Define local variables for communicating with running eclipse instance. */
+static HANDLE	mutex;
+static UINT		findWindowTimeout = 1000;
+static UINT_PTR findWindowTimerId = 97;
+static UINT		timerCount = 0;
+static UINT		openFileTimeout = 60;
+static _TCHAR**	openFilePath;
+
 /* Define the window system arguments for the Java VM. */
 static _TCHAR*  argVM[] = { NULL };
 
 /* Define local variables for running the JVM and detecting its exit. */
 static HANDLE  jvmProcess     = 0;
-static int     jvmExitCode    = 0;
+static JavaResults* jvmResults = NULL;
 static UINT    jvmExitTimeout = 100;
 static UINT_PTR jvmExitTimerId = 99;
 
+static void CALLBACK findWindowProc(HWND hwnd, UINT message, UINT idTimer, DWORD dwTime);
 static void CALLBACK  detectJvmExit( HWND hwnd, UINT uMsg, UINT id, DWORD dwTime );
 static _TCHAR* checkVMRegistryKey(HKEY jrekey, _TCHAR* subKeyName);
 static void adjustSearchPath( _TCHAR * vmLibrary );
@@ -67,6 +78,113 @@ typedef struct {
 
 #define COMPANY_NAME_KEY _T_ECLIPSE("\\StringFileInfo\\%04x%04x\\CompanyName")
 #define SUN_MICROSYSTEMS _T_ECLIPSE("Sun Microsystems")
+#define ORACLE 			 _T_ECLIPSE("Oracle")
+
+static void sendOpenFileMessage(HWND window) {
+	_TCHAR* id;
+	UINT msg;
+	int index = 0;
+	int size = 0;
+	DWORD wParam;
+#ifdef WIN64
+	DWORDLONG lParam;
+#else
+	DWORD lParam;
+#endif
+
+	/* what's the longest path? */
+	while (openFilePath[index] != NULL) {
+		int length = _tcslen(openFilePath[index++]);
+		if (size <= length)
+			size = length + 1;
+	}
+
+	createSharedData(&id, size * sizeof(_TCHAR));
+	_stscanf(id, _T_ECLIPSE("%lx_%lx"), &wParam, &lParam);
+	msg = RegisterWindowMessage(_T("SWT_OPENDOC"));
+
+	index = 0;
+	for(index = 0; openFilePath[index] != NULL; index++) {
+		/* SendMessage does not return until the message has been processed */
+		setSharedData(id, openFilePath[index]);
+		SendMessage(window, msg, wParam, lParam);
+	}
+	destroySharedData(id);
+	free(id);
+}
+
+static HWND findSWTMessageWindow() {
+	HWND window = NULL;
+	_TCHAR *windowTitle, *windowPrefix, *name;
+
+	windowPrefix = _T("SWT_Window_");
+	name = getOfficialName();
+	windowTitle = malloc((_tcslen(windowPrefix) + _tcslen(name) + 1) * sizeof(_TCHAR));
+	_stprintf(windowTitle, _T_ECLIPSE("%s%s"), windowPrefix, name);
+	window = FindWindow(NULL, windowTitle);
+	free(windowTitle);
+	return window;
+}
+
+static void CALLBACK findWindowProc(HWND hwnd, UINT message, UINT idTimer, DWORD dwTime) {
+	HWND window = findSWTMessageWindow();
+	if (window != NULL) {
+		sendOpenFileMessage(window);
+		ReleaseMutex(mutex);
+		CloseHandle(mutex);
+		KillTimer(hwnd, findWindowTimerId);
+		return;
+	}
+	
+	/* no window yet, set timer to try again later */
+	if (timerCount++ >= openFileTimeout) {
+		KillTimer(hwnd, findWindowTimerId);
+		ReleaseMutex(mutex);
+		CloseHandle(mutex);
+	}
+}
+
+/* return > 0 if we successfully send a message to another eclipse instance */
+int reuseWorkbench(_TCHAR** filePath, int timeout) {
+	_TCHAR*   mutexPrefix = _T("SWT_Mutex_");
+	_TCHAR*   mutexName, *name;
+	DWORD 	  lock;
+	HWND 	  window = NULL;
+
+	/* store for later */
+	openFilePath = filePath;
+	openFileTimeout = timeout;
+	
+	name = getOfficialName();
+	mutexName = malloc((_tcslen(mutexPrefix) + _tcslen(name)  + 1) * sizeof(_TCHAR));
+	_stprintf(mutexName, _T_ECLIPSE("%s%s"), mutexPrefix, name);
+	mutex = CreateMutex(NULL, FALSE, mutexName);
+	free(mutexName);
+	if (mutex == NULL) return -1;
+	
+	//wait for timeout seconds
+	lock = WaitForSingleObject(mutex, timeout * 1000);
+	if (lock != WAIT_OBJECT_0) {
+		/* failed to get the lock before timeout, We won't be reusing an existing eclipse. */
+		CloseHandle(mutex);
+		return 0;
+	}
+	
+	/* we have the mutex, look for the SWT window */
+	window = findSWTMessageWindow();
+	if (window != NULL) {
+		sendOpenFileMessage(window);
+		ReleaseMutex(mutex);
+		CloseHandle(mutex);
+		return 1; /* success! */
+	} 
+	
+	/* no window, set a timer to look again later */
+	if (initWindowSystem(0, NULL, 0) == 0)
+		SetTimer( topWindow, findWindowTimerId, findWindowTimeout, findWindowProc );
+	
+	return 0;
+}
 
 /* Show the Splash Window
  *
@@ -168,6 +286,7 @@ _TCHAR * findVMLibrary( _TCHAR* command ) {
 
 void adjustSearchPath( _TCHAR* vmLib ){
 	_TCHAR ** paths;
+	_TCHAR* cwd = NULL;
 	_TCHAR * path = NULL, *newPath = NULL;
 	_TCHAR * c;
 	int i, length;
@@ -175,12 +294,20 @@ void adjustSearchPath( _TCHAR* vmLib ){
 	
 	paths = getVMLibrarySearchPath(vmLib);
 	
+	/* bug 325902 - add current working dir to the end of the search path */
+	length = GetCurrentDirectory(0, NULL);
+	cwd = malloc((length + 1)* sizeof(_TCHAR));
+	GetCurrentDirectory(length, cwd);
+	cwd[length - 1] = pathSeparator;
+	cwd[length] = 0;
+	
 	/* first call to GetEnvironmentVariable tells us how big to make the buffer */
 	length = GetEnvironmentVariable(_T_ECLIPSE("PATH"), path, 0);
 	if (length > 0) {
+		_TCHAR* current [] = { cwd, NULL };
 		path = malloc(length * sizeof(_TCHAR));
 		GetEnvironmentVariable(_T_ECLIPSE("PATH"), path, length);
-		needAdjust = !containsPaths(path, paths);
+		needAdjust = !containsPaths(path, paths) || !containsPaths(path, current);
 		freePath = 1;
 	} else {
 		path = _T_ECLIPSE("");
@@ -190,8 +317,8 @@ void adjustSearchPath( _TCHAR* vmLib ){
 	
 	if (needAdjust) {
 		c = concatStrings(paths);
-		newPath = malloc((_tcslen(c) + length + 1) * sizeof(_TCHAR));
-		_stprintf(newPath, _T_ECLIPSE("%s%s"), c, path);
+		newPath = malloc((_tcslen(c) + length + 1 + _tcslen(cwd) + 1) * sizeof(_TCHAR));
+		_stprintf(newPath, _T_ECLIPSE("%s%s%c%s"), c, path, pathSeparator, cwd);
 		SetEnvironmentVariable( _T_ECLIPSE("PATH"), newPath);
 		free(c);
 		free(newPath);
@@ -200,6 +327,7 @@ void adjustSearchPath( _TCHAR* vmLib ){
 	for (i = 0; paths[i] != NULL; i++)
 		free(paths[i]);
 	free(paths);
+	free(cwd);
 	if (freePath)
 		free(path);
 }
@@ -371,12 +499,14 @@ void restartLauncher( _TCHAR* program, _TCHAR* args[] )
 	free(commandLine);
 }
 
-int launchJavaVM( _TCHAR* args[] )
+JavaResults* launchJavaVM( _TCHAR* args[] )
 {
 	MSG msg;
 	_TCHAR* commandLine;
 	jvmProcess = 0;
 	commandLine = buildCommandLine(NULL, args);
+	jvmResults = malloc(sizeof(JavaResults));
+	memset(jvmResults, 0, sizeof(JavaResults));
 	
 	/*
 	* Start the Java virtual machine. Use CreateProcess() instead of spawnv()
@@ -390,7 +520,7 @@ int launchJavaVM( _TCHAR* args[] )
     	CloseHandle( pi.hThread );
     	jvmProcess = pi.hProcess;
     } else {
-    	jvmExitCode = errno;
+    	jvmResults->launchResult = errno;
     }
 	}
 
@@ -418,7 +548,7 @@ int launchJavaVM( _TCHAR* args[] )
 	}
 
 	/* Return the exit code from the JVM. */
-	return jvmExitCode;
+	return jvmResults;
 }
 
 /* Detect JVM Process Termination */
@@ -431,7 +561,7 @@ static void CALLBACK detectJvmExit( HWND hwnd, UINT uMsg, UINT id, DWORD dwTime
     		 exitCode != STILL_ACTIVE)
     {
     	/* Save the JVM exit code. This should cause the loop in launchJavaVM() to exit. */
-        jvmExitCode = exitCode;
+        jvmResults->runResult = exitCode;
         jvmProcess = 0;
     }
 }
@@ -440,7 +570,7 @@ void processVMArgs(_TCHAR **vmargs[] ) {
 	/* nothing yet */
 }
 
-int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
+JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
 {
 	return startJavaJNI(libPath, vmArgs, progArgs, jarFile);
 }
@@ -476,6 +606,9 @@ int isSunVM( _TCHAR * javaVM, _TCHAR * jniLib ) {
 				if (_tcsncmp(value, SUN_MICROSYSTEMS, _tcslen(SUN_MICROSYSTEMS)) == 0) {
 					result = 1;
 					break;
+				} else if (_tcsncmp(value, ORACLE, _tcslen(ORACLE)) == 0) {
+					result = 1;
+					break;
 				}
 			}
 			free(key);
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c b/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
index 23c0f2e..48f38b3 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
@@ -23,30 +23,13 @@ _TCHAR   dirSeparator  = _T('\\');
 _TCHAR   pathSeparator = _T(';');
 
 /* Global Main Window*/
-#ifdef UNICODE
-extern HWND topWindow;
-#else
 HWND    topWindow = 0;
-#endif
 
 /* Define local variables for the main window. */
 /*static WNDPROC oldProc;*/
 
 static int initialized = 0;
 
-#ifdef UNICODE
-HINSTANCE g_hInstance = NULL;
-BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved)
-{
-	if (dwReason == DLL_PROCESS_ATTACH) {
-		if (g_hInstance == NULL) g_hInstance = hInstDLL;
-	}
-	return TRUE;
-}
-#else
-extern HINSTANCE g_hInstance;
-#endif
-
 /* Display a Message */
 void displayMessage( _TCHAR* title, _TCHAR* message )
 {
@@ -69,10 +52,17 @@ int initWindowSystem( int* pArgc, _TCHAR* argv[], int showSplash )
 	
 	if(initialized)
 		return 0;
-    /* Create a window that has no decorations. */
+
+	icon = LoadIcon(module, MAKEINTRESOURCE(ECLIPSE_ICON)); 
+    if (icon == NULL) {
+    	HMODULE hm = LoadLibraryEx(getProgramPath(), 0, LOAD_LIBRARY_AS_DATAFILE & 0x2 /*LOAD_LIBRARY_AS_IMAGE_RESOURCE*/);
+    	if (hm != NULL)
+    		icon = LoadIcon(hm, MAKEINTRESOURCE(ECLIPSE_ICON));
+    }
     
+    /* Create a window that has no decorations. */
 	InitCommonControls();
-    topWindow = CreateWindowEx ( WS_EX_TOOLWINDOW,
+    topWindow = CreateWindowEx ( icon != NULL ? 0 : WS_EX_TOOLWINDOW,
 		_T("STATIC"),
 		getOfficialName(),
 		SS_BITMAP | WS_POPUP | WS_CLIPCHILDREN,
@@ -85,7 +75,6 @@ int initWindowSystem( int* pArgc, _TCHAR* argv[], int showSplash )
 		module,
 		NULL);
 
-    icon = LoadIcon(module, MAKEINTRESOURCE(ECLIPSE_ICON));
     if (icon != NULL)
 #ifdef WIN64
     	SetClassLongPtr(topWindow, GCLP_HICON, (LONG_PTR)icon);
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_mingw.mak b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_mingw.mak
index 6bc262c..9feb80e 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_mingw.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_mingw.mak
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at 
@@ -37,7 +37,7 @@ OSTYPE	?= $(shell if uname -s | grep -iq cygwin ; then echo cygwin; else echo li
 
 ifeq ($(OSTYPE),cygwin)
 CCVER   = i686
-CC      = i686-pc-cygwin-gcc
+CC      = i686-pc-cygwin-gcc-3
 RC      = windres
 else
 CCVER   = i586
@@ -52,11 +52,9 @@ $(error Unable to find $(CCVER)-pc-cygwin-gcc)
 endif
 
 # Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.o  aeclipseMain.o  
-COMMON_OBJS = eclipseConfig.o eclipseCommon.o   eclipseWinCommon.o\
-			  aeclipseConfig.o aeclipseCommon.o  aeclipseWinCommon.o
-DLL_OBJS	= eclipse.o  eclipseWin.o  eclipseUtil.o  eclipseJNI.o eclipseShm.o\
-	  		  aeclipse.o aeclipseWin.o aeclipseUtil.o aeclipseJNI.o aeclipseShm.o
+MAIN_OBJS = eclipseMain.o 
+COMMON_OBJS = eclipseConfig.o eclipseCommon.o   eclipseWinCommon.o
+DLL_OBJS	= eclipse.o  eclipseWin.o  eclipseUtil.o  eclipseJNI.o eclipseShm.o
 	  		  
 LIBS	= -lkernel32 -luser32 -lgdi32 -lcomctl32 -lmsvcrt -lversion
 LDFLAGS = -mwindows -mno-cygwin
@@ -72,32 +70,22 @@ CFLAGS	= -g -s -Wall \
 	  -D_WIN32 \
 	  -DWIN32_LEAN_AND_MEAN \
 	  -mno-cygwin -D__int64="long long"
-ACFLAGS = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+WCFLAGS = -DUNICODE -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
 	  -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
 	  -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
 	  $(DEBUG) $(CFLAGS)
-WCFLAGS	= -DUNICODE $(ACFLAGS)
 
 all: $(EXEC) $(DLL) $(CONSOLE)
 
 eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
 	$(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseMain.c
 	
-aeclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseMain.c
-	
 eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
 	$(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseCommon.c
 	
-aeclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseCommon.c
-	
 eclipseWinCommon.o: ../eclipseCommon.h eclipseWinCommon.c
 	$(CC) $(DEBUG) $(WCFLAGS) -c -o $@ eclipseWinCommon.c
 
-aeclipseWinCommon.o: ../eclipseCommon.h eclipseWinCommon.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ eclipseWinCommon.c
-	
 eclipse.o: ../eclipseOS.h ../eclipseUnicode.h ../eclipseJNI.h ../eclipseCommon.h ../eclipse.c
 	$(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipse.c
 
@@ -116,24 +104,6 @@ eclipseJNI.o: ../eclipseUnicode.h ../eclipseJNI.c
 eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
 	$(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseShm.c
 	
-aeclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseShm.c
-	
-aeclipse.o: ../eclipseOS.h ../eclipseUnicode.h ../eclipseCommon.h ../eclipse.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipse.c
-
-aeclipseUtil.o: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseUtil.c
-
-aeclipseConfig.o: ../eclipseConfig.h ../eclipseUnicode.h ../eclipseConfig.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseConfig.c
-	
-aeclipseWin.o: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ eclipseWin.c
-
-aeclipseJNI.o: ../eclipseUnicode.h ../eclipseJNI.c
-	$(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseJNI.c
-	
 $(RES): $(PROGRAM_NAME).rc
 	$(RC) --output-format=coff --include-dir=.. -o $@ $<
 
@@ -144,7 +114,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
 $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS) 
 	rm -f eclipseConfig.o aeclipseConfig.o
 	$(CC) $(DEBUG) $(WCFLAGS) -D_WIN32_CONSOLE -c -o eclipseConfig.o ../eclipseConfig.c
-	$(CC) $(DEBUG) $(ACFLAGS) -D_WIN32_CONSOLE -c -o aeclipseConfig.o ../eclipseConfig.c
 	$(CC) $(CONSOLEFLAGS) -o $(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 	
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win32.mak b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win32.mak
index 6110609..48ffefb 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win32.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win32.mak
@@ -1,5 +1,5 @@
 #******************************************************************************
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at 
@@ -31,11 +31,9 @@ PROGRAM_NAME=$(PROGRAM_OUTPUT:.exe=)
 PROGRAM_LIBRARY = eclipse_$(LIB_VERSION).dll
 
 # Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.obj  aeclipseMain.obj  
-COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj\
-			  aeclipseConfig.obj aeclipseCommon.obj  aeclipseWinCommon.obj
-DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj\
-	  		  aeclipse.obj aeclipseWin.obj aeclipseUtil.obj aeclipseJNI.obj aeclipseShm.obj
+MAIN_OBJS = eclipseMain.obj
+COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj
+DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj
 
 LIBS   = kernel32.lib user32.lib comctl32.lib msvcrt.lib
 DLL_LIBS = kernel32.lib user32.lib comctl32.lib gdi32.lib Advapi32.lib msvcrt.lib version.lib
@@ -47,12 +45,12 @@ EXEC	= $(PROGRAM_OUTPUT)
 CONSOLE = $(PROGRAM_NAME)c.exe
 DLL    = $(PROGRAM_LIBRARY)
 DEBUG  = #$(cdebug)
-acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+wcflags = -DUNICODE -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
 	-DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
 	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
 	-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 \
 	$(cflags)
-wcflags = -DUNICODE $(acflags)
+
 all: $(EXEC) $(DLL) $(CONSOLE)
 
 eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
@@ -82,33 +80,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
 eclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
 	$(CC) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseShm.c
 	
-aeclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
-	$(CC) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseShm.obj ../eclipseShm.c
-	
-aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseJNI.obj ../eclipseJNI.c
-		
-aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseMain.obj ../eclipseMain.c
-	
-aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseCommon.obj ../eclipseCommon.c
-
-aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /Foaeclipse.obj ../eclipse.c
-
-aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseUtil.obj ../eclipseUtil.c
-
-aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseConfig.obj ../eclipseConfig.c
-    
-aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWin.obj eclipseWin.c
-
-aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWinCommon.obj eclipseWinCommon.c
-
 $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
     $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
 
@@ -116,7 +87,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
 $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS)
 	del -f eclipseConfig.obj aeclipseConfig.obj
 	$(cc) $(DEBUG) $(wcflags) $(cvarsdll) -D_WIN32_CONSOLE /FoeclipseConfig.obj ../eclipseConfig.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) -D_WIN32_CONSOLE /FoaeclipseConfig.obj ../eclipseConfig.c
     $(link) $(CONSOLEFLAGS) -out:$(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64.mak b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64.mak
index f009b00..f1faaab 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64.mak
@@ -1,5 +1,5 @@
 #******************************************************************************
-# Copyright (c) 2007 IBM Corporation and others.
+# Copyright (c) 2007, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at 
@@ -35,11 +35,9 @@ PROGRAM_NAME=$(PROGRAM_OUTPUT:.exe=)
 PROGRAM_LIBRARY = eclipse_$(LIB_VERSION).dll
 
 # Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.obj  aeclipseMain.obj  
-COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj\
-			  aeclipseConfig.obj aeclipseCommon.obj  aeclipseWinCommon.obj
-DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj\
-	  		  aeclipse.obj aeclipseWin.obj aeclipseUtil.obj aeclipseJNI.obj aeclipseShm.obj
+MAIN_OBJS = eclipseMain.obj
+COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj
+DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj
 
 LIBS   = kernel32.lib user32.lib comctl32.lib msvcrt.lib bufferoverflowU.lib
 DLL_LIBS = kernel32.lib user32.lib comctl32.lib gdi32.lib Advapi32.lib msvcrt.lib version.lib bufferoverflowU.lib
@@ -52,12 +50,11 @@ EXEC	= $(PROGRAM_OUTPUT)
 CONSOLE = $(PROGRAM_NAME)c.exe
 DLL    = $(PROGRAM_LIBRARY)
 DEBUG  = #$(cdebug)
-acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+wcflags = -DUNICODE -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
 	-DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
 	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
 	-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 \
 	$(cflags)
-wcflags = -DUNICODE $(acflags)
 all: $(EXEC) $(DLL) $(CONSOLE)
 
 eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
@@ -87,33 +84,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
 eclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
 	$(CC) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseShm.c
 	
-aeclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
-	$(CC) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseShm.obj ../eclipseShm.c
-	
-aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseJNI.obj ../eclipseJNI.c
-		
-aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseMain.obj ../eclipseMain.c
-	
-aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseCommon.obj ../eclipseCommon.c
-
-aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /Foaeclipse.obj ../eclipse.c
-
-aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseUtil.obj ../eclipseUtil.c
-
-aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseConfig.obj ../eclipseConfig.c
-    
-aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWin.obj eclipseWin.c
-
-aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
-    $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWinCommon.obj eclipseWinCommon.c
-
 $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
     $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
 
@@ -121,7 +91,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
 $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS)
 	del -f eclipseConfig.obj aeclipseConfig.obj
 	$(cc) $(DEBUG) $(wcflags) $(cvarsdll) -D_WIN32_CONSOLE /FoeclipseConfig.obj ../eclipseConfig.c
-	$(cc) $(DEBUG) $(acflags) $(cvarsdll) -D_WIN32_CONSOLE /FoaeclipseConfig.obj ../eclipseConfig.c
     $(link) $(CONSOLEFLAGS) -out:$(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak
index 123c8f3..5d9ff5c 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak
+++ b/eclipse/features/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak
@@ -1,5 +1,5 @@
 #******************************************************************************
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at 
@@ -27,11 +27,9 @@ NODEBUG=1
 PROGRAM_LIBRARY = eclipse_$(LIB_VERSION).dll
 
 # Define the object modules to be compiled and flags.
-MAIN_OBJS = eclipseMain.obj  aeclipseMain.obj  
-COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj\
-			  aeclipseConfig.obj aeclipseCommon.obj  aeclipseWinCommon.obj
-DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj\
-	  		  aeclipse.obj aeclipseWin.obj aeclipseUtil.obj aeclipseJNI.obj aeclipseShm.obj
+MAIN_OBJS = eclipseMain.obj
+COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj   eclipseWinCommon.obj
+DLL_OBJS	= eclipse.obj  eclipseWin.obj  eclipseUtil.obj  eclipseJNI.obj eclipseShm.obj
 
 # using dynamic lib
 #LIBS   = kernel32.lib user32.lib comctl32.lib msvcrt.lib
@@ -51,12 +49,11 @@ EXEC   = eclipse.exe
 CONSOLE = eclipsec.exe
 DLL    = $(PROGRAM_LIBRARY)
 DEBUG  = #$(cdebug)
-acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+wcflags = -DUNICODE -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
 	-DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
 	-DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
 	-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 \
 	$(cflags) -D_CRT_SECURE_NO_WARNINGS -D_CRT_NON_CONFORMING_SWPRINTFS
-wcflags = -DUNICODE $(acflags) 
 all: $(EXEC) $(DLL) $(CONSOLE)
 
 eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
@@ -86,33 +83,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
 eclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
 	$(CC) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseShm.c
 	
-aeclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
-	$(CC) $(DEBUG) $(acflags) $(cvars) /FoaeclipseShm.obj ../eclipseShm.c
-	
-aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
-	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseJNI.obj ../eclipseJNI.c
-		
-aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c 
-	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseMain.obj ../eclipseMain.c
-	
-aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
-	$(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseCommon.obj ../eclipseCommon.c
-
-aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
-    $(cc) $(DEBUG) $(acflags) $(cvars) /Foaeclipse.obj ../eclipse.c
-
-aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
-    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseUtil.obj ../eclipseUtil.c
-
-aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
-    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseConfig.obj ../eclipseConfig.c
-    
-aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
-    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWin.obj eclipseWin.c
-
-aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
-    $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWinCommon.obj eclipseWinCommon.c
-
 $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
     $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
 #$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
@@ -122,7 +92,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
 $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS)
 	del -f eclipseConfig.obj aeclipseConfig.obj
 	$(cc) $(DEBUG) $(wcflags) $(cvars) -D_WIN32_CONSOLE /FoeclipseConfig.obj ../eclipseConfig.c
-	$(cc) $(DEBUG) $(acflags) $(cvars) -D_WIN32_CONSOLE /FoaeclipseConfig.obj ../eclipseConfig.c
     $(link) $(CONSOLEFLAGS) -out:$(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/wpf/build.bat b/eclipse/features/org.eclipse.equinox.executable/library/wpf/build.bat
index 3f2ff66..7d70ff6 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/wpf/build.bat
+++ b/eclipse/features/org.eclipse.equinox.executable/library/wpf/build.bat
@@ -33,6 +33,8 @@
 @rem ******
 @echo off
 
+IF x.%1==x.x86 shift
+
 IF NOT "%JAVA_HOME%"=="" GOTO MSVC
 rem *****
 rem Javah
@@ -41,7 +43,7 @@ set JAVA_HOME="C:\Program Files\IBM\Java50"
 
 :MSVC
 
-call "J:\dev\PRODUCTS\PLATSDK\March2007VistaRTM\Bin\setenv.cmd" /vista
+call "C:\Program Files\MS_PLAT_SDK\March2007VistaRTM\Bin\setenv.cmd" /vista
 :MAKE
 
 rem --------------------------
diff --git a/eclipse/features/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp b/eclipse/features/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
index d5983a6..18b6c51 100644
--- a/eclipse/features/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
+++ b/eclipse/features/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
@@ -37,6 +37,7 @@ using namespace System::ComponentModel;
 
 /* Global Variables */
 _TCHAR*  defaultVM     = _T("javaw.exe");
+_TCHAR*  consoleVM     = _T("java.exe");
 _TCHAR*  vmLibrary 	   = _T("jvm.dll");
 _TCHAR*  shippedVMDir  = _T("jre\\bin\\");
 
@@ -45,7 +46,7 @@ static _TCHAR*  argVM[] = { NULL };
 
 /* Define local variables for running the JVM and detecting its exit. */
 static int     jvmProcess     = 0;
-static int     jvmExitCode    = 0;
+static JavaResults* jvmResults = NULL;
 static int     jvmExitTimeout = 100;
 static int     jvmExitTimerId = 99;
 
@@ -429,12 +430,15 @@ void restartLauncher( _TCHAR* program, _TCHAR* args[] )
 	free(commandLine);
 }
 
-int launchJavaVM( _TCHAR* args[] )
+JavaResults* launchJavaVM( _TCHAR* args[] )
 {
 	MSG msg;
 	_TCHAR* commandLine;
 	jvmProcess = -1;
 	commandLine = buildCommandLine(NULL, args);
+	jvmResults = (JavaResults*) malloc(sizeof(JavaResults));
+	memset(jvmResults, 0, sizeof(JavaResults));
+	
 	/*
 	* Start the Java virtual machine. Use CreateProcess() instead of spawnv()
 	* otherwise the arguments cannot be freed since spawnv() segments fault.
@@ -455,7 +459,7 @@ int launchJavaVM( _TCHAR* args[] )
 	if (jvmProcess == -1)
 	{
 		/* Return the error number. */
-		jvmExitCode = errno;
+		jvmResults->launchResult = errno;
 		jvmProcess  = 0;
 	}
 
@@ -484,7 +488,7 @@ int launchJavaVM( _TCHAR* args[] )
 	}
 
 	/* Return the exit code from the JVM. */
-	return jvmExitCode;
+	return jvmResults;
 }
 
 /* Detect JVM Process Termination */
@@ -496,7 +500,7 @@ static void CALLBACK detectJvmExit ()
     		 exitCode != STILL_ACTIVE)
     {
     	/* Save the JVM exit code. This should cause the loop in launchJavaVM() to exit. */
-        jvmExitCode = exitCode;
+    	jvmResults->runResult = exitCode;
         jvmProcess = 0;
     }
 }
@@ -505,7 +509,7 @@ void processVMArgs(_TCHAR **vmargs[] ) {
 //	/* nothing yet */
 }
 
-int startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
+JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
 {
 	return startJavaJNI(libPath, vmArgs, progArgs, jarFile);
 }
@@ -550,4 +554,8 @@ int isSunVM( _TCHAR * javaVM, _TCHAR * jniLib ) {
 	return result;
 }
 
+int reuseWorkbench(_TCHAR** filePath, int timeout) {
+	/* not implemented for WPF */
+	return -1;
+}
 } // extern "C"
diff --git a/eclipse/features/org.eclipse.equinox.executable/license.html b/eclipse/features/org.eclipse.equinox.executable/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.equinox.executable/license.html
+++ b/eclipse/features/org.eclipse.equinox.executable/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.executable/target.build.properties b/eclipse/features/org.eclipse.equinox.executable/target.build.properties
index 05d7464..b3817cd 100644
--- a/eclipse/features/org.eclipse.equinox.executable/target.build.properties
+++ b/eclipse/features/org.eclipse.equinox.executable/target.build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ root.linux.gtk.x86.permissions.755=libcairo-swt.so
 root.linux.gtk.ppc=bin/gtk/linux/ppc,gtk_root
 root.linux.gtk.ppc.permissions.755=libcairo-swt.so
 
+root.linux.gtk.ppc64=bin/gtk/linux/ppc64,gtk_root
+
 root.macosx.carbon.ppc=bin/carbon/macosx/ppc
 root.macosx.carbon.ppc.permissions.755=${launcherName}.app/Contents/MacOS/${launcherName}
 
@@ -41,6 +43,7 @@ root.macosx.cocoa.x86_64=bin/cocoa/macosx/x86_64
 root.macosx.cocoa.x86_64.permissions.755=${launcherName}.app/Contents/MacOS/${launcherName}
 
 root.aix.motif.ppc=bin/motif/aix/ppc
+root.aix.gtk.ppc64=bin/gtk/aix/ppc64
 
 root.hpux.motif.PA_RISC=bin/motif/hpux/PA_RISC
 root.hpux.motif.ia64_32=bin/motif/hpux/ia64_32
@@ -55,4 +58,7 @@ root.linux.gtk.x86_64.permissions.755=libcairo-swt.so
 root.qnx.photon.x86=bin/photon/qnx/x86
 
 root.linux.motif.x86=bin/motif/linux/x86,motif_root
-root.linux.motif.x86.permissions.755=libXm.so.2,libcairo-swt.so
\ No newline at end of file
+root.linux.motif.x86.permissions.755=libXm.so.2,libcairo-swt.so
+
+root.linux.gtk.s390x=contributed/gtk/linux/s390x,gtk_root
+root.linux.gtk.s390=contributed/gtk/linux/s390,gtk_root
diff --git a/eclipse/features/org.eclipse.equinox.executable/target.build.xml b/eclipse/features/org.eclipse.equinox.executable/target.build.xml
index 45e1159..ed649f2 100644
--- a/eclipse/features/org.eclipse.equinox.executable/target.build.xml
+++ b/eclipse/features/org.eclipse.equinox.executable/target.build.xml
@@ -149,9 +149,19 @@
 	<target name="rootFileslinux_gtk_ppc64">
 		<mkdir dir="${feature.base}/linux.gtk.ppc64/${collectingFolder}"/>
 		<copy todir="${feature.base}/linux.gtk.ppc64/${collectingFolder}" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}/bin/gtk/linux/ppc64" includes="**"			/>
+			<fileset dir="${basedir}/gtk_root" includes="**"			/>
 		</copy>
 		<chmod perm="755" dir="${feature.base}/linux.gtk.ppc64/${collectingFolder}" includes="launcher" /> 
 	</target>
+	<target name="rootFilesaix_gtk_ppc64">
+		<mkdir dir="${feature.base}/aix.gtk.ppc64/${collectingFolder}"/>
+		<copy todir="${feature.base}/aix.gtk.ppc64/${collectingFolder}" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}/bin/gtk/aix/ppc64" includes="**"			/>
+			<fileset dir="${basedir}/gtk_root" includes="**"			/>
+		</copy>
+		<chmod perm="755" dir="${feature.base}/aix.gtk.ppc64/${collectingFolder}" includes="launcher" /> 
+	</target>
 	<target name="rootFileslinux_gtk_x86_64">
 		<mkdir dir="${feature.base}/linux.gtk.x86_64/${collectingFolder}"/>
 		<copy todir="${feature.base}/linux.gtk.x86_64/${collectingFolder}" failonerror="true" overwrite="true">
@@ -167,6 +177,22 @@
 		</copy>
 		<chmod perm="755" dir="${feature.base}/linux.gtk.ia64/${collectingFolder}" includes="launcher" /> 
 	</target>
+	<target name="rootFileslinux_gtk_s390x">
+		<mkdir dir="${feature.base}/linux.gtk.s390x/${collectingFolder}"/>
+		<copy todir="${feature.base}/linux.gtk.s390x/${collectingFolder}" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}/contributed/gtk/linux/s390x" includes="**"			/>
+			<fileset dir="${basedir}/gtk_root" includes="**"			/>
+		</copy>
+		<chmod perm="755" dir="${feature.base}/linux.gtk.s390x/${collectingFolder}" includes="launcher" /> 
+	</target>
+	<target name="rootFileslinux_gtk_s390">
+		<mkdir dir="${feature.base}/linux.gtk.s390/${collectingFolder}"/>
+		<copy todir="${feature.base}/linux.gtk.s390/${collectingFolder}" failonerror="true" overwrite="true">
+			<fileset dir="${basedir}/contributed/gtk/linux/s390" includes="**"			/>
+			<fileset dir="${basedir}/gtk_root" includes="**"			/>
+		</copy>
+		<chmod perm="755" dir="${feature.base}/linux.gtk.s390/${collectingFolder}" includes="launcher" /> 
+	</target>
 	<target name="rootFileslinux_motif_x86">
 		<mkdir dir="${feature.base}/linux.motif.x86/${collectingFolder}"/>
 		<copy todir="${feature.base}/linux.motif.x86/${collectingFolder}" failonerror="true" overwrite="true">
@@ -245,11 +271,13 @@
 		<antcall target="rootFileslinux_gtk_ppc64"/>
 		<antcall target="rootFileslinux_gtk_x86_64"/>
 		<antcall target="rootFileslinux_gtk_ia64"/>
+		<antcall target="rootFileslinux_gtk_s390x"/>
 		<antcall target="rootFileslinux_motif_x86"/>
 		<antcall target="rootFilessolaris_gtk_sparc"/>
 		<antcall target="rootFilessolaris_gtk_x86"/>
 		<antcall target="rootFilessolaris_motif_sparc"/>
 		<antcall target="rootFilesaix_motif_ppc"/>
+		<antcall target="rootFilesaix_gtk_ppc64"/>
 		<antcall target="rootFileshpux_motif_PA_RISC"/>
 		<antcall target="rootFileshpux_motif_ia64"/>
 		<antcall target="rootFileshpux_motif_ia64_32"/>
diff --git a/eclipse/features/org.eclipse.equinox.p2.agent.feature/.project b/eclipse/features/org.eclipse.equinox.p2.agent.feature/.project
deleted file mode 100644
index 7d1eaed..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.agent.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.p2.agent.feature</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.FeatureBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.FeatureNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.p2.agent.feature/build.properties b/eclipse/features/org.eclipse.equinox.p2.agent.feature/build.properties
deleted file mode 100644
index d88e78e..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.agent.feature/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml
diff --git a/eclipse/features/org.eclipse.equinox.p2.agent.feature/feature.xml b/eclipse/features/org.eclipse.equinox.p2.agent.feature/feature.xml
deleted file mode 100644
index 2b489c2..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.agent.feature/feature.xml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.eclipse.equinox.p2.agent.feature"
-      label="Equinox p2 Agent"
-      version="1.0.101.qualifier">
-
-   <description url="http://www.example.com/description">
-      [Enter Feature Description here.]
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      [Enter Copyright Description here.]
-   </copyright>
-
-   <license url="http://www.example.com/license">
-      [Enter License Description here.]
-   </license>
-
-   <requires>
-      <import plugin="org.eclipse.ecf" version="3.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.filetransfer" version="3.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.identity" version="3.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.provider.filetransfer" version="3.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.provider.filetransfer.ssl" version="1.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.ssl" version="1.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient" version="3.0.0" match="compatible"/>
-      <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" version="1.0.0" match="compatible"/>
-      <import plugin="org.apache.commons.codec" version="1.3.0" match="compatible"/>
-      <import plugin="org.apache.commons.httpclient" version="3.1.0" match="compatible"/>
-   </requires>
-
-   <plugin
-         id="org.eclipse.equinox.p2.director"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.engine"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.jarprocessor"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.artifact.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.eclipse"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.natives"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin.equinox"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.console"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator.manipulator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.ui.admin"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.ui.admin.rcp"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.updatechecker"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.garbagecollector"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata.generator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.updatesite"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.pb"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.security"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.publisher"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.repository.tools"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.director.feature/.project b/eclipse/features/org.eclipse.equinox.p2.director.feature/.project
deleted file mode 100644
index 8c3f5e3..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.director.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.p2.director.feature</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.FeatureBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.FeatureNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.p2.director.feature/build.properties b/eclipse/features/org.eclipse.equinox.p2.director.feature/build.properties
deleted file mode 100644
index d88e78e..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.director.feature/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml
diff --git a/eclipse/features/org.eclipse.equinox.p2.director.feature/feature.xml b/eclipse/features/org.eclipse.equinox.p2.director.feature/feature.xml
deleted file mode 100644
index 8267146..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.director.feature/feature.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.eclipse.equinox.p2.director.feature"
-      label="Equinox p2 Director Application"
-      version="1.0.101.qualifier">
-
-   <description url="http://www.example.com/description">
-      [Enter Feature Description here.]
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      [Enter Copyright Description here.]
-   </copyright>
-
-   <license url="http://www.example.com/license">
-      [Enter License Description here.]
-   </license>
-
-   <plugin
-         id="org.eclipse.equinox.p2.director"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.director.app"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.engine"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.jarprocessor"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.artifact.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.filetransfer"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.identity"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.eclipse"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.natives"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin.equinox"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.console"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.provider.filetransfer"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator.manipulator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.garbagecollector"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.pb"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.security"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/.project b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/.project
new file mode 100644
index 0000000..774ef70
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.discovery.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/build.properties b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/build.properties
new file mode 100644
index 0000000..0d20533
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/build.properties
@@ -0,0 +1,11 @@
+###############################################################################
+# Copyright (c) 2010 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Tasktop Technologies - initial API and implementation
+###############################################################################
+bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
diff --git a/eclipse/features/org.eclipse.cvs/epl-v10.html b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
similarity index 100%
copy from eclipse/features/org.eclipse.cvs/epl-v10.html
copy to eclipse/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.properties b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
new file mode 100644
index 0000000..6bd1ba0
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
@@ -0,0 +1,171 @@
+###############################################################################
+# Copyright (c) 2010 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Tasktop Technologies - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Equinox p2 Discovery
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "updateSiteName" property - label for the update site
+updateSiteName=The Equinox Project Repository
+
+# "description" property - description of the feature
+description=All of the bundles that comprise Equinox p2 discovery. \n\
+This feature is intended to be used by integrators building on discovery.
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 Tasktop Technologies and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    Tasktop Technologies - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.xml b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
new file mode 100644
index 0000000..3b4abb6
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.p2.discovery.feature"
+      label="%featureName"
+      version="1.0.1.qualifier"
+      provider-name="%providerName">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.equinox.p2.discovery"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.discovery.compatibility"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ui.discovery"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/license.html b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/build.properties
copy to eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties
diff --git a/eclipse/features/org.eclipse.cvs/eclipse_update_120.jpg b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg
similarity index 100%
copy from eclipse/features/org.eclipse.cvs/eclipse_update_120.jpg
copy to eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg
diff --git a/eclipse/features/org.eclipse.cvs/epl-v10.html b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
similarity index 100%
copy from eclipse/features/org.eclipse.cvs/epl-v10.html
copy to eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
diff --git a/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
new file mode 100644
index 0000000..3b5a98e
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
@@ -0,0 +1,144 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Eclipse p2 Discovery Developer Resources
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse.org
+
+# "updateSiteName" property - label for the update site
+updateSiteName=The Eclipse Project Updates
+
+# "description" property - description of the feature
+description=Source code for the Equinox p2 Discovery
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 Sonatype Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    Sonatype Inc. - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
+March 17, 2005\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public\n\
+License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
+Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse.org CVS\n\
+repository ("Repository") in CVS modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+   - Content may be structured and packaged into modules to facilitate delivering,\n\
+     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+     plug-in fragments ("Fragments"), and features ("Features").\n\
+   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
+     in a directory named "plugins".\n\
+   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+Features may also include other Features ("Included Features"). Files named\n\
+"feature.xml" may contain a list of the names and version numbers of\n\
+Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+   - The top-level (root) directory\n\
+   - Plug-in and Fragment directories\n\
+   - Inside Plug-ins and Fragments packaged as JARs\n\
+   - Sub-directories of the directory named "src" of certain Plug-ins\n\
+   - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Eclipse Update Manager, you must agree to a license ("Feature Update\n\
+License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties". Such Abouts,\n\
+Feature Licenses and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your\n\
+use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
+    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use,\n\
+and re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.cvs/license.html b/eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
similarity index 100%
copy from eclipse/features/org.eclipse.cvs/license.html
copy to eclipse/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
diff --git a/eclipse/features/org.eclipse.equinox.p2.generator.feature/.project b/eclipse/features/org.eclipse.equinox.p2.generator.feature/.project
deleted file mode 100644
index f062146..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.generator.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.p2.generator.feature</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.FeatureBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.FeatureNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.p2.generator.feature/build.properties b/eclipse/features/org.eclipse.equinox.p2.generator.feature/build.properties
deleted file mode 100644
index 32d1ed1..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.generator.feature/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = feature.xml
-customBuildCallbacks=customBuildCallbacks.xml
-customBuildCallbacks.inheritall=true
diff --git a/eclipse/features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml b/eclipse/features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml
deleted file mode 100644
index d04cc19..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Custom targets called from a project's generated build.xml            -->
-<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
-<!-- ===================================================================== -->
-<project name="Build specific targets and properties" default="noDefault">
-
-	<!-- ===================================================================== -->
-	<!-- Default target                                                        -->
-	<!-- ===================================================================== -->
-	<target name="noDefault">
-		<echo message="This file must be called with explicit targets" />
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target gather.bin.parts                        -->
-	<!-- Available parameters :                                                -->
-	<!--  destination.temp.folder - the directory plugins will be collected to -->
-	<!--  feature.directory - the directory containing the resulting feature   -->
-	<!-- ===================================================================== -->
-	<target name="pre.gather.bin.parts">
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target gather.bin.parts                         -->
-	<!-- Available parameters :                                                -->
-	<!--  destination.temp.folder - the directory plugins will be collected to -->
-	<!--  feature.directory - the directory containing the resulting feature   -->
-	<!-- ===================================================================== -->
-	<target name="post.gather.bin.parts">
-		<!-- load the properties file to get the bundle versions -->
-		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
-		<!-- zip up the simple.configurator into the generator bundle -->
-		<zip 
-			basedir="${destination.temp.folder}/org.eclipse.equinox.simpleconfigurator_${org.eclipse.equinox.simpleconfigurator}"
-			destfile="${destination.temp.folder}/org.eclipse.equinox.p2.metadata.generator_${org.eclipse.equinox.p2.metadata.generator}/org.eclipse.equinox.simpleconfigurator.jar">
-		</zip>
-	</target>
-
-</project>
diff --git a/eclipse/features/org.eclipse.equinox.p2.generator.feature/feature.xml b/eclipse/features/org.eclipse.equinox.p2.generator.feature/feature.xml
deleted file mode 100644
index 7998212..0000000
--- a/eclipse/features/org.eclipse.equinox.p2.generator.feature/feature.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.eclipse.equinox.p2.generator.feature"
-      label="Equinox p2 Generator Application"
-      version="1.0.101.qualifier">
-
-   <description url="http://www.example.com/description">
-      [Enter Feature Description here.]
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      [Enter Copyright Description here.]
-   </copyright>
-
-   <license url="http://www.example.com/license">
-      [Enter License Description here.]
-   </license>
-
-   <plugin
-         id="org.eclipse.equinox.p2.artifact.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.console"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.director"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.engine"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.jarprocessor"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata.generator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.metadata.repository"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.eclipse"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.touchpoint.natives"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.filetransfer"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.identity"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.ecf.provider.filetransfer"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.frameworkadmin.equinox"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.simpleconfigurator.manipulator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.garbagecollector"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.sat4j.pb"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.security"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.publisher"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.sdk/build.properties b/eclipse/features/org.eclipse.equinox.p2.sdk/build.properties
index 1f5e7d1..be846fa 100644
--- a/eclipse/features/org.eclipse.equinox.p2.sdk/build.properties
+++ b/eclipse/features/org.eclipse.equinox.p2.sdk/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 EclipseSource and others.
+# Copyright (c) 2009, 2010 EclipseSource and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 # 
 # Contributors:
 #     EclipseSource - initial API and implementation
+#		IBM - Ongoing changes
 ###############################################################################
 bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
 
@@ -30,7 +31,6 @@ generate.plugin at org.eclipse.equinox.p2.director.app.source=org.eclipse.equinox.p
 generate.plugin at org.eclipse.equinox.p2.director.source=org.eclipse.equinox.p2.director
 generate.plugin at org.eclipse.equinox.p2.directorywatcher.source=org.eclipse.equinox.p2.directorywatcher
 generate.plugin at org.eclipse.equinox.p2.engine.source=org.eclipse.equinox.p2.engine
-generate.plugin at org.eclipse.equinox.p2.exemplarysetup.source=org.eclipse.equinox.p2.exemplarysetup
 generate.plugin at org.eclipse.equinox.p2.extensionlocation.source=org.eclipse.equinox.p2.extensionlocation
 generate.plugin at org.eclipse.equinox.p2.garbagecollector.source=org.eclipse.equinox.p2.garbagecollector
 generate.plugin at org.eclipse.equinox.p2.installer.source=org.eclipse.equinox.p2.installer
@@ -38,11 +38,12 @@ generate.plugin at org.eclipse.equinox.p2.jarprocessor.source=org.eclipse.equinox.p
 generate.plugin at org.eclipse.equinox.p2.metadata.generator.source=org.eclipse.equinox.p2.metadata.generator
 generate.plugin at org.eclipse.equinox.p2.metadata.repository.source=org.eclipse.equinox.p2.metadata.repository
 generate.plugin at org.eclipse.equinox.p2.metadata.source=org.eclipse.equinox.p2.metadata
+generate.plugin at org.eclipse.equinox.p2.operations.source=org.eclipse.equinox.p2.operations
 generate.plugin at org.eclipse.equinox.p2.publisher.source=org.eclipse.equinox.p2.publisher
+generate.plugin at org.eclipse.equinox.p2.ql.source=org.eclipse.equinox.p2.ql
 generate.plugin at org.eclipse.equinox.p2.reconciler.dropins.source=org.eclipse.equinox.p2.reconciler.dropins
 generate.plugin at org.eclipse.equinox.p2.repository.source=org.eclipse.equinox.p2.repository
 generate.plugin at org.eclipse.equinox.p2.repository.tools.source=org.eclipse.equinox.p2.repository.tools
-generate.plugin at org.eclipse.equinox.p2.tools.source=org.eclipse.equinox.p2.tools
 generate.plugin at org.eclipse.equinox.p2.touchpoint.eclipse.source=org.eclipse.equinox.p2.touchpoint.eclipse
 generate.plugin at org.eclipse.equinox.p2.touchpoint.natives.source=org.eclipse.equinox.p2.touchpoint.natives
 generate.plugin at org.eclipse.equinox.p2.ui.admin.rcp.source=org.eclipse.equinox.p2.ui.admin.rcp
diff --git a/eclipse/features/org.eclipse.equinox.p2.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.p2.sdk/feature.properties
index 9ab876c..0753b2f 100644
--- a/eclipse/features/org.eclipse.equinox.p2.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.p2.sdk/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 EclipseSource and others.
+# Copyright (c) 2009, 2010 EclipseSource and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ deployed with end-user systems.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2009 EclipseSource and others.\n\
+Copyright (c) 2009, 2010 EclipseSource and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -39,6 +39,7 @@ http://www.eclipse.org/legal/epl-v10.html\n\
 \n\
 Contributors:\n\
     EclipseSource - initial API and implementation\n
+    IBM - ongoing development\n
 ################ end of copyright property ####################################
 
 # "licenseURL" property - URL of the "Feature License"
@@ -48,8 +49,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -57,42 +58,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -101,47 +98,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.p2.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.p2.sdk/feature.xml
index 4f6ab1b..c5b9753 100644
--- a/eclipse/features/org.eclipse.equinox.p2.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.p2.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.sdk"
       label="%featureName"
-      version="3.5.1.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -17,6 +17,10 @@
       %license
    </license>
 
+   <includes
+         id="org.eclipse.equinox.p2.discovery.feature"
+         version="0.0.0"/>
+
    <plugin
          id="org.apache.commons.codec"
          download-size="0"
@@ -158,20 +162,6 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup.source"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.equinox.p2.extensionlocation"
          download-size="0"
          install-size="0"
@@ -326,20 +316,6 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.equinox.p2.tools"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.equinox.p2.tools.source"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.equinox.p2.touchpoint.eclipse"
          download-size="0"
          install-size="0"
@@ -650,7 +626,32 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.eclipse.equinox.p2.operations"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
 
+   <plugin
+         id="org.eclipse.equinox.p2.operations.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
 
+   <plugin
+         id="org.eclipse.equinox.p2.ql"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ql.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
 
 </feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.sdk/license.html b/eclipse/features/org.eclipse.equinox.p2.sdk/license.html
index c6af966..7ed55df 100644
--- a/eclipse/features/org.eclipse.equinox.p2.sdk/license.html
+++ b/eclipse/features/org.eclipse.equinox.p2.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,40 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +61,53 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.properties b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.properties
index 1a8429d..2e92995 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.properties
@@ -12,7 +12,7 @@ description=Eclipse Provisioning Platform
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2008, 2009 IBM Corporation and others.\n\
+Copyright (c) 2008, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -29,8 +29,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -38,42 +38,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -82,47 +78,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
index 7d2847f..a65d54e 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.p2.user.ui"
       label="%featureName"
-      version="1.1.2.qualifier"
+      version="2.0.1.qualifier"
       provider-name="%providerName"
       image="eclipse_update_120.jpg">
 
@@ -68,13 +68,6 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.equinox.p2.exemplarysetup"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.equinox.p2.touchpoint.eclipse"
          download-size="0"
          install-size="0"
@@ -315,4 +308,25 @@
          version="3.1.0.qualifier"
          unpack="false"/>
 
+   <plugin
+         id="org.apache.commons.logging"
+         download-size="0"
+         install-size="0"
+         version="1.0.4.qualifier"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.operations"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ql"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/license.html b/eclipse/features/org.eclipse.equinox.p2.user.ui/license.html
index c6af966..61d632d 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/license.html
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,40 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +61,53 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
-</html>
+</html>
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/pom.xml b/eclipse/features/org.eclipse.equinox.p2.user.ui/pom.xml
new file mode 100644
index 0000000..bfd9f37
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<artifactId>org.eclipse.equinox.p2-parent</artifactId>
+		<groupId>org.eclipse</groupId>
+		<version>0.0.1-SNAPSHOT</version>
+		<relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+	</parent>
+	
+	<groupId>org.eclipse</groupId>
+	<artifactId>org.eclipse.equinox.p2.user.ui</artifactId>
+	<version>2.0.0.qualifier</version>
+	<packaging>eclipse-feature</packaging>
+</project>
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
index 6fd1487..cd4e3c5 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/feature.properties
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html
index c6af966..61d632d 100644
--- a/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.equinox.p2.user.ui/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,40 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +61,53 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
-</html>
+</html>
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.equinox.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.sdk/feature.properties
index f863e10..e07bdb6 100644
--- a/eclipse/features/org.eclipse.equinox.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.sdk/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 EclipseSource and others.
+# Copyright (c) 2009, 2011 EclipseSource and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 # 
 # Contributors:
 #     EclipseSource - initial API and implementation
+#	   IBM - ongoing development
 ###############################################################################
 # feature.properties
 # contains externalized strings for feature.xml
@@ -15,7 +16,7 @@
 # This file should be translated.
 
 # "featureName" property - name of the feature
-featureName=Equinox Project SDK
+featureName=Equinox Target Components
 
 # "providerName" property - name of the company that provides the feature
 providerName=Eclipse Equinox Project
@@ -33,7 +34,7 @@ deployed with end-user systems.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2009 EclipseSource and others.\n\
+Copyright (c) 2009, 2011 EclipseSource and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -50,8 +51,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -59,42 +60,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -103,47 +100,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.equinox.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.sdk/feature.xml
index 7bc0829..e172d16 100644
--- a/eclipse/features/org.eclipse.equinox.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.sdk"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -37,4 +37,8 @@
          id="org.eclipse.equinox.executable"
          version="0.0.0"/>
 
+   <includes
+         id="org.eclipse.equinox.weaving.sdk"
+         version="0.0.0"/>
+
 </feature>
diff --git a/eclipse/features/org.eclipse.equinox.sdk/license.html b/eclipse/features/org.eclipse.equinox.sdk/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.equinox.sdk/license.html
+++ b/eclipse/features/org.eclipse.equinox.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.server.core/.project b/eclipse/features/org.eclipse.equinox.server.core/.project
new file mode 100644
index 0000000..fe6ec69
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.core/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.server.core.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.server.core/build.properties b/eclipse/features/org.eclipse.equinox.server.core/build.properties
new file mode 100644
index 0000000..2cbd854
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.core/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               license.html
diff --git a/eclipse/features/org.eclipse.equinox.server.core/feature.properties b/eclipse/features/org.eclipse.equinox.server.core/feature.properties
new file mode 100644
index 0000000..16cfd21
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.core/feature.properties
@@ -0,0 +1,164 @@
+###############################################################################
+# Copyright (c) 2010 IBM, Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Core Server Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 IBM, Composent, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.server.core/feature.xml b/eclipse/features/org.eclipse.equinox.server.core/feature.xml
new file mode 100644
index 0000000..87e158d
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.core/feature.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.server.core"
+      label="%featureName"
+      version="1.0.1.qualifier"
+      provider-name="%providerName">
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.osgi"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.osgi.services"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.common"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.ds"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.util"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.core.jobs"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.registry"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http.registry"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.simpleconfigurator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.server.core/license.html b/eclipse/features/org.eclipse.equinox.server.core/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.core/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.server.jetty/.project b/eclipse/features/org.eclipse.equinox.server.jetty/.project
new file mode 100644
index 0000000..6caac01
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.jetty/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.server.jetty</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.server.jetty/build.properties b/eclipse/features/org.eclipse.equinox.server.jetty/build.properties
new file mode 100644
index 0000000..2cbd854
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.jetty/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               license.html
diff --git a/eclipse/features/org.eclipse.equinox.server.jetty/feature.properties b/eclipse/features/org.eclipse.equinox.server.jetty/feature.properties
new file mode 100644
index 0000000..4904648
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.jetty/feature.properties
@@ -0,0 +1,164 @@
+###############################################################################
+# Copyright (c) 2010 IBM, Composent, Inc.  and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Jetty Http Server Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 IBM, Composent, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.server.jetty/feature.xml b/eclipse/features/org.eclipse.equinox.server.jetty/feature.xml
new file mode 100644
index 0000000..60b2409
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.jetty/feature.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.server.jetty"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName">
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+   <plugin
+         id="javax.servlet"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http.jetty"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http.servlet"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.mortbay.jetty.server"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.mortbay.jetty.util"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.server.jetty/license.html b/eclipse/features/org.eclipse.equinox.server.jetty/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.jetty/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.server.p2/.project b/eclipse/features/org.eclipse.equinox.server.p2/.project
new file mode 100644
index 0000000..5f18981
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.p2/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.server.p2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.server.p2/build.properties b/eclipse/features/org.eclipse.equinox.server.p2/build.properties
new file mode 100644
index 0000000..d34bea2
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.p2/build.properties
@@ -0,0 +1,12 @@
+bin.includes = feature.xml,\
+               about.html,\
+               build.properties,\
+               epl-v10.html,\
+               feature.properties,\
+               license.html
+src.includes = about.html,\
+               build.properties,\
+               epl-v10.html,\
+               feature.properties,\
+               feature.xml,\
+               license.html
diff --git a/eclipse/features/org.eclipse.equinox.server.p2/feature.properties b/eclipse/features/org.eclipse.equinox.server.p2/feature.properties
new file mode 100644
index 0000000..4271e98
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.p2/feature.properties
@@ -0,0 +1,164 @@
+###############################################################################
+# Copyright (c) 2010 IBM, Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=p2 Server Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 IBM, Composent, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.server.p2/feature.xml b/eclipse/features/org.eclipse.equinox.server.p2/feature.xml
new file mode 100644
index 0000000..5d9fbd4
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.p2/feature.xml
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.server.p2"
+      label="%featureName"
+      version="1.0.1.qualifier"
+      provider-name="%providerName">
+
+   <copyright url="%copyrightURL">
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.equinox.p2.artifact.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.console"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.director"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.engine"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.garbagecollector"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.metadata"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.metadata.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.repository"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.touchpoint.eclipse"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.touchpoint.natives"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.simpleconfigurator.manipulator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.sat4j.pb"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.filetransfer"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.identity"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.provider.filetransfer"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.provider.filetransfer.httpclient"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.provider.filetransfer.ssl"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ecf.ssl"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.commons.codec"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.commons.httpclient"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.commons.logging"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.frameworkadmin"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.frameworkadmin.equinox"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.preferences"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.security"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.app"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.jarprocessor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.p2.ql"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.server.p2/license.html b/eclipse/features/org.eclipse.equinox.server.p2/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.p2/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/.project b/eclipse/features/org.eclipse.equinox.server.servletbridge/.project
new file mode 100644
index 0000000..649ef74
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.server.servletbridge</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/build.properties b/eclipse/features/org.eclipse.equinox.server.servletbridge/build.properties
new file mode 100644
index 0000000..0bb82c9
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/build.properties
@@ -0,0 +1,5 @@
+root=rootfiles
+bin.includes = feature.xml,\
+               rootfiles/,\
+               license.html,\
+               feature.properties
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.properties b/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.properties
new file mode 100644
index 0000000..dee3d74
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.properties
@@ -0,0 +1,164 @@
+###############################################################################
+# Copyright (c) 2010 IBM, Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Servletbridge Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 IBM, Composent, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.xml b/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.xml
new file mode 100644
index 0000000..82874e4
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/feature.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.server.servletbridge"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName">
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.equinox.http.servlet"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http.servletbridge"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.servletbridge.extensionbundle"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/license.html b/eclipse/features/org.eclipse.equinox.server.servletbridge/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/launch.ini b/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/launch.ini
new file mode 100644
index 0000000..b4dd51e
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/launch.ini
@@ -0,0 +1,12 @@
+# Eclipse Runtime Configuration Overrides
+# These properties are loaded prior to starting the framework and can also be used to override System Properties
+# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
+# "*" can be used together with @null to clear System Properties that match a prefix name. 
+
+osgi.*=@null
+org.osgi.*=@null
+eclipse.*=@null
+org.eclipse.*=@null
+
+osgi.parentClassloader=app
+osgi.contextClassLoaderParent=app
diff --git a/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/web.xml b/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/web.xml
new file mode 100644
index 0000000..e5dbb96
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.servletbridge/rootfiles/web.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+<web-app id="WebApp">
+	<servlet id="bridge">
+		<servlet-name>equinoxbridgeservlet</servlet-name>
+		<display-name>Equinox Bridge Servlet</display-name>
+		<description>Equinox Bridge Servlet</description>
+		<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
+		<init-param>
+			<param-name>commandline</param-name>
+			<param-value>-console</param-value>			
+		</init-param>		
+		<init-param>
+			<param-name>enableFrameworkControls</param-name>
+			<param-value>true</param-value>			
+		</init-param>
+		<!-- 
+		  You can specify your own framework launcher here.
+		  The default is: org.eclipse.equinox.servletbridge.FrameworkLauncher
+		<init-param>
+			<param-name>frameworkLauncherClass</param-name>
+			<param-value>org.eclipse.equinox.servletbridge.FrameworkLauncher</param-value>
+		</init-param>	
+		-->		
+		<!-- 
+		  When the framework is deployed, an extension bundle must be present to allow the Servlet API to 
+		  be exported by the container.  Typically, this extension bundle is created at deploy time by the
+		  FrameworkLauncher.  If, however, an extension bundle (with id 'org.eclipse.equinox.servletbridge.extensionbundle') is
+		  already present in the 'plugins' area, then preference is given to the existing bundle.
+		  If this param is set to 'true', then the existing extension bundle with be *overridden* and
+		  the one created by the FrameworkLauncher will replace any existing one.  The default is 'false' 
+		  (giving preference to the existing extension bundle if present).
+		  
+		  default: false
+		<init-param>
+			<param-name>overrideAndReplaceExtensionBundle</param-name>
+			<param-value>false</param-value>
+		</init-param>
+		-->		
+		<!--				  
+		  org.eclipse.equinox.servletbridge and the Servlet API are exported automatically to the underlying OSGi framework.
+		  The extendedFrameworkExports parameter allows the specification of additional java package exports.
+		  The format is a comma separated list of exports as specified by the "Export-Package" bundle manifest header.
+		  For example: com.mycompany.exports; version=1.0.0, com.mycompany.otherexports; version=1.0.0
+		  
+		  NOTE: This property is ignored by default and is only processed if overrideAndReplaceExtensionBundle is true.
+		<init-param>
+			<param-name>extendedFrameworkExports</param-name>
+			<param-value></param-value>			
+		</init-param>
+		-->		
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>equinoxbridgeservlet</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+	<!--
+	  This is required if your application bundles expose JSPs. 
+	-->	
+	<servlet-mapping>
+		<servlet-name>equinoxbridgeservlet</servlet-name>
+		<url-pattern>*.jsp</url-pattern>
+	</servlet-mapping>	
+</web-app>
diff --git a/eclipse/features/org.eclipse.equinox.server.simple/.project b/eclipse/features/org.eclipse.equinox.server.simple/.project
new file mode 100644
index 0000000..fd87847
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.simple/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.server.simple</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.server.simple/build.properties b/eclipse/features/org.eclipse.equinox.server.simple/build.properties
new file mode 100644
index 0000000..2cbd854
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.simple/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               license.html
diff --git a/eclipse/features/org.eclipse.equinox.server.simple/feature.properties b/eclipse/features/org.eclipse.equinox.server.simple/feature.properties
new file mode 100644
index 0000000..3f8befb
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.simple/feature.properties
@@ -0,0 +1,164 @@
+###############################################################################
+# Copyright (c) 2010 IBM, Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Simple Http Server Feature
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2010 IBM,, Composent, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.server.simple/feature.xml b/eclipse/features/org.eclipse.equinox.server.simple/feature.xml
new file mode 100644
index 0000000..25d59c0
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.simple/feature.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.server.simple"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName">
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="javax.servlet"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.http"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.server.simple/license.html b/eclipse/features/org.eclipse.equinox.server.simple/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.server.simple/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.properties
index b238842..38d7b1d 100644
--- a/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.properties
@@ -50,8 +50,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -59,42 +59,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -103,47 +99,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
 ########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.xml
index 0ee4dc0..2292b9a 100644
--- a/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.equinox.serverside.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.equinox.serverside.sdk"
       label="%featureName"
-      version="3.5.0.qualifier"
+      version="3.6.1.qualifier"
       provider-name="%providerName">
 
    <description>
@@ -17,6 +17,26 @@
       %license
    </license>
 
+   <includes
+         id="org.eclipse.equinox.server.core"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.equinox.server.jetty"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.equinox.server.p2"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.equinox.server.servletbridge"
+         version="0.0.0"/>
+
+   <includes
+         id="org.eclipse.equinox.server.simple"
+         version="0.0.0"/>
+
    <plugin
          id="javax.servlet"
          download-size="0"
@@ -184,4 +204,13 @@
          install-size="0"
          version="0.0.0"
          unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.servletbridge.extensionbundle"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
 </feature>
diff --git a/eclipse/features/org.eclipse.equinox.serverside.sdk/license.html b/eclipse/features/org.eclipse.equinox.serverside.sdk/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.equinox.serverside.sdk/license.html
+++ b/eclipse/features/org.eclipse.equinox.serverside.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.equinox.weaving.sdk/.project b/eclipse/features/org.eclipse.equinox.weaving.sdk/.project
new file mode 100644
index 0000000..dec161e
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.weaving.sdk/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.weaving.sdk</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/features/org.eclipse.equinox.weaving.sdk/build.properties b/eclipse/features/org.eclipse.equinox.weaving.sdk/build.properties
new file mode 100644
index 0000000..11b7580
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.weaving.sdk/build.properties
@@ -0,0 +1,9 @@
+bin.includes = feature.xml,\
+               epl-v10.html,\
+               feature.properties,\
+               license.html
+
+generate.plugin at org.eclipse.equinox.weaving.aspectj.source=org.eclipse.equinox.weaving.aspectj
+generate.plugin at org.eclipse.equinox.weaving.caching.source=org.eclipse.equinox.weaving.caching
+generate.plugin at org.eclipse.equinox.weaving.caching.j9.source=org.eclipse.equinox.weaving.caching.j9
+generate.plugin at org.eclipse.equinox.weaving.hook.source=org.eclipse.equinox.weaving.hook
diff --git a/eclipse/features/org.eclipse.cvs/epl-v10.html b/eclipse/features/org.eclipse.equinox.weaving.sdk/epl-v10.html
similarity index 100%
copy from eclipse/features/org.eclipse.cvs/epl-v10.html
copy to eclipse/features/org.eclipse.equinox.weaving.sdk/epl-v10.html
diff --git a/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.properties b/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.properties
new file mode 100644
index 0000000..f93b673
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.properties
@@ -0,0 +1,170 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM - initial API and implementation
+###############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=Equinox Weaving SDK
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Equinox Project
+
+# "updateSiteName" property - label for the update site
+updateSiteName=The Equinox Project Repository
+
+# "description" property - description of the feature
+description=A description of Equinox Weaving
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=\
+Copyright (c) 2009 IBM Corporation and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors:\n\
+    IBM - initial API and implementation\n
+################ end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.xml b/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.xml
new file mode 100644
index 0000000..5011347
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.weaving.sdk/feature.xml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.equinox.weaving.sdk"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%providerName">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.aspectj"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.aspectj.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.caching"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.caching.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.caching.j9"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.caching.j9.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.hook"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.equinox.weaving.hook.source"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>
diff --git a/eclipse/features/org.eclipse.equinox.weaving.sdk/license.html b/eclipse/features/org.eclipse.equinox.weaving.sdk/license.html
new file mode 100644
index 0000000..c184ca3
--- /dev/null
+++ b/eclipse/features/org.eclipse.equinox.weaving.sdk/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+   For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+      and/or Fragments associated with that Feature.</li>
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
+installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/eclipse/features/org.eclipse.help/feature.properties b/eclipse/features/org.eclipse.help/feature.properties
index 71723ad..a2fbb4e 100644
--- a/eclipse/features/org.eclipse.help/feature.properties
+++ b/eclipse/features/org.eclipse.help/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ description=Eclipse help system.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2008, 2009 IBM Corporation and others.\n\
+Copyright (c) 2008, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.help/feature.xml b/eclipse/features/org.eclipse.help/feature.xml
index b3a84a9..ab10824 100644
--- a/eclipse/features/org.eclipse.help/feature.xml
+++ b/eclipse/features/org.eclipse.help/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.help"
       label="%featureName"
-      version="1.1.2.qualifier"
+      version="1.2.1.qualifier"
       provider-name="%providerName"
       plugin="org.eclipse.help.base">
 
diff --git a/eclipse/features/org.eclipse.help/license.html b/eclipse/features/org.eclipse.help/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.help/license.html
+++ b/eclipse/features/org.eclipse.help/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.help/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.help/sourceTemplateFeature/feature.properties
index b1f373b..ce81b21 100644
--- a/eclipse/features/org.eclipse.help/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.help/sourceTemplateFeature/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.help/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.help/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.help/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.help/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.jdt/feature.properties b/eclipse/features/org.eclipse.jdt/feature.properties
index cd0917b..c94fe82 100644
--- a/eclipse/features/org.eclipse.jdt/feature.properties
+++ b/eclipse/features/org.eclipse.jdt/feature.properties
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.jdt/feature.xml b/eclipse/features/org.eclipse.jdt/feature.xml
index 4f2e0cb..3899b9f 100644
--- a/eclipse/features/org.eclipse.jdt/feature.xml
+++ b/eclipse/features/org.eclipse.jdt/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.jdt"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName"
       image="eclipse_update_120.jpg">
 
@@ -24,7 +24,7 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.platform" version="3.5.1" match="compatible"/>
+      <import feature="org.eclipse.platform" version="3.6.2" match="greaterOrEqual"/>
    </requires>
 
    <plugin
@@ -113,6 +113,13 @@
          unpack="false"/>
 
    <plugin
+         id="org.eclipse.jdt.junit.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
          id="org.eclipse.jdt.junit.runtime"
          download-size="0"
          install-size="0"
@@ -144,7 +151,13 @@
          id="org.junit"
          download-size="0"
          install-size="0"
-         version="0.0.0"/>
+         version="4.8.1.qualifier"/>
+
+   <plugin
+         id="org.junit"
+         download-size="0"
+         install-size="0"
+         version="3.8.2.qualifier"/>
 
    <plugin
          id="org.junit4"
@@ -182,4 +195,11 @@
          version="0.0.0"
          unpack="false"/>
 
+   <plugin
+         id="org.eclipse.ant.launching"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
 </feature>
diff --git a/eclipse/features/org.eclipse.jdt/license.html b/eclipse/features/org.eclipse.jdt/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.jdt/license.html
+++ b/eclipse/features/org.eclipse.jdt/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.jdt/rootfiles/notice.html b/eclipse/features/org.eclipse.jdt/rootfiles/notice.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.jdt/rootfiles/notice.html
+++ b/eclipse/features/org.eclipse.jdt/rootfiles/notice.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/feature.properties
index cad37a3..67ad259 100644
--- a/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/feature.properties
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.jdt/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/about.properties b/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/about.properties
index b7099c7..02116f8 100644
--- a/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/about.properties
+++ b/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Java Development Tools SDK\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/jdt
 
diff --git a/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/plugin.properties b/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/plugin.properties
index 98d45f9..66e17bd 100644
--- a/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/plugin.properties
+++ b/eclipse/features/org.eclipse.jdt/sourceTemplatePlugin/plugin.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
diff --git a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/feature.properties b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/feature.properties
index 759873f..24a7500 100644
--- a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/feature.properties
+++ b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
+# Copyright (c) 2009, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ JRE-1.1.\n
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2009 IBM Corporation and others.\n\
+Copyright (c) 2009, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -38,13 +38,13 @@ Contributors:\n\
 
 # "licenseURL" property - URL of the "Feature License"
 # do not translate value - just change to point to a locale-specific HTML page
-licenseURL=licence.html
+licenseURL=license.html
 
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -52,42 +52,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -96,47 +92,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/license.html b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/license.html
+++ b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/p2.inf b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/p2.inf
index 0423aa5..0fc9566 100644
--- a/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/p2.inf
+++ b/eclipse/features/org.eclipse.pde.api.tools.ee.fragments/p2.inf
@@ -1,2 +1,13 @@
-properties.1.name=org.eclipse.equinox.p2.type.category
-properties.1.value=true
\ No newline at end of file
+units.1.id=org.eclipse.pde.api.tools.ee.fragments
+units.1.version=1.0.0.$qualifier$
+units.1.provides.1.namespace=org.eclipse.equinox.p2.iu
+units.1.provides.1.name=org.eclipse.pde.api.tools.ee.fragments
+units.1.provides.1.version=0.0.0
+units.1.properties.1.name=org.eclipse.equinox.p2.name
+units.1.properties.1.value=PDE/API Tools Environment Descriptions
+units.1.properties.2.name=org.eclipse.equinox.p2.type.category
+units.1.properties.2.value=true
+units.1.requires.1.namespace=org.eclipse.equinox.p2.iu
+units.1.requires.1.name=org.eclipse.pde.api.tools.ee.fragments
+units.1.requires.1.range=[$version$,$version$]
+units.1.requires.1.greedy=true   
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.pde/feature.properties b/eclipse/features/org.eclipse.pde/feature.properties
index 5a9ffda..48e5445 100644
--- a/eclipse/features/org.eclipse.pde/feature.properties
+++ b/eclipse/features/org.eclipse.pde/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ description=Eclipse plug-in development environment.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2009 IBM Corporation and others.\n\
+Copyright (c) 2000, 2011 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.pde/feature.xml b/eclipse/features/org.eclipse.pde/feature.xml
index 670cc5b..575ef86 100644
--- a/eclipse/features/org.eclipse.pde/feature.xml
+++ b/eclipse/features/org.eclipse.pde/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.pde"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName"
       image="eclipse_update_120.jpg">
 
@@ -19,14 +19,14 @@
    </license>
 
    <url>
-      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/galileo"/>
+      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/helios"/>
    </url>
 
    <requires>
-      <import feature="org.eclipse.jdt" version="3.0.0" match="compatible"/>
-      <import feature="org.eclipse.platform" version="3.0.0" match="compatible"/>
+      <import feature="org.eclipse.jdt" version="3.6.0" match="compatible"/>
+      <import feature="org.eclipse.platform" version="3.6.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
@@ -124,7 +124,14 @@
          download-size="0"
          install-size="0"
          version="0.0.0"
-         unpack="false"/>       
+         unpack="false"/>
+                  
+   <plugin
+         id="org.eclipse.pde.launching"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>               
          
    <plugin
          id="org.eclipse.pde.ua.core"
diff --git a/eclipse/features/org.eclipse.pde/license.html b/eclipse/features/org.eclipse.pde/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.pde/license.html
+++ b/eclipse/features/org.eclipse.pde/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.pde/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.pde/sourceTemplateFeature/feature.properties
index 7ac2f55..a9fc762 100644
--- a/eclipse/features/org.eclipse.pde/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.pde/sourceTemplateFeature/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2004, 2008 IBM Corporation and others.
+# Copyright (c) 2004, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ description=Eclipse plug-in development environment, including documentation and
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2009 IBM Corporation and others.\n\
+Copyright (c) 2000, 2011 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -42,11 +42,15 @@ Contributors:\n\
 # do not translate value - just change to point to a locale-specific HTML page
 licenseURL=license.html
 
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +58,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +98,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.pde/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.pde/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.pde/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.pde/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.pde/sourceTemplatePlugin/about.properties b/eclipse/features/org.eclipse.pde/sourceTemplatePlugin/about.properties
index 67eb934..7809899 100644
--- a/eclipse/features/org.eclipse.pde/sourceTemplatePlugin/about.properties
+++ b/eclipse/features/org.eclipse.pde/sourceTemplatePlugin/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,6 +21,6 @@ blurb=Eclipse Plug-in Development Environment Developer Resources\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2011.  All rights reserved.\n\
 Visit http://www.eclipse.org/pde
 
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about.html b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about.html
index 57d0b3c..3a9d4d6 100644
--- a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about.html
+++ b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about.html b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about.html
index eab9b35..6c5fbd8 100644
--- a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about.html
+++ b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
@@ -85,6 +84,45 @@ other terms and conditions of Section 6 as well as other Sections of the LGPL.
 governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
 work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
 
+<h4>WebKitGTK+ Binding</h4>
+
+<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>
+The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<p>
+In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by the terms and conditions of the LGPL. Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined work is provided for debugging purposes so there is no need to reverse engineer the combined work.<p>
+
+<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_blank">http://webkit.org/coding/bsd-license.html</a>. </p>
+
+<h4>libsoup</h4>
+
+<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
 <h4>Mozilla Binding</h4>
 
 <p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about_files/webkit-bsd.txt b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about_files/webkit-bsd.txt
new file mode 100644
index 0000000..b3b07c6
--- /dev/null
+++ b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86/about_files/webkit-bsd.txt
@@ -0,0 +1,20 @@
+BSD License
+
+Copyright (C) 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about.html b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about.html
index eab9b35..6c5fbd8 100644
--- a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about.html
+++ b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
@@ -85,6 +84,45 @@ other terms and conditions of Section 6 as well as other Sections of the LGPL.
 governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
 work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
 
+<h4>WebKitGTK+ Binding</h4>
+
+<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>
+The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<p>
+In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by the terms and conditions of the LGPL. Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined work is provided for debugging purposes so there is no need to reverse engineer the combined work.<p>
+
+<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_blank">http://webkit.org/coding/bsd-license.html</a>. </p>
+
+<h4>libsoup</h4>
+
+<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
 <h4>Mozilla Binding</h4>
 
 <p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about_files/webkit-bsd.txt b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about_files/webkit-bsd.txt
new file mode 100644
index 0000000..b3b07c6
--- /dev/null
+++ b/eclipse/features/org.eclipse.platform/about_files/linux.gtk.x86_64/about_files/webkit-bsd.txt
@@ -0,0 +1,20 @@
+BSD License
+
+Copyright (C) 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/eclipse/features/org.eclipse.platform/feature.properties b/eclipse/features/org.eclipse.platform/feature.properties
index 2710a62..beb18c9 100644
--- a/eclipse/features/org.eclipse.platform/feature.properties
+++ b/eclipse/features/org.eclipse.platform/feature.properties
@@ -49,8 +49,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -58,42 +58,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -102,47 +98,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.platform/feature.xml b/eclipse/features/org.eclipse.platform/feature.xml
index 49fd699..60babec 100644
--- a/eclipse/features/org.eclipse.platform/feature.xml
+++ b/eclipse/features/org.eclipse.platform/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.platform"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName"
       image="eclipse_update_120.jpg">
 
@@ -36,7 +36,7 @@
    <includes
          id="org.eclipse.help"
          version="0.0.0"/>
-      
+
    <plugin
          id="org.apache.ant"
          download-size="0"
@@ -117,9 +117,9 @@
          fragment="true"
          unpack="false"/>
 
-<plugin
-         id="org.eclipse.core.net.win32.x86_64"
-         os="win32"
+   <plugin
+         id="org.eclipse.core.net.linux.x86_64"
+         os="linux"
          arch="x86_64"
          download-size="0"
          install-size="0"
@@ -128,9 +128,9 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.core.net.linux.x86"
-         os="linux"
-         arch="x86"
+         id="org.eclipse.core.net.win32.x86_64"
+         os="win32"
+         arch="x86_64"
          download-size="0"
          install-size="0"
          version="0.0.0"
@@ -138,18 +138,20 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.core.resources"
+         id="org.eclipse.core.net.linux.x86"
+         os="linux"
+         arch="x86"
          download-size="0"
          install-size="0"
          version="0.0.0"
+         fragment="true"
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.core.resources.compatibility"
+         id="org.eclipse.core.resources"
          download-size="0"
          install-size="0"
          version="0.0.0"
-         fragment="true"
          unpack="false"/>
 
    <plugin
@@ -188,6 +190,13 @@
          unpack="false"/>
 
    <plugin
+         id="org.eclipse.equinox.event"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
          id="org.eclipse.help.appserver"
          download-size="0"
          install-size="0"
@@ -411,7 +420,7 @@
          version="0.0.0"
          fragment="true"/>
 
-  <plugin
+   <plugin
          id="org.eclipse.core.filesystem.aix.ppc"
          os="aix"
          arch="ppc"
@@ -429,16 +438,6 @@
          install-size="0"
          version="0.0.0"
          fragment="true"
-         unpack="false"/>       
-    
-   <plugin
-         id="org.eclipse.core.filesystem.hpux.PA_RISC"
-         os="hpux"
-         arch="PA_RISC"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
          unpack="false"/>
 
    <plugin
@@ -489,17 +488,6 @@
          version="0.0.0"
          fragment="true"
          unpack="false"/>
-   
-   <plugin
-         id="org.eclipse.core.filesystem.qnx.x86"
-         os="qnx"
-         ws="photon"
-         arch="x86"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
 
    <plugin
          id="org.eclipse.core.filesystem.win32.x86"
@@ -521,8 +509,7 @@
          fragment="true"
          unpack="false"/>
 
-
-  <plugin
+   <plugin
          id="org.eclipse.core.filesystem.win32.x86_64"
          os="win32"
          arch="x86_64"
@@ -530,7 +517,7 @@
          install-size="0"
          version="0.0.0"
          fragment="true"
-         unpack="false"/>  
+         unpack="false"/>
 
    <plugin
          id="org.eclipse.core.variables"
@@ -605,6 +592,7 @@
          version="0.0.0"
          fragment="true"
          unpack="false"/>
+
    <plugin
          id="org.eclipse.equinox.security.macosx"
          os="macosx"
@@ -626,11 +614,10 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.equinox.concurrent"
+         id="org.eclipse.core.externaltools"
          download-size="0"
          install-size="0"
          version="0.0.0"
-         fragment="true"
          unpack="false"/>
 
 </feature>
diff --git a/eclipse/features/org.eclipse.platform/license.html b/eclipse/features/org.eclipse.platform/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.platform/license.html
+++ b/eclipse/features/org.eclipse.platform/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.platform/rootfiles/.eclipseproduct b/eclipse/features/org.eclipse.platform/rootfiles/.eclipseproduct
index b2cffd0..3ec2cc4 100644
--- a/eclipse/features/org.eclipse.platform/rootfiles/.eclipseproduct
+++ b/eclipse/features/org.eclipse.platform/rootfiles/.eclipseproduct
@@ -1,3 +1,3 @@
 name=Eclipse Platform
 id=org.eclipse.platform
-version=3.5.0
\ No newline at end of file
+version=3.6.1
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.platform/rootfiles/notice.html b/eclipse/features/org.eclipse.platform/rootfiles/notice.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.platform/rootfiles/notice.html
+++ b/eclipse/features/org.eclipse.platform/rootfiles/notice.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.platform/rootfiles/readme/readme_eclipse.html b/eclipse/features/org.eclipse.platform/rootfiles/readme/readme_eclipse.html
index 74def42..80476fc 100644
--- a/eclipse/features/org.eclipse.platform/rootfiles/readme/readme_eclipse.html
+++ b/eclipse/features/org.eclipse.platform/rootfiles/readme/readme_eclipse.html
@@ -1,27 +1,26 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Eclipse Project Release Notes 3.5.2</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+<title>Eclipse Project Release Notes 3.6.2</title>
 </head>
 <body>
 
 <h1>Eclipse Project Release Notes</h1>
-<p>Release 3.5.2<br>
-  Last revised February 10, 2010</p>
-<p align="left"><strong>This software is OSI Certified Open Source Software.<br>
+<p>Release 3.6.2<br/>
+  Last revised February 10, 2011</p>
+<p align="left"><strong>This software is OSI Certified Open Source Software.<br/>
 OSI Certified is a certification mark of the Open Source Initiative. </strong></p>
 <blockquote>
   <p align="left"><a href="#TargetOperatingEnvironments">1. Target Operating
-  Environments</a><br>
+  Environments</a><br/>
   <a href="#Compatibility">2. Compatibility with Previous
-  Releases</a><br>
-  <a href="#Known Issues">3. Known Issues</a><br>
-  <a href="#Running Eclipse">4. Running Eclipse</a><br>
-  <a href="#Upgrading">5. Upgrading a Workspace from a Previous Release</a><br>
-  <a href="#Interoperability with Previous Releases">6. Interoperability with
-  Previous Releases</a><br>
-  <a href="#DefectsFixed">7. Defects Fixed since Previous Release</a><br>  
+  Releases</a><br/>
+  <a href="#KnownIssues">3. Known Issues</a><br/>
+  <a href="#RunningEclipse">4. Running Eclipse</a><br/>
+  <a href="#Upgrading">5. Upgrading a Workspace from a Previous Release</a><br/>
+  <a href="#InteroperabilityWithPreviousReleases">6. Interoperability with
+  Previous Releases</a><br/>
   </p>
 </blockquote>
 
@@ -32,12 +31,10 @@ OSI Certified is a certification mark of the Open Source Initiative. </stro
   on the underlying operating system. The chief dependence is therefore on the
   Java Platform itself. Portions are targeted to specific classes of operating
   environments, requiring their source code to only reference facilities available
-  in particular class libraries (e.g. J2ME Foundation 1.0, J2SE 1.3 and 1.4,
-  etc.).</p>
-
-<p>In general, the 3.5 release of the Eclipse Project is developed on a mix
+  in particular class libraries (e.g. J2ME Foundation 1.1, J2SE 1.4, Java 5, etc).</p>
+<p>In general, the 3.6 release of the Eclipse Project is developed on a mix
   of Java 1.4, Java 5 and Java 6 VMs. As such, the Eclipse SDK as a whole
-  is targeted at all modern, desktop Java VMs. Full functionality is available for
+  is targeted at all modern, desktop Java VMs. Most functionality is available for
   1.4 level development everywhere, and extended development capabilities are made
   available on the VMs that support them.</p>
 <p><a href="#Appendix1">Appendix 1</a> contains a table that indicates the class
@@ -50,146 +47,191 @@ OSI Certified is a certification mark of the Open Source Initiative. </stro
   them we cannot vouch for them. Problems encountered when running Eclipse on a
   non-reference platform that cannot be recreated on any reference platform will
   be given lower priority than problems with running Eclipse on a reference platform.</p>
-<p>Eclipse 3.5 is tested and validated on the following reference platforms</p>
-  
-
-  <table border="1" cellpadding="2" cellspacing="2" width="80%" summary="Eclipse Reference Platforms">
-    <tbody>
-      <tr align="center">
-        <td><b>Reference Platforms</b></td>
-      </tr>
-      <tr>
-        <td><b>Microsoft Windows Vista, x86-32, Win32</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Microsoft Windows</li>
-            <li>IBM 32-bit SDK for Windows, Java 2 Technology Edition 5.0, SR6b</li>
-            <li>BEA JRockit 27.4.0, for Microsoft Windows</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Microsoft Windows XP, x86-32, Win32</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 6 Update 3 for Microsoft Windows</li>
-            <li>Sun Java Standard Edition 5 Update 14 for Microsoft Windows</li>
-            <li>IBM 32-bit SDK for Windows, Java 2 Technology Edition 5.0, SR6b</li>
-            <li>BEA JRockit 27.4.0, for Microsoft Windows</li>
-            <li>Sun Java Standard Edition 1.4.2_16 for Microsoft Windows</li>
-            <li>IBM 32-bit SDK for Windows, Java 2 Technology Edition 1.4.2 SR10</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Red Hat Enterprise Linux 5.0, x86-32, GTK</b> running (any of):
-          <ul>
-            <li> Sun Java Standard Edition 6 Update 3 for Linux x86</li>
-            <li>Sun Java Standard Edition 5 Update 14 for Linux x86</li>
-            <li>IBM 32-bit SDK for Linux on Intel architecture, Java 2 Technology Edition 5.0, SR6b</li>
-            <li>BEA JRockit 27.4.0, for Linux x86</li>
-            <li>Sun Java Standard Edition 1.4.2_16 for Linux x86</li>
-            <li>IBM 32-bit SDK for Linux on Intel architecture, Java 2 Technology Edition 1.4.2 SR10</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>SUSE Linux Enterprise Server 10, x86-32, GTK</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Linux x86</li>
-            <li>IBM 32-bit SDK for Linux on Intel architecture, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>SUSE Linux Enterprise Server 10, x86-64, GTK</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Linux x86-64</li>
-            <li>IBM 64-bit SDK for Linux on Intel architecture, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Microsoft Windows Vista, x86-64, Win32</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Microsoft Windows (AMD64/EM64T)</li>
-            <li>IBM 64-bit SDK for Windows, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Microsoft Windows XP Professional x64 Edition, x86-64, Win32</b> running (any of):
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Microsoft Windows (AMD64/EM64T)</li>
-            <li>IBM 64-bit SDK for Windows, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Red Hat Enterprise Linux 4.0 update 2, x86-64, GTK</b> running:
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Linux x86-64</li>
-            <li>IBM 64-bit SDK for Linux on Intel architecture, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Sun Solaris 10, SPARC, GTK</b> running:
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Solaris SPARC</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Sun Solaris 10, x86, GTK</b> running:
-          <ul>
-            <li>Sun Java Standard Edition 5 Update 14 for Solaris</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>HP-UX 11i v2, ia64, Motif 2.1, GTK</b> running:
-          <ul>
-            <li>HP-UX Java Standard Edition 5 Update 7 for Itanium</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>IBM AIX 5.3, Power, Motif 2.1</b> running:
-          <ul>
-            <li>IBM 32-bit SDK, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Red Hat Enterprise Linux 5.0, Power, GTK</b> running:
-          <ul>
-            <li>IBM 32-bit SDK for Linux on pSeries architecture, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>SUSE Linux Enterprise Server 10, Power, GTK</b> running:
-          <ul>
-            <li>IBM 32-bit SDK for Linux on pSeries architecture, Java 2 Technology Edition 5.0, SR6b</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Apple Mac OS X 10.5, Universal, Carbon</b> running:
-          <ul>
-            <li>Apple Java for Mac OS X 10.5, Update 1</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Apple Mac OS X 10.5, Universal 32-bit, Cocoa</b> running:
-          <ul>
-            <li>Apple Java for Mac OS X 10.5, Update 1</li>
-          </ul></td>
-      </tr>
-      <tr>
-        <td><b>Apple Mac OS X 10.5, Universal 64-bit, Cocoa</b> running:
-          <ul>
-            <li>Apple Java for Mac OS X 10.5, Update 1</li>
-          </ul></td>
-      </tr>
-	</tbody>    
-  </table>
-
+<p>Eclipse 3.6 is tested and validated on the following reference platforms:</p>
+<style type="text/css">
+	table.platforms {
+		border-width: 1px;
+		border-spacing: 0px;
+		border-style: solid;
+		border-collapse: separate;
+	}
+	table.platforms th {
+		border-width: 1px;
+		padding: 3px;
+		border-style: inset;
+		border-color: black;
+		background-color: #B9A9FF;
+	}
+	table.platforms td {
+		border-width: 1px 1px 1px 1px;
+		padding: 3px 3px 3px 3px;
+		border-style: inset inset inset inset;
+		border-color: gray gray gray gray;
+	}
+	table.platforms tr.c0 td {
+		background-color: #FDFDFD;
+	}
+	table.platforms tr.c1 td {
+		background-color: #F4EEFF;
+	}
+</style>
+<center>
+	<table class="platforms">
+		<tr>
+			<th>Operating System</th>
+			<th>Version</th>
+			<th>Hardware</th>
+			<th>JRE</th>
+			<th>Windowing System</th>
+		</tr>
+		<!-- ************ WINDOWS ************** -->
+		<tr class="c0">
+			<td rowspan="6">Windows</td>
+			<td rowspan="2">7</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td rowspan="2">Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+			<td rowspan="6">Win32</td>
+		</tr>
+		<tr>
+			<td rowspan="1">x86 64-bit</td>
+		</tr>
+		<tr>
+			<td rowspan="2">Vista</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td>Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11<br/>
+				Oracle JRockit 27.6.5
+			</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="1">x86 64-bit</td>
+			<td>Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="2">XP</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td>Sun Java 6 Update 17<br/>
+				Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11<br/>
+				Oracle JRockit 27.6.5
+			</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="1">x86 64-bit</td>
+			<td>Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+		</tr>
+		<!-- ************ RHEL ************** -->
+		<tr class="c1">
+			<td rowspan="3">Red Hat Enterprise Linux</td>
+			<td rowspan="2">5.0</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td>Sun Java 6 Update 17<br/>
+				Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11<br/>
+				Oracle JRockit 27.6.5
+			</td>
+			<td rowspan="3">GTK</td>
+		</tr>
+		<tr class="c1">
+			<td rowspan="1">Power 64-bit</td>
+			<td>IBM Java 5 SR11</td>
+		</tr>
+		<tr class="c1">
+			<td rowspan="1">4.0</td>
+			<td rowspan="1">x86 64-bit</td>
+			<td>Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+		</tr>
+		<!-- ************ SLES ************** -->
+		<tr class="c0">
+			<td rowspan="3">SUSE Linux Enterprise Server</td>
+			<td rowspan="3">11</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td rowspan="2">Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+			<td rowspan="3">GTK</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="1">x86 64-bit</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="1">Power 64-bit</td>
+			<td>IBM Java 5 SR11</td>
+		</tr>
+		<!-- ************ Ubuntu ************** -->
+		<tr class="c1">
+			<td rowspan="2">Ubuntu Long Term Support</td>
+			<td rowspan="2">10.04</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td rowspan="2">Sun Java 5 Update 22<br/>
+				IBM Java 5 SR11
+			</td>
+			<td rowspan="2">GTK</td>
+		</tr>
+		<tr class="c1">
+			<td rowspan="1">x86 64-bit</td>
+		</tr>
+		<!-- ************ Solaris ************** -->
+		<tr class="c0">
+			<td rowspan="2">Sun Solaris</td>
+			<td rowspan="2">10</td>
+			<td rowspan="1">x86 32-bit</td>
+			<td rowspan="2">Sun Java 5 Update 22</td>
+			<td rowspan="2">GTK</td>
+		</tr>
+		<tr class="c0">
+			<td rowspan="1">SPARC 32-bit</td>
+		</tr>
+		<!-- ************ HPUX ************** -->
+		<tr class="c1">
+			<td rowspan="1">HP-UX</td>
+			<td rowspan="1">11i v2</td>
+			<td rowspan="1">ia64 32-bit</td>
+			<td rowspan="1">HP-UX Java 5 Update 18</td>
+			<td rowspan="1">Motif 2.1</td>
+		</tr>
+		<!-- ************ AIX ************** -->
+		<tr class="c0">
+			<td rowspan="1">IBM AIX</td>
+			<td rowspan="1">5.3</td>
+			<td rowspan="1">Power 32-bit</td>
+			<td rowspan="1">IBM Java 5 SR11</td>
+			<td rowspan="1">Motif 2.1</td>
+		</tr>
+		<!-- ************ Mac ************** -->
+		<tr class="c1">
+			<td rowspan="3">Apple Mac OS X</td>
+			<td rowspan="3">10.5</td>
+			<td rowspan="1">Universal</td>
+			<td rowspan="3">Apple Java 10.5 Update 2</td>
+			<td rowspan="1">Carbon</td>
+		</tr>
+		<tr class="c1">
+			<td rowspan="1">Universal 32-bit</td>
+			<td rowspan="2">Cocoa</td>
+		</tr>
+		<tr class="c1">
+			<td rowspan="1">Universal 64-bit</td>
+		</tr>
+	</table>
+ </center>
 
 <p>As stated above, <i>we expect that Eclipse works fine on other current
   Java VM and OS versions but we cannot flag these as reference platforms without
   significant community support for testing them.</i></p>
-<h4>Internationalization</h4>
+
 <p>The Eclipse SDK is designed as the basis for internationalized products. The
   user interface elements provided by the Eclipse SDK components, including dialogs
   and error messages, are externalized. The English strings are provided as the
   default resource bundles.</p>
-
 <p>Latin-1 and DBCS locales are supported by the Eclipse SDK on all reference platforms;
   BIDI locales are supported by the Eclipse SDK everywhere but on Motif.</p>
 <p>The Eclipse SDK supports GB 18030 (level 1), the Chinese code page standard,
@@ -197,58 +239,57 @@ OSI Certified is a certification mark of the Open Source Initiative. </stro
 <p>German and Japanese locales are tested.</p>
 
 <h2>2. <a name="Compatibility"></a>Compatibility with Previous Releases</h2>
-<h3>Compatibility of Release 3.5 with 3.4</h3>
-<p>Eclipse 3.5 is compatible with Eclipse 3.4 (and all earlier 3.x versions).</p>
+<h3>Compatibility of Release 3.6 with 3.5</h3>
+<p>Eclipse 3.6 is compatible with Eclipse 3.5 (and all earlier 3.x versions).</p>
 
-<p><strong>API Contract Compatibility:</strong> Eclipse SDK 3.5 is upwards
-  contract-compatible with Eclipse SDK 3.4 except in those areas noted in the
-  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_5_porting_guide.html" target="_top">
-    <em>Eclipse 3.5 Plug-in Migration Guide</em>
+<p><strong>API Contract Compatibility:</strong> Eclipse SDK 3.6 is upwards
+  contract-compatible with Eclipse SDK 3.5 except in those areas noted in the
+  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html" target="_top">
+    <em>Eclipse 3.6 Plug-in Migration Guide</em>
   </a>. Programs that use affected APIs and extension points will need to be ported
-  to Eclipse SDK 3.5 APIs. Downward contract compatibility
-  is not supported. There is no guarantee that compliance with Eclipse SDK 3.5
-  APIs would ensure compliance with Eclipse SDK 3.4 APIs. Refer to
+  to Eclipse SDK 3.6 APIs. Downward contract compatibility
+  is not supported. There is no guarantee that compliance with Eclipse SDK 3.6
+  APIs would ensure compliance with Eclipse SDK 3.5 APIs. Refer to
   <a href="http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs">
     <em>Evolving Java-based APIs</em>
   </a> for a discussion of the kinds of API changes that maintain contract compatibility.</p>
   
-<p><strong>Binary (plug-in) Compatibility:</strong> Eclipse SDK 3.5 is upwards
-  binary-compatible with Eclipse SDK 3.4 except in those areas noted in the
-  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_5_porting_guide.html" target="_top">
-    <em>Eclipse 3.5 Plug-in Migration Guide</em>
-  </a>. Downward plug-in compatibility is not supported. Plug-ins developed for Eclipse SDK
-  3.5 will not be usable in Eclipse SDK 3.4. Refer to
+<p><strong>Binary (plug-in) Compatibility:</strong> Eclipse SDK 3.6 is upwards
+  binary-compatible with Eclipse SDK 3.5 except in those areas noted in the
+  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html" target="_top">
+    <em>Eclipse 3.6 Plug-in Migration Guide</em>
+  </a>. Downward plug-in compatibility is not supported. Plug-ins for Eclipse SDK
+  3.6 will not be usable in Eclipse SDK 3.5. Refer to
   <a href="http://wiki.eclipse.org/index.php/Evolving_Java-based_APIs">
     <em>Evolving Java-based APIs</em>
   </a> for a discussion of the kinds of API changes that maintain binary compatibility.</p>
   
-<p><strong>Source Compatibility:</strong> Eclipse SDK 3.5 is upwards source-compatible
-  with Eclipse SDK 3.4 except in the areas noted in the
-  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_5_porting_guide.html" target="_top">
-
-    <em>Eclipse 3.5 Plug-in Migration Guide</em>
+<p><strong>Source Compatibility:</strong> Eclipse SDK 3.6 is upwards source-compatible
+  with Eclipse SDK 3.5 except in the areas noted in the
+  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html" target="_top">
+    <em>Eclipse 3.6 Plug-in Migration Guide</em>
   </a>. This means that source files written
-  to use Eclipse SDK 3.4 APIs might successfully compile and run against Eclipse
-  SDK 3.5 APIs, although this is not guaranteed. Downward source compatibility
+  to use Eclipse SDK 3.5 APIs might successfully compile and run against Eclipse
+  SDK 3.6 APIs, although this is not guaranteed. Downward source compatibility
   is not supported. If source files use new Eclipse SDK APIs, they will not be
   usable with an earlier version of the Eclipse SDK. </p>
   
-<p><strong>Workspace Compatibility:</strong> Eclipse SDK 3.5 is upwards
+<p><strong>Workspace Compatibility:</strong> Eclipse SDK 3.6 is upwards
   workspace-compatible with earlier 3.x versions of the Eclipse SDK unless noted.
-  This means that workspaces and projects created with Eclipse SDK 3.0 to 3.4 can be successfully
-  opened by Eclipse SDK 3.5 and upgraded to a 3.5 workspace. This includes both
+  This means that workspaces and projects created with Eclipse SDK 3.5 .. 3.0 can be successfully
+  opened by Eclipse SDK 3.6 and upgraded to a 3.6 workspace. This includes both
   hidden metadata, which is localized to a particular workspace, as well as metadata
   files found within a workspace project (e.g., the .project file), which may
   propagate between workspaces via file copying or team repositories. Individual
-  plug-ins developed for Eclipse SDK 3.5 should provide similar upwards compatibility
+  plug-ins developed for Eclipse SDK 3.6 should provide similar upwards compatibility
   for their hidden and visible workspace metadata created by earlier versions;
-  3.5 plug-in developers are responsible for ensuring that their plug-ins recognize
+  3.6 plug-in developers are responsible for ensuring that their plug-ins recognize
   metadata from earlier versions and process it appropriately. User
   interface session state may be discarded when a workspace is upgraded. Downward
   workspace compatibility is not supported. A workspace created (or opened) by
-  a product based on Eclipse 3.5 will be unusable with a product based on an earlier
+  a product based on Eclipse 3.6 will be unusable with a product based on an earlier
   version of Eclipse. Visible metadata files created (or overwritten) by Eclipse
-  3.5 will generally be unusable with earlier versions of Eclipse. </p>
+  3.6 will generally be unusable with earlier versions of Eclipse. </p>
   
 <p><strong>Non-compliant usage of API's</strong>: All non-API methods and classes,
   and certainly everything in a package with "internal" in its name,
@@ -258,33 +299,33 @@ OSI Certified is a certification mark of the Open Source Initiative. </stro
   unsupportable and receive no guarantees about compatibility within a single
   release much less with earlier releases. Refer to
   <a href="http://www.eclipse.org/articles/Article-API%20use/eclipse-api-usage-rules.html">
-    <em>How to Use the Eclipse API</em></a> 
-    for information about how to write compliant plug-ins. </p>
+    <em>How to Use the Eclipse API</em>
+  </a> for information about how to write compliant plug-ins. </p>
 
-<h2>3. <a name="Known Issues"></a> Known Issues</h2>
+<h2>3. <a name="KnownIssues"></a> Known Issues</h2>
 <blockquote>
   <a href="#I-General">
-  3.1 General problems</a><br>
-       <a href="#I-General-Startup">3.1.1 Startup</a><br>
-       <a href="#I-General-GCJ">3.1.2 GCJ</a><br>
-       <a href="#I-General-64bitJava">3.1.3 64-bit Java HotSpot(TM) VM</a><br>
-  <a href="#I-Platform">3.2 Platform</a><br>
-       <a href="#I-Platform-Core">3.2.1 Core</a><br>
-
-       <a href="#I-Platform-Ant">3.2.2 Ant</a><br>
-       <a href="#I-Platform-User-Assistance">3.2.3 User Assistance</a><br>
-       <a href="#I-Platform-UI">3.2.4 UI</a><br>
-       <a href="#I-Platform-Text">3.2.5 Text</a><br>
-       <a href="#I-Platform-SWT">3.2.6 SWT</a><br>
-
-       <a href="#I-Platform-Team-CVS">3.2.7 Team and CVS</a><br>
-       <a href="#I-Platform-Install-Update">3.2.8  Install/Update</a><br>
-       <a href="#I-Platform-Debug">3.2.9 Debug</a><br>
-       <a href="#I-Platform-Compare">3.2.10 Compare</a><br>
+  3.1 General problems</a><br/>
+       <a href="#I-General-Startup">3.1.1 Startup</a><br/>
+       <a href="#I-General-GCJ">3.1.2 GCJ</a><br/>
+       <a href="#I-General-64bitJava">3.1.3 64-bit Java HotSpot(TM) VM</a><br/>
+  <a href="#I-Platform">3.2 Platform</a><br/>
+       <a href="#I-Platform-Core">3.2.1 Core</a><br/>
+
+       <a href="#I-Platform-Ant">3.2.2 Ant</a><br/>
+       <a href="#I-Platform-User-Assistance">3.2.3 User Assistance</a><br/>
+       <a href="#I-Platform-UI">3.2.4 UI</a><br/>
+       <a href="#I-Platform-Text">3.2.5 Text</a><br/>
+       <a href="#I-Platform-SWT">3.2.6 SWT</a><br/>
+
+       <a href="#I-Platform-Team-CVS">3.2.7 Team and CVS</a><br/>
+       <a href="#I-Platform-Install-Update">3.2.8  Install/Update</a><br/>
+       <a href="#I-Platform-Debug">3.2.9 Debug</a><br/>
+       <a href="#I-Platform-Compare">3.2.10 Compare</a><br/>
   <a href="#I-JDT">
-  3.3 Java development tools (JDT)</a><br>
+  3.3 Java development tools (JDT)</a><br/>
   <a href="#I-PDE">
-  3.4 Plug-in Development Environment (PDE)</a><br>
+  3.4 Plug-in Development Environment (PDE)</a><br/>
 
 </blockquote>
 <p>Note: Bug numbers refer to the Eclipse project bug database at <a href="http://dev.eclipse.org/bugs/">http://bugs.eclipse.org/bugs/</a></p>
@@ -294,15 +335,15 @@ OSI Certified is a certification mark of the Open Source Initiative. </stro
 <h4>Installation/Configuration issues that can cause Eclipse to fail start</h4>
 <p>Here are some common problems that can cause Eclipse not to start:</p>
 <ul>
-  <li>As shown <a href="#TargetOperatingEnvironments">above</a>, Eclipse 3.5 requires 
+  <li>As shown <a href="#TargetOperatingEnvironments">above</a>, Eclipse 3.6 requires 
     at least a 1.4.2 VM. Perhaps an older version of the VM is being found in 
     your path. To explicitly specify which VM to run with, use the Eclipse <tt>-vm</tt> 
-    command-line argument. (See also the <a href="#Running Eclipse">Running Eclipse</a> 
+    command-line argument. (See also the <a href="#RunningEclipse">Running Eclipse</a> 
     section below.)</li>
   <li>
     Running Eclipse on Gentoo Linux may result in the following error message:
     <div style="margin-left: 40px;">
-<tt>* run-java-tool is not available for sun-jdk-1.6 on i686<br>* IMPORTANT: some Java tools are not available on some VMs on some architectures</tt>
+<tt>* run-java-tool is not available for sun-jdk-1.6 on i686<br/>* IMPORTANT: some Java tools are not available on some VMs on some architectures</tt>
     </div>
 
 If this occurs, start Eclipse by specifying a -vm argument, either
@@ -337,7 +378,7 @@ and <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=17281">17281</a>)</p>
 <p>
 The Sun VM may hang indefinitely during class loading if it runs out of permanent
 generation memory.  This will cause CPU usage to stay at 100% until the process
-is ended.  See the section <a href="#Running Eclipse">Running Eclipse</a> for details
+is ended.  See the section <a href="#RunningEclipse">Running Eclipse</a> for details
 on addressing this VM problem.
 </p>
 
@@ -365,7 +406,7 @@ run Eclipse by going to <b>Help > About Eclipse SDK > Installation Details
 <b>About</b> dialog itself can also provide other information, the build identifier
 can be of particular interest as it is tagged by some distributions. This allows the
 user to identify whether Eclipse was downloaded through the distribution's
-package management system or directly from the eclipse.org website.</p>
+package management system or directly from the eclipse.org web site.</p>
 
 Eg: <code>Build id: M20070212-1330 (Ubuntu version: 3.2.2-0ubuntu3)</code>
 
@@ -379,10 +420,10 @@ Eg: <code>Build id: M20070212-1330 (Ubuntu version: 3.2.2-0ubuntu3)</code>
 
 It is imperative that 64-bit builds are downloaded and used if a 64-bit Java
 runtime environment has been installed. Below are two sample tarball names of
-version 3.5.0 of the Eclipse SDK packaged for 32-bit and 64-bit processors.
+version 3.6.0 of the Eclipse SDK packaged for 32-bit and 64-bit processors.
 
-<pre>eclipse-SDK-3.5-linux-gtk.tar.gz (32-bit)
-eclipse-SDK-3.5-linux-gtk-x86_64.tar.gz (64-bit)</pre>
+<pre>eclipse-SDK-3.6-linux-gtk.tar.gz (32-bit)
+eclipse-SDK-3.6-linux-gtk-x86_64.tar.gz (64-bit)</pre>
 
 <p>To run Eclipse with an alternate Java runtime environment, the path to the Java
 virtual machine's binary must be identified. With an Eclipse installation from
@@ -392,8 +433,8 @@ Linux distributions package often performs a scan internally to pick up GCJ by
 itself whilst ignoring what's on the $PATH. An example of the terminal's output
 is shown below:</p>
 
-<code>searching for compatible vm...<br>
-  testing /usr/lib/jvm/java-7-icedtea...not found<br>
+<code>searching for compatible vm...<br/>
+  testing /usr/lib/jvm/java-7-icedtea...not found<br/>
   testing /usr/lib/jvm/java-gcj...found</code>
 
 <p>Once the path to the virtual machine's binary has been identified, try running
@@ -403,7 +444,7 @@ Eclipse with the following command:</p>
 
 <p>For an actual example, it might look something like the following:</p>
 
-<code>./eclipse -vm /usr/lib/jvm/sun-java-6/bin/java<br>
+<code>./eclipse -vm /usr/lib/jvm/sun-java-6/bin/java<br/>
 ./eclipse -vm /opt/sun-jdk-1.6.0.02/bin/java</code>
 
 <p>If this seems to solve the problem, it is likely that the problem really was
@@ -412,14 +453,14 @@ eclipse.ini file located within Eclipse's folder can be altered to
 automatically pass this argument to Eclipse at startup. An example of its
 content is presented below:</p>
 
-<code>-showsplash<br>
-org.eclipse.platform<br>
---launcher.XXMaxPermSize<br>
-256m<br>
--vm<br>
-/opt/sun-jdk-1.6.0.02/bin/java<br>
--vmargs<br>
--Xms40m<br>
+<code>-showsplash<br/>
+org.eclipse.platform<br/>
+--launcher.XXMaxPermSize<br/>
+256m<br/>
+-vm<br/>
+/opt/sun-jdk-1.6.0.02/bin/java<br/>
+-vmargs<br/>
+-Xms40m<br/>
 -Xmx512m</code>
 
 <p>Note that every argument must be on its own line. More information about the
@@ -455,18 +496,18 @@ This VM argument can be placed in the eclipse.ini file after the -vmargs line li
 </p>
 
 <code>
--startup<br>
-plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900<br>
---launcher.library<br>
-plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar<br>
--showsplash<br>
-org.eclipse.platform<br>
---launcher.XXMaxPermSize<br>
-256m<br>
--vmargs<br>
--XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith<br>
--Xms40m<br>
--Xmx256m<br>
+-startup<br/>
+plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900<br/>
+--launcher.library<br/>
+plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar<br/>
+-showsplash<br/>
+org.eclipse.platform<br/>
+--launcher.XXMaxPermSize<br/>
+256m<br/>
+-vmargs<br/>
+-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith<br/>
+-Xms40m<br/>
+-Xmx256m<br/>
 </code>
 
 <p>
@@ -740,7 +781,10 @@ menu.</p>
 <h4>Default text file encoding
 may be detected incorrectly (Windows XP/2000 only)</h4>
 
-<p><strong>Note</strong>: the bug report associated with this problem has been fixed. If you run Eclipse with JDK 1.5 or greater you should not have to use the workaround stated below any longer. However, the problem still exists when running Eclipse with JDK 1.4.x or lower, so in this case  the workaround is still required . </p>
+<p><strong>Note</strong>: the bug report associated with this problem has been fixed. 
+If you run Eclipse with JDK 1.5 or greater you should not have to use the workaround 
+stated below any longer. However, the problem still exists when running Eclipse with 
+JDK 1.4.x or lower, so in this case  the workaround is still required . </p>
 <p>The "Text file encoding" value displayed in the Preferences
   dialog under "Editors" may be wrong on platforms running Windows XP
 (or 2000) when the user locale and system locale differ. </p>
@@ -910,38 +954,51 @@ for more information.</p>
 <p>When running on the IBM Java 5.0 VM, Eclipse crashes while the user is typing in an editor.
 If using this VM you must disable the JIT with the -Xnojit vm argument to avoid the crashes
 (see bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=116730">116730</a>).
-The command line for launching Eclipse with this vm should be: <br>
+The command line for launching Eclipse with this vm should be: <br/>
 <code>eclipse -vmargs -Dosgi.locking=none -Xnojit</code>
 </p>
 
 <h4>Eclipse won't start (Linux GTK PPC only)</h4>
 <p>Eclipse fails to create a lock file with reason "No locks available". 
 To launch eclipse you must disable file locking using the osgi.locking property.
-For example, you could launch eclipse as follows: <br>
+For example, you could launch eclipse as follows: <br/>
 <code>eclipse -vmargs -Dosgi.locking=none</code>
 </p>
 
-<h4>SWT for carbon cannot be used with OS X JRE version 1.6 (Mac OSX only)</h4>
-<p>OS X JRE version 1.6 assumes that pointers have a size of 64 bits, but SWT's Carbon
-port only uses 32-bit pointers, so SWT and Eclipse cannot be used with OS X JRE version
-1.6.  The workaround is to use the cocoa version of SWT or an earlier supported version
-of the OS X JRE.
+<h4>SWT for Carbon cannot be used with Mac OS X JRE version 1.6 (Mac OS X 10.5 only)</h4>
+<p>On Leopard (Mac OS X 10.5), JDK version 1.6 assumes that pointers have a size of 64 bits, but SWT's Carbon
+port only uses 32-bit pointers, so SWT and Eclipse cannot be used on Leopard with JDK version
+1.6.  The workaround is to use the Cocoa version of SWT or an earlier supported version
+of the Mac OS X JDK.
+</p>
+<p>Snow Leopard (Mac OS X 10.6) has both a 32-bit and 64-bit version of JDK 1.6, so this restriction does not apply on that version of the operating system.
 </p>
 
 <h4>Strings may be truncated or incorrectly wrapped on RHEL5 (Linux GTK only)</h4>
 <p>
 Strings on wrapping Controls may not appear correctly in some locales on RHEL5 as a result
 of a bug in Pango version 1.14.x.  This problem can be fixed by upgrading the installed
-Pango library to a version that is newer than 1.14.x.  (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231951">231951</a>)
+Pango library to a version that is newer than 1.14.x. (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231951">231951</a>)
 </p>
 
 <h4>Block Selection functionality provided by StyledText is not BIDI aware</h4>
 <p>
 When the orientation of characters under the left and right edges of the block
 selection rectangle are not the same, the actual selection ranges (in memory)
-differ from the visual representation of the selection.(bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277929">277929</a>)
+differ from the visual representation of the selection. (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277929">277929</a>)
 </p>
 
+<h4>Older versions of some Windows screen readers no longer work with Eclipse</h4>
+<p>JAWS versions 8 and 9 and Window-Eyes version 6 no longer work well with Eclipse and other SWT applications.
+Window-Eyes 6 will cause Eclipse to crash, and JAWS 8 and 9 can cause SWT applications to crash.
+This happens because IAccessible2 support was added to SWT for Eclipse 3.6, but these older screen reader versions contain
+partial implementations of IAccessible2 that do not follow the current IAccessible2 specification.</p>
+<p>
+The workaround for these cases is to specify Java property <code>org.eclipse.swt.accessibility.UseIA2</code> with value <code>false</code>,
+which will instruct SWT to not attempt to use IA2 interfaces.  An easy way to set this property is to specify VM argument
+<code>-Dorg.eclipse.swt.accessibility.UseIA2=false</code> when launching Eclipse or your SWT application. (bug
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313182">313182</a>)</p>
+
 
 <h3>3.2.7 <a name="I-Platform-Team-CVS">Platform - Team - CVS</a></h3>
 <p>The following are known problems with the CVS repository provider only, and
@@ -1019,11 +1076,11 @@ means the server is using a self-signed certificate, or a certificate authentica
 an unknown third party.</p>
 
 <h4>Extension location is lost if the install path changes</h4>
-<P>A previously configured extension location may be temporarily removed if the install is moved or mounted 
+<p>A previously configured extension location may be temporarily removed if the install is moved or mounted 
 under a different path. This only happens when the link file that configures the 
 extension location uses a relative path that points to a directory under the Eclipse 
 install. On a second startup using the same install path, the extension location 
-is added again (bug <A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=95403">95403</A>). <BR></P>
+is added again (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=95403">95403</a>). <br/></p>
 
 <h4>Feature patches can only be installed from Eclipse 3.4-based update sites</h4>
 <p>Feature patches can only be installed from update sites designed for Eclipse 3.4 or greater.
@@ -1031,7 +1088,7 @@ Specifically, the update site must have the necessary metadata for Equinox p2 (a
 or content.jar file). This data can be generated by building an update site using Eclipse 3.4
 or newer, or running the p2 metadata generator on an update site built using earlier versions
 of the Eclipse SDK. See the help topic <i>Generating p2 metadata</i> for more details on running the p2 metadata
-generator (bug <A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244483">244483</A>).
+generator (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244483">244483</a>).
 </p>
 
 <h3>3.2.9 <a name="I-Platform-Debug">Platform - Debug</a></h3>
@@ -1045,7 +1102,7 @@ section.)</p>
 
 <h4>Multiple regions formatting in a given source snippet</h4>
 In version 3.4, the new API method <code>org.eclipse.jdt.core.formatter.CodeFormatter.format(int, String, IRegion[], int, String)</code>
-has been added to allow the formatting of several regions in a source snippet with a single pass.<br>
+has been added to allow the formatting of several regions in a source snippet with a single pass.<br/>
 Even if specified, this method does not currently accept comments of the following kinds:
 <ul>
 <li><code>org.eclipse.jdt.core.formatter.CodeFormatter#K_SINGLE_LINE_COMMENT</code></li>
@@ -1190,7 +1247,7 @@ A global Java debug preference specifies the debugger timeout, which is the
 maximum amount of time the debugger waits for a response from the target VM
 after making a request of that VM. Slow connections may require that this value
 be increased. The timeout value can be edited from the <b>Java > Debug </b>preference
-page. Changing the timeout value only effects subsequently launched VM, not VMs
+page. Changing the timeout value only affects subsequently launched VM, not VMs
 that are already running.
 
 <h4> Updating of inspected values</h4>
@@ -1232,19 +1289,26 @@ on the Installed JREs preference page. Error messages will appear in the log eac
 determine which execution environments a 1.6 VM is compatible with. JDT can be configured to ignore 1.6
 JREs by removing them from the Installed JREs preference page.
 (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262542">262542</a>)
-<h4>Java 6 Annotation Processing</h4>
-Java 6 annotation processors are supported in the batch compiler and in the IDE, with 
-some limitations. Java 6 processors are only executed during a build, not while editing (bug 
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188558">188558</a>). Some methods
-in the processing API are unimplemented when compiling within the IDE, and will throw
-UnsupportedOperationException.
-
-<h4>Refactoring fails with invalid package name error when jaxb-xjc.jar is on build path</h4>
-This JAR contains some entries that start with "1.0/". This leads to an invalid package name error once
-this JAR has been added to the indexes. The problem is reported in bug 
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293861">293861</a> and it is fixed for 3.6. A patch for the <code>org.eclipse.jdt.core</code>
-bundle will be available on the JDT/Core update page after 3.5.2 is released to fix this issue.
-Check this <a href="http://www.eclipse.org/jdt/core/r3.5/index.php#UPDATES">link</a> for updates on this issue.
+
+<h4>Java Annotation Processing</h4>
+<p>Some methods in the processing API are unimplemented when compiling within the IDE, and will
+throw <code>UnsupportedOperationException</code>.</p>
+<p>
+Java 6 annotation processors are supported in the batch compiler and in the
+IDE. By design, Java 6 processors are only executed during a build, not while
+editing. (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=188558">188558</a>)</p>
+<p>
+Java 5 annotation processors are supported in the IDE only. Java 5 processors
+can be executed while editing, as well as during a build. Slow annotation
+processors can cause a slowdown of the editing experience. If this occurs, you
+may wish to turn off <b>Enable processing in editor</b> on the <b>Java Compiler > Annotation Processing</b> properties
+page of your Java project.</p>
+
+<h4>Java indexing encounters problems when a folder is used both as a source and a class folder</h4>
+<p>Java indexing encounters problems when a folder is used both as a source folder
+in a project and as a class folder in another project. Hence, when this peculiar setup is
+used, the Java Search might miss matches located in such a folder. To avoid this kind of problem, it is strongly advised to use different
+folders for sources and binary classes. (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309903">309903</a>)</p>
 
 <h3>3.4 <a name="I-PDE">Plug-in Development Environment (PDE)</a></h3>
 <h4>Feature manifest editor does not preserve all comments</h4>
@@ -1281,7 +1345,7 @@ plug-in Ids during binary project import. (bug <a href="https://bugs.eclipse.org
 <h4>Export of plug-in may silently drop classes</h4>
 <p>When exporting a plug-in using the plug-in, feature or product wizards, some classes
 might be dropped from the resulting archive if their fully qualified name is too long.
-This typical path limitation can be worked around by creating the JAR of the problematic
+This typical path limitation can be worked around by creating the jar of the problematic
 plug-in by using the Jar export wizard.
 (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=97150">97150</a>)</p>
 
@@ -1332,12 +1396,12 @@ to edit the imported plug-ins is not required).
 (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280259">280259</a>)
 </p>
 
-<h2>4. <a name="Running Eclipse">Running Eclipse</a></h2>
+<h2>4. <a name="RunningEclipse">Running Eclipse</a></h2>
 <p>After installing the Eclipse SDK in a directory, you can start the Workbench
 by running the Eclipse executable included with the release (you also need a 1.4.2
 JRE, not included with the Eclipse SDK). On Windows, the executable file is called <samp>eclipse.exe</samp>,
 and is located in the <code>eclipse</code> sub-directory of the install. If
-installed at <code>c:\eclipse-SDK-3.5-win32</code>, the executable is <code>c:\eclipse-SDK-3.5-win32\eclipse\eclipse.exe</code>.
+installed at <code>c:\eclipse-SDK-3.6-win32</code>, the executable is <code>c:\eclipse-SDK-3.6-win32\eclipse\eclipse.exe</code>.
 
 <b>Note:</b> Set-up on most other operating environments is analogous. Special
 instructions for Mac OS X are listed <a href="#macosx">below</a>.</p>
@@ -1478,12 +1542,19 @@ start Eclipse, your upgrade path is much easier:</p>
 after you've upgraded your workspace, you won't be able to use it
 again with an older version of Eclipse. If you ever want to go "back in
 time" to an earlier release, you will need that backup.</p>
-
-
-<h2>6. <a name="Interoperability with Previous Releases">Interoperability with
+<h3> Users who use User Libraries or classpath containers that contain JARs referencing other libraries via Class-Path in the MANIFEST.MF</h3>
+<p>
+If you want the referenced JAR files to be included in the classpath, you can do one of the following:<br/>
+<ul>
+<li>Add the system property (<code>-DresolveReferencedLibrariesForContainers=true</code>) to the <code>-vmargs</code>
+list on start-up, or</li>
+<li>Manually add the referenced JARs to the User Library or to the project.</li>
+</ul>
+</p>
+<h2>6. <a name="InteroperabilityWithPreviousReleases">Interoperability with
 Previous Releases</a></h2>
-<h3>6.1 Interoperability of Release 3.5 with previous releases</h3>
-<h4>Sharing projects between heterogeneous Eclipse 3.5 and 3.4</h4>
+<h3>6.1 Interoperability of Release 3.6 with previous releases</h3>
+<h4>Sharing projects between heterogeneous Eclipse 3.6 and 3.5</h4>
 <p>Special care is required when a project in a team repository is being loaded
 and operated on by developers using Eclipse-based products based on different
 feature or plug-in versions. The general problem is that the existence,
@@ -1491,2965 +1562,2072 @@ contents, and interpretation of metadata files in the workspaces may be specific
 to a particular feature or plug-in version, and differ between versions. The
 workspace compatibility guarantees only cover cases where all developers upgrade
 their Eclipse workspaces in lock step. In those cases there should be no problem
-with shared metadata. However, when some developers are working in Eclipse 3.5
-while others are working in Eclipse 3.4, there are no such guarantees.
+with shared metadata. However, when some developers are working in Eclipse 3.6
+while others are working in Eclipse 3.5, there are no such guarantees.
 This section provides advice for what to do and not to do. It addresses the
 specific issues with the Eclipse SDK.</p>
 
-<p>The typical failure mode is noticed by the 3.5 user. 3.5 metadata is lost
-when a 3.4 user saves changes and then commits the updated metadata files to the
+<p>The typical failure mode is noticed by the 3.6 user. 3.6 metadata is lost
+when a 3.5 user saves changes and then commits the updated metadata files to the
 repository. Here's how things typically go awry:</p>
 <ul>
-  <li>A user working in Eclipse 3.5 creates or modifies a project in a way that
-    results in changes to a shared metadata file that rely on 3.5-specific
+  <li>A user working in Eclipse 3.6 creates or modifies a project in a way that
+    results in changes to a shared metadata file that rely on 3.6-specific
     information. The user then commits the updated project files, including the
     shared metadata file, to the shared repository.</li>
-  <li>Another user working in Eclipse 3.4 shares this project from the same
-    repository. The 3.5-specific information in the shared metadata file is not
-    understood by Eclipse 3.4, and is generally discarded or ignored without
+  <li>Another user working in Eclipse 3.5 shares this project from the same
+    repository. The 3.6-specific information in the shared metadata file is not
+    understood by Eclipse 3.5, and is generally discarded or ignored without
     warning. The user modifies the project in a way that results in changes to
     the shared metadata file, causing the shared metadata file to be rewritten
-    without any of the 3.5-specific information. The user commits the updated
+    without any of the 3.6-specific information. The user commits the updated
     project files, including the shared metadata file, to the shared repository.
     The user is generally unaware that shared information has just been lost as
     a result of their actions.</li>
-  <li>A user working in Eclipse 3.5 picks up the changes to a project from the
+  <li>A user working in Eclipse 3.6 picks up the changes to a project from the
     shared repository, including the updated shared metadata file. The user may
     be unaware that they have just taken a retrograde step until later when
     things start to malfunction.</li>
 </ul>
 <p>Here are some things to watch out for when sharing projects between
-Eclipse 3.5 and earlier 3.x releases:</p>
+Eclipse 3.6 and earlier 3.x releases:</p>
 <ul>
-  <li><b>Linked resources in the .project file</b> - 
-  Eclipse 3.5 supports creating linked resources at arbitrary depth within a project,
-  and supports creating linked resources referring to other file systems. Neither of
-  these scenarios are supported in Eclipse 3.1 or earlier.  If such linked resources
-  are created in 3.5, and the project is subsequently loaded into an Eclipse 3.1
-  or earlier workspace, these links will not be recognized.  Recommendation:
-  avoid creating links at arbitrary depth or to other file systems where project
-  compatibility with Eclipse 3.1 or earlier is required.</li>
+  <li><b>Virtual folders</b> - 
+  Eclipse 3.6 supports a notion of <i>virtual folders</i> that did not exist
+  in Eclipse 3.5 or earlier. If such virtual folders are created in 3.6, and the project
+  is subsequently loaded into an Eclipse 3.5 or earlier workspace, these folders
+  will not be recognized. Recommendation: avoid creating virtual folders where project
+  compatibility with Eclipse 3.5 or earlier is required.</li>
+  <li><b>Resource filters</b> - 
+  Eclipse 3.6 supports a notion of <i>resource filters</i> that did not exist
+  in Eclipse 3.5 or earlier. If such filters are added to resources in 3.6, and the project
+  is subsequently loaded into an Eclipse 3.5 or earlier workspace, these filters
+  will not be recognized. Recommendation: avoid creating resource filters where project
+  compatibility with Eclipse 3.5 or earlier is required.</li>
+  <li><b>Predefined path variables</b> - 
+  Eclipse 3.6 supports a set of built in path variables that can be used as the basis
+  for linked resource locations. Such variables will not be defined automatically in 
+  Eclipse 3.5 or earlier. If compatibility with 3.5 or earlier workspace is required,
+  users on 3.5 or earlier workspaces will need to define such path variables manually.
+  </li>
 </ul>
-<h4>Using Eclipse 3.5 to develop plug-ins that work in Eclipse 3.4</h4>
-<p>It is also possible (and reasonable) to use Eclipse 3.5 to develop a plug-in 
-  intended to work in Eclipse 3.4 or earlier. Use the <b>Plug-in Development > 
+<h4>Using Eclipse 3.6 to develop plug-ins that work in Eclipse 3.5</h4>
+<p>It is also possible (and reasonable) to use Eclipse 3.6 to develop a plug-in 
+  intended to work in Eclipse 3.5 or earlier. Use the <b>Plug-in Development > 
   Target Platform </b>preference page to locate non-workspace plug-ins in an Eclipse 
-  3.4 install. This ensures that the code for your plug-in is being compiled and 
-  tested against Eclipse 3.4 APIs, extension points, and plug-ins. (The above 
+  3.5 install. This ensures that the code for your plug-in is being compiled and 
+  tested against Eclipse 3.5 APIs, extension points, and plug-ins. (The above 
   list of concerns do not apply since they affect the layout and interpretation 
   of files in the plug-in <i>project</i> but none affect the actual deployed form 
   of the plug-in.)</p>
   
   
+  
   <h2>7. <a name="DefectsFixed"></a>Defects Fixed in Maintenance Releases</h2>
 
-<h3>7.1 Defects fixed in release 3.5.2 since 3.5.1</h3>
-<p>Release 3.5.2 is a maintenance release to fix serious defects present in
-release 3.5.1 These changes only affect some plug-ins and
+<h3>7.1 Defects fixed in release 3.6.2 since 3.6.1</h3>
+<p>Release 3.6.2 is a maintenance release to fix serious defects present in
+release 3.6.1 These changes only affect some plug-ins and
 features.</p>
 
-<p>Maintenance release 3.5.2 contains fixes for the following defects and others:</p>
-<p>
+<p>Maintenance release 3.6.2 contains fixes for the following defects and others:</p>
+
 <p>
-Note: Bug fixes since the 3.5.1 release can be obtained by the following the Bugzilla query: </p> 
+Note: Bug fixes since the 3.6.1 release can be obtained by the following the Bugzilla query: </p> 
 <p>
-<a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc_type=allwordssubstr;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;classification=Eclipse;classification=RT;field-1-0-0=bug_status;field-1-1-0=classification;field-1-2-0=product;field-1-3-0=resolution;field-1-4-0=target_milestone;field0-0-0=noop;keywords_type=allwords;long_desc_type=allwordssubstr;product=Equinox;product=JDT;product=PDE;product=Platform;query_format=advanced;remaction=;resolution=FIXED;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;target_milestone=3.5.2;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type-1-3-0=anyexact;type-1-4-0=anyexact;type0-0-0=noop;value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED;value-1-1-0=Eclipse%2CRT;value-1-2-0=Equinox%2CJDT%2CPDE%2CPlatform;value-1-3-0=FIXED;value-1-4-0=3.5.2;value0-0-0=|;query_based_on=">Bugs fixed in the 3.5.2 release</a>
-
-</p>
-
-
-
-  <span class="bz_result_count">149 bugs found.
-  </span>
-
-
 
+<a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc_type=allwordssubstr;bug_status=RESOLVED;bug_status=VERIFIED;bug_status=CLOSED;classification=Eclipse;classification=RT;field-1-0-0=bug_status;field-1-1-0=classification;field-1-2-0=product;field-1-3-0=resolution;field-1-4-0=target_milestone;field0-0-0=noop;keywords_type=allwords;long_desc_type=allwordssubstr;product=Equinox;product=JDT;product=PDE;product=Platform;query_format=advanced;remaction=;resolution=FIXED;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;target_milestone=3.6.2;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type-1-3-0=anyexact;type-1-4-0=anyexact;type0-0-0=noop;value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED;value-1-1-0=Eclipse%2CRT;value-1-2-0=Equinox%2CJDT%2CPDE%2CPlatform;value-1-3-0=FIXED;value-1-4-0=3.6.1;value0-0-0=|;query_based_on=">Bugs fixed in the 3.6.2 release</a>
 
+</p>
 
 
 
 
 
 <table class="bz_buglist" cellspacing="0" cellpadding="4" width="100%">
-    <colgroup>
-      <col class="bz_id_column">
-      <col class="bz_short_desc_column">
-    </colgroup>
-
-    <tr class="bz_buglist_header bz_first_buglist_header" align="left">
+    <tr class="bz_buglist_header bz_first_buglist_header">
       <th colspan="1" class="first-child">
-        <a href="buglist.cgi?bug_file_loc_type=allwordssubstr&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Eclipse&classification=RT&columnlist=short_desc&field0-0-0=noop&keywords_type=allwords&long_desc_type=allwordssubstr&product=Equinox&product=JDT&product=PDE&product=Platform&query_format=advanced&remaction=&resolution=FIXED&short_desc=&short_desc_type=allwordssubstr&status_whiteboard=&status_whiteboard_type=allwordssubstr&target_milestone=3.5.2&type0-0-0=noop&value0-0-0=%7C&order=bug_id%20DESC&query_based_on=">ID</a>
+        <a href="buglist.cgi?bug_file_loc_type=allwordssubstr&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Eclipse&classification=RT&columnlist=short_desc&field0-0-0=noop&keywords_type=allwords&long_desc_type=allwordssubstr&product=Equinox&product=JDT&product=PDE&product=Platform&query_format=advanced&remaction=&resolution=FIXED&short_desc=&short_desc_type=allwordssubstr&status_whiteboard=&status_whiteboard_type=allwordssubstr&target_milestone=3.6.2&type0-0-0=noop&value0-0-0=%7C&order=bug_id%20DESC&query_based_on=">ID</a>
       </th>
 
 <th colspan="1">
-    <a href="buglist.cgi?bug_file_loc_type=allwordssubstr&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Eclipse&classification=RT&columnlist=short_desc&field0-0-0=noop&keywords_type=allwords&long_desc_type=allwordssubstr&product=Equinox&product=JDT&product=PDE&product=Platform&query_format=advanced&remaction=&resolution=FIXED&short_desc=&short_desc_type=allwordssubstr&status_whiteboard=&status_whiteboard_type=allwordssubstr&target_milestone=3.5.2&type0-0-0=noop&value0-0-0=%7C&order=short_desc%2Cbug_id&query_based_on=">Summary</a>
+    <a href="buglist.cgi?bug_file_loc_type=allwordssubstr&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Eclipse&classification=RT&columnlist=short_desc&field0-0-0=noop&keywords_type=allwords&long_desc_type=allwordssubstr&product=Equinox&product=JDT&product=PDE&product=Platform&query_format=advanced&remaction=&resolution=FIXED&short_desc=&short_desc_type=allwordssubstr&status_whiteboard=&status_whiteboard_type=allwordssubstr&target_milestone=3.6.2&type0-0-0=noop&value0-0-0=%7C&order=short_desc%2Cbug_id&query_based_on=">Summary</a>
   </th>
 
 
     </tr>
 
+
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b160870"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=160870">160870</a>
+    <td class="first-child bz_id_column">
+      <a name="b210027"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=210027">210027</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Contributions] ToolItem.setWidth fails when ToolItem on ViewPart toolbar
+    <td 
+        class="bz_short_desc_column">TreeModelLabelProvider does not cancel stale updates.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b205608"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=205608">205608</a>
+    <td class="first-child bz_id_column">
+      <a name="b283320"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283320">283320</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Launcher] AIX still requires motif libraries installed
+    <td 
+        class="bz_short_desc_column">[SWT] Widgets flashing when moving mouse while holding Alt button
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P2             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b264398"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264398">264398</a>
+    <td class="first-child bz_id_column">
+      <a name="b301894"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301894">301894</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Browser] Arrow_Down does not scroll after tabbing into Browser
+    <td 
+        class="bz_short_desc_column">OutOfMemory error when building a large project with annotations
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b277106"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277106">277106</a>
+    <td class="first-child bz_id_column">
+      <a name="b302184"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302184">302184</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Browser] JVM crashes after closing several Browser control instances with PDF files opened
+    <td 
+        class="bz_short_desc_column">[About] About dialog text - needs to not cache system property values
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b277323"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277323">277323</a>
+    <td class="first-child bz_id_column">
+      <a name="b307345"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307345">307345</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Save dialog does not show filter extensions
+    <td 
+        class="bz_short_desc_column">[Browser][Mozilla][Mac]Can't use ctrl+f2 to move focus to the menu bar in Mozilla browser
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b277438"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277438">277438</a>
+    <td class="first-child bz_id_column">
+      <a name="b312189"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312189">312189</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Korean Input text flickers in StyledText widget in case the sentence  exceeds a row.
+    <td 
+        class="bz_short_desc_column">[quick assist] BadLocationException when applying proposal while preview is computed
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_blocker             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b277643"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643">277643</a>
+    <td class="first-child bz_id_column">
+      <a name="b317771"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317771">317771</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Generics compile error
+    <td 
+        class="bz_short_desc_column">FUP of 315978: Add performance tracking test for scenario fixed by bug# 315978
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b278625"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278625">278625</a>
+    <td class="first-child bz_id_column">
+      <a name="b319123"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319123">319123</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[DND] COM leak during drag and drop
+    <td 
+        class="bz_short_desc_column">[launcher] Application becomes unresponsive when code completion tooltip shows
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b278817"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278817">278817</a>
+    <td class="first-child bz_id_column">
+      <a name="b319337"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319337">319337</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[block selection] Caret height wrong after enabling block selection
+    <td 
+        class="bz_short_desc_column">[Win32] WindowXP command "Close Group" can not close all the Eclipse window that in one group
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b278831"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278831">278831</a>
+    <td class="first-child bz_id_column">
+      <a name="b321155"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321155">321155</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[block selection] Block selection font size not honored
+    <td 
+        class="bz_short_desc_column">[DynamicGUI] UIExtensionTracker calling Display.syncExec() on disposed Display
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b280516"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280516">280516</a>
+    <td class="first-child bz_id_column">
+      <a name="b323514"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323514">323514</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[browser] Execue / evaluate crashes with out of memory error
+    <td 
+        class="bz_short_desc_column">[indexing] The Java Indexer is taking longer to run in eclipse 3.6 when opening projects
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b280806"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280806">280806</a>
+    <td class="first-child bz_id_column">
+      <a name="b323763"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323763">323763</a>
       <span style="display: none"></span>
     </td>
 
-    <td >workbench ant runner should not suspend the job manager
+    <td 
+        class="bz_short_desc_column">Eclipse 3.7 M1 crashes as it is starting up - detected by Java Runtime Environment
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b281224"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281224">281224</a>
+    <td class="first-child bz_id_column">
+      <a name="b324102"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324102">324102</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[product] not added to feature based product without deltapack
+    <td 
+        class="bz_short_desc_column">Backspace key, delete key and tab stop working when my application is minimized
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b281565"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281565">281565</a>
+    <td class="first-child bz_id_column">
+      <a name="b324236"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324236">324236</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[ds tooling] NPE in DSErrorReporter.reportIllegalPolicy(...)
+    <td 
+        class="bz_short_desc_column">[Browser-Mozilla] Links and JS actions opening a new window do not work
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b281575"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281575">281575</a>
+    <td class="first-child bz_id_column">
+      <a name="b324596"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324596">324596</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Eclipse hangs in SourceMapper while doing java proposals
+    <td 
+        class="bz_short_desc_column">[releng][p2] consume ECF build for 3.6.1 maintenance
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b281867"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281867">281867</a>
+    <td class="first-child bz_id_column">
+      <a name="b324801"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324801">324801</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[jar exporter] JAR export not workspace relative if folder does not exist
+    <td 
+        class="bz_short_desc_column">enable WebKitGTK on Linux-PPC
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b282032"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282032">282032</a>
+    <td class="first-child bz_id_column">
+      <a name="b324892"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324892">324892</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Radio button group not read correctly by JAWS
+    <td 
+        class="bz_short_desc_column">Wrong constant values for some IA2 events
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b282581"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282581">282581</a>
+    <td class="first-child bz_id_column">
+      <a name="b325028"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325028">325028</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Launch External Tool does not save dirty editors regardless of preference setting
+    <td 
+        class="bz_short_desc_column">[a11y] Frequent crashes in editor resulting from atk_object_get_attributes()
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b283147"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283147">283147</a>
+    <td class="first-child bz_id_column">
+      <a name="b325161"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325161">325161</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[publisher] Mismatch between PDE and p2 interpretation of icon paths in .product file
+    <td 
+        class="bz_short_desc_column">NPE in Java breakpoint properties page with JavaStratumLineBreakpoint
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b283681"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283681">283681</a>
+    <td class="first-child bz_id_column">
+      <a name="b325227"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325227">325227</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Regression: No longer possible to post an event to the Browser
+    <td 
+        class="bz_short_desc_column">[Backport] NatureManager is NOT threadsafe causing incorrect responses to isNatureEnabled() (and others)
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED             bz_secure             bz_secure_mode_manual             bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b284280"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284280">284280</a>
-      <span style="display: none"></span>
+    <td class="first-child bz_id_column">
+      <a name="b325294"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325294">325294</a>
+      <span style="display: none">[SEC]</span>
     </td>
 
-    <td >[1.5][compiler] Error on use generic interface in abstract super class
+    <td 
+        class="bz_short_desc_column">[launcher] DLL hijacking exploit
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b284858"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284858">284858</a>
+    <td class="first-child bz_id_column">
+      <a name="b325557"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325557">325557</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] TableColumn.pack() results in a table that does not fit the header on SWT cocoa
+    <td 
+        class="bz_short_desc_column">Associating a Launch with Perspective "None" is not persisted
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b285095"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285095">285095</a>
+    <td class="first-child bz_id_column">
+      <a name="b325797"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325797">325797</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Viewers] New column scrolling breaks on first cell selection if you have scrolled the table
+    <td 
+        class="bz_short_desc_column">views automatically opened based on debug context are hidden/closed on perspective switch
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_enhancement             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b285124"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285124">285124</a>
+    <td class="first-child bz_id_column">
+      <a name="b325885"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325885">325885</a>
       <span style="display: none"></span>
     </td>
 
-    <td >serialVersionUID still causes error/warning
+    <td 
+        class="bz_short_desc_column">Dynamic import resolver bug
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED             bz_secure             bz_secure_mode_manual             bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b285607"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285607">285607</a>
-      <span style="display: none"></span>
+    <td class="first-child bz_id_column">
+      <a name="b325902"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325902">325902</a>
+      <span style="display: none">[SEC]</span>
     </td>
 
-    <td >[performance] expensive inner loop in JavaSourceLookupUtil
+    <td 
+        class="bz_short_desc_column">[launcher] Windows LoadLibrary search cwd DLL exploit
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b286040"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286040">286040</a>
+    <td class="first-child bz_id_column">
+      <a name="b325946"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325946">325946</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Image Saving] o.e.swt.internal.image.PngEncoder is very slow on writing large images
+    <td 
+        class="bz_short_desc_column">[backport] Provide a way to disable capping in the comparison algorithm
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b286107"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286107">286107</a>
+    <td class="first-child bz_id_column">
+      <a name="b326152"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326152">326152</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[ViewMgmt] [GlobalActions] Closing project ignores Saveables
+    <td 
+        class="bz_short_desc_column">[Memory View] new monitors added while Memory view is hidden or closed are not shown in the tree
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b286687"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286687">286687</a>
+    <td class="first-child bz_id_column">
+      <a name="b326263"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326263">326263</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Graphics][GTK2.18] clipping broken when setting a transform with Gtk 2.17.7
+    <td 
+        class="bz_short_desc_column">Windows File Locks are obtained on bundles exporting extension points and not released.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b287119"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287119">287119</a>
+    <td class="first-child bz_id_column">
+      <a name="b326351"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326351">326351</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[StyledText] styled text widget content can be shifted left with out scroll bar when line wraps
+    <td 
+        class="bz_short_desc_column">remove p2.selfhosting bundle from org.eclipse.releng/maps/p2.map
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b287234"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287234">287234</a>
+    <td class="first-child bz_id_column">
+      <a name="b326354"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326354">326354</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[DND] drag/drop onto empty table generates exception in SWT
+    <td 
+        class="bz_short_desc_column">[3.6][compiler][regression] Compiler in 3.6 and 3.6.1 generates bad code
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b287307"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287307">287307</a>
+    <td class="first-child bz_id_column">
+      <a name="b326395"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326395">326395</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] [GTK2.18] Control.setZOrder broken on Gtk+ >= 2.17.3
+    <td 
+        class="bz_short_desc_column">[Backport] Cannot compare word documents
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_CLOSED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b287458"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287458">287458</a>
+    <td class="first-child bz_id_column">
+      <a name="b326434"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326434">326434</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Browser] SWT crashes JVM when disposing of browser using XULRunner >=1.9.1 via XULRunnerPath
+    <td 
+        class="bz_short_desc_column">New issues with NPE refreshing external folders with 3.6.1
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b287592"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287592">287592</a>
+    <td class="first-child bz_id_column">
+      <a name="b326453"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326453">326453</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[1.5][compiler] Wrong ambiguous compilation error
+    <td 
+        class="bz_short_desc_column">releng compare tool and pde api tooling should compare against 3.6.1 in 3.6.2 maintenance stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b287761"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287761">287761</a>
+    <td class="first-child bz_id_column">
+      <a name="b326516"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326516">326516</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Progress] Finished Tasks Still Show In Progress View
+    <td 
+        class="bz_short_desc_column">3.6.2 feature versions need to be incremented
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b287833"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287833">287833</a>
+    <td class="first-child bz_id_column">
+      <a name="b326532"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326532">326532</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[formatter] Formatter removes the first character after the * in the <pre> tag
+    <td 
+        class="bz_short_desc_column">run compare tool against p2 repos instead of sdk (backport to 3.6.2)
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b287871"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287871">287871</a>
+    <td class="first-child bz_id_column">
+      <a name="b326541"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326541">326541</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[publisher] custom config.ini in product definition causes NPE
+    <td 
+        class="bz_short_desc_column">Plan Verifier results not checked in reconciler
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b288140"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288140">288140</a>
+    <td class="first-child bz_id_column">
+      <a name="b326673"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326673">326673</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[IDE] [browser] Default external browser should be pre-configured on Solaris 10 sparc GTK
+    <td 
+        class="bz_short_desc_column">[WorkingSets] FileNotFoundException in WorkingSetManager
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P2             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b288211"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211">288211</a>
+    <td class="first-child bz_id_column">
+      <a name="b326958"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326958">326958</a>
       <span style="display: none"></span>
     </td>
 
-    <td >APT uses a lot of memory
+    <td 
+        class="bz_short_desc_column">default ANT home directory lower than the Ant plugin version
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_trivial             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b288474"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288474">288474</a>
+    <td class="first-child bz_id_column">
+      <a name="b327138"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327138">327138</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Saving a docx file fails silently due to not killing WINWORD process on close
+    <td 
+        class="bz_short_desc_column">[Import/Export] WizardExportResourcesPage's Finish button isn't sensitive to Select/Deselect All
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b288513"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288513">288513</a>
+    <td class="first-child bz_id_column">
+      <a name="b327233"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327233">327233</a>
       <span style="display: none"></span>
     </td>
 
-    <td >BundleContext#getServiceReference does not return highest ranked service
+    <td 
+        class="bz_short_desc_column">p2 and equinox feature versions need to be incremented in 3.6.2 stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b288641"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288641">288641</a>
+    <td class="first-child bz_id_column">
+      <a name="b327234"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327234">327234</a>
       <span style="display: none"></span>
     </td>
 
-    <td >NPE in NameVersionDescriptor hashCode() method when the version is null
+    <td 
+        class="bz_short_desc_column">version of org.eclipse.core.resources needs to be incremented in 3.6.x stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b288857"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288857">288857</a>
+    <td class="first-child bz_id_column">
+      <a name="b327362"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327362">327362</a>
       <span style="display: none"></span>
     </td>
 
-    <td >GDI Handle Resource Leak
+    <td 
+        class="bz_short_desc_column">setUrl() call navigates to about:blank prior to real url breaks IEWebHistory
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b289401"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289401">289401</a>
+    <td class="first-child bz_id_column">
+      <a name="b327425"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327425">327425</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] Black screen in windows 7 aero mode using Tracker
+    <td 
+        class="bz_short_desc_column">[backport] New option to not use capped algorithm misses documentation
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b289670"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289670">289670</a>
+    <td class="first-child bz_id_column">
+      <a name="b327446"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327446">327446</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Concurrency issues in XMLParser.acquireXMLParsing()
+    <td 
+        class="bz_short_desc_column">Launch's wait for build logic does not check for autobuild correctly
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b289892"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289892">289892</a>
+    <td class="first-child bz_id_column">
+      <a name="b327560"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327560">327560</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[compiler] NPE during binaryTypeBinding field initialization
+    <td 
+        class="bz_short_desc_column">Failed to create Citrix Client v12
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b290036"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290036">290036</a>
+    <td class="first-child bz_id_column">
+      <a name="b327654"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327654">327654</a>
       <span style="display: none"></span>
     </td>
 
-    <td >JavaScript function on overview pages does not open in Help View
+    <td 
+        class="bz_short_desc_column">FUP of bug 317264: Refactoring is not possible if the commons-lang.jar is in the path
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b290064"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290064">290064</a>
+    <td class="first-child bz_id_column">
+      <a name="b327706"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327706">327706</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Webapp] TocToolbar in Help window shows 404 with org.apache.jasper from Tomcat 5.5.27
+    <td 
+        class="bz_short_desc_column">Headless build failure with Eclipse 3.6.1
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_blocker             bz_P1             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b290273"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290273">290273</a>
+    <td class="first-child bz_id_column">
+      <a name="b327772"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327772">327772</a>
       <span style="display: none"></span>
     </td>
 
-    <td >R3_5_maintenance branch in inconsistent state
+    <td 
+        class="bz_short_desc_column">equinox.serverside.sdk version needs to be incremented to 3.6.1 in R3_6_maintenance stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b290376"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290376">290376</a>
+    <td class="first-child bz_id_column">
+      <a name="b327790"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327790">327790</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Errant "Comparing identical expressions" warning with assignment
+    <td 
+        class="bz_short_desc_column">[Widgets] Controls with null background inside Group or TabFolder do not display correctly in Cocoa
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b290382"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290382">290382</a>
+    <td class="first-child bz_id_column">
+      <a name="b327827"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327827">327827</a>
       <span style="display: none"></span>
     </td>
 
-    <td >ArrayIndexOutOfBoundsException in MarkerAttributeMap
+    <td 
+        class="bz_short_desc_column">[Webapp] Fix for Eclipse 3.6.2 - Eclipse help system content panel tree component is unusable by people using screen readers
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b290395"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290395">290395</a>
+    <td class="first-child bz_id_column">
+      <a name="b328145"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328145">328145</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] [GTK2.18] Update problem in the Eclipse's "Install new software" dialog.
+    <td 
+        class="bz_short_desc_column">[cocoa, gef] Guide markers not fully visible on Cocoa
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b290534"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290534">290534</a>
+    <td class="first-child bz_id_column">
+      <a name="b328151"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328151">328151</a>
       <span style="display: none"></span>
     </td>
 
-    <td >ServiceRegistry doesn't remove BundleContextImpl keys from publishedServicesByContext HashMap when list of services becomes empty
+    <td 
+        class="bz_short_desc_column">[launcher] 3.6.2: Remember to compile for S390(x)
     </td>
 
   </tr>
 
-  
-
 
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b290544"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290544">290544</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >'Next Change' does not selected last small diff (button disabled)
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b290653"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290653">290653</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >The org.eclipse.equinox.executable feature has gone backwards in version numbering
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b290661"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290661">290661</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >SWT & Launcher fragments using 'HEAD' as qualifier
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b290721"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290721">290721</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[launcher] motif.solaris.sparc has bad HEAD tag in map files
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b290730"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290730">290730</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Rewriting SwitchStatement throws NPE
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b290805"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290805">290805</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[quick fix] BadLocationException (race condition with preview calculation)
-    </td>
-
-  </tr>
-
-  
-
-
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b290877"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290877">290877</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[DOM] If using a tag named @enum the ASTParser ignores this
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b290905"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290905">290905</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[formatter] Certain formatter pref constellation cause endless loop ==> OOME
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b291128"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291128">291128</a>
+    <td class="first-child bz_id_column">
+      <a name="b328177"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328177">328177</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] eclipse >= 3.5 crash when closing a first level modal window (Install, Run Configurations)
+    <td 
+        class="bz_short_desc_column">Project ant builder cannot run in headless context as it attempts to load a UI AntInputHandler (even when not in use)
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b291194"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291194">291194</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >org.eclipse.platform-p2repo-3.5.1.zip missing IUs that were present in Galileo repository
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b291307"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291307">291307</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Menu images (PNG) does not support semi-alpha-transparency on Windows Vista/7
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b291322"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291322">291322</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Test errors when running JDT Core tests on Windows 7
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b291339"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291339">291339</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >validateEdit not called for launch configuration stored locally
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b291354"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291354">291354</a>
+    <td class="first-child bz_id_column">
+      <a name="b328295"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328295">328295</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] Windows 7: small indeterminate ProgressBar looks broken
+    <td 
+        class="bz_short_desc_column">Launch button disabled after failed launch
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b291382"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291382">291382</a>
+    <td class="first-child bz_id_column">
+      <a name="b328345"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328345">328345</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Cocoa should defer window creation
+    <td 
+        class="bz_short_desc_column">version of org.eclipse.equinox.supplement needs to be incremented in 3.6.2 stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b291472"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291472">291472</a>
+    <td class="first-child bz_id_column">
+      <a name="b328350"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328350">328350</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[1.5][compiler] Access to a generic method is compiled incorrectly
+    <td 
+        class="bz_short_desc_column">update location of platform zips used in p2 tests
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b291486"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291486">291486</a>
+    <td class="first-child bz_id_column">
+      <a name="b328400"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328400">328400</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Browser] Browser widget crashes VM after failed Ctrl+L in hover
+    <td 
+        class="bz_short_desc_column">TextEdit computed incorrectly for inserting annotation before package declaration
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b291716"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291716">291716</a>
+    <td class="first-child bz_id_column">
+      <a name="b328826"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328826">328826</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[package explorer] hides jars non-java resources when working set is selected
+    <td 
+        class="bz_short_desc_column">content.xml is too big (20 MB+)
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED             bz_secure             bz_secure_mode_manual             bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b291775"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291775">291775</a>
-      <span style="display: none"></span>
+    <td class="first-child bz_id_column">
+      <a name="b328975"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328975">328975</a>
+      <span style="display: none">[SEC]</span>
     </td>
 
-    <td >[formatter] Backport fixes for known issues around 'Never Join Lines' preference to 3.5 maintenance stream
+    <td 
+        class="bz_short_desc_column">[Webapp] Possible security issue with JSP code exposure.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b291985"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291985">291985</a>
+    <td class="first-child bz_id_column">
+      <a name="b329129"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329129">329129</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[compiler][jsr14] Translating Enum with jsr14 target: ECJ causes a runtime error while Sun compiler works fine
+    <td 
+        class="bz_short_desc_column">[Mac] Unhandled event loop exception when closing Error Log Event Details
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED             bz_secure             bz_secure_mode_manual             bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b292068"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292068">292068</a>
-      <span style="display: none"></span>
+    <td class="first-child bz_id_column">
+      <a name="b329193"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329193">329193</a>
+      <span style="display: none">[SEC]</span>
     </td>
 
-    <td >[target] Target environment settings not persisted on Mac OS
+    <td 
+        class="bz_short_desc_column">[Webapp] Possible security issue with JSP code exposure.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b292227"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292227">292227</a>
+    <td class="first-child bz_id_column">
+      <a name="b329212"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329212">329212</a>
       <span style="display: none"></span>
     </td>
 
-    <td >plug window lost focus when create a NO_FOCUS shell from socket
+    <td 
+        class="bz_short_desc_column">OSGI app binaries do not inherit Java 2 security
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_enhancement             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b292240"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292240">292240</a>
+    <td class="first-child bz_id_column">
+      <a name="b329222"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329222">329222</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Compiler error on implementation of raw sub interface
+    <td 
+        class="bz_short_desc_column">Request for AIX 64-bit gtk build in 3.6.2
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b292290"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292290">292290</a>
+    <td class="first-child bz_id_column">
+      <a name="b329223"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329223">329223</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Presentations] need to tag org.eclipse.ui.presentations.r21 bundle in 3.5.2 stream
+    <td 
+        class="bz_short_desc_column">Need 3.6.2 launcher for AIX 64 GTK
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b292292"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292292">292292</a>
+    <td class="first-child bz_id_column">
+      <a name="b329267"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329267">329267</a>
       <span style="display: none"></span>
     </td>
 
-    <td >org.eclipse.core.resources.compatibility needs to be tagged in the 3.5.2 stream
+    <td 
+        class="bz_short_desc_column">3.6.1 download page should contain link to 3.6 new & noteworthy
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b292350"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292350">292350</a>
+    <td class="first-child bz_id_column">
+      <a name="b329288"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329288">329288</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[1.5][compiler] Compiler error: ambiguous method since 3.5.1 using generics and interface inheritance
+    <td 
+        class="bz_short_desc_column">Fetching parameter names literally hangs on a class with a lot of methods
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b292821"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292821">292821</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >NPE during Export -> Product
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b292885"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292885">292885</a>
+    <td class="first-child bz_id_column">
+      <a name="b329303"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329303">329303</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Plugin export creates faulty bundle when using custom target platform and junit4 dependency
+    <td 
+        class="bz_short_desc_column">Port AIX GTK 64 back to 3.6.2
     </td>
 
   </tr>
 
-  
-
 
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293001"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293001">293001</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[Doc] Bad link in Export Preferences Wizard help page
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P2             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b293176"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293176">293176</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[content assist] Esc Tab on additional info does not bring back the additional info
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293218"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293218">293218</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >unpack="true" doesn't work for customBuildCallbacks
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b293235"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293235">293235</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[backport][Import/Export] Timestamps updated on archive export and on project import
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293302"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293302">293302</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >LocalFile#move fails when a link with nonexistent target is moved
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b293443"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293443">293443</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >AbortCompilation when invoking content assist
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293519"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293519">293519</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[backport] OutOfMemoryError during workspace refresh due to leak in UnifiedTree
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b293713"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293713">293713</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Remove Google search from help system in 3.5.2
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293820"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293820">293820</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[prefs] Thread safety problem in InstancePreferences
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b293831"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293831">293831</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[launcher] AIX needs jre/lib/<arch> on library search path
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b293928"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293928">293928</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Need ability to disable status handlers
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b294000"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294000">294000</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[import] Import holding on to import streams longer than it should be
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b294313"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294313">294313</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >bundle versions have decreased in 3.5.x stream
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b294404"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294404">294404</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >-target jsr14 flags error on foreach over Collection that does not implement Iterable
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b294462"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294462">294462</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[FieldAssist] ControlDecoration#showHoverText doesn't check if the widget is visible
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b294502"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294502">294502</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Handling of unknown arguments/targets
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b294662"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294662">294662</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >ClassCastException while invoking quick assist
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b294702"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294702">294702</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >Backport of bug 283283 into 3.5.x is required
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b294707"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294707">294707</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[Backport] OutOfMemoryError during workspace refresh due to FileInfo carrying substring baggage
-    </td>
-
-  </tr>
-
-  
-
-
-  
-
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
-
-    <td class="first-child">
-      <a name="b294721"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294721">294721</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[Backport] Symbolic link support doesn't work on the AIX
-    </td>
-
-  </tr>
-
-  
-  <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
-
-    <td class="first-child">
-      <a name="b294722"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294722">294722</a>
-      <span style="display: none"></span>
-    </td>
-
-    <td >[Backport] Symbolic link support doesn't work on the Mac
-    </td>
-
-  </tr>
-
-  
-
-
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b295126"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295126">295126</a>
+    <td class="first-child bz_id_column">
+      <a name="b329333"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329333">329333</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[launcher] AIX build of eclipse binary needs adjusting.
+    <td 
+        class="bz_short_desc_column">[Backport] Concurrent access to file while decorating
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b295185"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295185">295185</a>
+    <td class="first-child bz_id_column">
+      <a name="b329485"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329485">329485</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Browser] Refresh of PDF in SWT browser leads to jvm crash
+    <td 
+        class="bz_short_desc_column">[Help] Fix for 3.6.2 On WinXP bookmarks added from help view get name "N/A"
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b295483"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295483">295483</a>
+    <td class="first-child bz_id_column">
+      <a name="b329494"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329494">329494</a>
       <span style="display: none"></span>
     </td>
 
-    <td >3.5.x regression: UI randomly freezes
+    <td 
+        class="bz_short_desc_column">[Help] Fix in Eclipse 3.6.2 - Jaws does not give enough context info when in Help pane
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b295557"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295557">295557</a>
+    <td class="first-child bz_id_column">
+      <a name="b329713"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329713">329713</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[KeyBindings] Exporting key preferences to CSV does not allow context being null
+    <td 
+        class="bz_short_desc_column">[Webapp] Fix in 3.6.2 Wrong topic was selected in the TOC tree
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b295698"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295698">295698</a>
+    <td class="first-child bz_id_column">
+      <a name="b329838"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329838">329838</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[1.5][compiler] ClassCastException in unchecked warning report
+    <td 
+        class="bz_short_desc_column">[KeyBindings] Exporting key preferences to CSV does not allow context being null
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED             bz_secure             bz_secure_mode_manual             bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b295803"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295803">295803</a>
-      <span style="display: none"></span>
+    <td class="first-child bz_id_column">
+      <a name="b330026"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330026">330026</a>
+      <span style="display: none">[SEC]</span>
     </td>
 
-    <td >[CommonNavigator] Source of Contribution set to lowest priority NCE, not the NCE providing the children
+    <td 
+        class="bz_short_desc_column">[Webapp][Security] Fix for Eclipse 3.6.2 Eclipse Help Server XSS
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b295959"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295959">295959</a>
+    <td class="first-child bz_id_column">
+      <a name="b330030"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330030">330030</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] Embedded native view can not receive Enter key event on Mac.
+    <td 
+        class="bz_short_desc_column">P2 Nullpointer Exception at RepositoryTransport.download
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b296142"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296142">296142</a>
+    <td class="first-child bz_id_column">
+      <a name="b330047"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330047">330047</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[KeyBindings] Set extension point "org.eclipse.ui.bindings" 's element 'sequenceModifier' becomes disabled key bindings.
+    <td 
+        class="bz_short_desc_column">PluginRegistry.findModel* throws IllegalArgumentExceptions
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b296223"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296223">296223</a>
+    <td class="first-child bz_id_column">
+      <a name="b330081"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330081">330081</a>
       <span style="display: none"></span>
     </td>
 
-    <td >org.eclipse.core.filesystem.aix.ppc should be added to 3.5.2 build
+    <td 
+        class="bz_short_desc_column">[compiler] ArrayIndexOutOfBoundsException when Switched from C/C++ Perspective to Java Perspective
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b296253"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296253">296253</a>
+    <td class="first-child bz_id_column">
+      <a name="b330122"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330122">330122</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[CommonNavigator] An empty label is not properly shown when it is the only contributed label
+    <td 
+        class="bz_short_desc_column">[3.6 maint] HTMLTransfer broken from Firefox --> SWT [Carbon]
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b296284"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296284">296284</a>
+    <td class="first-child bz_id_column">
+      <a name="b330285"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330285">330285</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[browser] xulrunner 1.9.2 changes
+    <td 
+        class="bz_short_desc_column">[Commands] Stackoverflow in BindingSystem
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b296343"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296343">296343</a>
+    <td class="first-child bz_id_column">
+      <a name="b330310"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330310">330310</a>
       <span style="display: none"></span>
     </td>
 
-    <td >OOM error caused by java indexing referencing classloader from threadLocal
+    <td 
+        class="bz_short_desc_column">[webapp] Regression: Capability filtering and "Show All" are missing in Eclipse 3.6
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b296467"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296467">296467</a>
+    <td class="first-child bz_id_column">
+      <a name="b330438"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330438">330438</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Widgets] FileDialog can not open a directory correctly on linux gtk swt
+    <td 
+        class="bz_short_desc_column">[ltk] NPE in UndoDocumentChange
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b296728"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296728">296728</a>
+    <td class="first-child bz_id_column">
+      <a name="b330460"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330460">330460</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[CommonNavigator] Problem with enablement on navigatorContent extension point
+    <td 
+        class="bz_short_desc_column">[planner] p2 director does not install source bundles from optional features
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b296851"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296851">296851</a>
+    <td class="first-child bz_id_column">
+      <a name="b330463"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330463">330463</a>
       <span style="display: none"></span>
     </td>
 
-    <td >pluginCustomization argument should be removed from nonFrameworkArgs after being processed
+    <td 
+        class="bz_short_desc_column">Optimize manifest TouchPointData memory footprint for MetadataRepositories
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
+             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b297039"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297039">297039</a>
+    <td class="first-child bz_id_column">
+      <a name="b330515"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330515">330515</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Debugger opens ".java" files instead of ".class" files if target platform is inside the workspace
+    <td 
+        class="bz_short_desc_column">[Help] Fix in 3.6.2 Remote Help HTTPS support is setting java.protocol.handler.pkgs=javax.net.ssl
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b297243"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297243">297243</a>
+    <td class="first-child bz_id_column">
+      <a name="b330549"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330549">330549</a>
       <span style="display: none"></span>
     </td>
 
-    <td >missing bundles in 3.5.2 stream sdk.examples features
+    <td 
+        class="bz_short_desc_column">[Wizards] cancelable parameter does not disable Wizard progress bar cancel button
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b297663"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297663">297663</a>
+    <td class="first-child bz_id_column">
+      <a name="b330584"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330584">330584</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[JUnit] JUnit not found when JDT installed as dropin
+    <td 
+        class="bz_short_desc_column">org.eclipse.equinox.core.sdk needed to be tagged in 3.6.2 stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b297758"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297758">297758</a>
+    <td class="first-child bz_id_column">
+      <a name="b330605"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330605">330605</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[fwkAdmin] fail to check for null causes NPE when eclipse is installed in the root folder
+    <td 
+        class="bz_short_desc_column">test 3.6.2 build with bundles from M20101117-1123 to fix p2 source generation problem
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b297950"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297950">297950</a>
+    <td class="first-child bz_id_column">
+      <a name="b330611"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330611">330611</a>
       <span style="display: none"></span>
     </td>
 
-    <td >CompareEditorInputs are leaked when reusing editors
+    <td 
+        class="bz_short_desc_column">[launcher] Add mechanism for ignoring user specified config.ini values
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b297991"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297991">297991</a>
+    <td class="first-child bz_id_column">
+      <a name="b330815"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330815">330815</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Documentation has incorrect default for osgi.bundlefile.limit
+    <td 
+        class="bz_short_desc_column">perf_35x baselines failing due to relocated archives
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b298325"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298325">298325</a>
+    <td class="first-child bz_id_column">
+      <a name="b330824"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330824">330824</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Wrong version attribute for the self provided capability of a category IU
+    <td 
+        class="bz_short_desc_column">[Graphics] Splash screen for SR2 should be updated to use Oracle's copyrights
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b298805"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298805">298805</a>
+    <td class="first-child bz_id_column">
+      <a name="b330927"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330927">330927</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[widgets] gtk2.18 - Blank pages in the install wizard
+    <td 
+        class="bz_short_desc_column">[backport] Default external web browser not found when running 32-bit Eclipse on 64-bit Ubuntu 9.04
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b298823"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298823">298823</a>
+    <td class="first-child bz_id_column">
+      <a name="b331303"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331303">331303</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Problem applying multiple patches to the same IU
+    <td 
+        class="bz_short_desc_column">[backport] Regression: Convert line delimiter action enablement is broken
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b298826"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298826">298826</a>
+    <td class="first-child bz_id_column">
+      <a name="b331563"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331563">331563</a>
       <span style="display: none"></span>
     </td>
 
-    <td >getRequirements on a ResolverIU is incorrect
+    <td 
+        class="bz_short_desc_column">Backport: [Import/Export]  Import file system doesn't include the top folder you select
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b298828"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298828">298828</a>
+    <td class="first-child bz_id_column">
+      <a name="b331758"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331758">331758</a>
       <span style="display: none"></span>
     </td>
 
-    <td >UpdateQuery does not account for version properly
+    <td 
+        class="bz_short_desc_column">[backport] performance regression caused by fix in 298835
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b298879"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298879">298879</a>
+    <td class="first-child bz_id_column">
+      <a name="b331762"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331762">331762</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Graphics] Eclipse 2010 splash screen
+    <td 
+        class="bz_short_desc_column">[repository] Share StringPool for Composite Repositories
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b298894"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298894">298894</a>
+    <td class="first-child bz_id_column">
+      <a name="b332041"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332041">332041</a>
       <span style="display: none"></span>
     </td>
 
-    <td >IllegalArgumentException can occur during PackagePermission check
+    <td 
+        class="bz_short_desc_column">Backport bug 162079: [PropertiesView] Properties view should be a post selection listener
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299082"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299082">299082</a>
+    <td class="first-child bz_id_column">
+      <a name="b332095"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332095">332095</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Intro] label attribute of tag link doesn't substitute variables like $varName$
+    <td 
+        class="bz_short_desc_column">[query] Repository query takes a long time when deleting a lot of IUs (from dropins)
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_critical             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299094"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299094">299094</a>
+    <td class="first-child bz_id_column">
+      <a name="b332098"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332098">332098</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[Program] org.eclipse.swt.program.Program.launch() will add prefix "file://" before fileName
+    <td 
+        class="bz_short_desc_column">Metadata generator should not create mkdir/rmdir actions for reconciler bundle
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299290"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299290">299290</a>
+    <td class="first-child bz_id_column">
+      <a name="b332148"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332148">332148</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Bad memory performance with multiple p2.repo2runnable calls
+    <td 
+        class="bz_short_desc_column">[native] Don't fail install when rmdir cannot delete empty directory
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_enhancement             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299345"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299345">299345</a>
+    <td class="first-child bz_id_column">
+      <a name="b332637"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332637">332637</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[CommonNavigator] Move expanded HEAD CNF tests to 3.5.2
+    <td 
+        class="bz_short_desc_column">Dead Code detection removing code that isn't dead
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299373"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299373">299373</a>
+    <td class="first-child bz_id_column">
+      <a name="b332639"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332639">332639</a>
       <span style="display: none"></span>
     </td>
 
-    <td >several bundles in the 3.5.2 stream need to have their versions incremented
+    <td 
+        class="bz_short_desc_column">[backport] There are no changes for models  showing in the Synchronize view with Team > Merge operation.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299375"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299375">299375</a>
+    <td class="first-child bz_id_column">
+      <a name="b332640"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332640">332640</a>
       <span style="display: none"></span>
     </td>
 
-    <td >version of org.eclipse.core.resources.compatibility bundle in 3.5.2 stream needs to be updated
+    <td 
+        class="bz_short_desc_column">[backport] Team > Merge operation for project contains logical model always show no changes between two branches
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299381"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299381">299381</a>
+    <td class="first-child bz_id_column">
+      <a name="b332686"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332686">332686</a>
       <span style="display: none"></span>
     </td>
 
-    <td >change perf baselines to run with extssh vs pserver
+    <td 
+        class="bz_short_desc_column">[backport][Browser] Search for external browser in Preferences finds > 40 instances of firefox on Ubuntu 64bit, if started in /usr/bin
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299438"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299438">299438</a>
+    <td class="first-child bz_id_column">
+      <a name="b332709"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332709">332709</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[CommonNavigator] CNF viewer state non properly reset when NCEs are activated or deactivated
+    <td 
+        class="bz_short_desc_column">Use JNI add an  window callback function to Shell, function can not be called.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299551"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299551">299551</a>
+    <td class="first-child bz_id_column">
+      <a name="b333416"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333416">333416</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[publisher] Category not exported from update wizard with IBM 1.6 VM
+    <td 
+        class="bz_short_desc_column">[backport] Call to IResource.setEncoding() persists derived file's encoding setting in .settings\org.eclipse.core.resources.prefs
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299589"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299589">299589</a>
+    <td class="first-child bz_id_column">
+      <a name="b333493"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333493">333493</a>
       <span style="display: none"></span>
     </td>
 
-    <td >EventManager.EventThread.run holding excess memory
+    <td 
+        class="bz_short_desc_column">disposed widget exception when closing editor with Browser with Ctrl+F4
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299704"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299704">299704</a>
+    <td class="first-child bz_id_column">
+      <a name="b333576"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333576">333576</a>
       <span style="display: none"></span>
     </td>
 
-    <td >org.eclipse.pde.ds.core service version needs to be incremented in 3.5.2 stream builds
+    <td 
+        class="bz_short_desc_column">[jre] "JRE System Library" default not used properly after Java update
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b299705"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299705">299705</a>
+    <td class="first-child bz_id_column">
+      <a name="b333898"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333898">333898</a>
       <span style="display: none"></span>
     </td>
 
-    <td >service version of org.eclipse.pde.build needs to be incremented in 3.5.2 stream
+    <td 
+        class="bz_short_desc_column">[Preferences] [accessibility] Preferences Dialog menu button needs a tooltip
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b299706"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299706">299706</a>
+    <td class="first-child bz_id_column">
+      <a name="b334048"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334048">334048</a>
       <span style="display: none"></span>
     </td>
 
-    <td >[CommonNavigator] org.eclipse.ui.navigator bundle needs to be incremented in 3.5.2 stream
+    <td 
+        class="bz_short_desc_column">[3.6.2] Clicking on a checkbox in a CheckboxTreeViewer selects the row.
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_enhancement             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b300384"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300384">300384</a>
+    <td class="first-child bz_id_column">
+      <a name="b334160"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334160">334160</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Update copyright in Help > About
+    <td 
+        class="bz_short_desc_column">[reconciler] Provide mechanism for specifying multiple non-default drop-ins folders
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_major             bz_P3             bz_VERIFIED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b300439"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300439">300439</a>
+    <td class="first-child bz_id_column">
+      <a name="b334161"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334161">334161</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Tracker contains a println()
+    <td 
+        class="bz_short_desc_column">Eclipse crashes if link to PDF with anchor is clicked twice from Browser Widget
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
+             bz_normal             bz_P3             bz_CLOSED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b300579"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300579">300579</a>
+    <td class="first-child bz_id_column">
+      <a name="b334707"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334707">334707</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Filter does not allow !, | or & as first character of attr names
+    <td 
+        class="bz_short_desc_column">[discovery] Cache jars downloaded by RemoteBundleDiscoveryStrategy
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b301284"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301284">301284</a>
+    <td class="first-child bz_id_column">
+      <a name="b334725"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334725">334725</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Eclipse 3.5.2: readme_eclipse.html refers to a missing preference page: Help -> Help Server
+    <td 
+        class="bz_short_desc_column">Something whacky with the build ids
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b301719"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301719">301719</a>
+    <td class="first-child bz_id_column">
+      <a name="b334916"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334916">334916</a>
       <span style="display: none"></span>
     </td>
 
-    <td >update to Galielo Orbit SR2 build for 3.5.2
+    <td 
+        class="bz_short_desc_column">About text needs to be updated to 2011
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
-             bz_blocker             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
+             bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_even             ">
 
-    <td class="first-child">
-      <a name="b301827"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301827">301827</a>
+    <td class="first-child bz_id_column">
+      <a name="b334919"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334919">334919</a>
       <span style="display: none"></span>
     </td>
 
-    <td >Incorrect version number and copyright year About dialog
+    <td 
+        class="bz_short_desc_column">org.eclipse.equinox.p2.sdk feature version needs to be incremented in 3.6.2 stream
     </td>
 
   </tr>
 
-  
-
 
-  
 
   <tr class="bz_bugitem
              bz_normal             bz_P3             bz_RESOLVED             bz_FIXED                                       bz_row_odd             ">
 
-    <td class="first-child">
-      <a name="b302271"
-         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302271">302271</a>
+    <td class="first-child bz_id_column">
+      <a name="b334947"
+         href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334947">334947</a>
       <span style="display: none"></span>
     </td>
 
-    <td >org.eclipse.equinox.sdk needs to be tagged in 3.5.2 stream
+    <td 
+        class="bz_short_desc_column">swt bundles still have version 3.6.1 in 3.6.2 stream
     </td>
 
   </tr>
 
-  
-    </table>
-
-
-
-
-
-<span class="bz_result_count">149 bugs found.
-</span>
-
-<br>
-
-
-
-
-
-
-
-
-
-<p>
-
-
 
 
+</table>
 
-<br>
 
 
 
 
-<p>
+<span class="bz_result_count">115 bugs found.
+</span>
 
 
 
 
-  
 
-<hr>
-<p>Sun, Solaris, Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc.
+<hr/>
+<p>Sun, Solaris, Java and all Java-based trademarks are trademarks of Oracle Corporation.
 in the United States, other countries, or both.</p>
 <p>IBM is a trademark of International Business Machines Corporation in the
 United States, other countries, or both.</p>
@@ -4461,29 +3639,21 @@ U.S. and other countries.</p>
 Software Systems Ltd.</p>
 <p>Other company, product, and service names may be trademarks or service marks
 of others.</p>
-<p>(c) Copyright IBM Corp. and others 2010</p>
+<p>(c) Copyright IBM Corp. and others 2009, 2010</p>
 
 <h2><a name="Appendix1">Appendix 1: Execution Environment by Bundle</a></h2>
 
-<p>In the table below, the "3.5 minimum execution environment"
+<p>In the table below, the "3.6 minimum execution environment"
   column indicates the minimum Java class library requirements of each bundle
-  for the 3.5 release, where the value is one of:</p>
-  <table border="0" width="90%">
-   <tbody>
+  for the 3.6 release, where the value is one of:</p>
+<table border="0" width="90%">
+  <tbody>
     <tr>
+
       <td align="center"><b>Entry</b></td>
       <td align="left"><b>Meaning</b></td>
     </tr>
     <tr>
-      <td width="9%">
-      <div align="center"><strong>M1.1</strong></div>
-      </td>
-      <td width="91%">OSGi Minimum Execution Environment 1.1 - This is a
-      subset of the J2ME Foundation class libraries defined by OSGi to
-      be the base for framework implementations. See the OSGi
-      specification for more details.</td>
-    </tr>
-    <tr>
       <td><div align="center"><strong>F1.0</strong></div></td>
       <td>J2ME Foundation 1.0 - indicates that the bundle can only be run on
         Foundation 1.0 or greater. Note that with the exception of some MicroEdition
@@ -4500,7 +3670,6 @@ of others.</p>
       <td>J2SE 1.3 - indicates that the bundle can only be run on JSE 1.3 or
         greater.</td>
     </tr>
-
     <tr>
       <td><div align="center"><strong>1.4</strong></div></td>
       <td>J2SE 1.4 - indicates that the bundle can only be run on JSE 1.4 or
@@ -4519,22 +3688,20 @@ of others.</p>
     </tr>
     <tr>
       <td align="center"><b>n/a</b></td>
-      <td>Not applicable. For example the bundle does not contain Java code.</td>
+      <td>Unknown at the time of this revision.</td>
     </tr>
   </tbody>
 </table>
-<br>
-<b>Table of minimum execution environments by bundle.</b><br>
+
+<p><b>Table of minimum execution environments by bundle.</b> (See also the
+  <a href="http://www.eclipse.org/projects/project-plan.php?projectid=rt.equinox#appendix">Equinox Project plan</a>
+  for the execution environment requirements of bundles contributed via that project.)</p>
+
 <table border="1">
   <tbody>
     <tr>
       <td width="290"><strong>Bundle</strong></td>
-      <td width="60"><div align="center">
-          <p align="center"><b>3.5<br>
-            minimum<br>
-            execution<br>
-            environment </b></p>
-        </div></td>
+      <td width="60"><div align="center"><p align="center"><b>3.6<br/>minimum<br/>execution<br/>environment</b></p></div></td>
     </tr>
     <tr>
       <td>aa.compute.bundle.ee</td>
@@ -4562,7 +3729,7 @@ of others.</p>
     </tr>
     <tr>
       <td>org.apache.commons.codec</td>
-      <td><div align="center">not specified</div></td>
+      <td><div align="center">F1.0</div></td>
     </tr>
     <tr>
       <td>org.apache.commons.el</td>
@@ -4593,6 +3760,10 @@ of others.</p>
       <td><div align="center">1.4</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.ant.launching</td>
+      <td><div align="center">1.4</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.ant.ui</td>
       <td><div align="center">1.4</div></td>
     </tr>
@@ -4641,6 +3812,10 @@ of others.</p>
       <td><div align="center">F1.0</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.core.externaltools</td>
+      <td><div align="center">1.4</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.core.filebuffers</td>
       <td><div align="center">1.4</div></td>
     </tr>
@@ -4669,10 +3844,6 @@ of others.</p>
       <td><div align="center">1.4</div></td>
     </tr>
     <tr>
-      <td>org.eclipse.core.resources.compatibility</td>
-      <td><div align="center">1.4</div></td>
-    </tr>
-    <tr>
       <td>org.eclipse.core.resources.win32.x86</td>
       <td><div align="center">not specified</div></td>
     </tr>
@@ -4757,6 +3928,10 @@ of others.</p>
       <td><div align="center">M1.2</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.equinox.event</td>
+      <td><div align="center">M1.1</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.equinox.frameworkadmin</td>
       <td><div align="center">F1.1</div></td>
     </tr>
@@ -4786,7 +3961,7 @@ of others.</p>
     </tr>
     <tr>
       <td>org.eclipse.equinox.launcher</td>
-      <td><div align="center">F1.0</div></td>
+      <td><div align="center">M1.2</div></td>
     </tr>
     <tr>
       <td>org.eclipse.equinox.launcher.win32.win32.x86</td>
@@ -4821,10 +3996,6 @@ of others.</p>
       <td><div align="center">F1.1</div></td>
     </tr>
     <tr>
-      <td>org.eclipse.equinox.p2.exemplarysetup</td>
-      <td><div align="center">F1.1</div></td>
-    </tr>
-    <tr>
       <td>org.eclipse.equinox.p2.extensionlocation</td>
       <td><div align="center">F1.1</div></td>
     </tr>
@@ -4849,10 +4020,18 @@ of others.</p>
       <td><div align="center">F1.1</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.equinox.p2.operations</td>
+      <td><div align="center">F1.1</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.equinox.p2.publisher</td>
       <td><div align="center">F1.1</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.equinox.p2.ql</td>
+      <td><div align="center">F1.1</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.equinox.p2.reconciler.dropins</td>
       <td><div align="center">F1.1</div></td>
     </tr>
@@ -4997,6 +4176,10 @@ of others.</p>
       <td><div align="center">1.4</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.jdt.junit.core</td>
+      <td><div align="center">1.4</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.jdt.junit.runtime</td>
       <td><div align="center">1.3</div></td>
     </tr>
@@ -5089,6 +4272,10 @@ of others.</p>
       <td><div align="center">1.4</div></td>
     </tr>
     <tr>
+      <td>org.eclipse.pde.launching</td>
+      <td><div align="center">1.4</div></td>
+    </tr>
+    <tr>
       <td>org.eclipse.pde.runtime</td>
       <td><div align="center">1.4</div></td>
     </tr>
@@ -5149,10 +4336,6 @@ of others.</p>
       <td><div align="center">1.4</div></td>
     </tr>
     <tr>
-      <td>org.eclipse.team.cvs.ssh</td>
-      <td><div align="center">1.4</div></td>
-    </tr>
-    <tr>
       <td>org.eclipse.team.cvs.ssh2</td>
       <td><div align="center">1.4</div></td>
     </tr>
@@ -5308,9 +4491,8 @@ of others.</p>
       <td>org.sat4j.pb</td>
       <td><div align="center">1.4</div></td>
     </tr>
-  </tbody>
+    </tbody>
 </table>
 
 </body>
-</html>
-
+</html>
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/build.properties b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/build.properties
index f20363e..fc2a706 100644
--- a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/build.properties
+++ b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/build.properties
@@ -15,10 +15,10 @@ feature.xml,\
 feature.properties,\
 license.html
 
-generate.feature at org.eclipse.rcp.source=org.eclipse.rcp,plugin at com.ibm.icu.source;version=4.0.1.qualifier;unpack="false"
+generate.feature at org.eclipse.rcp.source=org.eclipse.rcp,plugin at com.ibm.icu.source;version=4.2.1.qualifier;unpack="false"
 generate.feature at org.eclipse.equinox.p2.user.ui.source=org.eclipse.equinox.p2.user.ui,\
 	   plugin at org.eclipse.ecf.source;version=3.0.0.qualifier;unpack="false",\
-	   plugin at org.eclipse.ecf.ssl.source;version=1.0.0.qualifier;unpack="false",\
+	   plugin at org.eclipse.ecf.ssl.source;version=1.0.100.qualifier;unpack="false",\
 	   plugin at org.eclipse.ecf.identity.source;version=3.0.0.qualifier;unpack="false",\
 	   plugin at org.eclipse.ecf.filetransfer.source;version=3.0.0.qualifier;unpack="false",\
 	   plugin at org.eclipse.ecf.provider.filetransfer.source;version=3.0.0.qualifier;unpack="false",\
diff --git a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/feature.properties
index 57b9627..8a1eab2 100644
--- a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/feature.properties
@@ -23,12 +23,15 @@ providerName=Eclipse.org
 # "updateSiteName" property - label for the update site
 updateSiteName=The Eclipse Project Updates
 
+# "secondarySiteName" property - label for the update site
+secondaryUpdateSiteName=Helios Discovery Site
+
 # "description" property - description of the feature
 description=Common OS-independent API documentation and source code zips for the Eclipse Platform.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2010 IBM Corporation and others.\n\
+Copyright (c) 2000, 2009 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -45,8 +48,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +57,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +97,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.platform/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.platform/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.platform/sourceTemplatePlugin/about.properties b/eclipse/features/org.eclipse.platform/sourceTemplatePlugin/about.properties
index 1af37f6..7e7d3a3 100644
--- a/eclipse/features/org.eclipse.platform/sourceTemplatePlugin/about.properties
+++ b/eclipse/features/org.eclipse.platform/sourceTemplatePlugin/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,6 +21,6 @@ blurb=Eclipse Platform Plug-in Developer Resources\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/platform
 
diff --git a/eclipse/features/org.eclipse.rcp/feature.properties b/eclipse/features/org.eclipse.rcp/feature.properties
index c7cf55d..ddf35f4 100644
--- a/eclipse/features/org.eclipse.rcp/feature.properties
+++ b/eclipse/features/org.eclipse.rcp/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ description=Rich Client Platform
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2009 IBM Corporation and others.\n\
+Copyright (c) 2000, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.rcp/feature.xml b/eclipse/features/org.eclipse.rcp/feature.xml
index 3f34bcd..9c30767 100644
--- a/eclipse/features/org.eclipse.rcp/feature.xml
+++ b/eclipse/features/org.eclipse.rcp/feature.xml
@@ -1,8 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
+<?xml version="1.0" encoding="UTF-8"?>
<feature
       id="org.eclipse.rcp"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName"
       plugin="org.eclipse.rcp"
       image="eclipse_update_120.jpg">
@@ -206,17 +205,6 @@
          unpack="false"/>
 
    <plugin
-         id="org.eclipse.swt.wpf.win32.x86"
-         os="win32"
-         ws="wpf"
-         arch="x86"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
-
-   <plugin
          id="org.eclipse.swt.gtk.linux.x86"
          os="linux"
          ws="gtk"
@@ -226,23 +214,23 @@
          version="0.0.0"
          fragment="true"
          unpack="false"/>
-
-   <plugin
-         id="org.eclipse.swt.gtk.linux.s390"
+         
+    <plugin
+         id="org.eclipse.swt.gtk.linux.s390x"
          os="linux"
          ws="gtk"
-         arch="s390"
+         arch="s390x"
          download-size="0"
          install-size="0"
          version="0.0.0"
          fragment="true"
          unpack="false"/>
-
-   <plugin
-         id="org.eclipse.swt.gtk.linux.s390x"
+         
+    <plugin
+         id="org.eclipse.swt.gtk.linux.s390"
          os="linux"
          ws="gtk"
-         arch="s390x"
+         arch="s390"
          download-size="0"
          install-size="0"
          version="0.0.0"
@@ -281,6 +269,17 @@
          version="0.0.0"
          fragment="true"
          unpack="false"/>
+         
+   <plugin
+         id="org.eclipse.swt.gtk.linux.ppc64"
+         os="linux"
+         ws="gtk"
+         arch="ppc64"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"
+         unpack="false"/>
 
    <plugin
          id="org.eclipse.swt.gtk.linux.x86_64"
@@ -357,18 +356,7 @@
          install-size="0"
          version="0.0.0"
          fragment="true"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.swt.motif.hpux.PA_RISC"
-         os="hpux"
-         ws="motif"
-         arch="PA_RISC"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
+         unpack="false"/>
         
    <plugin
         id="org.eclipse.swt.gtk.aix.ppc64"
         os="aix"
         ws="gtk"
         arch="ppc64"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"
         unpack="false"/>
 
    <plugin
          id="org.eclipse.swt.motif.hpux.ia64_32"
@@ -556,22 +544,23 @@
          install-size="0"
          version="0.0.0"
          fragment="true"/>
-
+         
    <plugin
-         id="org.eclipse.equinox.launcher.gtk.linux.x86"
+         id="org.eclipse.equinox.launcher.gtk.linux.ppc64"
          os="linux"
          ws="gtk"
-         arch="x86"
+         arch="ppc64"
          download-size="0"
          install-size="0"
          version="0.0.0"
          fragment="true"/>
+         
 
    <plugin
-         id="org.eclipse.equinox.launcher.gtk.linux.s390"
+         id="org.eclipse.equinox.launcher.gtk.linux.x86"
          os="linux"
          ws="gtk"
-         arch="s390"
+         arch="x86"
          download-size="0"
          install-size="0"
          version="0.0.0"
@@ -586,6 +575,16 @@
          install-size="0"
          version="0.0.0"
          fragment="true"/>
+         
+   <plugin
+         id="org.eclipse.equinox.launcher.gtk.linux.s390"
+         os="linux"
+         ws="gtk"
+         arch="s390"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         fragment="true"/>
 
    <plugin
          id="org.eclipse.equinox.launcher.motif.linux.x86"
@@ -616,7 +615,7 @@
          install-size="0"
          version="0.0.0"
          fragment="true"/>
-
+
 <plugin
         id="org.eclipse.equinox.launcher.gtk.aix.ppc64"
         os="aix"
         ws="gtk"
         arch="ppc64"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"/>
    <plugin
          id="org.eclipse.equinox.launcher.motif.hpux.ia64_32"
          os="hpux"
@@ -625,28 +624,8 @@
          download-size="0"
          install-size="0"
          version="0.0.0"
-         fragment="true"/>
-
-   <plugin
-         id="org.eclipse.equinox.launcher.motif.hpux.PA_RISC"
-         os="hpux"
-         ws="motif"
-         arch="PA_RISC"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"/>
-
-   <plugin
-         id="org.eclipse.equinox.launcher.wpf.win32.x86"
-         os="win32"
-         ws="wpf"
-         arch="x86"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"/>
-
+         fragment="true"/>  
+ 
    <plugin
          id="org.eclipse.equinox.launcher.win32.win32.x86"
          os="win32"
diff --git a/eclipse/features/org.eclipse.rcp/license.html b/eclipse/features/org.eclipse.rcp/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.rcp/license.html
+++ b/eclipse/features/org.eclipse.rcp/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/feature.properties b/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/feature.properties
index c025369..3e2d556 100644
--- a/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/feature.properties
+++ b/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/license.html b/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/license.html
+++ b/eclipse/features/org.eclipse.rcp/sourceTemplateFeature/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.releng.tools/feature.properties b/eclipse/features/org.eclipse.releng.tools/feature.properties
index 9b1f4c2..642b24c 100644
--- a/eclipse/features/org.eclipse.releng.tools/feature.properties
+++ b/eclipse/features/org.eclipse.releng.tools/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ description=Eclipse Releng Tools
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2009 IBM Corporation and others.\n\
+Copyright (c) 2000, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -45,8 +45,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -54,42 +54,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -98,47 +94,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.releng.tools/license.html b/eclipse/features/org.eclipse.releng.tools/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.releng.tools/license.html
+++ b/eclipse/features/org.eclipse.releng.tools/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/features/org.eclipse.sdk/build.properties b/eclipse/features/org.eclipse.sdk/build.properties
index a2bbd83..910df08 100644
--- a/eclipse/features/org.eclipse.sdk/build.properties
+++ b/eclipse/features/org.eclipse.sdk/build.properties
@@ -17,9 +17,10 @@ generate.feature at org.eclipse.platform.source=org.eclipse.platform,feature at org.ec
    
 generate.feature at org.eclipse.jdt.source=org.eclipse.jdt, plugin at org.eclipse.jdt.doc.isv;unpack="false",\
 plugin at org.junit.source;version=3.8.2.qualifier;unpack="false",\
+plugin at org.junit.source;version=4.8.1.qualifier;unpack="false",\
 plugin at org.hamcrest.core.source;version=1.1.0.qualifier;unpack="false",\
 exclude at org.eclipse.jdt.doc.user
-generate.feature at org.eclipse.pde.source=org.eclipse.pde,plugin at org.objectweb.asm.source;version=3.1.0.qualifier;unpack="false",\exclude at org.eclipse.pde.doc.user
+generate.feature at org.eclipse.pde.source=org.eclipse.pde,plugin at org.objectweb.asm.source;version=3.2.0.qualifier;unpack="false",\exclude at org.eclipse.pde.doc.user
 generate.feature at org.eclipse.pde.p2.source=org.eclipse.pde.p2
 generate.feature at org.eclipse.cvs.source=org.eclipse.cvs
 generate.feature at org.eclipse.help.source=org.eclipse.help,\
@@ -30,7 +31,7 @@ generate.feature at org.eclipse.help.source=org.eclipse.help,\
   plugin at org.apache.commons.logging.source;version=1.0.4.qualifier;unpack="false",\
   plugin at org.apache.lucene.source;version=1.9.1.qualifier;unpack="false",\
   plugin at org.apache.lucene.analysis.source;version=1.9.1.qualifier;unpack="false",\
-  plugin at org.mortbay.jetty.util.source;version=6.1.15.qualifier;unpack="false",\
-  plugin at org.mortbay.jetty.server.source;version=6.1.15.qualifier;unpack="false"
+  plugin at org.mortbay.jetty.util.source;version=6.1.23.qualifier;unpack="false",\
+  plugin at org.mortbay.jetty.server.source;version=6.1.23.qualifier;unpack="false"
 
 generatedVersionLength=45
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.sdk/feature.properties b/eclipse/features/org.eclipse.sdk/feature.properties
index 4cb5fd4..84d8533 100644
--- a/eclipse/features/org.eclipse.sdk/feature.properties
+++ b/eclipse/features/org.eclipse.sdk/feature.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -24,14 +24,14 @@ providerName=Eclipse.org
 updateSiteName=The Eclipse Project Updates
 
 # "secondarySiteName" property - label for the secondary update site
-secondaryUpdateSiteName=Galileo Discovery Site
+secondaryUpdateSiteName=Helios Discovery Site
 
 # "description" property - description of the feature
 description=SDK for Eclipse.
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2000, 2009 IBM Corporation and others.\n\
+Copyright (c) 2000, 2010 IBM Corporation and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
@@ -48,8 +48,8 @@ licenseURL=license.html
 # "license" property - text of the "Feature Update License"
 # should be plain text version of license agreement pointed to be "licenseURL"
 license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
+Eclipse Foundation Software User Agreement\n\
+April 14, 2010\n\
 \n\
 Usage Of Content\n\
 \n\
@@ -57,42 +57,38 @@ THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/
 OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
 USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
 AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
 AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
 AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
 TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
 OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
 BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
 \n\
 Applicable Licenses\n\
 \n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
 For purposes of the EPL, "Program" will mean the Content.\n\
 \n\
 Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
 as downloadable archives ("Downloads").\n\
 \n\
-   - Content may be structured and packaged into modules to facilitate delivering,\n\
-     extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-     plug-in fragments ("Fragments"), and features ("Features").\n\
-   - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
-     in a directory named "plugins".\n\
-   - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-     Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-     Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-     numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-   - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-     named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
+       - Content may be structured and packaged into modules to facilitate delivering,\n\
+         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+         plug-in fragments ("Fragments"), and features ("Features").\n\
+       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+         in a directory named "plugins".\n\
+       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
+         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
 \n\
 The terms and conditions governing Plug-ins and Fragments should be\n\
 contained in files named "about.html" ("Abouts"). The terms and\n\
@@ -101,47 +97,77 @@ in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
 Licenses may be located in any directory of a Download or Module\n\
 including, but not limited to the following locations:\n\
 \n\
-   - The top-level (root) directory\n\
-   - Plug-in and Fragment directories\n\
-   - Inside Plug-ins and Fragments packaged as JARs\n\
-   - Sub-directories of the directory named "src" of certain Plug-ins\n\
-   - Feature directories\n\
+       - The top-level (root) directory\n\
+       - Plug-in and Fragment directories\n\
+       - Inside Plug-ins and Fragments packaged as JARs\n\
+       - Sub-directories of the directory named "src" of certain Plug-ins\n\
+       - Feature directories\n\
 \n\
 Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
 Included Features, the Feature Update License should either provide you\n\
 with the terms and conditions governing the Included Features or inform\n\
 you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
 \n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
 TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
 SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
 \n\
-    - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-    - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-    - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-    - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
-    - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
-    - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+       - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
+       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
 \n\
 IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
 is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
 govern that particular Content.\n\
 \n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+          extending or updating the functionality of an Eclipse-based product.\n\
+       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+          with the Specification. Such Installable Software Agreement must inform the user of the\n\
+          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+          indication of agreement by the user, the provisioning Technology will complete installation\n\
+          of the Installable Software.\n\
+\n\
 Cryptography\n\
 \n\
 Content may contain encryption software. The country in which you are\n\
 currently may have restrictions on the import, possession, and use,\n\
 and/or re-export to another country, of encryption software. BEFORE\n\
 using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
 \n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
\ No newline at end of file
diff --git a/eclipse/features/org.eclipse.sdk/feature.xml b/eclipse/features/org.eclipse.sdk/feature.xml
index 9f3c0d8..f954c4a 100644
--- a/eclipse/features/org.eclipse.sdk/feature.xml
+++ b/eclipse/features/org.eclipse.sdk/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.sdk"
       label="%featureName"
-      version="3.5.2.qualifier"
+      version="3.6.2.qualifier"
       provider-name="%providerName"
       image="eclipse_update_120.jpg">
 
@@ -19,9 +19,9 @@
    </license>
 
    <url>
-      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.5"/>
-      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/galileo"/>
+      <update label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%updateSiteName" url="http://download.eclipse.org/eclipse/updates/3.6"/>
+      <discovery label="%secondaryUpdateSiteName" url="http://download.eclipse.org/releases/helios"/>
    </url>
 
    <includes
@@ -54,16 +54,16 @@
 
    <includes
          id="org.eclipse.pde.source"
-         version="0.0.0"/>
-
+         version="0.0.0"/> 
+ 
    <includes
          id="org.eclipse.help"
          version="0.0.0"/>
-
+         
    <includes
          id="org.eclipse.help.source"
          version="0.0.0"/>
-
+ 
    <plugin
          id="org.eclipse.sdk"
          download-size="0"
diff --git a/eclipse/features/org.eclipse.sdk/license.html b/eclipse/features/org.eclipse.sdk/license.html
index c6af966..c184ca3 100644
--- a/eclipse/features/org.eclipse.sdk/license.html
+++ b/eclipse/features/org.eclipse.sdk/license.html
@@ -1,13 +1,14 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
 </head>
 
-<body lang="EN-US" link=blue vlink=purple>
+<body lang="EN-US">
 <h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
+<p>April 14, 2010</p>
 
 <h3>Usage Of Content</h3>
 
@@ -17,37 +18,37 @@
    OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
    NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
    CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-   
-<h3>Applicable Licenses</h3>   
-   
+
+<h3>Applicable Licenses</h3>
+
 <p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
    ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
    For purposes of the EPL, "Program" will mean the Content.</p>
 
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
-   modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-   
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
 <ul>
-	<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-	<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-	<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
       and/or Fragments associated with that Feature.</li>
-	<li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>   
- 
+       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
 <p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
 Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
 including, but not limited to the following locations:</p>
 
 <ul>
-	<li>The top-level (root) directory</li>
-	<li>Plug-in and Fragment directories</li>
-	<li>Inside Plug-ins and Fragments packaged as JARs</li>
-	<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-	<li>Feature directories</li>
+       <li>The top-level (root) directory</li>
+       <li>Plug-in and Fragment directories</li>
+       <li>Inside Plug-ins and Fragments packaged as JARs</li>
+       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+       <li>Feature directories</li>
 </ul>
-		
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
 installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
 inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
 Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
@@ -57,23 +58,50 @@ that directory.</p>
 OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
 
 <ul>
-	<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-	<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-	<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-	<li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>	
-	<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-	<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
 </ul>
 
 <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
 contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
 
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
+   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
+   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+   ("Specification").</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
+       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
+       product.</li>
+       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+       accessed and copied to the Target Machine.</li>
+       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
+       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
 <h3>Cryptography</h3>
 
 <p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
    another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
    possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-   
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>   
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
 </body>
 </html>
diff --git a/eclipse/label.properties b/eclipse/label.properties
index bb94cc8..7b78f16 100644
--- a/eclipse/label.properties
+++ b/eclipse/label.properties
@@ -1,6 +1,6 @@
 
-			timestamp=20100308-1221
+			timestamp=20110308-1405
 			buildType=I
-			buildId=I20100308-1221
-			buildLabel=I20100308-1221
+			buildId=I20110308-1405
+			buildLabel=I20110308-1405
 		
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/ant.map b/eclipse/maps/org.eclipse.releng/maps/ant.map
index 50847f9..4e55039 100644
--- a/eclipse/maps/org.eclipse.releng/maps/ant.map
+++ b/eclipse/maps/org.eclipse.releng/maps/ant.map
@@ -1,11 +1,13 @@
 !***************  ANT CONTRIBUTION  ******************************************************** 
 
 #plugin at org.apache.ant=v20070416,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ant.core=v20091110_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.core=v20110203_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.launching=v20101020_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ant.ui=v20091204_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.ui=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.externaltools=v20090504,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.externaltools=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.externaltools=v20100831_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ant.tests.core=v20091110_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ant.tests.ui=v20090504,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.ant.tests.core=v20091214,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ant.tests.ui=v20100602-1000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/base.map b/eclipse/maps/org.eclipse.releng/maps/base.map
deleted file mode 100644
index e6cfba8..0000000
--- a/eclipse/maps/org.eclipse.releng/maps/base.map
+++ /dev/null
@@ -1,8 +0,0 @@
-! map file used as input to custom Ant task <fetch.base> implemented in org.eclipse.releng.basebuilder.
-! Generates a fetch script which populates a baseLocation with prebuilt plug-ins or features.
-
-#base.plugin at com.ibm.icu=v20070123,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu_3.6.0.20061215.jar
-#base.plugin at com.ibm.icu.source=v20070123,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.source_3.6.0.20061215
-
-#base.plugin at com.ibm.icu.base=v20070123,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.base_3.6.0.20061215.jar
-#base.plugin at com.ibm.icu.base.source=v20070123,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/com.ibm.icu/com.ibm.icu.base.source_3.6.0.20061215
diff --git a/eclipse/maps/org.eclipse.releng/maps/compare.map b/eclipse/maps/org.eclipse.releng/maps/compare.map
index 32e286a..3257354 100644
--- a/eclipse/maps/org.eclipse.releng/maps/compare.map
+++ b/eclipse/maps/org.eclipse.releng/maps/compare.map
@@ -1,10 +1,10 @@
 !***************  COMPARE CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.compare=r35x_20100113-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare
-plugin at org.eclipse.compare.core=I20090430-0408,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.core
-plugin at org.eclipse.compare.win32=I20090430-0408,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.win32
+plugin at org.eclipse.compare=R36x_v20100929-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare
+plugin at org.eclipse.compare.core=R36x_v20100929-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.core
+plugin at org.eclipse.compare.win32=R36x_v20101103-0618,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.compare/plugins/org.eclipse.compare.win32
 
-plugin at org.eclipse.compare.examples=v20060606,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.compare.examples.xml=I20080604,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.compare.examples=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.compare.examples.xml=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.compare.tests=I20090527-0620,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.compare.tests=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/core-hpux.map b/eclipse/maps/org.eclipse.releng/maps/core-hpux.map
index 71ca549..b077860 100644
--- a/eclipse/maps/org.eclipse.releng/maps/core-hpux.map
+++ b/eclipse/maps/org.eclipse.releng/maps/core-hpux.map
@@ -1,4 +1,3 @@
 !***************  CORE (HP-UX) CONTRIBUTION  ************************************************ 
 
-fragment at org.eclipse.core.filesystem.hpux.ia64_32=v20080604-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.hpux.PA_RISC=v20080604-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+fragment at org.eclipse.core.filesystem.hpux.ia64_32=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/core-macosx.map b/eclipse/maps/org.eclipse.releng/maps/core-macosx.map
index 371f106..2c24c98 100644
--- a/eclipse/maps/org.eclipse.releng/maps/core-macosx.map
+++ b/eclipse/maps/org.eclipse.releng/maps/core-macosx.map
@@ -1,3 +1,3 @@
 !***************  CORE (MacOSX) CONTRIBUTION  ************************************************ 
 
-fragment at org.eclipse.core.filesystem.macosx=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+fragment at org.eclipse.core.filesystem.macosx=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/core-qnx.map b/eclipse/maps/org.eclipse.releng/maps/core-qnx.map
deleted file mode 100644
index cbbda03..0000000
--- a/eclipse/maps/org.eclipse.releng/maps/core-qnx.map
+++ /dev/null
@@ -1,3 +0,0 @@
-!***************  CORE (QNX) CONTRIBUTION  *************************************************** 
-
-fragment at org.eclipse.core.filesystem.qnx.x86=v20080604-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/core-variables.map b/eclipse/maps/org.eclipse.releng/maps/core-variables.map
index 673ab35..a4a4aff 100644
--- a/eclipse/maps/org.eclipse.releng/maps/core-variables.map
+++ b/eclipse/maps/org.eclipse.releng/maps/core-variables.map
@@ -1,3 +1,3 @@
 !***************  CORE VARIABLES CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.core.variables=v20090521,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.core.variables=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/core.map b/eclipse/maps/org.eclipse.releng/maps/core.map
index 36c454c..d7ddfa4 100644
--- a/eclipse/maps/org.eclipse.releng/maps/core.map
+++ b/eclipse/maps/org.eclipse.releng/maps/core.map
@@ -1,117 +1,126 @@
 !***************  CORE CONTRIBUTION  ******************************************************** 
 
 !**** OSGi
-plugin at org.eclipse.osgi=R35x_v20100126,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi
-plugin at org.eclipse.osgi.services=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.services
-plugin at org.eclipse.osgi.util=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.util
+plugin at org.eclipse.osgi=R36x_v20110210,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi
+plugin at org.eclipse.osgi.services=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.services
+plugin at org.eclipse.osgi.util=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.util
 
 !**** Equinox
-plugin at org.eclipse.equinox.common=R35x_v20090807-1100,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.common
-plugin at org.eclipse.equinox.preferences=R35x_v20091117,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences
-plugin at org.eclipse.equinox.registry=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry
-plugin at org.eclipse.equinox.supplement=v20090518,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi/supplement
-plugin at org.eclipse.equinox.app=R35x_v20091203,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app
-plugin at org.eclipse.equinox.device=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.device
-plugin at org.eclipse.equinox.event=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.event
-plugin at org.eclipse.equinox.http=R35x_v20090728,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http
-plugin at org.eclipse.equinox.log=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.log
-plugin at org.eclipse.equinox.metatype=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.metatype
-plugin at org.eclipse.equinox.useradmin=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.useradmin
-plugin at org.eclipse.equinox.http.jetty,2.0.0=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6
-plugin at org.eclipse.equinox.http.jetty,1.1.100=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty5
-plugin at org.eclipse.equinox.http.servlet=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet
-plugin at org.eclipse.equinox.http.servletbridge=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge
-plugin at org.eclipse.equinox.http.registry=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.registry
-plugin at org.eclipse.equinox.servletbridge=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge
-bundle at org.eclipse.equinox.jsp.jasper=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper
-bundle at org.eclipse.equinox.jsp.jasper.registry=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper.registry
-plugin at org.eclipse.equinox.cm=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm
-plugin at org.eclipse.equinox.concurrent=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent
+plugin at org.eclipse.equinox.common=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.common
+plugin at org.eclipse.equinox.preferences=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences
+plugin at org.eclipse.equinox.registry=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry
+plugin at org.eclipse.equinox.supplement=R36x_v20101021,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi/supplement
+plugin at org.eclipse.equinox.app=R36x_v20100803,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app
+plugin at org.eclipse.equinox.device=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.device
+plugin at org.eclipse.equinox.event=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.event
+plugin at org.eclipse.equinox.http=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http
+plugin at org.eclipse.equinox.log=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.log
+plugin at org.eclipse.equinox.metatype=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.metatype
+plugin at org.eclipse.equinox.useradmin=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.useradmin
+plugin at org.eclipse.equinox.http.jetty,2.0.0=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6
+plugin at org.eclipse.equinox.http.jetty,1.1.100=v20100519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty5
+plugin at org.eclipse.equinox.http.servlet=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet
+plugin at org.eclipse.equinox.http.servletbridge=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge
+plugin at org.eclipse.equinox.http.registry=R36x_v20101103,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.registry
+plugin at org.eclipse.equinox.servletbridge=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge
+fragment at org.eclipse.equinox.servletbridge.extensionbundle=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge.extensionbundle
+bundle at org.eclipse.equinox.jsp.jasper=R36x_v20101103,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper
+bundle at org.eclipse.equinox.jsp.jasper.registry=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper.registry
+plugin at org.eclipse.equinox.cm=v20100520,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm
+plugin at org.eclipse.equinox.concurrent=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent
 
 !**** Prosyst Contributions
-plugin at org.eclipse.equinox.ds=R35x_v20090806,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds
-plugin at org.eclipse.equinox.io=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.io
-plugin at org.eclipse.equinox.ip=R35x_v20090803,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ip
-plugin at org.eclipse.equinox.util=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util
-plugin at org.eclipse.equinox.wireadmin=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.wireadmin
+plugin at org.eclipse.equinox.ds=R36x_v20100803,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds
+plugin at org.eclipse.equinox.io=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.io
+plugin at org.eclipse.equinox.ip=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ip
+plugin at org.eclipse.equinox.util=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util
+plugin at org.eclipse.equinox.wireadmin=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.wireadmin
 
 !**** Security Contributions
-plugin at org.eclipse.equinox.security=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security
+plugin at org.eclipse.equinox.security=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security
 plugin at org.eclipse.equinox.security.tests=v20080722-0430,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.tests
-plugin at org.eclipse.equinox.security.ui=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.ui
-fragment at org.eclipse.equinox.security.win32.x86=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.win32.x86
-fragment at org.eclipse.equinox.security.macosx=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.macosx
+plugin at org.eclipse.equinox.security.ui=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.ui
+fragment at org.eclipse.equinox.security.win32.x86=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.win32.x86
+fragment at org.eclipse.equinox.security.macosx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.macosx
+
 !**** Transforms
-plugin at org.eclipse.equinox.transforms.xslt=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.xslt
-fragment at org.eclipse.equinox.transforms.hook=v20090520-1800,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.hook
+plugin at org.eclipse.equinox.transforms.xslt=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.xslt
+fragment at org.eclipse.equinox.transforms.hook=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.hook
 
+!**** Weaving
+plugin at org.eclipse.equinox.weaving.aspectj=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.aspectj
+plugin at org.eclipse.equinox.weaving.caching=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching
+plugin at org.eclipse.equinox.weaving.caching.j9=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching.j9
+fragment at org.eclipse.equinox.weaving.hook=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.hook
 
 !****launcher, startup.jar
-plugin at org.eclipse.equinox.launcher=R35x_v20090715,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher
-fragment at org.eclipse.equinox.launcher.win32.win32.x86=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86
-fragment at org.eclipse.equinox.launcher.win32.win32.x86_64=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64
-fragment at org.eclipse.equinox.launcher.win32.win32.ia64=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64
-fragment at org.eclipse.equinox.launcher.wpf.win32.x86=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86
-fragment at org.eclipse.equinox.launcher.carbon.macosx=v20090520-1835,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx
-fragment at org.eclipse.equinox.launcher.cocoa.macosx=R35x_v20090707,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx
-fragment at org.eclipse.equinox.launcher.cocoa.macosx.x86_64=R35x_v20090707,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64
-fragment at org.eclipse.equinox.launcher.gtk.linux.x86=v20090520,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86
-fragment at org.eclipse.equinox.launcher.gtk.linux.x86_64=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64
-fragment at org.eclipse.equinox.launcher.gtk.linux.ppc=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc
-fragment at org.eclipse.equinox.launcher.motif.hpux.PA_RISC=v20090306-1900,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC
-fragment at org.eclipse.equinox.launcher.motif.hpux.ia64_32=v20090519,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32
-fragment at org.eclipse.equinox.launcher.motif.aix.ppc=R35x_v20091211,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc
-fragment at org.eclipse.equinox.launcher.motif.linux.x86=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86
-fragment at org.eclipse.equinox.launcher.gtk.solaris.sparc=R35x_v20090720,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc
+plugin at org.eclipse.equinox.launcher=R36x_v20101122_1400,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher
+fragment at org.eclipse.equinox.launcher.win32.win32.x86=R36x_v20101222,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86
+fragment at org.eclipse.equinox.launcher.win32.win32.x86_64=R36x_v20101222,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64
+fragment at org.eclipse.equinox.launcher.win32.win32.ia64=R36x_v20101222,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64
+fragment at org.eclipse.equinox.launcher.wpf.win32.x86=R36x_v20101222,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86
+fragment at org.eclipse.equinox.launcher.carbon.macosx=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx
+fragment at org.eclipse.equinox.launcher.cocoa.macosx=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx
+fragment at org.eclipse.equinox.launcher.cocoa.macosx.x86_64=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64
+fragment at org.eclipse.equinox.launcher.gtk.linux.x86=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86
+fragment at org.eclipse.equinox.launcher.gtk.linux.x86_64=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64
+fragment at org.eclipse.equinox.launcher.gtk.linux.ppc=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc
+fragment at org.eclipse.equinox.launcher.gtk.linux.ppc64=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64
+fragment at org.eclipse.equinox.launcher.gtk.aix.ppc64=R36x_v20101102,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64
+fragment at org.eclipse.equinox.launcher.motif.hpux.ia64_32=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32
+fragment at org.eclipse.equinox.launcher.motif.aix.ppc=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc
+fragment at org.eclipse.equinox.launcher.motif.linux.x86=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86
+fragment at org.eclipse.equinox.launcher.gtk.solaris.sparc=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc
+plugin at org.eclipse.equinox.launcher.releng=R36x_v20101019,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/releng/org.eclipse.equinox.launcher.releng
 
 !****contributed fragments
-fragment at org.eclipse.equinox.launcher.gtk.linux.s390=v20090426-1530,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390
-fragment at org.eclipse.equinox.launcher.gtk.linux.s390x=v20090426-1530,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x
-fragment at org.eclipse.equinox.launcher.gtk.solaris.x86=R35x_v20090720,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86
-fragment at org.eclipse.equinox.launcher.motif.solaris.sparc=R35x_20090929,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc
+fragment at org.eclipse.equinox.launcher.gtk.linux.s390=R36x_v20110125,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390
+fragment at org.eclipse.equinox.launcher.gtk.linux.s390x=R36x_v20110125,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x
+fragment at org.eclipse.equinox.launcher.gtk.solaris.x86=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86
+fragment at org.eclipse.equinox.launcher.motif.solaris.sparc=R36x_v20101019_1345,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc
 
-feature at org.eclipse.equinox.executable=R35x_v20091211,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable
+feature at org.eclipse.equinox.executable=R36x_v20110125,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable
 
 !**** Runtime
-plugin at org.eclipse.core.runtime=v20090525,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.contenttype=R35x_v20090826-0451,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.jobs=v20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.contenttype=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.jobs=R36x_v20100824,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Expressions
-plugin at org.eclipse.core.expressions=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.expressions.tests=v20090324-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.expressions=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.expressions.tests=v20091203,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Resources
-plugin at org.eclipse.core.resources=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.win32=v20080508,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.win32.x86=v20081020,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.resources=R36x_v20110131-1630,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.win32=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.win32.x86=v20100505-1345,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.core.resources.win32.ia64=v20081020,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.resources.compatibility=R35x_v20100113-0530,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.resources.compatibility=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** File System
-plugin at org.eclipse.core.filesystem=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.x86=v20080604-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.x86_64=v20090316-0910,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.win32.ia64=v20071121,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.x86=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.x86_64=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.linux.ppc=v20080604-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.solaris.sparc=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.filesystem.aix.ppc=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc
+plugin at org.eclipse.core.filesystem=R36x_v20100727-0745,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.x86=R36x_v20100727-0745,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.x86_64=R36x_v20100727-0745,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.win32.ia64=R36x_v20100727-0745,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.x86=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.x86_64=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.linux.ppc=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.solaris.sparc=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.filesystem.aix.ppc=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc
 
 !**** Legacy Runtime
-plugin at org.eclipse.core.boot=v20080218,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.runtime.compatibility=v20090413,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.runtime.compatibility.auth=v20090413,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.runtime.compatibility.registry=v20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.boot=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime.compatibility=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.runtime.compatibility.auth=v20100517,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.runtime.compatibility.registry=v20100520,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Other Core Code
-plugin at org.eclipse.pde.build=R35x_20100114,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build
-plugin at org.eclipse.pde.build.tests=R35x_20091105,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build.tests
+plugin at org.eclipse.pde.build=R36x_20110203,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build
+plugin at org.eclipse.pde.build.tests=R36x_v20110111,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build.tests
 feature at org.eclipse.pde.builder=v20040624a,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/build/org.eclipse.pde.build/feature
 
 !**** Test Suites
-plugin at org.eclipse.core.tests.harness=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.resources=R35x_v20091203-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.runtime=R35x_v20090807-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.osgi.tests=R35x_v20100126,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi.tests
\ No newline at end of file
+plugin at org.eclipse.core.tests.harness=v20100505-1235,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.resources=R36x_v20110131-1630,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.runtime=R36x_v20101213,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.osgi.tests=R36x_v20101103,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/framework/bundles/org.eclipse.osgi.tests
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/doc.map b/eclipse/maps/org.eclipse.releng/maps/doc.map
index 6b6109f..3919351 100644
--- a/eclipse/maps/org.eclipse.releng/maps/doc.map
+++ b/eclipse/maps/org.eclipse.releng/maps/doc.map
@@ -1,9 +1,9 @@
 !***************  DOC CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.platform.doc.user=r352_v20091111-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.platform.doc.isv=r352_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.platform.doc.user=r362_v20101117-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.platform.doc.isv=r362_v20110111,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.doc.user=r352_v20091015,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.doc.isv=r351_v20090831,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.doc.user=r361_v20100721-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.doc.isv=r362_v20101117-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.pde.doc.user=v20090818,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/doc/org.eclipse.pde.doc.user
\ No newline at end of file
+plugin at org.eclipse.pde.doc.user=v20101118_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/doc/org.eclipse.pde.doc.user
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/equinox-incubator.map b/eclipse/maps/org.eclipse.releng/maps/equinox-incubator.map
index bcc4fe6..35aaecc 100644
--- a/eclipse/maps/org.eclipse.releng/maps/equinox-incubator.map
+++ b/eclipse/maps/org.eclipse.releng/maps/equinox-incubator.map
@@ -1,28 +1,28 @@
 !***************  Equinox Incubator Contribution ***************************
 
 !**** Initializer bundle
-bundle at org.eclipse.equinox.initializer=v20071015,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/framework/bundles/org.eclipse.equinox.initializer
+bundle at org.eclipse.equinox.initializer=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/framework/bundles/org.eclipse.equinox.initializer
 
 !**** Resource Monitoring ****
 
 !** Client **
-plugin at org.eclipse.equinox.jmx.client=v20070515,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client
-plugin at org.eclipse.equinox.jmx.client.rmi=v20080610-1530,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.rmi
-plugin at org.eclipse.equinox.jmx.client.xmlrpc=v20070515,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.xmlrpc
+plugin at org.eclipse.equinox.jmx.client=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client
+plugin at org.eclipse.equinox.jmx.client.rmi=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.rmi
+plugin at org.eclipse.equinox.jmx.client.xmlrpc=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.xmlrpc
 feature at org.eclipse.equinox.jmx.client.feature=v20081124,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.feature
 
 !** Common **
-plugin at org.eclipse.equinox.jmx.common=R35x_v20100209,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common
+plugin at org.eclipse.equinox.jmx.common=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common
 feature at org.eclipse.equinox.jmx.common.feature=v20070507,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common.feature
 
 !** Server **
-plugin at org.eclipse.equinox.jmx.server=v20071015,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server
-plugin at org.eclipse.equinox.jmx.server.rmi=v20070510,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.rmi
-plugin at org.eclipse.equinox.jmx.server.xmlrpc=v20070608,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.xmlrpc
-plugin at org.eclipse.equinox.jmx.vm=v20070515,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.vm
-plugin at org.eclipse.equinox.preferences.jmx=v20070510,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.preferences.jmx
-plugin at org.eclipse.equinox.registry.jmx=v20080610-1530,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.registry.jmx
-plugin at org.eclipse.osgi.jmx=v20080610-1530,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.osgi.jmx
-plugin at org.eclipse.swt.jmx=v20090331,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.swt.jmx
-plugin at org.eclipse.core.resources.jmx=v20070510,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.core.resources.jmx
+plugin at org.eclipse.equinox.jmx.server=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server
+plugin at org.eclipse.equinox.jmx.server.rmi=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.rmi
+plugin at org.eclipse.equinox.jmx.server.xmlrpc=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.xmlrpc
+plugin at org.eclipse.equinox.jmx.vm=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.vm
+plugin at org.eclipse.equinox.preferences.jmx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.preferences.jmx
+plugin at org.eclipse.equinox.registry.jmx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.registry.jmx
+plugin at org.eclipse.osgi.jmx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.osgi.jmx
+plugin at org.eclipse.swt.jmx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.swt.jmx
+plugin at org.eclipse.core.resources.jmx=v20100503,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.core.resources.jmx
 feature at org.eclipse.equinox.jmx.server.feature=v20081124,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.feature
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/feature.map b/eclipse/maps/org.eclipse.releng/maps/feature.map
index 49885e9..61fd2e9 100644
--- a/eclipse/maps/org.eclipse.releng/maps/feature.map
+++ b/eclipse/maps/org.eclipse.releng/maps/feature.map
@@ -1,53 +1,52 @@
 !***************  FEATURE CONTRIBUTION  ******************************************************
-feature at org.eclipse.sdk=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.sdk
-plugin at org.eclipse.sdk=R35x_v20100204,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.jdt=r352_v20100108,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.jdt-feature
-feature at org.eclipse.jdt.sdk=v20080507,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.jdt.sdk
-
-feature at org.eclipse.pde=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.pde-feature
-feature at org.eclipse.pde.sdk=v20080313a,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.sdk
-feature at org.eclipse.pde.api.tools.ee.cdcfoundation10_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10-feature
-feature at org.eclipse.pde.api.tools.ee.cdcfoundation11_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11-feature
-feature at org.eclipse.pde.api.tools.ee.j2se12_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12-feature
-feature at org.eclipse.pde.api.tools.ee.j2se13_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13-feature
-feature at org.eclipse.pde.api.tools.ee.j2se14_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14-feature
-feature at org.eclipse.pde.api.tools.ee.j2se15_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15-feature
-feature at org.eclipse.pde.api.tools.ee.javase16_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16-feature
-feature at org.eclipse.pde.api.tools.ee.jre11_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum10_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum11_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11-feature
-feature at org.eclipse.pde.api.tools.ee.osgiminimum12_feature=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12-feature
-
-feature at org.eclipse.platform=R35x_v20100210-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.platform-feature
-feature at org.eclipse.platform.sdk=v20080314,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.platform.sdk
-
-plugin at org.eclipse.platform=R35x_v20100121,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.sdk.examples=v20080717,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.examples-feature
-plugin at org.eclipse.sdk.examples=v20080612,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-
-feature at org.eclipse.sdk.tests=v20090227,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/features/org.eclipse.sdk.tests
+feature at org.eclipse.sdk=r362_v20100929,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.sdk
+plugin at org.eclipse.sdk=r362_v20110202,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.jdt=r362_v20101117-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.jdt-feature
+
+feature at org.eclipse.pde=r362_v20110203,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.pde-feature
+feature at org.eclipse.pde.api.tools.ee.cdcfoundation10_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10-feature
+feature at org.eclipse.pde.api.tools.ee.cdcfoundation11_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11-feature
+feature at org.eclipse.pde.api.tools.ee.j2se12_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12-feature
+feature at org.eclipse.pde.api.tools.ee.j2se13_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13-feature
+feature at org.eclipse.pde.api.tools.ee.j2se14_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14-feature
+feature at org.eclipse.pde.api.tools.ee.j2se15_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15-feature
+feature at org.eclipse.pde.api.tools.ee.javase16_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16-feature
+feature at org.eclipse.pde.api.tools.ee.jre11_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum10_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum11_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11-feature
+feature at org.eclipse.pde.api.tools.ee.osgiminimum12_feature=v20091027-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12-feature
+
+feature at org.eclipse.platform=r362_v20110210,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.platform-feature
+plugin at org.eclipse.platform=r362_v20110120,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.sdk.examples=r362_v20101014,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.examples-feature
+plugin at org.eclipse.sdk.examples=v20100527,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+
+feature at org.eclipse.sdk.tests=r361_v20100714-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/features/org.eclipse.sdk.tests
 plugin at org.eclipse.sdk.tests=v20060605,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-feature at org.eclipse.equinox=v20090407,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox
-feature at org.eclipse.equinox.sdk=r352_v20100209,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox.sdk
+feature at org.eclipse.equinox.sdk=r362_v20110210b,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.equinox.sdk
 
-feature at org.eclipse.cvs=R35x_v20100125,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.cvs-feature
-feature at org.eclipse.cvs.sdk=v20080507,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.cvs.sdk
-plugin at org.eclipse.cvs=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.cvs
+feature at org.eclipse.cvs=r362_v20101111,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.cvs-feature
+plugin at org.eclipse.cvs=v20100414,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.cvs
 
-feature at org.eclipse.help=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help-feature
-feature at org.eclipse.help.sdk=v20080314,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help.sdk
+feature at org.eclipse.help=r362_v20101111,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.help-feature
 
-feature at org.eclipse.equinox.p2.user.ui=R35x_v20091106,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui
-feature at org.eclipse.equinox.p2.agent.feature=CVS,tag=R35x_v20090811,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature
-feature at org.eclipse.equinox.p2.generator.feature=CVS,tag=R35x_v20090811,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature
-feature at org.eclipse.equinox.p2.director.feature=CVS,tag=R35x_v20090811,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature
+feature at org.eclipse.equinox.p2.user.ui=r361_v20100903,kmoir at dev.eclipse.org:/cvsroot/rt,,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui
 
-feature at org.eclipse.equinox.p2.sdk=CVS,tag=R35x_v20090811,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.sdk
-feature at org.eclipse.equinox.core.sdk=CVS,tag=R35x_v20100105,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/framework/features/org.eclipse.equinox.core.sdk
-feature at org.eclipse.equinox.compendium.sdk=CVS,tag=R35x_v20100105,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/compendium/features/org.eclipse.equinox.compendium.sdk
-feature at org.eclipse.equinox.serverside.sdk=CVS,tag=v20090505,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.serverside.sdk
+feature at org.eclipse.equinox.p2.sdk=CVS,tag=R36x_v20110120,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.sdk
+feature at org.eclipse.equinox.p2.discovery.feature=CVS,tag=R36x_v20110210,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/features/org.eclipse.equinox.p2.discovery.feature
+feature at org.eclipse.equinox.core.sdk=CVS,tag=r36x_v20110210,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/framework/features/org.eclipse.equinox.core.sdk
+feature at org.eclipse.equinox.compendium.sdk=CVS,tag=R36x_v20101014,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/compendium/features/org.eclipse.equinox.compendium.sdk
 
-feature at org.eclipse.pde.api.tools.ee.fragments=v20090512,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.api.tools.ee.fragments
\ No newline at end of file
+feature at org.eclipse.equinox.serverside.sdk=CVS,tag=R36x_v20101014,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.serverside.sdk
+feature at org.eclipse.equinox.server.core=CVS,tag=R36x_v20101007,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.core
+feature at org.eclipse.equinox.server.jetty=CVS,tag=v20100510,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.jetty
+feature at org.eclipse.equinox.server.p2=CVS,tag=R36x_v20101007,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.p2
+feature at org.eclipse.equinox.server.servletbridge=CVS,tag=v20100510,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.servletbridge
+feature at org.eclipse.equinox.server.simple=CVS,tag=v20100510,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/server-side/features/org.eclipse.equinox.server.simple
+
+feature at org.eclipse.equinox.weaving.sdk=CVS,tag=v20100421,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/weaving/features/org.eclipse.equinox.weaving.sdk
+
+feature at org.eclipse.pde.api.tools.ee.fragments=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.pde.api.tools.ee.fragments
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/jdtapt.map b/eclipse/maps/org.eclipse.releng/maps/jdtapt.map
index 15b2942..390c22f 100644
--- a/eclipse/maps/org.eclipse.releng/maps/jdtapt.map
+++ b/eclipse/maps/org.eclipse.releng/maps/jdtapt.map
@@ -1,10 +1,10 @@
 
-!***************  JDT APT CONTRIBUTION  [R3_5_maintenance] *******************************************
+!***************  JDT APT CONTRIBUTION *******************************************
 
-plugin at org.eclipse.jdt.apt.core=R35x_v20091130-2300,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.ui=v20090930-2100_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.tests=R35x_v20091130-2300,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.jdt.compiler.apt=R35x_v20090925-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.compiler.apt.tests=R35x_v20090925-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.pluggable.core=R35x_v20090925-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.apt.pluggable.tests=R35x_v20090925-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.jdt.apt.core=R36_v20110120-1000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.ui=v20100513-0845,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.tests=R36x_v20100707-0100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.jdt.compiler.apt=v20100513-0845,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.compiler.apt.tests=v20100513-0845,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.pluggable.core=R36_v20100727-0110,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.apt.pluggable.tests=v20100513-0845,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/jdtcore.map b/eclipse/maps/org.eclipse.releng/maps/jdtcore.map
index 738c5e0..7408718 100644
--- a/eclipse/maps/org.eclipse.releng/maps/jdtcore.map
+++ b/eclipse/maps/org.eclipse.releng/maps/jdtcore.map
@@ -1,11 +1,11 @@
 
-!***************  JDT CORE CONTRIBUTION  [20100211-0800] ******************************************* 
+!*********************************** JDT CORE CONTRIBUTION ******************************************* 
 
-plugin at org.eclipse.jdt.core=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.jdt.compiler.tool=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.jdt.compiler.tool=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.core.tests.builder=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.compiler=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.model=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.core.tests.performance=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.compiler.tool.tests=v_981_R35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.jdt.core.tests.builder=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.compiler=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.model=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.tests.performance=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.compiler.tool.tests=v_A76_R36x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/jdtdebug.map b/eclipse/maps/org.eclipse.releng/maps/jdtdebug.map
index 2c199aa..3835400 100644
--- a/eclipse/maps/org.eclipse.releng/maps/jdtdebug.map
+++ b/eclipse/maps/org.eclipse.releng/maps/jdtdebug.map
@@ -1,16 +1,17 @@
 !***************  DEBUG CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.debug.core=v20091103_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.debug.ui=v20091028_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.debug=v20090526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.debug.ui=v20090811_r351,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching=v20100108_r352,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching.macosx=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.launching.ui.macosx=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.core=v20100519,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.ui=v20101201_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug=v20100715_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug.ui=v20100928a_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching=v20110105_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching.macosx=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.launching.ui.macosx=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.console=v20090513,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.console=v20100526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.debug.tests=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.debug.tests=v20100526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.tests=v20100624_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.debug.examples.core=v20090504,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.debug.examples.ui=v20090519,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.debug.examples.core=v20100505,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.debug.examples.ui=v20100526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/jdtui.map b/eclipse/maps/org.eclipse.releng/maps/jdtui.map
index c92e4e6..24c5e66 100644
--- a/eclipse/maps/org.eclipse.releng/maps/jdtui.map
+++ b/eclipse/maps/org.eclipse.releng/maps/jdtui.map
@@ -1,23 +1,23 @@
 !***************  JDT UI CONTRIBUTION  ******************************************************** 
-plugin at org.eclipse.search=r351_v20090708-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.search.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.search=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.search.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ltk.core.refactoring=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.core.refactoring.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.ui.refactoring=r352_v20100209,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ltk.ui.refactoring.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.core.refactoring=r362_v20101117-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.core.refactoring.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.ui.refactoring=v20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ltk.ui.refactoring.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt=r352_v20100106-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt=r361_v20100714-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.core.manipulation=v20090603,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.core.manipulation=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.ui=r352_v20100106-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.examples.projects=v20090603,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.tests=v20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.ui.tests.refactoring=r351_v20090708-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui=r362_v20110203,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui.tests=r361_v20100818-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.ui.tests.refactoring=v20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jdt.junit=r352_v20100113-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.junit.runtime=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.junit4.runtime=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit=r361_v20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit.core=r361_v20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit.runtime=v20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.junit4.runtime=v20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.junit4=v20090824,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.junit4=v20100525,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/orbit.map b/eclipse/maps/org.eclipse.releng/maps/orbit.map
index 196f490..be3de03 100644
--- a/eclipse/maps/org.eclipse.releng/maps/orbit.map
+++ b/eclipse/maps/org.eclipse.releng/maps/orbit.map
@@ -1,58 +1,63 @@
 !***************  ORBIT CONTRIBUTION  ********************************************************
-plugin at com.ibm.icu,4.0.1=p2IU,id=com.ibm.icu,version=4.0.1.v20090822,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.base,4.0.1=p2IU,id=com.ibm.icu.base,version=4.0.1.v20090822,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.base.source,4.0.1=p2IU,id=com.ibm.icu.base.source,version=4.0.1.v20090822,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.ibm.icu.source,4.0.1=p2IU,id=com.ibm.icu.source,version=4.0.1.v20090822,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.jcraft.jsch,0.1.41=p2IU,id=com.jcraft.jsch,version=0.1.41.v200903070017,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at com.jcraft.jsch.source,0.1.41=p2IU,id=com.jcraft.jsch.source,version=0.1.41.v200903070017,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.management,1.2.0=p2IU,id=javax.management,version=1.2.0.v200803061811,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.management.remote,1.0.0=p2IU,id=javax.management.remote,version=1.0.0.v200803061811,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet,2.4.0=p2IU,id=javax.servlet,version=2.4.0.v200806031604,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet,2.5.0=p2IU,id=javax.servlet,version=2.5.0.v200806031605,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.source,2.4.0=p2IU,id=javax.servlet.source,version=2.4.0.v200806031604,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.source,2.5.0=p2IU,id=javax.servlet.source,version=2.5.0.v200806031605,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.jsp,2.0.0=p2IU,id=javax.servlet.jsp,version=2.0.0.v200806031607,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v200803061811,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v200803061811,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20090120-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20090120-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20080530-1600,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20080530-1600,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v200806031608,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.el.source,1.0.0=p2IU,id=org.apache.commons.el.source,version=1.0.0.v200806031608,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.httpclient,3.1.0=p2IU,id=org.apache.commons.httpclient,version=3.1.0.v20080605-1935,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.httpclient.source,3.1.0=p2IU,id=org.apache.commons.httpclient.source,version=3.1.0.v20080605-1935,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.logging,1.0.4=p2IU,id=org.apache.commons.logging,version=1.0.4.v200904062259,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.commons.logging.source,1.0.4=p2IU,id=org.apache.commons.logging.source,version=1.0.4.v200904062259,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.jasper,5.5.17=p2IU,id=org.apache.jasper,version=5.5.17.v200903231320,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.jasper.source,5.5.17=p2IU,id=org.apache.jasper.source,version=5.5.17.v200903231320,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene,1.9.1=p2IU,id=org.apache.lucene,version=1.9.1.v20080530-1600,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene.analysis,1.9.1=p2IU,id=org.apache.lucene.analysis,version=1.9.1.v20080530-1600,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.lucene.analysis.source,1.9.1=p2IU,id=org.apache.lucene.analysis.source,version=1.9.1.v20080530-1600,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ws.commons.util,1.0.0=p2IU,id=org.apache.ws.commons.util,version=1.0.0.v20081204,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.ws.jaxme,0.5.1=p2IU,id=org.apache.ws.jaxme,version=0.5.1.v20080530-1550,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.xmlrpc,3.0.0=p2IU,id=org.apache.xmlrpc,version=3.0.0.v20080530-1550,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.easymock,2.4.0=p2IU,id=org.easymock,version=2.4.0.v20090202-0900,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.easymock.source,2.4.0=p2IU,id=org.easymock.source,version=2.4.0.v20090202-0900,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.hamcrest.core,1.1.0=p2IU,id=org.hamcrest.core,version=1.1.0.v20090501071000,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.hamcrest.core.source,1.1.0=p2IU,id=org.hamcrest.core.source,version=1.1.0.v20090501071000,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.junit,3.8.2=p2IU,id=org.junit,version=3.8.2.v20090203-1005,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.junit.source,3.8.2=p2IU,id=org.junit.source,version=3.8.2.v20090203-1005,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty,5.1.14=p2IU,id=org.mortbay.jetty,version=5.1.14.v200806031611,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.source,5.1.14=p2IU,id=org.mortbay.jetty.source,version=5.1.14.v200806031611,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.server,6.1.15=p2IU,id=org.mortbay.jetty.server,version=6.1.15.v200905151201,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.server.source,6.1.15=p2IU,id=org.mortbay.jetty.server.source,version=6.1.15.v200905151201,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.util,6.1.15=p2IU,id=org.mortbay.jetty.util,version=6.1.15.v200905182336,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.mortbay.jetty.util.source,6.1.15=p2IU,id=org.mortbay.jetty.util.source,version=6.1.15.v200905182336,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
+plugin at com.ibm.icu,4.2.1=p2IU,id=com.ibm.icu,version=4.2.1.v20100412,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.base,4.2.1=p2IU,id=com.ibm.icu.base,version=4.2.1.v20100412,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.base.source,4.2.1=p2IU,id=com.ibm.icu.base.source,version=4.2.1.v20100412,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.ibm.icu.source,4.2.1=p2IU,id=com.ibm.icu.source,version=4.2.1.v20100412,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.jcraft.jsch,0.1.41=p2IU,id=com.jcraft.jsch,version=0.1.41.v200903070017,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at com.jcraft.jsch.source,0.1.41=p2IU,id=com.jcraft.jsch.source,version=0.1.41.v200903070017,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.management,1.2.0=p2IU,id=javax.management,version=1.2.0.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.management.remote,1.0.0=p2IU,id=javax.management.remote,version=1.0.0.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet,2.4.0=p2IU,id=javax.servlet,version=2.4.0.v200806031604,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet,2.5.0=p2IU,id=javax.servlet,version=2.5.0.v200910301333,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.source,2.4.0=p2IU,id=javax.servlet.source,version=2.4.0.v200806031604,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.source,2.5.0=p2IU,id=javax.servlet.source,version=2.5.0.v200910301333,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.jsp,2.0.0=p2IU,id=javax.servlet.jsp,version=2.0.0.v200806031607,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at javax.servlet.jsp.source,2.0.0=p2IU,id=javax.servlet.jsp.source,version=2.0.0.v200806031607,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at net.sourceforge.mx4j,3.0.1=p2IU,id=net.sourceforge.mx4j,version=3.0.1.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at net.sourceforge.mx4j.remote,3.0.1=p2IU,id=net.sourceforge.mx4j.remote,version=3.0.1.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ant,1.7.1=p2IU,id=org.apache.ant,version=1.7.1.v20100518-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ant.source,1.7.1=p2IU,id=org.apache.ant.source,version=1.7.1.v20100518-1145,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.codec,1.3.0=p2IU,id=org.apache.commons.codec,version=1.3.0.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.codec.source,1.3.0=p2IU,id=org.apache.commons.codec.source,version=1.3.0.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.el,1.0.0=p2IU,id=org.apache.commons.el,version=1.0.0.v201004212143,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.el.source,1.0.0=p2IU,id=org.apache.commons.el.source,version=1.0.0.v201004212143,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.httpclient,3.1.0=p2IU,id=org.apache.commons.httpclient,version=3.1.0.v201005080502,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.httpclient.source,3.1.0=p2IU,id=org.apache.commons.httpclient.source,version=3.1.0.v201005080502,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.logging,1.0.4=p2IU,id=org.apache.commons.logging,version=1.0.4.v201005080501,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.commons.logging.source,1.0.4=p2IU,id=org.apache.commons.logging.source,version=1.0.4.v201005080501,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.jasper,5.5.17=p2IU,id=org.apache.jasper,version=5.5.17.v201004212143,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.jasper.source,5.5.17=p2IU,id=org.apache.jasper.source,version=5.5.17.v201004212143,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene,1.9.1=p2IU,id=org.apache.lucene,version=1.9.1.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene.analysis,1.9.1=p2IU,id=org.apache.lucene.analysis,version=1.9.1.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.lucene.analysis.source,1.9.1=p2IU,id=org.apache.lucene.analysis.source,version=1.9.1.v20100518-1140,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ws.commons.util,1.0.0=p2IU,id=org.apache.ws.commons.util,version=1.0.0.v20100518-1135,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.ws.jaxme,0.5.1=p2IU,id=org.apache.ws.jaxme,version=0.5.1.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.xmlrpc,3.0.0=p2IU,id=org.apache.xmlrpc,version=3.0.0.v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.easymock,2.4.0=p2IU,id=org.easymock,version=2.4.0.v20090202-0900,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.easymock.source,2.4.0=p2IU,id=org.easymock.source,version=2.4.0.v20090202-0900,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.hamcrest.core,1.1.0=p2IU,id=org.hamcrest.core,version=1.1.0.v20090501071000,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.hamcrest.core.source,1.1.0=p2IU,id=org.hamcrest.core.source,version=1.1.0.v20090501071000,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit,3.8.2=p2IU,id=org.junit,version=3.8.2.v3_8_2_v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit.source,3.8.2=p2IU,id=org.junit.source,version=3.8.2.v3_8_2_v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit,4.8.1=p2IU,id=org.junit,version=4.8.1.v4_8_1_v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.junit.source,4.8.1=p2IU,id=org.junit.source,version=4.8.1.v4_8_1_v20100427-1100,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty,5.1.14=p2IU,id=org.mortbay.jetty,version=5.1.14.v200806031611,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.source,5.1.14=p2IU,id=org.mortbay.jetty.source,version=5.1.14.v200806031611,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.server,6.1.23=p2IU,id=org.mortbay.jetty.server,version=6.1.23.v201004211559,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.server.source,6.1.23=p2IU,id=org.mortbay.jetty.server.source,version=6.1.23.v201004211559,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.util,6.1.23=p2IU,id=org.mortbay.jetty.util,version=6.1.23.v201004211559,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.mortbay.jetty.util.source,6.1.23=p2IU,id=org.mortbay.jetty.util.source,version=6.1.23.v201004211559,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
 
 # Bundles from Orbit for p2
-plugin at org.apache.xml.resolver,1.2.0=p2IU,id=org.apache.xml.resolver,version=1.2.0.v200902170519,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.apache.xerces,2.8.0=p2IU,id=org.apache.xerces,version=2.8.0.v200803070308,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.sat4j.core,2.1.1=p2IU,id=org.sat4j.core,version=2.1.1.v20090825,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.sat4j.pb,2.1.1=p2IU,id=org.sat4j.pb,version=2.1.1.v20090825,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
+plugin at org.apache.xml.resolver,1.2.0=p2IU,id=org.apache.xml.resolver,version=1.2.0.v201005080400,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.apache.xerces,2.8.0=p2IU,id=org.apache.xerces,version=2.8.0.v200803070308,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.sat4j.core,2.2.0=p2IU,id=org.sat4j.core,version=2.2.0.v20100429,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.sat4j.pb,2.2.0=p2IU,id=org.sat4j.pb,version=2.2.0.v20100429,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
 
 # Orbit bundles for API tooling
-plugin at org.objectweb.asm,3.1.0=p2IU,id=org.objectweb.asm,version=3.1.0.v200803061910,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
-plugin at org.objectweb.asm.source,3.1.0=p2IU,id=org.objectweb.asm.source,version=3.1.0.v200803061910,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100114021427/updateSite
+plugin at org.objectweb.asm,3.2.0=p2IU,id=org.objectweb.asm,version=3.2.0.v200909071300,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
+plugin at org.objectweb.asm.source,3.2.0=p2IU,id=org.objectweb.asm.source,version=3.2.0.v200909071300,repository=http://fullmoon.ottawa.ibm.com/tools/orbit/downloads/drops/R20100519200754/repository
 
+#aspectj plugins for equinox weaving plugins
+plugin at org.aspectj.weaver,1.6.7=p2IU,id=org.aspectj.weaver,version=1.6.7.20091231194938,repository=http://fullmoon.ottawa.ibm.com/tools/ajdt/aspectj/update																   
+plugin at org.aspectj.runtime,1.6.7=p2IU,id=org.aspectj.runtime,version=1.6.7.20091231194938,repository=http://fullmoon.ottawa.ibm.com/tools/ajdt/aspectj/update
diff --git a/eclipse/maps/org.eclipse.releng/maps/p2.map b/eclipse/maps/org.eclipse.releng/maps/p2.map
index 6ad6e24..4a6abff 100644
--- a/eclipse/maps/org.eclipse.releng/maps/p2.map
+++ b/eclipse/maps/org.eclipse.releng/maps/p2.map
@@ -1,55 +1,70 @@
-plugin at org.eclipse.equinox.frameworkadmin=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin
-plugin at org.eclipse.equinox.frameworkadmin.equinox=CVS,tag=R35x_v20091214,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox
-plugin at org.eclipse.equinox.frameworkadmin.test=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test
-plugin at org.eclipse.equinox.p2.artifact.repository=CVS,tag=R35x_v20090721,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository
-plugin at org.eclipse.equinox.p2.console=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console
-plugin at org.eclipse.equinox.p2.core=CVS,tag=R35x_v20090819,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core
-plugin at org.eclipse.equinox.p2.director=CVS,tag=R35x_v20100112,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director
-plugin at org.eclipse.equinox.p2.director.app=CVS,tag=R35x_v20091106,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app
-plugin at org.eclipse.equinox.p2.directorywatcher=CVS,tag=v20090525,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher
-plugin at org.eclipse.equinox.p2.engine=CVS,tag=R35x_v20091117,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine
-plugin at org.eclipse.equinox.p2.exemplarysetup=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.exemplarysetup
-plugin at org.eclipse.equinox.p2.extensionlocation=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation
-plugin at org.eclipse.equinox.p2.garbagecollector=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector
-plugin at org.eclipse.equinox.p2.installer=CVS,tag=R35x_v20090717,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer
-plugin at org.eclipse.equinox.p2.jarprocessor=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor
-plugin at org.eclipse.equinox.p2.metadata=CVS,tag=R35x_v20100112,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata
-plugin at org.eclipse.equinox.p2.metadata.generator=CVS,tag=R35x_20100114,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator
-plugin at org.eclipse.equinox.p2.metadata.repository=CVS,tag=R35x_v20090812,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository
-plugin at org.eclipse.equinox.p2.publisher=CVS,tag=R35x_20100105,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher
-plugin at org.eclipse.equinox.p2.reconciler.dropins=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins
-plugin at org.eclipse.equinox.p2.repository=CVS,tag=R35x_v20100105,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository
-plugin at org.eclipse.equinox.p2.repository.tools=CVS,tag=R35x_20100111,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools
-plugin at org.eclipse.equinox.p2.selfhosting=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.selfhosting
-plugin at org.eclipse.equinox.p2.tools=CVS,tag=v20090525,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tools
-plugin at org.eclipse.equinox.p2.touchpoint.eclipse=CVS,tag=R35x_20090820-1821,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse
-plugin at org.eclipse.equinox.p2.touchpoint.natives=CVS,tag=R35x_v20090806,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives
-plugin at org.eclipse.equinox.p2.ui=CVS,tag=R35x_v20090819,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui
-plugin at org.eclipse.equinox.p2.ui.admin=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin
-plugin at org.eclipse.equinox.p2.ui.sdk=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk
-plugin at org.eclipse.equinox.p2.ui.sdk.scheduler=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
-plugin at org.eclipse.equinox.p2.ui.admin.rcp=CVS,tag=v20090820,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp
-plugin at org.eclipse.equinox.p2.updatechecker=CVS,tag=v20090520-1905,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker
-plugin at org.eclipse.equinox.p2.updatesite=CVS,tag=R35x_20100105,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite
-plugin at org.eclipse.equinox.simpleconfigurator=CVS,tag=R35x_v20090807-1100,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator
-plugin at org.eclipse.equinox.simpleconfigurator.manipulator=CVS,tag=R35x_v20100209,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator
-plugin at org.eclipse.equinox.p2.tests=CVS,tag=R35x_v20090903,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests
-plugin at org.eclipse.equinox.p2.tests.ui=CVS,tag=v20090527-1812,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui
+plugin at org.eclipse.equinox.frameworkadmin=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin
+plugin at org.eclipse.equinox.frameworkadmin.equinox=CVS,tag=v20100505,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox
+plugin at org.eclipse.equinox.frameworkadmin.test=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test
+plugin at org.eclipse.equinox.p2.artifact.repository=CVS,tag=R36x_v20100901,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository
+plugin at org.eclipse.equinox.p2.console=CVS,tag=v20100601,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console
+plugin at org.eclipse.equinox.p2.core=CVS,tag=R36x_v20110111,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core
+plugin at org.eclipse.equinox.p2.director=CVS,tag=R36x_v20101117-1018,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director
+plugin at org.eclipse.equinox.p2.director.app=CVS,tag=R36x_v20100823,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app
+plugin at org.eclipse.equinox.p2.directorywatcher=CVS,tag=R36x_v20101220,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher
+plugin at org.eclipse.equinox.p2.discovery=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery
+plugin at org.eclipse.equinox.p2.discovery.compatibility=CVS,tag=v20110204-1323,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility
+plugin at org.eclipse.equinox.p2.engine=CVS,tag=R36x_v20110201,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine
+plugin at org.eclipse.equinox.p2.extensionlocation=CVS,tag=v20100518,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation
+plugin at org.eclipse.equinox.p2.garbagecollector=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector
+plugin at org.eclipse.equinox.p2.installer=CVS,tag=v20100503a,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer
+plugin at org.eclipse.equinox.p2.jarprocessor=CVS,tag=v20100503a,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor
+plugin at org.eclipse.equinox.p2.metadata=CVS,tag=R36x_v20101202,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata
+plugin at org.eclipse.equinox.p2.metadata.generator=CVS,tag=R36x_v20101208-1400,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator
+plugin at org.eclipse.equinox.p2.metadata.repository=CVS,tag=v20100513,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository
+plugin at org.eclipse.equinox.p2.operations=CVS,tag=v20100510,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations
+plugin at org.eclipse.equinox.p2.publisher=CVS,tag=v20100824-2220,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher
+plugin at org.eclipse.equinox.p2.reconciler.dropins=CVS,tag=R36x_v20110114,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins
+plugin at org.eclipse.equinox.p2.repository=CVS,tag=R36x_v20110111-1500,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository
+plugin at org.eclipse.equinox.p2.repository.tools=CVS,tag=R36x_v20100823,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools
+plugin at org.eclipse.equinox.p2.touchpoint.eclipse=CVS,tag=R36x_v20101202,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse
+plugin at org.eclipse.equinox.p2.touchpoint.natives=CVS,tag=R36x_v20110111,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives
+plugin at org.eclipse.equinox.p2.ui=CVS,tag=v20100518,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui
+plugin at org.eclipse.equinox.p2.ui.admin=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin
+plugin at org.eclipse.equinox.p2.ui.discovery=CVS,tag=v20100519,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery
+plugin at org.eclipse.equinox.p2.ui.sdk=CVS,tag=v20100513,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk
+plugin at org.eclipse.equinox.p2.ui.sdk.scheduler=CVS,tag=v20100507-1815,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler
+plugin at org.eclipse.equinox.p2.ui.admin.rcp=CVS,tag=R36x_v20100823,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp
+plugin at org.eclipse.equinox.p2.updatechecker=CVS,tag=R36x_v20100823,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker
+plugin at org.eclipse.equinox.p2.updatesite=CVS,tag=R36x_v20100823,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite
+plugin at org.eclipse.equinox.simpleconfigurator=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator
+plugin at org.eclipse.equinox.simpleconfigurator.manipulator=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator
+plugin at org.eclipse.equinox.p2.tests=CVS,tag=R36x_v20101202,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests
+plugin at org.eclipse.equinox.p2.tests.discovery=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery
+plugin at org.eclipse.equinox.p2.tests.ui=CVS,tag=v20100513,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui
+plugin at org.eclipse.equinox.p2.tests.verifier=CVS,tag=v20100503,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier
+plugin at org.eclipse.equinox.p2.ql=CVS,tag=v20100503a,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql
+
+!# p2 examples
+plugin at org.eclipse.equinox.p2.examples.rcp.cloud=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud
+plugin at org.eclipse.equinox.p2.examples.rcp.cloud.releng=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.discovery=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.discovery
+plugin at org.eclipse.equinox.p2.examples.rcp.discovery.releng=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.prestartupdate=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate
+plugin at org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng
+plugin at org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility
+plugin at org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates
+plugin at org.eclipse.equinox.p2.examples.rcp.sdkui=CVS,tag=v20100604,cvsRoot=kmoir at dev.eclipse.org:/cvsroot/rt,path=org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkui
 
 !# Bundles from ECF
-plugin at org.eclipse.ecf,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.source,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.ssl,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.ssl.source,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.identity,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.identity_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.identity.source,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.identity.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.filetransfer,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.filetransfer_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.filetransfer.source,3.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.filetransfer.source_3.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer,3.0.1=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer_3.0.1.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.source,3.0.1=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.source_3.0.1.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.ssl,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.ssl.source,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.httpclient,3.0.1=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient_3.0.1.v20090831-1906.jar,usetimestamp=true
-plugin at org.eclipse.ecf.provider.filetransfer.httpclient.source,3.0.1=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.source_3.0.1.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl_1.0.0.v20090831-1906.jar,usetimestamp=true
-fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source,1.0.0=GET,http://fullmoon.ottawa.ibm.com/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source_1.0.0.v20090831-1906.jar,usetimestamp=true
+plugin at org.eclipse.ecf,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.ssl,1.0.100=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.ssl_1.0.100.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.ssl.source,1.0.100=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.ssl.source_1.0.100.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.identity,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.identity_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.identity.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.identity.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.filetransfer,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.filetransfer_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.filetransfer.source,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.filetransfer.source_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer_3.1.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.source,3.1.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.source_3.1.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.ssl,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.ssl_1.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.ssl.source,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.ssl.source_1.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.httpclient,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient_4.0.0.v20100906-1425.jar,usetimestamp=true
+plugin at org.eclipse.ecf.provider.filetransfer.httpclient.source,4.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.source_4.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl_1.0.0.v20100906-1425.jar,usetimestamp=true
+fragment at org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source,1.0.0=GET,http://archive.eclipse.org/rt/ecf/integration/platform/v2010-09-06_07-22-05/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl.source_1.0.0.v20100906-1425.jar,usetimestamp=true
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/pde.map b/eclipse/maps/org.eclipse.releng/maps/pde.map
index 20bb038..5c15895 100644
--- a/eclipse/maps/org.eclipse.releng/maps/pde.map
+++ b/eclipse/maps/org.eclipse.releng/maps/pde.map
@@ -1,33 +1,34 @@
 !***************  PDE CONTRIBUTION  ******************************************************** 
 
 
-plugin at org.eclipse.pde=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde
-plugin at org.eclipse.pde.core=v20100104,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.core
-plugin at org.eclipse.pde.junit.runtime=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.junit.runtime
-plugin at org.eclipse.pde.runtime=v20090731,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.runtime
-plugin at org.eclipse.pde.ui=v201001121200,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui
-plugin at org.eclipse.pde.ui.templates=v20090527,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.templates
-plugin at org.eclipse.pde.ui.tests=v20090824a,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.tests
+plugin at org.eclipse.pde=v20100625_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde
+plugin at org.eclipse.pde.core=v20110210_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.core
+plugin at org.eclipse.pde.junit.runtime=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.junit.runtime
+plugin at org.eclipse.pde.runtime=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.runtime
+plugin at org.eclipse.pde.launching=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.launching
+plugin at org.eclipse.pde.ui=v20110210_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui
+plugin at org.eclipse.pde.ui.templates=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.templates
+plugin at org.eclipse.pde.ui.tests=v20101210_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.pde.ui.tests
 
-plugin at org.eclipse.ui.views.log=v20090731,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.ui.views.log
-plugin at org.eclipse.pde.api.tools=v20090714,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools
-plugin at org.eclipse.pde.api.tools.ui=v20090820,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ui
-plugin at org.eclipse.pde.api.tools.tests=v20090714,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.tests
-fragment at org.eclipse.pde.api.tools.ee.cdcfoundation10=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10
-fragment at org.eclipse.pde.api.tools.ee.cdcfoundation11=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11
-fragment at org.eclipse.pde.api.tools.ee.j2se12=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12
-fragment at org.eclipse.pde.api.tools.ee.j2se13=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13
-fragment at org.eclipse.pde.api.tools.ee.j2se14=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14
-fragment at org.eclipse.pde.api.tools.ee.j2se15=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15
-fragment at org.eclipse.pde.api.tools.ee.javase16=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16
-fragment at org.eclipse.pde.api.tools.ee.jre11=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum10=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum11=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11
-fragment at org.eclipse.pde.api.tools.ee.osgiminimum12=v20090407-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12
+plugin at org.eclipse.ui.views.log=v20110210_r362,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ui/org.eclipse.ui.views.log
+plugin at org.eclipse.pde.api.tools=v20100820_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools
+plugin at org.eclipse.pde.api.tools.ui=v20100820_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ui
+plugin at org.eclipse.pde.api.tools.tests=v20100820_r361,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.tests
+fragment at org.eclipse.pde.api.tools.ee.cdcfoundation10=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10
+fragment at org.eclipse.pde.api.tools.ee.cdcfoundation11=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11
+fragment at org.eclipse.pde.api.tools.ee.j2se12=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se12
+fragment at org.eclipse.pde.api.tools.ee.j2se13=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se13
+fragment at org.eclipse.pde.api.tools.ee.j2se14=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se14
+fragment at org.eclipse.pde.api.tools.ee.j2se15=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.j2se15
+fragment at org.eclipse.pde.api.tools.ee.javase16=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.javase16
+fragment at org.eclipse.pde.api.tools.ee.jre11=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.jre11
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum10=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum11=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11
+fragment at org.eclipse.pde.api.tools.ee.osgiminimum12=v20100506-0900,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12
 
-plugin at org.eclipse.pde.ds.core=v20100118,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.core
-plugin at org.eclipse.pde.ds.ui=v20100209-maintenance,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.ui
-plugin at org.eclipse.pde.ds.tests=v20090420,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.tests
+plugin at org.eclipse.pde.ds.core=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.core
+plugin at org.eclipse.pde.ds.ui=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.ui
+plugin at org.eclipse.pde.ds.tests=v20100601,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ds/org.eclipse.pde.ds.tests
 
-plugin at org.eclipse.pde.ua.core=v20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.core
-plugin at org.eclipse.pde.ua.ui=v20090511,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.ui
\ No newline at end of file
+plugin at org.eclipse.pde.ua.core=v20100504,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.core
+plugin at org.eclipse.pde.ua.ui=v20100504,kmoir at dev.eclipse.org:/cvsroot/eclipse,,pde/ua/org.eclipse.pde.ua.ui
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/rcp.map b/eclipse/maps/org.eclipse.releng/maps/rcp.map
index 000a771..17fdae2 100644
--- a/eclipse/maps/org.eclipse.releng/maps/rcp.map
+++ b/eclipse/maps/org.eclipse.releng/maps/rcp.map
@@ -1,3 +1,3 @@
-feature at org.eclipse.rcp=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp
+feature at org.eclipse.rcp=r362_v20101104,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp
 feature at org.eclipse.rcp.sdk=v20080507,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.rcp.sdk
-plugin at org.eclipse.rcp=R35x_v20100119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.rcp
\ No newline at end of file
+plugin at org.eclipse.rcp=v20100527-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/plugins/org.eclipse.rcp
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/releng.map b/eclipse/maps/org.eclipse.releng/maps/releng.map
index e36164b..62baa04 100644
--- a/eclipse/maps/org.eclipse.releng/maps/releng.map
+++ b/eclipse/maps/org.eclipse.releng/maps/releng.map
@@ -1,17 +1,17 @@
 !****************  RELENG CONTRIBUTION  ******************************************************** 
-feature at master=v20090425,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master
-feature at master-equinox=v20090413,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox
-feature at master-equinox-p2=v20080506,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-p2
-feature at master-jetty=v20090305,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-jetty
+feature at master=v20091019,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master
+feature at master-equinox=r362_v20101118,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox
+feature at master-equinox-p2=v20091106,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-p2
+feature at master-equinox-weaving=v20090817,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-equinox-weaving
+feature at master-jetty=r362_v20101014,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-jetty
 feature at master-ecf=v20090316,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-ecf
 
 feature at com.ibm.icu.base=v20090119,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/com.ibm.icu.base
 
-feature at master-root=v20081208,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/master-root
-feature at org.eclipse.releng.tools=v20090520,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.releng.tools
+feature at org.eclipse.releng.tools=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk-feature/features/org.eclipse.releng.tools
 
-plugin at org.eclipse.releng.tools=R35x_v20090812,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.releng.tests=R35x_v20100208,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.releng.tools=v20100531,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.releng.tests=r362_v20110203,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 plugin at org.eclipse.pde.tools.versioning=r20080922,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.sdk.tests-feature/plugins/org.eclipse.pde.tools.versioning
 
diff --git a/eclipse/maps/org.eclipse.releng/maps/swt.map b/eclipse/maps/org.eclipse.releng/maps/swt.map
index b8287ee..c59eae3 100644
--- a/eclipse/maps/org.eclipse.releng/maps/swt.map
+++ b/eclipse/maps/org.eclipse.releng/maps/swt.map
@@ -1,44 +1,42 @@
 !***************  SWT CONTRIBUTION  ******************************************************** 
 
 !*** SWT Plugin
-plugin at org.eclipse.swt=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt=v3659c,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Platform Fragments
-fragment at org.eclipse.swt.carbon.macosx=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.cocoa.macosx=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.cocoa.macosx.x86_64=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.ppc=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.x86_64=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.solaris.sparc=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.solaris.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.aix.ppc=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.hpux.ia64_32=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.linux.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.solaris.sparc=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.photon.qnx.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.wce_ppc.arm=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.wpf.win32.x86=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.x86_64=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.win32.win32.ia64=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.carbon.macosx=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.cocoa.macosx=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.cocoa.macosx.x86_64=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.ppc=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.ppc64=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.x86=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.x86_64=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.solaris.sparc=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.solaris.x86=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.aix.ppc64=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.aix.ppc=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.hpux.ia64_32=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.linux.x86=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.motif.solaris.sparc=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.photon.qnx.x86=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.wce_ppc.arm=v3659c,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.x86=v3659c,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.x86_64=v3659c,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.win32.win32.ia64=v3659c,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-fragment at org.eclipse.swt.gtk.linux.s390=v3550b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.gtk.linux.s390x=v3550b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-
-fragment at org.eclipse.swt.gtk.linux.ia64=R3_5,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.swt.motif.hpux.PA_RISC=R3_5,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.s390=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.swt.gtk.linux.s390x=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Examples
-plugin at org.eclipse.swt.examples=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.browser=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.browser.demos=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.controls=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.launcher=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.layouts=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.ole.win32=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.examples.paint=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.browser=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.browser.demos=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.controls=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.launcher=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.layouts=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.ole.win32=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.examples.paint=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !*** SWT Tests and Tools
-plugin at org.eclipse.swt.tests=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.swt.tools=v3557f,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.swt.tests=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.swt.tools=v3659b,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/team.map b/eclipse/maps/org.eclipse.releng/maps/team.map
index ad792fd..169cce4 100644
--- a/eclipse/maps/org.eclipse.releng/maps/team.map
+++ b/eclipse/maps/org.eclipse.releng/maps/team.map
@@ -1,23 +1,24 @@
 !***************  TEAM CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.team.core=r35x_20100113-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.core=I20090430-0408,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ssh=I20090508-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ssh2=I20090508-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.ui=I20090430-0408,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.cvs.ui=r35x_20090930-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.core=R36x_v20110203-1036,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.core=R36x_v20110119-0815,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ssh=I20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ssh2=I20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.ui=R36x_v20110203-1036,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.cvs.ui=R36x_v20110203-1036,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.core.net=r35x_20090812-1200,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.net=r35x_20090812-1200,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.tests.net=I20090126-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.core=I20090430-0408,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.ui=r35x_20100210-1114,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jsch.tests=I20080604,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.net=I20100511-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.net=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.tests.net=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.core=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.ui=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jsch.tests=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.team.examples.filesystem=I20090210-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.examples.filesystem=I20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.team.tests.core=I20090304-1015,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.team.tests.cvs.core=I20090527-0620,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.core.net.win32.x86=I20080909,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86
-fragment at org.eclipse.core.net.linux.x86=I20081021,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86
-fragment at org.eclipse.core.net.win32.x86_64=I20090306-1030,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64
\ No newline at end of file
+plugin at org.eclipse.team.tests.core=I20100511-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.team.tests.cvs.core=R36x_v20110119-0815,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.core.net.win32.x86=I20100511-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86
+fragment at org.eclipse.core.net.linux.x86=R36x_v20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86
+fragment at org.eclipse.core.net.linux.x86_64=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64
+fragment at org.eclipse.core.net.win32.x86_64=I20100505-1245,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/testframework.map b/eclipse/maps/org.eclipse.releng/maps/testframework.map
index 3c38c09..dc3ef74 100644
--- a/eclipse/maps/org.eclipse.releng/maps/testframework.map
+++ b/eclipse/maps/org.eclipse.releng/maps/testframework.map
@@ -1,10 +1,10 @@
 !***************  Test Framework CONTRIBUTION  ******************************************************** 
-feature at org.eclipse.test=r20080925,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.test-feature
+feature at org.eclipse.test=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.test-feature
 
-plugin at org.eclipse.test=v20081002,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.test=v20100118,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.ant.optional.junit=v20080717,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.test.performance=v20090511,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.test.performance=v20100122,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 fragment at org.eclipse.test.performance.win32=v20070530,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 plugin at org.eclipse.test.performance.data=v20050415,kmoir at dev.eclipse.org:/cvsroot/eclipse,
diff --git a/eclipse/maps/org.eclipse.releng/maps/text.map b/eclipse/maps/org.eclipse.releng/maps/text.map
index 673290b..3d881f0 100644
--- a/eclipse/maps/org.eclipse.releng/maps/text.map
+++ b/eclipse/maps/org.eclipse.releng/maps/text.map
@@ -1,16 +1,16 @@
 !***************  TEXT CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.text=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.text=r352_v20091118-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench.texteditor=r352_v20100105,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.editors=v20090527-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.filebuffers=v20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.text=v20100601-1300,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.text=r361_v20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench.texteditor=r361_v20100714-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.editors=r361_v20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.filebuffers=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.examples.javaeditor=v20090528-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.javaeditor=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.text.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.text.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.filebuffers.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench.texteditor.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.editors.tests=v20090513-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jdt.text.tests=v20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.text.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.text.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.filebuffers.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench.texteditor.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.editors.tests=v20100520-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jdt.text.tests=v20100526-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/ui.map b/eclipse/maps/org.eclipse.releng/maps/ui.map
index 9ca72e5..4aa5db9 100644
--- a/eclipse/maps/org.eclipse.releng/maps/ui.map
+++ b/eclipse/maps/org.eclipse.releng/maps/ui.map
@@ -1,43 +1,43 @@
 !***************  UI CONTRIBUTION  ********************************************************* 
 
-plugin at org.eclipse.core.commands=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface=M20100120-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding=M20090819-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.observable=M20090902-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.property=M20090819-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.core.databinding.beans=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.databinding=M20090826-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui=M20100120-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.ide=M20100113-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.ide.application=M20090826-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.presentations.r21=M20091015-0930,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.views=M20090826-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.workbench=M20100113-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.workbench.compatibility=I20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.win32=v20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.carbon=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.ui.cocoa=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.commands=I20100512-1500,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface=M20110210-1200,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.observable=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.property=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.core.databinding.beans=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.databinding=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui=M20110203-1100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.ide=M20101201-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.ide.application=M20100707-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.presentations.r21=I20100517-1500,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.views=M20110202-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.workbench=M20110210-1200,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.workbench.compatibility=I20100511-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.win32=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.carbon=M20101124-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.ui.cocoa=M20101124-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 
-plugin at org.eclipse.jface.examples.databinding=M20090826-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.multipageeditor=I20070605-0010,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.propertysheet=M20100210-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.readmetool=I20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.undo=I20080204-0800a,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.views.properties.tabbed.article=I20060605-1400,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.ui.examples.views.properties.tabbed/org.eclipse.ui.examples.views.properties.tabbed.article
-plugin at org.eclipse.ui.examples.fieldassist=I20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.examples.contributions=I20090526-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.examples.databinding=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.multipageeditor=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.propertysheet=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.readmetool=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.undo=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.views.properties.tabbed.article=I20100517-1500,kmoir at dev.eclipse.org:/cvsroot/eclipse,,org.eclipse.ui.examples.views.properties.tabbed/org.eclipse.ui.examples.views.properties.tabbed.article
+plugin at org.eclipse.ui.examples.fieldassist=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.examples.contributions=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.navigator=M20100120-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.navigator.resources=M20090826-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.navigator=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.navigator.resources=M20101124-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.ui.views.properties.tabbed=I20090429-1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.views.properties.tabbed=I20100509-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.jface.tests.databinding=M20090909-1039,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.jface.tests.databinding.conformance=M20090819-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests=M20100107-0100,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.tests.databinding=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.jface.tests.databinding.conformance=I20090818-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests=M20100825-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 plugin at org.eclipse.ui.tests.rcp=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.navigator=M20100120-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.views.properties.tabbed=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.performance=I20090527-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.harness=I20090525-2000,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.ui.tests.navigator=M20101201-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.views.properties.tabbed=M20110202-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.performance=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.harness=I20100601-0800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/update.map b/eclipse/maps/org.eclipse.releng/maps/update.map
index 4955f4e..ed207b1 100644
--- a/eclipse/maps/org.eclipse.releng/maps/update.map
+++ b/eclipse/maps/org.eclipse.releng/maps/update.map
@@ -1,11 +1,11 @@
 !***************  UPDATE CONTRIBUTION  ******************************************************** 
 
-plugin at org.eclipse.update.configurator=v20090312,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.core=v20090525,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.scheduler=v20081127,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.update.ui=R35x_v20090813,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.configurator=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.core=R36x_v20100629,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.scheduler=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.update.ui=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-fragment at org.eclipse.update.core.win32=v20080107,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-fragment at org.eclipse.update.core.linux=v20081008,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.update.core.win32=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+fragment at org.eclipse.update.core.linux=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
-plugin at org.eclipse.update.tests.core=v20090525,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.update.tests.core=v20100512,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/maps/org.eclipse.releng/maps/userassist.map b/eclipse/maps/org.eclipse.releng/maps/userassist.map
index d8240a3..1ca80e4 100644
--- a/eclipse/maps/org.eclipse.releng/maps/userassist.map
+++ b/eclipse/maps/org.eclipse.releng/maps/userassist.map
@@ -1,25 +1,26 @@
 !***************  UA CONTRIBUTION  *********************************************
 
 !**** Help
-plugin at org.eclipse.help=v20090805_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.appserver=v20090429_1800,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.base=v20090526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.ui=v20090819_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.help.webapp=v20091009_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help=v20100524,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.appserver=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.base=r36_20101123,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.ui=r36_20101116,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.help.webapp=r36_20101130,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Welcome
-plugin at org.eclipse.ui.intro=v20100111_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.intro.universal=v20090526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.intro=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.intro.universal=r36_v20100702,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Cheat sheets
-plugin at org.eclipse.ui.cheatsheets=v20090526,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.cheatsheets=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Browser
-plugin at org.eclipse.ui.browser=v20091215_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.browser=r36_20101216,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Forms
-plugin at org.eclipse.ui.forms=v20090714_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.forms=r36_v20100702,kmoir at dev.eclipse.org:/cvsroot/eclipse,
 
 !**** Tests
-plugin at org.eclipse.ua.tests=v20090805_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
-plugin at org.eclipse.ui.tests.forms=v20090714_35x,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
+plugin at org.eclipse.ua.tests=r36_r20100816,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ua.tests.doc=v20100427,kmoir at dev.eclipse.org:/cvsroot/eclipse,
+plugin at org.eclipse.ui.tests.forms=v20100517,kmoir at dev.eclipse.org:/cvsroot/eclipse,
\ No newline at end of file
diff --git a/eclipse/pluginVersions.properties b/eclipse/pluginVersions.properties
index 3e0abc2..bcf7f7a 100644
--- a/eclipse/pluginVersions.properties
+++ b/eclipse/pluginVersions.properties
@@ -1,292 +1,301 @@
-#Mon Mar 08 13:09:12 EST 2010
-org.eclipse.swt.motif.hpux.PA_RISC,0.0.0=R3_5
-org.eclipse.help.appserver,0.0.0=v20090429_1800
-org.eclipse.ui.forms,0.0.0=v20090714_35x
-org.eclipse.swt.gtk.linux.s390x,0.0.0=v3550b
-org.eclipse.jdt.debug.ui,0.0.0=v20090811_r351
-org.eclipse.jdt.launching.macosx,0.0.0=v20090527
-org.eclipse.equinox.jmx.server.xmlrpc,0.0.0=v20070608
-org.eclipse.equinox.launcher.motif.solaris.sparc,0.0.0=R35x_20090929
-org.eclipse.core.boot,0.0.0=v20080218
-org.eclipse.ui.net,0.0.0=r35x_20090812-1200
-org.eclipse.equinox.launcher.gtk.solaris.x86,0.0.0=R35x_v20090720
-org.eclipse.jdt.apt.pluggable.core,0.0.0=R35x_v20090925-1100
-org.eclipse.swt.examples.paint,0.0.0=v3557f
-org.eclipse.core.net.win32.x86,0.0.0=I20080909
-org.eclipse.core.filesystem.macosx,0.0.0=R35x_v20091203-1235
-org.eclipse.equinox.launcher.motif.linux.x86,0.0.0=R35x_v20100209
-org.eclipse.ui.navigator.resources,0.0.0=M20090826-0800
-org.eclipse.equinox.p2.metadata.repository,0.0.0=R35x_v20090812
-org.eclipse.swt,0.0.0=v3557f
-org.eclipse.swt.win32.win32.x86,0.0.0=v3557f
-org.eclipse.update.ui,0.0.0=R35x_v20090813
-org.eclipse.core.filesystem,0.0.0=R35x_v20091203-1235
-org.eclipse.equinox.registry.jmx,0.0.0=v20080610-1530
-org.eclipse.equinox.io,0.0.0=v20090520-1800
-org.eclipse.equinox.simpleconfigurator.manipulator,0.0.0=R35x_v20100209
-org.eclipse.pde.api.tools.ui,0.0.0=v20090820
-org.eclipse.jdt.debug,0.0.0=v20090526
-org.eclipse.sdk.examples,0.0.0=v20080612
-org.eclipse.pde,0.0.0=v20090527
-org.eclipse.compare.core,0.0.0=I20090430-0408
-org.eclipse.equinox.p2.engine,0.0.0=R35x_v20091117
-org.eclipse.equinox.launcher.motif.hpux.ia64_32,0.0.0=v20090519
-org.eclipse.equinox.http,0.0.0=R35x_v20090728
-org.eclipse.swt.gtk.linux.x86_64,0.0.0=v3557f
-org.eclipse.swt.photon.qnx.x86,0.0.0=v3557f
-org.eclipse.equinox.p2.ui.admin,0.0.0=v20090520-1905
-org.eclipse.equinox.transforms.xslt,0.0.0=R35x_v20100209
-org.eclipse.jface.databinding,0.0.0=M20090826-0800
-org.eclipse.equinox.p2.touchpoint.eclipse,0.0.0=R35x_20090820-1821
-org.eclipse.help.base,0.0.0=v20090526
-org.eclipse.ui.presentations.r21,0.0.0=M20091015-0930
-org.eclipse.equinox.frameworkadmin,0.0.0=v20090520-1905
-org.eclipse.ui.intro,0.0.0=v20100111_35x
-org.eclipse.ltk.ui.refactoring,0.0.0=r352_v20100209
-org.eclipse.swt.examples.ole.win32,0.0.0=v3557f
-org.eclipse.ui.workbench.texteditor,0.0.0=r352_v20100105
-org.eclipse.ui.examples.multipageeditor,0.0.0=I20070605-0010
-org.eclipse.swt.wpf.win32.x86,0.0.0=v3557f
-org.eclipse.core.filesystem.linux.x86,0.0.0=R35x_v20091203-1235
-org.eclipse.ui.examples.javaeditor,0.0.0=v20090528-2000
-org.eclipse.ant.core,0.0.0=v20091110_r352
-org.eclipse.equinox.p2.ui.admin.rcp,0.0.0=v20090820
-org.eclipse.equinox.p2.updatechecker,0.0.0=v20090520-1905
-org.eclipse.debug.core,0.0.0=v20091103_r352
-org.eclipse.ui.examples.views.properties.tabbed.article,0.0.0=I20060605-1400
-org.eclipse.core.databinding,0.0.0=M20090819-0800
-org.eclipse.equinox.transforms.hook,0.0.0=v20090520-1800
-org.eclipse.ui.carbon,0.0.0=I20090525-2000
-org.eclipse.core.contenttype,0.0.0=R35x_v20090826-0451
-org.eclipse.text,0.0.0=v20090513-2000
-org.eclipse.help.ui,0.0.0=v20090819_35x
-org.eclipse.equinox.servletbridge,0.0.0=v20090520-1800
-org.eclipse.jdt.apt.core,0.0.0=R35x_v20091130-2300
-org.eclipse.swt.win32.win32.x86_64,0.0.0=v3557f
-org.eclipse.equinox.metatype,0.0.0=v20090520-1800
-org.eclipse.pde.ua.ui,0.0.0=v20090511
-org.eclipse.equinox.initializer,0.0.0=v20071015
-org.eclipse.jsch.core,0.0.0=I20090430-0408
-org.eclipse.equinox.frameworkadmin.equinox,0.0.0=R35x_v20091214
-org.eclipse.osgi.util,0.0.0=v20090520-1800
-org.eclipse.search,0.0.0=r351_v20090708-0800
-org.eclipse.ui.views,0.0.0=M20090826-0800
-org.eclipse.equinox.simpleconfigurator,0.0.0=R35x_v20090807-1100
-org.eclipse.team.ui,0.0.0=I20090430-0408
-org.eclipse.equinox.p2.metadata,0.0.0=R35x_v20100112
-org.eclipse.swt.cocoa.macosx.x86_64,0.0.0=v3557f
-org.eclipse.jdt.compiler.tool,0.0.0=v_981_R35x
-org.eclipse.platform,0.0.0=R35x_v20100121
-org.eclipse.core.databinding.observable,0.0.0=M20090902-0800
-org.eclipse.team.examples.filesystem,0.0.0=I20090210-0800
-org.eclipse.pde.core,0.0.0=v20100104
-org.eclipse.ui.workbench,0.0.0=M20100113-0800
-org.eclipse.core.runtime,0.0.0=v20090525
-org.eclipse.core.resources.win32.x86,0.0.0=v20081020
-org.eclipse.equinox.launcher.gtk.linux.x86_64,0.0.0=v20090519
-org.eclipse.help,0.0.0=v20090805_35x
-org.eclipse.pde.api.tools.ee.j2se15,0.0.0=v20090407-1030
-org.junit4,0.0.0=v20090824
-org.eclipse.update.scheduler,0.0.0=v20081127
-org.eclipse.equinox.launcher.gtk.linux.s390,0.0.0=v20090426-1530
-org.eclipse.pde.junit.runtime,0.0.0=v20090527
-org.eclipse.osgi.services,0.0.0=v20090520-1800
-org.eclipse.swt.examples.layouts,0.0.0=v3557f
-org.eclipse.jface,0.0.0=M20100120-0800
-org.eclipse.pde.api.tools.ee.osgiminimum10,0.0.0=v20090407-1030
-org.eclipse.equinox.jmx.server,0.0.0=v20071015
-org.eclipse.equinox.jmx.server.rmi,0.0.0=v20070510
-org.eclipse.jdt.ui,0.0.0=r352_v20100106-0800
-org.eclipse.equinox.security,0.0.0=v20090520-1800
-org.eclipse.equinox.launcher,0.0.0=R35x_v20090715
-org.eclipse.core.runtime.compatibility.registry,0.0.0=v20090429-1800
-org.eclipse.equinox.http.jetty,2.0.0=v20090520-1800
-org.eclipse.jdt.launching,0.0.0=v20100108_r352
-org.eclipse.ui.console,0.0.0=v20090513
-org.eclipse.swt.gtk.linux.s390,0.0.0=v3550b
-org.eclipse.jdt.apt.ui,0.0.0=v20090930-2100_R35x
-org.eclipse.ui.examples.fieldassist,0.0.0=I20090526-2000
-org.eclipse.ui.ide.application,0.0.0=M20090826-0800
-org.eclipse.equinox.launcher.gtk.linux.ppc,0.0.0=v20090519
-org.eclipse.equinox.launcher.carbon.macosx,0.0.0=v20090520-1835
-org.eclipse.jdt.junit,0.0.0=r352_v20100113-0800
-org.eclipse.pde.api.tools,0.0.0=v20090714
-org.eclipse.core.runtime.compatibility,0.0.0=v20090413
-org.eclipse.equinox.p2.directorywatcher,0.0.0=v20090525
-org.eclipse.equinox.launcher.gtk.solaris.sparc,0.0.0=R35x_v20090720
-org.eclipse.core.filesystem.hpux.ia64_32,0.0.0=v20080604-1400
-org.eclipse.swt.motif.aix.ppc,0.0.0=v3557f
-org.eclipse.ui.examples.undo,0.0.0=I20080204-0800a
-org.eclipse.ui.cocoa,0.0.0=I20090525-2000
-org.eclipse.core.filesystem.qnx.x86,0.0.0=v20080604-1400
-org.eclipse.equinox.http.registry,0.0.0=v20090520-1800
-org.eclipse.pde.api.tools.ee.jre11,0.0.0=v20090407-1030
-org.eclipse.equinox.jsp.jasper,0.0.0=v20090520-1800
-org.eclipse.pde.api.tools.ee.j2se14,0.0.0=v20090407-1030
-org.eclipse.equinox.p2.ui,0.0.0=R35x_v20090819
-org.eclipse.jdt.launching.ui.macosx,0.0.0=v20090527
-org.eclipse.equinox.p2.ui.sdk,0.0.0=v20090520-1905
-org.eclipse.compare.examples,0.0.0=v20060606
-org.eclipse.pde.ua.core,0.0.0=v20090429-1800
-org.eclipse.platform.doc.isv,0.0.0=r352_v20100119
-org.eclipse.equinox.p2.tools,0.0.0=v20090525
-org.eclipse.compare,0.0.0=r35x_20100113-0800
-org.eclipse.equinox.http.servletbridge,0.0.0=v20090520-1800
-org.eclipse.jdt.compiler.apt,0.0.0=R35x_v20090925-1100
-org.eclipse.help.webapp,0.0.0=v20091009_35x
-org.eclipse.pde.ui.templates,0.0.0=v20090527
-org.eclipse.equinox.p2.repository,0.0.0=R35x_v20100105
-org.eclipse.equinox.p2.metadata.generator,0.0.0=R35x_20100114
-org.eclipse.equinox.p2.director.app,0.0.0=R35x_v20091106
-org.eclipse.equinox.launcher.motif.aix.ppc,0.0.0=R35x_v20091211
-org.eclipse.equinox.app,0.0.0=R35x_v20091203
-org.eclipse.swt.motif.hpux.ia64_32,0.0.0=v3557f
-org.eclipse.swt.gtk.solaris.x86,0.0.0=v3557f
-org.eclipse.pde.ds.ui,0.0.0=v20100209-maintenance
-org.eclipse.core.net.linux.x86,0.0.0=I20081021
-org.eclipse.equinox.p2.console,0.0.0=v20090520-1905
-org.eclipse.swt.examples.browser.demos,0.0.0=v3557f
-org.eclipse.equinox.launcher.cocoa.macosx.x86_64,0.0.0=R35x_v20090707
-org.eclipse.releng.tools,0.0.0=R35x_v20090812
-org.eclipse.pde.doc.user,0.0.0=v20090818
-org.eclipse.swt.motif.linux.x86,0.0.0=v3557f
-org.eclipse.jface.examples.databinding,0.0.0=M20090826-0800
-org.eclipse.equinox.jmx.client.rmi,0.0.0=v20080610-1530
-org.eclipse.debug.ui,0.0.0=v20091028_r352
-org.eclipse.core.net,0.0.0=r35x_20090812-1200
-org.eclipse.core.filesystem.solaris.sparc,0.0.0=R35x_v20091203-1235
-org.eclipse.equinox.p2.touchpoint.natives,0.0.0=R35x_v20090806
-org.eclipse.pde.api.tools.ee.cdcfoundation11,0.0.0=v20090407-1030
-org.eclipse.equinox.launcher.win32.win32.ia64,0.0.0=v20090519
-org.eclipse.swt.examples.browser,0.0.0=v3557f
-org.eclipse.core.filesystem.linux.x86_64,0.0.0=R35x_v20091203-1235
-org.eclipse.equinox.event,0.0.0=R35x_v20100209
-org.eclipse.ui.ide,0.0.0=M20100113-0800
-org.eclipse.ui.views.log,0.0.0=v20090731
-org.eclipse.equinox.p2.jarprocessor,0.0.0=v20090520-1905
-org.eclipse.ui.browser,0.0.0=v20091215_35x
-org.eclipse.core.expressions,0.0.0=R35x_v20100209
-org.eclipse.core.databinding.beans,0.0.0=I20090525-2000
-org.eclipse.equinox.ds,0.0.0=R35x_v20090806
-org.eclipse.equinox.launcher.win32.win32.x86_64,0.0.0=v20090519
-org.eclipse.equinox.launcher.gtk.linux.x86,0.0.0=v20090520
-org.eclipse.update.core.linux,0.0.0=v20081008
-org.eclipse.core.databinding.property,0.0.0=M20090819-0800
-org.eclipse.ui.examples.propertysheet,0.0.0=M20100210-0800
-org.eclipse.core.jobs,0.0.0=v20090429-1800
-org.eclipse.swt.gtk.linux.ppc,0.0.0=v3557f
-org.eclipse.swt.carbon.macosx,0.0.0=v3557f
-org.eclipse.jdt.ui.examples.projects,0.0.0=v20090603
-org.eclipse.pde.runtime,0.0.0=v20090731
-org.eclipse.pde.build,0.0.0=R35x_20100114
-org.eclipse.equinox.p2.reconciler.dropins,0.0.0=v20090520-1905
-org.eclipse.equinox.device,0.0.0=v20090520-1800
-org.eclipse.core.commands,0.0.0=I20090525-2000
-org.eclipse.equinox.p2.repository.tools,0.0.0=R35x_20100111
-org.eclipse.equinox.launcher.gtk.linux.s390x,0.0.0=v20090426-1530
-org.eclipse.update.core,0.0.0=v20090525
-org.eclipse.team.core,0.0.0=r35x_20100113-0800
-org.eclipse.debug.examples.ui,0.0.0=v20090519
-org.eclipse.pde.api.tools.ee.javase16,0.0.0=v20090407-1030
-org.eclipse.compare.win32,0.0.0=I20090430-0408
-org.eclipse.equinox.p2.installer,0.0.0=R35x_v20090717
-org.eclipse.debug.examples.core,0.0.0=v20090504
-org.eclipse.rcp,0.0.0=R35x_v20100119
-org.eclipse.pde.ds.core,0.0.0=v20100118
-org.eclipse.equinox.registry,0.0.0=v20090520-1800
-org.eclipse.ui.examples.readmetool,0.0.0=I20090526-2000
-org.eclipse.jdt.core.manipulation,0.0.0=v20090603
-org.eclipse.equinox.http.servlet,0.0.0=v20090520-1800
-org.eclipse.equinox.launcher.win32.win32.x86,0.0.0=v20090519
-org.eclipse.equinox.launcher.motif.hpux.PA_RISC,0.0.0=v20090306-1900
-org.eclipse.jdt.junit.runtime,0.0.0=v20090513-2000
-org.eclipse.swt.examples.controls,0.0.0=v3557f
-org.eclipse.core.filesystem.linux.ppc,0.0.0=v20080604-1400
-org.eclipse.osgi.jmx,0.0.0=v20080610-1530
-org.eclipse.ui.workbench.compatibility,0.0.0=I20090429-1800
-org.eclipse.equinox.p2.exemplarysetup,0.0.0=v20090520-1905
-org.eclipse.core.filesystem.aix.ppc,0.0.0=R35x_v20091203-1235
-org.eclipse.swt.cocoa.macosx,0.0.0=v3557f
-org.eclipse.ui,0.0.0=M20100120-0800
-org.eclipse.equinox.jmx.client.xmlrpc,0.0.0=v20070515
-org.eclipse.swt.win32.wce_ppc.arm,0.0.0=v3557f
-org.eclipse.compare.examples.xml,0.0.0=I20080604
-org.eclipse.equinox.jsp.jasper.registry,0.0.0=v20090520-1800
-org.eclipse.core.resources,0.0.0=R35x_v20091203-1235
-org.eclipse.team.cvs.ssh2,0.0.0=I20090508-2000
-org.eclipse.equinox.wireadmin,0.0.0=v20090520-1800
-org.eclipse.ant.ui,0.0.0=v20091204_r352
-org.eclipse.swt.gtk.solaris.sparc,0.0.0=v3557f
-org.eclipse.core.net.win32.x86_64,0.0.0=I20090306-1030
-org.eclipse.swt.examples.launcher,0.0.0=v3557f
-org.eclipse.equinox.preferences.jmx,0.0.0=v20070510
-org.eclipse.equinox.p2.garbagecollector,0.0.0=v20090520-1905
-org.eclipse.equinox.cm,0.0.0=v20090520-1800
-org.eclipse.equinox.common,0.0.0=R35x_v20090807-1100
-org.eclipse.equinox.p2.director,0.0.0=R35x_v20100112
-org.eclipse.equinox.p2.publisher,0.0.0=R35x_20100105
-org.eclipse.jdt.doc.isv,0.0.0=r351_v20090831
-org.eclipse.ltk.core.refactoring,0.0.0=v20090513-2000
-org.eclipse.jdt.core,0.0.0=v_981_R35x
-org.eclipse.equinox.p2.updatesite,0.0.0=R35x_20100105
-org.eclipse.update.configurator,0.0.0=v20090312
-org.eclipse.core.filesystem.win32.x86,0.0.0=v20080604-1400
-org.eclipse.equinox.p2.core,0.0.0=R35x_v20090819
-org.eclipse.swt.examples,0.0.0=v3557f
-org.eclipse.cvs,0.0.0=R35x_v20100119
-org.eclipse.swt.gtk.linux.x86,0.0.0=v3557f
-org.eclipse.equinox.log,0.0.0=v20090520-1800
-org.eclipse.equinox.jmx.client,0.0.0=v20070515
-org.eclipse.ui.win32,0.0.0=v20090429-1800
-org.eclipse.ui.views.properties.tabbed,0.0.0=I20090429-1800
-org.eclipse.equinox.security.ui,0.0.0=v20090520-1800
-org.eclipse.pde.api.tools.ee.j2se13,0.0.0=v20090407-1030
-org.eclipse.swt.motif.solaris.sparc,0.0.0=v3557f
-org.eclipse.equinox.util,0.0.0=v20090520-1800
-org.eclipse.equinox.p2.extensionlocation,0.0.0=v20090520-1905
-org.eclipse.pde.api.tools.ee.osgiminimum12,0.0.0=v20090407-1030
-org.eclipse.equinox.concurrent,0.0.0=R35x_v20100209
-org.eclipse.platform.doc.user,0.0.0=r352_v20091111-0800
-org.eclipse.equinox.security.macosx,0.0.0=v20090520-1800
-org.eclipse.equinox.supplement,0.0.0=v20090518
-org.eclipse.team.cvs.ssh,0.0.0=I20090508-2000
-org.eclipse.sdk,0.0.0=R35x_v20100204
-org.eclipse.jsch.ui,0.0.0=r35x_20100210-1114
-org.eclipse.core.filesystem.win32.x86_64,0.0.0=v20090316-0910
-org.eclipse.equinox.security.win32.x86,0.0.0=v20090520-1800
-org.eclipse.core.variables,0.0.0=v20090521
-org.eclipse.pde.ui,0.0.0=v201001121200
-org.eclipse.equinox.p2.artifact.repository,0.0.0=R35x_v20090721
-org.eclipse.core.runtime.compatibility.auth,0.0.0=v20090413
-org.eclipse.osgi,0.0.0=R35x_v20100126
-org.eclipse.ui.intro.universal,0.0.0=v20090526
-org.eclipse.swt.jmx,0.0.0=v20090331
-org.eclipse.swt.tools,0.0.0=v3557f
-org.eclipse.equinox.launcher.cocoa.macosx,0.0.0=R35x_v20090707
-org.eclipse.ui.examples.contributions,0.0.0=I20090526-2000
-org.eclipse.team.cvs.ui,0.0.0=r35x_20090930-0800
-org.eclipse.ui.cheatsheets,0.0.0=v20090526
-org.eclipse.jdt.doc.user,0.0.0=r352_v20091015
-org.eclipse.equinox.useradmin,0.0.0=v20090520-1800
-org.eclipse.jface.text,0.0.0=r352_v20091118-0800
-org.eclipse.core.resources.jmx,0.0.0=v20070510
-org.eclipse.update.core.win32,0.0.0=v20080107
-org.eclipse.ui.externaltools,0.0.0=v20090504
-org.eclipse.jdt.junit4.runtime,0.0.0=v20090513-2000
-org.eclipse.pde.api.tools.ee.j2se12,0.0.0=v20090407-1030
-org.eclipse.pde.api.tools.ee.osgiminimum11,0.0.0=v20090407-1030
-org.eclipse.ui.navigator,0.0.0=M20100120-0800
-org.eclipse.equinox.http.jetty,1.1.100=v20090520-1800
-org.eclipse.core.resources.compatibility,0.0.0=R35x_v20100113-0530
-org.eclipse.team.cvs.core,0.0.0=I20090430-0408
-org.eclipse.core.filesystem.hpux.PA_RISC,0.0.0=v20080604-1400
-org.eclipse.pde.api.tools.ee.cdcfoundation10,0.0.0=v20090407-1030
-org.eclipse.equinox.launcher.wpf.win32.x86,0.0.0=v20090519
-org.eclipse.equinox.preferences,0.0.0=R35x_v20091117
-org.eclipse.equinox.jmx.common,0.0.0=R35x_v20100209
-org.eclipse.equinox.jmx.vm,0.0.0=v20070515
-org.eclipse.equinox.p2.ui.sdk.scheduler,0.0.0=v20090520-1905
-org.eclipse.ui.editors,0.0.0=v20090527-2000
-org.eclipse.core.filebuffers,0.0.0=v20090526-2000
-org.eclipse.equinox.ip,0.0.0=R35x_v20090803
-org.eclipse.jdt,0.0.0=r352_v20100106-0800
+#Tue Mar 08 14:12:31 EST 2011
+org.eclipse.help.appserver,0.0.0=v20100427
+org.eclipse.ui.forms,0.0.0=r36_v20100702
+org.eclipse.swt.gtk.linux.s390x,0.0.0=v3659b
+org.eclipse.jdt.debug.ui,0.0.0=v20100928a_r362
+org.eclipse.jdt.launching.macosx,0.0.0=v20100505
+org.eclipse.equinox.jmx.server.xmlrpc,0.0.0=v20100503
+org.eclipse.equinox.launcher.motif.solaris.sparc,0.0.0=R36x_v20101019_1345
+org.eclipse.equinox.launcher.gtk.aix.ppc64,0.0.0=R36x_v20101102
+org.eclipse.core.boot,0.0.0=v20100505
+org.eclipse.ui.net,0.0.0=I20100505-1245
+org.eclipse.equinox.launcher.gtk.solaris.x86,0.0.0=R36x_v20101019_1345
+org.eclipse.jdt.apt.pluggable.core,0.0.0=R36_v20100727-0110
+org.eclipse.swt.examples.paint,0.0.0=v3659b
+org.eclipse.core.net.win32.x86,0.0.0=I20100511-0800
+org.eclipse.core.filesystem.macosx,0.0.0=v20100505
+org.eclipse.equinox.launcher.motif.linux.x86,0.0.0=R36x_v20101019_1345
+org.eclipse.ui.navigator.resources,0.0.0=M20101124-0800
+org.eclipse.equinox.p2.metadata.repository,0.0.0=v20100513
+org.eclipse.swt,0.0.0=v3659c
+org.eclipse.swt.win32.win32.x86,0.0.0=v3659c
+org.eclipse.update.ui,0.0.0=v20100512
+org.eclipse.core.filesystem,0.0.0=R36x_v20100727-0745
+org.eclipse.core.externaltools,0.0.0=v20100831_r361
+org.eclipse.equinox.registry.jmx,0.0.0=v20100503
+org.eclipse.equinox.io,0.0.0=v20100503
+org.eclipse.equinox.simpleconfigurator.manipulator,0.0.0=v20100503
+org.eclipse.pde.api.tools.ui,0.0.0=v20100820_r361
+org.eclipse.jdt.debug,0.0.0=v20100715_r361
+org.eclipse.sdk.examples,0.0.0=v20100527
+org.eclipse.pde,0.0.0=v20100625_r361
+org.eclipse.compare.core,0.0.0=R36x_v20100929-0800
+org.eclipse.equinox.p2.engine,0.0.0=R36x_v20110201
+org.eclipse.equinox.launcher.motif.hpux.ia64_32,0.0.0=R36x_v20101019_1345
+org.eclipse.equinox.http,0.0.0=v20100503
+org.eclipse.swt.gtk.linux.x86_64,0.0.0=v3659b
+org.eclipse.swt.photon.qnx.x86,0.0.0=v3659b
+org.eclipse.equinox.p2.ui.admin,0.0.0=v20100503
+org.eclipse.equinox.weaving.caching.j9,0.0.0=v20100503
+org.eclipse.equinox.transforms.xslt,0.0.0=v20100503
+org.eclipse.jface.databinding,0.0.0=I20100601-0800
+org.eclipse.equinox.p2.touchpoint.eclipse,0.0.0=R36x_v20101202
+org.eclipse.help.base,0.0.0=r36_20101123
+org.eclipse.ui.presentations.r21,0.0.0=I20100517-1500
+org.eclipse.equinox.frameworkadmin,0.0.0=v20100503
+org.eclipse.pde.launching,0.0.0=v20100601
+org.eclipse.ui.intro,0.0.0=v20100427
+org.eclipse.ltk.ui.refactoring,0.0.0=v20100526-0800
+org.eclipse.swt.examples.ole.win32,0.0.0=v3659b
+org.eclipse.ui.workbench.texteditor,0.0.0=r361_v20100714-0800
+org.eclipse.ui.examples.multipageeditor,0.0.0=I20100509-0800
+org.eclipse.core.filesystem.linux.x86,0.0.0=v20100505-1235
+org.eclipse.equinox.p2.ui.discovery,0.0.0=v20100519
+org.eclipse.ui.examples.javaeditor,0.0.0=v20100520-0800
+org.eclipse.ant.core,0.0.0=v20110203_r362
+org.eclipse.equinox.p2.ui.admin.rcp,0.0.0=R36x_v20100823
+org.eclipse.equinox.p2.updatechecker,0.0.0=R36x_v20100823
+org.eclipse.debug.core,0.0.0=v20100519
+org.eclipse.ui.examples.views.properties.tabbed.article,0.0.0=I20100517-1500
+org.eclipse.core.databinding,0.0.0=I20100601-0800
+org.eclipse.equinox.transforms.hook,0.0.0=v20100503
+org.eclipse.ui.carbon,0.0.0=M20101124-0800
+org.eclipse.core.contenttype,0.0.0=v20100505-1235
+org.eclipse.text,0.0.0=v20100601-1300
+org.eclipse.help.ui,0.0.0=r36_20101116
+org.eclipse.equinox.servletbridge,0.0.0=v20100503
+org.eclipse.jdt.apt.core,0.0.0=R36_v20110120-1000
+org.eclipse.swt.win32.win32.x86_64,0.0.0=v3659c
+org.eclipse.equinox.metatype,0.0.0=v20100503
+org.eclipse.pde.ua.ui,0.0.0=v20100504
+org.eclipse.equinox.initializer,0.0.0=v20100503
+org.eclipse.jsch.core,0.0.0=I20100505-1245
+org.eclipse.equinox.frameworkadmin.equinox,0.0.0=v20100505
+org.eclipse.osgi.util,0.0.0=v20100503
+org.eclipse.search,0.0.0=v20100520-0800
+org.eclipse.ui.views,0.0.0=M20110202-0800
+org.eclipse.equinox.simpleconfigurator,0.0.0=v20100503
+org.eclipse.team.ui,0.0.0=R36x_v20110203-1036
+org.eclipse.equinox.p2.metadata,0.0.0=R36x_v20101202
+org.eclipse.swt.cocoa.macosx.x86_64,0.0.0=v3659b
+org.eclipse.swt.gtk.linux.ppc64,0.0.0=v3659b
+org.eclipse.jdt.compiler.tool,0.0.0=v_A76_R36x
+org.eclipse.platform,0.0.0=r362_v20110120
+org.eclipse.core.databinding.observable,0.0.0=I20100601-0800
+org.eclipse.equinox.weaving.aspectj,0.0.0=v20100503
+org.eclipse.team.examples.filesystem,0.0.0=I20100526-0800
+org.eclipse.pde.core,0.0.0=v20110210_r362
+org.eclipse.ui.workbench,0.0.0=M20110210-1200
+org.eclipse.core.runtime,0.0.0=v20100505
+org.eclipse.core.resources.win32.x86,0.0.0=v20100505-1345
+org.eclipse.equinox.launcher.gtk.linux.x86_64,0.0.0=R36x_v20101019_1345
+org.eclipse.help,0.0.0=v20100524
+org.eclipse.pde.api.tools.ee.j2se15,0.0.0=v20100506-0900
+org.junit4,0.0.0=v20100525
+org.eclipse.update.scheduler,0.0.0=v20100512
+org.eclipse.equinox.launcher.gtk.linux.s390,0.0.0=R36x_v20110125
+org.eclipse.pde.junit.runtime,0.0.0=v20100601
+org.eclipse.osgi.services,0.0.0=v20100503
+org.eclipse.swt.examples.layouts,0.0.0=v3659b
+org.eclipse.jface,0.0.0=M20110210-1200
+org.eclipse.equinox.p2.discovery,0.0.0=v20100503
+org.eclipse.pde.api.tools.ee.osgiminimum10,0.0.0=v20100506-0900
+org.eclipse.equinox.jmx.server,0.0.0=v20100503
+org.eclipse.equinox.jmx.server.rmi,0.0.0=v20100503
+org.eclipse.jdt.ui,0.0.0=r362_v20110203
+org.eclipse.equinox.security,0.0.0=v20100503
+org.eclipse.equinox.launcher,0.0.0=R36x_v20101122_1400
+org.eclipse.core.runtime.compatibility.registry,0.0.0=v20100520
+org.eclipse.jdt.junit.core,0.0.0=r361_v20100825-0800
+org.eclipse.equinox.http.jetty,2.0.0=v20100503
+org.eclipse.jdt.launching,0.0.0=v20110105_r362
+org.eclipse.equinox.p2.ql,0.0.0=v20100503a
+org.eclipse.ui.console,0.0.0=v20100526
+org.eclipse.equinox.weaving.caching,0.0.0=v20100503
+org.eclipse.swt.gtk.linux.s390,0.0.0=v3659b
+org.eclipse.jdt.apt.ui,0.0.0=v20100513-0845
+org.eclipse.equinox.p2.discovery.compatibility,0.0.0=v20110204-1323
+org.eclipse.ui.examples.fieldassist,0.0.0=I20100601-0800
+org.eclipse.ui.ide.application,0.0.0=M20100707-0800
+org.eclipse.equinox.launcher.gtk.linux.ppc,0.0.0=R36x_v20101019_1345
+org.eclipse.equinox.launcher.carbon.macosx,0.0.0=R36x_v20101019_1345
+org.eclipse.jdt.junit,0.0.0=r361_v20100825-0800
+org.eclipse.pde.api.tools,0.0.0=v20100820_r361
+org.eclipse.core.runtime.compatibility,0.0.0=v20100505
+org.eclipse.equinox.p2.directorywatcher,0.0.0=R36x_v20101220
+org.eclipse.equinox.launcher.gtk.solaris.sparc,0.0.0=R36x_v20101019_1345
+org.eclipse.core.filesystem.hpux.ia64_32,0.0.0=v20100505
+org.eclipse.swt.motif.aix.ppc,0.0.0=v3659b
+org.eclipse.ui.examples.undo,0.0.0=I20100509-0800
+org.eclipse.ui.cocoa,0.0.0=M20101124-0800
+org.eclipse.equinox.http.registry,0.0.0=R36x_v20101103
+org.eclipse.pde.api.tools.ee.jre11,0.0.0=v20100506-0900
+org.eclipse.core.net.linux.x86_64,0.0.0=I20100505-1245
+org.eclipse.equinox.jsp.jasper,0.0.0=R36x_v20101103
+org.eclipse.pde.api.tools.ee.j2se14,0.0.0=v20100506-0900
+org.eclipse.equinox.p2.ui,0.0.0=v20100518
+org.eclipse.jdt.launching.ui.macosx,0.0.0=v20100505
+org.eclipse.equinox.p2.ui.sdk,0.0.0=v20100513
+org.eclipse.compare.examples,0.0.0=I20100505-1245
+org.eclipse.pde.ua.core,0.0.0=v20100504
+org.eclipse.platform.doc.isv,0.0.0=r362_v20110111
+org.eclipse.ant.launching,0.0.0=v20101020_r362
+org.eclipse.equinox.p2.operations,0.0.0=v20100510
+org.eclipse.compare,0.0.0=R36x_v20100929-0800
+org.eclipse.equinox.http.servletbridge,0.0.0=v20100503
+org.eclipse.jdt.compiler.apt,0.0.0=v20100513-0845
+org.eclipse.help.webapp,0.0.0=r36_20101130
+org.eclipse.pde.ui.templates,0.0.0=v20100601
+org.eclipse.equinox.p2.repository,0.0.0=R36x_v20110111-1500
+org.eclipse.equinox.p2.metadata.generator,0.0.0=R36x_v20101208-1400
+org.eclipse.equinox.p2.director.app,0.0.0=R36x_v20100823
+org.eclipse.equinox.launcher.motif.aix.ppc,0.0.0=R36x_v20101019_1345
+org.eclipse.equinox.app,0.0.0=R36x_v20100803
+org.eclipse.swt.motif.hpux.ia64_32,0.0.0=v3659b
+org.eclipse.swt.gtk.solaris.x86,0.0.0=v3659b
+org.eclipse.pde.ds.ui,0.0.0=v20100601
+org.eclipse.core.net.linux.x86,0.0.0=R36x_v20100825-0800
+org.eclipse.equinox.p2.console,0.0.0=v20100601
+org.eclipse.equinox.http.jetty,0.0.0=v20100503
+org.eclipse.swt.examples.browser.demos,0.0.0=v3659b
+org.eclipse.equinox.launcher.cocoa.macosx.x86_64,0.0.0=R36x_v20101019_1345
+org.eclipse.releng.tools,0.0.0=v20100531
+org.eclipse.pde.doc.user,0.0.0=v20101118_r362
+org.eclipse.swt.motif.linux.x86,0.0.0=v3659b
+org.eclipse.jface.examples.databinding,0.0.0=I20100601-0800
+org.eclipse.equinox.jmx.client.rmi,0.0.0=v20100503
+org.eclipse.equinox.weaving.hook,0.0.0=v20100503
+org.eclipse.debug.ui,0.0.0=v20101201_r362
+org.eclipse.core.net,0.0.0=I20100511-0800
+org.eclipse.core.filesystem.solaris.sparc,0.0.0=v20100505-1235
+org.eclipse.equinox.p2.touchpoint.natives,0.0.0=R36x_v20110111
+org.eclipse.pde.api.tools.ee.cdcfoundation11,0.0.0=v20100506-0900
+org.eclipse.equinox.launcher.win32.win32.ia64,0.0.0=R36x_v20101222
+org.eclipse.swt.examples.browser,0.0.0=v3659b
+org.eclipse.core.filesystem.linux.x86_64,0.0.0=v20100505-1235
+org.eclipse.equinox.event,0.0.0=v20100503
+org.eclipse.ui.ide,0.0.0=M20101201-0800
+org.eclipse.ui.views.log,0.0.0=v20110210_r362
+org.eclipse.equinox.p2.jarprocessor,0.0.0=v20100503a
+org.eclipse.ui.browser,0.0.0=r36_20101216
+org.eclipse.core.expressions,0.0.0=v20100505
+org.eclipse.core.databinding.beans,0.0.0=I20100601-0800
+org.eclipse.equinox.ds,0.0.0=R36x_v20100803
+org.eclipse.equinox.launcher.win32.win32.x86_64,0.0.0=R36x_v20101222
+org.eclipse.equinox.launcher.gtk.linux.x86,0.0.0=R36x_v20101019_1345
+org.eclipse.update.core.linux,0.0.0=v20100512
+org.eclipse.core.databinding.property,0.0.0=I20100601-0800
+org.eclipse.ui.examples.propertysheet,0.0.0=I20100509-0800
+org.eclipse.core.jobs,0.0.0=R36x_v20100824
+org.eclipse.swt.gtk.linux.ppc,0.0.0=v3659b
+org.eclipse.swt.carbon.macosx,0.0.0=v3659b
+org.eclipse.pde.runtime,0.0.0=v20100601
+org.eclipse.pde.build,0.0.0=R36x_20110203
+org.eclipse.equinox.p2.reconciler.dropins,0.0.0=R36x_v20110114
+org.eclipse.equinox.device,0.0.0=v20100503
+org.eclipse.core.commands,0.0.0=I20100512-1500
+org.eclipse.equinox.p2.repository.tools,0.0.0=R36x_v20100823
+org.eclipse.equinox.launcher.gtk.linux.s390x,0.0.0=R36x_v20110125
+org.eclipse.update.core,0.0.0=R36x_v20100629
+org.eclipse.team.core,0.0.0=R36x_v20110203-1036
+org.eclipse.debug.examples.ui,0.0.0=v20100526
+org.eclipse.pde.api.tools.ee.javase16,0.0.0=v20100506-0900
+org.eclipse.compare.win32,0.0.0=R36x_v20101103-0618
+org.eclipse.equinox.p2.installer,0.0.0=v20100503a
+org.eclipse.debug.examples.core,0.0.0=v20100505
+org.eclipse.rcp,0.0.0=v20100527-0800
+org.eclipse.pde.ds.core,0.0.0=v20100601
+org.eclipse.equinox.registry,0.0.0=v20100503
+org.eclipse.ui.examples.readmetool,0.0.0=I20100509-0800
+org.eclipse.jdt.core.manipulation,0.0.0=v20100520-0800
+org.eclipse.equinox.http.servlet,0.0.0=v20100503
+org.eclipse.equinox.launcher.win32.win32.x86,0.0.0=R36x_v20101222
+org.eclipse.jdt.junit.runtime,0.0.0=v20100526-0800
+org.eclipse.swt.examples.controls,0.0.0=v3659b
+org.eclipse.core.filesystem.linux.ppc,0.0.0=v20100505-1235
+org.eclipse.osgi.jmx,0.0.0=v20100503
+org.eclipse.ui.workbench.compatibility,0.0.0=I20100511-0800
+org.eclipse.core.filesystem.aix.ppc,0.0.0=v20100505-1235
+org.eclipse.swt.cocoa.macosx,0.0.0=v3659b
+org.eclipse.ui,0.0.0=M20110203-1100
+org.eclipse.equinox.jmx.client.xmlrpc,0.0.0=v20100503
+org.eclipse.swt.win32.wce_ppc.arm,0.0.0=v3659c
+org.eclipse.compare.examples.xml,0.0.0=I20100505-1245
+org.eclipse.equinox.jsp.jasper.registry,0.0.0=v20100503
+org.eclipse.core.resources,0.0.0=R36x_v20110131-1630
+org.eclipse.team.cvs.ssh2,0.0.0=I20100526-0800
+org.eclipse.equinox.wireadmin,0.0.0=v20100503
+org.eclipse.ant.ui,0.0.0=v20100427
+org.eclipse.swt.gtk.solaris.sparc,0.0.0=v3659b
+org.eclipse.core.net.win32.x86_64,0.0.0=I20100505-1245
+org.eclipse.swt.examples.launcher,0.0.0=v3659b
+org.eclipse.equinox.preferences.jmx,0.0.0=v20100503
+org.eclipse.equinox.p2.garbagecollector,0.0.0=v20100503
+org.eclipse.equinox.cm,0.0.0=v20100520
+org.eclipse.equinox.common,0.0.0=v20100503
+org.eclipse.equinox.p2.director,0.0.0=R36x_v20101117-1018
+org.eclipse.equinox.p2.publisher,0.0.0=v20100824-2220
+org.eclipse.jdt.doc.isv,0.0.0=r362_v20101117-0800
+org.eclipse.ltk.core.refactoring,0.0.0=r362_v20101117-0800
+org.eclipse.jdt.core,0.0.0=v_A76_R36x
+org.eclipse.equinox.p2.updatesite,0.0.0=R36x_v20100823
+org.eclipse.update.configurator,0.0.0=v20100512
+org.eclipse.core.filesystem.win32.x86,0.0.0=R36x_v20100727-0745
+org.eclipse.equinox.p2.core,0.0.0=R36x_v20110111
+org.eclipse.swt.examples,0.0.0=v3659b
+org.eclipse.cvs,0.0.0=v20100414
+org.eclipse.swt.gtk.linux.x86,0.0.0=v3659b
+org.eclipse.equinox.log,0.0.0=v20100503
+org.eclipse.equinox.jmx.client,0.0.0=v20100503
+org.eclipse.ui.win32,0.0.0=I20100509-0800
+org.eclipse.ui.views.properties.tabbed,0.0.0=I20100509-0800
+org.eclipse.equinox.security.ui,0.0.0=v20100503
+org.eclipse.pde.api.tools.ee.j2se13,0.0.0=v20100506-0900
+org.eclipse.swt.motif.solaris.sparc,0.0.0=v3659b
+org.eclipse.equinox.util,0.0.0=v20100503
+org.eclipse.equinox.p2.extensionlocation,0.0.0=v20100518
+org.eclipse.pde.api.tools.ee.osgiminimum12,0.0.0=v20100506-0900
+org.eclipse.equinox.concurrent,0.0.0=v20100503
+org.eclipse.platform.doc.user,0.0.0=r362_v20101117-0800
+org.eclipse.equinox.security.macosx,0.0.0=v20100503
+org.eclipse.equinox.supplement,0.0.0=R36x_v20101021
+org.eclipse.sdk,0.0.0=r362_v20110202
+org.eclipse.equinox.launcher.gtk.linux.ppc64,0.0.0=R36x_v20101019_1345
+org.eclipse.jsch.ui,0.0.0=I20100505-1245
+org.eclipse.core.filesystem.win32.x86_64,0.0.0=R36x_v20100727-0745
+org.eclipse.equinox.security.win32.x86,0.0.0=v20100503
+org.eclipse.core.variables,0.0.0=v20100505
+org.eclipse.pde.ui,0.0.0=v20110210_r362
+org.eclipse.equinox.p2.artifact.repository,0.0.0=R36x_v20100901
+org.eclipse.core.runtime.compatibility.auth,0.0.0=v20100517
+org.eclipse.osgi,0.0.0=R36x_v20110210
+org.eclipse.ui.intro.universal,0.0.0=r36_v20100702
+org.eclipse.swt.jmx,0.0.0=v20100503
+org.eclipse.equinox.launcher.cocoa.macosx,0.0.0=R36x_v20101019_1345
+org.eclipse.ui.examples.contributions,0.0.0=I20100509-0800
+org.eclipse.team.cvs.ui,0.0.0=R36x_v20110203-1036
+org.eclipse.ui.cheatsheets,0.0.0=v20100427
+org.eclipse.jdt.doc.user,0.0.0=r361_v20100721-0800
+org.eclipse.equinox.useradmin,0.0.0=v20100503
+org.eclipse.jface.text,0.0.0=r361_v20100825-0800
+org.eclipse.core.resources.jmx,0.0.0=v20100503
+org.eclipse.update.core.win32,0.0.0=v20100512
+org.eclipse.ui.externaltools,0.0.0=v20100427
+org.eclipse.jdt.junit4.runtime,0.0.0=v20100526-0800
+org.eclipse.pde.api.tools.ee.j2se12,0.0.0=v20100506-0900
+org.eclipse.equinox.http.jetty,1.1.100=v20100519
+org.eclipse.pde.api.tools.ee.osgiminimum11,0.0.0=v20100506-0900
+org.eclipse.ui.navigator,0.0.0=I20100601-0800
+org.eclipse.team.cvs.core,0.0.0=R36x_v20110119-0815
+org.eclipse.pde.api.tools.ee.cdcfoundation10,0.0.0=v20100506-0900
+org.eclipse.equinox.launcher.wpf.win32.x86,0.0.0=R36x_v20101222
+org.eclipse.equinox.preferences,0.0.0=v20100503
+org.eclipse.equinox.jmx.common,0.0.0=v20100503
+org.eclipse.equinox.p2.ui.sdk.scheduler,0.0.0=v20100507-1815
+org.eclipse.equinox.jmx.vm,0.0.0=v20100503
+org.eclipse.swt.gtk.aix.ppc64,0.0.0=v3659b
+org.eclipse.ui.editors,0.0.0=r361_v20100825-0800
+org.eclipse.equinox.servletbridge.extensionbundle,0.0.0=v20100503
+org.eclipse.core.filebuffers,0.0.0=v20100520-0800
+org.eclipse.equinox.ip,0.0.0=v20100503
+org.eclipse.jdt,0.0.0=r361_v20100714-0800
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.RSA b/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.RSA
deleted file mode 100644
index 53f377b..0000000
Binary files a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.RSA and /dev/null differ
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.SF b/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.SF
deleted file mode 100644
index 8dc9b98..0000000
--- a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/ECLIPSEF.SF
+++ /dev/null
@@ -1,179 +0,0 @@
-Signature-Version: 1.0
-SHA1-Digest-Manifest: mz2hhywHcBdLT5/njjX7Zvk3jDg=
-Created-By: 1.6.0 (IBM Corporation)
-SHA1-Digest-Manifest-Main-Attributes: MrkSD3jxUThhRkvxibmezdKD9k8=
-
-Name: lib/ant-apache-bcel.jar
-SHA1-Digest: nAcDkk/KA0nD+aHY5orh5CwHDXs=
-
-Name: etc/mmetrics-frames.xsl
-SHA1-Digest: APiAPtADgoYGSwEquxQdQx5NN0A=
-
-Name: bin/ant.bat
-SHA1-Digest: VRSA9YOPmicxeIZD8LdYkqdUmEA=
-
-Name: etc/tagdiff.xsl
-SHA1-Digest: oQK6F+rUwsdxfJl58vbKAmtTs3Y=
-
-Name: lib/ant.jar
-SHA1-Digest: iLwdJsPA3RlkAz60NYwuWZTyvrM=
-
-Name: lib/ant-apache-oro.jar
-SHA1-Digest: EfLaCOYX2cZ54FTDmz+XfS5PX9I=
-
-Name: lib/ant-jsch.jar
-SHA1-Digest: WBH28A6KgSywMvCF7KOY9WMKB+8=
-
-Name: about_files/LICENSE.dom.html
-SHA1-Digest: xK0He1PkoQXdHC48ROEqZRNXTL4=
-
-Name: etc/coverage-frames.xsl
-SHA1-Digest: Lk7Vo06ABrH7brbJkP1hKRxLkMg=
-
-Name: lib/ant-jdepend.jar
-SHA1-Digest: il/vX3Y2MzYUD4SVms8NMtPOy7w=
-
-Name: about_files/asl-v20.txt
-SHA1-Digest: pJO0L/tUizs1vz2W9gV2VmGJsDs=
-
-Name: lib/ant-nodeps.jar
-SHA1-Digest: bNVH+pM/c8wmrDboMTkDpUegKiU=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: Z+e4UrhAmTCBR1UpP/RqMf9OX00=
-
-Name: lib/ant-apache-regexp.jar
-SHA1-Digest: 576cnXLiolc8vR9GgmfKNp8Nqu4=
-
-Name: bin/runant.pl
-SHA1-Digest: 4EKNYCEcyO/SMqxm79fnts8/Q1c=
-
-Name: lib/ant-weblogic.jar
-SHA1-Digest: gDPQp4tJzX2DS1yWRwF+hxY+oBA=
-
-Name: bin/envset.cmd
-SHA1-Digest: anGgepI9TTUvD6W73h+kGQrc2d0=
-
-Name: etc/checkstyle/checkstyle-text.xsl
-SHA1-Digest: Jzub6NSrWxS9hYda+Wy/SP49SeI=
-
-Name: lib/ant-junit.jar
-SHA1-Digest: m5hlRT4jgNdrwFd87cScKqfFzq8=
-
-Name: bin/ant.cmd
-SHA1-Digest: fKm5e7CiWr2UH61jbx6Yol3cQZo=
-
-Name: etc/log.xsl
-SHA1-Digest: 0HD61tw+M8q33hpPVPkjJJe4SDo=
-
-Name: bin/antRun
-SHA1-Digest: 3xz5zLVIT2QJnPskzZCOuX0LVnw=
-
-Name: bin/runant.py
-SHA1-Digest: uMviIJaN6y/k6xUbjXhmUd6TN8E=
-
-Name: lib/ant-commons-logging.jar
-SHA1-Digest: mWE9p+mUOYY6aSH9ef8Ahp0ZB9Q=
-
-Name: lib/ant-swing.jar
-SHA1-Digest: 5Eo7LM3g4UZhBLXi3v0mFnM1Xbo=
-
-Name: etc/jdepend-frames.xsl
-SHA1-Digest: OEsPHq3PIr185ocUtm81ULkmobs=
-
-Name: etc/checkstyle/checkstyle-xdoc.xsl
-SHA1-Digest: mfVMgdE+9JoC0hKc0Vc5f7pbe/c=
-
-Name: etc/changelog.xsl
-SHA1-Digest: 9ZFS8fHSvz42GLs2NDnqzLFo5G8=
-
-Name: lib/ant-launcher.jar
-SHA1-Digest: qYkHwss31xdglxfWJ+eKVrDCOEc=
-
-Name: etc/jdepend.xsl
-SHA1-Digest: M6boZHWa9+JeDhCjXtq5Z9Y61dY=
-
-Name: bin/runrc.cmd
-SHA1-Digest: aq6+dBb+jdiXyrvDNmLIOzj21N8=
-
-Name: lib/ant-jmf.jar
-SHA1-Digest: ksLbfLMM5SAHh/R+gHdJazpVL3o=
-
-Name: lib/ant-starteam.jar
-SHA1-Digest: MfTpvL6RE4IpbQQXqicmTTenXV0=
-
-Name: lib/ant-netrexx.jar
-SHA1-Digest: R4NztTC64/RcG5wiJbi39IVBdyU=
-
-Name: plugin.properties
-SHA1-Digest: tNIh5OEXJJxtqSciwBvjmG5gUGg=
-
-Name: lib/ant-jai.jar
-SHA1-Digest: xX/eACE028fVCcIU6wJ5BNNQ55I=
-
-Name: lib/ant-trax.jar
-SHA1-Digest: oaylmaVuNt7ZDalXmlvhK4Z9+bc=
-
-Name: bin/antRun.bat
-SHA1-Digest: KX8SW+sZ8gtQYr3boWRpl2DkWrE=
-
-Name: lib/ant-apache-bsf.jar
-SHA1-Digest: LaSs+3xCdQ6HbJ1MEf/w2T3cy64=
-
-Name: about_files/LICENSE.sax.txt
-SHA1-Digest: CnKqzCUI0E0NUSlVIAfUd8gctxU=
-
-Name: lib/ant-stylebook.jar
-SHA1-Digest: YaNlOMFYlmO6o+UWUO0iut4X9ug=
-
-Name: lib/ant-apache-log4j.jar
-SHA1-Digest: qEMNkG9wWw0jBP0l5WJHJ4/XJyc=
-
-Name: bin/ant
-SHA1-Digest: bnS5vQF5wYnqXs8zr+3LORKIA0U=
-
-Name: etc/checkstyle/checkstyle-frames.xsl
-SHA1-Digest: cQKamOMX7Att9wW45aAohAWp3K0=
-
-Name: bin/complete-ant-cmd.pl
-SHA1-Digest: wXOPsOb8rPKKwt6rAb3XoXCwFgQ=
-
-Name: about_files/NOTICE
-SHA1-Digest: g5R8FDyNNir6o/tFVnDNSlcP+z0=
-
-Name: lib/ant-apache-resolver.jar
-SHA1-Digest: DwA3cQWtEVwBNU5UTPKQghI9AuA=
-
-Name: etc/junit-frames.xsl
-SHA1-Digest: 2hTCiaPp95X9ZjX8ZDwjvqwfT6U=
-
-Name: etc/junit-noframes.xsl
-SHA1-Digest: M4u7091ckN+zoCaRvjal1SDwJQE=
-
-Name: lib/ant-antlr.jar
-SHA1-Digest: kW+TfOLRp96xdnBMvfa9CWMPv90=
-
-Name: about.html
-SHA1-Digest: tujWEJAt+/IKSC26IMuUh48ercA=
-
-Name: etc/maudit-frames.xsl
-SHA1-Digest: U8xxI3AoPSoVepSv0ZbfrARsTZY=
-
-Name: etc/junit-frames-xalan1.xsl
-SHA1-Digest: Bvmst1NiMllcc+sricG/3Eyszc0=
-
-Name: lib/ant-commons-net.jar
-SHA1-Digest: EJVVV+F9gd7fEg85Sjm1qP6c9ms=
-
-Name: lib/ant-javamail.jar
-SHA1-Digest: dONtBXDrB646aBvPNGKyZy1CP98=
-
-Name: bin/lcp.bat
-SHA1-Digest: EA5m2+HfGFLhb6ForQdjnlvl3cU=
-
-Name: bin/antenv.cmd
-SHA1-Digest: as5/uc6NFrw5Zqzjc5vZEWg6MsM=
-
-Name: bin/antRun.pl
-SHA1-Digest: Cw3hkFZ/7NbP7kPUGL/WM1n8EKk=
-
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/MANIFEST.MF b/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/MANIFEST.MF
deleted file mode 100644
index 034febc..0000000
--- a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,234 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ClassPath: lib/ant.jar,lib/ant-antlr.jar,lib/ant-apache-bcel.ja
- r,lib/ant-apache-bsf.jar,lib/ant-apache-log4j.jar,lib/ant-apache-oro.
- jar,lib/ant-apache-regexp.jar,lib/ant-apache-resolver.jar,lib/ant-com
- mons-logging.jar,lib/ant-commons-net.jar,lib/ant-jai.jar,lib/ant-java
- mail.jar,lib/ant-jdepend.jar,lib/ant-jmf.jar,lib/ant-jsch.jar,lib/ant
- -junit.jar,lib/ant-launcher.jar,lib/ant-netrexx.jar,lib/ant-nodeps.ja
- r,lib/ant-starteam.jar,lib/ant-stylebook.jar,lib/ant-swing.jar,lib/an
- t-trax.jar,lib/ant-weblogic.jar
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.apache.ant
-Require-Bundle: org.eclipse.osgi
-Export-Package: images,org.apache.tools.ant,org.apache.tools.ant.dispa
- tch,org.apache.tools.ant.filters,org.apache.tools.ant.filters.util,or
- g.apache.tools.ant.helper,org.apache.tools.ant.input,org.apache.tools
- .ant.launch,org.apache.tools.ant.listener,org.apache.tools.ant.loader
- ,org.apache.tools.ant.taskdefs,org.apache.tools.ant.taskdefs.compiler
- s,org.apache.tools.ant.taskdefs.condition,org.apache.tools.ant.taskde
- fs.cvslib,org.apache.tools.ant.taskdefs.email,org.apache.tools.ant.ta
- skdefs.optional,org.apache.tools.ant.taskdefs.optional.ccm,org.apache
- .tools.ant.taskdefs.optional.clearcase,org.apache.tools.ant.taskdefs.
- optional.depend,org.apache.tools.ant.taskdefs.optional.depend.constan
- tpool,org.apache.tools.ant.taskdefs.optional.dotnet,org.apache.tools.
- ant.taskdefs.optional.ejb,org.apache.tools.ant.taskdefs.optional.exte
- nsion,org.apache.tools.ant.taskdefs.optional.extension.resolvers,org.
- apache.tools.ant.taskdefs.optional.i18n,org.apache.tools.ant.taskdefs
- .optional.image,org.apache.tools.ant.taskdefs.optional.j2ee,org.apach
- e.tools.ant.taskdefs.optional.javacc,org.apache.tools.ant.taskdefs.op
- tional.javah,org.apache.tools.ant.taskdefs.optional.jdepend,org.apach
- e.tools.ant.taskdefs.optional.jlink,org.apache.tools.ant.taskdefs.opt
- ional.jsp,org.apache.tools.ant.taskdefs.optional.jsp.compilers,org.ap
- ache.tools.ant.taskdefs.optional.junit,org.apache.tools.ant.taskdefs.
- optional.junit.xsl,org.apache.tools.ant.taskdefs.optional.native2asci
- i,org.apache.tools.ant.taskdefs.optional.net,org.apache.tools.ant.tas
- kdefs.optional.perforce,org.apache.tools.ant.taskdefs.optional.pvcs,o
- rg.apache.tools.ant.taskdefs.optional.scm,org.apache.tools.ant.taskde
- fs.optional.script,org.apache.tools.ant.taskdefs.optional.sos,org.apa
- che.tools.ant.taskdefs.optional.sound,org.apache.tools.ant.taskdefs.o
- ptional.splash,org.apache.tools.ant.taskdefs.optional.ssh,org.apache.
- tools.ant.taskdefs.optional.starteam,org.apache.tools.ant.taskdefs.op
- tional.unix,org.apache.tools.ant.taskdefs.optional.vss,org.apache.too
- ls.ant.taskdefs.optional.windows,org.apache.tools.ant.taskdefs.rmic,o
- rg.apache.tools.ant.types,org.apache.tools.ant.types.conditions,org.a
- pache.tools.ant.types.mappers,org.apache.tools.ant.types.optional,org
- .apache.tools.ant.types.optional.depend,org.apache.tools.ant.types.op
- tional.image,org.apache.tools.ant.types.resolver,org.apache.tools.ant
- .types.resources,org.apache.tools.ant.types.resources.comparators,org
- .apache.tools.ant.types.resources.selectors,org.apache.tools.ant.type
- s.selectors,org.apache.tools.ant.types.selectors.modifiedselector,org
- .apache.tools.ant.types.spi,org.apache.tools.ant.util,org.apache.tool
- s.ant.util.depend,org.apache.tools.ant.util.depend.bcel,org.apache.to
- ols.ant.util.facade,org.apache.tools.ant.util.java15,org.apache.tools
- .ant.util.optional,org.apache.tools.ant.util.regexp,org.apache.tools.
- bzip2,org.apache.tools.mail,org.apache.tools.tar,org.apache.tools.zip
-Bundle-Version: 1.7.1.v20090120-1145
-Bundle-ManifestVersion: 2
-
-Name: lib/ant-apache-bcel.jar
-SHA1-Digest: fP83jr24ji6x7ayjHjTuWLXSiR4=
-
-Name: etc/mmetrics-frames.xsl
-SHA1-Digest: cQnziGYZC2FrO0zwFE92P1bP2v8=
-
-Name: bin/ant.bat
-SHA1-Digest: Rc2etgn1RATkrEL3NCa3Fs75Ov8=
-
-Name: etc/tagdiff.xsl
-SHA1-Digest: ddaegkBkww5CoIlRpSR8RDUI1bQ=
-
-Name: lib/ant.jar
-SHA1-Digest: ZQpcRN8ZJLM9pBBIpBQFuM0ibuY=
-
-Name: lib/ant-apache-oro.jar
-SHA1-Digest: SkR2zfuPavoZ9GqVbGBEjNPtkxM=
-
-Name: lib/ant-jsch.jar
-SHA1-Digest: QlqyI8b1IjMJCkLa/dNZG2Sz5c0=
-
-Name: about_files/LICENSE.dom.html
-SHA1-Digest: 9F8cZaCgriCte0T6Mt5hAFumadk=
-
-Name: etc/coverage-frames.xsl
-SHA1-Digest: 5SE/NhPWEbqzGDGL58dwEbkhwRs=
-
-Name: lib/ant-jdepend.jar
-SHA1-Digest: BoXnsH9wf6tfjPGKoEDE1bbhiFQ=
-
-Name: about_files/asl-v20.txt
-SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
-
-Name: lib/ant-nodeps.jar
-SHA1-Digest: lMaWhSGfl7EWI8B3JTQ7FoC2pZE=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
-
-Name: lib/ant-apache-regexp.jar
-SHA1-Digest: skQ/xAVhT+/w6PPiiT+ZDU0YjoY=
-
-Name: bin/runant.pl
-SHA1-Digest: tynYaGh8+BtWDsZ6PljZdoi+egU=
-
-Name: lib/ant-weblogic.jar
-SHA1-Digest: 6GaGfXa3nyytHEO+27I8IsCj5jI=
-
-Name: etc/checkstyle/checkstyle-text.xsl
-SHA1-Digest: CqSzAXEeeV20DtFpeujwjL9FEW8=
-
-Name: bin/envset.cmd
-SHA1-Digest: EJ+ljL5sbUQ8mWVn8V49XPBuAz0=
-
-Name: bin/ant.cmd
-SHA1-Digest: 4jPJI7nJO+v3oPpbi5GbrT7x9qk=
-
-Name: lib/ant-junit.jar
-SHA1-Digest: vdXknfEYkc32sq3MKlS2KfI9un8=
-
-Name: bin/antRun
-SHA1-Digest: S63QT5F5EI1BCpIj59nosT3lVTw=
-
-Name: etc/log.xsl
-SHA1-Digest: juv2H0VplMm4ri1rzgdOW0yCroc=
-
-Name: bin/runant.py
-SHA1-Digest: Kg3iFzRnZW6PVIFmbj7Eyuo72cM=
-
-Name: lib/ant-commons-logging.jar
-SHA1-Digest: IsOx/VYnZBWwvxVZ8uv2pFubyiQ=
-
-Name: lib/ant-swing.jar
-SHA1-Digest: BknMW9F2tr+lvbLPAs/K2f+kFcI=
-
-Name: etc/jdepend-frames.xsl
-SHA1-Digest: U2Bb6aMxgbEYqXkCm2sujeLP7Zo=
-
-Name: etc/checkstyle/checkstyle-xdoc.xsl
-SHA1-Digest: yL3TqCA4pc0daZXtXwAiCN6xHxI=
-
-Name: etc/changelog.xsl
-SHA1-Digest: 2EZZ+jSTt1TTlBYPN4vGUAX7cTQ=
-
-Name: lib/ant-launcher.jar
-SHA1-Digest: 8LKF5B/M2JhvatoFD8kVLtbgdrA=
-
-Name: etc/jdepend.xsl
-SHA1-Digest: 0rf14aLzhLsun24uUsXVVvkHM6I=
-
-Name: bin/runrc.cmd
-SHA1-Digest: eNo+cuYQicndcc56FVkRScD5w30=
-
-Name: lib/ant-jmf.jar
-SHA1-Digest: nBdKPkU6UNToVNyTDw9VxsCiQe8=
-
-Name: lib/ant-starteam.jar
-SHA1-Digest: 8o1FVZnlPjlzpkVzvrxgTsUZbwY=
-
-Name: lib/ant-netrexx.jar
-SHA1-Digest: vlNfca1y6dQb0aQjEFo5V1l3e2g=
-
-Name: plugin.properties
-SHA1-Digest: oZ8G+d0YZCeLv5mafw0x2OwbwOY=
-
-Name: lib/ant-jai.jar
-SHA1-Digest: aVM04eDtFdeZlShHcwTv4+GqgGU=
-
-Name: lib/ant-trax.jar
-SHA1-Digest: vDgjuNuYI0A9nrpWa2wLYyqdIjA=
-
-Name: bin/antRun.bat
-SHA1-Digest: zB9JbFFhlXTVgwaJlw61wNELj6k=
-
-Name: lib/ant-apache-bsf.jar
-SHA1-Digest: yfbQCzu1pvS1j8O44gkxuTgc1pU=
-
-Name: about_files/LICENSE.sax.txt
-SHA1-Digest: uLnQn2qwT77aJ6MThuLeWz1I5ek=
-
-Name: lib/ant-stylebook.jar
-SHA1-Digest: AZfiFXJ2YTKqurNdaT98LLG8NC4=
-
-Name: lib/ant-apache-log4j.jar
-SHA1-Digest: hDeGHiO2qTDtJNGSE8+23m4LVH0=
-
-Name: bin/ant
-SHA1-Digest: jK7w10Hy+BIiSimUAhjgizdaBuY=
-
-Name: etc/checkstyle/checkstyle-frames.xsl
-SHA1-Digest: 5KYg/jQq+iuWKS5gF1qX37F+UX0=
-
-Name: bin/complete-ant-cmd.pl
-SHA1-Digest: F1mrSua1xk98goAA1YvtOoJNiuw=
-
-Name: about_files/NOTICE
-SHA1-Digest: v3XrGNGv2sQGqBe+ObJZnq9915g=
-
-Name: lib/ant-apache-resolver.jar
-SHA1-Digest: 6FDrND4Oez4S/p4PizLo2CTph2Q=
-
-Name: etc/junit-frames.xsl
-SHA1-Digest: XIcHcYoM8I5hzTkhdiy5iskupIM=
-
-Name: etc/junit-noframes.xsl
-SHA1-Digest: zmgmTYDnXS0QZvMd3wUarjPR7aE=
-
-Name: lib/ant-antlr.jar
-SHA1-Digest: TNv/vwBM0Co1rX6LFuh+h0OTqGA=
-
-Name: about.html
-SHA1-Digest: cPPs9diR9VPNDzWrCs1FLNOdJEo=
-
-Name: etc/maudit-frames.xsl
-SHA1-Digest: 1oML7OYqWjV+hPKu/ItdzrAFGcA=
-
-Name: etc/junit-frames-xalan1.xsl
-SHA1-Digest: ME/2vW22HRXG87EwVJ9LFfkfyEI=
-
-Name: lib/ant-commons-net.jar
-SHA1-Digest: SLmc5Y3ve5V8ShfWIQ2Yz8cXig8=
-
-Name: lib/ant-javamail.jar
-SHA1-Digest: RUoVCaD/GCPpZoOaldyoxpYrCDc=
-
-Name: bin/lcp.bat
-SHA1-Digest: eX7ICcBsanATsaEDkn5+oTA4QaQ=
-
-Name: bin/antenv.cmd
-SHA1-Digest: s2zvcJEs2E2x6ckfXZoGxx1OF1Y=
-
-Name: bin/antRun.pl
-SHA1-Digest: mynp1agPByxojQUKZqlVZkXZSHY=
-
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/plugin.properties b/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/plugin.properties
deleted file mode 100644
index 488e922..0000000
--- a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials 
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Apache Ant
-providerName = Eclipse.org
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.RSA b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.RSA
new file mode 100644
index 0000000..47fe778
Binary files /dev/null and b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.RSA differ
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.SF b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.SF
new file mode 100644
index 0000000..3422047
--- /dev/null
+++ b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/ECLIPSEF.SF
@@ -0,0 +1,179 @@
+Signature-Version: 1.0
+SHA1-Digest-Manifest: DnymqoTvSz4gbC12HMrSKUQk34w=
+Created-By: 1.6.0 (IBM Corporation)
+SHA1-Digest-Manifest-Main-Attributes: T473SZ5WWmQktg3oaHggnJO/FTM=
+
+Name: lib/ant-apache-bcel.jar
+SHA1-Digest: LOl+pgdc9a4HwZywWL7CEqCEvZs=
+
+Name: etc/mmetrics-frames.xsl
+SHA1-Digest: APiAPtADgoYGSwEquxQdQx5NN0A=
+
+Name: bin/ant.bat
+SHA1-Digest: VRSA9YOPmicxeIZD8LdYkqdUmEA=
+
+Name: etc/tagdiff.xsl
+SHA1-Digest: oQK6F+rUwsdxfJl58vbKAmtTs3Y=
+
+Name: lib/ant.jar
+SHA1-Digest: lQ3OziQI4mYf42vhZl5qK05euHQ=
+
+Name: lib/ant-apache-oro.jar
+SHA1-Digest: 08O0J8DpA2CUYHKRuRY8E6d2FS0=
+
+Name: lib/ant-jsch.jar
+SHA1-Digest: 9REV6G1dh3UOS8ueh6rJVnXaBBE=
+
+Name: about_files/LICENSE.dom.html
+SHA1-Digest: xK0He1PkoQXdHC48ROEqZRNXTL4=
+
+Name: etc/coverage-frames.xsl
+SHA1-Digest: Lk7Vo06ABrH7brbJkP1hKRxLkMg=
+
+Name: lib/ant-jdepend.jar
+SHA1-Digest: 0jLeaOQiRnL1dq7dYpmBw3NIEPk=
+
+Name: about_files/asl-v20.txt
+SHA1-Digest: pJO0L/tUizs1vz2W9gV2VmGJsDs=
+
+Name: lib/ant-nodeps.jar
+SHA1-Digest: b3zl9yIdDVX5up8caMNncYIhOZk=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: Z+e4UrhAmTCBR1UpP/RqMf9OX00=
+
+Name: lib/ant-apache-regexp.jar
+SHA1-Digest: bCJf89W6L5gZfecnoaC3GY5i9j0=
+
+Name: bin/runant.pl
+SHA1-Digest: 4EKNYCEcyO/SMqxm79fnts8/Q1c=
+
+Name: lib/ant-weblogic.jar
+SHA1-Digest: 1zEByTGSxJzTfSdx+joviPFLPgI=
+
+Name: bin/envset.cmd
+SHA1-Digest: anGgepI9TTUvD6W73h+kGQrc2d0=
+
+Name: etc/checkstyle/checkstyle-text.xsl
+SHA1-Digest: Jzub6NSrWxS9hYda+Wy/SP49SeI=
+
+Name: lib/ant-junit.jar
+SHA1-Digest: Asegl5TsYIaKAuGWD3RQGmYG9iw=
+
+Name: bin/ant.cmd
+SHA1-Digest: fKm5e7CiWr2UH61jbx6Yol3cQZo=
+
+Name: etc/log.xsl
+SHA1-Digest: 0HD61tw+M8q33hpPVPkjJJe4SDo=
+
+Name: bin/antRun
+SHA1-Digest: 3xz5zLVIT2QJnPskzZCOuX0LVnw=
+
+Name: bin/runant.py
+SHA1-Digest: uMviIJaN6y/k6xUbjXhmUd6TN8E=
+
+Name: lib/ant-commons-logging.jar
+SHA1-Digest: gPBkcASbXXb7sM6WCSbP3OnU0qw=
+
+Name: lib/ant-swing.jar
+SHA1-Digest: KeZdzozW8mPvLnnzlpJbnLFHC/k=
+
+Name: etc/jdepend-frames.xsl
+SHA1-Digest: OEsPHq3PIr185ocUtm81ULkmobs=
+
+Name: etc/checkstyle/checkstyle-xdoc.xsl
+SHA1-Digest: mfVMgdE+9JoC0hKc0Vc5f7pbe/c=
+
+Name: etc/changelog.xsl
+SHA1-Digest: 9ZFS8fHSvz42GLs2NDnqzLFo5G8=
+
+Name: lib/ant-launcher.jar
+SHA1-Digest: T5al3RPPs+cl2svqvzwRQyPua1M=
+
+Name: etc/jdepend.xsl
+SHA1-Digest: M6boZHWa9+JeDhCjXtq5Z9Y61dY=
+
+Name: bin/runrc.cmd
+SHA1-Digest: aq6+dBb+jdiXyrvDNmLIOzj21N8=
+
+Name: lib/ant-jmf.jar
+SHA1-Digest: rEt5vCSeiJhrDXhToAlqBYJUlpY=
+
+Name: lib/ant-starteam.jar
+SHA1-Digest: CC7k+9amtUmgE+nMSJswFn0gmdc=
+
+Name: lib/ant-netrexx.jar
+SHA1-Digest: 4MHr/zw5Cad5RNbITo3KEhTVU/g=
+
+Name: plugin.properties
+SHA1-Digest: g7K94ZyjaSU4QSVkjoTpYtl1vqE=
+
+Name: lib/ant-jai.jar
+SHA1-Digest: Hgz5UmlpuD4hOHTE+BQc7wzmHz0=
+
+Name: lib/ant-trax.jar
+SHA1-Digest: w6uurfjcZy7fOSYUPT2jG8svYVo=
+
+Name: bin/antRun.bat
+SHA1-Digest: KX8SW+sZ8gtQYr3boWRpl2DkWrE=
+
+Name: lib/ant-apache-bsf.jar
+SHA1-Digest: usSlJG0vxeeqtxI/5lH/UPeH2fg=
+
+Name: about_files/LICENSE.sax.txt
+SHA1-Digest: CnKqzCUI0E0NUSlVIAfUd8gctxU=
+
+Name: lib/ant-stylebook.jar
+SHA1-Digest: FwmSqxPzrBPJXJ0X4oKHndncTnY=
+
+Name: lib/ant-apache-log4j.jar
+SHA1-Digest: zcg372So4PVCkltPKzEiAFN3rA4=
+
+Name: bin/ant
+SHA1-Digest: bnS5vQF5wYnqXs8zr+3LORKIA0U=
+
+Name: etc/checkstyle/checkstyle-frames.xsl
+SHA1-Digest: cQKamOMX7Att9wW45aAohAWp3K0=
+
+Name: bin/complete-ant-cmd.pl
+SHA1-Digest: wXOPsOb8rPKKwt6rAb3XoXCwFgQ=
+
+Name: about_files/NOTICE
+SHA1-Digest: g5R8FDyNNir6o/tFVnDNSlcP+z0=
+
+Name: lib/ant-apache-resolver.jar
+SHA1-Digest: NNj7gb1Enc2M8v/lMP9D4XO+8W0=
+
+Name: etc/junit-frames.xsl
+SHA1-Digest: 2hTCiaPp95X9ZjX8ZDwjvqwfT6U=
+
+Name: etc/junit-noframes.xsl
+SHA1-Digest: M4u7091ckN+zoCaRvjal1SDwJQE=
+
+Name: lib/ant-antlr.jar
+SHA1-Digest: pYDgw2hfdxjUG5938M9pyip9zoA=
+
+Name: about.html
+SHA1-Digest: tujWEJAt+/IKSC26IMuUh48ercA=
+
+Name: etc/maudit-frames.xsl
+SHA1-Digest: U8xxI3AoPSoVepSv0ZbfrARsTZY=
+
+Name: etc/junit-frames-xalan1.xsl
+SHA1-Digest: Bvmst1NiMllcc+sricG/3Eyszc0=
+
+Name: lib/ant-commons-net.jar
+SHA1-Digest: 054oC0sq2Zt1GCWm8zv3DATb8nQ=
+
+Name: lib/ant-javamail.jar
+SHA1-Digest: eJJcJGmsmr4JB5KfiZJRZcv6xLs=
+
+Name: bin/lcp.bat
+SHA1-Digest: EA5m2+HfGFLhb6ForQdjnlvl3cU=
+
+Name: bin/antenv.cmd
+SHA1-Digest: as5/uc6NFrw5Zqzjc5vZEWg6MsM=
+
+Name: bin/antRun.pl
+SHA1-Digest: Cw3hkFZ/7NbP7kPUGL/WM1n8EKk=
+
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..56d762b
--- /dev/null
+++ b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/MANIFEST.MF
@@ -0,0 +1,234 @@
+Manifest-Version: 1.0
+Bundle-ClassPath: lib/ant.jar,lib/ant-antlr.jar,lib/ant-apache-bcel.ja
+ r,lib/ant-apache-bsf.jar,lib/ant-apache-log4j.jar,lib/ant-apache-oro.
+ jar,lib/ant-apache-regexp.jar,lib/ant-apache-resolver.jar,lib/ant-com
+ mons-logging.jar,lib/ant-commons-net.jar,lib/ant-jai.jar,lib/ant-java
+ mail.jar,lib/ant-jdepend.jar,lib/ant-jmf.jar,lib/ant-jsch.jar,lib/ant
+ -junit.jar,lib/ant-launcher.jar,lib/ant-netrexx.jar,lib/ant-nodeps.ja
+ r,lib/ant-starteam.jar,lib/ant-stylebook.jar,lib/ant-swing.jar,lib/an
+ t-trax.jar,lib/ant-weblogic.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.apache.ant
+Require-Bundle: org.eclipse.osgi
+Export-Package: images,org.apache.tools.ant,org.apache.tools.ant.dispa
+ tch,org.apache.tools.ant.filters,org.apache.tools.ant.filters.util,or
+ g.apache.tools.ant.helper,org.apache.tools.ant.input,org.apache.tools
+ .ant.launch,org.apache.tools.ant.listener,org.apache.tools.ant.loader
+ ,org.apache.tools.ant.taskdefs,org.apache.tools.ant.taskdefs.compiler
+ s,org.apache.tools.ant.taskdefs.condition,org.apache.tools.ant.taskde
+ fs.cvslib,org.apache.tools.ant.taskdefs.email,org.apache.tools.ant.ta
+ skdefs.optional,org.apache.tools.ant.taskdefs.optional.ccm,org.apache
+ .tools.ant.taskdefs.optional.clearcase,org.apache.tools.ant.taskdefs.
+ optional.depend,org.apache.tools.ant.taskdefs.optional.depend.constan
+ tpool,org.apache.tools.ant.taskdefs.optional.dotnet,org.apache.tools.
+ ant.taskdefs.optional.ejb,org.apache.tools.ant.taskdefs.optional.exte
+ nsion,org.apache.tools.ant.taskdefs.optional.extension.resolvers,org.
+ apache.tools.ant.taskdefs.optional.i18n,org.apache.tools.ant.taskdefs
+ .optional.image,org.apache.tools.ant.taskdefs.optional.j2ee,org.apach
+ e.tools.ant.taskdefs.optional.javacc,org.apache.tools.ant.taskdefs.op
+ tional.javah,org.apache.tools.ant.taskdefs.optional.jdepend,org.apach
+ e.tools.ant.taskdefs.optional.jlink,org.apache.tools.ant.taskdefs.opt
+ ional.jsp,org.apache.tools.ant.taskdefs.optional.jsp.compilers,org.ap
+ ache.tools.ant.taskdefs.optional.junit,org.apache.tools.ant.taskdefs.
+ optional.junit.xsl,org.apache.tools.ant.taskdefs.optional.native2asci
+ i,org.apache.tools.ant.taskdefs.optional.net,org.apache.tools.ant.tas
+ kdefs.optional.perforce,org.apache.tools.ant.taskdefs.optional.pvcs,o
+ rg.apache.tools.ant.taskdefs.optional.scm,org.apache.tools.ant.taskde
+ fs.optional.script,org.apache.tools.ant.taskdefs.optional.sos,org.apa
+ che.tools.ant.taskdefs.optional.sound,org.apache.tools.ant.taskdefs.o
+ ptional.splash,org.apache.tools.ant.taskdefs.optional.ssh,org.apache.
+ tools.ant.taskdefs.optional.starteam,org.apache.tools.ant.taskdefs.op
+ tional.unix,org.apache.tools.ant.taskdefs.optional.vss,org.apache.too
+ ls.ant.taskdefs.optional.windows,org.apache.tools.ant.taskdefs.rmic,o
+ rg.apache.tools.ant.types,org.apache.tools.ant.types.conditions,org.a
+ pache.tools.ant.types.mappers,org.apache.tools.ant.types.optional,org
+ .apache.tools.ant.types.optional.depend,org.apache.tools.ant.types.op
+ tional.image,org.apache.tools.ant.types.resolver,org.apache.tools.ant
+ .types.resources,org.apache.tools.ant.types.resources.comparators,org
+ .apache.tools.ant.types.resources.selectors,org.apache.tools.ant.type
+ s.selectors,org.apache.tools.ant.types.selectors.modifiedselector,org
+ .apache.tools.ant.types.spi,org.apache.tools.ant.util,org.apache.tool
+ s.ant.util.depend,org.apache.tools.ant.util.depend.bcel,org.apache.to
+ ols.ant.util.facade,org.apache.tools.ant.util.java15,org.apache.tools
+ .ant.util.optional,org.apache.tools.ant.util.regexp,org.apache.tools.
+ bzip2,org.apache.tools.mail,org.apache.tools.tar,org.apache.tools.zip
+Bundle-Version: 1.7.1.v20100518-1145
+Bundle-ManifestVersion: 2
+
+Name: lib/ant-apache-bcel.jar
+SHA1-Digest: mL7ypH+XtKGLayV/7EGF6kwoYwI=
+
+Name: etc/mmetrics-frames.xsl
+SHA1-Digest: cQnziGYZC2FrO0zwFE92P1bP2v8=
+
+Name: bin/ant.bat
+SHA1-Digest: Rc2etgn1RATkrEL3NCa3Fs75Ov8=
+
+Name: etc/tagdiff.xsl
+SHA1-Digest: ddaegkBkww5CoIlRpSR8RDUI1bQ=
+
+Name: lib/ant.jar
+SHA1-Digest: QmGGhQi4COYG3u+KHGHVjvZA9hM=
+
+Name: lib/ant-apache-oro.jar
+SHA1-Digest: 3mVzpEG3xmdgVi2+lwuMPKHKZfM=
+
+Name: lib/ant-jsch.jar
+SHA1-Digest: FmNWUeOpmyXmyH5K7WvBCfyprsE=
+
+Name: about_files/LICENSE.dom.html
+SHA1-Digest: 9F8cZaCgriCte0T6Mt5hAFumadk=
+
+Name: etc/coverage-frames.xsl
+SHA1-Digest: 5SE/NhPWEbqzGDGL58dwEbkhwRs=
+
+Name: lib/ant-jdepend.jar
+SHA1-Digest: juZ5ScBk7RdbT9kx1nq/TB1qix8=
+
+Name: about_files/asl-v20.txt
+SHA1-Digest: K4uBUimqimHkg/tLoFiLi2xJGJA=
+
+Name: lib/ant-nodeps.jar
+SHA1-Digest: stuzByOvnFqXXfMR1DOHMbURR4Y=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
+
+Name: lib/ant-apache-regexp.jar
+SHA1-Digest: bCOUGaWl76Yhuy0KPpq3Cl/w55g=
+
+Name: bin/runant.pl
+SHA1-Digest: tynYaGh8+BtWDsZ6PljZdoi+egU=
+
+Name: lib/ant-weblogic.jar
+SHA1-Digest: q/YjU1rB8u/dxjXcENxmEQ3pgXQ=
+
+Name: etc/checkstyle/checkstyle-text.xsl
+SHA1-Digest: CqSzAXEeeV20DtFpeujwjL9FEW8=
+
+Name: bin/envset.cmd
+SHA1-Digest: EJ+ljL5sbUQ8mWVn8V49XPBuAz0=
+
+Name: bin/ant.cmd
+SHA1-Digest: 4jPJI7nJO+v3oPpbi5GbrT7x9qk=
+
+Name: lib/ant-junit.jar
+SHA1-Digest: VPSxi0uuALZXXpJF4QFhkpUOpUI=
+
+Name: bin/antRun
+SHA1-Digest: S63QT5F5EI1BCpIj59nosT3lVTw=
+
+Name: etc/log.xsl
+SHA1-Digest: juv2H0VplMm4ri1rzgdOW0yCroc=
+
+Name: bin/runant.py
+SHA1-Digest: Kg3iFzRnZW6PVIFmbj7Eyuo72cM=
+
+Name: lib/ant-commons-logging.jar
+SHA1-Digest: NjlZah2crXobTrvv4OGCIMjO+8A=
+
+Name: lib/ant-swing.jar
+SHA1-Digest: XynrDWbhmRUIf9PM4gVJqgCaA5s=
+
+Name: etc/jdepend-frames.xsl
+SHA1-Digest: U2Bb6aMxgbEYqXkCm2sujeLP7Zo=
+
+Name: etc/checkstyle/checkstyle-xdoc.xsl
+SHA1-Digest: yL3TqCA4pc0daZXtXwAiCN6xHxI=
+
+Name: etc/changelog.xsl
+SHA1-Digest: 2EZZ+jSTt1TTlBYPN4vGUAX7cTQ=
+
+Name: lib/ant-launcher.jar
+SHA1-Digest: GHtlGif/wHyc2Emb1oDygUu5sOU=
+
+Name: etc/jdepend.xsl
+SHA1-Digest: 0rf14aLzhLsun24uUsXVVvkHM6I=
+
+Name: bin/runrc.cmd
+SHA1-Digest: eNo+cuYQicndcc56FVkRScD5w30=
+
+Name: lib/ant-jmf.jar
+SHA1-Digest: LkMJEvWekiNff2+40hzqUtHWv5Y=
+
+Name: lib/ant-starteam.jar
+SHA1-Digest: phxps48pSlCZmpwiyZY2cbk6yaw=
+
+Name: lib/ant-netrexx.jar
+SHA1-Digest: QWTo/YKGFWwaSuanXxbeyc3U2yQ=
+
+Name: plugin.properties
+SHA1-Digest: EM3JUl9D3jv9MhxxbdTWTUt6kbI=
+
+Name: lib/ant-jai.jar
+SHA1-Digest: EJ+iUjul2mZKti+TEgmuQ3kIh/o=
+
+Name: lib/ant-trax.jar
+SHA1-Digest: HZ8Fu0t4n4XH3pf7VeSW1i3ymAw=
+
+Name: bin/antRun.bat
+SHA1-Digest: zB9JbFFhlXTVgwaJlw61wNELj6k=
+
+Name: lib/ant-apache-bsf.jar
+SHA1-Digest: 3m9VogNJMXiCF1ZkaeMRPdtM9OA=
+
+Name: about_files/LICENSE.sax.txt
+SHA1-Digest: uLnQn2qwT77aJ6MThuLeWz1I5ek=
+
+Name: lib/ant-stylebook.jar
+SHA1-Digest: E+Uxq8GjVBkGmc4TZ3JQh4MZeRw=
+
+Name: lib/ant-apache-log4j.jar
+SHA1-Digest: 35KkJkHQuFhTpd0mbJemrVVJCQI=
+
+Name: bin/ant
+SHA1-Digest: jK7w10Hy+BIiSimUAhjgizdaBuY=
+
+Name: etc/checkstyle/checkstyle-frames.xsl
+SHA1-Digest: 5KYg/jQq+iuWKS5gF1qX37F+UX0=
+
+Name: bin/complete-ant-cmd.pl
+SHA1-Digest: F1mrSua1xk98goAA1YvtOoJNiuw=
+
+Name: about_files/NOTICE
+SHA1-Digest: v3XrGNGv2sQGqBe+ObJZnq9915g=
+
+Name: lib/ant-apache-resolver.jar
+SHA1-Digest: fzM5Jwsbw+H2XUPO5uxQGgO9mRA=
+
+Name: etc/junit-frames.xsl
+SHA1-Digest: XIcHcYoM8I5hzTkhdiy5iskupIM=
+
+Name: etc/junit-noframes.xsl
+SHA1-Digest: zmgmTYDnXS0QZvMd3wUarjPR7aE=
+
+Name: lib/ant-antlr.jar
+SHA1-Digest: Kagxm9lkBtXTXWMRKDWn52KZeTE=
+
+Name: about.html
+SHA1-Digest: cPPs9diR9VPNDzWrCs1FLNOdJEo=
+
+Name: etc/maudit-frames.xsl
+SHA1-Digest: 1oML7OYqWjV+hPKu/ItdzrAFGcA=
+
+Name: etc/junit-frames-xalan1.xsl
+SHA1-Digest: ME/2vW22HRXG87EwVJ9LFfkfyEI=
+
+Name: lib/ant-commons-net.jar
+SHA1-Digest: Rg+mKr8hSVibDLdQwjnhGg+oMuA=
+
+Name: lib/ant-javamail.jar
+SHA1-Digest: 2b0KzqoBPtuNEHHwW3KXqLGLby8=
+
+Name: bin/lcp.bat
+SHA1-Digest: eX7ICcBsanATsaEDkn5+oTA4QaQ=
+
+Name: bin/antenv.cmd
+SHA1-Digest: s2zvcJEs2E2x6ckfXZoGxx1OF1Y=
+
+Name: bin/antRun.pl
+SHA1-Digest: mynp1agPByxojQUKZqlVZkXZSHY=
+
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/eclipse.inf b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/eclipse.inf
similarity index 100%
copy from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/eclipse.inf
copy to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about.html b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about.html
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about.html
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about.html
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/LICENSE.dom.html b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/LICENSE.dom.html
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/LICENSE.dom.html
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/LICENSE.dom.html
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/LICENSE.sax.txt b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/LICENSE.sax.txt
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/LICENSE.sax.txt
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/LICENSE.sax.txt
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/NOTICE b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/NOTICE
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/NOTICE
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/NOTICE
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/asl-v20.txt b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/asl-v20.txt
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/asl-v20.txt
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/about_files/asl-v20.txt
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant.bat b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant.bat
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant.bat
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant.bat
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant.cmd b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant.cmd
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/ant.cmd
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/ant.cmd
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun.bat b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun.bat
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun.bat
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun.bat
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun.pl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun.pl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antRun.pl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antRun.pl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antenv.cmd b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antenv.cmd
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/antenv.cmd
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/antenv.cmd
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/complete-ant-cmd.pl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/complete-ant-cmd.pl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/envset.cmd b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/envset.cmd
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/envset.cmd
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/envset.cmd
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/lcp.bat b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/lcp.bat
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/lcp.bat
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/lcp.bat
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runant.pl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runant.pl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runant.pl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runant.pl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runant.py b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runant.py
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runant.py
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runant.py
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runrc.cmd b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runrc.cmd
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/bin/runrc.cmd
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/bin/runrc.cmd
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/changelog.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/changelog.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/changelog.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/changelog.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-text.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-text.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-text.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-text.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-xdoc.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-xdoc.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/checkstyle/checkstyle-xdoc.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/checkstyle/checkstyle-xdoc.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/coverage-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/coverage-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/coverage-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/coverage-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/jdepend-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/jdepend-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/jdepend-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/jdepend-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/jdepend.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/jdepend.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/jdepend.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/jdepend.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-frames-xalan1.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-frames-xalan1.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-frames-xalan1.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-frames-xalan1.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-noframes.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-noframes.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/junit-noframes.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/junit-noframes.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/log.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/log.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/log.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/log.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/maudit-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/maudit-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/maudit-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/maudit-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/mmetrics-frames.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/mmetrics-frames.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/mmetrics-frames.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/mmetrics-frames.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/tagdiff.xsl b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/tagdiff.xsl
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/etc/tagdiff.xsl
rename to eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/etc/tagdiff.xsl
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/plugin.properties b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/plugin.properties
new file mode 100644
index 0000000..658714d
--- /dev/null
+++ b/eclipse/plugins/org.apache.ant_1.7.1.v20100518-1145/plugin.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Apache Ant
+providerName = Eclipse Orbit
diff --git a/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/MANIFEST.MF b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..52d0018
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.aspectj.runtime
+Bundle-Version: 1.6.7.20091231194938
+Bundle-ClassPath: aspectjrt.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.aspectj.internal.lang.annotation;version="1.6.4",
+ org.aspectj.internal.lang.reflect;version="1.6.4",
+ org.aspectj.lang;version="1.6.4",
+ org.aspectj.lang.annotation;version="1.6.4",
+ org.aspectj.lang.internal.lang;version="1.6.4",
+ org.aspectj.lang.reflect;version="1.6.4",
+ org.aspectj.runtime;version="1.6.4",
+ org.aspectj.runtime.internal;version="1.6.4",
+ org.aspectj.runtime.internal.cflowstack;version="1.6.4",
+ org.aspectj.runtime.reflect;version="1.6.4"
diff --git a/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/eclipse.inf b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/eclipse.inf
new file mode 100644
index 0000000..92ffed2
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Processed using Jarprocessor
+pack200.conditioned = true
diff --git a/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/about.html b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/about.html
new file mode 100644
index 0000000..8dcc369
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head><body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 30, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/plugin.properties b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/plugin.properties
new file mode 100644
index 0000000..5dbeb43
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.runtime_1.6.7.20091231194938/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2004 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+# 
+# Contributors:
+#     Matt Chapman - initial version to separate out aspectjrt.jar from ajde
+###############################################################################
+ 
+pluginName=AspectJ Runtime
+providerName=Eclipse AspectJ Development Tools
\ No newline at end of file
diff --git a/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/MANIFEST.MF b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8c106ca
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.aspectj.weaver
+Bundle-Version: 1.6.7.20091231194938
+Bundle-ClassPath: aspectjweaver.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.aspectj.runtime;bundle-version="1.5.3";visibility:=reexport
+Export-Package: org.aspectj.apache.bcel;version="1.6.4",
+ org.aspectj.apache.bcel.classfile;version="1.6.4",
+ org.aspectj.apache.bcel.classfile.annotation;version="1.6.4",
+ org.aspectj.apache.bcel.generic;version="1.6.4",
+ org.aspectj.apache.bcel.util;version="1.6.4",
+ org.aspectj.asm;version="1.6.4",
+ org.aspectj.asm.internal;version="1.6.4",
+ org.aspectj.bridge;version="1.6.4",
+ org.aspectj.bridge.context;version="1.6.4",
+ org.aspectj.util;version="1.6.4",
+ org.aspectj.weaver;version="1.6.4",
+ org.aspectj.weaver.ast;version="1.6.4",
+ org.aspectj.weaver.bcel;version="1.6.4",
+ org.aspectj.weaver.internal.tools;version="1.6.4",
+ org.aspectj.weaver.loadtime;version="1.6.4",
+ org.aspectj.weaver.loadtime.definition;version="1.6.4",
+ org.aspectj.weaver.model;version="1.6.4",
+ org.aspectj.weaver.patterns;version="1.6.4",
+ org.aspectj.weaver.reflect;version="1.6.4",
+ org.aspectj.weaver.tools;version="1.6.4"
diff --git a/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/eclipse.inf b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/eclipse.inf
new file mode 100644
index 0000000..92ffed2
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/META-INF/eclipse.inf
@@ -0,0 +1,2 @@
+#Processed using Jarprocessor
+pack200.conditioned = true
diff --git a/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/about.html b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/about.html
new file mode 100644
index 0000000..c064b9e
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/about.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head><body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>May 30, 2007</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+		
+		<h3>Third Party Content</h3>
+		<p>The Content includes items that have been sourced from third parties as set out below. If you 
+		did not receive this Content directly from the Eclipse Foundation, the following is provided 
+		for informational purposes only, and you should look to the Redistributor's license for 
+		terms and conditions of use.</p>
+		<p><em>
+		
+	    <strong>BCEL v5.1</strong>
+		<p>This product contains software developed by the
+         Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org</a>).</p>
+ 
+		<p>AspectJ includes a modified version of the Apache Jakarta Byte Code Engineering Library (BCEL) v5.1.
+		BCEL is available at <a href="http://jakarta.apache.org/bcel/">http://jakarta.apache.org/bcel/</a>. Source
+		code for the modified version of BCEL is available at Eclipse.org in the AspectJ source tree. This code
+		is made available under the Apache Software License v1.1</p>
+		
+		</em></p>
+
+
+</body></html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/plugin.properties b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/plugin.properties
new file mode 100644
index 0000000..0947f1b
--- /dev/null
+++ b/eclipse/plugins/org.aspectj.weaver_1.6.7.20091231194938/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+# 
+# Contributors:
+#    Helen Hawkins - initial version to separate out aspectjweaver.jar from ajde
+###############################################################################
+
+pluginName=AspectJ Weaver
+providerName=Eclipse AspectJ Development Tools
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ant.core/META-INF/MANIFEST.MF
index 04369e6..ce39c3b 100644
--- a/eclipse/plugins/org.eclipse.ant.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ant.core/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ant.core; singleton:=true
-Bundle-Version: 3.2.101.qualifier
+Bundle-Version: 3.2.201.qualifier
 Bundle-Activator: org.eclipse.ant.core.AntCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ant.core,
- org.eclipse.ant.internal.core;x-friends:="org.eclipse.ant.ui",
+ org.eclipse.ant.internal.core;x-friends:="org.eclipse.ant.ui,org.eclipse.ant.launching",
  org.eclipse.ant.internal.core.contentDescriber;x-internal:=true
 Require-Bundle: org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.ant.core/about.html b/eclipse/plugins/org.eclipse.ant.core/about.html
index e2b66d6..b3c0a26 100644
--- a/eclipse/plugins/org.eclipse.ant.core/about.html
+++ b/eclipse/plugins/org.eclipse.ant.core/about.html
@@ -8,7 +8,7 @@
 <body lang="EN-US">
 <h2>About This Content</h2>
  
-<p>May 11, 2006</p>	
+<p>October 8, 2009</p>	
 <h3>License</h3>
 
 <p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
@@ -31,7 +31,7 @@ did not receive this Content directly from the Eclipse Foundation, the following
 for informational purposes only, and you should look to the Redistributor’s license for 
 terms and conditions of use.</p>
 
-<h4>Ant 1.6.5</h4>
+<h4>Ant 1.7.1</h4>
 
 <p>The following classes in the plug-in JAR are based on Ant code  developed by The Apache Software Foundation and shall be defined as the "Ant-Derived Work":</p>
 
diff --git a/eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html b/eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html
index f1023f3..aa102dd 100644
--- a/eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html
+++ b/eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html
@@ -3,93 +3,18 @@
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]">
-   <title>Eclipse 3.5 Ant Release Notes</title>
+   <title>Eclipse 3.6 Ant Release Notes</title>
 </head>
 <body>
 
 <h1>
-Eclipse 3.5 Ant Build Notes</h1>
+Eclipse 3.6 Ant Build Notes</h1>
 
-<h2>Enhancements in 3.5</h2>
-<ul>
-  <li>Added API constants for Ant launch configuration attributes - <code>org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants</code>.</li>
-</ul>
+<h2>Enhancements in 3.6</h2>
+<p>None.</p>
 
-<h2>May 5, 2009</h2>
+<h2>July 6, 2009</h2>
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275839">Bug 275839</a>: Eclipse Preferences Ant Runtime -- NPE -- (PDE Export fails)<br>
-
-<h2>May 5, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274603">Bug 274603</a>: Unreachable strings<br>
-
-<h2>May 7, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274601">Bug 274601</a>: Problem with InternalAntRunner_Specifying_property_files_is_a_Ant_1_5___feature__Please_update_your_Ant_classpath__6<br>
-
-<h2>April 14, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=222615">Bug 222615</a>: Export Ant buildfile does not export JUnit4 style tests<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=223902">Bug 223902</a>: [launching] No descriptions for ant launch shortcuts<br>
-
-<h2>April 7, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270041">Bug 270041</a>: Any first Ant target invocation builds open java projects while Build Automatically is turned off<br>
-
-<h2>March 23, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161354">Bug 161354</a>: Exported ANT scripts should use the 'dir' attribute of the ant task<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=201143">Bug 201143</a>: exported ant script does not apply include/exclude filter on init target's copy task<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267459">Bug 267459</a>: Java project with an external jar file from FS root on the build path throws a NPE during the Ant Buildfile generation.<br>
-
-<h2>February 3, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218074">Bug 218074</a>: button label truncations on External Tools Builders config dialog<br>
-
-<h2>3.5 M5 - January 30, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262378">Bug 262378</a>: Ant test suite does not handle dynamic plugin version length<br>
-
-<h2>December 22, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=215530">Bug 215530</a>: Ant targets no longer bring up "Ant Configuration Settings" Dialog box<br>
-
-<h2>November 25, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253100">Bug 253100</a>: 'Builders' property page should remember it has warned the user<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256299">Bug 256299</a>: Simplify setup of ContentAssistAction<br>
-
-<h2>November 18, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255370">Bug 255370</a>: AntBuildfileContentDescriber should extend org.eclipse.core.runtime.content.XMLContentDescriber<br>
-
-<h2>October 4, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251259">Bug 251259</a>: Use the new contentType extension point<br>
-
-<h2>Aug 19, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244581">Bug 244581</a>: Javadoc warnings in N20080818-2000<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244301">Bug 244301</a>: javadoc errors in N20080814-2000<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244121">Bug 244121</a>: Warning in build<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=42262">Bug 42262</a>: Ant API<br>
-
-<h2>July 22, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241538">Bug 241538</a>: ant tests need to be updated to reflect ant 1.7.1<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=209504">Bug 209504</a>: Adopt Apache Ant 1.7.1<br>
-
-<h2>July 8, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=158627">Bug 158627</a>: Eclipse is not following a variable import link<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=201180">Bug 201180</a>: Export ant buildfile does not export bootclasspath correctly<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=192726">Bug 192726</a>: ant exporter incorrectly defines path variables<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=195840">Bug 195840</a>: Import a XML file with BOM character in ant editor fails<br>
-
-<h2>June 30, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238665">Bug 238665</a>: Change to use bundle activation policy for Ant core and Ant ui<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238990">Bug 238990</a>: Remove no longer used code to setup code assist navigation<br>
-
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277487">Bug 277487</a>: Ant UI tests should not force focus of test workbench when breakpoint is hit<br>
 </body>
 </html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.core/plugin.xml b/eclipse/plugins/org.eclipse.ant.core/plugin.xml
index 30f75af..227a737 100644
--- a/eclipse/plugins/org.eclipse.ant.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ant.core/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html b/eclipse/plugins/org.eclipse.ant.core/r3_5_buildnotes_platform-ant.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.ant.core/buildnotes_platform-ant.html
copy to eclipse/plugins/org.eclipse.ant.core/r3_5_buildnotes_platform-ant.html
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
index 5c3d03b..61d38c4 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -99,7 +99,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		}
 
 		public String toString() {
-			return from.toString() + "->" + (to == null ? IAntCoreConstants.EMPTY_STRING : to.toString()); //$NON-NLS-1$
+			return from.toString() + "->" + (to == null ? "" : to.toString()); //$NON-NLS-1$//$NON-NLS-2$
 		}
 	}
 
@@ -206,7 +206,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreTasks(Preferences prefs) {
 		 String tasks = prefs.getString(IAntCoreConstants.PREFERENCE_TASKS);
-		 if (tasks.equals(IAntCoreConstants.EMPTY_STRING)) {
+		 if (tasks.equals("")) { //$NON-NLS-1$
 			 customTasks = new Task[0];
 		 } else {
 			 customTasks = extractTasks(prefs, getArrayFromString(tasks));
@@ -215,7 +215,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreTypes(Preferences prefs) {
 		String types = prefs.getString(IAntCoreConstants.PREFERENCE_TYPES);
-		if (types.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (types.equals("")) {//$NON-NLS-1$
 			customTypes = new Type[0];
 		} else {
 			customTypes = extractTypes(prefs, getArrayFromString(types));
@@ -224,14 +224,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreAntHomeEntries(Preferences prefs) {
 		String entries = prefs.getString("ant_urls"); //old constant //$NON-NLS-1$
-		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (entries.equals("")) {//$NON-NLS-1$
 			entries= prefs.getString(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES);
 		} else {
 			prefs.setToDefault("ant_urls"); //$NON-NLS-1$
 			antHomeEntries= migrateURLEntries(getArrayFromString(entries));
 			return;
 		}
-		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (entries.equals("")) {//$NON-NLS-1$
 			antHomeEntries= getDefaultAntHomeEntries();
 		} else {
 			antHomeEntries= extractEntries(getArrayFromString(entries));
@@ -240,14 +240,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreAdditionalEntries(Preferences prefs) {
 		String entries = prefs.getString("urls"); //old constant //$NON-NLS-1$
-		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (entries.equals("")) {//$NON-NLS-1$
 			entries = prefs.getString(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES);
 		} else {
 			prefs.setToDefault("urls"); //$NON-NLS-1$
 			additionalEntries= migrateURLEntries(getArrayFromString(entries));
 			return;
 		}
-		if (entries.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (entries.equals("")) {//$NON-NLS-1$
 			IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
 			List userLibs= getUserLibraries();
 			if (toolsJarEntry == null) {
@@ -314,7 +314,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreCustomProperties(Preferences prefs) {
 		String properties = prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTIES);
-		if (properties.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (properties.equals("")) {//$NON-NLS-1$
 			customProperties = new Property[0];
 		} else {
 			customProperties = extractProperties(prefs, getArrayFromString(properties));
@@ -323,7 +323,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	
 	private void restoreCustomPropertyFiles(Preferences prefs) {
 		String propertyFiles= prefs.getString(IAntCoreConstants.PREFERENCE_PROPERTY_FILES);
-		if (propertyFiles.equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (propertyFiles.equals("")) { //$NON-NLS-1$
 			customPropertyFiles= new String[0];
 		} else {
 			customPropertyFiles= getArrayFromString(propertyFiles);
@@ -342,7 +342,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 			task.setTaskName(taskName);
 			task.setClassName(values[0]);
 			String library= values[1];
-			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
+			if (library.startsWith("file:")) { //$NON-NLS-1$
 				//old format where URLs were persisted
 				library= library.substring(5);
 			}
@@ -364,7 +364,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 			type.setTypeName(typeName);
 			type.setClassName(values[0]);
 			String library= values[1];
-			if (library.startsWith(IAntCoreConstants.FILE_PROTOCOL)) {
+			if (library.startsWith("file:")) { //$NON-NLS-1$
 				//old format where URLs were persisted
 				library= library.substring(5);
 			}
@@ -476,11 +476,14 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	/**
 	 * Simple algorithm to find the highest version of <code>org.apache.ant</code> 
 	 * available. If there are other providers that are not <code>org.apache.ant</code>
-	 * <code>null</code> is returned so that all bundles will be inspected 
-	 * for contributed libraries.
-	 * <p>
-	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=282851
-	 * </p>
+	 * they are ignored and all versions of <code>org.apache.ant</code> are considered.
+	 * <br><br>
+	 * See the following bugs for related history:
+	 * <ul>
+	 * <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282851">https://bugs.eclipse.org/bugs/show_bug.cgi?id=282851</a></li>
+	 * <li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=325125">https://bugs.eclipse.org/bugs/show_bug.cgi?id=325125</a></li>
+	 * </ul>
+	 * 
 	 * @param packages the live list of {@link ExportedPackage}s to inspect
 	 * @return the bundle that represents the highest version of <code>org.apache.ant</code> or <code>null</code>
 	 * if there are other providers for the <code>org.apache.ant.tools</code> packages.
@@ -496,9 +499,6 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 			if("org.apache.ant".equals(bundle.getSymbolicName())) { //$NON-NLS-1$
 				bundles.add(bundle);
 			}
-			else {
-				return null;
-			}
 		}
 		Bundle highest = null;
 		Bundle temp = null;
@@ -552,7 +552,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 				continue;
 			}
 			Task task = new Task();
-			task.setTaskName(element.getAttribute(IAntCoreConstants.NAME));
+			task.setTaskName(element.getAttribute(AntCorePlugin.NAME));
 			task.setClassName(element.getAttribute(AntCorePlugin.CLASS));
 			
 			configureAntObject(result, element, task, task.getTaskName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_task);
@@ -587,7 +587,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 				continue;
 			}
 			Type type = new Type();
-			type.setTypeName(element.getAttribute(IAntCoreConstants.NAME));
+			type.setTypeName(element.getAttribute(AntCorePlugin.NAME));
 			type.setClassName(element.getAttribute(AntCorePlugin.CLASS));
 			
 			configureAntObject(result, element, type, type.getTypeName(), InternalCoreAntMessages.AntCorePreferences_No_library_for_type);
@@ -708,11 +708,11 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 			if (!relevantRunningHeadless(element)) {
 				continue;
 			}
-			String name = element.getAttribute(IAntCoreConstants.NAME);
+			String name = element.getAttribute(AntCorePlugin.NAME);
 			if (name == null) {
 				continue;
 			}
-			String value = element.getAttribute(IAntCoreConstants.VALUE);
+			String value = element.getAttribute(AntCorePlugin.VALUE);
 			Property property= null;
 			if (value != null) {
 				property = new Property(name, value);
@@ -746,17 +746,16 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	 * @since 3.0
 	 */
 	public IAntClasspathEntry getToolsJarEntry(IPath javaHomePath) {
-		IPath newjh = javaHomePath;
-		if ("jre".equalsIgnoreCase(newjh.lastSegment())) { //$NON-NLS-1$
-			newjh = newjh.removeLastSegments(1);
+		if ("jre".equalsIgnoreCase(javaHomePath.lastSegment())) { //$NON-NLS-1$
+			javaHomePath = javaHomePath.removeLastSegments(1);
 		}
-		newjh= newjh.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
-		File tools= newjh.toFile();
+		javaHomePath= javaHomePath.append("lib").append("tools.jar"); //$NON-NLS-1$ //$NON-NLS-2$
+		File tools= javaHomePath.toFile();
 		if (!tools.exists()) {
 			//attempt to find in the older 1.1.* 
-			newjh= newjh.removeLastSegments(1);
-			newjh= newjh.append("classes.zip"); //$NON-NLS-1$
-			tools= newjh.toFile();
+			javaHomePath= javaHomePath.removeLastSegments(1);
+			javaHomePath= javaHomePath.append("classes.zip"); //$NON-NLS-1$
+			tools= javaHomePath.toFile();
 			if (!tools.exists()) {
 				return null;
 			}
@@ -893,7 +892,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	private void addLibraries(Bundle source, List destination) throws IOException, MalformedURLException {
 		ManifestElement[] libraries = null;
 		try {
-			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders(IAntCoreConstants.EMPTY_STRING).get(Constants.BUNDLE_CLASSPATH));
+			libraries = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) source.getHeaders("").get(Constants.BUNDLE_CLASSPATH)); //$NON-NLS-1$
 		} catch (BundleException e) {
 			IStatus status = new Status(IStatus.ERROR, AntCorePlugin.PI_ANTCORE, AntCorePlugin.ERROR_MALFORMED_URL, InternalCoreAntMessages.AntCorePreferences_0, e);
 			AntCorePlugin.getPlugin().getLog().log(status);
@@ -1504,13 +1503,13 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	 */
 	protected String[] getArrayFromString(String list) {
 		String separator= ","; //$NON-NLS-1$
-		if (list == null || list.trim().equals(IAntCoreConstants.EMPTY_STRING)) {
+		if (list == null || list.trim().equals("")) { //$NON-NLS-1$
 			return new String[0];
 		}
 		ArrayList result = new ArrayList();
 		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
 			String token = tokens.nextToken().trim();
-			if (!token.equals(IAntCoreConstants.EMPTY_STRING)) {
+			if (!token.equals("")) { //$NON-NLS-1$
 				result.add(token);
 			}
 		}
@@ -1548,7 +1547,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		}	
 		
 		if (customTasks.length == 0) {
-			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, IAntCoreConstants.EMPTY_STRING);
+			prefs.setValue(IAntCoreConstants.PREFERENCE_TASKS, ""); //$NON-NLS-1$
 			return;
 		}
 		StringBuffer tasks = new StringBuffer();
@@ -1570,7 +1569,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		}	
 				
 		if (customTypes.length == 0) {
-			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, IAntCoreConstants.EMPTY_STRING);
+			prefs.setValue(IAntCoreConstants.PREFERENCE_TYPES, ""); //$NON-NLS-1$
 			return;
 		}
 		StringBuffer types = new StringBuffer();
@@ -1592,7 +1591,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		}
 		
 		if (customProperties.length == 0) {
-			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, IAntCoreConstants.EMPTY_STRING);
+			prefs.setValue(IAntCoreConstants.PREFERENCE_PROPERTIES, ""); //$NON-NLS-1$
 			return;
 		}
 		StringBuffer properties = new StringBuffer();
@@ -1605,8 +1604,8 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	}
 
 	protected void updateAdditionalEntries(Preferences prefs) {
-		prefs.setValue("urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
-		String serialized= IAntCoreConstants.EMPTY_STRING;
+		prefs.setValue("urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
+		String serialized= ""; //$NON-NLS-1$
 		IAntClasspathEntry toolsJarEntry= getToolsJarEntry();
 		List userLibs= getUserLibraries();
 		if (userLibs == null) {
@@ -1636,7 +1635,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		
 		prefs.setValue(IAntCoreConstants.PREFERENCE_ADDITIONAL_ENTRIES, serialized);
 		
-		String prefAntHome= IAntCoreConstants.EMPTY_STRING;
+		String prefAntHome= ""; //$NON-NLS-1$
 		if (antHome != null && !antHome.equals(getDefaultAntHome())) {
 			prefAntHome= antHome;
 		} 
@@ -1644,7 +1643,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 	}
 	
 	protected void updateAntHomeEntries(Preferences prefs) {
-		prefs.setValue("ant_urls", IAntCoreConstants.EMPTY_STRING); //old constant removed  //$NON-NLS-1$
+		prefs.setValue("ant_urls", ""); //old constant removed  //$NON-NLS-1$//$NON-NLS-2$
 		
 		//see if the custom entries are just the default entries
 		IAntClasspathEntry[] defaultEntries= getDefaultAntHomeEntries();
@@ -1661,7 +1660,7 @@ public class AntCorePreferences implements org.eclipse.core.runtime.Preferences.
 		if (dflt) {
 			//always want to recalculate the default Ant urls
 			//to pick up any changes in the default Ant classpath
-			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, IAntCoreConstants.EMPTY_STRING);
+			prefs.setValue(IAntCoreConstants.PREFERENCE_ANT_HOME_ENTRIES, ""); //$NON-NLS-1$
 			return;
 		}
 		StringBuffer entries = new StringBuffer();
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
index 2797399..edddfbf 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/AntRunner.java
@@ -340,7 +340,7 @@ public class AntRunner implements IApplication {
 			
 			if (buildLoggerClassName == null) {
 				//indicate that the default logger is not to be used
-				buildLoggerClassName= IAntCoreConstants.EMPTY_STRING;
+				buildLoggerClassName= ""; //$NON-NLS-1$
 			}
 			// add build logger
 			Method addBuildLogger = classInternalAntRunner.getMethod("addBuildLogger", new Class[] { String.class }); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
index 0db8c2a..41b1605 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/ProjectInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ant.core;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-
 
 /**
  * Represents information about a project within an Ant build file.
@@ -30,12 +28,12 @@ public class ProjectInfo {
 	 * Create a project information
 	 * 
 	 * @param name project name
-	 * @param description a brief explanation of the project's purpose or
+	 * @param description a brief explanation of the project's purpose 		or
 	 * <code>null</code> if not specified
 	 */
 	/*package*/
 	ProjectInfo(String name, String description) {
-		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
+		this.name = name == null ? "" : name; //$NON-NLS-1$
 		this.description = description;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
index 7eede73..bfec707 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/core/TargetInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ant.core;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-
 
 /**
  * Represents information about a target within an Ant build file.
@@ -40,7 +38,7 @@ public class TargetInfo {
 	 */
 	/*package*/
 	TargetInfo(ProjectInfo project, String name, String description, String[] dependencies, boolean isDefault) {
-		this.name = name == null ? IAntCoreConstants.EMPTY_STRING : name;
+		this.name = name == null ? "" : name; //$NON-NLS-1$
 		this.description = description;
 		this.project = project;
 		this.dependencies = dependencies;
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
index 9069438..45d19ec 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntClasspathEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,10 +42,10 @@ public class AntClasspathEntry implements IAntClasspathEntry {
 		}
 		try {
 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(entryString);
-			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
+			return new URL("file:" + expanded); //$NON-NLS-1$
 		} catch (CoreException e) {
 			try {
-				return new URL(IAntCoreConstants.FILE_PROTOCOL + entryString);
+				return new URL("file:" + entryString); //$NON-NLS-1$
 			} catch (MalformedURLException e1) {
 				return null;
 			}
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
index 0e54eeb..483b4b3 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntCoreUtil.java
@@ -73,12 +73,12 @@ public class AntCoreUtil {
 		}
 		commands.remove(index);
 		if (index == commands.size()) {// if this is the last command
-			return IAntCoreConstants.EMPTY_STRING;
+			return ""; //$NON-NLS-1$
 		}
 		
 		String command = (String) commands.get(index);
 		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
-			return IAntCoreConstants.EMPTY_STRING;
+			return ""; //$NON-NLS-1$
 		}
 		commands.remove(index);
 		return command;
@@ -94,7 +94,7 @@ public class AntCoreUtil {
 				int posEq = name.indexOf("="); //$NON-NLS-1$
 				if (posEq == 0) {
 					value= name.substring(1);
-					name= IAntCoreConstants.EMPTY_STRING;
+					name= ""; //$NON-NLS-1$
 				} else if (posEq > 0 && posEq != name.length() - 1) {
 					value = name.substring(posEq + 1).trim();
 					name = name.substring(0, posEq);
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
index 30ab90f..2b0fc00 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/AntObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,7 +82,7 @@ public abstract class AntObject {
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-		if (fURI == null || fURI.equals(IAntCoreConstants.EMPTY_STRING) || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$
+		if (fURI == null || fURI.equals("") || fURI.equals("antlib:org.apache.tools.ant")) {  //$NON-NLS-1$//$NON-NLS-2$
             return fName;
         }
 		return fURI + ':' + fName;
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
index 1c84381..30c2dbc 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/IAntCoreConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.core;
 
-import org.eclipse.ant.core.AntCorePlugin;
-
 
 /**
  * Common constants.
@@ -45,74 +43,4 @@ public interface IAntCoreConstants {
 	public static final String PREFERENCE_PROPERTIES = "properties"; //$NON-NLS-1$
 	public static final String PREFERENCE_PROPERTY_FILES = "propertyfiles"; //$NON-NLS-1$
 	public static final String PREFIX_PROPERTY = "property."; //$NON-NLS-1$
-
-	/**
-	 * Constant for the word 'default'
-	 * <br><br>
-	 * Value is: <code>default</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String DEFAULT = "default"; //$NON-NLS-1$
-
-	/**
-	 * Constant for the word 'dir'
-	 * <br><br>
-	 * Value is: <code>dir</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String DIR = "dir"; //$NON-NLS-1$
-	
-	/**
-	 * Constant for the empty {@link String}
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	
-	/**
-	 * Constant for the word 'file'
-	 * <br><br>
-	 * Value is: <code>file</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String FILE = "file"; //$NON-NLS-1$
-
-	/**
-	 * Constant representing a file URL protocol
-	 * <br><br>
-	 * Value is: <code>file:</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
-	
-	/**
-	 * Constant for the word 'name'
-	 * <br><br>
-	 * Value is: <code>name</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String NAME = AntCorePlugin.NAME;
-
-	/**
-	 * Constant for the word 'value'
-	 * <br><br>
-	 * Value is: <code>value</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String VALUE = AntCorePlugin.VALUE;
-
-	/**
-	 * Constant for the word 'description'
-	 * <br><br>
-	 * Value is: <code>description</code>
-	 * 
-	 * @since org.eclipse.ant.core 3.2.200
-	 */
-	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
index 2a48c60..22d5b4b 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src/org/eclipse/ant/internal/core/contentDescriber/AntHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -56,6 +55,7 @@ public final class AntHandler extends DefaultHandler {
         }
     }
 
+    private static final String DEFAULT_ATTRIBUTE= "default"; //$NON-NLS-1$
     private static final String PROJECT = "project"; //$NON-NLS-1$
     private static final String TARGET= "target"; //$NON-NLS-1$
     private static final String MACRODEF= "macrodef"; //$NON-NLS-1$
@@ -141,7 +141,7 @@ public final class AntHandler extends DefaultHandler {
      * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
      */
     public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
-        return new InputSource(new StringReader(IAntCoreConstants.EMPTY_STRING));
+        return new InputSource(new StringReader("")); //$NON-NLS-1$
     }
 
     /*
@@ -158,7 +158,7 @@ public final class AntHandler extends DefaultHandler {
                 throw new StopParsingException();
             }
             if (attributes != null) {
-                fDefaultAttributeFound= attributes.getValue(IAntCoreConstants.DEFAULT) != null;
+                fDefaultAttributeFound= attributes.getValue(DEFAULT_ATTRIBUTE) != null;
                 if (fDefaultAttributeFound) {
                     throw new StopParsingException();
                 }
diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
index 752c21a..4b69c48 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/InternalAntRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2011 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -55,7 +55,6 @@ import org.eclipse.ant.core.Type;
 import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
 import org.eclipse.ant.internal.core.AntCoreUtil;
 import org.eclipse.ant.internal.core.AntSecurityManager;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IPath;
@@ -740,7 +739,7 @@ public class InternalAntRunner {
 	private BuildLogger createLogger() {
 		if (loggerClassname == null) {
 			buildLogger= new DefaultLogger();
-		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
+		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
 			try {
 				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
 			} catch (ClassCastException e) {
@@ -838,8 +837,8 @@ public class InternalAntRunner {
 			project.log(message, priority);	
 		} else {
 			if (buildListeners != null) {
-				Project p = new Project();
-				BuildEvent event = new BuildEvent(p);
+				project = new Project();
+				BuildEvent event = new BuildEvent(project);
 				event.setMessage(message, priority);
 				//notify the build listeners that are not registered as
 				//no project existed
@@ -1164,7 +1163,7 @@ public class InternalAntRunner {
 		if (p < 0) { return; }
 
 		// remove everything preceding that last '-arg'
-		String s = IAntCoreConstants.EMPTY_STRING;
+		String s = ""; //$NON-NLS-1$
 		for (int i = 0; i <= p; i++) {
 			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
 			commands.remove(0);
diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
index c069c4c..f192299 100644
--- a/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
+++ b/eclipse/plugins/org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant/ProgressBuildListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2011 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,7 +28,6 @@ import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.Ant;
 import org.apache.tools.ant.taskdefs.CallTarget;
 import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
@@ -95,11 +94,10 @@ public class ProgressBuildListener implements BuildListener {
 		projects = new HashMap();
 		mainProject = project;
 		ProjectMonitors monitors = new ProjectMonitors();
-		IProgressMonitor localmonitor = monitor;
-		if (localmonitor == null) {
-			localmonitor= new NullProgressMonitor();
+		if (monitor == null) {
+			monitor= new NullProgressMonitor();
 		}
-		monitors.setMainMonitor(localmonitor);
+		monitors.setMainMonitor(monitor);
 		projects.put(mainProject, monitors);
 		List targets= new ArrayList(targetNames.size());
 		for (int i = 0; i < targetNames.size(); i++) {
@@ -110,7 +108,7 @@ public class ProgressBuildListener implements BuildListener {
 			}
 		}
 		int work = computeWork(targets);
-		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
+		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
 	}
 
 	/* (non-Javadoc)
@@ -192,7 +190,7 @@ public class ProgressBuildListener implements BuildListener {
 
 		monitors.setTargetMonitor(subMonitorFor(monitors.getMainMonitor(), 1));
 		int work = (target != null) ? target.getTasks().length : 100;
-		monitors.getTargetMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
+		monitors.getTargetMonitor().beginTask("", work);  //$NON-NLS-1$
 	}
 
 	protected ProjectMonitors createMonitors(Project currentProject, Target target) {
@@ -211,7 +209,7 @@ public class ProgressBuildListener implements BuildListener {
 			parentProject = null;
 			monitors.setMainMonitor(subMonitorFor(parentMonitors.getTaskMonitor(), 1));
 		}
-		monitors.getMainMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, work);
+		monitors.getMainMonitor().beginTask("", work);  //$NON-NLS-1$
 		projects.put(currentProject, monitors);
 		return monitors;
 	}
@@ -257,7 +255,7 @@ public class ProgressBuildListener implements BuildListener {
 		}
 		currentTaskThread= Thread.currentThread();
 		monitors.setTaskMonitor(subMonitorFor(monitors.getTargetMonitor(), 1));
-		monitors.getTaskMonitor().beginTask(IAntCoreConstants.EMPTY_STRING, 1);
+		monitors.getTaskMonitor().beginTask("", 1);  //$NON-NLS-1$
 		// If this script is calling another one, track the project chain.
 		if (task instanceof Ant) {
 			parentProject = currentProject;
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.classpath b/eclipse/plugins/org.eclipse.ant.launching/.classpath
new file mode 100644
index 0000000..a8eb00e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" output="loggers_bin" path="loggers"/>
+	<classpathentry kind="src" output="common_bin" path="common"/>
+	<classpathentry kind="src" output="remote_bin" path="remote"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch
new file mode 100644
index 0000000..2f1ec55
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build common debug [Builder].launch	
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254539808328_112" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/lib" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254539834953_113" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/common" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch
new file mode 100644
index 0000000..ec718d8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build loggers [Builder].launch	
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.ant.uiSET_INPUTHANDLER" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254539604968_29" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/lib" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildLoggers.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254539671875_56" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/loggers" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildLoggers.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch
new file mode 100644
index 0000000..c56eb96
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.externalToolBuilders/build remote support [Builder].launch	
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254617191468_44" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/lib" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ant.launching/buildfiles/buildRemote.xml"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ant.launching"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1254617206453_45" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.ant.launching/remote" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.ant.launching/buildfiles/buildRemote.xml}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
+</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.project b/eclipse/plugins/org.eclipse.ant.launching/.project
new file mode 100644
index 0000000..5f704ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.project
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.ant.launching</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>auto,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value><project>/.externalToolBuilders/build loggers [Builder].launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>auto,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value><project>/.externalToolBuilders/build common debug [Builder].launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>auto,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value><project>/.externalToolBuilders/build remote support [Builder].launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8bd34ab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,74 @@
+#Sun Sep 20 13:08:07 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..4692cab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,25 @@
+#Wed Oct 07 12:57:43 CDT 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ant.launching/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ant.launching/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..dd528aa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/META-INF/MANIFEST.MF
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Localization: plugin
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.ant.launching;singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Activator: org.eclipse.ant.internal.launching.AntLaunching
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.jdt.launching;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ant.core;bundle-version="[3.2.0,4.0.0)",
+ org.apache.ant;bundle-version="1.7.1",
+ org.eclipse.core.externaltools;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.text;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Export-Package: org.eclipse.ant.internal.launching;x-friends:="org.eclipse.ant.ui",
+ org.eclipse.ant.internal.launching.debug;x-friends:="org.eclipse.ant.ui",
+ org.eclipse.ant.internal.launching.debug.model;x-friends:="org.eclipse.ant.ui",
+ org.eclipse.ant.internal.launching.launchConfigurations;x-friends:="org.eclipse.ant.ui",
+ org.eclipse.ant.launching
+Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.ant.launching/about.html b/eclipse/plugins/org.eclipse.ant.launching/about.html
new file mode 100644
index 0000000..5993925
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/about.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>October 8, 2009</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you 
+did not receive this Content directly from the Eclipse Foundation, the following is provided 
+for informational purposes only, and you should look to the Redistributor’s license for 
+terms and conditions of use.</p>
+
+<h4>Ant 1.7.1</h4>
+
+<p>The following classes in the plug-in JAR are based on Ant code developed by The Apache Software Foundation and shall be defined as the "Ant-Derived Work":</p>
+
+<ul>
+	<li>org.eclipse.ant.internal.launching.remote.InternalAntRunner</li>
+</ul>
+
+<p>The object code for InternalAntRunner is located in lib/remote.jar and the source code is located in lib/remotesrc.zip.</p>
+
+<p>Your use of the Ant-Derived Work is subject to the terms and conditions of the Apache Software License 2.0.  A copy of the license is contained
+in the file <a href="about_files/asl-v20.txt" target="_blank">about_files/asl-v20.txt</a> and is also available at 
+<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>.</p>
+
+<p>The names "Ant" and  "Apache Software Foundation" must not be used to endorse or promote products derived from this 
+software without prior written permission.  For written permission, please contact <a href="mailto:apache at apache.org">apache at apache.org</a>.</p>
+
+<p>The Apache attribution <a href="about_files/NOTICE" target="_blank">NOTICE</a> file is included with the Content in accordance with 4d of the Apache License, Version 2.0.</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/build.properties b/eclipse/plugins/org.eclipse.ant.launching/build.properties
new file mode 100644
index 0000000..f7a9d05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/build.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/                           
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               lib/antdebug.jar,\
+               lib/loggers.jar,\
+               lib/remote.jar,\
+               about.html
+
+jars.compile.order = .,\
+				                     lib/antdebug.jar,\
+                     lib/loggers.jar,\
+                     lib/remote.jar
+source.lib/loggers.jar = loggers/
+output.lib/loggers.jar = loggers_bin/
+source.lib/antdebug.jar = common/
+output.lib/antdebug.jar = common_bin/
+source.lib/remote.jar = remote/
+output.lib/remote.jar = remote_bin/
+src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
new file mode 100644
index 0000000..88b99eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildCommonDebug.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Copyright (c) 2005, 2009 IBM Corporation and others.
+     All rights reserved. This program and the accompanying materials
+     are made available under the terms of the Eclipse Public License v1.0
+     which accompanies this distribution, and is available at
+     http://www.eclipse.org/legal/epl-v10.html
+    
+     Contributors:
+         IBM Corporation - initial API and implementation
+ -->
+
+<project name="Build Ant common debug support JAR" default="build" basedir="..">
+	
+	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/antdebuglib.jar"/>
+
+	<target name="init">
+		<property name="temp.folder" value="${basedir}/temp.folder"/>
+		<property name="build.result.folder" value="${basedir}"/>
+	</target>
+	
+	<target name="lib/antdebuglib.jar" description= "Creates the antdebug.jar" depends="init">
+		<property name="destdir" value="${temp.folder}/lib/antdebug.jar.bin"/>
+		<delete dir="${destdir}"/>
+		<mkdir dir="${destdir}"/>
+		<!-- copy necessary class files resources -->
+		<copy todir="${destdir}">
+			<fileset dir="${basedir}/common_bin"/>
+		</copy>
+		<mkdir dir="${build.result.folder}/lib"/>
+		<jar destfile="${build.result.folder}/lib/antdebug.jar" basedir="${destdir}"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+
+	<target name="clean" description="Deletes previous build remnants" depends="init">
+		<delete file="${build.result.folder}/lib/antdebug.jar"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+</project>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildLoggers.xml b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildLoggers.xml
new file mode 100644
index 0000000..1dbb04c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildLoggers.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Copyright (c) 2005, 2009 IBM Corporation and others.
+     All rights reserved. This program and the accompanying materials
+     are made available under the terms of the Eclipse Public License v1.0
+     which accompanies this distribution, and is available at
+     http://www.eclipse.org/legal/epl-v10.html
+    
+     Contributors:
+         IBM Corporation - initial API and implementation
+ -->
+
+<project name="Build Ant loggers support JAR" default="build" basedir="..">
+	
+	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/loggerslib.jar"/>
+
+	<target name="init">
+		<property name="temp.folder" value="${basedir}/temp.folder"/>
+		<property name="build.result.folder" value="${basedir}"/>
+	</target>
+
+	<target name="lib/loggerslib.jar" description= "Creates the loggers.jar" depends="init">
+		<property name="destdir" value="${temp.folder}/lib/loggers.jar.bin"/>
+		<delete dir="${destdir}"/>
+		<mkdir dir="${destdir}"/>
+		<!-- copy necessary class files resources -->
+		<copy todir="${destdir}">
+			<fileset dir="${basedir}/loggers_bin/"/>
+		</copy>
+		<mkdir dir="${build.result.folder}/lib"/>
+		<jar destfile="${build.result.folder}/lib/loggers.jar" basedir="${destdir}"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+
+	<target name="clean" description="Deletes previous build remnants" depends="init">
+		<delete file="${build.result.folder}/lib/loggers.jar"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+</project>
diff --git a/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildRemote.xml b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildRemote.xml
new file mode 100644
index 0000000..2122e58
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/buildfiles/buildRemote.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Copyright (c) 2005, 2009 IBM Corporation and others.
+     All rights reserved. This program and the accompanying materials
+     are made available under the terms of the Eclipse Public License v1.0
+     which accompanies this distribution, and is available at
+     http://www.eclipse.org/legal/epl-v10.html
+    
+     Contributors:
+         IBM Corporation - initial API and implementation
+ -->
+
+<project name="Build Ant remote support JAR" default="build" basedir="..">
+	
+	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remotelib.jar"/>
+
+	<target name="init">
+		<property name="temp.folder" value="${basedir}/temp.folder"/>
+		<property name="build.result.folder" value="${basedir}"/>
+	</target>
+	
+	<target name="lib/remotelib.jar" description= "Creates the remote.jar" depends="init">
+		<property name="destdir" value="${temp.folder}/lib/remote.jar.bin"/>
+		<delete dir="${destdir}"/>
+		<mkdir dir="${destdir}"/>
+		<!-- copy necessary class files resources -->
+		<copy todir="${destdir}">
+			<fileset dir="${basedir}/remote_bin"/>
+		</copy>
+		<mkdir dir="${build.result.folder}/lib"/>
+		<jar destfile="${build.result.folder}/lib/remote.jar" basedir="${destdir}"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+
+	<target name="clean" description="Deletes previous build remnants" depends="init">
+		<delete file="${build.result.folder}/lib/remote.jar"/>
+		<delete dir="${temp.folder}"/>
+	</target>
+</project>
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/META-INF/eclipse.inf b/eclipse/plugins/org.eclipse.ant.launching/common/META-INF/eclipse.inf
similarity index 100%
rename from eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/META-INF/eclipse.inf
rename to eclipse/plugins/org.eclipse.ant.launching/common/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java b/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
new file mode 100644
index 0000000..27592ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/AntDebugState.java
@@ -0,0 +1,530 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug;
+
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Stack;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Location;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.MacroInstance;
+import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
+
+public class AntDebugState {
+    
+    private static final String fgAntTaskName= "ant"; //$NON-NLS-1$
+    private static final String fgAntCallTaskName= "antcall"; //$NON-NLS-1$
+    
+	private IDebugBuildLogger fLogger;
+	private Stack fTasks= new Stack();
+	private Map fTaskToProxies= new HashMap();
+	private Task fCurrentTask;
+	private Task fStepOverTask;
+	private Task fStepIntoTask;
+	private Task fLastTaskFinished;
+    
+	//properties set before execution
+    private Map fInitialProperties= null;
+	private Map fProperties= null;
+    
+    private Map fProjectToTargetNames= null;
+    private Map fProjectToMapOfTargetToBuildSequence= null;
+    private Stack fTargetsToExecute= new Stack();
+    private Stack fTargetsExecuting= new Stack();
+	
+	private boolean fConsiderTargetBreakpoints= false;
+	private boolean fShouldSuspend;
+	private boolean fClientSuspend= false;
+	private boolean fStepIntoSuspend= false;
+	private boolean fIsAfterTaskEvent= false;
+	
+	
+	public AntDebugState(IDebugBuildLogger logger) {
+		fLogger= logger;
+	}
+
+	public void waitIfSuspended() {
+		fLogger.waitIfSuspended();
+	}
+
+	public Task getLastTaskFinished() {
+		return fLastTaskFinished;
+	}
+
+	private void setLastTaskFinished(Task lastTaskFinished) {
+		fLastTaskFinished= lastTaskFinished;
+
+	}
+
+	public Task getCurrentTask() {
+		return fCurrentTask;
+	}
+
+	public void setCurrentTask(Task currentTask) {
+		fCurrentTask= currentTask;
+
+	}
+
+	private Map getInitialProperties() {
+		return fInitialProperties;
+	}
+
+	public Task getStepOverTask() {
+		return fStepOverTask;
+	}
+
+	public void setStepOverTask(Task stepOverTask) {
+		fStepOverTask= stepOverTask;
+
+	}
+
+	private boolean considerTargetBreakpoints() {
+		return fConsiderTargetBreakpoints;
+	}
+
+	private void setConsiderTargetBreakpoints(boolean considerTargetBreakpoints) {
+		fConsiderTargetBreakpoints= considerTargetBreakpoints;
+	}
+
+	private Stack getTasks() {
+		return fTasks;
+	}
+	
+	public void setShouldSuspend(boolean shouldSuspend) {
+		fShouldSuspend= shouldSuspend;
+	}
+
+	public boolean shouldSuspend() {
+		return fShouldSuspend;
+	}
+
+	private Map getTargetToBuildSequence(Project project) {
+		return (Map) fProjectToMapOfTargetToBuildSequence.get(project);
+	}
+
+	public void setTargetToExecute(Target target) {
+        if (target == null) {
+            fTargetsToExecute.pop();
+        } else {
+            fTargetsToExecute.push(target);
+        }
+	}
+
+	public void setTargetExecuting(Target target) {
+        if (target == null) {
+            fTargetsExecuting.pop();
+        } else {
+            fTargetsExecuting.push(target);
+        }
+	}
+
+	private Target getTargetToExecute() {
+	    if (fTargetsToExecute.isEmpty()) {
+            return null;
+        }
+		return (Target) fTargetsToExecute.peek();
+	}
+	
+	private Target getTargetExecuting() {
+        if (fTargetsExecuting.isEmpty()) {
+            return null;
+        }
+		return (Target) fTargetsExecuting.peek();
+	}
+
+	public boolean isStepIntoSuspend() {
+		return isAfterTaskEvent() && fStepIntoSuspend;
+	}
+
+	public void setStepIntoSuspend(boolean stepIntoSuspend) {
+		fStepIntoSuspend = stepIntoSuspend;
+	}
+
+	public boolean isClientSuspend() {
+		return fClientSuspend;
+	}
+
+	public void setClientSuspend(boolean clientSuspend) {
+		fClientSuspend = clientSuspend;
+	}
+
+	public Task getStepIntoTask() {
+		return fStepIntoTask;
+	}
+
+	public void setStepIntoTask(Task stepIntoTask) {
+		fStepIntoTask = stepIntoTask;
+	}
+	
+	public void resume() {
+		fLogger.notifyAll();
+	}
+
+	public Map getProperties() {
+		return fProperties;
+	}
+	
+	public Location getBreakpointLocation() {
+		if (isAfterTaskEvent() && getCurrentTask() != null) {
+			return getCurrentTask().getLocation();
+		}
+		if (considerTargetBreakpoints()) {
+	        Target targetExecuting= getTargetExecuting();
+	        if (targetExecuting != null) {
+                return getLocation(targetExecuting);      
+            }
+		}
+		return null;
+	}
+
+	private boolean isAfterTaskEvent() {
+		return fIsAfterTaskEvent;
+	}
+
+	private void setAfterTaskEvent(boolean isAfterTaskEvent) {
+		fIsAfterTaskEvent = isAfterTaskEvent;
+	}
+	
+	public void taskStarted(BuildEvent event) {
+		setAfterTaskEvent(true);
+		if (getInitialProperties() == null) {//implicit or top level target does not fire targetStarted()
+			fInitialProperties= event.getProject().getProperties();
+		}
+		
+		setCurrentTask(event.getTask());
+		setConsiderTargetBreakpoints(false);
+		if (!getTasks().isEmpty()) {
+			//cache the parent task proxy as when that task is started or finished the
+			//proxy is not yet available or is nulled out
+			Task parentTask = (Task) getTasks().peek();
+			Object proxy = parentTask.getRuntimeConfigurableWrapper().getProxy();
+			if (proxy != null) {
+				fTaskToProxies.put(parentTask, proxy);
+			}
+		}
+		getTasks().push(getCurrentTask());
+		waitIfSuspended();
+	}
+	
+
+    public void taskFinished() {
+    	Task lastTask= (Task)getTasks().pop();
+        setLastTaskFinished(lastTask);
+        setCurrentTask(null);
+        String taskName= lastTask.getTaskName();
+       
+        if (getStepOverTask() != null) {
+        	if ((fgAntCallTaskName.equals(taskName) || fgAntTaskName.equals(taskName)) && (!fgAntCallTaskName.equals(getStepOverTask().getTaskName()) && !fgAntTaskName.equals(getStepOverTask().getTaskName()))) {
+        		setShouldSuspend(true);
+        	} else if (fTaskToProxies.remove(lastTask) instanceof MacroInstance) {
+        		setShouldSuspend(true);
+        	}
+        }
+        waitIfSuspended();
+    }
+
+    public void stepOver() {
+       setStepOverTask(getCurrentTask());
+        if (getCurrentTask() == null) {
+            //stepping over target breakpoint
+           setShouldSuspend(true);
+        }
+        resume();
+    }
+
+    public void targetStarted(BuildEvent event) {
+		setAfterTaskEvent(false);
+        Project eventProject = event.getProject();
+        if (getInitialProperties() == null) {
+            fInitialProperties= eventProject.getProperties();
+        }
+        if (fProjectToTargetNames.get(eventProject) == null) {
+            Object ref= eventProject.getReference("eclipse.ant.targetVector"); //$NON-NLS-1$
+            if (ref != null) {
+                fProjectToTargetNames.put(eventProject, ref);
+                Map targetToBuildSequence= new HashMap();
+                setTargetToExecute(initializeBuildSequenceInformation(event, targetToBuildSequence));
+                fProjectToMapOfTargetToBuildSequence.put(eventProject, targetToBuildSequence);
+            }
+        }
+        
+        setTargetExecuting(event.getTarget());
+        if (event.getTarget().equals(getTargetToExecute())) {
+            //the dependencies of the target to execute have been met
+            //prepare for the next target
+            Vector targets= (Vector) fProjectToTargetNames.get(eventProject);
+            if (!targets.isEmpty()) {
+                setTargetToExecute((Target) eventProject.getTargets().get(targets.remove(0)));
+            } else {
+                setTargetToExecute(null);
+            }
+        }
+        setConsiderTargetBreakpoints(true);
+    }
+
+	public int getLineNumber(Location location) {
+	    try { //succeeds with Ant newer than 1.6
+	        return location.getLineNumber();
+	    } catch (NoSuchMethodError e) {
+	        //Ant before 1.6
+	        String locationString= location.toString();
+	        if (locationString.length() == 0) {
+	            return 0;
+	        }
+	        //filename: lineNumber: ("c:\buildfile.xml: 12: ")
+	        int lastIndex= locationString.lastIndexOf(':');
+	        int index =locationString.lastIndexOf(':', lastIndex - 1);
+	        if (index != -1) {
+	            try {
+	                return Integer.parseInt(locationString.substring(index+1, lastIndex));
+	            } catch (NumberFormatException nfe) {
+	                return 0;
+	            }
+	        }
+	        return 0;
+	    }
+	}
+
+	public static Location getLocation(Target target) {
+	    try {//succeeds with Ant newer than 1.6.2
+	        return target.getLocation();
+	    } catch (NoSuchMethodError e) {
+	        return Location.UNKNOWN_LOCATION;
+	    }
+	}
+
+	public String getFileName(Location location) {
+	    try {//succeeds with Ant newer than 1.6
+	        return location.getFileName();
+	    } catch (NoSuchMethodError e) {
+	        //Ant before 1.6
+	        String locationString= location.toString();
+	        if (locationString.length() == 0) {
+	            return null;
+	        }
+	        //filename: lineNumber: ("c:\buildfile.xml: 12: ")          
+	        int lastIndex= locationString.lastIndexOf(':');
+	        int index =locationString.lastIndexOf(':', lastIndex-1);
+	        if (index == -1) {
+	            index= lastIndex; //only the filename is known
+	        }
+	        if (index != -1) {
+	        //bug 84403
+	            //if (locationString.startsWith("file:")) {
+	              //  return FileUtils.newFileUtils().fromURI(locationString);
+	            //}
+	            //remove file:
+	            return locationString.substring(5, index);
+	        }
+	        return null;
+	    }
+	}
+
+	private void appendToStack(StringBuffer stackRepresentation, String targetName, String taskName, Location location) {
+	    stackRepresentation.append(targetName);
+	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	    stackRepresentation.append(taskName);
+	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	    
+	    stackRepresentation.append(getFileName(location));
+	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	    stackRepresentation.append(getLineNumber(location));
+	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	}
+
+	public void marshalStack(StringBuffer stackRepresentation) {
+		Stack tasks= getTasks();
+		
+	    stackRepresentation.append(DebugMessageIds.STACK);
+	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	    
+		Target targetToExecute= getTargetToExecute();
+		Target targetExecuting= getTargetExecuting();
+      
+        Project projectExecuting= null;
+        if (targetExecuting != null) {
+            projectExecuting= targetExecuting.getProject();
+        } else { //no target...must be a task
+            Task task= (Task) tasks.peek();
+            projectExecuting= task.getProject();
+        }
+        
+		if (!isAfterTaskEvent()) {
+			appendToStack(stackRepresentation, targetExecuting.getName(), "", getLocation(targetExecuting)); //$NON-NLS-1$
+		}
+		for (int i = tasks.size() - 1; i >= 0 ; i--) {
+			Task task= (Task) tasks.get(i);
+            if (task.getProject() == projectExecuting) {
+                appendToStack(stackRepresentation, task.getOwningTarget().getName(), task.getTaskName(), task.getLocation());
+            } else {
+                //sub build target dependencies
+                String targetName= task.getOwningTarget().getName();
+                if (targetName != null && targetName.length() != 0) { //skip for implicit target
+                    Iterator itr= fTargetsToExecute.iterator();
+                    while (itr.hasNext()) {
+                        Target target= (Target) itr.next();
+                        if (target.getProject() != projectExecuting) {
+                        	targetToExecute= target;
+                            continue;
+                        }
+                        marshalTargetDependancyStack(stackRepresentation, target, targetExecuting);
+                    }
+                }
+                projectExecuting= task.getProject();
+                targetExecuting= task.getOwningTarget();
+                appendToStack(stackRepresentation, targetExecuting.getName(), task.getTaskName(), task.getLocation());
+            }
+		}
+
+		//target dependency stack 
+		marshalTargetDependancyStack(stackRepresentation, targetToExecute, targetExecuting);
+	}
+
+    private void marshalTargetDependancyStack(StringBuffer stackRepresentation, Target targetToExecute, Target targetExecuting) {
+        if (targetToExecute != null) {
+	     	Vector buildSequence= (Vector) getTargetToBuildSequence(targetToExecute.getProject()).get(targetToExecute);
+	     	int startIndex= buildSequence.indexOf(targetExecuting) + 1;
+	     	int dependancyStackDepth= buildSequence.indexOf(targetToExecute);
+	     	
+	     	Target stackTarget;
+	     	for (int i = startIndex; i <= dependancyStackDepth; i++) {
+	     		stackTarget= (Target) buildSequence.get(i);
+	            if (stackTarget.dependsOn(targetExecuting.getName())) {
+	     		    appendToStack(stackRepresentation, stackTarget.getName(), "", getLocation(stackTarget)); //$NON-NLS-1$
+	            }
+	     	}
+	     }
+    }
+
+	public void marshallProperties(StringBuffer propertiesRepresentation, boolean escapeLineSep) {
+		if (getTasks().isEmpty()) {
+			return;
+		}
+	    propertiesRepresentation.append(DebugMessageIds.PROPERTIES);
+	    propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+		
+		Project project= ((Task)getTasks().peek()).getProject();
+		Map lastProperties= getProperties(); 
+		
+	    Map currentProperties= project.getProperties();
+	    if (lastProperties != null && currentProperties.size() == lastProperties.size()) {
+	        //no new properties
+	        return;
+	    }
+	    
+		Map initialProperties= getInitialProperties();
+	    Map currentUserProperties= project.getUserProperties();
+	    Iterator iter= currentProperties.keySet().iterator();
+	    String propertyName;
+		String originalPropertyName;
+	    String propertyValue;
+	    while (iter.hasNext()) {
+	        propertyName = (String) iter.next();
+			originalPropertyName= propertyName;
+	        if (lastProperties == null || lastProperties.get(propertyName) == null) { //new property
+				if (escapeLineSep) {
+					propertyName= escapeLineSeparator(propertyName);
+				}
+	            propertiesRepresentation.append(propertyName.length());
+	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	            propertiesRepresentation.append(propertyName);
+	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	            propertyValue= (String) currentProperties.get(originalPropertyName);
+				if (escapeLineSep) {
+					propertyValue= escapeLineSeparator(propertyValue);
+				}
+	            propertiesRepresentation.append(propertyValue.length());
+	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+				propertiesRepresentation.append(propertyValue);
+	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	            propertiesRepresentation.append(getPropertyType(initialProperties, currentUserProperties, originalPropertyName));
+	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
+	        }
+	    }
+	    
+	    propertiesRepresentation.deleteCharAt(propertiesRepresentation.length() - 1);
+		fProperties= currentProperties;
+	}
+
+	private int getPropertyType(Map initialProperties, Map currentUserProperties, String propertyName) {
+		if (initialProperties.get(propertyName) != null) { //properties set before the start of the build
+		    if (currentUserProperties.get(propertyName) == null) {
+		        return DebugMessageIds.PROPERTY_SYSTEM;
+		    } 
+			return DebugMessageIds.PROPERTY_USER;
+		} else if (currentUserProperties.get(propertyName) == null){
+		    return DebugMessageIds.PROPERTY_RUNTIME;
+		} else {
+		    return DebugMessageIds.PROPERTY_USER;
+		}
+	}
+
+	private String escapeLineSeparator(String stringToEscape) {
+		if (!(stringToEscape.indexOf('\r') != -1 || stringToEscape.indexOf('\n') != -1 || stringToEscape.indexOf("\\r") != -1 || stringToEscape.indexOf("\\n") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$
+			return stringToEscape;
+		}
+		StringBuffer escapedValue= new StringBuffer(stringToEscape);		
+		for (int i= 0; i < escapedValue.length(); i++) {
+			switch (escapedValue.charAt(i)) {
+			case '\r':
+				escapedValue.replace(i, i+1, "\\r"); //$NON-NLS-1$
+				i++;
+				break;
+			case '\n':
+				escapedValue.replace(i, i+1, "\\n"); //$NON-NLS-1$
+				i++;
+				break;
+			case '\\':
+				if (escapedValue.charAt(i + 1) == 'r' || escapedValue.charAt(i + 1) == 'n') {
+					escapedValue.replace(i, i+1, "\\\\"); //$NON-NLS-1$
+					i++;
+				}
+				break;
+			default:
+				break;
+			}
+		}
+
+		return escapedValue.toString();
+	}
+
+	private Target initializeBuildSequenceInformation(BuildEvent event, Map targetToBuildSequence) {
+	    Project antProject= event.getProject();
+	    Vector targets= (Vector) antProject.getReference("eclipse.ant.targetVector"); //$NON-NLS-1$
+        if (targets == null) {
+            return null;
+        }
+	    Iterator itr= targets.iterator();
+	    Hashtable allTargets= antProject.getTargets();
+	    String targetName;
+	    Vector sortedTargets;
+	    while (itr.hasNext()) {
+	        targetName= (String) itr.next();
+	        sortedTargets= antProject.topoSort(targetName, allTargets);
+	        targetToBuildSequence.put(allTargets.get(targetName), sortedTargets);
+	    }
+	    //the target to execute
+	    return (Target) allTargets.get(targets.remove(0));
+	}
+    
+    public void buildStarted() {
+        fProjectToTargetNames= new HashMap();
+        fProjectToMapOfTargetToBuildSequence= new HashMap();
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java
new file mode 100644
index 0000000..9eb06c5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/common/org/eclipse/ant/internal/launching/debug/IDebugBuildLogger.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+
+public interface IDebugBuildLogger {
+
+	/**
+	 * Requests to suspend the build if the current debug state
+	 * indicates that suspension is required.
+	 */
+    public abstract void waitIfSuspended();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf b/eclipse/plugins/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf
similarity index 100%
copy from eclipse/plugins/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf
copy to eclipse/plugins/org.eclipse.ant.launching/loggers/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java
new file mode 100644
index 0000000..f8acbe4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessBuildLogger.java
@@ -0,0 +1,306 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Matt Conway - Patch for Bug 28052
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.runtime.logger;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Location;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+import org.eclipse.ant.internal.launching.AntLaunch;
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.ant.internal.launching.debug.AntDebugState;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntProcess;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntStreamMonitor;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntStreamsProxy;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+
+public class AntProcessBuildLogger extends NullBuildLogger {
+
+	private long fStartTime;
+
+	/**
+	 * Associated process - discovered as needed to log messages
+	 */
+	private AntProcess fProcess = null;
+	
+	protected void logMessage(String message, BuildEvent event, int overridePriority) {
+		int priority= overridePriority;
+		if (priority == -1) {
+			priority= event.getPriority();
+		} 
+		
+		if (priority > getMessageOutputLevel()) {
+			return;
+		}
+		AntProcess antProcess = getAntProcess(fProcessId);
+		if (antProcess == null) {
+			return;
+		}
+		
+		StringBuffer fullMessage= new StringBuffer();
+		 if (!loggingToLogFile()) {
+			fullMessage.append(System.getProperty("line.separator")); //$NON-NLS-1$
+		}
+		if (event.getException() == null && event.getTask() != null && !fEmacsMode) {
+			adornMessage(event, fullMessage);
+		} else {
+			fullMessage.append(message);
+		}
+		message= fullMessage.toString();
+		
+		if (loggingToLogFile()) {
+			logMessageToLogFile(message, priority);
+		} else {
+			AntStreamMonitor monitor = getMonitor(priority);
+			monitor.append(message);
+		}
+	}
+
+	/**
+	 * Builds a right justified task prefix for the given build event, placing it
+	 * in the given string buffer. Creates the hyperlinks for the task prefix. 
+	 *  
+	 * @param event build event
+	 * @param fullMessage buffer to place task prefix in
+	 */
+	private void adornMessage(BuildEvent event, StringBuffer fullMessage) {
+		String name = event.getTask().getTaskName();
+		if (name == null) {
+			name = "null"; //$NON-NLS-1$
+		}
+		Location location = event.getTask().getLocation();
+		StringBuffer column= new StringBuffer();
+		int size = AntLaunching.LEFT_COLUMN_SIZE - (name.length() + 3);
+		for (int i = 0; i < size; i++) {
+			column.append(' ');
+		}
+		StringBuffer labelBuff= new StringBuffer();
+		labelBuff.append('[');
+		labelBuff.append(name);
+		labelBuff.append("] "); //$NON-NLS-1$
+		
+		int offset = Math.max(size, 0) + 1;
+		String label= labelBuff.toString();
+		if (event.getMessage() == null) {
+			return;
+		}
+		try {
+			BufferedReader r = new BufferedReader(new StringReader(event.getMessage()));
+			String line = r.readLine();
+			fullMessage.append(column);
+			appendAndLink(fullMessage, location, label, offset, line);
+			line = r.readLine();
+			while (line != null) {
+				fullMessage.append(System.getProperty("line.separator")); //$NON-NLS-1$
+				fullMessage.append(column);
+				appendAndLink(fullMessage, location, label, offset, line);
+				line = r.readLine();
+			}
+		} catch (IOException e) {
+			if (event.getMessage() != null) {
+				fullMessage.append(label).append(event.getMessage());
+			}
+		}
+	}
+	
+	private void appendAndLink(StringBuffer fullMessage, Location location, String label, int offset, String line) {
+		fullMessage.append(label);
+		fullMessage.append(line);
+		if (location != null) {
+			String newLine= (label + line).trim();
+			IRegion region= new Region(offset, label.length() - 3); // only
+			// want
+			// the
+			// name
+			// length
+			// "[name] "
+			AntProcess antProcess = getAntProcess(fProcessId);
+			AntLaunch antLaunch = (AntLaunch)antProcess.getLaunch();
+			antLaunch.addLinkDescriptor(newLine, location.getFileName(), location.getLineNumber(), region.getOffset(), region.getLength());
+		}
+	}
+
+	private AntStreamMonitor getMonitor(int priority) {
+		AntStreamsProxy proxy = (AntStreamsProxy)fProcess.getStreamsProxy();
+		AntStreamMonitor monitor = null;
+		switch (priority) {
+			case Project.MSG_INFO:
+				monitor = (AntStreamMonitor)proxy.getOutputStreamMonitor();
+				break;
+			case Project.MSG_ERR:
+				monitor = (AntStreamMonitor)proxy.getErrorStreamMonitor();
+				break;
+			case Project.MSG_DEBUG:
+				monitor = (AntStreamMonitor)proxy.getDebugStreamMonitor();
+				break;
+			case Project.MSG_WARN:
+				monitor = (AntStreamMonitor)proxy.getWarningStreamMonitor();
+				break;
+			case Project.MSG_VERBOSE:
+				monitor = (AntStreamMonitor)proxy.getVerboseStreamMonitor();
+				break;
+		}
+		return monitor;
+	}
+
+	private void logMessageToLogFile(String message, int priority) {
+		if (priority == Project.MSG_ERR) {
+			getErrorPrintStream().println(message);
+		} else {
+			getOutputPrintStream().println(message);
+		}
+	}
+	
+	/**
+	 * Returns the associated Ant process, finding it if necessary, if not
+	 * already found.
+	 */
+	protected AntProcess getAntProcess(String processId) {
+		if (fProcess == null && processId != null) {
+			IProcess[] all = DebugPlugin.getDefault().getLaunchManager().getProcesses();
+			for (int i = 0; i < all.length; i++) {
+				IProcess process = all[i];
+				if (process instanceof AntProcess && processId.equals(process.getAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID))) {
+					fProcess = (AntProcess)process;
+					break;
+				}
+			}
+		}
+		return fProcess;
+	}
+
+	/* (non-Javadoc)
+	 * Set the start time.
+	 * 
+	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void buildStarted(BuildEvent event) {
+		fStartTime= System.currentTimeMillis();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void buildFinished(BuildEvent event) {
+        String message= handleException(event);
+        if (message != null) {
+        	try {
+    			BufferedReader r = new BufferedReader(new StringReader(message));
+    			String line = r.readLine();
+    			logMessage(line, event, Project.MSG_ERR);
+    			line = r.readLine();
+    			AntProcess antProcess = getAntProcess(fProcessId);
+    			while (line != null) {
+    				logMessage(line, event, Project.MSG_ERR);
+    				if (!message.startsWith("Total time:")) { //$NON-NLS-1$
+						AntLaunchingUtil.linkBuildFailedMessage(line, antProcess);
+    				}
+    				line = r.readLine();
+    			}
+    			logMessage("", event, Project.MSG_ERR); //$NON-NLS-1$
+    		} catch (IOException e) {
+    		}
+        }
+		fHandledException= null;
+		if (!(event.getException() instanceof OperationCanceledException)) {
+			logMessage(getTimeString(System.currentTimeMillis() - fStartTime), event, fMessageOutputLevel);
+		}
+		fProcess= null;
+		event.getProject().removeBuildListener(this);
+	}
+	
+	private String getTimeString(long milliseconds) {
+			long seconds = milliseconds / 1000;
+			long minutes = seconds / 60;
+			seconds= seconds % 60;
+		
+			StringBuffer result= new StringBuffer(RuntimeMessages.AntProcessBuildLogger_Total_time);
+			if (minutes > 0) {
+				result.append(minutes);
+				if (minutes > 1) {
+					result.append(RuntimeMessages.AntProcessBuildLogger__minutes_2);
+				} else {
+					result.append(RuntimeMessages.AntProcessBuildLogger__minute_3);
+				}
+			}
+			if (seconds > 0) {
+				if (minutes > 0) {
+					result.append(' ');
+				}
+				result.append(seconds);
+			
+				if (seconds > 1) {
+					result.append(RuntimeMessages.AntProcessBuildLogger__seconds_4);
+				} else {
+					result.append(RuntimeMessages.AntProcessBuildLogger__second_5);
+				} 
+			}
+			if (seconds == 0 && minutes == 0) {
+				result.append(milliseconds);
+				result.append(RuntimeMessages.AntProcessBuildLogger__milliseconds_6);
+			}
+			
+			result.append(System.getProperty("line.separator")); //$NON-NLS-1$
+			return result.toString();
+		}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
+	 */
+	public void messageLogged(BuildEvent event) {
+		if (event.getPriority() > getMessageOutputLevel()) {
+			return;
+		}
+		if (event.getMessage() != null && event.getMessage().length() > 0) {
+			logMessage(event.getMessage(), event, -1);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void targetStarted(BuildEvent event) {
+		if (Project.MSG_INFO > getMessageOutputLevel()) {
+			return;
+		}
+		Target target= event.getTarget();
+		StringBuffer msg= new StringBuffer(System.getProperty("line.separator")); //$NON-NLS-1$
+		String targetName= target.getName();
+		msg.append(targetName);
+		msg.append(':');
+		String message= msg.toString();
+		Location location= AntDebugState.getLocation(target);
+		if (location != null && location != Location.UNKNOWN_LOCATION) {
+			IRegion region = new Region(0, targetName.length());
+			AntProcess antProcess = getAntProcess(fProcessId);
+			AntLaunch antLaunch = (AntLaunch)antProcess.getLaunch();
+			antLaunch.addLinkDescriptor(message, location.getFileName(), location.getLineNumber(), region.getOffset(), region.getLength());
+		}
+		logMessage(message, event, Project.MSG_INFO);
+	}
+	
+	private boolean loggingToLogFile() {
+		//check if user has designated to log to a log file
+		return getErrorPrintStream() != null && getErrorPrintStream() != System.err;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessDebugBuildLogger.java
new file mode 100644
index 0000000..13ddfa3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/AntProcessDebugBuildLogger.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.runtime.logger;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Location;
+import org.eclipse.ant.internal.launching.debug.AntDebugState;
+import org.eclipse.ant.internal.launching.debug.IAntDebugController;
+import org.eclipse.ant.internal.launching.debug.IDebugBuildLogger;
+import org.eclipse.ant.internal.launching.debug.model.AntDebugTarget;
+import org.eclipse.ant.internal.launching.debug.model.AntThread;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntProcess;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IProcess;
+
+public class AntProcessDebugBuildLogger extends AntProcessBuildLogger implements IAntDebugController, IDebugBuildLogger {
+	
+	private AntDebugState fDebugState= null;
+	
+	private List fBreakpoints= null;
+    
+	private AntDebugTarget fAntDebugTarget;
+	private boolean fResumed= false;
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void buildStarted(BuildEvent event) {
+		fDebugState= new AntDebugState(this);
+		super.buildStarted(event);
+		IProcess process= getAntProcess(fProcessId);
+		ILaunch launch= process.getLaunch();
+		fAntDebugTarget= new AntDebugTarget(launch, process, this);
+		launch.addDebugTarget(fAntDebugTarget);
+        
+        fAntDebugTarget.buildStarted();
+        fDebugState.buildStarted();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void taskFinished(BuildEvent event) {
+		super.taskFinished(event);
+		fDebugState.taskFinished();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void taskStarted(BuildEvent event) {
+        super.taskStarted(event);
+		fDebugState.taskStarted(event);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger#waitIfSuspended()
+	 */
+	public synchronized void waitIfSuspended() {
+		fResumed= false;
+		IBreakpoint breakpoint= breakpointAtLineNumber(fDebugState.getBreakpointLocation());
+		if (breakpoint != null) {
+			 fAntDebugTarget.breakpointHit(breakpoint);
+			 try {
+				 while (!fResumed) {
+					 wait(500);
+					 checkCancelled();
+				 }
+			 } catch (InterruptedException e) {
+			 }
+		} else if (fDebugState.getCurrentTask() != null) {
+			int detail= -1;
+	        boolean shouldSuspend= true;
+	        if (fDebugState.isStepIntoSuspend()) {
+	            detail= DebugEvent.STEP_END;
+	            fDebugState.setStepIntoSuspend(false);               
+	        } else if ((fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepOverTask()) || fDebugState.shouldSuspend()) {
+				detail= DebugEvent.STEP_END;
+				fDebugState.setShouldSuspend(false);
+				fDebugState.setStepOverTask(null);
+	        } else if (fDebugState.isClientSuspend()) {
+	            detail= DebugEvent.CLIENT_REQUEST;
+	            fDebugState.setClientSuspend(false);
+	        } else {
+	            shouldSuspend= false;
+	        }
+	        if (shouldSuspend) {
+                fAntDebugTarget.suspended(detail);
+	            try {
+	            	while (!fResumed) {
+	            		wait(500);
+	            		checkCancelled();
+	            	}
+	            } catch (InterruptedException e) {
+	            }
+	        }
+	    }
+	}
+
+	private void checkCancelled() {
+		AntProcess process= getAntProcess(fProcessId);
+		if (process != null && process.isCanceled()) {
+			throw new OperationCanceledException(RuntimeMessages.AntProcessDebugBuildLogger_1);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#resume()
+	 */
+	public synchronized void resume() {
+		fResumed= true;
+        notifyAll();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#suspend()
+	 */
+	public synchronized void suspend() {
+		fDebugState.setClientSuspend(true);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepInto()
+	 */
+	public synchronized void stepInto() {
+		fDebugState.setStepIntoSuspend(true);
+		fResumed= true;
+		notifyAll();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepOver()
+	 */
+	public synchronized void stepOver() {
+		fResumed= true;
+		fDebugState.stepOver();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#handleBreakpoint(org.eclipse.debug.core.model.IBreakpoint, boolean)
+	 */
+	public void handleBreakpoint(IBreakpoint breakpoint, boolean added) {
+		if (added) {
+			if (fBreakpoints == null) {
+				fBreakpoints= new ArrayList();
+			}
+			if (!fBreakpoints.contains(breakpoint)) {
+				fBreakpoints.add(breakpoint);
+			}
+		} else {
+			if (fBreakpoints != null) {
+				fBreakpoints.remove(breakpoint);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getProperties()
+	 */
+	public void getProperties() {
+		if (!fAntDebugTarget.isSuspended()) {
+			return;
+		}
+	    StringBuffer propertiesRepresentation= new StringBuffer();
+		fDebugState.marshallProperties(propertiesRepresentation, false);
+		if (fAntDebugTarget.getThreads().length > 0) {
+			((AntThread) fAntDebugTarget.getThreads()[0]).newProperties(propertiesRepresentation.toString());
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getStackFrames()
+	 */
+	public void getStackFrames() {
+		StringBuffer stackRepresentation= new StringBuffer();
+		fDebugState.marshalStack(stackRepresentation);
+		((AntThread) fAntDebugTarget.getThreads()[0]).buildStack(stackRepresentation.toString());
+	}
+    
+    private IBreakpoint breakpointAtLineNumber(Location location) {
+        if (fBreakpoints == null || location == null || location == Location.UNKNOWN_LOCATION) {
+            return null;
+        }
+        int lineNumber= fDebugState.getLineNumber(location);
+        File locationFile= new File(fDebugState.getFileName(location));
+        for (int i = 0; i < fBreakpoints.size(); i++) {
+            ILineBreakpoint breakpoint = (ILineBreakpoint) fBreakpoints.get(i);
+            int breakpointLineNumber;
+            try {
+            	if (!breakpoint.isEnabled()) {
+                	continue;
+                }
+            	breakpointLineNumber = breakpoint.getLineNumber();
+            } catch (CoreException e) {
+               return null;
+            }
+            IFile resource= (IFile) breakpoint.getMarker().getResource();
+            if (breakpointLineNumber == lineNumber && resource.getLocation().toFile().equals(locationFile)) {
+                return breakpoint;
+            }
+        }
+        return null;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+     */
+    public void targetStarted(BuildEvent event) {
+		fDebugState.targetStarted(event);
+		waitIfSuspended();
+		super.targetStarted(event);
+    }
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void targetFinished(BuildEvent event) {
+		super.targetFinished(event);
+		fDebugState.setTargetExecuting(null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#unescapeString(java.lang.StringBuffer)
+	 */
+	public StringBuffer unescapeString(StringBuffer propertyValue) {
+		return propertyValue;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java
new file mode 100644
index 0000000..8d50250
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/NullBuildLogger.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.runtime.logger;
+
+
+import java.io.PrintStream;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.util.StringUtils;
+import org.eclipse.ant.core.AntSecurityException;
+import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+public class NullBuildLogger extends AbstractEclipseBuildLogger implements BuildLogger{
+
+	protected int fMessageOutputLevel = Project.MSG_INFO;
+	private PrintStream fErr= null;
+	private PrintStream fOut= null;
+	protected boolean fEmacsMode= false;
+	
+	/**
+	 * An exception that has already been logged.
+	 */
+	protected Throwable fHandledException= null;
+	
+	/**
+	 * @see org.apache.tools.ant.BuildLogger#setMessageOutputLevel(int)
+	 */
+	public void setMessageOutputLevel(int level) {
+		fMessageOutputLevel= level;
+	}
+	
+	protected int getMessageOutputLevel() {
+		return fMessageOutputLevel;
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildLogger#setEmacsMode(boolean)
+	 */
+	public void setEmacsMode(boolean emacsMode) {
+		fEmacsMode= emacsMode;
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void buildStarted(BuildEvent event) {
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void buildFinished(BuildEvent event) {
+		String message= handleException(event);
+        if (message != null) {
+            logMessage(message, getMessageOutputLevel());
+        }
+		fHandledException= null;
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void targetStarted(BuildEvent event) {
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void targetFinished(BuildEvent event) {
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void taskStarted(BuildEvent event) {
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public void taskFinished(BuildEvent event) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
+	 */
+	public void messageLogged(BuildEvent event) {
+		logMessage(event.getMessage(), event.getPriority());
+	}
+
+	protected PrintStream getErrorPrintStream() {
+		return fErr;
+	}
+	
+	protected PrintStream getOutputPrintStream() {
+		return fOut;
+	}
+	
+	/**
+	 * @see org.apache.tools.ant.BuildLogger#setErrorPrintStream(java.io.PrintStream)
+	 */
+	public void setErrorPrintStream(PrintStream err) {
+		//this build logger logs to "null" unless
+		//the user has explicitly set a logfile to use
+		if (err == System.err) {
+			fErr= null;
+		} else {
+			fErr= err;
+		}
+	}
+
+	/**
+	 * @see org.apache.tools.ant.BuildLogger#setOutputPrintStream(java.io.PrintStream)
+	 */
+	public void setOutputPrintStream(PrintStream output) {
+		//this build logger logs to "null" unless
+		//the user has explicitly set a logfile to use
+		if (output == System.out) {
+			fOut= null;
+		} else {
+			fOut= output;
+		}
+	}
+	
+	protected void logMessage(String message, int priority) {
+		if (priority > getMessageOutputLevel()) {
+			return;
+		}
+		
+		if (priority == Project.MSG_ERR) {
+			if (getErrorPrintStream() != null && getErrorPrintStream() != System.err) {
+				//user has designated to log to a logfile
+				getErrorPrintStream().println(message);
+			}
+		} else {
+			if (getOutputPrintStream() != null && getOutputPrintStream() != System.out) {
+				//user has designated to log to a logfile
+				getOutputPrintStream().println(message);
+			} 
+		}
+	}
+	
+	protected String handleException(BuildEvent event) {
+		Throwable exception = event.getException();
+		if (exception == null || exception == fHandledException
+		|| exception instanceof OperationCanceledException
+		|| exception instanceof AntSecurityException) {
+			return null;
+		}
+		fHandledException= exception;
+        StringBuffer message= new StringBuffer();
+        message.append(StringUtils.LINE_SEP);
+        message.append(RuntimeMessages.NullBuildLogger_1);
+        message.append(StringUtils.LINE_SEP);
+        if (Project.MSG_VERBOSE <= fMessageOutputLevel || !(exception instanceof BuildException)) {
+            message.append(StringUtils.getStackTrace(exception));
+        } else {
+            if (exception instanceof BuildException) {
+                message.append(exception.toString()).append(StringUtils.LINE_SEP);
+            } else {
+                message.append(exception.getMessage()).append(StringUtils.LINE_SEP);
+            }
+        }
+        
+		return message.toString();	
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java
new file mode 100644
index 0000000..a1db558
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.runtime.logger;
+
+import org.eclipse.osgi.util.NLS;
+
+public class RuntimeMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.runtime.logger.RuntimeMessages";//$NON-NLS-1$
+
+	public static String NullBuildLogger_1;
+	public static String AntProcessBuildLogger_Total_time;
+	public static String AntProcessBuildLogger__minutes_2;
+	public static String AntProcessBuildLogger__minute_3;
+	public static String AntProcessBuildLogger__seconds_4;
+	public static String AntProcessBuildLogger__second_5;
+	public static String AntProcessBuildLogger__milliseconds_6;
+	
+	public static String AntProcessDebugBuildLogger_1;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, RuntimeMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties
new file mode 100644
index 0000000..573188a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/loggers/org/eclipse/ant/internal/launching/runtime/logger/RuntimeMessages.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+NullBuildLogger_1=BUILD FAILED
+AntProcessBuildLogger_Total_time=Total time: 
+AntProcessBuildLogger__minutes_2=\ minutes
+AntProcessBuildLogger__minute_3=\ minute
+AntProcessBuildLogger__seconds_4=\ seconds
+AntProcessBuildLogger__second_5=\ second
+AntProcessBuildLogger__milliseconds_6=\ milliseconds
+
+AntProcessDebugBuildLogger_1=Build cancelled.
diff --git a/eclipse/plugins/org.eclipse.ant.launching/plugin.properties b/eclipse/plugins/org.eclipse.ant.launching/plugin.properties
new file mode 100644
index 0000000..650fb4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/plugin.properties
@@ -0,0 +1,24 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=Ant Launching Support
+providerName=Eclipse.org
+
+AntBuild = Ant Build
+AntLaunchDelegate.name=Eclipse Ant Launcher
+AntLaunchDelegate.description=The Eclipse Ant Launcher supports running and debugging Ant build files.
+
+AntBuilder.name=Ant Builder
+AntBuilderLaunchDelegate.name= Eclipse Ant Builder Launcher
+AntBuilderLaunchDelegate.description=The Eclipse Ant Builder Launcher supports running Ant build files.
+
+antBreakpointGroupName= Ant Breakpoints
+AntLineBreakpoint.name = Ant Line Breakpoint
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/plugin.xml b/eclipse/plugins/org.eclipse.ant.launching/plugin.xml
new file mode 100644
index 0000000..05e314f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/plugin.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            category="org.eclipse.ui.externaltools"
+            delegate="org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate"
+            delegateDescription="%AntLaunchDelegate.description"
+            delegateName="%AntLaunchDelegate.name"
+            id="org.eclipse.ant.AntLaunchConfigurationType"
+            migrationDelegate="org.eclipse.ant.internal.launching.launchConfigurations.AntMigrationDelegate"
+            modes="run, debug"
+            name="%AntBuild"
+            sourceLocatorId="org.eclipse.ant.ui.debug.sourceLookupDirector"
+            sourcePathComputerId="org.eclipse.ant.ui.debug.sourcePathComputer">
+      </launchConfigurationType>
+      <launchConfigurationType
+            category="org.eclipse.ui.externaltools.builder"
+            delegate="org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate"
+            delegateDescription="%AntBuilderLaunchDelegate.description"
+            delegateName="%AntBuilderLaunchDelegate.name"
+            id="org.eclipse.ant.AntBuilderLaunchConfigurationType"
+            modes="run"
+            name="%AntBuilder.name">
+      </launchConfigurationType>
+   </extension>
+   <extension point="org.eclipse.core.runtime.preferences">
+		<initializer class="org.eclipse.ant.internal.launching.AntLaunchingPreferenceInitializer"/>
+	</extension>
+  <extension
+         point="org.eclipse.jdt.launching.runtimeClasspathEntries">
+      <runtimeClasspathEntry
+            class="org.eclipse.ant.internal.launching.launchConfigurations.AntHomeClasspathEntry"
+            id="org.eclipse.ant.ui.classpathentry.antHome">
+      </runtimeClasspathEntry>
+      <runtimeClasspathEntry
+            class="org.eclipse.ant.internal.launching.launchConfigurations.ContributedClasspathEntriesEntry"
+            id="org.eclipse.ant.ui.classpathentry.extraClasspathEntries">
+      </runtimeClasspathEntry>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.launching.classpathProviders">
+      <classpathProvider
+            class="org.eclipse.ant.internal.launching.launchConfigurations.AntClasspathProvider"
+            id="org.eclipse.ant.ui.AntClasspathProvider">
+      </classpathProvider>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.processFactories">
+      <processFactory
+            class="org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntProcessFactory"
+            id="org.eclipse.ant.ui.remoteAntProcessFactory">
+      </processFactory>
+   </extension>
+   <extension point="org.eclipse.core.runtime.preferences">
+		<initializer class="org.eclipse.ant.internal.launching.AntLaunchingPreferenceInitializer"/>
+	</extension>
+   <extension
+         point="org.eclipse.ant.core.extraClasspathEntries">
+      <extraClasspathEntry
+            headless="true"
+            library="lib/loggers.jar">
+      </extraClasspathEntry>
+      <extraClasspathEntry
+            eclipseRuntime="false"
+            headless="true"
+            library="lib/antdebug.jar">
+      </extraClasspathEntry>
+      <extraClasspathEntry
+            eclipseRuntime="false"
+            headless="true"
+            library="lib/remote.jar">
+      </extraClasspathEntry>
+   </extension>
+    <extension
+         point="org.eclipse.debug.core.breakpoints">
+      <breakpoint
+            markerType="org.eclipse.ant.ui.antLineBreakpointMarker"
+            class="org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint"
+            id="org.eclipse.ant.ui.lineBreakpoint"
+            name="%antBreakpointGroupName">
+      </breakpoint>
+   </extension>
+   <extension
+         id="org.eclipse.ant.ui.antLineBreakpointMarker"
+         name="%AntLineBreakpoint.name"
+         point="org.eclipse.core.resources.markers">
+      <super type="org.eclipse.debug.core.lineBreakpointMarker"/>
+      <persistent value="true"/>
+   </extension>   
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf b/eclipse/plugins/org.eclipse.ant.launching/remote/META-INF/eclipse.inf
similarity index 100%
copy from eclipse/plugins/org.eclipse.ant.core/src_ant/META-INF/eclipse.inf
copy to eclipse/plugins/org.eclipse.ant.launching/remote/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java
new file mode 100644
index 0000000..294b248
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityException.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+/**
+ * A security exception that is thrown by the AntSecurityManager if
+ * an Ant task in some way attempts to halt or exit the Java Virtual Machine.
+ * 
+ * @since 2.1
+ */
+public class AntSecurityException extends SecurityException {
+
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java
new file mode 100644
index 0000000..30f7ebb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/AntSecurityManager.java
@@ -0,0 +1,371 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+
+import java.io.FileDescriptor;
+import java.net.InetAddress;
+import java.net.SocketPermission;
+import java.security.Permission;
+import java.util.PropertyPermission;
+
+/**
+ * A security manager that always throws an <code>AntSecurityException</code>
+ * if the calling thread attempts to cause the Java Virtual Machine to 
+ * exit/halt or if the restricted thread attempts to set a System property.
+ * Otherwise this manager just delegates to the pre-existing manager
+ * passed in the constructor or mimics the default security manager behavior
+ */
+public class AntSecurityManager extends SecurityManager {
+
+	private SecurityManager fSecurityManager= null;
+	private Thread fRestrictedThread= null;
+	//ensure that the PropertyPermission class is loaded before we 
+	//start checking permissions: bug 85908
+	private static final PropertyPermission fgPropertyPermission= new PropertyPermission("*", "write"); //$NON-NLS-1$ //$NON-NLS-2$
+	
+	private boolean fAllowSettingSystemProperties= true;
+	
+	public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread, boolean allowSettingProperties) {
+		fSecurityManager= securityManager;
+		fRestrictedThread= restrictedThread;
+		fAllowSettingSystemProperties= allowSettingProperties;
+	}
+	
+	public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread) {
+		this(securityManager, restrictedThread, true);
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkExit(int)
+	 */
+	public void checkExit(int status) {
+		//no exit allowed from the restricted thread...System.exit is being called
+		//by some ant task...disallow the exit
+		if (Thread.currentThread() == fRestrictedThread) {
+			throw new AntSecurityException();
+		}
+		if (fSecurityManager != null) {
+			fSecurityManager.checkExit(status);
+		}
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkAccept(java.lang.String, int)
+	 */
+	public void checkAccept(String host, int port) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkAccept(host, port);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkAccess(java.lang.Thread)
+	 */
+	public void checkAccess(Thread t) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkAccess(t);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
+	 */
+	public void checkAccess(ThreadGroup g) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkAccess(g);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkAwtEventQueueAccess()
+	 */
+	public void checkAwtEventQueueAccess() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkAwtEventQueueAccess();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkConnect(java.lang.String, int, java.lang.Object)
+	 */
+	public void checkConnect(String host, int port, Object context) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkConnect(host, port, context);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkConnect(java.lang.String, int)
+	 */
+	public void checkConnect(String host, int port) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkConnect(host, port);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkCreateClassLoader()
+	 */
+	public void checkCreateClassLoader() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkCreateClassLoader();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkDelete(java.lang.String)
+	 */
+	public void checkDelete(String file) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkDelete(file);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkExec(java.lang.String)
+	 */
+	public void checkExec(String cmd) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkExec(cmd);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkLink(java.lang.String)
+	 */
+	public void checkLink(String lib) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkLink(lib);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkListen(int)
+	 */
+	public void checkListen(int port) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkListen(port);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkMemberAccess(java.lang.Class, int)
+	 */
+	public void checkMemberAccess(Class clazz, int which) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkMemberAccess(clazz, which);
+		}
+	}
+
+	/**
+	 * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress, byte)
+	 * @deprecated
+	 */
+	public void checkMulticast(InetAddress maddr, byte ttl) {
+		if (fSecurityManager != null) {
+			String host = maddr.getHostAddress();
+			if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$
+	   			host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+			}
+	    	checkPermission(new SocketPermission(host, "accept,connect")); //$NON-NLS-1$
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress)
+	 */
+	public void checkMulticast(InetAddress maddr) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkMulticast(maddr);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPackageAccess(java.lang.String)
+	 */
+	public void checkPackageAccess(String pkg) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPackageAccess(pkg);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPackageDefinition(java.lang.String)
+	 */
+	public void checkPackageDefinition(String pkg) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPackageDefinition(pkg);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPermission(java.security.Permission, java.lang.Object)
+	 */
+	public void checkPermission(Permission perm, Object context) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPermission(perm, context);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPermission(java.security.Permission)
+	 */
+	public void checkPermission(Permission perm) {
+		if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) {
+			//attempting to write a system property
+			throw new AntSecurityException();
+		}
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPermission(perm);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPrintJobAccess()
+	 */
+	public void checkPrintJobAccess() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPrintJobAccess();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPropertiesAccess()
+	 */
+	public void checkPropertiesAccess() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPropertiesAccess();
+		}
+		super.checkPropertiesAccess();
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
+	 */
+	public void checkPropertyAccess(String key) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkPropertyAccess(key);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkRead(java.io.FileDescriptor)
+	 */
+	public void checkRead(FileDescriptor fd) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkRead(fd);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkRead(java.lang.String, java.lang.Object)
+	 */
+	public void checkRead(String file, Object context) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkRead(file, context);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkRead(java.lang.String)
+	 */
+	public void checkRead(String file) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkRead(file);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkSecurityAccess(java.lang.String)
+	 */
+	public void checkSecurityAccess(String target) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkSecurityAccess(target);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkSetFactory()
+	 */
+	public void checkSetFactory() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkSetFactory();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkSystemClipboardAccess()
+	 */
+	public void checkSystemClipboardAccess() {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkSystemClipboardAccess();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
+	 */
+	public boolean checkTopLevelWindow(Object window) {
+		if (fSecurityManager != null) {
+			return fSecurityManager.checkTopLevelWindow(window);
+		}
+		return super.checkTopLevelWindow(window);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
+	 */
+	public void checkWrite(FileDescriptor fd) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkWrite(fd);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#checkWrite(java.lang.String)
+	 */
+	public void checkWrite(String file) {
+		if (fSecurityManager != null) {
+			fSecurityManager.checkWrite(file);
+		}
+	}
+
+	/**
+	 * @see java.lang.SecurityManager#getInCheck()
+	 * @deprecated
+	 */
+	public boolean getInCheck() {
+		if (fSecurityManager != null) {
+			return fSecurityManager.getInCheck();
+		}
+		return super.getInCheck();
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#getSecurityContext()
+	 */
+	public Object getSecurityContext() {
+		if (fSecurityManager != null) {
+			return fSecurityManager.getSecurityContext();
+		}
+		return super.getSecurityContext();
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.SecurityManager#getThreadGroup()
+	 */
+	public ThreadGroup getThreadGroup() {
+		if (fSecurityManager != null) {
+			fSecurityManager.getThreadGroup();
+		}
+		return super.getThreadGroup();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java
new file mode 100644
index 0000000..9111611
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/DemuxInputStreamSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+
+import org.apache.tools.ant.DemuxInputStream;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6. DemuxInputStream is a new class to Ant 1.6.
+ */
+class DemuxInputStreamSetter {
+
+	protected void remapSystemIn(Project project) {
+		System.setIn(new DemuxInputStream(project));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
new file mode 100644
index 0000000..6b86f5d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseDefaultExecutor.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.DefaultExecutor;
+
+public class EclipseDefaultExecutor extends DefaultExecutor {
+
+    private static final EclipseSingleCheckExecutor SUB_EXECUTOR = new EclipseSingleCheckExecutor();
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+     */
+    public void executeTargets(Project project, String[] targetNames) throws BuildException {
+        Vector v= new Vector();
+        v.addAll(Arrays.asList(targetNames));
+        project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+        super.executeTargets(project, targetNames);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+     */
+    public Executor getSubProjectExecutor() {
+       return SUB_EXECUTOR;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
new file mode 100644
index 0000000..62ddd4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/EclipseSingleCheckExecutor.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import java.util.Arrays;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.helper.SingleCheckExecutor;
+
+public class EclipseSingleCheckExecutor extends SingleCheckExecutor {
+
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
+     */
+    public void executeTargets(Project project, String[] targetNames) throws BuildException {
+        Vector v= new Vector();
+        v.addAll(Arrays.asList(targetNames));
+        project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
+        super.executeTargets(project, targetNames);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
+     */
+    public Executor getSubProjectExecutor() {
+        return this;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java
new file mode 100644
index 0000000..ed9aba5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/ExecutorSetter.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+import org.apache.tools.ant.Executor;
+import org.apache.tools.ant.Project;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.6.3. Executors are a new feature of Ant 1.6.3.
+ */
+public class ExecutorSetter {
+
+    protected void setExecutor(Project project) {
+        Executor executor= new EclipseDefaultExecutor();
+        project.setExecutor(executor);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java
new file mode 100644
index 0000000..21bdd1f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InputHandlerSetter.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+
+import java.text.MessageFormat; // can't use ICU, used by ant
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.input.DefaultInputHandler;
+import org.apache.tools.ant.input.InputHandler;
+
+/**
+ * This class exists so that the Ant integration has backwards compatibility
+ * with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
+ */
+class InputHandlerSetter {
+
+	protected void setInputHandler(Project project, String inputHandlerClassname) {
+		InputHandler handler = null;
+		if (inputHandlerClassname == null) {
+			handler = new DefaultInputHandler();
+		} else {
+			try {
+				handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
+			} catch (ClassCastException e) {
+				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5"), new String[]{inputHandlerClassname}); //$NON-NLS-1$
+				throw new BuildException(msg, e);
+			} catch (Exception e) {
+				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6"), new String[]{inputHandlerClassname, e.getClass().getName()}); //$NON-NLS-1$
+				throw new BuildException(msg, e);
+			}
+		}
+		project.setInputHandler(handler);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
new file mode 100644
index 0000000..1119f39
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/InternalAntRunner.java
@@ -0,0 +1,1231 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Portions Copyright  2000-2005 The Apache Software Foundation
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Apache Software License v2.0 which 
+ * accompanies this distribution and is available at 
+ * http://www.apache.org/licenses/LICENSE-2.0.
+ * 
+ * Contributors:
+ *     IBM Corporation - derived implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.remote;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.tools.ant.AntTypeDefinition;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildListener;
+import org.apache.tools.ant.BuildLogger;
+import org.apache.tools.ant.ComponentHelper;
+import org.apache.tools.ant.DefaultLogger;
+import org.apache.tools.ant.DemuxOutputStream;
+import org.apache.tools.ant.Diagnostics;
+import org.apache.tools.ant.Main;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.ProjectHelper;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.TaskAdapter;
+import org.apache.tools.ant.util.FileUtils;
+import org.eclipse.ant.internal.launching.remote.logger.RemoteAntBuildLogger;
+
+/**
+ * Eclipse application entry point into Ant in a separate VM. Derived from the original Ant Main class
+ * to ensure that the functionality is equivalent when running in the platform.
+ */
+public class InternalAntRunner {
+
+	/**
+	 *  Message priority for project help messages. 
+	 */
+	public static final int MSG_PROJECT_HELP= Project.MSG_DEBUG + 1;
+	
+	private List buildListeners;
+
+	private String buildFileLocation;
+
+	/** 
+	 * Targets we want to run.
+	 */
+	private Vector targets;
+
+	private Map userProperties;
+	
+	private Project currentProject;
+	
+	private BuildLogger buildLogger= null;
+	
+	private Map eclipseSpecifiedTasks;
+	private Map eclipseSpecifiedTypes;
+	
+	/**
+	 * Cache of the Ant version number when it has been loaded
+	 */
+	private String antVersionNumber= null;
+
+	/** Our current message output status. Follows Project.MSG_XXX */
+	private int messageOutputLevel = Project.MSG_INFO;
+
+	/** Indicates whether output to the log is to be unadorned. */
+	private boolean emacsMode = false;
+
+	/** Indicates we should only parse and display the project help information */
+	private boolean projectHelp = false;
+
+	/** Stream that we are using for logging */
+	private PrintStream out = System.out;
+
+	/** Stream that we are using for logging error messages */
+	private PrintStream err = System.err;
+
+	/**
+	 * The Ant logger class. There may be only one logger. It will have the
+	 * right to use the 'out' PrintStream. The class must implement the BuildLogger
+	 * interface.  An empty String indicates that no logger is to be used.  A <code>null</code>
+	 * name indicates that the <code>org.apache.tools.ant.DefaultLogger</code> will be used.
+	 */
+	private String loggerClassname = null;
+
+	/** Extra arguments to be parsed as command line arguments. */
+	private String[] extraArguments = null;
+	
+	private boolean scriptExecuted= false;
+	
+	private List propertyFiles= new ArrayList();
+	
+	/**
+     * The Ant InputHandler class. There may be only one input handler.
+     */
+    private String inputHandlerClassname = null;
+    
+    /** 
+     * Indicates whether to execute all targets that 
+     * do not depend on failed targets
+     * @since Ant 1.6.0
+     */
+    private boolean keepGoing= false;
+
+    /** 
+     * Indicates whether this build is to support interactive input 
+     * @since Ant 1.6.0
+     */
+    private boolean allowInput = true;
+    
+    private String fEarlyErrorMessage= null;
+    
+    public static void main(String[] args) {
+    	try {
+    		new InternalAntRunner().run(getArrayList(args));
+    	} catch (Throwable t) {
+    	    t.printStackTrace();
+    		System.exit(1);
+    	}
+		System.exit(0);
+	}
+
+	private void addBuildListeners(Project project) {
+		String className= null;
+		try {
+			BuildLogger logger= createLogger();
+			if (logger != null) {
+				project.addBuildListener(logger);
+			}
+			if (buildListeners != null) {
+				for (Iterator iterator = buildListeners.iterator(); iterator.hasNext();) {
+					className = (String) iterator.next();
+					Class listener = Class.forName(className);
+					project.addBuildListener((BuildListener) listener.newInstance());
+				}
+			}
+		} catch (ClassCastException e) {
+			String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1"), new String[]{className}); //$NON-NLS-1$
+			logMessage(null, message, Project.MSG_ERR);
+			throw new BuildException(message, e);
+		} catch (BuildException e) {
+			throw e;
+		} catch (Exception e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/**
+	 * Parses the build file and adds necessary information into
+	 * the given project.
+	 * @param project The project to configure
+	 */
+	private void parseBuildFile(Project project) {
+		File buildFile = new File(getBuildFileLocation());
+		if (!buildFile.exists()) {
+			throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Buildfile__{0}_does_not_exist_!_1"), //$NON-NLS-1$
+						 new String[]{buildFile.getAbsolutePath()}));
+		}
+		if (!buildFile.isFile()) {
+			throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Buildfile__{0}_is_not_a_file_1"), //$NON-NLS-1$
+							new String[]{buildFile.getAbsolutePath()}));
+		}
+		
+        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+            parseBuildFile(project, buildFile);
+        } else {
+            ProjectHelper helper = ProjectHelper.getProjectHelper();
+            project.addReference("ant.projectHelper", helper); //$NON-NLS-1$
+            helper.parse(project, buildFile);
+        }
+    }
+    
+    /**
+     * @deprecated support for Ant older than 1.5
+     */
+    private void parseBuildFile(Project project, File buildFile) {
+        ProjectHelper.configureProject(project, buildFile);   
+    }
+
+	private void printArguments(Project project) {
+		if ((messageOutputLevel != Project.MSG_DEBUG) && (messageOutputLevel != Project.MSG_VERBOSE)) {
+			return;
+		}
+		StringBuffer sb = new StringBuffer();
+		for (int i = 0; i < extraArguments.length; i++) {
+			sb.append(extraArguments[i]);
+			sb.append(' ');
+		}
+		project.log(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Arguments__{0}_2"), new String[]{sb.toString().trim()})); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * Logs a message with the client that lists the targets
+	 * in a project
+	 * 
+	 * @param project the project to list targets from
+	 */
+	private void printTargets(Project project) {
+		//notify the logger that project help message are coming
+		//since there is no buildstarted or targetstarted to 
+		//to be used to establish the connection
+		logMessage(project, "", MSG_PROJECT_HELP); //$NON-NLS-1$
+		// find the target with the longest name
+		int maxLength = 0;
+		Enumeration ptargets = project.getTargets().elements();
+		String targetName;
+		String targetDescription;
+		Target currentTarget;
+		// split the targets in top-level and sub-targets depending
+		// on the presence of a description
+		List topNames = new ArrayList();
+		List topDescriptions = new ArrayList();
+		List subNames = new ArrayList();
+
+		while (ptargets.hasMoreElements()) {
+			currentTarget = (Target) ptargets.nextElement();
+			targetName = currentTarget.getName();
+			targetDescription = currentTarget.getDescription();
+			if (targetDescription == null) {
+				subNames.add(targetName);
+			} else {
+				topNames.add(targetName);
+				topDescriptions.add(targetDescription);
+				if (targetName.length() > maxLength) {
+					maxLength = targetName.length();
+				}
+			}
+		}
+
+		Collections.sort(subNames);
+		Collections.sort(topNames);
+		Collections.sort(topDescriptions);
+		
+		String defaultTargetName = project.getDefaultTarget();
+		if (defaultTargetName != null && !"".equals(defaultTargetName)) { // shouldn't need to check but... //$NON-NLS-1$
+			List defaultName = new ArrayList(1);
+			List defaultDesc = null;
+			defaultName.add(defaultTargetName);
+
+			int indexOfDefDesc = topNames.indexOf(defaultTargetName);
+			if (indexOfDefDesc >= 0) {
+				defaultDesc = new ArrayList(1);
+				defaultDesc.add(topDescriptions.get(indexOfDefDesc));
+			}
+			printTargets(project, defaultName, defaultDesc, RemoteAntMessages.getString("InternalAntRunner.Default_target__3"), maxLength); //$NON-NLS-1$
+
+		}
+
+		printTargets(project, topNames, topDescriptions, RemoteAntMessages.getString("InternalAntRunner.Main_targets__4"), maxLength); //$NON-NLS-1$
+		printTargets(project, subNames, null, RemoteAntMessages.getString("InternalAntRunner.Subtargets__5"), 0); //$NON-NLS-1$
+	}
+
+	/**
+	 * Logs a message with the client that lists the target names and optional descriptions
+	 * 
+	 * @param project the enclosing target
+	 * @param names the targets names
+	 * @param descriptions the corresponding descriptions
+	 * @param heading the message heading
+	 * @param maxlen maximum length that can be allocated for a name
+	 */
+	private void printTargets(Project project, List names, List descriptions, String heading, int maxlen) {
+		// now, start printing the targets and their descriptions
+		String lSep = System.getProperty("line.separator"); //$NON-NLS-1$
+		
+		String spaces = "    "; //$NON-NLS-1$
+		while (spaces.length() < maxlen) {
+			spaces += spaces;
+		}
+		StringBuffer msg = new StringBuffer();
+		msg.append(heading + lSep + lSep);
+		for (int i = 0; i < names.size(); i++) {
+			msg.append(' ');
+			msg.append(names.get(i));
+			if (descriptions != null) {
+				msg.append(spaces.substring(0, maxlen - ((String) names.get(i)).length() + 2));
+				msg.append(descriptions.get(i));
+			}
+			msg.append(lSep);
+		}
+		logMessage(project, msg.toString(), Project.MSG_INFO);
+	}
+
+	/*
+	 * Note that the list passed to this method must support
+	 * List#remove(Object)
+	 */
+	private void run(List argList) {
+		setCurrentProject(new Project());
+         if (isVersionCompatible("1.6.3")) { //$NON-NLS-1$
+               new ExecutorSetter().setExecutor(getCurrentProject());
+            }
+		Throwable error = null;
+		PrintStream originalErr = System.err;
+		PrintStream originalOut = System.out;
+		InputStream originalIn= System.in;
+		
+		SecurityManager originalSM= System.getSecurityManager();
+		scriptExecuted= true;
+		try {
+			if (argList != null && (argList.remove("-projecthelp") || argList.remove("-p"))) { //$NON-NLS-1$ //$NON-NLS-2$
+				projectHelp = true;
+			}
+			getCurrentProject().init();
+			if (argList != null) {
+				scriptExecuted= preprocessCommandLine(argList);
+			
+				if (!scriptExecuted) {
+					return;
+				}
+			}
+			
+            boolean exceptionState= processProperties(argList);
+            
+			addBuildListeners(getCurrentProject());
+            
+			addInputHandler(getCurrentProject());
+			
+			remapSystemIn();
+			System.setOut(new PrintStream(new DemuxOutputStream(getCurrentProject(), false)));
+			System.setErr(new PrintStream(new DemuxOutputStream(getCurrentProject(), true)));
+			
+			if (!projectHelp) {
+				fireBuildStarted(getCurrentProject());
+			}
+            
+            if (fEarlyErrorMessage != null) {
+                //an error occurred processing the properties
+                //build started has fired and we have
+                //listeners/loggers to report the error
+                logMessage(getCurrentProject(), fEarlyErrorMessage, Project.MSG_ERR);
+                if (exceptionState) {
+                    throw new BuildException(fEarlyErrorMessage);
+                }
+            }
+            
+            //properties can only be set after buildStarted as some listeners/loggers
+            //depend on this (e.g. XMLLogger)
+            setProperties(getCurrentProject());
+			
+			if (argList != null && !argList.isEmpty()) {
+				try {
+					scriptExecuted= processCommandLine(argList);
+				} catch (BuildException e) {
+					scriptExecuted= false;
+					throw e;
+				}
+			}
+			if (!scriptExecuted) {
+				return;
+			}
+			
+            //needs to occur after processCommandLine(List)
+			if (allowInput && (inputHandlerClassname != null && inputHandlerClassname.length() > 0)) {
+				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
+					getCurrentProject().setDefaultInputStream(originalIn);
+				}
+			} else {
+				//set the system property that any input handler
+				//can check to see if handling input is allowed
+				System.setProperty("eclipse.ant.noInput", "true");  //$NON-NLS-1$//$NON-NLS-2$
+				if (isVersionCompatible("1.5") && (inputHandlerClassname == null || inputHandlerClassname.length() == 0)) { //$NON-NLS-1$
+					InputHandlerSetter setter= new InputHandlerSetter();
+					setter.setInputHandler(getCurrentProject(), "org.eclipse.ant.internal.ui.antsupport.inputhandler.FailInputHandler"); //$NON-NLS-1$
+				}
+			}
+			
+			getCurrentProject().log(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Build_file__{0}_1"), new String[]{getBuildFileLocation()})); //$NON-NLS-1$
+			
+			setTasks();
+			setTypes();
+			
+			if (isVersionCompatible("1.6")) { //$NON-NLS-1$
+				getCurrentProject().setKeepGoingMode(keepGoing);
+			}
+			
+			parseBuildFile(getCurrentProject());
+			
+			if (projectHelp) {
+				printHelp(getCurrentProject());
+				scriptExecuted= false;
+				return;
+			}
+			
+			if (extraArguments != null) {
+				printArguments(getCurrentProject());
+			}
+			
+			System.setSecurityManager(new AntSecurityManager(originalSM, Thread.currentThread()));
+			
+			if (targets == null) {
+                targets= new Vector(1);
+            }
+            if (targets.isEmpty() && getCurrentProject().getDefaultTarget() != null) {
+                targets.add(getCurrentProject().getDefaultTarget());
+            }
+			if (!isVersionCompatible("1.6.3")) {  //$NON-NLS-1$
+	            getCurrentProject().addReference("eclipse.ant.targetVector", targets); //$NON-NLS-1$
+			}
+			getCurrentProject().executeTargets(targets);
+		} catch (AntSecurityException e) {
+			//expected
+		} catch (Throwable e) {
+			error = e;
+		} finally {
+			System.setErr(originalErr);
+			System.setOut(originalOut);
+			System.setIn(originalIn);
+			if (System.getSecurityManager() instanceof AntSecurityManager) {
+				System.setSecurityManager(originalSM);
+			}
+			
+			if (!projectHelp) {				
+				fireBuildFinished(getCurrentProject(), error);
+			}
+						
+			//close any user specified build log
+			if (err != originalErr) {
+				err.close();
+			}
+			if (out != originalOut) {
+				out.close();
+			}
+		}
+	}
+	
+	private void setTasks() {
+		if (eclipseSpecifiedTasks != null) {
+			Iterator itr= eclipseSpecifiedTasks.keySet().iterator();
+			String taskName;
+			String taskClassName;
+			while (itr.hasNext()) {
+				taskName= (String) itr.next();
+				taskClassName= (String) eclipseSpecifiedTasks.get(taskName);
+				
+				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
+					AntTypeDefinition def= new AntTypeDefinition();
+					def.setName(taskName);
+		            def.setClassName(taskClassName);
+		            def.setClassLoader(this.getClass().getClassLoader());
+		            def.setAdaptToClass(Task.class);
+		            def.setAdapterClass(TaskAdapter.class);
+		            ComponentHelper.getComponentHelper(getCurrentProject()).addDataTypeDefinition(def);
+				} else {
+					try {
+						Class taskClass = Class.forName(taskClassName);
+						getCurrentProject().addTaskDefinition(taskName, taskClass);
+					} catch (ClassNotFoundException e) {
+						String message= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.161"), new String[]{taskClassName, taskName}); //$NON-NLS-1$
+						getCurrentProject().log(message, Project.MSG_WARN);
+					}	
+				}
+			}
+		}
+	}
+
+	private void setTypes() {
+		if (eclipseSpecifiedTypes != null) {
+			Iterator itr= eclipseSpecifiedTypes.keySet().iterator();
+			String typeName;
+			String typeClassName;
+			while (itr.hasNext()) {
+				typeName = (String) itr.next();
+				typeClassName= (String) eclipseSpecifiedTypes.get(typeName);
+				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
+					AntTypeDefinition def = new AntTypeDefinition();
+	                def.setName(typeName);
+	                def.setClassName(typeClassName);
+	                def.setClassLoader(this.getClass().getClassLoader());
+	                ComponentHelper.getComponentHelper(getCurrentProject()).addDataTypeDefinition(def);
+				} else {
+					try {
+						Class typeClass = Class.forName(typeClassName);
+						getCurrentProject().addDataTypeDefinition(typeName, typeClass);
+					} catch (ClassNotFoundException e) {
+						String message= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.162"), new String[]{typeClassName, typeName}); //$NON-NLS-1$
+						getCurrentProject().log(message, Project.MSG_WARN);
+					}	
+				}
+			}
+		}
+	}
+
+	private void remapSystemIn() {
+		if (!isVersionCompatible("1.6")) { //$NON-NLS-1$
+			return;
+		}
+		DemuxInputStreamSetter setter= new DemuxInputStreamSetter();
+		setter.remapSystemIn(getCurrentProject());
+	}
+	
+	/**
+	 * Creates and returns the default build logger for logging build events to the ant log.
+	 * 
+	 * @return the default build logger for logging build events to the ant log
+	 * 			can return <code>null</code> if no logging is to occur
+	 */
+	private BuildLogger createLogger() {
+		if (loggerClassname == null) {
+			buildLogger= new DefaultLogger();
+		} else if (!"".equals(loggerClassname)) { //$NON-NLS-1$
+			try {
+				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
+			} catch (ClassCastException e) {
+				String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2"), new String[]{loggerClassname}); //$NON-NLS-1$
+				logMessage(null, message, Project.MSG_ERR);
+				throw new BuildException(message, e);
+			} catch (Exception e) {
+				String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_logger__{0}_6"), new String[]{loggerClassname}); //$NON-NLS-1$
+				logMessage(null, message, Project.MSG_ERR);
+				throw new BuildException(message, e);
+			}
+		} 
+		
+		if (buildLogger != null) {
+			buildLogger.setMessageOutputLevel(messageOutputLevel);
+			buildLogger.setOutputPrintStream(out);
+			buildLogger.setErrorPrintStream(err);
+			buildLogger.setEmacsMode(emacsMode);
+            if (buildLogger instanceof RemoteAntBuildLogger) {
+                ((RemoteAntBuildLogger) buildLogger).configure(userProperties);
+            }
+		}
+
+		return buildLogger;
+    }
+    
+    /**
+     * Project.fireBuildStarted is protected in Ant earlier than 1.5.*.
+     * Provides backwards compatibility with old Ant installs.
+     */
+    private void fireBuildStarted(Project project) {
+        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+            BuildEvent event = new BuildEvent(project);
+            for (Iterator iterator = project.getBuildListeners().iterator(); iterator.hasNext();) {
+                BuildListener listener = (BuildListener) iterator.next();
+                listener.buildStarted(event);
+            }
+        } else {
+            project.fireBuildStarted();
+        }
+    }
+
+	private void fireBuildFinished(Project project, Throwable error) {
+		if (error == null && scriptExecuted) {
+			logMessage(project, RemoteAntMessages.getString("InternalAntRunner.BUILD_SUCCESSFUL_1"), messageOutputLevel); //$NON-NLS-1$
+		}
+        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+            BuildEvent event = new BuildEvent(project);
+            event.setException(error);
+            Iterator iter = project.getBuildListeners().iterator();
+            while (iter.hasNext()) {
+                BuildListener listener = (BuildListener) iter.next();
+                listener.buildFinished(event);
+            }   
+        } else {
+            project.fireBuildFinished(error);
+        }
+	}
+
+	private void logMessage(Project project, String message, int priority) {
+		if (project != null) {
+			project.log(message, priority);	
+		} else {
+			if (buildListeners != null) {
+				project = new Project();
+				BuildEvent event = new BuildEvent(project);
+				event.setMessage(message, priority);
+				//notify the build listeners that are not registered as
+				//no project existed
+				for (Iterator iterator = buildListeners.iterator(); iterator.hasNext();) {
+					try {
+						BuildListener listener = (BuildListener) iterator.next();
+						listener.messageLogged(event);
+					} catch (ClassCastException e) {
+						//ignore we could be trying to log that a build listener is the
+						//wrong type of class
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Sets the buildFileLocation.
+	 * 
+	 * @param buildFileLocation the file system location of the build file
+	 */
+	private void setBuildFileLocation(String buildFileLocation) {
+		this.buildFileLocation = buildFileLocation;
+		if (getCurrentProject() != null) {
+			getCurrentProject().setUserProperty("ant.file", buildFileLocation); //$NON-NLS-1$
+		}
+	}
+
+	private String getBuildFileLocation() {
+		if (buildFileLocation == null) {
+			buildFileLocation = new File("build.xml").getAbsolutePath(); //$NON-NLS-1$
+		}
+		return buildFileLocation;
+	}
+
+	/**
+	 * Sets the message output level. Use -1 for none.
+	 * @param level The message output level
+	 */
+	private void setMessageOutputLevel(int level) {
+		messageOutputLevel = level;
+		if (buildLogger != null) {
+			buildLogger.setMessageOutputLevel(level);
+		}
+	}
+	
+	/*
+	 * Returns a String representation of the Ant version number as specified
+	 * in the version.txt file.
+	 */
+	private String getAntVersionNumber() throws BuildException {
+		if (antVersionNumber == null) {
+			try {
+				Properties props = new Properties();
+				InputStream in = Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt"); //$NON-NLS-1$
+				props.load(in);
+				in.close();
+				String versionNumber= props.getProperty("VERSION");  //$NON-NLS-1$
+				antVersionNumber= versionNumber;
+			} catch (IOException ioe) {
+				throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_the_version_information._{0}_9"), new String[]{ioe.getMessage()})); //$NON-NLS-1$
+			} catch (NullPointerException npe) {
+				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_the_version_information._10")); //$NON-NLS-1$
+			}
+		}
+		return antVersionNumber;
+	}
+	
+	/*
+	 * Returns whether the given version is compatible with the
+	 * current Ant version. A version is compatible if it is less
+	 * than or equal to the current version. 
+	 */
+	private boolean isVersionCompatible(String comparison) {
+		String version= getAntVersionNumber();
+		return version.compareTo(comparison) >= 0;
+	}
+	
+	private boolean preprocessCommandLine(List commands) {
+		
+		String arg = getArgument(commands, "-listener"); //$NON-NLS-1$
+		while (arg != null) {
+			if (arg.length() == 0) {
+				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1")); //$NON-NLS-1$
+			} 
+			if (buildListeners == null) {
+				buildListeners= new ArrayList(1);
+			}
+			buildListeners.add(arg);
+			arg = getArgument(commands, "-listener"); //$NON-NLS-1$
+		}
+
+		arg = getArgument(commands, "-logger"); //$NON-NLS-1$
+		if (arg != null) {
+			//allow empty string to mean no logger
+			loggerClassname = arg;
+		}
+		arg = getArgument(commands, "-logger"); //$NON-NLS-1$
+		if (arg != null) {
+			throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Only_one_logger_class_may_be_specified_1")); //$NON-NLS-1$
+		}
+		
+		arg = getArgument(commands, "-inputhandler"); //$NON-NLS-1$
+		if (arg != null) {
+			if (arg.length() == 0) {
+				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1")); //$NON-NLS-1$
+			} 
+			inputHandlerClassname = arg;
+		}
+		arg = getArgument(commands, "-inputhandler"); //$NON-NLS-1$
+		if (arg != null) {
+			throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Only_one_input_handler_class_may_be_specified._2")); //$NON-NLS-1$
+		}
+		return true;
+	}
+	
+	/*
+	 * Looks for interesting command line arguments. 
+	 * Returns whether it is OK to run the script.
+	 */
+	private boolean processCommandLine(List commands) {
+		
+		if (commands.remove("-help") || commands.remove("-h")) { //$NON-NLS-1$ //$NON-NLS-2$
+			printUsage();
+			return false;
+		}
+		
+		if (commands.remove("-version")) { //$NON-NLS-1$
+			printVersion();
+			return false;
+		}
+		
+		if (commands.remove("-verbose") || commands.remove("-v")) { //$NON-NLS-1$ //$NON-NLS-2$
+			printVersion();
+			setMessageOutputLevel(Project.MSG_VERBOSE);
+		}
+		
+		if (commands.remove("-debug") || commands.remove("-d")) { //$NON-NLS-1$ //$NON-NLS-2$
+			printVersion();
+			setMessageOutputLevel(Project.MSG_DEBUG);
+		}
+		
+		if (commands.remove("-quiet") || commands.remove("-q")) { //$NON-NLS-1$ //$NON-NLS-2$
+			setMessageOutputLevel(Project.MSG_WARN);
+		}
+
+		if (commands.remove("-emacs") || commands.remove("-e")) { //$NON-NLS-1$ //$NON-NLS-2$
+			emacsMode = true;
+			if (buildLogger != null) {
+				buildLogger.setEmacsMode(true);
+			}
+		}
+		
+		if (commands.remove("-diagnostics")) { //$NON-NLS-1$
+			if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4")); //$NON-NLS-1$
+			}
+			try {
+				Diagnostics.doReport(System.out);
+			} catch (NullPointerException e) {
+				logMessage(getCurrentProject(), RemoteAntMessages.getString("InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2"), Project.MSG_ERR); //$NON-NLS-1$
+			}
+			return false;
+		}
+		
+		String arg = getArgument(commands, "-logfile"); //$NON-NLS-1$
+		if (arg == null) {
+			arg = getArgument(commands, "-l"); //$NON-NLS-1$
+		}
+		if (arg != null) {
+			if (arg.length() == 0) {
+				String message= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3"); //$NON-NLS-1$
+				logMessage(currentProject, message, Project.MSG_ERR); 
+				throw new BuildException(message);
+			} 
+			try {
+				createLogFile(arg);
+			} catch (IOException e) {
+				// just log message and ignore exception
+				logMessage(getCurrentProject(), MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2"), new String[]{arg}), Project.MSG_ERR); //$NON-NLS-1$
+				return false;
+			}
+		
+		}
+		
+		arg = getArgument(commands, "-buildfile"); //$NON-NLS-1$
+		if (arg == null) {
+			arg = getArgument(commands, "-file"); //$NON-NLS-1$
+			if (arg == null) {
+				arg = getArgument(commands, "-f"); //$NON-NLS-1$
+			}
+		}
+		
+		if (arg != null) {
+			if (arg.length() == 0) {
+				String message= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4"); //$NON-NLS-1$
+				logMessage(currentProject, message, Project.MSG_ERR); 
+				throw new BuildException(message);
+			} 
+			setBuildFileLocation(arg);
+		}
+		
+		if (isVersionCompatible("1.6")) { //$NON-NLS-1$
+			if (commands.remove("-k") || commands.remove("-keep-going")) { //$NON-NLS-1$ //$NON-NLS-2$
+				keepGoing= true;
+			}
+			if (commands.remove("-noinput")) { //$NON-NLS-1$
+				allowInput= false;
+			}
+			arg= getArgument(commands, "-lib"); //$NON-NLS-1$
+			if (arg != null) {
+				logMessage(currentProject, RemoteAntMessages.getString("InternalAntRunner.157"), Project.MSG_ERR); //$NON-NLS-1$
+				return false;
+			}
+		}
+		
+		arg= getArgument(commands, "-find"); //$NON-NLS-1$
+		if (arg == null) {
+			arg= getArgument(commands, "-s"); //$NON-NLS-1$
+		}
+		if (arg != null) {
+			logMessage(currentProject, RemoteAntMessages.getString("InternalAntRunner.-find_not_supported"), Project.MSG_ERR); //$NON-NLS-1$
+			return false;
+		}
+		
+		processTasksAndTypes(commands);
+		
+		if (!commands.isEmpty()) {
+			processUnrecognizedCommands(commands);
+		}
+
+		if (!commands.isEmpty()) {
+			processTargets(commands);
+		}
+		
+		return true;
+	}
+	
+	private void processTasksAndTypes(List commands) {
+		String arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
+		while (arg != null) {
+			if (eclipseSpecifiedTasks == null) {
+				eclipseSpecifiedTasks= new HashMap();
+			}
+			int index= arg.indexOf(',');
+			if (index != -1) {
+				String name= arg.substring(0, index);
+				String className= arg.substring(index + 1);
+				eclipseSpecifiedTasks.put(name, className);
+			}
+			arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
+		}
+		
+		arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
+		while (arg != null) {
+			if (eclipseSpecifiedTypes == null) {
+				eclipseSpecifiedTypes= new HashMap();
+			}
+			int index= arg.indexOf(',');
+			if (index != -1) {	
+				String name= arg.substring(0, index);
+				String className= arg.substring(index + 1);
+				eclipseSpecifiedTypes.put(name, className);
+			}
+			arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
+		}
+	}
+
+	/*
+	 * Checks for unrecognized arguments on the command line.
+	 * Since there is no syntactic way to distingush between
+	 * ant -foo target1 target2
+	 * ant -foo fooarg target
+	 * we remove everything up to the last argument that
+	 * begins with a '-'.  In the latter case, above, that
+	 * means that there will be an extra target, 'fooarg',
+	 * left lying around.
+	 */
+	private void processUnrecognizedCommands(List commands) {
+		int p = -1;
+
+		// find the last arg that begins with '-'
+		for (int i = commands.size() - 1; i >= 0; i--) {
+			if (((String) commands.get(0)).startsWith("-")) { //$NON-NLS-1$
+				p = i;
+				break;
+			}
+		}
+		if (p < 0) { return; }
+
+		// remove everything preceding that last '-arg'
+		String s = ""; //$NON-NLS-1$
+		for (int i = 0; i <= p; i++) {
+			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
+			commands.remove(0);
+		}
+		
+		// warn of ignored commands
+		String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unknown_argument__{0}_2"), new Object[]{ s.substring(1) }); //$NON-NLS-1$
+		logMessage(currentProject, message, Project.MSG_WARN); 
+	}
+	
+
+	/*
+	 * Checks for targets specified at the command line.
+	 */
+	private void processTargets(List commands) {
+		if (targets == null) {
+			targets = new Vector(commands.size());
+		}
+		for (Iterator iter = commands.iterator(); iter.hasNext();) {
+			targets.add(iter.next());
+		}
+	}
+
+	/*
+	 * Creates the log file with the name specified by the user.
+	 * If the fileName is not absolute, the file will be created in the
+	 * working directory if specified or in the same directory as the location
+	 * of the build file.
+	 */
+	private void createLogFile(String fileName) throws FileNotFoundException, IOException {
+		File logFile = getFileRelativeToBaseDir(fileName);
+		
+		//this stream is closed in the finally block of run(list)
+		out = new PrintStream(new FileOutputStream(logFile));
+		err = out;
+		logMessage(getCurrentProject(), MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Using_{0}_file_as_build_log._1"), new String[]{logFile.getCanonicalPath()}), Project.MSG_INFO); //$NON-NLS-1$
+		if (buildLogger != null) {
+			buildLogger.setErrorPrintStream(err);
+			buildLogger.setOutputPrintStream(out);
+		}
+	}
+
+	private File getFileRelativeToBaseDir(String fileName) {
+		File parentFile= null;
+		
+		String base= getCurrentProject().getUserProperty("basedir"); //$NON-NLS-1$
+		if (base != null) {
+			parentFile= new File(base);
+		} else {
+			//relative to the build file location
+			parentFile= new File(getBuildFileLocation()).getParentFile();
+		}
+		
+		//remain backwards compatible for older Ant usage
+		return FileUtils.newFileUtils().resolveFile(parentFile, fileName);
+	}
+
+	/*
+	 * Processes cmd line properties and adds the user properties
+	 * Any user properties that have been explicitly set are set as well.
+	 * Ensures that -D properties take precedence.
+	 */
+	private boolean processProperties(List commands) {
+        boolean exceptionToBeThrown= false;
+		//MULTIPLE property files are allowed
+		String arg= getArgument(commands, "-propertyfile"); //$NON-NLS-1$
+		while (arg != null) {
+			if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+				fEarlyErrorMessage= RemoteAntMessages.getString("InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6"); //$NON-NLS-1$
+				break;
+			}
+			if (arg.length() == 0) {
+                fEarlyErrorMessage= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3"); //$NON-NLS-1$
+                exceptionToBeThrown= true;
+                break;
+			} 
+			
+			propertyFiles.add(arg);
+			arg= getArgument(commands, "-propertyfile"); //$NON-NLS-1$
+		}
+        
+        if (propertyFiles != null && !propertyFiles.isEmpty()) {
+            loadPropertyFiles();
+        }
+        
+        if (commands != null) {
+            processMinusDProperties(commands);
+        }
+        return exceptionToBeThrown;
+	}
+
+	private void processMinusDProperties(List commands) {
+		String[] args = (String[]) commands.toArray(new String[commands.size()]);
+		for (int i = 0; i < args.length; i++) {
+			String arg = args[i];
+			if (arg.startsWith("-D")) { //$NON-NLS-1$
+				String name = arg.substring(2, arg.length());
+				String value = null;
+				int posEq = name.indexOf("="); //$NON-NLS-1$
+				if (posEq == 0) {
+					value= name.substring(1);
+					name= ""; //$NON-NLS-1$
+				} else if (posEq > 0 && posEq != name.length() - 1) {
+					value = name.substring(posEq + 1).trim();
+					name = name.substring(0, posEq);
+				}
+				
+				if (value == null) {
+					//the user has specified something like "-Debug"
+					continue;
+				}
+				if (userProperties == null) {
+					userProperties= new HashMap();
+				}
+				userProperties.put(name, value);
+				commands.remove(args[i]);
+			}
+		}
+	}
+	
+	private void setProperties(Project project) {
+		setBuiltInProperties(project);
+		if (userProperties != null) {
+			for (Iterator iterator = userProperties.entrySet().iterator(); iterator.hasNext();) {
+				Map.Entry entry = (Map.Entry) iterator.next();
+				project.setUserProperty((String) entry.getKey(), (String) entry.getValue());
+			}
+		} 
+	}
+
+	private void setBuiltInProperties(Project project) {
+		project.setUserProperty("ant.file", getBuildFileLocation()); //$NON-NLS-1$
+		project.setUserProperty("ant.version", Main.getAntVersion()); //$NON-NLS-1$
+	}
+
+	/*
+	 * Print the project description, if any
+	 */
+	private void printHelp(Project project) {
+		if (project.getDescription() != null) {
+			logMessage(project, project.getDescription(), Project.MSG_INFO);
+		}
+		printTargets(project);
+	}
+
+	/*
+	 * Logs a message with the client indicating the version of <b>Ant</b> that this class
+	 * fronts.
+	 */
+	private void printVersion() {
+		logMessage(getCurrentProject(), Main.getAntVersion(), Project.MSG_INFO);
+	}
+
+	/*
+	 * Logs a message with the client outlining the usage of <b>Ant</b>.
+	 */
+	private void printUsage() {
+		String lSep = System.getProperty("line.separator"); //$NON-NLS-1$
+		StringBuffer msg = new StringBuffer();
+		msg.append("ant ["); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.options_13")); //$NON-NLS-1$
+		msg.append("] ["); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
+		msg.append(" ["); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
+		msg.append("2 ["); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
+		msg.append("3] ...]]"); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.Options___21")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-help, -h\t\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_this_message_23")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-projecthelp, -p\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_project_help_information_25")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-version\t\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_the_version_information_and_exit_27")); //$NON-NLS-1$
+		msg.append(lSep); 
+		msg.append("\t-diagnostics\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.12")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.13")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-quiet, -q\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.be_extra_quiet_29")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-verbose, -v\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.be_extra_verbose_31")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-debug, -d\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_debugging_information_33")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-emacs, -e\t\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.produce_logging_information_without_adornments_35")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-logfile\t<file>\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_given_file_for_log_37")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t\t-l\t<file>"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
+		msg.append(lSep);  
+		msg.append("\t-logger <classname>\t\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.the_class_which_is_to_perform_logging_39")); //$NON-NLS-1$
+		msg.append(lSep);  
+		msg.append("\t-listener <classname>\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-noinput\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.158")); //$NON-NLS-1$
+		msg.append(lSep); 
+		msg.append("\t-buildfile\t<file>\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_given_buildfile_43")); //$NON-NLS-1$
+		msg.append(lSep); 
+		msg.append("\t\t-file\t<file>"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t\t-f\t\t<file>"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-D<property>=<value>\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_value_for_given_property_45")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-keep-going, -k"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.159")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.160")); //$NON-NLS-1$
+		msg.append(lSep); 
+		msg.append("\t-propertyfile <name>\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.19")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.20")); //$NON-NLS-1$
+		msg.append(lSep);
+		msg.append("\t-inputhandler <class>\t"); //$NON-NLS-1$
+		msg.append(RemoteAntMessages.getString("InternalAntRunner.22")); //$NON-NLS-1$
+		msg.append(lSep);
+
+		logMessage(getCurrentProject(), msg.toString(), Project.MSG_INFO);
+	}
+
+	/*
+	 * From a command line list, return the argument for the given parameter.
+	 * The parameter and its argument are removed from the list.
+	 * 
+	 * @return <code>null</code> if the parameter is not found 
+	 * 			or an empty String if no arguments are found
+	 */
+	private String getArgument(List commands, String param) {
+		if (commands == null) {
+			return null;
+		}
+		int index = commands.indexOf(param);
+		if (index == -1) {
+			return null;
+		}
+		commands.remove(index);
+		if (index == commands.size()) {// if this is the last command
+			return ""; //$NON-NLS-1$
+		}
+		
+		String command = (String) commands.get(index);
+		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
+			return ""; //$NON-NLS-1$
+		}
+		
+		commands.remove(index);
+		return command;
+	}
+
+	/*
+	 * Helper method to ensure an array is converted into an ArrayList.
+	 */
+	private static ArrayList getArrayList(String[] args) {
+		if (args == null) {
+			return null;
+		}
+		// We could be using Arrays.asList() here, but it does not specify
+		// what kind of list it will return. We need a list that
+		// implements the method List.remove(Object) and ArrayList does.
+		ArrayList result = new ArrayList(args.length);
+		for (int i = 0; i < args.length; i++) {
+			result.add(args[i]);
+		}
+		return result;
+	}
+
+	private Project getCurrentProject() {
+		return currentProject;
+	}
+
+	private void setCurrentProject(Project currentProject) {
+		this.currentProject = currentProject;
+	}
+	
+	/**
+	 * Load all properties from the files 
+	 * specified by -propertyfile.
+	 */
+	private void loadPropertyFiles() {
+		Iterator itr= propertyFiles.iterator();
+        while (itr.hasNext()) {
+            String filename= (String) itr.next();
+           	File file= getFileRelativeToBaseDir(filename);
+            Properties props = new Properties();
+            FileInputStream fis = null;
+            try {
+                fis = new FileInputStream(file);
+                props.load(fis);
+            } catch (IOException e) {
+            	fEarlyErrorMessage= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_property_file_{0}__{1}_4"), new String[]{filename, e.getMessage()}); //$NON-NLS-1$
+            } finally {
+                if (fis != null) {
+                    try {
+                        fis.close();
+                    } catch (IOException e){
+                    }
+                }
+            }
+
+            if (userProperties == null) {
+            	userProperties= new HashMap();
+            }
+            Enumeration propertyNames = props.propertyNames();
+            while (propertyNames.hasMoreElements()) {
+                String name = (String) propertyNames.nextElement();
+                //most specific to global
+                //do not overwrite specific with a global property
+                if (userProperties.get(name) == null) {
+            		userProperties.put(name, props.getProperty(name));
+                }
+            }
+        }
+	}
+	
+	/*
+     * Creates the InputHandler and adds it to the project.
+     *
+     * @exception BuildException if a specified InputHandler
+     *                           implementation could not be loaded.
+     */
+    private void addInputHandler(Project project) {
+    	if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
+			return;
+		}
+		InputHandlerSetter setter= new InputHandlerSetter();
+		setter.setInputHandler(project, inputHandlerClassname);
+    }
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java
new file mode 100644
index 0000000..5cb927e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class RemoteAntMessages {
+
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.remote.RemoteAntMessages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+	private RemoteAntMessages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties
new file mode 100644
index 0000000..a0c7332
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/RemoteAntMessages.properties
@@ -0,0 +1,76 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+InternalAntRunner.Build_file__{0}_1=Buildfile: {0}
+InternalAntRunner.Arguments__{0}_2=Arguments: {0}
+InternalAntRunner.Default_target__3=Default target:
+InternalAntRunner.Main_targets__4=Main targets:
+InternalAntRunner.Subtargets__5=Subtargets:
+InternalAntRunner.Unable_to_instantiate_logger__{0}_6=Unable to instantiate logger: {0}
+InternalAntRunner.Could_not_load_the_version_information._{0}_9=Could not load the version information. {0}
+InternalAntRunner.Could_not_load_the_version_information._10=Could not load the version information.
+InternalAntRunner.options_13=options
+InternalAntRunner.target_15=target
+InternalAntRunner.Options___21=Options: 
+InternalAntRunner.print_this_message_23=print this message
+InternalAntRunner.print_project_help_information_25=print project help information
+InternalAntRunner.print_the_version_information_and_exit_27=print the version information and exit
+InternalAntRunner.be_extra_quiet_29=be extra quiet
+InternalAntRunner.be_extra_verbose_31=be extra verbose
+InternalAntRunner.print_debugging_information_33=print debugging information
+InternalAntRunner.produce_logging_information_without_adornments_35=produce logging information without adornments
+InternalAntRunner.use_given_file_for_log_37=use given file for log
+InternalAntRunner.the_class_which_is_to_perform_logging_39=the class which is to perform logging
+InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41=add an instance of class as a project listener
+InternalAntRunner.use_given_buildfile_43=use given buildfile
+InternalAntRunner.use_value_for_given_property_45=use value for given property
+InternalAntRunner.Using_{0}_file_as_build_log._1=Using {0} file as build log.
+InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2=Cannot write on the specified log file: {0}. Make sure the path exists and you have write permissions.
+InternalAntRunner.BUILD_SUCCESSFUL_1=BUILD SUCCESSFUL
+InternalAntRunner.Unknown_argument__{0}_2=Unknown argument: {0}
+InternalAntRunner.Buildfile__{0}_does_not_exist_!_1=Buildfile: {0} does not exist
+InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1={0} which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener.
+InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2={0} which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger.
+InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1=You must specify a classname when using the -listener argument
+InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3=You must specify a log file when using the -log argument
+InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4=You must specify a buildfile when using the -buildfile argument
+InternalAntRunner.12=print information that might be helpful to
+InternalAntRunner.13=\t\t\t\t\t\t\tdiagnose or report problems.
+InternalAntRunner.19=load all properties from file with -D
+InternalAntRunner.20=\t\t\t\t\t\t\tproperties taking precedence
+InternalAntRunner.22=the class which will handle input requests
+InternalAntRunner.1=\t\t\t\t\'
+InternalAntRunner.Only_one_logger_class_may_be_specified_1=Only one logger class may be specified
+InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1=You must specify a classname when using the -inputhandler argument
+InternalAntRunner.Only_one_input_handler_class_may_be_specified._2=Only one input handler class may be specified.
+InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3=You must specify a property filename when using the -propertyfile argument
+InternalAntRunner.Could_not_load_property_file_{0}__{1}_4=Could not load property file {0}: {1}
+InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5=The specified input handler class {0} does not implement the org.apache.tools.ant.input.InputHandler interface
+InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6=Unable to instantiate specified input handler class {0} : {1}
+InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4=The diagnostics options is an Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
+InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6=Specifying property files is a Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
+InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2=ANT_HOME must be set to use Ant diagnostics
+InternalAntRunner.Buildfile__{0}_is_not_a_file_1=Buildfile: {0} is not a file
+InternalAntRunner.-find_not_supported=-find not supported.\nCan be emulated using Run As > Ant Build located\nin the Run > External Tools menu
+InternalAntRunner.157=-lib not supported\nConfigure the Ant runtime classpath using either the\nglobal Ant runtime classpath or the Ant runtime classpath\n for this particular build
+InternalAntRunner.158=\t\t\tdo not allow interactive input
+InternalAntRunner.159=\t\texecute all targets that do not depend
+InternalAntRunner.160=\t\t\t\t\t\ton failed target(s)
+InternalAntRunner.161=Class {0} not found for task {1}
+InternalAntRunner.162=Class {0} not found for type {1}
+
+RemoteAntBuildLogger.1=BUILD FAILED
+RemoteAntBuildLogger.Total_time=Total time: 
+RemoteAntBuildLogger._minutes_2=\ minutes
+RemoteAntBuildLogger._minute_3=\ minute
+RemoteAntBuildLogger._seconds_4=\ seconds
+RemoteAntBuildLogger._second_5=\ second
+RemoteAntBuildLogger._milliseconds_6=\ milliseconds
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java
new file mode 100644
index 0000000..63341f4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/inputhandler/FailInputHandler.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.remote.inputhandler;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.tools.ant.input.DefaultInputHandler;
+
+public class FailInputHandler extends DefaultInputHandler {
+	
+	protected InputStream getInputStream() {
+		//ensure any attempts to read input fail
+		return new InputStream(){
+			public int read() throws IOException {
+				throw new IOException();
+			}
+		};
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java
new file mode 100644
index 0000000..1c0741a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/MessageIds.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+
+public class MessageIds {
+
+	public final static String PROCESS_ID=   "processID"; //$NON-NLS-1$
+	public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
+    //constants need to start greater than the Project.MSG_* constants
+	public final static String TASK= "6"; //$NON-NLS-1$
+	public final static String TARGET= "7"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java
new file mode 100644
index 0000000..f371516
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBreakpoint.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+import java.io.File;
+
+import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
+
+public class RemoteAntBreakpoint {
+	
+    private File fFile;
+	private int fLineNumber;
+	private String fFileName;
+	
+	public RemoteAntBreakpoint(String breakpointRepresentation) {
+		String[] data= breakpointRepresentation.split(DebugMessageIds.MESSAGE_DELIMITER);
+		String fileName= data[1];
+		String lineNumber= data[2];
+		fFileName= fileName;
+		fFile= new File(fileName);
+		fLineNumber= Integer.parseInt(lineNumber);
+	}
+
+	public boolean isAt(String fileName, int lineNumber) {
+		return fLineNumber == lineNumber && fileName != null && fFile.equals(new File(fileName));
+	}
+	
+	public String toMarshallString() {
+		StringBuffer buffer= new StringBuffer(DebugMessageIds.BREAKPOINT);
+		buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
+		buffer.append(fFileName);
+		buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
+		buffer.append(fLineNumber);
+		return buffer.toString();
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (!(obj instanceof RemoteAntBreakpoint)) {
+			return false;
+		}
+		RemoteAntBreakpoint other= (RemoteAntBreakpoint) obj;
+		return other.getLineNumber() == fLineNumber && other.getFile().equals(fFile);
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return fFileName.hashCode() + fLineNumber;
+	}
+	
+	public int getLineNumber() {
+		return fLineNumber;
+	}
+
+	public String getFileName() {
+		return fFileName;
+	}
+	
+	public File getFile() {
+	    return fFile;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
new file mode 100644
index 0000000..fcaa8dd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntBuildLogger.java
@@ -0,0 +1,396 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DefaultLogger;
+import org.apache.tools.ant.Location;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.util.StringUtils;
+import org.eclipse.ant.internal.launching.debug.AntDebugState;
+import org.eclipse.ant.internal.launching.remote.AntSecurityException;
+import org.eclipse.ant.internal.launching.remote.InternalAntRunner;
+import org.eclipse.ant.internal.launching.remote.RemoteAntMessages;
+
+/**
+ * Parts adapted from org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
+ * A build logger that reports via a socket connection.
+ * See MessageIds for more information about the protocol.
+ */
+public class RemoteAntBuildLogger extends DefaultLogger {
+
+    /** Time of the start of the build */
+    private long fStartTime = System.currentTimeMillis();
+
+    /**
+     * The client socket.
+     */
+    private Socket fEventSocket;
+    /**
+     * Print writer for sending messages
+     */
+    private PrintWriter fWriter;
+    /**
+     * Host to connect to, default is the localhost
+     */
+    protected String fHost= ""; //$NON-NLS-1$
+    /**
+     * Port to connect to.
+     */
+    private int fEventPort= -1;
+    
+    private String fProcessId= null;
+    
+    /**
+     * Is the debug mode enabled?
+     */
+    protected boolean fDebugMode= false;    
+    
+    protected boolean fSentProcessId= false;
+    
+    private List fEventQueue;
+    
+    private String fLastFileName= null;
+    private String fLastTaskName= null;
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.DefaultLogger#printMessage(java.lang.String, java.io.PrintStream, int)
+     */
+    protected void printMessage(String message, PrintStream stream, int priority) {
+        marshalMessage(priority, message);
+    }
+    
+    /**
+     * Connect to the remote Ant build listener.
+     */
+    protected void connect() {
+        if (fDebugMode) {
+            System.out.println("RemoteAntBuildLogger: trying to connect" + fHost + ":" + fEventPort); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        
+        for (int i= 1; i < 5; i++) {
+            try{
+                fEventSocket= new Socket(fHost, fEventPort);
+                fWriter= new PrintWriter(fEventSocket.getOutputStream(), true);
+                return;
+            } catch(IOException e){
+            }
+            try {
+                Thread.sleep(500);
+            } catch(InterruptedException e) {
+            }
+        }
+        shutDown();
+    }
+
+    /**
+     * Shutdown the connection to the remote build listener.
+     */
+    protected void shutDown() {
+        if (fEventQueue != null) {
+            fEventQueue.clear();
+        }
+        if (fWriter != null) {
+            fWriter.close();
+            fWriter= null;
+        }
+        
+        try {
+            if (fEventSocket != null) {
+                fEventSocket.close();
+                fEventSocket= null;
+            }
+        } catch(IOException e) {
+        }
+    }
+
+    private void sendMessage(String msg) {
+        if (fWriter == null) {
+            return;
+        }
+        
+        fWriter.println(msg);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
+     */
+    public void buildFinished(BuildEvent event) {
+        if (!fSentProcessId) {
+            establishConnection();
+        }
+        handleException(event);
+        printMessage( getTimeString(System.currentTimeMillis() - fStartTime), out, Project.MSG_INFO); 
+        shutDown();
+    }
+    
+    protected void handleException(BuildEvent event) {
+        Throwable exception = event.getException();
+        if (exception == null || exception instanceof AntSecurityException) {
+            return;
+        }
+        
+         StringBuffer message= new StringBuffer();
+         message.append(StringUtils.LINE_SEP);
+         message.append(RemoteAntMessages.getString("RemoteAntBuildLogger.1")); //$NON-NLS-1$
+         message.append(StringUtils.LINE_SEP);
+         if (Project.MSG_VERBOSE <= this.msgOutputLevel || !(exception instanceof BuildException)) {
+             message.append(StringUtils.getStackTrace(exception));
+         } else {
+             if (exception instanceof BuildException) {
+                 message.append(exception.toString()).append(StringUtils.LINE_SEP);
+             } else {
+                 message.append(exception.getMessage()).append(StringUtils.LINE_SEP);
+             }
+         }
+        message.append(StringUtils.LINE_SEP);
+        printMessage(message.toString(), out, Project.MSG_ERR); 
+    }
+    
+    private String getTimeString(long milliseconds) {
+        long seconds = milliseconds / 1000;
+        long minutes = seconds / 60;
+        seconds= seconds % 60;
+
+        StringBuffer result= new StringBuffer(RemoteAntMessages.getString("RemoteAntBuildLogger.Total_time")); //$NON-NLS-1$
+        if (minutes > 0) {
+            result.append(minutes);
+            if (minutes > 1) {
+                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._minutes_2")); //$NON-NLS-1$
+            } else {
+                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._minute_3")); //$NON-NLS-1$
+            }
+        }
+        if (seconds > 0) {
+            if (minutes > 0) {
+                result.append(' ');
+            }
+            result.append(seconds);
+    
+            if (seconds > 1) {
+                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._seconds_4")); //$NON-NLS-1$
+            } else {
+                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._second_5")); //$NON-NLS-1$
+            } 
+        }
+        if (seconds == 0 && minutes == 0) {
+            result.append(milliseconds);
+            result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._milliseconds_6"));      //$NON-NLS-1$
+        }
+        return result.toString();
+    }
+            
+
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+     */
+    public void targetStarted(BuildEvent event) {
+        if (!fSentProcessId) {
+            establishConnection();
+        }
+
+        if (Project.MSG_INFO <= msgOutputLevel) {
+            marshalTargetMessage(event);
+        }
+    }
+
+    protected void establishConnection() {
+        if (fEventPort != -1) {
+            connect();
+        } else {
+            shutDown();
+            return;
+        }
+        
+        fSentProcessId= true;
+        StringBuffer message= new StringBuffer(MessageIds.PROCESS_ID);
+        message.append(fProcessId);
+        sendMessage(message.toString());
+        if (fEventQueue != null) {
+            for (Iterator iter = fEventQueue.iterator(); iter.hasNext();) {
+                processEvent((BuildEvent)iter.next());
+            }
+            fEventQueue= null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
+     */
+    public void messageLogged(BuildEvent event) {
+        if (event.getPriority() > msgOutputLevel && event.getPriority() != InternalAntRunner.MSG_PROJECT_HELP) {
+            return;
+        }
+        
+        if (!fSentProcessId) {
+            if (event.getPriority() == InternalAntRunner.MSG_PROJECT_HELP) {
+                if (Project.MSG_INFO > msgOutputLevel) {
+                    return;
+                }
+                //no buildstarted or project started for project help option
+                establishConnection();
+                return;
+            }
+            if (fEventQueue == null){
+                fEventQueue= new ArrayList(10);
+            }
+            fEventQueue.add(event);
+            return;
+        }
+        
+        processEvent(event);
+    }
+
+    private void processEvent(BuildEvent event) {
+        if (event.getTask() != null & !emacsMode) {
+            try {
+                marshalTaskMessage(event);
+            } catch (IOException e) {
+            }
+        } else {
+            marshalMessage(event);
+        }
+    }
+    
+    private void marshalMessage(BuildEvent event) {
+        String eventMessage= event.getMessage();
+        if (eventMessage.length() == 0) {
+            return;
+        }
+        marshalMessage(event.getPriority(), eventMessage);
+    }
+
+    protected void marshalMessage(int priority, String message) {
+        try {
+            BufferedReader r = new BufferedReader(new StringReader(message));
+            String line = r.readLine();
+            StringBuffer messageLine;
+            while (line != null) {
+                messageLine= new StringBuffer();
+                if (priority != -1) {
+                    messageLine.append(priority);
+                    messageLine.append(',');
+                }
+                messageLine.append(line);
+                sendMessage(messageLine.toString());
+                line = r.readLine();
+            }
+        } catch (IOException e) {
+        }
+    }
+
+    private void marshalTaskMessage(BuildEvent event) throws IOException {
+        String eventMessage= event.getMessage();
+        if (eventMessage.length() == 0) {
+            return;
+        }
+        BufferedReader r = new BufferedReader(new StringReader(eventMessage));
+        String line = r.readLine();
+        StringBuffer message;
+        String taskName= event.getTask().getTaskName();
+        if (taskName != null && taskName.equals(fLastTaskName)) {
+            taskName= ""; //$NON-NLS-1$
+        } else {
+            fLastTaskName= taskName;
+        }
+        Location location= event.getTask().getLocation();
+        String fileName= null;
+        int lineNumber= -1;
+        try {
+            fileName= location.getFileName();
+            lineNumber= location.getLineNumber();
+        } catch (NoSuchMethodError e) {
+            //older Ant
+            fileName= location.toString();
+        }
+        if (location.equals(Location.UNKNOWN_LOCATION)) {
+            fileName= location.toString();
+            lineNumber= -1;
+        }
+        int priority= event.getPriority();
+        while (line != null) {
+            message= new StringBuffer(MessageIds.TASK);
+            message.append(priority);
+            message.append(',');
+            message.append(taskName);
+            message.append(',');
+            message.append(line.length());
+            message.append(',');
+            message.append(line);
+            message.append(',');
+            if (!fileName.equals(fLastFileName)) {
+            	message.append(fileName.length());
+            	message.append(',');
+                message.append(fileName);
+            } 
+            message.append(',');
+            message.append(lineNumber);
+            sendMessage(message.toString());
+            fLastFileName= fileName;
+            line= r.readLine();
+        }
+    }
+    
+    private void marshalTargetMessage(BuildEvent event) {
+        Target target= event.getTarget();
+        Location location= AntDebugState.getLocation(target);
+        
+        StringBuffer message= new StringBuffer();
+        message.append(MessageIds.TARGET);
+        message.append(',');
+        message.append(target.getName());
+        message.append(':');
+        message.append(',');
+        if (location != null && location != Location.UNKNOWN_LOCATION) {
+            //if a target has a valid location then we are on an Ant that is 
+            //new enough to have the accessor methods on Location
+        	String fileName= location.getFileName();
+        	message.append(fileName.length());
+        	message.append(',');
+            message.append(fileName);
+            message.append(',');
+            message.append(location.getLineNumber());
+        }
+        sendMessage(message.toString());
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+     */
+    public void buildStarted(BuildEvent event) {
+        establishConnection();
+        super.buildStarted(event);
+    }
+    
+    public void configure(Map userProperties) {
+        String portProperty= (String) userProperties.remove("eclipse.connect.port"); //$NON-NLS-1$
+        
+        if (portProperty != null) {
+            fEventPort= Integer.parseInt(portProperty);
+        }
+        
+        fProcessId= (String) userProperties.remove("org.eclipse.ant.core.ANT_PROCESS_ID"); //$NON-NLS-1$
+    } 
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
new file mode 100644
index 0000000..73f08bb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote/logger/RemoteAntDebugBuildLogger.java
@@ -0,0 +1,353 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.remote.logger;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.Location;
+import org.apache.tools.ant.Task;
+import org.eclipse.ant.internal.launching.debug.AntDebugState;
+import org.eclipse.ant.internal.launching.debug.IDebugBuildLogger;
+import org.eclipse.ant.internal.launching.debug.model.DebugMessageIds;
+
+/**
+ * Parts adapted from org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
+ * A build logger that reports via a socket connection.
+ * See DebugMessageIds and MessageIds for more information about the protocol.
+ */
+public class RemoteAntDebugBuildLogger extends RemoteAntBuildLogger implements IDebugBuildLogger {
+	
+	private ServerSocket fServerSocket;
+	private static final int fgServerSocketTimeout= 5000;
+	private Socket fRequestSocket;
+	
+	private PrintWriter fRequestWriter;
+	
+	private BufferedReader fRequestReader;
+	
+    private boolean fBuildStartedSuspend= true;
+	
+	private Task fStepOverTaskInterrupted;
+	
+	private List fBreakpoints= null;
+	
+	/**
+	 * Request port to connect to.
+	 * Used for debug connections
+	 */
+	private int fRequestPort= -1;
+	private AntDebugState fDebugState;
+
+	/**
+	 * Reader thread that processes requests from the debug client.
+	 */
+	private class ReaderThread extends Thread {
+		public ReaderThread() {
+			super("ReaderThread"); //$NON-NLS-1$
+			setDaemon(true);
+		}
+
+		public void run(){
+			try { 
+				String message= null; 
+				while (fRequestReader != null) { 
+					if ((message= fRequestReader.readLine()) != null) {
+						
+						if (message.startsWith(DebugMessageIds.STEP_INTO)){
+							synchronized(RemoteAntDebugBuildLogger.this) {
+								fDebugState.setStepIntoSuspend(true);
+								fDebugState.setStepIntoTask(fDebugState.getCurrentTask());
+								RemoteAntDebugBuildLogger.this.notifyAll();
+							}
+						} if (message.startsWith(DebugMessageIds.STEP_OVER)){
+							synchronized(RemoteAntDebugBuildLogger.this) {
+								fDebugState.stepOver();
+							}
+						} else if (message.startsWith(DebugMessageIds.SUSPEND)) {
+							synchronized(RemoteAntDebugBuildLogger.this) {
+								fDebugState.setStepIntoTask(null);
+								fDebugState.setStepOverTask(null);
+								fStepOverTaskInterrupted= null;
+								fDebugState.setClientSuspend(true);
+							}
+						} else if (message.startsWith(DebugMessageIds.RESUME)) {
+							synchronized(RemoteAntDebugBuildLogger.this) {
+								fDebugState.setStepIntoTask(null);
+								fDebugState.setStepOverTask(null);
+								fStepOverTaskInterrupted= null;
+								RemoteAntDebugBuildLogger.this.notifyAll();
+							}
+						} else if (message.startsWith(DebugMessageIds.TERMINATE)) {
+						    sendRequestResponse(DebugMessageIds.TERMINATED);
+							shutDown();
+						} else if (message.startsWith(DebugMessageIds.STACK)) {
+							marshallStack();
+						} else if (message.startsWith(DebugMessageIds.ADD_BREAKPOINT)) {
+							addBreakpoint(message);
+						} else if (message.startsWith(DebugMessageIds.REMOVE_BREAKPOINT)) {
+							removeBreakpoint(message);
+						}  else if (message.startsWith(DebugMessageIds.PROPERTIES)) {
+							marshallProperties();
+						}
+					}
+				} 
+			} catch (Exception e) {
+				RemoteAntDebugBuildLogger.this.shutDown();
+			}
+		}
+	}
+	
+	private void requestConnect() {
+		if (fDebugMode) {
+			System.out.println("RemoteAntDebugBuildLogger: trying to connect" + fHost + ":" + fRequestPort); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		
+		try{
+			fServerSocket.setSoTimeout(fgServerSocketTimeout);
+			fRequestSocket= fServerSocket.accept();
+			fRequestWriter= new PrintWriter(fRequestSocket.getOutputStream(), true);
+			fRequestReader = new BufferedReader(new InputStreamReader(fRequestSocket.getInputStream()));
+			
+			ReaderThread readerThread= new ReaderThread();
+			readerThread.setDaemon(true);
+			readerThread.start();
+			return;
+		} catch(SocketTimeoutException e){
+		} catch(IOException e) {
+		}
+		shutDown();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger#shutDown()
+	 */
+	protected void shutDown() {
+		if (fRequestWriter != null) {
+			fRequestWriter.close();
+			fRequestWriter= null;
+		}
+		
+		if (fRequestReader != null) {
+			try {
+				fRequestReader.close();
+			} catch (IOException e) {
+			}
+			fRequestReader= null;
+		}
+		
+		if (fRequestSocket != null) {
+			try {
+				fRequestSocket.close();	
+			} catch(IOException e) {
+			}
+		}
+		fRequestSocket= null;
+		
+		super.shutDown();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public synchronized void buildStarted(BuildEvent event) {
+		fDebugState= new AntDebugState(this);
+		super.buildStarted(event);
+		marshalMessage(-1, DebugMessageIds.BUILD_STARTED);
+		if (fRequestPort != -1) {
+			try {
+				fServerSocket= new ServerSocket(fRequestPort);
+			} catch (IOException ioe) {
+				shutDown();
+			}
+			requestConnect();
+		} else {
+			shutDown();
+		}
+        fDebugState.buildStarted();
+		fDebugState.setShouldSuspend(true);
+		waitIfSuspended();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void taskStarted(BuildEvent event) {
+        super.taskStarted(event);
+		fDebugState.taskStarted(event);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
+	 */
+	public synchronized void taskFinished(BuildEvent event) {
+		super.taskFinished(event);
+		fDebugState.taskFinished();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger#waitIfSuspended()
+	 */
+	public synchronized void waitIfSuspended() {
+		String detail= null;
+		boolean shouldSuspend= true;
+		RemoteAntBreakpoint breakpoint= breakpointAtLineNumber(fDebugState.getBreakpointLocation());
+		if (breakpoint != null) {
+			detail= breakpoint.toMarshallString();
+			fDebugState.setShouldSuspend(false);
+			if (fDebugState.getStepOverTask() != null) {
+				fStepOverTaskInterrupted= fDebugState.getStepOverTask();
+				fDebugState.setStepOverTask(null);
+			}
+		} else if (fDebugState.getCurrentTask() != null) {
+	        if (fDebugState.isStepIntoSuspend()) {
+	            detail= DebugMessageIds.STEP;
+				fDebugState.setStepIntoSuspend(false);
+	        } else if ((fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepOverTask()) || fDebugState.shouldSuspend()) {
+	        	//suspend as a step over has finished
+	        	detail= DebugMessageIds.STEP;
+				fDebugState.setStepOverTask(null);
+				fDebugState.setShouldSuspend(false);
+	        } else if (fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepIntoTask()) {
+	        	//suspend as a task that was stepped into has finally completed
+	        	 detail= DebugMessageIds.STEP;
+	        	 fDebugState.setStepIntoTask(null);
+	        } else if (fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fStepOverTaskInterrupted) {
+	        	//suspend as a task that was stepped over but hit a breakpoint has finally completed
+	        	 detail= DebugMessageIds.STEP;
+	        	 fStepOverTaskInterrupted= null;
+	        } else if (fDebugState.isClientSuspend()) {
+	            detail= DebugMessageIds.CLIENT_REQUEST;
+				fDebugState.setClientSuspend(false);
+	        } else {
+	            shouldSuspend= false;
+	        }
+	    } else if (fDebugState.shouldSuspend() && fBuildStartedSuspend) {
+            fBuildStartedSuspend= false;
+			fDebugState.setShouldSuspend(false);
+	    } else {
+			shouldSuspend= false;
+	    }
+		
+		if (shouldSuspend) {
+			if (detail != null) {
+				StringBuffer message= new StringBuffer(DebugMessageIds.SUSPENDED);
+				message.append(detail);
+				sendRequestResponse(message.toString());
+			}
+			 try {
+				 wait();
+                 shouldSuspend= false;
+			 } catch (InterruptedException e) {
+			 }
+		}
+	}
+
+	private RemoteAntBreakpoint breakpointAtLineNumber(Location location) {
+		if (fBreakpoints == null || location == null || location == Location.UNKNOWN_LOCATION) {
+			return null;
+		}
+		String fileName= fDebugState.getFileName(location);
+		int lineNumber= fDebugState.getLineNumber(location);
+		for (int i = 0; i < fBreakpoints.size(); i++) {
+			RemoteAntBreakpoint breakpoint = (RemoteAntBreakpoint) fBreakpoints.get(i);
+			if (breakpoint.isAt(fileName, lineNumber)) {
+				return breakpoint;
+			}
+		}
+		return null;
+	}
+
+	private void sendRequestResponse(String message) {
+		if (fRequestWriter == null) {
+			return;
+		}
+		
+		fRequestWriter.println(message);
+	}
+	
+	protected void marshallStack() {
+	    StringBuffer stackRepresentation= new StringBuffer();
+	    fDebugState.marshalStack(stackRepresentation);
+	    sendRequestResponse(stackRepresentation.toString());
+	}
+	
+	protected void marshallProperties() {
+	    StringBuffer propertiesRepresentation= new StringBuffer();
+		fDebugState.marshallProperties(propertiesRepresentation, true);
+	    sendRequestResponse(propertiesRepresentation.toString());
+	}
+	
+	protected void addBreakpoint(String breakpointRepresentation) {
+		if (fBreakpoints == null) {
+			fBreakpoints= new ArrayList();
+		}
+		RemoteAntBreakpoint newBreakpoint= new RemoteAntBreakpoint(breakpointRepresentation);
+		if (!fBreakpoints.contains(newBreakpoint)) {
+			fBreakpoints.add(newBreakpoint);	
+		}
+	}
+	
+	protected void removeBreakpoint(String breakpointRepresentation) {
+		if (fBreakpoints == null) {
+			return;
+		} 
+		RemoteAntBreakpoint equivalentBreakpoint= new RemoteAntBreakpoint(breakpointRepresentation);
+		for (Iterator iter = fBreakpoints.iterator(); iter.hasNext(); ) {
+			RemoteAntBreakpoint breakpoint = (RemoteAntBreakpoint) iter.next();
+			if (breakpoint.equals(equivalentBreakpoint)) {
+				iter.remove();
+				return;
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
+	 */
+	public void targetStarted(BuildEvent event) {
+		fDebugState.targetStarted(event);
+		if (!fSentProcessId) {
+			establishConnection();
+		}
+		waitIfSuspended();
+		super.targetStarted(event);
+	}
+    
+    /* (non-Javadoc)
+     * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
+     */
+    public void targetFinished(BuildEvent event) {
+        super.targetFinished(event);
+		fDebugState.setTargetExecuting(null);
+    }   
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger#configure(java.util.Map)
+     */
+    public void configure(Map userProperties) {
+       super.configure(userProperties);
+       String requestPortProperty= (String) userProperties.remove("eclipse.connect.request_port"); //$NON-NLS-1$
+        if (requestPortProperty != null) {
+            fRequestPort= Integer.parseInt(requestPortProperty);
+        }
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java
new file mode 100644
index 0000000..fa78e74
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.java
@@ -0,0 +1,25 @@
+/**********************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntCoreModelMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.launchConfigurations.AntCoreModelMessages";//$NON-NLS-1$
+	
+	public static String AntUtil_6;
+	public static String AntUtil_7;
+	public static String AntUtil_2;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, AntCoreModelMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties
new file mode 100644
index 0000000..6bad54f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntCoreModelMessages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+AntUtil_6=Invalid property file entry: {0}
+AntUtil_7=Unable to generate Ant classpath
+AntUtil_2=Error reading launch configuration
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java
new file mode 100644
index 0000000..81c4143
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunch.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.ISourceLocator;
+
+/**
+ * Stores link descriptors for Launch for further use of TaskLinkManager
+ */
+public class AntLaunch extends Launch {
+	List linkDescriptors;
+
+	public AntLaunch(ILaunchConfiguration launchConfiguration, String mode, ISourceLocator locator) {
+		super(launchConfiguration, mode, locator);
+		linkDescriptors = new ArrayList();
+	}
+
+	public void addLinkDescriptor(String line, String fileName, int lineNumber, int offset, int length) {
+		if (fileName!= null && fileName.trim().length() > 0) {
+			synchronized (linkDescriptors) {
+				linkDescriptors.add(new LinkDescriptor(line, fileName, lineNumber, offset, length));
+			}
+		}
+	}
+
+	public void removeLinkDescriptor(LinkDescriptor ld) {
+		synchronized (linkDescriptors) {
+			linkDescriptors.remove(ld);
+		}
+	}
+
+	public List getLinkDescriptors() {
+		synchronized (linkDescriptors) {
+			return new ArrayList(linkDescriptors);
+		}
+	}
+
+	public void clearLinkDescriptors() {
+		synchronized (linkDescriptors) {
+			linkDescriptors.clear();
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunching.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunching.java
new file mode 100644
index 0000000..930f722
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunching.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Controls the plug-in life cycle
+ */
+public class AntLaunching extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.ant.launching"; //$NON-NLS-1$
+	
+	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
+	
+	/**
+	 * Boolean attribute indicating if an input handler should be supplied for
+	 * the build Default value is <code>true</code>.
+	 */
+	public static final String SET_INPUTHANDLER = "org.eclipse.ant.uiSET_INPUTHANDLER"; //$NON-NLS-1$
+
+	/**
+	 * int preference identifier constant which specifies the length of time to
+	 * wait to connect with the socket that communicates with the separate JRE
+	 * to capture the output
+	 */
+	public static final String ANT_COMMUNICATION_TIMEOUT = "timeout"; //$NON-NLS-1$
+
+	/**
+	 * Size of left-hand column for right-justified task name. Used for Ant
+	 * Build logging.
+	 * 
+	 * @see org.eclipse.ant.internal.ui.antsupport.logger.AntProcessBuildLogger
+	 * @see org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener
+	 */
+	public static final int LEFT_COLUMN_SIZE = 15;
+	
+	/**
+	 * String attribute indicating the custom runtime classpath to use for an
+	 * Ant build. Default value is <code>null</code> which indicates that the
+	 * global classpath is to be used. Format is a comma separated listing of
+	 * URLs.
+	 * 
+	 * @deprecated no longer supported: use
+	 *             {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER}
+	 * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH
+	 */
+	public static final String ATTR_ANT_CUSTOM_CLASSPATH = IExternalToolConstants.UI_PLUGIN_ID
+			+ ".ATTR_ANT_CUSTOM_CLASSPATH"; //$NON-NLS-1$
+	/**
+	 * String attribute indicating the custom Ant home to use for an Ant build.
+	 * Default value is <code>null</code> which indicates that no Ant home is to
+	 * be set
+	 * 
+	 * @deprecated no longer supported: use
+	 *             {@link IJavaLaunchConfigurationConstants#ATTR_CLASSPATH_PROVIDER}
+	 * @see IJavaLaunchConfigurationConstants#ATTR_DEFAULT_CLASSPATH
+	 */
+	public static final String ATTR_ANT_HOME = IExternalToolConstants.UI_PLUGIN_ID
+			+ ".ATTR_ANT_HOME"; //$NON-NLS-1$
+	
+	
+	/**
+	 * Status code indicating an unexpected internal error.
+	 * @since 2.1
+	 */
+	public static final int INTERNAL_ERROR = 120;	
+
+	// The shared instance
+	private static AntLaunching plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public AntLaunching() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static AntLaunching getDefault() {
+		return plugin;
+	}
+	
+	public static String getUniqueIdentifier() {
+		return PLUGIN_ID;
+	}
+	
+	/**
+	 * Logs the specified throwable with this plug-in's log.
+	 * 
+	 * @param t throwable to log 
+	 */
+	public static void log(Throwable t) {
+		IStatus status= new Status(IStatus.ERROR, PLUGIN_ID, INTERNAL_ERROR, "Error logged from Ant UI: ", t); //$NON-NLS-1$
+		log(status);
+	}
+	
+	/**
+	 * Logs the specified status with this plug-in's log.
+	 * 
+	 * @param status status 
+	 */
+	public static void log(IStatus status) {
+		getDefault().getLog().log(status);
+	}
+	
+	/**
+	 * Writes the message to the plug-in's log
+	 * 
+	 * @param message the text to write to the log
+	 */
+	public static void log(String message, Throwable exception) {
+		IStatus status = newErrorStatus(message, exception);
+		log(status);
+	}
+	
+	/**
+	 * Returns a new <code>IStatus</code> for this plug-in
+	 */
+	public static IStatus newErrorStatus(String message, Throwable exception) {
+		if (message == null) {
+			message= EMPTY_STRING; 
+		}		
+		return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
+	}
+	
+	public static AntLaunching getPlugin() {
+		return plugin;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java
new file mode 100644
index 0000000..54d5964
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingPreferenceInitializer.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+
+public class AntLaunchingPreferenceInitializer extends
+		AbstractPreferenceInitializer {
+
+	public AntLaunchingPreferenceInitializer() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
+	 * initializeDefaultPreferences()
+	 */
+	public void initializeDefaultPreferences() {
+
+		IEclipsePreferences node = new DefaultScope()
+				.getNode(AntLaunching.getUniqueIdentifier());
+		node.put(IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT,
+				"20000"); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java
new file mode 100644
index 0000000..3acfd09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/AntLaunchingUtil.java
@@ -0,0 +1,541 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.util.FileUtils;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntHomeClasspathEntry;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntProcess;
+import org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntRuntimeProcess;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.model.ExternalToolBuilder;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry2;
+import org.eclipse.jdt.launching.JavaRuntime;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * General utility class dealing with Ant build files
+ */
+public final class AntLaunchingUtil {
+	public static final String ATTRIBUTE_SEPARATOR = ","; //$NON-NLS-1$;
+	public static final char ANT_CLASSPATH_DELIMITER = '*';
+	public static final String ANT_HOME_CLASSPATH_PLACEHOLDER = "G"; //$NON-NLS-1$
+	public static final String ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER = "UG"; //$NON-NLS-1$
+	
+	/**
+	 * No instances allowed
+	 */
+	private AntLaunchingUtil() {
+		super();
+	}
+
+	/**
+	 * Returns a single-string of the strings for storage.
+	 * 
+	 * @param strings
+	 *            the array of strings
+	 * @return a single-string representation of the strings or
+	 *         <code>null</code> if the array is empty.
+	 */
+	public static String combineStrings(String[] strings) {
+		if (strings.length == 0)
+			return null;
+
+		if (strings.length == 1)
+			return strings[0];
+
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < strings.length - 1; i++) {
+			buf.append(strings[i]);
+			buf.append(ATTRIBUTE_SEPARATOR);
+		}
+		buf.append(strings[strings.length - 1]);
+		return buf.toString();
+	}
+
+	/**
+	 * Returns an array of targets to be run, or <code>null</code> if none are
+	 * specified (indicating the default target or implicit target should be
+	 * run).
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return array of target names, or <code>null</code>
+	 * @throws CoreException
+	 *             if unable to access the associated attribute
+	 */
+	public static String[] getTargetNames(ILaunchConfiguration configuration)
+			throws CoreException {
+		String attribute = null;
+		if (IAntLaunchConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE
+				.equals(configuration.getType().getIdentifier())) {
+			attribute = getTargetNamesForAntBuilder(configuration);
+		}
+		if (attribute == null) {
+			attribute = configuration.getAttribute(
+					IAntLaunchConstants.ATTR_ANT_TARGETS,
+					(String) null);
+			if (attribute == null) {
+				return null;
+			}
+		}
+
+		return AntLaunchingUtil.parseRunTargets(attribute);
+	}
+
+	private static String getTargetNamesForAntBuilder(
+			ILaunchConfiguration configuration) throws CoreException {
+		String buildType = ExternalToolBuilder.getBuildType();
+		String targets = null;
+		if (IExternalToolConstants.BUILD_TYPE_AUTO.equals(buildType)) {
+			targets = configuration.getAttribute(
+					IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS,
+					(String) null);
+		} else if (IExternalToolConstants.BUILD_TYPE_CLEAN.equals(buildType)) {
+			targets = configuration.getAttribute(
+					IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS,
+					(String) null);
+		} else if (IExternalToolConstants.BUILD_TYPE_FULL.equals(buildType)) {
+			targets = configuration
+					.getAttribute(
+							IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS,
+							(String) null);
+		} else if (IExternalToolConstants.BUILD_TYPE_INCREMENTAL
+				.equals(buildType)) {
+			targets = configuration.getAttribute(
+					IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS,
+					(String) null);
+		}
+
+		return targets;
+	}
+
+	/**
+	 * Returns a map of properties to be defined for the build, or
+	 * <code>null</code> if none are specified (indicating no additional
+	 * properties specified for the build).
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return map of properties (name --> value), or <code>null</code>
+	 * @throws CoreException
+	 *             if unable to access the associated attribute
+	 */
+	public static Map getProperties(ILaunchConfiguration configuration)
+			throws CoreException {
+		Map map = configuration.getAttribute(
+				IAntLaunchConstants.ATTR_ANT_PROPERTIES,
+				(Map) null);
+		return map;
+	}
+
+	/**
+	 * Returns a String specifying the Ant home to use for the build.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return String specifying Ant home to use or <code>null</code>
+	 * @throws CoreException
+	 *             if unable to access the associated attribute
+	 */
+	public static String getAntHome(ILaunchConfiguration configuration)
+			throws CoreException {
+		IRuntimeClasspathEntry[] entries = JavaRuntime
+				.computeUnresolvedRuntimeClasspath(configuration);
+		for (int i = 0; i < entries.length; i++) {
+			IRuntimeClasspathEntry entry = entries[i];
+			if (entry.getType() == IRuntimeClasspathEntry.OTHER) {
+				IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2) entry;
+				if (entry2.getTypeId().equals(AntHomeClasspathEntry.TYPE_ID)) {
+					return ((AntHomeClasspathEntry) entry2).getAntHome();
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns an array of property files to be used for the build, or
+	 * <code>null</code> if none are specified (indicating no additional
+	 * property files specified for the build).
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return array of property file names, or <code>null</code>
+	 * @throws CoreException
+	 *             if unable to access the associated attribute
+	 */
+	public static String[] getPropertyFiles(ILaunchConfiguration configuration)
+			throws CoreException {
+		String attribute = configuration.getAttribute(
+				IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES,
+				(String) null);
+		if (attribute == null) {
+			return null;
+		}
+		String[] propertyFiles = AntLaunchingUtil.parseString(attribute, ","); //$NON-NLS-1$
+		for (int i = 0; i < propertyFiles.length; i++) {
+			String propertyFile = propertyFiles[i];
+			propertyFile = expandVariableString(propertyFile,
+					AntCoreModelMessages.AntUtil_6);
+			propertyFiles[i] = propertyFile;
+		}
+		return propertyFiles;
+	}
+
+	/**
+	 * Returns the list of URLs that define the custom classpath for the Ant
+	 * build, or <code>null</code> if the global classpath is to be used.
+	 * 
+	 * @param config
+	 *            launch configuration
+	 * @return a list of <code>URL</code>
+	 * 
+	 * @throws CoreException
+	 *             if file does not exist, IO problems, or invalid format.
+	 */
+	public static URL[] getCustomClasspath(ILaunchConfiguration config)
+			throws CoreException {
+		boolean useDefault = config.getAttribute(
+				IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
+		if (useDefault) {
+			return null;
+		}
+		IRuntimeClasspathEntry[] unresolved = JavaRuntime
+				.computeUnresolvedRuntimeClasspath(config);
+		// don't consider bootpath entries
+		List userEntries = new ArrayList(unresolved.length);
+		for (int i = 0; i < unresolved.length; i++) {
+			IRuntimeClasspathEntry entry = unresolved[i];
+			if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
+				userEntries.add(entry);
+			}
+		}
+		IRuntimeClasspathEntry[] entries = JavaRuntime
+				.resolveRuntimeClasspath(
+						(IRuntimeClasspathEntry[]) userEntries
+								.toArray(new IRuntimeClasspathEntry[userEntries
+										.size()]), config);
+		URL[] urls = new URL[entries.length];
+		for (int i = 0; i < entries.length; i++) {
+			IRuntimeClasspathEntry entry = entries[i];
+			try {
+				urls[i] = new URL("file:" + entry.getLocation()); //$NON-NLS-1$
+			} catch (MalformedURLException e) {
+				throw new CoreException(new Status(IStatus.ERROR, AntLaunching
+						.getUniqueIdentifier(), AntLaunching.INTERNAL_ERROR,
+						AntCoreModelMessages.AntUtil_7, e));
+			}
+		}
+		return urls;
+	}
+
+	private static String expandVariableString(String variableString,
+			String invalidMessage) throws CoreException {
+		String expandedString = VariablesPlugin.getDefault()
+				.getStringVariableManager().performStringSubstitution(
+						variableString);
+		if (expandedString == null || expandedString.length() == 0) {
+			String msg = MessageFormat.format(invalidMessage,
+					new String[] { variableString });
+			throw new CoreException(new Status(IStatus.ERROR,
+					AntLaunching.PLUGIN_ID, 0, msg, null));
+		}
+
+		return expandedString;
+	}
+
+	/**
+	 * Returns the list of target names to run
+	 * 
+	 * @param extraAttibuteValue
+	 *            the external tool's extra attribute value for the run targets
+	 *            key.
+	 * @return a list of target names
+	 */
+	public static String[] parseRunTargets(String extraAttibuteValue) {
+		return parseString(extraAttibuteValue, ATTRIBUTE_SEPARATOR);
+	}
+
+	/**
+	 * Returns the list of Strings that were delimiter separated.
+	 * 
+	 * @param delimString
+	 *            the String to be tokenized based on the delimiter
+	 * @return a list of Strings
+	 */
+	public static String[] parseString(String delimString, String delim) {
+		if (delimString == null) {
+			return new String[0];
+		}
+
+		// Need to handle case where separator character is
+		// actually part of the target name!
+		StringTokenizer tokenizer = new StringTokenizer(delimString, delim);
+		String[] results = new String[tokenizer.countTokens()];
+		for (int i = 0; i < results.length; i++) {
+			results[i] = tokenizer.nextToken().trim();
+		}
+
+		return results;
+	}
+
+	/**
+	 * Returns an IFile with the given fully qualified path (relative to the
+	 * workspace root). The returned IFile may or may not exist.
+	 */
+	public static IFile getFile(String fullPath) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+		return root.getFile(new Path(fullPath));
+	}
+
+	/**
+	 * Returns the workspace file associated with the given path in the local
+	 * file system, or <code>null</code> if none. If the path happens to be a
+	 * relative path, then the path is interpreted as relative to the specified
+	 * parent file.
+	 * 
+	 * Attempts to handle linked files; the first found linked file with the
+	 * correct path is returned.
+	 * 
+	 * @param path
+	 * @param buildFileParent
+	 * @return file or <code>null</code>
+	 * @see org.eclipse.core.resources.IWorkspaceRoot#findFilesForLocation(IPath)
+	 */
+	public static IFile getFileForLocation(String path, File buildFileParent) {
+		if (path == null) {
+			return null;
+		}
+		IPath filePath = new Path(path);
+		IFile file = null;
+		IFile[] files = ResourcesPlugin.getWorkspace().getRoot()
+				.findFilesForLocation(filePath);
+		if (files.length > 0) {
+			file = files[0];
+		}
+		if (file == null) {
+			// relative path
+			File relativeFile = null;
+			try {
+				// this call is ok if buildFileParent is null
+				relativeFile = FileUtils.getFileUtils().resolveFile(
+						buildFileParent, path);
+				filePath = new Path(relativeFile.getAbsolutePath());
+				files = ResourcesPlugin.getWorkspace().getRoot()
+						.findFilesForLocation(filePath);
+				if (files.length > 0) {
+					file = files[0];
+				} else {
+					return null;
+				}
+			} catch (BuildException be) {
+				return null;
+			}
+		}
+
+		if (file.exists()) {
+			return file;
+		}
+		File ioFile = file.getLocation().toFile();
+		if (ioFile.exists()) {// needs to handle case insensitivity on WINOS
+			try {
+				files = ResourcesPlugin.getWorkspace().getRoot()
+						.findFilesForLocation(
+								new Path(ioFile.getCanonicalPath()));
+				if (files.length > 0) {
+					return files[0];
+				}
+			} catch (IOException e) {
+			}
+		}
+
+		return null;
+	}
+
+	/**
+	 * Migrates the classpath in the given configuration from the old format to
+	 * the new format. The old format is not preserved. Instead, the default
+	 * classpath will be used. However, ANT_HOME settings are preserved.
+	 * 
+	 * @param configuration
+	 *            a configuration to migrate
+	 * @throws CoreException
+	 *             if unable to migrate
+	 * @since 3.0
+	 */
+	public static void migrateToNewClasspathFormat(
+			ILaunchConfiguration configuration) throws CoreException {
+		String oldClasspath = configuration.getAttribute(
+				AntLaunching.ATTR_ANT_CUSTOM_CLASSPATH,
+				(String) null);
+		String oldAntHome = configuration.getAttribute(
+				AntLaunching.ATTR_ANT_HOME, (String) null);
+		String provider = configuration.getAttribute(
+				IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
+				(String) null);
+		if (oldClasspath != null || oldAntHome != null || provider == null) {
+			ILaunchConfigurationWorkingCopy workingCopy = null;
+			if (configuration.isWorkingCopy()) {
+				workingCopy = (ILaunchConfigurationWorkingCopy) configuration;
+			} else {
+				workingCopy = configuration.getWorkingCopy();
+			}
+			workingCopy
+					.setAttribute(
+							AntLaunching.ATTR_ANT_CUSTOM_CLASSPATH,
+							(String) null);
+			workingCopy
+					.setAttribute(
+							AntLaunching.ATTR_ANT_HOME,
+							(String) null);
+			workingCopy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
+					"org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
+			workingCopy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
+					true);
+			if (oldAntHome != null) {
+				IRuntimeClasspathEntry[] entries = JavaRuntime
+						.computeUnresolvedRuntimeClasspath(workingCopy);
+				List mementos = new ArrayList(entries.length);
+				for (int i = 0; i < entries.length; i++) {
+					IRuntimeClasspathEntry entry = entries[i];
+					if (entry.getType() == IRuntimeClasspathEntry.OTHER) {
+						IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2) entry;
+						if (entry2.getTypeId().equals(
+								AntHomeClasspathEntry.TYPE_ID)) {
+							AntHomeClasspathEntry homeEntry = new AntHomeClasspathEntry(
+									oldAntHome);
+							mementos.add(homeEntry.getMemento());
+							continue;
+						}
+					}
+					mementos.add(entry.getMemento());
+				}
+				workingCopy
+						.setAttribute(
+								IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
+								false);
+				workingCopy.setAttribute(
+						IJavaLaunchConfigurationConstants.ATTR_CLASSPATH,
+						mementos);
+			}
+			workingCopy.doSave();
+		}
+	}
+
+	public static boolean isSeparateJREAntBuild(
+			ILaunchConfiguration configuration) {
+		boolean separateJRE = true;
+		try {
+			// always null for same JRE
+			separateJRE = configuration.getAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
+					(String) null) != null;
+		} catch (CoreException e) {
+			AntLaunching.log(AntCoreModelMessages.AntUtil_2, e);
+		}
+
+		return separateJRE;
+	}
+
+	public static void linkBuildFailedMessage(String message, IProcess process) {
+		String fileName = null;
+		String lineNumber = ""; //$NON-NLS-1$
+		int fileStart = 0;
+		int index = message.indexOf("xml"); //$NON-NLS-1$
+		if (index > 0) {
+			int numberStart = index + 4;
+			int numberEnd = message.indexOf(':', numberStart);
+			int fileEnd = index + 3;
+			if (numberStart > 0 && fileEnd > 0) {
+				fileName = message.substring(fileStart, fileEnd).trim();
+				if (numberEnd > 0) {
+					lineNumber = message.substring(numberStart, numberEnd)
+							.trim();
+				}
+			}
+		}
+
+		if (fileName != null) {
+			int num = -1;
+			try {
+				num = Integer.parseInt(lineNumber);
+			} catch (NumberFormatException e) {
+			}
+			IFile[] files = ResourcesPlugin.getWorkspace().getRoot()
+					.findFilesForLocation(new Path(fileName));
+			IFile file = null;
+			if (files.length > 0) {
+				file = files[0];
+			}
+			if (file != null && file.exists()) {
+				if (process != null) {
+					ILaunch launch = null;
+					if (process instanceof RemoteAntRuntimeProcess) {
+						launch = ((RemoteAntRuntimeProcess) process)
+								.getLaunch();
+					} else if (process instanceof AntProcess) {
+						launch = ((AntProcess) process).getLaunch();
+					}
+					if (launch != null) {
+						((AntLaunch) launch).addLinkDescriptor(message,
+								fileName, num, 0, message.length());
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Returns whether the given configuration should be launched in the background.
+	 * When unspecified, the default value for an Ant launch configuration is <code>true</code>.
+	 * 
+	 * @param configuration the configuration
+	 * @return whether the configuration is configured to launch in the background
+	 */
+	public static boolean isLaunchInBackground(ILaunchConfiguration configuration) {
+		boolean launchInBackground= true;
+		try {
+			launchInBackground= configuration.getAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
+		} catch (CoreException ce) {
+			AntLaunching.log(ce);
+		}
+		return launchInBackground;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java
new file mode 100644
index 0000000..9acd581
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/IAntLaunchingPreferenceConstants.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+/**
+ * Constants used to identify user preferences.
+ */
+public interface IAntLaunchingPreferenceConstants {
+
+	 /**
+     * int preference identifier constant which specifies the length of time to wait
+     * to connect with the socket that communicates with the separate JRE to capture the output
+     */
+    public static final String ANT_COMMUNICATION_TIMEOUT= "timeout"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java
new file mode 100644
index 0000000..baba206
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/LinkDescriptor.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching;
+
+/**
+ * Stores detailed data of Link. Used to create linked messages.
+ */
+public class LinkDescriptor {
+	String line;
+	String fileName;
+	int lineNumber;
+	int offset;
+	int length;
+
+	public LinkDescriptor(String line, String fileName, int lineNumber,
+			int offset, int length) {
+		super();
+		this.line = line;
+		this.fileName = fileName;
+		this.lineNumber = lineNumber;
+		this.offset = offset;
+		this.length = length;
+	}
+
+	public String getLine() {
+		return line;
+	}
+
+	public void setLine(String line) {
+		this.line = line;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+	public int getLineNumber() {
+		return lineNumber;
+	}
+
+	public void setLineNumber(int lineNumber) {
+		this.lineNumber = lineNumber;
+	}
+
+	public int getOffset() {
+		return offset;
+	}
+
+	public void setOffset(int offset) {
+		this.offset = offset;
+	}
+
+	public int getLength() {
+		return length;
+	}
+
+	public void setLength(int length) {
+		this.length = length;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java
new file mode 100644
index 0000000..396c1c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.java
@@ -0,0 +1,23 @@
+/**********************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntDebugMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.debug.AntDebugMessages";//$NON-NLS-1$
+    
+	public static String AntSourceContainer_0;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, AntDebugMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties
new file mode 100644
index 0000000..78c11d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntDebugMessages.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+AntSourceContainer_0=Ant Source Container
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java
new file mode 100644
index 0000000..579b66f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceContainer.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
+import org.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer;
+import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
+
+public class AntSourceContainer extends AbstractSourceContainer {
+
+	private IWorkspaceRoot fRoot;
+
+	public AntSourceContainer() {
+		fRoot = ResourcesPlugin.getWorkspace().getRoot();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#findSourceElements(java.lang.String)
+	 */
+	public Object[] findSourceElements(String path) throws CoreException {
+		ArrayList sources = new ArrayList();
+		File osFile = new File(path);
+		if (osFile.exists()) {
+			try {
+				IPath canonicalPath = new Path(osFile.getCanonicalPath());
+				IFile[] files = fRoot.findFilesForLocation(canonicalPath);
+				if (files.length > 0) {
+					for (int i = 0; i < files.length; i++) {
+						sources.add(files[i]);
+					}
+				} else {
+					sources.add(new LocalFileStorage(osFile));
+				}
+			} catch (IOException e) {
+			}
+		}
+		return sources.toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getName()
+	 */
+	public String getName() {
+		return AntDebugMessages.AntSourceContainer_0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getType()
+     * Not persisted via the launch configuration
+	 */
+	public ISourceContainerType getType() {
+		return null;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java
new file mode 100644
index 0000000..e0de3dd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupDirector.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
+import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
+
+/**
+ * Ant source lookup director. For Ant source lookup there is one source
+ * lookup participant. 
+ */
+public class AntSourceLookupDirector extends AbstractSourceLookupDirector {
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
+	 */
+	public void initializeParticipants() {
+		addParticipants(new ISourceLookupParticipant[]{new AntSourceLookupParticipant()});
+	}
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IPersistableSourceLocator#getMemento()
+     */
+    public String getMemento() throws CoreException {
+        return null;
+    }
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java
new file mode 100644
index 0000000..73e0409
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourceLookupParticipant.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
+
+/**
+ * The Ant source lookup participant knows how to translate a 
+ * Ant stack frame into a source file name 
+ */
+public class AntSourceLookupParticipant extends AbstractSourceLookupParticipant {
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant#getSourceName(java.lang.Object)
+	 */
+	public String getSourceName(Object object) throws CoreException {
+		if (object instanceof AntStackFrame) {
+			return ((AntStackFrame)object).getFilePath();
+		}
+        if (object instanceof String) {
+            // assume it's a file name
+            return (String)object;
+        }
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java
new file mode 100644
index 0000000..67e216f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/AntSourcePathComputerDelegate.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
+
+/**
+ * Computes the default source lookup path for an Ant launch configuration.
+ * The default source lookup is a container that knows how to map the 
+ * fully qualified file system paths to either the <code>IFile</code> within the workspace or
+ * a <code>LocalFileStorage</code> for buildfiles not in the workspace.
+ */
+public class AntSourcePathComputerDelegate implements ISourcePathComputerDelegate {
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		return new ISourceContainer[] {new AntSourceContainer()};
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java
new file mode 100644
index 0000000..c53e121
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugConstants.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug;
+
+public interface IAntDebugConstants {
+	
+	/**
+	 * Unique identifier for the Ant debug model (value 
+	 * <code>org.eclipse.ant.ui.debug</code>).
+	 */
+	public static final String ID_ANT_DEBUG_MODEL = "org.eclipse.ant.ui.debug"; //$NON-NLS-1$
+	
+	/**
+	 * Unique identifier for the Ant line breakpoint markers 
+	 * (value <code>org.eclipse.ant.ui.antLineBreakpointMarker</code>).
+	 */
+	public static final String ID_ANT_LINE_BREAKPOINT_MARKER= "org.eclipse.ant.ui.antLineBreakpointMarker"; //$NON-NLS-1$
+    
+    /**
+     * Unique identifier for the Ant run to line breakpoints 
+     * (value <code>org.eclipse.ant.ui.runToLineBreakpoint</code>).
+     */
+    public static final String ANT_RUN_TO_LINE= "org.eclipse.ant.ui.runToLineBreakpoint"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugController.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugController.java
new file mode 100644
index 0000000..abeac52
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/IAntDebugController.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug;
+
+import org.eclipse.debug.core.model.IBreakpoint;
+
+public interface IAntDebugController {
+	
+    /**
+     * Resume the Ant build
+     */
+	public void resume();
+    
+    /**
+     * Suspend the Ant build
+     */
+	public void suspend();
+    
+     /**
+     * Step into the current Ant task
+     */
+	public void stepInto();
+    
+     /**
+     * Step over the current Ant task
+     */
+	public void stepOver();
+    
+    /**
+     * The provided breakpoint has been added or removed depending on the <code>added</code> parameter.
+     * Updates the controller for this change.
+     * 
+     * @param breakpoint the breakpoint that has been added or removed
+     * @param added whether or not the breakpoint has been added 
+     */
+	public void handleBreakpoint(IBreakpoint breakpoint, boolean added);
+    
+     /**
+     * Retrieve the properties of the Ant build.
+     * May occur asynchronously depending on implementation.
+     */
+	public void getProperties();
+    
+    /**
+     * Retrieve the stack frames of the Ant build.
+     * May occur asynchronously depending on implementation.
+     */
+	public void getStackFrames();
+
+	/**
+	 * Some strings are escaped when marshalled for socket communication.
+	 * The Ant debug controller will properly unescape these Strings if required.
+	 * 
+	 * @param value The buffer of the string to unescape
+	 * @return The unescaped string
+	 */
+	public StringBuffer unescapeString(StringBuffer value);
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java
new file mode 100644
index 0000000..07a9528
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugElement.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.DebugElement;
+
+/**
+ * Common function of Ant debug model elements
+ */
+public abstract class AntDebugElement extends DebugElement {
+	
+	/**
+	 * Constructs a new debug element contained in the given
+	 * debug target.
+	 * 
+	 * @param target debug target
+	 */
+	public AntDebugElement(AntDebugTarget target) {
+		super(target);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
+	 */
+	public String getModelIdentifier() {
+		return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+	}
+    
+	/**
+     * Throws a debug exception with the given message, error code, and underlying
+     * exception.
+     */
+    protected void throwDebugException(String message) throws DebugException {
+        throw new DebugException(new Status(IStatus.ERROR, AntLaunching.getUniqueIdentifier(),
+            DebugException.TARGET_REQUEST_FAILED, message, null));
+    }
+    
+    protected AntDebugTarget getAntDebugTarget() {
+        return (AntDebugTarget)super.getDebugTarget();
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugTarget.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugTarget.java
new file mode 100644
index 0000000..855971d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntDebugTarget.java
@@ -0,0 +1,463 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.ant.internal.launching.debug.IAntDebugController;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.IBreakpointManagerListener;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IMemoryBlock;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IThread;
+
+/**
+ * Ant Debug Target
+ */
+public class AntDebugTarget extends AntDebugElement implements IDebugTarget, IDebugEventSetListener, IBreakpointManagerListener {
+	
+	// associated system process (Ant Build)
+	private IProcess fProcess;
+	
+	// containing launch object
+	private ILaunch fLaunch;
+	
+	// Build file name
+	private String fName;
+
+	// suspend state
+	private boolean fSuspended= false;
+	
+	// terminated state
+	private boolean fTerminated= false;
+	
+	// threads
+	private AntThread fThread;
+	private IThread[] fThreads;
+	
+	private IAntDebugController fController;
+    
+    private List fRunToLineBreakpoints;
+
+	/**
+	 * Constructs a new debug target in the given launch for the 
+	 * associated Ant build process.
+	 * 
+	 * @param launch containing launch
+	 * @param process Ant build process
+	 * @param controller the controller to communicate to the Ant build
+	 */
+	public AntDebugTarget(ILaunch launch, IProcess process, IAntDebugController controller) {
+		super(null);
+		fLaunch = launch;
+		fProcess = process;
+		
+		fController= controller;
+		
+		fThread = new AntThread(this);
+		fThreads = new IThread[] {fThread};
+        
+        DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener(this);
+		DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
+        DebugPlugin.getDefault().addDebugEventListener(this);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugTarget#getProcess()
+	 */
+	public IProcess getProcess() {
+		return fProcess;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugTarget#getThreads()
+	 */
+	public IThread[] getThreads() {
+		return fThreads;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugTarget#hasThreads()
+	 */
+	public boolean hasThreads() throws DebugException {
+		return !fTerminated && fThreads.length > 0;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugTarget#getName()
+	 */
+	public String getName() throws DebugException {
+		if (fName == null) {
+			try {
+				fName= getLaunch().getLaunchConfiguration().getAttribute(IExternalToolConstants.ATTR_LOCATION, DebugModelMessages.AntDebugTarget_0);
+				fName= VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fName);
+			} catch (CoreException e) {
+				fName = DebugModelMessages.AntDebugTarget_0;
+			}
+		}
+		return fName;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)
+	 */
+	public boolean supportsBreakpoint(IBreakpoint breakpoint) {
+		if (breakpoint.getModelIdentifier().equals(IAntDebugConstants.ID_ANT_DEBUG_MODEL)) {
+		    //need to consider all breakpoints as no way to tell which set
+		    //of buildfiles will be executed (ant task)
+		    return true;
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
+	 */
+	public IDebugTarget getDebugTarget() {
+		return this;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
+	 */
+	public ILaunch getLaunch() {
+		return fLaunch;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
+	 */
+	public boolean canTerminate() {
+		return !fTerminated;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
+	 */
+	public boolean isTerminated() {
+		return fTerminated;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
+	 */
+	public void terminate() throws DebugException {
+	    terminated();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
+	 */
+	public boolean canResume() {
+		return !isTerminated() && isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
+	 */
+	public boolean canSuspend() {
+		return !isTerminated() && !isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
+	 */
+	public boolean isSuspended() {
+		return fSuspended;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
+	 */
+	public void resume() throws DebugException {
+	    fSuspended= false;
+	    fController.resume();
+	}
+	
+	/**
+	 * Notification the target has suspended for the given reason
+	 * 
+	 * @param detail reason for the suspend
+	 */
+	public void suspended(int detail) {
+		fSuspended = true;
+		fThread.setStepping(false);
+		fThread.fireSuspendEvent(detail);
+	}	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
+	 */
+	public void suspend() throws DebugException {
+		fController.suspend();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
+	 */
+	public void breakpointAdded(IBreakpoint breakpoint) {
+		fController.handleBreakpoint(breakpoint, true);
+        if (breakpoint instanceof AntLineBreakpoint) {
+            if (((AntLineBreakpoint) breakpoint).isRunToLine()) {
+                if (fRunToLineBreakpoints == null) {
+                    fRunToLineBreakpoints= new ArrayList();
+                }
+                fRunToLineBreakpoints.add(breakpoint);
+            }
+        }
+	}
+
+    /* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
+	 */
+	public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
+		fController.handleBreakpoint(breakpoint, false);
+        if (fRunToLineBreakpoints != null) {
+            if (fRunToLineBreakpoints.remove(breakpoint) && fRunToLineBreakpoints.isEmpty()) {
+                fRunToLineBreakpoints= null;
+            }
+        }
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
+	 */
+	public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
+		if (supportsBreakpoint(breakpoint)) {
+			try {
+				if (breakpoint.isEnabled() && DebugPlugin.getDefault().getBreakpointManager().isEnabled()) {
+					breakpointAdded(breakpoint);
+				} else {
+					breakpointRemoved(breakpoint, null);
+				}
+			} catch (CoreException e) {
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDisconnect#canDisconnect()
+	 */
+	public boolean canDisconnect() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDisconnect#disconnect()
+	 */
+	public void disconnect() throws DebugException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IDisconnect#isDisconnected()
+	 */
+	public boolean isDisconnected() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval()
+	 */
+	public boolean supportsStorageRetrieval() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
+	 */
+	public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
+		return null;
+	}
+
+	/**
+	 * Notification we have connected to the Ant build logger and it has started.
+	 * Resume the build.
+	 */
+	public void buildStarted() {
+		fireCreationEvent();
+		installDeferredBreakpoints();
+		try {
+			resume();
+		} catch (DebugException e) {
+		}
+	}
+	
+	/**
+	 * Install breakpoints that are already registered with the breakpoint
+	 * manager if the breakpoint manager is enabled and the breakpoint is enabled.
+	 */
+	private void installDeferredBreakpoints() {
+		IBreakpointManager manager= DebugPlugin.getDefault().getBreakpointManager();
+		if (!manager.isEnabled()) {
+			return;
+		}
+		IBreakpoint[] breakpoints = manager.getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+		for (int i = 0; i < breakpoints.length; i++) {
+            IBreakpoint breakpoint= breakpoints[i];
+            try {
+                if (breakpoint.isEnabled()) {
+                    breakpointAdded(breakpoints[i]);
+                }
+            } catch (CoreException e) {
+            }
+		}
+	}
+	
+	/**
+	 * Called when this debug target terminates.
+	 */
+	public void terminated() {
+		fThreads= new IThread[0];
+		fTerminated = true;
+		fSuspended = false;
+		if (DebugPlugin.getDefault() != null) {
+			DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
+			DebugPlugin.getDefault().removeDebugEventListener(this);
+			DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener(this);
+		}
+		if (!getProcess().isTerminated()) {
+		    try {
+                fProcess.terminate();
+                resume();
+		    } catch (DebugException e) {       
+		    }
+		}
+		if (DebugPlugin.getDefault() != null) {
+			fireTerminateEvent();
+		}
+	}
+	
+	/**
+	 * Single step the Ant build.
+	 * 
+	 * @throws DebugException if the request fails
+	 */
+	public void stepOver() {
+	    fSuspended= false;
+		fController.stepOver();
+	}
+	
+	/**
+	 * Step-into the Ant build.
+	 * 
+	 * @throws DebugException if the request fails
+	 */
+	public void stepInto() {
+	    fSuspended= false;
+	    fController.stepInto();
+	}
+	
+	/**
+	 * Notification a breakpoint was encountered. Determine
+	 * which breakpoint was hit and fire a suspend event.
+	 * 
+	 * @param event debug event
+	 */
+	public void breakpointHit(String event) {
+		// determine which breakpoint was hit, and set the thread's breakpoint
+		String[] datum= event.split(DebugMessageIds.MESSAGE_DELIMITER);
+		String fileName= datum[1];
+		int lineNumber = Integer.parseInt(datum[2]);
+		IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+        boolean found= false;
+		for (int i = 0; i < breakpoints.length; i++) {
+           ILineBreakpoint lineBreakpoint = (ILineBreakpoint)breakpoints[i];
+           if (setThreadBreakpoint(lineBreakpoint, lineNumber, fileName)) {
+               found= true;
+               break;
+           }
+		}
+        if (!found && fRunToLineBreakpoints != null) {
+            Iterator iter= fRunToLineBreakpoints.iterator();
+            while (iter.hasNext()) {
+                ILineBreakpoint lineBreakpoint = (ILineBreakpoint) iter.next();
+                if (setThreadBreakpoint(lineBreakpoint, lineNumber, fileName)) {
+                    break;
+                }
+            }
+        }
+		suspended(DebugEvent.BREAKPOINT);
+	}	
+    
+    private boolean setThreadBreakpoint(ILineBreakpoint lineBreakpoint, int lineNumber, String fileName) {
+        try {
+            if (lineBreakpoint.getLineNumber() == lineNumber && 
+                    fileName.equals(lineBreakpoint.getMarker().getResource().getLocation().toOSString())) {
+                fThread.setBreakpoints(new IBreakpoint[]{lineBreakpoint});
+                return true;
+            }
+        } catch (CoreException e) {
+        }
+        return false;
+    }
+	
+    public void breakpointHit (IBreakpoint breakpoint) {
+        fThread.setBreakpoints(new IBreakpoint[]{breakpoint});
+        suspended(DebugEvent.BREAKPOINT);
+    }
+    
+	public void getStackFrames() {
+		fController.getStackFrames();
+	}
+	
+	public void getProperties() {
+		fController.getProperties();
+	}
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
+     */
+    public void handleDebugEvents(DebugEvent[] events) {
+        for (int i = 0; i < events.length; i++) {
+            DebugEvent event = events[i];
+            if (event.getKind() == DebugEvent.TERMINATE && event.getSource().equals(fProcess)) {
+                terminated();
+            }
+        }
+    }
+    
+    /**
+     * When the breakpoint manager disables, remove all registered breakpoints
+     * requests from the VM. When it enables, reinstall them.
+     *
+     * @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
+     */
+    public void breakpointManagerEnablementChanged(boolean enabled) {
+        IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+        for (int i = 0; i < breakpoints.length; i++) {
+            IBreakpoint breakpoint = breakpoints[i];
+            if (enabled) {
+                breakpointAdded(breakpoint);
+            } else {
+                breakpointRemoved(breakpoint, null);
+            }
+        }
+    }
+
+	public IAntDebugController getAntDebugController() {
+		return fController;
+	}   
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java
new file mode 100644
index 0000000..2a96b5b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntLineBreakpoint.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import com.ibm.icu.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.LineBreakpoint;
+
+/**
+ * Ant line breakpoint
+ */
+public class AntLineBreakpoint extends LineBreakpoint {
+	
+	/**
+	 * Default constructor is required for the breakpoint manager
+	 * to re-create persisted breakpoints. After instantiating a breakpoint,
+	 * the <code>setMarker(...)</code> method is called to restore
+	 * this breakpoint's attributes.
+	 */
+	public AntLineBreakpoint() {
+	}
+	
+	/**
+	 * Constructs a line breakpoint on the given resource at the given
+	 * line number. The line number is 1-based (i.e. the first line of a
+	 * file is line number 1).
+	 * 
+	 * @param resource file on which to set the breakpoint
+	 * @param lineNumber 1-based line number of the breakpoint
+	 * @throws CoreException if unable to create the breakpoint
+	 */
+	public AntLineBreakpoint(IResource resource, int lineNumber) throws CoreException {
+	    this(resource, lineNumber, new HashMap(), true);
+	}
+	
+	/**
+	 * Constructs a line breakpoint on the given resource at the given
+	 * line number. The line number is 1-based (i.e. the first line of a
+	 * file is line number 1).
+	 * 
+	 * @param resource file on which to set the breakpoint
+	 * @param lineNumber 1-based line number of the breakpoint
+	 * @param attributes the marker attributes to set
+	 * @param register whether to add this breakpoint to the breakpoint manager
+	 * @throws CoreException if unable to create the breakpoint
+	 */
+	public AntLineBreakpoint(final IResource resource, final int lineNumber, final Map attributes, final boolean register) throws CoreException {
+	    IWorkspaceRunnable wr= new IWorkspaceRunnable() {
+			public void run(IProgressMonitor monitor) throws CoreException {
+			    IMarker marker = resource.createMarker(IAntDebugConstants.ID_ANT_LINE_BREAKPOINT_MARKER);
+			    setMarker(marker);
+			    attributes.put(IBreakpoint.ENABLED, Boolean.TRUE);
+			    attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));
+			    attributes.put(IBreakpoint.ID, IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+                attributes.put(IMarker.MESSAGE, MessageFormat.format(DebugModelMessages.AntLineBreakpoint_0, new String[] {Integer.toString(lineNumber)}));
+			    ensureMarker().setAttributes(attributes);
+                
+                register(register);
+			}
+	    };
+	    run(getMarkerRule(resource), wr);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
+	 */
+	public String getModelIdentifier() {
+		return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+	}
+
+    /**
+     * @return whether this breakpoint is a run to line breakpoint
+     */
+    public boolean isRunToLine() {
+        try {
+            return ensureMarker().getAttribute(IAntDebugConstants.ANT_RUN_TO_LINE, false);
+        } catch (DebugException e) {
+           return false;
+        }
+    }
+    
+    /**
+     * Add this breakpoint to the breakpoint manager,
+     * or sets it as unregistered.
+     */
+    private void register(boolean register) throws CoreException {
+        if (register) {
+            DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(this);
+        } else {
+            setRegistered(false);
+        }
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java
new file mode 100644
index 0000000..4f93fec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperties.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntProperties extends AntDebugElement implements IVariable {
+	
+	private IValue fValue;
+	private String fName;
+    private boolean fValid= true;
+
+	public AntProperties(AntDebugTarget target, String name) {
+		super(target);
+		fName= name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IVariable#getValue()
+	 */
+	public synchronized IValue getValue() throws DebugException {
+        int attempts= 0;
+        while (!fValid && !getDebugTarget().isTerminated()) {
+            try {
+                wait(50);
+            } catch (InterruptedException e) {
+            }
+            if (attempts == 20 && !fValid && !getDebugTarget().isTerminated()) {
+                throwDebugException(DebugModelMessages.AntProperties_1);
+            }
+            attempts++;
+        }
+ 		return fValue;
+	}
+    
+    public IValue getLastValue() {
+        return fValue;
+    }
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IVariable#getName()
+	 */
+	public String getName() {
+		return fName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
+	 */
+	public String getReferenceTypeName() {
+		return ""; //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
+	 */
+	public boolean hasValueChanged() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
+	 */
+	public void setValue(String expression) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
+	 */
+	public void setValue(IValue value) {
+		fValue= value;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
+	 */
+	public boolean supportsValueModification() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
+	 */
+	public boolean verifyValue(String expression) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
+	 */
+	public boolean verifyValue(IValue value) {
+		return false;
+	}
+
+    public synchronized void setValid(boolean valid) {
+        fValid= valid;        
+        notifyAll();
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java
new file mode 100644
index 0000000..2ec303c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntPropertiesValue.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au) - bug 154907
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntPropertiesValue extends AntDebugElement implements IValue {
+	
+	private List fProperties= new ArrayList();
+	
+	public AntPropertiesValue(AntDebugTarget target) {
+		super(target);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
+	 */
+	public String getReferenceTypeName() {
+		return ""; //$NON-NLS-1$
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValue#getValueString()
+	 */
+	public String getValueString() {
+		return ""; //$NON-NLS-1$
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValue#isAllocated()
+	 */
+	public boolean isAllocated() {
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValue#getVariables()
+	 */
+	public IVariable[] getVariables() {
+		Collections.sort(fProperties);
+		return (IVariable[])fProperties.toArray(new IVariable[fProperties.size()]);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IValue#hasVariables()
+	 */
+	public boolean hasVariables() {
+		return true;
+	}
+	
+	protected void addProperties(List properties) {
+		fProperties.addAll(properties);
+	}
+
+	public List getProperties() {
+		return fProperties;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java
new file mode 100644
index 0000000..9a699da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntProperty.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au) - bug 154907
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+/**
+ * A property in an Ant build.
+ */
+public class AntProperty extends AntDebugElement implements IVariable, Comparable {
+
+	private String fName;
+	private AntValue fValue;
+    private String fLabel;
+	
+	/**
+	 * Constructs a variable associated with the debug target
+	 * with the given name and value.
+	 * 
+	 * @param target the debug target
+	 * @param name property name
+	 * @param value property value
+	 */
+	public AntProperty(AntDebugTarget target, String name, String value) {
+		super(target);
+		fName = name;
+		fValue= new AntValue(target, value);
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IVariable#getValue()
+	 */
+	public IValue getValue() {
+		return fValue;
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IVariable#getName()
+	 */
+	public String getName() {
+		return fName;
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
+	 */
+	public String getReferenceTypeName() {
+		return ""; //$NON-NLS-1$
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
+	 */
+	public boolean hasValueChanged() {
+		return false;
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
+	 */
+	public void setValue(String expression) {
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
+	 */
+	public void setValue(IValue value) {
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
+	 */
+	public boolean supportsValueModification() {
+		return false;
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
+	 */
+	public boolean verifyValue(String expression) {
+		return false;
+	}
+	
+	/*
+	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
+	 */
+	public boolean verifyValue(IValue value) {
+		return false;
+	}
+
+    /**
+     * @return the text used to render this property
+     */
+    public String getText() {
+        if (fLabel == null) {
+            StringBuffer buffer= new StringBuffer(getName());
+            buffer.append("= "); //$NON-NLS-1$
+            buffer.append(fValue.getValueString());          
+            fLabel=  buffer.toString();
+        } 
+        return fLabel;
+    }
+    
+    /*
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    public int compareTo(Object other) {
+    	AntProperty otherProperty = (AntProperty) other;
+    	return fName.compareToIgnoreCase(otherProperty.getName());
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java
new file mode 100644
index 0000000..a72a712
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntStackFrame.java
@@ -0,0 +1,314 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IRegisterGroup;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.core.model.IVariable;
+
+/**
+ * Ant stack frame.
+ */
+public class AntStackFrame extends AntDebugElement implements IStackFrame {
+	
+	private AntThread fThread;
+	private String fName;
+	private int fLineNumber;
+	private String fFilePath;
+	private int fId;
+    private String fFullPath;
+	
+	/**
+	 * Constructs a stack frame in the given thread with the given id.
+	 * 
+	 * @param antThread
+	 * @param id stack frame id (0 is the top of the stack)
+	 */
+	public AntStackFrame(AntThread antThread, int id, String name, String fullPath, int lineNumber) {
+		super((AntDebugTarget) antThread.getDebugTarget());
+		fId = id;
+		fThread = antThread;
+		fLineNumber= lineNumber;
+		fName= name;
+		setFilePath(fullPath);
+	}
+	
+	public void setId(int id) {
+		fId= id;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getThread()
+	 */
+	public IThread getThread() {
+		return fThread;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
+	 */
+	public IVariable[] getVariables() throws DebugException {
+	   return fThread.getVariables();
+	}
+
+    /* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
+	 */
+	public boolean hasVariables() {
+		return isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
+	 */
+	public int getLineNumber() {
+		return fLineNumber;
+	}
+	
+	public void setLineNumber(int lineNumber) {
+		fLineNumber= lineNumber;
+	}
+	
+	public void setFilePath(String fullPath) {
+        fFullPath= fullPath;
+        IFile file= AntLaunchingUtil.getFileForLocation(fullPath, null);
+        if (file != null) {
+            fFilePath= file.getProjectRelativePath().toString();
+        } else {
+            fFilePath= new Path(fullPath).lastSegment();
+        }
+	}
+	
+	public String getFilePath() {
+		return fFullPath;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
+	 */
+	public int getCharStart() {
+		return -1;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
+	 */
+	public int getCharEnd() {
+		return -1;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getName()
+	 */
+	public String getName() {
+		return fName;
+	}
+	
+	public void setName(String name) {
+		fName= name;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
+	 */
+	public IRegisterGroup[] getRegisterGroups() {
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
+	 */
+	public boolean hasRegisterGroups() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepInto()
+	 */
+	public boolean canStepInto() {
+		return getThread().canStepInto();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepOver()
+	 */
+	public boolean canStepOver() {
+		return getThread().canStepOver();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepReturn()
+	 */
+	public boolean canStepReturn() {
+		return getThread().canStepReturn();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#isStepping()
+	 */
+	public boolean isStepping() {
+		return getThread().isStepping();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepInto()
+	 */
+	public void stepInto() throws DebugException {
+		getThread().stepInto();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepOver()
+	 */
+	public void stepOver() throws DebugException {
+		getThread().stepOver();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepReturn()
+	 */
+	public void stepReturn() throws DebugException {
+		getThread().stepReturn();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
+	 */
+	public boolean canResume() {
+		return getThread().canResume();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
+	 */
+	public boolean canSuspend() {
+		return getThread().canSuspend();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
+	 */
+	public boolean isSuspended() {
+		return getThread().isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
+	 */
+	public void resume() throws DebugException {
+		getThread().resume();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
+	 */
+	public void suspend() throws DebugException {
+		getThread().suspend();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
+	 */
+	public boolean canTerminate() {
+		return getThread().canTerminate();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
+	 */
+	public boolean isTerminated() {
+		return getThread().isTerminated();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
+	 */
+	public void terminate() throws DebugException {
+		getThread().terminate();
+	}
+	
+	/**
+	 * Returns the name of the buildfile this stack frame is associated
+	 * with.
+	 * 
+	 * @return the name of the buildfile this stack frame is associated
+	 * with
+	 */
+	public String getSourceName() {
+		return fFilePath;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (obj instanceof AntStackFrame) {
+			AntStackFrame sf = (AntStackFrame)obj;
+			if (getSourceName() != null) {
+				return getSourceName().equals(sf.getSourceName()) &&
+					sf.getLineNumber() == getLineNumber() &&
+					sf.fId == fId;
+			} 
+			return sf.fId == fId;
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+	    if (getSourceName() == null) {
+	        return fId;
+	    }
+	    return getSourceName().hashCode() + fId;
+	}
+	
+	/**
+	 * Returns this stack frame's unique identifier within its thread
+	 * 
+	 * @return this stack frame's unique identifier within its thread
+	 */
+	protected int getIdentifier() {
+		return fId;
+	}
+    
+    /**
+     * Returns the system, user or runtime property
+     * name, or <code>null</code> if unable to resolve a property with the name.
+     *
+     * @param propertyName the name of the variable to search for
+     * @return a property, or <code>null</code> if none
+     */
+    public AntProperty findProperty(String propertyName) {
+        try {
+            IVariable[] groups= getVariables();
+            for (int i = 0; i < groups.length; i++) {
+                AntProperties propertiesGrouping = (AntProperties) groups[i];
+                AntPropertiesValue value= (AntPropertiesValue) propertiesGrouping.getValue();
+                IVariable[] properties= value.getVariables();
+                for (int j = 0; j < properties.length; j++) {
+                    AntProperty property = (AntProperty) properties[j];
+                    if (property.getName().equals(propertyName)) {
+                        return property;
+                    }
+                }
+            }
+        } catch (DebugException e) {
+        }
+        return null;
+    } 
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntThread.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntThread.java
new file mode 100644
index 0000000..a3f5eeb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntThread.java
@@ -0,0 +1,479 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.core.model.IVariable;
+
+/**
+ * An Ant build thread.
+ */
+public class AntThread extends AntDebugElement implements IThread {
+	
+	/**
+	 * Breakpoints this thread is suspended at or <code>null</code>
+	 * if none.
+	 */
+	private IBreakpoint[] fBreakpoints;
+	
+	/**
+	 * The stackframes associated with this thread
+	 */
+	private List fFrames= new ArrayList(1);
+	
+	/**
+	 * The stackframes to be reused on suspension
+	 */
+	private List fOldFrames;
+	
+	/**
+	 * Whether this thread is stepping
+	 */
+	private boolean fStepping = false;
+	
+	private boolean fRefreshProperties= true;
+	
+	/**
+	 * The user properties associated with this thread
+	 */
+	private AntProperties fUserProperties;
+	
+	/**
+	 * The system properties associated with this thread
+	 */
+	private AntProperties fSystemProperties;
+	
+	/**
+	 * The properties set during the build associated with this thread
+	 */
+	private AntProperties fRuntimeProperties;
+    
+    private Object fPropertiesLock= new Object();
+	
+	/**
+	 * Constructs a new thread for the given target
+	 * 
+	 * @param target the Ant Build
+	 */
+	public AntThread(AntDebugTarget target) {
+		super(target);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#getStackFrames()
+	 */
+	public synchronized IStackFrame[] getStackFrames() throws DebugException {
+		if (isSuspended()) {
+			if (fFrames.size() == 0) {
+				getStackFrames0();
+			}
+		} 
+		
+		return (IStackFrame[]) fFrames.toArray(new IStackFrame[fFrames.size()]);
+	}
+	
+	/**
+	 * Retrieves the current stack frames in the thread
+	 * possibly waiting until the frames are populated
+     * 
+	 */
+	private void getStackFrames0() throws DebugException {
+        synchronized (fFrames) {
+    		getAntDebugTarget().getStackFrames();
+            if (fFrames.size() > 0) {
+                //frames set..no need to wait
+                return;
+            }
+            int attempts= 0;
+    		try {
+                while (fFrames.size() == 0 && !isTerminated()) {
+                    fFrames.wait(50);
+                    if (attempts == 20 && fFrames.size() == 0 && !isTerminated()) {
+                        throwDebugException(DebugModelMessages.AntThread_3);
+                    }
+                    attempts++;
+                }
+    		} catch (InterruptedException e) {
+    		}
+        }
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#hasStackFrames()
+	 */
+	public boolean hasStackFrames() throws DebugException {
+		return isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#getPriority()
+	 */
+	public int getPriority() throws DebugException {
+		return 0;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#getTopStackFrame()
+	 */
+	public synchronized IStackFrame getTopStackFrame() throws DebugException {
+		if (isSuspended()) {
+			if (fFrames.size() == 0) {
+				getStackFrames0();
+			}
+			if (fFrames.size() > 0) {
+				return (IStackFrame)fFrames.get(0);
+			}
+		} 
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#getName()
+	 */
+	public String getName() {
+		return "Thread [Ant Build]"; //$NON-NLS-1$
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IThread#getBreakpoints()
+	 */
+	public IBreakpoint[] getBreakpoints() {
+		if (fBreakpoints == null) {
+			return new IBreakpoint[0];
+		}
+		return fBreakpoints;
+	}
+	
+	/**
+	 * Sets the breakpoints this thread is suspended at, or <code>null</code>
+	 * if none.
+	 * 
+	 * @param breakpoints the breakpoints this thread is suspended at, or <code>null</code>
+	 * if none
+	 */
+	protected void setBreakpoints(IBreakpoint[] breakpoints) {
+		fBreakpoints = breakpoints;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
+	 */
+	public boolean canResume() {
+		return isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
+	 */
+	public boolean canSuspend() {
+		return !isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
+	 */
+	public boolean isSuspended() {
+		return getDebugTarget().isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
+	 */
+	public synchronized void resume() throws DebugException {
+		aboutToResume(DebugEvent.CLIENT_REQUEST, false);
+		getDebugTarget().resume();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
+	 */
+	public synchronized void suspend() throws DebugException {
+		getDebugTarget().suspend();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepInto()
+	 */
+	public boolean canStepInto() {
+	    return isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepOver()
+	 */
+	public boolean canStepOver() {
+		return isSuspended();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#canStepReturn()
+	 */
+	public boolean canStepReturn() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#isStepping()
+	 */
+	public boolean isStepping() {
+		return fStepping;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepInto()
+	 */
+	public synchronized void stepInto() throws DebugException {
+	    aboutToResume(DebugEvent.STEP_INTO, true);
+		((AntDebugTarget)getDebugTarget()).stepInto();
+	}
+	
+	private void aboutToResume(int detail, boolean stepping) {
+	    fRefreshProperties= true;
+	    fOldFrames= new ArrayList(fFrames);
+        fFrames.clear();
+        setPropertiesValid(false);
+	    setStepping(stepping);
+	    setBreakpoints(null);
+		fireResumeEvent(detail);
+    }
+
+    private void setPropertiesValid(boolean valid) {
+        if (fUserProperties != null) {
+            fUserProperties.setValid(valid);
+            fSystemProperties.setValid(valid);
+            fRuntimeProperties.setValid(valid);
+        }
+    }
+
+    /* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepOver()
+	 */
+	public synchronized void stepOver() throws DebugException {
+	    aboutToResume(DebugEvent.STEP_OVER, true);
+		((AntDebugTarget)getDebugTarget()).stepOver();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.IStep#stepReturn()
+	 */
+	public synchronized void stepReturn() throws DebugException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
+	 */
+	public boolean canTerminate() {
+		return !isTerminated();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
+	 */
+	public boolean isTerminated() {
+		return getDebugTarget().isTerminated();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
+	 */
+	public void terminate() throws DebugException {
+		fFrames.clear();
+		getDebugTarget().terminate();
+	}
+	
+	/**
+	 * Sets whether this thread is stepping
+	 * 
+	 * @param stepping whether stepping
+	 */
+	protected void setStepping(boolean stepping) {
+		fStepping = stepping;
+	}
+
+    public void buildStack(String data) { 
+        synchronized (fFrames) {
+            String[] strings= data.split(DebugMessageIds.MESSAGE_DELIMITER);
+            //0 STACK message
+            //1 targetName
+            //2 taskName
+            //3 filePath
+            //4 lineNumber
+            //5 ...
+            if (fOldFrames != null && (strings.length - 1)/ 4 != fOldFrames.size()) {
+                fOldFrames= null; //stack size changed..do not preserve
+            }
+            StringBuffer name;
+            String filePath;
+            int lineNumber;
+            int stackFrameId= 0;
+            String taskName;
+            for (int i = 1; i < strings.length; i++) {
+                if (strings[i].length() > 0) {
+                    name= new StringBuffer(strings[i]);
+                    taskName= strings[++i];
+                    if (taskName.length() > 0) {
+                        name.append(": "); //$NON-NLS-1$
+                        name.append(taskName);
+                    }
+                } else {
+                    name= new StringBuffer(strings[++i]);
+                }
+                filePath= strings[++i];
+                lineNumber= Integer.parseInt(strings[++i]);
+                addFrame(stackFrameId++, name.toString(), filePath, lineNumber);
+            }
+            //wake up the call from getStackFrames
+            fFrames.notifyAll();
+        }
+    }
+    
+    private void addFrame(int stackFrameId, String name, String filePath, int lineNumber) {
+    	AntStackFrame frame= getOldFrame();
+    	
+    	if (frame == null || !frame.getFilePath().equals(filePath)) {
+    		frame= new AntStackFrame(this, stackFrameId, name, filePath, lineNumber);
+    	} else {
+    		frame.setFilePath(filePath);
+    		frame.setId(stackFrameId);
+    		frame.setLineNumber(lineNumber);
+    		frame.setName(name);
+    	}
+		fFrames.add(frame);
+    }
+    
+    private AntStackFrame getOldFrame() {
+    	if (fOldFrames == null) {
+    		return null;
+    	}
+    	AntStackFrame frame= (AntStackFrame) fOldFrames.remove(0);
+    	if (fOldFrames.isEmpty()) {
+    		fOldFrames= null;
+    	}
+    	return frame;
+    }
+    
+    public void newProperties(String data) {
+        synchronized (fPropertiesLock) {
+            try {
+                String[] datum= data.split(DebugMessageIds.MESSAGE_DELIMITER);
+                if (fUserProperties == null) {
+                    initializePropertyGroups();
+                }
+
+                List userProperties= ((AntPropertiesValue)fUserProperties.getLastValue()).getProperties();
+                List systemProperties= ((AntPropertiesValue)fSystemProperties.getLastValue()).getProperties();
+                List runtimeProperties= ((AntPropertiesValue)fRuntimeProperties.getLastValue()).getProperties();
+                //0 PROPERTIES message
+                //1 propertyName length
+                //2 propertyName
+                //3 propertyValue length
+                //3 propertyValue
+                //4 propertyType
+                //5 ...
+                if (datum.length > 1) { //new properties
+                    StringBuffer propertyName;
+                    StringBuffer propertyValue;
+                    int propertyNameLength;
+                    int propertyValueLength;
+                    for (int i = 1; i < datum.length; i++) {
+                        propertyNameLength= Integer.parseInt(datum[i]);
+                        propertyName= new StringBuffer(datum[++i]);
+                        while (propertyName.length() != propertyNameLength) {
+                            propertyName.append(DebugMessageIds.MESSAGE_DELIMITER);
+                            propertyName.append(datum[++i]);
+                        }
+
+                        propertyName= getAntDebugTarget().getAntDebugController().unescapeString(propertyName);
+
+                        propertyValueLength= Integer.parseInt(datum[++i]);
+                        if (propertyValueLength == 0 && i + 1 == datum.length) { //bug 81299
+                            propertyValue= new StringBuffer(""); //$NON-NLS-1$
+                        } else {
+                            propertyValue= new StringBuffer(datum[++i]);
+                        }
+                        while (propertyValue.length() != propertyValueLength) {
+                            propertyValue.append(DebugMessageIds.MESSAGE_DELIMITER);
+                            propertyValue.append(datum[++i]);
+                        }
+
+                        propertyValue= getAntDebugTarget().getAntDebugController().unescapeString(propertyValue);
+
+                        int propertyType= Integer.parseInt(datum[++i]);
+                        addProperty(userProperties, systemProperties, runtimeProperties, propertyName.toString(), propertyValue.toString(), propertyType);
+                    }
+                }
+            } finally {
+                fRefreshProperties= false;
+                setPropertiesValid(true);
+                //wake up the call from getVariables
+                fPropertiesLock.notifyAll();
+            }
+        }
+	}
+
+	private void addProperty(List userProperties, List systemProperties, List runtimeProperties, String propertyName, String propertyValue, int propertyType) {
+		AntProperty property= new AntProperty((AntDebugTarget) getDebugTarget(), propertyName, propertyValue);
+		switch (propertyType) {
+			case DebugMessageIds.PROPERTY_SYSTEM:
+				systemProperties.add(property);
+				break;
+			case DebugMessageIds.PROPERTY_USER:
+				userProperties.add(property);
+				break;
+			case DebugMessageIds.PROPERTY_RUNTIME:
+				runtimeProperties.add(property);
+				break;
+		}
+	}
+
+	private void initializePropertyGroups() {
+        AntDebugTarget target= getAntDebugTarget();
+		fUserProperties= new AntProperties(target, DebugModelMessages.AntThread_0);
+		fUserProperties.setValue(new AntPropertiesValue(target));
+		fSystemProperties= new AntProperties(target, DebugModelMessages.AntThread_1);
+		fSystemProperties.setValue(new AntPropertiesValue(target));
+		fRuntimeProperties= new AntProperties(target, DebugModelMessages.AntThread_2);
+		fRuntimeProperties.setValue(new AntPropertiesValue(target));
+	}
+    
+    protected IVariable[] getVariables() throws DebugException {
+        synchronized (fPropertiesLock) {
+            if (fRefreshProperties) {
+                getAntDebugTarget().getProperties();
+                if (fRefreshProperties) { 
+                    //properties have not been set; need to wait
+                    try {
+                        int attempts= 0;
+                        while (fRefreshProperties && !isTerminated()) {
+                            fPropertiesLock.wait(50);
+                            if (attempts == 20 && fRefreshProperties && !isTerminated()) {
+                                throwDebugException(DebugModelMessages.AntThread_4);
+                            }
+                            attempts++;
+                        }
+                    } catch (InterruptedException ie) {
+                    }
+                }
+            }
+            if (fSystemProperties == null) {
+                return new IVariable[0];
+            }
+            return new IVariable[]{fSystemProperties, fUserProperties, fRuntimeProperties};
+        }
+    }
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java
new file mode 100644
index 0000000..2285279
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/AntValue.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IVariable;
+
+public class AntValue extends AntDebugElement implements IValue  {
+
+    private String fValueString;
+    protected static final IVariable[] EMPTY = new IVariable[0];
+    
+    /**
+     * @param target
+     */
+    public AntValue(AntDebugTarget target, String value) {
+        super(target);
+        fValueString= value;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
+     */
+    public String getReferenceTypeName() {
+        return ""; //$NON-NLS-1$
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IValue#getValueString()
+     */
+    public String getValueString() {
+        return fValueString;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IValue#isAllocated()
+     */
+    public boolean isAllocated() {
+        return true;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IValue#getVariables()
+     */
+    public IVariable[] getVariables() {
+        return EMPTY;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IValue#hasVariables()
+     */
+    public boolean hasVariables() {
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
+     */
+    public String getModelIdentifier() {
+        return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java
new file mode 100644
index 0000000..fcc8f3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugMessageIds.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+
+public class DebugMessageIds {
+	
+	public final static String MESSAGE_DELIMITER= ","; //$NON-NLS-1$
+	
+	public final static String BUILD_STARTED=   "build_started"; //$NON-NLS-1$
+	public final static String TARGET_STARTED= "target_started"; //$NON-NLS-1$
+	public final static String TARGET_FINISHED= "target_finished"; //$NON-NLS-1$
+	public final static String TASK_STARTED= "task_started"; //$NON-NLS-1$
+	public final static String TASK_FINISHED= "task_finished"; //$NON-NLS-1$
+	
+	public final static String STEP= "step"; //$NON-NLS-1$
+	public final static String STEP_OVER= "step_over"; //$NON-NLS-1$
+	public final static String STEP_INTO= "step_into"; //$NON-NLS-1$
+	
+	public final static String TERMINATE= "terminate"; //$NON-NLS-1$
+	public final static String TERMINATED= "terminated"; //$NON-NLS-1$
+	public final static String SUSPEND= "suspend"; //$NON-NLS-1$
+	public final static String SUSPENDED= "suspended"; //$NON-NLS-1$
+	public final static String RESUME= "resume"; //$NON-NLS-1$
+	
+	public final static String STACK= "stack"; //$NON-NLS-1$
+	
+	public final static String ADD_BREAKPOINT= "add"; //$NON-NLS-1$
+	public final static String REMOVE_BREAKPOINT= "remove"; //$NON-NLS-1$
+	
+	public final static String CLIENT_REQUEST= "client"; //$NON-NLS-1$
+	public final static String BREAKPOINT= "breakpoint"; //$NON-NLS-1$
+	
+	public final static String PROPERTIES= "prop"; //$NON-NLS-1$
+	public final static String PROPERTY_VALUE= "value"; //$NON-NLS-1$
+	public final static int PROPERTY_USER= 0;
+	public final static int PROPERTY_SYSTEM= 1;
+	public final static int PROPERTY_RUNTIME= 2;
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java
new file mode 100644
index 0000000..acadad6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.java
@@ -0,0 +1,32 @@
+/**********************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.ant.internal.launching.debug.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class DebugModelMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.debug.model.DebugModelMessages";//$NON-NLS-1$
+
+	public static String AntDebugTarget_0;
+
+	public static String AntLineBreakpoint_0;
+	public static String AntThread_0;
+	public static String AntThread_1;
+	public static String AntThread_2;
+    public static String AntThread_3;
+    public static String AntThread_4;
+    
+    public static String AntProperties_1;
+    
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, DebugModelMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties
new file mode 100644
index 0000000..31cf843
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/DebugModelMessages.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2004, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+AntDebugTarget_0=Ant Build
+
+AntLineBreakpoint_0=Ant breakpoint [line: {0}]
+AntThread_0=User Properties
+AntThread_1=System Properties
+AntThread_2=Runtime Properties
+AntThread_3=Request to retrieve Ant stack frames failed
+AntThread_4=Request to retrieve Ant properties failed
+
+AntProperties_1=Request to Ant properties value failed
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/RemoteAntDebugBuildListener.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/RemoteAntDebugBuildListener.java
new file mode 100644
index 0000000..6d86b7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/debug/model/RemoteAntDebugBuildListener.java
@@ -0,0 +1,321 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.debug.model;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.net.Socket;
+import java.net.UnknownHostException;
+
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.debug.IAntDebugController;
+import org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.core.model.IProcess;
+
+public class RemoteAntDebugBuildListener extends RemoteAntBuildListener implements IAntDebugController {
+	
+	// sockets to communicate with the remote Ant debug build logger
+	private Socket fRequestSocket;
+	private PrintWriter fRequestWriter;
+	private BufferedReader fResponseReader;
+	
+	private int fRequestPort= -1;
+	private Thread fReaderThread;
+	
+	private AntDebugTarget fTarget;
+	
+	/**
+	 * Reader thread that processes request responses from the remote Ant debug build logger
+	 */
+	private class ReaderThread extends Thread {
+		public ReaderThread() {
+			super("Ant Request Response Reader Thread"); //$NON-NLS-1$
+			setDaemon(true);
+		}
+
+		public void run(){
+			try { 
+				String message= null; 
+				while (fResponseReader != null) { 
+				    synchronized (RemoteAntDebugBuildListener.this) {
+				        if (fResponseReader != null && (message= fResponseReader.readLine()) != null) {
+				            receiveMessage(message);
+				        }
+				    }
+				} 
+			} catch (IOException ie) { //the other end has shutdown
+				RemoteAntDebugBuildListener.this.shutDown();
+			} catch (Exception e) {
+				AntLaunching.log("Internal error processing remote response", e); //$NON-NLS-1$
+				RemoteAntDebugBuildListener.this.shutDown();
+			}
+		}
+	}	
+	
+	public RemoteAntDebugBuildListener(ILaunch launch) {
+		super(launch);
+		//fDebug= true;
+	}
+	
+	protected void receiveMessage(String message) {
+		if (message.startsWith(DebugMessageIds.BUILD_STARTED)) {
+			buildStarted();
+		} else if (message.startsWith(DebugMessageIds.SUSPENDED)){
+			handleSuspendMessage(message);
+		} else if (message.startsWith(DebugMessageIds.TERMINATED)){
+			fTarget.terminated();
+		} else if (message.startsWith(DebugMessageIds.STACK)){
+			AntThread thread= (AntThread) fTarget.getThreads()[0];
+			thread.buildStack(message);
+		} else if (message.startsWith(DebugMessageIds.PROPERTIES)){
+		    AntThread thread= (AntThread) fTarget.getThreads()[0];
+		    thread.newProperties(message);
+		} else {
+			super.receiveMessage(message);
+		}
+	}
+
+    private void handleSuspendMessage(String message) {
+        if (message.endsWith(DebugMessageIds.CLIENT_REQUEST)) {
+        	fTarget.suspended(DebugEvent.CLIENT_REQUEST);
+        } else if (message.endsWith(DebugMessageIds.STEP)) {
+        	fTarget.suspended(DebugEvent.STEP_END);
+        } else if (message.indexOf(DebugMessageIds.BREAKPOINT) >= 0) {
+        	fTarget.breakpointHit(message);
+        }
+    }
+
+    private void buildStarted() {
+        IProcess process= getProcess();
+        while(process == null) {
+        	try {
+        		synchronized (this) {
+        			wait(400);
+        		}
+        		process= getProcess();
+        	} catch (InterruptedException ie) {
+        	}
+        }
+        fTarget= new AntDebugTarget(fLaunch, process, this);
+        fLaunch.addDebugTarget(fTarget);
+        
+        if (!connectRequest()) {
+			RemoteAntDebugBuildListener.this.shutDown();
+			return;
+        }
+        
+        fTarget.buildStarted();
+    }
+
+    private boolean connectRequest() {
+    	Exception exception= null;
+    	for (int i= 1; i < 20; i++) {
+    		try {
+    			fRequestSocket = new Socket("localhost", fRequestPort); //$NON-NLS-1$
+    			fRequestWriter = new PrintWriter(fRequestSocket.getOutputStream(), true);
+    			fResponseReader = new BufferedReader(new InputStreamReader(fRequestSocket.getInputStream()));
+    			
+    			fReaderThread= new ReaderThread();
+    			fReaderThread.start();
+    			return true;
+    		} catch (UnknownHostException e) {
+    			exception= e;
+    			break;
+    		} catch (IOException e) {
+    			exception= e;
+    		}
+    		try {
+				Thread.sleep(500);
+			} catch(InterruptedException e) {
+			}
+    	}
+    	AntLaunching.log("Internal error attempting to connect to debug target", exception); //$NON-NLS-1$
+    	return false;
+	}
+
+	/**
+	 * Start listening to an Ant build. Start a server connection that
+	 * the RemoteAntDebugBuildLogger can connect to.
+	 * 
+	 * @param eventPort The port number to create the server connection on
+     * @param requestPort The port number to use for sending requests to the remote logger
+	 */
+	public synchronized void startListening(int eventPort, int requestPort) {
+		super.startListening(eventPort);
+		fRequestPort= requestPort;
+	}
+	
+	/**
+	 * Sends a request to the Ant build
+	 * 
+	 * @param request debug command
+	 */
+	protected void sendRequest(String request) {
+		if (fRequestSocket == null) {
+			return;
+		}
+		synchronized (fRequestSocket) {
+			fRequestWriter.println(request);
+		}		
+	}
+	
+	protected synchronized void shutDown() {
+        if (fTarget != null) {
+            fTarget.terminated();
+            fTarget= null;
+        }
+		fLaunch= null;
+		if (DebugPlugin.getDefault() != null) {
+			DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
+		}
+		try {
+			if (fReaderThread != null)   {
+				// interrupt reader thread so that we don't block on close
+				// on a lock held by the BufferedReader
+				// see bug: 38955
+				fReaderThread.interrupt();
+			}
+			if (fResponseReader != null) {
+				fResponseReader.close();
+				fResponseReader= null;
+			}
+		} catch(IOException e) {
+		}	
+		if (fRequestWriter != null) {
+			fRequestWriter.close();
+			fRequestWriter= null;
+		}
+		try{
+			if(fRequestSocket != null) {
+				fRequestSocket.close();
+				fRequestSocket= null;
+			}
+		} catch(IOException e) {
+		}
+		super.shutDown();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#resume()
+	 */
+	public void resume() {
+		sendRequest(DebugMessageIds.RESUME);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#suspend()
+	 */
+	public void suspend() {
+		sendRequest(DebugMessageIds.SUSPEND);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepInto()
+	 */
+	public void stepInto() {
+		sendRequest(DebugMessageIds.STEP_INTO);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepOver()
+	 */
+	public void stepOver() {
+		sendRequest(DebugMessageIds.STEP_OVER);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#handleBreakpoint(IBreakpoint, boolean)
+	 */
+	public void handleBreakpoint(IBreakpoint breakpoint, boolean add) {
+		if (fTarget == null || !fTarget.supportsBreakpoint(breakpoint)) {
+			return;
+		}
+		StringBuffer message= new StringBuffer();
+		if (add) {
+			try {
+				if (!breakpoint.isEnabled()) {
+					return;
+				}
+			} catch (CoreException e) {
+				AntLaunching.log(e);
+				return;
+			}
+			message.append(DebugMessageIds.ADD_BREAKPOINT);
+		} else {
+			message.append(DebugMessageIds.REMOVE_BREAKPOINT);
+		}
+		message.append(DebugMessageIds.MESSAGE_DELIMITER);
+		message.append(breakpoint.getMarker().getResource().getLocation().toOSString());
+		message.append(DebugMessageIds.MESSAGE_DELIMITER);
+		try {
+			message.append(((ILineBreakpoint)breakpoint).getLineNumber());
+			sendRequest(message.toString());
+		} catch (CoreException ce) {
+			AntLaunching.log(ce);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getProperties()
+	 */
+	public void getProperties() {
+		sendRequest(DebugMessageIds.PROPERTIES);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getStackFrames()
+	 */
+	public void getStackFrames() {
+		sendRequest(DebugMessageIds.STACK);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#unescapeString(java.lang.StringBuffer)
+	 */
+	public StringBuffer unescapeString(StringBuffer property) {
+		if (property.indexOf("\\r") == -1 && property.indexOf("\\n") == -1) { //$NON-NLS-1$ //$NON-NLS-2$
+			return property;
+		}
+		for (int i= 0; i < property.length(); i++) {
+			if ('\\' == property.charAt(i)) {
+				String newString= ""; //$NON-NLS-1$
+				if ('r' == property.charAt(i + 1)) {
+					if (i-1 > - 1 && '\\' == property.charAt(i-1)) {
+						newString= "r"; //$NON-NLS-1$
+					} else {
+						newString+= '\r';
+					}
+				} else if ('n' == property.charAt(i + 1)) {
+					if (i-1 > - 1 && '\\' == property.charAt(i-1)) {
+						newString= "n"; //$NON-NLS-1$
+					} else {
+						newString+= '\n';
+					}
+					
+				}
+				if (newString.length() > 0) {
+					property.replace(i, i + 2, newString);
+				}
+			}
+		}
+
+		return property;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java
new file mode 100644
index 0000000..e4f8b36
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntClasspathProvider.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.StandardClasspathProvider;
+
+public class AntClasspathProvider extends StandardClasspathProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathProvider#computeUnresolvedClasspath(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
+		boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
+		if (useDefault) {
+			List rtes = new ArrayList(10);
+			IRuntimeClasspathEntry jreEntry = null;
+			try {
+				jreEntry = JavaRuntime.computeJREEntry(configuration);
+			} catch (CoreException e) {
+				// not a java project
+			}
+			if (jreEntry == null) {
+				jreEntry = JavaRuntime.newRuntimeContainerClasspathEntry(
+						JavaRuntime.newDefaultJREContainerPath(), IRuntimeClasspathEntry.STANDARD_CLASSES);
+			}
+			rtes.add(jreEntry);
+			rtes.add(new AntHomeClasspathEntry());
+			rtes.add(new ContributedClasspathEntriesEntry());
+			return (IRuntimeClasspathEntry[]) rtes.toArray(new IRuntimeClasspathEntry[rtes.size()]);
+		}
+		return super.computeUnresolvedClasspath(configuration);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java
new file mode 100644
index 0000000..1a8a9bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntHomeClasspathEntry.java
@@ -0,0 +1,210 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * A classpath entry that contains a set of archives for a particular
+ * ANT_HOME.
+ * 
+ * @since 3.0 
+ */
+public class AntHomeClasspathEntry extends AbstractRuntimeClasspathEntry {
+	
+	public static final String TYPE_ID = "org.eclipse.ant.ui.classpathentry.antHome"; //$NON-NLS-1$
+	
+	/**
+	 * Local path on disk where Ant Home is located or <code>null</code>
+	 * to indicate the use of the default Ant Home.
+	 */
+	private String antHomeLocation = null;
+	
+	/**
+	 * Creates an AntHome entry for the default AntHome installation.
+	 */
+	public AntHomeClasspathEntry() {
+		antHomeLocation = null;
+	}
+	
+	/**
+	 * Constructs an AntHome entry for the Ant installed at the specified
+	 * root directory.
+	 * 
+	 * @param antHome path in the local file system to an Ant installation
+	 */
+	public AntHomeClasspathEntry(String antHome) {
+		antHomeLocation = antHome;
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry#buildMemento(org.w3c.dom.Document, org.w3c.dom.Element)
+	 */
+	protected void buildMemento(Document document, Element memento) throws CoreException {
+		if (antHomeLocation == null) {
+			memento.setAttribute("default", "true");  //$NON-NLS-1$//$NON-NLS-2$
+		} else {
+			memento.setAttribute("antHome", new Path(antHomeLocation).toString()); //$NON-NLS-1$
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.launching.IRuntimeClasspathEntry2#initializeFrom(org.w3c.dom.Element)
+	 */
+	public void initializeFrom(Element memento) throws CoreException {
+		String antHome = memento.getAttribute("antHome"); //$NON-NLS-1$
+		if (antHome != null && (antHome.length() > 0)) {
+			IPath path = new Path(antHome);
+			antHomeLocation = path.toOSString();
+		} else {
+			antHomeLocation = null;
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getTypeId()
+	 */
+	public String getTypeId() {
+		return TYPE_ID;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getRuntimeClasspathEntries(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
+		List libs = new ArrayList(40);
+		AntCorePreferences preferences = AntCorePlugin.getPlugin().getPreferences();
+		if (antHomeLocation == null) {
+			IAntClasspathEntry[] entries = preferences.getAntHomeClasspathEntries();
+			for (int i = 0; i < entries.length; i++) {
+				IAntClasspathEntry entry = entries[i];
+				libs.add(JavaRuntime.newStringVariableClasspathEntry(entry.getLabel()));
+			}
+		} else {
+			File lib= resolveAntHome();
+			IPath libDir = new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
+			String[] fileNames = lib.list();
+			for (int i = 0; i < fileNames.length; i++) {
+				String name = fileNames[i];
+				IPath path = new Path(name);
+				String fileExtension = path.getFileExtension();
+				if ("jar".equalsIgnoreCase(fileExtension)) { //$NON-NLS-1$
+					libs.add(JavaRuntime.newArchiveRuntimeClasspathEntry(libDir.append(path)));
+				}
+			}
+		}
+		return (IRuntimeClasspathEntry[]) libs.toArray(new IRuntimeClasspathEntry[libs.size()]);
+	}
+	
+	public File resolveAntHome() throws CoreException {
+		if (antHomeLocation == null) { //using the default ant home
+			return null;
+		}
+		IPath libDir= new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
+		File lib= libDir.toFile();
+		File parentDir= lib.getParentFile();
+		if (parentDir == null || !parentDir.exists()) {
+			abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_10, new String[] {antHomeLocation}), null);
+		}
+		if (!lib.exists() || !lib.isDirectory()) {
+			abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_11, new String[] {antHomeLocation}), null);
+		}
+		return lib;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getName()
+	 */
+	public String getName() {
+		if (antHomeLocation == null) {
+			return AntLaunchConfigurationMessages.AntHomeClasspathEntry_8;
+		}
+		return MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_9, new String[]{antHomeLocation});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry#getType()
+	 */
+	public int getType() {
+		return IRuntimeClasspathEntry.OTHER;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
+	 */
+	public boolean isComposite() {
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		return obj instanceof AntHomeClasspathEntry &&
+		  equalsOrNull(antHomeLocation, ((AntHomeClasspathEntry)obj).antHomeLocation);
+	}
+	
+	/**
+	 * Return whether s1 is equivalent to s2.
+	 * 
+	 * @param s1
+	 * @param s2
+	 * @return whether s1 is equivalent to s2
+	 */
+	private boolean equalsOrNull(String s1, String s2) {
+		if (s1 == null || s2 == null) {
+			return s1 == s2;
+		} 
+		return s1.equalsIgnoreCase(s2);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return getClass().hashCode();
+	}	
+	
+	/**
+	 * Sets the ant home to use.
+	 * 
+	 * @param path path to toor of an ant home installation
+	 */
+	public void setAntHome(String path) {
+		antHomeLocation = path;
+	}
+	
+	/**
+	 * Returns the ant home location
+	 * 
+	 * @return path to root ant installation directory
+	 */
+	public String getAntHome() {
+		if (antHomeLocation == null) {
+			return AntCorePlugin.getPlugin().getPreferences().getAntHome();
+		}
+		return antHomeLocation;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java
new file mode 100644
index 0000000..ac08c65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntJavaLaunchDelegate.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.JavaLaunchDelegate;
+
+/**
+ * Used by the AntLaunchDelegate for Ant builds in a separate VM
+ * The subclassing is needed to be able to launch an Ant build from a non-Java project
+ */
+public class AntJavaLaunchDelegate extends JavaLaunchDelegate {
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public boolean preLaunchCheck(ILaunchConfiguration configuration,String mode, IProgressMonitor monitor) throws CoreException {
+		try {
+			return super.preLaunchCheck(configuration, mode, monitor);
+		} catch (CoreException ce) {
+			//likely dealing with a non-Java project
+		}
+		//no need to check for breakpoints as always in run mode
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		try {
+			return super.getProgramArguments(configuration);
+		} catch (CoreException ce) {
+		}
+		return configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java
new file mode 100644
index 0000000..30c7df3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.java
@@ -0,0 +1,37 @@
+/**********************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ * dakshinamurthy.karra at gmail.com - bug 165371
+ **********************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import org.eclipse.osgi.util.NLS;
+
+public class AntLaunchConfigurationMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchConfigurationMessages";//$NON-NLS-1$
+
+	public static String AntLaunchDelegate_Launching__0__1;
+	public static String AntLaunchDelegate_Running__0__2;
+	public static String AntLaunchDelegate_Build_In_Progress;
+	public static String AntLaunchDelegate_Failure;
+	public static String AntLaunchDelegate_22;
+	public static String AntLaunchDelegate_23;
+	public static String AntLaunchDelegate_28;
+
+	public static String AntHomeClasspathEntry_8;
+	public static String AntHomeClasspathEntry_9;
+	public static String AntHomeClasspathEntry_10;
+	public static String AntHomeClasspathEntry_11;
+
+	public static String ContributedClasspathEntriesEntry_1;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, AntLaunchConfigurationMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties
new file mode 100644
index 0000000..e661655
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchConfigurationMessages.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     dakshinamurthy.karra at gmail.com - bug 165371
+###############################################################################
+
+AntLaunchDelegate_Launching__0__1=Launching {0}
+AntLaunchDelegate_Running__0__2=Running {0}
+AntLaunchDelegate_Build_In_Progress=Ant build {0} already in progress. Concurrent Ant builds are possible if you specify to build in a separate JRE.
+AntLaunchDelegate_Failure=Failure of Background Ant Build
+AntLaunchDelegate_22=&Do not show error dialog when Ant build fails
+AntLaunchDelegate_23=Ant Build Failed
+AntLaunchDelegate_28=Waiting for virtual machine to exit...
+
+AntHomeClasspathEntry_8=Ant Home (Default)
+AntHomeClasspathEntry_9=Ant Home ({0})
+AntHomeClasspathEntry_10=Ant Home {0} does not exist
+AntHomeClasspathEntry_11=Ant Home {0} does not contain a "lib" directory
+
+ContributedClasspathEntriesEntry_1=Additional Tasks & Support
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
new file mode 100644
index 0000000..15088ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntLaunchDelegate.java
@@ -0,0 +1,898 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Juan A. Hernandez - bug 89926
+ *     dakshinamurthy.karra at gmail.com - bug 165371
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tools.ant.ProjectHelper;
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.AntRunner;
+import org.eclipse.ant.core.Property;
+import org.eclipse.ant.core.Task;
+import org.eclipse.ant.core.Type;
+import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+import org.eclipse.ant.internal.launching.AntLaunch;
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.ant.internal.launching.debug.model.RemoteAntDebugBuildListener;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.launchConfigurations.BackgroundResourceRefresher;
+import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.RefreshUtil;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.SocketUtil;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.osgi.framework.Bundle;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Launch delegate for Ant builds
+ */
+public class AntLaunchDelegate extends LaunchConfigurationDelegate {
+
+	private static final String ANT_LOGGER_CLASS = "org.eclipse.ant.internal.launching.runtime.logger.AntProcessBuildLogger"; //$NON-NLS-1$
+	private static final String ANT_DEBUG_LOGGER_CLASS = "org.eclipse.ant.internal.launching.runtime.logger.AntProcessDebugBuildLogger"; //$NON-NLS-1$
+	private static final String NULL_LOGGER_CLASS = "org.eclipse.ant.internal.launching.runtime.logger.NullBuildLogger"; //$NON-NLS-1$
+	private static final String REMOTE_ANT_LOGGER_CLASS = "org.eclipse.ant.internal.launching.remote.logger.RemoteAntBuildLogger"; //$NON-NLS-1$
+	private static final String REMOTE_ANT_DEBUG_LOGGER_CLASS = "org.eclipse.ant.internal.launching.remote.logger.RemoteAntDebugBuildLogger"; //$NON-NLS-1$
+	private static final String BASE_DIR_PREFIX = "-Dbasedir="; //$NON-NLS-1$
+	private static final String INPUT_HANDLER_CLASS = "org.eclipse.ant.internal.ui.antsupport.inputhandler.AntInputHandler"; //$NON-NLS-1$
+	private static final String REMOTE_INPUT_HANDLER_CLASS = "org.eclipse.ant.internal.ui.antsupport.inputhandler.ProxyInputHandler"; //$NON-NLS-1$
+
+	/**
+	 * String attribute identifying the build scope for a launch configuration.
+	 * <code>null</code> indicates the default workspace build.
+	 * 
+	 * Note: this attribute was used with the old 'AntBuildTab' which has been replaced by
+	 *  the 'ExternalToolsBuildTab'. The 'ExternalToolsBuildTab' uses a different
+	 *  attribute key, so use the external tools attribute when present: 
+	 *  IExternalToolConstants.ATTR_BUILD_SCOPE
+	 */
+	private static final String ATTR_BUILD_SCOPE = AntLaunching.getUniqueIdentifier() + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
+
+	/**
+	 * Attribute identifier specifying whether referenced projects should be
+	 * considered when computing the projects to build. Default value is
+	 * <code>true</code>.
+	 * 
+	 * Note: this attribute was used with the old 'AntBuildTab' which has been replaced by
+	 *  the 'ExternalToolsBuildTab'. The 'ExternalToolsBuildTab' uses a different
+	 *  attribute key, so use the external tools attribute when present: 
+	 *  IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS
+	 */
+	private static final String ATTR_INCLUDE_REFERENCED_PROJECTS = AntLaunching.getUniqueIdentifier() + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
+
+	private static String fgSWTLibraryLocation;
+
+	private String fMode;
+	ILaunchManager launchManager;
+
+	private boolean fUserSpecifiedLogger = false;
+
+	private String getProgramArguments(ILaunchConfiguration configuration)
+			throws CoreException {
+		String arguments = configuration.getAttribute(
+				IExternalToolConstants.ATTR_TOOL_ARGUMENTS, ""); //$NON-NLS-1$
+		return VariablesPlugin.getDefault().getStringVariableManager()
+				.performStringSubstitution(arguments);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
+	 *      java.lang.String, org.eclipse.debug.core.ILaunch,
+	 *      org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void launch(ILaunchConfiguration configuration, String mode,
+			ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		if (monitor.isCanceled()) {
+			return;
+		}
+		fUserSpecifiedLogger = false;
+		fMode = mode;
+		launchManager = DebugPlugin.getDefault().getLaunchManager();
+
+		// migrate the config to the new classpath format if required
+		AntLaunchingUtil.migrateToNewClasspathFormat(configuration);
+
+		boolean isSeparateJRE = AntLaunchingUtil
+				.isSeparateJREAntBuild(configuration);
+
+		if (AntLaunchingUtil.isLaunchInBackground(configuration)) {
+			monitor.beginTask(MessageFormat.format(
+				AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__1,
+						new String[] { configuration.getName() }), 10);
+		} else {
+			monitor.beginTask(MessageFormat.format(
+				AntLaunchConfigurationMessages.AntLaunchDelegate_Running__0__2,
+						new String[] { configuration.getName() }), 100);
+		}
+
+		// resolve location
+		IPath location = ExternalToolsCoreUtil.getLocation(configuration);
+		monitor.worked(1);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		if (!isSeparateJRE && AntRunner.isBuildRunning()) {
+			IStatus status = new Status(
+					IStatus.ERROR,
+					AntLaunching.PLUGIN_ID,
+					1,
+					MessageFormat
+							.format(
+									AntLaunchConfigurationMessages.AntLaunchDelegate_Build_In_Progress,
+									new String[] { location.toOSString() }),
+					null);
+			throw new CoreException(status);
+		}
+
+		// resolve working directory
+		IPath workingDirectory = ExternalToolsCoreUtil
+				.getWorkingDirectory(configuration);
+		String basedir = null;
+		if (workingDirectory != null) {
+			basedir = workingDirectory.toOSString();
+		}
+		monitor.worked(1);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		// link the process to its build logger via a timestamp
+		long timeStamp = System.currentTimeMillis();
+		String idStamp = Long.toString(timeStamp);
+		StringBuffer idProperty = new StringBuffer("-D"); //$NON-NLS-1$
+		idProperty.append(AbstractEclipseBuildLogger.ANT_PROCESS_ID);
+		idProperty.append('=');
+		idProperty.append(idStamp);
+
+		// resolve arguments
+		String[] arguments = null;
+		if (isSeparateJRE) {
+			arguments = new String[] { getProgramArguments(configuration) };
+		} else {
+			arguments = ExternalToolsCoreUtil.getArguments(configuration);
+		}
+
+		Map userProperties = AntLaunchingUtil.getProperties(configuration);
+		if (userProperties != null) {// create a copy so as to not affect the
+			// configuration with transient
+			// properties
+			userProperties = new HashMap(userProperties);
+		}
+		String[] propertyFiles = AntLaunchingUtil
+				.getPropertyFiles(configuration);
+		String[] targets = AntLaunchingUtil.getTargetNames(configuration);
+		URL[] customClasspath = AntLaunchingUtil
+				.getCustomClasspath(configuration);
+		String antHome = AntLaunchingUtil.getAntHome(configuration);
+
+		boolean setInputHandler = true;
+		try {
+			// check if set specify inputhandler
+			setInputHandler = configuration.getAttribute(
+					AntLaunching.SET_INPUTHANDLER, true);
+		} catch (CoreException ce) {
+			AntLaunching.log(ce);
+		}
+
+		AntRunner runner = null;
+		if (!isSeparateJRE) {
+			runner = configureAntRunner(configuration, location, basedir,
+					idProperty, arguments, userProperties, propertyFiles,
+					targets, customClasspath, antHome, setInputHandler);
+		}
+
+		monitor.worked(1);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+		boolean captureOutput = ExternalToolsCoreUtil
+				.getCaptureOutput(configuration);
+		int port = -1;
+		int requestPort = -1;
+		if (isSeparateJRE && captureOutput) {
+			if (userProperties == null) {
+				userProperties = new HashMap();
+			}
+			port = SocketUtil.findFreePort();
+			userProperties.put(AbstractEclipseBuildLogger.ANT_PROCESS_ID,
+					idStamp);
+			userProperties.put("eclipse.connect.port", Integer.toString(port)); //$NON-NLS-1$
+			if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
+				requestPort = SocketUtil.findFreePort();
+				userProperties
+						.put(
+								"eclipse.connect.request_port", Integer.toString(requestPort)); //$NON-NLS-1$
+			}
+		}
+
+		StringBuffer commandLine = generateCommandLine(location, arguments,
+				userProperties, propertyFiles, targets, antHome, basedir,
+				isSeparateJRE, captureOutput, setInputHandler);
+
+		if (isSeparateJRE) {
+			monitor
+					.beginTask(
+							MessageFormat
+									.format(
+											AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__1,
+											new String[] { configuration
+													.getName() }), 10);
+			runInSeparateVM(configuration, launch, monitor, idStamp, antHome,
+					port, requestPort, commandLine, captureOutput,
+					setInputHandler);
+		} else {
+			runInSameVM(configuration, launch, monitor, location, idStamp,
+					runner, commandLine);
+		}
+
+		monitor.done();
+	}
+
+	private void runInSameVM(ILaunchConfiguration configuration,
+			ILaunch launch, IProgressMonitor monitor, IPath location,
+			String idStamp, AntRunner runner, StringBuffer commandLine) throws CoreException {
+		Map attributes = new HashMap(2);
+		attributes.put(IProcess.ATTR_PROCESS_TYPE,
+				IAntLaunchConstants.ID_ANT_PROCESS_TYPE);
+		attributes.put(AbstractEclipseBuildLogger.ANT_PROCESS_ID, idStamp);
+
+		final AntProcess process = new AntProcess(location.toOSString(),
+				launch, attributes);
+		setProcessAttributes(process, idStamp, commandLine);
+		boolean debug = fMode.equals(ILaunchManager.DEBUG_MODE);
+		if (debug || AntLaunchingUtil.isLaunchInBackground(configuration)) {
+			final AntRunner finalRunner = runner;
+			Runnable r = new Runnable() {
+				public void run() {
+					try {
+						finalRunner.run(process);
+					} catch (CoreException e) {
+						handleException(
+								e,
+								AntLaunchConfigurationMessages.AntLaunchDelegate_Failure);
+					}
+					process.terminated();
+				}
+			};
+			Thread background = new Thread(r);
+			background.setDaemon(true);
+			background.start();
+			monitor.worked(1);
+			// refresh resources after process finishes
+			if (configuration.getAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String)null) != null) {
+				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(
+						configuration, process);
+				refresher.startBackgroundRefresh();
+			}
+		} else {
+			// execute the build
+			try {
+				process.setProgressMonitor(monitor);
+				runner.run(monitor);
+			} catch (CoreException e) {
+				process.terminated();
+				monitor.done();
+				handleException(e,
+						AntLaunchConfigurationMessages.AntLaunchDelegate_23);
+				return;
+			}
+			process.terminated();
+
+			// refresh resources
+			RefreshUtil.refreshResources(configuration, monitor);
+		}
+	}
+
+	private AntRunner configureAntRunner(ILaunchConfiguration configuration,
+			IPath location, String baseDir, StringBuffer idProperty,
+			String[] arguments, Map userProperties, String[] propertyFiles,
+			String[] targets, URL[] customClasspath, String antHome,
+			boolean setInputHandler) throws CoreException {
+		int argLength = 1; // at least one user property - timestamp
+		if (arguments != null) {
+			argLength += arguments.length;
+		}
+		if (baseDir != null && baseDir.length() > 0) {
+			argLength++;
+		}
+		String[] runnerArgs = new String[argLength];
+		if (arguments != null) {
+			System.arraycopy(arguments, 0, runnerArgs, 0, arguments.length);
+		}
+		if (baseDir != null && baseDir.length() > 0) {
+			runnerArgs[runnerArgs.length - 2] = BASE_DIR_PREFIX + baseDir;
+		}
+		runnerArgs[runnerArgs.length - 1] = idProperty.toString();
+
+		AntRunner runner = new AntRunner();
+		runner.setBuildFileLocation(location.toOSString());
+		boolean captureOutput = ExternalToolsCoreUtil
+				.getCaptureOutput(configuration);
+		if (captureOutput) {
+			if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
+				runner.addBuildLogger(ANT_DEBUG_LOGGER_CLASS);
+			} else {
+				runner.addBuildLogger(ANT_LOGGER_CLASS);
+			}
+		} else {
+			runner.addBuildLogger(NULL_LOGGER_CLASS);
+		}
+		if (setInputHandler) {
+			runner.setInputHandler(INPUT_HANDLER_CLASS);
+		} else {
+			runner.setInputHandler(""); //$NON-NLS-1$
+		}
+		runner.setArguments(runnerArgs);
+		if (userProperties != null) {
+			runner.addUserProperties(userProperties);
+		}
+
+		if (propertyFiles != null) {
+			runner.setPropertyFiles(propertyFiles);
+		}
+
+		if (targets != null) {
+			runner.setExecutionTargets(targets);
+		}
+
+		if (customClasspath != null) {
+			runner.setCustomClasspath(customClasspath);
+		}
+
+		if (antHome != null) {
+			runner.setAntHome(antHome);
+		}
+		return runner;
+	}
+
+	private void handleException(final CoreException e, final String title) {
+		AntLaunching.log(title, e);
+	}
+
+	private void setProcessAttributes(IProcess process, String idStamp,
+			StringBuffer commandLine) {
+		// link the process to the Eclipse build logger via a timestamp
+		if (!fUserSpecifiedLogger) {
+			process.setAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID,
+					idStamp);
+		}
+
+		// create "fake" command line for the process
+		if (commandLine != null) {
+			process.setAttribute(IProcess.ATTR_CMDLINE, commandLine.toString());
+		}
+	}
+
+	private StringBuffer generateCommandLine(IPath location,
+			String[] arguments, Map userProperties, String[] propertyFiles,
+			String[] targets, String antHome, String basedir,
+			boolean separateVM, boolean captureOutput, boolean setInputHandler) {
+		StringBuffer commandLine = new StringBuffer();
+
+		if (!separateVM) {
+			commandLine.append("ant"); //$NON-NLS-1$
+		}
+
+		if (arguments != null) {
+			for (int i = 0; i < arguments.length; i++) {
+				commandLine.append(' ');
+				commandLine.append(arguments[i]);
+			}
+		}
+
+		AntCorePreferences prefs = AntCorePlugin.getPlugin().getPreferences();
+		if (propertyFiles == null) { // global
+			String[] files = prefs.getCustomPropertyFiles();
+			for (int i = 0; i < files.length; i++) {
+				String path = files[i];
+				commandLine.append(" -propertyfile \""); //$NON-NLS-1$
+				commandLine.append(path);
+				commandLine.append('\"');
+			}
+		} else {// "local" configuration
+			for (int i = 0; i < propertyFiles.length; i++) {
+				String path = propertyFiles[i];
+				commandLine.append(" -propertyfile \""); //$NON-NLS-1$
+				commandLine.append(path);
+				commandLine.append('\"');
+			}
+		}
+		// "local" configuration
+		if (userProperties != null) {
+			Iterator keys = userProperties.keySet().iterator();
+			String key;
+			while (keys.hasNext()) {
+				key = (String) keys.next();
+				appendProperty(commandLine, key, (String) userProperties
+						.get(key));
+			}
+		}
+
+		// global
+		List properties = null;
+		if (!separateVM) {
+			properties = prefs.getProperties();
+		} else {
+			properties = prefs.getRemoteAntProperties();
+		}
+
+		// if we have user properties this means that the user has chosen to
+		// override the global properties
+		// if in a separate VM and have only two (or three if debug) user
+		// properties these are really only Eclipse generated properties
+		// and the user is still using the global properties
+		int numberOfEclipseProperties = 2;
+		if (userProperties != null
+				&& userProperties.get("eclipse.connect.request_port") != null) { //$NON-NLS-1$
+			numberOfEclipseProperties = 3; // debug mode
+		}
+		boolean useGlobalProperties = userProperties == null
+				|| (separateVM && userProperties.size() == numberOfEclipseProperties);
+		if (useGlobalProperties) {
+			for (Iterator iter = properties.iterator(); iter.hasNext();) {
+				Property property = (Property) iter.next();
+				String key = property.getName();
+				String value = property.getValue(false);
+				if (value != null) {
+					appendProperty(commandLine, key, value);
+				}
+			}
+		}
+
+		if (basedir != null && basedir.length() > 0) {
+			appendProperty(commandLine, "basedir", basedir); //$NON-NLS-1$
+		}
+
+		if (antHome != null) {
+			commandLine.append(" \"-Dant.home="); //$NON-NLS-1$
+			commandLine.append(antHome);
+			commandLine.append('\"');
+		}
+
+		if (separateVM) {
+			if (commandLine.indexOf("-logger") == -1) { //$NON-NLS-1$
+				if (captureOutput) {
+					commandLine.append(" -logger "); //$NON-NLS-1$
+					if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
+						commandLine.append(REMOTE_ANT_DEBUG_LOGGER_CLASS);
+					} else {
+						commandLine.append(REMOTE_ANT_LOGGER_CLASS);
+					}
+				}
+			} else {
+				fUserSpecifiedLogger = true;
+			}
+			if (commandLine.indexOf("-inputhandler") == -1 && setInputHandler) { //$NON-NLS-1$
+				commandLine.append(" -inputhandler "); //$NON-NLS-1$
+				commandLine.append(REMOTE_INPUT_HANDLER_CLASS);
+			}
+		} else {
+			if (commandLine.indexOf("-inputhandler") == -1 && setInputHandler) { //$NON-NLS-1$
+				commandLine.append(" -inputhandler "); //$NON-NLS-1$
+				commandLine.append(INPUT_HANDLER_CLASS);
+			}
+			if (commandLine.indexOf("-logger") == -1) { //$NON-NLS-1$
+				commandLine.append(" -logger "); //$NON-NLS-1$
+				if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
+					commandLine.append(ANT_DEBUG_LOGGER_CLASS);
+				} else if (captureOutput) {
+					commandLine.append(ANT_LOGGER_CLASS);
+				} else {
+					commandLine.append(NULL_LOGGER_CLASS);
+				}
+			}
+		}
+
+		if (separateVM) {
+			appendTaskAndTypes(prefs, commandLine);
+		}
+		commandLine.append(" -buildfile \""); //$NON-NLS-1$
+		commandLine.append(location.toOSString());
+		commandLine.append('\"');
+
+		if (targets != null) {
+			for (int i = 0; i < targets.length; i++) {
+				commandLine.append(" \""); //$NON-NLS-1$
+				commandLine.append(targets[i]);
+				commandLine.append('\"');
+			}
+		}
+		return commandLine;
+	}
+
+	private void appendTaskAndTypes(AntCorePreferences prefs,
+			StringBuffer commandLine) {
+		List tasks = prefs.getRemoteTasks();
+		Iterator itr = tasks.iterator();
+		while (itr.hasNext()) {
+			Task task = (Task) itr.next();
+			commandLine.append(" -eclipseTask "); //$NON-NLS-1$
+			String name = ProjectHelper.genComponentName(task.getURI(), task
+					.getTaskName());
+			commandLine.append(name);
+			commandLine.append(',');
+			commandLine.append(task.getClassName());
+		}
+
+		List types = prefs.getRemoteTypes();
+		itr = types.iterator();
+		while (itr.hasNext()) {
+			Type type = (Type) itr.next();
+			commandLine.append(" -eclipseType "); //$NON-NLS-1$
+			String name = ProjectHelper.genComponentName(type.getURI(), type
+					.getTypeName());
+			commandLine.append(name);
+			commandLine.append(',');
+			commandLine.append(type.getClassName());
+		}
+	}
+
+	private void appendProperty(StringBuffer commandLine, String name,
+			String value) {
+		commandLine.append(" \"-D"); //$NON-NLS-1$
+		commandLine.append(name);
+		commandLine.append('=');
+		commandLine.append(value);
+		if (value.length() > 0
+				&& value.charAt(value.length() - 1) == File.separatorChar) {
+			commandLine.append(File.separatorChar);
+		}
+		commandLine.append("\""); //$NON-NLS-1$
+	}
+
+	private void runInSeparateVM(ILaunchConfiguration configuration,
+			ILaunch launch, IProgressMonitor monitor, String idStamp,
+			String antHome, int port, int requestPort,
+			StringBuffer commandLine, boolean captureOutput,
+			boolean setInputHandler) throws CoreException {
+		boolean debug = fMode.equals(ILaunchManager.DEBUG_MODE);
+		if (captureOutput) {
+			if (debug) {
+				RemoteAntDebugBuildListener listener = new RemoteAntDebugBuildListener(
+						launch);
+				if (requestPort != -1) {
+					listener.startListening(port, requestPort);
+				}
+			} else if (!fUserSpecifiedLogger) {
+				RemoteAntBuildListener client = new RemoteAntBuildListener(
+						launch);
+				if (port != -1) {
+					client.startListening(port);
+				}
+			}
+		}
+
+		ILaunchConfigurationWorkingCopy copy = configuration.getWorkingCopy();
+		setDefaultWorkingDirectory(copy);
+		copy.setAttribute(
+				IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
+				commandLine.toString());
+		copy.setAttribute(
+				IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
+				IAntLaunchConstants.MAIN_TYPE_NAME);
+		StringBuffer vmArgs = generateVMArguments(copy, setInputHandler,
+				antHome);
+		copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+				vmArgs.toString());
+		copy.setAttribute(ILaunchManager.ATTR_PRIVATE, true);
+		if (copy
+				.getAttribute(
+						IAntLaunchConstants.ATTR_DEFAULT_VM_INSTALL,
+						false)) {
+			setDefaultVM(configuration, copy);
+		}
+
+		if (debug) { // do not allow launch in foreground bug 83254
+			copy.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
+		}
+
+		// set the ANT_HOME environment variable
+		if (antHome != null) {
+			Map vars = copy.getAttribute(
+					ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new HashMap(1));
+			vars.put("ANT_HOME", antHome); //$NON-NLS-1$
+			copy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, vars);
+		}
+
+		// copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+		// "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000");
+		IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 10);
+		AntJavaLaunchDelegate delegate = new AntJavaLaunchDelegate();
+		delegate.preLaunchCheck(copy, ILaunchManager.RUN_MODE, subMonitor);
+		delegate.launch(copy, ILaunchManager.RUN_MODE, launch, subMonitor);
+		final IProcess[] processes = launch.getProcesses();
+		for (int i = 0; i < processes.length; i++) {
+			setProcessAttributes(processes[i], idStamp, null);
+		}
+
+		if (AntLaunchingUtil.isLaunchInBackground(copy)) {
+			// refresh resources after process finishes
+			if (configuration.getAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String)null) != null) {
+				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(
+						configuration, processes[0]);
+				refresher.startBackgroundRefresh();
+			}
+		} else {
+			final boolean[] terminated = new boolean[1];
+			terminated[0] = launch.isTerminated();
+			IDebugEventSetListener listener = new IDebugEventSetListener() {
+				public void handleDebugEvents(DebugEvent[] events) {
+					for (int i = 0; i < events.length; i++) {
+						DebugEvent event = events[i];
+						for (int j = 0, numProcesses = processes.length; j < numProcesses; j++) {
+							if (event.getSource() == processes[j]
+									&& event.getKind() == DebugEvent.TERMINATE) {
+								terminated[0] = true;
+								break;
+							}
+						}
+					}
+				}
+			};
+			DebugPlugin.getDefault().addDebugEventListener(listener);
+			monitor
+					.subTask(AntLaunchConfigurationMessages.AntLaunchDelegate_28);
+			while (!monitor.isCanceled() && !terminated[0]) {
+				try {
+					Thread.sleep(50);
+				} catch (InterruptedException e) {
+				}
+			}
+			DebugPlugin.getDefault().removeDebugEventListener(listener);
+			if (!monitor.isCanceled()) {
+				// refresh resources
+				RefreshUtil.refreshResources(configuration, monitor);
+			}
+		}
+	}
+
+	private void setDefaultVM(ILaunchConfiguration configuration,
+			ILaunchConfigurationWorkingCopy copy) {
+		try {
+			JavaRuntime.getJavaProject(configuration);
+			// remove the vm name, install type and jre container path for the
+			// Java launching concept of default VM
+			copy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
+					(String) null);
+			copy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE,
+					(String) null);
+			copy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH,
+					(String) null);
+		} catch (CoreException ce) {
+			// not in a Java project
+			IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();
+			copy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME,
+					defaultVMInstall.getName());
+			copy.setAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE,
+					defaultVMInstall.getVMInstallType().getId());
+		}
+	}
+
+	private StringBuffer generateVMArguments(ILaunchConfiguration config,
+			boolean setInputHandler, String antHome) {
+		StringBuffer vmArgs = new StringBuffer();
+		try {
+			String configArgs = config.getAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
+					(String) null);
+			if (configArgs != null) {
+				vmArgs.append(configArgs);
+				vmArgs.append(' ');
+			}
+		} catch (CoreException e) {
+		}
+
+		if (antHome != null) {
+			vmArgs.append("-Dant.home=\""); //$NON-NLS-1$
+			vmArgs.append(antHome);
+			vmArgs.append("\" "); //$NON-NLS-1$
+
+			File antLibDir = new File(antHome, "lib"); //$NON-NLS-1$
+			vmArgs.append("-Dant.library.dir=\""); //$NON-NLS-1$
+			vmArgs.append(antLibDir.getAbsolutePath());
+			vmArgs.append('\"');
+		}
+		if (setInputHandler) {
+			String swtLocation = getSWTLibraryLocation();
+			if (swtLocation != null) {
+				vmArgs.append(" -Djava.library.path=\""); //$NON-NLS-1$
+				String javaLibPath = System.getProperty("java.library.path"); //$NON-NLS-1$
+				javaLibPath = stripUnescapedQuotes(javaLibPath);
+				if (javaLibPath != null) {
+					vmArgs.append(javaLibPath);
+					if (vmArgs.charAt(vmArgs.length() - 1) != File.pathSeparatorChar) {
+						vmArgs.append(File.pathSeparatorChar);
+					}
+				}
+				vmArgs.append(swtLocation);
+				vmArgs.append('"');
+			}
+		}
+		return vmArgs;
+	}
+
+	private String stripUnescapedQuotes(String javaLibPath) {
+		StringBuffer buf = new StringBuffer(javaLibPath.length());
+		for (int i = 0; i < javaLibPath.length(); i++) {
+			char c = javaLibPath.charAt(i);
+			switch (c) {
+			case '"':
+				if (i != 0 && javaLibPath.charAt(i - 1) == '\\') {
+					buf.append(c);
+				}
+				break;
+			default:
+				buf.append(c);
+				break;
+			}
+		}
+		return buf.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder
+	 * (org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+		String scopeKey = ATTR_BUILD_SCOPE;
+		String refKey = ATTR_INCLUDE_REFERENCED_PROJECTS;
+		if (configuration.hasAttribute(IExternalToolConstants.ATTR_BUILD_SCOPE) ||
+			configuration.hasAttribute(IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS)) {
+				// use new attributes when present - see bug 282581
+				scopeKey = IExternalToolConstants.ATTR_BUILD_SCOPE;
+				refKey = IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS;
+		}
+		IProject[] projects = ExternalToolsCoreUtil.getBuildProjects(configuration, scopeKey);
+		if (projects == null) {
+			return null;
+		}
+		boolean isRef = ExternalToolsCoreUtil.isIncludeReferencedProjects(configuration, refKey);
+		if (isRef) {
+			return computeReferencedBuildOrder(projects);
+		}
+		return computeBuildOrder(projects);
+	}
+
+	private String getSWTLibraryLocation() {
+		if (fgSWTLibraryLocation == null) {
+			Bundle bundle = Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
+			BundleDescription description = Platform.getPlatformAdmin()
+					.getState(false).getBundle(bundle.getBundleId());
+			BundleDescription[] fragments = description.getFragments();
+			if (fragments == null || fragments.length == 0) {
+				return null;
+			}
+			Bundle fragBundle = Platform.getBundle(fragments[0]
+					.getSymbolicName());
+			try {
+				URL url = FileLocator.toFileURL(fragBundle.getEntry("/")); //$NON-NLS-1$
+				IPath path = new Path(url.getPath());
+				path = path.removeTrailingSeparator();
+				fgSWTLibraryLocation = path.toOSString();
+			} catch (IOException e) {
+			}
+		}
+		return fgSWTLibraryLocation;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBreakpoints
+	 * (org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	protected IBreakpoint[] getBreakpoints(ILaunchConfiguration configuration) {
+		IBreakpointManager breakpointManager = DebugPlugin.getDefault()
+				.getBreakpointManager();
+		if (!breakpointManager.isEnabled()) {
+			// no need to check breakpoints individually.
+			return null;
+		}
+		return breakpointManager
+				.getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.model.LaunchConfigurationDelegate#saveBeforeLaunch
+	 * (org.eclipse.debug.core.ILaunchConfiguration, java.lang.String,
+	 * org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected boolean saveBeforeLaunch(ILaunchConfiguration configuration,
+			String mode, IProgressMonitor monitor) throws CoreException {
+		if (IExternalToolConstants.ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY
+				.equals(configuration.getType().getCategory())) {
+			// don't prompt for builders
+			return true;
+		}
+		return super.saveBeforeLaunch(configuration, mode, monitor);
+	}
+
+	/**
+	 * Sets the default working directory to be the parent folder of the
+	 * buildfile if the user has not explicitly set the working directory.
+	 */
+	private void setDefaultWorkingDirectory(ILaunchConfigurationWorkingCopy copy) {
+		try {
+			String wd = copy.getAttribute(
+					IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+					(String) null);
+			if (wd == null) {
+				wd = ExternalToolsCoreUtil.getLocation(copy)
+						.removeLastSegments(1).toOSString();
+				copy
+						.setAttribute(
+								IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+								wd);
+			}
+		} catch (CoreException e) {
+			AntLaunching.log(e.getStatus());
+		}
+	}
+
+	public ILaunch getLaunch(ILaunchConfiguration configuration, String mode)
+			throws CoreException {
+		return new AntLaunch(configuration, mode, null);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java
new file mode 100644
index 0000000..bd56832
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntMigrationDelegate.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+
+/**
+ * Delegate for migrating Ant launch configurations.
+ * The migration process involves a resource mapping being created such that launch configurations
+ * can be filtered from the launch configuration dialog based on resource availability.
+ * 
+ * @since 3.2
+ */
+public class AntMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
+	
+	/**
+	 * Method to get the file for the specified launch configuration that should be mapped to the launch configuration  
+	 * 
+	 * @param candidate the launch configuration that the file will be mapped to.
+	 * @return the buildfile or <code>null</code> if not in the workspace
+	 */
+	protected IFile getFileForCandidate(ILaunchConfiguration candidate) {
+		IFile file= null;
+		String expandedLocation= null;
+		String location= null;
+		IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+		try {
+			location= candidate.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String)null);
+			if (location != null) {
+				expandedLocation= manager.performStringSubstitution(location);
+				if (expandedLocation != null) {
+					file= AntLaunchingUtil.getFileForLocation(expandedLocation, null);
+				}
+			}
+		} catch (CoreException e) {
+		}
+		return file;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#isCandidate()
+	 */
+	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
+		IResource[] mappedResources = candidate.getMappedResources();
+		if (mappedResources != null && mappedResources.length > 0) {
+			return false;
+		}
+		return getFileForCandidate(candidate) != null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#migrate(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void migrate(ILaunchConfiguration candidate) throws CoreException {
+		IFile file = getFileForCandidate(candidate);
+		ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
+		wc.setMappedResources(new IResource[] {file});
+		wc.doSave();
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntProcess.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntProcess.java
new file mode 100644
index 0000000..d10255a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntProcess.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStreamsProxy;
+
+public class AntProcess extends PlatformObject implements IProcess, IProgressMonitor {
+	
+	private AntStreamsProxy fProxy;
+	private String fLabel = null;
+	private ILaunch fLaunch = null;
+	private Map fAttributes = null;
+	private boolean fTerminated = false;
+	private boolean fCancelled = false;
+	// progress monitor to delegate or null if none
+	private IProgressMonitor fMonitor;
+	
+	public AntProcess(String label, ILaunch launch, Map attributes) {
+		fLabel = label;
+		fLaunch = launch;
+		if (attributes == null) {
+			fAttributes = new HashMap();
+		} else {
+			fAttributes = attributes;
+		}
+		String captureOutput= launch.getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT);
+		if(!("false".equals(captureOutput))) { //$NON-NLS-1$
+			fProxy= new AntStreamsProxy();
+		}
+		launch.addProcess(this);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#getLabel()
+	 */
+	public String getLabel() {
+		return fLabel;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#getLaunch()
+	 */
+	public ILaunch getLaunch() {
+		return fLaunch;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#getStreamsProxy()
+	 */
+	public IStreamsProxy getStreamsProxy() {
+		return fProxy;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#setAttribute(java.lang.String, java.lang.String)
+	 */
+	public void setAttribute(String key, String value) {
+		fAttributes.put(key, value);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#getAttribute(java.lang.String)
+	 */
+	public String getAttribute(String key) {
+		return (String)fAttributes.get(key);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IProcess#getExitValue()
+	 */
+	public int getExitValue() {
+		return 0;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
+	 */
+	public boolean canTerminate() {
+		return !isCanceled() && !isTerminated();
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
+	 */
+	public boolean isTerminated() {
+		return fTerminated;
+	}
+	
+	protected void terminated() {
+		if (!fTerminated) {
+			fTerminated = true;
+			if (DebugPlugin.getDefault() != null) {
+				DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {new DebugEvent(this, DebugEvent.TERMINATE)});
+			}
+		}
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
+	 */
+	public void terminate() {
+		setCanceled(true);
+	}
+	
+	// IProgressMonitor implemented to support termination.
+	
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
+	 */
+	public void beginTask(String name, int totalWork) {
+		if (fMonitor != null) {
+			fMonitor.beginTask(name, totalWork);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#done()
+	 */
+	public void done() {
+		if (fMonitor != null) {
+			fMonitor.done();
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
+	 */
+	public void internalWorked(double work) {
+		if (fMonitor != null) {
+			fMonitor.internalWorked(work);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
+	 */
+	public boolean isCanceled() {
+		return fCancelled;
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
+	 */
+	public void setCanceled(boolean value) {
+		fCancelled = value;
+		if (fMonitor != null) {
+			fMonitor.setCanceled(value);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
+	 */
+	public void setTaskName(String name) {
+		if (fMonitor != null) {
+			fMonitor.setTaskName(name);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
+	 */
+	public void subTask(String name) {
+		if (fMonitor != null) {
+			fMonitor.subTask(name);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
+	 */
+	public void worked(int work) {
+		if (fMonitor != null) {
+			fMonitor.worked(work);
+		}
+	}
+	
+	/**
+	 * Sets a progress monitor to delegate to or <code>null</code> if none.
+	 * 
+	 * @param monitor delegate monitor or <code>null</code>
+	 */
+	public void setProgressMonitor(IProgressMonitor monitor) {
+		fMonitor = monitor;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java
new file mode 100644
index 0000000..cf6199f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamMonitor.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IFlushableStreamMonitor;
+
+/**
+ * Stream monitor implementation for an Ant build process.
+ */
+public class AntStreamMonitor implements IFlushableStreamMonitor {
+
+	private StringBuffer fContents = new StringBuffer();
+	private ListenerList fListeners = new ListenerList(1);
+	private boolean fBuffered = true;
+	
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamMonitor#addListener(org.eclipse.debug.core.IStreamListener)
+	 */
+	public void addListener(IStreamListener listener) {
+		fListeners.add(listener);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamMonitor#getContents()
+	 */
+	public String getContents() {
+		return fContents.toString();
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamMonitor#removeListener(org.eclipse.debug.core.IStreamListener)
+	 */
+	public void removeListener(IStreamListener listener) {
+		fListeners.remove(listener);
+	}
+
+	/**
+	 * Appends the given message to this stream, and notifies listeners.
+	 * 
+	 * @param message
+	 */
+	public void append(String message) {
+		if (isBuffered()) {
+			fContents.append(message);
+		}
+		Object[] listeners = fListeners.getListeners();
+		for (int i = 0; i < listeners.length; i++) {
+			IStreamListener listener = (IStreamListener)listeners[i];
+			listener.streamAppended(message, this);
+		}
+	}
+	/**
+	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#flushContents()
+	 */
+	public void flushContents() {
+		fContents.setLength(0);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#isBuffered()
+	 */
+	public boolean isBuffered() {
+		return fBuffered;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#setBuffered(boolean)
+	 */
+	public void setBuffered(boolean buffer) {
+		fBuffered = buffer;
+	}
+}
+
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java
new file mode 100644
index 0000000..66a5e09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/AntStreamsProxy.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.debug.core.model.IStreamsProxy;
+
+/**
+ * 
+ */
+public class AntStreamsProxy implements IStreamsProxy {
+	
+	private AntStreamMonitor fErrorMonitor = new AntStreamMonitor();
+	private AntStreamMonitor fOutputMonitor = new AntStreamMonitor();
+	
+	public static final String ANT_DEBUG_STREAM = AntLaunching.PLUGIN_ID + ".ANT_DEBUG_STREAM"; //$NON-NLS-1$
+	public static final String ANT_VERBOSE_STREAM = AntLaunching.PLUGIN_ID + ".ANT_VERBOSE_STREAM"; //$NON-NLS-1$
+	public static final String ANT_WARNING_STREAM = AntLaunching.PLUGIN_ID + ".ANT_WARNING_STREAM"; //$NON-NLS-1$
+	
+	private AntStreamMonitor fDebugMonitor = new AntStreamMonitor();
+	private AntStreamMonitor fVerboseMonitor = new AntStreamMonitor();
+	private AntStreamMonitor fWarningMonitor = new AntStreamMonitor();
+
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamsProxy#getErrorStreamMonitor()
+	 */
+	public IStreamMonitor getErrorStreamMonitor() {
+		return fErrorMonitor;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamsProxy#getOutputStreamMonitor()
+	 */
+	public IStreamMonitor getOutputStreamMonitor() {
+		return fOutputMonitor;
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.model.IStreamsProxy#write(java.lang.String)
+	 */
+	public void write(String input) {
+	}
+
+	public IStreamMonitor getWarningStreamMonitor() {
+		return fWarningMonitor;
+	}
+	
+	public IStreamMonitor getDebugStreamMonitor() {
+		return fDebugMonitor;
+	}	
+	
+	public IStreamMonitor getVerboseStreamMonitor() {
+		return fVerboseMonitor;
+	}	
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java
new file mode 100644
index 0000000..71ac04c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/ContributedClasspathEntriesEntry.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.osgi.framework.Bundle;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * A classpath entry that contains a contributed classpath entries
+ * via the <code>extraClasspathEntries</code> extension point.
+ * 
+ * @since 3.0 
+ */
+public class ContributedClasspathEntriesEntry extends AbstractRuntimeClasspathEntry {
+	
+	public static final String TYPE_ID = "org.eclipse.ant.ui.classpathentry.extraClasspathEntries"; //$NON-NLS-1$
+    
+    public static List fgSWTEntries= null;
+		
+	/**
+	 * Default contructor required to instantiate persisted extensions.
+	 */
+	public ContributedClasspathEntriesEntry() {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry#buildMemento(org.w3c.dom.Document, org.w3c.dom.Element)
+	 */
+	protected void buildMemento(Document document, Element memento) throws CoreException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.launching.IRuntimeClasspathEntry2#initializeFrom(org.w3c.dom.Element)
+	 */
+	public void initializeFrom(Element memento) throws CoreException {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getTypeId()
+	 */
+	public String getTypeId() {
+		return TYPE_ID;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getRuntimeClasspathEntries(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
+		boolean separateVM= AntLaunchingUtil.isSeparateJREAntBuild(configuration);
+		boolean setInputHandler= configuration.getAttribute(AntLaunching.SET_INPUTHANDLER, true);
+		AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
+		IAntClasspathEntry[] antClasspathEntries = prefs.getContributedClasspathEntries();
+		IAntClasspathEntry[] userEntries = prefs.getAdditionalClasspathEntries();
+		List rtes = new ArrayList(antClasspathEntries.length + userEntries.length);
+		IAntClasspathEntry entry;
+		for (int i = 0; i < antClasspathEntries.length; i++) {
+			 entry= antClasspathEntries[i];
+			if (!separateVM || (separateVM && !entry.isEclipseRuntimeRequired())) {
+				rtes.add(JavaRuntime.newStringVariableClasspathEntry(entry.getLabel()));
+			}
+		}
+		boolean haveToolsEntry= false;
+		String path;
+		for (int i = 0; i < userEntries.length; i++) {
+			entry = userEntries[i];
+			path= entry.getLabel();
+            IPath toolsPath= new Path(path);
+			if (toolsPath.lastSegment().equals("tools.jar")) { //$NON-NLS-1$
+				haveToolsEntry= true;
+				// replace with dynamically resolved tools.jar based on
+				// the JRE being used
+				addToolsJar(configuration, rtes, path);
+			} else {
+				rtes.add(JavaRuntime.newStringVariableClasspathEntry(path));
+			}
+		}
+		if (!haveToolsEntry) {
+			addToolsJar(configuration, rtes, null);
+		}
+		
+		if (setInputHandler && separateVM) {
+			addSWTJars(rtes);
+		}
+		
+		return (IRuntimeClasspathEntry[]) rtes.toArray(new IRuntimeClasspathEntry[rtes.size()]);
+	}
+	
+	private void addToolsJar(ILaunchConfiguration configuration, List rtes, String path) {
+		IRuntimeClasspathEntry tools = getToolsJar(configuration);
+		if (tools == null) {
+			if (path != null) {
+				//use the global entry
+				rtes.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(path)));
+			} else {
+				//use the default vm install to try to find a tools.jar
+				IVMInstall install= JavaRuntime.getDefaultVMInstall();
+				if (install != null) {
+					IAntClasspathEntry entry = AntCorePlugin.getPlugin().getPreferences().getToolsJarEntry(new Path(install.getInstallLocation().getAbsolutePath()));
+					if (entry != null) {
+						rtes.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(entry.getEntryURL().getPath())));
+					}
+				}
+			}
+		} else {
+			rtes.add(tools);
+		}
+	}
+	
+	private void addSWTJars(List rtes) {
+        if (fgSWTEntries == null) {
+            fgSWTEntries= new ArrayList();
+            Bundle bundle= Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
+            BundleDescription description= Platform.getPlatformAdmin().getState(false).getBundle(bundle.getBundleId());
+            BundleDescription[] fragments= description.getFragments();
+            for (int i = 0; i < fragments.length; i++) {
+                Bundle fragmentBundle= Platform.getBundle(fragments[i].getName());
+                URL bundleURL;
+                try {
+                    bundleURL = FileLocator.resolve(fragmentBundle.getEntry("/")); //$NON-NLS-1$
+                } catch (IOException e) {
+                    AntLaunching.log(e);
+                   continue;
+                }
+                String urlFileName= bundleURL.getFile();
+                if (urlFileName.startsWith("file:")) { //$NON-NLS-1$
+                    try {
+                        urlFileName= new URL(urlFileName).getFile();
+                        if (urlFileName.endsWith("!/")) { //$NON-NLS-1$
+                            urlFileName= urlFileName.substring(0, urlFileName.length() - 2);
+                        }
+                    } catch (MalformedURLException e) {
+                    	 AntLaunching.log(e);
+                       continue;
+                    }
+                }
+                IPath fragmentPath= new Path(urlFileName);
+                if (fragmentPath.getFileExtension() != null) { //JAR file
+                    fgSWTEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(fragmentPath));
+                } else { // folder
+                    File bundleFolder= fragmentPath.toFile();
+                    if (!bundleFolder.isDirectory()) {
+                        continue;
+                    }
+                    String[] names= bundleFolder.list(new FilenameFilter() {
+                        public boolean accept(File dir, String name) {
+                            return name.endsWith(".jar"); //$NON-NLS-1$
+                        }
+                    });
+                    for (int j = 0; j < names.length; j++) {
+                        String jarName = names[j];
+                        fgSWTEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(fragmentPath.append(jarName)));
+                    }
+                }
+            }
+        }
+        rtes.addAll(fgSWTEntries);
+	}
+    
+	/**
+	 * Returns the tools.jar to use for this launch configuration, or <code>null</code>
+	 * if none.
+	 * 
+	 * @param configuration configuration to resolve a tools.jar for
+	 * @return associated tools.jar archive, or <code>null</code>
+	 */
+	private IRuntimeClasspathEntry getToolsJar(ILaunchConfiguration configuration) {
+		try {
+			IVMInstall install = JavaRuntime.computeVMInstall(configuration);
+			if (install != null) {
+				IAntClasspathEntry entry = AntCorePlugin.getPlugin().getPreferences().getToolsJarEntry(new Path(install.getInstallLocation().getAbsolutePath()));
+				if (entry != null) {
+					return JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(entry.getEntryURL().getPath()));
+				}
+			}
+		} catch (CoreException ce) {
+			//likely dealing with a non-Java project
+		}
+			
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getName()
+	 */
+	public String getName() {
+		return AntLaunchConfigurationMessages.ContributedClasspathEntriesEntry_1;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry#getType()
+	 */
+	public int getType() {
+		return IRuntimeClasspathEntry.OTHER;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
+	 */
+	public boolean isComposite() {
+		return true;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		return obj instanceof ContributedClasspathEntriesEntry;
+	}
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return getClass().hashCode();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java
new file mode 100644
index 0000000..119e18a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/MessageIds.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+public class MessageIds {
+
+	public final static String PROCESS_ID=   "processID"; //$NON-NLS-1$
+	public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
+	//constants need to start greater than the Project.MSG_* constants
+    public final static String TASK= "6"; //$NON-NLS-1$
+    public final static String TARGET= "7"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntBuildListener.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntBuildListener.java
new file mode 100644
index 0000000..2191556
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntBuildListener.java
@@ -0,0 +1,401 @@
+/*******************************************************************************
+ *  Copyright (c) 2003, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.tools.ant.Project;
+import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
+import org.eclipse.ant.internal.launching.AntLaunch;
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.ant.internal.launching.IAntLaunchingPreferenceConstants;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchesListener;
+import org.eclipse.debug.core.model.IProcess;
+
+/**
+ * Parts adapted from org.eclipse.jdt.internal.junit.ui.RemoteTestRunnerClient
+ * The client side of the RemoteAntBuildLogger. Handles the marshalling of the
+ * different messages.
+ */
+public class RemoteAntBuildListener implements ILaunchesListener {
+	public abstract class ListenerSafeRunnable implements ISafeRunnable {
+		public void handleException(Throwable exception) {
+			AntLaunching.log(exception);
+		}
+	}
+
+	/**
+	 * The server socket
+	 */
+	private ServerSocket fServerSocket;
+	private Socket fSocket;
+	private BufferedReader fBufferedReader;
+	private IProcess fProcess;
+	private String fProcessId;
+	private List fMessageQueue;
+	protected ILaunch fLaunch;
+	private String fLastFileName = null;
+	private String fLastTaskName = null;
+	private boolean fBuildFailed = false;
+
+	/**
+	 * Reads the message stream from the RemoteAntBuildLogger
+	 */
+	private class ServerConnection extends Thread {
+		private int fServerPort;
+
+		public ServerConnection(int port) {
+			super("Ant Build Server Connection"); //$NON-NLS-1$
+			setDaemon(true);
+			fServerPort = port;
+		}
+
+		public void run() {
+			Exception exception = null;
+			try {
+				fServerSocket = new ServerSocket(fServerPort);
+
+				int socketTimeout = Platform
+						.getPreferencesService()
+						.getInt(
+								AntLaunching.getUniqueIdentifier(),
+								IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT,
+								20000, null);
+				fServerSocket.setSoTimeout(socketTimeout);
+				fSocket = fServerSocket.accept();
+				fBufferedReader = new BufferedReader(new InputStreamReader(
+						fSocket.getInputStream(), "UTF-8")); //$NON-NLS-1$
+				String message;
+				while (fBufferedReader != null
+						&& (message = fBufferedReader.readLine()) != null) {
+					receiveMessage(message);
+				}
+			} catch (SocketException e) {
+			} catch (SocketTimeoutException e) {
+				exception = e;
+			} catch (IOException e) {
+				// fall through
+				exception = e;
+			}
+			if (exception != null) {
+				AntLaunching.log(exception);
+			}
+			shutDown();
+		}
+	}
+
+	public RemoteAntBuildListener(ILaunch launch) {
+		super();
+		fLaunch = launch;
+		DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
+	}
+
+	/**
+	 * Start listening to an Ant build. Start a server connection that the
+	 * RemoteAntBuildLogger can connect to.
+	 * 
+	 * @param eventPort
+	 *            The port number to create the server connection on
+	 */
+	public synchronized void startListening(int eventPort) {
+		ServerConnection connection = new ServerConnection(eventPort);
+		connection.start();
+	}
+
+	protected synchronized void shutDown() {
+		fLaunch = null;
+		if (DebugPlugin.getDefault() != null) {
+			DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(
+					this);
+		}
+		try {
+			if (fBufferedReader != null) {
+				fBufferedReader.close();
+				fBufferedReader = null;
+			}
+		} catch (IOException e) {
+		}
+		try {
+			if (fSocket != null) {
+				fSocket.close();
+				fSocket = null;
+			}
+		} catch (IOException e) {
+		}
+		try {
+			if (fServerSocket != null) {
+				fServerSocket.close();
+				fServerSocket = null;
+			}
+		} catch (IOException e) {
+		}
+	}
+
+	protected void receiveMessage(String message) {
+		if (message.startsWith(MessageIds.TASK)) {
+			receiveTaskMessage(message);
+		} else if (message.startsWith(MessageIds.TARGET)) {
+			receiveTargetMessage(message);
+		} else if (message.startsWith(MessageIds.PROCESS_ID)) {
+			message = message.substring(MessageIds.PROCESS_ID.length());
+			fProcessId = message;
+		} else {
+			int index = message.indexOf(',');
+			if (index > 0) {
+				int priority = Integer.parseInt(message.substring(0, index));
+				message = message.substring(index + 1);
+				writeMessage(
+						message + System.getProperty("line.separator"), priority); //$NON-NLS-1$
+				if (message.startsWith("BUILD FAILED")) { //$NON-NLS-1$
+					fBuildFailed = true;
+				} else if (fBuildFailed) {
+					if (message.startsWith("Total time:")) { //$NON-NLS-1$
+						fBuildFailed = false;
+					} else {
+						AntLaunchingUtil.linkBuildFailedMessage(message,
+								getProcess());
+					}
+				}
+
+			}
+		}
+	}
+
+	private void receiveTargetMessage(String message) {
+		message = message.substring(MessageIds.TARGET.length());
+		StringTokenizer tokenizer = new StringTokenizer(message, ","); //$NON-NLS-1$
+		message = tokenizer.nextToken();
+		if (tokenizer.hasMoreTokens()) {
+			int locationLength = Integer.parseInt(tokenizer.nextToken());
+			String location = tokenizer.nextToken();
+			while (location.length() < locationLength) { // path with a comma in
+				// it
+				location += ","; //$NON-NLS-1$
+				location += tokenizer.nextToken();
+			}
+			int lineNumber = Integer.parseInt(tokenizer.nextToken());
+			generateLink(message, location, lineNumber, 0, message.length() - 1);
+		}
+		writeMessage(
+				message + System.getProperty("line.separator"), Project.MSG_INFO); //$NON-NLS-1$
+	}
+
+	private void receiveTaskMessage(String message) {
+		message = message.substring(MessageIds.TASK.length());
+
+		int index = message.indexOf(',');
+		int priority = Integer.parseInt(message.substring(0, index));
+		int index2 = message.indexOf(',', index + 1);
+		String taskName = message.substring(index + 1, index2);
+		if (taskName.length() == 0) {
+			taskName = fLastTaskName;
+		}
+		int index3 = message.indexOf(',', index2 + 1);
+		int lineLength = Integer
+				.parseInt(message.substring(index2 + 1, index3));
+		int index4 = index3 + 1 + lineLength;
+
+		String line = message.substring(index3 + 1, index4);
+		StringBuffer labelBuff = new StringBuffer();
+		labelBuff.append('[');
+		labelBuff.append(taskName);
+		labelBuff.append("] "); //$NON-NLS-1$
+		labelBuff.append(line);
+		line = labelBuff.toString();
+
+		fLastTaskName = taskName;
+
+		int locationIndex = message.indexOf(',', index4 + 1);
+		int finalIndex = locationIndex + 1;
+		String fileName = message.substring(index4 + 1, locationIndex);
+		int locationLength = 0;
+		if (fileName.length() == 0) {
+			fileName = fLastFileName;
+		} else {
+			finalIndex = message.indexOf(',', locationIndex) + 1;
+			locationLength = Integer.parseInt(fileName);
+			fileName = message.substring(finalIndex, finalIndex
+					+ locationLength);
+			locationLength += 1; // set past delimiter
+		}
+		fLastFileName = fileName;
+		int lineNumber = Integer.parseInt(message.substring(finalIndex
+				+ locationLength));
+
+		int size = AntLaunching.LEFT_COLUMN_SIZE
+				- (taskName.length() + 3);
+		int offset = Math.max(size - 2, 1);
+		int length = AntLaunching.LEFT_COLUMN_SIZE - size - 3;
+		if (fileName != null) {
+			generateLink(line, fileName, lineNumber, offset, length);
+		}
+
+		StringBuffer fullMessage = new StringBuffer();
+		adornMessage(taskName, line, fullMessage);
+		writeMessage(
+				fullMessage
+						.append(System.getProperty("line.separator")).toString(), priority); //$NON-NLS-1$
+	}
+
+	private void generateLink(String line, String fileName, int lineNumber,
+			int offset, int length) {
+		((AntLaunch) fLaunch).addLinkDescriptor(line, fileName, lineNumber,
+				offset, length);
+	}
+
+	/**
+	 * Returns the associated process, finding it if necessary.
+	 */
+	protected IProcess getProcess() {
+		if (fProcess == null) {
+			if (fProcessId != null) {
+				IProcess[] all = DebugPlugin.getDefault().getLaunchManager()
+						.getProcesses();
+				for (int i = 0; i < all.length; i++) {
+					IProcess process = all[i];
+					if (fProcessId
+							.equals(process
+									.getAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID))) {
+						fProcess = process;
+						break;
+					}
+				}
+			}
+		}
+		return fProcess;
+	}
+
+	private AntStreamMonitor getMonitor(int priority) {
+		IProcess process = getProcess();
+		if (process == null) {
+			return null;
+		}
+		AntStreamsProxy proxy = (AntStreamsProxy) process.getStreamsProxy();
+		if (proxy == null) {
+			return null;
+		}
+		AntStreamMonitor monitor = null;
+		switch (priority) {
+		case Project.MSG_INFO:
+			monitor = (AntStreamMonitor) proxy.getOutputStreamMonitor();
+			break;
+		case Project.MSG_ERR:
+			monitor = (AntStreamMonitor) proxy.getErrorStreamMonitor();
+			break;
+		case Project.MSG_DEBUG:
+			monitor = (AntStreamMonitor) proxy.getDebugStreamMonitor();
+			break;
+		case Project.MSG_WARN:
+			monitor = (AntStreamMonitor) proxy.getWarningStreamMonitor();
+			break;
+		case Project.MSG_VERBOSE:
+			monitor = (AntStreamMonitor) proxy.getVerboseStreamMonitor();
+			break;
+		}
+		return monitor;
+	}
+
+	/**
+	 * Builds a right justified task prefix for the given build event, placing
+	 * it in the given string buffer.
+	 * 
+	 * @param event
+	 *            build event
+	 * @param fullMessage
+	 *            buffer to place task prefix in
+	 */
+	private void adornMessage(String taskName, String line,
+			StringBuffer fullMessage) {
+		if (taskName == null) {
+			taskName = "null"; //$NON-NLS-1$
+		}
+
+		int size = AntLaunching.LEFT_COLUMN_SIZE
+				- (taskName.length() + 6);
+		for (int i = 0; i < size; i++) {
+			fullMessage.append(' ');
+		}
+
+		fullMessage.append(line);
+	}
+
+	protected void writeMessage(String message, int priority) {
+		AntStreamMonitor monitor = getMonitor(priority);
+		if (monitor == null) {
+			if (fMessageQueue == null) {
+				fMessageQueue = new ArrayList();
+			}
+			fMessageQueue.add(message);
+			return;
+		}
+		if (fMessageQueue != null) {
+			for (Iterator iter = fMessageQueue.iterator(); iter.hasNext();) {
+				String oldMessage = (String) iter.next();
+				monitor.append(oldMessage);
+			}
+			fMessageQueue = null;
+		}
+		monitor.append(message);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug
+	 * .core.ILaunch[])
+	 */
+	public void launchesAdded(ILaunch[] launches) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.
+	 * debug.core.ILaunch[])
+	 */
+	public void launchesChanged(ILaunch[] launches) {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.
+	 * debug.core.ILaunch[])
+	 */
+	public void launchesRemoved(ILaunch[] launches) {
+		for (int i = 0; i < launches.length; i++) {
+			ILaunch launch = launches[i];
+			if (launch.equals(fLaunch)) {
+				shutDown();
+				return;
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java
new file mode 100644
index 0000000..013c13e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntProcessFactory.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.IProcessFactory;
+import org.eclipse.debug.core.model.IProcess;
+
+public class RemoteAntProcessFactory implements IProcessFactory {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IProcessFactory#newProcess(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map)
+	 */
+	public IProcess newProcess(ILaunch launch, Process process, String label, Map attributes) {
+		if (attributes == null) {
+			attributes= new HashMap(1);
+		}
+		attributes.put(IProcess.ATTR_PROCESS_TYPE, IAntLaunchConstants.ID_ANT_PROCESS_TYPE);
+		return new RemoteAntRuntimeProcess(launch, process, label, attributes);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java
new file mode 100644
index 0000000..4a0bba2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/internal/launching/launchConfigurations/RemoteAntRuntimeProcess.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.internal.launching.launchConfigurations;
+
+import java.util.Map;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IStreamsProxy;
+import org.eclipse.debug.core.model.RuntimeProcess;
+
+public class RemoteAntRuntimeProcess extends RuntimeProcess {
+
+	/**
+	 * Constructs a RuntimeProcess on the given system process
+	 * with the given name, adding this process to the given
+	 * launch.
+	 * Sets the streams proxy to an AntStreamsProxy if output is captured.
+	 */
+	public RemoteAntRuntimeProcess(ILaunch launch, Process process, String name, Map attributes) {
+		super(launch, process, name, attributes);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.RuntimeProcess#createStreamsProxy()
+	 */
+	protected IStreamsProxy createStreamsProxy() {
+		return new AntStreamsProxy();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java
new file mode 100644
index 0000000..ec8ae33
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/launching/IAntLaunchConstants.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ant.launching;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+
+/**
+ * Constant definitions for Ant launch configurations.
+ * 
+ * @since 1.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IAntLaunchConstants {
+
+	/**
+	 * Ant launch configuration type identifier.
+	 */
+	public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntLaunchConfigurationType"; //$NON-NLS-1$
+
+	public static final String MAIN_TYPE_NAME= "org.eclipse.ant.internal.launching.remote.InternalAntRunner"; //$NON-NLS-1$
+	
+	/**
+	 * Ant builder launch configuration type identifier. Ant project builders
+	 * are of this type.
+	 */
+	public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$NON-NLS-1$
+
+	/**
+	 * String attribute indicating the Ant targets to execute. Default value is
+	 * <code>null</code> which indicates that the default target is to be
+	 * executed. Format is a comma separated listing of targets.
+	 */
+	public static final String ATTR_ANT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * String attribute indicating the Ant targets to execute after a clean
+	 * (full build) for an Ant builder. Default value is <code>null</code> which
+	 * indicates that the default target is to be executed. Format is a comma
+	 * separated listing of targets.
+	 */
+	public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * String attribute indicating the Ant targets to execute during a manual
+	 * build for an Ant builder. Default value is <code>null</code> which
+	 * indicates that the default target is to be executed. Format is a comma
+	 * separated listing of targets.
+	 */
+	public static final String ATTR_ANT_MANUAL_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * String attribute indicating the Ant targets to execute during an auto
+	 * build for an Ant builder. Default value is <code>null</code> which
+	 * indicates that the default target is to be executed. Format is a comma
+	 * separated listing of targets.
+	 */
+	public static final String ATTR_ANT_AUTO_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * String attribute indicating the Ant targets to execute during a clean for
+	 * an Ant builder. Default value is <code>null</code> which indicates that
+	 * the default target is to be executed. Format is a comma separated listing
+	 * of targets.
+	 */
+	public static final String ATTR_ANT_CLEAN_TARGETS = "org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * Boolean attribute indicating whether or not target specification for an
+	 * Ant builder has been updated for 3.1
+	 */
+	public static final String ATTR_TARGETS_UPDATED = "org.eclipse.ant.ui.ATTR_TARGETS_UPDATED"; //$NON-NLS-1$
+
+	/**
+	 * Map attribute indicating the Ant properties to be defined during the
+	 * build. Default value is <code>null</code> which indicates no additional
+	 * properties will be defined.
+	 */
+	public static final String ATTR_ANT_PROPERTIES = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_PROPERTIES"; //$NON-NLS-1$					
+
+	/**
+	 * String attribute indicating the Ant targets to execute. Default value is
+	 * <code>null</code> which indicates that no additional property files will
+	 * be defined. Format is a comma separated listing of property files.
+	 */
+	public static final String ATTR_ANT_PROPERTY_FILES = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_PROPERTY_FILES"; //$NON-NLS-1$
+
+	/**
+	 * Boolean attribute indicating whether or not internal targets (targets
+	 * with no description) should be hidden from the user in the launch
+	 * configuration dialog. Default value is <code>false</code> which indicates
+	 * that all targets will be displayed.
+	 */
+	public static final String ATTR_HIDE_INTERNAL_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_HIDE_INTERNAL_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * Integer attribute indicating which column targets should be sorted on. A
+	 * value of 0 indicates target name, 1 indicates target description, and -1
+	 * indicates no sort. Default value is -1.
+	 */
+	public static final String ATTR_SORT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + "ATTR_SORT_TARGETS"; //$NON-NLS-1$
+
+	/**
+	 * Boolean attribute indicating if the default VM install should be used for
+	 * the separate JRE build Default value is <code>false</code> for backwards
+	 * compatibility
+	 */
+	public static final String ATTR_DEFAULT_VM_INSTALL = "org.eclipse.ant.ui.DEFAULT_VM_INSTALL"; //$NON-NLS-1$
+
+	/**
+	 * Identifier for Ant processes (value
+	 * <code>org.eclipse.ant.ui.antProcess</code>). This identifier is set as
+	 * the value for the <code>IProcess.ATTR_PROCESS_TYPE</code> attribute in
+	 * processes created by the Ant launch delegate.
+	 */
+	public static final String ID_ANT_PROCESS_TYPE = "org.eclipse.ant.ui.antProcess"; //$NON-NLS-1$
+
+}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/package.html b/eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/package.html
copy to eclipse/plugins/org.eclipse.ant.launching/src/org/eclipse/ant/launching/package.html
diff --git a/eclipse/plugins/org.eclipse.ant.ui/.classpath b/eclipse/plugins/org.eclipse.ant.ui/.classpath
index 959e739..bb1af3b 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/.classpath
+++ b/eclipse/plugins/org.eclipse.ant.ui/.classpath
@@ -1,10 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="Ant Tools Support"/>
-	<classpathentry output="ant_runner_support_bin" kind="src" path="Ant Runner Support"/>
+	<classpathentry kind="src" output="ant_runner_support_bin" path="Ant Runner Support"/>
 	<classpathentry kind="src" path="Ant Editor"/>
-	<classpathentry output="remote_support_bin" kind="src" path="Remote Ant Support"/>
-	<classpathentry output="common_ant_support_bin" kind="src" path="Common Ant Support"/>
+	<classpathentry kind="src" output="remote_support_bin" path="Remote Ant Support"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.ant.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ant.ui/.settings/org.eclipse.jdt.core.prefs
index 374f472..3e6e01e 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.ant.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Dec 01 09:56:26 PST 2008
+#Wed Oct 14 08:50:53 CDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -53,6 +53,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -86,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
 org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java
index 58c824e..d31247b 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/AntEditorCompletionProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2011 GEBIT Gesellschaft fuer EDV-Beratung
+ * Copyright (c) 2002, 2008 GEBIT Gesellschaft fuer EDV-Beratung
  * und Informatik-Technologien mbH, 
  * Berlin, Duesseldorf, Frankfurt (Germany) and others.
  * All rights reserved. This program and the accompanying materials 
@@ -12,6 +12,7 @@
  * 	   IBM Corporation - bug fixes
  *     John-Mason P. Shackelford (john-mason.shackelford at pearson.com) - bug 49383, 56299, 59024
  *     Brock Janiczak (brockj_eclipse at ihug.com.au ) - bug 78028, 78030 
+ *     Remy Chi Jian Suen - bug 277587
  *******************************************************************************/
 
 package org.eclipse.ant.internal.ui.editor;
@@ -42,7 +43,6 @@ import org.apache.tools.ant.taskdefs.MacroDef;
 import org.apache.tools.ant.taskdefs.MacroInstance;
 import org.apache.tools.ant.types.EnumeratedAttribute;
 import org.apache.tools.ant.types.Reference;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
@@ -300,13 +300,12 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
 		ITextSelection selection= (ITextSelection) viewer.getSelectionProvider().getSelection();
 
 		// adjust offset to end of normalized selection
-		int newoffset = offset;
-		if (selection.getOffset() == newoffset) {
-			newoffset= selection.getOffset() + selection.getLength();
+		if (selection.getOffset() == offset) {
+			offset= selection.getOffset() + selection.getLength();
 		}
 
-		String prefix= extractPrefix(viewer, newoffset);
-		Region region= new Region(newoffset - prefix.length(), prefix.length());
+		String prefix= extractPrefix(viewer, offset);
+		Region region= new Region(offset - prefix.length(), prefix.length());
 		TemplateContext context= createContext(viewer, region);
 		if (context == null) {
 			return new ICompletionProposal[0];
@@ -489,14 +488,14 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
         }
         
         if (proposals.length > 0) {
-        	errorMessage= IAntCoreConstants.EMPTY_STRING;
+        	errorMessage= ""; //$NON-NLS-1$
         }
         return proposals;
 
     }
     
     private ICompletionProposal[] getProjectAttributeValueProposals(String prefix, String attributeName) {
-		if (attributeName.equalsIgnoreCase(IAntCoreConstants.DEFAULT)) {
+		if (attributeName.equalsIgnoreCase("default")) { //$NON-NLS-1$
 			return getDefaultValueProposals(prefix);
 		}
 
@@ -514,7 +513,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
 			target = (Target) itr.next();
 			targetName= target.getName();
 			if (targetName.toLowerCase().startsWith(prefix) && targetName.length() > 0) {
-				defaultProposals.add(new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), null, targetName, target.getDescription(), AntCompletionProposal.TASK_PROPOSAL));
+				defaultProposals.add(new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), getTargetImage(targetName), targetName, target.getDescription(), AntCompletionProposal.TASK_PROPOSAL));
 			}
 		}
 
@@ -593,13 +592,34 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
                 continue;
             }
             if (targetName.toLowerCase().startsWith(prefix) && targetName.length() > 0){
-                ICompletionProposal proposal = new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), null, targetName, ((Target)targets.get(targetName)).getDescription(), AntCompletionProposal.TASK_PROPOSAL);
+                ICompletionProposal proposal = new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), getTargetImage(targetName), targetName, ((Target)targets.get(targetName)).getDescription(), AntCompletionProposal.TASK_PROPOSAL);
                 proposals.add(proposal);
                 index++;
             }
         }
         return (ICompletionProposal[])proposals.toArray(new ICompletionProposal[proposals.size()]);      
     }
+    
+    /**
+     * Retrieves the representative image of a target of the given name. If the
+     * target cannot be found, <code>null</code> will be returned. 
+     * 
+     * @param targetName the target's name
+     * @return an image suitable for representating the target, or <code>null</code> if the target cannot be found
+     * @since 3.6
+     */
+    private Image getTargetImage(String targetName) {
+		AntTargetNode targetNode = antModel.getTargetNode(targetName);
+		if (targetNode == null) {
+			return null;
+		} else if (targetNode.isInternal()) {
+			return AntUIImages.getImage(IAntUIConstants.IMG_ANT_TARGET_INTERNAL);
+		} else if (targetNode.isDefaultTarget()) {
+			return AntUIImages.getImage(IAntUIConstants.IMG_ANT_DEFAULT_TARGET);
+		} else {
+			return AntUIImages.getImage(IAntUIConstants.IMG_ANT_TARGET);
+		}
+    }
 
 	private ICompletionProposal[] getDependsValueProposals(IDocument document, String prefix) {
 		List possibleDependencies = new ArrayList();
@@ -634,7 +654,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
 		int i= 0;
 		for (Iterator iter = possibleDependencies.iterator(); iter.hasNext(); i++) {
 			String targetName = (String) iter.next();
-			ICompletionProposal proposal = new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), null, targetName, ((Target)targets.get(targetName)).getDescription(), AntCompletionProposal.TASK_PROPOSAL);
+			ICompletionProposal proposal = new AntCompletionProposal(targetName, cursorPosition - prefix.length(), prefix.length(), targetName.length(), getTargetImage(targetName), targetName, ((Target)targets.get(targetName)).getDescription(), AntCompletionProposal.TASK_PROPOSAL);
 			proposals[i]= proposal;
 		}
 		return proposals;
@@ -828,7 +848,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
 			}
 			String description = getDescriptionProvider().getDescriptionForTaskAttribute(taskName, attrName);
 			if(description != null) {
-			    proposalInfo = (proposalInfo == null ? IAntCoreConstants.EMPTY_STRING : proposalInfo);
+			    proposalInfo = (proposalInfo == null ? "" : proposalInfo); //$NON-NLS-1$
 			    proposalInfo += description;
 			}
 		}
@@ -1322,7 +1342,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
         if (startOfWordToken != anOffset) {
             currentPrefix= aDocumentText.substring(startOfWordToken, anOffset).toLowerCase();
         } else {
-            currentPrefix= IAntCoreConstants.EMPTY_STRING;
+            currentPrefix= ""; //$NON-NLS-1$
         }
         return currentPrefix;
     }
@@ -1386,19 +1406,14 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
             int spaceIndex = stringToPrefix.lastIndexOf(' ');
             int lessThanIndex = stringToPrefix.lastIndexOf('<');
             int greaterThanIndex = stringToPrefix.lastIndexOf('>');
+            
             // Task proposal
-            if(greaterThanIndex < lessThanIndex) {
-            	//we are inside an open element
-            	if(lastChar == '$') {
-            		return PROPOSAL_MODE_PROPERTY_PROPOSAL;
-            	}
-            	if(lessThanIndex > spaceIndex) {
-	                int slashIndex = stringToPrefix.lastIndexOf('/');
-	                if(slashIndex == lessThanIndex +1) {
-	                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
-	                }
-	                return PROPOSAL_MODE_TASK_PROPOSAL;
-            	}
+            if(lessThanIndex > spaceIndex && greaterThanIndex < lessThanIndex) {
+                int slashIndex = stringToPrefix.lastIndexOf('/');
+                if(slashIndex == lessThanIndex +1) {
+                    return PROPOSAL_MODE_TASK_PROPOSAL_CLOSING; // ... </
+                }
+                return PROPOSAL_MODE_TASK_PROPOSAL;
             }
             if(lessThanIndex < greaterThanIndex) {
             	if (isPropertyProposalMode(stringToPrefix)) {
@@ -1572,7 +1587,7 @@ public class AntEditorCompletionProcessor  extends TemplateCompletionProcessor i
     		node= antModel.getOpenElement();
     	}
     	if (node == null) {
-    		return IAntCoreConstants.EMPTY_STRING;
+    		return ""; //$NON-NLS-1$
     	} else if (node instanceof AntTaskNode) {
     		String name= node.getName();
     		if (offset <= node.getOffset() + name.length() - 1) {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RunToLineAdapter.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RunToLineAdapter.java
index b4dcccd..ad90610 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RunToLineAdapter.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/RunToLineAdapter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,10 +13,10 @@ package org.eclipse.ant.internal.ui.editor.actions;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.ant.internal.launching.debug.model.AntDebugElement;
+import org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.ant.internal.ui.debug.model.AntDebugElement;
-import org.eclipse.ant.internal.ui.debug.model.AntLineBreakpoint;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleLineBreakpointAction.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleLineBreakpointAction.java
index 0123a82..46a5312 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleLineBreakpointAction.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/actions/ToggleLineBreakpointAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.editor.actions;
 
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.ant.internal.ui.debug.model.AntLineBreakpoint;
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
+import org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java
index 8864e91..69728fe 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/outline/AntEditorContentOutlinePage.java	
@@ -17,7 +17,6 @@ package org.eclipse.ant.internal.ui.editor.outline;
 
 import java.util.List;
 
-import org.apache.tools.ant.Target;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
@@ -109,11 +108,7 @@ public class AntEditorContentOutlinePage extends ContentOutlinePage implements I
 					return false;
 				}
 			    if (fFilterInternalTargets && node instanceof AntTargetNode) {
-					Target target= ((AntTargetNode)node).getTarget();
-					if (target.getDescription() == null && !((AntTargetNode)node).isDefaultTarget()) {
-					    return false;
-					}
-					return true;
+					return !((AntTargetNode)node).isInternal();
 				} 
 			    if (fFilterProperties && node instanceof AntPropertyNode) {
 					return false;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntAnnotationModel.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntAnnotationModel.java
index 0685485..e055a50 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntAnnotationModel.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/AntAnnotationModel.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.ant.internal.launching.debug.IAntDebugConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
 import org.eclipse.ant.internal.ui.editor.outline.AntEditorMarkerUpdater;
 import org.eclipse.ant.internal.ui.model.IProblem;
 import org.eclipse.ant.internal.ui.model.IProblemRequestor;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java
index c162383..90f616b 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Editor/org/eclipse/ant/internal/ui/editor/text/XMLTextHover.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,25 +18,18 @@ import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.AbstractFileSet;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.PatternSet;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-
-import org.eclipse.ant.internal.ui.debug.model.AntProperty;
-import org.eclipse.ant.internal.ui.debug.model.AntStackFrame;
-import org.eclipse.ant.internal.ui.debug.model.AntValue;
+import org.eclipse.ant.internal.launching.debug.model.AntProperty;
+import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
+import org.eclipse.ant.internal.launching.debug.model.AntValue;
 import org.eclipse.ant.internal.ui.editor.AntEditor;
 import org.eclipse.ant.internal.ui.editor.AntEditorSourceViewerConfiguration;
 import org.eclipse.ant.internal.ui.model.AntElementNode;
 import org.eclipse.ant.internal.ui.model.AntModel;
 import org.eclipse.ant.internal.ui.model.AntPropertyNode;
 import org.eclipse.ant.internal.ui.model.IAntModel;
-
 import org.eclipse.core.runtime.IAdaptable;
-
+import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.jface.internal.text.html.HTMLPrinter;
-
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.DefaultInformationControl;
 import org.eclipse.jface.text.IDocument;
@@ -52,11 +45,9 @@ import org.eclipse.jface.text.information.IInformationProviderExtension2;
 import org.eclipse.jface.text.source.Annotation;
 import org.eclipse.jface.text.source.IAnnotationModel;
 import org.eclipse.jface.text.source.ISourceViewer;
-
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.editors.text.EditorsUI;
 
-import org.eclipse.debug.ui.DebugUITools;
-
 
 public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformationProviderExtension2 {
 
@@ -210,8 +201,8 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
 				HTMLPrinter.addBullet(buffer, includes[i]);
 			}
 		}
-		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
-		HTMLPrinter.addParagraph(buffer, IAntCoreConstants.EMPTY_STRING);
+		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
+		HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
 		if (excludes != null && excludes.length > 0) {
 			HTMLPrinter.addSmallHeader(buffer, AntEditorTextMessages.XMLTextHover_6);
 			for (int i = 0; i < excludes.length; i++) {
@@ -311,25 +302,24 @@ public class XMLTextHover implements ITextHover, ITextHoverExtension, IInformati
 
 	private static IRegion cleanRegionForNonProperty(int offset, IDocument document, IRegion region) throws BadLocationException {
 		//do not allow spaces in region that is not a property
-		IRegion r = region;
-		String text= document.get(r.getOffset(), r.getLength());
+		String text= document.get(region.getOffset(), region.getLength());
 		if (text.startsWith("/")) { //$NON-NLS-1$
 			text= text.substring(1);
-			r= new Region(r.getOffset() + 1, r.getLength() - 1);
+			region= new Region(region.getOffset() + 1, region.getLength() - 1);
 		}
 		StringTokenizer tokenizer= new StringTokenizer(text, " "); //$NON-NLS-1$
 		if (tokenizer.countTokens() != 1) {
 		    while(tokenizer.hasMoreTokens()) {
 		        String token= tokenizer.nextToken();
 		        int index= text.indexOf(token);
-		        if (r.getOffset() + index <= offset && r.getOffset() + index + token.length() >= offset) {
-		            r= new Region(r.getOffset() + index, token.length());
+		        if (region.getOffset() + index <= offset && region.getOffset() + index + token.length() >= offset) {
+		            region= new Region(region.getOffset() + index, token.length());
 		            break;
 		        }
 		    }
 		}
 		
-		return r;
+		return region;
 	}
 	
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.java
index f4add39..8679430 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -19,16 +19,6 @@ public class AntSupportMessages extends NLS {
 	public static String AntInputHandler_Unable_to_respond_to__input__request_4;
 	public static String AntInputHandler_5;
 
-	public static String NullBuildLogger_1;
-	public static String AntProcessBuildLogger_Total_time;
-	public static String AntProcessBuildLogger__minutes_2;
-	public static String AntProcessBuildLogger__minute_3;
-	public static String AntProcessBuildLogger__seconds_4;
-	public static String AntProcessBuildLogger__second_5;
-	public static String AntProcessBuildLogger__milliseconds_6;
-	
-	public static String AntProcessDebugBuildLogger_1;
-
 	static {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, AntSupportMessages.class);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.properties
index 57b5346..ae3bff0 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/AntSupportMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,13 +13,3 @@ AntInputHandler_Ant_Input_Request_1=Ant Input Request
 AntInputHandler_Invalid_input_2=Input does not match validargs attribute
 AntInputHandler_Unable_to_respond_to__input__request_4=Unable to respond to <input> request
 AntInputHandler_5=Unable to respond to input request as a result of the user specified -noinput command
-
-NullBuildLogger_1=BUILD FAILED
-AntProcessBuildLogger_Total_time=Total time: 
-AntProcessBuildLogger__minutes_2=\ minutes
-AntProcessBuildLogger__minute_3=\ minute
-AntProcessBuildLogger__seconds_4=\ seconds
-AntProcessBuildLogger__second_5=\ second
-AntProcessBuildLogger__milliseconds_6=\ milliseconds
-
-AntProcessDebugBuildLogger_1=Build cancelled.
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessBuildLogger.java
deleted file mode 100644
index b7caa0a..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessBuildLogger.java	
+++ /dev/null
@@ -1,350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Matt Conway - Patch for Bug 28052
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.antsupport.logger;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.util.FileUtils;
-import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.ant.internal.ui.ExternalHyperlink;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.antsupport.AntSupportMessages;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.AntDebugState;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntProcess;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntStreamMonitor;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntStreamsProxy;
-import org.eclipse.ant.internal.ui.launchConfigurations.TaskLinkManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.console.FileLink;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.ui.console.IHyperlink;
-	
-public class AntProcessBuildLogger extends NullBuildLogger {
-	
-	private File fBuildFileParent= null;
-	private long fStartTime;
-    private Map fFileNameToIFile= new HashMap();
-
-	/**
-	 * Associated process - discovered as needed to log messages
-	 */
-	private AntProcess fProcess = null;
-	
-	protected void logMessage(String message, BuildEvent event, int overridePriority) {
-		int priority= overridePriority;
-		if (priority == -1) {
-			priority= event.getPriority();
-		} 
-		
-		if (priority > getMessageOutputLevel()) {
-			return;
-		}
-		AntProcess antProcess = getAntProcess(fProcessId);
-		if (antProcess == null) {
-			return;
-		}
-		
-		StringBuffer fullMessage= new StringBuffer();
-		 if (!loggingToLogFile()) {
-			fullMessage.append(System.getProperty("line.separator")); //$NON-NLS-1$
-		}
-		if (event.getException() == null && event.getTask() != null && !fEmacsMode) {
-			adornMessage(event, fullMessage);
-		} else {
-			fullMessage.append(message);
-		}
-		message= fullMessage.toString();
-		
-		if (loggingToLogFile()) {
-			logMessageToLogFile(message, priority);
-		} else {
-			AntStreamMonitor monitor = getMonitor(priority);
-			monitor.append(message);
-		}
-	}
-
-	/**
-	 * Builds a right justified task prefix for the given build event, placing it
-	 * in the given string buffer. Creates the hyperlinks for the task prefix. 
-	 *  
-	 * @param event build event
-	 * @param fullMessage buffer to place task prefix in
-	 */
-	private void adornMessage(BuildEvent event, StringBuffer fullMessage) {
-		String name = event.getTask().getTaskName();
-		if (name == null) {
-			name = "null"; //$NON-NLS-1$
-		}
-		Location location = event.getTask().getLocation();
-		StringBuffer column= new StringBuffer();
-		int size = IAntUIConstants.LEFT_COLUMN_SIZE - (name.length() + 3);
-		for (int i = 0; i < size; i++) {
-			column.append(' ');
-		}
-		StringBuffer labelBuff= new StringBuffer();
-		labelBuff.append('[');
-		labelBuff.append(name);
-		labelBuff.append("] "); //$NON-NLS-1$
-		
-		int offset = Math.max(size, 0) + 1;
-		String label= labelBuff.toString();
-		if (event.getMessage() == null) {
-			return;
-		}
-		try {
-			BufferedReader r = new BufferedReader(new StringReader(event.getMessage()));
-			String line = r.readLine();
-			fullMessage.append(column);
-			appendAndLink(fullMessage, location, label, offset, line);
-			line = r.readLine();
-			while (line != null) {
-				fullMessage.append(System.getProperty("line.separator")); //$NON-NLS-1$
-				fullMessage.append(column);
-				appendAndLink(fullMessage, location, label, offset, line);
-				line = r.readLine();
-			}
-		} catch (IOException e) {
-			if (event.getMessage() != null) {
-				fullMessage.append(label).append(event.getMessage());
-			}
-		}
-	}
-	
-	private void appendAndLink(StringBuffer fullMessage, Location location, String label, int offset, String line) {
-		fullMessage.append(label);
-		fullMessage.append(line);
-		if (location != null) {
-			String newLine= (label + line).trim();
-			IRegion region= new Region(offset, label.length() - 3); // only want the name length "[name] "
-			IHyperlink link= getLocationLink(location);
-			if (link != null) {
-				TaskLinkManager.addTaskHyperlink(getAntProcess(fProcessId), link, region, newLine);
-			}
-		}
-	}
-
-	private AntStreamMonitor getMonitor(int priority) {
-		AntStreamsProxy proxy = (AntStreamsProxy)fProcess.getStreamsProxy();
-		AntStreamMonitor monitor = null;
-		switch (priority) {
-			case Project.MSG_INFO:
-				monitor = (AntStreamMonitor)proxy.getOutputStreamMonitor();
-				break;
-			case Project.MSG_ERR:
-				monitor = (AntStreamMonitor)proxy.getErrorStreamMonitor();
-				break;
-			case Project.MSG_DEBUG:
-				monitor = (AntStreamMonitor)proxy.getDebugStreamMonitor();
-				break;
-			case Project.MSG_WARN:
-				monitor = (AntStreamMonitor)proxy.getWarningStreamMonitor();
-				break;
-			case Project.MSG_VERBOSE:
-				monitor = (AntStreamMonitor)proxy.getVerboseStreamMonitor();
-				break;
-		}
-		return monitor;
-	}
-
-	private void logMessageToLogFile(String message, int priority) {
-		if (priority == Project.MSG_ERR) {
-			getErrorPrintStream().println(message);
-		} else {
-			getOutputPrintStream().println(message);
-		}
-	}
-	
-	/**
-	 * Returns a hyperlink for the given task, or <code>null</code> if unable to
-	 * parse a valid location for the task. The link is set to exist at the specified
-	 * offset and length.
-	 * 
-	 * @return hyper link, or <code>null</code>
-	 */
-	private IHyperlink getLocationLink(Location location) {
-		if (location != null && !location.equals(Location.UNKNOWN_LOCATION)) {
-            try {
-                String fileName= location.getFileName();
-                IFile file= (IFile) fFileNameToIFile.get(fileName);
-                int lineNumber= location.getLineNumber();
-                if (file != null) {
-                    return new FileLink(file, null, -1, -1, lineNumber);
-                } 
-                file= AntUtil.getFileForLocation(fileName, fBuildFileParent);
-                if (file != null) {
-                    fFileNameToIFile.put(fileName, file);
-                    return new FileLink(file, null, -1, -1, lineNumber);
-                }
-                //maintain backwards compatibility
-                File javaIOFile= FileUtils.newFileUtils().resolveFile(fBuildFileParent, fileName);
-                if (javaIOFile.exists()) {
-                    return new ExternalHyperlink(javaIOFile, lineNumber);
-                }
-            } catch (NoSuchMethodError e) {
-                //support for Ant older than 1.6
-                return AntUtil.getLocationLink(location.toString(), fBuildFileParent);
-            }
-		}
-		return null;
-	}	
-	
-	/**
-	 * Returns the associated Ant process, finding it if necessary, if not
-	 * already found.
-	 */
-	protected AntProcess getAntProcess(String processId) {
-		if (fProcess == null && processId != null) {
-			IProcess[] all = DebugPlugin.getDefault().getLaunchManager().getProcesses();
-			for (int i = 0; i < all.length; i++) {
-				IProcess process = all[i];
-				if (process instanceof AntProcess && processId.equals(process.getAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID))) {
-					fProcess = (AntProcess)process;
-					break;
-				}
-			}
-		}
-		return fProcess;
-	}
-
-	/* (non-Javadoc)
-	 * Set the start time.
-	 * 
-	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void buildStarted(BuildEvent event) {
-		fStartTime= System.currentTimeMillis();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void buildFinished(BuildEvent event) {
-        String message= handleException(event);
-        if (message != null) {
-        	try {
-    			BufferedReader r = new BufferedReader(new StringReader(message));
-    			String line = r.readLine();
-    			logMessage(line, event, Project.MSG_ERR);
-    			line = r.readLine();
-    			AntProcess antProcess = getAntProcess(fProcessId);
-    			while (line != null) {
-    				logMessage(line, event, Project.MSG_ERR);
-    				if (!message.startsWith("Total time:")) { //$NON-NLS-1$
-    					AntUtil.linkBuildFailedMessage(line, antProcess);
-    				}
-    				line = r.readLine();
-    			}
-    			logMessage("", event, Project.MSG_ERR); //$NON-NLS-1$
-    		} catch (IOException e) {
-    		}
-        }
-		fHandledException= null;
-		fBuildFileParent= null;
-		if (!(event.getException() instanceof OperationCanceledException)) {
-			logMessage(getTimeString(System.currentTimeMillis() - fStartTime), event, fMessageOutputLevel);
-		}
-		fProcess= null;
-		event.getProject().removeBuildListener(this);
-        fFileNameToIFile= null;
-	}
-	
-	private String getTimeString(long milliseconds) {
-			long seconds = milliseconds / 1000;
-			long minutes = seconds / 60;
-			seconds= seconds % 60;
-		
-			StringBuffer result= new StringBuffer(AntSupportMessages.AntProcessBuildLogger_Total_time);
-			if (minutes > 0) {
-				result.append(minutes);
-				if (minutes > 1) {
-					result.append(AntSupportMessages.AntProcessBuildLogger__minutes_2);
-				} else {
-					result.append(AntSupportMessages.AntProcessBuildLogger__minute_3);
-				}
-			}
-			if (seconds > 0) {
-				if (minutes > 0) {
-					result.append(' ');
-				}
-				result.append(seconds);
-			
-				if (seconds > 1) {
-					result.append(AntSupportMessages.AntProcessBuildLogger__seconds_4);
-				} else {
-					result.append(AntSupportMessages.AntProcessBuildLogger__second_5);
-				} 
-			}
-			if (seconds == 0 && minutes == 0) {
-				result.append(milliseconds);
-				result.append(AntSupportMessages.AntProcessBuildLogger__milliseconds_6);
-			}
-			
-			result.append(System.getProperty("line.separator")); //$NON-NLS-1$
-			return result.toString();
-		}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
-	 */
-	public void messageLogged(BuildEvent event) {
-		if (event.getPriority() > getMessageOutputLevel()) {
-			return;
-		}
-		if (event.getMessage() != null && event.getMessage().length() > 0) {
-			logMessage(event.getMessage(), event, -1);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void targetStarted(BuildEvent event) {
-		if (Project.MSG_INFO > getMessageOutputLevel()) {
-			return;
-		}
-		Target target= event.getTarget();
-		StringBuffer msg= new StringBuffer(System.getProperty("line.separator")); //$NON-NLS-1$
-		String targetName= target.getName();
-		msg.append(targetName);
-		msg.append(':');
-		String message= msg.toString();
-		Location location= AntDebugState.getLocation(target);
-		if (location != null && location != Location.UNKNOWN_LOCATION) {
-			IRegion region= new Region(0, targetName.length());
-			IHyperlink link= getLocationLink(location);
-			if (link != null) {
-				TaskLinkManager.addTaskHyperlink(getAntProcess(fProcessId), link, region, message.trim());
-			}
-		}
-		logMessage(message, event, Project.MSG_INFO);
-	}
-	
-	private boolean loggingToLogFile() {
-		//check if user has designated to log to a log file
-		return getErrorPrintStream() != null && getErrorPrintStream() != System.err;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessDebugBuildLogger.java
deleted file mode 100644
index ef89099..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/AntProcessDebugBuildLogger.java	
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Location;
-import org.eclipse.ant.internal.ui.antsupport.AntSupportMessages;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.AntDebugState;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger;
-import org.eclipse.ant.internal.ui.debug.IAntDebugController;
-import org.eclipse.ant.internal.ui.debug.model.AntDebugTarget;
-import org.eclipse.ant.internal.ui.debug.model.AntThread;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntProcess;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IProcess;
-
-public class AntProcessDebugBuildLogger extends AntProcessBuildLogger implements IAntDebugController, IDebugBuildLogger {
-	
-	private AntDebugState fDebugState= null;
-	
-	private List fBreakpoints= null;
-    
-	private AntDebugTarget fAntDebugTarget;
-	private boolean fResumed= false;
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void buildStarted(BuildEvent event) {
-		fDebugState= new AntDebugState(this);
-		super.buildStarted(event);
-		IProcess process= getAntProcess(fProcessId);
-		ILaunch launch= process.getLaunch();
-		fAntDebugTarget= new AntDebugTarget(launch, process, this);
-		launch.addDebugTarget(fAntDebugTarget);
-        
-        fAntDebugTarget.buildStarted();
-        fDebugState.buildStarted();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void taskFinished(BuildEvent event) {
-		super.taskFinished(event);
-		fDebugState.taskFinished();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void taskStarted(BuildEvent event) {
-        super.taskStarted(event);
-		fDebugState.taskStarted(event);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger#waitIfSuspended()
-	 */
-	public synchronized void waitIfSuspended() {
-		fResumed= false;
-		IBreakpoint breakpoint= breakpointAtLineNumber(fDebugState.getBreakpointLocation());
-		if (breakpoint != null) {
-			 fAntDebugTarget.breakpointHit(breakpoint);
-			 try {
-				 while (!fResumed) {
-					 wait(500);
-					 checkCancelled();
-				 }
-			 } catch (InterruptedException e) {
-			 }
-		} else if (fDebugState.getCurrentTask() != null) {
-			int detail= -1;
-	        boolean shouldSuspend= true;
-	        if (fDebugState.isStepIntoSuspend()) {
-	            detail= DebugEvent.STEP_END;
-	            fDebugState.setStepIntoSuspend(false);               
-	        } else if ((fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepOverTask()) || fDebugState.shouldSuspend()) {
-				detail= DebugEvent.STEP_END;
-				fDebugState.setShouldSuspend(false);
-				fDebugState.setStepOverTask(null);
-	        } else if (fDebugState.isClientSuspend()) {
-	            detail= DebugEvent.CLIENT_REQUEST;
-	            fDebugState.setClientSuspend(false);
-	        } else {
-	            shouldSuspend= false;
-	        }
-	        if (shouldSuspend) {
-                fAntDebugTarget.suspended(detail);
-	            try {
-	            	while (!fResumed) {
-	            		wait(500);
-	            		checkCancelled();
-	            	}
-	            } catch (InterruptedException e) {
-	            }
-	        }
-	    }
-	}
-
-	private void checkCancelled() {
-		AntProcess process= getAntProcess(fProcessId);
-		if (process != null && process.isCanceled()) {
-			throw new OperationCanceledException(AntSupportMessages.AntProcessDebugBuildLogger_1);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#resume()
-	 */
-	public synchronized void resume() {
-		fResumed= true;
-        notifyAll();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#suspend()
-	 */
-	public synchronized void suspend() {
-		fDebugState.setClientSuspend(true);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepInto()
-	 */
-	public synchronized void stepInto() {
-		fDebugState.setStepIntoSuspend(true);
-		fResumed= true;
-		notifyAll();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepOver()
-	 */
-	public synchronized void stepOver() {
-		fResumed= true;
-		fDebugState.stepOver();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#handleBreakpoint(org.eclipse.debug.core.model.IBreakpoint, boolean)
-	 */
-	public void handleBreakpoint(IBreakpoint breakpoint, boolean added) {
-		if (added) {
-			if (fBreakpoints == null) {
-				fBreakpoints= new ArrayList();
-			}
-			if (!fBreakpoints.contains(breakpoint)) {
-				fBreakpoints.add(breakpoint);
-			}
-		} else {
-			if (fBreakpoints != null) {
-				fBreakpoints.remove(breakpoint);
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getProperties()
-	 */
-	public void getProperties() {
-		if (!fAntDebugTarget.isSuspended()) {
-			return;
-		}
-	    StringBuffer propertiesRepresentation= new StringBuffer();
-		fDebugState.marshallProperties(propertiesRepresentation, false);
-		if (fAntDebugTarget.getThreads().length > 0) {
-			((AntThread) fAntDebugTarget.getThreads()[0]).newProperties(propertiesRepresentation.toString());
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getStackFrames()
-	 */
-	public void getStackFrames() {
-		StringBuffer stackRepresentation= new StringBuffer();
-		fDebugState.marshalStack(stackRepresentation);
-		((AntThread) fAntDebugTarget.getThreads()[0]).buildStack(stackRepresentation.toString());
-	}
-    
-    private IBreakpoint breakpointAtLineNumber(Location location) {
-        if (fBreakpoints == null || location == null || location == Location.UNKNOWN_LOCATION) {
-            return null;
-        }
-        int lineNumber= fDebugState.getLineNumber(location);
-        File locationFile= new File(fDebugState.getFileName(location));
-        for (int i = 0; i < fBreakpoints.size(); i++) {
-            ILineBreakpoint breakpoint = (ILineBreakpoint) fBreakpoints.get(i);
-            int breakpointLineNumber;
-            try {
-            	if (!breakpoint.isEnabled()) {
-                	continue;
-                }
-            	breakpointLineNumber = breakpoint.getLineNumber();
-            } catch (CoreException e) {
-               return null;
-            }
-            IFile resource= (IFile) breakpoint.getMarker().getResource();
-            if (breakpointLineNumber == lineNumber && resource.getLocation().toFile().equals(locationFile)) {
-                return breakpoint;
-            }
-        }
-        return null;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
-     */
-    public void targetStarted(BuildEvent event) {
-		fDebugState.targetStarted(event);
-		waitIfSuspended();
-		super.targetStarted(event);
-    }
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void targetFinished(BuildEvent event) {
-		super.targetFinished(event);
-		fDebugState.setTargetExecuting(null);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#unescapeString(java.lang.StringBuffer)
-	 */
-	public StringBuffer unescapeString(StringBuffer propertyValue) {
-		return propertyValue;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/NullBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/NullBuildLogger.java
deleted file mode 100644
index 142490d..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Runner Support/org/eclipse/ant/internal/ui/antsupport/logger/NullBuildLogger.java	
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger;
-
-
-import java.io.PrintStream;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.BuildLogger;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.StringUtils;
-import org.eclipse.ant.core.AntSecurityException;
-import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
-import org.eclipse.ant.internal.ui.antsupport.AntSupportMessages;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-public class NullBuildLogger extends AbstractEclipseBuildLogger implements BuildLogger{
-
-	protected int fMessageOutputLevel = Project.MSG_INFO;
-	private PrintStream fErr= null;
-	private PrintStream fOut= null;
-	protected boolean fEmacsMode= false;
-	
-	/**
-	 * An exception that has already been logged.
-	 */
-	protected Throwable fHandledException= null;
-	
-	/**
-	 * @see org.apache.tools.ant.BuildLogger#setMessageOutputLevel(int)
-	 */
-	public void setMessageOutputLevel(int level) {
-		fMessageOutputLevel= level;
-	}
-	
-	protected int getMessageOutputLevel() {
-		return fMessageOutputLevel;
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildLogger#setEmacsMode(boolean)
-	 */
-	public void setEmacsMode(boolean emacsMode) {
-		fEmacsMode= emacsMode;
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void buildStarted(BuildEvent event) {
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void buildFinished(BuildEvent event) {
-		String message= handleException(event);
-        if (message != null) {
-            logMessage(message, getMessageOutputLevel());
-        }
-		fHandledException= null;
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void targetStarted(BuildEvent event) {
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void targetFinished(BuildEvent event) {
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void taskStarted(BuildEvent event) {
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public void taskFinished(BuildEvent event) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
-	 */
-	public void messageLogged(BuildEvent event) {
-		logMessage(event.getMessage(), event.getPriority());
-	}
-
-	protected PrintStream getErrorPrintStream() {
-		return fErr;
-	}
-	
-	protected PrintStream getOutputPrintStream() {
-		return fOut;
-	}
-	
-	/**
-	 * @see org.apache.tools.ant.BuildLogger#setErrorPrintStream(java.io.PrintStream)
-	 */
-	public void setErrorPrintStream(PrintStream err) {
-		//this build logger logs to "null" unless
-		//the user has explicitly set a logfile to use
-		if (err == System.err) {
-			fErr= null;
-		} else {
-			fErr= err;
-		}
-	}
-
-	/**
-	 * @see org.apache.tools.ant.BuildLogger#setOutputPrintStream(java.io.PrintStream)
-	 */
-	public void setOutputPrintStream(PrintStream output) {
-		//this build logger logs to "null" unless
-		//the user has explicitly set a logfile to use
-		if (output == System.out) {
-			fOut= null;
-		} else {
-			fOut= output;
-		}
-	}
-	
-	protected void logMessage(String message, int priority) {
-		if (priority > getMessageOutputLevel()) {
-			return;
-		}
-		
-		if (priority == Project.MSG_ERR) {
-			if (getErrorPrintStream() != null && getErrorPrintStream() != System.err) {
-				//user has designated to log to a logfile
-				getErrorPrintStream().println(message);
-			}
-		} else {
-			if (getOutputPrintStream() != null && getOutputPrintStream() != System.out) {
-				//user has designated to log to a logfile
-				getOutputPrintStream().println(message);
-			} 
-		}
-	}
-	
-	protected String handleException(BuildEvent event) {
-		Throwable exception = event.getException();
-		if (exception == null || exception == fHandledException
-		|| exception instanceof OperationCanceledException
-		|| exception instanceof AntSecurityException) {
-			return null;
-		}
-		fHandledException= exception;
-        StringBuffer message= new StringBuffer();
-        message.append(StringUtils.LINE_SEP);
-        message.append(AntSupportMessages.NullBuildLogger_1);
-        message.append(StringUtils.LINE_SEP);
-        if (Project.MSG_VERBOSE <= fMessageOutputLevel || !(exception instanceof BuildException)) {
-            message.append(StringUtils.getStackTrace(exception));
-        } else {
-            if (exception instanceof BuildException) {
-                message.append(exception.toString()).append(StringUtils.LINE_SEP);
-            } else {
-                message.append(exception.getMessage()).append(StringUtils.LINE_SEP);
-            }
-        }
-        
-		return message.toString();	
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPreferenceInitializer.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPreferenceInitializer.java
index 20886c7..0289642 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPreferenceInitializer.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUIPreferenceInitializer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,9 +34,7 @@ public class AntUIPreferenceInitializer extends AbstractPreferenceInitializer {
 		prefs.setDefault(IAntUIPreferenceConstants.ANT_FIND_BUILD_FILE_NAMES, "build.xml"); //$NON-NLS-1$
 		
 		prefs.setDefault(IAntUIPreferenceConstants.DOCUMENTATION_URL, "http://ant.apache.org/manual"); //$NON-NLS-1$
-        
-        prefs.setDefault(IAntUIPreferenceConstants.ANT_COMMUNICATION_TIMEOUT, 20000);
-		
+	
 		EditorsUI.useAnnotationsPreferencePage(prefs);
 		EditorsUI.useQuickDiffPreferencePage(prefs);
 		if (AntUIPlugin.isMacOS()) {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java
index 9ba1a5c..05b7cd5 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/AntUtil.java	
@@ -11,7 +11,6 @@
 package org.eclipse.ant.internal.ui;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
@@ -20,51 +19,43 @@ import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.StringTokenizer;
 import java.util.regex.Pattern;
 
-import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Target;
-import org.apache.tools.ant.util.FileUtils;
 import org.eclipse.ant.core.AntCorePlugin;
 import org.eclipse.ant.internal.core.AntCoreUtil;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
 import org.eclipse.ant.internal.ui.editor.AntEditor;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntHomeClasspathEntry;
-import org.eclipse.ant.internal.ui.launchConfigurations.TaskLinkManager;
 import org.eclipse.ant.internal.ui.model.AntElementNode;
 import org.eclipse.ant.internal.ui.model.AntModel;
 import org.eclipse.ant.internal.ui.model.AntProjectNode;
 import org.eclipse.ant.internal.ui.model.AntTargetNode;
 import org.eclipse.ant.internal.ui.model.IAntModel;
 import org.eclipse.ant.internal.ui.model.LocationProvider;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.filebuffers.FileBuffers;
 import org.eclipse.core.filebuffers.ITextFileBuffer;
 import org.eclipse.core.filebuffers.ITextFileBufferManager;
 import org.eclipse.core.filebuffers.LocationKind;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.core.variables.IStringVariableManager;
 import org.eclipse.core.variables.VariablesPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.ui.console.FileLink;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry2;
-import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Region;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.program.Program;
 import org.eclipse.swt.widgets.Shell;
@@ -79,8 +70,6 @@ import org.eclipse.ui.browser.IWebBrowser;
 import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
 import org.eclipse.ui.console.IHyperlink;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.part.FileEditorInput;
 import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -96,7 +85,6 @@ public final class AntUtil {
 	public static final char ANT_CLASSPATH_DELIMITER= '*';
 	public static final String ANT_HOME_CLASSPATH_PLACEHOLDER= "G"; //$NON-NLS-1$
 	public static final String ANT_GLOBAL_USER_CLASSPATH_PLACEHOLDER= "UG"; //$NON-NLS-1$
-	
 	private static String fgBrowserId;
 	
 	/**
@@ -114,19 +102,7 @@ public final class AntUtil {
 	 * <code>null</code> if the array is empty.
 	 */
 	public static String combineStrings(String[] strings) {
-		if (strings.length == 0)
-			return null;
-
-		if (strings.length == 1)
-			return strings[0];
-
-		StringBuffer buf = new StringBuffer();
-		for (int i = 0; i < strings.length - 1; i++) {
-			buf.append(strings[i]);
-			buf.append(ATTRIBUTE_SEPARATOR);
-		}
-		buf.append(strings[strings.length - 1]);
-		return buf.toString();
+		return AntLaunchingUtil.combineStrings(strings);
 	}
 
 	/**
@@ -138,35 +114,8 @@ public final class AntUtil {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static String[] getTargetNames(ILaunchConfiguration configuration) throws CoreException {
-        String attribute= null;
-        if (IAntLaunchConfigurationConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE.equals(configuration.getType().getIdentifier())) {
-            attribute= getTargetNamesForAntBuilder(configuration);
-        }
-        if (attribute == null) {
-            attribute = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String) null);
-            if (attribute == null) {
-                return null;
-            } 
-        }
-		
-		return AntUtil.parseRunTargets(attribute);
+		return AntLaunchingUtil.getTargetNames(configuration);
 	}
-	
-	private static String getTargetNamesForAntBuilder(ILaunchConfiguration configuration) throws CoreException {
-        String buildType= ExternalToolBuilder.getBuildType();
-        String targets= null;
-        if (IExternalToolConstants.BUILD_TYPE_AUTO.equals(buildType)) {
-            targets= configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS, (String)null);
-        } else if (IExternalToolConstants.BUILD_TYPE_CLEAN.equals(buildType)) {
-            targets = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS, (String) null);
-        } else if (IExternalToolConstants.BUILD_TYPE_FULL.equals(buildType)) {
-            targets = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS, (String) null);
-        } else if (IExternalToolConstants.BUILD_TYPE_INCREMENTAL.equals(buildType)) {
-            targets = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS, (String) null);
-        }
-       
-        return targets;
-    }
 
     /**
 	 * Returns a map of properties to be defined for the build, or
@@ -177,9 +126,8 @@ public final class AntUtil {
 	 * @return map of properties (name --> value), or <code>null</code>
 	 * @throws CoreException if unable to access the associated attribute
 	 */
-	public static Map getProperties(ILaunchConfiguration configuration) throws CoreException {
-		Map map = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES, (Map) null);
-		return map;
+	public static Map getProperties(ILaunchConfiguration configuration) throws CoreException {		
+		return AntLaunchingUtil.getProperties(configuration);
 	}
 	
 	/**
@@ -190,17 +138,7 @@ public final class AntUtil {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static String getAntHome(ILaunchConfiguration configuration) throws CoreException {
-		IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedRuntimeClasspath(configuration);
-		for (int i = 0; i < entries.length; i++) {
-			IRuntimeClasspathEntry entry = entries[i];
-			if (entry.getType() == IRuntimeClasspathEntry.OTHER) {
-				IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2)entry;
-				if (entry2.getTypeId().equals(AntHomeClasspathEntry.TYPE_ID)) {
-					return ((AntHomeClasspathEntry)entry2).getAntHome();
-				}
-			}
-		}
-		return null;
+		return AntLaunchingUtil.getAntHome(configuration);
 	}
 
 	/**
@@ -213,7 +151,7 @@ public final class AntUtil {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static String[] getPropertyFiles(ILaunchConfiguration configuration) throws CoreException {
-		String attribute = configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES, (String) null);
+		String attribute = configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES, (String) null);
 		if (attribute == null) {
 			return null;
 		}
@@ -412,30 +350,7 @@ public final class AntUtil {
 	 * @throws CoreException if file does not exist, IO problems, or invalid format.
 	 */
 	public static URL[] getCustomClasspath(ILaunchConfiguration config) throws CoreException {
-		boolean useDefault = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
-		if (useDefault) {
-			return null;
-		}
-		IRuntimeClasspathEntry[] unresolved = JavaRuntime.computeUnresolvedRuntimeClasspath(config);
-		// don't consider bootpath entries
-		List userEntries = new ArrayList(unresolved.length);
-		for (int i = 0; i < unresolved.length; i++) {
-			IRuntimeClasspathEntry entry = unresolved[i];
-			if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
-				userEntries.add(entry);
-			}
-		}
-		IRuntimeClasspathEntry[] entries = JavaRuntime.resolveRuntimeClasspath((IRuntimeClasspathEntry[])userEntries.toArray(new IRuntimeClasspathEntry[userEntries.size()]), config);
-		URL[] urls = new URL[entries.length];
-		for (int i = 0; i < entries.length; i++) {
-			IRuntimeClasspathEntry entry = entries[i];
-			try {
-				urls[i] = new URL("file:"+entry.getLocation()); //$NON-NLS-1$
-			} catch (MalformedURLException e) {
-				throw new CoreException(new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), AntUIPlugin.INTERNAL_ERROR, AntUIModelMessages.AntUtil_7, e));
-			}
-		}
-		return urls;		
+		return AntLaunchingUtil.getCustomClasspath(config);
 	}
 
 	private static String expandVariableString(String variableString, String invalidMessage) throws CoreException {
@@ -456,7 +371,7 @@ public final class AntUtil {
 	 * @return a list of target names
 	 */
 	public static String[] parseRunTargets(String extraAttibuteValue) {
-		return parseString(extraAttibuteValue, ATTRIBUTE_SEPARATOR);
+		return AntLaunchingUtil.parseRunTargets(extraAttibuteValue);
 	}
 	
 	/**
@@ -466,19 +381,7 @@ public final class AntUtil {
 	 * @return a list of Strings
 	 */
 	public static String[] parseString(String delimString, String delim) {
-		if (delimString == null) {
-			return new String[0];
-		}
-		
-		// Need to handle case where separator character is
-		// actually part of the target name!
-		StringTokenizer tokenizer = new StringTokenizer(delimString, delim);
-		String[] results = new String[tokenizer.countTokens()];
-		for (int i = 0; i < results.length; i++) {
-			results[i] = tokenizer.nextToken();
-		}
-		
-		return results;
+		return AntLaunchingUtil.parseString(delimString, delim);
 	}
 	
 	/**
@@ -486,8 +389,7 @@ public final class AntUtil {
 	 * The returned IFile may or may not exist.
 	 */
 	public static IFile getFile(String fullPath) {
-		IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
-		return root.getFile(new Path(fullPath));
+		return AntLaunchingUtil.getFile(fullPath);
 	}
 
 	public static IHyperlink getLocationLink(String path, File buildFileParent) {
@@ -540,48 +442,7 @@ public final class AntUtil {
 	 * @see org.eclipse.core.resources.IWorkspaceRoot#findFilesForLocation(IPath)
 	 */
 	public static IFile getFileForLocation(String path, File buildFileParent) {
-		if (path == null) {
-			return null;
-		}
-		IPath filePath= new Path(path);
-		IFile file = null;
-		IFile[] files= ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(filePath);
-		if (files.length > 0) {
-			file= files[0];
-		}
-		if (file == null) {
-			//relative path
-			File relativeFile= null;
-			try {
-				//this call is ok if buildFileParent is null
-				relativeFile= FileUtils.getFileUtils().resolveFile(buildFileParent, path);
-				filePath= new Path(relativeFile.getAbsolutePath());
-				files= ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(filePath);
-				if (files.length > 0) {
-					file= files[0];
-				} else {
-					return null;
-				}
-			} catch (BuildException be) {
-				return null;
-			}
-		}
-		
-		if (file.exists()) {
-			return file;
-		} 
-		File ioFile= file.getLocation().toFile();
-		if (ioFile.exists()) {//needs to handle case insensitivity on WINOS
-			try {
-				files= ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(ioFile.getCanonicalPath()));
-				if (files.length > 0) {
-					return files[0];
-				}
-			} catch (IOException e) {
-			}			
-		}
-			
-		return null;
+		return AntLaunchingUtil.getFileForLocation(path, buildFileParent);
 	}
 
 	/**
@@ -594,40 +455,7 @@ public final class AntUtil {
 	 * @since 3.0
 	 */
 	public static void migrateToNewClasspathFormat(ILaunchConfiguration configuration) throws CoreException {
-		String oldClasspath = configuration.getAttribute(org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants.ATTR_ANT_CUSTOM_CLASSPATH, (String)null);
-		String oldAntHome = configuration.getAttribute(org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants.ATTR_ANT_HOME, (String)null);
-		String provider = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, (String)null);
-		if (oldClasspath != null || oldAntHome != null || provider == null) {
-			ILaunchConfigurationWorkingCopy workingCopy = null;
-			if (configuration.isWorkingCopy()) {
-				workingCopy = (ILaunchConfigurationWorkingCopy) configuration;
-			} else {
-				workingCopy = configuration.getWorkingCopy();
-			}
-			workingCopy.setAttribute(org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants.ATTR_ANT_CUSTOM_CLASSPATH, (String)null);
-			workingCopy.setAttribute(org.eclipse.ant.internal.ui.launchConfigurations.IAntLaunchConfigurationConstants.ATTR_ANT_HOME, (String)null);
-			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
-			workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
-			if (oldAntHome != null) {
-				IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedRuntimeClasspath(workingCopy);
-				List mementos = new ArrayList(entries.length);
-				for (int i = 0; i < entries.length; i++) {
-					IRuntimeClasspathEntry entry = entries[i];
-					if (entry.getType() == IRuntimeClasspathEntry.OTHER) {
-						IRuntimeClasspathEntry2 entry2 = (IRuntimeClasspathEntry2) entry;
-						if (entry2.getTypeId().equals(AntHomeClasspathEntry.TYPE_ID)) {
-							AntHomeClasspathEntry homeEntry = new AntHomeClasspathEntry(oldAntHome);
-							mementos.add(homeEntry.getMemento());
-							continue;
-						}
-					}
-					mementos.add(entry.getMemento());
-				}
-				workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
-				workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, mementos);
-			}
-			workingCopy.doSave();
-		}
+		AntLaunchingUtil.migrateToNewClasspathFormat(configuration);
 	}
 
     private static int getOffset(int line, int column, ITextEditor editor) {
@@ -749,49 +577,62 @@ public final class AntUtil {
 	}
     
     public static boolean isSeparateJREAntBuild(ILaunchConfiguration configuration) {
-    	boolean separateJRE= true;
-		try {
-			//always null for same JRE
-			separateJRE = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, (String)null) != null;
-		} catch (CoreException e) {
-			AntUIPlugin.log(AntUIModelMessages.AntUtil_2, e);
-		}
-    	
-		return separateJRE;
+    	return AntLaunchingUtil.isSeparateJREAntBuild(configuration);
     }
-    
-    public static void linkBuildFailedMessage(String message, IProcess process) {
-        String fileName = null;
-        String lineNumber = ""; //$NON-NLS-1$
-        int fileStart = 0;
-        int index = message.indexOf("xml"); //$NON-NLS-1$
-        if (index > 0) {
-            int numberStart= index + 4;
-            int numberEnd= message.indexOf(':', numberStart);
-            int fileEnd = index + 3;
-            if (numberStart > 0 && fileEnd > 0) {
-                fileName = message.substring(fileStart, fileEnd).trim();
-                if (numberEnd > 0) {
-                    lineNumber = message.substring(numberStart, numberEnd).trim();
-                }
-            }
-        }
-        
-        if (fileName != null) {
-            int num = -1;
-            try {
-                num = Integer.parseInt(lineNumber);
-            } catch (NumberFormatException e) {
-            }
-            IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(fileName));
-            IFile file= null;
-            if (files.length > 0) {
-                file= files[0];
-            }
-            if (file != null && file.exists()) {
-                FileLink link = new FileLink(file, null, -1, -1, num);
-                TaskLinkManager.addTaskHyperlink(process, link, new Region(0, message.length()), message);
-            }
-        }
+
+    /**
+     * Returns if the given extension is a known extension to Ant
+     * i.e. a supported content type extension.
+     * @param resource
+     * @return true if the file extension is supported false otherwise
+     * 
+     * @since 3.6
+     */
+    public static boolean isKnownAntFile(IResource resource) {
+    	IFile file = null;
+    	if(resource.getType() == IResource.FILE) {
+    		file = (IFile) resource;
+    	}
+    	else {
+    		file = (IFile) resource.getAdapter(IFile.class);
+    	}
+    	if(file != null) {
+    		IContentType fileType = IDE.getContentType(file);
+    		IContentType antType = Platform.getContentTypeManager().getContentType(AntCorePlugin.ANT_BUILDFILE_CONTENT_TYPE);
+    		return fileType.isKindOf(antType);
+    	}
+    	return false;
     }
+    
+	/**
+	 * Returns an array of build file names from the ant preference store
+	 * @return an array of build file names
+	 * @since 3.6
+	 */
+	public static String[] getKnownBuildfileNames() {
+		IPreferenceStore prefs = AntUIPlugin.getDefault().getPreferenceStore();
+		String buildFileNames = prefs.getString(IAntUIPreferenceConstants.ANT_FIND_BUILD_FILE_NAMES);
+		if (buildFileNames.length() == 0) {
+			//the user has not specified any names to look for
+			return null;
+		}
+		return parseString(buildFileNames, ","); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns if the given file is a known build file name,
+	 * based on the given names from the Ant > Names preference 
+	 * @param filename
+	 * @return true if the name of the file is given in the Ant > Names preference, false otherwise
+	 * @since 3.6 
+	 */
+	public static boolean isKnownBuildfileName(String filename) {
+		String[] names = getKnownBuildfileNames();
+		for (int i = 0; i < names.length; i++) {
+			if(names[i].equalsIgnoreCase(filename)) {
+				return true;
+			}
+		}
+		return false;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIConstants.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIConstants.java
index 52f15a9..0c166b2 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIConstants.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIConstants.java	
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     John-Mason P. Shackelford (john-mason.shackelford at pearson.com) - bug 49380, 49445, bug 53547
@@ -105,8 +105,8 @@ public interface IAntUIConstants {
 	/**
 	 * Size of left-hand column for right-justified task name.
 	 * Used for Ant Build logging.
-	 * @see org.eclipse.ant.internal.ui.antsupport.logger.AntProcessBuildLogger
-     * @see org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener
+	 * @see org.eclipse.ant.internal.launching.runtime.logger.AntProcessBuildLogger
+     * @see org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener
 	  */
 	public static final int LEFT_COLUMN_SIZE = 15;
 	
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIPreferenceConstants.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIPreferenceConstants.java
index a06f532..9d1e23b 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIPreferenceConstants.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/IAntUIPreferenceConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,12 +34,6 @@ public interface IAntUIPreferenceConstants {
 	public static final String CONSOLE_DEBUG_COLOR = "org.eclipse.ant.ui.debugColor"; //$NON-NLS-1$	
 	
 	public static final String ANT_TOOLS_JAR_WARNING= "toolsJAR"; //$NON-NLS-1$
-    
-    /**
-     * int preference identifier constant which specifies the length of time to wait
-     * to connect with the socket that communicates with the separate JRE to capture the output
-     */
-    public static final String ANT_COMMUNICATION_TIMEOUT= "timeout"; //$NON-NLS-1$
 	
 	public static final String ANT_ERROR_DIALOG= "errorDialog"; //$NON-NLS-1$
 	
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java
index 043ba8f..2576bd4 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/console/AntConsoleColorProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,10 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.console;
 
+import org.eclipse.ant.internal.launching.launchConfigurations.AntStreamsProxy;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntProcess;
-import org.eclipse.ant.internal.ui.launchConfigurations.AntStreamsProxy;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.debug.ui.console.ConsoleColorProvider;
@@ -58,9 +57,6 @@ public class AntConsoleColorProvider extends ConsoleColorProvider implements IPr
 		//an AntStreamsProxy. The remote Ant builds make use of the
 		// org.eclipse.debug.core.processFactories extension point
 		AntStreamsProxy proxy = (AntStreamsProxy)process.getStreamsProxy();
-		if (process instanceof AntProcess) {
-			((AntProcess)process).setConsole(console);
-		}
 		if (proxy != null) {
 			console.connect(proxy.getDebugStreamMonitor(), AntStreamsProxy.ANT_DEBUG_STREAM);
 			console.connect(proxy.getWarningStreamMonitor(), AntStreamsProxy.ANT_WARNING_STREAM);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java
index 7fbff2b..46542a2 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/datatransfer/BuildFileCreator.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2011 Richard Hoefter and others.
+ * Copyright (c) 2004, 2009 Richard Hoefter and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,9 +38,7 @@ import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactoryConfigurationError;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.model.IAntModelConstants;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -65,6 +63,7 @@ import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.w3c.dom.ProcessingInstruction;
 import org.xml.sax.SAXException;
 
@@ -94,7 +93,7 @@ public class BuildFileCreator
     private String projectRoot;
     private Map variable2valueMap;
     private Shell shell;
-    private Set visited = new TreeSet(); // record used sub classpaths
+    private Set visited = new TreeSet(); // record used subclasspaths
     private Node classpathNode;
     
     /**
@@ -266,8 +265,8 @@ public class BuildFileCreator
             String key = (String) iterator.next();
             String value = (String) variable2valueMap.get(key);
             Element prop = doc.createElement("property"); //$NON-NLS-1$
-            prop.setAttribute(IAntCoreConstants.NAME, key);
-            prop.setAttribute(IAntCoreConstants.VALUE, value);
+            prop.setAttribute("name", key); //$NON-NLS-1$
+            prop.setAttribute("value", value); //$NON-NLS-1$
             if (first)
             {
                 first = false;               
@@ -292,8 +291,8 @@ public class BuildFileCreator
     {   
         // <project name="hello" default="build" basedir=".">
         root = doc.createElement("project"); //$NON-NLS-1$
-        root.setAttribute(IAntCoreConstants.NAME , projectName);
-        root.setAttribute(IAntCoreConstants.DEFAULT , "build"); //$NON-NLS-1$
+        root.setAttribute("name" , projectName); //$NON-NLS-1$
+        root.setAttribute("default" , "build"); //$NON-NLS-1$ //$NON-NLS-2$
         root.setAttribute("basedir" , "."); //$NON-NLS-1$ //$NON-NLS-2$
         doc.appendChild(root);
         
@@ -303,7 +302,7 @@ public class BuildFileCreator
     }
     
     /**
-     * Find buildfiles in project root directory and automatically import them.
+     * Find buildfiles in projectroot directory and automatically import them.
      */
     public void createImports()
     {
@@ -313,7 +312,7 @@ public class BuildFileCreator
         {
             public boolean accept(File acceptDir, String name)
             {
-                return name.endsWith(".xml") && !name.endsWith(BUILD_XML); //$NON-NLS-1$
+                return name.endsWith(".xml"); //$NON-NLS-1$
             }
         };
 
@@ -330,12 +329,16 @@ public class BuildFileCreator
             Document docCandidate;
             try {
                 docCandidate = ExportUtil.parseXmlFile(file);
-                Node node = docCandidate.getFirstChild();
-                if (node instanceof ProcessingInstruction &&  
-                        IMPORT_BUILDFILE_PROCESSING_TARGET.equals(((ProcessingInstruction) node).getTarget().trim())) {
-                    Element element = doc.createElement("import"); //$NON-NLS-1$
-                    element.setAttribute("file", file.getName()); //$NON-NLS-1$
-                    root.appendChild(element);
+                NodeList nodes = docCandidate.getChildNodes();
+                for (int j = 0; j < nodes.getLength(); j++) {
+                    Node node = nodes.item(j);
+                    if (node instanceof ProcessingInstruction &&  
+                            IMPORT_BUILDFILE_PROCESSING_TARGET.equals(((ProcessingInstruction) node).getTarget().trim())) {
+                        Element element = doc.createElement("import"); //$NON-NLS-1$
+                        element.setAttribute("file", file.getName()); //$NON-NLS-1$
+                        root.appendChild(element);
+                        break;
+                    }
                 }
             } catch (ParserConfigurationException e){
                 AntUIPlugin.log("invalid XML file not imported: " + file.getAbsolutePath(), e); //$NON-NLS-1$
@@ -421,7 +424,7 @@ public class BuildFileCreator
             else
             {
                 // prefix with ${project.location}
-                String prefix = IAntCoreConstants.EMPTY_STRING;
+                String prefix = ""; //$NON-NLS-1$
                 if (!entry.startsWith("${") &&                                  // no variable ${var}/classes //$NON-NLS-1$
                     !projectName.equals(currentProject.getProject().getName())) // not main project 
                 {
@@ -433,7 +436,7 @@ public class BuildFileCreator
                 }
                 Element pathElement = doc.createElement("pathelement"); //$NON-NLS-1$
                 String path = ExportUtil.getRelativePath(prefix + entry, projectRoot);
-                pathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, path);
+                pathElement.setAttribute("location", path); //$NON-NLS-1$
                 element.appendChild(pathElement);
             }
         }
@@ -480,7 +483,7 @@ public class BuildFileCreator
                 }
                 jarFile = ExportUtil.getRelativePath(jarFile, projectRoot);
                 Element userPathElement = doc.createElement("pathelement"); //$NON-NLS-1$
-                userPathElement.setAttribute(IAntModelConstants.ATTR_LOCATION, jarFile);
+                userPathElement.setAttribute("location", jarFile); //$NON-NLS-1$
                 userElement.appendChild(userPathElement);
             }
             addToClasspathBlock(userElement);
@@ -496,11 +499,11 @@ public class BuildFileCreator
         // <fileset dir="${java.home}/lib" includes="*.jar"/>
         // <fileset dir="${java.home}/lib/ext" includes="*.jar"/>
         Element pathElement = doc.createElement("fileset"); //$NON-NLS-1$
-        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib"); //$NON-NLS-1$
+        pathElement.setAttribute("dir", "${java.home}/lib"); //$NON-NLS-1$ //$NON-NLS-2$
         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
         element.appendChild(pathElement);
         pathElement = doc.createElement("fileset"); //$NON-NLS-1$
-        pathElement.setAttribute(IAntCoreConstants.DIR, "${java.home}/lib/ext"); //$NON-NLS-1$
+        pathElement.setAttribute("dir", "${java.home}/lib/ext"); //$NON-NLS-1$ //$NON-NLS-2$
         pathElement.setAttribute("includes", "*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
         element.appendChild(pathElement);
     }
@@ -520,7 +523,7 @@ public class BuildFileCreator
     }
     
     /**
-     * Add properties of sub-projects to internal properties map.
+     * Add properties of subprojects to internal properties map.
      */
     public void addSubProperties(IJavaProject subproject, EclipseClasspath classpath) throws JavaModelException
     { 
@@ -549,7 +552,7 @@ public class BuildFileCreator
         //     <mkdir dir="classes"/>
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "init"); //$NON-NLS-1$
+        element.setAttribute("name", "init"); //$NON-NLS-1$ //$NON-NLS-2$
         List classDirsUnique = ExportUtil.removeDuplicates(classDirs);        
         for (Iterator iterator = classDirsUnique.iterator(); iterator.hasNext();)
         {            
@@ -558,7 +561,7 @@ public class BuildFileCreator
                 !EclipseClasspath.isReference(classDir))
             {
                 Element pathElement = doc.createElement("mkdir"); //$NON-NLS-1$
-                pathElement.setAttribute(IAntCoreConstants.DIR, classDir);
+                pathElement.setAttribute("dir", classDir); //$NON-NLS-1$
                 element.appendChild(pathElement);
             }
         }
@@ -577,7 +580,7 @@ public class BuildFileCreator
         List filters = Collections.list(tokenizer);
         filters.add("*.java"); //$NON-NLS-1$
         
-        // prefix filters with wild card
+        // prefix filters with wildcard
         for (int i = 0; i < filters.size(); i++)
         {
             String item = ((String) filters.get(i)).trim();
@@ -602,7 +605,7 @@ public class BuildFileCreator
                 copyElement.setAttribute("todir", classDir); //$NON-NLS-1$
                 copyElement.setAttribute("includeemptydirs", "false"); //$NON-NLS-1$ //$NON-NLS-2$
                 Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
-                filesetElement.setAttribute(IAntCoreConstants.DIR, srcDir);
+                filesetElement.setAttribute("dir", srcDir); //$NON-NLS-1$
 
                 List inclusions = (List) inclusionLists.get(i);
                 List exclusions = (List) exclusionLists.get(i);
@@ -611,21 +614,21 @@ public class BuildFileCreator
                 {
                     String inclusion = (String) iter.next();
                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
-                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
+                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
                     filesetElement.appendChild(includeElement);
                 }           
                 for (Iterator iter = filters.iterator(); iter.hasNext();)
                 {
                     String exclusion = (String) iter.next();
                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
-                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
+                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
                     filesetElement.appendChild(excludeElement);
                 }
                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
                 {
                     String exclusion = (String) iter.next();
                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
-                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
+                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
                     filesetElement.appendChild(excludeElement);
                 }
                 
@@ -645,7 +648,7 @@ public class BuildFileCreator
         //     <delete dir="classes"/>
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "clean"); //$NON-NLS-1$
+        element.setAttribute("name", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
         List classDirUnique = ExportUtil.removeDuplicates(classDirs);
         for (Iterator iterator = classDirUnique.iterator(); iterator.hasNext();)
         {
@@ -654,7 +657,7 @@ public class BuildFileCreator
                 !EclipseClasspath.isReference(classDir))
             {
                 Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
-                deleteElement.setAttribute(IAntCoreConstants.DIR, classDir);
+                deleteElement.setAttribute("dir", classDir); //$NON-NLS-1$
                 element.appendChild(deleteElement);
             }
         }
@@ -669,7 +672,7 @@ public class BuildFileCreator
         {
             Element deleteElement = doc.createElement("delete"); //$NON-NLS-1$
             Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
-            filesetElement.setAttribute(IAntCoreConstants.DIR, "."); //$NON-NLS-1$
+            filesetElement.setAttribute("dir", "."); //$NON-NLS-1$ //$NON-NLS-2$
             filesetElement.setAttribute("includes", "**/*.class"); //$NON-NLS-1$ //$NON-NLS-2$
             deleteElement.appendChild(filesetElement);           
             element.appendChild(deleteElement);           
@@ -677,22 +680,22 @@ public class BuildFileCreator
     }
     
     /**
-     * Create clean all target.
+     * Create cleanall target.
      */
     public void createCleanAll() throws JavaModelException
     {
         // <target name="cleanall" depends="clean">
-        //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" inheritAll="false" target="clean"/>
+        //     <ant antfile="build.xml" dir="${hello.location}" inheritAll="false" target="clean"/>
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "cleanall"); //$NON-NLS-1$
+        element.setAttribute("name", "cleanall"); //$NON-NLS-1$ //$NON-NLS-2$
         element.setAttribute("depends", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
         List subProjects = ExportUtil.getClasspathProjectsRecursive(project);
         for (Iterator iterator = subProjects.iterator(); iterator.hasNext();)
         {
             IJavaProject subProject = (IJavaProject) iterator.next();
             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
-            antElement.setAttribute("antfile", "${" + subProject.getProject().getName() + ".location}/" + BUILD_XML); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
             antElement.setAttribute("dir", "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             antElement.setAttribute("target", "clean");  //$NON-NLS-1$ //$NON-NLS-2$
             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
@@ -703,21 +706,21 @@ public class BuildFileCreator
 
     /**
      * Create build target.
-     * @param srcDirs           source directories of main project
-     * @param classDirs         class directories of main project
-     * @param inclusionLists    inclusion filters of main project 
-     * @param exclusionLists    exclusion filters of main project
+     * @param srcDirs           source directories of mainproject
+     * @param classDirs         class directories of mainproject
+     * @param inclusionLists    inclusion filters of mainproject 
+     * @param exclusionLists    exclusion filters of mainproject
      */
     public void createBuild(List srcDirs, List classDirs, List inclusionLists, List exclusionLists) throws JavaModelException
     {
         // <target name="build" depends="build-subprojects,build-project"/>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "build"); //$NON-NLS-1$
+        element.setAttribute("name", "build"); //$NON-NLS-1$ //$NON-NLS-2$
         element.setAttribute("depends", "build-subprojects,build-project"); //$NON-NLS-1$ //$NON-NLS-2$
         root.appendChild(element);
         
         // <target name="build-subprojects">
-        //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" inheritAll="false" target="build-project"/>
+        //     <ant antfile="build.xml" dir="${hello.location}" inheritAll="false" target="build-project"/>
         // </target>
         element = doc.createElement("target"); //$NON-NLS-1$
         element.setAttribute("name", "build-subprojects"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -726,7 +729,7 @@ public class BuildFileCreator
         {
             IJavaProject subProject = (IJavaProject) iterator.next();
             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
-            antElement.setAttribute("antfile", "${" + subProject.getProject().getName() + ".location}/" + BUILD_XML); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
             antElement.setAttribute("dir", "${" + subProject.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             antElement.setAttribute("target", "build-project");  //$NON-NLS-1$ //$NON-NLS-2$
             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
@@ -751,7 +754,7 @@ public class BuildFileCreator
         //     </javac>    
         // </target>        
         element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "build-project"); //$NON-NLS-1$
+        element.setAttribute("name", "build-project"); //$NON-NLS-1$ //$NON-NLS-2$
         element.setAttribute("depends", "init"); //$NON-NLS-1$ //$NON-NLS-2$
         Element echoElement = doc.createElement("echo"); //$NON-NLS-1$
         echoElement.setAttribute("message", "${ant.project.name}: ${ant.file}"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -779,14 +782,14 @@ public class BuildFileCreator
                 {
                     String inclusion = (String) iter.next();
                     Element includeElement = doc.createElement("include"); //$NON-NLS-1$
-                    includeElement.setAttribute(IAntCoreConstants.NAME, inclusion);
+                    includeElement.setAttribute("name", inclusion); //$NON-NLS-1$
                     javacElement.appendChild(includeElement);
                 }           
                 for (Iterator iter = exclusions.iterator(); iter.hasNext();)
                 {
                     String exclusion = (String) iter.next();
                     Element excludeElement = doc.createElement("exclude"); //$NON-NLS-1$
-                    excludeElement.setAttribute(IAntCoreConstants.NAME, exclusion);
+                    excludeElement.setAttribute("name", exclusion); //$NON-NLS-1$
                     javacElement.appendChild(excludeElement);
                 }           
                 Element classpathRefElement = doc.createElement("classpath"); //$NON-NLS-1$
@@ -819,12 +822,12 @@ public class BuildFileCreator
         }
         
         // <target name="build-refprojects">
-        //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" target="clean" inheritAll="false"/> 
-        //     <ant antfile="${hello.location}/build.xml" dir="${hello.location}" target="build" inheritAll="false"/> 
+        //     <ant antfile="build.xml" dir="${hello.location}" target="clean" inheritAll="false"/> 
+        //     <ant antfile="build.xml" dir="${hello.location}" target="build" inheritAll="false"/> 
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "build-refprojects"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.DESCRIPTION, "Build all projects which " + //$NON-NLS-1$ 
+        element.setAttribute("name", "build-refprojects"); //$NON-NLS-1$ //$NON-NLS-2$
+        element.setAttribute("description", "Build all projects which " + //$NON-NLS-1$ //$NON-NLS-2$
                 "reference this project. Useful to propagate changes."); //$NON-NLS-1$
         for (Iterator iter = refProjects.iterator(); iter.hasNext();) {
             IJavaProject p = (IJavaProject) iter.next();
@@ -835,14 +838,14 @@ public class BuildFileCreator
             variable2valueMap.put(location, relativePath);
 
             Element antElement = doc.createElement("ant"); //$NON-NLS-1$
-            antElement.setAttribute("antfile", "${" + p.getProject().getName() + ".location}/" + BUILD_XML); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
             antElement.setAttribute("dir", "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             antElement.setAttribute("target", "clean"); //$NON-NLS-1$ //$NON-NLS-2$
             antElement.setAttribute("inheritAll", "false"); //$NON-NLS-1$ //$NON-NLS-2$
             element.appendChild(antElement);
             
             antElement = doc.createElement("ant"); //$NON-NLS-1$
-            antElement.setAttribute("antfile", "${" + p.getProject().getName() + ".location}/" + BUILD_XML); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            antElement.setAttribute("antfile", BUILD_XML); //$NON-NLS-1$
             antElement.setAttribute("dir", "${" + p.getProject().getName() + ".location}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
             antElement.setAttribute("target", "build"); //$NON-NLS-1$ //$NON-NLS-2$
             antElement.setAttribute("inheritAll", "false");  //$NON-NLS-1$ //$NON-NLS-2$
@@ -871,7 +874,7 @@ public class BuildFileCreator
                 value.toString(), projectRoot));
         }
         // <target name="init-eclipse-compiler" description="copy Eclipse compiler jars to ant lib directory">
-        //     <property name="ECLIPSE_HOME" value="C:/Program/eclipse-3.1" />
+        //     <property name="ECLIPSE_HOME" value="C:/Programme/eclipse-3.1" />
         //     <copy todir="${ant.library.dir}">
         //         <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar" />
         //     </copy>
@@ -881,12 +884,12 @@ public class BuildFileCreator
         //     </unzip>
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "init-eclipse-compiler"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.DESCRIPTION, "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ 
+        element.setAttribute("name", "init-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
+        element.setAttribute("description", "copy Eclipse compiler jars to ant lib directory"); //$NON-NLS-1$ //$NON-NLS-2$
         Element copyElement = doc.createElement("copy"); //$NON-NLS-1$
         copyElement.setAttribute("todir", "${ant.library.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
         Element filesetElement = doc.createElement("fileset"); //$NON-NLS-1$
-        filesetElement.setAttribute(IAntCoreConstants.DIR, "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$
+        filesetElement.setAttribute("dir", "${ECLIPSE_HOME}/plugins"); //$NON-NLS-1$ //$NON-NLS-2$
         filesetElement.setAttribute("includes", "org.eclipse.jdt.core_*.jar"); //$NON-NLS-1$ //$NON-NLS-2$
         copyElement.appendChild(filesetElement);
         element.appendChild(copyElement);
@@ -910,11 +913,11 @@ public class BuildFileCreator
         //     <antcall target="build" />
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "build-eclipse-compiler"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.DESCRIPTION, "compile project with Eclipse compiler"); //$NON-NLS-1$ 
+        element.setAttribute("name", "build-eclipse-compiler"); //$NON-NLS-1$ //$NON-NLS-2$
+        element.setAttribute("description", "compile project with Eclipse compiler"); //$NON-NLS-1$ //$NON-NLS-2$
         Element propertyElement = doc.createElement("property"); //$NON-NLS-1$
-        propertyElement.setAttribute(IAntCoreConstants.NAME, "build.compiler"); //$NON-NLS-1$
-        propertyElement.setAttribute(IAntCoreConstants.VALUE, "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$
+        propertyElement.setAttribute("name", "build.compiler"); //$NON-NLS-1$ //$NON-NLS-2$
+        propertyElement.setAttribute("value", "org.eclipse.jdt.core.JDTCompilerAdapter"); //$NON-NLS-1$ //$NON-NLS-2$
         element.appendChild(propertyElement);
         Element antcallElement = doc.createElement("antcall"); //$NON-NLS-1$
         antcallElement.setAttribute("target", "build"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -923,7 +926,7 @@ public class BuildFileCreator
     }
 
     /**
-     * Add all boot classpaths in srcDirs to given javacElement.
+     * Add all bootclasspaths in srcDirs to given javacElement.
      */
     private void addCompilerBootClasspath(List srcDirs, Element javacElement)
     {
@@ -974,7 +977,7 @@ public class BuildFileCreator
         for (int i = 0; i < confs.length; i++)
         {
             ILaunchConfiguration conf = confs[i];
-            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, IAntCoreConstants.EMPTY_STRING)))
+            if (!projectName.equals(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""))) //$NON-NLS-1$
             {
                 continue;
             }
@@ -1009,25 +1012,25 @@ public class BuildFileCreator
     public void addJavaApplication(Map variable2value, ILaunchConfiguration conf) throws CoreException
     {
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
+        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
         javaElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
-        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING)); //$NON-NLS-1$
+        javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "")); //$NON-NLS-1$ //$NON-NLS-2$
         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
         ExportUtil.addVariable(variable2value, dir, projectRoot);                
-        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
+        if (!dir.equals("")) //$NON-NLS-1$
         {
-            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
+            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
         }
         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
         {
             javaElement.setAttribute("newenvironment", "true"); //$NON-NLS-1$ //$NON-NLS-2$
         }
         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
-        addElements(props, doc, javaElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
+        addElements(props, doc, javaElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         element.appendChild(javaElement);
         
         addRuntimeClasspath(conf, javaElement);
@@ -1046,8 +1049,8 @@ public class BuildFileCreator
      */
     public void addApplet(Map variable2value, ILaunchConfiguration conf) throws CoreException, TransformerFactoryConfigurationError, UnsupportedEncodingException
     {
-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
-        if (dir.equals(IAntCoreConstants.EMPTY_STRING))
+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
+        if (dir.equals("")) //$NON-NLS-1$
         {
             dir = projectRoot;
         }
@@ -1087,17 +1090,17 @@ public class BuildFileCreator
         }
         
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
+        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
         Element javaElement = doc.createElement("java"); //$NON-NLS-1$
         javaElement.setAttribute("fork", "yes");  //$NON-NLS-1$//$NON-NLS-2$
         javaElement.setAttribute("classname", conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_APPLETVIEWER_CLASS, "sun.applet.AppletViewer")); //$NON-NLS-1$ //$NON-NLS-2$
         javaElement.setAttribute("failonerror", "true"); //$NON-NLS-1$ //$NON-NLS-2$
         if (value != null)
         {
-            javaElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
+            javaElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
         }
-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$
+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, javaElement, "jvmarg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""), doc, javaElement, "arg", "line", variable2value, projectRoot);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
         addElement(conf.getName() + ".html", doc, javaElement, "arg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         element.appendChild(javaElement);
         addRuntimeClasspath(conf, javaElement);
@@ -1123,22 +1126,22 @@ public class BuildFileCreator
         //         <classpath refid="project.classpath"/>
         //     </junit>
         // </target>
-        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, IAntCoreConstants.EMPTY_STRING);
+        String testClass = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ""); //$NON-NLS-1$
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, conf.getName());
+        element.setAttribute("name", conf.getName()); //$NON-NLS-1$
         
         Element mkdirElement = doc.createElement("mkdir"); //$NON-NLS-1$
-        mkdirElement.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
+        mkdirElement.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
         element.appendChild(mkdirElement);
         
         Element junitElement = doc.createElement("junit"); //$NON-NLS-1$
         junitElement.setAttribute("fork", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
         junitElement.setAttribute("printsummary", "withOutAndErr"); //$NON-NLS-1$ //$NON-NLS-2$
-        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, IAntCoreConstants.EMPTY_STRING);
+        String dir = conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, ""); //$NON-NLS-1$
         ExportUtil.addVariable(variable2value, dir, projectRoot);                
-        if (!dir.equals(IAntCoreConstants.EMPTY_STRING))
+        if (!dir.equals("")) //$NON-NLS-1$
         {
-            junitElement.setAttribute(IAntCoreConstants.DIR, ExportUtil.getRelativePath(dir, projectRoot));
+            junitElement.setAttribute("dir", ExportUtil.getRelativePath(dir, projectRoot)); //$NON-NLS-1$
         }
         if (!conf.getAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES, true))
         {
@@ -1147,32 +1150,32 @@ public class BuildFileCreator
         Element formatterElement = doc.createElement("formatter"); //$NON-NLS-1$
         formatterElement.setAttribute("type", "xml");  //$NON-NLS-1$//$NON-NLS-2$
         junitElement.appendChild(formatterElement);
-        if (!testClass.equals(IAntCoreConstants.EMPTY_STRING))
+        if (!testClass.equals("")) //$NON-NLS-1$
         {
             // Case 1: Single JUnit class
             Element testElement = doc.createElement("test"); //$NON-NLS-1$
-            testElement.setAttribute(IAntCoreConstants.NAME, testClass);
+            testElement.setAttribute("name", testClass); //$NON-NLS-1$
             testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
             junitElement.appendChild(testElement);                       
         }
         else
         {
             // Case 2: Run all tests in project, package or source folder
-            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, IAntCoreConstants.EMPTY_STRING); //$NON-NLS-1$
+            String container = conf.getAttribute("org.eclipse.jdt.junit.CONTAINER" /*JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR*/, ""); //$NON-NLS-1$ //$NON-NLS-2$
             IType[] types = ExportUtil.findTestsInContainer(container);
             Set sortedTypes = new TreeSet(ExportUtil.getITypeComparator());
             sortedTypes.addAll(Arrays.asList(types));
             for (Iterator iter = sortedTypes.iterator(); iter.hasNext();) {
                 IType type = (IType) iter.next();
                 Element testElement = doc.createElement("test"); //$NON-NLS-1$
-                testElement.setAttribute(IAntCoreConstants.NAME, type.getFullyQualifiedName());
+                testElement.setAttribute("name", type.getFullyQualifiedName()); //$NON-NLS-1$
                 testElement.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
                 junitElement.appendChild(testElement);                       
             }
         }
         Map props = conf.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new TreeMap());
-        addElements(props, doc, junitElement, "env", "key", IAntCoreConstants.VALUE); //$NON-NLS-1$ //$NON-NLS-2$
-        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, IAntCoreConstants.EMPTY_STRING), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$
+        addElements(props, doc, junitElement, "env", "key", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        addElement(conf.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""), doc, junitElement, "jvmarg", "line", variable2value, projectRoot); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
         element.appendChild(junitElement);
         addRuntimeClasspath(conf, junitElement);
         addRuntimeBootClasspath(conf, junitElement);
@@ -1180,7 +1183,7 @@ public class BuildFileCreator
     }
     
     /**
-     * Add JUnit report target. 
+     * Add junitreport target. 
      */
     public void addJUnitReport()
     {
@@ -1195,14 +1198,14 @@ public class BuildFileCreator
         //     </junitreport>
         // </target>
         Element element = doc.createElement("target"); //$NON-NLS-1$
-        element.setAttribute(IAntCoreConstants.NAME, "junitreport"); //$NON-NLS-1$
+        element.setAttribute("name", "junitreport"); //$NON-NLS-1$ //$NON-NLS-2$
         Element junitreport = doc.createElement("junitreport"); //$NON-NLS-1$
         junitreport.setAttribute("todir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
         Element fileset = doc.createElement("fileset"); //$NON-NLS-1$
-        fileset.setAttribute(IAntCoreConstants.DIR, "${junit.output.dir}"); //$NON-NLS-1$
+        fileset.setAttribute("dir", "${junit.output.dir}"); //$NON-NLS-1$ //$NON-NLS-2$
         junitreport.appendChild(fileset);
         Element include = doc.createElement("include"); //$NON-NLS-1$
-        include.setAttribute(IAntCoreConstants.NAME, "TEST-*.xml"); //$NON-NLS-1$
+        include.setAttribute("name", "TEST-*.xml"); //$NON-NLS-1$ //$NON-NLS-2$
         fileset.appendChild(include);
         Element report = doc.createElement("report"); //$NON-NLS-1$
         report.setAttribute("format", "frames"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.java
deleted file mode 100644
index 9242bbc..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.java	
+++ /dev/null
@@ -1,23 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.ant.internal.ui.debug;
-
-import org.eclipse.osgi.util.NLS;
-
-public class AntDebugMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.ui.debug.AntDebugMessages";//$NON-NLS-1$
-    
-	public static String AntSourceContainer_0;
-
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, AntDebugMessages.class);
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.properties
deleted file mode 100644
index 6e1f950..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntDebugMessages.properties	
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-AntSourceContainer_0=Ant Source Container
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceContainer.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceContainer.java
deleted file mode 100644
index 919b4b1..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceContainer.java	
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.debug;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.sourcelookup.ISourceContainerType;
-import org.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer;
-import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
-
-public class AntSourceContainer extends AbstractSourceContainer {
-
-	private IWorkspaceRoot fRoot;
-
-	public AntSourceContainer() {
-		fRoot = ResourcesPlugin.getWorkspace().getRoot();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#findSourceElements(java.lang.String)
-	 */
-	public Object[] findSourceElements(String path) throws CoreException {
-		ArrayList sources = new ArrayList();
-		File osFile = new File(path);
-		if (osFile.exists()) {
-			try {
-				IPath canonicalPath = new Path(osFile.getCanonicalPath());
-				IFile[] files = fRoot.findFilesForLocation(canonicalPath);
-				if (files.length > 0) {
-					for (int i = 0; i < files.length; i++) {
-						sources.add(files[i]);
-					}
-				} else {
-					sources.add(new LocalFileStorage(osFile));
-				}
-			} catch (IOException e) {
-			}
-		}
-		return sources.toArray();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getName()
-	 */
-	public String getName() {
-		return AntDebugMessages.AntSourceContainer_0;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer#getType()
-     * Not persisted via the launch configuration
-	 */
-	public ISourceContainerType getType() {
-		return null;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupDirector.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupDirector.java
deleted file mode 100644
index 7ee29d8..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupDirector.java	
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector;
-import org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant;
-
-/**
- * Ant source lookup director. For Ant source lookup there is one source
- * lookup participant. 
- */
-public class AntSourceLookupDirector extends AbstractSourceLookupDirector {
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
-	 */
-	public void initializeParticipants() {
-		addParticipants(new ISourceLookupParticipant[]{new AntSourceLookupParticipant()});
-	}
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IPersistableSourceLocator#getMemento()
-     */
-    public String getMemento() throws CoreException {
-        return null;
-    }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupParticipant.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupParticipant.java
deleted file mode 100644
index 942e9de..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourceLookupParticipant.java	
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug;
-
-import org.eclipse.ant.internal.ui.debug.model.AntStackFrame;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant;
-
-/**
- * The Ant source lookup participant knows how to translate a 
- * Ant stack frame into a source file name 
- */
-public class AntSourceLookupParticipant extends AbstractSourceLookupParticipant {
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourceLookupParticipant#getSourceName(java.lang.Object)
-	 */
-	public String getSourceName(Object object) throws CoreException {
-		if (object instanceof AntStackFrame) {
-			return ((AntStackFrame)object).getFilePath();
-		}
-        if (object instanceof String) {
-            // assume it's a file name
-            return (String)object;
-        }
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourcePathComputerDelegate.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourcePathComputerDelegate.java
deleted file mode 100644
index 45d2c8f..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/AntSourcePathComputerDelegate.java	
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate;
-
-/**
- * Computes the default source lookup path for an Ant launch configuration.
- * The default source lookup is a container that knows how to map the 
- * fully qualified file system paths to either the <code>IFile</code> within the workspace or
- * a <code>LocalFileStorage</code> for buildfiles not in the workspace.
- */
-public class AntSourcePathComputerDelegate implements ISourcePathComputerDelegate {
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate#computeSourceContainers(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		return new ISourceContainer[] {new AntSourceContainer()};
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugConstants.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugConstants.java
deleted file mode 100644
index da2c2a0..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugConstants.java	
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.debug;
-
-public interface IAntDebugConstants {
-	
-	/**
-	 * Unique identifier for the Ant debug model (value 
-	 * <code>org.eclipse.ant.ui.debug</code>).
-	 */
-	public static final String ID_ANT_DEBUG_MODEL = "org.eclipse.ant.ui.debug"; //$NON-NLS-1$
-	
-	/**
-	 * Unique identifier for the Ant line breakpoint markers 
-	 * (value <code>org.eclipse.ant.ui.antLineBreakpointMarker</code>).
-	 */
-	public static final String ID_ANT_LINE_BREAKPOINT_MARKER= "org.eclipse.ant.ui.antLineBreakpointMarker"; //$NON-NLS-1$
-    
-    /**
-     * Unique identifier for the Ant run to line breakpoints 
-     * (value <code>org.eclipse.ant.ui.runToLineBreakpoint</code>).
-     */
-    public static final String ANT_RUN_TO_LINE= "org.eclipse.ant.ui.runToLineBreakpoint"; //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugController.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugController.java
deleted file mode 100644
index f37ea27..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/IAntDebugController.java	
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug;
-
-import org.eclipse.debug.core.model.IBreakpoint;
-
-public interface IAntDebugController {
-	
-    /**
-     * Resume the Ant build
-     */
-	public void resume();
-    
-    /**
-     * Suspend the Ant build
-     */
-	public void suspend();
-    
-     /**
-     * Step into the current Ant task
-     */
-	public void stepInto();
-    
-     /**
-     * Step over the current Ant task
-     */
-	public void stepOver();
-    
-    /**
-     * The provided breakpoint has been added or removed depending on the <code>added</code> parameter.
-     * Updates the controller for this change.
-     * 
-     * @param breakpoint the breakpoint that has been added or removed
-     * @param added whether or not the breakpoint has been added 
-     */
-	public void handleBreakpoint(IBreakpoint breakpoint, boolean added);
-    
-     /**
-     * Retrieve the properties of the Ant build.
-     * May occur asynchronously depending on implementation.
-     */
-	public void getProperties();
-    
-    /**
-     * Retrieve the stack frames of the Ant build.
-     * May occur asynchronously depending on implementation.
-     */
-	public void getStackFrames();
-
-	/**
-	 * Some strings are escaped when marshalled for socket communication.
-	 * The Ant debug controller will properly unescape these Strings if required.
-	 * 
-	 * @param value The buffer of the string to unescape
-	 * @return The unescaped string
-	 */
-	public StringBuffer unescapeString(StringBuffer value);
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugElement.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugElement.java
deleted file mode 100644
index feaa8b4..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugElement.java	
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.DebugElement;
-
-/**
- * Common function of Ant debug model elements
- */
-public abstract class AntDebugElement extends DebugElement {
-	
-	/**
-	 * Constructs a new debug element contained in the given
-	 * debug target.
-	 * 
-	 * @param target debug target
-	 */
-	public AntDebugElement(AntDebugTarget target) {
-		super(target);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
-	 */
-	public String getModelIdentifier() {
-		return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
-	}
-    
-	/**
-     * Throws a debug exception with the given message, error code, and underlying
-     * exception.
-     */
-    protected void throwDebugException(String message) throws DebugException {
-        throw new DebugException(new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(),
-            DebugException.TARGET_REQUEST_FAILED, message, null));
-    }
-    
-    protected AntDebugTarget getAntDebugTarget() {
-        return (AntDebugTarget)super.getDebugTarget();
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java
index 44dcfc2..c043082 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugModelPresentation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,11 @@ package org.eclipse.ant.internal.ui.debug.model;
 
 import java.io.File;
 
+import org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint;
+import org.eclipse.ant.internal.launching.debug.model.AntProperties;
+import org.eclipse.ant.internal.launching.debug.model.AntProperty;
+import org.eclipse.ant.internal.launching.debug.model.AntStackFrame;
+import org.eclipse.ant.internal.launching.debug.model.AntThread;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.preferences.AntObjectLabelProvider;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugTarget.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugTarget.java
deleted file mode 100644
index 1cf4cd7..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntDebugTarget.java	
+++ /dev/null
@@ -1,463 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.ant.internal.ui.debug.IAntDebugController;
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IDebugTarget;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IMemoryBlock;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-
-/**
- * Ant Debug Target
- */
-public class AntDebugTarget extends AntDebugElement implements IDebugTarget, IDebugEventSetListener, IBreakpointManagerListener {
-	
-	// associated system process (Ant Build)
-	private IProcess fProcess;
-	
-	// containing launch object
-	private ILaunch fLaunch;
-	
-	// Build file name
-	private String fName;
-
-	// suspend state
-	private boolean fSuspended= false;
-	
-	// terminated state
-	private boolean fTerminated= false;
-	
-	// threads
-	private AntThread fThread;
-	private IThread[] fThreads;
-	
-	private IAntDebugController fController;
-    
-    private List fRunToLineBreakpoints;
-
-	/**
-	 * Constructs a new debug target in the given launch for the 
-	 * associated Ant build process.
-	 * 
-	 * @param launch containing launch
-	 * @param process Ant build process
-	 * @param controller the controller to communicate to the Ant build
-	 */
-	public AntDebugTarget(ILaunch launch, IProcess process, IAntDebugController controller) {
-		super(null);
-		fLaunch = launch;
-		fProcess = process;
-		
-		fController= controller;
-		
-		fThread = new AntThread(this);
-		fThreads = new IThread[] {fThread};
-        
-        DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener(this);
-		DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
-        DebugPlugin.getDefault().addDebugEventListener(this);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugTarget#getProcess()
-	 */
-	public IProcess getProcess() {
-		return fProcess;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugTarget#getThreads()
-	 */
-	public IThread[] getThreads() {
-		return fThreads;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugTarget#hasThreads()
-	 */
-	public boolean hasThreads() throws DebugException {
-		return !fTerminated && fThreads.length > 0;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugTarget#getName()
-	 */
-	public String getName() throws DebugException {
-		if (fName == null) {
-			try {
-				fName= getLaunch().getLaunchConfiguration().getAttribute(IExternalToolConstants.ATTR_LOCATION, DebugModelMessages.AntDebugTarget_0);
-				fName= VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fName);
-			} catch (CoreException e) {
-				fName = DebugModelMessages.AntDebugTarget_0;
-			}
-		}
-		return fName;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint)
-	 */
-	public boolean supportsBreakpoint(IBreakpoint breakpoint) {
-		if (breakpoint.getModelIdentifier().equals(IAntDebugConstants.ID_ANT_DEBUG_MODEL)) {
-		    //need to consider all breakpoints as no way to tell which set
-		    //of buildfiles will be executed (ant task)
-		    return true;
-		}
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugElement#getDebugTarget()
-	 */
-	public IDebugTarget getDebugTarget() {
-		return this;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
-	 */
-	public ILaunch getLaunch() {
-		return fLaunch;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
-	 */
-	public boolean canTerminate() {
-		return !fTerminated;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
-	 */
-	public boolean isTerminated() {
-		return fTerminated;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
-	 */
-	public void terminate() throws DebugException {
-	    terminated();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
-	 */
-	public boolean canResume() {
-		return !isTerminated() && isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
-	 */
-	public boolean canSuspend() {
-		return !isTerminated() && !isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
-	 */
-	public boolean isSuspended() {
-		return fSuspended;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
-	 */
-	public void resume() throws DebugException {
-	    fSuspended= false;
-	    fController.resume();
-	}
-	
-	/**
-	 * Notification the target has suspended for the given reason
-	 * 
-	 * @param detail reason for the suspend
-	 */
-	public void suspended(int detail) {
-		fSuspended = true;
-		fThread.setStepping(false);
-		fThread.fireSuspendEvent(detail);
-	}	
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
-	 */
-	public void suspend() throws DebugException {
-		fController.suspend();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointAdded(org.eclipse.debug.core.model.IBreakpoint)
-	 */
-	public void breakpointAdded(IBreakpoint breakpoint) {
-		fController.handleBreakpoint(breakpoint, true);
-        if (breakpoint instanceof AntLineBreakpoint) {
-            if (((AntLineBreakpoint) breakpoint).isRunToLine()) {
-                if (fRunToLineBreakpoints == null) {
-                    fRunToLineBreakpoints= new ArrayList();
-                }
-                fRunToLineBreakpoints.add(breakpoint);
-            }
-        }
-	}
-
-    /* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
-	 */
-	public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
-		fController.handleBreakpoint(breakpoint, false);
-        if (fRunToLineBreakpoints != null) {
-            if (fRunToLineBreakpoints.remove(breakpoint) && fRunToLineBreakpoints.isEmpty()) {
-                fRunToLineBreakpoints= null;
-            }
-        }
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IBreakpointListener#breakpointChanged(org.eclipse.debug.core.model.IBreakpoint, org.eclipse.core.resources.IMarkerDelta)
-	 */
-	public void breakpointChanged(IBreakpoint breakpoint, IMarkerDelta delta) {
-		if (supportsBreakpoint(breakpoint)) {
-			try {
-				if (breakpoint.isEnabled() && DebugPlugin.getDefault().getBreakpointManager().isEnabled()) {
-					breakpointAdded(breakpoint);
-				} else {
-					breakpointRemoved(breakpoint, null);
-				}
-			} catch (CoreException e) {
-			}
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDisconnect#canDisconnect()
-	 */
-	public boolean canDisconnect() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDisconnect#disconnect()
-	 */
-	public void disconnect() throws DebugException {
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IDisconnect#isDisconnected()
-	 */
-	public boolean isDisconnected() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#supportsStorageRetrieval()
-	 */
-	public boolean supportsStorageRetrieval() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IMemoryBlockRetrieval#getMemoryBlock(long, long)
-	 */
-	public IMemoryBlock getMemoryBlock(long startAddress, long length) throws DebugException {
-		return null;
-	}
-
-	/**
-	 * Notification we have connected to the Ant build logger and it has started.
-	 * Resume the build.
-	 */
-	public void buildStarted() {
-		fireCreationEvent();
-		installDeferredBreakpoints();
-		try {
-			resume();
-		} catch (DebugException e) {
-		}
-	}
-	
-	/**
-	 * Install breakpoints that are already registered with the breakpoint
-	 * manager if the breakpoint manager is enabled and the breakpoint is enabled.
-	 */
-	private void installDeferredBreakpoints() {
-		IBreakpointManager manager= DebugPlugin.getDefault().getBreakpointManager();
-		if (!manager.isEnabled()) {
-			return;
-		}
-		IBreakpoint[] breakpoints = manager.getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
-		for (int i = 0; i < breakpoints.length; i++) {
-            IBreakpoint breakpoint= breakpoints[i];
-            try {
-                if (breakpoint.isEnabled()) {
-                    breakpointAdded(breakpoints[i]);
-                }
-            } catch (CoreException e) {
-            }
-		}
-	}
-	
-	/**
-	 * Called when this debug target terminates.
-	 */
-	protected void terminated() {
-		fThreads= new IThread[0];
-		fTerminated = true;
-		fSuspended = false;
-		if (DebugPlugin.getDefault() != null) {
-			DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
-			DebugPlugin.getDefault().removeDebugEventListener(this);
-			DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener(this);
-		}
-		if (!getProcess().isTerminated()) {
-		    try {
-                fProcess.terminate();
-                resume();
-		    } catch (DebugException e) {       
-		    }
-		}
-		if (DebugPlugin.getDefault() != null) {
-			fireTerminateEvent();
-		}
-	}
-	
-	/**
-	 * Single step the Ant build.
-	 * 
-	 * @throws DebugException if the request fails
-	 */
-	protected void stepOver() {
-	    fSuspended= false;
-		fController.stepOver();
-	}
-	
-	/**
-	 * Step-into the Ant build.
-	 * 
-	 * @throws DebugException if the request fails
-	 */
-	protected void stepInto() {
-	    fSuspended= false;
-	    fController.stepInto();
-	}
-	
-	/**
-	 * Notification a breakpoint was encountered. Determine
-	 * which breakpoint was hit and fire a suspend event.
-	 * 
-	 * @param event debug event
-	 */
-	protected void breakpointHit(String event) {
-		// determine which breakpoint was hit, and set the thread's breakpoint
-		String[] datum= event.split(DebugMessageIds.MESSAGE_DELIMITER);
-		String fileName= datum[1];
-		int lineNumber = Integer.parseInt(datum[2]);
-		IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
-        boolean found= false;
-		for (int i = 0; i < breakpoints.length; i++) {
-           ILineBreakpoint lineBreakpoint = (ILineBreakpoint)breakpoints[i];
-           if (setThreadBreakpoint(lineBreakpoint, lineNumber, fileName)) {
-               found= true;
-               break;
-           }
-		}
-        if (!found && fRunToLineBreakpoints != null) {
-            Iterator iter= fRunToLineBreakpoints.iterator();
-            while (iter.hasNext()) {
-                ILineBreakpoint lineBreakpoint = (ILineBreakpoint) iter.next();
-                if (setThreadBreakpoint(lineBreakpoint, lineNumber, fileName)) {
-                    break;
-                }
-            }
-        }
-		suspended(DebugEvent.BREAKPOINT);
-	}	
-    
-    private boolean setThreadBreakpoint(ILineBreakpoint lineBreakpoint, int lineNumber, String fileName) {
-        try {
-            if (lineBreakpoint.getLineNumber() == lineNumber && 
-                    fileName.equals(lineBreakpoint.getMarker().getResource().getLocation().toOSString())) {
-                fThread.setBreakpoints(new IBreakpoint[]{lineBreakpoint});
-                return true;
-            }
-        } catch (CoreException e) {
-        }
-        return false;
-    }
-	
-    public void breakpointHit (IBreakpoint breakpoint) {
-        fThread.setBreakpoints(new IBreakpoint[]{breakpoint});
-        suspended(DebugEvent.BREAKPOINT);
-    }
-    
-	protected void getStackFrames() {
-		fController.getStackFrames();
-	}
-	
-	protected void getProperties() {
-		fController.getProperties();
-	}
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
-     */
-    public void handleDebugEvents(DebugEvent[] events) {
-        for (int i = 0; i < events.length; i++) {
-            DebugEvent event = events[i];
-            if (event.getKind() == DebugEvent.TERMINATE && event.getSource().equals(fProcess)) {
-                terminated();
-            }
-        }
-    }
-    
-    /**
-     * When the breakpoint manager disables, remove all registered breakpoints
-     * requests from the VM. When it enables, reinstall them.
-     *
-     * @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
-     */
-    public void breakpointManagerEnablementChanged(boolean enabled) {
-        IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
-        for (int i = 0; i < breakpoints.length; i++) {
-            IBreakpoint breakpoint = breakpoints[i];
-            if (enabled) {
-                breakpointAdded(breakpoint);
-            } else {
-                breakpointRemoved(breakpoint, null);
-            }
-        }
-    }
-
-	public IAntDebugController getAntDebugController() {
-		return fController;
-	}   
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntLineBreakpoint.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntLineBreakpoint.java
deleted file mode 100644
index e847e7b..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntLineBreakpoint.java	
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import com.ibm.icu.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.LineBreakpoint;
-
-/**
- * Ant line breakpoint
- */
-public class AntLineBreakpoint extends LineBreakpoint {
-	
-	/**
-	 * Default constructor is required for the breakpoint manager
-	 * to re-create persisted breakpoints. After instantiating a breakpoint,
-	 * the <code>setMarker(...)</code> method is called to restore
-	 * this breakpoint's attributes.
-	 */
-	public AntLineBreakpoint() {
-	}
-	
-	/**
-	 * Constructs a line breakpoint on the given resource at the given
-	 * line number. The line number is 1-based (i.e. the first line of a
-	 * file is line number 1).
-	 * 
-	 * @param resource file on which to set the breakpoint
-	 * @param lineNumber 1-based line number of the breakpoint
-	 * @throws CoreException if unable to create the breakpoint
-	 */
-	public AntLineBreakpoint(IResource resource, int lineNumber) throws CoreException {
-	    this(resource, lineNumber, new HashMap(), true);
-	}
-	
-	/**
-	 * Constructs a line breakpoint on the given resource at the given
-	 * line number. The line number is 1-based (i.e. the first line of a
-	 * file is line number 1).
-	 * 
-	 * @param resource file on which to set the breakpoint
-	 * @param lineNumber 1-based line number of the breakpoint
-	 * @param attributes the marker attributes to set
-	 * @param register whether to add this breakpoint to the breakpoint manager
-	 * @throws CoreException if unable to create the breakpoint
-	 */
-	public AntLineBreakpoint(final IResource resource, final int lineNumber, final Map attributes, final boolean register) throws CoreException {
-	    IWorkspaceRunnable wr= new IWorkspaceRunnable() {
-			public void run(IProgressMonitor monitor) throws CoreException {
-			    IMarker marker = resource.createMarker(IAntDebugConstants.ID_ANT_LINE_BREAKPOINT_MARKER);
-			    setMarker(marker);
-			    attributes.put(IBreakpoint.ENABLED, Boolean.TRUE);
-			    attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));
-			    attributes.put(IBreakpoint.ID, IAntDebugConstants.ID_ANT_DEBUG_MODEL);
-                attributes.put(IMarker.MESSAGE, MessageFormat.format(DebugModelMessages.AntLineBreakpoint_0, new String[] {Integer.toString(lineNumber)}));
-			    ensureMarker().setAttributes(attributes);
-                
-                register(register);
-			}
-	    };
-	    run(getMarkerRule(resource), wr);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IBreakpoint#getModelIdentifier()
-	 */
-	public String getModelIdentifier() {
-		return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
-	}
-
-    /**
-     * @return whether this breakpoint is a run to line breakpoint
-     */
-    public boolean isRunToLine() {
-        try {
-            return ensureMarker().getAttribute(IAntDebugConstants.ANT_RUN_TO_LINE, false);
-        } catch (DebugException e) {
-           return false;
-        }
-    }
-    
-    /**
-     * Add this breakpoint to the breakpoint manager,
-     * or sets it as unregistered.
-     */
-    private void register(boolean register) throws CoreException {
-        if (register) {
-            DebugPlugin.getDefault().getBreakpointManager().addBreakpoint(this);
-        } else {
-            setRegistered(false);
-        }
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperties.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperties.java
deleted file mode 100644
index bb66758..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperties.java	
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-public class AntProperties extends AntDebugElement implements IVariable {
-	
-	private IValue fValue;
-	private String fName;
-    private boolean fValid= true;
-
-	public AntProperties(AntDebugTarget target, String name) {
-		super(target);
-		fName= name;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IVariable#getValue()
-	 */
-	public synchronized IValue getValue() throws DebugException {
-        int attempts= 0;
-        while (!fValid && !getDebugTarget().isTerminated()) {
-            try {
-                wait(50);
-            } catch (InterruptedException e) {
-            }
-            if (attempts == 20 && !fValid && !getDebugTarget().isTerminated()) {
-                throwDebugException(DebugModelMessages.AntProperties_1);
-            }
-            attempts++;
-        }
- 		return fValue;
-	}
-    
-    protected IValue getLastValue() {
-        return fValue;
-    }
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IVariable#getName()
-	 */
-	public String getName() {
-		return fName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
-	 */
-	public String getReferenceTypeName() {
-		return ""; //$NON-NLS-1$
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
-	 */
-	public boolean hasValueChanged() {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
-	 */
-	public void setValue(String expression) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
-	 */
-	public void setValue(IValue value) {
-		fValue= value;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
-	 */
-	public boolean supportsValueModification() {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
-	 */
-	public boolean verifyValue(String expression) {
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
-	 */
-	public boolean verifyValue(IValue value) {
-		return false;
-	}
-
-    protected synchronized void setValid(boolean valid) {
-        fValid= valid;        
-        notifyAll();
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntPropertiesValue.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntPropertiesValue.java
deleted file mode 100644
index 87a4890..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntPropertiesValue.java	
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au) - bug 154907
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-public class AntPropertiesValue extends AntDebugElement implements IValue {
-	
-	private List fProperties= new ArrayList();
-	
-	public AntPropertiesValue(AntDebugTarget target) {
-		super(target);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
-	 */
-	public String getReferenceTypeName() {
-		return ""; //$NON-NLS-1$
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValue#getValueString()
-	 */
-	public String getValueString() {
-		return ""; //$NON-NLS-1$
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValue#isAllocated()
-	 */
-	public boolean isAllocated() {
-		return true;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValue#getVariables()
-	 */
-	public IVariable[] getVariables() {
-		Collections.sort(fProperties);
-		return (IVariable[])fProperties.toArray(new IVariable[fProperties.size()]);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IValue#hasVariables()
-	 */
-	public boolean hasVariables() {
-		return true;
-	}
-	
-	protected void addProperties(List properties) {
-		fProperties.addAll(properties);
-	}
-
-	protected List getProperties() {
-		return fProperties;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperty.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperty.java
deleted file mode 100644
index 3ba70c0..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntProperty.java	
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au) - bug 154907
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * A property in an Ant build.
- */
-public class AntProperty extends AntDebugElement implements IVariable, Comparable {
-
-	private String fName;
-	private AntValue fValue;
-    private String fLabel;
-	
-	/**
-	 * Constructs a variable associated with the debug target
-	 * with the given name and value.
-	 * 
-	 * @param target the debug target
-	 * @param name property name
-	 * @param value property value
-	 */
-	public AntProperty(AntDebugTarget target, String name, String value) {
-		super(target);
-		fName = name;
-		fValue= new AntValue(target, value);
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IVariable#getValue()
-	 */
-	public IValue getValue() {
-		return fValue;
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IVariable#getName()
-	 */
-	public String getName() {
-		return fName;
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IVariable#getReferenceTypeName()
-	 */
-	public String getReferenceTypeName() {
-		return ""; //$NON-NLS-1$
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IVariable#hasValueChanged()
-	 */
-	public boolean hasValueChanged() {
-		return false;
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String)
-	 */
-	public void setValue(String expression) {
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IValueModification#setValue(org.eclipse.debug.core.model.IValue)
-	 */
-	public void setValue(IValue value) {
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification()
-	 */
-	public boolean supportsValueModification() {
-		return false;
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String)
-	 */
-	public boolean verifyValue(String expression) {
-		return false;
-	}
-	
-	/*
-	 * @see org.eclipse.debug.core.model.IValueModification#verifyValue(org.eclipse.debug.core.model.IValue)
-	 */
-	public boolean verifyValue(IValue value) {
-		return false;
-	}
-
-    /**
-     * @return the text used to render this property
-     */
-    public String getText() {
-        if (fLabel == null) {
-            StringBuffer buffer= new StringBuffer(getName());
-            buffer.append("= "); //$NON-NLS-1$
-            buffer.append(fValue.getValueString());          
-            fLabel=  buffer.toString();
-        } 
-        return fLabel;
-    }
-    
-    /*
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    public int compareTo(Object other) {
-    	AntProperty otherProperty = (AntProperty) other;
-    	return fName.compareToIgnoreCase(otherProperty.getName());
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntStackFrame.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntStackFrame.java
deleted file mode 100644
index a61c9ee..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntStackFrame.java	
+++ /dev/null
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IRegisterGroup;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * Ant stack frame.
- */
-public class AntStackFrame extends AntDebugElement implements IStackFrame {
-	
-	private AntThread fThread;
-	private String fName;
-	private int fLineNumber;
-	private String fFilePath;
-	private int fId;
-    private String fFullPath;
-	
-	/**
-	 * Constructs a stack frame in the given thread with the given id.
-	 * 
-	 * @param thread
-	 * @param id stack frame id (0 is the top of the stack)
-	 */
-	public AntStackFrame(AntThread thread, int id, String name, String fullPath, int lineNumber) {
-		super((AntDebugTarget) thread.getDebugTarget());
-		fId = id;
-		fThread = thread;
-		fLineNumber= lineNumber;
-		fName= name;
-		setFilePath(fullPath);
-	}
-	
-	protected void setId(int id) {
-		fId= id;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getThread()
-	 */
-	public IThread getThread() {
-		return fThread;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getVariables()
-	 */
-	public IVariable[] getVariables() throws DebugException {
-	   return fThread.getVariables();
-	}
-
-    /* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#hasVariables()
-	 */
-	public boolean hasVariables() {
-		return isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getLineNumber()
-	 */
-	public int getLineNumber() {
-		return fLineNumber;
-	}
-	
-	protected void setLineNumber(int lineNumber) {
-		fLineNumber= lineNumber;
-	}
-	
-	protected void setFilePath(String fullPath) {
-        fFullPath= fullPath;
-        IFile file= AntUtil.getFileForLocation(fullPath, null);
-        if (file != null) {
-            fFilePath= file.getProjectRelativePath().toString();
-        } else {
-            fFilePath= new Path(fullPath).lastSegment();
-        }
-	}
-	
-	public String getFilePath() {
-		return fFullPath;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getCharStart()
-	 */
-	public int getCharStart() {
-		return -1;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getCharEnd()
-	 */
-	public int getCharEnd() {
-		return -1;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getName()
-	 */
-	public String getName() {
-		return fName;
-	}
-	
-	protected void setName(String name) {
-		fName= name;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#getRegisterGroups()
-	 */
-	public IRegisterGroup[] getRegisterGroups() {
-		return null;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStackFrame#hasRegisterGroups()
-	 */
-	public boolean hasRegisterGroups() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepInto()
-	 */
-	public boolean canStepInto() {
-		return getThread().canStepInto();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepOver()
-	 */
-	public boolean canStepOver() {
-		return getThread().canStepOver();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepReturn()
-	 */
-	public boolean canStepReturn() {
-		return getThread().canStepReturn();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#isStepping()
-	 */
-	public boolean isStepping() {
-		return getThread().isStepping();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepInto()
-	 */
-	public void stepInto() throws DebugException {
-		getThread().stepInto();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepOver()
-	 */
-	public void stepOver() throws DebugException {
-		getThread().stepOver();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepReturn()
-	 */
-	public void stepReturn() throws DebugException {
-		getThread().stepReturn();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
-	 */
-	public boolean canResume() {
-		return getThread().canResume();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
-	 */
-	public boolean canSuspend() {
-		return getThread().canSuspend();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
-	 */
-	public boolean isSuspended() {
-		return getThread().isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
-	 */
-	public void resume() throws DebugException {
-		getThread().resume();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
-	 */
-	public void suspend() throws DebugException {
-		getThread().suspend();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
-	 */
-	public boolean canTerminate() {
-		return getThread().canTerminate();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
-	 */
-	public boolean isTerminated() {
-		return getThread().isTerminated();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
-	 */
-	public void terminate() throws DebugException {
-		getThread().terminate();
-	}
-	
-	/**
-	 * Returns the name of the buildfile this stack frame is associated
-	 * with.
-	 * 
-	 * @return the name of the buildfile this stack frame is associated
-	 * with
-	 */
-	public String getSourceName() {
-		return fFilePath;
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (obj instanceof AntStackFrame) {
-			AntStackFrame sf = (AntStackFrame)obj;
-			if (getSourceName() != null) {
-				return getSourceName().equals(sf.getSourceName()) &&
-					sf.getLineNumber() == getLineNumber() &&
-					sf.fId == fId;
-			} 
-			return sf.fId == fId;
-		}
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-	    if (getSourceName() == null) {
-	        return fId;
-	    }
-	    return getSourceName().hashCode() + fId;
-	}
-	
-	/**
-	 * Returns this stack frame's unique identifier within its thread
-	 * 
-	 * @return this stack frame's unique identifier within its thread
-	 */
-	protected int getIdentifier() {
-		return fId;
-	}
-    
-    /**
-     * Returns the system, user or runtime property
-     * name, or <code>null</code> if unable to resolve a property with the name.
-     *
-     * @param propertyName the name of the variable to search for
-     * @return a property, or <code>null</code> if none
-     */
-    public AntProperty findProperty(String propertyName) {
-        try {
-            IVariable[] groups= getVariables();
-            for (int i = 0; i < groups.length; i++) {
-                AntProperties propertiesGrouping = (AntProperties) groups[i];
-                AntPropertiesValue value= (AntPropertiesValue) propertiesGrouping.getValue();
-                IVariable[] properties= value.getVariables();
-                for (int j = 0; j < properties.length; j++) {
-                    AntProperty property = (AntProperty) properties[j];
-                    if (property.getName().equals(propertyName)) {
-                        return property;
-                    }
-                }
-            }
-        } catch (DebugException e) {
-        }
-        return null;
-    } 
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntThread.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntThread.java
deleted file mode 100644
index e351a80..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntThread.java	
+++ /dev/null
@@ -1,479 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.core.model.IVariable;
-
-/**
- * An Ant build thread.
- */
-public class AntThread extends AntDebugElement implements IThread {
-	
-	/**
-	 * Breakpoints this thread is suspended at or <code>null</code>
-	 * if none.
-	 */
-	private IBreakpoint[] fBreakpoints;
-	
-	/**
-	 * The stackframes associated with this thread
-	 */
-	private List fFrames= new ArrayList(1);
-	
-	/**
-	 * The stackframes to be reused on suspension
-	 */
-	private List fOldFrames;
-	
-	/**
-	 * Whether this thread is stepping
-	 */
-	private boolean fStepping = false;
-	
-	private boolean fRefreshProperties= true;
-	
-	/**
-	 * The user properties associated with this thread
-	 */
-	private AntProperties fUserProperties;
-	
-	/**
-	 * The system properties associated with this thread
-	 */
-	private AntProperties fSystemProperties;
-	
-	/**
-	 * The properties set during the build associated with this thread
-	 */
-	private AntProperties fRuntimeProperties;
-    
-    private Object fPropertiesLock= new Object();
-	
-	/**
-	 * Constructs a new thread for the given target
-	 * 
-	 * @param target the Ant Build
-	 */
-	public AntThread(AntDebugTarget target) {
-		super(target);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#getStackFrames()
-	 */
-	public synchronized IStackFrame[] getStackFrames() throws DebugException {
-		if (isSuspended()) {
-			if (fFrames.size() == 0) {
-				getStackFrames0();
-			}
-		} 
-		
-		return (IStackFrame[]) fFrames.toArray(new IStackFrame[fFrames.size()]);
-	}
-	
-	/**
-	 * Retrieves the current stack frames in the thread
-	 * possibly waiting until the frames are populated
-     * 
-	 */
-	private void getStackFrames0() throws DebugException {
-        synchronized (fFrames) {
-    		getAntDebugTarget().getStackFrames();
-            if (fFrames.size() > 0) {
-                //frames set..no need to wait
-                return;
-            }
-            int attempts= 0;
-    		try {
-                while (fFrames.size() == 0 && !isTerminated()) {
-                    fFrames.wait(50);
-                    if (attempts == 20 && fFrames.size() == 0 && !isTerminated()) {
-                        throwDebugException(DebugModelMessages.AntThread_3);
-                    }
-                    attempts++;
-                }
-    		} catch (InterruptedException e) {
-    		}
-        }
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#hasStackFrames()
-	 */
-	public boolean hasStackFrames() throws DebugException {
-		return isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#getPriority()
-	 */
-	public int getPriority() throws DebugException {
-		return 0;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#getTopStackFrame()
-	 */
-	public synchronized IStackFrame getTopStackFrame() throws DebugException {
-		if (isSuspended()) {
-			if (fFrames.size() == 0) {
-				getStackFrames0();
-			}
-			if (fFrames.size() > 0) {
-				return (IStackFrame)fFrames.get(0);
-			}
-		} 
-		return null;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#getName()
-	 */
-	public String getName() {
-		return "Thread [Ant Build]"; //$NON-NLS-1$
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IThread#getBreakpoints()
-	 */
-	public IBreakpoint[] getBreakpoints() {
-		if (fBreakpoints == null) {
-			return new IBreakpoint[0];
-		}
-		return fBreakpoints;
-	}
-	
-	/**
-	 * Sets the breakpoints this thread is suspended at, or <code>null</code>
-	 * if none.
-	 * 
-	 * @param breakpoints the breakpoints this thread is suspended at, or <code>null</code>
-	 * if none
-	 */
-	protected void setBreakpoints(IBreakpoint[] breakpoints) {
-		fBreakpoints = breakpoints;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
-	 */
-	public boolean canResume() {
-		return isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#canSuspend()
-	 */
-	public boolean canSuspend() {
-		return !isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
-	 */
-	public boolean isSuspended() {
-		return getDebugTarget().isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#resume()
-	 */
-	public synchronized void resume() throws DebugException {
-		aboutToResume(DebugEvent.CLIENT_REQUEST, false);
-		getDebugTarget().resume();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ISuspendResume#suspend()
-	 */
-	public synchronized void suspend() throws DebugException {
-		getDebugTarget().suspend();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepInto()
-	 */
-	public boolean canStepInto() {
-	    return isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepOver()
-	 */
-	public boolean canStepOver() {
-		return isSuspended();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#canStepReturn()
-	 */
-	public boolean canStepReturn() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#isStepping()
-	 */
-	public boolean isStepping() {
-		return fStepping;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepInto()
-	 */
-	public synchronized void stepInto() throws DebugException {
-	    aboutToResume(DebugEvent.STEP_INTO, true);
-		((AntDebugTarget)getDebugTarget()).stepInto();
-	}
-	
-	private void aboutToResume(int detail, boolean stepping) {
-	    fRefreshProperties= true;
-	    fOldFrames= new ArrayList(fFrames);
-        fFrames.clear();
-        setPropertiesValid(false);
-	    setStepping(stepping);
-	    setBreakpoints(null);
-		fireResumeEvent(detail);
-    }
-
-    private void setPropertiesValid(boolean valid) {
-        if (fUserProperties != null) {
-            fUserProperties.setValid(valid);
-            fSystemProperties.setValid(valid);
-            fRuntimeProperties.setValid(valid);
-        }
-    }
-
-    /* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepOver()
-	 */
-	public synchronized void stepOver() throws DebugException {
-	    aboutToResume(DebugEvent.STEP_OVER, true);
-		((AntDebugTarget)getDebugTarget()).stepOver();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.IStep#stepReturn()
-	 */
-	public synchronized void stepReturn() throws DebugException {
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
-	 */
-	public boolean canTerminate() {
-		return !isTerminated();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
-	 */
-	public boolean isTerminated() {
-		return getDebugTarget().isTerminated();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
-	 */
-	public void terminate() throws DebugException {
-		fFrames.clear();
-		getDebugTarget().terminate();
-	}
-	
-	/**
-	 * Sets whether this thread is stepping
-	 * 
-	 * @param stepping whether stepping
-	 */
-	protected void setStepping(boolean stepping) {
-		fStepping = stepping;
-	}
-
-    public void buildStack(String data) { 
-        synchronized (fFrames) {
-            String[] strings= data.split(DebugMessageIds.MESSAGE_DELIMITER);
-            //0 STACK message
-            //1 targetName
-            //2 taskName
-            //3 filePath
-            //4 lineNumber
-            //5 ...
-            if (fOldFrames != null && (strings.length - 1)/ 4 != fOldFrames.size()) {
-                fOldFrames= null; //stack size changed..do not preserve
-            }
-            StringBuffer name;
-            String filePath;
-            int lineNumber;
-            int stackFrameId= 0;
-            String taskName;
-            for (int i = 1; i < strings.length; i++) {
-                if (strings[i].length() > 0) {
-                    name= new StringBuffer(strings[i]);
-                    taskName= strings[++i];
-                    if (taskName.length() > 0) {
-                        name.append(": "); //$NON-NLS-1$
-                        name.append(taskName);
-                    }
-                } else {
-                    name= new StringBuffer(strings[++i]);
-                }
-                filePath= strings[++i];
-                lineNumber= Integer.parseInt(strings[++i]);
-                addFrame(stackFrameId++, name.toString(), filePath, lineNumber);
-            }
-            //wake up the call from getStackFrames
-            fFrames.notifyAll();
-        }
-    }
-    
-    private void addFrame(int stackFrameId, String name, String filePath, int lineNumber) {
-    	AntStackFrame frame= getOldFrame();
-    	
-    	if (frame == null || !frame.getFilePath().equals(filePath)) {
-    		frame= new AntStackFrame(this, stackFrameId, name, filePath, lineNumber);
-    	} else {
-    		frame.setFilePath(filePath);
-    		frame.setId(stackFrameId);
-    		frame.setLineNumber(lineNumber);
-    		frame.setName(name);
-    	}
-		fFrames.add(frame);
-    }
-    
-    private AntStackFrame getOldFrame() {
-    	if (fOldFrames == null) {
-    		return null;
-    	}
-    	AntStackFrame frame= (AntStackFrame) fOldFrames.remove(0);
-    	if (fOldFrames.isEmpty()) {
-    		fOldFrames= null;
-    	}
-    	return frame;
-    }
-    
-    public void newProperties(String data) {
-        synchronized (fPropertiesLock) {
-            try {
-                String[] datum= data.split(DebugMessageIds.MESSAGE_DELIMITER);
-                if (fUserProperties == null) {
-                    initializePropertyGroups();
-                }
-
-                List userProperties= ((AntPropertiesValue)fUserProperties.getLastValue()).getProperties();
-                List systemProperties= ((AntPropertiesValue)fSystemProperties.getLastValue()).getProperties();
-                List runtimeProperties= ((AntPropertiesValue)fRuntimeProperties.getLastValue()).getProperties();
-                //0 PROPERTIES message
-                //1 propertyName length
-                //2 propertyName
-                //3 propertyValue length
-                //3 propertyValue
-                //4 propertyType
-                //5 ...
-                if (datum.length > 1) { //new properties
-                    StringBuffer propertyName;
-                    StringBuffer propertyValue;
-                    int propertyNameLength;
-                    int propertyValueLength;
-                    for (int i = 1; i < datum.length; i++) {
-                        propertyNameLength= Integer.parseInt(datum[i]);
-                        propertyName= new StringBuffer(datum[++i]);
-                        while (propertyName.length() != propertyNameLength) {
-                            propertyName.append(DebugMessageIds.MESSAGE_DELIMITER);
-                            propertyName.append(datum[++i]);
-                        }
-
-                        propertyName= getAntDebugTarget().getAntDebugController().unescapeString(propertyName);
-
-                        propertyValueLength= Integer.parseInt(datum[++i]);
-                        if (propertyValueLength == 0 && i + 1 == datum.length) { //bug 81299
-                            propertyValue= new StringBuffer(""); //$NON-NLS-1$
-                        } else {
-                            propertyValue= new StringBuffer(datum[++i]);
-                        }
-                        while (propertyValue.length() != propertyValueLength) {
-                            propertyValue.append(DebugMessageIds.MESSAGE_DELIMITER);
-                            propertyValue.append(datum[++i]);
-                        }
-
-                        propertyValue= getAntDebugTarget().getAntDebugController().unescapeString(propertyValue);
-
-                        int propertyType= Integer.parseInt(datum[++i]);
-                        addProperty(userProperties, systemProperties, runtimeProperties, propertyName.toString(), propertyValue.toString(), propertyType);
-                    }
-                }
-            } finally {
-                fRefreshProperties= false;
-                setPropertiesValid(true);
-                //wake up the call from getVariables
-                fPropertiesLock.notifyAll();
-            }
-        }
-	}
-
-	private void addProperty(List userProperties, List systemProperties, List runtimeProperties, String propertyName, String propertyValue, int propertyType) {
-		AntProperty property= new AntProperty((AntDebugTarget) getDebugTarget(), propertyName, propertyValue);
-		switch (propertyType) {
-			case DebugMessageIds.PROPERTY_SYSTEM:
-				systemProperties.add(property);
-				break;
-			case DebugMessageIds.PROPERTY_USER:
-				userProperties.add(property);
-				break;
-			case DebugMessageIds.PROPERTY_RUNTIME:
-				runtimeProperties.add(property);
-				break;
-		}
-	}
-
-	private void initializePropertyGroups() {
-        AntDebugTarget target= getAntDebugTarget();
-		fUserProperties= new AntProperties(target, DebugModelMessages.AntThread_0);
-		fUserProperties.setValue(new AntPropertiesValue(target));
-		fSystemProperties= new AntProperties(target, DebugModelMessages.AntThread_1);
-		fSystemProperties.setValue(new AntPropertiesValue(target));
-		fRuntimeProperties= new AntProperties(target, DebugModelMessages.AntThread_2);
-		fRuntimeProperties.setValue(new AntPropertiesValue(target));
-	}
-    
-    protected IVariable[] getVariables() throws DebugException {
-        synchronized (fPropertiesLock) {
-            if (fRefreshProperties) {
-                getAntDebugTarget().getProperties();
-                if (fRefreshProperties) { 
-                    //properties have not been set; need to wait
-                    try {
-                        int attempts= 0;
-                        while (fRefreshProperties && !isTerminated()) {
-                            fPropertiesLock.wait(50);
-                            if (attempts == 20 && fRefreshProperties && !isTerminated()) {
-                                throwDebugException(DebugModelMessages.AntThread_4);
-                            }
-                            attempts++;
-                        }
-                    } catch (InterruptedException ie) {
-                    }
-                }
-            }
-            if (fSystemProperties == null) {
-                return new IVariable[0];
-            }
-            return new IVariable[]{fSystemProperties, fUserProperties, fRuntimeProperties};
-        }
-    }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntValue.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntValue.java
deleted file mode 100644
index 3359655..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/AntValue.java	
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.model.IVariable;
-
-public class AntValue extends AntDebugElement implements IValue  {
-
-    private String fValueString;
-    protected static final IVariable[] EMPTY = new IVariable[0];
-    
-    /**
-     * @param target
-     */
-    public AntValue(AntDebugTarget target, String value) {
-        super(target);
-        fValueString= value;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
-     */
-    public String getReferenceTypeName() {
-        return ""; //$NON-NLS-1$
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IValue#getValueString()
-     */
-    public String getValueString() {
-        return fValueString;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IValue#isAllocated()
-     */
-    public boolean isAllocated() {
-        return true;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IValue#getVariables()
-     */
-    public IVariable[] getVariables() {
-        return EMPTY;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IValue#hasVariables()
-     */
-    public boolean hasVariables() {
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.IDebugElement#getModelIdentifier()
-     */
-    public String getModelIdentifier() {
-        return IAntDebugConstants.ID_ANT_DEBUG_MODEL;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugMessageIds.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugMessageIds.java
deleted file mode 100644
index b69c08c..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugMessageIds.java	
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.debug.model;
-
-public class DebugMessageIds {
-	
-	public final static String MESSAGE_DELIMITER= ","; //$NON-NLS-1$
-	
-	public final static String BUILD_STARTED=   "build_started"; //$NON-NLS-1$
-	public final static String TARGET_STARTED= "target_started"; //$NON-NLS-1$
-	public final static String TARGET_FINISHED= "target_finished"; //$NON-NLS-1$
-	public final static String TASK_STARTED= "task_started"; //$NON-NLS-1$
-	public final static String TASK_FINISHED= "task_finished"; //$NON-NLS-1$
-	
-	public final static String STEP= "step"; //$NON-NLS-1$
-	public final static String STEP_OVER= "step_over"; //$NON-NLS-1$
-	public final static String STEP_INTO= "step_into"; //$NON-NLS-1$
-	
-	public final static String TERMINATE= "terminate"; //$NON-NLS-1$
-	public final static String TERMINATED= "terminated"; //$NON-NLS-1$
-	
-	public final static String SUSPEND= "suspend"; //$NON-NLS-1$
-	public final static String SUSPENDED= "suspended"; //$NON-NLS-1$
-	
-	public final static String RESUME= "resume"; //$NON-NLS-1$
-	
-	public final static String STACK= "stack"; //$NON-NLS-1$
-	
-	public final static String ADD_BREAKPOINT= "add"; //$NON-NLS-1$
-	public final static String REMOVE_BREAKPOINT= "remove"; //$NON-NLS-1$
-	
-	public final static String CLIENT_REQUEST= "client"; //$NON-NLS-1$
-	public final static String BREAKPOINT= "breakpoint"; //$NON-NLS-1$
-	
-	public final static String PROPERTIES= "prop"; //$NON-NLS-1$
-	public final static String PROPERTY_VALUE= "value"; //$NON-NLS-1$
-	public final static int PROPERTY_USER= 0;
-	public final static int PROPERTY_SYSTEM= 1;
-	public final static int PROPERTY_RUNTIME= 2;
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java
index 5ba3594..2452a1d 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.java	
@@ -1,12 +1,13 @@
-/**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * IBM - Initial API and implementation
- **********************************************************************/
+ *******************************************************************************/
 package org.eclipse.ant.internal.ui.debug.model;
 
 import org.eclipse.osgi.util.NLS;
@@ -14,8 +15,6 @@ import org.eclipse.osgi.util.NLS;
 public class DebugModelMessages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.ui.debug.model.DebugModelMessages";//$NON-NLS-1$
 
-	public static String AntDebugTarget_0;
-
 	public static String AntDebugModelPresentation_0;
 	public static String AntDebugModelPresentation_1;
 	public static String AntDebugModelPresentation_2;
@@ -23,14 +22,6 @@ public class DebugModelMessages extends NLS {
 	public static String AntDebugModelPresentation_4;
 	public static String AntDebugModelPresentation_5;
 
-	public static String AntLineBreakpoint_0;
-	public static String AntThread_0;
-	public static String AntThread_1;
-	public static String AntThread_2;
-    public static String AntThread_3;
-    public static String AntThread_4;
-    
-    public static String AntProperties_1;
     
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties
index 067db09..373fbc1 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/DebugModelMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2004, 2005 IBM Corporation and others.
+# Copyright (c) 2004, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,20 +9,9 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-AntDebugTarget_0=Ant Build
-
 AntDebugModelPresentation_0=<not available>
 AntDebugModelPresentation_1=\ line: {0}
 AntDebugModelPresentation_2=(breakpoint at line {0} in {1})
 AntDebugModelPresentation_3=\ (Suspended {0})
 AntDebugModelPresentation_4=\ (Suspended)
 AntDebugModelPresentation_5=(run to line {0} in {1})
-
-AntLineBreakpoint_0=Ant breakpoint [line: {0}]
-AntThread_0=User Properties
-AntThread_1=System Properties
-AntThread_2=Runtime Properties
-AntThread_3=Request to retrieve Ant stack frames failed
-AntThread_4=Request to retrieve Ant properties failed
-
-AntProperties_1=Request to Ant properties value failed
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/RemoteAntDebugBuildListener.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/RemoteAntDebugBuildListener.java
deleted file mode 100644
index 6ccb556..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/debug/model/RemoteAntDebugBuildListener.java	
+++ /dev/null
@@ -1,321 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.debug.model;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.Socket;
-import java.net.UnknownHostException;
-
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.debug.IAntDebugController;
-import org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntBuildListener;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.ILineBreakpoint;
-import org.eclipse.debug.core.model.IProcess;
-
-public class RemoteAntDebugBuildListener extends RemoteAntBuildListener implements IAntDebugController {
-	
-	// sockets to communicate with the remote Ant debug build logger
-	private Socket fRequestSocket;
-	private PrintWriter fRequestWriter;
-	private BufferedReader fResponseReader;
-	
-	private int fRequestPort= -1;
-	private Thread fReaderThread;
-	
-	private AntDebugTarget fTarget;
-	
-	/**
-	 * Reader thread that processes request responses from the remote Ant debug build logger
-	 */
-	private class ReaderThread extends Thread {
-		public ReaderThread() {
-			super("Ant Request Response Reader Thread"); //$NON-NLS-1$
-			setDaemon(true);
-		}
-
-		public void run(){
-			try { 
-				String message= null; 
-				while (fResponseReader != null) { 
-				    synchronized (RemoteAntDebugBuildListener.this) {
-				        if (fResponseReader != null && (message= fResponseReader.readLine()) != null) {
-				            receiveMessage(message);
-				        }
-				    }
-				} 
-			} catch (IOException ie) { //the other end has shutdown
-				RemoteAntDebugBuildListener.this.shutDown();
-			} catch (Exception e) {
-				AntUIPlugin.log("Internal error processing remote response", e); //$NON-NLS-1$
-				RemoteAntDebugBuildListener.this.shutDown();
-			}
-		}
-	}	
-	
-	public RemoteAntDebugBuildListener(ILaunch launch) {
-		super(launch);
-		//fDebug= true;
-	}
-	
-	protected void receiveMessage(String message) {
-		if (message.startsWith(DebugMessageIds.BUILD_STARTED)) {
-			buildStarted();
-		} else if (message.startsWith(DebugMessageIds.SUSPENDED)){
-			handleSuspendMessage(message);
-		} else if (message.startsWith(DebugMessageIds.TERMINATED)){
-			fTarget.terminated();
-		} else if (message.startsWith(DebugMessageIds.STACK)){
-			AntThread thread= (AntThread) fTarget.getThreads()[0];
-			thread.buildStack(message);
-		} else if (message.startsWith(DebugMessageIds.PROPERTIES)){
-		    AntThread thread= (AntThread) fTarget.getThreads()[0];
-		    thread.newProperties(message);
-		} else {
-			super.receiveMessage(message);
-		}
-	}
-
-    private void handleSuspendMessage(String message) {
-        if (message.endsWith(DebugMessageIds.CLIENT_REQUEST)) {
-        	fTarget.suspended(DebugEvent.CLIENT_REQUEST);
-        } else if (message.endsWith(DebugMessageIds.STEP)) {
-        	fTarget.suspended(DebugEvent.STEP_END);
-        } else if (message.indexOf(DebugMessageIds.BREAKPOINT) >= 0) {
-        	fTarget.breakpointHit(message);
-        }
-    }
-
-    private void buildStarted() {
-        IProcess process= getProcess();
-        while(process == null) {
-        	try {
-        		synchronized (this) {
-        			wait(400);
-        		}
-        		process= getProcess();
-        	} catch (InterruptedException ie) {
-        	}
-        }
-        fTarget= new AntDebugTarget(fLaunch, process, this);
-        fLaunch.addDebugTarget(fTarget);
-        
-        if (!connectRequest()) {
-			RemoteAntDebugBuildListener.this.shutDown();
-			return;
-        }
-        
-        fTarget.buildStarted();
-    }
-
-    private boolean connectRequest() {
-    	Exception exception= null;
-    	for (int i= 1; i < 20; i++) {
-    		try {
-    			fRequestSocket = new Socket("localhost", fRequestPort); //$NON-NLS-1$
-    			fRequestWriter = new PrintWriter(fRequestSocket.getOutputStream(), true);
-    			fResponseReader = new BufferedReader(new InputStreamReader(fRequestSocket.getInputStream()));
-    			
-    			fReaderThread= new ReaderThread();
-    			fReaderThread.start();
-    			return true;
-    		} catch (UnknownHostException e) {
-    			exception= e;
-    			break;
-    		} catch (IOException e) {
-    			exception= e;
-    		}
-    		try {
-				Thread.sleep(500);
-			} catch(InterruptedException e) {
-			}
-    	}
-    	AntUIPlugin.log("Internal error attempting to connect to debug target", exception); //$NON-NLS-1$
-    	return false;
-	}
-
-	/**
-	 * Start listening to an Ant build. Start a server connection that
-	 * the RemoteAntDebugBuildLogger can connect to.
-	 * 
-	 * @param eventPort The port number to create the server connection on
-     * @param requestPort The port number to use for sending requests to the remote logger
-	 */
-	public synchronized void startListening(int eventPort, int requestPort) {
-		super.startListening(eventPort);
-		fRequestPort= requestPort;
-	}
-	
-	/**
-	 * Sends a request to the Ant build
-	 * 
-	 * @param request debug command
-	 */
-	protected void sendRequest(String request) {
-		if (fRequestSocket == null) {
-			return;
-		}
-		synchronized (fRequestSocket) {
-			fRequestWriter.println(request);
-		}		
-	}
-	
-	protected synchronized void shutDown() {
-        if (fTarget != null) {
-            fTarget.terminated();
-            fTarget= null;
-        }
-		fLaunch= null;
-		if (DebugPlugin.getDefault() != null) {
-			DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
-		}
-		try {
-			if (fReaderThread != null)   {
-				// interrupt reader thread so that we don't block on close
-				// on a lock held by the BufferedReader
-				// see bug: 38955
-				fReaderThread.interrupt();
-			}
-			if (fResponseReader != null) {
-				fResponseReader.close();
-				fResponseReader= null;
-			}
-		} catch(IOException e) {
-		}	
-		if (fRequestWriter != null) {
-			fRequestWriter.close();
-			fRequestWriter= null;
-		}
-		try{
-			if(fRequestSocket != null) {
-				fRequestSocket.close();
-				fRequestSocket= null;
-			}
-		} catch(IOException e) {
-		}
-		super.shutDown();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#resume()
-	 */
-	public void resume() {
-		sendRequest(DebugMessageIds.RESUME);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#suspend()
-	 */
-	public void suspend() {
-		sendRequest(DebugMessageIds.SUSPEND);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepInto()
-	 */
-	public void stepInto() {
-		sendRequest(DebugMessageIds.STEP_INTO);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#stepOver()
-	 */
-	public void stepOver() {
-		sendRequest(DebugMessageIds.STEP_OVER);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#handleBreakpoint(IBreakpoint, boolean)
-	 */
-	public void handleBreakpoint(IBreakpoint breakpoint, boolean add) {
-		if (fTarget == null || !fTarget.supportsBreakpoint(breakpoint)) {
-			return;
-		}
-		StringBuffer message= new StringBuffer();
-		if (add) {
-			try {
-				if (!breakpoint.isEnabled()) {
-					return;
-				}
-			} catch (CoreException e) {
-				AntUIPlugin.log(e);
-				return;
-			}
-			message.append(DebugMessageIds.ADD_BREAKPOINT);
-		} else {
-			message.append(DebugMessageIds.REMOVE_BREAKPOINT);
-		}
-		message.append(DebugMessageIds.MESSAGE_DELIMITER);
-		message.append(breakpoint.getMarker().getResource().getLocation().toOSString());
-		message.append(DebugMessageIds.MESSAGE_DELIMITER);
-		try {
-			message.append(((ILineBreakpoint)breakpoint).getLineNumber());
-			sendRequest(message.toString());
-		} catch (CoreException ce) {
-			AntUIPlugin.log(ce);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getProperties()
-	 */
-	public void getProperties() {
-		sendRequest(DebugMessageIds.PROPERTIES);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#getStackFrames()
-	 */
-	public void getStackFrames() {
-		sendRequest(DebugMessageIds.STACK);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.debug.IAntDebugController#unescapeString(java.lang.StringBuffer)
-	 */
-	public StringBuffer unescapeString(StringBuffer property) {
-		if (property.indexOf("\\r") == -1 && property.indexOf("\\n") == -1) { //$NON-NLS-1$ //$NON-NLS-2$
-			return property;
-		}
-		for (int i= 0; i < property.length(); i++) {
-			if ('\\' == property.charAt(i)) {
-				String newString= ""; //$NON-NLS-1$
-				if ('r' == property.charAt(i + 1)) {
-					if (i-1 > - 1 && '\\' == property.charAt(i-1)) {
-						newString= "r"; //$NON-NLS-1$
-					} else {
-						newString+= '\r';
-					}
-				} else if ('n' == property.charAt(i + 1)) {
-					if (i-1 > - 1 && '\\' == property.charAt(i-1)) {
-						newString= "n"; //$NON-NLS-1$
-					} else {
-						newString+= '\n';
-					}
-					
-				}
-				if (newString.length() > 0) {
-					property.replace(i, i + 2, newString);
-				}
-			}
-		}
-
-		return property;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java
index 71b0b97..4f4673c 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntBuilderTargetsTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,9 @@ import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.AntUtil;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.model.BuilderCoreUtils;
 import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -36,8 +39,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.externaltools.internal.model.BuilderUtils;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds;
 
 public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
@@ -68,16 +69,16 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
 			Object source = e.getSource();
             Text text= null;
 			if (source == fAfterCleanTarget) {
-                attribute= org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS;
+                attribute= IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS;
                 text= fAfterCleanTargetText;
 			} else if (source == fManualBuildTarget) {
-                attribute= org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS;
+                attribute= IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS;
                 text= fManualBuildTargetText;
 			} else if (source == fAutoBuildTarget) {
-                attribute= org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS;
+                attribute= IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS;
                 text= fAutoBuildTargetText;
 			} else if (source == fDuringCleanTarget) {
-                attribute= org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS;
+                attribute= IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS;
                 text= fDuringCleanTargetText;
 			}
 			
@@ -147,7 +148,7 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
         } catch (CoreException e) {
            return;
         }
-        copy.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String)fAttributeToTargets.get(attribute));
+        copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, (String)fAttributeToTargets.get(attribute));
 		SetTargetsDialog dialog= new SetTargetsDialog(getShell(), copy);
 		if (dialog.open() != Window.OK) {
 		    return;
@@ -211,7 +212,7 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
 
     public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
         configuration.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true);
-		configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_TARGETS_UPDATED, true);
+		configuration.setAttribute(IAntLaunchConstants.ATTR_TARGETS_UPDATED, true);
     }
 
     public void initializeFrom(ILaunchConfiguration configuration) {
@@ -233,19 +234,19 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
         String afterCleanTargets= null;
         String duringCleanTargets= null;
         try {
-			if (!configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_TARGETS_UPDATED, false)) {
+			if (!configuration.getAttribute(IAntLaunchConstants.ATTR_TARGETS_UPDATED, false)) {
 				//not yet migrated to new format
-				configTargets= configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String)null);
+				configTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, (String)null);
 			}
             
-            autoTargets= configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS, (String)null);
-            manualTargets= configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS, (String)null);
-            afterCleanTargets= configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS, (String)null);
-            duringCleanTargets= configuration.getAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS, (String)null);
-			initializeAttributeToTargets(fAutoBuildTargetText, autoTargets, configTargets, org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS);
-			initializeAttributeToTargets(fManualBuildTargetText, manualTargets, configTargets, org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS);
-			initializeAttributeToTargets(fDuringCleanTargetText, duringCleanTargets, configTargets, org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS);
-			initializeAttributeToTargets(fAfterCleanTargetText, afterCleanTargets, configTargets, org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS);
+            autoTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS, (String)null);
+            manualTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS, (String)null);
+            afterCleanTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS, (String)null);
+            duringCleanTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS, (String)null);
+			initializeAttributeToTargets(fAutoBuildTargetText, autoTargets, configTargets, IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS);
+			initializeAttributeToTargets(fManualBuildTargetText, manualTargets, configTargets, IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS);
+			initializeAttributeToTargets(fDuringCleanTargetText, duringCleanTargets, configTargets, IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS);
+			initializeAttributeToTargets(fAfterCleanTargetText, afterCleanTargets, configTargets, IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS);
         } catch (CoreException ce) {
             AntUIPlugin.log("Error reading configuration", ce); //$NON-NLS-1$
         }
@@ -273,7 +274,7 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
         } catch (CoreException e) {
             AntUIPlugin.log("Error reading configuration", e); //$NON-NLS-1$
         }
-        int buildTypes[]= BuilderUtils.buildTypesToArray(buildKindString);
+        int buildTypes[]= BuilderCoreUtils.buildTypesToArray(buildKindString);
         for (int i = 0; i < buildTypes.length; i++) {
             switch (buildTypes[i]) {
                 case IncrementalProjectBuilder.FULL_BUILD:
@@ -308,16 +309,15 @@ public class AntBuilderTargetsTab extends AbstractLaunchConfigurationTab {
         }
         configuration.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, buffer.toString());
         
-        String targets= (String) fAttributeToTargets.get(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS);
-        configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AFTER_CLEAN_TARGETS, targets);
-        targets= (String) fAttributeToTargets.get(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS);
-        configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_AUTO_TARGETS, targets);
-        targets= (String) fAttributeToTargets.get(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS);
-        configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_MANUAL_TARGETS, targets);
-        targets= (String) fAttributeToTargets.get(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS);
-        configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_ANT_CLEAN_TARGETS, targets);
-		
-		configuration.setAttribute(org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants.ATTR_TARGETS_UPDATED, true);
+        String targets= (String) fAttributeToTargets.get(IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS);
+        configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS, targets);
+        targets= (String) fAttributeToTargets.get(IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS);
+        configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS, targets);
+        targets= (String) fAttributeToTargets.get(IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS);
+        configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS, targets);
+        targets= (String) fAttributeToTargets.get(IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS);
+        configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS, targets);
+		configuration.setAttribute(IAntLaunchConstants.ATTR_TARGETS_UPDATED, true);
     }
 
     /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathProvider.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathProvider.java
deleted file mode 100644
index 6b58333..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathProvider.java	
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.StandardClasspathProvider;
-
-public class AntClasspathProvider extends StandardClasspathProvider {
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathProvider#computeUnresolvedClasspath(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
-		boolean useDefault = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true);
-		if (useDefault) {
-			List rtes = new ArrayList(10);
-			IRuntimeClasspathEntry jreEntry = null;
-			try {
-				jreEntry = JavaRuntime.computeJREEntry(configuration);
-			} catch (CoreException e) {
-				// not a java project
-			}
-			if (jreEntry == null) {
-				jreEntry = JavaRuntime.newRuntimeContainerClasspathEntry(
-						JavaRuntime.newDefaultJREContainerPath(), IRuntimeClasspathEntry.STANDARD_CLASSES);
-			}
-			rtes.add(jreEntry);
-			rtes.add(new AntHomeClasspathEntry());
-			rtes.add(new ContributedClasspathEntriesEntry());
-			return (IRuntimeClasspathEntry[]) rtes.toArray(new IRuntimeClasspathEntry[rtes.size()]);
-		}
-		return super.computeUnresolvedClasspath(configuration);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathTab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathTab.java
index 935fe98..1248e65 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathTab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntClasspathTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
 import org.eclipse.ant.internal.ui.AntUtil;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntHomeClasspathEntry;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.ui.ILaunchConfigurationTab;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntHomeClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntHomeClasspathEntry.java
deleted file mode 100644
index fdc1c20..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntHomeClasspathEntry.java	
+++ /dev/null
@@ -1,209 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.io.File;
-import com.ibm.icu.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.IAntClasspathEntry;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * A classpath entry that contains a set of archives for a particular
- * ANT_HOME.
- * 
- * @since 3.0 
- */
-public class AntHomeClasspathEntry extends AbstractRuntimeClasspathEntry {
-	
-	public static final String TYPE_ID = "org.eclipse.ant.ui.classpathentry.antHome"; //$NON-NLS-1$
-	
-	/**
-	 * Local path on disk where Ant Home is located or <code>null</code>
-	 * to indicate the use of the default Ant Home.
-	 */
-	private String antHomeLocation = null;
-	
-	/**
-	 * Creates an AntHome entry for the default AntHome installation.
-	 */
-	public AntHomeClasspathEntry() {
-		antHomeLocation = null;
-	}
-	
-	/**
-	 * Constructs an AntHome entry for the Ant installed at the specified
-	 * root directory.
-	 * 
-	 * @param antHome path in the local file system to an Ant installation
-	 */
-	public AntHomeClasspathEntry(String antHome) {
-		antHomeLocation = antHome;
-	}
-		
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry#buildMemento(org.w3c.dom.Document, org.w3c.dom.Element)
-	 */
-	protected void buildMemento(Document document, Element memento) throws CoreException {
-		if (antHomeLocation == null) {
-			memento.setAttribute("default", "true");  //$NON-NLS-1$//$NON-NLS-2$
-		} else {
-			memento.setAttribute("antHome", new Path(antHomeLocation).toString()); //$NON-NLS-1$
-		}
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.launching.IRuntimeClasspathEntry2#initializeFrom(org.w3c.dom.Element)
-	 */
-	public void initializeFrom(Element memento) throws CoreException {
-		String antHome = memento.getAttribute("antHome"); //$NON-NLS-1$
-		if (antHome != null && (antHome.length() > 0)) {
-			IPath path = new Path(antHome);
-			antHomeLocation = path.toOSString();
-		} else {
-			antHomeLocation = null;
-		}
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getTypeId()
-	 */
-	public String getTypeId() {
-		return TYPE_ID;
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getRuntimeClasspathEntries(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
-		List libs = new ArrayList(40);
-		AntCorePreferences preferences = AntCorePlugin.getPlugin().getPreferences();
-		if (antHomeLocation == null) {
-			IAntClasspathEntry[] entries = preferences.getAntHomeClasspathEntries();
-			for (int i = 0; i < entries.length; i++) {
-				IAntClasspathEntry entry = entries[i];
-				libs.add(JavaRuntime.newStringVariableClasspathEntry(entry.getLabel()));
-			}
-		} else {
-			File lib= resolveAntHome();
-			IPath libDir = new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
-			String[] fileNames = lib.list();
-			for (int i = 0; i < fileNames.length; i++) {
-				String name = fileNames[i];
-				IPath path = new Path(name);
-				String fileExtension = path.getFileExtension();
-				if ("jar".equalsIgnoreCase(fileExtension)) { //$NON-NLS-1$
-					libs.add(JavaRuntime.newArchiveRuntimeClasspathEntry(libDir.append(path)));
-				}
-			}
-		}
-		return (IRuntimeClasspathEntry[]) libs.toArray(new IRuntimeClasspathEntry[libs.size()]);
-	}
-	
-	public File resolveAntHome() throws CoreException {
-		if (antHomeLocation == null) { //using the default ant home
-			return null;
-		}
-		IPath libDir= new Path(antHomeLocation).append("lib"); //$NON-NLS-1$
-		File lib= libDir.toFile();
-		File parentDir= lib.getParentFile();
-		if (parentDir == null || !parentDir.exists()) {
-			abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_10, new String[] {antHomeLocation}), null);
-		}
-		if (!lib.exists() || !lib.isDirectory()) {
-			abort(MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_11, new String[] {antHomeLocation}), null);
-		}
-		return lib;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getName()
-	 */
-	public String getName() {
-		if (antHomeLocation == null) {
-			return AntLaunchConfigurationMessages.AntHomeClasspathEntry_8;
-		}
-		return MessageFormat.format(AntLaunchConfigurationMessages.AntHomeClasspathEntry_9, new String[]{antHomeLocation});
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry#getType()
-	 */
-	public int getType() {
-		return IRuntimeClasspathEntry.OTHER;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
-	 */
-	public boolean isComposite() {
-		return true;
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		return obj instanceof AntHomeClasspathEntry &&
-		  equalsOrNull(antHomeLocation, ((AntHomeClasspathEntry)obj).antHomeLocation);
-	}
-	
-	/**
-	 * Return whether s1 is equivalent to s2.
-	 * 
-	 * @param s1
-	 * @param s2
-	 * @return whether s1 is equivalent to s2
-	 */
-	private boolean equalsOrNull(String s1, String s2) {
-		if (s1 == null || s2 == null) {
-			return s1 == s2;
-		} 
-		return s1.equalsIgnoreCase(s2);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return getClass().hashCode();
-	}	
-	
-	/**
-	 * Sets the ant home to use.
-	 * 
-	 * @param path path to toor of an ant home installation
-	 */
-	protected void setAntHome(String path) {
-		antHomeLocation = path;
-	}
-	
-	/**
-	 * Returns the ant home location
-	 * 
-	 * @return path to root ant installation directory
-	 */
-	public String getAntHome() {
-		if (antHomeLocation == null) {
-			return AntCorePlugin.getPlugin().getPreferences().getAntHome();
-		}
-		return antHomeLocation;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJRETab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJRETab.java
index b396889..19ac949 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJRETab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntJRETab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,17 +13,19 @@ package org.eclipse.ant.internal.ui.launchConfigurations;
 
 import java.util.regex.Pattern;
 
-import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.variables.IStringVariableManager;
 import org.eclipse.core.variables.VariablesPlugin;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
 import org.eclipse.jdt.internal.debug.ui.jres.JREDescriptor;
 import org.eclipse.jdt.internal.debug.ui.launcher.VMArgumentsBlock;
@@ -35,11 +37,10 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 public class AntJRETab extends JavaJRETab {
 
-	private static final String MAIN_TYPE_NAME= "org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"; //$NON-NLS-1$
+	private static final String MAIN_TYPE_NAME= "org.eclipse.ant.internal.launching.remote.InternalAntRunner"; //$NON-NLS-1$
 	
 	private VMArgumentsBlock fVMArgumentsBlock=  new VMArgumentsBlock();
 	private AntWorkingDirectoryBlock fWorkingDirectoryBlock= new AntWorkingDirectoryBlock();
@@ -96,22 +97,19 @@ public class AntJRETab extends JavaJRETab {
 		boolean isDefaultJRE = fJREBlock.isDefaultJRE();
         fWorkingDirectoryBlock.setEnabled(!isDefaultJRE);
 		fVMArgumentsBlock.setEnabled(!isDefaultJRE);
+		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, (String)null);
+		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
 		if (isDefaultJRE) {
-			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, (String)null);
-			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
 			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
 			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, (String)null);
 			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, false);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_DEFAULT_VM_INSTALL, false);
 		} else {
 			super.performApply(configuration);
-			
-			if (useDefaultSeparateJRE(configuration)) {
-				configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, true);
-			} else {
-				configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, false);
-			}
-			
+			IVMInstall vm = fJREBlock.getJRE();
+			IPath path = fJREBlock.getPath();
+			String id = JavaRuntime.getExecutionEnvironmentId(path);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_DEFAULT_VM_INSTALL, ((vm == null || id != null) ? false : vm.equals(getDefaultVMInstall(configuration))));
 			applySeparateVMAttributes(configuration);
 			fVMArgumentsBlock.performApply(configuration);
 			fWorkingDirectoryBlock.performApply(configuration);
@@ -119,36 +117,6 @@ public class AntJRETab extends JavaJRETab {
 		setLaunchConfigurationWorkingCopy(configuration);
 	}
 	
-	private boolean useDefaultSeparateJRE(ILaunchConfigurationWorkingCopy configuration) {
-		boolean deflt= false;
-		String vmInstallType= null;
-        String jreContainerPath= null;
-		try {
-			vmInstallType= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
-            jreContainerPath= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
-		} catch (CoreException e) {
-		}
-		if (vmInstallType != null) {
-			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
-		}
-        if (jreContainerPath != null) {
-            configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
-        }
-		IVMInstall defaultVMInstall= getDefaultVMInstall(configuration);
-		if (defaultVMInstall != null) {
-			IVMInstall vm= fJREBlock.getJRE();
-			deflt= defaultVMInstall.equals(vm);
-		}
-		
-		if (vmInstallType != null) {
-			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, vmInstallType);
-		}
-        if (jreContainerPath != null) {
-            configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, jreContainerPath);
-        }
-		return deflt;
-	}
-	
 	private void applySeparateVMAttributes(ILaunchConfigurationWorkingCopy configuration) {
 		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, MAIN_TYPE_NAME);
 		//only set to use the remote ant process factory if the user
@@ -189,35 +157,10 @@ public class AntJRETab extends JavaJRETab {
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
 	 */
 	public void initializeFrom(ILaunchConfiguration configuration) {
-		try {
-			 boolean isDefaultVMInstall= configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, false);
-			 if (isDefaultVMInstall) {
-			 	ILaunchConfigurationWorkingCopy copy = null;
-			 	if (configuration instanceof ILaunchConfigurationWorkingCopy) {
-			 		copy= (ILaunchConfigurationWorkingCopy) configuration;
-			 	} else {
-			 		copy= configuration.getWorkingCopy();
-			 	}
-			 	
-			 	//null out the vm type and jre container path to get the default vm install from JavaRuntime
-			 	copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
-			 	copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
-			 	IVMInstall defaultVMInstall= getDefaultVMInstall(copy);
-			 	if (defaultVMInstall != null) {
-			 		//update if required
-			 		setDefaultVMInstallAttributes(defaultVMInstall, copy);
-			 	}
-				if (copy.isDirty() && !copy.isReadOnly()) {
-					configuration= copy.doSave();
-				}
-			 }
-        } catch (CoreException ce) {
-        	AntUIPlugin.log(ce);
-        }
 		super.initializeFrom(configuration);
 		fVMArgumentsBlock.initializeFrom(configuration);
 		fWorkingDirectoryBlock.initializeFrom(configuration);
-		boolean separateVM= !fJREBlock.isDefaultJRE();
+		boolean separateVM = !fJREBlock.isDefaultJRE();
 		fWorkingDirectoryBlock.setEnabled(separateVM);
 		fVMArgumentsBlock.setEnabled(separateVM);
 	}
@@ -275,22 +218,33 @@ public class AntJRETab extends JavaJRETab {
 		config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
 		IVMInstall defaultVMInstall= getDefaultVMInstall(config);
 		if (defaultVMInstall != null) {
-			config.setAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, true);
+			config.setAttribute(IAntLaunchConstants.ATTR_DEFAULT_VM_INSTALL, false);
 			setDefaultVMInstallAttributes(defaultVMInstall, config);
 			applySeparateVMAttributes(config);
 		}
 		
 	}
 
+	/**
+	 * Returns the default {@link IVMInstall} for the given {@link ILaunchConfiguration}, which resolves
+	 * to the {@link IVMInstall} for the backing {@link IJavaProject} as specified by the project
+	 * attribute in the configuration. If there is no project attribute the workspace default
+	 * {@link IVMInstall} is returned.
+	 * 
+	 * @param config
+	 * @return the default {@link IVMInstall} for the given {@link ILaunchConfiguration}
+	 */
 	private IVMInstall getDefaultVMInstall(ILaunchConfiguration config) {
-		IVMInstall defaultVMInstall;
 		try {
-			defaultVMInstall = JavaRuntime.computeVMInstall(config);
+			IJavaProject project = JavaRuntime.getJavaProject(config);
+			if(project != null) {
+				return JavaRuntime.getVMInstall(project);
+			}
+			return JavaRuntime.getDefaultVMInstall();
 		} catch (CoreException e) {
 			//core exception thrown for non-Java project
-			defaultVMInstall= JavaRuntime.getDefaultVMInstall();
+			return JavaRuntime.getDefaultVMInstall();
 		}
-		return defaultVMInstall;
 	}
 
 	private void setDefaultVMInstallAttributes(IVMInstall defaultVMInstall, ILaunchConfigurationWorkingCopy config) {
@@ -303,6 +257,5 @@ public class AntJRETab extends JavaJRETab {
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
 	 */
-	public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
-	}
+	public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {}
 }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.java
index 65a405e..5546837 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -20,14 +20,6 @@ public class AntLaunchConfigurationMessages extends NLS {
 	public static String AddVariableStringAction_3;
 	public static String AddVariableStringAction_4;
 
-	public static String AntLaunchDelegate_Launching__0__1;
-	public static String AntLaunchDelegate_Running__0__2;
-	public static String AntLaunchDelegate_Build_In_Progress;
-	public static String AntLaunchDelegate_Failure;
-	public static String AntLaunchDelegate_22;
-	public static String AntLaunchDelegate_23;
-	public static String AntLaunchDelegate_28;
-
 	public static String AntLaunchShortcut_Unable;
 	public static String AntLaunchShortcut_2;
 	public static String AntLaunchShortcut_3;
@@ -45,9 +37,7 @@ public class AntLaunchConfigurationMessages extends NLS {
 
 	public static String AntJRETab_2;
 	public static String AntJRETab_3;
-
-	public static String AntHomeClasspathEntry_8;
-	public static String AntHomeClasspathEntry_9;
+	
 	public static String AntBuilderTargetsTab_0;
 	public static String AntBuilderTargetsTab_1;
 	public static String AntBuilderTargetsTab_2;
@@ -58,8 +48,6 @@ public class AntLaunchConfigurationMessages extends NLS {
 	public static String AntBuilderTargetsTab_7;
 	public static String AntBuilderTargetsTab_8;
 	public static String AntBuilderTargetsTab_10;
-	public static String AntHomeClasspathEntry_10;
-	public static String AntHomeClasspathEntry_11;
 
 	public static String AntMainTab__Select_a_build_file__1;
 	public static String AntMainTab_3;
@@ -86,8 +74,6 @@ public class AntLaunchConfigurationMessages extends NLS {
 	public static String AntTargetsTab_1;
 	public static String AntClasspathTab_0;
 
-	public static String ContributedClasspathEntriesEntry_1;
-
 	public static String EditAntHomeEntryAction_1;
 
 	public static String TargetOrderDialog_Order_Targets_1;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties
index a8b93a3..5a62681 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchConfigurationMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,14 +15,6 @@ AddVariableStringAction_2=&Classpath Entry Value:
 AddVariableStringAction_3=&Variables...
 AddVariableStringAction_4=Add Variable Classpath Entry
 
-AntLaunchDelegate_Launching__0__1=Launching {0}
-AntLaunchDelegate_Running__0__2=Running {0}
-AntLaunchDelegate_Build_In_Progress=Ant build {0} already in progress. Concurrent Ant builds are possible if you specify to build in a separate JRE.
-AntLaunchDelegate_Failure=Failure of Background Ant Build
-AntLaunchDelegate_22=&Do not show error dialog when Ant build fails
-AntLaunchDelegate_23=Ant Build Failed
-AntLaunchDelegate_28=Waiting for virtual machine to exit...
-
 AntLaunchShortcut_Unable=Unable to find an Ant file to run.
 AntLaunchShortcut_2=An exception occurred while creating a default Ant launch configuration for {0}
 AntLaunchShortcut_3=An exception occurred while retrieving Ant launch configurations.
@@ -41,8 +33,6 @@ AntPropertiesTab_6=Use &global properties as specified in the Ant runtime prefer
 AntJRETab_2=Run in the same &JRE as the workspace
 AntJRETab_3=Se&parate JRE:
 
-AntHomeClasspathEntry_8=Ant Home (Default)
-AntHomeClasspathEntry_9=Ant Home ({0})
 AntBuilderTargetsTab_0=<Builder is not set to run for this build kind>
 AntBuilderTargetsTab_1=After a "Clean":
 AntBuilderTargetsTab_2=&Set Targets...
@@ -53,8 +43,6 @@ AntBuilderTargetsTab_6=Set T&argets...
 AntBuilderTargetsTab_7=During a "Clean":
 AntBuilderTargetsTab_8=Set Tar&gets...
 AntBuilderTargetsTab_10=<default target selected>
-AntHomeClasspathEntry_10=Ant Home {0} does not exist
-AntHomeClasspathEntry_11=Ant Home {0} does not contain a "lib" directory
 
 AntMainTab__Select_a_build_file__1=&Select a buildfile:
 AntMainTab_3=Base Direct&ory:
@@ -81,8 +69,6 @@ AntTargetsTab_0=Buildfile contains errors/problems. Check syntax and classpath
 AntTargetsTab_1=No targets could be determined for the buildfile
 AntClasspathTab_0=Add F&olders...
 
-ContributedClasspathEntriesEntry_1=Additional Tasks & Support
-
 EditAntHomeEntryAction_1=Ant &Home...
 
 TargetOrderDialog_Order_Targets_1=Order Targets
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java
index b7e35e9..3995213 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchDelegate.java	
@@ -12,766 +12,15 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.ProjectHelper;
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.AntRunner;
-import org.eclipse.ant.core.Property;
-import org.eclipse.ant.core.Task;
-import org.eclipse.ant.core.Type;
-import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
-import org.eclipse.ant.internal.ui.debug.IAntDebugConstants;
-import org.eclipse.ant.internal.ui.debug.model.RemoteAntDebugBuildListener;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.SocketUtil;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsBuildTab;
-import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.ui.externaltools.internal.program.launchConfigurations.BackgroundResourceRefresher;
-import org.osgi.framework.Bundle;
-
-import com.ibm.icu.text.MessageFormat;
 
 /**
- * Launch delegate for Ant builds
+ * <b>This class should no longer be used.</b>
+ * <p>
+ * Old launch delegate for Ant builds
+ * </p>
+ * @deprecated this class has been replaced with {@link org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate}
+ *  and is only present for backwards compatibility
  */
-public class AntLaunchDelegate extends LaunchConfigurationDelegate  {
-	
-	private static final String ANT_LOGGER_CLASS = "org.eclipse.ant.internal.ui.antsupport.logger.AntProcessBuildLogger"; //$NON-NLS-1$
-	private static final String ANT_DEBUG_LOGGER_CLASS = "org.eclipse.ant.internal.ui.antsupport.logger.AntProcessDebugBuildLogger"; //$NON-NLS-1$
-	private static final String NULL_LOGGER_CLASS = "org.eclipse.ant.internal.ui.antsupport.logger.NullBuildLogger"; //$NON-NLS-1$
-	private static final String REMOTE_ANT_LOGGER_CLASS = "org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger"; //$NON-NLS-1$
-	private static final String REMOTE_ANT_DEBUG_LOGGER_CLASS = "org.eclipse.ant.internal.ui.antsupport.logger.debug.RemoteAntDebugBuildLogger"; //$NON-NLS-1$
-	private static final String BASE_DIR_PREFIX = "-Dbasedir="; //$NON-NLS-1$
-	private static final String INPUT_HANDLER_CLASS = "org.eclipse.ant.internal.ui.antsupport.inputhandler.AntInputHandler"; //$NON-NLS-1$
-	private static final String REMOTE_INPUT_HANDLER_CLASS = "org.eclipse.ant.internal.ui.antsupport.inputhandler.ProxyInputHandler"; //$NON-NLS-1$
-    
-	/**
-	 * String attribute identifying the build scope for a launch configuration.
-	 * <code>null</code> indicates the default workspace build.
-	 * 
-	 * Note: this attribute was used with the old 'AntBuildTab' which has been replaced by
-	 *  the 'ExternalToolsBuildTab'. The 'ExternalToolsBuildTab' uses a different
-	 *  attribute key, so use the external tools attribute when present: 
-	 *  IExternalToolConstants.ATTR_BUILD_SCOPE
-	 */
-	private static final String ATTR_BUILD_SCOPE = AntUIPlugin.getUniqueIdentifier() + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
-
-	/**
-	 * Attribute identifier specifying whether referenced projects should be
-	 * considered when computing the projects to build. Default value is
-	 * <code>true</code>.
-	 * 
-	 * Note: this attribute was used with the old 'AntBuildTab' which has been replaced by
-	 *  the 'ExternalToolsBuildTab'. The 'ExternalToolsBuildTab' uses a different
-	 *  attribute key, so use the external tools attribute when present: 
-	 *  IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS
-	 */
-	private static final String ATTR_INCLUDE_REFERENCED_PROJECTS = AntUIPlugin.getUniqueIdentifier() + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
-
-	
-    private static String fgSWTLibraryLocation;
-	
-	private String fMode;
-    private boolean fUserSpecifiedLogger= false;
-    
-    private String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
-		String arguments = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, ""); //$NON-NLS-1$
-		return VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(arguments);
-	}
-	
-	/**
-	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
-	 *      java.lang.String, org.eclipse.debug.core.ILaunch,
-	 *      org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		if (monitor.isCanceled()) {
-			return;
-		}
-		fUserSpecifiedLogger= false;
-		fMode= mode;
-		
-		// migrate the config to the new classpath format if required
-		AntUtil.migrateToNewClasspathFormat(configuration);
-		
-		boolean isSeparateJRE= AntUtil.isSeparateJREAntBuild(configuration);
-		
-		if (CommonTab.isLaunchInBackground(configuration)) {
-			monitor.beginTask(MessageFormat.format(AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__1, new String[] {configuration.getName()}), 10);
-		} else {
-			monitor.beginTask(MessageFormat.format(AntLaunchConfigurationMessages.AntLaunchDelegate_Running__0__2, new String[] {configuration.getName()}), 100);
-		}
-		
-		// resolve location
-		IPath location = ExternalToolsUtil.getLocation(configuration);
-		monitor.worked(1);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		if (!isSeparateJRE && AntRunner.isBuildRunning()) {
-			IStatus status= new Status(IStatus.ERROR, IAntUIConstants.PLUGIN_ID, 1, MessageFormat.format(AntLaunchConfigurationMessages.AntLaunchDelegate_Build_In_Progress, new String[]{location.toOSString()}), null);
-			throw new CoreException(status);
-		}		
-		
-		// resolve working directory
-		IPath workingDirectory = ExternalToolsUtil.getWorkingDirectory(configuration);
-		String basedir = null;
-		if (workingDirectory != null) {
-			basedir= workingDirectory.toOSString();
-		}
-		monitor.worked(1);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-
-		// link the process to its build logger via a timestamp
-		long timeStamp = System.currentTimeMillis();
-		String idStamp = Long.toString(timeStamp);
-		StringBuffer idProperty = new StringBuffer("-D"); //$NON-NLS-1$
-		idProperty.append(AbstractEclipseBuildLogger.ANT_PROCESS_ID);
-		idProperty.append('=');
-		idProperty.append(idStamp);
-		
-		// resolve arguments	
-		String[] arguments = null;
-		if (isSeparateJRE) {
-			arguments = new String[] {getProgramArguments(configuration)};
-        } else { 
-			arguments = ExternalToolsUtil.getArguments(configuration);
-        }
-		
-		Map userProperties= AntUtil.getProperties(configuration);
-		if (userProperties != null) {//create a copy so as to not affect the configuration with transient properties
-			userProperties= new HashMap(userProperties);
-		}
-		String[] propertyFiles= AntUtil.getPropertyFiles(configuration);
-		String[] targets = AntUtil.getTargetNames(configuration);
-		URL[] customClasspath= AntUtil.getCustomClasspath(configuration);
-		String antHome= AntUtil.getAntHome(configuration);
-		
-		boolean setInputHandler= true;
-		try {
-			//check if set specify inputhandler
-			setInputHandler = configuration.getAttribute(IAntUIConstants.SET_INPUTHANDLER, true);
-		} catch (CoreException ce) {
-			AntUIPlugin.log(ce);			
-		}
-		
-		AntRunner runner= null;
-		if (!isSeparateJRE) {
-			runner = configureAntRunner(configuration, location, basedir, idProperty, arguments, userProperties, propertyFiles, targets, customClasspath, antHome, setInputHandler);
-		}
-		 
-		monitor.worked(1);
-								
-		if (monitor.isCanceled()) {
-			return;
-		}
-		boolean captureOutput= ExternalToolsUtil.getCaptureOutput(configuration);
-		int port= -1;
-		int requestPort= -1;
-		if (isSeparateJRE && captureOutput) {
-			if (userProperties == null) {
-				userProperties= new HashMap();
-			}
-			port= SocketUtil.findFreePort();
-			userProperties.put(AbstractEclipseBuildLogger.ANT_PROCESS_ID, idStamp);
-			userProperties.put("eclipse.connect.port", Integer.toString(port)); //$NON-NLS-1$
-			if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
-				requestPort= SocketUtil.findFreePort();
-				userProperties.put("eclipse.connect.request_port", Integer.toString(requestPort)); //$NON-NLS-1$
-			}
-		}
-		
-		StringBuffer commandLine= generateCommandLine(location, arguments, userProperties, propertyFiles, targets, antHome, basedir, isSeparateJRE, captureOutput, setInputHandler);
-		
-		if (isSeparateJRE) {
-			monitor.beginTask(MessageFormat.format(AntLaunchConfigurationMessages.AntLaunchDelegate_Launching__0__1, new String[] {configuration.getName()}), 10);
-			runInSeparateVM(configuration, launch, monitor, idStamp, antHome, port, requestPort, commandLine, captureOutput, setInputHandler);
-		} else {
-			runInSameVM(configuration, launch, monitor, location, idStamp, runner, commandLine, captureOutput);
-		}
-		
-		monitor.done();	
-	}
-	
-	private void runInSameVM(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor, IPath location, String idStamp, AntRunner runner, StringBuffer commandLine, boolean captureOutput) throws CoreException {
-		Map attributes= new HashMap(2);
-		attributes.put(IProcess.ATTR_PROCESS_TYPE, IAntLaunchConfigurationConstants.ID_ANT_PROCESS_TYPE);
-		attributes.put(AbstractEclipseBuildLogger.ANT_PROCESS_ID, idStamp);
-				
-		final AntProcess process = new AntProcess(location.toOSString(), launch, attributes);
-		setProcessAttributes(process, idStamp, commandLine, captureOutput);
-		boolean debug= fMode.equals(ILaunchManager.DEBUG_MODE);
-		if (debug || CommonTab.isLaunchInBackground(configuration)) {
-			final AntRunner finalRunner= runner;
-			Runnable r = new Runnable() {
-				public void run() {
-					try {
-						finalRunner.run(process);
-					} catch (CoreException e) {
-						handleException(e, AntLaunchConfigurationMessages.AntLaunchDelegate_Failure);
-					}
-					process.terminated();
-				}
-			};
-			Thread background = new Thread(r);
-            background.setDaemon(true);
-			background.start();
-			monitor.worked(1);
-			//refresh resources after process finishes
-			if (RefreshTab.getRefreshScope(configuration) != null) {
-				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, process);
-				refresher.startBackgroundRefresh();
-			}	
-		} else {
-			// execute the build 
-			try {
-				runner.run(monitor);
-			} catch (CoreException e) {
-				process.terminated();
-				monitor.done();
-				handleException(e, AntLaunchConfigurationMessages.AntLaunchDelegate_23);
-				return;
-			}
-			process.terminated();
-			
-			// refresh resources
-			RefreshTab.refreshResources(configuration, monitor);
-		}
-	}
-
-	private AntRunner configureAntRunner(ILaunchConfiguration configuration, IPath location, String baseDir, StringBuffer idProperty, String[] arguments, Map userProperties, String[] propertyFiles, String[] targets, URL[] customClasspath, String antHome, boolean setInputHandler) throws CoreException {
-		int argLength = 1; // at least one user property - timestamp
-		if (arguments != null) {
-			argLength += arguments.length;
-		}		
-		if (baseDir != null && baseDir.length() > 0) {
-			argLength++;
-		}
-		String[] runnerArgs = new String[argLength];
-		if (arguments != null) {
-			System.arraycopy(arguments, 0, runnerArgs, 0, arguments.length);
-		}
-		if (baseDir != null && baseDir.length() > 0) {
-			runnerArgs[runnerArgs.length - 2] = BASE_DIR_PREFIX + baseDir;
-		}
-		runnerArgs[runnerArgs.length -1] = idProperty.toString();
-		
-		AntRunner runner= new AntRunner();
-		runner.setBuildFileLocation(location.toOSString());
-		boolean captureOutput= ExternalToolsUtil.getCaptureOutput(configuration);
-		if (captureOutput) {
-			if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
-				runner.addBuildLogger(ANT_DEBUG_LOGGER_CLASS);
-			} else {
-				runner.addBuildLogger(ANT_LOGGER_CLASS);
-			}
-		} else {
-			runner.addBuildLogger(NULL_LOGGER_CLASS);
-		}
-		if (setInputHandler) {
-			runner.setInputHandler(INPUT_HANDLER_CLASS);
-		} else {
-			runner.setInputHandler(""); //$NON-NLS-1$
-		}
-		runner.setArguments(runnerArgs);
-		if (userProperties != null) {
-			runner.addUserProperties(userProperties);
-		}
-
-		if (propertyFiles != null) {
-			runner.setPropertyFiles(propertyFiles);
-		}
-
-		if (targets != null) {
-			runner.setExecutionTargets(targets);
-		}
-
-		if (customClasspath != null) {
-			runner.setCustomClasspath(customClasspath);
-		}
-
-		if (antHome != null) {
-			runner.setAntHome(antHome);
-		}
-		return runner;
-	}
-
-	private void handleException(final CoreException e, final String title) {
-		IPreferenceStore store= AntUIPlugin.getDefault().getPreferenceStore();
-		if (store.getBoolean(IAntUIPreferenceConstants.ANT_ERROR_DIALOG)) {
-			AntUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
-				public void run() {
-					MessageDialogWithToggle.openError(null, title, e.getMessage(), AntLaunchConfigurationMessages.AntLaunchDelegate_22, false, AntUIPlugin.getDefault().getPreferenceStore(), IAntUIPreferenceConstants.ANT_ERROR_DIALOG);
-				}
-			});
-		}
-	}
-
-	private void setProcessAttributes(IProcess process, String idStamp, StringBuffer commandLine, boolean captureOutput) {
-		// link the process to the Eclipse build logger via a timestamp
-        if (!fUserSpecifiedLogger) {
-            process.setAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID, idStamp);
-        }
-		
-		// create "fake" command line for the process
-		if (commandLine != null) {
-			process.setAttribute(IProcess.ATTR_CMDLINE, commandLine.toString());
-		}
-		if (captureOutput && !fUserSpecifiedLogger) {
-			TaskLinkManager.registerAntBuild(process);
-		}
-	}
-
-	private StringBuffer generateCommandLine(IPath location, String[] arguments, Map userProperties, String[] propertyFiles, String[] targets, String antHome, String basedir, boolean separateVM, boolean captureOutput, boolean setInputHandler) {
-		StringBuffer commandLine= new StringBuffer();
-
-		if (!separateVM) {
-			commandLine.append("ant"); //$NON-NLS-1$
-		}
-		
-		if (arguments != null) {
-			for (int i = 0; i < arguments.length; i++) {
-				commandLine.append(' ');
-				commandLine.append(arguments[i]);
-			}
-		}
-		
-		AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
-		if (propertyFiles == null) { //global
-			String[] files= prefs.getCustomPropertyFiles();
-			for (int i = 0; i < files.length; i++) {
-				String path = files[i];
-				commandLine.append(" -propertyfile \""); //$NON-NLS-1$
-				commandLine.append(path);
-				commandLine.append('\"');
-			}
-		} else {//"local" configuration
-			for (int i = 0; i < propertyFiles.length; i++) {
-				String path = propertyFiles[i];
-				commandLine.append(" -propertyfile \""); //$NON-NLS-1$
-				commandLine.append(path);
-				commandLine.append('\"');
-			}
-		}
-		//"local" configuration
-		if (userProperties != null) {
-			Iterator keys = userProperties.keySet().iterator();
-			String key;
-			while (keys.hasNext()) {
-				key= (String)keys.next();
-				appendProperty(commandLine, key, (String)userProperties.get(key));
-			}
-		}
-		
-		//global
-		List properties= null;
-		if (!separateVM) {
-			properties= prefs.getProperties();
-		} else {
-			properties= prefs.getRemoteAntProperties();
-		}
-		
-		//if we have user properties this means that the user has chosen to override the global properties
-		//if in a separate VM and have only two (or three if debug) user properties these are really only Eclipse generated properties
-		//and the user is still using the global properties
-		int numberOfEclipseProperties= 2;
-		if (userProperties != null && userProperties.get("eclipse.connect.request_port") != null){ //$NON-NLS-1$
-			numberOfEclipseProperties= 3; //debug mode
-		}
-		boolean useGlobalProperties = userProperties == null || (separateVM && userProperties.size() == numberOfEclipseProperties);
-		if (useGlobalProperties) {
-			for (Iterator iter = properties.iterator(); iter.hasNext();) {
-				Property property = (Property) iter.next();
-				String key= property.getName();
-				String value= property.getValue(false);
-				if (value != null) {
-					appendProperty(commandLine, key, value);
-				}
-			}
-		}
-		
-		if (basedir != null && basedir.length() > 0) {
-			appendProperty(commandLine, "basedir", basedir); //$NON-NLS-1$
-		}
-		
-		if (antHome != null) {
-			commandLine.append(" \"-Dant.home="); //$NON-NLS-1$
-			commandLine.append(antHome);
-			commandLine.append('\"');
-		}
-		
-		if (separateVM) { 
-			if (commandLine.indexOf("-logger") == -1) { //$NON-NLS-1$
-				if (captureOutput) {
-				commandLine.append(" -logger "); //$NON-NLS-1$
-				if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
-					commandLine.append(REMOTE_ANT_DEBUG_LOGGER_CLASS);
-					} else {
-					commandLine.append(REMOTE_ANT_LOGGER_CLASS);
-				}
-				}
-			} else {
-			    fUserSpecifiedLogger= true;
-            }
-			if (commandLine.indexOf("-inputhandler") == -1 && setInputHandler) { //$NON-NLS-1$
-				commandLine.append(" -inputhandler "); //$NON-NLS-1$
-				commandLine.append(REMOTE_INPUT_HANDLER_CLASS);
-			}
-		} else {
-			if (commandLine.indexOf("-inputhandler") == -1 && setInputHandler) { //$NON-NLS-1$
-				commandLine.append(" -inputhandler "); //$NON-NLS-1$
-				commandLine.append(INPUT_HANDLER_CLASS);
-			}
-            if (commandLine.indexOf("-logger") == -1) { //$NON-NLS-1$
-    			commandLine.append(" -logger "); //$NON-NLS-1$
-    			if (fMode.equals(ILaunchManager.DEBUG_MODE)) {
-    				commandLine.append(ANT_DEBUG_LOGGER_CLASS);
-    			} else if (captureOutput) {
-    				commandLine.append(ANT_LOGGER_CLASS);
-    			} else {
-    				commandLine.append(NULL_LOGGER_CLASS);
-    			}
-            }
-		}
-		
-		if (separateVM) {
-			appendTaskAndTypes(prefs, commandLine);
-		}
-		commandLine.append(" -buildfile \""); //$NON-NLS-1$
-		commandLine.append(location.toOSString());
-		commandLine.append('\"');
-		
-		if (targets != null) {
-			for (int i = 0; i < targets.length; i++) {
-				commandLine.append(" \""); //$NON-NLS-1$
-				commandLine.append(targets[i]);
-				commandLine.append('\"');
-			}
-		}
-		return commandLine;
-	}
-	
-	private void appendTaskAndTypes(AntCorePreferences prefs, StringBuffer commandLine) {
-		List tasks= prefs.getRemoteTasks();
-		Iterator itr= tasks.iterator();
-		while (itr.hasNext()) {
-			Task task = (Task) itr.next();
-			commandLine.append(" -eclipseTask "); //$NON-NLS-1$
-			String name= ProjectHelper.genComponentName(task.getURI(), task.getTaskName());
-			commandLine.append(name);
-			commandLine.append(',');
-			commandLine.append(task.getClassName());
-		}
-		
-		List types= prefs.getRemoteTypes();
-		itr= types.iterator();
-		while (itr.hasNext()) {
-			Type type = (Type) itr.next();
-			commandLine.append(" -eclipseType "); //$NON-NLS-1$
-			String name= ProjectHelper.genComponentName(type.getURI(), type.getTypeName());
-			commandLine.append(name);
-			commandLine.append(',');
-			commandLine.append(type.getClassName());
-		}
-	}
-
-	private void appendProperty(StringBuffer commandLine, String name, String value) {
-		commandLine.append(" \"-D"); //$NON-NLS-1$
-		commandLine.append(name);
-		commandLine.append('=');
-		commandLine.append(value);
-        if (value.length() > 0 && value.charAt(value.length() - 1) == File.separatorChar) {
-            commandLine.append(File.separatorChar);
-        }
-		commandLine.append("\""); //$NON-NLS-1$
-	}
-	
-	private void runInSeparateVM(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor, String idStamp, String antHome, int port, int requestPort, StringBuffer commandLine, boolean captureOutput, boolean setInputHandler) throws CoreException {
-        boolean debug= fMode.equals(ILaunchManager.DEBUG_MODE);
-		if (captureOutput) {
-			if (debug) {
-				RemoteAntDebugBuildListener listener= new RemoteAntDebugBuildListener(launch);
-				if (requestPort != -1) {
-					listener.startListening(port, requestPort);
-				}
-			} else if (!fUserSpecifiedLogger) {
-				RemoteAntBuildListener client= new RemoteAntBuildListener(launch);
-				if (port != -1) {
-					client.startListening(port);
-				}
-			}
-		}
-		
-		ILaunchConfigurationWorkingCopy copy= configuration.getWorkingCopy();
-		setDefaultWorkingDirectory(copy);
-		copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, commandLine.toString());
-		StringBuffer vmArgs= generateVMArguments(copy, setInputHandler, antHome);
-		copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.toString());
-        copy.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
-        if (copy.getAttribute(IAntLaunchConfigurationConstants.ATTR_DEFAULT_VM_INSTALL, false)) {
-        	setDefaultVM(configuration, copy);
-        }
-        if (debug) { //do not allow launch in foreground bug 83254
-            copy.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, true);
-        }
-        
-        //set the ANT_HOME environment variable
-        if (antHome != null) {
-            Map vars = copy.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, new HashMap(1));
-            vars.put("ANT_HOME", antHome); //$NON-NLS-1$
-            copy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, vars);
-        }
-
-		//copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000");
-		IProgressMonitor subMonitor= new SubProgressMonitor(monitor, 10);
-		AntJavaLaunchDelegate delegate= new AntJavaLaunchDelegate();
-		delegate.preLaunchCheck(copy, ILaunchManager.RUN_MODE, subMonitor);
-		delegate.launch(copy, ILaunchManager.RUN_MODE, launch, subMonitor);
-		final IProcess[] processes= launch.getProcesses();
-		for (int i = 0; i < processes.length; i++) {
-			setProcessAttributes(processes[i], idStamp, null, captureOutput);
-		}
-
-		if (CommonTab.isLaunchInBackground(copy)) {
-			// refresh resources after process finishes
-			if (RefreshTab.getRefreshScope(configuration) != null) {
-				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, processes[0]);
-				refresher.startBackgroundRefresh();
-			}
-		} else {
-			final boolean[] terminated= new boolean[1];
-			terminated[0]= launch.isTerminated();
-			IDebugEventSetListener listener= new IDebugEventSetListener() {
-				public void handleDebugEvents(DebugEvent[] events) {
-					for (int i = 0; i < events.length; i++) {
-						DebugEvent event = events[i];
-						for (int j= 0, numProcesses= processes.length; j < numProcesses; j++) {
-							if (event.getSource() == processes[j] && event.getKind() == DebugEvent.TERMINATE) {
-								terminated[0]= true;
-								break;
-							}
-						}
-					}
-				}
-			};
-			DebugPlugin.getDefault().addDebugEventListener(listener);
-			monitor.subTask(AntLaunchConfigurationMessages.AntLaunchDelegate_28);
-			while (!monitor.isCanceled() && !terminated[0]) {
-				try {
-					Thread.sleep(50);
-				} catch (InterruptedException e) {
-				}
-			}
-			DebugPlugin.getDefault().removeDebugEventListener(listener);
-			if (!monitor.isCanceled()) {
-				// refresh resources
-				RefreshTab.refreshResources(configuration, monitor);
-			}
-		}
-	}
-
-	private void setDefaultVM(ILaunchConfiguration configuration, ILaunchConfigurationWorkingCopy copy) {
-		try {
-			JavaRuntime.getJavaProject(configuration);
-			//remove the vm name, install type and jre container path for the Java launching concept of default VM
-			copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, (String)null);
-			copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
-			copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String)null);
-		} catch (CoreException ce) {
-			//not in a Java project
-			IVMInstall defaultVMInstall= JavaRuntime.getDefaultVMInstall();
-			copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, defaultVMInstall.getName());
-			copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, defaultVMInstall.getVMInstallType().getId());
-		}
-	}
-	
-	private StringBuffer generateVMArguments(ILaunchConfiguration config, boolean setInputHandler, String antHome) {
-		StringBuffer vmArgs= new StringBuffer();
-		try {
-			String configArgs= config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, (String)null);
-			if (configArgs != null) {
-				vmArgs.append(configArgs);
-				vmArgs.append(' ');
-			}
-		} catch (CoreException e) {
-		}
-	
-        if (antHome != null) {
-            vmArgs.append("-Dant.home=\""); //$NON-NLS-1$
-            vmArgs.append(antHome);
-            vmArgs.append("\" "); //$NON-NLS-1$
-        
-            File antLibDir= new File(antHome, "lib"); //$NON-NLS-1$
-            vmArgs.append("-Dant.library.dir=\""); //$NON-NLS-1$
-            vmArgs.append(antLibDir.getAbsolutePath());
-            vmArgs.append('\"');
-        }
-		if (setInputHandler) {
-			String swtLocation= getSWTLibraryLocation();
-			if (swtLocation != null) {
-				vmArgs.append(" -Djava.library.path=\""); //$NON-NLS-1$
-				String javaLibPath= System.getProperty("java.library.path"); //$NON-NLS-1$
-                javaLibPath= stripUnescapedQuotes(javaLibPath);
-				if (javaLibPath != null) {
-					vmArgs.append(javaLibPath);
-					if (vmArgs.charAt(vmArgs.length() - 1) != File.pathSeparatorChar) {
-						vmArgs.append(File.pathSeparatorChar);
-					}
-				}
-				vmArgs.append(swtLocation);
-				vmArgs.append('"');
-			}
-		}
-		return vmArgs;
-    }
-
-    private String stripUnescapedQuotes(String javaLibPath) {
-        StringBuffer buf = new StringBuffer(javaLibPath.length());
-        for (int i = 0; i < javaLibPath.length(); i++) {
-            char c = javaLibPath.charAt(i);
-            switch (c) {
-                case '"':
-                    if (i != 0 && javaLibPath.charAt(i-1) == '\\') {
-                        buf.append(c);
-                    }
-                    break;
-                default:
-                    buf.append(c);
-                    break;
-            }
-        }
-        return buf.toString();
-    }
-
-    /* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
-		String scopeKey = ATTR_BUILD_SCOPE;
-		String refKey = ATTR_INCLUDE_REFERENCED_PROJECTS;
-		if (configuration.hasAttribute(IExternalToolConstants.ATTR_BUILD_SCOPE) ||
-			configuration.hasAttribute(IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS)) {
-				// use new attributes when present - see bug 282581
-				scopeKey = IExternalToolConstants.ATTR_BUILD_SCOPE;
-				refKey = IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS;
-		}
-		IProject[] projects = ExternalToolsBuildTab.getBuildProjects(configuration, scopeKey);
-		if (projects == null) {
-			return null; // null scope indicates workspace build, vs. empty projects == empty scope
-		}
-		boolean isRef = ExternalToolsBuildTab.isIncludeReferencedProjects(configuration, refKey);
-		if (isRef) {
-			return computeReferencedBuildOrder(projects);
-		}
-		return computeBuildOrder(projects);
-	}
-
-	private String getSWTLibraryLocation() {
-       if (fgSWTLibraryLocation == null) {
-            Bundle bundle= Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
-            BundleDescription description= Platform.getPlatformAdmin().getState(false).getBundle(bundle.getBundleId());
-            BundleDescription[] fragments= description.getFragments();
-            if (fragments == null || fragments.length == 0) {
-                return null;
-            }
-            Bundle fragBundle= Platform.getBundle(fragments[0].getSymbolicName());
-            try {
-                URL url= FileLocator.toFileURL(fragBundle.getEntry("/")); //$NON-NLS-1$
-                IPath path= new Path(url.getPath());
-                path= path.removeTrailingSeparator();
-                fgSWTLibraryLocation= path.toOSString();
-            } catch (IOException e) {
-            }
-		}
-        return fgSWTLibraryLocation;
-	}
-    
-     /* (non-Javadoc)
-     * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBreakpoints(org.eclipse.debug.core.ILaunchConfiguration)
-     */
-    protected IBreakpoint[] getBreakpoints(ILaunchConfiguration configuration) {
-         IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
-         if (!breakpointManager.isEnabled()) {
-             // no need to check breakpoints individually.
-             return null;
-         }
-         return breakpointManager.getBreakpoints(IAntDebugConstants.ID_ANT_DEBUG_MODEL);
-     }
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#saveBeforeLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected boolean saveBeforeLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
-		if (IExternalToolConstants.ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY.equals(
-				configuration.getType().getCategory())) {
-					// don't prompt for builders
-					return true;
-		}
-		return super.saveBeforeLaunch(configuration, mode, monitor);
-	}
+public class AntLaunchDelegate extends org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate  {
 	
-	/**
-	 * Sets the default working directory to be the parent folder of the buildfile if
-	 * the user has not explicitly set the working directory.
-	 */
-	private void setDefaultWorkingDirectory(ILaunchConfigurationWorkingCopy copy) {
-		try {
-			String wd = copy.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null);
-			if (wd == null) {
-				wd= ExternalToolsUtil.getLocation(copy).removeLastSegments(1).toOSString();
-				copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, wd);
-			}
-		} catch (CoreException e) {
-			AntUIPlugin.log(e.getStatus());
-		}
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java
index 61b60f2..ef417b9 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntLaunchShortcut.java	
@@ -17,11 +17,12 @@ import java.util.List;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.AntUtil;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
 import org.eclipse.ant.internal.ui.model.AntElementNode;
 import org.eclipse.ant.internal.ui.model.AntProjectNode;
 import org.eclipse.ant.internal.ui.model.AntTargetNode;
 import org.eclipse.ant.internal.ui.model.AntTaskNode;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -43,7 +44,6 @@ import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.debug.ui.ILaunchShortcut2;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -55,7 +55,6 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 import org.eclipse.ui.editors.text.ILocationProvider;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -83,11 +82,13 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 				}
 				IResource resource = (IResource)((IAdaptable)object).getAdapter(IResource.class);
 				if (resource != null) {
-					if (!("xml".equalsIgnoreCase(resource.getFileExtension()))) { //$NON-NLS-1$
-						if (resource.getType() == IResource.FILE) {
-							resource = resource.getParent();
+					if (!(AntUtil.isKnownAntFile(resource))) {
+						if (!AntUtil.isKnownBuildfileName(resource.getName())) {
+							if (resource.getType() == IResource.FILE) {
+								resource = resource.getParent();
+							}
+							resource = findBuildFile((IContainer)resource);
 						}
-						resource = findBuildFile((IContainer)resource);
 					} 
 					if (resource != null) {
 						IFile file = (IFile) resource;
@@ -157,6 +158,34 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 	}
 
 	/**
+	 * Walks the file hierarchy looking for a build file.
+	 * Returns the first build file found that matches the 
+	 * search criteria.
+	 */
+	private IFile findBuildFile(IContainer parent) {
+		String[] names= AntUtil.getKnownBuildfileNames();
+		if (names == null) {
+			return null;
+		}
+		IContainer lparent = parent;
+		IResource file= null;
+		while (file == null || file.getType() != IResource.FILE) {		
+			for (int i = 0; i < names.length; i++) {
+				String string = names[i];
+				file= lparent.findMember(string);
+				if (file != null && file.getType() == IResource.FILE) {
+					break;
+				}
+			}
+			lparent = lparent.getParent();
+			if (lparent == null) {
+				return null;
+			}
+		}
+		return (IFile)file;
+	}
+	
+	/**
 	 * Returns a listing of <code>ILaunchConfiguration</code>s that correspond to the specified build file.
 	 * 
 	 * @param filepath the path to the buildfile to launch
@@ -166,7 +195,7 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 	 */
 	protected List collectConfigurations(IPath filepath) {
 		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
-		ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+		ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
 		if(type != null) {
 			try {
 				ILaunchConfiguration[] configs = manager.getLaunchConfigurations(type);
@@ -221,7 +250,7 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 			buffer.append(']');
 		}
 		
-		String name= DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(buffer.toString());
+		String name= DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(buffer.toString());
 		return name;
 	}
 	
@@ -260,13 +289,13 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 		// set the target to run, if applicable
 		if (configuration != null) {
 			try {
-				if (targetAttribute != null && !targetAttribute.equals(configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, DEFAULT_TARGET))) {
+				if (targetAttribute != null && !targetAttribute.equals(configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, DEFAULT_TARGET))) {
 					ILaunchConfigurationWorkingCopy copy = configuration.getWorkingCopy();
 					String attrValue = null;
 					if (!DEFAULT_TARGET.equals(targetAttribute)) {
 						attrValue = targetAttribute;
 					}
-					copy.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, attrValue);
+					copy.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, attrValue);
 					configuration = copy.doSave();
 				}
 			} catch (CoreException exception) {
@@ -296,55 +325,13 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 			if (mode.equals(ILaunchManager.DEBUG_MODE)) {
 			    groupId= IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
 			} else {
-			    groupId= IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP;
+			    groupId= org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_GROUP;
 			}
 			DebugUITools.openLaunchConfigurationDialog(AntUIPlugin.getActiveWorkbenchWindow().getShell(), configuration, groupId, status);
 		} else {
 			DebugUITools.launch(configuration, mode);
 		}
     }
-
-    /**
-	 * Walks the file hierarchy looking for a build file.
-	 * Returns the first build file found that matches the 
-	 * search criteria.
-	 */
-	private IFile findBuildFile(IContainer parent) {
-		String[] names= getBuildFileNames();
-		if (names == null) {
-			return null;
-		}
-		IContainer lparent = parent;
-		IResource file= null;
-		while (file == null || file.getType() != IResource.FILE) {		
-			for (int i = 0; i < names.length; i++) {
-				String string = names[i];
-				file= lparent.findMember(string);
-				if (file != null && file.getType() == IResource.FILE) {
-					break;
-				}
-			}
-			lparent = lparent.getParent();
-			if (lparent == null) {
-				return null;
-			}
-		}
-		return (IFile)file;
-	}
-	
-	/**
-	 * Returns an array of build file names from the ant preference store
-	 * @return an array of build file names
-	 */
-	private String[] getBuildFileNames() {
-		IPreferenceStore prefs= AntUIPlugin.getDefault().getPreferenceStore();
-		String buildFileNames= prefs.getString(IAntUIPreferenceConstants.ANT_FIND_BUILD_FILE_NAMES);
-		if (buildFileNames.length() == 0) {
-			//the user has not specified any names to look for
-			return null;
-		}
-		return AntUtil.parseString(buildFileNames, ","); //$NON-NLS-1$
-	}
 	
 	/**
 	 * Creates and returns a default launch configuration for the given file.
@@ -367,7 +354,7 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 	 */
 	public static ILaunchConfiguration createDefaultLaunchConfiguration(IPath filePath, IProject project) {
 		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
-		ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+		ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
 				
 		String projectName= project != null ? project.getName() : null;
 		String name = getNewLaunchConfigurationName(filePath, projectName, null);
@@ -415,7 +402,7 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 			IPath filePath = file.getLocation();
 			if(filePath != null) {
 				ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
-				ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+				ILaunchConfigurationType type = manager.getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
 				if (type != null) {
 					try {
 						ILaunchConfiguration[] configs = manager.getLaunchConfigurations(type);
@@ -475,12 +462,14 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 				filepath = locationProvider.getPath(input);
 			}
 		}
-		if(filepath != null && "xml".equals(filepath.getFileExtension())) { //$NON-NLS-1$
+		if(filepath != null && AntUtil.isKnownAntFile(file)) {
 			launch(filepath, (file == null ? null : file.getProject()), mode, null);
 			return;
 		}
 		if (file != null) {
-			file = findBuildFile(file.getParent());
+			if(!AntUtil.isKnownBuildfileName(file.getName())) {
+				file = findBuildFile(file.getParent());
+			}
 			if (file != null) {
 				launch(file.getFullPath(), file.getProject(), mode, null);
 				return;
@@ -529,11 +518,13 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 				}
 				IResource resource = (IResource)((IAdaptable)object).getAdapter(IResource.class);
 				if (resource != null) {
-					if (!("xml".equalsIgnoreCase(resource.getFileExtension()))) { //$NON-NLS-1$
-						if (resource.getType() == IResource.FILE) {
-							resource = resource.getParent();
+					if (!(AntUtil.isKnownAntFile(resource))) {
+						if (!AntUtil.isKnownBuildfileName(resource.getName())) {
+							if (resource.getType() == IResource.FILE) {
+								resource = resource.getParent();
+							}
+							resource = findBuildFile((IContainer)resource);
 						}
-						resource = findBuildFile((IContainer)resource);
 					} 
 					if (resource != null) {
 						IPath location = ((IFile) resource).getLocation();
@@ -581,7 +572,10 @@ public class AntLaunchShortcut implements ILaunchShortcut2 {
 			if (object instanceof IAdaptable) {
 				IResource resource = (IResource)((IAdaptable)object).getAdapter(IResource.class);
 				if (resource != null) {
-					if (!("xml".equalsIgnoreCase(resource.getFileExtension()))) { //$NON-NLS-1$
+					if (!(AntUtil.isKnownAntFile(resource))) {
+						if(AntUtil.isKnownBuildfileName(resource.getName())) {
+							return resource;
+						}
 						if (resource.getType() == IResource.FILE) {
 							resource = resource.getParent();
 						}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java
index 0a67fed..209aa6c 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMainTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.AntUtil;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -35,7 +37,6 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsMainTab;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.externaltools.internal.ui.FileSelectionDialog;
 
 public class AntMainTab extends ExternalToolsMainTab {
@@ -83,8 +84,14 @@ public class AntMainTab extends ExternalToolsMainTab {
 	}
 
 	private void setMappedResources(ILaunchConfigurationWorkingCopy configuration) {
-		IFile file= getIFile(configuration);
-		configuration.setMappedResources(new IResource[] {file});
+		// Don't map resources for external tool builders - they don't show up in the launch history
+		try {
+			if (!IAntLaunchConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE.equals(configuration.getType().getIdentifier())) {
+				IFile file= getIFile(configuration);
+				configuration.setMappedResources(new IResource[] {file});
+			}
+		} catch (CoreException e) {
+		}
 	}
 
 	private void updateProjectName(ILaunchConfigurationWorkingCopy configuration) {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMigrationDelegate.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMigrationDelegate.java
deleted file mode 100644
index 40aaf6e..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntMigrationDelegate.java	
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-
-/**
- * Delegate for migrating Ant launch configurations.
- * The migration process involves a resource mapping being created such that launch configurations
- * can be filtered from the launch configuration dialog based on resource availability.
- * 
- * @since 3.2
- */
-public class AntMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
-	
-	/**
-	 * Method to get the file for the specified launch configuration that should be mapped to the launch configuration  
-	 * 
-	 * @param candidate the launch configuration that the file will be mapped to.
-	 * @return the buildfile or <code>null</code> if not in the workspace
-	 */
-	protected IFile getFileForCandidate(ILaunchConfiguration candidate) {
-		IFile file= null;
-		String expandedLocation= null;
-		String location= null;
-		IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
-		try {
-			location= candidate.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String)null);
-			if (location != null) {
-				expandedLocation= manager.performStringSubstitution(location);
-				if (expandedLocation != null) {
-					file= AntUtil.getFileForLocation(expandedLocation, null);
-				}
-			}
-		} catch (CoreException e) {
-		}
-		return file;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#isCandidate()
-	 */
-	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
-		IResource[] mappedResources = candidate.getMappedResources();
-		if (mappedResources != null && mappedResources.length > 0) {
-			return false;
-		}
-		return getFileForCandidate(candidate) != null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.ILaunchConfigurationMigrationDelegate#migrate(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public void migrate(ILaunchConfiguration candidate) throws CoreException {
-		IFile file = getFileForCandidate(candidate);
-		ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
-		wc.setMappedResources(new IResource[] {file});
-		wc.doSave();
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntProcess.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntProcess.java
deleted file mode 100644
index 898f714..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntProcess.java	
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.IStreamsProxy;
-import org.eclipse.debug.ui.console.IConsole;
-
-public class AntProcess extends PlatformObject implements IProcess, IProgressMonitor {
-	
-	private AntStreamsProxy fProxy;
-	private String fLabel = null;
-	private ILaunch fLaunch = null;
-	private Map fAttributes = null;
-	private boolean fTerminated = false;
-	private boolean fCancelled = false;
-	private IConsole fConsole = null;
-	
-	public AntProcess(String label, ILaunch launch, Map attributes) {
-		fLabel = label;
-		fLaunch = launch;
-		if (attributes == null) {
-			fAttributes = new HashMap();
-		} else {
-			fAttributes = attributes;
-		}
-		String captureOutput= launch.getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT);
-		if(!("false".equals(captureOutput))) { //$NON-NLS-1$
-			fProxy= new AntStreamsProxy();
-		}
-		launch.addProcess(this);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#getLabel()
-	 */
-	public String getLabel() {
-		return fLabel;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#getLaunch()
-	 */
-	public ILaunch getLaunch() {
-		return fLaunch;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#getStreamsProxy()
-	 */
-	public IStreamsProxy getStreamsProxy() {
-		return fProxy;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#setAttribute(java.lang.String, java.lang.String)
-	 */
-	public void setAttribute(String key, String value) {
-		fAttributes.put(key, value);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#getAttribute(java.lang.String)
-	 */
-	public String getAttribute(String key) {
-		return (String)fAttributes.get(key);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IProcess#getExitValue()
-	 */
-	public int getExitValue() {
-		return 0;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.ITerminate#canTerminate()
-	 */
-	public boolean canTerminate() {
-		return !isCanceled() && !isTerminated();
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.ITerminate#isTerminated()
-	 */
-	public boolean isTerminated() {
-		return fTerminated;
-	}
-	
-	protected void terminated() {
-		if (!fTerminated) {
-			fTerminated = true;
-			if (DebugPlugin.getDefault() != null) {
-				DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[] {new DebugEvent(this, DebugEvent.TERMINATE)});
-			}
-		}
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.ITerminate#terminate()
-	 */
-	public void terminate() {
-		setCanceled(true);
-	}
-
-	/**
-	 * Returns the console associated with this process, or <code>null</code> if
-	 * none.
-	 * 
-	 * @return console, or <code>null</code>
-	 */
-	public IConsole getConsole() {
-		return fConsole;
-	}
-	
-	/**
-	 * Sets the console associated with this process.
-	 * 
-	 * @param console
-	 */
-	public void setConsole(IConsole console) {
-		fConsole = console;
-	}
-	
-	// IProgressMonitor implemented to support termination.
-	
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int)
-	 */
-	public void beginTask(String name, int totalWork) {
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#done()
-	 */
-	public void done() {
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
-	 */
-	public void internalWorked(double work) {
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
-	 */
-	public boolean isCanceled() {
-		return fCancelled;
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
-	 */
-	public void setCanceled(boolean value) {
-		fCancelled = value;
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
-	 */
-	public void setTaskName(String name) {
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
-	 */
-	public void subTask(String name) {
-	}
-
-	/**
-	 * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
-	 */
-	public void worked(int work) {
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntPropertiesTab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntPropertiesTab.java
index db54be4..5e50fbe 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntPropertiesTab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntPropertiesTab.java	
@@ -24,7 +24,7 @@ import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
 import org.eclipse.ant.internal.ui.preferences.AntPropertiesBlock;
 import org.eclipse.ant.internal.ui.preferences.IAntBlockContainer;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -116,14 +116,14 @@ public class AntPropertiesTab extends AbstractLaunchConfigurationTab implements
 		setMessage(null);
 		Map properties= null;
 		try {
-			properties= configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES, (Map)null);
+			properties= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTIES, (Map)null);
 		} catch (CoreException ce) {
 			AntUIPlugin.log(AntLaunchConfigurationMessages.AntPropertiesTab_Error_reading_configuration_9, ce);
 		}
 		
 		String propertyFiles= null;
 		try {
-			propertyFiles= configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES, (String)null);
+			propertyFiles= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES, (String)null);
 		} catch (CoreException ce) {
 			AntUIPlugin.log(AntLaunchConfigurationMessages.AntPropertiesTab_Error_reading_configuration_9, ce);
 		}
@@ -160,8 +160,8 @@ public class AntPropertiesTab extends AbstractLaunchConfigurationTab implements
 	 */
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		if (fUseDefaultButton.getSelection()) {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES, (Map)null);
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES, (String)null);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTIES, (Map)null);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES, (String)null);
 			return;
 		}
 				
@@ -175,7 +175,7 @@ public class AntPropertiesTab extends AbstractLaunchConfigurationTab implements
 			}
 		}
 		
-		configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTIES, properties);
+		configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTIES, properties);
 		
 		items= fAntPropertiesBlock.getPropertyFiles();
 		String files= null;
@@ -189,7 +189,7 @@ public class AntPropertiesTab extends AbstractLaunchConfigurationTab implements
 			files= buff.toString();
 		}
 		
-		configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_PROPERTY_FILES, files);
+		configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES, files);
 		
 		fAntPropertiesBlock.saveSettings();
 	}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamMonitor.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamMonitor.java
deleted file mode 100644
index 9fa1e00..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamMonitor.java	
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.debug.core.IStreamListener;
-import org.eclipse.debug.core.model.IFlushableStreamMonitor;
-
-/**
- * Stream monitor implementation for an Ant build process.
- */
-public class AntStreamMonitor implements IFlushableStreamMonitor {
-
-	private StringBuffer fContents = new StringBuffer();
-	private ListenerList fListeners = new ListenerList(1);
-	private boolean fBuffered = true;
-	
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamMonitor#addListener(org.eclipse.debug.core.IStreamListener)
-	 */
-	public void addListener(IStreamListener listener) {
-		fListeners.add(listener);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamMonitor#getContents()
-	 */
-	public String getContents() {
-		return fContents.toString();
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamMonitor#removeListener(org.eclipse.debug.core.IStreamListener)
-	 */
-	public void removeListener(IStreamListener listener) {
-		fListeners.remove(listener);
-	}
-
-	/**
-	 * Appends the given message to this stream, and notifies listeners.
-	 * 
-	 * @param message
-	 */
-	public void append(String message) {
-		if (isBuffered()) {
-			fContents.append(message);
-		}
-		Object[] listeners = fListeners.getListeners();
-		for (int i = 0; i < listeners.length; i++) {
-			IStreamListener listener = (IStreamListener)listeners[i];
-			listener.streamAppended(message, this);
-		}
-	}
-	/**
-	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#flushContents()
-	 */
-	public void flushContents() {
-		fContents.setLength(0);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#isBuffered()
-	 */
-	public boolean isBuffered() {
-		return fBuffered;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#setBuffered(boolean)
-	 */
-	public void setBuffered(boolean buffer) {
-		fBuffered = buffer;
-	}
-}
-
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamsProxy.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamsProxy.java
deleted file mode 100644
index 90d017b..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntStreamsProxy.java	
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.debug.core.model.IStreamMonitor;
-import org.eclipse.debug.core.model.IStreamsProxy;
-
-/**
- * 
- */
-public class AntStreamsProxy implements IStreamsProxy {
-	
-	private AntStreamMonitor fErrorMonitor = new AntStreamMonitor();
-	private AntStreamMonitor fOutputMonitor = new AntStreamMonitor();
-	
-	public static final String ANT_DEBUG_STREAM = IAntUIConstants.PLUGIN_ID + ".ANT_DEBUG_STREAM"; //$NON-NLS-1$
-	public static final String ANT_VERBOSE_STREAM = IAntUIConstants.PLUGIN_ID + ".ANT_VERBOSE_STREAM"; //$NON-NLS-1$
-	public static final String ANT_WARNING_STREAM = IAntUIConstants.PLUGIN_ID + ".ANT_WARNING_STREAM"; //$NON-NLS-1$
-	
-	private AntStreamMonitor fDebugMonitor = new AntStreamMonitor();
-	private AntStreamMonitor fVerboseMonitor = new AntStreamMonitor();
-	private AntStreamMonitor fWarningMonitor = new AntStreamMonitor();
-
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamsProxy#getErrorStreamMonitor()
-	 */
-	public IStreamMonitor getErrorStreamMonitor() {
-		return fErrorMonitor;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamsProxy#getOutputStreamMonitor()
-	 */
-	public IStreamMonitor getOutputStreamMonitor() {
-		return fOutputMonitor;
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.IStreamsProxy#write(java.lang.String)
-	 */
-	public void write(String input) {
-	}
-
-	public IStreamMonitor getWarningStreamMonitor() {
-		return fWarningMonitor;
-	}
-	
-	public IStreamMonitor getDebugStreamMonitor() {
-		return fDebugMonitor;
-	}	
-	
-	public IStreamMonitor getVerboseStreamMonitor() {
-		return fVerboseMonitor;
-	}	
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTabGroup.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTabGroup.java
index b7f5297..1d4c1e1 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTabGroup.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTabGroup.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -27,7 +28,6 @@ import org.eclipse.debug.ui.ILaunchConfigurationTab;
 import org.eclipse.debug.ui.RefreshTab;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsBuildTab;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 public class AntTabGroup extends AbstractLaunchConfigurationTabGroup {
 
@@ -81,7 +81,7 @@ public class AntTabGroup extends AbstractLaunchConfigurationTabGroup {
 				buffer.append(' ');
 				buffer.append(file.getName());
 				String name = buffer.toString().trim();
-				name= DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name);
+				name= DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
 				configuration.rename(name);
 				//set the project name so that the correct default VM install can be determined
 				configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java
index 7dcfba9..10d8ba5 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntTargetsTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,8 @@ import org.eclipse.ant.internal.ui.model.AntModelContentProvider;
 import org.eclipse.ant.internal.ui.model.AntProjectNode;
 import org.eclipse.ant.internal.ui.model.AntTargetNode;
 import org.eclipse.ant.internal.ui.model.InternalTargetFilter;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -72,7 +73,6 @@ import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -613,7 +613,7 @@ public class AntTargetsTab extends AbstractLaunchConfigurationTab {
 		setDirty(true);
 		boolean hideInternal= false;
 		try {
-			hideInternal = fLaunchConfiguration.getAttribute(IAntLaunchConfigurationConstants.ATTR_HIDE_INTERNAL_TARGETS, false);
+			hideInternal = fLaunchConfiguration.getAttribute(IAntLaunchConstants.ATTR_HIDE_INTERNAL_TARGETS, false);
 		} catch (CoreException e) {
 			AntUIPlugin.log(e);
 		}
@@ -621,7 +621,7 @@ public class AntTargetsTab extends AbstractLaunchConfigurationTab {
 		handleFilterTargetsSelected();
 		int sort= SORT_NONE;
 		try {
-			sort = fLaunchConfiguration.getAttribute(IAntLaunchConfigurationConstants.ATTR_SORT_TARGETS, sort);
+			sort = fLaunchConfiguration.getAttribute(IAntLaunchConstants.ATTR_SORT_TARGETS, sort);
 		} catch (CoreException e) {
 			AntUIPlugin.log(e);
 		}
@@ -631,7 +631,7 @@ public class AntTargetsTab extends AbstractLaunchConfigurationTab {
 		String newLocation= null;
 		
 		try {
-			configTargets= configuration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String)null);
+			configTargets= configuration.getAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, (String)null);
 			newLocation= configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String)null);
 		} catch (CoreException ce) {
 			AntUIPlugin.log(AntLaunchConfigurationMessages.AntTargetsTab_Error_reading_configuration_12, ce);
@@ -697,25 +697,25 @@ public class AntTargetsTab extends AbstractLaunchConfigurationTab {
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		//	attribute added in 3.0, so null must be used instead of false for backwards compatibility
 		if (fFilterInternalTargets.getSelection()) {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_HIDE_INTERNAL_TARGETS, true);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_HIDE_INTERNAL_TARGETS, true);
 		} else {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_HIDE_INTERNAL_TARGETS, (String)null);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_HIDE_INTERNAL_TARGETS, (String)null);
 		}
 		//attribute added in 3.0, so null must be used instead of 0 for backwards compatibility
 		if (fSortDirection != SORT_NONE) {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_SORT_TARGETS, fSortDirection);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_SORT_TARGETS, fSortDirection);
 		} else {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_SORT_TARGETS, (String)null);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_SORT_TARGETS, (String)null);
 		}
 		
 		if (fOrderedTargets.size() == 1) {
 			AntTargetNode item = (AntTargetNode)fOrderedTargets.get(0);
 			if (item.isDefaultTarget()) {
-				configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String)null);
+				configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, (String)null);
 				return;
 			}
 		} else if (fOrderedTargets.size() == 0) {
-			configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, (String)null);
+			configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, (String)null);
 			return;
 		}
 		
@@ -731,7 +731,7 @@ public class AntTargetsTab extends AbstractLaunchConfigurationTab {
 			targets= buff.toString();
 		}  
 
-		configuration.setAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, targets);
+		configuration.setAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, targets);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntWorkingDirectoryBlock.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntWorkingDirectoryBlock.java
index c0c9369..8473b91 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntWorkingDirectoryBlock.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/AntWorkingDirectoryBlock.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/ContributedClasspathEntriesEntry.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/ContributedClasspathEntriesEntry.java
deleted file mode 100644
index 9b8e69e..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/ContributedClasspathEntriesEntry.java	
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.core.AntCorePreferences;
-import org.eclipse.ant.core.IAntClasspathEntry;
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * A classpath entry that contains a contributed classpath entries
- * via the <code>extraClasspathEntries</code> extension point.
- * 
- * @since 3.0 
- */
-public class ContributedClasspathEntriesEntry extends AbstractRuntimeClasspathEntry {
-	
-	public static final String TYPE_ID = "org.eclipse.ant.ui.classpathentry.extraClasspathEntries"; //$NON-NLS-1$
-    
-    public static List fgSWTEntries= null;
-		
-	/**
-	 * Default contructor required to instantiate persisted extensions.
-	 */
-	public ContributedClasspathEntriesEntry() {
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.launching.AbstractRuntimeClasspathEntry#buildMemento(org.w3c.dom.Document, org.w3c.dom.Element)
-	 */
-	protected void buildMemento(Document document, Element memento) throws CoreException {
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.launching.IRuntimeClasspathEntry2#initializeFrom(org.w3c.dom.Element)
-	 */
-	public void initializeFrom(Element memento) throws CoreException {
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getTypeId()
-	 */
-	public String getTypeId() {
-		return TYPE_ID;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getRuntimeClasspathEntries(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public IRuntimeClasspathEntry[] getRuntimeClasspathEntries(ILaunchConfiguration configuration) throws CoreException {
-		boolean separateVM= AntUtil.isSeparateJREAntBuild(configuration);
-		boolean setInputHandler= configuration.getAttribute(IAntUIConstants.SET_INPUTHANDLER, true);
-		AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
-		IAntClasspathEntry[] antClasspathEntries = prefs.getContributedClasspathEntries();
-		IAntClasspathEntry[] userEntries = prefs.getAdditionalClasspathEntries();
-		List rtes = new ArrayList(antClasspathEntries.length + userEntries.length);
-		IAntClasspathEntry entry;
-		for (int i = 0; i < antClasspathEntries.length; i++) {
-			 entry= antClasspathEntries[i];
-			if (!separateVM || (separateVM && !entry.isEclipseRuntimeRequired())) {
-				rtes.add(JavaRuntime.newStringVariableClasspathEntry(entry.getLabel()));
-			}
-		}
-		boolean haveToolsEntry= false;
-		String path;
-		for (int i = 0; i < userEntries.length; i++) {
-			entry = userEntries[i];
-			path= entry.getLabel();
-            IPath toolsPath= new Path(path);
-			if (toolsPath.lastSegment().equals("tools.jar")) { //$NON-NLS-1$
-				haveToolsEntry= true;
-				// replace with dynamically resolved tools.jar based on
-				// the JRE being used
-				addToolsJar(configuration, rtes, path);
-			} else {
-				rtes.add(JavaRuntime.newStringVariableClasspathEntry(path));
-			}
-		}
-		if (!haveToolsEntry) {
-			addToolsJar(configuration, rtes, null);
-		}
-		
-		if (setInputHandler && separateVM) {
-			addSWTJars(rtes);
-		}
-		
-		return (IRuntimeClasspathEntry[]) rtes.toArray(new IRuntimeClasspathEntry[rtes.size()]);
-	}
-	
-	private void addToolsJar(ILaunchConfiguration configuration, List rtes, String path) {
-		IRuntimeClasspathEntry tools = getToolsJar(configuration);
-		if (tools == null) {
-			if (path != null) {
-				//use the global entry
-				rtes.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(path)));
-			} else {
-				//use the default vm install to try to find a tools.jar
-				IVMInstall install= JavaRuntime.getDefaultVMInstall();
-				if (install != null) {
-					IAntClasspathEntry entry = AntCorePlugin.getPlugin().getPreferences().getToolsJarEntry(new Path(install.getInstallLocation().getAbsolutePath()));
-					if (entry != null) {
-						rtes.add(JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(entry.getEntryURL().getPath())));
-					}
-				}
-			}
-		} else {
-			rtes.add(tools);
-		}
-	}
-	
-	private void addSWTJars(List rtes) {
-        if (fgSWTEntries == null) {
-            fgSWTEntries= new ArrayList();
-            Bundle bundle= Platform.getBundle("org.eclipse.swt"); //$NON-NLS-1$
-            BundleDescription description= Platform.getPlatformAdmin().getState(false).getBundle(bundle.getBundleId());
-            BundleDescription[] fragments= description.getFragments();
-            for (int i = 0; i < fragments.length; i++) {
-                Bundle fragmentBundle= Platform.getBundle(fragments[i].getName());
-                URL bundleURL;
-                try {
-                    bundleURL = FileLocator.resolve(fragmentBundle.getEntry("/")); //$NON-NLS-1$
-                } catch (IOException e) {
-                    AntUIPlugin.log(e);
-                   continue;
-                }
-                String urlFileName= bundleURL.getFile();
-                if (urlFileName.startsWith("file:")) { //$NON-NLS-1$
-                    try {
-                        urlFileName= new URL(urlFileName).getFile();
-                        if (urlFileName.endsWith("!/")) { //$NON-NLS-1$
-                            urlFileName= urlFileName.substring(0, urlFileName.length() - 2);
-                        }
-                    } catch (MalformedURLException e) {
-                        AntUIPlugin.log(e);
-                       continue;
-                    }
-                }
-                IPath fragmentPath= new Path(urlFileName);
-                if (fragmentPath.getFileExtension() != null) { //JAR file
-                    fgSWTEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(fragmentPath));
-                } else { // folder
-                    File bundleFolder= fragmentPath.toFile();
-                    if (!bundleFolder.isDirectory()) {
-                        continue;
-                    }
-                    String[] names= bundleFolder.list(new FilenameFilter() {
-                        public boolean accept(File dir, String name) {
-                            return name.endsWith(".jar"); //$NON-NLS-1$
-                        }
-                    });
-                    for (int j = 0; j < names.length; j++) {
-                        String jarName = names[j];
-                        fgSWTEntries.add(JavaRuntime.newArchiveRuntimeClasspathEntry(fragmentPath.append(jarName)));
-                    }
-                }
-            }
-        }
-        rtes.addAll(fgSWTEntries);
-	}
-    
-	/**
-	 * Returns the tools.jar to use for this launch configuration, or <code>null</code>
-	 * if none.
-	 * 
-	 * @param configuration configuration to resolve a tools.jar for
-	 * @return associated tools.jar archive, or <code>null</code>
-	 */
-	private IRuntimeClasspathEntry getToolsJar(ILaunchConfiguration configuration) {
-		try {
-			IVMInstall install = JavaRuntime.computeVMInstall(configuration);
-			if (install != null) {
-				IAntClasspathEntry entry = AntCorePlugin.getPlugin().getPreferences().getToolsJarEntry(new Path(install.getInstallLocation().getAbsolutePath()));
-				if (entry != null) {
-					return JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(entry.getEntryURL().getPath()));
-				}
-			}
-		} catch (CoreException ce) {
-			//likely dealing with a non-Java project
-		}
-			
-		return null;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#getName()
-	 */
-	public String getName() {
-		return AntLaunchConfigurationMessages.ContributedClasspathEntriesEntry_1;
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry#getType()
-	 */
-	public int getType() {
-		return IRuntimeClasspathEntry.OTHER;
-	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.IRuntimeClasspathEntry2#isComposite()
-	 */
-	public boolean isComposite() {
-		return true;
-	}
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		return obj instanceof ContributedClasspathEntriesEntry;
-	}
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return getClass().hashCode();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java
index d6aba52..9b8673d 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/EditAntHomeEntryAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.ant.internal.ui.launchConfigurations;
 
 import org.eclipse.ant.core.AntCorePlugin;
 import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.internal.launching.launchConfigurations.AntHomeClasspathEntry;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.preferences.AntPreferencesMessages;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java
index 1a2d055..869b9eb 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/IAntLaunchConfigurationConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
+import org.eclipse.ant.launching.IAntLaunchConstants;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
@@ -21,6 +22,7 @@ import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
  * </p>
  * @since 3.0
  * @noimplement This interface is not intended to be implemented by clients.
+ * @deprecated This interface has been replaced with {@link IAntLaunchConstants}
  */
 public interface IAntLaunchConfigurationConstants {
 
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/MessageIds.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/MessageIds.java
deleted file mode 100644
index bd5fb51..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/MessageIds.java	
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-public class MessageIds {
-
-	public final static String PROCESS_ID=   "processID"; //$NON-NLS-1$
-	public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
-	//constants need to start greater than the Project.MSG_* constants
-    public final static String TASK= "6"; //$NON-NLS-1$
-    public final static String TARGET= "7"; //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntBuildListener.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntBuildListener.java
deleted file mode 100644
index 61d8136..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntBuildListener.java	
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.FileUtils;
-import org.eclipse.ant.internal.core.AbstractEclipseBuildLogger;
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.ant.internal.ui.ExternalHyperlink;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchesListener;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.console.FileLink;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.Region;
-import org.eclipse.ui.console.IHyperlink;
-
-/**
- * Parts adapted from org.eclipse.jdt.internal.junit.ui.RemoteTestRunnerClient
- * The client side of the RemoteAntBuildLogger. Handles the
- * marshalling of the different messages.
- */
-public class RemoteAntBuildListener implements ILaunchesListener {
-    public abstract class ListenerSafeRunnable implements ISafeRunnable {
-        public void handleException(Throwable exception) {
-            AntUIPlugin.log(exception);
-        }
-    }
-
-    /**
-     * The server socket
-     */
-    private ServerSocket fServerSocket;
-    private Socket fSocket;
-    private BufferedReader fBufferedReader;
-    private IProcess fProcess;
-    private String fProcessId;
-    private File fBuildFileParent= null;
-    private List fMessageQueue;
-    protected ILaunch fLaunch;
-    private Map fFileNameToIFile= new HashMap();
-    private String fLastFileName= null;
-    private String fLastTaskName= null;
-    private boolean fBuildFailed= false;
-    
-    /**
-     * Reads the message stream from the RemoteAntBuildLogger
-     */
-    private class ServerConnection extends Thread {
-        private int fServerPort;
-        
-        public ServerConnection(int port) {
-            super("Ant Build Server Connection"); //$NON-NLS-1$
-            setDaemon(true);
-            fServerPort= port;
-        }
-        
-        public void run() {
-            Exception exception= null;
-            try {
-                fServerSocket= new ServerSocket(fServerPort);
-                IPreferenceStore prefs = AntUIPlugin.getDefault().getPreferenceStore();
-                int socketTimeout= prefs.getInt(IAntUIPreferenceConstants.ANT_COMMUNICATION_TIMEOUT);
-                fServerSocket.setSoTimeout(socketTimeout);
-                fSocket= fServerSocket.accept();
-                fBufferedReader= new BufferedReader(new InputStreamReader(fSocket.getInputStream(), "UTF-8")); //$NON-NLS-1$
-                String message;
-                while(fBufferedReader != null && (message= fBufferedReader.readLine()) != null) {
-                    receiveMessage(message);
-                }
-            } catch (SocketException e) {
-            } catch (SocketTimeoutException e) {
-                exception= e;
-            } catch (IOException e) {
-                // fall through
-                exception= e;
-            }
-            if (exception != null) {
-                AntUIPlugin.log(exception);
-            }
-            shutDown();
-        }
-    }
-    
-    public RemoteAntBuildListener(ILaunch launch) {
-        super();
-        fLaunch= launch;
-        DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
-    }
-
-    /**
-     * Start listening to an Ant build. Start a server connection that
-     * the RemoteAntBuildLogger can connect to.
-     * 
-     * @param eventPort The port number to create the server connection on
-     */
-    public synchronized void startListening(int eventPort){
-        ServerConnection connection = new ServerConnection(eventPort);
-        connection.start();
-    }
-
-    protected synchronized void shutDown() {
-        fLaunch= null;
-        fFileNameToIFile= null;
-        if (DebugPlugin.getDefault() != null) {
-        	DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
-        }
-        try {
-            if (fBufferedReader != null) {
-                fBufferedReader.close();
-                fBufferedReader= null;
-            }
-        } catch(IOException e) {
-        }   
-        try{
-            if(fSocket != null) {
-                fSocket.close();
-                fSocket= null;
-            }
-        } catch(IOException e) {
-        }
-        try{
-            if(fServerSocket != null) {
-                fServerSocket.close();
-                fServerSocket= null;
-            }
-        } catch(IOException e) {
-        }
-    }
-        
-    protected void receiveMessage(String message) {
-        if (message.startsWith(MessageIds.TASK)) {
-            receiveTaskMessage(message);
-        } else if (message.startsWith(MessageIds.TARGET)) {
-            receiveTargetMessage(message);
-        } else if (message.startsWith(MessageIds.PROCESS_ID)) {
-            message= message.substring(MessageIds.PROCESS_ID.length());
-            fProcessId= message;
-        } else {
-            int index= message.indexOf(',');
-            if (index > 0) {
-                int priority= Integer.parseInt(message.substring(0, index));
-                message= message.substring(index + 1);
-                
-                writeMessage(message + System.getProperty("line.separator"), priority); //$NON-NLS-1$
-                if (message.startsWith("BUILD FAILED")) { //$NON-NLS-1$
-                    fBuildFailed= true;
-                } else if (fBuildFailed) {
-                	if (message.startsWith("Total time:")) { //$NON-NLS-1$
-                		fBuildFailed= false;
-                	} else {
-                		AntUtil.linkBuildFailedMessage(message, getProcess());
-                	}
-				}
-            }
-        }
-    }
-
-    private void receiveTargetMessage(String message) {
-        message= message.substring(MessageIds.TARGET.length());
-        StringTokenizer tokenizer= new StringTokenizer(message, ","); //$NON-NLS-1$
-        message= tokenizer.nextToken();
-        if (tokenizer.hasMoreTokens()) {
-        	int locationLength= Integer.parseInt(tokenizer.nextToken());
-        	String location= tokenizer.nextToken(); 
-        	while (location.length() < locationLength) { //path with a comma in it
-        		location+=","; //$NON-NLS-1$
-        		location+= tokenizer.nextToken();
-        	}
-            int lineNumber= Integer.parseInt(tokenizer.nextToken());
-            generateLink(message, location, lineNumber, 0, message.length() - 1);
-        }
-        writeMessage(message + System.getProperty("line.separator"), Project.MSG_INFO); //$NON-NLS-1$
-    }
-
-    private void receiveTaskMessage(String message) {
-        message= message.substring(MessageIds.TASK.length());
-        
-        int index= message.indexOf(',');
-        int priority= Integer.parseInt(message.substring(0, index));
-        int index2= message.indexOf(',', index + 1);
-        String taskName= message.substring(index + 1, index2);
-        if (taskName.length() == 0) {
-            taskName= fLastTaskName;
-        }
-        int index3= message.indexOf(',', index2 + 1);
-        int lineLength= Integer.parseInt(message.substring(index2 + 1, index3));
-        int index4= index3 + 1 + lineLength;
-        
-        String line= message.substring(index3 + 1, index4);
-        StringBuffer labelBuff= new StringBuffer();
-        labelBuff.append('[');
-        labelBuff.append(taskName);
-        labelBuff.append("] "); //$NON-NLS-1$
-        labelBuff.append(line);
-        line= labelBuff.toString();
-        
-        fLastTaskName= taskName;
-        
-        int locationIndex= message.indexOf(',', index4 + 1);
-        int finalIndex= locationIndex + 1;
-        String fileName= message.substring(index4 + 1, locationIndex);
-        int locationLength= 0;
-        if (fileName.length() == 0) {
-            fileName= fLastFileName;
-        } else {
-        	finalIndex= message.indexOf(',', locationIndex) + 1;
-        	locationLength= Integer.parseInt(fileName);
-        	fileName= message.substring(finalIndex, finalIndex + locationLength);
-        	locationLength+=1; //set past delimiter
-        }
-        fLastFileName= fileName;
-        int lineNumber= Integer.parseInt(message.substring(finalIndex + locationLength));
-
-        int size = IAntUIConstants.LEFT_COLUMN_SIZE - (taskName.length() + 3);
-        int offset = Math.max(size - 2, 1);
-        int length = IAntUIConstants.LEFT_COLUMN_SIZE - size - 3;
-        if (fileName != null) {
-            generateLink(line, fileName, lineNumber, offset, length);
-        }
-        
-        StringBuffer fullMessage= new StringBuffer();
-        adornMessage(taskName, line, fullMessage);
-        writeMessage(fullMessage.append(System.getProperty("line.separator")).toString(), priority); //$NON-NLS-1$
-    }
-
-    private void generateLink(String line, String fileName, int lineNumber, int offset, int length) {
-        IHyperlink taskLink= null;
-        if (lineNumber == -1) {
-            //fileName will actually be the String representation of Location
-           taskLink = AntUtil.getLocationLink(fileName, fBuildFileParent);
-        } else {
-            IFile file= (IFile) fFileNameToIFile.get(fileName);
-            if (file == null) {
-                file= AntUtil.getFileForLocation(fileName, fBuildFileParent);
-                if (file != null) {
-                    fFileNameToIFile.put(fileName, file);
-                    taskLink= new FileLink(file, null, -1, -1, lineNumber);
-                } else {
-                    File javaIOFile= FileUtils.getFileUtils().resolveFile(fBuildFileParent, fileName);
-                    if (javaIOFile.exists()) {
-                        taskLink= new ExternalHyperlink(javaIOFile, lineNumber);
-                    }
-                }
-            } else {
-                taskLink= new FileLink(file, null, -1, -1, lineNumber);
-            }
-        }
-        if (taskLink != null) {
-            TaskLinkManager.addTaskHyperlink(getProcess(), taskLink, new Region(offset, length), line);
-        }
-    }
-    
-    /**
-     * Returns the associated process, finding it if necessary.
-     */
-    protected IProcess getProcess() {
-        if (fProcess == null) {
-            if (fProcessId != null) {
-                IProcess[] all = DebugPlugin.getDefault().getLaunchManager().getProcesses();
-                for (int i = 0; i < all.length; i++) {
-                    IProcess process = all[i];
-                    if (fProcessId.equals(process.getAttribute(AbstractEclipseBuildLogger.ANT_PROCESS_ID))) {
-                        fProcess = process;
-                        break;
-                    }
-                }
-            }
-        }
-        return fProcess;
-    }
-    
-    private AntStreamMonitor getMonitor(int priority) {
-        IProcess process= getProcess();
-        if (process == null) {
-            return null;
-        }
-        AntStreamsProxy proxy = (AntStreamsProxy)process.getStreamsProxy();
-        if (proxy == null) {
-            return null;
-        }
-        AntStreamMonitor monitor = null;
-        switch (priority) {
-            case Project.MSG_INFO:
-                monitor = (AntStreamMonitor)proxy.getOutputStreamMonitor();
-                break;
-            case Project.MSG_ERR:
-                monitor = (AntStreamMonitor)proxy.getErrorStreamMonitor();
-                break;
-            case Project.MSG_DEBUG:
-                monitor = (AntStreamMonitor)proxy.getDebugStreamMonitor();
-                break;
-            case Project.MSG_WARN:
-                monitor = (AntStreamMonitor)proxy.getWarningStreamMonitor();
-                break;
-            case Project.MSG_VERBOSE:
-                monitor = (AntStreamMonitor)proxy.getVerboseStreamMonitor();
-                break;
-        }
-        return monitor;
-    }
-    
-    /**
-     * Builds a right justified task prefix for the given build event, placing it
-     * in the given string buffer.
-     *  
-     * @param event build event
-     * @param fullMessage buffer to place task prefix in
-     */
-    private void adornMessage(String taskName, String line, StringBuffer fullMessage) {
-        if (taskName == null) {
-            taskName = "null"; //$NON-NLS-1$
-        }
-        
-        int size = IAntUIConstants.LEFT_COLUMN_SIZE - (taskName.length() + 6);
-        for (int i = 0; i < size; i++) {
-            fullMessage.append(' ');
-        }
-        
-        fullMessage.append(line);
-    }
-    
-    protected void writeMessage(String message, int priority) {
-        AntStreamMonitor monitor= getMonitor(priority);
-        if (monitor == null) {
-            if (fMessageQueue == null) {
-                fMessageQueue= new ArrayList();
-            }
-            fMessageQueue.add(message);
-            return;
-        }
-        if (fMessageQueue != null) {
-            for (Iterator iter = fMessageQueue.iterator(); iter.hasNext();) {
-                String oldMessage = (String) iter.next();
-                monitor.append(oldMessage);
-            }
-            fMessageQueue= null;
-        }
-        monitor.append(message);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
-     */
-    public void launchesAdded(ILaunch[] launches) {
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch[])
-     */
-    public void launchesChanged(ILaunch[] launches) {
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
-     */
-    public void launchesRemoved(ILaunch[] launches) {
-        for (int i = 0; i < launches.length; i++) {
-            ILaunch launch = launches[i];
-            if (launch.equals(fLaunch)) {
-                shutDown();
-                return;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntProcessFactory.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntProcessFactory.java
deleted file mode 100644
index e81a1e5..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntProcessFactory.java	
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.IProcessFactory;
-import org.eclipse.debug.core.model.IProcess;
-
-public class RemoteAntProcessFactory implements IProcessFactory {
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IProcessFactory#newProcess(org.eclipse.debug.core.ILaunch, java.lang.Process, java.lang.String, java.util.Map)
-	 */
-	public IProcess newProcess(ILaunch launch, Process process, String label, Map attributes) {
-		if (attributes == null) {
-			attributes= new HashMap(1);
-		}
-		attributes.put(IProcess.ATTR_PROCESS_TYPE, IAntLaunchConfigurationConstants.ID_ANT_PROCESS_TYPE);
-		return new RemoteAntRuntimeProcess(launch, process, label, attributes);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntRuntimeProcess.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntRuntimeProcess.java
deleted file mode 100644
index f021baa..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/RemoteAntRuntimeProcess.java	
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.launchConfigurations;
-
-import java.util.Map;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.model.IStreamsProxy;
-import org.eclipse.debug.core.model.RuntimeProcess;
-
-public class RemoteAntRuntimeProcess extends RuntimeProcess {
-
-	/**
-	 * Constructs a RuntimeProcess on the given system process
-	 * with the given name, adding this process to the given
-	 * launch.
-	 * Sets the streams proxy to an AntStreamsProxy if output is captured.
-	 */
-	public RemoteAntRuntimeProcess(ILaunch launch, Process process, String name, Map attributes) {
-		super(launch, process, name, attributes);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.RuntimeProcess#createStreamsProxy()
-	 */
-	protected IStreamsProxy createStreamsProxy() {
-		return new AntStreamsProxy();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java
index b36b1c4..1b8065f 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/SetTargetsDialog.java	
@@ -1,17 +1,17 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
 import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.dialogs.Dialog;
@@ -64,7 +64,7 @@ public class SetTargetsDialog extends Dialog {
 			defaultValue= ""; //$NON-NLS-1$
 		}
         try {
-            return fConfiguration.getAttribute(IAntLaunchConfigurationConstants.ATTR_ANT_TARGETS, defaultValue);
+            return fConfiguration.getAttribute(IAntLaunchConstants.ATTR_ANT_TARGETS, defaultValue);
         } catch (CoreException e) {
             return defaultValue;
         }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java
index 2682431..c6d8515 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/launchConfigurations/TaskLinkManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,18 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.launchConfigurations;
 
-
-import java.util.ArrayList;
+import java.io.File;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.tools.ant.util.FileUtils;
+import org.eclipse.ant.internal.launching.AntLaunch;
+import org.eclipse.ant.internal.launching.AntLaunchingUtil;
+import org.eclipse.ant.internal.launching.LinkDescriptor;
 import org.eclipse.ant.internal.ui.AntUtil;
+import org.eclipse.ant.internal.ui.ExternalHyperlink;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.ui.console.FileLink;
@@ -38,121 +42,59 @@ import org.eclipse.ui.console.IHyperlink;
  * may be stored to process future incoming tasks hyperlinks.
  */
 public class TaskLinkManager {
-	
-	/**
-	 * A map of processes to lists of queued task hyperlink entries
-	 */
-	private static Map fgProcessToLinks;
-	
-	/**
-	 * A map of processes to lists of queued new line regions
-	 */
-	private static Map fgProcessToNewLines;
-	
-	private static List fgAntBuilds;
-	
-	private static class HyperlinkEntry {
-		private IHyperlink fLink;
-		private IRegion fRegion;
-		private String fMessage;
-		
-		public HyperlinkEntry(IHyperlink link, IRegion region, String message) {
-			fLink = link;
-			fRegion = region;	
-			fMessage = message;
-		}
-		
-		public IRegion getRegion() {
-			return fRegion;
-		}
-		
-		public IHyperlink getLink() {
-			return fLink;
-		}
-		
-		public String getMessage() {
-			return fMessage;
-		}
-	}
-	
-	private static class LineEntry {
-		private IConsole fConsole;
-		private IRegion fRegion;
-	
-		public LineEntry(IConsole console, IRegion region) {
-			fConsole = console;
-			fRegion = region;	
-		}
-	
-		public IRegion getRegion() {
-			return fRegion;
-		}
-	
-		public IConsole getConsole() {
-			return fConsole;
-		}
-	}
 
+	private static Map fFileNameToIFile = new HashMap();
+	
 	/**
 	 * Not to be called.
 	 */
 	private TaskLinkManager() {
 		super();
 	}
-	
-	/**
-	 * Registers a hyperlink for the given process and task name. The given
-	 * region is relative to the beginning of the line (not the document).
-	 * 
-	 * @param process the process associated with the link
-	 * @param link the link for the process
-	 * @param region The region within the line
-	 * @param message The message related to the link
-	 */
-	public static synchronized void addTaskHyperlink(IProcess process, IHyperlink link, IRegion region, String message) {
-		if (fgProcessToNewLines != null) {
-			List newLines = (List)fgProcessToNewLines.get(process);
-			if (newLines != null) {
-				for (int index= 0; index < newLines.size(); index++) {
-					LineEntry newLine = (LineEntry) newLines.get(index);
-					if (addLink(newLine.getConsole(), link, newLine.getRegion(), region, message)) {
-						newLines.subList(0, index + 1).clear();
-						return;
+
+	private static IHyperlink createHyperlink(LinkDescriptor linkDescriptor) {
+		String fileName = linkDescriptor.getFileName();
+		int lineNumber = linkDescriptor.getLineNumber();
+
+		IHyperlink taskLink = null;
+		if (lineNumber == -1) {
+			// fileName will actually be the String representation of Location
+			taskLink = AntUtil.getLocationLink(fileName, null);
+		} else {
+			IFile file = (IFile) fFileNameToIFile.get(fileName);
+			if (file == null) {
+				file = AntLaunchingUtil.getFileForLocation(fileName, null);
+				if (file != null) {
+					fFileNameToIFile.put(fileName, file);
+					taskLink = new FileLink(file, null, -1, -1, lineNumber);
+				} else if(fileName!=null){
+					File javaIOFile = FileUtils.getFileUtils().resolveFile(null, fileName);
+					if (javaIOFile.exists()) {
+						taskLink = new ExternalHyperlink(javaIOFile, lineNumber);
 					}
 				}
+			} else {
+				taskLink = new FileLink(file, null, -1, -1, lineNumber);
 			}
 		}
-				
-		if (fgProcessToLinks == null) {
-			fgProcessToLinks = new HashMap();
-			
-		}
-		List links = (List)fgProcessToLinks.get(process);
-		if (links == null) {
-			links = new ArrayList(10);
-			fgProcessToLinks.put(process, links);
-		}
-		
-		links.add(new HyperlinkEntry(link, region, message));
+		return taskLink;
 	}
 	
-	private static boolean addLink(IConsole console, IHyperlink link, IRegion lineRegion, IRegion region, String message) {
-		
-		int length = region.getLength();
-		
-		String text;
+	private static boolean addLink(IConsole console, IRegion lineRegion, LinkDescriptor descriptor) {
 		try {
-			text = console.getDocument().get(lineRegion.getOffset(), lineRegion.getLength());
+			String text = console.getDocument().get(lineRegion.getOffset(), lineRegion.getLength());
+			if (text.trim().equals(descriptor.getLine())) {
+				int offset = lineRegion.getOffset() + descriptor.getOffset();
+				IHyperlink link = createHyperlink(descriptor);
+				if (link != null) {
+					console.addLink(link, offset, descriptor.getLength());
+				}
+				return true;
+			}
 		} catch (BadLocationException e) {
-			return false;
-		}
-		if (text.trim().equals(message)) {
-			int offset = lineRegion.getOffset() + region.getOffset();
-			console.addLink(link, offset, length);
-			return true;
 		}
 		return false;
-	}
+	}	
 
 	/**
 	 * A new line has been added to the given console. Adds any task hyperlink
@@ -163,45 +105,25 @@ public class TaskLinkManager {
 	 * @param newLine
 	 */
 	public static synchronized void processNewLine(IConsole console, IRegion newLine) {
-		IProcess process = console.getProcess();
-		if (fgAntBuilds != null && fgAntBuilds.contains(process)) {
-			if (linkBuildFileMessage(console, newLine)) {
-				fgAntBuilds.remove(process);
-				return;
-			}
-		}
-		if (fgProcessToLinks == null) {
-			addNewLine(console, newLine, process);
+		AntLaunch launch = (AntLaunch) console.getProcess().getLaunch();
+		List links = launch.getLinkDescriptors();
+
+		if (linkBuildFileMessage(console, newLine)) {
 			return;
 		}
-		
-		List links = (List)fgProcessToLinks.get(process);
-		if (links == null) {
-			addNewLine(console, newLine, process);
+
+		if (links == null || links.isEmpty()) {
 			return;
 		}
-		
-		for (int index= 0; index < links.size(); index++) {
-			HyperlinkEntry link = (HyperlinkEntry) links.get(index);
-			if (addLink(console, link.getLink(), newLine, link.getRegion(), link.getMessage())) {
-				links.subList(0, index + 1).clear();
+
+		for (Iterator i = links.iterator(); i.hasNext();) {
+			LinkDescriptor descriptor = (LinkDescriptor) i.next();
+			if (addLink(console, newLine, descriptor)) {
+				launch.removeLinkDescriptor(descriptor);
 				return;
 			}
 		}
 	}
-	
-	private static void addNewLine(IConsole console, IRegion newLine, IProcess process) {
-		if (fgProcessToNewLines == null) {
-			fgProcessToNewLines = new HashMap();
-		}
-		List newLines = (List)fgProcessToNewLines.get(process);
-		if (newLines == null) {
-			newLines= new ArrayList();
-		}
-	
-		newLines.add(new LineEntry(console, newLine));
-		fgProcessToNewLines.put(process, newLines);
-	}
 
 	/**
 	 * Disposes any information stored for the given process.
@@ -209,43 +131,10 @@ public class TaskLinkManager {
 	 * @param process
 	 */
 	public static void dispose(IProcess process) {
-		if (fgProcessToLinks != null) {
-			fgProcessToLinks.remove(process);
-		}
-		if (fgProcessToNewLines != null) {
-			fgProcessToNewLines.remove(process);
-		}
-		if (fgAntBuilds != null) {
-			fgAntBuilds.remove(process);
-		}
-	}
-	
-	/**
-	 * Registers the specified process as an Ant build process.
-	 * Allows for the generation of the "Buildfile: somefile" link in the 
-	 * Ant output.
-	 * 
-	 * @param process
-	 */
-	public static synchronized void registerAntBuild(IProcess process) {
-		if (fgProcessToNewLines != null) {
-			List newLines = (List)fgProcessToNewLines.get(process);
-			if (newLines != null) {
-				for (Iterator iter = newLines.iterator(); iter.hasNext();) {
-					LineEntry newLine = (LineEntry) iter.next();
-					if (linkBuildFileMessage(newLine.getConsole(), newLine.getRegion())){
-						iter.remove();
-						return;
-					}
-				}
-			}
-		}
-		if (fgAntBuilds == null) {
-			fgAntBuilds= new ArrayList();
-		}
-		fgAntBuilds.add(process);
+		AntLaunch launch = (AntLaunch) process.getLaunch();
+		launch.clearLinkDescriptors();
 	}
-	
+
 	private static boolean linkBuildFileMessage(IConsole console, IRegion region) {
 		
 		String message= ""; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java
index 998c913..a1e95d6 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntElementNode.java	
@@ -640,6 +640,11 @@ public class AntElementNode implements IAdaptable, IAntElement {
 		return region.getOffset() >= fOffset;
 	}
 
+    /**
+     * Returns the complete live list of offsets for the given identifier
+     * @param identifier
+     * @return the list of offsets for the given identifier
+     */
     public List computeIdentifierOffsets(String identifier) {
         return null;
     }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
index 6b8887c..ea91ab8 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java	
@@ -348,7 +348,7 @@ public class AntModel implements IAntModel {
         // to determine the actual location of the file. Though the file 
         // contents will not be parsed. We parse the passed document string
         File file = getEditedFile();
-        String filePath= IAntCoreConstants.EMPTY_STRING;
+        String filePath= ""; //$NON-NLS-1$
         if (file != null) {
             filePath= file.getAbsolutePath();
         }
@@ -836,7 +836,7 @@ public class AntModel implements IAntModel {
         } else if(taskName.equalsIgnoreCase("antcall")) { //$NON-NLS-1$
             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_TARGET));
         } else if(taskName.equalsIgnoreCase("mkdir")) { //$NON-NLS-1$
-            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntCoreConstants.DIR));
+            newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DIR));
         } else if(taskName.equalsIgnoreCase("copy")) { //$NON-NLS-1$
             newNode= new AntTaskNode(newTask, generateLabel(taskName, attributes, IAntModelConstants.ATTR_DESTFILE));
         } else if(taskName.equalsIgnoreCase("tar")  //$NON-NLS-1$
@@ -869,11 +869,11 @@ public class AntModel implements IAntModel {
             newNode= new AntAntNode(newTask, attributes);
         } else if(taskName.equalsIgnoreCase("delete")) { //$NON-NLS-1$
             String label = "delete "; //$NON-NLS-1$
-            String file = attributes.getValue(IAntCoreConstants.FILE);
+            String file = attributes.getValue(IAntModelConstants.ATTR_FILE);
             if(file != null) {
                 label+= file;
             } else {
-                file = attributes.getValue(IAntCoreConstants.DIR);
+                file = attributes.getValue(IAntModelConstants.ATTR_DIR);
                 if(file != null) {
                     label+= file;
                 }
@@ -916,7 +916,7 @@ public class AntModel implements IAntModel {
         }
         String taskName= newTask.getTaskName();
         if ("attribute".equals(taskName) || "element".equals(taskName)) { //$NON-NLS-1$ //$NON-NLS-2$
-            String name= attributes.getValue(IAntCoreConstants.NAME);
+            String name= attributes.getValue("name"); //$NON-NLS-1$
             if (name != null) {
                 newNode.setBaseLabel(name);
             }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelCore.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelCore.java
index 6dd3247..4bb7e82 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelCore.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelCore.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,13 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.model;
 
-import com.ibm.icu.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.ant.internal.launching.debug.model.AntLineBreakpoint;
+import org.eclipse.ant.internal.launching.debug.model.DebugModelMessages;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.debug.model.AntLineBreakpoint;
-import org.eclipse.ant.internal.ui.debug.model.DebugModelMessages;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IMarkerDelta;
 import org.eclipse.core.resources.IWorkspaceRunnable;
@@ -28,6 +27,8 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointsListener;
 import org.eclipse.debug.core.model.IBreakpoint;
 
+import com.ibm.icu.text.MessageFormat;
+
 public class AntModelCore implements IBreakpointsListener {
 	
 	private static AntModelCore inst;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java
index d8faf4e..ff4d049 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModelProject.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * Portions Copyright  2000-2004 The Apache Software Foundation
  * All rights reserved. This program and the accompanying materials are made 
  * available under the terms of the Apache Software License v2.0 which 
@@ -13,22 +13,14 @@
 package org.eclipse.ant.internal.ui.model;
 
 import java.io.File;
-import java.util.Collections;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
 
 import org.apache.tools.ant.AntClassLoader;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildListener;
 import org.apache.tools.ant.Project;
-import org.apache.tools.ant.PropertyHelper;
-import org.apache.tools.ant.UnknownElement;
 import org.apache.tools.ant.types.Path;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 
 /**
  * Derived from the original Ant Project class
@@ -40,54 +32,22 @@ import org.eclipse.ant.internal.core.IAntCoreConstants;
  */
 public class AntModelProject extends Project {
 	
-	/**
-	 * Delegate to maintain property chaining - to make sure our project is alerted 
-	 * to new properties being set
-	 */
-	class AntPropertyHelper implements PropertyHelper.PropertySetter {
-		/* (non-Javadoc)
-		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#setNew(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
-		 */
-		public boolean setNew(String property, Object value, PropertyHelper propertyHelper) {
-			setNewProperty(property, value.toString());
-			return false;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.apache.tools.ant.PropertyHelper.PropertySetter#set(java.lang.String, java.lang.Object, org.apache.tools.ant.PropertyHelper)
-		 */
-		public boolean set(String property, Object value, PropertyHelper propertyHelper) {
-			return false;
-		}
-	}
-	
+	private Hashtable fBaseProperties;
+	private Hashtable fCurrentProperties= new Hashtable();
 	private AntPropertyNode fCurrentConfiguringPropertyNode;
-	private Map idrefs = Collections.synchronizedMap(new HashMap());
-	private static Object loaderLock = new Object();
-	private Hashtable loaders = null;
-	private AntRefTable references = new AntRefTable();
-	
-	/**
-	 * Constructor
-	 * <p>
-	 * Allows us to register a {@link PropertyHelper.PropertySetter} delegate for this project
-	 * </p>
-	 * @noreference This constructor is not intended to be referenced by clients.
-	 */
-	public AntModelProject() {
-		PropertyHelper.getPropertyHelper(this).add(new AntPropertyHelper());
-	}
 	
 	/* (non-Javadoc)
 	 * @see org.apache.tools.ant.Project#setNewProperty(java.lang.String, java.lang.String)
 	 */
 	public void setNewProperty(String name, String value) {
-		if(PropertyHelper.getPropertyHelper(this).getProperty(name) != null) {
+		
+		if (fCurrentProperties.get(name) != null) {
 			return;
-		}
+		} 
 		//allows property values to be over-written for this parse session
 		//there is currently no way to remove properties from the Apache Ant project
 		//the project resets it properties for each parse...see reset()
+		fCurrentProperties.put(name, value);
 		if (fCurrentConfiguringPropertyNode != null) {
 			fCurrentConfiguringPropertyNode.addProperty(name, value);
 		}
@@ -106,26 +66,13 @@ public class AntModelProject extends Project {
 		}
 	}
 	
-	/**
-	 * Reset the project
-	 */
 	public void reset() {
 		getTargets().clear();
 		setDefault(null);
 		setDescription(null);
-		setName(IAntCoreConstants.EMPTY_STRING);
-		synchronized (loaderLock) {
-			if(loaders != null) {
-				Iterator i = loaders.entrySet().iterator();
-				Entry e = null;
-				while(i.hasNext()) {
-					e = (Entry) i.next();
-					AntClassLoader acl = (AntClassLoader) e.getValue();
-					acl.cleanup();
-					acl.clearAssertionStatus();
-				}
-			}
-		}
+		setName(""); //$NON-NLS-1$
+		//reset the properties to the initial set
+		fCurrentProperties= new Hashtable(fBaseProperties);
 	}
 	
 	/* (non-Javadoc)
@@ -133,55 +80,39 @@ public class AntModelProject extends Project {
 	 */
 	public String getProperty(String name) {
 		//override as we cannot remove properties from the Apache Ant project
-		String result= super.getProperty(name);
+		String result= (String)fCurrentProperties.get(name);
 		if (result == null) {
-			return getUserProperty(name);
+			result= getUserProperty(name);
 		}
 		return result;
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Project#addIdReference(java.lang.String, java.lang.Object)
-	 */
-	public void addIdReference(String id, Object value) {
-		//XXX hack because we cannot look up references by id in Ant 1.8.x
-		//see https://issues.apache.org/bugzilla/show_bug.cgi?id=49659
-		idrefs.put(id, value);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Project#getReference(java.lang.String)
-	 */
-	public Object getReference(String key) {
-		Object ref = references.get(key);
-		if(ref == null) {
-			ref = idrefs.get(key);
-			if(ref instanceof UnknownElement) {
-				UnknownElement ue = (UnknownElement) ref;
-				ue.maybeConfigure();
-				return ue.getRealThing();
-			}
-		}
-		return ref;
-	}
-	
-	/* (non-Javadoc)
 	 * @see org.apache.tools.ant.Project#getProperties()
 	 */
 	public Hashtable getProperties() {
 		//override as we cannot remove properties from the Apache Ant project
-		Hashtable allProps = super.getProperties();
+		Hashtable allProps= new Hashtable(fCurrentProperties);
 		allProps.putAll(getUserProperties());
 		allProps.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
 		return allProps;
 	}
 	
 	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Project#init()
+	 */
+	public void init() throws BuildException {
+		super.init();
+		fBaseProperties= super.getProperties();
+		fCurrentProperties= super.getProperties();
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.apache.tools.ant.Project#setBaseDir(java.io.File)
 	 */
 	public void setBaseDir(File baseDir) throws BuildException {
 		super.setBaseDir(baseDir);
-		setNewProperty("basedir", getBaseDir().getPath()); //$NON-NLS-1$
+		fCurrentProperties.put("basedir", getBaseDir().getPath()); //$NON-NLS-1$
 	}
 
 	/**
@@ -195,53 +126,12 @@ public class AntModelProject extends Project {
      * @see org.apache.tools.ant.Project#createClassLoader(org.apache.tools.ant.types.Path)
      */
     public AntClassLoader createClassLoader(Path path) {
-    	synchronized (loaderLock) {
-    		if(loaders == null) {
-    			loaders = new Hashtable(8);
-    		}
-    		Path p = path;
-    		if(p == null) {
-    			p = new Path(this);
-    		}
-    		String pstr = p.toString();
-    		AntClassLoader loader = (AntClassLoader) loaders.get(pstr);
-    		if(loader == null) {
-    			loader = super.createClassLoader(path);
-    	    	if (path == null) {
-    	    		//use the "fake" Eclipse runtime classpath for Ant
-    	    		loader.setClassPath(Path.systemClasspath);
-    	    	}
-    	    	loaders.put(pstr, loader);
-    		}
-    		return loader;
-		}
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Project#addReference(java.lang.String, java.lang.Object)
-     */
-    public void addReference(String referenceName, Object value) {
-    	references.put(referenceName, value);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Project#getReferences()
-     */
-    public Hashtable getReferences() {
-    	return references;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Project#getCopyOfReferences()
-     */
-    public Map getCopyOfReferences() {
-    	return new Hashtable(references);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Project#hasReference(java.lang.String)
-     */
-    public boolean hasReference(String key) {
-    	return references.contains(key);
+    	AntClassLoader loader= super.createClassLoader(path);
+    	if (path == null) {
+    		//use the "fake" Eclipse runtime classpath for Ant
+    		loader.setClassPath(Path.systemClasspath);
+    	}
+        
+        return loader;
     }
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java
index f4cca85..c56db72 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntProjectNode.java	
@@ -15,7 +15,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.tools.ant.Project;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.core.resources.IFile;
@@ -130,9 +129,9 @@ public class AntProjectNode extends AntElementNode {
         	return null;
         }
         List results= new ArrayList(1);
-    	String newidentifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
-    	int defaultTargetNameOffset= textToSearch.indexOf(IAntCoreConstants.DEFAULT);
-    	defaultTargetNameOffset= textToSearch.indexOf(newidentifier, defaultTargetNameOffset);
+    	identifier= new StringBuffer("\"").append(identifier).append('"').toString(); //$NON-NLS-1$
+    	int defaultTargetNameOffset= textToSearch.indexOf("default"); //$NON-NLS-1$
+    	defaultTargetNameOffset= textToSearch.indexOf(identifier, defaultTargetNameOffset);
     	results.add(new Integer(getOffset() + defaultTargetNameOffset + 1));
         return results;
     }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java
index b21e3a5..6a04c21 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntPropertyNode.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.Map;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
 import org.eclipse.ant.core.AntSecurityException;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.editor.AntEditorCompletionProcessor;
@@ -32,7 +31,7 @@ public class AntPropertyNode extends AntTaskNode {
 	
 	private String fValue= null;
 	private String fReferencedName;
-    private String fOccurrencesStartingPoint= IAntCoreConstants.VALUE;
+    private String fOccurrencesStartingPoint= IAntModelConstants.ATTR_VALUE;
     private String fOccurrencesIdentifier;
     
 	/*
@@ -43,9 +42,9 @@ public class AntPropertyNode extends AntTaskNode {
 	
 	public AntPropertyNode(Task task, Attributes attributes) {
 		super(task);
-		 String label = attributes.getValue(IAntCoreConstants.NAME);
+		 String label = attributes.getValue(IAntModelConstants.ATTR_NAME);
          if (label == null) {
-			label = attributes.getValue(IAntCoreConstants.FILE);
+			label = attributes.getValue(IAntModelConstants.ATTR_FILE);
          	if (label != null) {
          		fReferencedName= label;
          		label=  "file="+label; //$NON-NLS-1$
@@ -68,7 +67,7 @@ public class AntPropertyNode extends AntTaskNode {
          		}
          	}
          } else {
-         	fValue= attributes.getValue(IAntCoreConstants.VALUE);
+         	fValue= attributes.getValue(IAntModelConstants.ATTR_VALUE);
             if (fValue == null) {
                 fOccurrencesStartingPoint= IAntModelConstants.ATTR_LOCATION;
                 fValue= attributes.getValue(fOccurrencesStartingPoint);
@@ -141,7 +140,7 @@ public class AntPropertyNode extends AntTaskNode {
 			String textToSearch= getAntModel().getText(getOffset(), offset - getOffset());
 			if (textToSearch != null && textToSearch.length() != 0) {
 				String attributeString = AntEditorCompletionProcessor.getAttributeStringFromDocumentStringToPrefix(textToSearch);
-				if (IAntCoreConstants.FILE.equals(attributeString) || IAntModelConstants.ATTR_RESOURCE.equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$
+				if ("file".equals(attributeString) || "resource".equals(attributeString) || "srcFile".equals(attributeString)) {  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 					return fReferencedName;
 				}
 			}
@@ -215,7 +214,7 @@ public class AntPropertyNode extends AntTaskNode {
         List results= new ArrayList();
         if (fBaseLabel != null) {
             if (fBaseLabel.equals(identifier)) {
-                int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
+                int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
                 nameOffset= textToSearch.indexOf(identifier, nameOffset + 1);
                 results.add(new Integer(getOffset() + nameOffset));
             }
@@ -250,7 +249,7 @@ public class AntPropertyNode extends AntTaskNode {
          if (textToSearch == null || textToSearch.length() == 0) {
          	return false;
          }
-         int nameStartOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
+         int nameStartOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
          nameStartOffset= textToSearch.indexOf("\"", nameStartOffset); //$NON-NLS-1$
          int nameEndOffset= textToSearch.indexOf("\"", nameStartOffset + 1); //$NON-NLS-1$
          nameEndOffset+=offset;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java
deleted file mode 100644
index 1f04ae6..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntRefTable.java	
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.eclipse.ant.internal.ui.model;
-
-import java.util.Hashtable;
-
-import org.apache.tools.ant.UnknownElement;
-
-/**
- * This class has been copied in its entirety from the static
- * inner class AntRefTable from {@link org.apache.tools.ant.Project}
- */
-public class AntRefTable extends Hashtable {
-
-	private static final long serialVersionUID = 1L;
-
-	AntRefTable() {
-        super();
-    }
-
-    /** 
-     * Returns the unmodified original object.
-     * This method should be called internally to
-     * get the "real" object.
-     * The normal get method will do the replacement
-     * of UnknownElement (this is similar with the JDNI
-     * refs behavior).
-     */
-    private Object getReal(Object key) {
-        return super.get(key);
-    }
-
-    /** 
-     * Get method for the reference table.
-     *  It can be used to hook dynamic references and to modify
-     * some references on the fly--for example for delayed
-     * evaluation.
-     *
-     * It is important to make sure that the processing that is
-     * done inside is not calling get indirectly.
-     *
-     * @param key lookup key.
-     * @return mapped value.
-     */
-    public synchronized Object get(Object key) {
-        Object o = getReal(key);
-        if (o instanceof UnknownElement) {
-            // Make sure that
-            UnknownElement ue = (UnknownElement) o;
-            ue.maybeConfigure();
-            o = ue.getRealThing();
-        }
-        return o;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java
index bf37cd4..0bd4c1c 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntTargetNode.java	
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -17,7 +17,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.tools.ant.Target;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
@@ -68,13 +67,13 @@ public class AntTargetNode extends AntElementNode {
 	
 	/**
 	 * Returns whether this target is an internal target. Internal
-	 * targets are targets which have no description. The default target
+	 * targets are targets which has no description or starts with hyphen ('-') character. The default target
 	 * is never considered internal.
 	 * @return whether the given target is an internal target
 	 */
 	public boolean isInternal() {
 		Target target= getTarget();
-		return target.getDescription() == null && !isDefaultTarget();
+		return (target.getDescription() == null || getTargetName().startsWith("-")) && !isDefaultTarget(); //$NON-NLS-1$
 	}
 	
 	/* (non-Javadoc)
@@ -84,7 +83,7 @@ public class AntTargetNode extends AntElementNode {
 		ImageDescriptor base= null;
 		if (isDefaultTarget()) {
 			base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_DEFAULT_TARGET);
-		} else if (getTarget().getDescription() == null) {
+		} else if (isInternal()) {
 			base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_TARGET_INTERNAL);
 		} else {
 			base = AntUIImages.getImageDescriptor(IAntUIConstants.IMG_ANT_TARGET);
@@ -180,7 +179,7 @@ public class AntTargetNode extends AntElementNode {
         }
         List results= new ArrayList();
         if (getTargetName().equals(identifier)) {
-            int nameOffset= textToSearch.indexOf(IAntCoreConstants.NAME);
+            int nameOffset= textToSearch.indexOf("name"); //$NON-NLS-1$
             nameOffset= textToSearch.indexOf(identifier, nameOffset);
             results.add(new Integer(getOffset() + nameOffset));
         } else {
@@ -237,7 +236,7 @@ public class AntTargetNode extends AntElementNode {
 		}
 		if (checkReferenceRegion(region, textToSearch, "depends")) { //$NON-NLS-1$
 			return true;
-		} else if (checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME)) {
+		} else if (checkReferenceRegion(region, textToSearch, "name")) { //$NON-NLS-1$
 			return true;
 		} else if (checkReferenceRegion(region, textToSearch, "if")) { //$NON-NLS-1$
 			return true;
@@ -253,6 +252,6 @@ public class AntTargetNode extends AntElementNode {
          if (textToSearch == null || textToSearch.length() == 0) {
          	return false;
          }
-         return checkReferenceRegion(region, textToSearch, IAntCoreConstants.NAME);
+         return checkReferenceRegion(region, textToSearch, "name"); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java
index 5f9ee6c..3e0daa5 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/InternalTargetFilter.java	
@@ -1,17 +1,16 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.ant.internal.ui.model;
 
-import org.apache.tools.ant.Target;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
@@ -34,8 +33,7 @@ public class InternalTargetFilter extends ViewerFilter {
 		    }
 		}
 		if (element instanceof AntTargetNode) {
-			Target target= ((AntTargetNode)element).getTarget();
-			result= target.getDescription() != null || ((AntTargetNode)element).isDefaultTarget();
+			result = !((AntTargetNode)element).isInternal();
 		} 
 		if (!result) {
 			fFiltered++;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java
index 515b256..bb9894d 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AddCustomDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
 import org.eclipse.ant.core.IAntClasspathEntry;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -83,9 +82,9 @@ public class AddCustomDialog extends StatusDialog {
 	
 	private Text nameField;
 	
-	private String name= IAntCoreConstants.EMPTY_STRING;
+	private String name=""; //$NON-NLS-1$
 	private IAntClasspathEntry library= null;
-	private String className= IAntCoreConstants.EMPTY_STRING;
+	private String className=""; //$NON-NLS-1$
 	
 	private boolean editing= false;
 	
@@ -395,7 +394,7 @@ public class AddCustomDialog extends StatusDialog {
 		// Use an empty label so that display of the element's full name
 		// doesn't include a confusing label
 		MinimizedFileSystemElement dummyParent =
-			new MinimizedFileSystemElement(IAntCoreConstants.EMPTY_STRING, null, true);
+			new MinimizedFileSystemElement("", null, true);//$NON-NLS-1$
 		dummyParent.setPopulated();
 		MinimizedFileSystemElement result =
 			new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java
index f0b1067..09c43a7 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathBlock.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.ant.core.IAntClasspathEntry;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
@@ -222,7 +221,7 @@ public class AntClasspathBlock {
 		String result = dialog.open();
 		if (result != null) {
 			try {
-				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + result + "/"); //$NON-NLS-1$;
+				URL url = new URL("file:" + result + "/"); //$NON-NLS-2$;//$NON-NLS-1$;
 				((AntClasspathContentProvider)treeViewer.getContentProvider()).add(currentParent, url);
 			} catch (MalformedURLException e) {
 			}
@@ -253,7 +252,7 @@ public class AntClasspathBlock {
 			String jarName = results[i];
 			try {
 				IPath path = filterPath.append(jarName).makeAbsolute();
-				URL url = new URL(IAntCoreConstants.FILE_PROTOCOL + path.toOSString());
+				URL url = new URL("file:" + path.toOSString()); //$NON-NLS-1$;
 				contentProvider.add(currentParent, url);
 			} catch (MalformedURLException e) {
 			}
@@ -498,7 +497,7 @@ public class AntClasspathBlock {
 				File file = new File(rootDir, names[i]);
 				if (file.isFile() && file.getPath().endsWith(".jar")) { //$NON-NLS-1$
 					try {
-						URL url = new URL(IAntCoreConstants.FILE_PROTOCOL +  file.getAbsolutePath());
+						URL url = new URL("file:" +  file.getAbsolutePath()); //$NON-NLS-1$
 						contentProvider.add(ClasspathModel.ANT_HOME, url);
 					} catch (MalformedURLException e) {
 					}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java
index 030eae9..bb4f665 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntClasspathLabelProvider.java	
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java
index 5d7c070..e284013 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntObjectLabelProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ant.internal.ui.preferences;
 import org.eclipse.ant.core.Property;
 import org.eclipse.ant.core.Task;
 import org.eclipse.ant.internal.core.AntObject;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIImages;
 import org.eclipse.ant.internal.ui.IAntUIConstants;
 import org.eclipse.jface.viewers.IColorProvider;
@@ -99,7 +98,7 @@ public class AntObjectLabelProvider extends LabelProvider implements ITableLabel
                     return property.getPluginLabel();
                 }
         }
-        return IAntCoreConstants.EMPTY_STRING;
+        return ""; //$NON-NLS-1$
     }
     
 	public static Image getTypeImage() {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java
index 6ced37f..56d2369 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencePage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,14 @@
  *******************************************************************************/
 package org.eclipse.ant.internal.ui.preferences;
 
-
-import com.ibm.icu.text.MessageFormat;
-
+import org.eclipse.ant.internal.launching.AntLaunching;
+import org.eclipse.ant.internal.launching.IAntLaunchingPreferenceConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
 import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.preference.BooleanFieldEditor;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -40,11 +42,58 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 
+import com.ibm.icu.text.MessageFormat;
+
 public class AntPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
 	
+	/**
+	 * Allows us to override the default behavior of the default {@link IntegerFieldEditor} to work
+	 * on a core preference context
+	 * 
+	 * @since 3.6
+	 */
+	class AntIntegerFieldEditor extends IntegerFieldEditor {
+		String node = null, key = null;
+		int defaultvalue = -1;
+		
+		/**
+		 * Constructor
+		 * @param node the identifier of the node we want to set the preference in, i.e. org.eclipse.ant.launching
+		 * @param key the preference key to map the value to
+		 * @param title the title of the field editor
+		 * @param parent the parent to add the field editor to
+		 * @param defaultvalue the default value to return when looking up stored values
+		 */
+		public AntIntegerFieldEditor(String node, String key, String title, Composite parent, int defaultvalue) {
+			super(key, title, parent);
+			this.node = node;
+			this.key = key;
+			this.defaultvalue = defaultvalue;
+		}
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.preference.IntegerFieldEditor#doStore()
+		 */
+		protected void doStore() {
+			new InstanceScope().getNode(node).putInt(key, Integer.parseInt(getStringValue()));
+		}
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.preference.FieldEditor#load()
+		 */
+		public void load() {
+			setStringValue(Integer.toString(Platform.getPreferencesService().getInt(node, key, defaultvalue, null)));
+		}
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.preference.FieldEditor#loadDefault()
+		 */
+		public void loadDefault() {
+			setStringValue(Integer.toString(new DefaultScope().getNode(AntLaunching.getUniqueIdentifier()).getInt(key, defaultvalue)));
+		}
+	}
+	
 	private List fConsoleColorList;
 	private ColorEditor fConsoleColorEditor;
-	
+	private IntegerFieldEditor timeout;
+
 	private BooleanFieldEditor fToolsWarningEditor= null;
 	
 	// Array containing the message to display, the preference key, and the 
@@ -84,12 +133,17 @@ public class AntPreferencePage extends FieldEditorPreferencePage implements IWor
 		
 		StringFieldEditor editor = new StringFieldEditor(IAntUIPreferenceConstants.ANT_FIND_BUILD_FILE_NAMES, AntPreferencesMessages.AntPreferencePage__Names__3, getFieldEditorParent());
 		addField(editor);
-		
-		IntegerFieldEditor timeout = new IntegerFieldEditor(IAntUIPreferenceConstants.ANT_COMMUNICATION_TIMEOUT, AntPreferencesMessages.AntPreferencePage_13, getFieldEditorParent());
-        int minValue= AntUIPlugin.getDefault().getPreferenceStore().getDefaultInt(IAntUIPreferenceConstants.ANT_COMMUNICATION_TIMEOUT);
+
+		timeout = new AntIntegerFieldEditor(AntLaunching.getUniqueIdentifier(), 
+				IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT, 
+				AntPreferencesMessages.AntPreferencePage_13, 
+				getFieldEditorParent(),
+				20000);
+        int minValue = new DefaultScope().getNode(AntLaunching.getUniqueIdentifier()).getInt(IAntLaunchingPreferenceConstants.ANT_COMMUNICATION_TIMEOUT, 20000);
         int maxValue = 1200000;
         timeout.setValidRange(minValue, maxValue);
-        timeout.setErrorMessage(MessageFormat.format(AntPreferencesMessages.AntPreferencePage_14, new Object[] {new Integer(minValue), new Integer(maxValue)})); 
+        timeout.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
+        timeout.setErrorMessage(MessageFormat.format(AntPreferencesMessages.AntPreferencePage_14, new Object[] {new Integer(minValue), new Integer(maxValue)}));
         addField(timeout);
         
         editor = new URLFieldEditor(IAntUIPreferenceConstants.DOCUMENTATION_URL, AntPreferencesMessages.AntPreferencePage_2, getFieldEditorParent());
@@ -285,7 +339,6 @@ public class AntPreferencePage extends FieldEditorPreferencePage implements IWor
 			PreferenceConverter.setValue(getPreferenceStore(), key, PreferenceConverter.getDefaultColor(getPreferenceStore(), key));
 		}
 		handleAppearanceColorListSelection();
-		
 		super.performDefaults();
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencesMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencesMessages.properties
index 8edb3f2..51926a4 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencesMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPreferencesMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -59,7 +59,7 @@ AntPreferencePage_0=Some tasks, such as "javac", require the tools.jar library t
 AntPreferencePage_1=&Warn when tools.jar is not on classpath
 AntPreferencePage_2=Documentation &URL:
 
-AntTasksPage_1 = Add &Task...
+AntTasksPage_1 = Add Ta&sk...
 AntTasksPage_2 = &Edit Task...
 AntTasksPage_3 = Remo&ve
 AntTasksPage_addTaskDialogTitle = Add Task
@@ -139,7 +139,7 @@ AntEditorPreferencePage_23=&Comments
 AntEditorPreferencePage_24=Def&ining tasks
 AntEditorPreferencePage_25=&Targets
 AntEditorPreferencePage_26=DTD Declarations
-AntEditorPreferencePage_27=Sec&urity Problems
+AntEditorPreferencePage_27=Sec&urity Problems:
 AntEditorPreferencePage_28=&Ignore all buildfile problems
 AntEditorPreferencePage_29=Set the names of files that will not be checked for problems in the Ant Editor. List is comma separated:
 AntEditorPreferencePage_5=Fore&ground:
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java
index 20d7f2b..fcdc7da 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/AntPropertiesBlock.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.ant.core.Property;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.AntUtil;
 import org.eclipse.ant.internal.ui.ColumnSorter;
@@ -405,7 +404,7 @@ public class AntPropertiesBlock {
 		String lastUsedPath;
 		lastUsedPath= dialogSettings.get(IAntUIConstants.DIALOGSTORE_LASTEXTFILE);
 		if (lastUsedPath == null) {
-			lastUsedPath= IAntCoreConstants.EMPTY_STRING;
+			lastUsedPath= ""; //$NON-NLS-1$
 		}
 		FileDialog dialog = new FileDialog(fileTableViewer.getControl().getShell(), SWT.MULTI);
 		dialog.setFilterExtensions(new String[] { "*.properties", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$;
@@ -439,7 +438,7 @@ public class AntPropertiesBlock {
 	 */
 	private void addProperty() {
 		String title = AntPreferencesMessages.AntPropertiesBlock_Add_Property_2;
-		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{IAntCoreConstants.EMPTY_STRING, IAntCoreConstants.EMPTY_STRING});
+		AddPropertyDialog dialog = new AddPropertyDialog(propertyTableViewer.getControl().getShell(), title, new String[]{"", ""}); //$NON-NLS-1$ //$NON-NLS-2$
 		if (dialog.open() == Window.CANCEL) {
 			return;
 		}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java
index fabbad7..a7681cb 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/ClasspathEntry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.ant.internal.ui.preferences;
 import java.net.MalformedURLException;
 import java.net.URL;
 import org.eclipse.ant.core.IAntClasspathEntry;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.variables.VariablesPlugin;
@@ -100,7 +99,7 @@ public class ClasspathEntry extends AbstractClasspathEntry {
 			
 		try {
 			String expanded = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fVariableString);
-			return new URL(IAntCoreConstants.FILE_PROTOCOL + expanded);
+			return new URL("file:" + expanded); //$NON-NLS-1$
 		} catch (CoreException e) {
 			AntUIPlugin.log(e);
 		} catch (MalformedURLException e) {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java
index d91b721..e9c9588 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/FileSelectionDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.ant.internal.ui.preferences;
 
 import java.util.List;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
@@ -56,14 +55,14 @@ public class FileSelectionDialog extends ElementTreeSelectionDialog {
 		ISelectionStatusValidator validator= new ISelectionStatusValidator() {
 			public IStatus validate(Object[] selection) {
 				if (selection.length == 0) {
-					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
+					return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
 				}
 				for (int i= 0; i < selection.length; i++) {
 					if (!(selection[i] instanceof IFile)) {
-						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
+						return new Status(IStatus.ERROR, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
 					}
 				}
-				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, IAntCoreConstants.EMPTY_STRING, null); 
+				return new Status(IStatus.OK, AntUIPlugin.getUniqueIdentifier(), 0, "", null); //$NON-NLS-1$
 			}			
 		};
 		setValidator(validator);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java
index 0745969..5ebb895 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/preferences/MessageLine.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.ant.internal.ui.preferences;
 
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.core.runtime.IStatus;
 
 import org.eclipse.swt.SWT;
@@ -80,7 +79,7 @@ public class MessageLine extends CLabel {
 				return;
 			}
 		}
-		setText(IAntCoreConstants.EMPTY_STRING);
+		setText(""); //$NON-NLS-1$
 		setImage(null);
 		setBackground(fNormalMsgAreaBackground);
 	}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java
index 1c752d2..5a05584 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/refactoring/LaunchConfigurationBuildfileChange.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,9 +14,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.ant.core.AntCorePlugin;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUtil;
-import org.eclipse.ant.ui.launching.IAntLaunchConfigurationConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -40,7 +40,6 @@ import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -92,7 +91,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
     private static ILaunchConfiguration[] getAntLaunchConfigurations() throws CoreException {
         ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
         // Ant launch configurations
-        ILaunchConfigurationType configurationType= manager.getLaunchConfigurationType(IAntLaunchConfigurationConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
+        ILaunchConfigurationType configurationType= manager.getLaunchConfigurationType(IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE);
         ILaunchConfiguration[] configs= manager.getLaunchConfigurations(configurationType);
         return configs;
     }
@@ -209,7 +208,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
 	 */
 	public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
 		if (fLaunchConfiguration.exists()) {
-			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
+			String buildFileLocation= fLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
 			if (fOldBuildfileLocation == null || (buildFileLocation.endsWith(fOldBuildfileLocation + '}') || buildFileLocation.endsWith(fOldBuildfileLocation))) {
 				String projectName= fLaunchConfiguration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
 				if (fOldProjectName.equals(projectName)) {
@@ -234,7 +233,7 @@ public class LaunchConfigurationBuildfileChange extends Change {
             fNewLaunchConfiguration.setContainer(container);
         }
 
-		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, IAntCoreConstants.EMPTY_STRING); 
+		String oldBuildfileLocation= fNewLaunchConfiguration.getAttribute(IExternalToolConstants.ATTR_LOCATION, ""); //$NON-NLS-1$
 		String oldProjectName;
 		if (fNewBuildfileLocation != null) {
             String newBuildFileLocation= oldBuildfileLocation.replaceFirst(fOldBuildfileLocation, fNewBuildfileLocation);
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java
index b987ecf..b8c1861 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
 import org.eclipse.ant.internal.ui.model.AntElementNode;
 import org.eclipse.ant.internal.ui.model.AntModelLabelProvider;
@@ -576,7 +575,7 @@ public class AntView extends ViewPart implements IResourceChangeListener, IShowI
 
 			AntProjectNodeProxy project = null;
 			if (nameString == null) {
-				nameString = IAntCoreConstants.EMPTY_STRING;
+				nameString = ""; //$NON-NLS-1$
 			}
 			project = new AntProjectNodeProxy(nameString, pathString);
 			if (errorString != null && Boolean.valueOf(errorString).booleanValue()) {
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java
index 34baa2c..f2b5c00 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/AntViewDropAdapter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,22 +61,34 @@ public class AntViewDropAdapter extends DropTargetAdapter {
 	 */
 	private void processString(String buildFileName) {
 		IFile buildFile = AntUtil.getFileForLocation(buildFileName, null);
-		if (buildFile == null || !buildFileName.toLowerCase().endsWith(".xml")) { //$NON-NLS-1$
+		if (!acceptBuildFile(buildFile.getName())) {
 			return;
 		}
-		buildFileName = buildFile.getFullPath().toString();
+		String name = buildFile.getFullPath().toString();
 		AntProjectNode[] existingProjects = view.getProjects();
 		for (int j = 0; j < existingProjects.length; j++) {
 			AntProjectNodeProxy existingProject = (AntProjectNodeProxy)existingProjects[j];
-			if (existingProject.getBuildFileName().equals(buildFileName)) {
+			if (existingProject.getBuildFileName().equals(name)) {
 				// Don't parse projects that have already been added.
 				return;
 			}
 		}
-		AntProjectNode project = new AntProjectNodeProxy(buildFileName);
+		AntProjectNode project = new AntProjectNodeProxy(name);
 		view.addProject(project);
 	}
 	
+	/**
+	 * Returns if the given build file name is known as a build file
+	 * @param name
+	 * @return true if the name of the build file is known as a build file, false otherwise
+	 */
+	boolean acceptBuildFile(String name) {
+		if(name != null) {
+			return name.toLowerCase().endsWith(".xml") || AntUtil.isKnownBuildfileName(name); //$NON-NLS-1$
+		}
+		return false;
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.swt.dnd.DropTargetListener#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
 	 */
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java
index e88cfe2..09c8d5d 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/views/actions/SearchForBuildFilesDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,8 +16,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
-import org.eclipse.ant.internal.core.IAntCoreConstants;
 import org.eclipse.ant.internal.ui.AntUIPlugin;
 import org.eclipse.ant.internal.ui.IAntUIHelpContextIds;
 import org.eclipse.ant.internal.ui.IAntUIPreferenceConstants;
@@ -98,7 +96,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
 			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_SEARCH_STRING, "build.xml"); //$NON-NLS-1$
 		}
 		if (settings.get(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE) == null) {
-			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, IAntCoreConstants.EMPTY_STRING); 
+			settings.put(IAntUIPreferenceConstants.ANTVIEW_LAST_WORKINGSET_SEARCH_SCOPE, ""); //$NON-NLS-1$
 		} 
 	}
 
@@ -305,7 +303,7 @@ public class SearchForBuildFilesDialog extends InputDialog {
 	private void setWorkingSet(IWorkingSet set) {
 		if (set == null) {
 			searchScopes= null;
-			workingSetText.setText(IAntCoreConstants.EMPTY_STRING); 
+			workingSetText.setText(""); //$NON-NLS-1$
 			validateInput();
 			return;
 		}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java
index 56a35fa..a493c00 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/ui/launching/IAntLaunchConfigurationConstants.java	
@@ -1,119 +1,146 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.ant.ui.launching;
 
-import org.eclipse.ant.internal.ui.AntUIPlugin;
-import org.eclipse.ant.internal.ui.IAntUIConstants;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
+import org.eclipse.ant.launching.IAntLaunchConstants;
 
 /**
  * Constant definitions for Ant launch configurations.
  * 
  * @since 3.4
  * @noimplement This interface is not intended to be implemented by clients.
+ * @deprecated use {@link IAntLaunchConstants}
  */
 public interface IAntLaunchConfigurationConstants {
 
 	/**
 	 * Ant launch configuration type identifier.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ID_ANT_LAUNCH_CONFIGURATION_TYPE}
 	 */
-	public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntLaunchConfigurationType"; //$NON-NLS-1$
+	public static final String ID_ANT_LAUNCH_CONFIGURATION_TYPE = IAntLaunchConstants.ID_ANT_LAUNCH_CONFIGURATION_TYPE;
 
 	/**
 	 * Ant builder launch configuration type identifier. Ant project builders
 	 * are of this type.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE}
 	 */
-	public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$NON-NLS-1$
+	public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = IAntLaunchConstants.ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE;
 	
 	/**
 	 * String attribute indicating the Ant targets to execute. Default value is
 	 * <code>null</code> which indicates that the default target is to be
 	 * executed. Format is a comma separated listing of targets.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_TARGETS}
 	 */
-	public static final String ATTR_ANT_TARGETS = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_ANT_TARGETS = IAntLaunchConstants.ATTR_ANT_TARGETS;
 	
 	/**
 	 * String attribute indicating the Ant targets to execute after a clean (full build) for an Ant builder. Default value is
 	 * <code>null</code> which indicates that the default target is to be
 	 * executed. Format is a comma separated listing of targets.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_AFTER_CLEAN_TARGETS}
 	 */
-	public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = IAntUIConstants.PLUGIN_ID + ".ATTR_ANT_AFTER_CLEAN_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_ANT_AFTER_CLEAN_TARGETS = IAntLaunchConstants.ATTR_ANT_AFTER_CLEAN_TARGETS;
 	
 	/**
 	 * String attribute indicating the Ant targets to execute during a manual build for an Ant builder. Default value is
 	 * <code>null</code> which indicates that the default target is to be
 	 * executed. Format is a comma separated listing of targets.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_MANUAL_TARGETS}
 	 */
-	public static final String ATTR_ANT_MANUAL_TARGETS = IAntUIConstants.PLUGIN_ID + ".ATTR_ANT_MANUAL_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_ANT_MANUAL_TARGETS = IAntLaunchConstants.ATTR_ANT_MANUAL_TARGETS;
 	
 	/**
 	 * String attribute indicating the Ant targets to execute during an auto build for an Ant builder. Default value is
 	 * <code>null</code> which indicates that the default target is to be
 	 * executed. Format is a comma separated listing of targets.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_AUTO_TARGETS}
 	 */
-	public static final String ATTR_ANT_AUTO_TARGETS = IAntUIConstants.PLUGIN_ID + ".ATTR_ANT_AUTO_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_ANT_AUTO_TARGETS = IAntLaunchConstants.ATTR_ANT_AUTO_TARGETS;
 	
 	/**
 	 * String attribute indicating the Ant targets to execute during a clean for an Ant builder. Default value is
 	 * <code>null</code> which indicates that the default target is to be
 	 * executed. Format is a comma separated listing of targets.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_CLEAN_TARGETS}
 	 */
-	public static final String ATTR_ANT_CLEAN_TARGETS = IAntUIConstants.PLUGIN_ID + ".ATTR_ANT_CLEAN_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_ANT_CLEAN_TARGETS = IAntLaunchConstants.ATTR_ANT_CLEAN_TARGETS;
 	
 	/**
 	 * Boolean attribute indicating whether or not target specification for an Ant builder 
 	 * has been updated for 3.1 
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_TARGETS_UPDATED}
 	 */
-	public static final String ATTR_TARGETS_UPDATED = IAntUIConstants.PLUGIN_ID + ".ATTR_TARGETS_UPDATED"; //$NON-NLS-1$
+	public static final String ATTR_TARGETS_UPDATED = IAntLaunchConstants.ATTR_TARGETS_UPDATED;
 	
 	/**
 	 * Map attribute indicating the Ant properties to be defined during the
 	 * build. Default value is <code>null</code> which indicates no additional
 	 * properties will be defined.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_PROPERTIES}
 	 */
-	public static final String ATTR_ANT_PROPERTIES = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_PROPERTIES"; //$NON-NLS-1$					
+	public static final String ATTR_ANT_PROPERTIES = IAntLaunchConstants.ATTR_ANT_PROPERTIES;					
 	
 	/**
 	 * String attribute indicating the Ant targets to execute. Default value is
 	 * <code>null</code> which indicates that no additional property files
 	 * will be defined. Format is a comma separated listing of property files.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_ANT_PROPERTY_FILES}
 	 */
-	public static final String ATTR_ANT_PROPERTY_FILES = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_PROPERTY_FILES"; //$NON-NLS-1$
+	public static final String ATTR_ANT_PROPERTY_FILES = IAntLaunchConstants.ATTR_ANT_PROPERTY_FILES;
 	
 	/**
 	 * Boolean attribute indicating whether or not internal targets (targets with no
 	 * description) should be hidden from the user in the launch configuration dialog.
 	 * Default value is <code>false</code> which indicates that all targets will be
 	 * displayed.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_HIDE_INTERNAL_TARGETS}
 	 */
-	public static final String ATTR_HIDE_INTERNAL_TARGETS = IExternalToolConstants.PLUGIN_ID + ".ATTR_HIDE_INTERNAL_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_HIDE_INTERNAL_TARGETS = IAntLaunchConstants.ATTR_HIDE_INTERNAL_TARGETS;
 	
 	/**
 	 * Integer attribute indicating which column targets should be sorted on. A
 	 * value of 0 indicates target name, 1 indicates target description, and -1
 	 * indicates no sort. Default value is -1.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_SORT_TARGETS}
 	 */
-	public static final String ATTR_SORT_TARGETS = IExternalToolConstants.PLUGIN_ID + "ATTR_SORT_TARGETS"; //$NON-NLS-1$
+	public static final String ATTR_SORT_TARGETS = IAntLaunchConstants.ATTR_SORT_TARGETS;
 
 	/**
 	 * Boolean attribute indicating if the default VM install should be used for the separate JRE build
 	 * Default value is <code>false</code> for backwards compatibility
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ATTR_DEFAULT_VM_INSTALL}
 	 */
-	public static final String ATTR_DEFAULT_VM_INSTALL = AntUIPlugin.PI_ANTUI + ".DEFAULT_VM_INSTALL"; //$NON-NLS-1$
+	public static final String ATTR_DEFAULT_VM_INSTALL = IAntLaunchConstants.ATTR_DEFAULT_VM_INSTALL;
 
 	/**
 	 * Identifier for Ant processes (value <code>org.eclipse.ant.ui.antProcess</code>). This identifier is
 	 * set as the value for the <code>IProcess.ATTR_PROCESS_TYPE</code>
 	 * attribute in processes created by the Ant launch delegate.
+	 * 
+	 * @deprecated use {@link IAntLaunchConstants#ID_ANT_PROCESS_TYPE}
 	 */
-	public static final String ID_ANT_PROCESS_TYPE = "org.eclipse.ant.ui.antProcess"; //$NON-NLS-1$
+	public static final String ID_ANT_PROCESS_TYPE = IAntLaunchConstants.ID_ANT_PROCESS_TYPE;
 }
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/AntDebugState.java b/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/AntDebugState.java
deleted file mode 100644
index aa495fb..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/AntDebugState.java	
+++ /dev/null
@@ -1,529 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.antsupport.logger.util;
-
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Stack;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.MacroInstance;
-
-public class AntDebugState {
-    
-    private static final String fgAntTaskName= "ant"; //$NON-NLS-1$
-    private static final String fgAntCallTaskName= "antcall"; //$NON-NLS-1$
-    
-	private IDebugBuildLogger fLogger;
-	private Stack fTasks= new Stack();
-	private Map fTaskToProxies= new HashMap();
-	private Task fCurrentTask;
-	private Task fStepOverTask;
-	private Task fStepIntoTask;
-	private Task fLastTaskFinished;
-    
-	//properties set before execution
-    private Map fInitialProperties= null;
-	private Map fProperties= null;
-    
-    private Map fProjectToTargetNames= null;
-    private Map fProjectToMapOfTargetToBuildSequence= null;
-    private Stack fTargetsToExecute= new Stack();
-    private Stack fTargetsExecuting= new Stack();
-	
-	private boolean fConsiderTargetBreakpoints= false;
-	private boolean fShouldSuspend;
-	private boolean fClientSuspend= false;
-	private boolean fStepIntoSuspend= false;
-	private boolean fIsAfterTaskEvent= false;
-	
-	
-	public AntDebugState(IDebugBuildLogger logger) {
-		fLogger= logger;
-	}
-
-	public void waitIfSuspended() {
-		fLogger.waitIfSuspended();
-	}
-
-	public Task getLastTaskFinished() {
-		return fLastTaskFinished;
-	}
-
-	private void setLastTaskFinished(Task lastTaskFinished) {
-		fLastTaskFinished= lastTaskFinished;
-
-	}
-
-	public Task getCurrentTask() {
-		return fCurrentTask;
-	}
-
-	public void setCurrentTask(Task currentTask) {
-		fCurrentTask= currentTask;
-
-	}
-
-	private Map getInitialProperties() {
-		return fInitialProperties;
-	}
-
-	public Task getStepOverTask() {
-		return fStepOverTask;
-	}
-
-	public void setStepOverTask(Task stepOverTask) {
-		fStepOverTask= stepOverTask;
-
-	}
-
-	private boolean considerTargetBreakpoints() {
-		return fConsiderTargetBreakpoints;
-	}
-
-	private void setConsiderTargetBreakpoints(boolean considerTargetBreakpoints) {
-		fConsiderTargetBreakpoints= considerTargetBreakpoints;
-	}
-
-	private Stack getTasks() {
-		return fTasks;
-	}
-	
-	public void setShouldSuspend(boolean shouldSuspend) {
-		fShouldSuspend= shouldSuspend;
-	}
-
-	public boolean shouldSuspend() {
-		return fShouldSuspend;
-	}
-
-	private Map getTargetToBuildSequence(Project project) {
-		return (Map) fProjectToMapOfTargetToBuildSequence.get(project);
-	}
-
-	public void setTargetToExecute(Target target) {
-        if (target == null) {
-            fTargetsToExecute.pop();
-        } else {
-            fTargetsToExecute.push(target);
-        }
-	}
-
-	public void setTargetExecuting(Target target) {
-        if (target == null) {
-            fTargetsExecuting.pop();
-        } else {
-            fTargetsExecuting.push(target);
-        }
-	}
-
-	private Target getTargetToExecute() {
-	    if (fTargetsToExecute.isEmpty()) {
-            return null;
-        }
-		return (Target) fTargetsToExecute.peek();
-	}
-	
-	private Target getTargetExecuting() {
-        if (fTargetsExecuting.isEmpty()) {
-            return null;
-        }
-		return (Target) fTargetsExecuting.peek();
-	}
-
-	public boolean isStepIntoSuspend() {
-		return isAfterTaskEvent() && fStepIntoSuspend;
-	}
-
-	public void setStepIntoSuspend(boolean stepIntoSuspend) {
-		fStepIntoSuspend = stepIntoSuspend;
-	}
-
-	public boolean isClientSuspend() {
-		return fClientSuspend;
-	}
-
-	public void setClientSuspend(boolean clientSuspend) {
-		fClientSuspend = clientSuspend;
-	}
-
-	public Task getStepIntoTask() {
-		return fStepIntoTask;
-	}
-
-	public void setStepIntoTask(Task stepIntoTask) {
-		fStepIntoTask = stepIntoTask;
-	}
-	
-	public void resume() {
-		fLogger.notifyAll();
-	}
-
-	public Map getProperties() {
-		return fProperties;
-	}
-	
-	public Location getBreakpointLocation() {
-		if (isAfterTaskEvent() && getCurrentTask() != null) {
-			return getCurrentTask().getLocation();
-		}
-		if (considerTargetBreakpoints()) {
-	        Target targetExecuting= getTargetExecuting();
-	        if (targetExecuting != null) {
-                return getLocation(targetExecuting);      
-            }
-		}
-		return null;
-	}
-
-	private boolean isAfterTaskEvent() {
-		return fIsAfterTaskEvent;
-	}
-
-	private void setAfterTaskEvent(boolean isAfterTaskEvent) {
-		fIsAfterTaskEvent = isAfterTaskEvent;
-	}
-	
-	public void taskStarted(BuildEvent event) {
-		setAfterTaskEvent(true);
-		if (getInitialProperties() == null) {//implicit or top level target does not fire targetStarted()
-			fInitialProperties= event.getProject().getProperties();
-		}
-		
-		setCurrentTask(event.getTask());
-		setConsiderTargetBreakpoints(false);
-		if (!getTasks().isEmpty()) {
-			//cache the parent task proxy as when that task is started or finished the
-			//proxy is not yet available or is nulled out
-			Task parentTask = (Task) getTasks().peek();
-			Object proxy = parentTask.getRuntimeConfigurableWrapper().getProxy();
-			if (proxy != null) {
-				fTaskToProxies.put(parentTask, proxy);
-			}
-		}
-		getTasks().push(getCurrentTask());
-		waitIfSuspended();
-	}
-	
-
-    public void taskFinished() {
-    	Task lastTask= (Task)getTasks().pop();
-        setLastTaskFinished(lastTask);
-        setCurrentTask(null);
-        String taskName= lastTask.getTaskName();
-       
-        if (getStepOverTask() != null) {
-        	if ((fgAntCallTaskName.equals(taskName) || fgAntTaskName.equals(taskName)) && (!fgAntCallTaskName.equals(getStepOverTask().getTaskName()) && !fgAntTaskName.equals(getStepOverTask().getTaskName()))) {
-        		setShouldSuspend(true);
-        	} else if (fTaskToProxies.remove(lastTask) instanceof MacroInstance) {
-        		setShouldSuspend(true);
-        	}
-        }
-        waitIfSuspended();
-    }
-
-    public void stepOver() {
-       setStepOverTask(getCurrentTask());
-        if (getCurrentTask() == null) {
-            //stepping over target breakpoint
-           setShouldSuspend(true);
-        }
-        resume();
-    }
-
-    public void targetStarted(BuildEvent event) {
-		setAfterTaskEvent(false);
-        Project eventProject = event.getProject();
-        if (getInitialProperties() == null) {
-            fInitialProperties= eventProject.getProperties();
-        }
-        if (fProjectToTargetNames.get(eventProject) == null) {
-            Object ref= eventProject.getReference("eclipse.ant.targetVector"); //$NON-NLS-1$
-            if (ref != null) {
-                fProjectToTargetNames.put(eventProject, ref);
-                Map targetToBuildSequence= new HashMap();
-                setTargetToExecute(initializeBuildSequenceInformation(event, targetToBuildSequence));
-                fProjectToMapOfTargetToBuildSequence.put(eventProject, targetToBuildSequence);
-            }
-        }
-        
-        setTargetExecuting(event.getTarget());
-        if (event.getTarget().equals(getTargetToExecute())) {
-            //the dependencies of the target to execute have been met
-            //prepare for the next target
-            Vector targets= (Vector) fProjectToTargetNames.get(eventProject);
-            if (!targets.isEmpty()) {
-                setTargetToExecute((Target) eventProject.getTargets().get(targets.remove(0)));
-            } else {
-                setTargetToExecute(null);
-            }
-        }
-        setConsiderTargetBreakpoints(true);
-    }
-
-	public int getLineNumber(Location location) {
-	    try { //succeeds with Ant newer than 1.6
-	        return location.getLineNumber();
-	    } catch (NoSuchMethodError e) {
-	        //Ant before 1.6
-	        String locationString= location.toString();
-	        if (locationString.length() == 0) {
-	            return 0;
-	        }
-	        //filename: lineNumber: ("c:\buildfile.xml: 12: ")
-	        int lastIndex= locationString.lastIndexOf(':');
-	        int index =locationString.lastIndexOf(':', lastIndex - 1);
-	        if (index != -1) {
-	            try {
-	                return Integer.parseInt(locationString.substring(index+1, lastIndex));
-	            } catch (NumberFormatException nfe) {
-	                return 0;
-	            }
-	        }
-	        return 0;
-	    }
-	}
-
-	public static Location getLocation(Target target) {
-	    try {//succeeds with Ant newer than 1.6.2
-	        return target.getLocation();
-	    } catch (NoSuchMethodError e) {
-	        return Location.UNKNOWN_LOCATION;
-	    }
-	}
-
-	public String getFileName(Location location) {
-	    try {//succeeds with Ant newer than 1.6
-	        return location.getFileName();
-	    } catch (NoSuchMethodError e) {
-	        //Ant before 1.6
-	        String locationString= location.toString();
-	        if (locationString.length() == 0) {
-	            return null;
-	        }
-	        //filename: lineNumber: ("c:\buildfile.xml: 12: ")          
-	        int lastIndex= locationString.lastIndexOf(':');
-	        int index =locationString.lastIndexOf(':', lastIndex-1);
-	        if (index == -1) {
-	            index= lastIndex; //only the filename is known
-	        }
-	        if (index != -1) {
-	        //bug 84403
-	            //if (locationString.startsWith("file:")) {
-	              //  return FileUtils.newFileUtils().fromURI(locationString);
-	            //}
-	            //remove file:
-	            return locationString.substring(5, index);
-	        }
-	        return null;
-	    }
-	}
-
-	private void appendToStack(StringBuffer stackRepresentation, String targetName, String taskName, Location location) {
-	    stackRepresentation.append(targetName);
-	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	    stackRepresentation.append(taskName);
-	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	    
-	    stackRepresentation.append(getFileName(location));
-	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	    stackRepresentation.append(getLineNumber(location));
-	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	}
-
-	public void marshalStack(StringBuffer stackRepresentation) {
-		Stack tasks= getTasks();
-		
-	    stackRepresentation.append(DebugMessageIds.STACK);
-	    stackRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	    
-		Target targetToExecute= getTargetToExecute();
-		Target targetExecuting= getTargetExecuting();
-      
-        Project projectExecuting= null;
-        if (targetExecuting != null) {
-            projectExecuting= targetExecuting.getProject();
-        } else { //no target...must be a task
-            Task task= (Task) tasks.peek();
-            projectExecuting= task.getProject();
-        }
-        
-		if (!isAfterTaskEvent()) {
-			appendToStack(stackRepresentation, targetExecuting.getName(), "", getLocation(targetExecuting)); //$NON-NLS-1$
-		}
-		for (int i = tasks.size() - 1; i >= 0 ; i--) {
-			Task task= (Task) tasks.get(i);
-            if (task.getProject() == projectExecuting) {
-                appendToStack(stackRepresentation, task.getOwningTarget().getName(), task.getTaskName(), task.getLocation());
-            } else {
-                //sub build target dependencies
-                String targetName= task.getOwningTarget().getName();
-                if (targetName != null && targetName.length() != 0) { //skip for implicit target
-                    Iterator itr= fTargetsToExecute.iterator();
-                    while (itr.hasNext()) {
-                        Target target= (Target) itr.next();
-                        if (target.getProject() != projectExecuting) {
-                        	targetToExecute= target;
-                            continue;
-                        }
-                        marshalTargetDependancyStack(stackRepresentation, target, targetExecuting);
-                    }
-                }
-                projectExecuting= task.getProject();
-                targetExecuting= task.getOwningTarget();
-                appendToStack(stackRepresentation, targetExecuting.getName(), task.getTaskName(), task.getLocation());
-            }
-		}
-
-		//target dependency stack 
-		marshalTargetDependancyStack(stackRepresentation, targetToExecute, targetExecuting);
-	}
-
-    private void marshalTargetDependancyStack(StringBuffer stackRepresentation, Target targetToExecute, Target targetExecuting) {
-        if (targetToExecute != null) {
-	     	Vector buildSequence= (Vector) getTargetToBuildSequence(targetToExecute.getProject()).get(targetToExecute);
-	     	int startIndex= buildSequence.indexOf(targetExecuting) + 1;
-	     	int dependancyStackDepth= buildSequence.indexOf(targetToExecute);
-	     	
-	     	Target stackTarget;
-	     	for (int i = startIndex; i <= dependancyStackDepth; i++) {
-	     		stackTarget= (Target) buildSequence.get(i);
-	            if (stackTarget.dependsOn(targetExecuting.getName())) {
-	     		    appendToStack(stackRepresentation, stackTarget.getName(), "", getLocation(stackTarget)); //$NON-NLS-1$
-	            }
-	     	}
-	     }
-    }
-
-	public void marshallProperties(StringBuffer propertiesRepresentation, boolean escapeLineSep) {
-		if (getTasks().isEmpty()) {
-			return;
-		}
-	    propertiesRepresentation.append(DebugMessageIds.PROPERTIES);
-	    propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-		
-		Project project= ((Task)getTasks().peek()).getProject();
-		Map lastProperties= getProperties(); 
-		
-	    Map currentProperties= project.getProperties();
-	    if (lastProperties != null && currentProperties.size() == lastProperties.size()) {
-	        //no new properties
-	        return;
-	    }
-	    
-		Map initialProperties= getInitialProperties();
-	    Map currentUserProperties= project.getUserProperties();
-	    Iterator iter= currentProperties.keySet().iterator();
-	    String propertyName;
-		String originalPropertyName;
-	    String propertyValue;
-	    while (iter.hasNext()) {
-	        propertyName = (String) iter.next();
-			originalPropertyName= propertyName;
-	        if (lastProperties == null || lastProperties.get(propertyName) == null) { //new property
-				if (escapeLineSep) {
-					propertyName= escapeLineSeparator(propertyName);
-				}
-	            propertiesRepresentation.append(propertyName.length());
-	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	            propertiesRepresentation.append(propertyName);
-	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	            propertyValue= (String) currentProperties.get(originalPropertyName);
-				if (escapeLineSep) {
-					propertyValue= escapeLineSeparator(propertyValue);
-				}
-	            propertiesRepresentation.append(propertyValue.length());
-	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-				propertiesRepresentation.append(propertyValue);
-	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	            propertiesRepresentation.append(getPropertyType(initialProperties, currentUserProperties, originalPropertyName));
-	            propertiesRepresentation.append(DebugMessageIds.MESSAGE_DELIMITER);
-	        }
-	    }
-	    
-	    propertiesRepresentation.deleteCharAt(propertiesRepresentation.length() - 1);
-		fProperties= currentProperties;
-	}
-
-	private int getPropertyType(Map initialProperties, Map currentUserProperties, String propertyName) {
-		if (initialProperties.get(propertyName) != null) { //properties set before the start of the build
-		    if (currentUserProperties.get(propertyName) == null) {
-		        return DebugMessageIds.PROPERTY_SYSTEM;
-		    } 
-			return DebugMessageIds.PROPERTY_USER;
-		} else if (currentUserProperties.get(propertyName) == null){
-		    return DebugMessageIds.PROPERTY_RUNTIME;
-		} else {
-		    return DebugMessageIds.PROPERTY_USER;
-		}
-	}
-
-	private String escapeLineSeparator(String stringToEscape) {
-		if (!(stringToEscape.indexOf('\r') != -1 || stringToEscape.indexOf('\n') != -1 || stringToEscape.indexOf("\\r") != -1 || stringToEscape.indexOf("\\n") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$
-			return stringToEscape;
-		}
-		StringBuffer escapedValue= new StringBuffer(stringToEscape);		
-		for (int i= 0; i < escapedValue.length(); i++) {
-			switch (escapedValue.charAt(i)) {
-			case '\r':
-				escapedValue.replace(i, i+1, "\\r"); //$NON-NLS-1$
-				i++;
-				break;
-			case '\n':
-				escapedValue.replace(i, i+1, "\\n"); //$NON-NLS-1$
-				i++;
-				break;
-			case '\\':
-				if (escapedValue.charAt(i + 1) == 'r' || escapedValue.charAt(i + 1) == 'n') {
-					escapedValue.replace(i, i+1, "\\\\"); //$NON-NLS-1$
-					i++;
-				}
-				break;
-			default:
-				break;
-			}
-		}
-
-		return escapedValue.toString();
-	}
-
-	private Target initializeBuildSequenceInformation(BuildEvent event, Map targetToBuildSequence) {
-	    Project antProject= event.getProject();
-	    Vector targets= (Vector) antProject.getReference("eclipse.ant.targetVector"); //$NON-NLS-1$
-        if (targets == null) {
-            return null;
-        }
-	    Iterator itr= targets.iterator();
-	    Hashtable allTargets= antProject.getTargets();
-	    String targetName;
-	    Vector sortedTargets;
-	    while (itr.hasNext()) {
-	        targetName= (String) itr.next();
-	        sortedTargets= antProject.topoSort(targetName, allTargets);
-	        targetToBuildSequence.put(allTargets.get(targetName), sortedTargets);
-	    }
-	    //the target to execute
-	    return (Target) allTargets.get(targets.remove(0));
-	}
-    
-    public void buildStarted() {
-        fProjectToTargetNames= new HashMap();
-        fProjectToMapOfTargetToBuildSequence= new HashMap();
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/DebugMessageIds.java b/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/DebugMessageIds.java
deleted file mode 100644
index 46b318b..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/DebugMessageIds.java	
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger.util;
-
-
-public class DebugMessageIds {
-	
-	public final static String MESSAGE_DELIMITER= ","; //$NON-NLS-1$
-	
-	public final static String BUILD_STARTED=   "build_started"; //$NON-NLS-1$
-	public final static String TARGET_STARTED= "target_started"; //$NON-NLS-1$
-	public final static String TARGET_FINISHED= "target_finished"; //$NON-NLS-1$
-	public final static String TASK_STARTED= "task_started"; //$NON-NLS-1$
-	public final static String TASK_FINISHED= "task_finished"; //$NON-NLS-1$
-	
-	public final static String STEP= "step"; //$NON-NLS-1$
-	public final static String STEP_OVER= "step_over"; //$NON-NLS-1$
-	public final static String STEP_INTO= "step_into"; //$NON-NLS-1$
-	
-	public final static String TERMINATE= "terminate"; //$NON-NLS-1$
-	public final static String TERMINATED= "terminated"; //$NON-NLS-1$
-	public final static String SUSPEND= "suspend"; //$NON-NLS-1$
-	public final static String SUSPENDED= "suspended"; //$NON-NLS-1$
-	public final static String RESUME= "resume"; //$NON-NLS-1$
-	
-	public final static String STACK= "stack"; //$NON-NLS-1$
-	
-	public final static String ADD_BREAKPOINT= "add"; //$NON-NLS-1$
-	public final static String REMOVE_BREAKPOINT= "remove"; //$NON-NLS-1$
-	
-	public final static String CLIENT_REQUEST= "client"; //$NON-NLS-1$
-	public final static String BREAKPOINT= "breakpoint"; //$NON-NLS-1$
-	
-	public final static String PROPERTIES= "prop"; //$NON-NLS-1$
-	public final static String PROPERTY_VALUE= "value"; //$NON-NLS-1$
-	public final static int PROPERTY_USER= 0;
-	public final static int PROPERTY_SYSTEM= 1;
-	public final static int PROPERTY_RUNTIME= 2;
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/IDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/IDebugBuildLogger.java
deleted file mode 100644
index 11eb6b9..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Common Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/util/IDebugBuildLogger.java	
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger.util;
-
-
-public interface IDebugBuildLogger {
-
-	/**
-	 * Requests to suspend the build if the current debug state
-	 * indicates that suspension is required.
-	 */
-    public abstract void waitIfSuspended();
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ant.ui/META-INF/MANIFEST.MF
index 649a5b4..79bb531 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ant.ui/META-INF/MANIFEST.MF
@@ -2,14 +2,13 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ant.ui; singleton:=true
-Bundle-Version: 3.4.2.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Activator: org.eclipse.ant.internal.ui.AntUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ant.internal.ui;x-internal:=true,
  org.eclipse.ant.internal.ui.console;x-internal:=true,
  org.eclipse.ant.internal.ui.datatransfer;x-internal:=true,
- org.eclipse.ant.internal.ui.debug;x-internal:=true,
  org.eclipse.ant.internal.ui.debug.model;x-internal:=true,
  org.eclipse.ant.internal.ui.dtd;x-internal:=true,
  org.eclipse.ant.internal.ui.dtd.schema;x-internal:=true,
@@ -34,15 +33,15 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)";resolution:=op
  org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
  org.eclipse.ui.editors;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.apache.ant;bundle-version="1.7.0",
- org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.ant.core;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.ui.externaltools;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.ui.externaltools;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.console;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.debug.ui;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)",
@@ -51,7 +50,9 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)";resolution:=op
  org.eclipse.team.core;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jdt.junit;bundle-version="3.5.0"
+ org.eclipse.jdt.junit;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ant.launching;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.core.externaltools;bundle-version="[1.0.0,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Import-Package: com.ibm.icu.text
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityException.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityException.java
deleted file mode 100644
index ebf9baf..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityException.java	
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-/**
- * A security exception that is thrown by the AntSecurityManager if
- * an Ant task in some way attempts to halt or exit the Java Virtual Machine.
- * 
- * @since 2.1
- */
-public class AntSecurityException extends SecurityException {
-
-	private static final long serialVersionUID = 1L;
-
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityManager.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityManager.java
deleted file mode 100644
index 107a6cb..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/AntSecurityManager.java	
+++ /dev/null
@@ -1,371 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-
-import java.io.FileDescriptor;
-import java.net.InetAddress;
-import java.net.SocketPermission;
-import java.security.Permission;
-import java.util.PropertyPermission;
-
-/**
- * A security manager that always throws an <code>AntSecurityException</code>
- * if the calling thread attempts to cause the Java Virtual Machine to 
- * exit/halt or if the restricted thread attempts to set a System property.
- * Otherwise this manager just delegates to the pre-existing manager
- * passed in the constructor or mimics the default security manager behavior
- */
-public class AntSecurityManager extends SecurityManager {
-
-	private SecurityManager fSecurityManager= null;
-	private Thread fRestrictedThread= null;
-	//ensure that the PropertyPermission class is loaded before we 
-	//start checking permissions: bug 85908
-	private static final PropertyPermission fgPropertyPermission= new PropertyPermission("*", "write"); //$NON-NLS-1$ //$NON-NLS-2$
-	
-	private boolean fAllowSettingSystemProperties= true;
-	
-	public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread, boolean allowSettingProperties) {
-		fSecurityManager= securityManager;
-		fRestrictedThread= restrictedThread;
-		fAllowSettingSystemProperties= allowSettingProperties;
-	}
-	
-	public AntSecurityManager(SecurityManager securityManager, Thread restrictedThread) {
-		this(securityManager, restrictedThread, true);
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkExit(int)
-	 */
-	public void checkExit(int status) {
-		//no exit allowed from the restricted thread...System.exit is being called
-		//by some ant task...disallow the exit
-		if (Thread.currentThread() == fRestrictedThread) {
-			throw new AntSecurityException();
-		}
-		if (fSecurityManager != null) {
-			fSecurityManager.checkExit(status);
-		}
-	}
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkAccept(java.lang.String, int)
-	 */
-	public void checkAccept(String host, int port) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkAccept(host, port);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkAccess(java.lang.Thread)
-	 */
-	public void checkAccess(Thread t) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkAccess(t);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
-	 */
-	public void checkAccess(ThreadGroup g) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkAccess(g);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkAwtEventQueueAccess()
-	 */
-	public void checkAwtEventQueueAccess() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkAwtEventQueueAccess();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkConnect(java.lang.String, int, java.lang.Object)
-	 */
-	public void checkConnect(String host, int port, Object context) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkConnect(host, port, context);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkConnect(java.lang.String, int)
-	 */
-	public void checkConnect(String host, int port) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkConnect(host, port);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkCreateClassLoader()
-	 */
-	public void checkCreateClassLoader() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkCreateClassLoader();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkDelete(java.lang.String)
-	 */
-	public void checkDelete(String file) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkDelete(file);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkExec(java.lang.String)
-	 */
-	public void checkExec(String cmd) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkExec(cmd);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkLink(java.lang.String)
-	 */
-	public void checkLink(String lib) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkLink(lib);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkListen(int)
-	 */
-	public void checkListen(int port) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkListen(port);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkMemberAccess(java.lang.Class, int)
-	 */
-	public void checkMemberAccess(Class clazz, int which) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkMemberAccess(clazz, which);
-		}
-	}
-
-	/**
-	 * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress, byte)
-	 * @deprecated
-	 */
-	public void checkMulticast(InetAddress maddr, byte ttl) {
-		if (fSecurityManager != null) {
-			String host = maddr.getHostAddress();
-			if (!host.startsWith("[") && host.indexOf(':') != -1) { //$NON-NLS-1$
-	   			host = "[" + host + "]"; //$NON-NLS-1$ //$NON-NLS-2$
-			}
-	    	checkPermission(new SocketPermission(host, "accept,connect")); //$NON-NLS-1$
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkMulticast(java.net.InetAddress)
-	 */
-	public void checkMulticast(InetAddress maddr) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkMulticast(maddr);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPackageAccess(java.lang.String)
-	 */
-	public void checkPackageAccess(String pkg) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPackageAccess(pkg);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPackageDefinition(java.lang.String)
-	 */
-	public void checkPackageDefinition(String pkg) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPackageDefinition(pkg);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPermission(java.security.Permission, java.lang.Object)
-	 */
-	public void checkPermission(Permission perm, Object context) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPermission(perm, context);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPermission(java.security.Permission)
-	 */
-	public void checkPermission(Permission perm) {
-		if (!fAllowSettingSystemProperties && fgPropertyPermission.implies(perm) && fRestrictedThread == Thread.currentThread()) {
-			//attempting to write a system property
-			throw new AntSecurityException();
-		}
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPermission(perm);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPrintJobAccess()
-	 */
-	public void checkPrintJobAccess() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPrintJobAccess();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPropertiesAccess()
-	 */
-	public void checkPropertiesAccess() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPropertiesAccess();
-		}
-		super.checkPropertiesAccess();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
-	 */
-	public void checkPropertyAccess(String key) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkPropertyAccess(key);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkRead(java.io.FileDescriptor)
-	 */
-	public void checkRead(FileDescriptor fd) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkRead(fd);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkRead(java.lang.String, java.lang.Object)
-	 */
-	public void checkRead(String file, Object context) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkRead(file, context);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkRead(java.lang.String)
-	 */
-	public void checkRead(String file) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkRead(file);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkSecurityAccess(java.lang.String)
-	 */
-	public void checkSecurityAccess(String target) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkSecurityAccess(target);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkSetFactory()
-	 */
-	public void checkSetFactory() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkSetFactory();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkSystemClipboardAccess()
-	 */
-	public void checkSystemClipboardAccess() {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkSystemClipboardAccess();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkTopLevelWindow(java.lang.Object)
-	 */
-	public boolean checkTopLevelWindow(Object window) {
-		if (fSecurityManager != null) {
-			return fSecurityManager.checkTopLevelWindow(window);
-		}
-		return super.checkTopLevelWindow(window);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
-	 */
-	public void checkWrite(FileDescriptor fd) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkWrite(fd);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#checkWrite(java.lang.String)
-	 */
-	public void checkWrite(String file) {
-		if (fSecurityManager != null) {
-			fSecurityManager.checkWrite(file);
-		}
-	}
-
-	/**
-	 * @see java.lang.SecurityManager#getInCheck()
-	 * @deprecated
-	 */
-	public boolean getInCheck() {
-		if (fSecurityManager != null) {
-			return fSecurityManager.getInCheck();
-		}
-		return super.getInCheck();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#getSecurityContext()
-	 */
-	public Object getSecurityContext() {
-		if (fSecurityManager != null) {
-			return fSecurityManager.getSecurityContext();
-		}
-		return super.getSecurityContext();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.SecurityManager#getThreadGroup()
-	 */
-	public ThreadGroup getThreadGroup() {
-		if (fSecurityManager != null) {
-			fSecurityManager.getThreadGroup();
-		}
-		return super.getThreadGroup();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/DemuxInputStreamSetter.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/DemuxInputStreamSetter.java
deleted file mode 100644
index f1cacd9..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/DemuxInputStreamSetter.java	
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-
-import org.apache.tools.ant.DemuxInputStream;
-import org.apache.tools.ant.Project;
-
-/**
- * This class exists so that the Ant integration has backwards compatibility
- * with Ant releases previous to 1.6. DemuxInputStream is a new class to Ant 1.6.
- */
-class DemuxInputStreamSetter {
-
-	protected void remapSystemIn(Project project) {
-		System.setIn(new DemuxInputStream(project));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseDefaultExecutor.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseDefaultExecutor.java
deleted file mode 100644
index bfd8f61..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseDefaultExecutor.java	
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Executor;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.helper.DefaultExecutor;
-
-public class EclipseDefaultExecutor extends DefaultExecutor {
-
-    private static final EclipseSingleCheckExecutor SUB_EXECUTOR = new EclipseSingleCheckExecutor();
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
-     */
-    public void executeTargets(Project project, String[] targetNames) throws BuildException {
-        Vector v= new Vector();
-        v.addAll(Arrays.asList(targetNames));
-        project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
-        super.executeTargets(project, targetNames);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
-     */
-    public Executor getSubProjectExecutor() {
-       return SUB_EXECUTOR;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseSingleCheckExecutor.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseSingleCheckExecutor.java
deleted file mode 100644
index 201bb96..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/EclipseSingleCheckExecutor.java	
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-import java.util.Arrays;
-import java.util.Vector;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Executor;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.helper.SingleCheckExecutor;
-
-public class EclipseSingleCheckExecutor extends SingleCheckExecutor {
-
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Executor#executeTargets(org.apache.tools.ant.Project, java.lang.String[])
-     */
-    public void executeTargets(Project project, String[] targetNames) throws BuildException {
-        Vector v= new Vector();
-        v.addAll(Arrays.asList(targetNames));
-        project.addReference("eclipse.ant.targetVector", v); //$NON-NLS-1$
-        super.executeTargets(project, targetNames);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.Executor#getSubProjectExecutor()
-     */
-    public Executor getSubProjectExecutor() {
-        return this;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/ExecutorSetter.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/ExecutorSetter.java
deleted file mode 100644
index 3a406e6..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/ExecutorSetter.java	
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-import org.apache.tools.ant.Executor;
-import org.apache.tools.ant.Project;
-
-/**
- * This class exists so that the Ant integration has backwards compatibility
- * with Ant releases previous to 1.6.3. Executors are a new feature of Ant 1.6.3.
- */
-public class ExecutorSetter {
-
-    protected void setExecutor(Project project) {
-        Executor executor= new EclipseDefaultExecutor();
-        project.setExecutor(executor);
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InputHandlerSetter.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InputHandlerSetter.java
deleted file mode 100644
index 836e2a3..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InputHandlerSetter.java	
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-
-import java.text.MessageFormat; // can't use ICU, used by ant
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.input.DefaultInputHandler;
-import org.apache.tools.ant.input.InputHandler;
-
-/**
- * This class exists so that the Ant integration has backwards compatibility
- * with Ant releases previous to 1.5. InputHandlers are a new feature of Ant 1.5.
- */
-class InputHandlerSetter {
-
-	protected void setInputHandler(Project project, String inputHandlerClassname) {
-		InputHandler handler = null;
-		if (inputHandlerClassname == null) {
-			handler = new DefaultInputHandler();
-		} else {
-			try {
-				handler = (InputHandler)(Class.forName(inputHandlerClassname).newInstance());
-			} catch (ClassCastException e) {
-				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5"), new String[]{inputHandlerClassname}); //$NON-NLS-1$
-				throw new BuildException(msg, e);
-			} catch (Exception e) {
-				String msg = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6"), new String[]{inputHandlerClassname, e.getClass().getName()}); //$NON-NLS-1$
-				throw new BuildException(msg, e);
-			}
-		}
-		project.setInputHandler(handler);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java
deleted file mode 100644
index 3dacffc..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/InternalAntRunner.java	
+++ /dev/null
@@ -1,1232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * Portions Copyright  2000-2005 The Apache Software Foundation
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Apache Software License v2.0 which 
- * accompanies this distribution and is available at 
- * http://www.apache.org/licenses/LICENSE-2.0.
- * 
- * Contributors:
- *     IBM Corporation - derived implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.antsupport;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.text.MessageFormat; // can't use ICU, used by ant build
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.apache.tools.ant.AntTypeDefinition;
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.BuildListener;
-import org.apache.tools.ant.BuildLogger;
-import org.apache.tools.ant.ComponentHelper;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.DemuxOutputStream;
-import org.apache.tools.ant.Diagnostics;
-import org.apache.tools.ant.Main;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.TaskAdapter;
-import org.apache.tools.ant.util.FileUtils;
-import org.eclipse.ant.internal.core.IAntCoreConstants;
-import org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger;
-
-/**
- * Eclipse application entry point into Ant in a separate VM. Derived from the original Ant Main class
- * to ensure that the functionality is equivalent when running in the platform.
- */
-public class InternalAntRunner {
-
-	/**
-	 *  Message priority for project help messages. 
-	 */
-	public static final int MSG_PROJECT_HELP= Project.MSG_DEBUG + 1;
-	
-	private List buildListeners;
-
-	private String buildFileLocation;
-
-	/** 
-	 * Targets we want to run.
-	 */
-	private Vector targets;
-
-	private Map userProperties;
-	
-	private Project currentProject;
-	
-	private BuildLogger buildLogger= null;
-	
-	private Map eclipseSpecifiedTasks;
-	private Map eclipseSpecifiedTypes;
-	
-	/**
-	 * Cache of the Ant version number when it has been loaded
-	 */
-	private String antVersionNumber= null;
-
-	/** Our current message output status. Follows Project.MSG_XXX */
-	private int messageOutputLevel = Project.MSG_INFO;
-
-	/** Indicates whether output to the log is to be unadorned. */
-	private boolean emacsMode = false;
-
-	/** Indicates we should only parse and display the project help information */
-	private boolean projectHelp = false;
-
-	/** Stream that we are using for logging */
-	private PrintStream out = System.out;
-
-	/** Stream that we are using for logging error messages */
-	private PrintStream err = System.err;
-
-	/**
-	 * The Ant logger class. There may be only one logger. It will have the
-	 * right to use the 'out' PrintStream. The class must implement the BuildLogger
-	 * interface.  An empty String indicates that no logger is to be used.  A <code>null</code>
-	 * name indicates that the <code>org.apache.tools.ant.DefaultLogger</code> will be used.
-	 */
-	private String loggerClassname = null;
-
-	/** Extra arguments to be parsed as command line arguments. */
-	private String[] extraArguments = null;
-	
-	private boolean scriptExecuted= false;
-	
-	private List propertyFiles= new ArrayList();
-	
-	/**
-     * The Ant InputHandler class. There may be only one input handler.
-     */
-    private String inputHandlerClassname = null;
-    
-    /** 
-     * Indicates whether to execute all targets that 
-     * do not depend on failed targets
-     * @since Ant 1.6.0
-     */
-    private boolean keepGoing= false;
-
-    /** 
-     * Indicates whether this build is to support interactive input 
-     * @since Ant 1.6.0
-     */
-    private boolean allowInput = true;
-    
-    private String fEarlyErrorMessage= null;
-    
-    public static void main(String[] args) {
-    	try {
-    		new InternalAntRunner().run(getArrayList(args));
-    	} catch (Throwable t) {
-    	    t.printStackTrace();
-    		System.exit(1);
-    	}
-		System.exit(0);
-	}
-
-	private void addBuildListeners(Project project) {
-		String className= null;
-		try {
-			BuildLogger logger= createLogger();
-			if (logger != null) {
-				project.addBuildListener(logger);
-			}
-			if (buildListeners != null) {
-				for (Iterator iterator = buildListeners.iterator(); iterator.hasNext();) {
-					className = (String) iterator.next();
-					Class listener = Class.forName(className);
-					project.addBuildListener((BuildListener) listener.newInstance());
-				}
-			}
-		} catch (ClassCastException e) {
-			String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1"), new String[]{className}); //$NON-NLS-1$
-			logMessage(null, message, Project.MSG_ERR);
-			throw new BuildException(message, e);
-		} catch (BuildException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new BuildException(e);
-		}
-	}
-
-	/**
-	 * Parses the build file and adds necessary information into
-	 * the given project.
-	 * @param project The project to configure
-	 */
-	private void parseBuildFile(Project project) {
-		File buildFile = new File(getBuildFileLocation());
-		if (!buildFile.exists()) {
-			throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Buildfile__{0}_does_not_exist_!_1"), //$NON-NLS-1$
-						 new String[]{buildFile.getAbsolutePath()}));
-		}
-		if (!buildFile.isFile()) {
-			throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Buildfile__{0}_is_not_a_file_1"), //$NON-NLS-1$
-							new String[]{buildFile.getAbsolutePath()}));
-		}
-		
-        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-            parseBuildFile(project, buildFile);
-        } else {
-            ProjectHelper helper = ProjectHelper.getProjectHelper();
-            project.addReference("ant.projectHelper", helper); //$NON-NLS-1$
-            helper.parse(project, buildFile);
-        }
-    }
-    
-    /**
-     * @deprecated support for Ant older than 1.5
-     */
-    private void parseBuildFile(Project project, File buildFile) {
-        ProjectHelper.configureProject(project, buildFile);   
-    }
-
-	private void printArguments(Project project) {
-		if ((messageOutputLevel != Project.MSG_DEBUG) && (messageOutputLevel != Project.MSG_VERBOSE)) {
-			return;
-		}
-		StringBuffer sb = new StringBuffer();
-		for (int i = 0; i < extraArguments.length; i++) {
-			sb.append(extraArguments[i]);
-			sb.append(' ');
-		}
-		project.log(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Arguments__{0}_2"), new String[]{sb.toString().trim()})); //$NON-NLS-1$
-	}
-
-
-	/**
-	 * Logs a message with the client that lists the targets
-	 * in a project
-	 * 
-	 * @param project the project to list targets from
-	 */
-	private void printTargets(Project project) {
-		//notify the logger that project help message are coming
-		//since there is no buildstarted or targetstarted to 
-		//to be used to establish the connection
-		logMessage(project, IAntCoreConstants.EMPTY_STRING, MSG_PROJECT_HELP);
-		// find the target with the longest name
-		int maxLength = 0;
-		Enumeration ptargets = project.getTargets().elements();
-		String targetName;
-		String targetDescription;
-		Target currentTarget;
-		// split the targets in top-level and sub-targets depending
-		// on the presence of a description
-		List topNames = new ArrayList();
-		List topDescriptions = new ArrayList();
-		List subNames = new ArrayList();
-
-		while (ptargets.hasMoreElements()) {
-			currentTarget = (Target) ptargets.nextElement();
-			targetName = currentTarget.getName();
-			targetDescription = currentTarget.getDescription();
-			if (targetDescription == null) {
-				subNames.add(targetName);
-			} else {
-				topNames.add(targetName);
-				topDescriptions.add(targetDescription);
-				if (targetName.length() > maxLength) {
-					maxLength = targetName.length();
-				}
-			}
-		}
-
-		Collections.sort(subNames);
-		Collections.sort(topNames);
-		Collections.sort(topDescriptions);
-		
-		String defaultTargetName = project.getDefaultTarget();
-		if (defaultTargetName != null && !IAntCoreConstants.EMPTY_STRING.equals(defaultTargetName)) { // shouldn't need to check but...
-			List defaultName = new ArrayList(1);
-			List defaultDesc = null;
-			defaultName.add(defaultTargetName);
-
-			int indexOfDefDesc = topNames.indexOf(defaultTargetName);
-			if (indexOfDefDesc >= 0) {
-				defaultDesc = new ArrayList(1);
-				defaultDesc.add(topDescriptions.get(indexOfDefDesc));
-			}
-			printTargets(project, defaultName, defaultDesc, RemoteAntMessages.getString("InternalAntRunner.Default_target__3"), maxLength); //$NON-NLS-1$
-
-		}
-
-		printTargets(project, topNames, topDescriptions, RemoteAntMessages.getString("InternalAntRunner.Main_targets__4"), maxLength); //$NON-NLS-1$
-		printTargets(project, subNames, null, RemoteAntMessages.getString("InternalAntRunner.Subtargets__5"), 0); //$NON-NLS-1$
-	}
-
-	/**
-	 * Logs a message with the client that lists the target names and optional descriptions
-	 * 
-	 * @param project the enclosing target
-	 * @param names the targets names
-	 * @param descriptions the corresponding descriptions
-	 * @param heading the message heading
-	 * @param maxlen maximum length that can be allocated for a name
-	 */
-	private void printTargets(Project project, List names, List descriptions, String heading, int maxlen) {
-		// now, start printing the targets and their descriptions
-		String lSep = System.getProperty("line.separator"); //$NON-NLS-1$
-		
-		String spaces = "    "; //$NON-NLS-1$
-		while (spaces.length() < maxlen) {
-			spaces += spaces;
-		}
-		StringBuffer msg = new StringBuffer();
-		msg.append(heading + lSep + lSep);
-		for (int i = 0; i < names.size(); i++) {
-			msg.append(' ');
-			msg.append(names.get(i));
-			if (descriptions != null) {
-				msg.append(spaces.substring(0, maxlen - ((String) names.get(i)).length() + 2));
-				msg.append(descriptions.get(i));
-			}
-			msg.append(lSep);
-		}
-		logMessage(project, msg.toString(), Project.MSG_INFO);
-	}
-
-	/*
-	 * Note that the list passed to this method must support
-	 * List#remove(Object)
-	 */
-	private void run(List argList) {
-		setCurrentProject(new Project());
-         if (isVersionCompatible("1.6.3")) { //$NON-NLS-1$
-               new ExecutorSetter().setExecutor(getCurrentProject());
-            }
-		Throwable error = null;
-		PrintStream originalErr = System.err;
-		PrintStream originalOut = System.out;
-		InputStream originalIn= System.in;
-		
-		SecurityManager originalSM= System.getSecurityManager();
-		scriptExecuted= true;
-		try {
-			if (argList != null && (argList.remove("-projecthelp") || argList.remove("-p"))) { //$NON-NLS-1$ //$NON-NLS-2$
-				projectHelp = true;
-			}
-			getCurrentProject().init();
-			if (argList != null) {
-				scriptExecuted= preprocessCommandLine(argList);
-			
-				if (!scriptExecuted) {
-					return;
-				}
-			}
-			
-            boolean exceptionState= processProperties(argList);
-            
-			addBuildListeners(getCurrentProject());
-            
-			addInputHandler(getCurrentProject());
-			
-			remapSystemIn();
-			System.setOut(new PrintStream(new DemuxOutputStream(getCurrentProject(), false)));
-			System.setErr(new PrintStream(new DemuxOutputStream(getCurrentProject(), true)));
-			
-			if (!projectHelp) {
-				fireBuildStarted(getCurrentProject());
-			}
-            
-            if (fEarlyErrorMessage != null) {
-                //an error occurred processing the properties
-                //build started has fired and we have
-                //listeners/loggers to report the error
-                logMessage(getCurrentProject(), fEarlyErrorMessage, Project.MSG_ERR);
-                if (exceptionState) {
-                    throw new BuildException(fEarlyErrorMessage);
-                }
-            }
-            
-            //properties can only be set after buildStarted as some listeners/loggers
-            //depend on this (e.g. XMLLogger)
-            setProperties(getCurrentProject());
-			
-			if (argList != null && !argList.isEmpty()) {
-				try {
-					scriptExecuted= processCommandLine(argList);
-				} catch (BuildException e) {
-					scriptExecuted= false;
-					throw e;
-				}
-			}
-			if (!scriptExecuted) {
-				return;
-			}
-			
-            //needs to occur after processCommandLine(List)
-			if (allowInput && (inputHandlerClassname != null && inputHandlerClassname.length() > 0)) {
-				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
-					getCurrentProject().setDefaultInputStream(originalIn);
-				}
-			} else {
-				//set the system property that any input handler
-				//can check to see if handling input is allowed
-				System.setProperty("eclipse.ant.noInput", "true");  //$NON-NLS-1$//$NON-NLS-2$
-				if (isVersionCompatible("1.5") && (inputHandlerClassname == null || inputHandlerClassname.length() == 0)) { //$NON-NLS-1$
-					InputHandlerSetter setter= new InputHandlerSetter();
-					setter.setInputHandler(getCurrentProject(), "org.eclipse.ant.internal.ui.antsupport.inputhandler.FailInputHandler"); //$NON-NLS-1$
-				}
-			}
-			
-			getCurrentProject().log(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Build_file__{0}_1"), new String[]{getBuildFileLocation()})); //$NON-NLS-1$
-			
-			setTasks();
-			setTypes();
-			
-			if (isVersionCompatible("1.6")) { //$NON-NLS-1$
-				getCurrentProject().setKeepGoingMode(keepGoing);
-			}
-			
-			parseBuildFile(getCurrentProject());
-			
-			if (projectHelp) {
-				printHelp(getCurrentProject());
-				scriptExecuted= false;
-				return;
-			}
-			
-			if (extraArguments != null) {
-				printArguments(getCurrentProject());
-			}
-			
-			System.setSecurityManager(new AntSecurityManager(originalSM, Thread.currentThread()));
-			
-			if (targets == null) {
-                targets= new Vector(1);
-            }
-            if (targets.isEmpty() && getCurrentProject().getDefaultTarget() != null) {
-                targets.add(getCurrentProject().getDefaultTarget());
-            }
-			if (!isVersionCompatible("1.6.3")) {  //$NON-NLS-1$
-	            getCurrentProject().addReference("eclipse.ant.targetVector", targets); //$NON-NLS-1$
-			}
-			getCurrentProject().executeTargets(targets);
-		} catch (AntSecurityException e) {
-			//expected
-		} catch (Throwable e) {
-			error = e;
-		} finally {
-			System.setErr(originalErr);
-			System.setOut(originalOut);
-			System.setIn(originalIn);
-			if (System.getSecurityManager() instanceof AntSecurityManager) {
-				System.setSecurityManager(originalSM);
-			}
-			
-			if (!projectHelp) {				
-				fireBuildFinished(getCurrentProject(), error);
-			}
-						
-			//close any user specified build log
-			if (err != originalErr) {
-				err.close();
-			}
-			if (out != originalOut) {
-				out.close();
-			}
-		}
-	}
-	
-	private void setTasks() {
-		if (eclipseSpecifiedTasks != null) {
-			Iterator itr= eclipseSpecifiedTasks.keySet().iterator();
-			String taskName;
-			String taskClassName;
-			while (itr.hasNext()) {
-				taskName= (String) itr.next();
-				taskClassName= (String) eclipseSpecifiedTasks.get(taskName);
-				
-				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
-					AntTypeDefinition def= new AntTypeDefinition();
-					def.setName(taskName);
-		            def.setClassName(taskClassName);
-		            def.setClassLoader(this.getClass().getClassLoader());
-		            def.setAdaptToClass(Task.class);
-		            def.setAdapterClass(TaskAdapter.class);
-		            ComponentHelper.getComponentHelper(getCurrentProject()).addDataTypeDefinition(def);
-				} else {
-					try {
-						Class taskClass = Class.forName(taskClassName);
-						getCurrentProject().addTaskDefinition(taskName, taskClass);
-					} catch (ClassNotFoundException e) {
-						String message= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.161"), new String[]{taskClassName, taskName}); //$NON-NLS-1$
-						getCurrentProject().log(message, Project.MSG_WARN);
-					}	
-				}
-			}
-		}
-	}
-
-	private void setTypes() {
-		if (eclipseSpecifiedTypes != null) {
-			Iterator itr= eclipseSpecifiedTypes.keySet().iterator();
-			String typeName;
-			String typeClassName;
-			while (itr.hasNext()) {
-				typeName = (String) itr.next();
-				typeClassName= (String) eclipseSpecifiedTypes.get(typeName);
-				if (isVersionCompatible("1.6")) { //$NON-NLS-1$
-					AntTypeDefinition def = new AntTypeDefinition();
-	                def.setName(typeName);
-	                def.setClassName(typeClassName);
-	                def.setClassLoader(this.getClass().getClassLoader());
-	                ComponentHelper.getComponentHelper(getCurrentProject()).addDataTypeDefinition(def);
-				} else {
-					try {
-						Class typeClass = Class.forName(typeClassName);
-						getCurrentProject().addDataTypeDefinition(typeName, typeClass);
-					} catch (ClassNotFoundException e) {
-						String message= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.162"), new String[]{typeClassName, typeName}); //$NON-NLS-1$
-						getCurrentProject().log(message, Project.MSG_WARN);
-					}	
-				}
-			}
-		}
-	}
-
-	private void remapSystemIn() {
-		if (!isVersionCompatible("1.6")) { //$NON-NLS-1$
-			return;
-		}
-		DemuxInputStreamSetter setter= new DemuxInputStreamSetter();
-		setter.remapSystemIn(getCurrentProject());
-	}
-	
-	/**
-	 * Creates and returns the default build logger for logging build events to the ant log.
-	 * 
-	 * @return the default build logger for logging build events to the ant log
-	 * 			can return <code>null</code> if no logging is to occur
-	 */
-	private BuildLogger createLogger() {
-		if (loggerClassname == null) {
-			buildLogger= new DefaultLogger();
-		} else if (!IAntCoreConstants.EMPTY_STRING.equals(loggerClassname)) {
-			try {
-				buildLogger = (BuildLogger) (Class.forName(loggerClassname).newInstance());
-			} catch (ClassCastException e) {
-				String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2"), new String[]{loggerClassname}); //$NON-NLS-1$
-				logMessage(null, message, Project.MSG_ERR);
-				throw new BuildException(message, e);
-			} catch (Exception e) {
-				String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unable_to_instantiate_logger__{0}_6"), new String[]{loggerClassname}); //$NON-NLS-1$
-				logMessage(null, message, Project.MSG_ERR);
-				throw new BuildException(message, e);
-			}
-		} 
-		
-		if (buildLogger != null) {
-			buildLogger.setMessageOutputLevel(messageOutputLevel);
-			buildLogger.setOutputPrintStream(out);
-			buildLogger.setErrorPrintStream(err);
-			buildLogger.setEmacsMode(emacsMode);
-            if (buildLogger instanceof RemoteAntBuildLogger) {
-                ((RemoteAntBuildLogger) buildLogger).configure(userProperties);
-            }
-		}
-
-		return buildLogger;
-    }
-    
-    /**
-     * Project.fireBuildStarted is protected in Ant earlier than 1.5.*.
-     * Provides backwards compatibility with old Ant installs.
-     */
-    private void fireBuildStarted(Project project) {
-        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-            BuildEvent event = new BuildEvent(project);
-            for (Iterator iterator = project.getBuildListeners().iterator(); iterator.hasNext();) {
-                BuildListener listener = (BuildListener) iterator.next();
-                listener.buildStarted(event);
-            }
-        } else {
-            project.fireBuildStarted();
-        }
-    }
-
-	private void fireBuildFinished(Project project, Throwable error) {
-		if (error == null && scriptExecuted) {
-			logMessage(project, RemoteAntMessages.getString("InternalAntRunner.BUILD_SUCCESSFUL_1"), messageOutputLevel); //$NON-NLS-1$
-		}
-        if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-            BuildEvent event = new BuildEvent(project);
-            event.setException(error);
-            Iterator iter = project.getBuildListeners().iterator();
-            while (iter.hasNext()) {
-                BuildListener listener = (BuildListener) iter.next();
-                listener.buildFinished(event);
-            }   
-        } else {
-            project.fireBuildFinished(error);
-        }
-	}
-
-	private void logMessage(Project project, String message, int priority) {
-		if (project != null) {
-			project.log(message, priority);	
-		} else {
-			if (buildListeners != null) {
-				Project p = new Project();
-				BuildEvent event = new BuildEvent(p);
-				event.setMessage(message, priority);
-				//notify the build listeners that are not registered as
-				//no project existed
-				for (Iterator iterator = buildListeners.iterator(); iterator.hasNext();) {
-					try {
-						BuildListener listener = (BuildListener) iterator.next();
-						listener.messageLogged(event);
-					} catch (ClassCastException e) {
-						//ignore we could be trying to log that a build listener is the
-						//wrong type of class
-					}
-				}
-			}
-		}
-	}
-
-	/**
-	 * Sets the buildFileLocation.
-	 * 
-	 * @param buildFileLocation the file system location of the build file
-	 */
-	private void setBuildFileLocation(String buildFileLocation) {
-		this.buildFileLocation = buildFileLocation;
-		if (getCurrentProject() != null) {
-			getCurrentProject().setUserProperty("ant.file", buildFileLocation); //$NON-NLS-1$
-		}
-	}
-
-	private String getBuildFileLocation() {
-		if (buildFileLocation == null) {
-			buildFileLocation = new File("build.xml").getAbsolutePath(); //$NON-NLS-1$
-		}
-		return buildFileLocation;
-	}
-
-	/**
-	 * Sets the message output level. Use -1 for none.
-	 * @param level The message output level
-	 */
-	private void setMessageOutputLevel(int level) {
-		messageOutputLevel = level;
-		if (buildLogger != null) {
-			buildLogger.setMessageOutputLevel(level);
-		}
-	}
-	
-	/*
-	 * Returns a String representation of the Ant version number as specified
-	 * in the version.txt file.
-	 */
-	private String getAntVersionNumber() throws BuildException {
-		if (antVersionNumber == null) {
-			try {
-				Properties props = new Properties();
-				InputStream in = Main.class.getResourceAsStream("/org/apache/tools/ant/version.txt"); //$NON-NLS-1$
-				props.load(in);
-				in.close();
-				String versionNumber= props.getProperty("VERSION");  //$NON-NLS-1$
-				antVersionNumber= versionNumber;
-			} catch (IOException ioe) {
-				throw new BuildException(MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_the_version_information._{0}_9"), new String[]{ioe.getMessage()})); //$NON-NLS-1$
-			} catch (NullPointerException npe) {
-				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_the_version_information._10")); //$NON-NLS-1$
-			}
-		}
-		return antVersionNumber;
-	}
-	
-	/*
-	 * Returns whether the given version is compatible with the
-	 * current Ant version. A version is compatible if it is less
-	 * than or equal to the current version. 
-	 */
-	private boolean isVersionCompatible(String comparison) {
-		String version= getAntVersionNumber();
-		return version.compareTo(comparison) >= 0;
-	}
-	
-	private boolean preprocessCommandLine(List commands) {
-		
-		String arg = getArgument(commands, "-listener"); //$NON-NLS-1$
-		while (arg != null) {
-			if (arg.length() == 0) {
-				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1")); //$NON-NLS-1$
-			} 
-			if (buildListeners == null) {
-				buildListeners= new ArrayList(1);
-			}
-			buildListeners.add(arg);
-			arg = getArgument(commands, "-listener"); //$NON-NLS-1$
-		}
-
-		arg = getArgument(commands, "-logger"); //$NON-NLS-1$
-		if (arg != null) {
-			//allow empty string to mean no logger
-			loggerClassname = arg;
-		}
-		arg = getArgument(commands, "-logger"); //$NON-NLS-1$
-		if (arg != null) {
-			throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Only_one_logger_class_may_be_specified_1")); //$NON-NLS-1$
-		}
-		
-		arg = getArgument(commands, "-inputhandler"); //$NON-NLS-1$
-		if (arg != null) {
-			if (arg.length() == 0) {
-				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1")); //$NON-NLS-1$
-			} 
-			inputHandlerClassname = arg;
-		}
-		arg = getArgument(commands, "-inputhandler"); //$NON-NLS-1$
-		if (arg != null) {
-			throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.Only_one_input_handler_class_may_be_specified._2")); //$NON-NLS-1$
-		}
-		return true;
-	}
-	
-	/*
-	 * Looks for interesting command line arguments. 
-	 * Returns whether it is OK to run the script.
-	 */
-	private boolean processCommandLine(List commands) {
-		
-		if (commands.remove("-help") || commands.remove("-h")) { //$NON-NLS-1$ //$NON-NLS-2$
-			printUsage();
-			return false;
-		}
-		
-		if (commands.remove("-version")) { //$NON-NLS-1$
-			printVersion();
-			return false;
-		}
-		
-		if (commands.remove("-verbose") || commands.remove("-v")) { //$NON-NLS-1$ //$NON-NLS-2$
-			printVersion();
-			setMessageOutputLevel(Project.MSG_VERBOSE);
-		}
-		
-		if (commands.remove("-debug") || commands.remove("-d")) { //$NON-NLS-1$ //$NON-NLS-2$
-			printVersion();
-			setMessageOutputLevel(Project.MSG_DEBUG);
-		}
-		
-		if (commands.remove("-quiet") || commands.remove("-q")) { //$NON-NLS-1$ //$NON-NLS-2$
-			setMessageOutputLevel(Project.MSG_WARN);
-		}
-
-		if (commands.remove("-emacs") || commands.remove("-e")) { //$NON-NLS-1$ //$NON-NLS-2$
-			emacsMode = true;
-			if (buildLogger != null) {
-				buildLogger.setEmacsMode(true);
-			}
-		}
-		
-		if (commands.remove("-diagnostics")) { //$NON-NLS-1$
-			if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-				throw new BuildException(RemoteAntMessages.getString("InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4")); //$NON-NLS-1$
-			}
-			try {
-				Diagnostics.doReport(System.out);
-			} catch (NullPointerException e) {
-				logMessage(getCurrentProject(), RemoteAntMessages.getString("InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2"), Project.MSG_ERR); //$NON-NLS-1$
-			}
-			return false;
-		}
-		
-		String arg = getArgument(commands, "-logfile"); //$NON-NLS-1$
-		if (arg == null) {
-			arg = getArgument(commands, "-l"); //$NON-NLS-1$
-		}
-		if (arg != null) {
-			if (arg.length() == 0) {
-				String message= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3"); //$NON-NLS-1$
-				logMessage(currentProject, message, Project.MSG_ERR); 
-				throw new BuildException(message);
-			} 
-			try {
-				createLogFile(arg);
-			} catch (IOException e) {
-				// just log message and ignore exception
-				logMessage(getCurrentProject(), MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2"), new String[]{arg}), Project.MSG_ERR); //$NON-NLS-1$
-				return false;
-			}
-		
-		}
-		
-		arg = getArgument(commands, "-buildfile"); //$NON-NLS-1$
-		if (arg == null) {
-			arg = getArgument(commands, "-file"); //$NON-NLS-1$
-			if (arg == null) {
-				arg = getArgument(commands, "-f"); //$NON-NLS-1$
-			}
-		}
-		
-		if (arg != null) {
-			if (arg.length() == 0) {
-				String message= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4"); //$NON-NLS-1$
-				logMessage(currentProject, message, Project.MSG_ERR); 
-				throw new BuildException(message);
-			} 
-			setBuildFileLocation(arg);
-		}
-		
-		if (isVersionCompatible("1.6")) { //$NON-NLS-1$
-			if (commands.remove("-k") || commands.remove("-keep-going")) { //$NON-NLS-1$ //$NON-NLS-2$
-				keepGoing= true;
-			}
-			if (commands.remove("-noinput")) { //$NON-NLS-1$
-				allowInput= false;
-			}
-			arg= getArgument(commands, "-lib"); //$NON-NLS-1$
-			if (arg != null) {
-				logMessage(currentProject, RemoteAntMessages.getString("InternalAntRunner.157"), Project.MSG_ERR); //$NON-NLS-1$
-				return false;
-			}
-		}
-		
-		arg= getArgument(commands, "-find"); //$NON-NLS-1$
-		if (arg == null) {
-			arg= getArgument(commands, "-s"); //$NON-NLS-1$
-		}
-		if (arg != null) {
-			logMessage(currentProject, RemoteAntMessages.getString("InternalAntRunner.-find_not_supported"), Project.MSG_ERR); //$NON-NLS-1$
-			return false;
-		}
-		
-		processTasksAndTypes(commands);
-		
-		if (!commands.isEmpty()) {
-			processUnrecognizedCommands(commands);
-		}
-
-		if (!commands.isEmpty()) {
-			processTargets(commands);
-		}
-		
-		return true;
-	}
-	
-	private void processTasksAndTypes(List commands) {
-		String arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
-		while (arg != null) {
-			if (eclipseSpecifiedTasks == null) {
-				eclipseSpecifiedTasks= new HashMap();
-			}
-			int index= arg.indexOf(',');
-			if (index != -1) {
-				String name= arg.substring(0, index);
-				String className= arg.substring(index + 1);
-				eclipseSpecifiedTasks.put(name, className);
-			}
-			arg = getArgument(commands, "-eclipseTask"); //$NON-NLS-1$
-		}
-		
-		arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
-		while (arg != null) {
-			if (eclipseSpecifiedTypes == null) {
-				eclipseSpecifiedTypes= new HashMap();
-			}
-			int index= arg.indexOf(',');
-			if (index != -1) {	
-				String name= arg.substring(0, index);
-				String className= arg.substring(index + 1);
-				eclipseSpecifiedTypes.put(name, className);
-			}
-			arg = getArgument(commands, "-eclipseType"); //$NON-NLS-1$
-		}
-	}
-
-	/*
-	 * Checks for unrecognized arguments on the command line.
-	 * Since there is no syntactic way to distingush between
-	 * ant -foo target1 target2
-	 * ant -foo fooarg target
-	 * we remove everything up to the last argument that
-	 * begins with a '-'.  In the latter case, above, that
-	 * means that there will be an extra target, 'fooarg',
-	 * left lying around.
-	 */
-	private void processUnrecognizedCommands(List commands) {
-		int p = -1;
-
-		// find the last arg that begins with '-'
-		for (int i = commands.size() - 1; i >= 0; i--) {
-			if (((String) commands.get(0)).startsWith("-")) { //$NON-NLS-1$
-				p = i;
-				break;
-			}
-		}
-		if (p < 0) { return; }
-
-		// remove everything preceding that last '-arg'
-		String s = IAntCoreConstants.EMPTY_STRING;
-		for (int i = 0; i <= p; i++) {
-			s += " " + ((String) commands.get(0)); //$NON-NLS-1$
-			commands.remove(0);
-		}
-		
-		// warn of ignored commands
-		String message = MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Unknown_argument__{0}_2"), new Object[]{ s.substring(1) }); //$NON-NLS-1$
-		logMessage(currentProject, message, Project.MSG_WARN); 
-	}
-	
-
-	/*
-	 * Checks for targets specified at the command line.
-	 */
-	private void processTargets(List commands) {
-		if (targets == null) {
-			targets = new Vector(commands.size());
-		}
-		for (Iterator iter = commands.iterator(); iter.hasNext();) {
-			targets.add(iter.next());
-		}
-	}
-
-	/*
-	 * Creates the log file with the name specified by the user.
-	 * If the fileName is not absolute, the file will be created in the
-	 * working directory if specified or in the same directory as the location
-	 * of the build file.
-	 */
-	private void createLogFile(String fileName) throws FileNotFoundException, IOException {
-		File logFile = getFileRelativeToBaseDir(fileName);
-		
-		//this stream is closed in the finally block of run(list)
-		out = new PrintStream(new FileOutputStream(logFile));
-		err = out;
-		logMessage(getCurrentProject(), MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Using_{0}_file_as_build_log._1"), new String[]{logFile.getCanonicalPath()}), Project.MSG_INFO); //$NON-NLS-1$
-		if (buildLogger != null) {
-			buildLogger.setErrorPrintStream(err);
-			buildLogger.setOutputPrintStream(out);
-		}
-	}
-
-	private File getFileRelativeToBaseDir(String fileName) {
-		File parentFile= null;
-		
-		String base= getCurrentProject().getUserProperty("basedir"); //$NON-NLS-1$
-		if (base != null) {
-			parentFile= new File(base);
-		} else {
-			//relative to the build file location
-			parentFile= new File(getBuildFileLocation()).getParentFile();
-		}
-		
-		//remain backwards compatible for older Ant usage
-		return FileUtils.newFileUtils().resolveFile(parentFile, fileName);
-	}
-
-	/*
-	 * Processes cmd line properties and adds the user properties
-	 * Any user properties that have been explicitly set are set as well.
-	 * Ensures that -D properties take precedence.
-	 */
-	private boolean processProperties(List commands) {
-        boolean exceptionToBeThrown= false;
-		//MULTIPLE property files are allowed
-		String arg= getArgument(commands, "-propertyfile"); //$NON-NLS-1$
-		while (arg != null) {
-			if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-				fEarlyErrorMessage= RemoteAntMessages.getString("InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6"); //$NON-NLS-1$
-				break;
-			}
-			if (arg.length() == 0) {
-                fEarlyErrorMessage= RemoteAntMessages.getString("InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3"); //$NON-NLS-1$
-                exceptionToBeThrown= true;
-                break;
-			} 
-			
-			propertyFiles.add(arg);
-			arg= getArgument(commands, "-propertyfile"); //$NON-NLS-1$
-		}
-        
-        if (propertyFiles != null && !propertyFiles.isEmpty()) {
-            loadPropertyFiles();
-        }
-        
-        if (commands != null) {
-            processMinusDProperties(commands);
-        }
-        return exceptionToBeThrown;
-	}
-
-	private void processMinusDProperties(List commands) {
-		String[] args = (String[]) commands.toArray(new String[commands.size()]);
-		for (int i = 0; i < args.length; i++) {
-			String arg = args[i];
-			if (arg.startsWith("-D")) { //$NON-NLS-1$
-				String name = arg.substring(2, arg.length());
-				String value = null;
-				int posEq = name.indexOf("="); //$NON-NLS-1$
-				if (posEq == 0) {
-					value= name.substring(1);
-					name= IAntCoreConstants.EMPTY_STRING;
-				} else if (posEq > 0 && posEq != name.length() - 1) {
-					value = name.substring(posEq + 1).trim();
-					name = name.substring(0, posEq);
-				}
-				
-				if (value == null) {
-					//the user has specified something like "-Debug"
-					continue;
-				}
-				if (userProperties == null) {
-					userProperties= new HashMap();
-				}
-				userProperties.put(name, value);
-				commands.remove(args[i]);
-			}
-		}
-	}
-	
-	private void setProperties(Project project) {
-		setBuiltInProperties(project);
-		if (userProperties != null) {
-			for (Iterator iterator = userProperties.entrySet().iterator(); iterator.hasNext();) {
-				Map.Entry entry = (Map.Entry) iterator.next();
-				project.setUserProperty((String) entry.getKey(), (String) entry.getValue());
-			}
-		} 
-	}
-
-	private void setBuiltInProperties(Project project) {
-		project.setUserProperty("ant.file", getBuildFileLocation()); //$NON-NLS-1$
-		project.setUserProperty("ant.version", Main.getAntVersion()); //$NON-NLS-1$
-	}
-
-	/*
-	 * Print the project description, if any
-	 */
-	private void printHelp(Project project) {
-		if (project.getDescription() != null) {
-			logMessage(project, project.getDescription(), Project.MSG_INFO);
-		}
-		printTargets(project);
-	}
-
-	/*
-	 * Logs a message with the client indicating the version of <b>Ant</b> that this class
-	 * fronts.
-	 */
-	private void printVersion() {
-		logMessage(getCurrentProject(), Main.getAntVersion(), Project.MSG_INFO);
-	}
-
-	/*
-	 * Logs a message with the client outlining the usage of <b>Ant</b>.
-	 */
-	private void printUsage() {
-		String lSep = System.getProperty("line.separator"); //$NON-NLS-1$
-		StringBuffer msg = new StringBuffer();
-		msg.append("ant ["); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.options_13")); //$NON-NLS-1$
-		msg.append("] ["); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
-		msg.append(" ["); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
-		msg.append("2 ["); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.target_15")); //$NON-NLS-1$
-		msg.append("3] ...]]"); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.Options___21")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-help, -h\t\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_this_message_23")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-projecthelp, -p\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_project_help_information_25")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-version\t\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_the_version_information_and_exit_27")); //$NON-NLS-1$
-		msg.append(lSep); 
-		msg.append("\t-diagnostics\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.12")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.13")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-quiet, -q\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.be_extra_quiet_29")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-verbose, -v\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.be_extra_verbose_31")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-debug, -d\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.print_debugging_information_33")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-emacs, -e\t\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.produce_logging_information_without_adornments_35")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-logfile\t<file>\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_given_file_for_log_37")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t\t-l\t<file>"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
-		msg.append(lSep);  
-		msg.append("\t-logger <classname>\t\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.the_class_which_is_to_perform_logging_39")); //$NON-NLS-1$
-		msg.append(lSep);  
-		msg.append("\t-listener <classname>\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-noinput\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.158")); //$NON-NLS-1$
-		msg.append(lSep); 
-		msg.append("\t-buildfile\t<file>\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_given_buildfile_43")); //$NON-NLS-1$
-		msg.append(lSep); 
-		msg.append("\t\t-file\t<file>"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t\t-f\t\t<file>"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.1")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-D<property>=<value>\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.use_value_for_given_property_45")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-keep-going, -k"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.159")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.160")); //$NON-NLS-1$
-		msg.append(lSep); 
-		msg.append("\t-propertyfile <name>\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.19")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.20")); //$NON-NLS-1$
-		msg.append(lSep);
-		msg.append("\t-inputhandler <class>\t"); //$NON-NLS-1$
-		msg.append(RemoteAntMessages.getString("InternalAntRunner.22")); //$NON-NLS-1$
-		msg.append(lSep);
-
-		logMessage(getCurrentProject(), msg.toString(), Project.MSG_INFO);
-	}
-
-	/*
-	 * From a command line list, return the argument for the given parameter.
-	 * The parameter and its argument are removed from the list.
-	 * 
-	 * @return <code>null</code> if the parameter is not found 
-	 * 			or an empty String if no arguments are found
-	 */
-	private String getArgument(List commands, String param) {
-		if (commands == null) {
-			return null;
-		}
-		int index = commands.indexOf(param);
-		if (index == -1) {
-			return null;
-		}
-		commands.remove(index);
-		if (index == commands.size()) {// if this is the last command
-			return IAntCoreConstants.EMPTY_STRING;
-		}
-		
-		String command = (String) commands.get(index);
-		if (command.startsWith("-")) { //new parameter //$NON-NLS-1$
-			return IAntCoreConstants.EMPTY_STRING;
-		}
-		
-		commands.remove(index);
-		return command;
-	}
-
-	/*
-	 * Helper method to ensure an array is converted into an ArrayList.
-	 */
-	private static ArrayList getArrayList(String[] args) {
-		if (args == null) {
-			return null;
-		}
-		// We could be using Arrays.asList() here, but it does not specify
-		// what kind of list it will return. We need a list that
-		// implements the method List.remove(Object) and ArrayList does.
-		ArrayList result = new ArrayList(args.length);
-		for (int i = 0; i < args.length; i++) {
-			result.add(args[i]);
-		}
-		return result;
-	}
-
-	private Project getCurrentProject() {
-		return currentProject;
-	}
-
-	private void setCurrentProject(Project currentProject) {
-		this.currentProject = currentProject;
-	}
-	
-	/**
-	 * Load all properties from the files 
-	 * specified by -propertyfile.
-	 */
-	private void loadPropertyFiles() {
-		Iterator itr= propertyFiles.iterator();
-        while (itr.hasNext()) {
-            String filename= (String) itr.next();
-           	File file= getFileRelativeToBaseDir(filename);
-            Properties props = new Properties();
-            FileInputStream fis = null;
-            try {
-                fis = new FileInputStream(file);
-                props.load(fis);
-            } catch (IOException e) {
-            	fEarlyErrorMessage= MessageFormat.format(RemoteAntMessages.getString("InternalAntRunner.Could_not_load_property_file_{0}__{1}_4"), new String[]{filename, e.getMessage()}); //$NON-NLS-1$
-            } finally {
-                if (fis != null) {
-                    try {
-                        fis.close();
-                    } catch (IOException e){
-                    }
-                }
-            }
-
-            if (userProperties == null) {
-            	userProperties= new HashMap();
-            }
-            Enumeration propertyNames = props.propertyNames();
-            while (propertyNames.hasMoreElements()) {
-                String name = (String) propertyNames.nextElement();
-                //most specific to global
-                //do not overwrite specific with a global property
-                if (userProperties.get(name) == null) {
-            		userProperties.put(name, props.getProperty(name));
-                }
-            }
-        }
-	}
-	
-	/*
-     * Creates the InputHandler and adds it to the project.
-     *
-     * @exception BuildException if a specified InputHandler
-     *                           implementation could not be loaded.
-     */
-    private void addInputHandler(Project project) {
-    	if (!isVersionCompatible("1.5")) { //$NON-NLS-1$
-			return;
-		}
-		InputHandlerSetter setter= new InputHandlerSetter();
-		setter.setInputHandler(project, inputHandlerClassname);
-    }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.java
deleted file mode 100644
index 3b075fb..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.java	
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport;
-
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class RemoteAntMessages {
-
-	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.ui.antsupport.RemoteAntMessages"; //$NON-NLS-1$
-
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
-	private RemoteAntMessages() {
-	}
-
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.properties
deleted file mode 100644
index 8ddea01..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/RemoteAntMessages.properties	
+++ /dev/null
@@ -1,83 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-InternalAntRunner.Build_file__{0}_1=Buildfile: {0}
-InternalAntRunner.Arguments__{0}_2=Arguments: {0}
-InternalAntRunner.Default_target__3=Default target:
-InternalAntRunner.Main_targets__4=Main targets:
-InternalAntRunner.Subtargets__5=Subtargets:
-InternalAntRunner.Unable_to_instantiate_logger__{0}_6=Unable to instantiate logger: {0}
-InternalAntRunner.Could_not_load_the_version_information._{0}_9=Could not load the version information. {0}
-InternalAntRunner.Could_not_load_the_version_information._10=Could not load the version information.
-InternalAntRunner.options_13=options
-InternalAntRunner.target_15=target
-InternalAntRunner.Options___21=Options: 
-InternalAntRunner.print_this_message_23=print this message
-InternalAntRunner.print_project_help_information_25=print project help information
-InternalAntRunner.print_the_version_information_and_exit_27=print the version information and exit
-InternalAntRunner.be_extra_quiet_29=be extra quiet
-InternalAntRunner.be_extra_verbose_31=be extra verbose
-InternalAntRunner.print_debugging_information_33=print debugging information
-InternalAntRunner.produce_logging_information_without_adornments_35=produce logging information without adornments
-InternalAntRunner.use_given_file_for_log_37=use given file for log
-InternalAntRunner.the_class_which_is_to_perform_logging_39=the class which is to perform logging
-InternalAntRunner.add_an_instance_of_class_as_a_project_listener_41=add an instance of class as a project listener
-InternalAntRunner.use_given_buildfile_43=use given buildfile
-InternalAntRunner.use_value_for_given_property_45=use value for given property
-InternalAntRunner.Using_{0}_file_as_build_log._1=Using {0} file as build log.
-InternalAntRunner.Could_not_write_to_the_specified_log_file__{0}._Make_sure_the_path_exists_and_you_have_write_permissions._2=Cannot write on the specified log file: {0}. Make sure the path exists and you have write permissions.
-InternalAntRunner.BUILD_SUCCESSFUL_1=BUILD SUCCESSFUL
-InternalAntRunner.Unknown_argument__{0}_2=Unknown argument: {0}
-InternalAntRunner.Buildfile__{0}_does_not_exist_!_1=Buildfile: {0} does not exist
-InternalAntRunner.{0}_which_was_specified_to_be_a_build_listener_is_not_an_instance_of_org.apache.tools.ant.BuildListener._1={0} which was specified to be a build listener is not an instance of org.apache.tools.ant.BuildListener.
-InternalAntRunner.{0}_which_was_specified_to_perform_logging_is_not_an_instance_of_org.apache.tools.ant.BuildLogger._2={0} which was specified to perform logging is not an instance of org.apache.tools.ant.BuildLogger.
-InternalAntRunner.You_must_specify_a_classname_when_using_the_-listener_argument_1=You must specify a classname when using the -listener argument
-InternalAntRunner.You_must_specify_a_log_file_when_using_the_-log_argument_3=You must specify a log file when using the -log argument
-InternalAntRunner.You_must_specify_a_buildfile_when_using_the_-buildfile_argument_4=You must specify a buildfile when using the -buildfile argument
-InternalAntRunner.12=print information that might be helpful to
-InternalAntRunner.13=\t\t\t\t\t\t\tdiagnose or report problems.
-InternalAntRunner.19=load all properties from file with -D
-InternalAntRunner.20=\t\t\t\t\t\t\tproperties taking precedence
-InternalAntRunner.22=the class which will handle input requests
-InternalAntRunner.1=\t\t\t\t\'
-InternalAntRunner.Only_one_logger_class_may_be_specified_1=Only one logger class may be specified
-InternalAntRunner.You_must_specify_a_classname_when_using_the_-inputhandler_argument_1=You must specify a classname when using the -inputhandler argument
-InternalAntRunner.Only_one_input_handler_class_may_be_specified._2=Only one input handler class may be specified.
-InternalAntRunner.You_must_specify_a_property_filename_when_using_the_-propertyfile_argument_3=You must specify a property filename when using the -propertyfile argument
-InternalAntRunner.Could_not_load_property_file_{0}__{1}_4=Could not load property file {0}: {1}
-InternalAntRunner.The_specified_input_handler_class_{0}_does_not_implement_the_org.apache.tools.ant.input.InputHandler_interface_5=The specified input handler class {0} does not implement the org.apache.tools.ant.input.InputHandler interface
-InternalAntRunner.Unable_to_instantiate_specified_input_handler_class_{0}___{1}_6=Unable to instantiate specified input handler class {0} : {1}
-InternalAntRunner.The_diagnositics_options_is_an_Ant_1.5.*_feature._Please_update_your_Ant_classpath_to_include_an_Ant_version_greater_than_this._4=The diagnostics options is an Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
-InternalAntRunner.Specifying_property_files_is_a_Ant_1.5.*_feature._Please_update_your_Ant_classpath._6=Specifying property files is a Ant 1.5.* feature. Please update your Ant classpath to include an Ant version greater than this.
-InternalAntRunner.ANT_HOME_must_be_set_to_use_Ant_diagnostics_2=ANT_HOME must be set to use Ant diagnostics
-InternalAntRunner.Buildfile__{0}_is_not_a_file_1=Buildfile: {0} is not a file
-InternalAntRunner.-find_not_supported=-find not supported.\nCan be emulated using Run As > Ant Build located\nin the Run > External Tools menu
-InternalAntRunner.157=-lib not supported\nConfigure the Ant runtime classpath using either the\nglobal Ant runtime classpath or the Ant runtime classpath\n for this particular build
-InternalAntRunner.158=\t\t\tdo not allow interactive input
-InternalAntRunner.159=\t\texecute all targets that do not depend
-InternalAntRunner.160=\t\t\t\t\t\ton failed target(s)
-InternalAntRunner.161=Class {0} not found for task {1}
-InternalAntRunner.162=Class {0} not found for type {1}
-
-RemoteAntBuildLogger.1=BUILD FAILED
-RemoteAntBuildLogger.Total_time=Total time: 
-RemoteAntBuildLogger._minutes_2=\ minutes
-RemoteAntBuildLogger._minute_3=\ minute
-RemoteAntBuildLogger._seconds_4=\ seconds
-RemoteAntBuildLogger._second_5=\ second
-RemoteAntBuildLogger._milliseconds_6=\ milliseconds
-
-SWTInputHandler.0=Unable to respond to input request as a result of the user specified -noinput command
-SWTInputHandler.1=Ant Input Request
-SWTInputHandler.2=Unable to respond to <input> request
-SWTInputHandler.3=Input does not match validargs attribute
-SWTInputHandler.4=OK
-SWTInputHandler.5=Cancel
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/FailInputHandler.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/FailInputHandler.java
deleted file mode 100644
index 474fbdd..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/FailInputHandler.java	
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ant.internal.ui.antsupport.inputhandler;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.tools.ant.input.DefaultInputHandler;
-
-public class FailInputHandler extends DefaultInputHandler {
-	
-	protected InputStream getInputStream() {
-		//ensure any attempts to read input fail
-		return new InputStream(){
-			public int read() throws IOException {
-				throw new IOException();
-			}
-		};
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java
new file mode 100644
index 0000000..c232458
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.java	
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ant.internal.ui.antsupport.inputhandler;
+
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class RemoteAntMessages {
+
+	private static final String BUNDLE_NAME = "org.eclipse.ant.internal.ui.antsupport.inputhandler.RemoteAntMessages"; //$NON-NLS-1$
+
+	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+	private RemoteAntMessages() {
+	}
+
+	public static String getString(String key) {
+		try {
+			return RESOURCE_BUNDLE.getString(key);
+		} catch (MissingResourceException e) {
+			return '!' + key + '!';
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties
new file mode 100644
index 0000000..3022e69
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/RemoteAntMessages.properties	
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+SWTInputHandler.0=Unable to respond to input request as a result of the user specified -noinput command
+SWTInputHandler.1=Ant Input Request
+SWTInputHandler.2=Unable to respond to <input> request
+SWTInputHandler.3=Input does not match validargs attribute
+SWTInputHandler.4=OK
+SWTInputHandler.5=Cancel
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java
index 5662ba6..6b77f13 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java	
+++ b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/inputhandler/SWTInputHandler.java	
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Brock Janiczak (brockj at tpg.com.au) - Bug 145736
@@ -18,7 +18,6 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.input.DefaultInputHandler;
 import org.apache.tools.ant.input.InputRequest;
 import org.apache.tools.ant.input.MultipleChoiceInputRequest;
-import org.eclipse.ant.internal.ui.antsupport.RemoteAntMessages;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/MessageIds.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/MessageIds.java
deleted file mode 100644
index 7540a19..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/MessageIds.java	
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger;
-
-
-public class MessageIds {
-
-	public final static String PROCESS_ID=   "processID"; //$NON-NLS-1$
-	public final static String BUILD_CANCELLED= "cancelled"; //$NON-NLS-1$
-    //constants need to start greater than the Project.MSG_* constants
-	public final static String TASK= "6"; //$NON-NLS-1$
-	public final static String TARGET= "7"; //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/RemoteAntBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/RemoteAntBuildLogger.java
deleted file mode 100644
index 7362c85..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/RemoteAntBuildLogger.java	
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger;
-
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.StringReader;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Target;
-import org.apache.tools.ant.util.StringUtils;
-import org.eclipse.ant.internal.ui.antsupport.AntSecurityException;
-import org.eclipse.ant.internal.ui.antsupport.InternalAntRunner;
-import org.eclipse.ant.internal.ui.antsupport.RemoteAntMessages;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.AntDebugState;
-
-/**
- * Parts adapted from org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
- * A build logger that reports via a socket connection.
- * See MessageIds for more information about the protocol.
- */
-public class RemoteAntBuildLogger extends DefaultLogger {
-
-    /** Time of the start of the build */
-    private long fStartTime = System.currentTimeMillis();
-
-    /**
-     * The client socket.
-     */
-    private Socket fEventSocket;
-    /**
-     * Print writer for sending messages
-     */
-    private PrintWriter fWriter;
-    /**
-     * Host to connect to, default is the localhost
-     */
-    protected String fHost= ""; //$NON-NLS-1$
-    /**
-     * Port to connect to.
-     */
-    private int fEventPort= -1;
-    
-    private String fProcessId= null;
-    
-    /**
-     * Is the debug mode enabled?
-     */
-    protected boolean fDebugMode= false;    
-    
-    protected boolean fSentProcessId= false;
-    
-    private List fEventQueue;
-    
-    private String fLastFileName= null;
-    private String fLastTaskName= null;
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.DefaultLogger#printMessage(java.lang.String, java.io.PrintStream, int)
-     */
-    protected void printMessage(String message, PrintStream stream, int priority) {
-        marshalMessage(priority, message);
-    }
-    
-    /**
-     * Connect to the remote Ant build listener.
-     */
-    protected void connect() {
-        if (fDebugMode) {
-            System.out.println("RemoteAntBuildLogger: trying to connect" + fHost + ":" + fEventPort); //$NON-NLS-1$ //$NON-NLS-2$
-        }
-        
-        for (int i= 1; i < 5; i++) {
-            try{
-                fEventSocket= new Socket(fHost, fEventPort);
-                fWriter= new PrintWriter(fEventSocket.getOutputStream(), true);
-                return;
-            } catch(IOException e){
-            }
-            try {
-                Thread.sleep(500);
-            } catch(InterruptedException e) {
-            }
-        }
-        shutDown();
-    }
-
-    /**
-     * Shutdown the connection to the remote build listener.
-     */
-    protected void shutDown() {
-        if (fEventQueue != null) {
-            fEventQueue.clear();
-        }
-        if (fWriter != null) {
-            fWriter.close();
-            fWriter= null;
-        }
-        
-        try {
-            if (fEventSocket != null) {
-                fEventSocket.close();
-                fEventSocket= null;
-            }
-        } catch(IOException e) {
-        }
-    }
-
-    private void sendMessage(String msg) {
-        if (fWriter == null) {
-            return;
-        }
-        
-        fWriter.println(msg);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#buildFinished(org.apache.tools.ant.BuildEvent)
-     */
-    public void buildFinished(BuildEvent event) {
-        if (!fSentProcessId) {
-            establishConnection();
-        }
-        handleException(event);
-        printMessage( getTimeString(System.currentTimeMillis() - fStartTime), out, Project.MSG_INFO); 
-        shutDown();
-    }
-    
-    protected void handleException(BuildEvent event) {
-        Throwable exception = event.getException();
-        if (exception == null || exception instanceof AntSecurityException) {
-            return;
-        }
-        
-         StringBuffer message= new StringBuffer();
-         message.append(StringUtils.LINE_SEP);
-         message.append(RemoteAntMessages.getString("RemoteAntBuildLogger.1")); //$NON-NLS-1$
-         message.append(StringUtils.LINE_SEP);
-         if (Project.MSG_VERBOSE <= this.msgOutputLevel || !(exception instanceof BuildException)) {
-             message.append(StringUtils.getStackTrace(exception));
-         } else {
-             if (exception instanceof BuildException) {
-                 message.append(exception.toString()).append(StringUtils.LINE_SEP);
-             } else {
-                 message.append(exception.getMessage()).append(StringUtils.LINE_SEP);
-             }
-         }
-        message.append(StringUtils.LINE_SEP);
-        printMessage(message.toString(), out, Project.MSG_ERR); 
-    }
-    
-    private String getTimeString(long milliseconds) {
-        long seconds = milliseconds / 1000;
-        long minutes = seconds / 60;
-        seconds= seconds % 60;
-
-        StringBuffer result= new StringBuffer(RemoteAntMessages.getString("RemoteAntBuildLogger.Total_time")); //$NON-NLS-1$
-        if (minutes > 0) {
-            result.append(minutes);
-            if (minutes > 1) {
-                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._minutes_2")); //$NON-NLS-1$
-            } else {
-                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._minute_3")); //$NON-NLS-1$
-            }
-        }
-        if (seconds > 0) {
-            if (minutes > 0) {
-                result.append(' ');
-            }
-            result.append(seconds);
-    
-            if (seconds > 1) {
-                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._seconds_4")); //$NON-NLS-1$
-            } else {
-                result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._second_5")); //$NON-NLS-1$
-            } 
-        }
-        if (seconds == 0 && minutes == 0) {
-            result.append(milliseconds);
-            result.append(RemoteAntMessages.getString("RemoteAntBuildLogger._milliseconds_6"));      //$NON-NLS-1$
-        }
-        return result.toString();
-    }
-            
-
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
-     */
-    public void targetStarted(BuildEvent event) {
-        if (!fSentProcessId) {
-            establishConnection();
-        }
-
-        if (Project.MSG_INFO <= msgOutputLevel) {
-            marshalTargetMessage(event);
-        }
-    }
-
-    protected void establishConnection() {
-        if (fEventPort != -1) {
-            connect();
-        } else {
-            shutDown();
-            return;
-        }
-        
-        fSentProcessId= true;
-        StringBuffer message= new StringBuffer(MessageIds.PROCESS_ID);
-        message.append(fProcessId);
-        sendMessage(message.toString());
-        if (fEventQueue != null) {
-            for (Iterator iter = fEventQueue.iterator(); iter.hasNext();) {
-                processEvent((BuildEvent)iter.next());
-            }
-            fEventQueue= null;
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#messageLogged(org.apache.tools.ant.BuildEvent)
-     */
-    public void messageLogged(BuildEvent event) {
-        if (event.getPriority() > msgOutputLevel && event.getPriority() != InternalAntRunner.MSG_PROJECT_HELP) {
-            return;
-        }
-        
-        if (!fSentProcessId) {
-            if (event.getPriority() == InternalAntRunner.MSG_PROJECT_HELP) {
-                if (Project.MSG_INFO > msgOutputLevel) {
-                    return;
-                }
-                //no buildstarted or project started for project help option
-                establishConnection();
-                return;
-            }
-            if (fEventQueue == null){
-                fEventQueue= new ArrayList(10);
-            }
-            fEventQueue.add(event);
-            return;
-        }
-        
-        processEvent(event);
-    }
-
-    private void processEvent(BuildEvent event) {
-        if (event.getTask() != null & !emacsMode) {
-            try {
-                marshalTaskMessage(event);
-            } catch (IOException e) {
-            }
-        } else {
-            marshalMessage(event);
-        }
-    }
-    
-    private void marshalMessage(BuildEvent event) {
-        String eventMessage= event.getMessage();
-        if (eventMessage.length() == 0) {
-            return;
-        }
-        marshalMessage(event.getPriority(), eventMessage);
-    }
-
-    protected void marshalMessage(int priority, String message) {
-        try {
-            BufferedReader r = new BufferedReader(new StringReader(message));
-            String line = r.readLine();
-            StringBuffer messageLine;
-            while (line != null) {
-                messageLine= new StringBuffer();
-                if (priority != -1) {
-                    messageLine.append(priority);
-                    messageLine.append(',');
-                }
-                messageLine.append(line);
-                sendMessage(messageLine.toString());
-                line = r.readLine();
-            }
-        } catch (IOException e) {
-        }
-    }
-
-    private void marshalTaskMessage(BuildEvent event) throws IOException {
-        String eventMessage= event.getMessage();
-        if (eventMessage.length() == 0) {
-            return;
-        }
-        BufferedReader r = new BufferedReader(new StringReader(eventMessage));
-        String line = r.readLine();
-        StringBuffer message;
-        String taskName= event.getTask().getTaskName();
-        if (taskName != null && taskName.equals(fLastTaskName)) {
-            taskName= ""; //$NON-NLS-1$
-        } else {
-            fLastTaskName= taskName;
-        }
-        Location location= event.getTask().getLocation();
-        String fileName= null;
-        int lineNumber= -1;
-        try {
-            fileName= location.getFileName();
-            lineNumber= location.getLineNumber();
-        } catch (NoSuchMethodError e) {
-            //older Ant
-            fileName= location.toString();
-        }
-        if (location.equals(Location.UNKNOWN_LOCATION)) {
-            fileName= location.toString();
-            lineNumber= -1;
-        }
-        int priority= event.getPriority();
-        while (line != null) {
-            message= new StringBuffer(MessageIds.TASK);
-            message.append(priority);
-            message.append(',');
-            message.append(taskName);
-            message.append(',');
-            message.append(line.length());
-            message.append(',');
-            message.append(line);
-            message.append(',');
-            if (!fileName.equals(fLastFileName)) {
-            	message.append(fileName.length());
-            	message.append(',');
-                message.append(fileName);
-            } 
-            message.append(',');
-            message.append(lineNumber);
-            sendMessage(message.toString());
-            fLastFileName= fileName;
-            line= r.readLine();
-        }
-    }
-    
-    private void marshalTargetMessage(BuildEvent event) {
-        Target target= event.getTarget();
-        Location location= AntDebugState.getLocation(target);
-        
-        StringBuffer message= new StringBuffer();
-        message.append(MessageIds.TARGET);
-        message.append(',');
-        message.append(target.getName());
-        message.append(':');
-        message.append(',');
-        if (location != null && location != Location.UNKNOWN_LOCATION) {
-            //if a target has a valid location then we are on an Ant that is 
-            //new enough to have the accessor methods on Location
-        	String fileName= location.getFileName();
-        	message.append(fileName.length());
-        	message.append(',');
-            message.append(fileName);
-            message.append(',');
-            message.append(location.getLineNumber());
-        }
-        sendMessage(message.toString());
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
-     */
-    public void buildStarted(BuildEvent event) {
-        establishConnection();
-        super.buildStarted(event);
-    }
-    
-    public void configure(Map userProperties) {
-        String portProperty= (String) userProperties.remove("eclipse.connect.port"); //$NON-NLS-1$
-        
-        if (portProperty != null) {
-            fEventPort= Integer.parseInt(portProperty);
-        }
-        
-        fProcessId= (String) userProperties.remove("org.eclipse.ant.core.ANT_PROCESS_ID"); //$NON-NLS-1$
-    } 
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntBreakpoint.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntBreakpoint.java
deleted file mode 100644
index 9645b72..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntBreakpoint.java	
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger.debug;
-
-import java.io.File;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.DebugMessageIds;
-
-public class RemoteAntBreakpoint {
-	
-    private File fFile;
-	private int fLineNumber;
-	private String fFileName;
-	
-	public RemoteAntBreakpoint(String breakpointRepresentation) {
-		String[] data= breakpointRepresentation.split(DebugMessageIds.MESSAGE_DELIMITER);
-		String fileName= data[1];
-		String lineNumber= data[2];
-		fFileName= fileName;
-		fFile= new File(fileName);
-		fLineNumber= Integer.parseInt(lineNumber);
-	}
-
-	public boolean isAt(String fileName, int lineNumber) {
-		return fLineNumber == lineNumber && fileName != null && fFile.equals(new File(fileName));
-	}
-	
-	public String toMarshallString() {
-		StringBuffer buffer= new StringBuffer(DebugMessageIds.BREAKPOINT);
-		buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
-		buffer.append(fFileName);
-		buffer.append(DebugMessageIds.MESSAGE_DELIMITER);
-		buffer.append(fLineNumber);
-		return buffer.toString();
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (!(obj instanceof RemoteAntBreakpoint)) {
-			return false;
-		}
-		RemoteAntBreakpoint other= (RemoteAntBreakpoint) obj;
-		return other.getLineNumber() == fLineNumber && other.getFile().equals(fFile);
-	}
-	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return fFileName.hashCode() + fLineNumber;
-	}
-	
-	public int getLineNumber() {
-		return fLineNumber;
-	}
-
-	public String getFileName() {
-		return fFileName;
-	}
-	
-	public File getFile() {
-	    return fFile;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntDebugBuildLogger.java b/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntDebugBuildLogger.java
deleted file mode 100644
index 9b18e45..0000000
--- a/eclipse/plugins/org.eclipse.ant.ui/Remote Ant Support/org/eclipse/ant/internal/ui/antsupport/logger/debug/RemoteAntDebugBuildLogger.java	
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ant.internal.ui.antsupport.logger.debug;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildEvent;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.Task;
-import org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.AntDebugState;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.DebugMessageIds;
-import org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger;
-
-/**
- * Parts adapted from org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
- * A build logger that reports via a socket connection.
- * See DebugMessageIds and MessageIds for more information about the protocol.
- */
-public class RemoteAntDebugBuildLogger extends RemoteAntBuildLogger implements IDebugBuildLogger {
-	
-	private ServerSocket fServerSocket;
-	private static final int fgServerSocketTimeout= 5000;
-	private Socket fRequestSocket;
-	
-	private PrintWriter fRequestWriter;
-	
-	private BufferedReader fRequestReader;
-	
-    private boolean fBuildStartedSuspend= true;
-	
-	private Task fStepOverTaskInterrupted;
-	
-	private List fBreakpoints= null;
-	
-	/**
-	 * Request port to connect to.
-	 * Used for debug connections
-	 */
-	private int fRequestPort= -1;
-	private AntDebugState fDebugState;
-
-	/**
-	 * Reader thread that processes requests from the debug client.
-	 */
-	private class ReaderThread extends Thread {
-		public ReaderThread() {
-			super("ReaderThread"); //$NON-NLS-1$
-			setDaemon(true);
-		}
-
-		public void run(){
-			try { 
-				String message= null; 
-				while (fRequestReader != null) { 
-					if ((message= fRequestReader.readLine()) != null) {
-						
-						if (message.startsWith(DebugMessageIds.STEP_INTO)){
-							synchronized(RemoteAntDebugBuildLogger.this) {
-								fDebugState.setStepIntoSuspend(true);
-								fDebugState.setStepIntoTask(fDebugState.getCurrentTask());
-								RemoteAntDebugBuildLogger.this.notifyAll();
-							}
-						} if (message.startsWith(DebugMessageIds.STEP_OVER)){
-							synchronized(RemoteAntDebugBuildLogger.this) {
-								fDebugState.stepOver();
-							}
-						} else if (message.startsWith(DebugMessageIds.SUSPEND)) {
-							synchronized(RemoteAntDebugBuildLogger.this) {
-								fDebugState.setStepIntoTask(null);
-								fDebugState.setStepOverTask(null);
-								fStepOverTaskInterrupted= null;
-								fDebugState.setClientSuspend(true);
-							}
-						} else if (message.startsWith(DebugMessageIds.RESUME)) {
-							synchronized(RemoteAntDebugBuildLogger.this) {
-								fDebugState.setStepIntoTask(null);
-								fDebugState.setStepOverTask(null);
-								fStepOverTaskInterrupted= null;
-								RemoteAntDebugBuildLogger.this.notifyAll();
-							}
-						} else if (message.startsWith(DebugMessageIds.TERMINATE)) {
-						    sendRequestResponse(DebugMessageIds.TERMINATED);
-							shutDown();
-						} else if (message.startsWith(DebugMessageIds.STACK)) {
-							marshallStack();
-						} else if (message.startsWith(DebugMessageIds.ADD_BREAKPOINT)) {
-							addBreakpoint(message);
-						} else if (message.startsWith(DebugMessageIds.REMOVE_BREAKPOINT)) {
-							removeBreakpoint(message);
-						}  else if (message.startsWith(DebugMessageIds.PROPERTIES)) {
-							marshallProperties();
-						}
-					}
-				} 
-			} catch (Exception e) {
-				RemoteAntDebugBuildLogger.this.shutDown();
-			}
-		}
-	}
-	
-	private void requestConnect() {
-		if (fDebugMode) {
-			System.out.println("RemoteAntDebugBuildLogger: trying to connect" + fHost + ":" + fRequestPort); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		
-		try{
-			fServerSocket.setSoTimeout(fgServerSocketTimeout);
-			fRequestSocket= fServerSocket.accept();
-			fRequestWriter= new PrintWriter(fRequestSocket.getOutputStream(), true);
-			fRequestReader = new BufferedReader(new InputStreamReader(fRequestSocket.getInputStream()));
-			
-			ReaderThread readerThread= new ReaderThread();
-			readerThread.setDaemon(true);
-			readerThread.start();
-			return;
-		} catch(SocketTimeoutException e){
-		} catch(IOException e) {
-		}
-		shutDown();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger#shutDown()
-	 */
-	protected void shutDown() {
-		if (fRequestWriter != null) {
-			fRequestWriter.close();
-			fRequestWriter= null;
-		}
-		
-		if (fRequestReader != null) {
-			try {
-				fRequestReader.close();
-			} catch (IOException e) {
-			}
-			fRequestReader= null;
-		}
-		
-		if (fRequestSocket != null) {
-			try {
-				fRequestSocket.close();	
-			} catch(IOException e) {
-			}
-		}
-		fRequestSocket= null;
-		
-		super.shutDown();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#buildStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public synchronized void buildStarted(BuildEvent event) {
-		fDebugState= new AntDebugState(this);
-		super.buildStarted(event);
-		marshalMessage(-1, DebugMessageIds.BUILD_STARTED);
-		if (fRequestPort != -1) {
-			try {
-				fServerSocket= new ServerSocket(fRequestPort);
-			} catch (IOException ioe) {
-				shutDown();
-			}
-			requestConnect();
-		} else {
-			shutDown();
-		}
-        fDebugState.buildStarted();
-		fDebugState.setShouldSuspend(true);
-		waitIfSuspended();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#taskStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void taskStarted(BuildEvent event) {
-        super.taskStarted(event);
-		fDebugState.taskStarted(event);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#taskFinished(org.apache.tools.ant.BuildEvent)
-	 */
-	public synchronized void taskFinished(BuildEvent event) {
-		super.taskFinished(event);
-		fDebugState.taskFinished();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ant.internal.ui.antsupport.logger.util.IDebugBuildLogger#waitIfSuspended()
-	 */
-	public synchronized void waitIfSuspended() {
-		String detail= null;
-		boolean shouldSuspend= true;
-		RemoteAntBreakpoint breakpoint= breakpointAtLineNumber(fDebugState.getBreakpointLocation());
-		if (breakpoint != null) {
-			detail= breakpoint.toMarshallString();
-			fDebugState.setShouldSuspend(false);
-			if (fDebugState.getStepOverTask() != null) {
-				fStepOverTaskInterrupted= fDebugState.getStepOverTask();
-				fDebugState.setStepOverTask(null);
-			}
-		} else if (fDebugState.getCurrentTask() != null) {
-	        if (fDebugState.isStepIntoSuspend()) {
-	            detail= DebugMessageIds.STEP;
-				fDebugState.setStepIntoSuspend(false);
-	        } else if ((fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepOverTask()) || fDebugState.shouldSuspend()) {
-	        	//suspend as a step over has finished
-	        	detail= DebugMessageIds.STEP;
-				fDebugState.setStepOverTask(null);
-				fDebugState.setShouldSuspend(false);
-	        } else if (fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fDebugState.getStepIntoTask()) {
-	        	//suspend as a task that was stepped into has finally completed
-	        	 detail= DebugMessageIds.STEP;
-	        	 fDebugState.setStepIntoTask(null);
-	        } else if (fDebugState.getLastTaskFinished() != null && fDebugState.getLastTaskFinished() == fStepOverTaskInterrupted) {
-	        	//suspend as a task that was stepped over but hit a breakpoint has finally completed
-	        	 detail= DebugMessageIds.STEP;
-	        	 fStepOverTaskInterrupted= null;
-	        } else if (fDebugState.isClientSuspend()) {
-	            detail= DebugMessageIds.CLIENT_REQUEST;
-				fDebugState.setClientSuspend(false);
-	        } else {
-	            shouldSuspend= false;
-	        }
-	    } else if (fDebugState.shouldSuspend() && fBuildStartedSuspend) {
-            fBuildStartedSuspend= false;
-			fDebugState.setShouldSuspend(false);
-	    } else {
-			shouldSuspend= false;
-	    }
-		
-		if (shouldSuspend) {
-			if (detail != null) {
-				StringBuffer message= new StringBuffer(DebugMessageIds.SUSPENDED);
-				message.append(detail);
-				sendRequestResponse(message.toString());
-			}
-			 try {
-				 wait();
-                 shouldSuspend= false;
-			 } catch (InterruptedException e) {
-			 }
-		}
-	}
-
-	private RemoteAntBreakpoint breakpointAtLineNumber(Location location) {
-		if (fBreakpoints == null || location == null || location == Location.UNKNOWN_LOCATION) {
-			return null;
-		}
-		String fileName= fDebugState.getFileName(location);
-		int lineNumber= fDebugState.getLineNumber(location);
-		for (int i = 0; i < fBreakpoints.size(); i++) {
-			RemoteAntBreakpoint breakpoint = (RemoteAntBreakpoint) fBreakpoints.get(i);
-			if (breakpoint.isAt(fileName, lineNumber)) {
-				return breakpoint;
-			}
-		}
-		return null;
-	}
-
-	private void sendRequestResponse(String message) {
-		if (fRequestWriter == null) {
-			return;
-		}
-		
-		fRequestWriter.println(message);
-	}
-	
-	protected void marshallStack() {
-	    StringBuffer stackRepresentation= new StringBuffer();
-	    fDebugState.marshalStack(stackRepresentation);
-	    sendRequestResponse(stackRepresentation.toString());
-	}
-	
-	protected void marshallProperties() {
-	    StringBuffer propertiesRepresentation= new StringBuffer();
-		fDebugState.marshallProperties(propertiesRepresentation, true);
-	    sendRequestResponse(propertiesRepresentation.toString());
-	}
-	
-	protected void addBreakpoint(String breakpointRepresentation) {
-		if (fBreakpoints == null) {
-			fBreakpoints= new ArrayList();
-		}
-		RemoteAntBreakpoint newBreakpoint= new RemoteAntBreakpoint(breakpointRepresentation);
-		if (!fBreakpoints.contains(newBreakpoint)) {
-			fBreakpoints.add(newBreakpoint);	
-		}
-	}
-	
-	protected void removeBreakpoint(String breakpointRepresentation) {
-		if (fBreakpoints == null) {
-			return;
-		} 
-		RemoteAntBreakpoint equivalentBreakpoint= new RemoteAntBreakpoint(breakpointRepresentation);
-		for (Iterator iter = fBreakpoints.iterator(); iter.hasNext(); ) {
-			RemoteAntBreakpoint breakpoint = (RemoteAntBreakpoint) iter.next();
-			if (breakpoint.equals(equivalentBreakpoint)) {
-				iter.remove();
-				return;
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.BuildListener#targetStarted(org.apache.tools.ant.BuildEvent)
-	 */
-	public void targetStarted(BuildEvent event) {
-		fDebugState.targetStarted(event);
-		if (!fSentProcessId) {
-			establishConnection();
-		}
-		waitIfSuspended();
-		super.targetStarted(event);
-	}
-    
-    /* (non-Javadoc)
-     * @see org.apache.tools.ant.BuildListener#targetFinished(org.apache.tools.ant.BuildEvent)
-     */
-    public void targetFinished(BuildEvent event) {
-        super.targetFinished(event);
-		fDebugState.setTargetExecuting(null);
-    }   
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ant.internal.ui.antsupport.logger.RemoteAntBuildLogger#configure(java.util.Map)
-     */
-    public void configure(Map userProperties) {
-       super.configure(userProperties);
-       String requestPortProperty= (String) userProperties.remove("eclipse.connect.request_port"); //$NON-NLS-1$
-        if (requestPortProperty != null) {
-            fRequestPort= Integer.parseInt(requestPortProperty);
-        }
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ant.ui/about.html b/eclipse/plugins/org.eclipse.ant.ui/about.html
index 82018d7..1e94d07 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/about.html
+++ b/eclipse/plugins/org.eclipse.ant.ui/about.html
@@ -8,7 +8,7 @@
 <body lang="EN-US">
 <h2>About This Content</h2>
  
-<p>May 11, 2006</p>	
+<p>October 8, 2009</p>	
 <h3>License</h3>
 
 <p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
@@ -31,16 +31,15 @@ did not receive this Content directly from the Eclipse Foundation, the following
 for informational purposes only, and you should look to the Redistributor’s license for 
 terms and conditions of use.</p>
 
-<h4>Ant 1.6.5</h4>
+<h4>Ant 1.7.1</h4>
 
 <p>The following classes in the plug-in JAR are based on Ant code developed by The Apache Software Foundation and shall be defined as the "Ant-Derived Work":</p>
 
 <ul>
-	<li>org.eclipse.ant.internal.ui.antsupport.InternalAntRunner</li>
 	<li>org.eclipse.ant.internal.ui.editor.utils.ProjectHelper</li>
 </ul>
 
-<p>The object code for InternalAntRunner is located in lib/remoteAnt.jar and the source code is located in lib/remoteAntsrc.zip.  The object code for ProjectHelper is located
+<p>The object code for ProjectHelper is located
 in the plug-in JAR and the source code is located in src.zip.</p>
 
 <p>Your use of the Ant-Derived Work is subject to the terms and conditions of the Apache Software License 2.0.  A copy of the license is contained
diff --git a/eclipse/plugins/org.eclipse.ant.ui/build.properties b/eclipse/plugins/org.eclipse.ant.ui/build.properties
index 9f72dc7..99a5cc4 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.ant.ui/build.properties
@@ -1,21 +1,19 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 source.. = Ant Tools Support/,\
                    Ant Editor/
 
-source.lib/antrunner.jar = Ant Runner Support/,\
-                           Common Ant Support/
+source.lib/antrunner.jar = Ant Runner Support/
 
-source.lib/remoteAnt.jar = Remote Ant Support/,\
-                           Common Ant Support/
+source.lib/remoteAnt.jar = Remote Ant Support/
 
 src.includes = about.html,\
                about_files/
@@ -31,7 +29,5 @@ bin.includes = icons/,\
                about_files/
 				
 jars.compile.order=.,lib/antrunner.jar,lib/remoteAnt.jar
-output.lib/antrunner.jar = ant_runner_support_bin/,\
-                           common_ant_support_bin/
-output.lib/remoteAnt.jar = common_ant_support_bin/,\
-                           remote_support_bin/
+output.lib/antrunner.jar = ant_runner_support_bin/
+output.lib/remoteAnt.jar = remote_support_bin/
diff --git a/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml b/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml
index 276b2c7..55cd644 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml
+++ b/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildExtraJAR.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+    Copyright (c) 2005, 2009 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -44,7 +44,6 @@
 					<include name="org.eclipse.debug.ui/bin"/>
 					<include name="org.eclipse.ui.console/bin"/>
 			 		<include name="org.eclipse.jface/bin"/>
-					<include name="org.eclipse.ant.ui/common_ant_support_bin"/>
 					<include name="org.eclipse.osgi/bin"/>
 				</dirset>
 				<fileset dir="${eclipse.home}">
@@ -67,7 +66,6 @@
 		<!-- copy necessary resources -->
 		<copy todir="${destdir}">
 			<fileset dir="Ant Runner Support/" excludes="**/*.java"/>
-			<fileset dir="${basedir}/common_ant_support_bin"/>
 		</copy>
 		<mkdir dir="${build.result.folder}/lib"/>
 		<jar destfile="${build.result.folder}/lib/antrunner.jar" basedir="${destdir}"/>
diff --git a/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml b/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
index 111c237..9c485e4 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
+++ b/eclipse/plugins/org.eclipse.ant.ui/buildfiles/buildRemoteExtraJAR.xml
@@ -1,4 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
+    Copyright (c) 2005, 2009 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <project name="Build AntUI Remote Ant support JAR" default="build" basedir="..">
 
 	<target name="build" description="Cleans, builds and refreshes" depends="clean, lib/remoteAntLib.jar"/>
@@ -30,11 +40,12 @@
 			<classpath>
 				<dirset dir="${basedir}/..">
 					<include name="org.eclipse.swt*/bin"/>
-					<include name="org.eclipse.ant.ui/common_ant_support_bin"/>
+					<include name="org.eclipse.ant.launching/common_bin"/>
 				</dirset>
 				<fileset dir="${eclipse.home}">
 					<include name="plugins/org.eclipse.swt*.jar"/>
 					<include name="plugins/org.eclipse.osgi*.jar"/>
+					<include name="plugins/org.eclipse.ant.launching*.jar"/>
 				</fileset>
 			</classpath>
 			<src path="Remote Ant Support/"/>
@@ -42,7 +53,6 @@
 		<!-- copy necessary resources -->
 		<copy todir="${destdir}">
 			<fileset dir="Remote Ant Support/" excludes="**/*.java"/>
-			<fileset dir="${basedir}/common_ant_support_bin"/>
 		</copy>
 		<mkdir dir="${build.result.folder}/lib"/>
 		<jar destfile="${build.result.folder}/lib/remoteAnt.jar" basedir="${destdir}"/>
diff --git a/eclipse/plugins/org.eclipse.ant.ui/icons/full/obj16/new_ant_project.gif b/eclipse/plugins/org.eclipse.ant.ui/icons/full/obj16/new_ant_project.gif
new file mode 100644
index 0000000..e77d13b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ant.ui/icons/full/obj16/new_ant_project.gif differ
diff --git a/eclipse/plugins/org.eclipse.ant.ui/plugin.properties b/eclipse/plugins/org.eclipse.ant.ui/plugin.properties
index 5ed6d5c..fdc1ee2 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ant.ui/plugin.properties
@@ -12,17 +12,11 @@
 pluginName = Ant UI
 providerName = Eclipse.org
 
-AntBuild = Ant Build
-AntBuilder.name=Ant Builder
 AntLaunchShortcut.label = Ant Build
 AntLaunchShortcutWithDialog.label = Ant Build...
 antLaunchConfigurationTabGroup.description=Run an Ant build file.
 antBuilderLaunchConfigurationTabGroup.description=Create a configuration that will run an Ant build file during a build.
 
-AntLaunchDelegate.name=Eclipse Ant Launcher
-AntLaunchDelegate.description=The Eclipse Ant Launcher supports running and debugging Ant build files.
-AntBuilderLaunchDelegate.name= Eclipse Ant Builder Launcher
-AntBuilderLaunchDelegate.description=The Eclipse Ant Builder Launcher supports running Ant build files.
 AntBuild...Shortcut.description=Launches an Ant build and allows it to be configured 
 AntBuildShortcut.description=Launches an Ant build with default settings
 
@@ -106,5 +100,3 @@ AntRenameParticipant.name= Ant launch configuration rename participant
 AntElementHyperlinkDetector.description= A hyperlink detector for Ant buildfile elements
 AntElementHyperlinkDetector.label= Ant Element
 AntEditorHyperlinkTarget.name= Ant Editor
-
-AntLineBreakpoint.name = Ant Line Breakpoint
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ant.ui/plugin.xml b/eclipse/plugins/org.eclipse.ant.ui/plugin.xml
index 99e4aa6..bc7bb06 100644
--- a/eclipse/plugins/org.eclipse.ant.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ant.ui/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -24,48 +25,6 @@
       </editor>
    </extension>
    <extension
-         point="org.eclipse.debug.core.launchConfigurationTypes">
-      <launchConfigurationType
-            category="org.eclipse.ui.externaltools"
-            delegate="org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate"
-            delegateDescription="%AntLaunchDelegate.description"
-            delegateName="%AntLaunchDelegate.name"
-            id="org.eclipse.ant.AntLaunchConfigurationType"
-            migrationDelegate="org.eclipse.ant.internal.ui.launchConfigurations.AntMigrationDelegate"
-            modes="run, debug"
-            name="%AntBuild"
-            sourceLocatorId="org.eclipse.ant.ui.debug.sourceLookupDirector"
-            sourcePathComputerId="org.eclipse.ant.ui.debug.sourcePathComputer">
-      </launchConfigurationType>
-      <launchConfigurationType
-            category="org.eclipse.ui.externaltools.builder"
-            delegate="org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate"
-            delegateDescription="%AntBuilderLaunchDelegate.description"
-            delegateName="%AntBuilderLaunchDelegate.name"
-            id="org.eclipse.ant.AntBuilderLaunchConfigurationType"
-            modes="run"
-            name="%AntBuilder.name">
-      </launchConfigurationType>
-   </extension>
-   <extension
-         point="org.eclipse.jdt.launching.classpathProviders">
-      <classpathProvider
-            class="org.eclipse.ant.internal.ui.launchConfigurations.AntClasspathProvider"
-            id="org.eclipse.ant.ui.AntClasspathProvider">
-      </classpathProvider>
-   </extension>
-   <extension
-         point="org.eclipse.jdt.launching.runtimeClasspathEntries">
-      <runtimeClasspathEntry
-            class="org.eclipse.ant.internal.ui.launchConfigurations.AntHomeClasspathEntry"
-            id="org.eclipse.ant.ui.classpathentry.antHome">
-      </runtimeClasspathEntry>
-      <runtimeClasspathEntry
-            class="org.eclipse.ant.internal.ui.launchConfigurations.ContributedClasspathEntriesEntry"
-            id="org.eclipse.ant.ui.classpathentry.extraClasspathEntries">
-      </runtimeClasspathEntry>
-   </extension>
-   <extension
          point="org.eclipse.ui.views">
       <category
             name="%CategoryView.antViews"
@@ -553,13 +512,6 @@ M4 = Platform-specific fourth key -->
             id="org.eclipse.ant.ui.statusHandler.runAntInit">
       </statusHandler>
    </extension>
-   <extension
-         point="org.eclipse.debug.core.processFactories">
-      <processFactory
-            class="org.eclipse.ant.internal.ui.launchConfigurations.RemoteAntProcessFactory"
-            id="org.eclipse.ant.ui.remoteAntProcessFactory">
-      </processFactory>
-   </extension>
    
    <extension
          point="org.eclipse.ui.editors.templates">
@@ -609,7 +561,7 @@ M4 = Platform-specific fourth key -->
          point="org.eclipse.ui.newWizards">
     <wizard
             name="%antNewJavaProjectWizard.name"
-            icon="$nl$/icons/full/obj16/ant.gif"
+            icon="$nl$/icons/full/obj16/new_ant_project.gif"
             class="org.eclipse.ant.internal.ui.datatransfer.AntNewJavaProjectWizard"
             preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective,org.eclipse.jdt.ui.JavaBrowsingPerspective,org.eclipse.jdt.ui.JavaHierarchyPerspective"
             project="true"
@@ -648,14 +600,14 @@ M4 = Platform-specific fourth key -->
          point="org.eclipse.debug.core.sourceLocators">
       <sourceLocator
             name="%antSourceLookupDirector.name"
-            class="org.eclipse.ant.internal.ui.debug.AntSourceLookupDirector"
+            class="org.eclipse.ant.internal.launching.debug.AntSourceLookupDirector"
             id="org.eclipse.ant.ui.debug.sourceLookupDirector">
       </sourceLocator>
    </extension>
    <extension
          point="org.eclipse.debug.core.sourcePathComputers">
       <sourcePathComputer
-            class="org.eclipse.ant.internal.ui.debug.AntSourcePathComputerDelegate"
+            class="org.eclipse.ant.internal.launching.debug.AntSourcePathComputerDelegate"
             id="org.eclipse.ant.ui.debug.sourcePathComputer">
       </sourcePathComputer>
    </extension>
@@ -668,23 +620,6 @@ M4 = Platform-specific fourth key -->
    </extension>
    
     <extension
-         point="org.eclipse.debug.core.breakpoints">
-      <breakpoint
-            markerType="org.eclipse.ant.ui.antLineBreakpointMarker"
-            class="org.eclipse.ant.internal.ui.debug.model.AntLineBreakpoint"
-            id="org.eclipse.ant.ui.lineBreakpoint"
-            name="%antBreakpointGroupName">
-      </breakpoint>
-   </extension>
-   <extension
-         id="antLineBreakpointMarker"
-         name="%AntLineBreakpoint.name"
-         point="org.eclipse.core.resources.markers">
-      <super type="org.eclipse.debug.core.lineBreakpointMarker"/>
-      <persistent value="true"/>
-   </extension>
-   
-    <extension
          point="org.eclipse.ui.editorActions">
       <editorContribution
             targetID="org.eclipse.ant.ui.internal.editor.AntEditor"
@@ -809,6 +744,12 @@ M4 = Platform-specific fourth key -->
 	               id="org.eclipse.ant.ui.internal.editor.AntEditor">
 	         </part>
 	      </actionSetPartAssociation>
+    <actionSetPartAssociation
+          targetID="org.eclipse.ui.edit.text.actionSet.presentation">
+       <part
+             id="org.eclipse.ant.ui.internal.editor.AntEditor">
+       </part>
+    </actionSetPartAssociation>
       </extension>
 
          <extension
diff --git a/eclipse/plugins/org.eclipse.compare.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.compare.core/META-INF/MANIFEST.MF
index 32921bd..84ea7ec 100644
--- a/eclipse/plugins/org.eclipse.compare.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.compare.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.compare.core
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.101.qualifier
 Bundle-Activator: org.eclipse.compare.internal.core.ComparePlugin
 Bundle-Vendor: %providerName
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/ComparePlugin.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/ComparePlugin.java
index 080e287..fb52f01 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/ComparePlugin.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/ComparePlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,11 +25,14 @@ public class ComparePlugin extends Plugin {
 
 	// The shared instance
 	private static ComparePlugin plugin;
-	
+
+	private boolean cappingDisabled;
+
 	/**
 	 * The constructor
 	 */
 	public ComparePlugin() {
+		// nothing to do
 	}
 
 	/*
@@ -52,7 +55,7 @@ public class ComparePlugin extends Plugin {
 
 	/**
 	 * Returns the shared instance
-	 *
+	 * 
 	 * @return the shared instance
 	 */
 	public static ComparePlugin getDefault() {
@@ -60,11 +63,19 @@ public class ComparePlugin extends Plugin {
 	}
 
 	public static void log(Throwable e) {
-		log(new Status(IStatus.ERROR, PLUGIN_ID, 0, Messages.Activator_1, e)); 
+		log(new Status(IStatus.ERROR, PLUGIN_ID, 0, Messages.Activator_1, e));
 	}
-	
+
 	public static void log(IStatus status) {
 		getDefault().getLog().log(status);
 	}
 
+	public void setCappingDisabled(boolean disable) {
+		this.cappingDisabled = disable;
+	}
+
+	public boolean isCappingDisabled() {
+		return this.cappingDisabled;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/LCS.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/LCS.java
index f2bdf18..e458e23 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/LCS.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/LCS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.SubMonitor;
 
 /* Used to determine the change set responsible for each line */
 public abstract class LCS {
-	private static final double TOO_LONG = 10000000.0; // the value of N*M when
+	public static final double TOO_LONG = 10000000.0; // the value of N*M when
 														// to start binding the
 														// run time
 
@@ -47,14 +47,14 @@ public abstract class LCS {
 		int length1 = getLength1();
 		int length2 = getLength2();
 		if (length1 == 0 || length2 == 0) {
-			length = 0;
+			this.length = 0;
 			return;
 		}
 
-		max_differences = (length1 + length2 + 1) / 2; // ceil((N+M)/2)
-		if ((double) length1 * (double) length2 > TOO_LONG) {
+		this.max_differences = (length1 + length2 + 1) / 2; // ceil((N+M)/2)
+		if (!isCappingDisabled() && (double) length1 * (double) length2 > TOO_LONG) {
 			// limit complexity to D^POW_LIMIT for long sequences
-			max_differences = (int) Math.pow(max_differences, POW_LIMIT - 1.0);
+			this.max_differences = (int) Math.pow(this.max_differences, POW_LIMIT - 1.0);
 		}
 
 		initializeLcs(length1);
@@ -84,7 +84,7 @@ public abstract class LCS {
 			worked(subMonitor, 1);
 		}
 
-		length = forwardBound
+		this.length = forwardBound
 				+ length1
 				- backBoundL1
 				- 1
@@ -94,6 +94,10 @@ public abstract class LCS {
 
 	}
 
+	private boolean isCappingDisabled() {
+		return ComparePlugin.getDefault().isCappingDisabled();
+	}
+
 	/**
 	 * The recursive helper function for Myers' LCS. Computes the LCS of
 	 * l1[bottoml1 .. topl1] and l2[bottoml2 .. topl2] fills in the appropriate
@@ -205,7 +209,7 @@ public abstract class LCS {
 			isEven = true;
 		}
 
-		int limit = Math.min(max_differences, (N + M + 1) / 2); // ceil((N+M)/2)
+		int limit = Math.min(this.max_differences, (N + M + 1) / 2); // ceil((N+M)/2)
 
 		int value_to_add_forward; // a 0 or 1 that we add to the start offset
 									// to make it odd/even
@@ -449,6 +453,6 @@ public abstract class LCS {
 	protected abstract void initializeLcs(int lcsLength);
 
 	public int getLength() {
-		return length;
+		return this.length;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/Messages.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/Messages.java
index 32f9820..ba5caee 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/Messages.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,10 @@ public class Messages extends NLS {
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
 	}
 
+	/*
+	 * (non Javadoc) Cannot be instantiated.
+	 */
 	private Messages() {
+		// nothing to do
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/TextLineLCS.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/TextLineLCS.java
index b599dbe..c5178ca 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/TextLineLCS.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/TextLineLCS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,31 +32,31 @@ public class TextLineLCS extends LCS {
 		TextLine[][] result = new TextLine[2][];
 
 		// compact and shift the result
-		result[0] = compactAndShiftLCS(lcs[0], length, lines1);
-		result[1] = compactAndShiftLCS(lcs[1], length, lines2);
+		result[0] = compactAndShiftLCS(this.lcs[0], length, this.lines1);
+		result[1] = compactAndShiftLCS(this.lcs[1], length, this.lines2);
 
 		return result;
 	}
 
 	protected int getLength2() {
-		return lines2.length;
+		return this.lines2.length;
 	}
 
 	protected int getLength1() {
-		return lines1.length;
+		return this.lines1.length;
 	}
 	
 	protected boolean isRangeEqual(int i1, int i2) {
-		return lines1[i1].sameText(lines2[i2]);
+		return this.lines1[i1].sameText(this.lines2[i2]);
 	}
 	
 	protected void setLcs(int sl1, int sl2) {
-		lcs[0][sl1] = lines1[sl1];
-		lcs[1][sl1] = lines2[sl2];
+		this.lcs[0][sl1] = this.lines1[sl1];
+		this.lcs[1][sl1] = this.lines2[sl2];
 	}
 	
 	protected void initializeLcs(int length) {
-		lcs = new TextLine[2][length];
+		this.lcs = new TextLine[2][length];
 	}
 	
 	/**
@@ -188,7 +188,7 @@ public class TextLineLCS extends LCS {
 		public boolean sameText(TextLine l) {
 			// compare the hashCode() first since that is much faster and most
 			// of the time the text lines won't match
-			return text.hashCode() == l.text.hashCode() && l.text.equals(text);
+			return this.text.hashCode() == l.text.hashCode() && l.text.equals(this.text);
 		}
 
 		/**
@@ -197,11 +197,11 @@ public class TextLineLCS extends LCS {
 		 * @return the line number
 		 */
 		public int lineNumber() {
-			return number;
+			return this.number;
 		}
 
 		public String toString() {
-			return "" + number + " " + text + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			return "" + this.number + " " + this.text + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/DiffProject.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/DiffProject.java
index 4570c01..630256d 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/DiffProject.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/DiffProject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,7 +36,7 @@ public class DiffProject {
 	 * @param diff the file diff.
 	 */
 	public void add(FilePatch2 diff) {
-		fDiffs.add(diff);
+		this.fDiffs.add(diff);
 		if (diff.getProject() != this)
 			diff.setProject(this);
 	}
@@ -46,7 +46,7 @@ public class DiffProject {
 	 * @return the name of this project
 	 */
 	public String getName() {
-		return project;
+		return this.project;
 	}
 
 	/**
@@ -54,7 +54,7 @@ public class DiffProject {
 	 * @param diff the diff to be removed
 	 */
 	public void remove(FilePatch2 diff) {
-		fDiffs.remove(diff);
+		this.fDiffs.remove(diff);
 	}
 
 	/**
@@ -63,7 +63,7 @@ public class DiffProject {
 	 * @return whether this project contains the given diff
 	 */
 	public boolean contains(FilePatch2 diff) {
-		return fDiffs.contains(diff);
+		return this.fDiffs.contains(diff);
 	}
 
 	/**
@@ -71,6 +71,6 @@ public class DiffProject {
 	 * @return the file diffs associated with this project
 	 */
 	public FilePatch2[] getFileDiffs() {
-		return (FilePatch2[]) fDiffs.toArray(new FilePatch2[fDiffs.size()]);
+		return (FilePatch2[]) this.fDiffs.toArray(new FilePatch2[this.fDiffs.size()]);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java
index 755e99b..3410270 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FileDiffResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,17 +43,17 @@ public class FileDiffResult implements IFilePatchResult {
 	
 	public FileDiffResult(FilePatch2 diff, PatchConfiguration configuration) {
 		super();
-		fDiff = diff;
+		this.fDiff = diff;
 		this.configuration = configuration;
 	}
 	
 	public PatchConfiguration getConfiguration() {
-		return configuration;
+		return this.configuration;
 	}
 	
 	public boolean canApplyHunk(Hunk hunk) {
 		HunkResult result = getHunkResult(hunk);
-		return result.isOK() && !fDiffProblem;
+		return result.isOK() && !this.fDiffProblem;
 	}
 	
 	/**
@@ -67,42 +67,42 @@ public class FileDiffResult implements IFilePatchResult {
 	 * @param monitor a progress monitor or <code>null</code> if no progress monitoring is desired
 	 */
 	 public void refresh(ReaderCreator content, IProgressMonitor monitor) {
-		fMatches= false;
-		fDiffProblem= false;
+		this.fMatches= false;
+		this.fDiffProblem= false;
 		boolean create= false;
-		charset = Utilities.getCharset(content);
+		this.charset = Utilities.getCharset(content);
 		//If this diff is an addition, make sure that it doesn't already exist
 		boolean exists = targetExists(content);
-		if (fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) {
+		if (this.fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) {
 			if ((!exists || isEmpty(content)) && canCreateTarget(content)) {
-				fMatches= true;
+				this.fMatches= true;
 			} else {
 				// file already exists
-				fDiffProblem= true;
-				fErrorMessage= Messages.FileDiffResult_0;
+				this.fDiffProblem= true;
+				this.fErrorMessage= Messages.FileDiffResult_0;
 			}
 			create= true;
 		} else { //This diff is not an addition, try to find a match for it
 			//Ensure that the file described by the path exists and is modifiable
 			if (exists) {
-				fMatches= true;
+				this.fMatches= true;
 			} else {
 				// file doesn't exist
-				fDiffProblem= true;
-				fErrorMessage= Messages.FileDiffResult_1;
+				this.fDiffProblem= true;
+				this.fErrorMessage= Messages.FileDiffResult_1;
 			}
 		}
 
-		if (fDiffProblem) {
+		if (this.fDiffProblem) {
 			// We couldn't find the target file or the patch is trying to add a
 			// file that already exists but we need to initialize the hunk
 			// results for display
-			fBeforeLines = new ArrayList(getLines(content, false));
-			fAfterLines = fMatches ? new ArrayList() : fBeforeLines;
-			IHunk[] hunks = fDiff.getHunks();
+			this.fBeforeLines = new ArrayList(getLines(content, false));
+			this.fAfterLines = this.fMatches ? new ArrayList() : this.fBeforeLines;
+			IHunk[] hunks = this.fDiff.getHunks();
 			for (int i = 0; i < hunks.length; i++) {
 				Hunk hunk = (Hunk) hunks[i];
-				hunk.setCharset(charset);
+				hunk.setCharset(getCharset());
 				HunkResult result = getHunkResult(hunk);
 				result.setMatches(false);
 			}
@@ -112,15 +112,15 @@ public class FileDiffResult implements IFilePatchResult {
 		}
 
 		if (containsProblems()) {
-			if (fMatches) {
+			if (this.fMatches) {
 				// Check to see if we have at least one hunk that matches
-				fMatches = false;
-				IHunk[] hunks = fDiff.getHunks();
+				this.fMatches = false;
+				IHunk[] hunks = this.fDiff.getHunks();
 				for (int i = 0; i < hunks.length; i++) {
 					Hunk hunk = (Hunk) hunks[i];
 					HunkResult result = getHunkResult(hunk);
 					if (result.isOK()) {
-						fMatches = true;
+						this.fMatches = true;
 						break;
 					}
 				}
@@ -152,27 +152,27 @@ public class FileDiffResult implements IFilePatchResult {
 	 * Any hunk that couldn't be applied is returned in the list failedHunks.
 	 */
 	public void patch(List lines, IProgressMonitor monitor) {
-		fBeforeLines = new ArrayList();
-		fBeforeLines.addAll(lines);
+		this.fBeforeLines = new ArrayList();
+		this.fBeforeLines.addAll(lines);
 		if (getConfiguration().getFuzz() != 0) {
-			calculateFuzz(fBeforeLines, monitor);
+			calculateFuzz(this.fBeforeLines, monitor);
 		}
 		int shift= 0;
-		IHunk[] hunks = fDiff.getHunks();
+		IHunk[] hunks = this.fDiff.getHunks();
 		for (int i = 0; i < hunks.length; i++) {
 			Hunk hunk = (Hunk) hunks[i];
-			hunk.setCharset(charset);
+			hunk.setCharset(getCharset());
 			HunkResult result = getHunkResult(hunk);
 			result.setShift(shift);
 			if (result.patch(lines)) {
 				shift = result.getShift();
 			}
 		}
-		fAfterLines = lines;
+		this.fAfterLines = lines;
 	}
 	
 	public boolean getDiffProblem() {
-		return fDiffProblem;
+		return this.fDiffProblem;
 	}
 
 	/**
@@ -180,9 +180,9 @@ public class FileDiffResult implements IFilePatchResult {
 	 * @return true if this Diff or any of its children Hunks have a problem, false if it doesn't
 	 */
 	public boolean containsProblems() {
-		if (fDiffProblem)
+		if (this.fDiffProblem)
 			return true;
-		for (Iterator iterator = fHunkResults.values().iterator(); iterator.hasNext();) {
+		for (Iterator iterator = this.fHunkResults.values().iterator(); iterator.hasNext();) {
 			HunkResult result = (HunkResult) iterator.next();
 			if (!result.isOK())
 				return true;
@@ -193,12 +193,12 @@ public class FileDiffResult implements IFilePatchResult {
 	public String getLabel() {
 		String label= getTargetPath().toString();
 		if (this.fDiffProblem)
-			return NLS.bind(Messages.FileDiffResult_2, new String[] {label, fErrorMessage});
+			return NLS.bind(Messages.FileDiffResult_2, new String[] {label, this.fErrorMessage});
 		return label;
 	}
 	
 	public boolean hasMatches() {
-		return fMatches;
+		return this.fMatches;
 	}
 
 	/**
@@ -206,7 +206,7 @@ public class FileDiffResult implements IFilePatchResult {
 	 * @return the lines of the target file with all matched hunks applied
 	 */
 	public List getLines() {
-		return fAfterLines;
+		return this.fAfterLines;
 	}
 
 	/**
@@ -218,9 +218,9 @@ public class FileDiffResult implements IFilePatchResult {
 	public int calculateFuzz(List lines, IProgressMonitor monitor) {
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
-		fBeforeLines = new ArrayList(lines);
+		this.fBeforeLines = new ArrayList(lines);
 		// TODO: What about deletions?
-		if (fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) {
+		if (this.fDiff.getDiffType(getConfiguration().isReversed()) == FilePatch2.ADDITION) {
 			// Additions don't need to adjust the fuzz factor
 			// TODO: What about the after lines?
 			return -1;
@@ -228,7 +228,7 @@ public class FileDiffResult implements IFilePatchResult {
 		int shift= 0;
 		int highestFuzz = -1; // the maximum fuzz factor for all hunks
 		String name = getTargetPath() != null ? getTargetPath().lastSegment() : ""; //$NON-NLS-1$
-		IHunk[] hunks = fDiff.getHunks();
+		IHunk[] hunks = this.fDiff.getHunks();
 		for (int j = 0; j < hunks.length; j++) {
 			Hunk h = (Hunk) hunks[j];
 			monitor.subTask(NLS.bind(Messages.FileDiffResult_3, new String[] {name, Integer.toString(j + 1)}));
@@ -240,28 +240,28 @@ public class FileDiffResult implements IFilePatchResult {
 				highestFuzz = fuzz;
 			monitor.worked(1);
 		}
-		fAfterLines = lines;
+		this.fAfterLines = lines;
 		return highestFuzz;
 	}
 	
 	public IPath getTargetPath() {
-		return fDiff.getStrippedPath(getConfiguration().getPrefixSegmentStripCount(), getConfiguration().isReversed());
+		return this.fDiff.getStrippedPath(getConfiguration().getPrefixSegmentStripCount(), getConfiguration().isReversed());
 	}
 
 	private HunkResult getHunkResult(Hunk hunk) {
-		HunkResult result = (HunkResult)fHunkResults.get(hunk);
+		HunkResult result = (HunkResult)this.fHunkResults.get(hunk);
 		if (result == null) {
 			result = new HunkResult(this, hunk);
-			fHunkResults .put(hunk, result);
+			this.fHunkResults .put(hunk, result);
 		}
 		return result;
 	}
 
 	public List getFailedHunks() {
 		List failedHunks = new ArrayList();
-		IHunk[] hunks = fDiff.getHunks();
+		IHunk[] hunks = this.fDiff.getHunks();
 		for (int i = 0; i < hunks.length; i++) {
-			HunkResult result = (HunkResult) fHunkResults.get(hunks[i]);
+			HunkResult result = (HunkResult) this.fHunkResults.get(hunks[i]);
 			if (result != null && !result.isOK())
 				failedHunks.add(result.getHunk());
 		}
@@ -269,23 +269,23 @@ public class FileDiffResult implements IFilePatchResult {
 	}
 
 	public FilePatch2 getDiff() {
-		return fDiff;
+		return this.fDiff;
 	}
 
 	public List getBeforeLines() {
-		return fBeforeLines;
+		return this.fBeforeLines;
 	}
 
 	public List getAfterLines() {
-		return fAfterLines;
+		return this.fAfterLines;
 	}
 
 	public HunkResult[] getHunkResults() {
 		// return hunk results in the same order as hunks are placed in file diff 
 		List results = new ArrayList();
-		IHunk[] hunks = fDiff.getHunks();
+		IHunk[] hunks = this.fDiff.getHunks();
 		for (int i = 0; i < hunks.length; i++) {
-			HunkResult result = (HunkResult) fHunkResults.get(hunks[i]);
+			HunkResult result = (HunkResult) this.fHunkResults.get(hunks[i]);
 			if (result != null) {
 				results.add(result);
 			}
@@ -304,7 +304,7 @@ public class FileDiffResult implements IFilePatchResult {
 	}
 
 	public String getCharset() {
-		return charset;
+		return this.charset;
 	}
 
 	public boolean isPreserveLineDelimeters() {
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java
index 87e7035..c1b569d 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/FilePatch2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,9 +57,9 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @param newDate the timestamp of the after state
 	 */
  	public FilePatch2(IPath oldPath, long oldDate, IPath newPath, long newDate) {
-		fOldPath= oldPath;
+		this.fOldPath= oldPath;
 		this.oldDate = oldDate;
-		fNewPath= newPath;
+		this.fNewPath= newPath;
 		this.newDate = newDate;
 	}
 	
@@ -68,7 +68,7 @@ public class FilePatch2 implements IFilePatch2 {
  	 * @return the parent project or <code>null</code>
  	 */
 	public DiffProject getProject() {
-		return fProject;
+		return this.fProject;
 	}
 	
 	/**
@@ -78,10 +78,10 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @param diffProject the parent project
 	 */
 	void setProject(DiffProject diffProject) {
-		if (fProject == diffProject)
+		if (this.fProject == diffProject)
 			return;
-		if (fProject != null)
-			fProject.remove(this);
+		if (this.fProject != null)
+			this.fProject.remove(this);
 		this.fProject= diffProject;
 	}
 	
@@ -94,14 +94,14 @@ public class FilePatch2 implements IFilePatch2 {
 	public IPath getPath(boolean reverse) {
 		if (getDiffType(reverse) == ADDITION) {
 			if (reverse)
-				return fOldPath;
-			return fNewPath;
+				return this.fOldPath;
+			return this.fNewPath;
 		}
-		if (reverse && fNewPath != null)
-			return fNewPath;
-		if (fOldPath != null)
-			return fOldPath;
-		return fNewPath;
+		if (reverse && this.fNewPath != null)
+			return this.fNewPath;
+		if (this.fOldPath != null)
+			return this.fOldPath;
+		return this.fNewPath;
 	}
 	
 	/**
@@ -109,7 +109,7 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @param hunk the hunk
 	 */
 	public void add(Hunk hunk) {
-		fHunks.add(hunk);
+		this.fHunks.add(hunk);
 		hunk.setParent(this);
 	}
 	
@@ -118,7 +118,7 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @param hunk the hunk
 	 */
 	protected void remove(Hunk hunk) {
-		fHunks.remove(hunk);
+		this.fHunks.remove(hunk);
 	}
 	
 	/**
@@ -126,7 +126,7 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @return the hunks associated with this file diff
 	 */
 	public IHunk[] getHunks() {
-		return (IHunk[]) fHunks.toArray(new IHunk[fHunks.size()]);
+		return (IHunk[]) this.fHunks.toArray(new IHunk[this.fHunks.size()]);
 	}
 	
 	/**
@@ -134,7 +134,7 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @return the number of hunks associated with this file diff
 	 */
 	public int getHunkCount() {
-		return fHunks.size();
+		return this.fHunks.size();
 	}
 	
 	/**
@@ -143,10 +143,10 @@ public class FilePatch2 implements IFilePatch2 {
 	 * @return the type of this file diff
 	 */
 	public int getDiffType(boolean reverse) {
-		if (fHunks.size() == 1) {
+		if (this.fHunks.size() == 1) {
 			boolean add = false;
 			boolean delete = false;
-			Iterator iter = fHunks.iterator();
+			Iterator iter = this.fHunks.iterator();
 			while (iter.hasNext()){
 				Hunk hunk = (Hunk) iter.next();
 				int type =hunk.getHunkType(reverse);
@@ -188,10 +188,10 @@ public class FilePatch2 implements IFilePatch2 {
 		//Update prefix count - go through all of the diffs and find the smallest
 		//path segment contained in all diffs.
 		int length= 99;
-		if (fOldPath != null)
-			length= Math.min(length, fOldPath.segmentCount());
-		if (fNewPath != null)
-			length= Math.min(length, fNewPath.segmentCount());
+		if (this.fOldPath != null)
+			length= Math.min(length, this.fOldPath.segmentCount());
+		if (this.fNewPath != null)
+			length= Math.min(length, this.fNewPath.segmentCount());
 		return length;
 	}
 	
@@ -207,18 +207,18 @@ public class FilePatch2 implements IFilePatch2 {
 	}
 
 	public FilePatch2 asRelativeDiff() {
-		if (fProject == null)
+		if (this.fProject == null)
 			return this;
 		IPath adjustedOldPath = null;
-		if (fOldPath != null) {
-			adjustedOldPath = new Path(null, fProject.getName()).append(fOldPath);
+		if (this.fOldPath != null) {
+			adjustedOldPath = new Path(null, this.fProject.getName()).append(this.fOldPath);
 		}
 		IPath adjustedNewPath = null;
-		if (fNewPath != null) {
-			adjustedNewPath = new Path(null, fProject.getName()).append(fNewPath);
+		if (this.fNewPath != null) {
+			adjustedNewPath = new Path(null, this.fProject.getName()).append(this.fNewPath);
 		}
 		FilePatch2 diff = create(adjustedOldPath, 0, adjustedNewPath, 0);
-		for (Iterator iterator = fHunks.iterator(); iterator.hasNext();) {
+		for (Iterator iterator = this.fHunks.iterator(); iterator.hasNext();) {
 			Hunk hunk = (Hunk) iterator.next();
 			// Creating the hunk adds it to the parent diff
 			new Hunk(diff, hunk);
@@ -236,15 +236,15 @@ public class FilePatch2 implements IFilePatch2 {
 	}
 
 	public String getHeader() {
-		return header;
+		return this.header;
 	}
 
 	public long getBeforeDate() {
-		return oldDate;
+		return this.oldDate;
 	}
 
 	public long getAfterDate() {
-		return newDate;
+		return this.newDate;
 	}
 
 	public void setAddedLines(int addedLines) {
@@ -256,11 +256,11 @@ public class FilePatch2 implements IFilePatch2 {
 	}
 
 	public int getAddedLines() {
-		return addedLines;
+		return this.addedLines;
 	}
 	
 	public int getRemovedLines() {
-		return removedLines;
+		return this.removedLines;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java
index 665612b..88ab17b 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/Hunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,16 +59,16 @@ public class Hunk implements IHunk {
 	
 	public Hunk(FilePatch2 parent, int hunkType, int oldStart, int oldLength,
 			int newStart, int newLength, String[] lines) {
-		fParent = parent;
-        if (fParent != null) {
-            fParent.add(this);
+		this.fParent = parent;
+        if (this.fParent != null) {
+            this.fParent.add(this);
         }
 		this.hunkType = hunkType;
-		fOldLength = oldLength;
-		fOldStart = oldStart;
-		fNewLength = newLength;
-		fNewStart = newStart;
-		fLines = lines;
+		this.fOldLength = oldLength;
+		this.fOldStart = oldStart;
+		this.fNewLength = newLength;
+		this.fNewStart = newStart;
+		this.fLines = lines;
 	}
 	
     public Hunk(FilePatch2 parent, Hunk toCopy) {
@@ -89,8 +89,8 @@ public class Hunk implements IHunk {
 	 */
 	public String getContent() {
 		StringBuffer sb= new StringBuffer();
-		for (int i= 0; i < fLines.length; i++) {
-			String line= fLines[i];
+		for (int i= 0; i < this.fLines.length; i++) {
+			String line= this.fLines[i];
 			sb.append(line.substring(0, LineReader.length(line)));
 			sb.append('\n');
 		}
@@ -103,38 +103,38 @@ public class Hunk implements IHunk {
 	 */
 	String getDescription() {
 		StringBuffer sb= new StringBuffer();
-		sb.append(Integer.toString(fOldStart));
+		sb.append(Integer.toString(this.fOldStart));
 		sb.append(',');
-		sb.append(Integer.toString(fOldLength));
+		sb.append(Integer.toString(this.fOldLength));
 		sb.append(" -> "); //$NON-NLS-1$
-		sb.append(Integer.toString(fNewStart));
+		sb.append(Integer.toString(this.fNewStart));
 		sb.append(',');
-		sb.append(Integer.toString(fNewLength));
+		sb.append(Integer.toString(this.fNewLength));
 		return sb.toString();
 	}
 	
 	public String getRejectedDescription() {
 		StringBuffer sb= new StringBuffer();
 		sb.append("@@ -"); //$NON-NLS-1$
-		sb.append(Integer.toString(fOldStart));
+		sb.append(Integer.toString(this.fOldStart));
 		sb.append(',');
-		sb.append(Integer.toString(fOldLength));
+		sb.append(Integer.toString(this.fOldLength));
 		sb.append(" +"); //$NON-NLS-1$
-		sb.append(Integer.toString(fNewStart));
+		sb.append(Integer.toString(this.fNewStart));
 		sb.append(',');
-		sb.append(Integer.toString(fNewLength));
+		sb.append(Integer.toString(this.fNewLength));
 		sb.append(" @@"); //$NON-NLS-1$
 		return sb.toString();
 	}
 	
 	public int getHunkType(boolean reverse) {
 		if (reverse) {
-			if (hunkType == FilePatch2.ADDITION)
+			if (this.hunkType == FilePatch2.ADDITION)
 				return FilePatch2.DELETION;
-			if (hunkType == FilePatch2.DELETION)
+			if (this.hunkType == FilePatch2.DELETION)
 				return FilePatch2.ADDITION;
 		}
-		return hunkType;
+		return this.hunkType;
 	}
 
 	void setHunkType(int hunkType) {
@@ -142,12 +142,12 @@ public class Hunk implements IHunk {
 	}
 
 	public String[] getLines() {
-		return fLines;
+		return this.fLines;
 	}
 
 	public String[] getUnifiedLines() {
-		String[] ret = new String[fLines.length];
-		System.arraycopy(fLines, 0, ret, 0, fLines.length);
+		String[] ret = new String[this.fLines.length];
+		System.arraycopy(this.fLines, 0, ret, 0, this.fLines.length);
 		return ret;
 	}
 
@@ -157,15 +157,15 @@ public class Hunk implements IHunk {
 	 * @param diff the parent of this hunk
 	 */
 	void setParent(FilePatch2 diff) {
-		if (fParent == diff)
+		if (this.fParent == diff)
 			return;
-		if (fParent != null)
-			fParent.remove(this);
-		fParent = diff;	
+		if (this.fParent != null)
+			this.fParent.remove(this);
+		this.fParent = diff;	
 	}
 
 	public FilePatch2 getParent() {
-		return fParent;
+		return this.fParent;
 	}
 	
 	/*
@@ -180,8 +180,8 @@ public class Hunk implements IHunk {
 		List contextLines = new ArrayList();
 		boolean contextLinesMatched = true;
 		boolean precedingLinesChecked = false;
-		for (int i= 0; i < fLines.length; i++) {
-			String s = fLines[i];
+		for (int i= 0; i < this.fLines.length; i++) {
+			String s = this.fLines[i];
 			Assert.isTrue(s.length() > 0);
 			String line = s.substring(1);
 			char controlChar = s.charAt(0);
@@ -299,31 +299,31 @@ public class Hunk implements IHunk {
 	
 	public int getStart(boolean after) {
 		if (after) {
-			return fNewStart;
+			return this.fNewStart;
 		}
-		return fOldStart;
+		return this.fOldStart;
 	}
 
 	public void setStart(int start, boolean after) {
 		if (after) {
-			fNewStart = start;
+			this.fNewStart = start;
 		} else {
-			fOldStart = start;
+			this.fOldStart = start;
 		}
 	}
 
 	public int getLength(boolean after) {
 		if (after) {
-			return fNewLength;
+			return this.fNewLength;
 		}
-		return fOldLength;
+		return this.fOldLength;
 	}
 	
 	private int getShift(boolean reverse) {
 		if (reverse) {
-			return fOldLength - fNewLength;
+			return this.fOldLength - this.fNewLength;
 		}
-		return fNewLength - fOldLength;
+		return this.fNewLength - this.fOldLength;
 	}
 	
 	int doPatch(PatchConfiguration configuration, List lines, int shift, int fuzz) {
@@ -334,8 +334,8 @@ public class Hunk implements IHunk {
 		boolean precedingLinesChecked = false;
 		String lineDelimiter = getLineDelimiter(lines);
 
-		for (int i= 0; i < fLines.length; i++) {
-			String s= fLines[i];
+		for (int i= 0; i < this.fLines.length; i++) {
+			String s= this.fLines[i];
 			Assert.isTrue(s.length() > 0);
 			String line= s.substring(1);
 			char controlChar= s.charAt(0);
@@ -441,9 +441,9 @@ public class Hunk implements IHunk {
 			// get a line separator from the file being patched
 			String line0 = (String) lines.get(0);
 			return line0.substring(LineReader.length(line0));
-		} else if (fLines.length > 0) {
+		} else if (this.fLines.length > 0) {
 			// if the file doesn't exist use a line separator from the patch
-			return fLines[0].substring(LineReader.length(fLines[0]));
+			return this.fLines[0].substring(LineReader.length(this.fLines[0]));
 		}
 		return System.getProperty("line.separator"); //$NON-NLS-1$
 	}
@@ -465,8 +465,8 @@ public class Hunk implements IHunk {
 	
 	public String getContents(boolean isAfterState, boolean reverse) {
 		StringBuffer result= new StringBuffer();
-		for (int i= 0; i<fLines.length; i++) {
-			String line= fLines[i];
+		for (int i= 0; i<this.fLines.length; i++) {
+			String line= this.fLines[i];
 			String rest= line.substring(1);
 			char c = line.charAt(0);
 			if (c == ' ') {
@@ -516,7 +516,7 @@ public class Hunk implements IHunk {
 	 *             obtain charset.
 	 */
 	public String getCharset() {
-		return charset;
+		return this.charset;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/HunkResult.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/HunkResult.java
index 8a7e60e..186a49b 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/HunkResult.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/HunkResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,8 +40,8 @@ public class HunkResult {
 	 * @param hunk the hunk
 	 */
 	public HunkResult(FileDiffResult diffResult, Hunk hunk) {
-		fDiffResult = diffResult;
-		fHunk = hunk;
+		this.fDiffResult = diffResult;
+		this.fHunk = hunk;
 	}
 
 	/**
@@ -52,24 +52,24 @@ public class HunkResult {
 	 * @return whether the hunk could be applied
 	 */
 	public boolean patch(List lines) {
-		fMatches = false;
+		this.fMatches = false;
 		PatchConfiguration configuration = getConfiguration();
 		// if the fuzz is not set for the current hunk use the one from fDiffResult
-		int fuzz = fFuzz != -1 ? fFuzz : configuration.getFuzz();
+		int fuzz = this.fFuzz != -1 ? this.fFuzz : configuration.getFuzz();
 		if (isEnabled(configuration)) {
-			if (fHunk.tryPatch(configuration, lines, fShift, fuzz)) {
+			if (this.fHunk.tryPatch(configuration, lines, this.fShift, fuzz)) {
 				// it's a perfect match, no shifting is needed
-				fShift += fHunk.doPatch(configuration, lines, fShift, fuzz);
-				fMatches = true;
+				this.fShift += this.fHunk.doPatch(configuration, lines, this.fShift, fuzz);
+				this.fMatches = true;
 			} else {
 				boolean found= false;
-				int oldShift= fShift;
+				int oldShift= this.fShift;
 				
 				int hugeShift = lines.size();
 				for (int i = 1; i <= hugeShift; i++) {
-					if (fHunk.tryPatch(configuration, lines, fShift - i, fuzz)) {
+					if (this.fHunk.tryPatch(configuration, lines, this.fShift - i, fuzz)) {
 						if (isAdjustShift())
-							fShift -= i;
+							this.fShift -= i;
 						found = true;
 						break;
 					}
@@ -77,9 +77,9 @@ public class HunkResult {
 				
 				if (!found) {
 					for (int i = 1; i <= hugeShift; i++) {
-						if (fHunk.tryPatch(configuration, lines, fShift + i, fuzz)) {
+						if (this.fHunk.tryPatch(configuration, lines, this.fShift + i, fuzz)) {
 							if (isAdjustShift())
-								fShift += i;
+								this.fShift += i;
 							found = true;
 							break;
 						}
@@ -87,13 +87,13 @@ public class HunkResult {
 				}
 				
 				if (found) {
-					if (DEBUG) System.out.println("patched hunk at offset: " + (fShift-oldShift)); //$NON-NLS-1$
-					fShift+= fHunk.doPatch(configuration, lines, fShift, fuzz);
-					fMatches = true;
+					if (DEBUG) System.out.println("patched hunk at offset: " + (this.fShift-oldShift)); //$NON-NLS-1$
+					this.fShift+= this.fHunk.doPatch(configuration, lines, this.fShift, fuzz);
+					this.fMatches = true;
 				}
 			}
 		}
-		return fMatches;
+		return this.fMatches;
 	}
 
 	private boolean isAdjustShift() {
@@ -116,17 +116,17 @@ public class HunkResult {
 	 * @return the fuzz factor or -1 if the hunk could not be matched
 	 */
 	public int calculateFuzz(List lines, IProgressMonitor monitor) {
-		fMatches = false;
+		this.fMatches = false;
 		PatchConfiguration configuration = getConfiguration();
 		int fuzz = 0;
 		int maxFuzz = configuration.getFuzz() == -1 ? MAXIMUM_FUZZ_FACTOR
 				: configuration.getFuzz();
 		for (; fuzz <= maxFuzz; fuzz++) {
 			// try to apply using lines coordinates from the patch
-			if (fHunk.tryPatch(configuration, lines, fShift, fuzz)) {
+			if (this.fHunk.tryPatch(configuration, lines, this.fShift, fuzz)) {
 				// it's a perfect match, no adjustment is needed
-				fShift += fHunk.doPatch(configuration, lines, fShift, fuzz);
-				fMatches = true;
+				this.fShift += this.fHunk.doPatch(configuration, lines, this.fShift, fuzz);
+				this.fMatches = true;
 				break;
 			}
 			
@@ -141,37 +141,37 @@ public class HunkResult {
 				if (monitor.isCanceled()) {
 					throw new OperationCanceledException();
 				}
-				if (fHunk.tryPatch(configuration, lines, fShift - i, fuzz)) {
+				if (this.fHunk.tryPatch(configuration, lines, this.fShift - i, fuzz)) {
 					if (isAdjustShift())
-						fShift -= i;
-					fMatches = true;
+						this.fShift -= i;
+					this.fMatches = true;
 					break;
 				}
 			}
 
 			// shift down
-			if (!fMatches) {
+			if (!this.fMatches) {
 				for (int i = 1; i <= hugeShift; i++) {
 					if (monitor.isCanceled()) {
 						throw new OperationCanceledException();
 					}
-					if (fHunk.tryPatch(configuration, lines, fShift + i, fuzz)) {
+					if (this.fHunk.tryPatch(configuration, lines, this.fShift + i, fuzz)) {
 						if (isAdjustShift())
-							fShift += i;
-						fMatches = true;
+							this.fShift += i;
+						this.fMatches = true;
 						break;
 					}
 				}
 			}
 
-			if (fMatches) {
-				fShift += fHunk.doPatch(configuration, lines, fShift, fuzz);
+			if (this.fMatches) {
+				this.fShift += this.fHunk.doPatch(configuration, lines, this.fShift, fuzz);
 				break;
 			}
 		}
 		// set fuzz for the current hunk
-		fFuzz = fMatches ? fuzz : -1;
-		return fFuzz;
+		this.fFuzz = this.fMatches ? fuzz : -1;
+		return this.fFuzz;
 	}
 
 	/**
@@ -181,7 +181,7 @@ public class HunkResult {
 	 * @return the amount that this hunk should be shifted when applied
 	 */
 	public int getShift() {
-		return fShift;
+		return this.fShift;
 	}
 
 	/**
@@ -191,7 +191,7 @@ public class HunkResult {
 	 * @param shift the amount to shift this hunk
 	 */
 	public void setShift(int shift) {
-		fShift = shift;
+		this.fShift = shift;
 	}
 
 	/**
@@ -199,7 +199,7 @@ public class HunkResult {
 	 * @return the hunk to which this result applies
 	 */
 	public Hunk getHunk() {
-		return fHunk;
+		return this.fHunk;
 	}
 
 	/**
@@ -207,7 +207,7 @@ public class HunkResult {
 	 * @return the parent diff result
 	 */
 	public FileDiffResult getDiffResult() {
-		return fDiffResult;
+		return this.fDiffResult;
 	}
 
 	/**
@@ -215,7 +215,7 @@ public class HunkResult {
 	 * @return whether the hunk was matched with the target file
 	 */
 	public boolean isOK() {
-		return fMatches;
+		return this.fMatches;
 	}
 
 	/**
@@ -231,12 +231,12 @@ public class HunkResult {
 			List lines = getDiffResult().getBeforeLines();
 			if (afterState) {
 				if (isOK()) {
-					int oldShift = fShift;
+					int oldShift = this.fShift;
 					try {
-						fShift = 0;
+						this.fShift = 0;
 						problemFound = !patch(lines);
 					} finally {
-						fShift = oldShift;
+						this.fShift = oldShift;
 					}
 				} else {
 					problemFound = true;
@@ -244,7 +244,7 @@ public class HunkResult {
 			}
 			// Only return the full context if we could apply the hunk
 			if (!problemFound)
-				return LineReader.createString(fDiffResult.isPreserveLineDelimeters(), lines);
+				return LineReader.createString(this.fDiffResult.isPreserveLineDelimeters(), lines);
 		}
 		return getHunk().getContents(afterState, getConfiguration().isReversed());
 	}
@@ -252,7 +252,7 @@ public class HunkResult {
 	private boolean isEnabled(PatchConfiguration configuration) {
 		IHunkFilter[] filters = configuration.getHunkFilters();
 		for (int i = 0; i < filters.length; i++) {
-			if (!filters[i].select(fHunk)) {
+			if (!filters[i].select(this.fHunk)) {
 				return false;
 			}
 		}
@@ -260,14 +260,14 @@ public class HunkResult {
 	}
 
 	public void setMatches(boolean matches) {
-		fMatches = matches;
+		this.fMatches = matches;
 	}
 
 	public String getCharset() {
-		return fDiffResult.getCharset();
+		return this.fDiffResult.getCharset();
 	}
 	
 	public int getFuzz() {
-		return fFuzz;
+		return this.fFuzz;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java
index 7c3d1ad..fc83e49 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/LineReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -114,12 +114,12 @@ public class LineReader {
 	private StringBuffer fBuffer= new StringBuffer();
 	
 	public LineReader(BufferedReader reader) {
-		fReader= reader;
+		this.fReader= reader;
 		Assert.isNotNull(reader);
 	}
 
 	public void ignoreSingleCR() {
-		fIgnoreSingleCR= true;
+		this.fIgnoreSingleCR= true;
 	}
 	
     /**
@@ -133,46 +133,46 @@ public class LineReader {
      */
 	/* package */ String readLine() throws IOException {
 		try {
-			while (!fSawEOF) {
+			while (!this.fSawEOF) {
 				int c= readChar();
 				if (c == -1) {
-					fSawEOF= true;
+					this.fSawEOF= true;
 					break;
 				}
-				fBuffer.append((char)c);
+				this.fBuffer.append((char)c);
 				if (c == '\n')
 					break;
 				if (c == '\r') {
 					c= readChar();
 					if (c == -1) {
-						fSawEOF= true;
+						this.fSawEOF= true;
 						break;	// EOF
 					}
 					if (c != '\n') {
-						if (fIgnoreSingleCR) {
-							fBuffer.append((char)c);	
+						if (this.fIgnoreSingleCR) {
+							this.fBuffer.append((char)c);	
 							continue;
 						}
-						fHaveChar= true;
-						fLastChar= c;
+						this.fHaveChar= true;
+						this.fLastChar= c;
 					} else
-						fBuffer.append((char)c);	
+						this.fBuffer.append((char)c);	
 					break;
 				}
 			}
 			
-			if (fBuffer.length() != 0) {
-				return fBuffer.toString();
+			if (this.fBuffer.length() != 0) {
+				return this.fBuffer.toString();
 			}
 			return null;
 		} finally {
-			fBuffer.setLength(0);
+			this.fBuffer.setLength(0);
 		}
 	}
 	
 	/* package */ void close() {
 		try {
-			fReader.close();
+			this.fReader.close();
 		} catch (IOException ex) {
 			// silently ignored
 		}
@@ -215,10 +215,10 @@ public class LineReader {
 	//---- private
 	
 	private int readChar() throws IOException {
-		if (fHaveChar) {
-			fHaveChar= false;
-			return fLastChar;
+		if (this.fHaveChar) {
+			this.fHaveChar= false;
+			return this.fLastChar;
 		}
-		return fReader.read();
+		return this.fReader.read();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java
index 2ff8626..adf5deb 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/internal/core/patch/PatchReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,7 +78,7 @@ public class PatchReader {
 	 */
 	public PatchReader(DateFormat[] dateFormats) {
 		this();
-		fDateFormats = dateFormats;
+		this.fDateFormats = dateFormats;
 	}
 	
 	public void parse(BufferedReader reader) throws IOException {
@@ -91,7 +91,7 @@ public class PatchReader {
 		// no project means this is a single patch,create a placeholder project for now
 		// which will be replaced by the target selected by the user in the preview pane
 		String projectName= ""; //$NON-NLS-1$
-		fIsWorkspacePatch= false;
+		this.fIsWorkspacePatch= false;
 
 		LineReader lr= new LineReader(reader);
 		if (!Platform.WS_CARBON.equals(Platform.getWS()))
@@ -100,7 +100,7 @@ public class PatchReader {
 		// Test for our format
 		line= lr.readLine();
 		if (line != null && line.startsWith(PatchReader.MULTIPROJECTPATCH_HEADER)) {
-			fIsWorkspacePatch= true;
+			this.fIsWorkspacePatch= true;
 		} else {
 			parse(lr, line);
 			return;
@@ -151,8 +151,8 @@ public class PatchReader {
 
 		lr.close();
 
-		fDiffProjects= (DiffProject[]) diffProjects.values().toArray(new DiffProject[diffProjects.size()]);
-		fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]);
+		this.fDiffProjects= (DiffProject[]) diffProjects.values().toArray(new DiffProject[diffProjects.size()]);
+		this.fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]);
 	}
 
 	protected FilePatch2 createFileDiff(IPath oldPath, long oldDate,
@@ -215,7 +215,7 @@ public class PatchReader {
 		
 		lr.close();
 		
-		fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]);
+		this.fDiffs = (FilePatch2[]) diffs.toArray(new FilePatch2[diffs.size()]);
 	}
 	
 	private void setHeader(FilePatch2 diff, List headerLines) {
@@ -575,10 +575,10 @@ public class PatchReader {
 	private long extractDate(String[] args, int n) {
 		if (n < args.length) {
 			String line= args[n];
-			for (int i= 0; i < fDateFormats.length; i++) {
-				fDateFormats[i].setLenient(true);
+			for (int i= 0; i < this.fDateFormats.length; i++) {
+				this.fDateFormats[i].setLenient(true);
 				try {
-					Date date= fDateFormats[i].parse(line);
+					Date date= this.fDateFormats[i].parse(line);
 					return date.getTime();		
 				} catch (ParseException ex) {
 					// silently ignored
@@ -658,23 +658,23 @@ public class PatchReader {
 	}
 
 	public boolean isWorkspacePatch() {
-		return fIsWorkspacePatch;
+		return this.fIsWorkspacePatch;
 	}
 
 	public DiffProject[] getDiffProjects() {
-		return fDiffProjects;
+		return this.fDiffProjects;
 	}
 
 	public FilePatch2[] getDiffs() {
-		return fDiffs;
+		return this.fDiffs;
 	}
 	
 	public FilePatch2[] getAdjustedDiffs() {
-		if (!isWorkspacePatch() || fDiffs.length == 0)
-			return fDiffs;
+		if (!isWorkspacePatch() || this.fDiffs.length == 0)
+			return this.fDiffs;
 		List result = new ArrayList();
-		for (int i = 0; i < fDiffs.length; i++) {
-			FilePatch2 diff = fDiffs[i];
+		for (int i = 0; i < this.fDiffs.length; i++) {
+			FilePatch2 diff = this.fDiffs[i];
 			result.add(diff.asRelativeDiff());
 		}
 		return (FilePatch2[]) result.toArray(new FilePatch2[result.size()]);
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchBuilder.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchBuilder.java
index 34f76c5..40d7177 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchBuilder.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -179,7 +179,7 @@ public class PatchBuilder {
 					}
 					break;
 				default:
-					throw new IllegalArgumentException("");
+					throw new IllegalArgumentException(""); //$NON-NLS-1$
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchConfiguration.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchConfiguration.java
index 1a5e0fb..2266965 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/PatchConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,7 +37,7 @@ public class PatchConfiguration {
 	 * @return whether the patch should be reversed when applied
 	 */
 	public boolean isReversed() {
-		return fReverse;
+		return this.fReverse;
 	}
 
 	/**
@@ -55,7 +55,7 @@ public class PatchConfiguration {
 	 * to apply a patch
 	 */
 	public int getPrefixSegmentStripCount() {
-		return fStripPrefixSegments;
+		return this.fStripPrefixSegments;
 	}
 
 	/**
@@ -76,7 +76,7 @@ public class PatchConfiguration {
 	 * @return the fuzz factor to be used when applying a patch.
 	 */
 	public int getFuzz() {
-		return fFuzz;
+		return this.fFuzz;
 	}
 	
 	/**
@@ -84,7 +84,7 @@ public class PatchConfiguration {
 	 * @param fuzz the fuzz factor to be used when applying a patch.
 	 */
 	public void setFuzz(int fuzz) {
-		fFuzz = fuzz;
+		this.fFuzz = fuzz;
 	}
 
 	/**
@@ -92,7 +92,7 @@ public class PatchConfiguration {
 	 * @return whether whitespace should be ignored
 	 */
 	public boolean isIgnoreWhitespace() {
-		return fIgnoreWhitespace;
+		return this.fIgnoreWhitespace;
 	}
 	
 	/**
@@ -100,7 +100,7 @@ public class PatchConfiguration {
 	 * @param ignoreWhitespace whether whitespace should be ignored
 	 */
 	public void setIgnoreWhitespace(boolean ignoreWhitespace) {
-		fIgnoreWhitespace = ignoreWhitespace;
+		this.fIgnoreWhitespace = ignoreWhitespace;
 	}
 	
 	/**
@@ -111,7 +111,7 @@ public class PatchConfiguration {
 	 * <code>null</code>
 	 */
 	public Object getProperty(String key) {
-		return properties.get(key);
+		return this.properties.get(key);
 	}
 	
 	/**
@@ -120,7 +120,7 @@ public class PatchConfiguration {
 	 * @param value the value to be associated with the key
 	 */
 	public void setProperty(String key, Object value) {
-		properties.put(key, value);
+		this.properties.put(key, value);
 	}
 
 	/**
@@ -130,7 +130,7 @@ public class PatchConfiguration {
 	 * @since org.eclipse.compare.core 3.5
 	 */
 	public void addHunkFilter(IHunkFilter filter) {
-		hunkFilters.add(filter);
+		this.hunkFilters.add(filter);
 	}
 
 	/**
@@ -140,7 +140,7 @@ public class PatchConfiguration {
 	 * @since org.eclipse.compare.core 3.5
 	 */
 	public void removeHunkFilter(IHunkFilter filter) {
-		hunkFilters.remove(filter);
+		this.hunkFilters.remove(filter);
 	}
 
 	/**
@@ -151,7 +151,7 @@ public class PatchConfiguration {
 	 * @since org.eclipse.compare.core 3.5
 	 */
 	public IHunkFilter[] getHunkFilters() {
-		return (IHunkFilter[]) hunkFilters.toArray(new IHunkFilter[hunkFilters
+		return (IHunkFilter[]) this.hunkFilters.toArray(new IHunkFilter[this.hunkFilters
 				.size()]);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/package.html b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/package.html
new file mode 100644
index 0000000..e1c40fd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/patch/package.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides support for applying and working with patches.
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for applying and working with patches.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
index 4b68e2a..d42c4bd 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/DifferencesIterator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,32 +29,32 @@ import java.util.List;
 	 */
 	DifferencesIterator(RangeDifference[] differenceRanges) {
 		
-		fArray= differenceRanges;
-		fIndex= 0;
-		fRange= new ArrayList();
-		if (fIndex < fArray.length)
-			fDifference= fArray[fIndex++];
+		this.fArray= differenceRanges;
+		this.fIndex= 0;
+		this.fRange= new ArrayList();
+		if (this.fIndex < this.fArray.length)
+			this.fDifference= this.fArray[this.fIndex++];
 		else
-			fDifference= null;
+			this.fDifference= null;
 	}
 
 	/*
 	  * Returns the number of RangeDifferences
 	  */
 	int getCount() {
-		return fRange.size();
+		return this.fRange.size();
 	}
 
 	/*
 	 * Appends the edit to its list and moves to the next <code>RangeDifference</code>.
 	 */
 	void next() {
-		fRange.add(fDifference);
-		if (fDifference != null) {
-			if (fIndex < fArray.length)
-				fDifference= fArray[fIndex++];
+		this.fRange.add(this.fDifference);
+		if (this.fDifference != null) {
+			if (this.fIndex < this.fArray.length)
+				this.fDifference= this.fArray[this.fIndex++];
 			else
-				fDifference= null;
+				this.fDifference= null;
 		}
 	}
 
@@ -72,6 +72,6 @@ import java.util.List;
 	  * Removes all <code>RangeDifference</code>s
 	  */
 	void removeAll() {
-		fRange.clear();
+		this.fRange.clear();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java
index 152dcc5..3689800 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeComparatorLCS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,25 +42,25 @@ import org.eclipse.core.runtime.SubMonitor;
 	}
 	
 	protected int getLength1() {
-		return comparator1.getRangeCount();
+		return this.comparator1.getRangeCount();
 	}
 
 	protected int getLength2() {
-		return comparator2.getRangeCount();
+		return this.comparator2.getRangeCount();
 	}
 
 	protected void initializeLcs(int lcsLength) {
-		lcs = new int[2][lcsLength];
+		this.lcs = new int[2][lcsLength];
 	}
 
 	protected boolean isRangeEqual(int i1, int i2) {
-		return comparator1.rangesEqual(i1, comparator2, i2);
+		return this.comparator1.rangesEqual(i1, this.comparator2, i2);
 	}
 
 	protected void setLcs(int sl1, int sl2) {
 		// Add one to the values so that 0 can mean that the slot is empty
-		lcs[0][sl1] = sl1 + 1;
-		lcs[1][sl1] = sl2 + 1;
+		this.lcs[0][sl1] = sl1 + 1;
+		this.lcs[1][sl1] = sl2 + 1;
 	}
 	
 	public RangeDifference[] getDifferences(SubMonitor subMonitor, AbstractRangeDifferenceFactory factory) {
@@ -68,7 +68,7 @@ import org.eclipse.core.runtime.SubMonitor;
 			List differences = new ArrayList();
 			int length = getLength();
 			if (length == 0) {
-				differences.add(factory.createRangeDifference(RangeDifference.CHANGE, 0, comparator2.getRangeCount(), 0, comparator1.getRangeCount()));
+				differences.add(factory.createRangeDifference(RangeDifference.CHANGE, 0, this.comparator2.getRangeCount(), 0, this.comparator1.getRangeCount()));
 			} else {
 				subMonitor.beginTask(null, length);
 				int index1, index2;
@@ -76,21 +76,21 @@ import org.eclipse.core.runtime.SubMonitor;
 				int l1, l2;
 				int s1 = -1;
 				int s2 = -1;
-				while(index1 < lcs[0].length && index2 < lcs[1].length) {
+				while(index1 < this.lcs[0].length && index2 < this.lcs[1].length) {
 					// Move both LCS lists to the next occupied slot
-					while ((l1= lcs[0][index1]) == 0) {
+					while ((l1= this.lcs[0][index1]) == 0) {
 						index1++;
-						if (index1 >= lcs[0].length)
+						if (index1 >= this.lcs[0].length)
 							break;
 					}
-					if (index1 >= lcs[0].length)
+					if (index1 >= this.lcs[0].length)
 						break;
-					while ((l2= lcs[1][index2]) == 0) {
+					while ((l2= this.lcs[1][index2]) == 0) {
 						index2++;
-						if (index2 >= lcs[1].length)
+						if (index2 >= this.lcs[1].length)
 							break;
 					}
-					if (index2 >= lcs[1].length)
+					if (index2 >= this.lcs[1].length)
 						break;
 					// Convert the entry to an array index (see setLcs(int, int))
 					int end1 = l1 - 1;
@@ -114,12 +114,12 @@ import org.eclipse.core.runtime.SubMonitor;
 					index2++;
 					worked(subMonitor, 1);
 				}
-				if (s1 != -1 && (s1 + 1 < comparator1.getRangeCount() || s2 + 1 < comparator2.getRangeCount())) {
+				if (s1 != -1 && (s1 + 1 < this.comparator1.getRangeCount() || s2 + 1 < this.comparator2.getRangeCount())) {
 					// TODO: we need to find the proper way of representing an append
-					int leftStart = s1 < comparator1.getRangeCount() ? s1 + 1 : s1;
-					int rightStart = s2 < comparator2.getRangeCount() ? s2 + 1 : s2;
+					int leftStart = s1 < this.comparator1.getRangeCount() ? s1 + 1 : s1;
+					int rightStart = s2 < this.comparator2.getRangeCount() ? s2 + 1 : s2;
 					// TODO: We need to confirm that this is the proper order
-					differences.add(factory.createRangeDifference(RangeDifference.CHANGE, rightStart, comparator2.getRangeCount() - (s2 + 1), leftStart, comparator1.getRangeCount() - (s1 + 1)));
+					differences.add(factory.createRangeDifference(RangeDifference.CHANGE, rightStart, this.comparator2.getRangeCount() - (s2 + 1), leftStart, this.comparator1.getRangeCount() - (s1 + 1)));
 				}
 				
 			}
@@ -184,9 +184,9 @@ import org.eclipse.core.runtime.SubMonitor;
 	 */
 	public void longestCommonSubsequence(SubMonitor subMonitor) {
 		super.longestCommonSubsequence(subMonitor);
-		if (lcs != null) { // The LCS can be null if one of the sides is empty
-			compactAndShiftLCS(lcs[0], getLength(), comparator1);
-			compactAndShiftLCS(lcs[1], getLength(), comparator2);
+		if (this.lcs != null) { // The LCS can be null if one of the sides is empty
+			compactAndShiftLCS(this.lcs[0], getLength(), this.comparator1);
+			compactAndShiftLCS(this.lcs[1], getLength(), this.comparator2);
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifference.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifference.java
index bb1c01b..9881bc1 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifference.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -209,7 +209,7 @@ public class RangeDifference {
 	 * @return the number of entities on the right side
 	 */
 	public int rightLength() {
-		return rightLength;
+		return this.rightLength;
 	}
 
 	/**
@@ -218,7 +218,7 @@ public class RangeDifference {
 	 * @return the end index of the entity range on the right side
 	 */
 	public int rightEnd() {
-		return this.rightStart + rightLength;
+		return this.rightStart + this.rightLength;
 	}
 
 	/**
@@ -254,7 +254,7 @@ public class RangeDifference {
 	 * @return the maximum number of entities in the left, right, and ancestor sides of this range
 	 */
 	public int maxLength() {
-		return Math.max(rightLength, Math.max(this.leftLength, this.ancestorLength));
+		return Math.max(this.rightLength, Math.max(this.leftLength, this.ancestorLength));
 	}
 	
 	public boolean equals(Object obj) {
@@ -264,13 +264,26 @@ public class RangeDifference {
 				&& this.leftStart == other.leftStart
 				&& this.leftLength == other.leftLength
 				&& this.rightStart == other.rightStart
-				&& rightLength == other.rightLength
+				&& this.rightLength == other.rightLength
 				&& this.ancestorStart == other.ancestorStart
 				&& this.ancestorLength == other.ancestorLength;
 		}
 		return super.equals(obj);
 	}
-	
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + this.kind;
+		result = prime * result + this.leftStart;
+		result = prime * result + this.leftLength;
+		result = prime * result + this.rightStart;
+		result = prime * result + this.rightLength;
+		result = prime * result + this.ancestorStart;
+		result = prime * result + this.ancestorLength;
+		return result;
+	}
+
 	public String toString() {
 		StringBuffer buf = new StringBuffer("RangeDifference {"); //$NON-NLS-1$
 		switch (this.kind) {
diff --git a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifferencer.java b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
index 53be109..e39c04d 100644
--- a/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
+++ b/eclipse/plugins/org.eclipse.compare.core/src/org/eclipse/compare/rangedifferencer/RangeDifferencer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -186,10 +186,30 @@ public final class RangeDifferencer {
 				else if (yourIter.fDifference == null)
 					startThread= myIter;
 				else { // not at end of both scripts take the lowest range
-					if (myIter.fDifference.leftStart <= yourIter.fDifference.leftStart) // 2 -> common (Ancestor) change range
+					if (myIter.fDifference.leftStart < yourIter.fDifference.leftStart) { // 2 -> common (Ancestor) change range
 						startThread= myIter;
-					else
+					} else if (myIter.fDifference.leftStart > yourIter.fDifference.leftStart) {
 						startThread= yourIter;
+					} else {
+						if (myIter.fDifference.leftLength == 0 && yourIter.fDifference.leftLength == 0) {
+							//insertion into the same position is conflict. 
+							changeRangeStart= myIter.fDifference.leftStart;
+							changeRangeEnd= myIter.fDifference.leftEnd();
+							myIter.next();
+							yourIter.next();
+							diff3.add(createRangeDifference3(factory, myIter, yourIter, diff3, right, left, changeRangeStart, changeRangeEnd));
+							continue;
+						} else 	if (myIter.fDifference.leftLength == 0) {
+							//insertion into a position, and modification to the next line, is not conflict.
+							startThread= myIter;
+						} else if (yourIter.fDifference.leftLength == 0) {
+							startThread = yourIter;
+						} else {
+							//modifications to overlapping lines is conflict.
+							startThread= myIter;
+						}
+					}
+						
 				}
 				changeRangeStart= startThread.fDifference.leftStart;
 				changeRangeEnd= startThread.fDifference.leftEnd();
@@ -201,11 +221,11 @@ public final class RangeDifferencer {
 				// merge overlapping changes with this range
 				//
 				DifferencesIterator other= startThread.other(myIter, yourIter);
-				while (other.fDifference != null && other.fDifference.leftStart <= changeRangeEnd) {
+				while (other.fDifference != null && other.fDifference.leftStart < changeRangeEnd) {
 					int newMax= other.fDifference.leftEnd();
 					other.next();
 					monitor.worked(1);
-					if (newMax >= changeRangeEnd) {
+					if (newMax > changeRangeEnd) {
 						changeRangeEnd= newMax;
 						other= other.other(myIter, yourIter);
 					}
@@ -322,7 +342,7 @@ public final class RangeDifferencer {
 	 * @since 2.0
 	 */
 	public static RangeDifference[] findRanges(IProgressMonitor pm, IRangeComparator ancestor, IRangeComparator left, IRangeComparator right) {
-		return findRanges(defaultFactory, null, ancestor, left, right);
+		return findRanges(defaultFactory, pm, ancestor, left, right);
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.compare.win32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.compare.win32/META-INF/MANIFEST.MF
index 7cb04a2..ddc1d40 100644
--- a/eclipse/plugins/org.eclipse.compare.win32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.compare.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.compare.win32;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.101.qualifier
 Bundle-Vendor: %providerName
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Eclipse-PlatformFilter: (osgi.os=win32)
diff --git a/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordComparison.java b/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordComparison.java
index 06c4b05..fc63c28 100644
--- a/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordComparison.java
+++ b/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordComparison.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,14 @@ public class WordComparison {
 		return auto.invoke(property(auto, command), new Variant[0]);
 	}
 
+	private static Variant invoke(OleAutomation auto, OleAutomation reference, String command) {
+		return auto.invoke(property(auto, reference, command), new Variant[0]);
+	}
+
+	private static Variant invoke(OleAutomation auto, OleAutomation reference, String command, String value) {
+		return auto.invoke(property(auto, reference, command), new Variant[] { new Variant(value) });
+	}
+
 	private static Variant invoke(OleAutomation auto, String command, int value) {
 		return auto.invoke(property(auto, command), new Variant[] { new Variant(value) });
 	}
@@ -104,6 +112,36 @@ public class WordComparison {
 		throw new SWTException(NLS.bind(CompareWin32Messages.WordComparison_3, command, value));
 	}
 
+
+	/**
+	 * <p>This methods workarounds the feature in doc documents. Some properties are not accessible
+	 * using names when a diff document is created. The workaround is to obtain the id of the
+	 * method from an original document and use it in the newly created one.</p>
+	 *
+	 * <p>An exception is thrown if the id cannot be retrieved</p>
+	 *
+	 * Reference information for id assignment: <a href="
+	 * http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx">http://msdn.microsoft.com/en-us/library/w7a36sdf%28VS.80%29.aspx</a>
+	 *
+	 * @param auto - object from which we want to get the property, must not be <code>null</code>
+	 * @param reference - an reference object from which the property will be obtained.
+	 * @param name - the name of the property, must not be <code>null</code>
+	 */
+	private static int property(OleAutomation auto, OleAutomation reference, String name) {
+		int[] ids = auto.getIDsOfNames(new String[] { name });
+		if (ids != null) {
+			return ids[0];
+		}
+		if(reference == null) throw new SWTException(NLS.bind(CompareWin32Messages.WordComparison_4, name)) ;
+
+		// the property was not retrieved at that point, try to get it from the reference object
+		ids = reference.getIDsOfNames(new String[] { name });
+		if (ids == null) {
+			throw new SWTException(NLS.bind(CompareWin32Messages.WordComparison_4, name));
+		}
+		return ids[0];
+	}
+
 	private static int property(OleAutomation auto, String name) {
 		int[] ids = auto.getIDsOfNames(new String[] { name });
 		if (ids == null) throw new SWTException(NLS.bind(CompareWin32Messages.WordComparison_4, name));
@@ -154,13 +192,13 @@ public class WordComparison {
 				compareDocument(document, baseDocument, revisedDocument);
 				OleAutomation activeDocument = getActiveDocument(application);
 				try {
-					Variant varResult = invoke(activeDocument, "SaveAs", workingCopy); //$NON-NLS-1$
+					Variant varResult = invoke(activeDocument, document, "SaveAs", workingCopy); //$NON-NLS-1$
 					if (varResult == null)
 						throw new SWTException(NLS.bind(CompareWin32Messages.WordComparison_6, workingCopy));
 					varResult.dispose();
 				} finally {
 					try {
-						closeDocument(activeDocument);
+						closeDocument(activeDocument, document);
 					} catch (SWTException e) {
 						// We don't want to throw the exception as we may mask another exception
 						Activator.log(e);
@@ -170,7 +208,7 @@ public class WordComparison {
 				}
 			} finally {
 				try {
-					closeDocument(document);
+					closeDocument(document, null);
 				} catch (SWTException e) {
 					// We don't want to throw the exception as we may mask another exception
 					Activator.log(e);
@@ -183,9 +221,9 @@ public class WordComparison {
 		}
 	}
 	
-	private void closeDocument(OleAutomation document) {
+	private void closeDocument(OleAutomation document, OleAutomation reference) {
 		// Close the first document: destination.Close()
-		Variant varResult = invoke(document, "Close"); //$NON-NLS-1$
+		Variant varResult = invoke(document, reference, "Close"); //$NON-NLS-1$
 		if (varResult != null) {
 			varResult.dispose();
 		}
@@ -273,7 +311,7 @@ public class WordComparison {
 	private void disposeSite() {
 		if (document != null) {
 			try {
-				closeDocument(document);
+				closeDocument(document, null);
 			} catch (SWTException e) {
 				Activator.log(e);
 			}
diff --git a/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java b/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
index f03eeaa..ac17d30 100644
--- a/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
+++ b/eclipse/plugins/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -305,8 +305,16 @@ public class WordMergeViewer extends AbstractMergeViewer implements IFlushable,
 		try {
 			if (isOneSided()) {
 				File file = getFileForSingleSide();
-				if (file != null)
-					wordArea.openDocument(file.getAbsolutePath(), inplace);
+				if (file != null) {
+					try {
+						wordArea.openDocument(file.getAbsolutePath(), inplace);
+					} catch (SWTException e) {
+						throw new CoreException(new Status(IStatus.ERROR,
+								Activator.PLUGIN_ID, NLS.bind(
+										CompareWin32Messages.WordComparison_16,
+										file.getAbsolutePath()), e));
+					}
+				}
 			} else {
 				File left = getFileForLeft();
 				File right = getFileForRight();
@@ -327,7 +335,14 @@ public class WordMergeViewer extends AbstractMergeViewer implements IFlushable,
 							resultFileTimestamp = result.lastModified();
 							description.setText(getTextDescription());
 						}
-						wordArea.openDocument(result.getAbsolutePath(), inplace);
+						try {
+							wordArea.openDocument(result.getAbsolutePath(), inplace);
+						} catch (SWTException e) {
+							throw new CoreException(new Status(IStatus.ERROR,
+									Activator.PLUGIN_ID, NLS.bind(
+											CompareWin32Messages.WordComparison_16,
+											result.getAbsolutePath()), e));
+						}
 					}
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.compare/.settings/.api_filters b/eclipse/plugins/org.eclipse.compare/.settings/.api_filters
index 298c256..055fcfb 100644
--- a/eclipse/plugins/org.eclipse.compare/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.compare/.settings/.api_filters
@@ -21,28 +21,6 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="compare/org/eclipse/compare/CompareEditorInput.java" type="org.eclipse.compare.CompareEditorInput">
-        <filter id="338944126">
-            <message_arguments>
-                <message_argument value="org.eclipse.compare.CompareEditorInput"/>
-                <message_argument value="setFocus()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="compare/org/eclipse/compare/CompareUI.java" type="org.eclipse.compare.CompareUI">
-        <filter id="338944126">
-            <message_arguments>
-                <message_argument value="org.eclipse.compare.CompareUI"/>
-                <message_argument value="addStructureViewerAlias(String, String)"/>
-            </message_arguments>
-        </filter>
-        <filter id="338944126">
-            <message_arguments>
-                <message_argument value="org.eclipse.compare.CompareUI"/>
-                <message_argument value="removeAllStructureViewerAliases(String)"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="compare/org/eclipse/compare/CompareViewerSwitchingPane.java" type="org.eclipse.compare.CompareViewerSwitchingPane">
         <filter id="338944126">
             <message_arguments>
diff --git a/eclipse/plugins/org.eclipse.compare/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.compare/META-INF/MANIFEST.MF
index 599217e..511a171 100644
--- a/eclipse/plugins/org.eclipse.compare/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.compare/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.compare; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.5.101.qualifier
 Bundle-Activator: org.eclipse.compare.internal.CompareUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
index 82e3277..fe7268f 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareEditorInput.java
@@ -38,6 +38,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.PlatformObject;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.IStatusLineManager;
@@ -81,6 +82,7 @@ import org.eclipse.ui.part.FileEditorInput;
 import org.eclipse.ui.part.IShowInSource;
 import org.eclipse.ui.part.ShowInContext;
 import org.eclipse.ui.services.IServiceLocator;
+import org.eclipse.ui.texteditor.ITextEditorExtension3;
 
 
 /**
@@ -141,7 +143,7 @@ import org.eclipse.ui.services.IServiceLocator;
  * @see CompareUI
  * @see CompareEditorInput
  */
-public abstract class CompareEditorInput implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress, ICompareContainer {
+public abstract class CompareEditorInput extends PlatformObject implements IEditorInput, IPropertyChangeNotifier, IRunnableWithProgress, ICompareContainer {
 
 	private static final boolean DEBUG= false;
 	
@@ -225,7 +227,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 
 		public boolean hasViewerFor(Object input) {
 			OutlineViewerCreator creator = getWrappedCreator();
-			return (creator != null);
+			return creator != null;
 		}
 
 		public Object getInput() {
@@ -274,7 +276,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 	
 	private boolean isShowStructureInOutlineView() {
 		Object object= getCompareConfiguration().getProperty(CompareConfiguration.USE_OUTLINE_VIEW);
-		return (object instanceof Boolean && ((Boolean)object).booleanValue());
+		return object instanceof Boolean && ((Boolean)object).booleanValue();
 	}
 		
 	/* (non Javadoc)
@@ -316,8 +318,17 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 				}
 			}
 		}
-			
-		return null;
+		
+		if (adapter == ITextEditorExtension3.class) {
+			if (fContentInputPane != null) {
+				Viewer v = fContentInputPane.getViewer();
+				if (v != null) {
+					return Utilities.getAdapter(v, ITextEditorExtension3.class);
+				}
+			}
+		}
+
+		return super.getAdapter(adapter);
 	}
 
 	public synchronized ICompareNavigator getNavigator() {
@@ -527,7 +538,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 				
 		Control outline= createOutlineContents(fComposite, SWT.HORIZONTAL);
 					
-		fContentInputPane= new CompareContentViewerSwitchingPane(fComposite, SWT.BORDER | SWT.FLAT, this);
+		fContentInputPane= createContentViewerSwitchingPane(fComposite, SWT.BORDER | SWT.FLAT, this);
 
 		if (fFocusPane == null)
 			fFocusPane= fContentInputPane;
@@ -535,13 +546,13 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 			fComposite.setVisible(outline, false);
 		fComposite.setVisible(fContentInputPane, true);
 		
-		if (fStructureInputPane != null)
+		if (fStructureInputPane != null && fComposite.getChildren().length == 2)
 			fComposite.setWeights(new int[] { 30, 70 });
 		
 		fComposite.layout();
 
 		feedInput();
-
+		
 		fComposite.addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
 				/*
@@ -573,7 +584,19 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 		contentsCreated();
 		return fComposite;
 	}
-
+	
+	/**
+	 * @param parent the parent control under which the control must be created
+	 * @param style  the style of widget to construct
+	 * @param cei the compare editor input for the viewer
+	 * @return the pane displaying content changes
+	 * @nooverride This method is not intended to be re-implemented or extended by clients.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected CompareViewerSwitchingPane createContentViewerSwitchingPane(Splitter parent, int style, CompareEditorInput cei) {
+		return new CompareContentViewerSwitchingPane(parent, style, cei);
+	}
+	
 	/**
 	 * Callback that occurs when the UI associated with this compare editor
 	 * input is disposed. This method will only be invoked if the UI has been
@@ -696,7 +719,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 	/* private */ boolean hasChildren(Object input) {
 		if (input instanceof IDiffContainer) {
 			IDiffContainer dn= (IDiffContainer) input;
-			return (dn.hasChildren());
+			return dn.hasChildren();
 		}
 		return false;
 	}
@@ -753,11 +776,15 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 						Object input= fStructureInputPane.getInput();
 						if (input != null)
 							internalSetContentPaneInput(input);
+						if (!Utilities.okToUse(fStructurePane1) || !Utilities.okToUse(fStructurePane2))
+							return;
 						fStructurePane2.setInput(null); // clear downstream pane
 						fStructurePane1.setInput(null);
 					} else {
 						Object input= getElement(selection);
 						internalSetContentPaneInput(input);
+						if (!Utilities.okToUse(fStructurePane1) || !Utilities.okToUse(fStructurePane2))
+							return;						
 						if (structureCompareOnSingleClick() || hasUnusableContentViewer())
 							fStructurePane1.setInput(input);
 						fStructurePane2.setInput(null); // clear downstream pane
@@ -1028,7 +1055,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 		if (!fDirty)
 			fDirtyViewers.clear();
 		if (oldDirty != dirty)
-			Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, new Boolean(oldDirty), new Boolean(dirty));
+			Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(dirty));
 	}
 	
 	private void setDirty(Object source, boolean dirty) {
@@ -1041,7 +1068,7 @@ public abstract class CompareEditorInput implements IEditorInput, IPropertyChang
 		boolean newDirty= fDirty || fDirtyViewers.size() > 0;
 		if (DEBUG) System.out.println("setDirty("+source+", "+dirty+"): " + newDirty); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		if (oldDirty != newDirty)
-			Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, new Boolean(oldDirty), new Boolean(newDirty));
+			Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(newDirty));
 	}
 	
 	/* (non Javadoc)
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
index 297ef6b..71fe641 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/CompareViewerSwitchingPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,19 @@
 package org.eclipse.compare;
 
 import org.eclipse.compare.contentmergeviewer.IFlushable;
-import org.eclipse.compare.internal.*;
+import org.eclipse.compare.internal.CompareMessages;
+import org.eclipse.compare.internal.NullViewer;
+import org.eclipse.compare.internal.Utilities;
 import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -269,6 +275,9 @@ public abstract class CompareViewerSwitchingPane extends CompareViewerPane {
 		// set input
 		fViewer.setInput(input);
 
+		if (getViewer() == null || !Utilities.okToUse(getViewer().getControl()))
+			return;
+
 		Image image= null;
 		if (!(fViewer instanceof NullViewer) && input instanceof ICompareInput)
 			image= ((ICompareInput)input).getImage();
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
index 8fe3620..b025807 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,22 +10,53 @@
  *******************************************************************************/
 package org.eclipse.compare;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
+import java.util.ResourceBundle;
 
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.structuremergeviewer.*;
+import org.eclipse.compare.internal.CompareContainer;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.ResizableDialog;
+import org.eclipse.compare.internal.StructureCreatorDescriptor;
+import org.eclipse.compare.internal.Utilities;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+import org.eclipse.compare.structuremergeviewer.IStructureCreator;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
 
 import com.ibm.icu.text.DateFormat;
 import com.ibm.icu.text.MessageFormat;
@@ -831,13 +862,8 @@ public class EditionSelectionDialog extends ResizableDialog {
 		};
 		vsplitter.setWeights(new int[] { 30, 70 });
 		
-		IPreferenceStore store= getCompareConfiguration().getPreferenceStore();
-		if (store != null) {
-			if (store.getBoolean(ComparePreferencePage.SHOW_MORE_INFO)) {
-				statusLabel = new Label(parent, SWT.NONE);
-				statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			}
-		}
+		statusLabel = new Label(parent, SWT.NONE);
+		statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
 		applyDialogFont(parent);				
 		return parent;
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
index 03ed345..031a042 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1109,7 +1109,7 @@ public abstract class ContentMergeViewer extends ContentViewer
 				fLeftLabel.setImage(leftImage);
 			String leftLabel = content.getLeftLabel(input);
 			if (leftLabel != null)
-				fLeftLabel.setText(TextProcessor.process(leftLabel));
+				fLeftLabel.setText(leftLabel);
 		}
 		if (fRightLabel != null) {
 			Image rightImage = content.getRightImage(input);
@@ -1117,7 +1117,7 @@ public abstract class ContentMergeViewer extends ContentViewer
 				fRightLabel.setImage(rightImage);
 			String rightLabel = content.getRightLabel(input);
 			if (rightLabel != null)
-				fRightLabel.setText(TextProcessor.process(rightLabel));
+				fRightLabel.setText(rightLabel);
 		}
 	}
 		
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 21bf0b5..5bd32a6 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
  *     Max Weninger (max.weninger at windriver.com) - Bug 72936 [Viewers] Show line numbers in comparision
  *     Matt McCutchen (hashproduct+eclipse at gmail.com) - Bug 178968 [Viewers] Lines scrambled and different font size in compare
  *     Matt McCutchen (hashproduct+eclipse at gmail.com) - Bug 191524 [Viewers] Synchronize horizontal scrolling by # characters, not % of longest line
+ *     Stephan Herrmann (stephan at cs.tu-berlin.de) - Bug 291695: Element compare fails to use source range
  *******************************************************************************/
 package org.eclipse.compare.contentmergeviewer;
 
@@ -116,6 +117,7 @@ import org.eclipse.jface.text.source.SourceViewer;
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
@@ -378,7 +380,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	private CompareHandlerService fHandlerService;
 	
 	private boolean fSynchronizedScrolling= true;
-	private boolean fShowMoreInfo= false;
 	
 	private MergeSourceViewer fFocusPart;
 	
@@ -386,6 +387,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	private IPositionUpdater fPositionUpdater;
 	private boolean fIsMotif;
 	private boolean fIsCarbon;
+	private boolean fIsMac;
 	
 	private boolean fHasErrors;
 		
@@ -413,7 +415,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	private ContributorInfo fLeftContributor;
 	private ContributorInfo fRightContributor;
 	private ContributorInfo fAncestorContributor;
-	private boolean isRefreshing;
+	private int isRefreshing = 0;
 	private int fSynchronziedScrollPosition;
 	private ActionContributionItem fNextChange;
 	private ActionContributionItem fPreviousChange;
@@ -757,13 +759,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 			if (document == null)
 				return;
 			
-			// Add a position updater to the document
-			document.addPositionCategory(DIFF_RANGE_CATEGORY);
-			if (this.fViewer.fPositionUpdater == null)
-				this.fViewer.fPositionUpdater= this.fViewer.new ChildPositionUpdater(DIFF_RANGE_CATEGORY);
-			else
-				document.removePositionUpdater(this.fViewer.fPositionUpdater);
-			document.addPositionUpdater(this.fViewer.fPositionUpdater);
+			connectPositionUpdater(document);
 
 			// install new document
 			tp.setRegion(range);
@@ -778,6 +774,15 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 							
 			tp.rememberDocument(document);
 		}
+
+		void connectPositionUpdater(IDocument document) {
+			document.addPositionCategory(DIFF_RANGE_CATEGORY);
+			if (this.fViewer.fPositionUpdater == null)
+				this.fViewer.fPositionUpdater= this.fViewer.new ChildPositionUpdater(DIFF_RANGE_CATEGORY);
+			else
+				document.removePositionUpdater(this.fViewer.fPositionUpdater);
+			document.addPositionUpdater(this.fViewer.fPositionUpdater);
+		}
 		
 		private void unsetDocument(MergeSourceViewer tp) {
 			IDocument oldDoc= internalGetDocument(tp);
@@ -1454,9 +1459,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		
 		fSymbolicFontName= getSymbolicFontName();
 		
-		String platform= SWT.getPlatform();
-		fIsMotif= "motif".equals(platform); //$NON-NLS-1$
-		fIsCarbon= "carbon".equals(platform); //$NON-NLS-1$
+		fIsMotif= Util.isMotif();
+		fIsCarbon= Util.isCarbon();
+		fIsMac= Util.isMac();
 		
 		if (fIsMotif)
 			fMarginWidth= 0;
@@ -1473,7 +1478,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 			
 			fLeftIsLocal= Utilities.getBoolean(getCompareConfiguration(), "LEFT_IS_LOCAL", false); //$NON-NLS-1$
 			fSynchronizedScrolling= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
-			fShowMoreInfo= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
 			fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
 			//fUseSplines= fPreferenceStore.getBoolean(ComparePreferencePage.USE_SPLINES);
 			fUseSingleLine= fPreferenceStore.getBoolean(ComparePreferencePage.USE_SINGLE_LINE);
@@ -2057,22 +2061,11 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 						st2.setHorizontalPixel(v);
 					if (st3.isVisible())
 						st3.setHorizontalPixel(v);
-					workaround65205();
 			    }
 			}
 		});
 	}
 
-	/**
-	 * A workaround for bug #65205.
-	 * On MacOS X a Display.update() is required to flush pending paint requests after
-	 * programmatically scrolling.
-	 */
-	private void workaround65205() {
-		if (fIsCarbon && fComposite != null && !fComposite.isDisposed())
-			fComposite.getDisplay().update();
-	}
-
 	private void setCurrentDiff2(Diff diff, boolean reveal) {
 		if (diff != null && diff.getKind() != RangeDifference.NOCHANGE) {
 			//fCurrentDiff= null;
@@ -2301,7 +2294,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 				
 				new HoverResizer(canvas, HORIZONTAL);
 								
-				fCenterButton= new Button(canvas, fIsCarbon ? SWT.FLAT : SWT.PUSH);
+				fCenterButton= new Button(canvas, fIsMac ? SWT.FLAT : SWT.PUSH);
 				if (fNormalCursor == null) fNormalCursor= new Cursor(canvas.getDisplay(), SWT.CURSOR_ARROW);
 				fCenterButton.setCursor(fNormalCursor);
 				fCenterButton.setText(COPY_RIGHT_TO_LEFT_INDICATOR);
@@ -2313,9 +2306,8 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 							fCenterButton.setVisible(false);
 							if (fButtonDiff != null) {
 								setCurrentDiff(fButtonDiff, false);
-								copy(fCurrentDiff,
-										fCenterButton.getText().equals(COPY_LEFT_TO_RIGHT_INDICATOR),
-										fCurrentDiff.getKind() != RangeDifference.CONFLICT);
+								copy(fCurrentDiff, fCenterButton.getText().equals(
+									COPY_LEFT_TO_RIGHT_INDICATOR), false);
 							}
 						}
 					}
@@ -2827,7 +2819,14 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		fLeftContributor.setEncodingIfAbsent(fRightContributor);
 		fRightContributor.setEncodingIfAbsent(fLeftContributor);
 		fAncestorContributor.setEncodingIfAbsent(fLeftContributor);
-		
+
+		if (!isConfigured) {
+			configureSourceViewer(fAncestor.getSourceViewer(), false, null);
+			configureSourceViewer(fLeft.getSourceViewer(), cc.isLeftEditable() && cp.isLeftEditable(input), fLeftContributor);
+			configureSourceViewer(fRight.getSourceViewer(), cc.isRightEditable() && cp.isRightEditable(input), fRightContributor);
+			isConfigured = true; // configure once
+		} 
+
 		// set new documents
 		fLeftContributor.setDocument(fLeft, cc.isLeftEditable() && cp.isLeftEditable(input));
 		fLeftLineCount= fLeft.getLineCount();
@@ -2836,13 +2835,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		fRightLineCount= fRight.getLineCount();
 		
 		fAncestorContributor.setDocument(fAncestor, false);
-		
-		if (!isConfigured) {
-			configureSourceViewer(fAncestor.getSourceViewer(), false);
-			configureSourceViewer(fLeft.getSourceViewer(), cc.isLeftEditable() && cp.isLeftEditable(input));
-			configureSourceViewer(fRight.getSourceViewer(), cc.isRightEditable() && cp.isRightEditable(input));
-			isConfigured = true; // configure once
-		}
 
 		//if the input is part of a patch hunk, toggle synchronized scrolling
 		/*if (isPatchHunk()){
@@ -2886,9 +2878,14 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		
 	}
 
-	private void configureSourceViewer(SourceViewer sourceViewer, boolean editable) {
-		configureTextViewer(sourceViewer);
+	private void configureSourceViewer(SourceViewer sourceViewer, boolean editable, ContributorInfo contributor) {
 		setEditable(sourceViewer, editable);
+		configureTextViewer(sourceViewer);
+		if (editable && contributor != null) {
+			IDocument document = sourceViewer.getDocument();
+			if (document != null)
+				contributor.connectPositionUpdater(document);
+		}
 		if (!isCursorLinePainterInstalled(sourceViewer))
 			getSourceViewerDecorationSupport(sourceViewer).install(fPreferenceStore);
 	}
@@ -2919,7 +2916,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	}
 
 	private boolean isRefreshing() {
-		return isRefreshing;
+		return isRefreshing > 0;
 	}
 
 	private ContributorInfo createLegInfoFor(Object element, char leg) {
@@ -3227,7 +3224,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
   		if (fBirdsEyeCanvas != null) {
   			int verticalScrollbarButtonHeight= scrollbarWidth;
 			int horizontalScrollbarButtonHeight= scrollbarHeight;
-			if (fIsCarbon) {
+			if (fIsMac) {
 				verticalScrollbarButtonHeight+= 2;
 				horizontalScrollbarButtonHeight= 18;
 			}
@@ -3279,8 +3276,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		} catch (CoreException e) {
 			CompareUIPlugin.log(e.getStatus());
 			String title= Utilities.getString(getResourceBundle(), "tooComplexError.title"); //$NON-NLS-1$
-			String format= Utilities.getString(getResourceBundle(), "tooComplexError.format"); //$NON-NLS-1$
-			String msg= MessageFormat.format(format, new Object[] { Integer.toString(PlatformUI.getWorkbench().getProgressService().getLongOperationTime()/1000) } );
+			String msg= Utilities.getString(getResourceBundle(), "tooComplexError.message"); //$NON-NLS-1$
 			MessageDialog.openError(fComposite.getShell(), title, msg);
 		}
 
@@ -3293,8 +3289,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		} catch (CoreException e) {
 			CompareUIPlugin.log(e.getStatus());
 			String title= Utilities.getString(getResourceBundle(), "tooComplexError.title"); //$NON-NLS-1$
-			String format= Utilities.getString(getResourceBundle(), "tooComplexError.format"); //$NON-NLS-1$
-			String msg= MessageFormat.format(format, new Object[] { Integer.toString(PlatformUI.getWorkbench().getProgressService().getLongOperationTime()/1000) } );
+			String msg= Utilities.getString(getResourceBundle(), "tooComplexError.message"); //$NON-NLS-1$
 			MessageDialog.openError(fComposite.getShell(), title, msg);
 			return null;
 		}
@@ -3423,9 +3418,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 
 	private void updateStatus(Diff diff) {
 		
-		if (! fShowMoreInfo)
-			return;
-					
 		String diffDescription;
 		
 		if (diff == null) {
@@ -3458,10 +3450,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 		getCompareConfiguration().getContainer().setStatusMessage(s);
 	}
 
-	private void clearStatus() {
-		getCompareConfiguration().getContainer().setStatusMessage(null);
-	}
-	
 	private String getDiffType(Diff diff) {
 		String s= ""; 	//$NON-NLS-1$
 		switch(diff.getKind()) {
@@ -3692,7 +3680,9 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 			fShowPseudoConflicts= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_PSEUDO_CONFLICTS);
 			
 			update(true);
-			selectFirstDiff(true);
+			// selectFirstDiff(true);
+			if (fFocusPart != null)
+				handleSelectionChanged(fFocusPart);
 			
 //		} else if (key.equals(ComparePreferencePage.USE_SPLINES)) {
 //			fUseSplines= fPreferenceStore.getBoolean(ComparePreferencePage.USE_SPLINES);
@@ -3728,16 +3718,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 			boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SYNCHRONIZE_SCROLLING);
 			setSyncScrolling(b);
 		
-		} else if (key.equals(ComparePreferencePage.SHOW_MORE_INFO)) {
-			
-			boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.SHOW_MORE_INFO);
-			if (b != fShowMoreInfo) {
-				fShowMoreInfo= b;
-				if (fShowMoreInfo)
-					updateStatus(fCurrentDiff);
-				else
-					clearStatus();
-			}
 		} else if (key.equals(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND)) {
 			if (!fIsUsingSystemBackground) {
 				setBackgroundColor(createColor(fPreferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND));
@@ -4967,7 +4947,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	}
 
 	private void beginRefresh() {
-		isRefreshing = true;
+		isRefreshing++;
 		fLeftContributor.cacheSelection(fLeft);
 		fRightContributor.cacheSelection(fRight);
 		fAncestorContributor.cacheSelection(fAncestor);
@@ -4978,7 +4958,7 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 	}
 	
 	private void endRefresh() {
-		isRefreshing = false;
+		isRefreshing--;
 		fLeftContributor.cacheSelection(null);
 		fRightContributor.cacheSelection(null);
 		fAncestorContributor.cacheSelection(null);
@@ -4987,7 +4967,6 @@ public class TextMergeViewer extends ContentMergeViewer implements IAdaptable {
 
 	private void synchronizedScrollVertical(int vpos) {
 		scrollVertical(vpos, vpos, vpos, null);
-		workaround65205();
 	}
 	
 	private boolean isIgnoreAncestor() {
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
index 01eafb3..e278ba7 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewerResources.properties
@@ -8,7 +8,7 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# NLS_MESSAGEFORMAT_VAR
+#
 # @(#)TextMergeViewerResources.properties
 #
 # Resource strings for TextMergeViewer.java
@@ -21,9 +21,7 @@ saveDialog.message= Resource has been modified. Save changes?
 compareProgressTask.title= Computing Differences...
 
 tooComplexError.title= Error
-# NLS_MESSAGEFORMAT_ALL
-tooComplexError.format= Too many differences. Turn on the ''Ignore White Space'' option or do a structure compare first.
-# NLS_MESSAGEFORMAT_VAR
+tooComplexError.message= Too many differences. Turn on the 'Ignore White Space' option or do a structure compare first.
 
 #####################################################
 # Toolbar actions
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java
new file mode 100644
index 0000000..e101563
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/AdapterFactory.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.compare.internal;
+
+import org.eclipse.compare.CompareEditorInput;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.ui.IContributorResourceAdapter;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+
+public class AdapterFactory implements IAdapterFactory {
+
+	public Object getAdapter(final Object adaptableObject, Class adapterType) {
+		if (IContributorResourceAdapter.class.equals(adapterType)
+				&& adaptableObject instanceof CompareEditorInput) {
+			return new IContributorResourceAdapter() {
+				public IResource getAdaptedResource(IAdaptable adaptable) {
+					Object ei = ((CompareEditorInput) adaptableObject)
+							.getAdapter(IEditorInput.class);
+					if (ei instanceof IFileEditorInput) {
+						return ((IFileEditorInput) ei).getFile();
+					}
+					return null;
+				}
+			};
+		}
+		return null;
+	}
+
+	public Class[] getAdapterList() {
+		return new Class[] { IContributorResourceAdapter.class };
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareContentViewerSwitchingPane.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareContentViewerSwitchingPane.java
index b558841..d92ad78 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareContentViewerSwitchingPane.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareContentViewerSwitchingPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,8 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.MenuAdapter;
 import org.eclipse.swt.events.MenuEvent;
 import org.eclipse.swt.events.MouseAdapter;
@@ -46,11 +48,17 @@ import org.eclipse.ui.PlatformUI;
 public class CompareContentViewerSwitchingPane extends
 		CompareViewerSwitchingPane {
 
+	private static final String OPTIMIZED_INFO_IMAGE_NAME = "obj16/message_info.gif"; //$NON-NLS-1$
+	public static final String OPTIMIZED_ALGORITHM_USED = "OPTIMIZED_ALGORITHM_USED"; //$NON-NLS-1$
+
 	private CompareEditorInput fCompareEditorInput;
 
 	private ViewerDescriptor fSelectedViewerDescriptor;
 
 	private ToolBar toolBar;
+	private CLabel clOptimized;
+
+	private boolean menuShowing;
 
 	public CompareContentViewerSwitchingPane(Splitter parent, int style,
 			CompareEditorInput cei) {
@@ -120,6 +128,24 @@ public class CompareContentViewerSwitchingPane extends
 				showMenu();
 			}
 		});
+
+		clOptimized = new CLabel(composite, SWT.NONE);
+		clOptimized
+				.setText(CompareMessages.CompareContentViewerSwitchingPane_optimized);
+		clOptimized
+				.setToolTipText(CompareMessages.CompareContentViewerSwitchingPane_optimizedTooltip);
+		clOptimized.setImage(CompareUIPlugin.getImageDescriptor(
+				OPTIMIZED_INFO_IMAGE_NAME).createImage());
+		clOptimized.setVisible(false); // hide by default
+		clOptimized.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				Image img = clOptimized.getImage();
+				if ((img != null) && (!img.isDisposed())) {
+					img.dispose();
+				}
+			}
+		});
+
 		return composite;
 	}
 	
@@ -130,13 +156,22 @@ public class CompareContentViewerSwitchingPane extends
 
 	public void setInput(Object input) {
 		super.setInput(input);
+		if (getViewer() == null || !Utilities.okToUse(getViewer().getControl()))
+			return;
 		ViewerDescriptor[] vd = CompareUIPlugin.getDefault()
 				.findContentViewerDescriptor(getViewer(), getInput(),
 						getCompareConfiguration());
 		toolBar.setVisible(vd != null && vd.length > 1);
+		CompareConfiguration cc = getCompareConfiguration();
+		Boolean isOptimized = (Boolean) cc.getProperty(OPTIMIZED_ALGORITHM_USED);
+		clOptimized.setVisible(isOptimized != null && isOptimized.booleanValue());
 	}
 
 	private void showMenu() {
+		if (menuShowing)
+			return;
+		menuShowing= true;
+		
 		ViewerDescriptor[] vd = CompareUIPlugin.getDefault()
 				.findContentViewerDescriptor(getViewer(), getInput(),
 						getCompareConfiguration());
@@ -180,6 +215,7 @@ public class CompareContentViewerSwitchingPane extends
 		// 3. dispose on close
 		menu.addMenuListener(new MenuAdapter() {
 			public void menuHidden(MenuEvent e) {
+				menuShowing= false;
 				e.display.asyncExec(new Runnable() {
 					public void run() {
 						menu.dispose();
@@ -245,4 +281,5 @@ public class CompareContentViewerSwitchingPane extends
 			}
 		}
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
index 93daf82..7a7fcd0 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,15 +15,21 @@ import java.lang.reflect.InvocationTargetException;
 import org.eclipse.compare.CompareConfiguration;
 import org.eclipse.compare.CompareEditorInput;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 
 /**
@@ -169,13 +175,8 @@ public class CompareDialog extends TrayDialog implements IPropertyChangeListener
 		Control c= fCompareEditorInput.createContents(parent);
 		c.setLayoutData(new GridData(GridData.FILL_BOTH));
 		
-		IPreferenceStore store= fCompareEditorInput.getCompareConfiguration().getPreferenceStore();
-		if (store != null) {
-			if (store.getBoolean(ComparePreferencePage.SHOW_MORE_INFO)) {
-				statusLabel = new Label(parent, SWT.NONE);
-				statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			}
-		}
+		statusLabel = new Label(parent, SWT.NONE);
+		statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		
 		Shell shell= c.getShell();
 		shell.setText(fCompareEditorInput.getTitle());
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
index f9c03ce..1ebda98 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java
@@ -35,6 +35,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
@@ -63,6 +64,7 @@ import org.eclipse.ui.part.EditorPart;
 import org.eclipse.ui.part.IShowInSource;
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.services.IServiceLocator;
+import org.eclipse.ui.texteditor.ITextEditorExtension3;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 
 /**
@@ -110,7 +112,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
 		public void registerContextMenu(MenuManager menu, ISelectionProvider provider) {
 			if (getSite() instanceof IEditorSite) {
 				IEditorSite es = (IEditorSite) getSite();
-				es.registerContextMenu(menu, provider, false);
+				es.registerContextMenu(menu, provider, true);
 			}
 		}
 
@@ -151,7 +153,7 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
 		 * @see org.eclipse.compare.internal.CompareContainer#getWorkerJobName()
 		 */
 		protected String getWorkerJobName() {
-			return NLS.bind(CompareMessages.CompareEditor_11, getTitle());
+			return NLS.bind(CompareMessages.CompareEditor_2, getTitle());
 		}
 		
 		/* (non-Javadoc)
@@ -208,6 +210,10 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
 		if (key == IEditorInput.class) {
 			return getEditorInput().getAdapter(IEditorInput.class);
 		}
+		
+		if (key == ITextEditorExtension3.class) {
+			return getEditorInput().getAdapter(ITextEditorExtension3.class);
+		}
 
 		return super.getAdapter(key);
 	}
@@ -446,7 +452,15 @@ public class CompareEditor extends EditorPart implements IReusableEditor, ISavea
 				setState(CREATING_CONTROL);
 				if (getSite().getSelectionProvider() == null)
 					getSite().setSelectionProvider(new CompareEditorSelectionProvider());
-				fControl= ci.createContents(fPageBook);
+				try {
+					fControl = ci.createContents(fPageBook);
+				} catch (SWTException e) {
+					// closed while creating
+					if (e.code == SWT.ERROR_WIDGET_DISPOSED) {
+						setState(CANCELED);
+						return;
+					}
+				}
 				fPageBook.showPage(fControl);
 				PlatformUI.getWorkbench().getHelpSystem().setHelp(fControl, ICompareContextIds.COMPARE_EDITOR);
 				if (isActive()) {
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
index b7125fc..771688b 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditorSelectionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,19 +10,25 @@
  *******************************************************************************/
 package org.eclipse.compare.internal;
 
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.widgets.Widget;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.text.TextViewer;
+
 import org.eclipse.jface.viewers.IPostSelectionProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.widgets.Widget;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.TextViewer;
+
 
 /**
  * A selection provider for view parts with more that one viewer. Tracks the
@@ -199,7 +205,41 @@ public class CompareEditorSelectionProvider implements IPostSelectionProvider {
 
 	public void setSelection(ISelection selection, boolean reveal) {
 		if (fViewerInFocus != null) {
+			if (reveal && !isSelectionInsideVisibleRegion(fViewerInFocus, selection))
+				resetVisibleRegion();
 			fViewerInFocus.setSelection(selection, reveal);
 		}
 	}
+
+	/**
+	 * Resets the visible region for all text viewers of this selection provider.
+	 * 
+	 * @since 3.6
+	 */
+	private void resetVisibleRegion() {
+		if (fViewers == null)
+			return;
+
+		for (int i= 0; i < fViewers.length; i++)
+			fViewers[i].setVisibleRegion(0, fViewers[i].getDocument().getLength());
+	}
+
+	/**
+	 * Tells whether the given selection is inside the text viewer's visible region.
+	 * 
+	 * @param textViewer the text viewer
+	 * @param selection the selection
+	 * @return <code>true</code> if the selection is inside the text viewer's visible region
+	 * @since 3.6
+	 */
+	private static boolean isSelectionInsideVisibleRegion(TextViewer textViewer, ISelection selection) {
+		if (!(selection instanceof ITextSelection))
+			return false;
+
+		ITextSelection textSelection= (ITextSelection)selection;
+		IRegion visibleRegion= textViewer.getVisibleRegion();
+
+		return textSelection.getOffset() >= visibleRegion.getOffset() && textSelection.getOffset() + textSelection.getLength() <= visibleRegion.getOffset() + visibleRegion.getLength();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
index 4c21926..6be02f6 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,20 +28,11 @@ public final class CompareMessages extends NLS {
 	public static String CompareDialog_error_title;
 	public static String CompareEditor_0;
 	public static String CompareEditor_1;
-	public static String CompareEditor_10;
-	public static String CompareEditor_11;
+	public static String CompareEditor_2;
 	public static String DocumentMerger_0;
 	public static String DocumentMerger_1;
 	public static String DocumentMerger_2;
 	public static String DocumentMerger_3;
-	public static String CompareEditor_2;
-	public static String CompareEditor_3;
-	public static String CompareEditor_4;
-	public static String CompareEditor_5;
-	public static String CompareEditor_6;
-	public static String CompareEditor_7;
-	public static String CompareEditor_8;
-	public static String CompareEditor_9;
 	public static String CompareEditorInput_0;
 	public static String ComparePlugin_internal_error;
 	public static String ComparePreferencePage_0;
@@ -130,6 +121,8 @@ public final class CompareMessages extends NLS {
 	public static String CompareContentViewerSwitchingPane_defaultViewer;
 	public static String CompareContentViewerSwitchingPane_switchButtonTooltip;
 	public static String CompareContentViewerSwitchingPane_discoveredLabel;
+	public static String CompareContentViewerSwitchingPane_optimized;
+	public static String CompareContentViewerSwitchingPane_optimizedTooltip;
 	public static String CompareStructureViewerSwitchingPane_defaultViewer;
 	public static String CompareStructureViewerSwitchingPane_switchButtonTooltip;
 	public static String CompareStructureViewerSwitchingPane_discoveredLabel;
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
index e5a2344..16f3c6a 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -100,16 +100,7 @@ CompareUIPlugin_1=Opening Compare Dialog
 CompareContainer_0=Updating Comparison State
 CompareEditor_0=Initializing Compare Editor
 CompareEditor_1=Initializing...
-CompareEditor_2=Cancel
-CompareEditor_3=Cancel the initialization of this editor
-CompareEditor_4=The initialization of this compare editor was canceled.
-CompareEditor_5=Initialize
-CompareEditor_6=Initialize this compare editor
-CompareEditor_7=There are no differences between the selected inputs.
-CompareEditor_8=Close
-CompareEditor_9=Close this compare editor editor
-CompareEditor_10=An error occurred while initializing this editor. See the error log for more details.
-CompareEditor_11=Update comparison {0}
+CompareEditor_2=Update comparison {0}
 DocumentMerger_0=Computing Differences...
 DocumentMerger_1=Too many differences found
 DocumentMerger_2=Finding Differences...
@@ -143,6 +134,8 @@ CompareWithOtherResourceDialog_workspaceRadioButton=&Workspace
 CompareContentViewerSwitchingPane_defaultViewer=Default Compare
 CompareContentViewerSwitchingPane_switchButtonTooltip=Switch Compare Viewer
 CompareContentViewerSwitchingPane_discoveredLabel={0} Compare
+CompareContentViewerSwitchingPane_optimized=Differences shown might not be optimal
+CompareContentViewerSwitchingPane_optimizedTooltip=To avoid long computation time a faster comparison algorithm has been used. As a result, the differences highlighted in the viewer may be larger than necessary.
 CompareStructureViewerSwitchingPane_defaultViewer=Default Structure Compare
 CompareStructureViewerSwitchingPane_switchButtonTooltip=Switch Structure Compare Viewer
 CompareStructureViewerSwitchingPane_discoveredLabel={0} Structure Compare
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferenceInitializer.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferenceInitializer.java
index 304e664..23162e5 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,8 +21,6 @@ public class ComparePreferenceInitializer extends AbstractPreferenceInitializer
 
 	public void initializeDefaultPreferences() {
 		IPreferenceStore store = CompareUIPlugin.getDefault().getPreferenceStore();
-		store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION, ICompareUIConstants.PREF_VALUE_PROMPT);
-		store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL, ICompareUIConstants.PREF_VALUE_LOOP);
 		ComparePreferencePage.initDefaults(store);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
index 5108fdf..d9d18b0 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import org.eclipse.compare.CompareConfiguration;
 import org.eclipse.compare.IEncodedStreamContentAccessor;
 import org.eclipse.compare.ITypedElement;
 import org.eclipse.compare.contentmergeviewer.TextMergeViewer;
+import org.eclipse.compare.internal.core.ComparePlugin;
 import org.eclipse.compare.structuremergeviewer.DiffNode;
 import org.eclipse.compare.structuremergeviewer.Differencer;
 import org.eclipse.jface.dialogs.Dialog;
@@ -86,13 +87,13 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 	public static final String SHOW_PSEUDO_CONFLICTS= PREFIX + "ShowPseudoConflicts"; //$NON-NLS-1$
 	public static final String INITIALLY_SHOW_ANCESTOR_PANE= PREFIX + "InitiallyShowAncestorPane"; //$NON-NLS-1$
 	public static final String PREF_SAVE_ALL_EDITORS= PREFIX + "SaveAllEditors"; //$NON-NLS-1$
-	public static final String SHOW_MORE_INFO= PREFIX + "ShowMoreInfo"; //$NON-NLS-1$
 	public static final String IGNORE_WHITESPACE= PREFIX + "IgnoreWhitespace"; //$NON-NLS-1$
 	
 	//public static final String USE_SPLINES= PREFIX + "UseSplines"; //$NON-NLS-1$
 	public static final String USE_SINGLE_LINE= PREFIX + "UseSingleLine"; //$NON-NLS-1$
 	public static final String HIGHLIGHT_TOKEN_CHANGES= PREFIX + "HighlightTokenChanges"; //$NON-NLS-1$
 	//public static final String USE_RESOLVE_UI= PREFIX + "UseResolveUI"; //$NON-NLS-1$
+	public static final String CAPPING_DISABLED= PREFIX + "CappingDisable"; //$NON-NLS-1$
 	public static final String PATH_FILTER= PREFIX + "PathFilter"; //$NON-NLS-1$
 	public static final String ADDED_LINES_REGEX= PREFIX + "AddedLinesRegex"; //$NON-NLS-1$
 	public static final String REMOVED_LINES_REGEX= PREFIX + "RemovedLinesRegex"; //$NON-NLS-1$
@@ -115,7 +116,6 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SYNCHRONIZE_SCROLLING),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_PSEUDO_CONFLICTS),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, INITIALLY_SHOW_ANCESTOR_PANE),
-		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, SHOW_MORE_INFO),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, IGNORE_WHITESPACE),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, PREF_SAVE_ALL_EDITORS),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ADDED_LINES_REGEX),
@@ -124,7 +124,10 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, USE_SINGLE_LINE),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, HIGHLIGHT_TOKEN_CHANGES),
 		//new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, USE_RESOLVE_UI),
+		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, CAPPING_DISABLED),
 		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, PATH_FILTER),
+		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICompareUIConstants.PREF_NAVIGATION_END_ACTION),
+		new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL),
 	};
 	private RadioGroupFieldEditor editor;
 	
@@ -135,7 +138,6 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 		store.setDefault(SYNCHRONIZE_SCROLLING, true);
 		store.setDefault(SHOW_PSEUDO_CONFLICTS, false);
 		store.setDefault(INITIALLY_SHOW_ANCESTOR_PANE, false);
-		store.setDefault(SHOW_MORE_INFO, false);
 		store.setDefault(IGNORE_WHITESPACE, false);
 		store.setDefault(PREF_SAVE_ALL_EDITORS, false);
 		store.setDefault(ADDED_LINES_REGEX, ""); //$NON-NLS-1$
@@ -144,7 +146,10 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 		store.setDefault(USE_SINGLE_LINE, true);
 		store.setDefault(HIGHLIGHT_TOKEN_CHANGES, true);
 		//store.setDefault(USE_RESOLVE_UI, false);
+		store.setDefault(CAPPING_DISABLED, false);
 		store.setDefault(PATH_FILTER, ""); //$NON-NLS-1$
+		store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION, ICompareUIConstants.PREF_VALUE_PROMPT);
+		store.setDefault(ICompareUIConstants.PREF_NAVIGATION_END_ACTION_LOCAL, ICompareUIConstants.PREF_VALUE_LOOP);
 	}
 
 	public ComparePreferencePage() {
@@ -181,9 +186,13 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 	public boolean performOk() {
 		fOverlayStore.setValue(ADDED_LINES_REGEX, addedLinesRegex.getText());
 		fOverlayStore.setValue(REMOVED_LINES_REGEX, removedLinesRegex.getText());
-		
-		fOverlayStore.propagate();
+
 		editor.store();
+		fOverlayStore.propagate();
+
+		ComparePlugin.getDefault().setCappingDisabled(
+				getPreferenceStore().getBoolean(
+						ComparePreferencePage.CAPPING_DISABLED));
 		return true;
 	}
 	
@@ -262,7 +271,6 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 				
 		addCheckBox(composite, "ComparePreferencePage.structureCompare.label", OPEN_STRUCTURE_COMPARE, 0);	//$NON-NLS-1$
 		addCheckBox(composite, "ComparePreferencePage.structureOutline.label", USE_OUTLINE_VIEW, 0);	//$NON-NLS-1$
-		addCheckBox(composite, "ComparePreferencePage.showMoreInfo.label", SHOW_MORE_INFO, 0);	//$NON-NLS-1$
 		addCheckBox(composite, "ComparePreferencePage.ignoreWhitespace.label", IGNORE_WHITESPACE, 0);	//$NON-NLS-1$
 		
 		// a spacer
@@ -343,6 +351,7 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 		addCheckBox(composite, "ComparePreferencePage.useSingleLine.label", USE_SINGLE_LINE, 0);	//$NON-NLS-1$
 		addCheckBox(composite, "ComparePreferencePage.highlightTokenChanges.label", HIGHLIGHT_TOKEN_CHANGES, 0);	//$NON-NLS-1$
 		//addCheckBox(composite, "ComparePreferencePage.useResolveUI.label", USE_RESOLVE_UI, 0);	//$NON-NLS-1$
+		addCheckBox(composite, "ComparePreferencePage.disableCapping.label", CAPPING_DISABLED, 0);	//$NON-NLS-1$
 		
 		Composite radioGroup = new Composite(composite, SWT.NULL);
 		radioGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
@@ -354,7 +363,7 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP
 					new String[] { CompareMessages.ComparePreferencePage_4, ICompareUIConstants.PREF_VALUE_DO_NOTHING}
 				},
 		radioGroup, true);
-		editor.setPreferenceStore(CompareUIPlugin.getDefault().getPreferenceStore());
+		editor.setPreferenceStore(fOverlayStore);
 		editor.fillIntoGrid(radioGroup, 1);
 		
 		// a spacer
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
index 8cac6d8..04bfdf3 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareStructureViewerSwitchingPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -130,6 +130,8 @@ public class CompareStructureViewerSwitchingPane extends
 
 	public void setInput(Object input) {
 		super.setInput(input);
+		if (getViewer() == null || !Utilities.okToUse(getViewer().getControl()))
+			return;
 		ViewerDescriptor[] vd = null;
 		if (getInput() instanceof ICompareInput) {
 			vd = CompareUIPlugin.getDefault().findStructureViewerDescriptor(
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index b3d058c..4e32e94 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
@@ -32,6 +32,7 @@ import org.eclipse.compare.CompareEditorInput;
 import org.eclipse.compare.IStreamContentAccessor;
 import org.eclipse.compare.IStreamMerger;
 import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.internal.core.ComparePlugin;
 import org.eclipse.compare.structuremergeviewer.ICompareInput;
 import org.eclipse.compare.structuremergeviewer.IStructureCreator;
 import org.eclipse.compare.structuremergeviewer.StructureDiffViewer;
@@ -256,6 +257,10 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
 
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
+
+		ComparePlugin.getDefault().setCappingDisabled(
+				getPreferenceStore().getBoolean(
+						ComparePreferencePage.CAPPING_DISABLED));
 	}
 			
 	public void stop(BundleContext context) throws Exception {
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ContentChangeNotifier.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ContentChangeNotifier.java
index 4867c5e..9aee9c2 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ContentChangeNotifier.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/ContentChangeNotifier.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,9 @@ package org.eclipse.compare.internal;
 
 import org.eclipse.compare.IContentChangeListener;
 import org.eclipse.compare.IContentChangeNotifier;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.swt.widgets.Display;
 
 /**
@@ -62,7 +64,7 @@ public class ContentChangeNotifier implements IContentChangeNotifier {
 					final IContentChangeListener contentChangeListener = (IContentChangeListener)listeners[i];
 					SafeRunner.run(new ISafeRunnable() {
 						public void run() throws Exception {
-							(contentChangeListener).contentChanged(element);
+							contentChangeListener.contentChanged(element);
 						}
 						public void handleException(Throwable exception) {
 							// Logged by safe runner
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
index 0ef8950..7a582c1 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,19 +10,57 @@
  *******************************************************************************/
 package org.eclipse.compare.internal;
 
-import java.io.*;
-import java.util.*;
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
 
-import org.eclipse.compare.*;
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareUI;
+import org.eclipse.compare.IEncodedStreamContentAccessor;
+import org.eclipse.compare.ISharedDocumentAdapter;
+import org.eclipse.compare.IStreamContentAccessor;
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.SharedDocumentAdapter;
 import org.eclipse.compare.contentmergeviewer.IDocumentRange;
 import org.eclipse.compare.internal.core.patch.HunkResult;
 import org.eclipse.compare.patch.IHunk;
 import org.eclipse.compare.structuremergeviewer.DiffNode;
 import org.eclipse.compare.structuremergeviewer.ICompareInput;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.resources.mapping.*;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.resources.IEncodedStorage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourceAttributes;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.resources.mapping.ResourceMappingContext;
+import org.eclipse.core.resources.mapping.ResourceTraversal;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.ErrorDialog;
@@ -33,8 +71,17 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchSite;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 
@@ -582,6 +629,12 @@ public class Utilities {
 	 * Returns null if an error occurred.
 	 */
 	public static String readString(InputStream is, String encoding) throws IOException {
+		return readString(is, encoding, -1, null);
+	}
+
+	public static String readString(InputStream is, String encoding, int length, IProgressMonitor monitor) throws IOException {
+		SubMonitor progress = SubMonitor.convert(monitor);
+		progress.setWorkRemaining(length);
 		if (is == null)
 			return null;
 		BufferedReader reader= null;
@@ -590,9 +643,13 @@ public class Utilities {
 			char[] part= new char[2048];
 			int read= 0;
 			reader= new BufferedReader(new InputStreamReader(is, encoding));
-			while ((read= reader.read(part)) != -1)
+			while ((read= reader.read(part)) != -1) {
 				buffer.append(part, 0, read);
-			
+				progress.worked(2048);
+				if (progress.isCanceled())
+					throw new OperationCanceledException();
+			}
+
 			return buffer.toString();
 		} finally {
 			if (reader != null) {
@@ -700,12 +757,11 @@ public class Utilities {
 			return (IDocument) te;
 		if (te instanceof IDocumentRange)
 			return ((IDocumentRange) te).getDocument();
-		if (te instanceof IStreamContentAccessor)
-			return DocumentManager.get(te);
+
 		if (isUsingDefaultContentProvider && canHaveSharedDocument) {
 			ISharedDocumentAdapter sda = (ISharedDocumentAdapter)Utilities.getAdapter(te, ISharedDocumentAdapter.class, true);
 			if (sda != null) {
-				IEditorInput input = sda.getDocumentKey(element);
+				IEditorInput input= sda.getDocumentKey(te);
 				if (input != null) {
 					IDocumentProvider provider = SharedDocumentAdapter.getDocumentProvider(input);
 					if (provider != null)
@@ -713,6 +769,10 @@ public class Utilities {
 				}
 			}
 		}
+
+		if (te instanceof IStreamContentAccessor)
+			return DocumentManager.get(te);
+
 		return null;
 	}
 	
@@ -781,4 +841,24 @@ public class Utilities {
 			});
 		}
 	}
+
+	/**
+	 * @param connection a connection for which the timeout is set
+	 * @param timeout an int that specifies the connect timeout value in milliseconds
+	 * @return whether the timeout has been successfully set
+	 */
+	public static boolean setReadTimeout(URLConnection connection, int timeout) {
+		Method[] methods = connection.getClass().getMethods();
+		for (int i = 0; i < methods.length; i++) {
+			if (methods[i].getName().equals("setReadTimeout")) //$NON-NLS-1$
+				try {
+					methods[i].invoke(connection, new Object[] {new Integer(timeout)});
+					return true;
+				} catch (IllegalArgumentException e) { // ignore
+				} catch (IllegalAccessException e) { // ignore
+				} catch (InvocationTargetException e) { // ignore
+				}
+		}
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
index e45ef42..e89c3dd 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,16 +11,36 @@
 package org.eclipse.compare.internal.merge;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.compare.CompareConfiguration;
 import org.eclipse.compare.contentmergeviewer.ITokenComparator;
-import org.eclipse.compare.internal.*;
-import org.eclipse.compare.rangedifferencer.*;
+import org.eclipse.compare.internal.CompareContentViewerSwitchingPane;
+import org.eclipse.compare.internal.CompareMessages;
+import org.eclipse.compare.internal.ComparePreferencePage;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.DocLineComparator;
+import org.eclipse.compare.internal.MergeViewerContentProvider;
+import org.eclipse.compare.internal.Utilities;
+import org.eclipse.compare.internal.core.LCS;
+import org.eclipse.compare.rangedifferencer.IRangeComparator;
+import org.eclipse.compare.rangedifferencer.RangeDifference;
+import org.eclipse.compare.rangedifferencer.RangeDifferencer;
 import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.text.*;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPositionCategoryException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.ui.PlatformUI;
@@ -411,7 +431,7 @@ public class DocumentMerger {
 				}
 			}*/
 		}
-			
+
 		final Object[] result= new Object[1];
 		final DocLineComparator sa= sancestor, sl= sleft, sr= sright;
 		IRunnableWithProgress runnable= new IRunnableWithProgress() {
@@ -445,9 +465,26 @@ public class DocumentMerger {
 			fAllDiffs.add(diff);
 			throw new CoreException(new Status(IStatus.ERROR, CompareUIPlugin.PLUGIN_ID, 0, CompareMessages.DocumentMerger_1, ex.getTargetException()));
 		} catch (InterruptedException ex) {
-			// 
+			// we create a NOCHANGE range for the whole document
+			Diff diff= new Diff(null, RangeDifference.NOCHANGE,
+				aDoc, aRegion, 0, aDoc != null ? aDoc.getLength() : 0,
+				lDoc, lRegion, 0, lDoc.getLength(),
+				rDoc, rRegion, 0, rDoc.getLength());	
+				
+			fAllDiffs = new ArrayList();
+			fAllDiffs.add(diff);
+			return;
 		}
-		
+
+		if (isCapped(sa, sl, sr))
+			fInput.getCompareConfiguration().setProperty(
+					CompareContentViewerSwitchingPane.OPTIMIZED_ALGORITHM_USED,
+					new Boolean(true));
+		else
+			fInput.getCompareConfiguration().setProperty(
+					CompareContentViewerSwitchingPane.OPTIMIZED_ALGORITHM_USED,
+					new Boolean(false));
+
 		ArrayList newAllDiffs = new ArrayList();
 		for (int i= 0; i < e.length; i++) {
 			RangeDifference es= e[i];
@@ -520,6 +557,20 @@ public class DocumentMerger {
 		fAllDiffs = newAllDiffs;
 	}
 
+	private boolean isCapped(DocLineComparator ancestor,
+			DocLineComparator left, DocLineComparator right) {
+		if (isCappingDisabled())
+			return false;
+		int aLength = ancestor == null? 0 : ancestor.getRangeCount();
+		int lLength = left.getRangeCount();
+		int rLength = right.getRangeCount();
+		if ((double) aLength * (double) lLength > LCS.TOO_LONG
+				|| (double) aLength * (double) rLength > LCS.TOO_LONG
+				|| (double) lLength * (double) rLength > LCS.TOO_LONG)
+			return true;
+		return false;
+	}
+
 	public Diff findDiff(char type, int pos) throws CoreException {
 		
 		IDocument aDoc= null;
@@ -626,6 +677,10 @@ public class DocumentMerger {
 		return Utilities.getBoolean(getCompareConfiguration(), CompareConfiguration.IGNORE_WHITESPACE, false);
 	}
 	
+	private boolean isCappingDisabled() {
+		return CompareUIPlugin.getDefault().getPreferenceStore().getBoolean(ComparePreferencePage.CAPPING_DISABLED);
+	}
+
 	private IDocument getDocument(char contributor) {
 		return fInput.getDocument(contributor);
 	}
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DiffViewerComparator.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DiffViewerComparator.java
new file mode 100644
index 0000000..5a0134e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/DiffViewerComparator.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.compare.internal.patch;
+
+import java.util.Comparator;
+import java.util.regex.Pattern;
+
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.DocumentRangeNode;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.viewers.ViewerSorter;
+
+public class DiffViewerComparator extends ViewerSorter {
+
+	public boolean isSorterProperty(Object element, Object property) {
+		return false;
+	}
+
+	public int category(Object node) {
+		if (node instanceof DiffNode) {
+			Object o= ((DiffNode) node).getId();
+			if (o instanceof DocumentRangeNode)
+				return ((DocumentRangeNode) o).getTypeCode();
+		}
+		return 0;
+	}
+
+	protected Comparator getComparator() {
+		return new Comparator() {
+			public int compare(Object arg0, Object arg1) {
+				String label0 = arg0 == null ? "" : arg0.toString(); //$NON-NLS-1$
+				String label1 = arg1 == null ? "" : arg1.toString(); //$NON-NLS-1$
+
+				// see org.eclipse.compare.internal.patch.Hunk.getDescription()
+				String pattern = "\\d+,\\d+ -> \\d+,\\d+.*"; //$NON-NLS-1$
+
+				if (Pattern.matches(pattern, label0)
+						&& Pattern.matches(pattern, label1)) {
+					int oldStart0 = Integer.parseInt(label0.split(",")[0]); //$NON-NLS-1$
+					int oldStart1 = Integer.parseInt(label1.split(",")[0]); //$NON-NLS-1$
+
+					return oldStart0 - oldStart1;
+				}
+				return Policy.getComparator().compare(arg0, arg1);
+			}
+		};
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/HunkDiffNode.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/HunkDiffNode.java
index 5515a7e..1fa0f3a 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/HunkDiffNode.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/HunkDiffNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.compare.ITypedElement;
 import org.eclipse.compare.internal.core.patch.HunkResult;
 import org.eclipse.compare.patch.PatchConfiguration;
 import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.core.resources.IResource;
 
 public class HunkDiffNode extends PatchDiffNode {
 
@@ -27,7 +28,7 @@ public class HunkDiffNode extends PatchDiffNode {
 		return new HunkDiffNode(result, parent, Differencer.CHANGE, getAncestorElement(result, ancestorFullContext), getLeftElement(result, leftFullContext), getRightElement(result, rightFullContext));
 	}
 	
-	private static ITypedElement getRightElement(HunkResult result, boolean fullContext) {
+	public static ITypedElement getRightElement(HunkResult result, boolean fullContext) {
 		return new HunkTypedElement(result, true /* isResult */, fullContext);
 	}
 
@@ -38,7 +39,7 @@ public class HunkDiffNode extends PatchDiffNode {
 		return new HunkTypedElement(result, false /* before state */, fullContext);
 	}
 
-	private static ITypedElement getAncestorElement(HunkResult result, boolean fullContext) {
+	public static ITypedElement getAncestorElement(HunkResult result, boolean fullContext) {
 		if (!fullContext && result.isOK()) {
 			return new HunkTypedElement(result, false /* before state */, fullContext);
 		}
@@ -50,7 +51,7 @@ public class HunkDiffNode extends PatchDiffNode {
 		return new HunkTypedElement(result, false /* before state */, result.isOK());
 	}
 
-	private HunkDiffNode(HunkResult result, PatchFileDiffNode parent, int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
+	public HunkDiffNode(HunkResult result, PatchFileDiffNode parent, int kind, ITypedElement ancestor, ITypedElement left, ITypedElement right) {
 		super(result.getHunk(), parent, kind, ancestor, left, right);
 		this.result = result;
 	}
@@ -101,4 +102,7 @@ public class HunkDiffNode extends PatchDiffNode {
 		return false;
 	}
 
+	public IResource getResource() {
+		return ((PatchFileDiffNode)getParent()).getResource();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
index 9b51fb3..f460911 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/InputPatchPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,11 @@ import java.io.FileReader;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
+import java.net.URL;
+import java.net.URLConnection;
 
 import org.eclipse.compare.internal.ICompareContextIds;
 import org.eclipse.compare.internal.Utilities;
@@ -29,11 +34,15 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelection;
@@ -71,7 +80,7 @@ import org.eclipse.ui.views.navigator.ResourceComparator;
 
 import com.ibm.icu.text.MessageFormat;
 
-/* package */ class InputPatchPage extends WizardPage {
+public class InputPatchPage extends WizardPage {
 
 	// constants
 	protected static final int SIZING_TEXT_FIELD_WIDTH= 250;
@@ -80,6 +89,7 @@ import com.ibm.icu.text.MessageFormat;
 	// dialog store id constants
 	private final static String PAGE_NAME= "PatchWizardPage1"; //$NON-NLS-1$  
 	private final static String STORE_PATCH_FILES_ID= PAGE_NAME+".PATCH_FILES"; //$NON-NLS-1$
+	private final static String STORE_PATCH_URLS_ID= PAGE_NAME+".PATCH_URLS"; //$NON-NLS-1$
 	private final static String STORE_INPUT_METHOD_ID= PAGE_NAME+".INPUT_METHOD"; //$NON-NLS-1$
 	private final static String STORE_WORKSPACE_PATH_ID= PAGE_NAME+".WORKSPACE_PATH"; //$NON-NLS-1$
 	
@@ -87,6 +97,7 @@ import com.ibm.icu.text.MessageFormat;
 	protected final static int CLIPBOARD= 1;
 	protected final static int FILE= 2;
 	protected final static int WORKSPACE= 3;
+	protected final static int URL= 4;
 
 	protected final static String INPUTPATCHPAGE_NAME= "InputPatchPage"; //$NON-NLS-1$
 
@@ -104,6 +115,8 @@ import com.ibm.icu.text.MessageFormat;
 	private Button fPatchFileBrowseButton;
 	private Button fUsePatchFileButton;
 	private Button fUseWorkspaceButton;
+	private Button fUseURLButton;
+	private Combo fPatchURLField;
 	private Label fWorkspaceSelectLabel;
 	private TreeViewer fTreeViewer;
 	
@@ -115,7 +128,9 @@ import com.ibm.icu.text.MessageFormat;
 			case FILE:
 				fShowError= (fPatchFileNameField.getText() != "");  //$NON-NLS-1$
 				break;
-			    
+			case URL:
+				fShowError = (fPatchURLField.getText() != ""); //$NON-NLS-1$
+				break;
 			case WORKSPACE:
 				fShowError= (!fTreeViewer.getSelection().isEmpty());
 				break;
@@ -124,7 +139,7 @@ import com.ibm.icu.text.MessageFormat;
 		}
 	}
 	
-	InputPatchPage(PatchWizard pw) {
+	public InputPatchPage(PatchWizard pw) {
 		super(INPUTPATCHPAGE_NAME, PatchMessages.InputPatchPage_title, null);
 		fPatchWizard= pw;
 		setMessage(PatchMessages.InputPatchPage_message);
@@ -160,7 +175,7 @@ import com.ibm.icu.text.MessageFormat;
 		restoreWidgetValues();
 		
 		// see if there are any better options presently selected (i.e workspace
-		// or clipboard)
+		// or clipboard or URL from clipboard)
 		adjustToCurrentTarget();
 		
 		// No error for dialog opening
@@ -206,7 +221,10 @@ import com.ibm.icu.text.MessageFormat;
 		// all of the projects that make up the patch and continue on to final preview page 
 		// else go on to target selection page
 		if (patcher.isWorkspacePatch()) {
-			return fPatchWizard.getPage(PreviewPatchPage2.PREVIEWPATCHPAGE_NAME);
+			// skip 'Patch Target' page
+			IWizardPage page = super.getNextPage();
+			if (page.getName().equals(PatchTargetPage.PATCHTARGETPAGE_NAME))
+				return page.getNextPage();
 		}
 
 		return super.getNextPage();
@@ -243,6 +261,14 @@ import com.ibm.icu.text.MessageFormat;
 					}
 				}
 				fPatchSource= PatchMessages.InputPatchPage_PatchFile_title;
+			} else if (inputMethod==URL) {
+				String patchFileURL = fPatchURLField.getText();
+				if (patchFileURL != null) {
+					String contents = getURLContents(patchFileURL);
+					if (contents != null)
+						reader = new StringReader(contents);
+				}
+				fPatchSource= PatchMessages.InputPatchPage_URL_title;
 			} else if (inputMethod==WORKSPACE) {
 				// Get the selected patch file (tree will only allow for one selection)
 				IResource[] resources= Utilities.getResources(fTreeViewer.getSelection());
@@ -282,6 +308,43 @@ import com.ibm.icu.text.MessageFormat;
 		}
 	}
 	
+	private String getURLContents(String patchFileURL) {
+		final URL url;
+		try {
+			url = new URL(patchFileURL);
+			final String[] result= new String[1];
+			try {
+				getContainer().run(true, true, new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+						SubMonitor progress = SubMonitor.convert(monitor, PatchMessages.InputPatchPage_URLConnecting, 100);
+						try {
+							URLConnection connection = url.openConnection();
+							progress.worked(10);
+							if (monitor.isCanceled())
+								throw new OperationCanceledException();
+							Utilities.setReadTimeout(connection, 60*1000);
+							progress.setTaskName(PatchMessages.InputPatchPage_URLFetchingContent);
+							String enc = connection.getContentEncoding();
+							if (enc == null)
+								enc = ResourcesPlugin.getEncoding();
+							result[0] = Utilities.readString(connection.getInputStream(), enc, connection.getContentLength(), progress.newChild(90));
+						} catch (SocketTimeoutException e) { // timeout
+						} catch (IOException e) { //ignore
+						}
+						monitor.done();
+					}
+				});
+				return result[0];
+			} catch (OperationCanceledException e) { //ignore
+			} catch (InvocationTargetException e) { //ignore
+			} catch (InterruptedException e) { //ignore
+			}
+		} catch (MalformedURLException e) {
+			// ignore as we tested it with modify listener on combo
+		}
+		return null;
+	}
+
 	/* (non-JavaDoc)
 	 * Method declared in IWizardPage.
 	 */
@@ -301,6 +364,10 @@ import com.ibm.icu.text.MessageFormat;
 		fTreeViewer.getTree().setEnabled(enable);
 	}
 
+	private void setEnableURLPatch(boolean enable) {
+		fPatchURLField.setEnabled(enable);
+	}
+
 	/*
 	 *	Create the group for selecting the patch file
 	 */
@@ -337,6 +404,15 @@ import com.ibm.icu.text.MessageFormat;
 		fPatchFileBrowseButton.setLayoutData(data);
 
 		//3rd row
+		fUseURLButton = new Button(composite, SWT.RADIO);
+		fUseURLButton.setText(PatchMessages.InputPatchPage_URLButton_text);
+
+		fPatchURLField = new Combo(composite, SWT.BORDER);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		fPatchURLField.setLayoutData(gd);
+
+		//4th row
 		fUseWorkspaceButton= new Button(composite, SWT.RADIO);
 		fUseWorkspaceButton.setText(PatchMessages.InputPatchPage_UseWorkspaceButton_text);
 		gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
@@ -354,6 +430,7 @@ import com.ibm.icu.text.MessageFormat;
 				fShowError= true;
 				int state= getInputMethod();
 				setEnablePatchFile(state == FILE);
+				setEnableURLPatch(state == URL);
 				setEnableWorkspacePatch(state == WORKSPACE);
 				updateWidgetEnablements();
 				fPatchRead = false; 
@@ -368,8 +445,9 @@ import com.ibm.icu.text.MessageFormat;
 				clearErrorMessage();
 				fShowError= (fPatchFileNameField.getText() != ""); //$NON-NLS-1$
 				int state= getInputMethod();
-				setEnablePatchFile(state==FILE);
-				setEnableWorkspacePatch(state==WORKSPACE);
+				setEnablePatchFile(state == FILE);
+				setEnableURLPatch(state == URL);
+				setEnableWorkspacePatch(state == WORKSPACE);
 				updateWidgetEnablements();
 				fPatchRead = false; 
 			}
@@ -394,6 +472,24 @@ import com.ibm.icu.text.MessageFormat;
 				updateWidgetEnablements();
 			}
 		});
+		fUseURLButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				clearErrorMessage();
+				fShowError= (fPatchURLField.getText() != ""); //$NON-NLS-1$
+				int state= getInputMethod();
+				setEnablePatchFile(state == FILE);
+				setEnableURLPatch(state == URL);
+				setEnableWorkspacePatch(state == WORKSPACE);
+				updateWidgetEnablements();
+			}
+		});
+		fPatchURLField.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				clearErrorMessage();
+				fShowError = true;
+				updateWidgetEnablements();
+			}
+		});
 		fUseWorkspaceButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				if (!fUseWorkspaceButton.getSelection())
@@ -403,6 +499,7 @@ import com.ibm.icu.text.MessageFormat;
 				fShowError= (!fTreeViewer.getSelection().isEmpty());
 				int state= getInputMethod();
 				setEnablePatchFile(state == FILE);
+				setEnableURLPatch(state == URL);
 				setEnableWorkspacePatch(state == WORKSPACE);
 				updateWidgetEnablements();
 				fPatchRead = false; 
@@ -492,6 +589,20 @@ import com.ibm.icu.text.MessageFormat;
 			} else {
 				error= PatchMessages.InputPatchPage_NoFileName_message; 
 			}
+		} else if (inputMethod == URL) {
+			String urlText = fPatchURLField.getText();
+			if(urlText != null) {
+				try {
+					new URL(urlText);
+					// Checking the URL is a bit too heavy for each keystroke.
+					// Let's assume it contains a valid patch.
+					gotPatch = true;
+				} catch (MalformedURLException e) {
+					error= PatchMessages.InputPatchPage_MalformedURL;
+				}
+			} else {
+				error= PatchMessages.InputPatchPage_NoURL;
+			}
 		} else if (inputMethod == WORKSPACE) {
 			//Get the selected patch file (tree will only allow for one selection)
 			IResource[] resources= Utilities.getResources(fTreeViewer.getSelection());
@@ -638,6 +749,13 @@ import com.ibm.icu.text.MessageFormat;
 			if (patchFilePath != null)
 				setSourceName(patchFilePath);
 			
+			// set URLs history
+			String[] sourceURLs= settings.getArray(STORE_PATCH_URLS_ID);
+			if (sourceURLs != null)
+				for (int i= 0; i < sourceURLs.length; i++)
+					if (sourceURLs[i] != null && sourceURLs[i].length() > 0)
+						fPatchURLField.add(sourceURLs[i]);
+
 			// If the previous apply patch was used with a clipboard, we need to check
 			// if there is a valid patch on the clipboard. This will be done in adjustToCurrentTarget()
 			// so just set it to FILE now and, if there exists a patch on the clipboard, then clipboard
@@ -693,6 +811,14 @@ import com.ibm.icu.text.MessageFormat;
 			sourceNames= addToHistory(sourceNames, getPatchFilePath());
 			settings.put(STORE_PATCH_FILES_ID, sourceNames);
 			
+			// update source URLs history
+			String[] sourceURLs= settings.getArray(STORE_PATCH_URLS_ID);
+			if (sourceURLs == null)
+				sourceURLs= new String[0];
+
+			sourceURLs= addToHistory(sourceURLs, fPatchURLField.getText());
+			settings.put(STORE_PATCH_URLS_ID, sourceURLs);
+
 			// save the workspace selection
 			settings.put(STORE_WORKSPACE_PATH_ID, getWorkspacePath());
 			
@@ -712,12 +838,14 @@ import com.ibm.icu.text.MessageFormat;
 	}
 
 	// static helpers
-	
+
 	/**
-	 * Checks to see if the file that has been selected for Apply Patch
-	 * is actually a patch
-	 * @return true if the file selected to run Apply Patch on in the workspace is a patch file
-	 * or if the clipboard contains a patch
+	 * Checks to see if the file that has been selected for Apply Patch is
+	 * actually a patch
+	 * 
+	 * @return true if the file selected to run Apply Patch on in the workspace
+	 *         is a patch file or if the clipboard contains a patch or if the
+	 *         clipboard contains an URL (we assume it points to a patch )
 	 */
 	private boolean adjustToCurrentTarget() {
 		// readjust selection if there is a patch selected in the workspace or on the clipboard
@@ -757,16 +885,27 @@ import com.ibm.icu.text.MessageFormat;
 		Reader reader = null;
 		Control c = getControl();
 		if (c != null) {
-			Clipboard clipboard = new Clipboard(c.getDisplay());
-			Object o = clipboard.getContents(TextTransfer.getInstance());
+			Clipboard clipboard= new Clipboard(c.getDisplay());
+			Object o= clipboard.getContents(TextTransfer.getInstance());
 			clipboard.dispose();
 			try {
 				if (o instanceof String) {
-					reader = new StringReader((String) o);
+					reader= new StringReader((String) o);
 					if (isPatchFile(reader)) {
 						setInputButtonState(CLIPBOARD);
 						return true;
 					}
+					// maybe it's an URL
+					try {
+						URL url = new URL((String)o);
+						if(url != null) {
+							setInputButtonState(URL);
+							fPatchURLField.setText((String)o);
+							return true;
+						}
+					} catch (MalformedURLException e) {
+						// ignore
+					}
 				}
 			} finally {
 				if (reader != null) {
@@ -780,8 +919,6 @@ import com.ibm.icu.text.MessageFormat;
 		}
 		return false;
 	} 
-	
-	
 
 	private boolean isPatchFile(Reader reader) {
 		WorkspacePatcher patcher= ((PatchWizard) getWizard()).getPatcher();
@@ -811,24 +948,35 @@ import com.ibm.icu.text.MessageFormat;
 		case CLIPBOARD:
 			fUseClipboardButton.setSelection(true);
 			fUsePatchFileButton.setSelection(false);
+			fUseURLButton.setSelection(false);
 			fUseWorkspaceButton.setSelection(false);
 			break;
 
 		case FILE:
 			fUseClipboardButton.setSelection(false);
 			fUsePatchFileButton.setSelection(true);
+			fUseURLButton.setSelection(false);
+			fUseWorkspaceButton.setSelection(false);
+			break;
+
+		case URL:
+			fUseClipboardButton.setSelection(false);
+			fUsePatchFileButton.setSelection(false);
+			fUseURLButton.setSelection(true);
 			fUseWorkspaceButton.setSelection(false);
 			break;
 
 		case WORKSPACE:
 			fUseClipboardButton.setSelection(false);
 			fUsePatchFileButton.setSelection(false);
+			fUseURLButton.setSelection(false);
 			fUseWorkspaceButton.setSelection(true);
 			break;
 		}
 
 		setEnablePatchFile(state == FILE);
 		setEnableWorkspacePatch(state == WORKSPACE);
+		setEnableURLPatch(state == URL);
 	}
 
 	protected int getInputMethod() {
@@ -836,6 +984,8 @@ import com.ibm.icu.text.MessageFormat;
 			return CLIPBOARD;
 		if (fUsePatchFileButton.getSelection())
 			return FILE;
+		if(fUseURLButton.getSelection())
+			return URL;
 		return WORKSPACE;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java
index f68109d..c8bc3da 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,20 +12,43 @@ package org.eclipse.compare.internal.patch;
 
 import java.lang.reflect.InvocationTargetException;
 
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.*;
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareEditorInput;
+import org.eclipse.compare.CompareUI;
+import org.eclipse.compare.CompareViewerPane;
+import org.eclipse.compare.IContentChangeListener;
+import org.eclipse.compare.IContentChangeNotifier;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.ICompareUIConstants;
 import org.eclipse.compare.internal.core.patch.DiffProject;
-import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.internal.core.patch.HunkResult;
 import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.compare.structuremergeviewer.*;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.DiffTreeViewer;
+import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.*;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
@@ -140,10 +163,14 @@ public abstract class PatchCompareEditorInput extends CompareEditorInput {
 		initializeImageCache();
 	}
 
-
 	private void initializeImageCache() {
+		initializeImageCache(patcher.getConfiguration());
+	}
+	
+	private static LocalResourceManager initializeImageCache(PatchConfiguration patchConfiguration) {
 		LocalResourceManager imageCache = new LocalResourceManager(JFaceResources.getResources());
-		patcher.setProperty(IMAGE_CACHE_KEY, imageCache);
+		patchConfiguration.setProperty(IMAGE_CACHE_KEY, imageCache);
+		return imageCache;
 	}
 	
 	protected void handleDispose() {
@@ -152,7 +179,11 @@ public abstract class PatchCompareEditorInput extends CompareEditorInput {
 	}
 
 	public static LocalResourceManager getImageCache(PatchConfiguration patchConfiguration) {
-		return (LocalResourceManager)patchConfiguration.getProperty(IMAGE_CACHE_KEY);
+		LocalResourceManager cache = (LocalResourceManager)patchConfiguration.getProperty(IMAGE_CACHE_KEY);
+		if (cache == null) {
+			return initializeImageCache(patchConfiguration);
+		}
+		return cache;
 	}
 
 	protected Object prepareInput(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchDiffNode.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchDiffNode.java
index 89e9f1f..351af89 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchDiffNode.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchDiffNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,14 @@
  *******************************************************************************/
 package org.eclipse.compare.internal.patch;
 
+import org.eclipse.compare.IResourceProvider;
 import org.eclipse.compare.ITypedElement;
 import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.compare.structuremergeviewer.*;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.IDiffContainer;
+import org.eclipse.core.resources.IResource;
 
-public abstract class PatchDiffNode extends DiffNode {
+public abstract class PatchDiffNode extends DiffNode implements IResourceProvider {
 
 	private Object fElement;
 
@@ -59,4 +62,7 @@ public abstract class PatchDiffNode extends DiffNode {
 		return getPatchElement().hashCode();
 	}
 
+	public IResource getResource() {
+		return null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java
index 8149140..949b1cd 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileDiffNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,17 @@
  *******************************************************************************/
 package org.eclipse.compare.internal.patch;
 
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.core.patch.FilePatch2;
+import org.eclipse.compare.IContentChangeListener;
+import org.eclipse.compare.IContentChangeNotifier;
+import org.eclipse.compare.ITypedElement;
 import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IFile;
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.compare.structuremergeviewer.IDiffContainer;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
+import org.eclipse.core.resources.IResource;
 
 public class PatchFileDiffNode extends PatchDiffNode implements IContentChangeListener {
 
@@ -25,7 +30,7 @@ public class PatchFileDiffNode extends PatchDiffNode implements IContentChangeLi
 		return new PatchFileDiffNode(result, parent, getKind(result), getAncestorElement(result), getLeftElement(result), getRightElement(result));
 	}
 	
-	private static int getKind(FileDiffResult result) {
+	public static int getKind(FileDiffResult result) {
 		if (!result.hasMatches())
 			return Differencer.NO_CHANGE;
 		int fileDiffKind = result.getDiff().getDiffType(result.getConfiguration().isReversed());
@@ -52,7 +57,7 @@ public class PatchFileDiffNode extends PatchDiffNode implements IContentChangeLi
 		return kind;
 	}
 
-	private static ITypedElement getRightElement(FileDiffResult result) {
+	public static ITypedElement getRightElement(FileDiffResult result) {
 		return new PatchFileTypedElement(result, true);
 	}
 
@@ -60,7 +65,7 @@ public class PatchFileDiffNode extends PatchDiffNode implements IContentChangeLi
 		return new PatchFileTypedElement(result, false);
 	}
 
-	private static ITypedElement getAncestorElement(FileDiffResult result) {
+	public static ITypedElement getAncestorElement(FileDiffResult result) {
 		return new PatchFileTypedElement(result, false);
 	}
 
@@ -110,8 +115,11 @@ public class PatchFileDiffNode extends PatchDiffNode implements IContentChangeLi
 	}
 
 	public boolean fileExists() {
-		IFile file = ((WorkspaceFileDiffResult)getDiffResult()).getTargetFile();
+		IResource file = getResource();
 		return file != null && file.isAccessible();
 	}
 
+	public IResource getResource() {
+		return ((WorkspaceFileDiffResult)getDiffResult()).getTargetFile();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileTypedElement.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileTypedElement.java
index 51876e3..86c5fff 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileTypedElement.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchFileTypedElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -89,8 +89,7 @@ public class PatchFileTypedElement implements ITypedElement,
 	}
 
 	public String getCharset() throws CoreException {
-		// TODO Auto-generated method stub
-		return null;
+		return result.getCharset();
 	}
 
 	public InputStream getContents() throws CoreException {
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
index ff2241a..6fde7b4 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,10 @@ public final class PatchMessages extends NLS {
 
 	public static String HunkMergePage_GenerateRejectFile;
 	public static String HunkMergePage_Merged;
+	public static String InputPatchPage_MalformedURL;
+	public static String InputPatchPage_NoURL;
+	public static String InputPatchPage_URLButton_text;
+	public static String InputPatchPage_URL_title;
 	public static String PatchCompareEditorInput_0;
 	public static String PatcherCompareEditorInput_0;
 	public static String PatcherCompareEditorInput_AfterPatch;
@@ -58,6 +62,8 @@ public final class PatchMessages extends NLS {
 	public static String InputPatchPage_WorkspacePatch_title;
 	public static String InputPatchPage_NoDiffsFound_format;
 	public static String InputPatchPage_SingleFileError_format;
+	public static String InputPatchPage_URLConnecting;
+	public static String InputPatchPage_URLFetchingContent;
 	public static String PatchTargetPage_title;
 	public static String PatchTargetPage_message;
 	public static String PreviewPatchPage_title;
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
index 29224b7..95ac4b8 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -31,11 +31,14 @@ PatcherCompareEditorInput_NotIncluded=(Not included)
 # InputPatchPage
 #
 InputPatchPage_title= Patch Input Specification
+InputPatchPage_NoURL=Please enter an URL
 InputPatchPage_message= Select the patch location.
 InputPatchPage_Clipboard=Clipboard
 InputPatchPage_SelectInput=Apply the patch to the &selected file, folder or project:
+InputPatchPage_MalformedURL=Malformed URL
 InputPatchPage_PatchErrorDialog_title=Patch Error
 InputPatchPage_FileButton_text=Fil&e
+InputPatchPage_URLButton_text=&URL
 InputPatchPage_ChooseFileButton_text=&Browse...
 InputPatchPage_UseClipboardButton_text=&Clipboard
 InputPatchPage_UseWorkspaceButton_text=&Workspace
@@ -53,9 +56,12 @@ InputPatchPage_PatchFileNotFound_message=Patch file not found.
 InputPatchPage_ParseError_message=Error while parsing patch
 InputPatchPage_Clipboard_title=Clipboard
 InputPatchPage_PatchFile_title=Patch file
+InputPatchPage_URL_title=URL
 InputPatchPage_WorkspacePatch_title=Workspace file
 InputPatchPage_NoDiffsFound_format={0} does not contain valid patch.
 InputPatchPage_SingleFileError_format={0} contains multiple patches. You cannot apply them to a single file.
+InputPatchPage_URLConnecting=Opening connection to the URL
+InputPatchPage_URLFetchingContent=Fetching content from the URL
 #
 # PatchTargetPage
 #
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchProjectDiffNode.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchProjectDiffNode.java
index 2f8f58a..1aa09b3 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchProjectDiffNode.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchProjectDiffNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,11 @@ import org.eclipse.compare.CompareUI;
 import org.eclipse.compare.ITypedElement;
 import org.eclipse.compare.internal.core.patch.DiffProject;
 import org.eclipse.compare.patch.PatchConfiguration;
-import org.eclipse.compare.structuremergeviewer.*;
+import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.compare.structuremergeviewer.IDiffContainer;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.resource.LocalResourceManager;
 import org.eclipse.swt.graphics.Image;
 
@@ -76,4 +80,8 @@ public class PatchProjectDiffNode extends PatchDiffNode {
 		return project;
 	}
 
+	public IResource getResource() {
+		return ResourcesPlugin.getWorkspace().getRoot().getProject(getDiffProject().getName());
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
index ccca2d3..7bbaa32 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchTargetPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,18 +12,31 @@ package org.eclipse.compare.internal.patch;
 
 import org.eclipse.compare.internal.ICompareContextIds;
 import org.eclipse.compare.internal.Utilities;
-import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
@@ -48,7 +61,7 @@ public class PatchTargetPage extends WizardPage {
 
 	protected final static String PATCHTARGETPAGE_NAME = "PatchTargetPage"; //$NON-NLS-1$
 
-	PatchTargetPage(WorkspacePatcher patcher) {
+	public PatchTargetPage(WorkspacePatcher patcher) {
 		super(PATCHTARGETPAGE_NAME, PatchMessages.PatchTargetPage_title, null);
 		setMessage(PatchMessages.PatchTargetPage_message);
 		fPatcher = patcher;
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
index 4ddf196..ede6e06 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,11 +17,18 @@ import org.eclipse.compare.CompareConfiguration;
 import org.eclipse.compare.internal.CompareUIPlugin;
 import org.eclipse.compare.internal.ExceptionHandler;
 import org.eclipse.compare.internal.Utilities;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.ui.actions.WorkspaceModifyOperation;
@@ -33,12 +40,11 @@ public class PatchWizard extends Wizard {
 
 	private boolean fHasNewDialogSettings;
 	
-	private InputPatchPage fPatchWizardPage;
-	private PatchTargetPage fPatchTargetPage;
-	private PreviewPatchPage2 fPreviewPage2;
+	protected InputPatchPage fPatchWizardPage;
+	protected PatchTargetPage fPatchTargetPage;
+	protected PreviewPatchPage2 fPreviewPage2;
 	
 	private final WorkspacePatcher fPatcher;
-	private PatchWizardDialog fDialog;
 	
 	private CompareConfiguration fConfiguration;
 	private IStorage patch;
@@ -80,15 +86,18 @@ public class PatchWizard extends Wizard {
 		}
 	}
 
-	WorkspacePatcher getPatcher() {
+	protected WorkspacePatcher getPatcher() {
 		return fPatcher;
 	}
-	
+
+	protected IStorage getPatch() {
+		return patch;
+	}
+
 	IResource getTarget() {
 		return fPatcher.getTarget();
 	}
 	
-	
 	/* (non-Javadoc)
 	 * Method declared on IWizard.
 	 */
@@ -106,7 +115,7 @@ public class PatchWizard extends Wizard {
 	 */
 	public boolean performFinish() {
 		
-		IWizardPage currentPage = fDialog.getCurrentPage();
+		IWizardPage currentPage = getContainer().getCurrentPage();
 		if (currentPage.getName().equals(PreviewPatchPage2.PREVIEWPATCHPAGE_NAME)){
 			PreviewPatchPage2 previewPage = (PreviewPatchPage2) currentPage;
 			previewPage.ensureContentsSaved();
@@ -184,12 +193,8 @@ public class PatchWizard extends Wizard {
 		return true;
 	}
 
-	public void setDialog(PatchWizardDialog dialog) {
-		fDialog= dialog;
-	}
-	
 	public void showPage(IWizardPage page) {
-		fDialog.showPage(page);
+		getContainer().showPage(page);
 	}
 	
 	public IWizardPage getNextPage(IWizardPage page) {
@@ -221,7 +226,7 @@ public class PatchWizard extends Wizard {
 	}
 	
 	public boolean canFinish() {
-		IWizardPage currentPage = fDialog.getCurrentPage();
+		IWizardPage currentPage = getContainer().getCurrentPage();
 		if (currentPage.getName().equals(PreviewPatchPage2.PREVIEWPATCHPAGE_NAME)){
 			return currentPage.isPageComplete();
 		}
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
index 0217db4..a059819 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import java.util.Set;
 
 import org.eclipse.compare.internal.core.Messages;
 import org.eclipse.compare.internal.core.patch.DiffProject;
-import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.internal.core.patch.Hunk;
 import org.eclipse.compare.internal.core.patch.PatchReader;
 import org.eclipse.compare.patch.IHunk;
@@ -601,7 +601,7 @@ public class Patcher implements IHunkFilter {
 		refresh(getDiffs());
 	}
 	
-	protected void refresh(FilePatch2[] diffs) {
+	public void refresh(FilePatch2[] diffs) {
 		for (int i = 0; i < diffs.length; i++) {
 			FilePatch2 diff = diffs[i];
 			FileDiffResult result = getDiffResult(diff);
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java
index b7039b8..7414cbe 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java
@@ -353,6 +353,8 @@ public class PreviewPatchPage2 extends WizardPage {
 			addedRemovedLines.setText(countLines());
 			// expand the first tree item i.e. change
 			getCompareConfiguration().getContainer().getNavigator().selectChange(true);
+			getContainer().updateButtons();
+			getShell().getDefaultButton().setFocus();
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java
index 81711f1..494dda4 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspaceFileDiffResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,12 +12,14 @@ package org.eclipse.compare.internal.patch;
 
 import java.util.List;
 
-import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
 import org.eclipse.compare.patch.PatchConfiguration;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
 
 public class WorkspaceFileDiffResult extends FileDiffResult {
 
@@ -53,4 +55,14 @@ public class WorkspaceFileDiffResult extends FileDiffResult {
 	public void refresh() {
 		refresh(Utilities.getReaderCreator(getTargetFile()), null);
 	}
+
+	public String getCharset() {
+		IFile file = getTargetFile();
+		try {
+			if (file != null)
+				return file.getCharset();
+		} catch (CoreException e) {
+		}
+		return ResourcesPlugin.getEncoding();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java
index 0ce507c..3cc7397 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/ApplyPatchOperation.java
@@ -151,9 +151,7 @@ public class ApplyPatchOperation implements Runnable {
 				wizard.setWindowTitle(patchWizardTitle);
 			wizard.setNeedsProgressMonitor(true);
 
-			PatchWizardDialog dialog = new PatchWizardDialog(getShell(), wizard);
-			wizard.setDialog(dialog);
-			dialog.open();
+			new PatchWizardDialog(getShell(), wizard).open();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/package.html b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/package.html
deleted file mode 100644
index ace7721..0000000
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/patch/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
-   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-   <meta name="Author" content="IBM">
-   <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
-   <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for applying and working with patches.
-<h2>
-Package Specification</h2>
-
-The class <b>ApplyPatchOperation</b> defines the entry point to launch
-the Apply Patch wizard and to manipulate patches programmatically.
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
index 0211251..c9ee82d 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,13 @@
  *******************************************************************************/
 package org.eclipse.compare.structuremergeviewer;
 
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.swt.graphics.Image;
-
+import org.eclipse.compare.IEditableContent;
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.internal.Utilities;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.swt.graphics.Image;
 
-import org.eclipse.compare.*;
-import org.eclipse.compare.internal.Utilities;
+import com.ibm.icu.text.MessageFormat;
 
 /**
  * Diff node are used as the compare result of the differencing engine.
@@ -34,7 +33,7 @@ import org.eclipse.compare.internal.Utilities;
  * @see DiffTreeViewer
  * @see Differencer
  */
-public class DiffNode extends DiffContainer implements ITypedElement, ICompareInput {
+public class DiffNode extends DiffContainer implements ICompareInput {
 
 	private ITypedElement fAncestor;
 	private ITypedElement fLeft;
diff --git a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
index cdd87b7..44d9c90 100644
--- a/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
+++ b/eclipse/plugins/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/DiffTreeViewer.java
@@ -10,16 +10,14 @@
  *******************************************************************************/
 package org.eclipse.compare.structuremergeviewer;
 
-import java.util.Comparator;
 import java.util.Iterator;
 import java.util.ResourceBundle;
-import java.util.regex.Pattern;
 
 import org.eclipse.compare.*;
 import org.eclipse.compare.internal.Utilities;
+import org.eclipse.compare.internal.patch.DiffViewerComparator;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.SWT;
@@ -41,43 +39,6 @@ import org.eclipse.swt.widgets.*;
  */
 public class DiffTreeViewer extends TreeViewer {
 	
-	static class DiffViewerComparator extends ViewerComparator {
-	
-		public boolean isSorterProperty(Object element, Object property) {
-			return false;
-		}
-	
-		public int category(Object node) {
-			if (node instanceof DiffNode) {
-				Object o= ((DiffNode) node).getId();
-				if (o instanceof DocumentRangeNode)
-					return ((DocumentRangeNode) o).getTypeCode();
-			}
-			return 0;
-		}
-
-		protected Comparator getComparator() {
-			return new Comparator() {
-				public int compare(Object arg0, Object arg1) {
-					String label0 = arg0 == null ? "" : arg0.toString(); //$NON-NLS-1$
-					String label1 = arg1 == null ? "" : arg1.toString(); //$NON-NLS-1$
-
-					// see org.eclipse.compare.internal.patch.Hunk.getDescription()
-					String pattern = "\\d+,\\d+ -> \\d+,\\d+.*"; //$NON-NLS-1$
-
-					if (Pattern.matches(pattern, label0)
-							&& Pattern.matches(pattern, label1)) {
-						int oldStart0 = Integer.parseInt(label0.split(",")[0]); //$NON-NLS-1$
-						int oldStart1 = Integer.parseInt(label1.split(",")[0]); //$NON-NLS-1$
-
-						return oldStart0 - oldStart1;
-					}
-					return Policy.getComparator().compare(arg0, arg1);
-				}
-			};
-		}
-	}	
-
 	class DiffViewerContentProvider implements ITreeContentProvider {
 			
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
diff --git a/eclipse/plugins/org.eclipse.jface/icons/full/message_info.gif b/eclipse/plugins/org.eclipse.compare/icons/full/obj16/message_info.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jface/icons/full/message_info.gif
copy to eclipse/plugins/org.eclipse.compare/icons/full/obj16/message_info.gif
diff --git a/eclipse/plugins/org.eclipse.compare/plugin.properties b/eclipse/plugins/org.eclipse.compare/plugin.properties
index 135b040..a5fb23f 100644
--- a/eclipse/plugins/org.eclipse.compare/plugin.properties
+++ b/eclipse/plugins/org.eclipse.compare/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -130,6 +130,7 @@ ComparePreferencePage.showPseudoConflicts.label= Show &pseudo conflicts
 ComparePreferencePage.synchronizeScrolling.label= Synchronize &scrolling between panes in compare viewers
 ComparePreferencePage.useSingleLine.label= Connect &ranges with single line
 ComparePreferencePage.highlightTokenChanges.label=&Highlight individual changes
+ComparePreferencePage.disableCapping.label=Disable &capping when comparing large documents
 
 ComparePreferencePage.preview.label= Previe&w:
 ComparePreferencePage.ancestor.label= Common Ancestor
diff --git a/eclipse/plugins/org.eclipse.compare/plugin.xml b/eclipse/plugins/org.eclipse.compare/plugin.xml
index fae1799..55dd505 100644
--- a/eclipse/plugins/org.eclipse.compare/plugin.xml
+++ b/eclipse/plugins/org.eclipse.compare/plugin.xml
@@ -340,5 +340,15 @@
             class="org.eclipse.compare.internal.ComparePreferenceInitializer">
       </initializer>
    </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.eclipse.compare.CompareEditorInput"
+            class="org.eclipse.compare.internal.AdapterFactory">
+         <adapter
+               type="org.eclipse.ui.IContributorResourceAdapter">
+         </adapter>
+      </factory>
+   </extension>
 
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.compare/schema/structureCreators.exsd b/eclipse/plugins/org.eclipse.compare/schema/structureCreators.exsd
index 50f2fe0..318673e 100644
--- a/eclipse/plugins/org.eclipse.compare/schema/structureCreators.exsd
+++ b/eclipse/plugins/org.eclipse.compare/schema/structureCreators.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.compare" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.compare" id="structureCreators" name="Structure Creators"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point allows a plug-in to register a structure creator 
 for specific content types. The structure creator is expected to create
@@ -16,9 +16,9 @@ The extension point must implement the interface <samp>org.eclipse.compare
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
@@ -44,9 +44,9 @@ The extension point must implement the interface <samp>org.eclipse.compare
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -66,9 +66,9 @@ The extension point must implement the interface <samp>org.eclipse.compare
                <documentation>
                   a fully qualified name of a class that implements <samp>org.eclipse.compare.structuremergeviewer.IStructureCreator</samp>
                </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.compare.structuremergeviewer.IStructureComparator"/>
-               </appinfo>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.compare.structuremergeviewer.IStructureCreator"/>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="extensions" type="string">
@@ -93,9 +93,9 @@ The extension point must implement the interface <samp>org.eclipse.compare
                <documentation>
                   The id of a content type defined using the <code>org.eclipse.core.contenttype.contentTypes</code> extension point.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.core.contenttype.contentTypes/content-type/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="structureCreatorId" type="string" use="required">
@@ -103,18 +103,18 @@ The extension point must implement the interface <samp>org.eclipse.compare
                <documentation>
                   The id of a structure creator defined using the <code>structureCreator</code> element of this extension point (i.e. <code>org.eclipse.compare.structureCreators</code>)
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.compare.structureCreators/structureCreator/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of a structure creator for 
 java files (extension "java"): 
@@ -133,9 +133,9 @@ java files (extension "java"):
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The contributed class must implement <code>org.eclipse.compare.structuremergeviewer.IStructureCreator</code>
       </documentation>
@@ -143,20 +143,20 @@ java files (extension "java"):
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The Compare UI plugin defines a structure creator for zip archives.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         Copyright (c) 2000, 2008 IBM Corporation and others.<br>
+         Copyright (c) 2000, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
       </documentation>
    </annotation>
diff --git a/eclipse/plugins/org.eclipse.core.boot/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.boot/META-INF/MANIFEST.MF
index 8f4f6df..16bb856 100644
--- a/eclipse/plugins/org.eclipse.core.boot/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.boot/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.boot
-Bundle-Version: 3.1.100.qualifier
+Bundle-Version: 3.1.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/eclipse/plugins/org.eclipse.core.commands/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.commands/META-INF/MANIFEST.MF
index 10327a9..209dfa9 100644
--- a/eclipse/plugins/org.eclipse.core.commands/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.commands/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.commands
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/TriggeredOperations.java b/eclipse/plugins/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/TriggeredOperations.java
index 8747181..6d329ac 100644
--- a/eclipse/plugins/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/TriggeredOperations.java
+++ b/eclipse/plugins/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/TriggeredOperations.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,13 +13,14 @@ package org.eclipse.core.commands.operations;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 
+import org.eclipse.core.commands.ExecutionException;
+
 /**
  * Triggered operations are a specialized implementation of a composite
  * operation that keeps track of operations triggered by the execution of some
@@ -36,7 +37,7 @@ import org.eclipse.core.runtime.Status;
  * @since 3.1
  */
 public final class TriggeredOperations extends AbstractOperation implements
-		ICompositeOperation, IAdvancedUndoableOperation,
+		ICompositeOperation, IAdvancedUndoableOperation, IAdvancedUndoableOperation2,
 		IContextReplacingOperation {
 
 	private IUndoableOperation triggeringOperation;
@@ -462,4 +463,37 @@ public final class TriggeredOperations extends AbstractOperation implements
 		}
 	}
 
+	/**
+	 * @since 3.6
+	 */
+	public IStatus computeExecutionStatus(IProgressMonitor monitor) throws ExecutionException {
+		if (triggeringOperation instanceof IAdvancedUndoableOperation2) {
+			try {
+				return ((IAdvancedUndoableOperation2) triggeringOperation)
+						.computeExecutionStatus(monitor);
+			} catch (OperationCanceledException e) {
+				return Status.CANCEL_STATUS;
+			}
+		}
+		return Status.OK_STATUS;
+	}
+	
+	/**
+	 * @since 3.6
+	 */
+	public void setQuietCompute(boolean quiet) {
+		if (triggeringOperation instanceof IAdvancedUndoableOperation2) {
+			((IAdvancedUndoableOperation2) triggeringOperation).setQuietCompute(quiet);
+		}
+	}
+	
+	/**
+	 * @since 3.6
+	 */
+	public boolean runInBackground() {
+		if (triggeringOperation instanceof IAdvancedUndoableOperation2) {
+			return ((IAdvancedUndoableOperation2) triggeringOperation).runInBackground();
+		}
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/.settings/.api_filters b/eclipse/plugins/org.eclipse.core.contenttype/.settings/.api_filters
new file mode 100644
index 0000000..6e5d3b1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.contenttype/.settings/.api_filters
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.core.contenttype" version="2">
+    <resource path="src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber.java" type="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.core.runtime.content.XMLRootElementContentDescriber"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java" type="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.contenttype/META-INF/MANIFEST.MF
index b73549f..4c31cb0 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.contenttype/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.contenttype; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.4.100.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.equinox.preferences;bundle-version="[3.2.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentType.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentType.java
index 5932ef5..c4c2732 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentType.java
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -496,7 +496,7 @@ public final class ContentType implements IContentType, IContentTypeInfo {
 		return false;
 	}
 
-	private IContentDescriber invalidateDescriber(Throwable reason) {
+	public IContentDescriber invalidateDescriber(Throwable reason) {
 		String message = NLS.bind(ContentMessages.content_invalidContentDescriber, id);
 		log(message, reason);
 		return (IContentDescriber) (describer = new InvalidDescriber());
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeCatalog.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeCatalog.java
index eba4865..57558d6 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeCatalog.java
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/ContentTypeCatalog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.content.*;
 import org.eclipse.core.runtime.content.IContentTypeManager.ISelectionPolicy;
 import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.osgi.util.NLS;
 
 public final class ContentTypeCatalog {
 	private static final IContentType[] NO_CONTENT_TYPES = new IContentType[0];
@@ -177,7 +178,7 @@ public final class ContentTypeCatalog {
 		existing.add(contentType);
 	}
 
-	private int collectMatchingByContents(int valid, IContentType[] subset, List destination, ILazySource contents) throws IOException {
+	private int collectMatchingByContents(int valid, IContentType[] subset, List destination, ILazySource contents, Map properties) throws IOException {
 		for (int i = 0; i < subset.length; i++) {
 			ContentType current = (ContentType) subset[i];
 			IContentDescriber describer = current.getDescriber();
@@ -186,7 +187,7 @@ public final class ContentTypeCatalog {
 				if (contents.isText() && !(describer instanceof ITextContentDescriber))
 					// for text streams we skip content types that do not provide text-based content describers
 					continue;
-				status = current.describe(describer, contents, null);
+				status = describe(current, contents, null, properties);
 				if (status == IContentDescriber.INVALID)
 					continue;
 			}
@@ -198,6 +199,48 @@ public final class ContentTypeCatalog {
 		return valid;
 	}
 
+	int describe(ContentType type, ILazySource contents, ContentDescription description, Map properties) throws IOException {
+		IContentDescriber describer = type.getDescriber();
+		try {
+			if (contents.isText()) {
+				if (describer instanceof XMLRootElementContentDescriber2) {
+					return ((XMLRootElementContentDescriber2) describer).describe((Reader) contents, description, properties);
+				} else if (describer instanceof XMLRootElementContentDescriber) {
+					return ((XMLRootElementContentDescriber) describer).describe((Reader) contents, description, properties);
+				}
+				return ((ITextContentDescriber) describer).describe((Reader) contents, description);
+			} else {
+				if (describer instanceof XMLRootElementContentDescriber2) {
+					return ((XMLRootElementContentDescriber2) describer).describe((InputStream) contents, description, properties);
+				} else if (describer instanceof XMLRootElementContentDescriber) {
+					return ((XMLRootElementContentDescriber) describer).describe((InputStream) contents, description, properties);
+				}
+				return (describer).describe((InputStream) contents, description);
+			}
+		} catch (RuntimeException re) {
+			// describer seems to be buggy. just disable it (logging the reason)
+			type.invalidateDescriber(re);
+		} catch (Error e) {
+			// describer got some serious problem. disable it (logging the reason) and throw the error again 
+			type.invalidateDescriber(e);
+			throw e;
+		} catch (LowLevelIOException llioe) {
+			// throw the actual exception
+			throw llioe.getActualException();
+		} catch (IOException ioe) {
+			// bugs 67841/ 62443  - non-low level IOException should be "ignored"
+			if (ContentTypeManager.DEBUGGING) {
+				String message = NLS.bind(ContentMessages.content_errorReadingContents, type.getId());
+				ContentType.log(message, ioe);
+			}
+			// we don't know what the describer would say if the exception didn't occur
+			return IContentDescriber.INDETERMINATE;
+		} finally {
+			contents.rewind();
+		}
+		return IContentDescriber.INVALID;
+	}
+
 	synchronized void dissociate(ContentType contentType, String text, int type) {
 		Map fileSpecMap = ((type & IContentType.FILE_NAME_SPEC) != 0) ? fileNames : fileExtensions;
 		String mappingKey = FileSpec.getMappingKeyFor(text);
@@ -353,10 +396,11 @@ public final class ContentTypeCatalog {
 	}
 
 	private IContentType[] internalFindContentTypesFor(ILazySource buffer, IContentType[][] subset, Comparator validPolicy, Comparator indeterminatePolicy) throws IOException {
+		Map properties = new HashMap();
 		final List appropriate = new ArrayList(5);
-		final int validFullName = collectMatchingByContents(0, subset[0], appropriate, buffer);
+		final int validFullName = collectMatchingByContents(0, subset[0], appropriate, buffer, properties);
 		final int appropriateFullName = appropriate.size();
-		final int validExtension = collectMatchingByContents(validFullName, subset[1], appropriate, buffer) - validFullName;
+		final int validExtension = collectMatchingByContents(validFullName, subset[1], appropriate, buffer, properties) - validFullName;
 		final int appropriateExtension = appropriate.size() - appropriateFullName;
 		IContentType[] result = (IContentType[]) appropriate.toArray(new IContentType[appropriate.size()]);
 		if (validFullName > 1)
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java
new file mode 100644
index 0000000..6464258
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/internal/content/XMLContentDescriber.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.content;
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * 
+ * A content describer for XML files. This class provides basis for XML-based
+ * content describers.
+ * <p>
+ * The document is detected by the describer as <code>VALID</code>, if it
+ * contains an xml declaration with <code><?xml</code> prefix and the
+ * encoding in the declaration is correct.
+ * </p>
+ * Below are sample declarations recognized by the describer as
+ * <code>VALID</code>
+ * <ul>
+ * <li><?xml version="1.0"?></li>
+ * <li><?xml version="1.0"</li>
+ * <li><?xml version="1.0" encoding="utf-16"?></li>
+ * <li><?xml version="1.0" encoding="utf-16?></li>
+ * </ul>
+ * 
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ *                Clients should use it to provide their own XML-based
+ *                describers that can be referenced by the "describer"
+ *                configuration element in extensions to the
+ *                <code>org.eclipse.core.runtime.contentTypes</code> extension
+ *                point.
+ *                
+ * @see org.eclipse.core.runtime.content.IContentDescriber
+ * @see "http://www.w3.org/TR/REC-xml *"
+ * 
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.core.runtime.content.XMLContentDescriber} 
+ */
+public class XMLContentDescriber extends org.eclipse.core.runtime.content.XMLContentDescriber {
+}
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLContentDescriber.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLContentDescriber.java
index 5c00a90..b7ce359 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLContentDescriber.java
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLContentDescriber.java
@@ -11,6 +11,8 @@
 package org.eclipse.core.runtime.content;
 
 import java.io.*;
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.internal.content.TextContentDescriber;
 import org.eclipse.core.internal.content.Util;
 import org.eclipse.core.runtime.QualifiedName;
@@ -45,11 +47,41 @@ import org.eclipse.core.runtime.QualifiedName;
  */
 public class XMLContentDescriber extends TextContentDescriber implements ITextContentDescriber {
 	private static final QualifiedName[] SUPPORTED_OPTIONS = new QualifiedName[] {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK};
-	private static final String ENCODING = "encoding="; //$NON-NLS-1$
 	private static final String XML_PREFIX = "<?xml "; //$NON-NLS-1$
 	private static final String XML_DECL_END = "?>"; //$NON-NLS-1$
+	private static final String BOM = "org.eclipse.core.runtime.content.XMLContentDescriber.bom"; //$NON-NLS-1$
+	private static final String CHARSET = "org.eclipse.core.runtime.content.XMLContentDescriber.charset"; //$NON-NLS-1$
+	private static final String FULL_XML_DECL = "org.eclipse.core.runtime.content.XMLContentDescriber.fullXMLDecl"; //$NON-NLS-1$
+	private static final String RESULT = "org.eclipse.core.runtime.content.XMLContentDescriber.processed"; //$NON-NLS-1$
 
 	public int describe(InputStream input, IContentDescription description) throws IOException {
+		return describe2(input, description, new HashMap());
+	}
+
+	int describe2(InputStream input, IContentDescription description, Map properties) throws IOException {
+		if (!isProcessed(properties))
+			fillContentProperties(input, description, properties);
+		return internalDescribe(description, properties);
+	}
+
+	public int describe(Reader input, IContentDescription description) throws IOException {
+		return describe2(input, description, new HashMap());
+	}
+
+	int describe2(Reader input, IContentDescription description, Map properties) throws IOException {
+		if (!isProcessed(properties))
+			fillContentProperties(readXMLDecl(input), description, properties);
+		return internalDescribe(description, properties);
+	}
+
+	private boolean isProcessed(Map properties) {
+		Boolean result = (Boolean) properties.get(RESULT);
+		if (result != null)
+			return true;
+		return false;
+	}
+
+	private void fillContentProperties(InputStream input, IContentDescription description, Map properties) throws IOException {
 		byte[] bom = Util.getByteOrderMark(input);
 		String xmlDeclEncoding = "UTF-8"; //$NON-NLS-1$
 		input.reset();
@@ -60,64 +92,76 @@ public class XMLContentDescriber extends TextContentDescriber implements ITextCo
 				xmlDeclEncoding = "UTF-16LE"; //$NON-NLS-1$
 			// skip BOM to make comparison simpler
 			input.skip(bom.length);
-			// set the BOM in the description if requested
-			if (description != null && description.isRequested(IContentDescription.BYTE_ORDER_MARK))
-				description.setProperty(IContentDescription.BYTE_ORDER_MARK, bom);
+			properties.put(BOM, bom);
 		}
-		return internalDescribe(readXMLDecl(input, xmlDeclEncoding), description);
-	}
-	
-	public int describe(Reader input, IContentDescription description) throws IOException {
-		return internalDescribe(readXMLDecl(input), description);
+		fillContentProperties(readXMLDecl(input, xmlDeclEncoding), description, properties);
 	}
-	
-	private int internalDescribe(String line, IContentDescription description) throws IOException {
-		// end of stream
-		if (line == null)
-			return INDETERMINATE;
+
+	private void fillContentProperties(String line, IContentDescription description, Map properties) throws IOException {
 		// XMLDecl should be the first string (no blanks allowed)
-		if (!line.startsWith(XML_PREFIX))
+		if (line != null && line.startsWith(XML_PREFIX))
+			properties.put(FULL_XML_DECL, new Boolean(true));
+		String charset = getCharset(line);
+		if (charset != null)
+			properties.put(CHARSET, charset);
+		properties.put(RESULT, new Boolean(true));
+	}
+
+	private int internalDescribe(IContentDescription description, Map properties) {
+		if (description != null) {
+			byte[] bom = (byte[]) properties.get(BOM);
+			if (bom != null && description.isRequested(IContentDescription.BYTE_ORDER_MARK))
+				description.setProperty(IContentDescription.BYTE_ORDER_MARK, bom);
+		}
+		Boolean fullXMLDecl = (Boolean) properties.get(FULL_XML_DECL);
+		if (fullXMLDecl == null || !fullXMLDecl.booleanValue())
 			return INDETERMINATE;
 		if (description == null)
 			return VALID;
-		// describe charset if requested
-		if ((description.isRequested(IContentDescription.CHARSET))) {
-			String charset = getCharset(line);
+		String charset = (String) properties.get(CHARSET);
+		if (description.isRequested(IContentDescription.CHARSET)) {
 			if (charset != null && !isCharsetValid(charset))
 				return INVALID;
-			if (charset != null && !charset.equalsIgnoreCase("utf8") && !charset.equalsIgnoreCase("utf-8")) //$NON-NLS-1$ //$NON-NLS-2$
-				// only set property if value is not default (avoid using a non-default content description)
+			if (isNonDefaultCharset(charset))
 				description.setProperty(IContentDescription.CHARSET, charset);
 		}
 		return VALID;
 	}
-	
+
+	private boolean isNonDefaultCharset(String charset) {
+		if (charset == null)
+			return false;
+		if (charset.equalsIgnoreCase("utf8") || charset.equalsIgnoreCase("utf-8")) //$NON-NLS-1$ //$NON-NLS-2$
+			return false;
+		return true;
+	}
+
 	private boolean isFullXMLDecl(String xmlDecl) {
 		return xmlDecl.endsWith(XML_DECL_END);
 	}
-	
+
 	private String readXMLDecl(InputStream input, String encoding) throws IOException {
 		byte[] xmlDeclEndBytes = XML_DECL_END.getBytes(encoding);
-		
+
 		// allocate an array for the input
-		int xmlDeclSize = 100 * xmlDeclEndBytes.length/2;
+		int xmlDeclSize = 100 * xmlDeclEndBytes.length / 2;
 		byte[] xmlDecl = new byte[xmlDeclSize];
-		
+
 		// looks for XMLDecl end (?>)
 		int c = 0;
 		int read = 0;
-		
+
 		// count is incremented when subsequent read characters match the xmlDeclEnd bytes,
 		// the end of xmlDecl is reached, when count equals the xmlDeclEnd length
 		int count = 0;
-	
-		while (read < xmlDecl.length && (c = input.read()) != -1){
+
+		while (read < xmlDecl.length && (c = input.read()) != -1) {
 			if (c == xmlDeclEndBytes[count])
 				count++;
 			else
 				count = 0;
 			xmlDecl[read++] = (byte) c;
-			if (count == xmlDeclEndBytes.length) 
+			if (count == xmlDeclEndBytes.length)
 				break;
 		}
 		return new String(xmlDecl, 0, read, encoding);
@@ -138,7 +182,7 @@ public class XMLContentDescriber extends TextContentDescriber implements ITextCo
 	}
 
 	private String getCharset(String firstLine) {
-		int encodingPos = firstLine.indexOf(ENCODING);
+		int encodingPos = findEncodingPosition(firstLine);
 		if (encodingPos == -1)
 			return null;
 		char quoteChar = '"';
@@ -147,7 +191,7 @@ public class XMLContentDescriber extends TextContentDescriber implements ITextCo
 			quoteChar = '\'';
 			firstQuote = firstLine.indexOf(quoteChar, encodingPos);
 		}
-		if (firstQuote == -1 || firstLine.length() == firstQuote - 1)
+		if (firstQuote == -1 || firstLine.length() == firstQuote + 1)
 			return null;
 		int secondQuote = firstLine.indexOf(quoteChar, firstQuote + 1);
 		if (secondQuote == -1)
@@ -155,6 +199,29 @@ public class XMLContentDescriber extends TextContentDescriber implements ITextCo
 		return firstLine.substring(firstQuote + 1, secondQuote);
 	}
 
+	private int findEncodingPosition(String line) {
+		String encoding = "encoding"; //$NON-NLS-1$
+		int fromIndex = 0;
+		int position = 0;
+		while ((position = line.indexOf(encoding, fromIndex)) != -1) {
+			boolean equals = false;
+			fromIndex = position + encoding.length();
+			for (int i = fromIndex; i < line.length(); i++) {
+				char c = line.charAt(i);
+				if (c == '=' && !equals) {
+					equals = true;
+				} else if (c == 0x20 || c == 0x09 || c == 0x0D || c == 0x0A) {
+					// white space characters to ignore
+				} else if ((c == '"' || c == '\'') && equals) {
+						return position;
+				} else {
+					break;
+				}
+			}
+		}
+		return -1;
+	}
+
 	private boolean isCharsetValid(String charset) {
 		if (charset.length() == 0)
 			return false;
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber.java
index c104d82..c09e067 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber.java
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,14 +11,11 @@
 package org.eclipse.core.runtime.content;
 
 import java.io.*;
-import java.util.Hashtable;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.internal.content.*;
-import org.eclipse.core.internal.runtime.RuntimeLog;
+import java.util.*;
+import org.eclipse.core.internal.content.ContentMessages;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
 import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
 
 /**
  * A content describer for detecting the name of the top-level element or the
@@ -39,6 +36,7 @@ import org.xml.sax.SAXException;
  * 
  * @since 3.0
  * @deprecated Use {@link XMLRootElementContentDescriber2} instead
+ * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public final class XMLRootElementContentDescriber extends XMLContentDescriber implements IExecutableExtension {
 	private static final String DTD_TO_FIND = "dtd"; //$NON-NLS-1$
@@ -69,24 +67,20 @@ public final class XMLRootElementContentDescriber extends XMLContentDescriber im
 	 * </ul>
 	 * @throws IOException
 	 */
-	private int checkCriteria(InputSource contents) throws IOException {
-		XMLRootHandler xmlHandler = new XMLRootHandler(elementToFind != null);
-		try {
-			if (!xmlHandler.parseContents(contents))
-				return INDETERMINATE;
-		} catch (SAXException e) {
-			// we may be handed any kind of contents... it is normal we fail to parse
+	private int checkCriteria(InputSource contents, Map properties) throws IOException {
+		if (!XMLRootElementContentDescriber2.isProcessed(properties))
+			XMLRootElementContentDescriber2.fillContentProperties(contents, properties);
+		return checkCriteria(properties);
+	}
+
+	private int checkCriteria(Map properties) throws IOException {
+		Boolean result = (Boolean) properties.get(XMLRootElementContentDescriber2.RESULT);
+		if (!result.booleanValue())
 			return INDETERMINATE;
-		} catch (ParserConfigurationException e) {
-			// some bad thing happened - force this describer to be disabled
-			String message = ContentMessages.content_parserConfiguration;
-			RuntimeLog.log(new Status(IStatus.ERROR, ContentMessages.OWNER_NAME, 0, message, e));
-			throw new RuntimeException(message);
-		}
 		// Check to see if we matched our criteria.
-		if ((elementToFind != null) && (!elementToFind.equals(xmlHandler.getRootName())))
+		if ((dtdToFind != null) && (!dtdToFind.equals(properties.get(XMLRootElementContentDescriber2.DTD))))
 			return INDETERMINATE;
-		if ((dtdToFind != null) && (!dtdToFind.equals(xmlHandler.getDTD())))
+		if ((elementToFind != null) && (!elementToFind.equals(properties.get(XMLRootElementContentDescriber2.ELEMENT))))
 			return INDETERMINATE;
 		// We must be okay then.		
 		return VALID;
@@ -96,26 +90,40 @@ public final class XMLRootElementContentDescriber extends XMLContentDescriber im
 	 * @see IContentDescriber#describe(InputStream, IContentDescription)
 	 */
 	public int describe(InputStream contents, IContentDescription description) throws IOException {
+		return describe(contents, description, new HashMap());
+	}
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int describe(InputStream contents, IContentDescription description, Map properties) throws IOException {
 		// call the basic XML describer to do basic recognition
-		if (super.describe(contents, description) == INVALID)
+		if (super.describe2(contents, description, properties) == INVALID)
 			return INVALID;
 		// super.describe will have consumed some chars, need to rewind		
 		contents.reset();
 		// Check to see if we matched our criteria.		
-		return checkCriteria(new InputSource(contents));
+		return checkCriteria(new InputSource(contents), properties);
 	}
 
 	/* (Intentionally not included in javadoc)
 	 * @see IContentDescriber#describe(Reader, IContentDescription)
 	 */
 	public int describe(Reader contents, IContentDescription description) throws IOException {
+		return describe(contents, description, new HashMap());
+	}
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int describe(Reader contents, IContentDescription description, Map properties) throws IOException {
 		// call the basic XML describer to do basic recognition
-		if (super.describe(contents, description) == INVALID)
+		if (super.describe2(contents, description, properties) == INVALID)
 			return INVALID;
 		// super.describe will have consumed some chars, need to rewind
 		contents.reset();
 		// Check to see if we matched our criteria.
-		return checkCriteria(new InputSource(contents));
+		return checkCriteria(new InputSource(contents), properties);
 	}
 
 	/* (Intentionally not included in javadoc)
diff --git a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java
index 1de9261..c991f0b 100644
--- a/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java
+++ b/eclipse/plugins/org.eclipse.core.contenttype/src/org/eclipse/core/runtime/content/XMLRootElementContentDescriber2.java
@@ -14,7 +14,8 @@ package org.eclipse.core.runtime.content;
 import java.io.*;
 import java.util.*;
 import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.internal.content.*;
+import org.eclipse.core.internal.content.ContentMessages;
+import org.eclipse.core.internal.content.XMLRootHandler;
 import org.eclipse.core.internal.runtime.RuntimeLog;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
@@ -62,10 +63,17 @@ import org.xml.sax.SAXException;
  * </p>
  * 
  * @since org.eclipse.core.contenttype 3.3
+ * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public final class XMLRootElementContentDescriber2 extends XMLContentDescriber implements IExecutableExtension {
+
+	static final String DTD = "org.eclipse.core.runtime.content.XMLRootElementContentDescriber2.dtd"; //$NON-NLS-1$
+	static final String NAMESPACE = "org.eclipse.core.runtime.content.XMLRootElementContentDescriber2.namespace"; //$NON-NLS-1$
+	static final String ELEMENT = "org.eclipse.core.runtime.content.XMLRootElementContentDescriber2.element"; //$NON-NLS-1$
+	static final String RESULT = "org.eclipse.core.runtime.content.XMLRootElementContentDescriber2.result"; //$NON-NLS-1$
+
 	private static final String ELEMENT_TO_FIND = "element"; //$NON-NLS-1$
-	
+
 	/* (Intentionally not included in javadoc)
 	 * The top-level elements we are looking for. This value will be initialized
 	 * by the <code>setInitializationData</code> method. If no value is
@@ -77,23 +85,23 @@ public final class XMLRootElementContentDescriber2 extends XMLContentDescriber i
 	/* (Intentionally not included in javadoc)
 	 * Simple value holder for root element name, its namespace and dtd.
 	 */
-	 private class QualifiedElement {
+	private class QualifiedElement {
 		private String namespace;
 		private String element;
 		private String dtd;
-		
+
 		public QualifiedElement(String qualifiedElement) {
 			// Extract namespace part
 			int openBrace = qualifiedElement.indexOf('{');
 			int closeBrace = qualifiedElement.indexOf('}');
-			if (openBrace == 0 && closeBrace >=1 ) {
+			if (openBrace == 0 && closeBrace >= 1) {
 				namespace = qualifiedElement.substring(1, closeBrace);
-				qualifiedElement = qualifiedElement.substring(closeBrace+1);
+				qualifiedElement = qualifiedElement.substring(closeBrace + 1);
 			}
 			// Extract dtd part
 			int dtdSlash = qualifiedElement.indexOf('/');
 			if (dtdSlash > 0) {
-				dtd = qualifiedElement.substring(dtdSlash+1);
+				dtd = qualifiedElement.substring(dtdSlash + 1);
 				qualifiedElement = qualifiedElement.substring(0, dtdSlash);
 			}
 			// Check if the name is a wildcard
@@ -107,7 +115,7 @@ public final class XMLRootElementContentDescriber2 extends XMLContentDescriber i
 			return nsMatch && elementEquals && dtdEquals;
 		}
 	}
-	
+
 	/* (Intentionally not included in javadoc)
 	 * Determines the validation status for the given contents.
 	 * 
@@ -119,25 +127,24 @@ public final class XMLRootElementContentDescriber2 extends XMLContentDescriber i
 	 * </ul>
 	 * @throws IOException
 	 */
-	private int checkCriteria(InputSource contents) throws IOException {
-		XMLRootHandler xmlHandler = new XMLRootHandler(elementsToFind != null);
-		try {
-			if (!xmlHandler.parseContents(contents))
-				return INDETERMINATE;
-		} catch (SAXException e) {
-			// we may be handed any kind of contents... it is normal we fail to parse
+	private int checkCriteria(InputSource contents, Map properties) throws IOException {
+		if (!isProcessed(properties))
+			fillContentProperties(contents, properties);
+		return checkCriteria(properties);
+	}
+
+	private int checkCriteria(Map properties) throws IOException {
+		Boolean result = (Boolean) properties.get(RESULT);
+		if (!result.booleanValue())
 			return INDETERMINATE;
-		} catch (ParserConfigurationException e) {
-			// some bad thing happened - force this describer to be disabled
-			String message = ContentMessages.content_parserConfiguration;
-			RuntimeLog.log(new Status(IStatus.ERROR, ContentMessages.OWNER_NAME, 0, message, e));
-			throw new RuntimeException(message);
-		}
 		// Check to see if we matched our criteria.
 		if (elementsToFind != null) {
 			boolean foundOne = false;
 			for (int i = 0; i < elementsToFind.length && !foundOne; ++i) {
-				foundOne |= elementsToFind[i].matches(xmlHandler.getRootNamespace(), xmlHandler.getRootName(), xmlHandler.getDTD());
+				String dtd = (String) properties.get(DTD);
+				String namespace = (String) properties.get(NAMESPACE);
+				String element = (String) properties.get(ELEMENT);
+				foundOne |= elementsToFind[i].matches(namespace, element, dtd);
 			}
 			if (!foundOne)
 				return INDETERMINATE;
@@ -150,26 +157,77 @@ public final class XMLRootElementContentDescriber2 extends XMLContentDescriber i
 	 * @see IContentDescriber#describe(InputStream, IContentDescription)
 	 */
 	public int describe(InputStream contents, IContentDescription description) throws IOException {
+		return describe(contents, description, new HashMap());
+	}
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int describe(InputStream contents, IContentDescription description, Map properties) throws IOException {
 		// call the basic XML describer to do basic recognition
-		if (super.describe(contents, description) == INVALID)
+		if (super.describe2(contents, description, properties) == INVALID)
 			return INVALID;
 		// super.describe will have consumed some chars, need to rewind		
 		contents.reset();
 		// Check to see if we matched our criteria.		
-		return checkCriteria(new InputSource(contents));
+		return checkCriteria(new InputSource(contents), properties);
 	}
 
 	/* (Intentionally not included in javadoc)
 	 * @see IContentDescriber#describe(Reader, IContentDescription)
 	 */
 	public int describe(Reader contents, IContentDescription description) throws IOException {
+		return describe(contents, description, new HashMap());
+	}
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int describe(Reader contents, IContentDescription description, Map properties) throws IOException {
 		// call the basic XML describer to do basic recognition
-		if (super.describe(contents, description) == INVALID)
+		if (super.describe2(contents, description, properties) == INVALID)
 			return INVALID;
 		// super.describe will have consumed some chars, need to rewind
 		contents.reset();
 		// Check to see if we matched our criteria.
-		return checkCriteria(new InputSource(contents));
+		return checkCriteria(new InputSource(contents), properties);
+	}
+
+	static boolean isProcessed(Map properties) {
+		Boolean result = (Boolean) properties.get(RESULT);
+		// It can be set to false which means that content can't be parsed
+		if (result != null)
+			return true;
+		return false;
+	}
+
+	static void fillContentProperties(InputSource input, Map properties) throws IOException {
+		XMLRootHandler xmlHandler = new XMLRootHandler(true);
+		try {
+			if (!xmlHandler.parseContents(input)) {
+				properties.put(RESULT, new Boolean(false));
+				return;
+			}
+		} catch (SAXException e) {
+			// we may be handed any kind of contents... it is normal we fail to parse
+			properties.put(RESULT, new Boolean(false));
+			return;
+		} catch (ParserConfigurationException e) {
+			// some bad thing happened - force this describer to be disabled
+			String message = ContentMessages.content_parserConfiguration;
+			RuntimeLog.log(new Status(IStatus.ERROR, ContentMessages.OWNER_NAME, 0, message, e));
+			throw new RuntimeException(message);
+		}
+		String element = xmlHandler.getRootName();
+		if (element != null)
+			properties.put(ELEMENT, element);
+		String dtd = xmlHandler.getDTD();
+		if (dtd != null)
+			properties.put(DTD, dtd);
+		String namespace = xmlHandler.getRootNamespace();
+		if (namespace != null)
+			properties.put(NAMESPACE, namespace);
+		properties.put(RESULT, new Boolean(true));
 	}
 
 	/* (Intentionally not included in javadoc)
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/.settings/org.moreunit.prefs b/eclipse/plugins/org.eclipse.core.databinding.beans/.settings/org.moreunit.prefs
new file mode 100644
index 0000000..8951bec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/.settings/org.moreunit.prefs
@@ -0,0 +1,5 @@
+#Tue Feb 02 23:25:15 MST 2010
+eclipse.preferences.version=1
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.core.databinding.beans\:src\:org.eclipse.jface.tests.databinding\:src
+org.moreunit.useprojectsettings=true
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF
index 37ee305..da39f50 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding.beans
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.100.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -10,5 +10,5 @@ Export-Package: org.eclipse.core.databinding.beans,
  org.eclipse.core.internal.databinding.beans;x-internal:=true
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.databinding.observable;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.core.databinding.property;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousBeanValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousBeanValueProperty.java
index 193658c..38fd3b3 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousBeanValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousBeanValueProperty.java
@@ -60,8 +60,11 @@ public class AnonymousBeanValueProperty extends DelegatingValueProperty {
 	}
 
 	public IObservableValue observeDetail(IObservableValue master) {
+		Object valueType = getValueType();
+		if (valueType == null)
+			valueType = inferValueType(master.getValueType());
 		return MasterDetailObservables.detailValue(master, valueFactory(master
-				.getRealm()), inferValueType(master.getValueType()));
+				.getRealm()), valueType);
 	}
 
 	private Object inferValueType(Object masterObservableValueType) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousPojoValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousPojoValueProperty.java
index 910f749..2d55936 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousPojoValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/AnonymousPojoValueProperty.java
@@ -60,8 +60,11 @@ public class AnonymousPojoValueProperty extends DelegatingValueProperty {
 	}
 
 	public IObservableValue observeDetail(IObservableValue master) {
+		Object valueType = getValueType();
+		if (valueType == null)
+			valueType = inferValueType(master.getValueType());
 		return MasterDetailObservables.detailValue(master, valueFactory(master
-				.getRealm()), inferValueType(master.getValueType()));
+				.getRealm()), valueType);
 	}
 
 	private Object inferValueType(Object masterObservableValueType) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java
index f8f5f9e..281891f 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,15 +7,16 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 195222, 264307, 265561
+ *     Matthew Hall - bugs 195222, 264307, 265561, 301774
+ *     Ovidio Mallo - bug 306633
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
 import java.lang.reflect.Array;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import org.eclipse.core.databinding.observable.Diffs;
@@ -56,13 +57,17 @@ public class BeanListProperty extends SimpleListProperty {
 
 	private List asList(Object propertyValue) {
 		if (propertyValue == null)
-			return new ArrayList();
+			return Collections.EMPTY_LIST;
 		if (propertyDescriptor.getPropertyType().isArray())
-			return new ArrayList(Arrays.asList((Object[]) propertyValue));
+			return Arrays.asList((Object[]) propertyValue);
 		return (List) propertyValue;
 	}
 
 	protected void doSetList(Object source, List list, ListDiff diff) {
+		doSetList(source, list);
+	}
+
+	protected void doSetList(Object source, List list) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor,
 				convertListToBeanPropertyType(list));
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
index a35d697..8328dc5 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanListPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.List;
 
 import org.eclipse.core.databinding.beans.BeanProperties;
 import org.eclipse.core.databinding.beans.IBeanListProperty;
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
@@ -47,6 +49,18 @@ public class BeanListPropertyDecorator extends ListProperty implements
 		return delegate.getElementType();
 	}
 
+	protected List doGetList(Object source) {
+		return delegate.getList(source);
+	}
+
+	protected void doSetList(Object source, List list) {
+		delegate.setList(source, list);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		delegate.updateList(source, diff);
+	}
+
 	public IBeanListProperty values(String propertyName) {
 		return values(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java
index 209b969..99c247a 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,13 +7,13 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 195222, 264307, 265561
+ *     Matthew Hall - bugs 195222, 264307, 265561, 301774
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.Map;
 
 import org.eclipse.core.databinding.observable.Diffs;
@@ -59,11 +59,15 @@ public class BeanMapProperty extends SimpleMapProperty {
 
 	private Map asMap(Object propertyValue) {
 		if (propertyValue == null)
-			return new HashMap();
+			return Collections.EMPTY_MAP;
 		return (Map) propertyValue;
 	}
 
 	protected void doSetMap(Object source, Map map, MapDiff diff) {
+		doSetMap(source, map);
+	}
+
+	protected void doSetMap(Object source, Map map) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor, map);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
index db64178..b1ba7a0 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanMapPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.Map;
 
 import org.eclipse.core.databinding.beans.BeanProperties;
 import org.eclipse.core.databinding.beans.IBeanMapProperty;
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
@@ -55,6 +57,18 @@ public class BeanMapPropertyDecorator extends MapProperty implements
 		return delegate.getValueType();
 	}
 
+	protected Map doGetMap(Object source) {
+		return delegate.getMap(source);
+	}
+
+	protected void doSetMap(Object source, Map map) {
+		delegate.setMap(source, map);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		delegate.updateMap(source, diff);
+	}
+
 	public IBeanMapProperty values(String propertyName) {
 		return values(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java
index 8603304..50714cb 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,10 @@ public class BeanSetProperty extends SimpleSetProperty {
 	}
 
 	protected void doSetSet(Object source, Set set, SetDiff diff) {
+		doSetSet(source, set);
+	}
+
+	protected void doSetSet(Object source, Set set) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor,
 				convertSetToBeanPropertyType(set));
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
index 6d0cb7e..c384f6a 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanSetPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.Set;
 
 import org.eclipse.core.databinding.beans.BeanProperties;
 import org.eclipse.core.databinding.beans.IBeanMapProperty;
@@ -21,6 +22,7 @@ import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.set.ISetProperty;
 import org.eclipse.core.databinding.property.set.SetProperty;
@@ -52,6 +54,18 @@ public class BeanSetPropertyDecorator extends SetProperty implements
 		return delegate.getElementType();
 	}
 
+	protected Set doGetSet(Object source) {
+		return delegate.getSet(source);
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		delegate.setSet(source, set);
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		delegate.updateSet(source, diff);
+	}
+
 	public IBeanMapProperty values(String propertyName) {
 		return values(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
index c85ee03..5469453 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/BeanValuePropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,14 @@ public class BeanValuePropertyDecorator extends ValueProperty implements
 		return delegate.getValueType();
 	}
 
+	protected Object doGetValue(Object source) {
+		return delegate.getValue(source);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		delegate.setValue(source, value);
+	}
+
 	public IBeanValueProperty value(String propertyName) {
 		return value(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java
index 0a4c7a3..44634d4 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,15 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 195222, 264307, 265561
+ *     Ovidio Mallo - bug 306633
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
 import java.lang.reflect.Array;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import org.eclipse.core.databinding.observable.list.ListDiff;
@@ -54,13 +55,17 @@ public class PojoListProperty extends SimpleListProperty {
 
 	private List asList(Object propertyValue) {
 		if (propertyValue == null)
-			return new ArrayList();
+			return Collections.EMPTY_LIST;
 		if (propertyDescriptor.getPropertyType().isArray())
-			return new ArrayList(Arrays.asList((Object[]) propertyValue));
+			return Arrays.asList((Object[]) propertyValue);
 		return (List) propertyValue;
 	}
 
 	protected void doSetList(Object source, List list, ListDiff diff) {
+		doSetList(source, list);
+	}
+
+	protected void doSetList(Object source, List list) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor,
 				convertListToBeanPropertyType(list));
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
index 7f63f0e..ae3e33c 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoListPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.List;
 
 import org.eclipse.core.databinding.beans.IBeanListProperty;
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.beans.PojoProperties;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
@@ -47,6 +49,18 @@ public class PojoListPropertyDecorator extends ListProperty implements
 		return delegate.getElementType();
 	}
 
+	protected List doGetList(Object source) {
+		return delegate.getList(source);
+	}
+
+	protected void doSetList(Object source, List list) {
+		delegate.setList(source, list);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		delegate.updateList(source, diff);
+	}
+
 	public IBeanListProperty values(String propertyName) {
 		return values(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java
index 50b80c8..5c81d48 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,6 +62,10 @@ public class PojoMapProperty extends SimpleMapProperty {
 	}
 
 	protected void doSetMap(Object source, Map map, MapDiff diff) {
+		doSetMap(source, map);
+	}
+
+	protected void doSetMap(Object source, Map map) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor, map);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
index ce7419d..8efcd2f 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoMapPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.Map;
 
 import org.eclipse.core.databinding.beans.IBeanMapProperty;
 import org.eclipse.core.databinding.beans.IBeanValueProperty;
 import org.eclipse.core.databinding.beans.PojoProperties;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
@@ -51,6 +53,18 @@ public class PojoMapPropertyDecorator extends MapProperty implements
 		return delegate.getValueType();
 	}
 
+	protected Map doGetMap(Object source) {
+		return delegate.getMap(source);
+	}
+
+	protected void doSetMap(Object source, Map map) {
+		delegate.setMap(source, map);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		delegate.updateMap(source, diff);
+	}
+
 	public PropertyDescriptor getPropertyDescriptor() {
 		return propertyDescriptor;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java
index 70bd9c0..d0f2fa6 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,6 +62,10 @@ public class PojoSetProperty extends SimpleSetProperty {
 	}
 
 	protected void doSetSet(Object source, Set set, SetDiff diff) {
+		doSetSet(source, set);
+	}
+
+	protected void doSetSet(Object source, Set set) {
 		BeanPropertyHelper.writeProperty(source, propertyDescriptor,
 				convertSetToBeanPropertyType(set));
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
index 1879658..c0e6b3c 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoSetPropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 package org.eclipse.core.internal.databinding.beans;
 
 import java.beans.PropertyDescriptor;
+import java.util.Set;
 
 import org.eclipse.core.databinding.beans.IBeanMapProperty;
 import org.eclipse.core.databinding.beans.IBeanSetProperty;
@@ -21,6 +22,7 @@ import org.eclipse.core.databinding.beans.PojoProperties;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.set.ISetProperty;
 import org.eclipse.core.databinding.property.set.SetProperty;
@@ -48,6 +50,18 @@ public class PojoSetPropertyDecorator extends SetProperty implements
 		return delegate.getElementType();
 	}
 
+	protected Set doGetSet(Object source) {
+		return delegate.getSet(source);
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		delegate.setSet(source, set);
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		delegate.updateSet(source, diff);
+	}
+
 	public PropertyDescriptor getPropertyDescriptor() {
 		return propertyDescriptor;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
index 19f29de..d7acb6f 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/beans/PojoValuePropertyDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,14 @@ public class PojoValuePropertyDecorator extends ValueProperty implements
 		return delegate.getValueType();
 	}
 
+	protected Object doGetValue(Object source) {
+		return delegate.getValue(source);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		delegate.setValue(source, value);
+	}
+
 	public IBeanValueProperty value(String propertyName) {
 		return value(propertyName, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/.settings/org.moreunit.prefs b/eclipse/plugins/org.eclipse.core.databinding.observable/.settings/org.moreunit.prefs
new file mode 100644
index 0000000..7935a31
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/.settings/org.moreunit.prefs
@@ -0,0 +1,5 @@
+#Tue Feb 02 23:24:37 MST 2010
+eclipse.preferences.version=1
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.core.databinding.observable\:src\:org.eclipse.jface.tests.databinding\:src
+org.moreunit.useprojectsettings=true
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
index 78562ec..a99b010 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding.observable
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java
index dfad75c..5f8792a 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,8 +36,13 @@ import org.eclipse.core.internal.databinding.observable.Util;
 public class Diffs {
 
 	/**
+	 * Returns a {@link ListDiff} describing the change between the specified
+	 * old and new list states.
+	 * 
 	 * @param oldList
+	 *            the old list state
 	 * @param newList
+	 *            the new list state
 	 * @return the differences between oldList and newList
 	 */
 	public static ListDiff computeListDiff(List oldList, List newList) {
@@ -47,7 +52,33 @@ public class Diffs {
 				.toArray(new ListDiffEntry[diffEntries.size()]));
 		return listDiff;
 	}
-	
+
+	/**
+	 * Returns a lazily computed {@link ListDiff} describing the change between
+	 * the specified old and new list states.
+	 * 
+	 * @param oldList
+	 *            the old list state
+	 * @param newList
+	 *            the new list state
+	 * @return a lazily computed {@link ListDiff} describing the change between
+	 *         the specified old and new list states.
+	 * @since 1.3
+	 */
+	public static ListDiff computeLazyListDiff(final List oldList,
+			final List newList) {
+		return new ListDiff() {
+			ListDiff lazyDiff;
+
+			public ListDiffEntry[] getDifferences() {
+				if (lazyDiff == null) {
+					lazyDiff = Diffs.computeListDiff(oldList, newList);
+				}
+				return lazyDiff.getDifferences();
+			}
+		};
+	}
+
 	/**
 	 * adapted from EMF's ListDifferenceAnalyzer
 	 */
@@ -57,47 +88,61 @@ public class Diffs {
 		for (Iterator it = newList.iterator(); it.hasNext();) {
 			Object newValue = it.next();
 			if (oldList.size() <= index) {
-				// append newValue to newList 
+				// append newValue to newList
 				listDiffs.add(createListDiffEntry(index, true, newValue));
 			} else {
 				boolean done;
 				do {
 					done = true;
 					Object oldValue = oldList.get(index);
-					if (oldValue == null ? newValue != null : !oldValue.equals(newValue)) {
-						int oldIndexOfNewValue = listIndexOf(oldList, newValue, index);
+					if (oldValue == null ? newValue != null : !oldValue
+							.equals(newValue)) {
+						int oldIndexOfNewValue = listIndexOf(oldList, newValue,
+								index);
 						if (oldIndexOfNewValue != -1) {
-							int newIndexOfOldValue = listIndexOf(newList, oldValue, index);
+							int newIndexOfOldValue = listIndexOf(newList,
+									oldValue, index);
 							if (newIndexOfOldValue == -1) {
 								// removing oldValue from list[index]
-								listDiffs.add(createListDiffEntry(index, false, oldValue));
+								listDiffs.add(createListDiffEntry(index, false,
+										oldValue));
 								oldList.remove(index);
 								done = false;
 							} else if (newIndexOfOldValue > oldIndexOfNewValue) {
-								// moving oldValue from list[index] to [newIndexOfOldValue] 
+								// moving oldValue from list[index] to
+								// [newIndexOfOldValue]
 								if (oldList.size() <= newIndexOfOldValue) {
-									// The element cannot be moved to the correct index
-									// now, however later iterations will insert elements
-									// in front of it, eventually moving it into the
+									// The element cannot be moved to the
+									// correct index
+									// now, however later iterations will insert
+									// elements
+									// in front of it, eventually moving it into
+									// the
 									// correct spot.
 									newIndexOfOldValue = oldList.size() - 1;
 								}
-								listDiffs.add(createListDiffEntry(index, false, oldValue));
+								listDiffs.add(createListDiffEntry(index, false,
+										oldValue));
 								oldList.remove(index);
-								listDiffs.add(createListDiffEntry(newIndexOfOldValue, true, oldValue));
+								listDiffs.add(createListDiffEntry(
+										newIndexOfOldValue, true, oldValue));
 								oldList.add(newIndexOfOldValue, oldValue);
 								done = false;
 							} else {
-								// move newValue from list[oldIndexOfNewValue] to [index]
-								listDiffs.add(createListDiffEntry(oldIndexOfNewValue, false, newValue));
+								// move newValue from list[oldIndexOfNewValue]
+								// to [index]
+								listDiffs.add(createListDiffEntry(
+										oldIndexOfNewValue, false, newValue));
 								oldList.remove(oldIndexOfNewValue);
-								listDiffs.add(createListDiffEntry(index, true, newValue));
+								listDiffs.add(createListDiffEntry(index, true,
+										newValue));
 								oldList.add(index, newValue);
 							}
 						} else {
 							// add newValue at list[index]
 							oldList.add(index, newValue);
-							listDiffs.add(createListDiffEntry(index, true, newValue));
+							listDiffs.add(createListDiffEntry(index, true,
+									newValue));
 						}
 					}
 				} while (!done);
@@ -118,9 +163,9 @@ public class Diffs {
 	 */
 	private static int listIndexOf(List list, Object object, int index) {
 		int size = list.size();
-		for (int i=index; i<size;i++) {
+		for (int i = index; i < size; i++) {
 			Object candidate = list.get(i);
-			if (candidate==null ? object==null : candidate.equals(object)) {
+			if (candidate == null ? object == null : candidate.equals(object)) {
 				return i;
 			}
 		}
@@ -144,9 +189,15 @@ public class Diffs {
 	}
 
 	/**
+	 * Returns a {@link SetDiff} describing the change between the specified old
+	 * and new set states.
+	 * 
 	 * @param oldSet
+	 *            the old set state
 	 * @param newSet
-	 * @return a set diff
+	 *            the new set state
+	 * @return a {@link SetDiff} describing the change between the specified old
+	 *         and new set states.
 	 */
 	public static SetDiff computeSetDiff(Set oldSet, Set newSet) {
 		Set additions = new HashSet(newSet);
@@ -157,12 +208,50 @@ public class Diffs {
 	}
 
 	/**
-	 * Computes the difference between two maps.
+	 * Returns a lazily computed {@link SetDiff} describing the change between
+	 * the specified old and new set states.
+	 * 
+	 * @param oldSet
+	 *            the old set state
+	 * @param newSet
+	 *            the new set state
+	 * @return a lazily computed {@link SetDiff} describing the change between
+	 *         the specified old and new set states.
+	 * @since 1.3
+	 */
+	public static SetDiff computeLazySetDiff(final Set oldSet, final Set newSet) {
+		return new SetDiff() {
+
+			private SetDiff lazyDiff;
+
+			private SetDiff getLazyDiff() {
+				if (lazyDiff == null) {
+					lazyDiff = computeSetDiff(oldSet, newSet);
+				}
+				return lazyDiff;
+			}
+
+			public Set getAdditions() {
+				return getLazyDiff().getAdditions();
+			}
+
+			public Set getRemovals() {
+				return getLazyDiff().getRemovals();
+			}
+
+		};
+	}
+
+	/**
+	 * Returns a {@link MapDiff} describing the change between the specified old
+	 * and new map states.
 	 * 
 	 * @param oldMap
+	 *            the old map state
 	 * @param newMap
-	 * @return a map diff representing the changes needed to turn oldMap into
-	 *         newMap
+	 *            the new map state
+	 * @return a {@link MapDiff} describing the change between the specified old
+	 *         and new map states.
 	 */
 	public static MapDiff computeMapDiff(Map oldMap, Map newMap) {
 		// starts out with all keys from the new map, we will remove keys from
@@ -215,7 +304,54 @@ public class Diffs {
 			}
 		};
 	}
-	
+
+	/**
+	 * Returns a lazily computed {@link MapDiff} describing the change between
+	 * the specified old and new map states.
+	 * 
+	 * @param oldMap
+	 *            the old map state
+	 * @param newMap
+	 *            the new map state
+	 * @return a lazily computed {@link MapDiff} describing the change between
+	 *         the specified old and new map states.
+	 * @since 1.3
+	 */
+	public static MapDiff computeLazyMapDiff(final Map oldMap, final Map newMap) {
+		return new MapDiff() {
+
+			private MapDiff lazyDiff;
+
+			private MapDiff getLazyDiff() {
+				if (lazyDiff == null) {
+					lazyDiff = computeMapDiff(oldMap, newMap);
+				}
+				return lazyDiff;
+			}
+
+			public Set getAddedKeys() {
+				return getLazyDiff().getAddedKeys();
+			}
+
+			public Set getRemovedKeys() {
+				return getLazyDiff().getRemovedKeys();
+			}
+
+			public Set getChangedKeys() {
+				return getLazyDiff().getChangedKeys();
+			}
+
+			public Object getOldValue(Object key) {
+				return getLazyDiff().getOldValue(key);
+			}
+
+			public Object getNewValue(Object key) {
+				return getLazyDiff().getNewValue(key);
+			}
+
+		};
+	}
+
 	/**
 	 * @param oldValue
 	 * @param newValue
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDisposeListener.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDisposeListener.java
index b48755a..35bf0af 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDisposeListener.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IDisposeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Matthew Hall and others.
+ * Copyright (c) 2008, 2009 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,7 @@ public interface IDisposeListener extends IObservablesListener {
 	 * given event object must only be used locally in this method because it
 	 * may be reused for other dispose notifications.
 	 * 
-	 * @param staleEvent
+	 * @param event
 	 */
-	public void handleDispose(DisposeEvent staleEvent);
+	public void handleDispose(DisposeEvent event);
 }
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java
index cbfc9d7..0c27e3b 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ObservableTracker.java
@@ -7,14 +7,17 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 210115, 146397, 249526, 262269
+ *     Matthew Hall - bugs 210115, 146397, 249526, 262269, 251424
  *******************************************************************************/
 package org.eclipse.core.databinding.observable;
 
 import java.util.Set;
 
+import org.eclipse.core.databinding.util.Policy;
 import org.eclipse.core.internal.databinding.identity.IdentitySet;
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 
 /**
  * This class makes it possible to monitor whenever an IObservable is read from.
@@ -70,6 +73,8 @@ public class ObservableTracker {
 
 	private static ThreadLocal currentObservableCreatedSet = new ThreadLocal();
 
+	private static ThreadLocal currentIgnoreCount = new ThreadLocal();
+
 	/**
 	 * Invokes the given runnable, and returns the set of IObservables that were
 	 * read by the runnable. If the runnable calls this method recursively, the
@@ -93,12 +98,14 @@ public class ObservableTracker {
 				.get();
 		IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
 				.get();
+		Integer lastIgnore = (Integer) currentIgnoreCount.get();
 
 		Set observableSet = new IdentitySet();
 		// Push the new listeners to the top of the stack
 		currentGetterCalledSet.set(observableSet);
 		currentChangeListener.set(changeListener);
 		currentStaleListener.set(staleListener);
+		currentIgnoreCount.set(null);
 		try {
 			runnable.run();
 		} finally {
@@ -107,6 +114,8 @@ public class ObservableTracker {
 			currentGetterCalledSet.set(lastObservableSet);
 			currentChangeListener.set(lastChangeListener);
 			currentStaleListener.set(lastStaleListener);
+			checkUnmatchedIgnore(runnable);
+			currentIgnoreCount.set(lastIgnore);
 		}
 
 		return (IObservable[]) observableSet
@@ -131,49 +140,86 @@ public class ObservableTracker {
 	 */
 	public static IObservable[] runAndCollect(Runnable runnable) {
 		Set lastObservableCreatedSet = (Set) currentObservableCreatedSet.get();
+		Integer lastIgnore = (Integer) currentIgnoreCount.get();
 
 		Set observableSet = new IdentitySet();
 		// Push the new listeners to the top of the stack
 		currentObservableCreatedSet.set(observableSet);
+		currentIgnoreCount.set(null);
 		try {
 			runnable.run();
 		} finally {
 			// Pop the new listener off the top of the stack (by restoring the
 			// previous listener)
 			currentObservableCreatedSet.set(lastObservableCreatedSet);
+			checkUnmatchedIgnore(runnable);
+			currentIgnoreCount.set(lastIgnore);
 		}
 
 		return (IObservable[]) observableSet
 				.toArray(new IObservable[observableSet.size()]);
 	}
 
+	private static void checkUnmatchedIgnore(Runnable runnable) {
+		if (isIgnore()) {
+			Policy
+					.getLog()
+					.log(
+							new Status(
+									IStatus.ERROR,
+									Policy.JFACE_DATABINDING,
+									"There were " //$NON-NLS-1$
+											+ currentIgnoreCount.get()
+											+ " unmatched setIgnore(true) invocations in runnable " //$NON-NLS-1$
+											+ runnable));
+		}
+	}
+
+	/**
+	 * If the argument is <code>true</code>, causes subsequent calls to
+	 * {@link #getterCalled(IObservable)} and
+	 * {@link #observableCreated(IObservable)} to be ignored on the current
+	 * thread. When the flag is set to <code>false</code>, calls to
+	 * {@link #getterCalled(IObservable)} and
+	 * {@link #observableCreated(IObservable)} will resume gathering
+	 * observables. Nested calls to this method are stacked.
+	 * 
+	 * @param ignore
+	 *            the new ignore state
+	 * 
+	 * @exception IllegalStateException
+	 *                if
+	 *                <code>ignore<code> is false and the ignore count is already zero.
+	 * 
+	 * @see #getterCalled(IObservable)
+	 * @see #observableCreated(IObservable)
+	 * @since 1.3
+	 */
+	public static void setIgnore(boolean ignore) {
+		Integer lastCount = (Integer) currentIgnoreCount.get();
+
+		int newCount = (lastCount == null ? 0 : lastCount.intValue())
+				+ (ignore ? 1 : -1);
+
+		if (newCount < 0)
+			throw new IllegalStateException("Ignore count is already zero"); //$NON-NLS-1$
+
+		currentIgnoreCount.set(newCount == 0 ? null : new Integer(newCount));
+	}
+
 	/**
 	 * Runs the given runnable without tracking dependencies.
+	 * 
 	 * @param runnable
 	 * 
 	 * @since 1.1
 	 */
 	public static void runAndIgnore(Runnable runnable) {
-		// Remember the previous value in the listener stack
-		Set lastGetterCalledSet = (Set) currentGetterCalledSet.get();
-		Set lastObservableCreatedSet = (Set) currentObservableCreatedSet.get();
-		IChangeListener lastChangeListener = (IChangeListener) currentChangeListener
-				.get();
-		IStaleListener lastStaleListener = (IStaleListener) currentStaleListener
-				.get();
-		currentGetterCalledSet.set(null);
-		currentObservableCreatedSet.set(null);
-		currentChangeListener.set(null);
-		currentStaleListener.set(null);
+		setIgnore(true);
 		try {
 			runnable.run();
 		} finally {
-			// Pop the new listener off the top of the stack (by restoring the
-			// previous listener)
-			currentGetterCalledSet.set(lastGetterCalledSet);
-			currentObservableCreatedSet.set(lastObservableCreatedSet);
-			currentChangeListener.set(lastChangeListener);
-			currentStaleListener.set(lastStaleListener);
+			setIgnore(false);
 		}
 	}
 
@@ -187,6 +233,10 @@ public class ObservableTracker {
 				+ Integer.toHexString(System.identityHashCode(observable));
 	}
 
+	private static boolean isIgnore() {
+		return currentIgnoreCount.get() != null;
+	}
+
 	/**
 	 * Notifies the ObservableTracker that an observable was read from. The
 	 * JavaDoc for methods that invoke this method should include the following
@@ -206,6 +256,9 @@ public class ObservableTracker {
 			Assert.isTrue(false, "Getter called outside realm of observable " //$NON-NLS-1$
 					+ toString(observable));
 
+		if (isIgnore())
+			return;
+
 		Set getterCalledSet = (Set) currentGetterCalledSet.get();
 		if (getterCalledSet != null && getterCalledSet.add(observable)) {
 			// If anyone is listening for observable usage...
@@ -228,6 +281,8 @@ public class ObservableTracker {
 	 * @since 1.2
 	 */
 	public static void observableCreated(IObservable observable) {
+		if (isIgnore())
+			return;
 		Set observableCreatedSet = (Set) currentObservableCreatedSet.get();
 		if (observableCreatedSet != null) {
 			observableCreatedSet.add(observable);
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java
index b0947b1..5d631cb 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/ListDiff.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 208858, 251884, 194734, 272651
+ *     Matthew Hall - bugs 208858, 251884, 194734, 272651, 301774
  *******************************************************************************/
 
 package org.eclipse.core.databinding.observable.list;
 
+import java.util.AbstractList;
+import java.util.Collections;
 import java.util.List;
 
 import org.eclipse.core.databinding.observable.IDiff;
@@ -175,6 +177,98 @@ public abstract class ListDiff implements IDiff {
 	}
 
 	/**
+	 * Returns a list showing what <code>list</code> would look like if this
+	 * diff were applied to it.
+	 * <p>
+	 * <b>Note</b>: the returned list is only valid until structural changes are
+	 * made to the passed-in list.
+	 * 
+	 * @param list
+	 *            the list over which the diff will be simulated
+	 * @return an unmodifiable list showing what <code>list</code> would look
+	 *         like if it were passed to the {@link #applyTo(List)} method.
+	 * @see #applyTo(List)
+	 * @since 1.3
+	 */
+	public List simulateOn(List list) {
+		final List[] result = { list };
+		accept(new ListDiffVisitor() {
+			public void handleAdd(int index, Object element) {
+				List first = result[0].subList(0, index);
+				List middle = Collections.singletonList(element);
+				List last = result[0].subList(index, result[0].size());
+				result[0] = ConcatList.cat(first, middle, last);
+			}
+
+			public void handleRemove(int index, Object element) {
+				List first = result[0].subList(0, index);
+				List last = result[0].subList(index + 1, result[0].size());
+				result[0] = ConcatList.cat(first, last);
+			}
+
+			public void handleReplace(int index, Object oldElement,
+					Object newElement) {
+				List first = result[0].subList(0, index);
+				List middle = Collections.singletonList(newElement);
+				List last = result[0].subList(index + 1, result[0].size());
+				result[0] = ConcatList.cat(first, middle, last);
+			}
+		});
+		return result[0];
+	}
+
+	private static class ConcatList extends AbstractList {
+		private final List[] subLists;
+
+		public static List cat(List a, List b, List c) {
+			if (a.isEmpty()) {
+				return cat(b, c);
+			} else if (b.isEmpty()) {
+				return cat(a, c);
+			} else if (c.isEmpty()) {
+				return cat(a, b);
+			}
+			return new ConcatList(new List[] { a, b, c });
+		}
+
+		public static List cat(List a, List b) {
+			if (a.isEmpty()) {
+				if (b.isEmpty()) {
+					return Collections.EMPTY_LIST;
+				}
+				return b;
+			} else if (b.isEmpty()) {
+				return a;
+			}
+			return new ConcatList(new List[] { a, b });
+		}
+
+		private ConcatList(List[] sublists) {
+			this.subLists = sublists;
+		}
+
+		public Object get(int index) {
+			int offset = 0;
+			for (int i = 0; i < subLists.length; i++) {
+				int subListIndex = index - offset;
+				if (subListIndex < subLists[i].size()) {
+					return subLists[i].get(subListIndex);
+				}
+				offset += subLists[i].size();
+			}
+			throw new IndexOutOfBoundsException();
+		}
+
+		public int size() {
+			int size = 0;
+			for (int i = 0; i < subLists.length; i++) {
+				size += subLists[i].size();
+			}
+			return size;
+		}
+	}
+
+	/**
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
index 809c030..60aaadd 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ComputedObservableMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Matthew Hall - bugs 241585, 247394, 226289, 194734, 190881, 266754,
  *                    268688
+ *     Ovidio Mallo - bug 303847
  *******************************************************************************/
 
 package org.eclipse.core.databinding.observable.map;
@@ -213,6 +214,26 @@ public abstract class ComputedObservableMap extends AbstractObservableMap {
 		return valueType;
 	}
 
+	/**
+	 * @since 1.3
+	 */
+	public Object remove(Object key) {
+		checkRealm();
+
+		Object oldValue = get(key);
+		keySet().remove(key);
+
+		return oldValue;
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public boolean containsKey(Object key) {
+		getterCalled();
+		return keySet().contains(key);
+	}
+
 	public Set entrySet() {
 		return entrySet;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java
index 6469629..d710c13 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/MapDiff.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,16 +7,21 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 251884, 194734
+ *     Matthew Hall - bugs 251884, 194734, 301774
  *******************************************************************************/
 
 package org.eclipse.core.databinding.observable.map;
 
+import java.util.AbstractMap;
+import java.util.AbstractSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.NoSuchElementException;
 import java.util.Set;
+import java.util.Map.Entry;
 
 import org.eclipse.core.databinding.observable.IDiff;
+import org.eclipse.core.internal.databinding.observable.Util;
 
 /**
  * @since 1.1
@@ -56,6 +61,218 @@ public abstract class MapDiff implements IDiff {
 	}
 
 	/**
+	 * Returns a map showing what <code>map</code> would look like if this diff
+	 * were applied to it.
+	 * <p>
+	 * <b>Note</b>: the returned map is only valid until structural changes are
+	 * made to the passed-in map.
+	 * 
+	 * @param map
+	 *            the map over which the diff will be simulated
+	 * @return an unmodifiable map showing what <code>map</code> would look like
+	 *         if it were passed to the {@link #applyTo(Map)} method.
+	 * @see #applyTo(Map)
+	 * @since 1.3
+	 */
+	public Map simulateOn(Map map) {
+		return new DeltaMap(map, this);
+	}
+
+	private static class DeltaMap extends AbstractMap {
+
+		private final Map map;
+		private final MapDiff diff;
+
+		private Set entrySet;
+
+		public DeltaMap(Map map, MapDiff diff) {
+			this.map = map;
+			this.diff = diff;
+
+		}
+
+		public void clear() {
+			throw new UnsupportedOperationException();
+		}
+
+		public boolean containsKey(Object key) {
+			return diff.getAddedKeys().contains(key)
+					|| (map.containsKey(key) && !diff.getRemovedKeys()
+							.contains(key));
+		}
+
+		public Set entrySet() {
+			if (entrySet == null) {
+				entrySet = new DeltaMapEntrySet(map, diff);
+			}
+			return entrySet;
+		}
+
+		public Object get(Object key) {
+			if (diff.getAddedKeys().contains(key))
+				return diff.getNewValue(key);
+			if (diff.getChangedKeys().contains(key))
+				return diff.getNewValue(key);
+			if (diff.getRemovedKeys().contains(key))
+				return null;
+			return map.get(key);
+		}
+
+		public Object put(Object arg0, Object arg1) {
+			throw new UnsupportedOperationException();
+		}
+
+		public void putAll(Map arg0) {
+			throw new UnsupportedOperationException();
+		}
+
+		public Object remove(Object key) {
+			throw new UnsupportedOperationException();
+		}
+
+	}
+
+	private static class DeltaMapEntrySet extends AbstractSet {
+
+		private final Map map;
+		private final MapDiff diff;
+
+		public DeltaMapEntrySet(Map map, MapDiff diff) {
+			this.map = map;
+			this.diff = diff;
+		}
+
+		public Iterator iterator() {
+			return new Iterator() {
+				Iterator origEntries = map.entrySet().iterator();
+				Iterator addedKeys = diff.getAddedKeys().iterator();
+
+				boolean haveNext = false;
+				Map.Entry next;
+
+				public boolean hasNext() {
+					return findNext();
+				}
+
+				public Object next() {
+					if (!findNext())
+						throw new NoSuchElementException();
+
+					Map.Entry myNext = next;
+					haveNext = false;
+					next = null;
+					return myNext;
+				}
+
+				private boolean findNext() {
+					if (haveNext)
+						return true;
+					while (true) {
+						Object candidateKey;
+						Map.Entry candidateEntry;
+						if (origEntries.hasNext()) {
+							candidateEntry = (Map.Entry) origEntries.next();
+							candidateKey = candidateEntry.getKey();
+
+							if (diff.getRemovedKeys().contains(candidateKey)) {
+								continue;
+							} else if (diff.getChangedKeys().contains(
+									candidateKey)) {
+								candidateEntry = new DeltaMapEntry(
+										candidateKey, diff);
+							} else {
+								candidateEntry = new MapEntryWrapper(
+										candidateEntry);
+							}
+						} else if (addedKeys.hasNext()) {
+							candidateKey = addedKeys.next();
+							candidateEntry = new DeltaMapEntry(candidateKey,
+									diff);
+						} else {
+							return false;
+						}
+
+						haveNext = true;
+						next = candidateEntry;
+						return true;
+					}
+				}
+
+				public void remove() {
+					throw new UnsupportedOperationException();
+				}
+
+			};
+		}
+
+		public int size() {
+			return map.size() + diff.getAddedKeys().size()
+					- diff.getRemovedKeys().size();
+		}
+
+	}
+
+	private abstract static class AbstractMapEntry implements Map.Entry {
+		public Object setValue(Object arg0) {
+			throw new UnsupportedOperationException();
+		}
+
+		public boolean equals(Object obj) {
+			if (!(obj instanceof Map.Entry))
+				return false;
+			Map.Entry that = (Map.Entry) obj;
+			return Util.equals(this.getKey(), that.getKey())
+					&& Util.equals(this.getValue(), that.getValue());
+		}
+
+		public int hashCode() {
+			Object key = getKey();
+			Object value = getValue();
+			return hash(key) ^ hash(value);
+		}
+
+		private int hash(Object key) {
+			return key == null ? 0 : key.hashCode();
+		}
+	}
+
+	private static class MapEntryWrapper extends AbstractMapEntry {
+		private final Entry entry;
+
+		public MapEntryWrapper(Map.Entry entry) {
+			this.entry = entry;
+		}
+
+		public Object getKey() {
+			return entry.getKey();
+		}
+
+		public Object getValue() {
+			return entry.getValue();
+		}
+
+	}
+
+	private static class DeltaMapEntry extends AbstractMapEntry {
+		private final Object key;
+		private final MapDiff diff;
+
+		public DeltaMapEntry(Object key, MapDiff diff) {
+			this.key = key;
+			this.diff = diff;
+		}
+
+		public Object getKey() {
+			return key;
+		}
+
+		public Object getValue() {
+			return diff.getNewValue(key);
+		}
+
+	}
+
+	/**
 	 * @return the set of keys which were added
 	 */
 	public abstract Set getAddedKeys();
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java
index f5e05a3..9b93970 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/set/SetDiff.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,31 +7,34 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 251884, 194734
+ *     Matthew Hall - bugs 251884, 194734, 301774
  *******************************************************************************/
 
 package org.eclipse.core.databinding.observable.set;
 
+import java.util.AbstractSet;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
 import java.util.Set;
 
 import org.eclipse.core.databinding.observable.IDiff;
 
 /**
  * @since 1.0
- *
+ * 
  */
 public abstract class SetDiff implements IDiff {
-	
+
 	/**
 	 * @return the set of added elements
 	 */
 	public abstract Set getAdditions();
-	
+
 	/**
 	 * @return the set of removed elements
 	 */
 	public abstract Set getRemovals();
-	
+
 	/**
 	 * Returns true if the diff has no added or removed elements.
 	 * 
@@ -55,18 +58,107 @@ public abstract class SetDiff implements IDiff {
 	}
 
 	/**
+	 * Returns a {@link Set} showing what <code>set</code> would look like if
+	 * this diff were applied to it. The passed-in list is presumed to contain
+	 * all elements in {@link #getRemovals()}, and none of the elements in
+	 * {@link #getAdditions()}.
+	 * <p>
+	 * <b>Note</b>:the returned list is only guaranteed to be valid while the
+	 * passed in set remains unchanged.
+	 * 
+	 * @param set
+	 *            the set over which the diff will be simulated
+	 * @return a {@link Set} showing what <code>set</code> would look like if it
+	 *         were passed to the {@link #applyTo(Set)} method.
+	 * @since 1.3
+	 */
+	public Set simulateOn(Set set) {
+		return new DeltaSet(set, this);
+	}
+
+	private static class DeltaSet extends AbstractSet {
+		private Set original;
+		private final SetDiff diff;
+
+		public DeltaSet(Set original, SetDiff diff) {
+			this.original = original;
+			this.diff = diff;
+		}
+
+		public Iterator iterator() {
+			return new Iterator() {
+				Iterator orig = original.iterator();
+				Iterator add = diff.getAdditions().iterator();
+
+				boolean haveNext = false;
+				Object next;
+
+				public boolean hasNext() {
+					return findNext();
+				}
+
+				public Object next() {
+					if (!findNext())
+						throw new NoSuchElementException();
+					Object myNext = next;
+					haveNext = false;
+					next = null;
+					return myNext;
+				}
+
+				private boolean findNext() {
+					if (haveNext)
+						return true;
+					while (true) {
+						Object candidate;
+						if (orig.hasNext())
+							candidate = orig.next();
+						else if (add.hasNext())
+							candidate = add.next();
+						else
+							return false;
+
+						if (diff.getRemovals().contains(candidate))
+							continue;
+
+						haveNext = true;
+						next = candidate;
+						return true;
+					}
+				}
+
+				public void remove() {
+					throw new UnsupportedOperationException();
+				}
+			};
+		}
+
+		public boolean contains(Object o) {
+			return (original.contains(o) || diff.getAdditions().contains(o))
+					&& !diff.getRemovals().contains(o);
+		}
+
+		public int size() {
+			return original.size() + diff.getAdditions().size()
+					- diff.getRemovals().size();
+		}
+	}
+
+	/**
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
 		StringBuffer buffer = new StringBuffer();
-		buffer
-			.append(getClass().getName())
-			.append("{additions [") //$NON-NLS-1$
-			.append(getAdditions() != null ? getAdditions().toString() : "null") //$NON-NLS-1$
-			.append("], removals [") //$NON-NLS-1$
-			.append(getRemovals() != null ? getRemovals().toString() : "null") //$NON-NLS-1$
-			.append("]}"); //$NON-NLS-1$
-		
+		buffer.append(getClass().getName()).append("{additions [") //$NON-NLS-1$
+				.append(
+						getAdditions() != null ? getAdditions().toString()
+								: "null") //$NON-NLS-1$
+				.append("], removals [") //$NON-NLS-1$
+				.append(
+						getRemovals() != null ? getRemovals().toString()
+								: "null") //$NON-NLS-1$
+				.append("]}"); //$NON-NLS-1$
+
 		return buffer.toString();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityMap.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityMap.java
index 4fdf296..334dc2f 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     Matthew Hall - initial API and implementation (bug 215531)
  *     Matthew Hall - bug 228125
  *         (through ViewerElementMap.java)
- *     Matthew Hall - bug 262269
+ *     Matthew Hall - bugs 262269, 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.identity;
@@ -63,7 +63,7 @@ public class IdentityMap implements Map {
 	}
 
 	public boolean containsKey(Object key) {
-		return wrappedMap.containsKey(new IdentityWrapper(key));
+		return wrappedMap.containsKey(IdentityWrapper.wrap(key));
 	}
 
 	public boolean containsValue(Object value) {
@@ -152,8 +152,8 @@ public class IdentityMap implements Map {
 
 			public boolean remove(Object o) {
 				final Map.Entry unwrappedEntry = (Map.Entry) o;
-				final IdentityWrapper wrappedKey = new IdentityWrapper(
-						unwrappedEntry.getKey());
+				final IdentityWrapper wrappedKey = IdentityWrapper
+						.wrap(unwrappedEntry.getKey());
 				Map.Entry wrappedEntry = new Map.Entry() {
 					public Object getKey() {
 						return wrappedKey;
@@ -247,7 +247,7 @@ public class IdentityMap implements Map {
 	}
 
 	public Object get(Object key) {
-		return wrappedMap.get(new IdentityWrapper(key));
+		return wrappedMap.get(IdentityWrapper.wrap(key));
 	}
 
 	public boolean isEmpty() {
@@ -270,12 +270,12 @@ public class IdentityMap implements Map {
 			}
 
 			public boolean contains(Object o) {
-				return wrappedKeySet.contains(new IdentityWrapper(o));
+				return wrappedKeySet.contains(IdentityWrapper.wrap(o));
 			}
 
 			public boolean containsAll(Collection c) {
 				for (Iterator iterator = c.iterator(); iterator.hasNext();)
-					if (!wrappedKeySet.contains(new IdentityWrapper(iterator
+					if (!wrappedKeySet.contains(IdentityWrapper.wrap(iterator
 							.next())))
 						return false;
 				return true;
@@ -304,14 +304,14 @@ public class IdentityMap implements Map {
 			}
 
 			public boolean remove(Object o) {
-				return wrappedKeySet.remove(new IdentityWrapper(o));
+				return wrappedKeySet.remove(IdentityWrapper.wrap(o));
 			}
 
 			public boolean removeAll(Collection c) {
 				boolean changed = false;
 				for (Iterator iterator = c.iterator(); iterator.hasNext();)
-					changed |= wrappedKeySet.remove(new IdentityWrapper(
-							iterator.next()));
+					changed |= wrappedKeySet.remove(IdentityWrapper
+							.wrap(iterator.next()));
 				return changed;
 			}
 
@@ -368,20 +368,20 @@ public class IdentityMap implements Map {
 	}
 
 	public Object put(Object key, Object value) {
-		return wrappedMap.put(new IdentityWrapper(key), value);
+		return wrappedMap.put(IdentityWrapper.wrap(key), value);
 	}
 
 	public void putAll(Map other) {
 		for (Iterator iterator = other.entrySet().iterator(); iterator
 				.hasNext();) {
 			Map.Entry entry = (Map.Entry) iterator.next();
-			wrappedMap.put(new IdentityWrapper(entry.getKey()), entry
+			wrappedMap.put(IdentityWrapper.wrap(entry.getKey()), entry
 					.getValue());
 		}
 	}
 
 	public Object remove(Object key) {
-		return wrappedMap.remove(new IdentityWrapper(key));
+		return wrappedMap.remove(IdentityWrapper.wrap(key));
 	}
 
 	public int size() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentitySet.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentitySet.java
index f914438..4bf6388 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentitySet.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentitySet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     Matthew Hall - initial API and implementation (bug 215531)
  *     Matthew Hall - bug 124684
  *         (through ViewerElementSet.java)
- *     Matthew Hall - bug 262269
+ *     Matthew Hall - bugs 262269, 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.identity;
@@ -54,13 +54,13 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean add(Object o) {
-		return wrappedSet.add(new IdentityWrapper(o));
+		return wrappedSet.add(IdentityWrapper.wrap(o));
 	}
 
 	public boolean addAll(Collection c) {
 		boolean changed = false;
 		for (Iterator iterator = c.iterator(); iterator.hasNext();)
-			changed |= wrappedSet.add(new IdentityWrapper(iterator.next()));
+			changed |= wrappedSet.add(IdentityWrapper.wrap(iterator.next()));
 		return changed;
 	}
 
@@ -69,12 +69,12 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean contains(Object o) {
-		return wrappedSet.contains(new IdentityWrapper(o));
+		return wrappedSet.contains(IdentityWrapper.wrap(o));
 	}
 
 	public boolean containsAll(Collection c) {
 		for (Iterator iterator = c.iterator(); iterator.hasNext();)
-			if (!wrappedSet.contains(new IdentityWrapper(iterator.next())))
+			if (!wrappedSet.contains(IdentityWrapper.wrap(iterator.next())))
 				return false;
 		return true;
 	}
@@ -101,7 +101,7 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean remove(Object o) {
-		return wrappedSet.remove(new IdentityWrapper(o));
+		return wrappedSet.remove(IdentityWrapper.wrap(o));
 	}
 
 	public boolean removeAll(Collection c) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityWrapper.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityWrapper.java
index c3cb5f9..9e140c5 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityWrapper.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/identity/IdentityWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Daniel Kruegler - bug 137435
+ *     Matthew Hall - bug 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.identity;
@@ -21,15 +22,27 @@ package org.eclipse.core.internal.databinding.identity;
  * 
  */
 public class IdentityWrapper {
+	private static final IdentityWrapper NULL_WRAPPER = new IdentityWrapper(
+			null);
+
+	/**
+	 * @param o
+	 *            the object to wrap
+	 * @return an IdentityWrapper wrapping the specified object
+	 */
+	public static IdentityWrapper wrap(Object o) {
+		return o == null ? NULL_WRAPPER : new IdentityWrapper(o);
+	}
+
 	final Object o;
 
 	/**
 	 * @param o
 	 */
-	public IdentityWrapper(Object o) {
+	private IdentityWrapper(Object o) {
 		this.o = o;
 	}
-	
+
 	/**
 	 * @return the unwrapped object
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
index 65c6c43..f3fc946 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Brad Reynolds - bug 147515
- *     Matthew Hall - bug 221351, 247875, 246782, 249526, 268022
+ *     Matthew Hall - bug 221351, 247875, 246782, 249526, 268022, 251424
  *     Ovidio Mallo - bug 241318
  *******************************************************************************/
 package org.eclipse.core.internal.databinding.observable.masterdetail;
@@ -82,11 +82,12 @@ public class DetailObservableList extends ObservableList implements IObserving {
 			}
 		});
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				updateInnerObservableList();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			updateInnerObservableList();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 		outerObservableValue.addValueChangeListener(outerChangeListener);
 	}
 
@@ -94,13 +95,14 @@ public class DetailObservableList extends ObservableList implements IObserving {
 		public void handleValueChange(ValueChangeEvent event) {
 			if (isDisposed())
 				return;
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					List oldList = new ArrayList(wrappedList);
-					updateInnerObservableList();
-					fireListChange(Diffs.computeListDiff(oldList, wrappedList));
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				List oldList = new ArrayList(wrappedList);
+				updateInnerObservableList();
+				fireListChange(Diffs.computeListDiff(oldList, wrappedList));
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 	};
 
@@ -114,12 +116,13 @@ public class DetailObservableList extends ObservableList implements IObserving {
 			innerObservableList = null;
 			wrappedList = Collections.EMPTY_LIST;
 		} else {
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					innerObservableList = (IObservableList) factory
-							.createObservable(currentOuterValue);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				innerObservableList = (IObservableList) factory
+						.createObservable(currentOuterValue);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 			DetailObservableHelper.warnIfDifferentRealms(getRealm(),
 					innerObservableList.getRealm());
 			wrappedList = innerObservableList;
@@ -134,112 +137,105 @@ public class DetailObservableList extends ObservableList implements IObserving {
 	}
 
 	public boolean add(final Object o) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.add(o);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.add(o);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public void add(final int index, final Object element) {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				wrappedList.add(index, element);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			wrappedList.add(index, element);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean remove(final Object o) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.remove(o);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.remove(o);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public Object set(final int index, final Object element) {
-		final Object[] result = new Object[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.set(index, element);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.set(index, element);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public Object move(final int oldIndex, final int newIndex) {
 		if (innerObservableList != null) {
-			final Object[] result = new Object[1];
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					result[0] = innerObservableList.move(oldIndex, newIndex);
-				}
-			});
-			return result[0];
+			ObservableTracker.setIgnore(true);
+			try {
+				return innerObservableList.move(oldIndex, newIndex);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 		return super.move(oldIndex, newIndex);
 	}
 
 	public Object remove(final int index) {
-		final Object[] result = new Object[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.remove(index);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.remove(index);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean addAll(final Collection c) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.addAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.addAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean addAll(final int index, final Collection c) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.addAll(index, c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.addAll(index, c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean removeAll(final Collection c) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.removeAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.removeAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean retainAll(final Collection c) {
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedList.retainAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedList.retainAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public void clear() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				wrappedList.clear();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			wrappedList.clear();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public synchronized void dispose() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableMap.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableMap.java
index ff04bf5..fbfc9d3 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableMap.java
@@ -7,7 +7,8 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 221704)
- *     Matthew Hall - bug 223114, 226289, 247875, 246782, 249526, 268022
+ *     Matthew Hall - bug 223114, 226289, 247875, 246782, 249526, 268022,
+ *                    251424
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.observable.masterdetail;
@@ -50,13 +51,14 @@ public class DetailObservableMap extends ObservableMap implements IObserving {
 		public void handleValueChange(ValueChangeEvent event) {
 			if (isDisposed())
 				return;
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					Map oldMap = new HashMap(wrappedMap);
-					updateDetailMap();
-					fireMapChange(Diffs.computeMapDiff(oldMap, wrappedMap));
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				Map oldMap = new HashMap(wrappedMap);
+				updateDetailMap();
+				fireMapChange(Diffs.computeMapDiff(oldMap, wrappedMap));
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 	};
 
@@ -95,11 +97,12 @@ public class DetailObservableMap extends ObservableMap implements IObserving {
 			}
 		});
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				updateDetailMap();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			updateDetailMap();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 		master.addValueChangeListener(masterChangeListener);
 	}
 
@@ -114,12 +117,13 @@ public class DetailObservableMap extends ObservableMap implements IObserving {
 			detailMap = null;
 			wrappedMap = Collections.EMPTY_MAP;
 		} else {
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					detailMap = (IObservableMap) detailFactory
-							.createObservable(masterValue);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				detailMap = (IObservableMap) detailFactory
+						.createObservable(masterValue);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 			DetailObservableHelper.warnIfDifferentRealms(getRealm(), detailMap
 					.getRealm());
 			wrappedMap = detailMap;
@@ -151,39 +155,39 @@ public class DetailObservableMap extends ObservableMap implements IObserving {
 	}
 
 	public Object put(final Object key, final Object value) {
-		final Object[] result = new Object[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = detailMap.put(key, value);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return detailMap.put(key, value);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public void putAll(final Map map) {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				detailMap.putAll(map);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			detailMap.putAll(map);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public Object remove(final Object key) {
-		final Object[] result = new Object[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = detailMap.remove(key);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return detailMap.remove(key);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public void clear() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				detailMap.clear();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			detailMap.clear();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public synchronized void dispose() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
index c38db50..d218e2f 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bug 221351, 247875, 246782, 249526, 268022
+ *     Matthew Hall - bug 221351, 247875, 246782, 249526, 268022, 251424
  *     Ovidio Mallo - bug 241318
  *******************************************************************************/
 package org.eclipse.core.internal.databinding.observable.masterdetail;
@@ -77,11 +77,12 @@ public class DetailObservableSet extends ObservableSet implements IObserving {
 			}
 		});
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				updateInnerObservableSet();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			updateInnerObservableSet();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 		outerObservableValue.addValueChangeListener(outerChangeListener);
 	}
 
@@ -89,13 +90,14 @@ public class DetailObservableSet extends ObservableSet implements IObserving {
 		public void handleValueChange(ValueChangeEvent event) {
 			if (isDisposed())
 				return;
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					Set oldSet = new HashSet(wrappedSet);
-					updateInnerObservableSet();
-					fireSetChange(Diffs.computeSetDiff(oldSet, wrappedSet));
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				Set oldSet = new HashSet(wrappedSet);
+				updateInnerObservableSet();
+				fireSetChange(Diffs.computeSetDiff(oldSet, wrappedSet));
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 	};
 
@@ -109,12 +111,13 @@ public class DetailObservableSet extends ObservableSet implements IObserving {
 			innerObservableSet = null;
 			wrappedSet = Collections.EMPTY_SET;
 		} else {
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					innerObservableSet = (IObservableSet) factory
-							.createObservable(currentOuterValue);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				innerObservableSet = (IObservableSet) factory
+						.createObservable(currentOuterValue);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 			DetailObservableHelper.warnIfDifferentRealms(getRealm(),
 					innerObservableSet.getRealm());
 			wrappedSet = innerObservableSet;
@@ -132,66 +135,62 @@ public class DetailObservableSet extends ObservableSet implements IObserving {
 
 	public boolean add(final Object o) {
 		getterCalled();
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedSet.add(o);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedSet.add(o);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean remove(final Object o) {
 		getterCalled();
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedSet.remove(o);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedSet.remove(o);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean addAll(final Collection c) {
 		getterCalled();
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedSet.addAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedSet.addAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean removeAll(final Collection c) {
 		getterCalled();
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedSet.removeAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedSet.removeAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public boolean retainAll(final Collection c) {
 		getterCalled();
-		final boolean[] result = new boolean[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = wrappedSet.retainAll(c);
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return wrappedSet.retainAll(c);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public void clear() {
 		getterCalled();
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				wrappedSet.clear();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			wrappedSet.clear();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public synchronized void dispose() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
index 3d31d42..be548b1 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Brad Reynolds - bugs 164653, 147515
  *     Ovidio Mallo - bug 241318
- *     Matthew Hall - bugs 247875, 246782, 249526, 268022
+ *     Matthew Hall - bugs 247875, 246782, 249526, 268022, 251424
  *******************************************************************************/
 package org.eclipse.core.internal.databinding.observable.masterdetail;
 
@@ -73,11 +73,12 @@ public class DetailObservableValue extends AbstractObservableValue implements
 			}
 		});
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				updateInnerObservableValue();
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			updateInnerObservableValue();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 		outerObservableValue.addValueChangeListener(outerChangeListener);
 	}
 
@@ -85,14 +86,14 @@ public class DetailObservableValue extends AbstractObservableValue implements
 		public void handleValueChange(ValueChangeEvent event) {
 			if (isDisposed())
 				return;
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					Object oldValue = doGetValue();
-					updateInnerObservableValue();
-					fireValueChange(Diffs.createValueDiff(oldValue,
-							doGetValue()));
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				Object oldValue = doGetValue();
+				updateInnerObservableValue();
+				fireValueChange(Diffs.createValueDiff(oldValue, doGetValue()));
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 	};
 
@@ -105,12 +106,13 @@ public class DetailObservableValue extends AbstractObservableValue implements
 		if (currentOuterValue == null) {
 			innerObservableValue = null;
 		} else {
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					innerObservableValue = (IObservableValue) factory
-							.createObservable(currentOuterValue);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				innerObservableValue = (IObservableValue) factory
+						.createObservable(currentOuterValue);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 			DetailObservableHelper.warnIfDifferentRealms(getRealm(),
 					innerObservableValue.getRealm());
 
@@ -127,24 +129,24 @@ public class DetailObservableValue extends AbstractObservableValue implements
 
 	public void doSetValue(final Object value) {
 		if (innerObservableValue != null) {
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					innerObservableValue.setValue(value);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				innerObservableValue.setValue(value);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 	}
 
 	public Object doGetValue() {
 		if (innerObservableValue == null)
 			return null;
-		final Object[] result = new Object[1];
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				result[0] = innerObservableValue.getValue();
-			}
-		});
-		return result[0];
+		ObservableTracker.setIgnore(true);
+		try {
+			return innerObservableValue.getValue();
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	public Object getValueType() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/.settings/org.moreunit.prefs b/eclipse/plugins/org.eclipse.core.databinding.property/.settings/org.moreunit.prefs
new file mode 100644
index 0000000..28e5d12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/.settings/org.moreunit.prefs
@@ -0,0 +1,5 @@
+#Tue Feb 02 23:24:09 MST 2010
+eclipse.preferences.version=1
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.core.databinding.property\:src\:org.eclipse.jface.tests.databinding\:src
+org.moreunit.useprojectsettings=true
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
index dfe1701..c2b26cc 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding.property
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -17,7 +17,7 @@ Export-Package: org.eclipse.core.databinding.property,
  org.eclipse.core.internal.databinding.property.set;x-internal:=true,
  org.eclipse.core.internal.databinding.property.value;x-internal:=true
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.databinding.observable;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)"
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
  J2SE-1.4
 Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/DelegatingListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/DelegatingListProperty.java
index a61e9f6..103ab46 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/DelegatingListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/DelegatingListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,6 +71,18 @@ public abstract class DelegatingListProperty extends ListProperty {
 		return elementType;
 	}
 
+	protected List doGetList(Object source) {
+		return getDelegate(source).getList(source);
+	}
+
+	protected void doSetList(Object source, List list) {
+		getDelegate(source).setList(source, list);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		getDelegate(source).updateList(source, diff);
+	}
+
 	public IObservableList observe(Object source) {
 		return getDelegate(source).observe(source);
 	}
@@ -91,6 +103,12 @@ public abstract class DelegatingListProperty extends ListProperty {
 		protected void doSetList(Object source, List list, ListDiff diff) {
 		}
 
+		protected void doSetList(Object source, List list) {
+		}
+
+		protected void doUpdateList(Object source, ListDiff diff) {
+		}
+
 		public INativePropertyListener adaptListener(
 				ISimplePropertyListener listener) {
 			return null;
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/IListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/IListProperty.java
index 8558b1a..7dc79b5 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/IListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/IListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,11 @@
 
 package org.eclipse.core.databinding.property.list;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.IProperty;
@@ -42,6 +45,53 @@ public interface IListProperty extends IProperty {
 	public Object getElementType();
 
 	/**
+	 * Returns an unmodifiable List with the current contents of the source's
+	 * list property
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @return an unmodifiable List with the current contents of the source's
+	 *         list property
+	 * @since 1.3
+	 */
+	public List getList(Object source);
+
+	/**
+	 * Updates the property on the source with the specified change
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableList} than through the property directly.
+	 * </p>
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param list
+	 *            the new list
+	 * @since 1.3
+	 */
+	public void setList(Object source, List list);
+
+	/**
+	 * Updates the property on the source with the specified change
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableList} than through the property directly.
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 */
+	public void updateList(Object source, ListDiff diff);
+
+	/**
 	 * Returns an observable list observing this list property on the given
 	 * property source
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
index ab8d776..139a093 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/ListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,15 @@
 
 package org.eclipse.core.databinding.property.list;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -27,6 +33,84 @@ import org.eclipse.core.internal.databinding.property.ListPropertyDetailValuesLi
  * @since 1.2
  */
 public abstract class ListProperty implements IListProperty {
+	/**
+	 * @since 1.3
+	 */
+	public final List getList(Object source) {
+		if (source == null) {
+			return Collections.EMPTY_LIST;
+		}
+		return Collections.unmodifiableList(doGetList(source));
+	}
+
+	/**
+	 * Returns a List with the current contents of the source's list property
+	 * 
+	 * @param source
+	 *            the property source
+	 * @return a List with the current contents of the source's list property
+	 * @noreference This method is not intended to be referenced by clients.
+	 * @since 1.3
+	 */
+	protected List doGetList(Object source) {
+		IObservableList observable = observe(source);
+		try {
+			return new ArrayList(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void setList(Object source, List list) {
+		if (source != null) {
+			doSetList(source, list);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param list
+	 *            the new list
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doSetList(Object source, List list) {
+		doUpdateList(source, Diffs.computeListDiff(doGetList(source), list));
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void updateList(Object source, ListDiff diff) {
+		if (source != null) {
+			doUpdateList(source, diff);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 */
+	protected void doUpdateList(Object source, ListDiff diff) {
+		IObservableList observable = observe(source);
+		try {
+			diff.applyTo(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
 	public IObservableList observe(Object source) {
 		return observe(Realm.getDefault(), source);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/MultiListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/MultiListProperty.java
index 0d346c3..2a488d9 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/MultiListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/MultiListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,15 @@
 
 package org.eclipse.core.databinding.property.list;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
+import org.eclipse.core.databinding.observable.list.ListDiffEntry;
+import org.eclipse.core.databinding.observable.list.ListDiffVisitor;
 import org.eclipse.core.databinding.observable.list.MultiList;
 import org.eclipse.core.internal.databinding.property.PropertyObservableUtil;
 
@@ -55,6 +62,65 @@ public class MultiListProperty extends ListProperty {
 		return elementType;
 	}
 
+	protected List doGetList(Object source) {
+		List list = new ArrayList();
+		for (int i = 0; i < properties.length; i++)
+			list.addAll(properties[i].getList(source));
+		return list;
+	}
+
+	protected void doUpdateList(final Object source, ListDiff diff) {
+		diff.accept(new ListDiffVisitor() {
+			public void handleAdd(int index, Object element) {
+				throw new UnsupportedOperationException();
+			}
+
+			public void handleMove(int oldIndex, int newIndex, Object element) {
+				throw new UnsupportedOperationException();
+			}
+
+			public void handleReplace(int index, Object oldElement,
+					Object newElement) {
+				int offset = 0;
+				for (int i = 0; i < properties.length; i++) {
+					List subList = properties[i].getList(source);
+					if (index - offset < subList.size()) {
+						int subListIndex = index - offset;
+						ListDiffEntry[] entries = new ListDiffEntry[] {
+								Diffs.createListDiffEntry(subListIndex, false,
+										oldElement),
+								Diffs.createListDiffEntry(subListIndex, true,
+										newElement) };
+						ListDiff diff = Diffs.createListDiff(entries);
+						properties[i].updateList(source, diff);
+						return;
+					}
+					offset += subList.size();
+				}
+				throw new IndexOutOfBoundsException("index: " + index //$NON-NLS-1$
+						+ ", size: " + offset); //$NON-NLS-1$
+			}
+
+			public void handleRemove(int index, Object element) {
+				int offset = 0;
+				for (int i = 0; i < properties.length; i++) {
+					List subList = properties[i].getList(source);
+					int subListIndex = index - offset;
+					if (subListIndex < subList.size()) {
+						ListDiff diff = Diffs.createListDiff(Diffs
+								.createListDiffEntry(subListIndex, false,
+										element));
+						properties[i].updateList(source, diff);
+						return;
+					}
+					offset += subList.size();
+				}
+				throw new IndexOutOfBoundsException("index: " + index //$NON-NLS-1$
+						+ ", size: " + offset); //$NON-NLS-1$
+			}
+		});
+	}
+
 	public IObservableList observe(Realm realm, Object source) {
 		IObservableList[] lists = new IObservableList[properties.length];
 		for (int i = 0; i < lists.length; i++)
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/SimpleListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/SimpleListProperty.java
index 482fff3..7cbece0 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/SimpleListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/list/SimpleListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,15 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bugs 195222, 247997, 265561
+ *     Ovidio Mallo - bug 301774
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.list;
 
-import java.util.Collections;
+import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
 import org.eclipse.core.databinding.observable.list.ListDiff;
@@ -47,30 +49,6 @@ public abstract class SimpleListProperty extends ListProperty {
 
 	// Accessors
 
-	/**
-	 * Returns an unmodifiable List with the current contents of the source's
-	 * list property
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return an unmodifiable List with the current contents of the source's
-	 *         list property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public final List getList(Object source) {
-		if (source == null)
-			return Collections.EMPTY_LIST;
-		return Collections.unmodifiableList(doGetList(source));
-	}
-
-	/**
-	 * Returns a List with the current contents of the source's list property
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return a List with the current contents of the source's list property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
 	protected abstract List doGetList(Object source);
 
 	// Mutators
@@ -87,8 +65,9 @@ public abstract class SimpleListProperty extends ListProperty {
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public final void setList(Object source, List list, ListDiff diff) {
-		if (source != null && !diff.isEmpty())
+		if (source != null && !diff.isEmpty()) {
 			doSetList(source, list, diff);
+		}
 	}
 
 	/**
@@ -104,6 +83,17 @@ public abstract class SimpleListProperty extends ListProperty {
 	 */
 	protected abstract void doSetList(Object source, List list, ListDiff diff);
 
+	protected void doSetList(Object source, List list) {
+		ListDiff diff = Diffs.computeLazyListDiff(doGetList(source), list);
+		doSetList(source, list, diff);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		List list = new ArrayList(doGetList(source));
+		diff.applyTo(list);
+		doSetList(source, list, diff);
+	}
+
 	/**
 	 * Returns a listener capable of adding or removing itself as a listener on
 	 * a source object using the the source's "native" listener API. Events
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/DelegatingMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/DelegatingMapProperty.java
index c92274b..dc338f6 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/DelegatingMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/DelegatingMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,6 +76,18 @@ public abstract class DelegatingMapProperty extends MapProperty {
 		return valueType;
 	}
 
+	protected Map doGetMap(Object source) {
+		return getDelegate(source).getMap(source);
+	}
+
+	protected void doSetMap(Object source, Map map) {
+		getDelegate(source).setMap(source, map);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		getDelegate(source).updateMap(source, diff);
+	}
+
 	public IObservableMap observe(Object source) {
 		return getDelegate(source).observe(source);
 	}
@@ -92,6 +104,12 @@ public abstract class DelegatingMapProperty extends MapProperty {
 		protected void doSetMap(Object source, Map map, MapDiff diff) {
 		}
 
+		protected void doSetMap(Object source, Map map) {
+		}
+
+		protected void doUpdateMap(Object source, MapDiff diff) {
+		}
+
 		public INativePropertyListener adaptListener(
 				ISimplePropertyListener listener) {
 			return null;
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/IMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/IMapProperty.java
index f0ec0aa..018cbac 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/IMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/IMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,11 @@
 
 package org.eclipse.core.databinding.property.map;
 
+import java.util.Map;
+
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.IProperty;
@@ -51,6 +54,53 @@ public interface IMapProperty extends IProperty {
 	public Object getValueType();
 
 	/**
+	 * Returns an unmodifiable Map with the current contents of the source's map
+	 * property.
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @return a Map with the current contents of the source's map property
+	 * @since 1.3
+	 */
+	public Map getMap(Object source);
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableMap} than through the property directly.
+	 * </p>
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param map
+	 *            the new map
+	 * @since 1.3
+	 */
+	public void setMap(Object source, Map map);
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableMap} than through the property directly.
+	 * </p>
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 */
+	public void updateMap(Object source, MapDiff diff);
+
+	/**
 	 * Returns an observable map observing this map property on the given
 	 * property source
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
index 2d39dbb..70fcd95 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/MapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,19 @@
 
 package org.eclipse.core.databinding.property.map;
 
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.core.internal.databinding.identity.IdentityMap;
 import org.eclipse.core.internal.databinding.property.MapPropertyDetailValuesMap;
 
 /**
@@ -27,6 +33,86 @@ import org.eclipse.core.internal.databinding.property.MapPropertyDetailValuesMap
  * @since 1.2
  */
 public abstract class MapProperty implements IMapProperty {
+	/**
+	 * @since 1.3
+	 */
+	public final Map getMap(Object source) {
+		if (source == null) {
+			return Collections.EMPTY_MAP;
+		}
+		return Collections.unmodifiableMap(doGetMap(source));
+	}
+
+	/**
+	 * Returns a Map with the current contents of the source's map property
+	 * 
+	 * @param source
+	 *            the property source
+	 * @return a Map with the current contents of the source's map property
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected Map doGetMap(Object source) {
+		IObservableMap observable = observe(source);
+		try {
+			return new IdentityMap(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void setMap(Object source, Map map) {
+		if (source != null) {
+			doSetMap(source, map);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param map
+	 *            the new map
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doSetMap(Object source, Map map) {
+		MapDiff diff = Diffs.computeMapDiff(doGetMap(source), map);
+		doUpdateMap(source, diff);
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void updateMap(Object source, MapDiff diff) {
+		if (source != null) {
+			doUpdateMap(source, diff);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		IObservableMap observable = observe(source);
+		try {
+			diff.applyTo(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
 	public IObservableMap observe(Object source) {
 		return observe(Realm.getDefault(), source);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java
index 6d858f5..d0ab799 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/map/SimpleMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,15 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation
  *     Matthew Hall - bugs 195222, 247997, 265561
+ *     Ovidio Mallo - bug 301774
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.map;
 
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
 import org.eclipse.core.databinding.observable.map.MapDiff;
@@ -48,29 +50,6 @@ public abstract class SimpleMapProperty extends MapProperty {
 
 	// Accessors
 
-	/**
-	 * Returns an unmodifiable Map with the current contents of the source's map
-	 * property.
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return a Map with the current contents of the source's map property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public final Map getMap(Object source) {
-		if (source == null)
-			return Collections.EMPTY_MAP;
-		return Collections.unmodifiableMap(doGetMap(source));
-	}
-
-	/**
-	 * Returns a Map with the current contents of the source's map property
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return a Map with the current contents of the source's map property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
 	protected abstract Map doGetMap(Object source);
 
 	// Mutators
@@ -104,6 +83,17 @@ public abstract class SimpleMapProperty extends MapProperty {
 	 */
 	protected abstract void doSetMap(Object source, Map map, MapDiff diff);
 
+	protected void doSetMap(Object source, Map map) {
+		MapDiff diff = Diffs.computeLazyMapDiff(doGetMap(source), map);
+		doSetMap(source, map, diff);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		Map map = new HashMap(doGetMap(source));
+		diff.applyTo(map);
+		doSetMap(source, map, diff);
+	}
+
 	// Listeners
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/DelegatingSetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/DelegatingSetProperty.java
index 4f8b957..d65d5bb 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/DelegatingSetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/DelegatingSetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,6 +70,18 @@ public abstract class DelegatingSetProperty extends SetProperty {
 		return elementType;
 	}
 
+	protected Set doGetSet(Object source) {
+		return getDelegate(source).getSet(source);
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		getDelegate(source).setSet(source, set);
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		getDelegate(source).updateSet(source, diff);
+	}
+
 	public IObservableSet observe(Object source) {
 		return getDelegate(source).observe(source);
 	}
@@ -90,6 +102,12 @@ public abstract class DelegatingSetProperty extends SetProperty {
 		protected void doSetSet(Object source, Set set, SetDiff diff) {
 		}
 
+		protected void doSetSet(Object source, Set set) {
+		}
+
+		protected void doUpdateSet(Object source, SetDiff diff) {
+		}
+
 		public INativePropertyListener adaptListener(
 				ISimplePropertyListener listener) {
 			return null;
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/ISetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/ISetProperty.java
index 7214868..fc593f2 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/ISetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/ISetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,13 @@
 
 package org.eclipse.core.databinding.property.set;
 
+import java.util.Set;
+
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.IProperty;
 import org.eclipse.core.databinding.property.map.IMapProperty;
@@ -44,6 +47,54 @@ public interface ISetProperty extends IProperty {
 	public Object getElementType();
 
 	/**
+	 * Returns an unmodifiable Set with the current contents of the source's set
+	 * property
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @return an unmodifiable Set with the current contents of the source's set
+	 *         property
+	 * @since 1.3
+	 */
+	public Set getSet(Object source);
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableSet} than through the property directly.
+	 * </p>
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param set
+	 *            the new set
+	 * @since 1.3
+	 */
+	public void setSet(Object source, Set set);
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to modify the source
+	 * through an {@link IObservableSet} than through the property directly.
+	 * </p>
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 */
+	public void updateSet(Object source, SetDiff diff);
+
+	/**
 	 * Returns an observable set observing this set property on the given
 	 * property source
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
index e7769e2..8b213ec 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,20 @@
 
 package org.eclipse.core.databinding.property.set;
 
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
 import org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
 import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.core.internal.databinding.identity.IdentitySet;
 import org.eclipse.core.internal.databinding.property.SetPropertyDetailValuesMap;
 
 /**
@@ -28,6 +34,85 @@ import org.eclipse.core.internal.databinding.property.SetPropertyDetailValuesMap
  * @since 1.2
  */
 public abstract class SetProperty implements ISetProperty {
+	/**
+	 * @since 1.3
+	 */
+	public final Set getSet(Object source) {
+		if (source == null) {
+			return Collections.EMPTY_SET;
+		}
+		return Collections.unmodifiableSet(doGetSet(source));
+	}
+
+	/**
+	 * Returns a Set with the current contents of the source's set property
+	 * 
+	 * @param source
+	 *            the property source
+	 * @return a Set with the current contents of the source's set property
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected Set doGetSet(Object source) {
+		IObservableSet observable = observe(source);
+		try {
+			return new IdentitySet(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void setSet(Object source, Set set) {
+		if (source != null) {
+			doSetSet(source, set);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param set
+	 *            the new set
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doSetSet(Object source, Set set) {
+		doUpdateSet(source, Diffs.computeSetDiff(doGetSet(source), set));
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void updateSet(Object source, SetDiff diff) {
+		if (source != null && !diff.isEmpty()) {
+			doUpdateSet(source, diff);
+		}
+	}
+
+	/**
+	 * Updates the property on the source with the specified change.
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param diff
+	 *            a diff describing the change
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		IObservableSet observable = observe(source);
+		try {
+			diff.applyTo(observable);
+		} finally {
+			observable.dispose();
+		}
+	}
+
 	public IObservableSet observe(Object source) {
 		return observe(Realm.getDefault(), source);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java
index f03ac4f..85273c7 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/SimpleSetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,15 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation
  *     Matthew Hall - bugs 195222, 247997, 265561
+ *     Ovidio Mallo - bug 301774
  ******************************************************************************/
 
 package org.eclipse.core.databinding.property.set;
 
-import java.util.Collections;
+import java.util.HashSet;
 import java.util.Set;
 
+import org.eclipse.core.databinding.observable.Diffs;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.set.SetDiff;
@@ -47,30 +49,6 @@ public abstract class SimpleSetProperty extends SetProperty {
 
 	// Accessors
 
-	/**
-	 * Returns a Set with the current contents of the source's set property
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return a Set with the current contents of the source's set property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public final Set getSet(Object source) {
-		if (source == null)
-			return Collections.EMPTY_SET;
-		return Collections.unmodifiableSet(doGetSet(source));
-	}
-
-	/**
-	 * Returns an unmodifiable Set with the current contents of the source's set
-	 * property
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return an unmodifiable Set with the current contents of the source's set
-	 *         property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
 	protected abstract Set doGetSet(Object source);
 
 	// Mutators
@@ -104,6 +82,17 @@ public abstract class SimpleSetProperty extends SetProperty {
 	 */
 	protected abstract void doSetSet(Object source, Set set, SetDiff diff);
 
+	protected void doSetSet(Object source, Set set) {
+		SetDiff diff = Diffs.computeLazySetDiff(doGetSet(source), set);
+		doSetSet(source, set, diff);
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		Set set = new HashSet(doGetSet(source));
+		diff.applyTo(set);
+		doSetSet(source, set, diff);
+	}
+
 	// Listeners
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/UnionSetProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/UnionSetProperty.java
index d357c58..3c384cc 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/UnionSetProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/set/UnionSetProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,12 @@
 
 package org.eclipse.core.databinding.property.set;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.set.UnionSet;
 import org.eclipse.core.internal.databinding.property.PropertyObservableUtil;
 
@@ -46,6 +50,23 @@ public class UnionSetProperty extends SetProperty {
 		return elementType;
 	}
 
+	protected Set doGetSet(Object source) {
+		Set set = new HashSet();
+		for (int i = 0; i < properties.length; i++)
+			set.addAll(properties[i].getSet(source));
+		return set;
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		throw new UnsupportedOperationException(
+				"UnionSetProperty is unmodifiable"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		throw new UnsupportedOperationException(
+				"UnionSetProperty is unmodifiable"); //$NON-NLS-1$
+	}
+
 	public IObservableSet observe(Realm realm, Object source) {
 		IObservableSet[] sets = new IObservableSet[properties.length];
 		for (int i = 0; i < sets.length; i++)
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/DelegatingValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/DelegatingValueProperty.java
index 93be067..3dac917 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/DelegatingValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/DelegatingValueProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,6 +68,14 @@ public abstract class DelegatingValueProperty extends ValueProperty {
 	 */
 	protected abstract IValueProperty doGetDelegate(Object source);
 
+	protected Object doGetValue(Object source) {
+		return getDelegate(source).getValue(source);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		getDelegate(source).setValue(source, value);
+	}
+
 	public Object getValueType() {
 		return valueType;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/IValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/IValueProperty.java
index a59bc4b..162ccb7 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/IValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/IValueProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,36 @@ public interface IValueProperty extends IProperty {
 	public Object getValueType();
 
 	/**
+	 * Returns the current value of this property on the specified property
+	 * source.
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @return the current value of this property on the specified property
+	 *         source.
+	 * @since 1.3
+	 */
+	public Object getValue(Object source);
+
+	/**
+	 * Sets this property on the specified property source to the specified
+	 * value.
+	 * <p>
+	 * <b>Note:</b> This method is made available to facilitate basic property
+	 * access. However if the property source lacks property change
+	 * notification, then observables on the source object may not be notified
+	 * of the change. In most cases it is preferable to call
+	 * {@link IObservableValue#setValue(Object)} on the observable instead.
+	 * 
+	 * @param source
+	 *            the property source (may be null)
+	 * @param value
+	 *            the new property value
+	 * @since 1.3
+	 */
+	public void setValue(Object source, Object value);
+
+	/**
 	 * Returns an observable value observing this value property on the given
 	 * property source.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java
index 373512c..9293c85 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/SimpleValueProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,42 +43,8 @@ import org.eclipse.core.internal.databinding.property.value.SimplePropertyObserv
  * @since 1.2
  */
 public abstract class SimpleValueProperty extends ValueProperty {
-	/**
-	 * Returns the value of the property on the specified source object
-	 * 
-	 * @param source
-	 *            the property source (may be null)
-	 * @return the current value of the source's value property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public final Object getValue(Object source) {
-		return source == null ? null : doGetValue(source);
-	}
-
-	/**
-	 * Returns the value of the property on the specified source object
-	 * 
-	 * @param source
-	 *            the property source
-	 * @return the current value of the source's value property
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
 	protected abstract Object doGetValue(Object source);
 
-	/**
-	 * Sets the source's value property to the specified value
-	 * 
-	 * @param source
-	 *            the property source
-	 * @param value
-	 *            the new value
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public final void setValue(Object source, Object value) {
-		if (source != null)
-			doSetValue(source, value);
-	}
-
 	protected abstract void doSetValue(Object source, Object value);
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
index 318592c..d726668 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/databinding/property/value/ValueProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,62 @@ import org.eclipse.core.internal.databinding.property.ValuePropertyDetailValue;
  * @since 1.2
  */
 public abstract class ValueProperty implements IValueProperty {
+	/**
+	 * @since 1.3
+	 */
+	public final Object getValue(Object source) {
+		if (source == null) {
+			return null;
+		}
+		return doGetValue(source);
+	}
+
+	/**
+	 * Returns the value of the property on the specified source object
+	 * 
+	 * @param source
+	 *            the property source
+	 * @return the current value of the source's value property
+	 * @noreference This method is not intended to be referenced by clients.
+	 * @since 1.3
+	 */
+	protected Object doGetValue(Object source) {
+		IObservableValue observable = observe(source);
+		try {
+			return observable.getValue();
+		} finally {
+			observable.dispose();
+		}
+	}
+
+	/**
+	 * @since 1.3
+	 */
+	public final void setValue(Object source, Object value) {
+		if (source != null) {
+			doSetValue(source, value);
+		}
+	}
+
+	/**
+	 * Sets the source's value property to the specified vlaue
+	 * 
+	 * @param source
+	 *            the property source
+	 * @param value
+	 *            the new value
+	 * @since 1.3
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void doSetValue(Object source, Object value) {
+		IObservableValue observable = observe(source);
+		try {
+			observable.setValue(value);
+		} finally {
+			observable.dispose();
+		}
+	}
+
 	public IObservableValue observe(Object source) {
 		return observe(Realm.getDefault(), source);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ListPropertyDetailValuesList.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ListPropertyDetailValuesList.java
index 4bfa94f..15928f3 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ListPropertyDetailValuesList.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ListPropertyDetailValuesList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,15 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
+import org.eclipse.core.databinding.observable.list.ListDiffVisitor;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.list.ListProperty;
@@ -42,32 +48,63 @@ public class ListPropertyDetailValuesList extends ListProperty {
 		return detailProperty.getValueType();
 	}
 
-	public IObservableList observe(final Realm realm, final Object source) {
-		final IObservableList[] masterList = new IObservableList[1];
+	protected List doGetList(Object source) {
+		List masterList = masterProperty.getList(source);
+		List detailList = new ArrayList(masterList.size());
+		for (Iterator it = masterList.iterator(); it.hasNext();)
+			detailList.add(detailProperty.getValue(it.next()));
+		return detailList;
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		final List masterList = masterProperty.getList(source);
+		diff.accept(new ListDiffVisitor() {
+			public void handleAdd(int index, Object element) {
+				throw new UnsupportedOperationException();
+			}
+
+			public void handleRemove(int index, Object element) {
+				throw new UnsupportedOperationException();
+			}
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterList[0] = masterProperty.observe(realm, source);
+			public void handleMove(int oldIndex, int newIndex, Object element) {
+				throw new UnsupportedOperationException();
+			}
+
+			public void handleReplace(int index, Object oldElement,
+					Object newElement) {
+				detailProperty.setValue(masterList.get(index), newElement);
 			}
 		});
+	}
+
+	public IObservableList observe(Realm realm, Object source) {
+		IObservableList masterList;
+
+		ObservableTracker.setIgnore(true);
+		try {
+			masterList = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableList detailList = detailProperty
-				.observeDetail(masterList[0]);
-		PropertyObservableUtil.cascadeDispose(detailList, masterList[0]);
+		IObservableList detailList = detailProperty.observeDetail(masterList);
+		PropertyObservableUtil.cascadeDispose(detailList, masterList);
 		return detailList;
 	}
 
-	public IObservableList observeDetail(final IObservableValue master) {
-		final IObservableList[] masterList = new IObservableList[1];
+	public IObservableList observeDetail(IObservableValue master) {
+		IObservableList masterList;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterList[0] = masterProperty.observeDetail(master);
-			}
-		});
-		IObservableList detailList = detailProperty
-				.observeDetail(masterList[0]);
-		PropertyObservableUtil.cascadeDispose(detailList, masterList[0]);
+		ObservableTracker.setIgnore(true);
+		try {
+			masterList = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
+
+		IObservableList detailList = detailProperty.observeDetail(masterList);
+		PropertyObservableUtil.cascadeDispose(detailList, masterList);
 		return detailList;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/MapPropertyDetailValuesMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/MapPropertyDetailValuesMap.java
index 9e5f62c..1d69985 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/MapPropertyDetailValuesMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/MapPropertyDetailValuesMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,18 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.Iterator;
+import java.util.Map;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
 import org.eclipse.core.databinding.property.map.MapProperty;
 import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.core.internal.databinding.identity.IdentityMap;
 
 /**
  * @since 3.3
@@ -46,31 +51,59 @@ public class MapPropertyDetailValuesMap extends MapProperty {
 		return detailProperty.getValueType();
 	}
 
-	public IObservableMap observe(final Realm realm, final Object source) {
-		final IObservableMap[] masterMap = new IObservableMap[1];
+	protected Map doGetMap(Object source) {
+		Map masterMap = masterProperty.getMap(source);
+		Map detailMap = new IdentityMap();
+		for (Iterator it = masterMap.entrySet().iterator(); it.hasNext();) {
+			Map.Entry entry = (Map.Entry) it.next();
+			detailMap.put(entry.getKey(), detailProperty.getValue(entry
+					.getValue()));
+		}
+		return detailMap;
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		if (!diff.getAddedKeys().isEmpty())
+			throw new UnsupportedOperationException(toString()
+					+ " does not support entry additions"); //$NON-NLS-1$
+		if (!diff.getRemovedKeys().isEmpty())
+			throw new UnsupportedOperationException(toString()
+					+ " does not support entry removals"); //$NON-NLS-1$
+		Map masterMap = masterProperty.getMap(source);
+		for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
+			Object key = it.next();
+			Object masterValue = masterMap.get(key);
+			detailProperty.setValue(masterValue, diff.getNewValue(key));
+		}
+	}
+
+	public IObservableMap observe(Realm realm, Object source) {
+		IObservableMap masterMap;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterMap[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterMap = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterMap[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterMap[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterMap);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterMap);
 		return detailMap;
 	}
 
-	public IObservableMap observeDetail(final IObservableValue master) {
-		final IObservableMap[] masterMap = new IObservableMap[1];
+	public IObservableMap observeDetail(IObservableValue master) {
+		IObservableMap masterMap;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterMap[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterMap = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterMap[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterMap[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterMap);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterMap);
 		return detailMap;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/SetPropertyDetailValuesMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/SetPropertyDetailValuesMap.java
index 1490922..98308c4 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/SetPropertyDetailValuesMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/SetPropertyDetailValuesMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,20 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.MapProperty;
 import org.eclipse.core.databinding.property.set.ISetProperty;
 import org.eclipse.core.databinding.property.value.IValueProperty;
+import org.eclipse.core.internal.databinding.identity.IdentityMap;
 
 /**
  * @since 3.3
@@ -47,31 +53,57 @@ public class SetPropertyDetailValuesMap extends MapProperty {
 		return detailProperty.getValueType();
 	}
 
-	public IObservableMap observe(final Realm realm, final Object source) {
-		final IObservableSet[] masterSet = new IObservableSet[1];
+	protected Map doGetMap(Object source) {
+		Set set = masterProperty.getSet(source);
+		Map map = new IdentityMap();
+		for (Iterator it = set.iterator(); it.hasNext();) {
+			Object key = it.next();
+			map.put(key, detailProperty.getValue(key));
+		}
+		return map;
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		if (!diff.getAddedKeys().isEmpty())
+			throw new UnsupportedOperationException(toString()
+					+ " does not support entry additions"); //$NON-NLS-1$
+		if (!diff.getRemovedKeys().isEmpty())
+			throw new UnsupportedOperationException(toString()
+					+ " does not support entry removals"); //$NON-NLS-1$
+		for (Iterator it = diff.getChangedKeys().iterator(); it.hasNext();) {
+			Object key = it.next();
+			Object newValue = diff.getNewValue(key);
+			detailProperty.setValue(key, newValue);
+		}
+	}
+
+	public IObservableMap observe(Realm realm, Object source) {
+		IObservableSet masterSet;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterSet[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterSet = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterSet[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterSet[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterSet);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterSet);
 		return detailMap;
 	}
 
-	public IObservableMap observeDetail(final IObservableValue master) {
-		final IObservableSet[] masterSet = new IObservableSet[1];
+	public IObservableMap observeDetail(IObservableValue master) {
+		IObservableSet masterSet;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterSet[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterSet = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterSet[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterSet[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterSet);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterSet);
 		return detailMap;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailList.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailList.java
index 221f710..095edf4 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailList.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,12 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.list.IListProperty;
 import org.eclipse.core.databinding.property.list.ListProperty;
@@ -42,33 +45,48 @@ public class ValuePropertyDetailList extends ListProperty {
 		return detailProperty.getElementType();
 	}
 
-	public IObservableList observe(final Realm realm, final Object source) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	protected List doGetList(Object source) {
+		Object masterValue = masterProperty.getValue(source);
+		return detailProperty.getList(masterValue);
+	}
+
+	protected void doSetList(Object source, List list) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.setList(masterValue, list);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.updateList(masterValue, diff);
+	}
+
+	public IObservableList observe(Realm realm, Object source) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableList detailList = detailProperty
-				.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailList, masterValue[0]);
+		IObservableList detailList = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailList, masterValue);
 		return detailList;
 	}
 
-	public IObservableList observeDetail(final IObservableValue master) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	public IObservableList observeDetail(IObservableValue master) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableList detailList = detailProperty
-				.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailList, masterValue[0]);
+		IObservableList detailList = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailList, masterValue);
 		return detailList;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailMap.java
index 17aeaa3..1abdcec 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,12 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.Map;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.map.IObservableMap;
+import org.eclipse.core.databinding.observable.map.MapDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.map.IMapProperty;
 import org.eclipse.core.databinding.property.map.MapProperty;
@@ -46,31 +49,48 @@ public class ValuePropertyDetailMap extends MapProperty {
 		return detailProperty.getValueType();
 	}
 
-	public IObservableMap observe(final Realm realm, final Object source) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	protected Map doGetMap(Object source) {
+		Object masterValue = masterProperty.getValue(source);
+		return detailProperty.getMap(masterValue);
+	}
+
+	protected void doSetMap(Object source, Map map) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.setMap(masterValue, map);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.updateMap(masterValue, diff);
+	}
+
+	public IObservableMap observe(Realm realm, Object source) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterValue[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterValue);
 		return detailMap;
 	}
 
-	public IObservableMap observeDetail(final IObservableValue master) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	public IObservableMap observeDetail(IObservableValue master) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterValue[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterValue);
 		return detailMap;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailSet.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailSet.java
index 4c00039..6e363fa 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailSet.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,12 @@
 
 package org.eclipse.core.internal.databinding.property;
 
+import java.util.Set;
+
 import org.eclipse.core.databinding.observable.ObservableTracker;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.set.ISetProperty;
 import org.eclipse.core.databinding.property.set.SetProperty;
@@ -42,31 +45,48 @@ public class ValuePropertyDetailSet extends SetProperty {
 		return detailProperty.getElementType();
 	}
 
-	public IObservableSet observe(final Realm realm, final Object source) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	protected Set doGetSet(Object source) {
+		Object masterValue = masterProperty.getValue(source);
+		return detailProperty.getSet(masterValue);
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.setSet(masterValue, set);
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.updateSet(masterValue, diff);
+	}
+
+	public IObservableSet observe(Realm realm, Object source) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableSet detailSet = detailProperty.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailSet, masterValue[0]);
+		IObservableSet detailSet = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailSet, masterValue);
 		return detailSet;
 	}
 
-	public IObservableSet observeDetail(final IObservableValue master) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	public IObservableSet observeDetail(IObservableValue master) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableSet detailSet = detailProperty.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailSet, masterValue[0]);
+		IObservableSet detailSet = detailProperty.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailSet, masterValue);
 		return detailSet;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailValue.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailValue.java
index fdd370f..27cf02c 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailValue.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/ValuePropertyDetailValue.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,76 +44,90 @@ public class ValuePropertyDetailValue extends ValueProperty implements
 		return detailProperty.getValueType();
 	}
 
-	public IObservableValue observe(final Realm realm, final Object source) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	protected Object doGetValue(Object source) {
+		Object masterValue = masterProperty.getValue(source);
+		return detailProperty.getValue(masterValue);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		Object masterValue = masterProperty.getValue(source);
+		detailProperty.setValue(masterValue, value);
+	}
+
+	public IObservableValue observe(Realm realm, Object source) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observe(realm, source);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observe(realm, source);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		IObservableValue detailValue = detailProperty
-				.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailValue, masterValue[0]);
+				.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailValue, masterValue);
 		return detailValue;
 	}
 
-	public IObservableValue observeDetail(final IObservableValue master) {
-		final IObservableValue[] masterValue = new IObservableValue[1];
+	public IObservableValue observeDetail(IObservableValue master) {
+		IObservableValue masterValue;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterValue[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterValue = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		IObservableValue detailValue = detailProperty
-				.observeDetail(masterValue[0]);
-		PropertyObservableUtil.cascadeDispose(detailValue, masterValue[0]);
+				.observeDetail(masterValue);
+		PropertyObservableUtil.cascadeDispose(detailValue, masterValue);
 		return detailValue;
 	}
 
-	public IObservableList observeDetail(final IObservableList master) {
-		final IObservableList[] masterList = new IObservableList[1];
+	public IObservableList observeDetail(IObservableList master) {
+		IObservableList masterList;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterList[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterList = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableList detailList = detailProperty
-				.observeDetail(masterList[0]);
-		PropertyObservableUtil.cascadeDispose(detailList, masterList[0]);
+		IObservableList detailList = detailProperty.observeDetail(masterList);
+		PropertyObservableUtil.cascadeDispose(detailList, masterList);
 		return detailList;
 	}
 
-	public IObservableMap observeDetail(final IObservableSet master) {
-		final IObservableMap[] masterMap = new IObservableMap[1];
+	public IObservableMap observeDetail(IObservableSet master) {
+		IObservableMap masterMap;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterMap[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterMap = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterMap[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterMap[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterMap);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterMap);
 		return detailMap;
 	}
 
-	public IObservableMap observeDetail(final IObservableMap master) {
-		final IObservableMap[] masterMap = new IObservableMap[1];
+	public IObservableMap observeDetail(IObservableMap master) {
+		IObservableMap masterMap;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				masterMap[0] = masterProperty.observeDetail(master);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			masterMap = masterProperty.observeDetail(master);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		IObservableMap detailMap = detailProperty.observeDetail(masterMap[0]);
-		PropertyObservableUtil.cascadeDispose(detailMap, masterMap[0]);
+		IObservableMap detailMap = detailProperty.observeDetail(masterMap);
+		PropertyObservableUtil.cascadeDispose(detailMap, masterMap);
 		return detailMap;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SelfListProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SelfListProperty.java
index e52e138..63a7137 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SelfListProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SelfListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,10 @@ public class SelfListProperty extends SimpleListProperty {
 	}
 
 	protected void doSetList(Object source, List list, ListDiff diff) {
+		doUpdateList(source, diff);
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
 		diff.applyTo((List) source);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SimplePropertyObservableList.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SimplePropertyObservableList.java
index 9dd3512..609ab05 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SimplePropertyObservableList.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/list/SimplePropertyObservableList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 265561, 262287, 268203, 268688
+ *     Matthew Hall - bugs 265561, 262287, 268203, 268688, 301774
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.list;
@@ -168,28 +168,44 @@ public class SimplePropertyObservableList extends AbstractObservableList
 
 	// Single change operations
 
+	private void updateList(List list, ListDiff diff) {
+		if (!diff.isEmpty()) {
+			boolean wasUpdating = updating;
+			updating = true;
+			try {
+				property.updateList(source, diff);
+				modCount++;
+			} finally {
+				updating = wasUpdating;
+			}
+
+			notifyIfChanged(null);
+		}
+	}
+
 	public boolean add(Object o) {
 		checkRealm();
-		add(getList().size(), o);
+
+		List list = getList();
+
+		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(list
+				.size(), true, o));
+		updateList(list, diff);
+
 		return true;
 	}
 
 	public void add(int index, Object o) {
 		checkRealm();
-		boolean wasUpdating = updating;
-		updating = true;
-		List list = new ArrayList(getList());
-		list.add(index, o);
+
+		List list = getList();
+
+		if (index < 0 || index > list.size())
+			throw new IndexOutOfBoundsException();
+
 		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
 				true, o));
-		try {
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateList(list, diff);
 	}
 
 	public Iterator iterator() {
@@ -226,16 +242,7 @@ public class SimplePropertyObservableList extends AbstractObservableList
 				ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
 						lastIndex, false, lastElement));
 
-				boolean wasUpdating = updating;
-				updating = true;
-				try {
-					property.setList(source, list, diff);
-					modCount++;
-				} finally {
-					updating = wasUpdating;
-				}
-
-				notifyIfChanged(null);
+				updateList(list, diff);
 
 				lastElement = null;
 				lastIndex = -1;
@@ -262,24 +269,12 @@ public class SimplePropertyObservableList extends AbstractObservableList
 		if (oldIndex == newIndex)
 			return list.get(oldIndex);
 
-		list = new ArrayList(list);
-		Object element = list.remove(oldIndex);
-		list.add(newIndex, element);
+		Object element = list.get(oldIndex);
 
 		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
 				oldIndex, false, element), Diffs.createListDiffEntry(newIndex,
 				true, element));
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateList(list, diff);
 
 		return element;
 	}
@@ -287,11 +282,15 @@ public class SimplePropertyObservableList extends AbstractObservableList
 	public boolean remove(Object o) {
 		checkRealm();
 
-		int index = getList().indexOf(o);
+		List list = getList();
+
+		int index = list.indexOf(o);
 		if (index == -1)
 			return false;
 
-		remove(index);
+		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
+				false, o));
+		updateList(list, diff);
 
 		return true;
 	}
@@ -355,22 +354,11 @@ public class SimplePropertyObservableList extends AbstractObservableList
 				checkForComodification();
 				int index = iterator.nextIndex();
 
-				iterator.add(o); // keep in sync
-
-				List list = getList();
-				list.add(index, o);
 				ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
 						index, true, o));
-				boolean wasUpdating = updating;
-				updating = true;
-				try {
-					property.setList(source, list, diff);
-					modCount++;
-				} finally {
-					updating = wasUpdating;
-				}
+				updateList(list, diff);
 
-				notifyIfChanged(null);
+				iterator.add(o); // keep in sync
 
 				lastElement = null;
 				lastIndex = -1;
@@ -381,21 +369,12 @@ public class SimplePropertyObservableList extends AbstractObservableList
 				checkRealm();
 				checkForComodification();
 
-				iterator.set(o);
 				ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
 						lastIndex, false, lastElement), Diffs
 						.createListDiffEntry(lastIndex, true, o));
+				updateList(list, diff);
 
-				boolean wasUpdating = updating;
-				updating = true;
-				try {
-					property.setList(source, list, diff);
-					modCount++;
-				} finally {
-					updating = wasUpdating;
-				}
-
-				notifyIfChanged(null);
+				iterator.set(o);
 
 				lastElement = o;
 				expectedModCount = modCount;
@@ -407,20 +386,11 @@ public class SimplePropertyObservableList extends AbstractObservableList
 				if (lastIndex == -1)
 					throw new IllegalStateException();
 
-				iterator.remove(); // keep in sync
 				ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
 						lastIndex, false, lastElement));
+				updateList(list, diff);
 
-				boolean wasUpdating = updating;
-				updating = true;
-				try {
-					property.setList(source, list, diff);
-					modCount++;
-				} finally {
-					updating = wasUpdating;
-				}
-
-				notifyIfChanged(null);
+				iterator.remove(); // keep in sync
 
 				lastElement = null;
 				lastIndex = -1;
@@ -437,21 +407,12 @@ public class SimplePropertyObservableList extends AbstractObservableList
 	public Object remove(int index) {
 		checkRealm();
 
-		List list = new ArrayList(getList());
-		Object element = list.remove(index);
+		List list = getList();
+		Object element = list.get(index);
+
 		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
 				false, element));
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateList(list, diff);
 
 		return element;
 	}
@@ -459,22 +420,12 @@ public class SimplePropertyObservableList extends AbstractObservableList
 	public Object set(int index, Object o) {
 		checkRealm();
 
-		List list = new ArrayList(getList());
-		Object oldElement = list.set(index, o);
+		List list = getList();
+		Object oldElement = list.get(index);
 
 		ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
 				false, oldElement), Diffs.createListDiffEntry(index, true, o));
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateList(list, diff);
 
 		return oldElement;
 	}
@@ -490,7 +441,11 @@ public class SimplePropertyObservableList extends AbstractObservableList
 	public boolean addAll(Collection c) {
 		checkRealm();
 
-		return addAll(getList().size(), c);
+		if (c.isEmpty())
+			return false;
+
+		List list = getList();
+		return addAll(list, list.size(), c);
 	}
 
 	public boolean addAll(int index, Collection c) {
@@ -499,8 +454,12 @@ public class SimplePropertyObservableList extends AbstractObservableList
 		if (c.isEmpty())
 			return false;
 
-		List list = new ArrayList(getList());
-		list.addAll(index, c);
+		return addAll(getList(), index, c);
+	}
+
+	private boolean addAll(List list, int index, Collection c) {
+		if (index < 0 || index > list.size())
+			throw new IndexOutOfBoundsException();
 
 		ListDiffEntry[] entries = new ListDiffEntry[c.size()];
 		int offsetIndex = 0;
@@ -512,16 +471,7 @@ public class SimplePropertyObservableList extends AbstractObservableList
 		}
 		ListDiff diff = Diffs.createListDiff(entries);
 
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateList(list, diff);
 
 		return true;
 	}
@@ -536,36 +486,23 @@ public class SimplePropertyObservableList extends AbstractObservableList
 		if (list.isEmpty())
 			return false;
 
-		list = new ArrayList(list);
 		List entries = new ArrayList();
-		ListDiff diff;
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			for (ListIterator it = list.listIterator(); it.hasNext();) {
-				Object element = it.next();
-				int index = it.previousIndex();
-				if (c.contains(element)) {
-					it.remove();
-					entries.add(Diffs
-							.createListDiffEntry(index, false, element));
-				}
+		for (ListIterator it = list.listIterator(); it.hasNext();) {
+			int index = it.nextIndex() - entries.size();
+			Object element = it.next();
+			if (c.contains(element)) {
+				entries.add(Diffs.createListDiffEntry(index, false, element));
 			}
-			if (entries.isEmpty())
-				return false;
-
-			diff = Diffs.createListDiff((ListDiffEntry[]) entries
-					.toArray(new ListDiffEntry[entries.size()]));
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
 		}
 
-		notifyIfChanged(null);
+		if (entries.isEmpty())
+			return false;
 
-		return !diff.isEmpty();
+		ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
+				.toArray(new ListDiffEntry[entries.size()]));
+		updateList(list, diff);
+
+		return true;
 	}
 
 	public boolean retainAll(Collection c) {
@@ -580,36 +517,23 @@ public class SimplePropertyObservableList extends AbstractObservableList
 			return true;
 		}
 
-		list = new ArrayList(list);
 		List entries = new ArrayList();
-		ListDiff diff;
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			for (ListIterator it = list.listIterator(); it.hasNext();) {
-				Object element = it.next();
-				int index = it.previousIndex();
-				if (!c.contains(element)) {
-					it.remove();
-					entries.add(Diffs
-							.createListDiffEntry(index, false, element));
-				}
+		for (ListIterator it = list.listIterator(); it.hasNext();) {
+			int index = it.nextIndex() - entries.size();
+			Object element = it.next();
+			if (!c.contains(element)) {
+				entries.add(Diffs.createListDiffEntry(index, false, element));
 			}
-			if (entries.isEmpty())
-				return false;
-
-			diff = Diffs.createListDiff((ListDiffEntry[]) entries
-					.toArray(new ListDiffEntry[entries.size()]));
-			property.setList(source, list, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
 		}
 
-		notifyIfChanged(null);
+		if (entries.isEmpty())
+			return false;
+
+		ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
+				.toArray(new ListDiffEntry[entries.size()]));
+		updateList(list, diff);
 
-		return !diff.isEmpty();
+		return true;
 	}
 
 	public void clear() {
@@ -620,23 +544,16 @@ public class SimplePropertyObservableList extends AbstractObservableList
 			return;
 
 		List entries = new ArrayList();
-		for (Iterator it = list.iterator(); it.hasNext();) {
+		for (ListIterator it = list.listIterator(list.size()); it.hasPrevious();) {
 			// always report 0 as the remove index
-			entries.add(Diffs.createListDiffEntry(0, false, it.next()));
+			int index = it.previousIndex();
+			Object element = it.previous();
+			entries.add(Diffs.createListDiffEntry(index, false, element));
 		}
-
 		ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
 				.toArray(new ListDiffEntry[entries.size()]));
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setList(source, Collections.EMPTY_LIST, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
 
-		notifyIfChanged(null);
+		updateList(list, diff);
 	}
 
 	private void notifyIfChanged(ListDiff diff) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SelfMapProperty.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SelfMapProperty.java
index 82423a2..c693607 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SelfMapProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SelfMapProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,10 @@ public final class SelfMapProperty extends SimpleMapProperty {
 	}
 
 	protected void doSetMap(Object source, Map map, MapDiff diff) {
+		doUpdateMap(source, diff);
+	}
+
+	protected void doUpdateMap(Object source, MapDiff diff) {
 		diff.applyTo((Map) source);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
index 273c97b..ee1e56e 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/map/SimplePropertyObservableMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 265561, 262287, 268203, 268688
+ *     Matthew Hall - bugs 265561, 262287, 268203, 268688, 301774, 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.map;
@@ -129,6 +129,21 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 
 	// Single change operations
 
+	private void updateMap(Map map, MapDiff diff) {
+		if (!diff.isEmpty()) {
+			boolean wasUpdating = updating;
+			updating = true;
+			try {
+				property.updateMap(source, diff);
+				modCount++;
+			} finally {
+				updating = wasUpdating;
+			}
+
+			notifyIfChanged(null);
+		}
+	}
+
 	private EntrySet es = new EntrySet();
 
 	public Set entrySet() {
@@ -169,19 +184,11 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 			getterCalled();
 			checkForComodification();
 
-			iterator.remove(); // stay in sync
 			MapDiff diff = Diffs.createMapDiffSingleRemove(last.getKey(), last
 					.getValue());
+			updateMap(map, diff);
 
-			boolean wasUpdating = updating;
-			updating = true;
-			try {
-				property.setMap(source, map, diff);
-			} finally {
-				updating = wasUpdating;
-			}
-
-			notifyIfChanged(null);
+			iterator.remove(); // stay in sync
 
 			last = null;
 			expectedModCount = modCount;
@@ -200,14 +207,26 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 		return super.keySet();
 	}
 
+	public boolean containsKey(Object key) {
+		getterCalled();
+
+		return getMap().containsKey(key);
+	}
+
+	public Object get(Object key) {
+		getterCalled();
+
+		return getMap().get(key);
+	}
+
 	public Object put(Object key, Object value) {
 		checkRealm();
 
-		Map map = new HashMap(getMap());
+		Map map = getMap();
 
 		boolean add = !map.containsKey(key);
 
-		Object oldValue = map.put(key, value);
+		Object oldValue = map.get(key);
 
 		MapDiff diff;
 		if (add)
@@ -215,16 +234,7 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 		else
 			diff = Diffs.createMapDiffSingleChange(key, oldValue, value);
 
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setMap(source, map, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateMap(map, diff);
 
 		return oldValue;
 	}
@@ -232,14 +242,14 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 	public void putAll(Map m) {
 		checkRealm();
 
-		Map map = new HashMap(getMap());
+		Map map = getMap();
 
 		Map oldValues = new HashMap();
 		Map newValues = new HashMap();
 		Set changedKeys = new HashSet();
 		Set addedKeys = new HashSet();
 		for (Iterator it = m.entrySet().iterator(); it.hasNext();) {
-			Map.Entry entry = (Entry) it.next();
+			Map.Entry entry = (Map.Entry) it.next();
 			Object key = entry.getKey();
 			Object newValue = entry.getValue();
 			if (map.containsKey(key)) {
@@ -248,29 +258,27 @@ public class SimplePropertyObservableMap extends AbstractObservableMap
 			} else {
 				addedKeys.add(key);
 			}
-			map.put(key, newValue);
-
 			newValues.put(key, newValue);
 		}
 
 		MapDiff diff = Diffs.createMapDiff(addedKeys, Collections.EMPTY_SET,
 				changedKeys, oldValues, newValues);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setMap(source, map, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateMap(map, diff);
 	}
 
 	public Object remove(Object key) {
 		checkRealm();
-		return super.remove(key);
+
+		Map map = getMap();
+		if (!map.containsKey(key))
+			return null;
+
+		Object oldValue = map.get(key);
+
+		MapDiff diff = Diffs.createMapDiffSingleRemove(key, oldValue);
+		updateMap(map, diff);
+
+		return oldValue;
 	}
 
 	public Collection values() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/set/SimplePropertyObservableSet.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/set/SimplePropertyObservableSet.java
index 3fb5674..4e851ab 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/set/SimplePropertyObservableSet.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/set/SimplePropertyObservableSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 265561, 262287, 268203, 268688
+ *     Matthew Hall - bugs 265561, 262287, 268203, 268688, 301774
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.set;
@@ -147,26 +147,31 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 
 	// Single change operations
 
+	private void updateSet(Set set, SetDiff diff) {
+		if (!diff.isEmpty()) {
+			boolean wasUpdating = updating;
+			updating = true;
+			try {
+				property.updateSet(source, diff);
+				modCount++;
+			} finally {
+				updating = wasUpdating;
+			}
+
+			notifyIfChanged(null);
+		}
+	}
+
 	public boolean add(Object o) {
 		checkRealm();
 
-		Set set = new HashSet(getSet());
-		if (!set.add(o))
+		Set set = getSet();
+		if (set.contains(o))
 			return false;
 
 		SetDiff diff = Diffs.createSetDiff(Collections.singleton(o),
 				Collections.EMPTY_SET);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, set, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 
 		return true;
 	}
@@ -196,20 +201,11 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 				checkRealm();
 				checkForComodification();
 
-				iterator.remove(); // stay in sync
 				SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET,
 						Collections.singleton(last));
+				updateSet(set, diff);
 
-				boolean wasUpdating = updating;
-				updating = true;
-				try {
-					property.setSet(source, set, diff);
-					modCount++;
-				} finally {
-					updating = wasUpdating;
-				}
-
-				notifyIfChanged(null);
+				iterator.remove(); // stay in sync
 
 				last = null;
 				expectedModCount = modCount;
@@ -225,23 +221,13 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 	public boolean remove(Object o) {
 		getterCalled();
 
-		Set set = new HashSet(getSet());
-		if (!set.remove(o))
+		Set set = getSet();
+		if (!set.contains(o))
 			return false;
 
 		SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, Collections
 				.singleton(o));
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, set, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 
 		return true;
 	}
@@ -254,30 +240,18 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 		if (c.isEmpty())
 			return false;
 
-		Set set = new HashSet(getSet());
+		Set set = getSet();
+		if (set.containsAll(c))
+			return false;
 
 		Set additions = new HashSet(c);
-		for (Iterator it = c.iterator(); it.hasNext();) {
-			Object element = it.next();
-			if (set.add(element))
-				additions.add(element);
-		}
+		additions.removeAll(set);
 
 		if (additions.isEmpty())
 			return false;
 
 		SetDiff diff = Diffs.createSetDiff(additions, Collections.EMPTY_SET);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, set, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 
 		return true;
 	}
@@ -285,36 +259,21 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 	public boolean removeAll(Collection c) {
 		getterCalled();
 
-		Set set = getSet();
-		if (set.isEmpty())
-			return false;
 		if (c.isEmpty())
 			return false;
 
-		set = new HashSet(set);
+		Set set = getSet();
+		if (set.isEmpty())
+			return false;
 
 		Set removals = new HashSet(c);
-		for (Iterator it = c.iterator(); it.hasNext();) {
-			Object element = it.next();
-			if (set.remove(element))
-				removals.add(element);
-		}
+		removals.retainAll(set);
 
 		if (removals.isEmpty())
 			return false;
 
 		SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, set, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 
 		return true;
 	}
@@ -331,32 +290,14 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 			return true;
 		}
 
-		set = new HashSet(set);
-
-		Set removals = new HashSet();
-		for (Iterator it = set.iterator(); it.hasNext();) {
-			Object element = it.next();
-			if (!c.contains(element)) {
-				it.remove();
-				removals.add(element);
-			}
-		}
+		Set removals = new HashSet(set);
+		removals.removeAll(c);
 
 		if (removals.isEmpty())
 			return false;
 
 		SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, removals);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, set, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 
 		return true;
 	}
@@ -369,17 +310,7 @@ public class SimplePropertyObservableSet extends AbstractObservableSet
 			return;
 
 		SetDiff diff = Diffs.createSetDiff(Collections.EMPTY_SET, set);
-
-		boolean wasUpdating = updating;
-		updating = true;
-		try {
-			property.setSet(source, Collections.EMPTY_SET, diff);
-			modCount++;
-		} finally {
-			updating = wasUpdating;
-		}
-
-		notifyIfChanged(null);
+		updateSet(set, diff);
 	}
 
 	private void notifyIfChanged(SetDiff diff) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/DelegatingCache.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/DelegatingCache.java
index c5af43e..af820e5 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/DelegatingCache.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/DelegatingCache.java
@@ -35,22 +35,28 @@ import org.eclipse.core.internal.databinding.identity.IdentityObservableSet;
  * 
  */
 abstract class DelegatingCache {
+	private Realm realm;
+	private DelegatingValueProperty detailProperty;
+	private IObservableSet elements;
+	private Map delegateCaches;
+
 	private class DelegateCache implements IMapChangeListener {
 		private final IValueProperty delegate;
-		private IObservableSet masterElements;
-		private IObservableMap masterElementValues;
+		private final IObservableSet masterElements;
+		private final IObservableMap masterElementValues;
 		private final Map cachedValues;
 
-		DelegateCache(final IValueProperty delegate) {
+		DelegateCache(IValueProperty delegate) {
 			this.delegate = delegate;
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					masterElements = new IdentityObservableSet(realm, elements
-							.getElementType());
-					masterElementValues = delegate
-							.observeDetail(masterElements);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				this.masterElements = new IdentityObservableSet(realm, elements
+						.getElementType());
+				this.masterElementValues = delegate
+						.observeDetail(masterElements);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 			this.cachedValues = new IdentityMap();
 
 			masterElementValues.addMapChangeListener(this);
@@ -118,20 +124,16 @@ abstract class DelegatingCache {
 		}
 	}
 
-	private Realm realm;
-	private DelegatingValueProperty detailProperty;
-	private IObservableSet elements;
-	private Map delegateCaches;
-
-	DelegatingCache(final Realm realm, DelegatingValueProperty detailProperty) {
+	DelegatingCache(Realm realm, DelegatingValueProperty detailProperty) {
 		this.realm = realm;
 		this.detailProperty = detailProperty;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				elements = new IdentityObservableSet(realm, null);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			this.elements = new IdentityObservableSet(realm, null);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		this.delegateCaches = new IdentityMap();
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/ListSimpleValueObservableList.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/ListSimpleValueObservableList.java
index c2046ca..54a0821 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/ListSimpleValueObservableList.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/ListSimpleValueObservableList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -131,11 +131,12 @@ public class ListSimpleValueObservableList extends AbstractObservableList
 	}
 
 	protected void firstListenerAdded() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				knownMasterElements = new IdentityObservableSet(getRealm(), null);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			knownMasterElements = new IdentityObservableSet(getRealm(), null);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		cachedValues = new IdentityMap();
 		staleElements = new IdentitySet();
@@ -169,16 +170,22 @@ public class ListSimpleValueObservableList extends AbstractObservableList
 	}
 
 	protected void lastListenerRemoved() {
-		masterList.removeListChangeListener(masterListener);
-		masterList.removeStaleListener(staleListener);
+		if (masterList != null) {
+			masterList.removeListChangeListener(masterListener);
+			masterList.removeStaleListener(staleListener);
+		}
 		if (knownMasterElements != null) {
 			knownMasterElements.dispose();
 			knownMasterElements = null;
 		}
-		cachedValues.clear();
-		cachedValues = null;
-		staleElements.clear();
-		staleElements = null;
+		if (cachedValues != null) {
+			cachedValues.clear();
+			cachedValues = null;
+		}
+		if (staleElements != null) {
+			staleElements.clear();
+			staleElements = null;
+		}
 	}
 
 	protected int doGetSize() {
@@ -449,16 +456,17 @@ public class ListSimpleValueObservableList extends AbstractObservableList
 	}
 
 	public synchronized void dispose() {
-		if (masterList != null) {
-			masterList.removeListChangeListener(masterListener);
-			masterList = null;
-		}
 		if (knownMasterElements != null) {
 			knownMasterElements.clear(); // detaches listeners
 			knownMasterElements.dispose();
 			knownMasterElements = null;
 		}
 
+		if (masterList != null) {
+			masterList.removeListChangeListener(masterListener);
+			masterList = null;
+		}
+
 		masterListener = null;
 		detailListener = null;
 		detailProperty = null;
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/MapSimpleValueObservableMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/MapSimpleValueObservableMap.java
index 6d5e585..d6e24f2 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/MapSimpleValueObservableMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/MapSimpleValueObservableMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,8 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
- *     Matthew Hall - bugs 262269, 265561, 262287, 268688, 278550
+ *     Matthew Hall - bugs 262269, 265561, 262287, 268688, 278550, 303847
+ *     Ovidio Mallo - bugs 299619, 301370
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.value;
@@ -153,12 +154,21 @@ public class MapSimpleValueObservableMap extends AbstractObservableMap
 		this.detailListener = detailProperty.adaptListener(listener);
 	}
 
+	public Object getKeyType() {
+		return masterMap.getKeyType();
+	}
+
+	public Object getValueType() {
+		return detailProperty.getValueType();
+	}
+
 	protected void firstListenerAdded() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				knownMasterValues = new IdentityObservableSet(getRealm(), null);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			knownMasterValues = new IdentityObservableSet(getRealm(), null);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		cachedValues = new IdentityMap();
 		staleMasterValues = new IdentitySet();
@@ -300,16 +310,39 @@ public class MapSimpleValueObservableMap extends AbstractObservableMap
 		}
 	}
 
+	public boolean containsKey(Object key) {
+		getterCalled();
+
+		return masterMap.containsKey(key);
+	}
+
+	public Object get(Object key) {
+		getterCalled();
+
+		return detailProperty.getValue(masterMap.get(key));
+	}
+
 	public Object put(Object key, Object value) {
 		if (!masterMap.containsKey(key))
 			return null;
 		Object masterValue = masterMap.get(key);
-		Object oldValue = detailProperty.getValue(key);
+		Object oldValue = detailProperty.getValue(masterValue);
 		detailProperty.setValue(masterValue, value);
 		notifyIfChanged(masterValue);
 		return oldValue;
 	}
 
+	public Object remove(Object key) {
+		checkRealm();
+
+		Object masterValue = masterMap.get(key);
+		Object oldValue = detailProperty.getValue(masterValue);
+
+		masterMap.remove(key);
+
+		return oldValue;
+	}
+
 	private void notifyIfChanged(Object masterValue) {
 		if (cachedValues != null) {
 			final Set keys = keysFor(masterValue);
diff --git a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/SetSimpleValueObservableMap.java b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/SetSimpleValueObservableMap.java
index 4b4043d..26a5765 100644
--- a/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/SetSimpleValueObservableMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding.property/src/org/eclipse/core/internal/databinding/property/value/SetSimpleValueObservableMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bugs 262269, 266754, 265561, 262287, 268688
+ *     Ovidio Mallo - bug 299619
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding.property.value;
@@ -48,7 +49,7 @@ public class SetSimpleValueObservableMap extends ComputedObservableMap
 	 */
 	public SetSimpleValueObservableMap(IObservableSet keySet,
 			SimpleValueProperty valueProperty) {
-		super(keySet);
+		super(keySet, valueProperty.getValueType());
 		this.detailProperty = valueProperty;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.databinding/.settings/org.moreunit.prefs b/eclipse/plugins/org.eclipse.core.databinding/.settings/org.moreunit.prefs
new file mode 100644
index 0000000..a0824d6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.databinding/.settings/org.moreunit.prefs
@@ -0,0 +1,5 @@
+#Tue Feb 02 23:24:59 MST 2010
+eclipse.preferences.version=1
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.core.databinding\:src\:org.eclipse.jface.tests.databinding\:src
+org.moreunit.useprojectsettings=true
diff --git a/eclipse/plugins/org.eclipse.core.databinding/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.databinding/META-INF/MANIFEST.MF
index a32e722..703e8b7 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.databinding/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.databinding
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.100.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -13,8 +13,8 @@ Export-Package: org.eclipse.core.databinding,
  org.eclipse.core.internal.databinding.conversion;x-friends:="org.eclipse.jface.tests.databinding",
  org.eclipse.core.internal.databinding.validation;x-friends:="org.eclipse.jface.tests.databinding"
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.databinding.observable;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
- org.eclipse.core.databinding.property;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)";visibility:=reexport,
+ org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)"
 Import-Package-Comment: see http://wiki.eclipse.org/
 Import-Package: com.ibm.icu.math;resolution:=optional,
  com.ibm.icu.text,
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
index b636230..19e7404 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
@@ -91,24 +91,25 @@ public class DataBindingContext {
 	 * 
 	 * @see Realm
 	 */
-	public DataBindingContext(final Realm validationRealm) {
+	public DataBindingContext(Realm validationRealm) {
 		Assert.isNotNull(validationRealm, "Validation realm cannot be null"); //$NON-NLS-1$
 		this.validationRealm = validationRealm;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				bindings = new WritableList(validationRealm);
-				unmodifiableBindings = Observables
-				.unmodifiableObservableList(bindings);
-				
-				validationStatusProviders = new WritableList(validationRealm);
-				unmodifiableStatusProviders = Observables
-				.unmodifiableObservableList(validationStatusProviders);
-				
-				validationStatusMap = new ValidationStatusMap(validationRealm,
-						bindings);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			bindings = new WritableList(validationRealm);
+			unmodifiableBindings = Observables
+					.unmodifiableObservableList(bindings);
+
+			validationStatusProviders = new WritableList(validationRealm);
+			unmodifiableStatusProviders = Observables
+					.unmodifiableObservableList(validationStatusProviders);
+
+			validationStatusMap = new ValidationStatusMap(validationRealm,
+					bindings);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ListBinding.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ListBinding.java
index e9760d7..10301ff 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ListBinding.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ListBinding.java
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 262221, 271148, 278550
+ *     Matthew Hall - bugs 262221, 271148, 280341, 278550
  ******************************************************************************/
 
 package org.eclipse.core.databinding;
@@ -71,12 +71,12 @@ public class ListBinding extends Binding {
 		super(target, model);
 		this.targetToModel = targetToModelStrategy;
 		this.modelToTarget = modelToTargetStrategy;
-		if ((targetToModel.getUpdatePolicy() & UpdateValueStrategy.POLICY_UPDATE) != 0) {
+		if ((targetToModel.getUpdatePolicy() & UpdateListStrategy.POLICY_UPDATE) != 0) {
 			target.addListChangeListener(targetChangeListener);
 		} else {
 			targetChangeListener = null;
 		}
-		if ((modelToTarget.getUpdatePolicy() & UpdateValueStrategy.POLICY_UPDATE) != 0) {
+		if ((modelToTarget.getUpdatePolicy() & UpdateListStrategy.POLICY_UPDATE) != 0) {
 			model.addListChangeListener(modelChangeListener);
 		} else {
 			modelChangeListener = null;
@@ -88,12 +88,13 @@ public class ListBinding extends Binding {
 	}
 
 	protected void preInit() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				validationStatusObservable = new WritableValue(context
-						.getValidationRealm(), Status.OK_STATUS, IStatus.class);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			validationStatusObservable = new WritableValue(context
+					.getValidationRealm(), Status.OK_STATUS, IStatus.class);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	protected void postInit() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/SetBinding.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/SetBinding.java
index a5bb244..8f5cb1e 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/SetBinding.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/SetBinding.java
@@ -90,12 +90,13 @@ public class SetBinding extends Binding {
 	}
 
 	protected void preInit() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				validationStatusObservable = new WritableValue(context
-						.getValidationRealm(), Status.OK_STATUS, IStatus.class);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			validationStatusObservable = new WritableValue(context
+					.getValidationRealm(), Status.OK_STATUS, IStatus.class);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	protected void postInit() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValueBinding.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValueBinding.java
index 048b042..61d4e9b 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValueBinding.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValueBinding.java
@@ -83,12 +83,13 @@ class ValueBinding extends Binding {
 	}
 
 	protected void preInit() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				validationStatusObservable = new WritableValue(context
-						.getValidationRealm(), Status.OK_STATUS, IStatus.class);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			validationStatusObservable = new WritableValue(context
+					.getValidationRealm(), Status.OK_STATUS, IStatus.class);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	protected void postInit() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/MultiValidator.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/MultiValidator.java
index 9e1bdb5..2a5ca85 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/MultiValidator.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/MultiValidator.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 218269)
  *     Boris Bokowski - bug 218269
- *     Matthew Hall - bug 237884, 240590, 251003, 278550
+ *     Matthew Hall - bug 237884, 240590, 251003, 251424, 278550
  *     Ovidio Mallo - bug 238909, 235859
  ******************************************************************************/
 
@@ -172,23 +172,24 @@ public abstract class MultiValidator extends ValidationStatusProvider {
 	 * @param realm
 	 *            the realm on which validation takes place.
 	 */
-	public MultiValidator(final Realm realm) {
+	public MultiValidator(Realm realm) {
 		Assert.isNotNull(realm, "Realm cannot be null"); //$NON-NLS-1$
 		this.realm = realm;
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				validationStatus = new ValidationStatusObservableValue(realm);
+		ObservableTracker.setIgnore(true);
+		try {
+			validationStatus = new ValidationStatusObservableValue(realm);
 
-				targets = new WritableList(realm, new ArrayList(),
-						IObservable.class);
-				targets.addListChangeListener(targetsListener);
-				unmodifiableTargets = Observables
-						.unmodifiableObservableList(targets);
+			targets = new WritableList(realm, new ArrayList(),
+					IObservable.class);
+			targets.addListChangeListener(targetsListener);
+			unmodifiableTargets = Observables
+					.unmodifiableObservableList(targets);
 
-				models = Observables.emptyObservableList(realm);
-			}
-		});
+			models = Observables.emptyObservableList(realm);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	private void checkObservable(IObservable target) {
@@ -209,12 +210,13 @@ public abstract class MultiValidator extends ValidationStatusProvider {
 	public IObservableValue getValidationStatus() {
 		if (unmodifiableValidationStatus == null) {
 			revalidate();
-			ObservableTracker.runAndIgnore(new Runnable() {
-				public void run() {
-					unmodifiableValidationStatus = Observables
-							.unmodifiableObservableValue(validationStatus);
-				}
-			});
+			ObservableTracker.setIgnore(true);
+			try {
+				unmodifiableValidationStatus = Observables
+						.unmodifiableObservableValue(validationStatus);
+			} finally {
+				ObservableTracker.setIgnore(false);
+			}
 		}
 		return unmodifiableValidationStatus;
 	}
@@ -257,43 +259,43 @@ public abstract class MultiValidator extends ValidationStatusProvider {
 		final IObservable[] dependencies = ObservableTracker.runAndMonitor(
 				validationRunnable, null, null);
 
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				List newTargets = new ArrayList(Arrays.asList(dependencies));
-
-				// This loop is roughly equivalent to:
-				// targets.retainAll(newTargets);
-				// newTargets.removeAll(targets);
-				// Except that dependencies are compared by identity instead of
-				// equality
-				outer: for (int i = targets.size() - 1; i >= 0; i--) {
-					Object oldDependency = targets.get(i);
-					for (Iterator itNew = newTargets.iterator(); itNew
-							.hasNext();) {
-						Object newDependency = itNew.next();
-						if (oldDependency == newDependency) {
-							// Dependency is already known--remove from list of
-							// new dependencies
-							itNew.remove();
-							continue outer;
-						} else if (newDependency == validationStatus
-								|| newDependency == unmodifiableValidationStatus
-								|| newDependency == targets
-								|| newDependency == unmodifiableTargets
-								|| newDependency == models) {
-							// Internal observables should not be dependencies
-							// (prevent dependency loop)
-							itNew.remove();
-						}
+		ObservableTracker.setIgnore(true);
+		try {
+			List newTargets = new ArrayList(Arrays.asList(dependencies));
+
+			// This loop is roughly equivalent to:
+			// targets.retainAll(newTargets);
+			// newTargets.removeAll(targets);
+			// Except that dependencies are compared by identity instead of
+			// equality
+			outer: for (int i = targets.size() - 1; i >= 0; i--) {
+				Object oldDependency = targets.get(i);
+				for (Iterator itNew = newTargets.iterator(); itNew.hasNext();) {
+					Object newDependency = itNew.next();
+					if (oldDependency == newDependency) {
+						// Dependency is already known--remove from list of
+						// new dependencies
+						itNew.remove();
+						continue outer;
+					} else if (newDependency == validationStatus
+							|| newDependency == unmodifiableValidationStatus
+							|| newDependency == targets
+							|| newDependency == unmodifiableTargets
+							|| newDependency == models) {
+						// Internal observables should not be dependencies
+						// (prevent dependency loop)
+						itNew.remove();
 					}
-					// Old dependency is no longer a dependency--remove from
-					// targets
-					targets.remove(i);
 				}
-
-				targets.addAll(newTargets);
+				// Old dependency is no longer a dependency--remove from
+				// targets
+				targets.remove(i);
 			}
-		});
+
+			targets.addAll(newTargets);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
 		// Once the dependencies are up-to-date, we set the new status.
 		validationStatus.setValue(validationRunnable.validationResult);
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextBindingsProperty.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextBindingsProperty.java
index e4cc9ad..39dbb0d 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextBindingsProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextBindingsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,22 +11,36 @@
 
 package org.eclipse.core.internal.databinding;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.Binding;
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.property.list.ListProperty;
 
 /**
  * @since 3.3
- *
+ * 
  */
-public final class DataBindingContextBindingsProperty extends
-		ListProperty {
+public final class DataBindingContextBindingsProperty extends ListProperty {
 	public Object getElementType() {
 		return Binding.class;
 	}
 
+	protected List doGetList(Object source) {
+		return ((DataBindingContext) source).getBindings();
+	}
+
+	protected void doSetList(Object source, List list) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
 	public IObservableList observe(Realm realm, Object source) {
 		return ((DataBindingContext) source).getBindings();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextValidationStatusProvidersProperty.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextValidationStatusProvidersProperty.java
index 8cca35a..239b79b 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextValidationStatusProvidersProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DataBindingContextValidationStatusProvidersProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,13 @@
 
 package org.eclipse.core.internal.databinding;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.ValidationStatusProvider;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.property.list.ListProperty;
 
 /**
@@ -27,6 +30,18 @@ public final class DataBindingContextValidationStatusProvidersProperty extends
 		return ValidationStatusProvider.class;
 	}
 
+	protected List doGetList(Object source) {
+		return ((DataBindingContext) source).getValidationStatusProviders();
+	}
+
+	protected void doSetList(Object source, List list) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
 	public IObservableList observe(Realm realm, Object source) {
 		return ((DataBindingContext) source).getValidationStatusProviders();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityMap.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityMap.java
index 8f464bf..4f14675 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityMap.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     Matthew Hall - initial API and implementation (bug 215531)
  *     Matthew Hall - bug 228125
  *         (through ViewerElementMap.java)
- *     Matthew Hall - bug 262269
+ *     Matthew Hall - bugs 262269, 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding;
@@ -62,7 +62,7 @@ public class IdentityMap implements Map {
 	}
 
 	public boolean containsKey(Object key) {
-		return wrappedMap.containsKey(new IdentityWrapper(key));
+		return wrappedMap.containsKey(IdentityWrapper.wrap(key));
 	}
 
 	public boolean containsValue(Object value) {
@@ -151,8 +151,8 @@ public class IdentityMap implements Map {
 
 			public boolean remove(Object o) {
 				final Map.Entry unwrappedEntry = (Map.Entry) o;
-				final IdentityWrapper wrappedKey = new IdentityWrapper(
-						unwrappedEntry.getKey());
+				final IdentityWrapper wrappedKey = IdentityWrapper
+						.wrap(unwrappedEntry.getKey());
 				Map.Entry wrappedEntry = new Map.Entry() {
 					public Object getKey() {
 						return wrappedKey;
@@ -246,7 +246,7 @@ public class IdentityMap implements Map {
 	}
 
 	public Object get(Object key) {
-		return wrappedMap.get(new IdentityWrapper(key));
+		return wrappedMap.get(IdentityWrapper.wrap(key));
 	}
 
 	public boolean isEmpty() {
@@ -269,12 +269,12 @@ public class IdentityMap implements Map {
 			}
 
 			public boolean contains(Object o) {
-				return wrappedKeySet.contains(new IdentityWrapper(o));
+				return wrappedKeySet.contains(IdentityWrapper.wrap(o));
 			}
 
 			public boolean containsAll(Collection c) {
 				for (Iterator iterator = c.iterator(); iterator.hasNext();)
-					if (!wrappedKeySet.contains(new IdentityWrapper(iterator
+					if (!wrappedKeySet.contains(IdentityWrapper.wrap(iterator
 							.next())))
 						return false;
 				return true;
@@ -303,14 +303,14 @@ public class IdentityMap implements Map {
 			}
 
 			public boolean remove(Object o) {
-				return wrappedKeySet.remove(new IdentityWrapper(o));
+				return wrappedKeySet.remove(IdentityWrapper.wrap(o));
 			}
 
 			public boolean removeAll(Collection c) {
 				boolean changed = false;
 				for (Iterator iterator = c.iterator(); iterator.hasNext();)
-					changed |= wrappedKeySet.remove(new IdentityWrapper(
-							iterator.next()));
+					changed |= wrappedKeySet.remove(IdentityWrapper
+							.wrap(iterator.next()));
 				return changed;
 			}
 
@@ -367,20 +367,20 @@ public class IdentityMap implements Map {
 	}
 
 	public Object put(Object key, Object value) {
-		return wrappedMap.put(new IdentityWrapper(key), value);
+		return wrappedMap.put(IdentityWrapper.wrap(key), value);
 	}
 
 	public void putAll(Map other) {
 		for (Iterator iterator = other.entrySet().iterator(); iterator
 				.hasNext();) {
 			Map.Entry entry = (Map.Entry) iterator.next();
-			wrappedMap.put(new IdentityWrapper(entry.getKey()), entry
+			wrappedMap.put(IdentityWrapper.wrap(entry.getKey()), entry
 					.getValue());
 		}
 	}
 
 	public Object remove(Object key) {
-		return wrappedMap.remove(new IdentityWrapper(key));
+		return wrappedMap.remove(IdentityWrapper.wrap(key));
 	}
 
 	public int size() {
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentitySet.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentitySet.java
index 4aa7713..03790cf 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentitySet.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentitySet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     Matthew Hall - initial API and implementation (bug 215531)
  *     Matthew Hall - bug 124684
  *         (through ViewerElementSet.java)
- *     Matthew Hall - bug 262269
+ *     Matthew Hall - bugs 262269, 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding;
@@ -54,13 +54,13 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean add(Object o) {
-		return wrappedSet.add(new IdentityWrapper(o));
+		return wrappedSet.add(IdentityWrapper.wrap(o));
 	}
 
 	public boolean addAll(Collection c) {
 		boolean changed = false;
 		for (Iterator iterator = c.iterator(); iterator.hasNext();)
-			changed |= wrappedSet.add(new IdentityWrapper(iterator.next()));
+			changed |= wrappedSet.add(IdentityWrapper.wrap(iterator.next()));
 		return changed;
 	}
 
@@ -69,12 +69,12 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean contains(Object o) {
-		return wrappedSet.contains(new IdentityWrapper(o));
+		return wrappedSet.contains(IdentityWrapper.wrap(o));
 	}
 
 	public boolean containsAll(Collection c) {
 		for (Iterator iterator = c.iterator(); iterator.hasNext();)
-			if (!wrappedSet.contains(new IdentityWrapper(iterator.next())))
+			if (!wrappedSet.contains(IdentityWrapper.wrap(iterator.next())))
 				return false;
 		return true;
 	}
@@ -101,7 +101,7 @@ public class IdentitySet implements Set {
 	}
 
 	public boolean remove(Object o) {
-		return wrappedSet.remove(new IdentityWrapper(o));
+		return wrappedSet.remove(IdentityWrapper.wrap(o));
 	}
 
 	public boolean removeAll(Collection c) {
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java
index 978c996..c3f43de 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/IdentityWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Daniel Kruegler - bug 137435
+ *     Matthew Hall - bug 303847
  ******************************************************************************/
 
 package org.eclipse.core.internal.databinding;
@@ -21,15 +22,28 @@ package org.eclipse.core.internal.databinding;
  * 
  */
 public class IdentityWrapper {
+
+	private static final IdentityWrapper NULL_WRAPPER = new IdentityWrapper(
+			null);
+
+	/**
+	 * @param obj
+	 *            the object to wrap
+	 * @return an IdentityWrapper wrapping the specified object
+	 */
+	public static IdentityWrapper wrap(Object obj) {
+		return obj == null ? NULL_WRAPPER : new IdentityWrapper(obj);
+	}
+
 	final Object o;
 
 	/**
 	 * @param o
 	 */
-	public IdentityWrapper(Object o) {
+	private IdentityWrapper(Object o) {
 		this.o = o;
 	}
-	
+
 	/**
 	 * @return the unwrapped object
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderModelsProperty.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderModelsProperty.java
index 0375517..845b94c 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderModelsProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderModelsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,13 @@
 
 package org.eclipse.core.internal.databinding;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.ValidationStatusProvider;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.property.list.ListProperty;
 
 /**
@@ -26,6 +29,18 @@ public class ValidationStatusProviderModelsProperty extends ListProperty {
 		return IObservable.class;
 	}
 
+	protected List doGetList(Object source) {
+		return ((ValidationStatusProvider) source).getModels();
+	}
+
+	protected void doSetList(Object source, List list) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
 	public IObservableList observe(Realm realm, Object source) {
 		return ((ValidationStatusProvider) source).getModels();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderTargetsProperty.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderTargetsProperty.java
index 3032839..10a0971 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderTargetsProperty.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusProviderTargetsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,13 @@
 
 package org.eclipse.core.internal.databinding;
 
+import java.util.List;
+
 import org.eclipse.core.databinding.ValidationStatusProvider;
 import org.eclipse.core.databinding.observable.IObservable;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListDiff;
 import org.eclipse.core.databinding.property.list.ListProperty;
 
 /**
@@ -26,6 +29,18 @@ public class ValidationStatusProviderTargetsProperty extends ListProperty {
 		return IObservable.class;
 	}
 
+	protected List doGetList(Object source) {
+		return ((ValidationStatusProvider) source).getTargets();
+	}
+
+	protected void doSetList(Object source, List list) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateList(Object source, ListDiff diff) {
+		throw new UnsupportedOperationException(toString() + " is unmodifiable"); //$NON-NLS-1$
+	}
+
 	public IObservableList observe(Realm realm, Object source) {
 		return ((ValidationStatusProvider) source).getTargets();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/StringToNumberParser.java b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/StringToNumberParser.java
index 595c845..effd816 100644
--- a/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/StringToNumberParser.java
+++ b/eclipse/plugins/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/conversion/StringToNumberParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ import com.ibm.icu.text.NumberFormat;
 
 /**
  * Utility class for the parsing of strings to numbers.
- *
+ * 
  * @since 1.0
  */
 public class StringToNumberParser {
@@ -73,7 +73,7 @@ public class StringToNumberParser {
 
 	/**
 	 * The result of a parse operation.
-	 *
+	 * 
 	 * @since 1.0
 	 */
 	public static class ParseResult {
@@ -84,7 +84,7 @@ public class StringToNumberParser {
 		 * The number as a result of the conversion. <code>null</code> if the
 		 * value could not be converted or if the type is not a primitive and
 		 * the value was an empty string.
-		 *
+		 * 
 		 * @return number
 		 */
 		public Number getNumber() {
@@ -94,7 +94,7 @@ public class StringToNumberParser {
 		/**
 		 * ParsePosition if an error occurred while parsing. <code>null</code>
 		 * if no error occurred.
-		 *
+		 * 
 		 * @return parse position
 		 */
 		public ParsePosition getPosition() {
@@ -104,7 +104,7 @@ public class StringToNumberParser {
 
 	/**
 	 * Formats an appropriate message for a parsing error.
-	 *
+	 * 
 	 * @param value
 	 * @param position
 	 * @return message
@@ -115,20 +115,23 @@ public class StringToNumberParser {
 				.getErrorIndex() : position.getIndex();
 
 		if (errorIndex < value.length()) {
-			return BindingMessages.formatString(BindingMessages.VALIDATE_NUMBER_PARSE_ERROR,
-					new Object[] { value, new Integer(errorIndex + 1),
+			return BindingMessages.formatString(
+					BindingMessages.VALIDATE_NUMBER_PARSE_ERROR, new Object[] {
+							value, new Integer(errorIndex + 1),
 							new Character(value.charAt(errorIndex)) });
 		}
-		return BindingMessages.formatString(BindingMessages.VALIDATE_NUMBER_PARSE_ERROR_NO_CHARACTER,
+		return BindingMessages.formatString(
+				BindingMessages.VALIDATE_NUMBER_PARSE_ERROR_NO_CHARACTER,
 				new Object[] { value, new Integer(errorIndex + 1) });
 	}
 
 	/**
 	 * Formats an appropriate message for an out of range error.
-	 *
+	 * 
 	 * @param minValue
 	 * @param maxValue
-	 * @param numberFormat when accessed method synchronizes on instance
+	 * @param numberFormat
+	 *            when accessed method synchronizes on instance
 	 * @return message
 	 */
 	public static String createOutOfRangeMessage(Number minValue,
@@ -146,9 +149,9 @@ public class StringToNumberParser {
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a integer.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a integer.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if a valid integer
 	 * @throws IllegalArgumentException
@@ -160,9 +163,10 @@ public class StringToNumberParser {
 
 	/**
 	 * Validates the range of the provided <code>number</code>.
-	 *
+	 * 
 	 * @param number
-	 * @param bitLength number of bits allowed to be in range
+	 * @param bitLength
+	 *            number of bits allowed to be in range
 	 * @return <code>true</code> if in range
 	 */
 	private static boolean checkInteger(Number number, int bitLength) {
@@ -202,9 +206,9 @@ public class StringToNumberParser {
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a long.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a long.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if in range
 	 * @throws IllegalArgumentException
@@ -215,19 +219,21 @@ public class StringToNumberParser {
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a float.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a float.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if in range
 	 * @throws IllegalArgumentException
 	 *             if the number type is unsupported
 	 */
 	public static boolean inFloatRange(Number number) {
-		return checkDecimal(number, FLOAT_MIN_BIG_DECIMAL, FLOAT_MAX_BIG_DECIMAL);
+		return checkDecimal(number, FLOAT_MIN_BIG_DECIMAL,
+				FLOAT_MAX_BIG_DECIMAL);
 	}
 
-	private static boolean checkDecimal(Number number, BigDecimal min, BigDecimal max) {
+	private static boolean checkDecimal(Number number, BigDecimal min,
+			BigDecimal max) {
 		BigDecimal bigDecimal = null;
 		if (number instanceof Integer || number instanceof Long) {
 			bigDecimal = new BigDecimal(number.doubleValue());
@@ -252,35 +258,40 @@ public class StringToNumberParser {
 			 * that this will work we fall back on the double value of the
 			 * number.
 			 */
+			// if this is ever taken out, take care to un-comment the throw
+			// clause and the if condition below, they were commented because
+			// the
+			// compiler complained about dead code..
 			bigDecimal = new BigDecimal(number.doubleValue());
 		}
 
-		if (bigDecimal != null) {
+		/* if (bigDecimal != null) */{
 			return max.compareTo(bigDecimal) >= 0
 					&& min.compareTo(bigDecimal) <= 0;
 		}
 
-		throw new IllegalArgumentException(
-				"Number of type [" + number.getClass().getName() + "] is not supported."); //$NON-NLS-1$ //$NON-NLS-2$
+		// throw new IllegalArgumentException(
+		//				"Number of type [" + number.getClass().getName() + "] is not supported."); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a double.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a double.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if in range
 	 * @throws IllegalArgumentException
 	 *             if the number type is unsupported
 	 */
 	public static boolean inDoubleRange(Number number) {
-		return checkDecimal(number, DOUBLE_MIN_BIG_DECIMAL, DOUBLE_MAX_BIG_DECIMAL);
+		return checkDecimal(number, DOUBLE_MIN_BIG_DECIMAL,
+				DOUBLE_MAX_BIG_DECIMAL);
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a short.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a short.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if in range
 	 */
@@ -289,9 +300,9 @@ public class StringToNumberParser {
 	}
 
 	/**
-	 * Returns <code>true</code> if the provided <code>number</code> is in
-	 * the range of a byte.
-	 *
+	 * Returns <code>true</code> if the provided <code>number</code> is in the
+	 * range of a byte.
+	 * 
 	 * @param number
 	 * @return <code>true</code> if in range
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.expressions/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.expressions/META-INF/MANIFEST.MF
index db7f5e7..7184711 100644
--- a/eclipse/plugins/org.eclipse.core.expressions/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.expressions/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.expressions; singleton:=true
-Bundle-Version: 3.4.101.qualifier
+Bundle-Version: 3.4.200.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.core.internal.expressions.ExpressionPlugin
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.core.expressions/build.properties b/eclipse/plugins/org.eclipse.core.expressions/build.properties
index eb7f1ce..9ac7643 100644
--- a/eclipse/plugins/org.eclipse.core.expressions/build.properties
+++ b/eclipse/plugins/org.eclipse.core.expressions/build.properties
@@ -17,3 +17,4 @@ bin.includes = plugin.xml,\
 src.includes = about.html,\
                schema/
 source.. = src/
+jre.compilation.profile = J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.java b/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.java
index 2322748..18a047d 100644
--- a/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.java
+++ b/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.properties b/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.properties
index 1c14091..aa9915c 100644
--- a/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.properties
+++ b/eclipse/plugins/org.eclipse.core.expressions/src/org/eclipse/core/internal/expressions/ExpressionMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath b/eclipse/plugins/org.eclipse.core.externaltools/.classpath
similarity index 100%
copy from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath
copy to eclipse/plugins/org.eclipse.core.externaltools/.classpath
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/.project b/eclipse/plugins/org.eclipse.core.externaltools/.project
new file mode 100644
index 0000000..4b19d2a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.core.externaltools</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..5ac4bbd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,74 @@
+#Wed Sep 16 09:50:20 CDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..189611f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,25 @@
+#Wed Oct 07 13:13:28 CDT 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..30d373c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.core.externaltools;singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Activator: org.eclipse.core.externaltools.internal.ExternalToolsCore
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Export-Package: org.eclipse.core.externaltools.internal;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools,org.eclipse.ant.ui",
+ org.eclipse.core.externaltools.internal.launchConfigurations;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools",
+ org.eclipse.core.externaltools.internal.model;x-friends:="org.eclipse.ant.launching,org.eclipse.ui.externaltools,org.eclipse.ant.ui",
+ org.eclipse.core.externaltools.internal.registry;x-friends:="org.eclipse.ui.externaltools"
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/about.html b/eclipse/plugins/org.eclipse.core.externaltools/about.html
new file mode 100644
index 0000000..8fcbcd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>September 16, 2009</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/build.properties b/eclipse/plugins/org.eclipse.core.externaltools/build.properties
new file mode 100644
index 0000000..81d294c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/build.properties
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright (c) 2005, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               about.html
+src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/plugin.properties b/eclipse/plugins/org.eclipse.core.externaltools/plugin.properties
new file mode 100644
index 0000000..f2df1a6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/plugin.properties
@@ -0,0 +1,16 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=External Tools Headless Support
+providerName=Eclipse.org
+
+Program.externalTools = Program
+Builder.externalTools = Integrated External Tool Builder
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/plugin.xml b/eclipse/plugins/org.eclipse.core.externaltools/plugin.xml
new file mode 100644
index 0000000..08d116e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/plugin.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+ <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            name="%Program.externalTools"
+            delegate="org.eclipse.core.externaltools.internal.launchConfigurations.ProgramLaunchDelegate"
+            category="org.eclipse.ui.externaltools"
+            modes="run"
+            id="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
+      </launchConfigurationType>
+      <launchConfigurationType
+            name="%Program.externalTools"
+            delegate="org.eclipse.core.externaltools.internal.launchConfigurations.ProgramLaunchDelegate"
+            category="org.eclipse.ui.externaltools.builder"
+            modes="run"
+            id="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
+      </launchConfigurationType>
+   </extension>
+   <extension
+         id="org.eclipse.ui.externaltools.ExternalToolBuilder"
+         name="%Builder.externalTools"
+         point="org.eclipse.core.resources.builders">
+     <builder
+      	isConfigurable= "true">
+         <run
+               class="org.eclipse.core.externaltools.internal.model.ExternalToolBuilder">
+         </run>
+      </builder>
+   </extension>   
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
new file mode 100644
index 0000000..e14df99
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/ExternalToolsCore.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Controls the plug-in life cycle
+ */
+public class ExternalToolsCore extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$
+	
+	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
+	
+	/**
+	 * Status code indicating an unexpected internal error.
+	 * @since 2.1
+	 */
+	public static final int INTERNAL_ERROR = 120;	
+
+	// The shared instance
+	private static ExternalToolsCore plugin;
+	
+	/**
+	 * The constructor
+	 */
+	public ExternalToolsCore() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static ExternalToolsCore getDefault() {
+		return plugin;
+	}
+	
+	/**
+	 * Logs the specified throwable with this plug-in's log.
+	 * 
+	 * @param t throwable to log 
+	 */
+	public static void log(Throwable t) {
+		IStatus status= new Status(IStatus.ERROR, PLUGIN_ID, INTERNAL_ERROR, "Error logged from Ant UI: ", t); //$NON-NLS-1$
+		log(status);
+	}
+
+	/**
+	 * Logs the specified status with this plug-in's log.
+	 * 
+	 * @param status status 
+	 */
+	public static void log(IStatus status) {
+		getDefault().getLog().log(status);
+	}
+	
+	/**
+	 * Writes the message to the plug-in's log
+	 * 
+	 * @param message the text to write to the log
+	 */
+	public static void log(String message, Throwable exception) {
+		IStatus status = newErrorStatus(message, exception);
+		log(status);
+	}
+	
+	/**
+	 * Returns a new <code>IStatus</code> for this plug-in
+	 */
+	public static IStatus newErrorStatus(String message, Throwable exception) {
+		if (message == null) {
+			message= EMPTY_STRING; 
+		}		
+		return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
+	}
+	
+	/**
+	 * Returns a new <code>CoreException</code> for this plug-in
+	 */
+	public static CoreException newError(String message, Throwable exception) {
+		return new CoreException(new Status(IStatus.ERROR,
+				IExternalToolConstants.PLUGIN_ID, 0, message, exception));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
new file mode 100644
index 0000000..4641a0e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/IExternalToolConstants.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     dakshinamurthy.karra at gmail.com - bug 165371
+ *******************************************************************************/
+
+package org.eclipse.core.externaltools.internal;
+/**
+ * Defines the constants available for client use.
+ * <p>
+ * This interface is not intended to be extended or implemented by clients.
+ * </p>
+ */
+public interface IExternalToolConstants {
+	/**
+	 * Plug-in identifier for external tools UI (value <code>org.eclipse.ui.externaltools</code>).
+	 */
+	public static final String UI_PLUGIN_ID = "org.eclipse.ui.externaltools"; //$NON-NLS-1$;
+	
+	/**
+	 * Plug-in identifier for external tools core (value <code>org.eclipse.core.externaltools</code>).
+	 */
+	public static final String PLUGIN_ID = "org.eclipse.core.externaltools"; //$NON-NLS-1$;
+
+	// ------- Refresh Variables -------
+	/**
+	 * Variable that expands to the workspace root object (value <code>workspace</code>).
+	 */
+	public static final String VAR_WORKSPACE = "workspace"; //$NON-NLS-1$
+	/**
+	 * Variable that expands to the project resource (value <code>project</code>).
+	 */
+	public static final String VAR_PROJECT = "project"; //$NON-NLS-1$
+	/**
+	 * Variable that expands to the container resource (value <code>container</code>).
+	 */
+	public static final String VAR_CONTAINER = "container"; //$NON-NLS-1$
+	/**
+	 * Variable that expands to a resource (value <code>resource</code>).
+	 */
+	public static final String VAR_RESOURCE = "resource"; //$NON-NLS-1$
+	/**
+	 * Variable that expands to the working set object (value <code>working_set</code>).
+	 */
+	public static final String VAR_WORKING_SET = "working_set"; //$NON-NLS-1$
+	// ------- Tool Types -------
+	/**
+	 * External tool type for programs such as executables, batch files, 
+	 * shell scripts, etc (value <code>programType</code>).
+	 */
+	public static final String TOOL_TYPE_PROGRAM = "programType"; //$NON-NLS-1$;
+
+	// ------- Build Types -------
+	/**
+	 * Build type indicating an incremental project build request for
+	 * the external tool running as a builder (value <code>incremental</code>).
+	 */
+	public static final String BUILD_TYPE_INCREMENTAL = "incremental"; //$NON-NLS-1$
+
+	/**
+	 * Build type indicating a full project build request for
+	 * the external tool running as a builder (value <code>full</code>).
+	 */
+	public static final String BUILD_TYPE_FULL = "full"; //$NON-NLS-1$
+
+	/**
+	 * Build type indicating an automatic project build request for
+	 * the external tool running as a builder (value <code>auto</code>).
+	 */
+	public static final String BUILD_TYPE_AUTO = "auto"; //$NON-NLS-1$
+	
+	/**
+	 * Build type indicating a clean project build request for
+	 * the external tool running as a builder (value <code>clean</code>).
+	 */
+	public static final String BUILD_TYPE_CLEAN = "clean"; //$NON-NLS-1$
+
+	/**
+	 * Build type indicating no project build request for
+	 * the external tool running as a builder (value <code>none</code>).
+	 */
+	public static final String BUILD_TYPE_NONE = "none"; //$NON-NLS-1$
+
+	// ------- Launch configuration types --------
+	/**
+	 * Program launch configuration type identifier.
+	 */
+	public static final String ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"; //$NON-NLS-1$
+	
+	/**
+	 * Program builder launch configuration type identifier. Program project
+	 * builders are of this type.
+	 */
+	public static final String ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"; //$NON-NLS-1$	
+	
+	// ------- Launch configuration category --------
+	/**
+	 * Identifier for external tools launch configuration category. Launch
+	 * configuration types for external tools that appear in the external tools
+	 * launch configuration dialog should belong to this category.
+	 */
+	public static final String ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools"; //$NON-NLS-1$
+	/**
+	 * Identifier for external tools launch configuration builders category.
+	 * Launch configuration types that can be added as project builders should
+	 * belong to this category.
+	 */
+	public static final String ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools.builder"; //$NON-NLS-1$
+
+	// ------- Common External Tool Launch Configuration Attributes -------
+
+	/**
+	 * Boolean attribute indicating if external tool output should be captured.
+	 * Default value is <code>false</code>.
+	 * @deprecated since 3.1 Replaced by <code>org.eclipse.debug.core.DebugPlugin.ATTR_CAPTURE_OUTPUT</code>
+	 */
+	public static final String ATTR_CAPTURE_OUTPUT = UI_PLUGIN_ID + ".ATTR_CAPTURE_OUTPUT"; //$NON-NLS-1$
+	/**
+	 * String attribute identifying the location of an external. Default value
+	 * is <code>null</code>. Encoding is tool specific.
+	 */
+	public static final String ATTR_LOCATION = UI_PLUGIN_ID + ".ATTR_LOCATION"; //$NON-NLS-1$
+
+	/**
+	 * Boolean attribute indicating if the user should be prompted for
+	 * arguments before running a tool. Default value is <code>false</code>.
+	 * THIS ATTRIBUTE IS NOT USED.
+	 */
+	public static final String ATTR_PROMPT_FOR_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_PROMPT_FOR_ARGUMENTS"; //$NON-NLS-1$
+	
+	/**
+	 * String attribute identifying the scope of resources that should trigger an 
+	 * external tool to run. Default value is <code>null</code>
+	 * indicating that the builder will be triggered for all changes.
+	 */
+	public static final String ATTR_BUILDER_SCOPE = UI_PLUGIN_ID + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
+		
+	/**
+	 * String attribute containing an array of build kinds for which an
+	 * external tool builder should be run.
+	 */
+	public static final String ATTR_RUN_BUILD_KINDS = UI_PLUGIN_ID + ".ATTR_RUN_BUILD_KINDS"; //$NON-NLS-1$
+	
+	/**
+	 * Boolean attribute indicating if the console should be shown on external
+	 * tool output. Default value is <code>false</code>.
+	 */
+	public static final String ATTR_SHOW_CONSOLE = UI_PLUGIN_ID + ".ATTR_SHOW_CONSOLE"; //$NON-NLS-1$
+
+	/**
+	 * String attribute containing the arguments that should be passed to the
+	 * tool. Default value is <code>null</code>, and encoding is tool specific.
+	 */
+	public static final String ATTR_TOOL_ARGUMENTS = UI_PLUGIN_ID + ".ATTR_TOOL_ARGUMENTS"; //$NON-NLS-1$
+
+	/**
+	 * String attribute identifying the working directory of an external tool.
+	 * Default value is <code>null</code>, which indicates a default working
+	 * directory, which is tool specific.
+	 */
+	public static final String ATTR_WORKING_DIRECTORY = UI_PLUGIN_ID + ".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$
+	
+	/**
+	 * String attribute identifying whether an external tool builder configuration
+	 * is enabled. The default value is <code>true</code>, which indicates
+	 * that the configuration will be executed as appropriate by the builder.
+	 */
+	public static final String ATTR_BUILDER_ENABLED = UI_PLUGIN_ID + ".ATTR_BUILDER_ENABLED"; //$NON-NLS-1$
+	
+	/**
+	 * Boolean attribute identifying whether an external tool launcher should execute
+	 * synchronously (value <code>false</code>) or asynchronously (value <code>true</code>).
+	 * Default value is 
+	 */
+	public static final String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$
+	
+	/**
+	 * Status code indicating an unexpected internal error.
+	 */
+	public static final int ERR_INTERNAL_ERROR = 150;
+
+	/**
+	 * String attribute identifying a non-external tool builder launch configuration that is disabled
+	 * The value is the name of the disabled builder.
+	 */
+	public static final String ATTR_DISABLED_BUILDER = UI_PLUGIN_ID + ".ATTR_DISABLED_BUILDER";		 //$NON-NLS-1$
+	
+	/**
+	 * boolean attribute identifying that an external tool builder has been configured for triggering
+	 * using the <code>ICommand.setBuilding(int)</code> mechanism
+	 * @since 3.1
+	 */
+	public static final String ATTR_TRIGGERS_CONFIGURED = UI_PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED";		 //$NON-NLS-1$
+
+	/**
+	 * String attribute identifying the build scope for a launch configuration.
+	 * <code>null</code> indicates the default workspace build.
+	 */
+	public static final String ATTR_BUILD_SCOPE = UI_PLUGIN_ID + ".ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE"; //$NON-NLS-1$
+
+	/**
+	 * Attribute identifier specifying whether referenced projects should be 
+	 * considered when computing the projects to build. Default value is
+	 * <code>true</code>.
+	 */
+	public static final String ATTR_INCLUDE_REFERENCED_PROJECTS = UI_PLUGIN_ID + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java
new file mode 100644
index 0000000..de77296
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/BackgroundResourceRefresher.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.launchConfigurations;
+
+
+import org.eclipse.core.externaltools.internal.ExternalToolsCore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugEvent;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IDebugEventSetListener;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.RefreshUtil;
+import org.eclipse.debug.core.model.IProcess;
+
+/**
+ * Refreshes resources as specified by a launch configuration, when 
+ * an associated process terminates.
+ */
+public class BackgroundResourceRefresher implements IDebugEventSetListener  {
+
+	private ILaunchConfiguration fConfiguration;
+	private IProcess fProcess;
+	
+	
+	
+	public BackgroundResourceRefresher(ILaunchConfiguration configuration, IProcess process) {
+		fConfiguration = configuration;
+		fProcess = process;
+	}
+	
+	/**
+	 * If the process has already terminated, resource refreshing is done
+	 * immediately in the current thread. Otherwise, refreshing is done when the
+	 * process terminates.
+	 */
+	public void startBackgroundRefresh() {
+		synchronized (fProcess) {
+			if (fProcess.isTerminated()) {
+				refresh();
+			} else {
+				DebugPlugin.getDefault().addDebugEventListener(this);
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
+	 */
+	public void handleDebugEvents(DebugEvent[] events) {
+		for (int i = 0; i < events.length; i++) {
+			DebugEvent event = events[i];
+			if (event.getSource() == fProcess && event.getKind() == DebugEvent.TERMINATE) {
+				DebugPlugin.getDefault().removeDebugEventListener(this);
+				refresh();
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * Submits a job to do the refresh
+	 */
+	protected void refresh() {
+		Job job= new Job(ExternalToolsProgramMessages.BackgroundResourceRefresher_0) {
+			public IStatus run(IProgressMonitor monitor) {
+				try {
+					RefreshUtil.refreshResources(fConfiguration, monitor);
+				} catch (CoreException e) {
+					ExternalToolsCore.log(e);
+					return e.getStatus();
+				}	
+				return Status.OK_STATUS;
+			}
+		};
+		job.schedule();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
new file mode 100644
index 0000000..d316f27
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsCoreUtil.java
@@ -0,0 +1,282 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Keith Seitz (keiths at redhat.com) - Bug 27243 (environment variables contribution)
+ *     dakshinamurthy.karra at gmail.com - bug 165371
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.launchConfigurations;
+
+
+import java.io.File;
+
+import org.eclipse.core.externaltools.internal.ExternalToolsCore;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.RefreshUtil;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Utilities for external tool launch configurations.
+ * <p>
+ * This class it not intended to be instantiated.
+ * </p>
+ */
+public class ExternalToolsCoreUtil {
+
+	/**
+	 * Throws a core exception with an error status object built from
+	 * the given message, lower level exception, and error code.
+	 * @param message the status message
+	 * @param exception lower level exception associated with the
+	 *  error, or <code>null</code> if none
+	 * @param code error code
+	 */
+	protected static void abort(String message, Throwable exception, int code) throws CoreException {
+		throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, code, message, exception));
+	}
+	
+	/**
+	 * Expands and returns the location attribute of the given launch
+	 * configuration. The location is
+	 * verified to point to an existing file, in the local file system.
+	 * 
+	 * @param configuration launch configuration
+	 * @return an absolute path to a file in the local file system  
+	 * @throws CoreException if unable to retrieve the associated launch
+	 * configuration attribute, if unable to resolve any variables, or if the
+	 * resolved location does not point to an existing file in the local file
+	 * system
+	 */
+	public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException {
+		String location = configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String) null);
+		if (location == null) {
+			abort(NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_Location_not_specified_by__0__1, new String[] { configuration.getName()}), null, 0);
+		} else {
+			String expandedLocation = getStringVariableManager().performStringSubstitution(location);
+			if (expandedLocation == null || expandedLocation.length() == 0) {
+				String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
+				abort(msg, null, 0);
+			} else {
+				File file = new File(expandedLocation);
+				if (file.isFile()) {
+					return new Path(expandedLocation);
+				} 
+				
+				String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
+				abort(msg, null, 0);
+			}
+		}
+		// execution will not reach here
+		return null;
+	}
+	
+	/**
+	 * Returns a boolean specifying whether or not output should be captured for
+	 * the given configuration
+	 * 
+	 * @param configuration the configuration from which the value will be
+	 * extracted
+	 * @return boolean specifying whether or not output should be captured
+	 * @throws CoreException if unable to access the associated attribute
+	 */
+	public static boolean getCaptureOutput(ILaunchConfiguration configuration) throws CoreException {
+	    return configuration.getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
+	}
+
+	/**
+	 * Expands and returns the working directory attribute of the given launch
+	 * configuration. Returns <code>null</code> if a working directory is not
+	 * specified. If specified, the working is verified to point to an existing
+	 * directory in the local file system.
+	 * 
+	 * @param configuration launch configuration
+	 * @return an absolute path to a directory in the local file system, or
+	 * <code>null</code> if unspecified
+	 * @throws CoreException if unable to retrieve the associated launch
+	 * configuration attribute, if unable to resolve any variables, or if the
+	 * resolved location does not point to an existing directory in the local
+	 * file system
+	 */
+	public static IPath getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
+		String location = configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) null);
+		if (location != null) {
+			String expandedLocation = getStringVariableManager().performStringSubstitution(location);
+			if (expandedLocation.length() > 0) {
+				File path = new File(expandedLocation);
+				if (path.isDirectory()) {
+					return new Path(expandedLocation);
+				} 
+				String msg = NLS.bind(ExternalToolsProgramMessages.ExternalToolsUtil_invalidDirectory__0_, new Object[] { expandedLocation, configuration.getName()});
+				abort(msg, null, 0);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Expands and returns the arguments attribute of the given launch
+	 * configuration. Returns <code>null</code> if arguments are not specified.
+	 * 
+	 * @param configuration launch configuration
+	 * @return an array of resolved arguments, or <code>null</code> if
+	 * unspecified
+	 * @throws CoreException if unable to retrieve the associated launch
+	 * configuration attribute, or if unable to resolve any variables
+	 */
+	public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException {
+		String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
+		if (args != null) {
+			String expanded = getStringVariableManager().performStringSubstitution(args);
+			return parseStringIntoList(expanded);
+		}
+		return null;
+	}
+
+	private static IStringVariableManager getStringVariableManager() {
+		return VariablesPlugin.getDefault().getStringVariableManager();
+	}
+	
+	/**
+	 * Returns whether the given launch configuration is enabled. This property
+	 * is intended only to apply to external tool builder configurations and
+	 * determines whether the project builder will launch the configuration
+	 * when it builds.
+	 *  
+	 * @param configuration the configuration for which the enabled state should
+	 * 		be determined.
+	 * @return whether the given configuration is enabled to be run when a build occurs.
+	 * @throws CoreException if unable to access the associated attribute
+	 */
+	public static boolean isBuilderEnabled(ILaunchConfiguration configuration) throws CoreException {
+		return configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_ENABLED, true);
+	}
+	
+	/**
+	 * Returns the collection of resources for the build scope as specified by the given launch configuration.
+	 * 
+	 * @param configuration launch configuration
+	 * @throws CoreException if an exception occurs while retrieving the resources
+	 */
+	public static IResource[] getResourcesForBuildScope(ILaunchConfiguration configuration) throws CoreException {
+		String scope = configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_SCOPE, (String) null);
+		if (scope == null) {
+			return null;
+		}
+	
+		return RefreshUtil.toResources(scope);
+	}
+	
+	/**
+	 * Parses the argument text into an array of individual
+	 * strings using the space character as the delimiter.
+	 * An individual argument containing spaces must have a
+	 * double quote (") at the start and end. Two double 
+	 * quotes together is taken to mean an embedded double
+	 * quote in the argument text.
+	 * 
+	 * @param arguments the arguments as one string
+	 * @return the array of arguments
+	 */
+	public static String[] parseStringIntoList(String arguments) {
+		if (arguments == null || arguments.length() == 0) {
+			return new String[0];
+		}
+		String[] res= DebugPlugin.parseArguments(arguments);
+		return res;		
+	}	
+	/**
+	 * Returns a collection of projects referenced by a build scope attribute.
+	 * 
+	 * @return collection of projects referred to by configuration
+	 */
+	public static IProject[] getBuildProjects(ILaunchConfiguration configuration, String buildScopeId) {
+		
+		String scope = null;
+		String id = buildScopeId ;
+		if (id == null) {
+			id = IExternalToolConstants.ATTR_BUILD_SCOPE ;
+		}
+		try {
+			scope = configuration.getAttribute(id, (String)null);
+		} catch (CoreException e) {
+			return null;
+		}
+		if (scope == null) {
+			return null;
+		}
+		if (scope.startsWith("${projects:")) { //$NON-NLS-1$
+			String pathString = scope.substring(11, scope.length() - 1);
+			if (pathString.length() > 1) {
+				String[] names = pathString.split(","); //$NON-NLS-1$
+				IProject[] projects = new IProject[names.length];
+				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+				for (int i = 0; i < names.length; i++) {
+					projects[i] = root.getProject(names[i]);
+				}
+				return projects;
+			}
+		} else if (scope.equals("${project}")) { //$NON-NLS-1$
+			IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+			try {
+				String pathString = manager.performStringSubstitution("${selected_resource_path}"); //$NON-NLS-1$
+				IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(pathString));
+				if (res != null && res.getProject() != null) {
+					return new IProject[]{res.getProject()};
+				}
+			} catch (CoreException e) {
+				// unable to resolve a selection
+			}
+		}
+		return new IProject[0];
+	}
+	
+	/**
+	 * Whether referenced projects should be considered when building. Only valid
+	 * when a set of projects is to be built.
+	 * 
+	 * @param configuration
+	 * @return whether referenced projects should be considerd when building
+	 * @throws CoreException if unable to access the associated attribute
+	 */
+	public static boolean isIncludeReferencedProjects(ILaunchConfiguration configuration, String includeReferencedProjectsId) throws CoreException {
+		String id = includeReferencedProjectsId;
+		if (id == null) {
+			id = IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS ;
+		}
+		return configuration.getAttribute(id, true);
+	}
+	
+	/**
+	 * Returns whether the given external builder configuration should build asynchronously.
+	 * 
+	 * @param configuration the configuration
+	 * @return whether the configuration is configured to build asynchronously
+	 */
+	public static boolean isAsynchronousBuild(ILaunchConfiguration configuration) {
+		boolean launchInBackground= false;
+		try {
+			launchInBackground= configuration.getAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, false);
+		} catch (CoreException ce) {
+			ExternalToolsCore.log(ce);
+		}
+		return launchInBackground;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
new file mode 100644
index 0000000..889fe2b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.java
@@ -0,0 +1,30 @@
+/**********************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.   This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.core.externaltools.internal.launchConfigurations;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ExternalToolsProgramMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsProgramMessages";//$NON-NLS-1$
+
+	public static String BackgroundResourceRefresher_0;
+
+	public static String ProgramLaunchDelegate_3;
+	public static String ProgramLaunchDelegate_4;
+	
+	public static String ExternalToolsUtil_Location_not_specified_by__0__1;
+	public static String ExternalToolsUtil_invalidLocation__0_;
+	public static String ExternalToolsUtil_invalidDirectory__0_;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, ExternalToolsProgramMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
new file mode 100644
index 0000000..e76e7cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ExternalToolsProgramMessages.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+BackgroundResourceRefresher_0=Refreshing resources...
+
+ProgramLaunchDelegate_3=Running {0}...
+ProgramLaunchDelegate_4=An IProcess could not be created for the launch
+
+ExternalToolsUtil_Location_not_specified_by__0__1=Location not specified by {0}
+ExternalToolsUtil_invalidLocation__0_ = The file does not exist for the external tool named {0}.
+ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the external tool named {1}.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
new file mode 100644
index 0000000..00d1c63
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/launchConfigurations/ProgramLaunchDelegate.java
@@ -0,0 +1,217 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Keith Seitz (keiths at redhat.com) - environment variables contribution (Bug 27243)
+ *     dakshinamurthy.karra at gmail.com - bug 165371
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.launchConfigurations;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.RefreshUtil;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Launch delegate for a program.
+ */
+public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
+	
+	/**
+	 * Launch configuration attribute - a boolean value indicating whether a
+	 * configuration should be launched in the background. Default value is <code>true</code>.
+	 * <p>
+	 * This constant is defined in org.eclipse.debug.ui, but has to be copied here to support
+	 * headless launching.
+	 * </p>
+	 */
+	private static final String ATTR_LAUNCH_IN_BACKGROUND = "org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"; //$NON-NLS-1$
+
+	/**
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration,
+	 *      java.lang.String, org.eclipse.debug.core.ILaunch,
+	 *      org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void launch(ILaunchConfiguration configuration, String mode,
+			ILaunch launch, IProgressMonitor monitor) throws CoreException {
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		// resolve location
+		IPath location = ExternalToolsCoreUtil.getLocation(configuration);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		// resolve working directory
+		IPath workingDirectory = ExternalToolsCoreUtil
+				.getWorkingDirectory(configuration);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		// resolve arguments
+		String[] arguments = ExternalToolsCoreUtil.getArguments(configuration);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		int cmdLineLength = 1;
+		if (arguments != null) {
+			cmdLineLength += arguments.length;
+		}
+		String[] cmdLine = new String[cmdLineLength];
+		cmdLine[0] = location.toOSString();
+		if (arguments != null) {
+			System.arraycopy(arguments, 0, cmdLine, 1, arguments.length);
+		}
+
+		File workingDir = null;
+		if (workingDirectory != null) {
+			workingDir = workingDirectory.toFile();
+		}
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		String[] envp = DebugPlugin.getDefault().getLaunchManager()
+				.getEnvironment(configuration);
+
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		Process p = DebugPlugin.exec(cmdLine, workingDir, envp);
+		IProcess process = null;
+
+		// add process type to process attributes
+		Map processAttributes = new HashMap();
+		String programName = location.lastSegment();
+		String extension = location.getFileExtension();
+		if (extension != null) {
+			programName = programName.substring(0, programName.length()
+					- (extension.length() + 1));
+		}
+		programName = programName.toLowerCase();
+		processAttributes.put(IProcess.ATTR_PROCESS_TYPE, programName);
+
+		if (p != null) {
+			monitor.beginTask(NLS.bind(
+					ExternalToolsProgramMessages.ProgramLaunchDelegate_3,
+					new String[] { configuration.getName() }),
+					IProgressMonitor.UNKNOWN);
+			process = DebugPlugin.newProcess(launch, p, location.toOSString(),
+					processAttributes);
+		}
+		if (p == null || process == null) {
+			if (p != null)
+				p.destroy();
+			throw new CoreException(new Status(IStatus.ERROR,
+					IExternalToolConstants.PLUGIN_ID,
+					IExternalToolConstants.ERR_INTERNAL_ERROR,
+					ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null));
+		}
+		process.setAttribute(IProcess.ATTR_CMDLINE,
+				generateCommandLine(cmdLine));
+
+		if (configuration.getAttribute(ATTR_LAUNCH_IN_BACKGROUND, true)) {
+			// refresh resources after process finishes
+			String scope = configuration.getAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String)null);
+			if (scope != null) {
+				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, process);
+				refresher.startBackgroundRefresh();
+			}
+		} else {
+			// wait for process to exit
+			while (!process.isTerminated()) {
+				try {
+					if (monitor.isCanceled()) {
+						process.terminate();
+						break;
+					}
+					Thread.sleep(50);
+				} catch (InterruptedException e) {
+				}
+			}
+
+			// refresh resources
+			RefreshUtil.refreshResources(configuration, monitor);
+		}
+	}
+
+	private String generateCommandLine(String[] commandLine) {
+		if (commandLine.length < 1)
+			return ""; //$NON-NLS-1$
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < commandLine.length; i++) {
+			buf.append(' ');
+			char[] characters = commandLine[i].toCharArray();
+			StringBuffer command = new StringBuffer();
+			boolean containsSpace = false;
+			for (int j = 0; j < characters.length; j++) {
+				char character = characters[j];
+				if (character == '\"') {
+					command.append('\\');
+				} else if (character == ' ') {
+					containsSpace = true;
+				}
+				command.append(character);
+			}
+			if (containsSpace) {
+				buf.append('\"');
+				buf.append(command);
+				buf.append('\"');
+			} else {
+				buf.append(command);
+			}
+		}
+		return buf.toString();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder
+	 * (org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getBuildOrder(ILaunchConfiguration configuration,
+			String mode) throws CoreException {
+		IProject[] projects = ExternalToolsCoreUtil.getBuildProjects(
+				configuration, null);
+		if (projects == null) {
+			return null;
+		}
+		boolean isRef = ExternalToolsCoreUtil.isIncludeReferencedProjects(
+				configuration, null);
+		if (isRef) {
+			return computeReferencedBuildOrder(projects);
+		}
+		return computeBuildOrder(projects);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java
new file mode 100644
index 0000000..f3b7acd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/BuilderCoreUtils.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.model;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.registry.ExternalToolMigration;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+
+/**
+ * Utility methods for working with external tool project builders.
+ */
+public class BuilderCoreUtils {
+
+	public static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle"; //$NON-NLS-1$
+
+	/**
+	 * Constant used to find a builder using the 3.0-interim format
+	 */
+	public static final String BUILDER_FOLDER_NAME = ".externalToolBuilders"; //$NON-NLS-1$
+	/**
+	 * Constant used to represent the current project in the 3.0-final format.
+	 */
+	public static final String PROJECT_TAG = "<project>"; //$NON-NLS-1$
+
+	public static final String VERSION_1_0 = "1.0"; //$NON-NLS-1$
+	public static final String VERSION_2_1 = "2.1"; //$NON-NLS-1$
+	// The format shipped up to and including Eclipse 3.0 RC1
+	public static final String VERSION_3_0_interim = "3.0.interim"; //$NON-NLS-1$
+	// The format shipped in Eclipse 3.0 final
+	public static final String VERSION_3_0_final = "3.0"; //$NON-NLS-1$
+
+	private static final String BUILD_TYPE_SEPARATOR = ","; //$NON-NLS-1$
+	private static final int[] DEFAULT_BUILD_TYPES = new int[] {
+			IncrementalProjectBuilder.INCREMENTAL_BUILD,
+			IncrementalProjectBuilder.FULL_BUILD };
+
+	/**
+	 * Returns a launch configuration from the given ICommand arguments. If the
+	 * given arguments are from an old-style external tool, an unsaved working
+	 * copy will be created from the arguments and returned.
+	 * 
+	 * @param commandArgs
+	 *            the builder ICommand arguments
+	 * @return a launch configuration, a launch configuration working copy, or
+	 *         <code>null</code> if not possible.
+	 */
+	public static ILaunchConfiguration configFromBuildCommandArgs(
+			IProject project, Map commandArgs, String[] version) {
+		String configHandle = (String) commandArgs.get(LAUNCH_CONFIG_HANDLE);
+		if (configHandle == null) {
+			// Probably an old-style (Eclipse 1.0 or 2.0) external tool. Try to
+			// migrate.
+			version[0] = VERSION_1_0;
+			return ExternalToolMigration.configFromArgumentMap(commandArgs);
+		}
+		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+		ILaunchConfiguration configuration = null;
+		if (configHandle.startsWith(PROJECT_TAG)) {
+			version[0] = VERSION_3_0_final;
+			IPath path = new Path(configHandle);
+			IFile file = project.getFile(path.removeFirstSegments(1));
+			if (file.exists()) {
+				configuration = manager.getLaunchConfiguration(file);
+			}
+		} else {
+			// Try treating the handle as a file name.
+			// This is the format used in 3.0 RC1.
+			IPath path = new Path(BUILDER_FOLDER_NAME).append(configHandle);
+			IFile file = project.getFile(path);
+			if (file.exists()) {
+				version[0] = VERSION_3_0_interim;
+				configuration = manager.getLaunchConfiguration(file);
+			} else {
+				try {
+					// Treat the configHandle as a memento. This is the format
+					// used in Eclipse 2.1.
+					configuration = manager
+							.getLaunchConfiguration(configHandle);
+				} catch (CoreException e) {
+				}
+				if (configuration != null) {
+					version[0] = VERSION_2_1;
+				}
+			}
+		}
+		return configuration;
+	}
+
+	public static void configureTriggers(ILaunchConfiguration config,
+			ICommand newCommand) throws CoreException {
+		newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD, false);
+		newCommand.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD,
+				false);
+		newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
+		newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
+		String buildKinds = config.getAttribute(
+				IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) null);
+		int[] triggers = BuilderCoreUtils.buildTypesToArray(buildKinds);
+		for (int i = 0; i < triggers.length; i++) {
+			switch (triggers[i]) {
+			case IncrementalProjectBuilder.FULL_BUILD:
+				newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD,
+						true);
+				break;
+			case IncrementalProjectBuilder.INCREMENTAL_BUILD:
+				newCommand.setBuilding(
+						IncrementalProjectBuilder.INCREMENTAL_BUILD, true);
+				break;
+			case IncrementalProjectBuilder.AUTO_BUILD:
+				newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD,
+						true);
+				break;
+			case IncrementalProjectBuilder.CLEAN_BUILD:
+				newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD,
+						true);
+				break;
+			}
+		}
+		if (!config.getAttribute(
+				IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false)) {
+			ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
+			copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED,
+					true);
+			copy.doSave();
+		}
+	}
+
+	/**
+	 * Returns whether the given configuration is an "unmigrated" builder.
+	 * Unmigrated builders are external tools that are stored in an old format
+	 * but have not been migrated by the user. Old format builders are always
+	 * translated into launch config working copies in memory, but they're not
+	 * considered "migrated" until the config has been saved and the project
+	 * spec updated.
+	 * 
+	 * @param config
+	 *            the config to examine
+	 * @return whether the given config represents an unmigrated builder
+	 */
+	public static boolean isUnmigratedConfig(ILaunchConfiguration config) {
+		return config.isWorkingCopy()
+				&& ((ILaunchConfigurationWorkingCopy) config).getOriginal() == null;
+	}
+
+	/**
+	 * Converts the given config to a build command which is stored in the given
+	 * command.
+	 * 
+	 * @return the configured build command
+	 */
+	public static ICommand toBuildCommand(IProject project,
+			ILaunchConfiguration config, ICommand command) throws CoreException {
+		Map args = null;
+		if (isUnmigratedConfig(config)) {
+			// This config represents an old external tool builder that hasn't
+			// been edited. Try to find the old ICommand and reuse the
+			// arguments.
+			// The goal here is to not change the storage format of old,
+			// unedited builders.
+			ICommand[] commands = project.getDescription().getBuildSpec();
+			for (int i = 0; i < commands.length; i++) {
+				ICommand projectCommand = commands[i];
+				String name = ExternalToolMigration
+						.getNameFromCommandArgs(projectCommand.getArguments());
+				if (name != null && name.equals(config.getName())) {
+					args = projectCommand.getArguments();
+					break;
+				}
+			}
+		} else {
+			if (config instanceof ILaunchConfigurationWorkingCopy) {
+				ILaunchConfigurationWorkingCopy workingCopy = (ILaunchConfigurationWorkingCopy) config;
+				if (workingCopy.getOriginal() != null) {
+					config = workingCopy.getOriginal();
+				}
+			}
+			args = new HashMap();
+			// Launch configuration builders are stored with a project-relative
+			// path
+			StringBuffer buffer = new StringBuffer(PROJECT_TAG);
+			// Append the project-relative path (workspace path minus first
+			// segment)
+			buffer.append('/').append(
+					config.getFile().getFullPath().removeFirstSegments(1));
+			args.put(LAUNCH_CONFIG_HANDLE, buffer.toString());
+		}
+		command.setBuilderName(ExternalToolBuilder.ID);
+		command.setArguments(args);
+		return command;
+	}
+
+	/**
+	 * Returns the folder where project builders should be stored or
+	 * <code>null</code> if the folder could not be created
+	 */
+	public static IFolder getBuilderFolder(IProject project, boolean create) {
+		IFolder folder = project.getFolder(BUILDER_FOLDER_NAME);
+		if (!folder.exists() && create) {
+			try {
+				folder.create(true, true, new NullProgressMonitor());
+			} catch (CoreException e) {
+				return null;
+			}
+		}
+		return folder;
+	}
+
+	/**
+	 * Migrates the launch configuration working copy, which is based on an old-
+	 * style external tool builder, to a new, saved launch configuration. The
+	 * returned launch configuration will contain the same attributes as the
+	 * given working copy with the exception of the configuration name, which
+	 * may be changed during the migration. The name of the configuration will
+	 * only be changed if the current name is not a valid name for a saved
+	 * config.
+	 * 
+	 * @param workingCopy
+	 *            the launch configuration containing attributes from an
+	 *            old-style project builder.
+	 * @return ILaunchConfiguration a new, saved launch configuration whose
+	 *         attributes match those of the given working copy as well as
+	 *         possible
+	 * @throws CoreException
+	 *             if an exception occurs while attempting to save the new
+	 *             launch configuration
+	 */
+	public static ILaunchConfiguration migrateBuilderConfiguration(
+			IProject project, ILaunchConfigurationWorkingCopy workingCopy)
+			throws CoreException {
+		workingCopy.setContainer(getBuilderFolder(project, true));
+		// Before saving, make sure the name is valid
+		String name = workingCopy.getName();
+		name = name.replace('/', '.');
+		if (name.charAt(0) == ('.')) {
+			name = name.substring(1);
+		}
+		IStatus status = ResourcesPlugin.getWorkspace().validateName(name,
+				IResource.FILE);
+		if (!status.isOK()) {
+			name = "ExternalTool"; //$NON-NLS-1$
+		}
+		name = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
+		workingCopy.rename(name);
+		return workingCopy.doSave();
+	}
+
+	/**
+	 * Converts the build types string into an array of build kinds.
+	 * 
+	 * @param buildTypes
+	 *            the string of built types to convert
+	 * @return the array of build kinds.
+	 */
+	public static int[] buildTypesToArray(String buildTypes) {
+		if (buildTypes == null || buildTypes.length() == 0) {
+			return DEFAULT_BUILD_TYPES;
+		}
+
+		int count = 0;
+		boolean incremental = false;
+		boolean full = false;
+		boolean auto = false;
+		boolean clean = false;
+
+		StringTokenizer tokenizer = new StringTokenizer(buildTypes,
+				BUILD_TYPE_SEPARATOR);
+		while (tokenizer.hasMoreTokens()) {
+			String token = tokenizer.nextToken();
+			if (IExternalToolConstants.BUILD_TYPE_INCREMENTAL.equals(token)) {
+				if (!incremental) {
+					incremental = true;
+					count++;
+				}
+			} else if (IExternalToolConstants.BUILD_TYPE_FULL.equals(token)) {
+				if (!full) {
+					full = true;
+					count++;
+				}
+			} else if (IExternalToolConstants.BUILD_TYPE_AUTO.equals(token)) {
+				if (!auto) {
+					auto = true;
+					count++;
+				}
+			} else if (IExternalToolConstants.BUILD_TYPE_CLEAN.equals(token)) {
+				if (!clean) {
+					clean = true;
+					count++;
+				}
+			}
+		}
+
+		int[] results = new int[count];
+		count = 0;
+		if (incremental) {
+			results[count] = IncrementalProjectBuilder.INCREMENTAL_BUILD;
+			count++;
+		}
+		if (full) {
+			results[count] = IncrementalProjectBuilder.FULL_BUILD;
+			count++;
+		}
+		if (auto) {
+			results[count] = IncrementalProjectBuilder.AUTO_BUILD;
+			count++;
+		}
+		if (clean) {
+			results[count] = IncrementalProjectBuilder.CLEAN_BUILD;
+			count++;
+		}
+
+		return results;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java
new file mode 100644
index 0000000..244a833
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolBuilder.java
@@ -0,0 +1,290 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Matthew Conway  - Bug 175186
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.model;
+
+
+import java.util.Map;
+
+import org.eclipse.core.externaltools.internal.ExternalToolsCore;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
+import org.eclipse.core.externaltools.internal.registry.ExternalToolMigration;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * This project builder implementation will run an external tool during the
+ * build process. 
+ */
+public final class ExternalToolBuilder extends IncrementalProjectBuilder {
+	private final class IgnoreTeamPrivateChanges implements IResourceDeltaVisitor {
+		private boolean[] fTrueChange;
+		private IgnoreTeamPrivateChanges(boolean[] trueChange) {
+			super();
+			fTrueChange= trueChange;
+		}
+		public boolean visit(IResourceDelta visitDelta) throws CoreException {
+			IResource resource= visitDelta.getResource();
+			if (resource instanceof IFile) {
+				fTrueChange[0]= true;
+				return false;
+			}
+			return true;
+		}
+	}
+
+	public static final String ID = "org.eclipse.ui.externaltools.ExternalToolBuilder"; //$NON-NLS-1$;
+
+	private static String buildType = IExternalToolConstants.BUILD_TYPE_NONE;
+	
+	private static IProject buildProject= null;
+    private static IResourceDelta buildDelta= null;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.events.InternalBuilder#build(int, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {		
+		if (ExternalToolsCore.getDefault().getBundle().getState() != Bundle.ACTIVE) {
+			return null;
+		}
+		
+		ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), args, new String[1]);
+        if (config == null) {
+            throw ExternalToolsCore.newError(ExternalToolsModelMessages.ExternalToolBuilder_0, null);
+        }
+		IProject[] projectsWithinScope= null;
+		IResource[] resources = ExternalToolsCoreUtil.getResourcesForBuildScope(config);
+		if (resources != null) {
+			projectsWithinScope= new IProject[resources.length];
+			for (int i = 0; i < resources.length; i++) {
+				projectsWithinScope[i]= resources[i].getProject();
+			}
+		}
+        boolean kindCompatible= commandConfiguredForKind(config, kind);
+        if (kindCompatible && configEnabled(config)) {
+            doBuildBasedOnScope(resources, kind, config, monitor);
+        }
+        
+		return projectsWithinScope;
+	}
+
+    private boolean commandConfiguredForKind(ILaunchConfiguration config, int kind) {
+        try {
+            if (!(config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
+                ICommand command= getCommand();
+                //adapt the builder command to make use of the 3.1 support for setting command build kinds
+                //this will only happen once for builder/command defined before the support existed
+                BuilderCoreUtils.configureTriggers(config, command);
+                IProjectDescription desc= getProject().getDescription();
+                ICommand[] commands= desc.getBuildSpec();
+                int index= getBuilderCommandIndex(commands, command);
+                if (index != -1) {
+                    commands[index]= command;
+                    desc.setBuildSpec(commands);
+                    getProject().setDescription(desc, null);
+                    ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
+                    copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true);
+                    copy.doSave();
+                }
+                return command.isBuilding(kind);
+            }
+        } catch (CoreException e) {
+           ExternalToolsCore.log(e);
+           return true;
+        }
+        return true;
+    }
+    
+    private int getBuilderCommandIndex(ICommand[] buildSpec, ICommand command) {
+        Map commandArgs= command.getArguments();
+        if (commandArgs == null) {
+            return -1;
+        }
+        String handle= (String) commandArgs.get(BuilderCoreUtils.LAUNCH_CONFIG_HANDLE);
+        if (handle == null) {
+            return -1;
+        }
+        for (int i = 0; i < buildSpec.length; ++i) {
+            ICommand buildSpecCommand= buildSpec[i];
+            if (ID.equals(buildSpecCommand.getBuilderName())) {
+                Map buildSpecArgs= buildSpecCommand.getArguments();
+                if (buildSpecArgs != null) {
+                    String buildSpecHandle= (String) buildSpecArgs.get(BuilderCoreUtils.LAUNCH_CONFIG_HANDLE);
+                    if (handle.equals(buildSpecHandle)) {
+                        return i;
+                    }
+                }
+            }
+        }
+        return -1;
+    }
+
+	/**
+	 * Returns whether the given builder config is enabled or not.
+	 * 
+	 * @param config the config to examine
+	 * @return whether the config is enabled
+	 */
+	private boolean configEnabled(ILaunchConfiguration config) {
+		try {
+			return ExternalToolsCoreUtil.isBuilderEnabled(config);
+		} catch (CoreException e) {
+			ExternalToolsCore.log(e);
+		}
+		return true;
+	}
+
+	private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
+		boolean buildForChange = true;
+		if (kind != FULL_BUILD) { //scope not applied for full builds
+			if (resources != null && resources.length > 0) {
+				buildForChange = buildScopeIndicatesBuild(resources);
+			}
+		}
+
+		if (buildForChange) {
+			launchBuild(kind, config, monitor);
+		}
+	}
+	
+	private void launchBuild(int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
+		monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, new String[] { config.getName()}));
+		buildStarted(kind);
+		// The default value for "launch in background" is true in debug core. If
+		// the user doesn't go through the UI, the new attribute won't be set. This means
+		// that existing Ant builders will try to run in the background (and likely conflict with
+		// each other) without migration.
+		config= ExternalToolMigration.migrateRunInBackground(config);
+		config.launch(ILaunchManager.RUN_MODE, monitor);
+		buildEnded();
+	}
+
+	/**
+	 * Returns the build type being performed if the
+	 * external tool is being run as a project builder.
+	 * 
+	 * @return one of the <code>IExternalToolConstants.BUILD_TYPE_*</code> constants.
+	 */
+	public static String getBuildType() {
+		return buildType;
+	}
+	
+	/**
+	 * Returns the project that is being built and has triggered the current external
+	 * tool builder. <code>null</code> is returned if no build is currently occurring.
+	 * 
+	 * @return project being built or <code>null</code>.
+	 */
+	public static IProject getBuildProject() {
+		return buildProject;
+	}
+
+    /**
+     * Returns the <code>IResourceDelta</code> that is being built and has triggered the current external
+     * tool builder. <code>null</code> is returned if no build is currently occurring.
+     * 
+     * @return resource delta for the build or <code>null</code>
+     */
+    public static IResourceDelta getBuildDelta() {
+        return buildDelta;
+    }
+    
+	/**
+	 * Stores the currently active build kind and build project when a build begins
+	 * @param buildKind
+	 */
+	private void buildStarted(int buildKind) {
+		switch (buildKind) {
+			case IncrementalProjectBuilder.INCREMENTAL_BUILD :
+				buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
+				buildDelta = getDelta(getProject());
+				break;
+			case IncrementalProjectBuilder.FULL_BUILD :
+				buildType = IExternalToolConstants.BUILD_TYPE_FULL;
+				break;
+			case IncrementalProjectBuilder.AUTO_BUILD :
+				buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
+				buildDelta = getDelta(getProject());
+				break;
+            case IncrementalProjectBuilder.CLEAN_BUILD :
+                buildType = IExternalToolConstants.BUILD_TYPE_CLEAN;
+                break;
+			default :
+				buildType = IExternalToolConstants.BUILD_TYPE_NONE;
+				break;
+		}
+		buildProject= getProject();
+	}
+	
+	/**
+	 * Clears the current build kind, build project and build delta when a build finishes.
+	 */
+	private void buildEnded() {
+		buildType= IExternalToolConstants.BUILD_TYPE_NONE;
+		buildProject= null;
+        buildDelta= null;
+	}
+	
+	private boolean buildScopeIndicatesBuild(IResource[] resources) {
+		for (int i = 0; i < resources.length; i++) {
+			IResourceDelta delta = getDelta(resources[i].getProject());
+			if (delta == null) {
+				//project just added to the workspace..no previous build tree
+				return true;
+			} 
+			IPath path= resources[i].getProjectRelativePath();
+			IResourceDelta change= delta.findMember(path);
+			if (change != null) {
+				final boolean[] trueChange= new boolean[1];
+				trueChange[0]= false;
+				try {
+					change.accept(new IgnoreTeamPrivateChanges(trueChange));
+				} catch (CoreException e) {
+					ExternalToolsCore.log("Internal error resolving changed resources during build", e); //$NON-NLS-1$
+				}
+				
+				return trueChange[0]; //filtered out team private changes
+			}
+		}
+		return false;
+	}
+    
+    protected void clean(IProgressMonitor monitor) throws CoreException {
+	    ICommand command= getCommand();
+        ILaunchConfiguration config= BuilderCoreUtils.configFromBuildCommandArgs(getProject(), command.getArguments(), new String[1]);
+    	if (!configEnabled(config)) {
+	    	return;
+	    }
+        
+        if ((!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
+            //old behavior
+            super.clean(monitor);
+            return;
+        }
+	
+		launchBuild(IncrementalProjectBuilder.CLEAN_BUILD, config, monitor);
+    }
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java
new file mode 100644
index 0000000..9e38b50
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.java
@@ -0,0 +1,24 @@
+/**********************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.core.externaltools.internal.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ExternalToolsModelMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.model.ExternalToolsModelMessages";//$NON-NLS-1$
+    
+	public static String ExternalToolBuilder_Running__0_____1;
+	public static String ExternalToolBuilder_0;
+	
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, ExternalToolsModelMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties
new file mode 100644
index 0000000..0f16fe7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/model/ExternalToolsModelMessages.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+ExternalToolBuilder_Running__0_____1=Running {0}...
+ExternalToolBuilder_0=The builder launch configuration could not be found.
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java
new file mode 100644
index 0000000..a06bc87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolMigration.java
@@ -0,0 +1,410 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.externaltools.internal.registry;
+
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.externaltools.internal.ExternalToolsCore;
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.RefreshUtil;
+
+
+/**
+ * Responsible reading an old external tool format and creating
+ * and migrating it to create a new external tool.
+ */
+public final class ExternalToolMigration {
+	/**
+	 * Structure to represent a variable definition within a
+	 * source string.
+	 */
+	public static final class VariableDefinition {
+		/**
+		 * Index in the source text where the variable started
+		 * or <code>-1</code> if no valid variable start tag 
+		 * identifier found.
+		 */
+		public int start = -1;
+		
+		/**
+		 * Index in the source text of the character following
+		 * the end of the variable or <code>-1</code> if no 
+		 * valid variable end tag found.
+		 */
+		public int end = -1;
+		
+		/**
+		 * The variable's name found in the source text, or
+		 * <code>null</code> if no valid variable found.
+		 */
+		public String name = null;
+		
+		/**
+		 * The variable's argument found in the source text, or
+		 * <code>null</code> if no valid variable found or if
+		 * the variable did not specify an argument
+		 */
+		public String argument = null;
+		
+		/**
+		 * Create an initialized variable definition.
+		 */
+		private VariableDefinition() {
+			super();
+		}
+	}
+	
+	/**
+	 * Variable tag indentifiers
+	 */
+	private static final String VAR_TAG_START = "${"; //$NON-NLS-1$
+	private static final String VAR_TAG_END = "}"; //$NON-NLS-1$
+	private static final String VAR_TAG_SEP = ":"; //$NON-NLS-1$	
+	
+	/**
+	 * External tool type for Ant build files (value <code>antBuildType</code>).
+	 */
+	public static final String TOOL_TYPE_ANT_BUILD = "antBuildType"; //$NON-NLS-1$;
+	/**
+	 * Ant builder launch configuration type identifier. Ant project builders
+	 * are of this type.
+	 */
+	public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$NON-NLS-1$
+		
+	public static final String RUN_TARGETS_ATTRIBUTE = TOOL_TYPE_ANT_BUILD + ".runTargets"; //$NON-NLS-1$;
+
+	/**
+	* String attribute indicating the Ant targets to execute. Default value is
+	 * <code>null</code> which indicates that the default target is to be
+	 * executed. Format is a comma separated listing of targets.
+	 * NOTE: This value is copied here from org.eclipse.ant.ui.internal.IAntLaunchConfigurationConstants.
+	 * 		Ant no longer resides in External Tools and this plug-in. This value is kept here only
+	 * 		for migration.
+	 */
+	public static final String ATTR_ANT_TARGETS = IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
+	
+	/*
+	 * 2.0 External Tool Tags
+	 */
+	public static final String TAG_TOOL_TYPE = "!{tool_type}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_NAME = "!{tool_name}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_LOCATION = "!{tool_loc}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_ARGUMENTS = "!{tool_args}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_DIRECTORY = "!{tool_dir}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_REFRESH = "!{tool_refresh}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_SHOW_LOG = "!{tool_show_log}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_BUILD_TYPES = "!{tool_build_types}"; //$NON-NLS-1$
+	public static final String TAG_TOOL_BLOCK = "!{tool_block}"; //$NON-NLS-1$
+
+	// Known kind of tools
+	private static final String TOOL_TYPE_ANT = "org.eclipse.ui.externaltools.type.ant"; //$NON-NLS-1$
+	private static final String TOOL_TYPE_PROGRAM = "org.eclipse.ui.externaltools.type.program"; //$NON-NLS-1$
+
+	/*
+	 * 2.1 External Tool Keys
+	 */
+	public static final String TAG_TYPE = "type"; //$NON-NLS-1$
+	public static final String TAG_NAME = "name"; //$NON-NLS-1$
+	public static final String TAG_LOCATION = "location"; //$NON-NLS-1$
+	public static final String TAG_WORK_DIR = "workDirectory"; //$NON-NLS-1$
+	public static final String TAG_CAPTURE_OUTPUT = "captureOutput"; //$NON-NLS-1$
+	public static final String TAG_SHOW_CONSOLE = "showConsole"; //$NON-NLS-1$
+	public static final String TAG_RUN_BKGRND = "runInBackground"; //$NON-NLS-1$
+	public static final String TAG_PROMPT_ARGS = "promptForArguments"; //$NON-NLS-1$
+	public static final String TAG_ARGS = "arguments"; //$NON-NLS-1$
+	public static final String TAG_REFRESH_SCOPE = "refreshScope"; //$NON-NLS-1$
+	public static final String TAG_REFRESH_RECURSIVE = "refreshRecursive"; //$NON-NLS-1$
+	public static final String TAG_RUN_BUILD_KINDS = "runForBuildKinds"; //$NON-NLS-1$
+	public static final String TAG_EXTRA_ATTR = "extraAttribute"; //$NON-NLS-1$
+	public static final String TAG_VERSION = "version"; //$NON-NLS-1$
+
+	private static final String EXTRA_ATTR_SEPARATOR = "="; //$NON-NLS-1$
+
+	private static final String VERSION_21 = "2.1"; //$NON-NLS-1$;
+
+	private static final String TRUE = "true"; //$NON-NLS-1$
+	private static final String FALSE = "false"; //$NON-NLS-1$
+
+	/**
+	 * Allows no instances.
+	 */
+	private ExternalToolMigration() {
+		super();
+	}
+
+	/**
+	 * Returns a  launch configuration working copy from the argument map or
+	 * <code>null</code> if the given map cannot be interpreted as a 2.0 or 2.1
+	 * branch external tool. The returned working copy will be unsaved and its
+	 * location will be set to the metadata area.
+	 */
+	public static ILaunchConfigurationWorkingCopy configFromArgumentMap(Map args) {
+		String version = (String) args.get(TAG_VERSION);
+		if (VERSION_21.equals(version)) {
+			return configFrom21ArgumentMap(args);
+		}
+		return configFrom20ArgumentMap(args);
+	}
+
+	public static ILaunchConfigurationWorkingCopy configFrom21ArgumentMap(Map commandArgs) {
+		String name = (String) commandArgs.get(TAG_NAME);
+		String type = (String) commandArgs.get(TAG_TYPE);
+		
+		ILaunchConfigurationWorkingCopy config = newConfig(type, name);
+		if (config == null) {
+			return null;
+		}
+		
+		config.setAttribute(IExternalToolConstants.ATTR_LOCATION, (String) commandArgs.get(TAG_LOCATION));
+		config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) commandArgs.get(TAG_WORK_DIR));
+		config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(commandArgs.get(TAG_CAPTURE_OUTPUT)));
+		config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(commandArgs.get(TAG_SHOW_CONSOLE)));
+		config.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, TRUE.equals(commandArgs.get(TAG_RUN_BKGRND)));
+		config.setAttribute(IExternalToolConstants.ATTR_PROMPT_FOR_ARGUMENTS, TRUE.equals(commandArgs.get(TAG_PROMPT_ARGS)));
+		config.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, (String) commandArgs.get(TAG_REFRESH_SCOPE));
+		config.setAttribute(RefreshUtil.ATTR_REFRESH_RECURSIVE, TRUE.equals(commandArgs.get(TAG_REFRESH_RECURSIVE)));
+
+		config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) commandArgs.get(TAG_RUN_BUILD_KINDS));
+		
+		String args = (String) commandArgs.get(TAG_ARGS);
+		if (args != null) {
+			config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, args);
+		}
+
+		String extraAttributes = (String) commandArgs.get(TAG_EXTRA_ATTR);
+		if (extraAttributes != null) {
+			StringTokenizer tokenizer = new StringTokenizer(extraAttributes, EXTRA_ATTR_SEPARATOR);
+			while (tokenizer.hasMoreTokens()) {
+				String key = tokenizer.nextToken();
+				if (!tokenizer.hasMoreTokens())
+					break;
+				String value = tokenizer.nextToken();
+				if (key.equals(RUN_TARGETS_ATTRIBUTE)) {
+					// 2.1 implementation only defined 1 "extra attribute"
+					config.setAttribute(ATTR_ANT_TARGETS, value);
+				}
+			}
+		}
+		return config;
+	}
+
+	/**
+	 * Creates an external tool from the map.
+	 */
+	public static ILaunchConfigurationWorkingCopy configFrom20ArgumentMap(Map args) {
+		// Update the type...
+		String type = (String) args.get(TAG_TOOL_TYPE);
+		if (TOOL_TYPE_ANT.equals(type)) {
+			type = TOOL_TYPE_ANT_BUILD;
+		} else if (TOOL_TYPE_PROGRAM.equals(type)){
+			type = IExternalToolConstants.TOOL_TYPE_PROGRAM;
+		} else {
+			return null;
+		}
+
+		String name = (String) args.get(TAG_TOOL_NAME);
+		
+		ILaunchConfigurationWorkingCopy config = newConfig(type, name);
+		if (config == null) {
+			return null;
+		}
+
+		// Update the location...
+		String location = (String) args.get(TAG_TOOL_LOCATION);
+		config.setAttribute(IExternalToolConstants.ATTR_LOCATION, location);
+
+		// Update the refresh scope...
+		String refresh = (String) args.get(TAG_TOOL_REFRESH);
+		if (refresh != null) {
+			VariableDefinition varDef = extractVariableDefinition(refresh, 0);
+			if ("none".equals(varDef.name)) { //$NON-NLS-1$
+				refresh = null;
+			}
+			config.setAttribute(RefreshUtil.ATTR_REFRESH_SCOPE, refresh);
+		}
+
+		// Update the arguments
+		String arguments = (String) args.get(TAG_TOOL_ARGUMENTS);
+		if (type.equals(TOOL_TYPE_ANT_BUILD)) {
+			String targetNames = null;
+			if (arguments != null) {
+				int start = 0;
+				ArrayList targets = new ArrayList();
+				StringBuffer buffer = new StringBuffer();
+				VariableDefinition varDef = extractVariableDefinition(arguments, start);
+				while (varDef.end != -1) {
+					if ("ant_target".equals(varDef.name) && varDef.argument != null) { //$NON-NLS-1$
+						targets.add(varDef.argument);
+						buffer.append(arguments.substring(start, varDef.start));
+					} else {
+						buffer.append(arguments.substring(start, varDef.end));
+					}
+					start = varDef.end;
+					varDef = extractVariableDefinition(arguments, start);
+				}
+				buffer.append(arguments.substring(start, arguments.length()));
+				arguments = buffer.toString();
+	
+				buffer.setLength(0);
+				for (int i = 0; i < targets.size(); i++) {
+					String target = (String) targets.get(i);
+					if (target != null && target.length() > 0) {
+						buffer.append(target);
+						buffer.append(","); //$NON-NLS-1$
+					}
+				}
+				targetNames = buffer.toString();
+			}
+			if (targetNames != null && targetNames.length() > 0) {
+				config.setAttribute(ATTR_ANT_TARGETS, targetNames);
+			}
+		}
+		config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, arguments);
+
+		// Collect the rest of the information
+		config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
+		config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
+		config.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, FALSE.equals(args.get(TAG_TOOL_BLOCK)));
+		String buildKinds= (String) args.get(TAG_TOOL_BUILD_TYPES);
+		if (buildKinds != null) {
+			buildKinds= buildKinds.replace(';', ','); // Replace the old separator with the new
+		}
+		config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, buildKinds);
+		config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) args.get(TAG_TOOL_DIRECTORY));
+		return config;
+	}
+
+	/**
+	 * Returns a new working copy with the given external tool name and external
+	 * tool type or <code>null</code> if no config could be created.
+	 */
+	private static ILaunchConfigurationWorkingCopy newConfig(String type, String name) {
+		if (type == null || name == null) {
+			return null;
+		}
+		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
+		ILaunchConfigurationType configType;
+		if (TOOL_TYPE_ANT_BUILD.equals(type)) {
+			configType = manager.getLaunchConfigurationType(ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE);
+		} else if (IExternalToolConstants.TOOL_TYPE_PROGRAM.equals(type)) {
+			configType = manager.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE);
+		} else {
+			return null;
+		}
+		try {
+			if (configType != null) {
+				return configType.newInstance(null, name);
+			}
+		} catch (CoreException e) {
+			ExternalToolsCore.log(e);
+		}
+		return null;
+	}
+	
+	/**
+	 * Returns the tool name extracted from the given command argument map.
+	 * Extraction is attempted using 2.0 and 2.1 external tool formats.
+	 */
+	public static String getNameFromCommandArgs(Map commandArgs) {
+		String name= (String) commandArgs.get(TAG_NAME);
+		if (name == null) {
+			name= (String) commandArgs.get(TAG_TOOL_NAME);
+		}
+		return name;
+	}
+	
+	/**
+	 * Migrate the old RUN_IN_BACKGROUND launch config attribute to the new
+	 * LAUNCH_IN_BACKGROUND attribute provided by the debug ui plugin.
+	 * 
+	 * @param config the config to migrate
+	 * @return the migrated config
+	 */
+	public static ILaunchConfiguration migrateRunInBackground(ILaunchConfiguration config) {
+		String noValueFlag= "NoValue"; //$NON-NLS-1$
+		String attr= null;
+		try {
+			attr = config.getAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, noValueFlag);
+		} catch (CoreException e) {
+			// Exception will occur if the attribute is already set because the attribute is actually a boolean.
+			// No migration necessary.
+			return config;
+		}
+		if (noValueFlag.equals(attr)) {
+			//the old constant
+			String ATTR_RUN_IN_BACKGROUND= IExternalToolConstants.UI_PLUGIN_ID + ".ATTR_RUN_IN_BACKGROUND"; //$NON-NLS-1$
+			boolean runInBackground= false;
+			try {
+				runInBackground = config.getAttribute(ATTR_RUN_IN_BACKGROUND, runInBackground);
+			} catch (CoreException e) {
+				ExternalToolsCore.log(ExternalToolsMigrationMessages.ExternalToolMigration_37, e);
+			}
+			try {
+				ILaunchConfigurationWorkingCopy workingCopy= config.getWorkingCopy();
+				workingCopy.setAttribute(IExternalToolConstants.ATTR_LAUNCH_IN_BACKGROUND, runInBackground);
+				config= workingCopy.doSave();
+			} catch (CoreException e) {
+				ExternalToolsCore.log(ExternalToolsMigrationMessages.ExternalToolMigration_38, e);
+			}
+		}
+		return config;
+	}
+	
+	/**
+	 * Extracts a variable name and argument from the given string.
+	 * 
+	 * @param text the source text to parse for a variable tag
+	 * @param start the index in the string to start the search
+	 * @return the variable definition
+	 */
+	public static VariableDefinition extractVariableDefinition(String text, int start) {
+		VariableDefinition varDef = new VariableDefinition();
+		
+		varDef.start = text.indexOf(VAR_TAG_START, start);
+		if (varDef.start < 0){
+			return varDef;
+		}
+		start = varDef.start + VAR_TAG_START.length();
+		
+		int end = text.indexOf(VAR_TAG_END, start);
+		if (end < 0) {
+			return varDef;
+		}
+		varDef.end = end + VAR_TAG_END.length();
+		if (end == start) {
+			return varDef;
+		}
+	
+		int mid = text.indexOf(VAR_TAG_SEP, start);
+		if (mid < 0 || mid > end) {
+			varDef.name = text.substring(start, end);
+		} else {
+			if (mid > start) {
+				varDef.name = text.substring(start, mid);
+			}
+			mid = mid + VAR_TAG_SEP.length();
+			if (mid < end) {
+				varDef.argument = text.substring(mid, end);
+			}
+		}
+		
+		return varDef;
+	}	
+}
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java
new file mode 100644
index 0000000..3e5fa46
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.java
@@ -0,0 +1,25 @@
+/**********************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * IBM - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.core.externaltools.internal.registry;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ExternalToolsMigrationMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.core.externaltools.internal.registry.launchConfigurations.ExternalToolsUIMessages";//$NON-NLS-1$
+
+	public static String ExternalToolMigration_37;
+	public static String ExternalToolMigration_38;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME,
+				ExternalToolsMigrationMessages.class);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties
new file mode 100644
index 0000000..1e18e67
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.externaltools/src/org/eclipse/core/externaltools/internal/registry/ExternalToolsMigrationMessages.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+ExternalToolMigration_37=An exception occurred accessing external tool\'s \"run in background\" attribute
+ExternalToolMigration_38=An exception occurred attempting to migrate external tool\'s \"run in background\" attribute
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/.settings/.api_filters b/eclipse/plugins/org.eclipse.core.filebuffers/.settings/.api_filters
deleted file mode 100644
index 9bea097..0000000
--- a/eclipse/plugins/org.eclipse.core.filebuffers/.settings/.api_filters
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.core.filebuffers" version="2">
-    <resource path="src/org/eclipse/core/filebuffers/ITextFileBufferManager.java" type="org.eclipse.core.filebuffers.ITextFileBufferManager">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.core.filebuffers.ITextFileBufferManager"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
index c04eb48..c5eddf5 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.filebuffers; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Activator: org.eclipse.core.internal.filebuffers.FileBuffersPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ISynchronizationContext.java b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ISynchronizationContext.java
index 86dc126..8b86daa 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ISynchronizationContext.java
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/filebuffers/ISynchronizationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,20 +11,18 @@
 package org.eclipse.core.filebuffers;
 
 /**
- * A file buffer manager (see
- * {@link org.eclipse.core.filebuffers.IFileBufferManager}uses a
- * <code>ISynchronizationContext</code> in order to execute commands
- * encapsulated as {@link java.lang.Runnable}. The synchronization context
- * executes the <code>Runnables</code> according to a specific
- * synchronization/execution policy. This could be that the given
- * <code>Runnable</code> is executed in a specific thread or environment or
- * adhere to specific timing constraints. The concrete characteristics of the
- * policy is to be specified by the context implementer.
+ * A file buffer manager (see {@link org.eclipse.core.filebuffers.IFileBufferManager}) uses an
+ * <code>ISynchronizationContext</code> in order to execute commands encapsulated as
+ * {@link java.lang.Runnable}. The synchronization context executes the <code>Runnables</code>
+ * according to a specific synchronization/execution policy. This could be that the given
+ * <code>Runnable</code> is executed in a specific thread or environment or adhere to specific
+ * timing constraints. The concrete characteristics of the policy is to be specified by the context
+ * implementer.
  * <p>
  * This interface can be implemented by clients. Clients use
  * {@link org.eclipse.core.filebuffers.IFileBufferManager#setSynchronizationContext(ISynchronizationContext)}
  * to install a particular synchronization context with a file buffer manager.
- *
+ * 
  * @since 3.0
  */
 public interface ISynchronizationContext {
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java
index 02bc082..591e1b8 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,6 @@ final class FileBuffersMessages extends NLS {
 	public static String ResourceFileBuffer_warning_fileIsDerived;
 	public static String ResourceFileBuffer_stateValidationFailed;
 	public static String FileBuffer_error_outOfSync;
-	public static String FileBuffer_status_ok;
 	public static String FileBuffer_status_error;
 	public static String FileBuffer_error_queryContentDescription;
 	public static String FileBufferManager_error_canNotCreateFilebuffer;
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties
index 0956502..cf4d713 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileBuffersMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ ResourceFileBuffer_stateValidationFailed= State validation failed.
 
 FileBuffer_error_outOfSync= The file is not synchronized with the local file system.
 
-FileBuffer_status_ok= OK
 FileBuffer_status_error= Error
 FileBuffer_error_queryContentDescription= Could not query content description for: {0}
 
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
index 66aa2aa..9bd0c18 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/FileStoreTextFileBuffer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -87,10 +87,6 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 	 */
 	private static final int BUFFER_SIZE= 8 * READER_CHUNK_SIZE;
 	/**
-	 * Constant for representing the OK status. This is considered a value object.
-	 */
-	private static final IStatus STATUS_OK= new Status(IStatus.OK, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.FileBuffer_status_ok, null);
-	/**
 	 * Constant for representing the error status. This is considered a value object.
 	 */
 	private static final IStatus STATUS_ERROR= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.FileBuffer_status_error, null);
@@ -184,7 +180,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 		if (!isDisconnected()) {
 			if (fStatus != null)
 				return fStatus;
-			return (fDocument == null ? STATUS_ERROR : STATUS_OK);
+			return (fDocument == null ? STATUS_ERROR : Status.OK_STATUS);
 		}
 		return STATUS_ERROR;
 	}
@@ -463,7 +459,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 			/*
 			 * XXX:
 			 * This is a workaround for a corresponding bug in Java readers and writer,
-			 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+			 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 			 */
 			if (fHasBOM && CHARSET_UTF_8.equals(encoding))
 				stream= new SequenceInputStream(new ByteArrayInputStream(IContentDescription.BOM_UTF_8), stream);
@@ -487,7 +483,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 				/*
 				 * XXX:
 				 * This is a workaround for a corresponding bug in Java readers and writer,
-				 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+				 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 				 */
 				if (fHasBOM && CHARSET_UTF_8.equals(encoding))
 					out.write(IContentDescription.BOM_UTF_8);
@@ -530,7 +526,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 					return encoding;
 			}
 		} catch (IOException ex) {
-			// try next strategy
+			// Try next strategy
 		} finally {
 			try {
 				reader.close();
@@ -570,7 +566,7 @@ public class FileStoreTextFileBuffer extends FileStoreFileBuffer implements ITex
 			/*
 			 * XXX:
 			 * This is a workaround for a corresponding bug in Java readers and writer,
-			 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+			 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 			 */
 			if (hasBOM && CHARSET_UTF_8.equals(encoding)) {
 				int n= 0;
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
index 5a9c267..ffc74f5 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/ResourceTextFileBuffer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -92,10 +92,6 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
 	 */
 	static final private QualifiedName ENCODING_KEY= new QualifiedName(FileBuffersPlugin.PLUGIN_ID, "encoding");  //$NON-NLS-1$
 	/**
-	 * Constant for representing the OK status. This is considered a value object.
-	 */
-	static final private IStatus STATUS_OK= new Status(IStatus.OK, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.FileBuffer_status_ok, null);
-	/**
 	 * Constant for representing the error status. This is considered a value object.
 	 */
 	static final private IStatus STATUS_ERROR= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, FileBuffersMessages.FileBuffer_status_error, null);
@@ -206,7 +202,7 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
 		if (!isDisconnected()) {
 			if (fStatus != null)
 				return fStatus;
-			return (fDocument == null ? STATUS_ERROR : STATUS_OK);
+			return (fDocument == null ? STATUS_ERROR : Status.OK_STATUS);
 		}
 		return STATUS_ERROR;
 	}
@@ -380,7 +376,7 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
 		/*
 		 * XXX:
 		 * This is a workaround for a corresponding bug in Java readers and writer,
-		 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+		 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 		 */
 		if (fBOM == IContentDescription.BOM_UTF_8 && CHARSET_UTF_8.equals(encoding))
 			stream= new SequenceInputStream(new ByteArrayInputStream(IContentDescription.BOM_UTF_8), stream);
@@ -554,7 +550,7 @@ public class ResourceTextFileBuffer extends ResourceFileBuffer implements ITextF
 			/*
 			 * XXX:
 			 * This is a workaround for a corresponding bug in Java readers and writer,
-			 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+			 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 			 */
 			if (fBOM != null && CHARSET_UTF_8.equals(encoding)) {
 				int n= 0;
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java
index c64fe34..7860c66 100644
--- a/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java
+++ b/eclipse/plugins/org.eclipse.core.filebuffers/src/org/eclipse/core/internal/filebuffers/TextFileBufferManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,8 +61,7 @@ public class TextFileBufferManager implements ITextFileBufferManager {
 
 	private static abstract class SafeNotifier implements ISafeRunnable {
 		public void handleException(Throwable ex) {
-			IStatus status= new Status(IStatus.ERROR, FileBuffersPlugin.PLUGIN_ID, IStatus.OK, "TextFileBufferManager failed to notify an ITextFileBufferListener", ex);  //$NON-NLS-1$
-			FileBuffersPlugin.getDefault().getLog().log(status);
+			// NOTE: Logging is done by SafeRunner
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
index 4519f4b..6a3a4b3 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         PPC
 built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          AIX
 OS Version:       5.3.9.0
 Compiler version: xlC_r version 10.1.0.0
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
index f9b272f..28e84d5 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/.project b/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/.project
deleted file mode 100644
index 134a126..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.core.filesystem.hpux.PA_RISC</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/META-INF/MANIFEST.MF
deleted file mode 100644
index f1b4096..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %fragmentName
-Bundle-SymbolicName: org.eclipse.core.filesystem.hpux.PA_RISC; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)"
-Bundle-Localization: fragment
-Eclipse-PlatformFilter: (& (osgi.os=hpux) (osgi.arch=PA_RISC))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/build.properties b/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/build.properties
deleted file mode 100644
index a77b881..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = os/,\
-               fragment.properties,\
-               .,\
-               META-INF/,\
-               about.html
-src.includes = about.html
-generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/fragment.properties b/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/fragment.properties
deleted file mode 100644
index 29d880f..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/fragment.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-fragmentName = Core File System for RISC HP-UX
-providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.ia64_32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.hpux.ia64_32/META-INF/MANIFEST.MF
index 25001e0..4df5b6b 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.hpux.ia64_32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.hpux.ia64_32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.hpux.ia64_32; singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)"
 Bundle-Localization: fragment
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.linux.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.linux.ppc/META-INF/MANIFEST.MF
index be232b6..a148bcf 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.linux.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.linux.ppc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.linux.ppc;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
 Bundle-Localization: fragment
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/BUILD_INFO.txt
index 6f93b7d..949fba9 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         linux.x86
 built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
 OS Version:       Linux 2.6.9-22.0.10.ELsmp
 Compiler version: gcc version 3.4.4-2
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/META-INF/MANIFEST.MF
index d83e25b..d5348cd 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86; singleton:=true
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.4.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/BUILD_INFO.txt
index 114ff49..c3e115e 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/BUILD_INFO.txt
@@ -3,7 +3,17 @@ Native Build Info:
 
 platform:         x86_64-redhat-linux
 built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          Red Hat Enterprise Linux Client release 4
 OS Version:       Linux 2.6.9-67.EL x86_64 (glibc-2.3.4-2.39)
 Compiler version: gcc version 3.4.6-9
+
+build script:
+-------------
+#!/bin/sh
+rpm -q glibc
+#ensure system gcc
+export PATH=/usr/bin:$PATH
+cd org.eclipse.core.filesystem/natives/unix/linux
+make JAVA_HOME=$HOME/jdk1.5.0_11_x86-64
+cp liblocalfile_1_0_0.so ../../../../org.eclipse.core.filesystem.linux.x86_64/os/linux/x86_64/
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
index 4b84f3f..2e27eef 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86_64; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
index 5457bfe..9f56ba7 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem.macosx/BUILD_INFO.txt
@@ -1,10 +1,10 @@
 Native Build Info:
 ------------------
 
-platform:         iMac
-built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+Platform:         iMac
+Built by:         pawel.pogorzelski at pl.ibm.com
+Build date:       21-Jan-2010
 OS Name:          Mac OS X
 OS Version:       10.5.7
 Compiler version: gcc version 4.0.1
-Java version:     Standard Edition (build 1.5.0_19-137)
+Java version:     Standard Edition (build 1.5.0_19-137)
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.macosx/META-INF/MANIFEST.MF
index 6af72ff..5d7f9e0 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.macosx/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.macosx; singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=macosx) (|(osgi.arch=x86) (osgi.arch=ppc) (osgi.arch=x86_64)))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/.project b/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/.project
deleted file mode 100644
index b0d8acd..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.core.filesystem.qnx.x86</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-	</buildSpec>
-	<natures>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/META-INF/MANIFEST.MF
deleted file mode 100644
index 917a53d..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %fragmentName
-Bundle-SymbolicName: org.eclipse.core.filesystem.qnx.x86; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)"
-Bundle-Localization: fragment
-Eclipse-PlatformFilter: (& (osgi.os=qnx) (osgi.arch=x86))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/build.properties b/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/build.properties
deleted file mode 100644
index a77b881..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = os/,\
-               fragment.properties,\
-               .,\
-               META-INF/,\
-               about.html
-src.includes = about.html
-generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/fragment.properties b/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/fragment.properties
deleted file mode 100644
index bbc3b3e..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/fragment.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-fragmentName = Core File System for QNX
-providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/os/macosx/ppc/LibraryGoesHere.txt b/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/os/macosx/ppc/LibraryGoesHere.txt
deleted file mode 100644
index e69de29..0000000
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/BUILD_INFO.txt
index 369ab11..250fcbc 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         64-bit sparcv9
 built by:         Pawel.Pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          Solaris 5.8
 OS Version:       SunOS nc142069 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1000
 Compiler version: Sun C 5.8 2005/10/13
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/META-INF/MANIFEST.MF
index 9bcec25..2da6af0 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.solaris.sparc/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.solaris.sparc;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=solaris) (osgi.arch=sparc))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.win32.x86/META-INF/MANIFEST.MF
index 3ecf465..cb23f6e 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.win32.x86/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.win32.x86; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.201.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
 Bundle-Localization: fragment
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem.win32.x86_64/META-INF/MANIFEST.MF
index 00e3d78..dde2c2d 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem.win32.x86_64/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.win32.x86_64; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.201.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
 Bundle-Localization: fragment
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
index e071b52..10b42ef 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.filesystem; singleton:=true
-Bundle-Version: 1.2.1.qualifier
+Bundle-Version: 1.3.1.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.equinox.registry;bundle-version="[3.2.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
index 4519f4b..6a3a4b3 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         PPC
 built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          AIX
 OS Version:       5.3.9.0
 Compiler version: xlC_r version 10.1.0.0
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
index f9b272f..28e84d5 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/BUILD_INFO.txt
index 1c1f3e1..a303d50 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         PPC64
 built by:         pawel.pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          AIX
 OS Version:       5.3.9.0
 Compiler version: xlC_r version 10.1.0.0
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/META-INF/MANIFEST.MF
index f1e0733..356dd23 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc64/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.aix.ppc64;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=aix) (osgi.arch=ppc64))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/BUILD_INFO.txt
index 56cbf26..6c5d1f3 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/BUILD_INFO.txt
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/BUILD_INFO.txt
@@ -3,7 +3,7 @@ Native Build Info:
 
 platform:         64-bit sparcv9
 built by:         Pawel.Pogorzelski at pl.ibm.com
-build date:       03-Dec-2009
+build date:       21-Jan-2010
 OS Name:          Solaris 5.8
 OS Version:       SunOS nc142069 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1000
 Compiler version: Sun C 5.8 2005/10/13
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/META-INF/MANIFEST.MF
index 8517090..259160a 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.solaris.sparcv9;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)"
+Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
 Bundle-Localization: fragment
 Eclipse-PlatformFilter: (& (osgi.os=solaris) (osgi.arch=sparcv9))
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/build.properties b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/build.properties
index 9ec0f44..864fbc4 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/build.properties
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
+# Copyright (c) 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/fragment.properties b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/fragment.properties
index 775cc72..d333a91 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/fragment.properties
+++ b/eclipse/plugins/org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.solaris.sparcv9/fragment.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2009 IBM Corporation and others.
+# Copyright (c) 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/Makefile b/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/Makefile
deleted file mode 100644
index 8359a7b..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-#**********************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials 
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#********************************************************************** 
-#
-# makefile for libcore on MacOS X
-
-
-LIB_NAME = liblocalfile_1_0_0.jnilib
-
-core:
-	cc -I /System/Library/Frameworks/JavaVM.framework/Headers localfile.c -o $(LIB_NAME) -bundle -framework JavaVM -framework CoreServices -arch i386 -arch ppc -arch x86_64 -mmacosx-version-min=10.4
-
-clean:
-	rm *.jnilib
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/localfile.c b/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/localfile.c
deleted file mode 100644
index b6b701c..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/macosx/localfile.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- * 	  Andre Weinand (OTI Labs)
- *******************************************************************************/
-
-#include <jni.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <utime.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "../localfile.h"
-
-#include <CoreServices/CoreServices.h>
-
-#define USE_IMMUTABLE_FLAG 1
-#define USE_ARCHIVE_FLAG 0
-#define EFS_SYMLINK_SUPPORT 1
-
-/*
- * Get a null-terminated byte array from a java char array.
- * The byte array contains UTF8 encoding.
- * The returned bytearray needs to be freed when not used
- * anymore. Use free(result) to do that.
- */
-static jbyte* getUTF8ByteArray(JNIEnv *env, jcharArray target) {
-
-	jchar *temp= (*env)->GetCharArrayElements(env, target, 0);
-	jsize n= (*env)->GetArrayLength(env, target);
-	
-	CFStringRef sr= CFStringCreateWithCharacters(kCFAllocatorDefault, temp, n); 
-	CFIndex argStringSize= CFStringGetMaximumSizeForEncoding(n, kCFStringEncodingUTF8) + 1;
-	jbyte *result= (jbyte*) calloc(argStringSize, sizeof(jbyte));
-	CFStringGetCString(sr, (char*) result, argStringSize, kCFStringEncodingUTF8);
-	CFRelease(sr);
-	
-	(*env)->ReleaseCharArrayElements(env, target, temp, 0);
-	
-	return result;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    nativeAttributes
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_nativeAttributes
-  (JNIEnv *env, jclass clazz) {
-#if defined(EFS_SYMLINK_SUPPORT)
-    return ATTRIBUTE_READ_ONLY | ATTRIBUTE_EXECUTABLE | ATTRIBUTE_SYMLINK | ATTRIBUTE_LINK_TARGET;
-#else
-    return ATTRIBUTE_READ_ONLY | ATTRIBUTE_EXECUTABLE;
-#endif
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalIsUnicode
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalIsUnicode
-  (JNIEnv *env, jclass clazz) {
-	return JNI_TRUE;	// MacOS X supports Unicode-based file names in UTF-8 encoding
-}
-
-/*
- * Converts a stat structure to IFileInfo 
- */
-jboolean convertStatToFileInfo (JNIEnv *env, struct stat info, jobject fileInfo) {
-    jclass cls;
-    jmethodID mid;
-    jboolean readOnly;
-
-    cls = (*env)->GetObjectClass(env, fileInfo);
-    if (cls == 0) return JNI_FALSE;
-
-	// select interesting information
-	//exists
-    mid = (*env)->GetMethodID(env, cls, "setExists", "(Z)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, JNI_TRUE);
-	
-	// last modified
-    mid = (*env)->GetMethodID(env, cls, "setLastModified", "(J)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ((jlong) info.st_mtime) * 1000); /* lower bits */
-
-	// file length
-    mid = (*env)->GetMethodID(env, cls, "setLength", "(J)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, (jlong)info.st_size);
-
-	// folder or file?
-	if ((info.st_mode & S_IFDIR) == S_IFDIR) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_DIRECTORY, JNI_TRUE);
-    }
-
-	// read-only?
-	readOnly = (info.st_mode & S_IWRITE) != S_IWRITE;
-#if USE_IMMUTABLE_FLAG
-	if (!readOnly && ((info.st_flags & (UF_IMMUTABLE | SF_IMMUTABLE)) != 0))
-		readOnly = true;
-#endif
-	if (readOnly) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_READ_ONLY, JNI_TRUE);
-    }
-
-#if USE_ARCHIVE_FLAG
-	// archive?
-	if ((info.st_flags & SF_ARCHIVED) == SF_ARCHIVED) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_ARCHIVE, JNI_TRUE);
-	}
-#endif
-
-	// executable?
-    if ((info.st_mode & S_IXUSR) == S_IXUSR) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_EXECUTABLE, JNI_TRUE);
-    }
-	return JNI_TRUE;
-}
-
-#if defined(EFS_SYMLINK_SUPPORT)
-/*
- * Set symbolic link information in IFileInfo 
- */
-jboolean setSymlinkInFileInfo (JNIEnv *env, jobject fileInfo, jstring linkTarget) {
-    jclass cls;
-    jmethodID mid;
-
-    cls = (*env)->GetObjectClass(env, fileInfo);
-    if (cls == 0) return JNI_FALSE;
-
-    // set symlink attribute
-    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_SYMLINK, JNI_TRUE);
-
-    // set link target
-    mid = (*env)->GetMethodID(env, cls, "setStringAttribute", "(ILjava/lang/String;)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_LINK_TARGET, linkTarget);
-
-    return JNI_TRUE;
-}
-#endif
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalGetFileInfo
- * Signature: ([CLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalGetFileInfo
-   (JNIEnv *env, jclass clazz, jbyteArray target, jobject fileInfo) {
-	// shouldn't ever be called - there is only a Unicode-specific call on MacOS X
-	return JNI_FALSE;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalGetFileInfoW
- * Signature: ([CLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalGetFileInfoW
-   (JNIEnv *env, jclass clazz, jcharArray target, jobject fileInfo) {
-
-	struct stat info;
-	jint code;
-	jstring linkTarget = NULL;
-
-	/* get stat */
-	char *name= (char*) getUTF8ByteArray(env, target);
-#if defined(EFS_SYMLINK_SUPPORT)
-	//do an lstat first to see if it is a symbolic link
-	code = lstat(name, &info);
-	if (code == 0 && (info.st_mode & S_IFLNK) == S_IFLNK) {
-		//symbolic link: read link target
-		char buf[PATH_MAX+1];
-		int len;
-		len = readlink((const char*)name, buf, PATH_MAX);
-		if (len>0) {
-			buf[len]=0;
-		} else {
-			buf[0]=0;
-		}
-		// Mac OS encodes symlink target using UTF-8, ignoring platform default
-		linkTarget = (*env)->NewStringUTF(env, buf);
-		setSymlinkInFileInfo(env, fileInfo, linkTarget);
-
-		//stat link target (will fail for broken links)
-		code = stat((const char*)name, &info);
-	}
-#else
-	code = stat(name, &info);
-#endif
-	free(name);
-
-	/* test if an error occurred */
-	if (code == -1)
-	  return JNI_FALSE;
-	return convertStatToFileInfo(env, info, fileInfo);
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalCopyAttributes
- * Signature: ([B[BZ)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalCopyAttributes
-   (JNIEnv *env, jclass clazz, jbyteArray source, jbyteArray destination, jboolean copyLastModified) {
-	// shouldn't ever be called - there is only a Unicode-specific call on MacOS X
-	return JNI_FALSE;   
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalCopyAttributesW
- * Signature: ([C[CZ)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalCopyAttributesW
-  (JNIEnv *env, jclass clazz, jcharArray source, jcharArray destination, jboolean copyLastModified) {
-
-	struct stat info;
-	struct utimbuf ut;
-	int code;
-	char *sourceFile= (char*) getUTF8ByteArray(env, source);
-	char *destinationFile= (char*) getUTF8ByteArray(env, destination);
-
-	code= stat(sourceFile, &info);
-	if (code != 0) goto fail;
-	code= chmod(destinationFile, info.st_mode);
-	if (code != 0) goto fail;
-
-	chflags(destinationFile, info.st_flags);	// ignore return code
-	if (copyLastModified) {
-		ut.actime= info.st_atime;
-		ut.modtime= info.st_mtime;
-		code= utime(destinationFile, &ut);
-	}
-
-fail:  	
-	free(sourceFile);
-	free(destinationFile);
-	return code == 0;
-}  
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalSetFileInfo
- * Signature: ([BLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalSetFileInfo
-  (JNIEnv *env, jclass clazz, jcharArray target, jobject obj) {
-	// shouldn't ever be called - there is only a Unicode-specific call on MacOS X
-	return JNI_FALSE;   
-
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalSetFileInfoW
- * Signature: ([BLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalSetFileInfoW
-  (JNIEnv *env, jclass clazz, jcharArray target, jobject obj, jint options) {
-    jint code = -1;
-    jmethodID mid;
-    jboolean executable, readOnly, archive;
-    jclass cls;
-
-    /* find out if we need to set the readonly bit */
-    cls = (*env)->GetObjectClass(env, obj);
-    mid = (*env)->GetMethodID(env, cls, "getAttribute", "(I)Z");
-    if (mid == 0) goto fail;
-    readOnly = (*env)->CallBooleanMethod(env, obj, mid, ATTRIBUTE_READ_ONLY);
-
-    /* find out if we need to set the executable bit */
-    executable = (*env)->CallBooleanMethod(env, obj, mid, ATTRIBUTE_EXECUTABLE);
-
-    /* find out if we need to set the archive bit */
-    archive = (*env)->CallBooleanMethod(env, obj, mid, ATTRIBUTE_ARCHIVE);
-
-	/* get the current permissions */
-	jbyte *name = getUTF8ByteArray(env, target);
-    struct stat info;
-	int result= stat((char*)name, &info);
-	if (result != 0) goto fail;
-
-	/* create the mask for the relevant bits */
-	mode_t mask = info.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
-	mode_t oldmask = mask;
-	int flags = info.st_flags;
-			
-#if USE_ARCHIVE_FLAG
-	if (archive)
-		flags |= SF_ARCHIVED;						// set archive bit
-	else
-		flags &= ~SF_ARCHIVED;					// clear archive bit
-#endif
-
-	if (executable)
-		mask |= S_IXUSR;
-	else
-		mask &= ~(S_IXUSR | S_IXGRP | S_IXOTH);	// clear all 'x'
-		
-	if (readOnly) {
-		mask &= ~(S_IWUSR | S_IWGRP | S_IWOTH);	// clear all 'w'		
-#if USE_IMMUTABLE_FLAG
-		flags |= UF_IMMUTABLE;					// set immutable flag for usr
-#endif
-	} else {
-		mask |= (S_IRUSR | S_IWUSR);
-#if USE_IMMUTABLE_FLAG
-		flags &= ~UF_IMMUTABLE;					// try to clear immutable flags for usr
-#endif
-	}	
-
-	/* call chmod & chflags syscalls in correct order */
-	if (readOnly) {
-		if (mask != oldmask)
-			result |= chmod((char*)name, mask);
-		if (flags != info.st_flags)
-			result |= chflags((char*)name, flags);
-	} else {
-		if (flags != info.st_flags)
-			result |= chflags((char*)name, flags);
-		if (mask != oldmask)
-			result |= chmod((char*)name, mask);
-	}	
-
-fail:	
-	free(name);
-	return result == 0;
-}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/README.TXT b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/README.TXT
index 44abf2f..e3fc336 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/README.TXT
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/README.TXT
@@ -1,3 +1,3 @@
 This directory contains the source code for Unix-based platforms,
-including Linux, HPUX, and Solaris.  These platforms all share the same
-C source, but have different makefiles and includes
\ No newline at end of file
+including AIX, HPUX, Linux, Mac OS X, and Solaris. These platforms
+all share the same C source, but have different makefiles.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/Makefile b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/Makefile
index 787b47f..62fb266 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/Makefile
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/Makefile
@@ -1,28 +1,27 @@
 #**********************************************************************
-# Copyright (c) 2009 IBM Corporation and others.
+# Copyright (c) 2009, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
 #********************************************************************** 
 #
-# makefile for liblocalfile.so
+# makefile for libunixfile.so
 
-CORE.C = ../localfile.c
-CORE.O = localfile.o
-LIB_NAME_FULL = liblocalfile_1_0_0.a
+CORE.C = ../unixfile.c
+CORE.O = unixfile.o
+LIB_NAME_FULL = libunixfile_1_0_0.a
 
 OS_TYPE=aix
 CC=xlC_r
 LD=ld
 CFLAGS=-O -s -q32 -qwarn64
 LDFLAGS=-b32 -G -s -bnoentry -bexpall -lc
-JAVA_HOME=
+JAVA_HOME=/usr/java5/
 JDK_INCLUDE=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
-COMMON_INCLUDE=-Iinclude
 
 core :
-	$(CC) $(CFLAGS) $(JDK_INCLUDE) $(COMMON_INCLUDE) -c $(CORE.C) -o $(CORE.O)
+	$(CC) $(CFLAGS) $(JDK_INCLUDE) -c $(CORE.C) -o $(CORE.O)
 	$(LD) $(LDFLAGS) -o $(LIB_NAME_FULL) $(CORE.O)
 clean :
 	rm -f *.o *.a
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/include/os_custom.h b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/include/os_custom.h
deleted file mode 100644
index 6d6df53..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/aix/include/os_custom.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
-* Copyright (c) 2009 IBM Corporation and others.
-* All rights reserved. This program and the accompanying materials 
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-* 
-* Contributors:
-*     IBM Corporation - initial API and implementation
-***********************************************************************/
-
-/* Use this directive when introducing platform-specific code in localfile.c */
-#ifndef AIX
-#define AIX
-#endif
-
-/* Linux supports reading symbolic links */
-#ifndef EFS_SYMLINK_SUPPORT
-#define EFS_SYMLINK_SUPPORT
-#endif
-#include <limits.h>
-#include <unistd.h>
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/PA_RISC.mak b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/PA_RISC.mak
index 3c87978..c7c640e 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/PA_RISC.mak
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/PA_RISC.mak
@@ -1,5 +1,5 @@
 #**********************************************************************
-# Copyright (c) 2000, 2004 Hewlett-Packard Development Company and others.
+# Copyright (c) 2000, 2007 Hewlett-Packard Development Company and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/ia64_32.mak b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/ia64_32.mak
index 683c4f9..015ab88 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/ia64_32.mak
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/hpux/ia64_32.mak
@@ -1,5 +1,5 @@
 #**********************************************************************
-# Copyright (c) 2000, 2004 Hewlett-Packard Development Company and others.
+# Copyright (c) 2000, 2007 Hewlett-Packard Development Company and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
index 2e4ad85..f5533bf 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
@@ -1,32 +1,37 @@
-#**********************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials 
+#******************************************************************************
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-#********************************************************************** 
 #
-# makefile for libcore.so
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#******************************************************************************/
+#
+# makefile for libunixfile_1_0_0.so
 
-CORE.C = ../localfile.c
-CORE.O = localfile.o
-LIB_NAME = liblocalfile.so
-LIB_NAME_FULL = liblocalfile_1_0_0.so
+CORE.C = ../unixfile.c
+CORE.O = unixfile.o
+LIB_NAME = libunixfile.so
+LIB_NAME_FULL = libunixfile_1_0_0.so
 
 #Set this to be your OS type
 OS_TYPE = linux
 
 #Set this to be the location of your JRE
-JAVA_HOME = ~/vm/sun142
+JAVA_HOME = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.9/
 
 JDK_INCLUDE = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS_TYPE}
-COMMON_INCLUDE = -I include
-#OPT_FLAGS=-g
 OPT_FLAGS=-O -s -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 
-core :
-	gcc $(OPT_FLAGS) -fPIC -c $(JDK_INCLUDE) $(COMMON_INCLUDE) -o $(CORE.O) $(CORE.C)
+core:
+	gcc $(OPT_FLAGS) -fPIC -c $(JDK_INCLUDE) -o $(CORE.O) $(CORE.C)
 	gcc $(OPT_FLAGS) -shared -Wl,-soname,$(LIB_NAME) -o $(LIB_NAME_FULL) $(CORE.O) -lc
 
-clean :
+clean:
 	rm -f $(CORE.O) $(LIB_NAME_FULL)
+
+install: core
+	rm -f ../../../../org.eclipse.core.filesystem.linux.x86/os/linux/x86/libunixfile_1_0_0.so
+	mv libunixfile_1_0_0.so ../../../../org.eclipse.core.filesystem.linux.x86/os/linux/x86/
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/include/os_custom.h b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/include/os_custom.h
deleted file mode 100644
index dd1a66c..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/linux/include/os_custom.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/***********************************************************************
-* Copyright (c) 2005, 2007 IBM Corporation and others.
-* All rights reserved. This program and the accompanying materials 
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-* 
-* Contributors:
-*     IBM Corporation - initial API and implementation
-* Martin Oberhuber (Wind River) - [183137] liblocalfile for solaris-sparc
-***********************************************************************/
-
-/* Use this directive when introducing platform-specific code in localfile.c */
-#ifndef LINUX
-#define LINUX
-#endif
-
-/* Linux supports reading symbolic links */
-#ifndef EFS_SYMLINK_SUPPORT
-#define EFS_SYMLINK_SUPPORT
-#endif
-#include <limits.h>
-#include <unistd.h>
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/localfile.c b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/localfile.c
deleted file mode 100644
index b87a1c1..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/localfile.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Red Hat Incorporated - get/setResourceAttribute code
- * Martin Oberhuber (Wind River) - [170317] add symbolic link support to API
- * Corey Ashford (IBM) - [177400] fix threading issues on Linux-PPC
- * Martin Oberhuber (Wind River) - [183137] liblocalfile for solaris-sparc
- * Martin Oberhuber (Wind River) - [184534] get attributes from native lib
- *******************************************************************************/
-#include <jni.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <utime.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include "../localfile.h"
-#include <os_custom.h>
-
-/*
- * Get a null-terminated byte array from a java byte array.
- * The returned bytearray needs to be freed when not used
- * anymore. Use free(result) to do that.
- */
-jbyte* getByteArray(JNIEnv *env, jbyteArray target) {
-	jsize n;
-	jbyte *temp, *result;
-	
-	temp = (*env)->GetByteArrayElements(env, target, 0);
-	n = (*env)->GetArrayLength(env, target);
-	result = malloc((n+1) * sizeof(jbyte));
-	memcpy(result, temp, n * sizeof(jbyte));
-	result[n] = '\0';
-	(*env)->ReleaseByteArrayElements(env, target, temp, 0);
-	return result;
-}
-
-#if defined(EFS_SYMLINK_SUPPORT)
-/*
- * Get a Java String from a java byte array, using the default charset.
- * Uses Convert.fromPlatformBytes([B).
- */
-jstring getString(JNIEnv *env, jbyteArray source) {
-	static jclass clsConvert = 0;
-	jmethodID midFromPlatformBytes = 0;
-    if (clsConvert == 0) {
-    	clsConvert = (*env)->FindClass(env, "org/eclipse/core/internal/filesystem/local/Convert");
-    	if (clsConvert == 0) return NULL;
-        // Ensure class isn't garbage collected between calls to this function.
-        clsConvert = (*env)->NewGlobalRef(env, clsConvert);
-    }
-   	midFromPlatformBytes = (*env)->GetStaticMethodID(env, clsConvert, "fromPlatformBytes", "([B)Ljava/lang/String;");
-   	if (midFromPlatformBytes == 0) return NULL;
-    return (*env)->CallStaticObjectMethod(env, clsConvert, midFromPlatformBytes, source);
-}
-#endif
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    nativeAttributes
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_nativeAttributes
-  (JNIEnv *env, jclass clazz) {
-#if defined(EFS_SYMLINK_SUPPORT)
-    return ATTRIBUTE_READ_ONLY | ATTRIBUTE_EXECUTABLE | ATTRIBUTE_SYMLINK | ATTRIBUTE_LINK_TARGET;
-#else
-    return ATTRIBUTE_READ_ONLY | ATTRIBUTE_EXECUTABLE;
-#endif
-}
-
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalIsUnicode
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalIsUnicode
-  (JNIEnv *env, jclass clazz) {
-  	// no specific support for Unicode-based file names on *nix
-	return JNI_FALSE;
-}
-
-/*
- * Converts a stat structure to IFileInfo 
- */
-jboolean convertStatToFileInfo (JNIEnv *env, struct stat info, jobject fileInfo) {
-    jclass cls;
-    jmethodID mid;
-
-    cls = (*env)->GetObjectClass(env, fileInfo);
-    if (cls == 0) return JNI_FALSE;
-
-	// select interesting information
-	//exists
-    mid = (*env)->GetMethodID(env, cls, "setExists", "(Z)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, JNI_TRUE);
-	
-	// last modified
-    mid = (*env)->GetMethodID(env, cls, "setLastModified", "(J)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ((jlong) info.st_mtime) * 1000); /* lower bits */
-
-	// file length
-    mid = (*env)->GetMethodID(env, cls, "setLength", "(J)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, (jlong)info.st_size);
-
-	// folder or file?
-	if ((info.st_mode & S_IFDIR) == S_IFDIR) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_DIRECTORY, JNI_TRUE);
-    }
-
-	// read-only?
-	if ((info.st_mode & S_IWRITE) != S_IWRITE) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_READ_ONLY, JNI_TRUE);
-    }
-
-	// executable?
-    if ((info.st_mode & S_IXUSR) == S_IXUSR) {
-	    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-	    if (mid == 0) return JNI_FALSE;
-	    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_EXECUTABLE, JNI_TRUE);
-    }
-
-	return JNI_TRUE;
-}
-
-#if defined(EFS_SYMLINK_SUPPORT)
-/*
- * Set symbolic link information in IFileInfo 
- */
-jboolean setSymlinkInFileInfo (JNIEnv *env, jobject fileInfo, jstring linkTarget) {
-    jclass cls;
-    jmethodID mid;
-
-    cls = (*env)->GetObjectClass(env, fileInfo);
-    if (cls == 0) return JNI_FALSE;
-
-    // set symlink attribute
-    mid = (*env)->GetMethodID(env, cls, "setAttribute", "(IZ)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_SYMLINK, JNI_TRUE);
-    
-    // set link target
-    mid = (*env)->GetMethodID(env, cls, "setStringAttribute", "(ILjava/lang/String;)V");
-    if (mid == 0) return JNI_FALSE;
-    (*env)->CallVoidMethod(env, fileInfo, mid, ATTRIBUTE_LINK_TARGET, linkTarget);
-}
-#endif
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalGetFileInfo
- * Signature: ([CLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalGetFileInfo
-   (JNIEnv *env, jclass clazz, jbyteArray target, jobject fileInfo) {
-	struct stat info;
-	jlong result;
-	jint code;
-	jbyte *name;
-	jstring linkTarget = NULL;
-
-	/* get stat */
-	name = getByteArray(env, target);
-#if defined(EFS_SYMLINK_SUPPORT)
-	//do an lstat first to see if it is a symbolic link
-	code = lstat((const char*)name, &info);
-	if (code == 0 && (info.st_mode & S_IFLNK) == S_IFLNK) {
-		//symbolic link: read link target
-		char buf[PATH_MAX+1];
-		int len;
-		jbyteArray barr;
-		len = readlink((const char*)name, buf, PATH_MAX);
-		if (len>0) {
-			barr = (*env)->NewByteArray(env, len);
-			(*env)->SetByteArrayRegion(env, barr, 0, len, buf);
-		} else {
-			barr = (*env)->NewByteArray(env, 0);
-		}
-		linkTarget = getString(env, barr);
-		setSymlinkInFileInfo(env, fileInfo, linkTarget);
-
-		//stat link target (will fail for broken links)
-		code = stat((const char*)name, &info);
-	}
-#else
-	code = stat((const char*)name, &info);
-#endif
-	free(name);
-
-	/* test if an error occurred */
-	if (code == -1)
-	  return 0;
-	return convertStatToFileInfo(env, info, fileInfo);
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalGetFileInfoW
- * Signature: ([CLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalGetFileInfoW
-   (JNIEnv *env, jclass clazz, jcharArray target, jobject fileInfo) {
-	// shouldn't ever be called - there is no Unicode-specific calls on *nix
-	return JNI_FALSE;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalCopyAttributes
- * Signature: ([B[BZ)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalCopyAttributes
-   (JNIEnv *env, jclass clazz, jbyteArray source, jbyteArray destination, jboolean copyLastModified) {
-
-  struct stat info;
-  struct utimbuf ut;
-  jbyte *sourceFile, *destinationFile;
-  jint code;
-
-  sourceFile = getByteArray(env, source);
-  destinationFile = getByteArray(env, destination);
-
-  code = stat((const char*)sourceFile, &info);
-  if (code == 0) {
-    code = chmod((const char*)destinationFile, info.st_mode);
-    if (code == 0 && copyLastModified) {
-      ut.actime = info.st_atime;
-      ut.modtime = info.st_mtime;
-      code = utime((const char*)destinationFile, &ut);
-    }
-  }
-
-  free(sourceFile);
-  free(destinationFile);
-  return code != -1;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalCopyAttributesW
- * Signature: ([C[CZ)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalCopyAttributesW
-  (JNIEnv *env, jclass clazz, jcharArray source, jcharArray destination, jboolean copyLastModified) {
-	// shouldn't ever be called - there is no Unicode-specific calls on *nix
-	return JNI_FALSE;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalSetFileInfo
- * Signature: ([BLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalSetFileInfo
-  (JNIEnv *env, jclass clazz, jcharArray target, jobject obj) {
-
-    mode_t mask;
-    struct stat info;
-    jbyte *name;
-    jint code = -1;
-    jmethodID mid;
-    jboolean executable, readOnly;
-    jclass cls;
-
-    /* find out if we need to set the readonly bit */
-    cls = (*env)->GetObjectClass(env, obj);
-    mid = (*env)->GetMethodID(env, cls, "getAttribute", "(I)Z");
-    if (mid == 0) goto fail;
-    readOnly = (*env)->CallBooleanMethod(env, obj, mid, ATTRIBUTE_READ_ONLY);
-
-    /* find out if we need to set the executable bit */
-    executable = (*env)->CallBooleanMethod(env, obj, mid, ATTRIBUTE_EXECUTABLE);
-
-    /* get the current permissions */
-    name = getByteArray(env, target);
-    code = stat((const char*)name, &info);
-
-    /* create the mask */
-    mask = S_IRUSR |
-	       S_IWUSR |
-	       S_IXUSR |
-           S_IRGRP |
-           S_IWGRP |
-           S_IXGRP |
-           S_IROTH |
-           S_IWOTH |
-           S_IXOTH;
-    mask &= info.st_mode;
-    if (executable)
-	    mask |= S_IXUSR;
-    else
-	    mask &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
-	if (readOnly)
-	    mask &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
-	else
-	    mask |= (S_IRUSR | S_IWUSR);
-    /* write the permissions */
-    code = chmod((const char*)name, mask);
-
-fail:
-	if (name) free(name);
-    return code != -1;
-}
-
-/*
- * Class:     org_eclipse_core_internal_filesystem_local_LocalFileNatives
- * Method:    internalSetFileInfoW
- * Signature: ([BLorg/eclipse/core/filesystem/IFileInfo;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_eclipse_core_internal_filesystem_local_LocalFileNatives_internalSetFileInfoW
-  (JNIEnv *env, jclass clazz, jcharArray target, jobject obj, jint options) {
-	// shouldn't ever be called - there is no Unicode-specific calls on *nix
-	return JNI_FALSE;
-}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/macosx/Makefile b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/macosx/Makefile
new file mode 100644
index 0000000..d8e004e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/macosx/Makefile
@@ -0,0 +1,30 @@
+#******************************************************************************
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#******************************************************************************/
+#
+# makefile for libunixfile_1_0_0.jnilib
+
+CORE.C=../unixfile.c
+LIB_NAME_FULL=libunixfile_1_0_0.jnilib
+
+JDK_INCLUDE=-I /System/Library/Frameworks/JavaVM.framework/Headers
+FRAMEWORKS=-framework JavaVM -framework CoreServices
+# define MACOSX to include Mac OS X specific code
+CC_FLAGS=-arch i386 -arch ppc -arch x86_64 -mmacosx-version-min=10.4 -DMACOSX
+
+core:
+	cc $(JDK_INCLUDE) $(CORE.C) -o $(LIB_NAME_FULL) -bundle $(FRAMEWORKS) $(CC_FLAGS)
+
+clean:
+	rm -f $(LIB_NAME_FULL)
+
+install:
+	rm -f ../../../../org.eclipse.core.filesystem.macosx/os/macosx/$(LIB_NAME_FULL)
+	mv $(LIB_NAME_FULL) ../../../../org.eclipse.core.filesystem.macosx/os/macosx/
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/Makefile b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/Makefile
index 9b4e1a4..2ff401a 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/Makefile
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/Makefile
@@ -1,5 +1,5 @@
 #**********************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,19 +12,18 @@
 #
 # makefile for liblocalfile.so
 
-CORE.C = ../localfile.c
-CORE.O = localfile.o
-LIB_NAME = liblocalfile.so
-LIB_NAME_FULL = liblocalfile_1_0_0.so
+CORE.C = ../unixfile.c
+CORE.O = unixfile.o
+LIB_NAME = libunixfile.so
+LIB_NAME_FULL = libunixfile_1_0_0.so
 
 #Set this to be your OS type
 OS_TYPE = solaris
 
 #Set this to be the location of your JRE
-JAVA_HOME = 
+JAVA_HOME = /opt/jdk1.5.0_14/
 
 JDK_INCLUDE = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS_TYPE}
-COMMON_INCLUDE = -I include
 #Solaris native cc uses -K PIC, gcc uses -fPIC
 #To build native, use:     make
 #To build with debug, use: make OPT_FLAGS=-g
@@ -37,7 +36,7 @@ CFLAGS = -G -O -s $(PICFLAG) -xarch=$(ARCH) -mt -xregs=no%appl -xstrconst -D_LAR
 LDFLAGS = -G -O -s $(PICFLAG) -lc -xarch=$(ARCH) -mt -z defs -z text -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 
 $(LIB_NAME_FULL) : $(CORE.C)
-	$(CC) $(CFLAGS) -c $(JDK_INCLUDE) $(COMMON_INCLUDE) -o $(CORE.O) $(CORE.C)
+	$(CC) $(CFLAGS) -c $(JDK_INCLUDE) -o $(CORE.O) $(CORE.C)
 	$(CC) $(LDFLAGS) -o $(LIB_NAME_FULL) $(CORE.O) -lc
 
 core : $(LIB_NAME_FULL)
@@ -46,4 +45,5 @@ clean :
 	rm -f $(CORE.O) $(LIB_NAME_FULL)
 
 install : $(LIB_NAME_FULL)
-	cp -f $(LIB_NAME_FULL) ../../../../org.eclipse.core.filesystem.solaris.sparc/os/solaris/sparc/
+	rm -f ../../../../org.eclipse.core.filesystem.solaris.sparc/os/solaris/sparc/$(LIB_NAME_FULL)
+	mv $(LIB_NAME_FULL) ../../../../org.eclipse.core.filesystem.solaris.sparc/os/solaris/sparc/
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/include/os_custom.h b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/include/os_custom.h
deleted file mode 100644
index c0fecc4..0000000
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/solaris/include/os_custom.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/***********************************************************************
-* Copyright (c) 2005, 2007 IBM Corporation and others.
-* All rights reserved. This program and the accompanying materials 
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-* 
-* Contributors:
-*     IBM Corporation - initial API and implementation
-* Martin Oberhuber (Wind River) - [183137] adapted from Linux for Solaris
-***********************************************************************/
-
-/* Use this directive when introducing platform-specific code in localfile.c */
-#ifndef SOLARIS
-#define SOLARIS
-#endif
-
-/* Solaris supports reading symbolic links */
-#ifndef EFS_SYMLINK_SUPPORT
-#define EFS_SYMLINK_SUPPORT
-#endif
-#include <limits.h>
-#include <unistd.h>
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.c b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.c
new file mode 100644
index 0000000..43d6aa5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.c
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+#include <limits.h>
+#include <jni.h>
+
+#if defined MACOSX
+#include <CoreServices/CoreServices.h>
+#endif
+
+#include "unixfile.h"
+
+/*
+ * Get a null-terminated byte array from a java byte array. The returned bytearray
+ * needs to be freed when not used anymore. Use free(result) to do that.
+ */
+jbyte* getByteArray(JNIEnv *env, jbyteArray target)
+{
+	unsigned int len;
+	jbyte *temp, *result;
+
+	temp = (*env)->GetByteArrayElements(env, target, 0);
+	len = (*env)->GetArrayLength(env, target);
+	result = malloc((len + 1) * sizeof(jbyte));
+	memcpy(result, temp, len * sizeof(jbyte));
+	result[len] = '\0';
+	(*env)->ReleaseByteArrayElements(env, target, temp, 0);
+	return result;
+}
+
+/*
+ * Fills StructStat object with data from struct stat.
+ */
+jint convertStatToObject(JNIEnv *env, struct stat info, jobject stat_object)
+{
+	jclass cls;
+	jfieldID fid;
+	jboolean readOnly;
+
+	cls = (*env)->GetObjectClass(env, stat_object);
+	if (cls == 0) return -1;
+
+	fid = (*env)->GetFieldID(env, cls, "st_mode", "I");
+	if (fid == 0) return -1;
+	(*env)->SetIntField(env, stat_object, fid, info.st_mode);
+
+	fid = (*env)->GetFieldID(env, cls, "st_size", "J");
+	if (fid == 0) return -1;
+	(*env)->SetLongField(env, stat_object, fid, info.st_size);
+
+	fid = (*env)->GetFieldID(env, cls, "st_mtime", "J");
+	if (fid == 0) return -1;
+	(*env)->SetLongField(env, stat_object, fid, info.st_mtime);
+
+#ifdef MACOSX
+	fid = (*env)->GetFieldID(env, cls, "st_flags", "J");
+	if (fid == 0) return -1;
+	(*env)->SetLongField(env, stat_object, fid, info.st_flags);
+#endif
+
+	return 0;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    chmod
+ * Signature: ([BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_chmod
+  (JNIEnv *env, jclass clazz, jbyteArray path, jint mode)
+{
+	int code;
+	char *name;
+
+	name = (char*) getByteArray(env, path);
+	code = chmod(name, mode);
+	free(name);
+	return code;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    chflags
+ * Signature: ([BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_chflags
+  (JNIEnv *env, jclass clazz, jbyteArray path, jint flags)
+{
+#ifdef MACOSX
+	int code;
+	char *name;
+
+	name = (char*) getByteArray(env, path);
+	code = chflags(name, flags);
+	free(name);
+	return code;
+#else
+	return -1;
+#endif
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    stat
+ * Signature: ([BLorg/eclipse/core/internal/filesystem/local/unix/StructStat;)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_stat
+  (JNIEnv *env, jclass clazz, jbyteArray path, jobject buf)
+{
+	jint code;
+	char *name;
+	struct stat info;
+
+	name = (char*) getByteArray(env, path);
+	code = stat(name, &info);
+	free(name);
+	if (code != -1)
+		return convertStatToObject(env, info, buf);
+	else
+		return code;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    lstat
+ * Signature: ([BLorg/eclipse/core/internal/filesystem/local/unix/StructStat;)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_lstat
+  (JNIEnv *env, jclass clazz, jbyteArray path, jobject buf)
+{
+	jint code;
+	char *name;
+	struct stat info;
+
+	name = (char*) getByteArray(env, path);
+	code = lstat(name, &info);
+	free(name);
+	if (code != -1)
+		return convertStatToObject(env, info, buf);
+	else
+		return code;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    readlink
+ * Signature: ([B[BJ)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
+    (JNIEnv *env, jclass clazz, jbyteArray path, jbyteArray buf, jlong bufsiz) {
+	jint code;
+ 	jbyte *name;
+ 	int len;
+	char temp[PATH_MAX+1];
+	jstring linkTarget = NULL;
+
+	name = getByteArray(env, path);
+  	len = readlink((const char*)name, temp, PATH_MAX);
+  	free(name);
+	if (len > 0) {
+		temp[len] = 0;
+		(*env)->SetByteArrayRegion(env, buf, 0, len, (jbyte*) temp);
+	}
+	else {
+		temp[0] = 0;
+		(*env)->SetByteArrayRegion(env, buf, 0, 0, (jbyte*) temp);
+	}
+	return len;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    errno
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_errno
+  (JNIEnv *env, jclass clazz)
+{
+	return errno;
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    libattr
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_libattr
+  (JNIEnv *env, jclass clazz)
+{
+#ifdef MACOSX
+	return UNICODE_SUPPORTED | CHFLAGS_SUPPORTED;
+#else
+	return 0;
+#endif
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    tounicode
+ * Signature: ([C)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_tounicode
+  (JNIEnv *env, jclass clazz, jcharArray buf)
+{
+#ifdef MACOSX
+	jchar *temp;
+	jsize length;
+	CFStringRef str_ref;
+	CFIndex str_size;
+	jbyte *unicode_bytes;
+	jbyteArray ret;
+
+	temp = (*env)->GetCharArrayElements(env, buf, 0);
+	length = (*env)->GetArrayLength(env, buf);
+	str_ref = CFStringCreateWithCharacters(kCFAllocatorDefault, temp, length);
+	str_size = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8) + 1;
+	unicode_bytes = (jbyte*) calloc(str_size, sizeof(jbyte));
+	CFStringGetCString(str_ref, (char*) unicode_bytes, str_size, kCFStringEncodingUTF8);
+	ret = (*env)->NewByteArray(env, str_size);
+	if (ret == NULL)
+		return NULL;
+	(*env)->SetByteArrayRegion(env, ret, 0, str_size, unicode_bytes);
+	CFRelease(str_ref);
+	(*env)->ReleaseCharArrayElements(env, buf, temp, 0);
+	free(unicode_bytes);
+	return ret;
+#else
+	return NULL;
+#endif
+}
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    getflag
+ * Signature: ([B)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_getflag
+  (JNIEnv *env, jclass clazz, jbyteArray buf)
+{
+	char *flag;
+	jint ret = -1;
+
+	flag = (char*) getByteArray(env, buf);
+	if (strcmp(flag, "PATH_MAX") == 0)
+		ret = PATH_MAX;
+	else if (strcmp(flag, "S_IFMT") == 0)
+		ret = S_IFMT;
+	else if (strcmp(flag, "S_IFLNK") == 0)
+		ret = S_IFLNK;
+	else if (strcmp(flag, "S_IFDIR") == 0)
+		ret = S_IFDIR;
+	else if (strcmp(flag, "S_IRUSR") == 0)
+		ret = S_IRUSR;
+	else if (strcmp(flag, "S_IWUSR") == 0)
+		ret = S_IWUSR;
+	else if (strcmp(flag, "S_IXUSR") == 0)
+		ret = S_IXUSR;
+	else if (strcmp(flag, "S_IRGRP") == 0)
+		ret = S_IRGRP;
+	else if (strcmp(flag, "S_IWGRP") == 0)
+		ret = S_IWGRP;
+	else if (strcmp(flag, "S_IXGRP") == 0)
+		ret = S_IXGRP;
+	else if (strcmp(flag, "S_IROTH") == 0)
+		ret = S_IROTH;
+	else if (strcmp(flag, "S_IWOTH") == 0)
+		ret = S_IWOTH;
+	else if (strcmp(flag, "S_IXOTH") == 0)
+		ret = S_IXOTH;
+#ifdef MACOSX
+	else if (strcmp(flag, "UF_IMMUTABLE") == 0)
+		ret = UF_IMMUTABLE;
+	else if (strcmp(flag, "SF_IMMUTABLE") == 0)
+		ret = SF_IMMUTABLE;
+#endif
+	free(flag);
+	return ret;
+}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.h b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.h
new file mode 100644
index 0000000..b76faef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/unix/unixfile.h
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+#include <jni.h>
+
+#undef UNICODE_SUPPORTED
+#define UNICODE_SUPPORTED 1L
+#undef CHFLAGS_SUPPORTED
+#define CHFLAGS_SUPPORTED 2L
+
+/*
+ * Get a null-terminated byte array from a java byte array. The returned bytearray
+ * needs to be freed when not used anymore. Use free(result) to do that.
+ */
+jbyte* getByteArray(JNIEnv *, jbyteArray);
+
+/*
+ * Fills StructStat object with data from struct stat.
+ */
+jint convertStatToObject(JNIEnv *, struct stat, jobject);
+
+/* DO NOT EDIT THIS FILE - it is machine generated */
+
+/* Header for class org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives */
+
+#ifndef _Included_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+#define _Included_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    chmod
+ * Signature: ([BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_chmod
+  (JNIEnv *, jclass, jbyteArray, jint);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    chflags
+ * Signature: ([BI)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_chflags
+  (JNIEnv *, jclass, jbyteArray, jint);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    stat
+ * Signature: ([BLorg/eclipse/core/internal/filesystem/local/unix/StructStat;)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_stat
+  (JNIEnv *, jclass, jbyteArray, jobject);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    lstat
+ * Signature: ([BLorg/eclipse/core/internal/filesystem/local/unix/StructStat;)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_lstat
+  (JNIEnv *, jclass, jbyteArray, jobject);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    readlink
+ * Signature: ([B[BJ)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_readlink
+  (JNIEnv *, jclass, jbyteArray, jbyteArray, jlong);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    errno
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_errno
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    libattr
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_libattr
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    tounicode
+ * Signature: ([C)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_tounicode
+  (JNIEnv *, jclass, jcharArray);
+
+/*
+ * Class:     org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives
+ * Method:    getflag
+ * Signature: ([B)I
+ */
+JNIEXPORT jint JNICALL Java_org_eclipse_core_internal_filesystem_local_unix_UnixFileNatives_getflag
+  (JNIEnv *, jclass, jbyteArray);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/natives/win32/localfile.c b/eclipse/plugins/org.eclipse.core.filesystem/natives/win32/localfile.c
index dce5375..3206e90 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/natives/win32/localfile.c
+++ b/eclipse/plugins/org.eclipse.core.filesystem/natives/win32/localfile.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2007 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -147,7 +147,7 @@ jboolean convertFindDataToFileInfo(JNIEnv *env, WIN32_FIND_DATA info, jobject fi
     (*env)->CallVoidMethod(env, fileInfo, mid, fileTimeToMillis(info.ftLastWriteTime));
 
 	// file length
-	fileLength =(info.nFileSizeHigh * (MAXDWORD+1)) + info.nFileSizeLow;
+	fileLength =(info.nFileSizeHigh * (((ULONGLONG)MAXDWORD)+1)) + info.nFileSizeLow;
     mid = (*env)->GetMethodID(env, cls, "setLength", "(J)V");
     if (mid == 0) return JNI_FALSE;
     (*env)->CallVoidMethod(env, fileInfo, mid, fileLength);
@@ -214,7 +214,7 @@ jboolean convertFindDataWToFileInfo(JNIEnv *env, WIN32_FIND_DATAW info, jobject
     (*env)->CallVoidMethod(env, fileInfo, mid, fileTimeToMillis(info.ftLastWriteTime));
 
 	// file length
-	fileLength =(info.nFileSizeHigh * (MAXDWORD+1)) + info.nFileSizeLow;
+	fileLength =(info.nFileSizeHigh * (((ULONGLONG)MAXDWORD)+1)) + info.nFileSizeLow;
     mid = (*env)->GetMethodID(env, cls, "setLength", "(J)V");
     if (mid == 0) return JNI_FALSE;
     (*env)->CallVoidMethod(env, fileInfo, mid, fileLength);
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/EFS.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/EFS.java
index 130a8a9..dbe2b0b 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/EFS.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/EFS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -114,6 +114,126 @@ public class EFS {
 	public static final int ATTRIBUTE_READ_ONLY = 1 << 1;
 
 	/**
+	 * Attribute constant (value 1 <<21) indicating that a
+	 * file is marked with immutable flag.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_IMMUTABLE = 1 << 21;
+
+	/**
+	 * Attribute constant (value 1 <<22) indicating that a
+	 * file's owner has a read permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OWNER_READ = 1 << 22;
+
+	/**
+	 * Attribute constant (value 1 <<23) indicating that
+	 * file's owner has a write permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OWNER_WRITE = 1 << 23;
+
+	/**
+	 * Attribute constant (value 1 <<24) indicating that
+	 * file's owner has an execute permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OWNER_EXECUTE = 1 << 24;
+
+	/**
+	 * Attribute constant (value 1 <<25) indicating that
+	 * users in file's group have a read permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_GROUP_READ = 1 << 25;
+
+	/**
+	 * Attribute constant (value 1 <<26) indicating that
+	 * users in file's group have a write permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_GROUP_WRITE = 1 << 26;
+
+	/**
+	 * Attribute constant (value 1 <<27) indicating that
+	 * users in file's group have an execute permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_GROUP_EXECUTE = 1 << 27;
+
+	/**
+	 * Attribute constant (value 1 <<28) indicating that
+	 * other users have a read permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OTHER_READ = 1 << 28;
+
+	/**
+	 * Attribute constant (value 1 <<29) indicating that
+	 * other users have a write permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OTHER_WRITE = 1 << 29;
+
+	/**
+	 * Attribute constant (value 1 <<30) indicating that
+	 * other users have an execute permission.
+	 * 
+	 * @see IFileStore#fetchInfo()
+	 * @see IFileStore#putInfo(IFileInfo, int, IProgressMonitor)
+	 * @see IFileInfo#getAttribute(int)
+	 * @see IFileInfo#setAttribute(int, boolean)
+	 * @since org.eclipse.core.filesystem 1.3
+	 */
+	public static final int ATTRIBUTE_OTHER_EXECUTE = 1 << 30;
+
+	/**
 	 * Attribute constant (value 1 <<2) indicating that a
 	 * file is a executable.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
index eb30212..25461b4 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/IFileStore.java
@@ -467,6 +467,17 @@ public interface IFileStore extends IAdaptable {
 	 * on the provided file info are ignored.
 	 * </p>
 	 * <p>
+	 * Since Eclipse 3.6, implementations shall also make a best effort
+	 * to consult UNIX umask in order to set the same attributes for other access groups. 
+	 * This setting of attributes for others may change the file system state even if an attribute
+	 * appears to be set for the current user already.
+	 * </p>
+	 * <p>
+	 * Clearing an attribute causes clearing it for all access groups. This means setting
+	 * and clearing an attribute might not restore previous file system state as these
+	 * operations are not symmetrical.
+	 * </p>
+	 * <p>
 	 * The {@link EFS#SET_LAST_MODIFIED} update flag controls 
 	 * whether the file's last modified time is changed.  When this flag is specified,
 	 * the last modified time for the file in the underlying file system is updated
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/URIUtil.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/URIUtil.java
index c4bf74e..2f51831 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/URIUtil.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/URIUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -105,7 +105,8 @@ public class URIUtil {
 	 * @return The URI representing the provided path string
 	 */
 	public static URI toURI(String pathString) {
-		return toURI(pathString, true);
+		IPath path = new Path(pathString);
+		return toURI(path);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileInfo.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileInfo.java
index a72de61..48e00e4 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileInfo.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.core.filesystem.provider;
 
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.internal.filesystem.local.LocalFileNativesManager;
 
 /**
  * This class should be used by file system providers in their implementation
@@ -33,9 +34,9 @@ public class FileInfo implements IFileInfo {
 	private static final int ATTRIBUTE_EXISTS = 1 << 16;
 
 	/**
-	 * Bit field of file attributes
+	 * Bit field of file attributes. Initialized to specify a writable resource.
 	 */
-	private int attributes = 0;
+	private int attributes = EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ;
 
 	/**
 	 * The last modified time.
@@ -113,7 +114,12 @@ public class FileInfo implements IFileInfo {
 	}
 
 	public boolean getAttribute(int attribute) {
-		return isSet(attribute);
+		if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE))
+			return (!isSet(EFS.ATTRIBUTE_OWNER_WRITE)) || isSet(EFS.ATTRIBUTE_IMMUTABLE);
+		else if (attribute == EFS.ATTRIBUTE_EXECUTABLE && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE))
+			return isSet(EFS.ATTRIBUTE_OWNER_EXECUTE);
+		else
+			return isSet(attribute);
 	}
 
 	/* (non-Javadoc)
@@ -165,10 +171,29 @@ public class FileInfo implements IFileInfo {
 	 * @see org.eclipse.core.filesystem.IFileInfo#setAttribute(int, boolean)
 	 */
 	public void setAttribute(int attribute, boolean value) {
-		if (value)
-			set(attribute);
-		else
-			clear(attribute);
+		if (attribute == EFS.ATTRIBUTE_READ_ONLY && isAttributeSuported(EFS.ATTRIBUTE_OWNER_WRITE)) {
+			if (value) {
+				clear(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OTHER_WRITE | EFS.ATTRIBUTE_GROUP_WRITE);
+				set(EFS.ATTRIBUTE_IMMUTABLE);
+			} else {
+				set(EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_READ);
+				clear(EFS.ATTRIBUTE_IMMUTABLE);
+			}
+		} else if (attribute == EFS.ATTRIBUTE_EXECUTABLE && isAttributeSuported(EFS.ATTRIBUTE_OWNER_EXECUTE)) {
+			if (value)
+				set(EFS.ATTRIBUTE_OWNER_EXECUTE);
+			else
+				clear(EFS.ATTRIBUTE_OWNER_EXECUTE | EFS.ATTRIBUTE_GROUP_EXECUTE | EFS.ATTRIBUTE_OTHER_EXECUTE);
+		} else {
+			if (value)
+				set(attribute);
+			else
+				clear(attribute);
+		}
+	}
+
+	private static boolean isAttributeSuported(int value) {
+		return (LocalFileNativesManager.getSupportedAttributes() & value) != 0;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileSystem.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileSystem.java
index e0542ba..f077af9 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileSystem.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -123,7 +123,7 @@ public abstract class FileSystem extends PlatformObject implements IFileSystem {
 	 * that can efficiently provide an {@link IFileTree} rooted at the given file store 
 	 * should override.
 	 */
-	public IFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor) {
+	public IFileTree fetchFileTree(IFileStore root, IProgressMonitor monitor) throws CoreException {
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileTree.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileTree.java
index 7de136c..4bbad62 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileTree.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/filesystem/provider/FileTree.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Activator.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Activator.java
index 751d859..aaf09bc 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Activator.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.core.internal.filesystem;
 
 import java.io.File;
+import java.util.Enumeration;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.osgi.framework.*;
@@ -60,6 +61,12 @@ public class Activator implements BundleActivator {
 		instance = this;
 	}
 
+	public static Enumeration findEntries(String path, String filePattern, boolean recurse) {
+		if (instance != null && instance.context != null)
+			return instance.context.getBundle().findEntries(path, filePattern, recurse);
+		return null;
+	}
+
 	public void start(BundleContext aContext) throws Exception {
 		this.context = aContext;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Messages.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Messages.java
index b3e96a2..e821bc1 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Messages.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/Convert.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/Convert.java
index 508d124..4752f9b 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/Convert.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/Convert.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,23 +72,33 @@ public class Convert {
 	/**
 	 * Calling new String(byte[] s) creates a new encoding object and other garbage.
 	 * This can be avoided by calling new String(byte[] s, String encoding) instead.
-	 * @param source String in platform bytes
+	 * @param source buffer with String in platform bytes
+	 * @param length number of relevant bytes in the buffer
 	 * @return converted Java String
 	 * @since org.eclipse.core.filesystem 1.1
 	 */
-	public static String fromPlatformBytes(byte[] source) {
+	public static String fromPlatformBytes(byte[] source, int length) {
 		if (defaultEncoding == null)
-			return new String(source);
+			return new String(source, 0, length);
 		// try to use the default encoding
 		try {
-			return new String(source, defaultEncoding);
+			return new String(source, 0, length, defaultEncoding);
 		} catch (UnsupportedEncodingException e) {
 			// null the default encoding so we don't try it again
 			defaultEncoding = null;
-			return new String(source);
+			return new String(source, 0, length);
 		}
 	}
 
+	/*
+	 * This method is called via Reflection API from the legacy file system
+	 * library (liblocalfile_1_0_0). Source for the native code is located
+	 * in org.eclipse.core.filesystem/natives/unix/localfile.c.
+	 */
+	public static String fromPlatformBytes(byte[] source) {
+		return fromPlatformBytes(source, source.length);
+	}
+
 	/**
 	 * Calling String.getBytes() creates a new encoding object and other garbage.
 	 * This can be avoided by calling String.getBytes(String encoding) instead.
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
index 275d97a..7418a02 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Martin Oberhuber (Wind River) - [294429] Avoid substring baggage in FileInfo
+ * Martin Oberhuber (Wind River) - [294429] Avoid substring baggage in FileInfo
  *******************************************************************************/
 package org.eclipse.core.internal.filesystem.local;
 
@@ -140,8 +140,8 @@ public class LocalFile extends FileStore {
 	}
 
 	public IFileInfo fetchInfo(int options, IProgressMonitor monitor) {
-		if (LocalFileNatives.usingNatives()) {
-			FileInfo info = LocalFileNatives.fetchFileInfo(filePath);
+		if (LocalFileNativesManager.isUsingNatives()) {
+			FileInfo info = LocalFileNativesManager.fetchFileInfo(filePath);
 			//natives don't set the file name on all platforms
 			if (info.getName().length() == 0) {
 				String name = file.getName();
@@ -398,8 +398,8 @@ public class LocalFile extends FileStore {
 	public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
 		boolean success = true;
 		if ((options & EFS.SET_ATTRIBUTES) != 0) {
-			if (LocalFileNatives.usingNatives())
-				success &= LocalFileNatives.setFileInfo(filePath, info, options);
+			if (LocalFileNativesManager.isUsingNatives())
+				success &= LocalFileNativesManager.putFileInfo(filePath, info, options);
 		}
 		//native does not currently set last modified
 		if ((options & EFS.SET_LAST_MODIFIED) != 0)
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNatives.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNatives.java
index 732a3a4..ef95fec 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNatives.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNatives.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,11 +11,11 @@
  *******************************************************************************/
 package org.eclipse.core.internal.filesystem.local;
 
+import java.util.Enumeration;
 import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.filesystem.IFileSystem;
 import org.eclipse.core.filesystem.provider.FileInfo;
-import org.eclipse.core.internal.filesystem.Messages;
-import org.eclipse.core.internal.filesystem.Policy;
+import org.eclipse.core.internal.filesystem.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.osgi.util.NLS;
 
@@ -33,10 +33,23 @@ abstract class LocalFileNatives {
 			hasNatives = true;
 			isUnicode = internalIsUnicode();
 		} catch (UnsatisfiedLinkError e) {
-			logMissingNativeLibrary(e);
+			if (isLibraryPresent())
+				logMissingNativeLibrary(e);
 		}
 	}
 
+	private static boolean isLibraryPresent() {
+		String libName = System.mapLibraryName(LIBRARY_NAME);
+		Enumeration entries = Activator.findEntries("/", libName, true); //$NON-NLS-1$
+		return entries != null && entries.hasMoreElements();
+	}
+
+	private static void logMissingNativeLibrary(UnsatisfiedLinkError e) {
+		String libName = System.mapLibraryName(LIBRARY_NAME);
+		String message = NLS.bind(Messages.couldNotLoadLibrary, libName);
+		Policy.log(IStatus.INFO, message, e);
+	}
+
 	/**
 	 * Return the bit-mask of EFS attributes that this native
 	 * file system implementation supports.
@@ -143,18 +156,12 @@ abstract class LocalFileNatives {
 	 * be called if <code>isUnicode</code> is <code>false</code>). */
 	private static final native boolean internalSetFileInfoW(char[] fileName, IFileInfo attribute, int options);
 
-	private static void logMissingNativeLibrary(UnsatisfiedLinkError e) {
-		String libName = System.mapLibraryName(LIBRARY_NAME);
-		String message = NLS.bind(Messages.couldNotLoadLibrary, libName);
-		Policy.log(IStatus.INFO, message, e);
-	}
-
 	/**
 	 * @param fileName
 	 * @param info
 	 * @param options
 	 */
-	public static boolean setFileInfo(String fileName, IFileInfo info, int options) {
+	public static boolean putFileInfo(String fileName, IFileInfo info, int options) {
 		if (isUnicode)
 			return internalSetFileInfoW(Convert.toPlatformChars(fileName), info, options);
 		return internalSetFileInfo(Convert.toPlatformBytes(fileName), info);
@@ -166,7 +173,7 @@ abstract class LocalFileNatives {
 	 * @return <code>true</code> if native library is available, and <code>false</code>
 	 * otherwise.
 	 */
-	public static boolean usingNatives() {
+	public static boolean isUsingNatives() {
 		return hasNatives;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNativesManager.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNativesManager.java
new file mode 100644
index 0000000..aa26a2b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileNativesManager.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.filesystem.local;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.internal.filesystem.local.unix.UnixFileNatives;
+
+/**
+ * Dispatches methods backed by native code to the appropriate platform specific 
+ * implementation depending on a library provided by a fragment.
+ */
+public class LocalFileNativesManager {
+
+	public static int getSupportedAttributes() {
+		if (UnixFileNatives.isUsingNatives())
+			return UnixFileNatives.getSupportedAttributes();
+		return LocalFileNatives.attributes();
+	}
+
+	public static FileInfo fetchFileInfo(String fileName) {
+		if (UnixFileNatives.isUsingNatives())
+			return UnixFileNatives.fetchFileInfo(fileName);
+		return LocalFileNatives.fetchFileInfo(fileName);
+	}
+
+	public static boolean putFileInfo(String fileName, IFileInfo info, int options) {
+		if (UnixFileNatives.isUsingNatives())
+			return UnixFileNatives.putFileInfo(fileName, info, options);
+		return LocalFileNatives.putFileInfo(fileName, info, options);
+	}
+
+	public static boolean isUsingNatives() {
+		return UnixFileNatives.isUsingNatives() || LocalFileNatives.isUsingNatives();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileSystem.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileSystem.java
index a73773b..a335001 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileSystem.java
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFileSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,11 +79,11 @@ public class LocalFileSystem extends FileSystem {
 		if (attributes != -1)
 			return attributes;
 		attributes = 0;
-		if (!LocalFileNatives.usingNatives())
+		if (!LocalFileNativesManager.isUsingNatives())
 			return attributes;
 
 		//try to query supported attributes from native lib impl
-		int nativeAttributes = LocalFileNatives.attributes();
+		int nativeAttributes = LocalFileNativesManager.getSupportedAttributes();
 		if (nativeAttributes >= 0) {
 			attributes = nativeAttributes;
 			return attributes;
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/StructStat.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/StructStat.java
new file mode 100644
index 0000000..7321bd7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/StructStat.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.filesystem.local.unix;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.provider.FileInfo;
+
+/**
+ * This class mirrors relevant fields of native struct stat
+ * and is used by JNI calls wrapping OS file related functions.
+ */
+public class StructStat {
+
+	public int st_mode;
+	public long st_size;
+	public long st_mtime;
+	public long st_flags; // Filled only on Mac OS X
+
+	public FileInfo toFileInfo() {
+		FileInfo info = new FileInfo();
+		info.setExists(true);
+		info.setLength(st_size);
+		info.setLastModified(st_mtime * 1000);
+		if ((st_mode & UnixFileFlags.S_IFMT) == UnixFileFlags.S_IFDIR)
+			info.setDirectory(true);
+		if ((st_flags & (UnixFileFlags.UF_IMMUTABLE | UnixFileFlags.SF_IMMUTABLE)) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_IMMUTABLE, true);
+		if ((st_mode & UnixFileFlags.S_IRUSR) == 0) // Set to true in FileInfo constructor
+			info.setAttribute(EFS.ATTRIBUTE_OWNER_READ, false);
+		if ((st_mode & UnixFileFlags.S_IWUSR) == 0) // Set to true in FileInfo constructor
+			info.setAttribute(EFS.ATTRIBUTE_OWNER_WRITE, false);
+		if ((st_mode & UnixFileFlags.S_IXUSR) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE, true);
+		if ((st_mode & UnixFileFlags.S_IRGRP) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_GROUP_READ, true);
+		if ((st_mode & UnixFileFlags.S_IWGRP) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, true);
+		if ((st_mode & UnixFileFlags.S_IXGRP) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, true);
+		if ((st_mode & UnixFileFlags.S_IROTH) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_OTHER_READ, true);
+		if ((st_mode & UnixFileFlags.S_IWOTH) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, true);
+		if ((st_mode & UnixFileFlags.S_IXOTH) != 0)
+			info.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, true);
+		return info;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileFlags.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileFlags.java
new file mode 100644
index 0000000..43d1112
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileFlags.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.filesystem.local.unix;
+
+public class UnixFileFlags {
+
+	static {
+		PATH_MAX = UnixFileNatives.getFlag("PATH_MAX"); //$NON-NLS-1$
+		S_IFMT = UnixFileNatives.getFlag("S_IFMT"); //$NON-NLS-1$
+		S_IFLNK = UnixFileNatives.getFlag("S_IFLNK"); //$NON-NLS-1$
+		S_IFDIR = UnixFileNatives.getFlag("S_IFDIR"); //$NON-NLS-1$
+		S_IRUSR = UnixFileNatives.getFlag("S_IRUSR"); //$NON-NLS-1$
+		S_IWUSR = UnixFileNatives.getFlag("S_IWUSR"); //$NON-NLS-1$
+		S_IXUSR = UnixFileNatives.getFlag("S_IXUSR"); //$NON-NLS-1$
+		S_IRGRP = UnixFileNatives.getFlag("S_IRGRP"); //$NON-NLS-1$
+		S_IWGRP = UnixFileNatives.getFlag("S_IWGRP"); //$NON-NLS-1$
+		S_IXGRP = UnixFileNatives.getFlag("S_IXGRP"); //$NON-NLS-1$
+		S_IROTH = UnixFileNatives.getFlag("S_IROTH"); //$NON-NLS-1$
+		S_IWOTH = UnixFileNatives.getFlag("S_IWOTH"); //$NON-NLS-1$
+		S_IXOTH = UnixFileNatives.getFlag("S_IXOTH"); //$NON-NLS-1$
+		UF_IMMUTABLE = UnixFileNatives.getFlag("UF_IMMUTABLE"); //$NON-NLS-1$
+		SF_IMMUTABLE = UnixFileNatives.getFlag("SF_IMMUTABLE"); //$NON-NLS-1$
+	}
+
+	/**
+	 * chars in a path name including nul
+	 */
+	public static final int PATH_MAX;
+
+	/**
+	 * bitmask for the file type bitfields
+	 */
+	public static final int S_IFMT;
+	/**
+	 * symbolic link
+	 */
+	public static final int S_IFLNK;
+	/**
+	 * directory
+	 */
+	public static final int S_IFDIR;
+	/**
+	 * owner has read permission
+	 */
+	public static final int S_IRUSR;
+	/**
+	 * owner has write permission
+	 */
+	public static final int S_IWUSR;
+	/**
+	 * owner has execute permission
+	 */
+	public static final int S_IXUSR;
+	/**
+	 * group has read permission
+	 */
+	public static final int S_IRGRP;
+	/**
+	 * group has write permission
+	 */
+	public static final int S_IWGRP;
+	/**
+	 * group has execute permission
+	 */
+	public static final int S_IXGRP;
+	/**
+	 * others have read permission
+	 */
+	public static final int S_IROTH;
+	/**
+	 * others have write permission
+	 */
+	public static final int S_IWOTH;
+	/**
+	 * others have execute permission
+	 */
+	public static final int S_IXOTH;
+
+	/**
+	 * the file may not be changed
+	 */
+	public static final int UF_IMMUTABLE;
+	/**
+	 * the file may not be changed
+	 */
+	public static final int SF_IMMUTABLE;
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileNatives.java b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileNatives.java
new file mode 100644
index 0000000..575f529
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/unix/UnixFileNatives.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.filesystem.local.unix;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Enumeration;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.internal.filesystem.*;
+import org.eclipse.core.internal.filesystem.local.Convert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.osgi.util.NLS;
+
+public abstract class UnixFileNatives {
+
+	private static final String LIBRARY_NAME = "unixfile_1_0_0"; //$NON-NLS-1$
+	private static final int UNICODE_SUPPORTED = 1 << 0;
+	private static final int CHFLAGS_SUPPORTED = 1 << 1;
+
+	private static final boolean usingNatives;
+	private static final int libattr;
+
+	static {
+		boolean _usingNatives = false;
+		int _libattr = 0;
+		try {
+			System.loadLibrary(LIBRARY_NAME);
+			_usingNatives = true;
+			_libattr = libattr();
+		} catch (UnsatisfiedLinkError e) {
+			if (isLibraryPresent())
+				logMissingNativeLibrary(e);
+		} finally {
+			usingNatives = _usingNatives;
+			libattr = _libattr;
+		}
+	}
+
+	private static boolean isLibraryPresent() {
+		String libName = System.mapLibraryName(LIBRARY_NAME);
+		Enumeration entries = Activator.findEntries("/", libName, true); //$NON-NLS-1$
+		return entries != null && entries.hasMoreElements();
+	}
+
+	private static void logMissingNativeLibrary(UnsatisfiedLinkError e) {
+		String libName = System.mapLibraryName(LIBRARY_NAME);
+		String message = NLS.bind(Messages.couldNotLoadLibrary, libName);
+		Policy.log(IStatus.INFO, message, e);
+	}
+
+	public static int getSupportedAttributes() {
+		if (!usingNatives)
+			return -1;
+		int ret = EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET | EFS.ATTRIBUTE_OWNER_READ | EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_EXECUTE | EFS.ATTRIBUTE_GROUP_READ | EFS.ATTRIBUTE_GROUP_WRITE | EFS.ATTRIBUTE_GROUP_EXECUTE | EFS.ATTRIBUTE_OTHER_READ | EFS.ATTRIBUTE_OTHER_WRITE | EFS.ATTRIBUTE_OTHER_EXECUTE;
+		if (isSupported(CHFLAGS_SUPPORTED))
+			ret |= EFS.ATTRIBUTE_IMMUTABLE;
+		return ret;
+	}
+
+	public static FileInfo fetchFileInfo(String fileName) {
+		FileInfo info = null;
+		byte[] name = fileNameToBytes(fileName);
+		StructStat stat = new StructStat();
+		if (lstat(name, stat) == 0) {
+			if ((stat.st_mode & UnixFileFlags.S_IFMT) == UnixFileFlags.S_IFLNK) {
+				if (stat(name, stat) == 0)
+					info = stat.toFileInfo();
+				else
+					info = new FileInfo();
+				info.setAttribute(EFS.ATTRIBUTE_SYMLINK, true);
+				byte target[] = new byte[UnixFileFlags.PATH_MAX];
+				int length = readlink(name, target, target.length);
+				if (length > 0)
+					info.setStringAttribute(EFS.ATTRIBUTE_LINK_TARGET, bytesToFileName(target, length));
+			} else
+				info = stat.toFileInfo();
+		} else
+			info = new FileInfo();
+		return info;
+	}
+
+	public static boolean putFileInfo(String fileName, IFileInfo info, int options) {
+		int code = 0;
+		byte[] name = fileNameToBytes(fileName);
+		if (name == null)
+			return false;
+
+		// In case uchg flag is to be removed do it before calling chmod
+		if (!info.getAttribute(EFS.ATTRIBUTE_IMMUTABLE) && isSupported(CHFLAGS_SUPPORTED)) {
+			StructStat stat = new StructStat();
+			if (stat(name, stat) == 0) {
+				long flags = stat.st_flags;
+				flags &= ~UnixFileFlags.SF_IMMUTABLE;
+				flags &= ~UnixFileFlags.UF_IMMUTABLE;
+				code |= chflags(name, (int) flags);
+			}
+		}
+
+		// Change permissions
+		int mode = 0;
+		if (info.getAttribute(EFS.ATTRIBUTE_OWNER_READ))
+			mode |= UnixFileFlags.S_IRUSR;
+		if (info.getAttribute(EFS.ATTRIBUTE_OWNER_WRITE))
+			mode |= UnixFileFlags.S_IWUSR;
+		if (info.getAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE))
+			mode |= UnixFileFlags.S_IXUSR;
+		if (info.getAttribute(EFS.ATTRIBUTE_GROUP_READ))
+			mode |= UnixFileFlags.S_IRGRP;
+		if (info.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE))
+			mode |= UnixFileFlags.S_IWGRP;
+		if (info.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE))
+			mode |= UnixFileFlags.S_IXGRP;
+		if (info.getAttribute(EFS.ATTRIBUTE_OTHER_READ))
+			mode |= UnixFileFlags.S_IROTH;
+		if (info.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE))
+			mode |= UnixFileFlags.S_IWOTH;
+		if (info.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE))
+			mode |= UnixFileFlags.S_IXOTH;
+		code |= chmod(name, mode);
+
+		// In case uchg flag is to be added do it after calling chmod
+		if (info.getAttribute(EFS.ATTRIBUTE_IMMUTABLE) && isSupported(CHFLAGS_SUPPORTED)) {
+			StructStat stat = new StructStat();
+			if (stat(name, stat) == 0) {
+				long flags = stat.st_flags;
+				flags |= UnixFileFlags.SF_IMMUTABLE;
+				code |= chflags(name, UnixFileFlags.UF_IMMUTABLE);
+			}
+		}
+		return code == 0;
+	}
+
+	public static boolean isUsingNatives() {
+		return usingNatives;
+	}
+
+	public static int getErrno() {
+		return errno();
+	}
+
+	public static int getFlag(String flag) {
+		if (!usingNatives)
+			return -1;
+		try {
+			return getflag(flag.getBytes("ASCII")); //$NON-NLS-1$
+		} catch (UnsupportedEncodingException e) {
+			// Should never happen
+			return -1;
+		}
+	}
+
+	private static byte[] fileNameToBytes(String fileName) {
+		if (isSupported(UNICODE_SUPPORTED))
+			return tounicode(fileName.toCharArray());
+		return Convert.toPlatformBytes(fileName);
+	}
+
+	private static String bytesToFileName(byte[] buf, int length) {
+		if (isSupported(UNICODE_SUPPORTED))
+			return new String(buf, 0, length);
+		return Convert.fromPlatformBytes(buf, length);
+	}
+
+	private static boolean isSupported(int attr) {
+		return (libattr & attr) != 0;
+	}
+
+	private static final native int chmod(byte[] path, int mode);
+
+	private static final native int chflags(byte[] path, int flags);
+
+	private static final native int stat(byte[] path, StructStat buf);
+
+	private static final native int lstat(byte[] path, StructStat buf);
+
+	private static final native int readlink(byte[] path, byte[] buf, long bufsiz);
+
+	private static final native int errno();
+
+	private static final native int libattr();
+
+	private static final native byte[] tounicode(char[] buf);
+
+	private static final native int getflag(byte[] buf);
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/messages.properties b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/messages.properties
index a9951be..98aca60 100644
--- a/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/messages.properties
+++ b/eclipse/plugins/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.jobs/.classpath b/eclipse/plugins/org.eclipse.core.jobs/.classpath
index ce0c7a5..6f3b481 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/.classpath
+++ b/eclipse/plugins/org.eclipse.core.jobs/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.core.jobs/.options b/eclipse/plugins/org.eclipse.core.jobs/.options
index 994faa5..801e822 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/.options
+++ b/eclipse/plugins/org.eclipse.core.jobs/.options
@@ -1,4 +1,4 @@
-# Debugging options for the org.eclipse.core.runtime plugin
+# Debugging options for the org.eclipse.core.jobs bundle
 
 # NOTE: There is a deadlock risk when using these debug flags in a workspace
 # launched from Eclipse due to interaction with a lock in the debugger console.  
@@ -8,7 +8,7 @@
 org.eclipse.core.jobs/jobs=false
 # Includes current date and time in job debug information
 org.eclipse.core.jobs/jobs/timing=false
-# Computes location of error on mismatched IJobManager.beginRule/endRule
+# Prints debug information when scheduling rules begin and end, and for mismatched beginRule/endRule pairs
 org.eclipse.core.jobs/jobs/beginend=false
 # Pedantic assertion checking on locks and deadlock reporting
 org.eclipse.core.jobs/jobs/locks=false
diff --git a/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.core.prefs
index f3bf85b..e9d68a5 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.core.prefs
@@ -1,11 +1,11 @@
-#Tue Jan 27 13:23:29 EST 2009
+#Mon Nov 23 09:24:20 EST 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
@@ -13,7 +13,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -122,11 +122,9 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
 org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_comments=false
 org.eclipse.jdt.core.formatter.comment.format_header=false
 org.eclipse.jdt.core.formatter.comment.format_html=true
 org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
@@ -152,7 +150,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
diff --git a/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
index 52991ab..04d622d 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.core.jobs/.settings/org.eclipse.jdt.ui.prefs
@@ -1,5 +1,6 @@
-#Fri Feb 23 16:59:25 EST 2007
+#Fri Sep 18 16:33:37 EDT 2009
 eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
 formatter_profile=_core
 formatter_settings_version=11
 internal.default.compliance=default
@@ -8,3 +9,54 @@ org.eclipse.jdt.ui.importorder=;
 org.eclipse.jdt.ui.ondemandthreshold=3
 org.eclipse.jdt.ui.staticondemandthreshold=99
 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *     IBM Corporation - initial API and implementation\r\n ******************************************************************************/\r\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @since 3.2\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n *     IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${filecomment}\r\n${package_declaration}\r\n\r\n/**\r\n * \r\n */\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block&\#13;\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.core.jobs/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.jobs/META-INF/MANIFEST.MF
index ff06bb8..5efc247 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.jobs/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.jobs; singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.5.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.core.internal.jobs;x-internal:=true,
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Counter.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Counter.java
new file mode 100644
index 0000000..a6282fc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Counter.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.jobs;
+
+/**
+ * Simple thread-safe long counter.
+ * @ThreadSafe
+ */
+public class Counter {
+	private long value = 0L;
+
+	public Counter() {
+		super();
+	}
+
+	public synchronized long increment() {
+		return value++;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.java
index 2edf816..f7c66f5 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ImplicitJobs.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2009 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,22 +20,27 @@ import org.eclipse.core.runtime.jobs.Job;
  * Implicit jobs are jobs that are running by virtue of a JobManager.begin/end
  * pair. They act like normal jobs, except they are tied to an arbitrary thread
  * of the client's choosing, and they can be nested.
+ * @ThreadSafe
  */
 class ImplicitJobs {
+
 	/**
 	 * Cached unused instance that can be reused 
+	 * @GuardedBy("this")
 	 */
 	private ThreadJob jobCache = null;
 	protected JobManager manager;
 
 	/**
 	 * Set of suspended scheduling rules.
+	 * @GuardedBy("this")
 	 */
 	private final Set suspendedRules = new HashSet(20);
 
 	/**
 	 * Maps (Thread->ThreadJob), threads to the currently running job for that
 	 * thread.
+	 * @GuardedBy("this")
 	 */
 	private final Map threadJobs = new HashMap(20);
 
@@ -81,10 +86,10 @@ class ImplicitJobs {
 			//join the thread job outside sync block
 			if (threadJob.acquireRule) {
 				//no need to re-acquire any locks because the thread did not wait to get this lock
-				if (manager.runNow(threadJob))
+				if (manager.runNow(threadJob, false) == null)
 					manager.getLockManager().addLockThread(Thread.currentThread(), rule);
 				else
-					threadJob = threadJob.joinRun(monitor);
+					threadJob = ThreadJob.joinRun(threadJob, monitor);
 			}
 		} finally {
 			//remember this thread job  - only do this
@@ -95,10 +100,6 @@ class ImplicitJobs {
 				if (suspend)
 					suspendedRules.add(rule);
 			}
-			if (threadJob.isBlocked) {
-				threadJob.isBlocked = false;
-				manager.reportUnblocked(monitor);
-			}
 		}
 	}
 
@@ -128,7 +129,7 @@ class ImplicitJobs {
 			ThreadJob threadJob = (ThreadJob) threadJobs.get(currentThread);
 			if (threadJob == null) {
 				if (lastJob.getRule() != null)
-					notifyWaitingThreadJobs();
+					notifyWaitingThreadJobs(lastJob);
 				return;
 			}
 			String msg = "Worker thread ended job: " + lastJob + ", but still holds rule: " + threadJob; //$NON-NLS-1$ //$NON-NLS-2$
@@ -144,6 +145,9 @@ class ImplicitJobs {
 		}
 	}
 
+	/**
+	 * @GuardedBy("this")
+	 */
 	private void endThreadJob(ThreadJob threadJob, boolean resume) {
 		Thread currentThread = Thread.currentThread();
 		//clean up when last rule scope exits
@@ -155,7 +159,7 @@ class ImplicitJobs {
 		//note it is safe to do this even if the acquire was aborted
 		if (threadJob.acquireRule) {
 			manager.getLockManager().removeLockThread(currentThread, rule);
-			notifyWaitingThreadJobs();
+			notifyWaitingThreadJobs(threadJob);
 		}
 		//if the job was started, we need to notify job manager to end it
 		if (threadJob.isRunning())
@@ -165,6 +169,7 @@ class ImplicitJobs {
 
 	/**
 	 * Returns true if this rule has been suspended, and false otherwise.
+	 * @GuardedBy("this")
 	 */
 	private boolean isSuspended(ISchedulingRule rule) {
 		if (suspendedRules.size() == 0)
@@ -177,11 +182,15 @@ class ImplicitJobs {
 
 	/**
 	 * Returns a new or reused ThreadJob instance. 
+	 * @GuardedBy("this")
 	 */
 	private ThreadJob newThreadJob(ISchedulingRule rule) {
 		if (jobCache != null) {
 			ThreadJob job = jobCache;
-			job.setRule(rule);
+			// calling setRule will try to acquire JobManager.lock, breaking
+			// lock acquisition protocol. Since we managing this special job 
+			// ourselves we can call internalSetRule
+			((InternalJob) job).internalSetRule(rule);
 			job.acquireRule = job.isRunning = false;
 			job.realJob = null;
 			jobCache = null;
@@ -195,14 +204,15 @@ class ImplicitJobs {
 	 * scheduling rule is now free.  Wake any blocked thread jobs so they can 
 	 * compete for the newly freed lock
 	 */
-	private void notifyWaitingThreadJobs() {
-		synchronized (ThreadJob.notifier) {
-			ThreadJob.notifier.notifyAll();
+	void notifyWaitingThreadJobs(InternalJob job) {
+		synchronized (job.jobStateLock) {
+			job.jobStateLock.notifyAll();
 		}
 	}
 
 	/**
 	 * Indicates that a thread job is no longer in use and can be reused. 
+	 * @GuardedBy("this")
 	 */
 	private void recycle(ThreadJob job) {
 		if (jobCache == null && job.recycle())
@@ -244,20 +254,45 @@ class ImplicitJobs {
 		if (currentThread == destinationThread)
 			return;
 		//ensure destination thread doesn't already have a rule
-		ThreadJob job = (ThreadJob) threadJobs.get(destinationThread);
-		Assert.isLegal(job == null, "Transfer rule to job that already owns a rule"); //$NON-NLS-1$
+		ThreadJob target = (ThreadJob) threadJobs.get(destinationThread);
+		Assert.isLegal(target == null, "Transfer rule to job that already owns a rule"); //$NON-NLS-1$
 		//ensure calling thread owns the job being transferred
-		job = (ThreadJob) threadJobs.get(currentThread);
-		Assert.isNotNull(job, "transferRule without beginRule"); //$NON-NLS-1$
-		Assert.isLegal(job.getRule() == rule, "transferred rule " + rule + " does not match beginRule: " + job.getRule()); //$NON-NLS-1$ //$NON-NLS-2$
-		//transfer the thread job without ending it
-		job.setThread(destinationThread);
+		ThreadJob source = (ThreadJob) threadJobs.get(currentThread);
+		Assert.isNotNull(source, "transferRule without beginRule"); //$NON-NLS-1$
+		Assert.isLegal(source.getRule() == rule, "transferred rule " + rule + " does not match beginRule: " + source.getRule()); //$NON-NLS-1$ //$NON-NLS-2$		// transfer the thread job without ending it
+		source.setThread(destinationThread);
 		threadJobs.remove(currentThread);
-		threadJobs.put(destinationThread, job);
-		//transfer lock
-		if (job.acquireRule) {
+		threadJobs.put(destinationThread, source);
+		// transfer lock
+		if (source.acquireRule) {
 			manager.getLockManager().removeLockThread(currentThread, rule);
 			manager.getLockManager().addLockThread(destinationThread, rule);
 		}
+		// Wake up any blocked jobs (waiting within yield or joinRun) waiting on
+		// this rule
+		notifyWaitingThreadJobs(source);
+	}
+
+	synchronized void removeWaiting(ThreadJob threadJob) {
+		synchronized (((InternalJob) threadJob).jobStateLock) {
+			threadJob.isWaiting = false;
+			notifyWaitingThreadJobs(threadJob);
+			((InternalJob) threadJob).setWaitQueueStamp(InternalJob.T_NONE);
+		}
+		manager.dequeue(manager.waitingThreadJobs, threadJob);
 	}
+
+	synchronized void addWaiting(ThreadJob threadJob) {
+		synchronized (((InternalJob) threadJob).jobStateLock) {
+			threadJob.isWaiting = true;
+			notifyWaitingThreadJobs(threadJob);
+			((InternalJob) threadJob).setWaitQueueStamp(manager.waitQueueCounter.increment());
+		}
+		manager.enqueue(manager.waitingThreadJobs, threadJob);
+	}
+
+	synchronized ThreadJob getThreadJob(Thread thread) {
+		return (ThreadJob) threadJobs.get(thread);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalJob.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalJob.java
index cb7c1af..9e9a211 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalJob.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,11 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	 * running job.  From an API point of view, this is the same as WAITING.
 	 */
 	static final int BLOCKED = 0x08;
+	/** 
+	 * Job state code (value 64) indicating that a job is yielding.
+	 * From an API point of view, this is the same as WAITING.
+	 */
+	static final int YIELDING = 0x40;
 
 	//flag mask bits
 	private static final int M_STATE = 0xFF;
@@ -48,7 +53,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	 * flag on a job indicating that it was about to run, but has been canceled
 	 */
 	private static final int M_ABOUT_TO_RUN_CANCELED = 0x0400;
-	
+
 	/*
 	 * Flag on a job indicating that it was canceled when running. This flag
 	 * is used to ensure that #canceling is only ever called once on a job in
@@ -56,8 +61,8 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	 */
 	private static final int M_RUN_CANCELED = 0x0800;
 
-	protected static final JobManager manager = JobManager.getInstance();
 	private static int nextJobNumber = 0;
+	protected static final JobManager manager = JobManager.getInstance();
 
 	/**
 	 * Start time constant indicating a job should be started at
@@ -70,16 +75,18 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	static final long T_NONE = -1;
 
 	private volatile int flags = Job.NONE;
-	private final int jobNumber = nextJobNumber++;
+	private final int jobNumber = getNextJobNumber();
 	private ListenerList listeners = null;
-	private IProgressMonitor monitor;
+	private volatile IProgressMonitor monitor;
 	private String name;
 	/**
 	 * The job ahead of me in a queue or list.
+	 * @GuardedBy("manager.lock")
 	 */
 	private InternalJob next;
 	/**
 	 * The job behind me in a queue or list.
+	 * @GuardedBy("manager.lock")
 	 */
 	private InternalJob previous;
 	private int priority = Job.LONG;
@@ -88,28 +95,55 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	 * to a job instance by a third party.
 	 */
 	private ObjectMap properties;
-	private IStatus result;
+
+	/**
+	 * Volatile because it is usually set via a Worker thread and is read via a 
+	 * client thread. 
+	 */
+	private volatile IStatus result;
+	/**
+	 * @GuardedBy("manager.lock")
+	 */
 	private ISchedulingRule schedulingRule;
 	/**
 	 * If the job is waiting, this represents the time the job should start by.  
 	 * If this job is sleeping, this represents the time the job should wake up.
 	 * If this job is running, this represents the delay automatic rescheduling,
 	 * or -1 if the job should not be rescheduled.
+	 * @GuardedBy("manager.lock")
 	 */
 	private long startTime;
-	
+
 	/**
 	 * Stamp added when a job is added to the wait queue. Used to ensure
 	 * jobs in the wait queue maintain their insertion order even if they are
 	 * removed from the wait queue temporarily while blocked
+	 * @GuardedBy("manager.lock")
 	 */
 	private long waitQueueStamp = T_NONE;
-	
+
 	/*
 	 * The thread that is currently running this job
 	 */
 	private volatile Thread thread = null;
 
+	/**
+	 * This lock will be held while performing state changes on this job. It is 
+	 * also used as a notifier used to wake up yielding jobs or waiting ThreadJobs
+	 * when 1) a conflicting job completes and releases a scheduling rule, or 2)
+	 * when a this job changes state. 
+	 * 
+	 * See also the lock ordering protocol explanation in JobManager's 
+	 * documentation.
+	 * 
+	 * @GuardedBy("itself")
+	 */
+	final Object jobStateLock = new Object();
+
+	private static synchronized int getNextJobNumber() {
+		return nextJobNumber++;
+	}
+
 	protected InternalJob(String name) {
 		Assert.isNotNull(name);
 		this.name = name;
@@ -126,6 +160,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 
 	/**
 	 * Adds an entry at the end of the list of which this item is the head.
+	 * @GuardedBy("manager.lock")
 	 */
 	final void addLast(InternalJob entry) {
 		InternalJob last = this;
@@ -242,7 +277,8 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	protected int getState() {
 		int state = flags & M_STATE;
 		switch (state) {
-			//blocked state is equivalent to waiting state for clients
+			//blocked and yielding state is equivalent to waiting state for clients
+			case YIELDING :
 			case BLOCKED :
 				return Job.WAITING;
 			case ABOUT_TO_RUN :
@@ -494,6 +530,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	/**
 	 * Sets or clears the result of an execution of this job.
 	 * @param result a result status, or <code>null</code>
+	 * @GuardedBy("manager.lock")
 	 */
 	final void setResult(IStatus result) {
 		this.result = result;
@@ -501,6 +538,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 
 	/* (non-Javadoc)
 	 * @see Job#setRule(ISchedulingRule)
+	 * @GuardedBy("manager.lock")
 	 */
 	protected void setRule(ISchedulingRule rule) {
 		manager.setRule(this, rule);
@@ -510,6 +548,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	 * Sets a time to start, wake up, or schedule this job, 
 	 * depending on the current state
 	 * @param time a time in milliseconds
+	 * @GuardedBy("manager.lock")
 	 */
 	final void setStartTime(long time) {
 		startTime = time;
@@ -555,6 +594,13 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 	}
 
 	/* (non-Javadoc)
+	 * @see Job#yieldRule()
+	 */
+	protected Job yieldRule(IProgressMonitor progressMonitor) {
+		return manager.yieldRule(this, progressMonitor);
+	}
+
+	/* (non-Javadoc)
 	 * Prints a string-based representation of this job instance. 
 	 * For debugging purposes only.
 	 */
@@ -571,6 +617,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 
 	/**
 	 * @param waitQueueStamp The waitQueueStamp to set.
+	 * @GuardedBy("manager.lock")
 	 */
 	void setWaitQueueStamp(long waitQueueStamp) {
 		this.waitQueueStamp = waitQueueStamp;
@@ -578,6 +625,7 @@ public abstract class InternalJob extends PlatformObject implements Comparable {
 
 	/**
 	 * @return Returns the waitQueueStamp.
+	 * @GuardedBy("manager.lock")
 	 */
 	long getWaitQueueStamp() {
 		return waitQueueStamp;
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalWorker.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalWorker.java
new file mode 100644
index 0000000..3b55b5f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/InternalWorker.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.jobs;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * Used to perform internal JobManager tasks. Currently, this is limited to checking 
+ * progress monitors while a thread is performing a blocking wait in ThreadJob. 
+ */
+public class InternalWorker extends Thread {
+	private final JobManager manager;
+	/**
+	 * @GuardedBy("manager.monitorStack")
+	 */
+	private boolean canceled;
+
+	InternalWorker(JobManager manager) {
+		super("Worker-JM"); //$NON-NLS-1$
+		this.manager = manager;
+	}
+
+	/**
+	* Will loop until there are progress monitors to check. While there are monitors
+	* registered, it will check cancelation every 250ms, and if it is canceled it will
+	* interrupt the ThreadJob that is performing a blocking wait. 
+	*/
+	public void run() {
+		int timeout = 0;
+		synchronized (manager.monitorStack) {
+			while (!canceled) {
+				if (manager.monitorStack.isEmpty()) {
+					timeout = 0;
+				} else {
+					timeout = 250;
+				}
+				for (int i = 0; i < manager.monitorStack.size(); i++) {
+					Object[] o = (Object[]) manager.monitorStack.get(i);
+					IProgressMonitor monitor = (IProgressMonitor) o[1];
+					if (monitor.isCanceled()) {
+						Job job = (Job) o[0];
+						Thread t = job.getThread();
+						if (t != null) {
+							t.interrupt();
+						}
+					}
+				}
+				try {
+					manager.monitorStack.wait(timeout);
+				} catch (InterruptedException e) {
+					// loop
+				}
+			}
+		}
+	}
+
+	/**
+	* Terminate this thread. Once terminated, it cannot be restarted. 
+	*/
+	void cancel() {
+		synchronized (manager.monitorStack) {
+			canceled = true;
+			manager.monitorStack.notifyAll();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.java
index f003d6a..6f423f6 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,8 @@
  *     IBM Corporation - initial API and implementation
  *     Stephan Wahlbrink  - Fix for bug 200997.
  *     Danail Nachev - Fix for bug 109898
+ *     Mike Moreaty - Fix for bug 289790
+ *     Oracle Corporation - Fix for bug 316839
  *******************************************************************************/
 package org.eclipse.core.internal.jobs;
 
@@ -23,14 +25,20 @@ import org.eclipse.osgi.util.NLS;
 /**
  * Implementation of API type IJobManager
  * 
- * Implementation note: all the data structures of this class are protected
- * by a single lock object held as a private field in this class.  The JobManager
- * instance itself is not used because this class is publicly reachable, and third
- * party clients may try to synchronize on it.
+ * Implementation note: all the data structures of this class are protected by a
+ * single lock object held as a private field in this class. The JobManager
+ * instance itself is not used because this class is publicly reachable, and
+ * third party clients may try to synchronize on it.
  * 
- * The WorkerPool class uses its own monitor for synchronizing its data
- * structures. To avoid deadlock between the two classes, the JobManager
- * must NEVER call the worker pool while its own monitor is held.
+ * There are various locks used and held throughout the JobManager
+ * implementation. When multiple locks interact, circular hold and waits must
+ * never happen, or a deadlock will occur. To prevent deadlocks, this is the
+ * order that locks must be acquired.
+ * 
+ * WorkerPool -> JobManager.implicitJobs -> JobManager.lock -> 
+ * InternalJob.jobStateLock
+ * 
+ * @ThreadSafe
  */
 public class JobManager implements IJobManager {
 
@@ -47,6 +55,8 @@ public class JobManager implements IJobManager {
 
 	private static final String OPTION_DEADLOCK_ERROR = PI_JOBS + "/jobs/errorondeadlock"; //$NON-NLS-1$
 	private static final String OPTION_DEBUG_BEGIN_END = PI_JOBS + "/jobs/beginend"; //$NON-NLS-1$
+	private static final String OPTION_DEBUG_YIELDING = PI_JOBS + "/jobs/yielding"; //$NON-NLS-1$
+	private static final String OPTION_DEBUG_YIELDING_DETAILED = PI_JOBS + "/jobs/yielding/detailed"; //$NON-NLS-1$
 	private static final String OPTION_DEBUG_JOBS = PI_JOBS + "/jobs"; //$NON-NLS-1$
 	private static final String OPTION_DEBUG_JOBS_TIMING = PI_JOBS + "/jobs/timing"; //$NON-NLS-1$
 	private static final String OPTION_LOCKS = PI_JOBS + "/jobs/locks"; //$NON-NLS-1$
@@ -54,6 +64,8 @@ public class JobManager implements IJobManager {
 
 	static boolean DEBUG = false;
 	static boolean DEBUG_BEGIN_END = false;
+	static boolean DEBUG_YIELDING = false;
+	static boolean DEBUG_YIELDING_DETAILED = false;
 	static boolean DEBUG_DEADLOCK = false;
 	static boolean DEBUG_LOCKS = false;
 	static boolean DEBUG_TIMING = false;
@@ -81,8 +93,7 @@ public class JobManager implements IJobManager {
 
 	/**
 	 * True if this manager is active, and false otherwise.  A job manager
-	 * starts out active, and becomes inactive if it has been shutdown
-	 * and not restarted.
+	 * starts out active, and becomes inactive if it has been shutdown.
 	 */
 	private volatile boolean active = true;
 
@@ -94,6 +105,7 @@ public class JobManager implements IJobManager {
 	 * The lock for synchronizing all activity in the job manager.  To avoid deadlock,
 	 * this lock must never be held for extended periods, and must never be
 	 * held while third party code is being called.
+	 * @GuardedBy("itself")
 	 */
 	private final Object lock = new Object();
 
@@ -104,16 +116,27 @@ public class JobManager implements IJobManager {
 	 */
 	private WorkerPool pool;
 
+	/**
+	 * @GuardedBy("lock")
+	 */
 	private ProgressProvider progressProvider = null;
 	/**
 	 * Jobs that are currently running. Should only be modified from changeState
+	 * @GuardedBy("lock")
 	 */
 	private final HashSet running;
 
 	/**
+	 * Jobs that are currently yielding. Should only be modified from changeState
+	 * @GuardedBy("lock")
+	 */
+	private final HashSet yielding;
+
+	/**
 	 * Jobs that are sleeping.  Some sleeping jobs are scheduled to wake
 	 * up at a given start time, while others will sleep indefinitely until woken.
 	 * Should only be modified from changeState
+	 * @GuardedBy("lock")
 	 */
 	private final JobQueue sleeping;
 	/**
@@ -121,18 +144,35 @@ public class JobManager implements IJobManager {
 	 * starts out not suspended, and becomes suspended when <code>suspend</code>
 	 * is invoked. Once suspended, no jobs will start running until <code>resume</code>
 	 * is called.
+	 * @GuardedBy("lock")
 	 */
 	private boolean suspended = false;
 
 	/**
 	 * jobs that are waiting to be run. Should only be modified from changeState
+	 * @GuardedBy("lock")
 	 */
 	private final JobQueue waiting;
 
 	/**
+	 * ThreadJobs that are waiting to be run. Should only be modified from changeState
+	 * @GuardedBy("lock")
+	 */
+	final JobQueue waitingThreadJobs;
+
+	/**
 	 * Counter to record wait queue insertion order.
+	 * @GuardedBy("lock")
 	 */
-	private long waitQueueCounter;
+	Counter waitQueueCounter = new Counter();
+
+	/**
+	 * A set of progress monitors we must track cancellation requests for.
+	 * @GuardedBy("itself")
+	 */
+	final List monitorStack = new ArrayList();
+
+	private final InternalWorker internalWorker;
 
 	public static void debug(String msg) {
 		StringBuffer msgBuf = new StringBuffer(msg.length() + 40);
@@ -172,6 +212,13 @@ public class JobManager implements IJobManager {
 	/**
 	 * For debugging purposes only
 	 */
+	public static String printState(Job job) {
+		return printState(((InternalJob) job).internalGetState());
+	}
+
+	/**
+	* For debugging purposes only
+	*/
 	public static String printState(int state) {
 		switch (state) {
 			case Job.NONE :
@@ -184,6 +231,8 @@ public class JobManager implements IJobManager {
 				return "RUNNING"; //$NON-NLS-1$
 			case InternalJob.BLOCKED :
 				return "BLOCKED"; //$NON-NLS-1$
+			case InternalJob.YIELDING :
+				return "YIELDING"; //$NON-NLS-1$
 			case InternalJob.ABOUT_TO_RUN :
 				return "ABOUT_TO_RUN"; //$NON-NLS-1$
 			case InternalJob.ABOUT_TO_SCHEDULE :
@@ -210,11 +259,16 @@ public class JobManager implements IJobManager {
 		initDebugOptions();
 		synchronized (lock) {
 			waiting = new JobQueue(false);
+			waitingThreadJobs = new JobQueue(false, false);
 			sleeping = new JobQueue(true);
 			running = new HashSet(10);
+			yielding = new HashSet(10);
 			pool = new WorkerPool(this);
 		}
 		pool.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads());
+		internalWorker = new InternalWorker(this);
+		internalWorker.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads());
+		internalWorker.start();
 	}
 
 	/* (non-Javadoc)
@@ -288,73 +342,81 @@ public class JobManager implements IJobManager {
 	private void changeState(InternalJob job, int newState) {
 		boolean blockedJobs = false;
 		synchronized (lock) {
-			int oldState = job.internalGetState();
-			switch (oldState) {
-				case Job.NONE :
-				case InternalJob.ABOUT_TO_SCHEDULE :
-					break;
-				case InternalJob.BLOCKED :
-					//remove this job from the linked list of blocked jobs
-					job.remove();
-					break;
-				case Job.WAITING :
-					try {
-						waiting.remove(job);
-					} catch (RuntimeException e) {
-						Assert.isLegal(false, "Tried to remove a job that wasn't in the queue"); //$NON-NLS-1$
-					}
-					break;
-				case Job.SLEEPING :
-					try {
-						sleeping.remove(job);
-					} catch (RuntimeException e) {
-						Assert.isLegal(false, "Tried to remove a job that wasn't in the queue"); //$NON-NLS-1$
-					}
-					break;
-				case Job.RUNNING :
-				case InternalJob.ABOUT_TO_RUN :
-					running.remove(job);
-					//add any blocked jobs back to the wait queue
-					InternalJob blocked = job.previous();
-					job.remove();
-					blockedJobs = blocked != null;
-					while (blocked != null) {
-						InternalJob previous = blocked.previous();
-						changeState(blocked, Job.WAITING);
-						blocked = previous;
-					}
-					break;
-				default :
-					Assert.isLegal(false, "Invalid job state: " + job + ", state: " + oldState); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-			job.internalSetState(newState);
-			switch (newState) {
-				case Job.NONE :
-					job.setStartTime(InternalJob.T_NONE);
-					job.setWaitQueueStamp(InternalJob.T_NONE);
-					job.setRunCanceled(false);
-				case InternalJob.BLOCKED :
-					break;
-				case Job.WAITING :
-					waiting.enqueue(job);
-					break;
-				case Job.SLEEPING :
-					try {
-						sleeping.enqueue(job);
-					} catch (RuntimeException e) {
-						throw new RuntimeException("Error changing from state: " + oldState); //$NON-NLS-1$
-					}
-					break;
-				case Job.RUNNING :
-				case InternalJob.ABOUT_TO_RUN :
-					job.setStartTime(InternalJob.T_NONE);
-					job.setWaitQueueStamp(InternalJob.T_NONE);
-					running.add(job);
-					break;
-				case InternalJob.ABOUT_TO_SCHEDULE :
-					break;
-				default :
-					Assert.isLegal(false, "Invalid job state: " + job + ", state: " + newState); //$NON-NLS-1$ //$NON-NLS-2$
+			synchronized (job.jobStateLock) {
+				job.jobStateLock.notifyAll();
+				int oldState = job.internalGetState();
+				switch (oldState) {
+					case InternalJob.YIELDING :
+						yielding.remove(job);
+					case Job.NONE :
+					case InternalJob.ABOUT_TO_SCHEDULE :
+						break;
+					case InternalJob.BLOCKED :
+						//remove this job from the linked list of blocked jobs
+						job.remove();
+						break;
+					case Job.WAITING :
+						try {
+							waiting.remove(job);
+						} catch (RuntimeException e) {
+							Assert.isLegal(false, "Tried to remove a job that wasn't in the queue"); //$NON-NLS-1$
+						}
+						break;
+					case Job.SLEEPING :
+						try {
+							sleeping.remove(job);
+						} catch (RuntimeException e) {
+							Assert.isLegal(false, "Tried to remove a job that wasn't in the queue"); //$NON-NLS-1$
+						}
+						break;
+					case Job.RUNNING :
+					case InternalJob.ABOUT_TO_RUN :
+						running.remove(job);
+						//add any blocked jobs back to the wait queue
+						InternalJob blocked = job.previous();
+						job.remove();
+						blockedJobs = blocked != null;
+						while (blocked != null) {
+							InternalJob previous = blocked.previous();
+							changeState(blocked, Job.WAITING);
+							blocked = previous;
+						}
+						break;
+					default :
+						Assert.isLegal(false, "Invalid job state: " + job + ", state: " + oldState); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				job.internalSetState(newState);
+				switch (newState) {
+					case Job.NONE :
+						job.setStartTime(InternalJob.T_NONE);
+						job.setWaitQueueStamp(InternalJob.T_NONE);
+						job.setRunCanceled(false);
+					case InternalJob.BLOCKED :
+						break;
+					case Job.WAITING :
+						waiting.enqueue(job);
+						break;
+					case Job.SLEEPING :
+						try {
+							sleeping.enqueue(job);
+						} catch (RuntimeException e) {
+							throw new RuntimeException("Error changing from state: " + oldState); //$NON-NLS-1$
+						}
+						break;
+					case Job.RUNNING :
+					case InternalJob.ABOUT_TO_RUN :
+						// These flags must be reset in all cases, including resuming from yield
+						job.setStartTime(InternalJob.T_NONE);
+						job.setWaitQueueStamp(InternalJob.T_NONE);
+						running.add(job);
+						break;
+					case InternalJob.YIELDING :
+						yielding.add(job);
+					case InternalJob.ABOUT_TO_SCHEDULE :
+						break;
+					default :
+						Assert.isLegal(false, "Invalid job state: " + job + ", state: " + newState); //$NON-NLS-1$ //$NON-NLS-2$
+				}
 			}
 		}
 		//notify queue outside sync block
@@ -384,6 +446,7 @@ public class JobManager implements IJobManager {
 
 	/**
 	 * Returns a new progress monitor for this job.  Never returns null.
+	 * @GuardedBy("lock")
 	 */
 	private IProgressMonitor createMonitor(Job job) {
 		IProgressMonitor monitor = null;
@@ -420,6 +483,17 @@ public class JobManager implements IJobManager {
 		return null;
 	}
 
+	public ISchedulingRule currentRule() {
+		//check thread job first, because actual current job may have null rule
+		Job currentJob = implicitJobs.getThreadJob(Thread.currentThread());
+		if (currentJob != null)
+			return currentJob.getRule();
+		currentJob = currentJob();
+		if (currentJob != null)
+			return currentJob.getRule();
+		return null;
+	}
+
 	/**
 	 * Returns the delay in milliseconds that a job with a given priority can
 	 * tolerate waiting.
@@ -462,7 +536,7 @@ public class JobManager implements IJobManager {
 				changeState(job, Job.SLEEPING);
 			} else {
 				job.setStartTime(System.currentTimeMillis() + delayFor(job.getPriority()));
-				job.setWaitQueueStamp(waitQueueCounter++);
+				job.setWaitQueueStamp(waitQueueCounter.increment());
 				changeState(job, Job.WAITING);
 			}
 		}
@@ -477,15 +551,14 @@ public class JobManager implements IJobManager {
 	private void doShutdown() {
 		Job[] toCancel = null;
 		synchronized (lock) {
-			if (active) {
-				active = false;
-				//cancel all running jobs
-				toCancel = (Job[]) running.toArray(new Job[running.size()]);
-				//clean up
-				sleeping.clear();
-				waiting.clear();
-				running.clear();
-			}
+			if (!active)
+				return;
+			active = false;
+			//cancel all running jobs
+			toCancel = (Job[]) running.toArray(new Job[running.size()]);
+			//discard any jobs that have not yet started running
+			sleeping.clear();
+			waiting.clear();
 		}
 
 		// Give running jobs a chance to finish. Wait 0.1 seconds for up to 3 times.
@@ -524,7 +597,7 @@ public class JobManager implements IJobManager {
 				toCancel = (Job[]) running.toArray(new Job[running.size()]);
 			}
 		}
-
+		internalWorker.cancel();
 		if (toCancel != null) {
 			for (int i = 0; i < toCancel.length; i++) {
 				String jobName = printJobName(toCancel[i]);
@@ -538,6 +611,10 @@ public class JobManager implements IJobManager {
 				System.err.println(msg);
 			}
 		}
+		synchronized (lock) {
+			//discard reference to any jobs still running at this point
+			running.clear();
+		}
 
 		pool.shutdown();
 	}
@@ -571,6 +648,9 @@ public class JobManager implements IJobManager {
 		//reschedule the job if requested and we are still active
 		if (reschedule)
 			schedule(job, rescheduleDelay, reschedule);
+		//log result if it is warning or error
+		if ((result.getSeverity() & (IStatus.ERROR | IStatus.WARNING)) != 0)
+			RuntimeLog.log(result);
 	}
 
 	/* (non-Javadoc)
@@ -627,6 +707,34 @@ public class JobManager implements IJobManager {
 		return null;
 	}
 
+	/**
+	 * Returns a job from the given collection whose scheduling rule conflicts
+	 * with the scheduling rule of the given job.  Returns null if there are no 
+	 * conflicting jobs.  
+	 */
+	InternalJob findBlockedJob(InternalJob job, Iterator jobs) {
+		synchronized (lock) {
+			while (jobs.hasNext()) {
+				InternalJob waitingJob = (InternalJob) jobs.next();
+				if (waitingJob.isConflicting(job))
+					return waitingJob;
+			}
+			return null;
+		}
+	}
+
+	void dequeue(JobQueue queue, InternalJob job) {
+		synchronized (lock) {
+			queue.remove(job);
+		}
+	}
+
+	void enqueue(JobQueue queue, InternalJob job) {
+		synchronized (lock) {
+			queue.enqueue(job);
+		}
+	}
+
 	public LockManager getLockManager() {
 		return lockManager;
 	}
@@ -643,6 +751,8 @@ public class JobManager implements IJobManager {
 	private void initDebugOptions() {
 		DEBUG = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS, false);
 		DEBUG_BEGIN_END = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_BEGIN_END, false);
+		DEBUG_YIELDING = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_YIELDING, false);
+		DEBUG_YIELDING_DETAILED = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_YIELDING_DETAILED, false);
 		DEBUG_DEADLOCK = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEADLOCK_ERROR, false);
 		DEBUG_LOCKS = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_LOCKS, false);
 		DEBUG_TIMING = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS_TIMING, false);
@@ -866,7 +976,7 @@ public class JobManager implements IJobManager {
 			InternalJob job = sleeping.peek();
 			while (job != null && job.getStartTime() < now) {
 				job.setStartTime(now + delayFor(job.getPriority()));
-				job.setWaitQueueStamp(waitQueueCounter++);
+				job.setWaitQueueStamp(waitQueueCounter.increment());
 				changeState(job, Job.WAITING);
 				job = sleeping.peek();
 			}
@@ -953,21 +1063,37 @@ public class JobManager implements IJobManager {
 	}
 
 	/**
-	 * Attempts to immediately start a given job.  Returns true if the job was
-	 * successfully started, and false if it could not be started immediately
+	 * Attempts to immediately start a given job.  Returns null if the job was
+	 * successfully started, and the blocking job if it could not be started immediately
 	 * due to a currently running job with a conflicting rule.  Listeners will never
 	 * be notified of jobs that are run in this way.
 	 */
-	protected boolean runNow(InternalJob job) {
+	protected InternalJob runNow(ThreadJob job, boolean releaseWaiting) {
+		if (releaseWaiting) {
+			synchronized (implicitJobs) {
+				synchronized (lock) {
+					return doRunNow(job, releaseWaiting);
+				}
+			}
+		}
 		synchronized (lock) {
-			//cannot start if there is a conflicting job
-			if (findBlockingJob(job) != null)
-				return false;
+			return doRunNow(job, releaseWaiting);
+		}
+	}
+
+	private InternalJob doRunNow(ThreadJob job, boolean releaseWaiting) {
+		InternalJob blocking = findBlockingJob(job);
+		//cannot start if there is a conflicting job
+		if (blocking == null) {
 			changeState(job, Job.RUNNING);
-			job.setProgressMonitor(new NullProgressMonitor());
+			((InternalJob) job).setProgressMonitor(new NullProgressMonitor());
 			job.run(null);
+			if (releaseWaiting) {
+				// atomically release waiting
+				implicitJobs.removeWaiting(job);
+			}
 		}
-		return true;
+		return blocking;
 	}
 
 	/* (non-Javadoc)
@@ -1035,8 +1161,12 @@ public class JobManager implements IJobManager {
 					select(members, family, (InternalJob) it.next(), stateMask);
 				}
 			}
-			if ((stateMask & Job.WAITING) != 0)
+			if ((stateMask & Job.WAITING) != 0) {
 				select(members, family, waiting.peek(), stateMask);
+				for (Iterator it = yielding.iterator(); it.hasNext();) {
+					select(members, family, (InternalJob) it.next(), stateMask);
+				}
+			}
 			if ((stateMask & Job.SLEEPING) != 0)
 				select(members, family, sleeping.peek(), stateMask);
 		}
@@ -1149,6 +1279,177 @@ public class JobManager implements IJobManager {
 	}
 
 	/**
+	 * Implementation of {@link Job#yieldRule(IProgressMonitor)}
+	 */
+	protected Job yieldRule(InternalJob job, IProgressMonitor monitor) {
+		Thread currentThread = Thread.currentThread();
+		Assert.isLegal(job.getState() == Job.RUNNING, "Cannot yieldRule job that is " + printState(job.internalGetState())); //$NON-NLS-1$
+		Assert.isLegal(currentThread == job.getThread(), "Cannot yieldRule from outside job's thread"); //$NON-NLS-1$
+
+		InternalJob unblocked;
+		// If job is not a ThreadJob, and it has implicitly started rules, likeThreadJob 
+		// is the corresponding ThreadJob. Similarly, if likeThreadJob is not null, then 
+		// job is not a ThreadJob
+		ThreadJob likeThreadJob;
+		synchronized (implicitJobs) {
+			synchronized (lock) {
+				// The nested implicit job, if any
+				likeThreadJob = implicitJobs.getThreadJob(currentThread);
+
+				unblocked = job.previous();
+
+				// if unblocked is not null, it was a blocked job. It is guaranteed
+				// that it will be the next job run by the worker threads once this 
+				// lock is released. 
+				if (unblocked == null) {
+
+					if (likeThreadJob != null) {
+
+						// look for any explicit jobs we may be blocking
+						unblocked = ((InternalJob) likeThreadJob).previous();
+
+						if (unblocked == null) {
+
+							// look for any implicit (or yielding) jobs we may be blocking. 
+							unblocked = findBlockedJob(likeThreadJob, waitingThreadJobs.iterator());
+						}
+
+					} else {
+
+						// look for any implicit (or yielding) jobs we may be blocking. 
+						unblocked = findBlockedJob(job, waitingThreadJobs.iterator());
+					}
+				}
+
+				// optimization: do nothing if we don't unblock any job
+				if (unblocked == null)
+					return null;
+
+				// "release" our rule by exiting RUNNING state
+				changeState(job, InternalJob.YIELDING);
+				if (DEBUG_YIELDING)
+					JobManager.debug(job + " will yieldRule to " + unblocked); //$NON-NLS-1$
+
+				if (likeThreadJob != null && likeThreadJob != job) {
+					// if there is a corresponding thread job, it needs yield as well
+					changeState(likeThreadJob, InternalJob.YIELDING);
+					if (DEBUG_YIELDING)
+						JobManager.debug(job + " will yieldRule to " + unblocked); //$NON-NLS-1$
+				}
+
+				if (likeThreadJob != null) {
+					// only null-out threads out for non-ThreadJobs
+					job.setThread(null);
+					if (likeThreadJob.getRule() != null) {
+						getLockManager().removeLockThread(currentThread, likeThreadJob.getRule());
+					}
+				}
+
+				if ((job.getRule() != null) && !(job instanceof ThreadJob))
+					getLockManager().removeLockThread(currentThread, job.getRule());
+
+			}
+		}
+		// To prevent this job from immediately re-grabbing the scheduling rule wait until 
+		// the unblocked job changes state. This unblocked job is guaranteed to be the 
+		// next job of the set of similar conflicting rules to attempt to run. 
+		if (DEBUG_YIELDING_DETAILED)
+			JobManager.debug(job + " is waiting for " + unblocked + " to transition from WAITING state"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		waitForUnblocked(unblocked);
+
+		// restart this job, unless we've been restarted already
+		// This is the same as ThreadJob begin, except that cancelation CAN NOT be supported
+		// throwing the OperationCanceledException will return execution to the caller. 
+		IProgressMonitor mon = monitorFor(monitor);
+		ProgressMonitorWrapper nonCanceling = new ProgressMonitorWrapper(mon) {
+			public boolean isCanceled() {
+				// pass-through request
+				getWrappedProgressMonitor().isCanceled();
+				// ignore result
+				return false;
+			}
+		};
+
+		if (DEBUG_YIELDING)
+			JobManager.debug(job + " waiting to resume"); //$NON-NLS-1$
+
+		// this yielding job becomes an implicit job, unless it is one already
+		if (likeThreadJob == null) {
+			// Create a Threadjob proxy. This is strictly an internal job, but its not 
+			// preventing from "leaking" out to clients in the form of listener 
+			// notifications, and via IJobManager API usage like find(). 
+			// Set a flag to differentiate it from regular ThreadJobs. 
+			ThreadJob threadJob = new ThreadJob(job.getRule()) {
+				boolean isResumingAfterYield() {
+					return true;
+				}
+			};
+			threadJob.setRealJob((Job) job);
+			ThreadJob.joinRun(threadJob, nonCanceling);
+			// the following state changes are atomic
+			synchronized (lock) {
+				// Must end the temporary threadJob to remove from running list
+				changeState(threadJob, Job.NONE);
+				changeState(job, Job.RUNNING);
+				job.setThread(currentThread);
+			}
+		} else {
+			ThreadJob.joinRun(likeThreadJob, nonCanceling);
+			synchronized (lock) {
+				changeState(job, Job.RUNNING);
+				job.setThread(currentThread);
+			}
+		}
+		if (DEBUG_YIELDING) {
+			// extra assert: make sure no other conflicting jobs are running now
+			synchronized (lock) {
+				for (Iterator it = running.iterator(); it.hasNext();) {
+					InternalJob other = (InternalJob) it.next();
+					if (other == job)
+						continue;
+					Assert.isTrue(!other.isConflicting(job), other + " conflicts and ran simultaneously with " + job); //$NON-NLS-1$
+				}
+			}
+			JobManager.debug(job + " resumed"); //$NON-NLS-1$
+		}
+		if (unblocked instanceof ThreadJob && ((ThreadJob) unblocked).isResumingAfterYield()) {
+			// if the unblocked job is a proxy for a yielding job to start, return
+			// the original job. No need to expose the proxy ThreadJob. 
+			return ((ThreadJob) unblocked).realJob;
+		}
+		return (Job) unblocked;
+	}
+
+	private void waitForUnblocked(InternalJob theJob) {
+		// wait until theJob leaves WAITING state
+		boolean interrupted = false;
+		synchronized (theJob.jobStateLock) {
+			if (theJob instanceof ThreadJob) {
+				// We can't acquire the implicitJob lock while holding jobStateLock,
+				// so use isWaiting instead.
+				while (((ThreadJob) theJob).isWaiting) {
+					try {
+						theJob.jobStateLock.wait();
+					} catch (InterruptedException e) {
+						interrupted = true;
+					}
+				}
+			} else {
+				while (theJob.internalGetState() == Job.WAITING) {
+					try {
+						theJob.jobStateLock.wait();
+					} catch (InterruptedException e) {
+						interrupted = true;
+					}
+				}
+			}
+		}
+		if (interrupted)
+			Thread.currentThread().interrupt();
+	}
+
+	/**
 	 * Returns the next job to be run, or null if no jobs are waiting to run.
 	 * The worker must call endJob when the job is finished running.  
 	 */
@@ -1167,16 +1468,19 @@ public class JobManager implements IJobManager {
 			boolean endJob = false;
 			synchronized (lock) {
 				InternalJob internal = job;
-				if (internal.internalGetState() == InternalJob.ABOUT_TO_RUN) {
-					if (shouldRun && !internal.isAboutToRunCanceled()) {
-						internal.setProgressMonitor(createMonitor(job));
-						//change from ABOUT_TO_RUN to RUNNING
-						internal.internalSetState(Job.RUNNING);
-						break;
+				synchronized (internal.jobStateLock) {
+					if (internal.internalGetState() == InternalJob.ABOUT_TO_RUN) {
+						if (shouldRun && !internal.isAboutToRunCanceled()) {
+							internal.setProgressMonitor(createMonitor(job));
+							//change from ABOUT_TO_RUN to RUNNING
+							internal.internalSetState(Job.RUNNING);
+							internal.jobStateLock.notifyAll();
+							break;
+						}
+						internal.setAboutToRunCanceled(false);
+						endJob = true;
+						//fall through and end the job below
 					}
-					internal.setAboutToRunCanceled(false);
-					endJob = true;
-					//fall through and end the job below
 				}
 			}
 			if (endJob) {
@@ -1262,4 +1566,23 @@ public class JobManager implements IJobManager {
 			wakeUp((InternalJob) it.next(), 0L);
 		}
 	}
+
+	void endMonitoring(ThreadJob threadJob) {
+		synchronized (monitorStack) {
+			for (int i = monitorStack.size() - 1; i >= 0; i--) {
+				if (((Object[]) monitorStack.get(i))[0] == threadJob) {
+					monitorStack.remove(i);
+					monitorStack.notifyAll();
+					break;
+				}
+			}
+		}
+	}
+
+	void beginMonitoring(ThreadJob threadJob, IProgressMonitor monitor) {
+		synchronized (monitorStack) {
+			monitorStack.add(new Object[] {threadJob, monitor});
+			monitorStack.notifyAll();
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobQueue.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobQueue.java
index 034f9ab..aa0637b 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobQueue.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/JobQueue.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,30 +10,40 @@
  *******************************************************************************/
 package org.eclipse.core.internal.jobs;
 
+import java.util.Iterator;
 import org.eclipse.core.runtime.*;
 
 /**
- * A linked list based priority queue. Either the elements in the queue must
- * implement Comparable, or a Comparator must be provided.
+ * A linked list based priority queue. 
  */
-public class JobQueue {
+public final class JobQueue {
 	/**
 	 * The dummy entry sits between the head and the tail of the queue.
 	 * dummy.previous() is the head, and dummy.next() is the tail.
 	 */
-	private final InternalJob dummy;
+	protected final InternalJob dummy;
 
 	/**
 	 * If true, conflicting jobs will be allowed to overtake others in the
 	 * queue that have lower priority. If false, higher priority jumps can only
 	 * move up the queue by overtaking jobs that they don't conflict with.
 	 */
-	private boolean allowConflictOvertaking;
+	private final boolean allowConflictOvertaking;
+
+	private final boolean allowPriorityOvertaking;
 
 	/**
 	 * Create a new job queue. 
 	 */
 	public JobQueue(boolean allowConflictOvertaking) {
+		this(allowConflictOvertaking, true);
+	}
+
+	/**
+	 * Create a new job queue. 
+	 */
+	public JobQueue(boolean allowConflictOvertaking, boolean allowPriorityOvertaking) {
+		this.allowPriorityOvertaking = allowPriorityOvertaking;
 		//compareTo on dummy is never called
 		dummy = new InternalJob("Queue-Head") {//$NON-NLS-1$
 			public IStatus run(IProgressMonitor m) {
@@ -95,7 +105,7 @@ public class JobQueue {
 		if (newEntry.getWaitQueueStamp() > 0 && newEntry.getWaitQueueStamp() < queueEntry.getWaitQueueStamp())
 			return true;
 		//if the new entry has lower priority, there is no need to overtake the existing entry
-		if (queueEntry.compareTo(newEntry) >= 0)
+		if (allowPriorityOvertaking && queueEntry.compareTo(newEntry) >= 0)
 			return false;
 		//the new entry has higher priority, but only overtake the existing entry if the queue allows it
 		return allowConflictOvertaking || !newEntry.isConflicting(queueEntry);
@@ -131,4 +141,27 @@ public class JobQueue {
 	public InternalJob peek() {
 		return dummy.previous() == dummy ? null : dummy.previous();
 	}
+
+	public Iterator iterator() {
+		return new Iterator() {
+			InternalJob pointer = dummy;
+
+			public boolean hasNext() {
+				if (pointer.previous() == dummy)
+					pointer = null;
+				else
+					pointer = pointer.previous();
+				return pointer != null;
+			}
+
+			public Object next() {
+				return pointer;
+			}
+
+			public void remove() {
+				throw new UnsupportedOperationException();
+			}
+
+		};
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/LockManager.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/LockManager.java
index 70fb94e..069b59d 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/LockManager.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/LockManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2009 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -73,7 +73,7 @@ public class LockManager {
 	/* 
 	 * Stores thread - stack pairs where every entry in the stack is an array 
 	 * of locks that were suspended while the thread was acquiring more locks
-	 * (a stack is needed because when a thread tries to re-aquire suspended locks,
+	 * (a stack is needed because when a thread tries to re-acquire suspended locks,
 	 * it can cause deadlock, and some locks it owns can be suspended again)
 	 */
 	private HashMap suspendedLocks = new HashMap();
@@ -100,6 +100,22 @@ public class LockManager {
 	/* (non-Javadoc)
 	 * Method declared on LockListener
 	 */
+	public boolean canBlock() {
+		if (lockListener == null)
+			return true;
+		try {
+			return lockListener.canBlock();
+		} catch (Exception e) {
+			handleException(e);
+		} catch (LinkageError e) {
+			handleException(e);
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on LockListener
+	 */
 	public boolean aboutToWait(Thread lockOwner) {
 		if (lockListener == null)
 			return false;
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.java
index 24e96b8..bdc15a6 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/OrderedLock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM - Initial API and implementation
+ *     James Blackburn (Broadcom Corp.) - Bug 311863 Ordered Lock lost after interrupt
  *******************************************************************************/
 package org.eclipse.core.internal.jobs;
 
@@ -20,7 +21,7 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
  * The lock avoids circular waiting deadlocks by detecting the deadlocks
  * and resolving them through the suspension of all locks owned by one 
  * of the threads involved in the deadlock. This makes it impossible for n such 
- * locks to deadlock while waiting for each other.  The downside is that this means
+ * locks to deadlock while waiting for each other.  The down side is that this means
  * that during an interval when a process owns a lock, it can be forced
  * to give the lock up and wait until all locks it requires become
  * available.  This removes the feature of exclusive access to the
@@ -77,14 +78,18 @@ public class OrderedLock implements ILock, ISchedulingRule {
 		//spin until the lock is successfully acquired
 		//NOTE: spinning here allows the UI thread to service pending syncExecs
 		//if the UI thread is waiting to acquire a lock.
+		boolean interrupted = false;
 		while (true) {
 			try {
 				if (acquire(Long.MAX_VALUE))
-					return;
+					break;
 			} catch (InterruptedException e) {
-				//ignore and loop
+				interrupted = true;
 			}
 		}
+		//preserve thread interrupt state
+		if (interrupted)
+			Thread.currentThread().interrupt();
 	}
 
 	/* (non-Javadoc)
@@ -105,8 +110,10 @@ public class OrderedLock implements ILock, ISchedulingRule {
 		success = doAcquire(semaphore, delay);
 		manager.resumeSuspendedLocks(Thread.currentThread());
 		if (DEBUG)
-			System.out.println("[" + Thread.currentThread() +  //$NON-NLS-1$
+			System.out.println("[" + Thread.currentThread() + //$NON-NLS-1$
 					(success ? "] Operation started... " : "] Operation timed out... ") + this); //$NON-NLS-1$ //$NON-NLS-2$ //}
+		if (!success && Thread.interrupted())
+			throw new InterruptedException();
 		return success;
 	}
 
@@ -129,7 +136,7 @@ public class OrderedLock implements ILock, ISchedulingRule {
 	 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
 	 */
 	public boolean contains(ISchedulingRule rule) {
-		return false;
+		return rule == this;
 	}
 
 	/**
@@ -142,10 +149,10 @@ public class OrderedLock implements ILock, ISchedulingRule {
 	}
 
 	/**
-	 * Attempts to acquire this lock.  Callers will block  until this lock comes available to 
+	 * Attempts to acquire this lock.  Callers will block until this lock comes available to 
 	 * them, or until the specified delay has elapsed.
 	 */
-	private boolean doAcquire(Semaphore semaphore, long delay) throws InterruptedException {
+	private boolean doAcquire(Semaphore semaphore, long delay) {
 		boolean success = false;
 		//notify hook to service pending syncExecs before falling asleep
 		if (manager.aboutToWait(this.currentOperationThread)) {
@@ -163,22 +170,17 @@ public class OrderedLock implements ILock, ISchedulingRule {
 		semaphore = createSemaphore();
 		if (semaphore == null)
 			return true;
-		manager.addLockWaitThread(Thread.currentThread(), this);
+		final Thread currentThread = Thread.currentThread();
+		manager.addLockWaitThread(currentThread, this);
 		try {
 			success = semaphore.acquire(delay);
 		} catch (InterruptedException e) {
 			if (DEBUG)
-				System.out.println("[" + Thread.currentThread() + "] Operation interrupted while waiting... :-|"); //$NON-NLS-1$ //$NON-NLS-2$
-			throw e;
+				System.out.println("[" + currentThread + "] Operation interrupted while waiting... :-|"); //$NON-NLS-1$ //$NON-NLS-2$
+			//remember the interrupt to throw it later
+			currentThread.interrupt();
 		}
-		if (success) {
-			depth++;
-			updateCurrentOperation();
-		} else {
-			removeFromQueue(semaphore);
-			manager.removeLockWaitThread(Thread.currentThread(), this);
-		}
-		return success;
+		return updateOperationQueue(semaphore, success);
 	}
 
 	/**
@@ -293,4 +295,27 @@ public class OrderedLock implements ILock, ISchedulingRule {
 		operations.dequeue();
 		setCurrentOperationThread(Thread.currentThread());
 	}
+
+	/**
+	 * We have finished waiting on the given semaphore. Update the operation queue according
+	 * to whether we succeeded in obtaining the lock.
+	 * 
+	 * @param semaphore The semaphore that we waited on
+	 * @param acquired <code>true</code> if we successfully acquired the semaphore, and <code>false</code> otherwise
+	 * @return whether the lock was successfully obtained
+	 */
+	private synchronized boolean updateOperationQueue(Semaphore semaphore, boolean acquired) {
+		// Bug 311863 - Semaphore may have been released concurrently, so check again before discarding it
+		if (!acquired)
+			acquired = semaphore.attempt();
+		if (acquired) {
+			depth++;
+			updateCurrentOperation();
+		} else {
+			removeFromQueue(semaphore);
+			manager.removeLockWaitThread(Thread.currentThread(), this);
+		}
+		return acquired;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Semaphore.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Semaphore.java
index 80d5fe3..cd40896 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Semaphore.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Semaphore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     James Blackburn (Broadcom Corp.) - Bug 311863 Ordered Lock lost after interrupt
  *******************************************************************************/
 package org.eclipse.core.internal.jobs;
 
@@ -40,6 +41,18 @@ public class Semaphore {
 		}
 	}
 
+	/**
+	 * Attempt to acquire the semaphore without waiting.
+	 * Returns true if successfully acquired, false otherwise.
+	 */
+	public synchronized boolean attempt() {
+		if (notifications > 0) {
+			notifications--;
+			return true;
+		}
+		return false;
+	}
+
 	public boolean equals(Object obj) {
 		return (runnable == ((Semaphore) obj).runnable);
 	}
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java
index 5da9429..146559e 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/ThreadJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,23 +12,18 @@ package org.eclipse.core.internal.jobs;
 
 import org.eclipse.core.internal.runtime.RuntimeLog;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.*;
 
 /**
  * Captures the implicit job state for a given thread. 
  */
 class ThreadJob extends Job {
-	/**
-	 * The notifier is a shared object used to wake up waiting thread jobs
-	 * when another job completes that is releasing a scheduling rule.
-	 */
-	static final Object notifier = new Object();
 
 	/**
 	 * Set to true if this thread job is running in a thread that did
 	 * not own a rule already.  This means it needs to acquire the
 	 * rule during beginRule, and must release the rule during endRule.
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	protected boolean acquireRule = false;
 
@@ -36,11 +31,13 @@ class ThreadJob extends Job {
 	 * Indicates that this thread job did report to the progress manager
 	 * that it will be blocked, and therefore when it begins it must
 	 * be reported to the job manager when it is no longer blocked.
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	boolean isBlocked = false;
 
 	/**
 	 * True if this ThreadJob has begun execution
+	 * @GuardedBy("this")
 	 */
 	protected boolean isRunning = false;
 
@@ -54,30 +51,49 @@ class ThreadJob extends Job {
 	 * The actual job that is running in the thread that this 
 	 * ThreadJob represents.  This will be null if this thread
 	 * job is capturing a rule acquired outside of a job.
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	protected Job realJob;
 	/**
 	 * The stack of rules that have been begun in this thread, but not yet ended.
+	 * 	@GuardedBy("JobManager.implicitJobs")
 	 */
 	private ISchedulingRule[] ruleStack;
 	/**
 	 * Rule stack pointer.
+	 * INV: 0 <= top <= ruleStack.length
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	private int top;
 
+	/**
+	 * Waiting state for thread jobs is independent of the internal state. When
+	 * this variable is true, this ThreadJob is waiting in joinRun()
+	 * @GuardedBy("jobStateLock")
+	 */
+	boolean isWaiting;
+
 	ThreadJob(ISchedulingRule rule) {
 		super("Implicit Job"); //$NON-NLS-1$
 		setSystem(true);
-		setPriority(Job.INTERACTIVE);
+		// calling setPriority will try to acquire JobManager.lock, breaking
+		// lock acquisition protocol. Since we are constructing this thread,
+		// we can call internalSetPriority
+		((InternalJob) this).internalSetPriority(Job.INTERACTIVE);
 		ruleStack = new ISchedulingRule[2];
 		top = -1;
-		setRule(rule);
+		((InternalJob) this).internalSetRule(rule);
+	}
+
+	boolean isResumingAfterYield() {
+		return false;
 	}
 
 	/**
 	 * An endRule was called that did not match the last beginRule in
 	 * the stack.  Report and log a detailed informational message.
 	 * @param rule The rule that was popped
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	private void illegalPop(ISchedulingRule rule) {
 		StringBuffer buf = new StringBuffer("Attempted to endRule: "); //$NON-NLS-1$
@@ -125,7 +141,7 @@ class ThreadJob extends Job {
 	 * Returns true if the monitor is canceled, and false otherwise.
 	 * Protects the caller from exception in the monitor implementation.
 	 */
-	private boolean isCanceled(IProgressMonitor monitor) {
+	static private boolean isCanceled(IProgressMonitor monitor) {
 		try {
 			return monitor.isCanceled();
 		} catch (RuntimeException e) {
@@ -138,70 +154,150 @@ class ThreadJob extends Job {
 
 	/**
 	 * Returns true if this thread job was scheduled and actually started running.
+	 * @GuardedBy("this")
 	 */
 	synchronized boolean isRunning() {
 		return isRunning;
 	}
 
 	/**
-	 * Schedule the job and block the calling thread until the job starts running.
-	 * Returns the ThreadJob instance that was started.
+	 * A reentrant method which will run this <code>ThreadJob</code> immediately if there 
+	 * are no existing jobs with conflicting rules, or block until the rule can be acquired. If this 
+	 * job must block, the <code>LockListener</code> is given a chance to override.
+	 * If override is not granted, then this method will block until the rule is available. If 
+	 * <code>LockListener#canBlock</code> returns <tt>true</tt>, then the <code>monitor</code>
+	 * <i>will not</i> be periodically checked for cancellation. It will only be rechecked if this 
+	 * thread is interrupted. If <code>LockListener#canBlock</code> returns <tt>false</tt> The 
+	 * <code>monitor</code> <i>will</i> be checked periodically for cancellation.
+	 * 
+	 * When a UI is present, it is recommended that the <code>LockListener</code> 
+	 * should not allow the UI thread to block without checking the <code>monitor</code>. This 
+	 * ensures that the UI remains responsive. 
+	 * 
+	 * @see LockListener#aboutToWait(Thread)
+	 * @see LockListener#canBlock()
+	 * @see JobManager#transferRule(ISchedulingRule, Thread)
+	
+	 * @return <tt>this</tt>, or the <code>ThreadJob</code> instance that was 
+	 * unblocked (due to transferRule) in the case of reentrant invocations of this method.
+	 * 
+	 * @param monitor - The <code>IProgressMonitor</code> used to report blocking status and 
+	 * cancellation.
+	 * 
+	 * @throws OperationCanceledException if this job was canceled before it was started. 
 	 */
-	ThreadJob joinRun(IProgressMonitor monitor) {
+	static ThreadJob joinRun(ThreadJob threadJob, IProgressMonitor monitor) {
 		if (isCanceled(monitor))
 			throw new OperationCanceledException();
-		//check if there is a blocking thread before waiting
-		InternalJob blockingJob = manager.findBlockingJob(this);
+		// check if there is a blocking thread before waiting
+		InternalJob blockingJob = manager.findBlockingJob(threadJob);
 		Thread blocker = blockingJob == null ? null : blockingJob.getThread();
-		ThreadJob result = this;
 		try {
-			//just return if lock listener decided to grant immediate access
+			// just return if lock listener decided to grant immediate access
 			if (manager.getLockManager().aboutToWait(blocker))
-				return this;
-			try {
-				waitStart(monitor, blockingJob);
-				final Thread currentThread = Thread.currentThread();
-				while (true) {
-					if (isCanceled(monitor))
-						throw new OperationCanceledException();
-					//try to run the job 
-					if (manager.runNow(this))
-						return this;
-					//update blocking job
-					blockingJob = manager.findBlockingJob(this);
-					//the rule could have been transferred to this thread while we were waiting
-					blocker = blockingJob == null ? null : blockingJob.getThread();
-					if (blocker == currentThread && blockingJob instanceof ThreadJob) {
-						//now we are just the nested acquire case
-						result = (ThreadJob) blockingJob;
-						result.push(getRule());
-						result.isBlocked = this.isBlocked;
-						return result;
-					}
-					//just return if lock listener decided to grant immediate access
-					if (manager.getLockManager().aboutToWait(blocker))
-						return this;
-					//must lock instance before calling wait
-					synchronized (notifier) {
-						try {
-							notifier.wait(250);
-						} catch (InterruptedException e) {
-							//ignore
-						}
+				return threadJob;
+			return waitForRun(threadJob, monitor, blockingJob, blocker);
+		} finally {
+			manager.getLockManager().aboutToRelease();
+		}
+	}
+
+	static ThreadJob waitForRun(ThreadJob threadJob, IProgressMonitor monitor, InternalJob blockingJob, Thread blocker) {
+		// Ask lock manager if it safe to block this thread
+		final boolean canBlock = manager.getLockManager().canBlock();
+		ThreadJob result = threadJob;
+		boolean interrupted = false;
+		boolean waiting = false;
+		try {
+			waitStart(threadJob, monitor, blockingJob);
+			manager.implicitJobs.addWaiting(threadJob);
+			waiting = true;
+			// If we're allowed to block this thread we won't be checking the monitor. In order
+			// to respond to cancellation, register this monitor with the internal JobManager
+			// worker thread. The worker thread will check for cancellation and will interrupt
+			// this thread when the monitor is canceled. T
+			if (canBlock)
+				manager.beginMonitoring(threadJob, monitor);
+			final Thread currentThread = Thread.currentThread();
+
+			// Ultimately, this loop will wait until the job "runs" (acquires the rule)
+			// or is canceled. However, there are many ways for that to occur. 
+			// The exit conditions of this loop are:
+			// 1) This job no longer conflicts with any other running job. 
+			// 2) The LockManager#aboutToWait allowed this thread to run. 
+			//    This usually occurs during reentrant situations. i.e. This is a UI thread, 
+			//    and a syncExec is performed from conflicting job/thread. 
+			// 3) A rule is transfered to this thread. This can be invoked programmatically,
+			//    or commonly in JFace via ModalContext (for wizards/etc).
+			// 4) Monitor is canceled.
+			while (true) {
+				// monitor is foreign code so do not hold locks while calling into monitor
+				if (isCanceled(monitor))
+					// Condition #4.
+					throw new OperationCanceledException();
+				// Try to run the job. If result is null, this job was allowed to run. 
+				// If the result is successful, atomically release thread from waiting 
+				// status. 
+				blockingJob = manager.runNow(threadJob, true);
+				if (blockingJob == null) {
+					// Condition #1. 
+					waiting = false;
+					return threadJob;
+				}
+				blocker = blockingJob == null ? null : blockingJob.getThread();
+				// the rule could have been transferred to this thread while we were waiting
+				if (blocker == currentThread && blockingJob instanceof ThreadJob) {
+					// now we are just the nested acquire case
+					result = (ThreadJob) blockingJob;
+					result.push(threadJob.getRule());
+					result.isBlocked = threadJob.isBlocked;
+					// Condition #3.
+					return result;
+				}
+				// just return if lock listener decided to grant immediate access
+				if (manager.getLockManager().aboutToWait(blocker))
+					// Condition #2.
+					return threadJob;
+				synchronized (blockingJob.jobStateLock) {
+					try {
+						// Wait until we are no longer definitely blocked (not running). 
+						// The actual exit conditions are listed above at the beginning of
+						// this while loop. 
+						if (blockingJob.getState() == Job.RUNNING)
+							// If we canBlock do not use a timeout value. Otherwise, 
+							// timeout and recheck conditions other than #1 (above). 
+							blockingJob.jobStateLock.wait(canBlock ? 0 : 250);
+					} catch (InterruptedException e) {
+						// This thread may be interrupted via two common scenarios. 1) If
+						// the UISynchronizer is in use and this thread is a UI thread
+						// and a syncExec() is performed, this thread will be interrupted
+						// every 1000ms. 2) If this thread is allowed to be blocked and 
+						// the progress monitor was canceled, the internal JobManager 
+						// worker thread will interrupt this thread so cancellation can
+						// be carried out. 
+						interrupted = true;
 					}
 				}
-			} finally {
-				if (this == result)
-					waitEnd(monitor);
 			}
 		} finally {
-			manager.getLockManager().aboutToRelease();
+			if (interrupted)
+				Thread.currentThread().interrupt();
+			//only update the lock state if we ended up using the thread job that was given to us
+			waitEnd(threadJob, threadJob == result, monitor);
+			if (threadJob == result) {
+				if (waiting)
+					manager.implicitJobs.removeWaiting(threadJob);
+			}
+			if (canBlock)
+				// must unregister monitoring this job
+				manager.endMonitoring(threadJob);
 		}
 	}
 
 	/**
 	 * Pops a rule. Returns true if it was the last rule for this thread
 	 * job, and false otherwise.
+	 * 	@GuardedBy("JobManager.implicitJobs")
 	 */
 	boolean pop(ISchedulingRule rule) {
 		if (top < 0 || ruleStack[top] != rule)
@@ -214,6 +310,7 @@ class ThreadJob extends Job {
 	 * Adds a new scheduling rule to the stack of rules for this thread. Throws
 	 * a runtime exception if the new rule is not compatible with the base
 	 * scheduling rule for this thread.
+	 * 	@GuardedBy("JobManager.implicitJobs")
 	 */
 	void push(final ISchedulingRule rule) {
 		final ISchedulingRule baseRule = getRule();
@@ -233,6 +330,7 @@ class ThreadJob extends Job {
 	/**
 	 * Reset all of this job's fields so it can be reused.  Returns false if
 	 * reuse is not possible
+	 * 	@GuardedBy("JobManager.implicitJobs")
 	 */
 	boolean recycle() {
 		//don't recycle if still running for any reason
@@ -264,6 +362,7 @@ class ThreadJob extends Job {
 	/**
 	 * Records the job that is actually running in this thread, if any
 	 * @param realJob The running job
+	 * 	@GuardedBy("JobManager.implicitJobs")
 	 */
 	void setRealJob(Job realJob) {
 		this.realJob = realJob;
@@ -272,6 +371,7 @@ class ThreadJob extends Job {
 	/**
 	 * Returns true if this job should cause a self-canceling job
 	 * to cancel itself, and false otherwise.
+	 * @GuardedBy("JobManager.implicitJobs")
 	 */
 	boolean shouldInterrupt() {
 		return realJob == null ? true : !realJob.isSystem();
@@ -282,10 +382,16 @@ class ThreadJob extends Job {
 	 */
 	public String toString() {
 		StringBuffer buf = new StringBuffer("ThreadJob"); //$NON-NLS-1$
-		buf.append('(').append(realJob).append(',').append('[');
+		buf.append('(').append(realJob).append(',').append(getRuleStack()).append(')');
+		return buf.toString();
+	}
+
+	String getRuleStack() {
+		StringBuffer buf = new StringBuffer();
+		buf.append('[');
 		for (int i = 0; i <= top && i < ruleStack.length; i++)
 			buf.append(ruleStack[i]).append(',');
-		buf.append(']').append(')');
+		buf.append(']');
 		return buf.toString();
 	}
 
@@ -294,16 +400,22 @@ class ThreadJob extends Job {
 	 * to proceed.
 	 * @param monitor The monitor to report unblocking to.
 	 */
-	private void waitEnd(IProgressMonitor monitor) {
-		final LockManager lockManager = manager.getLockManager();
-		final Thread currentThread = Thread.currentThread();
-		if (isRunning()) {
-			lockManager.addLockThread(currentThread, getRule());
-			//need to re-acquire any locks that were suspended while this thread was blocked on the rule
-			lockManager.resumeSuspendedLocks(currentThread);
-		} else {
-			//tell lock manager that this thread gave up waiting
-			lockManager.removeLockWaitThread(currentThread, getRule());
+	static private void waitEnd(ThreadJob threadJob, boolean updateLockManager, IProgressMonitor monitor) {
+		if (updateLockManager) {
+			final LockManager lockManager = manager.getLockManager();
+			final Thread currentThread = Thread.currentThread();
+			if (threadJob.isRunning()) {
+				lockManager.addLockThread(currentThread, threadJob.getRule());
+				//need to re-acquire any locks that were suspended while this thread was blocked on the rule
+				lockManager.resumeSuspendedLocks(currentThread);
+			} else {
+				//tell lock manager that this thread gave up waiting
+				lockManager.removeLockWaitThread(currentThread, threadJob.getRule());
+			}
+		}
+		if (threadJob.isBlocked) {
+			threadJob.isBlocked = false;
+			manager.reportUnblocked(monitor);
 		}
 	}
 
@@ -313,9 +425,16 @@ class ThreadJob extends Job {
 	 * @param monitor The monitor to report blocking to
 	 * @param blockingJob The job that is blocking this thread, or <code>null</code>
 	 */
-	private void waitStart(IProgressMonitor monitor, InternalJob blockingJob) {
-		manager.getLockManager().addLockWaitThread(Thread.currentThread(), getRule());
-		isBlocked = true;
+	static private void waitStart(ThreadJob threadJob, IProgressMonitor monitor, InternalJob blockingJob) {
+		manager.getLockManager().addLockWaitThread(Thread.currentThread(), threadJob.getRule());
+		threadJob.isBlocked = true;
 		manager.reportBlocked(monitor, blockingJob);
 	}
+
+	/**
+	 * ThreadJobs are one-shot jobs, and they must ignore all attempts to schedule them. 
+	 */
+	public boolean shouldSchedule() {
+		return false;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Worker.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Worker.java
index 1baea12..27e2772 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Worker.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs/Worker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.core.internal.jobs;
 
-import org.eclipse.core.internal.runtime.RuntimeLog;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.osgi.util.NLS;
@@ -70,8 +69,6 @@ public class Worker extends Thread {
 					if (result == null)
 						result = handleException(currentJob, new NullPointerException());
 					pool.endJob(currentJob, result);
-					if ((result.getSeverity() & (IStatus.ERROR | IStatus.WARNING)) != 0)
-						RuntimeLog.log(result);
 					currentJob = null;
 					//reset thread priority in case job changed it
 					setPriority(Thread.NORM_PRIORITY);
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
index f274b5b..578cf31 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/IJobManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -142,6 +142,22 @@ public interface IJobManager {
 	public IProgressMonitor createProgressGroup();
 
 	/**
+	 * Returns the scheduling rule currently held by this thread, or <code>null</code>
+	 * if the current thread does not hold any scheduling rule.
+	 * <p>
+	 * If this method is called from within the scope of a running job with a non-null
+	 * scheduling rule, then this method is equivalent to calling <code>currentJob().getRule()</code>.
+	 * Otherwise, this method will return the first scheduling rule obtained by this 
+	 * thread via {@link #beginRule(ISchedulingRule, IProgressMonitor)} that has not
+	 * yet had a corresponding call to {@link #endRule(ISchedulingRule)}.
+	 * </p>
+	 * 
+	 * @return the current rule or <code>null</code>
+	 * @since 3.5
+	 */
+	public ISchedulingRule currentRule();
+
+	/**
 	 * Returns the job that is currently running in this thread, or <code>null</code> if there
 	 * is no currently running job.
 	 * 
@@ -200,10 +216,9 @@ public interface IJobManager {
 	/**
 	 * Waits until all jobs of the given family are finished.  This method will block the 
 	 * calling thread until all such jobs have finished executing, or until this thread is
-	 * interrupted.   If there are no jobs in 
-	 * the family that are currently waiting, running, or sleeping, this method returns 
-	 * immediately.  Feedback on how the join is progressing is provided to a  progress 
-	 * monitor.
+	 * interrupted.   If there are no jobs in the family that are currently waiting, running, 
+	 * or sleeping, this method returns immediately.  Feedback on how the join is 
+	 * progressing is provided to a  progress monitor.
 	 * <p>
 	 * If this method is called while the job manager is suspended, only jobs
 	 * that are currently running will be joined; Once there are no jobs
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
index cfc82af..6b846cc 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/Job.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -118,9 +118,10 @@ public abstract class Job extends InternalJob implements IAdaptable {
 	 */
 	public static final int SLEEPING = 0x01;
 	/** 
-	 * Job state code (value 2) indicating that a job is waiting to be run.
+	 * Job state code (value 2) indicating that a job is waiting to run.
 	 * 
 	 * @see #getState()
+	 * @see #yieldRule(IProgressMonitor)
 	 */
 	public static final int WAITING = 0x02;
 	/** 
@@ -645,6 +646,14 @@ public abstract class Job extends InternalJob implements IAdaptable {
 	}
 
 	/**
+	 * Returns a string representation of this job to be used for debugging purposes only.
+	 * @since org.eclipse.core.jobs 3.5
+	 */
+	public String toString() {
+		return super.toString();
+	}
+
+	/**
 	 * Puts this job immediately into the {@link #WAITING} state so that it is 
 	 * eligible for immediate execution. If this job is not currently sleeping, 
 	 * the request is ignored.
@@ -670,4 +679,33 @@ public abstract class Job extends InternalJob implements IAdaptable {
 	public final void wakeUp(long delay) {
 		super.wakeUp(delay);
 	}
+
+	/**
+	 * Temporarily puts this <code>Job</code> back into {@link #WAITING} state and
+	 * relinquishes the job's scheduling rule so that any {@link #WAITING} jobs that 
+	 * conflict with this job's scheduling rule have an opportunity to start. This 
+	 * method will wait until the rule this job held prior to invoking this method is
+	 * re-acquired. This method has no effect and returns <tt>null</tt> if there are no
+	 * {@link #WAITING} jobs that conflict with this job's scheduling rule. <p>Note: 
+	 * If this job has acquired any other locks, implicit or explicit, they will 
+	 * <i>not</i> be  released. This may increase the risk of deadlock, so this method 
+	 * should only be used when it is known that the environment is safe. <p> This 
+	 * method must be invoked by this job's <code>Thread</code>, and only when it is 
+	 * {@link #RUNNING} state.
+	 * <p>
+	 * @param monitor a progress monitor, or <tt>null</tt> if progress
+	 * reporting is not desired. Cancellation attempts will be ignored.
+	 * @return The Job that was {@link #WAITING}, and blocked by this <code>Job</code> 
+	 * (at the time this method was  invoked) that was unblocked and allowed a chance 
+	 * to run, or <tt>null</tt> if no jobs were unblocked. Note: it is not guaranteed
+	 * that this <code>Job</code> resume immediately if other conflicting jobs are 
+	 * also waiting after the unblocked job ends.  
+	 * 
+	 * @since org.eclipse.core.jobs 3.5
+	 * @see Job#getRule()
+	 * @see Job#isBlocking()
+	 */
+	public Job yieldRule(IProgressMonitor monitor) {
+		return super.yieldRule(monitor);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/LockListener.java b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/LockListener.java
index 90b7c84..e9fa71a 100644
--- a/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/LockListener.java
+++ b/eclipse/plugins/org.eclipse.core.jobs/src/org/eclipse/core/runtime/jobs/LockListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ import org.eclipse.core.internal.jobs.LockManager;
  * @since 3.0
  */
 public class LockListener {
-	private final LockManager manager = ((JobManager)Job.getJobManager()).getLockManager();
+	private final LockManager manager = ((JobManager) Job.getJobManager()).getLockManager();
 
 	/**
 	 * Notification that a thread is about to block on an attempt to acquire a lock.
@@ -51,6 +51,20 @@ public class LockListener {
 	public void aboutToRelease() {
 		//do nothing
 	}
+	
+	/**
+	 * Returns if it is safe for the calling thread to block while waiting to obtain
+	 * a lock. When blocking in the calling thread is not safe, the caller will ensure
+	 * that the thread is kept alive and responsive to cancellation while waiting.
+	 * 
+	 * @return <code>true</code> if this thread can block, and
+	 * <code>false</code> otherwise.
+	 * 
+	 * @since org.eclipse.core.jobs 3.5
+	 */
+	public boolean canBlock() {
+		return true;
+	}
 
 	/**
 	 * Returns whether this thread currently owns any locks
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
index 1c45f13..9c99a62 100644
--- a/eclipse/plugins/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.linux.x86;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.classpath b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.classpath
new file mode 100644
index 0000000..065ac06
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.project b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.project
new file mode 100644
index 0000000..0cc2c70
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.core.net.linux.x86_64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt
new file mode 100644
index 0000000..8d7c5cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt
@@ -0,0 +1,10 @@
+Native Build Info:
+------------------
+
+platform:         linux.gtk.x86_64
+built by:         Tristan Tarrant, tristan.tarrant at gmail.com
+build date:       05-November-2009
+OS Name:          CentOS 3.9
+OS Version:       Linux 2.4.21-50.EL
+Compiler version: gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
+Java version:     Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2_03) 64-Bit Server VM
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b51cb67
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-Localization: fragment
+Bundle-SymbolicName: org.eclipse.core.net.linux.x86_64;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
+Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.equinox.concurrent/about.html b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.equinox.concurrent/about.html
rename to eclipse/plugins/org.eclipse.core.net.linux.x86_64/about.html
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/build.properties b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/build.properties
new file mode 100644
index 0000000..b43277d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = fragment.properties,\
+               .,\
+               META-INF/,\
+               about.html,\
+               bin/,\
+               libgnomeproxy-1.0.0.so
+src.includes = about.html
+generateSourceBundle=false
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/fragment.properties b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/fragment.properties
new file mode 100644
index 0000000..4228600
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/fragment.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+fragmentName = Proxy for Linux x86_64
+providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java
new file mode 100644
index 0000000..553f5e4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oakland Software Incorporated and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Oakland Software Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.net;
+
+import org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider;
+
+public class ProxyProvider extends UnixProxyProvider {
+}
diff --git a/eclipse/plugins/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
index e23ee56..3c92687 100644
--- a/eclipse/plugins/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.win32.x86;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
index d29b637..ff103d7 100644
--- a/eclipse/plugins/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.win32.x86_64;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net/META-INF/MANIFEST.MF
index 59a135c..3d0c0ec 100644
--- a/eclipse/plugins/org.eclipse.core.net/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.core.net;singleton:=true
-Bundle-Version: 1.2.1.qualifier
+Bundle-Version: 1.2.100.qualifier
 Bundle-Activator: org.eclipse.core.internal.net.Activator
 Bundle-Vendor: %PLUGIN_PROVIDER
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
index 1c45f13..9c99a62 100644
--- a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.linux.x86;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.classpath b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.classpath
new file mode 100644
index 0000000..065ac06
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.project b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.project
new file mode 100644
index 0000000..0cc2c70
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.core.net.linux.x86_64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt
new file mode 100644
index 0000000..8d7c5cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/BUILD_INFO.txt
@@ -0,0 +1,10 @@
+Native Build Info:
+------------------
+
+platform:         linux.gtk.x86_64
+built by:         Tristan Tarrant, tristan.tarrant at gmail.com
+build date:       05-November-2009
+OS Name:          CentOS 3.9
+OS Version:       Linux 2.4.21-50.EL
+Compiler version: gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-59)
+Java version:     Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2_03) 64-Bit Server VM
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b51cb67
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-Localization: fragment
+Bundle-SymbolicName: org.eclipse.core.net.linux.x86_64;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
+Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64))
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/about.html b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.core.filesystem.hpux.PA_RISC/about.html
rename to eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/about.html
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/build.properties b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/build.properties
new file mode 100644
index 0000000..b43277d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = fragment.properties,\
+               .,\
+               META-INF/,\
+               about.html,\
+               bin/,\
+               libgnomeproxy-1.0.0.so
+src.includes = about.html
+generateSourceBundle=false
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/fragment.properties b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/fragment.properties
new file mode 100644
index 0000000..4228600
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/fragment.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+fragmentName = Proxy for Linux x86_64
+providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java
new file mode 100644
index 0000000..553f5e4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64/src/org/eclipse/core/net/ProxyProvider.java
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Oakland Software Incorporated and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Oakland Software Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.net;
+
+import org.eclipse.core.internal.net.proxy.unix.UnixProxyProvider;
+
+public class ProxyProvider extends UnixProxyProvider {
+}
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
index e23ee56..3c92687 100644
--- a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.win32.x86;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
index d29b637..ff103d7 100644
--- a/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-Localization: fragment
 Bundle-SymbolicName: org.eclipse.core.net.win32.x86_64;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Fragment-Host: org.eclipse.core.net;bundle-version="1.1.0"
 Eclipse-PlatformFilter: (& (osgi.os=win32) (osgi.arch=x86_64))
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
index daab01d..0aa0cbe 100644
--- a/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
+++ b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/makefile
@@ -1,5 +1,5 @@
 #**********************************************************************
-# Copyright (c) 2008 Oakland Software Incorporated and others.
+# Copyright (c) 2008, 2010 Oakland Software Incorporated and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,8 +18,10 @@ GNOMEPROXY.O = gnomeproxy.o
 LIB_NAME = gnomeproxy.so
 LIB_NAME_FULL = libgnomeproxy-1.0.0.so
 
+OS_TYPE = linux
+JDK_INCLUDE = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
 INCLUDE = -I/usr/include/gconf/2/ -I/usr/include/orbit-2.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/
-COMPILER_FLAGS= -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32
+COMPILER_FLAGS = -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32
 
 LIBS := -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0
 LINKER_FLAGS= -m32
@@ -29,7 +31,7 @@ all: link
 compile:
 	@echo "Building file: $(GNOMEPROXY.O)"
 	@echo "Invoking: GCC C Compiler"
-	gcc $(INCLUDE) $(COMPILER_FLAGS) -o $(GNOMEPROXY.O) $(GNOMEPROXY.C)
+	gcc $(INCLUDE) $(JDK_INCLUDE) $(COMPILER_FLAGS) -o $(GNOMEPROXY.O) $(GNOMEPROXY.C)
 	@echo "Finished building: $(GNOMEPROXY.O)"
 	@echo " "
 
diff --git a/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/x86_64/makefile b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/x86_64/makefile
new file mode 100644
index 0000000..407f9c5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.net/natives/unix/linux/x86_64/makefile
@@ -0,0 +1,48 @@
+#**********************************************************************
+# Copyright (c) 2008, 2010 Oakland Software Incorporated and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#	Oakland Software Incorporated - initial submission
+#	IBM Corporation - refactoring, bug 245849
+#	Tristan Tarrant - x86_64 support, bug 273072
+#
+#********************************************************************** 
+#
+# makefile for libgnomeproxy-1.0.0.so
+
+GNOMEPROXY.C = ../../gnomeproxy.c
+GNOMEPROXY.O = gnomeproxy.o
+LIB_NAME = gnomeproxy.so
+LIB_NAME_FULL = libgnomeproxy-1.0.0.so
+
+OS_TYPE = 
+JDK_INCLUDE = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
+INCLUDE = `pkg-config --cflags gconf-2.0`
+COMPILER_FLAGS= -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m64
+
+LIBS := `pkg-config --libs gconf-2.0`
+LINKER_FLAGS= -m64
+
+all: link
+
+compile:
+	@echo "Building file: $(GNOMEPROXY.O)"
+	@echo "Invoking: GCC C Compiler"
+	gcc $(INCLUDE) $(JDK_INCLUDE) $(COMPILER_FLAGS) -o $(GNOMEPROXY.O) $(GNOMEPROXY.C)
+	@echo "Finished building: $(GNOMEPROXY.O)"
+	@echo " "
+
+link: compile
+	@echo "Building target: $(LIB_NAME_FULL)"
+	@echo "Invoking: GCC C Linker"
+	gcc $(LINKER_FLAGS) -shared -Wl,-soname,$(LIB_NAME) -o $(LIB_NAME_FULL) $(LIBS) $(GNOMEPROXY.O) -lc
+	@echo "Finished building target: $(LIB_NAME_FULL)"
+	@echo " "
+
+clean:
+	-$(RM) $(GNOMEPROXY.O) $(LIB_NAME_FULL)
+	- at echo " "
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java b/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java
index de2e210..a9042f4 100644
--- a/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java
+++ b/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,6 +163,7 @@ public class ProxyManager implements IProxyService, IPreferenceChangeListener {
 		}
 		IProxyData[] data = getProxyData();
 		IProxyChangeEvent event = new ProxyChangeEvent(IProxyChangeEvent.NONPROXIED_HOSTS_CHANGED, oldHosts, getNonProxiedHosts(), data, new IProxyData[0]);
+		updateSystemProperties();
 		fireChange(event);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/unix/UnixProxyProvider.java b/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/unix/UnixProxyProvider.java
index 1bcb3c2..e2d3f0b 100644
--- a/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/unix/UnixProxyProvider.java
+++ b/eclipse/plugins/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/unix/UnixProxyProvider.java
@@ -190,8 +190,9 @@ public class UnixProxyProvider extends AbstractProxyProvider {
 				"-c", //$NON-NLS-1$
 				"env | grep -i proxy" }; //$NON-NLS-1$
 		Properties props = new Properties();
+		Process proc = null;
 		try {
-			Process proc = Runtime.getRuntime().exec(cmd);
+			proc = Runtime.getRuntime().exec(cmd);
 			props.load(proc.getInputStream());
 			proc.waitFor();
 		} catch (IOException e) {
@@ -203,7 +204,12 @@ public class UnixProxyProvider extends AbstractProxyProvider {
 		} catch (InterruptedException e) {
 			Activator.logError(
 					"Problem during accessing system variable: " + env, e); //$NON-NLS-1$
+		} finally {
+			if (proc != null) {
+				proc.destroy();
+			}
 		}
+
 		return props.getProperty(env);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/.project b/eclipse/plugins/org.eclipse.core.resources.compatibility/.project
deleted file mode 100644
index 018265c..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.core.resources.compatibility</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 529f58b..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Feb 01 12:03:35 EST 2005
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5def5a1..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Fri Feb 20 11:54:29 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 5061c81..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Fri Feb 23 16:59:24 EST 2007
-eclipse.preferences.version=1
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n *     IBM Corporation - initial API and implementation\r\n ******************************************************************************/\r\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @since 3.2\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\r\n * Copyright (c) ${year} IBM Corporation and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n *     IBM Corporation - initial API and implementation\r\n *******************************************************************************/\r\n${filecomment}\r\n${package_declaration}\r\n\r\n/**\r\n * \r\n */\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">fail("4.99", ${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.resources.compatibility/META-INF/MANIFEST.MF
deleted file mode 100644
index 654d2a5..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %compatibilityFragmentName
-Bundle-SymbolicName: org.eclipse.core.resources.compatibility
-Bundle-Version: 3.4.1.qualifier
-Bundle-Vendor: %providerName
-Fragment-Host: 
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)"
-Bundle-Localization: plugin
-Export-Package: org.eclipse.core.internal.indexing;x-internal:=true,
- org.eclipse.core.internal.localstore;x-internal:=true,
- org.eclipse.core.internal.properties;x-internal:=true,
- org.eclipse.core.internal.resources;x-internal:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/build.properties b/eclipse/plugins/org.eclipse.core.resources.compatibility/build.properties
deleted file mode 100644
index b53bdac..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = .,\
-               META-INF/MANIFEST.MF,\
-               about.html
-src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractObjectPolicy.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractObjectPolicy.java
deleted file mode 100644
index b50d4ad..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractObjectPolicy.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public abstract class AbstractObjectPolicy {
-
-	/**
-	 * Creates a new instance of an object for this object store.  Uses
-	 * the contents of the field to decide what type of object to create.
-	 */
-	public abstract StoredObject createObject(Field field, ObjectStore store, ObjectAddress address) throws ObjectStoreException;
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractPagePolicy.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractPagePolicy.java
deleted file mode 100644
index 94b200c..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/AbstractPagePolicy.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public abstract class AbstractPagePolicy {
-
-	/**
-	 * Returns a page given a page number, a buffer, and the page store.  The
-	 * buffer should be copied in the implementations as it may be reused later.
-	 * The buffer is extended or truncated to the page size during this copy.
-	 * Both the buffer contents and the page number can be used to determine
-	 * the type of page to create.
-	 */
-	public abstract Page createPage(int pageNumber, byte[] buffer, PageStore pageStore);
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/BinarySmallObject.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/BinarySmallObject.java
deleted file mode 100644
index a73e2c2..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/BinarySmallObject.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class BinarySmallObject extends IndexedStoreObject {
-	public static final int TYPE = 5;
-	public static final int VALUE_OFFSET = 2;
-	protected byte[] value;
-
-	/**
-	 * Constructs a new object that will be inserted into a store.
-	 */
-	public BinarySmallObject(byte[] value) {
-		super();
-		this.value = new Buffer(value).get();
-	}
-
-	/**
-	 * Constructs an object from bytes that came from the store.
-	 */
-	public BinarySmallObject(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		super(f, store, address);
-	}
-
-	/**
-	 * Places the contents of the fields into the buffer.
-	 * Subclasses should implement and call super.
-	 * The value field is maintained in the contents directly and does not need
-	 * to be copied there by this method.
-	 */
-	protected void insertValues(Field f) {
-		super.insertValues(f);
-		f.subfield(VALUE_OFFSET).put(value);
-	}
-
-	/**
-	 * Extracts the values from a field into the members of this object;
-	 */
-	protected void extractValues(Field f) throws ObjectStoreException {
-		super.extractValues(f);
-		value = f.subfield(VALUE_OFFSET).get();
-	}
-
-	/**
-	 * Returns the maximum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMaximumSize() {
-		return 6000 + VALUE_OFFSET;
-	}
-
-	protected int length() {
-		return value.length + VALUE_OFFSET;
-	}
-
-	/**
-	 * Returns the minimum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMinimumSize() {
-		return VALUE_OFFSET;
-	}
-
-	/**
-	 * Returns the required type of this class of object.
-	 * Subclasses must override.
-	 */
-	protected int getRequiredType() {
-		return TYPE;
-	}
-
-	/**
-	 * Returns the value of the object.
-	 */
-	public byte[] getValue() {
-		return new Field(value).get();
-	}
-
-	/** 
-	 * Provides a printable representation of this object.
-	 */
-	public String toString() {
-		int n = 10;
-		StringBuffer b = new StringBuffer();
-		b.append("BSOB("); //$NON-NLS-1$
-		b.append(value.length);
-		b.append(" ["); //$NON-NLS-1$
-		for (int i = 0; i < value.length; i++) {
-			if (i > 0)
-				b.append(" "); //$NON-NLS-1$
-			if (i == n)
-				break;
-			b.append(value[i]);
-		}
-		if (value.length > n)
-			b.append(" ..."); //$NON-NLS-1$
-		b.append("])"); //$NON-NLS-1$
-		return b.toString();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Buffer.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Buffer.java
deleted file mode 100644
index df66874..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Buffer.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-/**
- * Implements a storage area that is accessible at various offsets and lengths.
- */
-public class Buffer {
-	protected byte[] contents;
-	private static final byte[] ZEROES = new byte[1024];
-
-	/**
-	 * Create a new buffer using the given byte array as contents.  Note that this has
-	 * the potential for aliasing side effects.
-	 */
-	public Buffer(byte[] contents) {
-		this.contents = contents;
-	}
-
-	/**
-	 * Create a new buffer of size n.
-	 */
-	public Buffer(int n) {
-		contents = new byte[n];
-	}
-
-	/**
-	 * Constructor for a new Buffer from an Insertable.
-	 */
-	public Buffer(Insertable anObject) {
-		this.contents = anObject.toByteArray();
-	}
-
-	public void clear() {
-		clear(contents, 0, contents.length);
-	}
-
-	private static void clear(byte[] buffer, int offset, int length) {
-		int n = length;
-		int p = offset;
-		while (n > 0) {
-			int m = Math.min(ZEROES.length, n);
-			System.arraycopy(ZEROES, 0, buffer, p, m);
-			p += m;
-			n -= m;
-		}
-	}
-
-	public void clear(int offset, int length) {
-		clear(contents, offset, length);
-	}
-
-	private static int compare(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2) {
-		if (length1 < length2) {
-			return -compare(buffer2, offset2, length2, buffer1, offset1, length1);
-		}
-		for (int i = 0; i < length2; i++) {
-			int j1 = buffer1[offset1 + i] & 255;
-			int j2 = buffer2[offset2 + i] & 255;
-			if (j1 > j2)
-				return 1;
-			if (j1 < j2)
-				return -1;
-		}
-		if (length1 > length2)
-			return 1;
-		return 0;
-	}
-
-	public static int compare(Buffer buffer1, int offset1, int length1, Buffer buffer2, int offset2, int length2) {
-		return compare(buffer1.contents, offset1, length1, buffer2.contents, offset2, length2);
-	}
-
-	public void copyInternal(int fromOffset, int toOffset, int length) {
-		System.arraycopy(contents, fromOffset, contents, toOffset, length);
-	}
-
-	public void copyTo(byte[] buffer) {
-		int n = Math.min(buffer.length, contents.length);
-		System.arraycopy(contents, 0, buffer, 0, n);
-	}
-
-	public void copyFrom(byte[] buffer) {
-		int n = Math.min(buffer.length, contents.length);
-		System.arraycopy(buffer, 0, contents, 0, n);
-	}
-
-	public byte[] get() {
-		return get(0, contents.length);
-	}
-
-	public byte[] get(int offset, int length) {
-		byte[] result = new byte[length];
-		System.arraycopy(contents, offset, result, 0, length);
-		return result;
-	}
-
-	public Field getField(int offset, int length) {
-		return new Field(this, offset, length);
-	}
-
-	public byte getByte(int offset) {
-		return contents[offset];
-	}
-
-	public int getInt(int offset, int length) {
-		return (int) getLong(offset, length);
-	}
-
-	public int getUInt(int offset, int length) {
-		int shift = Math.max(0, 32 - (length * 8));
-		int mask = (-1 >>> shift) & Integer.MAX_VALUE;
-		return getInt(offset, length) & mask;
-	}
-
-	public long getLong(int offset, int length) {
-		if (length <= 0)
-			return 0;
-		long v = contents[offset];
-		for (int i = offset + 1; i < offset + length; i++) {
-			v = (v << 8) | (contents[i] & 255);
-		}
-		return v;
-	}
-
-	public byte[] getByteArray() {
-		return contents;
-	}
-
-	public int length() {
-		return contents.length;
-	}
-
-	public void put(int offset, byte value) {
-		contents[offset] = value;
-	}
-
-	public void put(int offset, byte[] source) {
-		System.arraycopy(source, 0, contents, offset, source.length);
-	}
-
-	public void put(int offset, int length, byte[] source) {
-		int n = Math.min(length, source.length);
-		System.arraycopy(source, 0, contents, offset, n);
-	}
-
-	public void put(int offset, int length, long n) {
-		long v = n;
-		int i = offset + length;
-		while (i > offset) {
-			i--;
-			contents[i] = (byte) v;
-			v = (v >>> 8);
-		}
-	}
-
-	public void put(int offset, int length, int n) {
-		put(offset, length, (long) n);
-	}
-
-	public void put(int offset, Insertable source) {
-		put(offset, source.toByteArray());
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Convert.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Convert.java
deleted file mode 100644
index bd13d1c..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Convert.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.UnsupportedEncodingException;
-
-class Convert {
-
-	/**
-	 * Converts the string argument to a byte array.
-	 */
-	static String fromUTF8(byte[] b) {
-		String result;
-		try {
-			result = new String(b, "UTF8"); //$NON-NLS-1$
-		} catch (UnsupportedEncodingException e) {
-			result = new String(b);
-		}
-		return result;
-	}
-
-	/**
-	 * Converts the string argument to a byte array.
-	 */
-	static byte[] toUTF8(String s) {
-		byte[] result;
-		try {
-			result = s.getBytes("UTF8"); //$NON-NLS-1$
-		} catch (UnsupportedEncodingException e) {
-			result = s.getBytes();
-		}
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Field.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Field.java
deleted file mode 100644
index 81179ce..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Field.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class Field implements Insertable {
-	protected Buffer buffer; // contents
-	protected int offset; // offset of the field within the buffer
-	protected int length; // length of the field
-
-	/**
-	 * Constructor for a new Field.
-	 */
-	public Field(byte[] bytes) {
-		this.buffer = new Buffer(bytes);
-		this.offset = 0;
-		this.length = bytes.length;
-	}
-
-	/**
-	 * Constructor for a new Field.
-	 */
-	public Field(int n) {
-		this.buffer = new Buffer(n);
-		this.offset = 0;
-		this.length = n;
-	}
-
-	/**
-	 * Constructor for a new Field.
-	 */
-	public Field(Buffer buffer, int offset, int length) {
-		this.buffer = buffer;
-		this.offset = offset;
-		this.length = length;
-	}
-
-	/**
-	 * Constructor for a new Field.
-	 */
-	public Field(Insertable anObject) {
-		buffer = new Buffer(anObject);
-		offset = 0;
-		length = buffer.length();
-	}
-
-	public Field clear() {
-		buffer.clear(offset, length);
-		return this;
-	}
-
-	public int compareTo(Field that) {
-		return Buffer.compare(this.buffer, this.offset, this.length, that.buffer, that.offset, that.length);
-	}
-
-	public Field subfield(int offset, int length) {
-		if (offset + length > this.length)
-			throw new IllegalArgumentException();
-		return buffer.getField(this.offset + offset, length);
-	}
-
-	public Field subfield(FieldDef d) {
-		if (d.offset + d.length > this.length)
-			throw new IllegalArgumentException();
-		return buffer.getField(this.offset + d.offset, d.length);
-	}
-
-	public Field subfield(int offset) {
-		return subfield(offset, this.length - offset);
-	}
-
-	public byte[] get() {
-		return buffer.get(offset, length);
-	}
-
-	public int getInt() {
-		return buffer.getInt(offset, length);
-	}
-
-	public long getLong() {
-		return buffer.getLong(offset, length);
-	}
-
-	public int getUInt() {
-		return buffer.getUInt(offset, length);
-	}
-
-	public byte[] get(FieldDef d) {
-		return subfield(d).get();
-	}
-
-	public int getInt(FieldDef d) {
-		return subfield(d).getInt();
-	}
-
-	public int length() {
-		return length;
-	}
-
-	public Pointer pointTo(int offset) {
-		return new Pointer(buffer, this.offset + offset);
-	}
-
-	public Field put(byte[] b) {
-		buffer.put(offset, length, b);
-		return this;
-	}
-
-	public Field put(int n) {
-		buffer.put(offset, length, n);
-		return this;
-	}
-
-	public Field put(long n) {
-		buffer.put(offset, length, n);
-		return this;
-	}
-
-	public Field put(Insertable anObject) {
-		put(anObject.toByteArray());
-		return this;
-	}
-
-	public Field put(FieldDef d, int n) {
-		subfield(d).put(n);
-		return this;
-	}
-
-	public Field put(FieldDef d, Insertable anObject) {
-		subfield(d).put(anObject.toByteArray());
-		return this;
-	}
-
-	/**
-	 * Implementation of the Insertable interface.
-	 */
-	public byte[] toByteArray() {
-		return get();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldArray.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldArray.java
deleted file mode 100644
index bb1eccd..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldArray.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class FieldArray {
-
-	protected Buffer buffer; // buffer over which this array is defined
-	protected int offset; // offset within the buffer of the first field in the array
-	protected int length; // length of a field
-	protected int stride; // the amount of space from one field to the next
-	protected int count; // the number of fields in the array
-
-	/**
-	 * Constructor.
-	 * buffer is the underlying Buffer object.
-	 * offset is the offset within that buffer.
-	 * length is the length of each field in the array
-	 * stride the number of bytes from the beginning of one element to the beginning of the next
-	 * count is the number of elements in the array
-	 */
-	public FieldArray(Buffer buffer, int offset, int length, int stride, int count) {
-		this.buffer = buffer;
-		this.offset = offset;
-		this.length = length;
-		this.stride = stride;
-		this.count = count;
-	}
-
-	/**
-	 * Returns the ith field of the array.
-	 */
-	public Field fieldAt(int i) {
-		if (i >= count)
-			throw new ArrayIndexOutOfBoundsException();
-		return new Field(buffer, offset + (i * stride), length);
-	}
-
-	/**
-	 * Inserts a new "empty" field before index i.
-	 */
-	public Field insert(int i) {
-		count++;
-		if (i >= count)
-			throw new ArrayIndexOutOfBoundsException();
-		int s = offset + (i * stride); // source offset
-		int t = s + stride; // target offset
-		int n = (count - (i + 1)) * stride; // number of bytes to move
-		buffer.copyInternal(s, t, n);
-		return fieldAt(i).clear();
-	}
-
-	/**
-	 * Removes the entry at index i and "squeezes the space up".  Clears the last entry.
-	 */
-	public void remove(int i) {
-		if (i >= count)
-			throw new ArrayIndexOutOfBoundsException();
-		int s = offset + ((i + 1) * stride); // source offset
-		int t = s - stride; // target offset
-		int n = (count - (i + 1)) * stride; // number of bytes to move
-		buffer.copyInternal(s, t, n);
-		fieldAt(count - 1).clear();
-		count--;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldDef.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldDef.java
deleted file mode 100644
index 0e7be12..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/FieldDef.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class FieldDef {
-
-	public static final int F_BYTE = 1;
-	public static final int F_INT = 2;
-	public static final int F_UINT = 3;
-	public static final int F_LONG = 4;
-	public static final int F_BYTES = 5;
-
-	public int offset;
-	public int length;
-	public int type;
-
-	public FieldDef(int type, int offset, int length) {
-		this.type = type;
-		this.offset = offset;
-		this.length = length;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Index.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Index.java
deleted file mode 100644
index dc90d6f..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Index.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.Vector;
-
-/**
- * This class provides the public interface to an index.
- */
-public class Index {
-
-	private IndexedStore store;
-	private ObjectAddress anchorAddress;
-
-	/**
-	 * Index constructor.
-	 */
-	Index(IndexedStore store, ObjectAddress anchorAddress) {
-		this.store = store;
-		this.anchorAddress = anchorAddress;
-	}
-
-	/**
-	 * Returns a vector of ObjectIDs whose keys match the key given in the index.  
-	 * This assumes that the underlying index has values that can be converted 
-	 * to ObjectIDs.
-	 */
-	public synchronized Vector getObjectIdentifiersMatching(byte[] key) throws IndexedStoreException {
-		IndexCursor cursor = open();
-		cursor.find(key);
-		Vector vector = new Vector(20);
-		while (cursor.keyMatches(key)) {
-			vector.addElement(cursor.getValueAsObjectID());
-			cursor.next();
-		}
-		cursor.close();
-		return vector;
-	}
-
-	/**
-	 * Inserts an entry into an index.  The key and the value are byte arrays.  
-	 * Keys cannot be more than 1024 bytes in length.  Values must not 
-	 * be greater than 2048 bytes in length.  The other insert methods are 
-	 * convenience methods that use this for their implementation.
-	 */
-	public synchronized void insert(byte[] key, byte[] value) throws IndexedStoreException {
-		if (key.length > 1024)
-			throw new IndexedStoreException(IndexedStoreException.EntryKeyLengthError);
-		if (value.length > 2048)
-			throw new IndexedStoreException(IndexedStoreException.EntryValueLengthError);
-		IndexAnchor anchor = store.acquireAnchor(anchorAddress);
-		anchor.insert(key, value);
-		anchor.release();
-	}
-
-	public synchronized void insert(byte[] key, Insertable value) throws IndexedStoreException {
-		insert(key, value.toByteArray());
-	}
-
-	public synchronized void insert(String key, byte[] value) throws IndexedStoreException {
-		insert(Convert.toUTF8(key), value);
-	}
-
-	/**
-	 * Returns a cursor for this index.  The cursor is initially in the unset state
-	 * and should be positioned using "find" before being used.
-	 */
-	public synchronized IndexCursor open() throws IndexedStoreException {
-		IndexCursor c = new IndexCursor(store, anchorAddress);
-		return c;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexAnchor.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexAnchor.java
deleted file mode 100644
index 19bb2c1..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexAnchor.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-/**
- * An IndexAnchor provides a place to hang index-wide information in a fixed spot, especially
- * since the root node may change due to a root node split.
- */
-
-class IndexAnchor extends IndexedStoreObject {
-
-	public static final int SIZE = 32;
-	public static final int TYPE = 1;
-
-	protected static final int RootNodeAddressOffset = 2;
-	protected static final int RootNodeAddressLength = 4;
-
-	protected static final int NumberOfEntriesOffset = 14;
-	protected static final int NumberOfEntriesLength = 4;
-
-	protected Field numberOfEntriesField;
-	protected int numberOfEntries;
-
-	protected Field rootNodeAddressField;
-	protected ObjectAddress rootNodeAddress;
-
-	/** 
-	 * Constructs a new index anchor from nothing.
-	 */
-	public IndexAnchor() {
-		super();
-		numberOfEntries = 0;
-		rootNodeAddress = ObjectAddress.Null;
-	}
-
-	/** 
-	 * Constructs a new index anchor from a field read from the store.  Used by the factory.
-	 */
-	public IndexAnchor(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		super(f, store, address);
-	}
-
-	/**
-	 * Sets the fields definitions.  Done after the contents are set.
-	 */
-	private void setFields(Field f) {
-		rootNodeAddressField = f.subfield(RootNodeAddressOffset, RootNodeAddressLength);
-		numberOfEntriesField = f.subfield(NumberOfEntriesOffset, NumberOfEntriesLength);
-	}
-
-	/**
-	 * Places the contents of the fields into the buffer.
-	 * Subclasses should implement and call super.
-	 */
-	protected void insertValues(Field f) {
-		super.insertValues(f);
-		setFields(f);
-		numberOfEntriesField.put(numberOfEntries);
-		rootNodeAddressField.put(rootNodeAddress);
-	}
-
-	/**
-	 * Places the contents of the buffer into the fields.
-	 * Subclasses should implement and call super.
-	 */
-	protected void extractValues(Field f) throws ObjectStoreException {
-		super.extractValues(f);
-		setFields(f);
-		numberOfEntries = numberOfEntriesField.getInt();
-		rootNodeAddress = new ObjectAddress(rootNodeAddressField.get());
-	}
-
-	/**
-	 * Returns the minimum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMinimumSize() {
-		return SIZE;
-	}
-
-	/**
-	 * Returns the required type of this class of object.
-	 * Subclasses must override.
-	 */
-	protected int getRequiredType() {
-		return TYPE;
-	}
-
-	/**
-	 * Returns a printable representation of this object.
-	 */
-	public String toString() {
-		StringBuffer b = new StringBuffer();
-		b.append("Anchor("); //$NON-NLS-1$
-		b.append(numberOfEntries);
-		b.append(","); //$NON-NLS-1$
-		b.append(rootNodeAddress);
-		b.append(")"); //$NON-NLS-1$
-		return b.toString();
-	}
-
-	/**
-	 * Processes the notification that an entry was inserted.
-	 */
-	void entryInserted(IndexNode node) {
-		if (node.isLeaf()) {
-			numberOfEntries++;
-			setChanged();
-		}
-	}
-
-	/**
-	 * Processes the notification by a leaf node that an entry was removed.
-	 */
-	void entryRemoved(IndexNode node) {
-		if (node.isLeaf()) {
-			numberOfEntries--;
-			setChanged();
-		}
-	}
-
-	/**
-	 * Sets the root node address.  Set when root node is initialized or split.
-	 */
-	void setRootNodeAddress(ObjectAddress rootNodeAddress) {
-		this.rootNodeAddress = rootNodeAddress;
-		setChanged();
-	}
-
-	/**
-	 * This method returns a cursor set to the first entry in the index whose key 
-	 * is greater than or equal to the key provided.  To set a cursor to the beginning 
-	 * of the index use a key of zero length.
-	 */
-	void find(byte key[], IndexCursor cursor) throws IndexedStoreException {
-		if (rootNodeAddress.isNull()) {
-			cursor.reset();
-		} else {
-			IndexNode rootNode = acquireNode(rootNodeAddress);
-			rootNode.find(key, cursor);
-			rootNode.release();
-		}
-	}
-
-	/**
-	 * This method returns a cursor set to the first entry in the index.
-	 */
-	void findFirstEntry(IndexCursor cursor) throws IndexedStoreException {
-		if (rootNodeAddress.isNull()) {
-			cursor.reset();
-		} else {
-			IndexNode rootNode = acquireNode(rootNodeAddress);
-			rootNode.findFirstEntry(cursor);
-			rootNode.release();
-		}
-	}
-
-	/**
-	 * Insert an entry into an index.  
-	 */
-	void insert(byte[] key, byte[] value) throws IndexedStoreException {
-		if (rootNodeAddress.isNull()) {
-			IndexNode rootNode = new IndexNode(this.address);
-			try {
-				store.insertObject(rootNode);
-			} catch (ObjectStoreException e) {
-				throw new IndexedStoreException(IndexedStoreException.IndexNodeNotCreated, e);
-			}
-			rootNodeAddress = rootNode.getAddress();
-		}
-		IndexNode rootNode = acquireNode(rootNodeAddress);
-		rootNode.insertEntry(key, value);
-		rootNode.release();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexCursor.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexCursor.java
deleted file mode 100644
index 3d5a7ac..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexCursor.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class IndexCursor {
-
-	private IndexedStore store;
-	private ObjectAddress anchorAddress;
-	private int entryNumber;
-	private IndexNode leafNode;
-	private boolean entryRemoved;
-
-	/**
-	 * Constructor for an IndexCursor.  Cursors should only be constructed
-	 * by the index during an open operation.
-	 */
-	IndexCursor(IndexedStore store, ObjectAddress anchorAddress) {
-		this.anchorAddress = anchorAddress;
-		this.store = store;
-		this.leafNode = null;
-		this.entryNumber = -1;
-	}
-
-	/**
-	 * Adjusts the position of a cursor to point to a "real" entry
-	 * entry if it is pointing outside of the entries of a node.
-	 * If there are no more entries then unset the cursor.
-	 */
-	private void adjust() throws IndexedStoreException {
-		if (leafNode == null)
-			return;
-		if (entryNumber >= leafNode.getNumberOfEntries()) {
-			ObjectAddress next = leafNode.getNextAddress();
-			int n = entryNumber - leafNode.getNumberOfEntries();
-			set(next, n);
-		} else if (entryNumber < 0) {
-			ObjectAddress previous = leafNode.getPreviousAddress();
-			int n = entryNumber;
-			set(previous, n);
-		}
-	}
-
-	/**
-	 * Closes the cursor.  This unsets the cursor and deregisters it from all the
-	 * interested parties.
-	 */
-	public void close() throws IndexedStoreException {
-		reset();
-	}
-
-	/**
-	 * Adjusts a cursor if there is a need after an entry is inserted.
-	 * If not, it just returns.
-	 */
-	void entryInserted(int i) throws IndexedStoreException {
-		if (entryNumber >= i)
-			entryNumber++;
-		adjust();
-	}
-
-	/**
-	 * Adjusts a cursor if there is a need after an entry is removed.
-	 */
-	void entryRemoved(int i) throws IndexedStoreException {
-		entryRemoved = (entryNumber == i);
-		if (entryNumber > i)
-			entryNumber--;
-		adjust();
-	}
-
-	/**
-	 * Sets the cursor at the first entry of an index whose key is 
-	 * greater than or equal to that of the argument.  Returns the cursor itself
-	 * for convenience in chaining method invocations.
-	 */
-	public synchronized IndexCursor find(byte[] b) throws IndexedStoreException {
-		IndexAnchor anchor = store.acquireAnchor(anchorAddress);
-		anchor.find(b, this);
-		anchor.release();
-		entryRemoved = false;
-		return this;
-	}
-
-	/**
-	 * Sets the cursor at the first entry of an index whose key is 
-	 * greater than or equal to that of the argument.  Returns the cursor itself
-	 * for convenience in chaining method invocations.
-	 */
-	public synchronized IndexCursor find(String s) throws IndexedStoreException {
-		return find(Convert.toUTF8(s));
-	}
-
-	/**
-	 * Sets the cursor at the first entry of an index.
-	 */
-	public synchronized IndexCursor findFirstEntry() throws IndexedStoreException {
-		IndexAnchor anchor = store.acquireAnchor(anchorAddress);
-		anchor.findFirstEntry(this);
-		anchor.release();
-		entryRemoved = false;
-		return this;
-	}
-
-	/**
-	 * Returns the byte array holding the key for the current cursor location.  
-	 * If the cursor is at the beginning or end of the index then return null.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized byte[] getKey() throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (leafNode == null)
-			return null;
-		byte[] key = leafNode.getKey(entryNumber);
-		return key;
-	}
-
-	/**
-	 * Returns the byte array holding the value for the current cursor location.  If the cursor is
-	 * at the beginning or end of the index then return null.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized byte[] getValue() throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (leafNode == null)
-			return null;
-		byte[] value = leafNode.getValue(entryNumber);
-		return value;
-	}
-
-	/** 
-	 * Returns the value as an object address.  May return null if the cursor is at the beginning
-	 * or end of the index.
-	 */
-	ObjectAddress getValueAsObjectAddress() throws IndexedStoreException {
-		byte[] value = getValue();
-		if (value == null)
-			return null;
-		return new ObjectAddress(value);
-	}
-
-	/**
-	 * Returns the ObjectID from the value for the current cursor location.  
-	 * If the cursor is at the beginning or end of the index then return null.
-	 */
-	public synchronized ObjectID getValueAsObjectID() throws IndexedStoreException {
-		byte[] value = getValue();
-		if (value == null)
-			return null;
-		return new ObjectID(value);
-	}
-
-	/**
-	 * This method returns true if the current cursor location before the first entry in the index.
-	 */
-	public synchronized boolean isAtBeginning() throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		return (leafNode == null);
-	}
-
-	/**
-	 * Returns true if the cursor is set to an entry.
-	 * Returns false otherwise.
-	 */
-	public synchronized boolean isSet() throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		return !(leafNode == null);
-	}
-
-	/**
-	 * Compares a byte array to the key in the cursor and 
-	 * returns true if the byte array is equal to the key at the entry in the cursor.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized boolean keyEquals(byte[] b) throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (leafNode == null)
-			return false;
-		byte[] key = leafNode.getKey(entryNumber);
-		if (b.length != key.length) {
-			return false;
-		}
-		for (int i = 0; i < b.length; i++) {
-			if (key[i] != b[i]) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * Compares a byte array to the key in the cursor and 
-	 * returns true if the byte array is a prefix
-	 * of the key at the entry in the cursor.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized boolean keyMatches(byte[] b) throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (leafNode == null)
-			return false;
-		byte[] key = leafNode.getKey(entryNumber);
-		if (key.length < b.length) {
-			return false;
-		}
-		for (int i = 0; i < b.length; i++) {
-			if (key[i] != b[i]) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * Compares a String to the key in the cursor and 
-	 * returns true if the byte array is a prefix
-	 * of the key at the entry in the cursor.
-	 */
-	public synchronized boolean keyMatches(String s) throws IndexedStoreException {
-		return keyMatches(Convert.toUTF8(s));
-	}
-
-	/**
-	 * Moves the cursor to the next index entry.  
-	 * If the cursor is at the last entry, it becomes unset.
-	 * If the cursor is unset, then it is set to the first entry.
-	 * The cursor itself is returned.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized IndexCursor next() throws IndexedStoreException {
-		if (isAtBeginning()) {
-			findFirstEntry();
-		} else {
-			entryNumber++;
-			adjust();
-		}
-		return this;
-	}
-
-	/**
-	 * Adjusts a cursor if there is a need after a node has been split.
-	 * If not, it just returns.
-	 */
-	void nodeSplit() throws IndexedStoreException {
-		adjust();
-	}
-
-	/**
-	 * Removes the entry at the current cursor location.  If the cursor is not set
-	 * then no operation is done.  If an element is removed
-	 * the cursor automatically advances to the "next" element.  
-	 * Removing an element adjusts all cursors (including this one) pointing into this node.
-	 * If there is no next element, the cursor is unset.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized void remove() throws IndexedStoreException {
-		removeEntry();
-	}
-
-	/**
-	 * Removes the entry at the current cursor location.  If the cursor is not set
-	 * then no operation is done.  If an element is removed
-	 * the cursor automatically advances to the "next" element.  
-	 * Removing an element adjusts all cursors (including this one) pointing into this node.
-	 * If there is no next element, the cursor is unset.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	void removeEntry() throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (leafNode == null)
-			return;
-		ObjectAddress address = leafNode.getAddress();
-		leafNode.removeEntry(entryNumber);
-		entryRemoved = false; // Clear the flag. This cursor is positioned to the next entry and remains valid.
-
-		/* remove empty nodes from the tree */
-		while (!address.isNull()) {
-			IndexNode node = store.acquireNode(address);
-			if (node.getNumberOfEntries() > 0) {
-				node.release();
-				break;
-			}
-			ObjectAddress parentAddress = node.getParentAddress();
-			node.unlink();
-			node.release();
-			store.removeObject(address);
-			address = parentAddress;
-		}
-	}
-
-	/**
-	 * Places the cursor in the "unset" state.
-	 */
-	public synchronized void reset() throws IndexedStoreException {
-		unset();
-		entryRemoved = false;
-	}
-
-	/**
-	 * Sets the cursor to a particular entry of an index node.
-	 */
-	void set(ObjectAddress leafNodeAddress, int entryNumber) throws IndexedStoreException {
-		unset();
-		if (leafNodeAddress.isNull())
-			return;
-		leafNode = store.acquireNode(leafNodeAddress);
-		leafNode.addCursor(this);
-		if (entryNumber >= 0)
-			this.entryNumber = entryNumber;
-		else
-			this.entryNumber = leafNode.getNumberOfEntries() + entryNumber;
-		adjust();
-	}
-
-	/**
-	 * Places the cursor in the "unset" state.
-	 */
-	private void unset() throws IndexedStoreException {
-		if (leafNode != null) {
-			leafNode.removeCursor(this);
-			leafNode.release();
-		}
-		entryNumber = -1;
-		leafNode = null;
-		entryRemoved = false;
-	}
-
-	/**
-	 * Updates the value of the index entry at the cursor.
-	 * If the cursor is at the beginning or end of the index then do nothing.
-	 * Returns true if the value is set, false otherwise.
-	 */
-	void updateEntry(byte[] b) throws IndexedStoreException {
-		if (entryRemoved)
-			throw new IndexedStoreException(IndexedStoreException.EntryRemoved);
-		if (b.length > 2048)
-			throw new IndexedStoreException(IndexedStoreException.EntryValueLengthError);
-		if (leafNode == null)
-			return;
-		leafNode.updateValueAt(entryNumber, b);
-	}
-
-	/**
-	 * Updates the value of the index entry at the cursor.
-	 * If the cursor is at the beginning or end of the index then do nothing.
-	 * Returns true if the value is set, false otherwise.
-	 * 
-	 * Throws an EntryRemoved condition if the entry at which it has
-	 * been pointing has been removed by another cursor.
-	 */
-	public synchronized void updateValue(byte[] b) throws IndexedStoreException {
-		updateEntry(b);
-	}
-
-	/**
-	 * Updates the value of the index entry at the cursor.
-	 * If the cursor is at the beginning or end of the index then do nothing.
-	 */
-	public synchronized void updateValue(Insertable anObject) throws IndexedStoreException {
-		updateValue(anObject.toByteArray());
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexNode.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexNode.java
deleted file mode 100644
index 2186d89..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexNode.java
+++ /dev/null
@@ -1,922 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.HashSet;
-
-class IndexNode extends IndexedStoreObject {
-
-	/* needed for all stored objects */
-	public static final int SIZE = MAXIMUM_OBJECT_SIZE;
-	public static final int TYPE = 3;
-
-	/* field definitions */
-	private static final int EntriesFieldOffset = 64;
-	private static final int EntriesFieldSize = SIZE - EntriesFieldOffset;
-	private static final FieldDef NodeType = new FieldDef(FieldDef.F_INT, 2, 2);
-	private static final FieldDef AnchorAddress = new FieldDef(FieldDef.F_BYTES, 4, 4);
-	private static final FieldDef ParentAddress = new FieldDef(FieldDef.F_BYTES, 8, 4);
-	private static final FieldDef PreviousAddress = new FieldDef(FieldDef.F_BYTES, 12, 4);
-	private static final FieldDef NextAddress = new FieldDef(FieldDef.F_BYTES, 16, 4);
-	private static final FieldDef NumberOfEntries = new FieldDef(FieldDef.F_INT, 20, 2);
-	private static final FieldDef UsedSpace = new FieldDef(FieldDef.F_INT, 22, 2);
-	private static final FieldDef UsedSpaceMax = new FieldDef(FieldDef.F_INT, 24, 2);
-	private static final FieldDef EntriesField = new FieldDef(FieldDef.F_BYTES, EntriesFieldOffset, EntriesFieldSize);
-
-	/* field values */
-	private int nodeType;
-	private ObjectAddress anchorAddress;
-	private ObjectAddress parentAddress;
-	private ObjectAddress previousAddress;
-	private ObjectAddress nextAddress;
-	private int numberOfEntries;
-	private int usedSpace;
-	private int usedSpaceMax;
-	private Field entriesField;
-
-	/* types of nodes in the index */
-	private static final int RootNode = 1;
-	private static final int InteriorNode = 2;
-	private static final int LeafNode = 3;
-
-	/* miscellaneous constants */
-	private static final int DescriptorLength = 6;
-
-	/* cursors in this node */
-	private HashSet cursors = new HashSet();
-
-	/**
-	 * Reconstructs a node from a field.
-	 */
-	IndexNode(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		super(f, store, address);
-	}
-
-	/**
-	 * Constructor that creates a root node.
-	 */
-	IndexNode(ObjectAddress anchorAddress) {
-		super();
-		this.anchorAddress = anchorAddress;
-		this.parentAddress = ObjectAddress.Null;
-		this.previousAddress = ObjectAddress.Null;
-		this.nextAddress = ObjectAddress.Null;
-		this.usedSpace = 0;
-		this.usedSpaceMax = 0;
-		this.numberOfEntries = 0;
-		this.nodeType = RootNode;
-		this.entriesField = new Field(SIZE - EntriesFieldOffset);
-	}
-
-	/** 
-	 * Constructor that creates an interior node.
-	 */
-	IndexNode(ObjectAddress anchorAddress, ObjectAddress parentAddress) {
-		this(anchorAddress);
-		this.parentAddress = parentAddress;
-		this.nodeType = InteriorNode;
-	}
-
-	/**
-	 * Constructor that creates a leaf node.
-	 */
-	IndexNode(ObjectAddress anchorAddress, ObjectAddress parentAddress, ObjectAddress previousAddress, ObjectAddress nextAddress) {
-		this(anchorAddress, parentAddress);
-		this.previousAddress = previousAddress;
-		this.nextAddress = nextAddress;
-		this.nodeType = LeafNode;
-	}
-
-	/**
-	 * Registers a cursor with this node.
-	 */
-	void addCursor(IndexCursor cursor) {
-		cursors.add(cursor);
-	}
-
-	/**
-	 * Compares the key at a particular entry to a byte array. 
-	 */
-	private int compareEntryToKey(int entryNumber, byte[] key) throws IndexedStoreException {
-		Field keyField = new Field(key);
-		Field entryKeyField = getKeyField(entryNumber);
-		return entryKeyField.compareTo(keyField);
-	}
-
-	/**
-	 * Compresses the space in the entries area of the node.
-	 */
-	private void compress() throws IndexedStoreException {
-
-		/* some preliminaries */
-		int entriesLength = entriesField.length();
-		int descriptorBlockSize = numberOfEntries * DescriptorLength;
-
-		/* need to make a copy of the entries in the area, this will compress it */
-		Field f2 = new Field(entriesField.length());
-		copyEntries(entriesField, 0, numberOfEntries, f2);
-
-		/* copy the entries area back to the node and modify the usedSpaceMax to reflect the compression */
-		entriesField.put(f2.get());
-		usedSpaceMax = usedSpace;
-
-		/* clear the space in the between the descriptor array and the entries heap */
-		int freeBlockSize = entriesLength - (descriptorBlockSize + usedSpaceMax);
-		Field f3 = entriesField.subfield(descriptorBlockSize, freeBlockSize);
-		f3.clear();
-		setChanged();
-	}
-
-	/**
-	 * Compresses the space in the entries area of the node if the free space block
-	 * is smaller than the given threshold.
-	 */
-	private void compress(int threshold) throws IndexedStoreException {
-		int entriesLength = entriesField.length();
-		int descriptorBlockSize = numberOfEntries * DescriptorLength;
-		int freeBlockSize = entriesLength - (descriptorBlockSize + usedSpaceMax);
-		if (freeBlockSize >= threshold)
-			return;
-		compress();
-	}
-
-	/**
-	 * Copies entries from one Field to another.  Fields are assumed to contain an array of descriptors at the 
-	 * low end and a heap of (key,value) pairs at the high end.
-	 */
-	private static int copyEntries(Field sourceField, int sourceIndex, int numberOfEntries, Field targetField) {
-
-		Pointer tDescriptor = targetField.pointTo(0);
-		Pointer sDescriptor = sourceField.pointTo(sourceIndex * DescriptorLength);
-		int tEntryOffset = targetField.length();
-
-		// for each descriptor make a new one in the new area and copy its (key,value) entry
-		for (int i = 0; i < numberOfEntries; i++) {
-
-			// extract information from old descriptor
-			int sEntryOffset = sDescriptor.getField(0, 2).getUInt();
-			int keyLength = sDescriptor.getField(2, 2).getUInt();
-			int valueLength = sDescriptor.getField(4, 2).getUInt();
-			int entryLength = keyLength + valueLength;
-			Field sEntry = sourceField.subfield(sEntryOffset, entryLength);
-
-			// copy the (key,value) entry from the old to the new space
-			tEntryOffset -= entryLength;
-			Field tEntry = targetField.subfield(tEntryOffset, entryLength);
-			tEntry.put(sEntry.get());
-
-			// create a new descriptor
-			tDescriptor.getField(0, 2).put(tEntryOffset);
-			tDescriptor.getField(2, 2).put(keyLength);
-			tDescriptor.getField(4, 2).put(valueLength);
-
-			// on to the next one
-			tDescriptor.inc(DescriptorLength);
-			sDescriptor.inc(DescriptorLength);
-		}
-		return targetField.length() - tEntryOffset;
-	}
-
-	/**
-	 * Places the contents of the fields into the buffer.
-	 * Subclasses should implement and call super.
-	 */
-	protected void insertValues(Field f) {
-		super.insertValues(f);
-		f.put(AnchorAddress, anchorAddress);
-		f.put(ParentAddress, parentAddress);
-		f.put(NextAddress, nextAddress);
-		f.put(PreviousAddress, previousAddress);
-		f.put(NodeType, nodeType);
-		f.put(NumberOfEntries, numberOfEntries);
-		f.put(UsedSpace, usedSpace);
-		f.put(UsedSpaceMax, usedSpaceMax);
-		f.put(EntriesField, entriesField);
-	}
-
-	/**
-	 * Causes the node to remove its children from the store.
-	 */
-	void destroyChildren() throws IndexedStoreException {
-		if (!isLeaf()) {
-			for (int i = 0; i < numberOfEntries; i++) {
-				ObjectAddress childNodeAddress = new ObjectAddress(getValue(i));
-				IndexNode childNode = acquireNode(childNodeAddress);
-				childNode.destroyChildren();
-				childNode.release();
-				removeObject(childNodeAddress);
-			}
-		}
-	}
-
-	/**
-	 * Places a cursor and the first entry greater than or equal to a key.
-	 */
-	void find(byte[] key, IndexCursor cursor) throws IndexedStoreException {
-		int i;
-		i = findLastEntryLT(key);
-		if (isLeaf()) {
-			cursor.set(address, i + 1);
-		} else if (i >= 0) {
-			IndexNode childNode = acquireNode(new ObjectAddress(getValue(i)));
-			childNode.find(key, cursor);
-			childNode.release();
-		} else if (numberOfEntries > 0) {
-			IndexNode childNode = acquireNode(new ObjectAddress(getValue(0)));
-			childNode.find(key, cursor);
-			childNode.release();
-		} else {
-			cursor.reset();
-		}
-	}
-
-	/**
-	 * Places a cursor at the first entry of a node.
-	 */
-	void findFirstEntry(IndexCursor cursor) throws IndexedStoreException {
-		if (numberOfEntries == 0) {
-			cursor.reset();
-		} else if (!isLeaf()) {
-			IndexNode childNode = acquireNode(new ObjectAddress(getValue(0)));
-			childNode.findFirstEntry(cursor);
-			childNode.release();
-		} else {
-			cursor.set(address, 0);
-		}
-	}
-
-	/**
-	 * Returns the index of the first entry greater than a key.
-	 */
-	private int findFirstEntryGT(byte[] key) throws IndexedStoreException {
-		int lo = 0;
-		int hi = numberOfEntries - 1;
-		while (lo <= hi) {
-			int i = (lo + hi) / 2;
-			int c = compareEntryToKey(i, key);
-			if (c <= 0) {
-				lo = i + 1;
-			} else {
-				hi = i - 1;
-			}
-		}
-		return lo;
-	}
-
-	/**
-	 * Places a cursor at the last entry of a node.
-	 */
-	void findLastEntry(IndexCursor cursor) throws IndexedStoreException {
-		if (numberOfEntries == 0) {
-			cursor.reset();
-			return;
-		}
-		int i = numberOfEntries - 1;
-		if (!isLeaf()) {
-			IndexNode childNode = acquireNode(new ObjectAddress(getValue(i)));
-			childNode.findLastEntry(cursor);
-			childNode.release();
-		} else {
-			cursor.set(address, i);
-		}
-	}
-
-	/**
-	 * Returns the index of the last entry less than a key.
-	 */
-	private int findLastEntryLT(byte[] key) throws IndexedStoreException {
-		int lo = 0;
-		int hi = numberOfEntries - 1;
-		Field keyField = new Field(key);
-		while (lo <= hi) {
-			int i = (lo + hi) / 2;
-			int c = getKeyField(i).compareTo(keyField);
-			if (c < 0) {
-				lo = i + 1;
-			} else {
-				hi = i - 1;
-			}
-		}
-		return hi;
-	}
-
-	/**
-	 * Returns the descriptor field for the node entry at a given index.
-	 */
-	private Field getDescriptor(int i) {
-		return entriesField.subfield(i * DescriptorLength, DescriptorLength);
-	}
-
-	/**
-	 * Returns the entire array of entry descriptors.
-	 */
-	private FieldArray getDescriptorArray() {
-		return entriesField.pointTo(0).getArray(DescriptorLength, DescriptorLength, numberOfEntries);
-	}
-
-	private Field getEntriesField() {
-		return entriesField;
-	}
-
-	/**
-	 * Returns the value of the key for an entry at a given index.
-	 */
-	byte[] getKey(int i) {
-		return getKeyField(i).get();
-	}
-
-	/**
-	 * Returns a Field covering the key for an entry at a given index.
-	 */
-	private Field getKeyField(int i) {
-		//		Field descriptor = getDescriptor(i);
-		//		int keyOffset = descriptor.subfield(0, 2).getUInt();
-		//		int keyLength = descriptor.subfield(2, 2).getUInt();
-		//		return entriesField.subfield(keyOffset, keyLength);
-		//above is the original code that created three garbage field objects
-		//below is the optimized code that only creates one field object
-		int descriptorOff = i * DescriptorLength;
-		Buffer buffer = entriesField.buffer;
-		return entriesField.subfield(buffer.getUInt(descriptorOff, 2), //these bytes hold the key offset
-				buffer.getUInt(descriptorOff + 2, 2));//these bytes hold the key length
-	}
-
-	/**
-	 * Returns a Field covering the (key, value) pair for an entry at a given index.
-	 */
-	private Field getKeyValueField(int i) {
-		Field descriptor = getDescriptor(i);
-		int offset = descriptor.subfield(0, 2).getUInt();
-		int keyLength = descriptor.subfield(2, 2).getUInt();
-		int valueLength = descriptor.subfield(4, 2).getUInt();
-		return entriesField.subfield(offset, keyLength + valueLength);
-	}
-
-	/**
-	 * Returns the lowest key in the node.  If none, returns an empty byte arrray.
-	 */
-	private byte[] getLowKey() {
-		if (numberOfEntries == 0)
-			return new byte[0];
-		return getKey(0);
-	}
-
-	/**
-	 * Returns the minimum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMinimumSize() {
-		return SIZE;
-	}
-
-	ObjectAddress getNextAddress() {
-		return nextAddress;
-	}
-
-	int getNumberOfEntries() {
-		return numberOfEntries;
-	}
-
-	/**
-	 * Returns the number of nodes in this subtree (this one plus all descendants).
-	 */
-	int getNumberOfNodes() throws IndexedStoreException {
-		if (isLeaf())
-			return 1;
-		int sum = 0;
-		for (int i = 0; i < numberOfEntries; i++) {
-			ObjectAddress childAddress = new ObjectAddress(getValue(i));
-			IndexNode childNode = acquireNode(childAddress);
-			sum += childNode.getNumberOfNodes();
-			childNode.release();
-		}
-		return sum + 1;
-	}
-
-	ObjectAddress getParentAddress() {
-		return parentAddress;
-	}
-
-	ObjectAddress getPreviousAddress() {
-		return previousAddress;
-	}
-
-	/**
-	 * Returns the required type of this class of object.
-	 * Subclasses must override.
-	 */
-	protected int getRequiredType() {
-		return TYPE;
-	}
-
-	private int getUsedSpace() {
-		return usedSpace;
-	}
-
-	/**
-	 * Returns the value for an entry at a given index.
-	 */
-	byte[] getValue(int i) {
-		return getValueField(i).get();
-	}
-
-	/**
-	 * Returns a Field covering the value for an entry at a given index.
-	 */
-	private Field getValueField(int i) {
-		Field descriptor = getDescriptor(i);
-		int keyOffset = descriptor.subfield(0, 2).getUInt();
-		int keyLength = descriptor.subfield(2, 2).getUInt();
-		int valueLength = descriptor.subfield(4, 2).getUInt();
-		int valueOffset = keyOffset + keyLength;
-		return entriesField.subfield(valueOffset, valueLength);
-	}
-
-	/**
-	 * Inserts an entry into the node.  If this was inserted in slot 0, then we must update the parent
-	 * node's low key.  If this was a leaf node then we must update the anchor'ss number of entries and
-	 * adjust any cursors for this node.  This may also cause a split.
-	 *
-	 * Implementation Note: Cannot use an iterator over the cursor set because 
-	 * notification of an insert may remove the cursor being notified from the cursor set.
-	 */
-	void insertEntry(byte[] key, byte[] value) throws IndexedStoreException {
-		int i = findFirstEntryGT(key);
-		if (isLeaf()) {
-			insertEntryBefore(i, key, value);
-			Object[] cursorArray = cursors.toArray();
-			for (int j = 0; j < cursorArray.length; j++) {
-				IndexCursor cursor = (IndexCursor) cursorArray[j];
-				cursor.entryInserted(i);
-			}
-			IndexAnchor anchor = acquireAnchor(anchorAddress);
-			anchor.entryInserted(this);
-			anchor.release();
-		} else {
-			ObjectAddress childNodeAddress = null;
-			if (getNumberOfEntries() == 0) {
-				IndexNode childNode = new IndexNode(anchorAddress, address, ObjectAddress.Null, ObjectAddress.Null);
-				childNodeAddress = insertObject(childNode);
-			} else {
-				childNodeAddress = new ObjectAddress(getValue(Math.max(0, (i - 1))));
-			}
-			IndexNode childNode = acquireNode(childNodeAddress);
-			childNode.insertEntry(key, value);
-			childNode.release();
-		}
-	}
-
-	/**
-	 * Inserts a new (key, value) pair in front of the entry at the given index.
-	 * If the node needs to be split, split it and then attempt the insert again.  If this is a
-	 * non-leaf node then the value is the address of a child.  That child's parent address
-	 * will be updated if that (key, value) is to be inserted into a new node.
-	 */
-	private void insertEntryBefore(int i, byte[] key, byte[] value) throws IndexedStoreException {
-		Field entries = entriesField;
-		int entriesLength = entries.length();
-		int keyValueLength = key.length + value.length;
-		int neededSpace = keyValueLength + DescriptorLength;
-		int freeSpace = entriesLength - ((numberOfEntries * DescriptorLength) + usedSpace);
-		if (freeSpace < neededSpace) {
-			ObjectAddress newNodeAddress = split();
-			if (i > numberOfEntries) {
-				if (!isLeaf()) {
-					ObjectAddress childAddress = new ObjectAddress(value);
-					IndexNode child = acquireNode(childAddress);
-					child.setParentAddress(newNodeAddress);
-					child.release();
-				}
-				IndexNode newNode = acquireNode(newNodeAddress);
-				newNode.insertEntryBefore(i - getNumberOfEntries(), key, value);
-				newNode.release();
-			} else {
-				insertEntryBefore(i, key, value);
-			}
-			return;
-		}
-
-		/* place the value and key fields into the space */
-		compress(neededSpace);
-		Pointer p = entries.pointTo(entriesLength - usedSpaceMax);
-		p.dec(value.length).put(value);
-		p.dec(key.length).put(key);
-		usedSpaceMax += keyValueLength;
-		usedSpace += keyValueLength;
-
-		/* create a hole in the descriptor area for a new descriptor */
-		Field newDescriptor = getDescriptorArray().insert(i);
-		numberOfEntries++;
-
-		/* create a new descriptor */
-		newDescriptor.subfield(0, 2).put(entriesLength - usedSpaceMax);
-		newDescriptor.subfield(2, 2).put(key.length);
-		newDescriptor.subfield(4, 2).put(value.length);
-
-		/* update the parent key for this node if this was the 0th entry */
-		if (i == 0 && !parentAddress.isNull()) {
-			IndexNode parent = acquireNode(parentAddress);
-			if (numberOfEntries == 1) {
-				parent.insertKeyForChild(address, key);
-			} else {
-				parent.updateKeyForChild(getKey(1), address, key);
-			}
-			parent.release();
-		}
-		setChanged();
-	}
-
-	/**
-	 * Inserts a child address into a non-leaf node.  This may result in this node splitting.
-	 */
-	private void insertKeyForChild(ObjectAddress childAddress, byte[] key) throws IndexedStoreException {
-		int i = findFirstEntryGT(key);
-		insertEntryBefore(i, key, childAddress.toByteArray());
-		if (i == 0 && !parentAddress.isNull()) {
-			IndexNode parent = acquireNode(parentAddress);
-			parent.updateKeyForChild(getKey(1), address, key);
-			parent.release();
-		}
-	}
-
-	boolean isInterior() {
-		return (nodeType == InteriorNode);
-	}
-
-	boolean isLeaf() {
-		return (nodeType == LeafNode);
-	}
-
-	boolean isRoot() {
-		return (nodeType == RootNode);
-	}
-
-	/**
-	 * Places the contents of the buffer into the fields.
-	 * Subclasses should implement and call super.
-	 */
-	protected void extractValues(Field f) throws ObjectStoreException {
-		super.extractValues(f);
-		anchorAddress = new ObjectAddress(f.get(AnchorAddress));
-		parentAddress = new ObjectAddress(f.get(ParentAddress));
-		nextAddress = new ObjectAddress(f.get(NextAddress));
-		previousAddress = new ObjectAddress(f.get(PreviousAddress));
-		nodeType = f.getInt(NodeType);
-		numberOfEntries = f.getInt(NumberOfEntries);
-		usedSpace = f.getInt(UsedSpace);
-		usedSpaceMax = f.getInt(UsedSpaceMax);
-		entriesField = new Field(f.get(EntriesField));
-	}
-
-	/**
-	 * Removes a cursor that is registered with this node.
-	 */
-	void removeCursor(IndexCursor cursor) {
-		cursors.remove(cursor);
-	}
-
-	/**
-	 * Removes the descriptor and key/value pair at the entry number given.  This may
-	 * result in the node becoming empty.  The caller will need to take steps to plan for this.
-	 */
-	void removeEntry(int i) throws IndexedStoreException {
-
-		/* remove the (key,value) entry */
-		byte[] key = getKey(i);
-		Field f = getKeyValueField(i);
-		f.clear();
-		usedSpace -= f.length();
-
-		/* remove the descriptor */
-		getDescriptorArray().remove(i);
-		numberOfEntries--;
-
-		/* if the 0th entry was removed, need to update the parent node with the new "low key" */
-		if (i == 0 && !parentAddress.isNull()) {
-			IndexNode parent = acquireNode(parentAddress);
-			if (numberOfEntries > 0) {
-				parent.updateKeyForChild(key, address, getKey(0));
-			} else {
-				parent.removeKeyForChild(address);
-			}
-			parent.release();
-		}
-
-		/* Notify any cursors and the anchor */
-		Object[] cursorArray = cursors.toArray();
-		for (int j = 0; j < cursorArray.length; j++) {
-			IndexCursor cursor = (IndexCursor) cursorArray[j];
-			cursor.entryRemoved(i);
-		}
-		IndexAnchor anchor = acquireAnchor(anchorAddress);
-		anchor.entryRemoved(this);
-		anchor.release();
-		setChanged();
-	}
-
-	/**
-	 * Removes a child node address reference from a non-leaf node.
-	 */
-	private void removeKeyForChild(ObjectAddress childAddress) throws IndexedStoreException {
-		Field childAddressField = new Field(childAddress);
-		int i = 0;
-		while (i < numberOfEntries) {
-			if (getValueField(i).compareTo(childAddressField) == 0)
-				break;
-			i++;
-		}
-		if (i < numberOfEntries)
-			removeEntry(i);
-	}
-
-	private void setNextAddress(ObjectAddress address) {
-		nextAddress = address;
-		setChanged();
-	}
-
-	private void setNodeType(int nodeType) {
-		this.nodeType = nodeType;
-		setChanged();
-	}
-
-	private void setNumberOfEntries(int numberOfEntries) {
-		this.numberOfEntries = numberOfEntries;
-		setChanged();
-	}
-
-	private void setParentAddress(ObjectAddress address) {
-		parentAddress = address;
-		setChanged();
-	}
-
-	private void setPreviousAddress(ObjectAddress address) {
-		previousAddress = address;
-		setChanged();
-	}
-
-	private void setUsedSpace(int usedSpace) {
-		this.usedSpace = usedSpace;
-		setChanged();
-	}
-
-	private void setUsedSpaceMax(int usedSpaceMax) {
-		this.usedSpaceMax = usedSpaceMax;
-		setChanged();
-	}
-
-	/**
-	 * Splits an index node.  This split results in a new "low key" being placed in the parent.  This may
-	 * cause a parent node to split as well.  Splits eventually propagate to the root node, cause it 
-	 * to split and a new root node to be created.
-	 */
-	private ObjectAddress split() throws IndexedStoreException {
-
-		/* Nodes can only be split if there are at least 2 entries */
-		int n = numberOfEntries;
-		if (n < 2) {
-			throw new IndexedStoreException(IndexedStoreException.IndexNodeNotSplit);
-		}
-
-		/* 
-		 If this is a root node, need to make it an interior node and create a new parent root node.
-		 Also need to modify the index anchor to indicate the new root node, and place this node (the old root node) 
-		 into the new root node.  The new root node can always accept its first entry without splitting.
-		 */
-		if (isRoot()) {
-			ObjectAddress newRootNodeAddress = insertObject(new IndexNode(anchorAddress));
-			parentAddress = newRootNodeAddress;
-			nodeType = InteriorNode;
-			IndexNode newRootNode = acquireNode(newRootNodeAddress);
-			newRootNode.insertKeyForChild(address, getLowKey());
-			newRootNode.release();
-			IndexAnchor anchor = acquireAnchor(anchorAddress);
-			anchor.setRootNodeAddress(newRootNodeAddress);
-			anchor.release();
-		}
-
-		/*
-		 Get a new node, fill it with half the entries from this node, then compress this node.  The
-		 new node is created with current parent. However, the node at the current parentAddress may
-		 split when the key is added to it for the new node.  Non-leaf nodes compensate for this
-		 by updating the newNode's parentAddress during the insertion.
-		 */
-		ObjectAddress newNodeAddress = insertObject(new IndexNode(anchorAddress, parentAddress));
-		IndexNode newNode = acquireNode(newNodeAddress);
-		Field f1 = entriesField;
-		Field f2 = newNode.getEntriesField();
-		int k = n / 2;
-		newNode.setUsedSpace(copyEntries(f1, n - k, k, f2));
-		newNode.setUsedSpaceMax(newNode.getUsedSpace());
-		newNode.setNumberOfEntries(k);
-		usedSpace = usedSpace - newNode.getUsedSpace();
-		numberOfEntries = n - k;
-		compress();
-
-		/*
-		 If this was a leaf node, need to set the previous and next pointers of the this node, 
-		 the new node, and the old "next" node.
-		 */
-		if (isLeaf()) {
-			newNode.setNodeType(LeafNode);
-			newNode.setNextAddress(nextAddress);
-			newNode.setPreviousAddress(address);
-			if (!nextAddress.isNull()) {
-				IndexNode nextNode = acquireNode(nextAddress);
-				nextNode.setPreviousAddress(newNodeAddress);
-				nextNode.release();
-			}
-			nextAddress = newNodeAddress;
-		}
-
-		/*
-		 If this is a non-leaf node, need to update the parent addresses of any child nodes
-		 of the new node.  k is the number of entries in the new node.
-		 */
-		if (!isLeaf()) {
-			for (int i = 0; i < k; i++) {
-				ObjectAddress childAddress = new ObjectAddress(newNode.getValue(i));
-				IndexNode childNode = acquireNode(childAddress);
-				childNode.setParentAddress(newNodeAddress);
-				childNode.release();
-			}
-		}
-
-		/*
-		 Need to insert the new node's low key and address into the parent.  This may
-		 result in the parent splitting and having to update the parent address of this node.
-		 */
-		IndexNode parentNode = acquireNode(parentAddress);
-		parentNode.insertKeyForChild(newNodeAddress, newNode.getLowKey());
-		parentNode.release();
-
-		/* Clean up. */
-		newNode.release();
-
-		/* Notify any cursors and the anchor */
-		Object[] cursorArray = cursors.toArray();
-		for (int j = 0; j < cursorArray.length; j++) {
-			IndexCursor cursor = (IndexCursor) cursorArray[j];
-			cursor.nodeSplit();
-		}
-		setChanged();
-		return newNodeAddress;
-	}
-
-	/**
-	 * Unlinks a node from its parent and siblings.  This does not modify the current node, but
-	 * does modify all the nodes and anchors pointing to it.  
-	 */
-	void unlink() throws IndexedStoreException {
-		if (isRoot()) {
-			IndexAnchor anchor = acquireAnchor(anchorAddress);
-			anchor.setRootNodeAddress(ObjectAddress.Null);
-			anchor.release();
-		}
-		if (!parentAddress.isNull()) {
-			IndexNode parent = acquireNode(parentAddress);
-			parent.removeKeyForChild(address);
-			parent.release();
-		}
-		if (!nextAddress.isNull()) {
-			IndexNode next = acquireNode(nextAddress);
-			next.setPreviousAddress(previousAddress);
-			next.release();
-		}
-		if (!previousAddress.isNull()) {
-			IndexNode previous = acquireNode(previousAddress);
-			previous.setNextAddress(nextAddress);
-			previous.release();
-		}
-	}
-
-	/**
-	 * Update the key and value at this entry to a new key and value.  This may result in a node split.
-	 * The caller must be able to recognize that the node has split and compensate for that.
-	 */
-	private void updateEntry(int i, byte[] key, byte[] value) throws IndexedStoreException {
-
-		/*
-		 If the node needs to be split, split it and then attempt the update again.  Note that if
-		 this is a non-leaf node the value is a child address.  Unlike the insert of a key/value
-		 pair, the child is already in the node, thus a split will update its parent address properly
-		 and there is no need to handle that special case.
-		 */
-		Field entries = entriesField;
-		int entriesLength = entries.length();
-		int newKeyValueLength = key.length + value.length;
-		int oldKeyValueLength = getKeyValueField(i).length();
-		int neededSpace = newKeyValueLength - oldKeyValueLength;
-		int freeSpace = entriesLength - ((numberOfEntries * DescriptorLength) + usedSpace);
-		if (freeSpace < neededSpace) {
-			ObjectAddress newNodeAddress = split();
-			if (i >= numberOfEntries) {
-				IndexNode newNode = acquireNode(newNodeAddress);
-				newNode.updateEntry(i - getNumberOfEntries(), key, value);
-				newNode.release();
-			} else {
-				updateEntry(i, key, value);
-			}
-			return;
-		}
-
-		/*
-		 The node has enough free space to do the update.
-		 Remove the old value and key fields from the space.
-		 Clear the space used by the old value.
-		 We can do this just by modifying the descriptor.
-		 */
-		Field keyValueField = getKeyValueField(i);
-		keyValueField.clear();
-		Field descriptor = getDescriptor(i);
-		descriptor.clear();
-		usedSpace -= oldKeyValueLength;
-		compress(newKeyValueLength);
-
-		/* place the value and key fields into the space */
-		Pointer p = entries.pointTo(entriesLength - usedSpaceMax);
-		p.dec(value.length).put(value);
-		p.dec(key.length).put(key);
-		usedSpaceMax += newKeyValueLength;
-		usedSpace += newKeyValueLength;
-
-		/* update the descriptor */
-		descriptor.subfield(0, 2).put(entriesLength - usedSpaceMax);
-		descriptor.subfield(2, 2).put(key.length);
-		descriptor.subfield(4, 2).put(value.length);
-		setChanged();
-	}
-
-	/**
-	 * Sets the key at this entry to a new key.  This may result in a node split.
-	 * The caller must be able to recognize that the node has split and compensate for that if necessary.
-	 */
-	private void updateKeyAt(int i, byte[] key) throws IndexedStoreException {
-		updateEntry(i, key, getValue(i));
-	}
-
-	/**
-	 * Updates the key of an (key,address) entry in a non-leaf node.  The key must still be in order with respect
-	 * to the other keys of the node.
-	 */
-	private void updateKeyForChild(byte[] key, ObjectAddress childAddress, byte[] newKey) throws IndexedStoreException {
-		Field childAddressField = new Field(childAddress.toByteArray());
-		int i = findLastEntryLT(key) + 1;
-		while (i < numberOfEntries) {
-			if (getValueField(i).compareTo(childAddressField) == 0)
-				break;
-			i++;
-		}
-		if (i < numberOfEntries) {
-			updateKeyAt(i, newKey);
-			if (i == 0 && !parentAddress.isNull()) {
-				IndexNode parent = acquireNode(parentAddress);
-				parent.updateKeyForChild(key, address, newKey);
-				parent.release();
-			}
-		}
-	}
-
-	/**
-	 * Sets the value at this entry to a new value.  This may result in a node split.
-	 * The caller must be able to recognize that the node has split and compensate for that.
-	 */
-	void updateValueAt(int i, byte[] value) throws IndexedStoreException {
-		updateEntry(i, getKey(i), value);
-	}
-
-	public String toString() {
-		StringBuffer b = new StringBuffer();
-		if (isLeaf())
-			b.append("LeafNode"); //$NON-NLS-1$
-		if (isRoot())
-			b.append("RootNode"); //$NON-NLS-1$
-		if (isInterior())
-			b.append("InteriorNode"); //$NON-NLS-1$
-		b.append("\n  Address = "); //$NON-NLS-1$
-		b.append(address);
-		b.append("\n  AnchorAddress = "); //$NON-NLS-1$
-		b.append(anchorAddress);
-		b.append("\n  ParentAddress = "); //$NON-NLS-1$
-		b.append(parentAddress);
-		b.append("\n  PreviousAddress = "); //$NON-NLS-1$
-		b.append(previousAddress);
-		b.append("\n  NextAddress = "); //$NON-NLS-1$
-		b.append(nextAddress);
-		b.append("\n  NumberOfEntries = "); //$NON-NLS-1$
-		b.append(numberOfEntries);
-		b.append("\n  UsedSpace = "); //$NON-NLS-1$
-		b.append(usedSpace);
-		b.append("\n  UsedSpaceMax = "); //$NON-NLS-1$
-		b.append(usedSpaceMax);
-		return b.toString();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStore.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStore.java
deleted file mode 100644
index f073bac..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStore.java
+++ /dev/null
@@ -1,389 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.*;
-
-public class IndexedStore {
-
-	private static final int CurrentVersion = 1;
-	private static final int MetadataID = 2;
-	/*
-	 * Provides the storage for the registry of stores. Key is the name the store
-	 * was opened under.  The value is the store itself.  This is used to facilitate
-	 * recovery in the event of a thread being killed or dying.
-	 */
-	private static final Map registry = Collections.synchronizedMap(new HashMap());
-
-	private static final ObjectAddress ContextAddress10 = new ObjectAddress(1, 0);
-	private static final ObjectAddress ContextAddress11 = new ObjectAddress(1, 1);
-
-	private ObjectAddress objectDirectoryAddress; /* initialized at open */
-	private Index objectDirectory; /* initialized at open */
-	private IndexCursor objectDirectoryCursor; /* initialized at open */
-
-	private ObjectAddress indexDirectoryAddress; /* initialized at open */
-	private Index indexDirectory; /* initialized at open */
-	private IndexCursor indexDirectoryCursor; /* initialized at open */
-	private ObjectAddress contextAddress;
-
-	private ObjectStore objectStore; /* initialized at open */
-	private String name; /* initialized at open */
-
-	/**
-	 * Acquires an anchor.
-	 */
-	IndexAnchor acquireAnchor(ObjectAddress address) throws IndexedStoreException {
-		return (IndexAnchor) acquireObject(address);
-	}
-
-	/**
-	 * Acquires a context.  Returns null if the context could not be acquired.
-	 */
-	IndexedStoreContext acquireContext(ObjectAddress address) {
-		try {
-			return (IndexedStoreContext) acquireObject(address);
-		} catch (IndexedStoreException e) {
-			//context couldn't be acquired - return null
-			return null;
-		}
-	}
-
-	/**
-	 * Acquire an index node.
-	 */
-	IndexNode acquireNode(ObjectAddress address) throws IndexedStoreException {
-		return (IndexNode) acquireObject(address);
-	}
-
-	/**
-	 * Acquires an object.
-	 */
-	private StoredObject acquireObject(ObjectAddress address) throws IndexedStoreException {
-		StoredObject object;
-		try {
-			object = objectStore.acquireObject(address);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotAcquired, e);
-		}
-		return object;
-	}
-
-	/**
-	 * Acquires a Binary Object.
-	 */
-	BinarySmallObject acquireBinarySmallObject(ObjectAddress address) throws IndexedStoreException {
-		return (BinarySmallObject) acquireObject(address);
-	}
-
-	/**
-	 * Checks to see if the metadata stored in the object store matches that expected by this
-	 * code.  If not, a conversion is necessary.
-	 */
-	private void checkMetadata() throws IndexedStoreException {
-		Buffer metadata = getMetadataArea(MetadataID);
-		Field versionField = metadata.getField(0, 4);
-		int version = versionField.getInt();
-		if (version == 0) {
-			// 0 indicates that the store is new
-			versionField.put(CurrentVersion);
-			putMetadataArea(MetadataID, metadata);
-			return;
-		}
-		if (version == CurrentVersion)
-			return;
-		convert(version);
-	}
-
-	/**
-	 * Closes the store.  This is required to free the underlying file.
-	 */
-	public synchronized void close() throws IndexedStoreException {
-		if (name == null)
-			return;//already closed
-		try {
-			commit();
-			if (objectDirectoryCursor != null)
-				objectDirectoryCursor.close();
-			if (indexDirectoryCursor != null)
-				indexDirectoryCursor.close();
-		} catch (IndexedStoreException e) {
-			//make sure the file gets closed no matter what
-			try {
-				objectStore.close();
-			} catch (ObjectStoreException e2) {
-				//ignore this and rethrow the underlying exception
-			}
-			throw e;
-		}
-		try {
-			objectStore.close();
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.StoreNotClosed, e);
-		}
-		registry.remove(name);
-		name = null;
-		objectDirectory = null;
-		objectDirectoryAddress = null;
-		objectDirectoryCursor = null;
-		indexDirectory = null;
-		indexDirectoryAddress = null;
-		indexDirectoryCursor = null;
-	}
-
-	public synchronized void commit() throws IndexedStoreException {
-		try {
-			objectStore.commit();
-		} catch (Exception e) {
-			throw new IndexedStoreException(IndexedStoreException.StoreNotCommitted, e);
-		}
-	}
-
-	/**
-	 * Converts the store from a previous to the current version.  
-	 * No conversions are yet defined.
-	 */
-	private void convert(int fromVersion) throws IndexedStoreException {
-		throw new IndexedStoreException(IndexedStoreException.StoreNotConverted);
-	}
-
-	/**
-	 * Creates and initializes an IndexedStore.
-	 */
-	public static synchronized void create(String name) throws IndexedStoreException {
-		ObjectStore store = new ObjectStore(new IndexedStoreObjectPolicy());
-		try {
-			ObjectStore.create(name);
-			store.open(name);
-			ObjectAddress contextAddress = store.insertObject(new IndexedStoreContext());
-			IndexedStoreContext context = (IndexedStoreContext) store.acquireObject(contextAddress);
-			IndexAnchor anchor = new IndexAnchor();
-			ObjectAddress address = store.insertObject(anchor);
-			context.setIndexDirectoryAddress(address);
-			anchor = new IndexAnchor();
-			address = store.insertObject(anchor);
-			context.setObjectDirectoryAddress(address);
-			context.release();
-			store.commit();
-			store.close();
-		} catch (Exception e1) {
-			try {
-				store.close();
-			} catch (ObjectStoreException e2) {
-				//real exception thrown below
-			}
-			ObjectStore.delete(name);
-			throw new IndexedStoreException(IndexedStoreException.StoreNotCreated, e1);
-		}
-	}
-
-	/**
-	 * Creates an Index with the given name.
-	 */
-	public synchronized Index createIndex(String indexName) throws IndexedStoreException {
-		Index index = null;
-		indexDirectoryCursor.find(indexName);
-		if (indexDirectoryCursor.keyMatches(indexName)) {
-			throw new IndexedStoreException(IndexedStoreException.IndexExists);
-		}
-		ObjectAddress address = insertObject(new IndexAnchor());
-		indexDirectory.insert(indexName, address.toByteArray());
-		index = new Index(this, address);
-		return index;
-	}
-
-	/**
-	 * Places a byte array into the store, return a new object identifier.
-	 */
-	public synchronized ObjectID createObject(byte[] b) throws IndexedStoreException {
-		ObjectAddress address = insertObject(new BinarySmallObject(b));
-		ObjectID id = getNextObjectID();
-		objectDirectory.insert(id.toByteArray(), address.toByteArray());
-		return id;
-	}
-
-	/**
-	 * Places a String into the store.
-	 */
-	public synchronized ObjectID createObject(String s) throws IndexedStoreException {
-		return createObject(Convert.toUTF8(s));
-	}
-
-	/**
-	 * Tests to see if the file acting as the store exists.
-	 */
-	public static synchronized boolean exists(String filename) {
-		return ObjectStore.exists(filename);
-	}
-
-	/**
-	 * If a store disappears unexpectedly, make sure it gets closed.
-	 */
-	protected void finalize() {
-		try {
-			close();
-		} catch (Exception e) {
-			//unsafe to throw exceptions from a finalize
-		}
-	}
-
-	/**
-	 * Finds the handle of an open store for a given its name.  The store may continue with the current transaction,
-	 * or may abort the current transaction.  Used to initiate recovery if the reference to the store should be
-	 * lost for some reason.  Will return null if the store has not been opened.  The name of the store to be found
-	 * must compare equal to the name the store was opened under.
-	 */
-	public synchronized static IndexedStore find(String name) {
-		return (IndexedStore) registry.get(name);
-	}
-
-	/**
-	 * Returns an index given its name.
-	 */
-	public synchronized Index getIndex(String indexName) throws IndexedStoreException {
-		Index index;
-		byte[] key = Convert.toUTF8(indexName);
-		indexDirectoryCursor.find(key);
-		if (!indexDirectoryCursor.keyMatches(key))
-			throw new IndexedStoreException(IndexedStoreException.IndexNotFound);
-		ObjectAddress address = indexDirectoryCursor.getValueAsObjectAddress();
-		index = new Index(this, address);
-		return index;
-	}
-
-	private Buffer getMetadataArea(int i) throws IndexedStoreException {
-		try {
-			return objectStore.getMetadataArea(i);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.MetadataRequestError, e);
-		}
-	}
-
-	/**
-	 * Returns the next ObjectID
-	 */
-	private ObjectID getNextObjectID() throws IndexedStoreException {
-		IndexedStoreContext context = acquireContext(contextAddress);
-		if (context == null)
-			throw new IndexedStoreException(IndexedStoreException.ContextNotAvailable);
-		long objectNumber = context.getNextObjectNumber();
-		context.release();
-		return new ObjectID(objectNumber);
-	}
-
-	/**
-	 * Returns a byte array given its object identifier.
-	 */
-	public synchronized byte[] getObject(ObjectID id) throws IndexedStoreException {
-		objectDirectoryCursor.find(id.toByteArray());
-		ObjectAddress address = objectDirectoryCursor.getValueAsObjectAddress();
-		BinarySmallObject object = acquireBinarySmallObject(address);
-		byte[] b = object.getValue();
-		object.release();
-		return b;
-	}
-
-	/**
-	 * Returns an object as a string, truncated at the first null.
-	 */
-	public synchronized String getObjectAsString(ObjectID id) throws IndexedStoreException {
-		String s;
-		s = Convert.fromUTF8(getObject(id));
-		int i = s.indexOf(0);
-		if (i == -1)
-			return s;
-		return s.substring(0, i);
-	}
-
-	/** 
-	 * Inserts a new object into my store.
-	 */
-	ObjectAddress insertObject(StoredObject object) throws IndexedStoreException {
-		try {
-			ObjectAddress address = objectStore.insertObject(object);
-			return address;
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotStored, e);
-		}
-	}
-
-	/**
-	 * Opens the store.
-	 */
-	public synchronized void open(String name) throws IndexedStoreException {
-		if (registry.get(name) != null) {
-			throw new IndexedStoreException(IndexedStoreException.StoreIsOpen);
-		}
-		if (!exists(name))
-			create(name);
-		try {
-			objectStore = new ObjectStore(new IndexedStoreObjectPolicy());
-			objectStore.open(name);
-			// setting the name signals the indexed store as open
-			this.name = name;			
-			checkMetadata();
-			contextAddress = ContextAddress10;
-			IndexedStoreContext context = acquireContext(contextAddress);
-			if (context == null) {
-				contextAddress = ContextAddress11;
-				context = acquireContext(contextAddress);
-			}
-			if (context == null) {
-				throw new IndexedStoreException(IndexedStoreException.StoreFormatError);
-			}
-			indexDirectoryAddress = context.getIndexDirectoryAddress();
-			objectDirectoryAddress = context.getObjectDirectoryAddress();
-			context.release();
-			indexDirectory = new Index(this, indexDirectoryAddress);
-			indexDirectoryCursor = indexDirectory.open();
-			objectDirectory = new Index(this, objectDirectoryAddress);
-			objectDirectoryCursor = objectDirectory.open();
-			registry.put(name, this);
-		} catch (IndexedStoreException e) {
-			throw e;
-		} catch (Exception e) {
-			throw new IndexedStoreException(IndexedStoreException.GenericError, e);
-		}
-	}
-
-	private void putMetadataArea(int i, Buffer b) throws IndexedStoreException {
-		try {
-			objectStore.putMetadataArea(i, b);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.MetadataRequestError, e);
-		}
-	}
-
-	/** 
-	 * Removes an object from my store.
-	 */
-	void removeObject(ObjectAddress address) throws IndexedStoreException {
-		try {
-			objectStore.removeObject(address);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotRemoved, e);
-		}
-	}
-
-	/**
-	 * Removes the object identified by id from the store.
-	 */
-	public synchronized void removeObject(ObjectID id) throws IndexedStoreException {
-		byte[] key = id.toByteArray();
-		objectDirectoryCursor.find(key);
-		if (!objectDirectoryCursor.keyMatches(key)) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotFound);
-		}
-		ObjectAddress address = objectDirectoryCursor.getValueAsObjectAddress();
-		objectDirectoryCursor.remove();
-		removeObject(address);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreContext.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreContext.java
deleted file mode 100644
index 1f887dc..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreContext.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class IndexedStoreContext extends IndexedStoreObject {
-
-	public static final int SIZE = 32;
-	public static final int TYPE = 2;
-
-	/* 
-	 The open number field is no longer used to generate object ids, but may not be deleted since a non-zero 
-	 open number indicates that the object number field has not been initialized.
-	 */
-	private static final int OpenNumberOffset = 2;
-	private static final int OpenNumberLength = 4;
-	private Field openNumberField;
-	private int openNumber;
-
-	private static final int ObjectDirectoryAddressOffset = 6;
-	private static final int ObjectDirectoryAddressLength = 4;
-	private Field objectDirectoryAddressField;
-	private ObjectAddress objectDirectoryAddress;
-
-	private static final int IndexDirectoryAddressOffset = 10;
-	private static final int IndexDirectoryAddressLength = 4;
-	private Field indexDirectoryAddressField;
-	private ObjectAddress indexDirectoryAddress;
-
-	private static final int ObjectNumberOffset = 14;
-	private static final int ObjectNumberLength = 8;
-	private Field objectNumberField;
-	private long objectNumber;
-
-	/** 
-	 * Constructs a new context.
-	 */
-	IndexedStoreContext() {
-		super();
-		indexDirectoryAddress = ObjectAddress.Null;
-		objectDirectoryAddress = ObjectAddress.Null;
-		openNumber = 0;
-		objectNumber = 0;
-	}
-
-	/** 
-	 * Constructs a context from a field read from the store.
-	 */
-	IndexedStoreContext(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		super(f, store, address);
-	}
-
-	/**
-	 * Sets the fields definitions as subfields of a contents field.
-	 */
-	protected void setFields(Field contents) {
-		openNumberField = contents.subfield(OpenNumberOffset, OpenNumberLength);
-		objectDirectoryAddressField = contents.subfield(ObjectDirectoryAddressOffset, ObjectDirectoryAddressLength);
-		indexDirectoryAddressField = contents.subfield(IndexDirectoryAddressOffset, IndexDirectoryAddressLength);
-		objectNumberField = contents.subfield(ObjectNumberOffset, ObjectNumberLength);
-	}
-
-	/**
-	 * Places the contents of the buffer into the fields.
-	 * Subclasses should implement and call super.
-	 */
-	protected void extractValues(Field contents) throws ObjectStoreException {
-		super.extractValues(contents);
-		setFields(contents);
-		openNumber = openNumberField.getInt();
-		objectDirectoryAddress = new ObjectAddress(objectDirectoryAddressField.get());
-		indexDirectoryAddress = new ObjectAddress(indexDirectoryAddressField.get());
-		objectNumber = objectNumberField.getLong();
-		/* here is where we transition to using object numbers -- upward compatible change */
-		if (openNumber > 0) {
-			objectNumber = (long) openNumber << 32;
-			openNumber = 0;
-			setChanged();
-		}
-	}
-
-	/**
-	 * Places the contents of the fields into the buffer.
-	 * Subclasses should implement and call super.
-	 */
-	protected void insertValues(Field contents) {
-		super.insertValues(contents);
-		setFields(contents);
-		openNumberField.put(openNumber);
-		objectDirectoryAddressField.put(objectDirectoryAddress);
-		indexDirectoryAddressField.put(indexDirectoryAddress);
-		objectNumberField.put(objectNumber);
-	}
-
-	/**
-	 * Returns the index directory address from the buffer.
-	 */
-	ObjectAddress getIndexDirectoryAddress() {
-		return indexDirectoryAddress;
-	}
-
-	/**
-	 * Returns the minimum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMinimumSize() {
-		return SIZE;
-	}
-
-	/**
-	 * Returns the object directory address from the buffer.
-	 */
-	ObjectAddress getObjectDirectoryAddress() {
-		return objectDirectoryAddress;
-	}
-
-	/**
-	 * Returns the required type of this class of object.
-	 * Subclasses must override.
-	 */
-	protected int getRequiredType() {
-		return TYPE;
-	}
-
-	/**
-	 * Generates and returns the next object number.  This is essentially the
-	 * count of the number of user-defined objects generated in this store.
-	 */
-	long getNextObjectNumber() {
-		objectNumber++;
-		setChanged();
-		return objectNumber;
-	}
-
-	/**
-	 * Sets the index directory address.
-	 */
-	void setIndexDirectoryAddress(ObjectAddress address) {
-		this.indexDirectoryAddress = address;
-		setChanged();
-	}
-
-	/**
-	 * Sets the object directory address.
-	 */
-	void setObjectDirectoryAddress(ObjectAddress address) {
-		this.objectDirectoryAddress = address;
-		setChanged();
-	}
-
-	/**
-	 * Provides a printable representation of this object.
-	 */
-	public String toString() {
-		StringBuffer b = new StringBuffer();
-		b.append("Context("); //$NON-NLS-1$
-		b.append(objectNumber);
-		b.append(","); //$NON-NLS-1$
-		b.append(indexDirectoryAddress);
-		b.append(","); //$NON-NLS-1$
-		b.append(objectDirectoryAddress);
-		b.append(")"); //$NON-NLS-1$
-		return b.toString();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreException.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreException.java
deleted file mode 100644
index acab8e4..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreException.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-
-
-public class IndexedStoreException extends StoreException {
-
-	public static final int GenericError = 0;
-	public static final int EntryKeyLengthError = 1;
-	public static final int EntryNotRemoved = 2;
-	public static final int EntryValueLengthError = 3;
-	public static final int EntryValueNotUpdated = 4;
-	public static final int IndexNodeNotRetrieved = 5;
-	public static final int IndexNodeNotStored = 6;
-	public static final int IndexNodeNotSplit = 7;
-	public static final int IndexNodeNotCreated = 8;
-	public static final int IndexExists = 9;
-	public static final int IndexNotCreated = 10;
-	public static final int IndexNotFound = 11;
-	public static final int IndexNotRemoved = 12;
-	public static final int ObjectExists = 13;
-	public static final int ObjectNotAcquired = 14;
-	public static final int ObjectNotCreated = 15;
-	public static final int ObjectNotFound = 16;
-	public static final int ObjectNotReleased = 17;
-	public static final int ObjectNotRemoved = 18;
-	public static final int ObjectNotUpdated = 19;
-	public static final int ObjectNotStored = 20;
-	public static final int ObjectTypeError = 21;
-	public static final int StoreEmpty = 22;
-	public static final int StoreFormatError = 23;
-	public static final int StoreNotCreated = 24;
-	public static final int StoreNotOpen = 25;
-	public static final int StoreNotClosed = 26;
-	public static final int StoreNotFlushed = 27;
-	public static final int StoreNotOpened = 28;
-	public static final int StoreNotReadWrite = 29;
-	public static final int ContextNotAvailable = 30;
-	public static final int ObjectIDInvalid = 31;
-	public static final int MetadataRequestError = 32;
-	public static final int EntryRemoved = 33;
-	public static final int StoreNotConverted = 34;
-	public static final int StoreIsOpen = 35;
-	public static final int StoreNotCommitted = 36;
-	public static final int StoreNotRolledBack = 37;
-
-	public static String[] messages = new String[40];
-
-	/**
-	 * All serializable objects should have a stable serialVersionUID
-	 */
-	private static final long serialVersionUID = 1L;
-
-	static {
-		initializeMessages();
-	}
-
-	public int id = GenericError;
-
-	/**
-	 * IndexedStoreException constructor comment.
-	 */
-	public IndexedStoreException(int id) {
-		super(messages[id]);
-		this.id = id;
-	}
-
-	/**
-	 * IndexedStoreException constructor comment.
-	 */
-	public IndexedStoreException(int id, Throwable e) {
-		super(messages[id], e);
-		this.id = id;
-	}
-
-	/**
-	 * Initializes the messages at class load time.
-	 */
-	private static void initializeMessages() {
-		messages[GenericError] = CompatibilityMessages.indexedStore_genericError;
-		messages[EntryKeyLengthError] = CompatibilityMessages.indexedStore_entryKeyLengthError;
-		messages[EntryNotRemoved] = CompatibilityMessages.indexedStore_entryNotRemoved;
-		messages[EntryValueLengthError] = CompatibilityMessages.indexedStore_entryValueLengthError;
-		messages[EntryValueNotUpdated] = CompatibilityMessages.indexedStore_entryValueNotUpdated;
-		messages[IndexNodeNotRetrieved] = CompatibilityMessages.indexedStore_indexNodeNotRetrieved;
-		messages[IndexNodeNotStored] = CompatibilityMessages.indexedStore_indexNodeNotStored;
-		messages[IndexNodeNotSplit] = CompatibilityMessages.indexedStore_indexNodeNotSplit;
-		messages[IndexNodeNotCreated] = CompatibilityMessages.indexedStore_indexNodeNotCreated;
-		messages[IndexExists] = CompatibilityMessages.indexedStore_indexExists;
-		messages[IndexNotCreated] = CompatibilityMessages.indexedStore_indexNotCreated;
-		messages[IndexNotFound] = CompatibilityMessages.indexedStore_indexNotFound;
-		messages[IndexNotRemoved] = CompatibilityMessages.indexedStore_indexNotRemoved;
-		messages[ObjectExists] = CompatibilityMessages.indexedStore_objectExists;
-		messages[ObjectNotAcquired] = CompatibilityMessages.indexedStore_objectNotAcquired;
-		messages[ObjectNotCreated] = CompatibilityMessages.indexedStore_objectNotCreated;
-		messages[ObjectNotFound] = CompatibilityMessages.indexedStore_objectNotFound;
-		messages[ObjectNotReleased] = CompatibilityMessages.indexedStore_objectNotReleased;
-		messages[ObjectNotRemoved] = CompatibilityMessages.indexedStore_objectNotRemoved;
-		messages[ObjectNotUpdated] = CompatibilityMessages.indexedStore_objectNotUpdated;
-		messages[ObjectNotStored] = CompatibilityMessages.indexedStore_objectNotStored;
-		messages[ObjectTypeError] = CompatibilityMessages.indexedStore_objectTypeError;
-		messages[StoreEmpty] = CompatibilityMessages.indexedStore_storeEmpty;
-		messages[StoreFormatError] = CompatibilityMessages.indexedStore_storeFormatError;
-		messages[StoreNotCreated] = CompatibilityMessages.indexedStore_storeNotCreated;
-		messages[StoreNotOpen] = CompatibilityMessages.indexedStore_storeNotOpen;
-		messages[StoreNotClosed] = CompatibilityMessages.indexedStore_storeNotClosed;
-		messages[StoreNotFlushed] = CompatibilityMessages.indexedStore_storeNotFlushed;
-		messages[StoreNotOpened] = CompatibilityMessages.indexedStore_storeNotOpened;
-		messages[StoreNotReadWrite] = CompatibilityMessages.indexedStore_storeNotReadWrite;
-		messages[ContextNotAvailable] = CompatibilityMessages.indexedStore_contextNotAvailable;
-		messages[ObjectIDInvalid] = CompatibilityMessages.indexedStore_objectIDInvalid;
-		messages[MetadataRequestError] = CompatibilityMessages.indexedStore_metadataRequestError;
-		messages[EntryRemoved] = CompatibilityMessages.indexedStore_entryRemoved;
-		messages[StoreNotConverted] = CompatibilityMessages.indexedStore_storeNotConverted;
-		messages[StoreIsOpen] = CompatibilityMessages.indexedStore_storeIsOpen;
-		messages[StoreNotCommitted] = CompatibilityMessages.indexedStore_storeNotCommitted;
-		messages[StoreNotRolledBack] = CompatibilityMessages.indexedStore_storeNotRolledBack;
-	}
-
-	/**
-	 * Creates a printable representation of this exception.
-	 */
-	public String toString() {
-		StringBuffer buffer = new StringBuffer(50);
-		buffer.append("IndexedStoreException:"); //$NON-NLS-1$
-		buffer.append(getMessage());
-		if (wrappedException != null) {
-			buffer.append("\n"); //$NON-NLS-1$
-			buffer.append(wrappedException.toString());
-		}
-		return buffer.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObject.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObject.java
deleted file mode 100644
index fd36623..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObject.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-abstract class IndexedStoreObject extends StoredObject {
-
-	public IndexedStoreObject() {
-		super();
-	}
-
-	/**
-	 * Constructs an object from bytes that came from the store.
-	 * These bytes include the 2 byte type field.
-	 */
-	public IndexedStoreObject(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		super(f, store, address);
-	}
-
-	/**
-	 * Acquires an anchor.
-	 */
-	protected final IndexAnchor acquireAnchor(ObjectAddress address) throws IndexedStoreException {
-		return (IndexAnchor) acquireObject(address);
-	}
-
-	/**
-	 * Acquires a node.
-	 */
-	protected final IndexNode acquireNode(ObjectAddress address) throws IndexedStoreException {
-		return (IndexNode) acquireObject(address);
-	}
-
-	/**
-	 * Acquires an object.
-	 */
-	protected final StoredObject acquireObject(ObjectAddress address) throws IndexedStoreException {
-		StoredObject object;
-		try {
-			object = store.acquireObject(address);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotAcquired, e);
-		}
-		return object;
-	}
-
-	/** 
-	 * Inserts a new object into my store. Subclasses must not override.
-	 */
-	protected final ObjectAddress insertObject(StoredObject object) throws IndexedStoreException {
-		try {
-			ObjectAddress address = store.insertObject(object);
-			return address;
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotStored, e);
-		}
-	}
-
-	/**
-	 * Releases this object.  Subclasses must not override.
-	 */
-	protected final void release() throws IndexedStoreException {
-		try {
-			store.releaseObject(this);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotReleased, e);
-		}
-	}
-
-	/** 
-	 * Removes an object from my store.  Subclasses must not override.
-	 */
-	protected final void removeObject(ObjectAddress address) throws IndexedStoreException {
-		try {
-			store.removeObject(address);
-		} catch (ObjectStoreException e) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectNotRemoved, e);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObjectPolicy.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObjectPolicy.java
deleted file mode 100644
index 88419e2..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/IndexedStoreObjectPolicy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class IndexedStoreObjectPolicy extends AbstractObjectPolicy {
-
-	/**
-	 * Default constructor
-	 */
-	public IndexedStoreObjectPolicy() {
-		super();
-	}
-
-	/**
-	 * Creates an IndexedStoreObject from a field.  The contents of the field are 
-	 * used to create the internal structure of the object.  The field begins with a 
-	 * two byte type code that is used to determine the type of object to create.
-	 */
-	public StoredObject createObject(Field field, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		int offset = StoredObject.TYPE_OFFSET;
-		int length = StoredObject.TYPE_LENGTH;
-		int type = field.subfield(offset, length).getInt();
-		StoredObject object = null;
-		switch (type) {
-			case IndexAnchor.TYPE :
-				object = new IndexAnchor(field, store, address);
-				break;
-			case IndexNode.TYPE :
-				object = new IndexNode(field, store, address);
-				break;
-			case IndexedStoreContext.TYPE :
-				object = new IndexedStoreContext(field, store, address);
-				break;
-			case BinarySmallObject.TYPE :
-				object = new BinarySmallObject(field, store, address);
-				break;
-			default :
-				throw new ObjectStoreException(ObjectStoreException.ObjectTypeFailure);
-		}
-		return object;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Insertable.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Insertable.java
deleted file mode 100644
index cfd0491..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Insertable.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public interface Insertable {
-
-	/**
-	 *Creates a byte array from this object.
-	 */
-	byte[] toByteArray();
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Log.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Log.java
deleted file mode 100644
index 1be3cc3..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Log.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.*;
-
-class Log {
-
-	/**
-	 * Deletes the transaction log from the file system.
-	 */
-	static void delete(String storeName) {
-		new File(name(storeName)).delete();
-	}
-
-	/** 
-	 * Returns true iff the transaction log exists in the file system.
-	 */
-	static boolean exists(String storeName) {
-		return new File(name(storeName)).exists();
-	}
-
-	/**
-	 * Returns the name of the log file, given the store name.
-	 */
-	static String name(String storeName) {
-		return storeName + ".log"; //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogReader.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogReader.java
deleted file mode 100644
index 0f6f54d..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogReader.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Map;
-import java.util.TreeMap;
-
-class LogReader {
-
-	protected FileInputStream in;
-	protected PageStore store;
-	protected byte[] b4;
-	protected byte[] pageBuffer;
-
-	/** 
-	 * Returns the Hashmap of the modified pages.
-	 */
-	public static Map getModifiedPages(PageStore store) throws PageStoreException {
-		LogReader reader = new LogReader(store);
-		Map modifiedPages = null;
-		try {
-			reader.open(store);
-			modifiedPages = reader.getModifiedPages();
-		} finally {
-			reader.close();
-		}
-		return modifiedPages;
-	}
-
-	public LogReader(PageStore store) {
-		this.store = store;
-		this.pageBuffer = new byte[Page.SIZE];
-		this.b4 = new byte[4];
-	}
-
-	/** 
-	 * Open a log for reading.
-	 */
-	protected void open(PageStore pageStore) throws PageStoreException {
-		String name = pageStore.getName();
-		if (!Log.exists(name))
-			return;
-		try {
-			in = new FileInputStream(Log.name(name));
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.LogOpenFailure, e);
-		}
-	}
-
-	/**
-	 * Closes the log.
-	 */
-	protected void close() {
-		try {
-			if (in != null)
-				in.close();
-		} catch (IOException e) {
-			// ignore
-		}
-		in = null;
-	}
-
-	/**
-	 * Returns the Hashmap of modified pages read from the log.
-	 */
-	protected Map getModifiedPages() throws PageStoreException {
-		Map modifiedPages = new TreeMap();
-		if (in == null)
-			return modifiedPages;
-		Field f4 = new Field(b4);
-		readBuffer(b4);
-		int numberOfPages = f4.getInt();
-		int recordSize = 4 + Page.SIZE;
-		if (bytesAvailable() != (numberOfPages * recordSize))
-			return modifiedPages;
-		for (int i = 0; i < numberOfPages; i++) {
-			readBuffer(b4);
-			readBuffer(pageBuffer);
-			int pageNumber = f4.getInt();
-			Page page = store.getPolicy().createPage(pageNumber, pageBuffer, store);
-			Integer key = new Integer(pageNumber);
-			modifiedPages.put(key, page);
-		}
-		return modifiedPages;
-	}
-
-	public void readBuffer(byte[] buffer) throws PageStoreException {
-		try {
-			in.read(buffer);
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.LogReadFailure, e);
-		}
-	}
-
-	protected int bytesAvailable() throws PageStoreException {
-		try {
-			return in.available();
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.LogReadFailure, e);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogWriter.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogWriter.java
deleted file mode 100644
index d1fb243..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/LogWriter.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-class LogWriter {
-
-	protected FileOutputStream out;
-	protected PageStore pageStore;
-
-	/**
-	 * Puts the modified pages to the log file.
-	 */
-	public static void putModifiedPages(PageStore pageStore, Map modifiedPages) throws PageStoreException {
-		LogWriter writer = new LogWriter();
-		try {
-			writer.open(pageStore);
-			writer.putModifiedPages(modifiedPages);
-		} finally {
-			writer.close();
-		}
-	}
-
-	/**
-	 * Opens the log.
-	 */
-	protected void open(PageStore store) throws PageStoreException {
-		this.pageStore = store;
-		try {
-			out = new FileOutputStream(Log.name(store.getName()));
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.LogOpenFailure, e);
-		}
-	}
-
-	/**
-	 * Closes the log.
-	 */
-	protected void close() {
-		try {
-			if (out != null)
-				out.close();
-		} catch (IOException e) {
-			// ignore
-		}
-		out = null;
-	}
-
-	/**
-	 * Puts the modified pages into the log.
-	 */
-	protected void putModifiedPages(Map modifiedPages) throws PageStoreException {
-		Buffer b4 = new Buffer(4);
-		byte[] pageBuffer = new byte[Page.SIZE];
-		int numberOfPages = modifiedPages.size();
-		b4.put(0, 4, numberOfPages);
-		try {
-			write(b4.getByteArray());
-			Iterator pageStream = modifiedPages.values().iterator();
-			while (pageStream.hasNext()) {
-				Page page = (Page) pageStream.next();
-				int pageNumber = page.getPageNumber();
-				b4.put(0, 4, pageNumber);
-				write(b4.getByteArray());
-				page.toBuffer(pageBuffer);
-				write(pageBuffer);
-			}
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.LogWriteFailure, e);
-		}
-	}
-
-	public void write(byte[] buffer) throws IOException {
-		out.write(buffer);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectAddress.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectAddress.java
deleted file mode 100644
index e6b42ec..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectAddress.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class ObjectAddress implements Insertable {
-
-	public static final int Size = 4;
-	public static ObjectAddress Null = new ObjectAddress(0, 0);
-	private static final int PageNumberOffset = 0;
-	private static final int ObjectNumberOffset = 3;
-	private int pageNumber;
-	private int objectNumber;
-
-	/**
-	 * Constructor for an address from a four byte field.
-	 */
-	public ObjectAddress(byte[] b) throws IllegalArgumentException {
-		if (b.length != Size)
-			throw new IllegalArgumentException();
-		Buffer buf = new Buffer(b);
-		pageNumber = buf.getUInt(PageNumberOffset, 3);
-		objectNumber = buf.getUInt(ObjectNumberOffset, 1);
-	}
-
-	/**
-	 * Constructs an address from its constituent page and object numbers.
-	 */
-	public ObjectAddress(int pageNumber, int objectNumber) throws IllegalArgumentException {
-		if (pageNumber == 0 && objectNumber == 0) {
-			this.pageNumber = 0;
-			this.objectNumber = 0;
-			return;
-		}
-		if (pageNumber < 0 || pageNumber > 0xFFFFFF)
-			throw new IllegalArgumentException();
-		if (pageNumber % ObjectStorePage.SIZE == 0)
-			throw new IllegalArgumentException();
-		if (objectNumber < 0 || objectNumber > 0xFF)
-			throw new IllegalArgumentException();
-		this.pageNumber = pageNumber;
-		this.objectNumber = objectNumber;
-	}
-
-	/**
-	 * Returns true if and only if the addresses are equal.
-	 */
-	public boolean equals(Object anObject) {
-		if (!(anObject instanceof ObjectAddress))
-			return false;
-		ObjectAddress address = (ObjectAddress) anObject;
-		if (pageNumber != address.pageNumber)
-			return false;
-		if (objectNumber != address.objectNumber)
-			return false;
-		return true;
-	}
-
-	/**
-	 * Returns the object number from the address.
-	 */
-	public int getObjectNumber() {
-		return objectNumber;
-	}
-
-	/** 
-	 * Returns the page number from the address.
-	 */
-	public int getPageNumber() {
-		return pageNumber;
-	}
-
-	/**
-	 * Returns an int representing the hash code for the address.
-	 */
-	public int hashCode() {
-		return (pageNumber << 8) | objectNumber;
-	}
-
-	/**
-	 * Tests the address for the null address value.
-	 */
-	public boolean isNull() {
-		return (pageNumber == 0 && objectNumber == 0);
-	}
-
-	/**
-	 * Returns a byte array form of the address.
-	 */
-	public byte[] toByteArray() {
-		Buffer buf = new Buffer(Size);
-		buf.put(PageNumberOffset, 3, pageNumber);
-		buf.put(ObjectNumberOffset, 1, objectNumber);
-		return buf.get();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectHeader.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectHeader.java
deleted file mode 100644
index 1167a9e..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectHeader.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class ObjectHeader implements Insertable {
-
-	public static final int SIZE = 4;
-	private static final int HeaderTagValue = 0xFFFF;
-	private static final int HeaderTagOffset = 0;
-	private static final int ObjectLengthOffset = 2;
-	private int objectLength;
-
-	/**
-	 * ObjectHeader constructor comment.
-	 */
-	public ObjectHeader(byte[] buffer) throws ObjectStoreException {
-		if (buffer.length != SIZE)
-			throw new IllegalArgumentException();
-		Buffer buf = new Buffer(buffer);
-		if (buf.getUInt(HeaderTagOffset, 2) != HeaderTagValue) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectHeaderFailure);
-		}
-		this.objectLength = buf.getUInt(ObjectLengthOffset, 2);
-	}
-
-	/**
-	 * ObjectHeader constructor comment.
-	 */
-	public ObjectHeader(int objectLength) {
-		this.objectLength = objectLength;
-	}
-
-	public int getObjectLength() {
-		return objectLength;
-	}
-
-	public byte[] toByteArray() {
-		Buffer buf = new Buffer(SIZE);
-		buf.put(HeaderTagOffset, 2, HeaderTagValue);
-		buf.put(ObjectLengthOffset, 2, objectLength);
-		return buf.get();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectID.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectID.java
deleted file mode 100644
index 18bcc18..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectID.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class ObjectID implements Insertable {
-
-	private static final int Size = 8;
-	private static final int ObjectNumberOffset = 0;
-	private long objectNumber;
-
-	public ObjectID(byte[] b) throws IndexedStoreException {
-		if (b.length != Size) {
-			throw new IndexedStoreException(IndexedStoreException.ObjectIDInvalid);
-		}
-		Buffer buf = new Buffer(b);
-		objectNumber = buf.getLong(ObjectNumberOffset, 8);
-	}
-
-	public ObjectID(long objectNumber) {
-		this.objectNumber = objectNumber;
-	}
-
-	public boolean equals(Object anObject) {
-		if (!(anObject instanceof ObjectID))
-			return false;
-		ObjectID id = (ObjectID) anObject;
-		if (this.objectNumber != id.objectNumber)
-			return false;
-		return true;
-	}
-
-	public int hashCode() {
-		return (int) objectNumber;
-	}
-
-	public byte[] toByteArray() {
-		Buffer buf = new Buffer(Size);
-		buf.put(ObjectNumberOffset, 8, objectNumber);
-		return buf.get();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectPage.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectPage.java
deleted file mode 100644
index c70332c..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectPage.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-/**
- An ObjectPage is a page in a page file that contains objects.  Objects are byte arrays.
- An object page contains metainformation about the objects located on that page as well
- as information about the state of the page.  This information is updated as the page
- has objects placed on it or removed from it.  Objects within a page are identified by
- their object number, which is in the range of 1-255 inclusive.
-
- All pages are numbered.  Space map pages are located at page numbers i*(Page.Size) in 
- the page file.  Object pages are located at all page numbers between space map pages.  
- Thus object pages will never have page numbers that are multiples of the page size.
- */
-
-class ObjectPage extends ObjectStorePage {
-
-	protected static final int MaxEntries = 256;
-	protected static final int ObjectDirectoryOffset = 64;
-	protected static final int ObjectSpaceOffset = ObjectDirectoryOffset + 512;
-	protected static final int FlagOffset = 0;
-	protected static final int UsedSpaceOffset = 2;
-	protected static final int UsedEntriesOffset = 4;
-	protected static final int InitialEntryOffset = 6;
-	protected static final int FreeSpaceOffset = 8;
-
-	public static final int ObjectSpaceSize = SIZE - ObjectSpaceOffset;
-
-	protected int usedSpace;
-	protected int usedEntries;
-	protected int freeSpaceOffset;
-	protected int initialEntry;
-
-	/**
-	 * Creates a new page from a buffer.
-	 */
-	public ObjectPage(int pageNumber, byte[] buffer, PageStore pageStore) {
-		super(pageNumber, buffer, pageStore);
-	}
-
-	/**
-	 * Writes the contents of the page to a buffer.
-	 */
-	public void toBuffer(byte[] buffer) {
-		dematerialize();
-		pageBuffer.copyTo(buffer);
-	}
-
-	/**
-	 * Updates the page fields from its bytes.  This is used when the page has just been mutated from
-	 * a its superclass.
-	 */
-
-	protected void materialize() {
-		int initialized = pageBuffer.getUInt(FlagOffset, 2);
-		if (initialized == 0xEEEE) {
-			usedSpace = pageBuffer.getUInt(UsedSpaceOffset, 2);
-			usedEntries = pageBuffer.getUInt(UsedEntriesOffset, 2);
-			initialEntry = pageBuffer.getUInt(InitialEntryOffset, 2);
-			freeSpaceOffset = pageBuffer.getUInt(FreeSpaceOffset, 2);
-		} else {
-			usedSpace = 0;
-			usedEntries = 0;
-			initialEntry = 0;
-			freeSpaceOffset = ObjectSpaceOffset;
-		}
-	}
-
-	/**
-	 * Writes the object page header and from the header instance variables.  This is used just before
-	 * the page is to be written to the page store.
-	 */
-	protected void dematerialize() {
-		pageBuffer.put(FlagOffset, 2, 0xEEEE);
-		pageBuffer.put(UsedSpaceOffset, 2, usedSpace);
-		pageBuffer.put(UsedEntriesOffset, 2, usedEntries);
-		pageBuffer.put(InitialEntryOffset, 2, initialEntry);
-		pageBuffer.put(FreeSpaceOffset, 2, freeSpaceOffset);
-	}
-
-	/**
-	 * This method returns the Field mapped over the object for a given object number.
-	 */
-	public Field getObjectField(int objectNumber) throws ObjectStoreException {
-		int entryOffset = ObjectDirectoryOffset + 2 * objectNumber;
-		int blockOffset = pageBuffer.getUInt(entryOffset, 2);
-		if (blockOffset == 0)
-			return null;
-		ObjectHeader header = new ObjectHeader(pageBuffer.get(blockOffset, ObjectHeader.SIZE));
-		Field f = pageBuffer.getField(blockOffset + ObjectHeader.SIZE, header.getObjectLength());
-		return f;
-	}
-
-	/**
-	 * Places an object into a page.  The object must have a reservation.
-	 */
-	public void insertObject(StoredObject object) throws ObjectStoreException {
-
-		// ensure that there is space for this object
-		int blockLength = object.length() + ObjectHeader.SIZE;
-		if (getFreeSpace() < blockLength) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectSizeFailure);
-		}
-
-		// make sure the slot is still empty
-		int objectNumber = object.getAddress().getObjectNumber();
-		int entryOffset = ObjectDirectoryOffset + (objectNumber * 2);
-		int blockOffset = pageBuffer.getUInt(entryOffset, 2);
-		if (blockOffset != 0) {
-			throw new ObjectStoreException(ObjectStoreException.PageVacancyFailure);
-		}
-
-		// place the object into the object space portion of the page
-		if (blockLength > (SIZE - freeSpaceOffset))
-			compress(); // compress the space if necessary
-		blockOffset = freeSpaceOffset; // place the object at the beginning of the free space
-		ObjectHeader header = new ObjectHeader(object.length());
-		pageBuffer.put(blockOffset, header);
-		pageBuffer.put(blockOffset + ObjectHeader.SIZE, object.toByteArray());
-		pageBuffer.put(entryOffset, 2, blockOffset);
-		freeSpaceOffset += blockLength; // update where the new free space is
-		usedSpace += blockLength; // indicate that space is used up
-		usedEntries++; // indicate that an entry is used up
-		initialEntry = (objectNumber + 1) % MaxEntries; // set where to begin the next search
-		setChanged();
-		notifyObservers();
-	}
-
-	/**
-	 * Reserves space for an object on the page.  Records the reservation in the
-	 * reservation table.
-	 */
-	public int reserveObject(StoredObject object, ReservationTable reservations) throws ObjectStoreException {
-
-		// ensure that there is space for this object, there should be since we check beforehand
-		int blockLength = object.length() + ObjectHeader.SIZE;
-		if (getFreeSpace() < blockLength) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectSizeFailure);
-		}
-
-		// get the reservation for this page from the table, create a new one if necessary
-		Reservation r = reservations.get(pageNumber);
-		if (r == null) {
-			r = new Reservation(getFreeSpace(), MaxEntries - usedEntries, initialEntry);
-			reservations.put(pageNumber, r);
-		}
-
-		// find an empty slot that is not already reserved
-		int objectNumber = r.getInitialEntry();
-		int blockOffset = 0;
-		int entryOffset = 0;
-		for (int i = 0; i < MaxEntries; i++) {
-			if (!r.contains(objectNumber)) {
-				entryOffset = ObjectDirectoryOffset + (objectNumber * 2);
-				blockOffset = pageBuffer.getUInt(entryOffset, 2);
-				if (blockOffset == 0)
-					break;
-			}
-			objectNumber = (objectNumber + 1) % MaxEntries;
-		}
-		if (blockOffset != 0) {
-			throw new ObjectStoreException(ObjectStoreException.PageVacancyFailure);
-		}
-
-		// begin the next search just after where we left off
-		r.setInitialEntry((objectNumber + 1) % MaxEntries);
-
-		// update the reservation for this page
-		r.add(objectNumber, blockLength);
-		return objectNumber;
-	}
-
-	public void removeObject(int objectNumber) throws ObjectStoreException {
-
-		/* check for existence of the object to be removed */
-		int entryOffset = ObjectDirectoryOffset + 2 * objectNumber;
-		int blockOffset = pageBuffer.getUInt(entryOffset, 2);
-		if (blockOffset == 0)
-			throw new ObjectStoreException(ObjectStoreException.ObjectExistenceFailure);
-
-		/* remove the object */
-		pageBuffer.put(entryOffset, 2, 0); // remove its offset from the object table
-		ObjectHeader h = new ObjectHeader(pageBuffer.get(blockOffset, ObjectHeader.SIZE));
-		int objectLength = h.getObjectLength();
-		int blockLength = objectLength + ObjectHeader.SIZE; // find the length of it in the object space
-		pageBuffer.clear(blockOffset, blockLength); // clear its spot in the object space
-		usedSpace -= blockLength; // space has been freed
-		usedEntries--; // an entry has been freed;
-		setChanged();
-		notifyObservers();
-	}
-
-	/**
-	 * Updates an object value on the page.  An object may not change its size.  
-	 */
-	public void updateObject(StoredObject object) throws ObjectStoreException {
-
-		int objectNumber = object.getAddress().getObjectNumber();
-
-		/* check for existence of the object to be updated */
-		int entryOffset = ObjectDirectoryOffset + 2 * objectNumber;
-		int blockOffset = pageBuffer.getUInt(entryOffset, 2);
-		if (blockOffset == 0) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectExistenceFailure);
-		}
-
-		/* retrieve the header and check the size */
-		ObjectHeader header = new ObjectHeader(pageBuffer.get(blockOffset, ObjectHeader.SIZE));
-		if (header.getObjectLength() != object.length()) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectSizeFailure);
-		}
-
-		/* update in place */
-		int objectOffset = blockOffset + ObjectHeader.SIZE;
-		pageBuffer.put(objectOffset, object.toByteArray());
-		setChanged();
-		notifyObservers();
-	}
-
-	/**
-	 * Compresses the space in the page, putting all the free space at the end of the page.
-	 * This will adjust the free space offset and the offsets of the individual objects.  All
-	 * of the other parameters of the page remain the same.  Resets the number of 
-	 * used entries to fix an old bug.
-	 */
-	private void compress() throws ObjectStoreException {
-		Buffer temp = new Buffer(SIZE);
-		int newBlockOffset = ObjectSpaceOffset;
-		int entryOffset = ObjectDirectoryOffset;
-		usedEntries = 0;
-		for (int i = 0; i < MaxEntries; i++) {
-			int oldBlockOffset = pageBuffer.getUInt(entryOffset, 2);
-			if (oldBlockOffset > 0) {
-				ObjectHeader h = new ObjectHeader(pageBuffer.get(oldBlockOffset, ObjectHeader.SIZE));
-				int blockLength = h.getObjectLength() + ObjectHeader.SIZE;
-				temp.put(newBlockOffset, pageBuffer.get(oldBlockOffset, blockLength));
-				pageBuffer.put(entryOffset, 2, newBlockOffset);
-				newBlockOffset += blockLength;
-				usedEntries++;
-			}
-			entryOffset += 2;
-		}
-		pageBuffer.put(ObjectSpaceOffset, temp.get(ObjectSpaceOffset, SIZE - ObjectSpaceOffset));
-		freeSpaceOffset = newBlockOffset;
-	}
-
-	/**
-	 * Returns the amount of free space on this page.
-	 */
-	public int getFreeSpace() {
-		if (usedEntries >= MaxEntries)
-			return 0;
-		return SIZE - (ObjectSpaceOffset + usedSpace);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStore.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStore.java
deleted file mode 100644
index c9dbbac..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStore.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.*;
-
-public class ObjectStore implements Observer {
-
-	public static final int MAXIMUM_OBJECT_SIZE = ObjectPage.ObjectSpaceSize - ObjectHeader.SIZE;
-	protected static final int CurrentObjectStoreVersion = 1;
-	protected static final int ObjectStoreMetadataAreaID = 1;
-
-	protected PageStore pageStore; /* initialized in open */
-	protected String name; /* initialized in open */
-	protected Map acquiredObjects; // objects which are currently active
-	protected Map modifiedObjects; // objects that have been modified since the last sync point.
-	protected LinkedList cachedObjects; // objects that are just hanging around waiting to be acquired.  Kept for performance.
-	protected Set phantoms; // the set of objects that needs to be deleted since the last sync point.
-	protected ReservationTable reservations;
-
-	protected ObjectStorePagePolicy pagePolicy;
-	protected AbstractObjectPolicy objectPolicy;
-
-	/**
-	 * Creates a repository for the pathname.  
-	 */
-	public static void create(String path) throws ObjectStoreException {
-		try {
-			PageStore.create(path);
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.StoreCreateFailure, e);
-		}
-	}
-
-	/**
-	 * Deletes the underlying page store.
-	 */
-	public static void delete(String path) {
-		PageStore.delete(path);
-	}
-
-	/**
-	 * Checks for existence of an object store file.
-	 */
-	public static boolean exists(String path) {
-		return PageStore.exists(path);
-	}
-
-	/**
-	 * Creates an object store.  This store is unusable until opened.
-	 */
-	public ObjectStore(AbstractObjectPolicy objectPolicy) {
-		this.pagePolicy = new ObjectStorePagePolicy();
-		this.objectPolicy = objectPolicy;
-	}
-
-	/**
-	 * Opens an object store.
-	 */
-	public void open(String name) throws ObjectStoreException {
-		try {
-			pageStore = new PageStore(pagePolicy);
-			pageStore.open(name);
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.StoreOpenFailure, e);
-		}
-		checkMetadata();
-		acquiredObjects = new HashMap();
-		modifiedObjects = new HashMap();
-		cachedObjects = new LinkedList();
-		phantoms = new HashSet();
-		reservations = new ReservationTable();
-	}
-
-	/**
-	 * Closes the object store.
-	 */
-	public void close() throws ObjectStoreException {
-		try {
-			commit();
-		} catch (ObjectStoreException e) {
-			//make sure the page store file gets closed no matter what
-			pageStore.close(false);
-			throw e;
-		}
-		try {
-			pageStore.close();
-		} catch (Exception e) {
-			//ignore failure to close
-		}
-		acquiredObjects = null;
-		modifiedObjects = null;
-		cachedObjects = null;
-		phantoms = null;
-		reservations = null;
-	}
-
-	public Buffer getMetadataArea(int i) throws ObjectStoreException {
-		try {
-			return new Buffer(pageStore.readMetadataArea(i));
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.MetadataRequestFailure, e);
-		}
-	}
-
-	public void putMetadataArea(int i, Buffer buffer) throws ObjectStoreException {
-		try {
-			pageStore.writeMetadataArea(i, buffer.getByteArray());
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.MetadataRequestFailure, e);
-		}
-	}
-
-	/**
-	 * Checks to see if the metadata stored in the object store matches that expected by this
-	 * code.  If not, a conversion is necessary.
-	 */
-	protected void checkMetadata() throws ObjectStoreException {
-		Buffer metadata = getMetadataArea(ObjectStoreMetadataAreaID);
-		Field versionField = metadata.getField(0, 4);
-		int objectStoreVersion = versionField.getInt();
-		if (objectStoreVersion == 0) {
-			// 0 indicates that the store is new and opened for read/write
-			versionField.put(CurrentObjectStoreVersion);
-			putMetadataArea(ObjectStoreMetadataAreaID, metadata);
-			return;
-		}
-		if (objectStoreVersion == CurrentObjectStoreVersion)
-			return;
-		convert(objectStoreVersion);
-	}
-
-	/**
-	 * Converts the object store from a previous to the current version.  
-	 * No conversions are yet defined.
-	 */
-	protected void convert(int fromVersion) throws ObjectStoreException {
-		throw new ObjectStoreException(ObjectStoreException.StoreConversionFailure);
-	}
-
-	/**
-	 * Commits the modified object collection to the underlying page store.
-	 */
-	public void commit() throws ObjectStoreException {
-		for (Iterator z = acquiredObjects.values().iterator(); z.hasNext();) {
-			StoredObject object = (StoredObject) z.next();
-			object.notifyObservers();
-		}
-		for (Iterator z = phantoms.iterator(); z.hasNext();) {
-			ObjectAddress address = (ObjectAddress) z.next();
-			int pageNumber = address.getPageNumber();
-			ObjectPage page = acquireObjectPage(pageNumber);
-			page.removeObject(address.getObjectNumber());
-			updateSpaceMapPage(page.getPageNumber(), page.getFreeSpace());
-			page.release();
-		}
-		phantoms.clear();
-		for (Iterator z = modifiedObjects.values().iterator(); z.hasNext();) {
-			StoredObject object = (StoredObject) z.next();
-			z.remove();
-			addToCache(object);
-			ObjectAddress address = object.getAddress();
-			int pageNumber = address.getPageNumber();
-			ObjectPage page = acquireObjectPage(pageNumber);
-			if (reservations.contains(address)) {
-				page.insertObject(object);
-				updateSpaceMapPage(pageNumber, page.getFreeSpace());
-			} else {
-				page.updateObject(object);
-			}
-			page.release();
-		}
-		reservations.clear();
-		try {
-			pageStore.commit();
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.PageWriteFailure, e);
-		}
-	}
-
-	/**
-	 * Returns the StoredObject at a given address.  This registers the store as an 
-	 * observer of changes to this object.
-	 */
-	public StoredObject acquireObject(ObjectAddress address) throws ObjectStoreException {
-		if (phantoms.contains(address)) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectExistenceFailure);
-		}
-		StoredObject object = (StoredObject) acquiredObjects.get(address);
-		if (object == null) {
-			object = (StoredObject) modifiedObjects.get(address);
-			if (object == null) {
-				object = removeFromCache(address);
-				if (object == null) {
-					int pageNumber = address.getPageNumber();
-					ObjectPage page = acquireObjectPage(pageNumber);
-					try {
-						Field f = page.getObjectField(address.getObjectNumber());
-						if (f == null)
-							throw new ObjectStoreException(ObjectStoreException.ObjectExistenceFailure);
-						object = objectPolicy.createObject(f, this, address);
-					} catch (ObjectStoreException e) {
-						page.release();
-						throw e;
-					}
-					page.release();
-				}
-			}
-			acquiredObjects.put(address, object);
-			object.addObserver(this);
-		}
-		object.addReference();
-		return object;
-	}
-
-	/**
-	 * Releases an object.  If there are no more references and the object is not
-	 * in the modified cache, return the object to 
-	 * the standard cache.  Objects in the standard cache always maintain a 
-	 * reference count of 0.
-	 */
-	public void releaseObject(StoredObject object) throws ObjectStoreException {
-		object.removeReference();
-		if (object.hasReferences())
-			return;
-		object.notifyObservers(); // one last chance to collect changed objects
-		object.deleteObserver(this);
-		acquiredObjects.remove(object.getAddress());
-		addToCache(object);
-	}
-
-	/**
-	 * Updates the store when receiving an object change notification.  Required by
-	 * Observer.  This places the object in the modified objects cache.  This will
-	 * be cleared during commit/rollback processing.  An object may reside simultaneously
-	 * in the modified and acquired object caches.
-	 */
-	public void update(Observable object, Object arg) {
-		StoredObject storedObject = (StoredObject) object;
-		modifiedObjects.put(storedObject.getAddress(), storedObject);
-	}
-
-	/**
-	 * Adds an object to the backing cache.  Objects in this cache are neither in 
-	 * the modified set or the acquired set.
-	 */
-	protected void addToCache(StoredObject object) {
-		synchronized (cachedObjects) {
-			if (acquiredObjects.containsKey(object.getAddress()))
-				return;
-			if (modifiedObjects.containsKey(object.getAddress()))
-				return;
-			cachedObjects.addFirst(object);
-			if (cachedObjects.size() <= 50)
-				return;
-			cachedObjects.removeLast();
-		}
-	}
-
-	/**
-	 * Removes an object from the backing cache given its address.
-	 */
-	protected StoredObject removeFromCache(ObjectAddress address) {
-		synchronized (cachedObjects) {
-			StoredObject object = null;
-			for (Iterator z = cachedObjects.iterator(); z.hasNext();) {
-				StoredObject o = (StoredObject) z.next();
-				if (o.getAddress().equals(address)) {
-					z.remove();
-					object = o;
-					break;
-				}
-			}
-			return object;
-		}
-	}
-
-	/**
-	 * Places an object into the store.  This assigns it an address.  The address
-	 * is returned. The object is not observed until it is acquired.
-	 */
-	//	public ObjectAddress insertObject(StoredObject object) throws ObjectStoreException {
-	//		int bytesNeeded = object.length() + ObjectHeader.SIZE;
-	//		ObjectPage page = acquireObjectPageForSize(bytesNeeded);
-	//		int objectNumber = page.insertObject(object);
-	//		int pageNumber = page.getPageNumber();
-	//		updateSpaceMapPage(page.getPageNumber(), page.getFreeSpace());
-	//		page.release();
-	//		object.setAddress(new ObjectAddress(pageNumber, objectNumber));
-	//		object.setStore(this);
-	//		return object.getAddress();
-	//	}
-	/**
-	 * "Inserts" an object into the store by reserving a place for the 
-	 * object.  This assigns it an address and
-	 * places it in the modified objects map.  A reservation is created that 
-	 * records the address and the amount of space used.  The object is not
-	 * actually added to the underlying store until a commit operation is executed.
-	 */
-	public ObjectAddress insertObject(StoredObject object) throws ObjectStoreException {
-		int bytesNeeded = object.length() + ObjectHeader.SIZE;
-		ObjectPage page = acquireObjectPageForSize(bytesNeeded);
-		int pageNumber = page.getPageNumber();
-		int objectNumber = page.reserveObject(object, reservations);
-		page.release();
-		ObjectAddress address = new ObjectAddress(pageNumber, objectNumber);
-		object.setAddress(address);
-		object.setStore(this);
-		modifiedObjects.put(address, object);
-		return address;
-	}
-
-	/**
-	 * Removes an object from the object store.  In doing so, it must remove it from the cache as well.
-	 */
-	public void removeObject(ObjectAddress address) throws ObjectStoreException {
-		if (phantoms.contains(address)) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectExistenceFailure);
-		}
-		if (acquiredObjects.containsKey(address)) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectIsLocked);
-		}
-		StoredObject object = (StoredObject) modifiedObjects.get(address);
-		boolean inStore = !reservations.contains(address);
-		if (object != null) {
-			reservations.remove(address);
-			modifiedObjects.remove(address);
-		}
-		removeFromCache(address);
-		if (inStore)
-			phantoms.add(address);
-	}
-
-	/**
-	 * Places the object in the modified objects cache and marks it as in use.  The modified objects
-	 * cache is flushed at commit or rollback time.  At that point, the reference to the object
-	 * is dropped.
-	 */
-	//	public void updateObject(StoredObject object) {
-	//		ObjectAddress address = object.getAddress();
-	//		if (modifiedObjects.get(address) == null) {
-	//			modifiedObjects.put(address, object);
-	//			try {
-	//				acquireObject(address);
-	//			} catch (ObjectStoreException e) {
-	//			}
-	//		}
-	//	}
-
-	protected void updateSpaceMapPage(int objectPageNumber, int freeSpace) throws ObjectStoreException {
-		SpaceMapPage p = acquireSpaceMapPage(objectPageNumber);
-		p.setFreeSpace(objectPageNumber, freeSpace);
-		p.release();
-	}
-
-	/** 
-	 * Acquires an object page.  This is a convenience method to translate exceptions.
-	 */
-	protected ObjectPage acquireObjectPage(int pageNumber) throws ObjectStoreException {
-		ObjectPage page;
-		try {
-			page = (ObjectPage) pageStore.acquire(pageNumber);
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.PageReadFailure, e);
-		}
-		return page;
-	}
-
-	/** 
-	 * Looks for the first page that guarantees enough space to meet the criteria.
-	 * This is the "first fit" algorithm and will get slow as the page file grows since
-	 * it is O(n**2).  (Each addition of a new page is preceded by a search of all pages.)
-	 * We reduce the overhead by maintaining SpaceMapPages that tell us how full each page
-	 * is.  A space map page is the first page of a span of 8K pages (64M total).
-	 * Each byte in a space map page indicates the fullness of each page in the span.
-	 * Since databases are expected to be quite small (<200Mb) we might be able to live with
-	 * this simple algorithm.
-	 */
-	protected ObjectPage acquireObjectPageForSize(int bytesNeeded) throws ObjectStoreException {
-		int oPageNumber = 0;
-		int numberOfSpans = ((pageStore.numberOfPages() - 1) / ObjectStorePage.SIZE) + 1;
-		for (int i = 0; i <= numberOfSpans; i++) {
-			try {
-				int sPageNumber = i * ObjectStorePage.SIZE;
-				SpaceMapPage sPage = (SpaceMapPage) pageStore.acquire(sPageNumber);
-				for (int j = 1; j < ObjectStorePage.SIZE; j++) {
-					int n = sPageNumber + j;
-					Reservation r = reservations.get(n);
-					int bytesAvailable = (r == null) ? sPage.getFreeSpace(n) : r.getFreeSpace();
-					if (bytesNeeded <= bytesAvailable) {
-						oPageNumber = n;
-						break;
-					}
-				}
-				sPage.release();
-			} catch (PageStoreException e) {
-				throw new ObjectStoreException(ObjectStoreException.PageReadFailure, e);
-			}
-			if (oPageNumber != 0)
-				break;
-		}
-		if (oPageNumber == 0) {
-			throw new ObjectStoreException(ObjectStoreException.PageReadFailure);
-		}
-		try {
-			ObjectPage oPage = (ObjectPage) pageStore.acquire(oPageNumber);
-			return oPage;
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.PageReadFailure, e);
-		}
-	}
-
-	/** 
-	 * Acquires a space map page.  This is a convenience method to translate exceptions.
-	 */
-	protected SpaceMapPage acquireSpaceMapPage(int objectPageNumber) throws ObjectStoreException {
-		int pageNumber = objectPageNumber & 0xFFFFE000;
-		SpaceMapPage p = null;
-		try {
-			p = (SpaceMapPage) pageStore.acquire(pageNumber);
-		} catch (PageStoreException e) {
-			throw new ObjectStoreException(ObjectStoreException.PageReadFailure, e);
-		}
-		return p;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStoreException.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStoreException.java
deleted file mode 100644
index 588bd14..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStoreException.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-
-public class ObjectStoreException extends StoreException {
-
-	public final static int GenericFailure = 0;
-	public final static int InternalFailure = 1;
-	public final static int StoreCreateFailure = 10;
-	public final static int StoreConversionFailure = 11;
-	public final static int StoreOpenFailure = 12;
-	public final static int StoreCloseFailure = 13;
-	public final static int PageReadFailure = 20;
-	public final static int PageWriteFailure = 21;
-	public final static int PageVacancyFailure = 22;
-	public final static int ObjectTypeFailure = 23;
-	public final static int ObjectSizeFailure = 24;
-	public final static int ObjectExistenceFailure = 25;
-	public final static int ObjectHeaderFailure = 26;
-	public final static int ObjectInsertFailure = 27;
-	public final static int ObjectRemoveFailure = 28;
-	public final static int ObjectUpdateFailure = 29;
-	public final static int ObjectIsLocked = 30;
-	public final static int MetadataRequestFailure = 40;
-
-	public final static String[] message = new String[50];
-
-	/**
-	 * All serializable objects should have a stable serialVersionUID
-	 */
-	private static final long serialVersionUID = 1L;
-
-	static {
-		initializeMessages();
-	}
-
-	public int id = 0; // exception id
-
-	public ObjectStoreException(int id) {
-		this(id, null);
-	}
-
-	public ObjectStoreException(int id, Throwable exception) {
-		super(message[id], exception);
-		this.id = id;
-	}
-
-	/**
-	 * Initializes the messages at class load time.
-	 */
-	private static void initializeMessages() {
-		message[GenericFailure] = CompatibilityMessages.objectStore_genericFailure;
-		message[InternalFailure] = CompatibilityMessages.objectStore_internalFailure;
-		message[StoreCreateFailure] = CompatibilityMessages.objectStore_storeCreateFailure;
-		message[StoreConversionFailure] = CompatibilityMessages.objectStore_storeConversionFailure;
-		message[StoreOpenFailure] = CompatibilityMessages.objectStore_storeOpenFailure;
-		message[StoreCloseFailure] = CompatibilityMessages.objectStore_storeCloseFailure;
-		message[PageReadFailure] = CompatibilityMessages.objectStore_pageReadFailure;
-		message[PageWriteFailure] = CompatibilityMessages.objectStore_pageWriteFailure;
-		message[PageVacancyFailure] = CompatibilityMessages.objectStore_pageVacancyFailure;
-		message[ObjectTypeFailure] = CompatibilityMessages.objectStore_objectTypeFailure;
-		message[ObjectSizeFailure] = CompatibilityMessages.objectStore_objectSizeFailure;
-		message[ObjectExistenceFailure] = CompatibilityMessages.objectStore_objectExistenceFailure;
-		message[ObjectHeaderFailure] = CompatibilityMessages.objectStore_objectHeaderFailure;
-		message[ObjectInsertFailure] = CompatibilityMessages.objectStore_objectInsertFailure;
-		message[ObjectRemoveFailure] = CompatibilityMessages.objectStore_objectRemoveFailure;
-		message[ObjectUpdateFailure] = CompatibilityMessages.objectStore_objectUpdateFailure;
-		message[ObjectIsLocked] = CompatibilityMessages.objectStore_objectIsLocked;
-		message[MetadataRequestFailure] = CompatibilityMessages.objectStore_metadataRequestFailure;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePage.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePage.java
deleted file mode 100644
index 788648e..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePage.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-abstract class ObjectStorePage extends Page {
-
-	public static final int SIZE = 8192;
-
-	public ObjectStorePage(int pageNumber, byte[] buffer, PageStore pageStore) {
-		super(pageNumber, pageStore);
-		pageBuffer = new Buffer(SIZE);
-		pageBuffer.copyFrom(buffer);
-		materialize();
-	}
-	protected abstract void materialize();
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePagePolicy.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePagePolicy.java
deleted file mode 100644
index b4d04f1..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ObjectStorePagePolicy.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-public class ObjectStorePagePolicy extends AbstractPagePolicy {
-
-	/**
-	 * @see AbstractPagePolicy#createPage(int, byte[], PageStore)
-	 */
-	public final Page createPage(int pageNumber, byte[] buffer, PageStore pageStore) {
-		if (pageNumber % Page.SIZE == 0) {
-			return new SpaceMapPage(pageNumber, buffer, pageStore);
-		}
-		return new ObjectPage(pageNumber, buffer, pageStore);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Page.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Page.java
deleted file mode 100644
index cbf052e..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Page.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.Observable;
-
-public abstract class Page extends Observable implements Referable {
-
-	public static final int SIZE = 8192;
-
-	protected int pageNumber;
-	protected int referenceCount;
-	protected Buffer pageBuffer;
-	protected PageStore pageStore;
-
-	/**
-	 * Constructs a new page of the given size.
-	 */
-	public Page(int pageNumber, PageStore pageStore) {
-		this.pageNumber = pageNumber;
-		this.pageStore = pageStore;
-		this.referenceCount = 0;
-	}
-
-	/**
-	 * Adds a reference for this entity to track.
-	 */
-	public int addReference() {
-		referenceCount++;
-		return referenceCount;
-	}
-
-	/**
-	 * Returns the page number of the page.
-	 */
-	public int getPageNumber() {
-		return pageNumber;
-	}
-
-	/**
-	 * Tests for existing references.
-	 */
-	public boolean hasReferences() {
-		return referenceCount > 0;
-	}
-
-	/** 
-	 * Releases a page back to the store.
-	 */
-	public void release() {
-		pageStore.release(this);
-	}
-
-	/**
-	 * Removes a reference.
-	 */
-	public int removeReference() {
-		if (referenceCount > 0)
-			referenceCount--;
-		return referenceCount;
-	}
-
-	/**
-	 * Writes the contents of the page to a buffer.
-	 */
-	public abstract void toBuffer(byte[] buffer);
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStore.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStore.java
deleted file mode 100644
index c27b2f9..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStore.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.*;
-import java.util.*;
-
-public class PageStore implements Observer {
-
-	private static final int NumberOfMetadataAreas = 16; // NEVER change this
-	private static final int SizeOfMetadataArea = 64; // NEVER change this
-	private static final int CurrentPageStoreVersion = 1; // version 1
-	private static final byte[] ZEROES = new byte[1024];
-
-	private String name;
-	private RandomAccessFile file;
-	private int numberOfPages;
-	private int numberOfFileReads;
-	private int numberOfFileWrites;
-	private int numberOfReads;
-	private int numberOfCacheHits;
-	private Map modifiedPages;
-	private Map acquiredPages;
-	private int storeOffset;
-	private AbstractPagePolicy policy;
-	private byte[] pageBuffer;
-	private byte[] metadataBuffer;
-
-	/**
-	 * Creates the page file on the file system.  Creates a file of zero length.
-	 */
-	public static void create(String fileName) throws PageStoreException {
-		try {
-			FileOutputStream out = new FileOutputStream(fileName);
-			out.close();
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.CreateFailure, e);
-		}
-	}
-
-	/**
-	 * Deletes the page file from the file system.
-	 */
-	public static void delete(String fileName) {
-		new File(fileName).delete();
-	}
-
-	/** 
-	 * Returns true if the file exists in the file system.
-	 */
-	public static boolean exists(String fileName) {
-		return new File(fileName).exists();
-	}
-
-	/**
-	 * Creates a new PageStore with a given policy.
-	 */
-	public PageStore(AbstractPagePolicy policy) {
-		this.policy = policy;
-		this.storeOffset = NumberOfMetadataAreas * SizeOfMetadataArea;
-	}
-
-	/** 
-	 * Acquires a new empty page.
-	 */
-	//public Page acquire(IPageFactory pageFactory) throws PageStoreException {
-	//	return acquire(pageFactory, numberOfPages);
-	//}
-	/**
-	 * Returns the page that has the given page number from the page file.
-	 */
-	//public Page acquire(IPageFactory pageFactory, int pageNumber) throws PageStoreException {
-	//	Page p = null;
-	//	numberOfReads++;
-	//	Integer key = new Integer(pageNumber);
-	//	p = (Page)acquiredPages.get(key);
-	//	if (p != null) {
-	//		numberOfCacheHits++;
-	//		addReference(p);
-	//		return p;
-	//	}
-	//	p = (Page)modifiedPages.get(key);
-	//	if (p != null) {
-	//		numberOfCacheHits++;
-	//		addReference(p);
-	//		return p;
-	//	}
-	//	p = readCache.get(pageNumber);
-	//	if (p != null) {
-	//		numberOfCacheHits++;
-	//		addReference(p);
-	//		return p;
-	//	}
-	//	numberOfPages = Math.max(pageNumber + 1, numberOfPages);
-	//	p = pageFactory.create(this, pageNumber);
-	//	getPageFromFile(pageNumber, p);
-	//	addReference(p);
-	//	return p;
-	//}
-	/** 
-	 * Adds a reference to a page.
-	 */
-	//private void addReference(Page page) {
-	//	Integer key = new Integer(page.getPageNumber());
-	//	if (!page.hasReferences()) acquiredPages.put(key, page);
-	//	page.addReference();
-	//}
-	/**
-	 * Opens the PageStore.  The file is created if necessary.
-	 * This will raise an exception if the
-	 * media on which the file is located is read-only 
-	 * or not authorized to the user.
-	 */
-	public void open(String name) throws PageStoreException {
-		this.name = name;
-		pageBuffer = new byte[Page.SIZE];
-		metadataBuffer = new byte[SizeOfMetadataArea];
-		if (!exists(name))
-			create(name);
-		try {
-			this.file = new RandomAccessFile(name, "rw"); //$NON-NLS-1$
-		} catch (IOException e) {
-			throw new PageStoreException(PageStoreException.OpenFailure, e);
-		}
-		checkMetadata();
-		numberOfPages = numberOfPagesInFile();
-		numberOfFileReads = 0;
-		numberOfFileWrites = 0;
-		numberOfReads = 0;
-		numberOfCacheHits = 0;
-		/* apply any outstanding transaction by reading the log file and applying it */
-		modifiedPages = LogReader.getModifiedPages(this);
-		flush();
-		Log.delete(name);
-		/* prepare for normal operation */
-		acquiredPages = new HashMap();
-	}
-
-	/**
-	 * Checks to see if the metadata stored in the page store matches that expected by this
-	 * code.  If not, a conversion is necessary.
-	 */
-	private void checkMetadata() throws PageStoreException {
-		byte[] md = readMetadataArea(0);
-		Buffer metadata = new Buffer(md);
-		Field versionField = metadata.getField(0, 4);
-		int pageStoreVersion = versionField.getInt();
-		if (pageStoreVersion == 0) {
-			versionField.put(CurrentPageStoreVersion);
-			writeMetadataArea(0, md);
-			return;
-		}
-		if (pageStoreVersion == CurrentPageStoreVersion)
-			return;
-		convertPageStore(pageStoreVersion);
-	}
-
-	/**
-	 * Converts the page store file from a previous to the current version.  
-	 * No conversions are yet defined.
-	 */
-	private void convertPageStore(int fromVersion) throws PageStoreException {
-		throw new PageStoreException(PageStoreException.ConversionFailure);
-	}
-
-	/**
-	 * Commits all changes and closes the page store.
-	 */
-	public void close() {
-		close(true);
-	}
-
-	/**
-	 * Closes the page store.
-	 */
-	public void close(boolean commit) {
-		if (commit) {
-			try {
-				commit();
-			} catch (PageStoreException e) {
-				// ignore
-			}
-		}
-		try {
-			file.close();
-		} catch (IOException e) {
-			// ignore
-		}
-		file = null;
-	}
-
-	/**
-	 * Commits all modified pages to the file.
-	 */
-	public void commit() throws PageStoreException {
-		if (modifiedPages.size() == 0)
-			return;
-		LogWriter.putModifiedPages(this, modifiedPages);
-		flush();
-		Log.delete(name);
-	}
-
-	/**
-	 * Writes the modified pages to the page file.
-	 */
-	private void flush() throws PageStoreException {
-		if (modifiedPages.size() == 0)
-			return;
-		Iterator pageStream = modifiedPages.values().iterator();
-		while (pageStream.hasNext()) {
-			Page page = (Page) pageStream.next();
-			writePage(page);
-		}
-		modifiedPages.clear();
-	}
-
-	//public void readFrom(RandomAccessFile file, long offset) throws IOException {
-	//	long n = file.length() - offset;
-	//	if (n <= 0) {
-	//		clear(contents, 0, contents.length);
-	//		return;
-	//	}
-	//	file.seek(offset);
-	//	int m = (int)Math.min((long)contents.length, n);
-	//	file.readFully(contents, 0, m);
-	//	if (m < contents.length) {
-	//		clear(contents, m, contents.length - m);
-	//	}
-	//}
-	//public void writeTo(OutputStream out) throws IOException {
-	//	out.write(contents);
-	//}
-	//public void writeTo(OutputStream out, int offset, int length) throws IOException {
-	//	out.write(contents, offset, length);
-	//}
-	//public void writeTo(RandomAccessFile file, long offset) throws IOException {
-	//	long p = file.length();
-	//	long n = offset - p;
-	//	while (n > 0) {
-	//		int m = (int)Math.min((long)ZEROES.length, n);
-	//		file.seek(p);
-	//		file.write(ZEROES, 0, m);
-	//		p += m;
-	//		n -= m;
-	//	}
-	//	file.seek(offset);
-	//	file.write(contents);
-	//}
-
-	/**
-	 * Opens the PageStore with a cache size of 40.
-	 */
-	//public void open(String name) throws PageStoreException {
-	//	open(name, 40);
-	//}
-	/**
-	 * Opens the PageStore.  The file is created if necessary.
-	 * This will raise an exception if the
-	 * media on which the file is located is read-only 
-	 * or not authorized to the user.
-	 */
-	//public void open(String name, int cacheSize) throws PageStoreException {
-	//	if (!exists(name)) create(name);
-	//	try {
-	//		this.file = new RandomAccessFile(name, "rw");
-	//	} catch (IOException e) {
-	//		throw new PageStoreException(PageStoreException.OpenFailure);
-	//	}
-	//	this.name = name;
-	//	checkMetadata();
-	//	numberOfPages = numberOfPagesInFile();
-	//	numberOfFileReads = 0;
-	//	numberOfFileWrites = 0;
-	//	numberOfReads = 0;
-	//	numberOfWrites = 0;
-	//	numberOfCacheHits = 0;
-	//	/* apply any outstanding transaction by reading the log file and applying it */
-	//	readCache = new PageCache(0);
-	//	modifiedPages = LogReader.getModifiedPages(name);
-	//	flush();
-	//	Log.delete(name);
-	//	/* prepare for normal operation */
-	//	readCache = new PageCache(cacheSize);
-	//	acquiredPages = new HashMap();
-	//}
-	/**
-	 * Acquires the page that has the given page number from the page store.
-	 */
-	public Page acquire(int pageNumber) throws PageStoreException {
-		numberOfReads++;
-		Integer key = new Integer(pageNumber);
-		Page page = (Page) acquiredPages.get(key);
-		if (page == null) {
-			page = (Page) modifiedPages.get(key);
-			if (page == null) {
-				numberOfPages = Math.max(pageNumber + 1, numberOfPages);
-				page = readPage(pageNumber);
-			} else {
-				numberOfCacheHits++;
-			}
-			acquiredPages.put(key, page);
-			page.addObserver(this);
-		} else {
-			numberOfCacheHits++;
-		}
-		page.addReference();
-		return page;
-	}
-
-	/**
-	 * Releases a page and decrements its reference count.
-	 */
-	public void release(Page page) {
-		Integer key = new Integer(page.getPageNumber());
-		page.removeReference();
-		if (page.hasReferences())
-			return;
-		page.deleteObserver(this);
-		acquiredPages.remove(key);
-	}
-
-	/**
-	 * Processes a page update.
-	 */
-	public void update(Observable object, Object arg) {
-		Page page = (Page) object;
-		Integer key = new Integer(page.getPageNumber());
-		modifiedPages.put(key, page);
-	}
-
-	/**
-	 * Returns the file seek offset for a given page number.
-	 */
-	protected long offsetOfPage(int pageNumber) {
-		return (long) (pageNumber * Page.SIZE) + storeOffset;
-	}
-
-	protected Page readPage(int pageNumber) throws PageStoreException {
-		if (!readBuffer(offsetOfPage(pageNumber), pageBuffer)) {
-			throw new PageStoreException(PageStoreException.ReadFailure);
-		}
-		numberOfFileReads++;
-		Page p = policy.createPage(pageNumber, pageBuffer, this);
-		p.addObserver(this);
-		return p;
-	}
-
-	protected void writePage(Page page) throws PageStoreException {
-		page.toBuffer(pageBuffer);
-		long fileOffset = offsetOfPage(page.getPageNumber());
-		if (!writeBuffer(fileOffset, pageBuffer, 0, pageBuffer.length)) {
-			throw new PageStoreException(PageStoreException.WriteFailure);
-		}
-		numberOfFileWrites++;
-	}
-
-	/**
-	 * Returns the file seek offset for a given metadata area
-	 */
-	protected long offsetOfMetadataArea(int i) {
-		return (long) i * SizeOfMetadataArea;
-	}
-
-	public byte[] readMetadataArea(int i) throws PageStoreException {
-		if (!readBuffer(offsetOfMetadataArea(i), metadataBuffer)) {
-			throw new PageStoreException(PageStoreException.MetadataRequestFailure);
-		}
-		return new Buffer(metadataBuffer).get(0, metadataBuffer.length);
-	}
-
-	public void writeMetadataArea(int i, byte[] buffer) throws PageStoreException {
-		if (i < 0 || i >= NumberOfMetadataAreas)
-			throw new PageStoreException(PageStoreException.MetadataRequestFailure);
-		if (buffer.length != SizeOfMetadataArea)
-			throw new PageStoreException(PageStoreException.MetadataRequestFailure);
-		if (!writeBuffer(offsetOfMetadataArea(i), buffer, 0, buffer.length)) {
-			throw new PageStoreException(PageStoreException.MetadataRequestFailure);
-		}
-		return;
-	}
-
-	protected boolean readBuffer(long fileOffset, byte[] buffer) {
-		new Buffer(buffer).clear();
-		long fileLength = getFileLength();
-		if (fileOffset >= fileLength)
-			return true;
-		int bytesToRead = (int) Math.min(buffer.length, (fileLength - fileOffset));
-		try {
-			file.seek(fileOffset);
-			file.readFully(buffer, 0, bytesToRead);
-		} catch (IOException e) {
-			return false;
-		}
-		return true;
-	}
-
-	protected boolean writeBuffer(long fileOffset, byte[] buffer, int offset, int length) {
-		clearFileToOffset(fileOffset);
-		try {
-			file.seek(fileOffset);
-			file.write(buffer, offset, length);
-		} catch (IOException e) {
-			return false;
-		}
-		return true;
-	}
-
-	protected long getFileLength() {
-		long n = 0;
-		try {
-			n = file.length();
-		} catch (IOException e) {
-			return 0;
-		}
-		return n;
-	}
-
-	protected void clearFileToOffset(long fileOffset) {
-		long fileLength = getFileLength();
-		while (fileLength < fileOffset) {
-			int m = (int) Math.min(ZEROES.length, (fileOffset - fileLength));
-			writeBuffer(fileLength, ZEROES, 0, m);
-			fileLength += m;
-		}
-	}
-
-	/**
-	 * Returns the number of pages actually in the underlying file.
-	 */
-	protected int numberOfPagesInFile() {
-		return (int) ((getFileLength() - offsetOfPage(0)) / Page.SIZE);
-	}
-
-	/**
-	 * Returns the name of the page store.
-	 */
-	public String getName() {
-		return name;
-	}
-
-	public AbstractPagePolicy getPolicy() {
-		return policy;
-	}
-
-	/**
-	 * Returns the number of pages known about in the PageFile.  This can be greater than
-	 * the number of pages actually in the underlying file in the file system if new ones
-	 * have been manufactured and not yet written to the underlying file.
-	 */
-	public int numberOfPages() {
-		return numberOfPages;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStoreException.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStoreException.java
deleted file mode 100644
index bfe9358..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/PageStoreException.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-
-
-public class PageStoreException extends StoreException {
-	public final static int GenericFailure = 0;
-	public final static int CreateFailure = 1;
-	public final static int OpenFailure = 2;
-	public final static int LengthFailure = 3;
-	public final static int WriteFailure = 4;
-	public final static int ReadFailure = 5;
-	public final static int CommitFailure = 6;
-	public final static int IntegrityFailure = 7;
-	public final static int MetadataRequestFailure = 8;
-	public final static int ConversionFailure = 9;
-
-	public final static int LogCreateFailure = 20;
-	public final static int LogOpenFailure = 21;
-	public final static int LogReadFailure = 23;
-	public final static int LogWriteFailure = 24;
-
-	public final static String[] message = new String[30];
-
-	/**
-	 * All serializable objects should have a stable serialVersionUID
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	static {
-		initializeMessages();
-	}
-
-	public int id = 0; // exception id
-
-	public PageStoreException(int id) {
-		this(id, null);
-	}
-
-	public PageStoreException(int id, Throwable exception) {
-		super(message[id], exception);
-		this.id = id;
-	}
-
-	/**
-	 * Initialize the messages at class load time.
-	 */
-	private static void initializeMessages() {
-		message[GenericFailure] = CompatibilityMessages.pageStore_genericFailure;
-		message[CreateFailure] = CompatibilityMessages.pageStore_createFailure;
-		message[OpenFailure] = CompatibilityMessages.pageStore_openFailure;
-		message[LengthFailure] = CompatibilityMessages.pageStore_lengthFailure;
-		message[WriteFailure] = CompatibilityMessages.pageStore_writeFailure;
-		message[ReadFailure] = CompatibilityMessages.pageStore_readFailure;
-		message[CommitFailure] = CompatibilityMessages.pageStore_commitFailure;
-		message[IntegrityFailure] = CompatibilityMessages.pageStore_integrityFailure;
-		message[MetadataRequestFailure] = CompatibilityMessages.pageStore_metadataRequestFailure;
-		message[ConversionFailure] = CompatibilityMessages.pageStore_conversionFailure;
-		message[LogCreateFailure] = CompatibilityMessages.pageStore_logCreateFailure;
-		message[LogOpenFailure] = CompatibilityMessages.pageStore_logOpenFailure;
-		message[LogReadFailure] = CompatibilityMessages.pageStore_logReadFailure;
-		message[LogWriteFailure] = CompatibilityMessages.pageStore_logWriteFailure;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Pointer.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Pointer.java
deleted file mode 100644
index 0b4d0a0..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Pointer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class Pointer {
-	protected Buffer buffer; // contents
-	protected int offset; // offset of the field within the buffer
-
-	/**
-	 * Constructor for a new Pointer.
-	 */
-	public Pointer(Buffer buffer, int offset) {
-		this.buffer = buffer;
-		this.offset = offset;
-	}
-
-	public Pointer dec(int n) {
-		offset -= n;
-		return this;
-	}
-
-	public FieldArray getArray(int length, int stride, int count) {
-		return new FieldArray(buffer, offset, length, stride, count);
-	}
-
-	public Field getField(int offset, int length) {
-		return new Field(buffer, this.offset + offset, length);
-	}
-
-	public Pointer inc(int n) {
-		offset += n;
-		return this;
-	}
-
-	public Pointer put(byte[] bytes) {
-		buffer.put(offset, bytes);
-		return this;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Referable.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Referable.java
deleted file mode 100644
index efc0298..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Referable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-interface Referable {
-
-	/**
-	 * Adds a reference for this entity to track. Returns the current count.
-	 */
-	int addReference();
-
-	/**
-	 * Tests for existing references.
-	 */
-	boolean hasReferences();
-
-	/**
-	 * Removes a reference.  Returns the current count.
-	 */
-	int removeReference();
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Reservation.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Reservation.java
deleted file mode 100644
index 4d6acc2..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/Reservation.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class Reservation {
-
-	protected int freeSlots = 0;
-	protected int freeSpace = 0;
-	protected int reservedSpace = 0;
-	protected int initialEntry = 0;
-	protected Map reservedItems = new HashMap();
-
-	public Reservation(int freeSpace, int freeSlots, int initialEntry) {
-		this.freeSlots = freeSlots;
-		this.freeSpace = freeSpace;
-		this.initialEntry = initialEntry;
-	}
-
-	public void add(int slot, int bytes) {
-		reservedSpace += bytes;
-		reservedItems.put(new Integer(slot), new Integer(bytes));
-	}
-
-	public void remove(int slot) {
-		Integer bytes = (Integer) reservedItems.remove(new Integer(slot));
-		if (bytes == null)
-			return;
-		reservedSpace -= bytes.intValue();
-	}
-
-	boolean contains(int slot) {
-		return reservedItems.containsKey(new Integer(slot));
-	}
-
-	int getFreeSpace() {
-		if (reservedItems.size() >= freeSlots)
-			return 0;
-		return Math.max(0, freeSpace - reservedSpace);
-	}
-
-	public int getInitialEntry() {
-		return initialEntry;
-	}
-
-	public void setInitialEntry(int n) {
-		initialEntry = n;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ReservationTable.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ReservationTable.java
deleted file mode 100644
index 60f5b48..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/ReservationTable.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class ReservationTable {
-
-	protected Map table = new HashMap();
-
-	public ReservationTable() {
-		super();
-	}
-
-	public Reservation get(int pageNumber) {
-		return (Reservation) table.get(new Integer(pageNumber));
-	}
-
-	public void put(int pageNumber, Reservation r) {
-		table.put(new Integer(pageNumber), r);
-	}
-
-	public boolean contains(int pageNumber) {
-		return table.containsKey(new Integer(pageNumber));
-	}
-
-	public boolean contains(ObjectAddress address) {
-		int pageNumber = address.getPageNumber();
-		int objectNumber = address.getObjectNumber();
-		if (contains(pageNumber)) {
-			if (get(pageNumber).contains(objectNumber))
-				return true;
-		}
-		return false;
-	}
-
-	public void remove(ObjectAddress address) {
-		int pageNumber = address.getPageNumber();
-		int objectNumber = address.getObjectNumber();
-		Reservation r = (Reservation) table.get(new Integer(pageNumber));
-		if (r == null)
-			return;
-		r.remove(objectNumber);
-	}
-
-	public void clear() {
-		table.clear();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/SpaceMapPage.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/SpaceMapPage.java
deleted file mode 100644
index b25c6c2..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/SpaceMapPage.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-class SpaceMapPage extends ObjectStorePage {
-	private static int[] SpaceClassSize = {7616, 6906, 6196, 5486, 4776, 4066, 3356, 2646, 1936, 1226, 516, 258, 129, 64, 32, 0};
-
-	/**
-	 * Returns the guaranteed amount of free space available for a given space class.
-	 */
-	public static int freeSpaceForClass(int spaceClass) {
-		return SpaceClassSize[spaceClass];
-	}
-
-	/**
-	 * Creates a new page from a buffer.
-	 */
-	public SpaceMapPage(int pageNumber, byte[] buffer, PageStore pageStore) {
-		super(pageNumber, buffer, pageStore);
-	}
-
-	/**
-	 * Writes the contents of the page to a buffer.
-	 */
-	public void toBuffer(byte[] buffer) {
-		int n = Math.min(buffer.length, pageBuffer.length());
-		System.arraycopy(pageBuffer.getByteArray(), 0, buffer, 0, n);
-	}
-
-	/**
-	 * Searches a space map page in the page file for an object page
-	 * that has at least "bytesNeeded" bytes free.  Returns 0 if there is no
-	 * object page in this space map page that meets this criteria.  0 is not a valid
-	 * object page number.  All page numbers that are 0 mod 8192 are space map pages.
-	 */
-	//	public int findObjectPageNumberForSize(int bytesNeeded) {
-	//		for (int i = 1; i < SIZE; i++) {		// begin at 1, 0 is the space map page
-	//			int spaceClass = pageBuffer.getByte(i);
-	//			int freeSpace = freeSpaceForClass(spaceClass);
-	//			if (freeSpace >= bytesNeeded) return pageNumber + i;
-	//		}
-	//		return 0;
-	//	}
-	/**
-	 * Returns the guaranteed amount of free space on a page.
-	 * If the page number is a space map page number, 0 is returned.
-	 */
-	public int getFreeSpace(int pageNumber) {
-		int slot = pageNumber - this.pageNumber;
-		if (slot < 1 || slot >= SIZE)
-			return 0;
-		int spaceClass = pageBuffer.getByte(slot);
-		int freeSpace = freeSpaceForClass(spaceClass);
-		return freeSpace;
-	}
-
-	/**
-	 * Sets the spaceClass for a given object page.
-	 */
-	public void setFreeSpace(int pageNumber, int freeSpace) {
-		int slot = pageNumber - this.pageNumber;
-		if (slot < 1 || slot >= SIZE)
-			return;
-		byte spaceClass = 0;
-		while (SpaceClassSize[spaceClass] > freeSpace)
-			spaceClass++;
-		pageBuffer.put(slot, spaceClass);
-		setChanged();
-		notifyObservers();
-	}
-
-	protected void materialize() {
-		// do nothing
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoreException.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoreException.java
deleted file mode 100644
index f753996..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoreException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-public abstract class StoreException extends Exception {
-	private static final long serialVersionUID = -6565251688819493750L;
-	protected Throwable wrappedException;
-
-	public StoreException(String message) {
-		super(message);
-	}
-
-	public StoreException(String message, Throwable wrappedException) {
-		super(message);
-		this.wrappedException = wrappedException;
-	}
-
-	/**
-	 * Prints a stack trace out for the exception.
-	 */
-	public void printStackTrace() {
-		printStackTrace(System.err);
-	}
-
-	/**
-	 * Prints a stack trace out for the exception.
-	 */
-	public void printStackTrace(PrintStream output) {
-		synchronized (output) {
-			super.printStackTrace(output);
-			if (wrappedException != null)
-				wrappedException.printStackTrace(output);
-		}
-	}
-
-	/**
-	 * Prints a stack trace out for the exception.
-	 */
-	public void printStackTrace(PrintWriter output) {
-		synchronized (output) {
-			super.printStackTrace(output);
-			if (wrappedException != null)
-				wrappedException.printStackTrace(output);
-		}
-	}
-
-}
-
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoredObject.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoredObject.java
deleted file mode 100644
index 3197ebb..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/indexing/StoredObject.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.indexing;
-
-import java.util.Observable;
-
-public abstract class StoredObject extends Observable implements Referable, Insertable {
-
-	public static final int MAXIMUM_OBJECT_SIZE = ObjectStore.MAXIMUM_OBJECT_SIZE;
-	public static final int TYPE_OFFSET = 0;
-	public static final int TYPE_LENGTH = 2;
-
-	protected ObjectStore store;
-	protected ObjectAddress address;
-	protected int referenceCount;
-	protected int type;
-
-	/** 
-	 * Constructs a new object so that it can be stored.
-	 */
-	protected StoredObject() {
-		type = getRequiredType();
-	}
-
-	/** 
-	 * Constructs a new instance from a field.
-	 */
-	protected StoredObject(Field f, ObjectStore store, ObjectAddress address) throws ObjectStoreException {
-		if (f.length() < getMinimumSize()) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectSizeFailure);
-		}
-		if (f.length() > getMaximumSize()) {
-			throw new ObjectStoreException(ObjectStoreException.ObjectSizeFailure);
-		}
-		extractValues(f);
-		setStore(store);
-		setAddress(address);
-	}
-
-	/** 
-	 * Provides a printable representation of this object.  Subclasses must implement.
-	 */
-	public abstract String toString();
-
-	/**
-	 * Returns the required type of this class of object.
-	 * Subclasses must override.
-	 */
-	protected abstract int getRequiredType();
-
-	/**
-	 * Returns a byte array value of the object.
-	 */
-	public final byte[] toByteArray() {
-		Field f = new Field(length());
-		insertValues(f);
-		return f.get();
-	}
-
-	/**
-	 * Adds a reference.
-	 */
-	public final int addReference() {
-		referenceCount++;
-		return referenceCount;
-	}
-
-	/**
-	 * Removes a reference.
-	 */
-	public final int removeReference() {
-		if (referenceCount > 0)
-			referenceCount--;
-		return referenceCount;
-	}
-
-	/**
-	 * Tests for existing references.
-	 */
-	public final boolean hasReferences() {
-		return referenceCount > 0;
-	}
-
-	/**
-	 * Returns the address of the object.
-	 * Subclasses must not override.
-	 */
-	public final ObjectAddress getAddress() {
-		return address;
-	}
-
-	public final void setStore(ObjectStore store) {
-		this.store = store;
-	}
-
-	public final void setAddress(ObjectAddress address) {
-		this.address = address;
-	}
-
-	/**
-	 * Places the contents of the buffer into the members.
-	 * Subclasses should implement and call super.
-	 */
-	protected void extractValues(Field f) throws ObjectStoreException {
-		type = f.subfield(TYPE_OFFSET, TYPE_LENGTH).getInt();
-		if (type != getRequiredType())
-			throw new ObjectStoreException(ObjectStoreException.ObjectTypeFailure);
-	}
-
-	/**
-	 * Places the contents of the fields into the buffer.
-	 * Subclasses should implement and call super.
-	 */
-	protected void insertValues(Field f) {
-		f.subfield(TYPE_OFFSET, TYPE_LENGTH).put(type);
-	}
-
-	/**
-	 * Returns the maximum size of this object's instance -- including its type field.
-	 * Subclasses can override.  The default is to have the this be equal to the minimum
-	 * size, forcing a fixed size object.
-	 */
-	protected int getMaximumSize() {
-		return getMinimumSize();
-	}
-
-	/**
-	 * Returns the minimum size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int getMinimumSize() {
-		return 2;
-	}
-
-	/**
-	 * Returns the actual size of this object's instance -- including its type field.
-	 * Subclasses should override.
-	 */
-	protected int length() {
-		return getMinimumSize();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStore.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStore.java
deleted file mode 100644
index f57ac04..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStore.java
+++ /dev/null
@@ -1,609 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.localstore;
-
-import java.io.InputStream;
-import java.util.*;
-import org.eclipse.core.filesystem.*;
-import org.eclipse.core.internal.indexing.*;
-import org.eclipse.core.internal.properties.IndexedStoreWrapper;
-import org.eclipse.core.internal.resources.*;
-import org.eclipse.core.internal.utils.*;
-import org.eclipse.core.internal.utils.Convert;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-public class HistoryStore implements IHistoryStore {
-	/* package */final static String INDEX_FILE = ".index"; //$NON-NLS-1$
-	protected BlobStore blobStore;
-	Set blobsToRemove = new HashSet();
-	IndexedStoreWrapper store;
-
-	protected Workspace workspace;
-
-	public HistoryStore(Workspace workspace, IPath location, int limit) {
-		this.workspace = workspace;
-		this.blobStore = new BlobStore(EFS.getLocalFileSystem().getStore(location), limit);
-		this.store = new IndexedStoreWrapper(location.append(INDEX_FILE));
-	}
-
-	/**
-	 * Searches indexed store for key, and invokes visitor's defined behaviour on key matches.
-	 *
-	 * @param key key prefix on which to perform search.  This is assumed to be
-	 *      a path only unless the flag includeLastModTime is true.
-	 * @param visitOnPartialMatch indicates whether visitor's defined behavior is to be invoked
-	 *		on partial or full key matches.  Partial key matches are not supported on keys which
-	 *      contain a last modified time.
-	 * @param includeLastModTime indicates if the key includes a last modified
-	 *      time.  If set to false, the key is assumed to have only a path.
-	 */
-	protected void accept(byte[] key, IHistoryStoreVisitor visitor, boolean visitOnPartialMatch, boolean includeLastModTime) {
-		try {
-			IndexCursor cursor = store.getCursor();
-			cursor.find(key);
-			// Check for a prefix match.
-			while (cursor.keyMatches(key)) {
-				byte[] storedKey = cursor.getKey();
-
-				int bytesToOmit = includeLastModTime ? ILocalStoreConstants.SIZE_COUNTER : ILocalStoreConstants.SIZE_KEY_SUFFIX;
-				// visit if we have an exact match
-				if (storedKey.length - bytesToOmit == key.length) {
-					HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor);
-					if (!visitor.visit(storedEntry))
-						break;
-					cursor.next();
-					continue;
-				}
-
-				// return if we aren't checking partial matches
-				if (!visitOnPartialMatch) {
-					cursor.next();
-					continue;
-				}
-
-				// if the last character of the key is a path
-				// separator or if the next character in the match
-				// is a path separator then visit since it is a child
-				// based on path segment matching.
-				byte b = storedKey[key.length];
-				if (key[key.length - 1] == 47 || b == 47) {
-					HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor);
-					if (!visitor.visit(storedEntry))
-						break;
-				}
-				cursor.next();
-			}
-			cursor.close();
-		} catch (Exception e) {
-			String message = CompatibilityMessages.history_problemsAccessing;
-			Policy.log(new ResourceStatus(IResourceStatus.FAILED_READ_LOCAL, null, message, e));
-		}
-	}
-
-	protected void accept(IPath path, IHistoryStoreVisitor visitor, boolean visitOnPartialMatch) {
-		accept(Convert.toUTF8(path.toString()), visitor, visitOnPartialMatch, false);
-	}
-
-	/**
-	 * @see IHistoryStore#addState(IPath, IFileStore, IFileInfo, boolean)
-	 */
-	public IFileState addState(IPath key, IFileStore localFile, IFileInfo info, boolean moveContents) {
-		long lastModified = info.getLastModified();
-		if (Policy.DEBUG_HISTORY)
-			System.out.println("History: Adding state for key: " + key + ", file: " + localFile + ", timestamp: " + lastModified + ", size: " + localFile.fetchInfo().getLength()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		if (!isValid(localFile))
-			return null;
-		UniversalUniqueIdentifier uuid = null;
-		try {
-			uuid = blobStore.addBlob(localFile, moveContents);
-			addState(key, uuid, lastModified);
-			store.commit();
-		} catch (CoreException e) {
-			Policy.log(e);
-		}
-		return new FileState(this, key, lastModified, uuid);
-	}
-
-	/**
-	 * Adds state into history log.
-	 *
-	 * @param path Full workspace path to the resource being logged.
-	 * @param uuid UUID for stored file contents.
-	 * @param lastModified Timestamp for resource being logged.
-	 */
-	protected void addState(IPath path, UniversalUniqueIdentifier uuid, long lastModified) {
-		// Determine how many states already exist for this path and timestamp.
-		class BitVisitor implements IHistoryStoreVisitor {
-			BitSet bits = new BitSet();
-
-			public byte useNextClearBit(byte[] key) {
-				// Don't use an empty slot as this will put this state
-				// out of order relative to the other states with the same 
-				// path and last modified time.  So find the first clear bit
-				// after the last set bit.
-				int nextBit = bits.length();
-				// This value must fit in a byte.  If we are running off the
-				// end of the byte, check to see if there are any empty bits
-				// in the middle.  If so, reorganize the counters so we maintain
-				// the ordering of the states but use up the least number
-				// of bits (i.e., de-fragment the bit set).
-				if (nextBit > Byte.MAX_VALUE) {
-					if (bits.cardinality() < Byte.MAX_VALUE) {
-						// We know we have some clear bits.
-						try {
-							IndexCursor cursor = store.getCursor();
-							// destCount will always be the count value of the 
-							// next key we want to assign a state to
-							byte destCount = (byte) bits.nextClearBit(0);
-							if (destCount < 0)
-								// There are no clear bits
-								return (byte) -1;
-							// sourceCount will always be the count value of the
-							// next key we want to move to destCount.  When
-							// sourceCount is -1, there are no more source states
-							// to move so we are done.
-							byte sourceCount = (byte) bits.nextSetBit(destCount);
-							if (sourceCount < 0)
-								// There are no more states to move
-								return destCount;
-							byte[] completeKey = new byte[key.length + 1];
-							System.arraycopy(key, 0, completeKey, 0, key.length);
-							for (; sourceCount >= 0 && destCount >= 0; destCount++) {
-								completeKey[completeKey.length - 1] = sourceCount;
-								cursor.find(completeKey);
-								if (cursor.keyMatches(completeKey)) {
-									HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor);
-									HistoryStoreEntry entryToInsert = new HistoryStoreEntry(storedEntry.getPath(), storedEntry.getUUID(), storedEntry.getLastModified(), destCount);
-									remove(storedEntry);
-									ObjectID valueID = store.createObject(entryToInsert.valueToBytes());
-									store.getIndex().insert(entryToInsert.getKey(), valueID);
-									sourceCount = (byte) bits.nextSetBit(sourceCount + 1);
-								}
-							}
-							cursor.close();
-							return destCount;
-						} catch (Exception e) {
-							String message = CompatibilityMessages.history_problemsAccessing;
-							Policy.log(new ResourceStatus(IResourceStatus.FAILED_READ_LOCAL, null, message, e));
-						}
-					} else {
-						// Every count is being used.  Too many states.
-						return (byte) -1;
-					}
-				}
-				return (byte) nextBit;
-			}
-
-			public boolean visit(HistoryStoreEntry entry) {
-				bits.set(entry.getCount());
-				return true;
-			}
-		}
-
-		// Build partial key for which matches will be found.
-		byte[] keyPrefix = HistoryStoreEntry.keyPrefixToBytes(path, lastModified);
-		BitVisitor visitor = new BitVisitor();
-		accept(keyPrefix, visitor, false, true);
-		byte index = visitor.useNextClearBit(keyPrefix);
-		try {
-			if (index < 0) {
-				String message = NLS.bind(CompatibilityMessages.history_tooManySimUpdates, path, new Date(lastModified));
-				Policy.log(new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, path, message, null));
-				return;
-			}
-			HistoryStoreEntry entryToInsert = new HistoryStoreEntry(path, uuid, lastModified, index);
-			// valueToBytes just converts the uuid to byte form
-			ObjectID valueID = store.createObject(entryToInsert.valueToBytes());
-			store.getIndex().insert(entryToInsert.getKey(), valueID);
-		} catch (Exception e) {
-			resetIndexedStore();
-			String message = NLS.bind(CompatibilityMessages.history_couldNotAdd, path);
-			Policy.log(new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, path, message, e));
-		}
-	}
-
-	/**
-	 * @see IHistoryStore#allFiles(IPath, int, IProgressMonitor)
-	 */
-	public Set allFiles(IPath path, final int depth, IProgressMonitor monitor) {
-		final Set allFiles = new HashSet();
-		final int pathLength = path.segmentCount();
-		class PathCollector implements IHistoryStoreVisitor {
-			public boolean visit(HistoryStoreEntry state) {
-				IPath memberPath = state.getPath();
-				boolean withinDepthRange = false;
-				switch (depth) {
-					case IResource.DEPTH_ZERO :
-						withinDepthRange = memberPath.segmentCount() == pathLength;
-						break;
-					case IResource.DEPTH_ONE :
-						withinDepthRange = memberPath.segmentCount() <= pathLength + 1;
-						break;
-					case IResource.DEPTH_INFINITE :
-						withinDepthRange = true;
-						break;
-				}
-				if (withinDepthRange) {
-					allFiles.add(memberPath);
-				}
-				// traverse children as long as we're still within depth range
-				return withinDepthRange;
-			}
-		}
-		accept(path, new PathCollector(), true);
-		return allFiles;
-	}
-
-	/**
-	 * @see IHistoryStore#clean(IProgressMonitor)
-	 */
-	public void clean(IProgressMonitor monitor) {
-		long start = System.currentTimeMillis();
-		int entryCount = 0;
-		IWorkspaceDescription description = workspace.internalGetDescription();
-		long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity();
-		int max = description.getMaxFileStates();
-		IPath current = null;
-		List result = new ArrayList(Math.min(max, 1000));
-		try {
-			IndexCursor cursor = store.getCursor();
-			cursor.findFirstEntry();
-			while (cursor.isSet()) {
-				entryCount++;
-				HistoryStoreEntry entry = HistoryStoreEntry.create(store, cursor);
-				// is it old?
-				if (entry.getLastModified() < minimumTimestamp) {
-					remove(entry);
-					continue;
-				}
-				if (!entry.getPath().equals(current)) {
-					removeOldestEntries(result, max);
-					result.clear();
-					current = entry.getPath();
-				}
-				result.add(entry);
-				cursor.next();
-			}
-			removeOldestEntries(result, max);
-			cursor.close();
-			store.commit();
-			if (Policy.DEBUG_HISTORY) {
-				Policy.debug("Time to apply history store policies: " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$
-				Policy.debug("Total number of history store entries: " + entryCount); //$NON-NLS-1$
-			}
-			start = System.currentTimeMillis();
-			// remove unreferenced blobs
-			blobStore.deleteBlobs(blobsToRemove);
-			if (Policy.DEBUG_HISTORY)
-				Policy.debug("Time to remove " + blobsToRemove.size() + " unreferenced blobs: " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-			blobsToRemove = new HashSet();
-		} catch (Exception e) {
-			String message = CompatibilityMessages.history_problemsCleaning;
-			Policy.log(new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, null, message, e));
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.internal.localstore.IHistoryStore#closeHistory(org.eclipse.core.resources.IResource)
-	 */
-	public void closeHistoryStore(IResource resource) {
-		//old history store does not need to be saved
-	}
-
-	/**
-	 * @see IHistoryStore#copyHistory(IResource, IResource, boolean)
-	 * @since  2.1
-	 */
-	public void copyHistory(final IResource sourceResource, final IResource destinationResource, boolean moving) {
-		// Note that if any states in the local history for destination
-		// have the same timestamp as a state for the local history
-		// for source, the local history for destination will appear 
-		// as an older state than the one for source.
-
-		// return early if either of the paths are null or if the source and
-		// destination are the same.
-		if (sourceResource == null || destinationResource == null) {
-			String message = CompatibilityMessages.history_copyToNull;
-			Policy.log(new ResourceStatus(IResourceStatus.INTERNAL_ERROR, null, message, null));
-			return;
-		}
-		if (sourceResource.equals(destinationResource)) {
-			String message = CompatibilityMessages.history_copyToSelf;
-			Policy.log(new ResourceStatus(IResourceStatus.INTERNAL_ERROR, sourceResource.getFullPath(), message, null));
-			return;
-		}
-
-		final IPath source = sourceResource.getFullPath();
-		final IPath destination = destinationResource.getFullPath();
-		// Note that if any states in the local history for destination
-		// have the same timestamp as a state for the local history
-		// for source, the local history for destination will appear 
-		// as an older state than the one for source.
-
-		// matches will be a list of all the places we add local history (without
-		// any duplicates).
-		final Set matches = new HashSet();
-
-		IHistoryStoreVisitor visitor = new IHistoryStoreVisitor() {
-			public boolean visit(HistoryStoreEntry entry) {
-				IPath path = entry.getPath();
-				int prefixSegments = source.matchingFirstSegments(path);
-				// if there are no matching segments then we have an internal error...something
-				// is wrong with the visitor
-				if (prefixSegments == 0) {
-					String message = NLS.bind(CompatibilityMessages.history_interalPathErrors, source, path);
-					Policy.log(new ResourceStatus(IResourceStatus.INTERNAL_ERROR, source, message, null));
-					return false;
-				}
-				path = destination.append(path.removeFirstSegments(prefixSegments));
-				if (!stateAlreadyExists(path, entry.getUUID())) {
-					matches.add(path);
-					addState(path, entry.getUUID(), entry.getLastModified());
-				}
-				return true;
-			}
-		};
-
-		// Visit all the entries. Visit partial matches too since this is a depth infinity operation
-		// and we want to copy history for children.
-		accept(source, visitor, true);
-
-		// For each match, make sure we haven't exceeded the maximum number of
-		// states allowed.
-		IWorkspaceDescription description = workspace.internalGetDescription();
-		int maxFileStates = description.getMaxFileStates();
-		try {
-			for (Iterator i = matches.iterator(); i.hasNext();) {
-				List removeEntries = new LinkedList();
-				IndexCursor cursor = store.getCursor();
-				IPath path = (IPath) i.next();
-				byte key[] = Convert.toUTF8(path.toString());
-				cursor.find(key);
-				// If this key is a match, grab the history store entry for it.
-				// Don't need to worry about whether or not this is a full path
-				// match as we know we used this path to add new state information
-				// to the local history.
-				while (cursor.keyMatches(key)) {
-					removeEntries.add(HistoryStoreEntry.create(store, cursor));
-					cursor.next();
-				}
-				cursor.close();
-				removeOldestEntries(removeEntries, maxFileStates);
-			}
-		} catch (IndexedStoreException e) {
-			String message = NLS.bind(CompatibilityMessages.history_problemsPurging, source, destination);
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_METADATA, source, message, e);
-			Policy.log(status);
-		} catch (CoreException e) {
-			String message = NLS.bind(CompatibilityMessages.history_problemsPurging, source, destination);
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_METADATA, source, message, e);
-			Policy.log(status);
-		}
-
-		// We need to do a commit here.  The addState method we are
-		// using won't commit store.  The public ones will.
-		try {
-			store.commit();
-		} catch (CoreException e) {
-			String message = NLS.bind(CompatibilityMessages.history_problemCopying, source, destination);
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_METADATA, source, message, e);
-			Policy.log(status);
-		}
-	}
-
-	/**
-	 * @see IHistoryStore#exists(IFileState)
-	 */
-	public boolean exists(IFileState target) {
-		return blobStore.fileFor(((FileState) target).getUUID()).fetchInfo().exists();
-	}
-
-	/**
-	 * @see IHistoryStore#getContents(IFileState)
-	 */
-	public InputStream getContents(IFileState target) throws CoreException {
-		if (!target.exists()) {
-			String message = CompatibilityMessages.history_notValid;
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, target.getFullPath(), message, null);
-		}
-		return blobStore.getBlob(((FileState) target).getUUID());
-	}
-
-	/**
-	 * @see IHistoryStore#getStates(IPath, IProgressMonitor)
-	 */
-	public IFileState[] getStates(final IPath key, IProgressMonitor monitor) {
-		final int max = workspace.internalGetDescription().getMaxFileStates();
-		final List result = new ArrayList(max);
-		IHistoryStoreVisitor visitor = new IHistoryStoreVisitor() {
-			public boolean visit(HistoryStoreEntry entry) {
-				result.add(new FileState(HistoryStore.this, key, entry.getLastModified(), entry.getUUID()));
-				return true;
-			}
-		};
-		accept(key, visitor, false);
-		if (result.isEmpty())
-			return ICoreConstants.EMPTY_FILE_STATES;
-		// put in the order of newer first
-		IFileState[] states = new IFileState[result.size()];
-		for (int i = 0; i < states.length; i++)
-			states[i] = (IFileState) result.get(result.size() - (i + 1));
-		return states;
-	}
-
-	/**
-	 * Return a boolean value indicating whether or not the given file
-	 * should be added to the history store based on the current history
-	 * store policies.
-	 * 
-	 * @param localFile the file to check
-	 * @return <code>true</code> if this file should be added to the history
-	 * 	store and <code>false</code> otherwise
-	 */
-	private boolean isValid(IFileStore localFile) {
-		WorkspaceDescription description = workspace.internalGetDescription();
-		long length = localFile.fetchInfo().getLength();
-		boolean result = length <= description.getMaxFileStateSize();
-		if (Policy.DEBUG_HISTORY && !result)
-			System.out.println("History: Ignoring file (too large). File: " + localFile.toString() + //$NON-NLS-1$
-					", size: " + length + //$NON-NLS-1$
-					", max: " + description.getMaxFileStateSize()); //$NON-NLS-1$
-		return result;
-	}
-
-	protected void remove(HistoryStoreEntry entry) throws IndexedStoreException {
-		try {
-			Vector objectIds = store.getIndex().getObjectIdentifiersMatching(entry.getKey());
-			if (objectIds.size() == 1) {
-				store.removeObject((ObjectID) objectIds.get(0));
-			} else if (objectIds.size() > 1) {
-				// There is a problem with more than one entry having the same
-				// key.
-				String message = NLS.bind(CompatibilityMessages.history_tooManySimUpdates, entry.getPath(), new Date(entry.getLastModified()));
-				ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, entry.getPath(), message, null);
-				Policy.log(status);
-			}
-		} catch (Exception e) {
-			String[] messageArgs = {entry.getPath().toString(), new Date(entry.getLastModified()).toString(), entry.getUUID().toString()};
-			String message = NLS.bind(CompatibilityMessages.history_specificProblemsCleaning, messageArgs);
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, null, message, e);
-			Policy.log(status);
-		}
-		// Do not remove the blob yet.  It may be referenced by another
-		// history store entry.
-		blobsToRemove.add(entry.getUUID());
-		entry.remove();
-	}
-
-	/**
-	 * @see IHistoryStore#remove(IPath, IProgressMonitor)
-	 */
-	public void remove(IPath path, IProgressMonitor monitor) {
-		if (Path.ROOT.equals(path)) {
-			removeAll();
-			return;
-		}
-		try {
-			IndexCursor cursor = store.getCursor();
-			byte[] key = Convert.toUTF8(path.toString());
-			cursor.find(key);
-			while (cursor.keyMatches(key)) {
-				HistoryStoreEntry entry = HistoryStoreEntry.create(store, cursor);
-				remove(entry);
-			}
-			cursor.close();
-			store.commit();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.history_problemsRemoving, path);
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, path, message, e);
-			Policy.log(status);
-		}
-	}
-
-	/**
-	 * Remove all the entries in the store.
-	 */
-	private void removeAll() {
-		// TODO: should implement a method with a better performance
-		try {
-			IndexCursor cursor = store.getCursor();
-			cursor.findFirstEntry();
-			while (cursor.isSet()) {
-				HistoryStoreEntry entry = HistoryStoreEntry.create(store, cursor);
-				remove(entry);
-			}
-			cursor.close();
-			store.commit();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.history_problemsRemoving, workspace.getRoot().getFullPath());
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, workspace.getRoot().getFullPath(), message, e);
-			Policy.log(status);
-		}
-	}
-
-	/**
-	 * Go through the history store and remove all of the unreferenced blobs.
-	 * Check the instance variable which holds onto a set of UUIDs of potential 
-	 * candidates to be removed.
-	 * 
-	 * @see IHistoryStore#removeGarbage() 
-	 */
-	public void removeGarbage() {
-		try {
-			IndexCursor cursor = store.getCursor();
-			cursor.findFirstEntry();
-			while (!blobsToRemove.isEmpty() && cursor.isSet()) {
-				HistoryStoreEntry entry = HistoryStoreEntry.create(store, cursor);
-				blobsToRemove.remove(entry.getUUID());
-				cursor.next();
-			}
-			cursor.close();
-			blobStore.deleteBlobs(blobsToRemove);
-			blobsToRemove = new HashSet();
-		} catch (Exception e) {
-			String message = CompatibilityMessages.history_problemsCleaning;
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_DELETE_LOCAL, null, message, e);
-			Policy.log(status);
-		}
-	}
-
-	protected void removeOldestEntries(List entries, int maxEntries) throws IndexedStoreException {
-		// do we have more states than necessary?
-		if (entries.size() <= maxEntries)
-			return;
-		int limit = entries.size() - maxEntries;
-		for (int i = 0; i < limit; i++)
-			remove((HistoryStoreEntry) entries.get(i));
-	}
-
-	protected void resetIndexedStore() {
-		store.reset();
-		java.io.File target = workspace.getMetaArea().getHistoryStoreLocation().toFile();
-		Workspace.clear(target);
-		target.mkdirs();
-		String message = CompatibilityMessages.history_corrupt;
-		ResourceStatus status = new ResourceStatus(IResourceStatus.INTERNAL_ERROR, null, message, null);
-		Policy.log(status);
-	}
-
-	/**
-	 * @see IManager#shutdown(IProgressMonitor)
-	 */
-	public void shutdown(IProgressMonitor monitor) {
-		if (store == null)
-			return;
-		store.close();
-	}
-
-	/**
-	 * @see IManager#startup(IProgressMonitor)
-	 */
-	public void startup(IProgressMonitor monitor) {
-		// do nothing
-	}
-
-	boolean stateAlreadyExists(IPath path, final UniversalUniqueIdentifier uuid) {
-		final boolean[] rc = new boolean[] {false};
-		IHistoryStoreVisitor visitor = new IHistoryStoreVisitor() {
-			public boolean visit(HistoryStoreEntry entry) {
-				if (rc[0] || uuid.equals(entry.getUUID())) {
-					rc[0] = true;
-					return false;
-				}
-				return true;
-			}
-		};
-		accept(path, visitor, false);
-		return rc[0];
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreConverter.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreConverter.java
deleted file mode 100644
index f2318d0..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreConverter.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.localstore;
-
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-import org.eclipse.core.internal.resources.Workspace;
-import org.eclipse.core.internal.utils.Policy;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-
-public class HistoryStoreConverter {
-	/**
-	 * Converts an existing history store lying on disk to the new history store.
-	 * Returns Status.OK_STATUS if nothing is done, an IStatus.INFO status if
-	 * the conversion happens successfully or an IStatus.ERROR status if an error
-	 * happened during the conversion process.
-	 */
-	public IStatus convertHistory(Workspace workspace, IPath location, int limit, final HistoryStore2 destination, boolean rename) {
-		if (!location.toFile().isDirectory())
-			// nothing to be converted
-			return Status.OK_STATUS;
-		IPath indexFile = location.append(HistoryStore.INDEX_FILE);
-		if (!indexFile.toFile().isFile())
-			// nothing to be converted		
-			return Status.OK_STATUS;
-		// visit all existing entries and add them to the new history store
-		long start = System.currentTimeMillis();
-		final CoreException[] exception = new CoreException[1];
-		final BucketTree tree = destination.getTree();
-		final HistoryBucket currentBucket = (HistoryBucket) tree.getCurrent();
-		HistoryStore source = new HistoryStore(workspace, location, limit);
-		source.accept(Path.ROOT, new IHistoryStoreVisitor() {
-			public boolean visit(HistoryStoreEntry state) {
-				try {
-					tree.loadBucketFor(state.getPath());
-				} catch (CoreException e) {
-					// failed while loading bucket
-					exception[0] = e;
-					return false;
-				}
-				currentBucket.addBlob(state.getPath(), state.getUUID(), state.getLastModified());
-				return true;
-			}
-		}, true);
-		try {
-			// the last bucket changed will not have been saved
-			tree.getCurrent().save();
-			// we are done using the old history store instance		
-			source.shutdown(null);
-		} catch (CoreException e) {
-			// failed during save
-			exception[0] = e;
-		}
-		if (Policy.DEBUG_HISTORY)
-			Policy.debug("Time to convert local history: " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$
-		if (exception[0] != null) {
-			// failed while visiting the old data or saving the new data
-			String conversionFailed = CompatibilityMessages.history_conversionFailed;
-			Status failure = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, new IStatus[] {exception[0].getStatus()}, conversionFailed, null);
-			// we failed, so don't do anything else - we might try converting again later
-			return failure;
-		}
-		// everything went fine
-		// if requested rename the index file to something else
-		// so we don't try converting again in the future
-		if (rename)
-			indexFile.toFile().renameTo(indexFile.addFileExtension(Long.toString(System.currentTimeMillis())).toFile());
-		String conversionOk = CompatibilityMessages.history_conversionSucceeded;
-		// leave a note to the user so this does not happen silently
-		return new Status(IStatus.INFO, ResourcesPlugin.PI_RESOURCES, IStatus.OK, conversionOk, null);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreEntry.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreEntry.java
deleted file mode 100644
index 44b3700..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/HistoryStoreEntry.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.localstore;
-
-import org.eclipse.core.internal.indexing.*;
-import org.eclipse.core.internal.properties.IndexedStoreWrapper;
-import org.eclipse.core.internal.utils.Convert;
-import org.eclipse.core.internal.utils.UniversalUniqueIdentifier;
-import org.eclipse.core.runtime.*;
-
-/**
- * HistoryStoreEntry objects perform all required conversion operations
- * when performing insertion and retrieval from the history store.
- * Following retrieval, removal from the store is also performed 
- * through the entry objects.
- * <p>
- * For insertion:
- *     - Create an entry object using create(IndexedStore, IndexCursor).
- *     - Insert the entry to the store using the keyToBytes() and
- *       valueToBytes() methods.
- * <p>
- * For retrieval:
- *     - Create an entry object by providing the indexed store and
- *       the cursor location from which version information can be read.
- * <p>
- * A static method keyPrefixToBytes() is provided to perform the 
- * conversion of key prefix values to byte array representation. The 
- * returned value is intended to be used when traversing the indexed 
- * store on partial key matches (path + timestamp) is required.
- * 
- */
-public class HistoryStoreEntry implements ILocalStoreConstants {
-	private IndexCursor cursor;
-	private UniversalUniqueIdentifier uuid;
-	private byte[] key;
-
-	/**
-	 * Constructs an entry object for retrieval from the history store.
-	 */
-	private HistoryStoreEntry(byte[] key, byte[] value, IndexCursor cursor) {
-		this.cursor = cursor;
-		this.key = key;
-		this.uuid = new UniversalUniqueIdentifier(value);
-	}
-
-	/**
-	 * Constructs an entry object to perform insertion to the history store.
-	 */
-	public HistoryStoreEntry(IPath path, UniversalUniqueIdentifier uuid, long lastModified, byte count) {
-		this.key = keyToBytes(path, lastModified, count);
-		this.uuid = uuid;
-	}
-
-	protected boolean compare(byte[] one, byte[] another) {
-		if (one.length != another.length)
-			return false;
-		for (int i = 0; i < one.length; i++)
-			if (one[i] != another[i])
-				return false;
-		return true;
-	}
-
-	/**
-	 * Returns an entry object containing the information retrieved from the history store.
-	 *
-	 * @param store Indexed history store from which data is to be read.
-	 * @param cursor Position from which data is to be read.
-	 */
-	public static HistoryStoreEntry create(IndexedStoreWrapper store, IndexCursor cursor) throws CoreException, IndexedStoreException {
-		byte[] key = cursor.getKey();
-		ObjectID valueID = cursor.getValueAsObjectID();
-		byte[] value = store.getObject(valueID);
-		return new HistoryStoreEntry(key, value, cursor);
-	}
-
-	public byte getCount() {
-		return key[key.length - 1];
-	}
-
-	public byte[] getKey() {
-		return key;
-	}
-
-	public long getLastModified() {
-		byte[] lastModifiedBytes = new byte[SIZE_LASTMODIFIED];
-		int position = (key.length - SIZE_KEY_SUFFIX);
-		System.arraycopy(key, position, lastModifiedBytes, 0, SIZE_LASTMODIFIED);
-		return Convert.bytesToLong(lastModifiedBytes);
-	}
-
-	public IPath getPath() {
-		byte[] pathBytes = new byte[key.length - SIZE_KEY_SUFFIX];
-		System.arraycopy(key, 0, pathBytes, 0, pathBytes.length);
-		return new Path(Convert.fromUTF8(pathBytes));
-	}
-
-	public UniversalUniqueIdentifier getUUID() {
-		return uuid;
-	}
-
-	/**
-	 * Converts the provided parameters into a single byte array representation.
-	 * Format:
-	 *     path + lastModified.
-	 *
-	 * @return Converted byte array.
-	 */
-	public static byte[] keyPrefixToBytes(IPath path, long lastModified) {
-		// Retrieve byte array representations of values.
-		byte[] pathBytes = Convert.toUTF8(path.toString());
-		byte[] lastModifiedBytes = Convert.longToBytes(lastModified);
-		// Byte array to hold key prefix.
-		byte[] keyPrefixBytes = new byte[pathBytes.length + lastModifiedBytes.length];
-		// Copy values.
-		System.arraycopy(pathBytes, 0, keyPrefixBytes, 0, pathBytes.length);
-		System.arraycopy(lastModifiedBytes, 0, keyPrefixBytes, pathBytes.length, lastModifiedBytes.length);
-		return keyPrefixBytes;
-	}
-
-	/**
-	 * Converts the key for this entry object into byte array representation.
-	 * Format:
-	 *     path + lastModified + count.
-	 *
-	 * Note that the count variable consists of a single byte. All other portions 
-	 * of the entry consist of multiple bytes.
-	 *
-	 * @return Key as a byte array.
-	 */
-	protected byte[] keyToBytes(IPath path, long lastModified, byte count) {
-		// Get beginning portion of key.
-		byte[] keyPrefix = keyPrefixToBytes(path, lastModified);
-		// Byte array to hold full key. The count value is 1 byte in length.
-		byte[] keyBytes = new byte[keyPrefix.length + 1];
-		// Copy all values into full key.
-		int destPosition = 0;
-		System.arraycopy(keyPrefix, 0, keyBytes, destPosition, keyPrefix.length);
-		destPosition += keyPrefix.length;
-		keyBytes[destPosition] = count;
-		return keyBytes;
-	}
-
-	/**
-	 * Removes this entry from the store.
-	 */
-	public void remove() throws IndexedStoreException {
-		if (cursor == null)
-			return;
-		reposition();
-		if (!cursor.isSet())
-			return;
-		cursor.remove();
-	}
-
-	protected void reposition() throws IndexedStoreException {
-		if (cursor.isSet())
-			if (compare(cursor.getKey(), key))
-				return;
-		cursor.find(key);
-	}
-
-	/**
-	 * Used for debug.
-	 */
-	public String toString() {
-		StringBuffer s = new StringBuffer();
-		s.append("Path: ").append(getPath()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
-		s.append("Last Modified: ").append(getLastModified()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
-		s.append("Count: ").append(getCount()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
-		s.append("UUID: ").append(uuid.toStringAsBytes()).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
-		return s.toString();
-	}
-
-	/**
-	 * Converts the value for this entry object into byte array representation.
-	 * Format:
-	 *     uuid.
-	 *
-	 * @return Value as a byte array.
-	 */
-	public byte[] valueToBytes() {
-		return uuid.toBytes();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/IHistoryStoreVisitor.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/IHistoryStoreVisitor.java
deleted file mode 100644
index dc43221..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/localstore/IHistoryStoreVisitor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.localstore;
-
-import org.eclipse.core.internal.indexing.IndexedStoreException;
-
-public interface IHistoryStoreVisitor {
-	/**
-	 * Performs required behaviour whenever a match is found in the history store query.
-	 * 
-	 * @param state State to be visited in IndexedStore.
-	 */
-	public boolean visit(HistoryStoreEntry state) throws IndexedStoreException;
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IVisitor.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IVisitor.java
deleted file mode 100644
index 05c0d59..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IVisitor.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import org.eclipse.core.internal.indexing.IndexCursor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.QualifiedName;
-
-/* package */interface IVisitor {
-	/**
-	 * Answers whether the visitor requires that the <code>IStoredProperty</code>
-	 * has its value filled when matched from the store.
-	 * <p>
-	 * Retrieving the property value may be expensive in time and memory usage
-	 * (dependent upon the size of the property value.)</p>
-	 * <p>
-	 * If the visitor answers true, the <code>visit()</code> method will be
-	 * invoked with a complete property; if the visitor answers false the property
-	 * value will be <code>null</code>.
-	 *
-	 * @param resourceName the name of the matching resource
-	 * @param propertyName the name of the matching property
-	 * @return whether the visit method requires a value
-	 */
-	public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName);
-
-	/**
-	 * Performs whatever actions are appropriate to the visitor when a
-	 * match is made to the property store query.
-	 * <p>
-	 * This method is invoked each time a matching entry is found in the store.</p>
-	 * <p>
-	 * Note that the property will have a <code>null</code> value if the <code>
-	 * requiresValue()</code> method returned <code>false</code> for this property.
-	 *
-	 * @see IndexCursor
-	 * @param resourceName the matching resource.
-	 * @param property the matching property.
-	 * @param cursor the cursor positioned at this property in the <code>IndexStore</code>.
-	 */
-	public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) throws CoreException;
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IndexedStoreWrapper.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IndexedStoreWrapper.java
deleted file mode 100644
index 89063a6..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/IndexedStoreWrapper.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import org.eclipse.core.internal.indexing.*;
-import org.eclipse.core.internal.resources.*;
-import org.eclipse.core.internal.utils.Policy;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.osgi.util.NLS;
-
-public class IndexedStoreWrapper {
-
-	private IndexedStore store;
-	private IPath location;
-
-	/* constants */
-	private static final String INDEX_NAME = "index"; //$NON-NLS-1$
-
-	public IndexedStoreWrapper(IPath location) {
-		this.location = location;
-	}
-
-	private void open() throws CoreException {
-		try {
-			String name = location.toOSString();
-			store = IndexedStore.find(name);
-			if (store == null) {
-				store = new IndexedStore();
-				store.open(name);
-			}
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotOpen, location.toOSString());
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e);
-			throw new CoreException(status);
-		}
-	}
-
-	private void recreate() throws CoreException {
-		close();
-		// Rename the problematic store for future analysis.
-		java.io.File file = location.toFile();
-		file.renameTo(location.addFileExtension("001").toFile()); //$NON-NLS-1$
-		file.delete();
-		if (!file.exists()) {
-			try {
-				open();
-			} catch (CoreException e) {
-				//failed again, null the store to make sure we
-				//don't attempt to access an invalid store.
-				store = null;
-				throw e;
-			}
-		}
-	}
-
-	public synchronized void close() {
-		if (store == null)
-			return;
-		try {
-			store.close();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotClose, location.toOSString());
-			Policy.log(new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e));
-		} finally {
-			store = null;
-		}
-	}
-
-	public synchronized void commit() throws CoreException {
-		if (store == null)
-			return;
-		try {
-			store.commit();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotCommit, location.toOSString());
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e);
-			throw new ResourceException(status);
-		}
-	}
-
-	private void create() throws CoreException {
-		try {
-			open();
-		} catch (CoreException e) {
-			Policy.log(e.getStatus());
-			//failed to open -- copy store elsewhere and create a new one
-			recreate();
-			if (store == null) {
-				String message = NLS.bind(CompatibilityMessages.indexed_couldNotCreate, location.toOSString());
-				ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, location, message, null);
-				throw new ResourceException(status);
-			}
-		}
-	}
-
-	private Index createIndex() throws CoreException {
-		try {
-			return getStore().createIndex(INDEX_NAME);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotCreateIndex, location.toOSString());
-			ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e);
-			throw new ResourceException(status);
-		}
-	}
-
-	public synchronized Index getIndex() throws CoreException {
-		Exception problem = null;
-		try {
-			return getStore().getIndex(INDEX_NAME);
-		} catch (IndexedStoreException e) {
-			if (e.id == IndexedStoreException.IndexNotFound)
-				return createIndex();
-			problem = e;
-			return null;
-		} catch (CoreException e) {
-			//just rethrow
-			throw e;
-		} catch (Exception e) {
-			problem = e;
-			return null;
-		} finally {
-			if (problem != null) {
-				String message = NLS.bind(CompatibilityMessages.indexed_couldNotGetIndex, location.toOSString());
-				ResourceStatus status = new ResourceStatus(IResourceStatus.FAILED_READ_LOCAL, location, message, problem);
-				throw new ResourceException(status);
-			}
-		}
-	}
-
-	public synchronized String getObjectAsString(ObjectID id) throws CoreException {
-		try {
-			return getStore().getObjectAsString(id);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotRead, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, location, message, e);
-		}
-	}
-
-	private IndexedStore getStore() throws CoreException {
-		if (store == null)
-			create();
-		return store;
-	}
-
-	public synchronized IndexCursor getCursor() throws CoreException {
-		try {
-			return getIndex().open();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotCreateCursor, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, location, message, e);
-		}
-	}
-
-	public synchronized ObjectID createObject(String s) throws CoreException {
-		try {
-			return getStore().createObject(s);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotWrite, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e);
-		}
-	}
-
-	public synchronized ObjectID createObject(byte[] b) throws CoreException {
-		try {
-			return getStore().createObject(b);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotWrite, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, location, message, e);
-		}
-	}
-
-	public synchronized void removeObject(ObjectID id) throws CoreException {
-		try {
-			getStore().removeObject(id);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotDelete, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_DELETE_LOCAL, location, message, e);
-		}
-	}
-
-	public synchronized byte[] getObject(ObjectID id) throws CoreException {
-		try {
-			return getStore().getObject(id);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.indexed_couldNotRead, location.toOSString());
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, location, message, e);
-		}
-	}
-
-	/**
-	 * Something has gone wrong.  Make a best effort at copying the file 
-	 * elsewhere and creating a new one.  Log exceptions.
-	 */
-	public synchronized void reset() {
-		try {
-			recreate();
-		} catch (CoreException e) {
-			Policy.log(e.getStatus());
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyManager.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyManager.java
deleted file mode 100644
index 874e89a..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyManager.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import java.util.*;
-import org.eclipse.core.internal.events.ILifecycleListener;
-import org.eclipse.core.internal.events.LifecycleEvent;
-import org.eclipse.core.internal.resources.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @see org.eclipse.core.internal.properties.IPropertyManager
- */
-public class PropertyManager implements IManager, ILifecycleListener, IPropertyManager {
-	protected Workspace workspace;
-
-	public PropertyManager(Workspace workspace) {
-		this.workspace = workspace;
-	}
-
-	public void closePropertyStore(IResource target) throws CoreException {
-		PropertyStore store = getPropertyStoreOrNull(target);
-		if (store == null)
-			return;
-		synchronized (store) {
-			store.shutdown(null);
-			setPropertyStore(target, null);
-		}
-	}
-
-	/**
-	 * Copy all the properties of one resource to another. Both resources
-	 * must have a property store available.
-	 */
-	public void copy(IResource source, IResource destination, int depth) throws CoreException {
-		// cache stores to avoid problems in concurrency
-		PropertyStore sourceStore = getPropertyStore(source);
-		PropertyStore destinationStore = getPropertyStore(destination);
-		synchronized (sourceStore) {
-			assertRunning(source, sourceStore);
-			synchronized (destinationStore) {
-				assertRunning(destination, destinationStore);
-				copyProperties(source, destination, depth);
-				sourceStore.commit();
-				destinationStore.commit();
-			}
-		}
-	}
-
-	/**
-	 * Throws an exception if the store has been shut down
-	 */
-	private void assertRunning(IResource target, PropertyStore store) throws CoreException {
-		if (!store.isRunning()) {
-			//if the store is not running then the resource is in the process of being deleted, 
-			//so report the error as if the resource was not found
-			String message = NLS.bind(CompatibilityMessages.resources_mustExist, target.getFullPath());
-			throw new ResourceException(IResourceStatus.RESOURCE_NOT_FOUND, target.getFullPath(), message, null);
-		}
-	}
-
-	private void copyProperties(IResource source, IResource destination, int depth) throws CoreException {
-		PropertyStore sourceStore = getPropertyStore(source);
-		PropertyStore destStore = getPropertyStore(destination);
-		ResourceName sourceName = getPropertyKey(source);
-		ResourceName destName = getPropertyKey(destination);
-		QueryResults results = sourceStore.getAll(sourceName, depth);
-		for (Enumeration resources = results.getResourceNames(); resources.hasMoreElements();) {
-			ResourceName resourceName = (ResourceName) resources.nextElement();
-			List properties = results.getResults(resourceName);
-			if (properties.isEmpty())
-				continue;
-			StoredProperty[] propsArray = new StoredProperty[properties.size()];
-			propsArray = (StoredProperty[]) properties.toArray(propsArray);
-			int segmentsToDrop = source.getProjectRelativePath().matchingFirstSegments(resourceName.getPath());
-			IPath path = destName.getPath().append(resourceName.getPath().removeFirstSegments(segmentsToDrop));
-			resourceName = new ResourceName(resourceName.getQualifier(), path);
-			destStore.set(resourceName, propsArray, IResource.DEPTH_ZERO, PropertyStore.SET_UPDATE);
-		}
-	}
-
-	public void deleteProperties(IResource target, int depth) throws CoreException {
-		switch (target.getType()) {
-			case IResource.FILE :
-			case IResource.FOLDER :
-				PropertyStore store = getPropertyStore(target);
-				synchronized (store) {
-					assertRunning(target, store);
-					store.removeAll(getPropertyKey(target), depth);
-					store.commit();
-				}
-				break;
-			case IResource.PROJECT :
-			case IResource.ROOT :
-				deletePropertyStore(target, true);
-		}
-	}
-
-	/**
-	 * The resource is being deleted so permanently erase its properties.
-	 * In the case of projects, this means the property store will not be
-	 * accessible again.
-	 */
-	public void deleteResource(IResource target) throws CoreException {
-		switch (target.getType()) {
-			case IResource.FILE :
-			case IResource.FOLDER :
-			case IResource.ROOT :
-				deleteProperties(target, IResource.DEPTH_INFINITE);
-				break;
-			case IResource.PROJECT :
-				//permanently delete the store
-				deletePropertyStore(target, false);
-		}
-	}
-
-	private void deletePropertyStore(IResource target, boolean restart) throws CoreException {
-		PropertyStore store = getPropertyStoreOrNull(target);
-		if (store == null)
-			return;
-		synchronized (store) {
-			store.shutdown(null);
-			workspace.getMetaArea().getPropertyStoreLocation(target).toFile().delete();
-			//if we want to allow restart, null the store and it will be recreated lazily
-			if (restart) {
-				ResourceInfo info = getPropertyHost(target).getResourceInfo(false, false);
-				if (info != null)
-					info.setPropertyStore(null);
-			}
-		}
-	}
-
-	/**
-	 * Returns the value of the identified property on the given resource as
-	 * maintained by this store.
-	 */
-	public String getProperty(IResource target, QualifiedName name) throws CoreException {
-		PropertyStore store = getPropertyStore(target);
-		synchronized (store) {
-			assertRunning(target, store);
-			StoredProperty result = store.get(getPropertyKey(target), name);
-			return result == null ? null : result.getStringValue();
-		}
-	}
-
-	/**
-	 * Returns the resource which hosts the property store
-	 * for the given resource.
-	 */
-	private Resource getPropertyHost(IResource target) {
-		return (Resource) (target.getType() == IResource.ROOT ? target : target.getProject());
-	}
-
-	/**
-	 * Returns the key to use in the property store when accessing
-	 * the properties of the given resource.
-	 */
-	private ResourceName getPropertyKey(IResource target) {
-		return new ResourceName("", target.getProjectRelativePath()); //$NON-NLS-1$
-	}
-
-	PropertyStore getPropertyStore(IResource target) throws CoreException {
-		return getPropertyStore(target, true);
-	}
-
-	/**
-	 * Returns the property store to use when storing a property for the 
-	 * given resource.  
-	 * @throws CoreException if the store could not be obtained for any reason.
-	 */
-	PropertyStore getPropertyStore(IResource target, boolean createIfNeeded) throws CoreException {
-		try {
-			Resource host = getPropertyHost(target);
-			ResourceInfo info = host.getResourceInfo(false, false);
-			if (info == null) {
-				String message = NLS.bind(CompatibilityMessages.properties_storeNotAvailable, target.getFullPath());
-				throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, target.getFullPath(), message, null);
-			}
-			PropertyStore store = (PropertyStore) info.getPropertyStore();
-			if (store == null)
-				store = openPropertyStore(host, createIfNeeded);
-			return store;
-		} catch (Exception e) {
-			if (e instanceof CoreException)
-				throw (CoreException) e;
-			String message = NLS.bind(CompatibilityMessages.properties_storeNotAvailable, target.getFullPath());
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, target.getFullPath(), message, e);
-		}
-	}
-
-	/**
-	 * Returns the property store to use when storing a property for the 
-	 * given resource, or null if the store is not available.  
-	 */
-	private PropertyStore getPropertyStoreOrNull(IResource target) {
-		Resource host = getPropertyHost(target);
-		ResourceInfo info = host.getResourceInfo(false, false);
-		if (info != null) {
-			PropertyStore store = (PropertyStore) info.getPropertyStore();
-			if (store != null) {
-				//sync on the store in case of concurrent deletion
-				synchronized (store) {
-					if (store.isRunning())
-						return store;
-				}
-			}
-		}
-		return null;
-	}
-
-	public void handleEvent(LifecycleEvent event) throws CoreException {
-		if (event.kind == LifecycleEvent.PRE_PROJECT_CLOSE)
-			closePropertyStore(event.resource);
-	}
-
-	private PropertyStore openPropertyStore(IResource target, boolean createIfNeeded) {
-		int type = target.getType();
-		Assert.isTrue(type != IResource.FILE && type != IResource.FOLDER);
-		IPath location = workspace.getMetaArea().getPropertyStoreLocation(target);
-		java.io.File storeFile = location.toFile();
-		if (!createIfNeeded && !storeFile.isFile())
-			return null;
-		storeFile.getParentFile().mkdirs();
-		PropertyStore store = new PropertyStore(location);
-		setPropertyStore(target, store);
-		return store;
-	}
-
-	public void setProperty(IResource target, QualifiedName key, String value) throws CoreException {
-		PropertyStore store = getPropertyStore(target);
-		synchronized (store) {
-			assertRunning(target, store);
-			if (value == null) {
-				store.remove(getPropertyKey(target), key);
-			} else {
-				StoredProperty prop = new StoredProperty(key, value);
-				store.set(getPropertyKey(target), prop);
-			}
-			store.commit();
-		}
-	}
-
-	private void setPropertyStore(IResource target, PropertyStore value) {
-		// fetch the info but don't bother making it mutable even though we are going
-		// to modify it.  We don't know whether or not the tree is open and it really doesn't
-		// matter as the change we are doing does not show up in deltas.
-		ResourceInfo info = getPropertyHost(target).getResourceInfo(false, false);
-		if (info.getType() == IResource.PROJECT)
-			((ProjectInfo) info).setPropertyStore(value);
-		else
-			((RootInfo) info).setPropertyStore(value);
-	}
-
-	public void shutdown(IProgressMonitor monitor) throws CoreException {
-		closePropertyStore(workspace.getRoot());
-	}
-
-	public void startup(IProgressMonitor monitor) throws CoreException {
-		workspace.addLifecycleListener(this);
-	}
-
-	public Map getProperties(IResource resource) throws CoreException {
-		PropertyStore store = getPropertyStore(resource);
-		if (store == null)
-			return Collections.EMPTY_MAP;
-		// retrieves the properties for the selected resource
-		IPath path = resource.getProjectRelativePath();
-		ResourceName resourceName = new ResourceName("", path); //$NON-NLS-1$
-		QueryResults results = store.getAll(resourceName, 1);
-		List projectProperties = results.getResults(resourceName);
-		int listSize = projectProperties.size();
-		if (listSize == 0)
-			return Collections.EMPTY_MAP;
-		Map properties = new HashMap();
-		for (int i = 0; i < listSize; i++) {
-			StoredProperty prop = (StoredProperty) projectProperties.get(i);
-			properties.put(prop.getName(), prop.getStringValue());
-		}
-		return properties;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStore.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStore.java
deleted file mode 100644
index 82dcc3a..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStore.java
+++ /dev/null
@@ -1,491 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import java.util.*;
-import org.eclipse.core.internal.indexing.IndexCursor;
-import org.eclipse.core.internal.indexing.ObjectID;
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class PropertyStore {
-
-	// The indexed store will maintain the properties
-	protected IndexedStoreWrapper store = null;
-
-	// Add directives
-	public static final int CREATE = 0; // must not exist
-	public static final int UPDATE = 1; // must exist
-	public static final int SET_UPDATE = 2; // create if doesn't exist, update if exists
-	public static final int SET_SKIP = 3; // create if doesn't exist, don't update if exists
-
-	// Remove directives
-	public static final int IGNORE_MISSING = 0;
-	public static final int FAIL_MISSING = 1;
-
-	public PropertyStore(IPath location) {
-		store = new IndexedStoreWrapper(location);
-	}
-
-	protected boolean basicExists(StoreKey searchKey) throws CoreException {
-		byte[] searchBytes = searchKey.toBytes();
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(searchBytes);
-			boolean exists = cursor.keyEquals(searchBytes);
-			cursor.close();
-			return exists;
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.properties_couldNotReadProp, searchKey.getQualifier(), searchKey.getLocalName());
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, searchKey.getResourceName().getPath(), message, e);
-		}
-	}
-
-	/**
-	 * The caller is responsible for ensuring that this will not produce
-	 * duplicate keys in the index.
-	 */
-	protected void basicInsert(StoreKey key, String value) throws CoreException {
-		try {
-			ObjectID valueID = store.createObject(value);
-			store.getIndex().insert(key.toBytes(), valueID);
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.properties_couldNotWriteProp, key.getQualifier(), key.getLocalName());
-			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, key.getResourceName().getPath(), message, e);
-		}
-	}
-
-	protected boolean basicRemove(ResourceName resourceName, QualifiedName propertyName) throws CoreException {
-		StoreKey key = new StoreKey(resourceName, propertyName);
-		byte[] keyBytes = key.toBytes();
-		boolean wasFound = false;
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(keyBytes);
-			if (cursor.keyEquals(keyBytes)) {
-				wasFound = true;
-				ObjectID valueID = cursor.getValueAsObjectID();
-				store.removeObject(valueID);
-				cursor.remove();
-			}
-			cursor.close();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.properties_couldNotDeleteProp, key.getQualifier(), key.getLocalName());
-			throw new ResourceException(IResourceStatus.FAILED_DELETE_LOCAL, resourceName.getPath(), message, e);
-		}
-		return wasFound;
-	}
-
-	protected void basicUpdate(StoreKey key, String value) throws CoreException {
-		byte[] keyBytes = key.toBytes();
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(keyBytes);
-			if (cursor.keyEquals(keyBytes)) {
-				ObjectID oldID = cursor.getValueAsObjectID();
-				store.removeObject(oldID);
-				ObjectID newValueId = store.createObject(value);
-				cursor.updateValue(newValueId);
-			}
-			cursor.close();
-		} catch (Exception e) {
-			String message = NLS.bind(CompatibilityMessages.properties_couldNotWriteProp, key.getQualifier(), key.getLocalName());
-			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, key.getResourceName().getPath(), message, e);
-		}
-	}
-
-	protected synchronized void commonSet(ResourceName resourceName, StoredProperty[] properties, int depth, int setMode, QueryResults failures) throws CoreException {
-		if (depth == IResource.DEPTH_ZERO) {
-			for (int i = 0; i < properties.length; i++) {
-				StoredProperty property = properties[i];
-				StoreKey key = new StoreKey(resourceName, property.getName());
-				boolean exists = basicExists(key);
-				if ((exists && (setMode == CREATE)) || (!exists && (setMode == UPDATE)))
-					failures.add(resourceName, property);
-				else if (exists && (setMode != SET_SKIP))
-					basicUpdate(key, property.getStringValue());
-				else
-					basicInsert(key, property.getStringValue());
-			}
-		} else {
-			Enumeration resourceNamesEnum = deepResourceNames(resourceName);
-			while (resourceNamesEnum.hasMoreElements())
-				commonSet((ResourceName) resourceNamesEnum.nextElement(), properties, IResource.DEPTH_ZERO, setMode, failures);
-		}
-	}
-
-	/**
-	 * Returns the names of all resources that are rooted at the given resource.
-	 * <p>
-	 * Answers an <code>Enumeration</code> of <code>IResourceName</code>.
-	 * The enumerator will include (at least) <code>resourceName</code> if it
-	 * exists.  If <code>resourceName</code> does not exist returns an empty
-	 * enumerator.
-	 *
-	 * @see ResourceName
-	 * @param resourceName the name of the top most resource to match.
-	 * @return an enumeration of matching resource names.
-	 */
-	public Enumeration deepResourceNames(ResourceName resourceName) throws CoreException {
-		final Set resultHolder = new HashSet(10);
-		IVisitor visitor = new IVisitor() {
-			public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) {
-				resultHolder.add(resourceName);
-			}
-
-			public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName) {
-				return false;
-			}
-		};
-		recordsDeepMatching(resourceName, visitor);
-		return Collections.enumeration(resultHolder);
-	}
-
-	/**
-	 * Returns the named property for the given resource.
-	 * <p>
-	 * The retieval is performed to depth zero.  Returns <code>null</code>
-	 * if there is no such property defined on the resource.
-	 *
-	 * @param resourceName the resource name to match.
-	 * @param propertyName the property name to match.
-	 * @return the matching property, or <code>null</code> if no such property.
-	 */
-	public StoredProperty get(ResourceName resourceName, final QualifiedName propertyName) throws CoreException {
-		final Object[] resultHolder = new Object[1];
-		IVisitor simpleVisitor = new IVisitor() {
-			public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) {
-				resultHolder[0] = property;
-			}
-
-			public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName) {
-				return true;
-			}
-		};
-		recordsMatching(resourceName, propertyName, simpleVisitor);
-		return (StoredProperty) resultHolder[0];
-	}
-
-	/**
-	 * Returns all the properties for a given resource.
-	 * <p>
-	 * Answer a <code>QueryResults</code> containing <code>StoredProperty</code>.
-	 * If there are no matches returns an empty <code>QueryResults</code></p>
-	 * <p>
-	 * The depth parameter allows searching based on resource name path prefix.</p>
-	 *
-	 * @see QueryResults
-	 * @param resourceName the resource name to match.
-	 * @param depth the scope of the query
-	 * @return a <code>QueryResults</code> with the matching properties.
-	 */
-	public QueryResults getAll(ResourceName resourceName, int depth) throws CoreException {
-		final QueryResults result = new QueryResults();
-		IVisitor visitor = new IVisitor() {
-			public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) {
-				result.add(resourceName, property);
-			}
-
-			public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName) {
-				return true;
-			}
-		};
-		if (depth == IResource.DEPTH_ZERO)
-			recordsMatching(resourceName, visitor);
-		else
-			recordsDeepMatching(resourceName, visitor);
-		return result;
-	}
-
-	/**
-	 * Returns all the property names for a given resource.
-	 * <p>
-	 * The result is a <code>QueryResults</code> containing <code>QualifiedName</code>.  
-	 * If the resource has no defined properties, the method returns
-	 * an empty <code>QueryResults</code>.</p>
-	 * <p>
-	 * The depth parameter allows searching based on resource name path prefix.</p>
-	 *
-	 * @param resourceName the resource name to match.
-	 * @param depth the depth to which the query runs.
-	 * @return a <code>QueryResults</code> containing the property names.
-	 */
-	public QueryResults getNames(ResourceName resourceName, int depth) throws CoreException {
-		QueryResults results = new QueryResults();
-		if (depth == IResource.DEPTH_ZERO)
-			recordsMatching(resourceName, propertyNameVisitor(results));
-		else
-			recordsDeepMatching(resourceName, propertyNameVisitor(results));
-		return results;
-	}
-
-	/**
-	 * Returns true if the property store is up and running.  Returns false if
-	 * the store has been shutdown.
-	 */
-	public boolean isRunning() {
-		return store != null;
-	}
-
-	protected IVisitor propertyNameVisitor(final QueryResults results) {
-		return new IVisitor() {
-			public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) {
-				results.add(resourceName, property.getName());
-			}
-
-			public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName) {
-				return false;
-			}
-		};
-	}
-
-	/**
-	 * Matches all properties for a given resource.
-	 */
-	protected void recordsDeepMatching(ResourceName resourceName, IVisitor visitor) throws CoreException {
-
-		// Build the partial 'search' key
-		StoreKey searchKey = new StoreKey(resourceName, true);
-		byte[] searchBytes = searchKey.toBytes();
-		int probe = searchBytes.length;
-		// Position a cursor over the first matching key
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(searchBytes);
-
-			// While we have a prefix match
-			while (cursor.keyMatches(searchBytes)) {
-				// Must check that the prefix is up to a valid path segment
-				// note that the matching bytes length is > search key length since
-				//      properties MUST have a local name.
-				byte[] matchingBytes = cursor.getKey();
-				if (probe == 1 || //empty path is a valid prefix for all paths
-						(matchingBytes[probe] == 0) || // a full path match
-						(matchingBytes[probe] == 47 /*IPath.SEPARATOR*/)) {
-					// a segment boundary match
-					visitPropertyAt(cursor, visitor);
-				}
-				// else the match is intra-segment and therefore invalid
-				cursor.next();
-			}
-			cursor.close();
-		} catch (Exception e) {
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, resourceName.getPath(), CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	/**
-	 * Matches all properties for a given resource.
-	 */
-	protected void recordsMatching(ResourceName resourceName, IVisitor visitor) throws CoreException {
-
-		// Build the partial 'search' key
-		StoreKey searchKey = new StoreKey(resourceName, false);
-		byte[] searchBytes = searchKey.toBytes();
-		// Position a cursor over the first matching key
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(searchBytes);
-
-			// While we have a prefix match, evaluate the visitor
-			while (cursor.keyMatches(searchBytes)) {
-				visitPropertyAt(cursor, visitor);
-				cursor.next();
-			}
-			cursor.close();
-		} catch (Exception e) {
-			store.reset();
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, resourceName.getPath(), CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	/**
-	 * Matches the given property for a given resource.
-	 * Note that there should be only one.
-	 */
-	protected void recordsMatching(ResourceName resourceName, QualifiedName propertyName, IVisitor visitor) throws CoreException {
-
-		// Build the full 'search' key
-		StoreKey searchKey = new StoreKey(resourceName, propertyName);
-		byte[] searchBytes = searchKey.toBytes();
-		// Position a cursor over the first matching key
-		IndexCursor cursor = store.getCursor();
-		try {
-			cursor.find(searchBytes);
-
-			// If we have an exact match, evaluate the visitor
-			if (cursor.keyEquals(searchBytes))
-				visitPropertyAt(cursor, visitor);
-			cursor.close();
-		} catch (Exception e) {
-			store.reset();
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, resourceName.getPath(), CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	/**
-	 * Remove the given collection of named properties from the given resource.
-	 * <p>
-	 * All of the properties being removed must exist already on the
-	 * resource based on the removeRule parameter.  If the rule is
-	 * MISSING_IGNORE then attempts to remove properties that do not exist
-	 * are ignored, if the rule is MISSING_FAIL the method will throw
-	 * a <code>PropertyNotFoundException</code> if the property does not exist.
-	 * <p>
-	 * If an exception is thrown, all properties that did previously
-	 * exist will have been removed from the resource.  To determine which
-	 * properties caused the exception see the offenders result in the exception.</p>
-	 * <p>
-	 * The depth parameter allows matching based on resource name path prefix.</p>
-	 *
-	 * @param resourceName the resource containing the properties.
-	 * @param propertyNames the property names to remove.
-	 * @param depth the scope for matching the resource name.
-	 * @param removeRule the behaviour when removing non-existent properties.
-	 * @exception CoreException
-	 */
-	public QueryResults remove(ResourceName resourceName, QualifiedName[] propertyNames, int depth, int removeRule) throws CoreException {
-		QueryResults failures = new QueryResults();
-		if (depth == IResource.DEPTH_ZERO) {
-			for (int i = 0; i < propertyNames.length; i++) {
-				boolean found = basicRemove(resourceName, propertyNames[i]);
-				if (!found && (removeRule == FAIL_MISSING))
-					failures.add(resourceName, propertyNames[i]);
-			}
-		} else {
-			Enumeration resourceNamesEnum = deepResourceNames(resourceName);
-			while (resourceNamesEnum.hasMoreElements()) {
-				ResourceName resName = (ResourceName) resourceNamesEnum.nextElement();
-				for (int i = 0; i < propertyNames.length; i++) {
-					boolean found = basicRemove(resName, propertyNames[i]);
-					if (!found && (removeRule == FAIL_MISSING))
-						failures.add(resName, propertyNames[i]);
-				}
-			}
-		}
-		return failures;
-	}
-
-	/**
-	 * Remove the named property from the given resource.
-	 * <p>
-	 * If a matching property does not exist on this resource
-	 * the method has no affect on the store.  Removal is performed
-	 * to depth zero.</p>
-	 * <p>
-	 * @param resourceName the resource containing the property.
-	 * @param propertyName the property to remove.
-	 */
-	public void remove(ResourceName resourceName, QualifiedName propertyName) throws CoreException {
-		remove(resourceName, new QualifiedName[] {propertyName}, IResource.DEPTH_ZERO, IGNORE_MISSING);
-	}
-
-	/**
-	 * Remove all the properties from a given resource.
-	 * <p>
-	 * The depth parameter allows matching based on resource name path prefix.</p>
-	 *
-	 * @param resourceName the resource containing the properties.
-	 * @param depth the scope for matching the resource name.
-	 */
-	public void removeAll(ResourceName resourceName, int depth) throws CoreException {
-		QueryResults namesSearch = getNames(resourceName, depth);
-		Enumeration resourceNamesEnum = namesSearch.getResourceNames();
-		while (resourceNamesEnum.hasMoreElements()) {
-			ResourceName resName = (ResourceName) resourceNamesEnum.nextElement();
-			Enumeration propertyNamesEnum = Collections.enumeration(namesSearch.getResults(resName));
-			while (propertyNamesEnum.hasMoreElements()) {
-				QualifiedName propertyName = (QualifiedName) propertyNamesEnum.nextElement();
-				basicRemove(resName, propertyName);
-			}
-		}
-	}
-
-	/**
-	 * Sets the given collection of properties on the given resource.
-	 * <p>
-	 * The addRule determines whether the properties must already exist
-	 * or not, and if they do whether they are updated by subsequent addition.  
-	 * Valid addRule values are defined in <code>IPropertyCollectionConstants</code>.
-	 * <p>
-	 * The depth parameter allows matching based on resource name path prefix.</p>
-	 * <p>
-	 * The <code>PropertyExistsException</code> is thrown if the matching resource
-	 * already has a property of the same name, and the rule requires that
-	 * it must not.  If the exception is thrown, all successful properties
-	 * will have been set, and the failures are listed in the exception.</p>
-	 *
-	 * @param resourceName the resource to receive the properties.
-	 * @param properties the properties to add.
-	 * @param depth the depth at which to apply the add operation.
-	 * @param mode the behaviour of the add operation.
-	 * @exception CoreException
-	 */
-	public QueryResults set(ResourceName resourceName, StoredProperty[] properties, int depth, int mode) throws CoreException {
-		QueryResults failures = new QueryResults();
-		commonSet(resourceName, properties, depth, mode, failures);
-		return failures;
-	}
-
-	/**
-	 * Sets the given property to the given resource.
-	 * <p>
-	 * The property is added to depth zero.  If the resource already has
-	 * a property with the same name, its value is updated to the given
-	 * value (i.e. SET_UPDATE add rule equivalent.)</p>
-	 *
-	 * @param resourceName the resource to receive the property.
-	 * @param property the property to add.
-	 */
-	public void set(ResourceName resourceName, StoredProperty property) throws CoreException {
-		commonSet(resourceName, new StoredProperty[] {property}, IResource.DEPTH_ZERO, SET_UPDATE, null);
-	}
-
-	public void shutdown(IProgressMonitor monitor) {
-		if (store == null)
-			return;
-		try {
-			store.close();
-		} finally {
-			//null the store so other threads with a handle on it cannot use it
-			store = null;
-		}
-	}
-
-	public void startup(IProgressMonitor monitor) {
-		//do nothing
-	}
-
-	protected void visitPropertyAt(IndexCursor cursor, IVisitor visitor) throws CoreException {
-		try {
-			StoreKey key = new StoreKey(cursor.getKey());
-			ResourceName resourceName = key.getResourceName();
-			QualifiedName propertyName = key.getPropertyName();
-			String propertyValue = null;
-			if (visitor.requiresValue(resourceName, propertyName))
-				propertyValue = store.getObjectAsString(cursor.getValueAsObjectID());
-			visitor.visit(resourceName, new StoredProperty(propertyName, propertyValue), cursor);
-		} catch (Exception e) {
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, null, CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	public void commit() throws CoreException {
-		store.commit();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStoreConverter.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStoreConverter.java
deleted file mode 100644
index 9f53edf..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/PropertyStoreConverter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import java.io.File;
-import org.eclipse.core.internal.indexing.IndexCursor;
-import org.eclipse.core.internal.localstore.BucketTree;
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-import org.eclipse.core.internal.resources.Workspace;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-
-public class PropertyStoreConverter {
-	class ConversionVisitor implements IVisitor {
-		private IPath basePath;
-		private BucketTree target;
-		private boolean worked;
-
-		public ConversionVisitor(IPath basePath, BucketTree target) {
-			this.target = target;
-			this.basePath = basePath;
-		}
-
-		public boolean hasWorked() {
-			return worked;
-		}
-
-		public boolean requiresValue(ResourceName resourceName, QualifiedName propertyName) {
-			// we need the values so we can convert
-			return true;
-		}
-
-		public void visit(ResourceName resourceName, StoredProperty property, IndexCursor cursor) throws CoreException {
-			IPath fullPath = basePath.append(resourceName.getPath());
-			target.loadBucketFor(fullPath);
-			// copies a single property
-			((PropertyBucket) target.getCurrent()).setProperty(fullPath, property.getName(), property.getStringValue());
-			worked = true;
-		}
-	}
-
-	/**
-	 * Converts existing persistent property data lying on disk to the new 
-	 * property store format.
-	 * Returns Status.OK_STATUS if nothing is done, an IStatus.INFO status if
-	 * the conversion happens successfully or an IStatus.ERROR status if an error
-	 * happened during the conversion process.
-	 */
-	public IStatus convertProperties(Workspace workspace, final PropertyManager2 destination) {
-		// Quickly check whether should try converting persistent properties
-		// We cannot pay the cost of checking every project so, instead, we try to find 
-		// a single file used by the new implementation  
-		File versionFile = destination.getVersionFile();
-		if (versionFile.isFile())
-			// conversion already done, won't try doing it again
-			return Status.OK_STATUS;
-		final boolean[] worked = {false};
-		final PropertyManager source = new PropertyManager(workspace);
-		try {
-			// convert the property store for the root and every project 
-			workspace.getRoot().accept(new IResourceVisitor() {
-				public boolean visit(org.eclipse.core.resources.IResource resource) throws CoreException {
-					ConversionVisitor propertyConverter = new ConversionVisitor(resource.getFullPath(), destination.getTree());
-					PropertyStore store = source.getPropertyStore(resource, false);
-					if (store == null)
-						return true;
-					store.recordsDeepMatching(new ResourceName("", resource.getProjectRelativePath()), propertyConverter); //$NON-NLS-1$
-					source.closePropertyStore(resource);
-					worked[0] = worked[0] || propertyConverter.hasWorked();
-					return true;
-				}
-			}, IResource.DEPTH_ONE, IResource.NONE);
-			// the last bucket changed will not have been saved			
-			destination.getTree().getCurrent().save();
-		} catch (CoreException e) {
-			// failed while visiting the old data or saving the new data
-			String conversionFailed = CompatibilityMessages.properties_conversionFailed;
-			return new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, new IStatus[] {e.getStatus()}, conversionFailed, null);
-		}
-		if (!worked[0])
-			// nothing was found to be converted
-			return Status.OK_STATUS;
-		// conversion actually happened, and everything went fine
-		// leave a note to the user so this does not happen silently			
-		String conversionOk = CompatibilityMessages.properties_conversionSucceeded;
-		return new Status(IStatus.INFO, ResourcesPlugin.PI_RESOURCES, IStatus.OK, conversionOk, null);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/QueryResults.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/QueryResults.java
deleted file mode 100644
index d257191..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/QueryResults.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-/**
- * This type acts as a container for the results of
- * a query over the property store.
- * <p>
- * Where the results of a query are potentially spread across
- * multiple resources, the results are gathered together in a
- * single query results object.</p>
- *
- */
-import java.util.*;
-
-//
-public class QueryResults {
-	protected HashMap table = new HashMap(10);
-
-	public QueryResults() {
-		super();
-	}
-
-	protected void add(ResourceName resourceName, Object value) {
-		List properties = getResults(resourceName);
-		if (properties.isEmpty())
-			table.put(resourceName, properties);
-		if (properties.indexOf(value) == -1)
-			properties.add(value);
-	}
-
-	/**
-	 * Answers with an <code>Enumeration</code> of resources that comprise
-	 * the result.
-	 *
-	 * @return an <code>Enumeration</code> of <code>ResourceName</code>,
-	 *  or an empty enumerator if there were no matching resources.
-	 */
-	public Enumeration getResourceNames() {
-		return Collections.enumeration(table.keySet());
-	}
-
-	/**
-	 * Returns all the results for a given resource.
-	 *
-	 * @param resourceName the resource for which the results are sought.
-	 * @return a <code>List</code> of the matching results. The <code>List</code>
-	 *  will be empty if there are no matching results.
-	 */
-	public List getResults(ResourceName resourceName) {
-		List results = (List) table.get(resourceName);
-		if (results == null)
-			results = new ArrayList(10);
-		return results;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/ResourceName.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/ResourceName.java
deleted file mode 100644
index d9fb98a..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/ResourceName.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import org.eclipse.core.runtime.IPath;
-
-public class ResourceName {
-	protected String qualifier = null;
-	protected IPath path = null;
-
-	public ResourceName(String qualifier, IPath path) {
-		super();
-		this.qualifier = qualifier;
-		this.path = path;
-	}
-
-	public boolean equals(Object other) {
-		if (this == other)
-			return true;
-		if (!(other instanceof ResourceName))
-			return false;
-		ResourceName otherName = (ResourceName) other;
-		if (qualifier == null) {
-			if (otherName.getQualifier() != null)
-				return false;
-		} else if (!qualifier.equals(otherName.getQualifier()))
-			return false;
-		return path.equals(otherName.getPath());
-	}
-
-	public IPath getPath() {
-		return path;
-	}
-
-	public String getQualifier() {
-		return qualifier;
-	}
-
-	public int hashCode() {
-		return path.hashCode();
-	}
-
-	public String toString() {
-		return getQualifier() + " " + getPath().toString(); //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoreKey.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoreKey.java
deleted file mode 100644
index c394e28..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoreKey.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import java.io.*;
-import org.eclipse.core.internal.resources.CompatibilityMessages;
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.internal.utils.Convert;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- *
- */
-public class StoreKey {
-	protected byte[] value = null;
-	protected boolean matchPrefix = false;
-	protected ResourceName resourceName = null;
-	protected String qualifier = null;
-	protected String localName = null;
-
-	public StoreKey(byte[] bytes) throws CoreException {
-		super();
-		value = bytes;
-		initializeObjects();
-	}
-
-	/*
-	 * The key is a full key
-	 */
-	public StoreKey(ResourceName resourceName, QualifiedName propertyName) throws CoreException {
-		super();
-		this.resourceName = resourceName;
-		qualifier = propertyName.getQualifier();
-		localName = propertyName.getLocalName();
-		initializeBytes();
-	}
-
-	/*
-	 * The key is a resource name -- either a full resource name
-	 * or a resource name prefix (for deep matching)
-	 * (i.e. no property name)
-	 */
-	public StoreKey(ResourceName resourceName, boolean matchPrefix) throws CoreException {
-		super();
-		this.resourceName = resourceName;
-		this.matchPrefix = matchPrefix;
-		initializeBytes();
-	}
-
-	public String getLocalName() {
-		return localName;
-	}
-
-	public QualifiedName getPropertyName() {
-		return new QualifiedName(qualifier, localName);
-	}
-
-	public String getQualifier() {
-		return qualifier;
-	}
-
-	public ResourceName getResourceName() {
-		return resourceName;
-	}
-
-	private void initializeBytes() throws CoreException {
-		try {
-			ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-			// Step 0: the resource name prefix -- always considered in full
-			writeNullTerminated(buffer, resourceName.getQualifier());
-			String path = resourceName.getPath().toString();
-			// Step 1: the resource path
-			if (matchPrefix) {
-				// don't null terminate resource name
-				writeBytes(buffer, path);
-				// If prefix matching, cannot allow other fields to be specified
-				if (qualifier != null || localName != null) {
-					String message = NLS.bind(CompatibilityMessages.properties_invalidPropName, qualifier, localName);
-					throw new ResourceException(IResourceStatus.INVALID_VALUE, null, message, null);
-				}
-			} else {
-				// Zero depth requires full path matching including null
-				writeNullTerminated(buffer, path);
-			}
-			// Step 2: the name space (no prefix matching)
-			if (qualifier != null) {
-				writeNullTerminated(buffer, qualifier);
-				// Step 3: the local name (no prefix matching)
-				if (localName != null)
-					writeNullTerminated(buffer, localName);
-			} else if (localName != null) {
-				// Specifying a local name without a qualifier is illegal
-				String message = NLS.bind(CompatibilityMessages.properties_invalidPropName, qualifier, localName);
-				throw new ResourceException(IResourceStatus.INVALID_VALUE, null, message, null);
-			}
-			value = buffer.toByteArray();
-		} catch (IOException e) {
-			// should never happen
-			throw new ResourceException(IResourceStatus.INTERNAL_ERROR, null, CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	/**
-	 * Assumes value bytes are fully defined -- i.e. initializing
-	 * from a stored key.
-	 */
-	protected void initializeObjects() throws CoreException {
-		try {
-			ByteArrayInputStream stream = new ByteArrayInputStream(value);
-			String prefix = readNullTerminated(stream);
-			String path = readNullTerminated(stream);
-			resourceName = new ResourceName(prefix, new Path(path));
-			qualifier = readNullTerminated(stream);
-			localName = readNullTerminated(stream);
-		} catch (IOException e) {
-			// should never happen
-			throw new ResourceException(IResourceStatus.INTERNAL_ERROR, null, CompatibilityMessages.properties_storeProblem, e);
-		}
-	}
-
-	private String readNullTerminated(ByteArrayInputStream stream) throws IOException {
-		ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-		int b;
-		while ((b = stream.read()) > 0)
-			buffer.write(b);
-		//should not reach end of stream without first hitting null (0) byte
-		if (b == -1)
-			throw new EOFException();
-		return Convert.fromUTF8(buffer.toByteArray());
-	}
-
-	public byte[] toBytes() {
-		return value;
-	}
-
-	//For debugging
-	public String toString() {
-		return new String(toBytes());
-	}
-
-	private void writeBytes(ByteArrayOutputStream stream, String aValue) throws IOException {
-		byte[] bytes = Convert.toUTF8(aValue);
-		stream.write(bytes);
-	}
-
-	private void writeNullTerminated(ByteArrayOutputStream stream, String aValue) throws IOException {
-		writeBytes(stream, aValue);
-		stream.write(0);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoredProperty.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoredProperty.java
deleted file mode 100644
index ab4d4f5..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/properties/StoredProperty.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.properties;
-
-import org.eclipse.core.runtime.QualifiedName;
-
-public class StoredProperty {
-	protected QualifiedName name = null;
-	protected String value = null;
-
-	public StoredProperty(QualifiedName name, String value) {
-		super();
-		this.name = name;
-		this.value = value;
-	}
-
-	public QualifiedName getName() {
-		return name;
-	}
-
-	public String getStringValue() {
-		return value;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/CompatibilityMessages.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/CompatibilityMessages.java
deleted file mode 100644
index 00bdcf2..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/CompatibilityMessages.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CompatibilityMessages extends NLS {
-
-	private static final String BUNDLE_NAME = "org.eclipse.core.internal.resources.messages"; //$NON-NLS-1$
-
-	// properties
-	public static String indexed_couldNotClose;
-	public static String indexed_couldNotCommit;
-	public static String indexed_couldNotCreate;
-	public static String indexed_couldNotCreateCursor;
-	public static String indexed_couldNotCreateIndex;
-	public static String indexed_couldNotDelete;
-	public static String indexed_couldNotGetIndex;
-	public static String indexed_couldNotOpen;
-	public static String indexed_couldNotRead;
-	public static String indexed_couldNotWrite;
-	// indexing
-	public static String indexedStore_contextNotAvailable;
-	public static String indexedStore_entryKeyLengthError;
-	public static String indexedStore_entryNotRemoved;
-	public static String indexedStore_entryRemoved;
-	public static String indexedStore_entryValueLengthError;
-	public static String indexedStore_entryValueNotUpdated;
-	public static String indexedStore_genericError;
-	public static String indexedStore_indexExists;
-	public static String indexedStore_indexNodeNotCreated;
-	public static String indexedStore_indexNodeNotRetrieved;
-	public static String indexedStore_indexNodeNotSplit;
-	public static String indexedStore_indexNodeNotStored;
-	public static String indexedStore_indexNotCreated;
-	public static String indexedStore_indexNotFound;
-	public static String indexedStore_indexNotRemoved;
-	public static String indexedStore_metadataRequestError;
-	public static String indexedStore_objectExists;
-	public static String indexedStore_objectIDInvalid;
-	public static String indexedStore_objectNotAcquired;
-	public static String indexedStore_objectNotCreated;
-	public static String indexedStore_objectNotFound;
-	public static String indexedStore_objectNotReleased;
-	public static String indexedStore_objectNotRemoved;
-	public static String indexedStore_objectNotStored;
-	public static String indexedStore_objectNotUpdated;
-	public static String indexedStore_objectTypeError;
-	public static String indexedStore_storeEmpty;
-	public static String indexedStore_storeFormatError;
-	public static String indexedStore_storeIsOpen;
-	public static String indexedStore_storeNotClosed;
-	public static String indexedStore_storeNotCommitted;
-	public static String indexedStore_storeNotConverted;
-	public static String indexedStore_storeNotCreated;
-	public static String indexedStore_storeNotFlushed;
-	public static String indexedStore_storeNotOpen;
-	public static String indexedStore_storeNotOpened;
-	public static String indexedStore_storeNotReadWrite;
-	public static String indexedStore_storeNotRolledBack;
-	public static String objectStore_genericFailure;
-	public static String objectStore_internalFailure;
-	public static String objectStore_metadataRequestFailure;
-	public static String objectStore_objectExistenceFailure;
-	public static String objectStore_objectHeaderFailure;
-	public static String objectStore_objectInsertFailure;
-	public static String objectStore_objectIsLocked;
-	public static String objectStore_objectRemoveFailure;
-	public static String objectStore_objectSizeFailure;
-	public static String objectStore_objectTypeFailure;
-	public static String objectStore_objectUpdateFailure;
-	public static String objectStore_pageReadFailure;
-	public static String objectStore_pageVacancyFailure;
-	public static String objectStore_pageWriteFailure;
-	public static String objectStore_storeCloseFailure;
-	public static String objectStore_storeConversionFailure;
-	public static String objectStore_storeCreateFailure;
-	public static String objectStore_storeOpenFailure;
-	public static String pageStore_commitFailure;
-	public static String pageStore_conversionFailure;
-	public static String pageStore_createFailure;
-	public static String pageStore_genericFailure;
-	public static String pageStore_integrityFailure;
-	public static String pageStore_lengthFailure;
-	public static String pageStore_logCreateFailure;
-	public static String pageStore_logOpenFailure;
-	public static String pageStore_logReadFailure;
-	public static String pageStore_logWriteFailure;
-	public static String pageStore_metadataRequestFailure;
-	public static String pageStore_openFailure;
-	public static String pageStore_readFailure;
-	public static String pageStore_writeFailure;
-	public static String history_problemsAccessing;
-	public static String history_tooManySimUpdates;
-	public static String history_problemsCleaning;
-	public static String history_notValid;
-	public static String history_specificProblemsCleaning;
-	public static String history_corrupt;
-	public static String history_problemsRemoving;
-	public static String history_couldNotAdd;
-	public static String history_interalPathErrors;
-	public static String history_copyToNull;
-	public static String history_copyToSelf;
-	public static String history_problemsPurging;
-	public static String history_problemCopying;
-	public static String history_conversionSucceeded;
-	// history store
-	public static String history_conversionFailed;
-
-	public static String properties_storeProblem;
-	public static String properties_invalidPropName;
-	public static String properties_conversionFailed;
-	public static String properties_conversionSucceeded;	
-	public static String properties_couldNotWriteProp;
-	public static String properties_couldNotDeleteProp;
-	public static String properties_couldNotReadProp;
-	public static String properties_storeNotAvailable;
-
-	public static String resources_mustExist;
-
-	static {
-		// initialize resource bundles
-		NLS.initializeMessages(BUNDLE_NAME, CompatibilityMessages.class);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/ResourcesCompatibility.java b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/ResourcesCompatibility.java
deleted file mode 100644
index 37c391a..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/ResourcesCompatibility.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.core.internal.resources;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.internal.localstore.*;
-import org.eclipse.core.internal.properties.*;
-import org.eclipse.core.internal.utils.Policy;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * This class provides the entry point to the backward compatibility fragment. 
- * 
- * @see ResourcesCompatibilityHelper
- */
-public class ResourcesCompatibility {
-	/**
-	 * Creates a new history store.
-	 * 
-	 * @param location the base location for the history store 
-	 * @param limit the number of buckets in the blob store
-	 * @param newImpl whether should use the new implementation
-	 * @param convert whether should convert the existing state (ignored if newImpl is false)
-	 * @param rename whether should rename the existing index file after converting (ignored if newImpl or convert are false)
-	 * @return a history store
-	 */
-	public static IHistoryStore createHistoryStore(IPath location, int limit, boolean newImpl, boolean convert, boolean rename) {
-		Workspace workspace = (Workspace) ResourcesPlugin.getWorkspace();
-		if (!newImpl)
-			// keep using the old history store
-			return new HistoryStore(workspace, location, limit);
-		IFileStore store = EFS.getLocalFileSystem().getStore(location);
-		HistoryStore2 newHistoryStore = new HistoryStore2(workspace, store, limit);
-		if (!convert)
-			// do not try to convert - return as it is
-			return newHistoryStore;
-		IStatus result = new HistoryStoreConverter().convertHistory(workspace, location, limit, newHistoryStore, rename);
-		// if we do anything (either we fail or succeed converting), a non-OK status is returned
-		if (result.getSeverity() != IStatus.OK)
-			Policy.log(result);
-		return newHistoryStore;
-	}
-	/**
-	 * Creates a new property manager.
-	 * 
-	 * @param newImpl whether should use the new implementation
-	 * @param convert whether should convert the existing state (ignored if newImpl is false)
-	 * @return a history store
-	 */
-	public static IPropertyManager createPropertyManager(boolean newImpl, boolean convert) {
-		Workspace workspace = (Workspace) ResourcesPlugin.getWorkspace();		
-		if (!newImpl)
-			// keep using the old history store
-			return new PropertyManager(workspace);
-		PropertyManager2 newPropertyManager = new PropertyManager2(workspace);
-		if (!convert)
-			// do not try to convert - return as it is
-			return newPropertyManager;
-		// try to convert the existing data now	
-		IStatus result = new PropertyStoreConverter().convertProperties(workspace, newPropertyManager);
-		if (result.getSeverity() != IStatus.OK)
-			// if we do anything (either we fail or succeed converting), a non-OK status is returned
-			Policy.log(result);
-		return newPropertyManager;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/messages.properties b/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/messages.properties
deleted file mode 100644
index 52548a7..0000000
--- a/eclipse/plugins/org.eclipse.core.resources.compatibility/src/org/eclipse/core/internal/resources/messages.properties
+++ /dev/null
@@ -1,126 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-### Resources compatibility plugin messages.
-
-### indexing
-indexedStore_contextNotAvailable = Error occurred accessing the indexed store context.
-indexedStore_entryKeyLengthError = Key length > 1024.
-indexedStore_entryNotRemoved = Cannot remove an index entry referenced by other cursors.
-indexedStore_entryRemoved = Element at this cursor has been removed.
-indexedStore_entryValueLengthError = Value length > 2048.
-indexedStore_entryValueNotUpdated = Error occurred updating value in leaf node.
-indexedStore_genericError = An error occurred during an indexed store operation.
-indexedStore_indexExists = Index already exists.
-indexedStore_indexNodeNotCreated = Index node not created.
-indexedStore_indexNodeNotRetrieved = Error occurred getting index node.
-indexedStore_indexNodeNotSplit = Error occurred splitting an index node.
-indexedStore_indexNodeNotStored = Error occurred storing index node.
-indexedStore_indexNotCreated = Index was not created.
-indexedStore_indexNotFound = Index not found.
-indexedStore_indexNotRemoved = Error occurred removing index from the store.
-indexedStore_metadataRequestError = Error occurred during metadata request processing.
-indexedStore_objectExists = Object already exists.
-indexedStore_objectIDInvalid = ObjectID format is invalid.
-indexedStore_objectNotAcquired = Object has not been acquired for the intent needed for this operation.
-indexedStore_objectNotCreated = Error occurred creating a new object.
-indexedStore_objectNotFound = Object not found.
-indexedStore_objectNotReleased = Cannot release an object that has not been acquired.
-indexedStore_objectNotRemoved = Error occurred removing an object from the store.
-indexedStore_objectNotStored = Object was not stored.
-indexedStore_objectNotUpdated = Error occurred updating an object.
-indexedStore_objectTypeError = Unexpected object type found.
-indexedStore_storeEmpty = Could not find root context because store is empty.
-indexedStore_storeFormatError = Could not find root context because store has invalid format.
-indexedStore_storeIsOpen = The indexed store is already open.
-indexedStore_storeNotClosed = Error closing indexed store.
-indexedStore_storeNotCommitted = Error committing the indexed store.
-indexedStore_storeNotConverted = The indexed store opened is not the current version and no conversion routine exists.
-indexedStore_storeNotCreated = Store does not exist and cannot be created.
-indexedStore_storeNotFlushed = Error flushing indexed store.
-indexedStore_storeNotOpen = Store has not been opened.
-indexedStore_storeNotOpened = Error occurred opening indexed store.
-indexedStore_storeNotReadWrite = Attempted to set a Modify intent for an object in a read-only store.
-indexedStore_storeNotRolledBack = Error occurred rolling back the indexed store.
-
-### properties
-indexed_couldNotClose = Could not close indexed store: {0}.
-indexed_couldNotCommit = Indexed store transactions did not commit properly: {0}.
-indexed_couldNotCreate = Could not create indexed store: {0}.
-indexed_couldNotCreateCursor = Could not create indexed cursor: {0}.
-indexed_couldNotCreateIndex = Could not create index for store: {0}.
-indexed_couldNotDelete = Could not delete from indexed store: {0}.
-indexed_couldNotGetIndex = Could not get index for store: {0}.
-indexed_couldNotOpen = Could not open indexed store: {0}.
-indexed_couldNotRead = Could not read from indexed store: {0}.
-indexed_couldNotWrite = Could not write to indexed store: {0}.
-
-objectStore_genericFailure = Error occurred in object store operation.
-objectStore_internalFailure = Internal error occurred in object store operation.
-objectStore_metadataRequestFailure = Error getting or putting metadata.
-objectStore_objectExistenceFailure = Object was not found.
-objectStore_objectHeaderFailure = Object header format is invalid.
-objectStore_objectInsertFailure = Error occurred writing object into page.
-objectStore_objectIsLocked = Operation cannot be performed because the object is being used.
-objectStore_objectRemoveFailure = Error occurred removing object from page.
-objectStore_objectSizeFailure = Object is too large for page.
-objectStore_objectTypeFailure = Type check failed.
-objectStore_objectUpdateFailure = Error updating object.
-objectStore_pageReadFailure = Error reading page from object store.
-objectStore_pageVacancyFailure = Object table on page is full.
-objectStore_pageWriteFailure = Cannot store page in page store.
-objectStore_storeCloseFailure = Error occurred during close of object store.
-objectStore_storeConversionFailure = Error converting object store.
-objectStore_storeCreateFailure = Error creating object store.
-objectStore_storeOpenFailure = Error opening object store.
-
-pageStore_commitFailure = Error occurred during commit processing.
-pageStore_conversionFailure = Error occurred during conversion of the page store file.
-pageStore_createFailure = Error occurred creating page store file.
-pageStore_genericFailure = Error occurred during a page store file operation.
-pageStore_integrityFailure = Error occurred that compromises the integrity of the page store file.
-pageStore_lengthFailure = Error occurred determining page store file length.
-pageStore_logCreateFailure = Error occurred creating transaction log file.
-pageStore_logOpenFailure = Error occurred opening transaction log file.
-pageStore_logReadFailure = Error occurred reading transaction log file.
-pageStore_logWriteFailure = Error occurred writing transaction log file.
-pageStore_metadataRequestFailure = Error occurred during metadata request processing.
-pageStore_openFailure = Error occurred opening page store file.
-pageStore_readFailure = Error occurred reading page store file.
-pageStore_writeFailure = Error occurred writing page store file.
-
-### history store
-history_conversionFailed = Conversion of local history completed with failures.
-history_conversionSucceeded = Conversion of local history completed successfully.
-history_copyToNull = Unable to copy local history to or from a null location.
-history_copyToSelf = Unable to copy local history to and from the same location.
-history_corrupt = The history store got corrupted. Local history is lost. A new store is being created.
-history_couldNotAdd = Could not add history for {0}.
-history_interalPathErrors = Problems copying local history information from {0} which expanded to {1}.
-history_notValid = State is not valid or might have expired.
-history_problemCopying = Problems copying local history from {0} to {1}.
-history_problemsAccessing = Problems accessing history store.
-history_problemsCleaning = Problems cleaning up history store.
-history_problemsPurging = Problems purging local history information after copying local history from {0} to {1}.
-history_problemsRemoving = Problems removing history for {0}.
-history_specificProblemsCleaning = Problems cleaning history store for file {0}, modified on {1}, with UUID {2}.
-history_tooManySimUpdates = Some local history is missing as there are too many simultaneous updates for file {0} with timestamp {1}.
-
-properties_conversionFailed = Conversion of persistent properties failed.
-properties_conversionSucceeded = Conversion of persistent properties completed successfully.
-properties_couldNotDeleteProp = Could not delete property: {0} {1}.
-properties_couldNotReadProp = Could not read property: {0} {1}.
-properties_couldNotWriteProp = Could not write property: {0} {1}.
-properties_invalidPropName = Invalid property name: {0} {1}.
-properties_storeNotAvailable = Property store is not available for: {0}.
-properties_storeProblem = Problems accessing property store.
-
-resources_mustExist = Resource {0} does not exist.
-
diff --git a/eclipse/plugins/org.eclipse.core.resources.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.resources.win32.x86/META-INF/MANIFEST.MF
index ede9a26..403277a 100644
--- a/eclipse/plugins/org.eclipse.core.resources.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.resources.win32.x86/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %win32FragmentName
 Bundle-SymbolicName: org.eclipse.core.resources.win32.x86;singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)"
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.core.resources/.settings/.api_filters b/eclipse/plugins/org.eclipse.core.resources/.settings/.api_filters
index 71857ec..af63731 100644
--- a/eclipse/plugins/org.eclipse.core.resources/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.core.resources/.settings/.api_filters
@@ -7,4 +7,12 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/core/resources/mapping/ModelProvider.java" type="org.eclipse.core.resources.mapping.ModelProvider">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.core.resources.mapping.ModelProvider"/>
+                <message_argument value="init(IModelProviderDescriptor)"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/eclipse/plugins/org.eclipse.core.resources/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.resources/META-INF/MANIFEST.MF
index 97b3e0b..893e00f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.resources; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: org.eclipse.core.resources.ResourcesPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -14,13 +14,16 @@ Export-Package: org.eclipse.core.internal.dtree;x-internal:=true,
  org.eclipse.core.internal.refresh;x-internal:=true,
  org.eclipse.core.internal.resources;x-internal:=true,
  org.eclipse.core.internal.resources.mapping;x-internal:=true,
+ org.eclipse.core.internal.resources.projectvariables;x-internal:=true,
  org.eclipse.core.internal.resources.refresh.win32;x-internal:=true,
  org.eclipse.core.internal.utils;x-internal:=true,
  org.eclipse.core.internal.watson;x-internal:=true,
  org.eclipse.core.resources,
+ org.eclipse.core.resources.filtermatchers,
  org.eclipse.core.resources.mapping,
  org.eclipse.core.resources.refresh,
- org.eclipse.core.resources.team
+ org.eclipse.core.resources.team,
+ org.eclipse.core.resources.variableresolvers
 Require-Bundle: org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)";resolution:=optional,
  org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.1.0,2.0.0)",
diff --git a/eclipse/plugins/org.eclipse.core.resources/natives/ref.c b/eclipse/plugins/org.eclipse.core.resources/natives/ref.c
index 0c3a48b..5c9907d 100644
--- a/eclipse/plugins/org.eclipse.core.resources/natives/ref.c
+++ b/eclipse/plugins/org.eclipse.core.resources/natives/ref.c
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 #include <windows.h>
 #include "ref.h"
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/natives/ref.h b/eclipse/plugins/org.eclipse.core.resources/natives/ref.h
index 4bbe648..15c5ba9 100644
--- a/eclipse/plugins/org.eclipse.core.resources/natives/ref.h
+++ b/eclipse/plugins/org.eclipse.core.resources/natives/ref.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.resources/plugin.properties b/eclipse/plugins/org.eclipse.core.resources/plugin.properties
index d063d82..c361062 100644
--- a/eclipse/plugins/org.eclipse.core.resources/plugin.properties
+++ b/eclipse/plugins/org.eclipse.core.resources/plugin.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
@@ -19,8 +19,10 @@ teamHookName = Team Hook
 preferencesContentTypeName = Preferences
 refreshProvidersName=Refresh Providers
 modelProviders=Model Providers
+filterMatchers=Filter Matchers
 preferencesExtPtName=Resource Preferences
 resourceModelName=File System Resources
+variableProviders=Variable Providers
 
 markerName = Marker
 problemName = Problem
@@ -31,3 +33,6 @@ textName = Text
 win32FragmentName = Core Resource Management Win32 Fragment
 compatibilityFragmentName = Core Resource Management Compatibility Fragment
 win32MonitorFactoryName = Windows Auto-refresh monitor
+
+regexFilterProvider.description = Matches file and folder names with a regular expression
+regexFilterProvider.name = Regular Expression
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/plugin.xml b/eclipse/plugins/org.eclipse.core.resources/plugin.xml
index a5b672a..a7c9932 100644
--- a/eclipse/plugins/org.eclipse.core.resources/plugin.xml
+++ b/eclipse/plugins/org.eclipse.core.resources/plugin.xml
@@ -10,6 +10,8 @@
    <extension-point id="teamHook" name="%teamHookName" schema="schema/teamHook.exsd"/>
    <extension-point id="refreshProviders" name="%refreshProvidersName" schema="schema/refreshProviders.exsd"/>
    <extension-point id="modelProviders" name="%modelProviders" schema="schema/modelProviders.exsd"/>
+   <extension-point id="filterMatchers" name="%filterMatchers" schema="schema/filterMatchers.exsd"/>
+   <extension-point id="variableResolvers" name="%variableResolvers" schema="schema/variableResolvers.exsd"/>
 
 	<extension id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferencesExtPtName">
 		<scope name="project" class="org.eclipse.core.internal.resources.ProjectPreferences"/>
@@ -188,5 +190,49 @@
             properties="projectPersistentProperty"
             id="org.eclipse.core.resources.mappingPropertyTester"/>
    </extension>
+<!-- Filter Matchers-->
+   <extension
+         point="org.eclipse.core.resources.filterMatchers">
+      <filterMatcher
+      		id="org.eclipse.core.resources.regexFilterMatcher"
+            argumentType="string"
+            class="org.eclipse.core.internal.resources.RegexFileInfoMatcher"
+            description="%regexFilterProvider.description"
+            name="%regexFilterProvider.name"
+            ordering="first">
+      </filterMatcher>
+   </extension>
 
+   <extension
+         point="org.eclipse.core.resources.variableResolvers">
+      <variableResolver
+            class="org.eclipse.core.internal.resources.projectvariables.EclipseHomeProjectVariable"
+            variable="ECLIPSE_HOME">
+      </variableResolver>
+      <variableResolver
+            class="org.eclipse.core.internal.resources.projectvariables.ProjectLocationVariableResolver"
+            variable="PROJECT_LOC">
+      </variableResolver>
+      <variableResolver
+            class="org.eclipse.core.internal.resources.projectvariables.WorkspaceLocationVariableResolver"
+            variable="WORKSPACE_LOC">
+      </variableResolver>
+      <variableResolver
+            class="org.eclipse.core.internal.resources.projectvariables.ParentVariableResolver"
+            variable="PARENT">
+      </variableResolver>
+      <variableResolver
+            class="org.eclipse.core.internal.resources.projectvariables.WorkspaceParentLocationVariableResolver"
+            variable="PARENT_LOC">
+      </variableResolver>
+   </extension>
+   <extension
+         point="org.eclipse.core.filesystem.filesystems">
+      <filesystem
+            scheme="virtual">
+         <run
+               class="org.eclipse.core.internal.resources.VirtualFileSystem">
+         </run>
+      </filesystem>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.core.resources/schema/filterMatchers.exsd b/eclipse/plugins/org.eclipse.core.resources/schema/filterMatchers.exsd
new file mode 100644
index 0000000..1525f05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/schema/filterMatchers.exsd
@@ -0,0 +1,187 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.core.resources" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.core.resources" id="filterMatchers" name="Filter Matchers"/>
+      </appInfo>
+      <documentation>
+         The filter matchers extension point allows plug-ins to contribute matchers. The matchers are used by filters applied on containers (folders or projects) to include or exclude some file system objects while populating the resources tree.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="filterMatcher" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="filterMatcher">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.core.resources.AbstractFileInfoMatcher:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="argumentType">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+            <simpleType>
+               <restriction base="string">
+                  <enumeration value="none">
+                  </enumeration>
+                  <enumeration value="string">
+                  </enumeration>
+                  <enumeration value="filterMatcher">
+                  </enumeration>
+                  <enumeration value="filterMatchers">
+                  </enumeration>
+               </restriction>
+            </simpleType>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="ordering">
+            <annotation>
+               <documentation>
+                  A hint specifying that this filter should be called first or last among the list of active filters for a given container.  Often specified for performance reason.
+               </documentation>
+            </annotation>
+            <simpleType>
+               <restriction base="string">
+                  <enumeration value="first">
+                  </enumeration>
+                  <enumeration value="last">
+                  </enumeration>
+               </restriction>
+            </simpleType>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.6
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of using the modelProvider extension point. 
+(in file plugin.xml)
+<pre>
+   <extension
+         point="org.eclipse.core.resources.filterMatchers">
+      <filterMatcher
+            argumentType="string"
+            class="org.eclipse.core.internal.resources.RegexFileInfoMatcher">
+      </filterMatcher>
+   </extension>
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The value of the class attribute must represent a 
+subclass of <samp>org.eclipse.core.resources.AbstractFileInfoMatcher</samp>.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The core resource plugin provides the regex matcher, allowing the user to specify string arguments matching the specification supported by java.util.regex.Pattern.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2008, 2009 Freescale Semiconductor and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies 
+this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.core.resources/schema/natures.exsd b/eclipse/plugins/org.eclipse.core.resources/schema/natures.exsd
index 4c242f9..42cf249 100644
--- a/eclipse/plugins/org.eclipse.core.resources/schema/natures.exsd
+++ b/eclipse/plugins/org.eclipse.core.resources/schema/natures.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.core.resources" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.core.resources" id="natures" name="Project Natures"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The workspace supports the notion of project natures 
 (or "natures" for short").  A nature associates lifecycle 
@@ -72,6 +72,11 @@ equally suitable for a given file), the content type having affinity with any of
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="runtime"/>
@@ -102,9 +107,9 @@ equally suitable for a given file), the content type having affinity with any of
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -120,9 +125,9 @@ equally suitable for a given file), the content type having affinity with any of
 
    <element name="run">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name"/>
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
@@ -134,9 +139,9 @@ equally suitable for a given file), the content type having affinity with any of
                   the fully-qualified name of a class which implements 
 <samp>org.eclipse.core.resources.IProjectNature</samp>
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.core.resources.IProjectNature"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -144,9 +149,9 @@ equally suitable for a given file), the content type having affinity with any of
 
    <element name="parameter">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name"/>
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <attribute name="name" type="string" use="required">
@@ -185,9 +190,9 @@ equally suitable for a given file), the content type having affinity with any of
                <documentation>
                   the fully-qualified id of another nature extension that this nature extension requires.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.core.resources.natures/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -200,9 +205,9 @@ equally suitable for a given file), the content type having affinity with any of
                <documentation>
                   the fully-qualified id of an incremental project builder extension that this nature controls.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.core.resources.builders/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -227,18 +232,18 @@ equally suitable for a given file), the content type having affinity with any of
                <documentation>
                   the fully-qualified id of a content type associated to this nature.
                </documentation>
-               <appinfo>
-                  <meta.attribute kind="identifier" basedOn="org.eclipse.core.runtime.contentTypes/@id"/>
-               </appinfo>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.core.contenttype.contentTypes/content-type/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Following is an example of three nature configurations.  The
 waterNature and fireNature belong
@@ -285,9 +290,9 @@ of these natures would be "com.xyz.coolplugin.fireNature", "com.x
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the class attribute must represent an 
 implementor of 
@@ -301,11 +306,10 @@ on <samp>org.eclipse.core.resources.IWorkspace</samp>.
    </annotation>
 
 
-
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The platform itself does not have any predefined natures. 
 Particular product installs may include natures as required.
@@ -313,11 +317,11 @@ Particular product installs may include natures as required.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         Copyright (c) 2002, 2005 IBM Corporation and others.<br>
+         Copyright (c) 2002, 2009 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 which 
 accompanies 
diff --git a/eclipse/plugins/org.eclipse.core.resources/schema/variableResolvers.exsd b/eclipse/plugins/org.eclipse.core.resources/schema/variableResolvers.exsd
new file mode 100644
index 0000000..b32631b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/schema/variableResolvers.exsd
@@ -0,0 +1,139 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.core.resources" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.core.resources" id="variableResolvers" name="Path variable resolver"/>
+      </appInfo>
+      <documentation>
+         A variable resolver extends the default list of project path variables that can be used to specify the relative location of a linked resource.
+      </documentation>
+   </annotation>
+
+   <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="variableResolver" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="variableResolver">
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  A class dynamically providing the value of the variable.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.core.resources.variableresolvers.PathVariableResolver:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string">
+            <annotation>
+               <documentation>
+                  The value of the variable, either as refering another variable or an absolute path.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="variable" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The prefix for supported variables. We could use wildcards in the future.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.6
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The value of the class attribute must represent a subclass of <tt>org.eclipse.core.resources.PathVariableResolver</tt>.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <p>
+<pre>
+<extension point="org.eclipse.core.resources.variableResolvers">
+ <variableResolver class="org.eclipse.core.internal.resources.projectVariables.EclipseHomeProjectVariable" name="ECLIPSE_HOME">
+ </variableResolver>
+</extension>
+</pre>
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The <tt>org.eclipse.core.resources</tt> bundle provides resolvers for the following variables:  <tt>ECLIPSE_HOME</tt>, <tt>PROJECT_LOC</tt>, <tt>WORKSPACE_LOC</tt>, and <tt>PARENT</tt>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2008, 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies 
+this distribution, and is available at 
+<a 
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/dtree/DataTreeReader.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/dtree/DataTreeReader.java
index 4ed0271..faecd3f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/dtree/DataTreeReader.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/dtree/DataTreeReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.dtree;
 
@@ -52,9 +53,12 @@ public class DataTreeReader {
 	}
 
 	/**
-	 * Reads a node from the given input stream
+	 * Reads a node from the given input stream.
+	 * If newProjectName is non-empty, use it for the name of
+	 * the project (first node under root) in the created node
+	 * instead of the name read from the stream.
 	 */
-	protected AbstractDataTreeNode readNode(IPath parentPath) throws IOException {
+	protected AbstractDataTreeNode readNode(IPath parentPath, String newProjectName) throws IOException {
 		/* read the node name */
 		String name = input.readUTF();
 
@@ -66,6 +70,11 @@ public class DataTreeReader {
 
 		/* if not the root node */
 		if (parentPath != null) {
+			if (parentPath.equals(Path.ROOT) &&
+					newProjectName.length() > 0 && name.length() > 0) {
+				/* use the supplied name for the project node */
+				name = newProjectName;
+			}
 			path = parentPath.append(name);
 		} else {
 			path = Path.ROOT;
@@ -91,7 +100,7 @@ public class DataTreeReader {
 		} else {
 			children = new AbstractDataTreeNode[childCount];
 			for (int i = 0; i < childCount; i++) {
-				children[i] = readNode(path);
+				children[i] = readNode(path, newProjectName);
 			}
 		}
 
@@ -128,11 +137,14 @@ public class DataTreeReader {
 	}
 
 	/**
-	 * Reads a DeltaDataTree from the given input stream
+	 * Reads a DeltaDataTree from the given input stream.
+	 * If newProjectName is non-empty, use it for the name of
+	 * the project (first node under root) in the returned tree
+	 * instead of the name read from the stream.
 	 */
-	public DeltaDataTree readTree(DeltaDataTree parent, DataInput input) throws IOException {
+	public DeltaDataTree readTree(DeltaDataTree parent, DataInput input, String newProjectName) throws IOException {
 		this.input = input;
-		AbstractDataTreeNode root = readNode(Path.ROOT);
+		AbstractDataTreeNode root = readNode(Path.ROOT, newProjectName);
 		return new DeltaDataTree(root, parent);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
index 88ebfd4..84945db 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/AutoBuildJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,7 +86,11 @@ class AutoBuildJob extends Job implements Preferences.IPropertyChangeListener {
 				wakeUp(delay);
 				break;
 			case NONE :
-				setSystem(!isAutoBuilding);
+				try {
+					setSystem(!isAutoBuilding);
+				} catch (IllegalStateException e) {
+					//ignore - the job has been scheduled since we last checked its state
+				}
 				schedule(delay);
 				break;
 		}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java
index f2e94b3..cc9319c 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/BuildManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -8,6 +8,8 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *     Isaac Pacht (isaacp3 at gmail.com) - fix for bug 206540
+ * Anton Leherbauer (Wind River) - [305858] Allow Builder to return null rule
+ * James Blackburn (Broadcom) - [306822] Provide Context for Builder getRule()
  *******************************************************************************/
 package org.eclipse.core.internal.events;
 
@@ -294,7 +296,7 @@ public class BuildManager implements ICoreConstants, IManager, ILifecycleListene
 	 * Loop the workspace build until no more builders request a rebuild.
 	 */
 	private void basicBuildLoop(IProject[] ordered, IProject[] unordered, int trigger, MultiStatus status, IProgressMonitor monitor) {
-		int projectWork = ordered.length + unordered.length;
+		int projectWork = ordered.length;
 		if (projectWork > 0)
 			projectWork = TOTAL_BUILD_WORK / projectWork;
 		int maxIterations = workspace.getDescription().getMaxBuildIterations();
@@ -613,7 +615,7 @@ public class BuildManager implements ICoreConstants, IManager, ILifecycleListene
 					builderName = currentBuilder.getClass().getName();
 				String pluginId = currentBuilder.getPluginId();
 				String message = NLS.bind(Messages.events_builderError, builderName, currentBuilder.getProject().getName());
-				status.add(new Status(IStatus.WARNING, pluginId, IResourceStatus.BUILD_FAILED, message, e));
+				status.add(new Status(IStatus.ERROR, pluginId, IResourceStatus.BUILD_FAILED, message, e));
 
 				//add the exception status to the MultiStatus
 				if (e instanceof CoreException)
@@ -990,17 +992,28 @@ public class BuildManager implements ICoreConstants, IManager, ILifecycleListene
 			if (project.isAccessible()) {
 				Set rules = new HashSet();
 				commands = ((Project) project).internalGetDescription().getBuildSpec(false);
+				boolean hasNullBuildRule = false;
 				for (int i = 0; i < commands.length; i++) {
 					BuildCommand command = (BuildCommand) commands[i];
 					try {
 						IncrementalProjectBuilder builder = getBuilder(project, command, i, status);
-						if (builder != null)
-							rules.add(builder.getRule());
+						if (builder != null) {
+							ISchedulingRule builderRule = builder.getRule(trigger, args);
+							if (builderRule != null)
+								rules.add(builderRule);
+							else 
+								hasNullBuildRule = true;
+						}
 					} catch (CoreException e) {
 						status.add(e.getStatus());
 					}
 				}
-				return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
+				if (rules.isEmpty())
+					return null;
+				// Bug 306824 - Builders returning a null rule can't work safely if other builders require a non-null rule
+				// Be pessimistic and fall back to the default build rule (workspace root) in this case.
+				if (!hasNullBuildRule)
+					return new MultiRule((ISchedulingRule[]) rules.toArray(new ISchedulingRule[rules.size()]));
 			}
 		} else {
 			// Returns the derived resources for the specified builderName
@@ -1008,7 +1021,7 @@ public class BuildManager implements ICoreConstants, IManager, ILifecycleListene
 			try {
 				IncrementalProjectBuilder builder = getBuilder(project, command, -1, status);
 				if (builder != null)
-					return builder.getRule();
+					return builder.getRule(trigger, args);
 
 			} catch (CoreException e) {
 				status.add(e.getStatus());
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/LifecycleEvent.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/LifecycleEvent.java
index 2e316f8..342691d 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/LifecycleEvent.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/LifecycleEvent.java
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
  *******************************************************************************/
 package org.eclipse.core.internal.events;
 
@@ -34,6 +35,16 @@ public class LifecycleEvent {
 	public static final int PRE_LINK_MOVE = 0x800;
 	public static final int PRE_REFRESH = 0x1000;
 
+	public static final int PRE_GROUP_COPY = 0x2000;
+	public static final int PRE_GROUP_CREATE = 0x4000;
+	public static final int PRE_GROUP_DELETE = 0x8000;
+	public static final int PRE_GROUP_MOVE = 0x10000;
+
+	public static final int PRE_FILTER_ADD = 0x20000;
+	public static final int PRE_FILTER_REMOVE = 0x40000;
+
+	public static final int PRE_LINK_CHANGE = 0x80000;
+
 	/**
 	 * The kind of event
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceComparator.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceComparator.java
index 3873798..b3c54c7 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceComparator.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -116,6 +116,8 @@ public class ResourceComparator implements IElementComparator, ICoreConstants {
 			result |= IResourceDelta.LOCAL_CHANGED;
 		if (!compareCharsets(oldElement, newElement))
 			result |= IResourceDelta.ENCODING;
+		if (!compareDerived(oldElement, newElement))
+			result |= IResourceDelta.DERIVED_CHANGED;
 		if (notification && !compareSync(oldElement, newElement))
 			result |= IResourceDelta.SYNC;
 		if (notification && !compareMarkers(oldElement, newElement))
@@ -125,6 +127,10 @@ public class ResourceComparator implements IElementComparator, ICoreConstants {
 		return result == 0 ? 0 : result | IResourceDelta.CHANGED;
 	}
 
+	private boolean compareDerived(ResourceInfo oldElement, ResourceInfo newElement) {
+		return oldElement.isSet(ICoreConstants.M_DERIVED) == newElement.isSet(ICoreConstants.M_DERIVED);
+	}
+
 	private boolean compareCharsets(ResourceInfo oldElement, ResourceInfo newElement) {
 		return oldElement.getCharsetGenerationCount() == newElement.getCharsetGenerationCount();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceDelta.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceDelta.java
index 3b0d2d7..c7e14bf 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceDelta.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/events/ResourceDelta.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -530,6 +530,12 @@ public class ResourceDelta extends PlatformObject implements IResourceDelta {
 			buffer.append("ENCODING"); //$NON-NLS-1$
 			prev = true;
 		}
+		if ((changeFlags & DERIVED_CHANGED) != 0) {
+			if (prev)
+				buffer.append(" | "); //$NON-NLS-1$
+			buffer.append("DERIVED_CHANGED"); //$NON-NLS-1$
+			prev = true;
+		}
 		buffer.append("}"); //$NON-NLS-1$
 		if (isTeamPrivate())
 			buffer.append(" (team private)"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java
index c28d754..64f28cb 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/CopyVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *******************************************************************************/
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+*******************************************************************************/
 package org.eclipse.core.internal.localstore;
 
+import java.net.URI;
+import java.util.LinkedList;
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.internal.resources.*;
@@ -49,7 +52,7 @@ public class CopyVisitor implements IUnifiedTreeVisitor {
 	private FileSystemResourceManager localManager;
 
 	public CopyVisitor(IResource rootSource, IResource destination, int updateFlags, IProgressMonitor monitor) {
-		this.localManager = ((Resource)rootSource).getLocalManager();
+		this.localManager = ((Resource) rootSource).getLocalManager();
 		this.rootDestination = destination;
 		this.updateFlags = updateFlags;
 		this.isDeep = (updateFlags & IResource.SHALLOW) == 0;
@@ -70,10 +73,25 @@ public class CopyVisitor implements IUnifiedTreeVisitor {
 
 	protected boolean copyContents(UnifiedTreeNode node, Resource source, Resource destination) {
 		try {
-			if (!isDeep && source.isLinked()) {
-				destination.createLink(source.getRawLocationURI(), updateFlags & IResource.ALLOW_MISSING_LOCAL, null);
+			if (source.isVirtual()) {
+				((Folder) destination).create(IResource.VIRTUAL, true, null);
+				return true;
+			}
+			if ((!isDeep || source.isUnderVirtual()) && source.isLinked()) {
+				URI sourceLocationURI = getWorkspace().transferVariableDefinition(source, destination, source.getRawLocationURI());
+				destination.createLink(sourceLocationURI, updateFlags & IResource.ALLOW_MISSING_LOCAL, null);
 				return false;
 			}
+			// update filters in project descriptions
+			if (source instanceof Container && ((Container) source).hasFilters()) {
+				Project sourceProject = (Project) source.getProject();
+				LinkedList/*<FilterDescription>*/originalDescriptions = sourceProject.internalGetDescription().getFilter(source.getProjectRelativePath());
+				LinkedList/*<FilterDescription>*/filterDescriptions = FilterDescription.copy(originalDescriptions, destination);
+				Project project = (Project) destination.getProject();
+				project.internalGetDescription().setFilters(destination.getProjectRelativePath(), filterDescriptions);
+				project.writeDescription(updateFlags);
+			}
+
 			IFileStore sourceStore = node.getStore();
 			IFileStore destinationStore = destination.getStore();
 			//ensure the parent of the root destination exists (bug 126104)
@@ -85,6 +103,8 @@ public class CopyVisitor implements IUnifiedTreeVisitor {
 			localManager.updateLocalSync(info, destinationStore.fetchInfo().getLastModified());
 			//update timestamps on aliases
 			getWorkspace().getAliasManager().updateAliases(destination, destinationStore, IResource.DEPTH_ZERO, monitor);
+			if (destination.getType() == IResource.FILE)
+				((File) destination).updateMetadataFiles();
 		} catch (CoreException e) {
 			status.add(e.getStatus());
 		}
@@ -103,7 +123,7 @@ public class CopyVisitor implements IUnifiedTreeVisitor {
 
 	protected Resource getDestinationResource(Resource source, IPath suffix) {
 		if (suffix.segmentCount() == 0)
-			return (Resource)rootDestination;
+			return (Resource) rootDestination;
 		IPath destinationPath = rootDestination.getFullPath().append(suffix);
 		return getWorkspace().newResource(destinationPath, source.getType());
 	}
@@ -126,6 +146,9 @@ public class CopyVisitor implements IUnifiedTreeVisitor {
 	}
 
 	protected boolean isSynchronized(UnifiedTreeNode node) {
+		/* virtual resources are always deemed as being synchronized */
+		if (node.getResource().isVirtual())
+			return true;
 		/* does the resource exist in workspace and file system? */
 		if (!node.existsInWorkspace() || !node.existsInFileSystem())
 			return false;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/DeleteVisitor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/DeleteVisitor.java
index 0908b2a..3ec3ed6 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/DeleteVisitor.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/DeleteVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -105,7 +105,7 @@ public class DeleteVisitor implements IUnifiedTreeVisitor, ICoreConstants {
 	private void recursiveKeepHistory(IHistoryStore store, UnifiedTreeNode node) {
 		final IResource target = node.getResource();
 		//we don't delete linked content, so no need to keep history
-		if (target.isLinked() || node.isSymbolicLink())
+		if (target.isLinked() || target.isVirtual() || node.isSymbolicLink())
 			return;
 		if (node.isFolder()) {
 			monitor.subTask(NLS.bind(Messages.localstore_deleting, target.getFullPath()));
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileStoreRoot.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileStoreRoot.java
index 3e117f1..af219bd 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileStoreRoot.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileStoreRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.localstore;
 
@@ -15,8 +16,7 @@ import java.net.URI;
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.internal.utils.FileUtil;
-import org.eclipse.core.resources.IPathVariableManager;
-import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 
 /**
@@ -39,8 +39,6 @@ public class FileStoreRoot {
 
 	private URI root;
 
-	private final IPathVariableManager variableManager;
-
 	/**
 	 * Defines the root of a file system within the workspace tree.
 	 * @param rootURI The virtual file representing the root of the file
@@ -51,12 +49,29 @@ public class FileStoreRoot {
 	FileStoreRoot(URI rootURI, IPath workspacePath) {
 		Assert.isNotNull(rootURI);
 		Assert.isNotNull(workspacePath);
-		this.variableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
 		this.root = rootURI;
 		this.chop = workspacePath.segmentCount();
 		this.localRoot = toLocalPath(root);
 	}
 
+	private IPathVariableManager getManager(IPath workspacePath) {
+		if (workspacePath.segmentCount() > 0) {
+			IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace()
+					.getRoot();
+			IPath path = (IPath) workspacePath.clone();
+			while (path.segmentCount() > 0) {
+				IResource resource = workspaceRoot.findMember(path);
+				if (resource != null) {
+					if (path.segmentCount() < workspacePath.segmentCount())
+						resource = ((IContainer) resource).getFile(workspacePath.removeFirstSegments(path.segmentCount()));
+					return resource.getPathVariableManager();
+				}
+				path = path.removeLastSegments(1);
+			}
+		}
+		return ResourcesPlugin.getWorkspace().getPathVariableManager();
+	}
+
 	/**
 	 * Returns the resolved, absolute file system location of the resource
 	 * corresponding to the given workspace path, or null if none could
@@ -64,7 +79,7 @@ public class FileStoreRoot {
 	 */
 	public URI computeURI(IPath workspacePath) {
 		IPath childPath = workspacePath.removeFirstSegments(chop);
-		final URI rootURI = variableManager.resolveURI(root);
+		final URI rootURI = getManager(workspacePath).resolveURI(root);
 		if (childPath.segmentCount() == 0)
 			return rootURI;
 		try {
@@ -78,10 +93,10 @@ public class FileStoreRoot {
 	 * Creates an IFileStore for a given workspace path.
 	 * @exception CoreException If the file system for that resource is undefined
 	 */
-	IFileStore createStore(IPath workspacePath) throws CoreException {
+	IFileStore createStore(IPath workspacePath, IResource resource) throws CoreException {
 		IPath childPath = workspacePath.removeFirstSegments(chop);
 		IFileStore rootStore;
-		final URI uri = variableManager.resolveURI(root);
+		final URI uri = resource.getPathVariableManager().resolveURI(root);
 		if (!uri.isAbsolute()) {
 			//handles case where resource location cannot be resolved
 			//such as unresolved path variable or invalid file system scheme
@@ -97,7 +112,7 @@ public class FileStoreRoot {
 		return isValid;
 	}
 
-	IPath localLocation(IPath workspacePath) {
+	IPath localLocation(IPath workspacePath, IResource resource) {
 		if (localRoot == null)
 			return null;
 		IPath location;
@@ -105,9 +120,11 @@ public class FileStoreRoot {
 			location = localRoot;
 		else
 			location = localRoot.append(workspacePath.removeFirstSegments(chop));
-		location = variableManager.resolvePath(location);
-		//if path is still relative then path variable could not be resolved
-		if (!location.isAbsolute())
+		location = resource.getPathVariableManager().resolvePath(location);
+		
+		// if path is still relative then path variable could not be resolved
+		// if path is null, it means path variable refers to a non-local filesystem
+		if (location == null || !location.isAbsolute())
 			return null;
 		return location;
 	}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
index 03c5e1e..33d9fc5 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Martin Oberhuber (Wind River) - [210664] descriptionChanged(): ignore LF style
+ *     Martin Oberhuber (Wind River) - [233939] findFilesForLocation() with symlinks
  *******************************************************************************/
 package org.eclipse.core.internal.localstore;
 
@@ -50,7 +51,18 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 	 * </p>
 	 */
 	protected ArrayList allPathsForLocation(URI inputLocation) {
-		URI location = FileUtil.canonicalURI(inputLocation);
+		URI canonicalLocation = FileUtil.canonicalURI(inputLocation);
+		// First, try the canonical version of the inputLocation.
+		// If the inputLocation is different from the canonical version, it will be tried second
+		ArrayList results = allPathsForLocationNonCanonical(canonicalLocation);
+		if(results.size()==0 && canonicalLocation!=inputLocation) {
+			results = allPathsForLocationNonCanonical(inputLocation);
+		}
+		return results;
+	}
+	
+	private ArrayList allPathsForLocationNonCanonical(URI inputLocation) {
+		URI location = inputLocation;
 		final boolean isFileLocation = EFS.SCHEME_FILE.equals(inputLocation.getScheme());
 		final IWorkspaceRoot root = getWorkspace().getRoot();
 		final ArrayList results = new ArrayList();
@@ -59,7 +71,6 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 			results.add(Path.ROOT);
 			return results;
 		}
-		IPathVariableManager varMan = workspace.getPathVariableManager();
 		IProject[] projects = root.getProjects(IContainer.INCLUDE_HIDDEN);
 		for (int i = 0; i < projects.length; i++) {
 			IProject project = projects[i];
@@ -85,7 +96,9 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 				continue;
 			for (Iterator it = links.values().iterator(); it.hasNext();) {
 				LinkDescription link = (LinkDescription) it.next();
-				testLocation = varMan.resolveURI(link.getLocationURI());
+				IResource resource = project.findMember(link.getProjectRelativePath());
+				IPathVariableManager pathMan = resource == null ? project.getPathVariableManager() : resource.getPathVariableManager();
+				testLocation = pathMan.resolveURI(link.getLocationURI());
 				// if we are looking for file: locations try to get a file: location for this link
 				if (isFileLocation && !EFS.SCHEME_FILE.equals(testLocation.getScheme()))
 					testLocation = getFileURI(testLocation);
@@ -352,6 +365,16 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 		}
 		return false;
 	}
+	
+	public boolean fastIsSynchronized(Folder target) {
+		ResourceInfo info = target.getResourceInfo(false, false);
+		if (target.exists(target.getFlags(info), true)) {
+			IFileInfo fileInfo = getStore(target).fetchInfo();
+			if (!fileInfo.exists() && info.getLocalSyncInfo() == fileInfo.getLastModified())
+				return true;
+		}
+		return false;
+	}
 
 	/**
 	 * Returns an IFile for the given file system location or null if there
@@ -405,7 +428,7 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 	 */
 	public IFileStore getStore(IResource target) {
 		try {
-			return getStoreRoot(target).createStore(target.getFullPath());
+			return getStoreRoot(target).createStore(target.getFullPath(), target);
 		} catch (CoreException e) {
 			//callers aren't expecting failure here, so return null file system
 			return EFS.getNullFileSystem().getStore(target.getFullPath());
@@ -422,6 +445,14 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 			root = info.getFileStoreRoot();
 			if (root != null && root.isValid())
 				return root;
+			if (info.isSet(ICoreConstants.M_VIRTUAL)) {
+				ProjectDescription description = ((Project) target.getProject()).internalGetDescription();
+				if (description != null) {
+					setLocation(target, info, description.getGroupLocationURI(target.getProjectRelativePath()));
+					return info.getFileStoreRoot();
+				}
+				return info.getFileStoreRoot();
+			}
 			if (info.isSet(ICoreConstants.M_LINK)) {
 				ProjectDescription description = ((Project) target.getProject()).internalGetDescription();
 				if (description != null) {
@@ -478,7 +509,7 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 		ResourceInfo info = ((Resource) target).getResourceInfo(false, true);
 		setLocation(target, info, location);
 		FileStoreRoot root = getStoreRoot(target);
-		return root.createStore(target.getFullPath());
+		return root.createStore(target.getFullPath(), target);
 	}
 
 	/**
@@ -580,6 +611,10 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 				if (!target.isAccessible())
 					return true;
 				break;
+			case IResource.FOLDER :
+				if (fastIsSynchronized((Folder) target))
+					return true;
+				break;
 			case IResource.FILE :
 				if (fastIsSynchronized((File) target))
 					return true;
@@ -613,7 +648,7 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 	 * Returns null if the location could not be resolved.
 	 */
 	public IPath locationFor(IResource target) {
-		return getStoreRoot(target).localLocation(target.getFullPath());
+		return getStoreRoot(target).localLocation(target.getFullPath(), target);
 	}
 
 	/**
@@ -678,6 +713,8 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 	 * description, or if the description was missing.
 	 */
 	public ProjectDescription read(IProject target, boolean creation) throws CoreException {
+		IProgressMonitor monitor = Policy.monitorFor(null);
+		
 		//read the project location if this project is being created
 		URI projectLocation = null;
 		ProjectDescription privateDescription = null;
@@ -702,8 +739,13 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 		ResourceException error = null;
 		InputStream in = null;
 		try {
-			in = new BufferedInputStream(descriptionStore.openInputStream(EFS.NONE, null));
+			in = new BufferedInputStream(descriptionStore.openInputStream(EFS.NONE, monitor));
+			// IFileStore#openInputStream may cancel the monitor, thus the monitor state is checked
+			Policy.checkCanceled(monitor);
 			description = new ProjectDescriptionReader(target).read(new InputSource(in));
+		} catch (OperationCanceledException e) {
+			String msg = NLS.bind(Messages.resources_missingProjectMeta, target.getName());
+			throw new ResourceException(IResourceStatus.FAILED_READ_METADATA, target.getFullPath(), msg, e);
 		} catch (CoreException e) {
 			//try the legacy location in the meta area
 			description = getWorkspace().getMetaArea().readOldDescription(target);
@@ -723,8 +765,6 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 			error = new ResourceException(IResourceStatus.FAILED_READ_METADATA, target.getFullPath(), msg, null);
 		}
 		if (description != null) {
-			//don't trust the project name in the description file
-			description.setName(target.getName());
 			if (!isDefaultLocation)
 				description.setLocationURI(projectLocation);
 			if (creation && privateDescription != null)
@@ -929,12 +969,16 @@ public class FileSystemResourceManager implements ICoreConstants, IManager {
 				}
 			} else {
 				if (target.isLocal(IResource.DEPTH_ZERO)) {
-					// test if timestamp is the same since last synchronization
 					ResourceInfo info = ((Resource) target).getResourceInfo(true, false);
+					// test if timestamp is the same since last synchronization
 					if (lastModified != info.getLocalSyncInfo()) {
 						String message = NLS.bind(Messages.localstore_resourceIsOutOfSync, target.getFullPath());
 						throw new ResourceException(IResourceStatus.OUT_OF_SYNC_LOCAL, target.getFullPath(), message, null);
 					}
+					if (!fileInfo.exists()) {
+						String message = NLS.bind(Messages.localstore_resourceDoesNotExist, target.getFullPath());
+						throw new ResourceException(IResourceStatus.NOT_FOUND_LOCAL, target.getFullPath(), message, null);
+					}
 				} else {
 					if (fileInfo.exists()) {
 						String message = NLS.bind(Messages.localstore_resourceExists, target.getFullPath());
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/HistoryStore2.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/HistoryStore2.java
index a01b5b0..0ff2757 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/HistoryStore2.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/HistoryStore2.java
@@ -153,17 +153,19 @@ public class HistoryStore2 implements IHistoryStore {
 			final long minimumTimestamp = System.currentTimeMillis() - description.getFileStateLongevity();
 			final int maxStates = description.getMaxFileStates();
 			final int[] entryCount = new int[1];
-			tree.accept(new Bucket.Visitor() {
-				public int visit(Entry fileEntry) {
-					if (monitor.isCanceled())
-						return STOP;
-					entryCount[0] += fileEntry.getOccurrences();
-					applyPolicy((HistoryEntry) fileEntry, maxStates, minimumTimestamp);
-					// remove unreferenced blobs, when blobsToRemove size is greater than 100
-					removeUnreferencedBlobs(100);
-					return monitor.isCanceled() ? STOP : CONTINUE;
-				}
-			}, Path.ROOT, BucketTree.DEPTH_INFINITE);
+			if (description.isApplyFileStatePolicy()) {
+				tree.accept(new Bucket.Visitor() {
+					public int visit(Entry fileEntry) {
+						if (monitor.isCanceled())
+							return STOP;
+						entryCount[0] += fileEntry.getOccurrences();
+						applyPolicy((HistoryEntry) fileEntry, maxStates, minimumTimestamp);
+						// remove unreferenced blobs, when blobsToRemove size is greater than 100
+						removeUnreferencedBlobs(100);
+						return monitor.isCanceled() ? STOP : CONTINUE;
+					}
+				}, Path.ROOT, BucketTree.DEPTH_INFINITE);
+			}
 			if (Policy.DEBUG_HISTORY) {
 				Policy.debug("Time to apply history store policies: " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$
 				Policy.debug("Total number of history store entries: " + entryCount[0]); //$NON-NLS-1$
@@ -296,6 +298,8 @@ public class HistoryStore2 implements IHistoryStore {
 	 */
 	private boolean isValid(IFileStore localFile, IFileInfo info) {
 		WorkspaceDescription description = workspace.internalGetDescription();
+		if (!description.isApplyFileStatePolicy())
+			return true;
 		long length = info.getLength();
 		boolean result = length <= description.getMaxFileStateSize();
 		if (Policy.DEBUG_HISTORY && !result)
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalAliasVisitor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalAliasVisitor.java
index 8497aff..524853d 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalAliasVisitor.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalAliasVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,8 +33,10 @@ public class RefreshLocalAliasVisitor extends RefreshLocalVisitor {
 			return;
 		IResource[] aliases = workspace.getAliasManager().computeAliases(target, store);
 		if (aliases != null)
-			for (int i = 0; i < aliases.length; i++)
-				super.createResource(node, (Resource) aliases[i]);
+			for (int i = 0; i < aliases.length; i++) {
+				if (aliases[i].getProject().isOpen() && !((Resource) aliases[i]).isFiltered())
+					super.createResource(node, (Resource) aliases[i]);
+			}
 	}
 
 	protected void deleteResource(UnifiedTreeNode node, Resource target) throws CoreException {
@@ -43,9 +45,21 @@ public class RefreshLocalAliasVisitor extends RefreshLocalVisitor {
 		if (store == null)
 			return;
 		IResource[] aliases = workspace.getAliasManager().computeAliases(target, store);
-		if (aliases != null)
-			for (int i = 0; i < aliases.length; i++)
-				super.deleteResource(node, (Resource) aliases[i]);
+		if (aliases != null) {
+			boolean wasFilteredOut = false;
+			if (store.fetchInfo() != null && store.fetchInfo().exists())
+				wasFilteredOut = target.isFiltered();
+			for (int i = 0; i < aliases.length; i++) {
+				if (aliases[i].getProject().isOpen()) {
+					if (wasFilteredOut) {
+						if (((Resource) aliases[i]).isFiltered())
+							super.deleteResource(node, (Resource) aliases[i]);
+					}
+					else
+						super.deleteResource(node, (Resource) aliases[i]);
+				}
+			}
+		}
 	}
 
 	protected void resourceChanged(UnifiedTreeNode node, Resource target) {
@@ -55,8 +69,10 @@ public class RefreshLocalAliasVisitor extends RefreshLocalVisitor {
 			return;
 		IResource[] aliases = workspace.getAliasManager().computeAliases(target, store);
 		if (aliases != null)
-			for (int i = 0; i < aliases.length; i++)
-				super.resourceChanged(node, (Resource) aliases[i]);
+			for (int i = 0; i < aliases.length; i++) {
+				if (aliases[i].getProject().isOpen())
+					super.resourceChanged(node, (Resource) aliases[i]);
+			}
 	}
 
 	protected void fileToFolder(UnifiedTreeNode node, Resource target) throws CoreException {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java
index eb86170..b9db85f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/RefreshLocalVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -91,8 +91,10 @@ public class RefreshLocalVisitor implements IUnifiedTreeVisitor, ILocalStoreCons
 			//just clear local sync info
 			info = target.getResourceInfo(false, true);
 			//handle concurrent deletion
-			if (info != null)
+			if (info != null) {
 				info.clearModificationStamp();
+				target.getLocalManager().updateLocalSync(info, node.getLastModified());
+			}
 			return;
 		}
 		if (target.exists(flags, false))
@@ -181,8 +183,9 @@ public class RefreshLocalVisitor implements IUnifiedTreeVisitor, ILocalStoreCons
 	protected int synchronizeExistence(UnifiedTreeNode node, Resource target) throws CoreException {
 		if (node.existsInWorkspace()) {
 			if (!node.existsInFileSystem()) {
-				//non-local files are always in sync
-				if (target.isLocal(IResource.DEPTH_ZERO)) {
+				// 1. non-local files are always in sync
+				// 2. links to non-existent locations with the modification stamp of IResource.NULL_STAMP are in sync
+				if (target.isLocal(IResource.DEPTH_ZERO) && target.getModificationStamp() != IResource.NULL_STAMP) {
 					deleteResource(node, target);
 					resourceChanged = true;
 					return RL_NOT_IN_SYNC;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java
index 1c1f1fb..64075af 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java
@@ -1,14 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Martin Oberhuber (Wind River) - [105554] handle cyclic symbolic links
  *     Martin Oberhuber (Wind River) - [232426] shared prefix histories for symlinks
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
  *     Martin Oberhuber (Wind River) - [292267] OutOfMemoryError due to leak in UnifiedTree
  *******************************************************************************/
 package org.eclipse.core.internal.localstore;
@@ -57,7 +58,7 @@ public class UnifiedTree {
 	protected int level;
 	/** our queue */
 	protected Queue queue;
-	
+
 	/** path prefixes for checking symbolic link cycles */
 	protected PrefixPool pathPrefixHistory, rootPathHistory;
 
@@ -72,7 +73,7 @@ public class UnifiedTree {
 	}
 
 	/**
-	 * Pass in a a root for the tree, a file tree containing all of the entries for this 
+	 * Pass in a a root for the tree, a file tree containing all of the entries for this
 	 * tree and a flag indicating whether the UnifiedTree should consult the fileTree where
 	 * possible for entries
 	 * @param root
@@ -122,7 +123,7 @@ public class UnifiedTree {
 	protected void addChildren(UnifiedTreeNode node) {
 		Resource parent = (Resource) node.getResource();
 
-		// is there a possibility to have children? 
+		// is there a possibility to have children?
 		int parentType = parent.getType();
 		if (parentType == IResource.FILE && !node.isFolder())
 			return;
@@ -131,17 +132,17 @@ public class UnifiedTree {
 		if (!parent.getProject().isAccessible())
 			return;
 
-		// get the list of resources in the file system 
+		// get the list of resources in the file system
 		// don't ask for local children if we know it doesn't exist locally
 		IFileInfo[] list = node.existsInFileSystem() ? getLocalList(node) : NO_CHILDREN;
 		int localIndex = 0;
 
-		// See if the children of this resource have been computed before 
+		// See if the children of this resource have been computed before
 		ResourceInfo resourceInfo = parent.getResourceInfo(false, false);
 		int flags = parent.getFlags(resourceInfo);
 		boolean unknown = ResourceInfo.isSet(flags, ICoreConstants.M_CHILDREN_UNKNOWN);
 
-		// get the list of resources in the workspace 
+		// get the list of resources in the workspace
 		if (!unknown && (parentType == IResource.FOLDER || parentType == IResource.PROJECT) && parent.exists(flags, true)) {
 			IResource target = null;
 			UnifiedTreeNode child = null;
@@ -272,7 +273,7 @@ public class UnifiedTree {
 	}
 
 	/**
-	 * Creates a child node for a location in the file system. Does nothing and returns null if the location does not correspond to a valid file/folder. 
+	 * Creates a child node for a location in the file system. Does nothing and returns null if the location does not correspond to a valid file/folder.
 	 */
 	protected UnifiedTreeNode createChildNodeFromFileSystem(UnifiedTreeNode parent, IFileInfo info) {
 		IPath childPath = parent.getResource().getFullPath().append(info.getName());
@@ -338,8 +339,9 @@ public class UnifiedTree {
 		try {
 			final IFileStore store = node.getStore();
 			IFileInfo[] list = fileTree != null ? fileTree.getChildInfos(store) : store.childInfos(EFS.NONE, null);
-			if (list == null)
+			if (list == null || list.length == 0)
 				return NO_CHILDREN;
+			list = ((Resource) node.getResource()).filterChildren(list, false);
 			int size = list.length;
 			if (size > 1)
 				quickSort(list, 0, size - 1);
@@ -379,7 +381,7 @@ public class UnifiedTree {
 
 	private static class PatternHolder {
 		//Initialize-on-demand Holder class to avoid compiling Pattern if never needed
-		//Pattern: A UNIX relative path that just points backward 
+		//Pattern: A UNIX relative path that just points backward
 		public static Pattern trivialSymlinkPattern = Pattern.compile("\\.[./]*"); //$NON-NLS-1$
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/properties/PropertyManager2.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/properties/PropertyManager2.java
index 18548a9..5dc3a6b 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/properties/PropertyManager2.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/properties/PropertyManager2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,9 @@ import org.eclipse.osgi.util.NLS;
  * @see org.eclipse.core.internal.properties.IPropertyManager
  */
 public class PropertyManager2 implements IPropertyManager {
+	
+	private static final int MAX_VALUE_SIZE = 2 * 1024;
+
 	class PropertyCopyVisitor extends Bucket.Visitor {
 		private List changes = new ArrayList();
 		private IPath destination;
@@ -149,8 +152,8 @@ public class PropertyManager2 implements IPropertyManager {
 		int flags = resource.getFlags(info);
 		resource.checkAccessible(flags);
 		// enforce the limit stated by the spec
-		if (value != null && value.length() > 2 * 1024) {
-			String message = NLS.bind(Messages.properties_valueTooLong, name.getQualifier(), name.getLocalName());
+		if (value != null && value.length() > MAX_VALUE_SIZE) {
+			String message = NLS.bind(Messages.properties_valueTooLong, new Object[] {name.getQualifier(), name.getLocalName(), new Integer(MAX_VALUE_SIZE).toString()});
 			throw new ResourceException(IResourceStatus.FAILED_WRITE_METADATA, target.getFullPath(), message, null);
 		}
 		if (name.getQualifier() == null) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/propertytester/FilePropertyTester.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/propertytester/FilePropertyTester.java
index 55390b1..7b8d945 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/propertytester/FilePropertyTester.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/propertytester/FilePropertyTester.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,10 +13,10 @@ package org.eclipse.core.internal.propertytester;
 
 import org.eclipse.core.internal.utils.Policy;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeMatcher;
 
 /**
  * A property tester for various properties of files.
@@ -26,12 +26,29 @@ import org.eclipse.core.runtime.content.IContentType;
 public class FilePropertyTester extends ResourcePropertyTester {
 
 	/**
-	 * A property indicating that we are looking to verify that the file matches
-	 * the content type matching the given identifier. The identifier is
-	 * provided as the expected value.
+	 * A property indicating a content type on the selected file (value <code>"contentTypeId"</code>). 
+	 * <code>"kindOf"</code> indicates that the file content type should be the kind of the one given as the expected value.
+	 * If <code>"kindOf"</code> is not specified, the file content type identifier should equals the expected value.
+	 * @see IContentType#isKindOf(IContentType)
 	 */
 	private static final String CONTENT_TYPE_ID = "contentTypeId"; //$NON-NLS-1$
 
+	/**
+	 * An argument for <code>"contentTypeId"</code>.
+	 * <code>"kindOf"</code> indicates that the file content type should be the kind of the one given as the expected value.
+	 * If <code>"kindOf"</code> is not specified, the file content type identifier should equals the expected value.
+	 * @see IContentType#isKindOf(IContentType)
+	 */
+	private static final String IS_KIND_OF = "kindOf"; //$NON-NLS-1$
+
+	/**
+	 * An argument for <code>"contentTypeId"</code>.
+	 * Setting <code>"useFilenameOnly"</code> indicates that the file content type should be determined by the file name only.
+	 * If <code>"useFilenameOnly"</code> is not specified, the file content type is determined by both, the file name and content.
+	 * @see IContentTypeMatcher#findContentTypeFor(String)
+	 */
+	private static final String USE_FILENAME_ONLY = "useFilenameOnly"; //$NON-NLS-1$
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -40,39 +57,68 @@ public class FilePropertyTester extends ResourcePropertyTester {
 	 */
 	public boolean test(Object receiver, String method, Object[] args, Object expectedValue) {
 		if ((receiver instanceof IFile) && method.equals(CONTENT_TYPE_ID))
-			return testContentType((IFile) receiver, toString(expectedValue));
+			return testContentType((IFile) receiver, toString(expectedValue), isArgumentUsed(args, IS_KIND_OF), isArgumentUsed(args, USE_FILENAME_ONLY));
+		return false;
+	}
+
+	private boolean isArgumentUsed(Object[] args, String value) {
+		for (int i = 0; i < args.length; i++)
+			if (value.equals(args[i]))
+				return true;
 		return false;
 	}
 
 	/**
-	 * Tests whether the content type for <code>file</code> matches the
-	 * <code>contentTypeId</code>. It is possible that this method call could
+	 * <p>
+	 * Tests whether the content type for <code>file</code> matches 
+	 * or is a kind of <code>contentTypeId</code>.
+	 * </p>
+	 * <p>
+	 * It is possible that this method call could
 	 * cause the file to be read. It is also possible (through poor plug-in
 	 * design) for this method to load plug-ins.
+	 * </p>
 	 * 
 	 * @param file
-	 *            The file for which the content type should be determined; must
-	 *            not be <code>null</code>.
+	 *            The file to test. Must not be <code>null</code>.
 	 * @param contentTypeId
-	 *            The expected content type; must not be <code>null</code>.
-	 * @return <code>true</code> iff the best matching content type has an
-	 *         identifier that matches <code>contentTypeId</code>;
-	 *         <code>false</code> otherwise.
+	 *            The content type to test. Must not be <code>null</code>.
+	 * @param isKindOfUsed
+	 *            Indicates whether the file content type should match <code>contentTypeId</code> 
+	 *            or should be a kind of <code>contentTypeId</code>.
+	 * @param useFilenameOnly
+	 *            Indicates to determine the file content type based on the file name only.
+	 * @return <code>true</code>, if the best matching content type for <code>file</code>
+	 * 		<ul>
+	 *			<li>has an identifier that matches <code>contentTypeId</code> 
+	 *			and <code>isKindOfUsed</code> is <code>false</code>, or</li>
+	 * 			<li>is a kind of <code>contentTypeId</code> 
+	 * 			and <code>isKindOfUsed</code> is <code>true</code>.</li>
+	 * 		</ul>
+	 * Otherwise it returns <code>false</code>.
 	 */
-	private boolean testContentType(final IFile file, String contentTypeId) {
+	private boolean testContentType(final IFile file, String contentTypeId, boolean isKindOfUsed, boolean useFilenameOnly) {
 		final String expectedValue = contentTypeId.trim();
-
-		String actualValue = null;
-		try {
-			IContentDescription contentDescription = file.getContentDescription();
-			if (contentDescription != null) {
-				IContentType contentType = contentDescription.getContentType();
-				actualValue = contentType.getId();
+		IContentType actualContentType = null;
+		if (!useFilenameOnly) {
+			if (!file.exists())
+				return false;
+			IContentDescription contentDescription = null;
+			try {
+				contentDescription = file.getContentDescription();
+			} catch (CoreException e) {
+				Policy.log(IStatus.ERROR, "Core exception while retrieving the content description", e);//$NON-NLS-1$
 			}
-		} catch (CoreException e) {
-			Policy.log(IStatus.ERROR, "Core exception while retrieving the content description", e);//$NON-NLS-1$
+			if (contentDescription != null)
+				actualContentType = contentDescription.getContentType();
+		} else {
+			actualContentType = Platform.getContentTypeManager().findContentTypeFor(file.getName());
 		}
-		return expectedValue.equals(actualValue);
+		if (actualContentType != null) {
+			if (isKindOfUsed)
+				return actualContentType.isKindOf(Platform.getContentTypeManager().getContentType(expectedValue));
+			return expectedValue.equals(actualContentType.getId());
+		}
+		return false;
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/refresh/RefreshJob.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/refresh/RefreshJob.java
index 4ae21f2..6078251 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/refresh/RefreshJob.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/refresh/RefreshJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2008 IBM Corporation and others.
+ *  Copyright (c) 2004, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -163,7 +163,7 @@ public class RefreshJob extends WorkspaceJob {
 				try {
 					refreshCount++;
 					long refreshTime = -System.currentTimeMillis();
-					toRefresh.refreshLocal(1000 + depth, null);
+					toRefresh.refreshLocal(1000 + depth, Policy.subMonitorFor(monitor, 0));
 					refreshTime += System.currentTimeMillis();
 					if (refreshTime > longestRefresh)
 						longestRefresh = refreshTime;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/AliasManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/AliasManager.java
index db78307..a258cd7 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/AliasManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/AliasManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,9 +9,12 @@
  *     IBM Corporation - initial API and implementation
  *     manklu at web.de - fix for bug 156082
  *     Bert Vingerhoets - fix for bug 169975
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Fix Concurency Exception
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
+import org.eclipse.core.runtime.CoreException;
+
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.filesystem.EFS;
@@ -351,7 +354,9 @@ public class AliasManager implements IManager, ILifecycleListener, IResourceChan
 			IResource link = project.findMember(linkDesc.getProjectRelativePath());
 			if (link != null) {
 				try {
-					addToLocationsMap(link, EFS.getStore(linkDesc.getLocationURI()));
+					URI locationURI = linkDesc.getLocationURI();
+					locationURI = link.getPathVariableManager().resolveURI(locationURI);
+					addToLocationsMap(link, EFS.getStore(locationURI));
 				} catch (CoreException e) {
 					//ignore links with invalid locations
 				}
@@ -360,7 +365,7 @@ public class AliasManager implements IManager, ILifecycleListener, IResourceChan
 	}
 
 	private void addToLocationsMap(IResource link, IFileStore location) {
-		if (location != null)
+		if (location != null && !link.isVirtual())
 			if (locationsMap.add(location, link))
 				nonDefaultResourceCount++;
 	}
@@ -537,11 +542,18 @@ public class AliasManager implements IManager, ILifecycleListener, IResourceChan
 		 * next alias request.
 		 */
 		switch (event.kind) {
+			case LifecycleEvent.PRE_LINK_CHANGE:
 			case LifecycleEvent.PRE_LINK_DELETE :
 				Resource link = (Resource) event.resource;
 				if (link.isLinked())
 					removeFromLocationsMap(link, link.getStore());
 				//fall through
+			case LifecycleEvent.PRE_FILTER_ADD:
+				changedLinks.add(event.resource);
+				break;
+			case LifecycleEvent.PRE_FILTER_REMOVE:
+				changedLinks.add(event.resource);
+				break;
 			case LifecycleEvent.PRE_LINK_CREATE :
 				changedLinks.add(event.resource);
 				break;
@@ -675,7 +687,8 @@ public class AliasManager implements IManager, ILifecycleListener, IResourceChan
 		if (aliases.size() == 0)
 			return;
 		FileSystemResourceManager localManager = workspace.getFileSystemManager();
-		for (Iterator it = aliases.iterator(); it.hasNext();) {
+		HashSet aliasesCopy = (HashSet) aliases.clone();
+		for (Iterator it = aliasesCopy.iterator(); it.hasNext();) {
 			IResource alias = (IResource) it.next();
 			monitor.subTask(NLS.bind(Messages.links_updatingDuplicate, alias.getFullPath()));
 			if (alias.getType() == IResource.PROJECT) {
@@ -683,7 +696,8 @@ public class AliasManager implements IManager, ILifecycleListener, IResourceChan
 					continue;
 				//project did not require deletion, so fall through below and refresh it
 			}
-			localManager.refresh(alias, IResource.DEPTH_INFINITE, false, null);
+			if (!((Resource)alias).isFiltered())
+				localManager.refresh(alias, IResource.DEPTH_INFINITE, false, null);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
index 8af6f84..b420671 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,7 +33,7 @@ public class CharsetManager implements IManager {
 	 */
 	private class CharsetManagerJob extends Job {
 		private static final int CHARSET_UPDATE_DELAY = 500;
-		private List asyncChanges = new ArrayList();
+		private List/*<Map.Entry<IProject, Boolean>>*/ asyncChanges = new ArrayList/*<Map.Entry<IProject, Boolean>>*/();
 
 		public CharsetManagerJob() {
 			super(Messages.resources_charsetUpdating);
@@ -41,19 +41,19 @@ public class CharsetManager implements IManager {
 			setPriority(Job.INTERACTIVE);
 		}
 
-		public void addChanges(Set newChanges) {
+		public void addChanges(Map/*<IProject, Boolean>*/ newChanges) {
 			if (newChanges.isEmpty())
 				return;
 			synchronized (asyncChanges) {
-				asyncChanges.addAll(newChanges);
+				asyncChanges.addAll(newChanges.entrySet());
 				asyncChanges.notify();
 			}
 			schedule(CHARSET_UPDATE_DELAY);
 		}
 
-		public IProject getNextChange() {
+		public Map.Entry/*<IProject, Boolean>*/ getNextChange() {
 			synchronized (asyncChanges) {
-				return asyncChanges.isEmpty() ? null : (IProject) asyncChanges.remove(asyncChanges.size() - 1);
+				return asyncChanges.isEmpty() ? null : (Map.Entry)asyncChanges.remove(asyncChanges.size() - 1);
 			}
 		}
 
@@ -69,22 +69,25 @@ public class CharsetManager implements IManager {
 				try {
 					workspace.prepareOperation(rule, monitor);
 					workspace.beginOperation(true);
-					IProject next;
+					Map.Entry/*<IProject, Boolean>*/ next;
 					while ((next = getNextChange()) != null) {
 						//just exit if the system is shutting down or has been shut down
 						//it is too late to change the workspace at this point anyway
 						if (systemBundle.getState() != Bundle.ACTIVE)
 							return Status.OK_STATUS;
+						IProject project = (IProject)next.getKey();
 						try {
-							if (next.isAccessible()) {
-								Preferences projectPrefs = getPreferences(next, false);
-								if (projectPrefs != null)
-									projectPrefs.flush();
+							if (project.isAccessible()) {
+								boolean shouldDisableCharsetDeltaJob = ((Boolean)next.getValue()).booleanValue();
+								// flush prefs for non-derived resources
+								flushPreferences(getPreferences(project, false, false, true), shouldDisableCharsetDeltaJob);
+								// flush prefs for derived resources
+								flushPreferences(getPreferences(project, false, true, true), shouldDisableCharsetDeltaJob);
 							}
 						} catch (BackingStoreException e) {
 							// we got an error saving					
 							String detailMessage = Messages.resources_savingEncoding;
-							result.add(new ResourceStatus(IResourceStatus.FAILED_SETTING_CHARSET, next.getFullPath(), detailMessage, e));
+							result.add(new ResourceStatus(IResourceStatus.FAILED_SETTING_CHARSET, project.getFullPath(), detailMessage, e));
 						}
 					}
 					monitor.worked(Policy.opWork);
@@ -112,48 +115,106 @@ public class CharsetManager implements IManager {
 		}
 	}
 
-	class Listener implements IResourceChangeListener {
+	private class ResourceChangeListener implements IResourceChangeListener {
+		public ResourceChangeListener() {
+		}
 
-		private void processEntryChanges(IResourceDelta projectDelta, Set projectsToSave) {
-			// check each resource with user-set encoding to see if it has
-			// been moved/deleted
+		private boolean moveSettingsIfDerivedChanged(IResourceDelta parent, IProject currentProject, Preferences projectPrefs, String[] affectedResources) {
 			boolean resourceChanges = false;
+
+			if ((parent.getFlags() & IResourceDelta.DERIVED_CHANGED) != 0) {
+				// if derived changed, move encoding to correct prefs
+				IPath parentPath = parent.getResource().getProjectRelativePath();
+				for (int i = 0; i < affectedResources.length; i++) {
+					IPath affectedPath = new Path(affectedResources[i]);
+					// if parentPath is an ancestor of affectedPath
+					if (parentPath.isPrefixOf(affectedPath)) {
+						IResource member = currentProject.findMember(affectedPath);
+						if (member != null) {
+							Preferences targetPrefs = getPreferences(currentProject, true, member.isDerived(IResource.CHECK_ANCESTORS));
+							// if new prefs are different than current
+							if (!projectPrefs.absolutePath().equals(targetPrefs.absolutePath())) {
+								// remove encoding from old prefs and save in correct prefs
+								String currentValue = projectPrefs.get(affectedResources[i], null);
+								projectPrefs.remove(affectedResources[i]);
+								targetPrefs.put(affectedResources[i], currentValue);
+								resourceChanges = true;
+							}
+						}
+					}
+				}
+			}
+
+			IResourceDelta[] children = parent.getAffectedChildren();
+			for (int i = 0; i < children.length; i++) {
+				resourceChanges = moveSettingsIfDerivedChanged(children[i], currentProject, projectPrefs, affectedResources) || resourceChanges;
+			}
+			return resourceChanges;
+		}
+
+		private void processEntryChanges(IResourceDelta projectDelta, Map/*<IProject, Boolean>*/ projectsToSave) {
+			// check each resource with user-set encoding to see if it has
+			// been moved/deleted or if derived state has been changed
 			IProject currentProject = (IProject) projectDelta.getResource();
-			Preferences projectPrefs = getPreferences(currentProject, false);
-			if (projectPrefs == null)
-				// no preferences for this project, just bail
-				return;
-			String[] affectedResources;
+			Preferences projectRegularPrefs = getPreferences(currentProject, false, false, true);
+			Preferences projectDerivedPrefs = getPreferences(currentProject, false, true, true);
+			Map/*<Boolean, String[]>*/ affectedResourcesMap = new HashMap/*<Boolean, String[]>*/();
 			try {
-				affectedResources = projectPrefs.keys();
+				// no regular preferences for this project
+				if (projectRegularPrefs == null)
+					affectedResourcesMap.put(Boolean.FALSE, new String[0]);
+				else
+					affectedResourcesMap.put(Boolean.FALSE, projectRegularPrefs.keys());
+				// no derived preferences for this project
+				if (projectDerivedPrefs == null)
+					affectedResourcesMap.put(Boolean.TRUE, new String[0]);
+				else
+					affectedResourcesMap.put(Boolean.TRUE, projectDerivedPrefs.keys());
 			} catch (BackingStoreException e) {
 				// problems with the project scope... we gonna miss the changes (but will log)
 				String message = Messages.resources_readingEncoding;
 				Policy.log(new ResourceStatus(IResourceStatus.FAILED_GETTING_CHARSET, currentProject.getFullPath(), message, e));
 				return;
 			}
-			for (int i = 0; i < affectedResources.length; i++) {
-				IResourceDelta memberDelta = projectDelta.findMember(new Path(affectedResources[i]));
-				// no changes for the given resource
-				if (memberDelta == null)
-					continue;
-				if (memberDelta.getKind() == IResourceDelta.REMOVED) {
-					resourceChanges = true;
-					// remove the setting for the original location - save its value though
-					String currentValue = projectPrefs.get(affectedResources[i], null);
-					projectPrefs.remove(affectedResources[i]);
-					if ((memberDelta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
-						// if moving, copy the setting for the new location
-						IProject targetProject = workspace.getRoot().getProject(memberDelta.getMovedToPath().segment(0));
-						Preferences targetPrefs = getPreferences(targetProject, true);
-						targetPrefs.put(getKeyFor(memberDelta.getMovedToPath()), currentValue);
-						if (targetProject != currentProject)
-							projectsToSave.add(targetProject);
+			for (Iterator/*<Boolean>*/ it = affectedResourcesMap.keySet().iterator(); it.hasNext();) {
+				Boolean isDerived = (Boolean)it.next();
+				String[] affectedResources = (String[])affectedResourcesMap.get(isDerived);
+				Preferences projectPrefs = isDerived.booleanValue() ? projectDerivedPrefs : projectRegularPrefs;
+				for (int i = 0; i < affectedResources.length; i++) {
+					IResourceDelta memberDelta = projectDelta.findMember(new Path(affectedResources[i]));
+					// no changes for the given resource
+					if (memberDelta == null)
+						continue;
+					if (memberDelta.getKind() == IResourceDelta.REMOVED) {
+						boolean shouldDisableCharsetDeltaJobForCurrentProject = false;
+						// remove the setting for the original location - save its value though
+						String currentValue = projectPrefs.get(affectedResources[i], null);
+						projectPrefs.remove(affectedResources[i]);
+						if ((memberDelta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
+							IPath movedToPath = memberDelta.getMovedToPath();
+							IResource resource = workspace.getRoot().findMember(movedToPath);
+							if (resource != null) {
+								Preferences encodingSettings = getPreferences(resource.getProject(), true, resource.isDerived(IResource.CHECK_ANCESTORS));
+								if (currentValue == null || currentValue.trim().length() == 0)
+									encodingSettings.remove(getKeyFor(movedToPath));
+								else
+									encodingSettings.put(getKeyFor(movedToPath), currentValue);
+								IProject targetProject = workspace.getRoot().getProject(movedToPath.segment(0));
+								if (targetProject.equals(currentProject))
+									// if the file was moved inside the same project disable charset listener
+									shouldDisableCharsetDeltaJobForCurrentProject = true;
+								else
+									projectsToSave.put(targetProject, Boolean.FALSE);
+							}
+						}
+						projectsToSave.put(currentProject, Boolean.valueOf(shouldDisableCharsetDeltaJobForCurrentProject));
 					}
 				}
+				if (moveSettingsIfDerivedChanged(projectDelta, currentProject, projectPrefs, affectedResources)) {
+					// if settings were moved between prefs files disable charset listener so we don't react to changes made by ourselves
+					projectsToSave.put(currentProject, Boolean.TRUE);
+				}
 			}
-			if (resourceChanges)
-				projectsToSave.add(currentProject);
 		}
 
 		/**
@@ -166,7 +227,7 @@ public class CharsetManager implements IManager {
 				return;
 			IResourceDelta[] projectDeltas = delta.getAffectedChildren();
 			// process each project in the delta
-			Set projectsToSave = new HashSet();
+			Map/*<IProject, Boolean>*/ projectsToSave = new HashMap/*<IProject, Boolean>*/();
 			for (int i = 0; i < projectDeltas.length; i++)
 				//nothing to do if a project has been added/removed/moved				
 				if (projectDeltas[i].getKind() == IResourceDelta.CHANGED && (projectDeltas[i].getFlags() & IResourceDelta.OPEN) == 0)
@@ -175,11 +236,10 @@ public class CharsetManager implements IManager {
 		}
 	}
 
-	public static final String ENCODING_PREF_NODE = "encoding"; //$NON-NLS-1$		
 	private static final String PROJECT_KEY = "<project>"; //$NON-NLS-1$
 	private CharsetDeltaJob charsetListener;
 	CharsetManagerJob job;
-	private IResourceChangeListener listener;
+	private IResourceChangeListener resourceChangeListener;
 	protected final Bundle systemBundle = Platform.getBundle("org.eclipse.osgi"); //$NON-NLS-1$
 	Workspace workspace;
 
@@ -187,6 +247,19 @@ public class CharsetManager implements IManager {
 		this.workspace = workspace;
 	}
 
+	void flushPreferences(Preferences projectPrefs, boolean shouldDisableCharsetDeltaJob) throws BackingStoreException {
+		if (projectPrefs != null) {
+			try {
+				if (shouldDisableCharsetDeltaJob)
+					charsetListener.setDisabled(true);
+				projectPrefs.flush();
+			} finally {
+				if (shouldDisableCharsetDeltaJob)
+					charsetListener.setDisabled(false);
+			}
+		}
+	}
+
 	/**
 	 * Returns the charset explicitly set by the user for the given resource, 
 	 * or <code>null</code>. If no setting exists for the given resource and 
@@ -200,22 +273,32 @@ public class CharsetManager implements IManager {
 	public String getCharsetFor(IPath resourcePath, boolean recurse) {
 		Assert.isLegal(resourcePath.segmentCount() >= 1);
 		IProject project = workspace.getRoot().getProject(resourcePath.segment(0));
-		Preferences encodingSettings = getPreferences(project, false);
-		if (encodingSettings == null)
+
+		Preferences prefs = getPreferences(project, false, false);
+		Preferences derivedPrefs = getPreferences(project, false, true);
+
+		if (prefs == null && derivedPrefs == null)
 			// no preferences found - for performance reasons, short-circuit 
 			// lookup by falling back to workspace's default setting			
 			return recurse ? ResourcesPlugin.getEncoding() : null;
-		return internalGetCharsetFor(resourcePath, encodingSettings, recurse);
+
+		return internalGetCharsetFor(prefs, derivedPrefs, resourcePath, recurse);
 	}
 
-	String getKeyFor(IPath resourcePath) {
+	private String getKeyFor(IPath resourcePath) {
 		return resourcePath.segmentCount() > 1 ? resourcePath.removeFirstSegments(1).toString() : PROJECT_KEY;
 	}
 
-	Preferences getPreferences(IProject project, boolean create) {
+	Preferences getPreferences(IProject project, boolean create, boolean isDerived) {
+		return getPreferences(project, create, isDerived, isDerivedEncodingStoredSeparately(project));
+	}
+
+	Preferences getPreferences(IProject project, boolean create, boolean isDerived, boolean isDerivedEncodingStoredSeparately) {
+		boolean localIsDerived = isDerivedEncodingStoredSeparately ? isDerived : false;
+		String qualifier = localIsDerived ? ProjectPreferences.PREFS_DERIVED_QUALIFIER : ProjectPreferences.PREFS_REGULAR_QUALIFIER;
 		if (create)
 			// create all nodes down to the one we are interested in
-			return new ProjectScope(project).getNode(ResourcesPlugin.PI_RESOURCES).node(ENCODING_PREF_NODE);
+			return new ProjectScope(project).getNode(qualifier).node(ResourcesPlugin.PREF_ENCODING);
 		// be careful looking up for our node so not to create any nodes as side effect
 		Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
 		try {
@@ -226,12 +309,12 @@ public class CharsetManager implements IManager {
 			if (!node.nodeExists(project.getName()))
 				return null;
 			node = node.node(project.getName());
-			if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
+			if (!node.nodeExists(qualifier))
 				return null;
-			node = node.node(ResourcesPlugin.PI_RESOURCES);
-			if (!node.nodeExists(ENCODING_PREF_NODE))
+			node = node.node(qualifier);
+			if (!node.nodeExists(ResourcesPlugin.PREF_ENCODING))
 				return null;
-			return node.node(ENCODING_PREF_NODE);
+			return node.node(ResourcesPlugin.PREF_ENCODING);
 		} catch (BackingStoreException e) {
 			// nodeExists failed
 			String message = Messages.resources_readingEncoding;
@@ -239,19 +322,89 @@ public class CharsetManager implements IManager {
 		}
 		return null;
 	}
-
-	private String internalGetCharsetFor(IPath resourcePath, Preferences encodingSettings, boolean recurse) {
-		String charset = encodingSettings.get(getKeyFor(resourcePath), null);
+	
+	private String internalGetCharsetFor(Preferences prefs, Preferences derivedPrefs, IPath resourcePath, boolean recurse) {
+		String charset = null;
+		
+		// try to find the encoding in regular and then derived prefs
+		if (prefs != null)
+			charset = prefs.get(getKeyFor(resourcePath), null);
+		// derivedPrefs may be not null, only if #isDerivedEncodingStoredSeparately returns true
+		// so the explicit check against #isDerivedEncodingStoredSeparately is not required
+		if (charset == null && derivedPrefs != null)
+			charset = derivedPrefs.get(getKeyFor(resourcePath), null);
+		
 		if (!recurse)
 			return charset;
+
 		while (charset == null && resourcePath.segmentCount() > 1) {
 			resourcePath = resourcePath.removeLastSegments(1);
-			charset = encodingSettings.get(getKeyFor(resourcePath), null);
+			// try to find the encoding in regular and then derived prefs
+			if (prefs != null)
+				charset = prefs.get(getKeyFor(resourcePath), null);	
+			if (charset == null && derivedPrefs != null)
+				charset = derivedPrefs.get(getKeyFor(resourcePath), null);
 		}
+		
 		// ensure we default to the workspace encoding if none is found
 		return charset == null ? ResourcesPlugin.getEncoding() : charset;
 	}
 
+	private boolean isDerivedEncodingStoredSeparately(IProject project) {
+		// be careful looking up for our node so not to create any nodes as side effect
+		Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
+		try {
+			//TODO once bug 90500 is fixed, should be as simple as this:
+			//			String path = project.getName() + IPath.SEPARATOR + ResourcesPlugin.PI_RESOURCES;
+			//			return node.nodeExists(path) ? node.node(path).getBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false) : false;
+			// for now, take the long way
+			if (!node.nodeExists(project.getName()))
+				return false;
+			node = node.node(project.getName());
+			if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
+				return false;
+			node = node.node(ResourcesPlugin.PI_RESOURCES);
+			return node.getBoolean(ProjectPreferences.PREF_SEPARATE_DERIVED_ENCODINGS, false);
+		} catch (BackingStoreException e) {
+			// nodeExists failed
+			String message = Messages.resources_readingEncoding;
+			Policy.log(new ResourceStatus(IResourceStatus.FAILED_GETTING_CHARSET, project.getFullPath(), message, e));
+			return false;
+		}
+	}
+
+	protected void mergeEncodingPreferences(IProject project) {
+		Preferences projectRegularPrefs = null;
+		Preferences projectDerivedPrefs = getPreferences(project, false, true, true);
+		if (projectDerivedPrefs == null)
+			return;
+		try {
+			boolean prefsChanged = false;
+			String[] affectedResources;
+			affectedResources = projectDerivedPrefs.keys();
+			for (int i = 0; i < affectedResources.length; i++) {
+				String path = affectedResources[i];
+				String value = projectDerivedPrefs.get(path, null);
+				projectDerivedPrefs.remove(path);
+				// lazy creation of non-derived prefs
+				if (projectRegularPrefs == null)
+					projectRegularPrefs = getPreferences(project, true, false, false);
+				projectRegularPrefs.put(path, value);
+				prefsChanged = true;
+			}
+			if (prefsChanged) {
+				Map/*<IProject, Boolean>*/ projectsToSave = new HashMap/*<IProject, Boolean>*/();
+				// this is internal change so do not notify charset delta job
+				projectsToSave.put(project, Boolean.TRUE);
+				job.addChanges(projectsToSave);
+			}
+		} catch (BackingStoreException e) {
+			// problems with the project scope... we gonna miss the changes (but will log)
+			String message = Messages.resources_readingEncoding;
+			Policy.log(new ResourceStatus(IResourceStatus.FAILED_GETTING_CHARSET, project.getFullPath(), message, e));
+		}
+	}
+
 	public void projectPreferencesChanged(IProject project) {
 		charsetListener.charsetPreferencesChanged(project);
 	}
@@ -268,36 +421,71 @@ public class CharsetManager implements IManager {
 			return;
 		}
 		// for all other cases, we set a property in the corresponding project
-		IProject project = workspace.getRoot().getProject(resourcePath.segment(0));
-		Preferences encodingSettings = getPreferences(project, true);
-		if (newCharset == null || newCharset.trim().length() == 0)
-			encodingSettings.remove(getKeyFor(resourcePath));
-		else
-			encodingSettings.put(getKeyFor(resourcePath), newCharset);
-		try {
-			// disable the listener so we don't react to changes made by ourselves 
-			charsetListener.setDisabled(true);
-			// save changes
-			encodingSettings.flush();
-		} catch (BackingStoreException e) {
-			String message = Messages.resources_savingEncoding;
-			throw new ResourceException(IResourceStatus.FAILED_SETTING_CHARSET, project.getFullPath(), message, e);
-		} finally {
-			charsetListener.setDisabled(false);
+		IResource resource = workspace.getRoot().findMember(resourcePath);
+		if (resource != null) {
+			try {
+				// disable the listener so we don't react to changes made by ourselves
+				Preferences encodingSettings = getPreferences(resource.getProject(), true, resource.isDerived(IResource.CHECK_ANCESTORS));
+				if (newCharset == null || newCharset.trim().length() == 0)
+					encodingSettings.remove(getKeyFor(resourcePath));
+				else
+					encodingSettings.put(getKeyFor(resourcePath), newCharset);
+				flushPreferences(encodingSettings, true);
+			} catch (BackingStoreException e) {
+				IProject project = workspace.getRoot().getProject(resourcePath.segment(0));
+				String message = Messages.resources_savingEncoding;
+				throw new ResourceException(IResourceStatus.FAILED_SETTING_CHARSET, project.getFullPath(), message, e);
+			}
 		}
-
 	}
 
 	public void shutdown(IProgressMonitor monitor) {
-		workspace.removeResourceChangeListener(listener);
+		workspace.removeResourceChangeListener(resourceChangeListener);
 		if (charsetListener != null)
 			charsetListener.shutdown();
 	}
 
+	protected void splitEncodingPreferences(IProject project) {
+		Preferences projectRegularPrefs = getPreferences(project, false, false, false);
+		Preferences projectDerivedPrefs = null;
+		if (projectRegularPrefs == null)
+			return;
+		try {
+			boolean prefsChanged = false;
+			String[] affectedResources;
+			affectedResources = projectRegularPrefs.keys();
+			for (int i = 0; i < affectedResources.length; i++) {
+				String path = affectedResources[i];
+				IResource resource = project.findMember(path);
+				if (resource != null) {
+					if (resource.isDerived(IResource.CHECK_ANCESTORS)) {
+						String value = projectRegularPrefs.get(path, null);
+						projectRegularPrefs.remove(path);
+						// lazy creation of derived prefs
+						if (projectDerivedPrefs == null)
+							projectDerivedPrefs = getPreferences(project, true, true, true);
+						projectDerivedPrefs.put(path, value);
+						prefsChanged = true;
+					}
+				}
+			}
+			if (prefsChanged) {
+				Map/*<IProject, Boolean>*/ projectsToSave = new HashMap/*<IProject, Boolean>*/();
+				// this is internal change so do not notify charset delta job
+				projectsToSave.put(project, Boolean.TRUE);
+				job.addChanges(projectsToSave);
+			}
+		} catch (BackingStoreException e) {
+			// problems with the project scope... we gonna miss the changes (but will log)
+			String message = Messages.resources_readingEncoding;
+			Policy.log(new ResourceStatus(IResourceStatus.FAILED_GETTING_CHARSET, project.getFullPath(), message, e));
+		}
+	}
+
 	public void startup(IProgressMonitor monitor) {
 		job = new CharsetManagerJob();
-		listener = new Listener();
-		workspace.addResourceChangeListener(listener, IResourceChangeEvent.POST_CHANGE);
+		resourceChangeListener = new ResourceChangeListener();
+		workspace.addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
 		charsetListener = new CharsetDeltaJob(workspace);
 		charsetListener.startup();
 	}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ComputeProjectOrder.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ComputeProjectOrder.java
index 78eed1d..72dcbe8 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ComputeProjectOrder.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ComputeProjectOrder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -445,7 +445,7 @@ class ComputeProjectOrder {
 	}
 
 	/**
-	 * Sorts the given list of probject in a manner that honors the given
+	 * Sorts the given list of project in a manner that honors the given
 	 * project reference relationships. That is, if project A references project
 	 * B, then the resulting order will list B before A if possible. For graphs
 	 * that do not contain cycles, the result is the same as a conventional
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Container.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Container.java
index 072b802..4d4e436 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Container.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Container.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.core.internal.resources;
 
 import java.util.*;
+import org.eclipse.core.internal.events.LifecycleEvent;
 import org.eclipse.core.internal.localstore.IHistoryStore;
 import org.eclipse.core.internal.utils.*;
 import org.eclipse.core.internal.watson.*;
@@ -36,6 +37,55 @@ public abstract class Container extends Resource implements IContainer {
 		for (int i = 0; i < members.length; i++)
 			((Resource) members[i]).convertToPhantom();
 	}
+	/**
+	 * @see IContainer#createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)
+	 */
+	public IResourceFilterDescription createFilter(int type, FileInfoMatcherDescription matcherDescription, int updateFlags, IProgressMonitor monitor) throws CoreException {
+		Assert.isNotNull(getProject());
+		monitor = Policy.monitorFor(monitor);
+		FilterDescription filter = null;
+		try {
+			String message = NLS.bind(Messages.links_creating, getFullPath());
+			monitor.beginTask(message, Policy.totalWork);
+			Policy.checkCanceled(monitor);
+			checkValidPath(path, FOLDER | PROJECT, true);
+			final ISchedulingRule rule = workspace.getRuleFactory().createRule(this);
+			try {
+				workspace.prepareOperation(rule, monitor);
+				workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_FILTER_ADD, this));
+				workspace.beginOperation(true);
+				monitor.worked(Policy.opWork * 5 / 100);
+				//save the filter in the project description
+				filter = new FilterDescription(this, type, matcherDescription);
+				filter.setId(System.currentTimeMillis());
+				
+				Project project = (Project) getProject();
+				project.internalGetDescription().addFilter(getProjectRelativePath(), filter);
+				project.writeDescription(IResource.NONE);
+				monitor.worked(Policy.opWork * 5 / 100);
+
+				//refresh to discover any new resources below this folder
+				if (getType() != IResource.FILE) {
+					//refresh either in background or foreground
+					if ((updateFlags & IResource.BACKGROUND_REFRESH) != 0) {
+						workspace.refreshManager.refresh(this);
+						monitor.worked(Policy.opWork * 90 / 100);
+					} else {
+						refreshLocal(DEPTH_INFINITE, Policy.subMonitorFor(monitor, Policy.opWork * 90 / 100));
+					}
+				} else
+					monitor.worked(Policy.opWork * 90 / 100);
+			} catch (OperationCanceledException e) {
+				workspace.getWorkManager().operationCanceled();
+				throw e;
+			} finally {
+				workspace.endOperation(rule, true, Policy.subMonitorFor(monitor, Policy.endOpWork));
+			}
+		} finally {
+			monitor.done();
+		}
+		return filter;
+	}
 
 	/* (non-Javadoc)
 	 * @see IContainer#exists(IPath)
@@ -117,6 +167,40 @@ public abstract class Container extends Resource implements IContainer {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IContainer#getFilters()
+	 */
+	public IResourceFilterDescription[] getFilters() throws CoreException {
+		IResourceFilterDescription[] results = null;
+		checkValidPath(path, FOLDER | PROJECT, true);
+		Project project = (Project) getProject();
+		ProjectDescription desc = project.internalGetDescription();
+		if (desc != null) {
+			LinkedList/*<FilterDescription>*/ list = desc.getFilter(getProjectRelativePath());
+			if (list != null) {
+				results = new IResourceFilterDescription[list.size()];
+				for (int i = 0; i < list.size(); i++) {
+					results[i] = (FilterDescription) list.get(i);
+				}
+				return results;
+			}
+		}
+		return new IResourceFilterDescription[0];
+	}
+	
+	public boolean hasFilters() {
+		IProject project = getProject();
+		if (project == null)
+			return false;
+		ProjectDescription desc = ((Project) project).internalGetDescription();
+		if (desc == null)
+			return false;
+		LinkedList/*<FilterDescription>*/ filters = desc.getFilter(getProjectRelativePath());
+		if ((filters != null) && (filters.size() > 0))
+			return true;
+		return false;
+	}
+
+	/* (non-Javadoc)
 	 * @see IContainer#getFile(IPath)
 	 */
 	public IFile getFile(IPath childPath) {
@@ -185,6 +269,47 @@ public abstract class Container extends Resource implements IContainer {
 		return getChildren(memberFlags);
 	}
 
+	public void removeFilter(IResourceFilterDescription filterDescription, int updateFlags, IProgressMonitor monitor) throws CoreException {
+		monitor = Policy.monitorFor(monitor);
+		try {
+			String message = NLS.bind(Messages.links_creating, getFullPath());
+			monitor.beginTask(message, Policy.totalWork);
+			Policy.checkCanceled(monitor);
+			checkValidPath(path, FOLDER | PROJECT, true);
+			final ISchedulingRule rule = workspace.getRuleFactory().createRule(this);
+			try {
+				workspace.prepareOperation(rule, monitor);
+				workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_FILTER_REMOVE, this));
+				workspace.beginOperation(true);
+				monitor.worked(Policy.opWork * 5 / 100);
+				//save the filter in the project description
+				Project project = (Project) getProject();
+				project.internalGetDescription().removeFilter(getProjectRelativePath(), (FilterDescription)filterDescription);
+				project.writeDescription(IResource.NONE);
+				monitor.worked(Policy.opWork * 5 / 100);
+
+				//refresh to discover any new resources below this linked location
+				if (getType() != IResource.FILE) {
+					//refresh either in background or foreground
+					if ((updateFlags & IResource.BACKGROUND_REFRESH) != 0) {
+						workspace.refreshManager.refresh(this);
+						monitor.worked(Policy.opWork * 90 / 100);
+					} else {
+						refreshLocal(DEPTH_INFINITE, Policy.subMonitorFor(monitor, Policy.opWork * 90 / 100));
+					}
+				} else
+					monitor.worked(Policy.opWork * 90 / 100);
+			} catch (OperationCanceledException e) {
+				workspace.getWorkManager().operationCanceled();
+				throw e;
+			} finally {
+				workspace.endOperation(rule, true, Policy.subMonitorFor(monitor, Policy.endOpWork));
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
 	/* (non-Javadoc)
 	 * @see IContainer#getDefaultCharset()
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ContentDescriptionManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ContentDescriptionManager.java
index 2a7382b..6606270 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ContentDescriptionManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ContentDescriptionManager.java
@@ -340,10 +340,10 @@ public class ContentDescriptionManager implements IManager, IRegistryChangeListe
 				// there was a description in the cache, and it was up to date
 				return (IContentDescription) entry.getCached();
 		}
-		
-		// either we didn't find a description in the cache, or it was not up-to-date - has to be read again
+			
+			// either we didn't find a description in the cache, or it was not up-to-date - has to be read again
 		// reading description can call 3rd party code, so don't synchronize it
-		IContentDescription newDescription = readDescription(file);
+			IContentDescription newDescription = readDescription(file);
 		
 		synchronized (this) {
 			// tries to get a description from the cache
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/File.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/File.java
index 337476d..f67c66f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/File.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/File.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,10 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
-import org.eclipse.core.internal.utils.FileUtil;
-
 import java.io.*;
 import org.eclipse.core.filesystem.*;
 import org.eclipse.core.internal.preferences.EclipsePreferences;
@@ -122,6 +121,7 @@ public class File extends Resource implements IFile {
 				Container parent = (Container) getParent();
 				ResourceInfo info = parent.getResourceInfo(false, false);
 				parent.checkAccessible(getFlags(info));
+				checkValidGroupContainer(parent, false, false);
 
 				workspace.beginOperation(true);
 				IFileStore store = getStore();
@@ -166,6 +166,11 @@ public class File extends Resource implements IFile {
 						workspace.deleteResource(this);
 						store.delete(EFS.NONE, null);
 						throw e; // rethrow
+					} catch (OperationCanceledException e) {
+						// the operation of setting contents has been canceled, so delete the file from the workspace and disk
+						workspace.deleteResource(this);
+						store.delete(EFS.NONE, null);
+						throw e;
 					}
 				}
 				internalSetLocal(local, DEPTH_ZERO);
@@ -397,7 +402,11 @@ public class File extends Resource implements IFile {
 		String name = path.segment(1);
 		// is this a project description file?
 		if (count == 2 && name.equals(IProjectDescription.DESCRIPTION_FILE_NAME)) {
-			((Project) getProject()).updateDescription();
+			Project project = (Project) getProject();
+			project.updateDescription();
+			// Discard stale project natures on ProjectInfo
+			ProjectInfo projectInfo = (ProjectInfo) project.getResourceInfo(false, true);
+			projectInfo.discardNatures();
 			return;
 		}
 		// check to see if we are in the .settings directory
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Filter.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Filter.java
new file mode 100644
index 0000000..589f74a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Filter.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.internal.utils.Policy;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.internal.utils.Messages;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Class that instantiate IResourceFilter's  that are stored in the project description.
+ */
+public class Filter {
+
+	FilterDescription description;
+	IProject project;
+	AbstractFileInfoMatcher provider = null;
+
+	public Filter(IProject project, FilterDescription description) {
+		this.description = description;
+		this.project = project;
+	}
+
+	public boolean match(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		if (provider == null) {
+			IFilterMatcherDescriptor filterDescriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
+			if (filterDescriptor != null)
+				provider = ((FilterDescriptor) filterDescriptor).createFilter();
+			if (provider == null) {
+				String message = NLS.bind(Messages.filters_missingFilterType, getId());
+				throw new CoreException(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Platform.PLUGIN_ERROR, message, new Error()));
+			}
+			try {
+				provider.initialize(project, description.getFileInfoMatcherDescription().getArguments());
+			} catch (CoreException e) {
+				Policy.log(e.getStatus());
+				provider = null;
+			}
+		}
+		if (provider != null)
+			return provider.matches(parent, fileInfo);
+		return false;
+	}
+
+	public boolean isFirst() {
+		IFilterMatcherDescriptor descriptor = project.getWorkspace().getFilterMatcherDescriptor(getId());
+		if (descriptor != null)
+			return descriptor.isFirstOrdering();
+		return false;
+	}
+
+	public Object getArguments() {
+		return description.getFileInfoMatcherDescription().getArguments();
+	}
+
+	public String getId() {
+		return description.getFileInfoMatcherDescription().getId();
+	}
+
+	public int getType() {
+		return description.getType();
+	}
+
+	public boolean isIncludeOnly() {
+		return (getType() & IResourceFilterDescription.INCLUDE_ONLY) != 0;
+	}
+
+	public boolean appliesTo(IFileInfo info) {
+		if (info.isDirectory())
+			return (getType() & IResourceFilterDescription.FOLDERS) != 0;
+		return (getType() & IResourceFilterDescription.FILES) != 0;
+	}
+
+	public static IFileInfo[] filter(IProject project, LinkedList/*Filter*/includeFilters, LinkedList/*Filter*/excludeFilters, IContainer parent, IFileInfo[] list) throws CoreException {
+		IFileInfo[] result = filterIncludes(project, includeFilters, parent, list);
+		return filterExcludes(project, excludeFilters, parent, result);
+	}
+
+	public static IFileInfo[] filterIncludes(IProject project, LinkedList/*Filter*/filters, IContainer parent, IFileInfo[] list) throws CoreException {
+		if (filters.size() > 0) {
+			IFileInfo[] result = new IFileInfo[list.length];
+			int outputIndex = 0;
+
+			for (int i = 0; i < list.length; i++) {
+				IFileInfo info = list[i];
+				Iterator objIt = filters.iterator();
+				boolean filtersWereApplicable = false;
+				while (objIt.hasNext()) {
+					Filter filter = (Filter) objIt.next();
+					if (filter.appliesTo(info)) {
+						filtersWereApplicable = true;
+						if (filter.match(parent, info)) {
+							result[outputIndex++] = info;
+							break;
+						}
+					}
+				}
+				if (!filtersWereApplicable)
+					result[outputIndex++] = info;
+			}
+			if (outputIndex != result.length) {
+				IFileInfo[] tmp = new IFileInfo[outputIndex];
+				System.arraycopy(result, 0, tmp, 0, outputIndex);
+				result = tmp;
+			}
+			return result;
+		}
+		return list;
+	}
+
+	public static IFileInfo[] filterExcludes(IProject project, LinkedList/*Filter*/filters, IContainer parent, IFileInfo[] list) throws CoreException {
+		if (filters.size() > 0) {
+			IFileInfo[] result = new IFileInfo[list.length];
+			int outputIndex = 0;
+
+			for (int i = 0; i < list.length; i++) {
+				IFileInfo info = list[i];
+				Iterator objIt = filters.iterator();
+				boolean shouldBeExcluded = false;
+				while (objIt.hasNext()) {
+					Filter filter = (Filter) objIt.next();
+					if (filter.appliesTo(info)) {
+						if (filter.match(parent, info)) {
+							shouldBeExcluded = true;
+							break;
+						}
+					}
+				}
+				if (!shouldBeExcluded)
+					result[outputIndex++] = info;
+			}
+			if (outputIndex != result.length) {
+				IFileInfo[] tmp = new IFileInfo[outputIndex];
+				System.arraycopy(result, 0, tmp, 0, outputIndex);
+				result = tmp;
+			}
+			return result;
+		}
+		return list;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescription.java
new file mode 100644
index 0000000..bedd634
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescription.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+
+/**
+ * Class for describing the characteristics of filters that are stored
+ * in the project description.
+ */
+public class FilterDescription implements IResourceFilterDescription, Comparable {
+
+	private long id;
+
+	/**
+	 * The resource type (IResourceFilter.INCLUDE_ONLY or IResourceFilter.EXCLUDE_ALL) and/or IResourceFilter.INHERITABLE
+	 */
+	private int type;
+
+	private FileInfoMatcherDescription matcherDescription;
+
+	/**
+	 * The resource that this filter is applied to
+	 */
+	private IResource resource;
+
+	public FilterDescription() {
+		this.type = -1;
+	}
+
+	public FilterDescription(IResource resource, int type, FileInfoMatcherDescription matcherDescription) {
+		super();
+		Assert.isNotNull(resource);
+		this.type = type;
+		this.matcherDescription = matcherDescription;
+		this.resource = resource;
+	}
+
+	public boolean isInheritable() {
+		return (getType() & IResourceFilterDescription.INHERITABLE) != 0;
+	}
+
+	public static LinkedList copy(LinkedList originalDescriptions, IResource resource) {
+		LinkedList copy = new LinkedList();
+		Iterator it = originalDescriptions.iterator();
+		while (it.hasNext()) {
+			FilterDescription desc = (FilterDescription) it.next();
+			FilterDescription newDesc = new FilterDescription(resource, desc.getType(), desc.getFileInfoMatcherDescription());
+			copy.add(newDesc);
+		}
+		return copy;
+	}
+
+	public long getId() {
+		return id;
+	}
+
+	public void setId(long id) {
+		this.id = id;
+	}
+
+	public int getType() {
+		return type;
+	}
+
+	public void setType(int type) {
+		this.type = type;
+	}
+
+	public void setResource(IResource resource) {
+		this.resource = resource;
+	}
+
+	public IResource getResource() {
+		return resource;
+	}
+
+	public FileInfoMatcherDescription getFileInfoMatcherDescription() {
+		return matcherDescription;
+	}
+
+	public void setFileInfoMatcherDescription(FileInfoMatcherDescription matcherDescription) {
+		this.matcherDescription = matcherDescription;
+	}
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + (int) (id ^ (id >>> 32));
+		return result;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		FilterDescription other = (FilterDescription) obj;
+		if (id != other.id)
+			return false;
+		return true;
+	}
+
+	/**
+	 * Compare filter descriptions in a way that sorts them topologically by path.
+	 */
+	public int compareTo(Object o) {
+		FilterDescription that = (FilterDescription) o;
+		IPath path1 = this.getResource().getProjectRelativePath();
+		IPath path2 = that.getResource().getProjectRelativePath();
+		int count1 = path1.segmentCount();
+		int compare = count1 - path2.segmentCount();
+		if (compare != 0)
+			return compare;
+		for (int i = 0; i < count1; i++) {
+			compare = path1.segment(i).compareTo(path2.segment(i));
+			if (compare != 0)
+				return compare;
+		}
+		return 0;
+	}
+
+	public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException {
+		((Container)getResource()).removeFilter(this, updateFlags, monitor);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescriptor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescriptor.java
new file mode 100644
index 0000000..6a43c64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterDescriptor.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.resources.IFilterMatcherDescriptor;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+public class FilterDescriptor implements IFilterMatcherDescriptor {
+	private String id;
+	private String name;
+	private String description;
+	private String argumentType;
+	private boolean isFirst = false;
+	private IConfigurationElement element;
+
+	public FilterDescriptor(IConfigurationElement element) throws CoreException {
+		this(element, true);
+	}
+
+	public FilterDescriptor(IConfigurationElement element, boolean instantiateFactory) throws CoreException {
+		id = element.getAttribute("id"); //$NON-NLS-1$
+		name = element.getAttribute("name"); //$NON-NLS-1$
+		description = element.getAttribute("description"); //$NON-NLS-1$
+		argumentType = element.getAttribute("argumentType"); //$NON-NLS-1$
+		if (argumentType == null)
+			argumentType = IFilterMatcherDescriptor.ARGUMENT_TYPE_NONE;
+		this.element = element;
+		String ordering = element.getAttribute("ordering"); //$NON-NLS-1$
+		if (ordering != null)
+			isFirst = ordering.equals("first"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#getId()
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#getName()
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#getDescription()
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#getArgumentType()
+	 */
+	public String getArgumentType() {
+		return argumentType;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#getFactory()
+	 */
+	public AbstractFileInfoMatcher createFilter() {
+		try {
+			return (AbstractFileInfoMatcher) element.createExecutableExtension("class"); //$NON-NLS-1$
+		} catch (CoreException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IFilterDescriptor#isFirstOrdering()
+	 */
+	public boolean isFirstOrdering() {
+		return isFirst;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterTypeManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterTypeManager.java
new file mode 100644
index 0000000..5b8c936
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/FilterTypeManager.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import java.util.HashMap;
+import org.eclipse.core.resources.IFilterMatcherDescriptor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.*;
+
+/**
+ *  This class collects all the registered {@link AbstractFileInfoMatcher} instances along 
+ *  with their properties.
+ */
+class FilterTypeManager implements IManager {
+
+	private static final String FILTER_ELEMENT = "filterMatcher"; //$NON-NLS-1$
+
+	private HashMap/*<String, FilterDescriptor>*/factories = new HashMap();
+
+	public FilterTypeManager() {
+		IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PT_FILTER_MATCHERS);
+		if (point != null) {
+			IExtension[] ext = point.getExtensions();
+			// initial population
+			for (int i = 0; i < ext.length; i++) {
+				IExtension extension = ext[i];
+				processExtension(extension);
+			}
+			RegistryFactory.getRegistry().addListener(new IRegistryEventListener() {
+				public void added(IExtension[] extensions) {
+					for (int i = 0; i < extensions.length; i++)
+						processExtension(extensions[i]);
+				}
+
+				public void added(IExtensionPoint[] extensionPoints) {
+					// nothing to do
+				}
+
+				public void removed(IExtension[] extensions) {
+					for (int i = 0; i < extensions.length; i++)
+						processRemovedExtension(extensions[i]);
+				}
+
+				public void removed(IExtensionPoint[] extensionPoints) {
+					// nothing to do
+				}
+			});
+		}
+	}
+
+	public IFilterMatcherDescriptor getFilterDescriptor(String id) {
+		return (IFilterMatcherDescriptor) factories.get(id);
+	}
+
+	public IFilterMatcherDescriptor[] getFilterDescriptors() {
+		return (IFilterMatcherDescriptor[]) factories.values().toArray(new IFilterMatcherDescriptor[0]);
+	}
+
+	protected void processExtension(IExtension extension) {
+		IConfigurationElement[] elements = extension.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement element = elements[i];
+			if (element.getName().equalsIgnoreCase(FILTER_ELEMENT)) {
+				try {
+					IFilterMatcherDescriptor desc = new FilterDescriptor(element);
+					factories.put(desc.getId(), desc);
+				} catch (CoreException e) {
+					e.printStackTrace();
+				}
+			}
+		}
+	}
+
+	protected void processRemovedExtension(IExtension extension) {
+		IConfigurationElement[] elements = extension.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement element = elements[i];
+			if (element.getName().equalsIgnoreCase(FILTER_ELEMENT)) {
+				try {
+					IFilterMatcherDescriptor desc = new FilterDescriptor(element, false);
+					factories.remove(desc.getId());
+				} catch (CoreException e) {
+					e.printStackTrace();
+				}
+			}
+		}
+	}
+
+	public void shutdown(IProgressMonitor monitor) {
+		//nothing to do
+	}
+
+	public void startup(IProgressMonitor monitor) {
+		//nothing to do
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Folder.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Folder.java
index 39a99a0..cd6f804 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Folder.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Folder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -30,6 +31,7 @@ public class Folder extends Container implements IFolder {
 		Container parent = (Container) getParent();
 		ResourceInfo info = parent.getResourceInfo(false, false);
 		parent.checkAccessible(getFlags(info));
+		checkValidGroupContainer(parent, false, false);
 
 		final boolean force = (updateFlags & IResource.FORCE) != 0;
 		if (!force && localInfo.exists()) {
@@ -73,7 +75,12 @@ public class Folder extends Container implements IFolder {
 	/* (non-Javadoc)
 	 * @see IFolder#create(int, boolean, IProgressMonitor)
 	 */
-	public void create(int updateFlags, boolean local, IProgressMonitor monitor) throws CoreException {
+	public void create(int updateFlags, boolean local, IProgressMonitor monitor) throws CoreException {	
+		if ((updateFlags & IResource.VIRTUAL) == IResource.VIRTUAL) {
+			createLink(LinkDescription.VIRTUAL_LOCATION, updateFlags, monitor);
+			return;
+		}
+		
 		final boolean force = (updateFlags & IResource.FORCE) != 0;
 		monitor = Policy.monitorFor(monitor);
 		try {
@@ -118,7 +125,7 @@ public class Folder extends Container implements IFolder {
 		create((force ? IResource.FORCE : IResource.NONE), local, monitor);
 	}
 
-	/** 
+	/**
 	 * Ensures that this folder exists in the workspace. This is similar in
 	 * concept to mkdirs but it does not work on projects.
 	 * If this folder is created, it will be marked as being local.
@@ -138,7 +145,10 @@ public class Folder extends Container implements IFolder {
 			parent.checkExists(getFlags(info), true);
 		} else
 			((Folder) parent).ensureExists(monitor);
-		internalCreate(IResource.FORCE, true, monitor);
+		if (getType() == FOLDER && isUnderVirtual())
+			create(IResource.VIRTUAL | IResource.FORCE, true, monitor);
+		else
+			internalCreate(IResource.FORCE, true, monitor);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ICoreConstants.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ICoreConstants.java
index 0ce70e5..bda1a23 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ICoreConstants.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ICoreConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -58,6 +59,11 @@ public interface ICoreConstants {
 	 */
 	static final int M_LINK = 0x10000;
 	/**
+	 * Marks this resource as virtual.
+	 * @since 3.6
+	 */
+	static final int M_VIRTUAL = 0x80000;
+	/**
 	 * The file has no content description.
 	 * @since 3.0
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/IModelObjectConstants.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/IModelObjectConstants.java
index 6a29a57..4a258e9 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/IModelObjectConstants.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/IModelObjectConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,15 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
+ * Markus Schorn (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
 public interface IModelObjectConstants {
 	public static final String ARGUMENTS = "arguments"; //$NON-NLS-1$
+	public static final String ID = "id"; //$NON-NLS-1$
 	public static final String AUTOBUILD = "autobuild"; //$NON-NLS-1$
 	public static final String BUILD_COMMAND = "buildCommand"; //$NON-NLS-1$
 	public static final String BUILD_ORDER = "buildOrder"; //$NON-NLS-1$
@@ -23,10 +27,11 @@ public interface IModelObjectConstants {
 	public static final String TRIGGER_INCREMENTAL = "incremental"; //$NON-NLS-1$
 	public static final String COMMENT = "comment"; //$NON-NLS-1$
 	public static final String DICTIONARY = "dictionary"; //$NON-NLS-1$
-	public static final String FILE_STATE_LONGEVITY = "fileStateLongevity"; //$NON-NLS-1$
 	public static final String KEY = "key"; //$NON-NLS-1$
 	public static final String LOCATION = "location"; //$NON-NLS-1$
 	public static final String LOCATION_URI = "locationURI"; //$NON-NLS-1$
+	public static final String APPLY_FILE_STATE_POLICY = "applyFileStatePolicy"; //$NON-NLS-1$
+	public static final String FILE_STATE_LONGEVITY = "fileStateLongevity"; //$NON-NLS-1$
 	public static final String MAX_FILE_STATE_SIZE = "maxFileStateSize"; //$NON-NLS-1$
 	public static final String MAX_FILE_STATES = "maxFileStates"; //$NON-NLS-1$
 	/**
@@ -44,4 +49,10 @@ public interface IModelObjectConstants {
 	public static final String WORKSPACE_DESCRIPTION = "workspaceDescription"; //$NON-NLS-1$
 	public static final String LINKED_RESOURCES = "linkedResources"; //$NON-NLS-1$
 	public static final String LINK = "link"; //$NON-NLS-1$
+	public static final String FILTERED_RESOURCES = "filteredResources"; //$NON-NLS-1$
+	public static final String FILTER = "filter"; //$NON-NLS-1$
+	public static final String MATCHER = "matcher"; //$NON-NLS-1$
+	public static final String VARIABLE = "variable"; //$NON-NLS-1$
+	public static final String VARIABLE_LIST = "variableList"; //$NON-NLS-1$
+	public static final String SNAPSHOT_LOCATION = "snapshotLocation"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LinkDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LinkDescription.java
index 6f5950f..da0a83f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LinkDescription.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LinkDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,12 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.*;
 
@@ -19,6 +21,15 @@ import org.eclipse.core.runtime.*;
  * in the project description.
  */
 public class LinkDescription implements Comparable {
+	public static final URI VIRTUAL_LOCATION = getVirtualLocation();
+	private static URI getVirtualLocation() {
+		try {
+			return  new URI("virtual:/virtual"); //$NON-NLS-1$
+		} catch (URISyntaxException e) {
+			//cannot happen
+			return null;
+		}
+	}
 
 	private URI localLocation;
 
@@ -49,7 +60,7 @@ public class LinkDescription implements Comparable {
 		if (!(o.getClass() == LinkDescription.class))
 			return false;
 		LinkDescription other = (LinkDescription) o;
-		return localLocation.equals(other.localLocation) && type == other.type;
+		return localLocation.equals(other.localLocation) && path.equals(other.path) && type == other.type;
 	}
 
 	public URI getLocationURI() {
@@ -67,9 +78,13 @@ public class LinkDescription implements Comparable {
 	public int getType() {
 		return type;
 	}
+	
+	public boolean isGroup() {
+		return localLocation.equals(VIRTUAL_LOCATION);
+	}
 
 	public int hashCode() {
-		return type + localLocation.hashCode();
+		return type + path.hashCode() + localLocation.hashCode();
 	}
 
 	public void setLocationURI(URI location) {
@@ -87,7 +102,7 @@ public class LinkDescription implements Comparable {
 	/**
 	 * Compare link descriptions in a way that sorts them topologically by path.
 	 * This is important to ensure we process links in topological (breadth-first) order when reconciling
-	 * links.  See {@link Project#reconcileLinks(ProjectDescription)}.
+	 * links.  See {@link Project#reconcileLinksAndGroups(ProjectDescription)}.
 	 */
 	public int compareTo(Object o) {
 		LinkDescription that = (LinkDescription) o;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocalMetaArea.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocalMetaArea.java
index 9a23e86..f799da2 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocalMetaArea.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocalMetaArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [301563] Save and load tree snapshots
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -31,6 +32,7 @@ public class LocalMetaArea implements ICoreConstants {
 	/* package */static final String F_PROJECT_LOCATION = ".location"; //$NON-NLS-1$
 	/* package */static final String F_PROJECTS = ".projects"; //$NON-NLS-1$
 	/* package */static final String F_PROPERTIES = ".properties"; //$NON-NLS-1$
+	/* package */static final String F_REFRESH = ".refresh"; //$NON-NLS-1$
 	/* package */static final String F_ROOT = ".root"; //$NON-NLS-1$
 	/* package */static final String F_SAFE_TABLE = ".safetable"; //$NON-NLS-1$
 	/* package */static final String F_SNAP = ".snap"; //$NON-NLS-1$
@@ -62,6 +64,13 @@ public class LocalMetaArea implements ICoreConstants {
 		Workspace.clear(getOldDescriptionLocationFor(target).toFile());
 	}
 
+	/**
+	 * Delete the refresh snapshot once it has been used to open a new project.
+	 */
+	public void clearRefresh(IProject target) {
+		Workspace.clear(getRefreshLocationFor(target).toFile());
+	}
+
 	public void create(IProject target) {
 		java.io.File file = locationFor(target).toFile();
 		//make sure area is empty
@@ -147,6 +156,15 @@ public class LocalMetaArea implements ICoreConstants {
 		return locationFor(resource).append(F_PROPERTIES);
 	}
 
+	/**
+	 * Returns the path of the file in which to save the refresh snapshot for
+	 * the given project.
+	 */
+	public IPath getRefreshLocationFor(IProject project) {
+		Assert.isNotNull(project);
+		return locationFor(project).append(F_REFRESH);
+	}
+
 	public IPath getSafeTableLocationFor(String pluginId) {
 		IPath prefix = metaAreaLocation.append(F_SAFE_TABLE);
 		// if the plugin is the resources plugin, we return the master table
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocationValidator.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocationValidator.java
index f835e8a..9030794 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocationValidator.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/LocationValidator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -47,12 +48,16 @@ public class LocationValidator {
 	 */
 	private IStatus validateAbsolute(URI location, boolean error) {
 		if (!location.isAbsolute()) {
-			IPath pathPart = new Path(location.getSchemeSpecificPart());
 			String message;
-			if (pathPart.segmentCount() > 0)
-				message = NLS.bind(Messages.pathvar_undefined, location.toString(), pathPart.segment(0));
-			else
+			if (location.getSchemeSpecificPart() == null)
 				message = Messages.links_noPath;
+			else {
+				IPath pathPart = new Path(location.getSchemeSpecificPart());
+				if (pathPart.segmentCount() > 0)
+					message = NLS.bind(Messages.pathvar_undefined, location.toString(), pathPart.segment(0));
+				else
+					message = Messages.links_noPath;
+			}
 			int code = error ? IResourceStatus.VARIABLE_NOT_DEFINED : IResourceStatus.VARIABLE_NOT_DEFINED_WARNING;
 			return new ResourceStatus(code, null, message);
 		}
@@ -63,7 +68,7 @@ public class LocationValidator {
 	 * @see IWorkspace#validateLinkLocation(IResource, IPath)
 	 */
 	public IStatus validateLinkLocation(IResource resource, IPath unresolvedLocation) {
-		IPath location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
+		IPath location = resource.getPathVariableManager().resolvePath(unresolvedLocation);
 		if (location.isEmpty())
 			return new ResourceStatus(IResourceStatus.INVALID_VALUE, resource.getFullPath(), Messages.links_noPath);
 		//check that the location is absolute
@@ -79,6 +84,8 @@ public class LocationValidator {
 	}
 
 	public IStatus validateLinkLocationURI(IResource resource, URI unresolvedLocation) {
+		if (unresolvedLocation.getSchemeSpecificPart() == null)
+			return new ResourceStatus(IResourceStatus.INVALID_VALUE, resource.getFullPath(), Messages.links_noPath);
 		String message;
 		//check if resource linking is disabled
 		if (ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) {
@@ -96,7 +103,7 @@ public class LocationValidator {
 			message = NLS.bind(Messages.links_parentNotAccessible, resource.getFullPath());
 			return new ResourceStatus(IResourceStatus.INVALID_VALUE, resource.getFullPath(), message);
 		}
-		URI location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);
+		URI location = resource.getPathVariableManager().resolveURI(unresolvedLocation);
 		//check nature veto
 		String[] natureIds = ((Project) resource.getProject()).internalGetDescription().getNatureIds();
 
@@ -286,8 +293,11 @@ public class LocationValidator {
 	public IStatus validateProjectLocation(IProject context, IPath unresolvedLocation) {
 		if (unresolvedLocation == null)
 			return validateProjectLocationURI(context, null);
-
-		IPath location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
+		IPath location;
+		if (context != null)
+			location = context.getPathVariableManager().resolvePath(unresolvedLocation);
+		else
+			location = workspace.getPathVariableManager().resolvePath(unresolvedLocation);
 		//check that the location is absolute
 		if (!location.isAbsolute()) {
 			String message;
@@ -327,8 +337,11 @@ public class LocationValidator {
 		// the default is ok for all other projects
 		if (unresolvedLocation == null)
 			return Status.OK_STATUS;
-
-		URI location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);
+		URI location;
+		if (context != null)
+			location = context.getPathVariableManager().resolveURI(unresolvedLocation);
+		else
+			location = workspace.getPathVariableManager().resolveURI(unresolvedLocation);
 		//check the standard path name restrictions
 		IStatus result = validateSegments(location);
 		if (!result.isOK())
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Marker.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Marker.java
index ce70001..75c8675 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Marker.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Marker.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -238,7 +238,8 @@ public class Marker extends PlatformObject implements IMarker {
 			//only need to generate delta info if none already
 			boolean needDelta = !manager.hasDelta(resource.getFullPath(), id);
 			MarkerInfo oldInfo = needDelta ? (MarkerInfo) markerInfo.clone() : null;
-			markerInfo.setAttribute(attributeName, value);
+			boolean validate = manager.isPersistentType(markerInfo.getType());
+			markerInfo.setAttribute(attributeName, value, validate);
 			if (manager.isPersistent(markerInfo))
 				((Resource) resource).getResourceInfo(false, true).set(ICoreConstants.M_MARKERS_SNAP_DIRTY);
 			if (needDelta) {
@@ -274,7 +275,8 @@ public class Marker extends PlatformObject implements IMarker {
 			//only need to generate delta info if none already
 			boolean needDelta = !manager.hasDelta(resource.getFullPath(), id);
 			MarkerInfo oldInfo = needDelta ? (MarkerInfo) markerInfo.clone() : null;
-			markerInfo.setAttributes(attributeNames, values);
+			boolean validate = manager.isPersistentType(markerInfo.getType());
+			markerInfo.setAttributes(attributeNames, values, validate);
 			if (manager.isPersistent(markerInfo))
 				((Resource) resource).getResourceInfo(false, true).set(ICoreConstants.M_MARKERS_SNAP_DIRTY);
 			if (needDelta) {
@@ -301,7 +303,8 @@ public class Marker extends PlatformObject implements IMarker {
 			//only need to generate delta info if none already
 			boolean needDelta = !manager.hasDelta(resource.getFullPath(), id);
 			MarkerInfo oldInfo = needDelta ? (MarkerInfo) markerInfo.clone() : null;
-			markerInfo.setAttributes(values);
+			boolean validate = manager.isPersistentType(markerInfo.getType());
+			markerInfo.setAttributes(values, validate);
 			if (manager.isPersistent(markerInfo))
 				((Resource) resource).getResourceInfo(false, true).set(ICoreConstants.M_MARKERS_SNAP_DIRTY);
 			if (needDelta) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerInfo.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerInfo.java
index 76bfcd8..5f63605 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerInfo.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -142,8 +142,9 @@ public class MarkerInfo implements IMarkerSetElement, Cloneable, IStringPoolPart
 		attributes = map;
 	}
 
-	public void setAttribute(String attributeName, Object value) {
-		value = checkValidAttribute(value);
+	public void setAttribute(String attributeName, Object value, boolean validate) {
+		if (validate)
+			value = checkValidAttribute(value);
 		if (attributes == null) {
 			if (value == null)
 				return;
@@ -160,7 +161,7 @@ public class MarkerInfo implements IMarkerSetElement, Cloneable, IStringPoolPart
 		}
 	}
 
-	public void setAttributes(Map map) {
+	public void setAttributes(Map map, boolean validate) {
 		if (map == null)
 			attributes = null;
 		else {
@@ -169,15 +170,15 @@ public class MarkerInfo implements IMarkerSetElement, Cloneable, IStringPoolPart
 				Object key = i.next();
 				Assert.isTrue(key instanceof String);
 				Object value = map.get(key);
-				setAttribute((String) key, MarkerInfo.checkValidAttribute(value));
+				setAttribute((String) key, value, validate);
 			}
 		}
 	}
 
-	public void setAttributes(String[] attributeNames, Object[] values) {
+	public void setAttributes(String[] attributeNames, Object[] values, boolean validate) {
 		Assert.isTrue(attributeNames.length == values.length);
 		for (int i = 0; i < attributeNames.length; i++)
-			setAttribute(attributeNames[i], values[i]);
+			setAttribute(attributeNames[i], values[i], validate);
 	}
 
 	public void setCreationTime(long value) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
index 3d2fbca..7dd0efe 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/MarkerManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -326,6 +326,14 @@ public class MarkerManager implements IManager {
 	}
 
 	/**
+	 * Returns true if the given marker type is persistent, and false
+	 * otherwise.
+	 */
+	public boolean isPersistentType(String type) {
+		return cache.isPersistent(type);
+	}
+
+	/**
 	 * Returns true if <code>type</code> is a sub type of <code>superType</code>.
 	 */
 	public boolean isSubtype(String type, String superType) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ModelObjectWriter.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ModelObjectWriter.java
index 74e6437..1628cb7 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ModelObjectWriter.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ModelObjectWriter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,9 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
+ * Markus Schorn (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -18,11 +21,9 @@ import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.internal.events.BuildCommand;
 import org.eclipse.core.internal.localstore.SafeFileOutputStream;
 import org.eclipse.core.internal.utils.FileUtil;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.IPath;
 
-//
 public class ModelObjectWriter implements IModelObjectConstants {
 
 	/**
@@ -74,10 +75,7 @@ public class ModelObjectWriter implements IModelObjectConstants {
 		//cases to avoid dirtying .project files unnecessarily.	
 		if (!command.isConfigurable())
 			return false;
-		return !command.isBuilding(IncrementalProjectBuilder.AUTO_BUILD) || 
-			!command.isBuilding(IncrementalProjectBuilder.CLEAN_BUILD) || 
-			!command.isBuilding(IncrementalProjectBuilder.FULL_BUILD) || 
-			!command.isBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD);
+		return !command.isBuilding(IncrementalProjectBuilder.AUTO_BUILD) || !command.isBuilding(IncrementalProjectBuilder.CLEAN_BUILD) || !command.isBuilding(IncrementalProjectBuilder.FULL_BUILD) || !command.isBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD);
 	}
 
 	protected void write(LinkDescription description, XMLWriter writer) {
@@ -91,6 +89,47 @@ public class ModelObjectWriter implements IModelObjectConstants {
 		writer.endTag(LINK);
 	}
 
+	protected void write(IResourceFilterDescription description, XMLWriter writer) {
+		writer.startTag(FILTER, null);
+		if (description != null) {
+			writer.printSimpleTag(ID, new Long(((FilterDescription)description).getId()));
+			writer.printSimpleTag(NAME, description.getResource().getProjectRelativePath());
+			writer.printSimpleTag(TYPE, Integer.toString(description.getType()));
+			if (description.getFileInfoMatcherDescription() != null) {
+				write(description.getFileInfoMatcherDescription(), writer);
+			}
+		}
+		writer.endTag(FILTER);
+	}
+		
+	protected void write(FileInfoMatcherDescription description, XMLWriter writer) {
+		writer.startTag(MATCHER, null);
+		writer.printSimpleTag(ID, description.getId());
+		if (description.getArguments() != null) {
+			if (description.getArguments() instanceof String) {
+				writer.printSimpleTag(ARGUMENTS, description.getArguments());
+			} else if (description.getArguments() instanceof FileInfoMatcherDescription[]) {
+				writer.startTag(ARGUMENTS , null);
+				FileInfoMatcherDescription[] array = (FileInfoMatcherDescription[]) description.getArguments();
+				for (int i = 0; i < array.length; i++) {
+					write(array[i], writer);
+				}
+				writer.endTag(ARGUMENTS);
+			} else
+				writer.printSimpleTag(ARGUMENTS, ""); //$NON-NLS-1$
+		}
+		writer.endTag(MATCHER);
+	}
+
+	protected void write(VariableDescription description, XMLWriter writer) {
+		writer.startTag(VARIABLE, null);
+		if (description != null) {
+			writer.printSimpleTag(NAME, description.getName());
+			writer.printSimpleTag(VALUE, description.getValue());
+		}
+		writer.endTag(VARIABLE);
+	}
+
 	/**
 	 * Writes a location to the XML writer.  For backwards compatibility,
 	 * local file system locations are written and read using a different tag
@@ -153,6 +192,14 @@ public class ModelObjectWriter implements IModelObjectConstants {
 			write((LinkDescription) obj, writer);
 			return;
 		}
+		if (obj instanceof IResourceFilterDescription) {
+			write((IResourceFilterDescription) obj, writer);
+			return;
+		}
+		if (obj instanceof VariableDescription) {
+			write((VariableDescription) obj, writer);
+			return;
+		}
 		writer.printTabulation();
 		writer.println(obj.toString());
 	}
@@ -163,6 +210,10 @@ public class ModelObjectWriter implements IModelObjectConstants {
 			writer.printSimpleTag(NAME, description.getName());
 			String comment = description.getComment();
 			writer.printSimpleTag(COMMENT, comment == null ? "" : comment); //$NON-NLS-1$
+			URI snapshotLocation= description.getSnapshotLocationURI();
+			if (snapshotLocation != null) {
+				writer.printSimpleTag(SNAPSHOT_LOCATION, snapshotLocation.toString());
+			}
 			write(PROJECTS, PROJECT, getReferencedProjects(description), writer);
 			write(BUILD_SPEC, Arrays.asList(description.getBuildSpec(false)), writer);
 			write(NATURES, NATURE, description.getNatureIds(false), writer);
@@ -173,6 +224,22 @@ public class ModelObjectWriter implements IModelObjectConstants {
 				Collections.sort(sorted);
 				write(LINKED_RESOURCES, sorted, writer);
 			}
+			HashMap filters = description.getFilters();
+			if (filters != null) {
+				List sorted = new ArrayList();
+				for (Iterator it = filters.values().iterator(); it.hasNext();) {
+					List list = (List) it.next();
+					sorted.addAll(list);
+				}
+				Collections.sort(sorted);
+				write(FILTERED_RESOURCES, sorted, writer);
+			}
+			HashMap variables = description.getVariables();
+			if (variables != null) {
+				List sorted = new ArrayList(variables.values());
+				Collections.sort(sorted);
+				write(VARIABLE_LIST, sorted, writer);
+			}
 		}
 		writer.endTag(PROJECT_DESCRIPTION);
 	}
@@ -221,6 +288,7 @@ public class ModelObjectWriter implements IModelObjectConstants {
 			writer.printSimpleTag(NAME, description.getName());
 			writer.printSimpleTag(AUTOBUILD, description.isAutoBuilding() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$
 			writer.printSimpleTag(SNAPSHOT_INTERVAL, new Long(description.getSnapshotInterval()));
+			writer.printSimpleTag(APPLY_FILE_STATE_POLICY, description.isApplyFileStatePolicy() ? "1" : "0"); //$NON-NLS-1$ //$NON-NLS-2$
 			writer.printSimpleTag(FILE_STATE_LONGEVITY, new Long(description.getFileStateLongevity()));
 			writer.printSimpleTag(MAX_FILE_STATE_SIZE, new Long(description.getMaxFileStateSize()));
 			writer.printSimpleTag(MAX_FILE_STATES, new Integer(description.getMaxFileStates()));
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/NatureManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/NatureManager.java
index 3d0e9f7..3795989 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/NatureManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/NatureManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,13 +25,13 @@ import org.eclipse.osgi.util.NLS;
  */
 public class NatureManager implements ILifecycleListener, IManager {
 	//maps String (nature ID) -> descriptor objects
-	protected Map descriptors;
+	private Map descriptors;
 
 	//maps IProject -> String[] of enabled natures for that project
-	protected Map natureEnablements;
+	private final Map natureEnablements = Collections.synchronizedMap(new HashMap(20));
 
 	//maps String (builder ID) -> String (nature ID)
-	protected Map buildersToNatures = null;
+	private Map buildersToNatures;
 	//colour constants used in cycle detection algorithm
 	private static final byte WHITE = 0;
 	private static final byte GREY = 1;
@@ -43,7 +43,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 
 	/**
 	 * Computes the list of natures that are enabled for the given project.
-	 * Enablement computation is subtlely different from nature set
+	 * Enablement computation is subtly different from nature set
 	 * validation, because it must find and remove all inconsistencies.
 	 */
 	protected String[] computeNatureEnablements(Project project) {
@@ -108,7 +108,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 	/* (non-Javadoc)
 	 * @see IWorkspace#getNatureDescriptor(String)
 	 */
-	public IProjectNatureDescriptor getNatureDescriptor(String natureId) {
+	public synchronized IProjectNatureDescriptor getNatureDescriptor(String natureId) {
 		lazyInitialize();
 		return (IProjectNatureDescriptor) descriptors.get(natureId);
 	}
@@ -116,7 +116,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 	/* (non-Javadoc)
 	 * @see IWorkspace#getNatureDescriptors()
 	 */
-	public IProjectNatureDescriptor[] getNatureDescriptors() {
+	public synchronized IProjectNatureDescriptor[] getNatureDescriptors() {
 		lazyInitialize();
 		Collection values = descriptors.values();
 		return (IProjectNatureDescriptor[]) values.toArray(new IProjectNatureDescriptor[values.size()]);
@@ -275,7 +275,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 	/**
 	 * Marks all nature descriptors that are involved in cycles
 	 */
-	protected void detectCycles() {
+	private void detectCycles() {
 		Collection values = descriptors.values();
 		ProjectNatureDescriptor[] natures = (ProjectNatureDescriptor[]) values.toArray(new ProjectNatureDescriptor[values.size()]);
 		for (int i = 0; i < natures.length; i++)
@@ -294,7 +294,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 	 * Returns the ID of the project nature that claims ownership of the
 	 * builder with the given ID.  Returns null if no nature owns that builder.
 	 */
-	public String findNatureForBuilder(String builderID) {
+	public synchronized String findNatureForBuilder(String builderID) {
 		if (buildersToNatures == null) {
 			buildersToNatures = new HashMap(10);
 			IProjectNatureDescriptor[] descs = getNatureDescriptors();
@@ -310,28 +310,20 @@ public class NatureManager implements ILifecycleListener, IManager {
 		return (String) buildersToNatures.get(builderID);
 	}
 
-	protected void flushEnablements(IProject project) {
-		if (natureEnablements != null) {
-			natureEnablements.remove(project);
-			if (natureEnablements.size() == 0) {
-				natureEnablements = null;
-			}
-		}
+	private synchronized void flushEnablements(IProject project) {
+		natureEnablements.remove(project);
 	}
 
 	/**
 	 * Returns the cached array of enabled natures for this project,
 	 * or null if there is nothing in the cache.
 	 */
-	protected String[] getEnabledNatures(Project project) {
-		String[] enabled;
-		if (natureEnablements != null) {
-			enabled = (String[]) natureEnablements.get(project);
-			if (enabled != null)
-				return enabled;
-		}
+	protected synchronized String[] getEnabledNatures(Project project) {
+		String[] enabled = (String[]) natureEnablements.get(project);
+		if (enabled != null)
+			return enabled;
 		enabled = computeNatureEnablements(project);
-		setEnabledNatures(project, enabled);
+		natureEnablements.put(project, enabled);
 		return enabled;
 	}
 
@@ -443,7 +435,7 @@ public class NatureManager implements ILifecycleListener, IManager {
 	 * Only initialize the descriptor cache when we know it is actually needed.
 	 * Running programs may never need to refer to this cache.
 	 */
-	protected void lazyInitialize() {
+	private void lazyInitialize() {
 		if (descriptors != null)
 			return;
 		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PT_NATURES);
@@ -464,15 +456,6 @@ public class NatureManager implements ILifecycleListener, IManager {
 		detectCycles();
 	}
 
-	/**
-	 * Sets the cached array of enabled natures for this project.
-	 */
-	protected void setEnabledNatures(IProject project, String[] enablements) {
-		if (natureEnablements == null)
-			natureEnablements = Collections.synchronizedMap(new HashMap(20));
-		natureEnablements.put(project, enablements);
-	}
-
 	public void shutdown(IProgressMonitor monitor) {
 		// do nothing
 	}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/OS.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/OS.java
index 9c06d36..49a2c78 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/OS.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/OS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,8 @@ public abstract class OS {
 	private static final String INSTALLED_PLATFORM;
 
 	public static final char[] INVALID_RESOURCE_CHARACTERS;
-	public static final String[] INVALID_RESOURCE_NAMES;
+	private static final String[] INVALID_RESOURCE_BASENAMES;
+	private static final String[] INVALID_RESOURCE_FULLNAMES;
 
 	static {
 		//find out the OS being used
@@ -30,15 +31,18 @@ public abstract class OS {
 		if (INSTALLED_PLATFORM.equals(Platform.OS_WIN32)) {
 			//valid names and characters taken from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp
 			INVALID_RESOURCE_CHARACTERS = new char[] {'\\', '/', ':', '*', '?', '"', '<', '>', '|'};
-			INVALID_RESOURCE_NAMES = new String[] {"aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ 
+			INVALID_RESOURCE_BASENAMES = new String[] {"aux", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
 					"com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
 					"lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-			Arrays.sort(INVALID_RESOURCE_NAMES);
+			Arrays.sort(INVALID_RESOURCE_BASENAMES);
+			//CLOCK$ may be used if an extension is provided
+			INVALID_RESOURCE_FULLNAMES = new String[] {"clock$"}; //$NON-NLS-1$
 		} else {
 			//only front slash and null char are invalid on UNIXes
 			//taken from http://www.faqs.org/faqs/unix-faq/faq/part2/section-2.html
 			INVALID_RESOURCE_CHARACTERS = new char[] {'/', '\0',};
-			INVALID_RESOURCE_NAMES = new String[] {}; 
+			INVALID_RESOURCE_BASENAMES = null;
+			INVALID_RESOURCE_FULLNAMES = null;
 		}
 	}
 
@@ -64,8 +68,11 @@ public abstract class OS {
 				return false;
 			int dot = name.indexOf('.');
 			//on windows, filename suffixes are not relevant to name validity
-			name = dot == -1 ? name : name.substring(0, dot);
+			String basename = dot == -1 ? name : name.substring(0, dot);
+			if (Arrays.binarySearch(INVALID_RESOURCE_BASENAMES, basename.toLowerCase()) >= 0)
+				return false;
+			return Arrays.binarySearch(INVALID_RESOURCE_FULLNAMES, name.toLowerCase()) < 0;
 		}
-		return Arrays.binarySearch(INVALID_RESOURCE_NAMES, name.toLowerCase()) < 0;
+		return true;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableManager.java
index eaa5494..6d79984 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 
 	static final String VARIABLE_PREFIX = "pathvariable."; //$NON-NLS-1$
 	private Set listeners;
+	private Map/*<IProject, Set<Project>*/ projectListeners;
 
 	private Preferences preferences;
 
@@ -35,6 +36,7 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 	 */
 	public PathVariableManager() {
 		this.listeners = Collections.synchronizedSet(new HashSet());
+		this.projectListeners = Collections.synchronizedMap(new HashMap());
 		this.preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
 	}
 
@@ -46,6 +48,15 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 		listeners.add(listener);
 	}
 
+	synchronized public void addChangeListener(IPathVariableChangeListener listener, IProject project) {
+		Object list = projectListeners.get(project);
+		if (list == null) {
+			list = Collections.synchronizedSet(new HashSet());
+			projectListeners.put(project, list);
+		}
+		((Set) list).add(listener);
+	}
+
 	/**
 	 * Throws a runtime exception if the given name is not valid as a path
 	 * variable name.
@@ -83,10 +94,14 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 	 * @see IPathVariableChangeEvent#VARIABLE_DELETED
 	 */
 	private void fireVariableChangeEvent(String name, IPath value, int type) {
-		if (this.listeners.size() == 0)
+		fireVariableChangeEvent(this.listeners, name, value, type);
+	}
+
+	private void fireVariableChangeEvent(Set list, String name, IPath value, int type) {
+		if (list.size() == 0)
 			return;
 		// use a separate collection to avoid interference of simultaneous additions/removals 
-		Object[] listenerArray = this.listeners.toArray();
+		Object[] listenerArray = list.toArray();
 		final PathVariableChangeEvent pve = new PathVariableChangeEvent(this, name, value, type);
 		for (int i = 0; i < listenerArray.length; ++i) {
 			final IPathVariableChangeListener l = (IPathVariableChangeListener) listenerArray[i];
@@ -103,6 +118,12 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 		}
 	}
 
+	public void fireVariableChangeEvent(IProject project, String name, IPath value, int type) {
+		Object list = projectListeners.get(project);
+		if (list != null)
+			fireVariableChangeEvent(((Set) list), name, value, type);
+	}
+
 	/**
 	 * Return a key to use in the Preferences.
 	 */
@@ -162,6 +183,15 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 		listeners.remove(listener);
 	}
 
+	synchronized public void removeChangeListener(IPathVariableChangeListener listener, IProject project) {
+		Object list = projectListeners.get(project);
+		if (list != null) {
+			((Set) list).remove(listener);
+			if (((Set) list).isEmpty())
+				projectListeners.remove(project);
+		}
+	}
+
 	/**
 	 * @see org.eclipse.core.resources.IPathVariableManager#resolvePath(IPath)
 	 */
@@ -175,6 +205,8 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 	public URI resolveURI(URI uri) {
 		if (uri == null || uri.isAbsolute())
 			return uri;
+		if (uri.getSchemeSpecificPart() == null)
+			return uri;
 		IPath raw = new Path(uri.getSchemeSpecificPart());
 		IPath resolved = resolvePath(raw);
 		return raw == resolved ? uri : URIUtil.toURI(resolved);
@@ -264,4 +296,73 @@ public class PathVariableManager implements IPathVariableManager, IManager {
 		}
 		return Status.OK_STATUS;
 	}
+
+	/**
+	 * @throws CoreException 
+	 * @see IPathVariableManager#convertToRelative(URI, boolean, String)
+	 */
+	public URI convertToRelative(URI path, boolean force, String variableHint) throws CoreException {
+		return PathVariableUtil.convertToRelative(this, path, null, false, variableHint);
+	}
+
+	public URI getURIValue(String name) {
+		IPath path = getValue(name);
+		if (path != null)
+			return URIUtil.toURI(path);
+		return null;
+	}
+
+	public void setURIValue(String name, URI value) throws CoreException {
+		if (value != null)
+			setValue(name, URIUtil.toPath(value));
+		else
+			setValue(name, null);
+	}
+
+	public IStatus validateValue(URI path) {
+		if (path != null)
+			validateValue(URIUtil.toPath(path));
+		else
+			validateValue((IPath) null);
+		return null;
+	}
+
+	public URI resolveURI(URI uri, IResource resource) {
+		return resolveURI(uri);
+	}
+
+	public String[] getPathVariableNames(IResource resource) {
+		return getPathVariableNames();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see IPathVariableManager#getVariableRelativePathLocation(IResource, URI)
+	 */
+	public URI getVariableRelativePathLocation(URI location) {
+		try {
+			URI result = convertToRelative(location, false, null);
+			if (!result.equals(location))
+				return result;
+		} catch (CoreException e) {
+			// handled by returning null
+		}
+		return null;
+	}
+
+	/**
+	 * @see IPathVariableManager#convertToUserEditableFormat(String, boolean)
+	 */
+	public String convertToUserEditableFormat(String value, boolean locationFormat) {
+		return PathVariableUtil.convertToUserEditableFormatInternal(value, locationFormat);
+	}
+
+	public String convertFromUserEditableFormat(String userFormat, boolean locationFormat) {
+		return PathVariableUtil.convertFromUserEditableFormatInternal(this, userFormat, locationFormat);
+	}
+
+	public boolean isUserDefined(String name) {
+		return ProjectVariableProviderManager.getDefault().findDescriptor(name) == null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableUtil.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableUtil.java
new file mode 100644
index 0000000..a214977
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PathVariableUtil.java
@@ -0,0 +1,508 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.internal.resources.projectvariables.ParentVariableResolver;
+import org.eclipse.core.internal.resources.projectvariables.WorkspaceLocationVariableResolver;
+
+import org.eclipse.core.runtime.IPath;
+
+import org.eclipse.core.internal.resources.projectvariables.WorkspaceParentLocationVariableResolver;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.internal.resources.projectvariables.*;
+import org.eclipse.core.resources.IPathVariableManager;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
+
+public class PathVariableUtil {
+	
+	static public String getUniqueVariableName(String variable, IResource resource) {
+		int index = 1;
+		variable = getValidVariableName(variable);
+		String destVariable = variable;
+
+		while (resource.getPathVariableManager().isDefined(destVariable)) {
+			destVariable = variable + index;
+			index++;
+		}
+		return destVariable;
+	}
+
+	public static String getValidVariableName(String variable) {
+		// remove the argument part if the variable is of the form ${VAR-ARG}
+		int argumentIndex = variable.indexOf('-');
+		if (argumentIndex != -1)
+			variable = variable.substring(0, argumentIndex);
+		
+		variable = variable.trim();
+		char first = variable.charAt(0);
+		if (!Character.isLetter(first) && first != '_') {
+			variable = 'A' + variable;
+		}
+
+		StringBuffer builder = new StringBuffer();
+		for (int i = 0; i < variable.length(); i++) {
+			char c = variable.charAt(i);
+			if ((Character.isLetter(c) || Character.isDigit(c) || c == '_') &&
+					!Character.isWhitespace(c))
+				builder.append(c);
+		}
+		variable = builder.toString();
+		return variable;
+	}
+
+	public static IPath convertToPathRelativeMacro(IPathVariableManager pathVariableManager, IPath originalPath, IResource resource, boolean force, String variableHint) throws CoreException {
+		return convertToRelative(pathVariableManager, originalPath, resource, force, variableHint, true, true);
+	}
+
+	static public IPath convertToRelative(IPathVariableManager pathVariableManager, IPath originalPath, IResource resource, boolean force, String variableHint) throws CoreException {
+		return convertToRelative(pathVariableManager, originalPath, resource, force, variableHint, true, false);
+	}
+
+	static public URI convertToRelative(IPathVariableManager pathVariableManager, URI originalPath, IResource resource, boolean force, String variableHint) throws CoreException {
+		return URIUtil.toURI(convertToRelative(pathVariableManager, URIUtil.toPath(originalPath), resource, force, variableHint, true, false));
+	}
+
+	static public URI convertToRelative(IPathVariableManager pathVariableManager, URI originalPath, IResource resource, boolean force, String variableHint, boolean skipWorkspace, boolean generateMacro) throws CoreException {
+		return URIUtil.toURI(convertToRelative(pathVariableManager, URIUtil.toPath(originalPath), resource, force, variableHint));
+	}
+	
+	static private IPath convertToRelative(IPathVariableManager pathVariableManager, IPath originalPath, IResource resource, boolean force, String variableHint, boolean skipWorkspace, boolean generateMacro) throws CoreException {
+		if (variableHint != null && pathVariableManager.isDefined(variableHint)) {
+			IPath value = URIUtil.toPath(pathVariableManager.getURIValue(variableHint));
+			if (value != null)
+				return wrapInProperFormat(makeRelativeToVariable(pathVariableManager, originalPath, resource, force, variableHint, generateMacro), generateMacro);
+		}
+		IPath path = convertToProperCase(originalPath);
+		IPath newPath = null;
+		int maxMatchLength = -1;
+		String[] existingVariables = pathVariableManager.getPathVariableNames();
+		for (int i = 0; i < existingVariables.length; i++) {
+			String variable = existingVariables[i];
+			if (skipWorkspace) {
+				// Variables relative to the workspace are not portable, and defeat the purpose of having linked resource locations, 
+				// so they should not automatically be created relative to the workspace.
+				if (variable.equals(WorkspaceLocationVariableResolver.NAME))
+					continue; 
+			}
+			if (variable.equals(WorkspaceParentLocationVariableResolver.NAME))
+				continue;
+			if (variable.equals(ParentVariableResolver.NAME))
+				continue;
+			// find closest path to the original path
+			IPath value = URIUtil.toPath(pathVariableManager.getURIValue(variable));
+			if (value != null) {
+				value = convertToProperCase(URIUtil.toPath(pathVariableManager.resolveURI(URIUtil.toURI(value))));
+				if (value.isPrefixOf(path)) {
+					int matchLength = value.segmentCount();
+					if (matchLength > maxMatchLength) {
+						maxMatchLength = matchLength;
+						newPath = makeRelativeToVariable(pathVariableManager, originalPath, resource, force, variable, generateMacro);
+					}
+				}
+			}
+		}
+		if (newPath != null)
+			return wrapInProperFormat(newPath, generateMacro);
+
+		if (force) {
+			int originalSegmentCount = originalPath.segmentCount();
+			for (int j = 0; j <= originalSegmentCount; j++) {
+				IPath matchingPath = path.removeLastSegments(j);
+				int minDifference = Integer.MAX_VALUE;
+				for (int k = 0; k < existingVariables.length; k++) {
+					String variable = existingVariables[k];
+					if (skipWorkspace) {
+						if (variable.equals(WorkspaceLocationVariableResolver.NAME))
+							continue;
+					}
+					if (variable.equals(WorkspaceParentLocationVariableResolver.NAME))
+						continue;
+					if (variable.equals(ParentVariableResolver.NAME))
+						continue;
+					IPath value = URIUtil.toPath(pathVariableManager.getURIValue(variable));
+					if (value != null) {
+						value = convertToProperCase(URIUtil.toPath(pathVariableManager.resolveURI(URIUtil.toURI(value))));
+						if (matchingPath.isPrefixOf(value)) {
+							int difference = value.segmentCount() - originalSegmentCount;
+							if (difference < minDifference) {
+								minDifference = difference;
+								newPath = makeRelativeToVariable(pathVariableManager, originalPath, resource, force, variable, generateMacro);
+							}
+						}
+					}
+				}
+				if (newPath != null)
+					return wrapInProperFormat(newPath, generateMacro);
+			}
+			if (originalSegmentCount == 0) {
+				String variable = ProjectLocationVariableResolver.NAME;
+				IPath value = URIUtil.toPath(pathVariableManager.getURIValue(variable));
+				value = convertToProperCase(URIUtil.toPath(pathVariableManager.resolveURI(URIUtil.toURI(value))));
+				if (originalPath.isPrefixOf(value))
+					newPath = makeRelativeToVariable(pathVariableManager, originalPath, resource, force, variable, generateMacro);
+				if (newPath != null)
+					return wrapInProperFormat(newPath, generateMacro);
+			}
+		}
+
+		if (skipWorkspace)
+			return convertToRelative(pathVariableManager, originalPath, resource, force, variableHint, false, generateMacro);
+		return originalPath;
+	}
+
+	private static IPath wrapInProperFormat(IPath newPath, boolean generateMacro) {
+		if (generateMacro)
+			newPath = PathVariableUtil.buildVariableMacro(newPath);
+		return newPath;
+	}
+
+	private static IPath makeRelativeToVariable(IPathVariableManager pathVariableManager, IPath originalPath, IResource resource, boolean force, String variableHint, boolean generateMacro) {
+		IPath path = convertToProperCase(originalPath);
+		IPath value = URIUtil.toPath(pathVariableManager.getURIValue(variableHint));
+		value = convertToProperCase(URIUtil.toPath(pathVariableManager.resolveURI(URIUtil.toURI(value))));
+		int valueSegmentCount = value.segmentCount();
+		if (value.isPrefixOf(path)) {
+			// transform "c:/foo/bar" into "FOO/bar"
+			IPath tmp = Path.fromOSString(variableHint);
+			for (int j = valueSegmentCount;j < originalPath.segmentCount(); j++) {
+				tmp = tmp.append(originalPath.segment(j));
+			}
+			return tmp;
+		} 
+
+		if (force) {
+			if (devicesAreCompatible(path, value)) {
+				// transform "c:/foo/bar/other_child/file.txt" into "${PARENT-1-BAR_CHILD}/other_child/file.txt"
+				int matchingFirstSegments = path.matchingFirstSegments(value);
+				if (matchingFirstSegments >= 0) {
+					String originalName= buildParentPathVariable(variableHint, valueSegmentCount - matchingFirstSegments, true);
+					IPath tmp = Path.fromOSString(originalName);
+					for (int j = matchingFirstSegments ;j < originalPath.segmentCount(); j++) {
+						tmp = tmp.append(originalPath.segment(j));
+					}
+					return tmp;
+				}
+			}
+		}
+		return originalPath;
+	}
+	
+	private static boolean devicesAreCompatible(IPath path, IPath value) {
+		return (path.getDevice() != null && value.getDevice() != null) ?
+					(path.getDevice().equals(value.getDevice())) :
+					(path.getDevice() == value.getDevice());
+	}
+
+	static private IPath convertToProperCase(IPath path) {
+		if (Platform.getOS().equals(Platform.OS_WIN32))
+			return Path.fromPortableString(path.toPortableString().toLowerCase());
+		return path;
+	}
+
+	static public boolean isParentVariable(String variableString) {
+		return variableString.startsWith(ParentVariableResolver.NAME + '-');
+	}
+	
+	// the format is PARENT-COUNT-ARGUMENT
+	static public int getParentVariableCount(String variableString) {
+		String items[] = variableString.split("-"); //$NON-NLS-1$
+		if (items.length == 3) {
+			try {
+				Integer count = Integer.valueOf(items[1]);
+				return count.intValue();
+			} catch (NumberFormatException e) {
+				// nothing
+			}
+		}
+		return -1;
+	}
+	
+	// the format is PARENT-COUNT-ARGUMENT
+	static public String getParentVariableArgument(String variableString) {
+		String items[] = variableString.split("-"); //$NON-NLS-1$
+		if (items.length == 3) 
+			return items[2];
+		return null;
+	}
+
+	static public String buildParentPathVariable(String variable, int difference, boolean generateMacro) {
+		String 	newString = ParentVariableResolver.NAME + "-" + difference + "-" + variable;    //$NON-NLS-1$//$NON-NLS-2$
+
+		if (!generateMacro)
+			newString = "${" + newString + "}";    //$NON-NLS-1$//$NON-NLS-2$
+		return newString;
+	}
+
+	public static IPath buildVariableMacro(IPath relativeSrcValue) {
+		String variable = relativeSrcValue.segment(0);
+		variable = "${" + variable + "}";  //$NON-NLS-1$//$NON-NLS-2$
+		return Path.fromOSString(variable).append(relativeSrcValue.removeFirstSegments(1));
+	}
+
+	public static String convertFromUserEditableFormatInternal(IPathVariableManager manager, String userFormat, boolean locationFormat) {
+		char pathPrefix = 0;
+		if ((userFormat.length() > 0) && (userFormat.charAt(0) == '/' || userFormat.charAt(0) == '\\'))
+			pathPrefix = userFormat.charAt(0);
+		String components[] = splitPathComponents(userFormat);
+		for (int i = 0; i < components.length; i++) {
+			if (components[i] == null)
+				continue;
+			if (isDotDot(components[i])) {
+				int parentCount = 1;
+				components[i] = null;
+				for (int j = i + 1; j < components.length; j++) {
+					if (components[j] != null) {
+						if (isDotDot(components[j])) {
+							parentCount++;
+							components[j] = null;
+						} else
+							break;
+					}
+				}
+				if (i == 0) // this means the value is implicitly relative to the project location
+					components[0] = PathVariableUtil.buildParentPathVariable(ProjectLocationVariableResolver.NAME, parentCount, false);
+				else {
+					for (int j = i - 1; j >= 0; j--) {
+						if (parentCount == 0)
+							break;
+						if (components[j] == null)
+							continue;
+						String variable = extractVariable(components[j]);
+						
+						boolean hasVariableWithMacroSyntax = true;
+						if (variable.length() == 0 && (locationFormat && j == 0)) {
+							variable = components[j];
+							hasVariableWithMacroSyntax = false;
+						}
+						
+						try {
+							if (variable.length() > 0) {
+								String prefix = new String();
+								if (hasVariableWithMacroSyntax) {
+									int indexOfVariable = components[j].indexOf(variable) - "${".length(); //$NON-NLS-1$
+									prefix = components[j].substring(0, indexOfVariable);
+									String suffix = components[j].substring(indexOfVariable + "${".length() + variable.length() + "}".length()); //$NON-NLS-1$ //$NON-NLS-2$
+									if (suffix.length() != 0) {
+										// Create an intermediate variable, since a syntax of "${VAR}foo/../"
+										// can't be converted to a "${PARENT-1-VAR}foo" variable.
+										// So instead, an intermediate variable "VARFOO" will be created of value 
+										// "${VAR}foo", and the string "${PARENT-1-VARFOO}" will be inserted.
+										String intermediateVariable = PathVariableUtil.getValidVariableName(variable + suffix);
+										IPath intermediateValue = Path.fromPortableString(components[j]);
+										int intermediateVariableIndex = 1;
+										String originalIntermediateVariableName = intermediateVariable;
+										while (manager.isDefined(intermediateVariable)) {
+											IPath tmpValue = URIUtil.toPath(manager.getURIValue(intermediateVariable));
+											if (tmpValue.equals(intermediateValue))
+												break;
+											intermediateVariable = originalIntermediateVariableName + intermediateVariableIndex;
+										}
+										if (!manager.isDefined(intermediateVariable))
+											manager.setURIValue(intermediateVariable, URIUtil.toURI(intermediateValue));
+										variable = intermediateVariable;
+										prefix = new String();
+									}
+								}
+								String newVariable = variable;
+								if (PathVariableUtil.isParentVariable(variable)) {
+									String argument = PathVariableUtil.getParentVariableArgument(variable);
+									int count = PathVariableUtil.getParentVariableCount(variable);
+									if (argument != null && count != -1)
+										newVariable = PathVariableUtil.buildParentPathVariable(argument, count + parentCount, locationFormat);
+									else
+										newVariable = PathVariableUtil.buildParentPathVariable(variable, parentCount, locationFormat);
+								} else
+									newVariable = PathVariableUtil.buildParentPathVariable(variable, parentCount, locationFormat);
+								components[j] = prefix + newVariable;
+								break;
+							}
+							components[j] = null;
+							parentCount--;
+						} catch (CoreException e) {
+							components[j] = null;
+							parentCount--;
+						}
+					}
+				}
+			}
+		}
+		StringBuffer buffer = new StringBuffer();
+		if (pathPrefix != 0)
+			buffer.append(pathPrefix);
+		for (int i = 0; i < components.length; i++) {
+			if (components[i] != null) {
+				if (i > 0)
+					buffer.append(java.io.File.separator);
+				buffer.append(components[i]);
+			}
+		}
+		return buffer.toString();
+	}
+
+	private static boolean isDotDot(String component) {
+		return component.equals(".."); //$NON-NLS-1$
+	}
+
+	private static String[] splitPathComponents(String userFormat) {
+		ArrayList list = new ArrayList();
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < userFormat.length(); i++) {
+			char c = userFormat.charAt(i);
+			if (c == '/' || c == '\\') {
+				if (buffer.length() > 0)
+					list.add(buffer.toString());
+				buffer = new StringBuffer();
+			} else
+				buffer.append(c);
+		}
+		if (buffer.length() > 0)
+			list.add(buffer.toString());
+		return (String[]) list.toArray(new String[0]);
+	}
+
+	public static String convertToUserEditableFormatInternal(String value, boolean locationFormat) {
+		StringBuffer buffer = new StringBuffer();
+		if (locationFormat) {
+			IPath path = Path.fromOSString(value);
+			if (path.isAbsolute())
+				return path.toOSString();
+			int index = value.indexOf(java.io.File.separator);
+			String variable = index != -1 ? value.substring(0, index): value;
+			convertVariableToUserFormat(buffer, variable, variable, false);
+			if (index != -1)
+				buffer.append(value.substring(index));
+		} else {
+			String components[] = splitVariablesAndContent(value);
+			for (int i = 0; i < components.length; i++) {
+				String variable = extractVariable(components[i]);
+				convertVariableToUserFormat(buffer, components[i], variable, true);
+			}
+		}
+		return buffer.toString();
+	}
+
+	private static void convertVariableToUserFormat(StringBuffer buffer, String component, String variable, boolean generateMacro) {
+		if (PathVariableUtil.isParentVariable(variable)) {
+			String argument = PathVariableUtil.getParentVariableArgument(variable);
+			int count = PathVariableUtil.getParentVariableCount(variable);
+			if (argument != null && count != -1) {
+				buffer.append(generateMacro? PathVariableUtil.buildVariableMacro(Path.fromOSString(argument)):Path.fromOSString(argument));
+				for (int j = 0; j < count; j++) {
+					buffer.append(java.io.File.separator + ".."); //$NON-NLS-1$
+				}
+			} else
+				buffer.append(component);
+		} else
+			buffer.append(component);
+	}
+	/*
+	 * Splits a value (returned by this.getValue(variable) in an array of
+	 * string, where the array is divided between the value content and the
+	 * value variables.
+	 * 
+	 * For example, if the value is "${ECLIPSE_HOME}/plugins", the value
+	 * returned will be {"${ECLIPSE_HOME}" "/plugins"}
+	 */
+	static String[] splitVariablesAndContent(String value) {
+		LinkedList result = new LinkedList();
+		while (true) {
+			// we check if the value contains referenced variables with ${VAR}
+			int index = value.indexOf("${"); //$NON-NLS-1$
+			if (index != -1) {
+				int endIndex = getMatchingBrace(value, index);
+				if (index > 0)
+					result.add(value.substring(0, index));
+				result.add(value.substring(index, endIndex + 1));
+				value = value.substring(endIndex + 1);
+			} else
+				break;
+		}
+		if (value.length() > 0)
+			result.add(value);
+		return (String[]) result.toArray(new String[0]);
+	}
+
+	/*
+	 * Splits a value (returned by this.getValue(variable) in an array of
+	 * string of the variables contained in the value.
+	 * 
+	 * For example, if the value is "${ECLIPSE_HOME}/plugins", the value
+	 * returned will be {"ECLIPSE_HOME"}. If the value is 
+	 * "${ECLIPSE_HOME}/${FOO}/plugins", the value returned will be 
+	 * {"ECLIPSE_HOME", "FOO"}.
+	 */
+	static String[] splitVariableNames(String value) {
+		LinkedList result = new LinkedList();
+		while (true) {
+			int index = value.indexOf("${"); //$NON-NLS-1$
+			if (index != -1) {
+				int endIndex = getMatchingBrace(value, index);
+				result.add(value.substring(index + 2, endIndex));
+				value = value.substring(endIndex + 1);
+			} else
+				break;
+		}
+		return (String[]) result.toArray(new String[0]);
+	}
+
+	/*
+	 * Extracts the variable name from a variable segment.
+	 * 
+	 * For example, if the value is "${ECLIPSE_HOME}", the value returned will
+	 * be "ECLIPSE_HOME". If the segment doesn't contain any variable, the value
+	 * returned will be "".
+	 */
+	static String extractVariable(String segment) {
+		int index = segment.indexOf("${"); //$NON-NLS-1$
+		if (index != -1) {
+			int endIndex = getMatchingBrace(segment, index);
+			return segment.substring(index + 2, endIndex);
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	// getMatchingBrace("${FOO}/something") returns 5
+	// getMatchingBrace("${${OTHER}}/something") returns 10
+	// getMatchingBrace("${FOO") returns 5
+	static int getMatchingBrace(String value, int index) {
+		int scope = 0;
+		for (int i = index + 1; i < value.length(); i++) {
+			char c = value.charAt(i);
+			if (c == '}') {
+				if (scope == 0)
+					return i;
+				scope--;
+			}
+			if (c == '$') {
+				if ((i + 1 < value.length()) && (value.charAt(i + 1) == '{'))
+					scope++;
+			}
+		}
+		return value.length();
+	}
+
+	/**
+	 * Returns whether this variable is suited for programmatically determining 
+	 * which variable is the most appropriate when creating new linked resources.
+	 * 
+	 * @return true if the path variable is preferred.
+	 */
+	static public boolean isPreferred(String variableName) {
+		return !(variableName.equals(WorkspaceLocationVariableResolver.NAME) ||
+				variableName.equals(WorkspaceParentLocationVariableResolver.NAME) ||
+				variableName.equals(ParentVariableResolver.NAME));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java
index d695e8b..2f8c58e 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/PreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 	public static final boolean PREF_DEFAULT_BUILD_ORDER_DEFAULT = true;
 	public final static long PREF_SNAPSHOT_INTERVAL_DEFAULT = 5 * 60 * 1000l; // 5 min
 	public static final int PREF_OPERATIONS_PER_SNAPSHOT_DEFAULT = 100;
+	public static final boolean PREF_APPLY_FILE_STATE_POLICY_DEFAULT = true;
 	public static final long PREF_FILE_STATE_LONGEVITY_DEFAULT = 7 * 24 * 3600 * 1000l; // 7 days
 	public static final long PREF_MAX_FILE_STATE_SIZE_DEFAULT = 1024 * 1024l; // 1 MB
 	public static final int PREF_MAX_FILE_STATES_DEFAULT = 50;
@@ -59,6 +60,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		node.putBoolean(ResourcesPlugin.PREF_DEFAULT_BUILD_ORDER, PREF_DEFAULT_BUILD_ORDER_DEFAULT);
 
 		// history store defaults
+		node.putBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PREF_APPLY_FILE_STATE_POLICY_DEFAULT);
 		node.putLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PREF_FILE_STATE_LONGEVITY_DEFAULT);
 		node.putLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PREF_MAX_FILE_STATE_SIZE_DEFAULT);
 		node.putInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PREF_MAX_FILE_STATES_DEFAULT);
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java
index 87b5dab..9561e20 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,10 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
+ *     Anton Leherbauer (Wind River) - [198591] Allow Builder to specify scheduling rule
+ *     Francis Lynch (Wind River) - [301563] Save and load tree snapshots
+ *     Markus Schorn (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -24,6 +28,21 @@ import org.eclipse.osgi.util.NLS;
 
 public class Project extends Container implements IProject {
 
+	/**
+	 * Option constant (value 2) indicating that the snapshot location shall be
+	 * persisted with the project for autoloading the snapshot when the project
+	 * is imported in another workspace.
+	 * <p>
+	 * <strong>EXPERIMENTAL</strong>. This constant has been added as
+	 * part of a work in progress. There is no guarantee that this API will
+	 * work or that it will remain the same. Please do not use this API without
+	 * consulting with the Platform Core team.
+	 * </p>
+	 * @see #saveSnapshot(int, URI, IProgressMonitor)
+	 * @since 3.6
+	 */
+	public static final int SNAPSHOT_SET_AUTOLOAD = 2;
+	
 	protected Project(IPath path, Workspace container) {
 		super(path, container);
 	}
@@ -58,6 +77,8 @@ public class Project extends Container implements IProject {
 		MultiStatus result = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_WRITE_METADATA, message, null);
 		ProjectDescription current = internalGetDescription();
 		current.setComment(description.getComment());
+		current.setSnapshotLocationURI(description.getSnapshotLocationURI());
+		
 		// set the build order before setting the references or the natures
 		current.setBuildSpec(description.getBuildSpec(true));
 
@@ -196,6 +217,7 @@ public class Project extends Container implements IProject {
 			IProjectDescription desc = getDescription();
 			desc.setName(projectName);
 			desc.setLocation(null);
+			((ProjectDescription)desc).setSnapshotLocationURI(null);
 			internalCopy(desc, updateFlags, monitor);
 		} else {
 			// will fail since we're trying to copy a project to a non-project
@@ -553,7 +575,7 @@ public class Project extends Container implements IProject {
 				return true;
 			}
 
-		}, monitor);
+		}, null, IWorkspace.AVOID_UPDATE, monitor);
 	}
 
 
@@ -608,7 +630,7 @@ public class Project extends Container implements IProject {
 				copyMetaArea(this, destination, Policy.subMonitorFor(monitor, Policy.opWork * 5 / 100));
 
 				// copy just the project and not its children yet (tree node, properties)
-				internalCopyProjectOnly(destination, Policy.subMonitorFor(monitor, Policy.opWork * 5 / 100));
+				internalCopyProjectOnly(destination, destDesc, Policy.subMonitorFor(monitor, Policy.opWork * 5 / 100));
 
 				// set the description
 				destination.internalSetDescription(destDesc, false);
@@ -667,7 +689,7 @@ public class Project extends Container implements IProject {
 	/*
 	 * Copies just the project and no children. Does NOT copy the meta area.
 	 */
-	protected void internalCopyProjectOnly(IResource destination, IProgressMonitor monitor) throws CoreException {
+	protected void internalCopyProjectOnly(IResource destination, IProjectDescription destDesc, IProgressMonitor monitor) throws CoreException {
 		// close the property store so bogus values aren't copied to the destination
 		getPropertyManager().closePropertyStore(this);
 		getLocalManager().getHistoryStore().closeHistoryStore(this);
@@ -677,6 +699,13 @@ public class Project extends Container implements IProject {
 
 		ProjectInfo info = (ProjectInfo) ((Resource) destination).getResourceInfo(false, true);
 
+		//copy the hidden metadata that we store in the project description
+		ProjectDescription projectDesc = (ProjectDescription) destDesc;
+		ProjectDescription internalDesc = ((Project)destination.getProject()).internalGetDescription();
+		projectDesc.setLinkDescriptions(internalDesc.getLinks());
+		projectDesc.setFilterDescriptions(internalDesc.getFilters());
+		projectDesc.setVariableDescriptions(internalDesc.getVariables());
+
 		//clear properties, markers, and description for the new project, because they shouldn't be copied.
 		info.description = null;
 		info.natures = null;
@@ -749,6 +778,10 @@ public class Project extends Container implements IProject {
 		return false;//projects are never linked
 	}
 
+	public boolean isVirtual() {
+		return false; // projects are never virtual
+	}
+
 	/* (non-Javadoc)
 	 * @see IResource#isTeamPrivateMember(int)
 	 */
@@ -816,6 +849,41 @@ public class Project extends Container implements IProject {
 	}
 
 	/* (non-Javadoc)
+	 * @see IProject#loadSnapshot(int, URI, IProgressMonitor)
+	 */
+	public void loadSnapshot(int options, URI snapshotLocation, IProgressMonitor monitor) throws CoreException {
+		// load a snapshot of refresh information when project is not opened
+		if (isOpen()) {
+			String message = Messages.resources_projectMustNotBeOpen;
+			MultiStatus status = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IStatus.ERROR, message, null);
+			throw new CoreException(status);
+		}
+		internalLoadSnapshot(options, snapshotLocation, monitor);
+	}
+	
+	/**
+	 * Loads a snapshot of project meta-data from the given location URI.
+	 * Like {@link IProject#loadSnapshot(int, URI, IProgressMonitor)} but can be
+	 * called when the project is open.
+	 * 
+	 * @see IProject#saveSnapshot(int, URI, IProgressMonitor) 
+	 */
+	private void internalLoadSnapshot(int options, URI snapshotLocation, IProgressMonitor monitor) throws CoreException {
+		if ((options & SNAPSHOT_TREE) != 0) {
+			// ensure that path variables are resolved: only ws accessible while project is closed
+			snapshotLocation = workspace.getPathVariableManager().resolveURI(snapshotLocation);
+			if (!snapshotLocation.isAbsolute()) {
+				String message = NLS.bind(Messages.projRead_badSnapshotLocation, snapshotLocation.toString());
+				throw new CoreException(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, message, null));
+			}
+			// copy the snapshot from the URI into the project metadata
+			IPath snapshotPath = workspace.getMetaArea().getRefreshLocationFor(this);
+			IFileStore snapshotFileStore = EFS.getStore(org.eclipse.core.filesystem.URIUtil.toURI(snapshotPath));
+			EFS.getStore(snapshotLocation).copy(snapshotFileStore, EFS.OVERWRITE, monitor);
+		}
+	}
+
+	/* (non-Javadoc)
 	 * @see IProject#move(IProjectDescription, boolean, IProgressMonitor)
 	 */
 	public void move(IProjectDescription destination, boolean force, IProgressMonitor monitor) throws CoreException {
@@ -903,28 +971,60 @@ public class Project extends Container implements IProject {
 				// the M_USED flag is used to indicate the difference between opening a project
 				// for the first time and opening it from a previous close (restoring it from disk)
 				boolean used = info.isSet(M_USED);
+				boolean snapshotLoaded = false;
+				if (!used && !workspace.getMetaArea().getRefreshLocationFor(this).toFile().exists()) {
+					//auto-load a refresh snapshot if it is set
+					final boolean hasSavedDescription = getLocalManager().hasSavedDescription(this);
+					if (hasSavedDescription) {
+						ProjectDescription updatedDesc = info.getDescription();
+						if (updatedDesc != null) {
+							URI autoloadURI = updatedDesc.getSnapshotLocationURI();
+							if (autoloadURI != null) {
+								try {
+									autoloadURI = getPathVariableManager().resolveURI(autoloadURI);
+									internalLoadSnapshot(SNAPSHOT_TREE, autoloadURI, Policy.subMonitorFor(monitor, Policy.opWork * 5 / 100));
+									snapshotLoaded = true;
+								} catch (CoreException ce) {
+									//Log non-existing autoload snapshot as warning only
+									String msgerr = NLS.bind(Messages.projRead_cannotReadSnapshot, getName(), ce.getLocalizedMessage());
+									Policy.log(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, msgerr));
+								}
+							}
+						}
+					}
+				}
 				boolean minorIssuesDuringRestore = false;
 				if (used) {
 					minorIssuesDuringRestore = workspace.getSaveManager().restore(this, Policy.subMonitorFor(monitor, Policy.opWork * 20 / 100));
 				} else {
 					info.set(M_USED);
-					//reconcile any links in the project description
-					IStatus result = reconcileLinks(info.getDescription());
+					//reconcile any links and groups in the project description
+					IStatus result = reconcileLinksAndGroups(info.getDescription());
 					if (!result.isOK())
 						throw new CoreException(result);
 					workspace.updateModificationStamp(info);
-					monitor.worked(Policy.opWork * 20 / 100);
+					monitor.worked(Policy.opWork * (snapshotLoaded ? 15 : 20) / 100);
 				}
 				startup();
 				//request a refresh if the project is new and has unknown members on disk
-				// or restore of the project is not fully succesfull
+				// or restore of the project is not fully successful
 				if ((!used && unknownChildren) || !minorIssuesDuringRestore) {
+					boolean refreshed = false;
+					if (!used) {
+						refreshed = workspace.getSaveManager().restoreFromRefreshSnapshot(
+								this, Policy.subMonitorFor(monitor, Policy.opWork * 20 / 100));
+						if (refreshed) {	// account for the refresh work
+							monitor.worked(Policy.opWork * 60 / 100);
+						}
+					}
 					//refresh either in background or foreground
-					if ((updateFlags & IResource.BACKGROUND_REFRESH) != 0) {
-						workspace.refreshManager.refresh(this);
-						monitor.worked(Policy.opWork * 80 / 100);
-					} else {
-						refreshLocal(IResource.DEPTH_INFINITE, Policy.subMonitorFor(monitor, Policy.opWork * 80 / 100));
+					if (!refreshed) {
+						if ((updateFlags & IResource.BACKGROUND_REFRESH) != 0) {
+							workspace.refreshManager.refresh(this);
+							monitor.worked(Policy.opWork * 60 / 100);
+						} else {
+							refreshLocal(IResource.DEPTH_INFINITE, Policy.subMonitorFor(monitor, Policy.opWork * 60 / 100));
+						}
 					}
 				}
 				//creation of this project may affect overlapping resources
@@ -956,9 +1056,9 @@ public class Project extends Container implements IProject {
 	 * @return status ok if everything went well, otherwise an ERROR multi-status 
 	 * 	describing the problems encountered.
 	 */
-	public IStatus reconcileLinks(ProjectDescription newDescription) {
-		HashMap newLinks = newDescription.getLinks();
+	public IStatus reconcileLinksAndGroups(ProjectDescription newDescription) {
 		String msg = Messages.links_errorLinkReconcile;
+		HashMap newLinks = newDescription.getLinks();
 		MultiStatus status = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.OPERATION_FAILED, msg, null);
 		//walk over old linked resources and remove those that are no longer defined
 		ProjectDescription oldDescription = internalGetDescription();
@@ -986,21 +1086,44 @@ public class Project extends Container implements IProject {
 				}
 			}
 		}
-		//walk over new links and create if necessary
+		// walk over new links and groups and create if necessary
+		// Recreate them in order of the higher up in the tree hierarchy first,
+		// so we don't have to create intermediate directories that would turn
+		// out
+		// to be groups or link folders.
 		if (newLinks == null)
 			return status;
 		//sort links to avoid creating nested links before their parents
-		List sortedLinks = new ArrayList(newLinks.values());
-		Collections.sort(sortedLinks);
-		for (Iterator it = sortedLinks.iterator(); it.hasNext();) {
-			LinkDescription newLink = (LinkDescription) it.next();
+		TreeSet newLinksAndGroups = new TreeSet(new Comparator() {
+			public int compare(Object arg0, Object arg1) {
+				int numberOfSegments0 = ((LinkDescription) arg0).getProjectRelativePath().segmentCount();
+				int numberOfSegments1 = ((LinkDescription) arg1).getProjectRelativePath().segmentCount();
+				if (numberOfSegments0 != numberOfSegments1)
+					return numberOfSegments0 - numberOfSegments1;
+				else if (arg0.equals(arg1))
+					return 0;
+
+				return -1;
+			}
+
+		});
+		if (newLinks != null)
+			newLinksAndGroups.addAll(newLinks.values());
+
+		for (Iterator it = newLinksAndGroups.iterator(); it.hasNext();) {
+			Object description = it.next();
+			LinkDescription newLink = (LinkDescription) description;
 			try {
 				Resource toLink = workspace.newResource(getFullPath().append(newLink.getProjectRelativePath()), newLink.getType());
 				IContainer parent = toLink.getParent();
 				if (parent != null && !parent.exists() && parent.getType() == FOLDER)
 					((Folder) parent).ensureExists(Policy.monitorFor(null));
-				if (!toLink.exists() || !toLink.isLinked())
-					toLink.createLink(newLink.getLocationURI(), IResource.REPLACE | IResource.ALLOW_MISSING_LOCAL, null);
+				if (!toLink.exists() || !toLink.isLinked()) {
+					if (newLink.isGroup())
+						((Folder) toLink).create(IResource.REPLACE | IResource.VIRTUAL, true, null);
+					else
+						toLink.createLink(newLink.getLocationURI(), IResource.REPLACE | IResource.ALLOW_MISSING_LOCAL, null);
+				}
 			} catch (CoreException e) {
 				status.merge(e.getStatus());
 			}
@@ -1009,6 +1132,46 @@ public class Project extends Container implements IProject {
 	}
 
 	/* (non-Javadoc)
+	 * @see IProject#saveSnapshot(int, URI, IProgressMonitor)
+	 */
+	public void saveSnapshot(int options, URI snapshotLocation, IProgressMonitor monitor) throws CoreException {
+		monitor = Policy.monitorFor(monitor);
+		try {
+			monitor.beginTask("", Policy.totalWork); //$NON-NLS-1$
+			//Project must be open such that variables can be resolved
+			checkAccessible(getFlags(getResourceInfo(false, false)));
+			//URI must not be null and must not refer to undefined path variables
+			URI resolvedSnapshotLocation = getPathVariableManager().resolveURI(snapshotLocation);
+			if (resolvedSnapshotLocation == null || !resolvedSnapshotLocation.isAbsolute()) {
+				String message = NLS.bind(Messages.projRead_badSnapshotLocation, resolvedSnapshotLocation);
+				throw new CoreException(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, message, null));
+			}
+			if ((options & SNAPSHOT_TREE) != 0) {
+				// write a snapshot of refresh information
+				try {
+					IProgressMonitor sub = Policy.subMonitorFor(monitor, Policy.opWork / 2);
+					workspace.getSaveManager().saveRefreshSnapshot(this, resolvedSnapshotLocation, sub);
+				} catch (OperationCanceledException e) {
+					//workspace.getWorkManager().operationCanceled();
+					throw e;
+				}
+			}
+			if ((options & SNAPSHOT_SET_AUTOLOAD) != 0) {
+				IProgressMonitor sub = Policy.subMonitorFor(monitor, Policy.opWork / 2);
+				//Make absolute URI inside the project relative
+				if (snapshotLocation != null && snapshotLocation.isAbsolute()) {
+					snapshotLocation = getPathVariableManager().convertToRelative(snapshotLocation, false, "PROJECT_LOC"); //$NON-NLS-1$
+				}
+				IProjectDescription desc = getDescription();
+				((ProjectDescription) desc).setSnapshotLocationURI(snapshotLocation);
+				setDescription(desc, IResource.KEEP_HISTORY | IResource.AVOID_NATURE_CONFIG, sub);
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+	
+	/* (non-Javadoc)
 	 * @see IProject#setDescription(IProjectDescription, int, IProgressMonitor)
 	 */
 	public void setDescription(IProjectDescription description, int updateFlags, IProgressMonitor monitor) throws CoreException {
@@ -1134,7 +1297,7 @@ public class Project extends Container implements IProject {
 			//links can only be created if the project is open
 			IStatus result = null;
 			if (isOpen())
-				result = reconcileLinks(description);
+				result = reconcileLinksAndGroups(description);
 			internalSetDescription(description, true);
 			if (result != null && !result.isOK())
 				throw new CoreException(result);
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescription.java
index 493c761..5f4a423 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescription.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,19 +7,19 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- * Martin Oberhuber (Wind River) - [245937] setLinkLocation() detects non-change
+ *     Martin Oberhuber (Wind River) - [245937] setLinkLocation() detects non-change
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
+ * Markus Schorn (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
 import java.net.URI;
-import java.util.Arrays;
-import java.util.HashMap;
+import java.util.*;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.internal.events.BuildCommand;
 import org.eclipse.core.internal.utils.FileUtil;
 import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.*;
 
 public class ProjectDescription extends ModelObject implements IProjectDescription {
 	private static final ICommand[] EMPTY_COMMAND_ARRAY = new ICommand[0];
@@ -46,11 +46,24 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 	 * in this project, where IPath is the project relative path of the resource.
 	 */
 	protected HashMap linkDescriptions = null;
+	
+	/**
+	 * Map of (IPath -> LinkedList<FilterDescription>) pairs for each filtered resource
+	 * in this project, where IPath is the project relative path of the resource.
+	 */
+	protected HashMap filterDescriptions = null;
+
+	/**
+	 * Map of (String -> VariableDescription) pairs for each variable in this
+	 * project, where String is the name of the variable.
+	 */
+	protected HashMap variableDescriptions = null;
 
 	// fields
 	protected URI location = null;
 	protected String[] natures = EMPTY_STRING_ARRAY;
 	protected IProject[] staticRefs = EMPTY_PROJECT_ARRAY;
+	protected URI snapshotLocation= null;
 
 	public ProjectDescription() {
 		super();
@@ -60,6 +73,9 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 		ProjectDescription clone = (ProjectDescription) super.clone();
 		//don't want the clone to have access to our internal link locations table or builders
 		clone.linkDescriptions = null;
+		clone.filterDescriptions = null;
+		if (variableDescriptions != null)
+			clone.variableDescriptions = (HashMap) variableDescriptions.clone();
 		clone.buildSpec = getBuildSpec(true);
 		return clone;
 	}
@@ -163,6 +179,16 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 	}
 
 	/**
+	 * Returns the filter for the given resource name. Returns null if
+	 * no such filter exists.
+	 */
+	synchronized public LinkedList/*<FilterDescription>*/ getFilter(IPath aPath) {
+		if (filterDescriptions == null)
+			return null;
+		return (LinkedList /*<FilterDescription> */) filterDescriptions.get(aPath);
+	}
+
+	/**
 	 * Returns the map of link descriptions (IPath (project relative path) -> LinkDescription).
 	 * Since this method is only used internally, it never creates a copy.
 	 * Returns null if the project does not have any linked resources.
@@ -172,6 +198,24 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 	}
 
 	/**
+	 * Returns the map of filter descriptions (IPath (project relative path) -> LinkedList<FilterDescription>).
+	 * Since this method is only used internally, it never creates a copy.
+	 * Returns null if the project does not have any filtered resources.
+	 */
+	public HashMap getFilters() {
+		return filterDescriptions;
+	}
+
+	/**
+	 * Returns the map of variable descriptions (String (variable name) ->
+	 * VariableDescription). Since this method is only used internally, it never
+	 * creates a copy. Returns null if the project does not have any variables.
+	 */
+	public HashMap getVariables() {
+		return variableDescriptions;
+	}
+
+	/**
 	 * @see IProjectDescription#getLocation()
 	 * @deprecated
 	 */
@@ -214,6 +258,25 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 		return makeCopy ? (IProject[]) staticRefs.clone() : staticRefs;
 	}
 
+	/** 
+	 * Returns the URI to load a resource snapshot from.
+	 * May return <code>null</code> if no snapshot is set.
+	 * <p>
+	 * <strong>EXPERIMENTAL</strong>. This constant has been added as
+	 * part of a work in progress. There is no guarantee that this API will
+	 * work or that it will remain the same. Please do not use this API without
+	 * consulting with the Platform Core team.
+	 * </p>
+	 * @return the snapshot location URI,
+	 *   or <code>null</code>.
+	 * @see IProject#loadSnapshot(int, URI, IProgressMonitor)
+	 * @see #setSnapshotLocationURI(URI)
+	 * @since 3.6
+	 */
+	public URI getSnapshotLocationURI() {
+		return snapshotLocation;
+	}
+
 	/* (non-Javadoc)
 	 * @see IProjectDescription#hasNature(String)
 	 */
@@ -256,10 +319,31 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 			return true;
 		if (!Arrays.equals(natures, description.getNatureIds(false)))
 			return true;
-		HashMap otherLinks = description.getLinks();
-		if (linkDescriptions == null)
-			return otherLinks != null;
-		return !linkDescriptions.equals(otherLinks);
+		
+		HashMap otherFilters = description.getFilters();
+		if ((filterDescriptions == null) && (otherFilters != null))
+			return otherFilters != null;
+		if ((filterDescriptions != null) && !filterDescriptions.equals(otherFilters))
+			return true;
+
+		HashMap otherVariables = description.getVariables();
+		if ((variableDescriptions == null) && (otherVariables != null))
+			return true;
+		if ((variableDescriptions != null) && !variableDescriptions.equals(otherVariables))
+			return true;
+
+		final HashMap otherLinks = description.getLinks();
+		if (linkDescriptions != otherLinks) { 
+			if (linkDescriptions == null || !linkDescriptions.equals(otherLinks))
+				return true;
+		}
+		
+		final URI otherSnapshotLoc= description.getSnapshotLocationURI();
+		if (snapshotLocation != otherSnapshotLoc) {
+			if (snapshotLocation == null || !snapshotLocation.equals(otherSnapshotLoc))
+				return true;
+		}
+		return false;
 	}
 
 	/* (non-Javadoc)
@@ -316,6 +400,24 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 	}
 
 	/**
+	 * Sets the map of filter descriptions (String name -> LinkedList<LinkDescription>).
+	 * Since this method is only used internally, it never creates a copy. May
+	 * pass null if this project does not have any filtered resources
+	 */
+	public void setFilterDescriptions(HashMap filterDescriptions) {
+		this.filterDescriptions = filterDescriptions;
+	}
+
+	/**
+	 * Sets the map of variable descriptions (String name ->
+	 * VariableDescription). Since this method is only used internally, it never
+	 * creates a copy. May pass null if this project does not have any variables
+	 */
+	public void setVariableDescriptions(HashMap variableDescriptions) {
+		this.variableDescriptions = variableDescriptions;
+	}
+
+	/**
 	 * Sets the description of a link. Setting to a description of null will
 	 * remove the link from the project description.
 	 * @return <code>true</code> if the description was actually changed,
@@ -353,6 +455,112 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 		return true;
 	}
 
+	/**
+	 * Add the description of a filter. Setting to a description of null will
+	 * remove the filter from the project description.
+	 */
+	synchronized public void addFilter(IPath path, FilterDescription description) {
+		Assert.isNotNull(description);
+		if (filterDescriptions == null)
+			filterDescriptions = new HashMap(10);
+		LinkedList/*<FilterDescription>*/ descList = (LinkedList /*<FilterDescription> */) filterDescriptions.get(path);
+		if (descList == null) {
+			descList = new LinkedList/*<FilterDescription>*/();
+			filterDescriptions.put(path, descList);
+		}
+		descList.add(description);
+	}
+	
+	/**
+	 * Add the description of a filter. Setting to a description of null will
+	 * remove the filter from the project description.
+	 */
+	synchronized public void removeFilter(IPath path, FilterDescription description) {
+		if (filterDescriptions != null) {
+			LinkedList/*<FilterDescription>*/ descList = (LinkedList /*<FilterDescription> */) filterDescriptions.get(path);
+			if (descList != null) {
+				descList.remove(description);
+				if (descList.size() == 0) {
+					filterDescriptions.remove(path);
+					if (filterDescriptions.size() == 0)
+						filterDescriptions = null;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Sets the description of a variable. Setting to a description of null will
+	 * remove the variable from the project description.
+	 * @return <code>true</code> if the description was actually changed,
+	 *     <code>false</code> otherwise.
+	 * @since 3.5
+	 */
+	public boolean setVariableDescription(String name,
+			VariableDescription description) {
+		HashMap tempMap = variableDescriptions;
+		if (description != null) {
+			// addition or modification
+			if (tempMap == null)
+				tempMap = new HashMap(10);
+			else
+				// copy on write to protect against concurrent read
+				tempMap = (HashMap) tempMap.clone();
+			Object oldValue = tempMap.put(name, description);
+			if (oldValue!=null && description.equals(oldValue)) {
+				//not actually changed anything
+				return false;
+			}
+			variableDescriptions = tempMap;
+		} else {
+			// removal
+			if (tempMap == null)
+				return false;
+			// copy on write to protect against concurrent access
+			HashMap newMap = (HashMap) tempMap.clone();
+			Object oldValue = newMap.remove(name);
+			if (oldValue == null) {
+				//not actually changed anything
+				return false;
+			}
+			variableDescriptions = newMap.size() == 0 ? null : newMap;
+		}
+		return true;
+	}
+
+	/**
+	 * set the filters for a given resource. Setting to a description of null will
+	 * remove the filter from the project description.
+	 * @return <code>true</code> if the description was actually changed,
+	 *     <code>false</code> otherwise.
+	 */
+	synchronized public boolean setFilters(IPath path, LinkedList/*<FilterDescription>*/ descriptions) {
+		if (descriptions != null) {
+			// addition
+			if (filterDescriptions == null)
+				filterDescriptions = new HashMap(10);
+			Object oldValue = filterDescriptions.put(path, descriptions);
+			if (oldValue!=null && descriptions.equals(oldValue)) {
+				//not actually changed anything
+				return false;
+			}
+		}
+		else { 
+			// removal
+			if (filterDescriptions == null)
+				return false;
+			
+			Object oldValue = filterDescriptions.remove(path);
+			if (oldValue == null) {
+				//not actually changed anything
+				return false;
+			}
+			if (filterDescriptions.size() == 0)
+				filterDescriptions = null;
+		}
+		return true;
+	}
+
 	/* (non-Javadoc)
 	 * @see IProjectDescription#setLocation(IPath)
 	 */
@@ -386,4 +594,27 @@ public class ProjectDescription extends ModelObject implements IProjectDescripti
 		staticRefs = copyAndRemoveDuplicates(value);
 		cachedRefs = null;
 	}
+
+	/**
+	 * Sets the location URI for a project snapshot that may be
+	 * loaded automatically when the project is created in a workspace.
+	 * <p>
+	 * <strong>EXPERIMENTAL</strong>. This method has been added as
+	 * part of a work in progress. There is no guarantee that this API will
+	 * work or that it will remain the same. Please do not use this API without
+	 * consulting with the Platform Core team.
+	 * </p>
+	 * @param snapshotLocation the location URI or
+	 *    <code>null</code> to clear the setting 
+	 * @see IProject#loadSnapshot(int, URI, IProgressMonitor)
+	 * @see #getSnapshotLocationURI()
+	 * @since 3.6 
+	 */
+	public void setSnapshotLocationURI(URI snapshotLocation) {
+		this.snapshotLocation = snapshotLocation;
+	}
+
+	public URI getGroupLocationURI(IPath projectRelativePath) {
+		return LinkDescription.VIRTUAL_LOCATION;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescriptionReader.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescriptionReader.java
index 4a7005a..93264b2 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescriptionReader.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectDescriptionReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
+ * Markus Schorn (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -51,7 +53,24 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 	protected static final int S_PROJECT_NAME = 19;
 	protected static final int S_PROJECTS = 20;
 	protected static final int S_REFERENCED_PROJECT_NAME = 21;
+	
+	protected static final int S_FILTERED_RESOURCES = 23;
+	protected static final int S_FILTER = 24;
+	protected static final int S_FILTER_ID = 25;
+	protected static final int S_FILTER_PATH = 26;
+	protected static final int S_FILTER_TYPE = 27;
+	
+	protected static final int S_MATCHER = 28;
+	protected static final int S_MATCHER_ID = 29;
+	protected static final int S_MATCHER_ARGUMENTS = 30;
+	
+	protected static final int S_VARIABLE_LIST = 31;
+	protected static final int S_VARIABLE = 32;
+	protected static final int S_VARIABLE_NAME = 33;
+	protected static final int S_VARIABLE_VALUE = 34;
 
+	protected static final int S_SNAPSHOT_LOCATION = 35;
+	
 	/**
 	 * Singleton sax parser factory
 	 */
@@ -301,7 +320,19 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 				break;
 			case S_LINKED_RESOURCES :
 				endLinkedResourcesElement(elementName);
-				return;
+				break;
+			case S_VARIABLE :
+				endVariableElement(elementName);
+				break;
+			case S_FILTER:
+				endFilterElement(elementName);
+				break;
+			case S_FILTERED_RESOURCES :
+				endFilteredResourcesElement(elementName);
+				break;
+			case S_VARIABLE_LIST :
+				endVariableListElement(elementName);
+				break;
 			case S_PROJECT_COMMENT :
 				if (elementName.equals(COMMENT)) {
 					projectDescription.setComment(charBuffer.toString());
@@ -354,6 +385,33 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 			case S_LINK_LOCATION_URI :
 				endLinkLocationURI(elementName);
 				break;
+			case S_FILTER_ID :
+				endFilterId(elementName);
+				break;
+			case S_FILTER_PATH :
+				endFilterPath(elementName);
+				break;
+			case S_FILTER_TYPE :
+				endFilterType(elementName);
+				break;
+			case S_MATCHER :
+				endMatcherElement(elementName);
+				break;
+			case S_MATCHER_ID :
+				endMatcherID(elementName);
+				break;
+			case S_MATCHER_ARGUMENTS:
+				endMatcherArguments(elementName);
+				break;
+			case S_VARIABLE_NAME :
+				endVariableName(elementName);
+				break;
+			case S_VARIABLE_VALUE :
+				endVariableValue(elementName);
+				break;
+			case S_SNAPSHOT_LOCATION :
+				endSnapshotLocation(elementName);
+				break;
 		}
 		charBuffer.setLength(0);
 	}
@@ -372,6 +430,33 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 	}
 
 	/**
+	 * End this group of linked resources and add them to the project description.
+	 */
+	private void endFilteredResourcesElement(String elementName) {
+		if (elementName.equals(FILTERED_RESOURCES)) {
+			HashMap filteredResources = (HashMap) objectStack.pop();
+			state = S_PROJECT_DESC;
+			if (filteredResources.isEmpty())
+				return;
+			projectDescription.setFilterDescriptions(filteredResources);
+		}
+	}
+
+	/**
+	 * End this group of group resources and add them to the project
+	 * description.
+	 */
+	private void endVariableListElement(String elementName) {
+		if (elementName.equals(VARIABLE_LIST)) {
+			HashMap variableList = (HashMap) objectStack.pop();
+			state = S_PROJECT_DESC;
+			if (variableList.isEmpty())
+				return;
+			projectDescription.setVariableDescriptions(variableList);
+		}
+	}
+
+	/**
 	 * End a single linked resource and add it to the HashMap.
 	 */
 	private void endLinkElement(String elementName) {
@@ -400,6 +485,99 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 			((HashMap) objectStack.peek()).put(link.getProjectRelativePath(), link);
 		}
 	}
+	
+	private void endMatcherElement(String elementName) {
+		if (elementName.equals(MATCHER)) {
+			// Pop off an array (Object[2]) containing the matcher id and arguments.
+			Object[] matcher = (Object[]) objectStack.pop();
+			// Make sure that you have something reasonable
+			String id = (String) matcher[0];
+			// the id can't be null
+			if (id == null) {
+				parseProblem(NLS.bind(Messages.projRead_badFilterID, id));
+				return;
+			}
+
+			if (objectStack.peek() instanceof ArrayList) {
+				state = S_MATCHER_ARGUMENTS;
+				// The ArrayList of matchers is the next thing on the stack
+				ArrayList list = ((ArrayList) objectStack.peek());
+				list.add(new FileInfoMatcherDescription((String) matcher[0], matcher[1]));
+			}
+
+			if (objectStack.peek() instanceof FilterDescription) {
+				state = S_FILTER;
+				FilterDescription d = ((FilterDescription) objectStack.peek());
+				d.setFileInfoMatcherDescription(new FileInfoMatcherDescription((String) matcher[0], matcher[1]));
+			}
+		}
+	}
+
+	/**
+	 * End a single filtered resource and add it to the HashMap.
+	 */
+	private void endFilterElement(String elementName) {
+		if (elementName.equals(FILTER)) {
+			// Pop off the filter description
+			FilterDescription filter = (FilterDescription) objectStack.pop();
+			if (project != null) {
+				// Make sure that you have something reasonable
+				IPath path = filter.getResource().getProjectRelativePath();
+				int type = filter.getType();
+				// arguments can be null
+				if (path == null) {
+					parseProblem(NLS.bind(Messages.projRead_emptyFilterName, Integer.toString(type)));
+					return;
+				}
+				if (type == -1) {
+					parseProblem(NLS.bind(Messages.projRead_badFilterType, path));
+					return;
+				}
+
+				// The HashMap of filtered resources is the next thing on the stack
+				HashMap map = ((HashMap) objectStack.peek());
+				LinkedList/*FilterDescription*/list = (LinkedList/*FilterDescription*/) map.get(filter.getResource().getProjectRelativePath());
+				if (list == null) {
+					list = new LinkedList/*FilterDescription*/();
+					map.put(filter.getResource().getProjectRelativePath(), list);
+				}
+				list.add(filter);
+			}
+			else {
+				// if the project is null, that means that we're loading a project description to retrieve 
+				// some meta data only.
+				String key = new String(); // an empty key;
+				HashMap map = ((HashMap) objectStack.peek());
+				LinkedList/*FilterDescription*/list = (LinkedList/*FilterDescription*/) map.get(key);
+				if (list == null) {
+					list = new LinkedList/*FilterDescription*/();
+					map.put(key, list);
+				}
+				list.add(filter);
+			}
+			state = S_FILTERED_RESOURCES;
+		}
+	}
+
+	/**
+	 * End a single group resource and add it to the HashMap.
+	 */
+	private void endVariableElement(String elementName) {
+		if (elementName.equals(VARIABLE)) {
+			state = S_VARIABLE_LIST;
+			// Pop off the link description
+			VariableDescription desc = (VariableDescription) objectStack.pop();
+			// Make sure that you have something reasonable
+			if (desc.getName().length() == 0) {
+				parseProblem(NLS.bind(Messages.projRead_emptyVariableName,
+						project.getName()));
+				return;
+			}
+
+			// The HashMap of variables is the next thing on the stack
+			((HashMap) objectStack.peek()).put(desc.getName(), desc);
+		}
+	}
 
 	/**
 	 * For backwards compatibility, link locations in the local file system are represented 
@@ -461,6 +639,118 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 		}
 	}
 
+	private void endMatcherID(String elementName) {
+		if (elementName.equals(ID)) {
+			// The matcher id is String.
+			String newID = charBuffer.toString().trim();
+			// objectStack has an array (Object[2]) on it for the matcher id and arguments.
+			String oldID = (String)((Object[])objectStack.peek())[0];
+			if (oldID != null) {
+				parseProblem(NLS.bind(Messages.projRead_badID, oldID, newID));
+			} else {
+				((Object[]) objectStack.peek())[0] = newID;
+			}
+			state = S_MATCHER;
+		}
+	}
+
+	private void endMatcherArguments(String elementName) {
+		if (elementName.equals(ARGUMENTS)) {
+			ArrayList matchers = (ArrayList) objectStack.pop();
+			Object newArguments = charBuffer.toString();
+			
+			if (matchers.size() > 0)
+				newArguments = matchers.toArray(new FileInfoMatcherDescription[matchers.size()]);
+
+			// objectStack has an array (Object[2]) on it for the matcher id and arguments.
+			String oldArguments = (String)((Object[])objectStack.peek())[1];
+			if (oldArguments != null) {
+				parseProblem(NLS.bind(Messages.projRead_badArguments, oldArguments, newArguments));
+			} else
+				((Object[]) objectStack.peek())[1] = newArguments;
+			state = S_MATCHER;
+		}
+	}
+	
+	private void endFilterId(String elementName) {
+		if (elementName.equals(ID)) {
+			Long newId = new Long(charBuffer.toString());
+			// objectStack has a FilterDescription on it. Set the name
+			// on this FilterDescription.
+			long oldId = ((FilterDescription) objectStack.peek()).getId();
+			if (oldId != 0) {
+				parseProblem(NLS.bind(Messages.projRead_badFilterName, new Long(oldId), newId));
+			} else {
+				((FilterDescription) objectStack.peek()).setId(newId.longValue());
+			}
+			state = S_FILTER;
+		}
+	}
+
+	private void endFilterPath(String elementName) {
+		if (elementName.equals(NAME)) {
+			IPath newPath = new Path(charBuffer.toString());
+			// objectStack has a FilterDescription on it. Set the name
+			// on this FilterDescription.
+			IResource oldResource = ((FilterDescription) objectStack.peek()).getResource();
+			if (oldResource != null) {
+				parseProblem(NLS.bind(Messages.projRead_badFilterName, oldResource.getProjectRelativePath(), newPath));
+			} else {
+				if (project != null) {
+					((FilterDescription) objectStack.peek()).setResource(newPath.isEmpty() ? (IResource) project : project.getFolder(newPath));
+				} else {
+					// if the project is null, that means that we're loading a project description to retrieve 
+					// some meta data only.
+					((FilterDescription) objectStack.peek()).setResource(null);
+				}
+			}
+			state = S_FILTER;
+		}
+	}
+
+	private void endFilterType(String elementName) {
+		if (elementName.equals(TYPE)) {
+			int newType = -1;
+			try {
+				// parseInt expects a string containing only numerics
+				// or a leading '-'.  Ensure there is no leading/trailing
+				// whitespace.
+				newType = Integer.parseInt(charBuffer.toString().trim());
+			} catch (NumberFormatException e) {
+				log(e);
+			}
+			// objectStack has a FilterDescription on it. Set the type
+			// on this FilterDescription.
+			int oldType = ((FilterDescription) objectStack.peek()).getType();
+			if (oldType != -1) {
+				parseProblem(NLS.bind(Messages.projRead_badFilterType2, Integer.toString(oldType), Integer.toString(newType)));
+			} else {
+				((FilterDescription) objectStack.peek()).setType(newType);
+			}
+			state = S_FILTER;
+		}
+	}
+
+	private void endVariableName(String elementName) {
+		if (elementName.equals(NAME)) {
+			String value = charBuffer.toString();
+			// objectStack has a VariableDescription on it. Set the value
+			// on this ValueDescription.
+			((VariableDescription) objectStack.peek()).setName(value);
+			state = S_VARIABLE;
+		}
+	}
+
+	private void endVariableValue(String elementName) {
+		if (elementName.equals(VALUE)) {
+			String value = charBuffer.toString();
+			// objectStack has a VariableDescription on it. Set the value
+			// on this ValueDescription.
+			((VariableDescription) objectStack.peek()).setValue(value);
+			state = S_VARIABLE;
+		}
+	}
+
 	private void endLinkType(String elementName) {
 		if (elementName.equals(TYPE)) {
 			//FIXME we should handle this case by removing the entire link
@@ -485,7 +775,7 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 			state = S_LINK;
 		}
 	}
-
+	
 	/**
 	 * End of an element that is part of a nature list
 	 */
@@ -519,6 +809,20 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 		projectDescription.setReferencedProjects(projects);
 	}
 
+	private void endSnapshotLocation(String elementName) {
+		if (elementName.equals(SNAPSHOT_LOCATION)) {
+			String location = charBuffer.toString().trim();
+			try {
+				projectDescription.setSnapshotLocationURI(new URI(location));
+			} catch (URISyntaxException e) {
+				String msg = NLS.bind(Messages.projRead_badSnapshotLocation, location);
+				problems.add(new Status(IStatus.WARNING, ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_READ_METADATA, msg, e));
+			}
+			state = S_PROJECT_DESC;
+		}
+	}
+
+	
 	/**
 	 * @see ErrorHandler#error(SAXParseException)
 	 */
@@ -589,6 +893,22 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 			state = S_LINKED_RESOURCES;
 			return;
 		}
+		if (elementName.equals(FILTERED_RESOURCES)) {
+			// Push a HashMap to collect all the filters.
+			objectStack.push(new HashMap());
+			state = S_FILTERED_RESOURCES;
+			return;
+		}
+		if (elementName.equals(VARIABLE_LIST)) {
+			// Push a HashMap to collect all the variables.
+			objectStack.push(new HashMap());
+			state = S_VARIABLE_LIST;
+			return;
+		}
+		if (elementName.equals(SNAPSHOT_LOCATION)) {
+			state = S_SNAPSHOT_LOCATION;
+			return;
+		}	
 	}
 
 	public ProjectDescription read(InputSource input) {
@@ -713,6 +1033,14 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 					objectStack.push(new LinkDescription());
 				}
 				break;
+			case S_VARIABLE_LIST:
+				if (elementName.equals(VARIABLE)) {
+					state = S_VARIABLE;
+					// Push place holders for the name, type and location of
+					// this link.
+					objectStack.push(new VariableDescription());
+				}
+				break;
 			case S_LINK :
 				if (elementName.equals(NAME)) {
 					state = S_LINK_PATH;
@@ -724,6 +1052,49 @@ public class ProjectDescriptionReader extends DefaultHandler implements IModelOb
 					state = S_LINK_LOCATION_URI;
 				}
 				break;
+			case S_FILTERED_RESOURCES :
+				if (elementName.equals(FILTER)) {
+					state = S_FILTER;
+					// Push place holders for the name, type, id and arguments of
+					// this filter.
+					objectStack.push(new FilterDescription());
+				}
+				break;
+			case S_FILTER:
+				if (elementName.equals(ID)) {
+					state = S_FILTER_ID;
+				}else if (elementName.equals(NAME)) {
+					state = S_FILTER_PATH;
+				} else if (elementName.equals(TYPE)) {
+					state = S_FILTER_TYPE;
+				} else if (elementName.equals(MATCHER)) {
+					state = S_MATCHER;
+					// Push an array for the matcher id and arguments
+					objectStack.push(new Object[2]);
+				}
+				break;
+			case S_MATCHER:
+				if (elementName.equals(ID)) {
+					state = S_MATCHER_ID;
+				} else if (elementName.equals(ARGUMENTS)) {
+					state = S_MATCHER_ARGUMENTS;
+					objectStack.push(new ArrayList());
+				}
+				break;
+			case S_MATCHER_ARGUMENTS:
+				if (elementName.equals(MATCHER)) {
+					state = S_MATCHER;
+					// Push an array for the matcher id and arguments
+					objectStack.push(new Object[2]);
+				}
+				break;
+			case S_VARIABLE:
+				if (elementName.equals(NAME)) {
+					state = S_VARIABLE_NAME;
+				} else if (elementName.equals(VALUE)) {
+					state = S_VARIABLE_VALUE;
+				}
+				break;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectInfo.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectInfo.java
index e67d5ba..af16c9f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectInfo.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,14 @@ public class ProjectInfo extends ResourceInfo {
 	protected IContentTypeMatcher matcher = null;
 
 	/**
+	 * Discards stale natures on this project after project description
+	 * has changed.
+	 */
+	public synchronized void discardNatures() {
+		natures = null;
+	}
+
+	/**
 	 * Discards any stale state on this project after it has been moved.  Builder
 	 * instances must be cleared because they reference the old project handle.
 	 */
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPathVariableManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPathVariableManager.java
new file mode 100644
index 0000000..135907e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPathVariableManager.java
@@ -0,0 +1,487 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.resources.IResource;
+
+import org.eclipse.core.runtime.IPath;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.internal.utils.Messages;
+import org.eclipse.core.internal.utils.Policy;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The {@link IPathVariableManager} for a single project
+ * @see IProject#getPathVariableManager()
+ */
+public class ProjectPathVariableManager implements IPathVariableManager, IManager {
+
+	private Resource resource;
+	private ProjectVariableProviderManager.Descriptor variableProviders[] = null;
+
+	/**
+	 * Constructor for the class.
+	 */
+	public ProjectPathVariableManager(Resource resource) {
+		this.resource = resource;
+		variableProviders = ProjectVariableProviderManager.getDefault().getDescriptors();
+	}
+
+	PathVariableManager getWorkspaceManager() {
+		return (PathVariableManager) resource.getWorkspace().getPathVariableManager();
+	}
+
+	/**
+	 * Throws a runtime exception if the given name is not valid as a path
+	 * variable name.
+	 */
+	private void checkIsValidName(String name) throws CoreException {
+		IStatus status = validateName(name);
+		if (!status.isOK())
+			throw new CoreException(status);
+	}
+
+	/**
+	 * Throws an exception if the given path is not valid as a path variable
+	 * value.
+	 */
+	private void checkIsValidValue(URI newValue) throws CoreException {
+		IStatus status = validateValue(newValue);
+		if (!status.isOK())
+			throw new CoreException(status);
+	}
+
+	/**
+	 * @see org.eclipse.core.resources.IPathVariableManager#getPathVariableNames()
+	 */
+	public String[] getPathVariableNames() {
+		List result = new LinkedList();
+		HashMap map;
+		try {
+			map = ((ProjectDescription) resource.getProject().getDescription()).getVariables();
+		} catch (CoreException e) {
+			return new String[0];
+		}
+		for (int i = 0; i < variableProviders.length; i++) {
+			String[] variableHints = variableProviders[i].getVariableNames(variableProviders[i].getName(), resource);
+			if (variableHints != null && variableHints.length > 0)
+				for (int k = 0; k < variableHints.length; k++)
+					result.add(variableProviders[i].getVariableNames(variableProviders[i].getName(), resource)[k]);
+		}
+		if (map != null)
+			result.addAll(map.keySet());
+		result.addAll(Arrays.asList(getWorkspaceManager().getPathVariableNames()));
+		return (String[]) result.toArray(new String[0]);
+	}
+
+	/**
+	 * @deprecated
+	 */
+	public IPath getValue(String varName) {
+		URI uri = getURIValue(varName);
+		if (uri != null)
+			return URIUtil.toPath(uri);
+		return null;
+	}
+	
+	/**
+	 * If the variable is not listed in the project description, we fall back on
+	 * the workspace variables.
+	 * 
+	 * @see org.eclipse.core.resources.IPathVariableManager#getURIValue(String)
+	 */
+	public URI getURIValue(String varName) {
+		String value = internalGetValue(varName);
+		if (value != null) {
+			if (value.indexOf("..") != -1) { //$NON-NLS-1$
+				// if the path is 'reducible', lets resolve it first.
+				int index = value.indexOf(IPath.SEPARATOR);
+				if (index > 0) { // if its the first character, its an
+					// absolute path on unix, so we don't
+					// resolve it
+					URI resolved = resolveVariable(value);
+					if (resolved != null)
+						return resolved;
+				}
+			}
+			try {
+				return URI.create(value);
+			} catch (IllegalArgumentException e) {
+				IPath path = Path.fromPortableString(value);
+				return URIUtil.toURI(path);
+			}
+		}
+		return getWorkspaceManager().getURIValue(varName);
+	}
+
+	public String internalGetValue(String varName) {
+		HashMap map;
+		try {
+			map = ((ProjectDescription) resource.getProject().getDescription()).getVariables();
+		} catch (CoreException e) {
+			return null;
+		}
+		if (map != null && map.containsKey(varName))
+			return ((VariableDescription) map.get(varName)).getValue();
+
+		String name;
+		int index = varName.indexOf('-');
+		if (index != -1)
+			name = varName.substring(0, index);
+		else
+			name = varName;
+ 		for (int i = 0; i < variableProviders.length; i++) {
+ 			if (variableProviders[i].getName().equals(name))
+ 				return variableProviders[i].getValue(varName, resource);
+		}
+ 		for (int i = 0; i < variableProviders.length; i++) {
+ 			if (name.startsWith(variableProviders[i].getName()))
+ 				return variableProviders[i].getValue(varName, resource);
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.core.resources.IPathVariableManager#isDefined(String)
+	 */
+	public boolean isDefined(String varName) {
+		for (int i = 0; i < variableProviders.length; i++) {
+//			if (variableProviders[i].getName().equals(varName))
+//				return true;
+			
+			if (varName.startsWith(variableProviders[i].getName()))
+				return true;
+		}
+		
+		try {
+			HashMap map = ((ProjectDescription) resource.getProject().getDescription()).getVariables();
+			if (map != null) {
+				Iterator it = map.keySet().iterator();
+				while(it.hasNext()) {
+					String name = (String) it.next();
+					if (name.equals(varName))
+						return true;
+				}
+			}
+		} catch (CoreException e) {
+			return false;
+		}
+		boolean value = getWorkspaceManager().isDefined(varName);
+		if (!value) {
+			// this is to handle variables with encoded arguments
+			int index = varName.indexOf('-');
+			if (index != -1) {
+				String newVarName = varName.substring(0, index);
+				value = isDefined(newVarName);
+			}
+		}
+		return value;
+	}
+
+	/**
+	 * @deprecated
+	 */
+	public IPath resolvePath(IPath path) {
+		if (path == null || path.segmentCount() == 0 || path.isAbsolute() || path.getDevice() != null)
+			return path;
+		URI value = resolveURI(URIUtil.toURI(path));
+		return value == null ? path : URIUtil.toPath(value);
+	}
+
+	public URI resolveVariable(String variable) {
+		LinkedList variableStack = new LinkedList();
+
+		String value = resolveVariable(variable, variableStack);
+		if (value != null) {
+			try {
+				return URI.create(value);
+			} catch (IllegalArgumentException e) {
+				return URIUtil.toURI(Path.fromPortableString(value));
+			}
+		}
+		return null;
+	}
+
+	public String resolveVariable(String value, LinkedList variableStack) {
+		if (variableStack == null)
+			variableStack = new LinkedList();
+
+		String tmp = internalGetValue(value);
+		if (tmp == null) {
+			URI result = getWorkspaceManager().getURIValue(value);
+			if (result != null)
+				return result.toASCIIString();
+		} else
+			value = tmp;
+
+		while (true) {
+			String stringValue;
+			try {
+				URI uri = URI.create(value);
+				if (uri != null) {
+					IPath path = URIUtil.toPath(uri);
+					if (path != null)
+						stringValue = path.toPortableString();
+					else
+						stringValue = value;
+				} else
+					stringValue = value;
+			} catch (IllegalArgumentException e) {
+				stringValue = value;
+			}
+			// we check if the value contains referenced variables with ${VAR}
+			int index = stringValue.indexOf("${"); //$NON-NLS-1$
+			if (index != -1) {
+				int endIndex = PathVariableUtil.getMatchingBrace(stringValue, index);
+				String macro = stringValue.substring(index + 2, endIndex);
+				String resolvedMacro = ""; //$NON-NLS-1$
+				if (!variableStack.contains(macro)) {
+					variableStack.add(macro);
+					resolvedMacro = resolveVariable(macro, variableStack);
+					if (resolvedMacro == null)
+						resolvedMacro = ""; //$NON-NLS-1$
+				}
+				if (stringValue.length() > endIndex)
+					stringValue = stringValue.substring(0, index) + resolvedMacro + stringValue.substring(endIndex + 1);
+				else
+					stringValue = resolvedMacro;
+				value = stringValue;
+			} else
+				break;
+		}
+		return value;
+	}
+
+	public URI resolveURI(URI uri) {
+		if (uri == null || uri.isAbsolute() || (uri.getSchemeSpecificPart() == null))
+			return uri;
+		IPath raw = new Path(uri.getSchemeSpecificPart());
+		if (raw == null || raw.segmentCount() == 0 || raw.isAbsolute() || raw.getDevice() != null)
+			return URIUtil.toURI(raw);
+		URI value = resolveVariable(raw.segment(0));
+		if (value == null)
+			return uri;
+		
+		String path = value.getPath();
+		if (path != null) {
+			IPath p = Path.fromPortableString(path);
+			p = p.append(raw.removeFirstSegments(1));
+			try {
+				value = new URI(value.getScheme(), value.getHost(), p.toPortableString(), value.getFragment());
+			} catch (URISyntaxException e) {
+				return uri;
+			}
+			return value;
+		}
+		return uri;
+	}
+
+	/**
+	 * @deprecated
+	 */
+	public void setValue(String varName, IPath newValue) throws CoreException {
+		if (newValue == null)
+			setURIValue(varName, (URI) null);
+		else
+			setURIValue(varName, URIUtil.toURI(newValue));
+			
+	}
+		/**
+		 * @see org.eclipse.core.resources.IPathVariableManager#setValue(String,
+		 *      IPath)
+		 */
+	public void setURIValue(String varName, URI newValue) throws CoreException {
+		checkIsValidName(varName);
+		checkIsValidValue(newValue);
+		// read previous value and set new value atomically in order to generate
+		// the right event
+		boolean changeWorkspaceValue = false;
+		Project project = (Project) resource.getProject();
+		int eventType = 0;
+		synchronized (this) {
+			String value = internalGetValue(varName);
+			URI currentValue = null;
+			if (value == null)
+				currentValue = getWorkspaceManager().getURIValue(varName);
+			else {
+				try {
+					currentValue = URI.create(value);
+				} catch (IllegalArgumentException e) {
+					currentValue = null;
+				}
+			}
+			boolean variableExists = currentValue != null;
+			if (!variableExists && newValue == null)
+				return;
+			if (variableExists && currentValue.equals(newValue))
+				return;
+
+			for (int i = 0; i < variableProviders.length; i++) {
+//				if (variableProviders[i].getName().equals(varName))
+//					return;
+				
+				if (varName.startsWith(variableProviders[i].getName()))
+					return;
+			}
+
+			if (value == null && variableExists)
+				changeWorkspaceValue = true;
+			else {
+				IProgressMonitor monitor = new NullProgressMonitor();
+				final ISchedulingRule rule = resource.getProject(); // project.workspace.getRuleFactory().modifyRule(project);
+				try {
+					project.workspace.prepareOperation(rule, monitor);
+					project.workspace.beginOperation(true);
+					// save the location in the project description
+					ProjectDescription description = project.internalGetDescription();
+					if (newValue == null) {
+						description.setVariableDescription(varName, null);
+						eventType = IPathVariableChangeEvent.VARIABLE_DELETED;
+					} else {
+						description.setVariableDescription(varName, new VariableDescription(varName, newValue.toASCIIString()));
+						eventType = variableExists ? IPathVariableChangeEvent.VARIABLE_CHANGED : IPathVariableChangeEvent.VARIABLE_CREATED;
+					}
+					project.writeDescription(IResource.NONE);
+				} finally {
+					project.workspace.endOperation(rule, true, Policy.subMonitorFor(monitor, Policy.endOpWork));
+				}
+			}
+		}
+		if (changeWorkspaceValue)
+			getWorkspaceManager().setURIValue(varName, newValue);
+		else {
+			// notify listeners from outside the synchronized block to avoid deadlocks
+			getWorkspaceManager().fireVariableChangeEvent(project, varName, newValue != null? URIUtil.toPath(newValue):null, eventType);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.core.internal.resources.IManager#shutdown(IProgressMonitor)
+	 */
+	public void shutdown(IProgressMonitor monitor) {
+		// nothing to do here
+	}
+
+	/**
+	 * @see org.eclipse.core.internal.resources.IManager#startup(IProgressMonitor)
+	 */
+	public void startup(IProgressMonitor monitor) {
+		// nothing to do here
+	}
+
+	/**
+	 * @see org.eclipse.core.resources.IPathVariableManager#validateName(String)
+	 */
+	public IStatus validateName(String name) {
+		String message = null;
+		if (name.length() == 0) {
+			message = Messages.pathvar_length;
+			return new ResourceStatus(IResourceStatus.INVALID_VALUE, null, message);
+		}
+
+		char first = name.charAt(0);
+		if (!Character.isLetter(first) && first != '_') {
+			message = NLS.bind(Messages.pathvar_beginLetter, String.valueOf(first));
+			return new ResourceStatus(IResourceStatus.INVALID_VALUE, null, message);
+		}
+
+		for (int i = 1; i < name.length(); i++) {
+			char following = name.charAt(i);
+			if (Character.isWhitespace(following))
+				return new ResourceStatus(IResourceStatus.INVALID_VALUE, null, Messages.pathvar_whitespace);
+			if (!Character.isLetter(following) && !Character.isDigit(following) && following != '_') {
+				message = NLS.bind(Messages.pathvar_invalidChar, String.valueOf(following));
+				return new ResourceStatus(IResourceStatus.INVALID_VALUE, null, message);
+			}
+		}
+		// check
+
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * @see IPathVariableManager#validateValue(IPath)
+	 */
+	public IStatus validateValue(IPath value) {
+		// accept any format
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * @see IPathVariableManager#validateValue(URI)
+	 */
+	public IStatus validateValue(URI value) {
+		// accept any format
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * @throws CoreException 
+	 * @see IPathVariableManager#convertToRelative(URI, boolean, String)
+	 */
+	public URI convertToRelative(URI path, boolean force, String variableHint) throws CoreException {
+		return PathVariableUtil.convertToRelative(this, path, resource, force, variableHint);
+	}
+
+	/**
+	 * @see IPathVariableManager#convertToUserEditableFormat(String, boolean)
+	 */
+	public String convertToUserEditableFormat(String value, boolean locationFormat) { 
+		return PathVariableUtil.convertToUserEditableFormatInternal(value, locationFormat);
+	}
+	
+	public String convertFromUserEditableFormat(String userFormat, boolean locationFormat) {
+		return PathVariableUtil.convertFromUserEditableFormatInternal(this, userFormat, locationFormat);
+	}
+	
+	public void addChangeListener(IPathVariableChangeListener listener) {
+		getWorkspaceManager().addChangeListener(listener, resource.getProject());
+	}
+
+	public void removeChangeListener(IPathVariableChangeListener listener) {
+		getWorkspaceManager().removeChangeListener(listener, resource.getProject());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see IPathVariableManager#getVariableRelativePathLocation(IResource, URI)
+	 */
+	public URI getVariableRelativePathLocation(URI location) {
+		try {
+			URI result = convertToRelative(location, false, null);
+			if (!result.equals(location))
+				return result;
+		} catch (CoreException e) {
+			// handled by returning null
+		}
+		return null;
+	}
+
+	/*
+	 * Return the resource of this manager.
+	 */
+	public IResource getResource() {
+		return resource;
+	}
+
+	public boolean isUserDefined(String name) {
+		return ProjectVariableProviderManager.getDefault().findDescriptor(name) == null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java
index 99058df..10686d2 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River) - [108066] Project prefs marked dirty on read
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -63,7 +64,15 @@ public class ProjectPreferences extends EclipsePreferences {
 			return new IteratorWrapper(set.iterator());
 		}
 	}
+	
+	/**
+	 * Name of a preference for configuring whether encodings for derived resources 
+	 * within the project should be stored in a separate derived preference file.
+	 */
+	public static final String PREF_SEPARATE_DERIVED_ENCODINGS = "separateDerivedEncodings"; //$NON-NLS-1$
 
+	static final String PREFS_REGULAR_QUALIFIER = ResourcesPlugin.PI_RESOURCES;
+	static final String PREFS_DERIVED_QUALIFIER = PREFS_REGULAR_QUALIFIER + ".derived"; //$NON-NLS-1$
 	/**
 	 * Cache which nodes have been loaded from disk
 	 */
@@ -111,7 +120,7 @@ public class ProjectPreferences extends EclipsePreferences {
 		clearNode(projectNode.node(qualifier));
 
 		// notifies the CharsetManager if needed
-		if (qualifier.equals(ResourcesPlugin.PI_RESOURCES))
+		if (qualifier.equals(PREFS_REGULAR_QUALIFIER) || qualifier.equals(PREFS_DERIVED_QUALIFIER))
 			preferencesChanged(file.getProject());
 	}
 
@@ -129,7 +138,7 @@ public class ProjectPreferences extends EclipsePreferences {
 		String project = path.segment(0);
 		Preferences projectNode = root.node(ProjectScope.SCOPE).node(project);
 		// check if we need to notify the charset manager
-		boolean hasResourcesSettings = getFile(folder, ResourcesPlugin.PI_RESOURCES).exists();
+		boolean hasResourcesSettings = getFile(folder, PREFS_REGULAR_QUALIFIER).exists() || getFile(folder, PREFS_DERIVED_QUALIFIER).exists();
 		// remove the preferences
 		removeNode(projectNode);
 		// notifies the CharsetManager 		
@@ -148,7 +157,7 @@ public class ProjectPreferences extends EclipsePreferences {
 		Preferences root = Platform.getPreferencesService().getRootNode();
 		Preferences projectNode = root.node(ProjectScope.SCOPE).node(project.getName());
 		// check if we need to notify the charset manager
-		boolean hasResourcesSettings = getFile(project, ResourcesPlugin.PI_RESOURCES).exists();
+		boolean hasResourcesSettings = getFile(project, PREFS_REGULAR_QUALIFIER).exists() || getFile(project, PREFS_DERIVED_QUALIFIER).exists();
 		// remove the preferences
 		removeNode(projectNode);
 		// notifies the CharsetManager 		
@@ -299,9 +308,14 @@ public class ProjectPreferences extends EclipsePreferences {
 			if (projectPrefs.isWriting)
 				return;
 			read(projectPrefs, file);
+			// Bug 108066: In case the node had existed before it was updated from
+			// file, the read() operation marks it dirty. Override the dirty flag
+			// since we know that the node is expected to be in sync with the file.
+			projectPrefs.dirty = false;
+
 			// make sure that we generate the appropriate resource change events
 			// if encoding settings have changed
-			if (ResourcesPlugin.PI_RESOURCES.equals(qualifier))
+			if (PREFS_REGULAR_QUALIFIER.equals(qualifier) || PREFS_DERIVED_QUALIFIER.equals(qualifier))
 				preferencesChanged(file.getProject());
 		} catch (BackingStoreException e) {
 			IStatus status = new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, IStatus.ERROR, message, e);
@@ -385,6 +399,30 @@ public class ProjectPreferences extends EclipsePreferences {
 			super.flush();
 		} finally {
 			isWriting = false;
+			if ((segmentCount == 3) && (PREFS_DERIVED_QUALIFIER.equals(qualifier))) {
+				final IFile fileInWorkspace = getFile();
+				if (fileInWorkspace != null) {
+					IWorkspaceRunnable operation = new IWorkspaceRunnable() {
+						public void run(IProgressMonitor monitor) throws CoreException {
+							if (fileInWorkspace.exists())
+								fileInWorkspace.setDerived(true, monitor);
+						}
+					};
+					Workspace workspace = ((Workspace) ResourcesPlugin.getWorkspace());
+					try {
+						if (workspace.getWorkManager().isLockAlreadyAcquired())
+							operation.run(null);
+						else
+							workspace.run(operation, workspace.getRuleFactory().derivedRule(fileInWorkspace), IResource.NONE, null);
+					} catch (OperationCanceledException e) {
+						throw new BackingStoreException(Messages.preferences_operationCanceled);
+					} catch (CoreException e) {
+						String message = NLS.bind(Messages.preferences_setDerivedException, fileInWorkspace.getFullPath());
+						log(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, IStatus.ERROR, message, e));
+						throw new BackingStoreException(message);
+					}
+				}
+			}
 		}
 	}
 
@@ -434,6 +472,19 @@ public class ProjectPreferences extends EclipsePreferences {
 		return new ProjectPreferences(nodeParent, nodeName);
 	}
 
+	protected String internalPut(String key, String newValue) {
+		if ((segmentCount == 3) && PREFS_REGULAR_QUALIFIER.equals(qualifier) && (project != null)) {
+			if (ProjectPreferences.PREF_SEPARATE_DERIVED_ENCODINGS.equals(key)) {
+				Workspace workspace = ((Workspace) ResourcesPlugin.getWorkspace());
+				if (Boolean.valueOf(newValue).booleanValue())
+					workspace.getCharsetManager().splitEncodingPreferences(project);
+				else
+					workspace.getCharsetManager().mergeEncodingPreferences(project);
+			}
+		}
+		return super.internalPut(key, newValue);
+	}
+
 	protected boolean isAlreadyLoaded(IEclipsePreferences node) {
 		return loadedNodes.contains(node.absolutePath());
 	}
@@ -495,6 +546,16 @@ public class ProjectPreferences extends EclipsePreferences {
 		return ResourcesPlugin.getWorkspace().getRoot().getProject(path).exists() || super.nodeExists(path);
 	}
 
+	public void remove(String key) {
+		super.remove(key);
+		if ((segmentCount == 3) && PREFS_REGULAR_QUALIFIER.equals(qualifier) && (project != null)) {
+			if (ProjectPreferences.PREF_SEPARATE_DERIVED_ENCODINGS.equals(key)) {
+				Workspace workspace = ((Workspace) ResourcesPlugin.getWorkspace());
+				workspace.getCharsetManager().mergeEncodingPreferences(project);
+			}
+		}
+	}
+
 	protected void save() throws BackingStoreException {
 		final IFile fileInWorkspace = getFile();
 		if (fileInWorkspace == null) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectVariableProviderManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectVariableProviderManager.java
new file mode 100644
index 0000000..8b6c6a9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectVariableProviderManager.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.internal.utils.Messages;
+import org.eclipse.core.internal.utils.Policy;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Repository for all variable providers available through the extension points.
+ * @since 3.6
+ */
+public class ProjectVariableProviderManager {
+
+	public static class Descriptor {
+		PathVariableResolver provider = null;
+		String name = null;
+		String value = null;
+
+		public Descriptor(IExtension extension, IConfigurationElement element) throws RuntimeException, CoreException {
+			name = element.getAttribute("variable"); //$NON-NLS-1$
+			value = element.getAttribute("value"); //$NON-NLS-1$
+			try {
+				provider = (PathVariableResolver) element.createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (CoreException t) {
+				t.printStackTrace();
+			}
+			if (name == null)
+				fail(NLS.bind(Messages.mapping_invalidDef, extension.getUniqueIdentifier()));
+		}
+
+		protected void fail(String reason) throws CoreException {
+			throw new ResourceException(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, 1, reason, null));
+		}
+
+		public String getName() {
+			return name;
+		}
+
+		public String getValue(String variable, IResource resource) {
+			if (value != null)
+				return value;
+			return provider.getValue(variable, resource);
+		}
+
+		public String[] getVariableNames(String variable, IResource resource) {
+			if (provider != null)
+				return provider.getVariableNames(variable, resource);
+			return null;
+		}
+	}
+
+	private static Map descriptors;
+	private static ProjectVariableProviderManager instance;
+
+	public synchronized static ProjectVariableProviderManager getDefault() {
+		if (instance == null) {
+			instance = new ProjectVariableProviderManager();
+		}
+		return instance;
+	}
+
+	public Descriptor[] getDescriptors() {
+		lazyInitialize();
+		return (Descriptor[]) descriptors.values().toArray(new Descriptor[descriptors.size()]);
+	}
+
+	protected void lazyInitialize() {
+		if (descriptors != null)
+			return;
+		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PT_VARIABLE_PROVIDERS);
+		IExtension[] extensions = point.getExtensions();
+		descriptors = new HashMap(extensions.length * 2 + 1);
+		for (int i = 0, imax = extensions.length; i < imax; i++) {
+			IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+			int count = elements.length;
+			for (int j = 0; j < count; j++) {
+				IConfigurationElement element = elements[j];
+				String elementName = element.getName();
+				if (elementName.equalsIgnoreCase("variableResolver")) { //$NON-NLS-1$
+					Descriptor desc = null;
+					try {
+						desc = new Descriptor(extensions[i], element);
+					} catch (CoreException e) {
+						Policy.log(e);
+					}
+					if (desc != null)
+						descriptors.put(desc.getName(), desc);
+				}
+			}
+		}
+	}
+
+	public Descriptor findDescriptor(String name) {
+		Object result = descriptors.get(name);
+		if (result != null)
+			return (Descriptor) result;
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/RegexFileInfoMatcher.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/RegexFileInfoMatcher.java
new file mode 100644
index 0000000..9d63d55
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/RegexFileInfoMatcher.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import java.util.regex.*;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.*;
+
+/**
+ * A Filter provider for Java Regular expression supported by 
+ * java.util.regex.Pattern.
+ */
+public class RegexFileInfoMatcher extends AbstractFileInfoMatcher {
+
+	Pattern pattern = null;
+
+	public RegexFileInfoMatcher() {
+		// nothing to do
+	}
+
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		if (pattern != null) {
+			Matcher m = pattern.matcher(fileInfo.getName());
+			return m.matches();
+		}
+		return false;
+	}
+
+	public void initialize(IProject project, Object arguments) throws CoreException {
+		if (arguments != null) {
+			try {
+				pattern = Pattern.compile((String) arguments);
+			} catch (PatternSyntaxException e) {
+				throw new CoreException(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, Platform.PLUGIN_ERROR, e.getMessage(), e));
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Resource.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Resource.java
index fdb6ac6..d538383 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Resource.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Resource.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,17 @@
  *     Oakland Software Incorporated - added getSessionProperties and getPersistentProperties
  *     Holger Oehm <holger.oehm at sap.com> - [226264] race condition in Workspace.isTreeLocked()/setTreeLocked()
  *     Martin Oberhuber (Wind River) -  [245937] ProjectDescription#setLinkLocation() detects non-change
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.filesystem.*;
 import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.filesystem.provider.FileInfo;
 import org.eclipse.core.internal.events.LifecycleEvent;
 import org.eclipse.core.internal.localstore.FileSystemResourceManager;
 import org.eclipse.core.internal.properties.IPropertyManager;
@@ -167,7 +171,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		if (variableUndefined)
 			return null;
 		//check if the file exists
-		URI resolved = workspace.getPathVariableManager().resolveURI(localLocation);
+		URI resolved = getPathVariableManager().resolveURI(localLocation);
 		IFileStore store = EFS.getStore(resolved);
 		IFileInfo fileInfo = store.fetchInfo();
 		boolean localExists = fileInfo.exists();
@@ -232,7 +236,10 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 
 		ResourceInfo info;
 		checkAccessibleAndLocal(DEPTH_INFINITE);
-		
+
+		IPath destinationParent = destination.removeLastSegments(1);
+		checkValidGroupContainer(destinationParent, isLinked(), isVirtual());
+
 		Resource dest = workspace.newResource(destination, destinationType);
 		dest.checkDoesNotExist();
 
@@ -262,7 +269,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 				throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, getFullPath(), message, null);
 			}
 			URI destLocation = dest.getLocationURI();
-			if (destLocation == null) {
+			if (destLocation == null && (dest.isUnderVirtual() == false)) {
 				message = NLS.bind(Messages.localstore_locationUndefined, dest.getFullPath());
 				throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, dest.getFullPath(), message, null);
 			}
@@ -363,6 +370,9 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		ResourceInfo info;
 		checkAccessibleAndLocal(DEPTH_INFINITE);
 
+		IPath destinationParent = destination.removeLastSegments(1);
+		checkValidGroupContainer(destinationParent, isLinked(), isVirtual());
+
 		Resource dest = workspace.newResource(destination, destinationType);
 
 		// check if we are only changing case
@@ -396,7 +406,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 				throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, getFullPath(), message, null);
 			}
 			URI destLocation = dest.getLocationURI();
-			if (destLocation == null) {
+			if (destLocation == null && (dest.isUnderVirtual() == false)) {
 				message = NLS.bind(Messages.localstore_locationUndefined, dest.getFullPath());
 				throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, dest.getFullPath(), message, null);
 			}
@@ -422,6 +432,49 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 			throw new ResourceException(result);
 	}
 
+	/**
+	 * Checks that the destination is a suitable one given that it could be a
+	 * group.
+	 * 
+	 * @exception CoreException
+	 *                if the path points to a group
+	 */
+	public void checkValidGroupContainer(IPath destination, boolean isLink, boolean isGroup) throws CoreException {
+		if (!isLink && !isGroup) {
+			String message = Messages.group_invalidParent;
+			ResourceInfo info = workspace.getResourceInfo(destination, false,
+					false);
+			if (info != null && info.isSet(M_VIRTUAL))
+				throw new ResourceException(new ResourceStatus(
+						IResourceStatus.INVALID_VALUE, null, message));
+		}
+	}
+
+	/**
+	 * Checks that the destination is a suitable one given that it could be a
+	 * group.
+	 * 
+	 * @exception CoreException
+	 *                if the path points to a group
+	 */
+	public void checkValidGroupContainer(Container destination, boolean isLink, boolean isGroup) throws CoreException {
+		if (!isLink && !isGroup) {
+			String message = Messages.group_invalidParent;
+			if (destination.isVirtual())
+				throw new ResourceException(new ResourceStatus(IResourceStatus.INVALID_VALUE, null, message));
+		}
+	}
+
+	public IStatus getValidGroupContainer(IPath destination, boolean isLink, boolean isGroup) throws CoreException {
+		if (!isLink && !isGroup) {
+			String message = Messages.group_invalidParent;
+			ResourceInfo info = workspace.getResourceInfo(destination, false, false);
+			if (info.isSet(M_VIRTUAL))
+				return new ResourceStatus(IResourceStatus.INVALID_VALUE, null, message);
+		}
+		return Status.OK_STATUS;
+	}
+
 	/* (non-Javadoc)
 	 * @see IResource#clearHistory(IProgressMonitor)
 	 */
@@ -583,6 +636,14 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 	public void createLink(URI localLocation, int updateFlags, IProgressMonitor monitor) throws CoreException {
 		Assert.isNotNull(localLocation);
 		monitor = Policy.monitorFor(monitor);
+		IResource existing = null;
+		if ((updateFlags & REPLACE) != 0) {
+			existing = workspace.getRoot().findMember(getFullPath());
+			if (existing != null && existing.isLinked()) {
+				setLinkLocation(localLocation, updateFlags, monitor);
+				return;
+			}
+		}
 		try {
 			String message = NLS.bind(Messages.links_creating, getFullPath());
 			monitor.beginTask(message, Policy.totalWork);
@@ -594,10 +655,8 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 				IFileInfo fileInfo = assertLinkRequirements(localLocation, updateFlags);
 				workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_LINK_CREATE, this));
 				workspace.beginOperation(true);
-				
 				//replace existing resource, if applicable
 				if ((updateFlags & REPLACE) != 0) {
-					IResource existing = workspace.getRoot().findMember(getFullPath());
 					if (existing != null)
 						workspace.deleteResource(existing);
 				}
@@ -606,12 +665,14 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 					info.set(M_HIDDEN);
 				info.set(M_LINK);
 				localLocation = FileUtil.canonicalURI(localLocation);
+				LinkDescription linkDescription = new LinkDescription(this, localLocation);
+				if (linkDescription.isGroup())
+					info.set(M_VIRTUAL);
 				getLocalManager().link(this, localLocation, fileInfo);
 				monitor.worked(Policy.opWork * 5 / 100);
-				
 				//save the location in the project description
 				Project project = (Project) getProject();
-				boolean changed = project.internalGetDescription().setLinkLocation(getProjectRelativePath(), new LinkDescription(this, localLocation));
+				boolean changed = project.internalGetDescription().setLinkLocation(getProjectRelativePath(), linkDescription);
 				if (changed)
 					try {
 						project.writeDescription(IResource.NONE);
@@ -644,6 +705,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		}
 	}
 
+
 	/* (non-Javadoc)
 	 * @see IResource#createMarker(String)
 	 */
@@ -800,15 +862,30 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		if (getType() != IResource.PROJECT && links != null) {
 			Project project = (Project) getProject();
 			ProjectDescription description = project.internalGetDescription();
-			boolean wasChanged = false;
-			for (Iterator it = links.iterator(); it.hasNext();)
-				wasChanged |= description.setLinkLocation(((IResource) it.next()).getProjectRelativePath(), null);
-			if (wasChanged) {
+			if (description != null) {
+				boolean wasChanged = false;
+				for (Iterator it = links.iterator(); it.hasNext();)
+					wasChanged |= description.setLinkLocation(((IResource) it.next()).getProjectRelativePath(), null);
+				if (wasChanged) {
+					project.internalSetDescription(description, true);
+					project.writeDescription(IResource.FORCE);
+				}
+			}
+		}
+
+		List filters = findFilters();
+		if ((filters != null) && (filters.size() > 0)) {
+			// delete resource filters
+			Project project = (Project) getProject();
+			ProjectDescription description = project.internalGetDescription();
+			if (description != null) {
+				for (Iterator it = filters.iterator(); it.hasNext();)
+					description.setFilters(((IResource) it.next()).getProjectRelativePath(), null);
 				project.internalSetDescription(description, true);
 				project.writeDescription(IResource.FORCE);
 			}
 		}
-
+		
 		// Delete properties after the resource is deleted from the tree. See bug 84584.
 		CoreException err = null;
 		try {
@@ -847,6 +924,31 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		return links;
 	}
 
+	/*
+	 * Returns a list of all filtered resources at or below this resource, or null if there
+	 * are no links.
+	 */
+	private List findFilters() {
+		Project project = (Project) getProject();
+		ProjectDescription description = project.internalGetDescription();
+		List filters = null;
+		if (description != null) {
+			HashMap filterMap = description.getFilters();
+			if (filterMap != null) {
+				IPath myPath = getProjectRelativePath();
+				for (Iterator it = filterMap.keySet().iterator(); it.hasNext();) {
+					IPath filterPath = (IPath) it.next();
+					if (myPath.isPrefixOf(filterPath)) {
+						if (filters == null)
+							filters = new ArrayList();
+						filters.add(workspace.newResource(project.getFullPath().append(filterPath), IResource.FOLDER));
+					}
+				}
+			}
+		}
+		return filters;
+	}
+
 	/* (non-Javadoc)
 	 * @see IResource#equals(Object)
 	 */
@@ -943,12 +1045,22 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 	protected void fixupAfterMoveSource() throws CoreException {
 		ResourceInfo info = getResourceInfo(true, true);
 		//if a linked resource is moved, we need to remove the location info from the .project 
-		if (isLinked()) {
+		if (isLinked() || isVirtual()) {
 			Project project = (Project) getProject();
 			if (project.internalGetDescription().setLinkLocation(getProjectRelativePath(), null))
 				project.writeDescription(IResource.NONE);
 		}
 
+		List filters = findFilters();
+		if ((filters != null) && (filters.size() > 0)) {
+			// delete resource filters
+			Project project = (Project) getProject();
+			ProjectDescription description = project.internalGetDescription();
+			for (Iterator it = filters.iterator(); it.hasNext();)
+				description.setFilters(((IResource) it.next()).getProjectRelativePath(), null);
+			project.writeDescription(IResource.NONE);
+		}
+
 		// check if we deleted a preferences file 
 		ProjectPreferences.deleted(this);
 
@@ -997,7 +1109,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 	 */
 	public long getLocalTimeStamp() {
 		ResourceInfo info = getResourceInfo(false, false);
-		return info == null ? IResource.NULL_STAMP : info.getLocalSyncInfo();
+		return (info == null || isVirtual()) ? IResource.NULL_STAMP : info.getLocalSyncInfo();
 	}
 
 	/* (non-Javadoc)
@@ -1115,7 +1227,7 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 	 * @see IResource#getResourceAttributes()
 	 */
 	public ResourceAttributes getResourceAttributes() {
-		if (!isAccessible())
+		if (!isAccessible() || isVirtual())
 			return null;
 		return getLocalManager().attributes(this);
 	}
@@ -1303,6 +1415,27 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 		return info != null && info.isSet(M_LINK);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IResource#isVirtual()
+	 */
+	public boolean isVirtual() {
+		ResourceInfo info = getResourceInfo(false, false);
+		return info != null && info.isSet(M_VIRTUAL);
+	}
+	
+	/*
+	 * @return whether the current resource has a parent that is virtual.
+	 */
+	public boolean isUnderVirtual() {
+		IContainer parent = getParent();
+		while (parent != null) {
+			if (parent.isVirtual())
+				return true;
+			parent = parent.getParent();
+		}
+		return false;
+	}
+
 	/**
 	 * @see IResource#isLocal(int)
 	 * @deprecated
@@ -1522,6 +1655,8 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 				workspace.prepareOperation(rule, monitor);
 				if (!isRoot && !getProject().isAccessible())
 					return;
+				if (!exists() && isFiltered())
+					return;
 				workspace.beginOperation(true);
 				if (getType() == IResource.PROJECT || getType() == IResource.ROOT)
 					workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_REFRESH, this));
@@ -1573,6 +1708,8 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 
 	/* (non-Javadoc)
 	 * @see IResource#setDerived(boolean)
+	 * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which 
+	 * is a workspace operation and reports changes in resource deltas.
 	 */
 	public void setDerived(boolean isDerived) throws CoreException {
 		// fetch the info but don't bother making it mutable even though we are going
@@ -1592,6 +1729,41 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 	}
 
 	/* (non-Javadoc)
+	 * @see IResource#setDerived(boolean, IProgressMonitor)
+	 */
+	public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException {
+		monitor = Policy.monitorFor(monitor);
+		try {
+			String message = NLS.bind(Messages.resources_settingDerivedFlag, getFullPath());
+			monitor.beginTask(message, Policy.totalWork);
+			final ISchedulingRule rule = workspace.getRuleFactory().derivedRule(this);
+			try {
+				workspace.prepareOperation(rule, monitor);
+				ResourceInfo info = getResourceInfo(false, false);
+				checkAccessible(getFlags(info));
+				// ignore attempts to set derived flag on anything except files and folders
+				if (info.getType() != FILE && info.getType() != FOLDER)
+					return;				
+				workspace.beginOperation(true);
+				info = getResourceInfo(false, true);
+				if (isDerived)
+					info.set(ICoreConstants.M_DERIVED);
+				else {
+					info.clear(ICoreConstants.M_DERIVED);
+				}
+				monitor.worked(Policy.opWork);
+			} catch (OperationCanceledException e) {
+				workspace.getWorkManager().operationCanceled();
+				throw e;
+			} finally {
+				workspace.endOperation(rule, true, Policy.subMonitorFor(monitor, Policy.endOpWork));
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/* (non-Javadoc)
 	 * @see IResource#setHidden(boolean)
 	 */
 	public void setHidden(boolean isHidden) throws CoreException {
@@ -1837,6 +2009,8 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 			case IResource.FOLDER :
 				if (isLinked())
 					workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_LINK_MOVE, this, destination, updateFlags));
+				if (isVirtual())
+					workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_GROUP_MOVE, this, destination, updateFlags));
 				break;
 			case IResource.PROJECT :
 				if (!getName().equals(destination.getName())) {
@@ -1846,4 +2020,167 @@ public abstract class Resource extends PlatformObject implements IResource, ICor
 				break;
 		}
 	}
+
+	/* (non-Javadoc)
+	 * @see IResource#getPathVariableManager()
+	 */
+	public IPathVariableManager getPathVariableManager() {
+		if (getProject() == null)
+			return workspace.getPathVariableManager();
+		return new ProjectPathVariableManager(this);
+	}
+
+	/* (non-Javadoc)
+	 *  Calculates whether the current resource is filtered out from the resource tree
+	 *  by resource filters.  This can happen because resource filters apply to the resource, 
+	 *  or because resource filters apply to one of its parent.  For example, if "/foo/bar"
+	 *  is filtered out, then calling isFilteredFromParent() on "/foo/bar/sub/file.txt" will 
+	 *  return true as well, even though there's no resource filters that apply to "file.txt" per se.
+	 * 
+	 * @return true is the resource is filtered out from the resource tree
+	 * @see IResource#isFiltered()
+	 */
+	public boolean isFiltered() {
+		try {
+			return isFilteredWithException(false);
+		} catch (CoreException e) {
+			// nothing
+		}
+		return false;
+	}
+	
+	public boolean isFilteredWithException(boolean throwExeception) throws CoreException {
+		if (isLinked() || isVirtual())
+			return false;
+		Resource currentResource = this;
+		while (currentResource != null && currentResource.getParent() != null) {
+			Resource parent = (Resource) currentResource.getParent();
+			IFileStore store = currentResource.getStore();
+			if (store != null) {
+				IFileInfo fileInfo = store.fetchInfo();
+				if (fileInfo != null) {
+					if (!fileInfo.exists()) {
+						// If the file/folder doesn't exist, it won't have the file/folder flag set,
+						// so we create another one and set that attribute directly.
+						FileInfo info = new FileInfo(fileInfo.getName());
+						info.setDirectory(currentResource.getType() == IResource.FOLDER);
+						fileInfo = info;
+					}
+					IFileInfo[] filtered = parent.filterChildren(new IFileInfo[] {fileInfo}, throwExeception);
+					if (filtered.length == 0)
+						return true;
+				}
+			}
+			currentResource = parent;
+		}
+		return false;
+	}
+	
+	public IFileInfo[] filterChildren(IFileInfo[] list, boolean throwException) throws CoreException {
+		Project project = (Project) getProject();
+		if (project == null)
+			return list;
+		final ProjectDescription description = project.internalGetDescription();
+		if (description == null)
+			return list;
+		IPath relativePath = getProjectRelativePath();
+		LinkedList/*<Filter>*/currentIncludeFilters = new LinkedList/*<FilterDescription>*/();
+		LinkedList/*<Filter>*/currentExcludeFilters = new LinkedList/*<FilterDescription>*/();
+		LinkedList/*<FilterDescription>*/filters = null;
+		
+		boolean firstSegment = true;
+		do {
+			if (!firstSegment)
+				relativePath = relativePath.removeLastSegments(1);
+			filters = description.getFilter(relativePath);
+			if (filters != null) {
+				for (Iterator it = filters.iterator(); it.hasNext();) {
+					FilterDescription desc = (FilterDescription) it.next();
+					if (firstSegment || desc.isInheritable()) {
+						Filter filter = new Filter(project, desc);
+						if (filter.isIncludeOnly()) {
+							if (filter.isFirst())
+								currentIncludeFilters.addFirst(filter);
+							else
+								currentIncludeFilters.addLast(filter);
+						} else {
+							if (filter.isFirst())
+								currentExcludeFilters.addFirst(filter);
+							else
+								currentExcludeFilters.addLast(filter);
+						}
+					}
+				}
+			}
+			firstSegment = false;
+		} while (relativePath.segmentCount() > 0);
+		
+		if ((currentIncludeFilters.size() > 0) || (currentExcludeFilters.size() > 0)) {
+			try {
+				list = Filter.filter(project, currentIncludeFilters, currentExcludeFilters, (IContainer) this, list);
+			} catch (CoreException e) {
+				if (throwException)
+					throw e;
+			}
+		}
+		return list;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see IResource#setLinkLocation(IPath)
+	 */
+	public void setLinkLocation(URI location, int updateFlags,
+			IProgressMonitor monitor) throws CoreException {
+		if (!isLinked()) {
+			String message = NLS.bind(Messages.links_resourceIsNotALink, getFullPath());
+			throw new ResourceException(IResourceStatus.INVALID_VALUE, getFullPath(), message, null);
+		}
+
+		final ISchedulingRule rule = workspace.getRuleFactory().createRule(this);
+		try {
+			String message = NLS.bind(Messages.links_setLocation, getFullPath());
+			monitor.beginTask(message, Policy.totalWork);
+
+			workspace.prepareOperation(rule, monitor);
+			workspace.broadcastEvent(LifecycleEvent.newEvent(LifecycleEvent.PRE_LINK_CHANGE, this));
+			workspace.beginOperation(true);
+
+			ResourceInfo info = workspace.getResourceInfo(getFullPath(), true, false);
+			getLocalManager().setLocation(this, info, location);
+
+			LinkDescription linkDescription;
+			linkDescription = new LinkDescription(this, location);
+			Project project = (Project) getProject();
+			project.internalGetDescription().setLinkLocation(getProjectRelativePath(), linkDescription);
+			project.writeDescription(updateFlags);
+
+			// refresh either in background or foreground
+			if ((updateFlags & IResource.BACKGROUND_REFRESH) != 0) {
+				workspace.refreshManager.refresh(this);
+				monitor.worked(Policy.opWork * 90 / 100);
+			} else {
+				refreshLocal(DEPTH_INFINITE, Policy.subMonitorFor(monitor, Policy.opWork * 90 / 100));
+			}
+		} finally {
+			workspace.endOperation(rule, true, Policy.subMonitorFor(monitor, Policy.endOpWork));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see IResource#setLinkLocation(URI)
+	 */
+	public void setLinkLocation(IPath location, int updateFlags, IProgressMonitor monitor) throws CoreException {
+		if (location.isAbsolute())
+			setLinkLocation(URIUtil.toURI(location.toPortableString()), updateFlags, monitor);
+		else
+			try {
+				setLinkLocation(new URI(null, null, location.toPortableString(), null), updateFlags, monitor);
+			} catch (URISyntaxException e) {
+				setLinkLocation(URIUtil.toURI(location.toPortableString()), updateFlags, monitor);
+			}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java
index 5e10dc8..99d97e1 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -693,6 +694,10 @@ class ResourceTree implements IResourceTree {
 			try {
 				//moving linked resources may have modified the description in memory
 				((ProjectDescription) destDescription).setLinkDescriptions(destination.internalGetDescription().getLinks());
+				// moving filters may have modified the description in memory
+				((ProjectDescription) destDescription).setFilterDescriptions(destination.internalGetDescription().getFilters());
+				// moving variables may have modified the description in memory
+				((ProjectDescription) destDescription).setVariableDescriptions(destination.internalGetDescription().getVariables());
 				destination.internalSetDescription(destDescription, true);
 				destination.writeDescription(IResource.FORCE);
 			} catch (CoreException e) {
@@ -976,7 +981,7 @@ class ResourceTree implements IResourceTree {
 
 			//for linked resources, nothing needs to be moved in the file system
 			boolean isDeep = (flags & IResource.SHALLOW) == 0;
-			if (!isDeep && source.isLinked()) {
+			if (!isDeep && (source.isLinked() || source.isVirtual())) {
 				movedFolderSubtree(source, destination);
 				return;
 			}
@@ -1118,7 +1123,7 @@ class ResourceTree implements IResourceTree {
 		IResourceVisitor visitor = new IResourceVisitor() {
 			public boolean visit(IResource resource) {
 				if (resource.isLinked()) {
-					if (isDeep) {
+					if (isDeep && !((Resource) resource).isUnderVirtual()) {
 						//clear the linked resource bit, if any
 						ResourceInfo info = ((Resource) resource).getResourceInfo(false, true);
 						info.clear(ICoreConstants.M_LINK);
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Rules.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Rules.java
index 934b42e..a0670b7 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Rules.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Rules.java
@@ -120,6 +120,14 @@ class Rules implements IResourceRuleFactory, ILifecycleListener {
 	}
 
 	/**
+	 * Obtains the scheduling rule from the appropriate factory for a derived flag change operation.
+	 */
+	public ISchedulingRule derivedRule(IResource resource) {
+		//team hook currently cannot change this rule	
+		return null;
+	}
+
+	/**
 	 * Obtains the scheduling rule from the appropriate factory for a marker change operation.
 	 */
 	public ISchedulingRule markerRule(IResource resource) {
@@ -144,7 +152,7 @@ class Rules implements IResourceRuleFactory, ILifecycleListener {
 			return root;
 		//treat a move across projects as a create on the destination and a delete on the source
 		if (!source.getFullPath().segment(0).equals(destination.getFullPath().segment(0)))
-			return MultiRule.combine(deleteRule(source), createRule(destination));
+			return MultiRule.combine(modifyRule(source.getProject()), modifyRule(destination.getProject()));
 		return factoryFor(source).moveRule(source, destination);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveContext.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveContext.java
index 4aac3e2..6cc5428 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveContext.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 
 public class SaveContext implements ISaveContext {
-	protected Plugin plugin;
+	protected String pluginId;
 	protected int kind;
 	protected boolean needDelta;
 	protected boolean needSaveNumber;
@@ -22,20 +22,18 @@ public class SaveContext implements ISaveContext {
 	protected int previousSaveNumber;
 	protected IProject project;
 
-	protected SaveContext(Plugin plugin, int kind, IProject project) throws CoreException {
-		this.plugin = plugin;
+	protected SaveContext(String pluginId, int kind, IProject project) throws CoreException {
 		this.kind = kind;
 		this.project = project;
+		this.pluginId = pluginId;
 		needDelta = false;
 		needSaveNumber = false;
-		String pluginId = plugin.getBundle().getSymbolicName();
 		fileTable = new SafeFileTable(pluginId);
 		previousSaveNumber = getWorkspace().getSaveManager().getSaveNumber(pluginId);
 	}
 
 	public void commit() throws CoreException {
 		if (needSaveNumber) {
-			String pluginId = plugin.getBundle().getSymbolicName();
 			IPath oldLocation = getWorkspace().getMetaArea().getSafeTableLocationFor(pluginId);
 			getWorkspace().getSaveManager().setSaveNumber(pluginId, getSaveNumber());
 			fileTable.setLocation(getWorkspace().getMetaArea().getSafeTableLocationFor(pluginId));
@@ -62,11 +60,8 @@ public class SaveContext implements ISaveContext {
 		return kind;
 	}
 
-	/**
-	 * @see ISaveContext
-	 */
-	public Plugin getPlugin() {
-		return plugin;
+	public String getPluginId() {
+		return pluginId;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java
index 1df55e5..50c7f7e 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,22 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [301563] Save and load tree snapshots
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
+import org.eclipse.core.runtime.OperationCanceledException;
+
+import org.eclipse.core.filesystem.IFileStore;
+
+import org.eclipse.core.filesystem.EFS;
+
+import java.net.URI;
+
 import java.io.*;
 import java.util.*;
+import java.util.zip.*;
 import org.eclipse.core.internal.events.*;
 import org.eclipse.core.internal.localstore.*;
 import org.eclipse.core.internal.utils.*;
@@ -75,7 +86,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	protected Map savedStates;
 
 	/**
-	 * Plugins that participate on a workspace save. Maps (Plugin -> ISaveParticipant).
+	 * Ids of plugins that participate on a workspace save. Maps String (plugin id)-> ISaveParticipant.
 	 * This map is accessed from API that is not synchronized, so it requires
 	 * independent synchronization. This is accomplished using a synchronized
 	 * wrapper map.
@@ -100,17 +111,16 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 		saveParticipants = Collections.synchronizedMap(new HashMap(10));
 	}
 
-	public ISavedState addParticipant(Plugin plugin, ISaveParticipant participant) throws CoreException {
+	public ISavedState addParticipant(String pluginId, ISaveParticipant participant) throws CoreException {
 		// If the plugin was already registered as a save participant we return null
-		if (saveParticipants.put(plugin, participant) != null)
+		if (saveParticipants.put(pluginId, participant) != null)
 			return null;
-		String id = plugin.getBundle().getSymbolicName();
-		SavedState state = (SavedState) savedStates.get(id);
+		SavedState state = (SavedState) savedStates.get(pluginId);
 		if (state != null) {
-			if (isDeltaCleared(id)) {
+			if (isDeltaCleared(pluginId)) {
 				// this plugin was marked not to receive deltas
 				state.forgetTrees();
-				removeClearDeltaMarks(id);
+				removeClearDeltaMarks(pluginId);
 			} else {
 				try {
 					// thread safety: (we need to guarantee that the tree is immutable when computing deltas)
@@ -125,8 +135,8 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 			}
 		}
 		// if the plug-in has a previous save number, we return a state, otherwise we return null
-		if (getSaveNumber(id) > 0)
-			return new SavedState(workspace, id, null, null);
+		if (getSaveNumber(pluginId) > 0)
+			return new SavedState(workspace, pluginId, null, null);
 		return null;
 	}
 
@@ -136,8 +146,8 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 			monitor.beginTask("", contexts.size()); //$NON-NLS-1$
 			for (final Iterator it = contexts.entrySet().iterator(); it.hasNext();) {
 				Map.Entry entry = (Map.Entry) it.next();
-				Plugin plugin = (Plugin) entry.getKey();
-				final ISaveParticipant participant = (ISaveParticipant) saveParticipants.get(plugin);
+				String pluginId = (String) entry.getKey();
+				final ISaveParticipant participant = (ISaveParticipant) saveParticipants.get(pluginId);
 				//save participants can be removed concurrently
 				if (participant == null) {
 					monitor.worked(1);
@@ -219,7 +229,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	protected void clearSavedDelta() {
 		synchronized (saveParticipants) {
 			for (Iterator i = saveParticipants.keySet().iterator(); i.hasNext();) {
-				String pluginId = ((Plugin) i.next()).getBundle().getSymbolicName();
+				String pluginId = (String) i.next();
 				masterTable.setProperty(CLEAR_DELTA_PREFIX + pluginId, "true"); //$NON-NLS-1$
 			}
 		}
@@ -229,8 +239,16 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	 * Collects the set of ElementTrees we are still interested in,
 	 * and removes references to any other trees.
 	 */
-	protected void collapseTrees() throws CoreException {
+	protected void collapseTrees(Map contexts) throws CoreException {
 		//collect trees we're interested in
+		
+		//forget saved trees, if they are not used by registered participants
+		synchronized (savedStates) {
+			for (Iterator i = contexts.values().iterator(); i.hasNext();) {
+				SaveContext context = (SaveContext) i.next();
+				forgetSavedTree(context.getPluginId());
+			}
+		}
 
 		//trees for plugin saved states
 		ArrayList trees = new ArrayList();
@@ -289,13 +307,13 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	 * <code>SaveContexts</code> to use during the save lifecycle.
 	 * The keys are plugins and values are SaveContext objects.
 	 */
-	protected Map computeSaveContexts(Plugin[] plugins, int kind, IProject project) {
-		HashMap result = new HashMap(plugins.length);
-		for (int i = 0; i < plugins.length; i++) {
-			Plugin plugin = plugins[i];
+	protected Map computeSaveContexts(String[] pluginIds, int kind, IProject project) {
+		HashMap result = new HashMap(pluginIds.length);
+		for (int i = 0; i < pluginIds.length; i++) {
+			String pluginId = pluginIds[i];
 			try {
-				SaveContext context = new SaveContext(plugin, kind, project);
-				result.put(plugin, context);
+				SaveContext context = new SaveContext(pluginId, kind, project);
+				result.put(pluginId, context);
 			} catch (CoreException e) {
 				// FIXME: should return a status to the user and not just log it
 				Policy.log(e.getStatus());
@@ -325,7 +343,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 			SaveContext context = (SaveContext) i.next();
 			if (!context.isDeltaNeeded())
 				continue;
-			String pluginId = context.getPlugin().getBundle().getSymbolicName();
+			String pluginId = context.getPluginId();
 			result.put(pluginId, current);
 		}
 		return result;
@@ -387,9 +405,9 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 		return (value == null) ? 0 : new Integer(value).intValue();
 	}
 
-	protected Plugin[] getSaveParticipantPlugins() {
+	protected String[] getSaveParticipantPluginIds() {
 		synchronized (saveParticipants) {
-			return (Plugin[]) saveParticipants.keySet().toArray(new Plugin[saveParticipants.size()]);
+			return (String[]) saveParticipants.keySet().toArray(new String[saveParticipants.size()]);
 		}
 	}
 
@@ -502,7 +520,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	protected void removeClearDeltaMarks() {
 		synchronized (saveParticipants) {
 			for (Iterator i = saveParticipants.keySet().iterator(); i.hasNext();) {
-				String pluginId = ((Plugin) i.next()).getBundle().getSymbolicName();
+				String pluginId = (String) i.next();
 				removeClearDeltaMarks(pluginId);
 			}
 		}
@@ -536,8 +554,8 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 		}
 	}
 
-	public void removeParticipant(Plugin plugin) {
-		saveParticipants.remove(plugin);
+	public void removeParticipant(String pluginId) {
+		saveParticipants.remove(pluginId);
 	}
 
 	protected void removeUnusedSafeTables() {
@@ -709,6 +727,43 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	}
 
 	/**
+	 * Restores the contents of this project from a refresh snapshot, if possible.
+	 * Throws an exception if the snapshot is found but an error occurs when reading
+	 * the file.
+	 * @return <code><code>true</code> if the project data was restored successfully,
+	 * and <code>false</code> if the refresh snapshot was not found or could not be opened.
+	 * @exception CoreException if an error occurred reading the snapshot file.
+	 */
+	protected boolean restoreFromRefreshSnapshot(Project project,
+			IProgressMonitor monitor) throws CoreException {
+		boolean status = true;
+		IPath snapshotPath = workspace.getMetaArea().getRefreshLocationFor(project);
+		java.io.File snapshotFile = snapshotPath.toFile();
+		if (!snapshotFile.exists())
+			return false;
+		if (Policy.DEBUG_RESTORE)
+			System.out.println("Restore project " + project.getFullPath() + ": starting..."); //$NON-NLS-1$ //$NON-NLS-2$
+		long start = System.currentTimeMillis();
+		monitor = Policy.monitorFor(monitor);
+		try {
+			monitor.beginTask("", 40); //$NON-NLS-1$
+			status = restoreTreeFromRefreshSnapshot(project,
+					snapshotFile, Policy.subMonitorFor(monitor, 40));
+			if (status) {
+				// load the project description and set internal description
+				ProjectDescription description = workspace.getFileSystemManager().read(project, true);
+				project.internalSetDescription(description, false);
+				workspace.getMetaArea().clearRefresh(project);
+			}
+		} finally {
+			monitor.done();
+		}
+		if (Policy.DEBUG_RESTORE)
+			System.out.println("Restore project " + project.getFullPath() + ": " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		return status;
+	}
+
+	/**
 	 * Reads the markers which were originally saved
 	 * for the tree rooted by the given resource.
 	 */
@@ -971,6 +1026,47 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 		return true;
 	}
 	
+	/**
+	 * Restores a tree saved as a refresh snapshot to a specified URI.
+	 * @return <code>true</code> if the snapshot exists, <code>false</code> otherwise.
+	 * @exception CoreException if the project could not be restored.
+	 */
+	protected boolean restoreTreeFromRefreshSnapshot(Project project,
+			java.io.File snapshotFile, IProgressMonitor monitor) throws CoreException {
+		long start = System.currentTimeMillis();
+		monitor = Policy.monitorFor(monitor);
+		String message;
+		IPath snapshotPath = null;
+		try {
+			monitor.beginTask("", Policy.totalWork); //$NON-NLS-1$
+			InputStream snapIn = new FileInputStream(snapshotFile);
+			ZipInputStream zip = new ZipInputStream(snapIn);
+			ZipEntry treeEntry = zip.getNextEntry();
+			if (treeEntry == null || !treeEntry.getName().equals("resource-index.tree")) { //$NON-NLS-1$
+				zip.close();
+				return false;
+			}
+			DataInputStream input = new DataInputStream(zip);
+			try {
+				WorkspaceTreeReader reader = WorkspaceTreeReader.getReader(workspace, input.readInt(), true);
+				reader.readTree(project, input, Policy.subMonitorFor(monitor, Policy.totalWork));
+			} finally {
+				input.close();
+				zip.close();
+			}
+		} catch (IOException e) {
+			snapshotPath = new Path(snapshotFile.getPath());
+			message = NLS.bind(Messages.resources_readMeta, snapshotPath);
+			throw new ResourceException(IResourceStatus.FAILED_READ_METADATA, snapshotPath, message, e);
+		} finally {
+			monitor.done();
+		}
+		if (Policy.DEBUG_RESTORE_TREE) {
+			System.out.println("Restore Tree for " + project.getFullPath() + ": " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		return true;
+	}
+	
 	class InternalMonitorWrapper extends ProgressMonitorWrapper{
 		private boolean ignoreCancel;
 		
@@ -985,8 +1081,8 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 		public boolean isCanceled() {
 			return ignoreCancel ? false : super.isCanceled();
 		}
-	};
-	
+	}
+
 	public IStatus save(int kind, Project project, IProgressMonitor monitor) throws CoreException {
 		return save(kind, false, project, monitor);
 	}
@@ -1006,7 +1102,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 				workspace.beginOperation(false);
 				hookStartSave(kind, project);
 				long start = System.currentTimeMillis();
-				Map contexts = computeSaveContexts(getSaveParticipantPlugins(), kind, project);
+				Map contexts = computeSaveContexts(getSaveParticipantPluginIds(), kind, project);
 				broadcastLifecycle(PREPARE_TO_SAVE, contexts, warnings, Policy.subMonitorFor(monitor, 1));
 				try {
 					broadcastLifecycle(SAVING, contexts, warnings, Policy.subMonitorFor(monitor, 1));
@@ -1052,7 +1148,7 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 								Policy.debug("Total Snap Markers: " + persistMarkers + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
 								Policy.debug("Total Snap Sync Info: " + persistSyncInfo + "ms"); //$NON-NLS-1$	 //$NON-NLS-2$
 							}
-							collapseTrees();
+							collapseTrees(contexts);
 							clearSavedDelta();
 							// write out all metainfo (e.g., workspace/project descriptions) 
 							saveMetaInfo(warnings, Policy.subMonitorFor(monitor, 1));
@@ -1163,6 +1259,60 @@ public class SaveManager implements IElementInfoFlattener, IManager, IStringPool
 	}
 
 	/**
+	 * Writes a snapshot of project refresh information to the specified
+	 * location.
+	 * @param project the project to write a refresh snapshot for
+	 * @param monitor progress monitor
+	 * @exception CoreException if there is a problem writing the snapshot.
+	 */
+	public void saveRefreshSnapshot(Project project, URI snapshotLocation,
+			IProgressMonitor monitor) throws CoreException {
+		IFileStore store = EFS.getStore(snapshotLocation);
+		IPath snapshotPath = new Path(snapshotLocation.getPath());
+		java.io.File tmpTree = null;
+		try {
+			tmpTree = java.io.File.createTempFile("tmp", ".tree");	//$NON-NLS-1$//$NON-NLS-2$
+		} catch (IOException e) {
+			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL,
+					snapshotPath, Messages.resources_copyProblem, e);
+		}
+		ZipOutputStream out = null;
+		try {
+			FileOutputStream fis = new FileOutputStream(tmpTree);
+			DataOutputStream output = new DataOutputStream(fis);
+			try {
+				output.writeInt(ICoreConstants.WORKSPACE_TREE_VERSION_2);
+				writeTree(project, output, monitor);
+			} finally {
+				output.close();
+			}
+			OutputStream snapOut = store.openOutputStream(EFS.NONE, monitor);
+			out = new ZipOutputStream(snapOut);
+			out.setLevel(Deflater.BEST_COMPRESSION);
+			ZipEntry e = new ZipEntry("resource-index.tree"); //$NON-NLS-1$
+			out.putNextEntry(e);
+			int read = 0;
+			byte[] buffer = new byte[4096];
+			InputStream in = new FileInputStream(tmpTree);
+			try {
+				while ((read = in.read(buffer)) >= 0) {
+					out.write(buffer, 0, read);
+				}
+				out.closeEntry();
+			} finally {
+				in.close();
+			}
+		} catch (IOException e) {
+			throw new ResourceException(IResourceStatus.FAILED_WRITE_LOCAL, snapshotPath, Messages.resources_copyProblem, e);
+		} finally {
+			if (out!=null) {
+				try { out.close(); } catch (IOException e) { /*ignore*/ }
+			}
+			if (tmpTree!=null) tmpTree.delete();
+		}
+	}
+	
+	/**
 	 * Writes the current state of the entire workspace tree to disk.
 	 * This is used during workspace save.  saveTree(Project)
 	 * is used to save the state of an individual project.
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VariableDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VariableDescription.java
new file mode 100644
index 0000000..1b5090e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VariableDescription.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import org.eclipse.core.runtime.*;
+
+/**
+ * 
+ */
+public class VariableDescription implements Comparable {
+
+	private String name;
+	private String value;
+
+	public VariableDescription() {
+		this.name = ""; //$NON-NLS-1$
+		this.value = ""; //$NON-NLS-1$
+	}
+
+	public VariableDescription(String name, String value) {
+		super();
+		Assert.isNotNull(name);
+		Assert.isNotNull(value);
+		this.name = name;
+		this.value = value;
+	}
+
+	public boolean equals(Object o) {
+		if (!(o.getClass() == VariableDescription.class))
+			return false;
+		VariableDescription other = (VariableDescription) o;
+		return name.equals(other.name) && value == other.value;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public int hashCode() {
+		return name.hashCode() + value.hashCode();
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	/**
+	 * Compare string descriptions in a way that sorts them topologically by
+	 * name.
+	 */
+	public int compareTo(Object o) {
+		VariableDescription that = (VariableDescription) o;
+		return name.compareTo(that.name);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileStore.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileStore.java
new file mode 100644
index 0000000..34ca28f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileStore.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     James Blackburn - Fix for bug 266712
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import java.io.InputStream;
+import java.net.URI;
+import org.eclipse.core.filesystem.*;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.filesystem.provider.FileStore;
+import org.eclipse.core.runtime.*;
+
+/**
+ * A file store representing a virtual resource. 
+ * A virtual resource always exists and has no children.
+ */
+public class VirtualFileStore extends FileStore {
+	private final URI location;
+
+	public VirtualFileStore(URI location) {
+		this.location = location;
+	}
+
+	public String[] childNames(int options, IProgressMonitor monitor) {
+		return FileStore.EMPTY_STRING_ARRAY;
+	}
+
+	public IFileInfo fetchInfo(int options, IProgressMonitor monitor) {
+		FileInfo result = new FileInfo();
+		result.setDirectory(true);
+		result.setExists(true);
+		result.setLastModified(1);//last modified of zero indicates non-existence
+		return result;
+	}
+
+	public void delete(int options, IProgressMonitor monitor) {
+		//nothing to do - virtual resources don't exist in any physical file system
+	}
+
+	public IFileStore getChild(String name) {
+		return EFS.getNullFileSystem().getStore(new Path(name).makeAbsolute());
+	}
+
+	public String getName() {
+		return "virtual"; //$NON-NLS-1$
+	}
+
+	public IFileStore getParent() {
+		return null;
+	}
+
+	public void move(IFileStore destination, int options, IProgressMonitor monitor) throws CoreException {
+		destination.mkdir(EFS.NONE, monitor);
+	}
+
+	public InputStream openInputStream(int options, IProgressMonitor monitor) {
+		return null;
+	}
+
+	public URI toURI() {
+		return location;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileSystem.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileSystem.java
new file mode 100644
index 0000000..8d53176
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/VirtualFileSystem.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources;
+
+import java.net.URI;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.provider.FileSystem;
+
+/**
+ * A file system for virtual resources
+ */
+public class VirtualFileSystem extends FileSystem {
+
+	public VirtualFileSystem() {
+		super();
+	}
+
+	public IFileStore getStore(URI uri) {
+		return new VirtualFileStore(uri);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
index 52f03be..8da4f86 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,17 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Red Hat Incorporated - loadProjectDescription(InputStream)
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.*;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.internal.events.*;
 import org.eclipse.core.internal.localstore.FileSystemResourceManager;
 import org.eclipse.core.internal.properties.IPropertyManager;
@@ -100,6 +104,7 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 	 */
 	protected IMoveDeleteHook moveDeleteHook = null;
 	protected NatureManager natureManager;
+	protected FilterTypeManager filterManager;
 	protected long nextMarkerId = 0;
 	protected long nextNodeId = 1;
 
@@ -273,7 +278,16 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 	public ISavedState addSaveParticipant(Plugin plugin, ISaveParticipant participant) throws CoreException {
 		Assert.isNotNull(plugin, "Plugin must not be null"); //$NON-NLS-1$
 		Assert.isNotNull(participant, "Participant must not be null"); //$NON-NLS-1$
-		return saveManager.addParticipant(plugin, participant);
+		return saveManager.addParticipant(plugin.getBundle().getSymbolicName(), participant);
+	}
+	
+	/* (non-Javadoc)
+	 * @see IWorkspace#addSaveParticipant(String, ISaveParticipant)
+	 */
+	public ISavedState addSaveParticipant(String pluginId, ISaveParticipant participant) throws CoreException {
+		Assert.isNotNull(pluginId, "Plugin id must not be null"); //$NON-NLS-1$
+		Assert.isNotNull(participant, "Participant must not be null"); //$NON-NLS-1$
+		return saveManager.addParticipant(pluginId, participant);
 	}
 
 	public void beginOperation(boolean createNewTree) throws CoreException {
@@ -697,7 +711,15 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 		}
 	}
 
-	protected void copyTree(IResource source, IPath destination, int depth, int updateFlags, boolean keepSyncInfo) throws CoreException {
+	protected void copyTree(IResource source, IPath destination, int depth,
+			int updateFlags, boolean keepSyncInfo) throws CoreException {
+		copyTree(source, destination, depth, updateFlags, keepSyncInfo, false, source.getType() == IResource.PROJECT);
+	}
+
+	private void copyTree(IResource source, IPath destination, int depth,
+			int updateFlags, boolean keepSyncInfo, boolean moveResources, boolean movingProject)
+			throws CoreException {
+				
 		// retrieve the resource at the destination if there is one (phantoms included).
 		// if there isn't one, then create a new handle based on the type that we are
 		// trying to copy
@@ -720,7 +742,7 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 			sourceInfo = (ResourceInfo) sourceInfo.clone();
 			sourceInfo.setType(destinationType);
 		}
-		ResourceInfo newInfo = createResource(destinationResource, sourceInfo, false, false, keepSyncInfo);
+		ResourceInfo newInfo = createResource(destinationResource, sourceInfo, false, true, keepSyncInfo);
 		// get/set the node id from the source's resource info so we can later put it in the
 		// info for the destination resource. This will help us generate the proper deltas,
 		// indicating a move rather than a add/delete
@@ -736,18 +758,40 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 		// update link locations in project descriptions
 		if (source.isLinked()) {
 			LinkDescription linkDescription;
-			if ((updateFlags & IResource.SHALLOW) != 0) {
+			URI sourceLocationURI = transferVariableDefinition(source, destinationResource, source.getLocationURI());
+			if (((updateFlags & IResource.SHALLOW) != 0) || ((Resource) source).isUnderVirtual()) {
 				//for shallow move the destination is a linked resource with the same location
 				newInfo.set(ICoreConstants.M_LINK);
-				linkDescription = new LinkDescription(destinationResource, source.getLocationURI());
+				linkDescription = new LinkDescription(destinationResource, sourceLocationURI);
 			} else {
 				//for deep move the destination is not a linked resource
 				newInfo.clear(ICoreConstants.M_LINK);
 				linkDescription = null;
 			}
+			if (moveResources && !movingProject) {
+				if (((Project) source.getProject()).internalGetDescription().setLinkLocation(source.getProjectRelativePath(), null))
+					((Project) source.getProject()).writeDescription(updateFlags);
+			}
 			Project project = (Project) destinationResource.getProject();
 			project.internalGetDescription().setLinkLocation(destinationResource.getProjectRelativePath(), linkDescription);
 			project.writeDescription(updateFlags);
+			newInfo.setFileStoreRoot(null);
+		}
+
+		// update filters in project descriptions
+		if (source.getProject().exists() && source instanceof Container && ((Container) source).hasFilters()) {
+			Project sourceProject = (Project) source.getProject();
+			LinkedList/*<FilterDescription>*/ originalDescriptions = sourceProject.internalGetDescription().getFilter(source.getProjectRelativePath());
+			LinkedList/*<FilterDescription>*/ filterDescriptions = FilterDescription.copy(originalDescriptions, destinationResource);
+			if (moveResources && !movingProject) {
+				if (((Project) source.getProject())
+						.internalGetDescription()
+						.setFilters(source.getProjectRelativePath(), null))
+					((Project) source.getProject()).writeDescription(updateFlags);
+			}
+			Project project = (Project) destinationResource.getProject();
+			project.internalGetDescription().setFilters(destinationResource.getProjectRelativePath(), filterDescriptions);
+			project.writeDescription(updateFlags);
 		}
 
 		// do the recursion. if we have a file then it has no members so return. otherwise
@@ -761,18 +805,131 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 		if (projectCopy) {
 			IResource dotProject = ((Project) source).findMember(IProjectDescription.DESCRIPTION_FILE_NAME);
 			if (dotProject != null)
-				copyTree(dotProject, destination.append(dotProject.getName()), depth, updateFlags, keepSyncInfo);
+				copyTree(dotProject, destination.append(dotProject.getName()), depth, updateFlags, keepSyncInfo, moveResources, movingProject);
 		}
 		IResource[] children = ((IContainer) source).members(IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS | IContainer.INCLUDE_HIDDEN);
 		for (int i = 0, imax = children.length; i < imax; i++) {
 			String childName = children[i].getName();
 			if (!projectCopy || !childName.equals(IProjectDescription.DESCRIPTION_FILE_NAME)) {
 				IPath childPath = destination.append(childName);
-				copyTree(children[i], childPath, depth, updateFlags, keepSyncInfo);
+				copyTree(children[i], childPath, depth, updateFlags, keepSyncInfo, moveResources, movingProject);
 			}
 		}
 	}
 
+	public URI transferVariableDefinition(IResource source, IResource dest,
+			URI sourceURI) throws CoreException {
+		IPath srcLoc = source.getLocation();
+		IPath srcRawLoc = source.getRawLocation();
+		if ((srcLoc != null) && !srcRawLoc.equals(srcLoc)) {
+			// the location is variable relative
+			if (!source.getProject().equals(dest.getProject())) {
+				String variable = srcRawLoc.segment(0);
+				variable = copyVariable(source, dest,
+						variable);
+				IPath newLocation = Path.fromPortableString(variable).append(
+						srcRawLoc.removeFirstSegments(1));
+				sourceURI = toURI(newLocation);
+			} else {
+				sourceURI = toURI(srcRawLoc);
+			}
+		}
+		return sourceURI;
+	}
+
+	URI toURI(IPath path) {
+		if (path.isAbsolute())
+			return org.eclipse.core.filesystem.URIUtil.toURI(path);
+		try {
+			return new URI(null, null, path.toPortableString(), null);
+		} catch (URISyntaxException e) {
+			return org.eclipse.core.filesystem.URIUtil.toURI(path);
+		}
+	}
+
+	String copyVariable(IResource source, IResource dest, String variable)
+			throws CoreException {
+		IPathVariableManager destPathVariableManager = dest.getPathVariableManager();
+		IPathVariableManager srcPathVariableManager = source.getPathVariableManager();
+
+		IPath srcValue = URIUtil.toPath(srcPathVariableManager.getURIValue(variable));
+		if (srcValue == null) // if the variable doesn't exist, return another
+								// variable that doesn't exist either
+			return PathVariableUtil.getUniqueVariableName(variable, dest);
+		IPath resolvedSrcValue = URIUtil.toPath(srcPathVariableManager.resolveURI(URIUtil.toURI(srcValue)));
+
+		boolean variableExisted = false;
+		// look if the exact same variable exists
+		if (destPathVariableManager.isDefined(variable)) {
+			variableExisted = true;
+			IPath destValue = 
+				URIUtil.toPath(destPathVariableManager.getURIValue(variable));
+			if (destValue != null && URIUtil.toPath(destPathVariableManager.resolveURI(URIUtil.toURI(destValue))).equals(
+					resolvedSrcValue))
+				return variable;
+		}
+		// look if one variable in the destination project matches
+		String[] variables = destPathVariableManager.getPathVariableNames();
+		for (int i = 0; i < variables.length; i++) {
+			if (!PathVariableUtil.isPreferred(variables[i]))
+				continue;
+			IPath resolveDestVariable = URIUtil.toPath(destPathVariableManager
+					.resolveURI(destPathVariableManager.getURIValue(variables[i])));
+			if (resolveDestVariable != null && resolveDestVariable.equals(resolvedSrcValue)) {
+				return variables[i];
+			}
+		}
+		// if the variable doesn't exist in the dest project, or
+		// if the value is different than the source project, we have to create
+		// an equivalent.
+		String destVariable = PathVariableUtil.getUniqueVariableName(variable, dest);
+
+		boolean shouldConvertToRelative = true;
+		if (!srcValue.equals(resolvedSrcValue) && !variableExisted) {
+			// the variable content contains references to more variables
+			
+			String[] referencedVariables = PathVariableUtil
+				.splitVariableNames(srcValue.toPortableString());
+			shouldConvertToRelative = false;
+			// If the variable value is of type ${PARENT-COUNT-VAR}, 
+			// we can avoid generating an intermediate variable and convert it directly.
+			if (referencedVariables.length == 1) {
+				if (PathVariableUtil.isParentVariable(referencedVariables[0]))
+					shouldConvertToRelative = true;
+			}
+				
+			if (!shouldConvertToRelative) {
+				String[] segments = PathVariableUtil
+				.splitVariablesAndContent(srcValue.toPortableString());
+				StringBuffer result = new StringBuffer();
+				for (int i = 0; i < segments.length; i++) {
+					String var = PathVariableUtil
+							.extractVariable(segments[i]);
+					if (var.length() > 0) {
+						String copiedVariable = copyVariable(source, dest, var);
+						int index = segments[i].indexOf(var);
+						if (index != -1) {
+							result.append(segments[i].substring(0, index));
+							result.append(copiedVariable);
+							int start = index + var.length();
+							int end = segments[i].length();
+							result.append(segments[i].substring(start, end));
+						}
+					} else
+						result.append(segments[i]);
+				}
+				srcValue = Path.fromPortableString(result.toString());
+			}
+		}
+		if (shouldConvertToRelative) {
+			IPath relativeSrcValue = PathVariableUtil.convertToPathRelativeMacro(destPathVariableManager, resolvedSrcValue, dest, true, null);
+			if (relativeSrcValue != null)
+				srcValue = relativeSrcValue;
+		}
+		destPathVariableManager.setURIValue(destVariable, URIUtil.toURI(srcValue));
+		return destVariable;
+	}
+
 	/**
 	 * Returns the number of resources in a subtree of the resource tree.
 	 * 
@@ -828,6 +985,8 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 			info.set(M_TEAM_PRIVATE_MEMBER);
 		if ((updateFlags & IResource.HIDDEN) != 0)
 			info.set(M_HIDDEN);
+		//		if ((updateFlags & IResource.VIRTUAL) != 0)
+		//			info.set(M_VIRTUAL);
 		return info;
 	}
 
@@ -1178,6 +1337,14 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 		return moveDeleteHook;
 	}
 
+	public IFilterMatcherDescriptor getFilterMatcherDescriptor(String filterMAtcherId) {
+		return filterManager.getFilterDescriptor(filterMAtcherId);
+	}
+
+	public IFilterMatcherDescriptor[] getFilterMatcherDescriptors() {
+		return filterManager.getFilterDescriptors();
+	}
+
 	/* (non-Javadoc)
 	 * @see IWorkspace#getNatureDescriptor(String)
 	 */
@@ -1583,7 +1750,7 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 	void move(Resource source, IPath destination, int depth, int updateFlags, boolean keepSyncInfo) throws CoreException {
 		// overlay the tree at the destination path, preserving any important info
 		// in any already existing resource information
-		copyTree(source, destination, depth, updateFlags, keepSyncInfo);
+		copyTree(source, destination, depth, updateFlags, keepSyncInfo, true, source.getType() == IResource.PROJECT);
 		source.fixupAfterMoveSource();
 	}
 
@@ -1772,7 +1939,15 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 	 */
 	public void removeSaveParticipant(Plugin plugin) {
 		Assert.isNotNull(plugin, "Plugin must not be null"); //$NON-NLS-1$
-		saveManager.removeParticipant(plugin);
+		saveManager.removeParticipant(plugin.getBundle().getSymbolicName());
+	}
+	
+	/* (non-Javadoc)
+	 * @see IWorkspace#removeSaveParticipant(String)
+	 */
+	public void removeSaveParticipant(String pluginId) {
+		Assert.isNotNull(pluginId, "Plugin id must not be null"); //$NON-NLS-1$
+		saveManager.removeParticipant(pluginId);
 	}
 
 	/* (non-Javadoc)
@@ -1812,7 +1987,7 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 			monitor.done();
 		}
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see IWorkspace#save(boolean, IProgressMonitor)
 	 */
@@ -1886,7 +2061,7 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 	protected void shutdown(IProgressMonitor monitor) throws CoreException {
 		monitor = Policy.monitorFor(monitor);
 		try {
-			IManager[] managers = {buildManager, propertyManager, pathVariableManager, charsetManager, fileSystemManager, markerManager, _workManager, aliasManager, refreshManager, contentDescriptionManager};
+			IManager[] managers = {buildManager, propertyManager, pathVariableManager, charsetManager, fileSystemManager, markerManager, _workManager, aliasManager, refreshManager, contentDescriptionManager, natureManager, filterManager};
 			monitor.beginTask("", managers.length); //$NON-NLS-1$
 			String message = Messages.resources_shutdownProblems;
 			MultiStatus status = new MultiStatus(ResourcesPlugin.PI_RESOURCES, IResourceStatus.INTERNAL_ERROR, message, null);
@@ -1945,6 +2120,8 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 			pathVariableManager.startup(null);
 			natureManager = new NatureManager();
 			natureManager.startup(null);
+			filterManager = new FilterTypeManager();
+			filterManager.startup(null);
 			buildManager = new BuildManager(this, getWorkManager().getLock());
 			buildManager.startup(null);
 			notificationManager = new NotificationManager(this);
@@ -2124,4 +2301,16 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
 			throw new ResourceException(status[0]);
 	}
 
+	/* (non-Javadoc)
+	 * @see IWorkspace#validateFiltered(IResource)
+	 */
+	public IStatus validateFiltered(IResource resource) {
+		try {
+			if (((Resource) resource).isFilteredWithException(true))
+				return new ResourceStatus(IStatus.ERROR, Messages.resources_errorResourceIsFiltered);
+		} catch (CoreException e) {
+			// if we can't validate it, we return OK
+		}
+		return Status.OK_STATUS;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
index 5553ca2..763f0f4 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,14 +21,12 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 public class WorkspaceDescription extends ModelObject implements IWorkspaceDescription {
 	protected boolean autoBuilding;
 	protected String[] buildOrder;
-	// thread safety: (Concurrency004)
-	protected volatile long fileStateLongevity;
+	protected long fileStateLongevity;
 	protected int maxBuildIterations;
 	protected int maxFileStates;
-	// thread safety: (Concurrency004)
-	protected volatile long maxFileStateSize;
-	// thread safety: (Concurrency004)
-	private volatile long snapshotInterval;
+	protected long maxFileStateSize;
+	protected boolean applyFileStatePolicy;
+	private long snapshotInterval;
 	protected int operationsPerSnapshot;
 	protected long deltaExpiration;
 
@@ -37,8 +35,9 @@ public class WorkspaceDescription extends ModelObject implements IWorkspaceDescr
 		// initialize based on the values in the default preferences
 		IEclipsePreferences node = new DefaultScope().getNode(ResourcesPlugin.PI_RESOURCES);
 		autoBuilding = node.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PreferenceInitializer.PREF_AUTO_BUILDING_DEFAULT);
-		fileStateLongevity = node.getLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PreferenceInitializer.PREF_FILE_STATE_LONGEVITY_DEFAULT);
 		maxBuildIterations = node.getInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PreferenceInitializer.PREF_MAX_BUILD_ITERATIONS_DEFAULT);
+		applyFileStatePolicy = node.getBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PreferenceInitializer.PREF_APPLY_FILE_STATE_POLICY_DEFAULT);
+		fileStateLongevity = node.getLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY, PreferenceInitializer.PREF_FILE_STATE_LONGEVITY_DEFAULT);
 		maxFileStates = node.getInt(ResourcesPlugin.PREF_MAX_FILE_STATES, PreferenceInitializer.PREF_MAX_FILE_STATES_DEFAULT);
 		maxFileStateSize = node.getLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE, PreferenceInitializer.PREF_MAX_FILE_STATE_SIZE_DEFAULT);
 		snapshotInterval = node.getLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL, PreferenceInitializer.PREF_SNAPSHOT_INTERVAL_DEFAULT);
@@ -95,6 +94,13 @@ public class WorkspaceDescription extends ModelObject implements IWorkspaceDescr
 		return maxFileStateSize;
 	}
 
+	/**
+	 * @see IWorkspaceDescription#isApplyFileStatePolicy()
+	 */
+	public boolean isApplyFileStatePolicy() {
+		return applyFileStatePolicy;
+	}
+
 	public int getOperationsPerSnapshot() {
 		return operationsPerSnapshot;
 	}
@@ -164,6 +170,13 @@ public class WorkspaceDescription extends ModelObject implements IWorkspaceDescr
 	}
 
 	/**
+	 * @see IWorkspaceDescription#setApplyFileStatePolicy(boolean)
+	 */
+	public void setApplyFileStatePolicy(boolean apply) {
+		applyFileStatePolicy = apply;
+	}
+
+	/**
 	 * @see IWorkspaceDescription#setSnapshotInterval(long)
 	 */
 	public void setSnapshotInterval(long snapshotInterval) {
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescriptionReader.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescriptionReader.java
index ec537b2..51d4fb8 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescriptionReader.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescriptionReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -112,6 +112,7 @@ public class WorkspaceDescriptionReader implements IModelObjectConstants {
 		String name = getString(node, NAME);
 		String autobuild = getString(node, AUTOBUILD);
 		String snapshotInterval = getString(node, SNAPSHOT_INTERVAL);
+		String applyFileStatePolicy = getString(node, APPLY_FILE_STATE_POLICY);
 		String fileStateLongevity = getString(node, FILE_STATE_LONGEVITY);
 		String maxFileStateSize = getString(node, MAX_FILE_STATE_SIZE);
 		String maxFileStates = getString(node, MAX_FILE_STATES);
@@ -123,6 +124,9 @@ public class WorkspaceDescriptionReader implements IModelObjectConstants {
 		if (autobuild != null)
 			//if in doubt (value is corrupt) we want autobuild on
 			description.setAutoBuilding(!autobuild.equals(Integer.toString(0)));
+		if (applyFileStatePolicy != null)
+			//if in doubt (value is corrupt) we want applyFileLimits on
+			description.setApplyFileStatePolicy(!applyFileStatePolicy.equals(Integer.toString(0)));
 		try {
 			if (fileStateLongevity != null)
 				description.setFileStateLongevity(Long.parseLong(fileStateLongevity));
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspacePreferences.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspacePreferences.java
index 252b9d9..fe93dde 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspacePreferences.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspacePreferences.java
@@ -67,8 +67,9 @@ public class WorkspacePreferences extends WorkspaceDescription {
 	private static void copyFromTo(WorkspaceDescription source, WorkspaceDescription target) {
 		target.setAutoBuilding(source.isAutoBuilding());
 		target.setBuildOrder(source.getBuildOrder());
-		target.setFileStateLongevity(source.getFileStateLongevity());
 		target.setMaxBuildIterations(source.getMaxBuildIterations());
+		target.setApplyFileStatePolicy(source.isApplyFileStatePolicy());
+		target.setFileStateLongevity(source.getFileStateLongevity());
 		target.setMaxFileStates(source.getMaxFileStates());
 		target.setMaxFileStateSize(source.getMaxFileStateSize());
 		target.setSnapshotInterval(source.getSnapshotInterval());
@@ -88,6 +89,7 @@ public class WorkspacePreferences extends WorkspaceDescription {
 		super.setAutoBuilding(preferences.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING));
 		super.setSnapshotInterval(preferences.getInt(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL));
 		super.setMaxBuildIterations(preferences.getInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS));
+		super.setApplyFileStatePolicy(preferences.getBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY));
 		super.setMaxFileStates(preferences.getInt(ResourcesPlugin.PREF_MAX_FILE_STATES));
 		super.setMaxFileStateSize(preferences.getLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE));
 		super.setFileStateLongevity(preferences.getLong(ResourcesPlugin.PREF_FILE_STATE_LONGEVITY));
@@ -158,6 +160,13 @@ public class WorkspacePreferences extends WorkspaceDescription {
 	}
 
 	/**
+	 * @see org.eclipse.core.resources.IWorkspaceDescription#setApplyFileStatePolicy(boolean)
+	 */
+	public void setApplyFileStatePolicy(boolean apply) {
+		preferences.setValue(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, apply);
+	}
+
+	/**
 	 * @see org.eclipse.core.resources.IWorkspaceDescription#setFileStateLongevity(long)
 	 */
 	public void setFileStateLongevity(long time) {
@@ -206,6 +215,8 @@ public class WorkspacePreferences extends WorkspaceDescription {
 			super.setSnapshotInterval(preferences.getLong(ResourcesPlugin.PREF_SNAPSHOT_INTERVAL));
 		else if (property.equals(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS))
 			super.setMaxBuildIterations(preferences.getInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS));
+		else if (property.equals(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY))
+			super.setApplyFileStatePolicy(preferences.getBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY));
 		else if (property.equals(ResourcesPlugin.PREF_MAX_FILE_STATES))
 			super.setMaxFileStates(preferences.getInt(ResourcesPlugin.PREF_MAX_FILE_STATES));
 		else if (property.equals(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE))
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceRoot.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceRoot.java
index fb13098..7fc4ec9 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceRoot.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceRoot.java
@@ -15,8 +15,10 @@ import java.net.URI;
 import java.util.*;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.internal.utils.FileUtil;
+import org.eclipse.core.internal.utils.Policy;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.NLS;
 
 public class WorkspaceRoot extends Container implements IWorkspaceRoot {
 	/**
@@ -210,7 +212,18 @@ public class WorkspaceRoot extends Container implements IWorkspaceRoot {
 	public IProject[] getProjects(int memberFlags) {
 		IResource[] roots = getChildren(memberFlags);
 		IProject[] result = new IProject[roots.length];
-		System.arraycopy(roots, 0, result, 0, roots.length);
+		try {
+			System.arraycopy(roots, 0, result, 0, roots.length);
+		} catch (ArrayStoreException ex) {
+			// Shouldn't happen since only projects should be children of the workspace root
+			for (int i = 0; i < roots.length; i++) {
+				if (roots[i].getType() != IResource.PROJECT)
+					Policy.log(IStatus.ERROR, NLS.bind("{0} is an invalid child of the workspace root.", //$NON-NLS-1$
+							roots[i]), null);
+
+			}
+			throw ex;
+		}
 		return result;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader.java
index affe41e..879f6af 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM - Initial API and implementation
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -25,15 +26,32 @@ import org.eclipse.osgi.util.NLS;
  * from a future version).
  */
 public abstract class WorkspaceTreeReader {
+	
+	/** 
+	 * Configuration setting to have an existing workspace 
+	 * project name take precedence over data being read,
+	 * when set to <code>true</code>.
+	 */
+	protected boolean renameProjectNode;
+	
 	/**
-	 * Returns the tree reader associated with the given tree version number
+	 * Returns the tree reader associated with the given tree version number.
+	 * @param renameProjectNode if <code>true</code>, set up the reader to have
+	 *     the existing root node in the workspace (that is, the project being
+	 *     read into) take precedence over the root node being read from the file.
+	 *     Otherwise, the tree file is read unmodified.
 	 */
-	public static WorkspaceTreeReader getReader(Workspace workspace, int version) throws CoreException {
+	public static WorkspaceTreeReader getReader(Workspace workspace, int version, boolean renameProjectNode) throws CoreException {
+		WorkspaceTreeReader w = null;
 		switch (version) {
 			case ICoreConstants.WORKSPACE_TREE_VERSION_1 :
-				return new WorkspaceTreeReader_1(workspace);
+				w = new WorkspaceTreeReader_1(workspace);
+				w.renameProjectNode = renameProjectNode;
+				return w;
 			case ICoreConstants.WORKSPACE_TREE_VERSION_2 :
-				return new WorkspaceTreeReader_2(workspace);
+				w = new WorkspaceTreeReader_2(workspace);
+				w.renameProjectNode = renameProjectNode;
+				return w;
 			default :
 				// Unknown tree version - fail to read the tree
 				String msg = NLS.bind(Messages.resources_format, new Integer(version));
@@ -42,6 +60,13 @@ public abstract class WorkspaceTreeReader {
 	}
 
 	/**
+	 * Returns the tree reader associated with the given tree version number.
+	 */
+	public static WorkspaceTreeReader getReader(Workspace workspace, int version) throws CoreException {
+		return getReader(workspace, version, false);
+	}
+
+	/**
 	 * Returns a snapshot from the stream. This default implementation does nothing.
 	 */
 	public abstract ElementTree readSnapshotTree(DataInputStream input, ElementTree complete, IProgressMonitor monitor) throws CoreException;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader_1.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader_1.java
index ae141a3..7b96982 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader_1.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceTreeReader_1.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.resources;
 
@@ -223,7 +224,12 @@ public class WorkspaceTreeReader_1 extends WorkspaceTreeReader {
 			String message = Messages.resources_reading;
 			monitor.beginTask(message, 4);
 			ElementTreeReader treeReader = new ElementTreeReader(workspace.getSaveManager());
-			ElementTree[] trees = treeReader.readDeltaChain(input);
+			String newProjectName = ""; //$NON-NLS-1$
+			if (renameProjectNode) {
+				//have the existing project name (path to import into) take precedence over what we read
+				newProjectName = root.segment(0);
+			}
+			ElementTree[] trees = treeReader.readDeltaChain(input, newProjectName);
 			monitor.worked(3);
 			if (root.isRoot()) {
 				//Don't need to link because we're reading the whole workspace.
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/EclipseHomeProjectVariable.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/EclipseHomeProjectVariable.java
new file mode 100644
index 0000000..05e7f30
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/EclipseHomeProjectVariable.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources.projectvariables;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.URIUtil;
+
+/**
+ * ECLIPSE_HOME project variable, pointing to the location of the eclipse install directory.
+ * 
+ */
+public class EclipseHomeProjectVariable extends PathVariableResolver {
+
+	public static String NAME = "ECLIPSE_HOME"; //$NON-NLS-1$
+
+	public EclipseHomeProjectVariable() {
+		// nothing to do.
+	}
+
+	public String[] getVariableNames(String variable, IResource resource) {
+		return new String[] {NAME};
+	}
+
+	public String getValue(String variable, IResource resource) {
+		URL installURL = Platform.getInstallLocation().getURL();
+		try {
+			return URIUtil.toURI(installURL).toASCIIString();
+		} catch (URISyntaxException e) {
+			return null;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ParentVariableResolver.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ParentVariableResolver.java
new file mode 100644
index 0000000..3414a85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ParentVariableResolver.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources.projectvariables;
+
+import java.net.URI;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+
+/**
+ * Path Variable representing the parent directory of the variable provided
+ * in argument, following the syntax:
+ * 
+ * "${PARENT-COUNT-MyVariable}"
+ *
+ */
+public class ParentVariableResolver extends PathVariableResolver {
+
+	final public static String NAME = "PARENT"; //$NON-NLS-1$
+
+	public ParentVariableResolver() {
+		// nothing
+	}
+
+	public String getValue(String variable, IResource resource) {
+		int index = variable.indexOf('-');
+		if (index == -1 || index == (variable.length() -1))
+			return null;
+		
+		String countRemaining = variable.substring(index + 1);
+		index = countRemaining.indexOf('-');
+		if (index == -1 || index == (variable.length() -1))
+			return null;
+
+		String countString = countRemaining.substring(0, index);
+		int count = 0;
+		try {
+			count = Integer.parseInt(countString);
+			if (count < 0)
+				return null;
+		}catch (NumberFormatException e) {
+			return null;
+		}
+		String argument = countRemaining.substring(index + 1);
+		
+		URI value = resource.getPathVariableManager().getURIValue(argument);
+		if (value == null)
+			return null;
+		value = resource.getPathVariableManager().resolveURI(value);
+		value = URIUtil.toURI(URIUtil.toPath(value).removeLastSegments(count));
+			
+		return value.toASCIIString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ProjectLocationVariableResolver.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ProjectLocationVariableResolver.java
new file mode 100644
index 0000000..3b00bdd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/ProjectLocationVariableResolver.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources.projectvariables;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+
+/**
+ * 
+ */
+public class ProjectLocationVariableResolver extends PathVariableResolver {
+
+	public static String NAME = "PROJECT_LOC"; //$NON-NLS-1$
+
+	public ProjectLocationVariableResolver() {
+		// nothing
+	}
+
+	public String[] getVariableNames(String variable, IResource resource) {
+		return new String[] {NAME};
+	}
+
+	public String getValue(String variable, IResource resource) {
+		if (resource.getProject().getLocationURI() != null)
+			return resource.getProject().getLocationURI().toASCIIString();
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceLocationVariableResolver.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceLocationVariableResolver.java
new file mode 100644
index 0000000..58f31d0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceLocationVariableResolver.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.resources.projectvariables;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+
+/**
+ * 
+ */
+public class WorkspaceLocationVariableResolver extends PathVariableResolver {
+
+	public static String NAME = "WORKSPACE_LOC"; //$NON-NLS-1$
+
+	public WorkspaceLocationVariableResolver() {
+		// nothing to do
+	}
+
+	public String[] getVariableNames(String variable, IResource resource) {
+		return new String[] {NAME};
+	}
+
+	public String getValue(String variable, IResource resource) {
+		return resource.getWorkspace().getRoot().getLocationURI().toASCIIString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceParentLocationVariableResolver.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceParentLocationVariableResolver.java
new file mode 100644
index 0000000..82beb29
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/projectvariables/WorkspaceParentLocationVariableResolver.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.internal.resources.projectvariables;
+
+import java.net.URI;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.variableresolvers.PathVariableResolver;
+
+/**
+ * Returns the location of the parent resource
+ */
+public class WorkspaceParentLocationVariableResolver extends PathVariableResolver {
+
+	public static String NAME = "PARENT_LOC"; //$NON-NLS-1$
+
+	public WorkspaceParentLocationVariableResolver() {
+		// nothing
+	}
+
+	public String[] getVariableNames(String variable, IResource resource) {
+		return new String[] {NAME};
+	}
+
+	public String getValue(String variable, IResource resource) {
+		IContainer parent = resource.getParent();
+		if (parent != null) {
+			URI locationURI = parent.getLocationURI();
+			if (locationURI != null)
+				return locationURI.toASCIIString();
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Messages.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Messages.java
index 0f75fa2..bebaf65 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Messages.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,10 @@
  *
  * Contributors:
  *     IBM - Initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
+ * Francis Lynch (Wind River) - [301563] Save and load tree snapshots
+ * Martin Oberhuber (Wind River) - [306575] Save snapshot location with project
  *******************************************************************************/
 package org.eclipse.core.internal.utils;
 
@@ -57,6 +61,11 @@ public class Messages extends NLS {
 	public static String links_vetoNature;
 	public static String links_workspaceVeto;
 	public static String links_wrongLocalType;
+	public static String links_resourceIsNotALink;
+	public static String links_setLocation;
+
+	public static String group_invalidParent;
+	public static String filters_missingFilterType;
 
 	// local store
 	public static String localstore_copying;
@@ -75,6 +84,7 @@ public class Messages extends NLS {
 	public static String localstore_refreshing;
 	public static String localstore_refreshingRoot;
 	public static String localstore_resourceExists;
+	public static String localstore_resourceDoesNotExist;
 	public static String localstore_resourceIsOutOfSync;
 
 	// resource mappings and models
@@ -108,19 +118,30 @@ public class Messages extends NLS {
 	public static String preferences_removeNodeException;
 	public static String preferences_clearNodeException;
 	public static String preferences_saveProblems;
+	public static String preferences_setDerivedException;
 	public static String preferences_syncException;
 
+	public static String projRead_badArguments;
+	public static String projRead_badFilterName;
+	public static String projRead_badFilterID;
+	public static String projRead_badFilterType;
+	public static String projRead_badFilterType2;
+	public static String projRead_badID;
 	public static String projRead_badLinkLocation;
 	public static String projRead_badLinkName;
 	public static String projRead_badLinkType;
 	public static String projRead_badLinkType2;
 	public static String projRead_badLocation;
+	public static String projRead_badSnapshotLocation;
+	public static String projRead_cannotReadSnapshot;
+	public static String projRead_emptyFilterName;
 	public static String projRead_emptyLinkName;
+	public static String projRead_emptyVariableName;
 	public static String projRead_failureReadingProjectDesc;
 	public static String projRead_notProjectDescription;
 	public static String projRead_whichKey;
 	public static String projRead_whichValue;
-
+	
 	public static String properties_couldNotClose;
 	public static String properties_qualifierIsNull;
 	public static String properties_readProperties;
@@ -222,6 +243,7 @@ public class Messages extends NLS {
 	public static String resources_pathNull;
 	public static String resources_projectDesc;
 	public static String resources_projectDescSync;
+	public static String resources_projectMustNotBeOpen;
 	public static String resources_projectPath;
 	public static String resources_pruningHistory;
 	public static String resources_reading;
@@ -254,6 +276,7 @@ public class Messages extends NLS {
 	public static String resources_settingCharset;
 	public static String resources_settingContents;
 	public static String resources_settingDefaultCharsetContainer;
+	public static String resources_settingDerivedFlag;
 	public static String resources_shutdown;
 	public static String resources_shutdownProblems;
 	public static String resources_snapInit;
@@ -268,6 +291,7 @@ public class Messages extends NLS {
 	public static String resources_workspaceOpen;
 	public static String resources_writeMeta;
 	public static String resources_writeWorkspaceMeta;
+	public static String resources_errorResourceIsFiltered;
 
 	public static String synchronizer_partnerNotRegistered;
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/messages.properties b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/messages.properties
index 1f458de..dfd539f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/messages.properties
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,10 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#     Serge Beauchamp (Freescale Semiconductor) - [252996] add resource filtering
+#     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
+# Francis Lynch (Wind River) - [301563] Save and load tree snapshots
+# Martin Oberhuber (Wind River) - [306575] Save snapshot location with project
 ###############################################################################
 ### Resources plugin messages.
 
@@ -52,6 +56,12 @@ links_notFileFolder = Cannot create linked resource ''{0}''.  Only files and fol
 links_vetoNature = Cannot add nature because project ''{0}'' contains linked resources, and nature ''{1}'' does not allow it.
 links_workspaceVeto = Linked resources are not supported by this application.
 links_wrongLocalType = Cannot create linked resource ''{0}''.  Files cannot be linked to folders.
+links_resourceIsNotALink=Resource ''{0}'' must be a linked resource to change its linked location.
+links_setLocation=Changing link location.
+
+group_invalidParent = Only virtual folders and links can be created under a virtual folder.
+
+filters_missingFilterType= Missing resource filter type: ''{0}''.
 
 ### local store
 localstore_copying = Copying ''{0}''.
@@ -70,6 +80,7 @@ localstore_locationUndefined = The location for ''{0}'' could not be determined
 localstore_refreshing = Refreshing ''{0}''.
 localstore_refreshingRoot = Refreshing workspace.
 localstore_resourceExists = Resource already exists on disk: ''{0}''.
+localstore_resourceDoesNotExist = Resource does not exist on disk: ''{0}''.
 localstore_resourceIsOutOfSync = Resource is out of sync with the file system: ''{0}''.
 
 ### Resource mappings and models
@@ -104,6 +115,7 @@ preferences_operationCanceled=Operation canceled.
 preferences_removeNodeException=Exception while removing preference node: {0}.
 preferences_clearNodeException=Exception while clearing preference node: {0}.
 preferences_saveProblems=Exception occurred while saving project preferences: {0}.
+preferences_setDerivedException=Exception occurred while setting derived flag for project derived preferences: {0}.
 preferences_syncException=Exception occurred while synchronizing node: {0}.
 
 projRead_badLinkName = Names ''{0}'' and ''{1}'' detected for a single link.  Using ''{0}''.
@@ -115,8 +127,20 @@ projRead_badLinkLocation = Empty location detected for linked resource with name
 projRead_whichKey = Two values detected for an argument name in a build command:  ''{0}'' and ''{1}''.  Using ''{0}''.
 projRead_whichValue = Two values detected for an argument value in a build command:  ''{0}'' and ''{1}''.  Using ''{0}''.
 projRead_notProjectDescription = Encountered element name ''{0}'' instead of \"project\" when trying to read a project description file.
+projRead_badSnapshotLocation = Invalid resource snapshot location URI ''{0}'' is not absolute.
+projRead_cannotReadSnapshot = Failed to read resource snapshot for project ''{0}'': {1}
 projRead_failureReadingProjectDesc = Failure occurred reading .project file.
 
+projRead_emptyVariableName = Empty variable name detected in project "{0}\".
+
+projRead_badFilterName = Names ''{0}'' and ''{1}'' detected for a single filter.  Using ''{0}''.
+projRead_emptyFilterName = Empty name detected for filtered resource with type ''{0}'' and id ''{1}''.
+projRead_badFilterID = Empty filter id detected for filtered resource with name ''{0}'' and type ''{1}''.
+projRead_badFilterType = Illegal filter type \"-1\" detected for filtered resource with name ''{0}'' and id ''{1}''.
+projRead_badFilterType2 = Types ''{0}'' and ''{1}'' detected for a single filter.  Using ''{0}''.
+projRead_badID = IDs ''{0}'' and ''{1}'' detected for a single filter.  Using ''{0}''.
+projRead_badArguments= Arguments ''{0}'' and ''{1}'' detected for a single filter.  Using ''{0}''.
+
 properties_qualifierIsNull = Qualifier part of property key cannot be null.
 properties_readProperties = Failure while reading persistent properties for resource ''{0}'', file was corrupt. Some properties may have been lost.
 properties_valueTooLong = Could not set property: {0} {1}. Value is too long.
@@ -218,6 +242,7 @@ resources_overlapProject = {0} overlaps the location of another project: ''{1}''
 resources_pathNull = Paths must not be null.
 resources_projectDesc = Problems encountered while setting project description.
 resources_projectDescSync = Could not set the project description for ''{0}'' because the project description file (.project) is out of sync with the file system.
+resources_projectMustNotBeOpen = Project must not be open.
 resources_projectPath = Path for project must have only one segment.
 resources_pruningHistory = Pruning history.
 resources_reading = Reading.
@@ -250,6 +275,7 @@ resources_setLocal = Setting resource local flag.
 resources_settingCharset = Setting character set for resource ''{0}''.
 resources_settingDefaultCharsetContainer = Setting default character set for resource ''{0}''.
 resources_settingContents = Setting contents for ''{0}''.
+resources_settingDerivedFlag = Setting derived flag for resource ''{0}''.
 resources_shutdown = Workspace was not properly initialized or has already shutdown.
 resources_shutdownProblems = Problem on shutdown.
 resources_snapInit = Could not initialize snapshot file.
@@ -264,6 +290,7 @@ resources_workspaceClosed = Workspace is closed.
 resources_workspaceOpen = The workspace is already open.
 resources_writeMeta = Could not write metadata for ''{0}''.
 resources_writeWorkspaceMeta = Could not write workspace metadata ''{0}''.
+resources_errorResourceIsFiltered=The resource will be filtered out by its parent resource filters
 
 synchronizer_partnerNotRegistered = Sync partner: {0} not registered with the synchronizer.
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReader.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReader.java
index 107d793..0ad3a6b 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReader.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.watson;
 
@@ -91,9 +92,22 @@ public class ElementTreeReader {
 	 * complete, and all other trees are deltas on the previous tree in the list.
 	 */
 	public ElementTree[] readDeltaChain(DataInput input) throws IOException {
+		return readDeltaChain(input, ""); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Reads a chain of ElementTrees from the given input stream.
+	 * @param input the input stream to read from.
+	 * @param newProjectName a new name to use for the root node of the
+	 *     tree being read, or the empty String ("") to read the tree
+	 *     from the given input unchanged.
+	 * @return A chain of ElementTrees, where the first tree in the list is
+	 * complete, and all other trees are deltas on the previous tree in the list.
+s	 */
+	public ElementTree[] readDeltaChain(DataInput input, String newProjectName) throws IOException {
 		/* Dispatch to the appropriate reader. */
 		ElementTreeReader realReader = getReader(readNumber(input));
-		return realReader.readDeltaChain(input);
+		return realReader.readDeltaChain(input, newProjectName);
 	}
 
 	/** 
@@ -118,8 +132,22 @@ public class ElementTreeReader {
 	 * depending on the stream version id.
 	 */
 	public ElementTree readTree(DataInput input) throws IOException {
+		return readTree(input, ""); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Reads an element tree from the input stream and returns it.
+	 * This method actually just dispatches to the appropriate reader
+	 * depending on the stream version id.
+	 * @param input the input stream to read from.
+	 * @param newProjectName a new name to use for the root node of the
+	 *     tree being read, or the empty String ("") to read the tree
+	 *     from the given input unchanged.
+	 * @return the requested ElementTree.
+	 */
+	public ElementTree readTree(DataInput input, String newProjectName) throws IOException {
 		/* Dispatch to the appropriate reader. */
 		ElementTreeReader realReader = getReader(readNumber(input));
-		return realReader.readTree(input);
+		return realReader.readTree(input, newProjectName);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReaderImpl_1.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReaderImpl_1.java
index 0b41b68..6f04236 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReaderImpl_1.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/internal/watson/ElementTreeReaderImpl_1.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [305718] Allow reading snapshot into renamed project
  *******************************************************************************/
 package org.eclipse.core.internal.watson;
 
@@ -39,7 +40,7 @@ import org.eclipse.core.internal.dtree.DeltaDataTree;
 	 */
 	public ElementTree readDelta(ElementTree parentTree, DataInput input) throws IOException {
 		DeltaDataTree complete = parentTree.getDataTree();
-		DeltaDataTree delta = dataTreeReader.readTree(complete, input);
+		DeltaDataTree delta = dataTreeReader.readTree(complete, input, ""); //$NON-NLS-1$
 
 		//if the delta is empty, just return the parent
 		if (delta.isEmptyDelta())
@@ -60,12 +61,11 @@ import org.eclipse.core.internal.dtree.DeltaDataTree;
 		return tree;
 	}
 
-	/**
-	 * Reads a chain of ElementTrees from the given input stream.
-	 * @return A chain of ElementTrees, where the first tree in the list is
-	 * complete, and all other trees are deltas on the previous tree in the list.
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.internal.watson.ElementTreeReader#readDeltaChain(java.io.DataInput, java.lang.String)
 	 */
-	public ElementTree[] readDeltaChain(DataInput input) throws IOException {
+	public ElementTree[] readDeltaChain(DataInput input, String newProjectName) throws IOException {
 		/* read the number of trees */
 		int treeCount = readNumber(input);
 		ElementTree[] results = new ElementTree[treeCount];
@@ -81,7 +81,7 @@ import org.eclipse.core.internal.dtree.DeltaDataTree;
 		}
 
 		/* read the complete tree */
-		results[order[0]] = super.readTree(input);
+		results[order[0]] = super.readTree(input, newProjectName);
 
 		/* reconstitute each of the remaining trees from their written deltas */
 		for (int i = 1; i < treeCount; i++) {
@@ -91,15 +91,16 @@ import org.eclipse.core.internal.dtree.DeltaDataTree;
 		return results;
 	}
 
-	/** Part of <code>ElementTreeReader</code> interface.
-	 * @see ElementTreeReader
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.internal.watson.ElementTreeReader#readTree(java.io.DataInput, java.lang.String)
 	 */
-	public ElementTree readTree(DataInput input) throws IOException {
+	public ElementTree readTree(DataInput input, String newProjectName) throws IOException {
 
 		/* The format version number has already been consumed
 		 * by ElementTreeReader#readFrom.
 		 */
-		ElementTree result = new ElementTree(dataTreeReader.readTree(null, input));
+		ElementTree result = new ElementTree(dataTreeReader.readTree(null, input, newProjectName));
 		return result;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/FileInfoMatcherDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/FileInfoMatcherDescription.java
new file mode 100644
index 0000000..5f0ad55
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/FileInfoMatcherDescription.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.resources;
+
+/**
+ * A description of a file info matcher.
+ * @since 3.6
+ */
+public final class FileInfoMatcherDescription {
+
+	private String id;
+
+	private Object arguments;
+
+	public FileInfoMatcherDescription(String id, Object arguments) {
+		super();
+		this.id = id;
+		this.arguments = arguments;
+	}
+
+	public Object getArguments() {
+		return arguments;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((arguments == null) ? 0 : arguments.hashCode());
+		result = prime * result + ((id == null) ? 0 : id.hashCode());
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		FileInfoMatcherDescription other = (FileInfoMatcherDescription) obj;
+		if (arguments == null) {
+			if (other.arguments != null)
+				return false;
+		} else if (!arguments.equals(other.arguments))
+			return false;
+		if (id == null) {
+			if (other.id != null)
+				return false;
+		} else if (!id.equals(other.id))
+			return false;
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IContainer.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IContainer.java
index 60c6a74..f221679 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IContainer.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,9 +7,11 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add addFilter/removeFilter/getFilters
  *******************************************************************************/
 package org.eclipse.core.resources;
 
+import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.runtime.*;
 
 /**
@@ -465,4 +467,61 @@ public interface IContainer extends IResource, IAdaptable {
 	 * @since 3.0
 	 */
 	public void setDefaultCharset(String charset, IProgressMonitor monitor) throws CoreException;
+
+	/**
+	 * Adds a new filter to this container. Filters restrict the set of files and directories
+	 * in the underlying file system that will be included as members of this container.
+	 * <p>
+	 * The {@link IResource#BACKGROUND_REFRESH} update flag controls when
+	 * changes to the resource hierarchy under this container resulting from the new
+	 * filter take effect. If this flag is specified, the resource hierarchy is updated in a 
+	 * separate thread after this method returns. If the flag is not specified, any resource 
+	 * changes resulting from the new filter  will occur before this method returns.
+	 * </p>
+	 * <p> 
+	 * This operation changes resources; these changes will be reported
+	 * in a subsequent resource change event that will include an indication of any 
+	 * resources that have been removed as a result of the new filter.
+	 * </p>
+	 * <p>
+	 * This operation is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * </p>
+	 * 
+	 * @param type ({@link IResourceFilterDescription#INCLUDE_ONLY} or 
+	 * {@link IResourceFilterDescription#EXCLUDE_ALL} and/or {@link IResourceFilterDescription#INHERITABLE})
+	 * @param matcherDescription the description of the matcher that will determine
+	 * which {@link IFileInfo} instances will be excluded from the resource tree
+	 * @param updateFlags bit-wise or of update flag constants
+	 *   ({@link IResource#BACKGROUND_REFRESH})
+	 * @param monitor a progress monitor, or <code>null</code> if progress reporting is not desired
+	 * @return the description of the added filter
+	 * @exception CoreException if this filter could not be added. Reasons include:
+	 * <ul>
+	 * <li> Resource changes are disallowed during certain types of resource change 
+	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
+	 * </ul>
+	 * @exception OperationCanceledException if the operation is canceled. 
+	 * Cancelation can occur even if no progress monitor is provided.
+	 * @see #getFilters()
+	 * @see IResourceFilterDescription#delete(int, IProgressMonitor)
+	 * 
+	 * @since 3.6
+	 */
+	public IResourceFilterDescription createFilter(int type, FileInfoMatcherDescription matcherDescription, int updateFlags, IProgressMonitor monitor) throws CoreException;
+
+	/**
+	 * Retrieve all filters on this container.
+	 * If no filters exist for this resource, an empty array is returned.
+	 * 
+	 * @return an array of filters
+	 * @exception CoreException if this resource's filters could not be retrieved. Reasons include:
+	 * <ul>
+	 * <li> This resource is not a folder.</li>
+	 * 
+	 * @see #createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)
+	 * @see IResourceFilterDescription#delete(int, IProgressMonitor)
+	 * @since 3.6
+	 */
+	public IResourceFilterDescription[] getFilters() throws CoreException;
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFile.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFile.java
index 35de64a..ba0bea4 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFile.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -240,6 +240,7 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 * <ul>
 	 * <li> This resource already exists in the workspace.</li>
 	 * <li> The parent of this resource does not exist.</li>
+	 * <li> The parent of this resource is a virtual folder.</li>
 	 * <li> The project of this resource is not accessible.</li>
 	 * <li> The parent contains a resource of a different type 
 	 *      at the same path as this resource.</li>
@@ -314,6 +315,7 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 * <ul>
 	 * <li> This resource already exists in the workspace.</li>
 	 * <li> The parent of this resource does not exist.</li>
+	 * <li> The parent of this resource is a virtual folder.</li>
 	 * <li> The project of this resource is not accessible.</li>
 	 * <li> The parent contains a resource of a different type 
 	 *      at the same path as this resource.</li>
@@ -353,8 +355,8 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 * The {@link IResource#REPLACE} update flag controls how this 
 	 * method deals with cases where a resource of the same name as the 
 	 * prospective link already exists. If {@link IResource#REPLACE}
-	 * is specified, then any existing resource with the same name is removed
-	 * from the workspace to make way for creation of the link.  This does <b>not</b>
+	 * is specified, then the existing linked resource's location is replaced
+	 * by localLocation's value.  This does <b>not</b>
 	 * cause the underlying file system contents of that resource to be deleted.
 	 * If {@link IResource#REPLACE} is not specified, this method will
 	 * fail if an existing resource exists of the same name.
@@ -384,7 +386,7 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 *
 	 * @param localLocation a file system path where the file should be linked 
 	 * @param updateFlags bit-wise or of update flag constants
-	 *   ({@link IResource#ALLOW_MISSING_LOCAL} and {@link IResource#REPLACE})
+	 *   ({@link IResource#ALLOW_MISSING_LOCAL}, {@link IResource#REPLACE} and {@link IResource#HIDDEN})
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting is not desired
 	 * @exception CoreException if this method fails. Reasons include:
@@ -411,6 +413,8 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 * Cancelation can occur even if no progress monitor is provided.
 	 * @see IResource#isLinked()
 	 * @see IResource#ALLOW_MISSING_LOCAL
+	 * @see IResource#REPLACE
+	 * @see IResource#HIDDEN
 	 * @since 2.1
 	 */
 	public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor) throws CoreException;
@@ -465,7 +469,7 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 *
 	 * @param location a file system URI where the file should be linked 
 	 * @param updateFlags bit-wise or of update flag constants
-	 *   ({@link IResource#ALLOW_MISSING_LOCAL} and {@link IResource#REPLACE})
+	 *   ({@link IResource#ALLOW_MISSING_LOCAL}, {@link IResource#REPLACE} and {@link IResource#HIDDEN})
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting is not desired
 	 * @exception CoreException if this method fails. Reasons include:
@@ -492,6 +496,8 @@ public interface IFile extends IResource, IEncodedStorage, IAdaptable {
 	 * Cancelation can occur even if no progress monitor is provided.
 	 * @see IResource#isLinked()
 	 * @see IResource#ALLOW_MISSING_LOCAL
+	 * @see IResource#REPLACE
+	 * @see IResource#HIDDEN
 	 * @since 3.2
 	 */
 	public void createLink(URI location, int updateFlags, IProgressMonitor monitor) throws CoreException;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFilterMatcherDescriptor.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFilterMatcherDescriptor.java
new file mode 100644
index 0000000..0328cf4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFilterMatcherDescriptor.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp(Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.resources;
+
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+
+/**
+ * A filter descriptor contains information about a filter type
+ * obtained from the plug-in manifest (<code>plugin.xml</code>) files.
+ * <p>
+ * Filter descriptors are platform-defined objects that exist
+ * independent of whether that filter's bundle has been started. 
+ * </p>
+ * 
+ * @see AbstractFileInfoMatcher
+ * @see IWorkspace#getFilterMatcherDescriptor(String)
+ * @see IWorkspace#getFilterMatcherDescriptors()
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IFilterMatcherDescriptor {
+
+	/**
+	 * An argument filter type constant (value "filter"), denoting that this
+	 * filter takes another filter as argument.
+	 */
+	public static final String ARGUMENT_TYPE_FILTER_MATCHER = "filterMatcher"; //$NON-NLS-1$
+	/**
+	 * An argument filter type constant (value "filters"), denoting that this
+	 * filter takes an array of other filters as argument.
+	 */
+	public static final String ARGUMENT_TYPE_FILTER_MATCHERS = "filterMatchers"; //$NON-NLS-1$
+	/**
+	 * An argument filter type constant (value "none"), denoting that this
+	 * filter does not take any arguments.
+	 */
+	public static final String ARGUMENT_TYPE_NONE = "none"; //$NON-NLS-1$
+	/**
+	 * An argument filter type constant (value "string"), denoting that this
+	 * filter takes a string argument
+	 */
+	public static final String ARGUMENT_TYPE_STRING = "string"; //$NON-NLS-1$
+
+	/**
+	 * Returns the argument type expected by this filter. The result will be one of the
+	 * <tt>ARGUMENT_TYPE_*</tt> constants declared on this class.
+	 * @return The argument type of this filter extension
+	 */
+	public abstract String getArgumentType();
+
+	/**
+	 * Returns a translated, human-readable description for this filter extension.
+	 * @return The human-readable filter description
+	 */
+	public abstract String getDescription();
+
+	/**
+	 * Returns the fully qualified id of the filter extension.
+	 * @return The fully qualified id of the filter extension.
+	 */
+	public abstract String getId();
+
+	/**
+	 * Returns a translated, human-readable name for this filter extension.
+	 * @return The human-readable filter name
+	 */
+	public abstract String getName();
+
+	/**
+	 * TODO What is this?
+	 */
+	public abstract boolean isFirstOrdering();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFolder.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFolder.java
index ef7f76c..d1efd1a 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFolder.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IFolder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
  *******************************************************************************/
 package org.eclipse.core.resources;
 
@@ -65,6 +66,7 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * <li> The parent of this resource is a project that is not open.</li>
 	 * <li> The parent contains a resource of a different type 
 	 *      at the same path as this resource.</li>
+	 * <li> The parent of this resource is virtual, but this resource is not.</li>
 	 * <li> The name of this resource is not valid (according to 
 	 *    <code>IWorkspace.validateName</code>).</li>
 	 * <li> The corresponding location in the local file system is occupied
@@ -126,7 +128,8 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * </p>
 	 * 
 	 * @param updateFlags bit-wise or of update flag constants
-	 *   ({@link IResource#FORCE}, {@link IResource#DERIVED}, and {@link IResource#TEAM_PRIVATE})
+	 *   ({@link IResource#FORCE}, {@link IResource#DERIVED}, {@link IResource#TEAM_PRIVATE})
+	 *   and {@link IResource#VIRTUAL})
 	 * @param local a flag controlling whether or not the folder will be local
 	 *    after the creation
 	 * @param monitor a progress monitor, or <code>null</code> if progress
@@ -140,6 +143,7 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * <li> The parent of this resource is a project that is not open.</li>
 	 * <li> The parent contains a resource of a different type 
 	 *      at the same path as this resource.</li>
+	 * <li> The parent of this resource is virtual, but this resource is not.</li>
 	 * <li> The name of this resource is not valid (according to 
 	 *    <code>IWorkspace.validateName</code>).</li>
 	 * <li> The corresponding location in the local file system is occupied
@@ -176,8 +180,8 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * The {@link IResource#REPLACE} update flag controls how this 
 	 * method deals with cases where a resource of the same name as the 
 	 * prospective link already exists. If {@link IResource#REPLACE}
-	 * is specified, then any existing resource with the same name is removed
-	 * from the workspace to make way for creation of the link.  This does <b>not</b>
+	 * is specified, then the existing linked resource's location is replaced
+	 * by localLocation's value.  This does <b>not</b>
 	 * cause the underlying file system contents of that resource to be deleted.
 	 * If {@link IResource#REPLACE} is not specified, this method will
 	 * fail if an existing resource exists of the same name.
@@ -211,7 +215,7 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * 
 	 * @param localLocation a file system path where the folder should be linked
 	 * @param updateFlags bit-wise or of update flag constants
-	 *   (only ALLOW_MISSING_LOCAL is relevant here) 
+	 *   ({@link IResource#ALLOW_MISSING_LOCAL}, {@link IResource#REPLACE}, {@link IResource#BACKGROUND_REFRESH}, and {@link IResource#HIDDEN})
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting is not desired
 	 * @exception CoreException if this method fails. Reasons include:
@@ -238,6 +242,9 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * Cancelation can occur even if no progress monitor is provided.
 	 * @see IResource#isLinked()
 	 * @see IResource#ALLOW_MISSING_LOCAL
+	 * @see IResource#REPLACE
+	 * @see IResource#BACKGROUND_REFRESH
+	 * @see IResource#HIDDEN
 	 * @since 2.1
 	 */
 	public void createLink(IPath localLocation, int updateFlags, IProgressMonitor monitor) throws CoreException;
@@ -296,7 +303,7 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * 
 	 * @param location a file system path where the folder should be linked
 	 * @param updateFlags bit-wise or of update flag constants
-	 *   (only ALLOW_MISSING_LOCAL is relevant here) 
+	 *   ({@link IResource#ALLOW_MISSING_LOCAL}, {@link IResource#REPLACE}, {@link IResource#BACKGROUND_REFRESH}, and {@link IResource#HIDDEN})
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting is not desired
 	 * @exception CoreException if this method fails. Reasons include:
@@ -323,6 +330,9 @@ public interface IFolder extends IContainer, IAdaptable {
 	 * Cancelation can occur even if no progress monitor is provided.
 	 * @see IResource#isLinked()
 	 * @see IResource#ALLOW_MISSING_LOCAL
+	 * @see IResource#REPLACE
+	 * @see IResource#BACKGROUND_REFRESH
+	 * @see IResource#HIDDEN
 	 * @since 3.2
 	 */
 	public void createLink(URI location, int updateFlags, IProgressMonitor monitor) throws CoreException;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IMarker.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IMarker.java
index 6e6d671..dbb538b 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IMarker.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IMarker.java
@@ -468,7 +468,8 @@ public interface IMarker extends IAdaptable {
 	 * 
 	 * <p>
 	 * The attribute value cannot be <code>String</code> 
-	 * whose UTF encoding exceeds 65535 bytes.
+	 * whose UTF encoding exceeds 65535 bytes. On persistent
+	 * markers this limit is enforced by an assertion.
 	 * </p>
 	 * 
 	 * <p>
@@ -519,7 +520,8 @@ public interface IMarker extends IAdaptable {
 	 * 
 	 * <p>
 	 * The values of the attributes cannot be <code>String</code> 
-	 * whose UTF encoding exceeds 65535 bytes.
+	 * whose UTF encoding exceeds 65535 bytes. On persistent markers
+	 * this limit is enforced by an assertion. 
 	 * </p>
 	 * 
 	 * <p>
@@ -550,7 +552,8 @@ public interface IMarker extends IAdaptable {
 	 * 
 	 * <p>
 	 * The values of the attributes cannot be <code>String</code> 
-	 * whose UTF encoding exceeds 65535 bytes.
+	 * whose UTF encoding exceeds 65535 bytes. On persistent markers
+	 * this limit is enforced by an assertion. 
 	 * </p>
 	 * 
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IPathVariableManager.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IPathVariableManager.java
index 5fdf57e..f2fc0b3 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IPathVariableManager.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IPathVariableManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 
 package org.eclipse.core.resources;
@@ -36,6 +37,38 @@ import org.eclipse.core.runtime.*;
  */
 public interface IPathVariableManager {
 
+	/** 
+	 * Converts an absolute path to path relative to some defined
+	 * variable. For example, converts "C:/foo/bar.txt" into "FOO/bar.txt", 
+	 * granted that the path variable "FOO" value is "C:/foo".
+	 * <p>
+	 * The "force" argument will cause an intermediate path variable to be created if 
+	 * the given path can be relative only to a parent of an existing path variable.
+	 * For example, if the path "C:/other/file.txt" is to be converted
+	 * and no path variables point to "C:/" or "C:/other" but "FOO" 
+	 * points to "C:/foo", an intermediate "OTHER" variable will be 
+	 * created relative to "FOO" containing the value "${PARENT-1-FOO}"
+	 * so that the final path returned will be "OTHER/file.txt".
+	 * </p>
+	 * <p>
+	 * The argument "variableHint" can be used to specify the name of the path
+	 * variable to make the provided path relative to. 
+	 * </p>
+	 *  
+	 * @param path  The absolute path to be converted
+	 * @param force indicates whether intermediate path variables should be created 
+	 * if the path is relative only to a parent of an existing path variable.
+	 * @param variableHint The name of the variable to which the path should be made 
+	 * relative to, or <code>null</code> for the nearest one.
+	 * @return The converted path
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>The variable name is not valid</li>
+	 * </ul>
+	 * @since 3.6
+	 */
+	public URI convertToRelative(URI path, boolean force, String variableHint) throws CoreException;
+
 	/**
 	 * Sets the path variable with the given name to be the specified value.
 	 * Depending on the value given and if the variable is currently defined
@@ -64,6 +97,7 @@ public interface IPathVariableManager {
 	 * @param name the name of the variable 
 	 * @param value the value for the variable (may be <code>null</code>)
 	 * @exception CoreException if this method fails. Reasons include:
+	 * @deprecated use setValue(String, URI) instead.
 	 * <ul>
 	 * <li>The variable name is not valid</li>
 	 * <li>The variable value is relative</li>
@@ -72,22 +106,73 @@ public interface IPathVariableManager {
 	public void setValue(String name, IPath value) throws CoreException;
 
 	/**
+	 * Sets the path variable with the given name to be the specified value.
+	 * Depending on the value given and if the variable is currently defined
+	 * or not, there are several possible outcomes for this operation:
+	 * <p>
+	 * <ul>
+	 * <li>A new variable will be created, if there is no variable defined with
+	 * the given name, and the given value is not <code>null</code>.
+	 * </li>
+	 * 
+	 * <li>The referred variable's value will be changed, if it already exists
+	 * and the given value is not <code>null</code>.</li>
+	 * 
+	 * <li>The referred variable will be removed, if a variable with the given
+	 * name is currently defined and the given value is <code>null</code>.
+	 * </li>
+	 *  
+	 * <li>The call will be ignored, if a variable with the given name is not
+	 * currently defined and the given value is <code>null</code>, or if it is
+	 * defined but the given value is equal to its current value.
+	 * </li>
+	 * </ul>
+	 * <p>If a variable is effectively changed, created or removed by a call to
+	 * this method, notification will be sent to all registered listeners.</p>
+	 * 
+	 * @param name the name of the variable 
+	 * @param value the value for the variable (may be <code>null</code>)
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>The variable name is not valid</li>
+	 * <li>The variable value is relative</li>
+	 * </ul>
+	 * @since 3.6
+	 */
+	public void setURIValue(String name, URI value) throws CoreException;
+
+	/**
 	 * Returns the value of the path variable with the given name. If there is
 	 * no variable defined with the given name, returns <code>null</code>.
 	 * 
 	 * @param name the name of the variable to return the value for  
 	 * @return the value for the variable, or <code>null</code> if there is no
 	 *    variable defined with the given name
+	 * @deprecated use getURIValue(String) instead.
 	 */
 	public IPath getValue(String name);
 
 	/**
+	 * Returns the value of the path variable with the given name. If there is
+	 * no variable defined with the given name, returns <code>null</code>.
+	 * 
+	 * @param name the name of the variable to return the value for  
+	 * @return the value for the variable, or <code>null</code> if there is no
+	 *    variable defined with the given name
+	 * @since 3.6
+	 */
+	public URI getURIValue(String name);
+
+	/**
 	 * Returns an array containing all defined path variable names.
 	 *  
 	 * @return an array containing all defined path variable names
 	 */
 	public String[] getPathVariableNames();
 
+	//	Should be added for 3.6
+	//	public String[] getPathVariableNames(String name);
+
 	/**
 	 * Registers the given listener to receive notification of changes to path
 	 * variables. The listener will be notified whenever a variable has been
@@ -161,6 +246,7 @@ public interface IPathVariableManager {
 	 * 
 	 * @param path the path to be resolved
 	 * @return the resolved path or <code>null</code>
+	 * @deprecated use resolveURI(URI) instead.
 	 */
 	public IPath resolvePath(IPath path);
 
@@ -176,6 +262,14 @@ public interface IPathVariableManager {
 	public boolean isDefined(String name);
 
 	/**
+	 * Returns whether a variable is user defined or not.
+	 * 
+	 * @return true if the path is user defined.
+	 * @since 3.6
+	 */
+	public boolean isUserDefined(String name);
+
+	/**
 	 * Validates the given name as the name for a path variable. A valid path
 	 * variable name is made exclusively of letters, digits and the underscore
 	 * character, and does not start with a digit.
@@ -200,4 +294,56 @@ public interface IPathVariableManager {
 	 * @see IStatus#OK
 	 */
 	public IStatus validateValue(IPath path);
+
+	/**
+	 * Validates the given path as the value for a path variable. A path
+	 * variable value must be a valid path that is absolute.
+	 *
+	 * @param path a possibly valid path variable value
+	 * @return a status object with code {@link IStatus#OK} if the given
+	 * path is a valid path variable value, otherwise a status object indicating
+	 * what is wrong with the value
+	 * @see IPath#isValidPath(String)
+	 * @see IStatus#OK
+	 * @since 3.6
+	 */
+	public IStatus validateValue(URI path);
+
+	/**
+	 * Returns a variable relative path equivalent to an absolute path for a
+	 * file or folder in the file system, according to the variables defined in
+	 * this project PathVariableManager. The file or folder need not to exist.
+	 * 
+	 * @param location
+	 *            a path in the local file system
+	 * @return the corresponding variable relative path, or <code>null</code>
+	 *         if no such path is available
+	 * @since 3.6
+	 */
+	public URI getVariableRelativePathLocation(URI location);
+
+	/**
+	 * Converts the internal format of the linked resource location if the PARENT
+	 * variables is used.  For example, if the value is "${PARENT-2-VAR}\foo", the
+	 * converted result is "${VAR}\..\..\foo".
+	 * @param value the value encoded using OS string (as returned from Path.toOSString())
+	 * @param locationFormat indicates whether the value contains a string that is stored in the linked resource location rather than in the path variable value
+	 * @return the converted path variable value
+	 * @since 3.6
+	 */
+	public String convertToUserEditableFormat(String value, boolean locationFormat);
+
+	/**
+	 * Converts the user editable format to the internal format.
+	 * For example, if the value is "${VAR}\..\..\foo", the
+	 * converted result is "${PARENT-2-VAR}\foo".
+	 * If the string is not directly convertible to a ${PARENT-COUNT-VAR}
+	 * syntax (for example, the editable string "${FOO}bar\..\..\"), intermediate
+	 * path variables will be created.
+	 * @param value the value encoded using OS string (as returned from Path.toOSString())
+	 * @param locationFormat indicates whether the value contains a string that is stored in the linked resource location rather than in the path variable value
+	 * @return the converted path variable value
+	 * @since 3.6
+	 */
+	public String convertFromUserEditableFormat(String value, boolean locationFormat);
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IProject.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IProject.java
index d816fbe..870f6d7 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IProject.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IProject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ * Francis Lynch (Wind River) - [301563] Save and load tree snapshots
  *******************************************************************************/
 package org.eclipse.core.resources;
 
+import java.net.URI;
+
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.content.IContentTypeMatcher;
@@ -42,6 +45,15 @@ import org.eclipse.core.runtime.content.IContentTypeMatcher;
  */
 public interface IProject extends IContainer, IAdaptable {
 	/**
+	 * Option constant (value 1) indicating that a snapshot to be
+	 * loaded or saved contains a resource tree (refresh information).
+	 * @see #loadSnapshot(int, URI, IProgressMonitor)
+	 * @see #saveSnapshot(int, URI, IProgressMonitor)
+	 * @since 3.6
+	 */
+	public static final int SNAPSHOT_TREE = 1;
+
+	/**
 	 * Invokes the <code>build</code> method of the specified builder 
 	 * for this project. Does nothing if this project is closed.  If this project
 	 * has multiple builders on its build spec matching the given name, only
@@ -569,6 +581,29 @@ public interface IProject extends IContainer, IAdaptable {
 	public boolean isOpen();
 
 	/**
+	 * Loads a snapshot of project meta-data from the given location URI.
+	 * Must be called after the project has been created, but before it is
+	 * opened. The options constant controls what kind of snapshot information
+	 * to load. Valid option values include:<ul>
+	 * <li>{@link IProject#SNAPSHOT_TREE} - load resource tree (refresh info)
+	 * </ul>
+	 * 
+	 * @param options kind of snapshot information to load
+	 * @param snapshotLocation URI to load from
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *		reporting is not desired
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li> The snapshot was not found at the specified URI.</li>
+	  * </ul>
+	 * @exception OperationCanceledException if the operation is canceled.
+	 * @see #saveSnapshot(int, URI, IProgressMonitor) 
+	 * @since 3.6
+	 */
+	public void loadSnapshot(int options, URI snapshotLocation,
+			IProgressMonitor monitor) throws CoreException;
+
+	/**
 	 * Renames this project so that it is located at the name in 
 	 * the given description.  
 	 * <p>
@@ -621,13 +656,21 @@ public interface IProject extends IContainer, IAdaptable {
 	 * of its resources from information stored on disk.
 	 * </p>
 	 * <p>
-	 * The <code>BACKGROUND_REFRESH</code> update flag controls how
-	 * this method behaves when a project is opened for the first time on a location
-	 * that has existing resources on disk.  If this flag is specified, resources on disk
-	 * will be added to the project in the background after this method returns.
-	 * Child resources of the project may not be available until this background
-	 * refresh completes. If this flag is not specified, resources on disk are added 
-	 * to the project in the foreground before this method returns.
+	 * When a project is opened for the first time, initial information about the
+	 * project's existing resources can be obtained in the following ways:
+	 * <ul>
+	 * <li>If a {@link #loadSnapshot(int, URI, IProgressMonitor)} call has been made
+	 * before the open, resources are restored from that file (a file written by
+	 * {@link #saveSnapshot(int, URI, IProgressMonitor)}). When the snapshot includes
+	 * resource tree information and can be loaded without error, no refresh is initiated,
+	 * so the project's resource tree will match what the snapshot provides.
+	 * <li>Otherwise, when the {@link IResource#BACKGROUND_REFRESH} flag is specified,
+	 * resources on disk will be added to the project in the background after
+	 * this method returns. Child resources of the project may not be available
+	 * until this background refresh completes.
+	 * <li>Otherwise, resource information is obtained with a refresh operation in the
+	 * foreground, before this method returns.
+	 * </ul>
 	 * </p>
 	 * This method changes resources; these changes will be reported
 	 * in a subsequent resource change event that includes
@@ -689,6 +732,28 @@ public interface IProject extends IContainer, IAdaptable {
 	public void open(IProgressMonitor monitor) throws CoreException;
 
 	/**
+	 * Writes a snapshot of project meta-data into the given location URI.
+	 * The options constant controls what kind of snapshot information to
+	 * write. Valid option values include:<ul>
+	 * <li>{@link IProject#SNAPSHOT_TREE} - save resource tree (refresh info)
+	 * </ul>
+	 * 
+	 * @param options kind of snapshot information to save
+	 * @param snapshotLocation URI for saving the snapshot to
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *		reporting is not desired
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li> The URI is not writable or an error occurs writing the data.</li>
+	  * </ul>
+	 * @exception OperationCanceledException if the operation is canceled. 
+	 * @see #loadSnapshot(int, URI, IProgressMonitor) 
+	 * @since 3.6
+	 */
+	public void saveSnapshot(int options, URI snapshotLocation,
+			IProgressMonitor monitor) throws CoreException;
+
+	/**
 	 * Changes this project resource to match the given project
 	 * description. This project should exist and be open.
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResource.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResource.java
index 088bce2..06c3f9e 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResource.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResource.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -9,6 +9,8 @@
  *     IBM Corporation - initial API and implementation
  *     Red Hat Incorporated - get/setResourceAttribute code
  *     Oakland Software Incorporated - added getSessionProperties and getPersistentProperties
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add hasFilters()
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.core.resources;
 
@@ -279,6 +281,15 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	 * @since 3.4
 	 */
 	public static final int HIDDEN = 0x1000;
+	
+	/**
+	 * Update flag constant (bit mask value 0x2000) indicating that a 
+	 * resource should be marked as a virtual resource.
+	 * 
+	 * @see IFolder#create(int, boolean, IProgressMonitor)
+	 * @since 3.6
+	 */
+	public static final int VIRTUAL = 0x2000;
 
 	/*====================================================================
 	 * Other constants:
@@ -1345,6 +1356,15 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	public String getName();
 
 	/**
+	 * Returns the path variable manager for this resource.
+	 * 
+	 * @return the path variable manager
+	 * @see IPathVariableManager
+	 * @since 3.6
+	 */
+	public IPathVariableManager getPathVariableManager();
+
+	/**
 	 * Returns the resource which is the parent of this resource,
 	 * or <code>null</code> if it has no parent (that is, this
 	 * resource is the workspace root).
@@ -1700,6 +1720,21 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	public boolean isLinked();
 
 	/**
+	 * Returns whether this resource is a virtual resource. Returns <code>true</code>
+	 * for folders that have been marked virtual using the {@link #VIRTUAL} update
+	 * flag.  Returns <code>false</code> in all other cases, including 
+	 * the case where this resource does not exist.  The workspace root, projects
+	 * and files currently cannot be made virtual.
+	 * 
+	 * @return <code>true</code> if this resource is virtual, and
+	 *         <code>false</code> otherwise
+	 * @see IFile#create(java.io.InputStream, int, IProgressMonitor)
+	 * @see #VIRTUAL
+	 * @since 3.6
+	 */
+	public boolean isVirtual();
+
+	/**
 	 * Returns <code>true</code> if this resource has been linked to 
 	 * a location other than the default location calculated by the platform. This
 	 * location can be outside the project's content area or another location
@@ -1707,7 +1742,7 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	 * the case where this resource does not exist.  The workspace root and 
 	 * projects are never linked.
 	 * <p>
-	 * This method returns true only for a resource that has been linked using
+	 * This method returns true for a resource that has been linked using
 	 * the <code>createLink</code> method.  
 	 * </p>
 	 * <p>
@@ -2323,10 +2358,68 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	 * </ul>
 	 * @see #isDerived()
 	 * @since 2.0
+	 * @deprecated Replaced by {@link #setDerived(boolean, IProgressMonitor)} which 
+	 * is a workspace operation and reports changes in resource deltas.
 	 */
 	public void setDerived(boolean isDerived) throws CoreException;
 
 	/**
+	 * Sets whether this resource subtree is marked as derived.
+	 * <p>
+	 * A <b>derived</b> resource is a regular file or folder that is
+	 * created in the course of translating, compiling, copying, or otherwise 
+	 * processing other files. Derived resources are not original data, and can be
+	 * recreated from other resources. It is commonplace to exclude derived 
+	 * resources from version and configuration management because they would
+	 * otherwise clutter the team repository with version of these ever-changing
+	 * files as each user regenerates them.
+	 * </p>
+	 * <p>
+	 * If a resource or any of its ancestors is marked as derived, a team 
+	 * provider should assume that the resource is not under version and
+	 * configuration management <i>by default</i>. That is, the resource
+	 * should only be stored in a team repository if the user explicitly indicates
+	 * that this resource is worth saving.
+	 * </p>
+	 * <p>
+	 * Newly-created resources are not marked as derived; rather, the mark must be
+	 * set explicitly using <code>setDerived(true, IProgressMonitor)</code>. Derived marks are maintained
+	 * in the in-memory resource tree, and are discarded when the resources are deleted.
+	 * Derived marks are saved to disk when a project is closed, or when the workspace
+	 * is saved.
+	 * </p>
+	 * <p>
+	 * Projects and the workspace root are never considered derived; attempts to
+	 * mark them as derived are ignored.
+	 * </p>
+	 * <p>
+	 * These changes will be reported in a subsequent resource change event, 
+	 * including an indication that this file's derived flag has changed.
+	 * </p>
+	 * <p>
+	 * This method is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * </p>
+	 * 
+	 * @param isDerived <code>true</code> if this resource is to be marked
+	 * 		as derived, and <code>false</code> otherwise
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 * 		reporting is not desired
+	 * @exception OperationCanceledException if the operation is canceled. 
+	 * 		Cancellation can occur even if no progress monitor is provided.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li> This resource does not exist.</li>
+	 * <li> Resource changes are disallowed during certain types of resource change 
+	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
+	 * </ul>
+	 * @see #isDerived()
+	 * @see IResourceRuleFactory#derivedRule(IResource)
+	 * @since 3.6
+	 */
+	public void setDerived(boolean isDerived, IProgressMonitor monitor) throws CoreException;
+	
+	/**
 	 * Sets whether this resource and its members are hidden in the resource tree.
 	 * <p>
 	 * Hidden resources are invisible to most clients. Newly-created resources 
@@ -2382,7 +2475,7 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	 * @exception CoreException if this method fails. Reasons include:
 	 * <ul>
 	 * <li> Resource changes are disallowed during certain types of resource change 
-	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
+	 *       event notification. See {@link IResourceChangeEvent} for more details.</li>
 	 * </ul>
 	 * @exception OperationCanceledException if the operation is canceled. 
 	 * Cancelation can occur even if no progress monitor is provided.
@@ -2590,6 +2683,4 @@ public interface IResource extends IAdaptable, ISchedulingRule {
 	 * @see IResourceDelta#DESCRIPTION
 	 */
 	public void touch(IProgressMonitor monitor) throws CoreException;
-	
-	
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceChangeEvent.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceChangeEvent.java
index aee9537..53f6bbd 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceChangeEvent.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceChangeEvent.java
@@ -22,12 +22,12 @@ import org.eclipse.core.runtime.IProgressMonitor;
  *    deletions and modifications to one or more resources expressed
  *    as a hierarchical resource delta. Event type is
  *    <code>PRE_BUILD</code>, and <code>getDelta</code> returns
- *    the hierarchical delta.  The resource delta is rooted at the 
- *    workspace root.  The <code>getBuildKind</code> method returns
+ *    the hierarchical delta rooted at the workspace root. 
+ *    The <code>getBuildKind</code> method returns
  *    the kind of build that is about to occur, and the <code>getSource</code>
  *    method returns the scope of the build (either the workspace or a single project).
  *    These events are broadcast to interested parties immediately 
- *    before each build operation.  If autobuilding is not enabled, these events still 
+ *    before each build operation. If autobuilding is not enabled, these events still 
  *    occur at times when autobuild would have occurred. The workspace is open 
  *    for change during notification of these events. The delta reported in this event 
  *    cycle is identical across all listeners registered for this type of event.
@@ -39,8 +39,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  *    deletions and modifications to one or more resources expressed
  *    as a hierarchical resource delta. Event type is
  *    <code>POST_BUILD</code>, and <code>getDelta</code> returns
- *    the hierarchical delta. The resource delta is rooted at the 
- *    workspace root.  The <code>getBuildKind</code> method returns
+ *    the hierarchical delta rooted at the workspace root.
+ *    The <code>getBuildKind</code> method returns
  *    the kind of build that occurred, and the <code>getSource</code>
  *    method returns the scope of the build (either the workspace or a single project).
  *    These events are broadcast to interested parties at the end of every build operation.
@@ -135,14 +135,13 @@ public interface IResourceChangeEvent {
 	public static final int PRE_AUTO_BUILD = 8;
 
 	/**
-	 * Event type constant (bit mask) indicating an before-the-fact 
-	 * report of creations, deletions, and modifications
-	 * to one or more resources expressed as a hierarchical
-	 * resource delta as returned by <code>getDelta</code>.
+	 * Event type constant (bit mask) indicating a before-the-fact 
+	 * report of a build. The event contains a hierarchical resource delta
+	 * as returned by <code>getDelta</code>.
 	 * See class comments for further details.
 	 *
-	 * @see #getType()
-	 * @see #getResource()
+	 * @see #getBuildKind()
+	 * @see #getSource()
 	 * @since 3.0
 	 */
 	public static final int PRE_BUILD = 8;
@@ -155,13 +154,12 @@ public interface IResourceChangeEvent {
 
 	/**
 	 * Event type constant (bit mask) indicating an after-the-fact 
-	 * report of creations, deletions, and modifications
-	 * to one or more resources expressed as a hierarchical
-	 * resource delta as returned by <code>getDelta</code>.
+	 * report of a build. The event contains a hierarchical resource delta
+	 * as returned by <code>getDelta</code>.
 	 * See class comments for further details.
 	 *
-	 * @see #getType()
-	 * @see #getResource()
+	 * @see #getBuildKind()
+	 * @see #getSource()
 	 * @since 3.0
 	 */
 	public static final int POST_BUILD = 16;
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceDelta.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceDelta.java
index 2c7ebc7..2d48b22 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceDelta.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceDelta.java
@@ -192,6 +192,14 @@ public interface IResourceDelta extends IAdaptable {
 	public static final int LOCAL_CHANGED = 0x200000;
 
 	/**
+	 * Change constant (bit mask) indicating that the derived flag of the resource has changed.
+	 * 
+	 * @see IResourceDelta#getFlags()
+	 * @since 3.6
+	 */
+	public static final int DERIVED_CHANGED = 0x400000;
+
+	/**
 	 * Accepts the given visitor.
 	 * The only kinds of resource deltas visited 
 	 * are <code>ADDED</code>, <code>REMOVED</code>, 
@@ -397,6 +405,8 @@ public interface IResourceDelta extends IAdaptable {
 	 * <li><code>CONTENT</code> - The bytes contained by the resource have 
 	 * 		been altered, or <code>IResource.touch</code> has been called on 
 	 * 		the resource.</li>
+	 * <li><code>DERIVED_CHANGED</code> - The derived flag of the resource has
+	 * been altered.</li>
 	 * <li><code>ENCODING</code> - The encoding of the resource may have been altered.
 	 * This flag is not set when the encoding changes due to the file being modified, 
 	 * or being moved.</li>
@@ -426,6 +436,12 @@ public interface IResourceDelta extends IAdaptable {
 	 * <li><code>MOVED_FROM</code> - The resource has moved.
 	 * 	<code>getMovedFromPath</code> will return the path of where it was moved from.</li>
 	 * </ul>
+	 * The following code is only used when describing potential changes using an {@link IResourceChangeDescriptionFactory}:
+	 * <ul>
+	 * <li><code>COPIED_FROM</code> - Change constant (bit mask) indicating that the resource was copied from another location.
+	 * The location in the "before" state can be retrieved using <code>getMovedFromPath()</code>.</li>
+	 * </ul>
+	 * 
 	 * A simple move operation would result in the following delta information.
 	 * If a resource is moved from A to B (with no other changes to A or B), 
 	 * then A will have kind <code>REMOVED</code>, with flag <code>MOVED_TO</code>, 
@@ -451,11 +467,14 @@ public interface IResourceDelta extends IAdaptable {
 	 *
 	 * @return the flags
 	 * @see IResourceDelta#CONTENT
+	 * @see IResourceDelta#DERIVED_CHANGED
 	 * @see IResourceDelta#DESCRIPTION
 	 * @see IResourceDelta#ENCODING
+	 * @see IResourceDelta#LOCAL_CHANGED
 	 * @see IResourceDelta#OPEN
 	 * @see IResourceDelta#MOVED_TO
 	 * @see IResourceDelta#MOVED_FROM
+	 * @see IResourceDelta#COPIED_FROM
 	 * @see IResourceDelta#TYPE
 	 * @see IResourceDelta#SYNC
 	 * @see IResourceDelta#MARKERS
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceFilterDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceFilterDescription.java
new file mode 100644
index 0000000..43a8d67
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceFilterDescription.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *     IBM - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.resources;
+
+import org.eclipse.core.runtime.*;
+
+/**
+ * A description of a resource filter.
+ * 
+ * A filter determines which file system objects will be visible when a local refresh is 
+ * performed for an IContainer.
+ *
+ * @see IContainer#getFilters()
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 3.6
+ */
+public interface IResourceFilterDescription {
+
+	/*====================================================================
+	 * Constants defining which members are wanted:
+	 *====================================================================*/
+
+	/**
+	 * Flag for resource filters indicating that the filter list includes only 
+	 * the files matching the filters. All INCLUDE_ONLY filters are applied to
+	 * the resource list with an logical OR operation.
+	 */
+	public static final int INCLUDE_ONLY = 1;
+
+	/**
+	 * Flag for resource filters indicating that the filter list excludes all
+	 * the files matching the filters.  All EXCLUDE_ALL filters are applied to
+	 * the resource list with an logical AND operation.
+	 */
+	public static final int EXCLUDE_ALL = 2;
+
+	/**
+	 * Flag for resource filters indicating that this filter applies to files.
+	 */
+	public static final int FILES = 4;
+
+	/**
+	 * Flag for resource filters indicating that this filter applies to folders.
+	 */
+	public static final int FOLDERS = 8;
+
+	/**
+	 * Flag for resource filters indicating that the container children of the
+	 * path inherit from this filter as well.
+	 */
+	public static final int INHERITABLE = 16;
+
+	/**
+	 * Returns the description of the file info matcher corresponding to this resource
+	 * filter.
+	 * @return the file info matcher description for this resource filter
+	 */
+	public FileInfoMatcherDescription getFileInfoMatcherDescription();
+
+	/**
+	 * Return the resource towards which this filter is set.
+	 * 
+	 * @return the resource towards which this filter is set
+	 */
+	public IResource getResource();
+
+	/**
+	 * Return the filter type, either INCLUDE_ONLY or EXCLUDE_ALL
+	 * 
+	 * @return (INCLUDE_ONLY or EXCLUDE_ALL) and/or INHERITABLE
+	 */
+	public int getType();
+	
+	/**
+	 * Deletes this filter description from its associated resource.
+	 * <p>
+	 * The {@link IResource#BACKGROUND_REFRESH} update flag controls when
+	 * changes to the resource hierarchy under this container resulting from the filter 
+	 * removal take effect. If this flag is specified, the resource hierarchy is updated in a 
+	 * separate thread after this method returns. If the flag is not specified, any resource 
+	 * changes resulting from the filter removal will occur before this method returns.
+	 * </p>
+	 * <p> 
+	 * This operation changes resources; these changes will be reported
+	 * in a subsequent resource change event that will include an indication 
+	 * of any resources that have been added as a result of the filter removal.
+	 * </p>
+	 * <p>
+	 * This operation is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * </p>
+	 * 
+	 * @param updateFlags bit-wise or of update flag constants
+	 *   ({@link IResource#BACKGROUND_REFRESH})
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @exception CoreException if this filter could not be removed. Reasons include:
+	 * <ul>
+	 * <li> Resource changes are disallowed during certain types of resource change 
+	 *       event notification. See <code>IResourceChangeEvent</code> for more details.</li>
+	 * </ul>
+	 * @exception OperationCanceledException if the operation is canceled. 
+	 * Cancelation can occur even if no progress monitor is provided.
+	 * @see IContainer#getFilters()
+	 * @see IContainer#createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)
+	 */
+	public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException;
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceRuleFactory.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceRuleFactory.java
index c16dd9d..493fb98 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceRuleFactory.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IResourceRuleFactory.java
@@ -65,11 +65,21 @@ public interface IResourceRuleFactory {
 	 * Returns the scheduling rule that is required for changing the charset 
 	 * setting for a file or the default charset setting for a container.
 	 *
-	 * @param resource the resource the charset will be changed
+	 * @param resource the resource for which the charset will be changed
 	 * @return a scheduling rule, or <code>null</code>
 	 * @since 3.1
 	 */
-	public ISchedulingRule charsetRule(IResource resource);	
+	public ISchedulingRule charsetRule(IResource resource);
+
+	/**
+	 * Returns the scheduling rule that is required for changing the derived flag
+	 * on a resource.
+	 *
+	 * @param resource the resource for which the derived flag will be changed
+	 * @return a scheduling rule, or <code>null</code>
+	 * @since 3.6
+	 */
+	public ISchedulingRule derivedRule(IResource resource);
 
 	/**
 	 * Returns the scheduling rule that is required for copying a resource.
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspace.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspace.java
index 20595fe..208cf9f 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspace.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -168,8 +168,33 @@ public interface IWorkspace extends IAdaptable {
 	 * </ul>
 	 * @see ISaveParticipant
 	 * @see #removeSaveParticipant(Plugin)
+	 * @deprecated Use {@link #addSaveParticipant(String, ISaveParticipant)} instead
 	 */
 	public ISavedState addSaveParticipant(Plugin plugin, ISaveParticipant participant) throws CoreException;
+	
+	/**
+	 * Registers the given plug-in's workspace save participant, and returns an
+	 * object describing the workspace state at the time of the last save in
+	 * which the bundle participated.
+	 * <p>
+	 * Once registered, the workspace save participant will actively participate
+	 * in the saving of this workspace.
+	 * </p>
+	 * 
+	 * @param pluginId the unique identifier of the plug-in
+	 * @param participant the participant
+	 * @return the last saved state in which the plug-in participated, or
+	 * <code>null</code> if the plug-in has not participated before
+	 * @exception CoreException if the method fails to add the participant.
+	 * Reasons include:
+	 * <ul>
+	 * <li>The previous state could not be recovered.</li>
+	 * </ul>
+	 * @see ISaveParticipant
+	 * @see #removeSaveParticipant(String)
+	 * @since 3.6
+	 */
+	public ISavedState addSaveParticipant(String pluginId, ISaveParticipant participant) throws CoreException;
 
 	/**
 	 * Builds all projects in this workspace. Projects are built in the order
@@ -601,6 +626,26 @@ public interface IWorkspace extends IAdaptable {
 	public void forgetSavedTree(String pluginId);
 
 	/**
+	 * Returns all filter matcher descriptors known to this workspace. Returns an empty
+	 * array if there are no installed filter matchers.
+	 * 
+	 * @return the filter matcher descriptors known to this workspace
+	 * @since 3.6
+	 */
+	public IFilterMatcherDescriptor[] getFilterMatcherDescriptors();
+
+	/**
+	 * Returns the filter descriptor with the given unique identifier, or
+	 * <code>null</code> if there is no such filter.
+	 * 
+	 * @param filterMatcherId the filter matcher extension identifier (e.g.
+	 * <code>"com.example.coolFilter"</code>).
+	 * @return the filter matcher descriptor, or <code>null</code>
+	 * @since 3.6
+	 */
+	public IFilterMatcherDescriptor getFilterMatcherDescriptor(String filterMatcherId);
+
+	/**
 	 * Returns all nature descriptors known to this workspace. Returns an empty
 	 * array if there are no installed natures.
 	 * 
@@ -915,8 +960,24 @@ public interface IWorkspace extends IAdaptable {
 	 * @param plugin the plug-in
 	 * @see ISaveParticipant
 	 * @see #addSaveParticipant(Plugin, ISaveParticipant)
+	 * @deprecated Use {@link #removeSaveParticipant(String)} instead
 	 */
 	public void removeSaveParticipant(Plugin plugin);
+	
+	/**
+	 * Removes the workspace save participant for the given plug-in from this
+	 * workspace. If no such participant is registered, no action is taken.
+	 * <p>
+	 * Once removed, the workspace save participant no longer actively
+	 * participates in any future saves of this workspace.
+	 * </p>
+	 * 
+	 * @param pluginId the unique identifier of the plug-in
+	 * @see ISaveParticipant
+	 * @see #addSaveParticipant(String, ISaveParticipant)
+	 * @since 3.6
+	 */
+	public void removeSaveParticipant(String pluginId);
 
 	/**
 	 * Runs the given action as an atomic workspace operation.
@@ -1224,7 +1285,8 @@ public interface IWorkspace extends IAdaptable {
 	 * 
 	 * @deprecated it is no longer possible to override the workspace lock
 	 * behavior. This functionality is now provided in the platform API by
-	 * subclassing the {@link LockListener} class.
+	 * subclassing the {@link LockListener} class. This API will be deleted
+	 * in a future release. See bug 311240 for details.
 	 */
 	public void setWorkspaceLock(WorkspaceLock lock);
 
@@ -1330,6 +1392,37 @@ public interface IWorkspace extends IAdaptable {
 	public IStatus validateEdit(IFile[] files, Object context);
 
 	/**
+	 * Validates that the given resource will not (or would not, if the resource
+	 * doesn't exist in the workspace yet) be filtered out from the workspace by
+	 * its parent resource filters.
+	 * <p>
+	 * Note that if the resource or its parent doesn't exist yet in the workspace, 
+	 * it is possible that it will still be effectively filtered out once the resource
+	 * and/or its parent is created, even though this method doesn't report it.
+	 * 
+	 * But if this method reports the resource as filtered, even though it, or its 
+	 * parent, doesn't exist in the workspace yet, it means that the resource will
+	 * be filtered out by its parent resource filters once it exists in the workspace.
+	 * </p>
+	 * <p>
+	 * This method will return a status with severity <code>IStatus.ERROR</code>
+	 * if the resource will be filtered out - removed - out of the workspace by 
+	 * its parent resource filters. 
+	 * </p>
+	 * <p>
+	 * Note: linked resources and virtual folders are never filtered out by their
+	 * parent resource filters.
+	 * 
+	 * @param resource the resource to validate the location for
+	 * @return a status object with code <code>IStatus.OK</code> if the given
+	 * resource is not filtered by its parent resource filters, otherwise a status
+	 * object with severity <code>IStatus.ERROR</code> indicating that it will
+	 * @see IStatus#OK
+	 * @since 3.6
+	 */
+	public IStatus validateFiltered(IResource resource);
+
+	/**
 	 * Validates the given path as the location of the given resource on disk.
 	 * The path must be either an absolute file system path, or a relative path
 	 * whose first segment is the name of a defined workspace path variable. In
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspaceDescription.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspaceDescription.java
index 0bfef03..bde0221 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspaceDescription.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IWorkspaceDescription.java
@@ -38,11 +38,13 @@ public interface IWorkspaceDescription {
 
 	/**
 	 * Returns the maximum length of time, in milliseconds, a file state should be 
-	 * kept in the local history.  
-	 *
+	 * kept in the local history. This setting is ignored by the workspace when
+	 * <code>isApplyFileStatePolicy()</code> returns <code>false</code>.
+	 * 
 	 * @return the maximum time a file state should be kept in the local history
 	 *   represented in milliseconds
 	 * @see #setFileStateLongevity(long)
+	 * @see #isApplyFileStatePolicy()
 	 * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
 	 */
 	public long getFileStateLongevity();
@@ -61,24 +63,45 @@ public interface IWorkspaceDescription {
 
 	/**
 	 * Returns the maximum number of states per file that can be stored in the local history.
+	 * This setting is ignored by the workspace when <code>isApplyFileStatePolicy()</code>
+	 * returns <code>false</code>.
 	 *
 	 * @return the maximum number of states per file that can be stored in the local history
 	 * @see #setMaxFileStates(int)
+	 * @see #isApplyFileStatePolicy()
 	 * @see ResourcesPlugin#PREF_MAX_FILE_STATES
 	 */
 	public int getMaxFileStates();
 
 	/**
 	 * Returns the maximum permitted size of a file, in bytes, to be stored in the
-	 * local history.
+	 * local history. This setting is ignored by the workspace when 
+	 * <code>isApplyFileStatePolicy()</code> returns <code>false</code>.
 	 *
 	 * @return the maximum permitted size of a file to be stored in the local history
 	 * @see #setMaxFileStateSize(long)
+	 * @see #isApplyFileStatePolicy()
 	 * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
 	 */
 	public long getMaxFileStateSize();
 
 	/**
+	 * Returns whether file states are discarded according to the policy specified by
+	 * <code>setFileStateLongevity(long)</code>, <code>setMaxFileStates(int)</code>
+	 * and <code>setMaxFileStateSize(long)</code> methods. 
+	 * 
+	 * @return <code>true</code> if file states are removed due to the policy, 
+	 * 		<code>false</code> otherwise
+	 * @see #setApplyFileStatePolicy(boolean)
+	 * @see #setFileStateLongevity(long)
+	 * @see #setMaxFileStates(int)
+	 * @see #setMaxFileStateSize(long)
+	 * @see ResourcesPlugin#PREF_APPLY_FILE_STATE_POLICY
+	 * @since 3.6
+	 */
+	public boolean isApplyFileStatePolicy();
+
+	/**
 	 * Returns the interval between automatic workspace snapshots.
 	 *
 	 * @return the amount of time in milliseconds between automatic workspace snapshots
@@ -138,7 +161,8 @@ public interface IWorkspaceDescription {
 
 	/**
 	 * Sets the maximum time, in milliseconds, a file state should be kept in the
-	 * local history.
+	 * local history. This setting is ignored by the workspace when <code>setApplyFileStatePolicy(boolean)
+	 * </code> is set to false.
 	 * <p>
 	 * Users must call <code>IWorkspace.setDescription</code> before changes 
 	 * made to this description take effect.
@@ -148,6 +172,7 @@ public interface IWorkspaceDescription {
 	 * 		kept in the local history
 	 * @see IWorkspace#setDescription(IWorkspaceDescription)
 	 * @see #getFileStateLongevity()
+	 * @see #setApplyFileStatePolicy(boolean)
 	 * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
 	 */
 	public void setFileStateLongevity(long time);
@@ -172,7 +197,8 @@ public interface IWorkspaceDescription {
 	/**
 	 * Sets the maximum number of states per file that can be stored in the local history.
 	 * If the maximum number is reached, older states are removed in favor of
-	 * new ones.
+	 * new ones. This setting is ignored by the workspace when <code>setApplyFileStatePolicy(boolean)
+	 * </code> is set to <code>false</code>.
 	 * <p>
 	 * Users must call <code>IWorkspace.setDescription</code> before changes 
 	 * made to this description take effect.
@@ -181,13 +207,15 @@ public interface IWorkspaceDescription {
 	 * @param number the maximum number of states per file that can be stored in the local history
 	 * @see IWorkspace#setDescription(IWorkspaceDescription)
 	 * @see #getMaxFileStates()
+	 * @see #setApplyFileStatePolicy(boolean)
 	 * @see ResourcesPlugin#PREF_MAX_FILE_STATES
 	 */
 	public void setMaxFileStates(int number);
 
 	/**
-	 * Sets the maximum permitted size of a file, in bytes,  to be stored in the
-	 * local history.
+	 * Sets the maximum permitted size of a file, in bytes, to be stored in the
+	 * local history. This setting is ignored by the workspace when <code>setApplyFileStatePolicy(boolean)
+	 * </code> is set to <code>false</code>.
 	 * <p>
 	 * Users must call <code>IWorkspace.setDescription</code> before changes 
 	 * made to this description take effect.
@@ -196,11 +224,33 @@ public interface IWorkspaceDescription {
 	 * @param size the maximum permitted size of a file to be stored in the local history
 	 * @see IWorkspace#setDescription(IWorkspaceDescription)
 	 * @see #getMaxFileStateSize()
+	 * @see #setApplyFileStatePolicy(boolean)
 	 * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
 	 */
 	public void setMaxFileStateSize(long size);
 
 	/**
+	 * Sets whether file states are discarded according to the policy specified by
+	 * <code>setFileStateLongevity(long)</code>, <code>setMaxFileStates(int)</code>
+	 * and <code>setMaxFileStateSize(long)</code> methods.
+	 * <p>
+	 * Users must call <code>IWorkspace.setDescription</code> before changes 
+	 * made to this description take effect.
+	 * </p>
+	 *
+	 * @param apply <code>true</code> if file states are removed due to the policy, 
+	 * 		<code>false</code> otherwise
+	 * @see IWorkspace#setDescription(IWorkspaceDescription)
+	 * @see #setFileStateLongevity(long)
+	 * @see #setMaxFileStates(int)
+	 * @see #setMaxFileStateSize(long)
+	 * @see #isApplyFileStatePolicy()
+	 * @see ResourcesPlugin#PREF_APPLY_FILE_STATE_POLICY
+	 * @since 3.6
+	 */
+	public void setApplyFileStatePolicy(boolean apply);
+
+	/**
 	 * Sets the interval between automatic workspace snapshots.  The new interval
 	 * will only take effect after the next snapshot.
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java
index bf1895b..35f7ec2 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/IncrementalProjectBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,9 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Anton Leherbauer (Wind River) - [198591] Allow Builder to specify scheduling rule
+ * Anton Leherbauer (Wind River) - [305858] Allow Builder to return null rule
+ * James Blackburn (Broadcom) - [306822] Provide Context for Builder getRule()
  *******************************************************************************/
 package org.eclipse.core.resources;
 
@@ -227,6 +230,12 @@ public abstract class IncrementalProjectBuilder extends InternalBuilder implemen
 	 * build. The delta returned will be valid only for the duration of the
 	 * enclosing build execution.
 	 * </p>
+	 * <p>
+	 * The delta does not include changes made while this builder is running.
+	 * If {@link #getRule(int, Map)} is overridden to return a scheduling rule other than 
+	 * the workspace root, changes performed in other threads during the build
+	 * will not appear in the resource delta.
+	 * </p>
 	 * 
 	 * @return the resource delta for the project or <code>null</code>
 	 */
@@ -341,17 +350,75 @@ public abstract class IncrementalProjectBuilder extends InternalBuilder implemen
 	protected void startupOnInitialize() {
 		// reserved for future use
 	}
-	
+
 	/**
 	 * Returns the scheduling rule that is required for building 
 	 * the project for which this builder is defined. The default 
 	 * is the workspace root rule.
 	 * 
-	 * @return scheduling rule
-	 * 
+	 * @return a scheduling rule which is contained in the workspace root rule or <code>null</code>
 	 * @since 3.5
+	 * @see #getRule(int, Map)
+	 * @deprecated clients should call and override {@link #getRule(int, Map)} instead.
 	 */
 	public ISchedulingRule getRule() {
 		return ResourcesPlugin.getWorkspace().getRoot();
 	}
+
+	/**
+	 * Returns the scheduling rule that is required for building 
+	 * the project for which this builder is defined. The default 
+	 * is {@link #getRule()}, which returns the workspace root 
+	 * rule unless overridden.
+	 * <p>
+	 * The scheduling rule determines which resources in the workspace are 
+	 * protected from being modified by other threads while the builder is running. Up until
+	 * Eclipse 3.5, the entire workspace was always locked during a build;
+	 * since Eclipse 3.6, builders can allow resources outside their scheduling
+	 * rule to be modified.
+	 * <p>
+	 * <strong>Notes:</strong>
+	 * <ul>
+	 * <li>
+	 * If the builder rule is non-<code>null</code> it must be "contained" in the workspace root rule.
+	 * I.e. {@link ISchedulingRule#contains(ISchedulingRule)} must return 
+	 * <code>true</code> when invoked on the workspace root with the builder rule.
+	 * </li>
+	 * <li>
+	 * The rule returned here may have no effect if the build is invoked within the 
+	 * scope of another operation that locks the entire workspace.
+     * </li>
+     * <li>
+	 * If this method returns any rule other than the workspace root,
+	 * resources outside of the rule scope can be modified concurrently with the build. 
+	 * The delta returned by {@link #getDelta(IProject)} for any project
+	 * outside the scope of the builder's rule may not contain changes that occurred 
+	 * concurrently with the build.
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * Subclasses may override this method.
+	 * </p>
+	 * @noreference This method is not intended to be referenced by clients.
+	 * 
+	 * @param kind the kind of build being requested. Valid values include:
+	 * <ul>
+	 * <li>{@link #FULL_BUILD} - indicates a full build.</li>
+	 * <li>{@link #INCREMENTAL_BUILD} - indicates an incremental build.</li>
+	 * <li>{@link #AUTO_BUILD} - indicates an automatically triggered
+	 * incremental build (autobuilding on).</li>
+	 * <li>{@link #CLEAN_BUILD} - indicates a clean request.</li>
+	 * </ul>
+	 * @param args a table of builder-specific arguments keyed by argument name
+	 * (key type: <code>String</code>, value type: <code>String</code>);
+	 * <code>null</code> is equivalent to an empty map.
+	 * @return a scheduling rule which is contained in the workspace root rule 
+	 *   or <code>null</code> to indicate that no protection against resource
+	 *   modification during the build is needed.
+	 * 
+	 * @since 3.6
+	 */
+	public ISchedulingRule getRule(int kind, Map args) {
+		return getRule();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourceAttributes.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourceAttributes.java
index 66af54a..3c97408 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourceAttributes.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourceAttributes.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 Red Hat Incorporated and others
+ * Copyright (c) 2004, 2010 Red Hat Incorporated and others
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -103,7 +103,7 @@ public class ResourceAttributes {
 	}
 
 	/**
-	 * Returns whether this ResourceAttributes object is marked read only.
+	 * Returns whether this ResourceAttributes object is marked as symbolic link.
 	 *
 	 * @return <code>true</code> if this resource is marked as symbolic link, 
 	 *		<code>false</code> otherwise
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
index 5171ef7..63dbfc4 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
@@ -7,6 +7,8 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] add PT_FILTER_PROVIDERS
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] add PT_VARIABLE_PROVIDERS
  *******************************************************************************/
 package org.eclipse.core.resources;
 
@@ -95,6 +97,22 @@ public final class ResourcesPlugin extends Plugin {
 	public static final String PT_MODEL_PROVIDERS = "modelProviders"; //$NON-NLS-1$
 	
 	/**
+	 * Simple identifier constant (value <code>"variableProviders"</code>)
+	 * for the variable providers extension point.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PT_VARIABLE_PROVIDERS = "variableResolvers"; //$NON-NLS-1$
+
+	/**
+	 * Simple identifier constant (value <code>"filterMatchers"</code>)
+	 * for the filter matchers extension point.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PT_FILTER_MATCHERS = "filterMatchers"; //$NON-NLS-1$
+
+	/**
 	 * Constant identifying the job family identifier for the background autobuild job.
 	 * 
 	 * @see IJobManager#join(Object, IProgressMonitor)
@@ -203,6 +221,15 @@ public final class ResourcesPlugin extends Plugin {
 	public static final String PREF_MAX_BUILD_ITERATIONS = PREF_DESCRIPTION_PREFIX + "maxbuilditerations"; //$NON-NLS-1$
 
 	/**
+	 * Name of a preference for configuring whether to apply the specified history size policy.
+	 * 
+	 * @see IWorkspaceDescription#isApplyFileStatePolicy()
+	 * @see IWorkspaceDescription#setApplyFileStatePolicy(boolean)
+	 * @since 3.6
+	 */
+	public static final String PREF_APPLY_FILE_STATE_POLICY = PREF_DESCRIPTION_PREFIX + "applyfilestatepolicy"; //$NON-NLS-1$
+
+	/**
 	 * Name of a preference for configuring the maximum number of milliseconds a
 	 * file state should be kept in the local history
 	 * 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/WorkspaceLock.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/WorkspaceLock.java
index 3cf04ab..fd1c7e8 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/WorkspaceLock.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/WorkspaceLock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,8 @@ import org.eclipse.core.runtime.CoreException;
  * @see IWorkspace#setWorkspaceLock(WorkspaceLock)
  * @deprecated it is no longer possible to override the workspace lock behavior.
  * This functionality is now provided in the platform API by implementing the
- * org.eclipse.core.runtime.jobs.ILockListener interface.
+ * org.eclipse.core.runtime.jobs.ILockListener interface. This API will be deleted
+ * in a future release. See bug 311240 for details.
  */
 public class WorkspaceLock {
 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/AbstractFileInfoMatcher.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/AbstractFileInfoMatcher.java
new file mode 100644
index 0000000..334e797
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/AbstractFileInfoMatcher.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp(Freescale Semiconductor) - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.resources.filtermatchers;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.provider.FileInfo;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * The abstract base class for all file info matchers. Instances
+ * of this class are provided using the <tt>org.eclipse.core.resources.filterMatchers</tt>
+ * extension point.
+ * 
+ * @since 3.6
+ */
+public abstract class AbstractFileInfoMatcher {
+
+	/**
+	 * Tests the given {@link FileInfo}
+	 * 
+	 * @param parent the parent container
+	 * @param fileInfo the {@link FileInfo} object to test
+	 * @return <code>true</code> if the given {@link FileInfo} matches,
+	 * and <code>false</code> otherwise.
+	 * @throws CoreException the implementor should throw a CoreException if, 
+	 * 		in the case that the parent or fileInfo doesn't exist in the workspace
+	 * 		or in the file system, the return value can't be determined.
+	 */
+	public abstract boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException;
+
+	/**
+	 * Sets initialization data for this matcher.
+	 * @param project
+	 * @param arguments
+	 * @throws CoreException if initialization failed
+	 */
+	public abstract void initialize(IProject project, Object arguments) throws CoreException;
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/CompoundFileInfoMatcher.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/CompoundFileInfoMatcher.java
new file mode 100644
index 0000000..62e3d62
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/CompoundFileInfoMatcher.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.core.resources.filtermatchers;
+
+import org.eclipse.core.internal.resources.FilterDescriptor;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Resource Filter Type allowing serializing sub filters as the arguments
+ * @since 3.6
+ */
+public abstract class CompoundFileInfoMatcher extends AbstractFileInfoMatcher {
+
+	protected AbstractFileInfoMatcher[] matchers;
+
+	private AbstractFileInfoMatcher instantiate(IProject project, FileInfoMatcherDescription filter) throws CoreException {
+		IFilterMatcherDescriptor desc = project.getWorkspace().getFilterMatcherDescriptor(filter.getId());
+		if (desc != null) {
+			AbstractFileInfoMatcher matcher = ((FilterDescriptor) desc).createFilter();
+			matcher.initialize(project, filter.getArguments());
+			return matcher;
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.resources.AbstractFileInfoMatcher#initialize(org.eclipse
+	 * .core.resources.IProject, java.lang.Object)
+	 */
+	public final void initialize(IProject project, Object arguments) throws CoreException {
+		FileInfoMatcherDescription[] filters = (FileInfoMatcherDescription[]) arguments;
+		matchers = new AbstractFileInfoMatcher[filters != null ? filters.length : 0];
+		for (int i = 0; i < matchers.length; i++)
+			matchers[i] = instantiate(project, filters[i]);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/package.html b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/package.html
new file mode 100644
index 0000000..7f43f8e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/filtermatchers/package.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides APIs intended to be implemented by the resource filter matchers.
+
+<h2>Package Specification</h2>
+<p>
+This package specifies the APIs in the Resources plug-in that are intended 
+to be implemented and used by plug-ins using the <tt>filterMatchers</tt> extension point.
+<p>
+ at since 3.6
+<p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/mapping/ModelProvider.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/mapping/ModelProvider.java
index 9dac940..7321886 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/mapping/ModelProvider.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/mapping/ModelProvider.java
@@ -104,7 +104,7 @@ public abstract class ModelProvider extends PlatformObject {
 	 * By default, an empty array is returned. Subclass may override
 	 * this method but should consider overriding either 
 	 * {@link #getMappings(IResource[], ResourceMappingContext, IProgressMonitor)}
-	 * or ({@link #getMappings(ResourceTraversal[], ResourceMappingContext, IProgressMonitor)}
+	 * or {@link #getMappings(ResourceTraversal[], ResourceMappingContext, IProgressMonitor)}
 	 * if more context is needed to determine the proper mappings.
 	 * 
 	 * @param resource the resource
@@ -150,7 +150,7 @@ public abstract class ModelProvider extends PlatformObject {
 	 * This method is used to map operations on resources to
 	 * operations on resource mappings. By default, this method
 	 * calls {@link #getMappings(IResource[], ResourceMappingContext, IProgressMonitor)}
-	 * with the resources extract from each traversal.
+	 * with the resources extracted from each traversal.
 	 * <p>
 	 * Subclasses may override this method.
 	 * </p>
@@ -219,6 +219,7 @@ public abstract class ModelProvider extends PlatformObject {
 	 * can override that method if they need to do additional initialization.
 	 * 
 	 * @param desc the description of the provider as it appears in the plugin manifest
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public final void init(IModelProviderDescriptor desc) {
 		if (descriptor != null)
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/team/ResourceRuleFactory.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/team/ResourceRuleFactory.java
index e40eb17..336e2b4 100644
--- a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/team/ResourceRuleFactory.java
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/team/ResourceRuleFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,6 +68,20 @@ public class ResourceRuleFactory implements IResourceRuleFactory {
 	}
 
 	/**
+	 * Default implementation of <code>IResourceRuleFactory#derivedRule</code>.
+	 * This default implementation always returns <code>null</code>.
+	 * <p>
+	 * Subclasses may not currently override this method.
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
+	 * @see org.eclipse.core.resources.IResourceRuleFactory#derivedRule(IResource)
+	 * @since 3.6
+	 */
+	public final ISchedulingRule derivedRule(IResource resource) {
+		return null;
+	}
+
+	/**
 	 * Default implementation of <code>IResourceRuleFactory#copyRule</code>.
 	 * This default implementation always returns the parent of the destination
 	 * resource. 
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/PathVariableResolver.java b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/PathVariableResolver.java
new file mode 100644
index 0000000..341c0a8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/PathVariableResolver.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.core.resources.variableresolvers;
+
+import org.eclipse.core.resources.IResource;
+
+/**
+ * An interface that variable providers should implement in order
+ * to extends the default path variable list used to resolve relative
+ * locations of linked resources.
+ * @since 3.6
+ */
+public abstract class PathVariableResolver {
+
+	/**
+	 * This method can return a list of possible variables resolved by
+	 * this resolver.
+	 * <p>
+	 * This default implementation always returns <code>null</code>. Subclasses
+	 * should override to provide custom extensions.
+	 * </p>
+	 * 
+	 * @param variable
+	 *            The current variable name.
+	 * @param resource
+	 *            The resource that the variable is being resolved for.
+	 * @return the list of supported variables
+	 */
+	public String[] getVariableNames(String variable, IResource resource) {
+		return null;
+	}
+
+	/**
+	 * Returns a variable value
+	 * 
+	 * @param variable
+	 *            The current variable name.
+	 * @param resource
+	 *            The resource that the variable is being resolved for.
+	 * @return the variable value.
+	 */
+	public abstract String getValue(String variable, IResource resource);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/package.html b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/package.html
new file mode 100644
index 0000000..6a477ad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.resources/src/org/eclipse/core/resources/variableresolvers/package.html
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides APIs intended to be implemented by the path variable providers.
+
+<h2>Package Specification</h2>
+<p>
+This package specifies the APIs in the Resources plug-in that are intended 
+to be implemented and used by plug-ins using the <tt>variableResolvers</tt> extension point.
+<p>
+ at since 3.6
+<p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/META-INF/MANIFEST.MF
index 6ebbc5c..321e2f8 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.runtime.compatibility.auth
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Import-Package: org.eclipse.osgi.framework.log,
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/src/org/eclipse/core/internal/runtime/auth/AuthorizationDatabase.java b/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/src/org/eclipse/core/internal/runtime/auth/AuthorizationDatabase.java
index 8e201b4..e96eb81 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/src/org/eclipse/core/internal/runtime/auth/AuthorizationDatabase.java
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.auth/src/org/eclipse/core/internal/runtime/auth/AuthorizationDatabase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -91,7 +91,7 @@ public class AuthorizationDatabase {
 		Assert.isNotNull(filename);
 		Assert.isNotNull(password);
 		this.password = password;
-		file = new File(filename);
+		file = new File(filename).getAbsoluteFile();
 		load();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/.settings/.api_filters b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/.settings/.api_filters
new file mode 100644
index 0000000..687a301
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/.settings/.api_filters
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component id="org.eclipse.core.runtime.compatibility.registry" version="2">
+    <resource path="src/org/eclipse/core/runtime/IExtension.java" type="org.eclipse.core.runtime.IExtension">
+        <filter id="403853384">
+            <message_arguments>
+                <message_argument value="org.eclipse.core.runtime.IExtension"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/core/runtime/IExtensionPoint.java" type="org.eclipse.core.runtime.IExtensionPoint">
+        <filter id="403853384">
+            <message_arguments>
+                <message_argument value="org.eclipse.core.runtime.IExtensionPoint"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/META-INF/MANIFEST.MF
index 1aa7ff3..477ece4 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.runtime.compatibility.registry
-Bundle-Version: 3.2.200.qualifier
+Bundle-Version: 3.3.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.equinox.registry;bundle-version="[3.3.0,3.5.0)"
+Fragment-Host: org.eclipse.equinox.registry;bundle-version="[3.5.0,3.6.0)"
 Bundle-Localization: fragment
 Eclipse-PatchFragment: true
 Bundle-ClassPath: runtime_registry_compatibility.jar
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtension.java b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtension.java
index 6e37f84..16b634d 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtension.java
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtension.java
@@ -106,6 +106,27 @@ public interface IExtension {
 	public String getLabel() throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns a displayable label for this 
+	 * extension in the specified locale. Returns the empty string if no label for this extension
+	 * is specified in the plug-in manifest file.
+	 * <p> 
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getLabel()}.
+	 * </p>
+	 * @param locale the requested locale
+	 * @return a displayable string label for this extension,
+	 *    possibly the empty string
+	 * @throws InvalidRegistryObjectException if this extension is no longer valid
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since 3.5
+	 */
+	public String getLabel(String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns the simple identifier of this extension, or <code>null</code>
 	 * if this extension does not have an identifier.
 	 * This identifier is specified in the plug-in manifest (<code>plugin.xml</code>) 
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtensionPoint.java b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
index 3a8858d..a4e397d 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
@@ -120,6 +120,28 @@ public interface IExtensionPoint {
 	public String getLabel() throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns a displayable label 
+	 * for this extension point in the specified locale.
+	 * Returns the empty string if no label for this extension point
+	 * is specified in the plug-in manifest file.
+	 * <p> 
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getLabel()}.
+	 * </p>
+	 * @param locale the requested locale
+	 * @return a displayable string label for this extension point,
+	 *    possibly the empty string
+	 * @throws InvalidRegistryObjectException if this extension point is no longer valid
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since 3.5
+	 */
+	public String getLabel(String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns reference to the extension point schema. The schema 
 	 * reference is returned as a URL path relative to the plug-in 
 	 * installation URL. 
diff --git a/eclipse/plugins/org.eclipse.core.runtime.compatibility/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.runtime.compatibility/META-INF/MANIFEST.MF
index 04b35e8..a1426ac 100644
--- a/eclipse/plugins/org.eclipse.core.runtime.compatibility/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.runtime.compatibility/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
 Bundle-SymbolicName: org.eclipse.core.runtime.compatibility; singleton:=true
 Bundle-Vendor: %providerName
 Bundle-Activator: org.eclipse.core.internal.plugins.CompatibilityActivator
diff --git a/eclipse/plugins/org.eclipse.core.runtime/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.runtime/META-INF/MANIFEST.MF
index 4e2e0de..51b32d7 100644
--- a/eclipse/plugins/org.eclipse.core.runtime/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.runtime/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-SymbolicName: org.eclipse.core.runtime; singleton:=true
 Bundle-Vendor: %providerName
 Bundle-Activator: org.eclipse.core.internal.runtime.PlatformActivator
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.osgi;bundle-version="[3.5.0,4.0.0)";visibility:=reex
  org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
  org.eclipse.core.jobs;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
  org.eclipse.equinox.registry;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
- org.eclipse.equinox.preferences;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
+ org.eclipse.equinox.preferences;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
  org.eclipse.core.contenttype;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
  org.eclipse.core.runtime.compatibility.auth;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.equinox.app;bundle-version="[1.0.0,2.0.0)";visibility:=reexport
diff --git a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
index 5820520..e9fb558 100644
--- a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
+++ b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/PlatformActivator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@ import org.osgi.framework.*;
  */
 public class PlatformActivator extends Plugin implements BundleActivator {
 	private static BundleContext context;
-	private ServiceRegistration entryLocatorRegistration;
 
 	public static BundleContext getContext() {
 		return context;
@@ -35,8 +34,6 @@ public class PlatformActivator extends Plugin implements BundleActivator {
 	}
 
 	public void stop(BundleContext runtimeContext) {
-		// unregister the EntryLocator to prevent the Framework from calling it
-		unregisterEntryLocator();
 		// Stop the platform orderly.		
 		InternalPlatform.getDefault().stop(runtimeContext);
 		InternalPlatform.getDefault().setRuntimeInstance(null);
@@ -46,11 +43,4 @@ public class PlatformActivator extends Plugin implements BundleActivator {
 		// just using a class out of app admin to force it to lazy-start
 		CommandLineArgs.getApplicationArgs();
 	}
-
-	private void unregisterEntryLocator() {
-		if (entryLocatorRegistration != null) {
-			entryLocatorRegistration.unregister();
-			entryLocatorRegistration = null;
-		}
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
index 76dada2..4f17da5 100644
--- a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
+++ b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/PerformanceStats.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -254,7 +254,6 @@ public class PerformanceStats {
 		PrintWriter writer = new PrintWriter(System.out);
 		PerformanceStatsProcessor.printStats(writer);
 		writer.flush();
-		writer.close();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
index a4311e5..dcbc2a7 100644
--- a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
+++ b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
@@ -901,13 +901,16 @@ public final class Platform {
 
 	/**
 	 * Returns the extension registry for this platform.
-	 *
+	 * <p>
+	 * Note this method is purely a convenience and {@link RegistryFactory#getRegistry()}
+	 * should generally be used instead.
+	 * </p>
 	 * @return the extension registry
 	 * @see IExtensionRegistry
 	 * @since 3.0
 	 */
 	public static IExtensionRegistry getExtensionRegistry() {
-		return InternalPlatform.getDefault().getRegistry();
+		return RegistryFactory.getRegistry();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
index f347d52..0135354 100644
--- a/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
+++ b/eclipse/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Plugin.java
@@ -542,14 +542,19 @@ public abstract class Plugin implements BundleActivator {
 	 * XXX deprecate use the service and cache as needed
 	 */
 	public void setDebugging(boolean value) {
-		if (bundle == null)
+		if (bundle == null) {
 			this.debug = value;
+			return;
+		}
 		String key = bundle.getSymbolicName() + "/debug"; //$NON-NLS-1$
 		final DebugOptions options = getDebugOptions();
 		if (options == null)
 			this.debug = value;
-		else
+		else {
+			if (!options.isDebugEnabled())
+				options.setDebugEnabled(true);
 			options.setOption(key, value ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
+		}
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.core.variables/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.core.variables/META-INF/MANIFEST.MF
index eb43f80..906536f 100644
--- a/eclipse/plugins/org.eclipse.core.variables/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.core.variables/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.variables; singleton:=true
-Bundle-Version: 3.2.200.qualifier
+Bundle-Version: 3.2.400.qualifier
 Bundle-Activator: org.eclipse.core.variables.VariablesPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.core.variables/plugin.xml b/eclipse/plugins/org.eclipse.core.variables/plugin.xml
index 38ae466..4e14563 100644
--- a/eclipse/plugins/org.eclipse.core.variables/plugin.xml
+++ b/eclipse/plugins/org.eclipse.core.variables/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java b/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
index 17ca4a1..ac5e100 100644
--- a/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
+++ b/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/EclipseHomeVariableResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ package org.eclipse.core.internal.variables;
 import java.net.URL;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IDynamicVariableResolver;
@@ -31,7 +33,17 @@ public class EclipseHomeVariableResolver implements IDynamicVariableResolver {
         if (installLocation != null) {
             URL url = installLocation.getURL();
             if (url != null) {
-                String file = url.getFile();
+            	
+				// Try to convert the URL to an OS string, to be consistent with
+				// how other variables, like ${workspace_loc} resolve. See
+				// ResourceResolver.translateToValue(). [bugzilla 263535]
+            	String file = url.getFile();
+            	IPath path = Path.fromOSString(file);
+            	String osstr = path.toOSString();
+            	if (osstr.length() != 0) {
+            		return osstr;
+            	}
+
                 if (file.length() != 0) {
                     return file;
                 }
diff --git a/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java b/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
index fe3e8d6..e015008 100644
--- a/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
+++ b/eclipse/plugins/org.eclipse.core.variables/src/org/eclipse/core/internal/variables/StringVariableManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
@@ -39,11 +38,12 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IStringVariable;
 import org.eclipse.core.variables.IStringVariableManager;
@@ -51,17 +51,17 @@ import org.eclipse.core.variables.IValueVariable;
 import org.eclipse.core.variables.IValueVariableListener;
 import org.eclipse.core.variables.VariablesPlugin;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.service.prefs.BackingStoreException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * Singleton string variable manager. 
  */
-public class StringVariableManager implements IStringVariableManager, IPropertyChangeListener {
+public class StringVariableManager implements IStringVariableManager, IPreferenceChangeListener {
 	
 	/**
 	 * Dynamic variables - maps variable names to variables.
@@ -205,7 +205,7 @@ public class StringVariableManager implements IStringVariableManager, IPropertyC
 			loadContributedValueVariables();
 			loadPersistedValueVariables();
 			loadDynamicVariables();
-			VariablesPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this);
+			new InstanceScope().getNode(VariablesPlugin.PI_CORE_VARIABLES).addPreferenceChangeListener(this);
 			fInternalChange = false;
 		}
 	}
@@ -270,30 +270,18 @@ public class StringVariableManager implements IStringVariableManager, IPropertyC
 	 * b) the variable is read-only.
 	 */
 	private void loadPersistedValueVariables() {
-		String variablesString= VariablesPlugin.getDefault().getPluginPreferences().getString(PREF_VALUE_VARIABLES);
+		String variablesString = Platform.getPreferencesService().getString(VariablesPlugin.PI_CORE_VARIABLES, PREF_VALUE_VARIABLES, "", null); //$NON-NLS-1$
 		if (variablesString.length() == 0) {
 			return;
 		}
 		Element root= null;
-		Throwable ex = null;
 		try {
 			ByteArrayInputStream stream = new ByteArrayInputStream(variablesString.getBytes("UTF-8")); //$NON-NLS-1$
 			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
 			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(stream).getDocumentElement();
-		} catch (UnsupportedEncodingException e) {
-			ex = e;
-		} catch (ParserConfigurationException e) {
-			ex = e;
-		} catch (FactoryConfigurationError e) {
-			ex = e;
-		} catch (SAXException e) {
-			ex = e;
-		} catch (IOException e) {
-			ex = e;
-		}
-		if (ex != null) {
-			VariablesPlugin.logMessage("An exception occurred while loading persisted value variables.", ex); //$NON-NLS-1$
+		} catch (Exception e) {
+			VariablesPlugin.logMessage("An exception occurred while loading persisted value variables.", e); //$NON-NLS-1$
 			return;
 		}
 		if (!root.getNodeName().equals(VALUE_VARIABLES_TAG)) {
@@ -521,7 +509,6 @@ public class StringVariableManager implements IStringVariableManager, IPropertyC
 	 * preference store. 
 	 */
 	private synchronized void storeValueVariables() {
-		Preferences prefs= VariablesPlugin.getDefault().getPluginPreferences();
 		String variableString= ""; //$NON-NLS-1$
 		if (!fValueVariables.isEmpty()) {
 			try {
@@ -538,8 +525,14 @@ public class StringVariableManager implements IStringVariableManager, IPropertyC
 			}
 		}
 		fInternalChange = true;
-		prefs.setValue(PREF_VALUE_VARIABLES, variableString);
-		VariablesPlugin.getDefault().savePluginPreferences();
+		try {
+			IEclipsePreferences prefs = new InstanceScope().getNode(VariablesPlugin.PI_CORE_VARIABLES);
+			prefs.put(PREF_VALUE_VARIABLES, variableString);
+			prefs.flush();
+		}
+		catch(BackingStoreException bse) {
+			VariablesPlugin.log(bse);
+		}
 		fInternalChange = false;
 	}
 
@@ -598,10 +591,10 @@ public class StringVariableManager implements IStringVariableManager, IPropertyC
     }
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
+	 * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
 	 */
-	public void propertyChange(PropertyChangeEvent event) {
-		if (PREF_VALUE_VARIABLES.equals(event.getProperty())) {
+	public void preferenceChange(PreferenceChangeEvent event) {
+		if (PREF_VALUE_VARIABLES.equals(event.getKey())) {
 			synchronized (this) {
 				if (!fInternalChange) {
 					fValueVariables.clear();
diff --git a/eclipse/plugins/org.eclipse.cvs/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.cvs/META-INF/MANIFEST.MF
index 2c1031d..fb9ece3 100644
--- a/eclipse/plugins/org.eclipse.cvs/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.cvs/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cvs; singleton:=true
-Bundle-Version: 1.0.400.qualifier
+Bundle-Version: 1.0.500.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/eclipse/plugins/org.eclipse.debug.core/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.debug.core/.settings/org.eclipse.pde.prefs
index e3108cb..06466d6 100644
--- a/eclipse/plugins/org.eclipse.debug.core/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.debug.core/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:38:38 CST 2007
+#Mon Dec 14 12:02:07 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=0
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.debug.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.debug.core/META-INF/MANIFEST.MF
index 7b353c6..7d68a22 100644
--- a/eclipse/plugins/org.eclipse.debug.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.debug.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.debug.core.DebugPlugin
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.debug.core/build.properties b/eclipse/plugins/org.eclipse.debug.core/build.properties
index 826d036..192bc84 100644
--- a/eclipse/plugins/org.eclipse.debug.core/build.properties
+++ b/eclipse/plugins/org.eclipse.debug.core/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -17,3 +17,4 @@ bin.includes = .options,\
 source.. = core/
 src.includes = about.html,\
                schema/
+output.. = bin/
diff --git a/eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html b/eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html
index 6eb664e..fda3b85 100644
--- a/eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html
+++ b/eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html
@@ -7,347 +7,89 @@
    <title>Platform Debug Release Notes</title>
 </head>
 <body>
-<h1>Eclipse 3.5 Debug Platform Build Notes</h1>
+<h1>Eclipse 3.6 Debug Platform Build Notes</h1>
 
-<h2>Summary of API changes in 3.5</h2>
+<h2>Summary of API changes in 3.6</h2>
 
-<h3>Breakpoint Import Participants</h3>
-The breakpoints framework has been further enhanced to support breakpoint import
-participants, which allows contributors to participate in the importing process
-for any given breakpoint type. Participants can contribute in the decision of whether
-a breakpoint should be imported and in the verification process once a breakpoint has
-been imported.
-<p>The API to support this feature includes:</p>
+<h3>AbstractLaunchHistoryAction</h3>
+<p><strong>What is affected:</strong>
 <ul>
-<li><b><code>org.eclipse.debug.breakpointImportParticipants</code> extension point</b>
-	- Allows a client to register their participant for a given breakpoint type.
-</li>
-<li><b><code>IBreakpointImportParticipant</code> interface</b>
-	- Required implementing interface for all participants.
-</li>
-<li><b><code>org.eclipse.debug.core.DebugPlugin#EXTENSION_POINT_BREAKPOINT_IMPORT_PARTICIPANTS</code> constant</b>
-	- Constant providing the id of the new extension point to clients.
-</li>
-<li><b><code>org.eclipse.debug.core.IBreakpointManager#getImportParticipants(id)</code></b>
-	- convenience method for getting all registered breakpoint participants for the given breakpoint
-	type id. If there are no matching participants a default participant will be returned.
-</li>
+  <li>Method addition: <code>public void runWithEvent(IAction action, Event event)</code> </li>
+  <li>Method addition: <code>public void init(IAction action)</code> </li>
+  <li>Implemented Interface: <code>org.eclipse.ui.IActionDelegate2</code></li>
 </ul>
+<p><strong>Description: </strong>The implementation of <code>org.eclipse.ui.IActionDelegate2</code> and the addition of the two implemented
+methods allows for the Ctrl key modifier to be used to open the last launched launch configuration when clicking on any launch history action.
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h3>Breakpoints</h3>
-The breakpoints framework has been enhanced to support different breakpoint
-types to be created within the same part.  This effectively allows different
-debuggers to share a common editor and views where breakpoints are created.
-Debuggers can also use this mechanism to let users quickly change what
-breakpoint type is created by default (e.g.: software, hardware,
-thread-filtered, etc.).
-<p>The API to support this feature includes: </p>
+<h3>ILaunchManager</h3>
+<p><strong>What is affected:</strong>
 <ul>
-  <li><b><code>org.eclipse.debug.ui.toggleBreakpointsTargetFactories</code>
-      extension point</b> - Allows a debugger to register a factory of
-      <code>IToggleBreakpointsTarget</code> adapters, which are used by toggle
-      breakpoint actions to create breakpoints.
-  </li>
-  <li><b><code>IToggleBreakpointsTargetFactory</code> interface</b> - Factory API
-  	  for IToggleBreakpointTarget adapters to be implemented by debuggers.
-  </li>
-  <li><b><code>RulerBreakpointTypesActionDelegate</code> action</b> - Editor gutter
-      action to select the active breakpoint types.
-  </li>
+  <li>Method addition: <code>public String generateLaunchConfigurationName(String namePrefix)</code> </li>
+  <li>Method addition: <code>public boolean isValidLaunchConfigurationName(String configname) throws IllegalArgumentException</code> </li>
+  <li>Constant addition: <code>public static final String ATTR_PRIVATE</code></li>
 </ul>
-
-<h3>ILaunchConfiguration.getLocation() can return null</h3>
-<p><strong>What is affected:</strong> Clients that call ILaunchConfiguration.getLocation()</p>
-<p><strong>Description:</strong> In release 3.4 and earlier, ILaunchConfiguration.getLocation() was not specified
-to return <code>null</code>. Since 3.5, launch configuration infrastructure has been enhanced to support storage
-on external file systems (EFS). The #getLocation() method returns a location in the local file system - however, since
-an external file system may not map to a local location, <code>null</code> can now be returned. </p>
-<p><strong>Action required:</strong> Clients that call ILaunchConfiguration.getLocation() should update
-code to handle a <code>null</code> result. The #getLocation() method has been deprecated since the return
-value is no longer reliable.</p>
-
-<h3>Access to current source lookup participant</h3>
-<p><strong>What is affected:</strong> Method addition: AbstractSourceLookupDirector#getCurrentParticipant() </p>
-<p><strong>Description:</strong> Since 3.5, the AbstractSourceLookupDirector provides access to the ISourceLookupParticipant currently looking up source via the new method #getCurrentParticipant(). The implementation of AbstractSourceContainer has been enhanced to ask the current participant if duplicate source files should be found when looking up source. To maintain backwards compatibility, the participant delegates whether duplicates should be found to the source lookup director. A custom implementation of a source lookup participant could override the default behavior to control whether duplicate source files should be found. </p>
+<p><strong>Description: </strong>The <code>generateLaunchConfigurationName(String namePrefix)</code> method is a replacement for the traditional <code>generateUniqueLaunchConfigurationNameFrom(configname)</code> method - which has been deprecated. 
+The new method behaves the same as its predecessor but also provides error checking on the new name to ensure it does not use any system reserved characters or names, like <code>com</code> on Windows for example. If an invalid name or character is found
+the method makes an effort to correct the name in one of two ways:
+<ul>
+<li>If an invalid name is given the configuration will be renamed to <code>launch_configuration</code></li>
+<li>Any invalid characters found will be replaced with <code>_</code></li>
+</ul>
+<strong>Action required:</strong> This is a backwards compatible change. No action required.
+</p>
+<p>
+<strong>Description:</strong> The <code>isValidLaunchConfigurationName(String configname)</code> method is used to validate the specified configuration name and throws an <code>IllegalArgumentException</code>. This method provides
+the validation for the <code>generateLaunchConfigurationName(String namePrefix)</code> method.</p>
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
+<p><strong>Description:</strong> The <code>ATTR_PRIVATE</code> constant is a launch configuration attribute key used to identify whether a launch configuration should appear in the debug user interface (launch history, launch dialog, etc.). The value is a boolean. This attribute was previously defined in the debug UI plug-in, but was moved to core for headless plug-is that need to specify a value for this attribute. </p>
 <p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h3>debugContext evaluation variable</h3>
+<h3>DebugCommandAction base class</h3>
 <p><strong>What is affected:</strong>
 <ul>
-  <li>Evaluation service variable addition: <code>debugContext</code> </li>
-  <li>Method addition: <code>DebugUITools.getDebugContextForEvent(EvalutationEvent)</code> </li>
-  <li>Method addition: <code>DebugUITools.getDebugContextForEventChecked(EvalutationEvent)</code> </li>
-  <li>Constant addition: <code>IDebugUIConstants.DEBUG_CONTEXT_SOURCE_NAME</code></li>
+  <li>Class addition: <code>org.eclipse.debug.ui.actions.DebugCommandAction</code> </li>
+  <li>Class addition: <code>org.eclipse.debug.ui.actions.DebugCommandHandler</code> </li>
+  <li>Class addition: <code>org.eclipse.debug.core.commands.AbstractDebugCommand</code></li>
 </ul>
-</p>
-<p><strong>Description:</strong>The command framework allows menu and toolbar items to be controlled using powerful standard expressions.  However many debugger related commands require access to the current debug context in order to properly evaluate their enabled or visible state.  This addition allows command handlers and their expressions to use the <code>debugContext</code> variable to access the current debug context applicable to the given handler.</p>
+<p><strong>Description:</strong>The <code>IDebugCommandHandler</code> interface allows debugger to implement debug action handlers which execute asynchronously.  Most of the debugger actions user this interface to communicate with the debug model.  However, debuggers which need to add their own asynchronous actions had to duplicate the debug framework actions which invoke the <code>IDebugCommandHandler</code> handlers.  <code>DebugCommandAction</code> and <code>DebugCommandHandler</code> are base classes which can be extended by debuggers to implement new types of actions with asynchronous execution handlers.  Also, this change includes a standard base class <code>AbstractDebugCommand</code> to help implement the <code>IDebugCommandHandler</code> interface.</p>
 <p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h3>Detail pane selection provider</h3>
+<h3>IRestartHandler</h3>
 <p><strong>What is affected:</strong>
 <ul>
-  <li>Interface addition: <code>IDetailPane2</code> </li>
-  <li>Interface addition: <code>IDetailPaneContainer2</code> </li>
+  <li>Interface addition: <code>org.eclipse.debug.core.commands.IRestartHandler</code></li>
 </ul>
-</p>
-<p><strong>Description:</strong>The original detail pane design does not allow a detail pane implementation to properly supply a selection provider for a view (see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254442">bug 254442</a>).  These addition allows a detail pane to overcome this limitation.</p>
-<p><strong>Action required:</strong>This is a backwards compatible change, so no action is required.  However, detail pane implementations which need to drive the active view selection, should implement the new <code>IDetailPane2</code> interface.</p>
-<p>   </p>
+<p><strong>Description:</strong>The <code>IRestartHandler</code> interface enables a new "Restart" command.  If a debugger supplies the <code>IRestartHandler</code> as an adapter to debug model elements, the new Restart command will be enabled.  The restart command appears in the Debug view context menu and can be configured as a short cut.</p>
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h3>Variables views' preference constants</h3>
-<p><strong>What is affected:</strong> Clients that use the <em>variable</em> font, <em>detail pane</em> font, and <em>changed value background</em> preferences.  The new constants are:
+<h3>RefreshUtil</h3>
+<p><strong>What is affected:</strong>
 <ul>
-  <li>Constant addition: <code>IDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND</code></li>
-  <li>Constant addition: <code>IDebugUIConstants.PREF_VARIABLE_TEXT_FONT</code></li>
-  <li>Constant addition: <code>IDebugUIConstants.PREF_DETAIL_PANE_FONT</code></li>
+  <li>Class addition: <code>org.eclipse.debug.core.RefreshUtil</code></li>
 </ul>
-</p>
-<p><strong>Description:</strong> Some clients needed to access preference settings for display attributes in the variables
-view which were defined in an internal interface.  This change moves these constants to the <code>IDebugUIConstants</code> interface.
-<p><strong>Action required:</strong> Clients which may have copied these constants or (gasp!) have referenced the internal interface,
-should instead reference the new API constants.</p>
-
-<h2>May 26, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277869">Bug 277869</a>: NPE copying empty list of variables<br>
-
-<h2>May 25, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=76481">Bug 76481</a>: [doc] In the doc for org.eclipse.debug.ui.AbstractLaunchConfigurationTab, setDirty is badly described<br>
-
-<h2>May 20, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276908">Bug 276908</a>: Mnemonic collision on debug preference page<br>
-
-<h2>May 19, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276377">Bug 276377</a>: [doc] Minor minor minor Javadoc bug: IRuntimeClasspathProvider<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276945">Bug 276948</a>: [examples] org,eclipse.debug.examples.ui should use J2SE-1.4 compiler options<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269182">Bug 269182</a>: [breakpoints] Breakpoint does not have an associated marker error in the .log file<br>
-
-<h2>May 13, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241394">Bug 241394</a>: [Console] Can not get input text properly in eclipse console panel<br>
-
-<h2>May 12, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275700">Bug 275700</a>: Internal errors when expanding thread groups.<br>
-
-<h2>May 11, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275614">Bug 275614</a>: REGRESSION: threads no longer expanded if Debug view not visible<br>
-
-<h2>May 8, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273929">Bug 273929</a>: NPE in ToggleBreakpointObjectActionDelegate<br>
-
-<h2>May 5, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273498">Bug 273498</a>: Launch history generation could be more robust<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274358">Bug 274358</a>: Show Thread Group option not propery updated in debug view<br>
-
-<h2>April 27, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273082">Bug 273082</a>: BreakpointsView-Group By sub-menu contains extra mnemonics<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=220657">Bug 220657</a>: Teminate All in ConsoleView.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272489">Bug 272489</a>: Debug view: "View Mode" menu misses mnemonics<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272367">Bug 272367</a>: "Show Type Names" attribute is not available in the IPresentationContext properties<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273178">Bug 273178</a>: Repeated expressions in expressions window<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273617">Bug 273617</a>: property tester expression doesn't check selected element's type<br>
-
-<h2>April 20, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268978">Bug 268978</a>: Build before launch should use one top level workspace runnable<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233040">Bug 233040</a>: ConsoleTerminateAction performed in UI thread, occasionally lags<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=212798">Bug 212798</a>: Thread collapsed unexpectedly as threads are terminated<br>
-
-<h2>April 7, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271055">Bug 271055</a>: Risk of deleting a launch configuration multiple times<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271113">Bug 271113</a>: !MESSAGE NLS unused message: BreakpointTypesContribution_noBreakpointsActive_menuItem<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269961">Bug 269961</a>: [launching] Confusing "Discard Changes?" dialog when trying to filter with pending changes<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233233">Bug 233233</a>: [launching] Default Launchers -- description does not update when click on the checkbox<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267957">Bug 267957</a>: [launching] Prompted about text search when close is pressed<br>
-
-<h2>March 24, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236435">Bug 236435</a>: add 'do not ask again' option for 'remove all expressions'<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270467">Bug 270467</a>: Enable to navigate to breakpoints<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=199288">Bug 199288</a>: Expressions view should support paste<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269287">Bug 269287</a>: Content assist handler not disabled when the conditional breakpoint properties page is hidden<br>
-
-<h2>March 17, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262850">Bug 262850</a>: [launch modes] When a launch delegate is not selected, the "Multiple launchers available" label should have an error decorator.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268876">Bug 268876</a>: [launching] OK button disabled in Select Preferred Launcher dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=102766">Bug 102766</a>: [launching] Shared launch configurations not displayed in favorites when importing/opening containing project<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268130">Bug 268130</a>: Labels on 'JRE' launch tab does not use sentence style<br>
-
-<h2>March 10, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258891">Bug 258891</a>: [Memory View] AbstractAsyncTableRendering.removeListeners susceptible to an NPE<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262705">Bug 262705</a>: [Memory View] CreateRendering "New Rendering..." tab is missing Enter key binding<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262845">Bug 262845</a>: [breadcrumb] breadcrumb causes performance degradation in stepping<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266162">Bug 266162</a>: Duplicates in prompt to save dirty resources before launching<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262811">Bug 262811</a>: [breadcrumb] Provide hooks to setup debugging in other perspectives<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266162">Bug 266162</a>: Duplicates in prompt to save dirty resources before launching<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262849">Bug 262849</a>: [launching] Select Preferred Launcher dialog is somewhat confusing.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267438">Bug 267438</a>: IInernalDebugUIConstants.PREF_CHANGED_VALUE_BACKGROUND should be public.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262845">Bug 262845</a>: [breadcrumb] breadcrumb causes performance degradation in stepping<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265376">Bug 265376</a>: [breadcrumb] Breadcrumb doesn't update layout after the view is resized.<br>
-
-<h2>February 10, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267251">Bug 267251</a>: [launching] Add a RefreshTab.getID() implementation.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262261">Bug 262261</a>: [breadcrumb] Add actions to Debug view to switch between tree view, breadcrumb, or automatic modes.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262262">Bug 262262</a>: [breadcrumb] Add actions to quickly switch between contexts in Debug view.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262870">Bug 262870</a>: [breadcrumb] When debug view is activated no item has focus.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262837">Bug 262837</a>: No more handle exception when working in Debug Perspective<br>
-
-
-<h2>February 10, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262844">Bug 262844</a>: [launching] Launch tab group with no tabs leads to NPEs<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262848">Bug 262848</a>: [launching] If a tab is contributed and it does not have a placement specified, it should go in front.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263307">Bug 263307</a>: [launching] Preferred launch delegates preference should be more transparent<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255722">Bug 255722</a>: IWorkspaceRoot.findContainersForLocation(IPath) is deprecated<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=208484">Bug 208484</a>: variables should be available for headless operation when possible<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263881">Bug 263881</a>: SourceLookupFacility selects editor region when stack frame provides CharStart  value > -1<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262814">Bug 262814</a>: Class Cast exception when Expression view has expressions defined by non-Java debug session<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=221234">Bug 221234</a>: [console] Programs with lots of output cause major eclipse unresponsiveness with large console buffer<br>
-
-<h2>3.5 M5 - January 30, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262369">Bug 262369</a>: NPE in viewer test<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262819">Bug 262819</a>: 'process model delta' job appears in progress view/status bar<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260802">Bug 260802</a>: Retargetable debug actions do not enable when an adapter is first loaded.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247990">Bug 247990</a>: [breakpoints] Breakpoint working set not updated properly after import<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255644">Bug 255644</a>: chkpii error in N20081117-2000<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256569">Bug 256569</a>: Possibly broken code in LaunchConfigurationTabGroupViewer.setSelection(ISelection, boolean)<br>
-
-<h2>January 20, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261567">Bug 261567</a>: [launching] ILaunchConfiguration's getLocation returns different values at different times<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261214">Bug 261214</a>: Console view: Opening drop-down of console switcher button already switches consoles<br>
-
-<h2>January 6, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259839">Bug 259839</a>: Typo in TerminateAndRelaunchAction<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259107">Bug 259107</a>: [console] Console Deadlock when too much information written<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253955">Bug 253955</a>: Hitting breakpoint gives focus to workbench instead of dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245314">Bug 245314</a>: Populating variables view with logical structures is really slow<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253257">Bug 253257</a>: Source lookup job data getting overwritten while running<br>
-
-<h2>December 16, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258235">Bug 258235</a>: Switch LaunchConfigurationFilteredTree to new look of FilteredTree<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258058">Bug 258058</a>: Buttons not greyed out in Organize Favorites dialog<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255153">Bug 255153</a>: Select All does not fire selection change event<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=49730">Bug 49730</a>: [source lookup] Call stack editor annotation ambiguous<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254442">Bug 254442</a>: "Create Watch Expression" action does not appear consistently<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257717">Bug 257717</a>: Errors in Workspace dialog on launch is contains incorrect text<br>
-
-<h2>Milestone 4 - December 12, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234854">Bug 234854</a>: synchronize remaining 3 public get*Manager() methods from DebugPlugin<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=136741">Bug 136741</a>: [Memory View] Base address not initially scrolled into view with built-in renderings<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257546">Bug 257546</a>: Console view: Open Console button should open menu<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257537">Bug 257537</a>: ConsolePlugin should consider modifying its getStandardDisplay() method<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240330">Bug 240330</a>: [Memory View] Items per row should not be limited to 16<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=212605">Bug 212605</a>: [launching] Mac OS X launcher should not hide the necessary -XstartOnFirstThread<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257970">Bug 257970</a>: SWT Exception shutting down Eclipse<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236296">Bug 236296</a>: "update the classpath settings" feature sets wrong project  compiler compliance level<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244059">Bug 244059</a>: [breakpoints] Allow breakpoints to specify when they should be overwritten on import<br>
-
-<h2>December 2, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257103">Bug 257103</a>: modify execution environment tests to not break real environments<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256181">Bug 256181</a>: [Flex-Hierarchy] State restore logic can get into a cycle.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255267">Bug 255267</a>: OSGi min 1.2 EE is not recognized as subset of J2SE 1.4 and Foundation 1.1<br>
-
-<h2>November 11, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253966">Bug 253966</a>: Support to configure resource based variables<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252992">Bug 252992</a>: Move {workspace_loc} to debug.core plug-in<br>
-
-<h2>November 4, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252445">Bug 252445</a>: toggle breakpoint jobs should have a priority<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252360">Bug 252360</a>: Can not place breakpoint in inner class of an annotation<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252387">Bug 252387</a>: context launch offers to launch configs that have no associated project<br>
-
-<h2>Milestone 3 - October 31, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251711">Bug 251711</a>: Select All should not select invisible items<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=229219">Bug 229219</a>: Track debugContext with the window evaluation context.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247575">Bug 247575</a>: [flex-hierarchy] TreeModelLabelProvider should coalesce label updates<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234908">Bug 234908</a>: [Expressions View] Expression view can show wrong data if selection is changed rapidly<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250954">Bug 250954</a>: NPE in LaunchManager<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252141">Bug 252141</a>: Compile warnings in official build<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252609">Bug 252609</a>: Transient ConsoleLineTracker test failures<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=213074">Bug 213074</a>: "Run to line" action cannot be used with non-standard debug models.<br>
-
-<h2>October 21, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251265">Bug 251265</a>: Rollback changes to IOConsolePartition<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250928">Bug 250928</a>: Debug serversocket nulled out<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250048">Bug 250048</a>: DebugUIPlugin.start() pollutes SWT Display<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250008">Bug 250008</a>: Keybinding conflicts occurred. CTRL+SHIFT+P, jface NullPointerException<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248054">Bug 248054</a>: Can't set breakpoint annotation as Highlighted<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=182974">Bug 182974</a>: [breakpoints] Removing a breakpoint causes two independent resource deltas<br>
-
-<h2>October 7, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249364">Bug 249364</a>: NPE getting file store<br>
-
-<h2>September 30, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246278">Bug 246278</a>: NPE in DefaultDetailPane.java:264<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248520">Bug 248520</a>: NPE selecting launch config<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247977">Bug 247977</a>: ISourceLookupParticipant should be able to influence whether ISourceContainer returns multiple source elements<br>
-
-<h2>September 22, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236980">Bug 236980</a>: [launching] Support ILaunchConfigurations on EFS<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244920">Bug 244920</a>: Two Breakpoints in one line. Saving of class not possible (NPE).<br>
-
-<h2>Aug 26, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244694">Bug 244694</a>: Conflicting mnemonics in breakpoints export wizard<br>
-
-<h2>Aug 19, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243053">Bug 243053</a>: Tabs added via launchConfigurationTabs cannot be placed after each other<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=111818">Bug 111818</a>: new launch config arguments field should let Ctrl+Enter engage dialog's default button<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=231790">Bug 231790</a>: NPE when opening Run Configuration Dialog on linux/gtk<br>
-
-<h2>Aug 12, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243606">Bug 243606</a>: [Debug View] Stackframe does not get focus with multiple debug targets<br>
-
-<h2>Aug 5, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242685">Bug 242685</a>: StringVariableManager - Variable contributions may silently override existing variables<br>
-
-<h2>July 29, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236049">Bug 236049</a>: [console] 'Clear' context menu item enable when no text is available to be cleared<br>
-
-<h2>July 22, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239856">Bug 239856</a>: Launches corrupted in I20080702-0939<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233008">Bug 233008</a>: User consistent naming to create watch expressions<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240985">Bug 240985</a>: NPE adding org.eclipse.ui.console.consolePageParticipants extension without enablement clause<br>
+<p><strong>Description:</strong>The <code>RefreshUtil</code> class provides API to create and restore mementos for resource collections as well as a convenience API for refreshing resources. This support was moved to <code>org.eclipse.debug.core</code> from <code>org.eclispe.debug.ui</code> such that headless plug-ins can leverage these features. </p>
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h2>July 8, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239512">Bug 239512</a>: MessageConsole hides IOConsole constructor taking consoleType<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239446">Bug 239446</a>: org.eclipse.debug LaunchConfigurationsDialog fails to load when PlatformUI SHOW_FILTERED_TEXTS is false<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239794">Bug 239794</a>: CommonTab source uses wrong launch group<br>
+<h3>Launch Time Stamps</h3>
+<p><strong>What is affected:</strong>
+<ul>
+  <li>Constant addition: <code>DebugPlugin - public static final String ATTR_LAUNCH_TIMESTAMP</code></li>
+</ul>
+<p><strong>Description:</strong>A time stamp value is added to all launch objects representing the time a
+ launch configuration's <code>launch(...)</code> method was called. The value of the launch attribute is a 
+ <code>String</code> representing a <code>long</code> generated from <code>System.currentTimeMillis()</code>. The attribute value
+ can be obtained from <code>ILaunch.getAttrbute(DebugPlugin.ATTR_LAUNCH_TIMESTAMP)</code>.
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
-<h2>June 24, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236076">Bug 236076</a>: [launching] Run and Debug History menus not updated after reorganize favorites<br>
+<h3>IDetailPane3</h3>
+<p><strong>What is affected:</strong>
+<ul>
+  <li>Interface addition: <code>org.eclipse.debug.ui.IDetailPane3</code></li>
+</ul>
+<p><strong>Description:</strong>An optional interface that detail pane extensions may implement in order
+ to interact with the containing part's <code>ISaveablePart</code> function.
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
 <p> </p>
 </body>
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index cd9e341..d3869d2 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,7 @@ import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.debug.internal.core.LaunchManager;
 import org.eclipse.debug.internal.core.LogicalStructureManager;
 import org.eclipse.debug.internal.core.MemoryBlockManager;
+import org.eclipse.debug.internal.core.Preferences;
 import org.eclipse.debug.internal.core.StepFilterManager;
 import org.eclipse.debug.internal.core.commands.CommandAdapterFactory;
 import org.eclipse.debug.internal.core.sourcelookup.SourceLookupUtils;
@@ -252,6 +253,13 @@ public class DebugPlugin extends Plugin {
 	 */
 	public static final String ATTR_CAPTURE_OUTPUT = PI_DEBUG_CORE + ".capture_output"; //$NON-NLS-1$
 	
+	/**
+	 * The launch attribute that stores the time stamp of when a launch configuration was
+	 * launched. Value is {@link Long#toString(long)} of {@link System#currentTimeMillis()}.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String ATTR_LAUNCH_TIMESTAMP = PI_DEBUG_CORE + ".launch.timestamp";  //$NON-NLS-1$
 	
     /**
      * This launch attribute designates the encoding to be used by the console
@@ -537,7 +545,7 @@ public class DebugPlugin extends Plugin {
 	 * @since 2.0
 	 */
 	public IStatusHandler getStatusHandler(IStatus status) {
-		boolean enabled = getPluginPreferences().getBoolean(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS);
+		boolean enabled = Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true, null);
 		if (!enabled) {
 			return null;
 		}
@@ -607,11 +615,11 @@ public class DebugPlugin extends Plugin {
             fEventFilters.clear();
             
 			SourceLookupUtils.shutdown();
-			setDefault(null);
-			ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
-			savePluginPreferences();
+			Preferences.savePreferences(DebugPlugin.getUniqueIdentifier());
+			ResourcesPlugin.getWorkspace().removeSaveParticipant(getUniqueIdentifier());
 		} finally {
 			super.stop(context);
+			setDefault(null);
 		}
 	}
 	
@@ -621,10 +629,10 @@ public class DebugPlugin extends Plugin {
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
 		DebugOptions.initDebugOptions();
-		ResourcesPlugin.getWorkspace().addSaveParticipant(this,
+		ResourcesPlugin.getWorkspace().addSaveParticipant(getUniqueIdentifier(),
 				new ISaveParticipant() {
 					public void saving(ISaveContext saveContext) throws CoreException {
-						savePluginPreferences();
+						Preferences.savePreferences(DebugPlugin.getUniqueIdentifier());
 					}				
 					public void rollback(ISaveContext saveContext) {}
 					public void prepareToSave(ISaveContext saveContext) throws CoreException {}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
index 5dbbf4e..811a89f 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfiguration.java
@@ -1,599 +1,599 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.core;
-
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * A launch configuration describes how to launch an application.
- * Each launch configuration is an instance of a type of launch
- * configuration as described by a launch configuration type 
- * extension. Each launch configuration has a launch configuration
- * delegate which performs the actual launching of a
- * configuration.
- * <p>
- * A launch configuration may be shared in a repository via
- * standard VCM mechanisms, or may be stored locally, essentially
- * making the launch configuration private for a single user.
- * Thus, a launch configuration may stored as a file in the
- * workspace (shared), or as a file in the debug plug-in's state
- * location.
- * </p>
- * A launch configuration is a handle to its underlying storage.
- * Methods annotated as "handle-only" do not require a configuration
- * to exist. Methods that require an underlying configuration to exist
- * throw a <code>CoreException</code> when an underlying configuration
- * is missing.
- * </p>
- * <p>
- * A launch configuration is modified by obtaining a working copy
- * of a launch configuration, modifying the working copy, and then
- * saving the working copy.
- * </p>
- * <p>
- * Clients that define a launch configuration delegate extension implement the
- * <code>ILaunchConfigurationDelegate</code> interface.
- * </p>
- * @see ILaunchConfigurationType
- * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate
- * @see ILaunchConfigurationWorkingCopy
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ILaunchConfiguration extends IAdaptable {
-	
-	/**
-	 * The file extension for launch configuration files
-	 * (value <code>"launch"</code>).
-	 */
-	public static final String LAUNCH_CONFIGURATION_FILE_EXTENSION = "launch"; //$NON-NLS-1$
-	
-	/**
-	 * Launch configuration attribute storing an identifier of
-	 * a persistable source locator extension. When this attribute is
-	 * specified, a new source locator will be created automatically and
-	 * associated with the launch for this configuration.
-	 * 
-	 * @see org.eclipse.debug.core.model.IPersistableSourceLocator
-	 */
-	public static final String ATTR_SOURCE_LOCATOR_ID = DebugPlugin.getUniqueIdentifier() + ".source_locator_id"; //$NON-NLS-1$
-	
-	/**
-	 * Launch configuration attribute storing a memento of a 
-	 * source locator. When this attribute is specified in
-	 * conjunction with a source locator id, the source locator
-	 * created for a launch will be initialized with this memento.
-	 * When not specified, but a source locator id is specified,
-	 * the source locator will be initialized to default values.
-	 * 
-	 * @see org.eclipse.debug.core.model.IPersistableSourceLocator
-	 */
-	public static final String ATTR_SOURCE_LOCATOR_MEMENTO = DebugPlugin.getUniqueIdentifier() + ".source_locator_memento"; //$NON-NLS-1$
-	
-	/**
-	 * Returns whether the contents of this launch configuration are 
-	 * equal to the contents of the given launch configuration.
-	 * 
-	 * @param configuration launch configuration
-	 * @return whether the contents of this launch configuration are equal to the contents
-	 * of the specified launch configuration.
-	 */
-	public boolean contentsEqual(ILaunchConfiguration configuration);
-	
-	/**
-	 * Returns a copy of this launch configuration, as a
-	 * working copy, with the specified name. The new
-	 * working copy does not refer back to this configuration
-	 * as its original launch configuration (the working copy
-	 * will return <code>null</code> for <code>getOriginal()</code>).
-	 * When the working copy is saved it will not effect this
-	 * launch configuration.
-	 * 
-	 * @param name the name of the copy
-	 * @return a copy of this launch configuration
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while initializing the contents of the
-	 * working copy from this configuration's underlying storage.</li>
-	 * </ul>
-	 * @see ILaunchConfigurationWorkingCopy#getOriginal()
-	 */
-	public ILaunchConfigurationWorkingCopy copy(String name) throws CoreException;
-	
-	/**
-	 * Deletes this launch configuration. This configuration's underlying
-	 * storage is deleted. Has no effect if this configuration
-	 * does not exist.
-	 * 
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while deleting this configuration's
-	 *  underlying storage.</li>
-	 * </ul>
-	 */
-	public void delete() throws CoreException;
-	
-	/**
-	 * Returns whether this launch configuration's underlying
-	 * storage exists. This is a handle-only method.
-	 * 
-	 * @return whether this launch configuration's underlying
-	 *  storage exists
-	 */
-	public boolean exists();
-	
-	/**
-	 * Returns the boolean-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have a boolean value</li>
-	 * </ul>
-	 */
-	public boolean getAttribute(String attributeName, boolean defaultValue) throws CoreException;
-		
-	/**
-	 * Returns the integer-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have an integer value</li>
-	 * </ul>
-	 */
-	public int getAttribute(String attributeName, int defaultValue) throws CoreException;
-	
-	/**
-	 * Returns the <code>java.util.List</code>-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have a List value</li>
-	 * </ul>
-	 */
-	public List getAttribute(String attributeName, List defaultValue) throws CoreException;
-	
-	/**
-	 * Returns the <code>java.util.Set</code>-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have a List value</li>
-	 * </ul>
-	 * 
-	 * @since 3.3
-	 */
-	public Set getAttribute(String attributeName, Set defaultValue) throws CoreException;
-	
-	/**
-	 * Returns the <code>java.util.Map</code>-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have a Map value</li>
-	 * </ul>
-	 */
-	public Map getAttribute(String attributeName, Map defaultValue) throws CoreException;
-	
-	/**
-	 * Returns the string-valued attribute with the given name.  
-	 * Returns the given default value if the attribute is undefined.
-	 *
-	 * @param attributeName the name of the attribute
-	 * @param defaultValue the value to use if no value is found
-	 * @return the value or the default value if no value was found.
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while retrieving the attribute from
-	 *  underlying storage.</li>
-	 * <li>An attribute with the given name exists, but does not
-	 *  have a String value</li>
-	 * </ul>
-	 */
-	public String getAttribute(String attributeName, String defaultValue) throws CoreException;
-	
-	/**
-	 * Returns a map containing the attributes in this launch configuration.
-	 * Returns an empty map if this configuration has no attributes.
-	 * <p>
-	 * Modifying the map does not affect this launch configuration's attributes.
-	 * A launch configuration is modified by obtaining a working copy of that
-	 * launch configuration, modifying the working copy, and then saving the working
-	 * copy.
-	 * </p>
-	 * @return a map of attribute keys and values
-	 * @exception CoreException unable to generate/retrieve an attribute map
-	 * @since 2.1
-	 */
-	public Map getAttributes() throws CoreException;
-	
-	/**
-	 * Returns this launch configuration's type's category, or <code>null</code>
-	 * if unspecified. This is a handle-only method.
-	 * 
-	 * @return this launch configuration's type's category, or <code>null</code>
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>Unable to retrieve or instantiate this launch configuration's type.</li>
-	 * </ul>
-	 * @since 2.1
-	 */
-	public String getCategory() throws CoreException;
-	
-	/**
-	 * Returns the file this launch configuration is stored
-	 * in, or <code>null</code> if this configuration is stored
-	 * locally with the workspace. This is a handle-only method.
-	 * 
-	 * @return the file this launch configuration is stored
-	 *  in, or <code>null</code> if this configuration is stored
-	 *  locally with the workspace
-	 */
-	public IFile getFile();
-		
-	/**
-	 * Returns the location of this launch configuration as a
-	 * path in the local file system or <code>null</code> if it cannot
-	 * be mapped to a location in the local file system. This is a handle-only method.
-	 * <p>
-	 * Since 3.5, this method can return <code>null</code>. For example, when a
-	 * launch configuration is stored in the workspace as an {@link IFile} in
-	 * an external file system ({@link EFS}).
-	 * </p>
-	 * 
-	 * @return the location of this launch configuration as a
-	 *  path file system or <code>null</code> if it cannot be mapped
-	 *  to a location in the local file system. Since 3.5, this method
-	 *  can return <code>null</code>.
-	 * @deprecated Since a launch configuration does not need to be stored in the local
-	 *  file system, this attribute should no longer be used to identify a launch configuration.
-	 */
-	public IPath getLocation();
-	
-	/**
-	 * Returns the resources this launch configuration is associated with or <code>null</code>
-	 * if none. Clients contributing launch configuration types are responsible for maintaining
-	 * resource mappings as appropriate.
-	 * 
-	 * @return the resources this launch configuration is associated with or <code>null</code>
-	 * @throws CoreException unable to get the mapped resource
-	 * @since 3.2
-	 */
-	public IResource[] getMappedResources() throws CoreException;
-		
-	/**
-	 * Returns a memento for this launch configuration, or <code>null</code>
-	 * if unable to generate a memento for this configuration. A memento
-	 * can be used to re-create a launch configuration, via the
-	 * launch manager.
-	 * 
-	 * @return a memento for this configuration
-	 * @see ILaunchManager#getLaunchConfiguration(String)
-	 * @exception CoreException if an exception occurs generating this
-	 *  launch configuration's memento 
-	 */
-	public String getMemento() throws CoreException;
-	
-	/**
-	 * Returns the name of this launch configuration. This is
-	 * a handle-only method.
-	 * 
-	 * @return the name of this launch configuration
-	 */
-	public String getName();		
-	
-	/**
-	 * Returns the launch modes that have been set on this configuration.
-	 * An empty set is returned if no specific launch modes have been set
-	 * on a launch configuration. 
-	 * <p>
-	 * Setting launch modes on a configuration allows a launch to be
-	 * performed in mixed mode - for example, debug and profile at the
-	 * same time.
-	 * </p>
-	 * @return this configuration's launch modes, possibly an empty set
-	 * @exception CoreException if an exception occurs retrieving modes
-	 * @since 3.3
-	 */
-	public Set getModes() throws CoreException;
-	
-	/**
-	 * Returns the preferred launch delegate that has been set on this
-	 * configuration or <code>null</code> if one is not specified.
-	 * 
-	 * @param modes mode set for which a preferred delegate has been requested
-	 * @return this configuration's preferred launch delegate for the specified mode set, or  
-	 * 	<code>null</code> if one is not specified
-	 * @exception CoreException if an exception occurs retrieving preferred delegate
-	 * @since 3.3
-	 */
-	public ILaunchDelegate getPreferredDelegate(Set modes) throws CoreException;
-	
-	/**
-	 * Returns the type of this launch configuration. This is a
-	 * handle-only method.
-	 * 
-	 * @return the type of this launch configuration
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>Unable to retrieve or instantiate this launch configuration's type.</li>
-	 * </ul>
-	 * @see ILaunchConfigurationType
-	 */
-	public ILaunchConfigurationType getType() throws CoreException;	
-	
-	/**
-	 * Returns a working copy of this launch configuration.
-	 * Since 3.3, if this method is called on a working copy, a nested working 
-	 * copy is created (a working copy of a working copy).
-	 * Changes to the working copy will be applied to this
-	 * launch configuration when saved, or to the parent working copy. 
-	 * The working copy will refer to this launch configuration as its original
-	 * launch configuration, or the working copy it was created from.
-	 * <p>
-	 * When a working copy (B) is created from a working copy (A), the newly
-	 * created working copy (B) is initialized with the attributes from
-	 * the first working copy (A). Whenever a working copy is saved, it is written
-	 * back to the working copy from which it was created: in this example working 
-	 * copy B will write back to working copy A, and A will write back to the 
-	 * original launch configuration.
-	 * </p>
-	 * @return a working copy of this launch configuration, or a nested working copy if called
-	 * on an instance of <code>ILaunchConfigurationWorkingCopy</code>
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>An exception occurs while initializing the contents of the
-	 * working copy from this configuration's underlying storage.</li>
-	 * </ul>
-	 * @see ILaunchConfigurationWorkingCopy#getOriginal()
-	 */
-	public ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException;
-	
-	/**
-	 * Returns whether this configuration contains an attribute with the given name.
-	 * 
-	 * @param attributeName the name of the attribute
-	 * @return true if this configuration has the specified attribute false otherwise
-	 * @throws CoreException if unable to retrieve attributes
-	 * 
-	 * @since 3.4
-	 */
-	public boolean hasAttribute(String attributeName) throws CoreException;
-	
-	/**
-	 * Returns whether this launch configuration is stored
-	 * locally within the workspace. This is a handle-only method.
-	 * 
-	 * @return whether this launch configuration is stored
-	 *  locally with the workspace
-	 */
-	public boolean isLocal();
-	
-	/**
-	 * Returns whether this launch configuration is a candidate for migration.
-	 * 
-	 * @return whether this launch configuration is a candidate for migration
-	 * @throws CoreException
-	 * @see ILaunchConfigurationMigrationDelegate
-	 * @since 3.2
-	 */
-	public boolean isMigrationCandidate() throws CoreException ;
-	
-	/**
-	 * Returns whether this launch configuration is a working
-	 * copy. Launch configurations which return <code>true</code>
-	 * to this method can be safely cast to 
-	 * <code>org.eclipse.debug.core.ILaunchConfigurationWorkingCopy</code>.
-	 * This is a handle-only method.
-	 * 
-	 * @return whether this launch configuration is a working
-	 *  copy
-	 */
-	public boolean isWorkingCopy();
-	
-	/**
-	 * Launches this configuration in the specified mode by delegating to
-	 * this configuration's launch configuration delegate, and returns the
-	 * resulting launch.
-	 * <p>
-	 * Equivalent to calling <code>launch(String, IProgressMontitor, boolean)</code>
-	 * with a <code>build</code> flag of <code>false</code>.
-	 * </p>
-	 * @param mode the mode in which to launch, one of the mode constants
-	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
-	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
-	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
-	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
-	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
-	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
-	 * @return the resulting launch
-	 * @exception CoreException if this method fails. Reasons include:<ul>
-	 * <li>unable to instantiate the underlying launch configuration delegate</li>
-	 * <li>the launch fails (in the delegate)</code>
-	 * </ul>
-	 */
-	public ILaunch launch(String mode, IProgressMonitor monitor) throws CoreException;
-	
-	/**
-	 * Launches this configuration in the specified mode by delegating to
-	 * this configuration's launch configuration delegate, and returns the
-	 * resulting launch.
-	 * <p>
-	 * If this configuration's launch delegate implements
-	 * <code>ILaunchConfigurationDelegate2</code>, the launch delegate will
-	 * be consulted to provide a launch object for the launch,
-	 * perform pre-launch checks, and build before the launch.
-	 * If <code>build</code> is <code>true</code> and the associated launch
-	 * delegate does not implement <code>ILaunchConfigurationDelegate2</code>
-	 * an incremental workspace build will be performed before the launch
-	 * by the debug platform.
-	 * </p>
-	 * <p>
-	 * The resulting launch object is registered with the launch manager
-	 * before passing it to this configuration's delegate launch method, for
-	 * contributions (debug targets and processes).
-	 * </p>
-	 * <p>
-	 * If the delegate contributes a source locator to the launch, that
-	 * source locator is used. Otherwise an appropriate source locator is
-	 * contributed to the launch  based on the values of
-	 * <code>ATTR_SOURCE_LOCATOR_ID</code> and
-	 * <code>ATTR_SOURCE_LOCATOR_MEMENTO</code>. If the launch is canceled (via
-	 * the given progress monitor), the launch is removed from the launch
-	 * manager. The launch is returned whether canceled or not. Invoking this
-	 * method causes the underlying launch configuration delegate to be
-	 * instantiated (if not already).
-	 * </p>
-	 * @param mode the mode in which to launch, one of the mode constants
-	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
-	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
-	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
-	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
-	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
-	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
-	 * @param build whether the workspace should be built before the launch
-	 * @return resulting launch
-	 * @throws CoreException if an exception occurs during the launch sequence
-	 * @since 3.0
-	 */
-	public ILaunch launch(String mode, IProgressMonitor monitor, boolean build) throws CoreException;	
-	
-	/**
-	 * Launches this configuration in the specified mode by delegating to
-	 * this configuration's launch configuration delegate, and returns the
-	 * resulting launch.
-	 * <p>
-	 * If this configuration's launch delegate implements
-	 * <code>ILaunchConfigurationDelegate2</code>, the launch delegate will
-	 * be consulted to provide a launch object for the launch,
-	 * perform pre-launch checks, and build before the launch.
-	 * If <code>build</code> is <code>true</code> and the associated launch
-	 * delegate does not implement <code>ILaunchConfigurationDelegate2</code>
-	 * an incremental workspace build will be performed before the launch
-	 * by the debug platform.
-	 * </p>
-	 * <p>
-	 * When <code>register</code> is <code>true</code>, the resulting launch object
-	 * is registered with the launch manager before passing it to this configuration's delegate
-	 * launch method, for contributions (debug targets and processes). When
-	 * <code>register</code> is <code>false</code>, the launch is not registered with
-	 * the launch manager. Clients that launch configurations without registering
-	 * a launch should register appropriate debug event filters to intercept events
-	 * from unregistered launches.
-	 * </p>
-	 * <p>
-	 * If the delegate contributes a source locator to the launch, that
-	 * source locator is used. Otherwise an appropriate source locator is
-	 * contributed to the launch  based on the values of
-	 * <code>ATTR_SOURCE_LOCATOR_ID</code> and
-	 * <code>ATTR_SOURCE_LOCATOR_MEMENTO</code>. If the launch is canceled (via
-	 * the given progress monitor), the launch is removed from the launch
-	 * manager. The launch is returned whether canceled or not. Invoking this
-	 * method causes the underlying launch configuration delegate to be
-	 * instantiated (if not already).
-	 * </p>
-	 * @param mode the mode in which to launch, one of the mode constants
-	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
-	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
-	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
-	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
-	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
-	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
-	 * @param build whether the workspace should be built before the launch
-	 * @param register whether to register the resulting launch with the launch manager
-	 * @return resulting launch
-	 * @throws CoreException if an exception occurs during the launch sequence
-	 * @since 3.1
-	 */
-	public ILaunch launch(String mode, IProgressMonitor monitor, boolean build, boolean register) throws CoreException;
-	
-	/**
-	 * Migrates this launch configuration to be compatible with current tooling.
-	 * Has no effect if this configuration is not a candidate for migration.
-	 * Migration is performed by a launch configuration migration delegate.
-	 * @throws CoreException if migration fails
-	 * @since 3.2
-	 * @see ILaunchConfigurationMigrationDelegate
-	 */
-	public void migrate() throws CoreException;
-	
-	/**
-	 * Returns whether this launch configuration supports the
-	 * specified mode. This is a handle-only method.
-	 * 
-	 * @param mode a mode in which a configuration can be launched, one of
-	 *  the mode constants defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or
-	 *  <code>DEBUG_MODE</code>.
-	 * @return whether this launch configuration supports the
-	 *  specified mode
-	 * @exception CoreException if this method fails. Reasons include:
-	 * <ul>
-	 * <li>Unable to retrieve this launch configuration's type.</li>
-	 * </ul>
-	 */
-	public boolean supportsMode(String mode) throws CoreException;
-	
-	/**
-	 * Returns whether this launch configuration is read-only.
-	 * A read-only configuration cannot be modified.
-	 * 
-	 * @return whether this configuration is read-only
-	 * 
-	 * @since 3.3
-	 */
-	public boolean isReadOnly();	
-}
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core;
+
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * A launch configuration describes how to launch an application.
+ * Each launch configuration is an instance of a type of launch
+ * configuration as described by a launch configuration type 
+ * extension. Each launch configuration has a launch configuration
+ * delegate which performs the actual launching of a
+ * configuration.
+ * <p>
+ * A launch configuration may be shared in a repository via
+ * standard VCM mechanisms, or may be stored locally, essentially
+ * making the launch configuration private for a single user.
+ * Thus, a launch configuration may stored as a file in the
+ * workspace (shared), or as a file in the debug plug-in's state
+ * location.
+ * </p>
+ * A launch configuration is a handle to its underlying storage.
+ * Methods annotated as "handle-only" do not require a configuration
+ * to exist. Methods that require an underlying configuration to exist
+ * throw a <code>CoreException</code> when an underlying configuration
+ * is missing.
+ * </p>
+ * <p>
+ * A launch configuration is modified by obtaining a working copy
+ * of a launch configuration, modifying the working copy, and then
+ * saving the working copy.
+ * </p>
+ * <p>
+ * Clients that define a launch configuration delegate extension implement the
+ * <code>ILaunchConfigurationDelegate</code> interface.
+ * </p>
+ * @see ILaunchConfigurationType
+ * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate
+ * @see ILaunchConfigurationWorkingCopy
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface ILaunchConfiguration extends IAdaptable {
+	
+	/**
+	 * The file extension for launch configuration files
+	 * (value <code>"launch"</code>).
+	 */
+	public static final String LAUNCH_CONFIGURATION_FILE_EXTENSION = "launch"; //$NON-NLS-1$
+	
+	/**
+	 * Launch configuration attribute storing an identifier of
+	 * a persistable source locator extension. When this attribute is
+	 * specified, a new source locator will be created automatically and
+	 * associated with the launch for this configuration.
+	 * 
+	 * @see org.eclipse.debug.core.model.IPersistableSourceLocator
+	 */
+	public static final String ATTR_SOURCE_LOCATOR_ID = DebugPlugin.getUniqueIdentifier() + ".source_locator_id"; //$NON-NLS-1$
+	
+	/**
+	 * Launch configuration attribute storing a memento of a 
+	 * source locator. When this attribute is specified in
+	 * conjunction with a source locator id, the source locator
+	 * created for a launch will be initialized with this memento.
+	 * When not specified, but a source locator id is specified,
+	 * the source locator will be initialized to default values.
+	 * 
+	 * @see org.eclipse.debug.core.model.IPersistableSourceLocator
+	 */
+	public static final String ATTR_SOURCE_LOCATOR_MEMENTO = DebugPlugin.getUniqueIdentifier() + ".source_locator_memento"; //$NON-NLS-1$
+	
+	/**
+	 * Returns whether the contents of this launch configuration are 
+	 * equal to the contents of the given launch configuration.
+	 * 
+	 * @param configuration launch configuration
+	 * @return whether the contents of this launch configuration are equal to the contents
+	 * of the specified launch configuration.
+	 */
+	public boolean contentsEqual(ILaunchConfiguration configuration);
+	
+	/**
+	 * Returns a copy of this launch configuration, as a
+	 * working copy, with the specified name. The new
+	 * working copy does not refer back to this configuration
+	 * as its original launch configuration (the working copy
+	 * will return <code>null</code> for <code>getOriginal()</code>).
+	 * When the working copy is saved it will not effect this
+	 * launch configuration.
+	 * 
+	 * @param name the name of the copy
+	 * @return a copy of this launch configuration
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while initializing the contents of the
+	 * working copy from this configuration's underlying storage.</li>
+	 * </ul>
+	 * @see ILaunchConfigurationWorkingCopy#getOriginal()
+	 */
+	public ILaunchConfigurationWorkingCopy copy(String name) throws CoreException;
+	
+	/**
+	 * Deletes this launch configuration. This configuration's underlying
+	 * storage is deleted. Has no effect if this configuration
+	 * does not exist.
+	 * 
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while deleting this configuration's
+	 *  underlying storage.</li>
+	 * </ul>
+	 */
+	public void delete() throws CoreException;
+	
+	/**
+	 * Returns whether this launch configuration's underlying
+	 * storage exists. This is a handle-only method.
+	 * 
+	 * @return whether this launch configuration's underlying
+	 *  storage exists
+	 */
+	public boolean exists();
+	
+	/**
+	 * Returns the boolean-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have a boolean value</li>
+	 * </ul>
+	 */
+	public boolean getAttribute(String attributeName, boolean defaultValue) throws CoreException;
+		
+	/**
+	 * Returns the integer-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have an integer value</li>
+	 * </ul>
+	 */
+	public int getAttribute(String attributeName, int defaultValue) throws CoreException;
+	
+	/**
+	 * Returns the <code>java.util.List</code>-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have a List value</li>
+	 * </ul>
+	 */
+	public List getAttribute(String attributeName, List defaultValue) throws CoreException;
+	
+	/**
+	 * Returns the <code>java.util.Set</code>-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have a List value</li>
+	 * </ul>
+	 * 
+	 * @since 3.3
+	 */
+	public Set getAttribute(String attributeName, Set defaultValue) throws CoreException;
+	
+	/**
+	 * Returns the <code>java.util.Map</code>-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have a Map value</li>
+	 * </ul>
+	 */
+	public Map getAttribute(String attributeName, Map defaultValue) throws CoreException;
+	
+	/**
+	 * Returns the string-valued attribute with the given name.  
+	 * Returns the given default value if the attribute is undefined.
+	 *
+	 * @param attributeName the name of the attribute
+	 * @param defaultValue the value to use if no value is found
+	 * @return the value or the default value if no value was found.
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while retrieving the attribute from
+	 *  underlying storage.</li>
+	 * <li>An attribute with the given name exists, but does not
+	 *  have a String value</li>
+	 * </ul>
+	 */
+	public String getAttribute(String attributeName, String defaultValue) throws CoreException;
+	
+	/**
+	 * Returns a map containing the attributes in this launch configuration.
+	 * Returns an empty map if this configuration has no attributes.
+	 * <p>
+	 * Modifying the map does not affect this launch configuration's attributes.
+	 * A launch configuration is modified by obtaining a working copy of that
+	 * launch configuration, modifying the working copy, and then saving the working
+	 * copy.
+	 * </p>
+	 * @return a map of attribute keys and values
+	 * @exception CoreException unable to generate/retrieve an attribute map
+	 * @since 2.1
+	 */
+	public Map getAttributes() throws CoreException;
+	
+	/**
+	 * Returns this launch configuration's type's category, or <code>null</code>
+	 * if unspecified. This is a handle-only method.
+	 * 
+	 * @return this launch configuration's type's category, or <code>null</code>
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>Unable to retrieve or instantiate this launch configuration's type.</li>
+	 * </ul>
+	 * @since 2.1
+	 */
+	public String getCategory() throws CoreException;
+	
+	/**
+	 * Returns the file this launch configuration is stored
+	 * in, or <code>null</code> if this configuration is stored
+	 * locally with the workspace. This is a handle-only method.
+	 * 
+	 * @return the file this launch configuration is stored
+	 *  in, or <code>null</code> if this configuration is stored
+	 *  locally with the workspace
+	 */
+	public IFile getFile();
+		
+	/**
+	 * Returns the location of this launch configuration as a
+	 * path in the local file system or <code>null</code> if it cannot
+	 * be mapped to a location in the local file system. This is a handle-only method.
+	 * <p>
+	 * Since 3.5, this method can return <code>null</code>. For example, when a
+	 * launch configuration is stored in the workspace as an {@link IFile} in
+	 * an external file system ({@link EFS}).
+	 * </p>
+	 * 
+	 * @return the location of this launch configuration as a
+	 *  path file system or <code>null</code> if it cannot be mapped
+	 *  to a location in the local file system. Since 3.5, this method
+	 *  can return <code>null</code>.
+	 * @deprecated Since a launch configuration does not need to be stored in the local
+	 *  file system, this attribute should no longer be used to identify a launch configuration.
+	 */
+	public IPath getLocation();
+	
+	/**
+	 * Returns the resources this launch configuration is associated with or <code>null</code>
+	 * if none. Clients contributing launch configuration types are responsible for maintaining
+	 * resource mappings as appropriate.
+	 * 
+	 * @return the resources this launch configuration is associated with or <code>null</code>
+	 * @throws CoreException unable to get the mapped resource
+	 * @since 3.2
+	 */
+	public IResource[] getMappedResources() throws CoreException;
+		
+	/**
+	 * Returns a memento for this launch configuration, or <code>null</code>
+	 * if unable to generate a memento for this configuration. A memento
+	 * can be used to re-create a launch configuration, via the
+	 * launch manager.
+	 * 
+	 * @return a memento for this configuration
+	 * @see ILaunchManager#getLaunchConfiguration(String)
+	 * @exception CoreException if an exception occurs generating this
+	 *  launch configuration's memento 
+	 */
+	public String getMemento() throws CoreException;
+	
+	/**
+	 * Returns the name of this launch configuration. This is
+	 * a handle-only method.
+	 * 
+	 * @return the name of this launch configuration
+	 */
+	public String getName();		
+	
+	/**
+	 * Returns the launch modes that have been set on this configuration.
+	 * An empty set is returned if no specific launch modes have been set
+	 * on a launch configuration. 
+	 * <p>
+	 * Setting launch modes on a configuration allows a launch to be
+	 * performed in mixed mode - for example, debug and profile at the
+	 * same time.
+	 * </p>
+	 * @return this configuration's launch modes, possibly an empty set
+	 * @exception CoreException if an exception occurs retrieving modes
+	 * @since 3.3
+	 */
+	public Set getModes() throws CoreException;
+	
+	/**
+	 * Returns the preferred launch delegate that has been set on this
+	 * configuration or <code>null</code> if one is not specified.
+	 * 
+	 * @param modes mode set for which a preferred delegate has been requested
+	 * @return this configuration's preferred launch delegate for the specified mode set, or  
+	 * 	<code>null</code> if one is not specified
+	 * @exception CoreException if an exception occurs retrieving preferred delegate
+	 * @since 3.3
+	 */
+	public ILaunchDelegate getPreferredDelegate(Set modes) throws CoreException;
+	
+	/**
+	 * Returns the type of this launch configuration. This is a
+	 * handle-only method.
+	 * 
+	 * @return the type of this launch configuration
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>Unable to retrieve or instantiate this launch configuration's type.</li>
+	 * </ul>
+	 * @see ILaunchConfigurationType
+	 */
+	public ILaunchConfigurationType getType() throws CoreException;	
+	
+	/**
+	 * Returns a working copy of this launch configuration.
+	 * Since 3.3, if this method is called on a working copy, a nested working 
+	 * copy is created (a working copy of a working copy).
+	 * Changes to the working copy will be applied to this
+	 * launch configuration when saved, or to the parent working copy. 
+	 * The working copy will refer to this launch configuration as its original
+	 * launch configuration, or the working copy it was created from.
+	 * <p>
+	 * When a working copy (B) is created from a working copy (A), the newly
+	 * created working copy (B) is initialized with the attributes from
+	 * the first working copy (A). Whenever a working copy is saved, it is written
+	 * back to the working copy from which it was created: in this example working 
+	 * copy B will write back to working copy A, and A will write back to the 
+	 * original launch configuration.
+	 * </p>
+	 * @return a working copy of this launch configuration, or a nested working copy if called
+	 * on an instance of <code>ILaunchConfigurationWorkingCopy</code>
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>An exception occurs while initializing the contents of the
+	 * working copy from this configuration's underlying storage.</li>
+	 * </ul>
+	 * @see ILaunchConfigurationWorkingCopy#getOriginal()
+	 */
+	public ILaunchConfigurationWorkingCopy getWorkingCopy() throws CoreException;
+	
+	/**
+	 * Returns whether this configuration contains an attribute with the given name.
+	 * 
+	 * @param attributeName the name of the attribute
+	 * @return true if this configuration has the specified attribute false otherwise
+	 * @throws CoreException if unable to retrieve attributes
+	 * 
+	 * @since 3.4
+	 */
+	public boolean hasAttribute(String attributeName) throws CoreException;
+	
+	/**
+	 * Returns whether this launch configuration is stored
+	 * locally within the workspace. This is a handle-only method.
+	 * 
+	 * @return whether this launch configuration is stored
+	 *  locally with the workspace
+	 */
+	public boolean isLocal();
+	
+	/**
+	 * Returns whether this launch configuration is a candidate for migration.
+	 * 
+	 * @return whether this launch configuration is a candidate for migration
+	 * @throws CoreException
+	 * @see ILaunchConfigurationMigrationDelegate
+	 * @since 3.2
+	 */
+	public boolean isMigrationCandidate() throws CoreException ;
+	
+	/**
+	 * Returns whether this launch configuration is a working
+	 * copy. Launch configurations which return <code>true</code>
+	 * to this method can be safely cast to 
+	 * <code>org.eclipse.debug.core.ILaunchConfigurationWorkingCopy</code>.
+	 * This is a handle-only method.
+	 * 
+	 * @return whether this launch configuration is a working
+	 *  copy
+	 */
+	public boolean isWorkingCopy();
+	
+	/**
+	 * Launches this configuration in the specified mode by delegating to
+	 * this configuration's launch configuration delegate, and returns the
+	 * resulting launch.
+	 * <p>
+	 * Equivalent to calling <code>launch(String, IProgressMontitor, boolean)</code>
+	 * with a <code>build</code> flag of <code>false</code>.
+	 * </p>
+	 * @param mode the mode in which to launch, one of the mode constants
+	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
+	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
+	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
+	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
+	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
+	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
+	 * @return the resulting launch
+	 * @exception CoreException if this method fails. Reasons include:<ul>
+	 * <li>unable to instantiate the underlying launch configuration delegate</li>
+	 * <li>the launch fails (in the delegate)</code>
+	 * </ul>
+	 */
+	public ILaunch launch(String mode, IProgressMonitor monitor) throws CoreException;
+	
+	/**
+	 * Launches this configuration in the specified mode by delegating to
+	 * this configuration's launch configuration delegate, and returns the
+	 * resulting launch.
+	 * <p>
+	 * If this configuration's launch delegate implements
+	 * <code>ILaunchConfigurationDelegate2</code>, the launch delegate will
+	 * be consulted to provide a launch object for the launch,
+	 * perform pre-launch checks, and build before the launch.
+	 * If <code>build</code> is <code>true</code> and the associated launch
+	 * delegate does not implement <code>ILaunchConfigurationDelegate2</code>
+	 * an incremental workspace build will be performed before the launch
+	 * by the debug platform.
+	 * </p>
+	 * <p>
+	 * The resulting launch object is registered with the launch manager
+	 * before passing it to this configuration's delegate launch method, for
+	 * contributions (debug targets and processes).
+	 * </p>
+	 * <p>
+	 * If the delegate contributes a source locator to the launch, that
+	 * source locator is used. Otherwise an appropriate source locator is
+	 * contributed to the launch  based on the values of
+	 * <code>ATTR_SOURCE_LOCATOR_ID</code> and
+	 * <code>ATTR_SOURCE_LOCATOR_MEMENTO</code>. If the launch is canceled (via
+	 * the given progress monitor), the launch is removed from the launch
+	 * manager. The launch is returned whether canceled or not. Invoking this
+	 * method causes the underlying launch configuration delegate to be
+	 * instantiated (if not already).
+	 * </p>
+	 * @param mode the mode in which to launch, one of the mode constants
+	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
+	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
+	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
+	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
+	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
+	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
+	 * @param build whether the workspace should be built before the launch
+	 * @return resulting launch
+	 * @throws CoreException if an exception occurs during the launch sequence
+	 * @since 3.0
+	 */
+	public ILaunch launch(String mode, IProgressMonitor monitor, boolean build) throws CoreException;	
+	
+	/**
+	 * Launches this configuration in the specified mode by delegating to
+	 * this configuration's launch configuration delegate, and returns the
+	 * resulting launch.
+	 * <p>
+	 * If this configuration's launch delegate implements
+	 * <code>ILaunchConfigurationDelegate2</code>, the launch delegate will
+	 * be consulted to provide a launch object for the launch,
+	 * perform pre-launch checks, and build before the launch.
+	 * If <code>build</code> is <code>true</code> and the associated launch
+	 * delegate does not implement <code>ILaunchConfigurationDelegate2</code>
+	 * an incremental workspace build will be performed before the launch
+	 * by the debug platform.
+	 * </p>
+	 * <p>
+	 * When <code>register</code> is <code>true</code>, the resulting launch object
+	 * is registered with the launch manager before passing it to this configuration's delegate
+	 * launch method, for contributions (debug targets and processes). When
+	 * <code>register</code> is <code>false</code>, the launch is not registered with
+	 * the launch manager. Clients that launch configurations without registering
+	 * a launch should register appropriate debug event filters to intercept events
+	 * from unregistered launches.
+	 * </p>
+	 * <p>
+	 * If the delegate contributes a source locator to the launch, that
+	 * source locator is used. Otherwise an appropriate source locator is
+	 * contributed to the launch  based on the values of
+	 * <code>ATTR_SOURCE_LOCATOR_ID</code> and
+	 * <code>ATTR_SOURCE_LOCATOR_MEMENTO</code>. If the launch is canceled (via
+	 * the given progress monitor), the launch is removed from the launch
+	 * manager. The launch is returned whether canceled or not. Invoking this
+	 * method causes the underlying launch configuration delegate to be
+	 * instantiated (if not already).
+	 * </p>
+	 * @param mode the mode in which to launch, one of the mode constants
+	 *  defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or <code>DEBUG_MODE</code>.
+	 * @param monitor progress monitor, or <code>null</code>. A cancelable progress monitor is provided by the Job
+	 *  framework. It should be noted that the setCanceled(boolean) method should never be called on the provided
+	 *  monitor or the monitor passed to any delegates from this method; due to a limitation in the progress monitor 
+	 *  framework using the setCanceled method can cause entire workspace batch jobs to be canceled, as the canceled flag 
+	 *  is propagated up the top-level parent monitor. The provided monitor is not guaranteed to have been started. 
+	 * @param build whether the workspace should be built before the launch
+	 * @param register whether to register the resulting launch with the launch manager
+	 * @return resulting launch
+	 * @throws CoreException if an exception occurs during the launch sequence
+	 * @since 3.1
+	 */
+	public ILaunch launch(String mode, IProgressMonitor monitor, boolean build, boolean register) throws CoreException;
+	
+	/**
+	 * Migrates this launch configuration to be compatible with current tooling.
+	 * Has no effect if this configuration is not a candidate for migration.
+	 * Migration is performed by a launch configuration migration delegate.
+	 * @throws CoreException if migration fails
+	 * @since 3.2
+	 * @see ILaunchConfigurationMigrationDelegate
+	 */
+	public void migrate() throws CoreException;
+	
+	/**
+	 * Returns whether this launch configuration supports the
+	 * specified mode. This is a handle-only method.
+	 * 
+	 * @param mode a mode in which a configuration can be launched, one of
+	 *  the mode constants defined by <code>ILaunchManager</code> - <code>RUN_MODE</code> or
+	 *  <code>DEBUG_MODE</code>.
+	 * @return whether this launch configuration supports the
+	 *  specified mode
+	 * @exception CoreException if this method fails. Reasons include:
+	 * <ul>
+	 * <li>Unable to retrieve this launch configuration's type.</li>
+	 * </ul>
+	 */
+	public boolean supportsMode(String mode) throws CoreException;
+	
+	/**
+	 * Returns whether this launch configuration is read-only.
+	 * A read-only configuration cannot be modified.
+	 * 
+	 * @return whether this configuration is read-only
+	 * 
+	 * @since 3.3
+	 */
+	public boolean isReadOnly();	
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
index ded6948..1a24538 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -276,7 +276,11 @@ public interface ILaunchConfigurationType extends IAdaptable {
 	 * When <code>container</code> is </code>null</code>, the configuration
 	 * will reside locally in the metadata area.
 	 * Note: a launch configuration is not actually created until the working copy is saved.
-	 * 
+	 * <p>
+	 * The configuration <code>name</code> parameter cannot contain file separator characters
+	 * (sub directories) when the <code>container</code> is <code>null</code> (i.e. when the
+	 * configuration is to be stored in the local metadata area.
+	 * </p>
 	 * @param container the container in which the new configuration will
 	 *  reside, or <code>null</code> if the configuration should reside
 	 *  locally with the metadata.
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationWorkingCopy.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationWorkingCopy.java
index 2a8ac2a..a7ffcb8 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationWorkingCopy.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchConfigurationWorkingCopy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -111,6 +111,18 @@ public interface ILaunchConfigurationWorkingCopy extends ILaunchConfiguration, I
 	public void setAttribute(String attributeName, Map value);
 	
 	/**
+	 * Sets the <code>java.util.Set</code>-valued attribute with the given name.
+	 * The specified Set <em>must</em> contain only String values.
+	 * If the value is <code>null</code>, the attribute is removed from
+	 * this launch configuration.
+	 *
+	 * @param attributeName the name of the attribute, cannot be <code>null</code>
+	 * @param value the value, or <code>null</code> if the attribute is to be undefined
+	 * @since 3.6
+	 */
+	public void setAttribute(String attributeName, Set value);
+	
+	/**
 	 * Sets the boolean-valued attribute with the given name.  
 	 *
 	 * @param attributeName the name of the attribute, cannot be <code>null</code>
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
index 39e01ce..08be84b 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/ILaunchManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,16 @@ public interface ILaunchManager {
 	 * @since 3.0
 	 */
 	public static final String PROFILE_MODE= "profile"; //$NON-NLS-1$	
+
+	/**
+	 * Launch configuration attribute - a boolean value that indicates if the
+	 * launch configuration is 'private'. A private configuration is one that
+	 * does not appear in the user interface (launch history or the launch
+	 * configuration dialog).
+	 * 
+	 * @since 3.6
+	 */
+	public static final String ATTR_PRIVATE = "org.eclipse.debug.ui.private"; //$NON-NLS-1$
 	
 	/**
 	 * Launch configuration attribute name. The value is a map of environment
@@ -114,12 +124,46 @@ public interface ILaunchManager {
 	 * there is no existing launch configuration with this name, then <code>namePrefix</code>
 	 * is returned.  Otherwise, the value returned consists of the specified prefix plus
 	 * some suffix that guarantees uniqueness.
-	 * 
+	 *
 	 * @param namePrefix the String that the returned name must begin with
 	 * @return launch configuration name
 	 * @since 2.0
+	 * @deprecated since 3.6 clients should use the {@link #generateLaunchConfigurationName(String)} method which
+	 * will perform validation of the name and correct unsupported name parts. 
 	 */
 	public String generateUniqueLaunchConfigurationNameFrom(String namePrefix);
+	
+	/**
+	 * Returns a string that can be used as the name of a launch configuration.  The name
+	 * is guaranteed to be unique (no existing launch configurations will have this name).
+	 * The name that is returned uses the <code>namePrefix</code> as a starting point.  If 
+	 * there is no existing launch configuration with this name, then <code>namePrefix</code>
+	 * is returned.  Otherwise, the value returned consists of the specified prefix plus
+	 * some suffix that guarantees uniqueness.
+	 * <p>
+	 * If the name prefix does not pass name validation any illegal parts of the name will be removed
+	 * during the name generation. Illegal characters will be replaced with '_' and illegal names will be 
+	 * replaced with "_reserved_".
+	 * </p>
+	 * @param namePrefix the string that the returned name should begin with
+	 * @return launch configuration name
+	 * @since 3.6
+	 */
+	public String generateLaunchConfigurationName(String namePrefix);
+	
+	/**
+	 * Returns if the given name is valid or not. If an invalid name part is located 
+	 * an {@link IllegalArgumentException} is thrown.
+	 * 
+	 * @param configname the name to check
+	 * @return true if the given name is valid or throws an exception if not, where an invalid name
+	 * is either a reserved system name (like 'aux' on Win 32) or the name contains invalid characters (like ':' or '/').
+	 * @throws IllegalArgumentException if the name is invalid, where an invalid
+	 * is either a reserved system name (like 'aux' on Win 32) or the name contains invalid characters (like ':' or '/').
+	 * @since 3.6
+	 */
+	public boolean isValidLaunchConfigurationName(String configname) throws IllegalArgumentException;
+	
 	/**
 	 * Returns the collection of debug targets currently registered with this
 	 * launch manager.
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/RefreshUtil.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/RefreshUtil.java
new file mode 100644
index 0000000..2c516a2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/RefreshUtil.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.internal.core.DebugCoreMessages;
+import org.eclipse.debug.internal.core.IMementoConstants;
+import org.eclipse.debug.internal.core.ResourceFactory;
+import org.eclipse.debug.internal.core.XMLMemento;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Utilities for launch configurations that persist, restore, and refresh
+ * collections of resources.
+ * 
+ * @since 3.6
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class RefreshUtil {
+
+	/**
+	 * String attribute identifying a scope of resources that should be
+	 * refreshed - for example, after an external tool is run. The value is either
+	 * a resource memento constant by this class, a resource memento created
+	 * via {@link RefreshUtil#toMemento(IResource[])}, <code>null</code>, indicating no
+	 * refresh.
+	 */
+	public static final String ATTR_REFRESH_SCOPE = DebugPlugin.getUniqueIdentifier() + ".ATTR_REFRESH_SCOPE"; //$NON-NLS-1$
+
+	/**
+	 * Boolean attribute indicating if a refresh scope is recursive. Default
+	 * value is <code>true</code>. When a refresh is recursive, resources are
+	 * refreshed to an infinite depth, otherwise they are refreshed to a depth
+	 * of one.
+	 */
+	public static final String ATTR_REFRESH_RECURSIVE = DebugPlugin.getUniqueIdentifier() + ".ATTR_REFRESH_RECURSIVE"; //$NON-NLS-1$
+	
+	/**
+	 * Resource memento referring to the selected resource's project.
+	 * Only works when the debug user interface is running.
+	 * 
+	 * @see #toResources(String)
+	 */
+	public static final String MEMENTO_SELECTED_PROJECT = "${project}"; //$NON-NLS-1$
+	
+	/**
+	 * Resource memento referring to the selected resource's container.
+	 * Only works when the debug user interface is running.
+	 * 
+	 * @see #toResources(String)
+	 */	
+	public static final String MEMENTO_SELECTED_CONTAINER = "${container}"; //$NON-NLS-1$
+	
+	/**
+	 * Resource memento referring to the selected resource.
+	 * Only works when the debug user interface is running.
+	 * 
+	 * @see #toResources(String)
+	 */	
+	public static final String MEMENTO_SELECTED_RESOURCE = "${resource}"; //$NON-NLS-1$
+	
+	/**
+	 * Resource memento referring to the workspace root.
+	 * 
+	 * @see #toResources(String)
+	 */	
+	public static final String MEMENTO_WORKSPACE = "${workspace}"; //$NON-NLS-1$
+	
+	/**
+	 *  Indicates no working set has been selected (for backwards compatibility).
+	 *  The new format uses an empty working set
+	 */
+	
+	private static final String NO_WORKING_SET = "NONE"; //$NON-NLS-1$
+
+	/**
+	 * Refreshes the resources as specified by the given launch configuration.
+	 * 
+	 * @param resources
+	 *            resources to refresh
+	 * @param depth one of {@link IResource#DEPTH_INFINITE}, {@link IResource#DEPTH_ONE},
+	 *  or {@link IResource#DEPTH_ZERO} 
+	 * @param monitor
+	 *            progress monitor which may be <code>null</code>
+	 * @throws CoreException
+	 *             if an exception occurs while refreshing resources
+	 */
+	public static void refreshResources(IResource[] resources, int depth, IProgressMonitor monitor) throws CoreException {
+		if (monitor == null) {
+			monitor = new NullProgressMonitor();
+		}
+		if (resources == null || resources.length == 0) {
+			return;
+		}
+		if (monitor.isCanceled()) {
+			return;
+		}
+		monitor.beginTask(DebugCoreMessages.RefreshingResources, resources.length);
+		MultiStatus status = new MultiStatus(DebugPlugin.getUniqueIdentifier(), 0, DebugCoreMessages.RefreshingResourcesError, null);
+		for (int i = 0; i < resources.length; i++) {
+			if (monitor.isCanceled())
+				break;
+			if (resources[i] != null && resources[i].isAccessible()) {
+				try {
+					resources[i].refreshLocal(depth, null);
+				} catch (CoreException e) {
+					status.merge(e.getStatus());
+				}
+			}
+			monitor.worked(1);
+		}
+		monitor.done();
+		if (!status.isOK()) {
+			throw new CoreException(status);
+		}
+	}
+
+	/**
+	 * Returns a collection of resources referred to by the specified
+	 * memento generated via {@link #toMemento(IResource[])}.
+	 * 
+	 * @param memento
+	 *            resource memento generated by this manager
+	 * @return collection of resources referred to by the memento
+	 * @throws CoreException
+	 *             if unable to resolve a set of resources
+	 */
+	public static IResource[] toResources(String memento) throws CoreException {
+		if (memento.startsWith("${resource:")) { //$NON-NLS-1$
+			// This is an old format that is replaced with 'working_set'
+			String pathString = memento.substring(11, memento.length() - 1);
+			Path path = new Path(pathString);
+			IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+			if (resource == null) {
+				throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
+						IStatus.ERROR, MessageFormat.format(DebugCoreMessages.RefreshUtil_1,
+								new String[] { pathString }), null));
+			}
+			return new IResource[] { resource };
+		} else if (memento.startsWith("${working_set:")) { //$NON-NLS-1$
+			String ws = memento.substring(14, memento.length() - 1);
+			return getResources(ws);
+		} else if (memento.equals(MEMENTO_WORKSPACE)) {
+			return new IResource[] { ResourcesPlugin.getWorkspace().getRoot() };
+		} else {
+			// result the selected resource for backwards compatibility
+			IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+			IResource resource = null;
+			try {
+				String pathString = manager.performStringSubstitution("${selected_resource_path}"); //$NON-NLS-1$
+				resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(pathString));
+			} catch (CoreException e) {
+				// unable to resolve a resource
+			}
+			if (resource == null) {
+				// empty selection
+				return new IResource[]{};
+			} else {
+				if (memento.equals(MEMENTO_SELECTED_RESOURCE)) {
+					return new IResource[] { resource };
+				} else if (memento.equals(MEMENTO_SELECTED_CONTAINER)) {
+					return new IResource[] {resource.getParent()};
+				} else if (memento.equals(MEMENTO_SELECTED_PROJECT)) {
+					return new IResource[] {resource.getProject()};
+				}
+			}
+		}
+		throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), MessageFormat.format(DebugCoreMessages.RefreshUtil_0, new String[]{memento})));
+	}
+	
+	/**
+	 * Returns a memento for a collection of resources that can be restored
+	 * via {@link #toResources(String)}.
+	 * 
+	 * @param resources resources to create a memento for
+	 * @return memento for the given resources
+	 */
+	public static String toMemento(IResource[] resources) {
+		XMLMemento memento = XMLMemento.createWriteRoot("resources"); //$NON-NLS-1$
+		for (int i = 0; i < resources.length; i++) {
+			final XMLMemento itemMemento = memento.createChild(IMementoConstants.MEMENTO_ITEM);
+			ResourceFactory.saveState(itemMemento, resources[i]);
+		}
+		StringWriter writer = new StringWriter();
+		try {
+			memento.save(writer);
+		} catch (IOException e) {
+			DebugPlugin.log(e);
+		}
+		StringBuffer buf = new StringBuffer();
+		buf.append("${working_set:"); //$NON-NLS-1$
+		buf.append(writer.toString());
+		buf.append("}"); //$NON-NLS-1$
+		return buf.toString();
+	}
+	
+	/**
+	 * Restores a collection of resources from a working set memento, for backwards
+	 * compatibility.
+	 * 
+	 * @param wsMemento working set memento
+	 * @return resource collection, possibly empty
+	 */
+	private static IResource[] getResources(String wsMemento) {
+
+		if (NO_WORKING_SET.equals(wsMemento)) {
+			return null;
+		}
+
+		List resourcesList = new ArrayList();
+		StringReader reader = new StringReader(wsMemento);
+
+		XMLMemento memento = null;
+		try {
+			memento = XMLMemento.createReadRoot(reader);
+		} catch (Exception e) {
+			DebugPlugin.log(e);
+			return null;
+		}
+
+		XMLMemento[] mementos = memento
+				.getChildren(IMementoConstants.MEMENTO_ITEM);
+		for (int i = 0; i < mementos.length; i++) {
+			resourcesList.add(ResourceFactory.createElement(mementos[i]));
+		}
+
+		return (IResource[]) resourcesList.toArray(new IResource[resourcesList.size()]);
+
+	}	
+	
+	/**
+	 * Returns whether the refresh scope specified by the given launch
+	 * configuration is recursive.
+	 * 
+	 * @param configuration
+	 * @return whether the refresh scope is recursive
+	 * @throws CoreException
+	 *             if unable to access the associated attribute
+	 */
+	public static  boolean isRefreshRecursive(ILaunchConfiguration configuration) throws CoreException {
+		return configuration.getAttribute(ATTR_REFRESH_RECURSIVE, true);
+	}	
+	
+	/**
+	 * Refreshes the resources as specified by the given launch configuration via its
+	 * {@link RefreshUtil#ATTR_REFRESH_SCOPE} and {@link #ATTR_REFRESH_RECURSIVE} attributes.
+	 * 
+	 * @param configuration launch configuration
+	 * @param monitor progress monitor which may be <code>null</code>
+	 * @throws CoreException
+	 *             if an exception occurs while refreshing resources or accessing launch
+	 *             configuration attributes
+	 */
+	public static void refreshResources(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		String scope = configuration.getAttribute(ATTR_REFRESH_SCOPE, (String) null);
+		if (scope != null) {
+			IResource[] resources = toResources(scope);
+			if (resources != null && resources.length > 0) {
+				int depth = IResource.DEPTH_ONE;
+				if (isRefreshRecursive(configuration)) {
+					depth = IResource.DEPTH_INFINITE;
+				}
+				refreshResources(resources, depth, monitor);
+			}
+		}
+	}	
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/AbstractDebugCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/AbstractDebugCommand.java
new file mode 100644
index 0000000..1dc6b99
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/AbstractDebugCommand.java
@@ -0,0 +1,407 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core.commands;
+
+import java.util.LinkedHashSet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.internal.core.DebugOptions;
+
+/**
+ * Abstract implementation of a debug command handler. Handles {@link IDebugCommandRequest}
+ * and {@link IEnabledStateRequest} updates asynchronously using jobs.
+ * <p>
+ * Clients may subclass this class.
+ * </p>
+ * @since 3.6
+ */
+public abstract class AbstractDebugCommand implements IDebugCommandHandler {
+	
+	/**
+	 * Job to update enabled state of action.
+	 */
+	private class UpdateJob extends Job implements IJobChangeListener {
+		
+		/**
+		 * The request to update
+		 */
+		private IEnabledStateRequest request;
+		
+		/**
+		 * Whether this job has been run
+		 */
+		private boolean run = false;
+		
+		/**
+		 * Creates a new job to update the specified request
+		 * 
+		 * @param stateRequest
+		 */
+		UpdateJob(IEnabledStateRequest stateRequest) {
+			super(getEnabledStateTaskName());
+			request = stateRequest;
+			setSystem(true);
+			setRule(getEnabledStateSchedulingRule(request));
+			getJobManager().addJobChangeListener(this);
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+		 */
+		protected IStatus run(IProgressMonitor monitor) {
+			run = true;
+			if (DebugOptions.DEBUG_COMMANDS) {
+				System.out.print("can execute command: " + AbstractDebugCommand.this); //$NON-NLS-1$
+			}
+			if (monitor.isCanceled()) {
+				if (DebugOptions.DEBUG_COMMANDS) {
+					System.out.println(" >> *CANCELED* <<"); //$NON-NLS-1$
+				}
+				request.cancel();
+			}
+			Object[] elements = request.getElements();
+			Object[] targets = new Object[elements.length];
+			if (!request.isCanceled()) {
+				for (int i = 0; i < elements.length; i++) {
+					targets[i] = getTarget(elements[i]);
+					if (targets[i] == null) {
+						request.setEnabled(false);
+						request.cancel();
+						if (DebugOptions.DEBUG_COMMANDS) {
+							System.out.println(" >> false (no adapter)"); //$NON-NLS-1$
+						}
+					}
+				}
+				if (monitor.isCanceled()) {
+					request.cancel();
+				}
+			}
+			if (!request.isCanceled()) {
+				targets = coalesce(targets);
+				monitor.beginTask(getEnabledStateTaskName(), targets.length);
+				try {
+					boolean executable = isExecutable(targets, monitor, request);
+					if (DebugOptions.DEBUG_COMMANDS) {
+						System.out.println(" >> " + executable); //$NON-NLS-1$
+					}
+					request.setEnabled(executable);
+				} catch (CoreException e) {
+					request.setStatus(e.getStatus());
+					request.setEnabled(false);
+					if (DebugOptions.DEBUG_COMMANDS) {
+						System.out.println(" >> ABORTED"); //$NON-NLS-1$
+						System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$
+					}
+				}
+			}
+			monitor.setCanceled(request.isCanceled());
+			request.done();
+			monitor.done();
+			return Status.OK_STATUS;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+		 */
+		public boolean belongsTo(Object family) {
+			Object myFamily = getEnabledStateJobFamily(request);
+			if (myFamily != null) {
+				return myFamily.equals(family);
+			}
+			return false;
+		}
+
+		public void aboutToRun(IJobChangeEvent event) {
+		}
+
+		public void awake(IJobChangeEvent event) {
+		}
+
+		public void done(IJobChangeEvent event) {
+			if (event.getJob() == this) {
+				if (!run) {
+					request.cancel();
+					request.done();
+					if (DebugOptions.DEBUG_COMMANDS) {
+						System.out.println(" >> *CANCELED* <<" + AbstractDebugCommand.this); //$NON-NLS-1$
+					}
+				}
+				getJobManager().removeJobChangeListener(this);
+			}
+		}
+
+		public void running(IJobChangeEvent event) {
+		}
+
+		public void scheduled(IJobChangeEvent event) {
+		}
+
+		public void sleeping(IJobChangeEvent event) {
+		}
+				
+	}
+	
+	/**
+	 * Scheduling rule to serialize commands on an object
+	 */
+   private class SerialPerObjectRule implements ISchedulingRule {
+
+		private Object fObject = null;
+
+		public SerialPerObjectRule(Object lock) {
+			fObject = lock;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
+		 */
+		public boolean contains(ISchedulingRule rule) {
+			return rule == this;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
+		 */
+		public boolean isConflicting(ISchedulingRule rule) {
+			if (rule instanceof SerialPerObjectRule) {
+				SerialPerObjectRule vup = (SerialPerObjectRule) rule;
+				return fObject == vup.fObject;
+			}
+			return false;
+		}
+
+	}
+   
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.commands.IDebugCommandHandler#execute(org.eclipse.debug.core.commands.IDebugCommandRequest)
+	 */
+	public boolean execute(final IDebugCommandRequest request) {
+		Job job = new Job(getExecuteTaskName()) {
+			protected IStatus run(IProgressMonitor monitor) {
+				if (DebugOptions.DEBUG_COMMANDS) {
+					System.out.println("execute: " + AbstractDebugCommand.this); //$NON-NLS-1$
+				}
+				Object[] elements = request.getElements();
+				Object[] targets = new Object[elements.length];
+				for (int i = 0; i < elements.length; i++) {
+					targets[i]= getTarget(elements[i]);
+				}
+				targets = coalesce(targets);
+				monitor.beginTask(getExecuteTaskName(), targets.length);
+				try {
+					doExecute(targets, monitor, request);
+				} catch (CoreException e) {
+					request.setStatus(e.getStatus());
+					if (DebugOptions.DEBUG_COMMANDS) {
+						System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$
+					}
+				}
+				request.done();
+				monitor.setCanceled(request.isCanceled());
+				monitor.done();
+				return Status.OK_STATUS;
+			}
+			public boolean belongsTo(Object family) {
+				Object jobFamily = getExecuteJobFamily(request);
+				if (jobFamily != null) {
+					return jobFamily.equals(family);
+				}
+				return false;
+			}
+		};
+		job.setSystem(true);
+		job.setRule(getExecuteSchedulingRule(request));
+		job.schedule();
+		return isRemainEnabled(request);
+	}	
+	
+	/**
+	 * Returns whether this command should remain enabled after starting execution of the specified request.
+	 * 
+	 * @param request the request being executed
+	 * @return whether to remain enabled while executing the request
+	 */
+	protected boolean isRemainEnabled(IDebugCommandRequest request) {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.commands.IDebugCommandHandler#canExecute(org.eclipse.debug.core.commands.IEnabledStateRequest)
+	 */
+	public void canExecute(final IEnabledStateRequest request) {
+		Job job = new UpdateJob(request);
+		job.schedule();
+	}
+	
+	/**
+	 * Returns the name to use for a job and progress monitor task names when performing
+	 * an {@link IEnabledStateRequest}.
+	 * 
+	 * @return task name
+	 */
+	protected String getEnabledStateTaskName() {
+		// this is a system job name and does not need to be NLS'd
+		return "Check Debug Command"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Returns the name to use for jobs and progress monitor task names when executing
+	 * an {@link IDebugCommandRequest}.
+	 * 
+	 * @return task name
+	 */
+	protected String getExecuteTaskName() {
+		// this is a system job name and does not need to be NLS'd
+		return "Execute Debug Command"; //$NON-NLS-1$
+	}	
+
+	/**
+	 * Executes this command synchronously on the specified targets, reporting progress. This method
+	 * is called by a job. If an exception is thrown, the calling job will set the associated status
+	 * on the request object. The calling job also calls #done() on the request object after this method
+	 * is called, and sets a cancel status on the progress monitor if the request is canceled. 
+	 * <p>
+	 * Handlers must override this method.
+	 * </p>
+	 * @param targets objects to perform this command on
+	 * @param monitor progress monitor
+	 * @param request can be used to cancel this command
+	 * @exception CoreException if this handler fails to perform the request
+	 */
+	protected abstract void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException;
+
+	/**
+	 * Returns whether this command is executable on the specified targets, reporting progress. This method
+	 * is called by a job. If an exception is thrown, the calling job will set the associated status
+	 * on the request object and report that this command is not enabled. The calling job also calls #done()
+	 * on the request object after this method is called, and sets a cancel status on the progress monitor if
+	 * the request is canceled. Enabled state is set to <code>false</code> if the request is canceled. 
+	 * <p>
+	 * Handlers must override this method.
+	 * </p>
+	 * @param targets objects to check command enabled state for
+	 * @param monitor progress monitor
+	 * @param request can be used to cancel this update request
+	 * @return whether this command can be executed for the given targets
+	 */
+	protected abstract boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request) throws CoreException;
+	
+	/**
+	 * Returns the appropriate target for this command handler for the given object.
+	 * This method is called to map each element in a command request to the target
+	 * object that is used in {@link #doExecute(Object[], IProgressMonitor, IRequest)}
+	 * and {@link #isExecutable(Object[], IProgressMonitor, IEnabledStateRequest)}.
+	 * The target may be the element itself, or some other object. Allows for redirection.
+	 * <p>
+	 * Clients must override this method.
+	 * </p>
+	 * @param element element from a {@link IDebugCommandRequest} 
+	 * @return associated target object for execution or enabled state update. Cannot return <code>null</code>.
+	 */
+	protected abstract Object getTarget(Object element); 
+	
+	/**
+	 * Convenience method to return an adapter of the specified type for the given object or <code>null</code>
+	 * if none.
+	 * 
+	 * @param element element to retrieve adapter for
+	 * @param type adapter type
+	 * @return adapter or <code>null</code>
+	 */
+	protected Object getAdapter(Object element, Class type) {
+    	return DebugPlugin.getAdapter(element, type);	
+	}	
+	
+	/**
+	 * Returns a scheduling rule for this command's {@link IEnabledStateRequest} update job
+	 * or <code>null</code> if none. By default a rule is created to serialize
+	 * jobs on the first element in the request.
+	 * <p>
+	 * Clients may override this method as required.
+	 * </p>
+	 * @param request request that a scheduling rule is required for
+	 * @return scheduling rule or <code>null</code>
+	 */
+	protected ISchedulingRule getEnabledStateSchedulingRule(IDebugCommandRequest request) {
+		return new SerialPerObjectRule(request.getElements()[0]);
+	}
+	
+	/**
+	 * Returns a scheduling rule for this command's {@link IDebugCommandRequest} execute job
+	 * or <code>null</code> if none. By default, execution jobs have no scheduling rule.
+	 * <p>
+	 * Clients may override this method as required.
+	 * </p>
+	 * @param request request that a scheduling rule is required for
+	 * @return scheduling rule or <code>null</code>
+	 */
+	protected ISchedulingRule getExecuteSchedulingRule(IDebugCommandRequest request) {
+		return null;
+	}
+	
+	/**
+	 * Returns the job family for the this command's {@link IEnabledStateRequest} update job
+	 * or <code>null</code> if none. The default implementation returns <code>null</code>.
+	 * <p>
+	 * Clients may override this method as required.
+	 * </p>
+	 * @param request request the job family is required for
+	 * @return job family object or <code>null</code> if none
+	 */
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
+		return null;
+	}	
+	
+	/**
+	 * Returns the job family for the this command's {@link IDebugCommandRequest} execute job
+	 * or <code>null</code> if none. The default implementation returns <code>null</code>.
+	 * <p>
+	 * Clients may override this method as required.
+	 * </p>
+	 * @param request request the job family is required for
+	 * @return job family object or <code>null</code> if none
+	 */
+	protected Object getExecuteJobFamily(IDebugCommandRequest request) {
+		return null;
+	}	
+	
+	/**
+	 * Returns an array of objects with duplicates removed, if any.
+	 * 
+	 * @param objects array of objects
+	 * @return array of object in same order with duplicates removed, if any.
+	 */
+	private Object[] coalesce(Object[] objects) {
+		if (objects.length == 1) {
+			return objects;
+		} else {
+			LinkedHashSet set = new LinkedHashSet(objects.length);
+			for (int i = 0; i < objects.length; i++) {
+				set.add(objects[i]);
+			}
+			return set.toArray();
+		}
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IDebugCommandHandler.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IDebugCommandHandler.java
index 9769aac..fae4ef9 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IDebugCommandHandler.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IDebugCommandHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public interface IDebugCommandHandler {
 	 * given request. Errors can reported by setting an appropriate status
 	 * on the given request. A request can be canceled by this handler or the caller. 
 	 * A <code>null</code> status is equivalent to an OK status. When a request is
-	 * complete, has encountered an error, or cancelled, implementations must call
+	 * complete, has encountered an error, or canceled, implementations must call
 	 * <code>done()</code> on the given collector.
 	 * </p>
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java
new file mode 100644
index 0000000..0969d70
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/commands/IRestartHandler.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.core.commands;
+
+/**
+ * A restart command allows the debugger to quickly restart the current debug 
+ * session without terminating and re-launching.  
+ * <p>
+ * Clients may implement this interface. The debug platform provides a
+ * restart action that delegates to this handler interface. Platform does not 
+ * provide a default implementation of this handler, so to enable this action
+ * the debugger implementation must provide one.
+ * </p>
+ * 
+ * @since 3.6
+ */
+public interface IRestartHandler extends IDebugCommandHandler {
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate.java
index ac331fa..7484f8d 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.debug.core.model;
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate2.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate2.java
index c37339e..422124f 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate2.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/ILaunchConfigurationDelegate2.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.debug.core.model;
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
index 3bd24ed..1a8b8fe 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -111,7 +111,7 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
 		fName= name;
 		fTerminated= true;
 		try {
-			process.exitValue();
+			fExitValue = process.exitValue();
 		} catch (IllegalThreadStateException e) {
 			fTerminated= false;
 		}
@@ -144,7 +144,7 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
 	/**
 	 * @see ITerminate#canTerminate()
 	 */
-	public boolean canTerminate() {
+	public synchronized boolean canTerminate() {
 		return !fTerminated;
 	}
 
@@ -183,7 +183,7 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
 	/**
 	 * @see ITerminate#isTerminated()
 	 */
-	public boolean isTerminated() {
+	public synchronized boolean isTerminated() {
 		return fTerminated;
 	}
 
@@ -230,15 +230,27 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
 	 * has terminated.
 	 */
 	protected void terminated() {
-		if (fStreamsProxy instanceof StreamsProxy) {
-			((StreamsProxy)fStreamsProxy).close();
-		}
-		fTerminated= true;
-		try {
-			fExitValue = fProcess.exitValue();
-		} catch (IllegalThreadStateException ie) {
+        if (fStreamsProxy instanceof StreamsProxy) {
+            ((StreamsProxy)fStreamsProxy).close();
+        }
+
+        
+        // Avoid calling IProcess.exitValue() inside a sync section (Bug 311813).
+        int exitValue = -1;
+        boolean running = false;
+        try {
+            exitValue = fProcess.exitValue();
+        } catch (IllegalThreadStateException ie) {
+            running = true;
+        }
+        
+		synchronized (this) {
+			fTerminated= true;
+			if (!running) {
+			    fExitValue = exitValue;
+			}
+			fProcess= null;
 		}
-		fProcess= null;
 		fireTerminateEvent();
 	}
 		
@@ -353,7 +365,7 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
 	/**
 	 * @see IProcess#getExitValue()
 	 */
-	public int getExitValue() throws DebugException {
+	public synchronized int getExitValue() throws DebugException {
 		if (isTerminated()) {
 			return fExitValue;
 		} 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.java
index 3cda6cb..1060e58 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupDirector.java
@@ -255,15 +255,17 @@ public abstract class AbstractSourceLookupDirector implements ISourceLookupDirec
 				abort(SourceLookupMessages.AbstractSourceLookupDirector_11, null); 
 			}
 			ISourceContainerType type = DebugPlugin.getDefault().getLaunchManager().getSourceContainerType(typeId);
-			if(type == null) {
-				abort(MessageFormat.format(SourceLookupMessages.AbstractSourceLookupDirector_12, new String[]{typeId}), null); 
-			}			
-			String memento = element.getAttribute(CONTAINER_MEMENTO_ATTR);
-			if (memento == null || memento.equals("")) {	 //$NON-NLS-1$
-				abort(SourceLookupMessages.AbstractSourceLookupDirector_13, null); 
+			if(type != null) {		
+				String memento = element.getAttribute(CONTAINER_MEMENTO_ATTR);
+				if (memento == null || memento.equals("")) {	 //$NON-NLS-1$
+					abort(SourceLookupMessages.AbstractSourceLookupDirector_13, null); 
+				}
+				ISourceContainer container = type.createSourceContainer(memento);
+				containers.add(container);
 			}
-			ISourceContainer container = type.createSourceContainer(memento);
-			containers.add(container);
+			else {
+				abort(MessageFormat.format(SourceLookupMessages.AbstractSourceLookupDirector_12, new String[]{typeId}), null); 
+			}	
 		}	
 		return containers;
 	}
@@ -487,6 +489,17 @@ public abstract class AbstractSourceLookupDirector implements ISourceLookupDirec
 		SourceLookupQuery query = new SourceLookupQuery(element);
 		SafeRunner.run(query);
 		List sources = query.getSourceElements();
+		Throwable exception = query.getException();
+		if (exception != null) {
+			if (exception instanceof CoreException) {
+				CoreException ce = (CoreException) exception;
+				if (ce.getStatus().getSeverity() == IStatus.ERROR) {
+					DebugPlugin.log(ce);
+				}
+			} else {
+				DebugPlugin.log(exception);
+			}
+		}
 		query.dispose();
 		return sources;
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupParticipant.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupParticipant.java
index d0272f5..3640d76 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupParticipant.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/AbstractSourceLookupParticipant.java
@@ -66,7 +66,9 @@ public abstract class AbstractSourceLookupParticipant implements ISourceLookupPa
 					if (container != null) {
 						Object[] objects = container.findSourceElements(name);
 						if (objects.length > 0) {
-							if (isFindDuplicates()) {
+							//it will only not be null when we care about duplicates
+							//saves the computation in isFindDuplicates()
+							if (results != null) {
 								for (int j = 0; j < objects.length; j++) {
 									results.add(objects[j]);
 								}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainerTypeDelegate.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainerTypeDelegate.java
index 77aea74..cffc4da 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainerTypeDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/AbstractSourceContainerTypeDelegate.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.debug.core.sourcelookup.containers;
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/CompositeSourceContainer.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/CompositeSourceContainer.java
index ab02542..ca07e6a 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/CompositeSourceContainer.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/CompositeSourceContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,7 +78,9 @@ public abstract class CompositeSourceContainer extends AbstractSourceContainer {
 			try {
 				Object[] objects = container.findSourceElements(name);
 				if (objects.length > 0) {
-					if (isFindDuplicates()) {
+					//it will only not be null when we care about duplicates
+					//saves the computation in isFindDuplicates()
+					if (results != null) {
 						for (int j = 0; j < objects.length; j++) {
 							results.add(objects[j]);
 						}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
index cfdea07..fc9ea66 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -101,7 +101,7 @@ public abstract class ContainerSourceContainer extends CompositeSourceContainer
 					return EMPTY;
 				}
 				// See bug 98090 - we need to handle relative path names
-				IFileStore target = fRootFile.getChild(new Path(name));
+				IFileStore target = fRootFile.getFileStore(new Path(name));
 				if (target.fetchInfo().exists()) {
 					// We no longer have to account for bug 95832, and URIs take care
 					// of canonical paths (fix to bug 95679 was removed).
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index 84156ab..a369fad 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -142,11 +142,6 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
 	private static BreakpointManagerVisitor fgVisitor;
 	
 	/**
-	 * Whether or not this breakpoint manager is enabled.
-	 */
-	private boolean fEnabled= true;
-	
-	/**
 	 * Collection of breakpoint manager listeners which are
 	 * notified when this manager's state changes.
 	 */
@@ -1023,15 +1018,15 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
 	 * @see org.eclipse.debug.core.IBreakpointManager#isEnabled()
 	 */
 	public boolean isEnabled() {
-		return fEnabled;
+		return Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_BREAKPOINT_MANAGER_ENABLED_STATE, true, null);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.core.IBreakpointManager#setEnabled(boolean)
 	 */
 	public void setEnabled(final boolean enabled) {
-        if (fEnabled != enabled) {
-    		fEnabled= enabled;
+        if (isEnabled() != enabled) {
+        	Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_BREAKPOINT_MANAGER_ENABLED_STATE, enabled, null);
             IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
                 public void run(IProgressMonitor monitor) throws CoreException {
                     IBreakpoint[] breakpoints = getBreakpoints();
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
index 23dca1e..452c063 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *  IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.debug.internal.core;
@@ -51,6 +51,12 @@ public class DebugCoreMessages extends NLS {
 	public static String LaunchConfiguration_8;
 	public static String LaunchConfiguration_9;
 	public static String LaunchConfigurationInfo_35;
+	public static String LaunchConfigurationType_0;
+
+	public static String LaunchConfigurationType_1;
+
+	public static String LaunchConfigurationType_2;
+
 	public static String LaunchConfigurationType_7;
 
 	public static String LaunchConfigurationWorkingCopy_0;
@@ -96,11 +102,21 @@ public class DebugCoreMessages extends NLS {
 	public static String LaunchConfigurationWorkingCopy_4;
 	public static String LaunchConfigurationWorkingCopy_Specified_container_for_launch_configuration_does_not_exist_2;
 	public static String LaunchConfigurationWorkingCopy_5;
+
+	public static String LaunchConfigurationWorkingCopy_6;
+
+	public static String LaunchConfigurationWorkingCopy_7;
+
+	public static String LaunchConfigurationWorkingCopy_8;
 	public static String LaunchManager__0__occurred_while_reading_launch_configuration_file__1___1;
 	public static String LaunchManager_Invalid_launch_configuration_index__18;
 	public static String LaunchManager_does_not_exist;
 
 	public static String LaunchManager_does_not_exist_no_store_found;
+
+	public static String LaunchManager_invalid_config_name;
+
+	public static String LaunchManager_invalid_config_name_char;
 	public static String LaunchManager_Source_locator_does_not_exist___0__13;
 	public static String LogicalStructureType_0;
 	public static String OutputStreamMonitor_label;
@@ -109,6 +125,13 @@ public class DebugCoreMessages extends NLS {
 	public static String RuntimeProcess_Exit_value_not_available_until_process_terminates__1;
 	public static String WatchExpression_0;
 	public static String NullStreamsProxy_0;
+	
+	public static String RefreshingResources;
+	public static String RefreshingResourcesError;
+
+	public static String RefreshUtil_0;
+
+	public static String RefreshUtil_1;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
index a9f99dc..1b96d0c 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
@@ -65,6 +65,9 @@ LaunchConfigurationWorkingCopy_1=Writing local file
 LaunchConfigurationWorkingCopy_2=Creating new file {0}.launch in workspace
 LaunchConfigurationWorkingCopy_3=Setting contents of {0}.launch
 LaunchConfigurationWorkingCopy_4=Unable to obtain storage to write launch configuration
+LaunchConfigurationWorkingCopy_6=Template cannot be a working copy.
+LaunchConfigurationWorkingCopy_7=Templates cannot be nested
+LaunchConfigurationWorkingCopy_8=Specified configuration is not a template
 LaunchManager__0__occurred_while_reading_launch_configuration_file__1___1={0} occurred while reading launch configuration file: {1}.
 LaunchManager_Invalid_launch_configuration_index__18=Invalid launch configuration index.
 LaunchManager_does_not_exist=Launch configuration {0} at {1} does not exist.
@@ -81,6 +84,8 @@ LaunchManager_29=Importing launch configurations
 # For example if we have a config named 'test' and we created a new one from test
 # we would get 'test (1)', where test is the basename, and 1 is the numerical modifier
 LaunchManager_31={0} ({1})
+LaunchManager_invalid_config_name=''{0}'' is an invalid configuration name
+LaunchManager_invalid_config_name_char=''{0}'' is an invalid character in a configuration name
 LaunchDelegate_0=No description provided.
 LaunchDelegate_1={0} Launcher
 LaunchDelegate_2={0} launcher
@@ -95,6 +100,13 @@ OutputStreamMonitor_label=Output Stream Monitor
 ProcessMonitorJob_0=Process monitor
 RuntimeProcess_terminate_failed=Terminate failed
 RuntimeProcess_Exit_value_not_available_until_process_terminates__1=Exit value not available until process terminates.
+LaunchConfigurationType_0=Error retrieving template
+LaunchConfigurationType_1=Error setting template
+LaunchConfigurationType_2=Local configuration cannot be nested in a directory.
 LaunchConfigurationType_7=Launch mode not supported: {0}
 WatchExpression_0=(Watch expressions not supported)
 NullStreamsProxy_0=Null Stream Monitor
+RefreshingResources=Refresh resources...
+RefreshingResourcesError=Exception(s) occurred during refresh.
+RefreshUtil_0=Unable to restore resource memento: {0}
+RefreshUtil_1=Refresh scope refers to non-existent resource {0}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
index 269c74c..9e28969 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.core;
 
-import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.debug.core.DebugPlugin;
 
@@ -25,11 +24,13 @@ public class DebugPreferenceInitializer extends AbstractPreferenceInitializer {
 	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
 	 */
 	public void initializeDefaultPreferences() {
-		Preferences prefs = DebugPlugin.getDefault().getPluginPreferences();
 		// Step filter preferences
-		prefs.setDefault(StepFilterManager.PREF_USE_STEP_FILTERS, false);
-		prefs.setDefault(LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true);
-		prefs.setDefault(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true);
+		Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), StepFilterManager.PREF_USE_STEP_FILTERS, false);
+		//launch configurations preferences
+		Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true);
+		Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true);
+		Preferences.setDefaultBoolean(DebugPlugin.getUniqueIdentifier(), IInternalDebugCoreConstants.PREF_BREAKPOINT_MANAGER_ENABLED_STATE, true);
+		Preferences.savePreferences(DebugPlugin.getUniqueIdentifier());
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
index e69a1d9..17d3b61 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ExpressionManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,6 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.DebugPlugin;
@@ -150,7 +149,7 @@ public class ExpressionManager extends PlatformObject implements IExpressionMana
 	 * 		will cause an infinite loop (see Bug 27281).
 	 */
 	private void loadPersistedExpressions() {
-		String expressionsString= DebugPlugin.getDefault().getPluginPreferences().getString(PREF_WATCH_EXPRESSIONS);
+		String expressionsString = Platform.getPreferencesService().getString(DebugPlugin.getUniqueIdentifier(), PREF_WATCH_EXPRESSIONS, IInternalDebugCoreConstants.EMPTY_STRING, null);
 		if (expressionsString.length() == 0) {
 			return;
 		}
@@ -213,8 +212,7 @@ public class ExpressionManager extends PlatformObject implements IExpressionMana
 	 * preference store. 
 	 */
 	public void storeWatchExpressions() {
-		Preferences prefs= DebugPlugin.getDefault().getPluginPreferences();
-		String expressionString= ""; //$NON-NLS-1$
+		String expressionString = IInternalDebugCoreConstants.EMPTY_STRING;
 		try {
 			expressionString= getWatchExpressionsAsXML();
 		} catch (IOException e) {
@@ -224,7 +222,7 @@ public class ExpressionManager extends PlatformObject implements IExpressionMana
 		} catch (TransformerException e) {
 			DebugPlugin.log(e);
 		}
-		prefs.setValue(PREF_WATCH_EXPRESSIONS, expressionString);
+		Preferences.setString(DebugPlugin.getUniqueIdentifier(), PREF_WATCH_EXPRESSIONS, expressionString, null);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IExpressionsListener2.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IExpressionsListener2.java
index a29b28f..be3ee7d 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IExpressionsListener2.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IExpressionsListener2.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.debug.internal.core;
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
index cbcf068..8fc33db 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,11 @@ public interface IInternalDebugCoreConstants {
 	 */
 	public static final String PREF_ENABLE_STATUS_HANDLERS = DebugPlugin.getUniqueIdentifier() + ".PREF_ENABLE_STATUS_HANDLERS"; //$NON-NLS-1$
 
-	
+	/**
+	 * Persistence of breakpoint manager enabled state.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PREF_BREAKPOINT_MANAGER_ENABLED_STATE =  DebugPlugin.getUniqueIdentifier() + ".PREF_BREAKPOINT_MANAGER_ENABLED_STATE"; //$NON-NLS-1$
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IMementoConstants.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IMementoConstants.java
new file mode 100644
index 0000000..ed9f1e8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IMementoConstants.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+public interface IMementoConstants {
+	// These persistence constant is stored in XML. Do not
+	// change it.
+	public static final String TAG_FACTORY_ID = "factoryID"; //$NON-NLS-1$
+	
+	public static final String TAG_EDITOR_STATE = "editorState"; //$NON-NLS-1$
+
+	public static final String MEMENTO_ITEM = "item"; //$NON-NLS-1$
+
+	public static final String TAG_EDIT_PAGE_ID = "editPageId"; //$NON-NLS-1$
+
+	public static final String TAG_NAME = "name"; //$NON-NLS-1$
+
+	public static final String TAG_LABEL = "label"; //$NON-NLS-1$
+
+	public static final String TAG_ID = "id"; //$NON-NLS-1$
+
+	public static final String TAG_LAUNCH_CONFIGURATION_WORKING_SET = "launchConfigurationWorkingSet"; //$NON-NLS-1$
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
index d2a5dc9..933dabf 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@ import java.util.Vector;
 import org.eclipse.debug.core.DebugPlugin;
 
 /**
- * Writes to the input stream of a system process, 
+ * Writes to the input stream of a system process,
  * queueing output if the stream is blocked.
  * 
  * The input stream monitor writes to system in via
@@ -47,17 +47,32 @@ public class InputStreamMonitor {
 	 * Whether the underlying output stream has been closed
 	 */
 	private boolean fClosed = false;
+
+	/**
+	 * The encoding of the input stream.
+	 */
+	private String fEncoding;
 	
 	/**
-	 * Creates an input stream monitor which writes
-	 * to system in via the given output stream.
+	 * Creates an input stream monitor which writes to system in via the given output stream.
 	 * 
 	 * @param stream output stream
 	 */
 	public InputStreamMonitor(OutputStream stream) {
+		this(stream, null);
+	}	
+
+	/**
+	 * Creates an input stream monitor which writes to system in via the given output stream.
+	 * 
+	 * @param stream output stream
+	 * @param encoding stream encoding or <code>null</code> for system default
+	 */
+	public InputStreamMonitor(OutputStream stream, String encoding) {
 		fStream= stream;
 		fQueue= new Vector();
 		fLock= new Object();
+		fEncoding= encoding;
 	}
 	
 	/**
@@ -83,8 +98,8 @@ public class InputStreamMonitor {
 				public void run() {
 					write();
 				}
-			}, DebugCoreMessages.InputStreamMonitor_label); 
-            fThread.setDaemon(true);
+			}, DebugCoreMessages.InputStreamMonitor_label);
+			fThread.setDaemon(true);
 			fThread.start();
 		}
 	}
@@ -97,7 +112,7 @@ public class InputStreamMonitor {
 		if (fThread != null) {
 			Thread thread= fThread;
 			fThread= null;
-			thread.interrupt(); 
+			thread.interrupt();
 		}
 	}
 	
@@ -125,7 +140,10 @@ public class InputStreamMonitor {
 			String text = (String)fQueue.firstElement();
 			fQueue.removeElementAt(0);
 			try {
-				fStream.write(text.getBytes());
+				if (fEncoding != null)
+					fStream.write(text.getBytes(fEncoding));
+				else
+					fStream.write(text.getBytes());
 				fStream.flush();
 			} catch (IOException e) {
 				DebugPlugin.log(e);
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
index 141f43e..3f6e6ae 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -282,9 +282,6 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
 							 DebugException.REQUEST_FAILED, DebugCoreMessages.LaunchConfiguration_Failed_to_delete_launch_configuration__1, null) 
 						);
 					}
-					// manually update the launch manager cache since there
-					// will be no resource delta
-					getLaunchManager().launchConfigurationDeleted(this);
 				}
 			} else {
 				// Delete the resource using IFile API such that
@@ -298,6 +295,8 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
 				}
 				file.delete(true, null);
 			}
+			// update the launch manager cache synchronously
+			getLaunchManager().launchConfigurationDeleted(this);
 		}
 	}
 
@@ -793,6 +792,7 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
 					throw new CoreException(status);
 				}
 			}
+			launch.setAttribute(DebugPlugin.ATTR_LAUNCH_TIMESTAMP, Long.toString(System.currentTimeMillis()));
 			boolean captureOutput = getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
 			if(!captureOutput) {
 			    launch.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, "false"); //$NON-NLS-1$
@@ -857,6 +857,12 @@ public class LaunchConfiguration extends PlatformObject implements ILaunchConfig
 					getLaunchManager().removeLaunch(launch);
 				}
 				throw e;
+			} catch (RuntimeException e) {
+				// if there was a runtime exception, and the launch is empty, remove it
+				if (!launch.hasChildren()) {
+					getLaunchManager().removeLaunch(launch);
+				}
+				throw e;
 			}
 			if (monitor.isCanceled()) {
 				getLaunchManager().removeLaunch(launch);
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationInfo.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationInfo.java
index db79a6a..0b9cde3 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationInfo.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.debug.internal.core;
  
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -44,7 +45,7 @@ import com.ibm.icu.text.MessageFormat;
 public class LaunchConfigurationInfo {
 	
 	/**
-	 * Constants fo XML element names and attrbiutes
+	 * Constants for XML element names and attributes
 	 */
 	private static final String KEY = "key"; //$NON-NLS-1$
 	private static final String VALUE = "value"; //$NON-NLS-1$
@@ -445,8 +446,11 @@ public class LaunchConfigurationInfo {
 	protected Element createSetElement(Document doc, String elementType, String setKey, Set set) {
 		Element setElement = doc.createElement(elementType);
 		setElement.setAttribute(KEY, setKey);
+		// persist in sorted order
+		List list = new ArrayList(set);
+		Collections.sort(list);
 		Element element = null;
-		for(Iterator iter = set.iterator(); iter.hasNext();) {
+		for(Iterator iter = list.iterator(); iter.hasNext();) {
 			element = doc.createElement(SET_ENTRY);
 			element.setAttribute(VALUE, (String) iter.next());
 			setElement.appendChild(element);
@@ -467,8 +471,11 @@ public class LaunchConfigurationInfo {
 	 */
 	protected Element createMapElement(Document doc, String elementType, String mapKey, Map map) {
 		Element mapElement = doc.createElement(elementType);
-		mapElement.setAttribute(KEY, mapKey); 
-		Iterator iterator = map.keySet().iterator();
+		mapElement.setAttribute(KEY, mapKey);
+		// persist in sorted order based on keys
+		List keys = new ArrayList(map.keySet());
+		Collections.sort(keys);
+		Iterator iterator = keys.iterator();
 		while (iterator.hasNext()) {
 			String key = (String) iterator.next();
 			String value = (String) map.get(key);
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
index a33a579..f3d3a55 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,9 @@ import java.util.Set;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.PlatformObject;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.DebugPlugin;
@@ -184,12 +186,14 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
 		} else {
 			fPreferredDelegates.put(modes, delegate);
 		}
+		((LaunchManager)DebugPlugin.getDefault().getLaunchManager()).persistPreferredLaunchDelegate(this);
 	}
 	
 	/**
 	 * @see org.eclipse.debug.core.ILaunchConfigurationType#getPreferredDelegate(java.util.Set)
 	 */
 	public ILaunchDelegate getPreferredDelegate(Set modes) {
+		initializePreferredDelegates();
 		return (ILaunchDelegate) fPreferredDelegates.get(modes);
 	}
 	
@@ -206,6 +210,7 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
 	 * @since 3.3
 	 */
 	public Map getPreferredDelegates() {
+		initializePreferredDelegates();
 		return fPreferredDelegates;
 	}
 	
@@ -449,7 +454,21 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.core.ILaunchConfigurationType#newInstance(org.eclipse.core.resources.IContainer, java.lang.String)
 	 */
-	public ILaunchConfigurationWorkingCopy newInstance(IContainer container, String name) {
+	public ILaunchConfigurationWorkingCopy newInstance(IContainer container, String name) throws CoreException {
+		// validate the configuration name - see bug 275741
+		IPath path = new Path(name);		
+		if (container == null) {
+			// not allowed to nest in sub directory when local
+			if (path.segmentCount() > 1) {
+				throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), DebugCoreMessages.LaunchConfigurationType_2));
+			}
+		}
+		// validate the name (last segment)
+		try {
+			DebugPlugin.getDefault().getLaunchManager().isValidLaunchConfigurationName(path.lastSegment());
+		} catch (IllegalArgumentException e) {
+			throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getUniqueIdentifier(), e.getMessage(), e));
+		}
 		return new LaunchConfigurationWorkingCopy(container, name, this);
 	}
 
@@ -487,5 +506,11 @@ public class LaunchConfigurationType extends PlatformObject implements ILaunchCo
 		return fModeCombinations.contains(modes);
 	}
 
+	/** 
+	 * Called on preference import to reset preferred delegates.
+	 */
+	void resetPreferredDelegates() {
+		fPreferredDelegates = null;
+	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
index a94d406..fb28202 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,9 +21,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.resources.IContainer;
@@ -267,30 +264,22 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
 	 */
 	protected void writeNewFile(IProgressMonitor monitor) throws CoreException {
 		String xml = null;
-		Exception e= null;
 		try {
 			xml = getInfo().getAsXML();
-		} catch (IOException ioe) {
-			e= ioe;			
-		} catch (ParserConfigurationException pce) {
-			e= pce;
-		} catch (TransformerException te) {
-			e= te;		
-		}
-		if (e != null) {
+		} catch (Exception e) {
 			throw new DebugException(
-				new Status(
-					IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
-					DebugException.REQUEST_FAILED, MessageFormat.format(DebugCoreMessages.LaunchConfigurationWorkingCopy__0__occurred_generating_launch_configuration_XML__1, new String[]{e.toString()}), null 
-					)
-				);		
+					new Status(
+						IStatus.ERROR, DebugPlugin.getUniqueIdentifier(),
+						DebugException.REQUEST_FAILED, MessageFormat.format(DebugCoreMessages.LaunchConfigurationWorkingCopy__0__occurred_generating_launch_configuration_XML__1, new String[]{e.toString()}), null 
+						)
+					);			
 		}
-		SubMonitor lmonitor = SubMonitor.convert(monitor, "", 5); //$NON-NLS-1$
+		SubMonitor lmonitor = SubMonitor.convert(monitor, IInternalDebugCoreConstants.EMPTY_STRING, 5);
 		try {
+			boolean added = false;
 			if (isLocal()) {
 				// use java.io to update configuration file
 				try {
-					boolean added = false;
 					lmonitor.subTask(DebugCoreMessages.LaunchConfigurationWorkingCopy_1);
 					IFileStore file = getFileStore();
 					if (file == null) {
@@ -317,11 +306,6 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
 							stream.close();
 						}
 					}
-					if (added) {
-						getLaunchManager().launchConfigurationAdded(new LaunchConfiguration(getName(), getContainer()));
-					} else {
-						getLaunchManager().launchConfigurationChanged(new LaunchConfiguration(getName(), getContainer()));
-					}
 					//notify file saved
 					updateMonitor(lmonitor, 1);
 				} catch (IOException ie) {
@@ -367,6 +351,7 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
 				}
 				SubMonitor smonitor = null;
 				if (!file.exists()) {
+					added = true;
 					//create file input stream: work one unit in a sub monitor
 					smonitor = lmonitor.newChild(1);
 					smonitor.setTaskName(MessageFormat.format(DebugCoreMessages.LaunchConfigurationWorkingCopy_2, new String[] {getName()}));
@@ -386,6 +371,12 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
 					file.setContents(stream, true, false, smonitor);
 				}
 			}
+			// notify of add/change for both local and shared configurations - see bug 288368 
+			if (added) {
+				getLaunchManager().launchConfigurationAdded(new LaunchConfiguration(getName(), getContainer()));
+			} else {
+				getLaunchManager().launchConfigurationChanged(new LaunchConfiguration(getName(), getContainer()));
+			}
 		}
 		finally {
 			if(lmonitor != null) {
@@ -449,6 +440,14 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
 		getInfo().setAttribute(attributeName, value);
 		setDirty();
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationWorkingCopy#setAttribute(java.lang.String, java.util.Set)
+	 */
+	public void setAttribute(String attributeName, Set value) {
+		getInfo().setAttribute(attributeName, value);
+		setDirty();
+	}
 
 	/**
 	 * @see ILaunchConfigurationWorkingCopy#getOriginal()
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index e4c901a..6780dfd 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *     Sebastian Davids - bug 50567 Eclipse native environment support on Win98
  *     Pawel Piech - Bug 82001: When shutting down the IDE, the debugger should first
  *     attempt to disconnect debug targets before terminating them
+ *     Alena Laskavaia - Bug 259281
+ *     Marc Khouzam - Bug 313143: Preferred Launch Delegate not recovered from preferences 
  *******************************************************************************/
 package org.eclipse.debug.internal.core;
 
@@ -76,7 +78,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.variables.VariablesPlugin;
@@ -131,7 +132,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
      * preference for each launch configuration type.  The name of this 
      * preference is composed of the prefix, followed by a slash, followed by 
      * the launch configuration type id.  The values contain a set of launch 
-     * delegates, delimited by a semi-colon, and each delegate entry contains 
+     * delegates, delimited by a semicolon, and each delegate entry contains 
      * the delegate ID, followed by a comma, followed by comma-delimited 
      * launch modes.
      * 
@@ -154,6 +155,22 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	private static final String DEBUG_UI = "org.eclipse.debug.ui"; //$NON-NLS-1$
     
 	/**
+	 * Listing of unsupported launch configuration names for the Win 32 platform
+	 * @since 3.5
+	 */
+	static final String[] UNSUPPORTED_WIN32_CONFIG_NAMES = new String[] {"aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ 
+		"com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+		"lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+	
+	/**
+	 * Disallowed characters for launch configuration names
+	 * '@' and '&' are disallowed because they corrupt menu items.
+	 * 
+	 * @since 3.5
+	 */
+	static final char[] DISALLOWED_CONFIG_NAME_CHARS = new char[] { '@', '&','\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' };
+	
+	/**
 	 * Status code for which a UI prompter is registered.
 	 * 
 	 * @since 3.2
@@ -164,7 +181,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	 * Step filter manager
 	 */
 	private StepFilterManager fStepFilterManager = null;
-	
+		
 	/**
 	 * Notifies a launch config listener in a safe runnable to handle
 	 * exceptions.
@@ -786,6 +803,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 				String line = reader.readLine();
 				String key = null;
 				String value = null;
+				String newLine =  System.getProperty("line.separator"); //$NON-NLS-1$
 				while (line != null) {
 					int func = line.indexOf("=()"); //$NON-NLS-1$
 					if(func > 0) {
@@ -795,7 +813,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 						while(line != null && !line.equals("}")) { //$NON-NLS-1$
 							line = reader.readLine();
 							if(line != null) {
-								value += line;
+								value += newLine + line;
 							}
 						}
 						line = reader.readLine();
@@ -807,16 +825,15 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 							value = line.substring(separator + 1);
 							line = reader.readLine();
 							if(line != null) {
-								//this line has a '=' read ahead to check next line for '=', might be broken on more than one line
-								separator = line.indexOf('=');
-								while(separator < 0) {
-									value += line.trim();
+								// this line has a '=' read ahead to check next line for '=', might be broken on more than one line
+								// also if line starts with non-identifier - it is remainder of previous variable
+								while (line.indexOf('=') < 0 || (line.length()>0 && !Character.isJavaIdentifierStart(line.charAt(0)))) {
+									value += newLine + line;
 									line = reader.readLine();
 									if(line == null) {
 										//if next line read is the end of the file quit the loop
 										break;
 									}
-									separator = line.indexOf('=');
 								}
 							}
 						}
@@ -990,9 +1007,9 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	public void fireUpdate(ILaunch[] launches, int update) {
 		new LaunchesNotifier().notify(launches, update);
 	}
-	
-	/**
-	 * @see org.eclipse.debug.core.ILaunchManager#generateUniqueLaunchConfigurationNameFrom(String)
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchManager#generateUniqueLaunchConfigurationNameFrom(java.lang.String)
 	 */
 	public String generateUniqueLaunchConfigurationNameFrom(String baseName) {
 		int index = 1;
@@ -1012,8 +1029,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 		while (isExistingLaunchConfigurationName(newName)) {
 			newName = MessageFormat.format(DebugCoreMessages.LaunchManager_31, new String[] {baseName, Integer.toString(index)});
 			index++;
-		}		
-			
+		}	
 		return newName;
 	}
 	
@@ -1551,8 +1567,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	private synchronized void initializePreferredDelegates() {
 		if(fPreferredDelegates == null) {
 			fPreferredDelegates = new HashSet();
-			Preferences prefs = DebugPlugin.getDefault().getPluginPreferences();
-			String preferred = prefs.getString(LaunchManager.PREF_PREFERRED_DELEGATES);
+			String preferred = Platform.getPreferencesService().getString(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_PREFERRED_DELEGATES, IInternalDebugCoreConstants.EMPTY_STRING, null);
 			if(!IInternalDebugCoreConstants.EMPTY_STRING.equals(preferred)) {
 				try {
 					Element root = DebugPlugin.parseDocument(preferred);
@@ -1581,6 +1596,16 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	}
 	
 	/**
+	 * Allows internal access to reset preferred delegates when re-importing 
+	 * preferences.  
+	 * 
+	 * @since 3.6
+	 */
+	protected void resetPreferredDelegates() {
+	    fPreferredDelegates = null;
+	}
+	
+	/**
 	 * Allows internal access to a preferred delegate for a given type and mode set
 	 * @param typeid the id of the <code>ILaunchConfigurationType</code> to find a delegate for
 	 * @param modes the set of modes for the delegate
@@ -1603,8 +1628,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 		// @since 3.5
 		// If the legacy mechanism didn't work, try the new preference name for 
 		// the given launch type.  
-        Preferences prefs = DebugPlugin.getDefault().getPluginPreferences();
-        String preferred = prefs.getString(LaunchManager.PREF_PREFERRED_DELEGATES + '/' + typeid);
+        String preferred = Platform.getPreferencesService().getString(DebugPlugin.getUniqueIdentifier(), "//" + LaunchManager.PREF_PREFERRED_DELEGATES + '/' + typeid, IInternalDebugCoreConstants.EMPTY_STRING, null); //$NON-NLS-1$
         if (preferred != null && preferred.length() != 0) {
             StringTokenizer tokenizer = new StringTokenizer(preferred, ";"); //$NON-NLS-1$
             while(tokenizer.hasMoreTokens()) {
@@ -2014,7 +2038,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	 * @return whether to auto-delete configurations
 	 */
 	private boolean isDeleteConfigurations() {
-		return DebugPlugin.getDefault().getPluginPreferences().getBoolean(PREF_DELETE_CONFIGS_ON_PROJECT_DELETE);
+		return Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(), PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true, null);
 	}
 	
 	/* (non-Javadoc)
@@ -2110,12 +2134,16 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	 * @param config the launch configuration that was deleted
 	 */
 	protected void launchConfigurationDeleted(ILaunchConfiguration config) {
+		boolean removed = false;
 		synchronized (this) {
-			fLaunchConfigurations.remove(config);
+			Object key = fLaunchConfigurations.remove(config);
+			removed = key != null;
 			getAllLaunchConfigurations().remove(config);			
 		}
-		getConfigurationNotifier().notify(config, REMOVED);
-		clearConfigNameCache();			
+		if (removed) {
+			getConfigurationNotifier().notify(config, REMOVED);
+			clearConfigNameCache();
+		}
 	}
 	
 	/**
@@ -2329,44 +2357,50 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 	 * 
 	 * @since 3.3
 	 */
-	private void persistPreferredLaunchDelegates() {
-        Preferences prefs = DebugPlugin.getDefault().getPluginPreferences();
+	public void persistPreferredLaunchDelegates() {
         ILaunchConfigurationType[] types = getLaunchConfigurationTypes();
-        Map preferred = null;
-        ILaunchDelegate delegate = null;
-        Set modes = null;
         for(int i = 0; i < types.length; i++) {
-            String preferenceName = PREF_PREFERRED_DELEGATES + '/' + types[i].getIdentifier();
-            preferred = ((LaunchConfigurationType)types[i]).getPreferredDelegates();
-            if(preferred != null && preferred.size() > 0) {
-                StringBuffer str = new StringBuffer();
-                for(Iterator iter = preferred.keySet().iterator(); iter.hasNext();) {
-                    modes = (Set) iter.next();
-                    delegate = (ILaunchDelegate) preferred.get(modes);
-                    if(delegate != null) {
-                        str.append(delegate.getId());
-                        str.append(',');
-                        for(Iterator iter2 = modes.iterator(); iter2.hasNext();) {
-                            str.append(iter2.next());
-                            if(iter2.hasNext()) {
-                                str.append(',');
-                            }
-                        }
-                        if (iter.hasNext()) {
-                            str.append(';');
+            persistPreferredLaunchDelegate((LaunchConfigurationType)types[i]);
+        }
+	}
+
+	/**
+	 * Persists the given launch configuration delegate. 
+	 * @param type Launch configuration type to persist
+	 * 
+	 * @since 3.6
+	 */
+    public void persistPreferredLaunchDelegate(LaunchConfigurationType type) {
+        String preferenceName = PREF_PREFERRED_DELEGATES + '/' + type.getIdentifier();
+        Map preferred = type.getPreferredDelegates();
+        if(preferred != null && preferred.size() > 0) {
+            StringBuffer str = new StringBuffer();
+            for(Iterator iter = preferred.keySet().iterator(); iter.hasNext();) {
+                Set modes = (Set) iter.next();
+                ILaunchDelegate delegate = (ILaunchDelegate) preferred.get(modes);
+                if(delegate != null) {
+                    str.append(delegate.getId());
+                    str.append(',');
+                    for(Iterator iter2 = modes.iterator(); iter2.hasNext();) {
+                        str.append(iter2.next());
+                        if(iter2.hasNext()) {
+                            str.append(',');
                         }
                     }
+                    if (iter.hasNext()) {
+                        str.append(';');
+                    }
                 }
-                prefs.setValue(preferenceName, str.toString());
-            } else {
-                prefs.setToDefault(preferenceName);
             }
+            Preferences.setString(DebugPlugin.getUniqueIdentifier(), preferenceName, str.toString(), null);
+        } else {
+            Preferences.setToDefault(DebugPlugin.getUniqueIdentifier(), preferenceName);
         }
 
         // Reset the legacy preference string.
-        prefs.setToDefault(PREF_PREFERRED_DELEGATES);
-	}
-	
+        Preferences.setToDefault(DebugPlugin.getUniqueIdentifier(), PREF_PREFERRED_DELEGATES);
+    }
+
 	/**
 	 * finds and terminates any running launch configurations associated with the given resource
 	 * @param resource the resource to search for launch configurations and hence launches for
@@ -2600,5 +2634,52 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
 			}
 		}
 		return fActiveModes.contains(mode);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.ILaunchManager#generateLaunchConfigurationName(java.lang.String)
+	 */
+	public String generateLaunchConfigurationName(String namePrefix) {
+		String name = generateUniqueLaunchConfigurationNameFrom(namePrefix);
+		try {
+			isValidLaunchConfigurationName(name);
+			return name;
+		}
+		catch(IllegalArgumentException iae) {
+			//blanket change all reserved names
+			if(Platform.OS_WIN32.equals(Platform.getOS())) {
+				for(int i = 0; i < UNSUPPORTED_WIN32_CONFIG_NAMES.length; i++) {
+					if(UNSUPPORTED_WIN32_CONFIG_NAMES[i].equals(name)) {
+						name = "launch_configuration"; //$NON-NLS-1$
+					}
+				}
+			}
+			//blanket replace all invalid chars
+			for (int i = 0; i < DISALLOWED_CONFIG_NAME_CHARS.length; i++) {
+				name = name.replace(DISALLOWED_CONFIG_NAME_CHARS[i], '_');
+			}
+		}
+		//run it through the generator once more in case a replaced name has already been done
+		return generateUniqueLaunchConfigurationNameFrom(name);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.ILaunchManager#isValidLaunchConfigurationName(java.lang.String)
+	 */
+	public boolean isValidLaunchConfigurationName(String configname) throws IllegalArgumentException {
+		if(Platform.OS_WIN32.equals(Platform.getOS())) {
+			for(int i = 0; i < UNSUPPORTED_WIN32_CONFIG_NAMES.length; i++) {
+				if(configname.equals(UNSUPPORTED_WIN32_CONFIG_NAMES[i])) {
+					throw new IllegalArgumentException(MessageFormat.format(DebugCoreMessages.LaunchManager_invalid_config_name, new String[] {configname}));
+				}
+			}
+		}
+		for (int i = 0; i < DISALLOWED_CONFIG_NAME_CHARS.length; i++) {
+			if (configname.indexOf(DISALLOWED_CONFIG_NAME_CHARS[i]) > -1) {
+				throw new IllegalArgumentException(MessageFormat.format(DebugCoreMessages.LaunchManager_invalid_config_name_char, new String[] {String.valueOf(DISALLOWED_CONFIG_NAME_CHARS[i])}));
+			}
+		}
+		return true;
 	}	
+	
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LogicalStructureManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LogicalStructureManager.java
index 6f3fd03..5c5c029 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LogicalStructureManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LogicalStructureManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,7 +107,7 @@ public class LogicalStructureManager {
      */
     private void loadStructureTypeSelections() {
         fStructureTypeSelections= new HashMap();
-        String selections= DebugPlugin.getDefault().getPluginPreferences().getString(PREF_STRUCTURE_SELECTIONS);
+        String selections= Platform.getPreferencesService().getString(DebugPlugin.getUniqueIdentifier(), PREF_STRUCTURE_SELECTIONS, IInternalDebugCoreConstants.EMPTY_STRING, null);
     	// selections are stored in the form:
     	// selection|selection|...selection|
         StringTokenizer tokenizer= new StringTokenizer(selections, "|"); //$NON-NLS-1$
@@ -136,7 +136,7 @@ public class LogicalStructureManager {
             buffer.append(entry.getValue());
             buffer.append('|');
         }
-        DebugPlugin.getDefault().getPluginPreferences().setValue(PREF_STRUCTURE_SELECTIONS, buffer.toString());
+        Preferences.setString(DebugPlugin.getUniqueIdentifier(), PREF_STRUCTURE_SELECTIONS, buffer.toString(), null);
     }
     
     /**
@@ -145,7 +145,7 @@ public class LogicalStructureManager {
     private void loadStructureTypeIds() {
         fStructureTypeIds= new ArrayList();
     	// Types are stored as a comma-separated, ordered list.
-        String types= DebugPlugin.getDefault().getPluginPreferences().getString(PREF_STRUCTURE_IDS);
+        String types= Platform.getPreferencesService().getString(DebugPlugin.getUniqueIdentifier(), PREF_STRUCTURE_IDS, IInternalDebugCoreConstants.EMPTY_STRING, null);
         StringTokenizer tokenizer= new StringTokenizer(types, ","); //$NON-NLS-1$
         while (tokenizer.hasMoreTokens()) {
             String id= tokenizer.nextToken();
@@ -164,7 +164,7 @@ public class LogicalStructureManager {
         while (iter.hasNext()) {
             buffer.append(iter.next()).append(',');
         }
-        DebugPlugin.getDefault().getPluginPreferences().setValue(PREF_STRUCTURE_IDS, buffer.toString());
+        Preferences.setString(DebugPlugin.getUniqueIdentifier(), PREF_STRUCTURE_IDS, buffer.toString(), null);
     }
     
     /**
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java
new file mode 100644
index 0000000..3268363
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Preferences.java
@@ -0,0 +1,415 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.debug.core.DebugPlugin;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * Convenience class to facilitate using the new {@link IEclipsePreferences} story
+ * 
+ * @since 3.6
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public final class Preferences {
+
+	static final IScopeContext[] contexts = new IScopeContext[] {new DefaultScope(), new InstanceScope()}; 
+	
+	static final int DEFAULT_CONTEXT = 0;
+	static final int INSTANCE_CONTEXT = 1;
+	
+	/**
+	 * Constructor
+	 */
+	private Preferences() {
+		// no direct instantiation
+	}
+	
+	/**
+	 * Sets a string preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier 
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setString(String qualifier, String key, String value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.put(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).put(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a boolean preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier 
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setBoolean(String qualifier, String key, boolean value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putBoolean(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putBoolean(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a integer preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setInt(String qualifier, String key, int value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putInt(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putInt(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a long preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setLong(String qualifier, String key, long value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putLong(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putLong(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a byte array preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setByteArray(String qualifier, String key, byte[] value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putByteArray(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putByteArray(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a double preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setDouble(String qualifier, String key, double value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putDouble(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putDouble(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a float preference in the {@link InstanceScope} or the given {@link IScopeContext} if it
+	 * is not <code>null</code>. Preferences set in a given context are flushed as they are set.
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the value
+	 * @param context
+	 */
+	public static synchronized void setFloat(String qualifier, String key, float value, IScopeContext context) {
+		if(context != null) {
+			try {
+				IEclipsePreferences node = context.getNode(qualifier);
+				node.putFloat(key, value);
+				node.flush();
+			}
+			catch(BackingStoreException bse) {
+				DebugPlugin.log(bse);
+			}
+		}
+		else {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).putFloat(key, value);
+		}
+	}
+	
+	/**
+	 * Sets a string in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultString(String qualifier, String key, String value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).put(key, value);
+	}
+	
+	/**
+	 * Sets a boolean in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultBoolean(String qualifier, String key, boolean value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putBoolean(key, value);
+	}
+	
+	/**
+	 * Sets a byte array in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultByteArray(String qualifier, String key, byte[] value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putByteArray(key, value);
+	}
+	
+	/**
+	 * Sets a double in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultDouble(String qualifier, String key, double value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putDouble(key, value);
+	}
+	
+	/**
+	 * Sets a float in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultFloat(String qualifier, String key, float value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putFloat(key, value);
+	}
+	
+	/**
+	 * Sets a integer in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultInt(String qualifier, String key, int value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putInt(key, value);
+	}
+	
+	/**
+	 * Sets a long in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key the key
+	 * @param value the new value
+	 */
+	public static synchronized void setDefaultLong(String qualifier, String key, long value) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).putLong(key, value);
+	}
+	
+	/**
+	 * Sets the given preference to its default value. This is done by removing any set value
+	 * from the {@link InstanceScope}. Has no effect if the given key is <code>null</code>.
+	 * @param qualifier
+	 * @param key the key for the preference
+	 */
+	public static synchronized void setToDefault(String qualifier, String key) {
+		if(key != null) {
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).remove(key);
+		}
+	}
+	
+	/**
+	 * Returns the default boolean value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the boolean value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized boolean getDefaultBoolean(String qualifier, String key, boolean defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getBoolean(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default string value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the string value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized String getDefaultString(String qualifier, String key, String defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).get(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default byte array value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the byte array value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized byte[] getDefaultByteArray(String qualifier, String key, byte[] defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getByteArray(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default integer value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the integer value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized int getDefaultInt(String qualifier, String key, int defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getInt(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default long value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the long value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized long getDefaultLong(String qualifier, String key, long defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getLong(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default double value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the double value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized double getDefaultDouble(String qualifier, String key, double defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getDouble(key, defaultvalue);
+	}
+	
+	/**
+	 * Returns the default float value stored in the {@link DefaultScope} for the given key
+	 * or the specified default value if the key does not appear in the {@link DefaultScope}
+	 * @param qualifier
+	 * @param key
+	 * @param defaultvalue
+	 * 
+	 * @return the float value set in the {@link DefaultScope} for the given key, or the specified default value.
+	 */
+	public static synchronized float getDefaultFloat(String qualifier, String key, float defaultvalue) {
+		return contexts[DEFAULT_CONTEXT].getNode(qualifier).getFloat(key, defaultvalue);
+	}
+	
+	/**
+	 * Save the preferences for the given plugin identifier.
+	 * It should be noted that all pending preference changes will be flushed with this method.
+	 * @param qualifier
+	 */
+	public static synchronized void savePreferences(String qualifier) {
+		try {
+			contexts[DEFAULT_CONTEXT].getNode(qualifier).flush();
+			contexts[INSTANCE_CONTEXT].getNode(qualifier).flush();
+		}
+		catch(BackingStoreException bse) {
+			DebugPlugin.log(bse);
+		}
+	}
+	
+	/**
+	 * Adds the given preference listener to the {@link DefaultScope} and the {@link InstanceScope}
+	 * @param qualifier
+	 * @param listener
+	 */
+	public static void addPreferenceListener(String qualifier, IEclipsePreferences.IPreferenceChangeListener listener) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).addPreferenceChangeListener(listener);
+		contexts[INSTANCE_CONTEXT].getNode(qualifier).addPreferenceChangeListener(listener);
+	}
+	
+	/**
+	 * Removes the given preference listener from the {@link DefaultScope} and the {@link InstanceScope}
+	 * @param qualifier
+	 * @param listener
+	 */
+	public static void removePreferenceListener(String qualifier, IEclipsePreferences.IPreferenceChangeListener listener) {
+		contexts[DEFAULT_CONTEXT].getNode(qualifier).removePreferenceChangeListener(listener);
+		contexts[INSTANCE_CONTEXT].getNode(qualifier).removePreferenceChangeListener(listener);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/PreferredDelegateModifyListener.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/PreferredDelegateModifyListener.java
new file mode 100644
index 0000000..b75ced8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/PreferredDelegateModifyListener.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IPreferenceNodeVisitor;
+import org.eclipse.core.runtime.preferences.PreferenceModifyListener;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * Used to listen for preference imports that include changes to 
+ * preferred launch delegates.
+ * 
+ * @since 3.6
+ */
+public class PreferredDelegateModifyListener extends PreferenceModifyListener {
+	class Visitor implements IPreferenceNodeVisitor {
+
+		public boolean visit(IEclipsePreferences node) throws BackingStoreException {
+			if (node.name().equals(DebugPlugin.getUniqueIdentifier())) {
+				// reset preferred delegates, so they are re-initialized from the preferences
+				LaunchManager manager = (LaunchManager)DebugPlugin.getDefault().getLaunchManager();
+				manager.resetPreferredDelegates();
+				ILaunchConfigurationType[] types = manager.getLaunchConfigurationTypes();
+				for (int i = 0; i < types.length; i++) {
+					((LaunchConfigurationType) types[i]).resetPreferredDelegates();
+				}
+				return false;
+			}
+			return true;
+		}
+		
+	}
+
+	public IEclipsePreferences preApply(IEclipsePreferences node) {
+		try {
+			// force VMs to be initialized before we import the new VMs
+			node.accept(new Visitor());
+		} catch (BackingStoreException e) {
+            DebugPlugin.log(e);
+		}
+		return node;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RefreshScopeComparator.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RefreshScopeComparator.java
new file mode 100644
index 0000000..4a3ef6a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RefreshScopeComparator.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+import java.util.Comparator;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.RefreshUtil;
+
+/**
+ * Compares refresh scope attributes as the format has changed from a working
+ * set memento to an XML memento of resource paths. Avoids migrating attribute
+ * to new format until something else in the configuration changes.
+ * 
+ * @since 3.6
+ */
+public class RefreshScopeComparator implements Comparator {
+
+	public int compare(Object o1, Object o2) {
+		String m1 = (String) o1;
+		String m2 = (String) o2;
+		try {
+			IResource[] r1 = RefreshUtil.toResources(m1);
+			IResource[] r2 = RefreshUtil.toResources(m2);
+			if (r1.length == r2.length) {
+				for (int i = 0; i < r2.length; i++) {
+					if (!r1[i].equals(r2[i])) {
+						return -1;
+					}
+				}
+				return 0;
+			}
+		} catch (CoreException e) {
+			return -1;
+		}
+		return -1;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ResourceFactory.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ResourceFactory.java
new file mode 100644
index 0000000..789cdd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ResourceFactory.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Path;
+
+/**
+ * The ResourceFactory is used to save and recreate an IResource object.
+ * As such, it implements the IPersistableElement interface for storage
+ * and the IElementFactory interface for recreation.
+ */
+public class ResourceFactory {
+
+    // These persistence constants are stored in XML.  Do not
+    // change them.
+    public static final String TAG_PATH = "path";//$NON-NLS-1$
+
+    public static final String TAG_TYPE = "type";//$NON-NLS-1$
+
+    /**
+     * Creates and returns an element based on the given memento
+     * 
+     * @param memento element memento
+     * @return associated element
+     */
+    public static IAdaptable createElement(XMLMemento memento) {
+        // Get the file name.
+        String fileName = memento.getString(TAG_PATH);
+        if (fileName == null) {
+			return null;
+		}
+
+        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        String type = memento.getString(TAG_TYPE);
+        IResource res = null;
+        if (type == null) {
+            // Old format memento. Create an IResource using findMember. 
+            // Will return null for resources in closed projects.
+            res = root.findMember(new Path(fileName));
+        } else {
+            int resourceType = Integer.parseInt(type);
+
+            if (resourceType == IResource.ROOT) {
+				res = root;
+			} else if (resourceType == IResource.PROJECT) {
+				res = root.getProject(fileName);
+			} else if (resourceType == IResource.FOLDER) {
+				res = root.getFolder(new Path(fileName));
+			} else if (resourceType == IResource.FILE) {
+				res = root.getFile(new Path(fileName));
+			}
+        }
+        return res;
+    }
+
+    public static void saveState(XMLMemento memento, IResource res) {
+        memento.putString(TAG_PATH, res.getFullPath().toString());
+        memento.putString(TAG_TYPE, Integer.toString(res.getType()));
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StepFilterManager.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StepFilterManager.java
index 7723837..1ceb5bf 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StepFilterManager.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StepFilterManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.core;
 
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchListener;
@@ -63,7 +64,7 @@ public class StepFilterManager implements ILaunchListener {
 	 * @return whether to use step filters
 	 */
 	public boolean isUseStepFilters() {
-		return DebugPlugin.getDefault().getPluginPreferences().getBoolean(PREF_USE_STEP_FILTERS);
+		return Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(), PREF_USE_STEP_FILTERS, false, null);
 	}
 	
 	/**
@@ -72,7 +73,7 @@ public class StepFilterManager implements ILaunchListener {
 	 * @param useFilters whether to use step filters
 	 */
 	public void setUseStepFilters(boolean useFilters) {
-		DebugPlugin.getDefault().getPluginPreferences().setValue(PREF_USE_STEP_FILTERS, useFilters);
+		Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), PREF_USE_STEP_FILTERS, useFilters, null);
 		ILaunch[] launchs = DebugPlugin.getDefault().getLaunchManager().getLaunches();
 		for (int i = 0; i < launchs.length; i++) {
 			ILaunch launch = launchs[i];
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java
index 8820f68..0bae936 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/StreamsProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,8 +18,7 @@ import org.eclipse.debug.core.model.IStreamsProxy;
 import org.eclipse.debug.core.model.IStreamsProxy2;
 
 /**
- * Standard implementation of a streams proxy for s 
- * StreamsProxy
+ * Standard implementation of a streams proxy for IStreamsProxy.
  */
 
 public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
@@ -37,9 +36,10 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
 	private InputStreamMonitor fInputMonitor;
 	/**
 	 * Records the open/closed state of communications with
-	 * the underlying streams.
+	 * the underlying streams.  Note: fClosed is initialized to 
+	 * <code>false</code> by default.
 	 */
-	private boolean fClosed= false;
+	private boolean fClosed;
 	/**
 	 * Creates a <code>StreamsProxy</code> on the streams
 	 * of the given system process.
@@ -53,7 +53,7 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
 		}
 		fOutputMonitor= new OutputStreamMonitor(process.getInputStream(), encoding);
 		fErrorMonitor= new OutputStreamMonitor(process.getErrorStream(), encoding);
-		fInputMonitor= new InputStreamMonitor(process.getOutputStream());
+		fInputMonitor= new InputStreamMonitor(process.getOutputStream(), encoding);
 		fOutputMonitor.startMonitoring();
 		fErrorMonitor.startMonitoring();
 		fInputMonitor.startMonitoring();
@@ -66,8 +66,7 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
 	 * in the streams is read.
 	 */
 	public void close() {
-		if (!fClosed) {
-			fClosed= true;
+		if (!isClosed(true)) {
 			fOutputMonitor.close();
 			fErrorMonitor.close();
 			fInputMonitor.close();
@@ -75,13 +74,32 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
 	}
 
 	/**
+	 * Returns whether the proxy is currently closed.  This method 
+	 * synchronizes access to the <code>fClosed</code> flag.  
+	 *  
+	 * @param setClosed If <code>true</code> this method will also set the
+	 * <code>fClosed</code> flag to true.  Otherwise, the <code>fClosed</code>
+	 * flag is not modified.
+	 * @return Returns whether the stream proxy was already closed.
+	 */
+	private synchronized boolean isClosed(boolean setClosed) {
+	    boolean closed = fClosed;
+	    if (setClosed) {
+	        fClosed = true;
+	    }
+	    return closed;
+	}
+	
+	/**
 	 * Causes the proxy to close all
 	 * communications between it and the
 	 * underlying streams immediately.
 	 * Data remaining in the streams is lost.
-	 */	
+	 */
 	public void kill() {
-		fClosed= true;
+	    synchronized (this) {
+	        fClosed= true;
+	    }
 		fOutputMonitor.kill();
 		fErrorMonitor.kill();
 		fInputMonitor.close();
@@ -105,7 +123,7 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
 	 * @see IStreamsProxy#write(String)
 	 */
 	public void write(String input) throws IOException {
-		if (!fClosed) {
+		if (!isClosed(false)) {
 			fInputMonitor.write(input);
 		} else {
 			throw new IOException();
@@ -116,7 +134,7 @@ public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 {
      * @see org.eclipse.debug.core.model.IStreamsProxy2#closeInputStream()
      */
     public void closeInputStream() throws IOException {
-        if (!fClosed) {
+        if (!isClosed(false)) {
             fInputMonitor.closeInputStream();
         } else {
             throw new IOException();
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
index 22cd0e1..ed51fc9 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/WatchExpression.java
@@ -72,7 +72,6 @@ public class WatchExpression implements IWatchExpression {
 			 * @see org.eclipse.debug.core.model.IWatchExpressionListener#watchEvaluationFinished(org.eclipse.debug.core.model.IWatchExpressionResult)
 			 */
 			public void watchEvaluationFinished(IWatchExpressionResult result) {
-				setPending(false);
 				setResult(result);
 			}
 		};
@@ -129,8 +128,10 @@ public class WatchExpression implements IWatchExpression {
 	public void setResult(IWatchExpressionResult result) {
 		synchronized (this) {
 			fResult= result;
+			fPending = false;
 		}
-		fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT));
+		fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.STATE)); // pending state
+		fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.CONTENT)); // value change
 	}
 
 	/**
@@ -257,7 +258,7 @@ public class WatchExpression implements IWatchExpression {
 	/**
 	 * @see org.eclipse.debug.core.model.IWatchExpression#isPending()
 	 */
-	public boolean isPending() {
+	public synchronized boolean isPending() {
 		return fPending;
 	}
 	
@@ -268,7 +269,9 @@ public class WatchExpression implements IWatchExpression {
 	 * 		flagged as pending
 	 */
 	protected void setPending(boolean pending) {
-		fPending= pending;
+		synchronized (this) {
+			fPending= pending;
+		}
 		fireEvent(new DebugEvent(this, DebugEvent.CHANGE, DebugEvent.STATE));
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java
new file mode 100644
index 0000000..6daf965
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/XMLMemento.java
@@ -0,0 +1,599 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * An XML memento. Copied from workspace plug-in.
+ */
+public final class XMLMemento {
+    private Document factory;
+
+    private Element element;
+
+    /**
+     * Creates a <code>Document</code> from the <code>Reader</code>
+     * and returns a memento on the first <code>Element</code> for reading
+     * the document.
+     * <p>
+     * Same as calling createReadRoot(reader, null)
+     * </p>
+     * 
+     * @param reader the <code>Reader</code> used to create the memento's document
+     * @return a memento on the first <code>Element</code> for reading the document
+     * @throws Exception if IO problems, invalid format, or no element.
+     */
+    public static XMLMemento createReadRoot(Reader reader)
+            throws Exception {
+        return createReadRoot(reader, null);
+    }
+
+    /**
+     * Creates a <code>Document</code> from the <code>Reader</code>
+     * and returns a memento on the first <code>Element</code> for reading
+     * the document.
+     * 
+     * @param reader the <code>Reader</code> used to create the memento's document
+     * @param baseDir the directory used to resolve relative file names
+     * 		in the XML document. This directory must exist and include the
+     * 		trailing separator. The directory format, including the separators,
+     * 		must be valid for the platform. Can be <code>null</code> if not
+     * 		needed.
+     * @return a memento on the first <code>Element</code> for reading the document
+     * @throws Exception if IO problems, invalid format, or no element.
+     */
+    public static XMLMemento createReadRoot(Reader reader, String baseDir)
+            throws Exception {
+        String errorMessage = null;
+        Exception exception = null;
+
+        try {
+            DocumentBuilderFactory factory = DocumentBuilderFactory
+                    .newInstance();
+            DocumentBuilder parser = factory.newDocumentBuilder();
+            InputSource source = new InputSource(reader);
+            if (baseDir != null) {
+				source.setSystemId(baseDir);
+			}
+            Document document = parser.parse(source);
+            NodeList list = document.getChildNodes();
+            for (int i = 0; i < list.getLength(); i++) {
+                Node node = list.item(i);
+                if (node instanceof Element) {
+					return new XMLMemento(document, (Element) node);
+				}
+            }
+        } catch (ParserConfigurationException e) {
+            exception = e;
+           // errorMessage = WorkbenchMessages.XMLMemento_parserConfigError;
+        } catch (IOException e) {
+            exception = e;
+           // errorMessage = WorkbenchMessages.XMLMemento_ioError; 
+        } catch (SAXException e) {
+            exception = e;
+           // errorMessage = WorkbenchMessages.XMLMemento_formatError; 
+        }
+
+        String problemText = null;
+        if (exception != null) {
+			problemText = exception.getMessage();
+		}
+        if (problemText == null || problemText.length() == 0) {
+			problemText = errorMessage != null ? errorMessage
+                    :"ERROR"; //;WorkbenchMessages.XMLMemento_noElement; //$NON-NLS-1$
+		} 
+        throw new Exception(problemText, exception);
+    }
+
+    /**
+     * Returns a root memento for writing a document.
+     * 
+     * @param type the element node type to create on the document
+     * @return the root memento for writing a document
+     */
+    public static XMLMemento createWriteRoot(String type) {
+        Document document;
+        try {
+            document = DocumentBuilderFactory.newInstance()
+                    .newDocumentBuilder().newDocument();
+            Element element = document.createElement(type);
+            document.appendChild(element);
+            return new XMLMemento(document, element);
+        } catch (ParserConfigurationException e) {
+//            throw new Error(e);
+            throw new Error(e.getMessage());
+        }
+    }
+
+    /**
+     * Creates a memento for the specified document and element.
+     * <p>
+     * Clients should use <code>createReadRoot</code> and
+     * <code>createWriteRoot</code> to create the initial
+     * memento on a document.
+     * </p>
+     * 
+     * @param document the document for the memento
+     * @param element the element node for the memento
+     */
+    public XMLMemento(Document document, Element element) {
+        super();
+        this.factory = document;
+        this.element = element;
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public XMLMemento createChild(String type) {
+        Element child = factory.createElement(type);
+        element.appendChild(child);
+        return new XMLMemento(factory, child);
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public XMLMemento createChild(String type, String id) {
+        Element child = factory.createElement(type);
+        child.setAttribute(IMementoConstants.TAG_ID, id == null ? "" : id); //$NON-NLS-1$
+        element.appendChild(child);
+        return new XMLMemento(factory, child);
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public XMLMemento copyChild(XMLMemento child) {
+        Element childElement = child.element;
+        Element newElement = (Element) factory.importNode(childElement, true);
+        element.appendChild(newElement);
+        return new XMLMemento(factory, newElement);
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public XMLMemento getChild(String type) {
+
+        // Get the nodes.
+        NodeList nodes = element.getChildNodes();
+        int size = nodes.getLength();
+        if (size == 0) {
+			return null;
+		}
+
+        // Find the first node which is a child of this node.
+        for (int nX = 0; nX < size; nX++) {
+            Node node = nodes.item(nX);
+            if (node instanceof Element) {
+                Element element1 = (Element) node;
+                if (element1.getNodeName().equals(type)) {
+					return new XMLMemento(factory, element1);
+				}
+            }
+        }
+
+        // A child was not found.
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public XMLMemento[] getChildren(String type) {
+
+        // Get the nodes.
+        NodeList nodes = element.getChildNodes();
+        int size = nodes.getLength();
+        if (size == 0) {
+			return new XMLMemento[0];
+		}
+
+        // Extract each node with given type.
+        ArrayList list = new ArrayList(size);
+        for (int nX = 0; nX < size; nX++) {
+            Node node = nodes.item(nX);
+            if (node instanceof Element) {
+                Element element1 = (Element) node;
+                if (element1.getNodeName().equals(type)) {
+					list.add(element1);
+				}
+            }
+        }
+
+        // Create a memento for each node.
+        size = list.size();
+        XMLMemento[] results = new XMLMemento[size];
+        for (int x = 0; x < size; x++) {
+            results[x] = new XMLMemento(factory, (Element) list.get(x));
+        }
+        return results;
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public Float getFloat(String key) {
+        Attr attr = element.getAttributeNode(key);
+        if (attr == null) {
+			return null;
+		}
+        String strValue = attr.getValue();
+        try {
+            return new Float(strValue);
+        } catch (NumberFormatException e) {
+           DebugPlugin.logMessage("Memento problem - Invalid float for key: " //$NON-NLS-1$
+                    + key + " value: " + strValue, e); //$NON-NLS-1$
+            return null;
+        }
+    }
+
+	public String getType() {
+		return element.getNodeName();
+	}
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public String getID() {
+        return element.getAttribute(IMementoConstants.TAG_ID);
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public Integer getInteger(String key) {
+        Attr attr = element.getAttributeNode(key);
+        if (attr == null) {
+			return null;
+		}
+        String strValue = attr.getValue();
+        try {
+            return new Integer(strValue);
+        } catch (NumberFormatException e) {
+            DebugPlugin
+                    .logMessage("Memento problem - invalid integer for key: " + key //$NON-NLS-1$
+                            + " value: " + strValue, e); //$NON-NLS-1$
+            return null;
+        }
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public String getString(String key) {
+        Attr attr = element.getAttributeNode(key);
+        if (attr == null) {
+			return null;
+		}
+        return attr.getValue();
+    }
+
+	public Boolean getBoolean(String key) {
+        Attr attr = element.getAttributeNode(key);
+        if (attr == null) {
+			return null;
+		}
+        return Boolean.valueOf(attr.getValue());
+	}
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public String getTextData() {
+        Text textNode = getTextNode();
+        if (textNode != null) {
+            return textNode.getData();
+        }
+        return null;
+    }
+
+	public String[] getAttributeKeys() {
+		NamedNodeMap map = element.getAttributes();
+		int size = map.getLength();
+		String[] attributes = new String[size];
+		for (int i = 0; i < size; i++) {
+			Node node = map.item(i);
+			attributes[i] = node.getNodeName();
+		}
+		return attributes;
+	}
+
+    /**
+     * Returns the Text node of the memento. Each memento is allowed only 
+     * one Text node.
+     * 
+     * @return the Text node of the memento, or <code>null</code> if
+     * the memento has no Text node.
+     */
+    private Text getTextNode() {
+        // Get the nodes.
+        NodeList nodes = element.getChildNodes();
+        int size = nodes.getLength();
+        if (size == 0) {
+			return null;
+		}
+        for (int nX = 0; nX < size; nX++) {
+            Node node = nodes.item(nX);
+            if (node instanceof Text) {
+                return (Text) node;
+            }
+        }
+        // a Text node was not found
+        return null;
+    }
+
+    /**
+     * Places the element's attributes into the document.
+     * @param copyText true if the first text node should be copied
+     */
+    private void putElement(Element element1, boolean copyText) {
+        NamedNodeMap nodeMap = element1.getAttributes();
+        int size = nodeMap.getLength();
+        for (int i = 0; i < size; i++) {
+            Attr attr = (Attr) nodeMap.item(i);
+            putString(attr.getName(), attr.getValue());
+        }
+
+        NodeList nodes = element1.getChildNodes();
+        size = nodes.getLength();
+        // Copy first text node (fixes bug 113659).
+        // Note that text data will be added as the first child (see putTextData)
+        boolean needToCopyText = copyText;
+        for (int i = 0; i < size; i++) {
+            Node node = nodes.item(i);
+            if (node instanceof Element) {
+                XMLMemento child = createChild(node.getNodeName());
+                child.putElement((Element) node, true);
+            } else if (node instanceof Text && needToCopyText) {
+                putTextData(((Text) node).getData());
+                needToCopyText = false;
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public void putFloat(String key, float f) {
+        element.setAttribute(key, String.valueOf(f));
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public void putInteger(String key, int n) {
+        element.setAttribute(key, String.valueOf(n));
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public void putMemento(XMLMemento memento) {
+    	// Do not copy the element's top level text node (this would overwrite the existing text).
+    	// Text nodes of children are copied.
+        putElement(memento.element, false);
+    }
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public void putString(String key, String value) {
+        if (value == null) {
+			return;
+		}
+        element.setAttribute(key, value);
+    }
+
+	/**
+	 * @param key 
+	 * @param value 
+	 * @since 3.4
+	 */
+	public void putBoolean(String key, boolean value) {
+		element.setAttribute(key, value ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+    /* (non-Javadoc)
+     * Method declared in XMLMemento.
+     */
+    public void putTextData(String data) {
+        Text textNode = getTextNode();
+        if (textNode == null) {
+            textNode = factory.createTextNode(data);
+			// Always add the text node as the first child (fixes bug 93718) 
+			element.insertBefore(textNode, element.getFirstChild());
+        } else {
+            textNode.setData(data);
+        }
+    }
+
+    /**
+     * Saves this memento's document current values to the
+     * specified writer. 
+     * 
+     * @param writer the writer used to save the memento's document
+     * @throws IOException if there is a problem serializing the document to the stream.
+     */
+    public void save(Writer writer) throws IOException {
+    	DOMWriter out = new DOMWriter(writer);
+        try {
+        	out.print(element);
+    	} finally {
+    		out.close();
+    	}
+	}
+
+	/**
+     * A simple XML writer.  Using this instead of the javax.xml.transform classes allows
+     * compilation against JCL Foundation (bug 80053). 
+     */
+    private static final class DOMWriter extends PrintWriter {
+    	
+    	private int tab;
+
+    	/* constants */
+    	private static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
+
+    	/**
+    	 * Creates a new DOM writer on the given output writer.
+    	 * 
+    	 * @param output the output writer
+    	 */
+    	public DOMWriter(Writer output) {
+    		super(output);
+    		tab = 0;
+    		println(XML_VERSION);
+    	}
+
+    	/**
+    	 * Prints the given element.
+    	 * 
+    	 * @param element the element to print
+    	 */
+        public void print(Element element) {
+        	// Ensure extra whitespace is not emitted next to a Text node,
+        	// as that will result in a situation where the restored text data is not the
+        	// same as the saved text data.
+        	boolean hasChildren = element.hasChildNodes();
+        	startTag(element, hasChildren);
+        	if (hasChildren) {
+	        	tab++;
+	        	boolean prevWasText = false;
+	        	NodeList children = element.getChildNodes();
+	    		for (int i = 0; i < children.getLength(); i++) {
+	    			Node node = children.item(i);
+	    			if (node instanceof Element) {
+	    				if (!prevWasText) {
+	    					println();
+	    					printTabulation();
+	    				}
+	    				print((Element) children.item(i));
+	    				prevWasText = false;
+	    			}
+	    			else if (node instanceof Text) {
+	    				print(getEscaped(node.getNodeValue()));
+	    				prevWasText = true;
+	    			}
+	    		}
+	    		tab--;
+	    		if (!prevWasText) {
+	    			println();
+	    			printTabulation();
+	    		}
+	    		endTag(element);
+        	}
+    	}
+
+    	private void printTabulation() {
+        	// Indenting is disabled, as it can affect the result of getTextData().
+        	// In 3.0, elements were separated by a newline but not indented.
+    		// This causes getTextData() to return "\n" even if no text data had explicitly been set.
+        	// The code here emulates that behaviour.
+    		
+//    		for (int i = 0; i < tab; i++)
+//    			super.print("\t"); //$NON-NLS-1$
+    	}
+
+    	private void startTag(Element element, boolean hasChildren) {
+    		StringBuffer sb = new StringBuffer();
+    		sb.append("<"); //$NON-NLS-1$
+    		sb.append(element.getTagName());
+    		NamedNodeMap attributes = element.getAttributes();
+   			for (int i = 0;  i < attributes.getLength(); i++) {
+   				Attr attribute = (Attr)attributes.item(i);
+				sb.append(" "); //$NON-NLS-1$
+				sb.append(attribute.getName());
+				sb.append("=\""); //$NON-NLS-1$
+				sb.append(getEscaped(String.valueOf(attribute.getValue())));
+				sb.append("\""); //$NON-NLS-1$
+   			}
+   			sb.append(hasChildren ? ">" : "/>"); //$NON-NLS-1$ //$NON-NLS-2$
+   			print(sb.toString());
+    	}
+
+    	private void endTag(Element element) {
+    		StringBuffer sb = new StringBuffer();
+    		sb.append("</"); //$NON-NLS-1$
+    		sb.append(element.getNodeName());
+    		sb.append(">"); //$NON-NLS-1$
+   			print(sb.toString());
+    	}
+    	
+    	private static void appendEscapedChar(StringBuffer buffer, char c) {
+    		String replacement = getReplacement(c);
+    		if (replacement != null) {
+    			buffer.append('&');
+    			buffer.append(replacement);
+    			buffer.append(';');
+    		} else if (c==9 || c==10 || c==13 || c>=32){
+    			buffer.append(c);
+    		}
+    	}
+
+    	private static String getEscaped(String s) {
+    		StringBuffer result = new StringBuffer(s.length() + 10);
+    		for (int i = 0; i < s.length(); ++i) {
+				appendEscapedChar(result, s.charAt(i));
+			}
+    		return result.toString();
+    	}
+
+    	private static String getReplacement(char c) {
+    		// Encode special XML characters into the equivalent character references.
+			// The first five are defined by default for all XML documents.
+			// The next three (#xD, #xA, #x9) are encoded to avoid them
+			// being converted to spaces on deserialization
+			// (fixes bug 93720)
+    		switch (c) {
+    			case '<' :
+    				return "lt"; //$NON-NLS-1$
+    			case '>' :
+    				return "gt"; //$NON-NLS-1$
+    			case '"' :
+    				return "quot"; //$NON-NLS-1$
+    			case '\'' :
+    				return "apos"; //$NON-NLS-1$
+    			case '&' :
+    				return "amp"; //$NON-NLS-1$
+				case '\r':
+					return "#x0D"; //$NON-NLS-1$
+				case '\n':
+					return "#x0A"; //$NON-NLS-1$
+				case '\u0009':
+					return "#x09"; //$NON-NLS-1$
+    		}
+    		return null;
+    	}
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DebugCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DebugCommand.java
deleted file mode 100644
index c3ad9c2..0000000
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DebugCommand.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.core.commands;
-
-import java.util.LinkedHashSet;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IRequest;
-import org.eclipse.debug.core.commands.IDebugCommandHandler;
-import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.debug.internal.core.DebugOptions;
-
-/**
- * Common function for standard debug commands.
- * 
- * @since 3.3
- *
- */
-public abstract class DebugCommand implements IDebugCommandHandler {
-	
-	/**
-	 * Job to update enabled state of action.
-	 */
-	class UpdateJob extends Job implements IJobChangeListener {
-		
-		/**
-		 * The request to update
-		 */
-		private IEnabledStateRequest request;
-		
-		/**
-		 * Whether this job has been run
-		 */
-		private boolean run = false;
-		
-		/**
-		 * Creates a new job to update the specified request
-		 * 
-		 * @param stateRequest
-		 */
-		UpdateJob(IEnabledStateRequest stateRequest) {
-			super(getEnablementTaskName());
-			request = stateRequest;
-			setSystem(true);
-			setRule(createUpdateSchedulingRule(request));
-			getJobManager().addJobChangeListener(this);
-		}
-		
-		protected IStatus run(IProgressMonitor monitor) {
-			run = true;
-			if (DebugOptions.DEBUG_COMMANDS) {
-				System.out.print("can execute command: " + DebugCommand.this); //$NON-NLS-1$
-			}
-			if (monitor.isCanceled()) {
-				if (DebugOptions.DEBUG_COMMANDS) {
-					System.out.println(" >> *CANCELED* <<"); //$NON-NLS-1$
-				}
-				request.cancel();
-			}
-			Object[] elements = request.getElements();
-			Object[] targets = new Object[elements.length];
-			if (!request.isCanceled()) {
-				for (int i = 0; i < elements.length; i++) {
-					targets[i] = getTarget(elements[i]);
-					if (targets[i] == null) {
-						request.setEnabled(false);
-						request.cancel();
-						if (DebugOptions.DEBUG_COMMANDS) {
-							System.out.println(" >> false (no adapter)"); //$NON-NLS-1$
-						}
-					}
-				}
-				if (monitor.isCanceled()) {
-					request.cancel();
-				}
-			}
-			if (!request.isCanceled()) {
-				targets = coalesce(targets);
-				monitor.beginTask(getEnablementTaskName(), targets.length);
-				try {
-					boolean executable = isExecutable(targets, monitor, request);
-					if (DebugOptions.DEBUG_COMMANDS) {
-						System.out.println(" >> " + executable); //$NON-NLS-1$
-					}
-					request.setEnabled(executable);
-				} catch (CoreException e) {
-					request.setStatus(e.getStatus());
-					request.setEnabled(false);
-					if (DebugOptions.DEBUG_COMMANDS) {
-						System.out.println(" >> ABORTED"); //$NON-NLS-1$
-						System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$
-					}
-				}
-			}
-			monitor.setCanceled(request.isCanceled());
-			request.done();
-			monitor.done();
-			return Status.OK_STATUS;
-		}
-		
-		/* (non-Javadoc)
-		 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
-		 */
-		public boolean belongsTo(Object family) {
-			return getUpdateJobFamily().equals(family);
-		}
-
-		public void aboutToRun(IJobChangeEvent event) {
-		}
-
-		public void awake(IJobChangeEvent event) {
-		}
-
-		public void done(IJobChangeEvent event) {
-			if (event.getJob() == this) {
-				if (!run) {
-					request.cancel();
-					request.done();
-					if (DebugOptions.DEBUG_COMMANDS) {
-						System.out.println(" >> *CANCELED* <<" + DebugCommand.this); //$NON-NLS-1$
-					}
-				}
-				getJobManager().removeJobChangeListener(this);
-			}
-		}
-
-		public void running(IJobChangeEvent event) {
-		}
-
-		public void scheduled(IJobChangeEvent event) {
-		}
-
-		public void sleeping(IJobChangeEvent event) {
-		}
-				
-	}
-	
-	/**
-	 * Scheduling rule to serialize commands on an object
-	 */
-   class SerialPerObjectRule implements ISchedulingRule {
-
-		private Object fObject = null;
-
-		public SerialPerObjectRule(Object lock) {
-			fObject = lock;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#contains(org.eclipse.core.runtime.jobs.ISchedulingRule)
-		 */
-		public boolean contains(ISchedulingRule rule) {
-			return rule == this;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.core.runtime.jobs.ISchedulingRule#isConflicting(org.eclipse.core.runtime.jobs.ISchedulingRule)
-		 */
-		public boolean isConflicting(ISchedulingRule rule) {
-			if (rule instanceof SerialPerObjectRule) {
-				SerialPerObjectRule vup = (SerialPerObjectRule) rule;
-				return fObject == vup.fObject;
-			}
-			return false;
-		}
-
-	}
-   
-	public boolean execute(final IDebugCommandRequest request) {
-		Job job = new Job(getExecuteTaskName()) {
-			protected IStatus run(IProgressMonitor monitor) {
-				if (DebugOptions.DEBUG_COMMANDS) {
-					System.out.println("execute: " + DebugCommand.this); //$NON-NLS-1$
-				}
-				Object[] elements = request.getElements();
-				Object[] targets = new Object[elements.length];
-				for (int i = 0; i < elements.length; i++) {
-					targets[i]= getTarget(elements[i]);
-				}
-				targets = coalesce(targets);
-				monitor.beginTask(getExecuteTaskName(), targets.length);
-				try {
-					doExecute(targets, monitor, request);
-				} catch (CoreException e) {
-					request.setStatus(e.getStatus());
-					if (DebugOptions.DEBUG_COMMANDS) {
-						System.out.println("\t" + e.getStatus().getMessage()); //$NON-NLS-1$
-					}
-				}
-				request.done();
-				monitor.setCanceled(request.isCanceled());
-				monitor.done();
-				return Status.OK_STATUS;
-			}
-		};
-		job.setSystem(true);
-		job.schedule();
-		return isRemainEnabled();
-	}	
-	
-	/**
-	 * Returns whether this command should remain enabled after execution is invoked.
-	 * 
-	 * @return whether to remain enabled
-	 */
-	protected boolean isRemainEnabled() {
-		return false;
-	}
-	
-	public void canExecute(final IEnabledStateRequest request) {
-		Job job = new UpdateJob(request);
-		job.schedule();
-	}
-	
-	/**
-	 * Returns the name to use for jobs and progress monitor task names when checking
-	 * enabled state.
-	 * 
-	 * @return task name
-	 */
-	protected String getEnablementTaskName() {
-		// this is a system job name and does not need to be NLS'd
-		return "Check Debug Command"; //$NON-NLS-1$
-	}
-	
-	/**
-	 * Returns the name to use for jobs and progress monitor task names when executing
-	 * a debug command
-	 * 
-	 * @return task name
-	 */
-	protected String getExecuteTaskName() {
-		// this is a system job name and does not need to be NLS'd
-		return "Execute Debug Command"; //$NON-NLS-1$
-	}	
-
-	/**
-	 * Executes the actual operation.
-	 * 
-	 * @param targets objects to perform on
-	 * @param request request
-	 */
-	protected abstract void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException;
-
-	/**
-	 * Returns whether this command is executable.
-	 * 
-	 * @param targets objects to check command for
-	 * @param monitor progress monitor
-	 * @param request request
-	 * @return whether this command can be executed
-	 */
-	protected abstract boolean isExecutable(Object[] targets, IProgressMonitor monitor, IEnabledStateRequest request) throws CoreException;
-	
-	/**
-	 * Returns the appropriate command adapter from the given object.
-	 * 
-	 * @param element object to obtain adapter from
-	 * @return adapter
-	 */
-	protected abstract Object getTarget(Object element); 
-	
-	/**
-	 * Returns an adapter of the specified type for the given object or <code>null</code>
-	 * if none. The object itself is returned if it is an instance of the specified type.
-	 * 
-	 * @param element element to retrieve adapter for
-	 * @param type adapter type
-	 * @return adapter or <code>null</code>
-	 */
-	protected Object getAdapter(Object element, Class type) {
-    	return DebugPlugin.getAdapter(element, type);	
-	}	
-	
-	/**
-	 * Scheduling rule for updating command enabled state.
-	 * 
-	 * @return scheduling rule or <code>null</code>
-	 */
-	protected ISchedulingRule createUpdateSchedulingRule(IDebugCommandRequest request) {
-		return new SerialPerObjectRule(request.getElements()[0]);
-	}
-	
-	private Object[] coalesce(Object[] objects) {
-		if (objects.length == 1) {
-			return objects;
-		} else {
-			LinkedHashSet set = new LinkedHashSet(objects.length);
-			for (int i = 0; i < objects.length; i++) {
-				set.add(objects[i]);
-			}
-			return set.toArray();
-		}
-	}
-	
-	/**
-	 * Returns the job family for this command's "can execute" job.
-	 * 
-	 * @return the job family for this command's "can execute" job
-	 */
-	protected abstract Object getUpdateJobFamily();
-	
-}
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DisconnectCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DisconnectCommand.java
index 8540df1..956c4df 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DisconnectCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DisconnectCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IDisconnectHandler;
 import org.eclipse.debug.core.model.IDisconnect;
 
@@ -40,9 +41,9 @@ public class DisconnectCommand extends ForEachCommand implements IDisconnectHand
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IDisconnectHandler.class;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DropToFrameCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DropToFrameCommand.java
index 692cf30..a0d712d 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DropToFrameCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/DropToFrameCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IDropToFrameHandler;
 import org.eclipse.debug.core.model.IDropToFrame;
 
@@ -40,9 +41,9 @@ public class DropToFrameCommand extends StepCommand implements IDropToFrameHandl
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IDropToFrameHandler.class;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ForEachCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ForEachCommand.java
index f536d90..a92772e 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ForEachCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ForEachCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.debug.internal.core.commands;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.core.commands.AbstractDebugCommand;
 import org.eclipse.debug.core.commands.IEnabledStateRequest;
 
 /**
@@ -20,7 +21,7 @@ import org.eclipse.debug.core.commands.IEnabledStateRequest;
  * 
  * @since 3.3
  */
-public abstract class ForEachCommand extends DebugCommand {
+public abstract class ForEachCommand extends AbstractDebugCommand {
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#doExecute(java.lang.Object[], org.eclipse.core.runtime.IProgressMonitor, org.eclipse.debug.core.IRequest)
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/Request.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/Request.java
index 29ac7b7..4de8e21 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/Request.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/Request.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     John Cortell (Freescale) - update javadoc tags (Bug 292301)
  *******************************************************************************/
 package org.eclipse.debug.internal.core.commands;
 
@@ -22,34 +23,34 @@ public class Request implements IRequest {
 	private boolean fCanceled = false;
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.commands.IStatusCollector#done()
+	 * @see org.eclipse.debug.core.IRequest#done()
 	 */
 	public void done() {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.commands.IStatusCollector#getStatus()
+	 * @see org.eclipse.debug.core.IRequest#getStatus()
 	 */
 	public IStatus getStatus() {
 		return fStatus;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.commands.IStatusCollector#setStatus(org.eclipse.core.runtime.IStatus)
+	 * @see org.eclipse.debug.core.IRequest#setStatus(org.eclipse.core.runtime.IStatus)
 	 */
 	public void setStatus(IStatus status) {
 		fStatus = status;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.commands.IRequest#cancel()
+	 * @see org.eclipse.debug.core.IRequest#cancel()
 	 */
 	public synchronized void cancel() {
 		fCanceled = true;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.commands.IRequest#isCanceled()
+	 * @see org.eclipse.debug.core.IRequest#isCanceled()
 	 */
 	public synchronized boolean isCanceled() {
 		return fCanceled;
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ResumeCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ResumeCommand.java
index 6a9ea43..91475b0 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ResumeCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/ResumeCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IResumeHandler;
 import org.eclipse.debug.core.model.ISuspendResume;
 
@@ -30,9 +31,9 @@ public class ResumeCommand extends SuspendCommand implements IResumeHandler {
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.SuspendCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.internal.core.commands.SuspendCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IResumeHandler.class;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepCommand.java
index 5b560a3..9fd08ae 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.core.commands.AbstractDebugCommand;
 import org.eclipse.debug.core.commands.IEnabledStateRequest;
 import org.eclipse.debug.core.model.IStackFrame;
 import org.eclipse.debug.core.model.IStep;
@@ -26,7 +27,7 @@ import org.eclipse.debug.core.model.IStep;
  * 
  * @since 3.3
  */
-public abstract class StepCommand extends DebugCommand {
+public abstract class StepCommand extends AbstractDebugCommand {
 
 	protected void doExecute(Object[] targets, IProgressMonitor monitor, IRequest request) throws CoreException {
 		for (int i = 0; i < targets.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepFiltersCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepFiltersCommand.java
index df01527..e5bfdc9 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepFiltersCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepFiltersCommand.java
@@ -13,6 +13,7 @@ package org.eclipse.debug.internal.core.commands;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IStepFiltersHandler;
 import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IDebugTarget;
@@ -90,9 +91,9 @@ public class StepFiltersCommand extends ForEachCommand implements IStepFiltersHa
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IStepFiltersHandler.class;
 	}	
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepIntoCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepIntoCommand.java
index 368ad65..998c153 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepIntoCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepIntoCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IStepIntoHandler;
 import org.eclipse.debug.core.model.IStep;
 
@@ -30,9 +31,9 @@ public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IStepIntoHandler.class;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepOverCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepOverCommand.java
index 2535a2b..bf8d2d8 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepOverCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepOverCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IStepOverHandler;
 import org.eclipse.debug.core.model.IStep;
 
@@ -34,9 +35,9 @@ public class StepOverCommand extends StepCommand implements IStepOverHandler {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IStepOverHandler.class;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepReturnCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepReturnCommand.java
index f8ade68..f44a896 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepReturnCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/StepReturnCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.IStepReturnHandler;
 import org.eclipse.debug.core.model.IStep;
 
@@ -29,10 +30,11 @@ public class StepReturnCommand extends StepCommand implements IStepReturnHandler
 		((IStep)target).stepReturn();
 	}
 
+
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return IStepReturnHandler.class;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/SuspendCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/SuspendCommand.java
index ef99bff..3db9b9b 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/SuspendCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/SuspendCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.ISuspendHandler;
 import org.eclipse.debug.core.model.ISuspendResume;
 
@@ -34,9 +35,9 @@ public class SuspendCommand extends ForEachCommand implements ISuspendHandler {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return ISuspendHandler.class;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/TerminateCommand.java b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/TerminateCommand.java
index 85bc34c..35962d8 100644
--- a/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/TerminateCommand.java
+++ b/eclipse/plugins/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/commands/TerminateCommand.java
@@ -11,6 +11,7 @@
 package org.eclipse.debug.internal.core.commands;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
 import org.eclipse.debug.core.commands.ITerminateHandler;
 import org.eclipse.debug.core.model.ITerminate;
 
@@ -34,9 +35,9 @@ public class TerminateCommand extends ForEachCommand implements ITerminateHandle
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.commands.DebugCommand#getUpdateJobFamily()
+	 * @see org.eclipse.debug.core.commands.AbstractDebugCommand#getEnabledStateJobFamily(org.eclipse.debug.core.commands.IDebugCommandRequest)
 	 */
-	protected Object getUpdateJobFamily() {
+	protected Object getEnabledStateJobFamily(IDebugCommandRequest request) {
 		return ITerminateHandler.class;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.core/plugin.xml b/eclipse/plugins/org.eclipse.debug.core/plugin.xml
index 211a3ea..19ba532 100644
--- a/eclipse/plugins/org.eclipse.debug.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.debug.core/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -222,12 +223,20 @@
             class="org.eclipse.debug.internal.core.sourcelookup.SourceLocatorMementoComparator"
             id="org.eclipse.debug.core.sourceLocatorMementoComparator">
       </launchConfigurationComparator>
+      <launchConfigurationComparator
+            attribute="org.eclipse.debug.core.ATTR_REFRESH_SCOPE"
+            class="org.eclipse.debug.internal.core.RefreshScopeComparator"
+            id="org.eclipse.debug.core.comparator.refresh.scope">
+      </launchConfigurationComparator>
    </extension>
    <extension
          point="org.eclipse.core.runtime.preferences">
       <initializer
             class="org.eclipse.debug.internal.core.DebugPreferenceInitializer">
       </initializer>
+      <modifier
+            class="org.eclipse.debug.internal.core.PreferredDelegateModifyListener">
+      </modifier>
    </extension>
 
 <!-- ===================================== -->
diff --git a/eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html b/eclipse/plugins/org.eclipse.debug.core/r3_5_buildnotes_platform-debug.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.debug.core/buildnotes_platform-debug.html
copy to eclipse/plugins/org.eclipse.debug.core/r3_5_buildnotes_platform-debug.html
diff --git a/eclipse/plugins/org.eclipse.debug.ui/.options b/eclipse/plugins/org.eclipse.debug.ui/.options
index 03fe0ac..6932029 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/.options
+++ b/eclipse/plugins/org.eclipse.debug.ui/.options
@@ -2,6 +2,7 @@ org.eclipse.debug.ui/debug = false
 org.eclipse.debug.ui/debug/viewers/model = false
 org.eclipse.debug.ui/debug/viewers/viewer = false
 org.eclipse.debug.ui/debug/viewers/deltas = false
+org.eclipse.debug.ui/debug/viewers/breakpointDeltas = false
 org.eclipse.debug.ui/debug/viewers/contentProvider = false
 org.eclipse.debug.ui/debug/viewers/updateSequence = false
 org.eclipse.debug.ui/debug/contextlaunching = false
diff --git a/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
index ed8c65e..bc985ad 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,99 +1,101 @@
-#Fri Feb 27 08:45:15 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Thu Oct 15 14:59:52 CDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
index 7686374..b0993ea 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.debug.ui/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:38:16 CST 2007
+#Mon Dec 14 12:01:57 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=1
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.debug.ui/META-INF/MANIFEST.MF
index ccb28b2..8281b20 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.debug.ui/META-INF/MANIFEST.MF
@@ -2,17 +2,23 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.3.qualifier
 Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Export-Package: org.eclipse.debug.internal.ui;x-internal:=true,
+Export-Package: org.eclipse.debug.internal.ui;x-friends:="org.eclipse.jdt.debug.ui",
  org.eclipse.debug.internal.ui.actions;x-internal:=true,
  org.eclipse.debug.internal.ui.actions.breakpointGroups;x-internal:=true,
  org.eclipse.debug.internal.ui.actions.breakpoints;x-internal:=true,
  org.eclipse.debug.internal.ui.actions.expressions;x-internal:=true,
  org.eclipse.debug.internal.ui.actions.variables;x-internal:=true,
  org.eclipse.debug.internal.ui.actions.variables.details;x-internal:=true,
+ org.eclipse.debug.internal.ui.breakpoints.provisional;
+  x-friends:="org.eclipse.debug.examples.ui,
+   org.eclipse.jdt.debug.ui,
+   org.eclipse.cdt.dsf.ui,
+   org.eclipse.cdt.dsf.gdb.ui,
+   org.eclipse.debug.tests",
  org.eclipse.debug.internal.ui.commands.actions;x-internal:=true,
  org.eclipse.debug.internal.ui.contextlaunching;x-internal:=true,
  org.eclipse.debug.internal.ui.contexts;x-internal:=true,
@@ -29,13 +35,14 @@ Export-Package: org.eclipse.debug.internal.ui;x-internal:=true,
  org.eclipse.debug.internal.ui.stringsubstitution;x-internal:=true,
  org.eclipse.debug.internal.ui.viewers;x-internal:=true,
  org.eclipse.debug.internal.ui.viewers.breadcrumb;x-internal:=true,
- org.eclipse.debug.internal.ui.viewers.model;x-internal:=true,
+ org.eclipse.debug.internal.ui.viewers.model;x-friends:="org.eclipse.debug.tests",
  org.eclipse.debug.internal.ui.viewers.model.provisional;
   x-friends:="org.eclipse.debug.examples.ui,
    org.eclipse.jdt.debug.ui,
    org.eclipse.cdt.dsf.ui,
-   org.eclipse.cdt.dsf.gdb.ui",
- org.eclipse.debug.internal.ui.viewers.provisional;x-internal:=true,
+   org.eclipse.cdt.dsf.gdb.ui,
+   org.eclipse.debug.tests",
+ org.eclipse.debug.internal.ui.viewers.provisional;x-friends:="org.eclipse.debug.tests",
  org.eclipse.debug.internal.ui.viewers.update;x-internal:=true,
  org.eclipse.debug.internal.ui.views;x-internal:=true,
  org.eclipse.debug.internal.ui.views.breakpoints;x-internal:=true,
@@ -59,7 +66,7 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.console;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.debug.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
  org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
@@ -68,5 +75,6 @@ Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-ClassPath: .
-Import-Package: com.ibm.icu.text
+Import-Package: com.ibm.icu.text,
+ org.eclipse.ui.forms.widgets
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.debug.ui/build.properties b/eclipse/plugins/org.eclipse.debug.ui/build.properties
index 6cf5232..22014dc 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,3 +19,4 @@ bin.includes = icons/,\
 source.. = ui/
 src.includes = about.html,\
                schema/
+output.. = bin/
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/icons/full/dlcl16/th_automatic.gif b/eclipse/plugins/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_auto.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.junit/icons/full/dlcl16/th_automatic.gif
copy to eclipse/plugins/org.eclipse.debug.ui/icons/full/dlcl16/det_pane_auto.gif
diff --git a/eclipse/plugins/org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif b/eclipse/plugins/org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif
new file mode 100644
index 0000000..a3c6fc5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.debug.ui/icons/full/dlcl16/restart_co.gif differ
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/icons/full/elcl16/th_automatic.gif b/eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/det_pane_auto.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.junit/icons/full/elcl16/th_automatic.gif
copy to eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/det_pane_auto.gif
diff --git a/eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif b/eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif
new file mode 100644
index 0000000..5708b00
Binary files /dev/null and b/eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/restart_co.gif differ
diff --git a/eclipse/plugins/org.eclipse.debug.ui/plugin.properties b/eclipse/plugins/org.eclipse.debug.ui/plugin.properties
index e886913..2d8faf4 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/plugin.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 #     QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
 #     Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
@@ -42,6 +42,7 @@ ContextualLaunchingPrefPage.name=Contextual Launching
 
 DefaultLaunchConfigurationsPropPage.name=Run/Debug Settings
 
+Copy.label=&Copy
 BreakpointActionSet.label=Breakpoints
 CollapseAll.label=Collapse All
 CollapseAll.tooltip= Collapse All
@@ -197,10 +198,12 @@ ActionDefinition.stepOver.description= Step over
 ActionDefinition.stepReturn.name= Step Return
 ActionDefinition.stepReturn.description= Step return
 
+ActionDefinition.restart.name=Restart
+ActionDefinition.restart.description=Restart a process or debug target without terminating and re-launching
+
 ActionDefinition.resume.name=Resume
 ActionDefinition.resume.description=Resume
 
-
 ActionDefinition.runToLine.name=Run to Line
 ActionDefinition.runToLine.description=Resume and break when execution reaches the current line
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/plugin.xml b/eclipse/plugins/org.eclipse.debug.ui/plugin.xml
index 86759a8..57739e5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.debug.ui/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -8,6 +9,7 @@
     
      Contributors:
          IBM Corporation - initial API and implementation
+         Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  -->
 
 <plugin>
@@ -608,15 +610,6 @@
        </menuContribution>
    </extension>  
    
-   <extension point="org.eclipse.core.expressions.propertyTesters">
-      <propertyTester
-            class="org.eclipse.debug.internal.ui.actions.breakpoints.BreakpointTypesPropertyTester"
-            id="org.eclipse.debug.ui.breakpointTypesProperties"
-            namespace="org.eclipse.debug.ui"
-            properties="getAvailableBreakpointType,areBreakpointTypesAvailable"
-            type="org.eclipse.core.runtime.IAdaptable"/>
-   </extension>  
-         
    <extension
          point="org.eclipse.ui.viewActions">
       <viewContribution
@@ -772,8 +765,8 @@
          <action
                label="%addWatchExpressionAction.label"
                toolbarPath="expressionGroup"
-               icon="$nl$/icons/full/etool16/watch_exp.gif"
-               hoverIcon="$nl$/icons/full/etool16/watch_exp.gif"
+               icon="$nl$/icons/full/elcl16/monitorexpression_tsk.gif"
+               hoverIcon="$nl$/icons/full/elcl16/monitorexpression_tsk.gif"
                helpContextId="add_watch_expression_context"
                class="org.eclipse.debug.internal.ui.actions.expressions.AddWatchExpressionAction"
                tooltip="%addWatchExpressionAction.tooltip"
@@ -1206,7 +1199,7 @@
             id="org.eclipse.debug.ui.ExpressionViewPopupActions">
          <action
                label="%addWatchExpressionAction.label"
-               icon="$nl$/icons/full/etool16/watch_exp.gif"
+               icon="$nl$/icons/full/elcl16/monitorexpression_tsk.gif"
                helpContextId="add_watch_expression_context"
                class="org.eclipse.debug.internal.ui.actions.expressions.AddWatchExpressionAction"
                tooltip="%addWatchExpressionAction.tooltip"
@@ -1276,7 +1269,7 @@
             id="org.eclipse.debug.ui.breakpointview.breakpointGroupActions">
          <visibility>
             <objectClass
-               name="org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer">
+               name="org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer">
             </objectClass>
          </visibility>
          <action
@@ -1298,6 +1291,14 @@
             targetID="org.eclipse.debug.ui.BreakpointView"
             id="org.eclipse.debug.ui.breakpointview.popupMenu">
          <action
+               label="%Copy.label"
+               icon="$nl$/icons/full/elcl16/copy_edit_co.gif"
+               definitionId="org.eclipse.ui.edit.copy"
+               helpContextId="copy_breakpoints_action_context"
+               class="org.eclipse.debug.internal.ui.actions.breakpointGroups.CopyBreakpointsActionDelegate"
+               menubarPath="breakpointGroup"
+               id="org.eclipse.debug.ui.breakpointsView.toolbar.copy"/>
+         <action
                label="%SelectAll.label"
                helpContextId="select_all_breakpoints_action_context"
                definitionId="org.eclipse.ui.edit.selectAll"
@@ -1341,13 +1342,6 @@
                id="org.eclipse.debug.ui.actions.EnableBreakpoint">
         </action>
         <action
-              class="org.eclipse.debug.internal.ui.importexport.breakpoints.ImportBreakpoints"
-              helpContextId="import_breakpoints_action_context"
-              icon="$nl$/icons/full/elcl16/import_brkpts.gif"
-              id="org.eclipse.debug.internal.ui.importexport.breakpoints.importBreakpointsContext"
-              label="%importBreakpoints.label"
-              menubarPath="additions"/>
-        <action
               class="org.eclipse.debug.internal.ui.importexport.breakpoints.ExportBreakpoints"
               enablesFor="+"
               helpContextId="export_breakpoints_action_context"
@@ -1355,6 +1349,13 @@
               id="org.eclipse.debug.internal.ui.importexport.breakpoints.exportBreakpointsContext"
               label="%exportBreakpoints.label"
               menubarPath="additions"/>
+        <action
+              class="org.eclipse.debug.internal.ui.importexport.breakpoints.ImportBreakpoints"
+              helpContextId="import_breakpoints_action_context"
+              icon="$nl$/icons/full/elcl16/import_brkpts.gif"
+              id="org.eclipse.debug.internal.ui.importexport.breakpoints.importBreakpointsContext"
+              label="%importBreakpoints.label"
+              menubarPath="additions"/>
       </viewerContribution>
       <!-- Breakpoint actions -->
 <!-- Contributions to Variables View Popup Menu -->
@@ -1643,6 +1644,16 @@ M4 = Platform-specific fourth key
             categoryId="org.eclipse.debug.ui.category.run"
             description="%ActionDefinition.terminateAndRelaunch.description"
             id="org.eclipse.debug.ui.commands.TerminateAndRelaunch">
+         <defaultHandler
+               class="org.eclipse.debug.internal.ui.commands.actions.TerminateAndRelaunchHandler">
+         </defaultHandler>
+      </command>
+      <command
+            name="%ActionDefinition.restart.name"
+            categoryId="org.eclipse.debug.ui.category.run"
+            description="%ActionDefinition.restart.description"
+            id="org.eclipse.debug.ui.commands.Restart"
+            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.RestartCommandHandler">
       </command>
       <command
             name="%ActionDefinition.suspend.name"
@@ -2259,7 +2270,7 @@ M4 = Platform-specific fourth key
          </factory>
          <factory 
             class="org.eclipse.debug.internal.ui.DebugUIAdapterFactory"
-            adaptableType="org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer">
+            adaptableType="org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer">
             <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
             <adapter type="org.eclipse.ui.model.IWorkbenchAdapter2"/>
          </factory>
@@ -2335,6 +2346,9 @@ M4 = Platform-specific fourth key
                adaptableType="org.eclipse.debug.core.model.IProcess"
                class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
             <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider">
+            </adapter>
+            <adapter
                   type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
             </adapter>
             <adapter
@@ -2419,6 +2433,13 @@ M4 = Platform-specific fourth key
             </adapter>
          </factory>
          <factory
+               adaptableType="org.eclipse.debug.core.model.IWatchExpression"
+               class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor">
+            </adapter>
+         </factory>
+         <factory
                adaptableType="org.eclipse.debug.core.IExpressionManager"
                class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
             <adapter
@@ -2430,6 +2451,9 @@ M4 = Platform-specific fourth key
             <adapter
                   type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider">
             </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory">
+            </adapter>
          </factory>
          <factory
                adaptableType="org.eclipse.debug.core.model.IDebugElement"
@@ -2473,6 +2497,48 @@ M4 = Platform-specific fourth key
                   type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
             </adapter>
          </factory>
+		 <factory
+               adaptableType="org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput"
+               class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider">
+            </adapter>
+         </factory>
+		 <factory
+               adaptableType="org.eclipse.debug.core.model.IBreakpoint"
+               class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider">
+            </adapter>
+         </factory>
+         <factory
+               adaptableType="org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer"
+               class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider">
+            </adapter>
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider">
+            </adapter>            
+            <adapter
+                  type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
+            </adapter>
+         </factory>      
          <factory
                adaptableType="org.eclipse.debug.core.ILaunch"
                class="org.eclipse.debug.internal.ui.contexts.SuspendTriggerAdapterFactory">
@@ -2767,7 +2833,7 @@ M4 = Platform-specific fourth key
           <description>
           	%exportBreakpoints.description
           </description>
-          <selection class="org.eclipse.core.resources.IResource"/>
+          <selection class="org.eclipse.debug.core.model.IBreakpoint"/>
        </wizard>
        <wizard
              category="org.eclipse.debug.ui"
@@ -2853,5 +2919,21 @@ M4 = Platform-specific fourth key
          </colorOverride>
       </theme>
    </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.debug.internal.ui.views.launch.TerminateAndRemoveHandler"
+            commandId="org.eclipse.ui.edit.delete">
+         <activeWhen>
+            <iterate
+                  ifEmpty="false"
+                  operator="and">
+               <adapt
+                     type="org.eclipse.debug.core.model.ITerminate">
+               </adapt>
+            </iterate>
+         </activeWhen>
+      </handler>
+   </extension>
 
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.debug.ui/schema/detailPaneFactories.exsd b/eclipse/plugins/org.eclipse.debug.ui/schema/detailPaneFactories.exsd
index 3a89fb4..9471d72 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/schema/detailPaneFactories.exsd
+++ b/eclipse/plugins/org.eclipse.debug.ui/schema/detailPaneFactories.exsd
@@ -1,12 +1,12 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.debug.ui">
+<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.debug.ui" id="detailPaneFactories" name="Detail Pane Factories Extension"/>
       </appInfo>
       <documentation>
-         This extension point allows clients to contribute custom renderings for the detail pane in the variables, registers and expression views. To contribute a custom detail pane, an implementation of <code>IDetailPaneFactory</code> is registered using this extension point.  A detail pane factory creates an <code>IDetailPane</code> for each custom rendering.
+         This extension point allows clients to contribute custom renderings for the detail pane in the variables, registers, expressions, and breakpoints views (note that support for breakpoint view detail panes was added in 3.6). To contribute a custom detail pane, an implementation of <code>IDetailPaneFactory</code> is registered using this extension point.  A detail pane factory creates an <code>IDetailPane</code> for each custom rendering (note that optional extensions have been added to detail panes via  <code>IDetailPane2</code> and <code>IDetailPane3</code>).
 <p>
 Views with detail panes allow users select from available detail panes via the context menu. All contributions to this extension point are checked agaist the current selection. A detail factory should provide an enablement expression to ensure lazy plug-in loading. A factory will only be instantiated if its expression evaluates to true for the current selection (see the example extension point for an example enablement expression). Each applicable factory is then consulted for the types of detail panes it can produce for the current selection.
 </p>
@@ -16,6 +16,11 @@ Views with detail panes allow users select from available detail panes via the c
    <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence minOccurs="1" maxOccurs="unbounded">
             <element ref="detailFactories"/>
@@ -133,7 +138,7 @@ Views with detail panes allow users select from available detail panes via the c
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2000, 2006 IBM Corporation and others.<br>
+         Copyright (c) 2000, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 which 
 accompanies this distribution, and is available at 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd b/eclipse/plugins/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
index 66dfe26..6221b60 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
+++ b/eclipse/plugins/org.eclipse.debug.ui/schema/toggleBreakpointsTargetFactories.exsd
@@ -1,9 +1,9 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.cdt.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.debug.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appinfo>
-         <meta.schema plugin="org.eclipse.cdt.debug.ui" id="toggleBreakpointsTargetFactories" name="toggleBreakpointsTargetFactories"/>
+         <meta.schema plugin="org.eclipse.debug.ui" id="toggleBreakpointsTargetFactories" name="toggleBreakpointsTargetFactories"/>
       </appinfo>
       <documentation>
          This extension point provides a mechanism for contributing breakpoint toggle action targets which can be registered for specific editors, debug models, or files.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
index 8fa516a..27b7119 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugCheckboxSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,7 +76,10 @@ public abstract class AbstractDebugCheckboxSelectionDialog extends AbstractDebug
 	protected StructuredViewer createViewer(Composite parent){
 		//by default return a checkbox table viewer
 		Table table = new Table(parent, SWT.BORDER | SWT.SINGLE | SWT.CHECK);
-		table.setLayoutData(new GridData(GridData.FILL_BOTH));
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		gd.heightHint = 150;
+		gd.widthHint = 250;
+		table.setLayoutData(gd);
 		return new CheckboxTableViewer(table);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
index fbff613..d9f641d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugListSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,11 +42,8 @@ public abstract class AbstractDebugListSelectionDialog extends AbstractDebugSele
 		setShellStyle(getShellStyle() | SWT.RESIZE);
 	}
 	
-	/**
-	 * Create and return a viewer to use in this dialog.
-	 * 
-	 * @param parent the composite the viewer should be created in
-	 * @return the viewer to use in the dialog
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.AbstractDebugSelectionDialog#createViewer(org.eclipse.swt.widgets.Composite)
 	 */
 	protected StructuredViewer createViewer(Composite parent){
 		//by default return a table viewer
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
index b48b2f1..cbf3d08 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/AbstractDebugSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
@@ -47,6 +46,7 @@ public abstract class AbstractDebugSelectionDialog extends SelectionDialog {
 	 */
 	public AbstractDebugSelectionDialog(Shell parentShell) {
 		super(parentShell);
+		setDialogBoundsSettings(getDialogBoundsSettings(), Dialog.DIALOG_PERSISTSIZE);
 	}
 	
 	/**
@@ -212,25 +212,4 @@ public abstract class AbstractDebugSelectionDialog extends SelectionDialog {
 		} 
 		return section;
 	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
-	 */
-	protected Point getInitialSize() {
-		IDialogSettings settings = getDialogBoundsSettings();
-		if(settings != null) {
-			try {
-				int width = settings.getInt("DIALOG_WIDTH"); //$NON-NLS-1$
-				int height = settings.getInt("DIALOG_HEIGHT"); //$NON-NLS-1$
-				if(width > 0 & height > 0) {
-					return new Point(width, height);
-				}
-			}
-			catch (NumberFormatException nfe) {
-				return new Point(350, 350);
-			}
-		}
-		return new Point(350, 350);
-	}
-	
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
index 6c989e5..2babae5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPluginImages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -97,6 +97,7 @@ public class DebugPluginImages {
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER, DLCL + "det_pane_under.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT, DLCL + "det_pane_right.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE, DLCL + "det_pane_hide.gif"); //$NON-NLS-1$
+		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_AUTO, DLCL + "det_pane_auto.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_LOCK, DLCL + "lock_co.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TYPE_NAMES, DLCL + "tnames_co.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_SHOW_LOGICAL_STRUCTURE, DLCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
@@ -126,12 +127,14 @@ public class DebugPluginImages {
         declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_TOGGLE_STEP_FILTERS, DLCL+"stepbystep_co.gif"); //$NON-NLS-1$
         declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_NEXT_THREAD, DLCL+"next_thread_nav.gif"); //$NON-NLS-1$
         declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_PREVIOUS_THREAD, DLCL+"prev_thread_nav.gif"); //$NON-NLS-1$
+        declareRegistryImage(IInternalDebugUIConstants.IMG_DLCL_RESTART, DLCL+"restart_co.gif"); //$NON-NLS-1$
         
 		// enabled local toolbars
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE, ELCL + "toggledetailpane_co.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER, ELCL + "det_pane_under.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT, ELCL + "det_pane_right.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE, ELCL + "det_pane_hide.gif"); //$NON-NLS-1$
+		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_AUTO, ELCL + "det_pane_auto.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_LOCK, ELCL + "lock_co.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_TYPE_NAMES, ELCL + "tnames_co.gif"); //$NON-NLS-1$
 		declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_SHOW_LOGICAL_STRUCTURE, ELCL + "var_cntnt_prvdr.gif"); //$NON-NLS-1$
@@ -163,6 +166,7 @@ public class DebugPluginImages {
         declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_STANDARD_ERR, ELCL+"writeerr_co.gif"); //$NON-NLS-1$
         declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_NEXT_THREAD, ELCL+"next_thread_nav.gif"); //$NON-NLS-1$
         declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_PREVIOUS_THREAD, ELCL+"prev_thread_nav.gif"); //$NON-NLS-1$
+        declareRegistryImage(IInternalDebugUIConstants.IMG_ELCL_RESTART, ELCL+"restart_co.gif"); //$NON-NLS-1$
         
 		//Object
 		declareRegistryImage(IDebugUIConstants.IMG_OBJS_LAUNCH_DEBUG, OBJECT + "ldebug_obj.gif"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
index e788f80..f44a524 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui;
  
 import org.eclipse.core.runtime.IAdapterFactory;
 import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainerWorkbenchAdapter;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointPersistableElementAdapter;
 import org.eclipse.ui.IPersistableElement;
@@ -37,13 +37,13 @@ public class DebugUIAdapterFactory implements IAdapterFactory {
 		}
         
         if (adapterType == IWorkbenchAdapter.class) {
-            if (obj instanceof BreakpointContainer) {
+            if (obj instanceof IBreakpointContainer) {
                 return new BreakpointContainerWorkbenchAdapter();
             }
         }
 		
         if (adapterType == IWorkbenchAdapter2.class) {
-            if (obj instanceof BreakpointContainer) {
+            if (obj instanceof IBreakpointContainer) {
                 return new BreakpointContainerWorkbenchAdapter();
             }
         }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
index 72518dc..4f2ad16 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -252,6 +252,11 @@ public class DebugUIMessages extends NLS {
 	public static String WorkingDirectoryBlock_1;
 	public static String WorkingDirectoryBlock_Exception_occurred_reading_configuration___15;
 		
+	//
+	// Elements
+	// 
+    public static String ExpressionManagerContentProvider_1;
+	
 	static {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, DebugUIMessages.class);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
index f0e2cb0..8068829 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -236,3 +236,8 @@ WorkingDirectoryBlock_19=Ot&her:
 WorkingDirectoryBlock_20=Working directory not specified
 WorkingDirectoryBlock_1=&File System...
 WorkingDirectoryBlock_Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
+
+##############################################################
+# Elements
+##############################################################
+ExpressionManagerContentProvider_1=Add new expression
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index b2316bc..d6ac5b6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Sascha Radike - bug 56642
+ *     Martin Oberhuber (Wind River) - [327446] Avoid unnecessary wait-for-build dialog.
  *******************************************************************************/
 package org.eclipse.debug.internal.ui;
 
@@ -48,6 +49,8 @@ import org.eclipse.debug.core.ILaunchListener;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.core.IStatusHandler;
 import org.eclipse.debug.core.Launch;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
 import org.eclipse.debug.internal.ui.launchConfigurations.ClosedProjectFilter;
@@ -56,6 +59,7 @@ import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationEdi
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTypeFilter;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;
 import org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager;
 import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility;
@@ -79,6 +83,7 @@ import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
 import org.eclipse.swt.custom.BusyIndicator;
@@ -410,6 +415,10 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
                 fImageDescriptorRegistry.dispose();
             }
             
+            if (fgDefaultLabelProvider != null) {
+            	fgDefaultLabelProvider.dispose();
+            }
+            
             SourceLookupFacility.shutdown();
 			
 			DebugElementHelper.dispose();
@@ -673,6 +682,30 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
     	return Window.CANCEL;
     }
     
+    /**
+     * Opens the {@link LaunchConfigurationsDialog} on the given selection for the given group. A status
+     * can be provided or <code>null</code> and the dialog can initialize the given {@link ILaunchConfiguration}
+     * to its defaults when opening as well - as long as the specified configuration is an {@link ILaunchConfigurationWorkingCopy}.
+     * @param shell
+     * @param selection
+     * @param groupIdentifier
+     * @param status
+     * @param setDefaults
+     * @return the return code from the dialog.open() call
+     * @since 3.6
+     */
+    public static int openLaunchConfigurationsDialog(Shell shell, IStructuredSelection selection, String groupIdentifier, boolean setDefaults) {
+    	LaunchGroupExtension group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupIdentifier);
+    	if (group != null) {
+			LaunchConfigurationsDialog dialog = new LaunchConfigurationsDialog(shell, group);
+			dialog.setOpenMode(LaunchConfigurationsDialog.LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION);
+			dialog.setInitialSelection(selection);
+			dialog.setDefaultsOnOpen(setDefaults);
+			return dialog.open();
+    	}
+    	return Window.CANCEL;
+    }
+    
 	/**
 	 * Save all dirty editors in the workbench.
 	 * Returns whether the operation succeeded.
@@ -832,6 +865,31 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
 	public void launchRemoved(ILaunch launch) {}
 
 	/**
+     * Return the ILaunch associated with a model element, or null if there is
+     * no such association.
+     * 
+     * @param element the model element
+     * @return the ILaunch associated with the element, or null.
+     * @since 3.6
+     */
+    public static ILaunch getLaunch(Object element) {
+    	// support for custom models
+        ILaunch launch= (ILaunch)DebugPlugin.getAdapter(element, ILaunch.class);
+        if (launch == null) {
+        	// support for standard debug model
+            if (element instanceof IDebugElement) {
+                launch= ((IDebugElement)element).getLaunch();
+            } else if (element instanceof ILaunch) {
+                launch= ((ILaunch)element);
+            } else if (element instanceof IProcess) {
+                launch= ((IProcess)element).getLaunch();
+            }
+        }
+        return launch;
+    }
+    
+
+    /**
 	 * Save dirty editors before launching, according to preferences.
 	 * 
 	 * @return whether to proceed with launch
@@ -1005,7 +1063,8 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener {
 	public static void launchInBackground(final ILaunchConfiguration configuration, final String mode) {
 		final IJobManager jobManager = Job.getJobManager();
 		IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
-		boolean wait = (jobManager.find(ResourcesPlugin.FAMILY_AUTO_BUILD).length > 0) || (jobManager.find(ResourcesPlugin.FAMILY_MANUAL_BUILD).length > 0);
+		boolean wait = (jobManager.find(ResourcesPlugin.FAMILY_AUTO_BUILD).length > 0 && ResourcesPlugin.getWorkspace().isAutoBuilding())
+				|| (jobManager.find(ResourcesPlugin.FAMILY_MANUAL_BUILD).length > 0);
 		String waitPref = store.getString(IInternalDebugUIConstants.PREF_WAIT_FOR_BUILD);
 		if (wait) { // if there are build jobs running, do we wait or not??
 			if (waitPref.equals(MessageDialogWithToggle.PROMPT)) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
index 494d1e8..b575f83 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  Copyright (c) 2004, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui;
 
@@ -94,6 +95,9 @@ public class DebugUIPreferenceInitializer extends AbstractPreferenceInitializer
 		//Registers View
 		prefs.setDefault(IDebugPreferenceConstants.REGISTERS_DETAIL_PANE_ORIENTATION, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH);
 		
+		// Breakpoints view default settings
+		prefs.setDefault(IDebugPreferenceConstants.BREAKPOINTS_DETAIL_PANE_ORIENTATION, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH);
+		
 		// Variable/Expression view default settings
 		prefs.setDefault(IDebugUIConstants.ID_VARIABLE_VIEW + '+' + "org.eclipse.debug.ui.ShowDetailPaneAction", true); //$NON-NLS-1$
 		prefs.setDefault(IDebugUIConstants.ID_EXPRESSION_VIEW + '+' + "org.eclipse.debug.ui.ShowDetailPaneAction", true); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
index 083e584..b3ebe63 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DefaultLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,10 @@
 package org.eclipse.debug.internal.ui;
 
 
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -44,6 +48,7 @@ import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtensio
 import org.eclipse.debug.internal.ui.views.variables.IndexedVariablePartition;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ILabelProviderListener;
 import org.eclipse.swt.graphics.Image;
@@ -52,6 +57,11 @@ import org.eclipse.ui.model.IWorkbenchAdapter;
 import com.ibm.icu.text.MessageFormat;
 
 public class DefaultLabelProvider implements ILabelProvider {
+	
+	/**
+	 * Maps image descriptors to images.
+	 */
+	private Map fImages = new HashMap();
 
 	/**
 	 * @see ILabelProvider#getImage(Object)
@@ -66,18 +76,37 @@ public class DefaultLabelProvider implements ILabelProvider {
 			if (de != null) {
 				ImageDescriptor descriptor= de.getImageDescriptor(element);
 				if( descriptor != null) {
-					return descriptor.createImage();
+					return getImage(descriptor);					
 				}
 			}
 			return null;
 		}
 		if(element instanceof LaunchShortcutExtension) {
-			return ((LaunchShortcutExtension)element).getImageDescriptor().createImage();
+			return getImage(((LaunchShortcutExtension)element).getImageDescriptor());
 		}
 		return DebugPluginImages.getImage(key);
 	}
 	
 	/**
+	 * Returns an image created from the given image descriptor or <code>null</code>.
+	 * Caches and reuses images.
+	 * 
+	 * @param descriptor image descriptor
+	 * @return image or <code>null</code>
+	 */
+	private Image getImage(ImageDescriptor descriptor) {
+		Image image = (Image) fImages.get(descriptor);
+		if (image != null) {
+			return image;
+		}
+		image = descriptor.createImage();
+		if (image != null) {
+			fImages.put(descriptor, image);
+		}
+		return image;						
+	}
+	
+	/**
 	 * Returns the key (<code>String</code>) of the default image
 	 * appropriate for the given element or <code>null</code>
 	 * if no default image is defined.
@@ -453,6 +482,12 @@ public class DefaultLabelProvider implements ILabelProvider {
 	 * @see IBaseLabelProvider#dispose()
 	 */
 	public void dispose() {
+		Iterator iterator = fImages.values().iterator();
+		while (iterator.hasNext()) {
+			Image image = (Image) iterator.next();
+			image.dispose();
+		}
+		fImages.clear();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
index 6121777..7f00647 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,7 @@ public interface IInternalDebugUIConstants {
     public static final String IMG_DLCL_DETAIL_PANE_UNDER= "IMG_DLCL_DETAIL_PANE_UNDER"; //$NON-NLS-1$
     public static final String IMG_DLCL_DETAIL_PANE_RIGHT= "IMG_DLCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
     public static final String IMG_DLCL_DETAIL_PANE_HIDE= "IMG_DLCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
+    public static final String IMG_DLCL_DETAIL_PANE_AUTO= "IMG_DLCL_DETAIL_PANE_AUTO"; //$NON-NLS-1$
     public static final String IMG_DLCL_COLLAPSE_ALL = "IMG_DLCL_COLLAPSE_ALL"; //$NON-NLS-1$
     public static final String IMG_DLCL_TERMINATE = "IMG_DLCL_TERMINATE"; //$NON-NLS-1$
     public static final String IMG_DLCL_REMOVE_ALL = "IMG_DLCL_REMOVE_ALL"; //$NON-NLS-1$
@@ -74,6 +75,7 @@ public interface IInternalDebugUIConstants {
     public static final String IMG_DLCL_TOGGLE_STEP_FILTERS = "IMG_DLCL_TOGGLE_STEP_FILTERS"; //$NON-NLS-1$
     public static final String IMG_DLCL_NEXT_THREAD = "IMG_DLCL_NEXT_THREAD"; //$NON-NLS-1$
     public static final String IMG_DLCL_PREVIOUS_THREAD = "IMG_DLCL_PREVIOUS_THREAD"; //$NON-NLS-1$
+    public static final String IMG_DLCL_RESTART = "IMG_DLCL_RESTART"; //$NON-NLS-1$
     
     //TODO: Move this IDebugUIConstants. Created too late in 3.2 cycle to add API.
     //The enabled icon is already API.
@@ -88,6 +90,7 @@ public interface IInternalDebugUIConstants {
     public static final String IMG_ELCL_DETAIL_PANE_UNDER= "IMG_ELCL_DETAIL_PANE_UNDER"; //$NON-NLS-1$
     public static final String IMG_ELCL_DETAIL_PANE_RIGHT= "IMG_ELCL_DETAIL_PANE_RIGHT"; //$NON-NLS-1$
     public static final String IMG_ELCL_DETAIL_PANE_HIDE= "IMG_ELCL_DETAIL_PANE_HIDE"; //$NON-NLS-1$
+    public static final String IMG_ELCL_DETAIL_PANE_AUTO= "IMG_ELCL_DETAIL_PANE_AUTO"; //$NON-NLS-1$
     public static final String IMG_ELCL_COLLAPSE_ALL = "IMG_ELCL_COLLAPSE_ALL"; //$NON-NLS-1$
     public static final String IMG_ELCL_TERMINATE = "IMG_ELCL_TERMINATE"; //$NON-NLS-1$
     public static final String IMG_SRC_LOOKUP_MENU_ELCL = "IMG_SRC_LOOKUP_MENU_ENABLED"; //$NON-NLS-1$
@@ -118,6 +121,7 @@ public interface IInternalDebugUIConstants {
     public static final String IMG_ELCL_STANDARD_ERR = "IMG_ELCL_STANDARD_ERR"; //$NON-NLS-1$
     public static final String IMG_ELCL_NEXT_THREAD = "IMG_ELCL_NEXT_THREAD"; //$NON-NLS-1$
     public static final String IMG_ELCL_PREVIOUS_THREAD = "IMG_ELCL_PREVIOUS_THREAD"; //$NON-NLS-1$
+    public static final String IMG_ELCL_RESTART = "IMG_ELCL_RESTART"; //$NON-NLS-1$
     
     public static final String IMG_OBJS_COMMON_TAB = "IMG_OBJS_COMMON_TAB"; //$NON-NLS-1$
     public static final String IMG_OBJS_REFRESH_TAB = "IMG_OBJS_REFRESH_TAB"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
index 35be296..83e3403 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/ImageDescriptorRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,15 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Bug 292411
  *******************************************************************************/
 package org.eclipse.debug.internal.ui;
 
  
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -24,7 +27,7 @@ import org.eclipse.swt.widgets.Display;
  */
 public class ImageDescriptorRegistry {
 
-	private HashMap fRegistry= new HashMap(10);
+	private Map fRegistry= Collections.synchronizedMap(new HashMap(10));
 	private Display fDisplay;
 	
 	/**
@@ -81,10 +84,15 @@ public class ImageDescriptorRegistry {
 	}
 	
 	private void hookDisplay() {
-		fDisplay.disposeExec(new Runnable() {
+		fDisplay.asyncExec(new Runnable() {
 			public void run() {
-				dispose();
-			}	
+				fDisplay.disposeExec(new Runnable() {
+
+					public void run() {
+						dispose();
+					}
+				});
+			}
 		});
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
index 7d33eb1..0ef0b2f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/LazyModelPresentation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -194,8 +194,11 @@ public class LazyModelPresentation implements IDebugModelPresentation, IDebugEdi
                     StringBuffer buf = new StringBuffer();
                     IValue value = ((IExpression)element).getValue();
                     if (value != null) {
-                        buf.append(value.getReferenceTypeName());
-                        buf.append(' ');
+                        String type = value.getReferenceTypeName();
+                        if (type != null && type.length() > 0) {
+                        	buf.append(type);
+                        	buf.append(' ');
+                        }
                     }
                     buf.append(getDefaultText(element));
                     return buf.toString(); 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
index f33cd44..c6b56f2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.jface.layout.PixelConverter;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.ViewForm;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
@@ -29,6 +30,7 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 /**
  * Factory class to create some SWT resources. 
@@ -39,7 +41,7 @@ public class SWTFactory {
 	 * Returns a width hint for a button control.
 	 */
 	public static int getButtonWidthHint(Button button) {
-		button.setFont(JFaceResources.getDialogFont());
+		/*button.setFont(JFaceResources.getDialogFont());*/
 		PixelConverter converter= new PixelConverter(button);
 		int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
 		return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
@@ -109,7 +111,7 @@ public class SWTFactory {
 		}
 		GridData gd = new GridData();
 		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
+		setButtonDimensionHint(button);
 		return button;	
 	}	
 
@@ -136,11 +138,29 @@ public class SWTFactory {
 		}
 		GridData gd = new GridData(fill);
 		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
+		setButtonDimensionHint(button);
 		return button;	
 	}	
 	
 	/**
+	 * Creates and returns a new push button with the given
+	 * label, tooltip and/or image.
+	 * 
+	 * @param parent parent control
+	 * @param label button label or <code>null</code>
+	 * @param tooltip the tooltip text for the button or <code>null</code>
+	 * @param image image of <code>null</code>
+	 * 
+	 * @return a new push button
+	 * @since 3.6
+	 */
+	public static Button createPushButton(Composite parent, String label, String tooltip, Image image) {
+		Button button = createPushButton(parent, label, image);
+		button.setToolTipText(tooltip);
+		return button;
+	}
+	
+	/**
 	 * Creates and returns a new radio button with the given
 	 * label.
 	 * 
@@ -157,11 +177,35 @@ public class SWTFactory {
 		}
 		GridData gd = new GridData();
 		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
+		setButtonDimensionHint(button);
 		return button;	
 	}	
 	
 	/**
+	 * Creates and returns a new radio button with the given
+	 * label.
+	 * 
+	 * @param parent parent control
+	 * @param label button label or <code>null</code>
+	 * @param hspan the number of columns to span in the parent composite
+	 * 
+	 * @return a new radio button
+	 * @since 3.6
+	 */
+	public static Button createRadioButton(Composite parent, String label, int hspan) {
+		Button button = new Button(parent, SWT.RADIO);
+		button.setFont(parent.getFont());
+		if (label != null) {
+			button.setText(label);
+		}
+		GridData gd = new GridData(GridData.BEGINNING);
+		gd.horizontalSpan = hspan;
+		button.setLayoutData(gd);	
+		setButtonDimensionHint(button);
+		return button;	
+	}
+	
+	/**
 	 * Creates a new label widget
 	 * @param parent the parent composite to add this label widget to
 	 * @param text the text for the label
@@ -339,6 +383,25 @@ public class SWTFactory {
     }
 	
 	/**
+	 * Creates a new text widget 
+	 * @param parent the parent composite to add this text widget to
+	 * @param style the style bits for the text widget
+	 * @param hspan the horizontal span to take up on the parent composite
+	 * @param text the initial text, not <code>null</code>
+	 * @return the new text widget
+	 * @since 3.6
+	 */
+	public static Text createText(Composite parent, int style, int hspan, String text) {
+    	Text t = new Text(parent, style);
+    	t.setFont(parent.getFont());
+    	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+    	gd.horizontalSpan = hspan;
+    	t.setLayoutData(gd);
+    	t.setText(text);
+    	return t;
+    }
+	
+	/**
 	 * Creates a Group widget
 	 * @param parent the parent composite to add this group to
 	 * @param text the text for the heading of the group
@@ -381,6 +444,27 @@ public class SWTFactory {
     }
 	
 	/**
+	 * Creates an ExpandibleComposite widget
+	 * @param parent the parent to add this widget to
+	 * @param style the style for ExpandibleComposite expanding handle, and layout
+	 * @param label the label for the widget
+	 * @param hspan how many columns to span in the parent
+	 * @param fill the fill style for the widget
+	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
+	 * @return a new ExpandibleComposite widget
+	 * @since 3.6
+	 */
+	public static ExpandableComposite createExpandibleComposite(Composite parent, int style, String label, int hspan, int fill) {
+		ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, style);
+		ex.setText(label);
+		ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
+		GridData gd = new GridData(fill);
+		gd.horizontalSpan = hspan;
+		ex.setLayoutData(gd);
+		return ex;
+	}
+	
+	/**
 	 * Creates a composite that uses the parent's font and has a grid layout
 	 * @param parent the parent to add the composite to
 	 * @param columns the number of columns the composite should have
@@ -459,6 +543,56 @@ public class SWTFactory {
 	}
 	
 	/**
+	 * Creates a {@link ViewForm}
+	 * @param parent
+	 * @param style
+	 * @param cols
+	 * @param span
+	 * @param fill
+	 * @param marginwidth
+	 * @param marginheight
+	 * @return a new {@link ViewForm}
+	 * @since 3.6
+	 */
+	public static ViewForm createViewform(Composite parent, int style, int cols, int span, int fill, int marginwidth, int marginheight) {
+		ViewForm form = new ViewForm(parent, style);
+		form.setFont(parent.getFont());
+		GridLayout layout = new GridLayout(cols, false);
+        layout.marginWidth = marginwidth;
+		layout.marginHeight = marginheight;
+        form.setLayout(layout);
+		GridData gd = new GridData(fill);
+		gd.horizontalSpan = span;
+		form.setLayoutData(gd);
+		return form;
+	}
+	
+	/**
+	 * Creates a Composite widget
+	 * @param parent the parent composite to add this composite to
+	 * @param font the font to set on the control
+	 * @param columns the number of columns within the composite
+	 * @param hspan the horizontal span the composite should take up on the parent
+	 * @param fill the style for how this composite should fill into its parent
+	 * @param marginwidth the width of the margin to place on the sides of the composite (default is 5, specified by GridLayout)
+	 * @param marginheight the height of the margin to place o the top and bottom of the composite
+	 * @return the new composite
+	 * @since 3.6
+	 */
+	public static Composite createComposite(Composite parent, Font font, int style, int columns, int hspan, int fill, int marginwidth, int marginheight) {
+		Composite g = new Composite(parent, style);
+		GridLayout layout = new GridLayout(columns, false);
+		layout.marginWidth = marginwidth;
+		layout.marginHeight = marginheight;
+    	g.setLayout(layout);
+    	g.setFont(font);
+    	GridData gd = new GridData(fill);
+		gd.horizontalSpan = hspan;
+    	g.setLayoutData(gd);
+    	return g;
+	}
+	
+	/**
 	 * This method is used to make a combo box
 	 * @param parent the parent composite to add the new combo to
 	 * @param style the style for the Combo
@@ -517,4 +651,20 @@ public class SWTFactory {
 	public static void showPreferencePage(String id) {
 		PreferencesUtil.createPreferenceDialogOn(DebugUIPlugin.getShell(), id, new String[] {id}, null).open();
 	}
+	
+	/**
+	 * This method allows users to open a specific preference page and supply a custom
+	 * set of page filter items.
+	 * 
+	 * This alternative to <code>showPreferencePage(String)</code> allows other related 
+	 * pref pages to be shown at the same time at the developers/context discretion.
+	 * All pages can be shown if <code>null</code> is passed.  
+	 * 
+	 * @param page_id the id for the page to open
+	 * @param page_filters the listing of pages to be shown in the dialog
+	 * @since 3.6
+	 */
+	public static void showPreferencePage(String page_id, String[] page_filters) {
+		PreferencesUtil.createPreferenceDialogOn(DebugUIPlugin.getShell(), page_id, page_filters, null).open();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
index 84d2e9e..a9ff6c2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -146,7 +146,7 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate
 	 */
 	protected void update(IAction action, ISelection s) {
 		if (s instanceof IStructuredSelection) {
-			IStructuredSelection ss = (IStructuredSelection)s;
+			IStructuredSelection ss = getTargetSelection((IStructuredSelection)s);
 			action.setEnabled(getEnableStateForSelection(ss));
 			setSelection(ss);
 		} else {
@@ -156,6 +156,21 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate
 	}
 	
 	/**
+	 * Returns a selection this operation should act on based on the given selection.
+	 * Provides an opportunity for actions to translate the selection/targets of the
+	 * operation.
+	 * <p>
+	 * By default, the original selection is returned. Subclasses may override.
+	 * </p>
+	 * @param s selection
+	 * @return selection to operate on
+	 * @since 3.6
+	 */
+	protected IStructuredSelection getTargetSelection(IStructuredSelection s) {
+		return s;
+	}
+	
+	/**
 	 * Performs the specific action on this element.
 	 */
 	protected abstract void doAction(Object element) throws DebugException;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
index b06bc1d..f191582 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *  IBM - Initial API and implementation
+ *  Mike Morearty - Bug 271411
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions;
 
@@ -128,14 +129,14 @@ public class ActionMessages extends NLS {
     public static String TerminateAndRemoveAction_0;
     public static String TerminateAndRemoveAction_3;
     
-    public static String ToggleDetailPaneAction_1;
+    public static String ToggleDetailPaneAction_0;
+
+	public static String ToggleDetailPaneAction_1;
     public static String ToggleDetailPaneAction_2;
-    public static String ToggleDetailPaneAction_3;
+	public static String ToggleDetailPaneAction_3;
     public static String ToggleDetailPaneAction_4;
     public static String ToggleDetailPaneAction_5;
-    public static String ToggleDetailPaneAction_6;
     public static String ToggleDetailPaneAction_8;
-    public static String ToggleDetailPaneAction_9;
     public static String ToggleBreakpointAction_0;
     public static String ToggleBreakpointAction_1;
     public static String ToggleBreakpointAction_2;
@@ -147,6 +148,8 @@ public class ActionMessages extends NLS {
     public static String WatchExpressionDialog_2;
     public static String WatchExpressionDialog_3;
     public static String WatchExpressionDialog_4;
+
+	public static String WatchExpressionDialog_5;
 	public static String WatchExpressionDialogMenu_0;
 	public static String WatchExpressionDialogMenu_1;
 	public static String WatchExpressionDialogMenu_2;
@@ -197,7 +200,11 @@ public class ActionMessages extends NLS {
 
 	public static String LaunchAction_2;
 
-	public static String ResumeAction_0;
+	public static String RestartCommandAction__text;
+
+    public static String RestartCommandAction_tooltip;
+
+    public static String ResumeAction_0;
     public static String ResumeAction_3;
     public static String StepIntoAction_0;
     public static String StepIntoAction_3;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
index ee50758..ab6c5ba 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ActionMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 # 
 #  Contributors:
 #     IBM Corporation - initial API and implementation
+#     Mike Morearty - Bug 271411
 ###############################################################################
 
 AddToFavoritesAction_1=Add to {0} &Favorites
@@ -93,14 +94,13 @@ AbstractLaunchHistoryAction_5={0}
 AbstractLaunchHistoryAction_6=(no launch history)
 AbstractDebugActionDelegate_0=Error
 
-ToggleDetailPaneAction_1=Vertical View Orientation
+ToggleDetailPaneAction_0=&Automatic
+ToggleDetailPaneAction_1=&Vertical
 ToggleDetailPaneAction_2=Place the Detail Pane Underneath the Main Tree View
-ToggleDetailPaneAction_3=Place the Detail Pane Underneath the Main Tree View
-ToggleDetailPaneAction_4=Horizontal View Orientation
+ToggleDetailPaneAction_3=Automatically position the detail pane
+ToggleDetailPaneAction_4=&Horizontal
 ToggleDetailPaneAction_5=Place the Detail Pane on the Right of the Main Tree View
-ToggleDetailPaneAction_6=Place the Detail Pane on the Right of the Main Tree View
 ToggleDetailPaneAction_8=Hide the Detail Pane so that only the Main Tree View is Visible
-ToggleDetailPaneAction_9=Hide the Detail Pane so that only the Main Tree View is Visible
 ToggleBreakpointAction_0=Toggle Brea&kpoint
 ToggleBreakpointAction_1=Error
 ToggleBreakpointAction_2=Unable to toggle breakpoint
@@ -113,6 +113,7 @@ WatchExpressionDialog_1=Add Watch Expression
 WatchExpressionDialog_2=E&xpression:
 WatchExpressionDialog_3=&Enable
 WatchExpressionDialog_4=Expression must not be empty
+WatchExpressionDialog_5=Tip: {0} can be used to close this dialog.
 WatchExpressionDialogMenu_0=Cut
 WatchExpressionDialogMenu_1=Copy
 WatchExpressionDialogMenu_2=Paste
@@ -174,6 +175,8 @@ StepOverAction_3=Step Over
 LaunchAction_0=Remove Configuration
 LaunchAction_1=Are you sure you want to remove {0} from the launch history?
 LaunchAction_2=&Do not ask me again.
+RestartCommandAction__text=Rest&art
+RestartCommandAction_tooltip=Restart
 ResumeAction_0=Resu&me
 ResumeAction_3=Resume
 DisconnectAction_0=Disconn&ect
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
index d461458..ca18fc0 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RelaunchActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,17 @@
 package org.eclipse.debug.internal.ui.actions;
 
 
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
 import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
 
 public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
 	
@@ -24,23 +29,11 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
 	 * @see AbstractDebugActionDelegate#doAction(Object)
 	 */
 	protected void doAction(Object object) {
-		ILaunch launch= getLaunch(object);
+		ILaunch launch= DebugUIPlugin.getLaunch(object);
         if (launch != null) {
             relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
         }
 	}
-    
-    public static ILaunch getLaunch(Object element) {
-        ILaunch launch= null;
-        if (element instanceof IDebugElement) {
-            launch= ((IDebugElement)element).getLaunch();
-        } else if (element instanceof ILaunch) {
-            launch= ((ILaunch)element);
-        } else if (element instanceof IProcess) {
-            launch= ((IProcess)element).getLaunch();
-        }
-        return launch;
-    }
 	
 	/**
 	 * Re-launches the given configuration in the specified mode.
@@ -53,17 +46,29 @@ public class RelaunchActionDelegate extends AbstractDebugActionDelegate {
 	 * @see AbstractDebugActionDelegate#isEnabledFor(Object)
 	 */
 	protected boolean isEnabledFor(Object element) {
-		ILaunch launch= null;
-		if (element instanceof ILaunch) {
-			launch= (ILaunch)element;
-		} else if (element instanceof IDebugElement) {
-			launch= ((IDebugElement)element).getLaunch();
-		} else if (element instanceof IProcess) {
-			launch= ((IProcess)element).getLaunch();
-		}
-		
+		ILaunch launch= DebugUIPlugin.getLaunch(element);
 		return launch != null && launch.getLaunchConfiguration() != null && LaunchConfigurationManager.isVisible(launch.getLaunchConfiguration());
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#getTargetSelection(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	protected IStructuredSelection getTargetSelection(IStructuredSelection s) {
+		if (s.isEmpty()) {
+			return s;
+		}
+		Set dups = new LinkedHashSet();
+		Iterator iterator = s.iterator();
+		while (iterator.hasNext()) {
+			Object object = iterator.next();
+			ILaunch launch = DebugUIPlugin.getLaunch(object);
+			if (launch == null) {
+				return s;
+			}
+			dups.add(launch);
+		}
+		return new StructuredSelection(dups.toArray());
+	}
 			
 	/**
 	 * @see AbstractDebugActionDelegate#getErrorDialogMessage()
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
index 1788483..8bd624f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/ToggleBreakpointsTargetManager.java
@@ -50,6 +50,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.services.IEvaluationService;
 
 /**
  * Organizes the toggle breakpoints target factories contributed through the 
@@ -155,7 +157,12 @@ public class ToggleBreakpointsTargetManager {
          */
         private boolean evalEnablementExpression(IWorkbenchPart part, ISelection selection, Expression exp) {
             if (exp != null){
-                IEvaluationContext context = new EvaluationContext(null, part);
+        		IEvaluationContext parentContext = null;
+        		IEvaluationService evaluationService = (IEvaluationService)PlatformUI.getWorkbench().getService(IEvaluationService.class);
+        		if (evaluationService != null) {
+        			parentContext = evaluationService.getCurrentState();
+        		}
+                IEvaluationContext context = new EvaluationContext(parentContext, part);
                 
                 List debugContextList = getDebugContext(part).toList();
                 context.addVariable(IConfigurationElementConstants.DEBUG_CONTEXT, debugContextList); 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
index a9e8955..e3b3b99 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,10 +35,6 @@ public class BreakpointGroupMessages extends NLS {
 	public static String GroupBreakpointsByDialog_5;
 	public static String GroupBreakpointsByDialog_6;
 	public static String GroupBreakpointsByDialog_7;
-	public static String CopyBreakpointsAction_0;
-	public static String CopyBreakpointsAction_1;
-	public static String CopyBreakpointsAction_2;
-	public static String CopyBreakpointsAction_3;
 	public static String PasteBreakpointsAction_0;
 	public static String PasteBreakpointsAction_1;
 	public static String RemoveFromWorkingSetAction_0;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
index 4fa9d6c..5663925 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/BreakpointGroupMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
+# Copyright (c) 2004, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,10 +19,6 @@ GroupBreakpointsByDialog_4=<-- &Remove
 GroupBreakpointsByDialog_5=Move &Up
 GroupBreakpointsByDialog_6=Move &Down
 GroupBreakpointsByDialog_7=Group Breakpoints
-CopyBreakpointsAction_0=&Copy
-CopyBreakpointsAction_1=Copy Breakpoints
-CopyBreakpointsAction_2=Problem Copying to Clipboard
-CopyBreakpointsAction_3=There was a problem when accessing the system clipboard. Retry?
 PasteBreakpointsAction_0=&Paste
 PasteBreakpointsAction_1=Paste Breakpoints
 RemoveFromWorkingSetAction_0=Remove from &Working Set
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
deleted file mode 100644
index 3ee9a64..0000000
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsAction.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpointGroups;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
-
-/**
- * Action for copying the currently selected breakpoints to the clipboard.
- */
-public class CopyBreakpointsAction extends BreakpointSelectionAction {
-
-    /**
-     * System clipboard
-     */
-    private Clipboard clipboard;
-
-    /**
-     * Associated paste action. May be <code>null</code>
-     */
-    private PasteBreakpointsAction pasteAction;
-    
-    /**
-     * Creates a new action.
-     *
-     * @param shell the shell for any dialogs
-     * @param clipboard a platform clipboard
-     */
-    public CopyBreakpointsAction(BreakpointsView view, Clipboard clipboard) {
-        super(BreakpointGroupMessages.CopyBreakpointsAction_0, view); 
-        Assert.isNotNull(clipboard);
-        this.clipboard = clipboard;
-        setToolTipText(BreakpointGroupMessages.CopyBreakpointsAction_1);
-        PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.COPY_BREAKPOINTS_ACTION);
-    }
-
-    /**
-     * Creates a new action.
-     *
-     * @param shell the shell for any dialogs
-     * @param clipboard a platform clipboard
-     * @param pasteAction a paste action
-     */
-    public CopyBreakpointsAction(BreakpointsView view, Clipboard clipboard, PasteBreakpointsAction pasteAction) {
-        this(view, clipboard);
-        this.pasteAction = pasteAction;
-    }
-
-    /**
-     * The <code>CopyAction</code> implementation of this method defined 
-     * on <code>IAction</code> copies the selected resources to the 
-     * clipboard.
-     */
-    public void run() {
-        IStructuredSelection selection = getStructuredSelection();
-        Object[] objects = selection.toArray();
-        StringBuffer buffer = new StringBuffer();
-        ILabelProvider labelProvider = (ILabelProvider) ((StructuredViewer)getBreakpointsView().getViewer()).getLabelProvider();
-        for (int i = 0; i < objects.length; i++) {
-            Object object = objects[i];
-            if (i > 0) {
-                buffer.append("\n"); //$NON-NLS-1$
-            }
-            buffer.append(labelProvider.getText(object));
-        }
-        setClipboard(selection, buffer.toString());
-
-        // update the enablement of the paste action
-        // workaround since the clipboard does not suppot callbacks
-        if (pasteAction != null && pasteAction.getStructuredSelection() != null)
-            pasteAction.selectionChanged(pasteAction.getStructuredSelection());
-    }
-
-    /**
-     * Set the clipboard contents. Prompt to retry if clipboard is busy.
-     * 
-     * @param selection the selection to copy to the clipboard
-     */
-    private void setClipboard(ISelection selection, String text) {
-        try {
-            LocalSelectionTransfer.getInstance().setSelection(selection);
-            LocalSelectionTransfer.getInstance().setSelectionSetTime(System.currentTimeMillis());
-            clipboard.setContents(new Object[] {selection, text}, new Transfer[] {LocalSelectionTransfer.getInstance(), TextTransfer.getInstance()});
-        } catch (SWTError e) {
-            if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD)
-                throw e;
-            if (MessageDialog.openQuestion(
-                    getBreakpointsView().getSite().getShell(), BreakpointGroupMessages.CopyBreakpointsAction_2, 
-                    BreakpointGroupMessages.CopyBreakpointsAction_3)) { 
-                setClipboard(selection, text);
-            }
-        }
-    }
-
-    /**
-     * Enables if one or more breakpoints are selected.
-     */
-    protected boolean updateSelection(IStructuredSelection selection) {
-        if (selection.isEmpty()) {
-            return false;
-        }
-        Iterator iterator = selection.iterator();
-        while (iterator.hasNext()) {
-            if (!(iterator.next() instanceof IBreakpoint)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-}
-
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java
new file mode 100644
index 0000000..879939d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/CopyBreakpointsActionDelegate.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.actions.breakpointGroups;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointsListener;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.viewers.model.VirtualCopyToClipboardActionDelegate;
+import org.eclipse.debug.ui.AbstractDebugView;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.actions.ActionFactory;
+
+/**
+ * Copies breakpoint labels to the text clipboard and breakpoint objects
+ * to the breakpoint paste action.
+ */
+public class CopyBreakpointsActionDelegate extends VirtualCopyToClipboardActionDelegate implements IBreakpointsListener {
+	
+	private long fStamp;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.VirtualCopyToClipboardActionDelegate#run(org.eclipse.jface.action.IAction)
+	 */
+	public void run(IAction action) {
+		super.run(action);
+		LocalSelectionTransfer.getTransfer().setSelection(getSelection());
+		fStamp = System.currentTimeMillis();
+		LocalSelectionTransfer.getTransfer().setSelectionSetTime(fStamp);
+		IAction pasteAction = ((AbstractDebugView)getView()).getAction(ActionFactory.PASTE.getCommandId());
+        // update the enablement of the paste action
+        // workaround since the clipboard does not suppot callbacks
+        if (pasteAction instanceof PasteBreakpointsAction) {
+        	PasteBreakpointsAction pba = (PasteBreakpointsAction) pasteAction;
+        	if (pba.getStructuredSelection() != null) {
+        		pba.selectionChanged(pba.getStructuredSelection());
+        	}
+        }
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#init(org.eclipse.ui.IViewPart)
+	 */
+	public void init(IViewPart view) {
+		super.init(view);
+		DebugPlugin.getDefault().getBreakpointManager().addBreakpointListener(this);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#dispose()
+	 */
+	public void dispose() {
+		DebugPlugin.getDefault().getBreakpointManager().removeBreakpointListener(this);
+		super.dispose();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
+	 */
+	public void breakpointsAdded(IBreakpoint[] breakpoints) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
+	 */
+	public void breakpointsRemoved(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+		// remove deleted breakpoints from drag/drop clipboard
+		if (fStamp == LocalSelectionTransfer.getTransfer().getSelectionSetTime()) {
+			ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+			if (selection instanceof IStructuredSelection) {
+				Set removed = new HashSet();
+				for (int i = 0; i < breakpoints.length; i++) {
+					removed.add(breakpoints[i]);
+				}
+				boolean modified = false;
+				List remain = new ArrayList();
+				IStructuredSelection ss = (IStructuredSelection) selection;
+				Iterator iterator = ss.iterator();
+				while (iterator.hasNext()) {
+					Object bp = iterator.next();
+					if (removed.contains(bp)) {
+						modified = true;
+					} else {
+						remain.add(bp);
+					}
+				}
+				if (modified) {
+					LocalSelectionTransfer.getTransfer().setSelection(new StructuredSelection(remain));
+					fStamp = System.currentTimeMillis();
+					LocalSelectionTransfer.getTransfer().setSelectionSetTime(fStamp);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
+	 */
+	public void breakpointsChanged(IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
index d8225fc..6bcce27 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/EditBreakpointGroupAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,13 @@
  * 
  * Contributors:
  *     IBM Corporation - initial implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
@@ -45,19 +46,22 @@ public class EditBreakpointGroupAction extends AbstractBreakpointsViewAction {
 	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
 	 */
 	public void selectionChanged(IAction action, ISelection sel) {
-		IStructuredSelection selection= (IStructuredSelection) sel;
-        fSet = null;
-        if (selection.size() == 1) {
-            Object element = selection.getFirstElement();
-			if (element instanceof BreakpointContainer) {
-                BreakpointContainer container = (BreakpointContainer)element;
-                IAdaptable category = container.getCategory();
-                if (category instanceof WorkingSetCategory) {
-                    IWorkingSet set = ((WorkingSetCategory)category).getWorkingSet();
-                    action.setEnabled(true);
-                    fSet = set;
-                    return;
-                }
+		fSet = null;		
+		if (sel instanceof IStructuredSelection) {
+			IStructuredSelection selection= (IStructuredSelection) sel;
+	        
+	        if (selection.size() == 1) {
+	            Object element = selection.getFirstElement();
+				if (element instanceof IBreakpointContainer) {
+	                IBreakpointContainer container = (IBreakpointContainer)element;
+	                IAdaptable category = container.getCategory();
+	                if (category instanceof WorkingSetCategory) {
+	                    IWorkingSet set = ((WorkingSetCategory)category).getWorkingSet();
+	                    action.setEnabled(true);
+	                    fSet = set;
+	                    return;
+	                }
+				}
 			}
 		}
 		action.setEnabled(false);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
index c53ab9a..40bd2a9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,8 @@
 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
index 4ebf6be..6f5a29e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 
@@ -16,8 +17,8 @@ import java.util.List;
 
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointOrganizerManager;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IAction;
@@ -76,13 +77,14 @@ public class GroupBreakpointsByAction extends AbstractBreakpointsViewAction impl
 		});		
 		return menu;
     }
-    
-	/**
+
+ 	/**
 	 * Fill pull down menu with the "group by" options
 	 */
 	private void fillMenu(Menu menu) {
 		// determine which item should be checked
-		IBreakpointOrganizer[] organizers = fView.getBreakpointOrganizers();
+		IBreakpointOrganizer[] organizers = fView.getBreakpointOrganizers();					
+		
 		boolean none = false;
 		boolean advanced = false;
 		IBreakpointOrganizer organizer = null;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
index a261c78..49c776d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,9 +17,9 @@ import java.util.List;
 
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointOrganizerManager;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
index db5fca6..aca918e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/PasteBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,12 @@ package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 import java.util.List;
 
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.OtherBreakpointCategory;
+import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
 
 /**
  * Standard action for pasting resources on the clipboard to the selected resource's location.
@@ -51,7 +51,7 @@ public class PasteBreakpointsAction extends BreakpointSelectionAction {
         List selectedNonResources = getSelectedNonResources();
         if (selectedNonResources.size() == 1) {
             Object target = selectedNonResources.get(0);
-            if (target instanceof BreakpointContainer) {
+            if (target instanceof IBreakpointContainer) {
                 return target;
             }
         }
@@ -62,8 +62,8 @@ public class PasteBreakpointsAction extends BreakpointSelectionAction {
      * Implementation of method defined on <code>IAction</code>.
      */
     public void run() {
-		if (getBreakpointsView().canPaste(getTarget(), LocalSelectionTransfer.getInstance().getSelection())) {
-			getBreakpointsView().performPaste(getTarget(), LocalSelectionTransfer.getInstance().getSelection());
+		if (getBreakpointsView().canPaste(getTarget(), LocalSelectionTransfer.getTransfer().getSelection())) {
+			getBreakpointsView().performPaste(getTarget(), LocalSelectionTransfer.getTransfer().getSelection());
 		}
     }
 
@@ -74,8 +74,8 @@ public class PasteBreakpointsAction extends BreakpointSelectionAction {
     protected boolean updateSelection(IStructuredSelection selection) {
         // can't paste into "Others" (only move)
         Object target = getTarget();
-        if (target instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) target;
+        if (target instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) target;
             if (container.getCategory() instanceof OtherBreakpointCategory) {
                 return false;
             }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
index 9835ba0..f0110ee 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/RemoveFromWorkingSetAction.java
@@ -1,29 +1,38 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
+ *     IBM Corporation - initial API and implementation     
+ *     Freescale Semiconductor - bug 287863
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
-import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Item;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
 
 /**
  * Removes a breakpoint from a breakpoint working set.
  */
 public class RemoveFromWorkingSetAction extends BreakpointSelectionAction {
 	
-    /**
+    private BreakpointSetElement[] fBreakpoints;
+
+
+	/**
      * Constructs action to remove breakpoints from a category.
      * 
      * @param view
@@ -36,29 +45,68 @@ public class RemoveFromWorkingSetAction extends BreakpointSelectionAction {
      * @see org.eclipse.jface.action.IAction#run()
      */
     public void run() {
-        BreakpointsViewer viewer = (BreakpointsViewer) getBreakpointsView().getViewer();
-        Item[] items = viewer.getSelectedItems();
-        IBreakpoint breakpoint = null;
-        BreakpointContainer container = null;
-        for(int i = 0; i < items.length; i++) {
-        	if(items[i].getData() instanceof IBreakpoint) {
-        		breakpoint = (IBreakpoint) items[i].getData();
-        		container = viewer.getRemovableContainer(items[i]);
-        		if(container != null) {
-        			container.getOrganizer().removeBreakpoint(breakpoint, container.getCategory());
-        		}
-        	}
-        }
+    	if (fBreakpoints != null) {
+    		for (int i = 0; i < fBreakpoints.length; i++) {
+    			fBreakpoints[i].container.getOrganizer().removeBreakpoint(fBreakpoints[i].breakpoint, fBreakpoints[i].container.getCategory());
+    		}
+    	}
+    }
+    
+    protected static class BreakpointSetElement {
+    	BreakpointSetElement(IBreakpoint b, IBreakpointContainer c) { breakpoint = b; container = c; }    	
+    	IBreakpoint breakpoint;
+    	IBreakpointContainer container;
+    }
+    
+    /**
+     * Returns a array of breakpoint/container pairs for the selection
+     * 
+     *  All the returned elements contain a breakpoint and a working set container the breakpoint is contained and the breakpoint
+     *  can be removed from.
+     * 
+     * @param selection
+     * @return
+     */
+    protected BreakpointSetElement[] getRemovableBreakpoints(IStructuredSelection selection) {
+    	List res = new ArrayList();
+    	if (selection instanceof ITreeSelection) {
+    		ITreeSelection tSel = (ITreeSelection)selection;
+
+    		TreePath[] paths = tSel.getPaths();
+    		for (int i = 0; i < paths.length; i++) {
+    			TreePath path = paths[i]; 
+    			
+    			// We can remove Breakpoints from their working set if any of their parents is a non "Other" breakpoint working set
+                IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(path.getLastSegment(), IBreakpoint.class);            
+    			if (breakpoint != null) {
+    				TreePath parents = path.getParentPath();
+    				
+    				for (int j = 0; j < parents.getSegmentCount(); j++) {
+    					Object parent = parents.getSegment(j);
+    					
+    					if (parent instanceof IBreakpointContainer) {
+    						IBreakpointContainer container = (IBreakpointContainer)parent;
+    						
+    						// Test if this is a working set container.
+    						if (container.getCategory() instanceof WorkingSetCategory) {
+    							// Test if this container allows to remove this breakpoint.
+    							if (container.getOrganizer().canRemove(breakpoint, container.getCategory())) {
+    								res.add(new BreakpointSetElement(breakpoint, container));
+    							}
+    						}
+    					}
+    				}
+    			}
+    		}
+    	}
+    	return (BreakpointSetElement[])res.toArray(new BreakpointSetElement[res.size()]);
     }
     
     /* (non-Javadoc)
      * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
      */
     protected boolean updateSelection(IStructuredSelection selection) {
-        Object element = selection.getFirstElement();
-        if(element instanceof BreakpointContainer) {
-        	return ((BreakpointContainer) element).getCategory().equals(IDebugUIConstants.BREAKPOINT_WORKINGSET_ID);
-        }
-        return false;
+    	fBreakpoints = getRemovableBreakpoints(selection);
+    	return fBreakpoints.length > 0;
     }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
index 7b777f2..f236c2e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/ToggleDefaultGroupAction.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpointGroups;
 
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointSetOrganizer;
 import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
 import org.eclipse.debug.ui.IDebugUIConstants;
@@ -47,8 +47,8 @@ public class ToggleDefaultGroupAction extends AbstractBreakpointsViewAction {
             IStructuredSelection selection = (IStructuredSelection) sel;
             if (selection.size() == 1) {
 	            Object firstElement = selection.getFirstElement();
-	            if (firstElement instanceof BreakpointContainer) {
-	                BreakpointContainer container = (BreakpointContainer) firstElement;
+	            if (firstElement instanceof IBreakpointContainer) {
+	                IBreakpointContainer container = (IBreakpointContainer) firstElement;
 	                if (container.getCategory() instanceof WorkingSetCategory) {
 	                    WorkingSetCategory category = (WorkingSetCategory)container.getCategory();
 	                    if (IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(category.getWorkingSet().getId())) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
index 03e9c96..895e9d6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsCollapseAllAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,13 +7,15 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
+import org.eclipse.debug.ui.AbstractDebugView;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.ui.IActionDelegate2;
 import org.eclipse.ui.IViewActionDelegate;
@@ -26,7 +28,7 @@ import org.eclipse.ui.handlers.IHandlerService;
  */
 public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActionDelegate2 {
 	
-	private BreakpointsView fView;
+	private AbstractDebugView fView;
 	
 	private IAction fAction;
 
@@ -34,7 +36,7 @@ public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActio
 	 * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
 	 */
 	public void init(IViewPart view) {
-		fView= (BreakpointsView) view;
+		fView = (AbstractDebugView) view;
 		IHandlerService hs = (IHandlerService) view.getSite().getService(IHandlerService.class);
 		if (hs != null) {
 			hs.activateHandler(CollapseAllHandler.COMMAND_ID, new ActionHandler(fAction));
@@ -45,7 +47,7 @@ public class BreakpointsCollapseAllAction implements IViewActionDelegate, IActio
 	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
 	 */
 	public void run(IAction action) {
-		fView.getCheckboxViewer().collapseAll();
+		((TreeViewer) fView.getViewer()).collapseAll();
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
index e3c91aa..85620b3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/BreakpointsExpandAllAction.java
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
@@ -19,7 +20,7 @@ import org.eclipse.ui.IViewPart;
 /**
  * Action which fully expands the tree in the breakpoints view.
  */
-public class BreakpointsExpandAllAction implements IViewActionDelegate {
+public class BreakpointsExpandAllAction implements IViewActionDelegate {	
 	
 	private BreakpointsView fView;
 
@@ -27,14 +28,14 @@ public class BreakpointsExpandAllAction implements IViewActionDelegate {
 	 * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
 	 */
 	public void init(IViewPart view) {
-		fView= (BreakpointsView) view;
+		fView = (BreakpointsView) view;
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
 	 */
 	public void run(IAction action) {
-		fView.getCheckboxViewer().expandAll();
+	    fView.expandAllElementsInViewer();
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
index 35cd2a1..86033d6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/EnableBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ import org.eclipse.debug.core.IBreakpointsListener;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -91,10 +91,11 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen
 					Object element= itr.next();
 					try {
 						IBreakpoint[] breakpoints= null;
-						if (element instanceof IBreakpoint) {
-							breakpoints= new IBreakpoint[] { (IBreakpoint) element };
-						} else if (element instanceof BreakpointContainer) {
-							breakpoints= ((BreakpointContainer) element).getBreakpoints();
+						IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(element, IBreakpoint.class); 
+						if (breakpoint != null) {
+							breakpoints= new IBreakpoint[] { breakpoint };
+						} else if (element instanceof IBreakpointContainer) {
+							breakpoints= ((IBreakpointContainer) element).getBreakpoints();
 						}
 						if (breakpoints != null) {
 							setEnabled(breakpoints);
@@ -147,8 +148,21 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen
 		boolean allDisabled= true;
 		while (itr.hasNext()) {
 			Object selected= itr.next();
-			if (selected instanceof BreakpointContainer) {
-				IBreakpoint[] breakpoints = ((BreakpointContainer) selected).getBreakpoints();
+            IBreakpoint bp = (IBreakpoint)DebugPlugin.getAdapter(selected, IBreakpoint.class);
+			
+            if (bp != null) {
+                try {
+                    if (bp.isEnabled()) {
+                        allDisabled= false;
+                    } else {
+                        allEnabled= false;
+                    }
+                } catch (CoreException ce) {
+                    handleException(ce);
+                }
+            } 
+            else if (selected instanceof IBreakpointContainer) {
+				IBreakpoint[] breakpoints = ((IBreakpointContainer) selected).getBreakpoints();
 				for (int i = 0; i < breakpoints.length; i++) {
 					try {
 						if (breakpoints[i].isEnabled()) {
@@ -160,17 +174,6 @@ public class EnableBreakpointsAction implements IViewActionDelegate, IPartListen
 						handleException(ce);
 					}
 				}
-			} else if (selected instanceof IBreakpoint) {
-				IBreakpoint bp= (IBreakpoint)selected;
-				try {
-					if (bp.isEnabled()) {
-						allDisabled= false;
-					} else {
-						allEnabled= false;
-					}
-				} catch (CoreException ce) {
-					handleException(ce);
-				}
 			} else {
 				return;
 			}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
index b292f4c..50cccc6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/OpenBreakpointMarkerAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
@@ -85,9 +86,8 @@ public class OpenBreakpointMarkerAction extends SelectionProviderAction {
 	 */
 	public void selectionChanged(IStructuredSelection sel) {
 		if (sel.size() == 1) {
-			Object element = sel.getFirstElement();
-			if (element instanceof IBreakpoint) {
-				breakpoint= (IBreakpoint) element;
+            breakpoint = (IBreakpoint)DebugPlugin.getAdapter(sel.getFirstElement(), IBreakpoint.class);
+			if (breakpoint != null) {
 				input= fgPresentation.getEditorInput(breakpoint);
 				if (input != null) {
 					setEnabled(true);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
index b8ece86..1a4aedc 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/RemoveBreakpointAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
@@ -26,8 +27,8 @@ import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.actions.AbstractRemoveActionDelegate;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
 import org.eclipse.debug.internal.ui.views.breakpoints.WorkingSetCategory;
 import org.eclipse.jface.action.IAction;
@@ -36,6 +37,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkingSet;
 import org.eclipse.ui.PlatformUI;
@@ -61,11 +63,12 @@ public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
 				boolean prompted = false;
 				while (itr.hasNext()) {		
 					Object next= itr.next();
-					if (next instanceof IBreakpoint) {
-						breakpointsToDelete.add(next);
-					} else if (next instanceof BreakpointContainer) {
+					IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(next, IBreakpoint.class);
+					if (breakpoint != null) {
+						breakpointsToDelete.add(breakpoint);
+					} else if (next instanceof IBreakpointContainer) {
 						//the the container is a workingset, ask if they want to delete it as well
-						BreakpointContainer bpc = (BreakpointContainer) next;
+						IBreakpointContainer bpc = (IBreakpointContainer) next;
 						if(bpc.getCategory() instanceof WorkingSetCategory) {
 							IWorkingSet set = ((WorkingSetCategory)bpc.getCategory()).getWorkingSet();
 							if(!prompted) {
@@ -77,10 +80,11 @@ public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
 										MessageDialog.QUESTION,
 										new String[] {ActionMessages.RemoveBreakpointAction_5, ActionMessages.RemoveBreakpointAction_6},
 										0);
-								if(dialog.open() == 0) {
-									deleteAll = dialog.deleteAllBreakpoints();
-									deleteContainer = dialog.deleteWorkingset();
+								if (dialog.open() == Window.CANCEL) {
+									return;
 								}
+								deleteAll = dialog.deleteAllBreakpoints();
+								deleteContainer = dialog.deleteWorkingset();
 							}
 							if(deleteContainer) {
 								groupsToDelete.add(set);
@@ -154,12 +158,12 @@ public class RemoveBreakpointAction extends AbstractRemoveActionDelegate {
 	 * @see org.eclipse.debug.internal.ui.actions.AbstractSelectionActionDelegate#isEnabledFor(java.lang.Object)
 	 */
 	protected boolean isEnabledFor(Object element) {
-		if (element instanceof BreakpointContainer) {
-			if(((BreakpointContainer)element).getCategory() instanceof WorkingSetCategory) {
+		if (element instanceof IBreakpointContainer) {
+			if(((IBreakpointContainer)element).getCategory() instanceof WorkingSetCategory) {
 				return true;
 			}
-			return ((BreakpointContainer)element).getChildren().length > 0;
+			return ((IBreakpointContainer)element).getBreakpoints().length > 0;
 		}
-		return super.isEnabledFor(element);
+		return DebugPlugin.getAdapter(element, IBreakpoint.class) != null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
index 5f1e29f..f68b4fe 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SelectAllBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
@@ -15,10 +16,11 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointsListener;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.actions.SelectAllAction;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
+import org.eclipse.debug.ui.AbstractDebugView;
 import org.eclipse.debug.ui.IDebugView;
 import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Tree;
 
 public class SelectAllBreakpointsAction extends SelectAllAction implements IBreakpointsListener {
 
@@ -29,12 +31,9 @@ public class SelectAllBreakpointsAction extends SelectAllAction implements IBrea
 		return DebugPlugin.getDefault().getBreakpointManager().hasBreakpoints();
 	}
 
-	public void run(IAction action) {
-		if (!(getView() instanceof BreakpointsView)) {
-			return;
-		}
-		CheckboxTreeViewer viewer = ((BreakpointsView) getView()).getCheckboxViewer();
-		viewer.getTree().selectAll();
+	public void run(IAction action) {	
+		Viewer viewer = ((AbstractDebugView) getView()).getViewer();
+		((Tree) viewer.getControl()).selectAll();
 		// ensure that the selection change callback is fired
 		viewer.setSelection(viewer.getSelection());
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
index 280986f..66a1d13 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowSupportedBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,9 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
+ *     										This class should be obsoleted for the new async breakpoints view.
+ *     										@see ShowTargetBreakpointsAction
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.breakpoints;
 
@@ -25,8 +28,8 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.internal.ui.actions.ToggleFilterAction;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.ui.AbstractDebugView;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -46,13 +49,12 @@ import org.eclipse.ui.PlatformUI;
  * @see org.eclipse.debug.core.model.IDebugTarget#supportsBreakpoint(IBreakpoint)
  * 
  */
-public class ShowSupportedBreakpointsAction extends ToggleFilterAction implements ISelectionListener {
-
+public class ShowSupportedBreakpointsAction extends ToggleFilterAction implements ISelectionListener {	
 	/**
 	 * The view associated with this action
 	 */
-	private BreakpointsView fView;
-	
+	private AbstractDebugView fView;
+		
 	/**
 	 * The list of identifiers for the current state
 	 */
@@ -68,9 +70,9 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement
 		 * @see ViewerFilter#select(Viewer, Object, Object)
 		 */
 		public boolean select(Viewer viewer, Object parentElement, Object element) {
-			if (element instanceof BreakpointContainer) {
+			if (element instanceof IBreakpointContainer) {
 				// Breakpoint containers are visible if any of their children are visible.
-				IBreakpoint[] breakpoints = ((BreakpointContainer) element).getBreakpoints();
+				IBreakpoint[] breakpoints = ((IBreakpointContainer) element).getBreakpoints();
 				for (int i = 0; i < breakpoints.length; i++) {
 					if (select(viewer, element, breakpoints[i])) {
 						return true;
@@ -180,8 +182,8 @@ public class ShowSupportedBreakpointsAction extends ToggleFilterAction implement
 		return fView;
 	}
 
-	protected void setView(IViewPart view) {
-		fView = (BreakpointsView) view;
+	protected void setView(IViewPart view) {	
+		fView = (AbstractDebugView) view;
 	}
 	
 	protected List getDebugTargets(IStructuredSelection ss) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java
new file mode 100644
index 0000000..b6821f1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java
@@ -0,0 +1,63 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.actions.breakpoints;
+
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.action.Action;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This class implements the show target breakpoint action.
+ * 
+ * @since 3.6
+ */
+public class ShowTargetBreakpointsAction extends Action {
+	/**
+	 * Breakpoints view
+	 */
+	BreakpointsView fView;
+	
+	/**
+	 * Constructor.
+	 * 
+	 * @param view the breakpoints view
+	 */
+	public ShowTargetBreakpointsAction(BreakpointsView view) {
+		super();
+		
+		fView = view;
+		
+		setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); 
+		setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); 
+		
+		setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET));
+		setChecked(false);
+		setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$
+		
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	public void run() {
+		if (fView.getViewer().getControl().isDisposed()) {
+			return;
+		}
+		fView.setFilterSelection(isChecked());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
index fe246ae..96cb539 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/SkipAllBreakpointsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,12 +18,16 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointManager;
 import org.eclipse.debug.core.IBreakpointManagerListener;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWindowActionDelegate;
@@ -38,7 +42,9 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
  * This class also implements the window action delegate for the action presented as
  * part of the "Breakpoints" group for the "Run" menu.
  */
-public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindowActionDelegate, IBreakpointManagerListener {
+public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindowActionDelegate, IActionDelegate2, IBreakpointManagerListener {
+	
+	public static final String ACTION_ID = "org.eclipse.debug.ui.actions.SkipAllBreakpoints"; //$NON-NLS-1$
 	
 	//The real action if this is an action delegate
 	private IAction fAction;
@@ -49,12 +55,11 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow
 	private IWorkbenchPart fPart = null;
 	
 	public SkipAllBreakpointsAction() {
-		super(ActionMessages.SkipAllBreakpointsAction_0); 
+		super(ActionMessages.SkipAllBreakpointsAction_0, AS_CHECK_BOX); 
 		setToolTipText(ActionMessages.SkipAllBreakpointsAction_0); 
 		setDescription(ActionMessages.SkipAllBreakpointsAction_2); 
 		setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_SKIP_BREAKPOINTS));
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SKIP_ALL_BREAKPOINT_ACTION);
-		updateActionCheckedState();
 	}
 	
 	/**
@@ -65,6 +70,8 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow
 	public SkipAllBreakpointsAction(IWorkbenchPart part) {
 		this();
 		fPart = part;
+		setId(ACTION_ID); // set action ID when created programmatically.
+		updateActionCheckedState();
 	}
 	
 	/* (non-Javadoc)
@@ -76,11 +83,12 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow
 			 progressService =  (IWorkbenchSiteProgressService)fPart.getSite().
 			 	getAdapter(IWorkbenchSiteProgressService.class);
 		}
+		final boolean enabled = !getBreakpointManager().isEnabled();
 		Job job = new Job(getText()) {
 			protected IStatus run(IProgressMonitor monitor) {
 				if (!monitor.isCanceled()) {
 					IBreakpointManager bm = getBreakpointManager();
-					bm.setEnabled(!bm.isEnabled());
+					bm.setEnabled(enabled);
 				}
 				return Status.OK_STATUS;
 			}
@@ -132,7 +140,12 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow
 	 * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
 	 */
 	public void run(IAction action) {
+		setChecked(action.isChecked());
 		run();	
+		// when run from the workbench window action, need to keep view action state in synch (in case view has been closed)
+		String prefKey = IDebugUIConstants.ID_BREAKPOINT_VIEW + '+' + action.getId();
+		IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore();
+		prefStore.setValue(prefKey, action.isChecked());
 	}
 	
 	/* (non-Javadoc)
@@ -150,4 +163,19 @@ public class SkipAllBreakpointsAction extends Action implements IWorkbenchWindow
 			fAction.setChecked(!enabled);
 		}
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+	 */
+	public void init(IAction action) {
+		fAction = action;
+		updateActionCheckedState();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+	 */
+	public void runWithEvent(IAction action, Event event) {
+		run(action);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
index e60c65e..e336289 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ToggleBreakpointObjectActionDelegate.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Wind River Systems - added support for IToggleBreakpointsTargetFactory
  *******************************************************************************/
@@ -62,8 +62,8 @@ public abstract class ToggleBreakpointObjectActionDelegate implements IObjectAct
 	 *  
 	 * @param target adapter to toggle breakpoints
 	 * @param part the active part
-	 * @param selection the seleciton in the active part
-	 * @exception CoreException if an exception occurrs
+	 * @param selection the selection in the active part
+	 * @exception CoreException if an exception occurs
 	 */
 	protected abstract void performAction(IToggleBreakpointsTarget target, IWorkbenchPart part, ISelection selection) throws CoreException;
 	
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
index bf994e5..61171c6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/WatchExpressionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mike Morearty - Bug 271411
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.expressions;
 
@@ -18,6 +19,11 @@ import org.eclipse.debug.internal.ui.actions.StatusInfo;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.bindings.keys.IKeyLookup;
+import org.eclipse.jface.bindings.keys.KeyLookupFactory;
+import org.eclipse.jface.bindings.keys.KeySequence;
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.bindings.keys.SWTKeySupport;
 import org.eclipse.jface.dialogs.StatusDialog;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.text.Document;
@@ -41,6 +47,8 @@ import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.console.actions.TextViewerAction;
 
+import com.ibm.icu.text.MessageFormat;
+
 /**
  * Dialog for edit watch expression.
  */
@@ -54,6 +62,7 @@ public class WatchExpressionDialog extends StatusDialog {
 	// widgets
 	private SourceViewer fSnippetViewer;
 	private Button fCheckBox;
+	private Label fTip;
 
 	public WatchExpressionDialog(Shell parent, IWatchExpression watchExpression, boolean editDialog) {
 		super(parent);
@@ -150,12 +159,32 @@ public class WatchExpressionDialog extends StatusDialog {
 		fCheckBox.setSelection(fWatchExpression.isEnabled());
 		fCheckBox.setFont(font);
 
+		String tipText = MessageFormat.format(ActionMessages.WatchExpressionDialog_5,
+				new String[] { getCtrlReturnText() });
+		fTip= new Label(container, SWT.LEFT);
+		fTip.setText(tipText);
+		fTip.setFont(font);
+
 		applyDialogFont(container);
 		fSnippetViewer.getControl().setFocus();
 		return container;
 	}
 
 	/**
+	 * Returns a string representation of the "Ctrl+Return" key sequence.
+	 * 
+	 * @return a string representation of the "Ctrl+Return" key sequence.
+	 */
+	private String getCtrlReturnText() {
+		IKeyLookup keyLookup = KeyLookupFactory.getDefault();
+		int ctrlKey = keyLookup.getCtrl();
+		int returnKey = keyLookup.formalKeyLookup(IKeyLookup.RETURN_NAME);
+		KeyStroke ctrlReturnKeyStroke = KeyStroke.getInstance(ctrlKey, returnKey);
+		KeySequence ctrltReturnKeySequence = KeySequence.getInstance(ctrlReturnKeyStroke);
+		return SWTKeySupport.getKeyFormatterForPlatform().format(ctrltReturnKeySequence);
+	}
+
+	/**
 	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 	 */
 	protected void okPressed() {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
index c1a5fab..41841f3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ChangeVariableValueAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind River Systems - Hide action for non standard debug models (298217)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.actions.variables;
 
@@ -44,6 +45,7 @@ public class ChangeVariableValueAction extends SelectionProviderAction {
 	protected IVariable fVariable;
     private VariablesView fView;
     private boolean fEditing= false;
+    private boolean isApplicable = false;
 	
     /**
      * Creates a new ChangeVariableValueAction for the given variables view
@@ -62,6 +64,15 @@ public class ChangeVariableValueAction extends SelectionProviderAction {
 	}
 	
 	/**
+	 * Indicates whether this action is applicable for the current selection.
+	 * If the element selected in the viewer is not a standard debug model 
+	 * element this action is not applicable. 
+	 */
+	public boolean isApplicable() {
+	    return isApplicable;
+	}
+	
+	/**
 	 * Edit the variable value with an in-line text editor.  
 	 */
 	protected void doActionPerformed(final IVariable variable) {
@@ -144,10 +155,12 @@ public class ChangeVariableValueAction extends SelectionProviderAction {
 	 * on the selection
 	 */
 	protected void update(IStructuredSelection sel) {
+	    isApplicable = false;
 		Iterator iter= sel.iterator();
 		if (iter.hasNext()) {
 			Object object= iter.next();
 			if (object instanceof IValueModification) {
+			    isApplicable = true;
 				IValueModification varMod= (IValueModification)object;
 				if (!varMod.supportsValueModification()) {
 					setEnabled(false);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
index ccbf5d0..572827a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/ToggleDetailPaneAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@ public class ToggleDetailPaneAction extends Action {
 		if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH) {
 			setText(ActionMessages.ToggleDetailPaneAction_1);  
 			setToolTipText(ActionMessages.ToggleDetailPaneAction_2);  
-			setDescription(ActionMessages.ToggleDetailPaneAction_3);  
+			setDescription(ActionMessages.ToggleDetailPaneAction_2);  
 			setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_UNDER));
 			setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_UNDER));
 			setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_UNDER));
@@ -51,15 +51,23 @@ public class ToggleDetailPaneAction extends Action {
 		} else if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_RIGHT) {
 			setText(ActionMessages.ToggleDetailPaneAction_4);  
 			setToolTipText(ActionMessages.ToggleDetailPaneAction_5);  
-			setDescription(ActionMessages.ToggleDetailPaneAction_6);  
+			setDescription(ActionMessages.ToggleDetailPaneAction_5);  
 			setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_RIGHT));
 			setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_RIGHT));
 			setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_RIGHT));
 			PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION);
+		} else if (orientation == IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO) {
+			setText(ActionMessages.ToggleDetailPaneAction_0);
+			setToolTipText(ActionMessages.ToggleDetailPaneAction_3);  
+			setDescription(ActionMessages.ToggleDetailPaneAction_3);  
+			setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_AUTO));
+			setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_AUTO));
+			setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_AUTO));
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.HORIZONTAL_DETAIL_PANE_LAYOUT_ACTION);
 		} else {
 			setText(hiddenLabel);
 			setToolTipText(ActionMessages.ToggleDetailPaneAction_8);  
-			setDescription(ActionMessages.ToggleDetailPaneAction_9);  
+			setDescription(ActionMessages.ToggleDetailPaneAction_8);  
 			setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_DETAIL_PANE_HIDE));
 			setDisabledImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_DETAIL_PANE_HIDE));
 			setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_LCL_DETAIL_PANE_HIDE));
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointContainer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointContainer.java
new file mode 100644
index 0000000..f411b73
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointContainer.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.breakpoints.provisional;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.core.model.IBreakpoint;
+
+/**
+ * Interface representing a breakpoint category container elements in 
+ * Breakpoints view. Clients which provide custom content in the 
+ * Breakpoints view may implement this interface to represent container
+ * elements.  This will allow the breakpoints view to properly handle
+ * drag-and-drop and copy-paste operations.  
+ * 
+ * @since 3.6
+ */
+public interface IBreakpointContainer {
+    
+    /**
+     * Returns the breakpoint organizer that this container uses.
+     */
+    public IBreakpointOrganizer getOrganizer();
+
+    /**
+     * Returns the breakpoint category that this container is based on. 
+     * @return
+     */
+    public IAdaptable getCategory();
+    
+    /**
+     * Returns whether this breakpoint container contains the given breakpoint.
+     * 
+     * @param breakpoint Breakpoint to check
+     * @return Returns <code>true</code> if this container contains the
+     * given breakpoint.
+     */
+    public boolean contains(IBreakpoint breakpoint);
+    
+    /**
+     * Returns the array of breakpoints in this container.
+     */
+    public IBreakpoint[] getBreakpoints();
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointOrganizer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointOrganizer.java
new file mode 100644
index 0000000..e5ff607
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointOrganizer.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.breakpoints.provisional;
+
+import org.eclipse.debug.ui.IBreakpointOrganizerDelegate;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * A breakpoint organizer is represents a breakpoint organizer delegate in 
+ * the breakpoint view.  Clients can retrieve the current active breakpoint 
+ * organizers from the breakpoint view's presentation context using the 
+ * {@link IBreakpointUIConstants#PROP_BREAKPOINTS_ORGANIZERS} property.
+ * <p>
+ * This interface is not intended to be implemented. Clients contributing a breakpoint
+ * organizer are intended to implement <code>IBreakpointOrganizerDelegate</code>.  
+ * </p>
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 3.6 (internal interface since 3.1)
+ * 
+ * @see IBreakpointUIConstants#PROP_BREAKPOINTS_ORGANIZERS
+ * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext
+ */
+public interface IBreakpointOrganizer extends IBreakpointOrganizerDelegate {
+    
+    /**
+     * Returns a label for this breakpoint organizer.
+     * 
+     * @return a label for this breakpoint organizer
+     */
+    public String getLabel();
+    
+    /**
+     * Returns an image descriptor for this breakpoint organizer or <code>null</code>.
+     * 
+     * @return an image descriptor for this breakpoint organizer or <code>null</code>
+     */
+    public ImageDescriptor getImageDescriptor();
+    
+    /**
+     * Returns a unique identifier for this breakpoint organizer.
+     * 
+     * @return a unique identifier for this breakpoint organizer
+     */
+    public String getIdentifier();
+    
+    /**
+     * Returns the label for breakpoints that do not fall into a category
+     * for this organizer.
+     * 
+     * @return label for breakpoints that do not fall into a category
+     * for this organizer
+     */
+    public String getOthersLabel();
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java
new file mode 100644
index 0000000..85784cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.breakpoints.provisional;
+
+/**
+ * Constants to use with Breakpoint view.  
+ * 
+ * @since 3.6 
+ */
+public interface IBreakpointUIConstants {
+    /** 
+     * Breakpoints presentation context property used to retrieve the array of 
+     * breakpoint organizers.  The expected property type is 
+     * <code>IBreakpointOrganizer[]</code>.  If property value is <code>null</code>, 
+     * the breakpoint categories should not be shown.
+     * 
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#getProperty(String)
+     */
+    public static final String PROP_BREAKPOINTS_ORGANIZERS      = "BreakpointOrganizers";   //$NON-NLS-1$
+
+    /** 
+     * Breakpoints presentation context property used to retrieve a flag 
+     * indicating whether the list of breakpoints should be filtered based
+     * on the active debug context.  The returned property value should 
+     * be of type <code>java.lang.Boolean</code>.  If property value is 
+     * <code>null</code>, then value should be treated the same as 
+     * <code>Boolean.FALSE</code>.
+     * 
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#getProperty(String)
+     */
+    public static final String PROP_BREAKPOINTS_FILTER_SELECTION = "FilterSelection";       //$NON-NLS-1$
+
+    /** 
+     * Breakpoints presentation context property used to retrieve a flag 
+     * indicating whether breakpoints view selection should be updated  
+     * upon a breakpoint event in debug model.  The returned property value 
+     * should be of type <code>java.lang.Boolean</code>.  If property value is 
+     * <code>null</code>, then value should be treated the same as 
+     * <code>Boolean.FALSE</code>.
+     * 
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#getProperty(String)
+     */
+    public static final String PROP_BREAKPOINTS_TRACK_SELECTION = "TrackSelection";         //$NON-NLS-1$ 
+
+    /** 
+     * Breakpoints presentation context property used to retrieve a
+     * comparator for sorting breakpoints.  The returned property value should 
+     * be of type <code>java.util.Comparator</code>.  If property value is 
+     * <code>null</code>, the breakpoints should not be sorted.
+     * 
+     * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#getProperty(String)
+     */
+    public static final String PROP_BREAKPOINTS_ELEMENT_COMPARATOR = "ElementComparator";   //$NON-NLS-1$
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java
new file mode 100644
index 0000000..6211091
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/OtherBreakpointCategory.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.breakpoints.provisional;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * Category for breakpoints in "other" categories.   Clients which provide 
+ * custom content in the Breakpoints view may instantiate this object to 
+ * represent elements in a breakpoint organizer that do not fall into any known
+ * category.
+ * 
+ * @since 3.6
+ * 
+ * @see IBreakpointContainer
+ * @see org.eclipse.debug.ui.IBreakpointOrganizerDelegate
+ */
+public class OtherBreakpointCategory extends PlatformObject implements IWorkbenchAdapter {
+    
+    private static Map fOthers = new HashMap();
+    private IBreakpointOrganizer fOrganizer;
+    
+    
+    public static IAdaptable[] getCategories(IBreakpointOrganizer organizer) {
+        IAdaptable[] others = (IAdaptable[]) fOthers.get(organizer);
+        if (others == null) {
+            others = new IAdaptable[]{new OtherBreakpointCategory(organizer)};
+            fOthers.put(organizer, others);
+        }
+        return others;
+    }
+    
+    /**
+     * Constructs an 'other' category for the given organizer.
+     * 
+     * @param organizer breakpoint organizer
+     */
+    private OtherBreakpointCategory(IBreakpointOrganizer organizer) {
+        fOrganizer = organizer;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
+     */
+    public Object[] getChildren(Object o) {
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
+     */
+    public ImageDescriptor getImageDescriptor(Object object) {
+        return DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_VIEW_BREAKPOINTS);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+     */
+    public String getLabel(Object o) {
+        return fOrganizer.getOthersLabel();
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
+     */
+    public Object getParent(Object o) {
+        return null;
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof OtherBreakpointCategory) {
+            OtherBreakpointCategory category = (OtherBreakpointCategory) obj;
+            return fOrganizer.equals(category.fOrganizer);
+        }
+        return false;
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        return fOrganizer.hashCode();
+    }    
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
index 0867805..fae69e0 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ActionsUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.commands.actions;
 
-import org.eclipse.jface.action.IAction;
 
 /**
  * Collects votes from handler update requests.
@@ -20,13 +19,13 @@ import org.eclipse.jface.action.IAction;
  */
 public class ActionsUpdater {
 	
-	private IAction[] fActions;
+	private IEnabledTarget[] fActions;
 	private int fNumVoters;
 	private int fNumOfVotes = 0;
 	private boolean fDone = false;
 	private boolean fEnabled = true;
 	
-	public ActionsUpdater(IAction[] actions, int numVoters) {
+	public ActionsUpdater(IEnabledTarget[] actions, int numVoters) {
 		fActions = actions;
 		fNumVoters = numVoters;
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugActionHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugActionHandler.java
new file mode 100644
index 0000000..273f9ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugActionHandler.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler2;
+import org.eclipse.core.commands.IHandlerListener;
+import org.eclipse.debug.internal.ui.views.launch.LaunchView;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * An action handler that delegates to an action in the debug view.
+ */
+public abstract class DebugActionHandler implements IHandler2 {
+	
+	private String fActionId;
+	
+	/**
+	 * Constructs a new handler for the given action identifier.
+	 * 
+	 * @param actionId action identifier
+	 */
+	public DebugActionHandler(String actionId) {
+		fActionId = actionId;
+	}
+		
+	/**
+	 * Returns the delegate handler or <code>null</code> if none.
+	 * 
+	 * @return handler or <code>null</code>
+	 */
+	protected IHandler2 getDelegate() {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window != null) {
+			IViewReference reference = window.getActivePage().findViewReference(IDebugUIConstants.ID_DEBUG_VIEW);
+			if (reference != null) {
+				IViewPart view = reference.getView(false);
+				if (view instanceof LaunchView) {
+					return ((LaunchView)view).getHandler(fActionId);
+				}
+			}
+		}
+		return null;
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			return delegate.execute(event);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#addHandlerListener(org.eclipse.core.commands.IHandlerListener)
+	 */
+	public void addHandlerListener(IHandlerListener handlerListener) {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			delegate.addHandlerListener(handlerListener);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#dispose()
+	 */
+	public void dispose() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#isEnabled()
+	 */
+	public boolean isEnabled() {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			return delegate.isEnabled();
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#isHandled()
+	 */
+	public boolean isHandled() {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			return delegate.isHandled();
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler#removeHandlerListener(org.eclipse.core.commands.IHandlerListener)
+	 */
+	public void removeHandlerListener(IHandlerListener handlerListener) {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			delegate.removeHandlerListener(handlerListener);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.IHandler2#setEnabled(java.lang.Object)
+	 */
+	public void setEnabled(Object evaluationContext) {
+		IHandler2 delegate = getDelegate();
+		if (delegate != null) {
+			delegate.setEnabled(evaluationContext);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java
deleted file mode 100644
index 7d95291..0000000
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.debug.internal.ui.commands.actions;
-
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.contexts.DebugContextEvent;
-import org.eclipse.debug.ui.contexts.IDebugContextListener;
-import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Abstract base class for actions performing debug commands
- *
- * @since 3.3
- */
-public abstract class DebugCommandAction extends Action implements IDebugContextListener {
-
-	/**
-	 * The window this action is working for.
-	 */
-    private IWorkbenchWindow fWindow;
-    
-    /**
-     * The part this action is working for, or <code>null</code> if global to
-     * a window.
-     */
-    private IWorkbenchPart fPart;
-    
-    /**
-     * Command service.
-     */
-    private DebugCommandService fUpdateService;
-    
-    /**
-     * Delegate this action is working for or <code>null</code> if none.
-     */
-    private DebugCommandActionDelegate fDelegate;
-
-    /**
-     * Constructor
-     */
-    public DebugCommandAction() {
-        super();
-        String helpContextId = getHelpContextId();
-        if (helpContextId != null)
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, helpContextId);
-        setEnabled(false);
-    }
-
-	/**
-     * Set the current delegate
-     * @param delegate
-     */
-    public void setDelegate(DebugCommandActionDelegate delegate) {
-        fDelegate = delegate;
-    }
-
-    /**
-     * Executes this action on the given target object
-     * 
-     * @param target the target to perform the action on
-     */
-    protected boolean execute(Object[] targets) {
-    	return fUpdateService.executeCommand(getCommandType(), targets, getCommandParticipant(targets));
-    }
-    
-    /**
-     * Creates and returns the command participant or <code>null</code>.
-     * 
-     * @return command participant to use on command completion
-     */
-    protected ICommandParticipant getCommandParticipant(Object[] targets) {
-    	return null;
-    }
-    
-    /**
-     * Returns the command type this action executes.
-     * 
-     * @return command class.
-     */
-    abstract protected Class getCommandType();  
-
-    /**
-     * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
-     */
-    public void debugContextChanged(DebugContextEvent event) {
-    	fUpdateService.postUpdateCommand(getCommandType(), this);
-	}
-
-    /**
-     * @see org.eclipse.jface.action.Action#setEnabled(boolean)
-     */
-    public void setEnabled(boolean enabled) {
-        super.setEnabled(enabled);
-        if (fDelegate != null) {
-            fDelegate.setEnabled(enabled);
-        }
-    }
-
-    /**
-     * Initializes this action for a specific part.
-     * 
-     * @param part workbench part
-     */
-    public void init(IWorkbenchPart part) {
-        fPart = part;
-        fWindow = part.getSite().getWorkbenchWindow();
-        fUpdateService = DebugCommandService.getService(fWindow);
-        IDebugContextService service = getDebugContextService();
-		String partId = part.getSite().getId();
-		service.addDebugContextListener(this, partId);
-        ISelection activeContext = service.getActiveContext(partId);
-        if (activeContext != null) {
-        	fUpdateService.updateCommand(getCommandType(), this);
-        } else {
-        	setEnabled(getInitialEnablement());
-        }
-    }
-    
-    /**
-     * Initializes the context action
-     * @param window the window
-     */
-    public void init(IWorkbenchWindow window) {
-        fWindow = window;
-        fUpdateService = DebugCommandService.getService(fWindow);
-        IDebugContextService contextService = getDebugContextService();
-		contextService.addDebugContextListener(this);
-        ISelection activeContext = contextService.getActiveContext();
-        if (activeContext != null) {
-        	fUpdateService.updateCommand(getCommandType(), this);
-        } else {
-        	setEnabled(getInitialEnablement());
-        }
-    }
-    
-    /**
-     * Returns whether this action should be enabled when initialized
-     * and there is no active debug context.
-     * 
-     * @return false, by default
-     */
-    protected boolean getInitialEnablement() {
-    	return false;
-    }
-
-    /**
-     * Returns the most recent selection
-     * 
-     * @return structured selection
-     */
-    protected ISelection getContext() {
-		if (fPart != null) {
-			getDebugContextService().getActiveContext(fPart.getSite().getId());
-    	}
-        return getDebugContextService().getActiveContext();
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#run()
-     */
-    public void run() {
-        ISelection selection = getContext();
-        if (selection instanceof IStructuredSelection && isEnabled()) {
-            IStructuredSelection ss = (IStructuredSelection) selection;
-            boolean enabled = execute(ss.toArray());
-            // disable the action according to the command
-            setEnabled(enabled);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
-     */
-    public void runWithEvent(Event event) {
-        run();
-    }
-
-    /**
-     * Clean up when removing
-     */
-    public void dispose() {
-        IDebugContextService service = getDebugContextService();
-        if (fPart != null) {
-        	service.removeDebugContextListener(this, fPart.getSite().getId());
-        } else {
-            service.removeDebugContextListener(this);
-        }
-        fWindow = null;
-        fPart = null;
-    }
-    
-    /**
-     * Returns the context service this action linked to.
-     * @return
-     */
-    protected IDebugContextService getDebugContextService() {
-    	return DebugUITools.getDebugContextManager().getContextService(fWindow);
-    }
-
-    /**
-     * @return The help context id for this action
-     */ 
-    public abstract String getHelpContextId();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getId()
-     */
-    public abstract String getId();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getText()
-     */
-    public abstract String getText();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getToolTipText()
-     */
-    public abstract String getToolTipText();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
-     */
-    public abstract ImageDescriptor getDisabledImageDescriptor();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getHoverImageDescriptor()
-     */
-    public abstract ImageDescriptor getHoverImageDescriptor();
-
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#getImageDescriptor()
-     */
-    public abstract ImageDescriptor getImageDescriptor();
-    
-    /**
-     * Returns the delegate associated with this action or <code>null</code>
-     * if none.
-     * 
-     * @return delegate or <code>null</code>
-     */
-    protected DebugCommandActionDelegate getDelegate() {
-    	return fDelegate;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
index 0d83a79..ce50c13 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 package org.eclipse.debug.internal.ui.commands.actions;
 
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.swt.widgets.Event;
@@ -21,7 +22,7 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate;
 /**
  * Abstract base class for debug action delegates performing debug commands.
  * 
- * @since 3.3
+ * @since 3.3.
  */
 public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
 
@@ -30,27 +31,16 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi
 	 */
 	private DebugCommandAction fDebugAction;
     
-    /**
-     * The underlying action for this delegate
-     */
-    private IAction fWindowAction;
-    
-    /**
-     * Whether this action has been initialized before it has been run
-     * (ensures enablement state is up to date when lazily instantiated)
-     */
-    private boolean fInitialized = false;
-
-	public DebugCommandActionDelegate() {
+	protected void setAction(DebugCommandAction action) {
+	    fDebugAction = action;
 	}
-
+	
 	/*
      * (non-Javadoc)
      * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
 	 */
 	public void dispose() {
         fDebugAction.dispose();
-
 	}
 
     /*
@@ -58,7 +48,7 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi
      * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
      */
     public void init(IAction action) {
-        fWindowAction = action;
+        fDebugAction.setActionProxy(action);
     }
     
     /*
@@ -74,14 +64,6 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi
      * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
      */
 	public void run(IAction action) {
-		synchronized (this) {
-			if (!fInitialized) {
-				try {
-					wait();
-				} catch (InterruptedException e) {
-				}
-			}			
-		}
         fDebugAction.run();
 	}
 
@@ -105,30 +87,4 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi
 	protected DebugCommandAction getAction() {
 		return fDebugAction;
 	}
-    
-    protected void setAction(DebugCommandAction action) {
-        fDebugAction = action;
-        action.setDelegate(this);
-    }
-
-    public void setEnabled(boolean enabled) {
-    	synchronized (this) {
-	    	if (!fInitialized) {
-	    		fInitialized = true;
-	    		notifyAll();
-	    	}
-    	}
-        fWindowAction.setEnabled(enabled);
-    }
-    
-    public void setChecked(boolean checked) {
-    	fWindowAction.setChecked(checked);
-    }
-    
-    protected IAction getWindowAction()
-    {
-    	return fWindowAction;
-    }
-    
-    
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
index b119670..ba69bd2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandService.java
@@ -24,8 +24,6 @@ import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.contexts.DebugContextEvent;
 import org.eclipse.debug.ui.contexts.IDebugContextListener;
 import org.eclipse.debug.ui.contexts.IDebugContextService;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IWindowListener;
@@ -111,7 +109,7 @@ public class DebugCommandService implements IDebugContextListener {
 	 * @param commandType
 	 * @param monitor
 	 */
-	public void postUpdateCommand(Class commandType, Action action) {
+	public void postUpdateCommand(Class commandType, IEnabledTarget action) {
 		synchronized (fCommandUpdates) {
 			Job.getJobManager().cancel(commandType);
 			List actions = (List) fCommandUpdates.get(commandType);
@@ -129,11 +127,11 @@ public class DebugCommandService implements IDebugContextListener {
 	 * @param commandType
 	 * @param requestMonitor
 	 */
-	public void updateCommand(Class commandType, IAction action) {
+	public void updateCommand(Class commandType, IEnabledTarget action) {
 		ISelection context = fContextService.getActiveContext();
 		if (context instanceof IStructuredSelection && !context.isEmpty()) {
 			Object[] elements = ((IStructuredSelection)context).toArray();
-			updateCommand(commandType, elements, new IAction[]{action});
+			updateCommand(commandType, elements, new IEnabledTarget[]{action});
 		} else {
 			action.setEnabled(false);
 		}
@@ -152,7 +150,7 @@ public class DebugCommandService implements IDebugContextListener {
 				Entry entry = (Entry) iterator.next();
 				Class commandType = (Class)entry.getKey();
 				List actions = (List) entry.getValue();
-				updateCommand(commandType, elements, (IAction[]) actions.toArray(new IAction[actions.size()]));
+				updateCommand(commandType, elements, (IEnabledTarget[]) actions.toArray(new IEnabledTarget[actions.size()]));
 			}
 		} else {
 			Iterator iterator = commands.values().iterator();
@@ -160,7 +158,7 @@ public class DebugCommandService implements IDebugContextListener {
 				List actionList = (List) iterator.next();
 				Iterator actions = actionList.iterator();
 				while (actions.hasNext()) {
-					((IAction)actions.next()).setEnabled(false);
+					((IEnabledTarget)actions.next()).setEnabled(false);
 				}
 			}
 		}
@@ -174,7 +172,7 @@ public class DebugCommandService implements IDebugContextListener {
 	 * @param elements elements to update for
 	 * @param monitor status monitor
 	 */
-	private void updateCommand(Class handlerType, Object[] elements, IAction[] actions) {
+	private void updateCommand(Class handlerType, Object[] elements, IEnabledTarget[] actions) {
 		if (elements.length == 1) {
 			// usual case - one element
 			Object element = elements[0];
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
index 3cd5109..0333024 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 /**
  * Disconnect action.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
index 6cccb37..3693b0f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.IDropToFrameHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
index c5daa2f..635396d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ICommandParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import org.eclipse.debug.core.IRequest;
 /**
  * Adds function to a command on completion.
  *
- * @since 3.3
+ * @since 3.3.
  */
 public interface ICommandParticipant {
 	
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java
new file mode 100644
index 0000000..cb66423
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/IEnabledTarget.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+/**
+ * 
+ */
+public interface IEnabledTarget {
+    public void setEnabled(boolean enabled);
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
new file mode 100644
index 0000000..5661ca9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandAction.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.core.commands.IRestartHandler;
+import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+
+/**
+ * Handler for the Restart action
+ * 
+ * @since 3.6
+ */
+public class RestartCommandAction extends DebugCommandAction {
+
+    public RestartCommandAction() {
+        setActionDefinitionId("org.eclipse.debug.ui.commands.Restart"); //$NON-NLS-1$
+    }
+    
+    protected Class getCommandType() {
+        return IRestartHandler.class;
+    }
+
+    public ImageDescriptor getDisabledImageDescriptor() {
+        return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESTART);
+    }
+
+    public String getHelpContextId() {
+        return "org.eclipse.debug.ui.restart_action_context"; //$NON-NLS-1$
+    }
+
+    public ImageDescriptor getHoverImageDescriptor() {
+        return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
+    }
+
+    public String getId() {
+        return "org.eclipse.debug.ui.actions.Restart"; //$NON-NLS-1$
+    }
+
+    public ImageDescriptor getImageDescriptor() {
+        return DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESTART);
+    }
+
+    public String getText() {
+        return ActionMessages.RestartCommandAction__text;
+    }
+
+    public String getToolTipText() {
+        return ActionMessages.RestartCommandAction_tooltip;
+    }
+
+    
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
new file mode 100644
index 0000000..961b7cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandActionDelegate.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+/**
+ * Restart action delegate.
+ * 
+ * @since 3.6
+ */
+public class RestartCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
+
+    private DebugCommandAction fDebugAction = new RestartCommandAction();
+    
+    public void dispose() {
+        fDebugAction.dispose();
+    }
+
+    public void init(IWorkbenchWindow window) {
+        fDebugAction.init(window);
+    }
+
+    public void run(IAction action) {
+        fDebugAction.run();
+    }
+
+    public void selectionChanged(IAction action, ISelection selection) {
+        // do nothing
+    }
+
+    public void init(IAction action) {
+        fDebugAction.setActionProxy(action);
+        
+    }
+
+    public void runWithEvent(IAction action, Event event) {
+        run(action);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java
new file mode 100644
index 0000000..878dcc7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/RestartCommandHandler.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.core.commands.IRestartHandler;
+import org.eclipse.debug.ui.actions.DebugCommandHandler;
+
+/**
+ * Command candler for the restart command (to enable key-binding activation). 
+ * 
+ * @since 3.6
+ */
+public class RestartCommandHandler extends DebugCommandHandler {
+
+    protected Class getCommandType() {
+        return IRestartHandler.class;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
index f14c7f0..f7f28ab 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.IResumeHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
index 77a6cb6..3a770a6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,17 +11,45 @@
 
 package org.eclipse.debug.internal.ui.commands.actions;
 
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IActionDelegate2;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
 /**
  * Resume action delegate.
  * 
  * @since 3.3
  */
-public class ResumeCommandActionDelegate extends DebugCommandActionDelegate {
+public class ResumeCommandActionDelegate implements IWorkbenchWindowActionDelegate, IActionDelegate2 {
 
-    public ResumeCommandActionDelegate() {
-        super();
-        setAction(new ResumeCommandAction());
+    private DebugCommandAction fDebugAction = new ResumeCommandAction();
+    
+    public void dispose() {
+        fDebugAction.dispose();
     }
 
-    
+    public void init(IWorkbenchWindow window) {
+        fDebugAction.init(window);
+    }
+
+    public void run(IAction action) {
+        fDebugAction.run();
+    }
+
+    public void selectionChanged(IAction action, ISelection selection) {
+        // do nothing
+    }
+
+    public void init(IAction action) {
+        fDebugAction.setActionProxy(action);
+        
+    }
+
+    public void runWithEvent(IAction action, Event event) {
+        run(action);
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
index d38a918..f42a2dd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.IStepIntoHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
index ffc4ecf..020e34d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.debug.core.commands.IStepOverHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
index 872f0a8..73aa935 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.IStepReturnHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
index ef3deec..f6a47bf 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.ISuspendHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
index 90362bd..5634bcd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAllAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import org.eclipse.debug.core.commands.ITerminateHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -34,14 +35,6 @@ public class TerminateAllAction extends DebugCommandAction implements ILaunchesL
 		return new StructuredSelection(getLaunchManager().getLaunches());
 	}
 	
-	public void contextActivated(ISelection context, IWorkbenchPart part) {
-		// DO NOTHING
-	}
-
-	public void contextChanged(ISelection context, IWorkbenchPart part) {
-		// DO NOTHING
-	}
-	
 	public void dispose() {
 		getLaunchManager().removeLaunchListener(this);
 		super.dispose();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
index 83a3519..9e3b340 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2008 IBM Corporation and others.
+ *  Copyright (c) 2004, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.internal.ui.actions.RelaunchActionDelegate;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.debug.ui.contexts.DebugContextEvent;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ISelection;
@@ -30,37 +31,23 @@ import org.eclipse.jface.viewers.IStructuredSelection;
  */
 public class TerminateAndRelaunchAction extends DebugCommandAction {
 	
-	class Participant implements ICommandParticipant {
-		
-		private Object[] fTargets;
-
-		public Participant(Object[] targets) {
-			fTargets = targets;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.debug.internal.ui.commands.actions.ICommandParticipant#requestDone(org.eclipse.debug.core.commands.IRequest)
-		 */
-		public void requestDone(IRequest request) {
-			if (request.getStatus() == null || request.getStatus().isOK()) {
-				DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
-		            public void run() {
-		                // Must be run in the UI thread since the launch can require
-		                // prompting to proceed
-		            	for (int i = 0; i < fTargets.length; i++) {
-		            		ILaunch launch = RelaunchActionDelegate.getLaunch(fTargets[i]);
-		            		RelaunchActionDelegate.relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
-						}
-		            }
-		        });	
-			}
-		}
-		
-	}
+    public void postExecute(IRequest request, final Object[] targets) {
+        if (request.getStatus() == null || request.getStatus().isOK()) {
+            DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
+                public void run() {
+                    // Must be run in the UI thread since the launch can require
+                    // prompting to proceed
+                    for (int i = 0; i < targets.length; i++) {
+                        ILaunch launch = DebugUIPlugin.getLaunch(targets[i]);
+                        if (launch != null) {
+                            RelaunchActionDelegate.relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode());
+                        }
+                    }
+                }
+            }); 
+        }
+    }
 
-	protected ICommandParticipant getCommandParticipant(Object[] targets) {
-		return new Participant(targets);
-	}
 
 	protected Class getCommandType() {
 		return ITerminateHandler.class;
@@ -81,7 +68,7 @@ public class TerminateAndRelaunchAction extends DebugCommandAction {
 	}
 
     protected boolean canRelaunch(Object element) {
-    	ILaunch launch = RelaunchActionDelegate.getLaunch(element);
+    	ILaunch launch = DebugUIPlugin.getLaunch(element);
     	if (launch != null) {
     		ILaunchConfiguration configuration = launch.getLaunchConfiguration();
     		if (configuration != null) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchHandler.java
new file mode 100644
index 0000000..533d8b1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchHandler.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.commands.actions;
+
+import org.eclipse.debug.internal.ui.views.launch.LaunchView;
+
+
+/**
+ * Default handler for terminate and re-launch. See bug 300810.
+ */
+public class TerminateAndRelaunchHandler extends DebugActionHandler {
+
+	public TerminateAndRelaunchHandler() {
+		super(LaunchView.TERMINATE_AND_RELAUNCH);
+	}
+	
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
index c722848..2c85d09 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRemoveAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,12 +15,21 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.IRequest;
 import org.eclipse.debug.core.commands.ITerminateHandler;
-import org.eclipse.debug.core.model.IDebugElement;
-import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.core.commands.Request;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
 
 /**
  * Terminate and remove action.
@@ -28,38 +37,17 @@ import org.eclipse.jface.resource.ImageDescriptor;
  * @since 3.3
  */
 public class TerminateAndRemoveAction extends DebugCommandAction {
-
-    
-    class TerminateAndRemoveParticipant implements ICommandParticipant {
-        private Object[] fElements;
-        
-        TerminateAndRemoveParticipant(Object[] elements) {
-            fElements = elements;
-        }
-        
-		/* (non-Javadoc)
-		 * @see org.eclipse.debug.internal.ui.commands.actions.ICommandParticipant#requestDone(org.eclipse.debug.core.commands.IRequest)
-		 */
-		public void requestDone(IRequest request) {
-			IStatus status = request.getStatus();
-			if(status == null || status.isOK()) {
-				for (int i = 0; i < fElements.length; i++) {
-					Object element = fElements[i];
-	                ILaunch launch= null;
-	                if (element instanceof ILaunch) {
-	                    launch= (ILaunch) element;
-	                } else if (element instanceof IDebugElement) {
-	                    launch= ((IDebugElement) element).getLaunch();
-	                } else if (element instanceof IProcess) {
-	                    launch= ((IProcess) element).getLaunch();
-	                }   
-	                if (launch != null)
-	                    DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);					
-				}
-            }
-		}
-        
-    }
+	
+	/**
+	 * Whether the target can be terminated. The action is always enabled,
+	 * but does not always need to terminate the target first.
+	 */
+	private boolean fCanTerminate = false;
+	
+	/**
+	 * Local copy of part, possibly null
+	 */
+	private IWorkbenchPart fMyPart = null;
 
     public String getText() {
         return ActionMessages.TerminateAndRemoveAction_0;
@@ -93,9 +81,61 @@ public class TerminateAndRemoveAction extends DebugCommandAction {
 		return ITerminateHandler.class;
 	}
 
-	protected ICommandParticipant getCommandParticipant(Object[] targets) {
-		return new TerminateAndRemoveParticipant(targets);
-	}
-
+    protected void postExecute(IRequest request, Object[] targets) {
+        IStatus status = request.getStatus();
+        if(status == null || status.isOK()) {
+            for (int i = 0; i < targets.length; i++) {
+                ILaunch launch = DebugUIPlugin.getLaunch(targets[i]);
+                if (launch != null)
+                    DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);                   
+            }
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.ui.actions.DebugCommandAction#setEnabled(boolean)
+     */
+    public void setEnabled(boolean enabled) {
+    	synchronized (this) {
+    		fCanTerminate = enabled;
+		}
+    	// action is always enabled... just depends whether terminate is required first.
+    	super.setEnabled(true);
+    }
     
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.ui.actions.DebugCommandAction#runWithEvent(org.eclipse.swt.widgets.Event)
+     */
+    public void runWithEvent(Event event) {
+    	if (fCanTerminate) {
+			IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+	    	if (window != null) {
+		    	if (!MessageDialog.openQuestion(window.getShell(), DebugUIViewsMessages.LaunchView_Terminate_and_Remove_1, DebugUIViewsMessages.LaunchView_Terminate_and_remove_selected__2)) {  
+					return;
+				}
+	    	}
+	    	super.runWithEvent(event);
+    	} else {
+    		// don't terminate, just remove
+    		// TODO: make #getContext() API in next release
+    		ISelection sel = null;
+    		if (fMyPart != null) {
+    			sel = getDebugContextService().getActiveContext(fMyPart.getSite().getId());
+    	    } else {
+    	    	sel = getDebugContextService().getActiveContext();
+    	    }
+    		if (sel instanceof IStructuredSelection) {
+                IStructuredSelection ss = (IStructuredSelection) sel;
+                postExecute(new Request(), ss.toArray());
+            }
+    	}
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.ui.actions.DebugCommandAction#init(org.eclipse.ui.IWorkbenchPart)
+     */
+    public void init(IWorkbenchPart part) {
+    	super.init(part); // TODO: if #getContext() was API, this would not be needed
+    	fMyPart = part;
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
index d1a5070..a8de94b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.debug.core.commands.ITerminateHandler;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
index fc33a34..845733b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,9 @@ import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.ui.IWorkbenchPart;
@@ -166,9 +168,9 @@ public class ToggleStepFiltersAction extends DebugCommandAction implements IProp
 		if (event.getProperty().equals(StepFilterManager.PREF_USE_STEP_FILTERS)) {
 			boolean checked = DebugUITools.isUseStepFilters();
 			setChecked(checked);
-			DebugCommandActionDelegate delegate = getDelegate();
-			if (delegate != null) {
-				delegate.setChecked(checked);
+			IAction action = getActionProxy();
+			if (action != null) {
+				action.setChecked(checked);
 			}
 		}		
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
index deee97a..1639271 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@
 package org.eclipse.debug.internal.ui.commands.actions;
 
 import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.jface.action.IAction;
 
 /**
  * Toggle step filters action delegate.
@@ -29,11 +29,8 @@ public class ToggleStepFiltersCommandActionDelegate extends DebugCommandActionDe
         setAction(new ToggleStepFiltersAction());
     }
 
-	/**
-	 * @see org.eclipse.debug.internal.ui.commands.actions.DebugCommandActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
-	 */
-	public void init(IWorkbenchWindow window) {
-		super.init(window);
-		setChecked(DebugUITools.isUseStepFilters());
-	}
+    public void init(IAction action) {
+        super.init(action);
+        action.setChecked(DebugUITools.isUseStepFilters());
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
index bcca5c9..142dbb2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/UpdateActionsRequest.java
@@ -12,7 +12,6 @@ package org.eclipse.debug.internal.ui.commands.actions;
 
 import org.eclipse.debug.core.commands.IEnabledStateRequest;
 import org.eclipse.debug.internal.core.commands.DebugCommandRequest;
-import org.eclipse.jface.action.IAction;
 
 /**
  * Boolean collector that collects boolean results from a number of voters.
@@ -23,10 +22,10 @@ import org.eclipse.jface.action.IAction;
  */
 public class UpdateActionsRequest extends DebugCommandRequest implements IEnabledStateRequest {
 	
-	private IAction[] fActions;
+	private IEnabledTarget[] fActions;
 	private boolean fEnabled = false;
 	
-	public UpdateActionsRequest(Object[] elements, IAction[] actions) {
+	public UpdateActionsRequest(Object[] elements, IEnabledTarget[] actions) {
 		super(elements);
 		fActions = actions;
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
index 3602916..820f6bd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/ContextRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *	   Daniel Friederich (freescale) -  Bug 293210 -  Context launch launches shared launch configuration twice.
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.contextlaunching;
 
@@ -122,6 +123,7 @@ public final class ContextRunner {
 			ILaunchConfiguration config = lcm.isSharedConfig(resource);
 			if(config != null) {
 				launch(config, mode);
+				return;
 			}
 		//get the configurations from the resource and participants	
 			List configs = fLRM.getParticipatingLaunchConfigurations(selection, resource, shortcuts, mode);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
index ffa1840..6166663 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contextlaunching/LaunchingResourceManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -156,6 +156,19 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
 	}
 	
 	/**
+	 * Returns if context launching is enabled or not. Context launching is enabled iff:
+	 * <ul>
+	 * <li>The preference is turned on</li>
+	 * <li>the launch group id is not <code>org.eclipse.ui.externaltools.launchGroup</code></li>
+	 * </ul>
+	 * @param launchgroupid
+	 * @return <code>true</code> if context launching is enabled <code>false</code> otherwise
+	 */
+	public static boolean isContextLaunchEnabled(String launchgroupid) {
+		return isContextLaunchEnabled() && !"org.eclipse.ui.externaltools.launchGroup".equals(launchgroupid); //$NON-NLS-1$
+	}
+	
+	/**
 	 * Allows an <code>AbstractLaunchHistoryAction</code> to register with this manager to be notified
 	 * of a context (<code>IResource</code>) change and have its updateToolTip(..) method called back to.
 	 * @param action the action to add
@@ -220,7 +233,7 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
 		for(int i = 0; i < listeners.length; i++) {
 			group = ((ILaunchLabelChangedListener)listeners[i]).getLaunchGroup();
 			if(group != null) {
-				if(isContextLaunchEnabled() && !group.getIdentifier().equals("org.eclipse.ui.externaltools.launchGroup")) { //$NON-NLS-1$
+				if(isContextLaunchEnabled(group.getIdentifier())) {
 					shortcuts = getShortcutsForSelection(selection, group.getMode());
 					if(resource == null) {
 						resource = getLaunchableResource(shortcuts, selection);
@@ -461,7 +474,7 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
 	 */
 	public List getParticipatingLaunchConfigurations(IStructuredSelection selection, IResource resource, List shortcuts, String mode) {
 		HashSet configs = new HashSet();
-		boolean useDefault = false;
+		int voteDefault = 0;
 		if(selection != null) {
 			Object o = selection.getFirstElement();
 			LaunchShortcutExtension ext = null;
@@ -478,17 +491,18 @@ public class LaunchingResourceManager implements IPropertyChangeListener, IWindo
 				if (cfgs == null) {
 					Set types = ext.getAssociatedConfigurationTypes();
 					addAllToList(configs, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableLaunchConfigurations((String[]) types.toArray(new String[types.size()]), resource));
-					useDefault = true;
-				} else if(cfgs.length > 0) {
-					for(int j = 0; j < cfgs.length; j++) {
-						configs.add(cfgs[j]);
+					voteDefault++;
+				} else {
+					if(cfgs.length > 0) { 
+						for(int j = 0; j < cfgs.length; j++) { 
+							configs.add(cfgs[j]);
+						}
 					}
-					useDefault = false;
 				}
 			}
 		}
-		if (useDefault) {
-			// consider default configurations if the shortcuts did not contribute any
+		if (voteDefault == shortcuts.size()) {			
+			// consider default configurations if no configurations were contributed
 			addAllToList(configs, DebugUIPlugin.getDefault().getLaunchConfigurationManager().getApplicableLaunchConfigurations(null, resource));
 		}
 		Iterator iterator = configs.iterator();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
index 9383bc5..38ea299 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugModelContextBindingManager.java
@@ -1,13 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Pawel Piech - Bug 154598: DebugModelContextBindingManager does not use IAdaptable.getAdapter() to retrieve IDebugModelProvider adapter
+ *     Pawel Piech - Bug 298648:  [View Management] Race conditions and other issues make view management unreliable. 
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.contexts;
 
@@ -25,7 +26,10 @@ import org.eclipse.core.commands.contexts.Context;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchesListener2;
@@ -47,6 +51,7 @@ import org.eclipse.ui.activities.IActivityPatternBinding;
 import org.eclipse.ui.activities.IWorkbenchActivitySupport;
 import org.eclipse.ui.contexts.IContextActivation;
 import org.eclipse.ui.contexts.IContextService;
+import org.eclipse.ui.progress.UIJob;
 
 /**
  * Manages <code>debugModelContextBindings</code> extensions.
@@ -136,13 +141,15 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 			IConfigurationElement element = configurationElements[i];
 			String modelIdentifier = element.getAttribute(ATTR_DEBUG_MODEL_ID);
 			String contextId = element.getAttribute(ATTR_CONTEXT_ID);
-			if (modelIdentifier != null && contextId != null) {
-				List contextIds = (List) fModelToContextIds.get(modelIdentifier);
-				if (contextIds == null) {
-					contextIds = new ArrayList();
-					fModelToContextIds.put(modelIdentifier, contextIds);
-				}
-				contextIds.add(contextId);
+			synchronized (this) {
+    			if (modelIdentifier != null && contextId != null) {
+    				List contextIds = (List) fModelToContextIds.get(modelIdentifier);
+    				if (contextIds == null) {
+    					contextIds = new ArrayList();
+    					fModelToContextIds.put(modelIdentifier, contextIds);
+    				}
+    				contextIds.add(contextId);
+    			}
 			}
 		}
 	}	
@@ -198,21 +205,28 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 			return;
 		}
 		ILaunch launch = getLaunch(object);
-		if (launch == null) {
+		if (launch == null || launch.isTerminated()) {
 			return;
 		}
-		Set alreadyEnabled = (Set) fLaunchToModelIds.get(launch);
-		if (alreadyEnabled == null) {
-			alreadyEnabled = new HashSet();
-			fLaunchToModelIds.put(launch, alreadyEnabled);
+		List toEnable = new ArrayList(modelIds.length);
+		synchronized (this) {
+		    Set alreadyEnabled = (Set) fLaunchToModelIds.get(launch);
+    		if (alreadyEnabled == null) {
+    			alreadyEnabled = new HashSet();
+    			fLaunchToModelIds.put(launch, alreadyEnabled);
+    		}
+    		for (int i = 0; i < modelIds.length; i++) {
+    			String id = modelIds[i];
+    			if (!alreadyEnabled.contains(id)) {
+    				alreadyEnabled.add(id);
+    				toEnable.add(id);
+    			}
+    		}
 		}
-		for (int i = 0; i < modelIds.length; i++) {
-			String id = modelIds[i];
-			if (!alreadyEnabled.contains(id)) {
-				alreadyEnabled.add(id);
-				activateModel(id, launch);
-			}
+		for (int i = 0; i < toEnable.size(); i++) {
+		    activateModel((String)toEnable.get(i), launch);
 		}
+
 		enableActivitiesFor(modelIds);
 	}
 	
@@ -224,15 +238,19 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 	 * @param launch the launch the model is being enabled for
 	 */
 	private void activateModel(String modelId, ILaunch launch) {
-		List contextIds = (List) fModelToContextIds.get(modelId);
-		if (contextIds == null) {
-			// if there are no contexts for a model, the base debug context should 
-			// be activated (i.e. a debug model with no org.eclipse.ui.contexts and
-			// associated org.eclipse.debug.ui.modelContextBindings)
-			contextIds = new ArrayList();
-			contextIds.add(DEBUG_CONTEXT);
-			fModelToContextIds.put(modelId, contextIds);
-		}
+	    List contextIds = null; 
+	    synchronized (this) {
+    		contextIds = (List) fModelToContextIds.get(modelId);
+    		if (contextIds == null) {
+    			// if there are no contexts for a model, the base debug context should 
+    			// be activated (i.e. a debug model with no org.eclipse.ui.contexts and
+    			// associated org.eclipse.debug.ui.modelContextBindings)
+    			contextIds = new ArrayList();
+    			contextIds.add(DEBUG_CONTEXT);
+    			fModelToContextIds.put(modelId, contextIds);
+    		}
+	    }
+	    
 		Iterator iterator = contextIds.iterator();
 		while (iterator.hasNext()) {
 			activateContext((String) iterator.next(), launch);
@@ -269,7 +287,7 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 	 * @param launch
 	 * @param activation
 	 */
-	private void addActivation(ILaunch launch, IContextActivation activation) {
+	private synchronized void addActivation(ILaunch launch, IContextActivation activation) {
 		List activations = (List) fLanuchToContextActivations.get(launch);
 		if (activations == null) {
 			activations = new ArrayList();
@@ -326,19 +344,25 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 		// disable activated contexts
 		for (int i = 0; i < launches.length; i++) {
 			ILaunch launch = launches[i];
-			final List activations = (List) fLanuchToContextActivations.remove(launch);
-			fLaunchToModelIds.remove(launch);
+			List activations;
+			synchronized(this) {
+    			activations = (List) fLanuchToContextActivations.remove(launch);
+    			fLaunchToModelIds.remove(launch);
+			}
 			if (activations != null) {
-				Runnable r = new Runnable() {
-					public void run() {
-						Iterator iterator = activations.iterator();
+			    final List _activations = activations; 
+				UIJob job = new UIJob("Deactivate debug contexts") { //$NON-NLS-1$
+					public IStatus runInUIThread(IProgressMonitor monitor) {
+						Iterator iterator = _activations.iterator();
 						while (iterator.hasNext()) {
 							IContextActivation activation = (IContextActivation) iterator.next();
 							activation.getContextService().deactivateContext(activation);
 						}
+						return Status.OK_STATUS;
 					}
 				};
-				DebugUIPlugin.getStandardDisplay().asyncExec(r);
+				job.setSystem(true);
+				job.schedule();
 			}
 			
 		}
@@ -374,15 +398,17 @@ public class DebugModelContextBindingManager implements IDebugContextListener, I
 		if (modelIds != null) {
 			for (int i = 0; i < modelIds.length; i++) {
 				String modelId = modelIds[i];
-				List contextIds = (List) fModelToContextIds.get(modelId);
-				if (contextIds != null) {
-					Iterator contextIterator = contextIds.iterator();
-					while (contextIterator.hasNext()) {
-						String contextId = (String) contextIterator.next();
-						if (!workbenchContexts.contains(contextId)) {
-							workbenchContexts.add(contextId);
-						}
-					}
+				synchronized (this) {
+    				List contextIds = (List) fModelToContextIds.get(modelId);
+    				if (contextIds != null) {
+    					Iterator contextIterator = contextIds.iterator();
+    					while (contextIterator.hasNext()) {
+    						String contextId = (String) contextIterator.next();
+    						if (!workbenchContexts.contains(contextId)) {
+    							workbenchContexts.add(contextId);
+    						}
+    					}
+    				}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
index 7f84fba..8547d1c 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/AsynchronousDebugLabelAdapter.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
 import org.eclipse.debug.internal.ui.LazyModelPresentation;
-import org.eclipse.debug.internal.ui.viewers.PartPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.provisional.AsynchronousLabelAdapter;
 import org.eclipse.debug.internal.ui.viewers.provisional.ILabelRequestMonitor;
@@ -30,7 +29,6 @@ import org.eclipse.debug.ui.IDebugView;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.IWorkbenchPart;
 
 /**
  * Asynchronous label adapter for debug elements.
@@ -47,32 +45,27 @@ public class AsynchronousDebugLabelAdapter extends AsynchronousLabelAdapter {
     	// Honor view specific settings in a debug view by copying model presentation settings
     	// into the debug element helper's presentation before we get the label. This allows
     	// for qualified name and type name settings to remain in tact.
-    	if (context instanceof PartPresentationContext) {
-    		PartPresentationContext ppc = (PartPresentationContext) context;
-	    	if (element instanceof IDebugElement && ppc.getPart() instanceof IDebugView) {
-	    		IWorkbenchPart part = ppc.getPart();
-	    		if (part instanceof IDebugView) {
-	    			IDebugModelPresentation pres = ((IDebugView)part).getPresentation(((IDebugElement)element).getModelIdentifier());
-	    			Map settings = null;
-		    		synchronized (presentation) {
-		    			if (pres instanceof DelegatingModelPresentation) {
-		    				settings = ((DelegatingModelPresentation)pres).getAttributes();
-		    			} else if (pres instanceof LazyModelPresentation) {
-		    				settings = ((LazyModelPresentation)pres).getAttributes();
-		    			}
-		    			if (settings != null) {
-				    		Iterator iterator = settings.entrySet().iterator();
-				    		while (iterator.hasNext()) {
-				    			Map.Entry entry = (Entry) iterator.next();
-				    			presentation.setAttribute((String) entry.getKey(), entry.getValue());
-				    		}
-				        	super.computeLabels(element, context, monitor);
-				        	return;
-		    			}
+    	if (element instanceof IDebugElement && context.getPart() instanceof IDebugView) {
+    		IDebugView debugView = (IDebugView)context.getPart();
+			IDebugModelPresentation pres = debugView.getPresentation(((IDebugElement)element).getModelIdentifier());
+			Map settings = null;
+    		synchronized (presentation) {
+    			if (pres instanceof DelegatingModelPresentation) {
+    				settings = ((DelegatingModelPresentation)pres).getAttributes();
+    			} else if (pres instanceof LazyModelPresentation) {
+    				settings = ((LazyModelPresentation)pres).getAttributes();
+    			}
+    			if (settings != null) {
+		    		Iterator iterator = settings.entrySet().iterator();
+		    		while (iterator.hasNext()) {
+		    			Map.Entry entry = (Entry) iterator.next();
+		    			presentation.setAttribute((String) entry.getKey(), entry.getValue());
 		    		}
-		    	}
-			}
-    	}
+		        	super.computeLabels(element, context, monitor);
+		        	return;
+    			}
+    		}
+		}
     	super.computeLabels(element, context, monitor);
     }
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java
new file mode 100644
index 0000000..27a161a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java
@@ -0,0 +1,74 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     Wind River Systems - ongoing enhancements and bug fixing
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.elements.adapters;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+
+/**
+ * The default breakpoints view input populates the view with content 
+ * from the default breakpoint manager.
+ * 
+ * @since 3.6
+ */
+public class DefaultBreakpointsViewInput {
+	
+	/**
+	 * The presentation context of the breakpoints view.
+	 */
+	final private IPresentationContext fContext;
+	
+	/**
+	 * Constructor.
+	 * 
+	 * @param context the presentation context for this input
+	 */
+	public DefaultBreakpointsViewInput(IPresentationContext context) {
+		fContext = context;
+	}
+		
+	/**
+	 * Returns the presentation context for this input.
+	 * 
+	 * @return the presentation context
+	 */
+	public IPresentationContext getContext() {
+		return fContext;
+	}
+	
+	/*
+     * (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode() {
+        if (getContext() != null) {
+            return getContext().hashCode();
+        } else {
+            return 1;
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals(Object arg0) {
+        if ( (arg0 != null) && arg0.getClass().equals(this.getClass()) ) {
+
+            IPresentationContext context = ((DefaultBreakpointsViewInput) arg0).getContext();
+            if (getContext() != null && context != null)
+                return getContext().equals(context);
+        } 
+        
+        return super.equals(arg0);              
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
index cd5a10d..04997ef 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 Wind River Systems and others.
+ * Copyright (c) 2007, 2009 Wind River Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     Wind River Systems - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.elements.adapters;
 
@@ -28,7 +29,12 @@ public class DefaultViewerInputProvider extends ViewerInputProvider {
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#getViewerInput(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
 	 */
-	protected Object getViewerInput(Object source, IPresentationContext context, IViewerUpdate update) throws CoreException {
+	protected Object getViewerInput(Object source, IPresentationContext context, IViewerUpdate update) throws CoreException {	    
+		if (IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(context.getId())) {	  			
+			DefaultBreakpointsViewInput input = new DefaultBreakpointsViewInput(context);
+			return input;
+		}	    	
+		
 		return DebugPlugin.getDefault().getExpressionManager();
 	}
 
@@ -36,7 +42,8 @@ public class DefaultViewerInputProvider extends ViewerInputProvider {
 	 * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#supportsContextId(java.lang.String)
 	 */
 	protected boolean supportsContextId(String id) {
-		return IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id);
+		return IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id) ||
+			IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
index 65c221e..bdcc2f8 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -254,7 +254,6 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
 		if (target != null && (target.isDisconnected() || target.isTerminated()))
 			return new Object[0];
 		
-		boolean error = false;
 		DebugException dbgEvt = null;
 		
 		String adjustedAddress = startAddress.toString(16);
@@ -364,7 +363,6 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
 			memoryBuffer = makeDummyContent(numberOfLines, tableRendering.getBytesPerLine());
 			
 			// finish creating the content provider before throwing an event
-			error = true; 
 			dbgEvt = e;
 		}
 		catch (Throwable e)
@@ -373,7 +371,6 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
 			memoryBuffer = makeDummyContent(numberOfLines, tableRendering.getBytesPerLine());
 			
 			// finish creating the content provider before throwing an event
-			error = true; 
 			dbgEvt = new DebugException(DebugUIPlugin.newErrorStatus(e.getMessage(), e));
 		}
 		
@@ -410,7 +407,7 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter {
 			manageDelta = !((IMemoryBlockExtension)descriptor.getMemoryBlock()).supportsChangeManagement();
 		}
 			
-		if (error){
+		if (dbgEvt != null){
 			throw dbgEvt;
 		}
 		
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
index d48d9d8..885bedd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameViewerInputProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Wind River Systems - support for alternative expression view content providers
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.elements.adapters;
 
@@ -23,13 +24,15 @@ import org.eclipse.debug.ui.IDebugUIConstants;
  * @since 3.4
  */
 public class StackFrameViewerInputProvider extends ViewerInputProvider {
-
+		
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.model.elements.ViewerInputProvider#getViewerInput(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
 	 */
 	protected Object getViewerInput(Object source, IPresentationContext context, IViewerUpdate update) throws CoreException {
 	    if ( IDebugUIConstants.ID_REGISTER_VIEW.equals(context.getId()) ) {
-	        return new RegisterGroupProxy((IStackFrame) source);
+	        return new RegisterGroupProxy((IStackFrame) source);  
+	    } else if ( IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(context.getId()) ) {
+	    	return new DefaultBreakpointsViewInput(context);
 	    } else {
 	        return DebugPlugin.getDefault().getExpressionManager();
 	    }
@@ -41,7 +44,8 @@ public class StackFrameViewerInputProvider extends ViewerInputProvider {
 	 */
 	protected boolean supportsContextId(String id) {
 		return IDebugUIConstants.ID_REGISTER_VIEW.equals(id) || 
-		       IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id);
+		       IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id) ||     
+		       IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
index c756501..79d3e8f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/VariableColumnFactoryAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,11 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.elements.adapters;
 
+import org.eclipse.debug.core.IExpressionManager;
 import org.eclipse.debug.core.model.IStackFrame;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
@@ -28,8 +30,11 @@ public class VariableColumnFactoryAdapter implements IColumnPresentationFactory
 	 */
 	public IColumnPresentation createColumnPresentation(IPresentationContext context, Object element) {
 		String id = context.getId();
-		if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) {
-			if (element instanceof IStackFrame) {
+        if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || 
+            IDebugUIConstants.ID_REGISTER_VIEW.equals(id) || 
+            IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id)) 
+        {
+			if (element instanceof IStackFrame || element instanceof IExpressionManager) {
 				return new VariableColumnPresentation();
 			}
 		}
@@ -41,8 +46,11 @@ public class VariableColumnFactoryAdapter implements IColumnPresentationFactory
 	 */
 	public String getColumnPresentationId(IPresentationContext context, Object element) {
 		String id = context.getId();
-		if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || IDebugUIConstants.ID_REGISTER_VIEW.equals(id)) {
-			if (element instanceof IStackFrame) {
+		if (IDebugUIConstants.ID_VARIABLE_VIEW.equals(id) || 
+		    IDebugUIConstants.ID_REGISTER_VIEW.equals(id) || 
+		    IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id)) 
+		{
+			if (element instanceof IStackFrame || element instanceof IExpressionManager) {
 				return VariableColumnPresentation.DEFAULT_VARIABLE_COLUMN_PRESENTATION;
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java
new file mode 100644
index 0000000..077d6ed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/WatchExpressionCellModifier.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.elements.adapters;
+
+import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.ui.DefaultLabelProvider;
+import org.eclipse.jface.viewers.ICellModifier;
+
+/**
+ * Watch expressions modifier can change the expression name but not its value.
+ * 
+ * @since 3.6
+ */
+public class WatchExpressionCellModifier implements ICellModifier {
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object, java.lang.String)
+	 */
+	public boolean canModify(Object element, String property) {
+        if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
+            return element instanceof IWatchExpression;
+        }  
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object, java.lang.String)
+	 */
+	public Object getValue(Object element, String property) {
+        if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
+            return DefaultLabelProvider.escapeSpecialChars( ((IWatchExpression)element).getExpressionText() );
+        }  
+        return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object, java.lang.String, java.lang.Object)
+	 */
+	public void modify(Object element, String property, Object value) {
+		Object oldValue = getValue(element, property);
+        if (!value.equals(oldValue)) {
+        	if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property)) {
+				if (element instanceof IWatchExpression) {
+					if (value instanceof String) {
+						// The value column displays special characters 
+					    // escaped, so encode the string with any special 
+					    // characters escaped properly
+						String expressionText = DefaultLabelProvider.encodeEsacpedChars((String)value);
+						IWatchExpression expression = (IWatchExpression) element;
+						expression.setExpressionText(expressionText);
+					}
+				}
+	        }
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
index 92e8b31..f9c7ed5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/EmbeddedBreakpointsViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,17 +17,19 @@ import java.util.Map;
 import java.util.Vector;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
 import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsComparator;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsContentProvider;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsLabelProvider;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
 import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsViewer;
-import org.eclipse.debug.internal.ui.views.breakpoints.IBreakpointOrganizer;
 import org.eclipse.debug.ui.IDebugModelPresentation;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -151,11 +153,12 @@ public class EmbeddedBreakpointsViewer {
 		ArrayList list = new ArrayList();
 		for(int i = 0; i < items.length; i++) {
 			Object item = items[i];
-			if(item instanceof IBreakpoint) {
-				list.add(item);
+			IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(item, IBreakpoint.class);
+			if(breakpoint != null) {
+				list.add(breakpoint);
 			}
-			else if (item instanceof BreakpointContainer) {
-				getBreakpointsFromContainers((BreakpointContainer)item, list);
+			else if (item instanceof IBreakpointContainer) {
+			    getBreakpointsFromContainers((IBreakpointContainer)item, list);
 			}
 		}
 		for(int i = 0; i < list.size(); i++) {
@@ -168,16 +171,12 @@ public class EmbeddedBreakpointsViewer {
 	 * @param container the container to get breakpoints from
 	 * @param list the list of breakpoints to update state for
 	 */
-	private void getBreakpointsFromContainers(BreakpointContainer container, ArrayList list) {
-		Object[] elements = container.getChildren();
-		for(int i = 0; i < elements.length; i++) {
-			if(elements[i] instanceof IBreakpoint) {
-				list.add(elements[i]);
-			}
-			else {
-				getBreakpointsFromContainers((BreakpointContainer)elements[i], list);
-			}
-		}
+	private void getBreakpointsFromContainers(IBreakpointContainer container, ArrayList list) {
+        IBreakpoint[] bps = container.getBreakpoints();
+        list.ensureCapacity(list.size() + bps.length);
+        for (int j = 0; j < bps.length; j++) {
+            list.add(bps[j]);
+        }
 	}
 	
 	/**
@@ -240,22 +239,23 @@ public class EmbeddedBreakpointsViewer {
      * @param enable the checked status of the obj
      */
     private void updateCheckedState(Object obj, boolean enable) {
-	        if (obj instanceof IBreakpoint) {
-	        	Widget[] list = searchItems(obj);
-	        	TreeItem item = null;
-	        	for(int i = 0; i < list.length; i++) {
-		        	item = (TreeItem)list[i];
-		            item.setChecked(enable);
-		            refreshParents(item);
-	        	}
-	        }
-	        else if (obj instanceof BreakpointContainer) {
-	        	ArrayList bps = new ArrayList();
-	        	getBreakpointsFromContainers((BreakpointContainer)obj, bps);
-	        	for(int j = 0; j < bps.size(); j++) {
-	        		updateCheckedState(bps.get(j), enable);
-	        	}
-	        }
+        IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(obj, IBreakpoint.class);
+        if (breakpoint != null) {
+        	Widget[] list = searchItems(obj);
+        	TreeItem item = null;
+        	for(int i = 0; i < list.length; i++) {
+	        	item = (TreeItem)list[i];
+	            item.setChecked(enable);
+	            refreshParents(item);
+        	}
+        }
+        else if (obj instanceof BreakpointContainer) {
+        	ArrayList bps = new ArrayList();
+        	getBreakpointsFromContainers((BreakpointContainer)obj, bps);
+        	for(int j = 0; j < bps.size(); j++) {
+        		updateCheckedState(bps.get(j), enable);
+        	}
+        }
      }
 
     /**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
index 604a347..0cd0a82 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/ImportBreakpoints.java
@@ -43,7 +43,7 @@ public class ImportBreakpoints extends AbstractDebugActionDelegate {
 		WizardDialog wizdialog = new WizardDialog(DebugUIPlugin.getShell(), wiz);
 		wizdialog.setBlockOnOpen(true);
 		wizdialog.open();
-	}//end run
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(java.lang.Object)
@@ -55,5 +55,5 @@ public class ImportBreakpoints extends AbstractDebugActionDelegate {
 	 */
 	protected void update(IAction action, ISelection s) {
 		getAction().setEnabled(true);
-	}//end update
-}//end class
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
index b13ca8d..e90b7dc 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/CreateLaunchConfigurationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,7 +65,7 @@ public class CreateLaunchConfigurationAction extends AbstractLaunchConfiguration
 				type = (ILaunchConfigurationType) object;
 			}
 			try {
-				ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); 
+				ILaunchConfigurationWorkingCopy wc = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2)); 
 				ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
 				// this only works because this action is only present when the dialog is open
 				ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
index 825ed3c..fd9a3fb 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/DuplicateLaunchConfigurationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ public class DuplicateLaunchConfigurationAction extends AbstractLaunchConfigurat
 	 */
 	protected void performAction() {
 		ILaunchConfiguration original = (ILaunchConfiguration)getStructuredSelection().getFirstElement();
-		String newName = DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(original.getName());
+		String newName = DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(original.getName());
 		try {
 			ILaunchConfigurationWorkingCopy newWorkingCopy = original.copy(newName);
 			newWorkingCopy.doSave();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
index dab561b..6e8b888 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import java.util.Set;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
 
 import org.eclipse.core.expressions.EvaluationContext;
 import org.eclipse.core.expressions.IEvaluationContext;
@@ -39,6 +40,7 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ISaveContext;
 import org.eclipse.core.resources.ISaveParticipant;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IPath;
@@ -641,7 +643,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
 	/**
 	 * Load all registered extensions of the 'launch shortcut' extension point.
 	 */
-	private void loadLaunchShortcuts() {
+	private synchronized void loadLaunchShortcuts() {
 		if(fLaunchShortcuts == null) {
 			// Get the configuration elements
 			IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_SHORTCUTS);
@@ -659,7 +661,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
 	/**
 	 * Load all registered extensions of the 'launch groups' extension point.
 	 */
-	private void loadLaunchGroups() {
+	private synchronized void loadLaunchGroups() {
 		if (fLaunchGroups == null) {
 			// Get the configuration elements
 			IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(DebugUIPlugin.getUniqueIdentifier(), IDebugUIConstants.EXTENSION_POINT_LAUNCH_GROUPS);
@@ -984,6 +986,12 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
 		else if(receiver instanceof IEditorPart) {
 			return isSharedConfig(((IEditorPart) receiver).getEditorInput());
 		}
+		else if (receiver instanceof IAdaptable) {
+			IFile file = (IFile) ((IAdaptable)receiver).getAdapter(IFile.class);
+			if (file != null) {
+				return isSharedConfig(file);
+			}
+		}
 		return null;
 	}
 	
@@ -1088,7 +1096,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
 	}
 	
 	/**
-	 * Returns the launch group the given launch configuration belongs to, in
+	 * Returns the launch group the given launch configuration type belongs to, in
 	 * the specified mode, or <code>null</code> if none.
 	 * 
 	 * @param type the type
@@ -1097,6 +1105,9 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
 	 * the specified mode, or <code>null</code> if none
 	 */
 	public ILaunchGroup getLaunchGroup(ILaunchConfigurationType type, String mode) {
+		if (!type.supportsMode(mode)) {
+			return null;
+		}
 		String category = type.getCategory();
 		ILaunchGroup[] groups = getLaunchGroups();
 		ILaunchGroup extension = null;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
index 8fda944..3ca3eb7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.activities.IWorkbenchActivitySupport;
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
@@ -116,16 +117,37 @@ public class LaunchConfigurationPresentationManager {
 				}
 				modes = group.getModes();
 				if(modes.isEmpty()) {
-					map.put("*", group); //$NON-NLS-1$
+					String mode = "*"; //$NON-NLS-1$
+					reportReplacement((LaunchConfigurationTabGroupExtension) map.put(mode, group), group, mode);
 				}
+				Set ms = null;
 				for(Iterator iter = modes.iterator(); iter.hasNext();) {
-					map.put(iter.next(), group);
+					ms = (Set) iter.next();
+					reportReplacement((LaunchConfigurationTabGroupExtension) map.put(ms, group), group, ms);
 				}
 			}
 		}
 	}	
 	
 	/**
+	 * Reports if a tab group extension has been replaced by another contribution
+	 * @param oldext the old tab group extension from the cache
+	 * @param newext the new one being cached
+	 * @param mode the mode(s) the group applies to
+	 * 
+	 * @since 3.6
+	 */
+	void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext, Object mode) {
+		if(oldext != null) {
+			Status status = new Status(IStatus.ERROR, 
+					DebugUIPlugin.getUniqueIdentifier(), 
+					NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, 
+							new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), mode.toString(), newext.getIdentifier()}));
+			DebugUIPlugin.log(status);
+		}
+	}
+	
+	/**
 	 * This method is used to collect all of the contributed tabs defined by the <code>launchConfigurationTabs</code>
 	 * extension point
 	 *
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
index 0da0427..437ce2b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPropertiesDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.debug.internal.ui.launchConfigurations;
 
 import java.util.Set;
 
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -21,12 +20,8 @@ import org.eclipse.debug.core.ILaunchConfigurationListener;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -44,12 +39,6 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia
 	 * The launch configuration to display
 	 */
 	private ILaunchConfiguration fLaunchConfiguration;
-	
-	/**
-	 * Whether to set default values when opened
-	 * @since 3.3
-	 */
-	private boolean fSetDefaultOnOpen = false;
 
 	/**
 	 * Constructs a new launch configuration dialog on the given
@@ -106,22 +95,9 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia
 	 */
 	protected void initializeContent() {
 		ILaunchConfiguration launchConfiguration = getLaunchConfiguration();
-		if (fSetDefaultOnOpen && launchConfiguration instanceof ILaunchConfigurationWorkingCopy) {
+		if (shouldSetDefaultsOnOpen() && launchConfiguration instanceof ILaunchConfigurationWorkingCopy) {
 			ILaunchConfigurationWorkingCopy wc = (ILaunchConfigurationWorkingCopy) launchConfiguration;
-			try {
-				ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
-				// this only works because this action is only present when the dialog is open
-				ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
-				tabGroup.createTabs(dialog, dialog.getMode());
-				ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
-				for (int i = 0; i < tabs.length; i++) {
-					tabs[i].setLaunchConfigurationDialog(dialog);
-				}
-				tabGroup.setDefaults(wc);
-				tabGroup.dispose();
-			} catch (CoreException e) {
-				DebugUIPlugin.log(e.getStatus());
-			}
+			doSetDefaults(wc);
 		}
 		getTabViewer().setInput(launchConfiguration);
 		IStatus status = getInitialStatus();
@@ -255,16 +231,4 @@ public class LaunchConfigurationPropertiesDialog extends LaunchConfigurationsDia
 	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
 	 */
 	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {}
-	
-	/**
-	 * Sets whether the tab group should set default values in the launch configuration
-	 * when the dialog is opened. If this method is not called, default values are not
-	 * set.
-	 * 
-	 * @param setDefaults whether to set default values
-	 */
-	public void setDefaultsOnOpen(boolean setDefaults) {
-		fSetDefaultOnOpen = setDefaults;
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index 7ce280e..6b6c3a0 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,42 +11,27 @@
 package org.eclipse.debug.internal.ui.launchConfigurations;
 
 
+import com.ibm.icu.text.MessageFormat;
+
 import java.lang.reflect.InvocationTargetException;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchDelegate;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchConfigurationWorkingCopy;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.SWTFactory;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.core.runtime.jobs.Job;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.custom.CTabFolder;
 import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.custom.ScrolledComposite;
 import org.eclipse.swt.custom.StackLayout;
 import org.eclipse.swt.custom.ViewForm;
 import org.eclipse.swt.events.ModifyEvent;
@@ -65,30 +50,39 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.ColorRegistry;
+import org.eclipse.jface.resource.JFaceResources;
+
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.WorkbenchJob;
 
-import com.ibm.icu.text.MessageFormat;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchDelegate;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.core.LaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
 
 /**
  * A viewer that displays tabs for a launch configuration, with apply and revert
  * buttons.
  */
 public class LaunchConfigurationTabGroupViewer {
-
-	/**
-	 * Listing of invalid names for launch configurations
-	 * @since 3.5
-	 */
-	static final String[] INVALID_CONFIG_NAMES = new String[] {"aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ 
-		"com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
-		"lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
-	
-	/**
-	 * Listing of characters that cannot appear in launch configuration names
-	 * @since 3.5
-	 */
-	static final char[] INVALID_CONFIG_NAME_CHARS = new char[] { '@', '&','\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' };
 	
 	/**
 	 * Containing launch dialog
@@ -96,11 +90,6 @@ public class LaunchConfigurationTabGroupViewer {
 	private ILaunchConfigurationDialog fDialog;
 	
 	/**
-	 * The this viewer's input
-	 */
-	private Object fInput;
-	
-	/**
 	 * The launch configuration (original) being edited
 	 */
 	private ILaunchConfiguration fOriginal;
@@ -116,16 +105,6 @@ public class LaunchConfigurationTabGroupViewer {
 	private Composite fViewerControl;
 	
 	/**
-	 * The composite which is hidden/displayed as tabs are required.
-	 */
-	private Composite fVisibleArea;
-	
-	/**
-	 * Name label widget
-	 */
-	private Label fNameLabel;
-	
-	/**
 	 * Name text widget
 	 */
 	private Text fNameWidget;
@@ -133,7 +112,7 @@ public class LaunchConfigurationTabGroupViewer {
 	/**
 	 * Composite containing the launch config tab widgets
 	 */
-	private Composite fTabComposite;
+	private Composite fGroupComposite;
 	
 	/**
 	 * Tab folder
@@ -144,12 +123,6 @@ public class LaunchConfigurationTabGroupViewer {
 	 * The current tab group being displayed
 	 */
 	private ILaunchConfigurationTabGroup fTabGroup;
-
-	/**
-	 * The type of config tabs are currently displayed
-	 * for
-	 */
-	private ILaunchConfigurationType fTabType;	
 	
 	/**
 	 * Index of the active tab
@@ -201,6 +174,11 @@ public class LaunchConfigurationTabGroupViewer {
 	private ViewForm fViewform;
 	
 	/**
+	 * Job to update the dialog after a delay.
+	 */
+	private Job fRefreshJob;
+	
+	/**
 	 * Constructs a viewer in the given composite, contained by the given
 	 * launch configuration dialog.
 	 * 
@@ -227,7 +205,6 @@ public class LaunchConfigurationTabGroupViewer {
 		if (fTabGroup != null) {
 			fTabGroup.dispose();
 			fTabGroup = null;
-			fTabType = null;
 		}
 	}	
 	
@@ -239,59 +216,29 @@ public class LaunchConfigurationTabGroupViewer {
 	 * @return the composite used for launch configuration editing
 	 */
 	private void createControl(Composite parent) {
-		fViewerControl = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		layout.marginHeight = 0;
-		layout.marginWidth = 0;
-		layout.horizontalSpacing = 0;
-		layout.verticalSpacing = 0;
-		fViewerControl.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		fViewerControl.setLayoutData(gd);
-		
-        fViewform = new ViewForm(fViewerControl, SWT.FLAT | SWT.BORDER);
-        layout = new GridLayout(1, false);
+		fViewerControl = parent;
+        fViewform = new ViewForm(parent, SWT.FLAT | SWT.BORDER);
+        GridLayout layout = new GridLayout(1, false);
         layout.horizontalSpacing = 0;
         layout.verticalSpacing = 0;
         fViewform.setLayout(layout);
-		gd = new GridData(GridData.FILL_BOTH);
+		GridData gd = new GridData(GridData.FILL_BOTH);
 		fViewform.setLayoutData(gd);
-		fVisibleArea = fViewform;
         fViewform.setTopLeft(null);
         
-        Composite mainComp = new Composite(fViewform, SWT.FLAT);
-        layout = new GridLayout(1, false);
-        layout.verticalSpacing = 0;
-        layout.horizontalSpacing = 0;
-        mainComp.setLayout(layout);
+        Composite mainComp = SWTFactory.createComposite(fViewform, fViewform.getFont(), 1, 1, 1, 0, 0);
         fViewform.setContent(mainComp);
 
-		fTabPlaceHolder = new Composite(mainComp, SWT.NONE);
+		fTabPlaceHolder = SWTFactory.createComposite(mainComp, 1, 1, GridData.FILL_BOTH);
 		fTabPlaceHolder.setLayout(new StackLayout());
-		gd = new GridData(GridData.FILL_BOTH);
-		fTabPlaceHolder.setLayoutData(gd);
-        
-		fGettingStarted = new Composite(fTabPlaceHolder, SWT.NONE);
-		fGettingStarted.setLayout(new GridLayout());
-		gd = new GridData(GridData.FILL_BOTH);
-		fGettingStarted.setLayoutData(gd);
+		fGettingStarted = SWTFactory.createComposite(fTabPlaceHolder, 1, 1, GridData.FILL_BOTH);
 		
 		createGettingStarted(fGettingStarted);
 		
-		fTabComposite = new Composite(fTabPlaceHolder, SWT.NONE);
-		layout = new GridLayout(2, false);
-		layout.verticalSpacing = 10;
-		layout.horizontalSpacing = 5;
-		fTabComposite.setLayout(layout);
-		gd = new GridData(GridData.FILL_BOTH);
-		fTabComposite.setLayoutData(gd);
-		
-		fNameLabel = new Label(fTabComposite, SWT.HORIZONTAL | SWT.LEFT);
-		fNameLabel.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog__Name__16); 
-        fNameLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+		fGroupComposite = SWTFactory.createComposite(fTabPlaceHolder, fTabPlaceHolder.getFont(), 2, 2, GridData.FILL_BOTH, 5, 5);
+		SWTFactory.createLabel(fGroupComposite, LaunchConfigurationsMessages.LaunchConfigurationDialog__Name__16, 1);
        
-		fNameWidget = new Text(fTabComposite, SWT.SINGLE | SWT.BORDER);
+		fNameWidget = new Text(fGroupComposite, SWT.SINGLE | SWT.BORDER);
         fNameWidget.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
         fNameWidget.addModifyListener(new ModifyListener() {
     				public void modifyText(ModifyEvent e) {
@@ -302,7 +249,7 @@ public class LaunchConfigurationTabGroupViewer {
     			}
     		);
     		
-		createTabFolder(fTabComposite);
+		createTabFolder(fGroupComposite);
 		
 		Composite blComp = SWTFactory.createComposite(mainComp, mainComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL);
 		Composite linkComp = SWTFactory.createComposite(blComp, blComp.getFont(), 2, 1, GridData.FILL_HORIZONTAL);
@@ -351,29 +298,15 @@ public class LaunchConfigurationTabGroupViewer {
 		});
 		fOptionsLink.setVisible(false);
 		
-		Composite buttonComp = new Composite(blComp, SWT.NONE);
-		GridLayout buttonCompLayout = new GridLayout();
-		buttonCompLayout.numColumns = 2;
-		buttonComp.setLayout(buttonCompLayout);
-		gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
-		buttonComp.setLayoutData(gd);
-		
-		fApplyButton = new Button(buttonComp, SWT.PUSH);
-		fApplyButton.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog__Apply_17); 
-		gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
-		fApplyButton.setLayoutData(gd);
-		SWTFactory.setButtonDimensionHint(fApplyButton);
+		Composite buttonComp = SWTFactory.createComposite(blComp, 2, 1, GridData.HORIZONTAL_ALIGN_END);
+		fApplyButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.LaunchConfigurationDialog__Apply_17, null,GridData.HORIZONTAL_ALIGN_END);
 		fApplyButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent evt) {
 				handleApplyPressed();
 			}
 		});
 
-		fRevertButton = new Button(buttonComp, SWT.PUSH);
-		fRevertButton.setText(LaunchConfigurationsMessages.LaunchConfigurationDialog_Revert_2);   
-		gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
-		fRevertButton.setLayoutData(gd);
-		SWTFactory.setButtonDimensionHint(fRevertButton);
+		fRevertButton = SWTFactory.createPushButton(buttonComp, LaunchConfigurationsMessages.LaunchConfigurationDialog_Revert_2, null, GridData.HORIZONTAL_ALIGN_END);
 		fRevertButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent evt) {
 				handleRevertPressed();
@@ -421,14 +354,14 @@ public class LaunchConfigurationTabGroupViewer {
 			ColorRegistry reg = JFaceResources.getColorRegistry();
 			Color c1 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_START"), //$NON-NLS-1$
 				  c2 = reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_BG_END"); //$NON-NLS-1$
-			fTabFolder = new CTabFolder(parent, SWT.NO_REDRAW_RESIZE | SWT.NO_TRIM | SWT.FLAT);
-			GridData gd = new GridData(GridData.FILL_BOTH);
-			gd.horizontalSpan = 2;
+			fTabFolder = new CTabFolder(parent, SWT.NO_REDRAW_RESIZE | SWT.FLAT);
 			fTabFolder.setSelectionBackground(new Color[] {c1, c2},	new int[] {100}, true);
 			fTabFolder.setSelectionForeground(reg.get("org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR")); //$NON-NLS-1$
 			fTabFolder.setSimple(PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
+			fTabFolder.setBorderVisible(true);
+			GridData gd = new GridData(GridData.FILL_BOTH);
+			gd.horizontalSpan = 2;
 			fTabFolder.setLayoutData(gd);
-	        fTabFolder.setBorderVisible(true);
 			fTabFolder.setFont(parent.getFont());
 			fTabFolder.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent event) {
@@ -491,7 +424,7 @@ public class LaunchConfigurationTabGroupViewer {
 	 * @return returns the current input 
 	 */
 	public Object getInput() {
-		return fInput;
+		return getConfiguration();
 	}
 
 	/* (non-Javadoc)
@@ -617,6 +550,18 @@ public class LaunchConfigurationTabGroupViewer {
 	}
 	
 	/**
+	 * @return returns the configuration input
+	 * 
+	 * @since 3.6
+	 */
+	ILaunchConfiguration getConfiguration() {
+		if(fOriginal == null) {
+			return getWorkingCopy();
+		}
+		return fOriginal;
+	}
+	
+	/**
 	 * updates the button states
 	 */
 	private void updateButtons() {
@@ -648,12 +593,12 @@ public class LaunchConfigurationTabGroupViewer {
 	 */
 	private void setInput0(Object input) {
 		if (input == null) {
-			if (fInput == null) {
+			if (getConfiguration() == null) {
 				return;
 			}
 			inputChanged(input);
 		} else {
-			if (!input.equals(fInput)) {
+			if (!input.equals(getConfiguration())) {
 				inputChanged(input);
 			}
 		}
@@ -665,19 +610,19 @@ public class LaunchConfigurationTabGroupViewer {
 	 * @param input the new input, possibly <code>null</code>
 	 */
 	protected void inputChanged(Object input) {
-		fInput = input;
+		final Object finput = input;
 		Runnable r = new Runnable() {
 			public void run() {
 				try {
-					fVisibleArea.setRedraw(false);
-					if (fInput instanceof ILaunchConfiguration) {
-						ILaunchConfiguration configuration = (ILaunchConfiguration)fInput;
+					fViewform.setRedraw(false);
+					if (finput instanceof ILaunchConfiguration) {
+						ILaunchConfiguration configuration = (ILaunchConfiguration)finput;
 						boolean refreshtabs = !delegatesEqual(fWorkingCopy, configuration);
 						fOriginal = configuration;
 						fWorkingCopy = configuration.getWorkingCopy();
 						displayInstanceTabs(refreshtabs);
-					} else if (fInput instanceof ILaunchConfigurationType) {
-						fDescription = getDescription((ILaunchConfigurationType)fInput);
+					} else if (finput instanceof ILaunchConfigurationType) {
+						fDescription = getDescription((ILaunchConfigurationType)finput);
 						setNoInput();
 					} else {
 						setNoInput();
@@ -688,7 +633,7 @@ public class LaunchConfigurationTabGroupViewer {
 				}
 				finally {
 					refreshStatus();
-					fVisibleArea.setRedraw(true);
+					fViewform.setRedraw(true);
 				}
 			}
 		};
@@ -726,17 +671,21 @@ public class LaunchConfigurationTabGroupViewer {
 			if(config1 == null || config2 == null) {
 				return false;
 			}
-			Set modes = getCurrentModeSet();
-			ILaunchDelegate d1 = config1.getPreferredDelegate(modes);
-			if(d1 == null) {
-				d1 = config1.getType().getPreferredDelegate(modes);
-			}
-			ILaunchDelegate d2 = config2.getPreferredDelegate(modes);
-			if(d2 == null) {
-				d2 = config2.getType().getPreferredDelegate(modes);
-			}
-			if(d1 != null) {
-				return d1.equals(d2);
+			if (config1.getType().equals(config2.getType())) {
+				Set modes = getCurrentModeSet();
+				ILaunchDelegate d1 = config1.getPreferredDelegate(modes);
+				if(d1 == null) {
+					d1 = config1.getType().getPreferredDelegate(modes);
+				}
+				ILaunchDelegate d2 = config2.getPreferredDelegate(modes);
+				if(d2 == null) {
+					d2 = config2.getType().getPreferredDelegate(modes);
+				}
+				if (d1 == null) {
+					return d2 == null;
+				} else {
+					return d1.equals(d2);
+				}
 			}
 		}
 		catch(CoreException ce) {DebugUIPlugin.log(ce);}
@@ -752,7 +701,7 @@ public class LaunchConfigurationTabGroupViewer {
 		fRevertButton.setVisible(visible);
 		fOptionsLink.setVisible(visible);
 		if(visible) {
-			((StackLayout)fTabPlaceHolder.getLayout()).topControl = fTabComposite;
+			((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGroupComposite;
 		}
 		else {
 			((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGettingStarted;
@@ -809,8 +758,8 @@ public class LaunchConfigurationTabGroupViewer {
 		// Turn off initializing flag to update message
 		fInitializingTabs = false;
 		
-		if (!fVisibleArea.isVisible()) {
-			fVisibleArea.setVisible(true);
+		if (!fViewform.isVisible()) {
+			fViewform.setVisible(true);
 		}	
 	}
 	
@@ -834,7 +783,6 @@ public class LaunchConfigurationTabGroupViewer {
 		}
 		disposeExistingTabs();
 		fTabGroup = group;
-		fTabType = configType;
 		ILaunchConfigurationTab[] tabs = getTabs();
 		CTabItem tab = null;
 		String name = IInternalDebugCoreConstants.EMPTY_STRING;
@@ -847,10 +795,17 @@ public class LaunchConfigurationTabGroupViewer {
 			}
 			tab.setText(name);
 			tab.setImage(tabs[i].getImage());
-			tabs[i].createControl(tab.getParent());
+			ScrolledComposite sc = new ScrolledComposite(tab.getParent(), SWT.V_SCROLL | SWT.H_SCROLL);
+			sc.setFont(tab.getParent().getFont());
+			sc.setExpandHorizontal(true);
+			sc.setExpandVertical(true);
+			sc.setShowFocusedControl(true);
+			tabs[i].createControl(sc);
 			control = tabs[i].getControl();
 			if (control != null) {
-				tab.setControl(control);
+				sc.setContent(control);
+				sc.setMinSize(control.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+				tab.setControl(control.getParent());
 			}
 		}
 		//set the default tab as the first one
@@ -978,6 +933,62 @@ public class LaunchConfigurationTabGroupViewer {
 	}
 	
 	/**
+	 * Returns the job to update the launch configuration dialog.
+	 * 
+	 * @return update job
+	 */
+	private Job getUpdateJob() {
+		if (fRefreshJob == null) {
+			fRefreshJob = createUpdateJob();
+			fRefreshJob.setSystem(true);
+		}
+		return fRefreshJob;
+	}
+	
+	/**
+	 * Schedules the update job to run for this tab based on this tab's delay.
+	 * 
+	 * @since 3.6
+	 */
+	protected void scheduleUpdateJob() {
+		Job job = getUpdateJob();
+		job.cancel(); // cancel existing job
+		job.schedule(getUpdateJobDelay());
+	}
+	
+	/**
+	 * Return the time delay that should be used when scheduling the
+	 * update job. Subclasses may override.
+	 * 
+	 * @return a time delay in milliseconds before the job should run
+	 * @since 3.6
+	 */
+	protected long getUpdateJobDelay() {
+		return 200;
+	}		
+	
+	/**
+	 * Creates and returns a job used to update the launch configuration dialog
+	 * for this tab. Subclasses may override.
+	 * 
+	 * @return job to update the launch dialog for this tab
+	 * @since 3.6
+	 */
+	protected Job createUpdateJob() {
+		return  new WorkbenchJob(getControl().getDisplay(), "Update LCD") { //$NON-NLS-1$
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				if (!getControl().isDisposed()) {
+					refreshStatus();
+				}
+				return Status.OK_STATUS;
+			}
+			public boolean shouldRun() {
+				return !getControl().isDisposed();
+			}
+		};
+	}	
+	
+	/**
 	 * Update apply & revert buttons, as well as buttons and message on the
 	 * launch config dialog.
 	 */
@@ -1130,7 +1141,7 @@ public class LaunchConfigurationTabGroupViewer {
 		if(config != null) {
 			try {
 				Set modes = getCurrentModeSet();
-				ILaunchDelegate[] delegates = LaunchConfigurationManager.filterLaunchDelegates(fTabType, modes);
+				ILaunchDelegate[] delegates = LaunchConfigurationManager.filterLaunchDelegates(config.getType(), modes);
 				return delegates.length > 1;
 			}
 			catch (CoreException ce) {DebugUIPlugin.log(ce);}
@@ -1224,6 +1235,7 @@ public class LaunchConfigurationTabGroupViewer {
 	 */
 	protected void verifyName() throws CoreException {
 		if (fNameWidget.isVisible()) {
+			ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
 			String currentName = fNameWidget.getText().trim();
 	
 			// If there is no name, complain
@@ -1234,33 +1246,20 @@ public class LaunchConfigurationTabGroupViewer {
 													 LaunchConfigurationsMessages.LaunchConfigurationDialog_Name_required_for_launch_configuration_11, 
 													 null));
 			}
-			if(Platform.OS_WIN32.equals(Platform.getOS())) {
-				for(int i = 0; i < INVALID_CONFIG_NAMES.length; i++) {
-					if(currentName.equals(INVALID_CONFIG_NAMES[i])) {
-						throw new CoreException(new Status(IStatus.ERROR,
-								DebugUIPlugin.getUniqueIdentifier(),
-								0,
-								MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_19, new String[] { currentName }), 
-								null));
-					}
-				}
+			try {
+				mgr.isValidLaunchConfigurationName(currentName);
 			}
-			// See if name contains any characters that we deem illegal.
-			// '@' and '&' are disallowed because they corrupt menu items
-			for (int i = 0; i < INVALID_CONFIG_NAME_CHARS.length; i++) {
-				char c = INVALID_CONFIG_NAME_CHARS[i];
-				if (currentName.indexOf(c) > -1) {
-					throw new CoreException(new Status(IStatus.ERROR,
-														DebugUIPlugin.getUniqueIdentifier(),
-														0,
-														MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationTabGroupViewer_0, new String[] { new String(new char[] {c}) }), 
-														null));
-				}
+			catch(IllegalArgumentException iae) {
+				throw new CoreException(new Status(IStatus.ERROR,
+						 DebugUIPlugin.getUniqueIdentifier(),
+						 0,
+						 iae.getMessage(),
+						 null));
 			}
 			// Otherwise, if there's already a config with the same name, complain
 			if (fOriginal != null && !fOriginal.getName().equals(currentName)) {
 				Set reservednames = ((LaunchConfigurationsDialog)getLaunchConfigurationDialog()).getReservedNameSet();
-				if (DebugPlugin.getDefault().getLaunchManager().isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) {
+				if (mgr.isExistingLaunchConfigurationName(currentName) || (reservednames != null ? reservednames.contains(currentName) : false)) {
 					throw new CoreException(new Status(IStatus.ERROR,
 														 DebugUIPlugin.getUniqueIdentifier(),
 														 0,
@@ -1278,7 +1277,7 @@ public class LaunchConfigurationTabGroupViewer {
 		fDisposingTabs = true;
         fTabFolder.dispose();
         fTabFolder = null;
-		createTabFolder(fTabComposite);
+		createTabFolder(fGroupComposite);
 		disposeTabGroup();
 		fDisposingTabs = false;
 	}	
@@ -1323,20 +1322,23 @@ public class LaunchConfigurationTabGroupViewer {
 	 */
 	protected void handleNameModified() {
 		getWorkingCopy().rename(fNameWidget.getText().trim());
-		refreshStatus();
+		scheduleUpdateJob();
 	}		
 	
 	/**
-	 * Notification that the 'Apply' button has been pressed
+	 * Notification that the 'Apply' button has been pressed.
+	 * 
+	 * @return the saved launch configuration or <code>null</code> if not saved
 	 */
-	protected boolean handleApplyPressed() {
+	protected ILaunchConfiguration handleApplyPressed() {
 		if(fOriginal != null && fOriginal.isReadOnly()) {
 			IStatus status = ResourcesPlugin.getWorkspace().validateEdit(new IFile[] {fOriginal.getFile()}, fViewerControl.getShell());
 			if(!status.isOK()) {
-				return false;
+				return null;
 			}
 		}
 		Exception exception = null;
+		final ILaunchConfiguration[] saved = new ILaunchConfiguration[1];
 		try {
 			// update launch config
 			fInitializingTabs = true;
@@ -1353,7 +1355,7 @@ public class LaunchConfigurationTabGroupViewer {
 					IRunnableWithProgress runnable = new IRunnableWithProgress() {
 						public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
 							try {
-								fOriginal = ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor);
+								saved[0] = ((LaunchConfigurationWorkingCopy)fWorkingCopy).doSave(monitor);
 							} 
 							catch (CoreException e) {DebugUIPlugin.log(e);}
 						}
@@ -1361,7 +1363,7 @@ public class LaunchConfigurationTabGroupViewer {
 					getLaunchConfigurationDialog().run(true, false, runnable);
 				}
 				else {
-					fOriginal = fWorkingCopy.doSave();
+					saved[0] = fWorkingCopy.doSave();
 				}
 			}
 			updateButtons();
@@ -1372,9 +1374,9 @@ public class LaunchConfigurationTabGroupViewer {
 		catch (InterruptedException e) {exception = e;} 
 		if(exception != null) {
 			DebugUIPlugin.errorDialog(getShell(), LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configuration_Error_46, LaunchConfigurationsMessages.LaunchConfigurationDialog_Exception_occurred_while_saving_launch_configuration_47, exception); // 
-			return false;
+			return null;
 		} else {
-			return true;
+			return saved[0];
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
index bd96853..4aaa188 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -273,6 +273,7 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
         TreeViewer viewer = getTreeViewer();
         if (viewer != null) {
 			try {
+				viewer.getControl().setRedraw(false);
                 viewer.add(configuration.getType(), configuration);
                 // if moved, remove original now
                 if (from != null) {
@@ -284,6 +285,9 @@ public class LaunchConfigurationView extends AbstractDebugView implements ILaunc
                 updateFilterLabel();
 			} 
 			catch (CoreException e) {}
+			finally {
+				viewer.getControl().setRedraw(true);
+			}
         }
     }
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 336ecdd..e779dd5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,27 +16,32 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Set;
 
+import com.ibm.icu.text.MessageFormat;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.TreeItem;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.IStatusHandler;
-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
-import org.eclipse.debug.internal.core.LaunchManager;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.debug.ui.ILaunchConfigurationDialog;
-import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
+
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.Separator;
@@ -60,27 +65,29 @@ import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.jface.wizard.ProgressMonitorPart;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.ViewForm;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.TreeItem;
+
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.progress.WorkbenchJob;
 
-import com.ibm.icu.text.MessageFormat;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.core.LaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.core.LaunchManager;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.IDebugView;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
  
 /**
  * The dialog used to edit and launch launch configurations.
@@ -120,7 +127,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * Constant specifying how tall this dialog is allowed to get (as a percentage of
 	 * total available screen height) as a result of preferred tab size.
 	 */
-	protected static final float MAX_DIALOG_HEIGHT_PERCENT = 0.60f;
+	protected static final float MAX_DIALOG_HEIGHT_PERCENT = 0.65f;
 	/**
 	 * Size of this dialog if there is no preference specifying a size.
 	 */
@@ -136,7 +143,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 */
 	public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED = 2;
 	/**
-	 * Constant specifying that this dialog should be opened with the value specified via 
+	 * Constant specifying that this dialog should be opened with the value specified via
 	 * <code>setInitialSelection()</code> selected.
 	 */
 	public static final int LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION = 3;
@@ -151,7 +158,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 */
 	private static final String DELIMITER = ", "; //$NON-NLS-1$
 	/**
-	 * Specifies how this dialog behaves when opened.  Value is one of the 
+	 * Specifies how this dialog behaves when opened.  Value is one of the
 	 * 'LAUNCH_CONFIGURATION_DIALOG' constants defined in this class.
 	 */
 	private int fOpenMode = LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED;
@@ -186,7 +193,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	private SashForm fSashForm;
 	private LaunchConfigurationView fLaunchConfigurationView;
 	private LaunchConfigurationTabGroupViewer fTabViewer;
-	private Button fProgressMonitorCancelButton;	
 	private ProgressMonitorPart fProgressMonitorPart;
 	private LaunchGroupExtension fGroup;
 	private Image fBannerImage;
@@ -204,7 +210,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	
 	/**
 	 * The number of 'long-running' operations currently taking place in this dialog
-	 */	
+	 */
 	private long fActiveRunningOperations = 0;
 
 	/**
@@ -227,6 +233,17 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	protected Set fReservedNames = null;
 	
 	/**
+	 * Whether to set default values when opened
+	 * @since 3.6
+	 */
+	private boolean fSetDefaultOnOpen = false;
+	
+	/**
+	 * Whether in the process of setting the input to the tab viewer
+	 */
+	private boolean fSettingInput = false;
+	
+	/**
 	 * Constructs a new launch configuration dialog on the given
 	 * parent shell.
 	 * 
@@ -238,7 +255,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		setShellStyle(getShellStyle() | SWT.RESIZE);
 		setLaunchGroup(group);
 	}
-
+	
 	/**
 	 * Adds content to the dialog area
 	 * 
@@ -254,9 +271,9 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		topLayout.marginWidth = 5;
 		topComp.setLayout(topLayout);
 		
-		// Set the things that TitleAreaDialog takes care of 
-		setTitle(LaunchConfigurationsMessages.LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8); 
-		setMessage(LaunchConfigurationsMessages.LaunchConfigurationDialog_Ready_to_launch_2); 
+		// Set the things that TitleAreaDialog takes care of
+		setTitle(LaunchConfigurationsMessages.LaunchConfigurationDialog_Create__manage__and_run_launch_configurations_8);
+		setMessage(LaunchConfigurationsMessages.LaunchConfigurationDialog_Ready_to_launch_2);
 		setModeLabelState();
 		
 		// Create the SashForm that contains the selection area on the left,
@@ -293,10 +310,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	protected void buttonPressed(int buttonId) {
 		if (buttonId == ID_LAUNCH_BUTTON) {
 			handleLaunchPressed();
-		} 
+		}
 		else if (buttonId == ID_CLOSE_BUTTON) {
 			handleClosePressed();
-		} 
+		}
 		else {
 			super.buttonPressed(buttonId);
 		}
@@ -308,7 +325,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * 
 	 * @return if we can discard the current config or not
 	 */
-	protected int shouldSaveCurrentConfig() {				
+	protected int shouldSaveCurrentConfig() {
 		if (fTabViewer.isDirty()) {
 			if (fTabViewer.canSave()) {
 				return showSaveChangesDialog();
@@ -354,7 +371,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		super.create();
 		if (fTabViewer.getInput() == null) {
 			fTabViewer.inputChanged(null);
-		}	
+		}
 	}
 	
 	/* (non-Javadoc)
@@ -383,11 +400,9 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		monitorComposite.setLayout(layout);
 		monitorComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		GridLayout pmLayout = new GridLayout();
-		fProgressMonitorPart = new ProgressMonitorPart(monitorComposite, pmLayout);
+		fProgressMonitorPart= new ProgressMonitorPart(monitorComposite, pmLayout, true);
 		fProgressMonitorPart.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		fProgressMonitorPart.setFont(font);
-		fProgressMonitorCancelButton = createButton(monitorComposite, ID_CANCEL_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Cancel_3, true);
-		fProgressMonitorCancelButton.setFont(font);
 		monitorComposite.setVisible(false);
 
 		/*
@@ -414,7 +429,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	protected void createButtonsForButtonBar(Composite parent) {
 		Button button = createButton(parent, ID_LAUNCH_BUTTON, getLaunchButtonText(), true);
         button.setEnabled(false);
-		createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);  
+		createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);
 	}
 	
 	/* (non-Javadoc)
@@ -446,7 +461,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * that are applicable to the launch configuration.
 	 * 
 	 * @return the composite used for launch configuration editing
-	 */ 
+	 */
 	protected Composite createLaunchConfigurationEditArea(Composite parent) {
 		setTabViewer(new LaunchConfigurationTabGroupViewer(parent, this));
 		return (Composite)fTabViewer.getControl();
@@ -475,7 +490,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * delete and duplicate existing configurations.
 	 * 
 	 * @return the composite used for launch configuration selection area
-	 */ 
+	 */
 	protected Control createLaunchConfigurationSelectionArea(Composite parent) {
         Composite comp = new Composite(parent, SWT.FLAT);
         GridLayout gridLayout = new GridLayout(1, false);
@@ -485,9 +500,9 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
         comp.setLayoutData(new GridData(GridData.FILL_BOTH));
         
         ViewForm viewForm = new ViewForm(comp, SWT.FLAT | SWT.BORDER);
-        ToolBar toolBar = new ToolBar(viewForm, SWT.FLAT);
+        ToolBarManager toolBarManager= new ToolBarManager(SWT.FLAT);
+        ToolBar toolBar = toolBarManager.createControl(viewForm);
         toolBar.setBackground(parent.getBackground());
-        ToolBarManager toolBarManager= new ToolBarManager(toolBar);
         viewForm.setTopLeft(toolBar);
         viewForm.setLayoutData(new GridData(GridData.FILL_BOTH));
         
@@ -548,7 +563,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			}
 		});
 		return comp;
-	}	
+	}
 
 	/**
 	 * Create the filters to be initially applied to the viewer.
@@ -575,14 +590,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			filters.add(fWorkingSetsFilter);
 		}
 		return (ViewerFilter[]) filters.toArray(new ViewerFilter[filters.size()]);
-	} 
+	}
 	
 	/**
 	 * Set the initial selection in the tree.
 	 */
 	public void doInitialTreeSelection() {
 		fLaunchConfigurationView.getViewer().setSelection(fInitialSelection);
-	}	
+	}
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#generateName(java.lang.String)
@@ -591,11 +606,11 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		if (name == null) {
 			name = IInternalDebugCoreConstants.EMPTY_STRING;
 		}
-		return getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name);
+		return getLaunchManager().generateLaunchConfigurationName(name);
 	}
 	
 	/**
-	 * Generates and returns a unique name using the specified name as a prefix in the event 
+	 * Generates and returns a unique name using the specified name as a prefix in the event
 	 * the specified name already exists or is contained in the set of reserved names.
 	 * @param name the name to use as a prefix for generating a new name
 	 * @param reservednames a listing of names that should be considered as 'taken' and cannot be generated
@@ -623,10 +638,10 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 */
 	protected Image getBannerImage() {
 		if (fBannerImage == null) {
-			ImageDescriptor descriptor = getLaunchGroup().getBannerImageDescriptor(); 
+			ImageDescriptor descriptor = getLaunchGroup().getBannerImageDescriptor();
 			if (descriptor != null) {
 				fBannerImage = descriptor.createImage();
-			} 		
+			}
 		}
 		return fBannerImage;
 	}
@@ -666,6 +681,13 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
     	return getDialogSettings();
     }
     
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsStrategy()
+     */
+    protected int getDialogBoundsStrategy() {
+    	return DIALOG_PERSISTSIZE;
+    }
+    
 	/**
 	 * Returns the dialog settings for this dialog. Subclasses should override
 	 * <code>getDialogSettingsSectionName()</code>.
@@ -677,7 +699,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		IDialogSettings section = settings.getSection(getDialogSettingsSectionName());
 		if (section == null) {
 			section = settings.addNewSection(getDialogSettingsSectionName());
-		} 
+		}
 		return section;
 	}
 
@@ -688,7 +710,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 */
 	protected String getDialogSettingsSectionName() {
 		return IDebugUIConstants.PLUGIN_ID + ".LAUNCH_CONFIGURATIONS_DIALOG_SECTION"; //$NON-NLS-1$
-	}	
+	}
 		
 	/**
 	 * Gets the current display
@@ -699,7 +721,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		Shell shell = getShell();
 		if (shell != null) {
 			return shell.getDisplay();
-		} 
+		}
 		return DebugUIPlugin.getStandardDisplay();
 	}
   	
@@ -762,7 +784,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
  	 */
  	public String getMode() {
  		return getLaunchGroup().getMode();
- 	} 	
+ 	}
  	
 	/**
 	 * Gets the new menu action
@@ -809,7 +831,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			 title = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationsDialog_configurations, new String[] {DebugUIPlugin.removeAccelerators(getLaunchGroup().getLabel())});
 		}
 		if (title == null) {
-			title = LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configurations_18; 
+			title = LaunchConfigurationsMessages.LaunchConfigurationDialog_Launch_Configurations_18;
 		}
 		return title;
 	}
@@ -832,7 +854,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
  	public ILaunchConfigurationTab[] getTabs() {
  		if (getTabGroup() == null) {
  			return null;
- 		} 
+ 		}
  		return getTabGroup().getTabs();
  	}
 
@@ -894,36 +916,42 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			if (newInput instanceof ILaunchConfiguration) {
 				renamed = getLaunchManager().getMovedFrom((ILaunchConfiguration)newInput) != null;
 			}
- 			if (fTabViewer.canSave() && fTabViewer.isDirty() && !deleted && !renamed) {
- 				if(fLaunchConfigurationView != null) {
- 					fLaunchConfigurationView.setAutoSelect(false);
- 				}
- 				int ret = showUnsavedChangesDialog();
- 				if(ret == IDialogConstants.YES_ID) {
- 					fTabViewer.handleApplyPressed();
- 					fTabViewer.setInput(newInput);
- 				}
-				else if(ret == IDialogConstants.NO_ID) {
-					fTabViewer.handleRevertPressed();
-					fTabViewer.setInput(newInput);
-				}
-				else {
-					fLaunchConfigurationView.getViewer().setSelection(new StructuredSelection(input));
-				}
- 				fLaunchConfigurationView.setAutoSelect(true);
-  			}
- 			else {
- 				fTabViewer.setInput(newInput);
- 				if(fTabViewer.isDirty()) {
- 					fTabViewer.handleApplyPressed();
- 				}
- 				if (getShell() != null && getShell().isVisible()) {
-					resize();
- 				}
+			try {
+				fSettingInput = true;
+	 			if (fTabViewer.canSave() && fTabViewer.isDirty() && !deleted && !renamed) {
+	 				if(fLaunchConfigurationView != null) {
+	 					fLaunchConfigurationView.setAutoSelect(false);
+	 				}
+	 				int ret = showUnsavedChangesDialog();
+	 				if(ret == IDialogConstants.YES_ID) {
+	 					fTabViewer.handleApplyPressed();
+	 					fTabViewer.setInput(newInput);
+	 				}
+					else if(ret == IDialogConstants.NO_ID) {
+						fTabViewer.handleRevertPressed();
+						fTabViewer.setInput(newInput);
+					}
+					else {
+						fLaunchConfigurationView.getViewer().setSelection(new StructuredSelection(input));
+					}
+	 				fLaunchConfigurationView.setAutoSelect(true);
+	  			}
+	 			else {
+	 				fTabViewer.setInput(newInput);
+	 				if(fTabViewer.isDirty()) {
+	 					fTabViewer.handleApplyPressed();
+	 				}
+	 			}
+			} finally {
+				fSettingInput = false;
+				updateButtons();
+			}
+ 			if(getShell() != null && getShell().isVisible()) {
+ 				resize();
  			}
  		}
   	}
-	
+ 	
 	/**
 	 * Notification the 'launch' button has been pressed.
 	 * Save and launch.
@@ -931,9 +959,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	protected void handleLaunchPressed() {
 		ILaunchConfiguration config = fTabViewer.getOriginal();
 		if (fTabViewer.isDirty() && fTabViewer.canSave()) {
-			if (fTabViewer.handleApplyPressed())
-				config = fTabViewer.getOriginal();
-			else config = null;
+			config = fTabViewer.handleApplyPressed();
 		}
 		if(config != null) {
 			close();
@@ -947,26 +973,26 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * 
 	 * @param status the status to be handled
 	 */
-	public void handleStatus(IStatus status) {		
+	public void handleStatus(IStatus status) {
 		IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(status);
 		if (handler != null) {
 			try {
 				handler.handleStatus(status, this);
 				return;
-			} 
-			catch (CoreException e) {status = e.getStatus();} 
+			}
+			catch (CoreException e) {status = e.getStatus();}
 		}
 		// if no handler, or handler failed, display error/warning dialog
 		String title = null;
 		switch (status.getSeverity()) {
 			case IStatus.ERROR:
-				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Error_1; 
+				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Error_1;
 				break;
 			case IStatus.WARNING:
-				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Warning_2; 
+				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Warning_2;
 				break;
 			default:
-				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Information_3; 
+				title = LaunchConfigurationsMessages.LaunchConfigurationsDialog_Information_3;
 				break;
 		}
 		ErrorDialog.openError(getShell(), title, null, status);
@@ -981,7 +1007,13 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			int w1, w2;
 			try {
 				w1 = settings.getInt(DIALOG_SASH_WEIGHTS_1);
+				if(w1 < 10) {
+					w1 = DEFAULT_SASH_WEIGHTS[0];
+				}
 				w2 = settings.getInt(DIALOG_SASH_WEIGHTS_2);
+				if(w2 < 10) {
+					w2 = DEFAULT_SASH_WEIGHTS[1];
+				}
 			}
 			catch(NumberFormatException nfe) {
 				w1 = DEFAULT_SASH_WEIGHTS[0];
@@ -996,18 +1028,55 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize()
 	 */
 	protected Point getInitialSize() {
-		IDialogSettings settings = getDialogSettings();
-		if(settings.get(DIALOG_SASH_WEIGHTS_1) != null) {
+		try {
+			getDialogSettings().getInt("DIALOG_HEIGHT"); //$NON-NLS-1$
 			return super.getInitialSize();
 		}
-		return DEFAULT_INITIAL_DIALOG_SIZE;
+		catch(NumberFormatException nfe) {
+			return DEFAULT_INITIAL_DIALOG_SIZE;
+		}
 	}
 
 	/**
+	 * Sets the default values for the given {@link LaunchConfigurationWorkingCopy}
+	 * @param wc
+	 * @since 3.6
+	 */
+	protected void doSetDefaults(ILaunchConfigurationWorkingCopy wc) {
+		try {
+			ILaunchConfigurationTabGroup tabGroup = LaunchConfigurationPresentationManager.getDefault().getTabGroup(wc, getMode());
+			// this only works because this action is only present when the dialog is open
+			ILaunchConfigurationDialog dialog = LaunchConfigurationsDialog.getCurrentlyVisibleLaunchConfigurationDialog();
+			tabGroup.createTabs(dialog, dialog.getMode());
+			ILaunchConfigurationTab[] tabs = tabGroup.getTabs();
+			for (int i = 0; i < tabs.length; i++) {
+				tabs[i].setLaunchConfigurationDialog(dialog);
+			}
+			tabGroup.setDefaults(wc);
+			tabGroup.dispose();
+		} catch (CoreException e) {
+			DebugUIPlugin.log(e.getStatus());
+		}
+	}
+	
+	/**
 	 * Performs initialization of the content by setting the initial tree selection
 	 */
 	protected void initializeContent() {
+		if(fSetDefaultOnOpen) {
+			try {
+				Object o = fInitialSelection.getFirstElement();
+				if(o instanceof ILaunchConfigurationWorkingCopy) {
+					ILaunchConfigurationWorkingCopy wc = (ILaunchConfigurationWorkingCopy) o;
+					doSetDefaults(wc);
+					setInitialSelection(new StructuredSelection(wc.doSave()));
+				}
+			} catch (CoreException e) {
+				DebugUIPlugin.log(e);
+			}
+		}
 		doInitialTreeSelection();
+		
 		IStatus status = getInitialStatus();
 		if (status != null) {
 			handleStatus(status);
@@ -1053,14 +1122,14 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * @see org.eclipse.jface.window.Window#open()
 	 * @return the int status of opening the dialog
 	 */
-	public int open() {		
+	public int open() {
 		int mode = getOpenMode();
-		setCurrentlyVisibleLaunchConfigurationDialog(this);	
+		setCurrentlyVisibleLaunchConfigurationDialog(this);
 		if (mode == LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_LAST_LAUNCHED) {
 			ILaunchConfiguration lastLaunchedConfig = getLastLaunchedWorkbenchConfiguration();
 			if (lastLaunchedConfig != null) {
 				setInitialSelection(new StructuredSelection(lastLaunchedConfig));
-			}			
+			}
 		}
 		return super.open();
 	}
@@ -1078,7 +1147,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 				value = IInternalDebugCoreConstants.EMPTY_STRING;
 			}
 			ArrayList list = new ArrayList();
-			String[] persisted = value.split(DELIMITER); 
+			String[] persisted = value.split(DELIMITER);
 			for(int i = 0; i < persisted.length; i++) {
 				list.add(persisted[i]);
 			}
@@ -1124,8 +1193,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 					else if(obj instanceof ILaunchConfiguration) {
 						try {
 							toexpand.add(((ILaunchConfiguration) obj).getType());
-						} 
-						catch (CoreException e) {DebugUIPlugin.log(e);}					
+						}
+						catch (CoreException e) {DebugUIPlugin.log(e);}
 					}
 				}
 				for(int i = 0; i < nodes.length; i++) {
@@ -1148,8 +1217,8 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 		IDialogSettings settings = getDialogSettings();
 		if (fSashForm != null) {
 			int[] sashWeights = fSashForm.getWeights();
-			settings.put(DIALOG_SASH_WEIGHTS_1, sashWeights[0]);
-			settings.put(DIALOG_SASH_WEIGHTS_2, sashWeights[1]);
+			settings.put(DIALOG_SASH_WEIGHTS_1, (sashWeights[0] < 10 ? DEFAULT_SASH_WEIGHTS[0] : sashWeights[0]));
+			settings.put(DIALOG_SASH_WEIGHTS_2, (sashWeights[1] < 10 ? DEFAULT_SASH_WEIGHTS[1] : sashWeights[1]));
 		}
 	}
 	
@@ -1162,11 +1231,11 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	}
 
 	/**
-	 * resize the dialog to show all relevant content, maintains aspect in all resolutions down to 1024x768
+	 * resize the dialog to show all relevant content
 	 */
 	protected void resize() {
  		if(getTabGroup() != null) {
- 			Point shell = getShell().getSize();
+			Point shell = getShell().getSize();
  			int maxx = (int)(getDisplay().getBounds().width * MAX_DIALOG_WIDTH_PERCENT),
 				maxy = (int) (getDisplay().getBounds().height * MAX_DIALOG_HEIGHT_PERCENT);
  			maxx = (maxx < DEFAULT_INITIAL_DIALOG_SIZE.x ? DEFAULT_INITIAL_DIALOG_SIZE.x : maxx);
@@ -1174,6 +1243,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
  			Point psize = getShell().computeSize(SWT.DEFAULT, maxy);
  			if((psize.x > maxx ? maxx : psize.x) > shell.x || (psize.y > maxy ? maxy : psize.y) > shell.y) {
 				setShellSize(Math.min(psize.x, maxx), Math.min(psize.y, maxy));
+				constrainShellSize();
  			}
 		}
 	}
@@ -1188,14 +1258,12 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			if (fLastControl != null && fLastControl.getShell() != getShell()) {
 				fLastControl = null;
 			}
-			fProgressMonitorCancelButton.setEnabled(cancelable);
 			// Attach the progress monitor part to the cancel button
-			fProgressMonitorPart.attachToCancelComponent(fProgressMonitorCancelButton);
+			fProgressMonitorPart.attachToCancelComponent(null);
 			fProgressMonitorPart.getParent().setVisible(true);
-			fProgressMonitorCancelButton.setFocus();
 			fActiveRunningOperations++;
 			
-		//do work here collecting enabled states, otherwise to get these states we would need to 
+		//do work here collecting enabled states, otherwise to get these states we would need to
 		//perform the validation of the dialog again, which is expensive and would cause flashing of widgets.
 			Control[] children = ((Composite)fButtonComp.getChildren()[0]).getChildren();
 			boolean[] prev = new boolean[children.length+2];
@@ -1207,19 +1275,19 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 			try {
 				updateRunnnableControls(false, prev);
 				ModalContext.run(runnable, fork, fProgressMonitorPart, getShell().getDisplay());
-			} 
+			}
 			finally {
 				fActiveRunningOperations--;
 				updateRunnnableControls(true, prev);
 				if (getShell() != null) {
 					fProgressMonitorPart.getParent().setVisible(false);
-					fProgressMonitorPart.removeFromCancelComponent(fProgressMonitorCancelButton);
+					fProgressMonitorPart.removeFromCancelComponent(null);
 					if (fLastControl != null) {
 						fLastControl.setFocus();
 					}
 				}
 			}
-		} 
+		}
 		else {
 			PlatformUI.getWorkbench().getProgressService().run(fork, cancelable, runnable);
 		}
@@ -1258,7 +1326,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	}
 	
 	/**
-	 * Sets the initial selection for the dialog when opened in 
+	 * Sets the initial selection for the dialog when opened in
 	 * <code>LAUNCH_CONFIGURATION_DIALOG_OPEN_ON_SELECTION</code> mode.
 	 */
 	public void setInitialSelection(IStructuredSelection selection) {
@@ -1275,6 +1343,29 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	}
 	
 	/**
+	 * Sets whether the tab group should set default values in the launch configuration
+	 * when the dialog is opened. If this method is not called, default values are not
+	 * set.
+	 * 
+	 * @param setDefaults whether to set default values
+	 * @since 3.6
+	 */
+	public void setDefaultsOnOpen(boolean setDefaults) {
+		fSetDefaultOnOpen = setDefaults;
+	}
+	
+	/**
+	 * Returns if the dialog is supposed to be setting the default values for
+	 * the initial configuration when it opens
+	 * 
+	 * @return <code>true</code> if the defaults should be set on open, <code>false</code> otherwise
+	 * @since 3.6
+	 */
+	public boolean shouldSetDefaultsOnOpen() {
+		return fSetDefaultOnOpen;
+	}
+	
+	/**
 	 * Sets the launch group to display.
 	 * 
 	 * @param group launch group
@@ -1288,7 +1379,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 */
 	protected void setModeLabelState() {
 		setTitleImage(getBannerImage());
-	}		
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setName(java.lang.String)
@@ -1334,22 +1425,22 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	/**
 	 * Create and return a dialog that asks the user whether they want to discard
 	 * unsaved changes.
-	 *   
+	 * 
 	 * @return the return code based on the button selected.
 	 * The value will be one of <code>YES_ID</code> or <code>NO_ID</code> from
 	 * <code>IDialogConstants</code>.
 	 */
 	private int showDiscardChangesDialog() {
-		StringBuffer buffer = new StringBuffer(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___35, new String[]{fTabViewer.getWorkingCopy().getName()})); 
+		StringBuffer buffer = new StringBuffer(MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___35, new String[]{fTabViewer.getWorkingCopy().getName()}));
 		buffer.append(fTabViewer.getErrorMesssage());
-		buffer.append(LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_discard_changes_37); 
-		MessageDialog dialog = new MessageDialog(getShell(), 
-												 LaunchConfigurationsMessages.LaunchConfigurationDialog_Discard_changes__38, 
+		buffer.append(LaunchConfigurationsMessages.LaunchConfigurationDialog_Do_you_wish_to_discard_changes_37);
+		MessageDialog dialog = new MessageDialog(getShell(),
+												 LaunchConfigurationsMessages.LaunchConfigurationDialog_Discard_changes__38,
 												 null,
 												 buffer.toString(),
 												 MessageDialog.QUESTION,
-												 new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32, 
-															   LaunchConfigurationsMessages.LaunchConfigurationDialog_No_33},  
+												 new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32,
+															   LaunchConfigurationsMessages.LaunchConfigurationDialog_No_33},
 												 1);
 		int val = IDialogConstants.NO_ID;
 		if (dialog.open() == 0) {
@@ -1370,29 +1461,29 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 
 	/**
 	 * Create and return a dialog that asks the user whether they want to save
-	 * unsaved changes.  
+	 * unsaved changes.
 	 * 
 	 * @return the return code based on the button selected.
 	 * The value will be one of <code>YES_ID</code>, <code>NO_ID</code>, or <code>CANCEL_ID</code>, from
 	 * <code>IDialogConstants</code>.
 	 */
 	private int showSaveChangesDialog() {
-		String message = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___29, new String[]{fTabViewer.getWorkingCopy().getName()}); 
-		MessageDialog dialog = new MessageDialog(getShell(), 
-												 LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_save_changes, 
+		String message = MessageFormat.format(LaunchConfigurationsMessages.LaunchConfigurationDialog_The_configuration___29, new String[]{fTabViewer.getWorkingCopy().getName()});
+		MessageDialog dialog = new MessageDialog(getShell(),
+												 LaunchConfigurationsMessages.LaunchConfigurationFilteredTree_save_changes,
 												 null,
 												 message,
 												 MessageDialog.QUESTION,
-												 new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32, 
+												 new String[] {LaunchConfigurationsMessages.LaunchConfigurationDialog_Yes_32,
 															   LaunchConfigurationsMessages.LaunchConfigurationDialog_No_33,
-															   LaunchConfigurationsMessages.LaunchConfigurationsDialog_c_ancel},  
+															   LaunchConfigurationsMessages.LaunchConfigurationsDialog_c_ancel},
 												 0);
 		int ret = dialog.open();
 		int val = IDialogConstants.CANCEL_ID;
 		if (ret == 0 || ret == 1) {
 			if (ret == 0) {
 				val = IDialogConstants.YES_ID;
-			} 
+			}
 			else {
 				val = IDialogConstants.NO_ID;
 			}
@@ -1419,20 +1510,26 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#updateButtons()
 	 */
 	public void updateButtons() {
-		// New, Delete, & Duplicate toolbar actions
- 		getNewAction().setEnabled(getNewAction().isEnabled());
-		getDeleteAction().setEnabled(getDeleteAction().isEnabled());
-		getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
-		fTabViewer.refresh();
-		getButton(ID_LAUNCH_BUTTON).setEnabled(fTabViewer.canLaunch() & fTabViewer.canLaunchWithModes() & !fTabViewer.hasDuplicateDelegates());
+		if (!fSettingInput) {
+			// New, Delete, & Duplicate toolbar actions
+	 		getNewAction().setEnabled(getNewAction().isEnabled());
+			getDeleteAction().setEnabled(getDeleteAction().isEnabled());
+			getDuplicateAction().setEnabled(getDuplicateAction().isEnabled());
+			fTabViewer.refresh();
+			getButton(ID_LAUNCH_BUTTON).setEnabled(fTabViewer.canLaunch() & fTabViewer.canLaunchWithModes() & !fTabViewer.hasDuplicateDelegates());
+		} else {
+			fTabViewer.refresh();
+		}
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#updateMessage()
 	 */
 	public void updateMessage() {
-		setErrorMessage(fTabViewer.getErrorMesssage());
-		setMessage(fTabViewer.getMessage());	
+		if (!fSettingInput) {
+			setErrorMessage(fTabViewer.getErrorMesssage());
+			setMessage(fTabViewer.getMessage());
+		}
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
index 14d1911..71bac4e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java
@@ -116,6 +116,8 @@ public class LaunchConfigurationsMessages extends NLS {
 	public static String PerspectiveManager_Unable_to_switch_perpsectives_as_specified_by_launch___0__4;
 	public static String PerspectiveManager_Unable_to_switch_to_perspective___0__2;
 
+	public static String LaunchConfigurationPresentationManager_0;
+
 	public static String LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1;
 	public static String LaunchConfigurationPropertiesDialog_Properties_for__0__2;
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
index 900779b..00fc2d5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ CommonTab_12=&Workspace...
 CommonTab_13=Select a Resource:
 CommonTab_14=Select a resource to redirect output to:
 CommonTab_0=Save as
-CommonTab_1=Console Encoding
+CommonTab_1=Encoding
 CommonTab_2=Defa&ult - inherited ({0})
 CommonTab_3=Oth&er
 CommonTab_4=Standard Input and Output
@@ -128,6 +128,7 @@ LaunchShortcutSelectionDialog_3=Description not available
 # or any label of a contributed ILaunchMode.
 LaunchShortcutSelectionDialog_4=&Select what to {0}:
 
+LaunchConfigurationPresentationManager_0=Tab group extension: {0} for type {1} for the {2} mode has been replaced by extension: {3}
 LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1=Edit launch configuration properties
 LaunchConfigurationPropertiesDialog_Properties_for__0__2=Edit Configuration
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
index 4657cdc..307b091 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -344,26 +344,31 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
 	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
 	 */
 	public void launchConfigurationAdded(ILaunchConfiguration configuration) {
-		checkFavorites(configuration);
+		ILaunchConfiguration movedFrom = DebugPlugin.getDefault().getLaunchManager().getMovedFrom(configuration);
+		// if this is a move, the launchConfigurationRemoved(...) method will handle updates
+		if (movedFrom == null) {
+			checkFavorites(configuration);
+		}
 	}
 	
 	/**
-	 * This method checks if the specified <code>ILaunchConfiguration</code> is a favorite of the launch group 
-	 * with the specified id
+	 * This method checks if the specified <code>ILaunchConfiguration</code> is a favorite in this
+	 * history's launch group.
+	 * 
 	 * @param configuration
-	 * @param launchgroup
-	 * @return true if the configuration is a favorite of the launch group with the given id, false otherwise
+	 * @return true if the configuration is a favorite in this history's launch group, false otherwise
 	 * @throws CoreException
 	 * 
 	 * @since 3.4
 	 */
-	protected boolean isFavorite(ILaunchConfiguration configuration, String launchgroup) throws CoreException {
+	protected boolean isFavorite(ILaunchConfiguration configuration) throws CoreException {
+		String groupId = getLaunchGroup().getIdentifier();
 		List favoriteGroups = configuration.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
 		if (favoriteGroups == null) {
 			// check deprecated attributes for backwards compatibility
-			if (launchgroup.equals(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP)) {
+			if (groupId.equals(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP)) {
 				return configuration.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false);
-			} else if (launchgroup.equals(IDebugUIConstants.ID_RUN_LAUNCH_GROUP)) {
+			} else if (groupId.equals(IDebugUIConstants.ID_RUN_LAUNCH_GROUP)) {
 				return configuration.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);
 			} 
 		} 
@@ -386,28 +391,10 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
 			return false;
 		}
 		try {
-			List favoriteGroups = configuration.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, (List)null);
-			if (favoriteGroups == null) {
-				// check deprecated attributes for backwards compatibility
-				String groupId = getLaunchGroup().getIdentifier();
-				boolean fav = false;
-				if (groupId.equals(IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP)) {
-					fav = configuration.getAttribute(IDebugUIConstants.ATTR_DEBUG_FAVORITE, false);
-				} else if (groupId.equals(IDebugUIConstants.ID_RUN_LAUNCH_GROUP)) {
-					fav = configuration.getAttribute(IDebugUIConstants.ATTR_RUN_FAVORITE, false);
-				}
-				if (fav) {
-					addFavorite(configuration);
-					return true;
-				} 
-				removeFavorite(configuration);
-				return false;
-			} 
-			else if (favoriteGroups.contains(getLaunchGroup().getIdentifier())) {
+			if (isFavorite(configuration)) {
 				addFavorite(configuration);
 				return true;
-			} 
-			else {
+			} else {
 				removeFavorite(configuration);
 				return false;
 			}
@@ -441,7 +428,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe
 	public synchronized void removeFromHistory(ILaunchConfiguration configuration) {
 		try {
 			boolean removed = fCompleteHistory.remove(configuration);
-			if(isFavorite(configuration, getLaunchGroup().getIdentifier())) {
+			if(isFavorite(configuration)) {
 				removed |= fFavorites.remove(configuration);
 			}
 			if(removed) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
index ded997b..259883a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Martin Oberhuber (Wind River) - [325557] Perspective "none" is not persisted
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.launchConfigurations;
 
@@ -877,21 +878,28 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
 		Element element = null;
 		Set modes = null;
 		String id = null;
+		ILaunchConfigurationType type = null;
 		ILaunchDelegate delegate = null;
 		for(Iterator iter = fPerspectiveContexts.iterator(); iter.hasNext();) {
 			context = (PerspectiveContext) iter.next();
 			modesets = context.getPersepctiveMap();
+			type = context.getLaunchConfigurationType();
+			delegate = context.getLaunchDelegate();
 			for(Iterator iter2 = modesets.keySet().iterator(); iter2.hasNext();) {
 				modes = (Set) iter2.next();
 				id = context.getPerspective(modes);
-				if(id != null) {
+				String defaultId = getDefaultLaunchPerspective(type, delegate, modes);
+				if(id == null && defaultId != null) {
+					//bug 325557: Override of a default perspective
+					id = IDebugUIConstants.PERSPECTIVE_NONE;
+				}
+				if(id != null && !id.equals(defaultId)) {
 					element = doc.createElement(IConfigurationElementConstants.LAUNCH_PERSPECTIVE);
 					element.setAttribute(IConfigurationElementConstants.MODE, createModesetString(modes));
-					delegate = context.getLaunchDelegate();
 					if(delegate != null) {
 						element.setAttribute(ATTR_DELEGATE_ID, delegate.getId());
 					}
-					element.setAttribute(IConfigurationElementConstants.CONFIGURATION_TYPES, context.getLaunchConfigurationType().getIdentifier());
+					element.setAttribute(IConfigurationElementConstants.CONFIGURATION_TYPES, type.getIdentifier());
 					element.setAttribute(IConfigurationElementConstants.PERSPECTIVE, id);
 					root.appendChild(element);
 				}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
index 7b68b3f..781c363 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/AbstractAsyncTableRendering.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,9 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Teodor Madan (Freescale) -  Bug 292360 -  [Memory View] platform renderings do not implement correctly IMemoryRendering#getControl
+ *     Teodor Madan (Freescale) -  Bug 292426 -  [Memory View] platform renderings cannot be repositioned from non-UI thread through calls to IRepositionableMemoryRendering#goToAddress 
+ *     Teodor Madan (Freescale) & Jeremiah Swan (IBM) - Bug 300036 -  [Memory View] NPE in AbstractAsyncTableRendering#getSelectedAddress on rendering creation
  *******************************************************************************/
 
 package org.eclipse.debug.internal.ui.memory.provisional;
@@ -549,6 +552,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * @see org.eclipse.debug.ui.memory.IResettableMemoryRendering#resetRendering()
 	 */
 	public void resetRendering() throws DebugException {
+		if (!fIsCreated)
+			return;
+
 		BigInteger baseAddress = fContentDescriptor.getContentBaseAddress();
 
 		fTableViewer.setSelection(baseAddress);
@@ -981,7 +987,7 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * @see org.eclipse.debug.ui.memory.IMemoryRendering#getControl()
 	 */
 	public Control getControl() {
-		return fPageBook.getParent();
+		return fPageBook;
 	}
 
 	/* (non-Javadoc)
@@ -1874,6 +1880,10 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 			fTableViewer.dispose();
 		}
 		
+		if (fPresentationContext != null) {
+		    fPresentationContext.dispose();
+		}
+		
 		if (!fToolTipShell.isDisposed())
 		{
 			fToolTipShell.dispose();
@@ -2053,6 +2063,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * @return the currently selected address in this rendering
 	 */
 	public BigInteger getSelectedAddress() {
+		if (!fIsCreated)
+			return null;
+		
 		Object key = fTableViewer.getSelectionKey();
 		
 		if (key != null && key instanceof BigInteger)
@@ -2132,61 +2145,67 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * @param address address to position cursor at
 	 * @throws DebugException if an exception occurs
 	 */
-	public void goToAddress(BigInteger address) throws DebugException {
+	public void goToAddress(final BigInteger address) throws DebugException {
 		
-		if (fTableViewer.getVirtualContentModel() == null)
+		if (!fIsCreated  || fTableViewer.getVirtualContentModel() == null)
 			return;
-		
-		int i = fTableViewer.getVirtualContentModel().indexOfKey(address);
 
-		if (i >= 0)
-		{	
-			// address is within range, set cursor and reveal
-			fTableViewer.setSelection(address);
-			updateSyncTopAddress(getTopVisibleAddress());
-			updateSyncSelectedAddress(address);
-		}
-		else
-		{
+		final int keyIndex = fTableViewer.getVirtualContentModel().indexOfKey(address);
+
+		if (keyIndex < 0) {
 			// if not extended memory block
 			// do not allow user to go to an address that's out of range
 			if (!(getMemoryBlock() instanceof IMemoryBlockExtension))
 			{
 				Status stat = new Status(
-				 IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
-				 DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null  
+						IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
+						DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null  
 				);
 				DebugException e = new DebugException(stat);
 				throw e;
 			}
-
+	
 			BigInteger startAdd = fContentDescriptor.getStartAddress();
 			BigInteger endAdd = fContentDescriptor.getEndAddress();
-			
+	
 			if (address.compareTo(startAdd) < 0 ||
-				address.compareTo(endAdd) > 0)
+					address.compareTo(endAdd) > 0)
 			{
 				Status stat = new Status(
-				 IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
-				 DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null  
+						IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(),
+						DebugException.NOT_SUPPORTED, DebugUIMessages.AbstractTableRendering_11, null  
 				);
 				DebugException e = new DebugException(stat);
 				throw e;
 			}
-	
-			// load at the address
-			fTableViewer.setSelection(address);
-			reloadTable(address);
-	
-			updateSyncSelectedAddress(address);
-
-			if (!isDynamicLoad())
-			{						
-				updateSyncPageStartAddress(address);
-			}
-			
-			updateSyncTopAddress(address);
 		}
+		
+		Runnable runnable = new Runnable(){
+			public void run() {
+				showTable();
+				if (keyIndex >=0)
+				{	
+					// address is within range, set cursor and reveal
+					fTableViewer.setSelection(address);
+					updateSyncTopAddress(getTopVisibleAddress());
+					updateSyncSelectedAddress(address);
+				}
+				else
+				{
+					// load at the address
+					fTableViewer.setSelection(address);
+					reloadTable(address);
+
+					updateSyncSelectedAddress(address);
+					if (!isDynamicLoad())
+					{						
+						updateSyncPageStartAddress(address);
+					}
+					updateSyncTopAddress(address);
+				}
+			}
+		};
+		runOnUIThread(runnable);
 	}			
 	
 	/**
@@ -2194,6 +2213,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * Update labels in the memory rendering.
 	 */
 	public void refresh() {
+		if (!fIsCreated)
+			return;
+
 		fTableViewer.refresh();
 	}
 
@@ -2202,6 +2224,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 * Resize column to the preferred size.
 	 */
 	public void resizeColumnsToPreferredSize() {
+		if (!fIsCreated)
+			return;
+
 		fTableViewer.resizeColumnsToPreferredSize();
 		if (!fIsShowAddressColumn)
 		{
@@ -2223,6 +2248,9 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 	 */
 	public void updateLabels()
 	{
+		if (!fIsCreated)
+			return;
+
 		UIJob job = new UIJob("updateLabels"){ //$NON-NLS-1$
 
 			public IStatus runInUIThread(IProgressMonitor monitor) {
@@ -2380,8 +2408,11 @@ public abstract class AbstractAsyncTableRendering extends AbstractBaseTableRende
 		if (isMemoryBlockBaseAddressChanged())
 			return;
 
-		if(fTableViewer.getKey(0).equals(address))
-			return;
+		Object key = fTableViewer.getKey(0);
+		if(key != null) {
+			if(key.equals(address))
+				return;
+		}
 	
 		BigInteger start = fContentDescriptor.getStartAddress();
 		BigInteger end = fContentDescriptor.getEndAddress();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/MemoryViewPresentationContext.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/MemoryViewPresentationContext.java
index ade9791..2649243 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/MemoryViewPresentationContext.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/provisional/MemoryViewPresentationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.memory.provisional;
 
-import org.eclipse.debug.internal.ui.viewers.PartPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
 import org.eclipse.debug.ui.memory.IMemoryRendering;
 import org.eclipse.debug.ui.memory.IMemoryRenderingContainer;
 import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
@@ -24,7 +24,7 @@ import org.eclipse.debug.ui.memory.IMemoryRenderingSite;
  * @since 3.2
  *
  */
-public class MemoryViewPresentationContext extends PartPresentationContext  {
+public class MemoryViewPresentationContext extends PresentationContext  {
 
 	private IMemoryRenderingContainer fContainer;	
 	private IMemoryRendering fRendering;			
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java
new file mode 100644
index 0000000..7d0ac74
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java
@@ -0,0 +1,156 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.CompositeDebugImageDescriptor;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.model.IWorkbenchAdapter2;
+
+/**
+ * Breakpoint container label provider.
+ *
+ * @since 3.6
+ */
+public class BreakpointContainerLabelProvider extends DebugElementLabelProvider {
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
+	 */
+	protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
+		ImageDescriptor desc = super.getImageDescriptor(elementPath, presentationContext, columnId);		
+		int flags = computeAdornmentFlags();
+		
+        if (flags > 0) {
+        	Image image = DebugUIPlugin.getImageDescriptorRegistry().get(desc);        	
+            CompositeDebugImageDescriptor compDesc = new CompositeDebugImageDescriptor(image, flags);
+            return compDesc;
+        }
+        return desc;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
+		Object lastSegment = path.getLastSegment();
+        if (lastSegment instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) lastSegment;
+            IBreakpoint[] breakpoints = container.getBreakpoints();
+            for (int i = 0; i < breakpoints.length; ++i) {
+            	if (breakpoints[i].isEnabled()) return true;
+            }
+            
+            return false;
+        }
+        
+		return super.getChecked(path, presentationContext);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getGrayed(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	public boolean getGrayed(TreePath path, IPresentationContext presentationContext) throws CoreException {
+		Object lastSegment = path.getLastSegment();
+		if (lastSegment instanceof IBreakpointContainer) {
+			IBreakpointContainer container = (IBreakpointContainer) lastSegment;
+			IBreakpoint[] breakpoints = container.getBreakpoints();
+
+			// Return true, gray if some breakpoints are enabled and some are disabled.
+			// return false if all breakpoints are either disabled or all are enabled.
+			boolean hasEnabled = false;
+			boolean hasDisabled = false;
+
+			for (int i = 0; i < breakpoints.length; ++i) {
+				if (breakpoints[i].isEnabled()) {
+					hasEnabled = true;				
+				} else {
+					hasDisabled = true;
+				}
+				
+				if (hasEnabled && hasDisabled) {
+					return true;
+				}
+			}
+
+			return false;
+		}
+
+		return super.getGrayed(path, presentationContext);
+	}
+	
+	// Forward font data requests to the workbench adapter
+	protected FontData getFontData(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
+		Object element = elementPath.getLastSegment();
+		FontData fontData = super.getFontData(elementPath, presentationContext, columnId);
+		if (fontData == null && element instanceof IAdaptable) {
+			
+            IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) ((IAdaptable)element).getAdapter(IWorkbenchAdapter2.class);
+            if (adapter != null) {
+                fontData = adapter.getFont(element);
+            }
+		}
+		return fontData;
+	}
+
+	// Forward foreground color requests to the workbench adapter
+	protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
+		Object element = elementPath.getLastSegment();
+		RGB rgb = super.getForeground(elementPath, presentationContext, columnId);
+		if (rgb == null && element instanceof IAdaptable) {
+			
+            IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) ((IAdaptable)element).getAdapter(IWorkbenchAdapter2.class);
+            if (adapter != null) {
+            	rgb = adapter.getForeground(element);
+            }
+		}
+		return rgb;
+	}
+
+	// Forward background color requests to the workbench adapter
+	protected RGB getBackground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
+		Object element = elementPath.getLastSegment();
+		RGB rgb = super.getBackground(elementPath, presentationContext, columnId);
+		if (rgb == null && element instanceof IAdaptable) {
+			
+            IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) ((IAdaptable)element).getAdapter(IWorkbenchAdapter2.class);
+            if (adapter != null) {
+            	rgb = adapter.getBackground(element);
+            }
+		}
+		return rgb;
+	}
+
+	/**
+     * Computes and return common adornment flags for the given category.
+     * 
+     * @param element breakpoint category
+     * @return adornment flags defined in CompositeDebugImageDescriptor
+     */
+    private int computeAdornmentFlags() {
+        if (!DebugPlugin.getDefault().getBreakpointManager().isEnabled()) {
+            return CompositeDebugImageDescriptor.SKIP_BREAKPOINT;
+        }
+        return 0;
+    } 
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java
new file mode 100644
index 0000000..aaa5a05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java
@@ -0,0 +1,53 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * This class provides memento for the breakpoint container.
+ * 
+ * @since 3.6
+ */
+public class BreakpointContainerMementoProvider extends DebugElementMementoProvider {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected String getElementName(Object element, IPresentationContext context) throws CoreException {
+		if (element instanceof IBreakpointContainer) {
+			IBreakpointContainer container = (IBreakpointContainer) element;
+			IAdaptable category = container.getCategory();
+			if (category != null) {
+				IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
+				if (adapter != null) {
+					return adapter.getLabel(category);
+				}
+				return container.getOrganizer().getLabel();
+			}
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected boolean supportsContextId(String id) {
+		return IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java
new file mode 100644
index 0000000..c66ac4b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java
@@ -0,0 +1,46 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/**
+ *  Breakpoint content provider.
+ *  
+ *  @since 3.6
+ */
+public class BreakpointContentProvider extends ElementContentProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+	 */
+	protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+		return 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+	 */
+	protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
+	 */
+	protected boolean supportsContextId(String id) {
+		return id.equals(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
new file mode 100644
index 0000000..5e21aad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
@@ -0,0 +1,60 @@
+/*****************************************************************
+ * Copyright (c) 2009, 2010 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     Patrick Chuong (Texas Instruments) - bug fix 306768
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ * Breakpoint label provider.
+ * 
+ * @since 3.6
+ */
+public class BreakpointLabelProvider extends DebugElementLabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, int)
+	 */
+	protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
+		if (columnIndex == 0)
+			return super.getLabel(elementPath, presentationContext, columnId, columnIndex);
+		else
+			return IInternalDebugCoreConstants.EMPTY_STRING; 
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, int)
+	 */
+	protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
+		if (columnIndex == 0)
+			return super.getImageDescriptor(elementPath, presentationContext, columnId, columnIndex);
+		else
+			return null;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
+		Object lastSegment = path.getLastSegment();
+		if (lastSegment instanceof IBreakpoint) {
+			return ((IBreakpoint) lastSegment).isEnabled();
+		}
+		
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
new file mode 100644
index 0000000..b30014d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java
@@ -0,0 +1,1102 @@
+/*****************************************************************
+ * Copyright (c) 2009, 2010 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     IBM Corporation - ongoing enhancements and bug fixing
+ *     Wind River Systems - ongoing enhancements and bug fixing
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
+import org.eclipse.debug.core.IBreakpointsListener;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IThread;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointUIConstants;
+import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.internal.ui.viewers.update.BreakpointManagerProxy;
+import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointContainer;
+import org.eclipse.debug.internal.ui.views.breakpoints.ElementComparator;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.debug.ui.contexts.IDebugContextListener;
+import org.eclipse.debug.ui.contexts.IDebugContextService;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IWorkbenchWindow;
+
+/**
+ * This class provides breakpoint content for the breakpoint manager.
+ * 
+ * @since 3.6
+ */
+public class BreakpointManagerContentProvider extends ElementContentProvider 
+        implements IBreakpointsListener {
+    
+    /**
+     * Breakpoint input data. Contains all input specific data.
+     * 
+     * @since 3.6
+     */
+    private class InputData {
+        /**
+         * Breakpoint manager input
+         */
+        final private DefaultBreakpointsViewInput fInput;
+        
+        /**
+         * Model proxy of the input
+         */
+        final private List/*<AbstractModelProxy>*/ fProxies = new ArrayList(1);
+        
+        /**
+         * Element comparator, use to compare the ordering of elements for the model
+         * <br/> Note: We assume that the comparator does not change.  
+         */
+        private ElementComparator fComparator;
+        
+        /**
+         * The breakpoint root container.<br/>
+         * Note: The final qualifier guarantees that fContainer will be 
+         * initialized before the class is accessed on other threads.
+         */
+        final private BreakpointContainer fContainer;
+        
+        /**
+         * Known current breakpoint organizers.
+         */
+        private IBreakpointOrganizer[] fOrganizers;
+        
+        private IStructuredSelection fDebugContext = StructuredSelection.EMPTY; 
+        
+        private IPropertyChangeListener fOrganizersListener = new IPropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent event) {
+                // For any property changes in breakpiont organizers, refresh the containers.
+                updateContainers();
+            }
+        };
+
+        private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
+            public void propertyChange(PropertyChangeEvent event) {
+                presentationPropertyChanged(event);
+            }
+        };
+        
+        private IDebugContextListener fDebugContextListener = new IDebugContextListener() {
+            public void debugContextChanged(DebugContextEvent event) {
+                InputData.this.debugContextChanged(event);
+            }
+        };
+
+        /**
+         * Constructor
+         *  
+         * @param input the breakpoint manager input
+         * @param proxy the model proxy 
+         * @param filter the debug context selection 
+         * @param comparator the element comparator 
+         */
+        InputData(DefaultBreakpointsViewInput input) {
+            fInput = input;
+            fComparator = (ElementComparator)
+                input.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ELEMENT_COMPARATOR);
+            
+            fOrganizers = (IBreakpointOrganizer[])
+                input.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS);
+
+            // Create the initial container.
+            ModelDelta initialDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+            IBreakpoint[] breakpoints = filterBreakpoints(
+                fInput, getSelectionFilter(fInput, getDebugContext()), fBpManager.getBreakpoints());
+            fContainer = createRootContainer(initialDelta, fInput, fOrganizers, breakpoints);
+            
+            registerOrganizersListener(null, fOrganizers);
+            input.getContext().addPropertyChangeListener(fPresentationContextListener);
+            
+            IWorkbenchWindow window = fInput.getContext().getWindow();
+            if (window != null) {
+                IDebugContextService debugContextService = DebugUITools.getDebugContextManager().getContextService(window);
+                ISelection debugContext = debugContextService.getActiveContext();
+                if (debugContext instanceof IStructuredSelection) {
+                    synchronized(this) {
+                        fDebugContext = (IStructuredSelection)debugContext;
+                    }
+                }
+                debugContextService.addDebugContextListener(fDebugContextListener);
+            }
+        }
+        
+        void dispose() {
+            // Unregister listener to breakpoint organizers.
+            IBreakpointOrganizer[] organizers;
+            synchronized(this) {
+                organizers = fOrganizers;
+                fOrganizers = null;
+            }
+            registerOrganizersListener(organizers, null);
+            
+            // Unregister listener to presentation context.
+            fInput.getContext().removePropertyChangeListener(fPresentationContextListener);
+            
+            // Unregister listener to debug context in window.
+            IWorkbenchWindow window = fInput.getContext().getWindow();
+            if (window != null) {
+                IDebugContextService debugContextService = DebugUITools.getDebugContextManager().getContextService(window);
+                debugContextService.removeDebugContextListener(fDebugContextListener);
+            }
+
+        }
+        
+        void proxyInstalled(BreakpointManagerProxy proxy) {
+            ModelDelta rootDelta = null;
+            synchronized(this) {
+                fProxies.add(proxy);
+                
+                // Generate an install delta
+                
+                rootDelta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+                buildInstallDelta(rootDelta, fContainer);
+
+                if (DEBUG_BREAKPOINT_DELTAS) {
+                    System.out.println("PROXY INSTALLED (" + proxy + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$
+                }
+
+                proxy.postModelChanged(rootDelta, false);
+            }
+        }
+
+        synchronized void proxyDisposed(BreakpointManagerProxy proxy) {
+            fProxies.remove(proxy);
+            if (DEBUG_BREAKPOINT_DELTAS) {
+                System.out.println("PROXY DISPOSED (" + proxy + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$
+            }
+        }
+
+        synchronized BreakpointManagerProxy[] getProxies() {
+            return (BreakpointManagerProxy[])fProxies.toArray(new BreakpointManagerProxy[fProxies.size()]);
+        }
+        
+        /**
+         * Change the breakpoint organizers for the root container.
+         * 
+         * @param organizers the new organizers.
+         */
+        void setOrganizers(IBreakpointOrganizer[] organizers) {
+            IBreakpointOrganizer[] oldOrganizers = null;
+            synchronized(this) {
+                oldOrganizers = fOrganizers;
+                fOrganizers = organizers;
+            }
+            registerOrganizersListener(oldOrganizers, organizers);
+            updateContainers();
+        }
+
+        private void registerOrganizersListener(IBreakpointOrganizer[] oldOrganizers, IBreakpointOrganizer[] newOrganizers) {
+            if (oldOrganizers != null) {
+                for (int i = 0; i < oldOrganizers.length; i++) {
+                    oldOrganizers[i].removePropertyChangeListener(fOrganizersListener);
+                }
+            }
+            if (newOrganizers != null) {
+                for (int i = 0; i < newOrganizers.length; i++) {
+                    newOrganizers[i].addPropertyChangeListener(fOrganizersListener);
+                }
+            }
+        }
+        
+        void updateContainers() {
+            IBreakpoint[] breakpoints = filterBreakpoints(
+                fInput, getSelectionFilter(fInput, getDebugContext()), fBpManager.getBreakpoints());
+    
+            synchronized(this) {
+                ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+                // create a reference container, use for deleting elements and adding elements
+                ModelDelta dummyDelta = new ModelDelta(null, IModelDelta.NO_CHANGE);                
+                BreakpointContainer refContainer = createRootContainer(dummyDelta, fInput, fOrganizers, breakpoints);
+    
+                // delete the removed elements
+                deleteRemovedElements(fContainer, refContainer, delta);
+                
+                // adjust the old organizer with the reference organizer
+                BreakpointContainer.copyOrganizers(fContainer, refContainer);
+                
+                // insert the added elements
+                IBreakpoint newBreakpoint = insertAddedElements(fContainer, refContainer, delta);
+                delta.setChildCount(fContainer.getChildren().length);
+                
+                // select the new breakpoint
+                if (newBreakpoint != null) {
+                    appendModelDeltaToElement(delta, newBreakpoint, IModelDelta.SELECT);
+                }
+                if (DEBUG_BREAKPOINT_DELTAS) {
+                    System.out.println("POST BREAKPOINT DELTA (setOrganizers)\n"); //$NON-NLS-1$
+                }
+                postModelChanged(delta, false); 
+            }            
+        }
+
+        private synchronized IStructuredSelection getDebugContext() {
+            return fDebugContext;
+        }
+        
+        /**
+         * Handles the property changed events in presentation contexts.
+         * Sub-classes may override to perform additional handling.
+         * 
+         * @param presentation Presentation context that changed.
+         */
+        private void presentationPropertyChanged(PropertyChangeEvent event) {
+            if (IPresentationContext.PROPERTY_DISPOSED.equals(event.getProperty())) {
+                contextDisposed(fInput.getContext());
+            }
+            if (IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS.equals(event.getProperty())) {
+                IBreakpointOrganizer[] organizers = (IBreakpointOrganizer[])event.getNewValue();
+                setOrganizers(organizers);
+            }
+            else if ( IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION.equals(event.getProperty()) ) 
+            {
+                IStructuredSelection selection = null;
+                
+                if (Boolean.TRUE.equals(event.getNewValue()) ) {
+                    selection = getDebugContext();
+                }
+                setFilterSelection(selection);
+            } 
+            else if ( IBreakpointUIConstants.PROP_BREAKPOINTS_TRACK_SELECTION.equals(event.getProperty()) ) 
+            {
+                IStructuredSelection selection = null;
+                
+                if (Boolean.TRUE.equals(event.getNewValue()) ) {
+                    selection = getDebugContext();
+                }
+                trackSelection(selection);
+            } 
+        }
+
+        private void debugContextChanged(DebugContextEvent event) {
+            IStructuredSelection newContext;
+            if (event.getContext() instanceof IStructuredSelection) {
+                newContext = (IStructuredSelection)event.getContext();
+            } else {
+                newContext = StructuredSelection.EMPTY;
+            }
+
+            synchronized(this) {
+                fDebugContext = newContext;
+            }
+
+            if (Boolean.TRUE.equals(fInput.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION)) ) {
+                setFilterSelection(newContext);
+            }
+            
+            if (Boolean.TRUE.equals(fInput.getContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_TRACK_SELECTION)) ) {
+                trackSelection(newContext);
+            }            
+        }
+        
+        
+        private void setFilterSelection(IStructuredSelection ss) {
+            ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+            boolean changed = false;
+        
+            // calculate supported breakpoints outside of the synchronized section.
+            IBreakpoint[] allBreakpoints = fBpManager.getBreakpoints();
+            boolean[] supportedBreakpoints = new boolean[allBreakpoints.length];
+            for (int i = 0; i < allBreakpoints.length; ++i) {
+                supportedBreakpoints[i] = supportsBreakpoint(ss, allBreakpoints[i]);
+            }
+            
+            synchronized(this) {
+                Set existingBreakpoints = new HashSet(Arrays.asList(fContainer.getBreakpoints()));
+
+                // Bug 310879
+                // Process breakpoints in two passes: first remove breakpoints, then add new ones.
+                // This way the breakpoint counts and indexes will be consistent in the delta.
+                for (int i = 0; i < allBreakpoints.length; ++i) {
+                    if (!supportedBreakpoints[i] && existingBreakpoints.contains(allBreakpoints[i])) {
+                        fContainer.removeBreakpoint(allBreakpoints[i], delta);
+	                    changed = true;
+                    }
+                }
+                for (int i = 0; i < allBreakpoints.length; ++i) {
+                    if (supportedBreakpoints[i] && !existingBreakpoints.contains(allBreakpoints[i])) {
+	                    fContainer.addBreakpoint(allBreakpoints[i], delta);
+	                    changed = true;
+                    }
+                }
+
+                if (changed) {
+                    if (DEBUG_BREAKPOINT_DELTAS) {
+                        System.out.println("POST BREAKPOINT DELTA (setFilterSelection)\n"); //$NON-NLS-1$
+                    }
+                    postModelChanged(delta, false); 
+                }
+            }
+        }
+
+        
+        private void trackSelection(IStructuredSelection selection) {
+            if (selection == null || selection.size() != 1) {
+                return;
+            }
+
+            Iterator iter = selection.iterator();
+            Object firstElement = iter.next();
+            if (firstElement == null || iter.hasNext()) {
+                return;
+            }
+            IThread thread = null;
+            if (firstElement instanceof IStackFrame) {
+                thread = ((IStackFrame) firstElement).getThread();
+            } else if (firstElement instanceof IThread) {
+                thread = (IThread) firstElement;
+            } else {
+                return;
+            }
+
+            IBreakpoint[] breakpoints = thread.getBreakpoints();
+            Set bpsSet = new HashSet(breakpoints.length * 4/3);
+            for (int i = 0; i< breakpoints.length; i++) {
+                bpsSet.add(breakpoints[i]);
+            }
+
+            ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+            synchronized (this) {
+                if (buildTrackSelectionDelta(delta, fContainer, bpsSet)) {
+                    if (DEBUG_BREAKPOINT_DELTAS) {
+                        System.out.println("POST BREAKPOINT DELTA (trackSelection)\n"); //$NON-NLS-1$
+                    }
+                    BreakpointManagerProxy[] proxies = getProxies();
+                    for (int i = 0; i < proxies.length; i++) {
+                        proxies[i].postModelChanged(delta, true);
+                    }       
+                }
+            }
+
+        }
+
+        /**
+         * Recursive function to build the model delta to select a breakpoint
+         * corresponding to the active debug context selection.
+         * 
+         * @param delta Delta node to build on
+         * @param container Container element to build delta for.
+         * @param breakpoints Breakpoint set to be selected.
+         * @return whether we found a breakpoint to select
+         */
+        private boolean buildTrackSelectionDelta(ModelDelta delta, BreakpointContainer container, Set breakpoints) {
+            Object[] children = container.getChildren();
+            delta.setChildCount(children.length);
+            for (int i = 0; i < children.length; i++) {
+                ModelDelta childDelta = delta.addNode(children[i], i, IModelDelta.NO_CHANGE);
+                if (children[i] instanceof BreakpointContainer) {
+                    BreakpointContainer childContainer = (BreakpointContainer)children[i];
+                    boolean containsBP = false;
+                    IBreakpoint[] containerBPs = childContainer.getBreakpoints();
+                    for (int j = 0; j < containerBPs.length; j++) {
+                        if (breakpoints.contains(containerBPs[j])) {
+                            containsBP = true; 
+                            break;
+                        }
+                    }
+                    if (containsBP && buildTrackSelectionDelta(childDelta, childContainer, breakpoints) ) { 
+                        return true; 
+                    }
+                } else if (children[i] instanceof IBreakpoint &&
+                    breakpoints.contains(children[i])) 
+                {
+                    childDelta.setFlags(IModelDelta.SELECT | IModelDelta.EXPAND);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        /**
+         * Helper method to add breakpoints to the given input.
+         * 
+         * @param data the input to add the breakpoints
+         * @param breakpoints the breakpoints
+         */
+        void breakpointsAdded(IBreakpoint[] breakpoints) {
+            IBreakpoint[] filteredBreakpoints = filterBreakpoints(
+                fInput, getSelectionFilter(fInput, getDebugContext()), breakpoints);
+            
+            if (filteredBreakpoints.length > 0) {
+                synchronized (this) {
+                    ModelDelta delta = new ModelDelta(fInput, 0, IModelDelta.NO_CHANGE, -1);
+                    for (int i = 0; i < filteredBreakpoints.length; ++i) {
+                        // Avoid adding breakpoints which were already removed.  If breakpoints 
+                        // are added and removed very fast, the Breakpoint manager can issue 
+                        // breakpoint added events after breakpoint removed events!  This means 
+                        // that such breakpoints would never be removed from the view.
+                        // (Bug 289526)
+                        if (DebugPlugin.getDefault().getBreakpointManager().getBreakpoint(filteredBreakpoints[i].getMarker()) != null) {
+                            fContainer.addBreakpoint(filteredBreakpoints[i], delta);
+                        }
+                    }
+                    delta.setChildCount(fContainer.getChildren().length);
+                    
+                    // select the breakpoint
+                    if (filteredBreakpoints.length > 0) {
+                        appendModelDeltaToElement(delta, filteredBreakpoints[0], IModelDelta.SELECT);
+                    }
+                
+                    if (DEBUG_BREAKPOINT_DELTAS) {
+                        System.out.println("POST BREAKPOINT DELTA (breakpointsAddedInput)\n"); //$NON-NLS-1$
+                    }
+                    postModelChanged(delta, false); 
+                }
+            }
+        }
+
+        /**
+         * Helper method to remove breakpoints from a given input.
+         * 
+         * @param data the input to add the breakpoints
+         * @param breakpoints the breakpoints
+         */
+        void breakpointsRemoved(IBreakpoint[] breakpoints) {
+            synchronized (this) {
+                boolean removed = false;
+                ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+                for (int i = 0; i < breakpoints.length; ++i) {
+                    removed = fContainer.removeBreakpoint(breakpoints[i], delta) || removed;
+                }
+                
+                if (removed) {
+                    if (DEBUG_BREAKPOINT_DELTAS) {
+                        System.out.println("POST BREAKPOINT DELTA (breakpointsRemovedInput)\n"); //$NON-NLS-1$
+                    }
+                    postModelChanged(delta, false); 
+                }
+            }
+        }
+        
+        void breakpointsChanged(IBreakpoint[] breakpoints) {
+            
+            
+            IBreakpoint[] filteredBreakpoints = filterBreakpoints(
+                fInput, getSelectionFilter(fInput, getDebugContext()), breakpoints);
+
+            synchronized (this) {
+                ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
+
+                // If the change caused a breakpoint to be added (installed) or remove (un-installed) update accordingly.
+                List removed = new ArrayList();
+                List added = new ArrayList();
+                List filteredAsList = Arrays.asList(filteredBreakpoints);
+                for (int i = 0; i < breakpoints.length; i++) {
+                    IBreakpoint bp = breakpoints[i];
+                    boolean oldContainedBp = fContainer.contains(bp);
+                    boolean newContained = filteredAsList.contains(bp);
+                    if (oldContainedBp && !newContained) {
+                        removed.add(bp);
+                    } else if (!oldContainedBp && newContained) {
+                        added.add(bp);
+                    }                   
+                }
+                if (!added.isEmpty()) {
+                    breakpointsAdded((IBreakpoint[]) added.toArray(new IBreakpoint[added.size()]));
+                }
+                if (!removed.isEmpty()) {
+                    breakpointsRemoved((IBreakpoint[]) removed.toArray(new IBreakpoint[removed.size()]));
+                }                       
+                for (int i = 0; i < filteredBreakpoints.length; ++i)
+                    appendModelDelta(fContainer, delta, IModelDelta.STATE | IModelDelta.CONTENT, filteredBreakpoints[i]); // content flag triggers detail refresh
+
+                if (DEBUG_BREAKPOINT_DELTAS) {
+                    System.out.println("POST BREAKPOINT DELTA (breakpointsChanged)\n"); //$NON-NLS-1$
+                }
+                postModelChanged(delta, false); 
+            }            
+        }
+
+        
+        /**
+         * Recursive function to build the model delta to install breakpoint
+         * model proxies for all breakpoints and breakpoint containers.
+         * 
+         * @param delta Delta node to build on
+         * @param container Container element to build delta for.
+         */
+        private void buildInstallDelta(ModelDelta delta, BreakpointContainer container) {
+            Object[] children = container.getChildren();
+            delta.setChildCount(children.length);
+            for (int i = 0; i < children.length; i++) {
+                ModelDelta childDelta = delta.addNode(children[i], i, IModelDelta.NO_CHANGE);
+                if (children[i] instanceof BreakpointContainer) {
+                    childDelta.setFlags(IModelDelta.INSTALL);
+                    buildInstallDelta(childDelta, (BreakpointContainer)children[i]);
+                } else if (children[i] instanceof IBreakpoint) {
+                    childDelta.setFlags(IModelDelta.INSTALL);
+                }
+            }
+        }
+
+        
+        /**
+         * Insert elements from the reference container to an existing container.
+         * 
+         * @param container the existing  container to insert the new elements.
+         * @param refContainer the reference container to compare elements that are added.
+         * @param containerDelta the delta of the existing container.
+         */
+        private IBreakpoint insertAddedElements(BreakpointContainer container, BreakpointContainer refContainer, ModelDelta containerDelta) {
+            IBreakpoint newBreakpoint = null;
+            
+            Object[] children = container.getChildren();
+            Object[] refChildren = refContainer.getChildren();
+            
+
+            for (int i = 0; i < refChildren.length; ++i) {
+                Object element = getElement(children, refChildren[i]);
+
+                // if a child of refContainer doesn't exist in container, than insert it to container
+                //      - if the reference child is a container, than copy the reference child container to container
+                //      - otherwise (Breakpoint), add the breakpoint to container
+                if (element == null) {
+                    if (refChildren[i] instanceof BreakpointContainer) {
+                        BreakpointContainer.addChildContainer(container, (BreakpointContainer) refChildren[i], containerDelta);
+                    } else {
+                        BreakpointContainer.addBreakpoint(container, (IBreakpoint) refChildren[i], containerDelta);
+                        if (newBreakpoint == null)
+                            newBreakpoint = (IBreakpoint) refChildren[i];
+                    }
+                    
+                // if a child exist in container, than recursively search into container. And also update the organizer of
+                // of container to the one in the refContainer's child.
+                } else if (element instanceof BreakpointContainer) {
+                    ModelDelta childDelta = containerDelta.addNode(element, container.getChildIndex(element), IModelDelta.STATE, -1);
+                    BreakpointContainer.copyOrganizers((BreakpointContainer) element, (BreakpointContainer) refChildren[i]);
+                    newBreakpoint = insertAddedElements((BreakpointContainer) element, (BreakpointContainer) refChildren[i], childDelta);
+                    childDelta.setChildCount(((BreakpointContainer) element).getChildren().length);
+                }
+            }
+            
+            return newBreakpoint;
+        }
+        
+        /**
+         * Delete elements from existing container that doesn't exist in the reference container.
+         * 
+         * @param container the existing container to delete the removed elements.
+         * @param refContainer the reference container to compare elements that are removed.
+         * @param containerDelta the delta of the existing container.
+         */
+        private void deleteRemovedElements(BreakpointContainer container, BreakpointContainer refContainer, ModelDelta containerDelta) {
+            Object[] children = container.getChildren();
+            Object[] refChildren = refContainer.getChildren();
+            
+            // if a child of container doesn't exist in refContainer, than remove it from container
+            for (int i = 0; i < children.length; ++i) {
+                Object element = getElement(refChildren, children[i]);
+                
+                if (element == null) {
+                    if (children[i] instanceof BreakpointContainer) {
+                        BreakpointContainer.removeAll((BreakpointContainer) children[i], containerDelta);
+                    } else {
+                        BreakpointContainer.removeBreakpoint(container, (IBreakpoint) children[i], containerDelta);
+                    }
+                } else if (element instanceof BreakpointContainer){
+
+                    ModelDelta childDelta = containerDelta.addNode(children[i], IModelDelta.STATE);                     
+                    deleteRemovedElements((BreakpointContainer) children[i], (BreakpointContainer) element, childDelta);
+                }
+            }
+        }
+        
+        /**
+         * Get the element that is in the collection.
+         * 
+         * @param collection the collection of elements.
+         * @param element the element to search.
+         * @return if element exist in collection, than it is returned, otherwise <code>null</code> is returned.
+         * @see insertAddedElements
+         * @see deleteRemovedElements
+         */
+        private Object getElement(Object[] collection, Object element) {
+            for (int i = 0; i < collection.length; ++i)
+                if (collection[i] instanceof BreakpointContainer && element instanceof BreakpointContainer) {               
+                    if (collection[i].equals(element))
+                        return collection[i];
+                } else {
+                    if (collection[i].equals(element))
+                        return collection[i];
+                }
+            return null;
+        }
+        
+        /**
+         * Create a root container.
+         * 
+         * @param rootDelta the root delta.
+         * @param input the view input.
+         * @param organizers the breakpoint organizers.
+         * @param oldContainer the old container, use to determine whether a new breakpoint should be expanded.
+         * @param the breakpoint manager.
+         */
+        private BreakpointContainer createRootContainer(
+            ModelDelta rootDelta, DefaultBreakpointsViewInput input, 
+            IBreakpointOrganizer[] organizers, IBreakpoint[] breakpoints) 
+        {
+            
+            BreakpointContainer container = new BreakpointContainer(organizers, fComparator);
+            container.initDefaultContainers(rootDelta);
+            
+            for (int i = 0; i < breakpoints.length; ++i) {
+                container.addBreakpoint(breakpoints[i], rootDelta);             
+            }
+            
+            return container;
+        }       
+        
+        /**
+         * Fire model change event for the input.
+         * 
+         * @param input the input.
+         * @param delta the model delta.
+         * @param debugReason the debug string.
+         */
+        synchronized private void postModelChanged(final IModelDelta delta, boolean select) {
+            for (int i = 0; fProxies != null && i < fProxies.size(); i++) {
+                ((BreakpointManagerProxy)fProxies.get(i)).postModelChanged(delta, select);
+            }       
+        }
+
+
+    }
+    
+    private class InputDataMap extends LinkedHashMap {
+        private static final long serialVersionUID = 1L;
+
+        public InputDataMap() {
+            super(1, (float)0.75, true);
+        }
+        
+        protected boolean removeEldestEntry(java.util.Map.Entry arg0) {
+            InputData data = (InputData)arg0.getValue();
+            if (size() > getMaxInputsCache() && data.fProxies.isEmpty()) {
+                data.dispose();
+                return true;
+            }
+            return false;
+        }
+    }
+    
+    /**
+     * Scheduling rule to make sure that breakpoint manager listener updates
+     * are process serially.
+     */
+    private ISchedulingRule fBreakpointsListenerSchedulingRule = new ISchedulingRule() {
+        
+        public boolean isConflicting(ISchedulingRule rule) {
+            return rule == this;
+        }
+        
+        public boolean contains(ISchedulingRule rule) {
+            return rule == this;
+        }
+    };
+    
+    // debug flags
+    public static boolean DEBUG_BREAKPOINT_DELTAS = false;
+    
+    static {
+        DEBUG_BREAKPOINT_DELTAS = DebugUIPlugin.DEBUG && "true".equals(                     //$NON-NLS-1$
+         Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/breakpointDeltas"));   //$NON-NLS-1$
+    } 
+        
+    /**
+     * A map of input to info data cache
+     */
+    final private Map fInputToData = Collections.synchronizedMap(new InputDataMap());
+    
+    /**
+     * Flag indicating whether the content provider is currently a breakpoints listener.
+     */
+    private boolean fIsBreakpointListener = false;
+    
+    /**
+     * The breakpoint manager.
+     */
+    final private IBreakpointManager fBpManager = DebugPlugin.getDefault().getBreakpointManager();
+    
+    /**
+     * Sub-classes may override this method to filter the breakpoints.
+     * 
+     * @param input the breakpoint manager input.
+     * @param breakpoints the list of breakpoint to filter.
+     * @return the filtered list of breakpoint based on the input.
+     */
+    protected IBreakpoint[] filterBreakpoints(DefaultBreakpointsViewInput input, IStructuredSelection selectionFilter, IBreakpoint[] breakpoints) {      
+        if (selectionFilter != null && !selectionFilter.isEmpty()) {
+            List targets = getDebugTargets(selectionFilter);
+            ArrayList retVal = new ArrayList();
+            if (targets != null) {
+                for (int i = 0; i < breakpoints.length; ++i) {
+                    if (supportsBreakpoint(targets, breakpoints[i]))
+                        retVal.add(breakpoints[i]);
+                }
+            }
+            return (IBreakpoint[]) retVal.toArray(new IBreakpoint[retVal.size()]);
+        } else {
+            return breakpoints;
+        }
+    }
+    
+    /**
+     * Sub-classes may override this to determine whether the breakpoint is supported by the selection.
+     * 
+     * @param ss the selection of the debug elements.
+     * @param breakpoint the breakpoint.
+     * @return true if supported.
+     */
+    protected boolean supportsBreakpoint(IStructuredSelection ss, IBreakpoint breakpoint) {
+        return supportsBreakpoint(getDebugTargets(ss), breakpoint);
+    }
+    
+    /**
+     * Returns true if the breakpoint contains in one of the targets.
+     * 
+     * @param targets a list of <code>IDebugTarget</code> objects.
+     * @param breakpoint the breakpoint.
+     * @return true if breakpoint contains in the list of targets.
+     */
+    protected boolean supportsBreakpoint(List targets, IBreakpoint breakpoint) {
+        boolean exist = targets.size() == 0 ? true : false;
+        for (int i = 0; !exist && i < targets.size(); ++i) {
+            IDebugTarget target = (IDebugTarget) targets.get(i);
+            exist |= target.supportsBreakpoint(breakpoint);
+        }
+        return exist;
+    }
+    
+    /**
+     * Returns the list of IDebugTarget for the selection.
+     * 
+     * @param ss the selection.
+     * @return list of IDebugTarget object.
+     */
+    protected List getDebugTargets(IStructuredSelection ss) {
+        List debugTargets = new ArrayList(2);
+        if (ss != null) {
+            Iterator i = ss.iterator();
+            while (i.hasNext()) {
+                Object next = i.next();
+                if (next instanceof IDebugElement) {
+                    debugTargets.add(((IDebugElement)next).getDebugTarget());
+                } else if (next instanceof ILaunch) {
+                    IDebugTarget[] targets = ((ILaunch)next).getDebugTargets();
+                    for (int j = 0; j < targets.length; j++) {
+                        debugTargets.add(targets[j]);
+                    }
+                } else if (next instanceof IProcess) {
+                    IDebugTarget target = (IDebugTarget)((IProcess)next).getAdapter(IDebugTarget.class);
+                    if (target != null) {
+                        debugTargets.add(target);
+                    }
+                }   
+            }
+        }
+        return debugTargets;
+    }
+
+
+    /**
+     * Maximum number of breakpoint manager input objects that this provider 
+     * will cache data for.  This method is called once upon class creation 
+     * when setting up the data cache.  Sub-classes may override to provide
+     * a custom setting.
+     * 
+     * @return Maximum data cache size
+     */
+    protected int getMaxInputsCache() {
+        return 2;
+    }
+    
+    /**
+     * Handles the event when a presentation context is dispoed.
+     * Sub-classes may override to perform additional cleanup.
+     * 
+     * @param context Presetnation context that was disposed.
+     */
+    protected void contextDisposed(IPresentationContext context) {
+        List removed = new ArrayList(1);
+        synchronized (fInputToData) {
+            for (Iterator itr = fInputToData.entrySet().iterator(); itr.hasNext();) {
+                Map.Entry entry = (Map.Entry)itr.next();
+                IPresentationContext entryContext = ((DefaultBreakpointsViewInput)entry.getKey()).getContext();
+                if (context.equals(entryContext)) {
+                    removed.add(entry.getValue());
+                    itr.remove();
+                }
+            }
+        }
+
+        // Dispose the removed input datas
+        for (int i = 0; i < removed.size(); i++) {
+            ((InputData)removed.get(i)).dispose();
+        }
+    }
+    
+    /**
+     * Register the breakpoint manager input with this content provider.
+     * 
+     * @param input the breakpoint manager input to register.
+     * @param proxy the model proxy of the input.
+     * @param organizers the breakpoint organizer, can be <code>null</code>.
+     * @param selectionFilter the selection filter, can be <code>null</code>.
+     * @param comparator the element comparator.
+     */
+    public void registerModelProxy(DefaultBreakpointsViewInput input, BreakpointManagerProxy proxy) {
+        synchronized(this) {
+            if (!fIsBreakpointListener) {
+                fBpManager.addBreakpointListener(this);
+                fIsBreakpointListener = true;
+            }
+        }
+        InputData inputData = getInputData(input);
+        if (inputData != null) {
+            inputData.proxyInstalled(proxy);
+        }
+    }
+    
+    /**
+     * Unregister the breakpoint manager input with this content provider.
+     * 
+     * @param input the breakpoint manager input to unregister.
+     */
+    public void unregisterModelProxy(DefaultBreakpointsViewInput input, BreakpointManagerProxy proxy) {
+        InputData inputData = (InputData)fInputToData.get(input);
+        if (inputData != null) {
+            inputData.proxyDisposed(proxy);
+            
+            if (fInputToData.isEmpty()) {
+                synchronized(this) {
+                    if (fIsBreakpointListener) {
+                        fBpManager.removeBreakpointListener(this);
+                        fIsBreakpointListener = false;
+                    }
+                }
+            }
+        }
+    }   
+    
+    private InputData getInputData(DefaultBreakpointsViewInput input) {
+        if (Boolean.TRUE.equals(input.getContext().getProperty(IPresentationContext.PROPERTY_DISPOSED)) ) {
+            return null;
+        }
+        
+        InputData data = null;
+        synchronized (fInputToData) {
+            data = (InputData)fInputToData.get(input); 
+            if (data == null) {
+                data = new InputData(input);
+                fInputToData.put(input, data);
+            }
+        }
+        return data;
+    }
+    
+    /**
+     * Returns the selection filter for the input.
+     * 
+     * @param input the selection.
+     */
+    protected IStructuredSelection getSelectionFilter(Object input, IStructuredSelection debugContext) {
+        if (input instanceof DefaultBreakpointsViewInput) {
+            IPresentationContext presentation = ((DefaultBreakpointsViewInput)input).getContext();
+            if ( Boolean.TRUE.equals(presentation.getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION)) ) {
+                return debugContext;
+            }
+        }
+        return null;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
+     */
+    protected boolean supportsContextId(String id) {
+        return id.equals(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+     */
+    protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+        Object input = monitor.getViewerInput();
+        if (input instanceof DefaultBreakpointsViewInput) {
+            DefaultBreakpointsViewInput bpManagerInput = (DefaultBreakpointsViewInput)input;
+            InputData inputData = getInputData(bpManagerInput);
+            if (inputData != null) {
+                return inputData.fContainer.getChildren().length;
+            }
+        }       
+        return 0;       
+    }   
+
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+     */
+    protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+        Object input = monitor.getViewerInput();
+        if (input instanceof DefaultBreakpointsViewInput) {
+            DefaultBreakpointsViewInput bpManagerInput = (DefaultBreakpointsViewInput)input;
+            InputData inputData = getInputData(bpManagerInput);
+            if (inputData != null) {
+                Object[] children =  inputData.fContainer.getChildren();
+                return getElements(children, index, length);
+            }
+        }       
+                
+        return EMPTY;
+    }   
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
+     */
+    public void breakpointsAdded(final IBreakpoint[] breakpoints) {
+        new Job("Breakpoints View Update Job") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setRule(fBreakpointsListenerSchedulingRule);
+            }
+            
+            protected IStatus run(IProgressMonitor monitor) {
+                InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+                for (int i = 0; i < datas.length; i++) {
+                    datas[i].breakpointsAdded(breakpoints);
+                }
+                return Status.OK_STATUS;
+            }
+        }.schedule();               
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
+     */
+    public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+        new Job("Breakpoints View Update Job") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setRule(fBreakpointsListenerSchedulingRule);
+            }
+            
+            protected IStatus run(IProgressMonitor monitor) {
+                InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+                for (int i = 0; i < datas.length; i++) {
+                    datas[i].breakpointsRemoved(breakpoints);
+                }               
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
+     */
+    public void breakpointsChanged(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+        new Job("Breakpoints View Update Job") { //$NON-NLS-1$
+            {
+                setSystem(true);
+                setRule(fBreakpointsListenerSchedulingRule);
+            }
+            
+            protected IStatus run(IProgressMonitor monitor) {
+                InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+                for (int i = 0; i < datas.length; i++) {
+                    datas[i].breakpointsChanged(breakpoints);
+                }               
+                return Status.OK_STATUS;
+            }
+        }.schedule();
+    }   
+    /**
+     * Appends the model delta flags to child containers that contains the breakpoint.
+     * 
+     * @param parent the parent container.
+     * @param parentDelta the parent model delta.
+     * @param flags the model delta flags.
+     * @param breakpoint the breakpoint to search in the children containers.
+     */
+    private void appendModelDelta(BreakpointContainer parent, ModelDelta parentDelta, int flags, IBreakpoint breakpoint) {
+        BreakpointContainer[] containers = parent.getContainers();
+        
+        if (parent.contains(breakpoint)) {
+            if ((containers.length != 0)) {
+                for (int i = 0; i < containers.length; ++i) {
+                    ModelDelta nodeDelta = parentDelta.addNode(containers[i], IModelDelta.STATE);
+                    appendModelDelta(containers[i], nodeDelta, flags, breakpoint);
+                }           
+            } else {
+                parentDelta.addNode(breakpoint, flags);
+            }
+        }           
+    }
+    
+    /**
+     * Appends the model delta to the first found element in the model delta tree.
+     * 
+     * @param parentDelta the parent delta
+     * @param element the element to search
+     * @param flags the delta flags
+     */
+    private void appendModelDeltaToElement(IModelDelta parentDelta, Object element, int flags) {
+        if (element.equals(parentDelta.getElement())) {
+            ((ModelDelta) parentDelta).setFlags(parentDelta.getFlags() | flags);
+            return;
+        }
+        
+        IModelDelta[] childDeltas = parentDelta.getChildDeltas();
+        for (int i = 0; i < childDeltas.length; ++i) {
+            if (element.equals(childDeltas[i].getElement())) {
+                ((ModelDelta) childDeltas[i]).setFlags(childDeltas[i].getFlags() | flags);
+                return;
+            }
+            
+            appendModelDeltaToElement(childDeltas[i], element, flags);
+        }
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java
new file mode 100644
index 0000000..672a91e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java
@@ -0,0 +1,37 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/**
+ * Breakpoint manager input memento provider.
+ * 
+ * @since 3.6
+ */
+public class BreakpointManagerInputMementoProvider extends DebugElementMementoProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected String getElementName(Object element, IPresentationContext context) throws CoreException {
+		return  "BreakpointInputMemento"; //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected boolean supportsContextId(String id) {
+		return IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java
new file mode 100644
index 0000000..ae3cbc0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     2009 Freescale - initial API and implementation (Bug 238956)
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.ui.IMemento;
+
+/**
+ * Memento provider for breakpoints
+ * 
+ * @since 3.6
+ */
+public class BreakpointMementoProvider extends ElementMementoProvider {
+
+	/**
+	 * Marker ID. Stored as string in order to support the full range of the long type.
+	 */
+	private static final String MARKER_ID = "MARKER_ID"; 	//$NON-NLS-1$
+	
+	/**
+	 * Full path from the workspace to the resource referred to by the breakpoint marker.
+	 * 
+	 * Stored as String. 
+	 */
+	private static final String RESOURCE_PATH = "RESOURCE_PATH"; 	//$NON-NLS-1$	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#supportsContextId(java.lang.String)
+	 */
+	protected boolean supportsContextId(String id) {
+    	return IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
+    }
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#encodeElement(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected boolean encodeElement(Object element, IMemento memento, IPresentationContext context) throws CoreException {
+		if (element instanceof IBreakpoint) {
+			
+			IMarker marker = ((IBreakpoint)element).getMarker();
+			if (marker != null) {
+
+				long markerId = marker.getId();
+				memento.putString(MARKER_ID, Long.toString(markerId));
+
+				IPath fullPath = marker.getResource().getFullPath();
+				String path = fullPath.toString();
+				memento.putString(RESOURCE_PATH, path);
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
+	 */
+	protected boolean isEqual(Object element, IMemento memento, IPresentationContext context) throws CoreException {
+		if (element instanceof IBreakpoint) {
+			IBreakpoint breakpoint =(IBreakpoint)element; 
+			IMarker marker = breakpoint.getMarker();
+			
+			long markerId = marker.getId();
+			String mementoMarkerId = memento.getString(MARKER_ID);
+			if (!Long.toString(markerId).equals(mementoMarkerId)) {
+				return false;
+			}
+			
+			IPath fullPath = marker.getResource().getFullPath();
+			String path = fullPath.toString();
+			String mementoPath = memento.getString(RESOURCE_PATH);
+			if (!path.equals(mementoPath)) {
+				return false;
+			}
+			return true;
+		}
+		return false;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
index f0a0bf8..5995945 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,6 +66,15 @@ public class DebugTargetContentProvider extends ElementContentProvider {
 		return false;
 	}
 
+	/**
+	 * Returns all children of the given parent object.
+	 * 
+	 * @param parent 
+	 * @param context
+	 * @param monitor
+	 * @return all children
+	 * @throws CoreException
+	 */
 	protected Object[] getAllChildren(Object parent, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
 		String id = context.getId();
 		if (id.equals(IDebugUIConstants.ID_DEBUG_VIEW))
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
index 111b9bd..d35e921 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - added support for checkbox (Bug 286310)
+ *     Patrick Chuong (Texas Instruments) - bug fix 306768
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.model.elements;
 
@@ -19,6 +21,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -209,20 +212,27 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
 			if (columnIds != null) {
 				columnId = columnIds[i];
 			}
-			update.setLabel(getLabel(elementPath, presentationContext, columnId), i);
-			update.setImageDescriptor(getImageDescriptor(elementPath, presentationContext, columnId), i);
+			update.setLabel(getLabel(elementPath, presentationContext, columnId, i), i);
+			update.setImageDescriptor(getImageDescriptor(elementPath, presentationContext, columnId, i), i);
 			update.setBackground(getBackground(elementPath, presentationContext, columnId), i);
 			update.setForeground(getForeground(elementPath, presentationContext, columnId), i);
 			update.setFontData(getFontData(elementPath, presentationContext, columnId), i);
+			if (update instanceof ICheckUpdate && 
+			    Boolean.TRUE.equals(presentationContext.getProperty(ICheckUpdate.PROP_CHECK))) 
+			{
+				((ICheckUpdate) update).setChecked(
+				    getChecked(elementPath, presentationContext), getGrayed(elementPath, presentationContext));
+			}
 		}
 	}
 
 	/**
 	 * Returns the <code>FontData</code> for the path in the given column with the current presentation
-	 * @param element
+	 * @param elementPath
 	 * @param presentationContext
 	 * @param columnId
 	 * @return font information or <code>null</code>
+	 * @throws CoreException 
 	 */
 	protected FontData getFontData(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
 		return null;
@@ -230,10 +240,11 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
 
 	/**
 	 * Returns the <code>RGB</code> foreground colour for the path in the given column with the current presentation
-	 * @param element
+	 * @param elementPath
 	 * @param presentationContext
 	 * @param columnId
 	 * @return color or <code>null</code>
+	 * @throws CoreException 
 	 */
 	protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
 		return null;
@@ -241,10 +252,11 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
 
 	/**
 	 * Returns the <code>RGB</code> background colour for the path in the given column with the current presentation
-	 * @param element
+	 * @param elementPath
 	 * @param presentationContext
 	 * @param columnId
 	 * @return color or <code>null</code>
+	 * @throws CoreException 
 	 */
 	protected RGB getBackground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
 		return null;
@@ -252,14 +264,30 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
 
 	/**
 	 * Returns the <code>ImageDescriptor</code> for the path in the given column with the current presentation
-	 * @param element
+	 * @param elementPath
 	 * @param presentationContext
 	 * @param columnId
 	 * @return image descriptor or <code>null</code>
+	 * @throws CoreException 
 	 */
 	protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
 		return null;
 	}
+	
+	/**
+	 * Returns the <code>ImageDescriptor</code> for the path in the given column with the current presentation
+	 * @param elementPath
+	 * @param presentationContext
+	 * @param columnId
+	 * @param columnIndex
+	 * @return image descriptor or <code>null</code>
+	 * @throws CoreException
+	 * 
+	 * @since 3.6
+	 */
+	protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
+		return getImageDescriptor(elementPath, presentationContext, columnId);
+	}
 
 	/**
 	 * Returns the label for the path in the given column with the current presentation
@@ -270,6 +298,50 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
 	 */
 	protected abstract String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException;	
 
+	/**
+	 * Returns the label for the path in the given column with the current presentation.
+	 * @param elementPath
+	 * @param presentationContext
+	 * @param columnId
+	 * @param columnIndex
+	 * @return label
+	 * 
+	 * @since 3.6
+	 */
+	protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
+		return getLabel(elementPath, presentationContext, columnId);
+	}
+	
+	/**
+	 * Returns the checked state for the given path.
+	 * 
+     * @param path Path of the element to retrieve the grayed state for.
+     * @param presentationContext Presentation context where the element is 
+     * displayed.
+     * @return <code>true<code> if the element check box should be checked
+     * @throws CoreException 
+	 * 
+	 * @since 3.6
+	 */
+	protected boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
+		return false;
+	}
+	
+	/**
+	 * Returns the grayed state for the given path.
+	 * 
+	 * @param path Path of the element to retrieve the grayed state for.
+     * @param presentationContext Presentation context where the element is 
+     * displayed.
+	 * @return <code>true<code> if the element check box should be grayed
+	 * @throws CoreException 
+     * 
+     * @since 3.6
+	 */
+	protected boolean getGrayed(TreePath path, IPresentationContext presentationContext) throws CoreException {
+		return false;
+	}
+	
     /* (non-Javadoc)
      * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate[])
      */
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
index 6a6c2d2..67628f2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.model.elements;
 
@@ -21,20 +22,68 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.model.IErrorReportingExpression;
 import org.eclipse.debug.core.model.IExpression;
 import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnPresentation;
 import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService;
 import org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
 
 /**
  * @since 3.3
  */
 public class ExpressionContentProvider extends VariableContentProvider {
 
+    /**
+     * @since 3.6
+     * Element object used to wrap the expression error message.  It displays 
+     * the error message only in the first column if columns are visible.
+     */
+    private static class ErrorMessageElement implements IElementLabelProvider {
+
+        public ErrorMessageElement(String message) {
+            fMessage = message;
+        }
+        
+        private final String fMessage;
+        
+        public void update(ILabelUpdate[] updates) {
+            for (int i = 0; i < updates.length; i++) {
+                String[] columnIds = updates[i].getColumnIds();
+                if (columnIds == null) {
+                    updateLabel(updates[i], 0);
+                } else {
+                    for (int j = 0; j < columnIds.length; j++) {
+                        if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(columnIds[j])) {
+                            updateLabel(updates[i], j);
+                        } else {
+                            updates[i].setLabel(IInternalDebugCoreConstants.EMPTY_STRING, j);
+                        }
+                    }
+                }
+                    
+                updates[i].done();
+            }
+        }
+
+        private void updateLabel(ILabelUpdate update, int columnIndex) {
+            update.setLabel(fMessage, columnIndex);
+            FontData fontData = JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0];
+            fontData.setStyle(SWT.ITALIC);                
+            
+        }
+    }
+    
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate[])
 	 */
@@ -132,7 +181,7 @@ public class ExpressionContentProvider extends VariableContentProvider {
                 String[] messages = expression.getErrorMessages();
                 LinkedHashSet set = new LinkedHashSet(messages.length);
                 for (int i = 0; i < messages.length; i++) {
-					set.add(messages[i]);
+					set.add(new ErrorMessageElement(messages[i]));
 				}
                 return set.toArray();
             }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
index 8788f0c..2f0644f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,17 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.model.elements;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.model.IErrorReportingExpression;
+import org.eclipse.debug.core.model.IExpression;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.ui.DebugUIMessages;
+import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnPresentation;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.swt.graphics.RGB;
@@ -29,10 +35,129 @@ public class ExpressionLabelProvider extends VariableLabelProvider {
         if (element instanceof IErrorReportingExpression) {
             IErrorReportingExpression expression = (IErrorReportingExpression) element;
             if (expression.hasErrors()) {
-                return new RGB(255, 0, 0);
+                if (columnId == null || columnId.equals(VariableColumnPresentation.COLUMN_VARIABLE_VALUE)) {
+                    return new RGB(255, 0, 0);
+                }
             }
         }		
 		return super.getForeground(elementPath, presentationContext, columnId);
 	}
 	
+   protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException {
+       if (columnId == null) {
+           return super.getLabel(elementPath, context, columnId);
+       } else {
+           IExpression expression = (IExpression) elementPath.getLastSegment();
+           IValue value = expression.getValue();     
+           return getColumnText(expression, value, context, columnId);
+       }
+    }
+    
+    /**
+     * Returns text for a specific columns for the expression/value.
+     * 
+     * @param expression expression to retrieve text for
+     * @param value the value associated with the variable
+     * @param context presentation context specifying how to display the text
+     * @param columnId the column to get the text for
+     * @return the label text
+     * @throws CoreException
+     * 
+     * @since 3.6
+     */
+    private String getColumnText(IExpression expression, IValue value, IPresentationContext context, String columnId) throws CoreException {
+        if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(columnId)) {
+            return getExpressionName(expression, context);
+        } else if (VariableColumnPresentation.COLUMN_VARIABLE_VALUE.equals(columnId)) {
+            return getExpressionValueText(expression, value, context);
+        } else if (VariableColumnPresentation.COLUMN_VALUE_TYPE.equals(columnId) ||
+                   VariableColumnPresentation.COLUMN_VARIABLE_TYPE.equals(columnId)) 
+        {
+            if (value != null) {
+                return getValueTypeName(null, value, context);
+            }
+        }   
+        return null;
+    }
+    
+    /**
+     * Returns the expression's text to show in the view's name column.
+     * 
+     * @param expression expression to retrieve text for
+     * @param context presentation context specifying how to display the text
+     * @exception CoreException in an error occurs
+     * @since 3.6
+     */
+    protected String getExpressionName(IExpression expression, IPresentationContext context) throws CoreException {
+        if (expression instanceof IWatchExpression) {
+            return getWatchExpressionName((IWatchExpression) expression, context);
+        }
+        return expression.getExpressionText();            
+    }
+    
+    /**
+     * Returns the watch expression's text to show in the view's name column.
+     * 
+     * @param expression the expression
+     * @param context associated presentation context
+     * @since 3.6
+     */
+    private String getWatchExpressionName(IWatchExpression expression, IPresentationContext context) {
+        StringBuffer result= new StringBuffer();
+        
+        String snippet = expression.getExpressionText().trim();
+        StringBuffer snippetBuffer = new StringBuffer();
+        if (snippet.length() > 30){
+            snippetBuffer.append(snippet.substring(0, 15));
+            snippetBuffer.append(DebugUIMessages.DefaultLabelProvider_0);
+            snippetBuffer.append(snippet.substring(snippet.length() - 15));
+        } else {
+            snippetBuffer.append(snippet);
+        }
+        snippet = snippetBuffer.toString().replaceAll("[\n\r\t]+", " ");  //$NON-NLS-1$//$NON-NLS-2$
+        
+        result.append('"');
+        result.append(snippet);
+        result.append('"');
+        
+        return result.toString();
+    }
+
+    /**
+     * Returns the expression's value, or a message to show in the value column, 
+     * if the value is not available.
+     * 
+     * @param expression expression to retrieve text for
+     * @param value the value associated with the variable
+     * @param context presentation context specifying how to display the text
+     * @return string representing the expression's value 
+     * @throws CoreException
+     * 
+     * @since 3.6
+     */
+    protected String getExpressionValueText(IExpression expression, IValue value, IPresentationContext context) throws CoreException {
+        if (expression instanceof IWatchExpression) {
+            IWatchExpression watchExpression = (IWatchExpression)expression;
+            StringBuffer result = new StringBuffer();
+
+            if (watchExpression.isPending()) {
+                result.append(DebugUIMessages.DefaultLabelProvider_12); 
+            } else if (watchExpression.hasErrors()) {
+                result.append(DebugUIMessages.DefaultLabelProvider_13); 
+            } else if (value != null) {
+                result.append( getValueText(null, value, context) );
+            }
+            if (!watchExpression.isEnabled()) {
+                result.append(DebugUIMessages.DefaultLabelProvider_15); 
+            }
+
+            return result.toString();
+        }
+        
+        if (value != null) {
+            return getValueText(null, value, context);
+        }
+        return null;
+    }
+    
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
index 94503f4..1ab4939 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,34 +7,170 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.model.elements;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IExpressionManager;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.DebugUIMessages;
+import org.eclipse.debug.internal.ui.DefaultLabelProvider;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnPresentation;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.widgets.Composite;
 
 /**
  * Default content provider for the expression manager.
  */
 public class ExpressionManagerContentProvider extends ElementContentProvider {
 
+    /**
+     * An element representing the "Add new expression" entry in the 
+     * expressions view.
+     * 
+     * @since 3.6
+     */
+    private static class AddNewExpressionElement implements IElementLabelProvider, IElementEditor, ICellModifier {
+        
+        public void update(ILabelUpdate[] updates) {
+            for (int i = 0; i < updates.length; i++) {
+                String[] columnIds = updates[i].getColumnIds();
+                if (columnIds == null) {
+                    updateLabel(updates[i], 0);
+                } else {
+                    for (int j = 0; j < columnIds.length; j++) {
+                        if (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(columnIds[j])) {
+                            updateLabel(updates[i], j);
+                        } else {
+                            updates[i].setLabel(IInternalDebugCoreConstants.EMPTY_STRING, j);
+                        }
+                    }
+                }
+                    
+                updates[i].done();
+            }
+        }
+        
+        private void updateLabel(ILabelUpdate update, int columnIndex) {
+            update.setLabel(DebugUIMessages.ExpressionManagerContentProvider_1, columnIndex);
+            update.setImageDescriptor(DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_MONITOR_EXPRESSION), columnIndex);
+            
+            // Display the "Add new expression" element in italic to 
+            // distinguish it from user elements in view.
+            FontData fontData = JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0];
+            fontData.setStyle(SWT.ITALIC);            
+            update.setFontData(fontData, columnIndex);
+        }
+        
+        public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
+            return new TextCellEditor(parent);
+        }
+        
+        public ICellModifier getCellModifier(IPresentationContext context, Object element) {
+            return this;
+        }
+        
+        public boolean canModify(Object element, String property) {
+            return (VariableColumnPresentation.COLUMN_VARIABLE_NAME.equals(property));
+        }
+        
+        public Object getValue(Object element, String property) {
+            return IInternalDebugCoreConstants.EMPTY_STRING;
+        }
+        
+        public void modify(Object element, String property, Object value) {
+            // If an expression is entered, add a new watch expression to the 
+            // manager. 
+            if (value instanceof String && 
+                !IInternalDebugCoreConstants.EMPTY_STRING.equals( ((String)value).trim()) ) 
+            {
+                String expressionText = DefaultLabelProvider.encodeEsacpedChars((String)value);
+                IWatchExpression newExpression= 
+                    DebugPlugin.getDefault().getExpressionManager().newWatchExpression(expressionText);
+                DebugPlugin.getDefault().getExpressionManager().addExpression(newExpression);
+                newExpression.setExpressionContext(getContext());
+            }
+        }
+        
+        private IDebugElement getContext() {
+            IAdaptable object = DebugUITools.getDebugContext();
+            IDebugElement context = null;
+            if (object instanceof IDebugElement) {
+                context = (IDebugElement) object;
+            } else if (object instanceof ILaunch) {
+                context = ((ILaunch) object).getDebugTarget();
+            }
+            return context;
+        }
+
+    }
+    
+    private static final AddNewExpressionElement ADD_NEW_EXPRESSION_ELEMENT = new AddNewExpressionElement();
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
 	 */
 	protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
-		return ((IExpressionManager) element).getExpressions().length;
+	    // Add the "Add new expression" element only if columns are displayed.
+		return ((IExpressionManager) element).getExpressions().length + 
+		    (context.getColumns() != null ? 1 : 0); 
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
 	 */
 	protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
-		return getElements(((IExpressionManager) parent).getExpressions(), index, length);
+	    if (context.getColumns() != null) {
+	        return getElements(((IExpressionManager) parent).getExpressions(), ADD_NEW_EXPRESSION_ELEMENT, index, length);
+	    } else {
+	        return getElements(((IExpressionManager) parent).getExpressions(), index, length);
+	    }
 	}
 
+	/**
+	 * Returns a subrange of elements from the given elements array plus the last element.
+	 * 
+	 * @see ElementContentProvider#getElements(Object[], int, int)
+	 * 
+	 * @since 3.6
+	 */
+    private Object[] getElements(Object[] elements, Object lastElement, int index, int length) {
+
+        int max = elements.length + 1;
+        if (index < max && ((index + length) > max)) {
+            length = max - index;
+        }
+        if ((index + length) <= max) {
+            Object[] sub = new Object[length];
+            System.arraycopy(elements, index, sub, 0, Math.min(elements.length - index, length));
+            if (index + length > elements.length) {
+                sub[length - 1] = lastElement;
+            }
+            return sub;
+        }
+        return null;
+    }
+
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
 	 */
@@ -46,7 +182,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
 	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
 	 */
 	protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
-		return ((IExpressionManager)element).hasExpressions();
+	    return true;
 	}
 	
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
index 11d0ee3..fc38de3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,14 @@ public class MemoryRetrievalContentProvider extends ElementContentProvider {
 		
 	}
 	
+	/**
+	 * Returns all children of the given parent in the given context.
+	 * 
+	 * @param parent
+	 * @param context
+	 * @param monitor
+	 * @return all children
+	 */
 	protected Object[] getAllChildren(Object parent, IPresentationContext context, IViewerUpdate monitor) {
 		String id = context.getId();
 		if (id.equals(IDebugUIConstants.ID_MEMORY_VIEW))
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
new file mode 100644
index 0000000..7b25c8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/**
+ * Default content provider for process objects. Even though process objects
+ * have no children by default, they still need a content provider to ensure
+ * proper display (see bug
+ * 
+ * @since 3.6
+ */
+public class ProcessContentProvider extends ElementContentProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+	 */
+	protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) {
+		return EMPTY;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+	 */
+	protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) {
+		return 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
+	 */
+	protected boolean supportsContextId(String id) {
+		return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
index d01ab51..d73f15e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -120,6 +120,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
 	 * Returns the name of the given variable to display in <code>COLUMN_VARIABLE_NAME</code>.
 	 * 
 	 * @param variable
+	 * @param context
 	 * @return variable name
 	 * @throws CoreException
 	 */
@@ -131,6 +132,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
 	 * Returns the type name of the given variable to display in <code>COLUMN_VARIABLE_TYPE</code>.
 	 * 
 	 * @param variable
+	 * @param context
 	 * @return variable type name
 	 * @throws CoreException
 	 */
@@ -143,6 +145,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
 	 * 
 	 * @param variable
 	 * @param value
+	 * @param context
 	 * @return value label
 	 * @throws CoreException
 	 */
@@ -155,6 +158,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
 	 * 
 	 * @param variable
 	 * @param value
+	 * @param context
 	 * @return value label
 	 * @throws CoreException
 	 */
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
index cc0bf62..d974a0f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -105,7 +105,7 @@ public abstract class ViewerInputProvider implements IViewerInputProvider {
 	 * Returns a scheduling rule to use when performing the given updates or
 	 * <code>null</code> if none.
 	 * 
-	 * @param updates
+	 * @param update
 	 * @return scheduling rule or <code>null</code> if none
 	 */
 	protected ISchedulingRule getRule(IViewerInputUpdate update) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java
new file mode 100644
index 0000000..88c329e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.debug.internal.ui.elements.adapters.WatchExpressionCellModifier;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * @since 3.6
+ */
+public class WatchExpressionEditor implements IElementEditor {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
+	 */
+	public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
+		return new TextCellEditor(parent);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
+	 */
+	public ICellModifier getCellModifier(IPresentationContext context, Object element) {
+		return new WatchExpressionCellModifier();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
index 971aa7f..1de50d7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
  *     Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.preferences;
 
@@ -91,9 +92,11 @@ public interface IDebugPreferenceConstants {
 	public static final String EXPRESSIONS_DETAIL_PANE_ORIENTATION = "Expressions.detail.orientation"; //$NON-NLS-1$
 	public static final String REGISTERS_DETAIL_PANE_ORIENTATION = "Registers.detail.orientation"; //$NON-NLS-1$
     public static final String MODULES_DETAIL_PANE_ORIENTATION = "Modules.detail.orientation"; //$NON-NLS-1$
+    public static final String BREAKPOINTS_DETAIL_PANE_ORIENTATION = "Breakpoints.detail.orientation"; //$NON-NLS-1$
 	public static final String VARIABLES_DETAIL_PANE_RIGHT = "Variables.detail.orientation.right"; //$NON-NLS-1$
 	public static final String VARIABLES_DETAIL_PANE_UNDERNEATH = "Variables.detail.orientation.underneath"; //$NON-NLS-1$
 	public static final String VARIABLES_DETAIL_PANE_HIDDEN = "Variables.detail.orientation.hidden"; //$NON-NLS-1$
+	public static final String VARIABLES_DETAIL_PANE_AUTO = "Variables.detail.orientation.auto"; //$NON-NLS-1$
 	
 	/**
 	 * Memento for the last selected launch config in the
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
index f40d84d..b0850b8 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchConfigurationsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,12 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationType;
 import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.internal.core.Preferences;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.debug.internal.core.LaunchManager;
 import org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog;
@@ -336,8 +338,9 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
 			editor.setPreferenceStore(getPreferenceStore());
 			editor.load();
 		}
-		fDeleteConfigs.setSelection(DebugPlugin.getDefault().getPluginPreferences().getBoolean(
-				LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE));
+		fDeleteConfigs.setSelection(
+				Platform.getPreferencesService().getBoolean(DebugPlugin.getUniqueIdentifier(),
+				LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true, null));
 		//restore the tables' checked state
 		String[] types = getPreferenceStore().getString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST).split("\\,"); //$NON-NLS-1$
 		TableItem[] items = fTable.getItems();
@@ -356,6 +359,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
 	 * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
 	 */
 	protected void performDefaults() {
+		fDeleteConfigs.setSelection(Preferences.getDefaultBoolean(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true));
 		FieldEditor editor = null;
 		for(int i = 0; i < fFieldEditors.size(); i++) {
 			editor = (FieldEditor)fFieldEditors.get(i);
@@ -375,8 +379,7 @@ public class LaunchConfigurationsPreferencePage extends PreferencePage implement
 		for(int i = 0; i < fFieldEditors.size(); i++) {
 			((FieldEditor)fFieldEditors.get(i)).store();
 		}
-		DebugPlugin.getDefault().getPluginPreferences().setValue(
-				LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, fDeleteConfigs.getSelection());
+		Preferences.setBoolean(DebugPlugin.getUniqueIdentifier(), LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, fDeleteConfigs.getSelection(), null);
 		//save table
 		String types = IInternalDebugCoreConstants.EMPTY_STRING;
 		TableItem[] items = fTable.getItems();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
index 5bb6193..3075dbd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,17 +22,19 @@ import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.sourcelookup.ISourceContainerBrowser;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.TitleAreaDialog;
 import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -51,7 +53,6 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
 	
 	private TableViewer fViewer;
 	private SourceContainerViewer fSourceContainerViewer;
-	private boolean fDoubleClickSelects = true;
 	private ISourceLookupDirector fDirector;
 	
 	/**
@@ -63,38 +64,36 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
 		fSourceContainerViewer=viewer;		
 		fDirector = director;
 	}
-	
-	/**
-	 * Creates the dialog area to display source container types that are "browseable"
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
-	protected Control createDialogArea(Composite ancestor) {			
+	protected Control createDialogArea(Composite parent) {			
 		
 		getShell().setText(SourceLookupUIMessages.addSourceLocation_title); 
 		setTitle(SourceLookupUIMessages.addSourceLocation_description); 
 		setTitleImage(DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_ADD_SRC_LOC_WIZ));
+		setMessage(SourceLookupUIMessages.AddSourceContainerDialog_select_source_container);
 		
-		Composite parent = new Composite(ancestor, SWT.NULL);
+		Composite comp = (Composite) super.createDialogArea(parent);
 		GridData gd= new GridData(GridData.FILL_BOTH);
 		GridLayout topLayout = new GridLayout();
 		topLayout.numColumns = 1;
-		parent.setLayout(topLayout);
-		parent.setLayoutData(gd);	
+		comp.setLayout(topLayout);
+		comp.setLayoutData(gd);	
 				
 		ISourceContainerType[] types = filterTypes(DebugPlugin.getDefault().getLaunchManager().getSourceContainerTypes());
 		
-		fViewer = new TableViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
+		fViewer = new TableViewer(comp, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.SINGLE);
 		final Table table = fViewer.getTable();
 		gd = new GridData(GridData.FILL_BOTH);
 		table.setLayoutData(gd);
 
-		if (fDoubleClickSelects) {
-			table.addSelectionListener(new SelectionAdapter() {
-				public void widgetDefaultSelected(SelectionEvent e) {
-					if (table.getSelectionCount() == 1)
-						okPressed();
-				}
-			});
-		}
+		fViewer.addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				okPressed();
+			}
+		});
 		
 		fViewer.setLabelProvider(new SourceContainerLabelProvider());
 		fViewer.setContentProvider(new ArrayContentProvider());			
@@ -102,21 +101,56 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
 		fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
 				ISelection selection = event.getSelection();
-				String desc = null;
 				if (!selection.isEmpty()) {
 					ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection)selection).getFirstElement();
-					desc = type.getDescription();
+					setMessage(type.getDescription());
+					getButton(IDialogConstants.OK_ID).setEnabled(true);
+				}
+				else {
+					getButton(IDialogConstants.OK_ID).setEnabled(false);
+					setMessage(SourceLookupUIMessages.AddSourceContainerDialog_select_source_container);
 				}
-				setMessage(desc);
 			}
 		});
 		if(types.length != 0) {	
 			fViewer.setInput(types);
 		}
-		Dialog.applyDialogFont(parent);
+		Dialog.applyDialogFont(comp);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(), IDebugHelpContextIds.ADD_SOURCE_CONTAINER_DIALOG);
-		return parent;
+		return comp;
 	}	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		super.createButtonsForButtonBar(parent);
+		Table table = fViewer.getTable(); 
+		if(table.getItemCount() > 0) {
+			fViewer.setSelection(new StructuredSelection(table.getItem(0).getData()));
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	protected void okPressed() {
+		ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection) fViewer.getSelection()).getFirstElement();
+		if (type != null) {
+            ISourceContainerBrowser browser = DebugUITools.getSourceContainerBrowser(type.getId());
+            if (browser != null) {
+                ISourceContainer[] results = browser.addSourceContainers(getShell(), fDirector);
+                if (results != null && results.length > 0) {
+                    fSourceContainerViewer.addEntries(results);
+                    super.okPressed();
+                }
+                else {
+                	return;
+                }
+            }
+        }
+		super.okPressed();
+	}
 	
 	/**
 	 * Removes types without browsers from the provided list of types.
@@ -137,24 +171,4 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
 		return (ISourceContainerType[]) validTypes.toArray(new ISourceContainerType[validTypes.size()]);
 		
 	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
-	 */
-	protected void okPressed() {
-		//single selection dialog, so take first item in array
-		//there will always be a selected item since we set it with viewer.setSelection
-		ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection) fViewer.getSelection()).getFirstElement();
-        if (type != null) {
-            ISourceContainerBrowser browser = DebugUITools.getSourceContainerBrowser(type.getId());
-            if (browser != null) {
-                ISourceContainer[] results = browser.addSourceContainers(getShell(), fDirector);
-                if (results != null && results.length > 0) {
-                    fSourceContainerViewer.addEntries(results);
-                }
-            }
-        }
-		super.okPressed();
-	}
-	
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
index 13ae678..45c9fa2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupFacility.java
@@ -174,7 +174,7 @@ public class SourceLookupFacility implements IPageListener, IPartListener2, IPro
 				if (presentation != null) {
 					editorInput= presentation.getEditorInput(sourceElement);
 				}
-				if (editorInput != null) {
+				if (editorInput != null && presentation != null) {
 					editorId= presentation.getEditorId(editorInput, sourceElement);
 				}				
 			}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.java
index 3e3470a..a4e9ef9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,8 @@ public class SourceLookupUIMessages extends NLS {
 	public static String SourceLookupDialog_0;
 
 	public static String SourceLookupDialog_1;
+
+	public static String SourceLookupDialog_add_edit_remove;
 	public static String sourceTab_lookupLabel;
 	public static String sourceTab_searchDuplicateLabel;
 	public static String sourceTab_upButton;
@@ -60,6 +62,8 @@ public class SourceLookupUIMessages extends NLS {
 	public static String EditSourceLookupPathAction_0;
 	public static String LookupSourceAction_0;
 	public static String ExternalArchiveSourceContainerBrowser_2;
+	public static String AddSourceContainerDialog_select_source_container;
+
 	public static String ArchiveSourceContainerBrowser_3;
 	public static String ArchiveSourceContainerBrowser_4;
 	public static String DirectorySourceContainerDialog_0;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
index ab28335..6982709 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
+# Copyright (c) 2003, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ sourceTab_tabTitle = Source
 sourceTab_defaultButton = Restore Defa&ult
 
 addSourceLocation_title = Add Source
-addSourceLocation_description = Select the type of source to add to the source lookup path
+addSourceLocation_description = Add a container to the source lookup path
 
 addSourceLocation_addButton2 = &Edit Source Lookup Path...
 addSourceLocation_editorMessage = Source not found.
@@ -37,7 +37,7 @@ folderSelection_title=Folder Selection
 folderSelection_label=&Choose folders to add:
 
 manageSourceDialog_title = Edit Source Lookup Path
-manageSourceDialog_description = Edit the path used to locate source files.
+manageSourceDialog_description = Edit the source lookup path
 
 sourceLookupPanel_1 = Unable to apply source lookup path changes.
 sourceLookupPanel_2 = Launch configuration does not support source lookup
@@ -46,6 +46,7 @@ ResolveDuplicatesHandler_1=Choose a source file (? = any character, * = any stri
 EditSourceLookupPathAction_0=Edit Source Loo&kup...
 LookupSourceAction_0=Lookup &Source
 ExternalArchiveSourceContainerBrowser_2=Select Source Archive
+AddSourceContainerDialog_select_source_container=Select a source container to add
 ArchiveSourceContainerBrowser_3=Archive Selection
 ArchiveSourceContainerBrowser_4=Choose archives to add:
 DirectorySourceContainerDialog_0=Directory Selection
@@ -62,3 +63,4 @@ CommonSourceNotFoundEditor_0=Select a Context
 CommonSourceNotFoundEditor_1=You must select an item in the debug view to use as context for source lookup path changes.\n\nFor example: the launch or one of the threads in the view.
 SourceLookupDialog_0=Launch configuration 
 SourceLookupDialog_1=\ is read only, no source lookup path changes will be saved
+SourceLookupDialog_add_edit_remove=Add, edit or remove source containers
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.java
index 4db9fa4..6cad26f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.java
@@ -1,11 +1,12 @@
 /**********************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.   This
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.   This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors: 
  * IBM - Initial API and implementation
+ * Johann Draschwandtner (Wind River) - [300988] Support filtering variables
  **********************************************************************/
 package org.eclipse.debug.internal.ui.stringsubstitution;
 
@@ -20,7 +21,7 @@ public class StringSubstitutionMessages extends NLS {
 
 	public static String RefreshTab_0;
 
-	public static String RefreshTab_43;
+	public static String RefreshTab_1;
 
 	public static String RefreshTab_44;
 	public static String RefreshTab_6;
@@ -48,6 +49,10 @@ public class StringSubstitutionMessages extends NLS {
 	public static String StringVariableSelectionDialog_7;
 	public static String StringVariableSelectionDialog_8;
 	public static String StringVariableSelectionDialog_0;
+	public static String StringVariableSelectionDialog_9;
+	public static String StringVariableSelectionDialog_10;
+	public static String StringVariableSelectionDialog_11;
+
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.properties
index 8ecd00d..eb56586 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/StringSubstitutionMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+# Johann Draschwandtner (Wind River) - [300988] Support filtering variables
 ###############################################################################
 
 PromptExpanderBase_0=Please input a value for {0}
@@ -14,6 +15,7 @@ PromptExpanderBase_1=Please input a value
 PromptingResolver_0=Failed to expand {0}. Input was cancelled.
 
 RefreshTab_0=Recursively &include sub-folders
+RefreshTab_1=Working set
 RefreshTab_6=Refresh
 RefreshTab_7=Refresh resources...
 RefreshTab_8=Exception(s) occurred during refresh.
@@ -26,7 +28,6 @@ RefreshTab_36=&Specific resources
 RefreshTab_37=Specify &Resources...
 RefreshTab_40=working set
 RefreshTab_42=Must select resources to refresh.
-RefreshTab_43=Refresh scope refers to non-existent resource {0}
 RefreshTab_44=Refresh scope invalid
 
 ResourceSelector_0=Select Resource
@@ -40,5 +41,9 @@ StringVariableSelectionDialog_6=&Argument:
 StringVariableSelectionDialog_7=C&onfigure...
 StringVariableSelectionDialog_8=&Variable Description:
 StringVariableSelectionDialog_0=&Edit Variables...
+StringVariableSelectionDialog_9=&Show All
+StringVariableSelectionDialog_10=Only the most common variables are shown.
+StringVariableSelectionDialog_11=Some variables may not work in this context.
+
 SystemPropertyArgumentSelector_0=Select System Property
 SystemPropertyArgumentSelector_1=Select a system property (? = any character, * = any String):
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
index 98b70f2..690347d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousTableModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -146,12 +146,12 @@ public class AsynchronousTableModel extends AsynchronousModel {
     			for (int i = 0; i < childrenNodes.length; i++) {
 					kids.add(childrenNodes[i].getElement());
 				}
-    		}
-    		for (int i = 0; i < elements.length; i++) {
-    			if (kids.remove(elements[i])) {
-    				changed = true;
+    			for (int i = 0; i < elements.length; i++) {
+        			if (kids.remove(elements[i])) {
+        				changed = true;
+        			}
     			}
-			}
+    		}
 		}
     	if (changed) {
     		setChildren(getRootNode(), kids);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
index 9ecf2ee..4adec27 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/PartPresentationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,23 +17,21 @@ import org.eclipse.ui.IWorkbenchPart;
  * A presentation context tied to a part.
  * 
  * @since 3.3
+ * @deprecated getPart() is now supported by IPresentationContext itself.
  */
 public class PartPresentationContext extends PresentationContext {
 	
-	private IWorkbenchPart fPart;
-
 	/**
 	 * Constructs a part presentation context.
 	 *  
 	 * @param part part 
 	 */
 	public PartPresentationContext(IWorkbenchPart part) {
-		super(part.getSite().getId());
-		fPart = part;
+		super(part);
 	}
 	
 	public IWorkbenchPart getPart() {
-		return fPart;
+	    return super.getPart();
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
index 52ec2db..910b640 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/breadcrumb/BreadcrumbViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,6 @@ import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.viewers.ViewerLabel;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.MenuDetectEvent;
 import org.eclipse.swt.events.MenuDetectListener;
 import org.eclipse.swt.events.TraverseEvent;
@@ -122,16 +121,6 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
             }
         });
 
-		
-		fContainer.addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-			    if (fGradientBackground != null) {
-			        fGradientBackground.dispose();
-			        fGradientBackground = null;
-			    }
-			}
-		});
-
 		hookControl(fContainer);
 
 		int columns= 1000;
@@ -872,5 +861,29 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
 	private static int blend(int v1, int v2, int ratio) {
 		int b = (ratio * v1 + (100 - ratio) * v2) / 100;
 		return Math.min(255, b);
-	}	
+	}
+
+	/*
+	 * @see
+	 * org.eclipse.jface.viewers.StructuredViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+	 * 
+	 * @since 3.7
+	 */
+	protected void handleDispose(DisposeEvent event) {
+		if (fGradientBackground != null) {
+			fGradientBackground.dispose();
+			fGradientBackground= null;
+		}
+
+		if (fBreadcrumbItems != null) {
+			Iterator iterator= fBreadcrumbItems.iterator();
+			while (iterator.hasNext()) {
+				BreadcrumbItem item= (BreadcrumbItem)iterator.next();
+				item.dispose();
+			}
+		}
+
+		super.handleDispose(event);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
index eb4da11..1988c8d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,11 +48,11 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
 			getContentProvider().setModelChildCount(elementPath, fCount);
 			viewCount = getContentProvider().modelToViewChildCount(elementPath, fCount);
 		}
-		if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("setChildCount(" + getElement() + ", modelCount: " + fCount + " viewCount: " + viewCount + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
 		getContentProvider().getViewer().setChildCount(elementPath, viewCount);
-		getContentProvider().doRestore(getElementPath(), -1, true, true);
+		getContentProvider().restorePendingStateOnUpdate(getElementPath(), -1, true, true, false);
 	}
 
 	public void setChildCount(int numChildren) {
@@ -76,7 +76,7 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
 				return true;
 			} else if (getElementContentProvider().equals(request.getElementContentProvider())) {
 				if (fBatchedRequests == null) {
-					fBatchedRequests = new ArrayList();
+					fBatchedRequests = new ArrayList(4);
 					fBatchedRequests.add(this);
 				}
 				fBatchedRequests.add(request);
@@ -103,6 +103,19 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU
 			getElementContentProvider().update(updates);
 		}
 	}
+	
+	boolean containsUpdate(TreePath path) {
+	    if (getElementPath().equals(path)) {
+	        return true;
+	    } else if (fBatchedRequests != null) {
+	        for (int i = 0; i < fBatchedRequests.size(); i++) {
+	            if (((ViewerUpdateMonitor)fBatchedRequests.get(i)).getElementPath().equals(path)) {
+	                return true;
+	            }
+	        }
+	    }
+	    return false;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#getPriority()
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
index bc17d93..81c94cd 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,7 +57,7 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
 					int viewIndex = provider.modelToViewIndex(elementPath, modelIndex);
 					if (provider.shouldFilter(elementPath, element)) {
 						if (provider.addFilteredIndex(elementPath, modelIndex, element)) {
-							if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+                            if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 								System.out.println("REMOVE(" + getElement() + ", modelIndex: " + modelIndex + " viewIndex: " + viewIndex + ", " + element + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 							}
 							viewer.remove(elementPath, viewIndex);
@@ -71,17 +71,19 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
 							}
 							viewer.insert(elementPath, element, insertIndex);
 						} else {
-							if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		                    if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 								System.out.println("replace(" + getElement() + ", modelIndex: " + modelIndex + " viewIndex: " + viewIndex + ", " + element + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 							}
 							viewer.replace(elementPath, viewIndex, element);
 						}
 						TreePath childPath = elementPath.createChildPath(element);
 						provider.updateHasChildren(childPath);
-						provider.doRestore(childPath, modelIndex, false, false);
+						provider.restorePendingStateOnUpdate(childPath, modelIndex, false, false, false);
 					}
 				}
 			}
+			
+            provider.restorePendingStateOnUpdate(elementPath, -1, true, true, true);
 		} else {
 			provider.updateHasChildren(elementPath);
 		}
@@ -115,7 +117,7 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
 					fIndex = Math.min(fIndex, otherStart);
 					end = Math.max(end, otherEnd);
 					fLength = end - fIndex;
-					if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+					if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 						System.out.println("coalesced: " + this.toString()); //$NON-NLS-1$
 					}
 					return true;
@@ -124,7 +126,13 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda
 		}
 		return false;
 	}
+	
+	boolean containsUpdate(TreePath path) {
+        return getElementPath().equals(path);
+    }
+
 
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate#getLength()
 	 */
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
index 66b44cc..f856855 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ class ElementCompareRequest extends MementoUpdate implements IElementCompareRequ
 	private ModelDelta fDelta;
     private boolean fKnowsHasChildren;
     private boolean fKnowsChildCount;
+    private boolean fCheckChildrenRealized;
 	
 	
 	/**
@@ -37,13 +38,17 @@ class ElementCompareRequest extends MementoUpdate implements IElementCompareRequ
 	 * @param element
 	 * @param memento
 	 */
-	public ElementCompareRequest(ModelContentProvider provider, Object viewerInput, Object element, TreePath elementPath, IMemento memento, ModelDelta delta, int modelIndex, boolean hasChildren, boolean knowsChildCount) {
+	public ElementCompareRequest(ModelContentProvider provider, Object viewerInput, Object element, 
+	    TreePath elementPath, IMemento memento, ModelDelta delta, int modelIndex, 
+	    boolean hasChildren, boolean knowsChildCount, boolean checkChildrenRealized) 
+	{
 		super(provider, viewerInput, provider.getPresentationContext(), element, elementPath, memento);
 		fProvider = provider;
 		fDelta = delta;
 		fModelIndex = modelIndex;
 		fKnowsHasChildren = hasChildren;
 		fKnowsChildCount = knowsChildCount;
+		fCheckChildrenRealized = checkChildrenRealized;
 	}
 
 	/* (non-Javadoc)
@@ -96,4 +101,20 @@ class ElementCompareRequest extends MementoUpdate implements IElementCompareRequ
 	boolean knowChildCount() {
 		return fKnowsChildCount;
 	}
+
+    void setCheckChildrenRealized(boolean checkChildrenRealized) {
+        fCheckChildrenRealized = checkChildrenRealized; 
+    }
+    
+    boolean checkChildrenRealized() {
+        return fCheckChildrenRealized;
+    }
+    
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append("IElementCompareRequest: "); //$NON-NLS-1$
+        buf.append(getElement());
+        return buf.toString();
+    }
+
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
index f821e19..8a09d52 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementMementoRequest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,4 +46,10 @@ class ElementMementoRequest extends MementoUpdate implements IElementMementoRequ
 		fManager.requestComplete(this);
 	}
 
+	public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append("IElementMementoRequest: "); //$NON-NLS-1$
+        buf.append(getElement());
+        return buf.toString();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
index a405dec..28abfc6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/FilterTransform.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -322,12 +322,13 @@ public class FilterTransform {
 
 	/**
 	 * Filters the specified child of the given parent and returns
-	 * whether the child was already filtered.
+	 * whether the filter was added.
 	 * 
 	 * @param parentPath path to parent element
 	 * @param childIndex index of filtered child relative to parent (in model coordinates)
 	 * @param element the filtered element
-	 * @return whether the child was already filtered
+	 * @return whether the filter was added - returns <code>true</code> if the filter is
+	 *  added, and <code>false</code> if the index was already filtered
 	 */
 	public synchronized boolean addFilteredIndex(TreePath parentPath, int childIndex, Object element) {
 		return root.addFilter(parentPath, childIndex, 0, element);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
index be08635..e1437c9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/HasChildrenUpdate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
 		if (!fHasChildren) {
 			contentProvider.clearFilters(elementPath);
 		}
-		if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+        if (ModelContentProvider.DEBUG_CONTENT_PROVIDER && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("setHasChildren(" + getElement() + " >> " + fHasChildren); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		contentProvider.getViewer().setHasChildren(elementPath, fHasChildren);
@@ -53,7 +53,7 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
 			contentProvider.getViewer().autoExpand(elementPath);
 		}
 		if (elementPath.getSegmentCount() > 0) {
-			getContentProvider().doRestore(getElementPath(), -1, true, false);
+			getContentProvider().restorePendingStateOnUpdate(getElementPath(), -1, true, false, false);
 		}
 	}
 
@@ -106,6 +106,20 @@ class HasChildrenUpdate extends ViewerUpdateMonitor implements IHasChildrenUpdat
 		}
 	}
 
+	boolean containsUpdate(TreePath path) {
+        if (getElementPath().equals(path)) {
+            return true;
+        } else if (fBatchedRequests != null) {
+            for (int i = 0; i < fBatchedRequests.size(); i++) {
+                if (((ViewerUpdateMonitor)fBatchedRequests.get(i)).getElementPath().equals(path)) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.model.ViewerUpdateMonitor#getPriority()
 	 */
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IMementoManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IMementoManager.java
index 92f1d43..665c369 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IMementoManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/IMementoManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,4 +35,9 @@ interface IMementoManager {
 	 * Process the queued requests. Accepts no more new requests.
 	 */
 	public void processReqeusts();
+
+    /**
+     * Cancels the requests in progress.
+     */
+    public void cancel();
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelCheckProviderTarget.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelCheckProviderTarget.java
new file mode 100644
index 0000000..1348f25
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelCheckProviderTarget.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation  (Bug 286310)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model;
+
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ *  This interface can be implemented by the viewer which uses the
+ * {@link TreeModelLabelProvider} label provider and supports the 
+ * {@link org.eclipse.swt.SWT.CHECK} style.  It allows the label provider to 
+ * update the viewer with check-box information retrieved from the 
+ * element-based label providers.
+ * 
+ * @since 3.6
+ */
+public interface ITreeModelCheckProviderTarget extends ITreeModelLabelProviderTarget {
+    
+    /**
+     * Sets the element check state data.
+     * 
+     * @param path
+     * @param checked
+     * @param grayed
+     */
+    public void setElementChecked(TreePath path, boolean checked, boolean grayed);    
+
+    /**
+     * Retrieves the element check state.
+     * 
+     * @param path
+     * @return checked
+     */
+    public boolean getElementChecked(TreePath path);    
+
+    /**
+     * Retrieves the element's check box grayed state.
+     * 
+     * @param path
+     * @return grayed
+     */
+    public boolean getElementGrayed(TreePath path);    
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
index 6d0992a..1bbb00b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java
@@ -12,7 +12,9 @@ package org.eclipse.debug.internal.ui.viewers.model;
 
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
 import org.eclipse.jface.viewers.ILazyTreePathContentProvider;
 import org.eclipse.jface.viewers.TreePath;
 
@@ -24,6 +26,34 @@ import org.eclipse.jface.viewers.TreePath;
 public interface ITreeModelContentProvider extends ILazyTreePathContentProvider {
 
     /**
+     * Bit-mask which allows all possible model delta flags.
+     * 
+     * @since 3.6
+     * @see #setModelDeltaMask(int)
+     */
+    public static final int ALL_MODEL_DELTA_FLAGS = ~0; 
+
+    /**
+     * Bit-mask which allows only flags which control selection and expansion. 
+     * 
+     * @since 3.6
+     * @see #setModelDeltaMask(int)
+     */
+    public static final int CONTROL_MODEL_DELTA_FLAGS = 
+        IModelDelta.EXPAND | IModelDelta.COLLAPSE | IModelDelta.SELECT | IModelDelta.REVEAL | IModelDelta.FORCE;
+
+    /**
+     * Bit-mask which allows only flags which update viewer's information
+     * about the model.
+     * 
+     * @since 3.6
+     * @see #setModelDeltaMask(int)
+     */
+    public static final int UPDATE_MODEL_DELTA_FLAGS = 
+        IModelDelta.ADDED | IModelDelta.CONTENT | IModelDelta.INSERTED | IModelDelta.INSTALL | IModelDelta.REMOVED |
+        IModelDelta.REPLACED | IModelDelta.STATE | IModelDelta.UNINSTALL;
+
+    /**
      * Translates and returns the given child index from the viewer coordinate
      * space to the model coordinate space.
      *  
@@ -72,20 +102,25 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
     public void unmapPath(TreePath path);
 
     /**
-     * Turns on the mode which causes the model viewer to ignore SELECT, 
-     * EXPAND, and COLLAPSE flags of {@link IModelDelta}.
+     * Sets the bit mask which will be used to filter the {@link IModelDelta}
+     * coming from the model.  Any delta flags which are hidden by the mask
+     * will be ignored.
      *  
-     * @param suppress If <code>true</code> it turns on the suppress mode.
+     * @param the bit mask for <code>IModelDelta</code> flags
+     * 
+     * @since 3.6
      */
-    public void setSuppressModelControlDeltas(boolean suppress);
+    public void setModelDeltaMask(int mask);
     
     /**
-     * Returns true if the viewer is currently in the mode to ignore SELECT, 
-     * REVEAL, EXPAND, and COLLAPSE flags of {@link IModelDelta}.
-     *  
-     * @return Returns <code>true</code> if in suppress mode.
+     * Returns the current model delta mask.
+     * 
+     * @return bit mask used to filter model delta events.
+     * 
+     * @see #setModelDeltaMask(int)
+     * @since 3.6
      */
-    public boolean isSuppressModelControlDeltas();
+    public int getModelDeltaMask();
     
     /**
      * Translates and returns the given child count from the model coordinate
@@ -119,12 +154,42 @@ public interface ITreeModelContentProvider extends ILazyTreePathContentProvider
      */
     public void removeModelChangedListener(IModelChangedListener listener);
     
+
+    /**
+     * Registers the specified listener for state update notifications.
+     * @since 3.6
+     */
+    public void addStateUpdateListener(IStateUpdateListener listener);
+
+    /**
+     * Removes the specified listener from state update notifications.
+     * @since 3.6
+     */
+    public void removeStateUpdateListener(IStateUpdateListener listener);
+
     /**
      * Instructs the content provider to process the given model delta.  This
      * mechanism can be used to control the view's layout (expanding, selecting
      * , etc.) 
      * 
      * @param delta The model delta to process.
+     * @param mask Mask that can be used to suppress processing of some of the 
+     * delta flags
+     * 
+     * @since 3.6
+     */
+    public void updateModel(IModelDelta delta, int mask);
+
+    /**
+     * Instructs the content provider to cancel any pending state changes 
+     * (i.e. SELECT, REVEAL, EXPAND, COLLAPSE) for the given path.  Pending
+     * state changes are changes the the viewer plans to re-apply to the 
+     * viewer following a refresh.  If the user changes viewer state while
+     * the viewer is being refreshed, user's change should override the 
+     * previous state. 
+     * 
+     * @param path Path of the element for which to cancel pending changes.
+     * @param flags Flags indicating the changes to cancel.
      */
-    public void updateModel(IModelDelta delta);
+    public void cancelRestore(TreePath path, int flags);
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProviderTarget.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProviderTarget.java
index 701ebca..4e65183 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProviderTarget.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProviderTarget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
+ * Copyright (c) 2009, 2010 Wind River Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     Wind River Systems - initial API and implementation
+ *     IBM Corporation - ongoing bug fixes and enhancements
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
@@ -206,7 +207,16 @@ public interface ITreeModelContentProviderTarget extends ITreeModelViewer {
     public boolean getExpandedState(Object elementOrTreePath);
     
     /**
-     * Returns the child count of the element at the given path.
+     * Returns whether the given element has children.
+     * 
+     * @since 3.6
+     */
+    public boolean getHasChildren(Object elementOrTreePath);
+    
+    /**
+     * Returns the child count of the element at the given path. <br>
+     * Note: The child count may be incorrect if the element is not
+     * expanded in the tree.
      */
     public int getChildCount(TreePath path);
 
@@ -229,4 +239,23 @@ public interface ITreeModelContentProviderTarget extends ITreeModelViewer {
      */
     public int findElementIndex(TreePath parentPath, Object element);
 
+    /**
+     * Returns a boolean indicating whether all the child elements of the 
+     * given parent have been realized already.
+     * 
+     * @param parentPath
+     * @return
+     *
+     * @since 3.6
+     */
+    public boolean getElementChildrenRealized(TreePath parentPath);
+    
+    /**
+     * Clears the selection in the viewer, if any, without firing
+     * selection change notification. This is only to be used by
+     * the platform.
+     * 
+     * @since 3.6
+     */
+    public void clearSelectionQuiet();
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
index f834b75..95b345b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
+ * Copyright (c) 2009, 2010 Wind River Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,14 +7,18 @@
  * 
  * Contributors:
  *     Wind River Systems - initial API and implementation
+ *     IBM Corporation - ongoing bug fixes and enhancements
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.TreePath;
@@ -74,7 +78,9 @@ public interface ITreeModelViewer extends ISelectionProvider {
     public ISelection getSelection();
 
     /**
-      * Sets a new selection for this viewer and optionally makes it visible.
+     * Sets a new selection for this viewer and optionally makes it visible.
+     * The selection is not set if the model selection policy overrides the
+     * attempt to set the selection.
      * 
      * @param selection the new selection
      * @param reveal <code>true</code> if the selection is to be made
@@ -83,6 +89,20 @@ public interface ITreeModelViewer extends ISelectionProvider {
      *   model selection policy
      */
     public void setSelection(ISelection selection, boolean reveal, boolean force);
+    
+    /**
+     * Attempts to set the selection for this viewer and optionally makes it visible.
+     * The selection is not set if the model selection policy overrides the
+     * attempt to set the selection.
+     * 
+     * @param selection the new selection
+     * @param reveal whether to make the selection visible after successfully setting
+     *  the selection
+     * @param force whether to force the selection (override the model selection policy)
+     * @return <code>true</code> if the selection was set and <code>false</code> if the
+     *  model selection policy overrides the selection attempt
+     */
+    public boolean trySelection(ISelection selection, boolean reveal, boolean force);
 
     /**
      * Returns the auto-expand level.
@@ -138,6 +158,18 @@ public interface ITreeModelViewer extends ISelectionProvider {
     public void removeViewerUpdateListener(IViewerUpdateListener listener);
     
     /**
+     * Registers the specified listener for state update notifications.
+     * @since 3.6
+     */
+    public void addStateUpdateListener(IStateUpdateListener listener);
+    
+    /**
+     * Removes the specified listener from state update notifications.
+     * @since 3.6
+     */
+    public void removeStateUpdateListener(IStateUpdateListener listener);
+    
+    /**
      * Registers the specified listener for view label update notifications.
      */
     public void addLabelUpdateListener(ILabelUpdateListener listener);
@@ -165,8 +197,16 @@ public interface ITreeModelViewer extends ISelectionProvider {
      * as it parses the sub-tree.
      * @param path Path where to start saving the state.
      * @param delta The delta where the state is to be saved.
+     * @param flagsToSave The flags to preserve during the state save.  The 
+     * supported flags are <code>IModelDelta.SELECT</code>, 
+     * <code>IModelDelta.EXPAND</code>, <code>IModelDelta.COLLAPSE</code>.
+     * @return Returns whether the state was saved for the given path.  Will 
+     * return <code>false</code> if an element at the given path cannot 
+     * be found.
+     *
+     * @since 3.6
      */
-    public void saveElementState(TreePath path, ModelDelta delta);
+    public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave);
     
     /**
      * Causes the viewer to process the given delta as if it came from a
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
index 10d404c..b342feb 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
+ *     Patrick Chuong (Texas Instruments) - added support for checkbox (Bug 286310)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
@@ -24,6 +25,8 @@ import java.util.Map.Entry;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.debug.internal.core.commands.Request;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentation;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
@@ -33,8 +36,10 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProv
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
@@ -43,6 +48,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.IBasicPropertyConstants;
 import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.ILazyTreePathContentProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.TreePath;
@@ -55,6 +61,8 @@ import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.PaintEvent;
 import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TreeEvent;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
@@ -78,7 +86,7 @@ import org.eclipse.ui.IMemento;
  * @since 3.3
  */
 public class InternalTreeModelViewer extends TreeViewer 
-    implements ITreeModelViewer,  ITreeModelContentProviderTarget, ITreeModelLabelProviderTarget
+    implements ITreeModelViewer,  ITreeModelContentProviderTarget, ITreeModelLabelProviderTarget, ITreeModelCheckProviderTarget
 {
 	
 	private IPresentationContext fContext;
@@ -157,16 +165,6 @@ public class InternalTreeModelViewer extends TreeViewer
 	private boolean fNotifyUnmap = true;
 	
 	/**
-	 * Flag indicating whether the viewer is a pop-up viewer.  A pop-up viewer 
-	 * is transient and does not automatically expand and select elements up
-	 * when requested by the model.  It also does not dispose the presentation 
-	 * context when its control is disposed. 
-	 * 
-	 * @since 3.5
-	 */
-	private boolean fIsPopup;
-	
-	/**
 	 * Persist column sizes when they change.
 	 * 
 	 * @since 3.2
@@ -1011,10 +1009,15 @@ public class InternalTreeModelViewer extends TreeViewer
 		setContentProvider(createContentProvider());
 		setLabelProvider(createLabelProvider());
 		
-		fIsPopup = (style & SWT.POP_UP) != 0;
-		if (fIsPopup) {
-		    ((ITreeModelContentProvider)getContentProvider()).setSuppressModelControlDeltas(true);
-		}
+		// A pop-up viewer is transient and does not automatically expand
+		// and select elements up when requested by the model  
+		if ((style & SWT.POP_UP) != 0) {
+		    ((ITreeModelContentProvider)getContentProvider()).setModelDeltaMask(
+		        ~ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
+		}
+        if ((style & SWT.CHECK) != 0) {
+            context.setProperty(ICheckUpdate.PROP_CHECK, Boolean.TRUE);
+        }
 	}
 	
 	/**
@@ -1088,6 +1091,14 @@ public class InternalTreeModelViewer extends TreeViewer
 				item.setBackground(i, (Color) backgrounds[i]);
 			}
 		}
+        Boolean checked = (Boolean) item.getData(PREV_CHECKED_KEY);
+        if (checked != null) {
+            item.setChecked(checked.booleanValue());
+	    }
+        Boolean grayed = (Boolean) item.getData(PREV_GRAYED_KEY);
+        if (grayed != null) {
+            item.setGrayed(grayed.booleanValue());
+        }
 	}
 
     /* (non-Javadoc)
@@ -1126,9 +1137,6 @@ public class InternalTreeModelViewer extends TreeViewer
 		}
 		fCellModifier.dispose();
 		
-		if (!fIsPopup) {
-		    fContext.dispose();
-		}
 		super.handleDispose(event);
 	}
 	
@@ -1231,7 +1239,7 @@ public class InternalTreeModelViewer extends TreeViewer
 	    	if (factory != null) {
 	    		type = factory.getColumnPresentationId(context, input);
 	    	}
-			if (type != null) {
+			if (type != null && factory != null) {
 				if (fColumnPresentation != null) {
 					if (!fColumnPresentation.getId().equals(type)) {
 						// dispose old, create new
@@ -1385,10 +1393,12 @@ public class InternalTreeModelViewer extends TreeViewer
     	Tree tree = getTree();
 		final TreeColumn[] columns = tree.getColumns();
 		String[] visibleColumnIds = getVisibleColumns();
+		// remove all listeners before disposing - see bug 223233
+    	for (int i = 0; i < columns.length; i++) {
+    		columns[i].removeControlListener(fListener);
+    	}
     	for (int i = 0; i < columns.length; i++) {
-    		TreeColumn treeColumn = columns[i];
-    		treeColumn.removeControlListener(fListener);
-			treeColumn.dispose();
+			columns[i].dispose();
 		}
     	PresentationContext presentationContext = (PresentationContext) getPresentationContext();
     	if (presentation != null) {	    	
@@ -1674,24 +1684,26 @@ public class InternalTreeModelViewer extends TreeViewer
 		super.setSelection(selection, reveal);
 	}
 	
-	/**
-	 * Sets the selection in the viewer to the specified selection.
-	 * 
-	 * @param selection the selection
-	 * @param reveal whether to reveal the selection
-	 * @param force whether to force the selection (i.e. <code>true</code> to
-	 *  override the model selection policy)
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
 	 */
 	public void setSelection(ISelection selection, boolean reveal, boolean force) {
-		if (force) {
+		trySelection(selection, reveal, force);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#trySelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
+	 */
+	public boolean trySelection(ISelection selection, boolean reveal, boolean force) {
+		if (force || overrideSelection(getSelection(), selection)) {
 			super.setSelection(selection, reveal);
-		} else {
-			setSelection(selection, reveal);
+			return true;
 		}
+		return false;
 	}
-	
 	/**
-	 * Registers the specified listener for view update notifications.
+ 	 * Registers the specified listener for view update notifications.
 	 * 
 	 * @param listener listener
 	 */
@@ -1731,7 +1743,18 @@ public class InternalTreeModelViewer extends TreeViewer
 			cp.removeModelChangedListener(listener);
 		}
 	}
-	
+
+    public void addStateUpdateListener(IStateUpdateListener listener) {
+        ((ITreeModelContentProvider)getContentProvider()).addStateUpdateListener(listener);
+    }
+    
+    public void removeStateUpdateListener(IStateUpdateListener listener) {
+        ITreeModelContentProvider cp = (ITreeModelContentProvider)getContentProvider();
+        if (cp !=  null) {
+            cp.removeStateUpdateListener(listener);
+        }
+    }
+    
 	/*
 	 * (non-Javadoc) Method declared in AbstractTreeViewer.
 	 */
@@ -1938,6 +1961,54 @@ public class InternalTreeModelViewer extends TreeViewer
 				.updateElement(treePath, index);
 	}	
 	
+//**************************************************************************    
+// Another couple of methods copied from TreeViewer to workaround the UI bug 266189.
+// 	
+    protected void createChildren(Widget widget) {
+        Object element = widget.getData();
+        if (element == null && widget instanceof TreeItem) {
+            // parent has not been materialized
+            virtualMaterializeItem((TreeItem) widget);
+            // try getting the element now that updateElement was called
+            element = widget.getData();
+        }
+        if (element ==  null) {
+            // give up because the parent is still not materialized
+            return;
+        }
+        Item[] children = getChildren(widget);
+        if (children.length == 1 && children[0].getData() == null) {
+            // found a dummy node
+            virtualLazyUpdateChildCount(widget, children.length);
+            children = getChildren(widget);
+        }
+        // DO NOT touch all children
+        return;
+    }
+
+    private void virtualMaterializeItem(TreeItem treeItem) {
+        if (treeItem.getData() != null) {
+            // already materialized
+            return;
+        }
+
+        int index;
+        Widget parent = treeItem.getParentItem();
+        if (parent == null) {
+            parent = treeItem.getParent();
+        }
+        Object parentElement = parent.getData();
+        if (parentElement != null) {
+            if (parent instanceof Tree) {
+                index = ((Tree) parent).indexOf(treeItem);
+            } else {
+                index = ((TreeItem) parent).indexOf(treeItem);
+            }
+            virtualLazyUpdateWidget(parent, index);
+        }
+    }
+
+
 	/**
 	 * Performs auto expand on an element at the specified path if the auto expand
 	 * level dictates the element should be expanded.
@@ -1968,6 +2039,19 @@ public class InternalTreeModelViewer extends TreeViewer
         return -1;
     }
 
+    public boolean getElementChildrenRealized(TreePath parentPath) {
+        Widget parentItem = findItem(parentPath);
+        if (parentItem != null) {
+            Item[] children = getChildren(parentItem);
+            for (int i = 0; i < children.length; i++) {
+                if (children[i].getData() == null) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+    
     public Display getDisplay() {
         Control control = getControl();
         if (control != null) {
@@ -1991,6 +2075,8 @@ public class InternalTreeModelViewer extends TreeViewer
     static String PREV_FONT_KEY = "PREV_FONT_KEY"; //$NON-NLS-1$
     static String PREV_FOREGROUND_KEY = "PREV_FOREGROUND_KEY"; //$NON-NLS-1$
     static String PREV_BACKGROUND_KEY = "PREV_BACKGROUND_KEY"; //$NON-NLS-1$
+    static String PREV_CHECKED_KEY = "PREV_CHECKED_KEY"; //$NON-NLS-1$
+    static String PREV_GRAYED_KEY = "PREV_GRAYED_KEY"; //$NON-NLS-1$
 
     public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] imageDescriptors,
         FontData[] fontDatas, RGB[] _foregrounds, RGB[] _backgrounds) 
@@ -2183,7 +2269,7 @@ public class InternalTreeModelViewer extends TreeViewer
         return null;
     }
     
-    public void saveElementState(TreePath path, ModelDelta delta) {
+    public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave) {
         Tree tree = (Tree) getControl();
         TreeItem[] selection = tree.getSelection();
         Set set = new HashSet();
@@ -2196,49 +2282,62 @@ public class InternalTreeModelViewer extends TreeViewer
         if (w instanceof Tree) {
             delta.setChildCount(
                 ((ITreeModelContentProvider)getContentProvider()).viewToModelCount(path, tree.getItemCount()));
-            delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+            if ((flagsToSave & IModelDelta.EXPAND) != 0) {
+                delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+            }
             items = tree.getItems(); 
         } else if (w instanceof TreeItem) {
             TreeItem item = (TreeItem)w;
-            delta.setChildCount(
-                ((ITreeModelContentProvider)getContentProvider()).viewToModelCount(path, item.getItemCount()));
+            int itemCount = item.getItemCount();
+            delta.setChildCount(((ITreeModelContentProvider)getContentProvider()).viewToModelCount(path, itemCount));
             if (item.getExpanded()) {
-                delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+                if ((flagsToSave & IModelDelta.EXPAND) != 0) {
+                    delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+                }
+            } else if ((flagsToSave & IModelDelta.COLLAPSE) != 0 && itemCount > 0){
+                delta.setFlags(delta.getFlags() | IModelDelta.COLLAPSE);
             }
-            if (set.contains(item)) {
+            
+            if (set.contains(item) && (flagsToSave & IModelDelta.SELECT) != 0) {
                 delta.setFlags(delta.getFlags() | IModelDelta.SELECT);
             }
             items = ((TreeItem)w).getItems();
         }
-        if (items != null) {
+        if (items != null && items.length != 0) {
             for (int i = 0; i < items.length; i++) {
-                doSaveElementState(path, delta, items[i], set, i);
+                doSaveElementState(path, delta, items[i], set, i, flagsToSave);
             }
+            return true;
+        } else {
+            return false;
         }
     }
     
-    private void doSaveElementState(TreePath parentPath, ModelDelta delta, TreeItem item, Collection set, int index) {
+    private void doSaveElementState(TreePath parentPath, ModelDelta delta, TreeItem item, Collection set, int index, int flagsToSave) {
         Object element = item.getData();
         if (element != null) {
             boolean expanded = item.getExpanded();
             boolean selected = set.contains(item);
-            if (expanded || selected) {
-                int flags = IModelDelta.NO_CHANGE;
-                if (expanded) {
-                    flags = flags | IModelDelta.EXPAND;
-                }
-                if (selected) {
-                    flags = flags | IModelDelta.SELECT;
-                }
+            int itemCount = item.getItemCount();
+            int flags = IModelDelta.NO_CHANGE;
+            if (expanded && (flagsToSave & IModelDelta.EXPAND) != 0) {
+                flags = flags | IModelDelta.EXPAND;
+            } 
+            if (!expanded && (flagsToSave & IModelDelta.COLLAPSE) != 0 && itemCount > 0) {
+                flags = flags | IModelDelta.COLLAPSE;
+            }
+            if (selected && (flagsToSave & IModelDelta.SELECT) != 0) {
+                flags = flags | IModelDelta.SELECT;
+            }
+            if (expanded || flags != IModelDelta.NO_CHANGE) {
                 int modelIndex = ((ITreeModelContentProvider)getContentProvider()).viewToModelIndex(parentPath, index);
                 TreePath elementPath = parentPath.createChildPath(element);
-                int numChildren = ((ITreeModelContentProvider)getContentProvider()).
-                    viewToModelCount(elementPath, item.getItemCount());
+                int numChildren = ((ITreeModelContentProvider)getContentProvider()).viewToModelCount(elementPath, itemCount);
                 ModelDelta childDelta = delta.addNode(element, modelIndex, flags, numChildren);
                 if (expanded) {
                     TreeItem[] items = item.getItems();
                     for (int i = 0; i < items.length; i++) {
-                        doSaveElementState(elementPath, childDelta, items[i], set, i);
+                        doSaveElementState(elementPath, childDelta, items[i], set, i, flagsToSave);
                     }
                 }
             }
@@ -2246,6 +2345,131 @@ public class InternalTreeModelViewer extends TreeViewer
     }
     
     public void updateViewer(IModelDelta delta) {
-        ((ITreeModelContentProvider)getContentProvider()).updateModel(delta);
+        ((ITreeModelContentProvider)getContentProvider()).updateModel(delta, ITreeModelContentProvider.ALL_MODEL_DELTA_FLAGS);
     }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelCheckProvider#setElementChecked(org.eclipse.jface.viewers.TreePath, boolean, boolean)
+     */
+	public void setElementChecked(TreePath path, boolean checked, boolean grayed) {
+	   	 Widget widget = findItem(path);
+		 
+		 if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
+	         TreeItem item = (TreeItem)widget;
+	         
+	         item.setChecked(checked);
+	         item.setGrayed(grayed);
+	         
+	         item.setData(PREV_CHECKED_KEY, checked ? Boolean.TRUE : Boolean.FALSE);
+             item.setData(PREV_GRAYED_KEY, grayed ? Boolean.TRUE : Boolean.FALSE);
+		 }
+	}
+	
+    public boolean getElementChecked(TreePath path) {
+        Widget widget = findItem(path);
+        
+        if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
+            TreeItem item = (TreeItem)widget;
+            
+            return item.getChecked();
+        }        
+        return false;
+    }
+
+    /**
+     * Retrieves the element's check box grayed state.
+     * 
+     * @param path
+     * @return grayed
+     */
+    public boolean getElementGrayed(TreePath path) {
+        Widget widget = findItem(path);
+        
+        if (widget != null && widget instanceof TreeItem && !widget.isDisposed()) {
+            TreeItem item = (TreeItem)widget;
+            
+            return item.getGrayed();
+        }        
+        return false;
+    }
+
+    public boolean getHasChildren(Object elementOrTreePath) {
+        if (elementOrTreePath instanceof TreePath && 
+            ((TreePath)elementOrTreePath).getSegmentCount() == 0) 
+        {
+            return getTree().getItemCount() > 0;
+        }
+        
+        Widget[] items = internalFindItems(elementOrTreePath);
+        if (items != null && items.length > 0) {
+            if (items[0] instanceof TreeItem) {
+                return ((TreeItem)items[0]).getItemCount() > 0;
+            } else {
+                return ((Tree)items[0]).getItemCount() > 0;
+            }
+        }
+        
+        return false;
+    }
+    
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.StructuredViewer#handleSelect(org.eclipse.swt.events.SelectionEvent)
+	 */
+	protected void handleSelect(SelectionEvent event) {
+        super.handleSelect(event);
+
+        TreeItem item = (TreeItem) event.item;
+        if (item != null) { // item can be null when de-selected (bug 296703) 
+	        Object element = item.getData();
+	        IContentProvider contentProvider = getContentProvider();
+	        if (element != null && contentProvider instanceof TreeModelContentProvider) {
+	            TreePath path = getTreePathFromItem(item);
+	
+	            if (event.detail == SWT.CHECK) {
+	                boolean checked = item.getChecked();	            	
+	            	boolean accepted = false;
+	        		IModelProxy elementProxy = ((TreeModelContentProvider) contentProvider).getElementProxy(path);
+	        		if (elementProxy instanceof ICheckboxModelProxy) {
+	        			accepted = ((ICheckboxModelProxy) elementProxy).setChecked(getPresentationContext(), getInput(), path, checked);
+	        		}	            		
+	
+	        	    // if the listen rejects the change or there is not ICheckboxModelProxy, than revert the check state
+	            	if (!accepted) {
+	            		item.setChecked(!checked);
+	            	} else {
+	            	    item.setData(PREV_CHECKED_KEY, new Boolean(checked));
+	            	}
+	            } else {
+		            ((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.SELECT);
+	    		}
+	        }
+        }
+	}
+	
+	protected void handleTreeExpand(TreeEvent event) {
+        super.handleTreeExpand(event);
+        IContentProvider contentProvider = getContentProvider();
+        if (contentProvider instanceof TreeModelContentProvider) {
+            TreePath path = getTreePathFromItem((TreeItem)event.item);
+            ((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.COLLAPSE);
+        }
+	}
+	
+	protected void handleTreeCollapse(TreeEvent event) {
+	    super.handleTreeCollapse(event);
+        IContentProvider contentProvider = getContentProvider();
+        if (contentProvider instanceof TreeModelContentProvider) {
+            TreePath path = getTreePathFromItem((TreeItem)event.item);
+            ((TreeModelContentProvider) contentProvider).cancelRestore(path, IModelDelta.EXPAND);
+        }
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget#clearSelectionQuiet()
+	 */
+	public void clearSelectionQuiet() {
+		getTree().setSelection(new TreeItem[0]);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
index 222aba5..dff4d63 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalVirtualTreeModelViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
+ * Copyright (c) 2009, 2010 Wind River Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     Wind River Systems - initial API and implementation
+ *     IBM - ongoing bug fixing
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
@@ -29,6 +30,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedList
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
@@ -170,6 +172,12 @@ public class InternalVirtualTreeModelViewer extends Viewer
      */
     private Map fShowColumns = new HashMap();    
 
+    /**
+     * Runnable for validating the virtual tree.  It is scheduled to run in the 
+     * UI thread whenever a tree validation is requested.
+     */
+    private Runnable fValidateRunnable;
+    
     public InternalVirtualTreeModelViewer(Display display, int style, IPresentationContext context) {        
         fDisplay = display;
         fContext = context;        
@@ -180,7 +188,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
         fLabelProvider = new TreeModelLabelProvider(this);
         
         if ((style & SWT.POP_UP) != 0) {
-            ((ITreeModelContentProvider)getContentProvider()).setSuppressModelControlDeltas(true);
+            getContentProvider().setModelDeltaMask(~ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
         }
     }
 
@@ -236,6 +244,10 @@ public class InternalVirtualTreeModelViewer extends Viewer
                 //Object oldData = item.getData();
                 associate(element, item);
                 doUpdate(item);
+                VirtualItem[] children = item.getItems();
+                for (int j = 0; j < children.length; j++) {
+                    children[j].setNeedsDataUpdate();
+                }
             }
         }
         // Restore the selection if we are not already in a nested
@@ -248,7 +260,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
                 handleInvalidSelection(selection, newSelection);
             }
         }
-        fTree.validate();
+        validate();
     }
 
     VirtualTree getTree() {
@@ -261,12 +273,13 @@ public class InternalVirtualTreeModelViewer extends Viewer
             if (parentItem != null) {
                 VirtualItem item = parentItem.addItem(position);
                 item.setData(element);
-                
+                mapElement(element, item);
+                doUpdate(item);
             }
         } else {
             // TODO: Implement insert() for element
         }
-        fTree.validate();
+        validate();
     }
 
     public void remove(final Object parentOrTreePath, final int index) {
@@ -280,9 +293,18 @@ public class InternalVirtualTreeModelViewer extends Viewer
                     VirtualItem parentItem = parentItems[i];
                     if (parentItem.isDisposed())
                         continue;
+                    
+                    // Parent item is not expanded so just update its contents so that 
+                    // the plus sign gets refreshed.
+                    if (!parentItem.getExpanded()) {
+                        parentItem.setNeedsCountUpdate();
+                        parentItem.setItemCount(-1);
+                        virtualLazyUpdateHasChildren(parentItem);
+                    }
+                    
                     if (index < parentItem.getItemCount()) {
-                        
                         VirtualItem item =parentItem.getItem(new VirtualItem.Index(index));
+                        
                         if (item.getData() != null) {
                             removedPath = getTreePathFromItem(item);
                             disassociate(item);
@@ -367,6 +389,15 @@ public class InternalVirtualTreeModelViewer extends Viewer
         }
         return -1;
     }
+    
+    public boolean getElementChildrenRealized(TreePath parentPath) {
+        VirtualItem parentItem = findItem(parentPath);
+        if (parentItem != null) {
+            return !parentItem.childrenNeedDataUpdate();
+        }
+        return true;
+    }
+
 
     private ITreeModelLabelProvider getLabelProvider() {
         return fLabelProvider;
@@ -380,36 +411,69 @@ public class InternalVirtualTreeModelViewer extends Viewer
 
     public void refresh() {
         refresh(fTree);
-        getTree().validate();
+        validate();
     }
 
     public void refresh(Object element) {
         VirtualItem[] items = findItems(element);
         for (int i = 0; i < items.length; i++) {
             refresh(items[i]);
-            getTree().validate(items[i]);
+            validate();
         }
     }
 
     private void refresh(VirtualItem item) {
-        item.setNeedsCountUpdate();
-        item.setNeedsLabelUpdate();
+        if (!item.needsDataUpdate()) {
+            if (item.getParent() != null) {
+                item.setNeedsLabelUpdate();
+                virtualLazyUpdateHasChildren(item);
+            }
+            
+            VirtualItem[] items = item.getItems();
+            for (int i = 0; i < items.length; i++) {
+                items[i].setNeedsDataUpdate();
+            }
+        } 
+        refreshStruct(item);
+    }
+
+    private void refreshStruct(VirtualItem item) {
+        boolean expanded = false;
         if (item.getParent() == null) {
+            // root item
             virtualLazyUpdateChildCount(item);
-        } else if (item.getExpanded()) {
-            virtualLazyUpdateChildCount(item);
-        } else if (item.getData() != null) {
-            virtualLazyUpdateHasChildren(item);
+            expanded = true;
+        } else {
+            if (item.getExpanded()) {
+                virtualLazyUpdateData(item);
+                expanded = true;
+            } 
         } 
-        
+
         VirtualItem[] items = item.getItems();
         for (int i = 0; i < items.length; i++) {
-            items[i].setNeedsDataUpdate();
-            refresh(items[i]);
+            if (expanded) {
+                refreshStruct(items[i]);
+            } else {
+                item.clear(new VirtualItem.Index(i));
+            }
         }
     }
-
-
+    
+    private void validate() {
+        if (fValidateRunnable == null) {
+            fValidateRunnable = new Runnable() {
+                public void run() {
+                    if (!fTree.isDisposed()) {
+                        fValidateRunnable = null;
+                        fTree.validate();
+                    }
+                }
+            };
+            getDisplay().asyncExec(fValidateRunnable);
+        }
+    }
+    
     protected void inputChanged(Object input, Object oldInput) {
         resetColumns(input);
     }
@@ -481,7 +545,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
                 }
             }
         });
-        fTree.validate();
+        validate();
     }
 
     public void setHasChildren(final Object elementOrTreePath, final boolean hasChildren) {
@@ -504,7 +568,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
                     if (hasChildren) {
                         if (!item.getExpanded()) {
                             item.setItemCount(-1);
-                        } else if (item.needsCountUpdate()) {
+                        } else {
                             virtualLazyUpdateChildCount(item);
                         }
                     }
@@ -512,10 +576,19 @@ public class InternalVirtualTreeModelViewer extends Viewer
             }
         });
     }
+    
+    public boolean getHasChildren(Object elementOrTreePath) {
+        VirtualItem[] items = findItems(elementOrTreePath);
+        if (items.length > 0) {
+            return items[0].hasItems();
+        }
+        return false;
+    }
 
     private void virtualLazyUpdateHasChildren(VirtualItem item) {
         TreePath treePath;
         treePath = getTreePathFromItem(item);
+        item.clearNeedsCountUpdate();
         getContentProvider().updateHasChildren(treePath);
     }
 
@@ -593,7 +666,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
             if (item.needsLabelUpdate()) {
                 virtualLazyUpdateLabel(item);
             } 
-            if (item.getExpanded() && item.hasItems() && item.needsCountUpdate()) {
+            if (item.needsCountUpdate() && item.getExpanded()) {
                 virtualLazyUpdateChildCount(item);
             }
         } 
@@ -669,17 +742,19 @@ public class InternalVirtualTreeModelViewer extends Viewer
         setSelection(selection, reveal, false);
     }
     
-    /**
-     * Sets the selection in the viewer to the specified selection.
-     * 
-     * @param selection the selection
-     * @param reveal whether to reveal the selection
-     * @param force whether to force the selection (i.e. <code>true</code> to
-     *  override the model selection policy)
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#setSelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
      */
     public void setSelection(ISelection selection, boolean reveal, boolean force) {
-        if (!force && !overrideSelection(getSelection(), selection)) {
-            return;
+        trySelection(selection, reveal, force);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer#trySelection(org.eclipse.jface.viewers.ISelection, boolean, boolean)
+     */
+    public boolean trySelection(ISelection selection, boolean reveal, boolean force) {
+    	if (!force && !overrideSelection(getSelection(), selection)) {
+            return false;
         }
 
         if (!fPreservingSelecction) {
@@ -689,6 +764,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
             fRestoreSelection = false;
             internalSetSelection(selection, reveal);
         }
+        return true;
     }
 
     private void internalSetSelection(ISelection selection, boolean reveal) {
@@ -721,7 +797,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
         }
         
         // Make sure that the new selection is properly revealed.
-        fTree.validate();
+        validate();
     }
 
     public void update(Object element) {
@@ -733,7 +809,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
     
     public void doUpdate(VirtualItem item) {
         item.setNeedsLabelUpdate();
-        fTree.validate(item);
+        validate();
     }
 
     public ISelection getSelection() {
@@ -782,14 +858,15 @@ public class InternalVirtualTreeModelViewer extends Viewer
         if (items.length > 0) {
             expandToLevel(items[0], level);
         }
-        fTree.validate();
+        validate();
     }
 
     public void setExpandedState(Object elementOrTreePath, boolean expanded) {
         VirtualItem[] items = findItems(elementOrTreePath);
-        if (items.length > 0) {
-            items[0].setExpanded(expanded);
+        for (int i = 0; i < items.length; i++) {
+            items[i].setExpanded(expanded);
         }
+        validate();
     }
 
     public boolean getExpandedState(Object elementOrTreePath) {
@@ -806,10 +883,6 @@ public class InternalVirtualTreeModelViewer extends Viewer
                 return;
             }
             
-            if (item.getItemCount() < 0) {
-                virtualLazyUpdateChildCount(item);
-                item.clearNeedsCountUpdate();
-            }
             item.setExpanded(true);
 
             if (item.getData() == null) {
@@ -880,7 +953,6 @@ public class InternalVirtualTreeModelViewer extends Viewer
         if (fColumnPresentation != null) {
             fColumnPresentation.dispose();
         }
-        fContext.dispose();
         
         if (fContentProvider != null) {
             fContentProvider.dispose();
@@ -918,7 +990,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
             if (factory != null) {
                 type = factory.getColumnPresentationId(context, input);
             }
-            if (type != null) {
+            if (type != null && factory != null) {
                 if (fColumnPresentation != null) {
                     if (!fColumnPresentation.getId().equals(type)) {
                         // dispose old, create new
@@ -1172,7 +1244,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
     }
 
     public void addViewerUpdateListener(IViewerUpdateListener listener) {
-        ((ModelContentProvider)getContentProvider()).addViewerUpdateListener(listener);
+        getContentProvider().addViewerUpdateListener(listener);
     }
     
     public void removeViewerUpdateListener(IViewerUpdateListener listener) {
@@ -1183,7 +1255,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
     }
     
     public void addModelChangedListener(IModelChangedListener listener) {
-        ((ModelContentProvider)getContentProvider()).addModelChangedListener(listener); 
+        getContentProvider().addModelChangedListener(listener); 
     }
     
     public void removeModelChangedListener(IModelChangedListener listener) {
@@ -1193,6 +1265,16 @@ public class InternalVirtualTreeModelViewer extends Viewer
         }
     }
     
+    public void addStateUpdateListener(IStateUpdateListener listener) {
+        getContentProvider().addStateUpdateListener(listener);
+    }
+    
+    public void removeStateUpdateListener(IStateUpdateListener listener) {
+        ITreeModelContentProvider cp = getContentProvider();
+        if (cp !=  null) {
+            cp.removeStateUpdateListener(listener);
+        }
+    }
         
     public void addLabelUpdateListener(ILabelUpdateListener listener) {
         getLabelProvider().addLabelUpdateListener(listener);
@@ -1218,11 +1300,17 @@ public class InternalVirtualTreeModelViewer extends Viewer
     }
     
     public int getChildCount(TreePath path) {
+        int childCount = -1;
         VirtualItem[] items = findItems(path);
         if (items.length > 0) {
-            return items[0].getItemCount();
+            childCount = items[0].getItemCount();
+            // Mimic the jface viewer behavior which returns 1 for child count
+            // for an item that has children but is not yet expanded.
+            if (childCount == -1 && items[0].hasItems()) {
+                childCount = 1;
+            } 
         }   
-        return -1;
+        return childCount;
     }
     
     public Object getChildElement(TreePath path, int index) {
@@ -1239,7 +1327,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
         return null;
     }
 
-    public void saveElementState(TreePath path, ModelDelta delta) {
+    public boolean saveElementState(TreePath path, ModelDelta delta, int flagsToSave) {
         VirtualTree tree = getTree();
         VirtualItem[] selection = tree.getSelection();
         Set set = new HashSet();
@@ -1253,32 +1341,43 @@ public class InternalVirtualTreeModelViewer extends Viewer
         if (parent != null) {
             delta.setChildCount(((ModelContentProvider)getContentProvider()).viewToModelCount(path, parent.getItemCount()));
             if (parent.getExpanded()) {
-                delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+                if ((flagsToSave & IModelDelta.EXPAND) != 0) {
+                    delta.setFlags(delta.getFlags() | IModelDelta.EXPAND);
+                }
+            } else if ((flagsToSave & IModelDelta.COLLAPSE) != 0 && parent.hasItems()){
+                delta.setFlags(delta.getFlags() | IModelDelta.COLLAPSE);
             }
-            if (set.contains(parent)) {
+            
+            if (set.contains(parent) && (flagsToSave & IModelDelta.SELECT) != 0) {
                 delta.setFlags(delta.getFlags() | IModelDelta.SELECT);
             }
             
             items = parent.getItems();
             for (int i = 0; i < items.length; i++) {
-                doSaveElementState(path, delta, items[i], set);
+                doSaveElementState(path, delta, items[i], set, flagsToSave);
             }
+            return true;
+        } else {
+            return false;
         }
     }
     
-    private void doSaveElementState(TreePath parentPath, ModelDelta delta, VirtualItem item, Collection set) {
+    private void doSaveElementState(TreePath parentPath, ModelDelta delta, VirtualItem item, Collection set, int flagsToSave) {
         Object element = item.getData();
         if (element != null) {
             boolean expanded = item.getExpanded();
             boolean selected = set.contains(item);
-            if (expanded || selected) {
-                int flags = IModelDelta.NO_CHANGE;
-                if (expanded) {
-                    flags = flags | IModelDelta.EXPAND;
-                }
-                if (selected) {
-                    flags = flags | IModelDelta.SELECT;
-                }
+            int flags = IModelDelta.NO_CHANGE;
+            if (expanded && (flagsToSave & IModelDelta.EXPAND) != 0) {
+                flags = flags | IModelDelta.EXPAND;
+            } 
+            if (!expanded && (flagsToSave & IModelDelta.COLLAPSE) != 0 && item.hasItems()){
+                flags = flags | IModelDelta.COLLAPSE;
+            }
+            if (selected && (flagsToSave & IModelDelta.SELECT) != 0) {
+                flags = flags | IModelDelta.SELECT;
+            }
+            if (expanded || flags != IModelDelta.NO_CHANGE) {
                 int modelIndex = ((ModelContentProvider)getContentProvider()).viewToModelIndex(parentPath, item.getIndex().intValue());
                 TreePath elementPath = parentPath.createChildPath(element);
                 int numChildren = ((ModelContentProvider)getContentProvider()).viewToModelCount(elementPath, item.getItemCount());
@@ -1286,7 +1385,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
                 if (expanded) {
                     VirtualItem[] items = item.getItems();
                     for (int i = 0; i < items.length; i++) {
-                        doSaveElementState(elementPath, childDelta, items[i], set);
+                        doSaveElementState(elementPath, childDelta, items[i], set, flagsToSave);
                     }
                 }
             }
@@ -1294,7 +1393,7 @@ public class InternalVirtualTreeModelViewer extends Viewer
     }
 
     public void updateViewer(IModelDelta delta) {
-        ((ModelContentProvider)getContentProvider()).updateNodes(new IModelDelta[] { delta }, true);
+        getContentProvider().updateModel(delta, ITreeModelContentProvider.ALL_MODEL_DELTA_FLAGS);
     }
     
     public ViewerLabel getElementLabel(TreePath path, String columnId) {
@@ -1370,4 +1469,10 @@ public class InternalVirtualTreeModelViewer extends Viewer
         return null;
     }
 
+    /* (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.viewers.model.ITreeModelContentProviderTarget#clearSelectionQuiet()
+     */
+    public void clearSelectionQuiet() {
+    	getTree().setSelection(EMPTY_ITEMS_ARRAY);
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
index 5be643c..ab991f6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java
@@ -8,10 +8,13 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Pawel Piech (Wind River) - added support for a virtual tree model viewer (Bug 242489)
+ *     Patrick Chuong (Texas Instruments) - added support for checkbox (Bug 286310)
+ *     John Cortell (Freescale) - updated javadoc tags (Bug 292301)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
 import org.eclipse.debug.internal.core.commands.Request;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -22,7 +25,7 @@ import org.eclipse.swt.graphics.RGB;
 /**
  * @since 3.3
  */
-class LabelUpdate extends Request implements ILabelUpdate {
+class LabelUpdate extends Request implements ILabelUpdate, ICheckUpdate {
 	
 	private TreePath fElementPath;
 	private String[] fColumnIds;
@@ -36,6 +39,8 @@ class LabelUpdate extends Request implements ILabelUpdate {
 	private int fNumColumns; 
 	private IPresentationContext fContext;
 	private Object fViewerInput;
+	private boolean fChecked;
+	private boolean fGrayed;
 	
 	/**
 	 * @param viewerInput input at the time the request was made
@@ -67,7 +72,7 @@ class LabelUpdate extends Request implements ILabelUpdate {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate#getElement()
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate#getElementPath()
 	 */
 	public TreePath getElementPath() {
 		return fElementPath;
@@ -140,7 +145,7 @@ class LabelUpdate extends Request implements ILabelUpdate {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.IProgressMonitor#done()
+	 * @see org.eclipse.debug.internal.core.commands.Request#done()
 	 */
 	public void done() {
 		fProvider.complete(this);
@@ -151,6 +156,9 @@ class LabelUpdate extends Request implements ILabelUpdate {
 	 */
 	public void update() {
 	    fTreeViewer.setElementData(fElementPath, fNumColumns, fLabels, fImageDescriptors, fFontDatas, fForegrounds, fBackgrounds);
+		if (fTreeViewer instanceof ITreeModelCheckProviderTarget)
+			((ITreeModelCheckProviderTarget) fTreeViewer).setElementChecked(fElementPath, fChecked, fGrayed);
+
 		fProvider.updateComplete(this);
 	}
 
@@ -174,4 +182,12 @@ class LabelUpdate extends Request implements ILabelUpdate {
 	public Object getViewerInput() {
 		return fViewerInput;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckUpdate#setChecked(boolean, boolean)
+	 */
+	public void setChecked(boolean checked, boolean grayed) {
+		fChecked = checked;
+		fGrayed = grayed;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java
index c61ddad..b7cb288 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ModelContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ package org.eclipse.debug.internal.ui.viewers.model;
 import java.io.IOException;
 import java.io.StringWriter;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -45,7 +46,9 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory2;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
@@ -53,6 +56,7 @@ import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.progress.UIJob;
@@ -65,456 +69,754 @@ import org.eclipse.ui.progress.WorkbenchJob;
  */
 abstract class ModelContentProvider implements IContentProvider, IModelChangedListener {
 
-	private ITreeModelContentProviderTarget fViewer;
+    private ITreeModelContentProviderTarget fViewer;
 
     /**
-     * Flag indicating whether the viewer should ignore SELECT, REVEAL, 
-     * EXPAND, and COLLAPSE flags of {@link IModelDelta} coming from the model.
-     */
-	private boolean fSuppressModelControlRequests = false;
-	
-	private Map fModelProxies = new LinkedHashMap(); // model proxy by element
-	
-	/**
-	 * Map of nodes that have been filtered from the viewer.
-	 */
-	private FilterTransform fTransform = new FilterTransform();
-	
-	/**
-	 * Model listeners
-	 */
-	private ListenerList fModelListeners = new ListenerList();
-	
-	/**
-	 * Update listeners
-	 */
-	private ListenerList fUpdateListeners = new ListenerList();
-	
-	/**
-	 * Map of updates in progress: element path -> list of requests
-	 */
-	private Map fRequestsInProgress = new HashMap();
-	
-	/**
-	 * Map of dependent requests waiting for parent requests to complete:
-	 *  element path -> list of requests
-	 */
-	private Map fWaitingRequests = new HashMap();
-	
-	/**
-	 * Map of viewer states keyed by viewer input mementos
-	 */
-	private Map fViewerStates = new LRUMap(20);
-	
-	/**
-	 * Pending viewer state to be restored
-	 */
-	private ModelDelta fPendingState = null;
-
-	private static class CompareRequestKey {
-		CompareRequestKey(TreePath path, IModelDelta delta) {
-			fPath = path;
-			fDelta = delta;
-		}
-		TreePath fPath;
-		IModelDelta fDelta;
-		
-		public boolean equals(Object obj) {
-			if (obj instanceof CompareRequestKey) {
-				CompareRequestKey key = (CompareRequestKey)obj;
-				return key.fDelta.equals(fDelta) && key.fPath.equals(fPath); 
-			}
-			return false;
-		}
-		 
-		public int hashCode() {
-			return fDelta.hashCode() + fPath.hashCode();
-		}
-	}
-	
-	private Map fCompareRequestsInProgress = new HashMap();
-	
-	/**
-	 * Set of IMementoManager's that are currently saving state
-	 */
-	private Set fPendingStateSaves = new HashSet();
-	
-	/**
-	 * Used to queue a viewer input for state restore
-	 */
-	private Object fQueuedRestore = null;
-	
-	/**
-	 * Used to determine when restoration delta has been processed
-	 */
-	class CheckState implements IModelDeltaVisitor {
-		private boolean complete = true;
-		private IModelDelta topDelta = null;
-		/* (non-Javadoc)
-		 * @see org.eclipse.debug.internal.ui.viewers.provisional.IModelDeltaVisitor#visit(org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta, int)
-		 */
-		public boolean visit(IModelDelta delta, int depth) {
-			if (delta.getFlags() != IModelDelta.NO_CHANGE) {
-				if (delta.getFlags() == IModelDelta.REVEAL && !(delta.getElement() instanceof IMemento)) {
-					topDelta = delta;
-				} else {
-					complete = false;
-					return false;
-				}
-			}
-			return true;
-		}
-		
-		public boolean isComplete() {
-			return complete;
-		}
-		
-		public IModelDelta getTopItemDelta() {
-			return topDelta;
-		}
-	}
-	
-	/**
-	 * LRU cache for viewer states 
-	 */
-	class LRUMap extends LinkedHashMap {
-		private static final long serialVersionUID= 1L;
-		private int fMaxSize;
-		LRUMap(int maxSize) {
-			super();
-			fMaxSize = maxSize;
-		}
-		protected boolean removeEldestEntry(Entry eldest) {
-			return size() > fMaxSize;
-		}	
-	}
-	
-	/**
-	 * Update type constants
-	 */
-	static final int UPDATE_SEQUENCE_BEGINS = 0;
-	static final int UPDATE_SEQUENCE_COMPLETE = 1;
-	static final int UPDATE_BEGINS = 2;
-	static final int UPDATE_COMPLETE = 3;
-	
-	/**
-	 * Constant for an empty tree path.
-	 */
-	protected static final TreePath EMPTY_TREE_PATH = new TreePath(new Object[]{});
-	
-	// debug flags
+     * Mask used to filter delta updates coming from the model.
+     */
+    private int fModelDeltaMask = ~0;
+
+    /**
+     * Map tree paths to model proxy responsible for element
+     * 
+     * Used to install different model proxy instances for one element depending
+     * on the tree path.
+     */
+    private Map fTreeModelProxies = new HashMap(); // tree model proxy by
+                                                   // element tree path
+
+    /**
+     * Map element to model proxy responsible for it.
+     * 
+     * Used to install a single model proxy which is responsible for all
+     * instances of an element in the model tree.
+     */
+    private Map fModelProxies = new HashMap(); // model proxy by element
+
+    /**
+     * Map of nodes that have been filtered from the viewer.
+     */
+    private FilterTransform fTransform = new FilterTransform();
+
+    /**
+     * Model listeners
+     */
+    private ListenerList fModelListeners = new ListenerList();
+
+    /**
+     * Viewer update listeners
+     */
+    private ListenerList fUpdateListeners = new ListenerList();
+
+    /**
+     * State update listeners
+     */
+    private ListenerList fStateUpdateListeners = new ListenerList();
+
+    /**
+     * Map of updates in progress: element path -> list of requests
+     */
+    private Map fRequestsInProgress = new HashMap();
+
+    /**
+     * Map of dependent requests waiting for parent requests to complete:
+     * element path -> list of requests
+     */
+    private Map fWaitingRequests = new HashMap();
+
+    /**
+     * Map of viewer states keyed by viewer input mementos
+     */
+    private Map fViewerStates = Collections.synchronizedMap(new LRUMap(20));
+
+    /**
+     * Pending viewer state to be restored
+     */
+    private ModelDelta fPendingState = null;
+
+    /**
+     * Flag indicating that the content provider is performing
+     * state restore operations.  
+     */
+    private boolean fInStateRestore = false; 
+    
+    private static class CompareRequestKey {
+        CompareRequestKey(TreePath path, IModelDelta delta) {
+            fPath = path;
+            fDelta = delta;
+        }
+
+        TreePath fPath;
+
+        IModelDelta fDelta;
+
+        public boolean equals(Object obj) {
+            if (obj instanceof CompareRequestKey) {
+                CompareRequestKey key = (CompareRequestKey) obj;
+                return key.fDelta.equals(fDelta) && key.fPath.equals(fPath);
+            }
+            return false;
+        }
+
+        public int hashCode() {
+            return fDelta.hashCode() + fPath.hashCode();
+        }
+    }
+
+    private Map fCompareRequestsInProgress = new LinkedHashMap();
+
+    /**
+     * Set of IMementoManager's that are currently saving state
+     */
+    private Set fPendingStateSaves = new HashSet();
+
+    /**
+     * Used to queue a viewer input for state restore
+     */
+    private Object fQueuedRestore = null;
+
+    /**
+     * Dummy marker element used in the state delta. The marker indicates that a
+     * given element in the pending state delta has been removed. It replaces
+     * the original element so that it may optionally be garbage collected.
+     */
+    private final static String ELEMENT_REMOVED = "ELEMENT_REMOVED"; //$NON-NLS-1$
+
+    /**
+     * LRU cache for viewer states
+     */
+    class LRUMap extends LinkedHashMap {
+        private static final long serialVersionUID = 1L;
+
+        private int fMaxSize;
+
+        LRUMap(int maxSize) {
+            super();
+            fMaxSize = maxSize;
+        }
+
+        protected boolean removeEldestEntry(Entry eldest) {
+            return size() > fMaxSize;
+        }
+    }
+
+    /**
+     * Update type constants
+     */
+    static final int UPDATE_SEQUENCE_BEGINS = 0;
+
+    static final int UPDATE_SEQUENCE_COMPLETE = 1;
+
+    static final int UPDATE_BEGINS = 2;
+
+    static final int UPDATE_COMPLETE = 3;
+
+    /**
+     * Additional state update type constants
+     */
+    static final int STATE_SAVE_SEQUENCE_BEGINS = 4;
+
+    static final int STATE_SAVE_SEQUENCE_COMPLETE = 5;
+
+    static final int STATE_RESTORE_SEQUENCE_BEGINS = 6;
+
+    static final int STATE_RESTORE_SEQUENCE_COMPLETE = 7;
+
+    /**
+     * Constant for an empty tree path.
+     */
+    protected static final TreePath EMPTY_TREE_PATH = new TreePath(new Object[] {});
+
+    // debug flags
     public static String DEBUG_PRESENTATION_ID = null;
-	public static boolean DEBUG_CONTENT_PROVIDER = false;
-	public static boolean DEBUG_UPDATE_SEQUENCE = false;
+
+    public static boolean DEBUG_CONTENT_PROVIDER = false;
+
+    public static boolean DEBUG_UPDATE_SEQUENCE = false;
+
     public static boolean DEBUG_STATE_SAVE_RESTORE = false;
+
     public static boolean DEBUG_DELTAS = false;
 
-	static {
+    public static boolean DEBUG_TEST_PRESENTATION_ID(IPresentationContext context) {
+        if (context == null) {
+            return true;
+        }
+        return DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(context.getId());
+    }
+    
+    static {
         DEBUG_PRESENTATION_ID = Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/presentationId"); //$NON-NLS-1$
         if (!DebugUIPlugin.DEBUG || "".equals(DEBUG_PRESENTATION_ID)) { //$NON-NLS-1$
             DEBUG_PRESENTATION_ID = null;
         }
-		DEBUG_CONTENT_PROVIDER = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
-		 Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/contentProvider")); //$NON-NLS-1$
-		DEBUG_UPDATE_SEQUENCE = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
-		 Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/updateSequence")); //$NON-NLS-1$
-		DEBUG_STATE_SAVE_RESTORE = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
-	            Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/stateSaveRestore")); //$NON-NLS-1$
+        DEBUG_CONTENT_PROVIDER = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
+            Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/contentProvider")); //$NON-NLS-1$
+        DEBUG_UPDATE_SEQUENCE = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
+            Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/updateSequence")); //$NON-NLS-1$
+        DEBUG_STATE_SAVE_RESTORE = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
+            Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/stateSaveRestore")); //$NON-NLS-1$
         DEBUG_DELTAS = DebugUIPlugin.DEBUG && "true".equals( //$NON-NLS-1$
-                Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/deltas")); //$NON-NLS-1$
-	} 	
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-	 */
-	public synchronized void dispose() {
-		// cancel pending updates
-		synchronized (fRequestsInProgress) {
-			Iterator iterator = fRequestsInProgress.values().iterator();
-			while (iterator.hasNext()) {
-				List requests = (List) iterator.next();
-				Iterator reqIter = requests.iterator();
-				while (reqIter.hasNext()) {
-					((IRequest) reqIter.next()).cancel();
-				}
-			}
-			fWaitingRequests.clear();
-		}
-		fModelListeners.clear();
-		fUpdateListeners.clear();
-		disposeAllModelProxies();
-		fViewer = null;
-	}
-	
-	public synchronized boolean isDisposed() {
-		return fViewer == null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-	 *      java.lang.Object, java.lang.Object)
-	 */
-	public synchronized void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		fViewer = (ITreeModelContentProviderTarget)viewer;
-		if (oldInput != null) {
-			for (Iterator itr = fCompareRequestsInProgress.values().iterator(); itr.hasNext(); ) {
-				((ElementCompareRequest)itr.next()).cancel();
-				itr.remove();
-			}
-			saveViewerState(oldInput);
-		}
-		if (newInput != oldInput) {
-			cancelSubtreeUpdates(TreePath.EMPTY);
-			disposeAllModelProxies();
-            cancelSubtreeUpdates(TreePath.EMPTY);			
-			fTransform.clear();
-			if (newInput != null) {
-				installModelProxy(newInput);
-				restoreViewerState(newInput);
-			}
-		}
-	}
-
-	/**
-	 * Restores the viewer state unless a save is taking place.  If a save is
-	 * taking place, the restore is queued.
-	 * @param input viewer input
-	 */
-	protected synchronized void restoreViewerState(final Object input) {
-		fPendingState = null;
-		if (isSavingState()) {
-			fQueuedRestore = input;
-		} else {
-			startRestoreViewerState(input);
-		}
-	}
-	
-	/**
-	 * Restores viewer state for the given input
-	 * 
-	 * @param input viewer input
-	 */
-	private synchronized void startRestoreViewerState(final Object input) {
-		fPendingState = null;
-		final IElementMementoProvider defaultProvider = ViewerAdapterService.getMementoProvider(input);
-		if (defaultProvider != null) {
-			// build a model delta representing expansion and selection state
-			final ModelDelta delta = new ModelDelta(input, IModelDelta.NO_CHANGE);
-			final XMLMemento inputMemento = XMLMemento.createWriteRoot("VIEWER_INPUT_MEMENTO"); //$NON-NLS-1$
-			final IMementoManager manager = new IMementoManager() {
-			
-				private IElementMementoRequest fRequest;
-				
-				/* (non-Javadoc)
-				 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#requestComplete(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest)
-				 */
-				public synchronized void requestComplete(IElementMementoRequest request) {
-					if (!request.isCanceled() && (request.getStatus() == null || request.getStatus().isOK())) {
-						XMLMemento keyMemento = (XMLMemento) delta.getElement();
-						StringWriter writer = new StringWriter();
-						try {
-							keyMemento.save(writer);
-							final String keyMementoString = writer.toString();
-							final ModelDelta stateDelta = (ModelDelta) fViewerStates.get(keyMementoString);
-							if (stateDelta != null) {
-								stateDelta.setElement(input);
-								// begin restoration
-								UIJob job = new UIJob("restore state") { //$NON-NLS-1$
-									public IStatus runInUIThread(IProgressMonitor monitor) {
-										if (!isDisposed() && input.equals(getViewer().getInput())) {
-			                                if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-			                                    System.out.println("RESTORE: " + stateDelta.toString()); //$NON-NLS-1$
-			                                }
-										    fViewerStates.remove(keyMementoString);
-											fPendingState = stateDelta;
-											doInitialRestore(fPendingState);
-										}
-										return Status.OK_STATUS;
-									}
-								
-								};
-								job.setSystem(true);
-								job.schedule();
-							}
-						} catch (IOException e) {
-							DebugUIPlugin.log(e);
-						}
-					}
-				}
-			
-				/* (non-Javadoc)
-				 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#processReqeusts()
-				 */
-				public void processReqeusts() {
-					defaultProvider.encodeElements(new IElementMementoRequest[]{fRequest});
-				}
-			
-				/* (non-Javadoc)
-				 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#addRequest(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest)
-				 */
-				public synchronized void addRequest(IElementMementoRequest req) {
-					fRequest = req;
-				}
-			
-			};
-			manager.addRequest(new ElementMementoRequest(ModelContentProvider.this, getViewer().getInput(), manager, getPresentationContext(),
-									delta.getElement(), getViewerTreePath(delta), inputMemento, delta));
-			manager.processReqeusts();
-		}
-	}
-	
+            Platform.getDebugOption("org.eclipse.debug.ui/debug/viewers/deltas")); //$NON-NLS-1$
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+     */
+    public void dispose() {
+        // cancel pending updates
+        synchronized (fRequestsInProgress) {
+            Iterator iterator = fRequestsInProgress.values().iterator();
+            while (iterator.hasNext()) {
+                List requests = (List) iterator.next();
+                Iterator reqIter = requests.iterator();
+                while (reqIter.hasNext()) {
+                    ((IRequest) reqIter.next()).cancel();
+                }
+            }
+            fWaitingRequests.clear();
+        }
+
+        synchronized(this) {
+            for (Iterator itr = fPendingStateSaves.iterator(); itr.hasNext(); ) {
+                ((IMementoManager)itr.next()).cancel();
+            }
+            
+            fModelListeners.clear();
+            fUpdateListeners.clear();
+            fStateUpdateListeners.clear();
+            disposeAllModelProxies();
+            fViewer = null;
+        }
+    }
+
+    public synchronized boolean isDisposed() {
+        return fViewer == null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+     * .viewers.Viewer, java.lang.Object, java.lang.Object)
+     */
+    public synchronized void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+        fViewer = (ITreeModelContentProviderTarget) viewer;
+        if (oldInput != null) {
+            for (Iterator itr = fCompareRequestsInProgress.values().iterator(); itr.hasNext();) {
+                ((ElementCompareRequest) itr.next()).cancel();
+                itr.remove();
+            }
+            saveViewerState(oldInput);
+        }
+        if (newInput != oldInput) {
+            cancelSubtreeUpdates(TreePath.EMPTY);
+            disposeAllModelProxies();
+            cancelSubtreeUpdates(TreePath.EMPTY);
+            fTransform.clear();
+            if (newInput != null) {
+                installModelProxy(newInput, TreePath.EMPTY);
+                restoreViewerState(newInput);
+            }
+        }
+    }
+
+    /**
+     * Restores the viewer state unless a save is taking place. If a save is
+     * taking place, the restore is queued.
+     * 
+     * @param input
+     *            viewer input
+     */
+    protected synchronized void restoreViewerState(final Object input) {
+        fPendingState = null;
+        if (isSavingState()) {
+            fQueuedRestore = input;
+        } else {
+            startRestoreViewerState(input);
+        }
+    }
+
+    /**
+     * Restores viewer state for the given input
+     * 
+     * @param input
+     *            viewer input
+     */
+    private synchronized void startRestoreViewerState(final Object input) {
+        fPendingState = null;
+        final IElementMementoProvider defaultProvider = ViewerAdapterService.getMementoProvider(input);
+        if (defaultProvider != null) {
+            // build a model delta representing expansion and selection state
+            final ModelDelta delta = new ModelDelta(input, IModelDelta.NO_CHANGE);
+            final XMLMemento inputMemento = XMLMemento.createWriteRoot("VIEWER_INPUT_MEMENTO"); //$NON-NLS-1$
+            final IMementoManager manager = new IMementoManager() {
+
+                private IElementMementoRequest fRequest;
+
+                /*
+                 * (non-Javadoc)
+                 * 
+                 * @see
+                 * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+                 * .
+                 * IMementoManager#requestComplete(org.eclipse.debug.internal.ui
+                 * .viewers.model.provisional.IElementMementoRequest)
+                 */
+                public void requestComplete(IElementMementoRequest request) {
+                    notifyStateUpdate(input, UPDATE_COMPLETE, request);
+
+                    if (!request.isCanceled() && (request.getStatus() == null || request.getStatus().isOK())) {
+                        XMLMemento keyMemento = (XMLMemento) delta.getElement();
+                        StringWriter writer = new StringWriter();
+                        try {
+                            keyMemento.save(writer);
+                            final String keyMementoString = writer.toString();
+                            ModelDelta stateDelta = (ModelDelta) fViewerStates.get(keyMementoString);
+                            if (stateDelta != null) {
+                                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+                                    System.out.println("STATE RESTORE INPUT COMARE ENDED : " + fRequest + " - MATCHING STATE FOUND"); //$NON-NLS-1$ //$NON-NLS-2$
+                                }
+
+                                // begin restoration
+                                UIJob job = new UIJob("restore state") { //$NON-NLS-1$
+                                    public IStatus runInUIThread(IProgressMonitor monitor) {
+                                        if (!isDisposed() && input.equals(getViewer().getInput())) {
+                                            ModelDelta stateDelta2 = (ModelDelta) fViewerStates.remove(keyMementoString);
+                                            if (stateDelta2 != null) {
+                                                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+                                                    System.out.println("STATE RESTORE BEGINS"); //$NON-NLS-1$
+                                                    System.out.println("\tRESTORE: " + stateDelta2.toString()); //$NON-NLS-1$
+                                                    notifyStateUpdate(input, STATE_RESTORE_SEQUENCE_BEGINS, null);
+                                                }
+                                                stateDelta2.setElement(input);
+                                                fPendingState = stateDelta2;
+                                                doInitialRestore(fPendingState);
+                                            }
+                                        } else {
+                                            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+                                                System.out.println("STATE RESTORE CANCELED."); //$NON-NLS-1$
+                                            }
+                                        }
+                                        return Status.OK_STATUS;
+                                    }
+
+                                };
+                                job.setSystem(true);
+                                job.schedule();
+                            } else {
+                                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+                                    System.out.println("STATE RESTORE INPUT COMARE ENDED : " + fRequest + " - NO MATCHING STATE"); //$NON-NLS-1$ //$NON-NLS-2$
+                                }
+                            }
+                        } catch (IOException e) {
+                            DebugUIPlugin.log(e);
+                        }
+                    } else {
+                        notifyStateUpdate(input, STATE_RESTORE_SEQUENCE_BEGINS, null);
+                    }
+                }
+
+                /*
+                 * (non-Javadoc)
+                 * 
+                 * @see
+                 * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+                 * .IMementoManager#processReqeusts()
+                 */
+                public void processReqeusts() {
+                    notifyStateUpdate(input, STATE_RESTORE_SEQUENCE_BEGINS, null);
+                    if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                        System.out.println("STATE RESTORE INPUT COMARE BEGIN : " + fRequest); //$NON-NLS-1$
+                    }
+                    notifyStateUpdate(input, UPDATE_BEGINS, fRequest);
+                    defaultProvider.encodeElements(new IElementMementoRequest[] { fRequest });
+                }
+
+                /*
+                 * (non-Javadoc)
+                 * 
+                 * @see
+                 * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+                 * .
+                 * IMementoManager#addRequest(org.eclipse.debug.internal.ui.viewers
+                 * .model.provisional.IElementMementoRequest)
+                 */
+                public void addRequest(IElementMementoRequest req) {
+                    fRequest = req;
+                }
+                
+                public void cancel() {
+                    // not used
+                }
+
+            };
+            manager.addRequest(new ElementMementoRequest(ModelContentProvider.this, getViewer().getInput(), manager,
+                getPresentationContext(), delta.getElement(), getViewerTreePath(delta), inputMemento, delta));
+            manager.processReqeusts();
+        } else {
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+                System.out.println("STATE RESTORE: No input memento provider"); //$NON-NLS-1$
+            }            
+        }
+    }
+
     /**
      * Restore selection/expansion based on items already in the viewer
      */
-	protected abstract void doInitialRestore(ModelDelta delta);
+    protected abstract void doInitialRestore(ModelDelta delta);
 
-	/**
+    /**
      * @param delta
      */
-	abstract void doRestore(final ModelDelta delta, boolean knowsHasChildren, boolean knowsChildCount);
-
-	/**
-	 * Perform any restoration required for the given tree path.
-	 * 
-	 * @param path
-	 */
-	protected synchronized void doRestore(final TreePath path, final int modelIndex, final boolean knowsHasChildren, final boolean knowsChildCount) {
-		if (fPendingState == null) { 
-			return;
-		}
-		
-		IModelDeltaVisitor visitor = new IModelDeltaVisitor() {
-			public boolean visit(final IModelDelta delta, int depth) {
-				
-				Object element = delta.getElement();
-				Object potentialMatch = depth != 0 ? path.getSegment(depth - 1) : getViewer().getInput();
-				// Only process if the depth in the delta matches the tree path.
-				if (depth == path.getSegmentCount()) {
-					if (element instanceof IMemento) {
-						IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(potentialMatch);
-						if (provider == null) {
-							provider = ViewerAdapterService.getMementoProvider(getViewer().getInput());
-						}
-						if (provider != null) {
-							CompareRequestKey key = new CompareRequestKey(path, delta);
-							ElementCompareRequest existingRequest = (ElementCompareRequest)fCompareRequestsInProgress.get(key); 
-							if (existingRequest != null) {
-								// Check all the running compare updates for a matching tree path.  
-								// If found, just update the flags.  
-								existingRequest.setKnowsHasChildren(knowsHasChildren);
-								existingRequest.setKnowsChildCount(knowsChildCount);								
-							} else {
-								// Start a new compare request
-								ElementCompareRequest compareRequest = new ElementCompareRequest(
-										ModelContentProvider.this, getViewer().getInput(), potentialMatch, path, (IMemento) element, (ModelDelta)delta, modelIndex, knowsHasChildren, knowsChildCount);
-								fCompareRequestsInProgress.put(key, compareRequest);
-								provider.compareElements(new IElementCompareRequest[]{ compareRequest });
-							}
-						}
-					} else if (element.equals(potentialMatch)) {
-						// Element comparison already succeeded, and it matches our element.
-						// Call restore with delta to process the delta flags.
-						doRestore((ModelDelta)delta, knowsHasChildren, knowsChildCount);
-					}
-					return false;
-				} 
-				// Only follow the paths that match the delta.
-				return element.equals(potentialMatch);
-			}
-		};
-		fPendingState.accept(visitor);
-	}
-
-	void compareFinished(ElementCompareRequest request, ModelDelta delta) {
-		fCompareRequestsInProgress.remove(request);
-		if (!request.isCanceled()) {
-			if (request.isEqual()) {
-				delta.setElement(request.getElement());
-				doRestore(delta, request.knowsHasChildren(), request.knowChildCount());
-			} else if (request.getModelIndex() != -1){
-				// Comparison failed. 
-				// Check if the delta has a reveal flag, and if its index matches the index
-				// of the element that it was compared against.  If this is the case, 
-				// strip the reveal flag from the delta as it is most likely not applicable 
-				// anymore.
-				if ( (delta.getFlags() & IModelDelta.REVEAL) != 0 && delta.getIndex() == request.getModelIndex() ) {
-	                delta.setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Saves the viewer's state for the previous input.
-	 * 	 * @param oldInput
-	 */
-	protected void saveViewerState(Object input) {
-		IElementMementoProvider stateProvider = ViewerAdapterService.getMementoProvider(input);
-		if (stateProvider != null) {
-            if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                System.out.println("SAVE BEGIN: " + input); //$NON-NLS-1$
-            }
-
-			// build a model delta representing expansion and selection state
-			final ModelDelta saveDeltaRoot = new ModelDelta(input, IModelDelta.NO_CHANGE);
-            buildViewerState(saveDeltaRoot);
-            if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                System.out.println("SAVE DELTA FROM VIEW: " + saveDeltaRoot); //$NON-NLS-1$
-            }
-		   
-			if (fPendingState != null) {
-			    // If the restore for the current input was never completed, preserve 
-			    // that restore along with the restore that was completed.
-                if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                    System.out.println("SAVE OUTSTANDING RESTORE: " + fPendingState); //$NON-NLS-1$
+    abstract void restorePendingStateNode(final ModelDelta delta, boolean knowsHasChildren, boolean knowsChildCount,
+        boolean checkChildrenRealized);
+
+    public void cancelRestore(final TreePath path, final int flags) {
+        if (fPendingState == null) {
+        	// Nothing to do
+            return;
+        }
+
+        if (fInStateRestore) {
+        	// If we are currently processing pending state already, ignore 
+        	// cancelRestore requests.  These requests may be triggered in the viewer
+        	// by changes to the tree state (Bug 295585).
+        	return;
+        }
+        
+        if ((flags & (IModelDelta.SELECT | IModelDelta.REVEAL)) != 0) {
+            // If we're canceling select or reveal, cancel it for all of pending deltas
+            final int mask = flags & (IModelDelta.SELECT | IModelDelta.REVEAL);
+            fPendingState.accept(new IModelDeltaVisitor() {
+                public boolean visit(IModelDelta delta, int depth) {
+                    int deltaFlags = delta.getFlags();
+                    int newFlags = deltaFlags & ~mask;
+                    if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                        if (deltaFlags != newFlags) {
+                            System.out.println("\tCANCEL: " + delta.getElement() + "(" + Integer.toHexString(deltaFlags & mask) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                        }
+                    }
+                    ((ModelDelta)delta).setFlags(newFlags);
+                    return true;
+                }
+            });
+        }
+        if ((flags & ~(IModelDelta.SELECT | IModelDelta.REVEAL)) != 0) {
+            final int mask = flags & ~(IModelDelta.SELECT | IModelDelta.REVEAL);
+            // For other flags (EXPAND/COLLAPSE), cancel only from the matching path.
+            fPendingState.accept(new IModelDeltaVisitor() {
+                public boolean visit(IModelDelta delta, int depth) {
+                    if (depth == path.getSegmentCount()) {
+                        TreePath deltaPath = getViewerTreePath(delta);
+                        if (deltaPath.equals(path)) {
+                            int deltaFlags = delta.getFlags();
+                            int newFlags = deltaFlags & ~mask;
+                            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                                if (deltaFlags != newFlags) {
+                                    System.out.println("\tCANCEL: " + delta.getElement() + "(" + Integer.toHexString(deltaFlags & mask) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                                }
+                            }
+                            ((ModelDelta)delta).setFlags(newFlags);
+                        }
+                        return false;
+                    } 
+                    return true;
+                }
+            });
+        }
+    }
+    
+    protected void appendToPendingStateDelta(final TreePath path) {
+        if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext()))  {
+            System.out.println("STATE APPEND BEGIN: " + path.getLastSegment()); //$NON-NLS-1$
+        }
+
+        // build a model delta representing expansion and selection state
+        final ModelDelta appendDeltaRoot = new ModelDelta(getViewer().getInput(), IModelDelta.NO_CHANGE);
+        ModelDelta delta = appendDeltaRoot;
+        for (int i = 0; i < path.getSegmentCount(); i++) {
+            delta = delta.addNode(path.getSegment(i), IModelDelta.NO_CHANGE);
+        }
+
+        if (!fViewer.saveElementState(path, delta, IModelDelta.COLLAPSE | IModelDelta.EXPAND | IModelDelta.SELECT)) {
+            // Path to save the state was not found or there was no 
+            // (expansion) state to save!  Abort.
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("STATE APPEND CANCEL: Element " + path.getLastSegment() + " not found."); //$NON-NLS-1$ //$NON-NLS-2$
+            }
+            return;
+        }
+
+        // Append a marker CONTENT flag to all the delta nodes that contain the
+        // EXPAND node. These
+        // markers are used by the restore logic to know when a delta node can
+        // be removed.
+        delta.accept(new IModelDeltaVisitor() {
+            public boolean visit(IModelDelta d, int depth) {
+                if ((d.getFlags() & IModelDelta.EXPAND) != 0) {
+                    ((ModelDelta) d).setFlags(d.getFlags() | IModelDelta.CONTENT);
+                }
+                return true;
+            }
+        });
+
+        if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+            System.out.println("\tAPPEND DELTA: " + appendDeltaRoot); //$NON-NLS-1$
+        }
+
+        if (fPendingState != null) {
+            // If the restore for the current input was never completed,
+            // preserve
+            // that restore along with the restore that was completed.
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("\tAPPEND OUTSTANDING RESTORE: " + fPendingState); //$NON-NLS-1$
+            }
+
+            // If the append delta is generated for a sub-tree, copy the pending dela 
+            // attributes into the pending delta.
+            if (path.getSegmentCount() > 0) {
+                fPendingState.accept( new IModelDeltaVisitor() {
+                    public boolean visit(IModelDelta pendingDeltaNode, int depth) {
+                        TreePath pendingDeltaPath = getViewerTreePath(pendingDeltaNode);
+                        if (path.startsWith(pendingDeltaPath, null)) 
+                        {
+                            ModelDelta appendDelta = findDeltaForPath(appendDeltaRoot, pendingDeltaPath);
+                            appendDelta.setFlags(pendingDeltaNode.getFlags());
+                            appendDelta.setChildCount(pendingDeltaNode.getChildCount());
+                            appendDelta.setIndex(pendingDeltaNode.getIndex());
+                            return true;
+                        }
+                        return false;
+                    }
+                });
+            }
+
+            // Copy the pending state into the new appended state.
+            fPendingState.accept( new IModelDeltaVisitor() {
+                public boolean visit(IModelDelta pendingDeltaNode, int depth) {
+                    // Skip the top element
+                    if (pendingDeltaNode.getParentDelta() == null) {
+                        return true;
+                    }
+
+                    // Find the node in the save delta which is the parent
+                    // of to the current pending delta node.
+                    // If the parent node cannot be found, it means that
+                    // most likely the user collapsed the parent node before
+                    // the children were ever expanded.
+                    // If the pending state node already exists in the parent
+                    // node, it is already processed and we can skip it.
+                    // If the pending state node does not contain any flags,
+                    // we can also skip it.
+                    ModelDelta saveDeltaNode = findSubDeltaParent(appendDeltaRoot, pendingDeltaNode);
+                    if (saveDeltaNode != null && 
+                        !isDeltaInParent(pendingDeltaNode, saveDeltaNode) &&
+                        pendingDeltaNode.getFlags() != IModelDelta.NO_CHANGE) 
+                    {
+                        saveDeltaNode.setChildCount(pendingDeltaNode.getParentDelta().getChildCount());
+                        copyIntoDelta(pendingDeltaNode, saveDeltaNode);
+                    } else {
+                        if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                            System.out.println("\tSKIPPED: " + pendingDeltaNode.getElement()); //$NON-NLS-1$
+                        }
+                    }
+
+                    // If the pending delta node has a memento element, its
+                    // children should also be mementos therefore the copy
+                    // delta operation should have added all the children
+                    // of this pending delta node into the save delta.
+                    if (pendingDeltaNode.getElement() instanceof IMemento) {
+                        return false;
+                    } else {
+                        return pendingDeltaNode.getChildCount() > 0;
+                    }
                 }
                 
+            });
+        }
+
+        if (appendDeltaRoot.getChildDeltas().length > 0) {
+            // Set the new delta root as the pending state delta.
+            if (fPendingState == null) {
+                notifyStateUpdate(appendDeltaRoot.getElement(), STATE_RESTORE_SEQUENCE_BEGINS, null);
+            }
+            fPendingState = appendDeltaRoot;
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("STATE APPEND COMPLETE " + fPendingState); //$NON-NLS-1$
+            }
+        } else {
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("STATE APPEND CANCELED: No Data"); //$NON-NLS-1$
+            }
+        }
+    }
+
+    /**
+     * Perform any restoration required for the given tree path.
+     * 
+     * @param path
+     */
+    protected synchronized void restorePendingStateOnUpdate(final TreePath path, final int modelIndex, final boolean knowsHasChildren,
+        final boolean knowsChildCount, final boolean checkChildrenRealized) {
+        if (fPendingState == null) {
+            return;
+        }
+
+        IModelDeltaVisitor visitor = new IModelDeltaVisitor() {
+            public boolean visit(final IModelDelta delta, int depth) {
+
+                Object element = delta.getElement();
+                Object potentialMatch = depth != 0 ? path.getSegment(depth - 1) : getViewer().getInput();
+                // Only process if the depth in the delta matches the tree path.
+                if (depth == path.getSegmentCount()) {
+                    if (element instanceof IMemento) {
+                        IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(potentialMatch);
+                        if (provider == null) {
+                            provider = ViewerAdapterService.getMementoProvider(getViewer().getInput());
+                        }
+                        if (provider != null) {
+                            CompareRequestKey key = new CompareRequestKey(path, delta);
+                            ElementCompareRequest existingRequest = (ElementCompareRequest) fCompareRequestsInProgress
+                                .get(key);
+                            if (existingRequest != null) {
+                                // Check all the running compare updates for a
+                                // matching tree path.
+                                // If found, just update the flags.
+                                existingRequest.setKnowsHasChildren(knowsHasChildren);
+                                existingRequest.setKnowsChildCount(knowsChildCount);
+                                existingRequest.setCheckChildrenRealized(checkChildrenRealized);
+                            } else {
+                                // Start a new compare request
+                                ElementCompareRequest compareRequest = new ElementCompareRequest(
+                                    ModelContentProvider.this, getViewer().getInput(), potentialMatch, path,
+                                    (IMemento) element, (ModelDelta) delta, modelIndex, knowsHasChildren,
+                                    knowsChildCount, checkChildrenRealized);
+                                fCompareRequestsInProgress.put(key, compareRequest);
+                                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                                    System.out.println("\tSTATE BEGIN: " + compareRequest); //$NON-NLS-1$
+                                }
+                                notifyStateUpdate(element, UPDATE_BEGINS, compareRequest);
+                                provider.compareElements(new IElementCompareRequest[] { compareRequest });
+                            }
+                        }
+                    } else if (element.equals(potentialMatch)) {
+                        // Element comparison already succeeded, and it matches
+                        // our element.
+                        // Call restore with delta to process the delta flags.
+                        restorePendingStateNode((ModelDelta) delta, knowsHasChildren, knowsChildCount, checkChildrenRealized);
+                    }
+                    return false;
+                }
+                // Only follow the paths that match the delta.
+                return element.equals(potentialMatch);
+            }
+        };
+
+        try {
+        	fInStateRestore = true;
+        	fPendingState.accept(visitor);
+        } 
+        finally {
+        	fInStateRestore = false;
+        }
+        checkIfRestoreComplete();
+    }
+
+    void compareFinished(ElementCompareRequest request, ModelDelta delta) {
+        notifyStateUpdate(request.getViewerInput(), UPDATE_COMPLETE, request);
+        if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+            System.out.println("\tSTATE END: " + request + " = " + false); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+
+        fCompareRequestsInProgress.remove(new CompareRequestKey(request.getElementPath(), delta));
+        if (!request.isCanceled()) {
+            if (request.isEqual()) {
+                delta.setElement(request.getElement());
+                restorePendingStateNode(delta, request.knowsHasChildren(), request.knowChildCount(), request.checkChildrenRealized());
+            } else if (request.getModelIndex() != -1) {
+                // Comparison failed.
+                // Check if the delta has a reveal flag, and if its index 
+                // matches the index of the element that it was compared 
+                // against. If this is the case, strip the reveal flag from 
+                // the delta as it is most likely not applicable anymore.
+                if ((delta.getFlags() & IModelDelta.REVEAL) != 0 && delta.getIndex() == request.getModelIndex()) {
+                    delta.setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
+                }
+            }
+        }
+        checkIfRestoreComplete();
+    }
+
+    /**
+     * Saves the viewer's state for the previous input. * @param oldInput
+     */
+    protected void saveViewerState(Object input) {
+        IElementMementoProvider stateProvider = ViewerAdapterService.getMementoProvider(input);
+        if (stateProvider != null) {
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("STATE SAVE BEGIN: " + input); //$NON-NLS-1$
+            }
+
+            // build a model delta representing expansion and selection state
+            final ModelDelta saveDeltaRoot = new ModelDelta(input, IModelDelta.NO_CHANGE);
+            buildViewerState(saveDeltaRoot);
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("\tSAVE DELTA FROM VIEW:\n" + saveDeltaRoot); //$NON-NLS-1$
+            }
+
+            if (fPendingState != null) {
+                // If the restore for the current input was never completed,
+                // preserve
+                // that restore along with the restore that was completed.
+                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                    System.out.println("\tSAVE OUTSTANDING RESTORE: " + fPendingState); //$NON-NLS-1$
+                }
+
                 IModelDeltaVisitor pendingStateVisitor = new IModelDeltaVisitor() {
                     public boolean visit(IModelDelta pendingDeltaNode, int depth) {
                         // Ignore the top element.
                         if (pendingDeltaNode.getParentDelta() == null) {
                             return true;
                         }
-                        
-                        // Find the node in the save delta which is the parent 
+
+                        // Find the node in the save delta which is the parent
                         // of to the current pending delta node.
-                        // If the parent node cannot be found, it means that 
+                        // If the parent node cannot be found, it means that
                         // most likely the user collapsed the parent node before
                         // the children were ever expanded.
-                        // If the pending state node already exists in the parent
+                        // If the pending state node already exists in the
+                        // parent
                         // node, it is already processed and we can skip it.
-                        // If the pending state node does not contain any flags, 
+                        // If the pending state node does not contain any flags,
                         // we can also skip it.
-                        ModelDelta saveDeltaNode = findSaveDelta(saveDeltaRoot, pendingDeltaNode);
-                        if (saveDeltaNode != null && 
-                            !isDeltaInParent(pendingDeltaNode, saveDeltaNode) && 
-                            pendingDeltaNode.getFlags() != IModelDelta.NO_CHANGE) 
-                        {
-                            // There should be only one delta element with 
-                            // the REVEAL flag in the entire save delta.  The
+                        ModelDelta saveDeltaNode = findSubDeltaParent(saveDeltaRoot, pendingDeltaNode);
+                        if (saveDeltaNode != null && !isDeltaInParent(pendingDeltaNode, saveDeltaNode)
+                            && pendingDeltaNode.getFlags() != IModelDelta.NO_CHANGE) {
+                            // There should be only one delta element with
+                            // the REVEAL flag in the entire save delta. The
                             // reveal flag in the pending delta trumps the one
                             // in the save delta because most likely the restore
-                            // operation did not yet complete the reveal 
+                            // operation did not yet complete the reveal
                             // operation.
-                            if ( (pendingDeltaNode.getFlags() & IModelDelta.REVEAL) != 0) {
+                            if ((pendingDeltaNode.getFlags() & IModelDelta.REVEAL) != 0) {
                                 clearRevealFlag(saveDeltaRoot);
                             }
                             saveDeltaNode.setChildCount(pendingDeltaNode.getParentDelta().getChildCount());
                             copyIntoDelta(pendingDeltaNode, saveDeltaNode);
                         } else {
-                            if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                                System.out.println(" Skipping: " + pendingDeltaNode.getElement()); //$NON-NLS-1$
+                            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                                System.out.println("\tSKIPPED: " + pendingDeltaNode.getElement()); //$NON-NLS-1$
                             }
                         }
-                        
-                        // If the pending delta node has a memento element, its 
+
+                        // If the pending delta node has a memento element, its
                         // children should also be mementos therefore the copy
                         // delta operation should have added all the children
-                        // of this pending delta node into the save delta. 
+                        // of this pending delta node into the save delta.
                         if (pendingDeltaNode.getElement() instanceof IMemento) {
                             return false;
                         } else {
@@ -523,987 +825,1356 @@ abstract class ModelContentProvider implements IContentProvider, IModelChangedLi
                     }
                 };
                 fPendingState.accept(pendingStateVisitor);
-		    }		            
-
-			if (saveDeltaRoot.getChildDeltas().length > 0) {
-				// encode delta with mementos in place of elements, in non-UI thread
-				encodeDelta(saveDeltaRoot, stateProvider);
-			} else {
-	            if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-	                System.out.println("SAVE CANCELED, NO DATA"); //$NON-NLS-1$
-	            }			
-			}
-		}
-	}
-	
-	private void clearRevealFlag(ModelDelta saveRootDelta) {
+            }
+
+            if (saveDeltaRoot.getChildDeltas().length > 0) {
+                // encode delta with mementos in place of elements, in non-UI
+                // thread
+                encodeDelta(saveDeltaRoot, stateProvider);
+            } else {
+                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                    System.out.println("STATE SAVE CANCELED, NO DATA"); //$NON-NLS-1$
+                }
+            }
+        }
+    }
+
+    private void clearRevealFlag(ModelDelta saveRootDelta) {
         IModelDeltaVisitor clearDeltaVisitor = new IModelDeltaVisitor() {
             public boolean visit(IModelDelta delta, int depth) {
-                if ( (delta.getFlags() & IModelDelta.REVEAL) != 0) {
-                    ((ModelDelta)delta).setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
+                if ((delta.getFlags() & IModelDelta.REVEAL) != 0) {
+                    ((ModelDelta) delta).setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
                 }
                 return true;
             }
         };
         saveRootDelta.accept(clearDeltaVisitor);
-	}
-	
-	private ModelDelta findSaveDelta(ModelDelta saveDeltaRoot, IModelDelta pendingStateDelta) {
-	    // Create a path of elements to the pendingStateDelta.
-	    LinkedList deltaPath = new LinkedList();
-    	IModelDelta delta = pendingStateDelta;
-	    while (delta.getParentDelta() != null) {
-	        delta = delta.getParentDelta();
-	        deltaPath.addFirst(delta);
-	    }
-	    
-	    // For each element in the patch of the pendingStateDelta, find the corresponding
-	    // element in the partially restored delta being saved.  
-	    Iterator itr = deltaPath.iterator();
-	    // Skip the root element
-	    itr.next();
-	    ModelDelta saveDelta = saveDeltaRoot;
-	    outer: while (itr.hasNext()) {
-	        IModelDelta itrDelta = (IModelDelta)itr.next();
-	        for (int i = 0; i < saveDelta.getChildDeltas().length; i++) {
-	            if ( deltasEqual(saveDelta.getChildDeltas()[i], itrDelta) ) {
-	                saveDelta = (ModelDelta)saveDelta.getChildDeltas()[i];
-	                continue outer;
-	            }
-	        }
-	        return null;
-	    }
-	    return saveDelta;
-	}
-	
-	private boolean deltasEqual(IModelDelta d1, IModelDelta d2) {
-	    // Note: don't compare the child count, because it is
-	    // incorrect for nodes which have not been expanded yet.
-	    return d1.getElement().equals(d2.getElement()) &&
-	           d1.getIndex() == d2.getIndex();
-	}
-
-	private boolean isDeltaInParent(IModelDelta delta, ModelDelta destParent) {
+    }
+
+    private ModelDelta findSubDeltaParent(ModelDelta destinationDeltaRoot, IModelDelta subDelta) {
+        // Create a path of elements to the sub-delta.
+        LinkedList deltaPath = new LinkedList();
+        IModelDelta delta = subDelta;
+        while (delta.getParentDelta() != null) {
+            delta = delta.getParentDelta();
+            deltaPath.addFirst(delta);
+        }
+
+        // For each element in the path of the sub-delta, find the corresponding
+        // element in the destination delta
+        Iterator itr = deltaPath.iterator();
+        // Skip the root element
+        itr.next();
+        ModelDelta saveDelta = destinationDeltaRoot;
+        outer: while (itr.hasNext()) {
+            IModelDelta itrDelta = (IModelDelta) itr.next();
+            for (int i = 0; i < saveDelta.getChildDeltas().length; i++) {
+                if (deltasEqual(saveDelta.getChildDeltas()[i], itrDelta)) {
+                    saveDelta = (ModelDelta) saveDelta.getChildDeltas()[i];
+                    continue outer;
+                }
+            }
+            return null;
+        }
+        return saveDelta;
+    }
+
+    private ModelDelta findDeltaForPath(ModelDelta root, TreePath path) {
+        ModelDelta delta = root;
+        for (int i = 0; i < path.getSegmentCount(); i++) {
+            delta = delta.getChildDelta(path.getSegment(i));
+            if (delta == null) {
+                return null;
+            }
+        }
+        return delta;
+    }
+
+    private boolean deltasEqual(IModelDelta d1, IModelDelta d2) {
+        // Note: don't compare the child count, because it is
+        // incorrect for nodes which have not been expanded yet.
+        return d1.getElement().equals(d2.getElement()) && d1.getIndex() == d2.getIndex();
+    }
+
+    private boolean isDeltaInParent(IModelDelta delta, ModelDelta destParent) {
         for (int i = 0; i < destParent.getChildDeltas().length; i++) {
-            if ( deltasEqual(destParent.getChildDeltas()[i], delta) ) {
+            if (deltasEqual(destParent.getChildDeltas()[i], delta)) {
                 return true;
             }
         }
         return false;
-	}	
+    }
 
-	private void copyIntoDelta(IModelDelta delta, ModelDelta destParent) {
-	    // Search the destination and make sure that the same delta 
-	    // doesn't exist already.
-        
-        ModelDelta newDelta = destParent.addNode(delta.getElement(), delta.getIndex(), delta.getFlags(), delta.getChildCount());
+    private void copyIntoDelta(IModelDelta delta, ModelDelta destParent) {
+        ModelDelta newDelta = destParent.addNode(delta.getElement(), delta.getIndex(), delta.getFlags(), delta
+            .getChildCount());
         for (int i = 0; i < delta.getChildDeltas().length; i++) {
             copyIntoDelta(delta.getChildDeltas()[i], newDelta);
         }
-	}
-
-	/**
-	 * Encodes delta elements into mementos using the given provider.
-	 *  
-	 * @param delta
-	 * @param stateProvider
-	 */
-	protected void encodeDelta(final ModelDelta rootDelta, final IElementMementoProvider defaultProvider) {
-		final XMLMemento inputMemento = XMLMemento.createWriteRoot("VIEWER_INPUT_MEMENTO"); //$NON-NLS-1$
-		final XMLMemento childrenMemento = XMLMemento.createWriteRoot("CHILDREN_MEMENTO"); //$NON-NLS-1$
-		final IMementoManager manager = new IMementoManager() {
-		
-			/**
-			 * list of memento requests
-			 */
-			private List requests = new ArrayList();
-			private boolean abort = false; 
-			
-			/* (non-Javadoc)
-			 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#requestComplete(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest)
-			 */
-			public synchronized void requestComplete(IElementMementoRequest request) {
-				if (!abort) {
-					if (!request.isCanceled() && (request.getStatus() == null || request.getStatus().isOK())) {
-						requests.remove(request);
-						if (requests.isEmpty()) {
-							XMLMemento keyMemento = (XMLMemento) rootDelta.getElement();
-							StringWriter writer = new StringWriter();
-							try {
-								keyMemento.save(writer);
-								fViewerStates.put(writer.toString(), rootDelta);
-							} catch (IOException e) {
-								DebugUIPlugin.log(e);
-							}
-	                        if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-	                            System.out.println("SAVE COMPLETED: " + rootDelta); //$NON-NLS-1$
-	                        }
-							stateSaveComplete(this);
-						}
-					} else {
-						abort = true;
-						Iterator iterator = requests.iterator();
-						while (iterator.hasNext()) {
-							IElementMementoRequest req = (IElementMementoRequest) iterator.next();
-							req.cancel();
-						}
-						requests.clear();
-		                if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-		                    System.out.println("SAVE ABORTED: " + rootDelta.getElement()); //$NON-NLS-1$
-		                }
-						stateSaveComplete(this);
-					}
-				}
-			}
-		
-			/* (non-Javadoc)
-			 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#processReqeusts()
-			 */
-			public synchronized void processReqeusts() {
-				Map providers = new HashMap();
-				Iterator iterator = requests.iterator();
-				while (iterator.hasNext()) {
-					IElementMementoRequest request = (IElementMementoRequest) iterator.next();
-					IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(request.getElement());
-					if (provider == null) {
-						provider = defaultProvider;
-					}
-					List reqs = (List) providers.get(provider);
-					if (reqs == null) {
-						reqs = new ArrayList();
-						providers.put(provider, reqs);
-					}
-					reqs.add(request);
-				}
-				iterator = providers.entrySet().iterator();
-				while (iterator.hasNext()) {
-					Entry entry = (Entry) iterator.next();
-					IElementMementoProvider provider = (IElementMementoProvider) entry.getKey();
-					List reqs = (List) entry.getValue();
-					provider.encodeElements((IElementMementoRequest[]) reqs.toArray(new IElementMementoRequest[reqs.size()]));
-				}
-			}
-		
-			/* (non-Javadoc)
-			 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.IMementoManager#addRequest(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest)
-			 */
-			public synchronized void addRequest(IElementMementoRequest request) {
-				requests.add(request);
-			}
-		
-		};
-		IModelDeltaVisitor visitor = new IModelDeltaVisitor() {
-			public boolean visit(IModelDelta delta, int depth) {
-				if (delta.getParentDelta() == null) {
-					manager.addRequest(
-						new ElementMementoRequest(ModelContentProvider.this, getViewer().getInput(), manager, getPresentationContext(),
-							delta.getElement(), getViewerTreePath(delta), inputMemento, (ModelDelta)delta));
-			} else {
-			    if (!(delta.getElement() instanceof XMLMemento)) {
-					manager.addRequest(
-						new ElementMementoRequest(ModelContentProvider.this, getViewer().getInput(), manager, getPresentationContext(),
-								delta.getElement(), getViewerTreePath(delta), childrenMemento.createChild("CHILD_ELEMENT"), (ModelDelta)delta)); //$NON-NLS-1$
-			    }
-			}
-			return true;
-		}
-		};
-		rootDelta.accept(visitor);
-		stateSaveStarted(manager);
-		manager.processReqeusts();
-	}
-	
-	/**
-	 * Called when a state save is starting.
-	 * 
-	 * @param manager
-	 */
-	private synchronized void stateSaveStarted(IMementoManager manager) {
-		fPendingStateSaves.add(manager);
-	}
-	
-	/**
-	 * Called when a state save is complete.
-	 * 
-	 * @param manager
-	 */
-	private synchronized void stateSaveComplete(IMementoManager manager) {
-		fPendingStateSaves.remove(manager);
-		if (fQueuedRestore != null) {
-			Object temp = fQueuedRestore;
-			fQueuedRestore = null;
-			restoreViewerState(temp);
-		}
-	}
-	
-	/**
-	 * Returns whether any state saving is in progress.
-	 * 
-	 * @return whether any state saving is in progress
-	 */
-	private synchronized boolean isSavingState() {
-		return !fPendingStateSaves.isEmpty();
-	}
-
-	/**
-	 * Builds a delta with the given root delta for expansion/selection state.
-	 * 
-	 * @param delta root delta
-	 */
-	protected abstract void buildViewerState(ModelDelta delta);
-
-	/**
-	 * Uninstalls the model proxy installed for the given element, if any.
-	 * 
-	 * @param element
-	 */
-	protected synchronized void disposeModelProxy(Object element) {
-		IModelProxy proxy = (IModelProxy) fModelProxies.remove(element);
-		if (proxy != null) {
-			proxy.dispose();
-		}
-	}
-
-	/**
-	 * Uninstalls each model proxy
-	 */
-	protected synchronized void disposeAllModelProxies() {
-		Iterator updatePolicies = fModelProxies.values().iterator();
-		while (updatePolicies.hasNext()) {
-			IModelProxy proxy = (IModelProxy) updatePolicies.next();
-			proxy.dispose();
-		}
-		fModelProxies.clear();
-	}
-
-	protected synchronized IModelProxy[] getModelProxies() {
-	    return (IModelProxy[])fModelProxies.values().toArray(new IModelProxy[fModelProxies.size()]);
-	}
-	
-	protected synchronized IModelProxy getElementProxy(TreePath path) {
-	    for (int i = path.getSegmentCount() - 1; i >= 0; i--) {
-	        IModelProxy proxy = (IModelProxy)fModelProxies.get(path.getSegment(i));
-	        if (proxy != null) {
-	            return proxy;
-	        }
-	    }
-	    return null;
-	}
-	
-	/**
-	 * Installs the model proxy for the given element into this content provider
-	 * if not already installed.
-	 * 
-	 * @param element
-	 *            element to install an update policy for
-	 */
-	protected synchronized void installModelProxy(Object element) {
-		if (!fModelProxies.containsKey(element)) {
-			IModelProxyFactory modelProxyFactory = ViewerAdapterService.getModelProxyFactory(element);
-			if (modelProxyFactory != null) {
-				final IModelProxy proxy = modelProxyFactory.createModelProxy(
-						element, getPresentationContext());
-				if (proxy != null) {
-					fModelProxies.put(element, proxy);
-					Job job = new Job("Model Proxy installed notification job") {//$NON-NLS-1$
-						protected IStatus run(IProgressMonitor monitor) {
-							if (!monitor.isCanceled()) {
-							    IPresentationContext context = null;
-							    Viewer viewer = null;
-								synchronized (ModelContentProvider.this) {
-									if (!isDisposed()) {
-									    context = getPresentationContext();
-									    viewer = (Viewer)getViewer();
-									}
-								}
-								if (context != null && !proxy.isDisposed()) {
-    								proxy.init(context);
-    								proxy.addModelChangedListener(ModelContentProvider.this);
-    								proxy.installed(viewer);
-								}
-							}
-							return Status.OK_STATUS;
-						}
-						/* (non-Javadoc)
-						 * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
-						 */
-						public boolean shouldRun() {
-						    return !isDisposed();
-						}
-					};
-					job.setSystem(true);
-					job.schedule();
-				}
-			}
-		}
-	}
-
-	/**
-	 * Returns the presentation context for this content provider.
-	 * 
-	 * @return presentation context
-	 */
-	protected abstract IPresentationContext getPresentationContext();
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.debug.internal.ui.viewers.provisional.IModelChangedListener#modelChanged(org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta)
-	 */
-	public synchronized void modelChanged(final IModelDelta delta, final IModelProxy proxy) {
-	    if (fViewer != null && !proxy.isDisposed()) {
-    		WorkbenchJob job = new WorkbenchJob(fViewer.getDisplay(), "process model delta") { //$NON-NLS-1$
-    			public IStatus runInUIThread(IProgressMonitor monitor) {
-                    if (!proxy.isDisposed()) {
-                        if (DEBUG_DELTAS && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                            DebugUIPlugin.debug("RECEIVED DELTA: " + delta.toString()); //$NON-NLS-1$
-                        }
-    
-                        updateNodes(new IModelDelta[] { delta }, false);
-                        
-                        // Call model listeners after updating the viewer model.
-                        Object[] listeners = fModelListeners.getListeners();
-                        for (int i = 0; i < listeners.length; i++) {
-                            ((IModelChangedListener)listeners[i]).modelChanged(delta, proxy);
+    }
+
+    /**
+     * Encodes delta elements into mementos using the given provider.
+     * 
+     * @param delta
+     * @param stateProvider
+     */
+    protected void encodeDelta(final ModelDelta rootDelta, final IElementMementoProvider defaultProvider) {
+        final Object input = rootDelta.getElement();
+        final XMLMemento inputMemento = XMLMemento.createWriteRoot("VIEWER_INPUT_MEMENTO"); //$NON-NLS-1$
+        final XMLMemento childrenMemento = XMLMemento.createWriteRoot("CHILDREN_MEMENTO"); //$NON-NLS-1$
+        final IMementoManager manager = new IMementoManager() {
+
+            /**
+             * list of memento fRequests
+             */
+            private List fRequests = new ArrayList();
+
+            /**
+             * Flag indicating whether the encoding of delta has been canceled.
+             */
+            private boolean fCanceled = false;
+
+            /*
+             * (non-Javadoc)
+             * 
+             * @see
+             * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+             * .IMementoManager
+             * #requestComplete(org.eclipse.debug.internal.ui.viewers
+             * .model.provisional.IElementMementoRequest)
+             */
+            public void requestComplete(IElementMementoRequest request) {
+                notifyStateUpdate(input, UPDATE_COMPLETE, request);
+                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                    System.out.println("\tSTATE END: " + request); //$NON-NLS-1$
+                }
+
+                if (!request.isCanceled() && (request.getStatus() == null || request.getStatus().isOK())) {
+                    boolean requestsComplted = false; 
+                    synchronized(this) {
+                        if (!fCanceled) { 
+                            fRequests.remove(request);
+                            requestsComplted = fRequests.isEmpty();
+                        }
+                    }
+                    if (requestsComplted) {
+                        XMLMemento keyMemento = (XMLMemento) rootDelta.getElement();
+                        StringWriter writer = new StringWriter();
+                        try {
+                            keyMemento.save(writer);
+                            fViewerStates.put(writer.toString(), rootDelta);
+                        } catch (IOException e) {
+                            DebugUIPlugin.log(e);
+                        }
+                        if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                            System.out.println("STATE SAVE COMPLETED: " + rootDelta); //$NON-NLS-1$
                         }
+                        stateSaveComplete(input, this);
                     }
-                    return Status.OK_STATUS;
-    	        }
-    		};
-    		job.setSystem(true);
-    		job.schedule();
-	    }
-	}
-
-	/**
-	 * Turns on the mode which causes the model viewer to ignore SELECT, 
-	 * EXPAND, and COLLAPSE flags of {@link IModelDelta}.
-	 *  
-	 * @param suppress If <code>true</code> it turns on the suppress mode.
-	 */
-    public void setSuppressModelControlDeltas(boolean suppress) {
-        fSuppressModelControlRequests = suppress;
+                } else {
+                    cancel();
+                }
+            }
+
+            public void cancel() {
+                synchronized (this) {
+                    if (fCanceled) {
+                        return;
+                    }
+                                
+                    fCanceled = true;
+                    Iterator iterator = fRequests.iterator();
+                    while (iterator.hasNext()) {
+                        IElementMementoRequest req = (IElementMementoRequest) iterator.next();
+                        req.cancel();
+                    }
+                    fRequests.clear();
+                    if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                        System.out.println("STATE SAVE ABORTED: " + rootDelta.getElement()); //$NON-NLS-1$
+                    }
+                }
+                stateSaveComplete(input, this);
+            }
+            
+            /*
+             * (non-Javadoc)
+             * 
+             * @see
+             * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+             * .IMementoManager#processReqeusts()
+             */
+            public synchronized void processReqeusts() {
+                Map providers = new HashMap();
+                Iterator iterator = fRequests.iterator();
+                while (iterator.hasNext()) {
+                    IElementMementoRequest request = (IElementMementoRequest) iterator.next();
+                    notifyStateUpdate(input, UPDATE_BEGINS, request);
+                    IElementMementoProvider provider = ViewerAdapterService.getMementoProvider(request.getElement());
+                    if (provider == null) {
+                        provider = defaultProvider;
+                    }
+                    List reqs = (List) providers.get(provider);
+                    if (reqs == null) {
+                        reqs = new ArrayList();
+                        providers.put(provider, reqs);
+                    }
+                    reqs.add(request);
+                }
+                iterator = providers.entrySet().iterator();
+                while (iterator.hasNext()) {
+                    Entry entry = (Entry) iterator.next();
+                    IElementMementoProvider provider = (IElementMementoProvider) entry.getKey();
+                    List reqs = (List) entry.getValue();
+                    provider.encodeElements((IElementMementoRequest[]) reqs.toArray(new IElementMementoRequest[reqs
+                        .size()]));
+                }
+            }
+
+            /*
+             * (non-Javadoc)
+             * 
+             * @see
+             * org.eclipse.debug.internal.ui.viewers.model.provisional.viewers
+             * .IMementoManager
+             * #addRequest(org.eclipse.debug.internal.ui.viewers.
+             * model.provisional.IElementMementoRequest)
+             */
+            public synchronized void addRequest(IElementMementoRequest request) {
+                fRequests.add(request);
+            }
+
+        };
+        IModelDeltaVisitor visitor = new IModelDeltaVisitor() {
+            public boolean visit(IModelDelta delta, int depth) {
+                // Add the CONTENT flag to all nodes with an EXPAND flag. 
+                // During restoring, this flag is used as a marker indicating 
+                // whether all the content of a given element has been 
+                // retrieved.
+                if ((delta.getFlags() | IModelDelta.EXPAND) != 0) {
+                    ((ModelDelta)delta).setFlags(delta.getFlags() | IModelDelta.CONTENT);
+                }
+                
+                // This is the root element, save the root element memento in 'inputMemento'.
+                if (delta.getParentDelta() == null) {
+                    manager.addRequest(new ElementMementoRequest(ModelContentProvider.this, input, manager,
+                        getPresentationContext(), delta.getElement(), getViewerTreePath(delta), inputMemento,
+                        (ModelDelta) delta));
+                } else {
+                    // If this is another node element, save the memento to a children memento.
+                    if (!(delta.getElement() instanceof XMLMemento)) {
+                        manager.addRequest(new ElementMementoRequest(ModelContentProvider.this, input, manager,
+                            getPresentationContext(), delta.getElement(), getViewerTreePath(delta), childrenMemento
+                                .createChild("CHILD_ELEMENT"), (ModelDelta) delta)); //$NON-NLS-1$
+                    }
+                }
+                return true;
+            }
+        };
+        rootDelta.accept(visitor);
+        stateSaveStarted(input, manager);
+        manager.processReqeusts();
     }
-    
+
+    /**
+     * Called when a state save is starting.
+     * 
+     * @param manager
+     */
+    private synchronized void stateSaveStarted(Object input, IMementoManager manager) {
+        notifyStateUpdate(input, STATE_SAVE_SEQUENCE_BEGINS, null);
+        fPendingStateSaves.add(manager);
+    }
+
+    /**
+     * Called when a state save is complete.
+     * 
+     * @param manager
+     */
+    private synchronized void stateSaveComplete(Object input, IMementoManager manager) {
+        notifyStateUpdate(input, STATE_SAVE_SEQUENCE_COMPLETE, null);
+        fPendingStateSaves.remove(manager);
+        if (fQueuedRestore != null) {
+            Object temp = fQueuedRestore;
+            fQueuedRestore = null;
+            restoreViewerState(temp);
+        }
+    }
+
+    /**
+     * Returns whether any state saving is in progress.
+     * 
+     * @return whether any state saving is in progress
+     */
+    private synchronized boolean isSavingState() {
+        return !fPendingStateSaves.isEmpty();
+    }
+
+    /**
+     * Builds a delta with the given root delta for expansion/selection state.
+     * 
+     * @param delta
+     *            root delta
+     */
+    protected abstract void buildViewerState(ModelDelta delta);
+
     /**
-     * Returns true if the viewer is currently in the mode to ignore SELECT, 
-     * REVEAL, EXPAND, and COLLAPSE flags of {@link IModelDelta}.
-     *  
-     * @return Returns <code>true</code> if in suppress mode.
+     * Uninstalls the model proxy installed for the given element, if any.
+     * 
+     * @param element
+     */
+    protected synchronized void disposeModelProxy(TreePath path) {
+        IModelProxy proxy = (IModelProxy) fTreeModelProxies.remove(path);
+        if (proxy != null) {
+            proxy.dispose();
+        }
+        proxy = (IModelProxy) fModelProxies.remove(path.getLastSegment());
+        if (proxy != null) {
+            proxy.dispose();
+        }
+    }
+
+    /**
+     * Uninstalls each model proxy
+     */
+    protected synchronized void disposeAllModelProxies() {
+        Iterator updatePolicies = fModelProxies.values().iterator();
+        while (updatePolicies.hasNext()) {
+            IModelProxy proxy = (IModelProxy) updatePolicies.next();
+            proxy.dispose();
+        }
+        fModelProxies.clear();
+
+        updatePolicies = fTreeModelProxies.values().iterator();
+        while (updatePolicies.hasNext()) {
+            IModelProxy proxy = (IModelProxy) updatePolicies.next();
+            proxy.dispose();
+        }
+        fTreeModelProxies.clear();
+    }
+
+    protected synchronized IModelProxy[] getModelProxies() {
+        IModelProxy[] proxies = new IModelProxy[fTreeModelProxies.size() + fModelProxies.size()];
+        fTreeModelProxies.values().toArray(proxies);
+        System.arraycopy(fModelProxies.values().toArray(), 0, proxies, fModelProxies.size(), fModelProxies.size());
+        return proxies;
+    }
+
+    protected synchronized IModelProxy getElementProxy(TreePath path) {
+        while (path != null) {
+            IModelProxy proxy = (IModelProxy) fTreeModelProxies.get(path);
+            if (proxy != null) {
+                return proxy;
+            }
+
+            Object element = path.getSegmentCount() == 0 ? getViewer().getInput() : path.getLastSegment();
+            proxy = (IModelProxy) fModelProxies.get(element);
+            if (proxy != null) {
+                return proxy;
+            }
+
+            path = path.getParentPath();
+        }
+        return null;
+    }
+
+    /**
+     * Installs the model proxy for the given element into this content provider
+     * if not already installed.
+     * 
+     * @param element
+     *            element to install an update policy for
+     */
+    protected synchronized void installModelProxy(Object input, TreePath path) {
+        if (!fTreeModelProxies.containsKey(path) && !fModelProxies.containsKey(path.getLastSegment())) {
+            Object element = path.getSegmentCount() != 0 ? path.getLastSegment() : input;
+            IModelProxy proxy = null;
+            IModelProxyFactory2 modelProxyFactory2 = ViewerAdapterService.getModelProxyFactory2(element);
+            if (modelProxyFactory2 != null) {
+                proxy = modelProxyFactory2.createTreeModelProxy(input, path, getPresentationContext());
+                if (proxy != null) {
+                    fTreeModelProxies.put(path, proxy);
+                }
+            }
+            if (proxy == null) {
+                IModelProxyFactory modelProxyFactory = ViewerAdapterService.getModelProxyFactory(element);
+                if (modelProxyFactory != null) {
+                    proxy = modelProxyFactory.createModelProxy(element, getPresentationContext());
+                    if (proxy != null) {
+                        fModelProxies.put(element, proxy);
+                    }
+                }
+            }
+
+            if (proxy != null) {
+                final IModelProxy finalProxy = proxy;
+                if (proxy != null) {
+                    Job job = new Job("Model Proxy installed notification job") {//$NON-NLS-1$
+                        protected IStatus run(IProgressMonitor monitor) {
+                            if (!monitor.isCanceled()) {
+                                IPresentationContext context = null;
+                                Viewer viewer = null;
+                                synchronized (ModelContentProvider.this) {
+                                    if (!isDisposed()) {
+                                        context = getPresentationContext();
+                                        viewer = (Viewer) getViewer();
+                                    }
+                                }
+                                if (context != null && !finalProxy.isDisposed()) {
+                                    finalProxy.init(context);
+                                    finalProxy.addModelChangedListener(ModelContentProvider.this);
+                                    finalProxy.installed(viewer);
+                                }
+                            }
+                            return Status.OK_STATUS;
+                        }
+
+                        /*
+                         * (non-Javadoc)
+                         * 
+                         * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
+                         */
+                        public boolean shouldRun() {
+                            return !isDisposed();
+                        }
+                    };
+                    job.setSystem(true);
+                    job.schedule();
+                }
+            }
+        }
+    }
+
+    /**
+     * Returns the presentation context for this content provider.
+     * 
+     * @return presentation context
+     */
+    protected abstract IPresentationContext getPresentationContext();
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.eclipse.debug.internal.ui.viewers.provisional.IModelChangedListener
+     * #modelChanged
+     * (org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta)
      */
-    public boolean isSuppressModelControlDeltas() {
-        return fSuppressModelControlRequests;
+    public void modelChanged(final IModelDelta delta, final IModelProxy proxy) {
+        Display display = null;
+
+        // Check if the viewer is still available, i.e. if the content provider
+        // is not disposed.
+        synchronized(this) {
+            if (fViewer != null && !proxy.isDisposed()) {
+                display = fViewer.getDisplay();
+            }
+        }
+        if (display != null) {
+            // If we're in display thread, process the delta immediately to 
+            // avoid "skid" in processing events.
+            if (Thread.currentThread().equals(display.getThread())) {
+                doModelChanged(delta, proxy);
+            }
+            else {
+                WorkbenchJob job = new WorkbenchJob(fViewer.getDisplay(), "process model delta") { //$NON-NLS-1$
+                    public IStatus runInUIThread(IProgressMonitor monitor) {
+                        doModelChanged(delta, proxy);
+                        return Status.OK_STATUS;
+                    }
+                };
+                job.setSystem(true);
+                job.schedule();
+            }
+        }
     }
 
-    public void updateModel(IModelDelta delta) {
-        updateNodes(new IModelDelta[] { delta }, true);
+    private void doModelChanged(IModelDelta delta, IModelProxy proxy) {
+        if (!proxy.isDisposed()) {
+            if (DEBUG_DELTAS && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                DebugUIPlugin.debug("RECEIVED DELTA: " + delta.toString()); //$NON-NLS-1$
+            }
+
+            updateModel(delta, getModelDeltaMask());
+
+            // Call model listeners after updating the viewer model.
+            Object[] listeners = fModelListeners.getListeners();
+            for (int i = 0; i < listeners.length; i++) {
+                ((IModelChangedListener) listeners[i]).modelChanged(delta, proxy);
+            }
+        }
     }
     
     /**
-     * Updates the viewer with the following deltas. 
+     * @see ITreeModelContentProvider#setModelDeltaMask(int)
+     */
+    public void setModelDeltaMask(int mask) {
+        fModelDeltaMask = mask;
+    }
+
+    /**
+     * @see ITreeModelContentProvider#getModelDeltaMask()
+     */
+    public int getModelDeltaMask() {
+        return fModelDeltaMask;
+    }
+
+    public void updateModel(IModelDelta delta, int mask) {
+        IModelDelta[] deltaArray = new IModelDelta[] { delta };
+        updateNodes(deltaArray, mask & (IModelDelta.REMOVED | IModelDelta.UNINSTALL));
+        updateNodes(deltaArray, mask & ITreeModelContentProvider.UPDATE_MODEL_DELTA_FLAGS
+            & ~(IModelDelta.REMOVED | IModelDelta.UNINSTALL));
+        updateNodes(deltaArray, mask & ITreeModelContentProvider.CONTROL_MODEL_DELTA_FLAGS);
+    }
+
+    /**
+     * Updates the viewer with the following deltas.
+     * 
+     * @param nodes
+     *            Model deltas to be processed.
+     * @param override
+     *            If true, it overrides the mode which suppresses processing of
+     *            SELECT, REVEAL, EXPAND, COLLAPSE flags of {@link IModelDelta}.
+     */
+    protected void updateNodes(IModelDelta[] nodes, int mask) {
+        for (int i = 0; i < nodes.length; i++) {
+            IModelDelta node = nodes[i];
+            int flags = node.getFlags() & mask;
+
+            if ((flags & IModelDelta.ADDED) != 0) {
+                handleAdd(node);
+            }
+            if ((flags & IModelDelta.REMOVED) != 0) {
+                handleRemove(node);
+            }
+            if ((flags & IModelDelta.CONTENT) != 0) {
+                handleContent(node);
+            }
+            if ((flags & IModelDelta.STATE) != 0) {
+                handleState(node);
+            }
+            if ((flags & IModelDelta.INSERTED) != 0) {
+                handleInsert(node);
+            }
+            if ((flags & IModelDelta.REPLACED) != 0) {
+                handleReplace(node);
+            }
+            if ((flags & IModelDelta.INSTALL) != 0) {
+                handleInstall(node);
+            }
+            if ((flags & IModelDelta.UNINSTALL) != 0) {
+                handleUninstall(node);
+            }
+            if ((flags & IModelDelta.EXPAND) != 0) {
+                handleExpand(node);
+            }
+            if ((flags & IModelDelta.COLLAPSE) != 0) {
+                handleCollapse(node);
+            }
+            if ((flags & IModelDelta.SELECT) != 0) {
+                handleSelect(node);
+            }
+            if ((flags & IModelDelta.REVEAL) != 0) {
+                handleReveal(node);
+            }
+            updateNodes(node.getChildDeltas(), mask);
+        }
+    }
+
+    protected abstract void handleState(IModelDelta delta);
+
+    protected abstract void handleSelect(IModelDelta delta);
+
+    protected abstract void handleExpand(IModelDelta delta);
+
+    protected abstract void handleCollapse(IModelDelta delta);
+
+    protected abstract void handleContent(IModelDelta delta);
+
+    protected abstract void handleRemove(IModelDelta delta);
+
+    protected abstract void handleAdd(IModelDelta delta);
+
+    protected abstract void handleInsert(IModelDelta delta);
+
+    protected abstract void handleReplace(IModelDelta delta);
+
+    protected abstract void handleReveal(IModelDelta delta);
+
+    protected void handleInstall(IModelDelta delta) {
+        installModelProxy(getViewer().getInput(), getFullTreePath(delta));
+    }
+
+    protected void handleUninstall(IModelDelta delta) {
+        disposeModelProxy(getFullTreePath(delta));
+    }
+
+    /**
+     * Returns a tree path for the node including the root element.
+     * 
+     * @param node
+     *            model delta
+     * @return corresponding tree path
+     */
+    protected TreePath getFullTreePath(IModelDelta node) {
+        ArrayList list = new ArrayList();
+        while (node.getParentDelta() != null) {
+            list.add(0, node.getElement());
+            node = node.getParentDelta();
+        }
+        return new TreePath(list.toArray());
+    }
+
+    /**
+     * Returns a tree path for the node, *not* including the root element.
      * 
-     * @param nodes Model deltas to be processed.
-     * @param override If true, it overrides the mode which suppresses 
-     * processing of SELECT, REVEAL, EXPAND, COLLAPSE flags of 
-     * {@link IModelDelta}.
-     */
-	protected void updateNodes(IModelDelta[] nodes, boolean override) {
-		for (int i = 0; i < nodes.length; i++) {
-			IModelDelta node = nodes[i];
-			int flags = node.getFlags();
-
-			if ((flags & IModelDelta.ADDED) != 0) {
-				handleAdd(node);
-			}
-			if ((flags & IModelDelta.REMOVED) != 0) {
-				handleRemove(node);
-			}
-			if ((flags & IModelDelta.CONTENT) != 0) {
-				handleContent(node);
-			}
-			if ((flags & IModelDelta.STATE) != 0) {
-				handleState(node);
-			}
-			if ((flags & IModelDelta.INSERTED) != 0) {
-				handleInsert(node);
-			}
-			if ((flags & IModelDelta.REPLACED) != 0) {
-				handleReplace(node);
-			}
-			if ((flags & IModelDelta.INSTALL) != 0) {
-				handleInstall(node);
-			}
-			if ((flags & IModelDelta.UNINSTALL) != 0) {
-				handleUninstall(node);
-			}
-            if (!fSuppressModelControlRequests || override) {
-                if ((flags & IModelDelta.EXPAND) != 0) {
-                    handleExpand(node);
+     * @param node
+     *            model delta
+     * @return corresponding tree path
+     */
+    protected TreePath getViewerTreePath(IModelDelta node) {
+        ArrayList list = new ArrayList();
+        IModelDelta parentDelta = node.getParentDelta();
+        while (parentDelta != null) {
+            list.add(0, node.getElement());
+            node = parentDelta;
+            parentDelta = node.getParentDelta();
+        }
+        return new TreePath(list.toArray());
+    }
+
+    /**
+     * Returns the viewer this content provider is working for.
+     * 
+     * @return viewer
+     */
+    protected ITreeModelContentProviderTarget getViewer() {
+        return fViewer;
+    }
+
+    /**
+     * Translates and returns the given child index from the viewer coordinate
+     * space to the model coordinate space.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param index
+     *            index of child element in viewer (filtered) space
+     * @return index of child element in model (raw) space
+     */
+    public/* protected */int viewToModelIndex(TreePath parentPath, int index) {
+        return fTransform.viewToModelIndex(parentPath, index);
+    }
+
+    /**
+     * Translates and returns the given child count from the viewer coordinate
+     * space to the model coordinate space.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param count
+     *            number of child elements in viewer (filtered) space
+     * @return number of child elements in model (raw) space
+     */
+    public/* protected */int viewToModelCount(TreePath parentPath, int count) {
+        return fTransform.viewToModelCount(parentPath, count);
+    }
+
+    /**
+     * Translates and returns the given child index from the model coordinate
+     * space to the viewer coordinate space.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param index
+     *            index of child element in model (raw) space
+     * @return index of child element in viewer (filtered) space or -1 if
+     *         filtered
+     */
+    public int modelToViewIndex(TreePath parentPath, int index) {
+        return fTransform.modelToViewIndex(parentPath, index);
+    }
+
+    /**
+     * Translates and returns the given child count from the model coordinate
+     * space to the viewer coordinate space.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param count
+     *            child count element in model (raw) space
+     * @return child count in viewer (filtered) space
+     */
+    public int modelToViewChildCount(TreePath parentPath, int count) {
+        return fTransform.modelToViewCount(parentPath, count);
+    }
+
+    /**
+     * Notes that the child at the specified index of the given parent element
+     * has been filtered from the viewer. Returns whether the child at the given
+     * index was already filtered.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param index
+     *            index of child element to be filtered
+     * @param element
+     *            the filtered element
+     * @return whether the child was already filtered
+     */
+    protected boolean addFilteredIndex(TreePath parentPath, int index, Object element) {
+        return fTransform.addFilteredIndex(parentPath, index, element);
+    }
+
+    /**
+     * Notes that the element at the given index has been removed from its
+     * parent and filtered indexes should be updated accordingly.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param index
+     *            index of element that was removed
+     */
+    protected void removeElementFromFilters(TreePath parentPath, int index) {
+        fTransform.removeElementFromFilters(parentPath, index);
+    }
+
+    /**
+     * Removes the given element from filtered elements of the given parent
+     * element. Return true if the element was removed, otherwise false.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param element
+     *            element to remove
+     * @return whether the element was removed
+     */
+    protected boolean removeElementFromFilters(TreePath parentPath, Object element) {
+        return fTransform.removeElementFromFilters(parentPath, element);
+    }
+
+    /**
+     * The child count for a parent has been computed. Ensure any filtered items
+     * above the given count are cleared.
+     * 
+     * @param parentPath
+     *            path to parent element
+     * @param childCount
+     *            number of children
+     */
+    protected void setModelChildCount(TreePath parentPath, int childCount) {
+        fTransform.setModelChildCount(parentPath, childCount);
+    }
+
+    /**
+     * Returns whether the given element is filtered.
+     * 
+     * @param parentElementOrTreePath
+     *            the parent element or path
+     * @param element
+     *            the child element
+     * @return whether to filter the element
+     */
+    public boolean shouldFilter(Object parentElementOrTreePath, Object element) {
+        ViewerFilter[] filters = fViewer.getFilters();
+        if (filters.length > 0) {
+            for (int j = 0; j < filters.length; j++) {
+                if (!(filters[j].select((Viewer) fViewer, parentElementOrTreePath, element))) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Returns whether the given index of the specified parent was previously
+     * filtered.
+     * 
+     * @param parentPath
+     * @param index
+     * @return whether the element at the given index was filtered
+     */
+    protected boolean isFiltered(TreePath parentPath, int index) {
+        return fTransform.isFiltered(parentPath, index);
+    }
+
+    /**
+     * Notification the given element is being unmapped.
+     * 
+     * @param path
+     */
+    public void unmapPath(TreePath path) {
+        // System.out.println("Unmap " + path.getLastSegment());
+        fTransform.clear(path);
+        cancelSubtreeUpdates(path);
+    }
+
+    /**
+     * Returns filtered children or <code>null</code>
+     * 
+     * @param parent
+     * @return filtered children or <code>null</code>
+     */
+    protected int[] getFilteredChildren(TreePath parent) {
+        return fTransform.getFilteredChildren(parent);
+    }
+
+    protected void clearFilteredChild(TreePath parent, int modelIndex) {
+        fTransform.clear(parent, modelIndex);
+    }
+
+    protected void clearFilters(TreePath parent) {
+        fTransform.clear(parent);
+    }
+
+    protected synchronized void checkIfRestoreComplete() {
+        if (fPendingState == null) {
+            return;
+        }
+        
+        /**
+         * Used to determine when restoration delta has been processed
+         */
+        class CheckState implements IModelDeltaVisitor {
+            private boolean complete = true;
+
+            /*
+             * (non-Javadoc)
+             * 
+             * @see
+             * org.eclipse.debug.internal.ui.viewers.provisional.IModelDeltaVisitor
+             * #visit(org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta,
+             * int)
+             */
+            public boolean visit(IModelDelta delta, int depth) {
+                // Filster out the CONTENT flags from the delta flags, the content
+                // flag is only used as a marker indicating that all the sub-elements
+                // of a given delta have been retrieved.  
+                int flags = (delta.getFlags() & ~IModelDelta.CONTENT);
+                
+                if (flags != IModelDelta.NO_CHANGE) {
+                    IModelDelta parentDelta = delta.getParentDelta();
+                    // Remove the delta if :
+                    // - The parent delta has no more flags on it (the content flag is removed as well), 
+                    // which means that parent element's children have been completely exposed.
+                    // - There are no more pending updates for the element.
+                    // - If element is a memento, there are no state requests pending.
+                    if (parentDelta != null && parentDelta.getFlags() == IModelDelta.NO_CHANGE) {
+                        TreePath deltaPath = getViewerTreePath(delta);
+                        if ( !areElementUpdatesPending(deltaPath) &&
+                             (!(delta.getElement() instanceof IMemento) || !areMementoUpdatesPending(delta)) ) 
+                        {
+                            removeDelta(delta);
+                            return false;
+                        }
+                    }
+
+                    if (flags != IModelDelta.REVEAL || (delta.getElement() instanceof IMemento)) {
+                        complete = false;
+                        return false;
+                    }
+                }
+                return true;
+            }
+
+            public boolean isComplete() {
+                return complete;
+            }
+
+            private boolean areElementUpdatesPending(TreePath path) {
+                synchronized (fRequestsInProgress) {
+                    TreePath parentPath = path.getParentPath();
+                    List requests = (List) fWaitingRequests.get(path);
+                    if (requests != null) {
+                        for (int i = 0; i < requests.size(); i++) {
+                            ViewerUpdateMonitor update = (ViewerUpdateMonitor) requests.get(i);
+                            if (update instanceof ChildrenUpdate) {
+                                return true;
+                            }
+                        }
+                    }
+                    requests = (List) fWaitingRequests.get(parentPath);
+                    if (requests != null) {
+                        for (int i = 0; i < requests.size(); i++) {
+                            ViewerUpdateMonitor update = (ViewerUpdateMonitor) requests.get(i);
+                            if (update.containsUpdate(path)) {
+                                return true;
+                            }
+                        }
+                    }
+                    requests = (List) fRequestsInProgress.get(path);
+                    if (requests != null) {
+                        for (int i = 0; i < requests.size(); i++) {
+                            ViewerUpdateMonitor update = (ViewerUpdateMonitor) requests.get(i);
+                            if (update instanceof ChildrenUpdate) {
+                                return true;
+                            }
+                        }
+                    }
+                    requests = (List) fRequestsInProgress.get(parentPath);
+                    if (requests != null) {
+                        for (int i = 0; i < requests.size(); i++) {
+                            ViewerUpdateMonitor update = (ViewerUpdateMonitor) requests.get(i);
+                            if (update.getElement().equals(path.getLastSegment())) {
+                                return true;
+                            }
+                        }
+                    }
                 }
-                if ((flags & IModelDelta.COLLAPSE) != 0) {
-                    handleCollapse(node);
+                return false;
+            }
+
+            private boolean areMementoUpdatesPending(IModelDelta delta) {
+                for (Iterator itr = fCompareRequestsInProgress.keySet().iterator(); itr.hasNext();) {
+                    CompareRequestKey key = (CompareRequestKey) itr.next();
+                    if (delta.getElement().equals(key.fDelta.getElement())) {
+                        return true;
+                    }
                 }
-                if ((flags & IModelDelta.SELECT) != 0) {
-                    handleSelect(node);
+                return false;
+            }
+
+            private void removeDelta(IModelDelta delta) {
+                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                    System.out.println("\tRESTORE REMOVED: " + delta.getElement()); //$NON-NLS-1$
                 }
-                if ((flags & IModelDelta.REVEAL) != 0) {
-                    handleReveal(node);
+
+                delta.accept(new IModelDeltaVisitor() {
+                    public boolean visit(IModelDelta _visitorDelta, int depth) {
+                        ModelDelta visitorDelta = (ModelDelta) _visitorDelta;
+                        visitorDelta.setElement(ELEMENT_REMOVED);
+                        visitorDelta.setFlags(IModelDelta.NO_CHANGE);
+                        return true;
+                    }
+                });
+
+            }
+        }
+
+        CheckState state = new CheckState();
+        fPendingState.accept(state);
+        if (state.isComplete()) {
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("STATE RESTORE COMPELTE: " + fPendingState); //$NON-NLS-1$
+            }
+            notifyStateUpdate(fPendingState.getElement(), STATE_RESTORE_SEQUENCE_COMPLETE, null);
+            fPendingState = null;
+        }
+    }
+
+    public void addViewerUpdateListener(IViewerUpdateListener listener) {
+        fUpdateListeners.add(listener);
+    }
+
+    public void removeViewerUpdateListener(IViewerUpdateListener listener) {
+        fUpdateListeners.remove(listener);
+    }
+
+    /**
+     * Notification an update request has started
+     * 
+     * @param update
+     */
+    void updateStarted(ViewerUpdateMonitor update) {
+        boolean begin = false;
+        synchronized (fRequestsInProgress) {
+            begin = fRequestsInProgress.isEmpty();
+            List requests = (List) fRequestsInProgress.get(update.getSchedulingPath());
+            if (requests == null) {
+                requests = new ArrayList();
+                fRequestsInProgress.put(update.getSchedulingPath(), requests);
+            }
+            requests.add(update);
+        }
+        if (begin) {
+            if (DEBUG_UPDATE_SEQUENCE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("MODEL SEQUENCE BEGINS"); //$NON-NLS-1$
+            }
+            notifyUpdate(UPDATE_SEQUENCE_BEGINS, null);
+        }
+        if (DEBUG_UPDATE_SEQUENCE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+            System.out.println("\tBEGIN - " + update); //$NON-NLS-1$
+        }
+        notifyUpdate(UPDATE_BEGINS, update);
+    }
+
+    /**
+     * Notification an update request has completed
+     * 
+     * @param update
+     */
+    void updateComplete(final ViewerUpdateMonitor update) {
+        notifyUpdate(UPDATE_COMPLETE, update);
+        if (DEBUG_UPDATE_SEQUENCE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+            System.out.println("\tEND - " + update); //$NON-NLS-1$
+        }
+
+        new UIJob("Update complete") { //$NON-NLS-1$
+            { setSystem(true); }
+            
+            public IStatus runInUIThread(IProgressMonitor monitor) {
+                boolean end = false;
+                synchronized (fRequestsInProgress) {
+                    List requests = (List) fRequestsInProgress.get(update.getSchedulingPath());
+                    if (requests != null) {
+                        requests.remove(update);
+                        trigger(update);
+                        if (requests.isEmpty()) {
+                            fRequestsInProgress.remove(update.getSchedulingPath());
+                        }
+                    }
+                    end = fRequestsInProgress.isEmpty();
                 }
+                if (end) {
+                    if (DEBUG_UPDATE_SEQUENCE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                        System.out.println("MODEL SEQUENCE ENDS"); //$NON-NLS-1$
+                    }
+                    notifyUpdate(UPDATE_SEQUENCE_COMPLETE, null);
+                }
+                return Status.OK_STATUS;
             }
-			updateNodes(node.getChildDeltas(), override);
-		}
-	}
-
-	protected abstract void handleState(IModelDelta delta);
-
-	protected abstract void handleSelect(IModelDelta delta);
-
-	protected abstract void handleExpand(IModelDelta delta);
-	
-	protected abstract void handleCollapse(IModelDelta delta);
-
-	protected abstract void handleContent(IModelDelta delta);
-
-	protected abstract void handleRemove(IModelDelta delta);
-
-	protected abstract void handleAdd(IModelDelta delta);
-
-	protected abstract void handleInsert(IModelDelta delta);
-
-	protected abstract void handleReplace(IModelDelta delta);
-	
-	protected abstract void handleReveal(IModelDelta delta);
-	
-	protected void handleInstall(IModelDelta delta) {
-		installModelProxy(delta.getElement());
-	}
-	
-	protected void handleUninstall(IModelDelta delta) {
-		disposeModelProxy(delta.getElement());
-	}	
-
-	/**
-	 * Returns a tree path for the node, *not* including the root element.
-	 * 
-	 * @param node
-	 *            model delta
-	 * @return corresponding tree path
-	 */
-	protected TreePath getViewerTreePath(IModelDelta node) {
-		ArrayList list = new ArrayList();
-		IModelDelta parentDelta = node.getParentDelta();
-		while (parentDelta != null) {
-			list.add(0, node.getElement());
-			node = parentDelta;
-			parentDelta = node.getParentDelta();
-		}
-		return new TreePath(list.toArray());
-	}
-
-	/**
-	 * Returns the viewer this content provider is working for.
-	 * 
-	 * @return viewer
-	 */
-	protected ITreeModelContentProviderTarget getViewer() {
-		return fViewer;
-	}
-	
-	/**
-	 * Translates and returns the given child index from the viewer coordinate
-	 * space to the model coordinate space.
-	 *  
-	 * @param parentPath path to parent element
-	 * @param index index of child element in viewer (filtered) space
-	 * @return index of child element in model (raw) space
-	 */
-	public /* protected */ int viewToModelIndex(TreePath parentPath, int index) {
-		return fTransform.viewToModelIndex(parentPath, index);
-	}
-	
-	/**
-	 * Translates and returns the given child count from the viewer coordinate
-	 * space to the model coordinate space.
-	 *  
-	 * @param parentPath path to parent element
-	 * @param count number of child elements in viewer (filtered) space
-	 * @return number of child elements in model (raw) space
-	 */
-	public /* protected */ int viewToModelCount(TreePath parentPath, int count) {
-		return fTransform.viewToModelCount(parentPath, count);
-	}	
-	
-	/**
-	 * Translates and returns the given child index from the model coordinate
-	 * space to the viewer coordinate space.
-	 *  
-	 * @param parentPath path to parent element
-	 * @param index index of child element in model (raw) space
-	 * @return index of child element in viewer (filtered) space or -1 if filtered
-	 */
-	public int modelToViewIndex(TreePath parentPath, int index) {
-		return fTransform.modelToViewIndex(parentPath, index);
-	}	
-	
-	/**
-	 * Translates and returns the given child count from the model coordinate
-	 * space to the viewer coordinate space.
-	 *  
-	 * @param parentPath path to parent element
-	 * @param count child count element in model (raw) space
-	 * @return child count in viewer (filtered) space
-	 */
-	public int modelToViewChildCount(TreePath parentPath, int count) {
-		return fTransform.modelToViewCount(parentPath, count);
-	}	
-	
-	/**
-	 * Notes that the child at the specified index of the given parent element
-	 * has been filtered from the viewer. Returns whether the child at the given
-	 * index was already filtered.
-	 * 
-	 * @param parentPath path to parent element
-	 * @param index index of child element to be filtered
-	 * @param element the filtered element
-	 * @return whether the child was already filtered
-	 */
-	protected boolean addFilteredIndex(TreePath parentPath, int index, Object element) {
-		return fTransform.addFilteredIndex(parentPath, index, element);
-	}
-	
-	/**
-	 * Notes that the element at the given index has been removed from its parent
-	 * and filtered indexes should be updated accordingly.
-	 * 
-	 * @param parentPath path to parent element
-	 * @param index index of element that was removed
-	 */
-	protected void removeElementFromFilters(TreePath parentPath, int index) {
-		fTransform.removeElementFromFilters(parentPath, index);
-	}
-	
-	/**
-	 * Removes the given element from filtered elements of the given parent
-	 * element. Return true if the element was removed, otherwise false.
-	 * 
-	 * @param parentPath path to parent element
-	 * @param element element to remove
-	 * @return whether the element was removed
-	 */
-	protected boolean removeElementFromFilters(TreePath parentPath, Object element) {
-		return fTransform.removeElementFromFilters(parentPath, element);
-	}	
-	
-	/**
-	 * The child count for a parent has been computed. Ensure any filtered items
-	 * above the given count are cleared.
-	 * 
-	 * @param parentPath path to parent element
-	 * @param childCount number of children
-	 */
-	protected void setModelChildCount(TreePath parentPath, int childCount) {
-		fTransform.setModelChildCount(parentPath, childCount);
-	}
-	
-	/**
- 	 * Returns whether the given element is filtered.
-	 * 
-	 * @param parentElementOrTreePath
-	 *            the parent element or path
-	 * @param element
-	 *            the child element
-	 * @return whether to filter the element
-	 */
-	public boolean shouldFilter(Object parentElementOrTreePath, Object element) {
-		ViewerFilter[] filters = fViewer.getFilters();
-		if (filters.length > 0) {
-			for (int j = 0; j < filters.length; j++) {
-				if (!(filters[j].select((Viewer)fViewer, parentElementOrTreePath, element))) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}	
-	
-	/**
-	 * Returns whether the given index of the specified parent was previously filtered.
-	 * 
-	 * @param parentPath
-	 * @param index
-	 * @return whether the element at the given index was filtered
-	 */
-	protected boolean isFiltered(TreePath parentPath, int index) {
-		return fTransform.isFiltered(parentPath, index);
-	}
-	
-	/**
-	 * Notification the given element is being unmapped.
-	 * 
-	 * @param path
-	 */
-	public void unmapPath(TreePath path) {
-		//System.out.println("Unmap " + path.getLastSegment());
-		fTransform.clear(path);
-		cancelSubtreeUpdates(path);
-	}
-
-	/**
-	 * Returns filtered children or <code>null</code>
-	 * @param parent
-	 * @return filtered children or <code>null</code>
-	 */
-	protected int[] getFilteredChildren(TreePath parent) {
-		return fTransform.getFilteredChildren(parent);
-	}
-	
-	protected void clearFilteredChild(TreePath parent, int modelIndex) {
-		fTransform.clear(parent, modelIndex);
-	}
-	
-	protected void clearFilters(TreePath parent) {
-		fTransform.clear(parent);
-	}
-
-	protected synchronized void checkIfRestoreComplete() {
-		if (fPendingState == null) {
-			return;
-		}
-		CheckState state = new CheckState();
-		fPendingState.accept(state);
-		if (state.isComplete()) {
-            if (DEBUG_STATE_SAVE_RESTORE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-                System.out.println("RESTORE COMPELTE: " + fPendingState); //$NON-NLS-1$
-            }
-			fPendingState = null;
-		}
-	}
-	
-	public void addViewerUpdateListener(IViewerUpdateListener listener) {
-		fUpdateListeners.add(listener);
-	}
-	
-	public void removeViewerUpdateListener(IViewerUpdateListener listener) {
-		fUpdateListeners.remove(listener);
-	}
-	
-	/**
-	 * Notification an update request has started
-	 * 
-	 * @param update
-	 */
-	void updateStarted(ViewerUpdateMonitor update) {
-		boolean begin = false;
-		synchronized (fRequestsInProgress) {
-			begin = fRequestsInProgress.isEmpty();
-			List requests = (List) fRequestsInProgress.get(update.getSchedulingPath());
-			if (requests == null) {
-				requests = new ArrayList();
-				fRequestsInProgress.put(update.getSchedulingPath(), requests);
-			}
-			requests.add(update);
-		}
-		if (begin) {
-			if (DEBUG_UPDATE_SEQUENCE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-				System.out.println("MODEL SEQUENCE BEGINS"); //$NON-NLS-1$
-			}
-			notifyUpdate(UPDATE_SEQUENCE_BEGINS, null);
-		}
-		if (DEBUG_UPDATE_SEQUENCE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-			System.out.println("\tBEGIN - " + update); //$NON-NLS-1$
-		}
-		notifyUpdate(UPDATE_BEGINS, update);
-	}
-	
-	/**
-	 * Notification an update request has completed
-	 * 
-	 * @param update
-	 */
-	void updateComplete(ViewerUpdateMonitor update) {
-		boolean end = false;
-		synchronized (fRequestsInProgress) {
-			List requests = (List) fRequestsInProgress.get(update.getSchedulingPath());
-			if (requests != null) {
-				requests.remove(update);
-				trigger(update);
-				if (requests.isEmpty()) {
-					fRequestsInProgress.remove(update.getSchedulingPath());
-				}
-			}
-			end = fRequestsInProgress.isEmpty();
-		}
-		notifyUpdate(UPDATE_COMPLETE, update);
-		if (DEBUG_UPDATE_SEQUENCE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-			System.out.println("\tEND - " + update); //$NON-NLS-1$
-		}
-		if (end) {
-			if (DEBUG_UPDATE_SEQUENCE && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-				System.out.println("MODEL SEQUENCE ENDS"); //$NON-NLS-1$
-			}
-			notifyUpdate(UPDATE_SEQUENCE_COMPLETE, null);
-		}
-	}
-	
-	protected void notifyUpdate(final int type, final IViewerUpdate update) {
-		if (!fUpdateListeners.isEmpty()) {
-			Object[] listeners = fUpdateListeners.getListeners();
-			for (int i = 0; i < listeners.length; i++) {
-				final IViewerUpdateListener listener = (IViewerUpdateListener) listeners[i];
-				SafeRunner.run(new ISafeRunnable() {
-					public void run() throws Exception {
-						switch (type) {
-							case UPDATE_SEQUENCE_BEGINS:
-								listener.viewerUpdatesBegin();
-								break;
-							case UPDATE_SEQUENCE_COMPLETE:
-								listener.viewerUpdatesComplete();
-								break;
-							case UPDATE_BEGINS:
-								listener.updateStarted(update);
-								break;
-							case UPDATE_COMPLETE:
-								listener.updateComplete(update);
-								break;
-						}
-					}
-					public void handleException(Throwable exception) {
-						DebugUIPlugin.log(exception);
-					}
-				});
-			}
-		}
-	}	
-	
-	protected void cancelSubtreeUpdates(TreePath path) {
-		synchronized (fRequestsInProgress) {
-			Iterator iterator = fRequestsInProgress.entrySet().iterator();
-			while (iterator.hasNext()) {
-				Entry entry = (Entry) iterator.next();
-				TreePath entryPath = (TreePath) entry.getKey();
-				if (entryPath.startsWith(path, null)) {
-					List requests = (List) entry.getValue();
-					Iterator reqIter = requests.iterator();
-					while (reqIter.hasNext()) {
-						((IRequest)reqIter.next()).cancel();
-					}
-				}
-			}
-			List purge = new ArrayList(); 
-			iterator = fWaitingRequests.keySet().iterator();
-			while (iterator.hasNext()) {
-				TreePath entryPath = (TreePath) iterator.next();
-				if (entryPath.startsWith(path, null)) {
-					purge.add(entryPath);
-				}
-			}
-			iterator = purge.iterator();
-			while (iterator.hasNext()) {
-				fWaitingRequests.remove(iterator.next());
-			}
-		}
-		for (Iterator itr = fCompareRequestsInProgress.keySet().iterator(); itr.hasNext(); ) {
-			CompareRequestKey key = (CompareRequestKey)itr.next();
-			if (key.fPath.startsWith(path, null)) {
-				ElementCompareRequest compareRequest = (ElementCompareRequest)fCompareRequestsInProgress.get(key);
-				compareRequest.cancel();
-				itr.remove();
-			}
-		}
-	}
-	
-	/**
-	 * Returns whether this given request should be run, or should wait for parent
-	 * update to complete.
-	 * 
-	 * @param update
-	 * @return whether to start the given request
-	 */
-	void schedule(ViewerUpdateMonitor update) {
-		synchronized (fRequestsInProgress) {
-			TreePath schedulingPath = update.getSchedulingPath();
-			List requests = (List) fWaitingRequests.get(schedulingPath);
-			if (requests == null) {
-				// no waiting requests
-				TreePath parentPath = schedulingPath;
-				while (fRequestsInProgress.get(parentPath) == null) {
-					parentPath = parentPath.getParentPath();
-					if (parentPath == null) {
-						// no running requests: start request
-						update.start();
-						return;
-					}
-				}
-				// request running on parent, add to waiting list
-				requests = new ArrayList();
-				requests.add(update);
-				fWaitingRequests.put(schedulingPath, requests);
-			} else {
-				// there are waiting requests: coalesce with existing request?
-				Iterator reqIter = requests.iterator();
-				while (reqIter.hasNext()) {
-					ViewerUpdateMonitor waiting = (ViewerUpdateMonitor) reqIter.next();
-					if (waiting.coalesce(update)) {
-						// coalesced with existing request, done
-						return;
-					}
-				}
-				// add to list of waiting requests
-				requests.add(update);
-				return;
-			}
-		}
-	}
-	
-	/**
-	 * Triggers waiting requests based on the given request that just completed.
-	 * 
-	 * TODO: should we cancel child updates if a request has been canceled?
-	 * 
-	 * @param request
-	 */
-	void trigger(ViewerUpdateMonitor request) {
-		if (fWaitingRequests.isEmpty()) {
-			return;
-		}
-		TreePath schedulingPath = request.getSchedulingPath();
-		List waiting = (List) fWaitingRequests.get(schedulingPath);
-		if (waiting == null) {
-			// no waiting, update the entry with the shortest path
-			int length = Integer.MAX_VALUE;
-			Iterator entries = fWaitingRequests.entrySet().iterator();
-			Entry candidate = null;
-			while (entries.hasNext()) {
-				Entry entry = (Entry) entries.next();
-				TreePath key = (TreePath) entry.getKey();
-				if (key.getSegmentCount() < length) {
-					candidate = entry;
-					length = key.getSegmentCount();
-				}
-			}
-			if (candidate != null) {
-				startHighestPriorityRequest((TreePath) candidate.getKey(), (List) candidate.getValue());
-			}
-		} else {
-			// start the highest priority request
-			startHighestPriorityRequest(schedulingPath, waiting);
-		}
-	}
-
-	/**
-	 * @param key
-	 * @param waiting
-	 */
-	private void startHighestPriorityRequest(TreePath key, List waiting) {
-		int priority = 4;
-		ViewerUpdateMonitor next = null;
-		Iterator requests = waiting.iterator();
-		while (requests.hasNext()) {
-			ViewerUpdateMonitor vu = (ViewerUpdateMonitor) requests.next();
-			if (vu.getPriority() < priority) {
-				next = vu;
-				priority = next.getPriority();
-			}
-		}
-		waiting.remove(next);
-		if (waiting.isEmpty()) {
-			fWaitingRequests.remove(key);
-		}
-		next.start();
-	}
-	
-	/**
-	 * Registers the given listener for model delta notification.
-	 * 
-	 * @param listener model delta listener
-	 */
-	public void addModelChangedListener(IModelChangedListener listener) {
-		fModelListeners.add(listener); 
-	}
-	
-	/**
-	 * Unregisters the given listener from model delta notification.
-	 * 
-	 * @param listener model delta listener
-	 */
-	public void removeModelChangedListener(IModelChangedListener listener) {
-		fModelListeners.remove(listener);
-	}
-	
-	/**
-	 * Returns the element corresponding to the given tree path.
-	 * 
-	 * @param path tree path
-	 * @return model element
-	 */
-	protected Object getElement(TreePath path) {
-		if (path.getSegmentCount() > 0) {
-			return path.getLastSegment();
-		}
-		return getViewer().getInput();
-	}
-	
-	/**
-	 * Reschedule any children updates in progress for the given parent
-	 * that have a start index greater than the given index. An element
-	 * has been removed at this index, invalidating updates in progress.
-	 * 
-	 * @param parentPath view tree path to parent element
-	 * @param modelIndex index at which an element was removed
-	 */
-	protected void rescheduleUpdates(TreePath parentPath, int modelIndex) {
-		synchronized (fRequestsInProgress) {
-			List requests = (List)fRequestsInProgress.get(parentPath);
-			List reCreate = null;
-			if (requests != null) {
-				Iterator iterator = requests.iterator();
-				while (iterator.hasNext()) {
-					IViewerUpdate update = (IViewerUpdate) iterator.next();
-					if (update instanceof IChildrenUpdate) {
-						IChildrenUpdate childrenUpdate = (IChildrenUpdate) update;
-						if (childrenUpdate.getOffset() > modelIndex) {
-							childrenUpdate.cancel();
-							if (reCreate == null) {
-								reCreate  = new ArrayList();
-							}
-							reCreate.add(childrenUpdate);
-							if (DEBUG_CONTENT_PROVIDER && getPresentationContext().getId().equals(DEBUG_PRESENTATION_ID)) {
-								System.out.println("canceled update in progress handling REMOVE: " + childrenUpdate); //$NON-NLS-1$
-							}
-						}
-					}
-				}
-			}
-			requests = (List)fWaitingRequests.get(parentPath);
-			if (requests != null) {
-				Iterator iterator = requests.iterator();
-				while (iterator.hasNext()) {
-					IViewerUpdate update = (IViewerUpdate) iterator.next();
-					if (update instanceof IChildrenUpdate) {
-						IChildrenUpdate childrenUpdate = (IChildrenUpdate) update;
-						if (childrenUpdate.getOffset() > modelIndex) {
-							((ChildrenUpdate)childrenUpdate).setOffset(childrenUpdate.getOffset() - 1);
-							if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-								System.out.println("modified waiting update handling REMOVE: " + childrenUpdate); //$NON-NLS-1$
-							}
-						}
-					}
-				}
-			}
-			// re-schedule canceled updates at new position.
-			// have to do this last else the requests would be waiting and
-			// get modified.
-			if (reCreate != null) {
-				Iterator iterator = reCreate.iterator();
-				while (iterator.hasNext()) {
-					IChildrenUpdate childrenUpdate = (IChildrenUpdate) iterator.next();
-					int start = childrenUpdate.getOffset() - 1;
-					int end = start + childrenUpdate.getLength();
-					for (int i = start; i < end; i++) {
-						((TreeModelContentProvider)this).doUpdateElement(parentPath, i);
-					}
-				}
-			}
-		}
-	}
+        }.schedule();
+    }
+
+    protected void notifyUpdate(final int type, final IViewerUpdate update) {
+        if (!fUpdateListeners.isEmpty()) {
+            Object[] listeners = fUpdateListeners.getListeners();
+            for (int i = 0; i < listeners.length; i++) {
+                final IViewerUpdateListener listener = (IViewerUpdateListener) listeners[i];
+                SafeRunner.run(new ISafeRunnable() {
+                    public void run() throws Exception {
+                        switch (type) {
+                        case UPDATE_SEQUENCE_BEGINS:
+                            listener.viewerUpdatesBegin();
+                            break;
+                        case UPDATE_SEQUENCE_COMPLETE:
+                            listener.viewerUpdatesComplete();
+                            break;
+                        case UPDATE_BEGINS:
+                            listener.updateStarted(update);
+                            break;
+                        case UPDATE_COMPLETE:
+                            listener.updateComplete(update);
+                            break;
+                        }
+                    }
+
+                    public void handleException(Throwable exception) {
+                        DebugUIPlugin.log(exception);
+                    }
+                });
+            }
+        }
+    }
+
+    public void addStateUpdateListener(IStateUpdateListener listener) {
+        fStateUpdateListeners.add(listener);
+    }
+
+    public void removeStateUpdateListener(IStateUpdateListener listener) {
+        fStateUpdateListeners.remove(listener);
+    }
+
+    protected void notifyStateUpdate(final Object input, final int type, final IViewerUpdate update) {
+        if (!fStateUpdateListeners.isEmpty()) {
+            Object[] listeners = fStateUpdateListeners.getListeners();
+            for (int i = 0; i < listeners.length; i++) {
+                final IStateUpdateListener listener = (IStateUpdateListener) listeners[i];
+                SafeRunner.run(new ISafeRunnable() {
+                    public void run() throws Exception {
+                        switch (type) {
+                        case STATE_SAVE_SEQUENCE_BEGINS:
+                            listener.stateSaveUpdatesBegin(input);
+                            break;
+                        case STATE_SAVE_SEQUENCE_COMPLETE:
+                            listener.stateSaveUpdatesComplete(input);
+                            break;
+                        case STATE_RESTORE_SEQUENCE_BEGINS:
+                            listener.stateRestoreUpdatesBegin(input);
+                            break;
+                        case STATE_RESTORE_SEQUENCE_COMPLETE:
+                            listener.stateRestoreUpdatesComplete(input);
+                            break;
+                        case UPDATE_BEGINS:
+                            listener.stateUpdateStarted(input, update);
+                            break;
+                        case UPDATE_COMPLETE:
+                            listener.stateUpdateComplete(input, update);
+                            break;
+                        }
+                    }
+
+                    public void handleException(Throwable exception) {
+                        DebugUIPlugin.log(exception);
+                    }
+                });
+            }
+        }
+    }
+
+    protected void cancelSubtreeUpdates(TreePath path) {
+        synchronized (fRequestsInProgress) {
+            Iterator iterator = fRequestsInProgress.entrySet().iterator();
+            while (iterator.hasNext()) {
+                Entry entry = (Entry) iterator.next();
+                TreePath entryPath = (TreePath) entry.getKey();
+                if (entryPath.startsWith(path, null)) {
+                    List requests = (List) entry.getValue();
+                    Iterator reqIter = requests.iterator();
+                    while (reqIter.hasNext()) {
+                        ((IRequest) reqIter.next()).cancel();
+                    }
+                }
+            }
+            List purge = new ArrayList();
+            iterator = fWaitingRequests.keySet().iterator();
+            while (iterator.hasNext()) {
+                TreePath entryPath = (TreePath) iterator.next();
+                if (entryPath.startsWith(path, null)) {
+                    purge.add(entryPath);
+                }
+            }
+            iterator = purge.iterator();
+            while (iterator.hasNext()) {
+                fWaitingRequests.remove(iterator.next());
+            }
+        }
+        for (Iterator itr = fCompareRequestsInProgress.keySet().iterator(); itr.hasNext();) {
+            CompareRequestKey key = (CompareRequestKey) itr.next();
+            if (key.fPath.startsWith(path, null)) {
+                ElementCompareRequest compareRequest = (ElementCompareRequest) fCompareRequestsInProgress.get(key);
+                compareRequest.cancel();
+                itr.remove();
+            }
+        }
+    }
+
+    /**
+     * Returns whether this given request should be run, or should wait for
+     * parent update to complete.
+     * 
+     * @param update
+     * @return whether to start the given request
+     */
+    void schedule(ViewerUpdateMonitor update) {
+        synchronized (fRequestsInProgress) {
+            TreePath schedulingPath = update.getSchedulingPath();
+            List requests = (List) fWaitingRequests.get(schedulingPath);
+            if (requests == null) {
+                // no waiting requests
+                TreePath parentPath = schedulingPath;
+                while (fRequestsInProgress.get(parentPath) == null) {
+                    parentPath = parentPath.getParentPath();
+                    if (parentPath == null) {
+                        // no running requests: start request
+                        update.start();
+                        return;
+                    }
+                }
+                // request running on parent, add to waiting list
+                requests = new ArrayList();
+                requests.add(update);
+                fWaitingRequests.put(schedulingPath, requests);
+            } else {
+                // there are waiting requests: coalesce with existing request?
+                Iterator reqIter = requests.iterator();
+                while (reqIter.hasNext()) {
+                    ViewerUpdateMonitor waiting = (ViewerUpdateMonitor) reqIter.next();
+                    if (waiting.coalesce(update)) {
+                        // coalesced with existing request, done
+                        return;
+                    }
+                }
+                // add to list of waiting requests
+                requests.add(update);
+                return;
+            }
+        }
+    }
+
+    protected boolean getElementChildrenRealized(TreePath path) {
+        synchronized (fRequestsInProgress) {
+            List requests = (List) fWaitingRequests.get(path);
+            if (requests != null) {
+                for (int i = 0; i < requests.size(); i++) {
+                    if (requests.get(i) instanceof ChildrenUpdate) {
+                        return false;
+                    }
+                }
+            }
+            requests = (List) fRequestsInProgress.get(path);
+            if (requests != null) {
+                int numChildrenUpdateRequests = 0;
+                for (int i = 0; i < requests.size(); i++) {
+                    if (requests.get(i) instanceof ChildrenUpdate) {
+                        if (++numChildrenUpdateRequests > 1) {
+                            return false;
+                        }
+                    }
+                }
+            }
+        }
+
+        return getViewer().getElementChildrenRealized(path);
+    }
+
+    /**
+     * Triggers waiting requests based on the given request that just completed.
+     * 
+     * TODO: should we cancel child updates if a request has been canceled?
+     * 
+     * @param request
+     */
+    void trigger(ViewerUpdateMonitor request) {
+        if (fWaitingRequests.isEmpty()) {
+            return;
+        }
+        TreePath schedulingPath = request.getSchedulingPath();
+        List waiting = (List) fWaitingRequests.get(schedulingPath);
+        if (waiting == null) {
+            // no waiting, update the entry with the shortest path
+            int length = Integer.MAX_VALUE;
+            Iterator entries = fWaitingRequests.entrySet().iterator();
+            Entry candidate = null;
+            while (entries.hasNext()) {
+                Entry entry = (Entry) entries.next();
+                TreePath key = (TreePath) entry.getKey();
+                if (key.getSegmentCount() < length) {
+                    candidate = entry;
+                    length = key.getSegmentCount();
+                }
+            }
+            if (candidate != null) {
+                startHighestPriorityRequest((TreePath) candidate.getKey(), (List) candidate.getValue());
+            }
+        } else {
+            // start the highest priority request
+            startHighestPriorityRequest(schedulingPath, waiting);
+        }
+    }
+
+    /**
+     * @param key
+     * @param waiting
+     */
+    private void startHighestPriorityRequest(TreePath key, List waiting) {
+        int priority = 4;
+        ViewerUpdateMonitor next = null;
+        Iterator requests = waiting.iterator();
+        while (requests.hasNext()) {
+            ViewerUpdateMonitor vu = (ViewerUpdateMonitor) requests.next();
+            if (vu.getPriority() < priority) {
+                next = vu;
+                priority = next.getPriority();
+            }
+        }
+        if (next != null) {
+	        waiting.remove(next);
+	        if (waiting.isEmpty()) {
+	            fWaitingRequests.remove(key);
+	        }
+	        next.start();
+        }
+    }
+
+    /**
+     * Registers the given listener for model delta notification.
+     * 
+     * @param listener
+     *            model delta listener
+     */
+    public void addModelChangedListener(IModelChangedListener listener) {
+        fModelListeners.add(listener);
+    }
+
+    /**
+     * Unregisters the given listener from model delta notification.
+     * 
+     * @param listener
+     *            model delta listener
+     */
+    public void removeModelChangedListener(IModelChangedListener listener) {
+        fModelListeners.remove(listener);
+    }
+
+    /**
+     * Returns the element corresponding to the given tree path.
+     * 
+     * @param path
+     *            tree path
+     * @return model element
+     */
+    protected Object getElement(TreePath path) {
+        if (path.getSegmentCount() > 0) {
+            return path.getLastSegment();
+        }
+        return getViewer().getInput();
+    }
+
+    /**
+     * Reschedule any children updates in progress for the given parent that
+     * have a start index greater than the given index. An element has been
+     * removed at this index, invalidating updates in progress.
+     * 
+     * @param parentPath
+     *            view tree path to parent element
+     * @param modelIndex
+     *            index at which an element was removed
+     */
+    protected void rescheduleUpdates(TreePath parentPath, int modelIndex) {
+        synchronized (fRequestsInProgress) {
+            List requests = (List) fRequestsInProgress.get(parentPath);
+            List reCreate = null;
+            if (requests != null) {
+                Iterator iterator = requests.iterator();
+                while (iterator.hasNext()) {
+                    IViewerUpdate update = (IViewerUpdate) iterator.next();
+                    if (update instanceof IChildrenUpdate) {
+                        IChildrenUpdate childrenUpdate = (IChildrenUpdate) update;
+                        if (childrenUpdate.getOffset() > modelIndex) {
+                            childrenUpdate.cancel();
+                            if (reCreate == null) {
+                                reCreate = new ArrayList();
+                            }
+                            reCreate.add(childrenUpdate);
+                            if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                                System.out.println("canceled update in progress handling REMOVE: " + childrenUpdate); //$NON-NLS-1$
+                            }
+                        }
+                    }
+                }
+            }
+            requests = (List) fWaitingRequests.get(parentPath);
+            if (requests != null) {
+                Iterator iterator = requests.iterator();
+                while (iterator.hasNext()) {
+                    IViewerUpdate update = (IViewerUpdate) iterator.next();
+                    if (update instanceof IChildrenUpdate) {
+                        IChildrenUpdate childrenUpdate = (IChildrenUpdate) update;
+                        if (childrenUpdate.getOffset() > modelIndex) {
+                            ((ChildrenUpdate) childrenUpdate).setOffset(childrenUpdate.getOffset() - 1);
+                            if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                                System.out.println("modified waiting update handling REMOVE: " + childrenUpdate); //$NON-NLS-1$
+                            }
+                        }
+                    }
+                }
+            }
+            // re-schedule canceled updates at new position.
+            // have to do this last else the requests would be waiting and
+            // get modified.
+            if (reCreate != null) {
+                Iterator iterator = reCreate.iterator();
+                while (iterator.hasNext()) {
+                    IChildrenUpdate childrenUpdate = (IChildrenUpdate) iterator.next();
+                    int start = childrenUpdate.getOffset() - 1;
+                    int end = start + childrenUpdate.getLength();
+                    for (int i = start; i < end; i++) {
+                        ((TreeModelContentProvider) this).doUpdateElement(parentPath, i);
+                    }
+                }
+            }
+        }
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
index 0bd532d..486d89f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/SubTreeModelViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Wind River Systems and others.
+ * Copyright (c) 2009, 2010 Wind River Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,14 @@
  * 
  * Contributors:
  *     Wind River Systems - initial API and implementation
+ *     IBM Corporation - ongoing bug fixes and enhancements
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.model;
 
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IStateUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
@@ -197,6 +199,18 @@ public class SubTreeModelViewer extends TreeModelViewer {
             return -1;
         }
 
+        public boolean getHasChildren(Object elementOrTreePath) {
+            if (elementOrTreePath instanceof TreePath) {
+                TreePath path = (TreePath)elementOrTreePath;
+                if (path.startsWith(fRootPath, null)) {
+                    return SubTreeModelViewer.this.getHasChildren(createSubPath(path));
+                }
+            } else {
+                return SubTreeModelViewer.this.getHasChildren(elementOrTreePath);
+            }
+            return false;
+        }
+
         public Object getChildElement(TreePath path, int index) {
             if (path.startsWith(fRootPath, null)) {
                 return SubTreeModelViewer.this.getChildElement(createSubPath(path), index);
@@ -214,6 +228,13 @@ public class SubTreeModelViewer extends TreeModelViewer {
             }        
             return -1;
         }
+
+        public boolean getElementChildrenRealized(TreePath parentPath) {
+            if (parentPath.startsWith(fRootPath, null)) {
+                return SubTreeModelViewer.this.getElementChildrenRealized(createSubPath(parentPath));
+            }        
+            return true;
+        }
         
         public void setElementData(TreePath path, int numColumns, String[] labels, ImageDescriptor[] images, FontData[] fontDatas, RGB[] foregrounds, RGB[] backgrounds) {
             if (path.startsWith(fRootPath, null)) {
@@ -257,6 +278,10 @@ public class SubTreeModelViewer extends TreeModelViewer {
             SubTreeModelViewer.this.addModelChangedListener(listener);
         }
 
+        public void addStateUpdateListener(IStateUpdateListener listener) {
+            SubTreeModelViewer.this.addStateUpdateListener(listener);
+        }
+
         public void addViewerUpdateListener(IViewerUpdateListener listener) {
             SubTreeModelViewer.this.addViewerUpdateListener(listener);
         }
@@ -285,12 +310,16 @@ public class SubTreeModelViewer extends TreeModelViewer {
             SubTreeModelViewer.this.removeModelChangedListener(listener);
         }
 
+        public void removeStateUpdateListener(IStateUpdateListener listener) {
+            SubTreeModelViewer.this.removeStateUpdateListener(listener);
+        }
+
         public void removeViewerUpdateListener(IViewerUpdateListener listener) {
             SubTreeModelViewer.this.removeViewerUpdateListener(listener);
         }
 
-        public void saveElementState(TreePath path, ModelDelta delta) {
-            SubTreeModelViewer.this.saveElementState(path, delta);
+        public boolean saveElementState(TreePath path, ModelDelta delta, int deltaFlags) {
+            return SubTreeModelViewer.this.saveElementState(path, delta, deltaFlags);
         }
 
         public void setAutoExpandLevel(int level) {
@@ -300,6 +329,10 @@ public class SubTreeModelViewer extends TreeModelViewer {
         public void setSelection(ISelection selection, boolean reveal, boolean force) {
             SubTreeModelViewer.this.setSelection(selection, reveal, force);
         }
+        
+        public boolean trySelection(ISelection selection, boolean reveal, boolean force) {
+        	return SubTreeModelViewer.this.trySelection(selection, reveal, force);
+        }
 
         public void updateViewer(IModelDelta delta) {
             SubTreeModelViewer.this.updateViewer(delta);
@@ -320,6 +353,10 @@ public class SubTreeModelViewer extends TreeModelViewer {
         public void update(Object element) {
             SubTreeModelViewer.this.update(element);
         }
+        
+        public void clearSelectionQuiet() {
+        	SubTreeModelViewer.this.clearSelectionQuiet();
+        }
     }
 
     
@@ -359,12 +396,16 @@ public class SubTreeModelViewer extends TreeModelViewer {
             fBaseProvider.addModelChangedListener(listener);
         }
 
+        public void addStateUpdateListener(IStateUpdateListener listener) {
+            fBaseProvider.addStateUpdateListener(listener);
+        }
+
         public void addViewerUpdateListener(IViewerUpdateListener listener) {
             fBaseProvider.addViewerUpdateListener(listener);
         }
 
-        public boolean isSuppressModelControlDeltas() {
-            return fBaseProvider.isSuppressModelControlDeltas();
+        public int getModelDeltaMask() {
+            return fBaseProvider.getModelDeltaMask();
         }
 
         public int modelToViewChildCount(TreePath parentPath, int count) {
@@ -379,12 +420,16 @@ public class SubTreeModelViewer extends TreeModelViewer {
             fBaseProvider.removeModelChangedListener(listener);
         }
 
+        public void removeStateUpdateListener(IStateUpdateListener listener) {
+            fBaseProvider.removeStateUpdateListener(listener);
+        }
+
         public void removeViewerUpdateListener(IViewerUpdateListener listener) {
             fBaseProvider.removeViewerUpdateListener(listener);
         }
 
-        public void setSuppressModelControlDeltas(boolean suppress) {
-            fBaseProvider.setSuppressModelControlDeltas(suppress);
+        public void setModelDeltaMask(int mask) {
+            fBaseProvider.setModelDeltaMask(mask);
         }
 
         public boolean shouldFilter(Object parentElementOrTreePath, Object element) {
@@ -401,8 +446,8 @@ public class SubTreeModelViewer extends TreeModelViewer {
             fBaseProvider.unmapPath(createFullPath(path));
         }
 
-        public void updateModel(IModelDelta delta) {
-            fBaseProvider.updateModel(delta);
+        public void updateModel(IModelDelta delta, int mask) {
+            fBaseProvider.updateModel(delta, mask);
         }
 
         public TreePath[] getParents(Object element) {
@@ -410,6 +455,10 @@ public class SubTreeModelViewer extends TreeModelViewer {
             return null;
         }
 
+        public void cancelRestore(TreePath path, int flags) {
+            fBaseProvider.cancelRestore(createFullPath(path), flags);
+        }
+        
         public void dispose() {
             fBaseProvider.dispose();
         }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java
new file mode 100644
index 0000000..68a194a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TimeTriggeredProgressMonitorDialog.java
@@ -0,0 +1,224 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model;
+
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The TimeTriggeredProgressMonitorDialog is a progress monitor dialog that only
+ * opens if the runnable provided exceeds the specified long operation time.
+ * 
+ * @since 3.6 - Copied from org.eclipse.ui.internal.operations.TimeTriggeredProgressMonitorDialog
+ */
+public class TimeTriggeredProgressMonitorDialog extends ProgressMonitorDialog {
+
+	/**
+	 * The time considered to be the long operation time.
+	 */
+	private int longOperationTime;
+
+	/**
+	 * The time at which the dialog should be opened.
+	 */
+	private long triggerTime = -1;
+
+	/**
+	 * Whether or not we've already opened a dialog.
+	 */
+	private boolean dialogOpened = false;
+	
+	/**
+	 * Wrappered monitor so we can check ticks and open the dialog when
+	 * appropriate
+	 */
+	private IProgressMonitor wrapperedMonitor;
+
+	/**
+	 * Create a new instance of the receiver.
+	 * 
+	 * @param parent
+	 *            the parent of the dialog
+	 * @param longOperationTime
+	 *            the time (in milliseconds) considered to be a long enough
+	 *            execution time to warrant opening a dialog.
+	 */
+	public TimeTriggeredProgressMonitorDialog(Shell parent,
+			int longOperationTime) {
+		super(parent);
+		setOpenOnRun(false);
+		this.longOperationTime = longOperationTime;
+	}
+
+   /**
+	 * Create a monitor for the receiver that wrappers the superclasses monitor.
+	 * 
+	 */
+    public void createWrapperedMonitor() {
+        wrapperedMonitor = new IProgressMonitor() {
+
+            IProgressMonitor superMonitor = TimeTriggeredProgressMonitorDialog.super
+                    .getProgressMonitor();
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String,
+			 *      int)
+			 */
+            public void beginTask(String name, int totalWork) {
+                superMonitor.beginTask(name, totalWork);
+                checkTicking();
+            }
+
+            /**
+			 * Check if we have ticked in the last 800ms.
+			 */
+            private void checkTicking() {
+            	if (triggerTime < 0) {
+					triggerTime = System.currentTimeMillis() + longOperationTime;
+				}
+    			if (!dialogOpened && System.currentTimeMillis() > triggerTime) {
+    				open();
+    				dialogOpened = true;
+    			}
+            }
+
+
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#done()
+			 */
+            public void done() {
+                superMonitor.done();
+                checkTicking();
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
+			 */
+            public void internalWorked(double work) {
+                superMonitor.internalWorked(work);
+                checkTicking();
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
+			 */
+            public boolean isCanceled() {
+                return superMonitor.isCanceled();
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
+			 */
+            public void setCanceled(boolean value) {
+                superMonitor.setCanceled(value);
+
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String)
+			 */
+            public void setTaskName(String name) {
+                superMonitor.setTaskName(name);
+                checkTicking();
+
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
+			 */
+            public void subTask(String name) {
+                superMonitor.subTask(name);
+                checkTicking();
+            }
+
+            /*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
+			 */
+            public void worked(int work) {
+                superMonitor.worked(work);
+                checkTicking();
+
+            }
+        };
+    }
+
+    /*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.ProgressMonitorDialog#getProgressMonitor()
+	 */
+    public IProgressMonitor getProgressMonitor() {
+        if (wrapperedMonitor == null) {
+			createWrapperedMonitor();
+		}
+        return wrapperedMonitor;
+    }
+    
+   /*
+    * (non-Javadoc) 
+    * 
+    * @see org.eclipse.jface.operations.IRunnableContext#run(boolean, boolean, IRunnableWithProgress)
+    */
+    public void run(final boolean fork, final boolean cancelable,
+            final IRunnableWithProgress runnable) throws InvocationTargetException,
+            InterruptedException {
+    	final InvocationTargetException[] invokes = new InvocationTargetException[1];
+        final InterruptedException[] interrupt = new InterruptedException[1];
+        Runnable dialogWaitRunnable = new Runnable() {
+    		public void run() {
+    			try {
+    				TimeTriggeredProgressMonitorDialog.super.run(fork, cancelable, runnable);
+    			} catch (InvocationTargetException e) {
+    				invokes[0] = e;
+    			} catch (InterruptedException e) {
+    				interrupt[0]= e;
+    			}
+    		}
+        };
+        final Display display = PlatformUI.getWorkbench().getDisplay();
+        if (display == null) {
+			return;
+		}
+        //show a busy cursor until the dialog opens
+        BusyIndicator.showWhile(display, dialogWaitRunnable);
+        if (invokes[0] != null) {
+            throw invokes[0];
+        }
+        if (interrupt[0] != null) {
+            throw interrupt[0];
+        }
+     }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeCursor.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeCursor.java
index 7c61253..0aeb59a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeCursor.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeCursor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -296,6 +296,9 @@ public void addSelectionListener(SelectionListener listener) {
 	addListener(SWT.DefaultSelection, typedListener);
 }
 
+/**
+ * @param event  
+ */
 void dispose(Event event) {
 	tree.removeListener(SWT.FocusIn, treeListener);
 	tree.removeListener(SWT.MouseDown, treeListener);
@@ -467,6 +470,9 @@ void paint(Event event) {
 	}
 }
 
+/**
+ * @param event  
+ */
 void tableFocusIn(Event event) {
 	if (isDisposed())
 		return;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
index 0c550e8..86eaba6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeSelection;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.TreeSelection;
 
@@ -74,7 +76,11 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.ModelContentProvider#getPresentationContext()
 	 */
 	protected IPresentationContext getPresentationContext() {
-		return ((ITreeModelViewer)getViewer()).getPresentationContext();
+	    ITreeModelViewer viewer = getViewer();
+	    if (viewer != null) {
+	        return viewer.getPresentationContext();
+	    } 
+	    return null;
 	}
 	
 	/* (non-Javadoc)
@@ -94,7 +100,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		    }
 			if (shouldFilter(parentPath, element)) {
 				addFilteredIndex(parentPath, modelIndex, element);
-				if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+				if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 					System.out.println("[filtered] handleAdd(" + delta.getElement() + ") > modelIndex: " + modelIndex); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				// it was filtered so the child count does not change
@@ -102,19 +108,20 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 				if (isFiltered(parentPath, modelIndex)) {
 					clearFilteredChild(parentPath, modelIndex);
 				}
+                int viewIndex = modelToViewIndex(parentPath, modelIndex);
 				int viewCount = modelToViewChildCount(parentPath, count);
-				if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
-					System.out.println("handleAdd(" + delta.getElement() + ") viewIndex: " + viewCount + " modelIndex: " + modelIndex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+					System.out.println("handleAdd(" + delta.getElement() + ") viewIndex: " + viewIndex + " modelIndex: " + modelIndex + " viewCount: " + viewCount + " modelCount: " + count); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 				}
 				getViewer().setChildCount(parentPath, viewCount);
-				int viewIndex = modelToViewIndex(parentPath, modelIndex);
+				getViewer().autoExpand(parentPath);
 				getViewer().replace(parentPath, viewIndex, element);
 				TreePath childPath = parentPath.createChildPath(element);
 				updateHasChildren(childPath);
-				doRestore(childPath, modelIndex, false, false);
+				restorePendingStateOnUpdate(childPath, modelIndex, false, false, false);
 			}	        
 		} else {
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("handleAdd(" + delta.getElement() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		    doUpdateChildCount(getViewerTreePath(delta.getParentDelta()));
@@ -133,6 +140,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		}
 		TreePath treePath = getViewerTreePath(delta);
 		cancelSubtreeUpdates(treePath);
+		appendToPendingStateDelta(treePath);
 		getViewer().refresh(getElement(treePath));
 	}
 	
@@ -142,6 +150,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	protected void handleCollapse(IModelDelta delta) {
 		TreePath elementPath = getViewerTreePath(delta);
 		getViewer().setExpandedState(elementPath, false);
+        cancelRestore(elementPath, IModelDelta.EXPAND);
 	}
 
 	/* (non-Javadoc)
@@ -160,7 +169,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	        TreePath elementPath = getViewerTreePath(delta);
 	        if (childCount > 0) {
 	            int viewCount = modelToViewChildCount(elementPath, childCount);
-	            if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+	            if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 	                System.out.println("[expand] setChildCount(" + delta.getElement() + ", (model) " + childCount + " (view) " + viewCount); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	            }
 	            getViewer().setChildCount(elementPath, viewCount);	            
@@ -180,7 +189,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 			}
 			int viewIndex = modelToViewIndex(parentPath, modelIndex);
 			if (viewIndex >= 0) {
-				if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+				if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 					System.out.println("[expand] replace(" + delta.getParentDelta().getElement() + ", (model) " + modelIndex + " (view) " + viewIndex + ", " + delta.getElement()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 				}
 				treeViewer.replace(parentPath, viewIndex, delta.getElement());
@@ -195,12 +204,13 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		}
 		if (childCount > 0) {
 			int viewCount = modelToViewChildCount(elementPath, childCount);
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("[expand] setChildCount(" + delta.getElement() + ", (model) " + childCount + " (view) " + viewCount); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 			treeViewer.setChildCount(elementPath, viewCount);
 	        if (!treeViewer.getExpandedState(elementPath)) {
 	            treeViewer.expandToLevel(elementPath, 1);
+	            cancelRestore(elementPath, IModelDelta.COLLAPSE);
 	        }
 		}
 	}
@@ -218,7 +228,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	protected int unfilterElement(TreePath parentPath, Object element, int modelIndex) {
 		// Element is filtered - if no longer filtered, insert the element
 		if (shouldFilter(parentPath, element)) {
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("[unfilter] abort unfilter element: " + element + ", (model) " + modelIndex);  //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			// still filtered, stop
@@ -228,7 +238,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		clearFilteredChild(parentPath, modelIndex);
 		int viewIndex = modelToViewIndex(parentPath, modelIndex);
 		if (viewIndex >= 0) {
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("[unfilter] insert(" + parentPath.getLastSegment() + ", (model) " + modelIndex + " (view) " + viewIndex + ", " + element); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			}
 			getViewer().insert(parentPath, element, viewIndex);
@@ -251,7 +261,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.viewers.ModelContentProvider#handleRemove(org.eclipse.debug.internal.ui.viewers.provisional.IModelDelta)
 	 */
 	protected void handleRemove(IModelDelta delta) {
-		if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("handleRemove(" + delta.getElement() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		IModelDelta parentDelta = delta.getParentDelta();
@@ -282,7 +292,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		}
 		if (modelIndex >= 0) {
 			// found the element
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println(" - (found) remove(" + parentPath.getLastSegment() + ", viewIndex: " + viewIndex + " modelIndex: " + modelIndex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 			rescheduleUpdates(parentPath, modelIndex);
@@ -293,7 +303,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		if (unmappedIndex >= 0) {
 			// did not find the element, but found an unmapped item.
 			// remove the unmapped item in it's place and update filters
-			if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println(" - (not found) remove(" + parentPath.getLastSegment() + ", viewIndex: " + viewIndex + " modelIndex: " + modelIndex + " unmapped index: " + unmappedIndex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			}
 			modelIndex = viewToModelIndex(parentPath, unmappedIndex);
@@ -311,7 +321,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		}
 		// failing that, refresh the parent to properly update for non-visible/unmapped children
 		// and update filtered indexes
-		if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println(" - (not found) remove/refresh(" + delta.getElement()); //$NON-NLS-1$
 		}
 		getViewer().remove(getViewerTreePath(delta));
@@ -333,6 +343,15 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	protected void handleSelect(IModelDelta delta) {
 		int modelIndex = delta.getIndex();
 		ITreeModelContentProviderTarget treeViewer = getViewer();
+		// check if selection is allowed
+		IStructuredSelection candidate = new TreeSelection(getViewerTreePath(delta));
+		if ((delta.getFlags() & IModelDelta.FORCE) == 0 && 
+		    !treeViewer.overrideSelection(treeViewer.getSelection(), candidate)) 
+		{
+			return;
+		}
+		// empty the selection before replacing elements to avoid materializing elements (@see bug 305739)
+		treeViewer.clearSelectionQuiet();
 		if (modelIndex >= 0) {
 			IModelDelta parentDelta = delta.getParentDelta();
 			TreePath parentPath = getViewerTreePath(parentDelta);
@@ -342,18 +361,21 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 				int modelCount = parentDelta.getChildCount();
 				if (modelCount > 0) {
 					int viewCount = modelToViewChildCount(parentPath, modelCount);
-					if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+					if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 						System.out.println("[select] setChildCount(" + parentDelta.getElement() + ", (model) " + parentDelta.getChildCount() + " (view) " + viewCount ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 					}
 					treeViewer.setChildCount(parentPath, viewCount);
 				}
-				if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+				if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 					System.out.println("[select] replace(" + parentDelta.getElement() + ", (model) " + modelIndex + " (view) " + viewIndex + ", " + delta.getElement()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 				}
 				treeViewer.replace(parentPath, viewIndex, delta.getElement());
 			}
 		}
-		treeViewer.setSelection(new TreeSelection(getViewerTreePath(delta)), false, (delta.getFlags() & IModelDelta.FORCE) != 0);
+		TreePath selectionPath = getViewerTreePath(delta);
+		if (treeViewer.trySelection(new TreeSelection(selectionPath), false, (delta.getFlags() | IModelDelta.FORCE) == 0)) {
+	        cancelRestore(selectionPath, IModelDelta.SELECT);
+		}
 	}
 
 	/* (non-Javadoc)
@@ -371,6 +393,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 		if (parentDelta != null) {
 			handleExpand(parentDelta);
 			reveal(delta);
+            cancelRestore(getViewerTreePath(delta), IModelDelta.REVEAL);
 		}
 	}
 	
@@ -385,7 +408,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 			}
 			int viewIndex = modelToViewIndex(parentPath, modelIndex);
 			if (viewIndex >= 0) {
-				if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+				if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 					System.out.println("[reveal] replace(" + delta.getParentDelta().getElement() + ", (model) " + modelIndex + " (view) " + viewIndex + ", " + delta.getElement()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 				}
 				treeViewer.replace(parentPath, viewIndex, delta.getElement());
@@ -412,7 +435,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 */
 	protected void buildViewerState(ModelDelta delta) {
         ITreeModelContentProviderTarget viewer = getViewer();
-        viewer.saveElementState(EMPTY_TREE_PATH, delta);
+        viewer.saveElementState(EMPTY_TREE_PATH, delta, IModelDelta.SELECT | IModelDelta.EXPAND);
 		
 		// Add memento for top item if it is mapped to an element.  The reveal memento
 		// is in its own path to avoid requesting unnecessary data when restoring it.
@@ -454,7 +477,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
         for (int i = 0; i < count; i++) {
             Object data = getViewer().getChildElement(TreePath.EMPTY, i);
             if (data != null) {
-                doRestore(new TreePath(new Object[]{data}), i, false, false);
+                restorePendingStateOnUpdate(new TreePath(new Object[]{data}), i, false, false, false);
             }
         }
         
@@ -504,7 +527,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 * @see org.eclipse.jface.viewers.ILazyTreePathContentProvider#updateChildCount(org.eclipse.jface.viewers.TreePath, int)
 	 */
 	public synchronized void updateChildCount(TreePath treePath, int currentChildCount) {
-		if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("updateChildCount(" + getElement(treePath) + ", " + currentChildCount + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 		refilterChildren(treePath);
@@ -518,7 +541,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 */
 	public synchronized void updateElement(TreePath parentPath, int viewIndex) {
 		int modelIndex = viewToModelIndex(parentPath, viewIndex);
-		if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("updateElement("+ getElement(parentPath) + ", " + viewIndex + ") > modelIndex = " + modelIndex); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 		doUpdateElement(parentPath, modelIndex);		
@@ -528,7 +551,7 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	 * @see org.eclipse.jface.viewers.ILazyTreePathContentProvider#updateHasChildren(org.eclipse.jface.viewers.TreePath)
 	 */
 	public synchronized void updateHasChildren(TreePath path) {
-		if (DEBUG_CONTENT_PROVIDER && (DEBUG_PRESENTATION_ID == null || DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+		if (DEBUG_CONTENT_PROVIDER && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("updateHasChildren(" + getElement(path)); //$NON-NLS-1$
 		}
 		doUpdateHasChildren(path);
@@ -537,18 +560,57 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
 	/**
 	 * @param delta
 	 */
-	void doRestore(ModelDelta delta, boolean knowsHasChildren, boolean knowsChildCount) {
+	void restorePendingStateNode(ModelDelta delta, boolean knowsHasChildren, boolean knowsChildCount, boolean checkChildrenRealized) {
 		TreePath treePath = getViewerTreePath(delta);
 		ITreeModelContentProviderTarget viewer = getViewer();
-		// Attempt to expand the node only if the children are known.
-		if (knowsHasChildren && (delta.getFlags() & IModelDelta.EXPAND) != 0) {
-			viewer.expandToLevel(treePath, 1);
-            delta.setFlags(delta.getFlags() & ~IModelDelta.EXPAND);
+
+        // Attempt to expand the node only if the children are known.
+		if (knowsHasChildren) {
+		    if ((delta.getFlags() & IModelDelta.EXPAND) != 0) {
+	            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+	                System.out.println("\tRESTORE EXPAND: " + treePath.getLastSegment()); //$NON-NLS-1$
+	            }
+    			viewer.expandToLevel(treePath, 1);
+                delta.setFlags(delta.getFlags() & ~IModelDelta.EXPAND);
+		    }
+            if ((delta.getFlags() & IModelDelta.COLLAPSE) != 0) {
+                if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                    System.out.println("\tRESTORE COLLAPSE: " + treePath.getLastSegment()); //$NON-NLS-1$
+                }
+                getViewer().setExpandedState(treePath, false);
+                delta.setFlags(delta.getFlags() & ~IModelDelta.COLLAPSE);
+            }
 		}
+		
 		if ((delta.getFlags() & IModelDelta.SELECT) != 0) {
-			viewer.setSelection(new TreeSelection(treePath), false, false);
             delta.setFlags(delta.getFlags() & ~IModelDelta.SELECT);
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("\tRESTORE SELECT: " + treePath.getLastSegment()); //$NON-NLS-1$
+            }
+            ITreeSelection currentSelection = (ITreeSelection)viewer.getSelection();
+            if (currentSelection == null || currentSelection.isEmpty()) {
+                viewer.setSelection(new TreeSelection(treePath), false, false);
+            } else {
+                TreePath[] currentPaths = currentSelection.getPaths();
+                boolean pathInSelection = false;
+                for (int i = 0; i < currentPaths.length; i++) {
+                    if (currentPaths[i].equals(treePath)) {
+                        pathInSelection = true;
+                        break;
+                    }
+                }
+                // Only set the selection if the element is not yet in 
+                // selection.  Otherwise the setSelection() call will 
+                // update selection listeners needlessly. 
+                if (!pathInSelection) {
+                    TreePath[] newPaths = new TreePath[currentPaths.length + 1];
+                    System.arraycopy(currentPaths, 0, newPaths, 0, currentPaths.length);
+                    newPaths[newPaths.length - 1] = treePath;
+                    viewer.setSelection(new TreeSelection(newPaths), false, false);
+                }
+            }
 		}
+		
         if ((delta.getFlags() & IModelDelta.REVEAL) != 0) {
             delta.setFlags(delta.getFlags() & ~IModelDelta.REVEAL);
             // Look for the reveal flag in the child deltas.  If 
@@ -568,6 +630,9 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
                 TreePath parentPath = treePath.getParentPath();
                 int index = viewer.findElementIndex(parentPath, treePath.getLastSegment());
                 if (index >= 0) { 
+                    if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                        System.out.println("\tRESTORE REVEAL: " + treePath.getLastSegment()); //$NON-NLS-1$
+                    }
                     viewer.reveal(parentPath, index);
                 }
             }
@@ -596,6 +661,17 @@ public class TreeModelContentProvider extends ModelContentProvider implements IT
             }
         }
         
-        checkIfRestoreComplete();
+        // Some children of this element were just updated.  If all its 
+        // children are now realized, clear out any elements that still 
+        // have flags, because they represent elements that were removed.
+        if ((checkChildrenRealized && getElementChildrenRealized(treePath)) ||
+             (knowsHasChildren && !viewer.getHasChildren(treePath)) ) 
+        {
+            if (DEBUG_STATE_SAVE_RESTORE && DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
+                System.out.println("\tRESTORE CONTENT: " + treePath.getLastSegment()); //$NON-NLS-1$
+            }
+            delta.setFlags(delta.getFlags() & ~IModelDelta.CONTENT);            
+        }
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
index 152efac..aac13da 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -220,6 +220,8 @@ public class TreeModelLabelProvider extends ColumnLabelProvider implements ITree
 	}	
 	
 	public synchronized boolean update(TreePath elementPath) {
+	    cancelPathUpdates(elementPath);
+	    
 		String[] visibleColumns = fViewer.getVisibleColumns();
 		Object element = elementPath.getLastSegment();
 		IElementLabelProvider presentation = ViewerAdapterService.getLabelProvider(element);
@@ -247,6 +249,21 @@ public class TreeModelLabelProvider extends ColumnLabelProvider implements ITree
 		}
 	}
 	
+	/**
+     * Cancel any outstanding updates that are running for this element. 
+     */
+    protected void cancelPathUpdates(TreePath elementPath) {
+       synchronized (fUpdatesInProgress) {
+            Iterator updatesInProgress = fUpdatesInProgress.iterator();
+            while (updatesInProgress.hasNext()) {
+                ILabelUpdate currentUpdate = (ILabelUpdate) updatesInProgress.next();
+                if (elementPath.equals(currentUpdate.getElementPath())) {
+                    currentUpdate.cancel();
+                }
+            }
+        }
+    }
+	
 	private void startRequests(UIJob updateJob) {
 	    // Avoid calling providers inside a synchronized section.  Instead 
 	    // copy the updates map into a new variable. 
@@ -332,12 +349,12 @@ public class TreeModelLabelProvider extends ColumnLabelProvider implements ITree
 			fUpdatesInProgress.add(update);
 		}
 		if (begin) {
-			if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+			if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("LABEL SEQUENCE BEGINS"); //$NON-NLS-1$
 			}
 			notifyUpdate(ModelContentProvider.UPDATE_SEQUENCE_BEGINS, null);
 		}
-		if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+        if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("\tBEGIN - " + update); //$NON-NLS-1$
 		}
 		notifyUpdate(ModelContentProvider.UPDATE_BEGINS, update);
@@ -354,12 +371,12 @@ public class TreeModelLabelProvider extends ColumnLabelProvider implements ITree
 			fUpdatesInProgress.remove(update);
 			end = fUpdatesInProgress.isEmpty();
 		}
-		if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+        if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 			System.out.println("\tEND - " + update); //$NON-NLS-1$
 		}
 		notifyUpdate(ModelContentProvider.UPDATE_COMPLETE, update);
 		if (end) {
-			if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && (ModelContentProvider.DEBUG_PRESENTATION_ID == null || ModelContentProvider.DEBUG_PRESENTATION_ID.equals(getPresentationContext().getId()))) {
+            if (ModelContentProvider.DEBUG_UPDATE_SEQUENCE && ModelContentProvider.DEBUG_TEST_PRESENTATION_ID(getPresentationContext())) {
 				System.out.println("LABEL SEQUENCE ENDS"); //$NON-NLS-1$
 			}
 			notifyUpdate(ModelContentProvider.UPDATE_SEQUENCE_COMPLETE, null);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
index 7f4a822..539e806 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerAdapterService.java
@@ -18,6 +18,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory2;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicy;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -72,7 +73,7 @@ public class ViewerAdapterService {
     }    
     
 	/**
-	 * Returns the model proxy factory for the given element or
+ 	 * Returns the model proxy factory for the given element or
 	 * <code>null</code> if none.
 	 * 
 	 * @param element element to retrieve adapter for
@@ -81,7 +82,18 @@ public class ViewerAdapterService {
 	public static IModelProxyFactory getModelProxyFactory(Object element) {
 		return (IModelProxyFactory)getAdapter(element, IModelProxyFactory.class);
 	}    
-    
+
+	/**
+     * Returns the model proxy factory v.2 for the given element or
+     * <code>null</code> if none.
+     * 
+     * @param element element to retrieve adapter for
+     * @return model proxy factory or <code>null</code>
+     */
+    public static IModelProxyFactory2 getModelProxyFactory2(Object element) {
+        return (IModelProxyFactory2)getAdapter(element, IModelProxyFactory2.class);
+    }    
+ 
 	/**
 	 * Returns the memento provider for the given element or
 	 * <code>null</code> if none.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
index 9a137d2..9ba15c5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ViewerUpdateMonitor.java
@@ -201,6 +201,13 @@ public abstract class ViewerUpdateMonitor extends Request implements IViewerUpda
 	 * @return whether it worked
 	 */
 	abstract boolean coalesce(ViewerUpdateMonitor update);
+
+	/**
+	 * Returns whether this update or any coalesced updates is for an 
+	 * element at the given path.
+     * @since 3.6
+	 */
+	abstract boolean containsUpdate(TreePath path);
 	
 	/**
 	 * Starts this request. Subclasses must override startRequest().
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index 625a26f..abccaae 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -117,7 +117,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
 				}
 			}
 			final VirtualModel model = viewer.buildVirtualModel(root, indexes);
-			ProgressMonitorDialog dialog = new ProgressMonitorDialog(fViewer.getControl().getShell());
+			ProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(fViewer.getControl().getShell(), 500);
 			final IProgressMonitor monitor = dialog.getProgressMonitor();
 			dialog.setCancelable(true);
 					 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
index 5ba5197..4cea30d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,7 +73,7 @@ public class VirtualFindAction extends Action implements IUpdate {
 
 	public void run() {
 		final VirtualModel model = fViewer.buildVirtualModel(null, null);
-		ProgressMonitorDialog dialog = new ProgressMonitorDialog(fViewer.getControl().getShell());
+		ProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(fViewer.getControl().getShell(), 500);
 		final IProgressMonitor monitor = dialog.getProgressMonitor();
 		dialog.setCancelable(true);
 				 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java
index 337ef71..e5e022e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java
@@ -15,6 +15,8 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.eclipse.core.runtime.Assert;
+
 /**
  * Virtual item, which is analogous to the SWT's tree item.
  * 
@@ -63,7 +65,7 @@ class VirtualItem {
         }
         
         public int compareTo(Object obj) {
-            return obj instanceof Index ? ((Index)obj).fIndexValue.compareTo(fIndexValue) : 0; 
+            return obj instanceof Index ? fIndexValue.compareTo(((Index)obj).fIndexValue) : 0; 
         }
         
         public String toString() {
@@ -226,9 +228,6 @@ class VirtualItem {
 
     void setData(Object data) {
         fData.put(ELEMENT_DATA_KEY, data);
-        if (data == null) {
-            fNeedsDataUpdate = true;
-        }
     }
     
     Object getData () {
@@ -236,10 +235,18 @@ class VirtualItem {
     }
     
     void setExpanded(boolean expanded) {
+        if (fExpanded == expanded) {
+            return;
+        }
         fExpanded = expanded;
+
+        if (fExpanded && getItemCount() == -1) {
+            setNeedsCountUpdate();
+        }
+
         
-        //Assert.assrt(!fExpanded || hasItems());
-        
+        Assert.isTrue(!fExpanded || hasItems());        
+
         // If collapsed, make sure that all the children are collapsed as well.
         if (!fExpanded) {
             for (Iterator itr = fItems.values().iterator(); itr.hasNext();) {
@@ -307,6 +314,22 @@ class VirtualItem {
         return item;
     }
     
+    boolean childrenNeedDataUpdate() {
+        if (getItemCount() == 0) {
+            return false;
+        }
+        if (fItems == null || fItems.size() != fItemCount) {
+            return true;
+        }
+        for (Iterator itr = fItems.values().iterator(); itr.hasNext();) {
+            VirtualItem child = (VirtualItem)itr.next();
+            if (child.needsDataUpdate()) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
     VirtualItem[] getItems() {
         return (VirtualItem[]) fItems.values().toArray(new VirtualItem[fItems.size()]);
     }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
new file mode 100644
index 0000000..91d90ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckUpdate.java
@@ -0,0 +1,36 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model.provisional;
+
+/**
+ * Label update which allows the label provider to set the checked element state.
+ * The label provider can use the presentation context to determine whether the 
+ * viewer is showing item check boxes. 
+ * 
+ * @since 3.6
+ */
+public interface ICheckUpdate extends ILabelUpdate {
+
+    /**
+     * Property of the presentation context which indicates that the viewer 
+     * has the check box style.
+     */
+    public static final String PROP_CHECK = "org.eclipse.debug.ui.check";  //$NON-NLS-1$
+    
+    /**
+     * Sets the check state of the tree node.
+     * 
+     * @param checked
+     * @param grayed
+     */
+    public void setChecked(boolean checked, boolean grayed);
+    
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
new file mode 100644
index 0000000..d1f7203
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ICheckboxModelProxy.java
@@ -0,0 +1,43 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 286310)
+ *     IBM Corporation - ongoing enhancements
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model.provisional;
+
+import org.eclipse.jface.viewers.TreePath;
+
+
+/**
+ * Optional extension to a model proxy for models that use a check box tree viewer. Provides
+ * notification for check state changes in the tree. 
+ * 
+ * @since 3.6
+ */
+public interface ICheckboxModelProxy extends IModelProxy {
+
+    /**
+     * Notifies the receiver that the given element has had its 
+     * checked state modified in the viewer.
+     * <p>
+     * This method is called in the UI thread. Clients that execute long running operations or
+     * communicate with a potentially unreliable or blocking model should run those operations
+     * asynchronously.
+     * </p>
+     * 
+     * @param context Presentation context in which the element was updated.
+     * @param viewerInput The root element of the viewer where the check
+     * selection took place.
+     * @param path Path of the element that had its checked state changed
+     * @param checked The new checked state of the element
+     * @return false if the check state should not change
+     */
+    public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked);
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
index 9b54bef..18fd862 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelDelta.java
@@ -116,6 +116,7 @@ public interface IModelDelta {
 	 * SELECT and REVEAL flags. 
 	 * 
 	 * @see IModelSelectionPolicy
+=	 * @since 3.5
 	 */
 	public static int FORCE = 1 << 26;
 	
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
index 98c60b1..b80f5d9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.jface.viewers.Viewer;
  * @see IModelDelta
  * @see IModelProxyFactory
  * @see IModelChangedListener
+ * @see ICheckboxModelProxy
  * @since 3.2
  */
 public interface IModelProxy {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
new file mode 100644
index 0000000..2bbd811
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IModelProxyFactory2.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Freescale Semiconductor - initial API and implementation � Bug 241336
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model.provisional;
+
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ * A model proxy factory creates model proxies for elements based on 
+ * specific presentation contexts. A model proxy factory is provided for
+ * a model element by registering a model proxy factory adapter for
+ * an element.
+ * <p>
+ * This interface is an alternative to the {@link IModelProxyFactory} 
+ * interface. Unlike its predecessor <code>IModelProxyFactory2</code> allows 
+ * the full path to the tree element to be specified when creating an 
+ * <code>IModelProxy<code> instance.  Using the full patch allows models to 
+ * provide proper model deltas even if the root element of this proxy is at 
+ * variable or unknown location in the viewer.
+ * </p> 
+ * <p>
+ * Clients may implement this interface.
+ * </p>
+ * @see IModelProxyFactory
+ * @see IModelProxy
+ * @see IModelDelta
+ * 
+ * @since 3.6
+ */
+public interface IModelProxyFactory2 {
+	/**
+	 * Creates and returns a model proxy for the given element in the specified
+	 * context or <code>null</code> if none.
+	 * 
+	 * @param input viewer input context
+	 * @param path to model element to create a model proxy for
+	 * @param context presentation context
+	 * @return model proxy or <code>null</code>
+	 */
+	public IModelProxy createTreeModelProxy(Object input, TreePath path, IPresentationContext context);
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
index 780d18a..12d0b1b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IPresentationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@
 package org.eclipse.debug.internal.ui.viewers.model.provisional;
 
 import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
 
 /**
  * Context in which an asynchronous request has been made.
@@ -22,13 +24,23 @@ import org.eclipse.jface.util.IPropertyChangeListener;
  * @since 3.2
  */
 public interface IPresentationContext {
-	
+
 	/**
 	 * Property name used for property change notification when the columns
 	 * in a presentation context change.
 	 */
 	public static final String PROPERTY_COLUMNS = "PROPERTY_COLUMNS"; //$NON-NLS-1$
-    
+
+	/**
+	 * Property indicating whether the presentation context is disposed.
+	 * It is set to <code>Boolean.TRUE</code> after the presentation context 
+	 * is disposed. This property may be <code>null</code>, which indicates 
+	 * that context is not yet disposed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PROPERTY_DISPOSED = "PROPERTY_DISPOSED"; //$NON-NLS-1$
+	
     /**
      * Returns identifiers of the visible columns in the order
      * labels should be provided, or <code>null</code> if columns
@@ -96,4 +108,24 @@ public interface IPresentationContext {
      */
     public String[] getProperties();
     
+    /**
+     * Returns the part that this presentation context is associated with.
+     * May return <code>null</code> if the presentation is not associated 
+     * with a part.
+     *  
+     * @return IWorkbenchPart or <code>null</code> 
+     * @since 3.6
+     */
+    public IWorkbenchPart getPart();
+    
+    /**
+     * Returns the window that this presentation context is associated with.
+     * May return <code>null</code> if the presentation is not associated 
+     * with a window.
+     *  
+     * @return IWorkbenchWindow or <code>null</code> 
+     * @since 3.6
+     */
+    public IWorkbenchWindow getWindow();
+    
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
new file mode 100644
index 0000000..efa321f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/IStateUpdateListener.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.viewers.model.provisional;
+
+
+/**
+ * Listener for viewer state updates.
+ * 
+ * @since 3.6
+ */
+public interface IStateUpdateListener {
+
+	/**
+	 * Notification that a sequence of state saving updates are starting.
+	 */
+	public void stateSaveUpdatesBegin(Object input);
+	
+	/**
+	 * Notification that viewer updates are complete. Corresponds to
+	 * a <code>viewerUpdatesBegin()</code> notification.
+	 */
+	public void stateSaveUpdatesComplete(Object input);
+
+	/**
+     * Notification that a sequence of viewer updates are starting.
+     */
+    public void stateRestoreUpdatesBegin(Object input);
+    
+    /**
+     * Notification that viewer updates are complete. Corresponds to
+     * a <code>viewerUpdatesBegin()</code> notification.
+     */
+    public void stateRestoreUpdatesComplete(Object input);
+
+	/**
+	 * Notification that a specific update has started within
+	 * a sequence of updates.
+	 * 
+	 * @param update update
+	 */
+	public void stateUpdateStarted(Object input, IViewerUpdate update);
+	
+	/**
+	 * Notification that a specific update has completed within a
+	 * sequence of updates.
+	 * 
+	 * @param update update
+	 */
+	public void stateUpdateComplete(Object input, IViewerUpdate update);
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
index 868cb23..455573e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
@@ -258,6 +258,9 @@ public class ModelDelta implements IModelDelta {
 			if ((flags & IModelDelta.CONTENT) > 0) {
 				buf.append("CONTENT | "); //$NON-NLS-1$
 			}
+            if ((flags & IModelDelta.COLLAPSE) > 0) {
+                buf.append("COLLAPSE | "); //$NON-NLS-1$
+            }
 			if ((flags & IModelDelta.EXPAND) > 0) {
 				buf.append("EXPAND | "); //$NON-NLS-1$
 			}
@@ -343,6 +346,16 @@ public class ModelDelta implements IModelDelta {
 	public void setFlags(int flags) {
 		fFlags = flags;
 	}
+
+    /**
+     * Sets this delta's index
+     * 
+     * @param index
+     * @since 3.6
+     */
+    public void setIndex(int index) {
+        fIndex = index;
+    }
 	
 	/**
      * Sets this delta's child count.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
index 22c7524..f8050d9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/PresentationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.ui.IElementFactory;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 
 /**
@@ -42,17 +44,57 @@ public class PresentationContext implements IPresentationContext {
     private static final String INTEGER = "INTEGER";  //$NON-NLS-1$
     private static final String PERSISTABLE = "PERSISTABLE";  //$NON-NLS-1$
     
-    private String fId;
-    private ListenerList fListeners = new ListenerList();
-    private Map fProperties = new HashMap();
-    
+    final private String fId;
+    final private ListenerList fListeners = new ListenerList();
+    final private Map fProperties = new HashMap();
+    final private IWorkbenchWindow fWindow;
+    final private IWorkbenchPart fPart;
+
     /**
      * Constructs a presentation context for the given id.
      * 
      * @param id presentation context id
      */
     public PresentationContext(String id) {
+        this (id, null, null);
+    }
+
+    /**
+     * Constructs a presentation context for the given id and window.
+     * 
+     * @param id presentation context id
+     * @param window presentation context window, may be <code>null</code>
+     */
+    public PresentationContext(String id, IWorkbenchWindow window) {
+        this (id, window, null);
+    }
+
+    /**
+     * Constructs a presentation context for the given id and part.
+     * The presentation context window is derived from the part.
+     * 
+     * @param id presentation context id
+     * @param part presentation context part, may be <code>null</code>
+     */
+    public PresentationContext(String id, IWorkbenchPart part) {
+        this (id, part == null ? null : part.getSite().getWorkbenchWindow(), part);
+    }
+
+    /**
+     * Constructs a presentation context for the given id and part.
+     * The presentation context id and window are derived from the part.
+     * 
+     * @param id presentation context id
+     * @param part presentation context part, can NOT be <code>null</code>
+     */
+    public PresentationContext(IWorkbenchPart part) {
+        this (part.getSite().getId(), part.getSite().getWorkbenchWindow(), part);
+    }
+
+    private PresentationContext(String id, IWorkbenchWindow window, IWorkbenchPart part) {
     	fId = id;
+    	fWindow = window;
+    	fPart = part;
     }
 
 	/* (non-Javadoc)
@@ -98,8 +140,9 @@ public class PresentationContext implements IPresentationContext {
 	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext#dispose()
 	 */
 	public void dispose() {
+        fProperties.clear();
+        setProperty(PROPERTY_DISPOSED, Boolean.TRUE);
 		fListeners.clear();
-		fProperties.clear();
 	}
 
 	/* (non-Javadoc)
@@ -136,13 +179,19 @@ public class PresentationContext implements IPresentationContext {
 	 * @see org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext#setProperty(java.lang.String, java.lang.Object)
 	 */
 	public void setProperty(String property, Object value) {
+	    Object oldValue = null;
+	    boolean propertySet = false;
 		synchronized (fProperties) {
-			Object oldValue = fProperties.get(property);
+			oldValue = fProperties.get(property);
 			if (!isEqual(oldValue, value)) {
+			    propertySet = true;
 				fProperties.put(property, value);
-				firePropertyChange(property, oldValue, value);
 			}
 		}
+		
+		if (propertySet) {
+		    firePropertyChange(property, oldValue, value);
+		}
 	}
 	
 	/**
@@ -239,6 +288,14 @@ public class PresentationContext implements IPresentationContext {
 			return (String[]) keys.toArray(new String[keys.size()]);
 		}
 	}
+
+    public IWorkbenchPart getPart() {
+        return fPart;
+    }
+
+    public IWorkbenchWindow getWindow() {
+        return fWindow;
+    }
 	
 
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
index 3de2a97..15d1995 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/TreeModelViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
index 4da98b8..e24ecc3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ViewerInputService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,18 @@ import org.eclipse.debug.internal.ui.viewers.model.ViewerInputUpdate;
  */
 public class ViewerInputService {
 	
+    /**
+     * An input object which will yield a null input element. 
+     * 
+     * @since 3.6
+     */
+    public final static Object NULL_INPUT = new IViewerInputProvider() {
+        public void update(IViewerInputUpdate update) {
+            update.setInputElement(null);
+            update.done();
+        }
+    };
+    
 	// previous update request, cancelled when a new request comes in
 	private IViewerInputUpdate fPendingUpdate = null;
 	
@@ -70,7 +82,7 @@ public class ViewerInputService {
 		}
 		if (provdier == null) {
 			fPendingUpdate.setInputElement(source);
-			fRequestor.viewerInputComplete(fPendingUpdate);
+            fPendingUpdate.done();
 		} else {
 			provdier.update(fPendingUpdate);
 		}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
index c43a11d..e3da944 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/provisional/AbstractModelProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,9 +76,6 @@ public abstract class AbstractModelProxy implements IModelProxy {
 	public void fireModelChanged(IModelDelta delta) {
 		final IModelDelta root = getRootDelta(delta);
 		Object[] listeners = getListeners();
-		if (DEBUG_DELTAS) {
-			DebugUIPlugin.debug("FIRE DELTA: " + delta.toString()); //$NON-NLS-1$
-		}
 		for (int i = 0; i < listeners.length; i++) {
 			final IModelChangedListener listener = (IModelChangedListener) listeners[i];
 			ISafeRunnable safeRunnable = new ISafeRunnable() {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java
new file mode 100644
index 0000000..2f51134
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointContainerProxy.java
@@ -0,0 +1,57 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.update;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ * Breakpoint container model proxy.
+ * 
+ * @since 3.6
+ */
+public class BreakpointContainerProxy extends AbstractModelProxy implements	ICheckboxModelProxy {
+	
+	/**
+	 * The breakpoint container
+	 */
+	private IBreakpointContainer fContainer;
+	
+	/**
+	 * Constructor.
+	 * 
+	 * @param container the breakpoint container.
+	 */
+	public BreakpointContainerProxy(IBreakpointContainer container) {
+		fContainer = container;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
+	 */
+	public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
+		boolean atLeastOne = false;
+		IBreakpoint[] breakpoints = fContainer.getBreakpoints();
+		for (int i = 0; i < breakpoints.length; ++i) {
+			try {
+				breakpoints[i].setEnabled(checked);
+				atLeastOne = true;
+			} catch (CoreException e) {}
+		}
+		return atLeastOne;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
new file mode 100644
index 0000000..570eaec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java
@@ -0,0 +1,182 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     Wind River Systems - ongoing enhancements and bug fixing
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.update;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointManagerContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.progress.WorkbenchJob;
+
+/**
+ * Breakpoint manager model proxy.
+ * 
+ * @since 3.6
+ */
+public class BreakpointManagerProxy extends AbstractModelProxy {
+	/**
+	 * The breakpoint manager content provider for this model proxy
+	 */
+	final private BreakpointManagerContentProvider fProvider;
+	
+	/**
+	 * The breakpoint manager input for this model proxy
+	 */
+	final private DefaultBreakpointsViewInput fInput;
+	
+	/**
+	 * Job to fire posted deltas.
+	 */
+    private Job fFireModelChangedJob;
+    
+    /**
+     * Object used for describing a posted delta.
+     */
+    private static class DeltaInfo {
+        final boolean fSelect;
+        final IModelDelta fDelta;
+
+        DeltaInfo(boolean selectDelta, IModelDelta delta) {
+            fSelect = selectDelta;
+            fDelta = delta;
+        }
+    }
+    
+    /**
+     * List of posted deltas ready to be fired.
+     */
+    private List/*<DeltaInfo>*/ fPendingDeltas = new LinkedList();
+    
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param input the breakpoint manager input
+	 * @param context the presentation context for this model proxy
+	 */
+	public BreakpointManagerProxy(Object input, IPresentationContext context) {
+		super();
+				
+		DefaultBreakpointsViewInput bpmInput = null;
+		BreakpointManagerContentProvider bpmProvider = null;
+		if (input instanceof DefaultBreakpointsViewInput) {
+			bpmInput = (DefaultBreakpointsViewInput) input;
+			
+			// cache the required data and pass to the provider when this model is installed
+			IElementContentProvider provider = ViewerAdapterService.getContentProvider(input);
+			if (provider instanceof BreakpointManagerContentProvider) {
+				bpmProvider = (BreakpointManagerContentProvider) provider;
+			}
+		}
+		fInput = bpmInput;
+		fProvider = bpmProvider;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
+	 */
+	public void installed(Viewer viewer) {
+		super.installed(viewer);
+		if (fProvider != null) {
+			fProvider.registerModelProxy(fInput, this);
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#dispose()
+	 */
+	public void dispose() {
+	    fProvider.unregisterModelProxy(fInput, this);
+	    synchronized(this) {
+	        if (fFireModelChangedJob != null) {
+                fFireModelChangedJob.cancel();
+                fFireModelChangedJob = null;
+	        }
+            fPendingDeltas.clear();
+	    }
+        
+		super.dispose();		
+	}
+	
+	/**
+	 * Posts a given delta to be fired by the proxy.  Posting a delta places it 
+	 * in a queue which is later emptied by a job that fires the deltas.
+	 * <p>
+	 * If the delta is used only to select a breakpiont and does not change the
+	 * viewer content, the caller should set the <code>select</code> parameter 
+	 * to <code>true</code>.  When a select delta is added to the delta queue, 
+	 * any previous select deltas are removed. 
+	 * 
+	 * @param delta Delta to be posted to the viewer.
+	 * @param select Flag indicating that the delta is only to change the
+	 * viewer selection.
+	 */
+	public synchronized void postModelChanged(IModelDelta delta, boolean select) {
+        // Check for proxy being disposed.
+        if (isDisposed()) {
+            return;
+        }
+        // Check for viewer being disposed.
+        Widget viewerControl = getViewer().getControl();
+        if (viewerControl == null) {
+            return;
+        }
+        
+        // If we are processing a select delta, remove the previous select delta.
+        if (select) {
+            for (Iterator itr = fPendingDeltas.iterator(); itr.hasNext(); ) {
+                if ( ((DeltaInfo)itr.next()).fSelect ) {
+                    itr.remove();
+                }
+            }
+        }
+        fPendingDeltas.add(new DeltaInfo(select, delta));
+        
+        if (fFireModelChangedJob == null) {
+	        fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { //$NON-NLS-1$
+	            {
+	                setSystem(true);
+	            }
+	            
+	            public IStatus runInUIThread(IProgressMonitor monitor) {
+                    Object[] deltas; 
+                    synchronized(BreakpointManagerProxy.this) {
+                        deltas = fPendingDeltas.toArray();
+                        fPendingDeltas.clear();
+                        fFireModelChangedJob = null;
+                    }
+                    for (int i = 0; i < deltas.length; i++) {
+                        fireModelChanged( ((DeltaInfo)deltas[i]).fDelta );
+                    }
+                    return Status.OK_STATUS;
+                }
+            };
+            fFireModelChangedJob.schedule();
+	    }
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java
new file mode 100644
index 0000000..b4308d6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointProxy.java
@@ -0,0 +1,53 @@
+/*****************************************************************
+ * Copyright (c) 2009 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.viewers.update;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
+import org.eclipse.jface.viewers.TreePath;
+
+/**
+ * Breakpoint model proxy.
+ * 
+ * @since 3.6
+ */
+public class BreakpointProxy extends AbstractModelProxy implements ICheckboxModelProxy {
+
+	/**
+	 * Breakpoint object
+	 */
+	protected IBreakpoint fBreakpoint;
+	
+	/**
+	 * Constructor.
+	 * 
+	 * @param breakpoint the breakpoint for this model proxy
+	 */
+	public BreakpointProxy(IBreakpoint breakpoint) {
+		fBreakpoint = breakpoint;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.viewers.model.provisional.ICheckboxModelProxy#setChecked(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object, org.eclipse.jface.viewers.TreePath, boolean)
+	 */
+	public boolean setChecked(IPresentationContext context, Object viewerInput, TreePath path, boolean checked) {
+		try {
+			fBreakpoint.setEnabled(checked);
+			return fBreakpoint.isEnabled() == checked;
+		} catch (CoreException e) {
+			return false;
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
index cd8d568..f8bee9a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DebugEventHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -147,6 +147,8 @@ public abstract class DebugEventHandler {
 	 * Fires a model delta to indicate that the launch manager should be refreshed.
 	 * Subclasses should override individual handle events to provide deltas that
 	 * better reflect the actual change in the model.
+	 * 
+	 * @param event the event that triggered the root refresh 
 	 */
 	protected void refreshRoot(DebugEvent event) {
 		ModelDelta delta = new ModelDelta(DebugPlugin.getDefault().getLaunchManager(), IModelDelta.CONTENT);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
index 7892f66..6d00a47 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/DefaultModelProxyFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,14 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.viewers.update;
 
 import org.eclipse.debug.core.IExpressionManager;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.core.model.IExpression;
 import org.eclipse.debug.core.model.IMemoryBlock;
@@ -20,6 +22,8 @@ import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.core.model.IStackFrame;
 import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
 import org.eclipse.debug.internal.ui.memory.provisional.AbstractAsyncTableRendering;
 import org.eclipse.debug.internal.ui.memory.provisional.MemoryViewPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
@@ -70,6 +74,15 @@ public class DefaultModelProxyFactory implements IModelProxyFactory {
 			if (element instanceof IMemoryBlockRetrieval)
 				return new MemoryRetrievalProxy((IMemoryBlockRetrieval)element);
 		}
+		if (IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id)) {
+			if (element instanceof DefaultBreakpointsViewInput) {
+				return new BreakpointManagerProxy(element, context);
+			} else if (element instanceof IBreakpoint) {
+				return new BreakpointProxy((IBreakpoint)element);
+			} else if (element instanceof IBreakpointContainer) {
+				return new BreakpointContainerProxy((IBreakpointContainer)element);
+			}
+		}
 		
 		if (context instanceof MemoryViewPresentationContext)
 		{
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
index d2ec1d9..8adc0d4 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/EventHandlerModelProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,6 +150,12 @@ public abstract class EventHandlerModelProxy extends AbstractModelProxy implemen
         }
     }
 
+    /**
+     * Returns whether this event handler should process the event.
+     * 
+     * @param event debug event
+     * @return whether this event handler should process the event
+     */
     protected boolean containsEvent(DebugEvent event) {
         return true;
     }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
index 686cd0d..8e5d779 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/ExpressionManagerModelProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 
 package org.eclipse.debug.internal.ui.viewers.update;
@@ -19,6 +20,8 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
 import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.Viewer;
 
 
@@ -27,7 +30,7 @@ import org.eclipse.jface.viewers.Viewer;
  * 
  * @see org.eclipse.debug.internal.core.ExpressionManager
  */
-public class ExpressionManagerModelProxy extends AbstractModelProxy implements IExpressionsListener2 {
+public class ExpressionManagerModelProxy extends AbstractModelProxy implements IExpressionsListener2, IPropertyChangeListener {
         
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#init(org.eclipse.debug.internal.ui.viewers.IPresentationContext)
@@ -35,6 +38,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 	public void init(IPresentationContext context) {
 		super.init(context);
 		getExpressionManager().addExpressionListener(this);
+		context.addPropertyChangeListener(this);
 	}
 	
 	/* (non-Javadoc)
@@ -55,6 +59,7 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 	 * @see org.eclipse.debug.internal.ui.viewers.update.EventHandlerModelProxy#dispose()
 	 */
 	public synchronized void dispose() {
+        getPresentationContext().removePropertyChangeListener(this);
 		super.dispose();
 		getExpressionManager().removeExpressionListener(this);
 	}
@@ -64,13 +69,14 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 	 */
 	public void expressionsMoved(IExpression[] expressions, int index){
 		ModelDelta delta = new ModelDelta(getExpressionManager(), IModelDelta.NO_CHANGE);
+		int count = getElementsCount();
 		for (int i = 0; i < expressions.length; i++) {
 			IExpression expression = expressions[i];
 			delta.addNode(expression, IModelDelta.REMOVED);
 		}
 		for (int i = 0; i < expressions.length; i++) {
 			IExpression expression = expressions[i];
-			delta.addNode(expression, index+i, IModelDelta.INSERTED);
+			delta.addNode(expression, index+i, IModelDelta.ADDED, count);
 		}
 		fireModelChanged(delta);
 	}
@@ -79,10 +85,11 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 	 * @see org.eclipse.debug.internal.core.IExpressionsListener2#expressionsInserted(org.eclipse.debug.core.model.IExpression[], int)
 	 */
 	public void expressionsInserted(IExpression[] expressions, int index){
+	    int count = getElementsCount();
 		ModelDelta delta = new ModelDelta(getExpressionManager(), IModelDelta.NO_CHANGE);
 		for (int i = 0; i < expressions.length; i++) {
 			IExpression expression = expressions[i];
-			delta.addNode(expression, index+i, IModelDelta.INSERTED | IModelDelta.INSTALL);
+			delta.addNode(expression, index+i, IModelDelta.ADDED | IModelDelta.INSTALL, count);
 		}
 		fireModelChanged(delta);
 	}
@@ -91,6 +98,14 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 	 * @see org.eclipse.debug.core.IExpressionsListener#expressionsAdded(org.eclipse.debug.core.model.IExpression[])
 	 */
 	public void expressionsAdded(IExpression[] expressions) {
+	    int index = getExpressionManager().getExpressions().length - expressions.length;
+	    int count = getElementsCount();
+        ModelDelta delta = new ModelDelta(getExpressionManager(), IModelDelta.NO_CHANGE);
+        for (int i = 0; i < expressions.length; i++) {
+            IExpression expression = expressions[i];
+            delta.addNode(expression, index+i, IModelDelta.ADDED | IModelDelta.INSTALL, count);
+        }
+        fireModelChanged(delta);
 		updateExpressions(expressions, IModelDelta.ADDED | IModelDelta.INSTALL);
 	}
 
@@ -117,4 +132,20 @@ public class ExpressionManagerModelProxy extends AbstractModelProxy implements I
 		fireModelChanged(delta);
     }
 
+    private int getElementsCount() {
+        // Account for the "Add new expression" element only if columns are 
+        // displayed.
+        return getExpressionManager().getExpressions().length +
+            (getPresentationContext().getColumns() != null ? 1 : 0);
+    }
+    
+    public void propertyChange(PropertyChangeEvent event) {
+        // If columns are turned on/off, refresh the view to account for the 
+        // "Add new expression" element.
+        if (IPresentationContext.PROPERTY_COLUMNS.equals(event.getProperty())) {
+            fireModelChanged(new ModelDelta(getExpressionManager(), IModelDelta.CONTENT));
+       }
+    }
+
+    
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
index 995a826..fa014b8 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,7 +42,9 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
 	public void installed(Viewer viewer) {
 		// expand existing launches
 		ILaunch[] launches = fLaunchManager.getLaunches();
-		launchesAdded(launches);
+		if (launches.length > 0) {
+			launchesAdded(launches);
+		}
 	}
 
 	/* (non-Javadoc)
@@ -73,7 +75,7 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
 	 * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch[])
 	 */
 	public void launchesAdded(ILaunch[] launches) {
-		fireDelta(launches, IModelDelta.ADDED | IModelDelta.INSTALL | IModelDelta.EXPAND);
+		fireDelta(launches, IModelDelta.ADDED | IModelDelta.INSTALL);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
index 5db6cbb..0d6908b 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -83,6 +83,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
 		for (int i = 0; i < launches.length; i++) {
 			if (launches[i] == fLaunch) {
 				fireDelta(IModelDelta.STATE | IModelDelta.CONTENT | IModelDelta.UNINSTALL);
+				break;
 			}
 		}		
 	}
@@ -91,6 +92,12 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
 	 * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch[])
 	 */
 	public void launchesRemoved(ILaunch[] launches) {
+		for (int i = 0; i < launches.length; i++) {
+			if (launches[i] == fLaunch) {
+				fireDelta(IModelDelta.UNINSTALL);
+				break;
+			}
+		}
 	}
 
 	/* (non-Javadoc)
@@ -107,6 +114,7 @@ public class LaunchProxy extends AbstractModelProxy implements ILaunchesListener
 			if (launches[i] == fLaunch) {
 				fireDelta(IModelDelta.STATE | IModelDelta.CONTENT);
 				installModelProxies();
+				break;
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugModelPresentationContext.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugModelPresentationContext.java
index 5b4f63d..6779bd9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugModelPresentationContext.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugModelPresentationContext.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,6 +12,7 @@ package org.eclipse.debug.internal.ui.views;
 
 import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
 import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.ui.IWorkbenchPart;
 
 /**
  * A presentation context that has a debug model presentation.
@@ -27,10 +28,11 @@ public class DebugModelPresentationContext extends PresentationContext {
 	 * specified model presentation.
 	 * 
 	 * @param id context id
+	 * @param part workbench view
 	 * @param presentation debug model presentation
 	 */
-	public DebugModelPresentationContext(String id, IDebugModelPresentation presentation) {
-		super(id);
+	public DebugModelPresentationContext(String id, IWorkbenchPart part, IDebugModelPresentation presentation) {
+		super(id, part);
 		fPresentation = presentation;
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java
index 5de6573..1771f15 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,9 +19,6 @@ public class DebugUIViewsMessages extends NLS {
 	public static String LaunchView_Exception_occurred_opening_editor_for_debugger__2;
 	public static String LaunchView_Terminate_and_Remove_1;
 	public static String LaunchView_Terminate_and_remove_selected__2;
-	public static String LaunchView_Exceptions_occurred_attempting_to_terminate_and_remove_3;
-	public static String LaunchView_Terminate_and_Remove_4;
-	public static String LaunchView_Terminate_and_remove_failed_5;
 
 	public static String SourceNotFoundEditorInput_Source_Not_Found_1;
 	public static String SourceNotFoundEditorInput_Source_not_found_for__0__2;
@@ -33,6 +30,7 @@ public class DebugUIViewsMessages extends NLS {
 	public static String BreakpointsView_0;
 	public static String BreakpointsView_10;
 	public static String BreakpointsView_11;
+	public static String BreakpointsView_12;
 	public static String BreakpointsView_1;
 	public static String BreakpointWorkingSetPage_0;
 	public static String BreakpointWorkingSetPage_1;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties
index dfbf22b..718f6aa 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/DebugUIViewsMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,9 +13,6 @@ LaunchView_Error_1=Error
 LaunchView_Exception_occurred_opening_editor_for_debugger__2=Exception occurred opening editor for debugger.
 LaunchView_Terminate_and_Remove_1=Terminate and Remove
 LaunchView_Terminate_and_remove_selected__2=Terminate and remove selected?
-LaunchView_Exceptions_occurred_attempting_to_terminate_and_remove_3=Exceptions occurred attempting to terminate and remove
-LaunchView_Terminate_and_Remove_4=Terminate and Remove
-LaunchView_Terminate_and_remove_failed_5=Terminate and remove failed
 
 SourceNotFoundEditorInput_Source_Not_Found_1=Source Not Found
 SourceNotFoundEditorInput_Source_not_found_for__0__2=Source not found for {0}
@@ -27,6 +24,7 @@ BreakpointsView_9=disable
 BreakpointsView_0=Enable Breakpoint
 BreakpointsView_10=Error {0} Breakpoint
 BreakpointsView_11=An exception occurred while attempting to {0} the breakpoint.
+BreakpointsView_12=Breakpoints View &Only
 BreakpointsView_1=Disable Breakpoint
 BreakpointWorkingSetPage_0=Breakpoint Working Set
 BreakpointWorkingSetPage_1=Enter a working set name and select breakpoints.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
index ce6e77d..8a62fa8 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,9 +16,9 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 import java.util.StringTokenizer;
-import java.util.Map.Entry;
 
 import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.commands.contexts.Context;
@@ -103,6 +103,12 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	
 	private IDebugContextService fDebugContextService;
 	
+	/**
+	 * Perspective that is currently being de-activated.  Used to determine
+	 * when to ignore active context changes.  
+	 */
+	private IPerspectiveDescriptor fActivePerspective;
+	
 	// base debug context
 	public static final String DEBUG_CONTEXT= "org.eclipse.debug.ui.debugging"; //$NON-NLS-1$
 	
@@ -219,9 +225,9 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
     	 * Activates the views in this context hierarchy. Views are activated top down, allowing
     	 * sub-contexts to override settings in a parent context.
     	 */
-    	public void activateChain(IWorkbenchPage page) {
+    	public void activateChain(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
     		initializeChain();
-    		doActivation(page, fAllViewBindingIds, fAllConetxtIds);
+    		doActivation(page, perspective, fAllViewBindingIds, fAllConetxtIds);
     	}	
     	
     	/**
@@ -232,18 +238,18 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
     	 * @param viewIds id's of views to activate
     	 * @param contextIds associated contexts that are activated
     	 */
-    	private void doActivation(IWorkbenchPage page, String[] viewIds, String[] contextIds) {
+    	private void doActivation(IWorkbenchPage page, IPerspectiveDescriptor perspective, String[] viewIds, String[] contextIds) {
     		// note activation of all the relevant contexts
     		for (int i = 0; i < contextIds.length; i++) {
 				addActivated(contextIds[i]);
 			}
     		// set the active context to be this
-    		setActive(page.getPerspective(), getId());
+    		setActive(perspective, getId());
     		// activate the view bindings
     		for (int i = 0; i < viewIds.length; i++) {
 				String viewId = viewIds[i];
 				ViewBinding binding = (ViewBinding) fAllViewIdToBindings.get(viewId);
-				binding.activated(page);
+				binding.activated(page, perspective);
 			}
     		// bring most relevant views to top
     		for (int i = 0; i < viewIds.length; i++) {
@@ -293,7 +299,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
     	 * 
     	 * @param page workbench page
     	 */
-    	public void deactivate(IWorkbenchPage page) {
+    	public void deactivate(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
 			removeActivated(getId());
 			if (isActiveContext(getId())) {
 				setActive(page.getPerspective(), null);
@@ -301,7 +307,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 			for (int i = 0; i < fViewBindingIds.length; i++) {
 				String viewId = fViewBindingIds[i];
 				ViewBinding binding = (ViewBinding) fAllViewIdToBindings.get(viewId);
-				binding.deactivated(page);
+				binding.deactivated(page, perspective);
 			}
     	}
     	
@@ -401,15 +407,15 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
          * Returns whether this view was opened by the user in the active perspective.
          * @return
          */
-        public boolean isUserOpened() {
-            return fUserOpened.contains(getActivePerspective().getId());
+        public boolean isUserOpened(IPerspectiveDescriptor perspective) {
+            return fUserOpened.contains(perspective.getId());
         }
         
         /**
          * Returns whether this view was closed by the user in the active perspective
          * @return
          */
-        public boolean isUserClosed() {
+        public boolean isUserClosed(IPerspectiveDescriptor perspective) {
             return fUserClosed.contains(getActivePerspective().getId());
         }
         
@@ -421,8 +427,8 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
          * 
          * @return
          */
-        public boolean isDefault() {
-            String id = getActivePerspective().getId();
+        public boolean isDefault(IPerspectiveDescriptor perspective) {
+            String id = perspective.getId();
             if (IDebugUIConstants.ID_DEBUG_PERSPECTIVE.equals(id)) {
                 return fgBaseDebugViewIds.contains(getViewId());
             }
@@ -461,8 +467,8 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
          * 
          * @param page
          */
-        public void activated(IWorkbenchPage page) {
-            if (!isUserClosed()) {
+        public void activated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
+            if (!isUserClosed(perspective)) {
                 if (isAutoOpen()) {
                     try {
                         fIgnoreChanges = true;
@@ -511,9 +517,9 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
          * 
          * @param page
          */
-        public void deactivated(IWorkbenchPage page) {
-            if (!isUserOpened()) {
-                if (isAutoClose() && !isDefault()) {
+        public void deactivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
+            if (!isUserOpened(perspective)) {
+                if (isAutoClose() && !isDefault(perspective)) {
                     IViewReference reference = page.findViewReference(getViewId());
                     if (reference != null) {
                         try {
@@ -598,6 +604,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 		getDebugContextService().addDebugContextListener(this);
 		DebugUIPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this);
 		fContextService.addContextManagerListener(this);
+	    IWorkbenchPage page = fWindow.getActivePage();
+	    if (page != null) {
+	        fActivePerspective = page.getPerspective();
+	    }
 	}
 	
 	public void dispose() {
@@ -605,6 +615,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 		getDebugContextService().removeDebugContextListener(this);
 		DebugUIPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this);
 		fContextService.removeContextManagerListener(this);
+        fActivePerspective = null;
 	}
 	
 	/**
@@ -715,11 +726,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	 * @return active perspective or <code>null</code>
 	 */
 	private IPerspectiveDescriptor getActivePerspective() {
-		IWorkbenchPage activePage = fWindow.getActivePage();
-		if (activePage != null) {
-			return activePage.getPerspective();
-		}
-		return null;
+        return fActivePerspective;
 	}
 	
 	/**
@@ -771,7 +778,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 				while (iterator.hasNext()) {
 					Object target = iterator.next();
 					ILaunch launch = DebugModelContextBindingManager.getLaunch(target);
-					if (launch != null) {
+					if (launch != null && !launch.isTerminated()) {
 						ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
 						if (launchConfiguration != null) {
 							try {
@@ -788,12 +795,12 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 										while (contexts.hasNext()) {
 											String contextId = (String)contexts.next();
 											if (!isActivated(contextId)) {
-												activateChain(contextId);
+												activateChain(contextId, getActivePerspective());
 											}
 											// ensure last context gets top priority
 											if (!contexts.hasNext()) {
 												if (!isActiveContext(contextId)) {
-													activateChain(contextId);
+													activateChain(contextId, getActivePerspective());
 												}
 											}
 										}
@@ -901,7 +908,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 			Iterator iterator = contexts.iterator();
 			while (iterator.hasNext()) {
 				String id = (String) iterator.next();
-				deactivate(id);
+				deactivate(id, perspective);
 			}
 		}
 	}
@@ -934,6 +941,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	 */
 	public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
 		if (page.getWorkbenchWindow().equals(fWindow)) {
+		    fActivePerspective = perspective;
 			ISelection activeContext = getDebugContextService().getActiveContext();
 			if (activeContext != null) {
 				contextActivated(activeContext);
@@ -952,12 +960,12 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	 * 
 	 * @param contextId
 	 */
-	private void activateChain(String contextId) {
+	private void activateChain(String contextId, IPerspectiveDescriptor perspective) {
 		IWorkbenchPage page = fWindow.getActivePage();
 		if (page != null) {
 			DebugContextViewBindings bindings= (DebugContextViewBindings) fContextIdsToBindings.get(contextId);
 			if (bindings != null) {
-				bindings.activateChain(page);
+				bindings.activateChain(page, perspective);
 			}
 		}
 	}
@@ -1001,7 +1009,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	 * @see org.eclipse.core.commands.contexts.IContextManagerListener#contextManagerChanged(org.eclipse.core.commands.contexts.ContextManagerEvent)
 	 */
 	public void contextManagerChanged(ContextManagerEvent event) {
-		if (event.isActiveContextsChanged()) {
+		if (event.isActiveContextsChanged() && getActivePerspective() != null) {
 			Set disabledContexts = getDisabledContexts(event);
 			if (!disabledContexts.isEmpty()) {
 				Iterator contexts = disabledContexts.iterator();
@@ -1009,20 +1017,22 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 					String contextId = (String)contexts.next();
 					if (isViewConetxt(contextId)) {
 						if (isActivated(contextId)) {
-							deactivate(contextId);
+							deactivate(contextId, getActivePerspective());
 						}
 					}
 				}
 			}
+			// Ensure that the views are activated for the new contexts if needed.
+			contextActivated(DebugUITools.getDebugContextManager().getContextService(fWindow).getActiveContext());
 		}
 	}
 	
-	private void deactivate(String contextId) {
+	private void deactivate(String contextId, IPerspectiveDescriptor perspective) {
 		IWorkbenchPage page = fWindow.getActivePage();
 		if (page != null) {
 			DebugContextViewBindings bindings = (DebugContextViewBindings) fContextIdsToBindings.get(contextId);
 			if (bindings != null) {
-				bindings.deactivate(page);
+				bindings.deactivate(page, perspective);
 			}
 		}		
 	}
@@ -1116,6 +1126,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
 	 */
 	public void perspectivePreDeactivate(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
 		if (page.getWorkbenchWindow().equals(fWindow)) {
+            fActivePerspective = null;
 			clean(perspective);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
index 6b852f3..81bd9bf 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,91 +7,511 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *******************************************************************************/
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
+ *****************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
+import java.util.Arrays;
+import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
+import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.ui.IDebugUIConstants;
 
 /**
- * A container of breakpoints, based on a category.
+ * This class contains the list of container or a list of breakpoint, elements are sorted according to rules
+ * in the comparator.
  */
-public class BreakpointContainer extends PlatformObject    {
-
+public class BreakpointContainer extends ElementContentProvider implements IAdaptable, IBreakpointContainer {
+	/**
+	 * Child breakpoints - inserting new element into this collection should use the insertBreakpoint method
+	 */
+    final private List fBreakpoints = new ArrayList();
+    
+    /**
+     * Child containers - inserting new element into this container should use the insertChildContainer method
+     */
+    final private List fChildContainers = new ArrayList();
+	
+    /**
+     * The category for this container
+     */
     private IAdaptable fCategory;
+    
+    /**
+     * The breakpoint organizer for this container
+     */
     private IBreakpointOrganizer fOrganizer;
-    private List fBreakpoints;
-    private Map fCategoriesToContainers;
+    
+    /**
+     * The nested breakpoint organizer
+     */
     private IBreakpointOrganizer[] fNesting;
     
     /**
-     * Constructs a container of breakpoints for the given category,
-     * created by the given organizer.
-     * 
-     * @param category breakpoint category
-     * @param organizer breakpoint organizer
-     * @param nesting nested organizers or <code>null</code> if none
-     */
-    public BreakpointContainer(IAdaptable category, IBreakpointOrganizer organizer, IBreakpointOrganizer[] nesting) {
-        fCategory = category;
-        fOrganizer = organizer;
-        fBreakpoints = new ArrayList();
-        fNesting = nesting;
-        fCategoriesToContainers = new HashMap();
-        // seed with all nested categories
-        if (nesting != null && nesting.length > 0) {
-            IAdaptable[] emptyCategories = nesting[0].getCategories();
-            if (emptyCategories != null) {
-                for (int i = 0; i < emptyCategories.length; i++) {
-                    IAdaptable empty = emptyCategories[i];
-                    BreakpointContainer container = (BreakpointContainer) fCategoriesToContainers.get(empty);
-                    if (container == null) {
-                        container = new BreakpointContainer(empty, nesting[0], null);
-                        fCategoriesToContainers.put(empty, container);
-                    }
-                }
-            }
-        }
+     * A flag to indicate this is the default container
+     */
+    private boolean fDefaultContainer;
+    
+    /**
+     * Parent container
+     */
+    private BreakpointContainer fParent;
+    
+    /**
+     * The comparator, will be use to compare the order for inserting new element into this container
+     */
+    private ElementComparator fComparator;
+    
+    /**
+     * Constructor, intended to be call when creating the root container.
+     * 
+     * @param organizers the breakpoint organizer for this container
+     * @param comparator the element comparator, can be <code>null</code>. If <code>null</code> than new element
+     * will be added to the end of the list.
+     */
+    public BreakpointContainer(IBreakpointOrganizer[] organizers, ElementComparator comparator) {
+    	fNesting = organizers;
+    	fComparator = comparator;
+    }
+    
+    /**
+     * Constructor, intended to be call within this class only.
+     * 
+     * @param parent the parent breakpoint container
+     * @param category the category for this container
+     * @param organizer the organizer for this container
+     * @param comparator the element comparator
+     * @param nesting the nested breakpoint organizer
+     */
+    private BreakpointContainer(BreakpointContainer parent, IAdaptable category, IBreakpointOrganizer organizer, 
+    		ElementComparator comparator, IBreakpointOrganizer[] nesting) {     	
+    	this(category, organizer, nesting);
+    	fParent = parent;
+    	fComparator = comparator;
+    }
+    
+    /**
+     * Constructor, intended to be call when reorganizing the content.
+     * 
+     * @param category the breakpoint category
+     * @param organizer the breakpoint organizer
+     * @param nesting the nested breakpoint organizer
+     */
+    BreakpointContainer(IAdaptable category, IBreakpointOrganizer organizer, IBreakpointOrganizer[] nesting) {    	
+    	fCategory = category;
+    	fOrganizer = organizer;
+    	fNesting = nesting;
+    }
+    
+    /**
+     * Initialize the default containers.
+     * 
+     * @param parentDelta the parent delta, addition child delta will be added to the parent
+     */
+    public void initDefaultContainers(ModelDelta parentDelta) {
+    	// seed with all nested categories
+    	if (fNesting != null && fNesting.length > 0) {
+    		IAdaptable[] emptyCategories = fNesting[0].getCategories();
+    		if (emptyCategories != null) {
+    			for (int i = 0; i < emptyCategories.length; i++) {
+    				IAdaptable empty = emptyCategories[i];
+    				BreakpointContainer container = findExistingContainer(fChildContainers, empty);
+    				if (container == null) {
+    					IBreakpointOrganizer[] siblings = new IBreakpointOrganizer[fNesting.length - 1];
+    					System.arraycopy(fNesting, 1, siblings, 0, siblings.length);
+    					container = new BreakpointContainer(this, empty, fNesting[0], fComparator, siblings);
+    					insertChildContainer(container);
+    					container.fDefaultContainer = true;
+
+    					int size = container.getChildren().length;
+    					parentDelta.addNode(container, fChildContainers.indexOf(container), IModelDelta.INSTALL|IModelDelta.ADDED|IModelDelta.EXPAND, size);
+
+    				}
+    			}
+    		}
+    	}
+    }    
+    
+    /**
+     * Insert the breakpoint to this container.
+     * 
+     * @param breakpoint the new breakpoint
+     * @return the index of the breakpoint in the cache, -1 if the breakpoint already exist
+     */
+    private int insertBreakpoint(IBreakpoint breakpoint) {
+    	if (fBreakpoints.contains(breakpoint))
+    		return -1;
+    	
+    	int index = fBreakpoints.size();
+    	for (; fComparator != null && index > 0; index--) {
+    		if (fComparator.compare(fBreakpoints.get(index-1), breakpoint) < 0)
+    			break;
+    	}
+    	
+    	if (index < 0)
+    		index = 0;
+    	fBreakpoints.add(index, breakpoint);
+    	    	
+    	return index;   	
+    }
+    
+    /**
+     * Insert the child container this container.
+     * 
+     * @param container the child container
+     * @return the index of the container in the cache, -1 if the child container already exist
+     */
+    private int insertChildContainer(BreakpointContainer container) {
+    	int index = fChildContainers.size();
+    	for (; fComparator != null && index > 0; index--) {
+    		if (fComparator.compare(fChildContainers.get(index-1), container) < 0)
+    			break;
+    	}
+    	
+    	if (index < 0)
+    		index = 0;
+    	fChildContainers.add(index, container);
+    	
+    	return index;
+    }
+    
+    
+    /**
+     * Returns the element comparator.
+     * 
+     * @return the element comparator
+     */
+    public ElementComparator getElementComparator() {
+    	return fComparator;
+    }    
+    
+    /**
+     * Returns the parent container, can be <code>null</code>.
+     * 
+     * @return the parent container
+     */
+    public BreakpointContainer getParent() {
+    	return fParent;
+    }
+    
+    /**
+     * Determine whether there is any nested container.
+     * 
+     * @return true if has nested container
+     */
+    private boolean hasNesting() {
+    	return fNesting != null && fNesting.length > 0;
+    }
+    
+    /**
+     * Get the categories for the breakpoint with the given organizer.
+     * 
+     * @param breakpoint the breakpoint
+     * @param organizer the organizer
+     * @return the categories
+     */
+    private static IAdaptable[] getCategories(IBreakpoint breakpoint, IBreakpointOrganizer organizer) {
+    	IAdaptable[] categories = organizer.getCategories(breakpoint);
+    	
+    	if (categories == null || categories.length == 0) 
+    		categories = OtherBreakpointCategory.getCategories(organizer);
+    	
+    	return categories;
+    }
+    
+    /**
+     * Find existing breakpoint container in the container array the given category.
+     * 
+     * @param containers the container array
+     * @param category the category
+     * @return the breakpoint container, can be <code>null</code>.
+     */
+    private static BreakpointContainer findExistingContainer(List containers, IAdaptable category) {
+    	BreakpointContainer container = null;
+    	
+    	Iterator containerIt = containers.iterator();
+    	while (containerIt.hasNext()) {
+    		container = (BreakpointContainer) containerIt.next();
+    		IAdaptable containerCategory = container.getCategory();
+    		
+    		if (category.equals(containerCategory))
+    			break;
+    		
+    		container = null;
+    	}
+    	
+    	return container;
     }
     
+    // TODO [pchuong]: can be remove if BreakpointsContentProvider no longer uses this class
+    void addBreakpoint(IBreakpoint breakpoint) {
+    	addBreakpoint(breakpoint, new ModelDelta(null, IModelDelta.NO_CHANGE));
+    }    
+    
     /**
-     * Adds a breakpoint to this container and its nested containers.
+     * Add a breakpoint to the container, additional delta will be added to the root delta. 
      * 
-     * @param breakpoint breakpoint to add  
+     * @param breakpoint the breakpoint to added
+     * @param rootDelta the root delta of this container
+     * @see removeBreakpoint
      */
-    public void addBreakpoint(IBreakpoint breakpoint) {
-        fBreakpoints.add(breakpoint);
-        if (fNesting != null && fNesting.length > 0) {
+    public void addBreakpoint(IBreakpoint breakpoint, ModelDelta rootDelta) {    	
+    	final int bpIndex = insertBreakpoint(breakpoint);
+    	if (bpIndex < 0) return;
+    	
+        if (hasNesting()) {
             IBreakpointOrganizer organizer = fNesting[0];
-            IAdaptable[] categories = organizer.getCategories(breakpoint);
-            if (categories== null || categories.length == 0) {
-            	categories = OtherBreakpointCategory.getCategories(organizer);
-            }
-            for (int i = 0; i < categories.length; i++) {
-                IAdaptable category = categories[i];
-                BreakpointContainer container = (BreakpointContainer) fCategoriesToContainers.get(category);
-                if (container == null) {
-                    IBreakpointOrganizer[] nesting = null;
-                    if (fNesting.length > 1) {
-                        nesting = new IBreakpointOrganizer[fNesting.length - 1];
-                        System.arraycopy(fNesting, 1, nesting, 0, nesting.length);
-                    }
-                    container = new BreakpointContainer(category, organizer, nesting);
-                    fCategoriesToContainers.put(category, container);
-                }
-                container.addBreakpoint(breakpoint);
+            
+            // get the breakpoint categories from the organizer
+            IAdaptable[] categories = getCategories(breakpoint, organizer);            
+            
+            for (int i = 0; i < categories.length; ++i) {
+            	ModelDelta childDelta = null;
+            	IAdaptable category = categories[i];
+            	BreakpointContainer container = findExistingContainer(fChildContainers, category);            	
+            	
+            	// create a new container if it doesn't exist
+            	if (container == null) {
+            		IBreakpointOrganizer[] nesting = null;
+            		if (fNesting.length > 1) {
+            			 nesting = new IBreakpointOrganizer[fNesting.length - 1];
+                         System.arraycopy(fNesting, 1, nesting, 0, nesting.length);
+            		}
+            		container = new BreakpointContainer(this, category, organizer, fComparator, nesting);
+            		insertChildContainer(container);
+            		childDelta = rootDelta.addNode(container, fChildContainers.indexOf(container), IModelDelta.INSERTED|IModelDelta.INSTALL, -1);
+            	
+            	} else {
+            		childDelta = rootDelta.addNode(container, fChildContainers.indexOf(container), IModelDelta.STATE, -1);
+            	}
+
+           		container.addBreakpoint(breakpoint, childDelta);
+           		childDelta.setChildCount(container.getChildren().length);
             }
+        
+        } else {
+        	// TODO [pchuong]: There seems to be some kind of problem when the INSERTED flag is used, 
+        	//				   there is a additional checkbox added to the end of the tree.
+        	//				   Also the tree seems to have a strange visual affect when using the INSERTED
+        	//				   flag for the child node instead of ADDED flag. Note: all breakpoint delta
+        	//				   is using the ADDED flag in this class.
+       		rootDelta.addNode(breakpoint, bpIndex, IModelDelta.ADDED|IModelDelta.INSTALL, 0);
+       		// rootDelta.addNode(breakpoint, bpIndex, IModelDelta.INSERTED|IModelDelta.INSTALL, 0);
+       		
+        	rootDelta.setFlags(rootDelta.getFlags() | IModelDelta.EXPAND);
         }
     }
     
     /**
+     * Remove a breakpoint from the container, additional delta will be added to the root delta.
+     * 
+     * @param breakpoint the breakpoint to remove
+     * @param delta the root delta of this container
+     * @see addBreakpoint
+     */
+    public boolean removeBreakpoint(IBreakpoint breakpoint, ModelDelta rootDelta) {
+    	boolean removed = fBreakpoints.remove(breakpoint);
+    	
+    	if (removed) {
+    		boolean addRemoveBpDelta = getContainers().length == 0;
+        	
+    		Iterator it = fChildContainers.iterator();
+    		while (it.hasNext()) {
+    			BreakpointContainer container = (BreakpointContainer) it.next();
+    			
+				// if the breakpoint contains in the container and it is the only breakpoint,
+				// than remove the container from the collection
+    			if (container.contains(breakpoint)) {
+    				ModelDelta childDelta = null;
+    				if ((!container.isDefaultContainer()) && (container.getBreakpoints().length <= 1)) {
+	    				it.remove();
+	    				childDelta = rootDelta.addNode(container, IModelDelta.REMOVED|IModelDelta.UNINSTALL);
+	    				 
+	    			} else {
+	    				childDelta = rootDelta.addNode(container, IModelDelta.STATE);
+	    			}
+	    			
+    				// remove the breakpoint from the nested containers
+	    			container.removeBreakpoint(breakpoint, childDelta);
+    			}
+    		} 
+    		
+    		if (addRemoveBpDelta) {
+    			rootDelta.addNode(breakpoint, IModelDelta.REMOVED|IModelDelta.UNINSTALL);
+    		}
+    	}
+    	return removed;
+    } 
+    
+    /**
+     * A helper method to copy the organizers between two containers.
+     * 
+     * @param destContainer the destination container
+     * @param sourceContainer the source container
+     */
+    public static void copyOrganizers(BreakpointContainer destContainer, BreakpointContainer sourceContainer) {
+    	destContainer.fNesting = sourceContainer.fNesting;
+    	destContainer.fOrganizer = sourceContainer.fOrganizer;
+    	destContainer.fCategory = sourceContainer.fCategory;    	
+    }
+    
+    /**
+     * A helper method to update the breakpoint cache of the container and it's ancestors.
+     * 
+     * @param container the breakpoint container
+     * @param breakpoints the breakpoint to update
+     * @param add true if breakpoint should be added to the cache, otherwise remove the breakpoint from the cache
+     */
+    private static void updateSelfAndAncestorsBreakpointCache(BreakpointContainer container, List breakpoints, boolean add) {
+    	if (container != null) {
+    		container.fBreakpoints.removeAll(breakpoints);
+    		if (add)
+    			container.fBreakpoints.addAll(breakpoints);
+    		updateSelfAndAncestorsBreakpointCache(container.getParent(), breakpoints, add);
+    	}
+    }
+    
+    /**
+     * A helper method to add a breakpoint to an existing container.
+     * 
+     * @param destContainer the destination container
+     * @param breakpoint the breakpoint to add
+     * @param destContainerDelta the destination container delta, additional delta will be added to this delta
+     */
+    static public void addBreakpoint(BreakpointContainer destContainer, IBreakpoint breakpoint, ModelDelta destContainerDelta) {
+    	int index = destContainer.insertBreakpoint(breakpoint);
+    	Assert.isTrue(index >= 0);
+    	
+    	List breakpoints = destContainer.fBreakpoints;
+    	destContainerDelta.addNode(breakpoint, index/*breakpoints.indexOf(breakpoint)*/, IModelDelta.ADDED|IModelDelta.INSTALL, 0);
+    	destContainerDelta.setFlags(destContainerDelta.getFlags() | IModelDelta.EXPAND);
+
+    	// add the breakpoints to the parent containers.    	
+    	updateSelfAndAncestorsBreakpointCache(destContainer.getParent(), breakpoints, true);
+    }
+    
+    /**
+     * A helper method to add a child container to an existing container.
+     * 
+     * @param destContainer the destination container
+     * @param sourceContainer the source container
+     * @param destContainerDelta the delta of the destination container, additional delta will be added to this delta
+     */
+    static public void addChildContainer(BreakpointContainer destContainer, BreakpointContainer sourceContainer, ModelDelta destContainerDelta) {
+    	destContainer.insertChildContainer(sourceContainer);
+    	sourceContainer.fParent = destContainer;
+    	
+    	// add the breakpoints to the parent containers.
+    	List breakpoints = Arrays.asList(sourceContainer.getBreakpoints());
+    	updateSelfAndAncestorsBreakpointCache(destContainer, breakpoints, true);
+    	
+    	int index = destContainer.fChildContainers.indexOf(sourceContainer);
+    	int size = sourceContainer.getChildren().length;
+    	ModelDelta childDelta  = destContainerDelta.addNode(sourceContainer, index, IModelDelta.INSERTED|IModelDelta.INSTALL|IModelDelta.EXPAND, size);
+    	
+    	appendContainerDelta(sourceContainer, childDelta);
+    }
+    
+    /**
+     * A helper method to append delta to the breakpoint container. This method is used by addContainer only.
+     * 
+     * @param container the container to append child delta
+     * @param containerDelta the delta of the breakpoint container, additional delta will be added to this delta
+     * @see BreakpointContainer.addContainer
+     */
+    static private void appendContainerDelta(BreakpointContainer container, ModelDelta containerDelta) {
+    	Object[] children = container.getChildren();
+    	for (int i = 0; i < children.length; ++i) {
+    		boolean isBreakpoint = children[0] instanceof IBreakpoint;
+    		int numChild =  isBreakpoint ? 0 : children.length;     		
+    		int flag = isBreakpoint ? IModelDelta.ADDED|IModelDelta.INSTALL 
+    				: IModelDelta.INSERTED|IModelDelta.INSTALL|IModelDelta.EXPAND;
+    		ModelDelta childDelta = containerDelta.addNode(children[i], i, flag, numChild);
+    		
+    		if (children[i] instanceof BreakpointContainer) {    
+    			BreakpointContainer childContainer = (BreakpointContainer) children[i];			
+    			appendContainerDelta(childContainer, childDelta);
+    		} 
+    	}
+    }
+    
+    /**
+     * A helper method to remove the breakpoint from the container.
+     * 
+     * @param container the container to remove the breakpoint
+     * @param breakpoint the breakpoint to remove
+     * @param containerDelta the delta of the breakpoint container, additional delta will be added to this delta
+     */
+    static public void removeBreakpoint(BreakpointContainer container, IBreakpoint breakpoint, ModelDelta containerDelta) {
+    	container.removeBreakpoint(breakpoint, containerDelta);
+    	List breakpoints = new ArrayList();
+    	breakpoints.add(breakpoint);
+    	updateSelfAndAncestorsBreakpointCache(container.getParent(), breakpoints, false);
+    }
+    
+    /**
+     * Remove all child elements including the given container itself.
+     * 
+     * @param container the breakpoint container
+     * @param parentDelta the parent delta
+     */
+    static public void removeAll(BreakpointContainer container, ModelDelta delta) {
+    	BreakpointContainer parent = container.getParent();
+    	if (parent != null) {
+    		parent.fChildContainers.remove(container);
+    		delta = delta.addNode(container, IModelDelta.UNINSTALL|IModelDelta.REMOVED);
+    	}
+    	
+    	if (container.fChildContainers.size() == 0) {
+    		List breakpoints = new ArrayList();
+    		
+    		Iterator iterator = container.fBreakpoints.iterator();
+    		while (iterator.hasNext()) {
+				Object obj = iterator.next();
+				breakpoints.add(obj);
+				delta.addNode(obj, IModelDelta.UNINSTALL|IModelDelta.REMOVED);
+				iterator.remove();				
+    		}
+    		
+	    	// remove the breakpoints from the parent containers.
+			updateSelfAndAncestorsBreakpointCache(container.getParent(), breakpoints, false);     		
+    		return;
+    	}
+    	
+    	Iterator iterator = container.fChildContainers.iterator();
+    	while (iterator.hasNext()) {
+    		BreakpointContainer childContainer = (BreakpointContainer) iterator.next();    		
+    		ModelDelta childDelta = delta.addNode(childContainer, IModelDelta.REMOVED|IModelDelta.UNINSTALL);    		
+    		iterator.remove();
+    		
+    		removeAll(childContainer, childDelta);
+    	}
+    }
+    
+    /**
+     * Returns whether this is the default container.
+     * 
+     * @return true if it is a default container
+     */
+    boolean isDefaultContainer() {
+    	return fDefaultContainer;
+    }
+    
+    /**
      * Returns the breakpoints in this container
      * 
      * @return the breakpoints in this container
@@ -115,20 +535,32 @@ public class BreakpointContainer extends PlatformObject    {
      * @return children as breakpoints or nested containers
      */
     public Object[] getChildren() {
-        if (fCategoriesToContainers.isEmpty()) {
+        if (fChildContainers.isEmpty()) {
             return getBreakpoints();
         }
         return getContainers(); 
+    }    
+
+    /**
+     * Returns the index of the given child element (breakpoint or container.
+     * 
+     * @param child Child to calculate index of.
+     * @return index of child
+     */
+    public int getChildIndex(Object child) {
+        if (fChildContainers.isEmpty()) {
+            return fBreakpoints.indexOf(child);
+        }
+        return fChildContainers.indexOf(child);
     }
     
     /**
      * Returns the containers nested in this container, possibly empty.
      * 
-     * @return the containers nested in this container, possibly empty
+     * @return the containers nested in this container, can be empty.
      */
     public BreakpointContainer[] getContainers() {
-        Collection collection = fCategoriesToContainers.values();
-        return (BreakpointContainer[]) collection.toArray(new BreakpointContainer[collection.size()]);
+        return (BreakpointContainer[]) fChildContainers.toArray(new BreakpointContainer[fChildContainers.size()]);
     }
     
     /**
@@ -140,52 +572,32 @@ public class BreakpointContainer extends PlatformObject    {
         return fOrganizer;
     }
     
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object obj) {
-        if (obj instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) obj;
-            return getCategory().equals(container.getCategory());
-        }
-        return super.equals(obj);
-    }
-    
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return getCategory().hashCode();
-    }
-    
     /**
      * Returns whether this container contains the given breakpoint.
      * 
      * @param breakpoint
-     * @return whether this container contains the given breakpoint
+     * @return true if this container contains the given breakpoint
      */
     public boolean contains(IBreakpoint breakpoint) {
         return fBreakpoints.contains(breakpoint);
-    }
+    }    
     
     /**
-     * Returns the leaf containers the given breakpoint is contained in, or <code>null</code>
-     * if none.
+     * Returns the child containers for the given breakpoint.
      *  
      * @param breakpoint
-     * @return leaf containers the given breakpoint is contained in, or <code>null</code>
-     * if none
+     * @return child containers
      */
     public BreakpointContainer[] getContainers(IBreakpoint breakpoint) {
         if (contains(breakpoint)) {
-            BreakpointContainer[] containers = getContainers();
+        	BreakpointContainer[] containers = getContainers();
             if (containers.length == 0) {
                 return new BreakpointContainer[]{this};
             }
-            List list = new ArrayList();
+            ArrayList list = new ArrayList();
             for (int i = 0; i < containers.length; i++) {
-                BreakpointContainer container = containers[i];
-                BreakpointContainer[] subcontainers = container.getContainers(breakpoint);
+            	BreakpointContainer container = containers[i];
+            	BreakpointContainer[] subcontainers = container.getContainers(breakpoint);
                 if (subcontainers != null) {
                     for (int j = 0; j < subcontainers.length; j++) {
                         list.add(subcontainers[j]);
@@ -194,6 +606,63 @@ public class BreakpointContainer extends PlatformObject    {
             }
             return (BreakpointContainer[]) list.toArray(new BreakpointContainer[list.size()]);
         }
-        return null;
+        return new BreakpointContainer[0];
     }
+    
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+        if (obj instanceof BreakpointContainer) {
+        	
+        	BreakpointContainer container = (BreakpointContainer) obj;
+        	
+            // With Group by "Advanced" the same category can contain a different subset of breakpoints,
+            // therefore to have the same category is not enough to be equal.
+            if (! (fParent != null && container.fParent != null && fParent.equals(container.fParent) || 
+            		fParent == null && container.fParent == null) ) {
+                return false;
+            }
+            
+        	if (getCategory() != null && container.getCategory() != null) {        		
+        		return getCategory().equals(container.getCategory());
+        	} else {
+        		return true;
+        	}
+        }
+        return super.equals(obj);
+	}
+	
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+     */
+	protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+		return getChildren().length;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+	 */
+	protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {		
+		return getElements(getChildren(), index, length);
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
+	 */
+	protected boolean supportsContextId(String id) {
+		return id.equals(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+	}	
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainerWorkbenchAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainerWorkbenchAdapter.java
index 2c009db..a1f3f7e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainerWorkbenchAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointContainerWorkbenchAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,13 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.RGB;
@@ -35,14 +37,16 @@ public class BreakpointContainerWorkbenchAdapter implements IWorkbenchAdapter, I
      * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
      */
     public ImageDescriptor getImageDescriptor(Object object) {
-        if (object instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) object;
+        if (object instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) object;
             IAdaptable category = container.getCategory();
-            IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
-            if (adapter != null) {
-                return adapter.getImageDescriptor(category);
+            if (category != null) {
+	            IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
+	            if (adapter != null) {
+	                return adapter.getImageDescriptor(category);
+	            }
+	            return container.getOrganizer().getImageDescriptor();
             }
-            return container.getOrganizer().getImageDescriptor();
         }
         return null;
     }
@@ -51,14 +55,16 @@ public class BreakpointContainerWorkbenchAdapter implements IWorkbenchAdapter, I
      * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
      */
     public String getLabel(Object object) {
-        if (object instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) object;
+        if (object instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) object;
             IAdaptable category = container.getCategory();
-            IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
-            if (adapter != null) {
-                return adapter.getLabel(category);
+            if (category != null) {
+	            IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
+	            if (adapter != null) {
+	                return adapter.getLabel(category);
+	            }
+	            return container.getOrganizer().getLabel();
             }
-            return container.getOrganizer().getLabel();
         }
         return IInternalDebugCoreConstants.EMPTY_STRING;
     }
@@ -74,8 +80,8 @@ public class BreakpointContainerWorkbenchAdapter implements IWorkbenchAdapter, I
      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getForeground(java.lang.Object)
      */
     public RGB getForeground(Object object) {
-        if (object instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) object;
+        if (object instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) object;
             IAdaptable category = container.getCategory();
             IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) category.getAdapter(IWorkbenchAdapter2.class);
             if (adapter != null) {
@@ -89,8 +95,8 @@ public class BreakpointContainerWorkbenchAdapter implements IWorkbenchAdapter, I
      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getBackground(java.lang.Object)
      */
     public RGB getBackground(Object object) {
-        if (object instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) object;
+        if (object instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) object;
             IAdaptable category = container.getCategory();
             IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) category.getAdapter(IWorkbenchAdapter2.class);
             if (adapter != null) {
@@ -104,8 +110,8 @@ public class BreakpointContainerWorkbenchAdapter implements IWorkbenchAdapter, I
      * @see org.eclipse.ui.model.IWorkbenchAdapter2#getFont(java.lang.Object)
      */
     public FontData getFont(Object object) {
-        if (object instanceof BreakpointContainer) {
-            BreakpointContainer container = (BreakpointContainer) object;
+        if (object instanceof IBreakpointContainer) {
+            IBreakpointContainer container = (IBreakpointContainer) object;
             IAdaptable category = container.getCategory();
             IWorkbenchAdapter2 adapter = (IWorkbenchAdapter2) category.getAdapter(IWorkbenchAdapter2.class);
             if (adapter != null) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerExtension.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerExtension.java
index 3108687..fc13851 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerExtension.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerExtension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
 import org.eclipse.debug.ui.IBreakpointOrganizerDelegate;
 import org.eclipse.debug.ui.IBreakpointOrganizerDelegateExtension;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
index 617ff70..529cb60 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointOrganizerManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
index ef4a7c2..abc8af1 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java
@@ -115,6 +115,16 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
 	 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
 	 */
 	public void propertyChange(PropertyChangeEvent event) {
+		String property = event.getProperty();
+		if (property.equals(IInternalDebugUIConstants.MEMENTO_BREAKPOINT_WORKING_SET_NAME)) {
+			IWorkingSet defaultWorkingSet = getDefaultWorkingSet();
+			if (defaultWorkingSet != null) {
+				fireCategoryChanged(new WorkingSetCategory(defaultWorkingSet));
+			} else {
+				fireCategoryChanged(null);
+			}
+		}
+
 		IWorkingSet set = null;
 		Object newValue = event.getNewValue();
 		if (newValue instanceof IWorkingSet) {
@@ -126,7 +136,6 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
 		if(set == null) {
 			return;
 		}
-		String property = event.getProperty();
 		//fix for bug 103731
 		if (property.equals(IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE)) {
 			if (newValue.equals(fDefaultWorkingSet)) {
@@ -151,14 +160,6 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate
 		if (set != null	&& IDebugUIConstants.BREAKPOINT_WORKINGSET_ID.equals(set.getId())) {
 			fireCategoryChanged(new WorkingSetCategory(set));
 		}
-		if (property.equals(IInternalDebugUIConstants.MEMENTO_BREAKPOINT_WORKING_SET_NAME)) {
-			IWorkingSet defaultWorkingSet = getDefaultWorkingSet();
-			if (defaultWorkingSet != null) {
-				fireCategoryChanged(new WorkingSetCategory(defaultWorkingSet));
-			} else {
-				fireCategoryChanged(null);
-			}
-		}
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
index bc7e5fb..1bb0901 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetElementAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.ui.IWorkingSet;
 import org.eclipse.ui.IWorkingSetElementAdapter;
@@ -32,8 +33,8 @@ public class BreakpointWorkingSetElementAdapter implements IWorkingSetElementAda
 	 */
 	public IAdaptable[] adaptElements(IWorkingSet ws, IAdaptable[] elements) {
 		for (int i = 0; i < elements.length; i++) {
-			IAdaptable adaptable = elements[i];
-			if (!(adaptable instanceof IBreakpoint)) {
+	        IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(elements[i], IBreakpoint.class);			
+			if (breakpoint != null) {
 				return selectBreakpoints(elements);
 			}
 		}
@@ -43,9 +44,9 @@ public class BreakpointWorkingSetElementAdapter implements IWorkingSetElementAda
 	private IAdaptable[] selectBreakpoints(IAdaptable[] elements) {
 		List breakpoints = new ArrayList(elements.length);
 		for (int i = 0; i < elements.length; i++) {
-			IAdaptable adaptable = elements[i];
-			if (adaptable instanceof IBreakpoint) {
-				breakpoints.add(adaptable);
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(elements[i], IBreakpoint.class);            
+			if (breakpoint != null) {
+				breakpoints.add(breakpoint);
 			}
 		}
 		return (IAdaptable[]) breakpoints.toArray(new IAdaptable[breakpoints.size()]);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
index aa8f8a7..19879e8 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -164,8 +164,9 @@ public class BreakpointWorkingSetPage extends WizardPage implements IWorkingSetP
 		ArrayList elements = new ArrayList();
 		//weed out non-breakpoint elements since 3.2
 		for(int i = 0; i < adaptable.length; i++) {
-			if(adaptable[i] instanceof IBreakpoint) {
-				elements.add(adaptable[i]);
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(adaptable[i], IBreakpoint.class);
+			if(breakpoint != null) {
+				elements.add(breakpoint);
 			}//end if
 		}//end for
 		if (fWorkingSet == null) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
index 88644a7..21dabc7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,8 @@ import java.util.Map;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
 import org.eclipse.debug.ui.IBreakpointOrganizerDelegate;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
@@ -119,7 +121,7 @@ public class BreakpointsContentProvider implements ITreeContentProvider, IProper
                 breakpoints = fViewer.getVisibleBreakpoints();
             }
             reorganize();
-            if (isShowingGroups()) {
+            if (isShowingGroups() && breakpoints != null) {
                 // restore expansion
                 for (int i = 0; i < fElements.length; i++) {
                     BreakpointContainer container = (BreakpointContainer) fElements[i];
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java
index 8b547e7..817e9a7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDragAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,18 +7,22 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.util.TransferDragSourceListener;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DragSourceAdapter;
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.widgets.Item;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
 
 /**
  * A drag adapter for the breakpoints viewer
@@ -28,8 +32,11 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe
     /**
      * the associated viewer for the adapter
      */
-    private BreakpointsViewer fViewer;
+    private AbstractTreeViewer fViewer;
     private Item[] fItems = null;
+
+    private BreakpointsView fView;
+    private TreePath[] fTreePaths = null;
     
     /**
      * Constructor
@@ -39,12 +46,17 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe
         Assert.isNotNull(viewer);
         fViewer = viewer;
     }
+    public BreakpointsDragAdapter(AbstractTreeViewer viewer, BreakpointsView view) {
+        Assert.isNotNull(view);
+        fViewer = viewer;
+        fView = view;
+    }
 
     /**
      * @see TransferDragSourceListener#getTransfer
      */
     public Transfer getTransfer() {
-        return LocalSelectionTransfer.getInstance();
+        return LocalSelectionTransfer.getTransfer();
     }
     
     /* non Java-doc
@@ -52,10 +64,20 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe
      */
     public void dragStart(DragSourceEvent event) {
         ISelection selection = fViewer.getSelection();
-        LocalSelectionTransfer.getInstance().setSelection(selection);
-        LocalSelectionTransfer.getInstance().setSelectionSetTime(event.time & 0xFFFFFFFFL);
-        event.doit = fViewer.canDrag(fViewer.getSelectedItems());
-        fItems = fViewer.getSelectedItems();
+        LocalSelectionTransfer.getTransfer().setSelection(selection);
+        LocalSelectionTransfer.getTransfer().setSelectionSetTime(event.time & 0xFFFFFFFFL);
+        if (fViewer instanceof BreakpointsViewer) {
+        	BreakpointsViewer viewer = (BreakpointsViewer)fViewer; 
+	        fItems = viewer.getSelectedItems();
+	        event.doit = viewer.canDrag(fItems);
+        } else {
+        	if (selection instanceof ITreeSelection) {
+            	fTreePaths = ((ITreeSelection) selection).getPaths();
+        	} else {
+        		fTreePaths = new TreePath[0];
+        	}
+	        event.doit = fView.canDrag(fTreePaths); 	
+        }
     }
    
     /* non Java-doc
@@ -65,7 +87,7 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe
         // For consistency set the data to the selection even though
         // the selection is provided by the LocalSelectionTransfer
         // to the drop target adapter.
-        event.data = LocalSelectionTransfer.getInstance().getSelection();
+        event.data = LocalSelectionTransfer.getTransfer().getSelection();
     }
 
     /* non Java-doc
@@ -74,10 +96,15 @@ public class BreakpointsDragAdapter extends DragSourceAdapter implements Transfe
     public void dragFinished(DragSourceEvent event) {
         if (event.detail == DND.DROP_MOVE) {
             // remove from source on move operation
-        	fViewer.performDrag(fItems);
+            if (fViewer instanceof BreakpointsViewer) {
+            	BreakpointsViewer viewer = (BreakpointsViewer)fViewer; 
+            	viewer.performDrag(fItems);
+            } else {
+            	fView.performDrag(fTreePaths);            	
+            }
         }
         fItems = null;
-        LocalSelectionTransfer.getInstance().setSelection(null);
-        LocalSelectionTransfer.getInstance().setSelectionSetTime(0);
+        LocalSelectionTransfer.getTransfer().setSelection(null);
+        LocalSelectionTransfer.getTransfer().setSelectionSetTime(0);
     }   
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
index cd4096d..422cea9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,15 +7,24 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.ViewerDropAdapter;
 import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.TransferData;
 import org.eclipse.swt.widgets.Item;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
+import org.eclipse.swt.widgets.TreeItem;
 
 /**
  * BreakpointsDropAdapter
@@ -23,20 +32,38 @@ import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
 public class BreakpointsDropAdapter extends ViewerDropAdapter {
 
 	private Item fTarget = null;
+	private TreePath fPath = null;
+	private BreakpointsView fView;
 	
     /**
      * @param viewer
      */
-    protected BreakpointsDropAdapter(BreakpointsViewer viewer) {
+    protected BreakpointsDropAdapter(TreeViewer viewer) {
         super(viewer);
         setFeedbackEnabled(false);
     }
 
+    protected BreakpointsDropAdapter(TreeViewer viewer, BreakpointsView view) {
+        this(viewer);
+    	fView = view;
+    }
+
     /**
      * @see org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang.Object)
      */
     public boolean performDrop(Object data) {
-    	return ((BreakpointsViewer)getViewer()).performDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getInstance().getSelection());
+    	// This is temporary
+    	if (getViewer() instanceof BreakpointsViewer) {
+    		return ((BreakpointsViewer)getViewer()).performDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection());
+    	} else if (fView != null) {
+    		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+    		if (fPath != null && selection instanceof ITreeSelection) {
+        		if (selection instanceof ITreeSelection) {
+        			return fView.performDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getTransfer().getSelection());
+        		}
+    		}
+    	}
+    	return false;
     }
 
 	/**
@@ -44,6 +71,17 @@ public class BreakpointsDropAdapter extends ViewerDropAdapter {
 	 */
 	protected Object determineTarget(DropTargetEvent event) {
 		fTarget = (Item) event.item;
+		if (fTarget instanceof TreeItem) {
+			List list = new ArrayList();
+			TreeItem item = (TreeItem)fTarget;
+			while (item != null) {
+				list.add(item.getData());
+				item = item.getParentItem();
+			}
+			fPath = new TreePath(list.toArray());
+		} else {
+			fPath = null;
+		}
 		return fTarget;
 	}
 	
@@ -51,6 +89,17 @@ public class BreakpointsDropAdapter extends ViewerDropAdapter {
      * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object, int, org.eclipse.swt.dnd.TransferData)
      */
     public boolean validateDrop(Object target, int operation, TransferData transferType) {
-    	return ((BreakpointsViewer)getViewer()).canDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getInstance().getSelection());
+    	// This is temporary
+    	if (getViewer() instanceof BreakpointsViewer) {
+    		return ((BreakpointsViewer)getViewer()).canDrop(fTarget, (IStructuredSelection) LocalSelectionTransfer.getTransfer().getSelection());
+    	} else {
+       		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+    		if (fPath != null && selection instanceof ITreeSelection) {
+        		if (selection instanceof ITreeSelection) {
+        			return fView.canDrop(fPath, (ITreeSelection) LocalSelectionTransfer.getTransfer().getSelection());
+        		}
+    		}
+    	}
+    	return false;
     }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
index 17e8cf0..565da9a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
@@ -1,549 +1,476 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+/*****************************************************************
+ * Copyright (c) 2009, 2010 Texas Instruments and others
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak - bug 78494
- *******************************************************************************/
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     IBM Corporation - ongoing enhancements and bug fixing
+ *****************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
- 
-import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
 
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManagerListener;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
+import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
+import org.eclipse.debug.internal.ui.actions.breakpointGroups.PasteBreakpointsAction;
+import org.eclipse.debug.internal.ui.actions.breakpointGroups.RemoveFromWorkingSetAction;
+import org.eclipse.debug.internal.ui.actions.breakpoints.OpenBreakpointMarkerAction;
+import org.eclipse.debug.internal.ui.actions.breakpoints.ShowTargetBreakpointsAction;
+import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsAction;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointUIConstants;
+import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
+import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
+import org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.VirtualTreeModelViewer;
+import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
+import org.eclipse.debug.internal.ui.views.variables.VariablesView;
+import org.eclipse.debug.internal.ui.views.variables.details.AvailableDetailPanesAction;
+import org.eclipse.debug.ui.IBreakpointOrganizerDelegateExtension;
+import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
+import org.eclipse.jface.viewers.ITreeSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
+import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.Viewer;
-
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TreeItem;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPerspectiveDescriptor;
-import org.eclipse.ui.IPerspectiveListener2;
-import org.eclipse.ui.ISelectionListener;
 import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartReference;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.actions.SelectionListenerAction;
-import org.eclipse.ui.contexts.IContextActivation;
-import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.IThread;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.LazyModelPresentation;
-import org.eclipse.debug.internal.ui.actions.breakpointGroups.CopyBreakpointsAction;
-import org.eclipse.debug.internal.ui.actions.breakpointGroups.PasteBreakpointsAction;
-import org.eclipse.debug.internal.ui.actions.breakpointGroups.RemoveFromWorkingSetAction;
-import org.eclipse.debug.internal.ui.actions.breakpoints.OpenBreakpointMarkerAction;
-import org.eclipse.debug.internal.ui.actions.breakpoints.ShowSupportedBreakpointsAction;
-import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsAction;
-import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
-
-import org.eclipse.debug.ui.AbstractDebugView;
-import org.eclipse.debug.ui.IDebugModelPresentation;
-import org.eclipse.debug.ui.IDebugUIConstants;
 
 /**
- * This view shows the breakpoints registered with the breakpoint manager
+ * This class implements the breakpoints view.
  */
-public class BreakpointsView extends AbstractDebugView implements ISelectionListener, IBreakpointManagerListener, IPerspectiveListener2 {
-
-    private BreakpointsViewEventHandler fEventHandler;
-	private ICheckStateListener fCheckListener= new ICheckStateListener() {
-		public void checkStateChanged(CheckStateChangedEvent event) {
-			Object source = event.getElement();
-			if (source instanceof BreakpointContainer) {
-				handleContainerChecked(event, (BreakpointContainer) source);
-			} else if (source instanceof IBreakpoint) {
-				handleBreakpointChecked(event, (IBreakpoint) source);
-			}
-		}
-	};
-	private boolean fIsTrackingSelection= false;
-	// Persistence constants
-	private static String KEY_IS_TRACKING_SELECTION= "isTrackingSelection"; //$NON-NLS-1$
-	private static String KEY_VALUE="value"; //$NON-NLS-1$
-    private static final String ACTION_REMOVE_FROM_GROUP = "RemoveFromGroup"; //$NON-NLS-1$
-	private BreakpointsContentProvider fContentProvider;
-    private Clipboard fClipboard;
-    private IContextActivation fActivatedContext;
-    
-	/**
-	 * This memento allows the Breakpoints view to save and restore state
-	 * when it is closed and opened within a session. A different
-	 * memento is supplied by the platform for persistence at
-	 * workbench shutdown.
-	 */
-	private static IMemento fgMemento;
+public class BreakpointsView extends VariablesView implements IBreakpointManagerListener {	
+	private static final String ACTION_GOTO_MARKER				= "GotoMarker";				//$NON-NLS-1$
+	private static final String ACTION_SKIP_BREAKPOINTS			= "SkipBreakpoints";		//$NON-NLS-1$
+	private static final String ACTION_SHOW_MODEL_BREAKPOINT	= "ShowBreakpointsForModel";//$NON-NLS-1$
+	private static final String ACTION_REMOVE_FROM_GROUP 		= "RemoveFromGroup"; 		//$NON-NLS-1$
 	
-	/**
-	 * @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
-	 */
-	public void createPartControl(Composite parent) {
-		super.createPartControl(parent);
-		DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener(this);
-		getSite().getWorkbenchWindow().addPerspectiveListener(this);
-	}
-
-	/**
-	 * @see AbstractDebugView#createViewer(Composite)
-	 */
-	protected Viewer createViewer(Composite parent) {
-		fContentProvider= new BreakpointsContentProvider();
-		CheckboxTreeViewer viewer = new BreakpointsViewer(new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK));
-        setViewer(viewer);
-        viewer.setUseHashlookup(true);
-		viewer.setContentProvider(fContentProvider);
-		viewer.setComparator(new BreakpointsComparator());
-		viewer.setInput(DebugPlugin.getDefault().getBreakpointManager());
-		viewer.addCheckStateListener(fCheckListener);
-		viewer.addTreeListener(new ITreeViewerListener() {
-			public void treeExpanded(TreeExpansionEvent event) {
-				((BreakpointsViewer)getViewer()).updateCheckedState(event.getElement());
-			}
-			public void treeCollapsed(TreeExpansionEvent event) {
-			}
-		});
-	    viewer.setLabelProvider(new BreakpointsLabelProvider());
-		// Necessary so that the PropertySheetView hears about selections in this view
-		getSite().setSelectionProvider(viewer);
-		initIsTrackingSelection();
-		initBreakpointOrganizers();
-		setEventHandler(new BreakpointsViewEventHandler(this));
-        initDragAndDrop();
-		return viewer;
-	}
-    
-    /**
-     * Initializes drag and drop for the breakpoints viewer
-     */
-    private void initDragAndDrop() {
-        BreakpointsViewer viewer = (BreakpointsViewer) getViewer();
-        int ops = DND.DROP_MOVE | DND.DROP_COPY;
-        // drop
-        viewer.addDropSupport(ops, new Transfer[] {LocalSelectionTransfer.getInstance()}, new BreakpointsDropAdapter(viewer));
-        // Drag
-        viewer.addDragSupport(ops, new Transfer[] {LocalSelectionTransfer.getInstance()}, new BreakpointsDragAdapter(viewer));
-    }
 	
+	private static final String KEY_VALUE						= "value";					//$NON-NLS-1$
+
+	private Clipboard fClipboard;	
+	private IBreakpointOrganizer[] fOrganizers;
+
 	/**
-	 * Initializes whether this view tracks selection in the
-	 * debug view from the persisted state.
+	 * Flag used to determine whether the viewer input is being set for the 
+	 * fist time.  If this is the case the view contents are expanded.
+	 * (bug 297762)
 	 */
-	private void initIsTrackingSelection() {
-		IMemento memento= getMemento();
-		if (memento != null) {
-			IMemento node= memento.getChild(KEY_IS_TRACKING_SELECTION);
-			if (node != null) {
-				setTrackSelection(Boolean.valueOf(node.getString(KEY_VALUE)).booleanValue());
-				return;
-			}
-		}
-		setTrackSelection(false);
-	}
+	private boolean fFirstInputSet = false;
 	
-	/**
-	 * Initializes the persisted breakpoints organizers
-	 */
-	private void initBreakpointOrganizers() {
-		IMemento memento = getMemento();
-		if (memento != null) {
-			IMemento node = memento.getChild(IDebugUIConstants.EXTENSION_POINT_BREAKPOINT_ORGANIZERS);
-			if (node == null) {
-                fContentProvider.setOrganizers(null);
-            } else {
-				String value = node.getString(KEY_VALUE);
-                if (value != null) {
-                    String[] ids = value.split(","); //$NON-NLS-1$
-    				BreakpointOrganizerManager manager = BreakpointOrganizerManager.getDefault();
-    				List organziers= new ArrayList();
-                    for (int i = 0; i < ids.length; i++) {
-                        IBreakpointOrganizer organizer = manager.getOrganizer(ids[i]);
-                        if (organizer != null) {
-                            organziers.add(organizer);
-                        }
-                    }
-    				fContentProvider.setOrganizers((IBreakpointOrganizer[]) organziers.toArray(new IBreakpointOrganizer[organziers.size()]));
-                }
-			}
-		}
+	public void dispose() {
+		if (fClipboard != null)
+			fClipboard.dispose();		
+		DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener(this);
+		super.dispose();
 	}
 	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.ui.AbstractDebugView#getMemento()
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getDetailPanePreferenceKey()
 	 */
-	protected IMemento getMemento() {
-		if (fgMemento != null) {
-		    return fgMemento;
-		}
-		return super.getMemento();
+	protected String getDetailPanePreferenceKey() {
+		return IDebugPreferenceConstants.BREAKPOINTS_DETAIL_PANE_ORIENTATION;
 	}
 	
-    /**
-     * Update the checked state up the given element and all of its children.
-     * 
-     * @param element
-     */
-	public void updateCheckedState(Object element) {
-        ((BreakpointsViewer)getViewer()).updateCheckedState(element);
-	}
-		
-	/**
-	 * Returns this view's viewer as a checkbox tree viewer.
-	 * @return this view's viewer as a checkbox tree viewer
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getHelpContextId()
 	 */
-	public CheckboxTreeViewer getCheckboxViewer() {
-		return (CheckboxTreeViewer) getViewer();
+	protected String getHelpContextId() {
+		return IDebugHelpContextIds.BREAKPOINT_VIEW;
 	}
-	
-	/**
-	 * Returns this view's content provider as a tree content provider.
-	 * @return this view's content provider as a tree content provider
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getViewerStyle()
 	 */
-	public ITreeContentProvider getTreeContentProvider() {
-	    return fContentProvider;
+	protected int getViewerStyle() {
+		return SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.VIRTUAL | SWT.FULL_SELECTION | SWT.CHECK;
 	}
 
-	/**
-	 * A breakpoint has been checked/unchecked. Update the group
-	 * element's checked/grayed state as appropriate.
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#createViewer(org.eclipse.swt.widgets.Composite)
 	 */
-	private void handleBreakpointChecked(final CheckStateChangedEvent event, final IBreakpoint breakpoint) {
-		final boolean enable= event.getChecked();
-        String jobName = enable ? DebugUIViewsMessages.BreakpointsView_0 : DebugUIViewsMessages.BreakpointsView_1; //
-        new Job(jobName) {
-            protected IStatus run(IProgressMonitor monitor) {
-                try {
-                    breakpoint.setEnabled(enable);
-                    return Status.OK_STATUS;
-                } catch (final CoreException e) {
-                    Display.getDefault().asyncExec(new Runnable() {
-                        public void run() {
-                            String titleState= enable ? DebugUIViewsMessages.BreakpointsView_6 : DebugUIViewsMessages.BreakpointsView_7; //
-                            String messageState= enable ? DebugUIViewsMessages.BreakpointsView_8 : DebugUIViewsMessages.BreakpointsView_9;  //
-                            DebugUIPlugin.errorDialog(DebugUIPlugin.getShell(), MessageFormat.format(DebugUIViewsMessages.BreakpointsView_10, new String[] { titleState }), MessageFormat.format(DebugUIViewsMessages.BreakpointsView_11, new String[] { messageState }), e); //
-                            // If the breakpoint fails to update, reset its check state.
-                            getCheckboxViewer().removeCheckStateListener(fCheckListener);
-                            event.getCheckable().setChecked(breakpoint, !event.getChecked());
-                            getCheckboxViewer().addCheckStateListener(fCheckListener);
-                        }
-                    });
-                }
-                return Status.CANCEL_STATUS;
-            }
-        }.schedule();
-    }
+	public Viewer createViewer(Composite parent) {
+		TreeModelViewer viewer = (TreeModelViewer) super.createViewer(parent);		
+		
+		initBreakpointOrganizers(getMemento());
 
-	/**
-	 * A group has been checked or unchecked. Enable/disable all of the
-	 * breakpoints in that group to match.
-	 */
-	private void handleContainerChecked(CheckStateChangedEvent event, BreakpointContainer container) {
-		final IBreakpoint[] breakpoints = container.getBreakpoints();
-		final boolean enable= event.getChecked();
-		IRunnableWithProgress runnable = new IRunnableWithProgress() {
-            public void run(IProgressMonitor monitor) {
-                try {
-                    for (int i = 0; i < breakpoints.length; i++) {
-                        IBreakpoint breakpoint = breakpoints[i];
-                        breakpoint.setEnabled(enable);
-                    }
-                } catch (CoreException e) {
-                    DebugUIPlugin.log(e);
-                }
-            }
-        };
-        // TODO: should use scheduling rule
-        IProgressService progressService = PlatformUI.getWorkbench().getProgressService();
-        try {
-            progressService.busyCursorWhile(runnable);
-        }
-        catch (InvocationTargetException e) {}
-        catch (InterruptedException e) {}
-	}
+		IPresentationContext presentationContext = viewer.getPresentationContext(); 
+		presentationContext.setProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS, fOrganizers);
+        presentationContext.setProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ELEMENT_COMPARATOR, new ElementComparator(presentationContext));
 
-	/**
-	 * @see AbstractDebugView#getHelpContextId()
-	 */
-	protected String getHelpContextId() {
-		return IDebugHelpContextIds.BREAKPOINT_VIEW;
+        return viewer;
 	}
 
-	/**
-	 * @see IWorkbenchPart#dispose()
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getModelPresentation()
 	 */
-	public void dispose() {
-        disposeAction(IWorkbenchCommandConstants.EDIT_COPY);
-        disposeAction(IWorkbenchCommandConstants.EDIT_PASTE);
-        disposeAction(ACTION_REMOVE_FROM_GROUP);
-        
-	    if (getCheckboxViewer() != null) {
-	        getCheckboxViewer().removeCheckStateListener(fCheckListener);
-	    }
-		IAction action= getAction("ShowBreakpointsForModel"); //$NON-NLS-1$
-		if (action != null) {
-			((ShowSupportedBreakpointsAction)action).dispose();
-		}
-		getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
-		DebugPlugin.getDefault().getBreakpointManager().removeBreakpointManagerListener(this);
-		super.dispose();
-		
-		if (getEventHandler() != null) {
-			getEventHandler().dispose();
+	protected IDebugModelPresentation getModelPresentation() {
+		if (fModelPresentation == null) {
+			fModelPresentation = new VariablesViewModelPresentation() {
+				/**
+				 * Undo double slashes.
+				 */
+				public String getText(Object element) {					
+			    	IDebugModelPresentation lp= getConfiguredPresentation(element);
+			    	if (lp != null) {
+			    		return lp.getText(element);
+			    	}
+			    	return getDefaultText(element);
+				}
+			};
 		}
-        
-        if (fClipboard != null) {
-            fClipboard.dispose();
-        }
-        
-		getSite().getWorkbenchWindow().removePerspectiveListener(this);
+		return fModelPresentation;
 	}
-
+	
 	/**
-	 * @see AbstractDebugView#createActions()
+	 * Returns the tree model viewer.
+	 * @return
 	 */
-	protected void createActions() {
-		IAction action = new OpenBreakpointMarkerAction(getViewer());
-		setAction("GotoMarker", action); //$NON-NLS-1$
-		setAction(DOUBLE_CLICK_ACTION, action);
-		setAction("ShowBreakpointsForModel", new ShowSupportedBreakpointsAction(getStructuredViewer(),this)); //$NON-NLS-1$
-		setAction("SkipBreakpoints", new SkipAllBreakpointsAction(this)); //$NON-NLS-1$
-        
-        fClipboard= new Clipboard(getSite().getShell().getDisplay());
-        
-        PasteBreakpointsAction paste = new PasteBreakpointsAction(this);
-        configure(paste, ActionFactory.PASTE.getCommandId(), ActionFactory.PASTE.getId(), ISharedImages.IMG_TOOL_PASTE);
-        SelectionListenerAction copy = new CopyBreakpointsAction(this, fClipboard, paste);
-        configure(copy, ActionFactory.COPY.getCommandId(), ActionFactory.COPY.getId(), ISharedImages.IMG_TOOL_COPY);
-        
-        SelectionListenerAction remove = new RemoveFromWorkingSetAction(this);
-        setAction(ACTION_REMOVE_FROM_GROUP, remove);
-        getViewer().addSelectionChangedListener(remove);
+	public TreeModelViewer getTreeModelViewer() {
+		return (TreeModelViewer) getViewer();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#configureToolBar(org.eclipse.jface.action.IToolBarManager)
+	 */
+	protected void configureToolBar(IToolBarManager tbm) {
+		tbm.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP));
+		tbm.add(getAction(ACTION_SHOW_MODEL_BREAKPOINT)); 
+		tbm.add(getAction(ACTION_GOTO_MARKER));
+		tbm.add(getAction(ACTION_SKIP_BREAKPOINTS));
+		tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP));
 	}
 
-	/**
-     * Configures the action to override the global action, registers
-     * the action for selection change notification, and registers
-     * the action with this view.
-     * 
-     * @param sla action
-     * @param defId action definition id
-     * @param globalId global action id
-     * @param imgId image identifier
-     */
-    private void configure(SelectionListenerAction action, String defId, String globalId, String imgId) {
-        setAction(defId, action);
-        action.setActionDefinitionId(defId);
-        getViewSite().getActionBars().setGlobalActionHandler(globalId, action);
-        getViewer().addSelectionChangedListener(action);
-        action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(imgId));
-    }
-    
-    /**
-     * Cleans up selection listener action
-     * 
-     * @param id action id
-     */
-    private void disposeAction(String id) {
-        IAction action = getAction(id);
-        if (action instanceof SelectionListenerAction) {
-            SelectionListenerAction sla = (SelectionListenerAction) action;
-            if (getViewer() != null) {
-                getViewer().removeSelectionChangedListener(sla);
-            }
-        }
-    }
-
-    /**
-	 * Adds items to the context menu.
-	 * 
-	 * @param menu The menu to contribute to
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
 	 */
 	protected void fillContextMenu(IMenuManager menu) {
 		updateObjects();
 		menu.add(new Separator(IDebugUIConstants.EMPTY_NAVIGATION_GROUP));
 		menu.add(new Separator(IDebugUIConstants.NAVIGATION_GROUP));
-		menu.add(getAction("GotoMarker")); //$NON-NLS-1$
+		menu.add(getAction(ACTION_GOTO_MARKER));
 		menu.add(new Separator(IDebugUIConstants.EMPTY_BREAKPOINT_GROUP));
 		menu.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP));
-        menu.add(getAction(IWorkbenchCommandConstants.EDIT_COPY));
-        menu.add(getAction(IWorkbenchCommandConstants.EDIT_PASTE));
-        IAction action = getAction(ACTION_REMOVE_FROM_GROUP);
-        if (action.isEnabled()) {
-            menu.add(action);
-        }
+		menu.add(getAction(PASTE_ACTION));
+		IAction action = getAction(ACTION_REMOVE_FROM_GROUP);
+		if (action != null && action.isEnabled()) {
+			menu.add(action);
+		}
 		menu.add(new Separator(IDebugUIConstants.EMPTY_RENDER_GROUP));
+		action = new AvailableDetailPanesAction(this);
+		if (isDetailPaneVisible() && action.isEnabled()) {
+			menu.add(action);
+		}
 		menu.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP_GROUP));
-		
+
 		menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
 	}
-	
-	/**
-	 * @see AbstractDebugView#configureToolBar(IToolBarManager)
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#createActions()
 	 */
-	protected void configureToolBar(IToolBarManager tbm) {
-		tbm.add(new Separator(IDebugUIConstants.BREAKPOINT_GROUP));
-		tbm.add(getAction("ShowBreakpointsForModel")); //$NON-NLS-1$
-		tbm.add(getAction("GotoMarker")); //$NON-NLS-1$
-		tbm.add(getAction("SkipBreakpoints")); //$NON-NLS-1$
-		tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP));
+	protected void createActions() {
+		IAction action = new OpenBreakpointMarkerAction(getViewer());
+		setAction(ACTION_GOTO_MARKER, action);
+		setAction(DOUBLE_CLICK_ACTION, action);
+		setAction(ACTION_SHOW_MODEL_BREAKPOINT, new ShowTargetBreakpointsAction(this));
+		setAction(ACTION_SKIP_BREAKPOINTS, new SkipAllBreakpointsAction(this));
+        DebugPlugin.getDefault().getBreakpointManager().addBreakpointManagerListener(this);
+
+		fClipboard = new Clipboard(getSite().getShell().getDisplay());
+		        
+		PasteBreakpointsAction paste = new PasteBreakpointsAction(this);
+		setAction(PASTE_ACTION, paste);
+		paste.setActionDefinitionId(ActionFactory.PASTE.getCommandId());
+        getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PASTE.getId(), paste);
+        getViewer().addSelectionChangedListener(paste);
+        paste.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+		        
+		SelectionListenerAction remove = new RemoveFromWorkingSetAction(this);
+		setAction(ACTION_REMOVE_FROM_GROUP, remove);
+		getViewer().addSelectionChangedListener(remove);
+		
 	}
-	
-	/**
-	 * Returns this view's event handler
+
+	/*
+	 * (non-Javadoc)
 	 * 
-	 * @return a breakpoint view event handler
+	 * @seeorg.eclipse.debug.internal.ui.views.variables.VariablesView#getToggleActionLabel()
 	 */
-	protected BreakpointsViewEventHandler getEventHandler() {
-		return fEventHandler;
+	protected String getToggleActionLabel() {
+		return DebugUIViewsMessages.BreakpointsView_12;
 	}
 
-	/**
-	 * Sets this view's event handler.
+	/*
+	 * (non-Javadoc)
 	 * 
-	 * @param eventHandler a breakpoint view event handler
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getPresentationContextId()
 	 */
-	private void setEventHandler(BreakpointsViewEventHandler eventHandler) {
-		fEventHandler = eventHandler;
+	protected String getPresentationContextId() {
+		return IDebugUIConstants.ID_BREAKPOINT_VIEW;
 	}
-	/**
-	 * @see org.eclipse.debug.ui.AbstractDebugView#becomesVisible()
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#contextActivated(org.eclipse.jface.viewers.ISelection)
 	 */
-	protected void becomesVisible() {
-		super.becomesVisible();
-        CheckboxTreeViewer viewer = getCheckboxViewer();
-        ISelection selection = viewer.getSelection();
-        viewer.getControl().setRedraw(false);
-        ((BreakpointsContentProvider)viewer.getContentProvider()).reorganize();
-        viewer.setSelection(new StructuredSelection(selection));
-        viewer.getControl().setRedraw(true);
+	protected void contextActivated(ISelection selection) {
+	    IPresentationContext presentationContext = getTreeModelViewer().getPresentationContext();
+	    
+		if (selection == null || selection.isEmpty()) {
+			Object input = new DefaultBreakpointsViewInput(presentationContext);
+			super.contextActivated(new StructuredSelection(input));
+		} else {
+			super.contextActivated(selection);
+		}
+		if (isAvailable() && isVisible()) {
+			updateAction("ContentAssist"); //$NON-NLS-1$
+		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#setViewerInput(java.lang.Object)
 	 */
-	public void selectionChanged(IWorkbenchPart part, ISelection sel) {
-		if (sel.isEmpty() || !isTrackingSelection()) {
+	protected void setViewerInput(Object context) {
+		Object current = getViewer().getInput();
+		if (current == null && context == null) {
 			return;
 		}
-		IStructuredSelection selection= (IStructuredSelection) sel;
-		Iterator iter= selection.iterator();
-		Object firstElement= iter.next();
-		if (firstElement == null || iter.hasNext()) {
+
+		if (current != null && current.equals(context)) {
 			return;
 		}
-		IThread thread= null;
-		if (firstElement instanceof IStackFrame) {
-			thread= ((IStackFrame) firstElement).getThread();
-		} else if (firstElement instanceof IThread) {
-			thread= (IThread) firstElement;
-		} else {
-			return;
+		
+		showViewer();
+		getViewer().setInput(context);
+		
+		// Expand all elements when the view is first shown. (bug 297762)
+		if (!fFirstInputSet) {
+		    fFirstInputSet = true;
+		    expandAllElementsInViewer();
 		}
-		IBreakpoint[] breakpoints= thread.getBreakpoints();
-		getViewer().setSelection(new StructuredSelection(breakpoints), true);
+	}
+		
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#viewerInputUpdateComplete(org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate)
+	 */
+	protected void viewerInputUpdateComplete(IViewerInputUpdate update) {		
+		// handles non-standard debug model
+	    IStatus status = update.getStatus();
+        if ( (status == null || status.isOK()) && update.getElement() != null) {
+            setViewerInput(update.getInputElement());
+        } else {
+            setViewerInput(new DefaultBreakpointsViewInput(getTreeModelViewer().getPresentationContext()));
+        }
 	}
 	
+	
 	/**
-	 * Returns whether this view is currently tracking the
-	 * selection from the debug view.
+	 * Returns whether this view is currently tracking the selection from the debug view.
 	 * 
-	 * @return whether this view is currently tracking the
-	 *   debug view's selection
+	 * @return whether this view is currently tracking the debug view's selection
 	 */
 	public boolean isTrackingSelection() {
-		return fIsTrackingSelection;
+        final TreeModelViewer viewer = getTreeModelViewer();
+        if (viewer != null) {
+            return Boolean.TRUE.equals( 
+                viewer.getPresentationContext().getProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_TRACK_SELECTION) );
+        }
+        return false;
 	}
-	
+
 	/**
-	 * Sets whether this view should track the selection from
-	 * the debug view.
+	 * Sets whether this view should track the selection from the debug view.
 	 * 
-	 * @param trackSelection whether or not this view should
-	 *   track the debug view's selection.
+	 * @param trackSelection whether or not this view should track the debug view's selection.
 	 */
 	public void setTrackSelection(boolean trackSelection) {
-		fIsTrackingSelection= trackSelection;
-		if (trackSelection) {
-			getSite().getPage().addSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
-		} else {
-			getSite().getPage().removeSelectionListener(IDebugUIConstants.ID_DEBUG_VIEW, this);
+		// set the track selection property for non-standard model to track the debug context
+		final TreeModelViewer viewer = getTreeModelViewer();
+		if (viewer != null) {
+			viewer.getPresentationContext().setProperty(
+			    IBreakpointUIConstants.PROP_BREAKPOINTS_TRACK_SELECTION, 
+			    trackSelection ? Boolean.TRUE : Boolean.FALSE);
 		}
 	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IViewPart#saveState(org.eclipse.ui.IMemento)
+	
+	/**
+	 * Initializes the persisted breakpoints organizers.
 	 */
-	public void saveState(IMemento memento) {
-		super.saveState(memento);
-		IMemento node= memento.createChild(KEY_IS_TRACKING_SELECTION);
-		node.putString(KEY_VALUE, String.valueOf(fIsTrackingSelection));
-		
-		StringBuffer buffer= new StringBuffer();
-		IBreakpointOrganizer[] organizers = fContentProvider.getOrganizers();
-        if (organizers != null) {
-            for (int i = 0; i < organizers.length; i++) {
-                IBreakpointOrganizer organizer = organizers[i];
+	private void initBreakpointOrganizers(IMemento memento) {
+		if (memento != null) {
+			IMemento node = memento.getChild(IDebugUIConstants.EXTENSION_POINT_BREAKPOINT_ORGANIZERS);
+			if (node == null) {
+				fOrganizers = null;
+            } else {
+				String value = node.getString(KEY_VALUE);
+                if (value != null) {
+                    String[] ids = value.split(","); //$NON-NLS-1$
+    				BreakpointOrganizerManager manager = BreakpointOrganizerManager.getDefault();
+    				List organziers= new ArrayList();
+                    for (int i = 0; i < ids.length; i++) {
+                        IBreakpointOrganizer organizer = manager.getOrganizer(ids[i]);
+                        if (organizer != null) {
+                            organziers.add(organizer);
+                        }
+                    }
+                    fOrganizers = (IBreakpointOrganizer[]) organziers.toArray(new IBreakpointOrganizer[organziers.size()]);
+                    
+                    for (int i = 0; i < fOrganizers.length; i++)
+        				fOrganizers[i].addPropertyChangeListener(this);
+                }
+			}
+		}
+	}
+	
+    /**
+     * Initializes drag and drop for the breakpoints viewer
+     */
+	protected void initDragAndDrop(TreeModelViewer viewer) {
+        int ops = DND.DROP_MOVE | DND.DROP_COPY;
+        // drop
+        viewer.addDropSupport(ops, new Transfer[] {LocalSelectionTransfer.getTransfer()}, new BreakpointsDropAdapter(viewer, this));
+        // Drag
+        viewer.addDragSupport(ops, new Transfer[] {LocalSelectionTransfer.getTransfer()}, new BreakpointsDragAdapter(viewer, this));
+    }
+ 
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#saveViewerState(org.eclipse.ui.IMemento)
+	 */
+	public void saveViewerState(IMemento memento) {
+		StringBuffer buffer = new StringBuffer();
+        if (fOrganizers != null) {
+            for (int i = 0; i < fOrganizers.length; i++) {
+                IBreakpointOrganizer organizer = fOrganizers[i];
                 buffer.append(organizer.getIdentifier());
-                if (i < (organizers.length - 1)) {
+                if (i < (fOrganizers.length - 1)) {
                     buffer.append(',');
                 }
             }
-            node = memento.createChild(IDebugUIConstants.EXTENSION_POINT_BREAKPOINT_ORGANIZERS);
+            IMemento node = memento.createChild(IDebugUIConstants.EXTENSION_POINT_BREAKPOINT_ORGANIZERS);
             node.putString(KEY_VALUE, buffer.toString());
         }
+		super.saveViewerState(memento);
+	}
+	
+	/**
+	 * Preserves the selection.
+	 * 
+	 * @param selection the selection
+	 */
+	public void preserveSelection(IStructuredSelection selection) {
+		if (selection instanceof ITreeSelection && !selection.isEmpty()) {
+			TreePath path = ((ITreeSelection) selection).getPaths()[0];
+			TreeItem item = (TreeItem) ((TreeModelViewer) getViewer()).findItem(path);
+			Object toselect = null;
+			TreeItem[] siblings = null;
+			if (item != null) {
+				TreeItem parent = item.getParentItem();
+				if (parent != null) {
+					siblings = parent.getItems();
+				} else {
+					siblings = item.getParent().getItems();
+				}
+				if (siblings.length > 1) {
+					for (int i = 0; i < siblings.length; i++) {
+						if (item.equals(siblings[i])) {
+							if (i + 1 >= siblings.length) {
+								toselect = siblings[i - 1].getData();
+								break;
+							} else {
+								toselect = siblings[i + 1].getData();
+								break;
+							}
+
+						}
+					}
+				}
+			}
+			if (toselect != null) {
+				getViewer().setSelection(new StructuredSelection(toselect),true);
+			}
+		}
+	}
+
+	/**
+	 * Sets the breakpoint organizers for this view.
+	 * 
+	 * @param organizers the organizers, can be <code>null</code>.
+	 */
+	public void setBreakpointOrganizers(IBreakpointOrganizer[] organizers) {
+		fOrganizers = organizers;
 		
+		TreeModelViewer viewer = getTreeModelViewer();
+		if (viewer != null) {
+			// update the presentation context organizer
+			viewer.getPresentationContext().setProperty(IBreakpointUIConstants.PROP_BREAKPOINTS_ORGANIZERS, fOrganizers);			
+		}
+	}
+
+	/**
+	 * Sets the breakpoint filter for this view.
+	 * 
+	 * @param ss the selection, can be <code>null</code>.
+	 */
+	public void setFilterSelection(boolean filter) {
+		TreeModelViewer viewer = getTreeModelViewer();
+		if (viewer != null) {
+			// update the presentation context filter
+			viewer.getPresentationContext().setProperty(
+			    IBreakpointUIConstants.PROP_BREAKPOINTS_FILTER_SELECTION, filter ? Boolean.TRUE : Boolean.FALSE);
+		}
 	}
 
 	/* (non-Javadoc)
@@ -552,7 +479,7 @@ public class BreakpointsView extends AbstractDebugView implements ISelectionList
 	public void breakpointManagerEnablementChanged(boolean enabled) {
 		DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
 			public void run() {
-				IAction action = getAction("SkipBreakpoints"); //$NON-NLS-1$
+				IAction action = getAction(ACTION_SKIP_BREAKPOINTS);
 				if (action != null) {
 					((SkipAllBreakpointsAction) action).updateActionCheckedState();
 				}
@@ -560,143 +487,44 @@ public class BreakpointsView extends AbstractDebugView implements ISelectionList
 		});
 	}
 	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
-	 */
-	public void doubleClick(DoubleClickEvent event) {
-		  IStructuredSelection selection= (IStructuredSelection) event.getSelection();
-          if (selection.size() == 1) {
-              Object element = selection.getFirstElement();
-              if (element instanceof BreakpointContainer) {
-                  getCheckboxViewer().setExpandedState(element, !getCheckboxViewer().getExpandedState(element));
-                  return;
-              }
-          }
-		super.doubleClick(event);
-	}
-
 	/**
-	 * @param selectedContainers
+	 * Expands all elements in the viewer.
 	 */
-	public void setBreakpointOrganizers(IBreakpointOrganizer[] organizers) {
-        Viewer viewer = getViewer();
-        ISelection selection = viewer.getSelection();
-		fContentProvider.setOrganizers(organizers);
-		viewer.setSelection(selection);
+	public void expandAllElementsInViewer() {
+        Display display = getSite().getShell().getDisplay(); 
+        
+        final VirtualTreeModelViewer virtualViewer = new VirtualTreeModelViewer(
+            display, 0, ((ITreeModelViewer)getViewer()).getPresentationContext());
+        
+        virtualViewer.setAutoExpandLevel(-1);
+        virtualViewer.addViewerUpdateListener(new IViewerUpdateListener() {
+            public void viewerUpdatesComplete() {
+            	ModelDelta stateDelta = new ModelDelta(virtualViewer.getInput(), IModelDelta.NO_CHANGE);
+                virtualViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND);
+                ITreeModelViewer treeModelViewer = ((ITreeModelViewer) getViewer());
+                if (treeModelViewer != null) {
+                    ((ITreeModelViewer) getViewer()).updateViewer(stateDelta);
+                }
+                virtualViewer.dispose();
+            }
+            public void viewerUpdatesBegin() {}
+            public void updateStarted(IViewerUpdate update) {}
+            public void updateComplete(IViewerUpdate update) {}
+        });
+        virtualViewer.setInput(getViewer().getInput());
 	}
 	
+	
 	/**
-	 * returns the complete listing of breakpoints organizers
-	 * @return the complete listing of breakpoint organizers
+	 * Returns the breakpoint organizers for this view.
+	 * 
+	 * @return the breakpoint organizers.
 	 */
 	public IBreakpointOrganizer[] getBreakpointOrganizers() {
-		return fContentProvider.getOrganizers();
+		return fOrganizers;
 	}
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPerspectiveListener2#perspectiveChanged(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor, org.eclipse.ui.IWorkbenchPartReference, java.lang.String)
-     */
-    public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, IWorkbenchPartReference partRef, String changeId) {
-		if (partRef instanceof IViewReference && changeId.equals(IWorkbenchPage.CHANGE_VIEW_HIDE)) {
-			String id = ((IViewReference) partRef).getId();
-			if (id.equals(getViewSite().getId())) {
-				// BreakpointsView closed. Persist settings.
-				fgMemento= XMLMemento.createWriteRoot("BreakpointsViewMemento"); //$NON-NLS-1$
-				saveState(fgMemento);
-			}
-		}
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPerspectiveListener#perspectiveActivated(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor)
-     */
-    public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPerspectiveListener#perspectiveChanged(org.eclipse.ui.IWorkbenchPage, org.eclipse.ui.IPerspectiveDescriptor, java.lang.String)
-     */
-    public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.debug.ui.IDebugView#getPresentation(java.lang.String)
-     */
-    public IDebugModelPresentation getPresentation(String id) {
-        if (getViewer() instanceof StructuredViewer) {
-            IBaseLabelProvider lp = ((StructuredViewer)getViewer()).getLabelProvider();
-            if (lp instanceof BreakpointsLabelProvider) {
-                BreakpointsLabelProvider blp = (BreakpointsLabelProvider) lp;
-                lp = blp.getPresentation();
-            }
-            if (lp instanceof DelegatingModelPresentation) {
-                return ((DelegatingModelPresentation)lp).getPresentation(id);
-            }
-            if (lp instanceof LazyModelPresentation) {
-                if (((LazyModelPresentation)lp).getDebugModelIdentifier().equals(id)) {
-                    return (IDebugModelPresentation)lp;
-                }
-            }
-        }
-        return null;
-    }
-    
-    /**
-	 * This method is used solely to preserve the selection state of the viewer in the event that the current selection is to be removed
-	 * @param selection the selection to be removed
-	 * 
-	 * @since 3.3
-	 */
-	public void preserveSelection(IStructuredSelection selection) {
-		if(selection != null && !selection.isEmpty()) {
-	    	TreeItem item = (TreeItem) ((BreakpointsViewer)getCheckboxViewer()).searchItem(selection.getFirstElement());
-	    	Object toselect = null;
-	    	if(item != null) {
-	    		TreeItem parent = item.getParentItem();
-	    		if(parent != null) {
-	    			int idx = 0;
-	    			if(parent.getItemCount() == 1) {
-	    				toselect = parent.getData();
-	    			}
-	    			idx = parent.indexOf(item);
-	    			if(idx == 0) {
-	    				if(parent.getItemCount() > 1) {
-	    					toselect = parent.getItem(1).getData();
-	    				}
-	    				else {
-	    					toselect = parent.getItem(0).getData();
-	    				}
-	    			}
-	    			if(idx > 0) {
-	    				toselect = parent.getItem(idx-1).getData();
-	    			}
-	    		}
-	    		else {
-	    			Tree tree = item.getParent();
-	    			TreeItem[] items = tree.getItems();
-	    			if (items.length > 1){
-		    			for(int i = 0; i < items.length; i++) {
-		    				if(item.equals(items[i])) {
-		    					if(i+1 >= items.length){
-		    						toselect = items[i-1].getData();
-		    						break;
-		    					} else {
-		    						toselect = items[i+1].getData();
-		    						break;
-		    					}
-		    					
-		    				}
-		    			}
-	    			}
-	    		}
-	    	}
-	    	if(toselect != null) {
-	    		getViewer().setSelection(new StructuredSelection(toselect), true);
-	    	}
-		}
-    }
-    
-    /**
+	
+	/**
      * Returns whether the given selection can be pasted into the given target.
      * <p>
      * Scheme:
@@ -711,81 +539,267 @@ public class BreakpointsView extends AbstractDebugView implements ISelectionList
      * @param selection the selection to paste
      * @return whether the given selection can be pasted into the given target
      * 
-     * TODO Remove in favour of using <code>TreeItem</code>s and <code>TreePath</code>s to determine paste targets
+     * TODO Remove in favor of using <code>TreeItem</code>s and <code>TreePath</code>s to determine paste targets
      */
     public boolean canPaste(Object target, ISelection selection) {
-    	if(!(target instanceof BreakpointContainer)) {
+    	if(!(target instanceof IBreakpointContainer) || !(selection instanceof IStructuredSelection)) {
     		return false;
     	}
-    	if(selection.isEmpty()) {
+    	if(selection == null || selection.isEmpty()) {
     		return false;
     	}
     	IStructuredSelection ss = (IStructuredSelection) selection;
-    	BreakpointContainer container = (BreakpointContainer) target;
-    	IBreakpoint breakpoint = null;
-    	Object element = null;
+    	IBreakpointContainer container = (IBreakpointContainer) target;
     	for(Iterator iter = ss.iterator(); iter.hasNext();) {
-    		element = iter.next();
-    		if(!(element instanceof IBreakpoint)) {
-    			return false;
-    		}
-    		breakpoint = (IBreakpoint) element;
-    		if (container.contains(breakpoint) || !container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
+    		IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(iter.next(), IBreakpoint.class);
+    		if (breakpoint == null || container.contains(breakpoint) || !container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
                 return false;
             }
     	}
         return true;
-    }
+    }   
 	
-    /**
+    /** 
      * Pastes the selection into the given target
      * 
-     * @param target target of the paste, either a BreakpointContainer,
-     * or a Breakpoint within a BreakpointContainer
+     * @param target target of the paste, either a IBreakpointContainer,
+     * or a Breakpoint within a IBreakpointContainer
      * @param selection breakpoints
      * @return whether successful
      * 
-     * TODO remove in favour of using <code>TreeItem</code> as paste target
+     * TODO remove in favor of using <code>TreeItem</code> as paste target 
      */
     public boolean performPaste(Object target, ISelection selection) {
-        if (target instanceof BreakpointContainer && selection instanceof IStructuredSelection) {
-            BreakpointContainer container = (BreakpointContainer) target;
+        if (target instanceof IBreakpointContainer && selection instanceof IStructuredSelection) {
+            IBreakpointContainer container = (IBreakpointContainer) target;            
             Object[] objects = ((IStructuredSelection)selection).toArray();
             for (int i = 0; i < objects.length; i++) {
-                container.getOrganizer().addBreakpoint((IBreakpoint)objects[i], container.getCategory());
+                IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(objects[i], IBreakpoint.class);
+                if (breakpoint != null) {
+                    container.getOrganizer().addBreakpoint(breakpoint, container.getCategory());
+                }
             }
             return true;
         }
         return false;
     }
     
-    /**
-     * Returns if the breakpoints view is currently showing groups or not
-     * @return true of the breakpoints view showing groups, false otherwise
+	/**
+     * Returns the container from within the specified path that is the container the breakpoint can be removed from
+     * @param breakpoint the breakpoint to get the container for
+     * @return the first found container that includes the breakpoint that allows removal, or <code>null</code> if none found
+     * @since 3.3
      */
-    public boolean isShowingGroups() {
-        return fContentProvider.isShowingGroups();
+    public IBreakpointContainer getRemovableContainer(TreePath path) {
+    	if (path != null) {
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(path.getLastSegment(), IBreakpoint.class);
+        	if (breakpoint != null) {
+		    	IBreakpointContainer container = null;
+		    	for(int i = path.getSegmentCount()-2; i > -1; i--) {
+		    	    Object segment = path.getSegment(i); 
+		    	    if (segment instanceof IBreakpointContainer) {
+    		    		container = (IBreakpointContainer) segment;
+    		    		if(container.contains(breakpoint) && 
+    		    			container.getOrganizer() != null && 
+    		    			container.getOrganizer().canRemove(breakpoint, container.getCategory())) {
+    		    			return container;
+    		    		}
+		    	    }
+		    	}
+        	}
+    	}
+    	return null;
     }
 
+    /**
+     * Returns the addable breakpoint container of the specified tree path
+     * @param breakpoint the breakpoint to get the container for
+     * @return the first found addable container for the specified tree path or <code>null</code> if none found
+     * @since 3.3
+     */
+    protected IBreakpointContainer getAddableContainer(TreePath path) {
+    	if (path != null) {
+	    	Object element = path.getLastSegment();
+	    	if (element instanceof IBreakpointContainer) {
+	    		return (IBreakpointContainer)element;
+	    	}
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(element, IBreakpoint.class);
+	    	if (breakpoint != null) {
+		    	IBreakpointContainer container = null;
+		    	for (int i = path.getSegmentCount()-2; i > -1; i--) {
+                    Object segment = path.getSegment(i); 
+                    if (segment instanceof IBreakpointContainer) {
+                        container = (IBreakpointContainer) segment;
+    		    		if (container.contains(breakpoint) && container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
+    		    			return container;
+    		    		}
+                    }
+		    	}
+	    	}
+    	}
+    	return null;
+    }
 	/**
-	 * @see org.eclipse.ui.part.PageBookView#partActivated(org.eclipse.ui.IWorkbenchPart)
+	 * This method is used to determine if there is an addable parent container available for the specified drop target.
+	 * <p>
+	 * A drop target can be either a <code>IBreakpointContainer</code> or an <code>IBreakpoint</code>. This method always checks the entire heirarchy
+	 * of the tree path for the specified target in the event one of the parent element does not support dropping. 
+	 * </p>
+	 * @param target
+	 * @param breakpoint
+	 * @return
 	 */
-	public void partActivated(IWorkbenchPart part) {
-		if (part.equals(this)) {
-			IContextService contextService = (IContextService)getSite().getService(IContextService.class);
-			fActivatedContext = contextService.activateContext(IDebugUIConstants.ID_BREAKPOINT_VIEW);
+	private boolean checkAddableParentContainers(TreePath path, IBreakpoint breakpoint) {
+		if (path != null) {
+			Object element = null;
+			for (int i = path.getSegmentCount()-1; i > -1; i--) {
+				element = path.getSegment(i);
+				if (element instanceof IBreakpointContainer) {
+					IBreakpointContainer container = (IBreakpointContainer) element;
+					if (container.contains(breakpoint) || !container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
+		    			return false;
+		    		}
+				}
+			}
 		}
-		super.partActivated(part);
+		return true;
 	}
+	
+    /**
+     * Returns if the selected item in the tree can be dragged
+     * <p>
+     * Scheme:
+     * <ul>
+     * <li>breakpoint containers cannot be dragged</li>
+     * <li>breakpoints can be dragged iff the container they reside in supports the removal of breakpoints</li>
+     * </ul>
+     * </p>
+     * @param element the element to test if it can be dragged
+     * @return true if the selected element can be dragged, false otherwise
+     * @since 3.3
+     */
+    boolean canDrag(TreePath[] items) {
+    	if(items == null) {
+    		return false;
+    	}
+    	if (items.length == 0) {
+    		return false;
+    	}
+    	for (int i = 0; i < items.length; i++) {
+    		if (getRemovableContainer(items[i]) == null) {
+    			return false;
+    		}
+    	}
+    	return true;
+    }
+    
+    /**
+     * Performs the actual removal of breakpoints from their respective (removable) containers on a successful drag operation
+     * @param selection the selection of breakpoints involved in the drag
+     * @since 3.3
+     */
+    void performDrag(TreePath[] paths) {
+    	if (paths == null) {
+    		return;
+    	}
 
+    	Map containersToBreakpoints = new HashMap();
+    	for (int i = 0; i < paths.length; i++) {
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(paths[i].getLastSegment(), IBreakpoint.class);
+    		if (breakpoint != null) {
+	    		IBreakpointContainer container = getRemovableContainer(paths[i]);
+	    		if(container != null) {
+	    			List list = (List) containersToBreakpoints.get(container);
+	    			if (list == null) {
+	    				list = new ArrayList();
+	    				containersToBreakpoints.put(container, list);
+	    			}
+	    			list.add(breakpoint);
+	    		}
+    		}
+    	}
+    	Iterator iterator = containersToBreakpoints.entrySet().iterator();
+    	while (iterator.hasNext()) {
+    		Entry entry = (Entry) iterator.next();
+    		IBreakpointContainer container = (IBreakpointContainer) entry.getKey();
+    		List list = (List) entry.getValue();
+    		IBreakpointOrganizer organizer = container.getOrganizer();
+    		IBreakpoint[] breakpoints = (IBreakpoint[]) list.toArray(new IBreakpoint[list.size()]);
+    		if (organizer instanceof IBreakpointOrganizerDelegateExtension) {
+				IBreakpointOrganizerDelegateExtension extension = (IBreakpointOrganizerDelegateExtension) organizer;
+				extension.removeBreakpoints(breakpoints, container.getCategory());
+			} else {
+				for (int i = 0; i < breakpoints.length; i++) {
+					organizer.removeBreakpoint(breakpoints[i], container.getCategory());
+				}
+			}
+    	}
+    }	
+    
 	/**
-	 * @see org.eclipse.ui.part.PageBookView#partDeactivated(org.eclipse.ui.IWorkbenchPart)
-	 */
-	public void partDeactivated(IWorkbenchPart part) {
-		if (part.equals(this)) {
-			IContextService contextService = (IContextService)getSite().getService(IContextService.class);
-		    contextService.deactivateContext(fActivatedContext);
+     * Performs the actual addition of the selected breakpoints to the specified target
+     * @param target the target to add the selection of breakpoints to
+     * @param selection the selection of breakpoints
+     * @return true if the drop occurred, false otherwise
+     * @since 3.3
+     */
+    protected boolean performDrop(TreePath target, ITreeSelection selection) {
+		if(target == null || selection == null) {
+    		return false;
+    	}
+    	IBreakpointContainer container = getAddableContainer(target);
+    	if (container == null) {
+			return false;
 		}
-		super.partDeactivated(part);
-	}
+    	
+    	IBreakpointOrganizer organizer = container.getOrganizer();
+        List breakpoints = new ArrayList(selection.size());
+        for (Iterator iter = selection.iterator(); iter.hasNext();) {
+            IBreakpoint breakpoint = (IBreakpoint) DebugPlugin.getAdapter(iter.next(), IBreakpoint.class);
+            if (breakpoint != null) {
+                breakpoints.add(breakpoint);
+            }
+        }
+    	if (organizer instanceof IBreakpointOrganizerDelegateExtension) {
+    		IBreakpointOrganizerDelegateExtension extension = (IBreakpointOrganizerDelegateExtension) organizer;
+    		extension.addBreakpoints(
+    		    (IBreakpoint[])breakpoints.toArray(new IBreakpoint[breakpoints.size()]), 
+    		    container.getCategory());
+    	} else {
+	    	for (int i = 0; i < breakpoints.size(); i++) {
+	    	    organizer.addBreakpoint((IBreakpoint)breakpoints.get(i), container.getCategory());
+	    	}
+    	}
+    	// TODO expandToLevel(target.getData(), ALL_LEVELS);
+    	
+    	return true;
+    }
+
+    /**
+     * Determines if the specified element can be dropped into the specified target
+     * <p>
+     * Scheme:
+     * <ul>
+     * <li>Breakpoints can be dropped into working sets</li>
+     * <li>Breakpoints can be dropped into breakpoints, provided there is a drop-able parent of the target breakpoint</li>
+     * </ul>
+     * </p>
+     * @param target the target for the drop
+     * @param element the element we want to drop
+     * @return true if the specified element can be dropped into the specified target, false otherwise
+     * @since 3.3
+     */
+    boolean canDrop(TreePath target, ITreeSelection selection) {
+    	if (selection == null  || target == null) {
+    		return false;
+    	}
+    	for(Iterator iter = selection.iterator(); iter.hasNext();) {
+            IBreakpoint breakpoint = (IBreakpoint)DebugPlugin.getAdapter(iter.next(), IBreakpoint.class);
+
+    		if (breakpoint == null || !checkAddableParentContainers(target, breakpoint)){
+    			return false;
+    		}
+    	}
+    	return true;
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewEventHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewEventHandler.java
deleted file mode 100644
index 300bc1a..0000000
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewEventHandler.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak - bug 57999
- *     Michael Fraenkel - bug 84385
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IMarkerDelta;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.IBreakpointManagerListener;
-import org.eclipse.debug.core.IBreakpointsListener;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.activities.ActivityManagerEvent;
-import org.eclipse.ui.activities.IActivityManagerListener;
-import org.eclipse.ui.activities.IWorkbenchActivitySupport;
-
-/**
- * Handles breakpoint events and activity manager events (which can affect grouping),
- * updating the breakpoints view and viewer.
- */
-public class BreakpointsViewEventHandler implements IBreakpointsListener, IActivityManagerListener, IBreakpointManagerListener {
-
-	private BreakpointsView fView;
-
-	/**
-	 * Constructs an event handler for the breakpoints view.
-	 */
-	public BreakpointsViewEventHandler(BreakpointsView view) {
-		fView= view;
-		IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
-		breakpointManager.addBreakpointListener(this);
-		breakpointManager.addBreakpointManagerListener(this);
-		IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
-		if (activitySupport != null) {
-			activitySupport.getActivityManager().addActivityManagerListener(this);
-		}
-	}
-	
-	/**
-	 * When this event handler is disposed, remove it as a listener.
-	 */
-	public void dispose() {
-		IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
-		breakpointManager.removeBreakpointListener(this);
-		breakpointManager.removeBreakpointManagerListener(this);
-		IWorkbenchActivitySupport activitySupport = PlatformUI.getWorkbench().getActivitySupport();
-		if (activitySupport != null) {
-			activitySupport.getActivityManager().removeActivityManagerListener(this);
-		}
-	}
-
-	/**
-	 * @see IBreakpointsListener#breakpointsAdded(IBreakpoint[])
-	 */
-	public void breakpointsAdded(final IBreakpoint[] breakpoints) {
-		if (fView.isAvailable() && fView.isVisible()) {		
-			fView.asyncExec(new Runnable() {
-				public void run() {
-					if (fView.isAvailable()) {
-						CheckboxTreeViewer viewer = fView.getCheckboxViewer();
-                        viewer.getControl().setRedraw(false);
-                        BreakpointsContentProvider provider = (BreakpointsContentProvider)viewer.getContentProvider();
-                        provider.reorganize();
-                        
-						// This code is left in as a test case for platform bug 77075
-						//for (int i = 0; i < breakpoints.length; i++) { 
-							//viewer.expandToLevel(breakpoints[i], AbstractTreeViewer.ALL_LEVELS);
-						//}
-                        // expand as required
-                        for (int i = 0; i < breakpoints.length; i++) {
-                            IBreakpoint breakpoint = breakpoints[i];
-                            BreakpointContainer[] roots = provider.getRoots(breakpoint);
-                            if (roots != null) {
-                                for (int j = 0; j < roots.length; j++) {
-                                    viewer.expandToLevel(roots[j], AbstractTreeViewer.ALL_LEVELS);
-                                }
-                            }
-                        }
-                        fView.getViewer().refresh();
-                        viewer.setSelection(new StructuredSelection(breakpoints));
-                        viewer.getControl().setRedraw(true);
-						fView.updateObjects();
-					}
-				}
-			});
-		}
-	}
-
-	/**
-	 * @see IBreakpointsListener#breakpointsRemoved(IBreakpoint[], IMarkerDelta[])
-	 */
-	public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
-		if (fView.isAvailable() && fView.isVisible()) {
-			fView.asyncExec(new Runnable() {
-				public void run() {
-					if (fView.isAvailable()) {
-						CheckboxTreeViewer viewer= (CheckboxTreeViewer)fView.getViewer();
-                        viewer.getControl().setRedraw(false);
-                        ((BreakpointsContentProvider)viewer.getContentProvider()).reorganize();
-                        viewer.getControl().setRedraw(true);
-						fView.updateObjects();
-					}
-				}
-			});
-		}
-	}
-
-	/**
-	 * @see IBreakpointsListener#breakpointsChanged(IBreakpoint[], IMarkerDelta[])
-	 */
-	public void breakpointsChanged(final IBreakpoint[] breakpoints, final IMarkerDelta[] deltas) {
-		if (fView.isAvailable() & fView.isVisible()) {
-			fView.asyncExec(new Runnable() {
-				public void run() {
-					if (fView.isAvailable()) {
-						CheckboxTreeViewer viewer = (CheckboxTreeViewer)fView.getViewer();
-                        viewer.getControl().setRedraw(false);
-                        BreakpointsContentProvider provider = (BreakpointsContentProvider) viewer.getContentProvider();
-                        Set updates = new HashSet();
-						for (int i = 0; i < breakpoints.length; i++) {
-							IBreakpoint breakpoint = breakpoints[i];
-                            viewer.update(breakpoint, null);
-                            BreakpointContainer[] containers = provider.getContainers(breakpoint);
-                            if (containers != null) {
-                                for (int j = 0; j < containers.length; j++ ) {
-                                    updates.add(containers[j]);
-                                }
-                            } else {
-                            	updates.add(breakpoint);
-                            }
-						}
-                        Object[] objects = updates.toArray();
-                        for (int i = 0; i < objects.length; i++) {
-                            fView.updateCheckedState(objects[i]);
-                        }
-                        viewer.getControl().setRedraw(true);
-						fView.updateObjects();
-					}
-				}
-			});
-		}
-	}
-
-	/**
-	 * When new activities are added or enabled, refresh the view contents to add/remove
-	 * breakpoints related to the affected activities.
-	 */
-	public void activityManagerChanged(final ActivityManagerEvent activityManagerEvent) {
-		if (fView.isAvailable() & fView.isVisible() && activityManagerEvent.haveEnabledActivityIdsChanged()) {
-			fView.asyncExec(new Runnable() {
-				public void run() {
-					fView.getViewer().refresh();
-				}
-			});
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IBreakpointManagerListener#breakpointManagerEnablementChanged(boolean)
-	 */
-	public void breakpointManagerEnablementChanged(boolean enabled) {
-		if (fView.isAvailable() & fView.isVisible()) {
-			fView.asyncExec(new Runnable() {
-				public void run() {
-					fView.getViewer().refresh();
-				}
-			});
-		}		
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
index 97604e2..5445a47 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.breakpoints;
 
@@ -22,6 +23,8 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointManager;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointOrganizer;
 import org.eclipse.debug.ui.IBreakpointOrganizerDelegateExtension;
 import org.eclipse.jface.viewers.CheckboxTreeViewer;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -129,7 +132,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
      * @return the first found container that includes the breakpoint that allows removal, or <code>null</code> if none found
      * @since 3.3
      */
-    public BreakpointContainer getRemovableContainer(Item item) {
+    public IBreakpointContainer getRemovableContainer(Item item) {
     	if(item == null) {
     		return null;
     	}
@@ -137,9 +140,9 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
 	    	TreePath path = getTreePathFromItem(item);
 	    	if(path != null) {
 		    	IBreakpoint breakpoint = (IBreakpoint) path.getLastSegment();
-		    	BreakpointContainer container = null;
+		    	IBreakpointContainer container = null;
 		    	for(int i = path.getSegmentCount()-2; i > -1; i--) {
-		    		container = (BreakpointContainer) path.getSegment(i);
+		    		container = (IBreakpointContainer) path.getSegment(i);
 		    		if(container.contains(breakpoint) && container.getOrganizer().canRemove(breakpoint, container.getCategory())) {
 		    			return container;
 		    		}
@@ -155,15 +158,15 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
      * @return the first found addable container for the specified breakpoint or <code>null</code> if none found
      * @since 3.3
      */
-    public BreakpointContainer getAddableContainer(Item item) {
+    public IBreakpointContainer getAddableContainer(Item item) {
     	TreePath path = getTreePathFromItem(item);
     	if(path != null) {
 	    	Object element = path.getLastSegment();
 	    	if(element instanceof IBreakpoint) {
-		    	BreakpointContainer container = null;
+		    	IBreakpointContainer container = null;
 		    	IBreakpoint breakpoint = (IBreakpoint) element;
 		    	for(int i = path.getSegmentCount()-2; i > -1; i--) {
-		    		container = (BreakpointContainer) path.getSegment(i);
+		    		container = (IBreakpointContainer) path.getSegment(i);
 		    		if(container.contains(breakpoint) && container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
 		    			return container;
 		    		}
@@ -211,7 +214,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
     		return;
     	}
     	Map containersToBreakpoints = new HashMap();
-		BreakpointContainer container = null;
+		IBreakpointContainer container = null;
     	IBreakpoint breakpoint = null;
     	for(int i = 0; i < items.length; i++) {
     		if(!items[i].isDisposed()) {
@@ -230,7 +233,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
     	Iterator iterator = containersToBreakpoints.entrySet().iterator();
     	while (iterator.hasNext()) {
     		Entry entry = (Entry) iterator.next();
-    		container = (BreakpointContainer) entry.getKey();
+    		container = (IBreakpointContainer) entry.getKey();
     		List list = (List) entry.getValue();
     		IBreakpointOrganizer organizer = container.getOrganizer();
     		IBreakpoint[] breakpoints = (IBreakpoint[]) list.toArray(new IBreakpoint[list.size()]);
@@ -283,14 +286,14 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
 	 * @return
 	 */
 	private boolean checkAddableParentContainers(Item target, IBreakpoint breakpoint) {
-		BreakpointContainer container = null;
+		IBreakpointContainer container = null;
 		TreePath path = getTreePathFromItem(target);
 		if(path != null) {
 			Object element = null;
 			for(int i = path.getSegmentCount()-1; i > -1; i--) {
 				element = path.getSegment(i);
-				if(element instanceof BreakpointContainer) {
-					container = (BreakpointContainer) element;
+				if(element instanceof IBreakpointContainer) {
+					container = (IBreakpointContainer) element;
 					if(container.contains(breakpoint) || !container.getOrganizer().canAdd(breakpoint, container.getCategory())) {
 		    			return false;
 		    		}
@@ -313,7 +316,7 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
     	}
     	IBreakpoint breakpoint = null;
     	Object element = target.getData();
-    	BreakpointContainer container = (element instanceof BreakpointContainer ? (BreakpointContainer)element : getAddableContainer(target));
+    	IBreakpointContainer container = (element instanceof IBreakpointContainer ? (IBreakpointContainer)element : getAddableContainer(target));
     	if(container == null) {
 			return false;
 		}
@@ -411,8 +414,8 @@ public class BreakpointsViewer extends CheckboxTreeViewer {
             } catch (CoreException e) {
                 DebugUIPlugin.log(e);
             }
-        } else if (element instanceof BreakpointContainer) {
-            IBreakpoint[] breakpoints = ((BreakpointContainer) element).getBreakpoints();
+        } else if (element instanceof IBreakpointContainer) {
+            IBreakpoint[] breakpoints = ((IBreakpointContainer) element).getBreakpoints();
             int enabledChildren= 0;
             for (int i = 0; i < breakpoints.length; i++) {
                 IBreakpoint breakpoint = breakpoints[i];
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java
new file mode 100644
index 0000000..20d10f0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/ElementComparator.java
@@ -0,0 +1,174 @@
+/*****************************************************************
+ * Copyright (c) 2009, 2010 Texas Instruments and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
+ *     Pawel Piech (Windriver) - Ongoing bug fixes and enhancements (Bug 311457)
+ *****************************************************************/
+package org.eclipse.debug.internal.ui.views.breakpoints;
+
+import java.util.Comparator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.ILineBreakpoint;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext;
+
+/**
+ * Breakpoint element comparator.
+ * 
+ * @since 3.6
+ */
+public class ElementComparator implements Comparator {
+	final private static String SPACE = " "; //$NON-NLS-1$
+	
+	protected DebugModelPresentationContext fContext;
+	
+	public ElementComparator(IPresentationContext context) {
+		if (context instanceof DebugModelPresentationContext)
+			fContext = (DebugModelPresentationContext) context;
+	}
+	
+	
+	/* (non-Javadoc)
+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+	 */
+	public int compare(Object arg0, Object arg1) {
+        IBreakpoint bp0 = (IBreakpoint)DebugPlugin.getAdapter(arg0, IBreakpoint.class);            
+        IBreakpoint bp1 = (IBreakpoint)DebugPlugin.getAdapter(arg1, IBreakpoint.class);            
+	    if (bp0 != null && bp1 != null) {
+			return compare(bp0, bp1);
+		} else if (arg0 instanceof IBreakpointContainer && arg1 instanceof IBreakpointContainer) {
+			return compare((IBreakpointContainer) arg0, (IBreakpointContainer) arg1);
+		} else {		
+			return -1; // just return -1 if the two objects are not IBreakpoint type
+		}
+	}
+    
+	/**
+	 * Compares two breakpoint containers.
+	 * 
+	 * @param c1
+	 * @param c2
+	 * @return
+	 */
+	private int compare(IBreakpointContainer c1, IBreakpointContainer c2) {
+	    // The "Other" breakpoint category should be listed last.
+	    // (Bug 311457).
+	    if (c1.getCategory() instanceof OtherBreakpointCategory) {
+            if (c2.getCategory() instanceof OtherBreakpointCategory) {
+                return 0;
+            }
+	        return 1;
+	    } else if (c2.getCategory() instanceof OtherBreakpointCategory) {
+	        return -1;
+	    }
+	    
+	    // Rest of categories should be listed alphabetically.
+		if (fContext != null) {
+			String name1 = fContext.getModelPresentation().getText(c1);
+			String name2 = fContext.getModelPresentation().getText(c2);
+			
+			return name1.compareTo(name2);
+		}
+		
+		return -1;
+	}	
+	
+	/**
+	 * Compares two breakpoints.
+	 * 
+	 * @param b1
+	 * @param b2
+	 * @return
+	 */
+	private int compare(IBreakpoint b1, IBreakpoint b2) {
+		String text1 = IInternalDebugCoreConstants.EMPTY_STRING;
+		String text2 = IInternalDebugCoreConstants.EMPTY_STRING;
+		
+		text1 += b1.getModelIdentifier();
+		text2 += b2.getModelIdentifier();
+		
+		IMarker marker1 = b1.getMarker();
+		IMarker marker2 = b2.getMarker();
+		try {		
+			if (marker1.exists() && marker2.exists()) {
+				text1 += SPACE + marker1.getType();
+				text2 += SPACE + marker2.getType();
+			}
+		} catch (CoreException e) {
+			DebugUIPlugin.log(e);
+		}
+	
+		int result = text1.compareTo(text2);
+		if (result != 0) {
+			return result;
+		}
+	
+		// model and type are the same	
+		if (fContext != null) {
+			String name1 = fContext.getModelPresentation().getText(b1);
+			String name2 = fContext.getModelPresentation().getText(b2);
+	
+			boolean lineBreakpoint = false;
+			try {
+				lineBreakpoint = marker1.isSubtypeOf(IBreakpoint.LINE_BREAKPOINT_MARKER);
+			} catch (CoreException ce) {
+			}
+			if (lineBreakpoint) {
+				return compareLineBreakpoints(b1, b2, name1,name2);
+			} 
+			
+			return name1.compareTo(name2);
+		}
+		
+		return result;
+	}
+	
+	/**
+	 * Compares two line breakpoints.
+	 * 
+	 * @param b1
+	 * @param b2
+	 * @param name1
+	 * @param name2
+	 * @return
+	 */
+	private int compareLineBreakpoints(IBreakpoint b1, IBreakpoint b2, String name1, String name2) {
+		int colon1 = name1.indexOf(':');
+		if (colon1 != -1) {
+			int colon2 = name2.indexOf(':');
+			if (colon2 != -1) {
+				String upToColon1 = name1.substring(0, colon1);
+				if (name2.startsWith(upToColon1)) {
+					int l1 = 0;
+					int l2 = 0;
+					try {
+						l1 = ((ILineBreakpoint)b1).getLineNumber();	
+					} catch (CoreException e) {
+						DebugUIPlugin.log(e);
+					}
+					try {
+						l2 = ((ILineBreakpoint)b2).getLineNumber();	
+					} catch (CoreException e) {
+						DebugUIPlugin.log(e);
+					}
+					return l1 - l2;
+				}
+			}
+		}
+		return name1.compareTo(name2);
+	}     
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizer.java
deleted file mode 100644
index eefe1f7..0000000
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/IBreakpointOrganizer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-import org.eclipse.debug.ui.IBreakpointOrganizerDelegate;
-import org.eclipse.jface.resource.ImageDescriptor;
-
-/**
- * A breakpoint organizer is used to categorize breakpoints and provides
- * change notification when categorization has changed. Breakpoint organizers
- * are contributed via the <code>breakpointOrganizers</code> extension point.
- * <p>
- * This interface is not intended to be implemented. Clients contributing a breakpoint
- * organizer are intended to implement <code>IBreakpointOrganizerDelegate</code>.
- * </p>
- * @since 3.1
- */
-public interface IBreakpointOrganizer extends IBreakpointOrganizerDelegate {
-    
-    /**
-     * Returns a label for this breakpoint organizer.
-     * 
-     * @return a label for this breakpoint organizer
-     */
-    public String getLabel();
-    
-    /**
-     * Returns an image descriptor for this breakpoint organizer or <code>null</code>.
-     * 
-     * @return an image descriptor for this breakpoint organizer or <code>null</code>
-     */
-    public ImageDescriptor getImageDescriptor();
-    
-    /**
-     * Returns a unique identifier for this breakpoint organizer.
-     * 
-     * @return a unique identifier for this breakpoint organizer
-     */
-    public String getIdentifier();
-    
-    /**
-     * Returns the label for breakpoints that do not fall into a category
-     * for this organizer.
-     * 
-     * @return label for breakpoints that do not fall into a category
-     * for this organizer
-     */
-    public String getOthersLabel();
-
-}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/OtherBreakpointCategory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/OtherBreakpointCategory.java
deleted file mode 100644
index 388bb54..0000000
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/OtherBreakpointCategory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.views.breakpoints;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-/**
- * Category for breakpoints in "other" categories.
- */
-public class OtherBreakpointCategory extends PlatformObject implements IWorkbenchAdapter {
-    
-    private static Map fOthers = new HashMap();
-    private IBreakpointOrganizer fOrganizer;
-    
-    
-    public static IAdaptable[] getCategories(IBreakpointOrganizer organizer) {
-        IAdaptable[] others = (IAdaptable[]) fOthers.get(organizer);
-        if (others == null) {
-            others = new IAdaptable[]{new OtherBreakpointCategory(organizer)};
-            fOthers.put(organizer, others);
-        }
-        return others;
-    }
-    
-    /**
-     * Constructs an 'other' category for the given organizer.
-     * 
-     * @param organizer breakpoint organizer
-     */
-    private OtherBreakpointCategory(IBreakpointOrganizer organizer) {
-        fOrganizer = organizer;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
-     */
-    public Object[] getChildren(Object o) {
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
-     */
-    public ImageDescriptor getImageDescriptor(Object object) {
-        return DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_VIEW_BREAKPOINTS);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-     */
-    public String getLabel(Object o) {
-        return fOrganizer.getOthersLabel();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
-     */
-    public Object getParent(Object o) {
-        return null;
-    }
-    
-    /* (non-Javadoc)
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    public boolean equals(Object obj) {
-        if (obj instanceof OtherBreakpointCategory) {
-            OtherBreakpointCategory category = (OtherBreakpointCategory) obj;
-            return fOrganizer.equals(category.fOrganizer);
-        }
-        return false;
-    }
-    
-    /* (non-Javadoc)
-     * @see java.lang.Object#hashCode()
-     */
-    public int hashCode() {
-        return fOrganizer.hashCode();
-    }    
-}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java
index 99293d4..79519b1 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/WorkingSetCategory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,5 +133,9 @@ public class WorkingSetCategory extends PlatformObject implements IWorkbenchAdap
     private boolean isDefault() {
         return fWorkingSet.equals(BreakpointSetOrganizer.getDefaultWorkingSet());
     }
+    
+    public String toString() {
+        return fWorkingSet.getName();
+    }
 }
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
index 6c8a5e3..03baa2a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
@@ -79,6 +79,7 @@ import org.eclipse.ui.console.PatternMatchEvent;
 import org.eclipse.ui.console.TextConsole;
 import org.eclipse.ui.editors.text.EditorsUI;
 import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.progress.UIJob;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -134,7 +135,7 @@ public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSe
             }
         }
 
-        if (file != null) {
+        if (file != null && configuration != null) {
             IWorkspace workspace = ResourcesPlugin.getWorkspace();
             IWorkspaceRoot root = workspace.getRoot();
             Path path = new Path(file);
@@ -450,13 +451,15 @@ public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSe
         final String newName = computeName();
         String name = getName();
         if (!name.equals(newName)) {
-            Runnable r = new Runnable() {
-                public void run() {
-                    setName(newName);
-                    warnOfContentChange();
-                }
-            };
-            DebugUIPlugin.getStandardDisplay().asyncExec(r);
+        	UIJob job = new UIJob("Update console title") { //$NON-NLS-1$
+				public IStatus runInUIThread(IProgressMonitor monitor) {
+					 ProcessConsole.this.setName(newName);
+	                 warnOfContentChange();
+	                 return Status.OK_STATUS;
+				}
+			};
+			job.setSystem(true);
+			job.schedule();
         }
     }
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
index 0b6db0e..bcf9c86 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.debug.internal.ui.views.expression;
 
  
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IExpressionManager;
 import org.eclipse.debug.core.ILaunch;
@@ -21,6 +22,7 @@ import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IWatchExpression;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.actions.expressions.PasteWatchExpressionsAction;
+import org.eclipse.debug.internal.ui.actions.variables.ChangeVariableValueAction;
 import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
@@ -37,7 +39,7 @@ import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.TextTransfer;
@@ -45,8 +47,8 @@ import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
  
 /**
  * Displays expressions and their values with a detail
@@ -54,6 +56,8 @@ import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
  */
 public class ExpressionView extends VariablesView {
 	
+    private PasteWatchExpressionsAction fPasteAction;
+    
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getHelpContextId()
 	 */
@@ -77,7 +81,10 @@ public class ExpressionView extends VariablesView {
 		menu.add(new Separator(IDebugUIConstants.EMPTY_EXPRESSION_GROUP));
 		menu.add(new Separator(IDebugUIConstants.EXPRESSION_GROUP));
 		menu.add(getAction(VARIABLES_FIND_ELEMENT_ACTION));
-		menu.add(getAction("ChangeVariableValue")); //$NON-NLS-1$
+        ChangeVariableValueAction changeValueAction = (ChangeVariableValueAction)getAction("ChangeVariableValue"); //$NON-NLS-1$
+        if (changeValueAction.isApplicable()) {
+            menu.add(changeValueAction); 
+        }
 		menu.add(new Separator());
 		IAction action = new AvailableLogicalStructuresAction(this);
         if (action.isEnabled()) {
@@ -95,8 +102,11 @@ public class ExpressionView extends VariablesView {
 	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#contextActivated(org.eclipse.jface.viewers.ISelection)
 	 */
 	protected void contextActivated(ISelection selection) {
+		if (!isAvailable() || !isVisible()) {
+			return;
+		}
 		if (selection == null || selection.isEmpty()) {
-			setViewerInput(DebugPlugin.getDefault().getExpressionManager());
+            super.contextActivated(new StructuredSelection(DebugPlugin.getDefault().getExpressionManager()));
 		} else {
 			super.contextActivated(selection);
 		}
@@ -109,7 +119,8 @@ public class ExpressionView extends VariablesView {
      * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#viewerInputUpdateComplete(IViewerInputUpdate)
      */
 	protected void viewerInputUpdateComplete(IViewerInputUpdate update) {
-        if (update.getElement() != null) {
+        IStatus status = update.getStatus();
+        if ( (status == null || status.isOK()) && update.getElement() != null) {
             setViewerInput(update.getInputElement());
         } else {
             setViewerInput(DebugPlugin.getDefault().getExpressionManager());
@@ -131,13 +142,6 @@ public class ExpressionView extends VariablesView {
 	protected String getToggleActionLabel() {
 		return VariablesViewMessages.ExpressionView_4; 
 	}
-    
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getViewerStyle()
-	 */
-	protected int getViewerStyle() {
-		return SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.VIRTUAL;
-	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getPresentationContextId()
@@ -159,8 +163,8 @@ public class ExpressionView extends VariablesView {
      */
     protected void createActions() {
     	super.createActions();
-    	PasteWatchExpressionsAction paste = new PasteWatchExpressionsAction(this);
-    	configure(paste, IWorkbenchActionDefinitionIds.PASTE, PASTE_ACTION, ISharedImages.IMG_TOOL_PASTE);
+    	fPasteAction = new PasteWatchExpressionsAction(this);
+    	configure(fPasteAction, IWorkbenchCommandConstants.EDIT_PASTE, PASTE_ACTION, ISharedImages.IMG_TOOL_PASTE);
     }
     
     /**
@@ -199,7 +203,7 @@ public class ExpressionView extends VariablesView {
     	}
     	return false;
     }
-    
+       
     /**
      * Pastes the selection into the given target
      * 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
index 0062034..1754e34 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Wind River Systems - support for alternative expression view content providers
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
+ *     Wind Rvier Systems - added support for columns (bug 235646)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.launch;
 
@@ -15,6 +17,7 @@ import org.eclipse.core.runtime.IAdapterFactory;
 import org.eclipse.debug.core.IExpressionManager;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.core.model.IExpression;
@@ -25,7 +28,10 @@ import org.eclipse.debug.core.model.IRegisterGroup;
 import org.eclipse.debug.core.model.IStackFrame;
 import org.eclipse.debug.core.model.IThread;
 import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.elements.adapters.AsynchronousDebugLabelAdapter;
+import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
 import org.eclipse.debug.internal.ui.elements.adapters.DefaultViewerInputProvider;
 import org.eclipse.debug.internal.ui.elements.adapters.MemoryBlockContentAdapter;
 import org.eclipse.debug.internal.ui.elements.adapters.MemoryBlockLabelAdapter;
@@ -34,6 +40,13 @@ import org.eclipse.debug.internal.ui.elements.adapters.MemorySegmentLabelAdapter
 import org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter;
 import org.eclipse.debug.internal.ui.elements.adapters.StackFrameViewerInputProvider;
 import org.eclipse.debug.internal.ui.elements.adapters.VariableColumnFactoryAdapter;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointContainerLabelProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointContainerMementoProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointContentProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointLabelProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointManagerContentProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointManagerInputMementoProvider;
+import org.eclipse.debug.internal.ui.model.elements.BreakpointMementoProvider;
 import org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider;
 import org.eclipse.debug.internal.ui.model.elements.DebugTargetContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.ExpressionContentProvider;
@@ -47,6 +60,7 @@ import org.eclipse.debug.internal.ui.model.elements.MemoryBlockContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.MemoryBlockLabelProvider;
 import org.eclipse.debug.internal.ui.model.elements.MemoryRetrievalContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.MemoryViewElementMementoProvider;
+import org.eclipse.debug.internal.ui.model.elements.ProcessContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.RegisterGroupContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.RegisterGroupLabelProvider;
 import org.eclipse.debug.internal.ui.model.elements.RegisterGroupMementoProvider;
@@ -57,6 +71,7 @@ import org.eclipse.debug.internal.ui.model.elements.VariableContentProvider;
 import org.eclipse.debug.internal.ui.model.elements.VariableEditor;
 import org.eclipse.debug.internal.ui.model.elements.VariableLabelProvider;
 import org.eclipse.debug.internal.ui.model.elements.VariableMementoProvider;
+import org.eclipse.debug.internal.ui.model.elements.WatchExpressionEditor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentationFactory;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
@@ -89,24 +104,29 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
     private static IElementLabelProvider fgLPVariable = new VariableLabelProvider();
     private static IElementLabelProvider fgLPExpression = new ExpressionLabelProvider();
     private static IElementLabelProvider fgLPRegisterGroup = new RegisterGroupLabelProvider();
-    private static IElementLabelProvider fgLPMemoryBlock = new MemoryBlockLabelProvider();
-    
+    private static IElementLabelProvider fgLPMemoryBlock = new MemoryBlockLabelProvider();     
+    private static IElementLabelProvider fgLPBreakpoint = new BreakpointLabelProvider();
+    private static IElementLabelProvider fgLPBreakpointContainer = new BreakpointContainerLabelProvider(); 
     private static IElementEditor fgEEVariable = new VariableEditor();
+    private static IElementEditor fgEEWatchExpression = new WatchExpressionEditor();
     
     private static IAsynchronousContentAdapter fgAsyncMemoryRetrieval = new MemoryRetrievalContentAdapter();
     private static IAsynchronousContentAdapter fgAsyncMemoryBlock = new MemoryBlockContentAdapter();
     
     private static IElementContentProvider fgCPLaunchManger = new LaunchManagerContentProvider();
     private static IElementContentProvider fgCPLaunch = new LaunchContentProvider();
+    private static IElementContentProvider fgCPProcess = new ProcessContentProvider();
     private static IElementContentProvider fgCPTarget = new DebugTargetContentProvider();
     private static IElementContentProvider fgCPThread = new ThreadContentProvider();
     private static IElementContentProvider fgCPFrame = new StackFrameContentProvider();
     private static IElementContentProvider fgCPVariable = new VariableContentProvider();
-    private static IElementContentProvider fgCPExpressionManager = new ExpressionManagerContentProvider();
+    private static IElementContentProvider fgCPExpressionManager = new ExpressionManagerContentProvider();  
     private static IElementContentProvider fgCPExpression = new ExpressionContentProvider();
     private static IElementContentProvider fgCPRegisterGroup = new RegisterGroupContentProvider();
     private static IElementContentProvider fgCPMemoryRetrieval = new MemoryRetrievalContentProvider();
-    private static IElementContentProvider fgCPMemoryBlock = new MemoryBlockContentProvider();
+    private static IElementContentProvider fgCPMemoryBlock = new MemoryBlockContentProvider();   
+    private static IElementContentProvider fgCPBreakpointManager = new BreakpointManagerContentProvider();
+    private static IElementContentProvider fgCPBreakpoint = new BreakpointContentProvider();
     
     private static IElementMementoProvider fgMPFrame = new StackFrameMementoProvider();
     private static IElementMementoProvider fgMPVariable = new VariableMementoProvider();
@@ -114,6 +134,9 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
     private static IElementMementoProvider fgMPRegisterGroup = new RegisterGroupMementoProvider();
     private static IElementMementoProvider fgMPExpressionManager = new ExpressionManagerMementoProvider();
     private static IElementMementoProvider fgMPMemory = new MemoryViewElementMementoProvider();
+    private static IElementMementoProvider fgMPBreakpointManagerInput = new BreakpointManagerInputMementoProvider();
+    private static IElementMementoProvider fgMPBreakpointContainer = new BreakpointContainerMementoProvider();
+    private static IElementMementoProvider fgMPBreakpoint = new BreakpointMementoProvider();
     
     private static IColumnPresentationFactory fgVariableColumnFactory = new VariableColumnFactoryAdapter();
     
@@ -144,6 +167,9 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
             if (adaptableObject instanceof ILaunch) {
                 return fgCPLaunch;
             }
+            if (adaptableObject instanceof IProcess) {
+                return fgCPProcess;
+            }
             if (adaptableObject instanceof IDebugTarget) {
             	return fgCPTarget;
             }
@@ -162,7 +188,7 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
             }
             if (adaptableObject instanceof IExpressionManager) {
             	return fgCPExpressionManager;
-            }
+            }           
             if (adaptableObject instanceof IExpression) {
             	return fgCPExpression;
             }
@@ -171,6 +197,12 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
             }
             if (adaptableObject instanceof IMemoryBlock) {
             	return fgCPMemoryBlock;
+            }            
+            if (adaptableObject instanceof DefaultBreakpointsViewInput) {
+            	return fgCPBreakpointManager;
+            }
+            if (adaptableObject instanceof IBreakpoint) {
+            	return fgCPBreakpoint;
             }
         }        
         
@@ -197,7 +229,13 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
         	}
         	if (adaptableObject instanceof IMemoryBlock) {
         		return fgLPMemoryBlock;
+        	} 
+        	if (adaptableObject instanceof IBreakpoint) {
+        		return fgLPBreakpoint;
         	}
+        	if (adaptableObject instanceof IBreakpointContainer) {
+        		return fgLPBreakpointContainer;
+        	}     	
         	return fgLPDebugElement;
         }        
         
@@ -206,7 +244,10 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
         			adaptableObject instanceof IProcess || adaptableObject instanceof ILaunchManager ||
         			adaptableObject instanceof IStackFrame || adaptableObject instanceof IExpressionManager ||
         			adaptableObject instanceof IExpression || adaptableObject instanceof IMemoryBlockRetrieval ||
-        			adaptableObject instanceof IMemoryBlock)
+        			adaptableObject instanceof IMemoryBlock ||
+        			adaptableObject instanceof DefaultBreakpointsViewInput ||
+        			adaptableObject instanceof IBreakpoint ||
+        			adaptableObject instanceof IBreakpointContainer)
         	return fgModelProxyFactoryAdapter;
         }
         
@@ -223,9 +264,9 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
         }
         
         if (adapterType.equals(IColumnPresentationFactory.class)) {
-        	if (adaptableObject instanceof IStackFrame) {
-        		return fgVariableColumnFactory;
-        	}
+            if (adaptableObject instanceof IStackFrame || adaptableObject instanceof IExpressionManager) {
+                return fgVariableColumnFactory;
+            }
         }   
         
         if (adapterType.equals(IElementMementoProvider.class)) {
@@ -247,12 +288,24 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
         	if (adaptableObject instanceof IMemoryBlockRetrieval) {
         		return fgMPMemory;
         	}
+        	if (adaptableObject instanceof IBreakpoint) {
+        		return fgMPBreakpoint;
+        	}
+        	if (adaptableObject instanceof IBreakpointContainer) {
+        		return fgMPBreakpointContainer;
+        	}
+        	if (adaptableObject instanceof DefaultBreakpointsViewInput) {
+        		return fgMPBreakpointManagerInput;
+        	}
         }
         
         if (adapterType.equals(IElementEditor.class)) {
         	if (adaptableObject instanceof IVariable) {
         		return fgEEVariable;
         	}
+            if (adaptableObject instanceof IWatchExpression) {
+                return fgEEWatchExpression;
+            }
         }
         
         if (adapterType.equals(IViewerInputProvider.class)) {
@@ -261,7 +314,7 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
         	} else {
         	    return fgDefaultViewerInputProvider;
         	}
-        }
+        }         
         
         return null;
     }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
index a9098c7..8527fce 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,31 +19,30 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 
+import org.eclipse.core.commands.IHandler2;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IDebugElement;
+import org.eclipse.debug.core.commands.IRestartHandler;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.core.model.ITerminate;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.actions.AddToFavoritesAction;
 import org.eclipse.debug.internal.ui.actions.EditLaunchConfigurationAction;
-import org.eclipse.debug.internal.ui.commands.actions.DebugCommandAction;
 import org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandAction;
 import org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandAction;
+import org.eclipse.debug.internal.ui.commands.actions.RestartCommandAction;
 import org.eclipse.debug.internal.ui.commands.actions.ResumeCommandAction;
 import org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandAction;
 import org.eclipse.debug.internal.ui.commands.actions.StepOverCommandAction;
@@ -63,15 +62,16 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelChangedList
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDeltaVisitor;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
 import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext;
-import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages;
 import org.eclipse.debug.ui.AbstractDebugView;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.IDebugModelPresentation;
 import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.actions.DebugCommandAction;
 import org.eclipse.debug.ui.contexts.AbstractDebugContextProvider;
 import org.eclipse.debug.ui.contexts.DebugContextEvent;
 import org.eclipse.debug.ui.contexts.IDebugContextListener;
@@ -82,7 +82,7 @@ import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.ISelection;
@@ -97,8 +97,6 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IActionBars;
@@ -148,14 +146,16 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 
     private static final String STEP_INTO = "step_into"; //$NON-NLS-1$
 
-    private static final String TERMINATE_AND_REMOVE = "terminate_and_remove"; //$NON-NLS-1$
+    public static final String TERMINATE_AND_REMOVE = "terminate_and_remove"; //$NON-NLS-1$
     
     private static final String TERMINATE_ALL = "terminate_all"; //$NON-NLS-1$
 
-    private static final String TERMINATE_AND_RELAUNCH = "terminate_relaunch"; //$NON-NLS-1$
+    public static final String TERMINATE_AND_RELAUNCH = "terminate_relaunch"; //$NON-NLS-1$
     
     private static final String TOGGLE_STEP_FILTERS = "toggle_step_filters"; //$NON-NLS-1$
-			
+
+    private static final String RESTART = "restart"; //$NON-NLS-1$
+
     private static final int BREADCRUMB_TRIGGER_RANGE = 5; // pixels
     
     private static final int BREADCRUMB_STICKY_RANGE = 20; // pixels
@@ -170,6 +170,8 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 	 */
 	private IDebugModelPresentation fPresentation = null;
 	
+	private IPresentationContext fPresentationContext;
+	
 	private EditLaunchConfigurationAction fEditConfigAction = null;
 	private AddToFavoritesAction fAddToFavoritesAction = null;
 	private EditSourceLookupPathAction fEditSourceAction = null;
@@ -219,6 +221,13 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
      */
     private boolean fBreadcrumbDropDownAutoExpand = false;
     
+    /**
+     * Action handlers. Maps action identifiers to IHandler's.
+     * 
+     * @since 3.6
+     */
+    private Map fHandlers = new HashMap();
+    
 	/**
 	 * Page-book page for the breadcrumb viewer.  This page is activated in 
 	 * Debug view when the height of the view is reduced to just one line. 
@@ -500,13 +509,37 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
         addCapabilityAction(new StepOverCommandAction(), STEP_OVER);
         addCapabilityAction(new StepIntoCommandAction(), STEP_INTO);
         addCapabilityAction(new DropToFrameCommandAction(), DROP_TO_FRAME);
-        addCapabilityAction(new TerminateAndRemoveAction(), TERMINATE_AND_REMOVE);
-        addCapabilityAction(new TerminateAndRelaunchAction(), TERMINATE_AND_RELAUNCH);
+        DebugCommandAction action = new TerminateAndRemoveAction();
+        addCapabilityAction(action, TERMINATE_AND_REMOVE);
+        setHandler(TERMINATE_AND_REMOVE, new ActionHandler(action));
+        action = new TerminateAndRelaunchAction();
+        addCapabilityAction(action, TERMINATE_AND_RELAUNCH);
+        setHandler(TERMINATE_AND_RELAUNCH, new ActionHandler(action));
+        addCapabilityAction(new RestartCommandAction(), RESTART);
         addCapabilityAction(new TerminateAllAction(), TERMINATE_ALL);
         addCapabilityAction(new ToggleStepFiltersAction(), TOGGLE_STEP_FILTERS);
 	}
 	
-
+	/**
+	 * Sets the handler associated with the given action identifier.
+	 * 
+	 * @param id action identifier
+	 * @param handler handler
+	 */
+	private void setHandler(String id, IHandler2 handler) {
+		fHandlers.put(id, handler);
+	}
+	
+	/**
+	 * Returns the handler associated with the given action identifier or <code>null</code>.
+	 * 
+	 * @param id action identifier
+	 * @return handler or <code>null</code>
+	 */
+	public IHandler2 getHandler(String id) {
+		return (IHandler2) fHandlers.get(id);
+	}
+	
 	/**
 	 * Initializes the action and associates it with the given id.
 	 * 
@@ -767,18 +800,12 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 	 */
 	protected Viewer createViewer(Composite parent) {
 		fPresentation = new DelegatingModelPresentation();
+		fPresentationContext = new DebugModelPresentationContext(IDebugUIConstants.ID_DEBUG_VIEW, this, fPresentation);
 		TreeModelViewer viewer = new TreeModelViewer(parent,
 				SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.VIRTUAL,
-				new DebugModelPresentationContext(IDebugUIConstants.ID_DEBUG_VIEW, fPresentation));
+				fPresentationContext);
         
         viewer.addSelectionChangedListener(fTreeViewerSelectionChangedListener);
-        viewer.getControl().addKeyListener(new KeyAdapter() {
-        	public void keyPressed(KeyEvent event) {
-        		if (event.character == SWT.DEL && event.stateMask == 0) {
-        			handleDeleteKeyPressed();
-        		}
-        	}
-        });
         viewer.addViewerUpdateListener(this);        
         
 		viewer.setInput(DebugPlugin.getDefault().getLaunchManager());
@@ -787,85 +814,6 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 		
 		return viewer;
 	}
-		
-	private void handleDeleteKeyPressed() {
-		IStructuredSelection selection= (IStructuredSelection) getViewer().getSelection();
-		Iterator iter= selection.iterator();
-		Object item;
-		boolean itemsToTerminate= false;
-		ITerminate terminable;
-		while (iter.hasNext()) {
-			item= iter.next();
-			if (item instanceof ITerminate) {
-				terminable= (ITerminate) item;
-				if (terminable.canTerminate() && !terminable.isTerminated()) {
-					itemsToTerminate= true;
-					break;
-				}
-			}
-		}
-		if (itemsToTerminate) {
-			// Prompt the user to proceed with termination
-			if (!MessageDialog.openQuestion(getSite().getShell(), DebugUIViewsMessages.LaunchView_Terminate_and_Remove_1, DebugUIViewsMessages.LaunchView_Terminate_and_remove_selected__2)) {  
-				return;
-			}
-		}
-		MultiStatus status= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, DebugUIViewsMessages.LaunchView_Exceptions_occurred_attempting_to_terminate_and_remove_3, null); 
-		iter= selection.iterator(); 
-		while (iter.hasNext()) {
-			try {
-				terminateAndRemove(iter.next());
-			} catch (DebugException exception) {
-				status.merge(exception.getStatus());				
-			}
-		}
-		if (!status.isOK()) {
-			IWorkbenchWindow window= DebugUIPlugin.getActiveWorkbenchWindow();
-			if (window != null) {
-				DebugUIPlugin.errorDialog(window.getShell(), DebugUIViewsMessages.LaunchView_Terminate_and_Remove_4, DebugUIViewsMessages.LaunchView_Terminate_and_remove_failed_5, status);  
-			} else {
-				DebugUIPlugin.log(status);
-			}
-		}
-	}
-	
-	/**
-	 * Terminates and removes the given element from the launch manager
-	 */
-	public static void terminateAndRemove(Object element) throws DebugException {
-		ILaunch launch= null;
-		ITerminate terminable = null;
-		if (element instanceof ILaunch) {
-			launch= (ILaunch) element;
-		} else if (element instanceof IDebugElement) {
-			launch= ((IDebugElement) element).getLaunch();
-		} else if (element instanceof IProcess) {
-			launch= ((IProcess) element).getLaunch();
-		}		
-		terminable = launch;
-		if (terminable == null) {
-			if (element instanceof ITerminate) {
-				terminable = (ITerminate) element;
-			}
-		}
-		if (terminable == null) {
-			return;
-		}
-		if (!(terminable.canTerminate() || terminable.isTerminated())) {
-			// Don't try to terminate or remove attached launches
-			return;
-		}
-		try {
-			if (!terminable.isTerminated()) {
-				terminable.terminate();
-			}
-		} finally {
-			if (launch != null) {
-				ILaunchManager lManager= DebugPlugin.getDefault().getLaunchManager();
-				lManager.removeLaunch(launch);		
-			}
-		}
-	}
 
 	private void commonInit(IViewSite site) {
 		site.getPage().addPartListener((IPartListener2) this);
@@ -996,12 +944,20 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 			viewer.removeSelectionChangedListener(fTreeViewerSelectionChangedListener);
             ((TreeModelViewer)viewer).removeViewerUpdateListener(this);
 		}
+		if (fPresentationContext != null) {
+		    fPresentationContext.dispose();
+		}
 		IWorkbenchPage page = getSite().getPage();
 		page.removePartListener((IPartListener2) this);
 		IWorkbenchWindow window = getSite().getWorkbenchWindow();
 		window.removePerspectiveListener(this);
 		window.removePageListener(this);
-		
+		Iterator iterator = fHandlers.values().iterator();
+		while (iterator.hasNext()) {
+			IHandler2 hander = (IHandler2) iterator.next();
+			hander.dispose();
+		}
+		fHandlers.clear();
 		super.dispose();
 	}
 		
@@ -1019,6 +975,7 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
         disposeCommandAction(DROP_TO_FRAME);
         disposeCommandAction(TERMINATE_AND_REMOVE);
         disposeCommandAction(TERMINATE_AND_RELAUNCH);
+        disposeCommandAction(RESTART);
         disposeCommandAction(TERMINATE_ALL);
     }
 
@@ -1103,6 +1060,8 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 	 * @see org.eclipse.debug.ui.AbstractDebugView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
 	 */
 	protected void fillContextMenu(IMenuManager menu) {
+        TreeSelection sel = (TreeSelection) fTreeViewerDebugContextProvider.getActiveContext();
+        Object element = sel != null && sel.size() > 0 ? sel.getFirstElement() : null; 
 		
 		menu.add(new Separator(IDebugUIConstants.EMPTY_EDIT_GROUP));
 		menu.add(new Separator(IDebugUIConstants.EDIT_GROUP));
@@ -1129,12 +1088,7 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
 		/**
 		 * TODO hack to get around bug 148424, remove if UI ever fixes the PropertyDialogAction to respect enablesWhen conditions
 		 */
-		TreeSelection sel = (TreeSelection) fTreeViewerDebugContextProvider.getActiveContext();
-		boolean enabled = true;
-		if(sel != null && sel.size() > 0) {
-			enabled = !(sel.getFirstElement() instanceof ILaunch);
-		}
-		action.setEnabled(action.isApplicableForSelection() && enabled);
+		action.setEnabled(action.isApplicableForSelection() && !(element instanceof ILaunch));
 		menu.add(action);
 		menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
         
@@ -1145,6 +1099,9 @@ public class LaunchView extends AbstractDebugView implements ISelectionChangedLi
         menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND));
         menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE));
         menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE_AND_RELAUNCH));
+        if (element instanceof IAdaptable && ((IAdaptable)element).getAdapter(IRestartHandler.class) != null) {
+            menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESTART));
+        }
         menu.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(DISCONNECT));
         
         menu.appendToGroup(IDebugUIConstants.STEP_INTO_GROUP, getAction(STEP_INTO));
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
index 19d35d8..3636de6 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewBreadcrumb.java
@@ -34,6 +34,7 @@ import org.eclipse.debug.ui.contexts.IDebugContextProvider;
 import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.BaseLabelProvider;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -390,7 +391,7 @@ public class LaunchViewBreadcrumb extends AbstractBreadcrumb implements IDebugCo
                 fDropDownViewer.setFilters(filters);
                 
                 ModelDelta stateDelta = new ModelDelta(launchViewInput, IModelDelta.NO_CHANGE);
-                fTreeViewer.saveElementState(TreePath.EMPTY, stateDelta);
+                fTreeViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.EXPAND | IModelDelta.SELECT);
                 
                 // If we do not want to expand the elements in the drop-down.
                 // Prune the delta to only select the element in the 
@@ -483,7 +484,7 @@ public class LaunchViewBreadcrumb extends AbstractBreadcrumb implements IDebugCo
                     }
                     
                     // Create the delta and save the drop-down viewer's state to it.
-                    fDropDownViewer.saveElementState(TreePath.EMPTY, delta);
+                    fDropDownViewer.saveElementState(TreePath.EMPTY, delta, IModelDelta.EXPAND | IModelDelta.SELECT);
                     
                     // Add the IModelDelta.FORCE flag to override the current selection in view.
                     rootDelta.accept(new IModelDeltaVisitor(){
@@ -499,7 +500,7 @@ public class LaunchViewBreadcrumb extends AbstractBreadcrumb implements IDebugCo
                     // full viewer.  After the drop-down's full expansion state is saved out to the tree viewer, the
                     // tree viewer will accurately reflect the state changes made by the user. 
                     if (fView.getBreadcrumbDropDownAutoExpand()) {
-                        fTreeViewer.collapseToLevel(rootPath, TreeViewer.ALL_LEVELS);
+                        fTreeViewer.collapseToLevel(rootPath, AbstractTreeViewer.ALL_LEVELS);
                     }                    
                     
                     // Save the state of the drop-down out into the tree viewer.
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditor.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditor.java
index b25295f..78f007d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditor.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/SourceNotFoundEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.debug.internal.ui.views.launch;
 
 
-import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.resource.JFaceColors;
 import org.eclipse.swt.SWT;
@@ -47,12 +46,6 @@ public class SourceNotFoundEditor extends EditorPart implements IReusableEditor
 	}
 
 	/**
-	 * @see org.eclipse.ui.IEditorPart#gotoMarker(IMarker)
-	 */
-	public void gotoMarker(IMarker marker) {
-	}
-
-	/**
 	 * @see org.eclipse.ui.IEditorPart#init(IEditorSite, IEditorInput)
 	 */
 	public void init(IEditorSite site, IEditorInput input) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/TerminateAndRemoveHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/TerminateAndRemoveHandler.java
new file mode 100644
index 0000000..f2de925
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/TerminateAndRemoveHandler.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.views.launch;
+
+import org.eclipse.debug.internal.ui.commands.actions.DebugActionHandler;
+
+/**
+ * Handler for terminate and remove. See bug 290219.
+ *
+ * @since 3.6
+ */
+public class TerminateAndRemoveHandler extends DebugActionHandler {
+	
+	public TerminateAndRemoveHandler() {
+		super(LaunchView.TERMINATE_AND_REMOVE);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
index d9a6834..6dad2ff 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AbstractMemoryViewPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,8 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
 	private Composite fCanvas;
 	protected String fLabel;
 	
+	private volatile boolean fIsDisposed = false;
+
 	public AbstractMemoryViewPane(IViewPart parent)
 	{
 		super();
@@ -277,33 +279,43 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
 			Object source = events[i].getSource();
 			if (events[i].getKind() == DebugEvent.TERMINATE && source instanceof IMemoryBlockRetrieval) 
 			{
+				if (isDisposed())
+					return;
+
 				//When a memory block retrieval terminates, it and its
 				//tab folders should be removed from our map.
-				IMemoryBlockRetrieval ret = (IMemoryBlockRetrieval)source;
+				final IMemoryBlockRetrieval ret = (IMemoryBlockRetrieval)source;
 				if (ret != null) 
 				{
-					final Integer key = MemoryViewUtil.getHashCode(ret);
-					final Object folder = fTabFolderForDebugView.get(key);
-					if (folder != null && folder != fEmptyTabFolder &&  (!((CTabFolder)folder).isDisposed())) 
-					{
-						Display.getDefault().asyncExec(new Runnable() {
-							public void run() {
+					Display.getDefault().asyncExec(new Runnable() {
+						public void run() {
+							if (isDisposed())
+								return;
+
+							Integer key = MemoryViewUtil.getHashCode(ret);
+							Object folder = fTabFolderForDebugView.get(key);
+
+							if (folder != null && folder != fEmptyTabFolder)
+							{
 								//remove the tab folder , and all contained tab items
 								disposeOfFolder((CTabFolder) folder);
 								fTabFolderForDebugView.remove(key);
 							}
-						});
-					}
+						}
+					});
 				}
 			}
 		}
-
 	}
 
 
 
 	public void dispose()
 	{
+		if (isDisposed())
+			return;
+		fIsDisposed = true;
+
 		removeListeners();
 		
 		// dispose empty folders
@@ -311,20 +323,16 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
 		
 		// dispose all other folders
 		try {
-			
-			if (fTabFolderForDebugView != null) {
-				Enumeration enumeration = fTabFolderForDebugView.elements();
-				
-				while (enumeration.hasMoreElements())
-				{
-					CTabFolder tabFolder = (CTabFolder)enumeration.nextElement();
-					disposeOfFolder(tabFolder);
-				}
-				
-				// set to null so that clean up is only done once
-				fTabFolderForDebugView.clear();
-				fTabFolderForDebugView = null;
+			Enumeration enumeration = fTabFolderForDebugView.elements();
+
+			while (enumeration.hasMoreElements())
+			{
+				CTabFolder tabFolder = (CTabFolder)enumeration.nextElement();
+				disposeOfFolder(tabFolder);
 			}
+
+			// Clear the table as all CTabFolder's have been dipose()d
+			fTabFolderForDebugView.clear();
 		} catch (Exception e) {		
 			
 			DebugUIPlugin.logErrorMessage("Exception occurred when the Memory View is disposed."); //$NON-NLS-1$
@@ -395,6 +403,11 @@ public abstract class AbstractMemoryViewPane implements IMemoryBlockListener, IS
 		return fLabel;
 	}
 	
+	protected boolean isDisposed()
+	{
+		return fIsDisposed;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.internal.core.memory.IMemoryBlockListener#MemoryBlockAdded(org.eclipse.debug.core.model.IMemoryBlock)
 	 */
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
index 4862fde..eeba2d9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryBlocksTreeViewPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     WindRiver - Bug 192028 [Memory View] Memory view does not 
  *                 display memory blocks that do not reference IDebugTarget
-     
+ *     
  *******************************************************************************/
  
 package org.eclipse.debug.internal.ui.views.memory;
@@ -32,6 +32,7 @@ import org.eclipse.debug.internal.ui.DebugUIMessages;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.memory.provisional.MemoryViewPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.debug.ui.contexts.DebugContextEvent;
@@ -74,6 +75,7 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC
 	public static final String PANE_ID = DebugUIPlugin.getUniqueIdentifier() + ".MemoryView.MemoryBlocksTreeViewPane"; //$NON-NLS-1$
 	
 	private IViewPart fParent;
+	private IPresentationContext fPresentationContext;
 	private MemoryViewTreeViewer fTreeViewer;
 	protected IMemoryBlockRetrieval fRetrieval;
 	private ViewPaneSelectionProvider fSelectionProvider;
@@ -291,8 +293,8 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC
 		fLabel = label;
 		
 		IMemoryRenderingSite site = getMemoryRenderingSite();
-		MemoryViewPresentationContext presentationContext = new MemoryViewPresentationContext(site, this, null);
-		fTreeViewer = new MemoryViewTreeViewer(parent, style, presentationContext);
+		fPresentationContext = new MemoryViewPresentationContext(site, this, null);
+		fTreeViewer = new MemoryViewTreeViewer(parent, style, fPresentationContext);
 		
 		IAdaptable context = DebugUITools.getDebugContext();
 		IMemoryBlockRetrieval retrieval = MemoryViewUtil.getMemoryBlockRetrieval(context);
@@ -367,6 +369,7 @@ public class MemoryBlocksTreeViewPane implements ISelectionListener, ISelectionC
 		fAddMemoryBlockAction.dispose();
 		DebugUITools.getDebugContextManager().getContextService(fParent.getSite().getWorkbenchWindow()).removeDebugContextListener(fDebugContextListener);
 		fEvtHandler.dispose();	
+        fPresentationContext.dispose();
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
index 29a9376..07f3900 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewSynchronizationService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Justin Kong (IBM) -  Bug 258890 -  [Memory View] MemoryViewSynchronizationService not implementing addPropertyChangeListener() correctly
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.memory;
 
@@ -189,14 +190,7 @@ public class MemoryViewSynchronizationService implements
 	 * @see org.eclipse.debug.ui.memory.IMemoryRenderingSynchronizationService#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener, java.lang.String[])
 	 */
 	public void addPropertyChangeListener(IPropertyChangeListener listener, String[] properties) {
-		
-		PropertyListener propertylistener = new PropertyListener(listener, properties);
-		
-		if (!fPropertyListeners.contains(propertylistener))
-		{
-			fPropertyListeners.put(listener, propertylistener);
-		}
-
+		fPropertyListeners.put(listener, new PropertyListener(listener, properties));
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeModelContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeModelContentProvider.java
index 0cd6802..18856e1 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeModelContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryViewTreeModelContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.debug.internal.ui.views.memory;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IMemoryBlock;
 import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
-import org.eclipse.debug.internal.ui.viewers.PartPresentationContext;
 import org.eclipse.debug.internal.ui.viewers.model.TreeModelContentProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
@@ -22,24 +21,19 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
 public class MemoryViewTreeModelContentProvider extends
 		TreeModelContentProvider {
 	
-	protected void updateNodes(IModelDelta[] nodes) {
+	protected void updateNodes(IModelDelta[] nodes, int mask) {
 		
 		if (getViewer() instanceof TreeModelViewer)
 		{
-	        TreeModelViewer viewer = (TreeModelViewer) getViewer();
-	
 	        for (int i = 0; i < nodes.length; i++) {
 				IModelDelta node = nodes[i];
-				int flags = node.getFlags();
+				int flags = node.getFlags() & mask;
 
 				if ((flags & IModelDelta.ADDED) != 0) {
 					if (node.getElement() instanceof IMemoryBlock) {
 						if ((flags & IModelDelta.SELECT) != 0) {
-							PartPresentationContext context = (PartPresentationContext) viewer
-									.getPresentationContext();
-							if (context.getPart() instanceof MemoryView) {
-								MemoryView view = (MemoryView) context
-										.getPart();
+							if (getPresentationContext() instanceof MemoryView) {
+								MemoryView view = (MemoryView) getPresentationContext().getPart();
 								if (view.isPinMBDisplay()) {
 									// turn off select if the view is currently
 									// pinned
@@ -85,7 +79,7 @@ public class MemoryViewTreeModelContentProvider extends
 				if ((flags & IModelDelta.UNINSTALL) != 0) {
 					handleUninstall(node);
 				}
-				updateNodes(node.getChildDeltas());
+				updateNodes(node.getChildDeltas(), mask);
 	        }
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
index a2cf262..137e5b0 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RenderingViewPane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,8 +85,6 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
 	
 	private boolean fCanAddRendering = true;
 	private boolean fCanRemoveRendering = true;
-
-	private boolean fIsDisposed = false;
 	
 	/**
 	 * @param parent is the view hosting this view pane
@@ -248,7 +246,7 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
 	 * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
 	 */
 	public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
-		if (fIsDisposed)
+		if (isDisposed())
 			return;
 		
 		// do not schedule job if any of these conditions are true
@@ -898,8 +896,6 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
 	}
 	
 	public void dispose() {
-		fIsDisposed = true;
-		
 		super.dispose();
 		
 		fTabFolderForMemoryBlock.clear();
@@ -1134,10 +1130,7 @@ public class RenderingViewPane extends AbstractMemoryViewPane implements IMemory
 		}
 	}
 	
-	private boolean isDisposed()
-	{
-		return fIsDisposed;
-	}
+
 	
 	public void showCreateRenderingTab()
 	{
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
index 9caa554..18593a7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncCopyTableRenderingAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.debug.internal.ui.views.memory.renderings;
 
 import java.util.ArrayList;
 
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
@@ -30,26 +31,28 @@ public class AsyncCopyTableRenderingAction extends
 	protected String concatenateTableAsString(TableItem[] itemList) {
 		
 		Table table = null;
-		if (itemList.length > 0)
+		if (itemList.length > 0) {
 			table = itemList[0].getParent();
 		
-		int topIndex = table.getTopIndex();
-		int itemCount = table.getItemCount();
-	    int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
-		
-		ArrayList items = new ArrayList();
-		
-		// start at top index until there is no more data in the table
-		for (int i=topIndex; i< topIndex + numVisibleLines; i++)
-		{
-			if (itemList[i].getData() != null)
+			int topIndex = table.getTopIndex();
+			int itemCount = table.getItemCount();
+		    int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
+			
+			ArrayList items = new ArrayList();
+			
+			// start at top index until there is no more data in the table
+			for (int i=topIndex; i< topIndex + numVisibleLines; i++)
 			{
-				items.add(itemList[i]);
+				if (itemList[i].getData() != null)
+				{
+					items.add(itemList[i]);
+				}
+				else
+					break;
 			}
-			else
-				break;
+			
+			return super.concatenateTableAsString((TableItem[]) items.toArray(new TableItem[items.size()]));
 		}
-		
-		return super.concatenateTableAsString((TableItem[]) items.toArray(new TableItem[items.size()]));
+		return IInternalDebugCoreConstants.EMPTY_STRING;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
index 1148641..ed3b15f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncPrintTableRenderingAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,26 +31,27 @@ public class AsyncPrintTableRenderingAction extends PrintTableRenderingAction {
 
 	protected void printTable(TableItem[] itemList, GC printGC, Printer printer) {
 		Table table = null;
-		if (itemList.length > 0)
+		if (itemList.length > 0) {
 			table = itemList[0].getParent();
 		
-		int topIndex = table.getTopIndex();
-		int itemCount = table.getItemCount();
-	    int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
-		
-		ArrayList items = new ArrayList();
-		
-		// start at top index until there is no more data in the table
-		for (int i=topIndex; i< topIndex + numVisibleLines; i++)
-		{
-			if (itemList[i].getData() != null)
+			int topIndex = table.getTopIndex();
+			int itemCount = table.getItemCount();
+		    int numVisibleLines = Math.min((table.getBounds().height / table.getItemHeight()) + 2, itemCount - topIndex);
+			
+			ArrayList items = new ArrayList();
+			
+			// start at top index until there is no more data in the table
+			for (int i=topIndex; i< topIndex + numVisibleLines; i++)
 			{
-				items.add(itemList[i]);
+				if (itemList[i].getData() != null)
+				{
+					items.add(itemList[i]);
+				}
+				else
+					break;
 			}
-			else
-				break;
+			
+			super.printTable((TableItem[])items.toArray(new TableItem[items.size()]), printGC, printer);
 		}
-		
-		super.printTable((TableItem[])items.toArray(new TableItem[items.size()]), printGC, printer);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingUpdatePolicy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingUpdatePolicy.java
index 8d5056a..f59b9a7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingUpdatePolicy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingUpdatePolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ public class AsyncTableRenderingUpdatePolicy extends TableUpdatePolicy
 			
 			clearCache(computer);
 			
-			if (!containsEvent(node))
+			if (!containsEvent())
 			{
 				return;
 			}
@@ -168,7 +168,7 @@ public class AsyncTableRenderingUpdatePolicy extends TableUpdatePolicy
 		return null;
 	}
 	
-	private boolean containsEvent(IModelDelta delta)
+	private boolean containsEvent()
 	{
 		if (getViewer().getPresentationContext() instanceof MemoryViewPresentationContext)
 		{
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
index d491569..8e96efc 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/AsyncTableRenderingViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -514,8 +514,11 @@ public class AsyncTableRenderingViewer extends AsyncVirtualContentTableViewer {
 			
 			if (getPendingSetTopIndexKey() != null)
 			{
-				if (AsyncVirtualContentTableViewer.DEBUG_DYNAMIC_LOADING)
-					System.out.println(getRendering() + " finished top index: " + ((BigInteger)oldTopIndexKey).toString(16)); //$NON-NLS-1$
+				if (AsyncVirtualContentTableViewer.DEBUG_DYNAMIC_LOADING) {
+					if (oldTopIndexKey != null) {
+						System.out.println(getRendering() + " finished top index: " + ((BigInteger)oldTopIndexKey).toString(16)); //$NON-NLS-1$
+					}
+				}
 				setTopIndex(getPendingSetTopIndexKey());
 			}
 			else if (oldTopIndexKey != null)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
index 2f467fc..b541a7a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/FormatTableRenderingDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     QNX - Alena Laskavaia Bug 240330 - [Memory View] Items per row should not be limited to 16
+ *     Freescale -  Teodor Madan  Bug 248486 -  [Memory View] Need a way to set default memory view format for a particular renderer
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.memory.renderings;
 
@@ -489,18 +490,12 @@ public class FormatTableRenderingDialog extends TrayDialog
 		}
 
 		private void restoreDefaults() {
-			String modelId = fRendering.getMemoryBlock().getModelIdentifier();
-			int defaultRowSize = DebugUITools.getPreferenceStore().getInt(getRowPrefId(modelId));
-			int defaultColSize = DebugUITools.getPreferenceStore().getInt(getColumnPrefId(modelId));
-			
-			if (defaultRowSize == 0 || defaultColSize == 0)
-			{
-				defaultRowSize = DebugUITools.getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_ROW_SIZE);
-				defaultColSize = DebugUITools.getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_COLUMN_SIZE);
-				
-				DebugUITools.getPreferenceStore().setValue(getRowPrefId(modelId), defaultRowSize);
-				DebugUITools.getPreferenceStore().setValue(getColumnPrefId(modelId), defaultColSize);
-			}
+
+			// Determine the default values by using the following search order: 
+			// IPersistableDebugElement, workspace preference, plugin defaults
+			// issue: 248486 
+			int defaultRowSize = getDefaultRowSize();
+			int defaultColSize = getDefaultColumnSize();
 			
 			populateControl(defaultRowSize, fRowSizes, fRowControl);
 			populateControl(defaultColSize, fColumnSizes, fColumnControl);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
index ccf8bae..59799c0 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/GoToAddressDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,23 +52,23 @@ public class GoToAddressDialog extends TrayDialog implements ModifyListener{
 	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createDialogArea(Composite parent) {
-	
+		Composite comp = (Composite) super.createDialogArea(parent);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IDebugUIConstants.PLUGIN_ID + ".GoToAddressDialog_context"); //$NON-NLS-1$
-		parent.setLayout(new GridLayout());
+		comp.setLayout(new GridLayout());
 		GridData spec2= new GridData();
 		spec2.grabExcessVerticalSpace= true;
 		spec2.grabExcessHorizontalSpace= true;
 		spec2.horizontalAlignment= GridData.FILL;
 		spec2.verticalAlignment= GridData.CENTER;
-		parent.setLayoutData(spec2);
+		comp.setLayoutData(spec2);
 
-		Label textLabel = new Label(parent, SWT.NONE);
+		Label textLabel = new Label(comp, SWT.NONE);
 		textLabel.setText(DebugUIMessages.GoToAddressDialog_Address);
 		GridData textLayout = new GridData();
 		textLayout.widthHint = 280;
 		textLabel.setLayoutData(textLayout);
 		
-		expressionInput = new Combo(parent, SWT.BORDER);
+		expressionInput = new Combo(comp, SWT.BORDER);
 		GridData spec= new GridData();
 		spec.grabExcessVerticalSpace= false;
 		spec.grabExcessHorizontalSpace= true;
@@ -86,7 +86,7 @@ public class GoToAddressDialog extends TrayDialog implements ModifyListener{
 		
 		expressionInput.addModifyListener(this);
 		
-		return parent;
+		return comp;
 	}
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
index 33b229e..639a1d2 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -300,7 +300,6 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
 		if (target.isDisconnected() || target.isTerminated())
 			return;
 		
-		boolean error = false;
 		DebugException dbgEvt = null;
 		
 		// calculate address size
@@ -311,7 +310,6 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
 			addressSize = getAddressSize(startingAddress);
 		} catch (DebugException e1) {
 			dbgEvt = e1;
-			error = true;
 			addressSize = 4;
 		}
 		
@@ -423,7 +421,6 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
 			memoryBuffer = makeDummyContent(numberOfLines);
 			
 			// finish creating the content provider before throwing an event
-			error = true; 
 			dbgEvt = e;
 		}
 		catch (Throwable e)
@@ -432,7 +429,6 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
 			memoryBuffer = makeDummyContent(numberOfLines);
 			
 			// finish creating the content provider before throwing an event
-			error = true; 
 			dbgEvt = new DebugException(DebugUIPlugin.newErrorStatus(e.getMessage(), e));
 		}
 		
@@ -481,7 +477,7 @@ public class TableRenderingContentProvider extends BasicDebugViewContentProvider
 		// put memory information into MemoryViewLine
 		organizeLines(numberOfLines, updateDelta, addressLength, memoryBuffer, paddedString, address, manageDelta);
 		
-		if (error){
+		if (dbgEvt != null){
 			throw dbgEvt;
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties
index c35d020..b8c3458 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties
@@ -9,7 +9,7 @@
 # QNX Software Systems - Initial API and implementation
 # Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
 ##########################################################################
-ModulesView_0=Modules View Only
+ModulesView_0=Modules View &Only
 
-ModulesView_1={0} View Only
+ModulesView_1={0} View &Only
 ModulesView_2=Modules
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties
index d1c175f..b6d1858 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties
@@ -8,4 +8,4 @@
 # Contributors:
 # QNX Software Systems - Initial API and implementation
 ##########################################################################
-RegistersView_0=Registers View Only
+RegistersView_0=Registers View &Only
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
index 9d1a632..1473e28 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
  * 	   Wind River - Pawel Piech - NPE when closing the Variables view (Bug 213719)
  *     Wind River - Pawel Piech - Fix viewer input race condition (Bug 234908)
  *     Wind River - Anton Leherbauer - Fix selection provider (Bug 254442)
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.variables;
 
@@ -32,6 +33,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.LazyModelPresentation;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
 import org.eclipse.debug.internal.ui.actions.CollapseAllAction;
 import org.eclipse.debug.internal.ui.actions.ConfigureColumnsAction;
@@ -73,6 +75,7 @@ import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.ISelection;
@@ -82,22 +85,33 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.events.FocusAdapter;
 import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPerspectiveDescriptor;
 import org.eclipse.ui.IPerspectiveListener;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.ISaveablePart;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchPage;
@@ -111,7 +125,6 @@ import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.progress.UIJob;
 import org.eclipse.ui.texteditor.IUpdate;
-import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
 
 /**
  * This view shows variables and their values for a particular stack frame
@@ -119,7 +132,7 @@ import org.eclipse.ui.views.navigator.LocalSelectionTransfer;
 public class VariablesView extends AbstractDebugView implements IDebugContextListener,
 	IPropertyChangeListener, IDebugExceptionHandler,
 	IPerspectiveListener, IModelChangedListener,
-	IViewerUpdateListener, IDetailPaneContainer2 {
+	IViewerUpdateListener, IDetailPaneContainer2, ISaveablePart {
 	
 	/**
 	 * Selection provider wrapping an exchangeable active selection provider.
@@ -204,7 +217,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * The model presentation used as the label provider for the tree viewer,
 	 * and also as the detail information provider for the detail pane.
 	 */
-	private VariablesViewModelPresentation fModelPresentation;
+	protected VariablesViewModelPresentation fModelPresentation;
 	
 	/**
 	 * The UI construct that provides a sliding sash between the variables tree
@@ -213,6 +226,32 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	private SashForm fSashForm;
 	
 	/**
+	 * Composite that holds the details pane and always remains
+	 */
+	private Composite fDetailsAnchor;
+	
+	/**
+	 * Composite that holds the separator container and detail pane control.
+	 * Gets disposed/created as the layout changes.
+	 */
+	private Composite fDetailsComposiste;
+	
+	/**
+	 * Separator used when detail pane background colors of tree/detail pane are different.
+	 */
+	private Label fSepearator;
+	
+	/**
+	 * Parent of the viewer, used to detect re-sizing for automatic layout
+	 */
+	private Composite fParent;
+	
+	/**
+	 * Whether the detail pane has been built yet.
+	 */
+	private boolean fPaneBuilt = false;
+	
+	/**
 	 * The detail pane that displays detailed information about the current selection
 	 * @since 3.3
 	 */
@@ -288,6 +327,11 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	protected static final String SASH_DETAILS_PART = DebugUIPlugin.getUniqueIdentifier() + ".SASH_DETAILS_PART"; //$NON-NLS-1$
 	
 	/**
+	 * Sash weights for a specific detail pane type
+	 */
+	protected static final String DETAIL_PANE_TYPE = "DETAIL_PANE_TYPE"; //$NON-NLS-1$
+	
+	/**
 	 * Key for "Find..." action.
 	 */
 	protected static final String VARIABLES_FIND_ELEMENT_ACTION = FIND_ACTION + ".Variables"; //$NON-NLS-1$
@@ -298,10 +342,15 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	protected static final String VARIABLES_SELECT_ALL_ACTION = SELECT_ALL_ACTION + ".Variables"; //$NON-NLS-1$
 	
 	/**
-	 * Key for "Select All" action.
+	 * Key for "Copy" action.
 	 */
 	protected static final String VARIABLES_COPY_ACTION = COPY_ACTION + ".Variables"; //$NON-NLS-1$	
 	
+	/**
+	 * Key for "Paste" action.
+	 */
+	protected static final String VARIABLES_PASTE_ACTION = PASTE_ACTION + ".Variables"; //$NON-NLS-1$	
+	
     /**
      * Visits deltas to determine if details should be displayed
      */
@@ -357,6 +406,11 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	private SelectionProviderWrapper fSelectionProvider;
     
 	/**
+	 * Presentation context for this view.
+	 */
+	private IPresentationContext fPresentationContext;
+	
+	/**
 	 * Remove myself as a selection listener
 	 * and preference change listener.
 	 *
@@ -373,6 +427,10 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 			viewer.removeModelChangedListener(this);
 			viewer.removeViewerUpdateListener(this);
 		}
+		if (fPresentationContext != null) {
+		    fPresentationContext.dispose();
+		    fPresentationContext = null;
+		}
 		if (fDetailPane != null) fDetailPane.dispose();
         fInputService.dispose();
         fSelectionProvider.dispose();
@@ -399,7 +457,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	protected void setViewerInput(Object context) {
         if (context == null) {
             // Clear the detail pane
-            fDetailPane.display(null);
+        	refreshDetailPaneContents();
         }
         
         Object current = getViewer().getInput();
@@ -432,13 +490,14 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * @see org.eclipse.debug.ui.AbstractDebugView#createViewer(Composite)
 	 */
 	public Viewer createViewer(Composite parent) {
-		
+		addResizeListener(parent);
+		fParent = parent;
 		fTriggerDetailsJob.setSystem(true);
 		
 		// create the sash form that will contain the tree viewer & text viewer
 		fSashForm = new SashForm(parent, SWT.NONE);
 		
-		fModelPresentation = new VariablesViewModelPresentation();
+		getModelPresentation();
 		DebugUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
 		JFaceResources.getFontRegistry().addListener(this);
 
@@ -446,12 +505,11 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		fInputService = new ViewerInputService(variablesViewer, fRequester);
 			
 		fSashForm.setMaximizedControl(variablesViewer.getControl());
-
+		fDetailsAnchor = SWTFactory.createComposite(fSashForm, parent.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0);
+		fSashForm.setWeights(getLastSashWeights());
+		
 		fSelectionProvider = new SelectionProviderWrapper(variablesViewer);
 		getSite().setSelectionProvider(fSelectionProvider);
-
-		fDetailPane = new DetailPaneProxy(this);
-		fDetailPane.display(null); // Bring up the default pane so the user doesn't see an empty composite
 		
 		createOrientationActions(variablesViewer);
 		IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore();
@@ -459,7 +517,15 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		for (int i = 0; i < fToggleDetailPaneActions.length; i++) {
 			fToggleDetailPaneActions[i].setChecked(fToggleDetailPaneActions[i].getOrientation().equals(orientation));
 		}
+		
+		fDetailPane = new DetailPaneProxy(this);
+		fDetailPane.addProperyListener(new IPropertyListener() {
+			public void propertyChanged(Object source, int propId) {
+				firePropertyChange(propId);
+			}
+		});
 		setDetailPaneOrientation(orientation);
+		
 		IMemento memento = getMemento();
 		if (memento != null) {
 			variablesViewer.initState(memento);
@@ -481,7 +547,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
      */
     protected void initDragAndDrop(TreeModelViewer viewer) {
         // Drag only
-        viewer.addDragSupport(DND.DROP_COPY, new Transfer[] {LocalSelectionTransfer.getInstance()}, new SelectionDragAdapter(viewer));
+        viewer.addDragSupport(DND.DROP_COPY, new Transfer[] {LocalSelectionTransfer.getTransfer()}, new SelectionDragAdapter(viewer));
     }    
 
 	/* (non-Javadoc)
@@ -510,20 +576,34 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
         // check the weights to makes sure they are valid -- bug 154025
         setLastSashWeights(DEFAULT_SASH_WEIGHTS);
 		if (mem != null) {
-			Integer sw = mem.getInteger(SASH_VIEW_PART);
-			if(sw != null) {
-				int view = sw.intValue();
-				sw = mem.getInteger(SASH_DETAILS_PART);
-				if(sw != null) {
-					int details = sw.intValue();
-					if(view > -1 & details > -1) {
-						setLastSashWeights(new int[] {view, details});
-					}
-				}
+			int[] weights = getWeights(mem);
+			if (weights != null) {
+				setLastSashWeights(weights);
 			}
 		}
 		site.getWorkbenchWindow().addPerspectiveListener(this);
     }
+	
+	/**
+	 * Returns sash weights stored in the given memento or <code>null</code> if none.
+	 * 
+	 * @param memento 
+	 * @return sash weights or <code>null</code>
+	 */
+	private int[] getWeights(IMemento memento) {
+		Integer sw = memento.getInteger(SASH_VIEW_PART);
+		if(sw != null) {
+			int view = sw.intValue();
+			sw = memento.getInteger(SASH_DETAILS_PART);
+			if(sw != null) {
+				int details = sw.intValue();
+				if(view > -1 & details > -1) {
+					return new int[] {view, details};
+				}
+			}
+		}
+		return null;
+	}
     
     /* (non-Javadoc)
      * @see org.eclipse.ui.part.PageBookView#partDeactivated(org.eclipse.ui.IWorkbenchPart)
@@ -580,8 +660,8 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	protected TreeModelViewer createTreeViewer(Composite parent) {
 		
 		int style = getViewerStyle();
-		final TreeModelViewer variablesViewer = new TreeModelViewer(parent, style,
-				new DebugModelPresentationContext(getPresentationContextId(), fModelPresentation));
+		fPresentationContext = new DebugModelPresentationContext(getPresentationContextId(), this, fModelPresentation); 
+		final TreeModelViewer variablesViewer = new TreeModelViewer(parent, style, fPresentationContext);
 		
 		variablesViewer.getControl().addFocusListener(new FocusAdapter() {
 			public void focusGained(FocusEvent e) {
@@ -589,6 +669,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 				fSelectionProvider.setActiveProvider(variablesViewer);
 				setAction(SELECT_ALL_ACTION, getAction(VARIABLES_SELECT_ALL_ACTION));
 				setAction(COPY_ACTION, getAction(VARIABLES_COPY_ACTION));
+				setAction(PASTE_ACTION, getAction(VARIABLES_PASTE_ACTION));
 				setAction(FIND_ACTION, getAction(VARIABLES_FIND_ELEMENT_ACTION));
 				getViewSite().getActionBars().updateActionBars();
 			}
@@ -598,6 +679,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 				setAction(SELECT_ALL_ACTION, null);
 				setAction(COPY_ACTION,null);
 				setAction(FIND_ACTION, null);
+				setAction(PASTE_ACTION, null);
 				getViewSite().getActionBars().updateActionBars();
 			}
 		});
@@ -643,6 +725,34 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		return IDebugHelpContextIds.VARIABLE_VIEW;		
 	}
 	
+	private void addResizeListener(Composite parent) {
+		parent.addControlListener(new ControlListener() {
+			public void controlMoved(ControlEvent e) {
+			}
+			public void controlResized(ControlEvent e) {
+				if (IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO.equals(fCurrentDetailPaneOrientation)) {
+					setDetailPaneOrientation(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO);
+				}
+			}
+		});
+	}
+	
+	/**
+	 * Returns vertical or horizontal based on view size.
+	 *  
+	 * @return vertical or horizontal
+	 */
+	int computeOrientation() {
+		Point size= fParent.getSize();
+		if (size.x != 0 && size.y != 0) {
+			if ((size.x / 3)> size.y)
+				return SWT.HORIZONTAL;
+			else
+				return SWT.VERTICAL;
+		}
+		return SWT.HORIZONTAL;
+	}	
+	
 	/**
 	 * Set the orientation of the details pane so that is one of:
 	 * - underneath the main tree view
@@ -650,20 +760,56 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * - not visible
 	 */
 	public void setDetailPaneOrientation(String orientation) {
-		if (orientation.equals(fCurrentDetailPaneOrientation)) {
+		if (!IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO.equals(orientation) && orientation.equals(fCurrentDetailPaneOrientation)) {
 			return;
 		}
+		fCurrentDetailPaneOrientation  = orientation;
+		DebugUIPlugin.getDefault().getPreferenceStore().setValue(getDetailPanePreferenceKey(), orientation);
 		if (orientation.equals(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_HIDDEN)) {
 			hideDetailPane();
 		} else {
-			int vertOrHoriz = orientation.equals(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH) ? SWT.VERTICAL : SWT.HORIZONTAL;
-			fSashForm.setOrientation(vertOrHoriz);	
-			if (IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_HIDDEN.equals(fCurrentDetailPaneOrientation)) {
-				showDetailPane();	
+			int vertOrHoriz = -1;
+			if (orientation.equals(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO)) {
+				vertOrHoriz = computeOrientation();
+				if (fPaneBuilt && fSashForm.getOrientation() == vertOrHoriz) {
+					return;
+				}
+			} else {
+				vertOrHoriz = orientation.equals(IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH) ? SWT.VERTICAL : SWT.HORIZONTAL;
+				
 			}
+			buildDetailPane(vertOrHoriz);
+		}
+	}
+	
+	private void buildDetailPane(int orientation) {
+		try {
+			fDetailsAnchor.setRedraw(false);
+			if (fDetailsComposiste != null) {
+				fDetailPane.dispose();
+				fDetailsComposiste.dispose();
+			}
+			fSashForm.setOrientation(orientation);
+			if (orientation == SWT.VERTICAL) {
+				fDetailsComposiste = SWTFactory.createComposite(fDetailsAnchor, fDetailsAnchor.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0);
+				GridLayout layout = (GridLayout) fDetailsComposiste.getLayout();
+				layout.verticalSpacing = 0;
+				fSepearator = new Label(fDetailsComposiste, SWT.SEPARATOR| SWT.HORIZONTAL);
+				fSepearator.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+			} else {
+				fDetailsComposiste = SWTFactory.createComposite(fDetailsAnchor, fDetailsAnchor.getFont(), 2, 1, GridData.FILL_BOTH, 0, 0);
+				GridLayout layout = (GridLayout) fDetailsComposiste.getLayout();
+				layout.horizontalSpacing = 0;
+				fSepearator= new Label(fDetailsComposiste, SWT.SEPARATOR | SWT.VERTICAL);
+				fSepearator.setLayoutData(new GridData(SWT.TOP, SWT.FILL, false, true));
+			}
+			// force update so detail pane can adapt to orientation change
+			showDetailPane();
+		} finally {
+			fDetailsAnchor.layout(true);
+			fDetailsAnchor.setRedraw(true);
+			fPaneBuilt = true;
 		}
-		fCurrentDetailPaneOrientation  = orientation;
-		DebugUIPlugin.getDefault().getPreferenceStore().setValue(getDetailPanePreferenceKey(), orientation);
 	}
 	
 	/**
@@ -764,6 +910,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	protected void createContextMenu(Control menuControl) {
 		super.createContextMenu(menuControl);
 		setAction(VARIABLES_COPY_ACTION, getAction(COPY_ACTION));
+		setAction(VARIABLES_PASTE_ACTION, getAction(PASTE_ACTION));
 	}
 
 	/**
@@ -775,16 +922,18 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		IActionBars actionBars = getViewSite().getActionBars();
 		IMenuManager viewMenu = actionBars.getMenuManager();
 		
-		fToggleDetailPaneActions = new ToggleDetailPaneAction[3];
+		fToggleDetailPaneActions = new ToggleDetailPaneAction[4];
 		fToggleDetailPaneActions[0] = new ToggleDetailPaneAction(this, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_UNDERNEATH, null);
 		fToggleDetailPaneActions[1] = new ToggleDetailPaneAction(this, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_RIGHT, null);
-		fToggleDetailPaneActions[2] = new ToggleDetailPaneAction(this, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_HIDDEN, getToggleActionLabel());
+		fToggleDetailPaneActions[2] = new ToggleDetailPaneAction(this, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_AUTO, null);
+		fToggleDetailPaneActions[3] = new ToggleDetailPaneAction(this, IDebugPreferenceConstants.VARIABLES_DETAIL_PANE_HIDDEN, getToggleActionLabel());
 		viewMenu.add(new Separator());
 		final MenuManager layoutSubMenu = new MenuManager(VariablesViewMessages.VariablesView_40);
 		layoutSubMenu.setRemoveAllWhenShown(true);
 		layoutSubMenu.add(fToggleDetailPaneActions[0]);
 		layoutSubMenu.add(fToggleDetailPaneActions[1]);
 		layoutSubMenu.add(fToggleDetailPaneActions[2]);
+		layoutSubMenu.add(fToggleDetailPaneActions[3]);
 		viewMenu.add(layoutSubMenu);
 		viewMenu.add(new Separator());
 		
@@ -796,6 +945,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 				layoutSubMenu.add(fToggleDetailPaneActions[0]);
 				layoutSubMenu.add(fToggleDetailPaneActions[1]);
 				layoutSubMenu.add(fToggleDetailPaneActions[2]);
+				layoutSubMenu.add(fToggleDetailPaneActions[3]);
 				IAction action = getAction("ToggleColmns"); //$NON-NLS-1$
 				((IUpdate)action).update();
 				if (action.isEnabled()) {
@@ -843,7 +993,10 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		menu.add(new Separator(IDebugUIConstants.EMPTY_VARIABLE_GROUP));
 		menu.add(new Separator(IDebugUIConstants.VARIABLE_GROUP));
 		menu.add(getAction(VARIABLES_FIND_ELEMENT_ACTION));
-		menu.add(getAction("ChangeVariableValue")); //$NON-NLS-1$
+		ChangeVariableValueAction changeValueAction = (ChangeVariableValueAction)getAction("ChangeVariableValue"); //$NON-NLS-1$
+		if (changeValueAction.isApplicable()) {
+		    menu.add(changeValueAction); 
+		}
 		menu.add(new Separator());
 		IAction action = new AvailableLogicalStructuresAction(this);
 		if (action.isEnabled()) {
@@ -909,7 +1062,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite()
 	 */
 	public Composite getParentComposite() {
-		return fSashForm;
+		return fDetailsComposiste;
 	}
 
 	/* (non-Javadoc)
@@ -923,7 +1076,34 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents()
 	 */
 	public void refreshDetailPaneContents() {
-		fDetailPane.display(getCurrentSelection());
+		if (isDetailPaneVisible()) {
+			String currentPaneID = getCurrentPaneID();
+			if (currentPaneID != null) {
+				fLastSashWeights = fSashForm.getWeights();
+			}
+			fDetailPane.display(getCurrentSelection());
+			// Adjust sash background color settings and separator based on detail pane background color:
+			//   When the backgrounds are the same, the sash should have a default background, else it should be
+			//   invisible and the label separator should appear with the same background color as the detail pane
+			Control control = fDetailPane.getCurrentControl();
+			if (control.getBackground().equals(fDetailsAnchor.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND))) {
+				// don't show the label separator
+				if (!fSepearator.isDisposed()) {
+					getDefaultControl().setBackground(fDetailsAnchor.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+					fSepearator.dispose();
+					fDetailsComposiste.layout(true);
+				}
+			} else {
+				// show the label separator and make sash invisible
+				if (fSepearator.isDisposed()) {
+					// re-build the detail pane with the separator
+					buildDetailPane(fSashForm.getOrientation());
+					return;
+				}
+				getDefaultControl().setBackground(fDetailsAnchor.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+				fSepearator.setBackground(control.getBackground());
+			}
+		}
 	}
 
 	/* (non-Javadoc)
@@ -980,7 +1160,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * @return whether the detail pane is visible to the user
 	 */
 	protected boolean isDetailPaneVisible() {
-		return !fToggleDetailPaneActions[2].isChecked();
+		return !fToggleDetailPaneActions[3].isChecked();
 	}
 	
 	/* (non-Javadoc)
@@ -1030,6 +1210,24 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		IAction action = getAction(DOUBLE_CLICK_ACTION);
 		if (action != null && action.isEnabled()) {
 			action.run();
+		} else {
+			ISelection selection = getVariablesViewer().getSelection();
+			if (selection instanceof TreeSelection) {
+				TreeSelection ss = (TreeSelection) selection;
+				if (ss.size() == 1) {
+					Widget item = getVariablesViewer().findItem(ss.getPaths()[0]);
+					if (item instanceof TreeItem) {
+						TreeItem ti = (TreeItem) item;
+						if (ti.getExpanded()) {
+							ti.setExpanded(false);
+						} else {
+							// need to trigger proper children updates when expanding
+							getVariablesViewer().expandToLevel(ss.getPaths()[0], 1);
+						}
+					}
+					
+				}
+			}
 		}
 	}	
 
@@ -1084,7 +1282,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	 * @see org.eclipse.debug.ui.AbstractDebugView#becomesHidden()
 	 */
 	protected void becomesHidden() {
-        fInputService.resolveViewerInput(null);
+        fInputService.resolveViewerInput(ViewerInputService.NULL_INPUT);
 		super.becomesHidden();
 	}
 
@@ -1125,6 +1323,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		if(changeId.equals(IWorkbenchPage.CHANGE_RESET)) {
 			setLastSashWeights(DEFAULT_SASH_WEIGHTS);
 			fSashForm.setWeights(DEFAULT_SASH_WEIGHTS);
+			fSashForm.layout(true);
 		}
 	}
 
@@ -1142,7 +1341,7 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 	public void updateComplete(IViewerUpdate update) {
 		IStatus status = update.getStatus();
 		if (!update.isCanceled()) {
-			if (status != null && status.getCode() != IStatus.OK) {
+			if (status != null && !status.isOK()) {
 				showMessage(status.getMessage());
 			} else {
 				showViewer();
@@ -1215,4 +1414,39 @@ public class VariablesView extends AbstractDebugView implements IDebugContextLis
 		// change active provider
 		fSelectionProvider.setActiveProvider(provider);
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor monitor) {
+		fDetailPane.doSave(monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSaveAs()
+	 */
+	public void doSaveAs() {
+		fDetailPane.doSaveAs();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isDirty()
+	 */
+	public boolean isDirty() {
+		return fDetailPane.isDirty();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
+	 */
+	public boolean isSaveAsAllowed() {
+		return fDetailPane.isSaveAsAllowed();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
+	 */
+	public boolean isSaveOnCloseNeeded() {
+		return fDetailPane.isSaveOnCloseNeeded();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.properties
index fced64e..162fe53 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/VariablesViewMessages.properties
@@ -1,20 +1,20 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
 ToggleObjectBrowsersAction_1=Show Logical Structure
 ToggleShowColumnsAction_0=&Show Columns
 ToggleShowColumnsAction_1=Show Columns
-VariablesView_41=Variables View Only
+VariablesView_41=Variables View &Only
 VariablesView_40=&Layout
-ExpressionView_4=Expressions View Only
+ExpressionView_4=Expressions View &Only
 
 AvailableLogicalStructuresAction_0=Select From Available Logical Structures
 AvailableLogicalStructuresAction_1=&Show Structure As
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
index 7b55abc..421605e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPane.java
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640)
  *     Wind River - Anton Leherbauer - Fix selection provider (Bug 254442)
+ *     Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
  *******************************************************************************/
 package org.eclipse.debug.internal.ui.views.variables.details;
 
@@ -16,7 +17,7 @@ import java.util.Iterator;
 import java.util.ResourceBundle;
 
 import org.eclipse.core.commands.operations.IUndoContext;
-
+import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -24,6 +25,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IExpression;
 import org.eclipse.debug.core.model.IValue;
@@ -37,6 +39,7 @@ import org.eclipse.debug.internal.ui.VariablesViewModelPresentation;
 import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneAssignValueAction;
 import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneMaxLengthAction;
 import org.eclipse.debug.internal.ui.actions.variables.details.DetailPaneWordWrapAction;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.IBreakpointContainer;
 import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
 import org.eclipse.debug.internal.ui.views.variables.IndexedValuePartition;
 import org.eclipse.debug.ui.IDebugModelPresentation;
@@ -92,11 +95,11 @@ import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.console.actions.TextViewerAction;
 import org.eclipse.ui.handlers.IHandlerActivation;
 import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.model.IWorkbenchAdapter;
 import org.eclipse.ui.operations.OperationHistoryActionHandler;
 import org.eclipse.ui.operations.RedoActionHandler;
 import org.eclipse.ui.operations.UndoActionHandler;
 import org.eclipse.ui.progress.WorkbenchJob;
-
 import org.eclipse.ui.texteditor.FindReplaceAction;
 import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
 import org.eclipse.ui.texteditor.ITextEditorActionConstants;
@@ -198,6 +201,20 @@ public class DefaultDetailPane extends AbstractDetailPane implements IDetailPane
 					}
 				} else if (element instanceof IExpression) {
 					val = ((IExpression)element).getValue();
+				} else if (element instanceof IBreakpoint) {
+					IBreakpoint bp = (IBreakpoint) element;
+					message = bp.getMarker().getAttribute(IMarker.MESSAGE, ""); //$NON-NLS-1$
+				} else if (element instanceof IBreakpointContainer) {
+					IBreakpointContainer c = (IBreakpointContainer) element;
+		            IAdaptable category = c.getCategory();
+		            if (category != null) {
+			            IWorkbenchAdapter adapter = (IWorkbenchAdapter) category.getAdapter(IWorkbenchAdapter.class);
+			            if (adapter != null) {
+			                message = adapter.getLabel(category);
+			            } else {
+			            	message = c.getOrganizer().getLabel();
+			            }
+		            }					
 				}
 				// When selecting a index partition, clear the pane
 				if (val instanceof IndexedValuePartition) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
index eb3c88e..a013445 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DefaultDetailPaneFactory.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -33,7 +33,11 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
 	 * @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#createDetailsArea(java.lang.String)
 	 */
 	public IDetailPane createDetailPane(String id) {
-		return new DefaultDetailPane();
+		if (MessageDetailPane.ID.equals(id)) {
+			return new MessageDetailPane();
+		} else {
+			return new DefaultDetailPane();
+		}
 	}
 
 	/* (non-Javadoc)
@@ -60,6 +64,9 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
 		if (id.equals(DefaultDetailPane.ID)){
 			return DefaultDetailPane.NAME;
 		}
+		if (id.equals(MessageDetailPane.ID)) {
+			return MessageDetailPane.NAME;
+		}
 		return null;
 	}
 	
@@ -71,6 +78,9 @@ public class DefaultDetailPaneFactory implements IDetailPaneFactory {
 		if (id.equals(DefaultDetailPane.ID)){
 			return DefaultDetailPane.DESCRIPTION;
 		}
+		if (id.equals(MessageDetailPane.ID)) {
+			return MessageDetailPane.DESCRIPTION;
+		}
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java
index bd7b921..db5e6f7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,8 @@ public class DetailMessages extends NLS {
 	public static String DetailPaneProxy_1;
 	public static String DetailPaneProxy_2;
 	public static String DetailPaneProxy_3;
+	public static String MessageDetailPane_0;
+	public static String MessageDetailPane_1;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, DetailMessages.class);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties
index 3653aba..5b0692c 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2008 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -26,3 +26,5 @@ DetailPaneProxy_0=Problem displaying detail pane, see log for details.
 DetailPaneProxy_1=No details to display for the current selection.
 DetailPaneProxy_2=The detail pane with ID {0} did not create and return a control.
 DetailPaneProxy_3=Could not create the detail pane with ID {0}
+MessageDetailPane_0=Message Detail Pane
+MessageDetailPane_1=Displays a message
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
index cc57ef7..2ea40e9 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -243,6 +243,7 @@ public class DetailPaneManager {
 	
 	private DetailPaneManager(){
 		fFactoriesByPaneID = new HashMap();
+		fFactoriesByPaneID.put(MessageDetailPane.ID, new DefaultDetailPaneFactory());
 	}
 	
 	public static DetailPaneManager getDefault(){
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
index 251e5c6..2a5b31e 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,19 +13,25 @@ package org.eclipse.debug.internal.ui.views.variables.details;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.IDetailPane;
 import org.eclipse.debug.ui.IDetailPane2;
+import org.eclipse.debug.ui.IDetailPane3;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.events.FocusAdapter;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.ISaveablePart;
 import org.eclipse.ui.IWorkbenchPartSite;
 
 import com.ibm.icu.text.MessageFormat;
@@ -43,7 +49,7 @@ import com.ibm.icu.text.MessageFormat;
  * @see DetailPaneManager
  * @since 3.3
  */
-public class DetailPaneProxy {
+public class DetailPaneProxy implements ISaveablePart {
 	
 	/**
 	 * The IDetailPane currently being used to display detailed information.
@@ -61,6 +67,11 @@ public class DetailPaneProxy {
 	private IDetailPaneContainer fParentContainer;
 	
 	/**
+	 * Property listeners
+	 */
+	private ListenerList fListeners = new ListenerList();
+	
+	/**
 	 * Constructor that sets up the detail pane for a view.  Note that no default pane
 	 * is created, so a control will not be created until <code>display</code> is called.
 	 * 
@@ -80,16 +91,33 @@ public class DetailPaneProxy {
 	 */
 	public void display(IStructuredSelection selection){
 		
+		IDetailPane3 saveable = getSaveable();
+		boolean clean = false;
+		if (saveable != null && saveable.isDirty() && saveable.isSaveOnCloseNeeded()) {
+			// save the contents before changing
+			saveable.doSave(null);
+		}
+		
 		if ((selection == null || selection.isEmpty()) && fCurrentPane != null){
 			fCurrentPane.display(selection);
+			if (clean) {
+				fireDirty();
+			}
 			return;
 		}
 		
 		String preferredPaneID = DetailPaneManager.getDefault().getPreferredPaneFromSelection(selection);
+		if (preferredPaneID == null) {
+			preferredPaneID = MessageDetailPane.ID;
+			selection = new StructuredSelection(DetailMessages.DetailPaneProxy_1);
+		}
 		
 		// Don't change anything if the preferred pane is the current pane
-		if (fCurrentPane != null && preferredPaneID != null && preferredPaneID.equals(fCurrentPane.getID())){
+		if (fCurrentPane != null && preferredPaneID.equals(fCurrentPane.getID())){
 			fCurrentPane.display(selection);
+			if (clean) {
+				fireDirty();
+			}
 			return;
 		}
 		
@@ -97,10 +125,23 @@ public class DetailPaneProxy {
 		
 		// Inform the container that a new detail pane is being used
 		fParentContainer.paneChanged(preferredPaneID);
+		if (clean) {
+			fireDirty();
+		}
 
 	}
 	
 	/**
+	 * Fires dirty property change.
+	 */
+	private void fireDirty() {
+		Object[] listeners = fListeners.getListeners();
+		for (int i = 0; i < listeners.length; i++) {
+			((IPropertyListener)listeners[i]).propertyChanged(this, PROP_DIRTY);
+		}
+	}
+	
+	/**
 	 * Tells the current detail pane (if one exists) that it is gaining focus.
 	 * 
 	 * @return true if the current pane successfully set focus to a control, false otherwise
@@ -116,8 +157,14 @@ public class DetailPaneProxy {
 	 * Disposes of the current pane.
 	 */
 	public void dispose(){
-		if (fCurrentPane != null)	fCurrentPane.dispose();
-		if (fCurrentControl != null && !fCurrentControl.isDisposed()) fCurrentControl.dispose();
+		if (fCurrentPane != null)	{
+			fCurrentPane.dispose();
+			fCurrentPane = null;
+		}
+		if (fCurrentControl != null && !fCurrentControl.isDisposed()) {
+			fCurrentControl.dispose();
+			fCurrentControl = null;
+		}
 	}
 	
 	/**
@@ -154,14 +201,22 @@ public class DetailPaneProxy {
 	 * @param selection the selection to display
 	 */
 	private void setupPane(String paneID, IStructuredSelection selection) {
-		if (fCurrentPane != null) fCurrentPane.dispose();
-		if (fCurrentControl != null && !fCurrentControl.isDisposed()) fCurrentControl.dispose();
-		fCurrentPane = null;
-		if (paneID != null){
+		try {
+			fParentContainer.getParentComposite().setRedraw(false);
+			if (fCurrentPane != null) fCurrentPane.dispose();
+			if (fCurrentControl != null && !fCurrentControl.isDisposed()) fCurrentControl.dispose();
+			fCurrentPane = null;
 			fCurrentPane = DetailPaneManager.getDefault().getDetailPaneFromID(paneID);
 			if (fCurrentPane != null){
 				final IWorkbenchPartSite workbenchPartSite = fParentContainer.getWorkbenchPartSite();
 				fCurrentPane.init(workbenchPartSite);
+				IDetailPane3 saveable = getSaveable();
+				if (saveable != null) {
+					Object[] listeners = fListeners.getListeners();
+					for (int i = 0; i < listeners.length; i++) {
+						saveable.addPropertyListener((IPropertyListener) listeners[i]);
+					}
+				}
 				fCurrentControl = fCurrentPane.createControl(fParentContainer.getParentComposite());
 				if (fCurrentControl != null){
 					fParentContainer.getParentComposite().layout(true);
@@ -184,8 +239,8 @@ public class DetailPaneProxy {
 				createErrorLabel(DetailMessages.DetailPaneProxy_0);
 				DebugUIPlugin.log(new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), MessageFormat.format(DetailMessages.DetailPaneProxy_3, new String[]{paneID}))));
 			}
-		} else {
-			createErrorLabel(DetailMessages.DetailPaneProxy_1);
+		} finally {
+			fParentContainer.getParentComposite().setRedraw(true);
 		}
 	}
 
@@ -219,11 +274,89 @@ public class DetailPaneProxy {
 	private void createErrorLabel(String message){
 		if (fCurrentPane != null) fCurrentPane.dispose();
 		if (fCurrentControl != null && !fCurrentControl.isDisposed()) fCurrentControl.dispose();
-		Label errorLabel = new Label(fParentContainer.getParentComposite(),SWT.LEFT);
-		errorLabel.setText(message);
-		errorLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
-		fCurrentControl = errorLabel;
+		fCurrentControl = SWTFactory.createComposite(fParentContainer.getParentComposite(), 1, 1, GridData.FILL_HORIZONTAL);
+		SWTFactory.createLabel((Composite) fCurrentControl, message, 1);
 		fParentContainer.getParentComposite().layout();
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor monitor) {
+		ISaveablePart saveable = getSaveable();
+		if (saveable != null) {
+			saveable.doSave(monitor);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSaveAs()
+	 */
+	public void doSaveAs() {
+		ISaveablePart saveable = getSaveable();
+		if (saveable != null) {
+			saveable.doSaveAs();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isDirty()
+	 */
+	public boolean isDirty() {
+		ISaveablePart saveable = getSaveable();
+		if (saveable != null) {
+			return saveable.isDirty();
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
+	 */
+	public boolean isSaveAsAllowed() {
+		ISaveablePart saveable = getSaveable();
+		if (saveable != null) {
+			return saveable.isSaveAsAllowed();
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
+	 */
+	public boolean isSaveOnCloseNeeded() {
+		ISaveablePart saveable = getSaveable();
+		if (saveable != null) {
+			return saveable.isSaveOnCloseNeeded();
+		}
+		return false;
+	}
 	
+	/**
+	 * Returns the active saveable part or <code>null</code> if none.
+	 * 
+	 * @return saveable part or <code>null</code>
+	 */
+	IDetailPane3 getSaveable() {
+		if (fCurrentPane instanceof IDetailPane3) {
+			return (IDetailPane3) fCurrentPane;
+		}
+		return null;
+	}
+	
+	public void addProperyListener(IPropertyListener listener) {
+		fListeners.add(listener);
+		IDetailPane3 saveable = getSaveable();
+		if (saveable != null) {
+			saveable.addPropertyListener(listener);
+		}
+	}
+	
+	public void removePropertyListener(IPropertyListener listener) {
+		fListeners.remove(listener);
+		IDetailPane3 saveable = getSaveable();
+		if (saveable != null) {
+			saveable.removePropertyListener(listener);
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java
new file mode 100644
index 0000000..8fb6218
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/MessageDetailPane.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.views.variables.details;
+
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.debug.ui.IDetailPane;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbenchPartSite;
+
+/**
+ * A detail pane that displays a message in a wrapped label. Not contributed by an extension
+ * point - used internally to display messages.
+ * 
+ * @since 3.6
+ */
+public class MessageDetailPane implements IDetailPane {
+	
+	public static final String ID = IDebugUIConstants.PLUGIN_ID + ".detailpanes.message"; //$NON-NLS-1$
+	public static final String NAME = DetailMessages.MessageDetailPane_0;
+	public static final String DESCRIPTION = DetailMessages.MessageDetailPane_1;
+		
+	/**
+	 * Composite that contains the label that has margins.
+	 */
+	private Composite fControlParent;
+	
+	/**
+	 * Label control
+	 */
+	private Label fLabel;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
+	 */
+	public void init(IWorkbenchPartSite partSite) {
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#dispose()
+	 */
+	public void dispose() {
+		fControlParent.dispose();
+	}	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		fControlParent = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
+		fLabel = SWTFactory.createWrapLabel(fControlParent, "", 1); //$NON-NLS-1$
+		return fControlParent;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#setFocus()
+	 */
+	public boolean setFocus() {
+		return false;
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public void display(IStructuredSelection selection) {
+		// re-create controls if the layout has changed
+		if (selection != null && selection.size() == 1) {
+			Object input = selection.getFirstElement();
+			if (input instanceof String) {
+				String message = (String) input;
+				fLabel.setText(message);
+				fControlParent.layout(true);
+			}
+		} else if (selection == null || selection.isEmpty()) {
+			// clear the message
+			fLabel.setText(""); //$NON-NLS-1$
+			fControlParent.layout(true);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#getID()
+	 */
+	public String getID() {
+		return ID;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#getName()
+	 */
+	public String getName() {
+		return NAME;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#getDescription()
+	 */
+	public String getDescription() {
+		return DESCRIPTION;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java
index 438180c..8c1b2ad 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractBreakpointOrganizerDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.views.breakpoints.OtherBreakpointCategory;
+import org.eclipse.debug.internal.ui.breakpoints.provisional.OtherBreakpointCategory;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
index a0eb8f5..ab8e727 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import java.util.Set;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.DelegatingModelPresentation;
 import org.eclipse.debug.internal.ui.LazyModelPresentation;
+import org.eclipse.debug.internal.ui.actions.breakpoints.SkipAllBreakpointsAction;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IContributionItem;
@@ -604,13 +605,14 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
 					for (int i = 0; i < items.length; i++) {
 						if (items[i] instanceof ActionContributionItem) {
 							IAction action = ((ActionContributionItem)items[i]).getAction();
-							if (action.getStyle() == IAction.AS_CHECK_BOX) {
-								initActionState(action);	
-								if (action.isChecked()) {
-									action.run();
+							if (!SkipAllBreakpointsAction.ACTION_ID.equals(action.getId())) {
+								if (action.getStyle() == IAction.AS_CHECK_BOX) {
+									initActionState(action);	
+									if (action.isChecked()) {
+										action.run();
+									}
 								}
-							}
-						}
+							}}
 					}
 					setMemento(null);
 				}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
index bf1522f..051ebd3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractLaunchConfigurationTab.java
@@ -11,6 +11,10 @@
 package org.eclipse.debug.ui;
 
  
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -25,6 +29,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.progress.WorkbenchJob;
 
 /**
  * Common function for launch configuration tabs.
@@ -66,6 +71,12 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura
 	 * @since 2.1
 	 */
 	private boolean fDirty = true;	
+	
+	/**
+	 * Job to update the tab after a delay. Used to delay updates while
+	 * the user is typing.
+	 */
+	private Job fRereshJob;	
 		
 	/**
 	 * Returns the dialog this tab is contained in, or
@@ -373,6 +384,62 @@ public abstract class AbstractLaunchConfigurationTab implements ILaunchConfigura
 	public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
 		performApply(workingCopy);
 	}
+	
+	/**
+	 * Returns the job to update the launch configuration dialog.
+	 * 
+	 * @return update job
+	 */
+	private Job getUpdateJob() {
+		if (fRereshJob == null) {
+			fRereshJob = createUpdateJob();
+			fRereshJob.setSystem(true);
+		}
+		return fRereshJob;
+	}
+	
+	/**
+	 * Schedules the update job to run for this tab based on this tab's delay.
+	 * 
+	 * @since 3.6
+	 */
+	protected void scheduleUpdateJob() {
+		Job job = getUpdateJob();
+		job.cancel(); // cancel existing job
+		job.schedule(getUpdateJobDelay());
+	}
+	
+	/**
+	 * Creates and returns a job used to update the launch configuration dialog
+	 * for this tab. Subclasses may override.
+	 * 
+	 * @return job to update the launch dialog for this tab
+	 * @since 3.6
+	 */
+	protected Job createUpdateJob() {
+		return  new WorkbenchJob(getControl().getDisplay(), "Update LCD") { //$NON-NLS-1$
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				if (!getControl().isDisposed()) {
+					updateLaunchConfigurationDialog();
+				}
+				return Status.OK_STATUS;
+			}
+			public boolean shouldRun() {
+				return !getControl().isDisposed();
+			}
+		};
+	}
+	
+	/**
+	 * Return the time delay that should be used when scheduling the
+	 * update job. Subclasses may override.
+	 * 
+	 * @return a time delay in milliseconds before the job should run
+	 * @since 3.6
+	 */
+	protected long getUpdateJobDelay() {
+		return 200;
+	}	
 
 }
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java
index 32e60a0..1ce0c46 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/BreakpointTypeCategory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,4 +106,8 @@ public class BreakpointTypeCategory extends PlatformObject implements IBreakpoin
 	public Object getParent(Object o) {
 		return null;
 	}
+	
+	public String toString() {
+	    return fName;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index b3a6cc8..8c8df2f 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,7 @@ import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationMan
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsMessages;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -66,7 +67,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.ContainerSelectionDialog;
@@ -91,25 +91,13 @@ import com.ibm.icu.text.MessageFormat;
 public class CommonTab extends AbstractLaunchConfigurationTab {
 	
 	/**
-	 * Provides a persistible dialog for selecting the shared project location
-	 * @since 3.2
+	 * Constant representing the id of the {@link IDialogSettings} location for the {@link ContainerSelectionDialog} used
+	 * on this tab
+	 * 
+	 * @since 3.6
 	 */
-	class SharedLocationSelectionDialog extends ContainerSelectionDialog {
-		private final String SETTINGS_ID = IDebugUIConstants.PLUGIN_ID + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$
-		
-		public SharedLocationSelectionDialog(Shell parentShell, IContainer initialRoot, boolean allowNewContainerName, String message) {
-			super(parentShell, initialRoot, allowNewContainerName, message);
-		}
-
-		protected IDialogSettings getDialogBoundsSettings() {
-			IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
-			IDialogSettings section = settings.getSection(SETTINGS_ID);
-			if (section == null) {
-				section = settings.addNewSection(SETTINGS_ID);
-			} 
-			return section;
-		}
-	}
+	private final String SHARED_LAUNCH_CONFIGURATON_DIALOG = IDebugUIConstants.PLUGIN_ID + ".SHARED_LAUNCH_CONFIGURATON_DIALOG"; //$NON-NLS-1$
+	private final String WORKSPACE_SELECTION_DIALOG = IDebugUIConstants.PLUGIN_ID + ".WORKSPACE_SELECTION_DIALOG"; //$NON-NLS-1$
 	
 	/**
 	 * This attribute exists solely for the purpose of making sure that invalid shared locations
@@ -146,7 +134,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
 	 */
 	private ModifyListener fBasicModifyListener = new ModifyListener() {
 		public void modifyText(ModifyEvent evt) {
-			updateLaunchConfigurationDialog();
+			scheduleUpdateJob();
 		}
 	};
     
@@ -168,6 +156,19 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
 	}
 	
 	/**
+	 * @return the {@link IDialogSettings} to pass into the {@link ContainerSelectionDialog}
+	 * @since 3.6
+	 */
+	IDialogSettings getDialogBoundsSettings(String id) {
+		IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
+		IDialogSettings section = settings.getSection(id);
+		if (section == null) {
+			section = settings.addNewSection(id);
+		} 
+		return section;
+	}
+	
+	/**
 	 * Creates the favorites control
 	 * @param parent the parent composite to add this one to
 	 * @since 3.2
@@ -272,11 +273,14 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
                 dialog.setMessage(LaunchConfigurationsMessages.CommonTab_14); 
                 dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); 
                 dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
+                dialog.setDialogBoundsSettings(getDialogBoundsSettings(WORKSPACE_SELECTION_DIALOG), Dialog.DIALOG_PERSISTSIZE);
                 if (dialog.open() == IDialogConstants.OK_ID) {
                     IResource resource = (IResource) dialog.getFirstResult();
-                    String arg = resource.getFullPath().toString();
-                    String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
-                    fFileText.setText(fileLoc);
+                    if(resource != null) {
+                    	String arg = resource.getFullPath().toString();
+                    	String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$
+                    	fFileText.setText(fileLoc);
+                    }
                 }
             }
         });
@@ -469,11 +473,12 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
 	private void handleSharedLocationButtonSelected() { 
 		String currentContainerString = fSharedLocationText.getText();
 		IContainer currentContainer = getContainer(currentContainerString);
-		SharedLocationSelectionDialog dialog = new SharedLocationSelectionDialog(getShell(),
+		ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(),
 				   currentContainer,
 				   false,
 				   LaunchConfigurationsMessages.CommonTab_Select_a_location_for_the_launch_configuration_13);
 		dialog.showClosedProjects(false);
+		dialog.setDialogBoundsSettings(getDialogBoundsSettings(SHARED_LAUNCH_CONFIGURATON_DIALOG), Dialog.DIALOG_PERSISTSIZE);
 		dialog.open();
 		Object[] results = dialog.getResult();	
 		if ((results != null) && (results.length > 0) && (results[0] instanceof IPath)) {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java
index 4a0f07f..124bd97 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/DebugPopup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@ public abstract class DebugPopup extends PopupDialog {
      *  the dialog, or <code>null</code>
      */
     public DebugPopup(Shell parent, Point anchor, String commandId) {
-        super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, true, true, false, null, null);
+        super(parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, false, true, true, false, null, null);
         fAnchor = anchor;
         fCommandId = commandId;
     }
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
index ecefe76..411e523 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java
@@ -14,6 +14,7 @@ package org.eclipse.debug.ui;
 
 
 import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchManager;
  
 /**
  * Constant definitions for debug UI plug-in.
@@ -861,7 +862,7 @@ public interface IDebugUIConstants {
 	 * 
 	 * @since 2.0
 	 */
-	public static final String ATTR_PRIVATE = PLUGIN_ID + ".private"; //$NON-NLS-1$
+	public static final String ATTR_PRIVATE = ILaunchManager.ATTR_PRIVATE;
 	
 	/**
 	 * Launch configuration attribute - a boolean value that indicates if the launch configuration
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java
new file mode 100644
index 0000000..fd299c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDetailPane3.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.ui;
+
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.ISaveablePart;
+import org.eclipse.ui.IWorkbenchPartConstants;
+
+/**
+ * An extension to the detail pane interface which allows implementors to
+ * save contents of the details pane.
+ * <p>
+ * Clients may implement this interface.
+ * </p>
+ * 
+ * @since 3.6
+ */
+public interface IDetailPane3 extends IDetailPane, ISaveablePart {
+
+	/**
+	 * Adds a listener for changes to properties in this detail pane.
+	 * Has no effect if an identical listener is already registered.
+	 * <p>
+	 * The property ids are defined in {@link IWorkbenchPartConstants}.
+	 * </p>
+	 *
+	 * @param listener a property listener
+	 */
+	public void addPropertyListener(IPropertyListener listener);
+	
+	/**
+	 * Removes the given property listener from this workbench part.
+	 * Has no affect if an identical listener is not registered.
+	 *
+	 * @param listener a property listener
+	 */
+    public void removePropertyListener(IPropertyListener listener);	
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
index 2144d26..e1d7b1d 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,7 @@ public class InspectPopupDialog extends DebugPopup {
     private static final int MIN_WIDTH = 300;
     private static final int MIN_HEIGHT = 250;
 
+    private IPresentationContext fContext;
     private TreeModelViewer fViewer;
     private SashForm fSashForm;
     private Composite fDetailPaneComposite;
@@ -100,17 +101,17 @@ public class InspectPopupDialog extends DebugPopup {
         fSashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
 
         VariablesView view = getViewToEmulate();
-        IPresentationContext context = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW);
+        fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW, view);
         if (view != null) {
         	// copy over properties
         	IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
         	String[] properties = copy.getProperties();
         	for (int i = 0; i < properties.length; i++) {
 				String key = properties[i];
-				context.setProperty(key, copy.getProperty(key));
+				fContext.setProperty(key, copy.getProperty(key));
 			}
         }
-        fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, context);
+        fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
         fViewer.setAutoExpandLevel(1);
 
         fDetailPaneComposite = SWTFactory.createComposite(fSashForm, 1, 1, GridData.FILL_BOTH);
@@ -253,6 +254,7 @@ public class InspectPopupDialog extends DebugPopup {
     		fExpression.dispose();
     	}
     	fDetailPane.dispose();
+    	fContext.dispose();
 		return super.close();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java
index b80833c..a35fc7a 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/RefreshTab.java
@@ -11,29 +11,18 @@
 package org.eclipse.debug.ui;
 
 
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
-import com.ibm.icu.text.MessageFormat;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.RefreshUtil;
 import org.eclipse.debug.internal.ui.DebugPluginImages;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
 import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog;
-import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
 import org.eclipse.debug.internal.ui.stringsubstitution.StringSubstitutionMessages;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
@@ -49,8 +38,6 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.ui.IWorkingSet;
 import org.eclipse.ui.IWorkingSetManager;
 import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
 
 /**
@@ -67,20 +54,17 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 
 	/**
 	 * Boolean attribute indicating if a refresh scope is recursive. Default
-	 * value is <code>false</code>.
+	 * value is <code>true</code>.
 	 */
-	public static final String ATTR_REFRESH_RECURSIVE = DebugPlugin.getUniqueIdentifier() + ".ATTR_REFRESH_RECURSIVE"; //$NON-NLS-1$
+	public static final String ATTR_REFRESH_RECURSIVE = RefreshUtil.ATTR_REFRESH_RECURSIVE;
 
 	/**
 	 * String attribute identifying the scope of resources that should be
 	 * refreshed after an external tool is run. The value is either a refresh
 	 * variable or the default value, <code>null</code>, indicating no refresh.
 	 */
-	public static final String ATTR_REFRESH_SCOPE = DebugPlugin.getUniqueIdentifier() + ".ATTR_REFRESH_SCOPE"; //$NON-NLS-1$
-	
-	// indicates no working set has been selected
-	private static final String NO_WORKING_SET = "NONE"; //$NON-NLS-1$
-	
+	public static final String ATTR_REFRESH_SCOPE = RefreshUtil.ATTR_REFRESH_SCOPE;
+		
 	// Check Buttons
 	private Button fRefreshButton;
 	private Button fRecursiveButton;
@@ -100,17 +84,6 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	
 	// Working set
 	private IWorkingSet fWorkingSet;
-
-	/**
-	 * XML tag used to designate the root of the persisted IWorkingSet
-	 */
-	private static final String TAG_LAUNCH_CONFIGURATION_WORKING_SET= "launchConfigurationWorkingSet"; //$NON-NLS-1$
-
-	/**
-	 * XML tag used for setting / getting the factory ID of the persisted IWorkingSet
-	 * Bug 37143
-	 */	
-	private static final String TAG_FACTORY_ID = "factoryID"; //$NON-NLS-1$
 	
 	/**
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
@@ -269,13 +242,13 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 			// select the workspace by default
 			fWorkspaceButton.setSelection(true);
 		} else {
-			if (scope.equals("${workspace}")) { //$NON-NLS-1$
+			if (scope.equals(RefreshUtil.MEMENTO_WORKSPACE)) {
 				fWorkspaceButton.setSelection(true);
-			} else if (scope.equals("${resource}")) { //$NON-NLS-1$
+			} else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_RESOURCE)) { 
 				fResourceButton.setSelection(true);
-			} else if (scope.equals("${container}")) { //$NON-NLS-1$
+			} else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_CONTAINER)) { 
 				fContainerButton.setSelection(true);
-			} else if (scope.equals("${project}")) { //$NON-NLS-1$
+			} else if (scope.equals(RefreshUtil.MEMENTO_SELECTED_PROJECT)) { 
 				fProjectButton.setSelection(true);
 			} else if (scope.startsWith("${resource:")) { //$NON-NLS-1$
 				fWorkingSetButton.setSelection(true);
@@ -288,8 +261,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 				}
 			} else if (scope.startsWith("${working_set:")) { //$NON-NLS-1$
 				fWorkingSetButton.setSelection(true);
-				String memento = scope.substring(14, scope.length() - 1);
-				fWorkingSet = restoreWorkingSet(memento);
+				fWorkingSet = getWorkingSet(scope);
 			}
 		}
 	}
@@ -343,16 +315,16 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	 */
 	private String generateScopeMemento() {
 		if (fWorkspaceButton.getSelection()) {
-			return "${workspace}"; //$NON-NLS-1$
+			return RefreshUtil.MEMENTO_WORKSPACE;
 		}
 		if (fResourceButton.getSelection()) {
-			return "${resource}"; //$NON-NLS-1$
+			return RefreshUtil.MEMENTO_SELECTED_RESOURCE;
 		}
 		if (fContainerButton.getSelection()) {
-			return "${container}"; //$NON-NLS-1$
+			return RefreshUtil.MEMENTO_SELECTED_CONTAINER;
 		}
 		if (fProjectButton.getSelection()) {
-			return "${project}"; //$NON-NLS-1$
+			return RefreshUtil.MEMENTO_SELECTED_PROJECT;
 		}
 		if (fWorkingSetButton.getSelection()) {
 			return getRefreshAttribute(fWorkingSet);
@@ -410,46 +382,7 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	 * @throws CoreException if an exception occurs while refreshing resources
 	 */
 	public static void refreshResources(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		if (monitor == null) {
-			monitor = new NullProgressMonitor();
-		}
-		String scope = getRefreshScope(configuration);
-		IResource[] resources= null;
-		if (scope != null) {
-			resources = getRefreshResources(scope);
-		}
-		if (resources == null || resources.length == 0){
-			return;
-		}
-		int depth = IResource.DEPTH_ONE;
-		if (isRefreshRecursive(configuration))
-			depth = IResource.DEPTH_INFINITE;
-	
-		if (monitor.isCanceled()) {
-			return;
-		}
-	
-		monitor.beginTask(StringSubstitutionMessages.RefreshTab_7, 
-			resources.length);
-	
-		MultiStatus status = new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), 0, StringSubstitutionMessages.RefreshTab_8, null); 
-		for (int i = 0; i < resources.length; i++) {
-			if (monitor.isCanceled())
-				break;
-			if (resources[i] != null && resources[i].isAccessible()) {
-				try {
-					resources[i].refreshLocal(depth, null);
-				} catch (CoreException e) {
-					status.merge(e.getStatus());
-				}
-			}
-			monitor.worked(1);
-		}
-	
-		monitor.done();
-		if (!status.isOK()) {
-			throw new CoreException(status);
-		}
+		RefreshUtil.refreshResources(configuration, monitor);
 	}
 
 	/**
@@ -460,76 +393,10 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	 * @throws CoreException if unable to resolve a set of resources
 	 */
 	public static IResource[] getRefreshResources(String scope) throws CoreException {
-		if (scope.startsWith("${resource:")) { //$NON-NLS-1$
-			// This is an old format that is replaced with 'working_set'
-			String pathString = scope.substring(11, scope.length() - 1);
-			Path path = new Path(pathString);
-			IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
-			if (resource == null) {
-				throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, MessageFormat.format(StringSubstitutionMessages.RefreshTab_43, new String[]{pathString}), null)); 
-			} 
-			return new IResource[]{resource};
-		} else if (scope.startsWith("${working_set:")) { //$NON-NLS-1$
-			IWorkingSet workingSet =  getWorkingSet(scope);
-			if (workingSet == null) {
-				throw new CoreException(new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, StringSubstitutionMessages.RefreshTab_44, null));  
-			} 
-			IAdaptable[] elements = workingSet.getElements();
-			IResource[] resources = new IResource[elements.length];
-			for (int i = 0; i < elements.length; i++) {
-				IAdaptable adaptable = elements[i];
-				if (adaptable instanceof IResource) {
-					resources[i] = (IResource) adaptable;
-				} else {
-					resources[i] = (IResource) adaptable.getAdapter(IResource.class);
-				}
-			}
-			return resources;				
-		} else if(scope.equals("${workspace}")) { //$NON-NLS-1$
-			return new IResource[]{ResourcesPlugin.getWorkspace().getRoot()};
-		} else {
-			IResource resource = SelectedResourceManager.getDefault().getSelectedResource();
-			if (resource == null) {
-				// empty selection
-				return new IResource[]{};
-			}
-			if (scope.equals("${resource}")) { //$NON-NLS-1$
-				// resource = resource
-			} else if (scope.equals("${container}")) { //$NON-NLS-1$
-				resource = resource.getParent();
-			} else if (scope.equals("${project}")) { //$NON-NLS-1$
-				resource = resource.getProject();
-			}
-			return new IResource[]{resource};
-		}
+		return RefreshUtil.toResources(scope);
 	}
 	
 	/**
-	 * Restores a working set based on the XMLMemento represented within
-	 * the mementoString.
-	 * 
-	 * @param mementoString The string memento of the working set
-	 * @return the restored working set or <code>null</code> if problems occurred restoring the
-	 * working set.
-	 */
-	private static IWorkingSet restoreWorkingSet(String mementoString) {
-		if (NO_WORKING_SET.equals(mementoString)) {
-			return null;
-		}
-		StringReader reader= new StringReader(mementoString);
-		XMLMemento memento= null;
-		try {
-			memento = XMLMemento.createReadRoot(reader);
-		} catch (WorkbenchException e) {
-			DebugUIPlugin.log(e);
-			return null;
-		}
-
-		IWorkingSetManager workingSetManager= PlatformUI.getWorkbench().getWorkingSetManager();
-		return workingSetManager.createWorkingSet(memento);
-	}	
-	
-	/**
 	 * Returns the refresh scope attribute specified by the given launch configuration
 	 * or <code>null</code> if none.
 	 * 
@@ -561,29 +428,16 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	 * @return an equivalent refresh attribute
 	 */
 	public static String getRefreshAttribute(IWorkingSet workingSet) {
-		String set = null;
 		if (workingSet == null || workingSet.getElements().length == 0) {
-			set = NO_WORKING_SET;
+			return RefreshUtil.toMemento(new IResource[0]);
 		} else {
-			XMLMemento workingSetMemento = XMLMemento.createWriteRoot(TAG_LAUNCH_CONFIGURATION_WORKING_SET);
-			workingSetMemento.putString(RefreshTab.TAG_FACTORY_ID, workingSet.getFactoryId());
-			workingSet.saveState(workingSetMemento);
-			StringWriter writer= new StringWriter();
-			try {
-				workingSetMemento.save(writer);
-			} catch (IOException e) {
-				DebugUIPlugin.log(e);
+			IAdaptable[] elements = workingSet.getElements();
+			IResource[] resources = new IResource[elements.length];
+			for (int i = 0; i < resources.length; i++) {
+				resources[i]= (IResource) elements[i].getAdapter(IResource.class);
 			}
-			set = writer.toString();
-		}
-		if (set != null) {
-			StringBuffer memento = new StringBuffer();
-			memento.append("${working_set:"); //$NON-NLS-1$
-			memento.append(set);
-			memento.append("}"); //$NON-NLS-1$
-			return memento.toString();
+			return RefreshUtil.toMemento(resources);
 		}
-		return null;
 	}
 	
 	/**
@@ -596,8 +450,14 @@ public class RefreshTab extends AbstractLaunchConfigurationTab {
 	 */
 	public static IWorkingSet getWorkingSet(String refreshAttribute) {
 		if (refreshAttribute.startsWith("${working_set:")) { //$NON-NLS-1$
-			String memento = refreshAttribute.substring(14, refreshAttribute.length() - 1);
-			return  restoreWorkingSet(memento);
+			try {
+				IResource[] resources = RefreshUtil.toResources(refreshAttribute);
+				IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
+				IWorkingSet workingSet = workingSetManager.createWorkingSet(StringSubstitutionMessages.RefreshTab_1, resources);
+				return workingSet;
+			} catch (CoreException e) {
+				DebugUIPlugin.log(e);
+			}
 		}
 		return null;
 	}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
index 66fa6cc..74c2fb3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/StringVariableSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ * Johann Draschwandtner (Wind River) - [300988] Support filtering variables
  *******************************************************************************/
 package org.eclipse.debug.ui;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IStringVariable;
 import org.eclipse.core.variables.VariablesPlugin;
@@ -31,6 +35,7 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
@@ -55,6 +60,31 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
 	private Text fArgumentText;
 	private String fArgumentValue;
 	private Button fEditVariablesButton;
+	private Button fShowAllButton;
+	private Label fShowAllDescription;
+
+	/** 
+	 * Base class for custom variable filters. Clients may extend this class
+	 * to filter specific dynamic variables from the selection dialog. 
+	 * 
+	 * @since 3.6
+	 */
+	public static class VariableFilter {
+		/**
+		 * Returns whether the given variable should be filtered.
+		 *  
+		 * @param var variable to be consider
+		 * @return <code>true</code> to filter the variable, otherwise <code>false</code>
+		 */
+		public boolean isFiltered(IDynamicVariable var) {
+			return false;
+		}
+	}
+
+	//no filtering by default
+	private ArrayList fFilters = new ArrayList();
+	//when filtering is on, do not show all by default
+	private boolean fShowAllSelected = false;
 
 	/**
 	 * Constructs a new string substitution variable selection dialog.
@@ -94,6 +124,78 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
 		return null;
 	}
 
+	/** 
+	 *  Add the given variable filter. Has no effect if the given filter has
+	 *  already been added. Must be called before the dialog is opened.
+	 *  
+	 *  @param filter the filter to add
+	 * @since 3.6
+	 */
+	public void addVariableFilter(VariableFilter filter) {
+		if(!fFilters.contains(filter)) {
+			fFilters.add(filter);
+		}
+	}
+
+	/**
+	 * Sets the filters, replacing any previous filters.
+	 *  Must be called before the dialog is opened.
+	 * 
+	 * @param filters
+	 *            an array of variable filters, use empty Array or <code>null</code> to reset all Filters.
+	 * @since 3.6
+	 */
+	public void setFilters(VariableFilter[] filters) {
+		fFilters.clear();
+		if(filters != null && filters.length > 0) {
+			fFilters.addAll(Arrays.asList(filters));
+		}
+	}
+
+	private void updateElements() {
+		final Display display = DebugUIPlugin.getStandardDisplay();
+		BusyIndicator.showWhile(display, new Runnable() {
+			public void run() {
+				final IStringVariable[] elements = VariablesPlugin.getDefault().getStringVariableManager().getVariables();
+				display.asyncExec(new Runnable() {
+					public void run() {
+						setListElements(elements);
+					}
+				});
+			}
+		});		
+	}
+	
+	private void updateDescription() {
+		if((fShowAllDescription != null) && !fShowAllDescription.isDisposed()) {
+			if(fShowAllSelected) {
+				fShowAllDescription.setText(StringSubstitutionMessages.StringVariableSelectionDialog_11);
+			} else {
+				fShowAllDescription.setText(StringSubstitutionMessages.StringVariableSelectionDialog_10);
+			}
+		}
+	}
+
+	protected void setListElements(Object[] elements) {
+		ArrayList filtered = new ArrayList();
+		filtered.addAll(Arrays.asList(elements));
+		if(!fFilters.isEmpty() && !fShowAllSelected) {
+			for (int i = 0; i < elements.length; i++) {
+				if(elements[i] instanceof IDynamicVariable) {
+					boolean bFiltered = false;
+					for (int j = 0; (j < fFilters.size()) && !bFiltered; j++) {
+						VariableFilter filter = (VariableFilter)fFilters.get(j);
+						if(filter.isFiltered((IDynamicVariable)elements[i])) {
+							filtered.remove(elements[i]);
+							bFiltered = true;
+						}
+					}
+				}
+			}
+		}
+		super.setListElements(filtered.toArray());
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
 	 */
@@ -120,9 +222,40 @@ public class StringVariableSelectionDialog extends ElementListSelectionDialog {
 	 */
 	private void createArgumentArea(Composite parent) {
 		Composite container = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
-		SWTFactory.createHorizontalSpacer(container, 1);
 		
-		fEditVariablesButton = SWTFactory.createPushButton(container, StringSubstitutionMessages.StringVariableSelectionDialog_0, null, GridData.HORIZONTAL_ALIGN_END);
+		Composite btnContainer = SWTFactory.createComposite(container, parent.getFont(), 3, 2, GridData.FILL_HORIZONTAL, 0, 0);
+		boolean bNeedShowAll = false;
+		if(!fFilters.isEmpty()) {
+			Object[] elements = VariablesPlugin.getDefault().getStringVariableManager().getVariables();
+			for (int i = 0;(i < elements.length) && !bNeedShowAll; i++) {
+				if(elements[i] instanceof IDynamicVariable) {
+					for (int j = 0; (j < fFilters.size()) && !bNeedShowAll; j++) {
+						VariableFilter filter = (VariableFilter)fFilters.get(j);
+						if(filter.isFiltered((IDynamicVariable)elements[i])) {
+							bNeedShowAll = true;
+						}
+					}
+				}
+			}
+		}
+		if (bNeedShowAll) {
+			fShowAllDescription = SWTFactory.createLabel(btnContainer, "", 3); //$NON-NLS-1$
+			updateDescription();
+			fShowAllButton = SWTFactory.createCheckButton(btnContainer, StringSubstitutionMessages.StringVariableSelectionDialog_9, null, fShowAllSelected, 1);
+			fShowAllButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					fShowAllSelected = fShowAllButton.getSelection();
+					updateDescription();
+					updateElements();
+				}
+
+			});
+			SWTFactory.createHorizontalSpacer(btnContainer, 1);
+		} else {
+			SWTFactory.createHorizontalSpacer(btnContainer, 2);
+		}
+		
+		fEditVariablesButton = SWTFactory.createPushButton(btnContainer, StringSubstitutionMessages.StringVariableSelectionDialog_0, null, GridData.HORIZONTAL_ALIGN_END);
 		fEditVariablesButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				editVariables();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
index f879120..7afac18 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
@@ -75,7 +75,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT
 	 */
 	private class WidgetListener extends SelectionAdapter implements ModifyListener {
 		public void modifyText(ModifyEvent e) {
-			updateLaunchConfigurationDialog();
+			scheduleUpdateJob();
 		}
 		public void widgetSelected(SelectionEvent e) {
 			Object source= e.getSource();
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
index b0edd29..7575041 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchHistoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,15 @@
 package org.eclipse.debug.ui.actions;
 
  
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
 import org.eclipse.debug.internal.ui.DebugUIPlugin;
@@ -22,18 +28,29 @@ import org.eclipse.debug.internal.ui.ILaunchLabelChangedListener;
 import org.eclipse.debug.internal.ui.actions.ActionMessages;
 import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationManager;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationSelectionDialog;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsMessages;
 import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension;
+import org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutSelectionDialog;
+import org.eclipse.debug.internal.ui.stringsubstitution.SelectedResourceManager;
 import org.eclipse.debug.ui.ILaunchGroup;
+import org.eclipse.debug.ui.ILaunchShortcut;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.MenuAdapter;
 import org.eclipse.swt.events.MenuEvent;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IActionDelegate2;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
 
@@ -49,7 +66,7 @@ import com.ibm.icu.text.MessageFormat;
  * @see ILaunchLabelChangedListener
  * @since 2.1
  */
-public abstract class AbstractLaunchHistoryAction implements IWorkbenchWindowPulldownDelegate2, ILaunchHistoryChangedListener {
+public abstract class AbstractLaunchHistoryAction implements IActionDelegate2, IWorkbenchWindowPulldownDelegate2, ILaunchHistoryChangedListener {
 
 	/**
 	 * The menu created by this action
@@ -362,8 +379,113 @@ public abstract class AbstractLaunchHistoryAction implements IWorkbenchWindowPul
 	public void run(IAction action) {
 		// do nothing - this is just a menu
 	}
+	
+	/**
+	 * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)
+	 * @since 3.6
+	 */
+	public void runWithEvent(IAction action, Event event) {
+		if((event.stateMask & SWT.MOD1) > 0) {
+			ILaunchConfiguration configuration = null;
+			if(LaunchingResourceManager.isContextLaunchEnabled(getLaunchGroupIdentifier())) {
+				configuration = resolveContextConfiguration();
+			} else {
+				configuration = getLaunchConfigurationManager().getFilteredLastLaunch(getLaunchGroupIdentifier());
+			}
+			if (configuration != null){
+				DebugUIPlugin.openLaunchConfigurationsDialog(
+						DebugUIPlugin.getShell(), 
+						new StructuredSelection(configuration), 
+						getLaunchGroupIdentifier(),
+						true);
+			}
+			return;
+		}
+		run(action);
+	}
 
 	/**
+	 * Resolves the configuration to show in the dialog when opened via the Ctrl+Click.
+	 * If no configuration exists a new one is created using its respective {@link ILaunchShortcut}
+	 * @return the configuration to show in the launch dialog
+	 * @since 3.6
+	 */
+	private ILaunchConfiguration resolveContextConfiguration() {
+		SelectedResourceManager srm = SelectedResourceManager.getDefault();
+		IStructuredSelection selection = srm.getCurrentSelection();
+		List shortcuts = null;
+		IResource resource = srm.getSelectedResource();
+		shortcuts = getLaunchingResourceManager().getShortcutsForSelection(
+				selection, 
+				getMode());
+		if(resource == null) {
+			resource = getLaunchingResourceManager().getLaunchableResource(shortcuts, selection);
+		}
+		List configs = getLaunchingResourceManager().getParticipatingLaunchConfigurations(
+				selection, 
+				resource, 
+				shortcuts, 
+				getMode());
+		if(configs.size() == 1) {
+			return (ILaunchConfiguration) configs.get(0);
+		} else if(configs.size() > 1) {
+			// launch most recently launched config
+			ILaunchConfiguration config = getLaunchConfigurationManager().getMRUConfiguration(configs, fLaunchGroup, resource);
+			if(config != null) {
+				return config;
+			} else {
+				// Let the use select which config to open
+				LaunchConfigurationSelectionDialog dialog = new LaunchConfigurationSelectionDialog(DebugUIPlugin.getShell(), configs);
+				if(dialog.open() == IDialogConstants.OK_ID) {
+					return (ILaunchConfiguration) dialog.getResult()[0];
+				}
+			}
+			return null;
+		} else if(shortcuts.size() > 1) {
+			//no configs, choose shortcut to create a new one
+			LaunchShortcutSelectionDialog dialog = new LaunchShortcutSelectionDialog(shortcuts, resource, getMode());
+			if(dialog.open() == IDialogConstants.OK_ID) {
+				LaunchShortcutExtension ext = (LaunchShortcutExtension) dialog.getResult()[0];
+				return createConfigurationFromTypes(ext.getAssociatedConfigurationTypes());
+			}
+			return null;
+		} else if(shortcuts.size() == 1) {
+			LaunchShortcutExtension ext = (LaunchShortcutExtension) shortcuts.get(0);
+			return createConfigurationFromTypes(ext.getAssociatedConfigurationTypes());
+		}
+		return getLaunchConfigurationManager().getFilteredLastLaunch(getLaunchGroupIdentifier());
+	}
+	
+	/**
+	 * Creates an {@link ILaunchConfiguration} from the given set of {@link ILaunchConfigurationType}s
+	 * @param types
+	 * @return a new {@link ILaunchConfiguration}
+	 * @since 3.6
+	 */
+	private ILaunchConfiguration createConfigurationFromTypes(Set types) {
+		//context launching always takes the first type, so we do that here as well
+		if(types != null && types.size() > 0) {
+			try {
+				ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType((String) types.toArray()[0]);
+				ILaunchConfigurationWorkingCopy copy = type.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(LaunchConfigurationsMessages.CreateLaunchConfigurationAction_New_configuration_2));
+				return copy;
+			}
+			catch(CoreException ce) {
+				//do nothing return null
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
+	 * @since 3.6
+	 */
+	public void init(IAction action) {
+		// do nothing by default
+	}	
+	
+	/**
 	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
 	 */
 	public void selectionChanged(IAction action, ISelection selection){
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java
index d7f41bb..574c664 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AbstractLaunchToolbarAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,8 +75,7 @@ public class AbstractLaunchToolbarAction extends AbstractLaunchHistoryAction {
 	 */
 	public void run(IAction action) {
 		//always ignore external tools during context launching
-		if(LaunchingResourceManager.isContextLaunchEnabled() && 
-				!getLaunchGroupIdentifier().equals("org.eclipse.ui.externaltools.launchGroup")) { //$NON-NLS-1$
+		if(LaunchingResourceManager.isContextLaunchEnabled(getLaunchGroupIdentifier())) {
 			ContextRunner.getDefault().launch(DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(getLaunchGroupIdentifier()));
 		}
 		else {
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java
index 2e180cd..8cf2475 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/AddMemoryRenderingActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -139,8 +139,9 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
 
 		private void contextActivated(ISelection selection) {
 			setupActionDelegate(selection);
-			updateAction(fAction, fCurrentSelection);
 			
+			if(fAction != null)
+				updateAction(fAction, fCurrentSelection);
 		}
 
 		public void debugContextChanged(DebugContextEvent event) {
@@ -215,11 +216,17 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
 	 * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
 	 */
 	public void selectionChanged(IAction action, ISelection selection) {
-		bindAction(action);
 		fCurrentSelection = selection;
-		updateAction(action, selection);
+		
+		if(action != null) {
+			bindAction(action);
+			updateAction(action, selection);
+		}
 	}
 	
+	/**
+	 * @param action - the action to bind with the menu and to update enablement, must not be null
+	 */
 	private void updateAction(IAction action, ISelection selection)
 	{
 		if (fActionDelegate != null)
@@ -233,10 +240,10 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
 		}
 	}
 
+	/**
+	 * @param action - the action to bind with the menu, must not be null
+	 */
 	private void bindAction(IAction action) {
-		if (action == null)
-			return;
-		
 		if (action != fAction) {
 			if (fMenuCreator == null)
 				fMenuCreator = new AddMemoryRenderingMenuCreator();
@@ -264,8 +271,11 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
 	 */
 	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
 		bindPart(targetEditor);
-		bindAction(action);
-		updateAction(action, fCurrentSelection);
+		
+		if(action != null) {
+			bindAction(action);
+			updateAction(action, fCurrentSelection);
+		}
 	}
 
 	/* (non-Javadoc)
@@ -273,17 +283,20 @@ public class AddMemoryRenderingActionDelegate extends Action implements IViewAct
 	 */
 	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
 		bindPart(targetPart);
-		bindAction(action);
-		updateAction(action, fCurrentSelection);
+		
+		if(action != null) {
+			bindAction(action);
+			updateAction(action, fCurrentSelection);
+		}
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
 	 */
 	public void init(IAction action) {		
-		bindAction(action);
-		if (action != null)
-		{
+		if (action != null) {
+			bindAction(action);
+
 			action.setText(ActionMessages.AddMemoryRenderingActionDelegate_2);
 			action.setImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_MONITOR_EXPRESSION));
 			action.setHoverImageDescriptor(DebugPluginImages.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_MONITOR_EXPRESSION));
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
index 368f8cc..58fce27 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ContextualLaunchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -236,7 +236,7 @@ public abstract class ContextualLaunchAction implements IObjectActionDelegate, I
 				if (mode.equals(fMode)) {
 					String category = ext.getCategory();
 					// NOTE: category can be null
-					if (categories!= null && !categories.contains(category)) {
+					if (category != null && !categories.contains(category)) {
 						categories.add(category);
 					}
 					populateMenuItem(mode, ext, menu, accelerator++);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
new file mode 100644
index 0000000..fe0869b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandAction.java
@@ -0,0 +1,350 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.debug.ui.actions;
+
+import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.internal.ui.commands.actions.DebugCommandService;
+import org.eclipse.debug.internal.ui.commands.actions.ICommandParticipant;
+import org.eclipse.debug.internal.ui.commands.actions.IEnabledTarget;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.debug.ui.contexts.IDebugContextListener;
+import org.eclipse.debug.ui.contexts.IDebugContextService;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract base class for re-targeting actions which delegate execution to 
+ * {@link org.eclipse.debug.core.commands.IDebugCommandHandler} handlers.  
+ * The specific type of <code>IDebugCommandHandler</code> is determined by the 
+ * abstract {@link #getCommandType()} method.    
+ * <p>
+ * This base class is an action which can be instantiated directly by views, 
+ * etc.  In order to contribute an action using an extension point, a class 
+ * implementing {@link org.eclipse.ui.IActionDelegate} should be created first.
+ * The delegate should then use a <code>DebugCommandAction</code> to implement 
+ * the needed functionality. The IActionDelegate must use {@link #setActionProxy(IAction)}
+ * specifying the workbench's action that is a proxy to the action delegate. This
+ * way, the workbench action can be updated visually as needed.<br>
+ * Note: <code>IDebugCommandHandler</code> command typically act on the active
+ * debug context as opposed to the active selection in view or window.  The 
+ * action delegate should ignore the active window selection, and instead allow 
+ * the <code>DebugCommandAction</code> to update itself based on the active 
+ * debug context. 
+ * </p>
+ * <p>
+ * Clients may subclass this class.
+ * </p>
+ * @see org.eclipse.debug.core.commands.IDebugCommandHandler
+ * @since 3.6
+ */
+public abstract class DebugCommandAction extends Action implements IDebugContextListener {
+
+    private boolean fInitialized = false;
+    
+	/**
+	 * The window this action is working for.
+	 */
+    private IWorkbenchWindow fWindow;
+    
+    /**
+     * The part this action is working for, or <code>null</code> if global to
+     * a window.
+     */
+    private IWorkbenchPart fPart;
+    
+    /**
+     * Command service.
+     */
+    private DebugCommandService fUpdateService;
+    
+    /**
+     * Delegate this action is working for or <code>null</code> if none.
+     */
+    private IAction fAction;
+
+    private IEnabledTarget fEnabledTarget = new IEnabledTarget() {
+        public void setEnabled(boolean enabled) {
+            DebugCommandAction.this.setEnabled(enabled);
+        }
+    };
+    
+    /**
+     * Constructor
+     */
+    public DebugCommandAction() {
+        super();
+        String helpContextId = getHelpContextId();
+        if (helpContextId != null)
+            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, helpContextId);
+        setEnabled(false);
+    }
+
+	/**
+     * Sets the current workbench action that is a proxy to an {@link org.eclipse.ui.IActionDelegate}
+     * that is using this action to perform its actual work. This only needs to be called when
+     * an {@link org.eclipse.ui.IActionDelegate} is using one of these actions to perform its
+     * function.
+     * 
+     * @param action workbench proxy action
+     */
+    public void setActionProxy(IAction action) {
+        fAction = action;
+        fAction.setEnabled(isEnabled());
+    }
+
+    /**
+     * Executes this action on the given target object
+     * 
+     * @param target the target to perform the action on
+     */
+    private boolean execute(final Object[] targets) {
+    	return fUpdateService.executeCommand(
+    	    getCommandType(), targets, 
+    	    new ICommandParticipant() {
+    	        public void requestDone(org.eclipse.debug.core.IRequest request) {
+    	            DebugCommandAction.this.postExecute(request, targets);
+    	        }    	      
+    	    });
+    }
+        
+    /**
+     * This method is called after the completion of the execution of this 
+     * command.  Extending classes may override this method to perform additional
+     * operation after command execution. 
+     * 
+     * @param request The completed request object which was given to the 
+     * debug command handler.
+     * @param targets Objects which were the targets of this action
+     */
+    protected void postExecute(IRequest request, Object[] targets) {
+        // do nothing by default
+    }
+    
+    /**
+     * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} 
+     * command handler that type this action executes.
+     * 
+     * @return command class.
+     * 
+     * @see org.eclipse.debug.core.commands.IDebugCommandHandler
+     */
+    abstract protected Class getCommandType();  
+
+    /**
+     * @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
+     */
+    public void debugContextChanged(DebugContextEvent event) {
+    	fUpdateService.postUpdateCommand(getCommandType(), fEnabledTarget);
+	}
+
+    /**
+     * @see org.eclipse.jface.action.Action#setEnabled(boolean)
+     */
+    public void setEnabled(boolean enabled) {
+        synchronized (this) {
+            if (!fInitialized) {
+                fInitialized = true;
+                notifyAll();
+            }
+        }        
+        super.setEnabled(enabled);
+        if (fAction != null) {
+            fAction.setEnabled(enabled);
+        }
+    }
+
+    /**
+     * Initializes this action for a specific part.
+     * 
+     * @param part workbench part
+     */
+    public void init(IWorkbenchPart part) {
+    	fInitialized = false;
+        fPart = part;
+        fWindow = part.getSite().getWorkbenchWindow();
+        fUpdateService = DebugCommandService.getService(fWindow);
+        IDebugContextService service = getDebugContextService();
+		String partId = part.getSite().getId();
+		service.addDebugContextListener(this, partId);
+        ISelection activeContext = service.getActiveContext(partId);
+        if (activeContext != null) {
+        	fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
+        } else {
+        	setEnabled(getInitialEnablement());
+        }
+    }
+    
+    /**
+     * Initializes this action for a workbench window.
+     * 
+     * @param window the window
+     */
+    public void init(IWorkbenchWindow window) {
+    	fInitialized = false;
+        fWindow = window;
+        fUpdateService = DebugCommandService.getService(fWindow);
+        IDebugContextService contextService = getDebugContextService();
+		contextService.addDebugContextListener(this);
+        ISelection activeContext = contextService.getActiveContext();
+        if (activeContext != null) {
+        	fUpdateService.updateCommand(getCommandType(), fEnabledTarget);
+        } else {
+        	setEnabled(getInitialEnablement());
+        }
+    }
+    
+    /**
+     * Returns whether this action should be enabled when initialized
+     * and there is no active debug context. By default, <code>false</code>
+     * is returned.
+     * 
+     * @return initial enabled state when there is no active context.
+     */
+    protected boolean getInitialEnablement() {
+    	return false;
+    }
+
+    /**
+     * Returns the context (selection) this action operates on. By default
+     * the active debug context in this action's associated part or window is used,
+     * but subclasses may override as required.
+     * 
+     * @return the context this action operates on
+     * @nooverride This method is not intended to be re-implemented or extended by clients.
+     * @noreference This method is not intended to be referenced by clients.
+     */
+    protected ISelection getContext() {
+		if (fPart != null) {
+			getDebugContextService().getActiveContext(fPart.getSite().getId());
+    	}
+        return getDebugContextService().getActiveContext();
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run() {
+        synchronized (this) {
+            if (!fInitialized) {
+                try {
+                    wait();
+                } catch (InterruptedException e) {
+                }
+            }           
+        }        
+        
+        ISelection selection = getContext();
+        if (selection instanceof IStructuredSelection && isEnabled()) {
+            IStructuredSelection ss = (IStructuredSelection) selection;
+            boolean enabled = execute(ss.toArray());
+            // disable the action according to the command
+            setEnabled(enabled);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#runWithEvent(org.eclipse.swt.widgets.Event)
+     */
+    public void runWithEvent(Event event) {
+        run();
+    }
+
+    /**
+     * Clean up when removing
+     */
+    public void dispose() {
+        IDebugContextService service = getDebugContextService();
+        if (fPart != null) {
+        	service.removeDebugContextListener(this, fPart.getSite().getId());
+        } else {
+            service.removeDebugContextListener(this);
+        }
+        fWindow = null;
+        fPart = null;
+    }
+    
+    /**
+     * Returns the context service this action linked to. By default, this actions is
+     * associated with the context service for the window this action is operating in.
+     * 
+     * @return associated context service
+     */
+    protected IDebugContextService getDebugContextService() {
+    	return DebugUITools.getDebugContextManager().getContextService(fWindow);
+    }
+
+    /**
+     * Returns the help context id for this action or <code>null</code> if none.
+     * 
+     * @return The help context id for this action or <code>null</code>
+     */ 
+    public abstract String getHelpContextId();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getId()
+     */
+    public abstract String getId();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getText()
+     */
+    public abstract String getText();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getToolTipText()
+     */
+    public abstract String getToolTipText();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
+     */
+    public abstract ImageDescriptor getDisabledImageDescriptor();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getHoverImageDescriptor()
+     */
+    public abstract ImageDescriptor getHoverImageDescriptor();
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#getImageDescriptor()
+     */
+    public abstract ImageDescriptor getImageDescriptor();
+    
+    /**
+     * Returns the workbench proxy associated with this action or <code>null</code>
+     * if none. This is the workbench proxy to an {@link org.eclipse.ui.IActionDelegate}
+     * that is using this action to perform its actual work. This is only used when
+     * an {@link org.eclipse.ui.IActionDelegate} is using one of these actions to perform its
+     * function.
+     * 
+     * @return workbench proxy action or <code>null</code>
+     */
+    protected IAction getActionProxy() {
+    	return fAction;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
new file mode 100644
index 0000000..5ec94d4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/DebugCommandHandler.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.debug.ui.actions;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.HandlerEvent;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.debug.core.IRequest;
+import org.eclipse.debug.internal.ui.commands.actions.DebugCommandService;
+import org.eclipse.debug.internal.ui.commands.actions.ICommandParticipant;
+import org.eclipse.debug.internal.ui.commands.actions.IEnabledTarget;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.contexts.DebugContextEvent;
+import org.eclipse.debug.ui.contexts.IDebugContextListener;
+import org.eclipse.debug.ui.contexts.IDebugContextService;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.ISources;
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Abstract base class for re-targeting command framework handlers, which 
+ * delegate execution to {@link org.eclipse.debug.core.commands.IDebugCommandHandler} 
+ * handlers. The specific type of <code>IDebugCommandHandler</code> is 
+ * determined by the abstract {@link #getCommandType()} method.    
+ * 
+ * <p> Note: This class is not an implementation of the <code>IDebugCommandHandler</code>
+ * interface, which was somewhat unfortunately named.  <code>IDebugCommandHandler</code> 
+ * is an interface that used only by the debugger plug-ins.  This class implements 
+ * {@link org.eclipse.core.commands.IHandler} interface and is to be used with the 
+ * platform commands framework. </p>
+ * 
+ * <p>
+ * Clients may subclass this class.
+ * </p>
+ * @see org.eclipse.debug.core.commands.IDebugCommandHandler
+ * @see org.eclipse.core.commands.IHandler
+ *
+ * @since 3.6
+ */
+public abstract class DebugCommandHandler extends AbstractHandler {
+
+    /**
+     * The DebugCommandService is able to evaluate the command handler 
+     * enablement in each workbench window separately, however the workbench
+     * command framework uses only a single handler instance for all windows.
+     * This IEnabledTarget implementation tracks enablement of the command
+     * for a given window.  When the handler enablement is tested, the 
+     * currently active window is used to determine which enabled target 
+     * to use.  
+     */
+    private class EnabledTarget implements IEnabledTarget, IDebugContextListener {
+        boolean fEnabled = getInitialEnablement();
+        IWorkbenchWindow fWindow;
+        
+        EnabledTarget(IWorkbenchWindow window) {
+            fWindow = window;
+            DebugCommandService.getService(fWindow).updateCommand(getCommandType(), this);
+            getContextService(fWindow).addDebugContextListener(this);
+        }
+        
+        public void setEnabled(boolean enabled) {
+            boolean oldEnabled = fEnabled;
+            fEnabled = enabled;
+            if (fEnabled != oldEnabled && fCurrentEnabledTarget == this) {
+                fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false));
+            }
+        }
+        
+        public void debugContextChanged(DebugContextEvent event) {
+            DebugCommandService.getService(fWindow).postUpdateCommand(getCommandType(), this);
+        }
+        
+        void dispose() {
+            if (isDisposed()) {
+                return;
+            }
+            getContextService(fWindow).removeDebugContextListener(this);
+            fWindow = null;
+        }
+        
+        boolean isDisposed() {
+            return fWindow == null;
+        }
+    }
+
+    /**
+     * Window listener is used to make sure that the handler enablement 
+     * is updated when the active workbench window is changed.
+     */
+    private IWindowListener fWindowListener =  new IWindowListener() {
+        
+        public void windowOpened(IWorkbenchWindow w) {
+        }
+    
+        public void windowDeactivated(IWorkbenchWindow w) {
+        }
+    
+        public void windowClosed(IWorkbenchWindow w) {
+            EnabledTarget enabledTarget = (EnabledTarget)fEnabledTargetsMap.get(w);
+            if (enabledTarget != null) {
+                enabledTarget.dispose();
+            }
+        }
+    
+        public void windowActivated(IWorkbenchWindow w) {
+            fCurrentEnabledTarget = (EnabledTarget)fEnabledTargetsMap.get(w);
+            fireHandlerChanged(new HandlerEvent(DebugCommandHandler.this, true, false));
+        }
+    };
+    
+    /**
+     * Map of enabled targets keyed by workbench window.
+     */
+    private Map fEnabledTargetsMap = new WeakHashMap();
+
+    /**
+     * The current enabled target, based on the active
+     * workbench window.
+     */
+    private EnabledTarget fCurrentEnabledTarget = null;
+    
+    /**
+      * The constructor adds the handler as the 
+     */
+    public DebugCommandHandler() {
+        super();
+        PlatformUI.getWorkbench().addWindowListener(fWindowListener);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
+     */
+    public void setEnabled(Object evaluationContext) {
+        // This method is called with the current evaluation context
+        // just prior to the isEnabled() being called.  Check the active
+        // window and update the current enabled target based on it 
+        fCurrentEnabledTarget = null;
+        
+        if (!(evaluationContext instanceof IEvaluationContext)) {
+            return;
+        }
+        IEvaluationContext context = (IEvaluationContext) evaluationContext;
+        Object _window = context.getVariable(ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
+        if (_window instanceof IWorkbenchWindow) {
+            IWorkbenchWindow window = (IWorkbenchWindow)_window;
+            fCurrentEnabledTarget = getEnabledTarget(window);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+     */
+    public boolean isEnabled() {
+        if (fCurrentEnabledTarget == null) {
+            return false;
+        }
+        return fCurrentEnabledTarget.fEnabled;
+    }
+    
+    private EnabledTarget getEnabledTarget(IWorkbenchWindow window) {
+        EnabledTarget target = (EnabledTarget)fEnabledTargetsMap.get(window);
+        if (target == null) {
+            target = new EnabledTarget(window);
+            fEnabledTargetsMap.put(window, target);
+        }
+        return target;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+     */
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+        if (window == null) {
+            throw new ExecutionException("No active workbench window."); //$NON-NLS-1$
+        }
+        fCurrentEnabledTarget = getEnabledTarget(window);
+
+        ISelection selection = getContextService(window).getActiveContext();
+        if (selection instanceof IStructuredSelection && isEnabled()) {
+            IStructuredSelection ss = (IStructuredSelection) selection;
+            boolean enabledAfterExecute = execute(window, ss.toArray());
+            
+            // enable/disable the action according to the command
+            fCurrentEnabledTarget.setEnabled(enabledAfterExecute);
+        }
+
+        return null;
+    }
+    
+    private IDebugContextService getContextService(IWorkbenchWindow window) {
+        return DebugUITools.getDebugContextManager().getContextService(window);
+    }
+    
+    /**
+     * Executes this action on the given target object
+     * 
+     * @param target the target to perform the action on
+     */
+    private boolean execute(IWorkbenchWindow window, final Object[] targets) {
+        DebugCommandService service = DebugCommandService.getService(window); 
+    	return service.executeCommand(
+    	    getCommandType(), targets, 
+            new ICommandParticipant() {
+                public void requestDone(org.eclipse.debug.core.IRequest request) {
+                    DebugCommandHandler.this.postExecute(request, targets);
+                }             
+            });
+    }
+
+    /**
+     * This method is called after the completion of the execution of this 
+     * command.  Extending classes may override this method to perform additional
+     * operation after command execution. 
+     * 
+     * @param request The completed request object which was given the the 
+     * debug command handler.
+     * @param targets Objects which were the targets of this action
+     */
+    protected void postExecute(IRequest request, Object[] targets) {
+        // do nothing by default
+    }
+
+    /**
+     * Returns the {@link org.eclipse.debug.core.commands.IDebugCommandHandler} 
+     * command handler that type this action executes.
+     * 
+     * @return command class.
+     * 
+     * @see org.eclipse.debug.core.commands.IDebugCommandHandler
+     */
+    abstract protected Class getCommandType();  
+
+    
+    /**
+     * Returns whether this action should be enabled when initialized
+     * and there is no active debug context.
+     * 
+     * @return false, by default
+     */
+    protected boolean getInitialEnablement() {
+    	return false;
+    }
+
+
+    /**
+     * Clean up when removing
+     */
+    public void dispose() {
+        PlatformUI.getWorkbench().removeWindowListener(fWindowListener);        
+        for (Iterator itr = fEnabledTargetsMap.values().iterator(); itr.hasNext();) {
+            EnabledTarget target = (EnabledTarget)itr.next();
+            if (!target.isDisposed()) {
+                target.dispose();
+            }
+        }
+        fEnabledTargetsMap.clear();
+        fCurrentEnabledTarget = null;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
index 712f8f2..b858f58 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java
@@ -159,7 +159,9 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
 				fCurrentWorkingSetProperty = null;
 				localmonitor.worked(1);
 			}
-			fManager.addBreakpoints((IBreakpoint[])fAdded.toArray(new IBreakpoint[fAdded.size()]));
+			if(fAdded.size() > 0) {
+				fManager.addBreakpoints((IBreakpoint[])fAdded.toArray(new IBreakpoint[fAdded.size()]));
+			}
 		} 
 		catch(FileNotFoundException e) {
 			throw new InvocationTargetException(e, 
@@ -288,9 +290,10 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
 			}
 			catch(CoreException ce) {}
 		}
+		IBreakpoint breakpoint = null;
 		try {
 			// create the breakpoint
-			IBreakpoint breakpoint = fManager.createBreakpoint(marker);
+			breakpoint = fManager.createBreakpoint(marker);
 			breakpoint.setEnabled(((Boolean)attributes.get(IImportExportConstants.IE_BP_ENABLED)).booleanValue());
 			breakpoint.setPersisted(((Boolean)attributes.get(IImportExportConstants.IE_BP_PERSISTANT)).booleanValue());
 			breakpoint.setRegistered(((Boolean)attributes.get(IImportExportConstants.IE_BP_REGISTERED)).booleanValue());
@@ -305,7 +308,16 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress {
 				}
 			}
 		}
-		catch(CoreException ce) {}
+		catch(CoreException ce) {
+			//Something bad happened while trying to restore the breakpoint, remove it from the cached list and delete the marker
+			//to ensure the manager does not hold bogus breakpoints
+			if(breakpoint != null) {
+				try {
+					fAdded.remove(breakpoint);
+					marker.delete();
+				} catch (CoreException e) {}
+			}
+		}
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
index 33c5a97..d67ffa5 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ToggleBreakpointAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -184,8 +184,8 @@ public class ToggleBreakpointAction extends Action implements IUpdate {
                             return;
                         }
                     }
-                    if (adapter.canToggleLineBreakpoints(fPart, selection) |
-                        adapter.canToggleWatchpoints(fPart, selection) |
+                    if (adapter.canToggleLineBreakpoints(fPart, selection) ||
+                        adapter.canToggleWatchpoints(fPart, selection) ||
                         adapter.canToggleMethodBreakpoints(fPart, selection)) 
                     {
                         setEnabled(true);
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
index c2eec7f..c1283d3 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/memory/AbstractTableRendering.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -1990,15 +1990,14 @@ public abstract class AbstractTableRendering extends AbstractBaseTableRendering
 		if (getMemoryBlock() instanceof IMemoryBlockExtension)
 		{
 			label = ((IMemoryBlockExtension)getMemoryBlock()).getExpression();
-			
-			if (label.startsWith("&")) //$NON-NLS-1$
-				label = "&" + label; //$NON-NLS-1$
-			
 			if (label == null)
 			{
 				label = DebugUIMessages.AbstractTableRendering_8; 
 			}
 			
+			if (label.startsWith("&")) //$NON-NLS-1$
+				label = "&" + label; //$NON-NLS-1$
+			
 			try {
 				if (showAddress && ((IMemoryBlockExtension)getMemoryBlock()).getBigBaseAddress() != null)
 				{	
diff --git a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
index d795284..7aa5cc7 100644
--- a/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
+++ b/eclipse/plugins/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/SourceLookupDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,6 +69,7 @@ public class SourceLookupDialog extends TitleAreaDialog {
 		// create a composite with standard margins and spacing
 		setTitle(SourceLookupUIMessages.manageSourceDialog_description); 
 		setTitleImage(DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_EDIT_SRC_LOC_WIZ));
+		setMessage(SourceLookupUIMessages.SourceLookupDialog_add_edit_remove);
 		Composite composite = new Composite(parent, SWT.NONE);
 		
 		GridLayout layout = new GridLayout();
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.classpath b/eclipse/plugins/org.eclipse.ecf.filetransfer/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.classpath
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/.gitignore b/eclipse/plugins/org.eclipse.ecf.filetransfer/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.options b/eclipse/plugins/org.eclipse.ecf.filetransfer/.options
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/.options
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.options
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.project b/eclipse/plugins/org.eclipse.ecf.filetransfer/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/.project
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.project
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..038ed2d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,350 @@
+#Wed Sep 01 15:10:47 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..16aea9f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 14:55:34 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.prefs
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b36d944
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.filetransfer;singleton:=true
+Bundle-Version: 5.0.0.qualifier
+Bundle-Activator: org.eclipse.ecf.internal.filetransfer.Activator
+Bundle-Vendor: %plugin.provider
+Eclipse-LazyStart: true
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Export-Package: org.eclipse.ecf.filetransfer,
+ org.eclipse.ecf.filetransfer.events,
+ org.eclipse.ecf.filetransfer.events.socket;version:="1.0";x-internal:="true",
+ org.eclipse.ecf.filetransfer.events.socketfactory,
+ org.eclipse.ecf.filetransfer.identity,
+ org.eclipse.ecf.filetransfer.service,
+ org.eclipse.ecf.internal.filetransfer;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.equinox.registry,
+ org.eclipse.ecf
+Import-Package: org.eclipse.core.runtime.jobs,
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.log;version="1.3.0",
+ org.osgi.service.url;version="1.0.0",
+ org.osgi.util.tracker;version="1.3.2"
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/about.html b/eclipse/plugins/org.eclipse.ecf.filetransfer/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/about.html
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/about.html
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/build.properties b/eclipse/plugins/org.eclipse.ecf.filetransfer/build.properties
new file mode 100644
index 0000000..dd45fdd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/build.properties
@@ -0,0 +1,13 @@
+output.. = bin/
+bin.includes = .,\
+               META-INF/,\
+               about.html,\
+               plugin.xml,\
+               plugin.properties,\
+               schema/
+src.includes = about.html,\
+               schema/
+jars.compile.order = .
+source.. = src/
+jre.compilation.profile = J2SE-1.4
+javacWarnings.. = -assertIdentifier,-enumIdentifier
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/plugin.properties b/eclipse/plugins/org.eclipse.ecf.filetransfer/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/plugin.xml b/eclipse/plugins/org.eclipse.ecf.filetransfer/plugin.xml
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/plugin.xml
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/plugin.xml
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/schema/urlStreamHandlerService.exsd b/eclipse/plugins/org.eclipse.ecf.filetransfer/schema/urlStreamHandlerService.exsd
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/schema/urlStreamHandlerService.exsd
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/schema/urlStreamHandlerService.exsd
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/BrowseFileTransferException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/BrowseFileTransferException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/BrowseFileTransferException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/BrowseFileTransferException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferInfo.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferInfo.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferInfo.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferInfo.java
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java
new file mode 100644
index 0000000..374eaf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/FileTransferJob.java
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * Copyright (c) 2008 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:  Contributors: Cloudsmith, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.filetransfer;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent;
+
+/**
+ * {@link Job} subclass for executing file transfers.  This class should
+ * be subclassed to create a customized {@link Job} for passing to
+ * an incoming or outgoing file transfer.  For example, to use a custom
+ * job for doing a file transfer retrieval via {@link IIncomingFileTransferReceiveStartEvent#receive(java.io.File, FileTransferJob)}:
+ * <pre>
+ * class MyFileTransferJob extends FileTransferJob {
+ * 		public MyFileTransferJob(String name) {
+ * 			super(name);
+ * 		}
+ * 
+ * 		public boolean belongsTo(Object o) {
+ * 			// insert own logic to decide whether
+ *  		// this file transfer job should be part
+ *  		// of a group
+ *  		//
+ * 		}
+ * }
+ * 
+ * MyFileTransferJob myJob = new MyFileTransferJob("myname");
+ * incomingfiletransfer = event.receive(outputstream,myJob);
+ * </pre>
+ * @since 2.0
+ */
+public class FileTransferJob extends Job {
+
+	private IFileTransferRunnable fileTransferRunnable;
+	private IFileTransfer fileTransfer;
+
+	/**
+	 * @param name the name for this file transfer job.  Should not be <code>null</code>.
+	 */
+	public FileTransferJob(String name) {
+		super(name);
+		setSystem(true);
+	}
+
+	public final void setFileTransferRunnable(IFileTransferRunnable fileTransferRunnable) {
+		this.fileTransferRunnable = fileTransferRunnable;
+	}
+
+	/**
+	 * @since 3.0
+	 */
+	public final void setFileTransfer(IFileTransfer fileTransfer) {
+		this.fileTransfer = fileTransfer;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected final IStatus run(IProgressMonitor mntr) {
+		if (this.fileTransferRunnable == null)
+			return new Status(IStatus.ERROR, org.eclipse.ecf.internal.filetransfer.Activator.PLUGIN_ID, IStatus.ERROR, "Runnable cannot be null", null); //$NON-NLS-1$
+		if (this.fileTransfer == null)
+			return new Status(IStatus.ERROR, org.eclipse.ecf.internal.filetransfer.Activator.PLUGIN_ID, IStatus.ERROR, "File transfer member cannot be null", null); //$NON-NLS-1$
+		return this.fileTransferRunnable.performFileTransfer(mntr);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#canceling()
+	 */
+	protected void canceling() {
+		fileTransfer.cancel();
+	}
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileRangeSpecification.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferInfo.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferInfo.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferInfo.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferInfo.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRateControl.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRateControl.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRateControl.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRateControl.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRunnable.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRunnable.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRunnable.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferRunnable.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransferRequestListener.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransferRequestListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransferRequestListener.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IIncomingFileTransferRequestListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IOutgoingFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IOutgoingFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IOutgoingFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IOutgoingFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFile.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFile.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFile.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFile.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileAttributes.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileAttributes.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileAttributes.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileAttributes.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileInfo.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileInfo.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileInfo.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileInfo.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemBrowserContainerAdapter.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemRequest.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemRequest.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemRequest.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRemoteFileSystemRequest.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferContainerAdapter.java
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferOptions.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferOptions.java
new file mode 100644
index 0000000..68426f2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IRetrieveFileTransferOptions.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Composent, Inc. - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.filetransfer;
+
+import java.util.Map;
+
+/**
+ * @since 3.1
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IRetrieveFileTransferOptions {
+
+	/**
+	 * This constant defines a key in options Map passed to {@link IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileTransferListener, java.util.Map)}.
+	 * Supporting providers will use this key to look for a value of type Map, and if found the String key/value pairs in the 
+	 * Map will be used as request headers.  The expected type of the value associated with this key is of type {@link Map}.
+	 * 
+	 */
+	public static final String REQUEST_HEADERS = IRetrieveFileTransferOptions.class.getName() + ".requestHeaders"; //$NON-NLS-1$
+
+	/**
+	 * This constant defines a key in options Map passed to {@link IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileTransferListener, java.util.Map)}.
+	 * Supporting providers will use this key to look for a value of type Integer or String, and if found this value
+	 * will be used to determine the socket connection timeout for this request.  The expected type of the value
+	 * associated with this key is of type Integer, or String value of an Integer.
+	 */
+	public static final String CONNECT_TIMEOUT = IRetrieveFileTransferOptions.class.getName() + ".connectTimeout"; //$NON-NLS-1$
+
+	/**
+	 * This constant defines a key in options Map passed to {@link IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID, IFileTransferListener, java.util.Map)}.
+	 * Supporting providers will use this key to look for a value of type Integer or String, and if found this value
+	 * will be used to determine the socket read timeout for this request.  The expected type of the value
+	 * associated with this key is of type Integer, or String value of an Integer.
+	 */
+	public static final String READ_TIMEOUT = IRetrieveFileTransferOptions.class.getName() + ".readTimeout"; //$NON-NLS-1$
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferContainerAdapter.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferContainerAdapter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferContainerAdapter.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferContainerAdapter.java
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferOptions.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferOptions.java
new file mode 100644
index 0000000..344eb0d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/ISendFileTransferOptions.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Composent, Inc. - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.filetransfer;
+
+/**
+ * @since 3.1
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ISendFileTransferOptions {
+	// Nothing
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java
new file mode 100644
index 0000000..6a44963
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IncomingFileTransferException.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.filetransfer;
+
+import java.util.Map;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ecf.core.util.ECFException;
+
+/**
+ * Exception thrown upon incoming file transfer problem
+ * 
+ */
+public class IncomingFileTransferException extends ECFException {
+
+	private static final long serialVersionUID = 2438441801862623371L;
+
+	private int errorCode = -1;
+	private Map responseHeaders;
+
+	public IncomingFileTransferException(IStatus status) {
+		super(status);
+	}
+
+	public IncomingFileTransferException() {
+		// null constructor
+	}
+
+	public IncomingFileTransferException(int errorCode) {
+		this();
+		this.errorCode = errorCode;
+	}
+
+	public IncomingFileTransferException(String message) {
+		super(message);
+	}
+
+	public IncomingFileTransferException(String message, int errorCode) {
+		super(message);
+		this.errorCode = errorCode;
+	}
+
+	public IncomingFileTransferException(Throwable cause) {
+		super(cause);
+	}
+
+	public IncomingFileTransferException(Throwable cause, int errorCode) {
+		super(cause);
+		this.errorCode = errorCode;
+	}
+
+	public IncomingFileTransferException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public IncomingFileTransferException(String message, Throwable cause, int errorCode) {
+		super(message, cause);
+		this.errorCode = errorCode;
+	}
+
+	/**
+	 * @since 4.0
+	 */
+	public IncomingFileTransferException(String message, Throwable cause, int errorCode, Map responseHeaders) {
+		super(message, cause);
+		this.errorCode = errorCode;
+		this.responseHeaders = responseHeaders;
+	}
+
+	/**
+	 * @since 4.0
+	 */
+	public IncomingFileTransferException(String message, int errorCode, Map responseHeaders) {
+		super(message);
+		this.errorCode = errorCode;
+		this.responseHeaders = responseHeaders;
+	}
+
+	/**
+	 * @since 4.0
+	 */
+	public IncomingFileTransferException(Throwable cause, int errorCode, Map responseHeaders) {
+		super(cause);
+		this.errorCode = errorCode;
+		this.responseHeaders = responseHeaders;
+	}
+
+	public int getErrorCode() {
+		return errorCode;
+	}
+
+	/**
+	 * @since 4.0
+	 */
+	public Map getResponseHeaders() {
+		return responseHeaders;
+	}
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/InvalidFileRangeSpecificationException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/RemoteFileSystemException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/SendFileTransferException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/SendFileTransferException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/SendFileTransferException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/SendFileTransferException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/UserCancelledException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/UserCancelledException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/UserCancelledException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/UserCancelledException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferConnectStartEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferConnectStartEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferConnectStartEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferConnectStartEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferRequestEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferRequestEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferRequestEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IFileTransferRequestEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDataEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDataEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDataEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDataEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveDoneEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceivePausedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceivePausedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceivePausedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceivePausedEvent.java
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java
new file mode 100644
index 0000000..749a2a2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveResumedEvent.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ *               Cloudsmith, Inc. - additional API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.filetransfer.events;
+
+import java.io.*;
+import java.util.Map;
+import org.eclipse.ecf.filetransfer.*;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+
+/**
+ * Event sent to {@link IFileTransferListener} associated with
+ * {@link IIncomingFileTransfer} instances when file transfer is resumed.
+ * 
+ */
+public interface IIncomingFileTransferReceiveResumedEvent extends IIncomingFileTransferEvent {
+
+	/**
+	 * Get IFileID for incoming file
+	 * 
+	 * @return IFileID for this file transfer event. Will not be
+	 *         <code>null</code>.
+	 */
+	public IFileID getFileID();
+
+	/**
+	 * Get incoming file transfer object by specifying a local File instance to
+	 * save the received contents to.
+	 * 
+	 * @param localFileToSave
+	 *            the file on the local file system to receive and save the
+	 *            remote file. Must not be <code>null</code>.
+	 * @param append
+	 *            if <code>true</code>, and data received is appended to the
+	 *            given localFileToSave. If <code>false</code>, data are written
+	 *            to the beginning of the given localFileToSave, and any
+	 *            existing contents are overwritten.
+	 * @return IIncomingFileTransfer the incoming file transfer object. Will not
+	 *         be <code>null</code>.
+	 * @throws IOException
+	 *             if localFileToSave cannot be opened for writing.
+	 * @since 2.0
+	 */
+	public IIncomingFileTransfer receive(File localFileToSave, boolean append) throws IOException;
+
+	/**
+	 * Just like {@link #receive(File,boolean)} but this method also give the
+	 * caller a chance to provide a factory that creates the job that will
+	 * perform the actual file transfer. The intended use for this is when the
+	 * user of the framework needs more elaborate control over such jobs such as
+	 * waiting for a group of parallel file transfers to complete. Such
+	 * functionality can for instance exploit the Eclipse runtime concept of Job
+	 * families.
+	 * 
+	 * @param localFileToSave
+	 *            the file on the local file system to receive and save the
+	 *            remote file. Must not be <code>null</code>.
+	 * @param append
+	 *            if <code>true</code>, and data received is appended to the
+	 *            given localFileToSave. If <code>false</code>, data are written
+	 *            to the beginning of the given localFileToSave, and any
+	 *            existing contents are overwritten.
+	 * @param fileTransferJob
+	 *            A subclass of {@link FileTransferJob} to use to run the actual
+	 *            transfer. If <code>null</code>, provider will create default
+	 *            implementation. NOTE: the given job should *not* be
+	 *            scheduled/started prior to being provided as parameter to this
+	 *            method.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guarantee that the data received is actually written to the given
+	 *         OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing.
+	 * @since 2.0
+	 */
+	public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob, boolean append) throws IOException;
+
+	/**
+	 * Get incoming file transfer by specifying an OutputStream instance to save
+	 * the received contents to. NOTE: the caller is responsible for calling
+	 * {@link OutputStream#close()} on the OutputStream provided. If the stream
+	 * provided is buffered, then {@link BufferedOutputStream#flush()} should be
+	 * called to guaranteed that the data received is actually written to the
+	 * given OutputStream.
+	 * 
+	 * @param streamToStore
+	 *            the output stream to store the incoming file. Must not be
+	 *            <code>null</code>.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guarantee that the data received is actually written to the given
+	 *         OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing
+	 */
+	public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException;
+
+	/**
+	 * Just like {@link #receive(OutputStream)} but this method also give the
+	 * caller a chance to provide a factory that creates the job that will
+	 * perform the actual file transfer. The intended use for this is when the
+	 * user of the framework needs more elaborate control over such jobs such as
+	 * waiting for a group of parallel file transfers to complete. Such
+	 * functionality can for instance exploit the Eclipse runtime concept of Job
+	 * families.
+	 * 
+	 * @param streamToStore
+	 *            the output stream to store the incoming file. Must not be
+	 *            <code>null</code>.
+	 * @param fileTransferJob
+	 *            A subclass of {@link FileTransferJob} to use to run the actual
+	 *            transfer. If <code>null</code>, provider will create default
+	 *            implementation. NOTE: the given job should *not* be
+	 *            scheduled/started prior to being provided as a parameter to
+	 *            this method.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guarantee that the data received is actually written to the given
+	 *         OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing
+	 */
+	public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException;
+
+	/**
+	 * Cancel incoming file transfer
+	 */
+	public void cancel();
+
+	/**
+	 * Get response headers.
+	 * @return Map of response headers.  <code>null</code> if no headers available.
+	 * @since 4.0
+	 */
+	public Map getResponseHeaders();
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java
new file mode 100644
index 0000000..60ce0d1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IIncomingFileTransferReceiveStartEvent.java
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ *               Cloudsmith, Inc. - additional API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.filetransfer.events;
+
+import java.io.*;
+import java.util.Map;
+import org.eclipse.ecf.filetransfer.*;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+
+/**
+ * Event sent to {@link IFileTransferListener} associated with
+ * {@link IIncomingFileTransfer} instances
+ * 
+ */
+public interface IIncomingFileTransferReceiveStartEvent extends IIncomingFileTransferEvent {
+
+	/**
+	 * Get IFileID for incoming file
+	 * 
+	 * @return IFileID for this file transfer event. Will not be
+	 *         <code>null</code>.
+	 */
+	public IFileID getFileID();
+
+	/**
+	 * Get incoming file transfer object by specifying a local File instance to
+	 * save the received contents to.
+	 * 
+	 * @param localFileToSave
+	 *            the file on the local file system to receive and save the
+	 *            remote file. Must not be <code>null</code>. If the file
+	 *            already exists, its content will be overwritten by any data
+	 *            received.
+	 * @return IIncomingFileTransfer the incoming file transfer object. Will not
+	 *         be <code>null</code>.
+	 * @throws IOException
+	 *             if localFileToSave cannot be opened for writing
+	 */
+	public IIncomingFileTransfer receive(File localFileToSave) throws IOException;
+
+	/**
+	 * Just like {@link #receive(File)} but this method also give the caller
+	 * a chance to provide a factory that creates the job that will perform the
+	 * actual file transfer. The intended use for this is when the user of the
+	 * framework needs more elaborate control over such jobs such as waiting for a
+	 * group of parallel file transfers to complete. Such functionality can for
+	 * instance exploit the Eclipse runtime concept of Job families.
+	 * 
+	 * @param localFileToSave
+	 *            the file on the local file system to receive and save the
+	 *            remote file. Must not be <code>null</code>. If the file
+	 *            already exists, its content will be overwritten by any data
+	 *            received.
+	 * @param fileTransferJob A subclass of {@link FileTransferJob} to use to run the actual transfer.  If
+	 *         <code>null</code>, provider will create default implementation.  NOTE: the given job should
+	 *         *not* be scheduled/started prior to being provided as a parameter to this method.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guaranteed that the data received is actually written to the
+	 *         given OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing
+	 *             
+	 * @since 2.0
+	 */
+	public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob) throws IOException;
+
+	/**
+	 * Get incoming file transfer by specifying an OutputStream instance to save
+	 * the received contents to. NOTE: the caller is responsible for calling
+	 * {@link OutputStream#close()} on the OutputStream provided. If the stream
+	 * provided is buffered, then {@link BufferedOutputStream#flush()} should be
+	 * called to guaranteed that the data received is actually written to the
+	 * given OutputStream.
+	 * 
+	 * @param streamToStore
+	 *            the output stream to store the incoming file. Must not be
+	 *            <code>null</code>.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guaranteed that the data received is actually written to the
+	 *         given OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing
+	 */
+	public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException;
+
+	/**
+	 * Just like {@link #receive(OutputStream)} but this method also give the caller
+	 * a chance to provide a factory that creates the job that will perform the
+	 * actual file transfer. The intended use for this is when the user of the
+	 * framework needs more elaborate control over such jobs such as waiting for a
+	 * group of parallel file transfers to complete. Such functionality can for
+	 * instance exploit the Eclipse runtime concept of Job families.
+	 * 
+	 * @param streamToStore
+	 *            the output stream to store the incoming file. Must not be
+	 *            <code>null</code>.
+	 * @param fileTransferJob A subclass of {@link FileTransferJob} to use to run the actual transfer.  If
+	 *         <code>null</code>, provider will create default implementation.  NOTE: the given job should
+	 *         *not* be scheduled/started prior to being provided as a parameter to this method.
+	 * @return IIncomingFileTransfer the incoming file transfer object. NOTE:
+	 *         the caller is responsible for calling
+	 *         {@link OutputStream#close()} on the OutputStream provided. If the
+	 *         stream provided is buffered, then
+	 *         {@link BufferedOutputStream#flush()} should be called to
+	 *         guaranteed that the data received is actually written to the
+	 *         given OutputStream.
+	 * @throws IOException
+	 *             if streamToStore cannot be opened for writing
+	 *             
+	 * @since 2.0
+	 */
+	public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException;
+
+	/**
+	 * Cancel incoming file transfer
+	 */
+	public void cancel();
+
+	/**
+	 * Get response headers.
+	 * @return Map of response headers.  <code>null</code> if no headers available.
+	 * @since 4.0
+	 */
+	public Map getResponseHeaders();
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferResponseEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferResponseEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferResponseEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferResponseEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDataEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDataEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDataEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDataEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDoneEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDoneEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDoneEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendDoneEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendPausedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendPausedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendPausedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendPausedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendResumedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendResumedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendResumedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IOutgoingFileTransferSendResumedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemBrowseEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemBrowseEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemBrowseEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemBrowseEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/IRemoteFileSystemEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketClosedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketClosedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketClosedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketClosedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketConnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketCreatedEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketCreatedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketCreatedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketCreatedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEvent.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEvent.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEventSource.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEventSource.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEventSource.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketEventSource.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketListener.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketListener.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socket/ISocketListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socketfactory/INonconnectedSocketFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socketfactory/INonconnectedSocketFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socketfactory/INonconnectedSocketFactory.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/events/socketfactory/INonconnectedSocketFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileCreateException.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileCreateException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileCreateException.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileCreateException.java
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java
new file mode 100644
index 0000000..107c517
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/FileIDFactory.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.filetransfer.identity;
+
+import java.net.URI;
+import java.net.URL;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
+import org.eclipse.ecf.internal.filetransfer.Activator;
+import org.eclipse.ecf.internal.filetransfer.FileTransferDebugOptions;
+
+/**
+ * Factory class entry point for creating IFileID instances.
+ * 
+ */
+public class FileIDFactory implements IFileIDFactory {
+
+	protected static FileIDFactory instance = null;
+
+	static {
+		instance = new FileIDFactory();
+	}
+
+	/**
+	 * Get singleton instance
+	 * 
+	 * @return FileIDFactory singleton instance. Will not be <code>null</code>.
+	 * @since 5.0
+	 */
+	public static FileIDFactory getDefault() {
+		return instance;
+	}
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be <code>null</code>.
+	 * @param remoteFile
+	 *            the remote filename to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, URL remoteFile) throws FileCreateException {
+		return createFileID(namespace, new Object[] {remoteFile});
+	}
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be null.
+	 * @param remoteFile
+	 *            the remote filename to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, String remoteFile) throws FileCreateException {
+		return createFileID(namespace, new Object[] {remoteFile});
+	}
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be null.
+	 * @param remoteFile
+	 *            the remote resource identifier to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 * @since 5.0
+	 */
+	public IFileID createFileID(Namespace namespace, URI remoteFile) throws FileCreateException {
+		return createFileID(namespace, new Object[] {remoteFile});
+	}
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be <code>null</code>.
+	 * @param arguments
+	 *            Object [] of arguments to use to create file ID. These
+	 *            arguments will be passed to the
+	 *            {@link Namespace#createInstance(Object[])} method of the
+	 *            appropriate Namespace setup by the provider
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, Object[] arguments) throws FileCreateException {
+		Trace.entering(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_ENTERING, this.getClass(), "createFileID", new Object[] {namespace, arguments}); //$NON-NLS-1$
+		try {
+			IFileID result = (IFileID) IDFactory.getDefault().createID(namespace, arguments);
+			Trace.exiting(Activator.PLUGIN_ID, FileTransferDebugOptions.METHODS_EXITING, this.getClass(), "createFileID", result); //$NON-NLS-1$
+			return result;
+		} catch (Exception e) {
+			Trace.throwing(Activator.PLUGIN_ID, FileTransferDebugOptions.EXCEPTIONS_THROWING, FileIDFactory.class, "createFileID", e); //$NON-NLS-1$
+			throw new FileCreateException("Exception in createFileID", e); //$NON-NLS-1$
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java
new file mode 100644
index 0000000..b70aa8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileID.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.filetransfer.identity;
+
+import java.net.*;
+import org.eclipse.ecf.core.identity.ID;
+
+/**
+ * ID for a remote file.
+ * 
+ */
+public interface IFileID extends ID {
+
+	/**
+	 * Get the file name from this IFileID. This will return just the filename
+	 * portion of a more complex file ID, e.g. index.html from IFileID created
+	 * with value "http://www.composent.com/index.html"
+	 * 
+	 * @return String just the file name and extension (if any) for this given
+	 *         IFileID. Will not be <code>null</code>.
+	 */
+	public String getFilename();
+
+	/**
+	 * Get the url associated with the file identified by this IFileID.
+	 * 
+	 * @return URL associated with this IFileID.  Will not be null.
+	 * @exception MalformedURLException thrown if URL cannot be created for this IFileID
+	 */
+	public URL getURL() throws MalformedURLException;
+
+	/**
+	 * Get the URI associated with the file identified by this IFileID.
+	 * 
+	 * @return URI associated with this IFileID.  Will not be <code>null</code>.
+	 * @throws URISyntaxException thrown if URI cannot be created for this IFileID.
+	 * @since 5.0
+	 */
+	public URI getURI() throws URISyntaxException;
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileIDFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileIDFactory.java
new file mode 100644
index 0000000..917c7d8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/identity/IFileIDFactory.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+* Copyright (c) 2010 Composent, Inc. and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Composent, Inc. - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.filetransfer.identity;
+
+import java.net.URI;
+import java.net.URL;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
+
+/**
+ * @since 5.0
+ */
+public interface IFileIDFactory {
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be <code>null</code>.
+	 * @param remoteFile
+	 *            the remote filename to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, URL remoteFile) throws FileCreateException;
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be null.
+	 * @param remoteFile
+	 *            the remote filename to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, String remoteFile) throws FileCreateException;
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be null.
+	 * @param remoteFile
+	 *            the remote resource identifier to use. Must not be <code>null</code>.
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 * @since 5.0
+	 */
+	public IFileID createFileID(Namespace namespace, URI remoteFile) throws FileCreateException;
+
+	/**
+	 * Create an IFileID from a Namespace and a String.
+	 * 
+	 * @param namespace
+	 *            the namespace to use to create the IFileID. Can use
+	 *            {@link IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()}.
+	 *            Must not be <code>null</code>.
+	 * @param arguments
+	 *            Object [] of arguments to use to create file ID. These
+	 *            arguments will be passed to the
+	 *            {@link Namespace#createInstance(Object[])} method of the
+	 *            appropriate Namespace setup by the provider
+	 * @return IFileID instance. Will not return <code>null</code>.
+	 * @throws FileCreateException
+	 *             thrown if some problem creating IFileID from given namespace
+	 *             and filename
+	 */
+	public IFileID createFileID(Namespace namespace, Object[] arguments) throws FileCreateException;
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowser.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowser.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowser.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowser.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowserFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowserFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowserFactory.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRemoteFileSystemBrowserFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransferFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransferFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransferFactory.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/IRetrieveFileTransferFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransferFactory.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransferFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransferFactory.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/service/ISendFileTransferFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Activator.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Activator.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Activator.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/Activator.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/FileTransferDebugOptions.java b/eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/FileTransferDebugOptions.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/FileTransferDebugOptions.java
rename to eclipse/plugins/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/internal/filetransfer/FileTransferDebugOptions.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.classpath b/eclipse/plugins/org.eclipse.ecf.identity/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.classpath
rename to eclipse/plugins/org.eclipse.ecf.identity/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/.gitignore b/eclipse/plugins/org.eclipse.ecf.identity/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.project b/eclipse/plugins/org.eclipse.ecf.identity/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.project
rename to eclipse/plugins/org.eclipse.ecf.identity/.project
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..add1632
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:13:28 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.pde.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/.settings/org.eclipse.pde.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.identity/.settings/org.eclipse.pde.core.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..331f2bb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.identity;singleton:=true
+Bundle-Version: 3.1.100.qualifier
+Bundle-Activator: org.eclipse.ecf.internal.core.identity.Activator
+Bundle-Localization: plugin
+Bundle-Vendor: %plugin.provider
+Eclipse-LazyStart: true
+Export-Package: org.eclipse.ecf.core.identity;version="3.2.0",
+ org.eclipse.ecf.core.util;version="3.2.0",
+ org.eclipse.ecf.internal.core.identity;version="3.2.0";x-internal:=true
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Import-Package: org.eclipse.osgi.service.debug;version="1.0.0",
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.log;version="1.3.0",
+ org.osgi.util.tracker;version="1.3.2"
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.equinox.registry
+Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.ecf.core.util"
+
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/about.html b/eclipse/plugins/org.eclipse.ecf.identity/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/about.html
rename to eclipse/plugins/org.eclipse.ecf.identity/about.html
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/build.properties b/eclipse/plugins/org.eclipse.ecf.identity/build.properties
new file mode 100644
index 0000000..6363cbb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/build.properties
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2004, 2006. Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Composent Inc. - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               schema/,\
+               plugin.properties
+src.includes = about.html,\
+               schema/
+jre.compilation.profile = J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/plugin.properties b/eclipse/plugins/org.eclipse.ecf.identity/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.identity/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/plugin.xml b/eclipse/plugins/org.eclipse.ecf.identity/plugin.xml
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/plugin.xml
rename to eclipse/plugins/org.eclipse.ecf.identity/plugin.xml
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/schema/namespace.exsd b/eclipse/plugins/org.eclipse.ecf.identity/schema/namespace.exsd
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/schema/namespace.exsd
rename to eclipse/plugins/org.eclipse.ecf.identity/schema/namespace.exsd
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/BaseID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/BaseID.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/BaseID.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/BaseID.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
new file mode 100644
index 0000000..1155ff4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/GUID.java
@@ -0,0 +1,158 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+import java.security.SecureRandom;
+import org.eclipse.ecf.core.util.Base64;
+
+/**
+ * Globally unique ID implementation class. Uses
+ * {@link java.security.SecureRandom} to create a unique number of given byte
+ * length. Default byte length for secure number is 20 bytes. Default algorithm
+ * used for creating a SecureRandom instance is SHA1PRNG.
+ */
+public class GUID extends StringID {
+	private static final long serialVersionUID = 3545794369039972407L;
+
+	public static class GUIDNamespace extends Namespace {
+		private static final long serialVersionUID = -8546568877571886386L;
+
+		public GUIDNamespace() {
+			super(GUID.class.getName(), "GUID Namespace"); //$NON-NLS-1$
+		}
+
+		public ID createInstance(Object[] args) throws IDCreateException {
+			try {
+				String init = getInitStringFromExternalForm(args);
+				if (init != null)
+					return new GUID(this, init);
+				if (args == null || args.length <= 0)
+					return new GUID(this);
+				else if (args.length == 1 && args[0] instanceof Integer)
+					return new GUID(this, ((Integer) args[0]).intValue());
+				else if (args.length == 1 && args[0] instanceof String)
+					return new GUID(this, ((String) args[0]));
+				else
+					return new GUID(this);
+			} catch (Exception e) {
+				throw new IDCreateException(getName() + " createInstance()", e); //$NON-NLS-1$
+			}
+		}
+
+		public String getScheme() {
+			return GUID.class.getName();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @seeorg.eclipse.ecf.core.identity.Namespace#
+		 * getSupportedParameterTypesForCreateInstance()
+		 */
+		public Class[][] getSupportedParameterTypes() {
+			return new Class[][] { {}, { Integer.class } };
+		}
+
+	}
+
+	public static final String SR_DEFAULT_ALGO = null;
+
+	public static final String SR_DEFAULT_PROVIDER = null;
+
+	public static final int DEFAULT_BYTE_LENGTH = 20;
+
+	// Class specific SecureRandom instance
+	protected static transient SecureRandom random;
+
+	/**
+	 * Protected constructor for factory-based construction
+	 * 
+	 * @param n
+	 *            the Namespace this identity will belong to
+	 * @param provider
+	 *            the name of the algorithm to use. See {@link SecureRandom}
+	 * @param byteLength
+	 *            the length of the target number (in bytes)
+	 */
+	protected GUID(Namespace n, String algo, String provider, int byteLength)
+			throws IDCreateException {
+		super(n, ""); //$NON-NLS-1$
+		// Get SecureRandom instance for class
+		try {
+			getRandom(algo, provider);
+		} catch (Exception e) {
+			throw new IDCreateException(
+					"GUID creation failure: " + e.getMessage()); //$NON-NLS-1$
+		}
+		// make sure we have reasonable byteLength
+		if (byteLength <= 0)
+			byteLength = 1;
+		byte[] newBytes = new byte[byteLength];
+		// Fill up random bytes
+		random.nextBytes(newBytes);
+		// Set value
+		value = Base64.encode(newBytes);
+	}
+
+	protected GUID(Namespace n, String value) {
+		super(n, value);
+	}
+
+	protected GUID(Namespace n, int byteLength) throws IDCreateException {
+		this(n, SR_DEFAULT_ALGO, SR_DEFAULT_PROVIDER, byteLength);
+	}
+
+	protected GUID(Namespace n) throws IDCreateException {
+		this(n, DEFAULT_BYTE_LENGTH);
+	}
+
+	/**
+	 * Get SecureRandom instance for creation of random number.
+	 * 
+	 * @param algo
+	 *            the String algorithm specification (e.g. "SHA1PRNG") for
+	 *            creation of the SecureRandom instance
+	 * @param provider
+	 *            the provider of the implementation of the given algorighm
+	 *            (e.g. "SUN")
+	 * @return SecureRandom
+	 * @exception Exception
+	 *                thrown if SecureRandom instance cannot be created/accessed
+	 */
+	protected static synchronized SecureRandom getRandom(String algo,
+			String provider) throws Exception {
+		// Given algo and provider, get SecureRandom instance
+		if (random == null) {
+			initializeRandom(algo, provider);
+		}
+		return random;
+	}
+
+	protected static synchronized void initializeRandom(String algo,
+			String provider) throws Exception {
+		if (provider == null) {
+			if (algo == null) {
+				try {
+					random = SecureRandom.getInstance("IBMSECURERANDOM"); //$NON-NLS-1$
+				} catch (Exception e) {
+					random = SecureRandom.getInstance("SHA1PRNG"); //$NON-NLS-1$
+				}
+			} else
+				random = SecureRandom.getInstance(algo);
+		} else {
+			random = SecureRandom.getInstance(algo, provider);
+		}
+	}
+
+	public String toString() {
+		StringBuffer sb = new StringBuffer("GUID["); //$NON-NLS-1$
+		sb.append(value).append("]"); //$NON-NLS-1$
+		return sb.toString();
+	}
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/ID.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDCreateException.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDCreateException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDCreateException.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDCreateException.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
new file mode 100644
index 0000000..c040aed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IDFactory.java
@@ -0,0 +1,281 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+import java.security.AccessController;
+import java.util.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ecf.internal.core.identity.Activator;
+
+/**
+ * A factory class for creating ID instances. This is the factory for plugins to
+ * manufacture ID instances.
+ * 
+ */
+public class IDFactory implements IIDFactory {
+	public static final String SECURITY_PROPERTY = IDFactory.class.getName()
+			+ ".security"; //$NON-NLS-1$
+
+	private static final int IDENTITY_CREATION_ERRORCODE = 2001;
+
+	private static Hashtable namespaces = new Hashtable();
+
+	private static boolean securityEnabled = false;
+
+	protected static IIDFactory instance = null;
+
+	static {
+		instance = new IDFactory();
+		addNamespace0(new StringID.StringIDNamespace());
+		addNamespace0(new GUID.GUIDNamespace());
+		addNamespace0(new LongID.LongNamespace());
+	}
+
+	private synchronized static void initialize() {
+		if (!initialized) {
+			Activator a = Activator.getDefault();
+			if (a != null)
+				a.setupNamespaceExtensionPoint();
+			initialized = true;
+		}
+	}
+
+	private static boolean initialized = false;
+
+	public synchronized static IIDFactory getDefault() {
+		return instance;
+	}
+
+	private IDFactory() {
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#addNamespace(org.eclipse.ecf
+	 * .core.identity.Namespace)
+	 */
+	public Namespace addNamespace(Namespace namespace) throws SecurityException {
+		if (namespace == null)
+			return null;
+		checkPermission(new NamespacePermission(namespace.toString(),
+				NamespacePermission.ADD_NAMESPACE));
+		initialize();
+		return addNamespace0(namespace);
+	}
+
+	public final static Namespace addNamespace0(Namespace namespace) {
+		if (namespace == null)
+			return null;
+		return (Namespace) namespaces.put(namespace.getName(), namespace);
+	}
+
+	protected final static void checkPermission(
+			NamespacePermission namespacepermission) throws SecurityException {
+		if (securityEnabled)
+			AccessController.checkPermission(namespacepermission);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#containsNamespace(org.eclipse
+	 * .ecf.core.identity.Namespace)
+	 */
+	public boolean containsNamespace(Namespace namespace)
+			throws SecurityException {
+		if (namespace == null)
+			return false;
+		checkPermission(new NamespacePermission(namespace.toString(),
+				NamespacePermission.CONTAINS_NAMESPACE));
+		initialize();
+		return containsNamespace0(namespace);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIDFactory#getNamespaces()
+	 */
+	public List getNamespaces() {
+		initialize();
+		return new ArrayList(namespaces.values());
+	}
+
+	public final static boolean containsNamespace0(Namespace n) {
+		if (n == null)
+			return false;
+		return namespaces.containsKey(n.getName());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#getNamespace(org.eclipse.ecf
+	 * .core.identity.Namespace)
+	 */
+	public Namespace getNamespace(Namespace namespace) throws SecurityException {
+		if (namespace == null)
+			return null;
+		checkPermission(new NamespacePermission(namespace.toString(),
+				NamespacePermission.GET_NAMESPACE));
+		initialize();
+		return getNamespace0(namespace);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#getNamespaceByName(java.lang
+	 * .String)
+	 */
+	public Namespace getNamespaceByName(String name) throws SecurityException {
+		initialize();
+		return getNamespace0(name);
+	}
+
+	protected final static Namespace getNamespace0(Namespace n) {
+		if (n == null)
+			return null;
+		return (Namespace) namespaces.get(n.getName());
+	}
+
+	protected final static Namespace getNamespace0(String name) {
+		if (name == null)
+			return null;
+		return (Namespace) namespaces.get(name);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIDFactory#createGUID()
+	 */
+	public ID createGUID() throws IDCreateException {
+		return createGUID(GUID.DEFAULT_BYTE_LENGTH);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIDFactory#createGUID(int)
+	 */
+	public ID createGUID(int length) throws IDCreateException {
+		return createID(new GUID.GUIDNamespace(), new Integer[] { new Integer(
+				length) });
+	}
+
+	protected static void logAndThrow(String s, Throwable t)
+			throws IDCreateException {
+		IDCreateException e = null;
+		if (t != null) {
+			e = new IDCreateException(s + ": " + t.getClass().getName() + ": " //$NON-NLS-1$ //$NON-NLS-2$
+					+ t.getMessage(), t);
+		} else {
+			e = new IDCreateException(s);
+		}
+		Activator.getDefault().log(
+				new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+						IDENTITY_CREATION_ERRORCODE, s, e));
+		throw e;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#createID(org.eclipse.ecf.core
+	 * .identity.Namespace, java.lang.Object[])
+	 */
+	public ID createID(Namespace n, Object[] args) throws IDCreateException {
+		// Verify namespace is non-null
+		if (n == null)
+			logAndThrow("Namespace cannot be null", null); //$NON-NLS-1$
+		initialize();
+		// Make sure that namespace is in table of known namespace. If not,
+		// throw...we don't create any instances that we don't know about!
+		Namespace ns = getNamespace0(n);
+		if (ns == null)
+			logAndThrow("Namespace " + n.getName() + " not found", null); //$NON-NLS-1$
+		return ns.createInstance(args);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIDFactory#createID(java.lang.String,
+	 * java.lang.Object[])
+	 */
+	public ID createID(String namespaceName, Object[] args)
+			throws IDCreateException {
+		Namespace n = getNamespaceByName(namespaceName);
+		if (n == null)
+			throw new IDCreateException(
+					"Namespace " + namespaceName + " not found"); //$NON-NLS-1$
+		return createID(n, args);
+	}
+
+	public ID createID(Namespace namespace, String uri)
+			throws IDCreateException {
+		return createID(namespace, new Object[] { uri });
+	}
+
+	public ID createID(String namespace, String uri) throws IDCreateException {
+		return createID(namespace, new Object[] { uri });
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#createStringID(java.lang.String)
+	 */
+	public ID createStringID(String idstring) throws IDCreateException {
+		if (idstring == null)
+			throw new IDCreateException("StringID cannot be null"); //$NON-NLS-1$
+		return createID(new StringID.StringIDNamespace(),
+				new String[] { idstring });
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIDFactory#createLongID(long)
+	 */
+	public ID createLongID(long l) throws IDCreateException {
+		return createID(new LongID.LongNamespace(), new Long[] { new Long(l) });
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.core.identity.IIDFactory#removeNamespace(org.eclipse.
+	 * ecf.core.identity.Namespace)
+	 */
+	public Namespace removeNamespace(Namespace n) throws SecurityException {
+		if (n == null)
+			return null;
+		checkPermission(new NamespacePermission(n.toString(),
+				NamespacePermission.REMOVE_NAMESPACE));
+		initialize();
+		return removeNamespace0(n);
+	}
+
+	protected final static Namespace removeNamespace0(Namespace n) {
+		if (n == null)
+			return null;
+		return (Namespace) namespaces.remove(n.getName());
+	}
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIDFactory.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIDFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIDFactory.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIDFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIdentifiable.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIdentifiable.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIdentifiable.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IIdentifiable.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IResourceID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IResourceID.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IResourceID.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/IResourceID.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
new file mode 100644
index 0000000..fabb7b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/LongID.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+/**
+ * A unique ID class based upon Long/long
+ * 
+ */
+public class LongID extends BaseID {
+	private static final long serialVersionUID = 4049072748317914423L;
+
+	Long value = null;
+
+	public static class LongNamespace extends Namespace {
+		private static final long serialVersionUID = -1580533392719331665L;
+
+		public LongNamespace() {
+			super(LongID.class.getName(), "LongID Namespace"); //$NON-NLS-1$
+		}
+
+		/**
+		 * @param args
+		 *            must not be <code>null></code>
+		 * @return ID created. Will not be <code>null</code>.
+		 * @throws IDCreateException
+		 *             never thrown
+		 */
+		public ID createInstance(Object[] args) throws IDCreateException {
+			try {
+				String init = getInitStringFromExternalForm(args);
+				if (init != null)
+					return new LongID(this, Long.decode(init));
+				return new LongID(this, (Long) args[0]);
+			} catch (Exception e) {
+				throw new IDCreateException(getName() + " createInstance()", e); //$NON-NLS-1$
+			}
+		}
+
+		public String getScheme() {
+			return LongID.class.getName();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @seeorg.eclipse.ecf.core.identity.Namespace#
+		 * getSupportedParameterTypesForCreateInstance()
+		 */
+		public Class[][] getSupportedParameterTypes() {
+			return new Class[][] { { Long.class } };
+		}
+	}
+
+	protected LongID(Namespace n, Long v) {
+		super(n);
+		value = v;
+	}
+
+	protected LongID(Namespace n, long v) {
+		super(n);
+		value = new Long(v);
+	}
+
+	protected int namespaceCompareTo(BaseID o) {
+		Long ovalue = ((LongID) o).value;
+		return value.compareTo(ovalue);
+	}
+
+	protected boolean namespaceEquals(BaseID o) {
+		if (!(o instanceof LongID))
+			return false;
+		LongID obj = (LongID) o;
+		return value.equals(obj.value);
+	}
+
+	protected String namespaceGetName() {
+		return value.toString();
+	}
+
+	protected int namespaceHashCode() {
+		return value.hashCode();
+	}
+
+	public long longValue() {
+		return value.longValue();
+	}
+
+	public String toString() {
+		StringBuffer sb = new StringBuffer("LongID["); //$NON-NLS-1$
+		sb.append(value).append("]"); //$NON-NLS-1$
+		return sb.toString();
+
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
new file mode 100644
index 0000000..53a31fc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/Namespace.java
@@ -0,0 +1,329 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+import java.io.Serializable;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.internal.core.identity.Activator;
+
+/**
+ * Namespace base class.
+ * <p>
+ * This class and subclasses define a namespace for the creation and management
+ * of ID instances. Creation of ID instances is accomplished via the
+ * {@link #createInstance(Object[])} method, implemented by subclasses of this
+ * Namespace superclass.
+ * <p>
+ * All Namespace instances must have a unique name passed to the Namespace upon
+ * construction.
+ * <p>
+ * Typically Namespace instances are created via plugins that define extensions
+ * of the org.eclipse.ecf.namespace extension point. For example, to define a
+ * new Namespace subclass XMPPNamespace with name "ecf.xmpp" and add it to the
+ * ECF extension registry:
+ * 
+ * <pre>
+ *        <extension
+ *             point="org.eclipse.ecf.namespace">
+ *          <namespace
+ *                class="XMPPNamespace"
+ *                name="ecf.xmpp"/>
+ *        </extension>
+ * </pre>
+ * 
+ * @see ID
+ */
+public abstract class Namespace implements Serializable, IAdaptable {
+
+	private static final long serialVersionUID = 3976740272094720312L;
+
+	public static final String SCHEME_SEPARATOR = ":"; //$NON-NLS-1$
+
+	private String name;
+
+	private String description;
+
+	private int hashCode;
+
+	private boolean isInitialized = false;
+
+	public Namespace() {
+		// public null constructor
+	}
+
+	public final boolean initialize(String n, String desc) {
+		Assert.isNotNull(n, "Namespace<init> name cannot be null"); //$NON-NLS-1$
+		if (!isInitialized) {
+			this.name = n;
+			this.description = desc;
+			this.hashCode = name.hashCode();
+			this.isInitialized = true;
+			return true;
+		}
+		return false;
+	}
+
+	public Namespace(String name, String desc) {
+		initialize(name, desc);
+	}
+
+	/**
+	 * Override of Object.equals. This equals method returns true if the
+	 * provided Object is also a Namespace instance, and the names of the two
+	 * instances match.
+	 * 
+	 * @param other
+	 *            the Object to test for equality
+	 */
+	public boolean equals(Object other) {
+		if (!(other instanceof Namespace))
+			return false;
+		return ((Namespace) other).name.equals(name);
+	}
+
+	/**
+	 * Hashcode implementation. Subclasses should not override.
+	 * 
+	 * @return int hashCode for this Namespace. Should be unique.
+	 */
+	public int hashCode() {
+		return hashCode;
+	}
+
+	/**
+	 * Test whether two IDs are equal to one another.
+	 * 
+	 * @param first
+	 *            the first ID. Must not be <code>null</code>.
+	 * @param second
+	 *            the second ID. Must not be <code>null</code>.
+	 * @return <code>true</code> if this ID is equal to the given ID.
+	 *         <code>false</code> otherwise.
+	 */
+	protected boolean testIDEquals(BaseID first, BaseID second) {
+		// First check that namespaces are the same and non-null
+		Namespace sn = second.getNamespace();
+		if (sn == null || !this.equals(sn))
+			return false;
+		return first.namespaceEquals(second);
+	}
+
+	/**
+	 * The default implementation of this method is to call
+	 * id.namespaceGetName(). Subclasses may override.
+	 * 
+	 * @param id
+	 *            the ID to get the name for. Must not be <code>null</code>.
+	 * @return String that is the unique name for the given id within this
+	 *         Namespace.
+	 */
+	protected String getNameForID(BaseID id) {
+		return id.namespaceGetName();
+	}
+
+	/**
+	 * The default implementation of this method is to call
+	 * first.namespaceCompareTo(second). Subclasses may override.
+	 * 
+	 * @param first
+	 *            the first id to compare. Must not be <code>null</code>.
+	 * @param second
+	 *            the second id to compare. Must not be <code>null</code>.
+	 * @return int as specified by {@link Comparable}.
+	 */
+	protected int getCompareToForObject(BaseID first, BaseID second) {
+		return first.namespaceCompareTo(second);
+	}
+
+	/**
+	 * The default implementation of this method is to call
+	 * id.namespaceHashCode(). Subclasses may override.
+	 * 
+	 * @param id
+	 *            the id in this Namespace to get the hashcode for. Must not be
+	 *            <code>null</code>.
+	 * @return the hashcode for the given id. Returned value must be unique
+	 *         within this process.
+	 */
+	protected int getHashCodeForID(BaseID id) {
+		return id.namespaceHashCode();
+	}
+
+	/**
+	 * The default implementation of this method is to call
+	 * id.namespaceToExternalForm(). Subclasses may override.
+	 * 
+	 * @param id
+	 *            the id in this Namespace to convert to external form.
+	 * @return String that represents the given id in an external form. Note
+	 *         that this external form may at some later time be passed to
+	 *         {@link #createInstance(Object[])} as a single String parameter,
+	 *         and should result in a valid ID instance of the appropriate
+	 *         Namespace.
+	 */
+	protected String toExternalForm(BaseID id) {
+		return id.namespaceToExternalForm();
+	}
+
+	/**
+	 * Get the name of this namespace. Must not return <code>null</code>.
+	 * 
+	 * @return String name of Namespace instance. Must not return
+	 *         <code>null</code>, and the returned value should be a globally
+	 *         unique name for this Namespace subclass.
+	 * 
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * Get the description, associated with this Namespace. The returned value
+	 * may be <code>null</code>.
+	 * 
+	 * @return the description associated with this Namespace. May be
+	 *         <code>null</code>.
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * Make an instance of this namespace. Namespace subclasses, provided by
+	 * plugins must implement this method to construct ID instances for the
+	 * given namespace.
+	 * <p>
+	 * </p>
+	 * See {@link #getSupportedParameterTypes()} to get information relevant to
+	 * deciding what parameter types are expected by this method.
+	 * <p>
+	 * </p>
+	 * 
+	 * @param parameters
+	 *            an Object[] of parameters for creating ID instances. May be
+	 *            null.
+	 * 
+	 * @return a non-null ID instance. The class used may extend BaseID or may
+	 *         implement the ID interface directly
+	 * @throws IDCreateException
+	 *             if construction fails
+	 */
+	public abstract ID createInstance(Object[] parameters)
+			throws IDCreateException;
+
+	/**
+	 * Get the primary scheme associated with this namespace. Subclasses must
+	 * provide an implementation that returns a non-<code>null</code> scheme
+	 * identifier. Note that the returned scheme should <b>not</b> contain the
+	 * Namespace.SCHEME_SEPARATOR (\":\").
+	 * 
+	 * @return a String scheme identifier. Must not be <code>null</code>.
+	 */
+	public abstract String getScheme();
+
+	/**
+	 * Get an array of schemes supported by this Namespace instance. Subclasses
+	 * may override to support multiple schemes.
+	 * 
+	 * @return String[] of schemes supported by this Namespace. Will not be
+	 *         <code>null</code>, but returned array may be of length 0.
+	 */
+	public String[] getSupportedSchemes() {
+		return new String[0];
+	}
+
+	/**
+	 * Get the supported parameter types for IDs created via subsequent calls to
+	 * {@link #createInstance(Object[])}. Callers may use this method to
+	 * determine the available parameter types, and then create and pass in
+	 * conforming Object arrays to to {@link #createInstance(Object[])}.
+	 * <p>
+	 * </p>
+	 * An empty two-dimensional array (new Class[0][0]) is the default returned
+	 * by this abstract superclass. This means that the Object [] passed to
+	 * {@link #createInstance(Object[])} will be ignored.
+	 * <p>
+	 * </p>
+	 * Subsclasses should override this method to specify the parameters that
+	 * they will accept in calls to {@link #createInstance(Object[])}. The rows
+	 * of the returned Class array are the acceptable types for a given
+	 * invocation of createInstance.
+	 * <p>
+	 * </p>
+	 * Consider the following example:
+	 * <p>
+	 * </p>
+	 * 
+	 * <pre>
+	 * public Class[][] getSupportedParameterTypes() {
+	 * 	return new Class[][] { { String.class }, { String.class, String.class } };
+	 * }
+	 * </pre>
+	 * 
+	 * The above means that there are two acceptable values for the Object []
+	 * passed into {@link #createInstance(Object[])}: 1) a single String, and 2)
+	 * two Strings. These would therefore be acceptable as input to
+	 * createInstance:
+	 * 
+	 * <pre>
+	 *        ID newID1 = namespace.createInstance(new Object[] { "Hello" });
+	 *        ID newID2 = namespace.createInstance(new Object[] { "Hello", "There"}};
+	 * </pre>
+	 * 
+	 * @return Class [][] an array of class []s. Rows of the returned
+	 *         two-dimensional array define the acceptable parameter types for a
+	 *         single call to {@link #createInstance(Object[])}. If zero-length
+	 *         Class arrays are returned (i.e. Class[0][0]), then Object []
+	 *         parameters to {@link #createInstance(Object[])} will be ignored.
+	 */
+	public Class[][] getSupportedParameterTypes() {
+		return new Class[][] { {} };
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter.isInstance(this)) {
+			return this;
+		}
+		IAdapterManager manager = Activator.getDefault().getAdapterManager();
+		if (manager == null)
+			return null;
+		return manager.loadAdapter(this, adapter.getName());
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	protected String getInitStringFromExternalForm(Object[] args) {
+		if (args == null || args.length < 1 || args[0] == null)
+			return null;
+		if (args[0] instanceof String) {
+			final String arg = (String) args[0];
+			if (arg.startsWith(getScheme() + SCHEME_SEPARATOR)) {
+				final int index = arg.indexOf(SCHEME_SEPARATOR);
+				if (index >= arg.length())
+					return null;
+				return arg.substring(index + 1);
+			}
+		}
+		return null;
+	}
+
+	public String toString() {
+		StringBuffer b = new StringBuffer("Namespace["); //$NON-NLS-1$
+		b.append("name=").append(name).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+		b.append("scheme=").append(getScheme()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+		b.append("description=").append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+		return b.toString();
+	}
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/NamespacePermission.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/NamespacePermission.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/NamespacePermission.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/NamespacePermission.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
new file mode 100644
index 0000000..eb508dd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/StringID.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.identity;
+
+/**
+ * A string-based identity
+ * 
+ */
+public class StringID extends BaseID {
+	private static final long serialVersionUID = 3256437019155446068L;
+
+	public static class StringIDNamespace extends Namespace {
+		private static final long serialVersionUID = 7924280015192029963L;
+
+		public StringIDNamespace(String name, String desc) {
+			super(name, desc);
+		}
+
+		public StringIDNamespace() {
+			super(StringID.class.getName(), "StringID Namespace"); //$NON-NLS-1$
+		}
+
+		public ID createInstance(Object[] parameters) throws IDCreateException {
+			try {
+				String init = getInitStringFromExternalForm(parameters);
+				if (init != null)
+					return new StringID(this, init);
+				return new StringID(this, (String) parameters[0]);
+			} catch (Exception e) {
+				throw new IDCreateException(StringIDNamespace.this.getName()
+						+ " createInstance()", e); //$NON-NLS-1$
+			}
+		}
+
+		public String getScheme() {
+			return StringID.class.getName();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @seeorg.eclipse.ecf.core.identity.Namespace#
+		 * getSupportedParameterTypesForCreateInstance()
+		 */
+		public Class[][] getSupportedParameterTypes() {
+			return new Class[][] { { String.class } };
+		}
+	}
+
+	protected String value;
+
+	/**
+	 * Protected constructor for factory-based construction
+	 * 
+	 * @param n
+	 *            the Namespace this identity will belong to
+	 * @param s
+	 *            the String defining this StringID
+	 */
+	protected StringID(Namespace n, String s) {
+		super(n);
+		value = s;
+		setEmptyNamespace();
+	}
+
+	public int compareTo(Object o) {
+		setEmptyNamespace();
+		return super.compareTo(o);
+	}
+
+	public boolean equals(Object o) {
+		setEmptyNamespace();
+		return super.equals(o);
+	}
+
+	public String getName() {
+		setEmptyNamespace();
+		return super.getName();
+	}
+
+	public int hashCode() {
+		setEmptyNamespace();
+		return super.hashCode();
+	}
+
+	public Namespace getNamespace() {
+		setEmptyNamespace();
+		return namespace;
+	}
+
+	public String toExternalForm() {
+		setEmptyNamespace();
+		return super.toExternalForm();
+	}
+
+	public String toString() {
+		setEmptyNamespace();
+		int strlen = value.length();
+		StringBuffer sb = new StringBuffer(strlen + 10);
+		sb.insert(0, "StringID[").insert(9, value).insert(strlen + 9, ']'); //$NON-NLS-1$
+		return sb.toString();
+	}
+
+	protected int namespaceCompareTo(BaseID obj) {
+		return getName().compareTo(obj.getName());
+	}
+
+	protected boolean namespaceEquals(BaseID obj) {
+		if (!(obj instanceof StringID))
+			return false;
+		StringID o = (StringID) obj;
+		return value.equals(o.getName());
+	}
+
+	protected String namespaceGetName() {
+		return value;
+	}
+
+	protected int namespaceHashCode() {
+		return value.hashCode() ^ getClass().hashCode();
+	}
+
+	protected synchronized void setEmptyNamespace() {
+		if (namespace == null) {
+			namespace = IDFactory.getDefault().getNamespaceByName(
+					StringID.class.getName());
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/identity/URIID.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/AbstractFactory.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/AbstractFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/AbstractFactory.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/AbstractFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Base64.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Base64.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Base64.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Base64.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/ECFRuntimeException.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java
new file mode 100644
index 0000000..9cbd45e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/IDFactoryTracker.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.util;
+
+import org.eclipse.ecf.core.identity.IIDFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Service tracker customized to handle tracking the ECF id factory service
+ * (singleton).
+ * 
+ * @since 3.1
+ * 
+ */
+public class IDFactoryTracker extends ServiceTracker {
+
+	public IDFactoryTracker(BundleContext context) {
+		super(context, IIDFactory.class.getName(), null);
+	}
+
+	public IIDFactory getIDFactory() {
+		return (IIDFactory) getService();
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/LogHelper.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/PlatformHelper.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/PlatformHelper.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/PlatformHelper.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/PlatformHelper.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/StringUtils.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/SystemLogService.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/SystemLogService.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/SystemLogService.java
rename to eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/SystemLogService.java
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
new file mode 100644
index 0000000..2692b72
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java
@@ -0,0 +1,582 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.util;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+import org.eclipse.ecf.internal.core.identity.Activator;
+import org.eclipse.osgi.service.debug.DebugOptions;
+
+/**
+ * A utility for tracing debug information. Provides a simple interface for
+ * filtering and generating trace output.
+ * 
+ */
+public class Trace {
+
+	/**
+	 * private constructor for the static class.
+	 */
+	private Trace() {
+		super();
+	}
+
+	/**
+	 * String containing an open parenthesis.
+	 * 
+	 */
+	protected static final String PARENTHESIS_OPEN = "("; //$NON-NLS-1$
+
+	/**
+	 * String containing a close parenthesis.
+	 * 
+	 */
+	protected static final String PARENTHESIS_CLOSE = ")"; //$NON-NLS-1$
+
+	/**
+	 * String containing TRACE
+	 * 
+	 */
+	protected static final String TRACE_STR = "TRACE"; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the changing of values.
+	 * 
+	 */
+	protected static final String PREFIX_TRACING = "TRACING "; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the changing of values.
+	 * 
+	 */
+	protected static final String PREFIX_CHANGING = "CHANGING "; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the catching of throwables.
+	 * 
+	 */
+	protected static final String PREFIX_CATCHING = "CAUGHT "; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the throwing of throwables.
+	 * 
+	 */
+	protected static final String PREFIX_THROWING = "THROWN "; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the entering of methods.
+	 * 
+	 */
+	protected static final String PREFIX_ENTERING = "ENTERING "; //$NON-NLS-1$
+
+	/**
+	 * Prefix for tracing the exiting of methods.
+	 * 
+	 */
+	protected static final String PREFIX_EXITING = "EXITING "; //$NON-NLS-1$
+
+	/**
+	 * Separator for methods.
+	 * 
+	 */
+	protected static final String SEPARATOR_METHOD = "#"; //$NON-NLS-1$
+
+	/**
+	 * Separator for parameters.
+	 * 
+	 */
+	protected static final String SEPARATOR_PARAMETER = ", "; //$NON-NLS-1$
+
+	/**
+	 * Separator for return values.
+	 * 
+	 */
+	protected static final String SEPARATOR_RETURN = ":"; //$NON-NLS-1$
+
+	/**
+	 * Separator containing a space.
+	 * 
+	 */
+	protected static final String SEPARATOR_SPACE = " "; //$NON-NLS-1$
+
+	/**
+	 * Label indicating old value.
+	 * 
+	 */
+	protected static final String LABEL_OLD_VALUE = "old="; //$NON-NLS-1$
+
+	/**
+	 * Label indicating new value.
+	 * 
+	 */
+	protected static final String LABEL_NEW_VALUE = "new="; //$NON-NLS-1$
+
+	/**
+	 * The cached debug options (for optimization).
+	 */
+	private static final Map cachedOptions = new HashMap();
+
+	/**
+	 * Retrieves a Boolean value indicating whether tracing is enabled for the
+	 * specified plug-in.
+	 * 
+	 * @return Whether tracing is enabled for the plug-in.
+	 * @param pluginId
+	 *            The symbolic plugin id for which to determine trace
+	 *            enablement.
+	 * 
+	 */
+	protected static boolean shouldTrace(String pluginId) {
+		return shouldTrace0(pluginId + "/debug"); //$NON-NLS-1$
+	}
+
+	protected static boolean shouldTrace0(String option) {
+		if (option == null)
+			return false;
+		Activator activator = Activator.getDefault();
+		if (activator == null)
+			return false;
+		DebugOptions debugOptions = activator.getDebugOptions();
+		if (debugOptions == null)
+			return false;
+		String result = debugOptions.getOption(option);
+		return (result == null) ? false : result.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Retrieves a Boolean value indicating whether tracing is enabled for the
+	 * specified debug option of the specified plug-in.
+	 * 
+	 * @return Whether tracing is enabled for the debug option of the plug-in.
+	 * @param pluginId
+	 *            The plug-in for which to determine trace enablement.
+	 * @param option
+	 *            The debug option for which to determine trace enablement.
+	 * 
+	 */
+	public static boolean shouldTrace(String pluginId, String option) {
+		if (pluginId == null)
+			return false;
+		if (shouldTrace(pluginId)) {
+			Boolean value = null;
+
+			synchronized (cachedOptions) {
+				value = (Boolean) cachedOptions.get(option);
+				if (null == value) {
+					value = shouldTrace0(option) ? Boolean.TRUE : Boolean.FALSE;
+					cachedOptions.put(option, value);
+				}
+			}
+
+			return value.booleanValue();
+		}
+
+		return false;
+	}
+
+	/**
+	 * Retrieves a textual representation of the specified argument.
+	 * 
+	 * @return A textual representation of the specified argument.
+	 * @param argument
+	 *            The argument for which to retrieve a textual representation.
+	 * 
+	 */
+	public static String getArgumentString(Object argument) {
+		if (argument == null)
+			return "null"; //$NON-NLS-1$
+		if (argument instanceof byte[])
+			return getStringFromByteArray((byte[]) argument);
+		if (argument.getClass().isArray())
+			return getArgumentsString((Object[]) argument);
+		return String.valueOf(argument);
+	}
+
+	private static String getStringFromByteArray(byte[] bytes) {
+		StringBuffer buf = new StringBuffer("["); //$NON-NLS-1$
+		for (int i = 0; i < bytes.length; i++) {
+			buf.append(bytes[i]);
+			if (i == (bytes.length - 1))
+				buf.append("]"); //$NON-NLS-1$
+			else
+				buf.append(","); //$NON-NLS-1$
+		}
+		return buf.toString();
+	}
+
+	/**
+	 * Retrieves a textual representation of the specified arguments.
+	 * 
+	 * @return A textual representation of the specified arguments.
+	 * @param arguments
+	 *            The arguments for which to retrieve a textual representation.
+	 * 
+	 */
+	public static String getArgumentsString(Object[] arguments) {
+		if (arguments == null)
+			return "[]"; //$NON-NLS-1$
+		StringBuffer buffer = new StringBuffer("["); //$NON-NLS-1$
+
+		for (int i = 0; i < arguments.length; i++) {
+			buffer.append(getArgumentString(arguments[i]));
+
+			if (i < arguments.length - 1)
+				buffer.append(SEPARATOR_PARAMETER);
+		}
+		buffer.append("]"); //$NON-NLS-1$
+		return buffer.toString();
+	}
+
+	/**
+	 * Traces the specified message.
+	 * 
+	 * @param message
+	 *            The message to be traced.
+	 * 
+	 */
+	protected static void trace(String message) {
+		StringBuffer buf = new StringBuffer(PARENTHESIS_OPEN);
+		buf.append(TRACE_STR).append(PARENTHESIS_CLOSE).append(getTimeString())
+				.append(message).append(SEPARATOR_SPACE);
+		System.out.println(buf.toString());
+	}
+
+	/**
+	 * Get date and time string
+	 * 
+	 * @return String with current date and time
+	 */
+	protected static String getTimeString() {
+		Date d = new Date();
+		SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]"); //$NON-NLS-1$
+		return df.format(d);
+	}
+
+	/**
+	 * Traces the specified message from the specified plug-in.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param message
+	 *            The message to be traced.
+	 * 
+	 */
+	public static void trace(String pluginId, String message) {
+		if (shouldTrace(pluginId))
+			trace(message);
+	}
+
+	/**
+	 * Traces the specified message from the specified plug-in for the specified
+	 * debug option.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param message
+	 *            The message to be traced.
+	 * 
+	 */
+	public static void trace(String pluginId, String option, String message) {
+		if (shouldTrace(pluginId, option))
+			trace(message);
+	}
+
+	/**
+	 * Traces the specified message from the specified plug-in for the specified
+	 * debug option.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being entered.
+	 * @param methodName
+	 *            The name of method that is being entered.
+	 * @param message
+	 *            The message to be traced.
+	 * 
+	 */
+	public static void trace(String pluginId, String option, Class clazz,
+			String methodName, String message) {
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_TRACING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName);
+			buf.append(PARENTHESIS_OPEN).append(message)
+					.append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+	}
+
+	/**
+	 * Traces the changing of a value.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param valueDescription
+	 *            The description of the value which is changing.
+	 * @param oldValue
+	 *            The old value.
+	 * @param newValue
+	 *            The new value.
+	 */
+	public static void changing(String pluginId, String option,
+			String valueDescription, Object oldValue, Object newValue) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
+			buf.append(valueDescription).append(SEPARATOR_SPACE)
+					.append(LABEL_OLD_VALUE)
+					.append(getArgumentString(oldValue));
+			buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE)
+					.append(getArgumentString(newValue));
+			trace(buf.toString());
+		}
+	}
+
+	/**
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class in which the value is changing.
+	 * @param methodName
+	 *            The name of the method in which the value is changing.
+	 * @param valueDescription
+	 *            The description of the value which is changing.
+	 * @param oldValue
+	 *            The old value.
+	 * @param newValue
+	 *            The new value.
+	 */
+	public static void changing(String pluginId, String option, Class clazz,
+			String methodName, String valueDescription, Object oldValue,
+			Object newValue) {
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_CHANGING);
+			buf.append(valueDescription).append(SEPARATOR_SPACE)
+					.append(LABEL_OLD_VALUE)
+					.append(getArgumentString(oldValue));
+			buf.append(SEPARATOR_PARAMETER).append(LABEL_NEW_VALUE)
+					.append(getArgumentString(newValue));
+			buf.append(SEPARATOR_SPACE).append(PARENTHESIS_OPEN)
+					.append(clazz.getName()).append(SEPARATOR_METHOD);
+			buf.append(methodName).append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+	}
+
+	/**
+	 * Traces the catching of the specified throwable in the specified method of
+	 * the specified class.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class in which the throwable is being caught.
+	 * @param methodName
+	 *            The name of the method in which the throwable is being caught.
+	 * @param throwable
+	 *            The throwable that is being caught.
+	 * 
+	 */
+	public static void catching(String pluginId, String option, Class clazz,
+			String methodName, Throwable throwable) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_CATCHING);
+			buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
+			buf.append(PARENTHESIS_OPEN).append(clazz.getName())
+					.append(SEPARATOR_METHOD);
+			buf.append(methodName).append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+			throwable.printStackTrace(System.err);
+		}
+	}
+
+	/**
+	 * Traces the throwing of the specified throwable from the specified method
+	 * of the specified class.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class from which the throwable is being thrown.
+	 * @param methodName
+	 *            The name of the method from which the throwable is being
+	 *            thrown.
+	 * @param throwable
+	 *            The throwable that is being thrown.
+	 * 
+	 */
+	public static void throwing(String pluginId, String option, Class clazz,
+			String methodName, Throwable throwable) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_THROWING);
+			buf.append(throwable.getMessage()).append(SEPARATOR_SPACE);
+			buf.append(PARENTHESIS_OPEN).append(clazz.getName())
+					.append(SEPARATOR_METHOD);
+			buf.append(methodName).append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+			throwable.printStackTrace(System.err);
+		}
+	}
+
+	/**
+	 * Traces the entering into the specified method of the specified class.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being entered.
+	 * @param methodName
+	 *            The name of method that is being entered.
+	 * 
+	 */
+	public static void entering(String pluginId, String option, Class clazz,
+			String methodName) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName)
+					.append(PARENTHESIS_OPEN).append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+	}
+
+	/**
+	 * Traces the entering into the specified method of the specified class,
+	 * with the specified parameter.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being entered.
+	 * @param methodName
+	 *            The name of method that is being entered.
+	 * @param parameter
+	 *            The parameter to the method being entered.
+	 * 
+	 */
+	public static void entering(String pluginId, String option, Class clazz,
+			String methodName, Object parameter) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName);
+			buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameter))
+					.append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+
+	}
+
+	/**
+	 * Traces the entering into the specified method of the specified class,
+	 * with the specified parameters.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being entered.
+	 * @param methodName
+	 *            The name of method that is being entered.
+	 * @param parameters
+	 *            The parameters to the method being entered.
+	 * 
+	 */
+	public static void entering(String pluginId, String option, Class clazz,
+			String methodName, Object[] parameters) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_ENTERING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName);
+			buf.append(PARENTHESIS_OPEN).append(getArgumentString(parameters))
+					.append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+
+	}
+
+	/**
+	 * Traces the exiting from the specified method of the specified class.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being exited.
+	 * @param methodName
+	 *            The name of method that is being exited.
+	 * 
+	 */
+	public static void exiting(String pluginId, String option, Class clazz,
+			String methodName) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName);
+			trace(buf.toString());
+		}
+	}
+
+	/**
+	 * Traces the exiting from the specified method of the specified class, with
+	 * the specified return value.
+	 * 
+	 * @param pluginId
+	 *            The plug-in from which to trace.
+	 * @param option
+	 *            The debug option for which to trace.
+	 * @param clazz
+	 *            The class whose method is being exited.
+	 * @param methodName
+	 *            The name of method that is being exited.
+	 * @param returnValue
+	 *            The return value of the method being exited.
+	 * 
+	 */
+	public static void exiting(String pluginId, String option, Class clazz,
+			String methodName, Object returnValue) {
+
+		if (shouldTrace(pluginId, option)) {
+			StringBuffer buf = new StringBuffer(PREFIX_EXITING).append(clazz
+					.getName());
+			buf.append(SEPARATOR_METHOD).append(methodName);
+			buf.append(PARENTHESIS_OPEN).append(getArgumentString(returnValue))
+					.append(PARENTHESIS_CLOSE);
+			trace(buf.toString());
+		}
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
new file mode 100644
index 0000000..0b186c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.internal.core.identity;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.core.identity.*;
+import org.eclipse.ecf.core.util.*;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.osgi.framework.*;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.ecf.identity"; //$NON-NLS-1$
+
+	protected static final String NAMESPACE_NAME = "namespace"; //$NON-NLS-1$
+
+	protected static final String NAMESPACE_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
+			+ NAMESPACE_NAME;
+
+	protected static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
+
+	protected static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
+
+	protected static final int REMOVE_NAMESPACE_ERRORCODE = 100;
+
+	protected static final int FACTORY_NAME_COLLISION_ERRORCODE = 200;
+
+	protected static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
+
+	// The shared instance
+	private static Activator plugin;
+
+	private BundleContext context = null;
+
+	private IRegistryChangeListener registryManager = null;
+
+	private ServiceRegistration idFactoryServiceRegistration = null;
+
+	private ServiceTracker extensionRegistryTracker = null;
+
+	private ServiceTracker debugOptionsTracker = null;
+
+	private ServiceTracker logServiceTracker = null;
+
+	private LogService logService = null;
+
+	private ServiceTracker adapterManagerTracker = null;
+
+	public synchronized IAdapterManager getAdapterManager() {
+		if (this.context == null)
+			return null;
+		// First, try to get the adapter manager via
+		if (adapterManagerTracker == null) {
+			adapterManagerTracker = new ServiceTracker(this.context,
+					IAdapterManager.class.getName(), null);
+			adapterManagerTracker.open();
+		}
+		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker
+				.getService();
+		// Then, if the service isn't there, try to get from Platform class via
+		// PlatformHelper class
+		if (adapterManager == null)
+			adapterManager = PlatformHelper.getPlatformAdapterManager();
+		if (adapterManager == null)
+			getDefault().log(
+					new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR,
+							"Cannot get adapter manager", null)); //$NON-NLS-1$
+		return adapterManager;
+	}
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		// public null constructor
+	}
+
+	public synchronized IExtensionRegistry getExtensionRegistry() {
+		if (this.context == null)
+			return null;
+		if (extensionRegistryTracker == null) {
+			extensionRegistryTracker = new ServiceTracker(context,
+					IExtensionRegistry.class.getName(), null);
+			extensionRegistryTracker.open();
+		}
+		return (IExtensionRegistry) extensionRegistryTracker.getService();
+	}
+
+	public synchronized DebugOptions getDebugOptions() {
+		if (context == null)
+			return null;
+		if (debugOptionsTracker == null) {
+			debugOptionsTracker = new ServiceTracker(context,
+					DebugOptions.class.getName(), null);
+			debugOptionsTracker.open();
+		}
+		return (DebugOptions) debugOptionsTracker.getService();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext ctxt) throws Exception {
+		plugin = this;
+		this.context = ctxt;
+		// Register IIDFactory service
+		idFactoryServiceRegistration = context.registerService(
+				IIDFactory.class.getName(), IDFactory.getDefault(), null);
+
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			this.registryManager = new IdentityRegistryManager();
+			reg.addRegistryChangeListener(registryManager);
+		}
+	}
+
+	public BundleContext getBundleContext() {
+		return context;
+	}
+
+	protected class IdentityRegistryManager implements IRegistryChangeListener {
+		public void registryChanged(IRegistryChangeEvent event) {
+			final IExtensionDelta delta[] = event.getExtensionDeltas(PLUGIN_ID,
+					NAMESPACE_NAME);
+			for (int i = 0; i < delta.length; i++) {
+				switch (delta[i].getKind()) {
+				case IExtensionDelta.ADDED:
+					addNamespaceExtensions(delta[i].getExtension()
+							.getConfigurationElements());
+					break;
+				case IExtensionDelta.REMOVED:
+					removeNamespaceExtensions(delta[i].getExtension()
+							.getConfigurationElements());
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Remove extensions for identity namespace extension point
+	 * 
+	 * @param members
+	 *            the members to remove
+	 */
+	protected void removeNamespaceExtensions(IConfigurationElement[] members) {
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			String name = null;
+			try {
+				name = member.getAttribute(NAME_ATTRIBUTE);
+				if (name == null) {
+					name = member.getAttribute(CLASS_ATTRIBUTE);
+				}
+				if (name == null)
+					continue;
+				final IIDFactory factory = IDFactory.getDefault();
+				final Namespace n = factory.getNamespaceByName(name);
+				if (n == null || !factory.containsNamespace(n)) {
+					continue;
+				}
+				// remove
+				factory.removeNamespace(n);
+			} catch (final Exception e) {
+				getDefault().log(
+						new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+								REMOVE_NAMESPACE_ERRORCODE,
+								"Exception removing namespace", e)); //$NON-NLS-1$
+			}
+		}
+	}
+
+	public Bundle getBundle() {
+		if (context == null)
+			return null;
+		return context.getBundle();
+	}
+
+	protected synchronized LogService getLogService() {
+		if (context == null) {
+			if (logService == null)
+				logService = new SystemLogService(PLUGIN_ID);
+			return logService;
+		}
+		if (logServiceTracker == null) {
+			logServiceTracker = new ServiceTracker(this.context,
+					LogService.class.getName(), null);
+			logServiceTracker.open();
+		}
+		logService = (LogService) logServiceTracker.getService();
+		if (logService == null)
+			logService = new SystemLogService(PLUGIN_ID);
+		return logService;
+	}
+
+	public void log(IStatus status) {
+		if (logService == null)
+			logService = getLogService();
+
+		if (logService != null)
+			logService.log(LogHelper.getLogCode(status),
+					LogHelper.getLogMessage(status), status.getException());
+	}
+
+	/**
+	 * Add identity namespace extension point extensions
+	 * 
+	 * @param members
+	 *            the members to add
+	 */
+	protected void addNamespaceExtensions(IConfigurationElement[] members) {
+		final String bundleName = getDefault().getBundle().getSymbolicName();
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			// Get the label of the extender plugin and the ID of the
+			// extension.
+			final IExtension extension = member.getDeclaringExtension();
+			String nsName = null;
+			try {
+				final Namespace ns = (Namespace) member
+						.createExecutableExtension(CLASS_ATTRIBUTE);
+				final String clazz = ns.getClass().getName();
+				nsName = member.getAttribute(NAME_ATTRIBUTE);
+				if (nsName == null) {
+					nsName = clazz;
+				}
+				final String nsDescription = member
+						.getAttribute(DESCRIPTION_ATTRIBUTE);
+				ns.initialize(nsName, nsDescription);
+				// Check to see if we have a namespace name collision
+				if (!IDFactory.containsNamespace0(ns)) {
+					// Now add to known namespaces
+					IDFactory.addNamespace0(ns);
+				}
+			} catch (final CoreException e) {
+				getDefault().log(e.getStatus());
+			} catch (final Exception e) {
+				getDefault()
+						.log(new Status(
+								IStatus.ERROR,
+								bundleName,
+								FACTORY_NAME_COLLISION_ERRORCODE,
+								"name=" //$NON-NLS-1$
+										+ nsName
+										+ ";extension point id=" //$NON-NLS-1$
+										+ extension
+												.getExtensionPointUniqueIdentifier(),
+								null));
+			}
+		}
+	}
+
+	/**
+	 * Setup identity namespace extension point
+	 * 
+	 */
+	public void setupNamespaceExtensionPoint() {
+		// Process extension points
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			final IExtensionPoint extensionPoint = reg
+					.getExtensionPoint(NAMESPACE_EPOINT);
+			if (extensionPoint == null) {
+				return;
+			}
+			addNamespaceExtensions(extensionPoint.getConfigurationElements());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext ctxt) throws Exception {
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null)
+			reg.removeRegistryChangeListener(registryManager);
+		registryManager = null;
+		if (logServiceTracker != null) {
+			logServiceTracker.close();
+			logServiceTracker = null;
+			logService = null;
+		}
+		if (debugOptionsTracker != null) {
+			debugOptionsTracker.close();
+			debugOptionsTracker = null;
+		}
+		if (extensionRegistryTracker != null) {
+			extensionRegistryTracker.close();
+			extensionRegistryTracker = null;
+		}
+		if (idFactoryServiceRegistration != null) {
+			idFactoryServiceRegistration.unregister();
+			idFactoryServiceRegistration = null;
+		}
+		if (adapterManagerTracker != null) {
+			adapterManagerTracker.close();
+			adapterManagerTracker = null;
+		}
+		context = null;
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public synchronized static Activator getDefault() {
+		if (plugin == null) {
+			plugin = new Activator();
+		}
+		return plugin;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.classpath b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.classpath
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.gitignore b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.project b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.project
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.project
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e41acc5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,351 @@
+#Fri Jan 29 14:31:46 PST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..dba04af
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:16:56 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.core.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..8a5c74e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,27 @@
+#Fri Jan 29 14:34:04 PST 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=2
+compilers.p.build.missing.output=2
+compilers.p.deprecated=1
+compilers.p.discouraged-class=0
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8e5edc2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer.httpclient.ssl
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %plugin.provider
+Fragment-Host: org.eclipse.ecf.provider.filetransfer.httpclient
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Bundle-Localization: plugin
+
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/about.html b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/about.html
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/asl-v20.txt b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/asl-v20.txt
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/asl-v20.txt
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/asl-v20.txt
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties
new file mode 100644
index 0000000..1906b12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               asl-v20.txt,\
+               plugin.properties
+src.includes = asl-v20.txt,\
+               about.html
+jre.compilation.profile = J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/plugin.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ssl/SSLSocketFactoryModifier.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ssl/SSLSocketFactoryModifier.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ssl/SSLSocketFactoryModifier.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ssl/SSLSocketFactoryModifier.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.classpath b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.classpath
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.gitignore b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.options b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.options
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.options
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.options
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.project b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.project
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.project
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b26dd94
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,351 @@
+#Fri Jan 29 14:30:16 PST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..e0cf154
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:16:36 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Ignore
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..05ef9da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,27 @@
+#Fri Jan 29 14:33:19 PST 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=2
+compilers.p.build.missing.output=2
+compilers.p.deprecated=1
+compilers.p.discouraged-class=0
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..95b0aee
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer.httpclient;singleton:=true
+Bundle-Version: 4.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.ecf.provider.filetransfer,
+ org.eclipse.ecf,
+ org.eclipse.ecf.filetransfer
+Eclipse-LazyStart: true
+Import-Package: org.apache.commons.httpclient;version="[3.0.1,3.1.0]",
+ org.apache.commons.httpclient.auth;version="[3.0.1,3.1.0]",
+ org.apache.commons.httpclient.methods;version="[3.0.1,3.1.0]",
+ org.apache.commons.httpclient.params;version="[3.0.1,3.1.0]",
+ org.apache.commons.httpclient.protocol;version="[3.0.1,3.1.0]",
+ org.apache.commons.httpclient.util;version="[3.0.1,3.1.0]",
+ org.eclipse.core.runtime.jobs,
+ org.eclipse.osgi.util;version="1.0.0",
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.log;version="1.3.0",
+ org.osgi.service.url;version="1.0.0",
+ org.osgi.util.tracker;version="1.3.2"
+Export-Package: org.eclipse.ecf.internal.provider.filetransfer.httpclient;x-internal:=true,
+ org.eclipse.ecf.provider.filetransfer.httpclient
+Bundle-Vendor: %plugin.provider
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/about.html b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/about.html
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/about.html
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/asl-v20.txt b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/asl-v20.txt
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/about_files/asl-v20.txt
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/asl-v20.txt
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties
new file mode 100644
index 0000000..1eb488b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               plugin.properties,\
+               asl-v20.txt
+src.includes = about.html,\
+               asl-v20.txt
+jre.compilation.profile = J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.xml b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.xml
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.xml
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/plugin.xml
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java
new file mode 100644
index 0000000..b34d342
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Activator.java
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * Copyright (c) 2007 IBM, Composent Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Chris Aniszczyk - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.ecf.internal.provider.filetransfer.httpclient;
+
+import javax.net.ssl.SSLSocketFactory;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ecf.core.util.LogHelper;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.ecf.provider.filetransfer.httpclient"; //$NON-NLS-1$
+
+	// The shared instance
+	private static Activator plugin;
+	private BundleContext context = null;
+
+	private ServiceTracker logServiceTracker = null;
+
+	private ServiceTracker sslSocketFactoryTracker;
+
+	private ISSLSocketFactoryModifier sslSocketFactoryModifier;
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		//
+	}
+
+	public BundleContext getContext() {
+		return context;
+	}
+
+	public void start(BundleContext ctxt) throws Exception {
+		plugin = this;
+		this.context = ctxt;
+		// initialize the default sslSocketFactoryModifier.  This instance is then used within HttpClientRetrieveFileTransfer.setupHostAndPort
+		// to set the socket factory for the specific proxy and httpclient instance
+		try {
+			Class socketFactoryModifierClass = Class.forName("org.eclipse.ecf.internal.provider.filetransfer.httpclient.ssl.SSLSocketFactoryModifier"); //$NON-NLS-1$
+			sslSocketFactoryModifier = (ISSLSocketFactoryModifier) socketFactoryModifierClass.newInstance();
+		} catch (ClassNotFoundException e) {
+			// will occur if fragment is not installed or not on proper execution environment
+		} catch (Throwable t) {
+			log(new Status(IStatus.ERROR, PLUGIN_ID, "Unexpected Error in Activator.start", t)); //$NON-NLS-1$
+		}
+
+	}
+
+	public ISSLSocketFactoryModifier getSSLSocketFactoryModifier() {
+		return sslSocketFactoryModifier;
+	}
+
+	public void stop(BundleContext ctxt) throws Exception {
+		if (sslSocketFactoryModifier != null) {
+			sslSocketFactoryModifier.dispose();
+			sslSocketFactoryModifier = null;
+		}
+
+		if (sslSocketFactoryTracker != null) {
+			sslSocketFactoryTracker.close();
+		}
+
+		if (logServiceTracker != null) {
+			logServiceTracker.close();
+		}
+		this.context = null;
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public synchronized static Activator getDefault() {
+		if (plugin == null) {
+			plugin = new Activator();
+		}
+		return plugin;
+	}
+
+	protected LogService getLogService() {
+		if (logServiceTracker == null) {
+			logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
+			logServiceTracker.open();
+		}
+		return (LogService) logServiceTracker.getService();
+	}
+
+	public void log(IStatus status) {
+		LogService logService = getLogService();
+		if (logService != null) {
+			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
+		}
+	}
+
+	public SSLSocketFactory getSSLSocketFactory() {
+		if (sslSocketFactoryTracker == null) {
+			sslSocketFactoryTracker = new ServiceTracker(this.context, SSLSocketFactory.class.getName(), null);
+			sslSocketFactoryTracker.open();
+		}
+		return (SSLSocketFactory) sslSocketFactoryTracker.getService();
+	}
+
+	public static void logNoProxyWarning(Throwable e) {
+		Activator a = getDefault();
+		if (a != null) {
+			a.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.ERROR, "Warning: Platform proxy API not available", e)); //$NON-NLS-1$
+		}
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ConnectingSocketMonitor.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ConnectingSocketMonitor.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ConnectingSocketMonitor.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ConnectingSocketMonitor.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/DebugOptions.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/DebugOptions.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/DebugOptions.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/DebugOptions.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientProtocolSocketFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientProtocolSocketFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientProtocolSocketFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientProtocolSocketFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientSecureProtocolSocketFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientSecureProtocolSocketFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientSecureProtocolSocketFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ECFHttpClientSecureProtocolSocketFactory.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java
new file mode 100644
index 0000000..d0e0956
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/HttpClientProxyCredentialProvider.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ecf.internal.provider.filetransfer.httpclient;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScheme;
+import org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
+import org.apache.commons.httpclient.auth.CredentialsProvider;
+import org.eclipse.ecf.core.util.Proxy;
+
+public abstract class HttpClientProxyCredentialProvider implements CredentialsProvider {
+
+	abstract protected Proxy getECFProxy();
+
+	abstract protected Credentials getNTLMCredentials(Proxy proxy);
+
+	private Collection provided;
+
+	public HttpClientProxyCredentialProvider() {
+		provided = new HashSet();
+	}
+
+	private Object makeProvidedKey(AuthScheme scheme, String host, int port, boolean isProxyAuthenticating) {
+		ArrayList list = new ArrayList(3);
+		list.add(host);
+		list.add(new Integer(port));
+		list.add(Boolean.valueOf(isProxyAuthenticating));
+		return list;
+	}
+
+	/**
+	 * @throws CredentialsNotAvailableException  
+	 */
+	public Credentials getCredentials(AuthScheme scheme, String host, int port, boolean isProxyAuthenticating) throws CredentialsNotAvailableException {
+		if (!isProxyAuthenticating) {
+			return null;
+		}
+		Proxy proxy = getECFProxy();
+		if (proxy == null) {
+			return null;
+		}
+
+		Object provideKey = makeProvidedKey(scheme, host, port, isProxyAuthenticating);
+		if (provided.contains(provideKey)) {
+			// HttpClient asks about credentials only once.
+			// If already provided don't use them again.
+			return null;
+		}
+
+		provided.add(provideKey);
+
+		if ("ntlm".equalsIgnoreCase(scheme.getSchemeName())) { //$NON-NLS-1$
+			return getNTLMCredentials(proxy);
+		} else if ("basic".equalsIgnoreCase(scheme.getSchemeName()) || //$NON-NLS-1$
+				"digest".equalsIgnoreCase(scheme.getSchemeName())) { //$NON-NLS-1$
+			final String proxyUsername = proxy.getUsername();
+			final String proxyPassword = proxy.getPassword();
+			if (proxyUsername != null) {
+				Credentials credentials = new UsernamePasswordCredentials(proxyUsername, proxyPassword);
+				return credentials;
+			}
+		}
+
+		return null;
+	}
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISSLSocketFactoryModifier.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISSLSocketFactoryModifier.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISSLSocketFactoryModifier.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISSLSocketFactoryModifier.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISocketConnectionCallback.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISocketConnectionCallback.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISocketConnectionCallback.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/ISocketConnectionCallback.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Messages.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Messages.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Messages.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/Messages.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/messages.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/messages.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/messages.properties
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/internal/provider/filetransfer/httpclient/messages.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientBrowseFileTransferFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientBrowseFileTransferFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientBrowseFileTransferFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientBrowseFileTransferFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientDefaultSSLSocketFactoryModifier.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientDefaultSSLSocketFactoryModifier.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientDefaultSSLSocketFactoryModifier.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientDefaultSSLSocketFactoryModifier.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java
new file mode 100644
index 0000000..8c44535
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientFileSystemBrowser.java
@@ -0,0 +1,332 @@
+/****************************************************************************
+ * Copyright (c) 2008, 2010 Composent, Inc., IBM and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *    Henrich Kraemer - bug 263869, testHttpsReceiveFile fails using HTTP proxy
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.httpclient;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.Socket;
+import java.net.URL;
+import java.util.Iterator;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.auth.CredentialsProvider;
+import org.apache.commons.httpclient.methods.HeadMethod;
+import org.apache.commons.httpclient.util.DateUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ecf.core.security.Callback;
+import org.eclipse.ecf.core.security.CallbackHandler;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.security.NameCallback;
+import org.eclipse.ecf.core.security.ObjectCallback;
+import org.eclipse.ecf.core.security.UnsupportedCallbackException;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.core.util.ProxyAddress;
+import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
+import org.eclipse.ecf.filetransfer.IRemoteFile;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemRequest;
+import org.eclipse.ecf.filetransfer.events.socket.ISocketEventSource;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ConnectingSocketMonitor;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.DebugOptions;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.HttpClientProxyCredentialProvider;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Messages;
+import org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser;
+import org.eclipse.ecf.provider.filetransfer.browse.URLRemoteFile;
+import org.eclipse.ecf.provider.filetransfer.events.socket.SocketEventSource;
+import org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransfer.HostConfigHelper;
+import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
+import org.eclipse.ecf.provider.filetransfer.util.ProxySetupHelper;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class HttpClientFileSystemBrowser extends AbstractFileSystemBrowser {
+
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.browse.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	protected static final int DEFAULT_CONNECTION_TIMEOUT = HttpClientOptions.BROWSE_DEFAULT_CONNECTION_TIMEOUT;
+
+	private static final String USERNAME_PREFIX = "Username:"; //$NON-NLS-1$
+
+	private JREProxyHelper proxyHelper = null;
+
+	private ConnectingSocketMonitor connectingSockets;
+
+	protected String username = null;
+
+	protected String password = null;
+
+	protected HttpClient httpClient = null;
+
+	protected volatile HeadMethod headMethod;
+
+	protected HostConfigHelper hostConfigHelper;
+
+	/**
+	 * @param directoryOrFileID
+	 * @param listener
+	 */
+	public HttpClientFileSystemBrowser(HttpClient httpClient, IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) {
+		super(directoryOrFileID, listener, directoryOrFileURL, connectContext, proxy);
+		Assert.isNotNull(httpClient);
+		this.httpClient = httpClient;
+		this.proxyHelper = new JREProxyHelper();
+		this.connectingSockets = new ConnectingSocketMonitor(1);
+
+	}
+
+	class HttpClientRemoteFileSystemRequest extends RemoteFileSystemRequest {
+		protected SocketEventSource socketEventSource;
+
+		HttpClientRemoteFileSystemRequest() {
+			this.socketEventSource = new SocketEventSource() {
+				public Object getAdapter(Class adapter) {
+					if (adapter == null) {
+						return null;
+					}
+					if (adapter.isInstance(this)) {
+						return this;
+					}
+					if (adapter.isInstance(HttpClientRemoteFileSystemRequest.this)) {
+						return HttpClientRemoteFileSystemRequest.this;
+					}
+					return null;
+				}
+			};
+		}
+
+		public Object getAdapter(Class adapter) {
+			if (adapter == null) {
+				return null;
+			}
+			return socketEventSource.getAdapter(adapter);
+		}
+
+		public void cancel() {
+			HttpClientFileSystemBrowser.this.cancel();
+		}
+	}
+
+	protected IRemoteFileSystemRequest createRemoteFileSystemRequest() {
+		return new HttpClientRemoteFileSystemRequest();
+	}
+
+	protected void cancel() {
+		if (isCanceled()) {
+			return; // break job cancel recursion
+		}
+		setCanceled(getException());
+		super.cancel();
+		if (headMethod != null) {
+			if (!headMethod.isAborted()) {
+				headMethod.abort();
+			}
+		}
+		if (connectingSockets != null) {
+			// this should unblock socket connect calls, if any
+			for (Iterator iterator = connectingSockets.getConnectingSockets().iterator(); iterator.hasNext();) {
+				Socket socket = (Socket) iterator.next();
+				try {
+					socket.close();
+				} catch (IOException e) {
+					Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "cancel", e); //$NON-NLS-1$
+				}
+			}
+		}
+
+	}
+
+	protected boolean hasForceNTLMProxyOption() {
+		return (System.getProperties().getProperty(HttpClientOptions.FORCE_NTLM_PROP) != null);
+	}
+
+	protected void setupProxies() {
+		// If it's been set directly (via ECF API) then this overrides platform settings
+		if (proxy == null) {
+			try {
+				// give SOCKS priority see https://bugs.eclipse.org/bugs/show_bug.cgi?id=295030#c61
+				proxy = ProxySetupHelper.getSocksProxy(directoryOrFile);
+				if (proxy == null) {
+					proxy = ProxySetupHelper.getProxy(directoryOrFile.toExternalForm());
+				}
+			} catch (NoClassDefFoundError e) {
+				// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+				// If that happens then we just want to continue on.
+				Activator.logNoProxyWarning(e);
+
+			}
+		}
+		if (proxy != null)
+			setupProxy(proxy);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser#runRequest()
+	 */
+	protected void runRequest() throws Exception {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "runRequest"); //$NON-NLS-1$
+		setupProxies();
+		// set timeout
+		httpClient.getHttpConnectionManager().getParams().setSoTimeout(DEFAULT_CONNECTION_TIMEOUT);
+		httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
+		httpClient.getParams().setConnectionManagerTimeout(DEFAULT_CONNECTION_TIMEOUT);
+
+		String urlString = directoryOrFile.toString();
+		CredentialsProvider credProvider = new HttpClientProxyCredentialProvider() {
+
+			protected Proxy getECFProxy() {
+				return getProxy();
+			}
+
+			protected Credentials getNTLMCredentials(Proxy lp) {
+				if (hasForceNTLMProxyOption())
+					return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp);
+				return null;
+			}
+
+		};
+		// setup authentication
+		setupAuthentication(urlString);
+		// setup https host and port
+		setupHostAndPort(credProvider, urlString);
+
+		headMethod = new HeadMethod(hostConfigHelper.getTargetRelativePath());
+		headMethod.setFollowRedirects(true);
+		// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
+		// Seems to be another way to select the credentials.
+		headMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
+		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
+		headMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
+
+		long lastModified = 0;
+		long fileLength = -1;
+		connectingSockets.clear();
+		int code = -1;
+		try {
+			Trace.trace(Activator.PLUGIN_ID, "browse=" + urlString); //$NON-NLS-1$
+
+			code = httpClient.executeMethod(getHostConfiguration(), headMethod);
+
+			Trace.trace(Activator.PLUGIN_ID, "browse resp=" + code); //$NON-NLS-1$
+
+			// Check for NTLM proxy in response headers 
+			// This check is to deal with bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=252002
+			boolean ntlmProxyFound = NTLMProxyDetector.detectNTLMProxy(headMethod);
+			if (ntlmProxyFound && !hasForceNTLMProxyOption())
+				throw new BrowseFileTransferException("HttpClient Provider is not configured to support NTLM proxy authentication.", HttpClientOptions.NTLM_PROXY_RESPONSE_CODE); //$NON-NLS-1$
+
+			if (code == HttpURLConnection.HTTP_OK) {
+				fileLength = headMethod.getResponseContentLength();
+				lastModified = getLastModifiedTimeFromHeader();
+			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+				throw new BrowseFileTransferException(NLS.bind("File not found: {0}", urlString), code); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+				throw new BrowseFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code);
+			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+				throw new BrowseFileTransferException("Forbidden", code); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+				throw new BrowseFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code);
+			} else {
+				throw new BrowseFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code);
+			}
+			remoteFiles = new IRemoteFile[1];
+			remoteFiles[0] = new URLRemoteFile(lastModified, fileLength, fileID);
+		} catch (Exception e) {
+			Trace.throwing(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_THROWING, this.getClass(), "runRequest", e); //$NON-NLS-1$
+			BrowseFileTransferException ex = (BrowseFileTransferException) ((e instanceof BrowseFileTransferException) ? e : new BrowseFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code));
+			throw ex;
+		} finally {
+			headMethod.releaseConnection();
+		}
+	}
+
+	private long getLastModifiedTimeFromHeader() throws IOException {
+		Header lastModifiedHeader = headMethod.getResponseHeader("Last-Modified"); //$NON-NLS-1$
+		if (lastModifiedHeader == null)
+			return 0L;
+		String lastModifiedString = lastModifiedHeader.getValue();
+		long lastModified = 0;
+		if (lastModifiedString != null) {
+			try {
+				lastModified = DateUtil.parseDate(lastModifiedString).getTime();
+			} catch (Exception e) {
+				throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPITION_INVALID_LAST_MODIFIED_FROM_SERVER);
+			}
+		}
+		return lastModified;
+	}
+
+	Proxy getProxy() {
+		return proxy;
+	}
+
+	protected void setupHostAndPort(CredentialsProvider credProvider, String urlString) {
+		getHostConfiguration(); // creates hostConfigHelper if needed
+		hostConfigHelper.setTargetHostByURL(credProvider, urlString);
+	}
+
+	protected Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOException {
+		if (connectContext == null)
+			return null;
+		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
+		if (callbackHandler == null)
+			return null;
+		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
+		final ObjectCallback passwordCallback = new ObjectCallback();
+		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
+		username = usernameCallback.getName();
+		password = (String) passwordCallback.getObject();
+		return new UsernamePasswordCredentials(username, password);
+	}
+
+	protected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException {
+		Credentials credentials = null;
+		if (username == null) {
+			credentials = getFileRequestCredentials();
+		}
+
+		if (credentials != null && username != null) {
+			final AuthScope authScope = new AuthScope(HttpClientRetrieveFileTransfer.getHostFromURL(urlString), HttpClientRetrieveFileTransfer.getPortFromURL(urlString), AuthScope.ANY_REALM);
+			Trace.trace(Activator.PLUGIN_ID, "browse credentials=" + credentials); //$NON-NLS-1$
+			httpClient.getState().setCredentials(authScope, credentials);
+		}
+	}
+
+	private HostConfiguration getHostConfiguration() {
+		if (hostConfigHelper == null) {
+			ISocketEventSource source = (ISocketEventSource) job.getRequest().getAdapter(ISocketEventSource.class);
+			hostConfigHelper = new HostConfigHelper(source, connectingSockets);
+		}
+		return hostConfigHelper.getHostConfiguration();
+	}
+
+	protected void setupProxy(Proxy proxy) {
+		if (proxy.getType().equals(Proxy.Type.HTTP)) {
+			final ProxyAddress address = proxy.getAddress();
+			getHostConfiguration().setProxy(address.getHostName(), address.getPort());
+		} else if (proxy.getType().equals(Proxy.Type.SOCKS)) {
+			Trace.trace(Activator.PLUGIN_ID, "brows socksproxy=" + proxy.getAddress()); //$NON-NLS-1$
+			proxyHelper.setupProxy(proxy);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java
new file mode 100644
index 0000000..9081b42
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientOptions.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.httpclient;
+
+/**
+ * @since 4.0
+ */
+public interface HttpClientOptions {
+	// HttpClient response code that indicates that NTLM proxy is asking for authentication
+	// and httpclient cannot handle NTLMv2 proxies
+	public int NTLM_PROXY_RESPONSE_CODE = 477;
+	// System property that indicates that NTLM proxy usage should be forced (i.e. not rejected)
+	// The property key is:  org.eclipse.ecf.provider.filetransfer.httpclient.options.ForceNTLMProxy
+	// The value of the property must be non-null, but is not otherwise used.
+	public String FORCE_NTLM_PROP = "org.eclipse.ecf.provider.filetransfer.httpclient.options.ForceNTLMProxy"; //$NON-NLS-1$
+
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	/**
+	 * @since 4.0
+	 */
+	public static final int RETRIEVE_DEFAULT_CONNECTION_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout", "120000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	/**
+	 * @since 4.0
+	 */
+	public static final int RETRIEVE_DEFAULT_READ_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout", "120000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$
+
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.browse.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	/**
+	 * @since 4.0
+	 */
+	public static final int BROWSE_DEFAULT_CONNECTION_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.httpclient.browse.connectTimeout", "120000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
new file mode 100644
index 0000000..5bb12eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransfer.java
@@ -0,0 +1,1177 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 Composent, Inc., IBM All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: 
+ *  Composent, Inc. - initial API and implementation
+ *  Maarten Meijer - bug 237936, added gzip encoded transfer default
+ *  Henrich Kraemer - bug 263869, testHttpsReceiveFile fails using HTTP proxy
+ *  Henrich Kraemer - bug 263613, [transport] Update site contacting / downloading is not cancelable
+ ******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.httpclient;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.Socket;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import javax.net.SocketFactory;
+import org.apache.commons.httpclient.Credentials;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HostConfiguration;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpConnection;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.HttpVersion;
+import org.apache.commons.httpclient.NTCredentials;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.auth.CredentialsProvider;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
+import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
+import org.apache.commons.httpclient.util.DateUtil;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.security.Callback;
+import org.eclipse.ecf.core.security.CallbackHandler;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.security.NameCallback;
+import org.eclipse.ecf.core.security.ObjectCallback;
+import org.eclipse.ecf.core.security.UnsupportedCallbackException;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.core.util.ProxyAddress;
+import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.ecf.filetransfer.FileTransferJob;
+import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
+import org.eclipse.ecf.filetransfer.IFileTransferPausable;
+import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferOptions;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.InvalidFileRangeSpecificationException;
+import org.eclipse.ecf.filetransfer.events.IFileTransferConnectStartEvent;
+import org.eclipse.ecf.filetransfer.events.socket.ISocketEventSource;
+import org.eclipse.ecf.filetransfer.events.socket.ISocketListener;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ConnectingSocketMonitor;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.DebugOptions;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientProtocolSocketFactory;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ECFHttpClientSecureProtocolSocketFactory;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.HttpClientProxyCredentialProvider;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.ISSLSocketFactoryModifier;
+import org.eclipse.ecf.internal.provider.filetransfer.httpclient.Messages;
+import org.eclipse.ecf.provider.filetransfer.events.socket.SocketEventSource;
+import org.eclipse.ecf.provider.filetransfer.identity.FileTransferID;
+import org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer;
+import org.eclipse.ecf.provider.filetransfer.retrieve.HttpHelper;
+import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
+import org.eclipse.ecf.provider.filetransfer.util.ProxySetupHelper;
+import org.eclipse.osgi.util.NLS;
+
+public class HttpClientRetrieveFileTransfer extends AbstractRetrieveFileTransfer {
+
+	/**
+	 * gzip encoding wrapper for httpclient class. Copied from Mylyn project, bug 205708
+	 *
+	 */
+	public class GzipGetMethod extends GetMethod {
+
+		private static final String CONTENT_ENCODING = "Content-Encoding"; //$NON-NLS-1$
+		private static final String ACCEPT_ENCODING = "Accept-encoding"; //$NON-NLS-1$
+		private static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
+
+		private static final String CONTENT_ENCODING_ACCEPTED = CONTENT_ENCODING_GZIP;
+
+		private boolean gzipReceived = false;
+
+		public GzipGetMethod(String urlString) {
+			super(urlString);
+		}
+
+		private boolean isZippedResponse() {
+			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=269018
+			boolean contentEncodingGzip = (null != this.getResponseHeader(CONTENT_ENCODING) && this.getResponseHeader(CONTENT_ENCODING).getValue().equals(CONTENT_ENCODING_GZIP));
+			Trace.trace(Activator.PLUGIN_ID, "Content-Encoding: gzip header " + (contentEncodingGzip ? "PRESENT" : "ABSENT")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			boolean hasGzSuffix = targetHasGzSuffix(remoteFileName);
+			return contentEncodingGzip && !hasGzSuffix;
+		}
+
+		public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
+			Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "GzipGetMethod.execute"); //$NON-NLS-1$
+			// Insert accept-encoding header
+			int result = super.execute(state, conn);
+			// Code to deal with implications described on bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261881
+			switch (result) {
+				case HttpStatus.SC_MOVED_TEMPORARILY :
+				case HttpStatus.SC_MOVED_PERMANENTLY :
+				case HttpStatus.SC_SEE_OTHER :
+				case HttpStatus.SC_TEMPORARY_REDIRECT :
+					Trace.trace(Activator.PLUGIN_ID, "GzipGetMethod.execute.  Received redirect=" + result + ".  Removing gzip accept encoding"); //$NON-NLS-1$ //$NON-NLS-2$
+					gzipReceived = false;
+					removeRequestHeader(GzipGetMethod.ACCEPT_ENCODING);
+				default :
+			}
+			// test what is sent back
+			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "GzipGetMethod.execute", new Integer(result)); //$NON-NLS-1$
+			return result;
+		}
+
+		public InputStream getResponseBodyAsUnzippedStream() throws IOException {
+			gzipReceived = isZippedResponse();
+			InputStream input = super.getResponseBodyAsStream();
+			try {
+				if (gzipReceived) {
+					Trace.trace(Activator.PLUGIN_ID, "Using gzip input stream to decode"); //$NON-NLS-1$
+					// extract on the fly
+					return new java.util.zip.GZIPInputStream(input);
+				}
+				Trace.trace(Activator.PLUGIN_ID, "Not using gzip input stream"); //$NON-NLS-1$
+			} catch (IOException e) {
+				Activator.getDefault().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, "Exception creating gzip input stream", e)); //$NON-NLS-1$ 
+				throw e;
+			}
+			return input;
+		}
+
+		private Object releaseLock = new Object();
+
+		// This override is a workaround for 
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=279457
+		// This makes GetMethod.releaseConnection non-reentrant,
+		// as with reentrancy under some circumstances a NPE can be 
+		// thrown with multithreaded access
+		public void releaseConnection() {
+			synchronized (releaseLock) {
+				super.releaseConnection();
+			}
+		}
+	}
+
+	static final class HostConfigHelper {
+		private ISocketEventSource source;
+		private ISocketListener socketListener;
+		private String targetURL;
+		private String targetRelativePath;
+
+		private HostConfiguration hostConfiguration;
+
+		public HostConfigHelper(ISocketEventSource source, ISocketListener socketListener) {
+			Assert.isNotNull(source);
+			this.source = source;
+			this.socketListener = socketListener;
+			hostConfiguration = new HostConfiguration();
+		}
+
+		public HostConfiguration getHostConfiguration() {
+			return hostConfiguration;
+		}
+
+		// drops the scheme server and port (e.g http://server:8080/a/b.html -> /a/b.html
+		private static String getTargetRelativePathFromURL(String url) {
+			// RFC 3986
+			/* 
+			 *      
+			 *     URI    = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
+
+			      hier-part =  "//" authority path-abempty
+			                 / path-absolute
+			                 / path-rootless
+			                 / path-empty     
+			 *      
+			 *      path  = path-abempty    ; begins with "/" or is empty
+			              / path-absolute   ; begins with "/" but not "//"
+			              / path-noscheme   ; begins with a non-colon segment
+			              / path-rootless   ; begins with a segment
+			              / path-empty      ; zero characters
+
+			 * 
+			 */
+			// This routine is supposed to remove authority information from the url
+			// to make this a 'relative path' for
+			// HttpClients method constructor (for example GetMethod(String uri)) as
+			// ECF executes methods passing in a HostConfiguration which represents the
+			// authority.
+			final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
+			if (colonSlashSlash < 0)
+				return url;
+
+			// '://' indicates there must be an authority.
+			// the authority must not contain a '/' character.
+			final int nextSlash = url.indexOf('/', colonSlashSlash + 3);
+			if (nextSlash == -1) {
+				// try root? or should it be empty?
+				return ""; //$NON-NLS-1$ 
+			}
+			String relativeURL = url.substring(nextSlash); // include the slash
+			// This is a workaround for multiple consecutive slashes after the authority.
+			// HttpClient will parse this as another authority instead of using 
+			// it as a path. In anticipation we add "//example.com" so that this will
+			// be removed instead of the first path segment. 
+			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=270749#c28 
+			// for a full explanation
+			if (relativeURL.startsWith("//")) { //$NON-NLS-1$
+				final String host = "example.com"; //$NON-NLS-1$
+				relativeURL = "//" + host + relativeURL; //$NON-NLS-1$
+
+			}
+			return relativeURL;
+		}
+
+		public void setTargetHostByURL(CredentialsProvider credProvider, String url) {
+			this.targetURL = url;
+			this.targetRelativePath = getTargetRelativePathFromURL(targetURL);
+			String host = getHostFromURL(targetURL);
+			int port = getPortFromURL(targetURL);
+
+			if (HttpClientRetrieveFileTransfer.urlUsesHttps(targetURL)) {
+				ISSLSocketFactoryModifier sslSocketFactoryModifier = Activator.getDefault().getSSLSocketFactoryModifier();
+				if (sslSocketFactoryModifier == null) {
+					sslSocketFactoryModifier = new HttpClientDefaultSSLSocketFactoryModifier();
+				}
+				SecureProtocolSocketFactory psf = new ECFHttpClientSecureProtocolSocketFactory(sslSocketFactoryModifier, source, socketListener);
+				Protocol sslProtocol = new Protocol(HttpClientRetrieveFileTransfer.HTTPS, (ProtocolSocketFactory) psf, HTTPS_PORT);
+
+				Trace.trace(Activator.PLUGIN_ID, "retrieve host=" + host + ";port=" + port); //$NON-NLS-1$ //$NON-NLS-2$
+				hostConfiguration.setHost(host, port, sslProtocol);
+				hostConfiguration.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
+
+			} else {
+				ProtocolSocketFactory psf = new ECFHttpClientProtocolSocketFactory(SocketFactory.getDefault(), source, socketListener);
+				Protocol protocol = new Protocol(HttpClientRetrieveFileTransfer.HTTP, psf, HTTP_PORT);
+				Trace.trace(Activator.PLUGIN_ID, "retrieve host=" + host + ";port=" + port); //$NON-NLS-1$ //$NON-NLS-2$
+				hostConfiguration.setHost(host, port, protocol);
+				hostConfiguration.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
+			}
+		}
+
+		public String getTargetRelativePath() {
+			return targetRelativePath;
+		}
+
+	}
+
+	private static final String USERNAME_PREFIX = Messages.HttpClientRetrieveFileTransfer_Username_Prefix;
+
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	protected static final int DEFAULT_CONNECTION_TIMEOUT = HttpClientOptions.RETRIEVE_DEFAULT_CONNECTION_TIMEOUT;
+	// changing to 2 minutes (120000) as per bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=266246
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	protected static final int DEFAULT_READ_TIMEOUT = HttpClientOptions.RETRIEVE_DEFAULT_READ_TIMEOUT;
+
+	protected static final int HTTP_PORT = 80;
+
+	protected static final int HTTPS_PORT = 443;
+
+	protected static final int MAX_RETRY = 2;
+
+	protected static final String HTTPS = Messages.FileTransferNamespace_Https_Protocol;
+
+	protected static final String HTTP = Messages.FileTransferNamespace_Http_Protocol;
+
+	protected static final String[] supportedProtocols = {HTTP, HTTPS};
+
+	private static final String LAST_MODIFIED_HEADER = "Last-Modified"; //$NON-NLS-1$
+
+	private GzipGetMethod getMethod = null;
+
+	private HttpClient httpClient = null;
+
+	private String username;
+
+	private String password;
+
+	private int responseCode = -1;
+	private volatile boolean doneFired = false;
+
+	private String remoteFileName;
+
+	protected int httpVersion = 1;
+
+	protected IFileID fileid = null;
+
+	protected JREProxyHelper proxyHelper = null;
+
+	private HostConfigHelper hostConfigHelper;
+	private SocketEventSource socketEventSource;
+
+	private ConnectingSocketMonitor connectingSockets;
+	private FileTransferJob connectJob;
+
+	public HttpClientRetrieveFileTransfer(HttpClient httpClient) {
+		this.httpClient = httpClient;
+		Assert.isNotNull(this.httpClient);
+		proxyHelper = new JREProxyHelper();
+		connectingSockets = new ConnectingSocketMonitor(1);
+		socketEventSource = new SocketEventSource() {
+			public Object getAdapter(Class adapter) {
+				if (adapter == null) {
+					return null;
+				}
+				if (adapter.isInstance(this)) {
+					return this;
+				}
+				return HttpClientRetrieveFileTransfer.this.getAdapter(adapter);
+			}
+
+		};
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#getRemoteFileName()
+	 */
+	public String getRemoteFileName() {
+		return remoteFileName;
+	}
+
+	public synchronized void cancel() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "cancel"); //$NON-NLS-1$
+		if (isCanceled()) {
+			return; // break job cancel recursion
+		}
+		setDoneCanceled(exception);
+		boolean fireDoneEvent = true;
+		if (connectJob != null) {
+			Trace.trace(Activator.PLUGIN_ID, "calling connectJob.cancel()"); //$NON-NLS-1$
+			connectJob.cancel();
+		}
+		synchronized (jobLock) {
+			if (job != null) {
+				// Its the transfer jobs responsibility to throw the event.
+				fireDoneEvent = false;
+				Trace.trace(Activator.PLUGIN_ID, "calling transfer job.cancel()"); //$NON-NLS-1$
+				job.cancel();
+			}
+		}
+		if (getMethod != null) {
+			if (!getMethod.isAborted()) {
+				Trace.trace(Activator.PLUGIN_ID, "calling getMethod.abort()"); //$NON-NLS-1$
+				getMethod.abort();
+			}
+		}
+		if (connectingSockets != null) {
+			// this should unblock socket connect calls, if any
+			for (Iterator iterator = connectingSockets.getConnectingSockets().iterator(); iterator.hasNext();) {
+				Socket socket = (Socket) iterator.next();
+				try {
+					Trace.trace(Activator.PLUGIN_ID, "Call socket.close() for socket=" + socket.toString()); //$NON-NLS-1$
+					socket.close();
+				} catch (IOException e) {
+					Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "cancel", e); //$NON-NLS-1$
+				}
+			}
+		}
+		hardClose();
+		if (fireDoneEvent) {
+			fireTransferReceiveDoneEvent();
+		}
+		Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "cancel");//$NON-NLS-1$
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#hardClose()
+	 */
+	protected void hardClose() {
+		super.hardClose();
+		if (getMethod != null) {
+			getMethod.releaseConnection();
+			getMethod = null;
+		}
+		responseCode = -1;
+		if (proxyHelper != null) {
+			proxyHelper.dispose();
+			proxyHelper = null;
+		}
+	}
+
+	protected Credentials getFileRequestCredentials() throws UnsupportedCallbackException, IOException {
+		if (connectContext == null)
+			return null;
+		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
+		if (callbackHandler == null)
+			return null;
+		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
+		final ObjectCallback passwordCallback = new ObjectCallback();
+		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
+		username = usernameCallback.getName();
+		password = (String) passwordCallback.getObject();
+		return new UsernamePasswordCredentials(username, password);
+	}
+
+	protected void setupProxies() {
+		// If it's been set directly (via ECF API) then this overrides platform settings
+		if (proxy == null) {
+			try {
+				// give SOCKS priority see https://bugs.eclipse.org/bugs/show_bug.cgi?id=295030#c61
+				proxy = ProxySetupHelper.getSocksProxy(getRemoteFileURL());
+				if (proxy == null) {
+					proxy = ProxySetupHelper.getProxy(getRemoteFileURL().toExternalForm());
+				}
+			} catch (NoClassDefFoundError e) {
+				// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+				// If that happens then we just want to continue on.
+				Activator.logNoProxyWarning(e);
+			}
+		}
+		if (proxy != null)
+			setupProxy(proxy);
+	}
+
+	protected void setupAuthentication(String urlString) throws UnsupportedCallbackException, IOException {
+		Credentials credentials = null;
+		if (username == null) {
+			credentials = getFileRequestCredentials();
+		}
+
+		if (credentials != null && username != null) {
+			final AuthScope authScope = new AuthScope(getHostFromURL(urlString), getPortFromURL(urlString), AuthScope.ANY_REALM);
+			Trace.trace(Activator.PLUGIN_ID, "retrieve credentials=" + credentials); //$NON-NLS-1$
+			httpClient.getState().setCredentials(authScope, credentials);
+		}
+	}
+
+	protected void setupHostAndPort(CredentialsProvider credProvider, String urlString) {
+		getHostConfiguration(); // creates hostConfigHelper if needed
+		hostConfigHelper.setTargetHostByURL(credProvider, urlString);
+	}
+
+	protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
+		final IFileRangeSpecification rangeSpec = getFileRangeSpecification();
+		if (rangeSpec != null) {
+			final long startPosition = rangeSpec.getStartPosition();
+			final long endPosition = rangeSpec.getEndPosition();
+			if (startPosition < 0)
+				throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO, rangeSpec);
+			if (endPosition != -1L && endPosition <= startPosition)
+				throw new InvalidFileRangeSpecificationException(Messages.HttpClientRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START, rangeSpec);
+			String rangeHeader = "bytes=" + startPosition + "-" + ((endPosition == -1L) ? "" : ("" + endPosition)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			Trace.trace(Activator.PLUGIN_ID, "retrieve range header=" + rangeHeader); //$NON-NLS-1$
+			setRangeHeader(rangeHeader);
+		}
+		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
+		getMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
+		setRequestHeaderValuesFromOptions();
+	}
+
+	private void setRequestHeaderValuesFromOptions() {
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			Object o = localOptions.get(IRetrieveFileTransferOptions.REQUEST_HEADERS);
+			if (o != null && o instanceof Map) {
+				Map requestHeaders = (Map) o;
+				for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext();) {
+					Object n = i.next();
+					Object v = requestHeaders.get(n);
+					if (n != null && n instanceof String && v != null && v instanceof String)
+						getMethod.addRequestHeader((String) n, (String) v);
+				}
+			}
+		}
+	}
+
+	private void setRangeHeader(String value) {
+		getMethod.addRequestHeader("Range", value); //$NON-NLS-1$
+	}
+
+	private boolean isHTTP11() {
+		return (httpVersion >= 1);
+	}
+
+	public int getResponseCode() {
+		if (responseCode != -1)
+			return responseCode;
+		HttpVersion version = getMethod.getEffectiveVersion();
+		if (version == null) {
+			responseCode = -1;
+			httpVersion = 1;
+			return responseCode;
+		}
+		httpVersion = version.getMinor();
+		responseCode = getMethod.getStatusCode();
+		return responseCode;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
+	 */
+	public ID getID() {
+		return fileid;
+	}
+
+	private long getLastModifiedTimeFromHeader() throws IOException {
+		Header lastModifiedHeader = getMethod.getResponseHeader(LAST_MODIFIED_HEADER);
+		if (lastModifiedHeader == null)
+			throw new IOException(Messages.HttpClientRetrieveFileTransfer_INVALID_LAST_MODIFIED_TIME);
+
+		String lastModifiedString = lastModifiedHeader.getValue();
+		long lastModified = 0;
+		if (lastModifiedString != null) {
+			try {
+				lastModified = DateUtil.parseDate(lastModifiedString).getTime();
+			} catch (Exception e) {
+				throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPITION_INVALID_LAST_MODIFIED_FROM_SERVER);
+			}
+		}
+		return lastModified;
+	}
+
+	protected void getResponseHeaderValues() throws IOException {
+		if (getResponseCode() == -1)
+			throw new IOException(Messages.HttpClientRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST);
+		Header lastModifiedHeader = getMethod.getResponseHeader(LAST_MODIFIED_HEADER);
+		if (lastModifiedHeader != null) {
+			setLastModifiedTime(getLastModifiedTimeFromHeader());
+		}
+		setFileLength(getMethod.getResponseContentLength());
+		fileid = new FileTransferID(getRetrieveNamespace(), getRemoteFileURL());
+
+		// Get content disposition header and get remote file name from it if possible.
+		Header contentDispositionHeader = getMethod.getResponseHeader(HttpHelper.CONTENT_DISPOSITION_HEADER);
+		if (contentDispositionHeader != null) {
+			remoteFileName = HttpHelper.getRemoteFileNameFromContentDispositionHeader(contentDispositionHeader.getValue());
+		}
+		// If still null, get the path from httpclient.getMethod()
+		if (remoteFileName == null) {
+			// No name could be extracted using Content-Disposition. Let's try the
+			// path from the getMethod.
+			String pathStr = getMethod.getPath();
+			if (pathStr != null && pathStr.length() > 0) {
+				IPath path = Path.fromPortableString(pathStr);
+				if (path.segmentCount() > 0)
+					remoteFileName = path.lastSegment();
+			}
+			// If still null, use the input file name
+			if (remoteFileName == null)
+				// Last resort. Use the path of the initial URL request
+				remoteFileName = super.getRemoteFileName();
+		}
+	}
+
+	final class ECFCredentialsProvider extends HttpClientProxyCredentialProvider {
+
+		protected Proxy getECFProxy() {
+			return getProxy();
+		}
+
+		protected Credentials getNTLMCredentials(Proxy lp) {
+			if (hasForceNTLMProxyOption())
+				return HttpClientRetrieveFileTransfer.createNTLMCredentials(lp);
+			return null;
+		}
+
+	}
+
+	Proxy getProxy() {
+		return proxy;
+	}
+
+	protected void setInputStream(InputStream ins) {
+		remoteFileContents = ins;
+	}
+
+	protected InputStream wrapTransferReadInputStream(InputStream inputStream, IProgressMonitor monitor) {
+		return inputStream;
+	}
+
+	protected boolean hasForceNTLMProxyOption() {
+		Map localOptions = getOptions();
+		if (localOptions != null && localOptions.get(HttpClientOptions.FORCE_NTLM_PROP) != null)
+			return true;
+		return (System.getProperties().getProperty(HttpClientOptions.FORCE_NTLM_PROP) != null);
+	}
+
+	protected int getSocketReadTimeout() {
+		int result = DEFAULT_READ_TIMEOUT;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the connect timeout option is present, if so set
+			Object o = localOptions.get(IRetrieveFileTransferOptions.READ_TIMEOUT);
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+				return result;
+			}
+			o = localOptions.get("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * @since 4.0
+	 */
+	protected int getConnectTimeout() {
+		int result = DEFAULT_CONNECTION_TIMEOUT;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the connect timeout option is present, if so set
+			Object o = localOptions.get(IRetrieveFileTransferOptions.CONNECT_TIMEOUT);
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+				return result;
+			}
+			o = localOptions.get("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#openStreams()
+	 */
+	protected void openStreams() throws IncomingFileTransferException {
+
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreams"); //$NON-NLS-1$
+		final String urlString = getRemoteFileURL().toString();
+		this.doneFired = false;
+
+		int code = -1;
+
+		try {
+			httpClient.getHttpConnectionManager().getParams().setSoTimeout(getSocketReadTimeout());
+			int connectTimeout = getConnectTimeout();
+			httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(connectTimeout);
+			httpClient.getParams().setConnectionManagerTimeout(connectTimeout);
+
+			setupAuthentication(urlString);
+
+			CredentialsProvider credProvider = new ECFCredentialsProvider();
+			setupHostAndPort(credProvider, urlString);
+
+			getMethod = new GzipGetMethod(hostConfigHelper.getTargetRelativePath());
+			getMethod.setFollowRedirects(true);
+			// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
+			// Seems to be another way to select the credentials.
+			getMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
+			setRequestHeaderValues();
+
+			Trace.trace(Activator.PLUGIN_ID, "retrieve=" + urlString); //$NON-NLS-1$
+			// Set request header for possible gzip encoding, but only if
+			// 1) The file range specification is null (we want the whole file)
+			// 2) The target remote file does *not* end in .gz (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280205)
+			if (getFileRangeSpecification() == null && !targetHasGzSuffix(super.getRemoteFileName())) {
+				Trace.trace(Activator.PLUGIN_ID, "Accept-Encoding: gzip added to request header"); //$NON-NLS-1$
+				getMethod.setRequestHeader(GzipGetMethod.ACCEPT_ENCODING, GzipGetMethod.CONTENT_ENCODING_ACCEPTED);
+			} else {
+				Trace.trace(Activator.PLUGIN_ID, "Accept-Encoding NOT added to header"); //$NON-NLS-1$
+			}
+
+			fireConnectStartEvent();
+			if (checkAndHandleDone()) {
+				return;
+			}
+
+			connectingSockets.clear();
+			// Actually execute get and get response code (since redirect is set to true, then
+			// redirect response code handled internally
+			if (connectJob == null) {
+				performConnect(new NullProgressMonitor());
+			} else {
+				connectJob.schedule();
+				connectJob.join();
+				connectJob = null;
+			}
+			if (checkAndHandleDone()) {
+				return;
+			}
+
+			code = responseCode;
+
+			responseHeaders = getResponseHeaders();
+
+			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + code); //$NON-NLS-1$
+
+			// Check for NTLM proxy in response headers 
+			// This check is to deal with bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=252002
+			boolean ntlmProxyFound = NTLMProxyDetector.detectNTLMProxy(getMethod);
+			if (ntlmProxyFound && !hasForceNTLMProxyOption())
+				throw new IncomingFileTransferException("HttpClient Provider is not configured to support NTLM proxy authentication.", HttpClientOptions.NTLM_PROXY_RESPONSE_CODE); //$NON-NLS-1$
+
+			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
+				getResponseHeaderValues();
+				setInputStream(getMethod.getResponseBodyAsUnzippedStream());
+				fireReceiveStartEvent();
+			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", urlString), code); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code);
+			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException("Forbidden", code); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code);
+			} else {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code);
+			}
+		} catch (final Exception e) {
+			Trace.throwing(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_THROWING, this.getClass(), "openStreams", e); //$NON-NLS-1$
+			if (code == -1) {
+				if (!isDone()) {
+					setDoneException(e);
+				}
+				fireTransferReceiveDoneEvent();
+			} else {
+				IncomingFileTransferException ex = (IncomingFileTransferException) ((e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code));
+				throw ex;
+			}
+		}
+		Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreams"); //$NON-NLS-1$
+	}
+
+	private Map getResponseHeaders() {
+		if (getMethod == null)
+			return null;
+		Header[] headers = getMethod.getResponseHeaders();
+		Map result = null;
+		if (headers != null && headers.length > 0) {
+			result = new HashMap();
+			for (int i = 0; i < headers.length; i++) {
+				String name = headers[i].getName();
+				String val = headers[i].getValue();
+				if (name != null && val != null)
+					result.put(name, val);
+			}
+		}
+		return Collections.unmodifiableMap(result);
+	}
+
+	private boolean checkAndHandleDone() {
+		if (isDone()) {
+			// for cancel the done event should have been fired always.
+			if (!doneFired) {
+				fireTransferReceiveDoneEvent();
+			}
+			return true;
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		super.setConnectContextForAuthentication(connectContext);
+		this.username = null;
+		this.password = null;
+	}
+
+	protected static String getHostFromURL(String url) {
+		String result = url;
+		final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
+		if (colonSlashSlash < 0)
+			return ""; //$NON-NLS-1$
+		if (colonSlashSlash >= 0) {
+			result = url.substring(colonSlashSlash + 3);
+		}
+
+		final int colonPort = result.indexOf(':');
+		final int requestPath = result.indexOf('/');
+
+		int substringEnd;
+
+		if (colonPort > 0 && requestPath > 0)
+			substringEnd = Math.min(colonPort, requestPath);
+		else if (colonPort > 0)
+			substringEnd = colonPort;
+		else if (requestPath > 0)
+			substringEnd = requestPath;
+		else
+			substringEnd = result.length();
+
+		return result.substring(0, substringEnd);
+
+	}
+
+	protected static int getPortFromURL(String url) {
+		final int colonSlashSlash = url.indexOf("://"); //$NON-NLS-1$
+		if (colonSlashSlash < 0)
+			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
+		// This is wrong as if the url has no colonPort before '?' then it should return the default
+
+		final int colonPort = url.indexOf(':', colonSlashSlash + 1);
+		if (colonPort < 0)
+			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
+		// Make sure that the colonPort is not from some part of the rest of the URL
+		int nextSlash = url.indexOf('/', colonSlashSlash + 3);
+		if (nextSlash != -1 && colonPort > nextSlash)
+			return urlUsesHttps(url) ? HTTPS_PORT : HTTP_PORT;
+
+		final int requestPath = url.indexOf('/', colonPort + 1);
+
+		int end;
+		if (requestPath < 0)
+			end = url.length();
+		else
+			end = requestPath;
+
+		return Integer.parseInt(url.substring(colonPort + 1, end));
+	}
+
+	protected static boolean urlUsesHttps(String url) {
+		url = url.trim();
+		return url.startsWith(HTTPS);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.internal.provider.filetransfer.AbstractRetrieveFileTransfer#supportsProtocol(java.lang.String)
+	 */
+	public static boolean supportsProtocol(String protocolString) {
+		for (int i = 0; i < supportedProtocols.length; i++)
+			if (supportedProtocols[i].equalsIgnoreCase(protocolString))
+				return true;
+		return false;
+	}
+
+	protected boolean isConnected() {
+		return (getMethod != null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#doPause()
+	 */
+	protected boolean doPause() {
+		if (isPaused() || !isConnected() || isDone())
+			return false;
+		this.paused = true;
+		return this.paused;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#doResume()
+	 */
+	protected boolean doResume() {
+		if (!isPaused() || isConnected())
+			return false;
+		return openStreamsForResume();
+	}
+
+	protected void setResumeRequestHeaderValues() throws IOException {
+		if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)
+			throw new IOException(Messages.HttpClientRetrieveFileTransfer_RESUME_START_ERROR);
+		setRangeHeader("bytes=" + this.bytesReceived + "-"); //$NON-NLS-1$ //$NON-NLS-2$
+		// set max-age for cache control to 0 for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
+		getMethod.addRequestHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
+		setRequestHeaderValuesFromOptions();
+	}
+
+	private boolean openStreamsForResume() {
+
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "openStreamsForResume"); //$NON-NLS-1$
+		final String urlString = getRemoteFileURL().toString();
+		this.doneFired = false;
+
+		int code = -1;
+
+		try {
+			httpClient.getHttpConnectionManager().getParams().setSoTimeout(getSocketReadTimeout());
+			int connectTimeout = getConnectTimeout();
+			httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(connectTimeout);
+			httpClient.getParams().setConnectionManagerTimeout(connectTimeout);
+
+			CredentialsProvider credProvider = new ECFCredentialsProvider();
+			setupAuthentication(urlString);
+
+			setupHostAndPort(credProvider, urlString);
+
+			getMethod = new GzipGetMethod(hostConfigHelper.getTargetRelativePath());
+			getMethod.setFollowRedirects(true);
+			// Define a CredentialsProvider - found that possibility while debugging in org.apache.commons.httpclient.HttpMethodDirector.processProxyAuthChallenge(HttpMethod)
+			// Seems to be another way to select the credentials.
+			getMethod.getParams().setParameter(CredentialsProvider.PROVIDER, credProvider);
+			setResumeRequestHeaderValues();
+
+			Trace.trace(Activator.PLUGIN_ID, "resume=" + urlString); //$NON-NLS-1$
+
+			// Gzip encoding is not an option for resume
+			fireConnectStartEvent();
+			if (checkAndHandleDone()) {
+				return false;
+			}
+
+			connectingSockets.clear();
+			// Actually execute get and get response code (since redirect is set to true, then
+			// redirect response code handled internally
+			if (connectJob == null) {
+				performConnect(new NullProgressMonitor());
+			} else {
+				connectJob.schedule();
+				connectJob.join();
+				connectJob = null;
+			}
+			if (checkAndHandleDone()) {
+				return false;
+			}
+
+			code = responseCode;
+
+			responseHeaders = getResponseHeaders();
+
+			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + code); //$NON-NLS-1$
+
+			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
+				getResumeResponseHeaderValues();
+				setInputStream(getMethod.getResponseBodyAsUnzippedStream());
+				this.paused = false;
+				fireReceiveResumedEvent();
+			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", urlString), code, responseHeaders); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Unauthorized, code, responseHeaders);
+			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException("Forbidden", code, responseHeaders); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(Messages.HttpClientRetrieveFileTransfer_Proxy_Auth_Required, code, responseHeaders);
+			} else {
+				getMethod.releaseConnection();
+				throw new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_ERROR_GENERAL_RESPONSE_CODE, new Integer(code)), code, responseHeaders);
+			}
+			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreamsForResume", Boolean.TRUE); //$NON-NLS-1$
+			return true;
+		} catch (final Exception e) {
+			Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "openStreamsForResume", e); //$NON-NLS-1$
+			if (code == -1) {
+				if (!isDone()) {
+					setDoneException(e);
+				}
+			} else {
+				setDoneException((e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, urlString), e, code, responseHeaders));
+			}
+			fireTransferReceiveDoneEvent();
+			Trace.exiting(Activator.PLUGIN_ID, DebugOptions.METHODS_EXITING, this.getClass(), "openStreamsForResume", Boolean.FALSE); //$NON-NLS-1$
+			return false;
+		}
+	}
+
+	protected void getResumeResponseHeaderValues() throws IOException {
+		if (getResponseCode() != HttpURLConnection.HTTP_PARTIAL)
+			throw new IOException();
+		if (lastModifiedTime != getLastModifiedTimeFromHeader())
+			throw new IOException(Messages.HttpClientRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 *
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		if (adapter.equals(IFileTransferPausable.class) && isHTTP11())
+			return this;
+		if (adapter.equals(ISocketEventSource.class))
+			return this.socketEventSource;
+		return super.getAdapter(adapter);
+	}
+
+	private HostConfiguration getHostConfiguration() {
+		if (hostConfigHelper == null) {
+			hostConfigHelper = new HostConfigHelper(socketEventSource, connectingSockets);
+		}
+		return hostConfigHelper.getHostConfiguration();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer#setupProxy(org.eclipse.ecf.core.util.Proxy)
+	 */
+	protected void setupProxy(Proxy proxy) {
+		if (proxy.getType().equals(Proxy.Type.HTTP)) {
+			final ProxyAddress address = proxy.getAddress();
+			getHostConfiguration().setProxy(address.getHostName(), address.getPort());
+		} else if (proxy.getType().equals(Proxy.Type.SOCKS)) {
+			Trace.trace(Activator.PLUGIN_ID, "retrieve socksproxy=" + proxy.getAddress()); //$NON-NLS-1$
+			proxyHelper.setupProxy(proxy);
+		}
+	}
+
+	public static NTCredentials createNTLMCredentials(Proxy p) {
+		if (p == null) {
+			return null;
+		}
+		String un = getNTLMUserName(p);
+		String domain = getNTLMDomainName(p);
+		if (un == null || domain == null)
+			return null;
+		return new NTCredentials(un, p.getPassword(), p.getAddress().getHostName(), domain);
+	}
+
+	protected static String getNTLMDomainName(Proxy p) {
+		String domainUsername = p.getUsername();
+		if (domainUsername == null)
+			return null;
+		int slashloc = domainUsername.indexOf('\\');
+		if (slashloc == -1)
+			return null;
+		return domainUsername.substring(0, slashloc);
+	}
+
+	protected static String getNTLMUserName(Proxy p) {
+		String domainUsername = p.getUsername();
+		if (domainUsername == null)
+			return null;
+		int slashloc = domainUsername.indexOf('\\');
+		if (slashloc == -1)
+			return null;
+		return domainUsername.substring(slashloc + 1);
+	}
+
+	protected void fireConnectStartEvent() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireConnectStartEvent"); //$NON-NLS-1$ 
+		// TODO: should the following be in super.fireReceiveStartEvent();
+		listener.handleTransferEvent(new IFileTransferConnectStartEvent() {
+			public IFileID getFileID() {
+				return remoteFileID;
+			}
+
+			public void cancel() {
+				HttpClientRetrieveFileTransfer.this.cancel();
+			}
+
+			public FileTransferJob prepareConnectJob(FileTransferJob j) {
+				return HttpClientRetrieveFileTransfer.this.prepareConnectJob(j);
+			}
+
+			public void connectUsingJob(FileTransferJob j) {
+				HttpClientRetrieveFileTransfer.this.connectUsingJob(j);
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IFileTransferConnectStartEvent["); //$NON-NLS-1$
+				sb.append(getFileID());
+				sb.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+
+			public Object getAdapter(Class adapter) {
+				return HttpClientRetrieveFileTransfer.this.getAdapter(adapter);
+			}
+		});
+	}
+
+	protected String createConnectJobName() {
+		return getRemoteFileURL().toString() + createRangeName() + Messages.HttpClientRetrieveFileTransfer_CONNECTING_JOB_NAME;
+	}
+
+	protected FileTransferJob prepareConnectJob(FileTransferJob cjob) {
+		if (cjob == null) {
+			// Create our own
+			cjob = new FileTransferJob(createJobName());
+		}
+		cjob.setFileTransfer(this);
+		cjob.setFileTransferRunnable(fileConnectRunnable);
+		return cjob;
+	}
+
+	protected void connectUsingJob(FileTransferJob cjob) {
+		Assert.isNotNull(cjob);
+		this.connectJob = cjob;
+	}
+
+	private IFileTransferRunnable fileConnectRunnable = new IFileTransferRunnable() {
+		public IStatus performFileTransfer(IProgressMonitor monitor) {
+			return performConnect(monitor);
+		}
+	};
+
+	private IStatus performConnect(IProgressMonitor monitor) {
+		// there might be more ticks in the future perhaps for 
+		// connect socket, certificate validation, send request, authenticate,
+		int ticks = 1;
+		monitor.beginTask(getRemoteFileURL().toString() + Messages.HttpClientRetrieveFileTransfer_CONNECTING_TASK_NAME, ticks);
+		try {
+			if (monitor.isCanceled())
+				throw newUserCancelledException();
+			responseCode = httpClient.executeMethod(getHostConfiguration(), getMethod);
+			Trace.trace(Activator.PLUGIN_ID, "retrieve resp=" + responseCode); //$NON-NLS-1$
+		} catch (final Exception e) {
+			Trace.catching(Activator.PLUGIN_ID, DebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "performConnect", e); //$NON-NLS-1$
+			if (!isDone()) {
+				setDoneException(e);
+			}
+		} finally {
+			monitor.done();
+		}
+		return Status.OK_STATUS;
+
+	}
+
+	protected void fireReceiveResumedEvent() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireReceiveResumedEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
+		super.fireReceiveResumedEvent();
+	}
+
+	protected void fireTransferReceiveDataEvent() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceiveDataEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
+		super.fireTransferReceiveDataEvent();
+	}
+
+	protected void fireTransferReceiveDoneEvent() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceiveDoneEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
+		this.doneFired = true;
+		super.fireTransferReceiveDoneEvent();
+	}
+
+	protected void fireTransferReceivePausedEvent() {
+		Trace.entering(Activator.PLUGIN_ID, DebugOptions.METHODS_ENTERING, this.getClass(), "fireTransferReceivePausedEvent len=" + fileLength + ";rcvd=" + bytesReceived); //$NON-NLS-1$ //$NON-NLS-2$
+		super.fireTransferReceivePausedEvent();
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransferFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransferFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransferFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientRetrieveFileTransferFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientSslTrustManager.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientSslTrustManager.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientSslTrustManager.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/HttpClientSslTrustManager.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/NTLMProxyDetector.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/NTLMProxyDetector.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/NTLMProxyDetector.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.httpclient/src/org/eclipse/ecf/provider/filetransfer/httpclient/NTLMProxyDetector.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.classpath b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/.classpath
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.gitignore b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.project b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.project
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.project
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..80b183d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:17:23 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.core.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient.ssl/.settings/org.eclipse.pde.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/META-INF/MANIFEST.MF
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/META-INF/MANIFEST.MF
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/META-INF/MANIFEST.MF
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/about.html b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/about.html
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/about.html
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/build.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/build.properties
new file mode 100644
index 0000000..cdd2db7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties
+src.includes = about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/plugin.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/ssl/ECFURLConnectionModifier.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/ssl/ECFURLConnectionModifier.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/ssl/ECFURLConnectionModifier.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer.ssl/src/org/eclipse/ecf/internal/provider/filetransfer/ssl/ECFURLConnectionModifier.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.classpath b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.classpath
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.gitignore b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.options b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.options
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.options
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.options
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.project b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.project
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.project
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..279c140
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,353 @@
+#Thu Mar 18 13:43:03 PDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=ignore
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..b074f16
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:15:43 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.httpclient/.settings/org.eclipse.pde.prefs
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..cbf6a1c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer;singleton:=true
+Bundle-Version: 3.2.0.qualifier
+Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.Activator
+Bundle-Vendor: %plugin.provider
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.ecf,
+ org.eclipse.ecf.filetransfer,
+ org.eclipse.equinox.registry
+Eclipse-LazyStart: true
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Import-Package: org.eclipse.core.net.proxy;resolution:=optional,
+ org.eclipse.core.runtime.jobs,
+ org.eclipse.ecf.provider.filetransfer.events.socket;version="[1.0.0,2.0.0)",
+ org.eclipse.osgi.util;version="1.0.0",
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.log;version="1.3.0",
+ org.osgi.service.url;version="1.0.0",
+ org.osgi.util.tracker;version="1.3.2"
+Bundle-ClassPath: .
+Export-Package: org.eclipse.ecf.internal.provider.filetransfer;x-internal:=true,
+ org.eclipse.ecf.provider.filetransfer;x-friends:="org.eclipse.equinox.p2.repository",
+ org.eclipse.ecf.provider.filetransfer.browse,
+ org.eclipse.ecf.provider.filetransfer.events.socket;version="1.0";x-friends:="org.eclipse.ecf.provider.filetransfer.httpclient",
+ org.eclipse.ecf.provider.filetransfer.identity;x-internal:=false,
+ org.eclipse.ecf.provider.filetransfer.outgoing,
+ org.eclipse.ecf.provider.filetransfer.retrieve;x-internal:=false,
+ org.eclipse.ecf.provider.filetransfer.util
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/about.html b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/about.html
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/about.html
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/build.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/build.properties
new file mode 100644
index 0000000..a608177
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/build.properties
@@ -0,0 +1,12 @@
+output.. = bin/
+bin.includes = .,\
+               META-INF/,\
+               plugin.xml,\
+               about.html,\
+               plugin.properties,\
+               schema/
+src.includes = about.html,\
+               schema/
+jars.compile.order = .
+source.. = src/
+jre.compilation.profile = J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/plugin.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/plugin.xml b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/plugin.xml
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/plugin.xml
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/plugin.xml
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
new file mode 100644
index 0000000..c00183c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/browseFileTransferProtocolFactory.exsd
@@ -0,0 +1,164 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="browseFileTransferProtocolFactory" name="browseFileTransferProtocolFactory"/>
+      </appInfo>
+      <documentation>
+         This extension point allows IRemoteFileSystemBrowserFactorys to be defined for given file transfer protocols.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="browseFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="browseFileTransferProtocolFactory">
+      <annotation>
+         <documentation>
+            Browse remote file system protocol factory extention point
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="protocol" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory</b>
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="priority" type="string">
+            <annotation>
+               <documentation>
+                  Priority relative to other browseFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="uri" type="boolean">
+            <annotation>
+               <documentation>
+                  Flag to indicate that the protocol factory will use URIs (rather than URLs...which is the default).  True indicates that URIs will be used, and *no* URLStreamHandler will be registered for the associated protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <pre>
+   <extension
+         point="org.eclipse.ecf.provider.filetransfer.browseFileTransferProtocolFactory">
+      <browseFileTransferProtocolFactory
+            class="org.eclipse.ecf.provider.filetransfer.ssh.ScpBrowseFileTransferFactory"
+            protocol="scp"
+            priority="90">
+      </browseFileTransferProtocolFactory>
+   </extension>
+
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Here is the <b>org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory</b>
+
+<pre>
+/**
+ * Remote file browser factory. This service interface is used by clients to
+ * create a new IRemoteFileSystemBrowser instance.
+ */
+public interface IRemoteFileSystemBrowserFactory {
+
+ /**
+  * Get new instance of IRemoteFileSystemBrowser.
+  * 
+  * @return IRemoteFileSystemBrowser for initiating a retrieval of a remote file.
+  */
+ public IRemoteFileSystemBrowser newInstance();
+
+}
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         None
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 Composent, Inc., IBM and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
new file mode 100644
index 0000000..b48263e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/retrieveFileTransferProtocolFactory.exsd
@@ -0,0 +1,168 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="retrieveFileTransferProtocolFactory" name="retrieveFileTransferProtocolFactory"/>
+      </appInfo>
+      <documentation>
+         This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="retrieveFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="retrieveFileTransferProtocolFactory">
+      <annotation>
+         <documentation>
+            Retrieve file transfer protocol factory extention point
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="protocol" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="priority" type="string">
+            <annotation>
+               <documentation>
+                  Priority relative to other retrieveFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="uri" type="boolean">
+            <annotation>
+               <documentation>
+                  Flag to indicate that the protocol factory will use URIs (rather than URLs...which is the default).  True indicates that URIs will be used, and *no* URLStreamHandler will be registered for the associated protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <pre>
+   <extension
+         point="org.eclipse.ecf.provider.filetransfer.retrieveFileTransferProtocolFactory">
+      <retrieveFileTransferProtocolFactory
+            class="org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory"
+            protocol="http"
+            priority="10">
+      </retrieveFileTransferProtocolFactory>
+      <retrieveFileTransferProtocolFactory
+            class="org.eclipse.ecf.provider.filetransfer.httpclient.HttpClientRetrieveFileTransferFactory"
+            protocol="https">
+      </retrieveFileTransferProtocolFactory>
+   </extension>
+
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Here is the <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
+
+<pre>
+/**
+ * Retrieve file transfer factory. This service interface is used by clients to
+ * create a new IRetrieveFileTransfer instance.
+ */
+public interface IRetrieveFileTransferFactory {
+
+ /**
+  * Get new instance of IRetrieveFileTransfer.
+  * 
+  * @return IRetrieveFileTransfer for a given file transfer
+  */
+ public IRetrieveFileTransfer newInstance();
+
+}
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         None
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 Composent, Inc., IBM and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
new file mode 100644
index 0000000..376604f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/schema/sendFileTransferProtocolFactory.exsd
@@ -0,0 +1,164 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf.provider.filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ecf.provider.filetransfer" id="sendFileTransferProtocolFactory" name="sendFileTransferProtocolFactory"/>
+      </appInfo>
+      <documentation>
+         This extension point allows IRetrieveFileTransferFactorys to be defined for given file transfer protocols.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="sendFileTransferProtocolFactory" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="sendFileTransferProtocolFactory">
+      <annotation>
+         <documentation>
+            Send  file transfer protocol factory extention point
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="protocol" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Protocol to define factory for.  For example, http, https, ftp, bittorrent, my.favorite.protocol.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The factory class to use for given protocol.  Must implement <b>org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory</b>
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="priority" type="string">
+            <annotation>
+               <documentation>
+                  Priority relative to other sendFileTransferProtocolFactory extensions.  Valid priorities are 0 (highest priority) to 100 (lowest priority).  If this optional attribute is not specified, it will automatically be assigned a default priority of 100.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="uri" type="boolean">
+            <annotation>
+               <documentation>
+                  Flag to indicate that the protocol factory will use URIs (rather than URLs...which is the default).  True indicates that URIs will be used, and *no* URLStreamHandler will be registered for the associated protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the URI may not be successfully parsed as a URL.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.0.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <pre>
+   <extension
+         point="org.eclipse.ecf.provider.filetransfer.sendFileTransferProtocolFactory">
+      <sendFileTransferProtocolFactory
+            class="org.eclipse.ecf.provider.filetransfer.ssh.ScpOutgoingFileTransferFactory"
+            protocol="scp"
+            priority="50">
+      </sendFileTransferProtocolFactory>
+   </extension>
+
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Here is the <b>org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory</b>
+
+<pre>
+/**
+ * Retrieve file transfer factory. This service interface is used by clients to
+ * create a new IRetrieveFileTransfer instance.
+ */
+public interface IRetrieveFileTransferFactory {
+
+ /**
+  * Get new instance of IRetrieveFileTransfer.
+  * 
+  * @return IRetrieveFileTransfer for a given file transfer
+  */
+ public IRetrieveFileTransfer newInstance();
+
+}
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         None
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 Composent, Inc., IBM and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation, IBM, Inc. - Initial API and implementation
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
new file mode 100644
index 0000000..9a20381
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
@@ -0,0 +1,917 @@
+/****************************************************************************
+ * Copyright (c) 2006, 2007 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.ecf.internal.provider.filetransfer;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionDelta;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IRegistryChangeEvent;
+import org.eclipse.core.runtime.IRegistryChangeListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ecf.core.util.LogHelper;
+import org.eclipse.ecf.core.util.PlatformHelper;
+import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowser;
+import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory;
+import org.eclipse.ecf.provider.filetransfer.IFileTransferProtocolToFactoryMapper;
+import org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.log.LogService;
+import org.osgi.service.url.AbstractURLStreamHandlerService;
+import org.osgi.service.url.URLConstants;
+import org.osgi.service.url.URLStreamHandlerService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator implements BundleActivator, IFileTransferProtocolToFactoryMapper {
+
+	// This is the name of a system property 'org.eclipse.ecf.provider.filetransfer.excludeContributors' 
+	// that allows people to defeat the priority system for the browse, send, and retrieve factory contributions.
+	// If a plugin (symbolic id) is given in this property (multiples separated by comma), then
+	// that plugin's contributions will *not* be added to the browse, send, and retrieve protocol factories
+	public static final String PLUGIN_EXCLUDED_SYS_PROP_NAME = Activator.PLUGIN_ID + ".excludeContributors"; //$NON-NLS-1$
+
+	private static final String CLASS_ATTR = "class"; //$NON-NLS-1$
+	private static final String PRIORITY_ATTR = "priority"; //$NON-NLS-1$
+	private static final int DEFAULT_PRIORITY = 100;
+	private static final String PROTOCOL_ATTR = "protocol"; //$NON-NLS-1$
+	private static final String URI_ATTR = "uri"; //$NON-NLS-1$
+	private static final String[] jvmSchemes = new String[] {Messages.FileTransferNamespace_Http_Protocol, Messages.FileTransferNamespace_Ftp_Protocol, Messages.FileTransferNamespace_File_Protocol, Messages.FileTransferNamespace_Jar_Protocol, Messages.FileTransferNamespace_Https_Protocol, Messages.FileTransferNamespace_Mailto_Protocol, Messages.FileTransferNamespace_Gopher_Protocol};
+
+	private static final String URL_HANDLER_PROTOCOL_NAME = "url.handler.protocol"; //$NON-NLS-1$
+
+	private static final String URLSTREAM_HANDLER_SERVICE_NAME = "org.osgi.service.url.URLStreamHandlerService"; //$NON-NLS-1$
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.ecf.provider.filetransfer"; //$NON-NLS-1$
+
+	private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "retrieveFileTransferProtocolFactory"; //$NON-NLS-1$
+
+	private static final String RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
+			+ RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
+
+	private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "sendFileTransferProtocolFactory"; //$NON-NLS-1$
+
+	private static final String SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
+			+ SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
+
+	private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME = "browseFileTransferProtocolFactory"; //$NON-NLS-1$
+
+	private static final String BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT = PLUGIN_ID + "." //$NON-NLS-1$
+			+ BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME;
+
+	// The shared instance
+	private static Activator plugin;
+
+	private BundleContext context = null;
+
+	private ServiceRegistration fileTransferServiceRegistration;
+
+	private ServiceTracker logServiceTracker = null;
+	private ServiceTracker extensionRegistryTracker = null;
+
+	private Map retrieveFileTransferProtocolMap;
+
+	private Map sendFileTransferProtocolMap;
+
+	private Map browseFileTransferProtocolMap;
+
+	private ServiceTracker adapterManagerTracker = null;
+
+	private ServiceTracker proxyServiceTracker = null;
+
+	private IURLConnectionModifier urlConnectionModifier = null;
+
+	private String[] excludedPlugins = null;
+
+	private ServiceRegistration protocolMapperRegistration;
+
+	private IRegistryChangeListener registryChangeListener = new IRegistryChangeListener() {
+
+		public void registryChanged(IRegistryChangeEvent event) {
+			final IExtensionDelta retrieveDelta[] = event.getExtensionDeltas(PLUGIN_ID, RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+			for (int i = 0; i < retrieveDelta.length; i++) {
+				switch (retrieveDelta[i].getKind()) {
+					case IExtensionDelta.ADDED :
+						addRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
+						break;
+					case IExtensionDelta.REMOVED :
+						removeRetrieveExtensions(retrieveDelta[i].getExtension().getConfigurationElements());
+						break;
+				}
+			}
+			final IExtensionDelta sendDelta[] = event.getExtensionDeltas(PLUGIN_ID, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+			for (int i = 0; i < sendDelta.length; i++) {
+				switch (sendDelta[i].getKind()) {
+					case IExtensionDelta.ADDED :
+						addSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
+						break;
+					case IExtensionDelta.REMOVED :
+						removeSendExtensions(sendDelta[i].getExtension().getConfigurationElements());
+						break;
+				}
+			}
+			final IExtensionDelta browseDelta[] = event.getExtensionDeltas(PLUGIN_ID, BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT_NAME);
+			for (int i = 0; i < browseDelta.length; i++) {
+				switch (browseDelta[i].getKind()) {
+					case IExtensionDelta.ADDED :
+						addBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
+						break;
+					case IExtensionDelta.REMOVED :
+						removeBrowseExtensions(browseDelta[i].getExtension().getConfigurationElements());
+						break;
+				}
+			}
+		}
+
+	};
+
+	private String[] parseExcludedPlugins() {
+		String prop = System.getProperty(PLUGIN_EXCLUDED_SYS_PROP_NAME);
+		if (prop == null)
+			return new String[0];
+		StringTokenizer tok = new StringTokenizer(prop, ","); //$NON-NLS-1$
+		int count = tok.countTokens();
+		String[] results = new String[count];
+		for (int i = 0; i < count; i++) {
+			results[i] = tok.nextToken();
+		}
+		return results;
+	}
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		//
+	}
+
+	protected LogService getLogService() {
+		synchronized (this) {
+			if (this.context == null)
+				return null;
+			if (logServiceTracker == null) {
+				logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
+				logServiceTracker.open();
+			}
+			return (LogService) logServiceTracker.getService();
+		}
+	}
+
+	public IProxyService getProxyService() {
+		try {
+			if (proxyServiceTracker == null) {
+				proxyServiceTracker = new ServiceTracker(this.context, IProxyService.class.getName(), null);
+				proxyServiceTracker.open();
+			}
+			return (IProxyService) proxyServiceTracker.getService();
+		} catch (Exception e) {
+			logNoProxyWarning(e);
+		} catch (NoClassDefFoundError e) {
+			logNoProxyWarning(e);
+		}
+		return null;
+	}
+
+	public static void logNoProxyWarning(Throwable e) {
+		Activator a = getDefault();
+		if (a != null) {
+			a.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.ERROR, "Warning: Platform proxy API not available", e)); //$NON-NLS-1$
+		}
+	}
+
+	public void log(IStatus status) {
+		if (this.context == null)
+			return;
+		final LogService logService = getLogService();
+		if (logService != null) {
+			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
+		}
+	}
+
+	public Bundle getBundle() {
+		if (context == null)
+			return null;
+		return context.getBundle();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext ctxt) throws Exception {
+		plugin = this;
+		this.context = ctxt;
+		this.retrieveFileTransferProtocolMap = new HashMap(3);
+		this.sendFileTransferProtocolMap = new HashMap(3);
+		this.browseFileTransferProtocolMap = new HashMap(3);
+
+		// initialize the default url connection modifier for ssl
+		try {
+			Class urlConnectionModifierClass = Class.forName("org.eclipse.ecf.internal.provider.filetransfer.ssl.ECFURLConnectionModifier"); //$NON-NLS-1$
+			urlConnectionModifier = (IURLConnectionModifier) urlConnectionModifierClass.newInstance();
+			urlConnectionModifier.init(ctxt);
+		} catch (ClassNotFoundException e) {
+			// will occur if fragment is not installed or not on proper execution environment
+		} catch (Throwable t) {
+			log(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), "Unexpected Error in Activator.start", t)); //$NON-NLS-1$
+		}
+
+		fileTransferServiceRegistration = ctxt.registerService(IRetrieveFileTransferFactory.class.getName(), new IRetrieveFileTransferFactory() {
+			public IRetrieveFileTransfer newInstance() {
+				return new MultiProtocolRetrieveAdapter();
+			}
+		}, null);
+		this.extensionRegistryTracker = new ServiceTracker(ctxt, IExtensionRegistry.class.getName(), null);
+		this.extensionRegistryTracker.open();
+		final IExtensionRegistry registry = getExtensionRegistry();
+		if (registry != null) {
+			registry.addRegistryChangeListener(registryChangeListener);
+		}
+		// Can't be lazy about this, as schemes need to be registered with
+		// platform
+		loadProtocolHandlers();
+		// Finally, register this object as a IFileTransferProtocolToFactoryMapper service
+		protocolMapperRegistration = context.registerService(IFileTransferProtocolToFactoryMapper.class.getName(), this, null);
+	}
+
+	public boolean reinitialize() {
+		try {
+			loadProtocolHandlers();
+			return true;
+		} catch (Exception e) {
+			return false;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext ctxt) throws Exception {
+		final IExtensionRegistry registry = getExtensionRegistry();
+		if (registry != null) {
+			registry.removeRegistryChangeListener(registryChangeListener);
+		}
+
+		if (urlConnectionModifier != null) {
+			urlConnectionModifier.dispose();
+			urlConnectionModifier = null;
+		}
+		if (extensionRegistryTracker != null) {
+			extensionRegistryTracker.close();
+			extensionRegistryTracker = null;
+		}
+		if (fileTransferServiceRegistration != null) {
+			fileTransferServiceRegistration.unregister();
+			fileTransferServiceRegistration = null;
+		}
+		if (adapterManagerTracker != null) {
+			adapterManagerTracker.close();
+			adapterManagerTracker = null;
+		}
+		if (proxyServiceTracker != null) {
+			proxyServiceTracker.close();
+			proxyServiceTracker = null;
+		}
+		if (this.retrieveFileTransferProtocolMap != null) {
+			this.retrieveFileTransferProtocolMap.clear();
+			this.retrieveFileTransferProtocolMap = null;
+		}
+		if (this.sendFileTransferProtocolMap != null) {
+			this.sendFileTransferProtocolMap.clear();
+			this.sendFileTransferProtocolMap = null;
+		}
+		if (this.browseFileTransferProtocolMap != null) {
+			this.browseFileTransferProtocolMap.clear();
+			this.browseFileTransferProtocolMap = null;
+		}
+		if (this.protocolMapperRegistration != null) {
+			this.protocolMapperRegistration.unregister();
+			this.protocolMapperRegistration = null;
+		}
+
+		synchronized (this) {
+			this.context = null;
+		}
+		plugin = null;
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public synchronized static Activator getDefault() {
+		if (plugin == null) {
+			plugin = new Activator();
+		}
+		return plugin;
+	}
+
+	public String[] getPlatformSupportedSchemes() {
+		final ServiceTracker handlers = new ServiceTracker(context, URLSTREAM_HANDLER_SERVICE_NAME, null);
+		handlers.open();
+		final ServiceReference[] refs = handlers.getServiceReferences();
+		final Set protocols = new HashSet();
+		if (refs != null)
+			for (int i = 0; i < refs.length; i++) {
+				final Object protocol = refs[i].getProperty(URL_HANDLER_PROTOCOL_NAME);
+				if (protocol instanceof String)
+					protocols.add(protocol);
+				else if (protocol instanceof String[]) {
+					final String[] ps = (String[]) protocol;
+					for (int j = 0; j < ps.length; j++)
+						protocols.add(ps[j]);
+				}
+			}
+		handlers.close();
+		for (int i = 0; i < jvmSchemes.length; i++)
+			protocols.add(jvmSchemes[i]);
+		return (String[]) protocols.toArray(new String[] {});
+	}
+
+	public IExtensionRegistry getExtensionRegistry() {
+		if (extensionRegistryTracker == null) {
+			this.extensionRegistryTracker = new ServiceTracker(context, IExtensionRegistry.class.getName(), null);
+			this.extensionRegistryTracker.open();
+		}
+		return (IExtensionRegistry) extensionRegistryTracker.getService();
+	}
+
+	static class ProtocolFactory implements Comparable {
+		Object factory;
+		int priority = 0;
+		String id;
+
+		public ProtocolFactory(Object factory, int priority, String id) {
+			this.factory = factory;
+			this.priority = priority;
+			this.id = id;
+		}
+
+		public Object getFactory() {
+			return factory;
+		}
+
+		public String getID() {
+			return id;
+		}
+
+		public int getPriority() {
+			return priority;
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Comparable#compareTo(java.lang.Object)
+		 */
+		public int compareTo(Object another) {
+			if (!(another instanceof ProtocolFactory))
+				return -1;
+			ProtocolFactory other = (ProtocolFactory) another;
+			if (this.priority == other.priority)
+				return 0;
+			return (this.priority < other.priority) ? -1 : 1;
+		}
+	}
+
+	private int getPriority(IConfigurationElement configElement, String warning, String protocol) {
+		// Get priority for new entry, if optional priority attribute specified
+		final String priorityString = configElement.getAttribute(PRIORITY_ATTR);
+		int priority = DEFAULT_PRIORITY;
+		if (priorityString != null) {
+			try {
+				priority = new Integer(priorityString).intValue();
+				// Make sure that any negative values are reset to 0 (highest priority)
+				priority = (priority < 0) ? 0 : priority;
+			} catch (NumberFormatException e) {
+				// Give warning
+				Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for {1} from {2} has invalid priority {3}. Priority will be set to {4}", new Object[] {warning, protocol, configElement.getDeclaringExtension().getContributor().getName(), priorityString, String.valueOf(DEFAULT_PRIORITY)}), null)); //$NON-NLS-1$
+			}
+		}
+		return priority;
+	}
+
+	boolean pluginExcluded(String pluginId) {
+		if (excludedPlugins == null) {
+			excludedPlugins = parseExcludedPlugins();
+		}
+		List l = Arrays.asList(excludedPlugins);
+		return l.contains(pluginId);
+	}
+
+	void addRetrieveExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String uriStr = configElements[i].getAttribute(URI_ATTR);
+			boolean uri = (uriStr == null) ? false : Boolean.valueOf(uriStr).booleanValue();
+			String CONTRIBUTION_WARNING = "File retrieve contribution"; //$NON-NLS-1$
+			try {
+				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
+				// Only add the factories if the contributor plugin has not been excluded
+				if (!pluginExcluded(pluginId)) {
+					// First create factory clazz 
+					final IRetrieveFileTransferFactory retrieveFactory = (IRetrieveFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+					// Get priority for new entry, if optional priority attribute specified
+					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+					String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();
+					// Now add new ProtocolFactory
+					setRetrieveFileTransferFactory(protocol, contributorName, retrieveFactory, priority, uri);
+				} else {
+					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing retrieve factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			} catch (final CoreException e) {
+				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
+			}
+		}
+	}
+
+	void removeRetrieveExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String id = getRetrieveFileTransferFactoryId(protocol);
+			if (id != null)
+				removeRetrieveFileTransferFactory(id);
+		}
+	}
+
+	void addSendExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String uriStr = configElements[i].getAttribute(URI_ATTR);
+			boolean uri = (uriStr == null) ? false : Boolean.valueOf(uriStr).booleanValue();
+			String CONTRIBUTION_WARNING = "File send contribution"; //$NON-NLS-1$
+			try {
+				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
+				// Only add the factories if the contributor plugin has not been excluded
+				if (!pluginExcluded(pluginId)) {
+					// First create factory clazz 
+					final ISendFileTransferFactory clazz = (ISendFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+					// Get priority for new entry, if optional priority attribute specified
+					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+					setSendFileTransferFactory(protocol, pluginId, clazz, priority, uri);
+				} else {
+					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing send factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			} catch (final CoreException e) {
+				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
+			}
+		}
+	}
+
+	void removeSendExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String id = getSendFileTransferFactoryId(protocol);
+			if (id != null)
+				removeSendFileTransferFactory(id);
+		}
+	}
+
+	void addBrowseExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String uriStr = configElements[i].getAttribute(URI_ATTR);
+			boolean uri = (uriStr == null) ? false : Boolean.valueOf(uriStr).booleanValue();
+			String CONTRIBUTION_WARNING = "File browse contribution"; //$NON-NLS-1$
+			try {
+				String pluginId = configElements[i].getDeclaringExtension().getContributor().getName();
+				// Only add the factories if the contributor plugin has not been excluded
+				if (!pluginExcluded(pluginId)) {
+					// First create factory clazz 
+					final IRemoteFileSystemBrowserFactory clazz = (IRemoteFileSystemBrowserFactory) configElements[i].createExecutableExtension(CLASS_ATTR);
+					// Get priority for new entry, if optional priority attribute specified
+					int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);
+					setBrowseFileTransferFactory(protocol, pluginId, clazz, priority, uri);
+				} else {
+					Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, "Plugin " + pluginId + " excluded from contributing browse factory", null)); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			} catch (final CoreException e) {
+				Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind("Error loading from {0} extension point", BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e)); //$NON-NLS-1$
+			}
+		}
+	}
+
+	void removeBrowseExtensions(IConfigurationElement[] configElements) {
+		for (int i = 0; i < configElements.length; i++) {
+			final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);
+			if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+				return;
+			String id = getBrowseFileTransferFactoryId(protocol);
+			if (id != null)
+				removeBrowseFileTransferFactory(id);
+		}
+	}
+
+	private void loadProtocolHandlers() {
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			final IExtensionPoint retrieveExtensionPoint = reg.getExtensionPoint(RETRIEVE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+			if (retrieveExtensionPoint != null)
+				addRetrieveExtensions(retrieveExtensionPoint.getConfigurationElements());
+			// Now do it with send
+			final IExtensionPoint sendExtensionPoint = reg.getExtensionPoint(SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+			if (sendExtensionPoint != null)
+				addSendExtensions(sendExtensionPoint.getConfigurationElements());
+			// Now for browse
+			final IExtensionPoint browseExtensionPoint = reg.getExtensionPoint(BROWSE_FILETRANSFER_PROTOCOL_FACTORY_EPOINT);
+			if (browseExtensionPoint != null)
+				addBrowseExtensions(browseExtensionPoint.getConfigurationElements());
+		}
+	}
+
+	private boolean isSchemeRegistered(String protocol, String[] schemes) {
+		for (int i = 0; i < schemes.length; i++) {
+			if (protocol.equals(schemes[i]))
+				return true;
+		}
+		return false;
+	}
+
+	class DummyURLStreamHandlerService extends AbstractURLStreamHandlerService {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.osgi.service.url.AbstractURLStreamHandlerService#openConnection(java.net.URL)
+		 */
+		public URLConnection openConnection(URL u) throws IOException {
+			throw new IOException(NLS.bind("URLConnection cannot be created for {0}", u.toExternalForm())); //$NON-NLS-1$
+		}
+
+	}
+
+	private final DummyURLStreamHandlerService dummyService = new DummyURLStreamHandlerService();
+
+	private void registerScheme(String protocol) {
+		final Hashtable properties = new Hashtable();
+		properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] {protocol});
+		context.registerService(URLStreamHandlerService.class.getName(), dummyService, properties);
+	}
+
+	public IRetrieveFileTransfer getFileTransfer(String protocol) {
+		ProtocolFactory protocolFactory = null;
+		synchronized (retrieveFileTransferProtocolMap) {
+			protocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+		}
+		if (protocolFactory == null)
+			return null;
+		final IRetrieveFileTransferFactory factory = (IRetrieveFileTransferFactory) protocolFactory.getFactory();
+		if (factory != null)
+			return factory.newInstance();
+		return null;
+	}
+
+	public ISendFileTransfer getSendFileTransfer(String protocol) {
+		ProtocolFactory protocolFactory = null;
+		synchronized (sendFileTransferProtocolMap) {
+			protocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+		}
+		if (protocolFactory == null)
+			return null;
+		final ISendFileTransferFactory factory = (ISendFileTransferFactory) protocolFactory.getFactory();
+		if (factory != null)
+			return factory.newInstance();
+		return null;
+	}
+
+	public IRemoteFileSystemBrowser getBrowseFileTransfer(String protocol) {
+		ProtocolFactory protocolFactory = null;
+		synchronized (browseFileTransferProtocolMap) {
+			protocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+		}
+		if (protocolFactory == null)
+			return null;
+		final IRemoteFileSystemBrowserFactory factory = (IRemoteFileSystemBrowserFactory) protocolFactory.getFactory();
+		if (factory != null)
+			return factory.newInstance();
+		return null;
+	}
+
+	public IAdapterManager getAdapterManager() {
+		// First, try to get the adapter manager via
+		if (adapterManagerTracker == null) {
+			adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null);
+			adapterManagerTracker.open();
+		}
+		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService();
+		// Then, if the service isn't there, try to get from Platform class via
+		// PlatformHelper class
+		if (adapterManager == null)
+			adapterManager = PlatformHelper.getPlatformAdapterManager();
+		return adapterManager;
+	}
+
+	public IURLConnectionModifier getURLConnectionModifier() {
+		return urlConnectionModifier;
+	}
+
+	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority) {
+		return setRetrieveFileTransferFactory(protocol, id, factory, priority, false);
+	}
+
+	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority, boolean uri) {
+		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+			return false;
+		if (id == null)
+			return false;
+		if (factory == null)
+			return false;
+		if (!pluginExcluded(id)) {
+			// Now create new ProtocolFactory
+			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
+			synchronized (retrieveFileTransferProtocolMap) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+				// If found, choose between them based upon comparing their priority
+				if (oldProtocolFactory != null) {
+					// Now, compare priorities and pick winner
+					String CONTRIBUTION_WARNING = "File retrieve contribution"; //$NON-NLS-1$
+					int result = oldProtocolFactory.compareTo(newProtocolFactory);
+					if (result < 0) {
+						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
+						return false;
+					} else if (result == 0) {
+						// Warn that we are using new one because they have the same priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
+					} else if (result > 0) {
+						// Warn that we are using new one because it has higher priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
+					}
+				}
+				// If !uri, then check/register protocol as URLStreamHandlerService
+				if (!uri) {
+					String[] existingSchemes = getPlatformSupportedSchemes();
+					if (!isSchemeRegistered(protocol, existingSchemes))
+						registerScheme(protocol);
+				}
+				// Finally, put protocol factory in map with protocol as key
+				retrieveFileTransferProtocolMap.put(protocol, newProtocolFactory);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public String getRetrieveFileTransferFactoryId(String protocol) {
+		if (protocol == null)
+			return null;
+		synchronized (retrieveFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return null;
+			return oldProtocolFactory.getID();
+		}
+	}
+
+	public int getRetrieveFileTransferPriority(String protocol) {
+		if (protocol == null)
+			return -1;
+		synchronized (retrieveFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return -1;
+			return oldProtocolFactory.getPriority();
+		}
+	}
+
+	public boolean removeRetrieveFileTransferFactory(String id) {
+		if (id == null)
+			return false;
+		boolean removed = false;
+		synchronized (retrieveFileTransferProtocolMap) {
+			for (Iterator i = retrieveFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) retrieveFileTransferProtocolMap.get(i.next());
+				if (oldProtocolFactory == null)
+					continue;
+				if (id.equals(oldProtocolFactory.getID())) {
+					i.remove();
+					removed = true;
+				}
+			}
+			return removed;
+		}
+	}
+
+	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority) {
+		return setBrowseFileTransferFactory(protocol, id, factory, priority, false);
+	}
+
+	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority, boolean uri) {
+		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+			return false;
+		if (id == null)
+			return false;
+		if (factory == null)
+			return false;
+		if (!pluginExcluded(id)) {
+			// Now create new ProtocolFactory
+			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
+			synchronized (browseFileTransferProtocolMap) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+				// If found, choose between them based upon comparing their priority
+				if (oldProtocolFactory != null) {
+					// Now, compare priorities and pick winner
+					String CONTRIBUTION_WARNING = "File browse contribution"; //$NON-NLS-1$
+					int result = oldProtocolFactory.compareTo(newProtocolFactory);
+					if (result < 0) {
+						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
+						return false;
+					} else if (result == 0) {
+						// Warn that we are using new one because they have the same priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
+					} else if (result > 0) {
+						// Warn that we are using new one because it has higher priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
+					}
+				}
+				// If !uri, then check/register protocol as URLStreamHandlerService
+				if (!uri) {
+					String[] existingSchemes = getPlatformSupportedSchemes();
+					if (!isSchemeRegistered(protocol, existingSchemes))
+						registerScheme(protocol);
+				}
+				// Finally, put protocol factory in map with protocol as key
+				browseFileTransferProtocolMap.put(protocol, newProtocolFactory);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public String getBrowseFileTransferFactoryId(String protocol) {
+		if (protocol == null)
+			return null;
+		synchronized (browseFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return null;
+			return oldProtocolFactory.getID();
+		}
+	}
+
+	public int getBrowseFileTransferPriority(String protocol) {
+		if (protocol == null)
+			return -1;
+		synchronized (browseFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return -1;
+			return oldProtocolFactory.getPriority();
+		}
+	}
+
+	public boolean removeBrowseFileTransferFactory(String id) {
+		if (id == null)
+			return false;
+		boolean removed = false;
+		synchronized (browseFileTransferProtocolMap) {
+			for (Iterator i = browseFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) browseFileTransferProtocolMap.get(i.next());
+				if (oldProtocolFactory == null)
+					continue;
+				if (id.equals(oldProtocolFactory.getID())) {
+					i.remove();
+					removed = true;
+				}
+			}
+			return removed;
+		}
+	}
+
+	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority) {
+		return setSendFileTransferFactory(protocol, id, factory, priority, false);
+	}
+
+	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority, boolean uri) {
+		if (protocol == null || "".equals(protocol)) //$NON-NLS-1$
+			return false;
+		if (id == null)
+			return false;
+		if (factory == null)
+			return false;
+		if (!pluginExcluded(id)) {
+			// Now create new ProtocolFactory
+			ProtocolFactory newProtocolFactory = new ProtocolFactory(factory, priority, id);
+			synchronized (sendFileTransferProtocolMap) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+				// If found, choose between them based upon comparing their priority
+				if (oldProtocolFactory != null) {
+					// Now, compare priorities and pick winner
+					String CONTRIBUTION_WARNING = "File send contribution"; //$NON-NLS-1$
+					int result = oldProtocolFactory.compareTo(newProtocolFactory);
+					if (result < 0) {
+						// Existing one has higher priority, so we provide warning and return (leaving existing one as the handler)
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be ignored.  Existing protocol factory has higher priority.", new Object[] {CONTRIBUTION_WARNING, protocol, id}), null)); //$NON-NLS-1$
+						return false;
+					} else if (result == 0) {
+						// Warn that we are using new one because they have the same priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  Both have same priority={3}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority)}), null)); //$NON-NLS-1$
+					} else if (result > 0) {
+						// Warn that we are using new one because it has higher priority.
+						Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind("{0} for protocol {1} from {2} will be used in preference to existing handler.  New handler has higher priority={3}<{4}.", new Object[] {CONTRIBUTION_WARNING, protocol, id, new Integer(priority), new Integer(oldProtocolFactory.priority)}), null)); //$NON-NLS-1$
+					}
+				}
+				// If !uri, then check/register protocol as URLStreamHandlerService
+				if (!uri) {
+					String[] existingSchemes = getPlatformSupportedSchemes();
+					if (!isSchemeRegistered(protocol, existingSchemes))
+						registerScheme(protocol);
+				}
+				// Finally, put protocol factory in map with protocol as key
+				sendFileTransferProtocolMap.put(protocol, newProtocolFactory);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public String getSendFileTransferFactoryId(String protocol) {
+		if (protocol == null)
+			return null;
+		synchronized (sendFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return null;
+			return oldProtocolFactory.getID();
+		}
+	}
+
+	public int getSendFileTransferPriority(String protocol) {
+		if (protocol == null)
+			return -1;
+		synchronized (sendFileTransferProtocolMap) {
+			ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);
+			if (oldProtocolFactory == null)
+				return -1;
+			return oldProtocolFactory.getPriority();
+		}
+	}
+
+	public boolean removeSendFileTransferFactory(String id) {
+		if (id == null)
+			return false;
+		boolean removed = false;
+		synchronized (sendFileTransferProtocolMap) {
+			for (Iterator i = sendFileTransferProtocolMap.keySet().iterator(); i.hasNext();) {
+				ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(i.next());
+				if (oldProtocolFactory == null)
+					continue;
+				if (id.equals(oldProtocolFactory.getID())) {
+					i.remove();
+					removed = true;
+				}
+			}
+			return removed;
+		}
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/DebugOptions.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/DebugOptions.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/DebugOptions.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/DebugOptions.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/IURLConnectionModifier.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/IURLConnectionModifier.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/IURLConnectionModifier.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/IURLConnectionModifier.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
new file mode 100644
index 0000000..7b60558
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Messages.java
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.internal.provider.filetransfer;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * 
+ */
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.filetransfer.messages"; //$NON-NLS-1$
+	public static String AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL;
+	public static String AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY;
+	public static String AbstractRetrieveFileTransfer_TransferRateFormat;
+	public static String AbstractRetrieveFileTransfer_MalformedURLException;
+	public static String AbstractRetrieveFileTransfer_Progress_Data;
+	public static String AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY;
+	public static String AbstractRetrieveFileTransfer_Exception_User_Cancelled;
+	public static String AbstractRetrieveFileTransfer_InfoTransferRate;
+	public static String AbstractRetrieveFileTransfer_RemoteFileID_Not_Null;
+	public static String AbstractRetrieveFileTransfer_SizeUnitBytes;
+	public static String AbstractRetrieveFileTransfer_SizeUnitGB;
+	public static String AbstractRetrieveFileTransfer_SizeUnitKB;
+	public static String AbstractRetrieveFileTransfer_SizeUnitMB;
+	public static String AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK;
+	public static String AbstractRetrieveFileTransfer_Status_Transfer_Exception;
+	public static String AbstractRetrieveFileTransfer_TransferListener_Not_Null;
+	public static String AbstractOutgoingFileTransfer_MalformedURLException;
+	public static String AbstractOutgoingFileTransfer_Progress_Data;
+	public static String AbstractOutgoingFileTransfer_Exception_User_Cancelled;
+	public static String AbstractOutgoingFileTransfer_RemoteFileID_Not_Null;
+	public static String AbstractOutgoingFileTransfer_Status_Transfer_Completed_OK;
+	public static String AbstractOutgoingFileTransfer_Status_Transfer_Exception;
+	public static String AbstractOutgoingFileTransfer_TransferListener_Not_Null;
+	public static String UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR;
+	public static String UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST;
+	public static String UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START;
+	public static String UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED;
+	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS;
+	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT;
+	public static String UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE;
+	public static String UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO;
+	public static String UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException;
+	public static String UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
+	public static String UrlConnectionOutgoingFileTransfer_EXCEPTION_COULD_NOT_CONNECT;
+	public static String FileSystemBrowser_EXCEPTION_DIRECTORY_DOES_NOT_EXIST;
+	public static String FileTransferNamespace_Exception_Create_Instance;
+	public static String FileTransferNamespace_Exception_Create_Instance_Failed;
+	public static String FileTransferNamespace_File_Protocol;
+	public static String FileTransferNamespace_Ftp_Protocol;
+	public static String FileTransferNamespace_Http_Protocol;
+	public static String FileTransferNamespace_Https_Protocol;
+	public static String FileTransferNamespace_Jar_Protocol;
+	public static String FileTransferNamespace_Mailto_Protocol;
+	public static String FileTransferNamespace_Gopher_Protocol;
+	public static String FileTransferNamespace_Namespace_Protocol;
+	public static String FileTransferID_Exception_Url_Not_Null;
+	public static String LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_INPUT;
+	public static String LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_OUTPUT;
+	public static String MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		//
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
new file mode 100644
index 0000000..1523ad4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/messages.properties
@@ -0,0 +1,60 @@
+################################################################################
+# Copyright (c) 2006, 2007 Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#    Composent, Inc. - initial API and implementation
+################################################################################
+
+AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL=File transfer info cannot be null.
+AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY=Exception in send done event handler.
+AbstractRetrieveFileTransfer_TransferRateFormat=0.00 {0}
+AbstractRetrieveFileTransfer_Progress_Data=\ - data 
+AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY=Exception in receive done/paused event handler.
+AbstractRetrieveFileTransfer_Exception_User_Cancelled=Cancelled by user
+AbstractRetrieveFileTransfer_InfoTransferRate=({0}/s)
+AbstractRetrieveFileTransfer_Status_Transfer_Completed_OK=Transfer Completed OK
+UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED=not connected
+UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS=file modified since last access
+UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT=Exception connecting to {0}.
+UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE=invalid server response
+UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST=invalid server response to partial range request
+UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START=end position cannot be less than or equal to start position
+UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR=resume start error
+UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO=start position cannot be less then 0
+UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException=Password not provided from callback.
+UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT=Username: 
+UrlConnectionOutgoingFileTransfer_EXCEPTION_COULD_NOT_CONNECT=Exception connecting to {0}.
+AbstractRetrieveFileTransfer_Status_Transfer_Exception=Transfer Exception
+AbstractRetrieveFileTransfer_RemoteFileID_Not_Null=remoteFileID cannot be null
+AbstractRetrieveFileTransfer_TransferListener_Not_Null=transferListener cannot be null
+AbstractOutgoingFileTransfer_Progress_Data=\ - data 
+AbstractOutgoingFileTransfer_Exception_User_Cancelled=Canceled by user
+AbstractOutgoingFileTransfer_Status_Transfer_Completed_OK=Transfer Completed OK
+AbstractOutgoingFileTransfer_Status_Transfer_Exception=Transfer Exception
+AbstractOutgoingFileTransfer_RemoteFileID_Not_Null=remoteFileID cannot be null
+AbstractOutgoingFileTransfer_TransferListener_Not_Null=transferListener cannot be null
+AbstractOutgoingFileTransfer_MalformedURLException=Invalid URL
+AbstractRetrieveFileTransfer_MalformedURLException=Exception creating URL for {0}
+AbstractRetrieveFileTransfer_SizeUnitBytes=bytes
+AbstractRetrieveFileTransfer_SizeUnitGB=GB
+AbstractRetrieveFileTransfer_SizeUnitKB=KB
+AbstractRetrieveFileTransfer_SizeUnitMB=MB
+FileSystemBrowser_EXCEPTION_DIRECTORY_DOES_NOT_EXIST=Directory {0} does not exist.
+FileTransferNamespace_Namespace_Protocol=ecf.provider.filetransfer
+FileTransferNamespace_Http_Protocol=http
+FileTransferNamespace_Ftp_Protocol=ftp
+FileTransferNamespace_File_Protocol=file
+FileTransferNamespace_Jar_Protocol=jar
+FileTransferNamespace_Https_Protocol=https
+FileTransferNamespace_Mailto_Protocol=mailto
+FileTransferNamespace_Gopher_Protocol=mailto
+FileTransferNamespace_Exception_Create_Instance=Exception in createInstance
+FileTransferNamespace_Exception_Create_Instance_Failed=arguments not correct to create instance of FileTransferNamespace
+FileTransferID_Exception_Url_Not_Null=FileTransferID<init> URL cannot be null
+LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_INPUT=Exception opening file {0} for input.
+LocalFileOutgoingFileTransfer_EXCEPTION_OPENING_FOR_OUTPUT=Exception opening {0} for output.
+MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER=No protocol handler for {0}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java
new file mode 100644
index 0000000..8f6f7ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/IFileTransferProtocolToFactoryMapper.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer;
+
+import org.eclipse.ecf.filetransfer.service.IRemoteFileSystemBrowserFactory;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransferFactory;
+
+/**
+ * 
+ * @since 3.0.1
+ *
+ */
+public interface IFileTransferProtocolToFactoryMapper {
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority);
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @param uri if <code>true</code> the factory is added as a URI rather than a URL, meaning that <b>no</b> URLStreamHandler is
+	 * registered for the given protocol.  This is in contrast to the {@link #setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int)},
+	 * which automatically registers an URLStreamHandler for the given protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the 
+	 * given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the
+	 * URI may not be successfully parsed as a URL.
+	 * 
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setRetrieveFileTransferFactory(String protocol, String id, IRetrieveFileTransferFactory factory, int priority, boolean uri);
+
+	/**
+	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
+	 * active factory, returns <code>null</code>.
+	 * 
+	 * @param protocol the protocol to get the id for (e.g. http/https)
+	 * 
+	 * @return id of the factory associated with the given protocol
+	 */
+	public String getRetrieveFileTransferFactoryId(String protocol);
+
+	/**
+	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
+	 * 
+	 * @param protocol the protocol to get the priority for (e.g. http/https)
+	 * 
+	 * @return int priority for the given protocol
+	 */
+	public int getRetrieveFileTransferPriority(String protocol);
+
+	/**
+	 * Remove the factory with the given id.
+	 * @param id the id of the factory to remove.
+	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
+	 */
+	public boolean removeRetrieveFileTransferFactory(String id);
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority);
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @param uri if <code>true</code> the factory is added as a URI rather than a URL, meaning that <b>no</b> URLStreamHandler is
+	 * registered for the given protocol.  This is in contrast to the {@link #setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int)},
+	 * which automatically registers an URLStreamHandler for the given protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the 
+	 * given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the
+	 * URI may not be successfully parsed as a URL.
+	 *
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setBrowseFileTransferFactory(String protocol, String id, IRemoteFileSystemBrowserFactory factory, int priority, boolean uri);
+
+	/**
+	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
+	 * active factory, returns <code>null</code>.
+	 * 
+	 * @param protocol the protocol to get the id for (e.g. http/https)
+	 * 
+	 * @return id of the factory associated with the given protocol
+	 */
+	public String getBrowseFileTransferFactoryId(String protocol);
+
+	/**
+	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
+	 * 
+	 * @param protocol the protocol to get the priority for (e.g. http/https)
+	 * 
+	 * @return int priority for the given protocol
+	 */
+	public int getBrowseFileTransferPriority(String protocol);
+
+	/**
+	 * Remove the factory with the given id.
+	 * @param id the id of the factory to remove.
+	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
+	 */
+	public boolean removeBrowseFileTransferFactory(String id);
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority);
+
+	/**
+	 * <p>
+	 * For the given protocol, set the given factory to be used for retrieve file transfer.  If successful, subsequent retrieve
+	 * requests for the given protocol will use the given factory.  </p>
+	 * <p>For this method to be successful the protocol has to be
+	 * non-null, the id has to be non-null and unique (should probably be set to the bundle symbolic name of the bundle calling this
+	 * method), the factory must be non-null, and the priority must be higher (a *smaller number*) than any existing factory for the
+	 * given protocol.  The default priority is 100, and the highest priority is 0.
+	 * </p>
+	 * @param protocol the protocol (e.g. http/https) to map the factory to.
+	 * @param id a unique id for the factory (should be bundle symbolic name of bundle calling method)
+	 * @param factory the factory to associate with the given protocol
+	 * @param priority priority (highest = 0) to use for this factory relative to any existing factories.
+	 * @param uri if <code>true</code> the factory is added as a URI rather than a URL, meaning that <b>no</b> URLStreamHandler is
+	 * registered for the given protocol.  This is in contrast to the {@link #setRetrieveFileTransferFactory(String, String, IRetrieveFileTransferFactory, int)},
+	 * which automatically registers an URLStreamHandler for the given protocol.  If false, URLs will be used and an URLStreamHandler will be registered for the 
+	 * given protocol factory.  NOTE:  If this flag is true, providers that attempt to access IFileID.getURL() may be unable to do so, since the
+	 * URI may not be successfully parsed as a URL.
+	 *
+	 * @return <code>true</code> if the given factory was set for this protocol, <code>false</code> if not
+	 */
+	public boolean setSendFileTransferFactory(String protocol, String id, ISendFileTransferFactory factory, int priority, boolean uri);
+
+	/**
+	 * Get the factory id of the active factory for the given protocol.  If the given protocol does not have an
+	 * active factory, returns <code>null</code>.
+	 * 
+	 * @param protocol the protocol to get the id for (e.g. http/https)
+	 * 
+	 * @return id of the factory associated with the given protocol
+	 */
+	public String getSendFileTransferFactoryId(String protocol);
+
+	/**
+	 * Get the priority of the active factory for the given protocol.  If the given protocol does not have an active factory, returns -1.
+	 * 
+	 * @param protocol the protocol to get the priority for (e.g. http/https)
+	 * 
+	 * @return int priority for the given protocol
+	 */
+	public int getSendFileTransferPriority(String protocol);
+
+	/**
+	 * Remove the factory with the given id.
+	 * @param id the id of the factory to remove.
+	 * @return <code>true</code> if a factory was removed.  <code>false</code> otherwise.
+	 */
+	public boolean removeSendFileTransferFactory(String id);
+
+	/**
+	 * Reinitialized protocol to factory mapping defined via extension registry/extension points.
+	 * @return true if reinitialization succeeds, false if not
+	 */
+	public boolean reinitialize();
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
new file mode 100644
index 0000000..0a911a2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java
@@ -0,0 +1,261 @@
+/****************************************************************************
+ * Copyright (c) 2007, 2010 Composent, Inc., IBM and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *    Henrich Kraemer - bug 263613, [transport] Update site contacting / downloading is not cancelable
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.browse;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.List;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.IRemoteFile;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemRequest;
+import org.eclipse.ecf.filetransfer.UserCancelledException;
+import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent;
+import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemEvent;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.util.ProxySetupHelper;
+
+/**
+ * Abstract class for browsing an efs file system.
+ */
+public abstract class AbstractFileSystemBrowser {
+
+	protected IFileID fileID = null;
+	protected IRemoteFileSystemListener listener = null;
+
+	private Exception exception = null;
+	protected IRemoteFile[] remoteFiles = null;
+
+	protected Proxy proxy;
+	protected URL directoryOrFile;
+
+	protected IConnectContext connectContext;
+
+	protected DirectoryJob job = null;
+
+	Object lock = new Object();
+
+	protected class DirectoryJob extends Job {
+
+		private IRemoteFileSystemRequest request;
+
+		public DirectoryJob() {
+			super(fileID.getName());
+		}
+
+		protected IStatus run(IProgressMonitor monitor) {
+			try {
+				if (monitor.isCanceled())
+					throw newUserCancelledException();
+				runRequest();
+			} catch (Exception e) {
+				AbstractFileSystemBrowser.this.setException(e);
+			} finally {
+				listener.handleRemoteFileEvent(createRemoteFileEvent());
+				cleanUp();
+			}
+			return Status.OK_STATUS;
+		}
+
+		public void setRequest(IRemoteFileSystemRequest request) {
+			this.request = request;
+		}
+
+		public IRemoteFileSystemRequest getRequest() {
+			return request;
+		}
+
+		protected void canceling() {
+			request.cancel();
+		}
+
+	}
+
+	protected void cancel() {
+		synchronized (lock) {
+			if (job != null) {
+				job.cancel();
+			}
+		}
+
+	}
+
+	protected void cleanUp() {
+		synchronized (lock) {
+			job = null;
+		}
+	}
+
+	/**
+	 * Run the actual request.  This method is called within the job created to actually get the
+	 * directory or file information.
+	 * @throws Exception if some problem with making the request or receiving response to the request.
+	 */
+	protected abstract void runRequest() throws Exception;
+
+	public AbstractFileSystemBrowser(IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL url, IConnectContext connectContext, Proxy proxy) {
+		Assert.isNotNull(directoryOrFileID);
+		this.fileID = directoryOrFileID;
+		Assert.isNotNull(listener);
+		this.listener = listener;
+		this.directoryOrFile = url;
+		this.connectContext = connectContext;
+		this.proxy = proxy;
+	}
+
+	public abstract class RemoteFileSystemRequest implements IRemoteFileSystemRequest {
+		public void cancel() {
+			synchronized (lock) {
+				if (job != null)
+					job.cancel();
+			}
+		}
+
+		public IFileID getFileID() {
+			return fileID;
+		}
+
+		public IRemoteFileSystemListener getRemoteFileListener() {
+			return listener;
+		}
+
+	}
+
+	public IRemoteFileSystemRequest sendBrowseRequest() {
+		job = new DirectoryJob();
+
+		IRemoteFileSystemRequest request = createRemoteFileSystemRequest();
+		job.setRequest(request);
+
+		job.schedule();
+		return request;
+	}
+
+	protected IRemoteFileSystemRequest createRemoteFileSystemRequest() {
+		return new RemoteFileSystemRequest() {
+			public Object getAdapter(Class adapter) {
+				if (adapter == null) {
+					return null;
+				}
+				if (adapter.isInstance(this)) {
+					return this;
+				}
+				return null;
+			}
+
+		};
+	}
+
+	/**
+	 * @return file system directory event
+	 */
+	protected IRemoteFileSystemEvent createRemoteFileEvent() {
+		return new IRemoteFileSystemBrowseEvent() {
+
+			public IFileID getFileID() {
+				return fileID;
+			}
+
+			public Exception getException() {
+				return exception;
+			}
+
+			public String toString() {
+				StringBuffer buf = new StringBuffer("RemoteFileSystemBrowseEvent["); //$NON-NLS-1$
+				buf.append("fileID=").append(fileID).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+				List list = (remoteFiles != null) ? Arrays.asList(remoteFiles) : null;
+				buf.append("files=").append(list).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+				return buf.toString();
+			}
+
+			public IRemoteFile[] getRemoteFiles() {
+				return remoteFiles;
+			}
+		};
+	}
+
+	protected abstract void setupProxy(Proxy proxy);
+
+	/**
+	 * Select a single proxy from a set of proxies available for the given host.  This implementation
+	 * selects in the following manner:  1) If proxies provided is null or array of 0 length, null 
+	 * is returned.  If only one proxy is available (array of length 1) then the entry is returned.
+	 * If proxies provided is length > 1, then if the type of a proxy in the array matches the given
+	 * protocol (e.g. http, https), then the first matching proxy is returned.  If the protocol does
+	 * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned.  Subclasses may
+	 * override if desired.
+	 * 
+	 * @param protocol the target protocol (e.g. http, https, scp, etc).  Will not be <code>null</code>.
+	 * @param proxies the proxies to select from.  May be <code>null</code> or array of length 0.
+	 * @return proxy data selected from the proxies provided.  
+	 */
+	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
+		try {
+			return ProxySetupHelper.selectProxyFromProxies(protocol, proxies);
+		} catch (NoClassDefFoundError e) {
+			// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+			// If that happens then we just want to continue on.
+			Activator.logNoProxyWarning(e);
+			return null;
+		}
+	}
+
+	protected void setupProxies() {
+		// If it's been set directly (via ECF API) then this overrides platform settings
+		if (proxy == null) {
+			try {
+				proxy = ProxySetupHelper.getProxy(directoryOrFile.toExternalForm());
+			} catch (NoClassDefFoundError e) {
+				// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+				// If that happens then we just want to continue on.
+				Activator.logNoProxyWarning(e);
+			}
+		}
+		if (proxy != null)
+			setupProxy(proxy);
+	}
+
+	protected synchronized void setException(Exception exception) {
+		this.exception = exception;
+	}
+
+	protected synchronized Exception getException() {
+		return this.exception;
+	}
+
+	protected synchronized boolean isCanceled() {
+		return exception instanceof UserCancelledException;
+	}
+
+	protected synchronized void setCanceled(Exception e) {
+		if (e instanceof UserCancelledException) {
+			exception = e;
+		} else {
+			exception = newUserCancelledException();
+		}
+	}
+
+	protected UserCancelledException newUserCancelledException() {
+		return new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalFileSystemBrowser.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFile.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/LocalRemoteFileAttributes.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapter.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapter.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapter.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapterFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapterFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapterFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/MultiProtocolFileSystemBrowserAdapterFactory.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
new file mode 100644
index 0000000..8cd9640
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
@@ -0,0 +1,204 @@
+/****************************************************************************
+ * Copyright (c) 2008 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.browse;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.net.URLConnection;
+import org.eclipse.ecf.core.security.Callback;
+import org.eclipse.ecf.core.security.CallbackHandler;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.security.NameCallback;
+import org.eclipse.ecf.core.security.ObjectCallback;
+import org.eclipse.ecf.core.security.UnsupportedCallbackException;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
+import org.eclipse.ecf.filetransfer.IRemoteFile;
+import org.eclipse.ecf.filetransfer.IRemoteFileSystemListener;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.IURLConnectionModifier;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class URLFileSystemBrowser extends AbstractFileSystemBrowser {
+
+	private static final String USERNAME_PREFIX = Messages.UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
+
+	private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
+
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.browse.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	private static final String DEFAULT_CONNECT_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.browse.connectTimeout", "30000"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
+
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.browse.readTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	private static final String DEFAULT_READ_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.browse.readTimeout", "30000"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private JREProxyHelper proxyHelper = null;
+
+	protected String username = null;
+
+	protected String password = null;
+
+	/**
+	 * @param directoryOrFileID
+	 * @param listener
+	 */
+	public URLFileSystemBrowser(IFileID directoryOrFileID, IRemoteFileSystemListener listener, URL directoryOrFileURL, IConnectContext connectContext, Proxy proxy) {
+		super(directoryOrFileID, listener, directoryOrFileURL, connectContext, proxy);
+		proxyHelper = new JREProxyHelper();
+	}
+
+	private void setupTimeouts() {
+		String existingTimeout = System.getProperty(JRE_CONNECT_TIMEOUT_PROPERTY);
+		if (existingTimeout == null) {
+			System.setProperty(JRE_CONNECT_TIMEOUT_PROPERTY, DEFAULT_CONNECT_TIMEOUT);
+		}
+		existingTimeout = System.getProperty(JRE_READ_TIMEOUT_PROPERTY);
+		if (existingTimeout == null) {
+			System.setProperty(JRE_READ_TIMEOUT_PROPERTY, DEFAULT_READ_TIMEOUT);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.provider.filetransfer.browse.AbstractFileSystemBrowser#runRequest()
+	 */
+	protected void runRequest() throws Exception {
+		int code = -1;
+		try {
+			setupProxies();
+			setupAuthentication();
+			setupTimeouts();
+			URLConnection urlConnection = directoryOrFile.openConnection();
+			// set cache to off if using jar protocol
+			// this is for addressing bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=235933
+			if (directoryOrFile.getProtocol().equalsIgnoreCase("jar")) { //$NON-NLS-1$
+				urlConnection.setUseCaches(false);
+			}
+			// Add http 1.1 'Connection: close' header in order to potentially avoid
+			// server issue described here https://bugs.eclipse.org/bugs/show_bug.cgi?id=234916#c13
+			// See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247197
+			// also see http 1.1 rfc section 14-10 in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+			urlConnection.setRequestProperty("Connection", "close"); //$NON-NLS-1$ //$NON-NLS-2$
+
+			IURLConnectionModifier connectionModifier = Activator.getDefault().getURLConnectionModifier();
+			if (connectionModifier != null) {
+				connectionModifier.setSocketFactoryForConnection(urlConnection);
+			}
+			if (urlConnection instanceof HttpURLConnection) {
+				HttpURLConnection httpConnection = (HttpURLConnection) urlConnection;
+				httpConnection.setRequestMethod("HEAD"); //$NON-NLS-1$
+				httpConnection.connect();
+			} else {
+				InputStream ins = urlConnection.getInputStream();
+				ins.close();
+			}
+			code = getResponseCode(urlConnection);
+			if (isHTTP()) {
+				if (code == HttpURLConnection.HTTP_OK) {
+					// do nothing
+				} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+					throw new BrowseFileTransferException(NLS.bind("File not found: {0}", directoryOrFile.toString()), code); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+					throw new BrowseFileTransferException("Unauthorized", code); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+					throw new BrowseFileTransferException("Forbidden", code); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+					throw new BrowseFileTransferException("Proxy auth required", code); //$NON-NLS-1$
+				} else {
+					throw new BrowseFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code); //$NON-NLS-1$
+				}
+			}
+			remoteFiles = new IRemoteFile[1];
+			remoteFiles[0] = new URLRemoteFile(urlConnection.getLastModified(), urlConnection.getContentLength(), fileID);
+		} catch (final FileNotFoundException e) {
+			throw new IncomingFileTransferException(NLS.bind("File not found: {0}", directoryOrFile.toString()), 404); //$NON-NLS-1$
+		} catch (Exception e) {
+			Exception except = (e instanceof BrowseFileTransferException) ? e : new BrowseFileTransferException(NLS.bind("Could not connect to {0}", directoryOrFile), e, code); //$NON-NLS-1$
+			throw except;
+		}
+	}
+
+	private boolean isHTTP() {
+		final String protocol = directoryOrFile.getProtocol();
+		if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) //$NON-NLS-1$ //$NON-NLS-2$
+			return true;
+		return false;
+	}
+
+	private int getResponseCode(URLConnection urlConnection) {
+		int responseCode = -1;
+		String response = urlConnection.getHeaderField(0);
+		if (response == null) {
+			responseCode = -1;
+			return responseCode;
+		}
+		if (!response.startsWith("HTTP/")) //$NON-NLS-1$
+			return -1;
+		response = response.trim();
+		final int mark = response.indexOf(" ") + 1; //$NON-NLS-1$
+		if (mark == 0)
+			return -1;
+		int last = mark + 3;
+		if (last > response.length())
+			last = response.length();
+		responseCode = Integer.parseInt(response.substring(mark, last));
+		return responseCode;
+
+	}
+
+	protected void setupAuthentication() throws IOException, UnsupportedCallbackException {
+		if (connectContext == null)
+			return;
+		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
+		if (callbackHandler == null)
+			return;
+		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
+		final ObjectCallback passwordCallback = new ObjectCallback();
+		// Call callback with username and password callbacks
+		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
+		username = usernameCallback.getName();
+		Object o = passwordCallback.getObject();
+		if (!(o instanceof String))
+			throw new UnsupportedCallbackException(passwordCallback, Messages.UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException);
+		password = (String) passwordCallback.getObject();
+		// Now set authenticator to our authenticator with user and password
+		Authenticator.setDefault(new UrlConnectionAuthenticator());
+	}
+
+	class UrlConnectionAuthenticator extends Authenticator {
+		/* (non-Javadoc)
+		 * @see java.net.Authenticator#getPasswordAuthentication()
+		 */
+		protected PasswordAuthentication getPasswordAuthentication() {
+			return new PasswordAuthentication(username, password.toCharArray());
+		}
+	}
+
+	protected void setupProxy(final Proxy proxy2) {
+		proxyHelper.setupProxy(proxy2);
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFile.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLRemoteFileAttributes.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/AbstractSocketWrapper.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketClosedEvent.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketClosedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketClosedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketClosedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketConnectedEvent.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketConnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketConnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketConnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketCreatedEvent.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketCreatedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketCreatedEvent.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketCreatedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventCreateUtil.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventCreateUtil.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventCreateUtil.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventCreateUtil.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventSource.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventSource.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventSource.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/events/socket/SocketEventSource.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java
new file mode 100644
index 0000000..3b3edb2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferID.java
@@ -0,0 +1,97 @@
+/****************************************************************************
+ * Copyright (c) 2006, 2007 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.identity;
+
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ecf.core.identity.BaseID;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+
+public class FileTransferID extends BaseID implements IFileID {
+
+	private static final long serialVersionUID = 1274308869502156992L;
+
+	URL fileURL;
+	URI fileURI;
+
+	public FileTransferID(Namespace namespace, URL url) {
+		super(namespace);
+		Assert.isNotNull(url, Messages.FileTransferID_Exception_Url_Not_Null);
+		this.fileURL = url;
+	}
+
+	/**
+	 * @since 3.2
+	 */
+	public FileTransferID(Namespace namespace, URI uri) {
+		super(namespace);
+		Assert.isNotNull(uri, "FileTransferID URI cannot be null"); //$NON-NLS-1$
+		this.fileURI = uri;
+	}
+
+	protected int namespaceCompareTo(BaseID o) {
+		if (o == null)
+			return 1;
+		if (!(o instanceof FileTransferID))
+			return 1;
+
+		return (fileURI != null) ? fileURI.compareTo(((FileTransferID) o).fileURI) : fileURL.toExternalForm().compareTo(((FileTransferID) o).toExternalForm());
+	}
+
+	protected boolean namespaceEquals(BaseID o) {
+		if (o == null)
+			return false;
+		if (!(o instanceof FileTransferID))
+			return false;
+
+		return (fileURI != null) ? fileURI.equals(((FileTransferID) o).fileURI) : fileURL.equals(((FileTransferID) o).fileURL);
+	}
+
+	protected String namespaceGetName() {
+		return (fileURI != null) ? fileURI.toASCIIString() : fileURL.toExternalForm();
+	}
+
+	protected int namespaceHashCode() {
+		return (fileURI != null) ? fileURI.hashCode() : this.fileURL.hashCode();
+	}
+
+	public String getFilename() {
+		return getFileNameOnly();
+	}
+
+	public URL getURL() throws MalformedURLException {
+		return (fileURI != null) ? fileURI.toURL() : fileURL;
+	}
+
+	protected String getFileNameOnly() {
+		final String path = this.fileURL.getPath();
+		return path.substring(path.lastIndexOf("/") + 1); //$NON-NLS-1$;
+	}
+
+	public String toString() {
+		final StringBuffer b = new StringBuffer("FileTransferID["); //$NON-NLS-1$
+		b.append(toExternalForm());
+		b.append("]"); //$NON-NLS-1$
+		return b.toString();
+	}
+
+	/**
+	 * @since 3.2
+	 */
+	public URI getURI() throws URISyntaxException {
+		return (fileURI != null) ? fileURI : new URI(fileURL.toExternalForm());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java
new file mode 100644
index 0000000..5252af1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/identity/FileTransferNamespace.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.identity;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDCreateException;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+
+/**
+ * URL file namespace class. This defines a namespace that understands how to
+ * create IFileID instances from arbitary URLs
+ */
+public class FileTransferNamespace extends Namespace {
+
+	private static final long serialVersionUID = 8204058147686930765L;
+
+	public static final String PROTOCOL = Messages.FileTransferNamespace_Namespace_Protocol;
+
+	private String getInitFromExternalForm(Object[] args) {
+		if (args == null || args.length < 1 || args[0] == null)
+			return null;
+		if (args[0] instanceof String) {
+			String arg = (String) args[0];
+			if (arg.startsWith(getScheme() + Namespace.SCHEME_SEPARATOR)) {
+				int index = arg.indexOf(Namespace.SCHEME_SEPARATOR);
+				if (index >= arg.length())
+					return null;
+				return arg.substring(index + 1);
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.Namespace#createInstance(java.lang.Object[])
+	 */
+	public ID createInstance(Object[] args) throws IDCreateException {
+		try {
+			String init = getInitFromExternalForm(args);
+			if (init != null)
+				return new FileTransferID(this, new URI(init));
+			if (args[0] instanceof URL)
+				return new FileTransferID(this, (URL) args[0]);
+			if (args[0] instanceof String)
+				return new FileTransferID(this, new URI((String) args[0]));
+			if (args[0] instanceof URI)
+				return new FileTransferID(this, (URI) args[0]);
+		} catch (Exception e) {
+			throw new IDCreateException(Messages.FileTransferNamespace_Exception_Create_Instance, e);
+		}
+		throw new IDCreateException(Messages.FileTransferNamespace_Exception_Create_Instance_Failed);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedSchemes()
+	 */
+	public String[] getSupportedSchemes() {
+		Set result = new HashSet();
+		String[] platformSchemes = Activator.getDefault().getPlatformSupportedSchemes();
+		for (int i = 0; i < platformSchemes.length; i++)
+			result.add(platformSchemes[i]);
+		return (String[]) result.toArray(new String[] {});
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.Namespace#getScheme()
+	 */
+	public String getScheme() {
+		return PROTOCOL;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.Namespace#getSupportedParameterTypesForCreateInstance()
+	 */
+	public Class[][] getSupportedParameterTypes() {
+		return new Class[][] { {URL.class}, {String.class}};
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java
new file mode 100644
index 0000000..6e2ca6b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractOutgoingFileTransfer.java
@@ -0,0 +1,469 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ *               Cloudsmith, Inc. - additional API and implementation
+ *               Henrich Kraemer - bug 295030, Update Manager doesn't work with SOCKS proxy  
+ ******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.outgoing;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Map;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.FileTransferInfo;
+import org.eclipse.ecf.filetransfer.FileTransferJob;
+import org.eclipse.ecf.filetransfer.IFileTransferInfo;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
+import org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener;
+import org.eclipse.ecf.filetransfer.IOutgoingFileTransfer;
+import org.eclipse.ecf.filetransfer.SendFileTransferException;
+import org.eclipse.ecf.filetransfer.UserCancelledException;
+import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent;
+import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferSendDataEvent;
+import org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferSendDoneEvent;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
+import org.eclipse.ecf.provider.filetransfer.util.ProxySetupHelper;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public abstract class AbstractOutgoingFileTransfer implements IOutgoingFileTransfer, ISendFileTransfer {
+
+	public static final int DEFAULT_BUF_LENGTH = 4096;
+
+	protected Job job;
+
+	protected URL remoteFileURL;
+
+	protected IFileID remoteFileID;
+
+	protected IFileTransferListener listener;
+
+	protected int buff_length = DEFAULT_BUF_LENGTH;
+
+	protected boolean done = false;
+
+	protected long bytesSent = 0;
+
+	protected InputStream localFileContents;
+
+	protected OutputStream remoteFileContents;
+
+	protected Exception exception;
+
+	protected IFileTransferInfo fileTransferInfo;
+
+	protected Map options = null;
+
+	protected IConnectContext connectContext;
+
+	protected Proxy proxy;
+
+	private final IFileTransferRunnable fileTransferRunnable = new IFileTransferRunnable() {
+		public IStatus performFileTransfer(IProgressMonitor monitor) {
+			final byte[] buf = new byte[buff_length];
+			final long totalWork = ((fileTransferInfo.getFileSize() == -1) ? 100 : fileTransferInfo.getFileSize());
+			double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
+			int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
+			monitor.beginTask(getRemoteFileURL().toString() + Messages.AbstractOutgoingFileTransfer_Progress_Data, work);
+			try {
+				while (!isDone()) {
+					if (monitor.isCanceled())
+						throw new UserCancelledException(Messages.AbstractOutgoingFileTransfer_Exception_User_Cancelled);
+					final int bytes = localFileContents.read(buf);
+					if (bytes != -1) {
+						bytesSent += bytes;
+						remoteFileContents.write(buf, 0, bytes);
+						fireTransferSendDataEvent();
+						monitor.worked((int) Math.round(factor * bytes));
+					} else {
+						done = true;
+					}
+				}
+			} catch (final Exception e) {
+				exception = e;
+				done = true;
+			} finally {
+				hardClose();
+				monitor.done();
+				try {
+					fireTransferSendDoneEvent();
+				} catch (Exception e) {
+					Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractOutgoingFileTransfer_EXCEPTION_IN_FINALLY, e));
+				}
+			}
+			return getFinalStatus(exception);
+		}
+	};
+
+	FileTransferJob fileTransferJob;
+
+	protected URL getRemoteFileURL() {
+		return remoteFileURL;
+	}
+
+	protected void setInputStream(InputStream ins) {
+		localFileContents = ins;
+	}
+
+	protected void setOutputStream(OutputStream outs) {
+		remoteFileContents = outs;
+	}
+
+	protected IFileTransferInfo getFileTransferInfo() {
+		return fileTransferInfo;
+	}
+
+	protected Map getOptions() {
+		return options;
+	}
+
+	public AbstractOutgoingFileTransfer() {
+		//
+	}
+
+	protected IStatus getFinalStatus(Throwable exception1) {
+		return Status.OK_STATUS;
+	}
+
+	protected void hardClose() {
+		try {
+			if (remoteFileContents != null)
+				remoteFileContents.close();
+		} catch (final IOException e) {
+			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
+		}
+		try {
+			if (localFileContents != null)
+				localFileContents.close();
+		} catch (final IOException e) {
+			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
+		}
+		job = null;
+		remoteFileContents = null;
+		localFileContents = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
+	 */
+	public ID getID() {
+		return remoteFileID;
+	}
+
+	protected void fireTransferSendDoneEvent() {
+		listener.handleTransferEvent(new IOutgoingFileTransferSendDoneEvent() {
+
+			private static final long serialVersionUID = -2686266564645210722L;
+
+			public IOutgoingFileTransfer getSource() {
+				return AbstractOutgoingFileTransfer.this;
+			}
+
+			public Exception getException() {
+				return AbstractOutgoingFileTransfer.this.getException();
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferSendDoneEvent["); //$NON-NLS-1$
+				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
+						.append(";fileLength=").append(fileTransferInfo.getFileSize()).append(";exception=").append(getException()) //$NON-NLS-1$ //$NON-NLS-2$
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+		});
+	}
+
+	protected void fireTransferSendDataEvent() {
+		listener.handleTransferEvent(new IOutgoingFileTransferSendDataEvent() {
+
+			private static final long serialVersionUID = -2916500675859842392L;
+
+			public IOutgoingFileTransfer getSource() {
+				return AbstractOutgoingFileTransfer.this;
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferSendDataEvent["); //$NON-NLS-1$
+				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
+						.append(";fileLength=").append(fileTransferInfo.getFileSize()) //$NON-NLS-1$ 
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+		});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.IOutgoingFileTransfer#getBytesSent()
+	 */
+	public long getBytesSent() {
+		return bytesSent;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#cancel()
+	 */
+	public void cancel() {
+		if (job != null)
+			job.cancel();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getException()
+	 */
+	public Exception getException() {
+		return exception;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getPercentComplete()
+	 */
+	public double getPercentComplete() {
+		long fileLength = getFileLength();
+		if (fileLength == -1 || fileLength == 0)
+			return fileLength;
+		return ((double) bytesSent / (double) fileLength);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getFileLength()
+	 */
+	public long getFileLength() {
+		return fileTransferInfo.getFileSize();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#isDone()
+	 */
+	public boolean isDone() {
+		return done;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		if (adapter.isInstance(this)) {
+			return this;
+		}
+		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
+		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, adapter.getName());
+	}
+
+	/**
+	 * Open incoming and outgoing streams associated with this file transfer.
+	 * Subclasses must implement this method to open input and output streams.
+	 * The <code>remoteFileContents</code> and <code>localFileContent</code>
+	 * must be non-<code>null</code> after successful completion of the
+	 * implementation of this method.
+	 * 
+	 * @throws SendFileTransferException
+	 */
+	protected abstract void openStreams() throws SendFileTransferException;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#getOutgoingNamespace()
+	 */
+	public Namespace getOutgoingNamespace() {
+		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
+	}
+
+	public IFileTransferListener getListener() {
+		return listener;
+	}
+
+	protected String createJobName() {
+		return getRemoteFileURL().toString();
+	}
+
+	protected void setupAndScheduleJob() {
+		if (fileTransferJob == null)
+			fileTransferJob = new FileTransferJob(createJobName());
+		fileTransferJob.setFileTransferRunnable(fileTransferRunnable);
+		fileTransferJob.setFileTransfer(this);
+		job = fileTransferJob;
+		job.schedule();
+	}
+
+	protected void fireSendStartEvent() {
+		listener.handleTransferEvent(new IOutgoingFileTransferResponseEvent() {
+
+			private static final long serialVersionUID = 2171381825030082432L;
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IOutgoingFileTransferResponseEvent["); //$NON-NLS-1$
+				sb.append("isdone=").append(done).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+				sb.append("bytesSent=").append(bytesSent) //$NON-NLS-1$
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+
+			/* (non-Javadoc)
+			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent#requestAccepted()
+			 */
+			public boolean requestAccepted() {
+				return true;
+			}
+
+			/* (non-Javadoc)
+			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferEvent#getSource()
+			 */
+			public IOutgoingFileTransfer getSource() {
+				return AbstractOutgoingFileTransfer.this;
+			}
+
+			/* (non-Javadoc)
+			 * @see org.eclipse.ecf.filetransfer.events.IOutgoingFileTransferResponseEvent#setFileTransferJob(org.eclipse.ecf.filetransfer.FileTransferJob)
+			 */
+			public void setFileTransferJob(org.eclipse.ecf.filetransfer.FileTransferJob ftj) {
+				AbstractOutgoingFileTransfer.this.fileTransferJob = ftj;
+			}
+
+		});
+	}
+
+	protected abstract void setupProxy(Proxy proxy);
+
+	protected void setupProxies() {
+		// If it's been set directly (via ECF API) then this overrides platform settings
+		if (proxy == null) {
+			try {
+				proxy = ProxySetupHelper.getProxy(getRemoteFileURL().toExternalForm());
+			} catch (NoClassDefFoundError e) {
+				// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+				// If that happens then we just want to continue on.
+				Activator.logNoProxyWarning(e);
+			}
+		}
+		if (proxy != null)
+			setupProxy(proxy);
+
+	}
+
+	/**
+	 * Select a single proxy from a set of proxies available for the given host.  This implementation
+	 * selects in the following manner:  1) If proxies provided is null or array of 0 length, null 
+	 * is returned.  If only one proxy is available (array of length 1) then the entry is returned.
+	 * If proxies provided is length > 1, then if the type of a proxy in the array matches the given
+	 * protocol (e.g. http, https), then the first matching proxy is returned.  If the protocol does
+	 * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned.  Subclasses may
+	 * override if desired.
+	 * 
+	 * @param protocol the target protocol (e.g. http, https, scp, etc).  Will not be <code>null</code>.
+	 * @param proxies the proxies to select from.  May be <code>null</code> or array of length 0.
+	 * @return proxy data selected from the proxies provided.  
+	 */
+	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
+		if (proxies == null || proxies.length == 0)
+			return null;
+		// If only one proxy is available, then use that
+		if (proxies.length == 1)
+			return proxies[0];
+		// If more than one proxy is available, then if http/https protocol then look for that
+		// one...if not found then use first
+		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
+					return proxies[i];
+			}
+		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
+					return proxies[i];
+			}
+		}
+		// If we haven't found it yet, then return the first one.
+		return proxies[0];
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, org.eclipse.ecf.filetransfer.IFileTransferInfo, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendOutgoingRequest(IFileID targetReceiver, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map ops) throws SendFileTransferException {
+		Assert.isNotNull(targetReceiver, Messages.AbstractOutgoingFileTransfer_RemoteFileID_Not_Null);
+		Assert.isNotNull(transferListener, Messages.AbstractOutgoingFileTransfer_TransferListener_Not_Null);
+		Assert.isNotNull(localFileToSend, Messages.AbstractOutgoingFileTransfer_EXCEPTION_FILE_TRANSFER_INFO_NOT_NULL);
+		this.done = false;
+		this.bytesSent = 0;
+		this.exception = null;
+		this.fileTransferInfo = localFileToSend;
+		this.remoteFileID = targetReceiver;
+		this.options = ops;
+
+		try {
+			this.remoteFileURL = targetReceiver.getURL();
+		} catch (final MalformedURLException e) {
+			throw new SendFileTransferException(NLS.bind(Messages.AbstractOutgoingFileTransfer_MalformedURLException, targetReceiver), e);
+		}
+		this.listener = transferListener;
+		setupProxies();
+		openStreams();
+		fireSendStartEvent();
+		setupAndScheduleJob();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, java.io.File, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendOutgoingRequest(IFileID targetReceiver, final File localFileToSend, IFileTransferListener transferListener, Map ops) throws SendFileTransferException {
+		sendOutgoingRequest(targetReceiver, new FileTransferInfo(localFileToSend, null, null), transferListener, ops);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#addListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
+	 */
+	public void addListener(IIncomingFileTransferRequestListener l) {
+		// Not needed
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#removeListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
+	 */
+	public boolean removeListener(IIncomingFileTransferRequestListener l) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		this.connectContext = connectContext;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
+	 */
+	public void setProxy(Proxy proxy) {
+		this.proxy = proxy;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractUrlConnectionOutgoingFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractUrlConnectionOutgoingFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractUrlConnectionOutgoingFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/AbstractUrlConnectionOutgoingFileTransfer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/LocalFileOutgoingFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/LocalFileOutgoingFileTransfer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/LocalFileOutgoingFileTransfer.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/LocalFileOutgoingFileTransfer.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java
new file mode 100644
index 0000000..38b0b24
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapter.java
@@ -0,0 +1,163 @@
+/****************************************************************************
+ * Copyright (c) 2004, 2007 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.outgoing;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.util.Map;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.IFileTransferInfo;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener;
+import org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter;
+import org.eclipse.ecf.filetransfer.SendFileTransferException;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.filetransfer.service.ISendFileTransfer;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Multi protocol handler for outgoing file transfer. Multiplexes between Apache
+ * httpclient 3.0.1-based file retriever and the URLConnection-based file
+ * retriever.
+ */
+public class MultiProtocolOutgoingAdapter implements ISendFileTransfer {
+
+	IConnectContext connectContext = null;
+	Proxy proxy = null;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#getOutgoingNamespace()
+	 */
+	public Namespace getOutgoingNamespace() {
+		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		this.connectContext = connectContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
+	 */
+	public void setProxy(Proxy proxy) {
+		this.proxy = proxy;
+	}
+
+	public void sendOutgoingRequest(IFileID targetID, File outgoingFile, IFileTransferListener transferListener, Map options) throws SendFileTransferException {
+
+		Assert.isNotNull(targetID);
+		Assert.isNotNull(outgoingFile);
+		Assert.isNotNull(transferListener);
+
+		String protocol = null;
+		try {
+			protocol = targetID.getURI().getScheme();
+		} catch (URISyntaxException e) {
+			try {
+				protocol = targetID.getURL().getProtocol();
+			} catch (final MalformedURLException e1) {
+				throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
+			}
+		}
+
+		ISendFileTransferContainerAdapter fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);
+
+		// If no handler setup for this protocol then throw
+		if (fileTransfer == null) {
+			if (protocol.equalsIgnoreCase("file")) { //$NON-NLS-1$
+				fileTransfer = new LocalFileOutgoingFileTransfer();
+			}
+		}
+
+		if (fileTransfer == null) {
+			throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
+		}
+
+		fileTransfer.setConnectContextForAuthentication(connectContext);
+		fileTransfer.setProxy(proxy);
+		fileTransfer.sendOutgoingRequest(targetID, outgoingFile, transferListener, options);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#addListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
+	 */
+	public void addListener(IIncomingFileTransferRequestListener listener) {
+		// We don't have any listeners
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#removeListener(org.eclipse.ecf.filetransfer.IIncomingFileTransferRequestListener)
+	 */
+	public boolean removeListener(IIncomingFileTransferRequestListener listener) {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter#sendOutgoingRequest(org.eclipse.ecf.filetransfer.identity.IFileID, org.eclipse.ecf.filetransfer.IFileTransferInfo, org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendOutgoingRequest(IFileID targetID, IFileTransferInfo localFileToSend, IFileTransferListener transferListener, Map options) throws SendFileTransferException {
+		Assert.isNotNull(targetID);
+		Assert.isNotNull(localFileToSend);
+		Assert.isNotNull(transferListener);
+
+		String protocol = null;
+		try {
+			protocol = targetID.getURI().getScheme();
+		} catch (URISyntaxException e) {
+			try {
+				protocol = targetID.getURL().getProtocol();
+			} catch (final MalformedURLException e1) {
+				throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
+			}
+		}
+
+		ISendFileTransferContainerAdapter fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);
+
+		// If no handler setup for this protocol then throw
+		if (fileTransfer == null) {
+			throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
+		}
+
+		fileTransfer.setConnectContextForAuthentication(connectContext);
+		fileTransfer.setProxy(proxy);
+		fileTransfer.sendOutgoingRequest(targetID, localFileToSend, transferListener, options);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
+		if (adapterManager == null)
+			return null;
+		return adapterManager.loadAdapter(this, adapter.getName());
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapterFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapterFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapterFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/outgoing/MultiProtocolOutgoingAdapterFactory.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
new file mode 100644
index 0000000..6924d3b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
@@ -0,0 +1,991 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *    Benjamin Cabe <benjamin.cabe at anyware-tech.com> - bug 220258
+ *    Henrich Kraemer - bug 295030, Update Manager doesn't work with SOCKS proxy  
+ ******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.retrieve;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.DecimalFormat;
+import java.util.Date;
+import java.util.Map;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.FileTransferJob;
+import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.IFileTransferPausable;
+import org.eclipse.ecf.filetransfer.IFileTransferRunnable;
+import org.eclipse.ecf.filetransfer.IIncomingFileTransfer;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferOptions;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.UserCancelledException;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDataEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveDoneEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceivePausedEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveResumedEvent;
+import org.eclipse.ecf.filetransfer.events.IIncomingFileTransferReceiveStartEvent;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
+import org.eclipse.ecf.provider.filetransfer.util.PollingInputStream;
+import org.eclipse.ecf.provider.filetransfer.util.ProxySetupHelper;
+import org.eclipse.ecf.provider.filetransfer.util.TimeoutInputStream;
+import org.eclipse.osgi.util.NLS;
+
+public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTransfer, IRetrieveFileTransfer, IFileTransferPausable {
+
+	public static final int DEFAULT_BUF_LENGTH = 4096;
+
+	protected static final int POLLING_RETRY_ATTEMPTS = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts", "30")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;;
+
+	protected static final int TIMEOUT_INPUTSTREAM_BUFFER_SIZE = 8192;
+
+	protected static final int READ_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.readTimeout", "1000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;
+
+	protected static final int CLOSE_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout", "1000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;
+
+	private static final String readTimeoutMessage = "Timeout while reading input stream.\n" + //$NON-NLS-1$
+			"The following system properties can be used to adjust the readTimeout, retryAttempts, and closeTimeout\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=<default:1000>\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=<default:30>\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=<default:1000>\n"; //$NON-NLS-1$
+
+	private static final String closeTimeoutMessage = "Timeout while closing input stream.\n" + //$NON-NLS-1$
+			"The following system properties can be used to adjust the readTimeout, retryAttempts, and closeTimeout\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=<default:1000>\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=<default:30>\n" + //$NON-NLS-1$
+			"\torg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=<default:1000>\n"; //$NON-NLS-1$
+
+	protected Object jobLock = new Object();
+	protected Job job;
+
+	protected URL remoteFileURL;
+
+	protected IFileID remoteFileID;
+
+	protected IFileTransferListener listener;
+
+	protected int buff_length = DEFAULT_BUF_LENGTH;
+
+	protected boolean done = false;
+
+	protected volatile long bytesReceived = 0;
+
+	protected InputStream remoteFileContents;
+
+	protected OutputStream localFileContents;
+
+	protected boolean closeOutputStream = true;
+
+	protected Exception exception;
+
+	protected long fileLength = -1;
+
+	protected long lastModifiedTime = 0L;
+
+	protected Map options = null;
+
+	protected boolean paused = false;
+
+	protected IFileRangeSpecification rangeSpecification = null;
+
+	protected Proxy proxy;
+
+	protected IConnectContext connectContext;
+
+	protected long transferStartTime;
+
+	protected double downloadRateBytesPerSecond = 0L;
+
+	/**
+	 * @since 3.1
+	 */
+	protected Map responseHeaders;
+
+	public AbstractRetrieveFileTransfer() {
+		//
+	}
+
+	protected InputStream wrapTransferReadInputStream(InputStream inputStream, IProgressMonitor monitor) {
+		return new PollingInputStream(remoteFileContents, getRetryAttempts(), monitor, readTimeoutMessage, closeTimeoutMessage);
+	}
+
+	private int getRetryAttempts() {
+		int result = POLLING_RETRY_ATTEMPTS;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the property is present, if so set
+			Object o = localOptions.get("org.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	private IFileTransferRunnable fileTransferRunnable = new IFileTransferRunnable() {
+		public IStatus performFileTransfer(IProgressMonitor monitor) {
+			transferStartTime = System.currentTimeMillis();
+			final byte[] buf = new byte[buff_length];
+			final long totalWork = ((fileLength == -1) ? 100 : fileLength);
+			double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
+			int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
+			monitor.beginTask(getRemoteFileURL().toString() + Messages.AbstractRetrieveFileTransfer_Progress_Data, work);
+			InputStream readInputStream = wrapTransferReadInputStream(remoteFileContents, monitor);
+			try {
+				while (!isDone() && !isPaused()) {
+					try {
+						final int bytes = readInputStream.read(buf);
+						handleReceivedData(buf, bytes, factor, monitor);
+					} catch (OperationCanceledException e) {
+						throw new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
+					}
+				}
+			} catch (final Exception e) {
+				if (!isDone()) {
+					setDoneException(e);
+				}
+			} finally {
+				try {
+					if (readInputStream != null)
+						readInputStream.close();
+				} catch (final IOException e) {
+					Activator a = Activator.getDefault();
+					if (a != null)
+						a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
+				}
+				hardClose();
+				monitor.done();
+				try {
+					if (isPaused())
+						fireTransferReceivePausedEvent();
+					else
+						fireTransferReceiveDoneEvent();
+				} catch (Exception e) {
+					// simply log
+					Activator a = Activator.getDefault();
+					if (a != null)
+						a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.AbstractRetrieveFileTransfer_EXCEPTION_IN_FINALLY, e));
+				}
+			}
+			return getFinalStatus(exception);
+		}
+
+	};
+
+	protected URL getRemoteFileURL() {
+		return remoteFileURL;
+	}
+
+	protected int getSocketReadTimeout() {
+		int result = READ_TIMEOUT;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the connect timeout option is present, if so set
+			Object o = localOptions.get(IRetrieveFileTransferOptions.READ_TIMEOUT);
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+				return result;
+			}
+			o = localOptions.get("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	protected int getSocketCloseTimeout() {
+		int result = CLOSE_TIMEOUT;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the property is present, if so set
+			Object o = localOptions.get("org.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).intValue();
+				} else if (o instanceof String) {
+					result = new Integer(((String) o)).intValue();
+				}
+			}
+		}
+		return result;
+	}
+
+	protected void setInputStream(InputStream ins) {
+		remoteFileContents = new TimeoutInputStream(ins, TIMEOUT_INPUTSTREAM_BUFFER_SIZE, getSocketReadTimeout(), getSocketCloseTimeout());
+	}
+
+	protected void setOutputStream(OutputStream outs) {
+		localFileContents = outs;
+	}
+
+	protected void setCloseOutputStream(boolean close) {
+		closeOutputStream = close;
+	}
+
+	protected void setFileLength(long length) {
+		fileLength = length;
+	}
+
+	protected void setLastModifiedTime(long timestamp) {
+		lastModifiedTime = timestamp;
+	}
+
+	protected Map getOptions() {
+		return options;
+	}
+
+	protected synchronized void handleReceivedData(byte[] buf, int bytes, double factor, IProgressMonitor monitor) throws IOException {
+		if (bytes != -1) {
+			bytesReceived += bytes;
+			localFileContents.write(buf, 0, bytes);
+			downloadRateBytesPerSecond = (bytesReceived / ((System.currentTimeMillis() + 1 - transferStartTime) / 1000.0));
+			monitor.setTaskName(createJobName() + Messages.AbstractRetrieveFileTransfer_Progress_Data + NLS.bind(Messages.AbstractRetrieveFileTransfer_InfoTransferRate, toHumanReadableBytes(downloadRateBytesPerSecond)));
+			monitor.worked((int) Math.round(factor * bytes));
+			fireTransferReceiveDataEvent();
+		} else
+			setDone(true);
+	}
+
+	public static String toHumanReadableBytes(double size) {
+		double convertedSize;
+		String unit;
+
+		if (size / (1024 * 1024 * 1024) >= 1) {
+			convertedSize = size / (1024 * 1024 * 1024);
+			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitGB;
+		} else if (size / (1024 * 1024) >= 1) {
+			convertedSize = size / (1024 * 1024);
+			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitMB;
+		} else if (size / 1024 >= 1) {
+			convertedSize = size / 1024;
+			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitKB;
+		} else {
+			convertedSize = size;
+			unit = Messages.AbstractRetrieveFileTransfer_SizeUnitBytes;
+		}
+
+		DecimalFormat df = new DecimalFormat(NLS.bind(Messages.AbstractRetrieveFileTransfer_TransferRateFormat, unit));
+		return df.format(convertedSize);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
+	 */
+	public ID getID() {
+		return remoteFileID;
+	}
+
+	protected IStatus getFinalStatus(Throwable exception1) {
+		return Status.OK_STATUS;
+	}
+
+	protected void hardClose() {
+		try {
+			if (remoteFileContents != null)
+				remoteFileContents.close();
+		} catch (final IOException e) {
+			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
+		}
+		try {
+			if (localFileContents != null && closeOutputStream)
+				localFileContents.close();
+		} catch (final IOException e) {
+			Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, "hardClose", e)); //$NON-NLS-1$
+		}
+		// leave job intact to ensure only one done event is fired
+		remoteFileContents = null;
+		localFileContents = null;
+	}
+
+	protected void fireTransferReceivePausedEvent() {
+		listener.handleTransferEvent(new IIncomingFileTransferReceivePausedEvent() {
+
+			private static final long serialVersionUID = -1317411290525985140L;
+
+			public IIncomingFileTransfer getSource() {
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceivePausedEvent["); //$NON-NLS-1$
+				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
+						.append(";fileLength=").append(fileLength).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+				return sb.toString();
+			}
+		});
+	}
+
+	protected void fireTransferReceiveDoneEvent() {
+		listener.handleTransferEvent(new IIncomingFileTransferReceiveDoneEvent() {
+
+			private static final long serialVersionUID = 6925524078226825710L;
+
+			public IIncomingFileTransfer getSource() {
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			public Exception getException() {
+				return AbstractRetrieveFileTransfer.this.getException();
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveDoneEvent["); //$NON-NLS-1$
+				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
+						.append(";fileLength=").append(fileLength).append(";exception=").append(getException()) //$NON-NLS-1$ //$NON-NLS-2$
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+		});
+	}
+
+	protected void fireTransferReceiveDataEvent() {
+		listener.handleTransferEvent(new IIncomingFileTransferReceiveDataEvent() {
+			private static final long serialVersionUID = -5656328374614130161L;
+
+			public IIncomingFileTransfer getSource() {
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveDataEvent["); //$NON-NLS-1$
+				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
+						.append(";fileLength=").append(fileLength) //$NON-NLS-1$ 
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+		});
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
+	 * setConnectContextForAuthentication
+	 * (org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		this.connectContext = connectContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy
+	 * (org.eclipse.ecf.core.util.Proxy)
+	 */
+	public void setProxy(Proxy proxy) {
+		this.proxy = proxy;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getBytesReceived()
+	 */
+	public long getBytesReceived() {
+		return bytesReceived;
+	}
+
+	// TODO: replace other instances.
+	/**
+	 * @since 3.0
+	 */
+	protected UserCancelledException newUserCancelledException() {
+		return new UserCancelledException(Messages.AbstractRetrieveFileTransfer_Exception_User_Cancelled);
+	}
+
+	protected synchronized void resetDoneAndException() {
+		setDone(false);
+		this.exception = null;
+	}
+
+	protected synchronized void setDone(boolean done) {
+		this.done = done;
+	}
+
+	protected synchronized void setDoneException(Exception e) {
+		this.done = true;
+		this.exception = e;
+	}
+
+	protected synchronized boolean isCanceled() {
+		return done && exception instanceof UserCancelledException;
+	}
+
+	protected void setDoneCanceled() {
+		setDoneCanceled(newUserCancelledException());
+	}
+
+	protected synchronized void setDoneCanceled(Exception e) {
+		this.done = true;
+		if (e instanceof UserCancelledException) {
+			exception = e;
+		} else {
+			exception = newUserCancelledException();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#cancel()
+	 */
+	public void cancel() {
+		if (isPaused()) {
+			setDoneCanceled();
+			fireTransferReceiveDoneEvent();
+			return;
+		}
+		synchronized (jobLock) {
+			if (job != null)
+				job.cancel();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getException()
+	 */
+	public synchronized Exception getException() {
+		return exception;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getPercentComplete()
+	 */
+	public double getPercentComplete() {
+		if (fileLength == -1 || fileLength == 0)
+			return fileLength;
+		return ((double) bytesReceived / (double) fileLength);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#getFileLength()
+	 */
+	public long getFileLength() {
+		return fileLength;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #getRemoteLastModified()
+	 */
+	public Date getRemoteLastModified() {
+		return lastModifiedTime == 0L ? null : new Date(lastModifiedTime);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransfer#isDone()
+	 */
+	public synchronized boolean isDone() {
+		return done;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		if (adapter.isInstance(this)) {
+			return this;
+		}
+		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
+		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, adapter.getName());
+	}
+
+	/**
+	 * Open incoming and outgoing streams associated with this file transfer.
+	 * Subclasses must implement this method to open input and output streams.
+	 * The <code>remoteFileContents</code> and <code>localFileContent</code>
+	 * must be non-<code>null</code> after successful completion of the
+	 * implementation of this method.
+	 * 
+	 * @throws IncomingFileTransferException
+	 */
+	protected abstract void openStreams() throws IncomingFileTransferException;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
+	 * sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
+	 * org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendRetrieveRequest(final IFileID remoteFileID1, IFileTransferListener transferListener, Map options1) throws IncomingFileTransferException {
+		sendRetrieveRequest(remoteFileID1, null, transferListener, options1);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
+	 * getRetrieveNamespace()
+	 */
+	public Namespace getRetrieveNamespace() {
+		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#isPaused()
+	 */
+	public boolean isPaused() {
+		return paused;
+	}
+
+	/**
+	 * Subclass overridable version of {@link #pause()}. Subclasses must provide
+	 * an implementation of this method to support {@link IFileTransferPausable}
+	 * .
+	 * 
+	 * @return true if the pause is successful. <code>false</code> otherwise.
+	 */
+	protected abstract boolean doPause();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#pause()
+	 */
+	public boolean pause() {
+		return doPause();
+	}
+
+	/**
+	 * Subclass overridable version of {@link #resume()}. Subclasses must
+	 * provide an implementation of this method to support
+	 * {@link IFileTransferPausable}.
+	 * 
+	 * @return true if the resume is successful. <code>false</code> otherwise.
+	 */
+	protected abstract boolean doResume();
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IFileTransferPausable#resume()
+	 */
+	public boolean resume() {
+		return doResume();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getListener()
+	 */
+	public IFileTransferListener getListener() {
+		return listener;
+	}
+
+	protected String createRangeName() {
+		if (rangeSpecification == null)
+			return ""; //$NON-NLS-1$
+		return "[" + rangeSpecification.getStartPosition() + "," + rangeSpecification.getEndPosition() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+
+	protected String createJobName() {
+		return getRemoteFileURL().toString() + createRangeName();
+	}
+
+	protected void setupAndScheduleJob(FileTransferJob fileTransferJob) {
+		if (fileTransferJob == null) {
+			// Create our own
+			fileTransferJob = new FileTransferJob(createJobName());
+		}
+		// Now set to our runnable
+		fileTransferJob.setFileTransferRunnable(fileTransferRunnable);
+		fileTransferJob.setFileTransfer(this);
+		if (isDone()) {
+			return;
+		}
+		synchronized (jobLock) {
+			job = fileTransferJob;
+			job.schedule();
+		}
+	}
+
+	protected void fireReceiveStartEvent() {
+		listener.handleTransferEvent(new IIncomingFileTransferReceiveStartEvent() {
+			private static final long serialVersionUID = -513800598918052184L;
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferEvent#getFileID()
+			 */
+			public IIncomingFileTransfer getSource() {
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferReceiveStartEvent#getFileID()
+			 */
+			public IFileID getFileID() {
+				return remoteFileID;
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferReceiveStartEvent
+			 * #receive(java.io.File)
+			 */
+			public IIncomingFileTransfer receive(File localFileToSave) throws IOException {
+				return receive(localFileToSave, null);
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferReceiveStartEvent
+			 * #receive(java.io.File,
+			 * org.eclipse.ecf.filetransfer.FileTransferJob)
+			 */
+			public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob) throws IOException {
+				setOutputStream(new BufferedOutputStream(new FileOutputStream(localFileToSave)));
+				setupAndScheduleJob(fileTransferJob);
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			/**
+			 * @param streamToStore
+			 * @return incoming file transfer instance.
+			 * @throws IOException
+			 *             not thrown in this implementation.
+			 */
+			public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException {
+				return receive(streamToStore, null);
+			}
+
+			/**
+			 * @throws IOException
+			 *             not actually thrown by this implementation.
+			 */
+			public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException {
+				setOutputStream(streamToStore);
+				setCloseOutputStream(false);
+				setupAndScheduleJob(fileTransferJob);
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferReceiveStartEvent#cancel()
+			 */
+			public void cancel() {
+				AbstractRetrieveFileTransfer.this.cancel();
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see java.lang.Object#toString()
+			 */
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveStartEvent["); //$NON-NLS-1$
+				sb.append("isdone=").append(isDone()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+
+			public Map getResponseHeaders() {
+				return responseHeaders;
+			}
+
+		});
+	}
+
+	protected void fireReceiveResumedEvent() {
+		listener.handleTransferEvent(new IIncomingFileTransferReceiveResumedEvent() {
+
+			private static final long serialVersionUID = 7111739642849612839L;
+
+			public IIncomingFileTransfer getSource() {
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			public IFileID getFileID() {
+				return remoteFileID;
+			}
+
+			public IIncomingFileTransfer receive(File localFileToSave, boolean append) throws IOException {
+				return receive(localFileToSave, null, append);
+			}
+
+			public IIncomingFileTransfer receive(File localFileToSave, FileTransferJob fileTransferJob, boolean append) throws IOException {
+				setOutputStream(new BufferedOutputStream(new FileOutputStream(localFileToSave.getName(), append)));
+				setupAndScheduleJob(fileTransferJob);
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			/**
+			 * @param streamToStore
+			 * @return incoming file transfer instance.
+			 * @throws IOException
+			 *             not thrown in this implementation.
+			 */
+			public IIncomingFileTransfer receive(OutputStream streamToStore) throws IOException {
+				return receive(streamToStore, null);
+			}
+
+			/**
+			 * @throws IOException
+			 *             not actually thrown by this implementation.
+			 */
+			public IIncomingFileTransfer receive(OutputStream streamToStore, FileTransferJob fileTransferJob) throws IOException {
+				setOutputStream(streamToStore);
+				setCloseOutputStream(false);
+				setupAndScheduleJob(fileTransferJob);
+				return AbstractRetrieveFileTransfer.this;
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @seeorg.eclipse.ecf.filetransfer.events.
+			 * IIncomingFileTransferReceiveStartEvent#cancel()
+			 */
+			public void cancel() {
+				hardClose();
+			}
+
+			public String toString() {
+				final StringBuffer sb = new StringBuffer("IIncomingFileTransferReceiveResumedEvent["); //$NON-NLS-1$
+				sb.append("isdone=").append(isDone()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+				sb.append("bytesReceived=").append(bytesReceived) //$NON-NLS-1$
+						.append("]"); //$NON-NLS-1$
+				return sb.toString();
+			}
+
+			public Map getResponseHeaders() {
+				return responseHeaders;
+			}
+
+		});
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getFileRangeSpecification
+	 * ()
+	 */
+	public IFileRangeSpecification getFileRangeSpecification() {
+		return rangeSpecification;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
+	 * sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
+	 * org.eclipse.ecf.filetransfer.IFileRangeSpecification,
+	 * org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	/**
+	 * @throws IncomingFileTransferException  
+	 */
+	public void sendRetrieveRequest(IFileID rFileID, IFileRangeSpecification rangeSpec, IFileTransferListener transferListener, Map ops) throws IncomingFileTransferException {
+		Assert.isNotNull(rFileID, Messages.AbstractRetrieveFileTransfer_RemoteFileID_Not_Null);
+		Assert.isNotNull(transferListener, Messages.AbstractRetrieveFileTransfer_TransferListener_Not_Null);
+		synchronized (jobLock) {
+			this.job = null;
+		}
+		this.remoteFileURL = null;
+		this.remoteFileID = rFileID;
+		this.listener = transferListener;
+		this.remoteFileContents = null;
+		this.localFileContents = null;
+		this.closeOutputStream = true;
+		resetDoneAndException();
+		this.bytesReceived = 0;
+		this.fileLength = -1;
+		this.options = ops;
+		this.paused = false;
+		this.rangeSpecification = rangeSpec;
+
+		try {
+			this.remoteFileURL = rFileID.getURL();
+		} catch (final MalformedURLException e) {
+			setDoneException(e);
+			fireTransferReceiveDoneEvent();
+			return;
+		}
+		try {
+			setupProxies();
+			openStreams();
+		} catch (final IncomingFileTransferException e) {
+			setDoneException(e);
+			fireTransferReceiveDoneEvent();
+		}
+	}
+
+	/**
+	 * Setup ECF proxy. Subclasses must override this method to do appropriate
+	 * proxy setup. This method will be called from within
+	 * {@link #sendRetrieveRequest(IFileID, IFileTransferListener, Map)} and
+	 * {@link #sendRetrieveRequest(IFileID, IFileRangeSpecification, IFileTransferListener, Map)}
+	 * , prior to the actual call to {@link #openStreams()}.
+	 * 
+	 * @param proxy
+	 *            the proxy to be setup. Will not be <code>null</code>.
+	 */
+	protected abstract void setupProxy(Proxy proxy);
+
+	/**
+	 * Select a single proxy from a set of proxies available for the given host.
+	 * This implementation selects in the following manner: 1) If proxies
+	 * provided is null or array of 0 length, null is returned. If only one
+	 * proxy is available (array of length 1) then the entry is returned. If
+	 * proxies provided is length > 1, then if the type of a proxy in the array
+	 * matches the given protocol (e.g. http, https), then the first matching
+	 * proxy is returned. If the protocol does not match any of the proxies,
+	 * then the *first* proxy (i.e. proxies[0]) is returned. Subclasses may
+	 * override if desired.
+	 * 
+	 * @param protocol
+	 *            the target protocol (e.g. http, https, scp, etc). Will not be
+	 *            <code>null</code>.
+	 * @param proxies
+	 *            the proxies to select from. May be <code>null</code> or array
+	 *            of length 0.
+	 * @return proxy data selected from the proxies provided.
+	 */
+	protected IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
+		if (proxies == null || proxies.length == 0)
+			return null;
+		// If only one proxy is available, then use that
+		if (proxies.length == 1)
+			return proxies[0];
+		// If more than one proxy is available, then if http/https protocol then
+		// look for that
+		// one...if not found then use first
+		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
+					return proxies[i];
+			}
+		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
+					return proxies[i];
+			}
+		}
+		// If we haven't found it yet, then return the first one.
+		return proxies[0];
+	}
+
+	protected void setupProxies() {
+		// If it's been set directly (via ECF API) then this overrides platform
+		// settings
+		if (proxy == null) {
+			try {
+				proxy = ProxySetupHelper.getProxy(getRemoteFileURL().toExternalForm());
+			} catch (NoClassDefFoundError e) {
+				// If the proxy API is not available a NoClassDefFoundError will be thrown here.
+				// If that happens then we just want to continue on.
+				Activator.logNoProxyWarning(e);
+			}
+		}
+		if (proxy != null)
+			setupProxy(proxy);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.filetransfer.IIncomingFileTransfer#getRemoteFileName()
+	 */
+	public String getRemoteFileName() {
+		String pathStr = getRemoteFileURL().getPath();
+		if (pathStr.length() > 0) {
+			IPath path = Path.fromPortableString(pathStr);
+			if (path.segmentCount() > 0)
+				return path.lastSegment();
+		}
+		return null;
+	}
+
+	protected boolean targetHasGzSuffix(String target) {
+		if (target == null)
+			return false;
+		if (target.endsWith(".gz")) //$NON-NLS-1$
+			return true;
+		return false;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/HttpHelper.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/HttpHelper.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/HttpHelper.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/HttpHelper.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java
new file mode 100644
index 0000000..1fcf76c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapter.java
@@ -0,0 +1,162 @@
+/****************************************************************************
+ * Copyright (c) 2004, 2007 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.retrieve;
+
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.util.Map;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.ecf.core.identity.IDFactory;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
+import org.eclipse.ecf.filetransfer.IFileTransferListener;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.identity.IFileID;
+import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransfer;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.identity.FileTransferNamespace;
+
+/**
+ * Multi protocol handler for retrieve file transfer. Multiplexes between Apache
+ * httpclient 3.0.1-based file retriever and the URLConnection-based file
+ * retriever.
+ */
+public class MultiProtocolRetrieveAdapter implements IRetrieveFileTransfer {
+
+	IConnectContext connectContext = null;
+	Proxy proxy = null;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#getRetrieveNamespace()
+	 */
+	public Namespace getRetrieveNamespace() {
+		return IDFactory.getDefault().getNamespaceByName(FileTransferNamespace.PROTOCOL);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setConnectContextForAuthentication(org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		this.connectContext = connectContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#setProxy(org.eclipse.ecf.core.util.Proxy)
+	 */
+	public void setProxy(Proxy proxy) {
+		this.proxy = proxy;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
+	 *      org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendRetrieveRequest(IFileID remoteFileID, IFileTransferListener transferListener, Map options) throws IncomingFileTransferException {
+
+		Assert.isNotNull(remoteFileID);
+		Assert.isNotNull(transferListener);
+
+		String protocol = null;
+		try {
+			protocol = remoteFileID.getURI().getScheme();
+		} catch (URISyntaxException e) {
+			try {
+				protocol = remoteFileID.getURL().getProtocol();
+			} catch (final MalformedURLException e1) {
+				throw new IncomingFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
+			}
+		}
+
+		IRetrieveFileTransferContainerAdapter fileTransfer = Activator.getDefault().getFileTransfer(protocol);
+
+		// We will default to JRE-provided file transfer if nothing else
+		// available
+		// for given protocol
+		if (fileTransfer == null)
+			fileTransfer = new UrlConnectionRetrieveFileTransfer();
+
+		// Set connect context
+		fileTransfer.setConnectContextForAuthentication(connectContext);
+		// Set Proxy
+		fileTransfer.setProxy(proxy);
+
+		// send request using given file transfer protocol
+		fileTransfer.sendRetrieveRequest(remoteFileID, transferListener, options);
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#sendRetrieveRequest(org.eclipse.ecf.filetransfer.identity.IFileID,
+	 *      org.eclipse.ecf.filetransfer.IFileRangeSpecification,
+	 *      org.eclipse.ecf.filetransfer.IFileTransferListener, java.util.Map)
+	 */
+	public void sendRetrieveRequest(IFileID remoteFileID, IFileRangeSpecification rangeSpecification, IFileTransferListener transferListener, Map options) throws IncomingFileTransferException {
+		Assert.isNotNull(remoteFileID);
+		Assert.isNotNull(transferListener);
+
+		String protocol = null;
+		try {
+			protocol = remoteFileID.getURI().getScheme();
+		} catch (URISyntaxException e) {
+			try {
+				protocol = remoteFileID.getURL().getProtocol();
+			} catch (final MalformedURLException e1) {
+				throw new IncomingFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
+			}
+		}
+
+		IRetrieveFileTransferContainerAdapter fileTransfer = Activator.getDefault().getFileTransfer(protocol);
+
+		// We will default to JRE-provided file transfer if nothing else
+		// available
+		// for given protocol
+		if (fileTransfer == null)
+			fileTransfer = new UrlConnectionRetrieveFileTransfer();
+
+		// Set connect context
+		fileTransfer.setConnectContextForAuthentication(connectContext);
+		// Set Proxy
+		fileTransfer.setProxy(proxy);
+
+		// send request using given file transfer protocol
+		fileTransfer.sendRetrieveRequest(remoteFileID, rangeSpecification, transferListener, options);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager();
+		if (adapterManager == null)
+			return null;
+		return adapterManager.loadAdapter(this, adapter.getName());
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapterFactory.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapterFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapterFactory.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/MultiProtocolRetrieveAdapterFactory.java
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
new file mode 100644
index 0000000..72e8e10
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
@@ -0,0 +1,553 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: Composent, Inc. - initial API and implementation
+ * 				 Maarten Meijer - bug 237936, added gzip encoded transfer default
+ ******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.retrieve;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.ConnectException;
+import java.net.HttpURLConnection;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ecf.core.security.Callback;
+import org.eclipse.ecf.core.security.CallbackHandler;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.security.NameCallback;
+import org.eclipse.ecf.core.security.ObjectCallback;
+import org.eclipse.ecf.core.security.UnsupportedCallbackException;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.filetransfer.IFileRangeSpecification;
+import org.eclipse.ecf.filetransfer.IFileTransferPausable;
+import org.eclipse.ecf.filetransfer.IRetrieveFileTransferOptions;
+import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
+import org.eclipse.ecf.filetransfer.InvalidFileRangeSpecificationException;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+import org.eclipse.ecf.internal.provider.filetransfer.IURLConnectionModifier;
+import org.eclipse.ecf.internal.provider.filetransfer.Messages;
+import org.eclipse.ecf.provider.filetransfer.util.JREProxyHelper;
+import org.eclipse.osgi.util.NLS;
+
+public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTransfer {
+
+	private static final String USERNAME_PREFIX = Messages.UrlConnectionRetrieveFileTransfer_USERNAME_PROMPT;
+
+	private static final int HTTP_RANGE_RESPONSE = 206;
+
+	private static final int OK_RESPONSE_CODE = 200;
+
+	private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
+
+	// 10/26/2009:  Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.connectTimeout
+	// for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+	private static final String DEFAULT_CONNECT_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.connectTimeout", "15000"); //$NON-NLS-1$ //$NON-NLS-2$
+
+	private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
+
+	protected URLConnection urlConnection;
+
+	protected int httpVersion = 1;
+
+	protected int responseCode = -1;
+
+	private String remoteFileName;
+
+	protected String responseMessage = null;
+
+	private JREProxyHelper proxyHelper = null;
+
+	protected String username = null;
+
+	protected String password = null;
+
+	public UrlConnectionRetrieveFileTransfer() {
+		super();
+		proxyHelper = new JREProxyHelper();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #getRemoteFileName()
+	 */
+	public String getRemoteFileName() {
+		return remoteFileName;
+	}
+
+	protected void connect() throws IOException {
+		setupTimeouts();
+		urlConnection = getRemoteFileURL().openConnection();
+		// set cache to off if using jar protocol
+		// this is for addressing bug
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=235933
+		if (getRemoteFileURL().getProtocol().equalsIgnoreCase("jar")) { //$NON-NLS-1$
+			urlConnection.setUseCaches(false);
+		}
+		IURLConnectionModifier connectionModifier = Activator.getDefault().getURLConnectionModifier();
+		if (connectionModifier != null) {
+			connectionModifier.setSocketFactoryForConnection(urlConnection);
+		}
+	}
+
+	protected boolean isConnected() {
+		return (urlConnection != null);
+	}
+
+	protected void setResumeRequestHeaderValues() throws IOException {
+		if (this.bytesReceived <= 0 || this.fileLength <= this.bytesReceived)
+			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_ERROR);
+		setRangeHeader("bytes=" + this.bytesReceived + "-"); //$NON-NLS-1$ //$NON-NLS-2$
+		// set max-age for cache control to 0 for bug
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
+		urlConnection.setRequestProperty("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
+		setRequestHeaderValuesFromOptions();
+	}
+
+	private void setRequestHeaderValuesFromOptions() {
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			Object o = localOptions.get(IRetrieveFileTransferOptions.REQUEST_HEADERS);
+			if (o != null && o instanceof Map) {
+				Map requestHeaders = (Map) o;
+				for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext();) {
+					Object n = i.next();
+					Object v = requestHeaders.get(n);
+					if (n != null && n instanceof String && v != null && v instanceof String)
+						urlConnection.addRequestProperty((String) n, (String) v);
+				}
+			}
+		}
+	}
+
+	protected void setRequestHeaderValues() throws InvalidFileRangeSpecificationException {
+		final IFileRangeSpecification rangeSpec = getFileRangeSpecification();
+		if (rangeSpec != null && isHTTP()) {
+			final long startPosition = rangeSpec.getStartPosition();
+			final long endPosition = rangeSpec.getEndPosition();
+			if (startPosition < 0)
+				throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_START_POSITION_LESS_THAN_ZERO, rangeSpec);
+			if (endPosition != -1L && endPosition <= startPosition)
+				throw new InvalidFileRangeSpecificationException(Messages.UrlConnectionRetrieveFileTransfer_RESUME_ERROR_END_POSITION_LESS_THAN_START, rangeSpec);
+			setRangeHeader("bytes=" + startPosition + "-" + ((endPosition == -1L) ? "" : ("" + endPosition))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
+		// Add http 1.1 'Connection: close' header in order to potentially avoid
+		// server issue described here
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=234916#c13
+		// See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=247197
+		// also see http 1.1 rfc section 14-10 in
+		// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
+		urlConnection.setRequestProperty("Connection", "close"); //$NON-NLS-1$ //$NON-NLS-2$
+		// set max-age for cache control to 0 for bug
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249990
+		urlConnection.setRequestProperty("Cache-Control", "max-age=0"); //$NON-NLS-1$//$NON-NLS-2$
+		setRequestHeaderValuesFromOptions();
+	}
+
+	private void setRangeHeader(String value) {
+		urlConnection.setRequestProperty("Range", value); //$NON-NLS-1$
+	}
+
+	public int getResponseCode() {
+		if (responseCode != -1)
+			return responseCode;
+		if (isHTTP()) {
+			String response = urlConnection.getHeaderField(0);
+			if (response == null) {
+				responseCode = -1;
+				httpVersion = 1;
+				return responseCode;
+			}
+			if (!response.startsWith("HTTP/")) //$NON-NLS-1$
+				return -1;
+			response = response.trim();
+			final int mark = response.indexOf(" ") + 1; //$NON-NLS-1$
+			if (mark == 0)
+				return -1;
+			if (response.charAt(mark - 2) != '1')
+				httpVersion = 0;
+			int last = mark + 3;
+			if (last > response.length())
+				last = response.length();
+			responseCode = Integer.parseInt(response.substring(mark, last));
+			if (last + 1 <= response.length())
+				responseMessage = response.substring(last + 1);
+		} else {
+			responseCode = OK_RESPONSE_CODE;
+			responseMessage = "OK"; //$NON-NLS-1$
+		}
+
+		return responseCode;
+
+	}
+
+	private boolean isHTTP() {
+		final String protocol = getRemoteFileURL().getProtocol();
+		if (protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) //$NON-NLS-1$ //$NON-NLS-2$
+			return true;
+		return false;
+	}
+
+	private boolean isHTTP11() {
+		return (isHTTP() && httpVersion >= 1);
+	}
+
+	protected void getResponseHeaderValues() throws IOException {
+		if (!isConnected())
+			throw new ConnectException(Messages.UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED);
+		if (getResponseCode() == -1)
+			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_INVALID_SERVER_RESPONSE);
+		setLastModifiedTime(urlConnection.getLastModified());
+		setFileLength(urlConnection.getContentLength());
+
+		String contentDispositionValue = urlConnection.getHeaderField(HttpHelper.CONTENT_DISPOSITION_HEADER);
+		if (contentDispositionValue != null) {
+			remoteFileName = HttpHelper.getRemoteFileNameFromContentDispositionHeader(contentDispositionValue);
+		}
+
+		if (remoteFileName == null) {
+			String pathStr = urlConnection.getURL().getPath();
+			if (pathStr != null) {
+				IPath path = Path.fromPortableString(pathStr);
+				if (path.segmentCount() > 0)
+					remoteFileName = path.lastSegment();
+			}
+			if (remoteFileName == null)
+				remoteFileName = super.getRemoteFileName();
+		}
+	}
+
+	protected void getResumeResponseHeaderValues() throws IOException {
+		if (!isConnected())
+			throw new ConnectException(Messages.UrlConnectionRetrieveFileTransfer_CONNECT_EXCEPTION_NOT_CONNECTED);
+		if (getResponseCode() != HTTP_RANGE_RESPONSE)
+			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_INVALID_SERVER_RESPONSE_TO_PARTIAL_RANGE_REQUEST);
+		if (lastModifiedTime != urlConnection.getLastModified())
+			throw new IOException(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_FILE_MODIFIED_SINCE_LAST_ACCESS);
+	}
+
+	/**
+	 * @param proxy2
+	 *            the ECF proxy to setup
+	 */
+	protected void setupProxy(final Proxy proxy2) {
+		proxyHelper.setupProxy(proxy2);
+	}
+
+	protected void setupAuthentication() throws IOException, UnsupportedCallbackException {
+		if (connectContext == null)
+			return;
+		final CallbackHandler callbackHandler = connectContext.getCallbackHandler();
+		if (callbackHandler == null)
+			return;
+		final NameCallback usernameCallback = new NameCallback(USERNAME_PREFIX);
+		final ObjectCallback passwordCallback = new ObjectCallback();
+		// Call callback with username and password callbacks
+		callbackHandler.handle(new Callback[] {usernameCallback, passwordCallback});
+		username = usernameCallback.getName();
+		Object o = passwordCallback.getObject();
+		if (!(o instanceof String))
+			throw new UnsupportedCallbackException(passwordCallback, Messages.UrlConnectionRetrieveFileTransfer_UnsupportedCallbackException);
+		password = (String) passwordCallback.getObject();
+		// Now set authenticator to our authenticator with user and password
+		Authenticator.setDefault(new UrlConnectionAuthenticator());
+	}
+
+	class UrlConnectionAuthenticator extends Authenticator {
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see java.net.Authenticator#getPasswordAuthentication()
+		 */
+		protected PasswordAuthentication getPasswordAuthentication() {
+			return new PasswordAuthentication(username, password.toCharArray());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter#
+	 * setConnectContextForAuthentication
+	 * (org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void setConnectContextForAuthentication(IConnectContext connectContext) {
+		super.setConnectContextForAuthentication(connectContext);
+		this.username = null;
+		this.password = null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #openStreams()
+	 */
+	protected void openStreams() throws IncomingFileTransferException {
+		int code = -1;
+		try {
+			setupAuthentication();
+			connect();
+			setRequestHeaderValues();
+			// Make actual GET request
+			// need to get response header about encoding before setting stream
+			setCompressionRequestHeader();
+			setInputStream(getDecompressedStream());
+			code = getResponseCode();
+			responseHeaders = getResponseHeaders();
+			if (isHTTP()) {
+				if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
+					fireReceiveStartEvent();
+				} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+					throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), code, responseHeaders); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+					throw new IncomingFileTransferException("Unauthorized", code, responseHeaders); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+					throw new IncomingFileTransferException("Forbidden", code, responseHeaders); //$NON-NLS-1$
+				} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+					throw new IncomingFileTransferException("Proxy authentication required", code, responseHeaders); //$NON-NLS-1$
+				} else {
+					throw new IncomingFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code, responseHeaders); //$NON-NLS-1$
+				}
+			} else {
+				fireReceiveStartEvent();
+			}
+		} catch (final FileNotFoundException e) {
+			throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), 404); //$NON-NLS-1$
+		} catch (final Exception e) {
+			IncomingFileTransferException except = (e instanceof IncomingFileTransferException) ? (IncomingFileTransferException) e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, getRemoteFileURL().toString()), e, code, responseHeaders);
+			hardClose();
+			throw except;
+		}
+	}
+
+	private Map getResponseHeaders() {
+		if (responseHeaders != null)
+			return responseHeaders;
+		if (urlConnection == null)
+			return null;
+		Map headerFields = urlConnection.getHeaderFields();
+		if (headerFields == null)
+			return null;
+		Map result = new HashMap();
+		for (Iterator i = headerFields.keySet().iterator(); i.hasNext();) {
+			String name = (String) i.next();
+			List listValue = (List) headerFields.get(name);
+			String val = null;
+			if (listValue != null && listValue.size() > 0) {
+				val = (String) ((listValue.size() > 1) ? listValue.get(listValue.size() - 1) : listValue.get(0));
+			}
+			if (name != null && val != null)
+				result.put(name, val);
+		}
+		return Collections.unmodifiableMap(result);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #hardClose()
+	 */
+	protected void hardClose() {
+		super.hardClose();
+		urlConnection = null;
+		responseCode = -1;
+		if (proxyHelper != null) {
+			proxyHelper.dispose();
+			proxyHelper = null;
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #doPause()
+	 */
+	protected boolean doPause() {
+		if (isPaused() || !isConnected() || isDone())
+			return false;
+		this.paused = true;
+		return this.paused;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #doResume()
+	 */
+	protected boolean doResume() {
+		if (!isPaused() || isConnected())
+			return false;
+		return openStreamsForResume();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
+	 * #getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == null)
+			return null;
+		if (adapter.equals(IFileTransferPausable.class) && isHTTP11())
+			return this;
+		return super.getAdapter(adapter);
+	}
+
+	protected String getConnectTimeout() {
+		String result = DEFAULT_CONNECT_TIMEOUT;
+		Map localOptions = getOptions();
+		if (localOptions != null) {
+			// See if the connect timeout option is present, if so set
+			Object o = localOptions.get(IRetrieveFileTransferOptions.CONNECT_TIMEOUT);
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).toString();
+				} else if (o instanceof String) {
+					result = (String) o;
+				}
+				return result;
+			}
+			o = localOptions.get("org.eclipse.ecf.provider.filetransfer.httpclient.retrieve.connectTimeout"); //$NON-NLS-1$
+			if (o != null) {
+				if (o instanceof Integer) {
+					result = ((Integer) o).toString();
+				} else if (o instanceof String) {
+					result = (String) o;
+				}
+			}
+		}
+		return result;
+	}
+
+	private void setupTimeouts() {
+		String existingTimeout = System.getProperty(JRE_CONNECT_TIMEOUT_PROPERTY);
+		if (existingTimeout == null) {
+			System.setProperty(JRE_CONNECT_TIMEOUT_PROPERTY, getConnectTimeout());
+		}
+		existingTimeout = System.getProperty(JRE_READ_TIMEOUT_PROPERTY);
+		if (existingTimeout == null) {
+			System.setProperty(JRE_READ_TIMEOUT_PROPERTY, "" + getSocketReadTimeout()); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * @return <code>true</code> if streams successfully, <code>false</code>
+	 *         otherwise.
+	 */
+	private boolean openStreamsForResume() {
+		final URL theURL = getRemoteFileURL();
+		int code = -1;
+		try {
+			remoteFileURL = new URL(theURL.toString());
+			setupAuthentication();
+			connect();
+			setResumeRequestHeaderValues();
+			// Make actual GET request
+			setInputStream(urlConnection.getInputStream());
+			code = getResponseCode();
+			responseHeaders = getResponseHeaders();
+			if (code == HttpURLConnection.HTTP_PARTIAL || code == HttpURLConnection.HTTP_OK) {
+				getResumeResponseHeaderValues();
+				this.paused = false;
+				fireReceiveResumedEvent();
+				return true;
+			} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
+				throw new IncomingFileTransferException(NLS.bind("File not found: {0}", getRemoteFileURL().toString()), code, responseHeaders); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_UNAUTHORIZED) {
+				throw new IncomingFileTransferException("Unauthorized", code, responseHeaders); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_FORBIDDEN) {
+				throw new IncomingFileTransferException("Forbidden", code, responseHeaders); //$NON-NLS-1$
+			} else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
+				throw new IncomingFileTransferException("Proxy authentication required", code, responseHeaders); //$NON-NLS-1$
+			} else {
+				throw new IncomingFileTransferException(NLS.bind("General connection error with response code={0}", new Integer(code)), code, responseHeaders); //$NON-NLS-1$
+			}
+		} catch (final Exception e) {
+			this.exception = (e instanceof IncomingFileTransferException) ? e : new IncomingFileTransferException(NLS.bind(Messages.UrlConnectionRetrieveFileTransfer_EXCEPTION_COULD_NOT_CONNECT, getRemoteFileURL().toString()), e, code, responseHeaders);
+			this.done = true;
+			hardClose();
+			fireTransferReceiveDoneEvent();
+			return false;
+		}
+	}
+
+	private static final String ACCEPT_ENCODING = "Accept-encoding"; //$NON-NLS-1$
+	private static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
+
+	private static final String CONTENT_ENCODING_ACCEPTED = CONTENT_ENCODING_GZIP; // +
+
+	private static class Compression {
+
+		private String type;
+
+		private Compression(String i) {
+			this.type = i;
+		}
+
+		static Compression NONE = new Compression("none"); //$NON-NLS-1$
+
+		static Compression GZIP = new Compression("gzip"); //$NON-NLS-1$
+
+		public String toString() {
+			return type;
+		}
+	}
+
+	private void setCompressionRequestHeader() {
+		// Set request header for possible gzip encoding, but only if
+		// 1) The file range specification is null (we want the whole file)
+		// 2) The target remote file does *not* end in .gz (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280205)
+		if (getFileRangeSpecification() == null && !targetHasGzSuffix(super.getRemoteFileName()))
+			urlConnection.setRequestProperty(ACCEPT_ENCODING, CONTENT_ENCODING_ACCEPTED);
+	}
+
+	private Compression getCompressionResponseHeader() {
+		String encoding = urlConnection.getContentEncoding();
+		if (null == encoding) {
+			return Compression.NONE;
+			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=269018
+		} else if (encoding.equalsIgnoreCase(CONTENT_ENCODING_GZIP) && !targetHasGzSuffix(remoteFileName)) {
+			return Compression.GZIP;
+		}
+		return Compression.NONE;
+	}
+
+	private InputStream getDecompressedStream() throws IOException {
+		InputStream input = urlConnection.getInputStream();
+		getResponseHeaderValues();
+		Compression type = getCompressionResponseHeader();
+
+		if (Compression.GZIP == type) {
+			return new java.util.zip.GZIPInputStream(input);
+			// } else if (Compression.DEFLATE == type) {
+			// return new java.util.zip.InflaterInputStream(input);
+		}
+		return input;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java
new file mode 100644
index 0000000..3d7414e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/JREProxyHelper.java
@@ -0,0 +1,90 @@
+/****************************************************************************
+ * Copyright (c) 2007, 2010 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *    Henrich Kraemer - bug 295030, Update Manager doesn't work with SOCKS proxy  
+ *****************************************************************************/
+
+package org.eclipse.ecf.provider.filetransfer.util;
+
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.util.Properties;
+import org.eclipse.ecf.core.util.Proxy;
+
+/**
+ * Helper class for setting the JRE proxy value (http and socks).
+ */
+public class JREProxyHelper {
+
+	private static final String SOCKS_PROXY_PORT_SYSTEM_PROPERTY = "socksProxyPort"; //$NON-NLS-1$
+
+	private static final String SOCKS_PROXY_HOST_SYSTEM_PROPERTY = "socksProxyHost"; //$NON-NLS-1$
+
+	private static final String HTTP_PROXY_PORT_SYSTEM_PROPERTY = "http.proxyPort"; //$NON-NLS-1$
+
+	private static final String HTTP_PROXY_HOST_SYSTEM_PROPERTY = "http.proxyHost"; //$NON-NLS-1$
+
+	private String proxyHostProperty;
+	private String proxyPortProperty;
+
+	private String oldHost;
+	private String oldPort;
+
+	public void setupProxy(final Proxy proxy2) {
+		Properties systemProperties = System.getProperties();
+		proxyHostProperty = (proxy2.getType().equals(Proxy.Type.HTTP)) ? HTTP_PROXY_HOST_SYSTEM_PROPERTY : SOCKS_PROXY_HOST_SYSTEM_PROPERTY;
+		proxyPortProperty = (proxy2.getType().equals(Proxy.Type.HTTP)) ? HTTP_PROXY_PORT_SYSTEM_PROPERTY : SOCKS_PROXY_PORT_SYSTEM_PROPERTY;
+		oldHost = systemProperties.getProperty(proxyHostProperty);
+		if (oldHost != null) {
+			oldPort = systemProperties.getProperty(proxyPortProperty);
+		}
+		systemProperties.setProperty(proxyHostProperty, proxy2.getAddress().getHostName());
+		int proxyPort = proxy2.getAddress().getPort();
+		if (proxyPort != -1)
+			systemProperties.setProperty(proxyPortProperty, proxyPort + ""); //$NON-NLS-1$
+		final String username = proxy2.getUsername();
+		boolean setAuthenticator = false;
+		if (username != null && !username.equals("")) { //$NON-NLS-1$
+			final String password = (proxy2.getPassword() == null) ? "" : proxy2.getPassword(); //$NON-NLS-1$
+			if (proxy2.hasCredentials()) {
+				Authenticator.setDefault(new Authenticator() {
+					/* (non-Javadoc)
+					 * @see java.net.Authenticator#getPasswordAuthentication()
+					 */
+					protected PasswordAuthentication getPasswordAuthentication() {
+						return new PasswordAuthentication(username, password.toCharArray());
+					}
+				});
+				setAuthenticator = true;
+			}
+		}
+		if (!setAuthenticator) {
+			Authenticator.setDefault(new Authenticator() {
+				/* (non-Javadoc)
+				 * @see java.net.Authenticator#getPasswordAuthentication()
+				 */
+				protected PasswordAuthentication getPasswordAuthentication() {
+					return null;
+				}
+			});
+		}
+	}
+
+	public void dispose() {
+		// reset old values
+		if (oldHost != null) {
+			System.getProperties().setProperty(proxyHostProperty, oldHost);
+			oldHost = null;
+			if (oldPort != null) {
+				System.getProperties().setProperty(proxyPortProperty, oldPort);
+				oldPort = null;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java
new file mode 100644
index 0000000..a66ba05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/PollingInputStream.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - modification after copying to ECF filetransfer provider
+ *******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.util;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InterruptedIOException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+
+/**
+ * Polls a progress monitor periodically and handles timeouts over extended
+ * durations. For this class to be effective, a high numAttempts should be
+ * specified, and the underlying stream should time out frequently on reads
+ * (every second or so).
+ * 
+ * Supports resuming partially completed operations after an
+ * InterruptedIOException if the underlying stream does. Check the
+ * bytesTransferred field to determine how much of the operation completed;
+ * conversely, at what point to resume.
+ * 
+ * @since 3.0
+ */
+public class PollingInputStream extends FilterInputStream {
+	private int numAttempts;
+	private IProgressMonitor monitor;
+	private boolean cancellable;
+
+	private String readTimeoutMessage = "Timeout while reading input stream"; //$NON-NLS-1$
+	private String closeTimeoutMessage = "Timeout while closing input stream"; //$NON-NLS-1$
+
+	/**
+	 * Creates a new polling input stream.
+	 * 
+	 * @param in
+	 *            the underlying input stream
+	 * @param numAttempts
+	 *            the number of attempts before issuing an
+	 *            InterruptedIOException, if 0, retries indefinitely until
+	 *            canceled
+	 * @param monitor
+	 *            the progress monitor to be polled for cancellation
+	 */
+	public PollingInputStream(InputStream in, int numAttempts, IProgressMonitor monitor) {
+		super(in);
+		this.numAttempts = numAttempts;
+		this.monitor = monitor;
+		this.cancellable = true;
+	}
+
+	/**
+	 * Creates a new polling input stream.
+	 * 
+	 * @param in
+	 *            the underlying input stream
+	 * @param numAttempts
+	 *            the number of attempts before issuing an
+	 *            InterruptedIOException, if 0, retries indefinitely until
+	 *            canceled
+	 * @param monitor
+	 *            the progress monitor to be polled for cancellation
+	 * @param readTimeoutMessage message to go with InteruptedIOException if read timeout
+	 * @param closeTimeoutMessage message to go with InteruptedIOException if close timeout
+	 * @since 3.1
+	 */
+	public PollingInputStream(InputStream in, int numAttempts, IProgressMonitor monitor, String readTimeoutMessage, String closeTimeoutMessage) {
+		super(in);
+		this.numAttempts = numAttempts;
+		this.monitor = monitor;
+		this.cancellable = true;
+		if (readTimeoutMessage != null)
+			this.readTimeoutMessage = readTimeoutMessage;
+		if (closeTimeoutMessage != null)
+			this.closeTimeoutMessage = closeTimeoutMessage;
+	}
+
+	/**
+	 * Wraps the underlying stream's method. It may be important to wait for an
+	 * input stream to be closed because it holds an implicit lock on a system
+	 * resource (such as a file) while it is open. Closing a stream may take
+	 * time if the underlying stream is still servicing a previous request.
+	 * 
+	 * @throws OperationCanceledException
+	 *             if the progress monitor is canceled
+	 * @throws InterruptedIOException
+	 *             if the underlying operation times out numAttempts times
+	 */
+	public void close() throws InterruptedIOException {
+		int attempts = 0;
+		try {
+			readPendingInput();
+		} catch (IOException e) {
+			// We shouldn't get an exception when we're getting the available
+			// input.
+			// If we do, just log it so we can close.
+			logError(e.getMessage(), e);
+		} finally {
+			boolean stop = false;
+			while (!stop) {
+				try {
+					if (in != null)
+						in.close();
+					stop = true;
+				} catch (InterruptedIOException e) {
+					if (checkCancellation())
+						throw new OperationCanceledException();
+					if (++attempts == numAttempts)
+						throw new InterruptedIOException(closeTimeoutMessage);
+				} catch (IOException e) {
+					// ignore it - see
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=203423#c10
+				}
+			}
+		}
+	}
+
+	private void logError(String message, IOException e) {
+		Activator a = Activator.getDefault();
+		if (a != null)
+			a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, message, e));
+	}
+
+	/**
+	 * Wraps the underlying stream's method.
+	 * 
+	 * @return the next byte of data, or -1 if the end of the stream is reached.
+	 * @throws OperationCanceledException
+	 *             if the progress monitor is canceled
+	 * @throws InterruptedIOException
+	 *             if the underlying operation times out numAttempts times and
+	 *             no data was received, bytesTransferred will be zero
+	 * @throws IOException
+	 *             if an i/o error occurs
+	 */
+	public int read() throws IOException {
+		int attempts = 0;
+		for (;;) {
+			if (checkCancellation())
+				throw new OperationCanceledException();
+			try {
+				return in.read();
+			} catch (InterruptedIOException e) {
+				if (++attempts == numAttempts)
+					throw new InterruptedIOException(readTimeoutMessage);
+			}
+		}
+	}
+
+	/**
+	 * Wraps the underlying stream's method.
+	 * 
+	 * @param buffer
+	 *            - the buffer into which the data is read.
+	 * @param off
+	 *            - the start offset of the data.
+	 * @param len
+	 *            - the maximum number of bytes read.
+	 * @return the total number of bytes read into the buffer, or -1 if there is
+	 *         no more data because the end of the stream has been reached.
+	 * @throws OperationCanceledException
+	 *             if the progress monitor is canceled
+	 * @throws InterruptedIOException
+	 *             if the underlying operation times out numAttempts times and
+	 *             no data was received, bytesTransferred will be zero
+	 * @throws IOException
+	 *             if an i/o error occurs
+	 */
+	public int read(byte[] buffer, int off, int len) throws IOException {
+		int attempts = 0;
+		for (;;) {
+			if (checkCancellation())
+				throw new OperationCanceledException();
+			try {
+				return in.read(buffer, off, len);
+			} catch (InterruptedIOException e) {
+				if (e.bytesTransferred != 0)
+					return e.bytesTransferred; // keep partial transfer
+				if (++attempts == numAttempts)
+					throw new InterruptedIOException(readTimeoutMessage);
+			}
+		}
+	}
+
+	/**
+	 * Wraps the underlying stream's method.
+	 * 
+	 * @param count
+	 *            - the number of bytes to be skipped.
+	 * @return the actual number of bytes skipped.
+	 * @throws OperationCanceledException
+	 *             if the progress monitor is canceled
+	 * @throws InterruptedIOException
+	 *             if the underlying operation times out numAttempts times and
+	 *             no data was received, bytesTransferred will be zero
+	 * @throws IOException
+	 *             if an i/o error occurs
+	 */
+	public long skip(long count) throws IOException {
+		int attempts = 0;
+		for (;;) {
+			if (checkCancellation())
+				throw new OperationCanceledException();
+			try {
+				return in.skip(count);
+			} catch (InterruptedIOException e) {
+				if (e.bytesTransferred != 0)
+					return e.bytesTransferred; // keep partial transfer
+				if (++attempts == numAttempts)
+					throw new InterruptedIOException(readTimeoutMessage);
+			}
+		}
+	}
+
+	/**
+	 * Reads any pending input from the input stream so that the stream can
+	 * savely be closed.
+	 */
+	protected void readPendingInput() throws IOException {
+		byte[] buffer = new byte[2048];
+		while (true) {
+			int available = in.available();
+			if (available < 1)
+				break;
+			if (available > buffer.length)
+				available = buffer.length;
+			if (in.read(buffer, 0, available) < 1)
+				break;
+		}
+	}
+
+	/**
+	 * Called to set whether cancellation will be checked by this stream.
+	 * Turning cancellation checking off can be very useful for protecting
+	 * critical portions of a protocol that shouldn't be interrupted. For
+	 * example, it is often necessary to protect login sequences.
+	 * 
+	 * @param cancellable
+	 *            a flag controlling whether this stream will check for
+	 *            cancellation.
+	 */
+	public void setIsCancellable(boolean cancellable) {
+		this.cancellable = cancellable;
+	}
+
+	/**
+	 * Checked whether the monitor for this stream has been cancelled. If the
+	 * cancellable flag is <code>false</code> then the monitor is never
+	 * cancelled.
+	 * 
+	 * @return <code>true</code> if the monitor has been cancelled and
+	 *         <code>false</code> otherwise.
+	 */
+	private boolean checkCancellation() {
+		if (cancellable) {
+			return monitor.isCanceled();
+		}
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java
new file mode 100644
index 0000000..680b029
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/ProxySetupHelper.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+* Copyright (c) 2010 IBM, and others. 
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM Corporation - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.provider.filetransfer.util;
+
+import java.net.URI;
+import java.net.URL;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.ecf.core.util.Proxy;
+import org.eclipse.ecf.core.util.ProxyAddress;
+import org.eclipse.ecf.internal.provider.filetransfer.Activator;
+
+/**
+ * Proxy setup utilities.  
+ *
+ * NOTE:  Use of this class implies the presence of the core.net.proxy
+ * API...this class will not load (NoClassDefFoundError will be thrown if load/use is attempted)
+ * if the core.net.proxy bundle is not present in the runtime.  
+ * 
+ * @noextend This class is not intended to be extended by clients.
+ * @since 3.1
+ */
+public class ProxySetupHelper {
+	public static Proxy getProxy(String url) {
+		Proxy proxy = null;
+		try {
+			IProxyService proxyService = Activator.getDefault().getProxyService();
+			// Only do this if platform service exists
+			if (proxyService != null && proxyService.isProxiesEnabled()) {
+				// Setup via proxyService entry
+				URI uri = new URI(url);
+				final IProxyData[] proxies = proxyService.select(uri);
+				IProxyData selectedProxy = selectProxyFromProxies(uri.getScheme(), proxies);
+				if (selectedProxy != null) {
+					proxy = new Proxy(((selectedProxy.getType().equalsIgnoreCase(IProxyData.SOCKS_PROXY_TYPE)) ? Proxy.Type.SOCKS : Proxy.Type.HTTP), new ProxyAddress(selectedProxy.getHost(), selectedProxy.getPort()), selectedProxy.getUserId(), selectedProxy.getPassword());
+				}
+			}
+		} catch (Exception e) {
+			// If we don't even have the classes for this (i.e. the org.eclipse.core.net plugin not available)
+			// then we simply log and ignore
+			Activator.logNoProxyWarning(e);
+		} catch (NoClassDefFoundError e) {
+			Activator.logNoProxyWarning(e);
+		}
+		return proxy;
+	}
+
+	public static Proxy getSocksProxy(URL url) {
+		String host = url.getHost();
+		int port = url.getPort();
+		String strURL = IProxyData.SOCKS_PROXY_TYPE + "://" + host; //$NON-NLS-1$
+		if (port != -1) {
+			strURL += ":" + port; //$NON-NLS-1$
+		}
+		return ProxySetupHelper.getProxy(strURL);
+	}
+
+	/**
+	 * Select a single proxy from a set of proxies available for the given host.  This implementation
+	 * selects in the following manner:  1) If proxies provided is null or array of 0 length, null 
+	 * is returned.  If only one proxy is available (array of length 1) then the entry is returned.
+	 * If proxies provided is length > 1, then if the type of a proxy in the array matches the given
+	 * protocol (e.g. http, https), then the first matching proxy is returned.  If the protocol does
+	 * not match any of the proxies, then the *first* proxy (i.e. proxies[0]) is returned.  
+	 * 
+	 * @param protocol the target protocol (e.g. http, https, scp, etc).  Will not be <code>null</code>.
+	 * @param proxies the proxies to select from.  May be <code>null</code> or array of length 0.
+	 * @return proxy data selected from the proxies provided.  
+	 */
+	public static IProxyData selectProxyFromProxies(String protocol, IProxyData[] proxies) {
+		if (proxies == null || proxies.length == 0)
+			return null;
+		// If only one proxy is available, then use that
+		if (proxies.length == 1)
+			return proxies[0];
+		// If more than one proxy is available, then if http/https protocol then look for that
+		// one...if not found then use first
+		if (protocol.equalsIgnoreCase("http")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTP_PROXY_TYPE))
+					return proxies[i];
+			}
+		} else if (protocol.equalsIgnoreCase("https")) { //$NON-NLS-1$
+			for (int i = 0; i < proxies.length; i++) {
+				if (proxies[i].getType().equals(IProxyData.HTTPS_PROXY_TYPE))
+					return proxies[i];
+			}
+		}
+		// If we haven't found it yet, then return the first one.
+		return proxies[0];
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/TimeoutInputStream.java b/eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/TimeoutInputStream.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/TimeoutInputStream.java
rename to eclipse/plugins/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/util/TimeoutInputStream.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath b/eclipse/plugins/org.eclipse.ecf.ssl/.classpath
similarity index 100%
copy from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath
copy to eclipse/plugins/org.eclipse.ecf.ssl/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf.ssl/.gitignore b/eclipse/plugins/org.eclipse.ecf.ssl/.gitignore
new file mode 100644
index 0000000..e660fd9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.ssl/.gitignore
@@ -0,0 +1 @@
+bin/
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.project b/eclipse/plugins/org.eclipse.ecf.ssl/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/.project
rename to eclipse/plugins/org.eclipse.ecf.ssl/.project
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.core.prefs
rename to eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..d9e7782
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:17:51 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.settings/org.eclipse.pde.prefs
rename to eclipse/plugins/org.eclipse.ecf.ssl/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c58da91
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.ssl/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf.ssl
+Bundle-Version: 1.0.100.qualifier
+Fragment-Host: org.eclipse.ecf
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Import-Package: javax.net,
+ javax.net.ssl,
+ org.eclipse.osgi.service.security
+Bundle-Localization: plugin
+Export-Package: org.eclipse.ecf.internal.ssl;x-internal:=true
+Bundle-Vendor: %plugin.provider
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/about.html b/eclipse/plugins/org.eclipse.ecf.ssl/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/about.html
rename to eclipse/plugins/org.eclipse.ecf.ssl/about.html
diff --git a/eclipse/plugins/org.eclipse.ecf.ssl/build.properties b/eclipse/plugins/org.eclipse.ecf.ssl/build.properties
new file mode 100644
index 0000000..cdd2db7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf.ssl/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties
+src.includes = about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/plugin.properties b/eclipse/plugins/org.eclipse.ecf.ssl/plugin.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/plugin.properties
rename to eclipse/plugins/org.eclipse.ecf.ssl/plugin.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFCertificateException.java b/eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFCertificateException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFCertificateException.java
rename to eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFCertificateException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFSSLSocketFactory.java b/eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFSSLSocketFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFSSLSocketFactory.java
rename to eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFSSLSocketFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFTrustManager.java b/eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFTrustManager.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFTrustManager.java
rename to eclipse/plugins/org.eclipse.ecf.ssl/src/org/eclipse/ecf/internal/ssl/ECFTrustManager.java
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/.classpath b/eclipse/plugins/org.eclipse.ecf/.classpath
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.tools/.classpath
rename to eclipse/plugins/org.eclipse.ecf/.classpath
diff --git a/eclipse/plugins/org.eclipse.ecf/.gitignore b/eclipse/plugins/org.eclipse.ecf/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.options b/eclipse/plugins/org.eclipse.ecf/.options
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.options
rename to eclipse/plugins/org.eclipse.ecf/.options
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.project b/eclipse/plugins/org.eclipse.ecf/.project
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.project
rename to eclipse/plugins/org.eclipse.ecf/.project
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.core.prefs
rename to eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.launching.prefs
rename to eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/.settings/org.eclipse.jdt.ui.prefs
rename to eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..4124dae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Sep 01 15:13:41 PDT 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.pde.prefs
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer/.settings/org.eclipse.pde.prefs
rename to eclipse/plugins/org.eclipse.ecf/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/plugins/org.eclipse.ecf/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ecf/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..3864e4d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-Name: %plugin.name
+Bundle-SymbolicName: org.eclipse.ecf;singleton:=true
+Bundle-Version: 3.1.200.qualifier
+Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin
+Bundle-Vendor: %plugin.provider
+Bundle-Localization: plugin
+Eclipse-LazyStart: true
+Bundle-ManifestVersion: 2
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
+Export-Package: org.eclipse.ecf.core;version="3.0.0",
+ org.eclipse.ecf.core.events,
+ org.eclipse.ecf.core.jobs;version="1.0";x-internal:=true,
+ org.eclipse.ecf.core.provider,
+ org.eclipse.ecf.core.security,
+ org.eclipse.ecf.core.start,
+ org.eclipse.ecf.core.status;version="1.0";x-internal:=true,
+ org.eclipse.ecf.core.user,
+ org.eclipse.ecf.core.util,
+ org.eclipse.ecf.internal.core;x-internal:=true
+Import-Package: org.eclipse.core.runtime.jobs,
+ org.eclipse.equinox.concurrent.future;version="1.0.0";resolution:=optional,
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.log;version="1.3.0",
+ org.osgi.util.tracker;version="1.3.2"
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.equinox.registry,
+ org.eclipse.ecf.identity;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/ecf-src/org.eclipse.ecf/about.html b/eclipse/plugins/org.eclipse.ecf/about.html
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/about.html
rename to eclipse/plugins/org.eclipse.ecf/about.html
diff --git a/eclipse/ecf-src/org.eclipse.ecf/about.ini b/eclipse/plugins/org.eclipse.ecf/about.ini
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/about.ini
rename to eclipse/plugins/org.eclipse.ecf/about.ini
diff --git a/eclipse/ecf-src/org.eclipse.ecf/about.properties b/eclipse/plugins/org.eclipse.ecf/about.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/about.properties
rename to eclipse/plugins/org.eclipse.ecf/about.properties
diff --git a/eclipse/plugins/org.eclipse.ecf/buckminster.cspex b/eclipse/plugins/org.eclipse.ecf/buckminster.cspex
new file mode 100644
index 0000000..b5ff4ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/buckminster.cspex
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<cspecExtension
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
+	xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
+	<dependencies>
+	</dependencies>
+	<generators>
+		<!-- Place your Generators here -->
+	</generators>
+	<artifacts>
+		<!-- Place your Artifacts here -->
+	</artifacts>
+	<actions>
+		<public name="create.javadoc" actor="ant">
+			<actorProperties>
+				<property key="buildFile" value="javadoc.xml" />
+				<property key="targets" value="javadoc" />
+			</actorProperties>
+			<properties>
+				<property key="source" value="${projectsPath}" />
+				<property key="output" value="${javadoc.output}" />
+				<property key="target" value="${targetPlatformPath}" />
+			</properties>
+		</public>	
+	</actions>
+	<groups>
+		<!-- Place your Groups here -->
+	</groups>
+	<alterDependencies>
+		<!-- Place your Dependencies alterations here -->
+	</alterDependencies>
+	<alterArtifacts>
+		<!-- Place your Artifact alterations here -->
+	</alterArtifacts>
+	<alterActions>
+		<!-- Place your Action alterations here -->
+	</alterActions>
+	<alterGroups>
+		<!-- Place your Group alterations here -->
+	</alterGroups>
+</cspecExtension>
diff --git a/eclipse/plugins/org.eclipse.ecf/build.properties b/eclipse/plugins/org.eclipse.ecf/build.properties
new file mode 100644
index 0000000..1d5a543
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/build.properties
@@ -0,0 +1,26 @@
+###############################################################################
+# Copyright (c) 2004, 2006. Composent, Inc. and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Composent Inc. - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               plugin.properties,\
+               schema/,\
+               about.properties,\
+               ecf32.png,\
+               about.ini
+src.includes = about.html,\
+               schema/,\
+               about.properties,\
+               about.ini
+jre.compilation.profile = J2SE-1.4
diff --git a/eclipse/ecf-src/org.eclipse.ecf/dev.properties b/eclipse/plugins/org.eclipse.ecf/dev.properties
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/dev.properties
rename to eclipse/plugins/org.eclipse.ecf/dev.properties
diff --git a/eclipse/ecf-src/org.eclipse.ecf/ecf32.png b/eclipse/plugins/org.eclipse.ecf/ecf32.png
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/ecf32.png
rename to eclipse/plugins/org.eclipse.ecf/ecf32.png
diff --git a/eclipse/plugins/org.eclipse.ecf/javadoc.xml b/eclipse/plugins/org.eclipse.ecf/javadoc.xml
new file mode 100644
index 0000000..fed9d0c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/javadoc.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project default="javadoc">
+	
+	<path id="files.classpath">
+		<fileset dir="${target}/">
+			<filename name="**/*.jar" />
+		</fileset>
+	</path>
+	
+    <target name="javadoc">
+    	<echo message="${target}"/>
+    	<echo message="${source}"/>
+       	<echo message="${output}"/>
+        <javadoc access="protected" additionalparam="-J-Xmx512m  -tag model:a:Model -tag generated:a:Generated -tag noreference:tcmf:DoNotReference -tag ordered:a:Ordered -tag noimplement:a:NoImplement -tag noextend:a:NoExtend -tag ThreadSafe -tag Immutable " 
+        	author="false" 
+        	classpathref="files.classpath" 
+        	destdir="${output}" 
+        	doctitle="Eclipse Communication Framework (ECF) 3.4.0" 
+        	nodeprecated="false" 
+        	nodeprecatedlist="false" 
+        	noindex="false" 
+        	nonavbar="false" 
+        	notree="false" 
+        	source="1.5" 
+        	splitindex="true" 
+        	use="true" 
+        	version="true">
+        	
+        	<fileset dir="${source}" defaultexcludes="true">
+	        	<include name="**/*.java"/>
+	        	<exclude name="**/util/**"/>
+	        	<exclude name="**/ui/**"/>
+	        	<exclude name="**/provider/**"/>
+	        	<exclude name="**/smack/**"/>
+	        	<exclude name="**/incubation/**"/>
+	        	<exclude name="**/internal/**"/>
+	        	<exclude name="**/ch/**"/>
+	        	<exclude name="**/jmdns/**"/>
+	        	<exclude name="**/tests/**"/>
+        	</fileset>
+    	</javadoc>
+    </target>
+</project>
diff --git a/eclipse/plugins/org.eclipse.ecf/plugin.properties b/eclipse/plugins/org.eclipse.ecf/plugin.properties
new file mode 100644
index 0000000..b019fea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/plugin.properties
@@ -0,0 +1,10 @@
+############################################################################
+# Copyright (c) 2010 Composent Inc., IBM and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+############################################################################
+plugin.name=ECF Core API
+plugin.provider=Eclipse.org - ECF
diff --git a/eclipse/plugins/org.eclipse.ecf/plugin.xml b/eclipse/plugins/org.eclipse.ecf/plugin.xml
new file mode 100644
index 0000000..ec04495
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.1"?>
+<plugin>
+   <extension-point id="containerFactory" name="ECF Container Factory" schema="schema/containerFactory.exsd"/>
+   <extension-point id="start" name="ECF start" schema="schema/start.exsd"/>
+   <extension-point id="container" name="ECF container" schema="schema/container.exsd"/>
+   <extension
+         point="org.eclipse.ecf.containerFactory">
+      <containerFactory
+            class="org.eclipse.ecf.core.BaseContainer$Instantiator"
+            description="ECF Base Container"
+            name="ecf.base">
+      </containerFactory>
+   </extension>
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.ecf/schema/container.exsd b/eclipse/plugins/org.eclipse.ecf/schema/container.exsd
new file mode 100644
index 0000000..c424608
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/schema/container.exsd
@@ -0,0 +1,174 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ecf" id="container" name="container"/>
+      </appInfo>
+      <documentation>
+         This extension point allows extensions to specify the creation of a container instance of a given type.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="container" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="container">
+      <annotation>
+         <documentation>
+            The container extension point.  Extensions may define new containers created upon ECF core initialization.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="0" maxOccurs="1">
+            <element ref="parameter" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="factoryName" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The required containerFactoryName (e.g. ecf.generic.client or ecf.r_osgi.peer) that defines the type of container to create.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="containerId" type="string">
+            <annotation>
+               <documentation>
+                  Optional containerId that defines the id for the new container instance.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="parameter">
+      <annotation>
+         <documentation>
+            Parameter for container instance creation.  The name value pairs defined by the parameter element name and value attributes are added to a Map that is then passed to the container factory instance creation.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name for the container parameter.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The value for the container parameter.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         ECF core bundle v 3.1.0.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <pre>
+   <extension
+         point="org.eclipse.ecf.container">
+      <container
+            containerId="foo1"
+            factoryName="ecf.generic.client">
+         <parameter
+               name="name1"
+               value="value1">
+         </parameter>
+         <parameter
+               name="name2"
+               value="value2">
+         </parameter>
+      </container>
+      <container
+            containerId="adfasdf"
+            factoryName="bogus.factory.name">
+      </container>
+      <container
+            containerId="ecftcp://localhost:32111/server"
+            factoryName="ecf.generic.server">
+      </container>
+      <container
+            factoryName="ecf.generic.client">
+      </container>
+   </extension>
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         No API available.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The ECF core v3.1.0 bundle supplies the implementation of this extension point.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 Composent, Inc. and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation.
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.ecf/schema/containerFactory.exsd b/eclipse/plugins/org.eclipse.ecf/schema/containerFactory.exsd
new file mode 100644
index 0000000..95a1091
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/schema/containerFactory.exsd
@@ -0,0 +1,312 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ecf" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ecf" id="containerFactory" name="ECF Container Factory"/>
+      </appInfo>
+      <documentation>
+         This extension allows plugins to register themselves as 'providers' of ECF containers.  Once registered via this extension point, plugins can then provide there own implementations of  IContainer in response to client request of the ECF container factory (<b>org.eclipse.ecf.core.ContainerFactory</b>).
+<p>Plugins using this extension point can define a new implementation of any desired communications protocol, and expose that protocol as an instance of an <b>IContainer</b>.  When client requests are made to ECF ContainerFactory to create <b>IContainer</b> instances, those requests will be re-directed to the given IContainer implementer.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="containerFactory" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="containerFactory">
+      <annotation>
+         <documentation>
+            The container factory extension point.  Can optionally contain a list of 'defaultargument' elements that describe the arguments to be passed to provider implementation
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The fully qualified name of the class implementing the <b>org.eclipse.ecf.core.provider.IContainerInstantiator</b> interface.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.ecf.core.provider.IContainerInstantiator"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  An optional name for the extension.  If no name is explicitly provided by the extension, the containerFactory class name is used as the name.  Note that this name must <b>not</b> conflict with any other name in the ECF SharedFactory in order to be successfully registered in the container factory.  Care should therefore be taken in selection of a name such that it does not conflict with other pre-existing names for this factory implementations
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  A description of the container factory suitable for presentation in a user interface.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="server" type="boolean">
+            <annotation>
+               <documentation>
+                  Flag to indicate whether the factory is for creating servers.  Default is false.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="hidden" type="boolean">
+            <annotation>
+               <documentation>
+                  Flag for whether the given container factory should be hidden in the user interface.  Default is false.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         0.0.1
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         Here's an extension that associates a class org.eclipse.ecf.test.FooContainerFactory with name 'foo' in the ECF <b>ContainerFactory</b>:
+
+<pre>
+<extension point="org.eclipse.ecf.containerFactory">
+    <containerFactory name="foo" class="org.eclipse.ecf.test.FooInstantiator" description="My container factory"/>
+</extension>
+</pre>
+
+Here is some example code to implement this class:
+
+<pre>
+package org.eclipse.ecf.test;
+
+import org.eclipse.ecf.core.IContainer;
+import org.eclipse.ecf.core.ContainerInstantiationException;
+import org.eclipse.ecf.core.provider.IContainerInstantiator;
+
+public class FooInstantiator implements IContainerInstantiator {
+
+    public FooInstantiator() {
+        super();
+    }
+    public IContainer createInstance(ContainerTypeDescription description, Class[] argTypes, Object[] args)
+            throws ContainerInstantiationException {
+        // Create/return instance of FooContainer
+        // Note that FooContainer class must
+        // implement IContainer
+        return new FooContainer();
+    }
+}
+</pre>
+
+In this example, the given class implements the <b>IContainerInstantiator</b>.createInstance method by creating and returning a new instance of FooInstantiator, a class also defined in the extension plugin.  As noted in the code, this class must implement <b>IContainer</b>, so that it can successfully be returned from createInstance.
+
+<h3>Example Usage of Container by Clients</h3>
+
+Clients that wish to use the 'foo' container implementation can do so simply by making the following call to create an <b>IContainer</b>:
+
+<pre>
+IContainer newContainer = ContainerFactory.getDefault().createContainer('foo'); 
+// Further use of newContainer instance here
+
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The API for this extension point is provided by the <b>org.eclipse.ecf.core.ContainerFactory.getDefault()</b> methods.  Specifically, the 'createContainer' methods are to be used by clients.  The functionality provided by the extension point mechanism can be used at runtime via the <b>ContainerFactory.getDefault().addDescription(ContainerTypeDescription)</b> method.  Here is the IContainerFactory interface
+contract:
+
+<pre>
+/**
+ * Container factory contract {@link ContainerFactory} for default
+ * implementation.
+ */
+public interface IContainerFactory {
+ /**
+  * Add a ContainerTypeDescription to the set of known ContainerDescriptions.
+  * 
+  * @param description
+  *            the ContainerTypeDescription to add to this factory. Must not
+  *            be null.
+  * @return ContainerTypeDescription the old description of the same name,
+  *         null if none found
+  */
+ public ContainerTypeDescription addDescription(ContainerTypeDescription description);
+
+ /**
+  * Get a collection of the ContainerDescriptions currently known to this
+  * factory. This allows clients to query the factory to determine what if
+  * any other ContainerDescriptions are currently registered with the
+  * factory, and if so, what they are.
+  * 
+  * @return List of ContainerTypeDescription instances
+  */
+ public List /* ContainerTypeDescription */ getDescriptions();
+
+ /**
+  * Check to see if a given named description is already contained by this
+  * factory
+  * 
+  * @param description
+  *            the ContainerTypeDescription to look for
+  * @return true if description is already known to factory, false otherwise
+  */
+ public boolean containsDescription(ContainerTypeDescription description);
+
+ /**
+  * Get the known ContainerTypeDescription given it's name.
+  * 
+  * @param name
+  *            the name to use as key to find ContainerTypeDescription
+  * @return ContainerTypeDescription found. Null if not found.
+  */
+ public ContainerTypeDescription getDescriptionByName(String name);
+
+ /**
+  * Make IContainer instance. Given a ContainerTypeDescription object, a
+  * String [] of argument types, and an Object [] of parameters, this method
+  * will
+  * <p>
+  * <ul>
+  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
+  * <li>if found, will retrieve or create an IContainerInstantiator for that
+  * description</li>
+  * <li>Call the IContainerInstantiator.createInstance method to return an
+  * instance of IContainer</li>
+  * </ul>
+  * 
+  * @param description
+  *            the ContainerTypeDescription to use to create the instance
+  * @param parameters
+  *            an Object [] of parameters passed to the createInstance method
+  *            of the IContainerInstantiator
+  * @return a valid instance of IContainer
+  * @throws ContainerCreateException
+  */
+ public IContainer createContainer(ContainerTypeDescription description,
+   Object[] parameters) throws ContainerCreateException;
+
+ /**
+  * Make IContainer instance. Given a ContainerTypeDescription name, this
+  * method will
+  * <p>
+  * <ul>
+  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
+  * <li>if found, will retrieve or create an IContainerInstantiator for that
+  * description</li>
+  * <li>Call the IContainerInstantiator.createInstance method to return an
+  * instance of IContainer</li>
+  * </ul>
+  * 
+  * @param descriptionName
+  *            the ContainerTypeDescription name to lookup
+  * @return a valid instance of IContainer
+  * @throws ContainerCreateException
+  */
+ public IContainer createContainer(String descriptionName)
+   throws ContainerCreateException;
+
+ /**
+  * Make IContainer instance. Given a ContainerTypeDescription name, this
+  * method will
+  * <p>
+  * <ul>
+  * <li>lookup the known ContainerDescriptions to find one of matching name</li>
+  * <li>if found, will retrieve or create an IContainerInstantiator for that
+  * description</li>
+  * <li>Call the IContainerInstantiator.createInstance method to return an
+  * instance of IContainer</li>
+  * </ul>
+  * 
+  * @param descriptionName
+  *            the ContainerTypeDescription name to lookup
+  * @param parameters
+  *            the Object [] of parameters passed to the
+  *            IContainerInstantiator.createInstance method
+  * @return a valid instance of IContainer
+  * @throws ContainerCreateException
+  */
+ public IContainer createContainer(String descriptionName, Object[] parameters)
+   throws ContainerCreateException;
+
+ /**
+  * Remove given description from set known to this factory.
+  * 
+  * @param description
+  *            the ContainerTypeDescription to remove
+  * @return the removed ContainerTypeDescription, null if nothing removed
+  */
+ public ContainerTypeDescription removeDescription(
+   ContainerTypeDescription description);
+}
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The supplied implementations of this extension point are:
+
+org.eclipse.ecf.provider.generic.GenericContainerInstantiator
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 Composent, Inc. and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.  Contributors:  Composent, Inc. - initial API and implementation.
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/ecf-src/org.eclipse.ecf/schema/start.exsd b/eclipse/plugins/org.eclipse.ecf/schema/start.exsd
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/schema/start.exsd
rename to eclipse/plugins/org.eclipse.ecf/schema/start.exsd
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java
new file mode 100644
index 0000000..d87399f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainer.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM, Inc and Composent, Inc. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Chris Aniszczyk <zx at us.ibm.com> - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core;
+
+import java.util.*;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.ecf.core.events.ContainerDisposeEvent;
+import org.eclipse.ecf.core.events.IContainerEvent;
+import org.eclipse.ecf.core.security.*;
+import org.eclipse.ecf.internal.core.ECFPlugin;
+
+/**
+ * Abstract implementation of IContainer. Provides implementations of listener
+ * methods that subsclasses may use to avoid having to implement them
+ * themselves. This class may be subclassed as needed.
+ * 
+ */
+public abstract class AbstractContainer implements IContainer {
+
+	private final List containerListeners = new ArrayList(5);
+
+	public void addListener(IContainerListener l) {
+		synchronized (containerListeners) {
+			containerListeners.add(l);
+		}
+	}
+
+	public void removeListener(IContainerListener l) {
+		synchronized (containerListeners) {
+			containerListeners.remove(l);
+		}
+	}
+
+	public void dispose() {
+		fireContainerEvent(new ContainerDisposeEvent(getID()));
+		synchronized (containerListeners) {
+			containerListeners.clear();
+		}
+	}
+
+	/**
+	 * Fires a container event
+	 * 
+	 * @param event
+	 */
+	protected void fireContainerEvent(IContainerEvent event) {
+		List toNotify = null;
+		// Copy array
+		synchronized (containerListeners) {
+			toNotify = new ArrayList(containerListeners);
+		}
+		// Notify all in toNotify
+		for (Iterator i = toNotify.iterator(); i.hasNext();) {
+			IContainerListener l = (IContainerListener) i.next();
+			l.handleEvent(event);
+		}
+	}
+
+	public Object getAdapter(Class serviceType) {
+		if (serviceType == null)
+			return null;
+		if (serviceType.isInstance(this)) {
+			return this;
+		}
+		ECFPlugin plugin = ECFPlugin.getDefault();
+		if (plugin == null)
+			return null;
+		IAdapterManager adapterManager = plugin.getAdapterManager();
+		return (adapterManager == null) ? null : adapterManager.loadAdapter(this, serviceType.getName());
+	}
+
+	protected String getPasswordFromConnectContext(IConnectContext connectContext) throws ContainerConnectException {
+		String pw = null;
+		try {
+			Callback[] callbacks = new Callback[1];
+			callbacks[0] = new ObjectCallback();
+			if (connectContext != null) {
+				CallbackHandler handler = connectContext.getCallbackHandler();
+				if (handler != null) {
+					handler.handle(callbacks);
+				}
+			}
+			ObjectCallback cb = (ObjectCallback) callbacks[0];
+			pw = (String) cb.getObject();
+		} catch (Exception e) {
+			throw new ContainerConnectException("Exception in CallbackHandler.handle(<callbacks>)", e); //$NON-NLS-1$
+		}
+		return pw;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainerAdapterFactory.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainerAdapterFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainerAdapterFactory.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/AbstractContainerAdapterFactory.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java
new file mode 100644
index 0000000..bf004c7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/BaseContainer.java
@@ -0,0 +1,128 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.ecf.core;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.ecf.core.identity.*;
+import org.eclipse.ecf.core.provider.BaseContainerInstantiator;
+import org.eclipse.ecf.core.security.IConnectContext;
+
+/**
+ * Base implementation of IContainer. Subclasses may be created to fill out the
+ * behavior of this base implementation. Also, adapter factories may be created
+ * via adapterFactory extension point to allow adapters to be added to this
+ * BaseContainer implementation without the need to create a separate IContainer
+ * implementation class.
+ */
+public class BaseContainer extends AbstractContainer {
+
+	public static class Instantiator extends BaseContainerInstantiator {
+		private static long nextBaseContainerID = 0L;
+
+		public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException {
+			try {
+				if (parameters != null && parameters.length > 0) {
+					if (parameters[0] instanceof ID)
+						return new BaseContainer((ID) parameters[0]);
+					if (parameters[0] instanceof String)
+						return new BaseContainer(IDFactory.getDefault().createStringID((String) parameters[0]));
+				}
+			} catch (IDCreateException e) {
+				throw new ContainerCreateException("Could not create ID for basecontainer"); //$NON-NLS-1$
+			}
+			return new BaseContainer(nextBaseContainerID++);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.ecf.core.provider.IContainerInstantiator#getSupportedAdapterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
+		 */
+		public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
+			return getInterfacesAndAdaptersForClass(BaseContainer.class);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.ecf.core.provider.BaseContainerInstantiator#getSupportedParameterTypes(org.eclipse.ecf.core.ContainerTypeDescription)
+		 */
+		public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
+			return new Class[][] { {}, {ID.class}, {String.class}};
+		}
+
+	}
+
+	private ID id = null;
+
+	protected BaseContainer(long idl) throws ContainerCreateException {
+		try {
+			this.id = IDFactory.getDefault().createLongID(idl);
+		} catch (IDCreateException e) {
+			throw new ContainerCreateException("Could not create ID for basecontainer", e); //$NON-NLS-1$
+		}
+	}
+
+	protected BaseContainer(ID id) {
+		Assert.isNotNull(id);
+		this.id = id;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainer#connect(org.eclipse.ecf.core.identity.ID,
+	 *      org.eclipse.ecf.core.security.IConnectContext)
+	 */
+	public void connect(ID targetID, IConnectContext connectContext) throws ContainerConnectException {
+		throw new ContainerConnectException("Connect not supported"); //$NON-NLS-1$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainer#disconnect()
+	 */
+	public void disconnect() {
+		// Nothing to disconnect
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainer#getConnectNamespace()
+	 */
+	public Namespace getConnectNamespace() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainer#getConnectedID()
+	 */
+	public ID getConnectedID() {
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.identity.IIdentifiable#getID()
+	 */
+	public ID getID() {
+		return id;
+	}
+
+	public String toString() {
+		StringBuffer sb = new StringBuffer("BaseContainer["); //$NON-NLS-1$
+		sb.append("id=").append(getID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+		return sb.toString();
+	}
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerAuthenticationException.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerAuthenticationException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerAuthenticationException.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerAuthenticationException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerConnectException.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerConnectException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerConnectException.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerConnectException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerCreateException.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerCreateException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerCreateException.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerCreateException.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
new file mode 100644
index 0000000..100df70
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerFactory.java
@@ -0,0 +1,604 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.provider.IContainerInstantiator;
+import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.ecf.internal.core.*;
+
+/**
+ * Factory for creating {@link IContainer} instances. This class provides ECF
+ * clients an entry point to constructing {@link IContainer} instances. <br>
+ * <br>
+ * Here is an example use of the ContainerFactory to construct an instance of
+ * the 'standalone' container (has no connection to other containers): <br>
+ * <br>
+ * <code>
+ * 	    IContainer container = <br>
+ * 			ContainerFactory.getDefault().createContainer("ecf.generic.client");
+ *      <br><br>
+ *      ...further use of container here...
+ * </code> For more details on the creation
+ * and lifecycle of IContainer instances created via this factory see
+ * {@link IContainer}.
+ * 
+ * @see IContainer
+ * @see IContainerFactory
+ * @since 3.1
+ */
+public class ContainerFactory implements IContainerFactory, IContainerManager {
+
+	public static final String BASE_CONTAINER_NAME = "ecf.base"; //$NON-NLS-1$
+
+	static final Map containerdescriptions = new HashMap();
+
+	static final Map containers = new HashMap();
+
+	static final List managerListeners = new ArrayList();
+
+	private static IContainerFactory instance = null;
+
+	private volatile static boolean init = false;
+
+	static {
+		instance = new ContainerFactory();
+	}
+
+	class ContainerEntry {
+		private final IContainer container;
+		private final ContainerTypeDescription typeDescription;
+
+		public ContainerEntry(IContainer container, ContainerTypeDescription typeDescription) {
+			this.container = container;
+			this.typeDescription = typeDescription;
+		}
+
+		public IContainer getContainer() {
+			return this.container;
+		}
+
+		public ContainerTypeDescription getContainerTypeDescription() {
+			return this.typeDescription;
+		}
+	}
+
+	public synchronized static IContainerFactory getDefault() {
+		if (init == false) {
+			// first mark the extension initalized because it initializeExtensions()
+			// eventually calls this method again
+			init = true;
+			ECFPlugin.getDefault().initializeExtensions();
+		}
+		return instance;
+	}
+
+	protected ContainerFactory() {
+		ECFPlugin.getDefault().addDisposable(new IDisposable() {
+			public void dispose() {
+				synchronized (containers) {
+					for (Iterator i = containers.keySet().iterator(); i.hasNext();) {
+						ContainerEntry entry = (ContainerEntry) containers.get(i.next());
+						if (entry != null) {
+							IContainer c = entry.getContainer();
+							try {
+								c.dispose();
+							} catch (Throwable e) {
+								// Log exception
+								ECFPlugin.getDefault().log(new Status(IStatus.ERROR, ECFPlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "container dispose error", e)); //$NON-NLS-1$
+								Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ContainerFactory.class, "doDispose", e); //$NON-NLS-1$
+							}
+						}
+					}
+					containers.clear();
+				}
+				containerdescriptions.clear();
+				managerListeners.clear();
+			}
+		});
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#addDescription(org.eclipse.ecf.core.ContainerTypeDescription)
+	 */
+	public ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription) {
+		return addDescription0(containerTypeDescription);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptions()
+	 */
+	public List getDescriptions() {
+		return getDescriptions0();
+	}
+
+	protected List getDescriptions0() {
+		synchronized (containerdescriptions) {
+			return new ArrayList(containerdescriptions.values());
+		}
+	}
+
+	protected ContainerTypeDescription addDescription0(ContainerTypeDescription containerTypeDescription) {
+		if (containerTypeDescription == null)
+			return null;
+		synchronized (containerdescriptions) {
+			return (ContainerTypeDescription) containerdescriptions.put(containerTypeDescription.getName(), containerTypeDescription);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#containsDescription(org.eclipse.ecf.core.ContainerTypeDescription)
+	 */
+	public boolean containsDescription(ContainerTypeDescription containerTypeDescription) {
+		return containsDescription0(containerTypeDescription);
+	}
+
+	protected boolean containsDescription0(ContainerTypeDescription containerTypeDescription) {
+		if (containerTypeDescription == null)
+			return false;
+		synchronized (containerdescriptions) {
+			return containerdescriptions.containsKey(containerTypeDescription.getName());
+		}
+	}
+
+	protected ContainerTypeDescription getDescription0(ContainerTypeDescription containerTypeDescription) {
+		if (containerTypeDescription == null)
+			return null;
+		synchronized (containerdescriptions) {
+			return (ContainerTypeDescription) containerdescriptions.get(containerTypeDescription.getName());
+		}
+	}
+
+	protected ContainerTypeDescription getDescription0(String containerTypeDescriptionName) {
+		if (containerTypeDescriptionName == null)
+			return null;
+		synchronized (containerdescriptions) {
+			return (ContainerTypeDescription) containerdescriptions.get(containerTypeDescriptionName);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptionByName(java.lang.String)
+	 */
+	public ContainerTypeDescription getDescriptionByName(String containerTypeDescriptionName) {
+		return getDescription0(containerTypeDescriptionName);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#removeDescription(org.eclipse.ecf.core.ContainerTypeDescription)
+	 */
+	public ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription) {
+		return removeDescription0(containerTypeDescription);
+
+	}
+
+	protected ContainerTypeDescription removeDescription0(ContainerTypeDescription containerTypeDescription) {
+		if (containerTypeDescription == null)
+			return null;
+		synchronized (containerdescriptions) {
+			return (ContainerTypeDescription) containerdescriptions.remove(containerTypeDescription.getName());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#getDescriptionsForContainerAdapter(java.lang.Class)
+	 */
+	public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter) {
+		if (containerAdapter == null)
+			throw new NullPointerException("containerAdapter cannot be null"); //$NON-NLS-1$
+		List result = new ArrayList();
+		List descriptions = getDescriptions();
+		for (Iterator i = descriptions.iterator(); i.hasNext();) {
+			ContainerTypeDescription description = (ContainerTypeDescription) i.next();
+			String[] supportedAdapters = description.getSupportedAdapterTypes();
+			if (supportedAdapters != null) {
+				for (int j = 0; j < supportedAdapters.length; j++) {
+					if (supportedAdapters[j].equals(containerAdapter.getName()))
+						result.add(description);
+				}
+			}
+		}
+		return (ContainerTypeDescription[]) result.toArray(new ContainerTypeDescription[] {});
+	}
+
+	protected void throwContainerCreateException(String message, Throwable cause, String method) throws ContainerCreateException {
+		ContainerCreateException except = (cause == null) ? new ContainerCreateException(message) : new ContainerCreateException(message, cause);
+		Trace.throwing(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_THROWING, ContainerFactory.class, method, except);
+		throw except;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer()
+	 */
+	public IContainer createContainer() throws ContainerCreateException {
+		return createContainer(BASE_CONTAINER_NAME);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.identity.ID)
+	 */
+	public IContainer createContainer(ID containerID) throws ContainerCreateException {
+		if (containerID == null)
+			return createContainer();
+		return createContainer(BASE_CONTAINER_NAME, new Object[] {containerID});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription)
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription) throws ContainerCreateException {
+		return createContainer(containerTypeDescription, (Object[]) null);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String)
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), (Object[]) null);
+	}
+
+	private ContainerTypeDescription getDescriptionByNameWithException(String containerTypeDescriptionName) throws ContainerCreateException {
+		ContainerTypeDescription typeDescription = getDescriptionByName(containerTypeDescriptionName);
+		if (typeDescription == null)
+			throw new ContainerCreateException("Container type description with name=" + containerTypeDescriptionName + " not found.  This may indicate that the desired provider is not available or not startable within runtime."); //$NON-NLS-1$ //$NON-NLS-2$
+		return typeDescription;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription,
+	 *      java.lang.Object[])
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters) throws ContainerCreateException {
+		String method = "createContainer"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ContainerFactory.class, method, new Object[] {containerTypeDescription, Trace.getArgumentsString(parameters)});
+		if (containerTypeDescription == null)
+			throwContainerCreateException("ContainerTypeDescription cannot be null", null, method); //$NON-NLS-1$
+		ContainerTypeDescription cd = getDescription0(containerTypeDescription);
+		if (cd == null)
+			throwContainerCreateException("ContainerTypeDescription '" //$NON-NLS-1$
+					+ containerTypeDescription.getName() + "' not found", null, method); //$NON-NLS-1$
+		IContainerInstantiator instantiator = null;
+		try {
+			instantiator = cd.getInstantiator();
+		} catch (Exception e) {
+			throwContainerCreateException("createContainer cannot get IContainerInstantiator for description : " //$NON-NLS-1$
+					+ containerTypeDescription, e, method);
+		}
+		// Ask instantiator to actually create instance
+		IContainer container = instantiator.createInstance(containerTypeDescription, parameters);
+		if (container == null)
+			throwContainerCreateException("Instantiator returned null for '" //$NON-NLS-1$
+					+ cd.getName() + "'", null, method); //$NON-NLS-1$
+		// Add to containers map if container.getID() provides a valid value.
+		ID containerID = container.getID();
+		if (containerID != null)
+			addContainer(container, cd);
+		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, ContainerFactory.class, method, container);
+		return container;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String,
+	 *      java.lang.Object[])
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), parameters);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, org.eclipse.ecf.core.identity.ID, java.lang.Object[])
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters) throws ContainerCreateException {
+		if (containerID == null)
+			return createContainer(containerTypeDescription, parameters);
+		Object[] params = (parameters == null || parameters.length == 0) ? new Object[1] : new Object[parameters.length + 1];
+		params[0] = containerID;
+		if (parameters != null && parameters.length != 0)
+			System.arraycopy(parameters, 0, params, 1, parameters.length);
+		return createContainer(containerTypeDescription, params);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String, org.eclipse.ecf.core.identity.ID, java.lang.Object[])
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException {
+		if (containerID == null)
+			return createContainer(containerTypeDescriptionName, parameters);
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerID, parameters);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(org.eclipse.ecf.core.ContainerTypeDescription, org.eclipse.ecf.core.identity.ID)
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID) throws ContainerCreateException {
+		if (containerID == null)
+			return createContainer(containerTypeDescription);
+		return createContainer(containerTypeDescription, new Object[] {containerID});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerFactory#createContainer(java.lang.String, org.eclipse.ecf.core.identity.ID)
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), new Object[] {containerID});
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerId);
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId, Object[] parameters) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerId, parameters);
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId) throws ContainerCreateException {
+		return createContainer(containerTypeDescription, containerId, (Object[]) null);
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Object[] parameters) throws ContainerCreateException {
+		if (containerId == null)
+			return createContainer(containerTypeDescription, parameters);
+		Object[] params = (parameters == null || parameters.length == 0) ? new Object[1] : new Object[parameters.length + 1];
+		params[0] = containerId;
+		if (parameters != null && parameters.length != 0)
+			System.arraycopy(parameters, 0, params, 1, parameters.length);
+		return createContainer(containerTypeDescription, params);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerManager#getAllContainers()
+	 */
+	public IContainer[] getAllContainers() {
+		List containerValues = new ArrayList();
+		synchronized (containers) {
+			Collection containerEntrys = containers.values();
+			for (Iterator i = containerEntrys.iterator(); i.hasNext();) {
+				ContainerEntry entry = (ContainerEntry) i.next();
+				containerValues.add(entry.getContainer());
+			}
+		}
+		return (IContainer[]) containerValues.toArray(new IContainer[] {});
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerManager#getContainer(org.eclipse.ecf.core.identity.ID)
+	 */
+	public IContainer getContainer(ID containerID) {
+		if (containerID == null)
+			return null;
+		synchronized (containers) {
+			ContainerEntry entry = (ContainerEntry) containers.get(containerID);
+			if (entry == null)
+				return null;
+			return entry.getContainer();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerManager#hasContainer(org.eclipse.ecf.core.identity.ID)
+	 */
+	public boolean hasContainer(ID containerID) {
+		Assert.isNotNull(containerID);
+		synchronized (containers) {
+			return containers.containsKey(containerID);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerManager#addListener(org.eclipse.ecf.core.IContainerManagerListener)
+	 */
+	public boolean addListener(IContainerManagerListener listener) {
+		Assert.isNotNull(listener);
+		synchronized (managerListeners) {
+			return managerListeners.add(listener);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ecf.core.IContainerManager#removeListener(org.eclipse.ecf.core.IContainerManagerListener)
+	 */
+	public boolean removeListener(IContainerManagerListener listener) {
+		Assert.isNotNull(listener);
+		synchronized (managerListeners) {
+			return managerListeners.remove(listener);
+		}
+	}
+
+	public IContainer addContainer(IContainer container, ContainerTypeDescription typeDescription) {
+		Assert.isNotNull(container);
+		Assert.isNotNull(typeDescription);
+		ID containerID = container.getID();
+		Assert.isNotNull(containerID, "Container ID cannot be null"); //$NON-NLS-1$
+		ContainerEntry result = null;
+		synchronized (containers) {
+			result = (ContainerEntry) containers.put(containerID, new ContainerEntry(container, typeDescription));
+		}
+		if (result == null)
+			fireContainerAdded(container);
+		return container;
+	}
+
+	/**
+	 * @param result
+	 */
+	private void fireContainerAdded(IContainer result) {
+		List toNotify = null;
+		synchronized (managerListeners) {
+			toNotify = new ArrayList(managerListeners);
+		}
+		for (Iterator i = toNotify.iterator(); i.hasNext();) {
+			IContainerManagerListener cml = (IContainerManagerListener) i.next();
+			cml.containerAdded(result);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ecf.core.IContainerManager#removeContainer(org.eclipse.ecf.core.IContainer)
+	 */
+	public IContainer removeContainer(IContainer container) {
+		Assert.isNotNull(container);
+		ID containerID = container.getID();
+		if (containerID == null)
+			return null;
+		return removeContainer(containerID);
+	}
+
+	public IContainer removeContainer(ID containerID) {
+		Assert.isNotNull(containerID);
+		ContainerEntry result = null;
+		synchronized (containers) {
+			result = (ContainerEntry) containers.remove(containerID);
+		}
+		IContainer resultContainer = null;
+		if (result != null) {
+			resultContainer = result.getContainer();
+			fireContainerRemoved(resultContainer);
+		}
+		return resultContainer;
+	}
+
+	/**
+	 * @param result
+	 */
+	private void fireContainerRemoved(IContainer result) {
+		List toNotify = null;
+		synchronized (managerListeners) {
+			toNotify = new ArrayList(managerListeners);
+		}
+		for (Iterator i = toNotify.iterator(); i.hasNext();) {
+			IContainerManagerListener cml = (IContainerManagerListener) i.next();
+			cml.containerRemoved(result);
+		}
+	}
+
+	public ContainerTypeDescription getContainerTypeDescription(ID containerID) {
+		if (containerID == null)
+			return null;
+		synchronized (containers) {
+			ContainerEntry entry = (ContainerEntry) containers.get(containerID);
+			if (entry == null)
+				return null;
+			return entry.getContainerTypeDescription();
+		}
+	}
+
+	public IContainerFactory getContainerFactory() {
+		return this;
+	}
+
+	public void removeAllContainers() {
+		synchronized (containers) {
+			for (Iterator i = containers.keySet().iterator(); i.hasNext();) {
+				ID key = (ID) i.next();
+				ContainerEntry entry = (ContainerEntry) containers.get(key);
+				i.remove();
+				fireContainerRemoved(entry.getContainer());
+			}
+		}
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Map parameters) throws ContainerCreateException {
+		if (containerID == null)
+			return createContainer(containerTypeDescription, parameters);
+		if (parameters == null)
+			return createContainer(containerTypeDescription, containerID);
+		return createContainer(containerTypeDescription, new Object[] {containerID, parameters});
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Map parameters) throws ContainerCreateException {
+		if (containerId == null)
+			return createContainer(containerTypeDescription, parameters);
+		if (parameters == null)
+			return createContainer(containerTypeDescription, containerId);
+		return createContainer(containerTypeDescription, new Object[] {containerId, parameters});
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Map parameters) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerID, parameters);
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId, Map parameters) throws ContainerCreateException {
+		return createContainer(getDescriptionByNameWithException(containerTypeDescriptionName), containerId, parameters);
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Map parameters) throws ContainerCreateException {
+		if (parameters == null)
+			return createContainer(containerTypeDescription);
+		return createContainer(containerTypeDescription, new Object[] {parameters});
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, Map parameters) throws ContainerCreateException {
+		if (parameters == null)
+			return createContainer(containerTypeDescriptionName);
+		return createContainer(containerTypeDescriptionName, new Object[] {parameters});
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
new file mode 100644
index 0000000..c8cd256
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/ContainerTypeDescription.java
@@ -0,0 +1,278 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.core.provider.IContainerInstantiator;
+import org.eclipse.ecf.core.provider.IRemoteServiceContainerInstantiator;
+import org.eclipse.ecf.core.util.Trace;
+import org.eclipse.ecf.internal.core.ECFDebugOptions;
+import org.eclipse.ecf.internal.core.ECFPlugin;
+
+/**
+ * Description of an {@link IContainer} type.  Instances of this class are used to represent {@link IContainerInstantiator}s
+ * in the {@link ContainerFactory}
+ * 
+ * @see ContainerFactory IContainerInstantiator
+ */
+public class ContainerTypeDescription {
+
+	protected String name = null;
+
+	protected String instantiatorClass = null;
+
+	protected IContainerInstantiator instantiator = null;
+
+	protected String description = null;
+
+	protected int hashCode = 0;
+
+	protected boolean server;
+
+	protected boolean hidden;
+
+	public ContainerTypeDescription(String name, String instantiatorClass, String description) {
+		this(name, instantiatorClass, description, false, false);
+	}
+
+	public ContainerTypeDescription(String name, String instantiatorClass, String description, boolean server, boolean hidden) {
+		Assert.isNotNull(name, "ContainerTypeDescription<init> name cannot be null"); //$NON-NLS-1$
+		this.name = name;
+		this.hashCode = name.hashCode();
+		Assert.isNotNull(instantiatorClass, "ContainerTypeDescription<init> instantiatorClass cannot be null"); //$NON-NLS-1$
+		this.instantiatorClass = instantiatorClass;
+		this.description = description;
+		this.server = server;
+		this.hidden = hidden;
+	}
+
+	public ContainerTypeDescription(String name, IContainerInstantiator instantiator, String description) {
+		this(name, instantiator, description, false, false);
+	}
+
+	public ContainerTypeDescription(String name, IContainerInstantiator inst, String desc, boolean server, boolean hidden) {
+		Assert.isNotNull(name, "ContainerTypeDescription<init> name cannot be null"); //$NON-NLS-1$
+		this.name = name;
+		this.hashCode = name.hashCode();
+		Assert.isNotNull(inst, "ContainerTypeDescription<init> instantiator instance cannot be null"); //$NON-NLS-1$
+		this.instantiator = inst;
+		this.description = desc;
+		this.server = server;
+		this.hidden = hidden;
+	}
+
+	/**
+	 * Get ContainerTypeDescription name
+	 * 
+	 * @return String name for the ContainerTypeDescription. Will not be null.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	public boolean equals(Object other) {
+		if (!(other instanceof ContainerTypeDescription))
+			return false;
+		ContainerTypeDescription scd = (ContainerTypeDescription) other;
+		return scd.name.equals(name);
+	}
+
+	public int hashCode() {
+		return hashCode;
+	}
+
+	public String toString() {
+		StringBuffer b = new StringBuffer("ContainerTypeDescription["); //$NON-NLS-1$
+		b.append("name=").append(name).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (instantiator == null)
+			b.append("instantiatorClass=").append(instantiatorClass) //$NON-NLS-1$
+					.append(";"); //$NON-NLS-1$
+		else
+			b.append("instantiator=").append(instantiator).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+		b.append("desc=").append(description).append(";"); //$NON-NLS-1$ //$NON-NLS-2$
+		return b.toString();
+	}
+
+	protected IContainerInstantiator getInstantiator() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+		synchronized (this) {
+			if (instantiator == null)
+				initializeInstantiator();
+			return instantiator;
+		}
+	}
+
+	private void initializeInstantiator() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+		// Load instantiator class
+		Class clazz = Class.forName(instantiatorClass);
+		// Make new instance
+		instantiator = (IContainerInstantiator) clazz.newInstance();
+	}
+
+	/**
+	 * Get the String description associated with this ContainerTypeDescription
+	 * instance
+	 * 
+	 * @return String description. May be null.
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	public boolean isServer() {
+		return server;
+	}
+
+	public boolean isHidden() {
+		return hidden;
+	}
+
+	/**
+	 * Get array of supported adapters for this container type description. The
+	 * returned array entries will be the fully qualified names of the adapter
+	 * classes.
+	 * 
+	 * Note that the returned types do not guarantee that a subsequent call to
+	 * {@link IContainer#getAdapter(Class)} with the same type name as a
+	 * returned value will return a non-<code>null</code result. In other words, even if the
+	 * class name is in the returned array, subsequent calls to
+	 * {@link IContainer#getAdapter(Class)} may still return <code>null</code>.
+	 * 
+	 * @return String[] of supported adapters. The entries in the returned array
+	 *         will be the fully qualified class names of adapters supported by
+	 *         the given description. An empty string array (String[0]) will be
+	 *         returned if no adapters are supported.
+	 */
+	public String[] getSupportedAdapterTypes() {
+		String method = "getSupportedAdapterTypes"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		String[] result = new String[0];
+		try {
+			String[] r = getInstantiator().getSupportedAdapterTypes(this);
+			if (r != null)
+				result = r;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+		}
+		List resultList = new ArrayList();
+		for (int i = 0; i < result.length; i++) {
+			resultList.add(result[i]);
+		}
+		if (!resultList.contains(IContainer.class.getName()))
+			resultList.add(IContainer.class.getName());
+		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
+		return (String[]) resultList.toArray(new String[] {});
+	}
+
+	protected void traceAndLogException(int code, String method, Throwable e) {
+		Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, this.getClass(), method, e);
+		ECFPlugin.getDefault().log(new Status(IStatus.ERROR, ECFPlugin.PLUGIN_ID, code, method, e));
+	}
+
+	/**
+	 * Get array of parameter types for this ContainerTypeDescription. Each of
+	 * the rows of the returned array specifies a Class[] of parameter types.
+	 * These parameter types correspond to the types of Objects that can be
+	 * passed into the second parameter of
+	 * {@link IContainerInstantiator#createInstance(ContainerTypeDescription, Object[])}.
+	 * For example, if this method returns a Class [] = {{ String.class,
+	 * String.class }, { String.class }} this indicates that a call to
+	 * createInstance(description,new String[] { "hello", "there" }) and a call
+	 * to createInstance(description,new String[] { "hello" }) will be
+	 * understood by the underlying provider implementation.
+	 * 
+	 * @return Class[][] array of Class arrays. Each row corresponds to a
+	 *         Class[] that describes the types of Objects for second parameter
+	 *         to
+	 *         {@link IContainerInstantiator#createInstance(ContainerTypeDescription, Object[])}.
+	 *         If no parameter types are understood as arguments, a Class[0][0]
+	 *         array will be returned
+	 */
+	public Class[][] getSupportedParameterTypes() {
+		String method = "getParameterTypes"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		Class[][] result = new Class[0][0];
+		try {
+			Class[][] r = getInstantiator().getSupportedParameterTypes(this);
+			if (r != null)
+				result = r;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+		}
+		Trace.exiting(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_EXITING, this.getClass(), method, result);
+		return result;
+	}
+
+	/**
+	 * @return String[] of container's intents.
+	 * 
+	 * @since 3.0
+	 */
+	public String[] getSupportedIntents() {
+		String method = "getSupportedIntents"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		try {
+			IContainerInstantiator ci = getInstantiator();
+			return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getSupportedIntents(this) : null;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+			return null;
+		}
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public String[] getSupportedConfigs() {
+		String method = "getSupportedConfigs"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		try {
+			IContainerInstantiator ci = getInstantiator();
+			return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getSupportedConfigs(this) : null;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+			return null;
+		}
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public String[] getImportedConfigs(String[] exporterSupportedConfigs) {
+		String method = "getImportedConfigs"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		if (exporterSupportedConfigs == null)
+			return null;
+		try {
+			IContainerInstantiator ci = getInstantiator();
+			return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getImportedConfigs(this, exporterSupportedConfigs) : null;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+			return null;
+		}
+	}
+
+	/**
+	 * @since 3.1
+	 */
+	public Dictionary getPropertiesForImportedConfigs(String[] importedConfigs, Dictionary exportedProperties) {
+		String method = "getPropertiesForImportedConfigs"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, this.getClass(), method);
+		if (importedConfigs == null)
+			return null;
+		try {
+			IContainerInstantiator ci = getInstantiator();
+			return (ci instanceof IRemoteServiceContainerInstantiator) ? ((IRemoteServiceContainerInstantiator) ci).getPropertiesForImportedConfigs(this, importedConfigs, exportedProperties) : null;
+		} catch (Exception e) {
+			traceAndLogException(IStatus.ERROR, method, e);
+			return null;
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainer.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java
new file mode 100644
index 0000000..8787f12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerFactory.java
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core;
+
+import java.util.List;
+import java.util.Map;
+import org.eclipse.ecf.core.identity.ID;
+
+/**
+ * Container factory contract {@link ContainerFactory} for default
+ * implementation.
+ */
+public interface IContainerFactory {
+	/**
+	 * Add a ContainerTypeDescription to the set of known ContainerDescriptions.
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to add to this factory. Must not
+	 *            be <code>null</code>.
+	 * @return ContainerTypeDescription the old description of the same name,
+	 *         null if none found
+	 */
+	public ContainerTypeDescription addDescription(ContainerTypeDescription containerTypeDescription);
+
+	/**
+	 * Get a collection of the ContainerDescriptions currently known to this
+	 * factory. This allows clients to query the factory to determine what if
+	 * any other ContainerDescriptions are currently registered with the
+	 * factory, and if so, what they are.
+	 * 
+	 * @return List of ContainerTypeDescription instances
+	 */
+	public List /* ContainerTypeDescription */getDescriptions();
+
+	/**
+	 * Check to see if a given named description is already contained by this
+	 * factory
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to look for
+	 * @return true if description is already known to factory, false otherwise
+	 */
+	public boolean containsDescription(ContainerTypeDescription containerTypeDescription);
+
+	/**
+	 * Get the known ContainerTypeDescription given it's name.
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the name to use as key to find ContainerTypeDescription.  Must not be <code>null</code>.
+	 * @return ContainerTypeDescription found. Null if not found.
+	 */
+	public ContainerTypeDescription getDescriptionByName(String containerTypeDescriptionName);
+
+	/**
+	 * Remove given description from set known to this factory.
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to remove
+	 * @return the removed ContainerTypeDescription, null if nothing removed
+	 */
+	public ContainerTypeDescription removeDescription(ContainerTypeDescription containerTypeDescription);
+
+	/**
+	 * Get container type descriptions that support the given containerAdapter
+	 * 
+	 * @param containerAdapter the container adapter.  Must not be null.
+	 * @return ContainerTypeDescription[] of descriptions that support the given container adapter.  If no 
+	 * ContainerTypeDescriptions found that support the given adapter, an empty array will be returned.
+	 */
+	public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter);
+
+	/**
+	 * Make a base IContainer instance.
+	 * 
+	 * @return IContainer instance.  A non-<code>null</code> instance will be returned.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer() throws ContainerCreateException;
+
+	/**
+	 * Create a new container.
+	 * 
+	 * @param containerID the container's new ID.  Must not be <code>null</code>.
+	 * @return IContainer instance.  A non-<code>null</code>. instance will be returned.
+	 * @throws ContainerCreateException if some problem creating a base IContainer instance.
+	 */
+	public IContainer createContainer(ID containerID) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use. Must not be <code>null</code>.
+	 * @return a valid instance of IContainer. Will not be <code>null</code>.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
+	 * @return a valid instance of IContainer. Will not be <code>null</code>.
+	 * @throws ContainerCreateException
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance. Must not be <code>null</code>.
+	 * @param parameters
+	 *            an Object [] of parameters passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer. A non-<code>null</code> instance will be returned.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
+	 * @param parameters
+	 *            the Object [] of parameters passed to the
+	 *            IContainerInstantiator.createInstance method.  May be <code>null</code>.
+	 * @return a valid instance of IContainer. Will not be <code>null</code>.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            an Object [] of parameters passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            an Object [] of parameters passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerID the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            an Object [] of parameters passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup. Must not be <code>null</code>.
+	 * @param containerID the new container's id.  May be <code>null</code>.
+	 * @param parameters
+	 *            the Object [] of parameters passed to the
+	 *            IContainerInstantiator.createInstance method.  May be <code>null</code>.
+	 * @return a valid instance of IContainer. Will not be <code>null</code>.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to lookup.  Must not be <code>null</code>.
+	 * @param containerID the new container's id.  May be <code>null</code>.
+	 * @return a valid instance of IContainer.  Will not be <code>null</code>.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup.  Must not be <code>null</code>.
+	 * @param containerID the new container's id.  May be <code>null</code>.
+	 * @return a valid instance of IContainer.  Will not be <code>null</code>.
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerID the container's new ID.  Must not be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, ID containerID, Map parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, String containerId, Map parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup.  Must not be <code>null</code>.
+	 * @param containerID the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, ID containerID, Map parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup.  Must not be <code>null</code>.
+	 * @param containerId the container's new ID.  May be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, String containerId, Map parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescription
+	 *            the ContainerTypeDescription to use to create the instance.  Must not be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(ContainerTypeDescription containerTypeDescription, Map parameters) throws ContainerCreateException;
+
+	/**
+	 * Create a new container. 
+	 * 
+	 * @param containerTypeDescriptionName
+	 *            the ContainerTypeDescription name to lookup.  Must not be <code>null</code>.
+	 * @param parameters
+	 *            a Map of parameters (name/value pairs) passed to the createInstance method
+	 *            of the IContainerInstantiator. May be <code>null</code>.
+	 * @return a valid instance of IContainer
+	 * @throws ContainerCreateException if some problem creating the instance.
+	 * @since 3.1
+	 */
+	public IContainer createContainer(String containerTypeDescriptionName, Map parameters) throws ContainerCreateException;
+
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManager.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManagerListener.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManagerListener.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManagerListener.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IContainerManagerListener.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IReliableContainer.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IReliableContainer.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/IReliableContainer.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/IReliableContainer.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectingEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectingEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectingEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerConnectingEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectingEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectingEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectingEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisconnectingEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisposeEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisposeEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisposeEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerDisposeEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerEjectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerEjectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerEjectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/ContainerEjectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectingEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectingEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectingEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerConnectingEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectingEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectingEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectingEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisconnectingEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisposeEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisposeEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisposeEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerDisposeEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEjectedEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEjectedEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEjectedEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEjectedEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/events/IContainerEvent.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/jobs/JobsExecutor.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/jobs/JobsExecutor.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/jobs/JobsExecutor.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/jobs/JobsExecutor.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
new file mode 100644
index 0000000..7519cef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseContainerInstantiator.java
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.core.provider;
+
+import java.util.*;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.ecf.core.*;
+import org.eclipse.ecf.internal.core.ECFPlugin;
+
+/**
+ *  Default implemenation of {@link IContainerInstantiator}.  ECF provider implementers
+ *  may subclass as desired.
+ */
+public class BaseContainerInstantiator implements IContainerInstantiator {
+
+	protected static String[] NO_ADAPTERS_ARRAY = new String[] {IContainer.class.getName()};
+	protected static String[] EMPTY_STRING_ARRAY = new String[] {};
+	protected static Class[][] EMPTY_CLASS_ARRAY = new Class[][] {{}};
+
+	protected Set getAdaptersForClass(Class clazz) {
+		Set result = new HashSet();
+		IAdapterManager adapterManager = ECFPlugin.getDefault().getAdapterManager();
+		if (adapterManager != null)
+			result.addAll(Arrays.asList(adapterManager.computeAdapterTypes(clazz)));
+		return result;
+	}
+
+	protected Set getInterfacesForClass(Set s, Class clazz) {
+		if (clazz.equals(Object.class))
+			return s;
+		s.addAll(getInterfacesForClass(s, clazz.getSuperclass()));
+		s.addAll(Arrays.asList(clazz.getInterfaces()));
+		return s;
+	}
+
+	protected Set getInterfacesForClass(Class clazz) {
+		Set clazzes = getInterfacesForClass(new HashSet(), clazz);
+		int index = 0;
+		Set result = new HashSet();
+		for (Iterator i = clazzes.iterator(); i.hasNext(); index++)
+			result.add(((Class) i.next()).getName());
+		return result;
+	}
+
+	protected String[] getInterfacesAndAdaptersForClass(Class clazz) {
+		Set result = getAdaptersForClass(clazz);
+		result.addAll(getInterfacesForClass(clazz));
+		return (String[]) result.toArray(new String[] {});
+	}
+
+	public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException {
+		throw new ContainerCreateException("createInstance not supported"); //$NON-NLS-1$
+	}
+
+	public String[] getSupportedAdapterTypes(ContainerTypeDescription description) {
+		return NO_ADAPTERS_ARRAY;
+	}
+
+	public Class[][] getSupportedParameterTypes(ContainerTypeDescription description) {
+		return EMPTY_CLASS_ARRAY;
+	}
+
+	public String[] getSupportedIntents(ContainerTypeDescription description) {
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseRemoteServiceContainerInstantiator.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseRemoteServiceContainerInstantiator.java
new file mode 100644
index 0000000..3602254
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/BaseRemoteServiceContainerInstantiator.java
@@ -0,0 +1,36 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.ecf.core.provider;
+
+import java.util.Dictionary;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+
+/**
+ *  Default implementation of {@link IRemoteServiceContainerInstantiator}.  ECF provider implementers
+ *  may subclass as desired.
+ * @since 3.1
+ */
+public class BaseRemoteServiceContainerInstantiator extends BaseContainerInstantiator implements IRemoteServiceContainerInstantiator {
+
+	public String[] getSupportedConfigs(ContainerTypeDescription description) {
+		return new String[] {description.getName()};
+	}
+
+	public String[] getImportedConfigs(ContainerTypeDescription description, String[] exporterSupportedConfigs) {
+		return new String[] {description.getName()};
+	}
+
+	public Dictionary getPropertiesForImportedConfigs(ContainerTypeDescription description, String[] importedConfigTypes, Dictionary exportedProperties) {
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java
new file mode 100644
index 0000000..bd2ca12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IContainerInstantiator.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.provider;
+
+import org.eclipse.ecf.core.*;
+
+/**
+ * Interface that must be implemented by ECF provider implementations.
+ * 
+ */
+public interface IContainerInstantiator {
+	/**
+	 * Create instance of IContainer. This is the interface that container
+	 * provider implementations must implement for the containerFactory
+	 * extension point. The caller may optionally specify both argument types
+	 * and arguments that will be passed into this method (and therefore to the
+	 * provider implementation implementing this method). For example:
+	 * <p>
+	 * </p>
+	 * <p>
+	 * <b> ContainerFactory.getDefault().createContainer("foocontainer",new
+	 * Object { "hello" });</b>
+	 * </p>
+	 * <p>
+	 * </p>
+	 * 
+	 * @param description
+	 *            the ContainerTypeDescription associated with the registered
+	 *            container provider implementation
+	 * @param parameters
+	 *            parameters specified by the caller. May be null if no
+	 *            parameters are passed in by caller to
+	 *            ContainerFactory.getDefault().createContainer(...)
+	 * @return IContainer instance. The provider implementation must return a
+	 *         valid object implementing IContainer OR throw a
+	 *         ContainerCreateException. Null will not be returned.
+	 * @throws ContainerCreateException
+	 */
+	public IContainer createInstance(ContainerTypeDescription description, Object[] parameters) throws ContainerCreateException;
+
+	/**
+	 * Get array of supported adapters for the given container type description.
+	 * Providers implement this method to allow clients to inspect the adapter
+	 * types exposed by the container described by the given description.
+	 * 
+	 * The returned array entries will be the fully qualified names of the
+	 * adapter classes.
+	 * 
+	 * Note that the returned types do not guarantee that a subsequent call to
+	 * {@link IContainer#getAdapter(Class)} with the same type name as a
+	 * returned value will return a non-<code>null</code> result. In other
+	 * words, even if the class name is in the returned array, subsequent calls
+	 * to {@link IContainer#getAdapter(Class)} may still return
+	 * <code>null</code>.
+	 * 
+	 * @param description
+	 *            the ContainerTypeDescription to report adapters for. Must not
+	 *            be <code>null</code>.
+	 * @return String[] of supported adapters. The entries in the returned array
+	 *         will be the fully qualified class names of adapters supported by
+	 *         the given description. <code>null</code> may be returned by
+	 *         the provider if no adapters are supported for this description.
+	 */
+	public String[] getSupportedAdapterTypes(ContainerTypeDescription description);
+
+	/**
+	 * Get array of parameter types for given container type description.
+	 * Providers implement this method to allow clients to inspect the available
+	 * set of parameter types understood for calls to
+	 * {@link #createInstance(ContainerTypeDescription, Object[])}.
+	 * <p>
+	 * </p>
+	 * Each of the rows of the returned array specifies a Class[] of parameter
+	 * types. These parameter types correspond to the types of Object[] that can
+	 * be passed into the second parameter of
+	 * {@link #createInstance(ContainerTypeDescription, Object[])}.
+	 * <p>
+	 * </p>
+	 * Consider the following example:
+	 * <p>
+	 * </p>
+	 * 
+	 * <pre>
+	 * public Class[][] getSupportedParameterTypes() {
+	 * 	return new Class[][] { { String.class }, { String.class, String.class } };
+	 * }
+	 * </pre>
+	 * 
+	 * The above means that there are two acceptable values for the Object []
+	 * passed into {@link #createInstance(ContainerTypeDescription, Object[])}:
+	 * 1) a single String, and 2) two Strings. These would therefore be
+	 * acceptable as input to createInstance:
+	 * 
+	 * <pre>
+	 * IContainer container = ContainerFactory.getDefault().createContainer(
+	 * 		description, new Object[] { "Hello" });
+	 * 
+	 * IContainer container2 = ContainerFactory.getDefault().createContainer(
+	 * 		description, new Object[] { "Hello" });
+	 * </pre>
+	 * 
+	 * <p>
+	 * </p>
+	 * 
+	 * @param description
+	 *            the ContainerTypeDescription to return parameter types for
+	 * @return Class[][] array of Class[]s. Each row in the table corresponds to
+	 *         a Class[] that describes the types of Objects in Object[] for
+	 *         second parameter to
+	 *         {@link #createInstance(ContainerTypeDescription, Object[])}.
+	 *         <code>null</code> returned if no parameter types supported for
+	 *         given description.
+	 */
+	public Class[][] getSupportedParameterTypes(ContainerTypeDescription description);
+
+	public String[] getSupportedIntents(ContainerTypeDescription description);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java
new file mode 100644
index 0000000..7588fd4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/provider/IRemoteServiceContainerInstantiator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   Composent, Inc. - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.core.provider;
+
+import java.util.Dictionary;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+
+/**
+ * Interface that must be implemented by ECF remote service provider implementations.
+ * @since 3.1
+ * 
+ */
+public interface IRemoteServiceContainerInstantiator {
+
+	// Remote Service Exporter
+	/**
+	 * Get supported configs for the given ContainerTypeDescription.  This method
+	 * will be called to determine what the OSGi remote service supported config types are for the given description during
+	 * the search for the service exporter provider/containers upon remote service registration.
+	 * 
+	 * @param description the ContainerTypeDescription to return the supported configs for.  
+	 * Will not be <code>null</code>.
+	 * @return String[] the supported config types.  <code>null</code> may be returned if the 
+	 * given description does not support any config types.
+	 */
+	public String[] getSupportedConfigs(ContainerTypeDescription description);
+
+	/**
+	 * Get supported intents for the given ContainerTypeDescription.  This method
+	 * will be called to determine what the OSGi remote service supported intents are for the given description during
+	 * the search for the service exporter provider/containers upon remote service registration.
+	 * 
+	 * @param description the ContainerTypeDescription to return the supported intents for.  
+	 * Will not be <code>null</code>.
+	 * @return String[] the supported intents.  <code>null</code> may be returned if the 
+	 * given description does not support any intents.
+	 */
+	public String[] getSupportedIntents(ContainerTypeDescription description);
+
+	// Remote Service Importer
+	/**
+	 * <p>Get the imported config types for a given ContainerTypeDescription for the given exporter supported config types.  This
+	 * method will be called to determine what the local container imported configs are for the given description and
+	 * exporterSupportedConfigTypes.  The local provider can decide which (if any) imported config types should be 
+	 * returned and return them. </p>
+	 * <p></p>
+	 * <p>As an example, consider the config types for the ECF generic provider.  A generic server has a config type
+	 * of 'ecf.generic.server', and the client has 'ecf.generic.server'.  If the generic server exports a given
+	 * service, the exportersSupportedConfigTypes will be '[ecf.generic.server]'.  When this method is called
+	 * with the ecf.generic.client description (i.e. the container type description named 'ecf.generic.client'), it
+	 * should respond with a non-null, non-empty array...e.g.:  [ecf.generic.client].  This indicates that the
+	 * ecf.generic.client can serve as an importer for the given exporter config type.  All, other descriptions
+	 * should return <code>null<code>, to indicate that they cannot import a remote service exported by the given
+	 * exporterSupportedConfigTypes. </p>
+	 * 
+	 * @param description the container type description under consideration.
+	 * @param exporterSupportedConfigs the exporter supported config types under consideration.
+	 * @return String[] indicating the importer's supported config types.  Should be <code>null</code>, unless
+	 * one or more of the exporterSupportedConfigTypes is recognized for the given description.
+	 */
+	public String[] getImportedConfigs(ContainerTypeDescription description, String[] exporterSupportedConfigs);
+
+	/**
+	 * Get the properties associated with the given description, with the given importedConfigTypes, via the given exportedProperties.
+	 * 
+	 * @param description the container type description under consideration.
+	 * @param importedConfigs the imported config types for the given properties.  Will not be <code>null</code>, and
+	 * should be the same values as returned from {@link #getImportedConfigs(ContainerTypeDescription, String[])}.
+	 * @param exportedProperties the properties from the exported service.  Will not be <code>null</code>.
+	 * @return Dictionary that has all of the properties for the importedConfigTypes.  May be <code>null</code> if 
+	 * no properties are associated with the given description, importedConfigTypes, exportedProperties.
+	 */
+	public Dictionary getPropertiesForImportedConfigs(ContainerTypeDescription description, String[] importedConfigs, Dictionary exportedProperties);
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java
new file mode 100644
index 0000000..f7176aa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/BooleanCallback.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.security;
+
+/**
+ * Callback that handles Boolean types
+ * 
+ */
+public class BooleanCallback implements Callback, java.io.Serializable {
+
+	private static final long serialVersionUID = 8660509222691671868L;
+
+	private String prompt;
+
+	private boolean defaultValue;
+
+	private boolean value;
+
+	/**
+	 * Construct a <code>BooleanCallback</code> with a prompt.
+	 * 
+	 * <p>
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the boolean value.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null or if <code>prompt</code>
+	 *                has a length of 0.
+	 */
+	public BooleanCallback(String prompt) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+	}
+
+	/**
+	 * Construct a <code>NameCallback</code> with a prompt and default name.
+	 * 
+	 * <p>
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the information.
+	 *            <p>
+	 * 
+	 * @param defaultValue
+	 *            the value to be used as the default value displayed with the
+	 *            prompt.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public BooleanCallback(String prompt, boolean defaultValue) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+
+		this.prompt = prompt;
+		this.defaultValue = defaultValue;
+	}
+
+	/**
+	 * Get the prompt.
+	 * 
+	 * @return the prompt value.
+	 */
+	public String getPrompt() {
+		return prompt;
+	}
+
+	/**
+	 * Get the default value.
+	 * 
+	 * @return the default value, or null if this <code>BooleanCallback</code> was
+	 *         not instantiated with a <code>defaultValue</code>.
+	 */
+	public boolean getDefaultValue() {
+		return defaultValue;
+	}
+
+	/**
+	 * Set the retrieved name.
+	 * 
+	 * @param val
+	 *            the retrieved value <code>true</code> or <code>false</code>.
+	 * 
+	 * @see #getValue
+	 */
+	public void setValue(boolean val) {
+		this.value = val;
+	}
+
+	/**
+	 * Get the retrieved value.
+	 * 
+	 * @return the retrieved value <code>true</code> or <code>false</code>.
+	 * 
+	 * @see #setValue
+	 */
+	public boolean getValue() {
+		return value;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/Callback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/Callback.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/Callback.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/Callback.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/CallbackHandler.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/CallbackHandler.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/CallbackHandler.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/CallbackHandler.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ConnectContextFactory.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ConnectContextFactory.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ConnectContextFactory.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ConnectContextFactory.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectContext.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectContext.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectContext.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectContext.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectHandlerPolicy.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectHandlerPolicy.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectHandlerPolicy.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectHandlerPolicy.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectInitiatorPolicy.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectInitiatorPolicy.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectInitiatorPolicy.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IConnectInitiatorPolicy.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/IContainerPolicy.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java
new file mode 100644
index 0000000..0e0115c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/NameCallback.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.security;
+
+/**
+ * Callback that handles String types
+ * 
+ */
+public class NameCallback implements Callback, java.io.Serializable {
+
+	private static final long serialVersionUID = -2506493444608585718L;
+
+	private String prompt;
+
+	private String defaultName;
+
+	private String inputName;
+
+	/**
+	 * Construct a <code>NameCallback</code> with a prompt.
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the name.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public NameCallback(String prompt) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+	}
+
+	/**
+	 * Construct a <code>NameCallback</code> with a prompt and default name.
+	 * 
+	 * <p>
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the information.
+	 *            <p>
+	 * 
+	 * @param defaultName
+	 *            the name to be used as the default name displayed with the
+	 *            prompt.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public NameCallback(String prompt, String defaultName) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+		this.defaultName = defaultName;
+	}
+
+	/**
+	 * Get the prompt.
+	 * 
+	 * <p>
+	 * 
+	 * @return the prompt.
+	 */
+	public String getPrompt() {
+		return prompt;
+	}
+
+	/**
+	 * Get the default name.
+	 * 
+	 * <p>
+	 * 
+	 * @return the default name, or null if this <code>NameCallback</code> was
+	 *         not instantiated with a <code>defaultName</code>.
+	 */
+	public String getDefaultName() {
+		return defaultName;
+	}
+
+	/**
+	 * Set the retrieved name.
+	 * 
+	 * <p>
+	 * 
+	 * @param name
+	 *            the retrieved name (which may be null).
+	 * 
+	 * @see #getName
+	 */
+	public void setName(String name) {
+		this.inputName = name;
+	}
+
+	/**
+	 * Get the retrieved name.
+	 * 
+	 * <p>
+	 * 
+	 * @return the retrieved name (which may be null)
+	 * 
+	 * @see #setName
+	 */
+	public String getName() {
+		return inputName;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/ObjectCallback.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java
new file mode 100644
index 0000000..67d2c7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PassphraseCallback.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.security;
+
+/**
+ * Callback that handles passphrases
+ * 
+ */
+public class PassphraseCallback implements Callback, java.io.Serializable {
+
+	private static final long serialVersionUID = -6036907502015127266L;
+
+	private String prompt;
+
+	private String defaultPassphrase;
+
+	private String inputPassphrase;
+
+	/**
+	 * Construct a <code>PassphraseCallback</code> with a prompt.
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the passphrase.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public PassphraseCallback(String prompt) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+	}
+
+	/**
+	 * Construct a <code>PassphraseCallback</code> with a prompt and default passphrase.
+	 * 
+	 * <p>
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the information.
+	 *            <p>
+	 * 
+	 * @param defaultPassphrase
+	 *            the name to be used as the default name displayed with the
+	 *            prompt.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public PassphraseCallback(String prompt, String defaultPassphrase) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+		this.defaultPassphrase = defaultPassphrase;
+	}
+
+	/**
+	 * Get the prompt.
+	 * 
+	 * <p>
+	 * 
+	 * @return the prompt.
+	 */
+	public String getPrompt() {
+		return prompt;
+	}
+
+	/**
+	 * Get the default passphrase.
+	 * 
+	 * <p>
+	 * 
+	 * @return the default passphrase, or <code>null</code> if this <code>PassphraseCallback</code> was
+	 *         not instantiated with a <code>defaultPassphrase</code>.
+	 */
+	public String getDefaultPassphrase() {
+		return defaultPassphrase;
+	}
+
+	/**
+	 * Set the retrieved passphrase.
+	 * 
+	 * <p>
+	 * 
+	 * @param pw
+	 *            the passphrase (which may be null).
+	 * 
+	 * @see #getPassphrase
+	 */
+	public void setPassphrase(String pw) {
+		this.inputPassphrase = pw;
+	}
+
+	/**
+	 * Get the retrieved passphrase.
+	 * 
+	 * <p>
+	 * 
+	 * @return the retrieved passphrase (which may be null)
+	 * 
+	 * @see #setPassphrase
+	 */
+	public String getPassphrase() {
+		return inputPassphrase;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java
new file mode 100644
index 0000000..92a1c81
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/PasswordCallback.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.security;
+
+/**
+ * Callback that handles passwords
+ * 
+ */
+public class PasswordCallback implements Callback, java.io.Serializable {
+
+	private static final long serialVersionUID = 6940002988125290335L;
+
+	private String prompt;
+
+	private String defaultPassword;
+
+	private String inputPassword;
+
+	/**
+	 * Construct a <code>PasswordCallback</code> with a prompt.
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the name.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public PasswordCallback(String prompt) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+	}
+
+	/**
+	 * Construct a <code>PasswordCallback</code> with a prompt and default password.
+	 * 
+	 * <p>
+	 * 
+	 * @param prompt
+	 *            the prompt used to request the information.
+	 *            <p>
+	 * 
+	 * @param defaultPassword
+	 *            the name to be used as the default name displayed with the
+	 *            prompt.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if <code>prompt</code> is null.
+	 */
+	public PasswordCallback(String prompt, String defaultPassword) {
+		if (prompt == null)
+			throw new IllegalArgumentException("Prompt cannot be null"); //$NON-NLS-1$
+		this.prompt = prompt;
+		this.defaultPassword = defaultPassword;
+	}
+
+	/**
+	 * Get the prompt.
+	 * 
+	 * <p>
+	 * 
+	 * @return the prompt.
+	 */
+	public String getPrompt() {
+		return prompt;
+	}
+
+	/**
+	 * Get the default password.
+	 * 
+	 * <p>
+	 * 
+	 * @return the default password, or <code>null</code> if this <code>PasswordCallback</code> was
+	 *         not instantiated with a <code>defaultPassword</code>.
+	 */
+	public String getDefaultPassword() {
+		return defaultPassword;
+	}
+
+	/**
+	 * Set the retrieved password.
+	 * 
+	 * <p>
+	 * 
+	 * @param pw
+	 *            the password (which may be null).
+	 * 
+	 * @see #getPassword
+	 */
+	public void setPassword(String pw) {
+		this.inputPassword = pw;
+	}
+
+	/**
+	 * Get the retrieved password.
+	 * 
+	 * <p>
+	 * 
+	 * @return the retrieved password (which may be null)
+	 * 
+	 * @see #setPassword
+	 */
+	public String getPassword() {
+		return inputPassword;
+	}
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/UnsupportedCallbackException.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/UnsupportedCallbackException.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/security/UnsupportedCallbackException.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/security/UnsupportedCallbackException.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/start/ECFStartJob.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/start/ECFStartJob.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/start/ECFStartJob.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/start/ECFStartJob.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java
new file mode 100644
index 0000000..6e36cd7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/start/IECFStart.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.start;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * Interface that must be implemented by extensions of the org.eclipse.ecf.start
+ * extension point. Such extensions will have their start method called by a new
+ * Job upon ECF startup.
+ */
+public interface IECFStart {
+	/**
+	 * Run some startup task.
+	 * @param monitor 
+	 * 
+	 * @return IStatus the status of the start
+	 */
+	public IStatus run(IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java
new file mode 100644
index 0000000..3cb453b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableMultiStatus.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2008 EclipseSource and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.status;
+
+import org.eclipse.core.runtime.*;
+
+public class SerializableMultiStatus extends SerializableStatus {
+
+	private static final long serialVersionUID = 2971900808938367039L;
+	/**
+	 * List of child statuses.
+	 */
+	private IStatus[] children = new IStatus[0];
+
+	public SerializableMultiStatus(IStatus status) {
+		this(status.getPlugin(), status.getCode(), status.getMessage(), status.getException());
+		IStatus[] childs = status.getChildren();
+		if (childs != null) {
+			for (int i = 0; i < childs.length; i++) {
+				if (childs[i].isMultiStatus()) {
+					add(new SerializableMultiStatus(childs[i]));
+				} else {
+					add(new SerializableStatus(childs[i]));
+				}
+			}
+		}
+	}
+
+	public SerializableMultiStatus(MultiStatus multiStatus) {
+		this(multiStatus.getPlugin(), multiStatus.getCode(), multiStatus.getMessage(), multiStatus.getException());
+		IStatus[] childs = multiStatus.getChildren();
+		if (childs != null) {
+			for (int i = 0; i < childs.length; i++) {
+				if (childs[i].isMultiStatus()) {
+					add(new SerializableMultiStatus(childs[i]));
+				} else {
+					add(new SerializableStatus(childs[i]));
+				}
+			}
+		}
+	}
+
+	public SerializableMultiStatus(String pluginId, int code, IStatus[] newChildren, String message, Throwable exception) {
+		this(pluginId, code, message, exception);
+		Assert.isLegal(newChildren != null);
+		int maxSeverity = getSeverity();
+		if (newChildren != null) {
+			for (int i = 0; i < newChildren.length; i++) {
+				Assert.isLegal(newChildren[i] != null);
+				int severity = newChildren[i].getSeverity();
+				if (severity > maxSeverity)
+					maxSeverity = severity;
+			}
+			this.children = new IStatus[newChildren.length];
+			System.arraycopy(newChildren, 0, this.children, 0, newChildren.length);
+		}
+		setSeverity(maxSeverity);
+	}
+
+	public SerializableMultiStatus(String pluginId, int code, String message, Throwable exception) {
+		super(OK, pluginId, code, message, exception);
+	}
+
+	/**
+	 * Adds the given status to this multi-status.
+	 * 
+	 * @param status
+	 *            the new child status
+	 */
+	public void add(SerializableStatus status) {
+		Assert.isLegal(status != null);
+		IStatus[] result = new IStatus[children.length + 1];
+		System.arraycopy(children, 0, result, 0, children.length);
+		result[result.length - 1] = status;
+		children = result;
+		int newSev = status.getSeverity();
+		if (newSev > getSeverity()) {
+			setSeverity(newSev);
+		}
+	}
+
+	/**
+	 * Adds all of the children of the given status to this multi-status. Does
+	 * nothing if the given status has no children (which includes the case
+	 * where it is not a multi-status).
+	 * 
+	 * @param status
+	 *            the status whose children are to be added to this one
+	 */
+	public void addAll(SerializableStatus status) {
+		Assert.isLegal(status != null);
+		SerializableStatus[] statuses = (SerializableStatus[]) status.getChildren();
+		for (int i = 0; i < statuses.length; i++) {
+			add(statuses[i]);
+		}
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public IStatus[] getChildren() {
+		return children;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public boolean isMultiStatus() {
+		return true;
+	}
+
+	/**
+	 * Merges the given status into this multi-status. Equivalent to
+	 * <code>add(status)</code> if the given status is not a multi-status.
+	 * Equivalent to <code>addAll(status)</code> if the given status is a
+	 * multi-status.
+	 * 
+	 * @param status
+	 *            the status to merge into this one
+	 * @see #add(SerializableStatus)
+	 * @see #addAll(SerializableStatus)
+	 */
+	public void merge(SerializableStatus status) {
+		Assert.isLegal(status != null);
+		if (!status.isMultiStatus()) {
+			add(status);
+		} else {
+			addAll(status);
+		}
+	}
+
+	/**
+	 * Returns a string representation of the status, suitable for debugging
+	 * purposes only.
+	 * @return String
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer(super.toString());
+		buf.append(" children=["); //$NON-NLS-1$
+		for (int i = 0; i < children.length; i++) {
+			if (i != 0) {
+				buf.append(" "); //$NON-NLS-1$
+			}
+			buf.append(children[i].toString());
+		}
+		buf.append("]"); //$NON-NLS-1$
+		return buf.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java
new file mode 100644
index 0000000..583819d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/status/SerializableStatus.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2008 EclipseSource and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.core.status;
+
+import java.io.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.internal.core.ECFPlugin;
+
+public class SerializableStatus implements IStatus, Serializable {
+
+	private static final long serialVersionUID = -1874392357776889683L;
+
+	public static final IStatus OK_STATUS = new SerializableStatus(OK, ECFPlugin.PLUGIN_ID, OK, "ok", null); //$NON-NLS-1$
+	public static final IStatus CANCEL_STATUS = new SerializableStatus(CANCEL, ECFPlugin.PLUGIN_ID, 1, "", null); //$NON-NLS-1$
+
+	/**
+	 * The severity. One of
+	 * <ul>
+	 * <li><code>CANCEL</code></li>
+	 * <li><code>ERROR</code></li>
+	 * <li><code>WARNING</code></li>
+	 * <li><code>INFO</code></li>
+	 * <li>or <code>OK</code> (0)</li>
+	 * </ul>
+	 */
+	private int severity = OK;
+
+	/**
+	 * Unique identifier of plug-in.
+	 */
+	private String pluginId;
+
+	/**
+	 * Plug-in-specific status code.
+	 */
+	private int code;
+
+	/**
+	 * Message, localized to the current locale.
+	 */
+	private String message;
+
+	/**
+	 * Wrapped exception, or <code>null</code> if none.
+	 */
+	private Throwable exception = null;
+
+	/**
+	 * Constant to avoid generating garbage.
+	 */
+	private static final IStatus[] theEmptyStatusArray = new IStatus[0];
+
+	public SerializableStatus(IStatus status) {
+		setSeverity(status.getSeverity());
+		setPlugin(status.getPlugin());
+		setCode(status.getCode());
+		setMessage(status.getMessage());
+		setException(status.getException());
+	}
+
+	public SerializableStatus(int severity, String pluginId, int code, String message, Throwable exception) {
+		setSeverity(severity);
+		setPlugin(pluginId);
+		setCode(code);
+		setMessage(message);
+		setException(exception);
+	}
+
+	public SerializableStatus(int severity, String pluginId, String message, Throwable exception) {
+		setSeverity(severity);
+		setPlugin(pluginId);
+		setMessage(message);
+		setException(exception);
+		setCode(OK);
+	}
+
+	public SerializableStatus(int severity, String pluginId, String message) {
+		setSeverity(severity);
+		setPlugin(pluginId);
+		setMessage(message);
+		setCode(OK);
+		setException(null);
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public IStatus[] getChildren() {
+		return theEmptyStatusArray;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public int getCode() {
+		return code;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public Throwable getException() {
+		return exception;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public String getMessage() {
+		return message;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public String getPlugin() {
+		return pluginId;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public int getSeverity() {
+		return severity;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public boolean isMultiStatus() {
+		return false;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public boolean isOK() {
+		return severity == OK;
+	}
+
+	/*
+	 * (Intentionally not javadoc'd) Implements the corresponding method on
+	 * <code>IStatus</code>.
+	 */
+	public boolean matches(int severityMask) {
+		return (severity & severityMask) != 0;
+	}
+
+	/**
+	 * Sets the status code.
+	 * 
+	 * @param code
+	 *            the plug-in-specific status code, or <code>OK</code>
+	 */
+	protected void setCode(int code) {
+		this.code = code;
+	}
+
+	/**
+	 * Sets the exception.
+	 * 
+	 * @param exception
+	 *            a low-level exception, or <code>null</code> if not applicable
+	 */
+	protected void setException(Throwable exception) {
+		// null is never serializable (https://bugs.eclipse.org/328772)
+		if (exception != null)
+			this.exception = checkForSerializable(exception);
+	}
+
+	private Throwable checkForSerializable(Throwable exception2) {
+		ObjectOutputStream oos = null;
+		try {
+			oos = new ObjectOutputStream(new ByteArrayOutputStream());
+			oos.writeObject(exception2);
+		} catch (IOException e) {
+			ECFPlugin.getDefault().log(new Status(IStatus.WARNING, ECFPlugin.PLUGIN_ID, IStatus.WARNING, "Exception " + exception2 + " could not be serialized for SerializableStatus", e)); //$NON-NLS-1$ //$NON-NLS-2$
+			// In this case, we'll create a new exception that can be serialized
+			return createNewExceptionFor(exception2);
+		} finally {
+			try {
+				if (oos != null)
+					oos.close();
+			} catch (IOException e) {
+				// do nothing
+			}
+		}
+		return exception2;
+	}
+
+	private Throwable createNewExceptionFor(Throwable exception2) {
+		Exception re = new Exception(exception2.getMessage());
+		// setStackTrace not in Foundation 1.1 as per
+		// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261781
+		// re.setStackTrace(exception2.getStackTrace());
+		return re;
+	}
+
+	/**
+	 * Sets the message. If null is passed, message is set to an empty string.
+	 * 
+	 * @param message
+	 *            a human-readable message, localized to the current locale
+	 */
+	protected void setMessage(String message) {
+		if (message == null)
+			this.message = ""; //$NON-NLS-1$
+		else
+			this.message = message;
+	}
+
+	/**
+	 * Sets the plug-in id.
+	 * 
+	 * @param pluginId
+	 *            the unique identifier of the relevant plug-in
+	 */
+	protected void setPlugin(String pluginId) {
+		Assert.isLegal(pluginId != null && pluginId.length() > 0);
+		this.pluginId = pluginId;
+	}
+
+	/**
+	 * Sets the severity.
+	 * 
+	 * @param severity
+	 *            the severity; one of <code>OK</code>, <code>ERROR</code>,
+	 *            <code>INFO</code>, <code>WARNING</code>, or
+	 *            <code>CANCEL</code>
+	 */
+	protected void setSeverity(int severity) {
+		Assert.isLegal(severity == OK || severity == ERROR || severity == WARNING || severity == INFO || severity == CANCEL);
+		this.severity = severity;
+	}
+
+	/**
+	 * Returns a string representation of the status, suitable for debugging
+	 * purposes only.
+	 * @return String
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append("SerializableStatus "); //$NON-NLS-1$
+		if (severity == OK) {
+			buf.append("OK"); //$NON-NLS-1$
+		} else if (severity == ERROR) {
+			buf.append("ERROR"); //$NON-NLS-1$
+		} else if (severity == WARNING) {
+			buf.append("WARNING"); //$NON-NLS-1$
+		} else if (severity == INFO) {
+			buf.append("INFO"); //$NON-NLS-1$
+		} else if (severity == CANCEL) {
+			buf.append("CANCEL"); //$NON-NLS-1$
+		} else {
+			buf.append("severity="); //$NON-NLS-1$
+			buf.append(severity);
+		}
+		buf.append(": "); //$NON-NLS-1$
+		buf.append(pluginId);
+		buf.append(" code="); //$NON-NLS-1$
+		buf.append(code);
+		buf.append(' ');
+		buf.append(message);
+		buf.append(' ');
+		buf.append(exception);
+		return buf.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java
new file mode 100644
index 0000000..7c249bd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/user/IUser.java
@@ -0,0 +1,44 @@
+/****************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Composent, Inc. - initial API and implementation
+ *****************************************************************************/
+package org.eclipse.ecf.core.user;
+
+import java.io.Serializable;
+import java.util.Map;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.ecf.core.identity.IIdentifiable;
+
+/**
+ * Interface for arbitrary ECF system user. Instances represent a user within
+ * ECF providers and/or clients.
+ */
+public interface IUser extends IIdentifiable, Serializable, IAdaptable {
+	/**
+	 * Get basic name for user. Will not return <code>null</.
+	 * @return String
+	 */
+	public String getName();
+
+	/**
+	 * Get nick name for user.
+	 * 
+	 * @return String the user's nickname. May be <code>null</code> if user
+	 *         has no nickname.
+	 */
+	public String getNickname();
+
+	/**
+	 * Get map of properties associated with this user. May be <code>null</code>.
+	 * 
+	 * @return Map
+	 */
+	public Map getProperties();
+
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/user/User.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/user/User.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/user/User.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/user/User.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/AdapterContainerFilter.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/AdapterContainerFilter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/AdapterContainerFilter.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/AdapterContainerFilter.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ConnectedContainerFilter.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ConnectedContainerFilter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ConnectedContainerFilter.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ConnectedContainerFilter.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerFactoryTracker.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerFactoryTracker.java
new file mode 100644
index 0000000..51aefc6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerFactoryTracker.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.core.util;
+
+import org.eclipse.ecf.core.IContainerFactory;
+import org.eclipse.ecf.core.IContainerManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Service tracker customized to handle tracking the ECF container factory service (singleton).
+ * @since 3.1
+ *
+ */
+public class ContainerFactoryTracker extends ServiceTracker {
+
+	public ContainerFactoryTracker(BundleContext context) {
+		super(context, IContainerManager.class.getName(), null);
+	}
+
+	public IContainerFactory getContainerFactory() {
+		return (IContainerFactory) getService();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerManagerTracker.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerManagerTracker.java
new file mode 100644
index 0000000..5ffb3b0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ContainerManagerTracker.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.ecf.core.util;
+
+import org.eclipse.ecf.core.IContainerManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Service tracker customized to handle tracking the ECF container manager service (singleton).
+ * @since 3.1
+ *
+ */
+public class ContainerManagerTracker extends ServiceTracker {
+
+	public ContainerManagerTracker(BundleContext context) {
+		super(context, IContainerManager.class.getName(), null);
+	}
+
+	public IContainerManager getContainerManager() {
+		return (IContainerManager) getService();
+	}
+}
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Event.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Event.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Event.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Event.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IContainerFilter.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IEventProcessor.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IEventProcessor.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IEventProcessor.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IEventProcessor.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IExceptionHandler.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IExceptionHandler.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IExceptionHandler.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/IExceptionHandler.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Proxy.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Proxy.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Proxy.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/Proxy.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ProxyAddress.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ProxyAddress.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ProxyAddress.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/core/util/ProxyAddress.java
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFDebugOptions.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFDebugOptions.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFDebugOptions.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFDebugOptions.java
diff --git a/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
new file mode 100644
index 0000000..c36c030
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/ECFPlugin.java
@@ -0,0 +1,546 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: Composent, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ecf.internal.core;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.core.*;
+import org.eclipse.ecf.core.provider.IContainerInstantiator;
+import org.eclipse.ecf.core.start.ECFStartJob;
+import org.eclipse.ecf.core.start.IECFStart;
+import org.eclipse.ecf.core.util.*;
+import org.eclipse.ecf.internal.core.identity.Activator;
+import org.osgi.framework.*;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class ECFPlugin implements BundleActivator {
+
+	public static final String PLUGIN_ID = "org.eclipse.ecf"; //$NON-NLS-1$
+
+	private static final String ECFNAMESPACE = PLUGIN_ID;
+
+	private static final String CONTAINER_FACTORY_NAME = "containerFactory"; //$NON-NLS-1$
+
+	private static final String CONTAINER_FACTORY_EPOINT = ECFNAMESPACE + "." + CONTAINER_FACTORY_NAME; //$NON-NLS-1$
+
+	private static final String STARTUP_NAME = "start"; //$NON-NLS-1$
+
+	public static final String START_EPOINT = ECFNAMESPACE + "." + STARTUP_NAME; //$NON-NLS-1$
+
+	public static final String PLUGIN_RESOURCE_BUNDLE = ECFNAMESPACE + ".ECFPluginResources"; //$NON-NLS-1$
+
+	public static final String CLASS_ATTRIBUTE = "class"; //$NON-NLS-1$
+
+	public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
+
+	public static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
+
+	public static final String VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
+
+	public static final String SERVER_ATTRIBUTE = "server"; //$NON-NLS-1$
+
+	public static final String HIDDEN_ATTRIBUTE = "hidden"; //$NON-NLS-1$
+
+	public static final String ASYNCH_ATTRIBUTE = "asynchronous"; //$NON-NLS-1$
+
+	public static final String CONTAINER_NAME = "container"; //$NON-NLS-1$
+
+	public static final String CONTAINER_EPOINT = ECFNAMESPACE + "." + CONTAINER_NAME; //$NON-NLS-1$
+
+	public static final String FACTORY_ATTRIBUTE = "factoryName"; //$NON-NLS-1$
+
+	public static final String ID_ATTRIBUTE = "containerId"; //$NON-NLS-1$
+
+	public static final String PARAMETER_ELEMENT = "parameter"; //$NON-NLS-1$
+
+	public static final String PARAMETER_NAME = "name"; //$NON-NLS-1$
+
+	public static final String PARAMETER_VALUE = "value"; //$NON-NLS-1$
+
+	// The shared instance.
+	private static ECFPlugin plugin;
+
+	private BundleContext context = null;
+
+	private ServiceTracker extensionRegistryTracker = null;
+
+	private Map disposables = new WeakHashMap();
+
+	private IRegistryChangeListener registryManager = null;
+
+	private ServiceRegistration containerFactoryServiceRegistration;
+
+	private ServiceRegistration containerManagerServiceRegistration;
+
+	private ServiceTracker logServiceTracker = null;
+
+	private LogService logService = null;
+
+	private ServiceTracker adapterManagerTracker = null;
+
+	private BundleActivator ecfTrustManager;
+
+	/**
+	 * Returns the shared instance.
+	 * @return ECFPlugin
+	 */
+	public synchronized static ECFPlugin getDefault() {
+		if (plugin == null) {
+			plugin = new ECFPlugin();
+		}
+		return plugin;
+	}
+
+	public ECFPlugin() {
+		// null constructor
+	}
+
+	public void start(BundleContext ctxt) throws Exception {
+		plugin = this;
+		this.context = ctxt;
+
+		// initialize the default ssl socket factory 
+		try {
+			Class ecfSocketFactoryClass = Class.forName("org.eclipse.ecf.internal.ssl.ECFTrustManager"); //$NON-NLS-1$
+			ecfTrustManager = (BundleActivator) ecfSocketFactoryClass.newInstance();
+			ecfTrustManager.start(ctxt);
+		} catch (ClassNotFoundException e) {
+			// will occur if fragment is not installed or not on proper execution environment
+		} catch (Throwable t) {
+			log(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), "Unexpected Error in ECFPlugin.start", t)); //$NON-NLS-1$
+		}
+
+		this.extensionRegistryTracker = new ServiceTracker(ctxt, IExtensionRegistry.class.getName(), null);
+		this.extensionRegistryTracker.open();
+		final IExtensionRegistry registry = getExtensionRegistry();
+		if (registry != null) {
+			this.registryManager = new ECFRegistryManager();
+			registry.addRegistryChangeListener(registryManager);
+		}
+
+		// defer extension execution until first consumer calls
+		final ServiceFactory sf = new ServiceFactory() {
+			public Object getService(Bundle bundle, ServiceRegistration registration) {
+				return ContainerFactory.getDefault();
+			}
+
+			public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
+				// NOP
+			}
+		};
+		containerFactoryServiceRegistration = ctxt.registerService(IContainerFactory.class.getName(), sf, null);
+		containerManagerServiceRegistration = ctxt.registerService(IContainerManager.class.getName(), sf, null);
+
+		// but eagerly start ECF startup extension
+		setupStartExtensionPoint(context);
+	}
+
+	public void initializeExtensions() {
+		setupContainerFactoryExtensionPoint(context);
+		setupContainerExtensionPoint(context);
+	}
+
+	public void stop(BundleContext ctxt) throws Exception {
+		fireDisposables();
+		this.disposables = null;
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null)
+			reg.removeRegistryChangeListener(registryManager);
+		this.registryManager = null;
+		if (ecfTrustManager != null) {
+			ecfTrustManager.stop(ctxt);
+			ecfTrustManager = null;
+		}
+		if (logServiceTracker != null) {
+			logServiceTracker.close();
+			logServiceTracker = null;
+			logService = null;
+		}
+		if (extensionRegistryTracker != null) {
+			extensionRegistryTracker.close();
+			extensionRegistryTracker = null;
+		}
+		if (containerFactoryServiceRegistration != null) {
+			containerFactoryServiceRegistration.unregister();
+			containerFactoryServiceRegistration = null;
+		}
+		if (containerManagerServiceRegistration != null) {
+			containerManagerServiceRegistration.unregister();
+			containerManagerServiceRegistration = null;
+		}
+		if (adapterManagerTracker != null) {
+			adapterManagerTracker.close();
+			adapterManagerTracker = null;
+		}
+		this.context = null;
+	}
+
+	public void addDisposable(IDisposable disposable) {
+		disposables.put(disposable, null);
+	}
+
+	public void removeDisposable(IDisposable disposable) {
+		disposables.remove(disposable);
+	}
+
+	protected void fireDisposables() {
+		for (final Iterator i = disposables.keySet().iterator(); i.hasNext();) {
+			final IDisposable d = (IDisposable) i.next();
+			if (d != null)
+				d.dispose();
+		}
+	}
+
+	public Bundle getBundle() {
+		if (context == null)
+			return null;
+		return context.getBundle();
+	}
+
+	private LogService systemLogService;
+
+	protected LogService getLogService() {
+		if (context == null) {
+			if (systemLogService == null)
+				systemLogService = new SystemLogService(PLUGIN_ID);
+			return systemLogService;
+		}
+		if (logServiceTracker == null) {
+			logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
+			logServiceTracker.open();
+		}
+		logService = (LogService) logServiceTracker.getService();
+		if (logService == null)
+			logService = new SystemLogService(PLUGIN_ID);
+		return logService;
+	}
+
+	public void log(IStatus status) {
+		if (logService == null)
+			logService = getLogService();
+		if (logService != null)
+			logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
+	}
+
+	protected void logException(IStatus status, String method, Throwable exception) {
+		log(status);
+		Trace.catching(ECFPlugin.PLUGIN_ID, ECFDebugOptions.EXCEPTIONS_CATCHING, ECFPlugin.class, method, exception);
+	}
+
+	/**
+	 * Remove extensions for container factory extension point
+	 * 
+	 * @param members
+	 *            the members to remove
+	 */
+	protected void removeContainerFactoryExtensions(IConfigurationElement[] members) {
+		final String method = "removeContainerFactoryExtensions"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
+		// For each configuration element
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			// Get the label of the extender plugin and the ID of the extension.
+			final IExtension extension = member.getDeclaringExtension();
+			String name = null;
+			try {
+				// Get name and get version, if available
+				name = member.getAttribute(NAME_ATTRIBUTE);
+				if (name == null) {
+					name = member.getAttribute(CLASS_ATTRIBUTE);
+				}
+				final IContainerFactory factory = ContainerFactory.getDefault();
+				final ContainerTypeDescription cd = factory.getDescriptionByName(name);
+				if (cd == null || !factory.containsDescription(cd)) {
+					continue;
+				}
+				// remove
+				factory.removeDescription(cd);
+				Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".removed " + cd + " from factory"); //$NON-NLS-1$ //$NON-NLS-2$
+			} catch (final Exception e) {
+				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "ECF container factory with name=" + name + " already found. Ignoring registration for containerFactory extension point=" + extension.getExtensionPointUniqueIdentifier(), null), method, e); //$NON-NLS-1$//$NON-NLS-2$
+			}
+		}
+	}
+
+	void removeContainerExtensions(IConfigurationElement[] members) {
+		final String method = "removeContainerExtensions"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
+		// For each configuration element
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			// The only required attribute is "factoryName"
+			String factoryName = member.getAttribute(FACTORY_ATTRIBUTE);
+			// Skip over if factory name is invalid
+			if (factoryName == null || "".equals(factoryName))continue; //$NON-NLS-1$
+			IContainerManager manager = (IContainerManager) ContainerFactory.getDefault();
+			IContainer[] containers = manager.getAllContainers();
+			if (containers == null)
+				continue;
+			for (int i = 0; i < containers.length; i++) {
+				ContainerTypeDescription containerTypeDescription = manager.getContainerTypeDescription(containers[i].getID());
+				if (containerTypeDescription != null && containerTypeDescription.getName().equals(factoryName)) {
+					// Remove from manager
+					IContainer removedContainer = manager.removeContainer(containers[i]);
+					if (removedContainer != null) {
+						try {
+							containers[i].dispose();
+						} catch (Exception e) {
+							logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Unexpected exception disposing container with factoryName=" + factoryName + " and id=" + containers[i].getID(), null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Add container factory extension point extensions
+	 * 
+	 * @param members
+	 *            to add
+	 */
+	protected void addContainerFactoryExtensions(IConfigurationElement[] members) {
+		final String method = "addContainerFactoryExtensions"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
+		final IContainerFactory factory = ContainerFactory.getDefault();
+		// For each configuration element
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			// Get the label of the extender plugin and the ID of the extension.
+			final IExtension extension = member.getDeclaringExtension();
+			Object exten = null;
+			String name = null;
+			try {
+				// Get value of containerFactory name attribute 
+				name = member.getAttribute(NAME_ATTRIBUTE);
+				if (name != null) {
+					ContainerTypeDescription ctd = factory.getDescriptionByName(name);
+					// If we've got one already by this name, then we skip this new one
+					if (ctd != null) {
+						// log with warning
+						log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Factory already has container type description with name=" + name + ".  Ignoring extension from " + member.getContributor().getName())); //$NON-NLS-1$ //$NON-NLS-2$
+						// and continue
+						continue;
+					}
+				}
+				// The only required attribute is "class"
+				exten = member.createExecutableExtension(CLASS_ATTRIBUTE);
+				final String clazz = exten.getClass().getName();
+
+				if (name == null) {
+					name = clazz;
+				}
+
+				// Get description, if present
+				String description = member.getAttribute(DESCRIPTION_ATTRIBUTE);
+				if (description == null) {
+					description = ""; //$NON-NLS-1$
+				}
+
+				String s = member.getAttribute(SERVER_ATTRIBUTE);
+				final boolean server = (s == null) ? false : Boolean.valueOf(s).booleanValue();
+				s = member.getAttribute(HIDDEN_ATTRIBUTE);
+				final boolean hidden = (s == null) ? false : Boolean.valueOf(s).booleanValue();
+
+				// Now make description instance
+				final ContainerTypeDescription scd = new ContainerTypeDescription(name, (IContainerInstantiator) exten, description, server, hidden);
+
+				if (factory.containsDescription(scd)) {
+					log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Factory already has container type description=" + scd + ".  Ignoring extension from " + member.getContributor().getName())); //$NON-NLS-1$ //$NON-NLS-2$
+					continue;
+				}
+				// Now add the description and we're ready to go.
+				factory.addDescription(scd);
+				Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".added " + scd + " to factory " + factory); //$NON-NLS-1$ //$NON-NLS-2$
+			} catch (final CoreException e) {
+				logException(e.getStatus(), method, e);
+			} catch (final Exception e) {
+				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "ECF container factory with name=" + name + " already found. Ignoring registration for containerFactory extension point=" + extension.getExtensionPointUniqueIdentifier(), null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+
+	void addContainerExtensions(IConfigurationElement[] members) {
+		final String method = "addContainerExtensions"; //$NON-NLS-1$
+		Trace.entering(ECFPlugin.PLUGIN_ID, ECFDebugOptions.METHODS_ENTERING, ECFPlugin.class, method, members);
+		// For each configuration element
+		for (int m = 0; m < members.length; m++) {
+			final IConfigurationElement member = members[m];
+			String factory = null;
+			String id = null;
+			try {
+				// The only required attribute is "factoryName"
+				factory = member.getAttribute(FACTORY_ATTRIBUTE);
+				// Skip over if factory name is invalid
+				if (factory == null || "".equals(factory))continue; //$NON-NLS-1$
+				// get id attribute
+				id = member.getAttribute(ID_ATTRIBUTE);
+				id = (id == null || "".equals(id)) ? null : id; //$NON-NLS-1$
+				Map parameters = getParametersForContainer(member);
+				ContainerFactory.getDefault().createContainer(factory, id, parameters);
+				Trace.trace(ECFPlugin.PLUGIN_ID, ECFDebugOptions.DEBUG, method + ".added container with factoryName=" + factory + " and id=" + id); //$NON-NLS-1$ //$NON-NLS-2$
+			} catch (final CoreException e) {
+				logException(e.getStatus(), method, e);
+			} catch (final Exception e) {
+				logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Unexpected exception creating container with factoryName=" + factory + " and id=" + id, null), method, e); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+
+	Map getParametersForContainer(IConfigurationElement member) {
+		IConfigurationElement[] elements = member.getChildren(PARAMETER_ELEMENT);
+		if (elements == null)
+			return null;
+		Map results = null;
+		for (int i = 0; i < elements.length; i++) {
+			String name = elements[i].getAttribute(PARAMETER_NAME);
+			String value = elements[i].getAttribute(PARAMETER_VALUE);
+			if (name != null && !"".equals(name) && value != null && !"".equals(value)) { //$NON-NLS-1$ //$NON-NLS-2$
+				if (results == null)
+					results = new Properties();
+				results.put(name, value);
+			}
+		}
+		return results;
+	}
+
+	/**
+	 * Setup container factory extension point
+	 * 
+	 * @param bc
+	 *            the BundleContext for this bundle
+	 */
+	protected void setupContainerFactoryExtensionPoint(BundleContext bc) {
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			final IExtensionPoint extensionPoint = reg.getExtensionPoint(CONTAINER_FACTORY_EPOINT);
+			if (extensionPoint == null) {
+				return;
+			}
+			addContainerFactoryExtensions(extensionPoint.getConfigurationElements());
+		}
+	}
+
+	protected void setupContainerExtensionPoint(BundleContext bc) {
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			final IExtensionPoint extensionPoint = reg.getExtensionPoint(CONTAINER_EPOINT);
+			if (extensionPoint == null) {
+				return;
+			}
+			addContainerExtensions(extensionPoint.getConfigurationElements());
+		}
+	}
+
+	public IExtensionRegistry getExtensionRegistry() {
+		if (context == null)
+			return null;
+		return (IExtensionRegistry) extensionRegistryTracker.getService();
+	}
+
+	/**
+	 * Setup start extension point
+	 * 
+	 * @param bc
+	 *            the BundleContext for this bundle
+	 */
+	protected void setupStartExtensionPoint(BundleContext bc) {
+		final IExtensionRegistry reg = getExtensionRegistry();
+		if (reg != null) {
+			final IExtensionPoint extensionPoint = reg.getExtensionPoint(START_EPOINT);
+			if (extensionPoint == null) {
+				return;
+			}
+			runStartExtensions(extensionPoint.getConfigurationElements());
+		}
+	}
+
+	protected void runStartExtensions(IConfigurationElement[] configurationElements) {
+		final String method = "runStartExtensions"; //$NON-NLS-1$
+		// For each configuration element
+		for (int m = 0; m < configurationElements.length; m++) {
+			final IConfigurationElement member = configurationElements[m];
+			try {
+				// The only required attribute is "class"
+				boolean sync = (member.getAttribute(ASYNCH_ATTRIBUTE) == null);
+				IECFStart clazz = (IECFStart) member.createExecutableExtension(CLASS_ATTRIBUTE);
+				startExtension(clazz.getClass().getName(), clazz, sync);
+			} catch (final CoreException e) {
+				logException(e.getStatus(), method, e);
+			} catch (final Exception e) {
+				logException(new Status(IStatus.ERROR, getDefault().getBundle().getSymbolicName(), IStatus.ERROR, "Unknown start exception", e), method, e); //$NON-NLS-1$
+			}
+		}
+	}
+
+	private void startExtension(String name, IECFStart exten, boolean synchronous) {
+		// Create job to do start, and schedule
+		if (synchronous) {
+			IStatus result = null;
+			try {
+				result = exten.run(new NullProgressMonitor());
+			} catch (final Throwable e) {
+				final String message = "startup extension error"; //$NON-NLS-1$
+				logException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, message, e), message, e);
+			}
+			if (result != null && !result.isOK())
+				logException(result, result.getMessage(), result.getException());
+		} else {
+			final ECFStartJob job = new ECFStartJob(name, exten);
+			job.schedule();
+		}
+	}
+
+	protected class ECFRegistryManager implements IRegistryChangeListener {
+		public void registryChanged(IRegistryChangeEvent event) {
+			final IExtensionDelta factoryDeltas[] = event.getExtensionDeltas(ECFNAMESPACE, CONTAINER_FACTORY_NAME);
+			for (int i = 0; i < factoryDeltas.length; i++) {
+				switch (factoryDeltas[i].getKind()) {
+					case IExtensionDelta.ADDED :
+						addContainerFactoryExtensions(factoryDeltas[i].getExtension().getConfigurationElements());
+						break;
+					case IExtensionDelta.REMOVED :
+						removeContainerFactoryExtensions(factoryDeltas[i].getExtension().getConfigurationElements());
+						break;
+				}
+			}
+			final IExtensionDelta containerDeltas[] = event.getExtensionDeltas(ECFNAMESPACE, CONTAINER_NAME);
+			for (int i = 0; i < containerDeltas.length; i++) {
+				switch (containerDeltas[i].getKind()) {
+					case IExtensionDelta.ADDED :
+						addContainerExtensions(containerDeltas[i].getExtension().getConfigurationElements());
+						break;
+					case IExtensionDelta.REMOVED :
+						removeContainerExtensions(containerDeltas[i].getExtension().getConfigurationElements());
+						break;
+				}
+			}
+		}
+	}
+
+	public IAdapterManager getAdapterManager() {
+		if (context == null)
+			return null;
+		// First, try to get the adapter manager via
+		if (adapterManagerTracker == null) {
+			adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null);
+			adapterManagerTracker.open();
+		}
+		IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService();
+		// Then, if the service isn't there, try to get from Platform class via
+		// PlatformHelper class
+		if (adapterManager == null)
+			adapterManager = PlatformHelper.getPlatformAdapterManager();
+		if (adapterManager == null)
+			getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Cannot get adapter manager", null)); //$NON-NLS-1$
+		return adapterManager;
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/IDisposable.java b/eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/IDisposable.java
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/IDisposable.java
rename to eclipse/plugins/org.eclipse.ecf/src/org/eclipse/ecf/internal/core/IDisposable.java
diff --git a/eclipse/plugins/org.eclipse.equinox.app/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.app/META-INF/MANIFEST.MF
index 424ddbf..01e74ee 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.app/META-INF/MANIFEST.MF
@@ -2,12 +2,12 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.app; singleton:=true
-Bundle-Version: 1.2.1.qualifier
+Bundle-Version: 1.3.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Activator: org.eclipse.equinox.internal.app.Activator
 Bundle-Localization: plugin
 Export-Package: 
- org.eclipse.equinox.app;version="1.0",
+ org.eclipse.equinox.app;version="1.1",
  org.eclipse.equinox.internal.app;x-friends:="org.eclipse.core.runtime",
  org.osgi.service.application;version="1.1"
 Import-Package: org.eclipse.osgi.framework.console;resolution:=optional,
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
index f2247bf..cfea0f5 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -37,18 +37,22 @@ public interface IApplication {
 	/**
 	 * Exit object requesting that the command passed back be executed.  Typically
 	 * this is used to relaunch Eclipse with different command line arguments.  When the executable is
-	 * relaunched the command line will be retrieved from the <code>eclipse.exitdata</code> system property.  
+	 * relaunched the command line will be retrieved from the 
+	 * {@link IApplicationContext#EXIT_DATA_PROPERTY eclipse.exitdata} system property.  
 	 */
 	public static final Integer EXIT_RELAUNCH = new Integer(24);
 
 	/**
-	 * Starts this application with the given context and returns a result.  This 
-	 * method must not exit until the application is finished and is ready to exit.
-	 * The content of the context is unchecked and should conform to the expectations of
-	 * the application being invoked.<p>
-	 * 
+	 * Starts this application with the given context and returns a result.  The content of 
+	 * the context is unchecked and should conform to the expectations of the application being 
+	 * invoked.  This method can return the value {@link IApplicationContext#EXIT_ASYNC_RESULT} if 
+	 * the application will deliver its results asynchronously with the 
+	 * {@link IApplicationContext#setResult(Object, IApplication)} method; otherwise this method must not exit 
+	 * until the application is finished and is ready to exit.
+	 * <p>
 	 * Applications can return any object they like.  If an <code>Integer</code> is returned
 	 * it is treated as the program exit code if Eclipse is exiting.
+	 * </p>
 	 * <p>
 	 * Note: This method is called by the platform; it is not intended
 	 * to be called directly by clients.
@@ -57,6 +61,7 @@ public interface IApplication {
 	 * @see #EXIT_OK
 	 * @see #EXIT_RESTART
 	 * @see #EXIT_RELAUNCH
+	 * @see IApplicationContext#EXIT_ASYNC_RESULT
 	 * @param context the application context to pass to the application
 	 * @exception Exception if there is a problem running this application.
 	 */
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplicationContext.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplicationContext.java
index dc00952..d1ee8e3 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplicationContext.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/app/IApplicationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,30 @@ import org.osgi.service.application.ApplicationDescriptor;
  * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface IApplicationContext {
+
+	/**
+	 * A system property that may be set by an application to specify exit data
+	 * for the application. The value of the property must be a <code>String</code>.
+	 * <p>
+	 * Typically applications do not need to set this property.  If an error is detected
+	 * while launching or running an application then the launcher will set this property 
+	 * automatically in order to display a message to the end user.  An application may
+	 * set this property for the following reasons:
+	 * <ul>
+	 *   <li>To provide the command line arguments to relaunch the eclipse platform.  See
+	 *   {@link IApplication#EXIT_RELAUNCH}</li>
+	 *   <li>To provide an error message that will be displayed to the end user.  This will
+	 *   cause an error dialog to be displayed to the user, this option should not be used
+	 *   by headless applications.</li>
+	 *   <li>To suppress all error dialogs displayed by the launcher this property can be 
+	 *   set to the empty <code>String</code>.  This is useful for 
+	 *   headless applications where error dialogs must never be displayed.</li>
+	 * </ul>
+	 * </p>
+	 * @since 1.3
+	 */
+	public static final String EXIT_DATA_PROPERTY = "eclipse.exitdata"; //$NON-NLS-1$
+
 	/**
 	 * A key used to store arguments for the application.  The content of this argument 
 	 * is unchecked and should conform to the expectations of the application being invoked.  
@@ -38,6 +62,15 @@ public interface IApplicationContext {
 	public static final String APPLICATION_ARGS = "application.args"; //$NON-NLS-1$
 
 	/**
+	 * Exit object that indicates the application result will be delivered asynchronously.
+	 * This object must be returned by the method {@link IApplication#start(IApplicationContext)}
+	 * for applications which deliver a result asynchronously with the method
+	 * {@link IApplicationContext#setResult(Object, IApplication)}.
+	 * @since 1.3
+	 */
+	public static final Object EXIT_ASYNC_RESULT = new Object();
+
+	/**
 	 * The arguments used for the application.  The arguments from 
 	 * {@link ApplicationDescriptor#launch(Map)} are used as the arguments
 	 * for this context when an application is launched.
@@ -100,4 +133,30 @@ public interface IApplicationContext {
 	 * @return the bundle which defines the product or <code>null</code> if none
 	 */
 	public Bundle getBrandingBundle();
+
+	/**
+	 * Sets the result of the application asynchronously.  This method can only be used
+	 * after the application's {@link IApplication#start(IApplicationContext) start} 
+	 * method has returned the value of {@link IApplicationContext#EXIT_ASYNC_RESULT}.
+	 * <p>
+	 * The specified application must be the same application instance which is 
+	 * associated with this application context.  In other word the application instance
+	 * for which {@link IApplication#start(IApplicationContext)} was called with this 
+	 * application context; otherwise an <code>IllegalArgumentException</code> is
+	 * thrown.
+	 * </p>
+	 * 
+	 * @param result the result value for the application.  May be null.
+	 * @param application the application instance associated with this application context
+	 * @throws IllegalStateException if {@link IApplicationContext#EXIT_ASYNC_RESULT} was
+	 *   not returned by the application's {@link IApplication#start(IApplicationContext) start}
+	 *   method or if the result has already been set for this application context.
+	 * @throws IllegalArgumentException if the specified application is not the same 
+	 *   application instance associated with this application context.
+	 *   
+	 * 
+	 * @since 1.3
+	 */
+	public void setResult(Object result, IApplication application);
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/DefaultApplicationListener.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/DefaultApplicationListener.java
index ada71c2..5cc1a24 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/DefaultApplicationListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/DefaultApplicationListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -58,6 +58,10 @@ public class DefaultApplicationListener implements ApplicationRunnable, ServiceT
 	public Object run(Object context) {
 		if (handleTracker == null)
 			return getResult(); // app has ended, return the result
+		EclipseAppHandle anyThreadedDefaultApp = (EclipseAppHandle) handleTracker.getService();
+		if (anyThreadedDefaultApp != null)
+			// We now need to actual launch the application; this will run the application on another thread.
+			AnyThreadAppLauncher.launchEclipseApplication(anyThreadedDefaultApp);
 		try {
 			while (waitOnRunning()) {
 				EclipseAppHandle mainHandle = getMainHandle();
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
index db192a4..55e2f23 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,7 +58,9 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 	static final int LOCKED_MAIN_THREAD_RUNNING = 5;
 
 	final BundleContext context;
+	private final Object lock = new Object();
 	// A map of ApplicationDescriptors keyed by eclipse application ID
+	/* @GuardedBy(lock) */
 	final private HashMap apps = new HashMap();
 
 	final private IExtensionRegistry extensionRegistry;
@@ -66,12 +68,16 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 	private IBranding branding;
 	private boolean missingProductReported;
 
-	// the currently active application handles
-	final private Collection activeHandles = new ArrayList();
-	private EclipseAppHandle activeMain;
-	private EclipseAppHandle activeGlobalSingleton;
-	private EclipseAppHandle activeScopedSingleton;
-	private HashMap activeLimited;
+	/* @GuardedBy(lock) */
+	final private Collection activeHandles = new ArrayList(); // the currently active application handles
+	/* @GuardedBy(lock) */
+	private EclipseAppHandle activeMain; // the handle currently running on the main thread
+	/* @GuardedBy(lock) */
+	private EclipseAppHandle activeGlobalSingleton; // the current global singleton handle
+	/* @GuardedBy(lock) */
+	private EclipseAppHandle activeScopedSingleton; // the current scoped singleton handle
+	/* @GuardedBy(lock) */
+	private HashMap/*<<String> <ArrayList <EclipseAppHandle>> */activeLimited; // Map of handles that have cardinality limits
 	private String defaultAppId;
 	private DefaultApplicationListener defaultAppListener;
 	private ParameterizedRunnable defaultMainThreadAppHandle; // holds the default app handle to be run on the main thread
@@ -119,12 +125,12 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 	 */
 	private EclipseAppDescriptor getAppDescriptor(String applicationId) {
 		EclipseAppDescriptor result = null;
-		synchronized (apps) {
+		synchronized (lock) {
 			result = (EclipseAppDescriptor) apps.get(applicationId);
 		}
 		if (result == null) {
 			registerAppDescriptor(applicationId); // try again just in case we are waiting for an event
-			synchronized (apps) {
+			synchronized (lock) {
 				result = (EclipseAppDescriptor) apps.get(applicationId);
 			}
 		}
@@ -135,7 +141,7 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 		if (Activator.DEBUG)
 			System.out.println("Creating application descriptor: " + appExtension.getUniqueIdentifier()); //$NON-NLS-1$
 		String iconPath = null;
-		synchronized (apps) {
+		synchronized (lock) {
 			EclipseAppDescriptor appDescriptor = (EclipseAppDescriptor) apps.get(appExtension.getUniqueIdentifier());
 			if (appDescriptor != null)
 				return appDescriptor;
@@ -190,7 +196,7 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 	private EclipseAppDescriptor removeAppDescriptor(String applicationId) {
 		if (Activator.DEBUG)
 			System.out.println("Removing application descriptor: " + applicationId); //$NON-NLS-1$
-		synchronized (apps) {
+		synchronized (lock) {
 			EclipseAppDescriptor appDescriptor = (EclipseAppDescriptor) apps.remove(applicationId);
 			if (appDescriptor == null)
 				return null;
@@ -319,7 +325,7 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 						defaultMainThreadAppHandle = appHandle;
 						return;
 					}
-					throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR);
+					throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, NLS.bind(Messages.application_error_noMainThread, appHandle.getInstanceId()));
 				}
 				curDefaultApplicationListener = defaultAppListener;
 				curMissingAppLauncher = missingAppLauncher;
@@ -331,10 +337,9 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 			else
 				appLauncher.launch(appHandle, appHandle.getArguments().get(IApplicationContext.APPLICATION_ARGS));
 		} else {
-			AnyThreadAppLauncher.launchEclipseApplication(appHandle);
-			DefaultApplicationListener curDefaultApplicationListener = null;
-			MainApplicationLauncher curMissingAppLauncher = null;
 			if (isDefault) {
+				DefaultApplicationListener curDefaultApplicationListener = null;
+				MainApplicationLauncher curMissingAppLauncher = null;
 				ApplicationLauncher appLauncher = null;
 				synchronized (this) {
 					appLauncher = (ApplicationLauncher) launcherTracker.getService();
@@ -353,6 +358,8 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 					curMissingAppLauncher.launch(curDefaultApplicationListener);
 				else
 					appLauncher.launch(curDefaultApplicationListener, null);
+			} else {
+				AnyThreadAppLauncher.launchEclipseApplication(appHandle);
 			}
 		}
 	}
@@ -458,105 +465,111 @@ public class EclipseAppContainer implements IRegistryEventListener, SynchronousB
 	}
 
 	private void refreshAppDescriptors() {
-		synchronized (apps) {
+		synchronized (lock) {
 			for (Iterator allApps = apps.values().iterator(); allApps.hasNext();)
 				((EclipseAppDescriptor) allApps.next()).refreshProperties();
 		}
 	}
 
-	synchronized void lock(EclipseAppHandle appHandle) throws ApplicationException {
+	void lock(EclipseAppHandle appHandle) throws ApplicationException {
 		EclipseAppDescriptor eclipseApp = (EclipseAppDescriptor) appHandle.getApplicationDescriptor();
-		switch (isLocked(eclipseApp)) {
-			case NOT_LOCKED :
-				break;
-			case LOCKED_SINGLETON_GLOBAL_RUNNING :
-				throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.singleton_running, activeGlobalSingleton.getInstanceId()));
-			case LOCKED_SINGLETON_GLOBAL_APPS_RUNNING :
-				throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, Messages.apps_running);
-			case LOCKED_SINGLETON_SCOPED_RUNNING :
-				throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.singleton_running, activeScopedSingleton.getInstanceId()));
-			case LOCKED_SINGLETON_LIMITED_RUNNING :
-				throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.max_running, eclipseApp.getApplicationId()));
-			case LOCKED_MAIN_THREAD_RUNNING :
-				throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.main_running, activeMain.getInstanceId()));
-			default :
-				break;
-		}
+		synchronized (lock) {
+			switch (isLocked(eclipseApp)) {
+				case NOT_LOCKED :
+					break;
+				case LOCKED_SINGLETON_GLOBAL_RUNNING :
+					throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.singleton_running, activeGlobalSingleton.getInstanceId()));
+				case LOCKED_SINGLETON_GLOBAL_APPS_RUNNING :
+					throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, Messages.apps_running);
+				case LOCKED_SINGLETON_SCOPED_RUNNING :
+					throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.singleton_running, activeScopedSingleton.getInstanceId()));
+				case LOCKED_SINGLETON_LIMITED_RUNNING :
+					throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.max_running, eclipseApp.getApplicationId()));
+				case LOCKED_MAIN_THREAD_RUNNING :
+					throw new ApplicationException(ApplicationException.APPLICATION_NOT_LAUNCHABLE, NLS.bind(Messages.main_running, activeMain.getInstanceId()));
+				default :
+					break;
+			}
 
-		// ok we can now successfully lock the container
-		switch (eclipseApp.getCardinalityType()) {
-			case EclipseAppDescriptor.FLAG_CARD_SINGLETON_GLOGAL :
-				activeGlobalSingleton = appHandle;
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_SINGLETON_SCOPED :
-				activeScopedSingleton = appHandle;
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_LIMITED :
-				if (activeLimited == null)
-					activeLimited = new HashMap(3);
-				ArrayList limited = (ArrayList) activeLimited.get(eclipseApp.getApplicationId());
-				if (limited == null) {
-					limited = new ArrayList(eclipseApp.getCardinality());
-					activeLimited.put(eclipseApp.getApplicationId(), limited);
-				}
-				limited.add(appHandle);
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_UNLIMITED :
-				break;
-			default :
-				break;
-		}
-		if (eclipseApp.getThreadType() == EclipseAppDescriptor.FLAG_TYPE_MAIN_THREAD)
-			activeMain = appHandle;
-		activeHandles.add(appHandle);
-		refreshAppDescriptors();
-	}
-
-	synchronized void unlock(EclipseAppHandle appHandle) {
-		if (activeGlobalSingleton == appHandle)
-			activeGlobalSingleton = null;
-		else if (activeScopedSingleton == appHandle)
-			activeScopedSingleton = null;
-		else if (((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getCardinalityType() == EclipseAppDescriptor.FLAG_CARD_LIMITED) {
-			if (activeLimited != null) {
-				ArrayList limited = (ArrayList) activeLimited.get(((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getApplicationId());
-				if (limited != null)
-					limited.remove(appHandle);
+			// ok we can now successfully lock the container
+			switch (eclipseApp.getCardinalityType()) {
+				case EclipseAppDescriptor.FLAG_CARD_SINGLETON_GLOGAL :
+					activeGlobalSingleton = appHandle;
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_SINGLETON_SCOPED :
+					activeScopedSingleton = appHandle;
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_LIMITED :
+					if (activeLimited == null)
+						activeLimited = new HashMap(3);
+					ArrayList limited = (ArrayList) activeLimited.get(eclipseApp.getApplicationId());
+					if (limited == null) {
+						limited = new ArrayList(eclipseApp.getCardinality());
+						activeLimited.put(eclipseApp.getApplicationId(), limited);
+					}
+					limited.add(appHandle);
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_UNLIMITED :
+					break;
+				default :
+					break;
 			}
+			if (eclipseApp.getThreadType() == EclipseAppDescriptor.FLAG_TYPE_MAIN_THREAD)
+				activeMain = appHandle;
+			activeHandles.add(appHandle);
+			refreshAppDescriptors();
 		}
-		if (activeMain == appHandle)
-			activeMain = null;
-		if (activeHandles.remove(appHandle))
-			refreshAppDescriptors(); // only refresh descriptors if we really unlocked something
-	}
-
-	synchronized int isLocked(EclipseAppDescriptor eclipseApp) {
-		if (activeGlobalSingleton != null)
-			return LOCKED_SINGLETON_GLOBAL_RUNNING;
-		switch (eclipseApp.getCardinalityType()) {
-			case EclipseAppDescriptor.FLAG_CARD_SINGLETON_GLOGAL :
-				if (activeHandles.size() > 0)
-					return LOCKED_SINGLETON_GLOBAL_APPS_RUNNING;
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_SINGLETON_SCOPED :
-				if (activeScopedSingleton != null)
-					return LOCKED_SINGLETON_SCOPED_RUNNING;
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_LIMITED :
+	}
+
+	void unlock(EclipseAppHandle appHandle) {
+		synchronized (lock) {
+			if (activeGlobalSingleton == appHandle)
+				activeGlobalSingleton = null;
+			else if (activeScopedSingleton == appHandle)
+				activeScopedSingleton = null;
+			else if (((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getCardinalityType() == EclipseAppDescriptor.FLAG_CARD_LIMITED) {
 				if (activeLimited != null) {
-					ArrayList limited = (ArrayList) activeLimited.get(eclipseApp.getApplicationId());
-					if (limited != null && limited.size() >= eclipseApp.getCardinality())
-						return LOCKED_SINGLETON_LIMITED_RUNNING;
+					ArrayList limited = (ArrayList) activeLimited.get(((EclipseAppDescriptor) appHandle.getApplicationDescriptor()).getApplicationId());
+					if (limited != null)
+						limited.remove(appHandle);
 				}
-				break;
-			case EclipseAppDescriptor.FLAG_CARD_UNLIMITED :
-				break;
-			default :
-				break;
+			}
+			if (activeMain == appHandle)
+				activeMain = null;
+			if (activeHandles.remove(appHandle))
+				refreshAppDescriptors(); // only refresh descriptors if we really unlocked something
+		}
+	}
+
+	int isLocked(EclipseAppDescriptor eclipseApp) {
+		synchronized (lock) {
+			if (activeGlobalSingleton != null)
+				return LOCKED_SINGLETON_GLOBAL_RUNNING;
+			switch (eclipseApp.getCardinalityType()) {
+				case EclipseAppDescriptor.FLAG_CARD_SINGLETON_GLOGAL :
+					if (activeHandles.size() > 0)
+						return LOCKED_SINGLETON_GLOBAL_APPS_RUNNING;
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_SINGLETON_SCOPED :
+					if (activeScopedSingleton != null)
+						return LOCKED_SINGLETON_SCOPED_RUNNING;
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_LIMITED :
+					if (activeLimited != null) {
+						ArrayList limited = (ArrayList) activeLimited.get(eclipseApp.getApplicationId());
+						if (limited != null && limited.size() >= eclipseApp.getCardinality())
+							return LOCKED_SINGLETON_LIMITED_RUNNING;
+					}
+					break;
+				case EclipseAppDescriptor.FLAG_CARD_UNLIMITED :
+					break;
+				default :
+					break;
+			}
+			if (eclipseApp.getThreadType() == EclipseAppDescriptor.FLAG_TYPE_MAIN_THREAD && activeMain != null)
+				return LOCKED_MAIN_THREAD_RUNNING;
+			return NOT_LOCKED;
 		}
-		if (eclipseApp.getThreadType() == EclipseAppDescriptor.FLAG_TYPE_MAIN_THREAD && activeMain != null)
-			return LOCKED_MAIN_THREAD_RUNNING;
-		return NOT_LOCKED;
 	}
 
 	static Object callMethod(Object obj, String methodName, Class[] argTypes, Object[] args) {
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java
index 057bae2..c302f65 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,7 @@ public class EclipseAppHandle extends ApplicationHandle implements ApplicationRu
 	private static final String STARTING = "org.eclipse.equinox.app.starting"; //$NON-NLS-1$
 	private static final String STOPPED = "org.eclipse.equinox.app.stopped"; //$NON-NLS-1$
 	private static final String PROP_ECLIPSE_EXITCODE = "eclipse.exitcode"; //$NON-NLS-1$
+	private static final Object NULL_RESULT = new Object();
 
 	private volatile ServiceRegistration handleRegistration;
 	private int status = EclipseAppHandle.FLAG_STARTING;
@@ -46,6 +47,7 @@ public class EclipseAppHandle extends ApplicationHandle implements ApplicationRu
 	private final Boolean defaultAppInstance;
 	private Object result;
 	private boolean setResult = false;
+	private boolean setAsyncResult = false;
 	private final boolean[] registrationLock = new boolean[] {true};
 
 	/*
@@ -194,26 +196,46 @@ public class EclipseAppHandle extends ApplicationHandle implements ApplicationRu
 				tempResult = ((IApplication) app).start(this);
 			else
 				tempResult = EclipseAppContainer.callMethodWithException(app, "run", new Class[] {Object.class}, new Object[] {context}); //$NON-NLS-1$
+			if (tempResult == null)
+				tempResult = NULL_RESULT;
 		} finally {
-			synchronized (this) {
-				result = tempResult;
-				setResult = true;
-				application = null;
-				notifyAll();
-				// The application exited itself; notify the app context
-				setAppStatus(EclipseAppHandle.FLAG_STOPPING); // must ensure the STOPPING event is fired
-				setAppStatus(EclipseAppHandle.FLAG_STOPPED);
+			tempResult = setInternalResult(tempResult, false, null);
+		}
+
+		if (Activator.DEBUG)
+			System.out.println(NLS.bind(Messages.application_returned, (new String[] {getApplicationDescriptor().getApplicationId(), tempResult == null ? "null" : tempResult.toString()}))); //$NON-NLS-1$
+		return tempResult;
+	}
+
+	private synchronized Object setInternalResult(Object result, boolean isAsync, IApplication tokenApp) {
+		if (setResult)
+			throw new IllegalStateException("The result of the application is already set."); //$NON-NLS-1$
+		if (isAsync) {
+			if (!setAsyncResult)
+				throw new IllegalStateException("The application must return IApplicationContext.EXIT_ASYNC_RESULT to set asynchronous results."); //$NON-NLS-1$
+			if (application != tokenApp)
+				throw new IllegalArgumentException("The application is not the correct instance for this application context."); //$NON-NLS-1$
+		} else {
+			if (result == IApplicationContext.EXIT_ASYNC_RESULT) {
+				setAsyncResult = true;
+				return NULL_RESULT; // the result well be set with setResult
 			}
 		}
+		this.result = result;
+		setResult = true;
+		application = null;
+		notifyAll();
+		// The application exited itself; notify the app context
+		setAppStatus(EclipseAppHandle.FLAG_STOPPING); // must ensure the STOPPING event is fired
+		setAppStatus(EclipseAppHandle.FLAG_STOPPED);
 		// only set the exit code property if this is the default application
-		if (isDefault()) {
-			int exitCode = tempResult instanceof Integer ? ((Integer) tempResult).intValue() : 0;
+		// (bug 321386) only set the exit code if the result != null; when result == null we assume an exception was thrown
+		if (isDefault() && result != null) {
+			int exitCode = result instanceof Integer ? ((Integer) result).intValue() : 0;
 			// Use the EnvironmentInfo Service to set properties
 			Activator.setProperty(PROP_ECLIPSE_EXITCODE, Integer.toString(exitCode));
 		}
-		if (Activator.DEBUG)
-			System.out.println(NLS.bind(Messages.application_returned, (new String[] {getApplicationDescriptor().getApplicationId(), tempResult == null ? "null" : tempResult.toString()}))); //$NON-NLS-1$
-		return tempResult;
+		return result;
 	}
 
 	public void stop() {
@@ -359,12 +381,19 @@ public class EclipseAppHandle extends ApplicationHandle implements ApplicationRu
 			return result;
 		long startTime = System.currentTimeMillis();
 		long delay = timeout;
-		while (!setResult && delay > 0) {
+		while (!setResult && (delay > 0 || timeout == 0)) {
 			wait(delay); // only wait for the specified amount of time
-			delay -= (System.currentTimeMillis() - startTime);
+			if (timeout > 0)
+				delay -= (System.currentTimeMillis() - startTime);
 		}
 		if (result == null)
 			throw new ApplicationException(ApplicationException.APPLICATION_EXITVALUE_NOT_AVAILABLE);
+		if (result == NULL_RESULT)
+			return null;
 		return result;
 	}
+
+	public void setResult(Object result, IApplication application) {
+		setInternalResult(result == null ? NULL_RESULT : result, true, application);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
index 4f2eab8..dd53d48 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ public class Messages extends NLS {
 	public static String application_error_stopping;
 	public static String application_error_state_stopped;
 	public static String application_error_starting;
+	public static String application_error_noMainThread;
 	public static String application_instance_stopped;
 
 	// product
diff --git a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
index 280e5c1..66bdefb 100644
--- a/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ application_errorStartDefault=An error occurred while starting the application
 application_error_stopping=An error occurred while stopping the application: {0}
 application_error_state_stopped=This instance of the application has been stopped:  {0}
 application_error_starting=An error occurred while starting the application: {0}
+application_error_noMainThread = The main thread is not available to launch the application: {0}
 application_instance_stopped=The application instance has been stopped before it could be started: {0}
 ### product
 provider_invalid_general = Errors while processing the product providers.
diff --git a/eclipse/plugins/org.eclipse.equinox.cm/.project b/eclipse/plugins/org.eclipse.equinox.cm/.project
index 7dbe22a..6c15129 100644
--- a/eclipse/plugins/org.eclipse.equinox.cm/.project
+++ b/eclipse/plugins/org.eclipse.equinox.cm/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.cm/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
index 70dc253..abc08c6 100644
--- a/eclipse/plugins/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.cm/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.cm
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.cm.Activator
 Import-Package: org.osgi.framework;version="1.3.0",
  org.osgi.service.cm;version="1.2.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java b/eclipse/plugins/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
index 3af8b62..630dc89 100644
--- a/eclipse/plugins/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2010 Cognos Incorporated, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -228,6 +228,7 @@ class ConfigurationImpl implements Configuration {
 			checkDeleted();
 			configurationAdminFactory.checkConfigurationPermission();
 			this.bundleLocation = bundleLocation;
+			boundBundle = null; // always reset the boundBundle when setBundleLocation is called
 		} finally {
 			unlock();
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.common/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.common/META-INF/MANIFEST.MF
index a056543..6f1a9d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.common/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.common; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-Localization: plugin
 Export-Package: org.eclipse.core.internal.boot;x-friends:="org.eclipse.core.resources,org.eclipse.core.runtime.compatibility,org.eclipse.pde.build",
  org.eclipse.core.internal.runtime;common=split;mandatory:=common;
@@ -14,7 +14,8 @@ Export-Package: org.eclipse.core.internal.boot;x-friends:="org.eclipse.core.reso
    org.eclipse.core.runtime.compatibility,
    org.eclipse.core.filesystem,
    org.eclipse.equinox.security",
- org.eclipse.core.runtime;common=split;version="3.4.0";mandatory:=common
+ org.eclipse.core.runtime;common=split;version="3.4.0";mandatory:=common,
+ org.eclipse.equinox.events;version="1.0.0"
 Bundle-Vendor: %providerName
 Bundle-Activator: org.eclipse.core.internal.runtime.Activator
 Import-Package: org.eclipse.osgi.framework.log,
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLConnection.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLConnection.java
index 2849aac..cac6b1d 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLConnection.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/boot/PlatformURLConnection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -336,7 +336,6 @@ public abstract class PlatformURLConnection extends URLConnection {
 		Version version = null;
 		int underScore = spec.indexOf('_');
 		while (underScore >= 0) {
-			bsn = spec.substring(0, underScore);
 			try {
 				version = Version.parseVersion(spec.substring(underScore + 1));
 			} catch (IllegalArgumentException iae) {
@@ -344,6 +343,7 @@ public abstract class PlatformURLConnection extends URLConnection {
 				underScore = spec.indexOf('_', underScore + 1);
 				continue;
 			}
+			bsn = spec.substring(0, underScore);
 			break;
 		}
 		return new Object[] {bsn, version};
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
index 3aab616..e74ec96 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,12 +8,12 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     David Green - fix factories with non-standard class loading (bug 200068) 
+ *     Filip Hrbek - fix thread safety problem described in bug 305863
  *******************************************************************************/
 package org.eclipse.core.internal.runtime;
 
 import java.util.*;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.*;
 
 /**
  * This class is the standard implementation of <code>IAdapterManager</code>. It provides
@@ -287,6 +287,8 @@ public final class AdapterManager implements IAdapterManager {
 	 * @see org.eclipse.core.runtime.IAdapterManager#getAdapter(java.lang.Object, java.lang.Class)
 	 */
 	public Object getAdapter(Object adaptable, Class adapterType) {
+		Assert.isNotNull(adaptable);
+		Assert.isNotNull(adapterType);
 		IAdapterFactory factory = (IAdapterFactory) getFactories(adaptable.getClass()).get(adapterType.getName());
 		Object result = null;
 		if (factory != null)
@@ -300,6 +302,8 @@ public final class AdapterManager implements IAdapterManager {
 	 * @see org.eclipse.core.runtime.IAdapterManager#getAdapter(java.lang.Object, java.lang.Class)
 	 */
 	public Object getAdapter(Object adaptable, String adapterType) {
+		Assert.isNotNull(adaptable);
+		Assert.isNotNull(adapterType);
 		return getAdapter(adaptable, adapterType, false);
 	}
 
@@ -415,9 +419,6 @@ public final class AdapterManager implements IAdapterManager {
 	}
 
 	public HashMap getFactories() {
-		// avoid the synchronize if we don't have to call it
-		if (lazyFactoryProviders.size() == 0)
-			return factories;
 		synchronized (lazyFactoryProviders) {
 			while (lazyFactoryProviders.size() > 0) {
 				IAdapterManagerProvider provider = (IAdapterManagerProvider) lazyFactoryProviders.remove(0);
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
index 38002a6..4accb47 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,9 +58,27 @@ public class ResourceTranslator {
 	}
 
 	public static ResourceBundle getResourceBundle(Bundle bundle) throws MissingResourceException {
-		if (hasRuntime21(bundle))
-			return ResourceBundle.getBundle("plugin", Locale.getDefault(), createTempClassloader(bundle)); //$NON-NLS-1$
-		return Activator.getDefault().getLocalization(bundle, null);
+		return getResourceBundle(bundle, null);
+	}
+
+	private static ResourceBundle getResourceBundle(Bundle bundle, String language) throws MissingResourceException {
+		if (hasRuntime21(bundle)) {
+			Locale locale = (language == null) ? Locale.getDefault() : new Locale(language);
+			return ResourceBundle.getBundle("plugin", locale, createTempClassloader(bundle)); //$NON-NLS-1$
+		}
+		return Activator.getDefault().getLocalization(bundle, language);
+	}
+
+	public static String[] getResourceString(Bundle bundle, String[] nonTranslated, String locale) {
+		if (bundle == null)
+			return nonTranslated;
+
+		ResourceBundle resourceBundle = getResourceBundle(bundle, locale);
+		String[] translated = new String[nonTranslated.length];
+		for (int i = 0; i < nonTranslated.length; i++) {
+			translated[i] = getResourceString(bundle, nonTranslated[i], resourceBundle);
+		}
+		return translated;
 	}
 
 	private static boolean hasRuntime21(Bundle b) {
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.java
index 4caa243..283362e 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Assert.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@ package org.eclipse.core.runtime;
  * Assertion failure exceptions, like most runtime exceptions, are
  * thrown when something is misbehaving. Assertion failures are invariably
  * unspecified behavior; consequently, clients should never rely on
- * these being thrown (and certainly should not being catching them
+ * these being thrown (and certainly should not be catching them
  * specifically).
  * </p><p>
  * This class can be used without OSGi running.
@@ -38,7 +38,7 @@ public final class Assert {
 	 * not <code>true</code>, an <code>IllegalArgumentException</code>
 	 * is thrown.
 	 *
-	 * @param expression the outcode of the check
+	 * @param expression the outcome of the check
 	 * @return <code>true</code> if the check passes (does not return
 	 *    if the check fails)
 	 * @exception IllegalArgumentException if the legality test failed
@@ -52,7 +52,7 @@ public final class Assert {
 	 * is thrown.
 	 * The given message is included in that exception, to aid debugging.
 	 *
-	 * @param expression the outcode of the check
+	 * @param expression the outcome of the check
 	 * @param message the message to include in the exception
 	 * @return <code>true</code> if the check passes (does not return
 	 *    if the check fails)
@@ -88,7 +88,7 @@ public final class Assert {
 	/** Asserts that the given boolean is <code>true</code>. If this
 	 * is not the case, some kind of unchecked exception is thrown.
 	 *
-	 * @param expression the outcode of the check
+	 * @param expression the outcome of the check
 	 * @return <code>true</code> if the check passes (does not return
 	 *    if the check fails)
 	 */
@@ -100,7 +100,7 @@ public final class Assert {
 	 * is not the case, some kind of unchecked exception is thrown.
 	 * The given message is included in that exception, to aid debugging.
 	 *
-	 * @param expression the outcode of the check
+	 * @param expression the outcome of the check
 	 * @param message the message to include in the exception
 	 * @return <code>true</code> if the check passes (does not return
 	 *    if the check fails)
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.java
index 9bba868..ea2a756 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/CoreException.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,8 +17,7 @@ import org.eclipse.core.internal.runtime.PrintStackUtil;
 /**
  * A checked exception representing a failure.
  * <p>
- * Core exceptions contain a status object describing the 
- * cause of the exception.
+ * Core exceptions contain a status object describing the cause of the exception.
  * </p><p>
  * This class can be used without OSGi running.
  * </p>
@@ -32,7 +31,7 @@ public class CoreException extends Exception {
 	private static final long serialVersionUID = 1L;
 
 	/** Status object. */
-	private IStatus status;
+	private final IStatus status;
 
 	/**
 	 * Creates a new exception with the given status object.  The message
@@ -59,11 +58,19 @@ public class CoreException extends Exception {
 	 * Returns the status object for this exception.
 	 * <p>
 	 *   <b>IMPORTANT:</b><br>
-	 *   The result must NOT be used to log a <code>CoreException</code>
-	 *   (e.g., using <code>yourPlugin.getLog().log(status);</code>),
-	 *   since that code pattern hides the original stacktrace.
-	 *   Instead, create a new {@link Status} with your plug-in ID and
-	 *   this <code>CoreException</code>, and log that new status.
+	 *   The result must NOT be used for logging, error reporting, or as a method 
+	 *   return value, since that code pattern hides the original stack trace. Instead, 
+	 *   create a new {@link Status} with your plug-in ID and this 
+	 *   <code>CoreException</code>, and use that new status for error reporting
+	 *   or as a method return value. For example, instead of:
+	 *   <pre>
+	 *      yourPlugin.getLog().log(exception.getStatus());
+	 *   </pre>
+	 *   Use:
+	 *   <pre>
+	 *      IStatus result = new Status(exception.getStatus().getSeverity(), pluginId, message, exception);
+	 *      yourPlugin.getLog().log(result);
+	 *   </pre>
 	 * </p>
 	 *
 	 * @return a status object
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.java
index 5a7c261..e8d999c 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/NullProgressMonitor.java
@@ -25,7 +25,7 @@ public class NullProgressMonitor implements IProgressMonitor {
 	/**
 	 * Indicates whether cancel has been requested.
 	 */
-	private boolean cancelled = false;
+	private volatile boolean cancelled = false;
 
 	/**
 	 * Constructs a new progress monitor.
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java
index 894b687..3cf8815 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Status.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.core.runtime;
 
-import org.eclipse.core.internal.runtime.IRuntimeConstants;
 import org.eclipse.core.internal.runtime.LocalizationUtils;
 
 /**
@@ -23,17 +22,22 @@ import org.eclipse.core.internal.runtime.LocalizationUtils;
 public class Status implements IStatus {
 
 	/**
-	 * A standard OK status with an "ok"  message.
+	 * Constant used to indicate an unknown plugin id.
+	 */
+	private static final String unknownId = "unknown"; //$NON-NLS-1$
+
+	/**
+	 * A standard OK status with an "ok" message.
 	 *
 	 * @since 3.0
 	 */
-	public static final IStatus OK_STATUS = new Status(OK, IRuntimeConstants.PI_RUNTIME, OK, LocalizationUtils.safeLocalize("ok"), null); //$NON-NLS-1$
+	public static final IStatus OK_STATUS = new Status(OK, unknownId, OK, LocalizationUtils.safeLocalize("ok"), null); //$NON-NLS-1$
 	/**
 	 * A standard CANCEL status with no message.
 	 * 
 	 * @since 3.0
 	 */
-	public static final IStatus CANCEL_STATUS = new Status(CANCEL, IRuntimeConstants.PI_RUNTIME, 1, "", null); //$NON-NLS-1$
+	public static final IStatus CANCEL_STATUS = new Status(CANCEL, unknownId, 1, "", null); //$NON-NLS-1$
 	/**
 	 * The severity. One of
 	 * <ul>
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
index d88b228..284e181 100644
--- a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
@@ -103,7 +103,8 @@ public final class URIUtil {
 		int len = path.length();
 		StringBuffer result = new StringBuffer(len);
 		for (int i = 0; i < 4; i++) {
-			if (i >= len || path.charAt(i) != '/')
+			//	if we have hit the first non-slash character, add another leading slash
+			if (i >= len || result.length() > 0 || path.charAt(i) != '/')
 				result.append('/');
 		}
 		result.append(path);
diff --git a/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/equinox/events/MemoryEventConstants.java b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/equinox/events/MemoryEventConstants.java
new file mode 100644
index 0000000..864982f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.common/src/org/eclipse/equinox/events/MemoryEventConstants.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.events;
+
+/**
+ * Defines constants for memory event handlers.  A memory event handler implements
+ * the <code>org.osgi.service.event.EventHandler</code> interface as specified by the OSGi 
+ * Event Admin Service Specification.
+ * <p>
+ * For example, the following handler is registered to handle critical memory
+ * events:
+ * <pre>
+ * BundleContext context = getContext();
+ * EventHandler handler = getHandler();
+ * Hashtable ht = new Hashtable();
+ * ht.put(EventConstants.EVENT_TOPIC, MemoryEventConstants.TOPIC_CRITICAL);
+ * context.registerService(EventHandler.class.getName(), handler, ht);
+ * </pre>
+ * There is no policy implemented for sending memory events in Equinox or
+ * Eclipse by default.  Another bundle must implement the policy that determines
+ * when to send memory events.  This policy must use the Event Admin Service
+ * to fire memory events to the registered handlers.
+ * </p>
+ * @since 3.6
+ */
+public final class MemoryEventConstants {
+	private MemoryEventConstants() {
+		// prevent construction.
+	}
+
+	/**
+	 * The base topic that all memory events use.
+	 */
+	public static final String TOPIC_BASE = "org/eclipse/equinox/events/MemoryEvent/"; //$NON-NLS-1$
+
+	/**
+	 * A memory event topic for normal memory events.
+	 * Indicates memory is running low at the lowest severity.
+	 * Listeners are requested to release caches that can easily be recomputed.
+	 * The Java VM is not seriously in trouble, but process size is getting higher than 
+	 * is deemed acceptable.
+	 */
+	public static final String TOPIC_NORMAL = TOPIC_BASE + "NORMAL"; //$NON-NLS-1$
+
+	/**
+	 * A memory event topic for serious memory events.
+	 * Indicates memory is running low at medium severity. 
+	 * Listeners are requested to release complex intermediate models
+	 * (.e.g. intermediate build results).
+	 * Memory is getting low and may cause operating system level stress, such as swapping.
+	 */
+	public static final String TOPIC_SERIOUS = TOPIC_BASE + "SERIOUS"; //$NON-NLS-1$
+
+	/**
+	 * A memory event topic for critical memory events.
+	 * Indicates memory is running low at highest severity.
+	 * Listeners are requested to do what ever is possible to free memory.
+	 * Things like free in memory caches, close editors and perspectives, 
+	 * close database connections, etc.
+	 * Restoring these resources and caches constitutes lots of work, but
+	 * memory is so low that drastic measures are required.
+	 */
+
+	public static final String TOPIC_CRITICAL = TOPIC_BASE + "CRITICAL"; //$NON-NLS-1$
+
+	/**
+	 * A memory event topic for all memory events.
+	 */
+	public static final String TOPIC_ALL = TOPIC_BASE + "*"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF
index ab6f5e4..a4c3382 100644
--- a/eclipse/plugins/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.concurrent/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.concurrent
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Vendor: %pluginProvider
 Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
  J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.equinox.device/.project b/eclipse/plugins/org.eclipse.equinox.device/.project
index 5d5c431..d3a61c1 100644
--- a/eclipse/plugins/org.eclipse.equinox.device/.project
+++ b/eclipse/plugins/org.eclipse.equinox.device/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.device/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.device/META-INF/MANIFEST.MF
index 57cac74..3ea648e 100644
--- a/eclipse/plugins/org.eclipse.equinox.device/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.device/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Activator: org.eclipse.equinox.device.Activator
 Bundle-SymbolicName: org.eclipse.equinox.device
 Bundle-Vendor: %bundleVendor
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/.settings/.api_filters b/eclipse/plugins/org.eclipse.equinox.ds/.settings/.api_filters
new file mode 100644
index 0000000..ebd5b7c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/.settings/.api_filters
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component id="org.eclipse.equinox.ds" version="2">
+<resource path="src/org/apache/felix/scr/Component.java" type="org.apache.felix.scr.Component">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.apache.felix.scr.Component"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/apache/felix/scr/Reference.java" type="org.apache.felix.scr.Reference">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.apache.felix.scr.Reference"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="src/org/apache/felix/scr/ScrService.java" type="org.apache.felix.scr.ScrService">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.apache.felix.scr.ScrService"/>
+</message_arguments>
+</filter>
+</resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.ds/META-INF/MANIFEST.MF
index 45c0352..44733c9 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.ds/META-INF/MANIFEST.MF
@@ -2,15 +2,11 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.ds;singleton:=true
-Bundle-Version: 1.1.1.qualifier
+Bundle-Version: 1.2.1.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-Activator: org.eclipse.equinox.internal.ds.Activator
 Bundle-Description: This bundle provides support for OSGi 
- Declarative Services. This module implements a declarative service model,
- which allows a bundle to delay instantiating the service object until
- they are needed, and thus minimizing the resource consumption at
- any point of time. That module is  also one of the core components for
- the OSGi R4.
+ Declarative Services
 Import-Package: 
  org.eclipse.equinox.internal.util.event;version="1.0",
  org.eclipse.equinox.internal.util.hash;version="1.0",
@@ -18,8 +14,10 @@ Import-Package:
  org.eclipse.equinox.internal.util.ref;version="1.0",
  org.eclipse.equinox.internal.util.threadpool;version="1.0",
  org.eclipse.equinox.internal.util.timer;version="1.0",
- org.eclipse.osgi.framework.console;version="1.0",
+ org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
+ org.eclipse.osgi.framework.log;version="1.0.0",
  org.eclipse.osgi.service.debug;version="1.0",
+ org.eclipse.osgi.service.environment;version="1.2.0",
  org.eclipse.osgi.util,
  org.osgi.framework;version="1.3",
  org.osgi.service.cm;version="1.2",
@@ -35,7 +33,8 @@ Export-Package:
  org.eclipse.equinox.internal.util.io;x-internal:=true,
  org.eclipse.equinox.internal.util.xml;x-internal:=true,
  org.eclipse.equinox.internal.util.xml.impl;x-internal:=true,
- org.eclipse.equinox.internal.util.string;x-internal:=true
+ org.eclipse.equinox.internal.util.string;x-internal:=true,
+ org.apache.felix.scr;version="1.2"
 Bundle-RequiredExecutionEnvironment: OSGi/Minimum-1.2,
  CDC-1.1/Foundation-1.1,
  J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/META-INF/p2.inf b/eclipse/plugins/org.eclipse.equinox.ds/META-INF/p2.inf
new file mode 100644
index 0000000..33530fb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/META-INF/p2.inf
@@ -0,0 +1,4 @@
+instructions.configure=\
+  setProgramProperty(propName:equinox.use.ds, propValue:true);
+instructions.unconfigure=\
+  setProgramProperty(propName:equinox.use.ds, propValue:);
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/about.html b/eclipse/plugins/org.eclipse.equinox.ds/about.html
index 40e147d..264e635 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/about.html
+++ b/eclipse/plugins/org.eclipse.equinox.ds/about.html
@@ -24,5 +24,39 @@ provided with the Content.  If no such license exists, contact the Redistributor
 indicated below, the terms and conditions of the EPL still apply to any source code in the Content
 and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
 
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you 
+did not receive this Content directly from the Eclipse Foundation, the following is provided 
+for informational purposes only, and you should look to the Redistributor’s license for 
+terms and conditions of use.</p>
+
+<h4>Felix SCR API</h4>
+<p>The plug-in includes software developed by The Apache Software Foundation as part of the Felix project.</p>
+
+<p>The Felix SCR API binary code can be found in the plug-in JAR in the following files:</p>
+
+<ul>
+ <li>org\apache\felix\scr\Component.class</li>
+ <li>org\apache\felix\scr\Reference.class</li>
+ <li>org\apache\felix\scr\ScrService.class</li>
+</ul>
+
+<p>The Felix SCR API source code can be found in src.zip in the following files:</p>
+
+<ul>
+ <li>org\apache\felix\scr\Component.java</li>
+ <li>org\apache\felix\scr\Reference.java</li>
+ <li>org\apache\felix\scr\ScrService.java</li>
+</ul>
+
+<p>Your use of the Felix SCR API code is subject to the terms and conditions of the Apache License, Version 2.0.  A copy of the license is contained
+in the file <a href="about_files/LICENSE-2.0.txt" target="_blank">LICENSE-2.0.txt</a> and is also available at <a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>.</p>
+
+<p>The Apache attribution notice file <a href="about_files/NOTICE.TXT" target="_blank">NOTICE.TXT</a> is included with the Content in accordance with 4d of the Apache License, Version 2.0
+
+<p>The names "Felix" and "Apache Software Foundation" must not be used to endorse or promote products derived from this 
+software without prior written permission.  For written permission, please contact <a href="mailto:apache at apache.org">apache at apache.org</a>.</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.equinox.app/about_files/LICENSE-2.0.txt b/eclipse/plugins/org.eclipse.equinox.ds/about_files/LICENSE-2.0.txt
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.app/about_files/LICENSE-2.0.txt
copy to eclipse/plugins/org.eclipse.equinox.ds/about_files/LICENSE-2.0.txt
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/about_files/NOTICE.txt b/eclipse/plugins/org.eclipse.equinox.ds/about_files/NOTICE.txt
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.registry/about_files/NOTICE.txt
copy to eclipse/plugins/org.eclipse.equinox.ds/about_files/NOTICE.txt
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/build.properties b/eclipse/plugins/org.eclipse.equinox.ds/build.properties
index eb03646..706e5fc 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.ds/build.properties
@@ -15,5 +15,7 @@ bin.includes = META-INF/,\
                .,\
                about.html,\
                .options,\
-               plugin.properties
-src.includes = about.html
+               plugin.properties,\
+               about_files/
+src.includes = about.html,\
+               about_files/
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Component.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Component.java
new file mode 100644
index 0000000..5d72153
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Component.java
@@ -0,0 +1,314 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr;
+
+import java.util.Dictionary;
+import org.osgi.framework.Bundle;
+import org.osgi.service.component.ComponentInstance;
+
+/**
+ * The <code>Component</code> interface represents a single component managed
+ * by the Service Component Runtime. Management agents may access the Component
+ * instances through the {@link ScrService}.
+ */
+public interface Component {
+
+	/**
+	 * The Component has just been created and is still disabled or it has
+	 * been disabled by calling the {@link #disable()} method (value is 1).
+	 */
+	static final int STATE_DISABLED = 1;
+
+	/**
+	 * The Component is being enabled (value is 512). After the component has
+	 * been enabled it enters the {@link #STATE_UNSATISFIED} state.
+	 * @since 1.2
+	 */
+	static final int STATE_ENABLING = 512;
+
+	/**
+	 * The Component has been enabled and is now going to be activated (value
+	 * is 2).
+	 * @deprecated as of version 1.2 the enabled state is collapsed into the
+	 *      {@link #STATE_UNSATISFIED} state. This status code is never returned
+	 *      from the {@link #getState()} method.
+	 */
+	static final int STATE_ENABLED = 2;
+
+	/**
+	 * The Component activation failed because any dependency is not satisfied
+	 * (value is 4).
+	 */
+	static final int STATE_UNSATISFIED = 4;
+
+	/**
+	 * The Component is currently being activated either because it has been
+	 * enabled or because any dependency which was previously unsatisfied has
+	 * become satisfied (value is 8).
+	 */
+	static final int STATE_ACTIVATING = 8;
+
+	/**
+	 * The Component has successfully been activated and is fully functional
+	 * (value is 16). This is the state of immediate components after
+	 * successful activation. Delayed and Service Factory Components enter
+	 * this state when the service instance has actually be instantiated because
+	 * the service has been acquired.
+	 */
+	static final int STATE_ACTIVE = 16;
+
+	/**
+	 * The Component has successfully been activated but is a Delayed or Service
+	 * Factory Component pending instantiation on first use (value is 32).
+	 */
+	static final int STATE_REGISTERED = 32;
+
+	/**
+	 * The Component is a Component Factory ready to manage Component instances
+	 * from configuration data received from the Configuration Admin Service
+	 * (value is 64).
+	 */
+	static final int STATE_FACTORY = 64;
+
+	/**
+	 * The Component is being deactivated either because it is being disabled
+	 * or because a dependency is not satisfied any more (value is 128). After
+	 * deactivation the Component enters the {@link #STATE_UNSATISFIED} state.
+	 */
+	static final int STATE_DEACTIVATING = 128;
+
+	/**
+	 * The Component is being disabled (value is 1024). After the component has
+	 * been disabled it enters the {@link #STATE_DISABLED} state.
+	 * @since 1.2
+	 */
+	static final int STATE_DISABLING = 1024;
+
+	/**
+	 * The Component is being disposed off (value is 2048). After the component
+	 * has been disposed off it enters the {@link #STATE_DESTROYED} state.
+	 * @since 1.2
+	 */
+	static final int STATE_DISPOSING = 2048;
+
+	/**
+	 * The Component has been destroyed and cannot be used any more (value is
+	 * 256). This state is only used when the bundle declaring the component
+	 * is being stopped and all components have to be removed.
+	 * @deprecated as of version 1.2 this constant has been renamed to
+	 *      {@link #STATE_DISPOSED}.
+	 */
+	static final int STATE_DESTROYED = 256;
+
+	/**
+	 * The Component has been disposed off and cannot be used any more (value is
+	 * 256). This state is used when the bundle declaring the component
+	 * is being stopped and all components have to be removed. This status is
+	 * also the final status of a component after the
+	 * <code>ComponentInstance.dispose()</code> method has been called.
+	 * @since 1.2
+	 */
+	static final int STATE_DISPOSED = 256;
+
+	/**
+	 * Returns the component ID of this component. This ID is managed by the
+	 * SCR.
+	 */
+	long getId();
+
+	/**
+	 * Returns the name of the component, which is also used as the service PID.
+	 * This method provides access to the <code>name</code> attribute of the
+	 * <code>component</code> element.
+	 */
+	String getName();
+
+	/**
+	 * Returns the current state of the Component, which is one of the
+	 * <code>STATE_*</code> constants defined in this interface.
+	 */
+	int getState();
+
+	/**
+	 * Returns the <code>Bundle</code> declaring this component.
+	 */
+	Bundle getBundle();
+
+	/**
+	 * Returns the component factory name or <code>null</code> if this component
+	 * is not defined as a component factory. This method provides access to
+	 * the <code>factory</code> attribute of the <code>component</code>
+	 * element.
+	 */
+	String getFactory();
+
+	/**
+	 * Returns <code>true</code> if this component is a service factory. This
+	 * method returns the value of the <code>serviceFactory</code> attribute of
+	 * the <code>service</code> element. If the component has no service
+	 * element, this method returns <code>false</code>.
+	 */
+	boolean isServiceFactory();
+
+	/**
+	 * Returns the class name of the Component implementation. This method
+	 * provides access to the <code>class</code> attribute of the
+	 * <code>implementation</code> element.
+	 */
+	String getClassName();
+
+	/**
+	 * Returns whether the Component is declared to be enabled initially. This
+	 * method provides access to the <code>enabled</code> attribute of the
+	 * <code>component</code> element.
+	 */
+	boolean isDefaultEnabled();
+
+	/**
+	 * Returns whether the Component is an Immediate or a Delayed Component.
+	 * This method provides access to the <code>immediate</code> attribute of
+	 * the <code>component</code> element.
+	 */
+	boolean isImmediate();
+
+	/**
+	 * Returns an array of service names provided by this Component or
+	 * <code>null</code> if the Component is not registered as a service. This
+	 * method provides access to the <code>interface</code> attributes of the
+	 * <code>provide</code> elements.
+	 */
+	String[] getServices();
+
+	/**
+	 * Returns the properties of the Component. The Dictionary returned is a
+	 * private copy of the actual properties and contains the same entries as
+	 * are used to register the Component as a service and are returned by
+	 * the <code>ComponentContext.getProperties()</code> method.
+	 */
+	Dictionary getProperties();
+
+	/**
+	 * Returns an array of {@link Reference} instances representing the service
+	 * references (or dependencies) of this Component. If the Component has no
+	 * references, <code>null</code> is returned.
+	 */
+	Reference[] getReferences();
+
+	/**
+	 * Returns the <code>org.osgi.service.component.ComponentInstance</code>
+	 * representing this component or <code>null</code> if this component
+	 * is not been activated yet.
+	 */
+	ComponentInstance getComponentInstance();
+
+	/**
+	 * Returns the name of the method to be called when the component is being
+	 * activated.
+	 * <p>
+	 * This method never returns <code>null</code>, that is, if this method is
+	 * not declared in the component descriptor this method returns the
+	 * default value <i>activate</i>.
+	 */
+	String getActivate();
+
+	/**
+	 * Returns <code>true</code> if the name of the method to be called on
+	 * component activation (see {@link #getActivate()} is declared in the
+	 * component descriptor or not.
+	 * <p>
+	 * For a component declared in a Declarative Services 1.0 descriptor, this
+	 * method always returns <code>false</code>.
+	 */
+	boolean isActivateDeclared();
+
+	/**
+	 * Returns the name of the method to be called when the component is being
+	 * deactivated.
+	 * <p>
+	 * This method never returns <code>null</code>, that is, if this method is
+	 * not declared in the component descriptor this method returns the
+	 * default value <i>deactivate</i>.
+	 */
+	String getDeactivate();
+
+	/**
+	 * Returns <code>true</code> if the name of the method to be called on
+	 * component deactivation (see {@link #getDeactivate()} is declared in the
+	 * component descriptor or not.
+	 * <p>
+	 * For a component declared in a Declarative Services 1.0 descriptor, this
+	 * method always returns <code>false</code>.
+	 */
+	boolean isDeactivateDeclared();
+
+	/**
+	 * Returns the name of the method to be called when the component
+	 * configuration has been updated or <code>null</code> if such a method is
+	 * not declared in the component descriptor.
+	 * <p>
+	 * For a component declared in a Declarative Services 1.0 descriptor, this
+	 * method always returns <code>null</code>.
+	 */
+	String getModified();
+
+	/**
+	 * Returns the configuration policy declared in the component descriptor.
+	 * If the component descriptor is a Declarative Services 1.0 descriptor or
+	 * not configuration policy has been declared, the default value
+	 * <i>optional</i> is returned.
+	 * <p>
+	 * The returned string is one of the three policies defined in the
+	 * Declarative Services specification 1.1:
+	 * <dl>
+	 * <dt>optional</dt>
+	 * <dd>Configuration from the Configuration Admin service is supplied to
+	 * the component if available. Otherwise the component is activated without
+	 * Configuration Admin configuration. This is the default value reflecting
+	 * the behaviour of Declarative Services 1.0</dd>
+	 * <dt>require</dt>
+	 * <dd>Configuration is required. The component remains unsatisfied until
+	 * configuration is available from the Configuration Admin service.</dd>
+	 * <dt>ignore</dt>
+	 * <dd>Configuration is ignored. No Configuration Admin service
+	 * configuration is supplied to the component.</dd>
+	 * </dl>
+	 */
+	String getConfigurationPolicy();
+
+	/**
+	 * Enables this Component if it is disabled. If the Component is not
+	 * currently {@link #STATE_DISABLED disabled} this method has no effect. If
+	 * the Component is {@link #STATE_DESTROYED destroyed}, this method throws
+	 * an <code>IllegalStateException</code>.
+	 *
+	 * @throws IllegalStateException If the Component is destroyed.
+	 */
+	void enable();
+
+	/**
+	 * Disables this Component if it is enabled. If the Component is already
+	 * {@link #STATE_DISABLED disabled} this method has no effect. If the
+	 * Component is {@link #STATE_DESTROYED destroyed}, this method throws an
+	 * <code>IllegalStateException</code>.
+	 *
+	 * @throws IllegalStateException If the Component is destroyed.
+	 */
+	void disable();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Reference.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Reference.java
new file mode 100644
index 0000000..b20f667
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/Reference.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr;
+
+import org.osgi.framework.ServiceReference;
+
+/**
+ * The <code>Reference</code> interface represents a single reference (or
+ * dependency) to a service used by a Component.
+ */
+public interface Reference {
+
+	/**
+	 * Returns the name of this Reference. This method provides access to the
+	 * <code>name</code> attribute of the <code>reference</code> element.
+	 */
+	String getName();
+
+	/**
+	 * Returns the name of the service used by this Reference. This method
+	 * provides access to the <code>interface</code> attribute of the
+	 * <code>reference</code> element.
+	 */
+	String getServiceName();
+
+	/**
+	 * Returns an array of references to the services bound to this Reference
+	 * or <code>null</code> if no services are currently bound.
+	 */
+	ServiceReference[] getServiceReferences();
+
+	/**
+	 * Returns whether this reference is satisfied. A {@link #isOptional() optional}
+	 * component is always satisfied. Otherwise <code>true</code> is only
+	 * returned if at least one service is bound.
+	 */
+	boolean isSatisfied();
+
+	/**
+	 * Returns whether this reference is optional. This method provides access
+	 * to the lower bound of the <code>cardinality</code> attribute of the
+	 * <code>reference</code> element. In other words, this method returns
+	 * <code>true</code> if the cardinality is <em>0..1</em> or <em>0..n</em>.
+	 */
+	boolean isOptional();
+
+	/**
+	 * Returns whether this reference is multiple. This method provides access
+	 * to the upper bound of the <code>cardinality</code> attribute of the
+	 * <code>reference</code> element. In other words, this method returns
+	 * <code>true</code> if the cardinality is <em>0..n</em> or <em>1..n</em>.
+	 */
+	boolean isMultiple();
+
+	/**
+	 * Returns <code>true</code> if the reference is defined with static policy.
+	 * This method provides access to the <code>policy</code> element of the
+	 * <code>reference</code> element. <code>true</code> is returned if the
+	 * policy is defined as <em>static</em>.
+	 */
+	boolean isStatic();
+
+	/**
+	 * Returns the value of the target property of this reference. Initially
+	 * (without overwriting configuration) this method provides access to the
+	 * <code>target</code> attribute of the <code>reference</code> element. If
+	 * configuration overwrites the target property, this method returns the
+	 * value of the Component property whose name is derived from the
+	 * {@link #getName() reference name} plus the suffix <em>.target</em>. If
+	 * no target property exists this method returns <code>null</code>.
+	 */
+	String getTarget();
+
+	/**
+	 * Returns the name of the method called if a service is being bound to
+	 * the Component or <code>null</code> if no such method is configured. This
+	 * method provides access to the <code>bind</code> attribute of the
+	 * <code>reference</code> element.
+	 */
+	String getBindMethodName();
+
+	/**
+	 * Returns the name of the method called if a service is being unbound from
+	 * the Component or <code>null</code> if no such method is configured. This
+	 * method provides access to the <code>unbind</code> attribute of the
+	 * <code>reference</code> element.
+	 */
+	String getUnbindMethodName();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/ScrService.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/ScrService.java
new file mode 100644
index 0000000..71fa155
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/ScrService.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * The <code>ScrService</code> represents the Declarative Services main
+ * controller also known as the Service Component Runtime or SCR for short.
+ * It provides access to the components managed the SCR.
+ */
+public interface ScrService {
+
+	/**
+	 * Returns an array of all components managed by this SCR instance. The
+	 * components are returned in ascending order of their component.id. If
+	 * there are no components currently managed by the SCR, <code>null</code>
+	 * is returned.
+	 *
+	 * @return The components or <code>null</code> if there are none.
+	 */
+	Component[] getComponents();
+
+	/**
+	 * Returns the component whose component.id matches the given
+	 * <code>componentId</code> or <code>null</code> if no component with the
+	 * given id is currently managed.
+	 *
+	 * @param componentId The ID of the component to return
+	 *
+	 * @return The indicated component or <code>null</code> if no such
+	 *      component exists.
+	 */
+	Component getComponent(long componentId);
+
+	/**
+	 * Returns an array of all components managed by this SCR instance on
+	 * behalf of the given bundle. The components are returned in ascending
+	 * order of their component.id. If there are no components managed by the
+	 * SCR for the given bundle, <code>null</code> is returned.
+	 *
+	 * @param bundle The <code>Bundle</code> whose components are to be
+	 *      returned.
+	 *
+	 * @return The bundle's components or <code>null</code> if the bundle
+	 *      has none.
+	 */
+	Component[] getComponents(Bundle bundle);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/package.html b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/package.html
new file mode 100644
index 0000000..4efb8d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/apache/felix/scr/package.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides access to the components managed by the Service Component Runtime (Declarative Services).
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for accessing to the components managed by the Service Component Runtime (Declarative Services).
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Activator.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Activator.java
index 57bbb84..95cbe47 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Activator.java
@@ -11,48 +11,44 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds;
 
+import java.io.IOException;
 import java.util.Dictionary;
 import java.util.Hashtable;
+import org.apache.felix.scr.ScrService;
 import org.eclipse.equinox.internal.util.ref.Log;
-import org.eclipse.osgi.framework.console.CommandProvider;
+import org.eclipse.osgi.framework.log.FrameworkLog;
+import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 import org.eclipse.osgi.service.debug.DebugOptions;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.osgi.framework.*;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.cm.ConfigurationListener;
+import org.osgi.service.cm.*;
 import org.osgi.service.component.ComponentConstants;
 import org.osgi.service.log.LogService;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
  * This is the main starting class for the Service Component Runtime.
- * 
- * It also acts as a "Bundle Manager" - a listener for bundle events. Whenever a
- * bundle is stopped or started it will invoke the resolver to respectively
- * enable or disable necessary service components.
- * 
- * Notice, the SynchronousBundleListener bundle listeners are called prior
- * bundle event is completed. This will make the stuff a little bit faster ;)
+ * The SCR is not fully initialized until it detects at least one bundle providing DS components. 
+ * Thus it has considerably small startup time and does improve a little the runtime performance 
+ * since it does not listen for service events.
  * 
  * @author Valentin Valchev
  * @author Stoyan Boshev
  * @author Pavlin Dobrev
  */
 
-public class Activator implements BundleActivator, SynchronousBundleListener {
+public class Activator implements BundleActivator, SynchronousBundleListener, ServiceListener {
 
 	public static BundleContext bc = null;
+	public static ConfigurationAdmin configAdmin = null;
+	public static boolean security = false;
 
-	private ServiceTracker cmTracker;
-	private ServiceRegistration cmTrackerReg;
-
-	private ServiceTracker debugTracker = null;
-
+	private ServiceRegistration configListenerReg;
 	private SCRManager scrManager = null;
-
+	public ScrServiceImpl scrService = null;
+	private ServiceRegistration scrServiceReg;
 	private ServiceRegistration scrCommandProviderReg;
-	private SCRCommandProvider scrCommandProvider;
-
+	private static FrameworkLog fwLog;
 	private boolean inited = false;
 
 	public static Log log;
@@ -88,21 +84,26 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 		WorkThread.IDLE_TIMEOUT = getInteger("equinox.ds.idle_timeout", 1000); //$NON-NLS-1$
 		WorkThread.BLOCK_TIMEOUT = getInteger("equinox.ds.block_timeout", 30000); //$NON-NLS-1$
 
-		// start the config tracker
-		cmTracker = new ServiceTracker(bc, ConfigurationAdmin.class.getName(), null);
-
-		ConfigurationManager.cmTracker = cmTracker;
-		cmTracker.open();
+		try {
+			bc.addServiceListener(this, "(objectClass=" + ConfigurationAdmin.class.getName() + ')'); //$NON-NLS-1$
+		} catch (InvalidSyntaxException e) {
+			//should never happen
+		}
+		//get config admin service if available
+		ServiceReference caRef = bc.getServiceReference(ConfigurationAdmin.class.getName());
+		if (caRef != null) {
+			configAdmin = (ConfigurationAdmin) bc.getService(caRef);
+		}
 		if (startup)
-			timeLog("ServiceTracker starting took "); //$NON-NLS-1$
+			timeLog("ConfigurationAdmin service getting took "); //$NON-NLS-1$
 
-		scrManager = new SCRManager(bc, log);
+		scrManager = new SCRManager();
 		if (startup)
 			timeLog("SCRManager instantiation took "); //$NON-NLS-1$
 
 		// add the configuration listener - we to receive CM events to restart
 		// components
-		cmTrackerReg = bc.registerService(ConfigurationListener.class.getName(), scrManager, null);
+		configListenerReg = bc.registerService(ConfigurationListener.class.getName(), scrManager, null);
 		if (startup)
 			timeLog("ConfigurationListener service registered for "); //$NON-NLS-1$
 		bc.addServiceListener(scrManager);
@@ -111,11 +112,7 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 		if (Activator.startup)
 			Activator.timeLog("startIt() method took "); //$NON-NLS-1$
 
-		if (scrCommandProvider == null) {
-			scrCommandProvider = new SCRCommandProvider(scrManager);
-			Hashtable reg_props = new Hashtable(3, 1);
-			scrCommandProviderReg = bc.registerService(CommandProvider.class.getName(), scrCommandProvider, reg_props);
-		}
+		installCommandProvider();
 
 		if (startup && lazyIniting) {
 			log.debug("[END - lazy SCR init] Activator.initSCR() method executed for " + String.valueOf(time[0] - time[2]), null); //$NON-NLS-1$
@@ -128,31 +125,39 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 	 * 
 	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
 	 */
-	public void start(BundleContext bc) throws Exception {
-		Activator.bc = bc;
+	public void start(BundleContext bundleContext) throws Exception {
+		Activator.bc = bundleContext;
 		startup = getBoolean("equinox.measurements.bundles", false); //$NON-NLS-1$
 		if (startup) {
 			long tmp = System.currentTimeMillis();
 			time = new long[] {tmp, 0, tmp};
 		}
 		// initialize the logging routines
-		debugTracker = new ServiceTracker(bc, DebugOptions.class.getName(), null);
+		log = new Log(bundleContext, false);
+		ServiceTracker debugTracker = new ServiceTracker(bundleContext, DebugOptions.class.getName(), null);
 		debugTracker.open();
-		log = new Log(bc, false);
-		DEBUG = getBooleanDebugOption("org.eclipse.equinox.ds/debug", false) || getBoolean("equinox.ds.debug", false); //$NON-NLS-1$ //$NON-NLS-2$
-		PERF = getBooleanDebugOption("org.eclipse.equinox.ds/performance", false) || getBoolean("equinox.ds.perf", false); //$NON-NLS-1$ //$NON-NLS-2$
-		INSTANTIATE_ALL = getBooleanDebugOption("org.eclipse.equinox.ds/instantiate_all", false) || getBoolean("equinox.ds.instantiate_all", false); //$NON-NLS-1$ //$NON-NLS-2$
+		DebugOptions debugOptions = (DebugOptions) debugTracker.getService();
+		DEBUG = getBooleanDebugOption(debugOptions, "org.eclipse.equinox.ds/debug", false) || getBoolean("equinox.ds.debug", false); //$NON-NLS-1$ //$NON-NLS-2$
+		PERF = getBooleanDebugOption(debugOptions, "org.eclipse.equinox.ds/performance", false) || getBoolean("equinox.ds.perf", false); //$NON-NLS-1$ //$NON-NLS-2$
+		INSTANTIATE_ALL = getBooleanDebugOption(debugOptions, "org.eclipse.equinox.ds/instantiate_all", false) || getBoolean("equinox.ds.instantiate_all", false); //$NON-NLS-1$ //$NON-NLS-2$
 
-		DBSTORE = getBooleanDebugOption("org.eclipse.equinox.ds/cache_descriptions", true) || getBoolean("equinox.ds.dbstore", true); //$NON-NLS-1$ //$NON-NLS-2$
+		DBSTORE = getBooleanDebugOption(debugOptions, "org.eclipse.equinox.ds/cache_descriptions", true) || getBoolean("equinox.ds.dbstore", true); //$NON-NLS-1$ //$NON-NLS-2$
+		boolean print = getBooleanDebugOption(debugOptions, "org.eclipse.equinox.ds/print_on_console", false) || getBoolean("equinox.ds.print", false); //$NON-NLS-1$ //$NON-NLS-2$
 		log.setDebug(DEBUG);
-		boolean print = getBooleanDebugOption("org.eclipse.equinox.ds/print_on_console", false) || getBoolean("equinox.ds.print", false); //$NON-NLS-1$ //$NON-NLS-2$
 		log.setPrintOnConsole(print);
+		//DebugOptions no longer needed
+		debugTracker.close();
+		ServiceReference fwRef = bc.getServiceReference(FrameworkLog.class.getName());
+		if (fwRef != null) {
+			fwLog = (FrameworkLog) bc.getService(fwRef);
+		}
 
 		if (startup)
 			timeLog("[BEGIN - start method] Creating Log instance and initializing log system took "); //$NON-NLS-1$
 
+		security = Log.security();
 		boolean hasHeaders = false;
-		Bundle[] allBundles = bc.getBundles();
+		Bundle[] allBundles = bundleContext.getBundles();
 		for (int i = 0; i < allBundles.length; i++) {
 			Dictionary allHeaders = allBundles[i].getHeaders(""); //$NON-NLS-1$
 			if (allHeaders.get(ComponentConstants.SERVICE_COMPONENT) != null) {
@@ -166,8 +171,23 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 		} else {
 			// there are no bundles holding components - SCR will not be
 			// initialized yet
-			bc.addBundleListener(this);
+			bundleContext.addBundleListener(this);
+		}
+		ServiceReference envInfoRef = bc.getServiceReference(EnvironmentInfo.class.getName());
+		EnvironmentInfo envInfo = null;
+		if (envInfoRef != null) {
+			envInfo = (EnvironmentInfo) bc.getService(envInfoRef);
+		}
+		if (envInfo != null) {
+			envInfo.setProperty("equinox.use.ds", "true"); //$NON-NLS-1$//$NON-NLS-2$
+			bc.ungetService(envInfoRef);
+		} else {
+			System.setProperty("equinox.use.ds", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
+
+		scrService = new ScrServiceImpl();
+		scrServiceReg = bc.registerService(ScrService.class.getName(), scrService, null);
+
 		if (startup) {
 			log.debug("[END - start method] Activator.start() method executed for " + String.valueOf(time[0] - time[2]), null); //$NON-NLS-1$
 			time = null;
@@ -179,41 +199,42 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 	 * 
 	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
 	 */
-	public void stop(BundleContext bc) throws Exception {
+	public void stop(BundleContext bundleContext) throws Exception {
 		if (scrManager != null) {
 			scrManager.stopIt();
-			bc.removeServiceListener(scrManager);
+			bundleContext.removeServiceListener(scrManager);
 		}
 		// dispose the CM Listener
-		if (cmTrackerReg != null) {
-			cmTrackerReg.unregister();
+		if (configListenerReg != null) {
+			configListenerReg.unregister();
+		}
+		if (scrService != null) {
+			scrService.dispose();
+			scrServiceReg.unregister();
 		}
 
 		if (scrCommandProviderReg != null)
 			scrCommandProviderReg.unregister();
-		scrCommandProvider = null;
 
 		if (scrManager != null) {
-			bc.removeBundleListener(scrManager);
+			bundleContext.removeBundleListener(scrManager);
 		} else {
-			bc.removeBundleListener(this);
+			bundleContext.removeBundleListener(this);
 		}
-
-		// untrack the cm!
-		if (cmTracker != null) {
-			ConfigurationManager.cmTracker = null;
-			cmTracker.close();
-			cmTracker = null;
+		ServiceReference envInfoRef = bc.getServiceReference(EnvironmentInfo.class.getName());
+		EnvironmentInfo envInfo = null;
+		if (envInfoRef != null) {
+			envInfo = (EnvironmentInfo) bc.getService(envInfoRef);
 		}
-
-		if (debugTracker != null) {
-			debugTracker.close();
-			debugTracker = null;
+		if (envInfo != null) {
+			envInfo.setProperty("equinox.use.ds", "false"); //$NON-NLS-1$//$NON-NLS-2$
+			bc.ungetService(envInfoRef);
+		} else {
+			System.setProperty("equinox.use.ds", "false"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 
 		log.close();
 		log = null;
-		bc = null;
 	}
 
 	public static Filter createFilter(String filter) throws InvalidSyntaxException {
@@ -231,6 +252,20 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 		}
 	}
 
+	public static Configuration getConfiguration(String pid) throws IOException {
+		if (configAdmin != null) {
+			return configAdmin.getConfiguration(pid);
+		}
+		return null;
+	}
+
+	public static Configuration[] listConfigurations(String filter) throws IOException, InvalidSyntaxException {
+		if (configAdmin != null) {
+			return configAdmin.listConfigurations(filter);
+		}
+		return null;
+	}
+
 	public static boolean getBoolean(String property, boolean defaultValue) {
 		String prop = (bc != null) ? bc.getProperty(property) : System.getProperty(property);
 		if (prop != null) {
@@ -255,28 +290,42 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 		return defaultValue;
 	}
 
-	public boolean getBooleanDebugOption(String option, boolean defaultValue) {
-		if (debugTracker == null) {
-			return defaultValue;
-		}
-		DebugOptions options = (DebugOptions) debugTracker.getService();
-		if (options != null) {
-			String value = options.getOption(option);
+	public boolean getBooleanDebugOption(DebugOptions optionsService, String option, boolean defaultValue) {
+		if (optionsService != null) {
+			String value = optionsService.getOption(option);
 			if (value != null)
 				return value.equalsIgnoreCase("true"); //$NON-NLS-1$
 		}
 		return defaultValue;
 	}
 
+	private void installCommandProvider() {
+		try {
+			SCRCommandProvider scrCommandProvider = new SCRCommandProvider(scrManager);
+			Hashtable reg_props = new Hashtable(1, 1);
+			reg_props.put(org.osgi.framework.Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
+			scrCommandProviderReg = bc.registerService(org.eclipse.osgi.framework.console.CommandProvider.class.getName(), scrCommandProvider, reg_props);
+		} catch (NoClassDefFoundError e) {
+			//the org.eclipse.osgi.framework.console package is optional 
+			if (Activator.DEBUG) {
+				log.debug("Cannot register SCR CommandProvider!", e); //$NON-NLS-1$
+			}
+		}
+	}
+
 	public static void log(BundleContext bundleContext, int level, String message, Throwable t) {
 		LogService logService = null;
 		ServiceReference logRef = null;
-		try {
-			logRef = bundleContext.getServiceReference(LogService.class.getName());
-			logService = (LogService) bundleContext.getService(logRef);
-		} catch (Exception e) {
-			if (Activator.DEBUG) {
-				log.debug(NLS.bind(Messages.CANNOT_GET_LOGSERVICE, bundleContext.getBundle().getSymbolicName()), e);
+		if (bundleContext != null) {
+			try {
+				logRef = bundleContext.getServiceReference(LogService.class.getName());
+				if (logRef != null) {
+					logService = (LogService) bundleContext.getService(logRef);
+				}
+			} catch (Exception e) {
+				if (Activator.DEBUG) {
+					log.debug("Cannot get LogService for bundle " + bundleContext.getBundle().getSymbolicName(), e); //$NON-NLS-1$
+				}
 			}
 		}
 		if (logService != null) {
@@ -295,9 +344,21 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 						prefix = "INFO "; //$NON-NLS-1$
 						break;
 				}
-				dumpOnConsole(prefix, bundleContext, message, t);
+				dumpOnConsole(prefix, bundleContext, message, t, level == LogService.LOG_ERROR);
 			}
 		} else {
+			logRef = bc.getServiceReference(LogService.class.getName());
+			if (logRef == null) {
+				//log service is not available
+				if (!log.getPrintOnConsole() && !log.autoPrintOnConsole && fwLog == null) {
+					//The log will not print the message on the console and the FrameworkLog service is not available
+					//Will print errors on the console as last resort
+					if (level == LogService.LOG_ERROR) {
+						dumpOnConsole("ERROR ", bundleContext, message, t, true); //$NON-NLS-1$
+					}
+				}
+			}
+
 			//using the SCR log
 			switch (level) {
 				case LogService.LOG_ERROR :
@@ -306,18 +367,71 @@ public class Activator implements BundleActivator, SynchronousBundleListener {
 				case LogService.LOG_WARNING :
 					log.warning(message, t);
 					break;
+				case LogService.LOG_INFO :
+					log.info(message);
+					break;
 				default :
-					log.error(message, t);
+					log.debug(message, t);
 					break;
 			}
 		}
+		if (fwLog != null) {
+			logToFWLog(bundleContext != null ? bundleContext.getBundle().getSymbolicName() : bc.getBundle().getSymbolicName(), level, message, t);
+		}
 	}
 
-	private static void dumpOnConsole(String prefix, BundleContext bundleContext, String msg, Throwable t) {
-		System.out.println(prefix + bundleContext.getBundle().getBundleId() + " " + msg); //$NON-NLS-1$
+	private static void dumpOnConsole(String prefix, BundleContext bundleContext, String msg, Throwable t, boolean printInErr) {
+		String message = prefix + bundleContext.getBundle().getBundleId() + " " + msg; //$NON-NLS-1$
+		if (printInErr) {
+			System.err.println(message);
+		} else {
+			System.out.println(message);
+		}
 		if (t != null) {
 			t.printStackTrace();
 		}
 	}
 
+	private static void logToFWLog(String bsn, int level, String message, Throwable t) {
+		int severity = FrameworkLogEntry.INFO;
+		switch (level) {
+			case LogService.LOG_ERROR :
+				severity = FrameworkLogEntry.ERROR;
+				break;
+			case LogService.LOG_WARNING :
+				severity = FrameworkLogEntry.WARNING;
+				break;
+			case LogService.LOG_INFO :
+				severity = FrameworkLogEntry.INFO;
+				break;
+			case LogService.LOG_DEBUG :
+				severity = FrameworkLogEntry.INFO;
+				break;
+		}
+		fwLog.log(new FrameworkLogEntry(bsn, severity, 0, message, 0, t, null));
+	}
+
+	public void serviceChanged(ServiceEvent event) {
+		switch (event.getType()) {
+			case ServiceEvent.REGISTERED :
+				Object caService = bc.getService(event.getServiceReference());
+				configAdmin = (ConfigurationAdmin) caService;
+				if (caService != null) {
+					// Config Admin registered
+					if (scrManager != null) {
+						scrManager.configAdminRegistered((ConfigurationAdmin) caService, event.getServiceReference());
+					}
+				}
+				break;
+			case ServiceEvent.UNREGISTERING :
+				//get replacement config admin service if available
+				ServiceReference caRef = bc.getServiceReference(ConfigurationAdmin.class.getName());
+				if (caRef != null) {
+					configAdmin = (ConfigurationAdmin) bc.getService(caRef);
+				} else {
+					configAdmin = null;
+				}
+				break;
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ConfigurationManager.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ConfigurationManager.java
deleted file mode 100644
index 1ebe428..0000000
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ConfigurationManager.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 1997-2007 by ProSyst Software GmbH
- * http://www.prosyst.com
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    ProSyst Software GmbH - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.ds;
-
-import java.io.IOException;
-
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * ConfigurationManager.java
- * 
- * @author Valentin Valchev
- * @author Pavlin Dobrev
- * @version 1.0
- */
-
-class ConfigurationManager {
-
-	static ServiceTracker cmTracker;
-
-	static Configuration getConfiguration(String pid) throws IOException {
-		ConfigurationAdmin cmAdmin = (ConfigurationAdmin) cmTracker.getService();
-		if (cmAdmin != null) {
-			return cmAdmin.getConfiguration(pid);
-		}
-		return null;
-	}
-
-	static Configuration[] listConfigurations(String filter) throws IOException, InvalidSyntaxException {
-		ConfigurationAdmin cmAdmin = (ConfigurationAdmin) cmTracker.getService();
-		if (cmAdmin != null) {
-			return cmAdmin.listConfigurations(filter);
-		}
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/FactoryReg.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/FactoryReg.java
index 374273a..96912b2 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/FactoryReg.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/FactoryReg.java
@@ -36,7 +36,7 @@ final class FactoryReg implements ServiceFactory {
 
 		try {
 			if (Activator.DEBUG) {
-				Activator.log.debug(NLS.bind(Messages.NEW_SERVICE_CREATED, component.name), null);
+				Activator.log.debug("FactoryReg.getService(): created new service for component " + component.name, null); //$NON-NLS-1$
 			}
 			ComponentInstance ci = InstanceProcess.staticRef.buildComponent(bundle, component, null, false);
 			// ci can be null if the component is already disposed while being built
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/InstanceProcess.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/InstanceProcess.java
index ef0a68f..9127d65 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/InstanceProcess.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/InstanceProcess.java
@@ -12,6 +12,7 @@
 package org.eclipse.equinox.internal.ds;
 
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.impl.ComponentFactoryImpl;
 import org.eclipse.equinox.internal.ds.impl.ComponentInstanceImpl;
 import org.eclipse.equinox.internal.ds.model.*;
@@ -19,6 +20,7 @@ import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 import org.osgi.service.cm.Configuration;
 import org.osgi.service.component.*;
+import org.osgi.service.log.LogService;
 
 /**
  * This class is responsible for creating, tracking and disposing of service
@@ -114,7 +116,7 @@ public class InstanceProcess {
 				if (!lockSucceeded) {
 					// The lock is not yet released!
 					// Allow the operation but log a warning
-					Activator.log.warning(NLS.bind(Messages.TIMEOUT_GETTING_LOCK, Integer.toString(InstanceProcess.waitTime)), new Exception("Debug stacktrace")); //$NON-NLS-1$
+					Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.TIMEOUT_GETTING_LOCK, Integer.toString(InstanceProcess.waitTime)), new Exception("Debug stacktrace")); //$NON-NLS-1$
 				}
 			}
 		}
@@ -153,11 +155,24 @@ public class InstanceProcess {
 
 		// loop through SCP list of enabled
 		if (list != null) {
+			getLock();
+			Vector listToBuild = new Vector();
 			for (int i = 0; i < list.size(); i++) {
 				scp = (ServiceComponentProp) list.elementAt(i);
+				if (scp.getState() != Component.STATE_UNSATISFIED) {
+					//no need to build the component:
+					// 1) it is disposed or about to be disposed
+					// 2) it is already built or being built
+					continue;
+				}
+				scp.setState(Component.STATE_ACTIVATING);
+				listToBuild.addElement(scp);
+			}
+			freeLock();
+			for (int i = 0; i < listToBuild.size(); i++) {
+				scp = (ServiceComponentProp) listToBuild.elementAt(i);
 				getLock();
-				int componentState = scp.getState();
-				if (componentState <= ServiceComponentProp.DISPOSING || componentState > ServiceComponentProp.SATISFIED) {
+				if (scp.getState() != Component.STATE_ACTIVATING) {
 					//no need to build the component:
 					// 1) it is disposed or about to be disposed
 					// 2) it is already built or being built
@@ -169,33 +184,34 @@ public class InstanceProcess {
 				try {
 					if (Activator.PERF) {
 						start = System.currentTimeMillis();
-						Activator.log.info(NLS.bind(Messages.START_BUILDING_COMPONENT, scp));
+						Activator.log.info("[DS perf] Start building component " + scp); //$NON-NLS-1$
 					}
-					scp.setState(ServiceComponentProp.BUILDING);
 					sc = scp.serviceComponent;
 					if (sc.immediate || (sc.factory == null && Activator.INSTANTIATE_ALL)) {
 						if (Activator.DEBUG) {
-							Activator.log.debug(NLS.bind(Messages.BUILDING_IMMEDIATE_COMPONENT, scp.name), null);
+							Activator.log.debug("InstanceProcess.buildComponents(): building immediate component " + scp.name, null); //$NON-NLS-1$
 						}
 						if (scp.instances.isEmpty()) {
 							try {
 								buildComponent(null, scp, null, security);
-							} catch (Exception e) {
+							} catch (Throwable e) {
+								resolver.reorderSCP(scp);
 								successfullyBuilt = false;
 								if (!(e instanceof ComponentException)) {
-									Activator.log.error(NLS.bind(Messages.CANNOT_BUILD_COMPONENT, scp), e);
+									Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.CANNOT_BUILD_COMPONENT, scp), e);
 								}
 							}
 						}
-
-						if (sc.serviceInterfaces != null && successfullyBuilt) {
-							// this component registers service
-							//the service will be registered only if the component was successfully built
-
-							// this will create either plain service component
-							// registration
-							// or a service factory registration
-							registerService(scp, sc.serviceFactory, null);
+						if (successfullyBuilt) {
+							if (sc.serviceInterfaces != null) {
+								// this component registers service
+								//the service will be registered only if the component was successfully built
+
+								// this will create either plain service component registration
+								// or a service factory registration
+								registerService(scp, sc.serviceFactory, null);
+							}
+							scp.setState(Component.STATE_ACTIVE);
 						}
 					} else {
 
@@ -205,17 +221,17 @@ public class InstanceProcess {
 							// component factory
 							if (scp.isComponentFactory()) {
 								if (Activator.DEBUG) {
-									Activator.log.debug(NLS.bind(Messages.BUILDING_COMPONENT_FACTORY, scp.name), null);
+									Activator.log.debug("InstanceProcess.buildComponents(): building component factory " + scp.name, null); //$NON-NLS-1$
 								}
 
 								// check if MSF
 								try {
-									Configuration config = ConfigurationManager.getConfiguration(sc.name);
+									Configuration config = Activator.getConfiguration(sc.name);
 									if (config != null) {
 										factoryPid = config.getFactoryPid();
 									}
 								} catch (Exception e) {
-									Activator.log.error(NLS.bind(Messages.CANNOT_GET_CONFIGURATION, sc.name), e);
+									Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.CANNOT_GET_CONFIGURATION, sc.name), e);
 								}
 
 								// if MSF throw exception - can't be
@@ -227,6 +243,7 @@ public class InstanceProcess {
 									successfullyBuilt = false;
 									throw new org.osgi.service.component.ComponentException(Messages.INCOMPATIBLE_COMBINATION);
 								}
+								scp.setState(Component.STATE_FACTORY);
 								registerComponentFactory(scp);
 								// when registering a ComponentFactory we must not
 								// register the component configuration as service
@@ -238,17 +255,20 @@ public class InstanceProcess {
 						if (sc.provides != null) {
 							// this will create either plain service component
 							// registration or a service factory registration
+							scp.setState(Component.STATE_REGISTERED);
 							registerService(scp, sc.serviceFactory, null);
 						}
 					}
 				} catch (Throwable t) {
-					Activator.log.error(NLS.bind(Messages.EXCEPTION_BUILDING_COMPONENT, scp.serviceComponent), t);
+					Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.EXCEPTION_BUILDING_COMPONENT, scp.serviceComponent), t);
 				} finally {
-					scp.setState(successfullyBuilt ? ServiceComponentProp.BUILT : ServiceComponentProp.DISPOSED);
+					if (!successfullyBuilt) {
+						scp.setState(Component.STATE_UNSATISFIED);
+					}
 					freeLock();
 					if (Activator.PERF) {
 						start = System.currentTimeMillis() - start;
-						Activator.log.info(NLS.bind(Messages.COMPONENT_BUILT_TIME, scp, Long.toString(start)));
+						Activator.log.info("[DS perf] The component " + scp + " is built for " + Long.toString(start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
 					}
 				}
 			} // end for
@@ -270,27 +290,27 @@ public class InstanceProcess {
 			for (int i = 0; i < scpList.size(); i++) {
 				ServiceComponentProp scp = (ServiceComponentProp) scpList.elementAt(i);
 				getLock();
-				if (scp.getState() <= ServiceComponentProp.DISPOSING) {
-					//it is already disposed
+				if (scp.isUnsatisfied()) {
+					//it is already deactivated
 					freeLock();
 					continue;
 				}
 				long start = 0l;
 				try {
-					scp.setState(ServiceComponentProp.DISPOSING);
+					scp.setState(Component.STATE_DEACTIVATING);
 					if (Activator.PERF) {
 						start = System.currentTimeMillis();
-						Activator.log.info(NLS.bind(Messages.DISPOSING_COMPONENT, scp));
+						Activator.log.info("[DS perf] Start disposing component " + scp); //$NON-NLS-1$
 					}
 					disposeInstances(scp, deactivateReason);
 				} catch (Throwable t) {
-					Activator.log.error(NLS.bind(Messages.ERROR_DISPOSING_INSTANCES, scp), t);
+					Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_DISPOSING_INSTANCES, scp), t);
 				} finally {
 					resolver.componentDisposed(scp);
 					freeLock();
 					if (Activator.PERF) {
 						start = System.currentTimeMillis() - start;
-						Activator.log.info(NLS.bind(Messages.COMPONENT_DISPOSE_TIME, scp, Long.toString(start)));
+						Activator.log.info("[DS perf] The component " + scp + " is disposed for " + Long.toString(start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 					}
 				}
 			}
@@ -311,7 +331,7 @@ public class InstanceProcess {
 					reg.unregister();
 			} catch (IllegalStateException e) {
 				// Service is already unregistered do nothing
-				Activator.log.warning(NLS.bind(Messages.FACTORY_REGISTRATION_ALREADY_DISPOSED, scp.name), null);
+				Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.FACTORY_REGISTRATION_ALREADY_DISPOSED, scp.name), null);
 			}
 		}
 		ServiceComponent sc = scp.serviceComponent;
@@ -324,7 +344,7 @@ public class InstanceProcess {
 		} else {
 			// The component registers services
 			if (Activator.DEBUG) {
-				Activator.log.debug(NLS.bind(Messages.UNREGISTERING_COMPONENT, scp.name), null);
+				Activator.log.debug("InstanceProcess.disposeInstances(): unregistering component " + scp.name, null); //$NON-NLS-1$
 			}
 
 			// unregister services if any
@@ -335,11 +355,11 @@ public class InstanceProcess {
 					reg.unregister();
 				} catch (IllegalStateException e) {
 					// Service is already unregistered do nothing
-					Activator.log.warning(NLS.bind(Messages.REGISTRATION_ALREADY_DISPOSED, scp.name), null);
+					Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.REGISTRATION_ALREADY_DISPOSED, scp.name), null);
 				}
 			} else {
 				if (Activator.DEBUG) {
-					Activator.log.debug(NLS.bind(Messages.CANNOT_FIND_REGISTRATION, scp.name), null);
+					Activator.log.debug("InstanceProcess.disposeInstances(): cannot find registrations for " + scp.name, null); //$NON-NLS-1$
 				}
 			}
 			scp.dispose(deactivateReason);
@@ -371,16 +391,17 @@ public class InstanceProcess {
 	}
 
 	/**
-	 * Called by dispatcher ( Resolver) when work available on queue
+	 * Called by Resolver when there is a need of dynamic binding of references
 	 * 
-	 * @param refList
-	 *            Map of ReferenceDescription:subtable Subtable Maps scp:service
-	 *            object
+	 * @param refList the references to be bound
+	 * @return a Vector containing the Reference objects that are still not bound due to ClassCircularityError. 
+	 * 			The returned value may be null if all of the passed references are successfully bound 
 	 */
-	final void dynamicBind(Vector refList) {
+	final Vector dynamicBind(Vector refList) {
 		if (refList == null || refList.isEmpty()) {
-			return;
+			return null;
 		}
+		Vector unboundRefs = null;
 		for (int i = 0; i < refList.size(); i++) {
 			Reference ref = (Reference) refList.elementAt(i);
 			ServiceComponentProp scp = ref.scp;
@@ -392,8 +413,14 @@ public class InstanceProcess {
 					if (compInstance != null) {
 						try {
 							scp.bindReference(ref, compInstance);
-						} catch (Exception ex) {
-							// ex.printStackTrace();
+						} catch (ClassCircularityError cce) {
+							if (unboundRefs == null) {
+								unboundRefs = new Vector(1);
+							}
+							unboundRefs.add(ref);
+							Activator.log(scp.bc, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_BINDING_REFERENCE, ref.reference), cce);
+						} catch (Throwable t) {
+							Activator.log(scp.bc, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_BINDING_REFERENCE, ref.reference), t);
 						}
 					}
 				}
@@ -401,10 +428,11 @@ public class InstanceProcess {
 				// the component is not used and therefore it is not yet
 				// instantiated!
 				if (Activator.DEBUG) {
-					Activator.log.debug(NLS.bind(Messages.NO_COMPONENT_INSTANCES, scp.name), null);
+					Activator.log.debug("InstanceProcess.dynamicBind(): null instances for component " + scp.name, null); //$NON-NLS-1$
 				}
 			}
 		}
+		return unboundRefs;
 	}
 
 	/**
@@ -436,7 +464,7 @@ public class InstanceProcess {
 							try {
 								scp.unbindDynamicReference(ref, compInstance, serviceReference);
 							} catch (Throwable t) {
-								Activator.log.error(NLS.bind(Messages.ERROR_UNBINDING_REFERENCE, ref.reference, compInstance.getInstance()), t);
+								Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_UNBINDING_REFERENCE, ref.reference, compInstance.getInstance()), t);
 							}
 						}
 					}
@@ -444,7 +472,7 @@ public class InstanceProcess {
 			}
 		} catch (Throwable e) {
 			//should not happen
-			Activator.log.error(Messages.UNEXPECTED_ERROR, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_ERROR, e);
 		}
 	}
 
@@ -478,12 +506,12 @@ public class InstanceProcess {
 		if (Activator.DEBUG) {
 			Activator.log.debug("InstanceProcess.registerService(): " + scp.name + " registered as " + ((factory) ? "*factory*" : "*service*"), null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
-		if (scp.getState() <= ServiceComponentProp.DISPOSING) {
+		if (scp.isUnsatisfied()) {
 			//must unregister the service because it was not able to unregister when the component was disposed
 			try {
 				reg.unregister();
 				if (Activator.DEBUG) {
-					Activator.log.debug("InstanceProcess.registerService(): " + NLS.bind(Messages.SERVICE_UNREGISTERED_BECAUSE_COMP_DISPOSED, scp.name), null); //$NON-NLS-1$
+					Activator.log.debug("InstanceProcess.registerService(): The service of component " + scp.name + " was unregistered because the component is already disposed!", null); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 			} catch (IllegalStateException e) {
 				// Service is already unregistered do nothing
@@ -495,7 +523,7 @@ public class InstanceProcess {
 
 	public ComponentInstanceImpl buildComponent(Bundle usingBundle, ServiceComponentProp scp, Object instance, boolean security) throws ComponentException {
 		if (Activator.DEBUG) {
-			Activator.log.debug(NLS.bind(Messages.BUILDING_COMPONENT, scp.name), null);
+			Activator.log.debug("InstanceProcess.buildComponent(): building component " + scp.name, null); //$NON-NLS-1$
 		}
 		getLock();
 		Counter counter;
@@ -530,7 +558,7 @@ public class InstanceProcess {
 						// 1 - Return the instance (if already created) nevertheless it is not finished its binding and activation phase
 						// 2 - throw an exception because something may have gone wrong
 						if (!scp.instances.isEmpty()) {
-							Activator.log.warning(Messages.RETURNING_NOT_FULLY_ACTIVATED_INSTANCE, new Exception("Debug callstack")); //$NON-NLS-1$
+							Activator.log(null, LogService.LOG_WARNING, Messages.RETURNING_NOT_FULLY_ACTIVATED_INSTANCE, new Exception("Debug callstack")); //$NON-NLS-1$
 							return (ComponentInstanceImpl) scp.instances.firstElement();
 						}
 
@@ -553,23 +581,28 @@ public class InstanceProcess {
 		try {
 			if (Activator.PERF) {
 				start = System.currentTimeMillis();
-				Activator.log.info(NLS.bind(Messages.BUILDING_COMPONENT_INSTANCE, scp));
+				Activator.log.info("[DS perf] Start building instance of component " + scp); //$NON-NLS-1$
 			}
 			ComponentInstanceImpl componentInstance = null;
 			try {
 				componentInstance = scp.build(usingBundle, instance, security);
+			} catch (ClassCircularityError e) {
+				Vector component = new Vector(1);
+				component.add(scp.serviceComponent);
+				resolver.mgr.enqueueWork(resolver.mgr, resolver.mgr.ENABLE_COMPONENTS, component, false);
+				throw new ComponentException(NLS.bind(Messages.ERROR_BUILDING_COMPONENT_INSTANCE, scp.serviceComponent), e);
 			} catch (ComponentException e) {
-				Activator.log.error(e.getMessage(), e.getCause());
+				Activator.log(null, LogService.LOG_ERROR, e.getMessage(), e.getCause());
 				throw e;
 			} catch (Throwable t) {
-				Activator.log.error(NLS.bind(Messages.ERROR_BUILDING_COMPONENT_INSTANCE, scp.serviceComponent), t);
+				Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_BUILDING_COMPONENT_INSTANCE, scp.serviceComponent), t);
 				throw new ComponentException(NLS.bind(Messages.ERROR_BUILDING_COMPONENT_INSTANCE, scp.serviceComponent), t);
 			} finally {
 				// keep track of how many times we have re-entered this method
 				counter.count--;
 				if (Activator.PERF) {
 					start = System.currentTimeMillis() - start;
-					Activator.log.info(NLS.bind(Messages.COMPONENT_INSTANCE_BUILT, scp, Long.toString(start)));
+					Activator.log.info("[DS perf] The instance of component " + scp + " is built for " + Long.toString(start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 			}
 
@@ -597,28 +630,31 @@ public class InstanceProcess {
 
 	public void modifyComponent(ServiceComponentProp scp, Dictionary newProps) throws ComponentException {
 		if (Activator.DEBUG) {
-			Activator.log.debug(NLS.bind(Messages.MODIFYING_COMPONENT, scp.name), null);
+			Activator.log.debug("Modifying component " + scp.name, null); //$NON-NLS-1$
 		}
 		getLock();
 		long start = 0l;
 		try {
+			if (!scp.isBuilt()) {
+				return;
+			}
 			if (Activator.PERF) {
 				start = System.currentTimeMillis();
-				Activator.log.info(NLS.bind(Messages.MODIFYING_COMPONENT, scp));
+				Activator.log.info("[DS perf] Modifying component " + scp.name); //$NON-NLS-1$
 			}
 			try {
 				scp.modify(newProps);
 			} catch (ComponentException e) {
-				Activator.log.error(e.getMessage(), e.getCause());
+				Activator.log(null, LogService.LOG_ERROR, e.getMessage(), e.getCause());
 				throw e;
 			} catch (Throwable t) {
-				Activator.log.error(NLS.bind(Messages.ERROR_MODIFYING_COMPONENT, scp.serviceComponent), t);
+				Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_MODIFYING_COMPONENT, scp.serviceComponent), t);
 				throw new ComponentException(NLS.bind(Messages.ERROR_MODIFYING_COMPONENT, scp.serviceComponent), t);
 			} finally {
 				// keep track of how many times we have re-entered this method
 				if (Activator.PERF) {
 					start = System.currentTimeMillis() - start;
-					Activator.log.info(NLS.bind(Messages.COMPONENT_MODIFIED_FOR, scp, Long.toString(start)));
+					Activator.log.info("[DS perf] Component " + scp + " modified for " + Long.toString(start) + "ms"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 				}
 			}
 		} finally {
@@ -641,14 +677,19 @@ public class InstanceProcess {
 		// check if getting this service would cause a circularity
 		if (checkCanCauseCycle(reference, serviceReference)) {
 			if (Activator.DEBUG) {
-				Activator.log.debug(NLS.bind(Messages.CANNOT_GET_SERVICE_BECAUSEOF_CIRCULARITY, reference.reference.name, serviceReference), null);
+				Activator.log.debug("InstanceProcess.getService(): cannot get service because of circularity! Reference is: " + reference.reference.name + " ; The service reference is " + serviceReference, null); //$NON-NLS-1$//$NON-NLS-2$
 			}
 			return null;
 		}
 
 		// getting this service will not cause a circularity
-		return reference.scp.bc.getService(serviceReference);
-
+		Object serviceObject = reference.scp.bc.getService(serviceReference);
+		if (serviceObject == null) {
+			if (Activator.DEBUG) {
+				Activator.log.debug("[SCR] Returned service object by the bundle context is null. The reference is " + reference.reference.name + "; The ServiceReference is " + serviceReference, null); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		return serviceObject;
 	}
 
 	/**
@@ -744,7 +785,7 @@ public class InstanceProcess {
 	 * {@link InstanceProcess#buildComponent(Bundle, ServiceComponentProp, Object)} method. 
 	 * This is used to handle circular dependencies.
 	 */
-	class Counter {
+	static class Counter {
 		int count = 0;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Messages.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Messages.java
index c938b89..531b6c0 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Messages.java
@@ -18,19 +18,12 @@ public class Messages extends NLS {
 	public static String ALL_COMPONENTS;
 	public static String ALL_REFERENCES_RESOLVED;
 	public static String BIND_METHOD_NOT_FOUND_OR_NOT_ACCESSIBLE;
-	public static String BUILDING_COMPONENT;
-	public static String BUILDING_COMPONENT_FACTORY;
-	public static String BUILDING_COMPONENT_INSTANCE;
-	public static String BUILDING_IMMEDIATE_COMPONENT;
 	public static String BUNDLE_NOT_FOUND;
 	public static String CANNOT_BUILD_COMPONENT;
 	public static String CANNOT_CREATE_INSTANCE;
 	public static String CANNOT_FIND_COMPONENT_BUNDLE;
-	public static String CANNOT_FIND_REGISTRATION;
 	public static String CANNOT_GET_CONFIGURATION;
-	public static String CANNOT_GET_LOGSERVICE;
 	public static String CANNOT_GET_REFERENCES;
-	public static String CANNOT_GET_SERVICE_BECAUSEOF_CIRCULARITY;
 	public static String CANNOT_MODIFY_INSTANCE__MODIFY_METHOD_NOT_FOUND;
 	public static String CANT_ACTIVATE_INSTANCE;
 	public static String CANT_GET_SERVICE;
@@ -39,15 +32,12 @@ public class Messages extends NLS {
 	public static String CANT_OPEN_STREAM_TO_COMPONENT_XML;
 	public static String CANT_RESOLVE_COMPONENT_INSTANCE;
 	public static String CIRCULARITY_EXCEPTION_FOUND;
-	public static String COMPONENT_BUILT_TIME;
+	public static String COMPONENT_DISPOSED;
 	public static String COMPONENT_CONFIGURATIONS;
 	public static String COMPONENT_DETAILS;
-	public static String COMPONENT_DISPOSE_TIME;
 	public static String COMPONENT_HAS_ILLEGAL_REFERENCE;
 	public static String COMPONENT_ID_DEFINIED_BY_LIST_COMMAND;
-	public static String COMPONENT_INSTANCE_BUILT;
 	public static String COMPONENT_LACKS_APPROPRIATE_PERMISSIONS;
-	public static String COMPONENT_MODIFIED_FOR;
 	public static String COMPONENT_NAME;
 	public static String COMPONENT_NAME_IS_NULL;
 	public static String COMPONENT_NOT_FOUND;
@@ -56,20 +46,15 @@ public class Messages extends NLS {
 	public static String COMPONENT_RESOLVED;
 	public static String COMPONENT_WAS_NOT_BUILT;
 	public static String COMPONENT_XML_NOT_FOUND;
-	public static String COMPONENTS_DISABLED;
-	public static String COMPONENTS_ENABLED;
 	public static String COMPONENTS_IN_BUNDLE;
-	public static String COMPONENTS_PARSED_TIME;
 	public static String CONFIG_ADMIN_SERVICE_NOT_AVAILABLE;
 	public static String CONFIG_PROPERTIES;
 	public static String COULD_NOT_CREATE_INSTANCE;
 	public static String COULD_NOT_CREATE_NEW_INSTANCE;
-	public static String CREATING_SCP;
 	public static String DISABLE_ALL_COMPONENTS;
 	public static String DISABLE_COMPONENT;
 	public static String DISABLING_ALL_BUNDLE_COMPONENTS;
 	public static String DISABLING_ALL_COMPONENTS;
-	public static String DISPOSING_COMPONENT;
 	public static String DUPLICATED_REFERENCE_NAMES;
 	public static String DUPLICATED_SERVICE_TAGS;
 	public static String DYNAMIC_INFO;
@@ -145,48 +130,31 @@ public class Messages extends NLS {
 	public static String LOCATED_IN_BUNDLE;
 	public static String METHOD_UNACCESSABLE;
 	public static String MISSING_CHARACTER;
-	public static String MODIFYING_COMPONENT;
-	public static String NEW_SERVICE_CREATED;
 	public static String NO_BUILT_COMPONENT_CONFIGURATIONS;
-	public static String NO_COMPONENT_INSTANCES;
 	public static String NO_COMPONENTS_FOUND;
 	public static String NO_IMPLEMENTATION_ATTRIBUTE;
 	public static String NO_INTERFACE_ATTR_IN_REFERENCE_TAG;
 	public static String NO_NAME_ATTRIBUTE;
 	public static String NOT_RESOLVED_REFERENCES;
 	public static String PRINT_COMPONENT_INFO;
-	public static String PROCESSED_BUNDLE_EVENT;
-	public static String PROCESSED_CONF_EVENT;
-	public static String PROCESSING_BUNDLE_EVENT;
 	public static String PROCESSING_BUNDLE_FAILED;
-	public static String PROCESSING_CONF_EVENT;
-	public static String PROCESSING_SERVICE_EVENT;
-	public static String REFERENCE_NOT_RESOLVED;
 	public static String REGISTERED_AS_COMPONENT_AND_MANAGED_SERVICE_FACORY;
 	public static String REGISTRATION_ALREADY_DISPOSED;
-	public static String RESOLVED_COMPONENTS;
 	public static String RETURNING_NOT_FULLY_ACTIVATED_INSTANCE;
 	public static String SCR;
 	public static String SENT_DISABLING_REQUEST;
 	public static String SENT_ENABLING_REQUEST;
-	public static String SERVICE_EVENT_TYPE;
-	public static String SERVICE_NO_LONGER_USED;
 	public static String SERVICE_REFERENCE_ALREADY_BOUND;
-	public static String SERVICE_REFERENCE_BOUND;
-	public static String SERVICE_UNREGISTERED_BECAUSE_COMP_DISPOSED;
 	public static String SERVICE_USAGE_COUNT;
 	public static String SPECIFIED_ACTIVATE_METHOD_NOT_FOUND;
 	public static String SPECIFIED_DEACTIVATE_METHOD_NOT_FOUND;
-	public static String START_BUILDING_COMPONENT;
 	public static String STATE;
 	public static String STATIC_OPTIONAL_REFERENCE_TO_BE_REMOVED;
 	public static String TIMEOUT_GETTING_LOCK;
 	public static String TIMEOUT_PROCESSING;
 	public static String TIMEOUT_REACHED_ENABLING_COMPONENTS;
-	public static String TIMER_SERVICE_UNAVAILABLE;
 	public static String UNEXPECTED_ERROR;
 	public static String UNEXPECTED_EXCEPTION;
-	public static String UNREGISTERING_COMPONENT;
 	public static String UNSUPPORTED_TYPE;
 	public static String WRONG_PARAMETER;
 	public static String WRONG_PARAMETER2;
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Reference.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Reference.java
index fbd0b8f..d32ddbb 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Reference.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Reference.java
@@ -9,6 +9,7 @@
  * Contributors:
  *    ProSyst Software GmbH - initial API and implementation
  *    Joerg-Christian Boehme - bug.id = 246757
+ *    Andrew Teirney		 - bug.id = 278732
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds;
 
@@ -29,7 +30,7 @@ import org.osgi.service.log.LogService;
  * @author Stoyan Boshev
  * @author Pavlin Dobrev
  */
-public final class Reference {
+public final class Reference implements org.apache.felix.scr.Reference {
 
 	public ComponentReference reference;
 	ServiceComponentProp scp;
@@ -115,7 +116,7 @@ public final class Reference {
 	}
 
 	// used in Resolver.resolveEligible()
-	final boolean hasProviders() {
+	final boolean hasProviders(Hashtable serviceReferenceTable) {
 		// check whether the component's bundle has service GET permission
 		if (System.getSecurityManager() != null && !scp.bc.getBundle().hasPermission(new ServicePermission(interfaceName, ServicePermission.GET))) {
 			return false;
@@ -124,10 +125,16 @@ public final class Reference {
 		try {
 			ServiceReference[] serviceReferences = null;
 			serviceReferences = scp.bc.getServiceReferences(interfaceName, target);
-			// if there is no service published that this Service
-			// ComponentReferences
+			// Only return true if there is a service published that this Reference
+			// represents and we know about it (if we care about it)
 			if (serviceReferences != null) {
-				return true;
+				if (serviceReferenceTable == null)
+					return true;
+				for (int i = 0; i < serviceReferences.length; i++) {
+					if (serviceReferenceTable.containsKey(serviceReferences[i])) {
+						return true;
+					}
+				}
 			}
 		} catch (InvalidSyntaxException e) {
 			Activator.log(reference.component.bc, LogService.LOG_WARNING, "Reference.hasProviders(): " + NLS.bind(Messages.INVALID_TARGET_FILTER, target), e); //$NON-NLS-1$
@@ -154,7 +161,7 @@ public final class Reference {
 	}
 
 	// used in Resolver.selectDynamicBind()
-	final boolean bindNewReference(ServiceReference reference, boolean dynamicBind) {
+	final boolean bindNewReference(ServiceReference referenceToBind, boolean dynamicBind) {
 		if (dynamicBind) {
 			if (policy == ComponentReference.POLICY_STATIC) {
 				return false;
@@ -164,7 +171,7 @@ public final class Reference {
 				return false;
 			}
 		}
-		String[] serviceNames = (String[]) reference.getProperty(Constants.OBJECTCLASS);
+		String[] serviceNames = (String[]) referenceToBind.getProperty(Constants.OBJECTCLASS);
 		boolean hasName = false;
 		for (int i = 0; i < serviceNames.length; i++) {
 			if (serviceNames[i].equals(interfaceName)) {
@@ -175,26 +182,26 @@ public final class Reference {
 		if (!hasName) {
 			return false;
 		}
+		if (this.reference.bind != null) {
+			if (this.reference.serviceReferences.size() >= cardinalityHigh) {
+				return false;
+			}
+		} else if (!dynamicBind) {
+			//custom case: static reference with no bind method - check its bound service references list
+			if (boundServiceReferences.size() >= cardinalityHigh) {
+				return false;
+			}
+		}
 		// check target filter
 		try {
 			Filter filter = FrameworkUtil.createFilter(target);
-			if (!filter.match(reference)) {
+			if (!filter.match(referenceToBind)) {
 				return false;
 			}
 		} catch (InvalidSyntaxException e) {
 			return false;
 		}
-		if (this.reference.bind != null) {
-			if (this.reference.serviceReferences.size() < cardinalityHigh) {
-				return true;
-			}
-		} else if (!dynamicBind) {
-			//custom case: static reference with no bind method - check its bound service references list
-			if (boundServiceReferences.size() < cardinalityHigh) {
-				return true;
-			}
-		}
-		return false;
+		return true;
 	}
 
 	/**
@@ -312,6 +319,22 @@ public final class Reference {
 		return false;
 	}
 
+	/**
+	 * Checks if the passed service reference is satisfying this reference according to the target filter
+	 * @param serviceReference the service reference to check
+	 * @return true, if the service reference do satisfy this reference, otherwise returns false
+	 */
+	public boolean isInSatisfiedList(ServiceReference serviceReference) {
+		Filter filter;
+		try {
+			filter = FrameworkUtil.createFilter(target);
+		} catch (InvalidSyntaxException e) {
+			Activator.log(reference.component.bc, LogService.LOG_WARNING, "Reference.isInSatisfiedList(): " + NLS.bind(Messages.INVALID_TARGET_FILTER, target), e); //$NON-NLS-1$
+			return false;
+		}
+		return filter.match(serviceReference);
+	}
+
 	public void setBoundServiceReferences(ServiceReference[] references) {
 		if (policy == ComponentReference.POLICY_DYNAMIC) {
 			//not relevant to dynamic references
@@ -366,4 +389,71 @@ public final class Reference {
 		return boundServiceReferences;
 	}
 
+	public String getBindMethodName() {
+		return reference.bind;
+	}
+
+	public String getName() {
+		return reference.name;
+	}
+
+	public String getServiceName() {
+		return reference.interfaceName;
+	}
+
+	public ServiceReference[] getServiceReferences() {
+		Vector result = null;
+		if (this.reference.bind != null) {
+			if (!reference.serviceReferences.isEmpty()) {
+				result = new Vector(2);
+				Enumeration keys = reference.serviceReferences.keys();
+				while (keys.hasMoreElements()) {
+					result.add(keys.nextElement());
+				}
+			}
+		} else {
+			//no bind method
+			if (!boundServiceReferences.isEmpty()) {
+				result = (Vector) boundServiceReferences.clone();
+			}
+		}
+		if (result != null && !result.isEmpty()) {
+			ServiceReference[] finalResult = new ServiceReference[result.size()];
+			result.copyInto(finalResult);
+			return finalResult;
+		}
+		return null;
+	}
+
+	public String getUnbindMethodName() {
+		return reference.unbind;
+	}
+
+	public boolean isMultiple() {
+		return cardinalityHigh > 1;
+	}
+
+	public boolean isOptional() {
+		return cardinalityLow == 0;
+	}
+
+	public boolean isSatisfied() {
+		if (cardinalityLow == 0) {
+			return true;
+		}
+		try {
+			ServiceReference[] serviceReferences = reference.component.bc.getServiceReferences(interfaceName, target);
+			if (serviceReferences != null) {
+				return true;
+			}
+		} catch (InvalidSyntaxException e) {
+			// do nothing
+		}
+		return false;
+	}
+
+	public boolean isStatic() {
+		return policy == ComponentReference.POLICY_STATIC;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Resolver.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Resolver.java
index 07fe9d7..45d5979 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Resolver.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/Resolver.java
@@ -8,10 +8,13 @@
  *
  * Contributors:
  *    ProSyst Software GmbH - initial API and implementation
+ *    Andrew Teirney		 - bug.id = 278732
+ *    Simon Kaegi			 - bug.id = 296750
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds;
 
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.model.*;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
@@ -31,7 +34,7 @@ import org.osgi.service.log.LogService;
 public final class Resolver implements WorkPerformer {
 
 	// these strings are used only for debugging purpose
-	static final String[] WORK_TITLES = {"BUILD ", "DYNAMICBIND "}; //$NON-NLS-1$ //$NON-NLS-2$
+	static final String[] WORK_TITLES = {"BUILD ", "DYNAMICBIND ", "DISPOSE "}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
 	/**
 	 * Service Component instances need to be built.
@@ -43,6 +46,11 @@ public final class Resolver implements WorkPerformer {
 	 */
 	public static final int DYNAMICBIND = 2;
 
+	/**
+	 * Service Component instances need to be disposed
+	 */
+	public static final int DISPOSE = 3;
+
 	/* Holds the enabled SCPs*/
 	protected Vector scpEnabled;
 
@@ -50,6 +58,8 @@ public final class Resolver implements WorkPerformer {
 
 	private Object syncLock = new Object();
 
+	private Hashtable serviceReferenceTable = new Hashtable();
+
 	public SCRManager mgr;
 
 	// TODO: Add a hashtable connecting servicereference to a list of References
@@ -58,6 +68,12 @@ public final class Resolver implements WorkPerformer {
 	// plenty of components.
 	// Keep in mind that build process is asynchronous.
 
+	static {
+		/** preload some DS bundle classes to avoid classloader deadlocks */
+		Reference.class.getName();
+		SCRUtil.class.getName();
+	}
+
 	/**
 	 * Resolver constructor
 	 * 
@@ -69,6 +85,22 @@ public final class Resolver implements WorkPerformer {
 		this.mgr = mgr;
 	}
 
+	void synchronizeServiceReferences() {
+		synchronized (syncLock) {
+			try {
+				ServiceReference[] references = Activator.bc.getAllServiceReferences(null, null);
+				serviceReferenceTable.clear();
+				if (references != null) {
+					for (int i = 0; i < references.length; i++) {
+						serviceReferenceTable.put(references[i], Boolean.TRUE);
+					}
+				}
+			} catch (InvalidSyntaxException e) {
+				Activator.log(Activator.bc, LogService.LOG_WARNING, "Resolver(): " + NLS.bind(Messages.INVALID_TARGET_FILTER, ""), e); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+
 	public Object getSyncLock() {
 		return syncLock;
 	}
@@ -106,6 +138,7 @@ public final class Resolver implements WorkPerformer {
 			if (serviceComponents != null) {
 				for (int i = 0; i < serviceComponents.size(); i++) {
 					ServiceComponent current = (ServiceComponent) serviceComponents.elementAt(i);
+
 					// don't enable components which are not marked enabled
 					// this is done here, not in the activator just because it
 					// saves a little memory
@@ -116,6 +149,8 @@ public final class Resolver implements WorkPerformer {
 						continue;
 					}
 
+					current.setState(Component.STATE_UNSATISFIED);
+
 					if (current.getConfigurationPolicy() == ServiceComponent.CONF_POLICY_IGNORE) {
 						//skip looking for configurations 
 						map(current, (Dictionary) null);
@@ -125,9 +160,9 @@ public final class Resolver implements WorkPerformer {
 					// check for a Configuration properties for this component
 					try {
 						String filter = "(|(" + Constants.SERVICE_PID + '=' + current.name + ")(" + ConfigurationAdmin.SERVICE_FACTORYPID + '=' + current.name + "))"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						configs = ConfigurationManager.listConfigurations(filter);
+						configs = Activator.listConfigurations(filter);
 					} catch (Exception e) {
-						Activator.log.error(NLS.bind(Messages.CANT_LIST_CONFIGURATIONS, current.name), e);
+						Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.CANT_LIST_CONFIGURATIONS, current.name), e);
 					}
 					// if no Configuration
 					if (configs == null || configs.length == 0) {
@@ -135,13 +170,15 @@ public final class Resolver implements WorkPerformer {
 							// create ServiceComponent + Prop
 							map(current, (Dictionary) null);
 						} else {
-							String customReason = ConfigurationManager.cmTracker.getService() != null ? "" : Messages.CONFIG_ADMIN_SERVICE_NOT_AVAILABLE; //$NON-NLS-1$
-							Activator.log(current.bc, LogService.LOG_WARNING, NLS.bind(Messages.COMPONENT_REQURES_CONFIGURATION_ACTIVATION, current.name) + customReason, null);
+							String customReason = Activator.configAdmin != null ? "" : Messages.CONFIG_ADMIN_SERVICE_NOT_AVAILABLE; //$NON-NLS-1$
+							if (Activator.DEBUG) {
+								Activator.log.debug(NLS.bind(Messages.COMPONENT_REQURES_CONFIGURATION_ACTIVATION, current.name) + customReason, null);
+							}
 						}
 					} else {
 						// if ManagedServiceFactory
 						Configuration config = configs[0];
-						if (config.getFactoryPid() != null) {
+						if (config.getFactoryPid() != null && config.getFactoryPid().equals(current.name)) {
 							// if ComponentFactory is specified
 							if (current.factory != null) {
 								Activator.log(current.bc, LogService.LOG_ERROR, NLS.bind(Messages.REGISTERED_AS_COMPONENT_AND_MANAGED_SERVICE_FACORY, current.name), null);
@@ -151,9 +188,9 @@ public final class Resolver implements WorkPerformer {
 								Activator.log.debug("[SCR - Resolver] Resolver.enableComponents(): " + current.name + " as *managed service factory*", null); //$NON-NLS-1$ //$NON-NLS-2$
 							}
 							try {
-								configs = ConfigurationManager.listConfigurations("(service.factoryPid=" + config.getFactoryPid() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+								configs = Activator.listConfigurations("(service.factoryPid=" + config.getFactoryPid() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 							} catch (Exception e) {
-								Activator.log.error(NLS.bind(Messages.CANT_LIST_CONFIGURATIONS, current.name), e);
+								Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.CANT_LIST_CONFIGURATIONS, current.name), e);
 							}
 							// for each MSF set of properties(P), map(CD, new
 							// CD+P(CD,P))
@@ -177,7 +214,7 @@ public final class Resolver implements WorkPerformer {
 
 		if (Activator.PERF) {
 			start = System.currentTimeMillis() - start;
-			Activator.log.info(NLS.bind(Messages.COMPONENTS_ENABLED, serviceComponents != null ? Integer.toString(serviceComponents.size()) : "", Long.toString(start))); //$NON-NLS-1$
+			Activator.log.info("[DS perf] " + (serviceComponents != null ? Integer.toString(serviceComponents.size()) : "") + " Components enabled for " + Long.toString(start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
 	}
 
@@ -213,7 +250,7 @@ public final class Resolver implements WorkPerformer {
 		ServiceComponentProp scp = null;
 		try {
 			if (Activator.DEBUG) {
-				Activator.log.debug(NLS.bind(Messages.CREATING_SCP, component.name), null);
+				Activator.log.debug("Resolver.map(): Creating SCP for component " + component.name, null); //$NON-NLS-1$
 			}
 			scp = new ServiceComponentProp(component, configProperties, mgr);
 
@@ -250,11 +287,9 @@ public final class Resolver implements WorkPerformer {
 	 * 
 	 */
 	void getEligible(ServiceEvent event) {
-		if (scpEnabled.isEmpty())
-			return; // check for any enabled configurations
 
 		if (Activator.DEBUG) {
-			Activator.log.debug(NLS.bind(Messages.PROCESSING_SERVICE_EVENT, event.toString()), null);
+			Activator.log.debug("Resolver.getEligible(): processing service event " + event.toString(), null); //$NON-NLS-1$
 			String eventType = ""; //$NON-NLS-1$
 			if (event.getType() == ServiceEvent.UNREGISTERING) {
 				eventType = "UNREGISTERING"; //$NON-NLS-1$
@@ -263,29 +298,30 @@ public final class Resolver implements WorkPerformer {
 			} else if (event.getType() == ServiceEvent.MODIFIED) {
 				eventType = "MODIFIED"; //$NON-NLS-1$
 			}
-			Activator.log.debug(NLS.bind(Messages.SERVICE_EVENT_TYPE, eventType), null);
+			Activator.log.debug("Service event type: " + eventType, null); //$NON-NLS-1$
 		}
 
 		Object target = null;
 		Vector resolvedComponents = null;
 		switch (event.getType()) {
 			case ServiceEvent.REGISTERED :
-				Vector componentsWithStaticRefs;
 				synchronized (syncLock) {
-					componentsWithStaticRefs = selectStaticBind(scpEnabled, event.getServiceReference());
-				}
-				if (componentsWithStaticRefs != null) {
-					instanceProcess.disposeInstances(componentsWithStaticRefs, ComponentConstants.DEACTIVATION_REASON_UNSPECIFIED);
-				}
+					serviceReferenceTable.put(event.getServiceReference(), Boolean.TRUE);
+					if (scpEnabled.isEmpty())
+						return; // check for any enabled configurations
 
-				synchronized (syncLock) {
 					resolvedComponents = getComponentsToBuild();
 					target = selectDynamicBind(scpEnabled, event.getServiceReference());
 				}
 
 				//do synchronous bind
 				if (target != null) {
-					instanceProcess.dynamicBind((Vector) target);
+					Vector unboundRefs = instanceProcess.dynamicBind((Vector) target);
+					if (unboundRefs != null) {
+						// put delayed dynamic binds on the queue
+						// (this is used to handle class circularity errors)
+						mgr.enqueueWork(this, Resolver.DYNAMICBIND, unboundRefs, false);
+					}
 				}
 
 				if (!resolvedComponents.isEmpty()) {
@@ -294,31 +330,35 @@ public final class Resolver implements WorkPerformer {
 
 				break;
 			case ServiceEvent.UNREGISTERING :
-				Vector newlyUnsatisfiedSCPs;
-				synchronized (syncLock) {
-					newlyUnsatisfiedSCPs = selectNewlyUnsatisfied();
-				}
-				if (!newlyUnsatisfiedSCPs.isEmpty()) {
-					// synchronously dispose newly unsatisfied components
-					instanceProcess.disposeInstances(newlyUnsatisfiedSCPs, ComponentConstants.DEACTIVATION_REASON_REFERENCE);
-				}
-
 				Vector componentsToDispose;
 				synchronized (syncLock) {
 					//check for components with static reference to this service
-					componentsToDispose = selectStaticUnBind(scpEnabled, event.getServiceReference());
+					componentsToDispose = selectStaticUnBind(scpEnabled, event.getServiceReference(), false);
 				}
 				//dispose instances from staticUnbind
 				if (componentsToDispose != null) {
-					instanceProcess.disposeInstances(componentsToDispose, ComponentConstants.DEACTIVATION_REASON_UNSPECIFIED);
+					instanceProcess.disposeInstances(componentsToDispose, ComponentConstants.DEACTIVATION_REASON_REFERENCE);
+				}
+
+				Vector newlyUnsatisfiedSCPs;
+				synchronized (syncLock) {
+					serviceReferenceTable.remove(event.getServiceReference());
+					if (scpEnabled.isEmpty())
+						return; // check for any enabled configurations
+
+					newlyUnsatisfiedSCPs = selectNewlyUnsatisfied(event.getServiceReference());
+				}
+				if (!newlyUnsatisfiedSCPs.isEmpty()) {
+					// synchronously dispose newly unsatisfied components
+					instanceProcess.disposeInstances(newlyUnsatisfiedSCPs, ComponentConstants.DEACTIVATION_REASON_REFERENCE);
 				}
 
 				synchronized (syncLock) {
 					// Pass in the set of currently resolved components, check each one -
 					// do we need to unbind
-					target = selectDynamicUnBind(scpEnabled, event.getServiceReference());
+					target = selectDynamicUnBind(scpEnabled, event.getServiceReference(), false);
 
-					if (componentsToDispose != null) {
+					if (componentsToDispose != null || !newlyUnsatisfiedSCPs.isEmpty()) {
 						// some components with static references were disposed. Try to build them again
 						// get list of newly satisfied SCPs and build them
 						resolvedComponents = getComponentsToBuild();
@@ -335,9 +375,12 @@ public final class Resolver implements WorkPerformer {
 
 			case ServiceEvent.MODIFIED :
 				synchronized (syncLock) {
+					if (scpEnabled.isEmpty())
+						return; // check for any enabled configurations
+
 					// check for newly unsatisfied components and synchronously
 					// dispose them
-					newlyUnsatisfiedSCPs = selectNewlyUnsatisfied();
+					newlyUnsatisfiedSCPs = selectNewlyUnsatisfied(event.getServiceReference());
 				}
 
 				if (!newlyUnsatisfiedSCPs.isEmpty()) {
@@ -346,7 +389,7 @@ public final class Resolver implements WorkPerformer {
 
 				synchronized (syncLock) {
 					//check for components with static reference to this service
-					componentsToDispose = selectStaticUnBind(scpEnabled, event.getServiceReference());
+					componentsToDispose = selectStaticUnBind(scpEnabled, event.getServiceReference(), true);
 				}
 
 				if (componentsToDispose != null) {
@@ -356,7 +399,7 @@ public final class Resolver implements WorkPerformer {
 				synchronized (syncLock) {
 					// dynamic unbind
 					// check each satisfied scp - do we need to unbind
-					target = selectDynamicUnBind(scpEnabled, event.getServiceReference());
+					target = selectDynamicUnBind(scpEnabled, event.getServiceReference(), true);
 				}
 
 				if (target != null) {
@@ -372,7 +415,12 @@ public final class Resolver implements WorkPerformer {
 				}
 
 				if (target != null) {
-					instanceProcess.dynamicBind((Vector) target);
+					Vector unboundRefs = instanceProcess.dynamicBind((Vector) target);
+					if (unboundRefs != null) {
+						// put delayed dynamic binds on the queue
+						// (this is used to handle class circularity errors)
+						mgr.enqueueWork(this, Resolver.DYNAMICBIND, unboundRefs, false);
+					}
 				}
 				if (!resolvedComponents.isEmpty()) {
 					instanceProcess.buildComponents(resolvedComponents, false);
@@ -400,7 +448,7 @@ public final class Resolver implements WorkPerformer {
 		ServiceComponentProp scp;
 		for (int i = resolvedComponents.size() - 1; i >= 0; i--) {
 			scp = (ServiceComponentProp) resolvedComponents.elementAt(i);
-			if (scp.getState() != ServiceComponentProp.SATISFIED) {
+			if (scp.getState() != Component.STATE_UNSATISFIED) {
 				resolvedComponents.removeElementAt(i);
 			}
 		}
@@ -429,11 +477,11 @@ public final class Resolver implements WorkPerformer {
 						// re-run the algorithm
 						Reference reference = (Reference) refs.elementAt(i);
 						if (reference != null) {
-							boolean resolved = !reference.isRequiredFor(scp.serviceComponent) || reference.hasProviders();
+							boolean resolved = !reference.isRequiredFor(scp.serviceComponent) || reference.hasProviders(this.serviceReferenceTable);
 
 							if (!resolved) {
 								if (Activator.DEBUG) {
-									Activator.log.debug("Resolver.resolveEligible(): " + NLS.bind(Messages.REFERENCE_NOT_RESOLVED, reference.reference.name, scp.name), null); //$NON-NLS-1$
+									Activator.log.debug("Resolver.resolveEligible(): reference '" + reference.reference.name + "' of component '" + scp.name + "' is not resolved", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 								}
 								enabledSCPs.removeElementAt(k);
 								break;
@@ -475,30 +523,28 @@ public final class Resolver implements WorkPerformer {
 						}
 					}
 					if (!hasPermission) {
-						if (Activator.DEBUG) {
-							Activator.log.debug(NLS.bind(Messages.COMPONENT_LACKS_APPROPRIATE_PERMISSIONS, scp.name, provides[i]), null);
-						}
-						scpEnabled.removeElementAt(k);
+						Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.COMPONENT_LACKS_APPROPRIATE_PERMISSIONS, scp.name, provides[i]), null);
+						removeEnabledSCP(scp);
 						enabledSCPs.removeElementAt(k);
 						continue;
 					}
 				}
-				if (scp.getState() < ServiceComponentProp.SATISFIED) {
-					scp.setState(ServiceComponentProp.SATISFIED);
+				if (!scp.isBuilt() && !(scp.getState() == Component.STATE_DEACTIVATING)) {
+					scp.setState(Component.STATE_UNSATISFIED);
 				}
 			}
 
 			if (Activator.DEBUG) {
-				Activator.log.debug(NLS.bind(Messages.RESOLVED_COMPONENTS, enabledSCPs.toString()), null);
+				Activator.log.debug("Resolver.resolveEligible(): resolved components = " + enabledSCPs.toString(), null); //$NON-NLS-1$
 			}
 			return enabledSCPs;
 		} catch (Throwable e) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, e);
 			return new Vector();
 		}
 	}
 
-	private Vector selectNewlyUnsatisfied() {
+	private Vector selectNewlyUnsatisfied(ServiceReference serviceRef) {
 		try {
 			Vector result = (Vector) scpEnabled.clone();
 			for (int k = result.size() - 1; k >= 0; k--) {
@@ -511,11 +557,19 @@ public final class Resolver implements WorkPerformer {
 					// scp and re-run the algorithm
 					Reference reference = (Reference) refs.elementAt(i);
 					if (reference != null) {
-						boolean resolved = !reference.isRequiredFor(scp.serviceComponent) || reference.hasProviders();
+						if (serviceRef != null && reference.reference.bind != null && scp.getState() == Component.STATE_ACTIVE && !(reference.dynamicUnbindReference(serviceRef) || reference.staticUnbindReference(serviceRef))) {
+							//make quick test - the service reference is not bound to the current component reference
+							continue;
+						}
+						if (serviceRef != null && !isPossibleMatch(reference, serviceRef)) {
+							// the service reference is not a possible match. Skipping further checks 
+							continue;
+						}
+						boolean resolved = !reference.isRequiredFor(scp.serviceComponent) || reference.hasProviders(this.serviceReferenceTable);
 
-						if (!resolved && scp.getState() > ServiceComponentProp.SATISFIED) {
+						if (!resolved && scp.isBuilt()) {
 							if (Activator.DEBUG) {
-								Activator.log.debug("Resolver.selectNewlyUnsatisfied(): " + NLS.bind(Messages.REFERENCE_NOT_RESOLVED, reference.reference.name, scp.name), null); //$NON-NLS-1$
+								Activator.log.debug("Resolver.selectNewlyUnsatisfied(): reference '" + reference.reference.name + "' of component '" + scp.name + "' is not resolved", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 							}
 							toDispose = true;
 							break;
@@ -528,9 +582,33 @@ public final class Resolver implements WorkPerformer {
 			}
 			return result;
 		} catch (Throwable e) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, e);
-			return null;
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, e);
+			return new Vector(1);
+		}
+	}
+
+	private boolean isPossibleMatch(Reference reference, ServiceReference serviceRef) {
+		String[] serviceNames = (String[]) serviceRef.getProperty(Constants.OBJECTCLASS);
+		boolean hasName = false;
+		for (int i = 0; i < serviceNames.length; i++) {
+			if (serviceNames[i].equals(reference.interfaceName)) {
+				hasName = true;
+				break;
+			}
+		}
+		if (!hasName) {
+			return false;
+		}
+		// check target filter
+		try {
+			Filter filter = FrameworkUtil.createFilter(reference.target);
+			if (!filter.match(serviceRef)) {
+				return false;
+			}
+		} catch (InvalidSyntaxException e) {
+			return false;
 		}
+		return true;
 	}
 
 	// -- begin *disable* component routines
@@ -563,6 +641,7 @@ public final class Resolver implements WorkPerformer {
 				// get the first CD
 				component = (ServiceComponent) componentDescriptions.elementAt(i);
 				component.enabled = false;
+				component.setState(Component.STATE_DISABLED);
 				if (Activator.DEBUG) {
 					Activator.log.debug("Resolver.disableComponents() " + component.name, null); //$NON-NLS-1$
 				}
@@ -583,6 +662,10 @@ public final class Resolver implements WorkPerformer {
 					removeList.removeAllElements();
 				}
 				if (component.componentProps != null) {
+					for (int j = 0; j < component.componentProps.size(); j++) {
+						scp = (ServiceComponentProp) component.componentProps.elementAt(j);
+						scp.setState(Component.STATE_DISPOSED);
+					}
 					component.componentProps.removeAllElements();
 				}
 			}
@@ -590,7 +673,7 @@ public final class Resolver implements WorkPerformer {
 
 		if (Activator.PERF) {
 			start = System.currentTimeMillis() - start;
-			Activator.log.info(NLS.bind(Messages.COMPONENTS_DISABLED, Integer.toString(componentDescriptions.size()), Long.toString(start)));
+			Activator.log.info("[DS perf] " + Integer.toString(componentDescriptions.size()) + " Components disabled for " + Long.toString(start) + "ms"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 		}
 	}
 
@@ -623,7 +706,7 @@ public final class Resolver implements WorkPerformer {
 							// remove unsatisfied configs
 							for (int i = toBind.size() - 1; i >= 0; i--) {
 								Reference ref = (Reference) toBind.elementAt(i);
-								if (ref.scp.getState() < ServiceComponentProp.SATISFIED) {
+								if (ref.scp.isUnsatisfied()) {
 									//System.out.println("--BIND: removing "+ref.scp);
 									toBind.removeElementAt(i);
 								}
@@ -635,9 +718,14 @@ public final class Resolver implements WorkPerformer {
 
 					}
 					break;
+				case DISPOSE :
+					if (workObject != null) {
+						instanceProcess.disposeInstances((Vector) workObject, ComponentConstants.DEACTIVATION_REASON_UNSPECIFIED);
+					}
+					break;
 			}
 		} catch (Throwable e) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, e);
 		}
 	}
 
@@ -646,7 +734,7 @@ public final class Resolver implements WorkPerformer {
 			Vector toBind = null;
 			for (int i = 0, size = scps.size(); i < size; i++) {
 				ServiceComponentProp scp = (ServiceComponentProp) scps.elementAt(i);
-				if (scp.getState() < ServiceComponentProp.SATISFIED) {
+				if (scp.isUnsatisfied()) {
 					//do not check disposed components
 					continue;
 				}
@@ -672,64 +760,31 @@ public final class Resolver implements WorkPerformer {
 			}
 			return toBind;
 		} catch (Throwable t) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, t);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, t);
 			return null;
 		}
 	}
 
-	private Vector selectStaticBind(Vector scps, ServiceReference serviceReference) {
-		try {
-			Vector toBind = null;
-			for (int i = 0, size = scps.size(); i < size; i++) {
-				ServiceComponentProp scp = (ServiceComponentProp) scps.elementAt(i);
-				if (scp.isComponentFactory() || scp.getState() < ServiceComponentProp.SATISFIED) {
-					// the component configuration does not have to be reactivated
-					continue;
-				}
-				// if it is not already eligible it will bind with the static
-				// scps
-				Vector references = scp.references;
-				if (references != null) {
-					for (int j = 0; j < references.size(); j++) {
-						Reference reference = (Reference) references.elementAt(j);
-						if (reference.bindNewReference(serviceReference, false)) {
-							if (toBind == null) {
-								toBind = new Vector(2);
-							}
-							toBind.addElement(scp);
-							break;
-						}
-					}
-				}
-			}
-			if (toBind != null && Activator.DEBUG) {
-				Activator.log.debug("Resolver.selectStaticBind(): selected = " + toBind.toString(), null); //$NON-NLS-1$
-			}
-			return toBind;
-		} catch (Throwable t) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, t);
-			return null;
-		}
-	}
-
-	private Vector selectStaticUnBind(Vector scpsToCheck, ServiceReference serviceReference) {
+	private Vector selectStaticUnBind(Vector scpsToCheck, ServiceReference serviceReference, boolean checkSatisfied) {
 		try {
 			Vector toUnbind = null;
 			for (int i = 0, size = scpsToCheck.size(); i < size; i++) {
 				ServiceComponentProp scp = (ServiceComponentProp) scpsToCheck.elementAt(i);
-				if (scp.getState() < ServiceComponentProp.DISPOSING) {
-					//the scp is already disposed
+				if (scp.isUnsatisfied()) {
+					//the scp is already deactivated
 					continue;
 				}
-				// if it is not already eligible it will bind with the static
-				// scps
+				// if it is not already eligible it will bind with the static scps
 				Vector references = scp.references;
-				// it is absolutely legal component if it doesn't contains
-				// references!
+				// it is absolutely legal component if it doesn't contains references!
 				if (references != null) {
 					for (int j = 0; j < references.size(); j++) {
 						Reference reference = (Reference) references.elementAt(j);
 						if (reference.staticUnbindReference(serviceReference)) {
+							if (checkSatisfied && reference.isInSatisfiedList(serviceReference)) {
+								//the service reference do still satisfy the reference and shall not be unbound
+								continue;
+							}
 							if (toUnbind == null) {
 								toUnbind = new Vector(2);
 							}
@@ -744,7 +799,7 @@ public final class Resolver implements WorkPerformer {
 				}
 			return toUnbind;
 		} catch (Throwable t) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, t);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, t);
 			return null;
 		}
 	}
@@ -759,18 +814,18 @@ public final class Resolver implements WorkPerformer {
 	 * @param serviceReference
 	 * @return this is fairly complex to explain ;(
 	 */
-	private Hashtable selectDynamicUnBind(Vector scps, ServiceReference serviceReference) {
+	private Hashtable selectDynamicUnBind(Vector scps, ServiceReference serviceReference, boolean checkSatisfied) {
 		try {
 			if (Activator.DEBUG) {
 				Activator.log.debug("Resolver.selectDynamicUnBind(): entered", null); //$NON-NLS-1$
 			}
 			Hashtable unbindTable = null; // ReferenceDescription:subTable
-			Hashtable unbindSubTable = null; // scp:sr
 			for (int i = 0; i < scps.size(); i++) {
+				Hashtable unbindSubTable = null; // scp:sr
 				ServiceComponentProp scp = (ServiceComponentProp) scps.elementAt(i);
 
-				if (scp.getState() < ServiceComponentProp.DISPOSING) {
-					//do not check disposed components
+				if (scp.isUnsatisfied()) {
+					//do not check deactivated components
 					continue;
 				}
 				Vector references = scp.references;
@@ -782,6 +837,10 @@ public final class Resolver implements WorkPerformer {
 						// Does the scp require this service, use the Reference
 						// object to check
 						if (reference.dynamicUnbindReference(serviceReference)) {
+							if (checkSatisfied && reference.isInSatisfiedList(serviceReference)) {
+								//the service reference do still satisfy the reference and shall not be unbound
+								continue;
+							}
 							if (Activator.DEBUG) {
 								Activator.log.debug("Resolver.selectDynamicUnBind(): unbinding " + scp.toString(), null); //$NON-NLS-1$
 							}
@@ -806,7 +865,7 @@ public final class Resolver implements WorkPerformer {
 			}
 			return unbindTable;
 		} catch (Throwable t) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, t);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, t);
 			return null;
 		}
 	}
@@ -826,7 +885,7 @@ public final class Resolver implements WorkPerformer {
 			// satisfied
 			Vector eligibleSCPs = resolveEligible();
 			if (!eligibleSCPs.contains(newSCP)) {
-				scpEnabled.removeElement(newSCP);
+				removeEnabledSCP(newSCP);
 				throw new ComponentException(NLS.bind(Messages.CANT_RESOLVE_COMPONENT_INSTANCE, newSCP, configProperties));
 			}
 			return newSCP;
@@ -890,7 +949,7 @@ public final class Resolver implements WorkPerformer {
 		} catch (CircularityException e) {
 			Activator.log(e.getCausingComponent().serviceComponent.bc, LogService.LOG_ERROR, NLS.bind(Messages.CIRCULARITY_EXCEPTION_FOUND, e.getCausingComponent().serviceComponent), e);
 			// disable offending SCP
-			scpEnabled.removeElement(e.getCausingComponent());
+			removeEnabledSCP(e.getCausingComponent());
 			// try again
 			findDependencyCycles();
 		}
@@ -988,17 +1047,35 @@ public final class Resolver implements WorkPerformer {
 		}
 	}
 
-	public void removeFromSatisfiedList(ServiceComponentProp scp) {
+	private void removeEnabledSCP(ServiceComponentProp scp) {
+		scpEnabled.removeElement(scp);
+		scp.serviceComponent.componentProps.remove(scp);
+		scp.setState(Component.STATE_DISPOSED);
+	}
+
+	/**
+	 * Reorder the specified SCP and place it at the end of the enabledSCPs list
+	 * @param scp the SCP to reorder
+	 */
+	protected void reorderSCP(ServiceComponentProp scp) {
 		synchronized (syncLock) {
-			scp.setState(ServiceComponentProp.DISPOSED);
+			if (scpEnabled.removeElement(scp)) {
+				scpEnabled.addElement(scp);
+			}
 		}
 	}
 
+	public void removeFromSatisfiedList(ServiceComponentProp scp) {
+		Vector tmp = new Vector();
+		tmp.addElement(scp);
+		mgr.enqueueWork(this, Resolver.DISPOSE, tmp, false);
+	}
+
 	/**
 	 * Used to traverse the dependency tree in order to find cycles.
 	 * 
 	 */
-	private class ReferenceSCPWrapper {
+	private static class ReferenceSCPWrapper {
 		public Reference ref;
 		public ServiceComponentProp producer;
 
@@ -1012,4 +1089,16 @@ public final class Resolver implements WorkPerformer {
 		}
 	}
 
+	public Component getComponent(long componentId) {
+		synchronized (scpEnabled) {
+			for (int i = 0; i < scpEnabled.size(); i++) {
+				ServiceComponentProp scp = (ServiceComponentProp) scpEnabled.elementAt(i);
+				if (scp.getId() == componentId) {
+					return scp;
+				}
+			}
+		}
+		return null;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRCommandProvider.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRCommandProvider.java
index c2d7435..3713b2b 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRCommandProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRCommandProvider.java
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    ProSyst Software GmbH - initial API and implementation
+ *    Simon Archer		 	- bug.id = 288783
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds;
 
@@ -50,7 +51,7 @@ public class SCRCommandProvider implements CommandProvider {
 		res.append("\n\tdisable/dis <component id> - ").append(Messages.DISABLE_COMPONENT); //$NON-NLS-1$
 		res.append("\n\t\t\t<component id> - ").append(Messages.COMPONENT_ID_DEFINIED_BY_LIST_COMMAND); //$NON-NLS-1$
 		res.append("\n\tenableAll/enAll [bundle id] - ").append(Messages.ENABLE_ALL_COMPONENTS); //$NON-NLS-1$
-		res.append("\tdisableAll/disAll [bundle id] - ").append(Messages.DISABLE_ALL_COMPONENTS).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		res.append("\n\tdisableAll/disAll [bundle id] - ").append(Messages.DISABLE_ALL_COMPONENTS).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
 		return res.toString();
 	}
 
@@ -255,7 +256,7 @@ public class SCRCommandProvider implements CommandProvider {
 			intp.println(NLS.bind(Messages.WRONG_PARAMETER2, bidString));
 			return null;
 		}
-		Bundle b = scrManager.bc.getBundle(bid);
+		Bundle b = Activator.bc.getBundle(bid);
 		if (b == null) {
 			intp.println(NLS.bind(Messages.BUNDLE_NOT_FOUND, bidString));
 		}
@@ -282,7 +283,7 @@ public class SCRCommandProvider implements CommandProvider {
 			return;
 		}
 
-		Bundle b = scrManager.bc.getBundle(cRef.bid);
+		Bundle b = Activator.bc.getBundle(cRef.bid);
 		if (b != null) {
 			Vector components = (Vector) scrManager.bundleToServiceComponents.get(b);
 			if (components != null) {
@@ -350,7 +351,7 @@ public class SCRCommandProvider implements CommandProvider {
 			Object key = keys.nextElement();
 			Object value = props.get(key);
 			intp.print("      " + key + " = "); //$NON-NLS-1$ //$NON-NLS-2$
-			printPropertyValue(intp, value);
+			intp.print(SCRUtil.getStringRepresentation(value));
 			intp.println();
 		}
 		intp.println("    Instances:"); //$NON-NLS-1$
@@ -359,106 +360,6 @@ public class SCRCommandProvider implements CommandProvider {
 		}
 	}
 
-	private void printPropertyValue(CommandInterpreter intp, Object value) {
-		if (value instanceof Object[]) {
-			intp.print("Object["); //$NON-NLS-1$
-			Object[] arr = (Object[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				printPropertyValue(intp, arr[i]);
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof String[]) {
-			intp.print("String["); //$NON-NLS-1$
-			String[] arr = (String[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i]);
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof int[]) {
-			intp.print("int["); //$NON-NLS-1$
-			int[] arr = (int[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof long[]) {
-			intp.print("long["); //$NON-NLS-1$
-			long[] arr = (long[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof char[]) {
-			intp.print("char["); //$NON-NLS-1$
-			char[] arr = (char[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof boolean[]) {
-			intp.print("boolean["); //$NON-NLS-1$
-			boolean[] arr = (boolean[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof double[]) {
-			intp.print("double["); //$NON-NLS-1$
-			double[] arr = (double[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else if (value instanceof float[]) {
-			intp.print("float["); //$NON-NLS-1$
-			float[] arr = (float[]) value;
-			for (int i = 0; i < arr.length; i++) {
-				intp.print(arr[i] + ""); //$NON-NLS-1$
-				if (i != arr.length - 1) {
-					intp.print(","); //$NON-NLS-1$
-				}
-			}
-			intp.print("]"); //$NON-NLS-1$
-		} else {
-			intp.print(value.toString());
-		}
-	}
-
-	private boolean isResolved(ServiceComponent sc) {
-		Vector unresulvedReferences = getUnresolvedReferences(sc);
-		boolean resolved = true;
-		if (unresulvedReferences != null) {
-			for (int i = 0; i < unresulvedReferences.size(); i++) {
-				if (isMandatory((ComponentReference) unresulvedReferences.elementAt(i))) {
-					resolved = false;
-					break;
-				}
-			}
-		}
-		return resolved;
-	}
-
 	private Vector getUnresolvedReferences(ServiceComponent sc) {
 		Vector unresolved = new Vector();
 		if (sc.references != null) {
@@ -520,7 +421,7 @@ public class SCRCommandProvider implements CommandProvider {
 			}
 		} else {
 			if (scrManager.bundleToServiceComponents != null) {
-				Bundle[] allBundles = scrManager.bc.getBundles();
+				Bundle[] allBundles = Activator.bc.getBundles();
 				for (int j = 0; j < allBundles.length; j++) {
 					Vector components = (Vector) scrManager.bundleToServiceComponents.get(allBundles[j]);
 					if (components != null) {
@@ -565,7 +466,7 @@ public class SCRCommandProvider implements CommandProvider {
 			}
 		} else {
 			if (scrManager.bundleToServiceComponents != null) {
-				Bundle[] allBundles = scrManager.bc.getBundles();
+				Bundle[] allBundles = Activator.bc.getBundles();
 				for (int j = 0; j < allBundles.length; j++) {
 					Vector components = (Vector) scrManager.bundleToServiceComponents.get(allBundles[j]);
 					if (components != null) {
@@ -591,7 +492,7 @@ public class SCRCommandProvider implements CommandProvider {
 			intp.println(Messages.INVALID_COMPONENT_ID);
 			return;
 		}
-		scrManager.enableComponent(cRef.name, scrManager.bc.getBundle(cRef.bid));
+		scrManager.enableComponent(cRef.name, Activator.bc.getBundle(cRef.bid));
 		intp.println(NLS.bind(Messages.SENT_ENABLING_REQUEST, cRef.name));
 	}
 
@@ -601,7 +502,7 @@ public class SCRCommandProvider implements CommandProvider {
 			intp.println(Messages.INVALID_COMPONENT_ID);
 			return;
 		}
-		scrManager.disableComponent(cRef.name, scrManager.bc.getBundle(cRef.bid));
+		scrManager.disableComponent(cRef.name, Activator.bc.getBundle(cRef.bid));
 		intp.println(NLS.bind(Messages.SENT_DISABLING_REQUEST, cRef.name));
 	}
 
@@ -647,18 +548,17 @@ public class SCRCommandProvider implements CommandProvider {
 						} else {
 							////print short info
 							intp.print("" + ref.id); //$NON-NLS-1$
-							boolean resolved = isResolved(sc);
-							String stateStr = sc.enabled ? (resolved ? "\tSatisfied" : "\tUnsatisfied") : "\tDisabled"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-							intp.print(stateStr);
+							intp.print("\t" + SCRUtil.getStateStringRepresentation(sc.getState())); //$NON-NLS-1$
 							intp.print("\t\t" + sc.name); //$NON-NLS-1$
 							intp.println("\t\t\t" + getBundleRepresentationName(b) + "(bid=" + b.getBundleId() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 						}
 					}
 				}
 			}
+
 		} else {
 			if (scrManager.bundleToServiceComponents != null) {
-				Bundle[] allBundles = scrManager.bc.getBundles();
+				Bundle[] allBundles = Activator.bc.getBundles();
 				for (int j = 0; j < allBundles.length; j++) {
 					Vector components = (Vector) scrManager.bundleToServiceComponents.get(allBundles[j]);
 					if (components != null) {
@@ -678,9 +578,7 @@ public class SCRCommandProvider implements CommandProvider {
 							} else {
 								////print short info
 								intp.print("" + ref.id); //$NON-NLS-1$
-								boolean resolved = isResolved(sc);
-								String stateStr = sc.enabled ? (resolved ? "\tSatisfied" : "\tUnsatisfied") : "\tDisabled"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-								intp.print(stateStr);
+								intp.print("\t" + SCRUtil.getStateStringRepresentation(sc.getState())); //$NON-NLS-1$
 								intp.print("\t\t" + sc.name); //$NON-NLS-1$
 								intp.println("\t\t\t" + getBundleRepresentationName(allBundles[j]) + "(bid=" + allBundles[j].getBundleId() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 							}
@@ -693,7 +591,7 @@ public class SCRCommandProvider implements CommandProvider {
 
 	private void initComponentRefs() {
 		if (scrManager.bundleToServiceComponents != null) {
-			Bundle[] allBundles = scrManager.bc.getBundles();
+			Bundle[] allBundles = Activator.bc.getBundles();
 			for (int j = 0; j < allBundles.length; j++) {
 				Vector components = (Vector) scrManager.bundleToServiceComponents.get(allBundles[j]);
 				if (components != null) {
@@ -724,7 +622,7 @@ public class SCRCommandProvider implements CommandProvider {
 		return curID++;
 	}
 
-	public class ComponentRef {
+	private static class ComponentRef {
 		////the ID of the bundle holding this service component
 		long bid;
 		////the name of the service component
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
index e456995..209d49b 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRManager.java
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    ProSyst Software GmbH - initial API and implementation
+ *    Andrew Teirney		 - bug.id = 278732
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds;
 
@@ -15,9 +16,9 @@ import java.io.IOException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.model.*;
 import org.eclipse.equinox.internal.util.event.Queue;
-import org.eclipse.equinox.internal.util.ref.Log;
 import org.eclipse.equinox.internal.util.threadpool.ThreadPoolManager;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
@@ -28,9 +29,14 @@ import org.osgi.service.log.LogService;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
- * Manager of update and delete events, forwarded by ConfigurationImpl to the
- * corresponding ManagedService(Factories). As those events are asynchronuos, a
- * separate thread is engaged for their execution.
+ * Acts as a "Bundle Manager" - a listener for bundle events. Whenever a bundle
+ * is stopped or started it will invoke the resolver to respectively enable or
+ * disable the contained components. Notice, the SynchronousBundleListener
+ * bundle listeners are called prior bundle event is completed.
+ * 
+ * It is also a listener for update and delete configuration events, sent by
+ * Configuration Admin, thus handling the changes in configurations which are meant 
+ * to configure the properties of DS components
  * 
  * @author Maria Ivanova
  * @author Stoyan Boshev
@@ -39,10 +45,12 @@ import org.osgi.util.tracker.ServiceTracker;
 
 public class SCRManager implements ServiceListener, SynchronousBundleListener, ConfigurationListener, WorkPerformer, PrivilegedAction {
 
+	/** work action type */
+	public final int ENABLE_COMPONENTS = 1;
+	public final int DISABLE_COMPONENTS = 2;
+
 	protected Hashtable bundleToServiceComponents;
-	public BundleContext bc;
 	protected Queue queue;
-	public static Log log;
 	private Resolver resolver;
 
 	private WorkThread workThread;
@@ -50,34 +58,18 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 	protected boolean stopped = false;
 	private ServiceTracker threadPoolManagerTracker;
 	private boolean hasRegisteredServiceListener = false;
-
-	/** work action type */
-	public final int ENABLE_COMPONENTS = 1;
-	public final int DISABLE_COMPONENTS = 2;
-
 	private ComponentStorage storage;
-	boolean doSynchronousComponentResolving = true;
 
 	/**
 	 * Constructs the SCRManager.
 	 */
-	public SCRManager(BundleContext bc, Log log) {
-		this.bc = bc;
-		SCRManager.log = log;
-		String doSynchronousComponentResolvingValue = System.getProperty("equinox.ds.synchronous_build"); //$NON-NLS-1$
-		if (doSynchronousComponentResolvingValue != null) {
-			//def value is true
-			doSynchronousComponentResolving = !doSynchronousComponentResolvingValue.equalsIgnoreCase("false"); //$NON-NLS-1$
-		}
-
-		security = Log.security();
-
+	public SCRManager() {
 		hasRegisteredServiceListener = true;
 		queue = new Queue(10);
 		if (Activator.startup)
 			Activator.timeLog("Queue instantiated for "); //$NON-NLS-1$
 
-		threadPoolManagerTracker = new ServiceTracker(bc, ThreadPoolManager.class.getName(), null);
+		threadPoolManagerTracker = new ServiceTracker(Activator.bc, ThreadPoolManager.class.getName(), null);
 		threadPoolManagerTracker.open();
 		if (Activator.startup)
 			Activator.timeLog("Threadpool service tracker opened for "); //$NON-NLS-1$
@@ -86,24 +78,28 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		if (Activator.startup)
 			Activator.timeLog("Resolver instantiated for "); //$NON-NLS-1$
 
-		bc.addBundleListener(this);
+		resolver.synchronizeServiceReferences();
+		if (Activator.startup)
+			Activator.timeLog("resolver.synchronizeServiceReferences() method took "); //$NON-NLS-1$
+
+		Activator.bc.addBundleListener(this);
 		if (Activator.startup)
 			Activator.timeLog("addBundleListener() method took "); //$NON-NLS-1$
 
-		String storageClass = bc.getProperty("scr.storage.class"); //$NON-NLS-1$
+		String storageClass = Activator.bc.getProperty("scr.storage.class"); //$NON-NLS-1$
 		if (storageClass == null) {
 			storageClass = "org.eclipse.equinox.internal.ds.storage.file.FileStorage"; //$NON-NLS-1$
 		}
 		try {
-			storage = (ComponentStorage) Class.forName(storageClass).getConstructor(new Class[] {BundleContext.class}).newInstance(new Object[] {bc});
+			storage = (ComponentStorage) Class.forName(storageClass).getConstructor(new Class[] {BundleContext.class}).newInstance(new Object[] {Activator.bc});
 		} catch (Exception e) {
-			log.error(NLS.bind(Messages.COULD_NOT_CREATE_INSTANCE, storageClass), e);
+			Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.COULD_NOT_CREATE_INSTANCE, storageClass), e);
 		}
 	}
 
 	public void startIt() {
 		// loop through the currently installed bundles
-		Bundle[] bundles = bc.getBundles();
+		Bundle[] bundles = Activator.bc.getBundles();
 		if (bundles != null) {
 			for (int i = 0; i < bundles.length; i++) {
 				Bundle current = bundles[i];
@@ -151,12 +147,10 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 				}
 			}
 		} catch (Throwable e) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, e);
 		}
 	}
 
-	static boolean security = false;
-
 	public Object run() {
 		ThreadPoolManager threadPool = (ThreadPoolManager) threadPoolManagerTracker.getService();
 		if (threadPool != null) {
@@ -171,7 +165,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		resolver.queueBlocked();
 		synchronized (queue) {
 			running = false;
-			addEvent(null, security); // will result in starting new
+			addEvent(null, Activator.security); // will result in starting new
 			// WorkThread to process the queued work
 		}
 	}
@@ -223,6 +217,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 	}
 
 	public void serviceChanged(ServiceEvent sEv) {
+
 		resolver.getEligible(sEv);
 	}
 
@@ -230,7 +225,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		long start = 0l;
 		if (Activator.PERF) {
 			start = System.currentTimeMillis();
-			log.info(NLS.bind(Messages.PROCESSING_BUNDLE_EVENT, event));
+			Activator.log.info("[DS perf] Started processing bundle event " + event); //$NON-NLS-1$
 		}
 		int type = event.getType();
 		if (type == BundleEvent.STOPPING) {
@@ -244,7 +239,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		}
 		if (Activator.PERF) {
 			start = System.currentTimeMillis() - start;
-			log.info(NLS.bind(Messages.PROCESSED_BUNDLE_EVENT, event, new Long(start)));
+			Activator.log.info("[DS perf] Processed bundle event '" + event + "' for " + start + "ms"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 		}
 	}
 
@@ -278,7 +273,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 			}
 			if (Activator.PERF) {
 				start = System.currentTimeMillis();
-				log.info(NLS.bind(Messages.PROCESSING_CONF_EVENT, event));
+				Activator.log.info("[DS perf] Started processing configuration event " + event); //$NON-NLS-1$
 			}
 
 			String pid = event.getPid();
@@ -312,11 +307,11 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 				}
 			}
 		} catch (Throwable e) {
-			Activator.log.error(NLS.bind(Messages.ERROR_PROCESSING_CONFIGURATION, event.getReference().getBundle()), e);
+			Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_PROCESSING_CONFIGURATION, event.getReference().getBundle()), e);
 		} finally {
 			if (Activator.PERF) {
 				start = System.currentTimeMillis() - start;
-				log.info(NLS.bind(Messages.PROCESSED_CONF_EVENT, event, new Long(start)));
+				Activator.log.info("[DS perf] Processed configuration event '" + event + "' for " + start + "ms"); //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
 			}
 		}
 	}
@@ -332,11 +327,11 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 
 				String filter = (fpid != null ? "(&" : "") + "(" + Constants.SERVICE_PID + "=" + pid + ")" + (fpid != null ? ("(" + ConfigurationAdmin.SERVICE_FACTORYPID + "=" + fpid + "))") : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
 				try {
-					config = ConfigurationManager.listConfigurations(filter);
+					config = Activator.listConfigurations(filter);
 				} catch (IOException e) {
-					log.error(Messages.ERROR_LISTING_CONFIGURATIONS, e);
+					Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_LISTING_CONFIGURATIONS, e);
 				} catch (InvalidSyntaxException e) {
-					log.error(Messages.ERROR_LISTING_CONFIGURATIONS, e);
+					Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_LISTING_CONFIGURATIONS, e);
 				}
 
 				if (config == null) {
@@ -349,13 +344,11 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 				if (fpid == null) {
 					// there is only one SCP for this SC
 					boolean requiresRestart = true;
-					if (sc.namespace11) {
-						if (sc.componentProps != null && sc.modifyMethodName != "") { //$NON-NLS-1$
-							ServiceComponentProp scp = (ServiceComponentProp) sc.componentProps.elementAt(0);
-							if (scp.getState() > ServiceComponentProp.SATISFIED) {
-								//process only built components
-								requiresRestart = processConfigurationChange(scp, config[0]);
-							}
+					if (sc.namespace11 && sc.modifyMethodName != "") { //$NON-NLS-1$
+						ServiceComponentProp scp = sc.getServiceComponentProp();
+						if (scp != null && scp.isBuilt()) {
+							//process only built components
+							requiresRestart = processConfigurationChange(scp, config[0]);
 						}
 					}
 					if (requiresRestart) {
@@ -377,12 +370,16 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 					ServiceComponentProp scp = sc.getComponentPropByPID(pid);
 
 					// if only the no-props scp exists, replace it
-					if (scp == null && sc.componentProps != null && sc.componentProps.size() == 1 && (((ServiceComponentProp) sc.componentProps.elementAt(0)).getProperties().get(Constants.SERVICE_PID) == null)) {
-						scp = (ServiceComponentProp) sc.componentProps.elementAt(0);
+					if (scp == null && sc.componentProps != null) {
+						synchronized (sc.componentProps) {
+							if (sc.componentProps.size() == 1 && (((ServiceComponentProp) sc.componentProps.elementAt(0)).getProperties().get(Constants.SERVICE_PID) == null)) {
+								scp = (ServiceComponentProp) sc.componentProps.elementAt(0);
+							}
+						}
 					}
 					boolean requiresRestart = true;
 					if (sc.namespace11 && sc.modifyMethodName != "" && scp != null) { //$NON-NLS-1$
-						if (scp.getState() > ServiceComponentProp.SATISFIED) {
+						if (scp.isBuilt()) {
 							//process only built components
 							requiresRestart = processConfigurationChange(scp, config[0]);
 						}
@@ -395,6 +392,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 							Vector components = new Vector();
 							components.addElement(scp);
 							resolver.disposeComponentConfigs(components, ComponentConstants.DEACTIVATION_REASON_CONFIGURATION_MODIFIED);
+							scp.setState(Component.STATE_DISPOSED);
 						}
 
 						// create a new scp (adds to resolver enabledSCPs list)
@@ -436,6 +434,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 						// now re-enable the SC - the resolver will create SCP
 						// with no configAdmin properties
 						sc.enabled = true;
+						sc.setState(Component.STATE_UNSATISFIED);
 						resolver.enableComponents(components);
 					} else {
 						// we can just dispose this SCP
@@ -443,6 +442,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 						Vector components = new Vector();
 						components.addElement(scp);
 						resolver.disposeComponentConfigs(components, ComponentConstants.DEACTIVATION_REASON_CONFIGURATION_DELETED);
+						scp.setState(Component.STATE_DISPOSED);
 					}
 				}
 				break;
@@ -548,12 +548,18 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 				if (Activator.DEBUG) {
 					String bundleName = bundle.getSymbolicName();
 					bundleName = (bundleName == null || "".equals(bundleName)) ? bundle.getLocation() : bundleName; //$NON-NLS-1$
-					log.debug("SCRManager.stoppingBundle : " + bundleName, null); //$NON-NLS-1$
+					Activator.log.debug("SCRManager.stoppingBundle : " + bundleName, null); //$NON-NLS-1$
 				}
 				resolver.disableComponents(components, ComponentConstants.DEACTIVATION_REASON_BUNDLE_STOPPED);
+
+				//set disposed state to all components since some of them might be still referenced by the ScrService
+				for (int i = 0; i < components.size(); i++) {
+					ServiceComponent sc = (ServiceComponent) components.elementAt(i);
+					sc.setState(Component.STATE_DISPOSED);
+				}
 				if (bundleToServiceComponents.size() == 0) {
 					hasRegisteredServiceListener = false;
-					bc.removeServiceListener(this);
+					Activator.bc.removeServiceListener(this);
 				}
 			}
 		}
@@ -581,11 +587,12 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		if (components != null && !components.isEmpty()) {
 			if (!hasRegisteredServiceListener) {
 				hasRegisteredServiceListener = true;
-				bc.addServiceListener(this);
+				Activator.bc.addServiceListener(this);
+				resolver.synchronizeServiceReferences();
 			}
 			if (Activator.PERF) {
 				start = System.currentTimeMillis() - start;
-				log.info(NLS.bind(Messages.COMPONENTS_PARSED_TIME, bundle, new Long(start)));
+				Activator.log.info("[DS perf] The components of bundle " + bundle + " are parsed for " + start + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 			if (bundleToServiceComponents == null) {
 				synchronized (this) {
@@ -642,7 +649,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 							components.wait(1000);
 						} while (!components.isEmpty() && (System.currentTimeMillis() - startTime < WorkThread.BLOCK_TIMEOUT));
 						if (System.currentTimeMillis() - startTime >= WorkThread.BLOCK_TIMEOUT) {
-							Activator.log.warning(NLS.bind(Messages.TIMEOUT_REACHED_ENABLING_COMPONENTS, getBundleName(bundle), Integer.toString(WorkThread.BLOCK_TIMEOUT)), null);
+							Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.TIMEOUT_REACHED_ENABLING_COMPONENTS, getBundleName(bundle), Integer.toString(WorkThread.BLOCK_TIMEOUT)), null);
 						}
 					} catch (InterruptedException e) {
 						//do nothing
@@ -672,7 +679,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 			Vector componentsToProcess = null;
 
 			if (Activator.DEBUG) {
-				String message = (enable ? "SCRManager.enableComponent(): " : "SCRManager.disableComponent(): ").concat(name != null ? name : "*all*") + " from bundle " + bundle.getSymbolicName(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				String message = (enable ? "SCRManager.enableComponent(): " : "SCRManager.disableComponent(): ").concat(name != null ? name : "*all*") + " from bundle " + getBundleName(bundle); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 				Activator.log.debug(message, null);
 			}
 			Vector bundleComponents = (Vector) bundleToServiceComponents.get(bundle);
@@ -685,6 +692,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 							found = true;
 							if (component.enabled != enable) {
 								component.enabled = enable;
+								component.setState(enable ? Component.STATE_ENABLING : Component.STATE_DISABLING);
 								componentsToProcess = new Vector(2);
 								componentsToProcess.addElement(component);
 								break;
@@ -705,6 +713,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 							if (!sc.enabled) {
 								componentsToProcess.addElement(sc);
 								sc.enabled = enable;
+								sc.setState(Component.STATE_ENABLING);
 							}
 						}
 					}
@@ -714,22 +723,22 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 			// publish to resolver the list of SCs to enable
 			if (componentsToProcess != null && !componentsToProcess.isEmpty()) {
 				if (enable) {
-					enqueueWork(this, ENABLE_COMPONENTS, componentsToProcess, security);
+					enqueueWork(this, ENABLE_COMPONENTS, componentsToProcess, Activator.security);
 				} else {
-					enqueueWork(this, DISABLE_COMPONENTS, componentsToProcess, security);
+					enqueueWork(this, DISABLE_COMPONENTS, componentsToProcess, Activator.security);
 				}
 			}
 		} catch (IllegalArgumentException iae) {
 			throw iae;
 		} catch (Throwable e) {
-			Activator.log.error(Messages.UNEXPECTED_EXCEPTION, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, e);
 		}
 	}
 
 	/**
 	 * QueuedJob represents the items placed on the asynch dispatch queue.
 	 */
-	public class QueuedJob {
+	static class QueuedJob {
 		final WorkPerformer performer;
 		/** the required type of action to do */
 		final int actionType;
@@ -757,7 +766,7 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 				/* Call the WorkPerformer to process the work. */
 				performer.performWork(actionType, workToDo);
 			} catch (Throwable t) {
-				log.error(Messages.ERROR_DISPATCHING_WORK, t);
+				Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_DISPATCHING_WORK, t);
 			}
 		}
 
@@ -799,4 +808,117 @@ public class SCRManager implements ServiceListener, SynchronousBundleListener, C
 		}
 	}
 
+	protected void configAdminRegistered(ConfigurationAdmin configAdmin, ServiceReference caReference) {
+		if (bundleToServiceComponents == null || bundleToServiceComponents.isEmpty()) {
+			// no components found till now
+			return;
+		}
+		Vector toProcess = new Vector(1);
+		Configuration[] configs = null;
+		try {
+			configs = configAdmin.listConfigurations(null);
+		} catch (Exception e) {
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_LISTING_CONFIGURATIONS, e);
+		}
+		if (configs == null || configs.length == 0) {
+			//no configurations found
+			return;
+		}
+		//process all components to find such that need to be evaluated when ConfigAdmin is available
+		for (Enumeration keys = bundleToServiceComponents.keys(); keys.hasMoreElements();) {
+			Vector bundleComps = (Vector) bundleToServiceComponents.get(keys.nextElement());
+			// bundleComps may be null since bundleToServiceComponents
+			// may have been modified by another thread
+			if (bundleComps != null) {
+				for (int i = 0; i < bundleComps.size(); i++) {
+					ServiceComponent sc = (ServiceComponent) bundleComps.elementAt(i);
+					if (sc.getConfigurationPolicy() == ServiceComponent.CONF_POLICY_IGNORE) {
+						//skip processing of this component - it is not interested in configuration changes
+						continue;
+					}
+					if (sc.enabled) {
+						for (int j = 0; j < configs.length; j++) {
+							if (configs[j].getPid().equals(sc.name) || sc.name.equals(configs[j].getFactoryPid())) {
+								if (sc.name.equals(configs[j].getFactoryPid()) && sc.factory != null) {
+									Activator.log(sc.bc, LogService.LOG_ERROR, NLS.bind(Messages.FACTORY_CONF_NOT_APPLICABLE_FOR_COMPONENT_FACTORY, sc.name), null);
+									break;
+								}
+								//found a configuration for this component
+								if (sc.componentProps == null || sc.componentProps.size() == 0) {
+									if (sc.getConfigurationPolicy() == ServiceComponent.CONF_POLICY_REQUIRE) {
+										//the component is not yet mapped because it is requiring configuration. Try to process it
+										toProcess.addElement(sc);
+									}
+								} else {
+									//process the component configurations and eventually modify or restart them
+									ConfigurationEvent ce = new ConfigurationEvent(caReference, ConfigurationEvent.CM_UPDATED, configs[j].getFactoryPid(), configs[j].getPid());
+									processConfigurationEvent(ce, sc);
+								}
+								break;
+							}
+						}
+					}
+				}
+			}
+		}
+		if (toProcess.size() > 0) {
+			resolver.enableComponents(toProcess);
+		}
+	}
+
+	public Component[] getComponents() {
+		if (bundleToServiceComponents == null || bundleToServiceComponents.isEmpty()) {
+			// no components found till now
+			return null;
+		}
+		Vector result = new Vector();
+		Enumeration en = bundleToServiceComponents.keys();
+		while (en.hasMoreElements()) {
+			Bundle b = (Bundle) en.nextElement();
+			Vector serviceComponents = (Vector) bundleToServiceComponents.get(b);
+			for (int i = 0; i < serviceComponents.size(); i++) {
+				ServiceComponent sc = (ServiceComponent) serviceComponents.elementAt(i);
+				if (sc.componentProps != null && !sc.componentProps.isEmpty()) {
+					//add the created runtime components props
+					result.addAll(sc.componentProps);
+				} else {
+					//add the declared component itself
+					result.add(sc);
+				}
+			}
+		}
+		if (!result.isEmpty()) {
+			Component[] res = new Component[result.size()];
+			result.copyInto(res);
+			return res;
+		}
+		return null;
+	}
+
+	public Component[] getComponent(Bundle bundle) {
+		if (bundleToServiceComponents == null || bundleToServiceComponents.isEmpty()) {
+			// no components found till now
+			return null;
+		}
+		Vector serviceComponents = (Vector) bundleToServiceComponents.get(bundle);
+		if (serviceComponents != null) {
+			Vector result = new Vector();
+			for (int i = 0; i < serviceComponents.size(); i++) {
+				ServiceComponent sc = (ServiceComponent) serviceComponents.elementAt(i);
+				if (sc.componentProps != null && !sc.componentProps.isEmpty()) {
+					//add the created runtime components props
+					result.addAll(sc.componentProps);
+				} else {
+					//add the declared component itself
+					result.add(sc);
+				}
+			}
+			if (!result.isEmpty()) {
+				Component[] res = new Component[result.size()];
+				result.copyInto(res);
+				return res;
+			}
+		}
+		return null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRUtil.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRUtil.java
index 78a4bf7..0d3fd86 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRUtil.java
@@ -15,6 +15,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.Dictionary;
 import java.util.Enumeration;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.util.pool.ObjectCreator;
 import org.eclipse.equinox.internal.util.pool.ObjectPool;
 
@@ -128,4 +129,151 @@ public final class SCRUtil implements ObjectCreator {
 			failed = true;
 		}
 	}
+
+	/**
+	 * Gets the string representation of an <code>Object</code>. This method is
+	 * helpful if the passed parameter is a type of array. If the objects is not
+	 * recognized as array, the method will simply return the toString() value
+	 * 
+	 * @param value
+	 *          an object which should be represented as string
+	 * @return the string representation of the
+	 */
+	public static String getStringRepresentation(Object value) {
+		if (value == null)
+			return "null"; //$NON-NLS-1$
+		//this would speedup many cases
+		if (value instanceof String)
+			return (String) value;
+
+		StringBuffer res = new StringBuffer(200);
+
+		if (value instanceof String[]) {
+			res.append("String["); //$NON-NLS-1$
+			String[] arr = (String[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i]);
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof int[]) {
+			res.append("int["); //$NON-NLS-1$
+			int[] arr = (int[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof long[]) {
+			res.append("long["); //$NON-NLS-1$
+			long[] arr = (long[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof char[]) {
+			res.append("char["); //$NON-NLS-1$
+			char[] arr = (char[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof boolean[]) {
+			res.append("boolean["); //$NON-NLS-1$
+			boolean[] arr = (boolean[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof double[]) {
+			res.append("double["); //$NON-NLS-1$
+			double[] arr = (double[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof float[]) {
+			res.append("float["); //$NON-NLS-1$
+			float[] arr = (float[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(arr[i] + ""); //$NON-NLS-1$
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else if (value instanceof Object[]) {
+			res.append("Object["); //$NON-NLS-1$
+			Object[] arr = (Object[]) value;
+			for (int i = 0; i < arr.length; i++) {
+				res.append(getStringRepresentation(arr[i]));
+				if (i != arr.length - 1) {
+					res.append(","); //$NON-NLS-1$
+				}
+			}
+			res.append("]"); //$NON-NLS-1$
+		} else {
+			return value.toString();
+		}
+		return res.toString();
+	}
+
+	/**
+	 * Gets the string presentation of a state defined by the interface org.apache.felix.scr.Component
+	 * @param state the specified state
+	 * @return the string representation of the specified state
+	 */
+	public static String getStateStringRepresentation(int state) {
+		String result = "Unknown"; //$NON-NLS-1$
+		switch (state) {
+			case Component.STATE_ACTIVATING :
+				result = "Activating"; //$NON-NLS-1$
+				break;
+			case Component.STATE_ACTIVE :
+				result = "Active"; //$NON-NLS-1$
+				break;
+			case Component.STATE_DEACTIVATING :
+				result = "Deactivating"; //$NON-NLS-1$
+				break;
+			case Component.STATE_DISABLED :
+				result = "Disabled"; //$NON-NLS-1$
+				break;
+			case Component.STATE_DISPOSED :
+				result = "Disposed"; //$NON-NLS-1$
+				break;
+			case Component.STATE_DISPOSING :
+				result = "Disposing"; //$NON-NLS-1$
+				break;
+			case Component.STATE_ENABLING :
+				result = "Enabling"; //$NON-NLS-1$
+				break;
+			case Component.STATE_FACTORY :
+				result = "Factory"; //$NON-NLS-1$
+				break;
+			case Component.STATE_REGISTERED :
+				result = "Registered"; //$NON-NLS-1$
+				break;
+			case Component.STATE_UNSATISFIED :
+				result = "Unsatisfied"; //$NON-NLS-1$
+				break;
+
+		}
+		return result;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRmessages.properties b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRmessages.properties
index 16ddd7f..ad7c639 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRmessages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/SCRmessages.properties
@@ -12,36 +12,26 @@
 ALL_COMPONENTS=All Components:
 ALL_REFERENCES_RESOLVED=\ \ All component references are satisfied
 BIND_METHOD_NOT_FOUND_OR_NOT_ACCESSIBLE=[SCR] ComponentReference.bind(): bind method ''{0}'' is not found or it is not accessible!
-BUILDING_COMPONENT=InstanceProcess.buildComponent(): building component {0}
-BUILDING_COMPONENT_FACTORY=InstanceProcess.buildComponents(): building component factory {0} 
-BUILDING_COMPONENT_INSTANCE=[DS perf] Start building instance of component {0}
-BUILDING_IMMEDIATE_COMPONENT=InstanceProcess.buildComponents(): building immediate component {0}
 BUNDLE_NOT_FOUND=Bundle with ID {0} was not found!
 CANNOT_BUILD_COMPONENT=[SCR] Cannot build component {0}
 CANNOT_CREATE_INSTANCE=ServiceReg.getService(): Could not create instance of {0}
 CANNOT_FIND_COMPONENT_BUNDLE=Could not find the bundle of the specified component\! It is possibly uninstalled.
-CANNOT_FIND_REGISTRATION=InstanceProcess.disposeInstances(): cannot find registrations for {0}
 CANNOT_GET_CONFIGURATION=[SCR] Cannot get configuration for component {0}
-CANNOT_GET_LOGSERVICE=Cannot get LogService for bundle {0}
 CANNOT_GET_REFERENCES=[SCR] Cannot get references for {0}
-CANNOT_GET_SERVICE_BECAUSEOF_CIRCULARITY=InstanceProcess.getService(): cannot get service because of circularity\! Reference is: {0} ; The service reference is {1}  
 CANNOT_MODIFY_INSTANCE__MODIFY_METHOD_NOT_FOUND=[SCR] Cannot modify instance {0} of component {1}\! The specified modify method was not found\!
 CANT_ACTIVATE_INSTANCE=[SCR] Cannot activate instance {0} of component {1} 
 CANT_GET_SERVICE=FactoryReg.getService(): Cannot create instance of {0}
-CANT_GET_SERVICE_OBJECT=[SCR] Could not get the service object relevant to the reference. A very possible reason is a circularity problem.
+CANT_GET_SERVICE_OBJECT=[SCR] Could not get the service object relevant to the reference. One possible reason is a circularity problem. Another possible reason is that BundleContext.getService() returns null.
 CANT_LIST_CONFIGURATIONS=[SCR] Cannot list configurations for component {0}
 CANT_OPEN_STREAM_TO_COMPONENT_XML=[SCR] Could not open stream to component definition file {0}
 CANT_RESOLVE_COMPONENT_INSTANCE=Cannot resolve instance of {0} with properties {1}  
 CIRCULARITY_EXCEPTION_FOUND=[SCR] Circularity Exception found for component: {0}
-COMPONENT_BUILT_TIME=[DS perf] The component {0} is built for {1}ms 
+COMPONENT_DISPOSED=The component is disposed
 COMPONENT_CONFIGURATIONS=\ \ Component configurations :
 COMPONENT_DETAILS=\tComponent details
-COMPONENT_DISPOSE_TIME=[DS perf] The component {0} is disposed for {1}ms 
 COMPONENT_HAS_ILLEGAL_REFERENCE=The component ''{0}'' defined at line {1} contains illegal reference {2} 
 COMPONENT_ID_DEFINIED_BY_LIST_COMMAND=The ID of the component as displayed by the list command
-COMPONENT_INSTANCE_BUILT=[DS perf] The instance of component {0} is built for {1}ms 
-COMPONENT_LACKS_APPROPRIATE_PERMISSIONS=Resolver.resolveEligible(): Cannot satisfy component ''{0}'' because its bundle does not have permissions to register service with interface {1}
-COMPONENT_MODIFIED_FOR=Component {0} modified for {1}ms
+COMPONENT_LACKS_APPROPRIATE_PERMISSIONS=[SCR] Cannot satisfy component ''{0}'' because its bundle does not have permissions to register service with interface {1}
 COMPONENT_NAME=\t\t\tComponent Name
 COMPONENT_NAME_IS_NULL=Component name must not be null
 COMPONENT_NOT_FOUND=component {0} not found in bundle {1}
@@ -50,20 +40,15 @@ COMPONENT_REQURES_CONFIGURATION_ACTIVATION=The ''{0}'' component''s configuratio
 COMPONENT_RESOLVED=\ \ The component is satisfied
 COMPONENT_WAS_NOT_BUILT=The component was not built because some of its references could not be bound. The component is {0}
 COMPONENT_XML_NOT_FOUND=[SCR] Component definition XMLs not found in bundle {0}. The component header value is {1}
-COMPONENTS_DISABLED=[DS perf] {0} Components disabled for {1}ms  
-COMPONENTS_ENABLED=[DS perf] {0} Components enabled for {1}ms
 COMPONENTS_IN_BUNDLE=Components in bundle {0}: 
-COMPONENTS_PARSED_TIME=[DS perf] The components of bundle {0} are parsed for {1} ms
 CONFIG_ADMIN_SERVICE_NOT_AVAILABLE=The ConfigurationAdmin service is not available.
 CONFIG_PROPERTIES=\ \ \ \ Configuration properties:
 COULD_NOT_CREATE_INSTANCE=[SCR - SCRManager] could not create instance for {0}
 COULD_NOT_CREATE_NEW_INSTANCE=Failed to create new instance
-CREATING_SCP=Resolver.map(): Creating SCP for component {0}
 DISABLE_ALL_COMPONENTS=Disables all components; use [bundle id] to disable all components of the specified bundle
 DISABLE_COMPONENT=Disables the specified component;
 DISABLING_ALL_BUNDLE_COMPONENTS=Disabling all components in bundle {0} 
 DISABLING_ALL_COMPONENTS=Disabling all components
-DISPOSING_COMPONENT=[DS perf] Start disposing component {0}
 DUPLICATED_REFERENCE_NAMES=The component ''{0}'' defined at line {1} contains references with duplicate names
 DUPLICATED_SERVICE_TAGS=The ''service'' tag is duplicated at line {0} 
 DYNAMIC_INFO=Dynamic information :
@@ -139,47 +124,31 @@ LIST_ALL_COMPONENTS=Lists all components; add -c to display the complete info fo
 LOCATED_IN_BUNDLE=\t\t\tLocated in bundle
 METHOD_UNACCESSABLE=[SCR] Method ''{0}'' is not public or protected and cannot be executed! The method is located in the class: {1}
 MISSING_CHARACTER=Missing character 
-MODIFYING_COMPONENT=Modifying component {0}
-NEW_SERVICE_CREATED=FactoryReg.getService(): created new service for component {0}
 NO_BUILT_COMPONENT_CONFIGURATIONS=\ \ *The component has NO built configurations\! The reason might be that it requires initialization by configuration provided by Configuration Admin but none was found
-NO_COMPONENT_INSTANCES=InstanceProcess.dynamicBind(): null instances for component {0}
 NO_COMPONENTS_FOUND=[SCR] No components were found while processing component definition file {0}
 NO_IMPLEMENTATION_ATTRIBUTE=The component ''{0}'' misses ''implementation'' attribute, line {1}
 NO_INTERFACE_ATTR_IN_REFERENCE_TAG=The ''reference'' tag must have ''interface'' attribute, at line {0}
 NO_NAME_ATTRIBUTE=The component definition misses ''name'' attribute, line {0}
 NOT_RESOLVED_REFERENCES=\ \ The following references are not satisfied:
 PRINT_COMPONENT_INFO=Prints all available information about the specified component;
-PROCESSED_BUNDLE_EVENT=[DS perf] Processed bundle event ''{0}'' for {1} ms
-PROCESSED_CONF_EVENT=[DS perf] Processed configuration event ''{0}'' for {1} ms
-PROCESSING_BUNDLE_EVENT=[DS perf] Started processing bundle event {0} 
 PROCESSING_BUNDLE_FAILED=[SCR] Unexpected exception while processing bundle with id {0} : {1}  
-PROCESSING_CONF_EVENT=[DS perf] Started processing configuration event {0}
-PROCESSING_SERVICE_EVENT=Resolver.getEligible(): processing service event {0}
-REFERENCE_NOT_RESOLVED=reference ''{0}'' of component ''{1}'' is not resolved
 REGISTERED_AS_COMPONENT_AND_MANAGED_SERVICE_FACORY=[SCR - Resolver] Cannot specify both ComponentFactory and ManagedServiceFactory\nThe name of the ComponentFactory component is {0}
 REGISTRATION_ALREADY_DISPOSED=InstanceProcess.disposeInstances(): registration for component {0} is already disposed! 
-RESOLVED_COMPONENTS=Resolver:resolveEligible(): resolved components = {0}
 RETURNING_NOT_FULLY_ACTIVATED_INSTANCE=Returning SCP instance which is not fully activated\!
 SCR=Service Component Runtime
 SENT_DISABLING_REQUEST=Sent request for disabling component {0}
 SENT_ENABLING_REQUEST=Sent request for enabling component {0}
-SERVICE_EVENT_TYPE=Service event type: {0}
-SERVICE_NO_LONGER_USED=ServiceReg.ungetService(): service ''{0}'' no longer used, disposing object = {1} 
 SERVICE_REFERENCE_ALREADY_BOUND=[SCR] ComponentReference.bind(): service reference {0} is already bound to instance {1}  
-SERVICE_UNREGISTERED_BECAUSE_COMP_DISPOSED=The service of component {0} was unregistered because the component is already disposed\!
 SERVICE_USAGE_COUNT=service ''{0}'' is used {1} time(s)
 SPECIFIED_ACTIVATE_METHOD_NOT_FOUND=[SCR] Cannot activate instance {0} of component {1}! The specified activate method was not found! 
 SPECIFIED_DEACTIVATE_METHOD_NOT_FOUND=[SCR] Cannot correctly deactivate instance {0} of component {1}! The specified deactivate method was not found! 
-START_BUILDING_COMPONENT=[DS perf] Start building component {0}
 STATE=\tState
 STATIC_OPTIONAL_REFERENCE_TO_BE_REMOVED=[SCR] Static optional reference detected in a component cycle and it will be removed. The reference is {0} 
 TIMEOUT_GETTING_LOCK=Getting a lock required more than {0} ms. There might be a synchronization problem in this callstack or just the build/dispose process of some components took too long! 
 TIMEOUT_PROCESSING=[SCR - WorkThread] Timeout occurred\! Thread was blocked on processing {0}
 TIMEOUT_REACHED_ENABLING_COMPONENTS=[SCR] Enabling components of bundle {0} did not complete in {1} ms 
-TIMER_SERVICE_UNAVAILABLE=[SCR] WorkThread.run(): Timer service is not available\! Skipping timeout check
 UNEXPECTED_ERROR=[SCR] Unexpected error\!
 UNEXPECTED_EXCEPTION=[SCR] Unexpected exception occurred\!
-UNREGISTERING_COMPONENT=InstanceProcess.disposeInstances(): unregistering component {0}
 UNSUPPORTED_TYPE=Unsupported type: {0}
 WRONG_PARAMETER=Wrong parameter {0}! It is not a number! 
 WRONG_PARAMETER2=Wrong parameter {0}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ScrServiceImpl.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ScrServiceImpl.java
new file mode 100644
index 0000000..dc51f3a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ScrServiceImpl.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 1997-2010 by ProSyst Software GmbH
+ * http://www.prosyst.com
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    ProSyst Software GmbH - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.ds;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.ScrService;
+import org.osgi.framework.Bundle;
+
+public class ScrServiceImpl implements ScrService {
+
+	boolean disposed = false;
+
+	public Component getComponent(long componentId) {
+		if (!disposed && InstanceProcess.resolver != null) {
+			return InstanceProcess.resolver.getComponent(componentId);
+		}
+		return null;
+	}
+
+	public Component[] getComponents() {
+		if (!disposed && InstanceProcess.resolver != null) {
+			return InstanceProcess.resolver.mgr.getComponents();
+		}
+		return null;
+	}
+
+	public Component[] getComponents(Bundle bundle) {
+		if (!disposed && InstanceProcess.resolver != null) {
+			return InstanceProcess.resolver.mgr.getComponent(bundle);
+		}
+		return null;
+	}
+
+	public void dispose() {
+		disposed = true;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ServiceReg.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ServiceReg.java
index 6a1882d..ee20284 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ServiceReg.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/ServiceReg.java
@@ -17,6 +17,7 @@ import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 import org.osgi.service.component.ComponentConstants;
 import org.osgi.service.component.ComponentException;
+import org.osgi.service.log.LogService;
 
 /**
  * @author Stoyan Boshev
@@ -59,12 +60,12 @@ final class ServiceReg implements ServiceFactory {
 				useCount++;
 			}
 			if (Activator.DEBUG) {
-				Activator.log.debug("ServiceReg.getService(): " + NLS.bind(Messages.SERVICE_USAGE_COUNT, scp.name, Integer.toString(useCount)) + ", object = " + instance.getInstance(), null); //$NON-NLS-1$ //$NON-NLS-2$
+				Activator.log.debug("ServiceReg.getService(): service '" + scp.name + "' is used " + Integer.toString(useCount) + " time(s), object = " + instance.getInstance(), null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 			return instance.getInstance();
 		} catch (Exception e) {
 			if (!(e instanceof ComponentException)) {
-				Activator.log.error(NLS.bind(Messages.CANNOT_CREATE_INSTANCE, scp.name), e);
+				Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.CANNOT_CREATE_INSTANCE, scp.name), e);
 				return null;
 			}
 			throw (ComponentException) e;
@@ -87,7 +88,7 @@ final class ServiceReg implements ServiceFactory {
 				//Immediate components are custom case - according to me, their instances should not be disposed
 				// because they are probably needed during the whole component's life  
 				if (Activator.DEBUG) {
-					Activator.log.debug(NLS.bind(Messages.SERVICE_NO_LONGER_USED, scp.name, service), null);
+					Activator.log.debug("ServiceReg.ungetService(): service '" + scp.name + "' no longer used, disposing object = " + service, null); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				// dispose only the instance - don't dispose the component
 				// itself!
@@ -96,14 +97,14 @@ final class ServiceReg implements ServiceFactory {
 				instance = null;
 			} else {
 				if (Activator.DEBUG) {
-					Activator.log.debug("ServiceReg.ungetService(): " + NLS.bind(Messages.SERVICE_USAGE_COUNT, scp.name, Integer.toString(useCount)), null); //$NON-NLS-1$
+					Activator.log.debug("ServiceReg.ungetService(): service '" + scp.name + "' is used " + Integer.toString(useCount) + " time(s)", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
 			}
 		} else {
 			if (useCount < 0) {
-				Activator.log.warning("ServiceReg.ungetService(): " + NLS.bind(Messages.SERVICE_USAGE_COUNT, scp.name, Integer.toString(useCount)), new Exception("Debug callstack")); //$NON-NLS-1$ //$NON-NLS-2$
+				Activator.log(null, LogService.LOG_WARNING, "ServiceReg.ungetService(): " + NLS.bind(Messages.SERVICE_USAGE_COUNT, scp.name, Integer.toString(useCount)), new Exception("Debug callstack")); //$NON-NLS-1$ //$NON-NLS-2$
 			} else if (Activator.DEBUG) {
-				Activator.log.debug("ServiceReg.ungetService(): " + NLS.bind(Messages.SERVICE_USAGE_COUNT, scp.name, Integer.toString(useCount)), null); //$NON-NLS-1$
+				Activator.log.debug("ServiceReg.ungetService(): service '" + scp.name + "' is used " + Integer.toString(useCount) + " time(s)", null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/WorkThread.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/WorkThread.java
index 7ae2b1d..fdc9971 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/WorkThread.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/WorkThread.java
@@ -16,6 +16,7 @@ import org.eclipse.equinox.internal.util.ref.TimerRef;
 import org.eclipse.equinox.internal.util.timer.TimerListener;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.service.cm.ConfigurationEvent;
+import org.osgi.service.log.LogService;
 
 /**
  * @author Stoyan Boshev
@@ -24,8 +25,6 @@ import org.osgi.service.cm.ConfigurationEvent;
 
 public class WorkThread implements Runnable, TimerListener {
 
-	boolean processBundle = false;
-
 	public static int IDLE_TIMEOUT = 1000;
 	public static int BLOCK_TIMEOUT = 30000;
 	private SCRManager mgr;
@@ -83,7 +82,7 @@ public class WorkThread implements Runnable, TimerListener {
 					TimerRef.notifyAfter(this, BLOCK_TIMEOUT, 1);
 				} else {
 					if (Activator.DEBUG) {
-						Activator.log.debug(Messages.TIMER_SERVICE_UNAVAILABLE, null);
+						Activator.log.debug("[SCR] WorkThread.run(): Timer service is not available! Skipping timeout check", null); //$NON-NLS-1$
 					}
 				}
 				if (objectToProcess instanceof SCRManager.QueuedJob) {
@@ -93,7 +92,7 @@ public class WorkThread implements Runnable, TimerListener {
 				}
 			} catch (Throwable t) {
 				// just for any case. Must not happen in order to keep thread alive
-				Activator.log.error(Messages.UNEXPECTED_EXCEPTION, t);
+				Activator.log(null, LogService.LOG_ERROR, Messages.UNEXPECTED_EXCEPTION, t);
 			} finally {
 				TimerRef.removeListener(this, 1);
 			}
@@ -103,7 +102,7 @@ public class WorkThread implements Runnable, TimerListener {
 	}
 
 	public void timer(int event) {
-		Activator.log.warning(NLS.bind(Messages.TIMEOUT_PROCESSING, objectToProcess), null);
+		Activator.log(null, LogService.LOG_WARNING, NLS.bind(Messages.TIMEOUT_PROCESSING, objectToProcess), null);
 		running = false;
 		objectToProcess = null;
 		mgr.queueBlocked();
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentContextImpl.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentContextImpl.java
index 787a395..4885649 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentContextImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentContextImpl.java
@@ -12,8 +12,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.ds.impl;
 
-import java.util.Dictionary;
-import java.util.Vector;
+import java.util.*;
 import org.eclipse.equinox.internal.ds.*;
 import org.eclipse.equinox.internal.ds.model.*;
 import org.eclipse.osgi.util.NLS;
@@ -52,7 +51,7 @@ public class ComponentContextImpl implements ComponentContext {
 	 * @see org.osgi.service.component.ComponentContext#getProperties()
 	 */
 	public Dictionary getProperties() {
-		return (Dictionary) scp.getProperties().clone();
+		return (Dictionary) ((Hashtable) scp.getProperties()).clone();
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentFactoryImpl.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentFactoryImpl.java
index cf4a763..5f28eab 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentFactoryImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentFactoryImpl.java
@@ -12,10 +12,11 @@
 package org.eclipse.equinox.internal.ds.impl;
 
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.*;
 import org.eclipse.equinox.internal.ds.model.ServiceComponentProp;
-import org.eclipse.equinox.internal.util.ref.Log;
 import org.osgi.service.component.*;
+import org.osgi.service.log.LogService;
 
 /**
  * ComponentFactoryImpl.java
@@ -27,8 +28,6 @@ import org.osgi.service.component.*;
 
 public class ComponentFactoryImpl implements ComponentFactory {
 
-	static boolean security = false;
-
 	private ServiceComponentProp sci;
 
 	/**
@@ -38,7 +37,6 @@ public class ComponentFactoryImpl implements ComponentFactory {
 	 *            the ComponentDescription Object with Properties
 	 */
 	public ComponentFactoryImpl(ServiceComponentProp component) {
-		security = Log.security();
 		this.sci = component;
 	}
 
@@ -46,50 +44,67 @@ public class ComponentFactoryImpl implements ComponentFactory {
 	 * Create a new instance of the component. Additional properties may be
 	 * provided for the component instance.
 	 * 
-	 * @param properties
+	 * @param additionalProps
 	 *            Additional properties for the component instance.
 	 * @return A ComponentInstance object encapsulating the component instance.
 	 *         The returned component instance has been activated.
 	 */
 	public ComponentInstance newInstance(Dictionary additionalProps) {
 		ComponentInstanceImpl instance = null;
+		ServiceComponentProp newSCP = null;
 		try {
 			if (Activator.DEBUG) {
 				Activator.log.debug("ComponentFactoryImpl.newInstance(): " + sci.name, null); //$NON-NLS-1$
 			}
 
 			// merge properties
-			Hashtable props = (Hashtable) sci.getProperties().clone();
+			Hashtable props = (Hashtable) ((Hashtable) sci.getProperties()).clone();
 			SCRUtil.copyTo(props, additionalProps);
 
 			// create a new SCP (adds to resolver scpEnabled list)
-			ServiceComponentProp newSCP = InstanceProcess.resolver.mapNewFactoryComponent(sci.serviceComponent, props);
+			newSCP = InstanceProcess.resolver.mapNewFactoryComponent(sci.serviceComponent, props);
 
 			// register the component and make instance if immediate
 			Vector toBuild = new Vector(1);
 			toBuild.addElement(newSCP);
-			InstanceProcess.staticRef.buildComponents(toBuild, security);
+			InstanceProcess.staticRef.buildComponents(toBuild, Activator.security);
 			if (!newSCP.instances.isEmpty()) {
 				// an instance was built because the component is either
 				// immediate
 				// or someone has got it as service (if provides one)
 				instance = (ComponentInstanceImpl) newSCP.instances.firstElement();
 			}
-			if (instance == null) {
+			if (instance == null && !newSCP.isImmediate()) {
 				// finally build an instance if not done yet
-				instance = InstanceProcess.staticRef.buildComponent(null, newSCP, null, security);
+				instance = InstanceProcess.staticRef.buildComponent(null, newSCP, null, Activator.security);
+			}
+			if (instance == null) {
+				//the instance could not be build because the component cannot be activated
+				//throw exception to notify the user
+				throw new ComponentException(Messages.COULD_NOT_CREATE_NEW_INSTANCE);
 			}
-			instance.factory = this;
 		} catch (Throwable e) {
+			//remove the component configuration
+			if (newSCP != null) {
+				disposeSCP(newSCP);
+			}
 			if (e instanceof ComponentException) {
 				throw (ComponentException) e;
 			}
-			Activator.log.error("ComponentFactoryImpl.newInstance(): failed for " + sci.name + " with properties " + additionalProps, e); //$NON-NLS-1$ //$NON-NLS-2$
+			Activator.log(null, LogService.LOG_ERROR, "ComponentFactoryImpl.newInstance(): failed for " + sci.name + " with properties " + additionalProps, e); //$NON-NLS-1$ //$NON-NLS-2$
 			throw new ComponentException(Messages.COULD_NOT_CREATE_NEW_INSTANCE, e);
 		}
 		return instance;
 	}
 
+	private void disposeSCP(ServiceComponentProp scp) {
+		scp.serviceComponent.componentProps.removeElement(scp);
+		Vector toDispose = new Vector(1);
+		toDispose.addElement(scp);
+		InstanceProcess.resolver.disposeComponentConfigs(toDispose, ComponentConstants.DEACTIVATION_REASON_UNSPECIFIED);
+		scp.setState(Component.STATE_DISPOSED);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentInstanceImpl.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentInstanceImpl.java
index ebbade8..611ee0f 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentInstanceImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/impl/ComponentInstanceImpl.java
@@ -12,6 +12,7 @@
 package org.eclipse.equinox.internal.ds.impl;
 
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.Activator;
 import org.eclipse.equinox.internal.ds.InstanceProcess;
 import org.eclipse.equinox.internal.ds.model.ServiceComponentProp;
@@ -28,10 +29,8 @@ import org.osgi.service.component.*;
 
 public class ComponentInstanceImpl implements ComponentInstance {
 
-	public Object instance;
-	ServiceComponentProp scp;
-	ComponentFactoryImpl factory;
-
+	private Object instance;
+	private ServiceComponentProp scp;
 	private ComponentContext componentContext;
 
 	// ServiceReference to service objects which are binded to this instance
@@ -61,7 +60,10 @@ public class ComponentInstanceImpl implements ComponentInstance {
 			Vector toDispose = new Vector(1);
 			toDispose.addElement(scp);
 			InstanceProcess.resolver.disposeComponentConfigs(toDispose, ComponentConstants.DEACTIVATION_REASON_DISPOSED);
-			scp = null;
+			if (scp != null) {
+				scp.setState(Component.STATE_DISPOSED);
+				scp = null;
+			}
 		} else {
 			scp.dispose(this, ComponentConstants.DEACTIVATION_REASON_DISPOSED);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ComponentReference.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ComponentReference.java
index 09a0c41..7285442 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ComponentReference.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ComponentReference.java
@@ -21,6 +21,7 @@ import org.eclipse.equinox.internal.ds.*;
 import org.eclipse.equinox.internal.ds.impl.ComponentInstanceImpl;
 import org.eclipse.equinox.internal.util.io.Externalizable;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.ComponentInstance;
 import org.osgi.service.log.LogService;
@@ -29,7 +30,7 @@ import org.osgi.service.log.LogService;
  * @author Stoyan Boshev
  * @author Pavlin Dobrev
  */
-public class ComponentReference implements Externalizable {
+public class ComponentReference implements Externalizable, org.apache.felix.scr.Reference {
 
 	public static final int CARDINALITY_0_1 = 0;
 	public static final int CARDINALITY_0_N = 1;
@@ -110,7 +111,7 @@ public class ComponentReference implements Externalizable {
 					serviceObject = InstanceProcess.staticRef.getService(reference, serviceReference);
 				}
 				if (serviceObject == null) {
-					// we could not create a serviceObject because of circularity
+					// we could not create a serviceObject because of circularity or the BundleContext.getService(ServiceReference) returned null
 					logWarning(Messages.CANT_GET_SERVICE_OBJECT, null, reference);
 					return null;
 				}
@@ -558,7 +559,7 @@ public class ComponentReference implements Externalizable {
 			if (flag)
 				out.writeUTF(unbind);
 		} catch (Exception e) {
-			Activator.log.error(Messages.ERROR_WRITING_OBJECT, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_WRITING_OBJECT, e);
 		}
 	}
 
@@ -592,8 +593,74 @@ public class ComponentReference implements Externalizable {
 			if (flag)
 				unbind = in.readUTF();
 		} catch (Exception e) {
-			Activator.log.error(Messages.ERROR_READING_OBJECT, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_READING_OBJECT, e);
 		}
 	}
 
+	public String getBindMethodName() {
+		return bind;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getServiceName() {
+		return interfaceName;
+	}
+
+	public ServiceReference[] getServiceReferences() {
+		Vector result = null;
+		if (bind != null) {
+			if (!serviceReferences.isEmpty()) {
+				result = new Vector(2);
+				Enumeration keys = serviceReferences.keys();
+				while (keys.hasMoreElements()) {
+					result.add(keys.nextElement());
+				}
+			}
+		}
+		if (result != null && !result.isEmpty()) {
+			ServiceReference[] finalResult = new ServiceReference[result.size()];
+			result.copyInto(finalResult);
+			return finalResult;
+		}
+		return null;
+	}
+
+	public String getTarget() {
+		return target;
+	}
+
+	public String getUnbindMethodName() {
+		return unbind;
+	}
+
+	public boolean isMultiple() {
+		return cardinality == ComponentReference.CARDINALITY_0_N || cardinality == ComponentReference.CARDINALITY_1_N;
+	}
+
+	public boolean isOptional() {
+		return cardinality == ComponentReference.CARDINALITY_0_1 || cardinality == ComponentReference.CARDINALITY_0_N;
+	}
+
+	public boolean isSatisfied() {
+		if (isOptional()) {
+			return true;
+		}
+		try {
+			ServiceReference[] _serviceReferences = component.bc.getServiceReferences(interfaceName, target);
+			if (_serviceReferences != null) {
+				return true;
+			}
+		} catch (InvalidSyntaxException e) {
+			// do nothing
+		}
+		return false;
+	}
+
+	public boolean isStatic() {
+		return policy == ComponentReference.POLICY_STATIC;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/DeclarationParser.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/DeclarationParser.java
index f90c3a4..2c1e206 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/DeclarationParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/DeclarationParser.java
@@ -503,6 +503,7 @@ public class DeclarationParser implements ExTagListener {
 			}
 			if (tmp != null) {
 				currentComponent.activateMethodName = tmp;
+				currentComponent.activateMethodDeclared = true;
 			}
 			//processing attribute deactivate
 			tmp = tag.getAttribute(ATTR_DEACTIVATE);
@@ -511,6 +512,7 @@ public class DeclarationParser implements ExTagListener {
 			}
 			if (tmp != null) {
 				currentComponent.deactivateMethodName = tmp;
+				currentComponent.deactivateMethodDeclared = true;
 			}
 			//processing attribute modified
 			tmp = tag.getAttribute(ATTR_MODIFIED);
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponent.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponent.java
index 8169bc6..fa3bb61 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponent.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponent.java
@@ -17,13 +17,14 @@ import java.io.*;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.util.*;
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.Reference;
 import org.eclipse.equinox.internal.ds.*;
 import org.eclipse.equinox.internal.util.io.Externalizable;
 import org.eclipse.equinox.internal.util.io.ExternalizableDictionary;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.component.ComponentException;
+import org.osgi.service.component.*;
 import org.osgi.service.log.LogService;
 
 /**
@@ -34,7 +35,7 @@ import org.osgi.service.log.LogService;
  * @author Pavlin Dobrev
  * @author Stoyan Boshev
  */
-public class ServiceComponent implements Externalizable {
+public class ServiceComponent implements Externalizable, Component {
 
 	public static String CONF_POLICY_OPTIONAL = "optional"; //$NON-NLS-1$
 	public static String CONF_POLICY_REQUIRE = "require"; //$NON-NLS-1$
@@ -77,6 +78,9 @@ public class ServiceComponent implements Externalizable {
 	public boolean enabled;
 	public Bundle bundle;
 	public BundleContext bc;
+	boolean activateMethodDeclared = false;
+	boolean deactivateMethodDeclared = false;
+	int state = Component.STATE_UNSATISFIED;
 	// --- end: model
 
 	private static final Class ACTIVATE_METHODS_PARAMETERS[] = new Class[] {ComponentContext.class};
@@ -237,7 +241,6 @@ public class ServiceComponent implements Externalizable {
 			if (t instanceof ComponentException) {
 				throw (ComponentException) t;
 			}
-			Activator.log(bc, LogService.LOG_ERROR, NLS.bind(Messages.CANT_ACTIVATE_INSTANCE, instance, this), null);
 			throw new ComponentException(NLS.bind(Messages.EXCEPTION_ACTIVATING_INSTANCE, instance, name), t);
 			// rethrow exception so resolver is eventually notified that
 			// the processed SCP is bad
@@ -514,7 +517,21 @@ public class ServiceComponent implements Externalizable {
 		buffer.append("\n\timmediate = ").append(immediate); //$NON-NLS-1$
 
 		buffer.append("\n\timplementation = ").append(implementation); //$NON-NLS-1$
-		buffer.append("\n\tproperties = ").append(properties); //$NON-NLS-1$
+		buffer.append("\n\tstate = ").append(SCRUtil.getStateStringRepresentation(state)); //$NON-NLS-1$
+		StringBuffer buf = new StringBuffer(200);
+		if (properties != null) {
+			buf.append('{');
+			Enumeration keys = properties.keys();
+			while (keys.hasMoreElements()) {
+				Object key = keys.nextElement();
+				buf.append(key).append('=').append(SCRUtil.getStringRepresentation(properties.get(key)));
+				if (keys.hasMoreElements()) {
+					buf.append(", "); //$NON-NLS-1$
+				}
+			}
+			buf.append('}');
+		}
+		buffer.append("\n\tproperties = ").append(buf.toString()); //$NON-NLS-1$
 
 		buffer.append("\n\tserviceFactory = ").append(serviceFactory); //$NON-NLS-1$
 		buffer.append("\n\tserviceInterface = ").append(serviceInterfaces); //$NON-NLS-1$
@@ -586,14 +603,14 @@ public class ServiceComponent implements Externalizable {
 					out.writeBoolean(true);
 					out.writeUTF(configurationPolicy);
 				}
-				if (activateMethodName == "activate") { //$NON-NLS-1$
+				if (!activateMethodDeclared) {
 					//this is the default value. Do not write it. Just add a mark
 					out.writeBoolean(false);
 				} else {
 					out.writeBoolean(true);
 					out.writeUTF(activateMethodName);
 				}
-				if (deactivateMethodName == "deactivate") { //$NON-NLS-1$
+				if (!deactivateMethodDeclared) {
 					//this is the default value. Do not write it. Just add a mark
 					out.writeBoolean(false);
 				} else {
@@ -609,7 +626,7 @@ public class ServiceComponent implements Externalizable {
 				}
 			}
 		} catch (Exception e) {
-			Activator.log.error(Messages.ERROR_WRITING_OBJECT, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_WRITING_OBJECT, e);
 		}
 	}
 
@@ -685,17 +702,21 @@ public class ServiceComponent implements Externalizable {
 					}
 				}
 				flag = in.readBoolean();
-				if (flag)
+				if (flag) {
 					activateMethodName = in.readUTF();
+					activateMethodDeclared = true;
+				}
 				flag = in.readBoolean();
-				if (flag)
+				if (flag) {
 					deactivateMethodName = in.readUTF();
+					deactivateMethodDeclared = true;
+				}
 				flag = in.readBoolean();
 				if (flag)
 					modifyMethodName = in.readUTF();
 			}
 		} catch (Exception e) {
-			Activator.log.error(Messages.ERROR_READING_OBJECT, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_READING_OBJECT, e);
 		}
 	}
 
@@ -720,6 +741,22 @@ public class ServiceComponent implements Externalizable {
 		componentProps.addElement(scp);
 	}
 
+	/**
+	 * Return the ServiceComponentProp object created for this component. Note there might be more than one SCP objects. 
+	 * This method will return always the first one
+	 * @return the ServiceComponentProp object created for this component 
+	 */
+	public ServiceComponentProp getServiceComponentProp() {
+		if (componentProps != null) {
+			synchronized (componentProps) {
+				if (!componentProps.isEmpty()) {
+					return (ServiceComponentProp) componentProps.elementAt(0);
+				}
+			}
+		}
+		return null;
+	}
+
 	public boolean isImmediate() {
 		return immediate;
 	}
@@ -731,4 +768,125 @@ public class ServiceComponent implements Externalizable {
 	public String getConfigurationPolicy() {
 		return configurationPolicy;
 	}
+
+	public void disable() {
+		if (getState() == STATE_DISPOSED) {
+			throw new IllegalStateException(Messages.COMPONENT_DISPOSED);
+		} else if (getState() != STATE_DISABLED) {
+			InstanceProcess.resolver.mgr.disableComponent(name, bundle);
+		}
+	}
+
+	public void enable() {
+		if (getState() == STATE_DISPOSED) {
+			throw new IllegalStateException(Messages.COMPONENT_DISPOSED);
+		} else if (getState() == STATE_DISABLED) {
+			InstanceProcess.resolver.mgr.enableComponent(name, bundle);
+		}
+	}
+
+	public String getActivate() {
+		return activateMethodName;
+	}
+
+	public Bundle getBundle() {
+		return bundle;
+	}
+
+	public String getClassName() {
+		return implementation;
+	}
+
+	public ComponentInstance getComponentInstance() {
+		if (componentProps != null && !componentProps.isEmpty()) {
+			//get the first built compoent's instance 
+			Vector instances = ((ServiceComponentProp) componentProps.elementAt(0)).instances;
+			if (!instances.isEmpty()) {
+				return (ComponentInstance) instances.elementAt(0);
+			}
+		}
+		//The component is not yet built
+		return null;
+	}
+
+	public String getDeactivate() {
+		return deactivateMethodName;
+	}
+
+	public String getFactory() {
+		return factory;
+	}
+
+	public long getId() {
+		if (componentProps != null && !componentProps.isEmpty()) {
+			//get the first built component's ID 
+			return ((Long) ((ServiceComponentProp) componentProps.elementAt(0)).properties.get(ComponentConstants.COMPONENT_ID)).longValue();
+		}
+		//The component is not yet given an ID by the SRC because it is not active
+		return -1;
+	}
+
+	public String getModified() {
+		if (!namespace11) {
+			return null;
+		}
+		return modifyMethodName;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public Dictionary getProperties() {
+		return properties;
+	}
+
+	public Reference[] getReferences() {
+		if (references != null && !references.isEmpty()) {
+			org.apache.felix.scr.Reference[] res = new org.apache.felix.scr.Reference[references.size()];
+			references.copyInto(res);
+			return res;
+		}
+		return null;
+	}
+
+	public String[] getServices() {
+		return provides;
+	}
+
+	public int getState() {
+		//check if there is at least one SCP created and return its state
+		if (componentProps != null && !componentProps.isEmpty()) {
+			//get the first component's state
+			return ((ServiceComponentProp) componentProps.elementAt(0)).getState();
+		}
+		//return the current state of the component
+		return state;
+	}
+
+	public boolean isActivateDeclared() {
+		if (!namespace11) {
+			return false;
+		}
+		return activateMethodDeclared;
+	}
+
+	public boolean isDeactivateDeclared() {
+		if (!namespace11) {
+			return false;
+		}
+		return deactivateMethodDeclared;
+	}
+
+	public boolean isDefaultEnabled() {
+		return autoenable;
+	}
+
+	public boolean isServiceFactory() {
+		return serviceFactory;
+	}
+
+	public void setState(int newState) {
+		state = newState;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponentProp.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponentProp.java
index cb131ca..42e1d21 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponentProp.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/model/ServiceComponentProp.java
@@ -14,6 +14,7 @@ package org.eclipse.equinox.internal.ds.model;
 
 import java.security.*;
 import java.util.*;
+import org.apache.felix.scr.Component;
 import org.eclipse.equinox.internal.ds.*;
 import org.eclipse.equinox.internal.ds.impl.ComponentContextImpl;
 import org.eclipse.equinox.internal.ds.impl.ComponentInstanceImpl;
@@ -38,12 +39,7 @@ import org.osgi.service.log.LogService;
  * @author Pavlin Dobrev
  */
 
-public class ServiceComponentProp implements PrivilegedExceptionAction {
-	public static final int DISPOSED = 0;
-	public static final int DISPOSING = 1;
-	public static final int SATISFIED = 2;
-	public static final int BUILDING = 3;
-	public static final int BUILT = 4;
+public class ServiceComponentProp implements Component, PrivilegedExceptionAction {
 
 	public ServiceRegistration registration;
 	public String name;
@@ -62,7 +58,7 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 	protected boolean isComponentFactory = false;
 
 	//Holds the component's state
-	private int state = SATISFIED;
+	private int state = STATE_UNSATISFIED;
 
 	/**
 	 * List of names (Strings) of Component Configurations we should not
@@ -100,11 +96,14 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 		if (Activator.DEBUG) {
 			Activator.log.debug("ServiceComponentProp.dispose(): " + name, null); //$NON-NLS-1$
 		}
-		setState(DISPOSED);
-		while (!instances.isEmpty()) {
-			ComponentInstanceImpl current = (ComponentInstanceImpl) instances.firstElement();
-			dispose(current, deactivateReason);
-			current.dispose();
+		try {
+			while (!instances.isEmpty()) {
+				ComponentInstanceImpl current = (ComponentInstanceImpl) instances.firstElement();
+				dispose(current, deactivateReason);
+				current.dispose();
+			}
+		} finally {
+			setState(STATE_UNSATISFIED);
 		}
 	}
 
@@ -113,7 +112,7 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 	 * 
 	 * @return Dictionary properties
 	 */
-	public Hashtable getProperties() {
+	public Dictionary getProperties() {
 		return properties != null ? properties : serviceComponent.properties;
 	}
 
@@ -206,9 +205,15 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 		if (references != null) {
 			for (int i = 0; i < references.size(); i++) {
 				Reference ref = (Reference) references.elementAt(i);
+				ClassCircularityError ccError = null;
 				if (ref.reference.bind != null) {
-					bindReference(ref, componentInstance);
-					if (ref.reference.bindMethod == null || !ref.isBound()) {
+					try {
+						bindReference(ref, componentInstance);
+					} catch (ClassCircularityError cce) {
+						ccError = cce;
+						Activator.log(bc, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_BINDING_REFERENCE, ref.reference), cce);
+					}
+					if (ref.reference.bindMethod == null || ccError != null || !ref.isBound()) {
 						//the bind method is not found and called for some reason or it has thrown exception
 						if (ref.reference.cardinality == ComponentReference.CARDINALITY_1_1 || ref.reference.cardinality == ComponentReference.CARDINALITY_1_N) {
 							//unbind the already bound references
@@ -218,6 +223,10 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 									unbindReference(ref, componentInstance);
 								}
 							}
+							if (ccError != null) {
+								//rethrow the error so it is further processed according to the use case
+								throw ccError;
+							}
 							return false;
 						}
 					}
@@ -285,14 +294,14 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 	}
 
 	public Object run() throws Exception {
-		Bundle bundle = this.bundle;
+		Bundle b = this.bundle;
 		Object instance = inst;
 		unlock();
-		return build(bundle, instance, false);
+		return build(b, instance, false);
 	}
 
 	public ComponentInstanceImpl build(Bundle usingBundle, Object instance, boolean security) throws Exception {
-		if (getState() == DISPOSED) {
+		if (getState() == STATE_DISPOSED) {
 			if (Activator.DEBUG) {
 				Activator.log.debug("Cannot build component, because it is already disposed: " + this, null); //$NON-NLS-1$
 			}
@@ -343,7 +352,7 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 				throw new ComponentException(NLS.bind(Messages.COMPONENT_WAS_NOT_BUILT, serviceComponent));
 			}
 		}
-
+		setState(Component.STATE_ACTIVE);
 		return componentInstance;
 	}
 
@@ -369,9 +378,12 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 		if (!instances.removeElement(componentInstance)) {
 			return; //the instance is already disposed  
 		}
-
 		deactivate(componentInstance, deactivateReason);
 		unbind(componentInstance);
+		if (instances.isEmpty()) {
+			//there are no active instances. The component is lazy enabled now
+			setState(Component.STATE_REGISTERED);
+		}
 	}
 
 	/**
@@ -550,7 +562,7 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 								try {
 									reference.reference.bind(reference, componentInstance, refs[i]);
 								} catch (Exception e) {
-									Activator.log.error(NLS.bind(Messages.ERROR_BINDING_REFERENCE, reference), e);
+									Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_BINDING_REFERENCE, reference), e);
 								}
 							}
 						}
@@ -563,7 +575,7 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 						try {
 							unbindDynamicReference(reference, componentInstance, (ServiceReference) servicesToUnbind.elementAt(i));
 						} catch (Exception e) {
-							Activator.log.error(NLS.bind(Messages.ERROR_UNBINDING_REFERENCE2, reference), e);
+							Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_UNBINDING_REFERENCE2, reference), e);
 						}
 					}
 				}
@@ -684,7 +696,26 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 	}
 
 	public String toString() {
-		return name;
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("ServiceComponentProp["); //$NON-NLS-1$
+		buffer.append("\n\tname = ").append(name); //$NON-NLS-1$
+		buffer.append("\n\tstate = ").append(SCRUtil.getStateStringRepresentation(state)); //$NON-NLS-1$
+		StringBuffer buf = new StringBuffer(200);
+		if (properties != null) {
+			buf.append('{');
+			Enumeration keys = properties.keys();
+			while (keys.hasMoreElements()) {
+				Object key = keys.nextElement();
+				buf.append(key).append('=').append(SCRUtil.getStringRepresentation(properties.get(key)));
+				if (keys.hasMoreElements()) {
+					buf.append(", "); //$NON-NLS-1$
+				}
+			}
+			buf.append('}');
+		}
+		buffer.append("\n\tproperties = ").append(buf.toString()); //$NON-NLS-1$
+		buffer.append("]"); //$NON-NLS-1$
+		return buffer.toString();
 	}
 
 	public void setRegistration(ServiceRegistration reg) {
@@ -758,4 +789,116 @@ public class ServiceComponentProp implements PrivilegedExceptionAction {
 		this.state = state;
 	}
 
+	public void disable() {
+		if (getState() == STATE_DISPOSED) {
+			throw new IllegalStateException(Messages.COMPONENT_DISPOSED);
+		} else if (getState() != STATE_DISABLED) {
+			mgr.disableComponent(serviceComponent.name, serviceComponent.bundle);
+		}
+	}
+
+	public void enable() {
+		if (getState() == STATE_DISPOSED) {
+			throw new IllegalStateException(Messages.COMPONENT_DISPOSED);
+		} else if (getState() == STATE_DISABLED) {
+			mgr.enableComponent(serviceComponent.name, serviceComponent.bundle);
+		}
+	}
+
+	public String getActivate() {
+		return serviceComponent.activateMethodName;
+	}
+
+	public Bundle getBundle() {
+		return serviceComponent.bundle;
+	}
+
+	public String getClassName() {
+		return serviceComponent.implementation;
+	}
+
+	public ComponentInstance getComponentInstance() {
+		if (!instances.isEmpty()) {
+			//TODO we have multiple instances when the component is service factory
+			//Perhaps we have to list in ScrService Component for each instance
+			return (ComponentInstance) instances.firstElement();
+		}
+		return null;
+	}
+
+	public String getConfigurationPolicy() {
+		return serviceComponent.configurationPolicy;
+	}
+
+	public String getDeactivate() {
+		return serviceComponent.deactivateMethodName;
+	}
+
+	public String getFactory() {
+		return serviceComponent.factory;
+	}
+
+	public long getId() {
+		return ((Long) properties.get(ComponentConstants.COMPONENT_ID)).longValue();
+	}
+
+	public String getModified() {
+		if (!serviceComponent.namespace11) {
+			return null;
+		}
+		return serviceComponent.modifyMethodName;
+	}
+
+	public String getName() {
+		return serviceComponent.name;
+	}
+
+	public org.apache.felix.scr.Reference[] getReferences() {
+		if (references != null && !references.isEmpty()) {
+			org.apache.felix.scr.Reference[] res = new org.apache.felix.scr.Reference[references.size()];
+			references.copyInto(res);
+			return res;
+		}
+		return null;
+	}
+
+	public String[] getServices() {
+		return serviceComponent.provides;
+	}
+
+	public boolean isActivateDeclared() {
+		if (!serviceComponent.namespace11) {
+			return false;
+		}
+		return serviceComponent.activateMethodDeclared;
+	}
+
+	public boolean isDeactivateDeclared() {
+		if (!serviceComponent.namespace11) {
+			return false;
+		}
+		return serviceComponent.deactivateMethodDeclared;
+	}
+
+	public boolean isDefaultEnabled() {
+		return serviceComponent.autoenable;
+	}
+
+	public boolean isImmediate() {
+		return serviceComponent.isImmediate();
+	}
+
+	public boolean isServiceFactory() {
+		return serviceComponent.serviceFactory;
+	}
+
+	//Some helper methods according to the component's state
+	public boolean isBuilt() {
+		return state == STATE_ACTIVATING || state == STATE_ACTIVE || state == STATE_FACTORY || state == STATE_REGISTERED;
+	}
+
+	public boolean isUnsatisfied() {
+		return state == STATE_UNSATISFIED || state == STATE_DEACTIVATING || state == STATE_DISABLED || state == STATE_DISPOSING || state == STATE_DISPOSED;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/storage/file/FileStorage.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/storage/file/FileStorage.java
index 9ca4a88..69129ae 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/storage/file/FileStorage.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/ds/storage/file/FileStorage.java
@@ -38,27 +38,26 @@ public class FileStorage extends ComponentStorage {
 	//Probably it should be in the supplement bundle?
 	public static final String PROP_CHECK_CONFIG = "osgi.checkConfiguration"; //$NON-NLS-1$
 
-	private String[] dbBundlePath = new String[1];
-	private String[] dbCompPath = new String[] {null, "COMPONENTS"}; //$NON-NLS-1$
 	private static String CUSTOM_DB_NAME = "SCR"; //$NON-NLS-1$
-	private File file;
+	private BundleContext bc = null;
 	private ExternalizableDictionary data = new ExternalizableDictionary();
 	private StringBuffer pathBuffer = new StringBuffer();
 	private String separator;
 	private boolean isDirty = false;
 
 	public FileStorage(BundleContext bc) {
+		this.bc = bc;
 		separator = bc.getProperty("path.separator"); //$NON-NLS-1$
-		file = bc.getDataFile(CUSTOM_DB_NAME);
+		File file = bc.getDataFile(CUSTOM_DB_NAME);
 		FileInputStream fis = null;
 		try {
-			if (file.exists()) {
+			if (file != null && file.exists()) {
 				data.readObject(new BufferedInputStream(fis = new FileInputStream(file)));
 			}
 		} catch (IOException e) {
-			Activator.log.error(NLS.bind(Messages.ERROR_LOADING_DATA_FILE, file.getAbsolutePath()), e);
+			Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_LOADING_DATA_FILE, file.getAbsolutePath()), e);
 		} catch (Exception e) {
-			Activator.log.error(NLS.bind(Messages.ERROR_LOADING_DATA_FILE, file.getAbsolutePath()), e);
+			Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.ERROR_LOADING_DATA_FILE, file.getAbsolutePath()), e);
 		} finally {
 			if (fis != null) {
 				try {
@@ -85,6 +84,7 @@ public class FileStorage extends ComponentStorage {
 				lastModified = getLastModifiedTimestamp(bundle);
 			}
 
+			String[] dbBundlePath = new String[1];
 			dbBundlePath[0] = String.valueOf(bundle.getBundleId());
 
 			String lastModifiedValue = (String) data.get(getPath(dbBundlePath));
@@ -97,7 +97,7 @@ public class FileStorage extends ComponentStorage {
 
 			} else {
 				long dbLastModified = Long.parseLong(lastModifiedValue);
-				if (lastModified > dbLastModified) {
+				if (lastModified != dbLastModified) {
 					components = parseXMLDeclaration(bundle, dsHeader);
 					if (components != null && components.size() != 0) {
 						data.put(getPath(dbBundlePath), "" + lastModified); //$NON-NLS-1$
@@ -110,13 +110,14 @@ public class FileStorage extends ComponentStorage {
 			}
 			return components;
 		} catch (Throwable e) {
-			Activator.log.error(NLS.bind(Messages.PROCESSING_BUNDLE_FAILED, Long.toString(bundle.getBundleId()), bundle), e);
+			Activator.log(null, LogService.LOG_ERROR, NLS.bind(Messages.PROCESSING_BUNDLE_FAILED, Long.toString(bundle.getBundleId()), bundle), e);
 			return null;
 		}
 	}
 
 	private Vector loadComponentsFromDB(Bundle bundle) throws Exception {
 		try {
+			String[] dbCompPath = new String[] {null, "COMPONENTS"}; //$NON-NLS-1$
 			ServiceComponent currentComponent = null;
 			long bundleId = bundle.getBundleId();
 			dbCompPath[0] = String.valueOf(bundleId);
@@ -135,17 +136,20 @@ public class FileStorage extends ComponentStorage {
 			}
 			return components;
 		} catch (Throwable t) {
-			Activator.log.error(Messages.ERROR_LOADING_COMPONENTS, t);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_LOADING_COMPONENTS, t);
 		}
 		return null;
 	}
 
 	public void deleteComponentDefinitions(long bundleID) {
+		String[] dbBundlePath = new String[1];
 		dbBundlePath[0] = String.valueOf(bundleID);
 		data.remove(getPath(dbBundlePath));
+		String[] dbCompPath = new String[] {null, "COMPONENTS"}; //$NON-NLS-1$
 		dbCompPath[0] = String.valueOf(bundleID);
 		data.remove(getPath(dbCompPath));
-		if (file.exists()) {
+		File file = bc.getDataFile(CUSTOM_DB_NAME);
+		if (file != null && file.exists()) {
 			//delete the file to prevent leaving old information in it
 			file.delete();
 		}
@@ -157,6 +161,7 @@ public class FileStorage extends ComponentStorage {
 			if (components == null || components.size() == 0) {
 				return;
 			}
+			String[] dbCompPath = new String[] {null, "COMPONENTS"}; //$NON-NLS-1$
 			dbCompPath[0] = String.valueOf(bundleID);
 
 			DBObject tmpObj = new DBObject(components);
@@ -165,7 +170,7 @@ public class FileStorage extends ComponentStorage {
 			data.put(getPath(dbCompPath), buf.toByteArray());
 			isDirty = true;
 		} catch (Exception e) {
-			Activator.log.error(Messages.ERROR_SAVING_COMPONENT_DEFINITIONS, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_SAVING_COMPONENT_DEFINITIONS, e);
 		}
 	}
 
@@ -178,15 +183,20 @@ public class FileStorage extends ComponentStorage {
 	private void saveFile() {
 		FileOutputStream fos = null;
 		try {
+			File file = bc.getDataFile(CUSTOM_DB_NAME);
+			if (file == null) {
+				//save operation is not possible
+				return;
+			}
 			fos = new FileOutputStream(file);
 			try {
 				data.writeObject(fos);
 				isDirty = false;
 			} catch (Exception e) {
-				Activator.log.error(Messages.ERROR_WRITING_OBJECT, e);
+				Activator.log(null, LogService.LOG_ERROR, Messages.ERROR_WRITING_OBJECT, e);
 			}
 		} catch (FileNotFoundException e) {
-			Activator.log.error(Messages.FILE_DOESNT_EXIST_OR_DIRECTORY, e);
+			Activator.log(null, LogService.LOG_ERROR, Messages.FILE_DOESNT_EXIST_OR_DIRECTORY, e);
 		} finally {
 			if (fos != null) {
 				try {
@@ -199,11 +209,13 @@ public class FileStorage extends ComponentStorage {
 	}
 
 	private String getPath(String path[]) {
-		pathBuffer.setLength(0);
-		for (int i = 0; i < path.length; i++) {
-			pathBuffer.append(path[i]).append(separator);
+		synchronized (pathBuffer) {
+			pathBuffer.setLength(0);
+			for (int i = 0; i < path.length; i++) {
+				pathBuffer.append(path[i]).append(separator);
+			}
+			return pathBuffer.toString();
 		}
-		return pathBuffer.toString();
 	}
 
 	/**
@@ -215,7 +227,7 @@ public class FileStorage extends ComponentStorage {
 	protected long getLastModifiedTimestamp(Bundle bundle) {
 		if (bundle == null)
 			return 0;
-		long result = Long.MAX_VALUE;
+		long result = 0;
 		ManifestElement[] elements = parseManifestHeader(bundle);
 		for (int i = 0; i < elements.length; i++) {
 			URL componentURL = bundle.getEntry(elements[i].getValue());
diff --git a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/util/xml/impl/XMLParserImpl.java b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/util/xml/impl/XMLParserImpl.java
index f762a40..4b82393 100644
--- a/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/util/xml/impl/XMLParserImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.ds/src/org/eclipse/equinox/internal/util/xml/impl/XMLParserImpl.java
@@ -363,7 +363,7 @@ public class XMLParserImpl {
 			String attrValue = sb.toString();
 
 			if (fInternAttributes) {
-				attrValue.intern();
+				attrValue = attrValue.intern();
 			}
 
 			aParent.addAttribute(attrName, attrValue);
diff --git a/eclipse/plugins/org.eclipse.equinox.event/.project b/eclipse/plugins/org.eclipse.equinox.event/.project
index 4401f7b..7567a04 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/.project
+++ b/eclipse/plugins/org.eclipse.equinox.event/.project
@@ -20,9 +20,20 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.event/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.event/META-INF/MANIFEST.MF
index 821c8a0..0650f19 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.event/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Version: 1.1.101.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-SymbolicName: org.eclipse.equinox.event
 Bundle-Activator: org.eclipse.equinox.internal.event.Activator
 Bundle-Copyright: %bundleCopyright
@@ -16,3 +16,5 @@ Bundle-Vendor: %bundleVendor
 Export-Service: org.osgi.service.event.EventAdmin
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: OSGi/Minimum-1.1
+Service-Component: OSGI-INF/component.xml
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.equinox.event/OSGI-INF/component.xml b/eclipse/plugins/org.eclipse.equinox.event/OSGI-INF/component.xml
new file mode 100644
index 0000000..89812d4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.event/OSGI-INF/component.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="activate" deactivate="deactivate" immediate="false" name="org.eclipse.equinox.event">
+   <implementation class="org.eclipse.equinox.internal.event.EventComponent"/>
+   <service>
+      <provide interface="org.osgi.service.event.EventAdmin"/>
+   </service>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.event/build.properties b/eclipse/plugins/org.eclipse.equinox.event/build.properties
index 8732619..5423d1d 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.event/build.properties
@@ -1,17 +1,8 @@
-###############################################################################
-# Copyright (c) 2005 IBM Corporation.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
 bin.includes = META-INF/,\
                plugin*.properties,\
                about.html,\
-               .
+               .,\
+               OSGI-INF/component.xml
+output.. = bin/
 src.includes = about.html
 source.. = src/
-output.. = bin/
diff --git a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/Activator.java b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/Activator.java
index f9f1f68..975ee97 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,26 +11,36 @@
 
 package org.eclipse.equinox.internal.event;
 
-import org.eclipse.equinox.internal.event.mapper.EventRedeliverer;
 import org.osgi.framework.*;
+import org.osgi.service.event.EventAdmin;
 
 public class Activator implements BundleActivator {
-	private EventRedeliverer    eventRedeliverer;
+	private static final String PROP_USE_DS = "equinox.use.ds"; //$NON-NLS-1$
 	private ServiceRegistration eventAdminService;
-	private EventAdminImpl eventAdmin;
-	
-	public void start(BundleContext bundleContext) {
-		eventAdmin = new EventAdminImpl(bundleContext);
-		eventAdmin.start();
-		eventAdminService = bundleContext.registerService("org.osgi.service.event.EventAdmin", //$NON-NLS-1$
-				eventAdmin,null);
-		eventRedeliverer  = new EventRedeliverer(bundleContext);
-		eventRedeliverer.open();
+	private EventComponent eventAdmin;
+
+	public void start(BundleContext bundleContext) throws InvalidSyntaxException {
+		if (Boolean.valueOf(bundleContext.getProperty(PROP_USE_DS)).booleanValue())
+			return; // If this property is set we assume DS is being used.
+		String serviceName = EventAdmin.class.getName();
+		Filter serviceFilter = bundleContext.createFilter("(objectclass=" + serviceName + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+		//don't register the service if this bundle has already registered it declaratively
+		ServiceReference[] refs = bundleContext.getBundle().getRegisteredServices();
+		if (refs != null) {
+			for (int i = 0; i < refs.length; i++)
+				if (serviceFilter.match(refs[i]))
+					return; // We found a service registered by this bundle already
+		}
+
+		eventAdmin = new EventComponent();
+		eventAdmin.activate(bundleContext);
+		eventAdminService = bundleContext.registerService(serviceName, eventAdmin, null);
 	}
-	
+
 	public void stop(BundleContext bundleContext) {
-		eventRedeliverer.close();
-		eventAdminService.unregister();
-		eventAdmin.stop();
+		if (eventAdmin != null) {
+			eventAdminService.unregister();
+			eventAdmin.deactivate(bundleContext);
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java
new file mode 100644
index 0000000..581773d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventComponent.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.event;
+
+import org.eclipse.equinox.internal.event.mapper.EventRedeliverer;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventAdmin;
+
+public class EventComponent implements EventAdmin {
+	private EventRedeliverer eventRedeliverer;
+	private EventAdminImpl eventAdmin;
+
+	void activate(BundleContext context) {
+		eventAdmin = new EventAdminImpl(context);
+		eventAdmin.start();
+		eventRedeliverer = new EventRedeliverer(context);
+		eventRedeliverer.open();
+	}
+
+	void deactivate(BundleContext context) {
+		eventRedeliverer.close();
+		eventAdmin.stop();
+	}
+
+	public void postEvent(Event event) {
+		eventAdmin.postEvent(event);
+	}
+
+	public void sendEvent(Event event) {
+		eventAdmin.sendEvent(event);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java
index 3ef0fd5..c74d2dc 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/EventHandlerWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class EventHandlerWrapper {
 	private EventHandler handler;
 	private String[] topics;
 	private Filter filter;
-	
+
 	/**
 	 * Create an EventHandlerWrapper. 
 
@@ -55,28 +55,26 @@ public class EventHandlerWrapper {
 		// Get topic names
 		Object o = reference.getProperty(EventConstants.EVENT_TOPIC);
 		if (o instanceof String) {
-			topics = new String[] {(String)o};
-		}
-		else if (o instanceof String[]) {
+			topics = new String[] {(String) o};
+		} else if (o instanceof String[]) {
 			topics = (String[]) o;
 		}
-		
+
 		if (topics == null) {
 			return false;
 		}
-		
+
 		// get filter
 		o = reference.getProperty(EventConstants.EVENT_FILTER);
 		if (o instanceof String) {
 			try {
-				filter = context.createFilter((String)o);
-			}
-			catch (InvalidSyntaxException e) {
-				log.log(LogService.LOG_ERROR,NLS.bind(EventAdminMsg.EVENT_INVALID_HANDLER_FILTER, o), e);
+				filter = context.createFilter((String) o);
+			} catch (InvalidSyntaxException e) {
+				log.log(LogService.LOG_ERROR, NLS.bind(EventAdminMsg.EVENT_INVALID_HANDLER_FILTER, o), e);
 				return false;
 			}
 		}
-		
+
 		return true;
 	}
 
@@ -90,18 +88,22 @@ public class EventHandlerWrapper {
 			}
 			handler = null;
 		}
-		context.ungetService(reference);
+		try {
+			context.ungetService(reference);
+		} catch (IllegalStateException e) {
+			// ignore event admin must have stopped
+		}
 	}
-	
+
 	/**
 	 * Get the event topics for the wrapped handler.
 	 * 
 	 * @return The wrapped handler's event topics
 	 */
-	public synchronized String[] getTopics()  {
+	public synchronized String[] getTopics() {
 		return topics;
 	}
-	
+
 	/**
 	 * Return the wrapped handler. 
 	 * @return The wrapped handler.
@@ -113,9 +115,14 @@ public class EventHandlerWrapper {
 				return handler;
 			}
 		}
-		
+
 		// we don't have the handler, so lets get it outside the sync region
-		EventHandler tempHandler = (EventHandler)context.getService(reference);
+		EventHandler tempHandler = null;
+		try {
+			tempHandler = (EventHandler) context.getService(reference);
+		} catch (IllegalStateException e) {
+			// ignore; event admin may have stopped
+		}
 
 		synchronized (this) {
 			// do we still need the handler we just got?
@@ -126,14 +133,18 @@ public class EventHandlerWrapper {
 			// get the current handler
 			tempHandler = handler;
 		}
-		
+
 		// unget the handler we just got since we don't need it
-		context.ungetService(reference);
-		
+		try {
+			context.ungetService(reference);
+		} catch (IllegalStateException e) {
+			// ignore; event admin may have stopped
+		}
+
 		// return the current handler (copied into the local var)
 		return tempHandler;
 	}
-	
+
 	/**
 	 * Get the filter object
 	 * 
@@ -155,28 +166,27 @@ public class EventHandlerWrapper {
 		if (bundle == null) {
 			return;
 		}
-		
+
 		// filter match
 		Filter eventFilter = getFilter();
 		if ((eventFilter != null) && !event.matches(eventFilter)) {
 			return;
 		}
-		
+
 		// permission check
 		if ((perm != null) && (!bundle.hasPermission(perm))) {
 			return;
 		}
-		
+
 		// get handler service
 		EventHandler handlerService = getHandler();
 		if (handlerService == null) {
 			return;
 		}
-	
+
 		try {
 			handlerService.handleEvent(event);
-		}
-		catch (Throwable t) {
+		} catch (Throwable t) {
 			// log/handle any Throwable thrown by the listener
 			log.log(LogService.LOG_ERROR, NLS.bind(EventAdminMsg.EVENT_DISPATCH_HANDLER_EXCEPTION, event, handlerService), t);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventAdapter.java b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventAdapter.java
index 9c87a6f..b052572 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventAdapter.java
+++ b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,13 +18,12 @@ import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
 
 /**
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
  */
 public abstract class EventAdapter {
 	final EventAdmin eventAdmin;
 
 	/**
-	 * @param event
 	 * @param eventAdmin
 	 */
 	public EventAdapter(EventAdmin eventAdmin) {
diff --git a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventRedeliverer.java b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventRedeliverer.java
index 8108ca0..3b74778 100644
--- a/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventRedeliverer.java
+++ b/eclipse/plugins/org.eclipse.equinox.event/src/org/eclipse/equinox/internal/event/mapper/EventRedeliverer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,22 +18,20 @@ import org.osgi.util.tracker.ServiceTracker;
 /**
  * Main class for redeliver special events like FrameworkEvents via EventAdmin.
  * 
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
  */
 public class EventRedeliverer implements FrameworkListener, BundleListener, ServiceListener {
-	private ServiceTracker eventAdminTracker;
+	private final ServiceTracker eventAdminTracker;
 	private final static boolean DEBUG = false;
 	private BundleContext bc;
 
 	public EventRedeliverer(BundleContext bc) {
 		this.bc = bc;
+		this.eventAdminTracker = new ServiceTracker(bc, EventAdmin.class.getName(), null);
 	}
 
 	public void close() {
-		if (eventAdminTracker != null) {
-			eventAdminTracker.close();
-			eventAdminTracker = null;
-		}
+		eventAdminTracker.close();
 		bc.removeFrameworkListener(this);
 		bc.removeBundleListener(this);
 		bc.removeServiceListener(this);
@@ -45,7 +43,6 @@ public class EventRedeliverer implements FrameworkListener, BundleListener, Serv
 	 */
 	public void open() {
 		// open ServiceTracker for EventAdmin
-		eventAdminTracker = new ServiceTracker(bc, EventAdmin.class.getName(), null);
 		eventAdminTracker.open();
 
 		// add legacy event listener for framework level event
@@ -55,8 +52,6 @@ public class EventRedeliverer implements FrameworkListener, BundleListener, Serv
 	}
 
 	private EventAdmin getEventAdmin() {
-		if (eventAdminTracker == null)
-			return null;
 		return (EventAdmin) eventAdminTracker.getService();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/.project b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/.project
index e1ceadb..256472c 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/.project
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
index 2f19abf..07e9fa7 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
@@ -2,29 +2,27 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.equinox;singleton:=true
-Bundle-Version: 1.0.101.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.frameworkadmin.equinox.Activator
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Import-Package: org.eclipse.core.runtime.adaptor,
- org.eclipse.core.runtime.internal.adaptor,
+Import-Package: org.eclipse.core.runtime.internal.adaptor,
+ org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.internal.frameworkadmin.utils,
  org.eclipse.equinox.internal.provisional.configuratormanipulator,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.osgi.framework.adaptor;resolution:=optional,
- org.eclipse.osgi.framework.debug;resolution:=optional,
  org.eclipse.osgi.framework.internal.core,
  org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.service.environment;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.service.resolver;version="1.1.0";resolution:=optional,
- org.eclipse.osgi.storagemanager;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.log;version="1.3.0",
  org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker;version="1.3.2"
-Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator",
+ org.osgi.util.tracker;version="1.3.0"
+Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.simpleconfigurator.manipulator",
  org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-internal:=true
 Require-Bundle: org.eclipse.equinox.common
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
  J2SE-1.4
+Service-Component: OSGI-INF/fwadmin.xml
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
new file mode 100644
index 0000000..e3f045a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.frameworkadmin.equinox">
+   <implementation class="org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwAdminImpl"/>
+   <service>
+      <provide interface="org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin"/>
+   </service>
+   <property name="org.eclipse.equinox.frameworkhandler.framework.name" type="String" value="Equinox"/>
+   <property name="org.eclipse.equinox.frameworkhandler.framework.version" type="String" value="3.3"/>
+   <property name="org.eclipse.equinox.frameworkhandler.launcher.name" type="String" value="Eclipse.exe"/>
+   <property name="org.eclipse.equinox.frameworkhandler.launcher.version" type="String" value="3.2"/>
+   <reference bind="setStartLevel" cardinality="1..1" interface="org.osgi.service.startlevel.StartLevel" name="StartLevel" policy="static"/>
+   <reference bind="setPlatformAdmin" cardinality="1..1" interface="org.eclipse.osgi.service.resolver.PlatformAdmin" name="PlatformAdmin" policy="static"/>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/build.properties b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/build.properties
index b0b12db..db8ea72 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/build.properties
@@ -1,17 +1,8 @@
-###############################################################################
-#  Copyright (c) 2005, 2008 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               OSGI-INF/
 src.includes = about.html
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
new file mode 100644
index 0000000..3ee50ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.frameworkadmin.equinox</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java
deleted file mode 100644
index 4a3ec86..0000000
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Activator.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.*;
-
-/**
- * This bundle provides the {@link FrameworkAdmin} implementation for Felix.
- * 
- * This bundle registers {@link Manipulator} object with these service property values.
- *  
- *  FW_NAME = "Equinox";
- * 	FW_VERSION = "3.3";
- *	LAUCNHER_NAME = "Eclipse.exe";
- *  LAUNCHER_VERSION = "3.2";
- * 
- * The launching by the eclipse launcher is supported.
- * 
- * Handling plugins in non Jar format is not supported.
- * 
- * FwBundleState supports retrieving fw persistent data
- *  and  resolving bundles if running on equinox.
- * FwBundleState Does NOT support retrieving start Levels from fw persistent data location/
- *   
- */
-public class Activator implements BundleActivator {
-	private static BundleContext context;
-	private ServiceRegistration registrationFA;
-	EquinoxFwAdminImpl fwAdmin = null;
-
-	private void registerFwAdmin() {
-		Dictionary props = new Hashtable();
-		props.put(Constants.SERVICE_VENDOR, "Eclipse.org");
-
-		props.put(FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME, EquinoxConstants.FW_NAME);
-		props.put(FrameworkAdmin.SERVICE_PROP_KEY_FW_VERSION, EquinoxConstants.FW_VERSION);
-		props.put(FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME, EquinoxConstants.LAUNCHER_NAME);
-		props.put(FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_VERSION, EquinoxConstants.LAUNCHER_VERSION);
-
-		if (EquinoxFwAdminImpl.isRunningFw(context)) {
-			props.put(FrameworkAdmin.SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG, "true");
-			fwAdmin = new EquinoxFwAdminImpl(context, true);
-		} else
-			fwAdmin = new EquinoxFwAdminImpl(context);
-
-		registrationFA = context.registerService(FrameworkAdmin.class.getName(), fwAdmin, props);
-	}
-
-	/**
-	 * TODO: These services are never disposed.
-	 */
-	public static Object acquireService(String serviceName) {
-		//be tolerant of concurrent shutdown
-		BundleContext theContext = context;
-		if (theContext == null)
-			return null;
-		ServiceReference reference = theContext.getServiceReference(serviceName);
-		if (reference == null)
-			return null;
-		return theContext.getService(reference);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext bundleContext) throws Exception {
-		Activator.context = bundleContext;
-		Log.init(bundleContext);
-		registerFwAdmin();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
-	 */
-	public void stop(BundleContext bundleContext) throws Exception {
-		Activator.context = null;
-		if (registrationFA != null)
-			registrationFA.unregister();
-		if (fwAdmin != null)
-			fwAdmin.deactivate();
-		Log.dispose();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
index 77b5705..38eb443 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
@@ -44,7 +44,7 @@ public class EclipseLauncherParser {
 			//We can do 3 calls to getParentFile without checking because
 			launcherFolder = launcherFolder.getParentFile().getParentFile().getParentFile();
 		}
-		if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getParentFile().getAbsolutePath()).equals(launcherFolder)) {
+		if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) {
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines);
 		}
 	}
@@ -60,11 +60,11 @@ public class EclipseLauncherParser {
 		getFrameworkJar(lines, launcherFolder, launcherData);
 		URI osgiInstallArea = getOSGiInstallArea(lines, launcherFolder);
 		if (osgiInstallArea == null) {
-			osgiInstallArea = launcherData.getFwJar() != null ? launcherData.getFwJar().getParentFile().toURI() : launcherFolder;
+			osgiInstallArea = launcherData.getFwJar() != null ? ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).toURI() : launcherFolder;
 		}
 		URI configArea = getConfigurationLocation(lines, osgiInstallArea, launcherData);
 		if (configArea == null)
-			throw new FrameworkAdminRuntimeException("config area is null", "");
+			throw new FrameworkAdminRuntimeException(Messages.exception_nullConfigArea, ""); //$NON-NLS-1$
 		getPersistentDataLocation(lines, osgiInstallArea, configArea, launcherData);
 		getLauncherLibrary(lines, launcherFolder);
 		getJVMArgs(lines, launcherData);
@@ -101,18 +101,34 @@ public class EclipseLauncherParser {
 			launcherData.setJvm(URIUtil.toFile(VMFullPath));
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, VMFullPath.toString(), lines);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + vm);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, vm));
 			return;
 		}
 	}
 
 	private void setVM(List lines, File vm, URI launcherFolder) {
 		if (vm == null) {
+			if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines) != null)
+				return;
+
 			ParserUtils.removeArgument(EquinoxConstants.OPTION_VM, lines);
 			return;
 		}
-		URI VMRelativePath = launcherFolder.relativize(vm.toURI());
-		ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, FileUtils.toPath(VMRelativePath).replace('\\', '/'), lines);
+
+		URI vmRelativePath = null;
+		if (vm.isAbsolute()) {
+			vmRelativePath = launcherFolder.relativize(vm.toURI());
+		} else {
+			//For relative files, File#toURI will create an absolute URI by resolving against the current working directory, we don't want that
+			String path = vm.getPath().replace('\\', '/');
+			try {
+				vmRelativePath = URIUtil.fromString(path);
+			} catch (URISyntaxException e) {
+				vmRelativePath = launcherFolder.relativize(vm.toURI());
+			}
+		}
+
+		ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, FileUtils.toPath(vmRelativePath).replace('\\', '/'), lines);
 	}
 
 	private void getJVMArgs(List lines, LauncherData launcherData) {
@@ -164,7 +180,7 @@ public class EclipseLauncherParser {
 			result = URIUtil.makeAbsolute(FileUtils.fromPath(launcherLibrary), launcherFolder);
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, result.toString(), lines);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + launcherLibrary);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
 			return null;
 		}
 		return result;
@@ -179,7 +195,7 @@ public class EclipseLauncherParser {
 			URI result = URIUtil.makeRelative(FileUtils.fromPath(launcherLibrary), launcherFolder);
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, FileUtils.toPath(result).replace('\\', '/'), lines);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + launcherLibrary);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
 			return;
 		}
 	}
@@ -199,7 +215,7 @@ public class EclipseLauncherParser {
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.toString(), lines);
 			data.setFwConfigLocation(URIUtil.toFile(result));
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + configuration);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, configuration));
 			return null;
 		}
 		return result;
@@ -230,7 +246,7 @@ public class EclipseLauncherParser {
 			result = URIUtil.makeAbsolute(FileUtils.fromPath(startup), launcherFolder);
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, result.toString(), lines);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + startup);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, startup));
 			return null;
 		}
 		return result;
@@ -245,7 +261,7 @@ public class EclipseLauncherParser {
 			URI result = URIUtil.makeRelative(FileUtils.fromPath(startup), launcherFolder);
 			ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, FileUtils.toPath(result).replace('\\', '/'), lines);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make relative of:" + startup);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_relative, startup));
 			return;
 		}
 	}
@@ -289,25 +305,28 @@ public class EclipseLauncherParser {
 				Log.log(LogService.LOG_INFO, this, "save()", NLS.bind(Messages.log_renameSuccessful, launcherConfigFile, dest)); //$NON-NLS-1$
 			}
 
-		BufferedWriter bw = null;
-		try {
-			bw = new BufferedWriter(new FileWriter(launcherConfigFile));
-			for (int j = 0; j < newlines.size(); j++) {
-				String arg = (String) newlines.get(j);
-				if (arg == null)
-					continue;
-				bw.write(arg);
-				bw.newLine();
+		//only write the file if we actually have content
+		if (newlines.size() > 0) {
+			BufferedWriter bw = null;
+			try {
+				bw = new BufferedWriter(new FileWriter(launcherConfigFile));
+				for (int j = 0; j < newlines.size(); j++) {
+					String arg = (String) newlines.get(j);
+					if (arg == null)
+						continue;
+					bw.write(arg);
+					bw.newLine();
+				}
+				bw.flush();
+				Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_launcherConfigSave, launcherConfigFile));
+			} finally {
+				if (bw != null)
+					bw.close();
 			}
-			bw.flush();
-			Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_launcherConfigSave, launcherConfigFile));
-		} finally {
-			if (bw != null)
-				bw.close();
-			File previousLauncherIni = launcherData.getPreviousLauncherIni();
-			if (previousLauncherIni != null && !previousLauncherIni.equals(launcherConfigFile))
-				previousLauncherIni.delete();
 		}
+		File previousLauncherIni = launcherData.getPreviousLauncherIni();
+		if (previousLauncherIni != null && !previousLauncherIni.equals(launcherConfigFile))
+			previousLauncherIni.delete();
 		launcherData.setLauncherConfigLocation(launcherConfigFile);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
index df244e8..3fab737 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
@@ -15,6 +15,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
 import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
 import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
@@ -166,7 +167,7 @@ public class EquinoxBundlesState implements BundlesState {
 		String nl = Locale.getDefault().toString();
 		platformProperties.setProperty("osgi.nl", nl); //$NON-NLS-1$
 
-		// TODO remove EclipseEnvironmentInof
+		// TODO remove EclipseEnvironmentInfo
 		String os = EclipseEnvironmentInfo.guessOS(System.getProperty("os.name"));//$NON-NLS-1$);
 		platformProperties.setProperty("osgi.os", os); //$NON-NLS-1$
 
@@ -194,16 +195,11 @@ public class EquinoxBundlesState implements BundlesState {
 	}
 
 	EquinoxFwAdminImpl fwAdmin = null;
-
 	BundleContext context;
-
 	Manipulator manipulator = null;
 	Properties platfromProperties = new Properties();
-
 	long maxId = DEFAULT_TIMESTAMP;
-
 	StateObjectFactory soFactory = null;
-
 	State state = null;
 
 	/**
@@ -216,6 +212,7 @@ public class EquinoxBundlesState implements BundlesState {
 	 * and version as defined by the {@link #getKey(BundleDescription)} method.
 	 */
 	private HashMap nameVersionStateIndex = new HashMap();
+	private final PlatformAdmin platformAdmin;
 
 	/**
 	 * If useFwPersistentData flag equals false, this constructor will not take
@@ -226,9 +223,10 @@ public class EquinoxBundlesState implements BundlesState {
 	 * @param manipulator
 	 * @param useFwPersistentData
 	 */
-	EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, boolean useFwPersistentData) {
+	EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, boolean useFwPersistentData) {
 		this.context = context;
 		this.fwAdmin = fwAdmin;
+		this.platformAdmin = admin;
 		// copy manipulator object for avoiding modifying the parameters of the
 		// manipulator.
 		this.manipulator = fwAdmin.getManipulator();
@@ -246,10 +244,11 @@ public class EquinoxBundlesState implements BundlesState {
 	 * @param manipulator
 	 * @param platformProperties
 	 */
-	EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, Properties platformProperties) {
+	EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, Properties platformProperties) {
 		super();
 		this.context = context;
 		this.fwAdmin = fwAdmin;
+		this.platformAdmin = admin;
 		// copy manipulator object for avoiding modifying the parameters of the
 		// manipulator.
 		this.manipulator = fwAdmin.getManipulator();
@@ -501,7 +500,6 @@ public class EquinoxBundlesState implements BundlesState {
 	public String[] getUnsatisfiedConstraints(BundleInfo bInfo) {
 		URI realLocation = bInfo.getLocation();
 		BundleDescription description = getBundleByLocation(realLocation);
-		PlatformAdmin platformAdmin = (PlatformAdmin) Activator.acquireService(PlatformAdmin.class.getName());
 		StateHelper helper = platformAdmin.getStateHelper();
 		VersionConstraint[] constraints = helper.getUnsatisfiedConstraints(description);
 		String[] ret = new String[constraints.length];
@@ -525,23 +523,11 @@ public class EquinoxBundlesState implements BundlesState {
 			composeNewState(launcherData, configData, bInfos);
 		} else {
 			if (manipulator.getLauncherData().getFwPersistentDataLocation() == null) {
-				// TODO default value should be set more precisely.
-				File installArea = null;
-				String installAreaSt = configData.getProperty(EquinoxConstants.PROP_INSTALL);
-				if (installAreaSt == null) {
-					if (manipulator.getLauncherData().getLauncher() == null) {
-						// TODO implement
-					} else {
-						installArea = manipulator.getLauncherData().getLauncher().getParentFile();
-					}
-				} else {
-					if (installAreaSt.startsWith("file:")) //$NON-NLS-1$
-						installArea = new File(installAreaSt.substring("file:".length())); //$NON-NLS-1$
-					else
-						throw new IllegalStateException(NLS.bind(Messages.exception_fileURLExpected, EquinoxConstants.PROP_INSTALL, installAreaSt));
-				}
+				File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData);
 				if (DEBUG)
 					Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$
+				if (installArea == null)
+					throw new IllegalStateException(Messages.exception_noInstallArea);
 				File fwPersistentDataLocation = new File(installArea, "configuration"); //$NON-NLS-1$
 				manipulator.getLauncherData().setFwPersistentDataLocation(fwPersistentDataLocation, false);
 			}
@@ -646,10 +632,8 @@ public class EquinoxBundlesState implements BundlesState {
 	}
 
 	private void setStateObjectFactory() {
-		if (soFactory != null)
-			return;
-		PlatformAdmin platformAdmin = (PlatformAdmin) Activator.acquireService(PlatformAdmin.class.getName());
-		soFactory = platformAdmin.getFactory();
+		if (soFactory == null)
+			soFactory = platformAdmin.getFactory();
 	}
 
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
index 99d104e..5714483 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
@@ -35,7 +35,6 @@ public class EquinoxConstants {
 	public static final String OPTION_VMARGS = "-vmargs"; //$NON-NLS-1$
 	public static final String OPTION_CLEAN = "-clean"; //$NON-NLS-1$
 	public static final String OPTION_STARTUP = "-startup"; //$NON-NLS-1$
-	public static final String OPTION_SHOWSPLASH = "-showsplash"; //$NON-NLS-1$
 	public static final String OPTION_INSTALL = "-install"; //$NON-NLS-1$
 	public static final String OPTION_LAUNCHER_LIBRARY = "--launcher.library"; //$NON-NLS-1$
 
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
index 12f8e30..c23aa94 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,50 +16,39 @@ import java.util.Dictionary;
 import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
 import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.osgi.service.resolver.PlatformAdmin;
 import org.osgi.framework.*;
+import org.osgi.service.startlevel.StartLevel;
 
 public class EquinoxFwAdminImpl implements FrameworkAdmin {
 
-	/**
-	 * If both the vendor and the Bundle-Version in the manifest match, 
-	 * return true. Otherwise false.
-	 *  
-	 * @return flag true if the ManipulatorAdmin object can handle currently running fw launch. 
-	 */
-	static boolean isRunningFw(BundleContext context) {
-		//TODO implementation for Eclipse.exe and for Equinox
-		String fwVendor = context.getProperty(Constants.FRAMEWORK_VENDOR);
-		if (!"Eclipse".equals(fwVendor)) //$NON-NLS-1$
-			return false;
-		//TODO decide if this version can be supported by this bundle.
-		Dictionary header = context.getBundle(0).getHeaders();
-		String versionSt = (String) header.get(Constants.BUNDLE_VERSION);
-		Version version = new Version(versionSt);
-		int value = version.compareTo(new Version(EquinoxConstants.FW_VERSION));
-		if (value > 0) {
-			return true;
-		}
-		// TODO need to identify the version of eclipse.exe used for this launch, if used. 
-		return false;
-	}
+	boolean active = false;
 
-	BundleContext context = null;
+	private ConfiguratorManipulator configuratorManipulator = null;
 
-	boolean active = false;
+	BundleContext context = null;
 
 	private boolean runningFw = false;
-	private ConfiguratorManipulator configuratorManipulator = null;
 
-	//	private String configuratorManipulatorFactoryName = null;
+	private PlatformAdmin platformAdmin;
+	private StartLevel startLevelService;
 
-	EquinoxFwAdminImpl() {
+	public EquinoxFwAdminImpl() {
 		this(null, false);
 	}
 
+	//	private String configuratorManipulatorFactoryName = null;
+
 	EquinoxFwAdminImpl(BundleContext context) {
 		this(context, false);
 	}
 
+	EquinoxFwAdminImpl(BundleContext context, boolean runningFw) {
+		this.context = context;
+		this.active = true;
+		this.runningFw = runningFw;
+	}
+
 	EquinoxFwAdminImpl(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
 		this.context = null;
 		this.active = true;
@@ -68,45 +57,81 @@ public class EquinoxFwAdminImpl implements FrameworkAdmin {
 		loadConfiguratorManipulator(configuratorManipulatorFactoryName);
 	}
 
-	private void loadConfiguratorManipulator(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
-		if (configuratorManipulatorFactoryName == null)
-			this.configuratorManipulator = null;
-		else
-			this.configuratorManipulator = ConfiguratorManipulatorFactory.getInstance(configuratorManipulatorFactoryName);
-		return;
-	}
-
-	EquinoxFwAdminImpl(BundleContext context, boolean runningFw) {
-		this.context = context;
-		this.active = true;
-		this.runningFw = runningFw;
+	/**
+	 * DS component activator
+	 * @param aContext The bundle context
+	 */
+	public void activate(BundleContext aContext) {
+		this.context = aContext;
+		this.runningFw = isRunningFw();
+		Log.init(aContext);
 	}
 
 	void deactivate() {
 		active = false;
+		Log.dispose();
+	}
+
+	public ConfiguratorManipulator getConfiguratorManipulator() {
+		return configuratorManipulator;
 	}
 
 	public Manipulator getManipulator() {
-		return new EquinoxManipulatorImpl(context, this);
+		return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, false);
 	}
 
 	public Manipulator getRunningManipulator() {
-		if (this.runningFw)
-			return new EquinoxManipulatorImpl(context, this, true);
-		return null;
+		if (!this.runningFw)
+			return null;
+		return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, true);
 	}
 
 	public boolean isActive() {
 		return active;
 	}
 
+	/**
+	 * If both the vendor and the Bundle-Version in the manifest match, 
+	 * return true. Otherwise false.
+	 *  
+	 * @return flag true if the ManipulatorAdmin object can handle currently running fw launch. 
+	 */
+	boolean isRunningFw() {
+		//TODO implementation for Eclipse.exe and for Equinox
+		String fwVendor = context.getProperty(Constants.FRAMEWORK_VENDOR);
+		if (!"Eclipse".equals(fwVendor)) //$NON-NLS-1$
+			return false;
+		//TODO decide if this version can be supported by this bundle.
+		Dictionary header = context.getBundle(0).getHeaders();
+		String versionSt = (String) header.get(Constants.BUNDLE_VERSION);
+		Version version = new Version(versionSt);
+		int value = version.compareTo(new Version(EquinoxConstants.FW_VERSION));
+		if (value > 0) {
+			return true;
+		}
+		// TODO need to identify the version of eclipse.exe used for this launch, if used. 
+		return false;
+	}
+
 	public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, FrameworkAdminRuntimeException, IOException {
 		//return new EclipseLauncherImpl(context, this).launch(manipulator, cwd);
 		return new EclipseLauncherImpl(this).launch(manipulator, cwd);
 	}
 
-	public ConfiguratorManipulator getConfiguratorManipulator() {
-		return configuratorManipulator;
+	private void loadConfiguratorManipulator(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+		if (configuratorManipulatorFactoryName == null)
+			this.configuratorManipulator = null;
+		else
+			this.configuratorManipulator = ConfiguratorManipulatorFactory.getInstance(configuratorManipulatorFactoryName);
+		return;
+	}
+
+	public void setPlatformAdmin(PlatformAdmin admin) {
+		this.platformAdmin = admin;
+	}
+
+	public void setStartLevel(StartLevel sl) {
+		this.startLevelService = sl;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
index f76ca04..a96127e 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
@@ -14,6 +14,7 @@ import java.io.*;
 import java.net.*;
 import java.util.*;
 import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
 import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
@@ -23,6 +24,7 @@ import org.osgi.framework.Constants;
 import org.osgi.service.log.LogService;
 
 public class EquinoxFwConfigFileParser {
+	private static final Set KNOWN_PROPERTIES = new HashSet(Arrays.asList(new String[] {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL}));
 	private static final String CONFIG_DIR = "@config.dir/"; //$NON-NLS-1$
 	private static final String KEY_ECLIPSE_PROV_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
 	private static final String KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
@@ -148,7 +150,7 @@ public class EquinoxFwConfigFileParser {
 		return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
 	}
 
-	private void writeBundlesList(File fwJar, Properties props, URI base, BundleInfo[] bundles) {
+	private void writeBundlesList(File fwJar, Properties props, BundleInfo[] bundles) {
 		StringBuffer osgiBundlesList = new StringBuffer();
 		StringBuffer osgiFrameworkExtensionsList = new StringBuffer();
 		for (int j = 0; j < bundles.length; j++) {
@@ -202,9 +204,6 @@ public class EquinoxFwConfigFileParser {
 		configData.initialize();
 		configData.setBundles(null);
 
-		String launcherName = null;
-		String launcherPath = null;
-
 		// load configuration properties
 		Properties props = loadProperties(inputFile);
 
@@ -216,35 +215,24 @@ public class EquinoxFwConfigFileParser {
 		}
 
 		//Start figuring out stuffs
-		URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
+		//URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
 
 		readFwJarLocation(configData, launcherData, props);
 		URI configArea = inputFile.getParentFile().toURI();
-		readLauncherPath(props, rootURI);
+		//readLauncherPath(props, rootURI);
 		readp2DataArea(props, configArea);
 		readSimpleConfiguratorURL(props, configArea);
 		readBundlesList(manipulator, ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI(), props);
 		readInitialStartLeve(configData, props);
 		readDefaultStartLevel(configData, props);
-		//		if (key.equals(EquinoxConstants.PROP_LAUNCHER_NAME))
-		//			if (launcherData.getLauncher() == null)
-		//				launcherName = value;
-		//		if (key.equals(EquinoxConstants.PROP_LAUNCHER_PATH))
-		//			if (launcherData.getLauncher() == null)
-		//				launcherPath = value;
-		String[] KNOWN_PROPERTIES = {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL};
-		top: for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
+
+		for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
 			String key = (String) enumeration.nextElement();
-			for (int i = 0; i < KNOWN_PROPERTIES.length; i++) {
-				if (KNOWN_PROPERTIES[i].equals(key))
-					continue top;
-			}
+			if (KNOWN_PROPERTIES.contains(key))
+				continue;
 			String value = props.getProperty(key);
 			configData.setProperty(key, value);
 		}
-		if (launcherName != null && launcherPath != null) {
-			launcherData.setLauncher(new File(launcherPath, launcherName + EquinoxConstants.EXE_EXTENSION));
-		}
 		Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, inputFile.getAbsolutePath()));
 	}
 
@@ -272,18 +260,18 @@ public class EquinoxFwConfigFileParser {
 		File fwJar = null;
 		if (props.getProperty(EquinoxConstants.PROP_OSGI_FW) != null) {
 			URI absoluteFwJar = null;
-			absoluteFwJar = URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(EquinoxConstants.PROP_OSGI_FW)), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData).toURI());
+			absoluteFwJar = URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(EquinoxConstants.PROP_OSGI_FW)), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI());
 
 			props.setProperty(EquinoxConstants.PROP_OSGI_FW, absoluteFwJar.toString());
 			String fwJarString = props.getProperty(EquinoxConstants.PROP_OSGI_FW);
 			if (fwJarString != null) {
 				fwJar = URIUtil.toFile(absoluteFwJar);
 				if (fwJar == null)
-					throw new IllegalStateException("Can't determinate the osgi.framework location");
+					throw new IllegalStateException(Messages.exception_noFrameworkLocation);
 				//Here we overwrite the value read from eclipse.ini, because the value of osgi.framework always takes precedence.
 				launcherData.setFwJar(fwJar);
 			} else {
-				throw new IllegalStateException("Can't determinate the osgi.framework location");
+				throw new IllegalStateException(Messages.exception_noFrameworkLocation);
 			}
 		}
 		if (launcherData.getFwJar() != null)
@@ -389,21 +377,23 @@ public class EquinoxFwConfigFileParser {
 		}
 	}
 
-	private void readLauncherPath(Properties props, URI root) throws URISyntaxException {
-		if (props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH) != null)
-			props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, URIUtil.makeAbsolute(URIUtil.fromString(props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH)), root).toString());
-	}
-
-	private void writeLauncherPath(ConfigData configData, Properties props, URI root) throws URISyntaxException {
-		String value = getFwProperty(configData, EquinoxConstants.PROP_LAUNCHER_PATH);
-		if (value != null) {
-			URI launcherPathURI = FileUtils.fromPath(value);
-			String launcherPath = URIUtil.toUnencodedString(URIUtil.makeRelative(launcherPathURI, root));
-			if ("/".equals(launcherPath) || "".equals(launcherPath)) //$NON-NLS-1$ //$NON-NLS-2$
-				launcherPath = "."; //$NON-NLS-1$
-			props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, launcherPath);
-		}
-	}
+	//	private void readLauncherPath(Properties props, URI root) throws URISyntaxException {
+	//		if (props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH) != null) {
+	//			URI absoluteURI = URIUtil.makeAbsolute(URIUtil.fromString(props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH)), root);
+	//			props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, URIUtil.toUnencodedString(absoluteURI));
+	//		}
+	//	}
+	//
+	//	private void writeLauncherPath(ConfigData configData, Properties props, URI root) throws URISyntaxException {
+	//		String value = getFwProperty(configData, EquinoxConstants.PROP_LAUNCHER_PATH);
+	//		if (value != null) {
+	//			URI launcherPathURI = FileUtils.fromPath(value);
+	//			String launcherPath = URIUtil.toUnencodedString(URIUtil.makeRelative(launcherPathURI, root));
+	//			if ("/".equals(launcherPath) || "".equals(launcherPath)) //$NON-NLS-1$ //$NON-NLS-2$
+	//				launcherPath = "."; //$NON-NLS-1$
+	//			props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, launcherPath);
+	//		}
+	//	}
 
 	private void readSimpleConfiguratorURL(Properties props, URI configArea) throws URISyntaxException {
 		if (props.getProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL) != null)
@@ -446,19 +436,19 @@ public class EquinoxFwConfigFileParser {
 		String header = "This configuration file was written by: " + this.getClass().getName(); //$NON-NLS-1$
 
 		Properties configProps = new Properties();
-		URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
+		//URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
 
 		writeFwJarLocation(configData, launcherData, configProps);
 		try {
-			writeLauncherPath(configData, configProps, rootURI);
+			//writeLauncherPath(configData, configProps, rootURI);
 			URI configArea = manipulator.getLauncherData().getFwConfigLocation().toURI();
 			writep2DataArea(configData, configProps, configArea);
 			writeSimpleConfiguratorURL(configData, configProps, configArea);
-			writeBundlesList(launcherData.getFwJar(), configProps, ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configProps, launcherData).toURI(), bInfos);
+			writeBundlesList(launcherData.getFwJar(), configProps, bInfos);
 			writeInitialStartLevel(configData, configProps);
 			writeDefaultStartLevel(configData, configProps);
 		} catch (URISyntaxException e) {
-			throw new FrameworkAdminRuntimeException(e, "saving config.ini");
+			throw new FrameworkAdminRuntimeException(e, Messages.exception_errorSavingConfigIni);
 		}
 
 		Properties original = configData.getProperties();
@@ -472,7 +462,9 @@ public class EquinoxFwConfigFileParser {
 			Log.log(LogService.LOG_WARNING, this, "saveFwConfig() ", Messages.log_configProps); //$NON-NLS-1$
 			return;
 		}
-		Utils.createParentDir(outputFile);
+		if (!Utils.createParentDir(outputFile)) {
+			throw new IllegalStateException(NLS.bind(Messages.exception_failedToCreateDir, outputFile.getParent()));
+		}
 
 		if (DEBUG)
 			Utils.printoutProperties(System.out, "configProps", configProps); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
index 4557a68..fba4751 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
@@ -15,11 +15,14 @@ import java.io.IOException;
 import java.net.*;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
 import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
 import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
 import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.osgi.service.resolver.PlatformAdmin;
+import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 import org.osgi.service.log.LogService;
 import org.osgi.service.startlevel.StartLevel;
@@ -54,27 +57,22 @@ public class EquinoxManipulatorImpl implements Manipulator {
 				if (fwConfigLocation.getName().equals(EquinoxConstants.CONFIG_INI))
 					fwConfigLocation = fwConfigLocation.getParentFile();
 				else
-					throw new IllegalStateException("fwConfigLocation is not a directory but its name does NOT equal \"" + EquinoxConstants.CONFIG_INI + "\"!\n" + "\tfwConfigLocation=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwPersistentDataLocation=" + fwPersistentDataLocation.getAbsolutePath());
+					throw new IllegalStateException(NLS.bind(Messages.exception_unexpectedfwConfigLocation, fwConfigLocation.getAbsolutePath(), EquinoxConstants.CONFIG_INI));
 				launcherData.setFwConfigLocation(fwConfigLocation);
 			}
 			if (fwPersistentDataLocation != null) {
-				//				Log.log(LogService.LOG_DEBUG, "fwConfigLocation=" + fwConfigLocation.getAbsolutePath() + ",\n\tfwInstancePrivateArea=" + fwPersistentDataLocation.getAbsolutePath());
-				//if (!fwConfigLocation.getParentFile().equals(fwPersistentDataLocation))
-				//throw new IllegalStateException("!configFile.getParentFile().equals(fwInstancePrivateArea)\n" + "\tconfigFile=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwInstancePrivateArea=" + fwPersistentDataLocation.getAbsolutePath());
 				if (!fwConfigLocation.equals(fwPersistentDataLocation))
-					throw new IllegalStateException("!fwConfigLocation.equals(fwPersistentDataLocation)\n" + "\t!fwConfigLocation=" + fwConfigLocation.getAbsolutePath() + "\n\t,fwPersistentDataLocation=" + fwPersistentDataLocation.getAbsolutePath());
+					throw new IllegalStateException(NLS.bind(Messages.exception_persistantLocationNotEqualConfigLocation, fwPersistentDataLocation.getAbsolutePath(), fwConfigLocation.getAbsolutePath()));
 			} else
 				launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
-			//launcherData.setFwPersistentDataLocation(fwConfigLocation.getParentFile(), launcherData.isClean());
 		} else {
 			if (fwPersistentDataLocation != null) {
 				launcherData.setFwConfigLocation(fwPersistentDataLocation);
-				//launcherData.setFwConfigLocation(new File(fwPersistentDataLocation, EquinoxConstants.CONFIG_INI));
 			} else {
 				File home = launcherData.getHome();
 				if (home == null)
-					throw new IllegalStateException("All of fwConfigLocation, fwPersistentDataLocation, and home are not set");
-				fwConfigLocation = new File(home, "configuration");
+					throw new IllegalStateException(Messages.exception_noLocations);
+				fwConfigLocation = new File(home, "configuration"); //$NON-NLS-1$
 				launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
 				launcherData.setFwConfigLocation(fwConfigLocation);
 			}
@@ -100,12 +98,13 @@ public class EquinoxManipulatorImpl implements Manipulator {
 
 	ConfigData configData = new ConfigData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
 	EquinoxLauncherData launcherData = new EquinoxLauncherData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
-
 	BundleContext context = null;
 	private Properties platformProperties = new Properties();
 
 	ServiceTracker cmTracker;
 	int trackingCount = -1;
+	private final PlatformAdmin platformAdmin;
+	private final StartLevel startLevelService;
 
 	//	private final boolean runtime;
 
@@ -113,13 +112,11 @@ public class EquinoxManipulatorImpl implements Manipulator {
 
 	EquinoxFwAdminImpl fwAdmin = null;
 
-	EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin) {
-		this(context, fwAdmin, false);
-	}
-
-	EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, boolean runtime) {
+	EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, PlatformAdmin admin, StartLevel slService, boolean runtime) {
 		this.context = context;
 		this.fwAdmin = fwAdmin;
+		this.platformAdmin = admin;
+		this.startLevelService = slService;
 		if (context != null) {
 			cmTracker = new ServiceTracker(context, ConfiguratorManipulator.class.getName(), null);
 			cmTracker.open();
@@ -143,9 +140,9 @@ public class EquinoxManipulatorImpl implements Manipulator {
 			return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
 
 		if (platformProperties.isEmpty())
-			return new EquinoxBundlesState(context, fwAdmin, this, false);
+			return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, false);
 		// XXX checking if fwDependent or fwIndependent platformProperties are updated after the platformProperties was created might be required for better implementation.
-		return new EquinoxBundlesState(context, fwAdmin, this, platformProperties);
+		return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, platformProperties);
 	}
 
 	public ConfigData getConfigData() throws FrameworkAdminRuntimeException {
@@ -185,7 +182,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
 		tracker.open();
 		Location location = (Location) tracker.getService();
 		URL url = location.getURL();
-		if (!url.getProtocol().equals("file"))
+		if (!url.getProtocol().equals("file")) //$NON-NLS-1$
 			return null;
 		return new File(url.getFile());
 	}
@@ -196,7 +193,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
 		if (eclipseCommandsSt == null)
 			return null;
 
-		StringTokenizer tokenizer = new StringTokenizer(eclipseCommandsSt, "\n");
+		StringTokenizer tokenizer = new StringTokenizer(eclipseCommandsSt, "\n"); //$NON-NLS-1$
 		boolean found = false;
 		String launcherSt = null;
 		while (tokenizer.hasMoreTokens()) {
@@ -205,7 +202,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
 				launcherSt = token;
 				break;
 			}
-			if (token.equals("-launcher"))
+			if (token.equals("-launcher")) //$NON-NLS-1$
 				found = true;
 		}
 		if (launcherSt != null)
@@ -250,13 +247,8 @@ public class EquinoxManipulatorImpl implements Manipulator {
 		return ret;
 	}
 
-	//	//
-	//	public void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
-	//		this.load(true);
-	//	}
-
 	public void initialize() {
-		Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN");
+		Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN"); //$NON-NLS-1$ //$NON-NLS-2$
 		configData.initialize();
 		launcherData.initialize();
 	}
@@ -267,15 +259,15 @@ public class EquinoxManipulatorImpl implements Manipulator {
 
 		// 1. retrieve location data from Location services registered by equinox fw.
 		String fwJarLocation = context.getProperty(EquinoxConstants.PROP_OSGI_FW);
-		if (!fwJarLocation.startsWith("file:"))
-			throw new IllegalStateException("Current implementation assume that property value keyed by " + EquinoxConstants.PROP_OSGI_FW + " must start with \"file:\". But it was not:" + fwJarLocation);
-		File fwJar = new File(fwJarLocation.substring("file:".length()));
-		//System.out.println("fwJar=" + fwJar);
+		if (!fwJarLocation.startsWith("file:")) //$NON-NLS-1$
+			throw new IllegalStateException(NLS.bind(Messages.exception_fileURLExpected, EquinoxConstants.PROP_OSGI_FW, fwJarLocation));
+		File fwJar = new File(fwJarLocation.substring("file:".length())); //$NON-NLS-1$
 		File fwConfigLocation = getRunningConfigurationLocation();
 		File launcherFile = getRunningLauncherFile();
 		launcherData.setFwJar(fwJar);
 		launcherData.setFwPersistentDataLocation(fwConfigLocation, false);
 		launcherData.setLauncher(launcherFile);
+		launcherData.setOS(context.getProperty("osgi.os")); //$NON-NLS-1$
 		try {
 			this.loadWithoutFwPersistentData();
 		} catch (IOException e1) {
@@ -314,25 +306,21 @@ public class EquinoxManipulatorImpl implements Manipulator {
 		}
 
 		// update initialBundleStartLevel
-		StartLevel slAdmin = (StartLevel) Activator.acquireService(StartLevel.class.getName());
 		int initialBSL = configData.getInitialBundleStartLevel();
-		if (initialBSL != slAdmin.getInitialBundleStartLevel())
-			configData.setInitialBundleStartLevel(slAdmin.getInitialBundleStartLevel());
-
-		//		for (int j = 0; j < bInfos.length; j++)
-		//			configData.addBundle(bInfos[j]);
+		if (initialBSL != startLevelService.getInitialBundleStartLevel())
+			configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator#load()
 	 */
 	public void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
-		Log.log(LogService.LOG_DEBUG, this, "load()", "BEGIN");
+		Log.log(LogService.LOG_DEBUG, this, "load()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
 		loadWithoutFwPersistentData();
 
 		BundlesState bundlesState = null;
 		if (EquinoxBundlesState.checkFullySupported()) {
-			bundlesState = new EquinoxBundlesState(context, fwAdmin, this, !launcherData.isClean());
+			bundlesState = new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, !launcherData.isClean());
 			platformProperties = ((EquinoxBundlesState) bundlesState).getPlatformProperties();
 		} else {
 			bundlesState = new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
@@ -365,13 +353,13 @@ public class EquinoxManipulatorImpl implements Manipulator {
 			try {
 				parser.readFwConfig(this, fwConfigFile);
 			} catch (URISyntaxException e) {
-				throw new FrameworkAdminRuntimeException(e, "loading");
+				throw new FrameworkAdminRuntimeException(e, NLS.bind(Messages.exception_errorReadingFile, fwConfigFile.getAbsolutePath()));
 			}
 	}
 
 	// Save all parameter in memory into proper config files.
 	public void save(boolean backup) throws IOException, FrameworkAdminRuntimeException {
-		Log.log(LogService.LOG_DEBUG, this, "save()", "BEGIN");
+		Log.log(LogService.LOG_DEBUG, this, "save()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
 		SimpleBundlesState.checkAvailability(fwAdmin);
 
 		try {
@@ -497,6 +485,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
 		launcherData.setFwPersistentDataLocation(value.getFwPersistentDataLocation(), value.isClean());
 		launcherData.setJvm(value.getJvm());
 		launcherData.setJvmArgs(value.getJvmArgs());
+		launcherData.setOS(value.getOS());
 		if (launcherData.getFwName().equals(value.getFwName()))
 			if (launcherData.getFwVersion().equals(value.getFwVersion())) {
 				// TODO launcherData.getFwName()/getFwVersion()/
@@ -520,20 +509,20 @@ public class EquinoxManipulatorImpl implements Manipulator {
 	 * @return true if it should be elimineted from FwDependentProperties and FwIndependentProperties,
 	 */
 	private boolean toBeEliminated(String key) {
-		if (key.startsWith("java."))
+		if (key.startsWith("java.")) //$NON-NLS-1$
 			return true;
 		return false;
 	}
 
 	public String toString() {
 		StringBuffer sb = new StringBuffer();
-		sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n");
-		sb.append("------------- LauncherData -----------\n");
+		sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		sb.append("------------- LauncherData -----------\n"); //$NON-NLS-1$
 		sb.append(launcherData.toString());
-		sb.append("------------- ConfigData -----------\n");
+		sb.append("------------- ConfigData -----------\n"); //$NON-NLS-1$
 		sb.append(configData.toString());
-		sb.append("\n" + Utils.toStringProperties("platformProperties", this.platformProperties));
-		sb.append("++++++++++++++++++++++++++++++++++++++++++\n");
+		sb.append("\n" + Utils.toStringProperties("platformProperties", this.platformProperties)); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("++++++++++++++++++++++++++++++++++++++++++\n"); //$NON-NLS-1$
 		return sb.toString();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
index 8c881f9..2453f7b 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
@@ -1,12 +1,13 @@
-/**********************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved.   This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * IBM - Initial API and implementation
- **********************************************************************/
+ *******************************************************************************/
 package org.eclipse.equinox.internal.frameworkadmin.equinox;
 
 import org.eclipse.osgi.util.NLS;
@@ -19,8 +20,13 @@ public class Messages extends NLS {
 	public static String exception_failedToCreateDir;
 	public static String exception_failedToRename;
 	public static String exception_launcherLocationNotSet;
+	public static String exception_noInstallArea;
 	public static String exception_fileURLExpected;
 	public static String exception_bundleManifest;
+	public static String exception_createAbsoluteURI;
+	public static String exception_nullConfigArea;
+	public static String exception_noFrameworkLocation;
+	public static String exception_errorSavingConfigIni;
 
 	public static String log_configFile;
 	public static String log_configProps;
@@ -31,6 +37,13 @@ public class Messages extends NLS {
 	public static String log_shared_config_relative_url;
 	public static String log_shared_config_file_missing;
 	public static String log_failed_reading_properties;
+	public static String log_failed_make_absolute;
+	public static String log_failed_make_relative;
+
+	public static String exception_unexpectedfwConfigLocation;
+	public static String exception_persistantLocationNotEqualConfigLocation;
+	public static String exception_noLocations;
+	public static String exception_errorReadingFile;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
index 2b45947..abde19f 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,8 @@ import java.util.Properties;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
+import org.eclipse.osgi.service.environment.Constants;
+import org.eclipse.osgi.util.NLS;
 import org.osgi.service.log.LogService;
 
 public class ParserUtils {
@@ -27,15 +29,36 @@ public class ParserUtils {
 		if (launcherData == null)
 			return null;
 
-		//TODO This is not enough because if you only have -startup then osgi.install.area from the config.ini is used
-		File result = getOSGiInstallArea(programArgs, properties, launcherData.getLauncher() == null ? null : launcherData.getLauncher().getParentFile().toURI());
+		URI base = null;
+		if (launcherData.getLauncher() != null)
+			base = launcherData.getLauncher().getParentFile().toURI();
+		else if (launcherData.getHome() != null)
+			base = launcherData.getHome().toURI();
+		File result = getOSGiInstallArea(programArgs, properties, base);
 		if (result != null)
 			return result;
 
+		if (launcherData.getHome() != null) {
+			return launcherData.getHome();
+		}
+
 		if (launcherData.getFwJar() != null)
 			return fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath());
-		if (launcherData.getLauncher() != null)
-			return launcherData.getLauncher().getParentFile();
+
+		File launcherFile = launcherData.getLauncher();
+		if (launcherFile != null) {
+			if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
+				//the equinox launcher will look 3 levels up on the mac when going from executable to launcher.jar
+				//see org.eclipse.equinox.executable/library/eclipse.c : findStartupJar();
+				IPath launcherPath = new Path(launcherFile.getAbsolutePath());
+				if (launcherPath.segmentCount() > 4) {
+					//removing "Eclipse.app/Contents/MacOS/eclipse"
+					launcherPath = launcherPath.removeLastSegments(4);
+					return launcherPath.toFile();
+				}
+			}
+			return launcherFile.getParentFile();
+		}
 		return null;
 	}
 
@@ -51,7 +74,7 @@ public class ParserUtils {
 		try {
 			return URIUtil.makeAbsolute(URIUtil.fromString(fwk), launcherFolder);
 		} catch (URISyntaxException e) {
-			Log.log(LogService.LOG_ERROR, "can't make absolute of:" + fwk);
+			Log.log(LogService.LOG_ERROR, NLS.bind(Messages.exception_createAbsoluteURI, fwk, launcherFolder));
 			return null;
 		}
 	}
@@ -62,7 +85,7 @@ public class ParserUtils {
 			return null;
 		String install = getValueForArgument(EquinoxConstants.OPTION_INSTALL, args);
 		if (install == null && properties != null)
-			install = properties.getProperty("osgi.install.area");
+			install = properties.getProperty("osgi.install.area"); //$NON-NLS-1$
 
 		if (install != null) {
 			if (install.startsWith(FILE_PROTOCOL))
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
index 5a218e0..a5d0d50 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -14,8 +14,14 @@ exception_fwConfigLocationName = Illegal State: Framework Configuration location
 exception_failedToCreateDir = Failed to create directory {0}.
 exception_failedToRename=Failed to rename {0} to {1}.
 exception_launcherLocationNotSet=The launcher location has not been set.
+exception_noInstallArea=Unable to determine osgi.install.area.
 exception_fileURLExpected= The property {0} = {1} is expected to be a \"file:\" URL.
 exception_bundleManifest= Unable to get bundle manifest for: {0}
+exception_createAbsoluteURI=Failed to create absolute URI from \"{0}\" and \"{1}\".
+exception_nullConfigArea=The configuration area is not set.
+exception_noFrameworkLocation = Unable to determinate the osgi.framework location.
+exception_errorSavingConfigIni = Error saving config.ini.
+exception_errorReadingFile = An error occured while reading {0}.
 
 log_configFile= Configuration file ({0}) has been read successfully.
 log_configProps= Configuration properties is empty.
@@ -26,3 +32,9 @@ log_shared_config_url=Failed creating shared configuration url for {0}.
 log_shared_config_relative_url=Failed creating shared configuration url for root: {0} and sharedConfiguration: {1}.
 log_shared_config_file_missing=Failed creating shared configuration. File missing: {0}.
 log_failed_reading_properties=Failed reading properties from file: {0}.
+log_failed_make_absolute=Failed to create absolute path for {0}.
+log_failed_make_relative=Failed to create relative path for {0}.
+
+exception_unexpectedfwConfigLocation=The specified framework configuration ({0}) location is not a directory but its name does NOT equal \"{1}\".
+exception_persistantLocationNotEqualConfigLocation=The framework persistent data location ({0}) is not the same as the framework configuration location ({1}).
+exception_noLocations=No locations are set (framework configuration, persistent data, or launcher home).
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
index b57ff04..e5a439f 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
@@ -13,11 +13,12 @@ package org.eclipse.equinox.internal.frameworkadmin.equinox.utils;
 import java.io.*;
 import java.net.*;
 import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
+import org.eclipse.osgi.service.environment.Constants;
 import org.osgi.framework.Version;
 
 public class FileUtils {
@@ -68,11 +69,20 @@ public class FileUtils {
 		File pluginsDir = null;
 		if (home != null)
 			pluginsDir = new File(home, EquinoxConstants.PLUGINS_DIR);
-		else if (launcherData.getLauncher() != null)
-			pluginsDir = new File(launcherData.getLauncher().getParentFile(), EquinoxConstants.PLUGINS_DIR);
 		else if (launcherData.getFwJar() != null)
 			pluginsDir = launcherData.getFwJar().getParentFile();
-
+		else if (launcherData.getLauncher() != null) {
+			File launcherDir = null;
+			if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
+				IPath launcherPath = new Path(launcherData.getLauncher().getAbsolutePath());
+				if (launcherPath.segmentCount() > 4) {
+					launcherPath = launcherPath.removeLastSegments(4);
+					launcherDir = launcherPath.toFile();
+				}
+			} else
+				launcherDir = launcherData.getLauncher().getParentFile();
+			pluginsDir = new File(launcherDir, EquinoxConstants.PLUGINS_DIR);
+		}
 		if (pluginsDir != null)
 			return pluginsDir.getAbsolutePath();
 		return null;
@@ -192,6 +202,9 @@ public class FileUtils {
 		throw new URISyntaxException(url, "Not a file url");
 	}
 
+	/**
+	 * Loads an ini file, returning a list of all non-blank lines in the file.
+	 */
 	public static List loadFile(File file) throws IOException {
 		BufferedReader br = null;
 		try {
@@ -200,7 +213,9 @@ public class FileUtils {
 			String line;
 			List list = new ArrayList();
 			while ((line = br.readLine()) != null) {
-				list.add(line);
+				//skip whitespace
+				if (line.trim().length() > 0)
+					list.add(line);
 			}
 			return list;
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.classpath b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.classpath
index 7cdeb73..6f3b481 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
index d87350a..b5ebf1c 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
@@ -1,266 +1,343 @@
-#Mon Oct 22 13:17:28 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+#Thu Mar 04 10:20:10 EST 2010
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
 org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
index 32b73b4..c1bde7c 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 2.0.0.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Import-Package: org.eclipse.osgi.service.pluginconversion;version="1.0.0",
  org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.startlevel;version="1.0.0"
-Export-Package: org.eclipse.equinox.internal.frameworkadmin.utils;
+ org.osgi.framework;version="1.3.0"
+Export-Package: org.eclipse.equinox.frameworkadmin;version="2.0.0",
+ org.eclipse.equinox.internal.frameworkadmin.utils;
   x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.publisher,
@@ -23,8 +23,8 @@ Export-Package: org.eclipse.equinox.internal.frameworkadmin.utils;
    org.eclipse.equinox.simpleconfigurator.manipulator,
    org.eclipse.pde.core,
    org.eclipse.pde.ui"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
+Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
+ J2SE-1.4
 Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0"
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: org.eclipse.equinox.internal.frameworkadmin.utils.Activator
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/pom.xml b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/pom.xml
new file mode 100644
index 0000000..239c24f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.frameworkadmin</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
new file mode 100644
index 0000000..702fd18
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
@@ -0,0 +1,331 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.frameworkadmin;
+
+import java.net.URI;
+import org.eclipse.core.runtime.URIUtil;
+import org.osgi.framework.Version;
+
+/**
+ * This object represents information of a bundle. 
+ * @since 2.0
+ */
+public class BundleInfo {
+	public static final String EMPTY_VERSION = "0.0.0"; //$NON-NLS-1$
+	public static final int NO_LEVEL = -1;
+	public static final int NO_BUNDLEID = -1;
+
+	private String symbolicName = null;
+	private String version = EMPTY_VERSION;
+	private URI baseLocation = null;
+	private URI location = null;
+	private long bundleId = NO_BUNDLEID;
+
+	private boolean markedAsStarted = false;
+	private int startLevel = NO_LEVEL;
+	private boolean resolved = false;
+
+	private String manifest = null;
+	private String fragmentHost = null;
+
+	/**
+	 * Create a new BundleInfo object
+	 */
+	public BundleInfo() {
+	}
+
+	/**
+	 * Create a new BundleInfo object
+	 * @param location - the location of the bundle
+	 */
+	public BundleInfo(URI location) {
+		this.location = location;
+	}
+
+	/**
+	 * Create a new BundleInfo object
+	 * @param location - the location of the bundle
+	 * @param startLevel - the start to be used or {@link BundleInfo#NO_LEVEL}
+	 * @param started - whether or not the bundle should be started
+	 */
+	public BundleInfo(URI location, int startLevel, boolean started) {
+		this.location = location;
+		this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
+		this.markedAsStarted = started;
+	}
+
+	/**
+	 * Create a new BundleInfo object
+	 * @param symbolic  The Bundle-SymbolicName name for this bundle
+	 * @param version - The version for this bundle, this must be a valid {@link Version} string, if null is passed {@link #EMPTY_VERSION} will be used instead
+	 * @param location - the location of the bundle
+	 * @param startLevel - the start level of the bundle or {@link BundleInfo#NO_LEVEL}
+	 * @param started - whether or not the bundle should be started
+	 */
+	public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
+		this.symbolicName = symbolic;
+		this.version = version != null ? version : EMPTY_VERSION;
+		this.location = location;
+		this.markedAsStarted = started;
+		this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
+	}
+
+	/**
+	 * Get the bundle id
+	 * @return the bundle id or {@link #NO_BUNDLEID}
+	 */
+	public long getBundleId() {
+		return bundleId;
+	}
+
+	/**
+	 * The base location
+	 * An absolute URI which may be used to resolve relative {@link #getLocation()} URIs
+	 * @return absolute URI or null if not set
+	 */
+	public URI getBaseLocation() {
+		return baseLocation;
+	}
+
+	/**
+	 * The location of this bundle.
+	 * A location is required if this bundle will be persisted into a configuration file
+	 * @return URI location or null if not set
+	 */
+	public URI getLocation() {
+		return location;
+	}
+
+	/**
+	 * The manifest for this bundle
+	 * @return the manifest or null if not set
+	 */
+	public String getManifest() {
+		return manifest;
+	}
+
+	/**
+	 * The start level for this bundle
+	 * @return the start level or {@link #NO_LEVEL}
+	 */
+	public int getStartLevel() {
+		return startLevel;
+	}
+
+	/**
+	 * The Bundle-SymbolicName for this bundle.
+	 * A symbolic name is required if this bundle will be persisted into a configuration file
+	 * @return the symbolic name or null if not set
+	 */
+	public String getSymbolicName() {
+		return symbolicName;
+	}
+
+	/**
+	 * Return the version
+	 * @return an {@link Version} string, or "0.0.0" if not set 
+	 */
+	public String getVersion() {
+		if (version == null)
+			return EMPTY_VERSION;
+		return version;
+	}
+
+	/**
+	 * Return the host if this bundle is a fragment
+	 * @return the host, or null if this is not a fragment
+	 */
+	public String getFragmentHost() {
+		return fragmentHost;
+	}
+
+	/**
+	 * Whether or not this bundle is marked to be started
+	 * Default is false
+	 * @return boolean
+	 */
+	public boolean isMarkedAsStarted() {
+		return markedAsStarted;
+	}
+
+	/**
+	 * Whether or not this bundle is resolved
+	 * Default is false
+	 * @return boolean
+	 */
+	public boolean isResolved() {
+		return resolved;
+	}
+
+	/**
+	 * Set the bundle id
+	 * @param bundleId
+	 */
+	public void setBundleId(long bundleId) {
+		this.bundleId = bundleId;
+	}
+
+	/**
+	 * Set a base location against which relative {@link #getLocation()} URIs may be resolved
+	 * @param baseLocation - an absolute URI
+	 */
+	public void setBaseLocation(URI baseLocation) {
+		this.baseLocation = baseLocation;
+	}
+
+	/**
+	 * Set the location for this bundle.
+	 * @param location
+	 */
+	public void setLocation(URI location) {
+		this.location = location;
+	}
+
+	/**
+	 * Set the manifest for this bundle
+	 * @param manifest
+	 */
+	public void setManifest(String manifest) {
+		this.manifest = manifest;
+	}
+
+	/**
+	 * Set whether or not this bundle should be started
+	 * @param markedAsStarted
+	 */
+	public void setMarkedAsStarted(boolean markedAsStarted) {
+		this.markedAsStarted = markedAsStarted;
+	}
+
+	/** 
+	 * Set whether or not the bundle is resolved
+	 * @param resolved
+	 */
+	public void setResolved(boolean resolved) {
+		this.resolved = resolved;
+	}
+
+	/**
+	 * Set the start level.
+	 * @param level if a value < 0 is passed, the start level will be set to {@link #NO_LEVEL}
+	 */
+	public void setStartLevel(int level) {
+		this.startLevel = level < 0 ? NO_LEVEL : level;
+	}
+
+	/**
+	 * Set the Bundle-SymbolicName
+	 * @param symbolicName
+	 */
+	public void setSymbolicName(String symbolicName) {
+		this.symbolicName = symbolicName;
+	}
+
+	/**
+	 * Set the version, should be a valid {@link Version} string
+	 * @param value
+	 */
+	public void setVersion(String value) {
+		if (value == null)
+			this.version = EMPTY_VERSION;
+		else
+			this.version = value;
+	}
+
+	/**
+	 * Set the host if this bundle is a fragment
+	 * @param fragmentHost
+	 */
+	public void setFragmentHost(String fragmentHost) {
+		this.fragmentHost = fragmentHost;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("BundleInfo("); //$NON-NLS-1$
+		if (symbolicName != null)
+			buffer.append(symbolicName);
+		buffer.append(", "); //$NON-NLS-1$
+		buffer.append(version);
+
+		if (fragmentHost != null) {
+			buffer.append(", fragmentHost="); //$NON-NLS-1$
+			buffer.append(fragmentHost);
+		}
+
+		if (baseLocation != null) {
+			buffer.append(", baseLocation="); //$NON-NLS-1$
+			buffer.append(baseLocation);
+		}
+		buffer.append(", location="); //$NON-NLS-1$
+		buffer.append(location);
+		buffer.append(", startLevel="); //$NON-NLS-1$
+		buffer.append(startLevel);
+		buffer.append(", toBeStarted="); //$NON-NLS-1$
+		buffer.append(markedAsStarted);
+		buffer.append(", resolved="); //$NON-NLS-1$
+		buffer.append(resolved);
+		buffer.append(", id="); //$NON-NLS-1$
+		buffer.append(this.bundleId);//		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
+		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(')');
+		return buffer.toString();
+	}
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
+		result = prime * result + version.hashCode();
+		return result;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+
+		if (obj == null)
+			return false;
+
+		if (getClass() != obj.getClass())
+			return false;
+
+		BundleInfo other = (BundleInfo) obj;
+		if (symbolicName == null) {
+			if (other.symbolicName != null)
+				return false;
+		} else if (!symbolicName.equals(other.symbolicName))
+			return false;
+
+		if (!version.equals(other.getVersion()))
+			return false;
+
+		if (location == null || other.location == null)
+			return true;
+
+		//compare absolute location URIs
+		URI absoluteLocation = null;
+		if (location.isAbsolute() || baseLocation == null)
+			absoluteLocation = location;
+		else
+			absoluteLocation = URIUtil.append(baseLocation, URIUtil.toUnencodedString(location));
+
+		URI otherAbsoluteLocation = null;
+		if (other.location.isAbsolute() || other.baseLocation == null)
+			otherAbsoluteLocation = other.location;
+		else
+			otherAbsoluteLocation = URIUtil.append(other.baseLocation, URIUtil.toUnencodedString(other.location));
+		return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
index 9a479d6..2d257a5 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
@@ -14,6 +14,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.URI;
 import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
 import org.osgi.framework.Constants;
 
@@ -188,20 +189,20 @@ public class SimpleBundlesState implements BundlesState {
 			String manifestVersion = Utils.getManifestMainAttributes(location, Constants.BUNDLE_MANIFESTVERSION);
 			if (manifestVersion == null)
 				continue;
-			if (manifestVersion.equals("1") || manifestVersion.equals("1.0"))
+			if (manifestVersion.equals("1") || manifestVersion.equals("1.0")) //$NON-NLS-1$//$NON-NLS-2$
 				continue;
 
 			String fragmentHost = Utils.getManifestMainAttributes(location, Constants.FRAGMENT_HOST);
 			if (fragmentHost == null)
 				continue;
-			int index = fragmentHost.indexOf(";");
+			int index = fragmentHost.indexOf(";"); //$NON-NLS-1$
 			if (index == -1)
 				continue;
 			String symbolicName = fragmentHost.substring(0, index).trim();
 			String parameter = fragmentHost.substring(index + 1).trim();
 			// TODO What to do ,in case of alias name of system bundle is not used ?
 			if (symbolicName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME))
-				if (parameter.equals(Constants.EXTENSION_DIRECTIVE + ":=" + Constants.EXTENSION_FRAMEWORK)) {
+				if (parameter.equals(Constants.EXTENSION_DIRECTIVE + ":=" + Constants.EXTENSION_FRAMEWORK)) { //$NON-NLS-1$
 					list.add(location);
 					break;
 				}
@@ -228,7 +229,8 @@ public class SimpleBundlesState implements BundlesState {
 			this.installBundle(bInfos[j]);
 
 		if (getSystemBundle() == null) {
-			BundleInfo sysBInfo = new BundleInfo(launcherData.getFwJar().toURI(), 0, true, 0);
+			BundleInfo sysBInfo = new BundleInfo(launcherData.getFwJar().toURI(), 0, true);
+			sysBInfo.setBundleId(0);
 			this.installBundle(sysBInfo);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
index a6d3ef7..375622c 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
@@ -18,7 +18,7 @@ import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
 import org.eclipse.osgi.service.pluginconversion.PluginConverter;
 import org.eclipse.osgi.util.ManifestElement;
@@ -61,10 +61,8 @@ public class Utils {
 		ZipFile jarFile = null;
 		try {
 			try {
-				String fileExtention = bundleLocation.getName();
-				fileExtention = fileExtention.substring(fileExtention.lastIndexOf('.') + 1);
 				// Handle a JAR'd bundle
-				if ("jar".equalsIgnoreCase(fileExtention) && bundleLocation.isFile()) { //$NON-NLS-1$
+				if (bundleLocation.isFile()) {
 					jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
 					ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
 					if (manifestEntry != null) {
@@ -131,7 +129,7 @@ public class Utils {
 	public static URL checkFullUrl(URL url, String urlName) throws IllegalArgumentException {//throws ManipulatorException {
 		if (url == null)
 			throw new IllegalArgumentException(urlName + " is null");
-		if (!url.getProtocol().endsWith("file"))
+		if (!url.getProtocol().endsWith("file")) //$NON-NLS-1$
 			return url;
 		File file = new File(url.getFile());
 		if (!file.isAbsolute())
@@ -139,7 +137,7 @@ public class Utils {
 		if (file.getAbsolutePath().startsWith(PATH_SEP))
 			return url;
 		try {
-			return getUrl("file", null, PATH_SEP + file.getAbsolutePath());
+			return getUrl("file", null, PATH_SEP + file.getAbsolutePath()); //$NON-NLS-1$
 		} catch (MalformedURLException e) {
 			throw new IllegalArgumentException(urlName + "(" + "file:" + PATH_SEP + file.getAbsolutePath() + ") is not fully quallified");
 		}
@@ -190,7 +188,7 @@ public class Utils {
 	}
 
 	public static String[] getClauses(String header) {
-		StringTokenizer token = new StringTokenizer(header, ",");
+		StringTokenizer token = new StringTokenizer(header, ","); //$NON-NLS-1$
 		List list = new LinkedList();
 		while (token.hasMoreTokens()) {
 			list.add(token.nextToken());
@@ -219,7 +217,7 @@ public class Utils {
 			return basicLoadManifest(URIUtil.toFile(location));
 
 		try {
-			URL url = new URL("jar:" + location.toString() + "!/");
+			URL url = new URL("jar:" + location.toString() + "!/"); //$NON-NLS-1$//$NON-NLS-2$
 			JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
 			ZipFile jar = jarConnection.getJarFile();
 
@@ -296,14 +294,14 @@ public class Utils {
 	 * 	"hogehoge.yyyyMMddHHmmss".
 	 */
 	public static File getSimpleDataFormattedFile(File file) {
-		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); //$NON-NLS-1$
 		String date = df.format(new Date());
 		String filename = file.getName();
-		int index = filename.lastIndexOf(".");
+		int index = filename.lastIndexOf("."); //$NON-NLS-1$
 		if (index != -1)
-			filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1);
+			filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1); //$NON-NLS-1$ //$NON-NLS-2$
 		else
-			filename = filename + "." + date;
+			filename = filename + "." + date; //$NON-NLS-1$
 		File dest = new File(file.getParentFile(), filename);
 		return dest;
 	}
@@ -330,15 +328,15 @@ public class Utils {
 
 	public static URL getUrlInFull(String path, URL from) throws MalformedURLException {//throws ManipulatorException {
 		Utils.checkFullUrl(from, "from");
-		path = Utils.replaceAll(path, File.separator, "/");
+		path = Utils.replaceAll(path, File.separator, "/"); //$NON-NLS-1$
 		//System.out.println("from.toExternalForm()=" + from.toExternalForm());
 		String fromSt = Utils.removeLastCh(from.toExternalForm(), '/');
 		//System.out.println("fromSt=" + fromSt);
-		if (path.startsWith("/")) {
+		if (path.startsWith("/")) { //$NON-NLS-1$
 			String fileSt = from.getFile();
 			return new URL(fromSt.substring(0, fromSt.lastIndexOf(fileSt) - 1) + path);
 		}
-		return new URL(fromSt + "/" + path);
+		return new URL(fromSt + "/" + path); //$NON-NLS-1$
 	}
 
 	private static Properties manifestToProperties(Map d) {
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
index f400e35..dfc6b43 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
@@ -12,18 +12,20 @@ package org.eclipse.equinox.internal.provisional.configuratormanipulator;
 
 import java.io.File;
 import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
 
 /**
  * 
  * This interface provides methods that enable client bundles to 
  * manipulate the corresponding ConfiguratorBundle.
  * 
- *  @see Configurator
+ *  see org.eclipse.equinox.internal.provisional.configurator.Configurator
  */
 
 public interface ConfiguratorManipulator {
-	String SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME = "org.eclipse.equinox.configurator.BundleSymbolicName";
+	String SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME = "org.eclipse.equinox.configurator.BundleSymbolicName"; //$NON-NLS-1$
 
 	/**
 	 * Save configuration for the corresponding Configurator Bundle so that 
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
index 1112455..7ff1253 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
@@ -18,7 +18,7 @@ import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
  *  @see FrameworkAdmin
  */
 public abstract class ConfiguratorManipulatorFactory {
-	public final static String SYSTEM_PROPERTY_KEY = "org.eclipse.equinox.configuratorManipulatorFactory";
+	public final static String SYSTEM_PROPERTY_KEY = "org.eclipse.equinox.configuratorManipulatorFactory"; //$NON-NLS-1$
 
 	abstract protected ConfiguratorManipulator createConfiguratorManipulator();
 
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.java
deleted file mode 100644
index 48e8903..0000000
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundleInfo.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-
-/**
- * This object represents information of a bundle. This class is a copy of the BundleInfo
- * class in org.eclipse.equinox.simpleconfigurator
- *
- */
-public class BundleInfo {
-	public static final int NO_LEVEL = -1;
-	public static final int NO_BUNDLEID = -1;
-
-	private String symbolicName = null;
-	private String version = null;
-	private URI baseLocation;
-	private URI location;
-	private long bundleId = NO_BUNDLEID;
-
-	private boolean markedAsStarted = false;
-	private int startLevel = NO_LEVEL;
-	private boolean resolved = false;
-
-	private String manifest;
-	private String fragmentHost;
-
-	public BundleInfo() {
-	}
-
-	public BundleInfo(URI location) {
-		this.location = location;
-	}
-
-	public BundleInfo(URI location, boolean started) {
-		this.location = location;
-		this.markedAsStarted = started;
-	}
-
-	public BundleInfo(URI location, int startLevel) {
-		this.location = location;
-		this.startLevel = startLevel;
-	}
-
-	public BundleInfo(URI location, int startLevel, boolean started) {
-		this.location = location;
-		this.startLevel = startLevel;
-		this.markedAsStarted = started;
-	}
-
-	public BundleInfo(URI location, int startLevel, boolean started, long bundleId) {
-		this.location = location;
-		this.startLevel = startLevel;
-		this.markedAsStarted = started;
-		this.bundleId = bundleId;
-	}
-
-	public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
-		this.symbolicName = symbolic;
-		this.version = version;
-		this.location = location;
-		this.markedAsStarted = started;
-		this.startLevel = startLevel;
-	}
-
-	public long getBundleId() {
-		return bundleId;
-	}
-
-	public URI getBaseLocation() {
-		return baseLocation;
-	}
-
-	public URI getLocation() {
-		return location;
-	}
-
-	public String getManifest() {
-		return manifest;
-	}
-
-	public int getStartLevel() {
-		return startLevel;
-	}
-
-	public String getSymbolicName() {
-		return symbolicName;
-	}
-
-	public String getVersion() {
-		return version;
-	}
-
-	public String getFragmentHost() {
-		return fragmentHost;
-	}
-
-	public boolean isMarkedAsStarted() {
-		return markedAsStarted;
-	}
-
-	public boolean isResolved() {
-		return resolved;
-	}
-
-	public void setBundleId(long bundleId) {
-		this.bundleId = bundleId;
-	}
-
-	public void setBaseLocation(URI baseLocation) {
-		this.baseLocation = baseLocation;
-	}
-
-	public void setLocation(URI location) {
-		this.location = location;
-	}
-
-	public void setManifest(String manifest) {
-		this.manifest = manifest;
-	}
-
-	public void setMarkedAsStarted(boolean markedAsStarted) {
-		this.markedAsStarted = markedAsStarted;
-	}
-
-	public void setResolved(boolean resolved) {
-		this.resolved = resolved;
-	}
-
-	public void setStartLevel(int level) {
-		this.startLevel = level;
-	}
-
-	public void setSymbolicName(String symbolicName) {
-		this.symbolicName = symbolicName;
-	}
-
-	public void setVersion(String value) {
-		this.version = value;
-	}
-
-	public void setFragmentHost(String fragmentHost) {
-		this.fragmentHost = fragmentHost;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		StringBuffer buffer = new StringBuffer();
-		buffer.append("BundleInfo("); //$NON-NLS-1$
-		if (symbolicName != null)
-			buffer.append(symbolicName);
-		buffer.append(", "); //$NON-NLS-1$
-		if (version != null)
-			buffer.append(version);
-
-		if (fragmentHost != null) {
-			buffer.append(", fragmentHost="); //$NON-NLA-1$
-			buffer.append(fragmentHost);
-		}
-
-		if (baseLocation != null) {
-			buffer.append(", baseLocation="); //$NON-NLS-1$
-			buffer.append(baseLocation);
-		}
-		buffer.append(", location="); //$NON-NLS-1$
-		buffer.append(location);
-		buffer.append(", startLevel="); //$NON-NLS-1$
-		buffer.append(startLevel);
-		buffer.append(", toBeStarted="); //$NON-NLS-1$
-		buffer.append(markedAsStarted);
-		buffer.append(", resolved="); //$NON-NLS-1$
-		buffer.append(resolved);
-		buffer.append(", id="); //$NON-NLS-1$
-		buffer.append(this.bundleId);//		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
-		buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
-		buffer.append(')');
-		return buffer.toString();
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
-		result = prime * result + ((version == null) ? 0 : version.hashCode());
-		return result;
-	}
-
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-
-		if (obj == null)
-			return false;
-
-		if (getClass() != obj.getClass())
-			return false;
-
-		BundleInfo other = (BundleInfo) obj;
-		if (symbolicName == null) {
-			if (other.symbolicName != null)
-				return false;
-		} else if (!symbolicName.equals(other.symbolicName))
-			return false;
-
-		if (version == null) {
-			if (other.version != null)
-				return false;
-		} else if (!version.equals(other.version))
-			return false;
-
-		if (location == null || other.location == null)
-			return true;
-
-		//compare absolute location URIs
-		URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
-		URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
-		return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
index 971373b..bbd261c 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.frameworkadmin;
 
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+
 /**
  * This API is used for expecting bundles state virtually.
  * 
@@ -66,14 +68,14 @@ public interface BundlesState {
 	 * to resolve the specified bInfo under the state currently composed.  
 	 * 
 	 * If this implementation doesn't support resolving state,
-	 * FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
+	 * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
 	 * will be thrown.
 	 * 
 	 * XXX this method is prepared mainly for debugging. 
 	 * 
 	 * @param bInfo
 	 * @return array of Strings which tells the unsatisfied constaints.
-	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
+	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
 	 */
 	public String[] getUnsatisfiedConstraints(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
 
@@ -99,11 +101,11 @@ public interface BundlesState {
 	 * Otherwise false. 
 	 * 
 	 * If this implementation doesn't support resolving state,
-	 * FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
+	 * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
 	 * will be thrown.
 	 * 
 	 * @return true if the state currently composed is resolved after the last change of the state. Otherwise false. 
-	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
+	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
 	 */
 	public boolean isResolved() throws FrameworkAdminRuntimeException;
 
@@ -112,11 +114,11 @@ public interface BundlesState {
 	 * Otherwise false. 
 	 * 
 	 * If this implementation doesn't support resolving state,
-	 * FwLauncherException with a cause of {@value FwLauncherException#UNSUPPORTED_OPERATION}
+	 * FwLauncherException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
 	 * will be thrown.
 	 * 
 	 * @return true if the specified bundle is resolved. Otherwise false. 
-	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
+	 * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}  will be thrown.
 	 */
 	public boolean isResolved(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
 
@@ -124,7 +126,7 @@ public interface BundlesState {
 	 * Resolves the constraints contained in this state.
 	 * 
 	 * If this implementation doesn't support resolving state,
-	 * FrameworkAdminRuntimeException with a cause of {@value FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
+	 * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
 	 * will be thrown.
 	 * 	 
 	 * @param incremental a flag controlling whether resolution should be incremental
@@ -138,5 +140,5 @@ public interface BundlesState {
 	 * @param bInfo BundleInfo to be uninstalled
 	 * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered. 
 	 */
-	void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;;
+	void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
index 118a911..33a80f4 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
@@ -12,6 +12,7 @@
 package org.eclipse.equinox.internal.provisional.frameworkadmin;
 
 import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 
 /**
  * This object is instantiated by {@link Manipulator#getConfigData()};
@@ -22,23 +23,6 @@ import java.util.*;
  * @see Manipulator
  */
 public class ConfigData {
-
-	private static Properties appendProperties(Properties to, Properties from) {
-		if (from != null) {
-			if (to == null)
-				to = new Properties();
-			//			printoutProperties(System.out, "to", to);
-			//			printoutProperties(System.out, "from", from);
-
-			for (Enumeration enumeration = from.keys(); enumeration.hasMoreElements();) {
-				String key = (String) enumeration.nextElement();
-				to.setProperty(key, from.getProperty(key));
-			}
-		}
-		//		printoutProperties(System.out, "to", to);
-		return to;
-	}
-
 	final private String fwName;
 	final private String fwVersion;
 	final private String launcherName;
@@ -80,7 +64,7 @@ public class ConfigData {
 
 	public Properties getProperties() {
 		Properties ret = new Properties();
-		appendProperties(ret, properties);
+		ret.putAll(properties);
 		return ret;
 	}
 
@@ -136,9 +120,13 @@ public class ConfigData {
 			properties.setProperty(key, value);
 	}
 
+	public void appendProperties(Properties props) {
+		properties.putAll(props);
+	}
+
 	public void setProperties(Properties props) {
 		properties.clear();
-		appendProperties(properties, props);
+		properties.putAll(props);
 	}
 
 	public void setInitialBundleStartLevel(int startLevel) {
@@ -174,15 +162,15 @@ public class ConfigData {
 
 	private static void setPropsStrings(StringBuffer sb, Properties props) {
 		if (props.size() > 0) {
-			sb.append("\n");
+			sb.append("\n"); //$NON-NLS-1$
 			for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
 				String key = (String) enumeration.nextElement();
 				String value = props.getProperty(key);
-				if (value == null || value.equals(""))
+				if (value == null || value.equals("")) //$NON-NLS-1$
 					continue;
-				sb.append("\t{" + key + " ,\t" + value + "}\n");
+				sb.append("\t{" + key + " ,\t" + value + "}\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			}
 		} else
-			sb.append("empty\n");
+			sb.append("empty\n"); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
index a145750..fdadaf3 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
@@ -65,12 +65,12 @@ import java.io.IOException;
  */
 public interface FrameworkAdmin {
 
-	String SERVICE_PROP_KEY_FW_NAME = "org.eclipse.equinox.frameworkhandler.framework.name";
-	String SERVICE_PROP_KEY_FW_VERSION = "org.eclipse.equinox.frameworkhandler.framework.version";
+	String SERVICE_PROP_KEY_FW_NAME = "org.eclipse.equinox.frameworkhandler.framework.name"; //$NON-NLS-1$
+	String SERVICE_PROP_KEY_FW_VERSION = "org.eclipse.equinox.frameworkhandler.framework.version"; //$NON-NLS-1$
 
-	String SERVICE_PROP_KEY_LAUNCHER_NAME = "org.eclipse.equinox.frameworkhandler.launcher.name";
-	String SERVICE_PROP_KEY_LAUNCHER_VERSION = "org.eclipse.equinox.frameworkhandler.launcher.version";
-	String SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG = "org.eclipse.equinox.frameworkhandler.runningfwflag";
+	String SERVICE_PROP_KEY_LAUNCHER_NAME = "org.eclipse.equinox.frameworkhandler.launcher.name"; //$NON-NLS-1$
+	String SERVICE_PROP_KEY_LAUNCHER_VERSION = "org.eclipse.equinox.frameworkhandler.launcher.version"; //$NON-NLS-1$
+	String SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG = "org.eclipse.equinox.frameworkhandler.runningfwflag"; //$NON-NLS-1$
 
 	/**
 	 * Create new instance of {@link Manipulator} and return it.
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
index 7004cbd..09d03cb 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
@@ -40,6 +40,7 @@ public class LauncherData {
 	private String fwVersion;
 	private String launcherName;
 	private String launcherVersion;
+	private String os;
 
 	public LauncherData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
 		this.fwName = fwName;
@@ -142,7 +143,7 @@ public class LauncherData {
 		// backwards compatibility we remove all program args until the 
 		// next program arg key 
 		// (see bug 253862)
-		if (!arg.startsWith("-"))
+		if (!arg.startsWith("-")) //$NON-NLS-1$
 			return;
 
 		int index = programArgs.indexOf(arg);
@@ -177,6 +178,8 @@ public class LauncherData {
 
 	public void setJvm(File file) {
 		this.jvm = file;
+		if (file == null)
+			removeProgramArg("-vm"); //$NON-NLS-1$
 	}
 
 	public void setJvmArgs(String[] args) {
@@ -196,6 +199,14 @@ public class LauncherData {
 		this.launcherConfigLocation = launcherConfigLocation;
 	}
 
+	public void setOS(String os) {
+		this.os = os;
+	}
+
+	public String getOS() {
+		return os;
+	}
+
 	public void setProgramArgs(String[] args) {
 		if (args == null || args.length == 0) {
 			programArgs.clear();
@@ -207,37 +218,37 @@ public class LauncherData {
 
 	public String toString() {
 		StringBuffer sb = new StringBuffer();
-		sb.append("Class:" + this.getClass().getName() + "\n");
-		sb.append("fwName=" + this.fwName + "\n");
-		sb.append("fwVersion=" + this.fwVersion + "\n");
-		sb.append("launcherName=" + this.launcherName + "\n");
-		sb.append("launcherVersion=" + this.launcherVersion + "\n");
+		sb.append("Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("fwName=" + this.fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("fwVersion=" + this.fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("launcherName=" + this.launcherName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("launcherVersion=" + this.launcherVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 
-		sb.append("jvm=" + this.jvm + "\n");
+		sb.append("jvm=" + this.jvm + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 		if (this.jvmArgs.size() == 0)
-			sb.append("jvmArgs = null\n");
+			sb.append("jvmArgs = null\n"); //$NON-NLS-1$
 		else {
-			sb.append("jvmArgs=\n");
+			sb.append("jvmArgs=\n"); //$NON-NLS-1$
 			int i = 0;
 			for (Iterator iterator = jvmArgs.iterator(); iterator.hasNext(); iterator.next())
-				sb.append("\tjvmArgs[" + i++ + "]=" + iterator + "\n");
+				sb.append("\tjvmArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
 		}
 		if (this.programArgs.size() == 0)
-			sb.append("programArgs = null\n");
+			sb.append("programArgs = null\n"); //$NON-NLS-1$
 		else {
-			sb.append("programArgs=\n");
+			sb.append("programArgs=\n"); //$NON-NLS-1$
 			int i = 0;
 			for (Iterator iterator = programArgs.iterator(); iterator.hasNext(); iterator.next())
-				sb.append("\tprogramArgs[" + i++ + "]=" + iterator + "\n");
+				sb.append("\tprogramArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
-		sb.append("fwConfigLocation=" + this.fwConfigLocation + "\n");
-		sb.append("fwJar=" + this.fwJar + "\n");
-		sb.append("fwPersistentDataLocation=" + this.fwPersistentDataLocation + "\n");
-		sb.append("home=" + this.home + "\n");
-		sb.append("launcher=" + this.launcher + "\n");
-		sb.append("launcherConfigLocation=" + this.launcherConfigLocation + "\n");
-		sb.append("clean=" + this.isClean() + "\n");
+		sb.append("fwConfigLocation=" + this.fwConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("fwJar=" + this.fwJar + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("fwPersistentDataLocation=" + this.fwPersistentDataLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("home=" + this.home + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("launcher=" + this.launcher + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("launcherConfigLocation=" + this.launcherConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		sb.append("clean=" + this.isClean() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 
 		return sb.toString();
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
index 303290b..463b352 100644
--- a/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
+++ b/eclipse/plugins/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
@@ -12,7 +12,7 @@ package org.eclipse.equinox.internal.provisional.frameworkadmin;
 
 import java.io.File;
 import java.io.IOException;
-
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
 
 /**
@@ -114,7 +114,7 @@ public interface Manipulator {
 	 * 
 	 * This method will check last modified time of all launcher configuration file, framework configuration file,
 	 * and framework persistent storage according to the parameters set.
-	 * @return
+	 * @return long
 	 */
 	long getTimeStamp();
 
diff --git a/eclipse/plugins/org.eclipse.equinox.http.jetty_2.0.0/src/org/eclipse/equinox/http/jetty/JettyConfigurator.java b/eclipse/plugins/org.eclipse.equinox.http.jetty_2.0.0/src/org/eclipse/equinox/http/jetty/JettyConfigurator.java
index 8a5b2a0..45f4490 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.jetty_2.0.0/src/org/eclipse/equinox/http/jetty/JettyConfigurator.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.jetty_2.0.0/src/org/eclipse/equinox/http/jetty/JettyConfigurator.java
@@ -31,7 +31,8 @@ public class JettyConfigurator {
 	private static Permission configurationPermission = new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE); //$NON-NLS-1$
 
 	/**
-	 * Creates an instance of Jetty parameterized with a dictionary of settings
+	 * Creates an instance of Jetty parameterized with a dictionary of settings. If a server with this
+	 * id already exists that server is instead restarted and updated with the new settings
 	 * @param id The identifier for the server instance
 	 * @param settings The dictionary of settings used to configure the server instance
 	 * @throws Exception If the server failed to start for any reason
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
index 3ba8b0e..1ee48fb 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.http.registry;singleton:=true
-Bundle-Version: 1.0.200.qualifier
+Bundle-Version: 1.1.1.qualifier
 Bundle-Activator: org.eclipse.equinox.http.registry.internal.Activator
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.equinox.common,
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.properties b/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.properties
index 035b216..7f1e11f 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.properties
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.properties
@@ -4,13 +4,14 @@
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 bundleName = Http Service Registry Extensions
 providerName = Eclipse.org - Equinox
 servletsName = HttpService servlets
+filtersName = HttpService filters
 resourcesName = HttpService resources
 httpcontextsName = HttpService httpcontexts
 
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.xml b/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.xml
index 8d9cf90..6cee1e5 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/plugin.xml
@@ -2,6 +2,7 @@
 <?eclipse version="3.0"?>
 <plugin>
      <extension-point id="servlets" name="%servletsName" schema="schema/servlets.exsd"/>
+     <extension-point id="filters" name="%filtersName" schema="schema/filters.exsd"/>
      <extension-point id="resources" name="%resourcesName" schema="schema/resources.exsd"/>
      <extension-point id="httpcontexts" name="%httpcontextsName" schema="schema/httpcontexts.exsd"/>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/schema/filters.exsd b/eclipse/plugins/org.eclipse.equinox.http.registry/schema/filters.exsd
new file mode 100644
index 0000000..e9182ea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/schema/filters.exsd
@@ -0,0 +1,208 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.equinox.http.registry">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.equinox.http.registry" id="servlets" name="Http Service Filters"/>
+      </appInfo>
+      <documentation>
+         This extension mimics and borrows the semantics of the Equinox Extended HttpService registerFilter method.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <complexType>
+         <sequence>
+            <element ref="serviceSelector" minOccurs="0" maxOccurs="1"/>
+            <element ref="filter" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="filter">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="alias"/>
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="init-param" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The equivalent of the Equinox Extended Http Service's "filter" in registerFilter. The Filter is instantiated by the Extension Point provider and must be an instance of javax.servlet.Filter
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="javax.servlet.Filter"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="alias" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The equivalent of the Equinox Extended Http Services "alias" in registerFilter.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="httpcontextId" type="string">
+            <annotation>
+               <documentation>
+                  The equivalent of the Equinox Extended Http Services httpcontext in registerFilter. The httpcontextId is matched against the "httpcontexts" extension for a matching id. If this attribute is not provided the OSGi Http Service's DefaultHttpContext semantics are used.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="load-on-startup" type="boolean">
+            <annotation>
+               <documentation>
+                  Determines if the Filter should be initialized immediately.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="init-param">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="name"/>
+         </appInfo>
+         <documentation>
+            Similar to the Servlet Specification and its deployment descriptor's init-param elements.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The initial parameter's name
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="value" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The initial parameter's value
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="serviceSelector">
+      <complexType>
+         <attribute name="filter" type="string">
+            <annotation>
+               <documentation>
+                  The serviceSelector allow filtering of the HttpService instances with which to register filters.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  If used the class must be an instance of org.osgi.framework.Filter
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.osgi.framework.Filter"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         1.1
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of the <code>filters</code> extension:
+<pre>
+     <extension
+           id="testFilter"
+           point="org.eclipse.equinox.http.registry.filters">
+        <filter
+              alias="/sp_test"
+              class="org.eclipse.equinox.http.registry.internal.TestFilter">
+           <init-param
+                 name="testParam"
+                 value="test param value">
+           </init-param>
+        </filter>
+     </extension>
+</pre>
+
+This equivalent to the Equinox Extended Http Service's registerFilter method.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Filters must be an instance of javax.servlet.Filter
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others
+<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+<br>
+Contributors:<br>
+Cognos Incorporated - initial API and implementation<br>
+IBM Corporation - bug fixes and enhancements<br>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java
index a9e66d6..5a63923 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/DefaultRegistryHttpContext.java
@@ -115,7 +115,7 @@ public class DefaultRegistryHttpContext implements HttpContext {
 			String path = resourceName.substring(0, lastSlash);
 			if (path.length() == 0)
 				path = "/"; //$NON-NLS-1$
-			String file = resourceName.substring(lastSlash + 1);
+			String file = sanitizeEntryName(resourceName.substring(lastSlash + 1));
 			Enumeration entryPaths = bundle.findEntries(path, file, false);
 
 			if (entryPaths != null && entryPaths.hasMoreElements())
@@ -124,6 +124,29 @@ public class DefaultRegistryHttpContext implements HttpContext {
 			return null;
 		}
 
+		private String sanitizeEntryName(String name) {
+			StringBuffer buffer = null;
+			for (int i = 0; i < name.length(); i++) {
+				char c = name.charAt(i);
+				switch (c) {
+					case '*' :
+					case '\\' :
+						// we need to escape '*' and '\'
+						if (buffer == null) {
+							buffer = new StringBuffer(name.length() + 16);
+							buffer.append(name.substring(0, i));
+						}
+						buffer.append('\\').append(c);
+						break;
+					default :
+						if (buffer != null)
+							buffer.append(c);
+						break;
+				}
+			}
+			return (buffer == null) ? name : buffer.toString();
+		}
+
 		public Set getResourcePaths(String path) {
 			if (bundlePath != null)
 				path = bundlePath + path;
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java
new file mode 100644
index 0000000..d20e7f9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/FilterManager.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 Cognos Incorporated, IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Cognos Incorporated - initial API and implementation
+ *     IBM Corporation - bug fixes and enhancements
+ *******************************************************************************/
+
+package org.eclipse.equinox.http.registry.internal;
+
+import java.io.IOException;
+import java.util.*;
+import javax.servlet.*;
+import javax.servlet.Filter;
+import org.eclipse.core.runtime.*;
+import org.osgi.framework.*;
+
+public class FilterManager implements ExtensionPointTracker.Listener {
+
+	private static final String FILTERS_EXTENSION_POINT = "org.eclipse.equinox.http.registry.filters"; //$NON-NLS-1$
+
+	private static final String HTTPCONTEXT_NAME = "httpcontext-name"; //$NON-NLS-1$
+
+	private static final String PARAM_VALUE = "value"; //$NON-NLS-1$
+
+	private static final String PARAM_NAME = "name"; //$NON-NLS-1$
+
+	private static final String INIT_PARAM = "init-param"; //$NON-NLS-1$
+
+	private static final String ALIAS = "alias"; //$NON-NLS-1$
+
+	private static final String LOAD_ON_STARTUP = "load-on-startup"; //$NON-NLS-1$
+
+	private static final String HTTPCONTEXT_ID = "httpcontextId"; //$NON-NLS-1$
+
+	private static final String SERVICESELECTOR = "serviceSelector"; //$NON-NLS-1$
+
+	private static final String CLASS = "class"; //$NON-NLS-1$
+
+	private static final String FILTER = "filter"; //$NON-NLS-1$
+
+	private ExtensionPointTracker tracker;
+
+	private HttpRegistryManager httpRegistryManager;
+
+	private Map registered = new HashMap();
+
+	private ServiceReference reference;
+
+	public FilterManager(HttpRegistryManager httpRegistryManager, ServiceReference reference, IExtensionRegistry registry) {
+		this.httpRegistryManager = httpRegistryManager;
+		this.reference = reference;
+		tracker = new ExtensionPointTracker(registry, FILTERS_EXTENSION_POINT, this);
+	}
+
+	public void start() {
+		tracker.open();
+	}
+
+	public void stop() {
+		tracker.close();
+	}
+
+	public void added(IExtension extension) {
+		IConfigurationElement[] elements = extension.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement serviceSelectorElement = elements[i];
+			if (!SERVICESELECTOR.equals(serviceSelectorElement.getName()))
+				continue;
+
+			org.osgi.framework.Filter serviceSelector = null;
+			String clazz = serviceSelectorElement.getAttribute(CLASS);
+			if (clazz != null) {
+				try {
+					serviceSelector = (org.osgi.framework.Filter) serviceSelectorElement.createExecutableExtension(CLASS);
+				} catch (CoreException e) {
+					// log it.
+					e.printStackTrace();
+					return;
+				}
+			} else {
+				String filter = serviceSelectorElement.getAttribute(FILTER);
+				if (filter == null)
+					return;
+
+				try {
+					serviceSelector = FrameworkUtil.createFilter(filter);
+				} catch (InvalidSyntaxException e) {
+					// log it.
+					e.printStackTrace();
+					return;
+				}
+			}
+
+			if (!serviceSelector.match(reference))
+				return;
+
+			break;
+		}
+
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement filterElement = elements[i];
+			if (!FILTER.equals(filterElement.getName()))
+				continue;
+
+			FilterWrapper wrapper = new FilterWrapper(filterElement);
+			String alias = filterElement.getAttribute(ALIAS);
+			if (alias == null)
+				continue; // alias is mandatory - ignore this.
+
+			Dictionary initparams = new Hashtable();
+			IConfigurationElement[] initParams = filterElement.getChildren(INIT_PARAM);
+			for (int j = 0; j < initParams.length; ++j) {
+				String paramName = initParams[j].getAttribute(PARAM_NAME);
+				String paramValue = initParams[j].getAttribute(PARAM_VALUE);
+				initparams.put(paramName, paramValue);
+			}
+
+			boolean loadOnStartup = new Boolean(filterElement.getAttribute(LOAD_ON_STARTUP)).booleanValue();
+			if (loadOnStartup)
+				wrapper.setLoadOnStartup();
+
+			String httpContextId = filterElement.getAttribute(HTTPCONTEXT_ID);
+			if (httpContextId == null) {
+				httpContextId = filterElement.getAttribute(HTTPCONTEXT_NAME);
+			}
+
+			if (httpContextId != null && httpContextId.indexOf('.') == -1)
+				httpContextId = filterElement.getNamespaceIdentifier() + "." + httpContextId; //$NON-NLS-1$
+
+			if (httpRegistryManager.addFilterContribution(alias, wrapper, initparams, httpContextId, extension.getContributor()))
+				registered.put(filterElement, wrapper);
+		}
+	}
+
+	public void removed(IExtension extension) {
+		IConfigurationElement[] elements = extension.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement filterElement = elements[i];
+			Filter filter = (Filter) registered.remove(filterElement);
+			if (filter != null)
+				httpRegistryManager.removeFilterContribution(filter);
+		}
+	}
+
+	private static class FilterWrapper implements Filter {
+
+		private IConfigurationElement element;
+		private Filter delegate;
+		private FilterConfig config;
+		private boolean loadOnStartup = false;
+
+		public FilterWrapper(IConfigurationElement element) {
+			this.element = element;
+		}
+
+		public void setLoadOnStartup() {
+			this.loadOnStartup = true;
+		}
+
+		public void init(FilterConfig filterConfig) throws ServletException {
+			this.config = filterConfig;
+			if (loadOnStartup)
+				initializeDelegate();
+		}
+
+		public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain chain) throws ServletException, IOException {
+			initializeDelegate();
+			delegate.doFilter(arg0, arg1, chain);
+		}
+
+		public void destroy() {
+			destroyDelegate();
+		}
+
+		private synchronized void initializeDelegate() throws ServletException {
+			if (delegate == null) {
+				try {
+					Filter newDelegate = (Filter) element.createExecutableExtension(CLASS);
+					newDelegate.init(config);
+					delegate = newDelegate;
+				} catch (CoreException e) {
+					throw new ServletException(e);
+				}
+			}
+		}
+
+		private synchronized void destroyDelegate() {
+			if (delegate != null) {
+				Filter doomedDelegate = delegate;
+				delegate = null;
+				doomedDelegate.destroy();
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
index 8d0af9a..68b73fb 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.registry/src/org/eclipse/equinox/http/registry/internal/HttpRegistryManager.java
@@ -4,15 +4,16 @@
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.http.registry.internal;
 
+import java.lang.reflect.Method;
 import java.util.*;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
+import javax.servlet.*;
+import javax.servlet.Filter;
 import org.eclipse.core.runtime.IContributor;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.osgi.framework.*;
@@ -51,6 +52,22 @@ public class HttpRegistryManager {
 		}
 	}
 
+	class FilterContribution {
+		String alias;
+		javax.servlet.Filter filter;
+		Dictionary initparams;
+		String httpContextId;
+		IContributor contributor;
+
+		public FilterContribution(String alias, javax.servlet.Filter filter, Dictionary initparams, String httpContextId, IContributor contributor) {
+			this.alias = alias;
+			this.filter = filter;
+			this.initparams = initparams;
+			this.httpContextId = httpContextId;
+			this.contributor = contributor;
+		}
+	}
+
 	class HttpContextContribution {
 		HttpContext context;
 		IContributor contributor;
@@ -63,10 +80,12 @@ public class HttpRegistryManager {
 
 	private HttpContextManager httpContextManager;
 	private ServletManager servletManager;
+	private FilterManager filterManager;
 	private ResourceManager resourceManager;
 	private HttpService httpService;
 	private PackageAdmin packageAdmin;
 	private Map contexts = new HashMap();
+	private Map filters = new HashMap();
 	private Map servlets = new HashMap();
 	private Map resources = new HashMap();
 	private Set registered = new HashSet();
@@ -76,12 +95,14 @@ public class HttpRegistryManager {
 		this.packageAdmin = packageAdmin;
 
 		httpContextManager = new HttpContextManager(this, registry);
+		filterManager = new FilterManager(this, reference, registry);
 		servletManager = new ServletManager(this, reference, registry);
 		resourceManager = new ResourceManager(this, reference, registry);
 	}
 
 	public void start() {
 		httpContextManager.start();
+		filterManager.start();
 		servletManager.start();
 		resourceManager.start();
 	}
@@ -89,12 +110,15 @@ public class HttpRegistryManager {
 	public void stop() {
 		resourceManager.stop();
 		servletManager.stop();
+		filterManager.stop();
 		httpContextManager.stop();
 	}
 
 	public synchronized boolean addResourcesContribution(String alias, String baseName, String httpContextId, IContributor contributor) {
-		if (resources.containsKey(alias) || servlets.containsKey(alias))
-			return false; // TODO: should log this
+		if (resources.containsKey(alias) || servlets.containsKey(alias)) {
+			System.err.println("ERROR: Duplicate alias. Failed to register resource for [alias=\"" + alias + "\", contributor=\"" + contributor + "\"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			return false;
+		}
 
 		ResourcesContribution contribution = new ResourcesContribution(alias, baseName, httpContextId, contributor);
 		resources.put(alias, contribution);
@@ -105,8 +129,10 @@ public class HttpRegistryManager {
 	}
 
 	public synchronized boolean addServletContribution(String alias, Servlet servlet, Dictionary initparams, String httpContextId, IContributor contributor) {
-		if (resources.containsKey(alias) || servlets.containsKey(alias))
-			return false; // TODO: should log this
+		if (resources.containsKey(alias) || servlets.containsKey(alias)) {
+			System.err.println("ERROR: Duplicate alias. Failed to register servlet for [alias=\"" + alias + "\", contributor=\"" + contributor + "\"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			return false;
+		}
 
 		ServletContribution contribution = new ServletContribution(alias, servlet, initparams, httpContextId, contributor);
 		servlets.put(alias, contribution);
@@ -122,6 +148,15 @@ public class HttpRegistryManager {
 		unregister(alias);
 	}
 
+	public synchronized boolean addFilterContribution(String alias, javax.servlet.Filter filter, Dictionary initparams, String httpContextId, IContributor contributor) {
+		FilterContribution contribution = new FilterContribution(alias, filter, initparams, httpContextId, contributor);
+		return registerFilter(contribution);
+	}
+
+	public synchronized void removeFilterContribution(Filter filter) {
+		unregisterFilter(filter);
+	}
+
 	public synchronized HttpContext getHttpContext(String httpContextId, Bundle bundle) {
 		HttpContextContribution contribution = (HttpContextContribution) contexts.get(httpContextId);
 		if (contribution == null)
@@ -137,10 +172,18 @@ public class HttpRegistryManager {
 	}
 
 	public synchronized boolean addHttpContextContribution(String httpContextId, HttpContext context, IContributor contributor) {
-		if (contexts.containsKey(httpContextId))
-			return false; // TODO: should log this
+		if (contexts.containsKey(httpContextId)) {
+			System.err.println("ERROR: Duplicate HttpContextId. Failed to register HttpContext for [httpContextId=\"" + httpContextId + "\", contributor=\"" + contributor + "\"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			return false;
+		}
 
 		contexts.put(httpContextId, new HttpContextContribution(context, contributor));
+		for (Iterator it = filters.values().iterator(); it.hasNext();) {
+			FilterContribution contribution = (FilterContribution) it.next();
+			if (httpContextId.equals(contribution.httpContextId))
+				registerFilter(contribution);
+		}
+
 		for (Iterator it = resources.values().iterator(); it.hasNext();) {
 			ResourcesContribution contribution = (ResourcesContribution) it.next();
 			if (httpContextId.equals(contribution.httpContextId))
@@ -245,6 +288,37 @@ public class HttpRegistryManager {
 		}
 	}
 
+	private boolean registerFilter(FilterContribution contribution) {
+		HttpContext context = getHttpContext(contribution.httpContextId, contribution.contributor);
+		if (context == null)
+			return false;
+		try {
+			Method registerFilterMethod = httpService.getClass().getMethod("registerFilter", new Class[] {String.class, Filter.class, Dictionary.class, HttpContext.class}); //$NON-NLS-1$
+			registerFilterMethod.invoke(httpService, new Object[] {contribution.alias, contribution.filter, contribution.initparams, context});
+			return true;
+		} catch (NoSuchMethodException t) {
+			// TODO: should log this
+			// for now ignore
+		} catch (Throwable t) {
+			// TODO: should log this
+			t.printStackTrace();
+		}
+		return false;
+	}
+
+	private void unregisterFilter(Filter filter) {
+		try {
+			Method unregisterFilterMethod = httpService.getClass().getMethod("unregisterFilter", new Class[] {Filter.class}); //$NON-NLS-1$
+			unregisterFilterMethod.invoke(httpService, new Object[] {filter});
+		} catch (NoSuchMethodException t) {
+			// TODO: should log this
+			// for now ignore
+		} catch (Throwable t) {
+			// TODO: should log this
+			t.printStackTrace();
+		}
+	}
+
 	private HttpContext getHttpContext(String httpContextId, IContributor contributor) {
 		if (httpContextId == null) {
 			DefaultRegistryHttpContext defaultContext = createDefaultRegistryHttpContext();
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/.settings/.api_filters b/eclipse/plugins/org.eclipse.equinox.http.servlet/.settings/.api_filters
new file mode 100644
index 0000000..e2bd715
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.equinox.http.servlet" version="2">
+    <resource path="src/org/eclipse/equinox/http/servlet/HttpServiceServlet.java" type="org.eclipse.equinox.http.servlet.HttpServiceServlet">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="ProxyServlet"/>
+                <message_argument value="HttpServiceServlet"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
index dabe0f1..cbcf911 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
@@ -3,12 +3,12 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.http.servlet
-Bundle-Version: 1.0.200.qualifier
+Bundle-Version: 1.1.0.qualifier
 Bundle-Activator: org.eclipse.equinox.http.servlet.internal.Activator
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
  J2SE-1.3
-Export-Package: org.eclipse.equinox.http.servlet;version="1.0.0"
+Export-Package: org.eclipse.equinox.http.servlet;version="1.1.0"
 Import-Package: javax.servlet;version="2.3",
  javax.servlet.http;version="2.3",
  org.osgi.framework;version="1.3.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/ExtendedHttpService.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/ExtendedHttpService.java
new file mode 100644
index 0000000..d270f7e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/ExtendedHttpService.java
@@ -0,0 +1,55 @@
+package org.eclipse.equinox.http.servlet;
+
+import java.util.Dictionary;
+import javax.servlet.Filter;
+import javax.servlet.ServletException;
+import org.osgi.service.http.*;
+
+/**
+ * @since 1.1
+ */
+public interface ExtendedHttpService extends HttpService {
+	/**
+	 * @param alias name in the URI namespace at which the filter is registered
+	 * @param filter the filter object to register
+	 * @param initparams initialization arguments for the filter or
+	 *        <code>null</code> if there are none. This argument is used by the
+	 *        filter's <code>FilterConfig</code> object.
+	 * @param context the <code>HttpContext</code> object for the registered
+	 *        filter, or <code>null</code> if a default <code>HttpContext</code> is
+	 *        to be created and used.
+	 * @throws javax.servlet.ServletException if the filter's <code>init</code>
+	 *            method throws an exception, or the given filter object has
+	 *            already been registered at a different alias.
+	 * @throws java.lang.IllegalArgumentException if any of the arguments are
+	 *            invalid
+	 */
+	public void registerFilter(String alias, Filter filter, Dictionary initparams, HttpContext context) throws ServletException, NamespaceException;
+
+	/**
+	 * Unregisters a previous filter registration done by the 
+	 * <code>registerFilter</code> method.
+	 * 
+	 * <p>
+	 * After this call, the registered filter will no
+	 * longer be available. The Http Service must call the <code>destroy</code>
+	 * method of the filter before returning.
+	 * <p>
+	 * If the bundle which performed the registration is stopped or otherwise
+	 * "unget"s the Http Service without calling {@link #unregisterFilter} then the Http
+	 * Service must automatically unregister the filter registration. However, the 
+	 * <code>destroy</code> method of the filter will not be called in this case since
+	 * the bundle may be stopped.
+	 * {@link #unregisterFilter} must be explicitly called to cause the
+	 * <code>destroy</code> method of the filter to be called. This can be done
+	 * in the <code>BundleActivator.stop</code> method of the
+	 * bundle registering the filter.
+	 * 
+	 * @param filter the filter object to unregister
+	 * @throws java.lang.IllegalArgumentException if there is no registration
+	 *            for the filter or the calling bundle was not the bundle which
+	 *            registered the filter.
+	 */
+	public void unregisterFilter(Filter filter);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Activator.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Activator.java
index 7c61280..25f8aee 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Activator.java
@@ -14,6 +14,7 @@ package org.eclipse.equinox.http.servlet.internal;
 
 import java.util.*;
 import javax.servlet.ServletConfig;
+import org.eclipse.equinox.http.servlet.ExtendedHttpService;
 import org.osgi.framework.*;
 import org.osgi.service.http.HttpService;
 
@@ -21,16 +22,17 @@ public class Activator implements BundleActivator {
 
 	private static final String DEFAULT_SERVICE_DESCRIPTION = "Equinox Servlet Bridge"; //$NON-NLS-1$
 	private static final String DEFAULT_SERVICE_VENDOR = "Eclipse.org"; //$NON-NLS-1$
+	private static final String[] HTTP_SERVICES_CLASSES = new String[] {HttpService.class.getName(), ExtendedHttpService.class.getName()};
 
 	private static BundleContext context;
 	private static Map serviceRegistrations = new HashMap();
 
-	public void start(BundleContext context) throws Exception {
-		startHttpServiceProxy(context);
+	public void start(BundleContext bundleContext) throws Exception {
+		startHttpServiceProxy(bundleContext);
 	}
 
-	public void stop(BundleContext context) throws Exception {
-		stopHttpServiceProxy(context);
+	public void stop(BundleContext bundleContext) throws Exception {
+		stopHttpServiceProxy(bundleContext);
 	}
 
 	private static synchronized void startHttpServiceProxy(BundleContext bundleContext) {
@@ -75,7 +77,7 @@ public class Activator implements BundleActivator {
 		if (serviceProperties.get(Constants.SERVICE_DESCRIPTION) == null)
 			serviceProperties.put(Constants.SERVICE_DESCRIPTION, DEFAULT_SERVICE_DESCRIPTION);
 
-		return context.registerService(HttpService.class.getName(), factory, serviceProperties);
+		return context.registerService(HTTP_SERVICES_CLASSES, factory, serviceProperties);
 	}
 
 	static synchronized void removeProxyServlet(ProxyServlet proxyServlet) {
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterChainImpl.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterChainImpl.java
new file mode 100644
index 0000000..49b5062
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterChainImpl.java
@@ -0,0 +1,30 @@
+package org.eclipse.equinox.http.servlet.internal;
+
+import java.io.IOException;
+import java.util.List;
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class FilterChainImpl implements FilterChain {
+
+	private List matchingFilterRegistrations;
+	private ServletRegistration registration;
+	private int filterIndex = 0;
+	private int filterCount;
+
+	public FilterChainImpl(List matchingFilterRegistrations, ServletRegistration registration) {
+		this.matchingFilterRegistrations = matchingFilterRegistrations;
+		this.registration = registration;
+		this.filterCount = matchingFilterRegistrations.size();
+	}
+
+	public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
+		if (filterIndex < filterCount) {
+			FilterRegistration filterRegistration = (FilterRegistration) matchingFilterRegistrations.get(filterIndex++);
+			filterRegistration.doFilter((HttpServletRequest) request, (HttpServletResponse) response, this);
+			return;
+		}
+		registration.service((HttpServletRequest) request, (HttpServletResponse) response);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterConfigImpl.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterConfigImpl.java
new file mode 100644
index 0000000..388b780
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterConfigImpl.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.http.servlet.internal;
+
+import java.util.*;
+import javax.servlet.*;
+
+public class FilterConfigImpl implements FilterConfig {
+
+	private static final Dictionary EMPTY_PARAMS = new Hashtable(0);
+	private static final String FILTER_NAME = "filter-name"; //$NON-NLS-1$
+	private Filter filter;
+	private Dictionary initparams;
+	private ServletContext servletContext;
+
+	public FilterConfigImpl(Filter filter, Dictionary initparams, ServletContext servletContext) {
+		this.filter = filter;
+		this.initparams = (initparams != null) ? initparams : EMPTY_PARAMS;
+		this.servletContext = servletContext;
+	}
+
+	/*
+	 * @see javax.servlet.FilterConfig#getFilterName()
+	 * 
+	 * The OSGi Http Service does not specify a way to set a filter name at the API level. This 
+	 * implementation will try to use the value of the "filter-name" initial parameter if available.
+	 */
+	public String getFilterName() {
+		String filterName = (String) initparams.get(FILTER_NAME);
+		return (filterName != null) ? filterName : filter.getClass().getName();
+	}
+
+	public ServletContext getServletContext() {
+		return servletContext;
+	}
+
+	public String getInitParameter(String name) {
+		return (String) initparams.get(name);
+	}
+
+	public Enumeration getInitParameterNames() {
+		return initparams.keys();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterRegistration.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterRegistration.java
new file mode 100644
index 0000000..0faa00d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/FilterRegistration.java
@@ -0,0 +1,112 @@
+package org.eclipse.equinox.http.servlet.internal;
+
+import java.io.IOException;
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.osgi.service.http.HttpContext;
+
+//This class wraps the filter object registered in the HttpService.registerFilter call, to manage the context classloader when handleRequests are being asked.
+public class FilterRegistration extends Registration implements Comparable {
+
+	private static long nextSequenceNumber = 1L;
+
+	private final Filter filter; //The actual filter object registered against the http service. All filter requests will eventually be delegated to it.
+	private final HttpContext httpContext; //The context used during the registration of the filter
+	private final ClassLoader registeredContextClassLoader;
+	private final String prefix;
+	private final String suffix;
+	private final int priority;
+	private final long sequenceNumber;
+
+	public FilterRegistration(Filter filter, HttpContext context, String alias, int priority) {
+		this.filter = filter;
+		this.httpContext = context;
+		registeredContextClassLoader = Thread.currentThread().getContextClassLoader();
+
+		int lastSlash = alias.lastIndexOf('/');
+		String lastSegment = alias.substring(alias.lastIndexOf('/') + 1);
+		if (lastSegment.startsWith("*.")) { //$NON-NLS-1$
+			prefix = alias.substring(0, lastSlash);
+			suffix = lastSegment.substring(1);
+		} else {
+			prefix = alias.equals("/") ? "" : alias; //$NON-NLS-1$//$NON-NLS-2$
+			suffix = null;
+		}
+
+		this.priority = priority;
+		synchronized (FilterRegistration.class) {
+			this.sequenceNumber = nextSequenceNumber++;
+		}
+	}
+
+	public void destroy() {
+		ClassLoader original = Thread.currentThread().getContextClassLoader();
+		try {
+			Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
+			super.destroy();
+			filter.destroy();
+		} finally {
+			Thread.currentThread().setContextClassLoader(original);
+		}
+	}
+
+	//Delegate the init call to the actual filter
+	public void init(FilterConfig filterConfig) throws ServletException {
+		ClassLoader original = Thread.currentThread().getContextClassLoader();
+		try {
+			Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
+			filter.init(filterConfig);
+		} finally {
+			Thread.currentThread().setContextClassLoader(original);
+		}
+	}
+
+	//Delegate the handling of the request to the actual filter
+	public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
+		ClassLoader original = Thread.currentThread().getContextClassLoader();
+		try {
+			Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
+			if (httpContext.handleSecurity(request, response))
+				filter.doFilter(request, response, chain);
+		} finally {
+			Thread.currentThread().setContextClassLoader(original);
+		}
+	}
+
+	public Filter getFilter() {
+		return filter;
+	}
+
+	public HttpContext getHttpContext() {
+		return httpContext;
+	}
+
+	public boolean matches(String dispatchPathInfo) {
+		if (!dispatchPathInfo.startsWith(prefix))
+			return false;
+
+		// perfect match
+		if (prefix.length() == dispatchPathInfo.length())
+			return suffix == null;
+
+		// check the next character is a path separator
+		if (dispatchPathInfo.charAt(prefix.length()) != '/')
+			return false;
+
+		// check for an extension match
+		if (suffix == null)
+			return true;
+
+		return dispatchPathInfo.endsWith(suffix) && dispatchPathInfo.length() > prefix.length() + suffix.length();
+	}
+
+	public int compareTo(Object other) {
+		FilterRegistration otherFilterRegistration = (FilterRegistration) other;
+		int priorityDifference = priority - otherFilterRegistration.priority;
+		if (priorityDifference != 0)
+			return -priorityDifference;
+
+		return (sequenceNumber > otherFilterRegistration.sequenceNumber) ? 1 : -1;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceFactory.java
index d5b1263..3e147a4 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceFactory.java
@@ -28,7 +28,7 @@ public class HttpServiceFactory implements ServiceFactory {
 	}
 
 	public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
-		((HttpServiceImpl) service).unregisterAliases();
+		((HttpServiceImpl) service).shutdown();
 
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java
index 9991cab..0d99739 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/HttpServiceImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2010 Cognos Incorporated, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,18 +13,19 @@
 package org.eclipse.equinox.http.servlet.internal;
 
 import java.util.*;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
+import javax.servlet.*;
+import org.eclipse.equinox.http.servlet.ExtendedHttpService;
 import org.osgi.framework.Bundle;
 import org.osgi.service.http.*;
 
-public class HttpServiceImpl implements HttpService {
+public class HttpServiceImpl implements HttpService, ExtendedHttpService {
 
 	private Bundle bundle; //The bundle associated with this instance of http service
 
 	private ProxyServlet proxy; //The proxy that does the dispatching of the incoming requests
 
 	private Set aliases = new HashSet(); //Aliases registered against this particular instance of the service
+	private Set filters = new HashSet(); //Filters registered against this particular instance of the service
 
 	private boolean shutdown = false; // We prevent use of this instance if HttpServiceFactory.ungetService has called unregisterAliases.
 
@@ -34,18 +35,24 @@ public class HttpServiceImpl implements HttpService {
 	}
 
 	//Clean up method
-	synchronized void unregisterAliases() {
+	synchronized void shutdown() {
 		for (Iterator it = aliases.iterator(); it.hasNext();) {
 			String alias = (String) it.next();
 			proxy.unregister(alias, false);
 		}
 		aliases.clear();
+
+		for (Iterator it = filters.iterator(); it.hasNext();) {
+			Filter filter = (Filter) it.next();
+			proxy.unregisterFilter(filter, false);
+		}
+		filters.clear();
 		shutdown = true;
 	}
 
 	private void checkShutdown() {
 		if (shutdown)
-			throw new IllegalStateException("Service instance is already shutdown");
+			throw new IllegalStateException("Service instance is already shutdown"); //$NON-NLS-1$
 	}
 
 	/**
@@ -56,7 +63,7 @@ public class HttpServiceImpl implements HttpService {
 		if (context == null) {
 			context = createDefaultHttpContext();
 		}
-		proxy.registerServlet(alias, servlet, initparams, context, bundle);
+		proxy.registerServlet(alias, servlet, initparams, context);
 		aliases.add(alias);
 	}
 
@@ -80,16 +87,33 @@ public class HttpServiceImpl implements HttpService {
 		if (aliases.remove(alias)) {
 			proxy.unregister(alias, true);
 		} else {
-			// TODO perhaps this is too strong a reaction ?
-			throw new IllegalArgumentException("Alias not found."); //$NON-NLS-1$
+			throw new IllegalArgumentException("Alias not found: " + alias); //$NON-NLS-1$
 		}
 	}
 
 	/**
 	 * @see HttpService#createDefaultHttpContext()
 	 */
-	public HttpContext createDefaultHttpContext() {
+	public synchronized HttpContext createDefaultHttpContext() {
 		checkShutdown();
 		return new DefaultHttpContext(bundle);
 	}
+
+	public void registerFilter(String alias, Filter filter, Dictionary initparams, HttpContext context) throws ServletException {
+		checkShutdown();
+		if (context == null) {
+			context = createDefaultHttpContext();
+		}
+		proxy.registerFilter(alias, filter, initparams, context);
+		filters.add(filter);
+	}
+
+	public void unregisterFilter(Filter filter) {
+		checkShutdown();
+		if (filters.remove(filter)) {
+			proxy.unregisterFilter(filter, true);
+		} else {
+			throw new IllegalArgumentException("Filter not found."); //$NON-NLS-1$
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ProxyServlet.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ProxyServlet.java
index c5a6e2c..dae31f9 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ProxyServlet.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ProxyServlet.java
@@ -16,7 +16,6 @@ import java.security.AccessController;
 import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
-import org.osgi.framework.Bundle;
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.NamespaceException;
 
@@ -29,8 +28,10 @@ import org.osgi.service.http.NamespaceException;
 public class ProxyServlet extends HttpServlet {
 
 	private static final long serialVersionUID = 4117456123807468871L;
-	private Map registrations = new HashMap(); //alias --> registration
-	private Set servlets = new HashSet(); //All the servlets objects that have been registered 
+	private Map servletRegistrations = new HashMap(); //alias --> servlet registration
+	private Set registeredServlets = new HashSet(); //All the servlets objects that have been registered 
+
+	private Map filterRegistrations = new HashMap(); //filter --> filter registration;
 	private ProxyContext proxyContext;
 
 	public void init(ServletConfig config) throws ServletException {
@@ -79,7 +80,7 @@ public class ProxyServlet extends HttpServlet {
 
 	private String findExtensionAlias(String alias) {
 		String lastSegment = alias.substring(alias.lastIndexOf('/') + 1);
-		int dot = lastSegment.indexOf('.');
+		int dot = lastSegment.lastIndexOf('.');
 		if (dot == -1)
 			return null;
 		String extension = lastSegment.substring(dot + 1);
@@ -89,65 +90,109 @@ public class ProxyServlet extends HttpServlet {
 	}
 
 	private boolean processAlias(HttpServletRequest req, HttpServletResponse resp, String alias, String extensionAlias) throws ServletException, IOException {
-		Registration registration = null;
+		ServletRegistration registration = null;
+		List matchingFilterRegistrations = Collections.EMPTY_LIST;
+		String dispatchPathInfo = HttpServletRequestAdaptor.getDispatchPathInfo(req);
 		synchronized (this) {
 			if (extensionAlias == null)
-				registration = (Registration) registrations.get(alias);
+				registration = (ServletRegistration) servletRegistrations.get(alias);
 			else {
-				registration = (Registration) registrations.get(alias + extensionAlias);
+				registration = (ServletRegistration) servletRegistrations.get(alias + extensionAlias);
 				if (registration != null) {
-					// for ServletRegistrations extensions should be handled on the full alias
-					if (registration instanceof ServletRegistration)
+					// for regular ServletRegistrations extensions should be handled on the full alias
+					if (!(registration.getServlet() instanceof ResourceServlet))
 						alias = HttpServletRequestAdaptor.getDispatchPathInfo(req);
 				} else
-					registration = (Registration) registrations.get(alias);
+					registration = (ServletRegistration) servletRegistrations.get(alias);
 			}
-
-			if (registration != null)
+			if (registration != null) {
 				registration.addReference();
+				if (!filterRegistrations.isEmpty()) {
+					matchingFilterRegistrations = new ArrayList();
+					for (Iterator it = filterRegistrations.values().iterator(); it.hasNext();) {
+						FilterRegistration filterRegistration = (FilterRegistration) it.next();
+						if (filterRegistration.matches(dispatchPathInfo)) {
+							matchingFilterRegistrations.add(filterRegistration);
+							filterRegistration.addReference();
+						}
+					}
+				}
+			}
 		}
 		if (registration != null) {
 			try {
-				if (registration.handleRequest(req, resp, alias))
-					return true;
+				HttpServletRequest wrappedRequest = new HttpServletRequestAdaptor(req, alias, registration.getServlet());
+				if (matchingFilterRegistrations.isEmpty()) {
+					registration.service(wrappedRequest, resp);
+				} else {
+					Collections.sort(matchingFilterRegistrations);
+					FilterChain chain = new FilterChainImpl(matchingFilterRegistrations, registration);
+					chain.doFilter(wrappedRequest, resp);
+				}
 			} finally {
 				registration.removeReference();
+				for (Iterator it = matchingFilterRegistrations.iterator(); it.hasNext();) {
+					FilterRegistration filterRegistration = (FilterRegistration) it.next();
+					filterRegistration.removeReference();
+				}
 			}
+			return true;
 		}
 		return false;
 	}
 
 	//Effective unregistration of servlet and resources as defined in HttpService#unregister()
 	synchronized void unregister(String alias, boolean destroy) {
-		Registration removedRegistration = (Registration) registrations.remove(alias);
+		ServletRegistration removedRegistration = (ServletRegistration) servletRegistrations.remove(alias);
 		if (removedRegistration != null) {
-			if (destroy)
-				removedRegistration.destroy();
-			removedRegistration.close();
+			registeredServlets.remove(removedRegistration.getServlet());
+			try {
+				if (destroy)
+					removedRegistration.destroy();
+			} finally {
+				proxyContext.destroyContextAttributes(removedRegistration.getHttpContext());
+			}
 		}
 	}
 
 	//Effective registration of the servlet as defined HttpService#registerServlet()  
-	synchronized void registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context, Bundle bundle) throws ServletException, NamespaceException {
+	synchronized void registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext httpContext) throws ServletException, NamespaceException {
 		checkAlias(alias);
+		if (servletRegistrations.containsKey(alias))
+			throw new NamespaceException("The alias '" + alias + "' is already in use."); //$NON-NLS-1$//$NON-NLS-2$
+
 		if (servlet == null)
 			throw new IllegalArgumentException("Servlet cannot be null"); //$NON-NLS-1$
 
-		ServletRegistration registration = new ServletRegistration(servlet, proxyContext, context, bundle, servlets);
-		registration.checkServletRegistration();
+		if (registeredServlets.contains(servlet))
+			throw new ServletException("This servlet has already been registered."); //$NON-NLS-1$
 
-		ServletContext wrappedServletContext = new ServletContextAdaptor(proxyContext, getServletContext(), context, AccessController.getContext());
+		ServletRegistration registration = new ServletRegistration(servlet, httpContext);
+		ServletContext wrappedServletContext = new ServletContextAdaptor(proxyContext, getServletContext(), httpContext, AccessController.getContext());
 		ServletConfig servletConfig = new ServletConfigImpl(servlet, initparams, wrappedServletContext);
 
-		registration.init(servletConfig);
-		registrations.put(alias, registration);
+		boolean initialized = false;
+		proxyContext.createContextAttributes(httpContext);
+		try {
+			registration.init(servletConfig);
+			initialized = true;
+		} finally {
+			if (!initialized)
+				proxyContext.destroyContextAttributes(httpContext);
+		}
+		registeredServlets.add(servlet);
+		servletRegistrations.put(alias, registration);
 	}
 
 	//Effective registration of the resources as defined HttpService#registerResources()  
-	synchronized void registerResources(String alias, String name, HttpContext context) throws NamespaceException {
-		checkAlias(alias);
+	synchronized void registerResources(String alias, String name, HttpContext httpContext) throws NamespaceException {
 		checkName(name);
-		registrations.put(alias, new ResourceRegistration(name, context, getServletContext(), AccessController.getContext()));
+		Servlet resourceServlet = new ResourceServlet(name, httpContext, AccessController.getContext());
+		try {
+			registerServlet(alias, resourceServlet, null, httpContext);
+		} catch (ServletException e) {
+			throw new IllegalStateException("Unexpected ServletException throw when registering resources at alias " + alias + "."); //$NON-NLS-1$//$NON-NLS-2$
+		}
 	}
 
 	private void checkName(String name) {
@@ -158,14 +203,65 @@ public class ProxyServlet extends HttpServlet {
 			throw new IllegalArgumentException("Invalid Name '" + name + "'"); //$NON-NLS-1$//$NON-NLS-2$		
 	}
 
-	private void checkAlias(String alias) throws NamespaceException {
+	private void checkAlias(String alias) {
 		if (alias == null)
 			throw new IllegalArgumentException("Alias cannot be null"); //$NON-NLS-1$
 
 		if (!alias.startsWith("/") || (alias.endsWith("/") && !alias.equals("/"))) //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
 			throw new IllegalArgumentException("Invalid alias '" + alias + "'"); //$NON-NLS-1$//$NON-NLS-2$
+	}
 
-		if (registrations.containsKey(alias))
-			throw new NamespaceException("The alias '" + alias + "' is already in use."); //$NON-NLS-1$//$NON-NLS-2$
+	public synchronized void unregisterFilter(Filter filter, boolean destroy) {
+		FilterRegistration removedRegistration = (FilterRegistration) filterRegistrations.remove(filter);
+		if (removedRegistration != null) {
+			try {
+				if (destroy)
+					removedRegistration.destroy();
+			} finally {
+				proxyContext.destroyContextAttributes(removedRegistration.getHttpContext());
+			}
+		}
+	}
+
+	public synchronized void registerFilter(String alias, Filter filter, Dictionary initparams, HttpContext httpContext) throws ServletException {
+		checkAlias(alias);
+		if (filter == null)
+			throw new IllegalArgumentException("Filter cannot be null"); //$NON-NLS-1$
+
+		if (filterRegistrations.containsKey(filter))
+			throw new ServletException("This filter has already been registered."); //$NON-NLS-1$
+
+		int filterPriority = findFilterPriority(initparams);
+		FilterRegistration registration = new FilterRegistration(filter, httpContext, alias, filterPriority);
+		ServletContext wrappedServletContext = new ServletContextAdaptor(proxyContext, getServletContext(), httpContext, AccessController.getContext());
+		FilterConfig filterConfig = new FilterConfigImpl(filter, initparams, wrappedServletContext);
+
+		boolean initialized = false;
+		proxyContext.createContextAttributes(httpContext);
+		try {
+			registration.init(filterConfig);
+			initialized = true;
+		} finally {
+			if (!initialized)
+				proxyContext.destroyContextAttributes(httpContext);
+		}
+		filterRegistrations.put(filter, registration);
+	}
+
+	private int findFilterPriority(Dictionary initparams) {
+		if (initparams == null)
+			return 0;
+		String filterPriority = (String) initparams.get("filter-priority"); //$NON-NLS-1$
+		if (filterPriority == null)
+			return 0;
+
+		try {
+			int result = Integer.parseInt(filterPriority);
+			if (result >= -1000 && result <= 1000)
+				return result;
+		} catch (NumberFormatException e) {
+			// fall through
+		}
+		throw new IllegalArgumentException("filter-priority must be an integer between -1000 and 1000 but was: " + filterPriority); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Registration.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Registration.java
index 3678237..155346a 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Registration.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/Registration.java
@@ -11,11 +11,6 @@
  *******************************************************************************/
 package org.eclipse.equinox.http.servlet.internal;
 
-import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 public abstract class Registration {
 
 	protected int referenceCount;
@@ -47,11 +42,4 @@ public abstract class Registration {
 				Thread.currentThread().interrupt(); //restore the interrupted state
 		}
 	}
-
-	public abstract boolean handleRequest(HttpServletRequest req, HttpServletResponse resp, String alias) throws IOException, ServletException;
-
-	public void close() {
-		// do nothing
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceRegistration.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceRegistration.java
deleted file mode 100644
index 28bead6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceRegistration.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 Cognos Incorporated, IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     Cognos Incorporated - initial API and implementation
- *     IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.http.servlet.internal;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.security.*;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-public class ResourceRegistration extends Registration {
-	private static final String LAST_MODIFIED = "Last-Modified"; //$NON-NLS-1$
-	private static final String IF_MODIFIED_SINCE = "If-Modified-Since"; //$NON-NLS-1$
-	private static final String IF_NONE_MATCH = "If-None-Match"; //$NON-NLS-1$
-	private static final String ETAG = "ETag"; //$NON-NLS-1$
-
-	private String internalName;
-	HttpContext httpContext;
-	ServletContext servletContext;
-	private AccessControlContext acc;
-
-	public ResourceRegistration(String internalName, HttpContext context, ServletContext servletContext, AccessControlContext acc) {
-		this.internalName = internalName;
-		if (internalName.equals("/")) { //$NON-NLS-1$
-			this.internalName = ""; //$NON-NLS-1$
-		}
-		this.httpContext = context;
-		this.servletContext = servletContext;
-		this.acc = acc;
-	}
-
-	public boolean handleRequest(HttpServletRequest req, final HttpServletResponse resp, String alias) throws IOException {
-		if (httpContext.handleSecurity(req, resp)) {
-
-			String method = req.getMethod();
-			if (method.equals("GET") || method.equals("POST") || method.equals("HEAD")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-
-				String pathInfo = HttpServletRequestAdaptor.getDispatchPathInfo(req);
-				int aliasLength = alias.equals("/") ? 0 : alias.length(); //$NON-NLS-1$
-				String resourcePath = internalName + pathInfo.substring(aliasLength);
-				URL resourceURL = httpContext.getResource(resourcePath);
-				if (resourceURL == null)
-					return false;
-
-				return writeResource(req, resp, resourcePath, resourceURL);
-			}
-			resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
-		}
-		return true;
-	}
-
-	private boolean writeResource(final HttpServletRequest req, final HttpServletResponse resp, final String resourcePath, final URL resourceURL) throws IOException {
-		Boolean result = Boolean.TRUE;
-		try {
-			result = (Boolean) AccessController.doPrivileged(new PrivilegedExceptionAction() {
-
-				public Object run() throws Exception {
-					URLConnection connection = resourceURL.openConnection();
-					long lastModified = connection.getLastModified();
-					int contentLength = connection.getContentLength();
-
-					String etag = null;
-					if (lastModified != -1 && contentLength != -1)
-						etag = "W/\"" + contentLength + "-" + lastModified + "\""; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
-					// Check for cache revalidation.
-					// We should prefer ETag validation as the guarantees are stronger and all HTTP 1.1 clients should be using it
-					String ifNoneMatch = req.getHeader(IF_NONE_MATCH);
-					if (ifNoneMatch != null && etag != null && ifNoneMatch.indexOf(etag) != -1) {
-						resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
-						return Boolean.TRUE;
-					}
-
-					long ifModifiedSince = req.getDateHeader(IF_MODIFIED_SINCE);
-					// for purposes of comparison we add 999 to ifModifiedSince since the fidelity
-					// of the IMS header generally doesn't include milli-seconds
-					if (ifModifiedSince > -1 && lastModified > 0 && lastModified <= (ifModifiedSince + 999)) {
-						resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
-						return Boolean.TRUE;
-					}
-
-					// return the full contents regularly
-					if (contentLength != -1)
-						resp.setContentLength(contentLength);
-
-					String contentType = httpContext.getMimeType(resourcePath);
-					if (contentType == null)
-						contentType = servletContext.getMimeType(resourcePath);
-
-					if (contentType != null)
-						resp.setContentType(contentType);
-
-					if (lastModified > 0)
-						resp.setDateHeader(LAST_MODIFIED, lastModified);
-
-					if (etag != null)
-						resp.setHeader(ETAG, etag);
-
-					if (contentLength != 0) {
-						// open the input stream
-						InputStream is = null;
-						try {
-							is = connection.getInputStream();
-							// write the resource
-							try {
-								OutputStream os = resp.getOutputStream();
-								int writtenContentLength = writeResourceToOutputStream(is, os);
-								if (contentLength == -1 || contentLength != writtenContentLength)
-									resp.setContentLength(writtenContentLength);
-							} catch (IllegalStateException e) { // can occur if the response output is already open as a Writer
-								Writer writer = resp.getWriter();
-								writeResourceToWriter(is, writer);
-								// Since ContentLength is a measure of the number of bytes contained in the body
-								// of a message when we use a Writer we lose control of the exact byte count and
-								// defer the problem to the Servlet Engine's Writer implementation.
-							}
-						} catch (FileNotFoundException e) {
-							// FileNotFoundException may indicate the following scenarios
-							// - url is a directory
-							// - url is not accessible
-							sendError(resp, HttpServletResponse.SC_FORBIDDEN);
-						} catch (SecurityException e) {
-							// SecurityException may indicate the following scenarios
-							// - url is not accessible
-							sendError(resp, HttpServletResponse.SC_FORBIDDEN);
-						} finally {
-							if (is != null)
-								try {
-									is.close();
-								} catch (IOException e) {
-									// ignore
-								}
-						}
-					}
-					return Boolean.TRUE;
-				}
-			}, acc);
-		} catch (PrivilegedActionException e) {
-			throw (IOException) e.getException();
-		}
-		return result.booleanValue();
-	}
-
-	void sendError(final HttpServletResponse resp, int sc) throws IOException {
-
-		try {
-			// we need to reset headers for 302 and 403
-			resp.reset();
-			resp.sendError(sc);
-		} catch (IllegalStateException e) {
-			// this could happen if the response has already been committed
-		}
-	}
-
-	int writeResourceToOutputStream(InputStream is, OutputStream os) throws IOException {
-		byte[] buffer = new byte[8192];
-		int bytesRead = is.read(buffer);
-		int writtenContentLength = 0;
-		while (bytesRead != -1) {
-			os.write(buffer, 0, bytesRead);
-			writtenContentLength += bytesRead;
-			bytesRead = is.read(buffer);
-		}
-		return writtenContentLength;
-	}
-
-	void writeResourceToWriter(InputStream is, Writer writer) throws IOException {
-		Reader reader = new InputStreamReader(is);
-		try {
-			char[] buffer = new char[8192];
-			int charsRead = reader.read(buffer);
-			while (charsRead != -1) {
-				writer.write(buffer, 0, charsRead);
-				charsRead = reader.read(buffer);
-			}
-		} finally {
-			if (reader != null) {
-				reader.close(); // will also close input stream
-			}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceServlet.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceServlet.java
new file mode 100644
index 0000000..fa1ab23
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ResourceServlet.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2005-2007 Cognos Incorporated, IBM Corporation and others
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Cognos Incorporated - initial API and implementation
+ *     IBM Corporation - bug fixes and enhancements
+ *******************************************************************************/
+package org.eclipse.equinox.http.servlet.internal;
+
+import java.io.*;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.*;
+import javax.servlet.http.*;
+import org.osgi.service.http.HttpContext;
+
+public class ResourceServlet extends HttpServlet {
+	private static final long serialVersionUID = 3586876493076122102L;
+	private static final String LAST_MODIFIED = "Last-Modified"; //$NON-NLS-1$
+	private static final String IF_MODIFIED_SINCE = "If-Modified-Since"; //$NON-NLS-1$
+	private static final String IF_NONE_MATCH = "If-None-Match"; //$NON-NLS-1$
+	private static final String ETAG = "ETag"; //$NON-NLS-1$
+
+	private String internalName;
+	HttpContext httpContext;
+	private AccessControlContext acc;
+
+	public ResourceServlet(String internalName, HttpContext context, AccessControlContext acc) {
+		this.internalName = internalName;
+		if (internalName.equals("/")) { //$NON-NLS-1$
+			this.internalName = ""; //$NON-NLS-1$
+		}
+		this.httpContext = context;
+		this.acc = acc;
+	}
+
+	public void service(HttpServletRequest req, final HttpServletResponse resp) throws IOException {
+		String method = req.getMethod();
+		if (method.equals("GET") || method.equals("POST") || method.equals("HEAD")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+			String pathInfo = HttpServletRequestAdaptor.getDispatchPathInfo(req);
+			if (pathInfo == null)
+				pathInfo = ""; //$NON-NLS-1$
+			String resourcePath = internalName + pathInfo;
+			URL resourceURL = httpContext.getResource(resourcePath);
+			if (resourceURL != null)
+				writeResource(req, resp, resourcePath, resourceURL);
+			else
+				resp.sendError(HttpServletResponse.SC_NOT_FOUND, "ProxyServlet: " + req.getRequestURI()); //$NON-NLS-1$
+		} else {
+			resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
+		}
+	}
+
+	private void writeResource(final HttpServletRequest req, final HttpServletResponse resp, final String resourcePath, final URL resourceURL) throws IOException {
+		try {
+			AccessController.doPrivileged(new PrivilegedExceptionAction() {
+
+				public Object run() throws Exception {
+					URLConnection connection = resourceURL.openConnection();
+					long lastModified = connection.getLastModified();
+					int contentLength = connection.getContentLength();
+
+					String etag = null;
+					if (lastModified != -1 && contentLength != -1)
+						etag = "W/\"" + contentLength + "-" + lastModified + "\""; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+					// Check for cache revalidation.
+					// We should prefer ETag validation as the guarantees are stronger and all HTTP 1.1 clients should be using it
+					String ifNoneMatch = req.getHeader(IF_NONE_MATCH);
+					if (ifNoneMatch != null && etag != null && ifNoneMatch.indexOf(etag) != -1) {
+						resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+						return Boolean.TRUE;
+					}
+
+					long ifModifiedSince = req.getDateHeader(IF_MODIFIED_SINCE);
+					// for purposes of comparison we add 999 to ifModifiedSince since the fidelity
+					// of the IMS header generally doesn't include milli-seconds
+					if (ifModifiedSince > -1 && lastModified > 0 && lastModified <= (ifModifiedSince + 999)) {
+						resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+						return Boolean.TRUE;
+					}
+
+					// return the full contents regularly
+					if (contentLength != -1)
+						resp.setContentLength(contentLength);
+
+					String contentType = httpContext.getMimeType(resourcePath);
+					if (contentType == null)
+						contentType = getServletConfig().getServletContext().getMimeType(resourcePath);
+
+					if (contentType != null)
+						resp.setContentType(contentType);
+
+					if (lastModified > 0)
+						resp.setDateHeader(LAST_MODIFIED, lastModified);
+
+					if (etag != null)
+						resp.setHeader(ETAG, etag);
+
+					if (contentLength != 0) {
+						// open the input stream
+						InputStream is = null;
+						try {
+							is = connection.getInputStream();
+							// write the resource
+							try {
+								OutputStream os = resp.getOutputStream();
+								int writtenContentLength = writeResourceToOutputStream(is, os);
+								if (contentLength == -1 || contentLength != writtenContentLength)
+									resp.setContentLength(writtenContentLength);
+							} catch (IllegalStateException e) { // can occur if the response output is already open as a Writer
+								Writer writer = resp.getWriter();
+								writeResourceToWriter(is, writer);
+								// Since ContentLength is a measure of the number of bytes contained in the body
+								// of a message when we use a Writer we lose control of the exact byte count and
+								// defer the problem to the Servlet Engine's Writer implementation.
+							}
+						} catch (FileNotFoundException e) {
+							// FileNotFoundException may indicate the following scenarios
+							// - url is a directory
+							// - url is not accessible
+							sendError(resp, HttpServletResponse.SC_FORBIDDEN);
+						} catch (SecurityException e) {
+							// SecurityException may indicate the following scenarios
+							// - url is not accessible
+							sendError(resp, HttpServletResponse.SC_FORBIDDEN);
+						} finally {
+							if (is != null)
+								try {
+									is.close();
+								} catch (IOException e) {
+									// ignore
+								}
+						}
+					}
+					return Boolean.TRUE;
+				}
+			}, acc);
+		} catch (PrivilegedActionException e) {
+			throw (IOException) e.getException();
+		}
+	}
+
+	void sendError(final HttpServletResponse resp, int sc) throws IOException {
+
+		try {
+			// we need to reset headers for 302 and 403
+			resp.reset();
+			resp.sendError(sc);
+		} catch (IllegalStateException e) {
+			// this could happen if the response has already been committed
+		}
+	}
+
+	int writeResourceToOutputStream(InputStream is, OutputStream os) throws IOException {
+		byte[] buffer = new byte[8192];
+		int bytesRead = is.read(buffer);
+		int writtenContentLength = 0;
+		while (bytesRead != -1) {
+			os.write(buffer, 0, bytesRead);
+			writtenContentLength += bytesRead;
+			bytesRead = is.read(buffer);
+		}
+		return writtenContentLength;
+	}
+
+	void writeResourceToWriter(InputStream is, Writer writer) throws IOException {
+		Reader reader = new InputStreamReader(is);
+		try {
+			char[] buffer = new char[8192];
+			int charsRead = reader.read(buffer);
+			while (charsRead != -1) {
+				writer.write(buffer, 0, charsRead);
+				charsRead = reader.read(buffer);
+			}
+		} finally {
+			if (reader != null) {
+				reader.close(); // will also close input stream
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ServletRegistration.java b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ServletRegistration.java
index 1a24959..84cf5da 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ServletRegistration.java
+++ b/eclipse/plugins/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ServletRegistration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005-2007 Cognos Incorporated, IBM Corporation and others
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,28 +12,21 @@
 package org.eclipse.equinox.http.servlet.internal;
 
 import java.io.IOException;
-import java.util.Set;
 import javax.servlet.*;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.osgi.framework.Bundle;
 import org.osgi.service.http.HttpContext;
 
 //This class wraps the servlet object registered in the HttpService.registerServlet call, to manage the context classloader when handleRequests are being asked.
-//It is also responsible to ensure that a given servlet has only been registered once. 
 public class ServletRegistration extends Registration {
 
 	private Servlet servlet; //The actual servlet object registered against the http service. All requests will eventually be delegated to it.
 	private HttpContext httpContext; //The context used during the registration of the servlet
-	private Set servlets; //All the servlets registered against the instance of the proxy servlet that "ownes" self.
 	private ClassLoader registeredContextClassLoader;
-	private ProxyContext proxyContext;
 
-	public ServletRegistration(Servlet servlet, ProxyContext proxyContext, HttpContext context, Bundle bundle, Set servlets) {
+	public ServletRegistration(Servlet servlet, HttpContext context) {
 		this.servlet = servlet;
-		this.servlets = servlets;
 		this.httpContext = context;
-		this.proxyContext = proxyContext;
 		registeredContextClassLoader = Thread.currentThread().getContextClassLoader();
 	}
 
@@ -45,53 +38,37 @@ public class ServletRegistration extends Registration {
 			servlet.destroy();
 		} finally {
 			Thread.currentThread().setContextClassLoader(original);
-		}		
-	}
-
-	public void close() {		
-		servlets.remove(servlet);
-		proxyContext.destroyContextAttributes(httpContext);
+		}
 	}
 
 	//Delegate the init call to the actual servlet
 	public void init(ServletConfig servletConfig) throws ServletException {
-		boolean initialized = false;
-		proxyContext.createContextAttributes(httpContext);
+		ClassLoader original = Thread.currentThread().getContextClassLoader();
 		try {
-			ClassLoader original = Thread.currentThread().getContextClassLoader();
-			try {
-				Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
-				servlet.init(servletConfig);
-			} finally {
-				Thread.currentThread().setContextClassLoader(original);
-			}
-			servlets.add(servlet);
-			initialized = true;
+			Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
+			servlet.init(servletConfig);
 		} finally {
-			if (! initialized)
-				proxyContext.destroyContextAttributes(httpContext);
+			Thread.currentThread().setContextClassLoader(original);
 		}
 	}
 
-	public void checkServletRegistration() throws ServletException {
-		if (servlets.contains(servlet)) {
-			throw new ServletException("This servlet has already been registered at a different alias."); //$NON-NLS-1$
+	//Delegate the handling of the request to the actual servlet
+	public void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {
+		ClassLoader original = Thread.currentThread().getContextClassLoader();
+		try {
+			Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
+			if (httpContext.handleSecurity(req, resp))
+				servlet.service(req, resp);
+		} finally {
+			Thread.currentThread().setContextClassLoader(original);
 		}
 	}
 
-	//Delegate the handling of the request to the actual servlet
-	public boolean handleRequest(HttpServletRequest req, HttpServletResponse resp, String alias) throws IOException, ServletException {
-		HttpServletRequest wrappedRequest = new HttpServletRequestAdaptor(req, alias, servlet);
+	public Servlet getServlet() {
+		return servlet;
+	}
 
-		if (httpContext.handleSecurity(wrappedRequest, resp)) {
-			ClassLoader original = Thread.currentThread().getContextClassLoader();
-			try {
-				Thread.currentThread().setContextClassLoader(registeredContextClassLoader);
-				servlet.service(wrappedRequest, resp);
-			} finally {
-				Thread.currentThread().setContextClassLoader(original);
-			}
-		}
-		return true;
+	public HttpContext getHttpContext() {
+		return httpContext;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.http.servletbridge/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.http.servletbridge/META-INF/MANIFEST.MF
index ec9ab73..501e19c 100644
--- a/eclipse/plugins/org.eclipse.equinox.http.servletbridge/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.http.servletbridge/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %bundleProvider
-Bundle-SymbolicName: org.eclipse.equinox.http.servletbridge
-Bundle-Version: 1.0.100.qualifier
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.equinox.http.servletbridge;singleton:=true
+Bundle-Version: 1.0.200.qualifier
 Bundle-Activator: org.eclipse.equinox.http.servletbridge.internal.Activator
 Bundle-Localization: plugin
 Import-Package: javax.servlet;version="2.3",
diff --git a/eclipse/plugins/org.eclipse.equinox.http/.project b/eclipse/plugins/org.eclipse.equinox.http/.project
index 61067d2..1c9d2e7 100644
--- a/eclipse/plugins/org.eclipse.equinox.http/.project
+++ b/eclipse/plugins/org.eclipse.equinox.http/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.http/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.http/META-INF/MANIFEST.MF
index 7ea11ec..48716c7 100644
--- a/eclipse/plugins/org.eclipse.equinox.http/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.http/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Vendor: %bundleVendor
-Bundle-Version: 1.0.301.qualifier
+Bundle-Version: 1.0.400.qualifier
 Bundle-Activator: org.eclipse.equinox.http.Activator
 Bundle-Copyright: %bundleCopyright
 Bundle-SymbolicName: org.eclipse.equinox.http
diff --git a/eclipse/plugins/org.eclipse.equinox.http/src/org/eclipse/equinox/http/HttpConfiguration.java b/eclipse/plugins/org.eclipse.equinox.http/src/org/eclipse/equinox/http/HttpConfiguration.java
index e1a3853..efffd71 100644
--- a/eclipse/plugins/org.eclipse.equinox.http/src/org/eclipse/equinox/http/HttpConfiguration.java
+++ b/eclipse/plugins/org.eclipse.equinox.http/src/org/eclipse/equinox/http/HttpConfiguration.java
@@ -55,6 +55,9 @@ public class HttpConfiguration implements ManagedService, ManagedServiceFactory
 	protected final static String HTTPSERVICEFACTORYPID = "org.eclipse.equinox.http.HttpFactory"; //$NON-NLS-1$
 	protected ServiceRegistration managedServiceFactory;
 
+	protected final static String enviroKeyHttpMinThreads = "org.eclipse.equinox.http.minThreads"; //$NON-NLS-1$
+	protected final static String enviroKeyHttpMaxThreads = "org.eclipse.equinox.http.maxThreads"; //$NON-NLS-1$
+
 	protected final static String keyHttpMinThreads = "http.minThreads"; //$NON-NLS-1$
 	protected final static String keyHttpMaxThreads = "http.maxThreads"; //$NON-NLS-1$
 	protected final static String keyHttpThreadPriority = "http.threadPriority"; //$NON-NLS-1$
@@ -96,6 +99,7 @@ public class HttpConfiguration implements ManagedService, ManagedServiceFactory
 	 */
 	protected void initialize() {
 		setDefaultPorts();
+		setThreadPoolSizes();
 		pool = new HttpThreadPool(http, minThreads, maxThreads, threadPriority);
 		configuredListeners = new Hashtable(7);
 		synchronized (configuredListeners) {
@@ -191,6 +195,43 @@ public class HttpConfiguration implements ManagedService, ManagedServiceFactory
 		}
 	}
 
+	protected void setThreadPoolSizes() {
+		BundleContext context = http.context;
+
+		String property = context.getProperty(enviroKeyHttpMinThreads);
+		if (property != null) {
+			try {
+				int min = Integer.parseInt(property);
+
+				if ((min < 0) || (min > 63)) {
+					// Don't set the property and throw the exception to get the nice logging below.
+					throw new NumberFormatException();
+				}
+
+				minThreads = min;
+			} catch (NumberFormatException e) {
+				http.logWarning(enviroKeyHttpMinThreads + " must be in the range 0-63", e); //$NON-NLS-1$
+			}
+		}
+
+		property = context.getProperty(enviroKeyHttpMaxThreads);
+		if (property != null) {
+			try {
+				int max = Integer.parseInt(property);
+
+				if ((max < 0) || (max > 63)) {
+					// Don't set the property and throw the exception to get the nice logging below.
+					throw new NumberFormatException();
+				}
+
+				maxThreads = max;
+			} catch (NumberFormatException e) {
+				http.logWarning(enviroKeyHttpMaxThreads + " must be in the range 0-63", e); //$NON-NLS-1$
+			}
+		}
+
+	}
+
 	protected Dictionary createProperties(String address, int port, String scheme, int socketTimeout) {
 		Hashtable properties = new Hashtable(31);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.initializer/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.initializer/META-INF/MANIFEST.MF
index b5a9220..c5b2ff1 100644
--- a/eclipse/plugins/org.eclipse.equinox.initializer/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.initializer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundlename
 Bundle-SymbolicName: org.eclipse.equinox.initializer;singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.initializer.Activator
 Bundle-Localization: plugin
 Import-Package: org.eclipse.core.runtime,
diff --git a/eclipse/plugins/org.eclipse.equinox.io/.project b/eclipse/plugins/org.eclipse.equinox.io/.project
index 8c9bd86..ef5ae89 100644
--- a/eclipse/plugins/org.eclipse.equinox.io/.project
+++ b/eclipse/plugins/org.eclipse.equinox.io/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.io/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.io/META-INF/MANIFEST.MF
index 3e8fa06..cc865d4 100644
--- a/eclipse/plugins/org.eclipse.equinox.io/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.io/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.io
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-Activator: org.eclipse.equinox.internal.io.impl.Activator
 Bundle-Description: This bundle contains service for creating connections. 
diff --git a/eclipse/plugins/org.eclipse.equinox.ip/.project b/eclipse/plugins/org.eclipse.equinox.ip/.project
index 0c4d551..b5b74da 100644
--- a/eclipse/plugins/org.eclipse.equinox.ip/.project
+++ b/eclipse/plugins/org.eclipse.equinox.ip/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.ip/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.ip/META-INF/MANIFEST.MF
index 6e5a52b..9f9cd51 100644
--- a/eclipse/plugins/org.eclipse.equinox.ip/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.ip/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.ip
-Bundle-Version: 1.1.1.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-Description: Provides implementation of the Intial Provisioning service
  defined by OSGi specification release 4.
diff --git a/eclipse/plugins/org.eclipse.equinox.ip/src/org/eclipse/equinox/internal/ip/impl/ProvisioningAgent.java b/eclipse/plugins/org.eclipse.equinox.ip/src/org/eclipse/equinox/internal/ip/impl/ProvisioningAgent.java
index 3ff405e..377ef67 100644
--- a/eclipse/plugins/org.eclipse.equinox.ip/src/org/eclipse/equinox/internal/ip/impl/ProvisioningAgent.java
+++ b/eclipse/plugins/org.eclipse.equinox.ip/src/org/eclipse/equinox/internal/ip/impl/ProvisioningAgent.java
@@ -553,6 +553,7 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 		boolean manifestFound = false;
 		Dictionary info = new Hashtable(5);
 		Dictionary entriesFromHeader = null;
+		Dictionary extraFileds = null;
 		Vector bundlesToStart = new Vector(5);
 		String header = null;
 		try {
@@ -573,21 +574,22 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 				byte[] extra = ze.getExtra();
 				type = extra == null ? null : new String(extra).toLowerCase();
 				if (extra != null && !"META-INF/MANIFEST.MF".equals(name)) {
-					processEntry(type, name, null, zis, info, null, bundlesToStart);
-					zis.closeEntry();
-					continue;
+					if (extraFileds == null) {
+						extraFileds = new Hashtable(3, 3);
+					}
+					extraFileds.put(name, type);
 				}//the extra field is null or the entry is the manifest
 				if (!manifestFound) {
 					if ("META-INF/MANIFEST.MF".equals(name)) {//the entry is the manifest
 						manifestFound = true;
 						header = getHeaderFromManifest(zis);
-						entriesFromHeader = parseEntries(header);
+						entriesFromHeader = filterAttributes(TYPE, parseEntries(header));
 					} else {//no manifest yet, so cache the entry
 						System.out.println("---put : " + name);
 						entries.put(name, readStream(zis));
 					}
 				} else {//the manifest is found so we process the entry
-					processEntry(type, name, null, zis, info, entriesFromHeader, bundlesToStart);
+					processEntry(extraFileds, name, null, zis, info, entriesFromHeader, bundlesToStart);
 				}
 				zis.closeEntry();
 			}
@@ -595,7 +597,7 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 			/*process the cached entries*/
 			Enumeration names = entries.keys();
 			while (names.hasMoreElements()) {
-				processEntry(null, name = (String) names.nextElement(), (byte[]) entries.get(name), null, info, entriesFromHeader, bundlesToStart);
+				processEntry(extraFileds, name = (String) names.nextElement(), (byte[]) entries.get(name), null, info, entriesFromHeader, bundlesToStart);
 			}
 		} catch (Throwable e) {
 			this.info.setError(ERROR_CORRUPTED_ZIP, e.toString());
@@ -615,23 +617,31 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 		addInformation(info, bundlesToStart); // bundle should
 	}
 
-	private void processEntry(String type, String name, byte[] content, InputStream is, Dictionary info, Dictionary entriesFromHeader, Vector bundlesToStart) throws IOException {
+	private void processEntry(Dictionary extraFileds, String name, byte[] content, InputStream is, Dictionary info, Dictionary entriesFromHeader, Vector bundlesToStart) throws IOException {
 		/* 
-		 * if there is no value in the extra field 
-		 * try to initialize it from the InitialProvisioning-Entries header 
+		* first try the InitialProvisioning-Entries header
+		* if the zip file had a manifest entry
+		*/
+		String type = entriesFromHeader == null ? null : (String) entriesFromHeader.get(name);
+		/* 
+		 * If there is no value in the InitialProvisioning-Entries header for that path
+		 * try to initialize the type from the entry's extra field.
+		 * If this ZIP entry field is present, the Initial Provisioning service should not
+		 * look further, even if the extra field contains an erroneous value.
 		 */
 		if (type == null) {
-			if (entriesFromHeader != null) {
-				type = (String) entriesFromHeader.get(name);
+			if (extraFileds != null) {
+				type = (String) extraFileds.get(name);
 			}
 		}
 		/*
-		 * if type is still null try to to initialize it 
-		 * according to the extension of the entry's name 
-		 */
+		* if type is still null try to to initialize it 
+		* according to the extension of the entry's name 
+		*/
 		if (type == null) {
 			type = getMIMEfromExtension(name);
 		}
+
 		/* process entry */
 		if (Log.debug) {
 			Log.debug("Processing entry '" + name + "' of type " + type);
@@ -1233,51 +1243,186 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 	}
 
 	/**
-	 * 
+	 * Parses the InitialProvisioning-Entries manifest header.
 	 * @param header the contents of the InitialProvisioning-Entries manifest header, if any
-	 * @return dictionary with key-value pairs parsed from header
-	 *         or null if no such header is found in the manifest
+	 * @return Dictionary which maps entry paths to Dictionary representing the attributes
+	 * 		   or null, if no header is found.
 	 */
-	static Dictionary parseEntries(String header) {
+	private static Dictionary parseEntries(String header) {
+		Dictionary entries = null;
+		Dictionary attributes = null;
+		header = removeWhiteSpaces(header);
 		if (header == null || header.length() == 0)
-			return null; //no such header
-		Dictionary entries = new Hashtable(2);
-		int index;
-		StringTokenizer tokens = new StringTokenizer(header, ",");
-		String token;
-		String path, type = null;
-		while (tokens.hasMoreTokens()) {
-			token = removeWhiteSpaces(tokens.nextToken());
-			index = token.indexOf(";");
-			if (index == -1)
-				continue; //there is no type/mime attribute
-			path = token.substring(0, index);
-			index = token.indexOf("mime=", index);
-			if (index != -1) { //there is mime attribute
-				type = token.substring(index + 5);
-				if (isValidMIME(type)) {
-					entries.put(path, type);
+			return null;
+		int begin = 0, end = 1, length = header.length();
+		boolean quoted = false;
+		String path, attribute, value;
+
+		entry: while (end != -1 && begin < length - 1) {
+			end = readToken(header, begin, false, false); //read the path
+			if (end == -1)
+				break; //end of header, or only path
+
+			switch (header.charAt(end)) {
+				case ';' ://end of path , read attribute
+					if (begin == end) {
+						end = readToken(header, end + 1, false, true);
+						begin = end + 1;
+						continue;
+					}
+					path = header.substring(begin, end);
+					begin = end + 1;
+					//read the attributes
+					while (end != -1 && begin < length - 1) {
+						end = readToken(header, begin, quoted, false);
+						if (end == -1)
+							break entry;
+						if (header.charAt(end) != '=' || begin == end) {
+							//invalid syntax
+							end = readToken(header, begin, false, true); //read the attribute name
+							begin = end + 1;
+							continue entry;
+						}
+						attribute = header.substring(begin, end);
+						if (header.charAt(begin) == '\"') {
+							quoted = true;
+							begin = end + 2;
+						} else
+							begin = end + 1;
+
+						if (begin >= length - 1)
+							break entry;
+
+						end = readToken(header, begin, quoted, false); //read the attribute value
+						if (end == -1) {
+							if (quoted) {
+								//invalid syntax
+								end = readToken(header, begin, false, true);
+								begin = end + 1;
+								continue entry;
+							}
+							//end of header or last attribute-value
+							value = header.substring(begin, length);
+							if (attributes == null)
+								attributes = new Hashtable(2, 3);
+							attributes.put(attribute, value);
+							begin = end + 1;
+							break;
+						}
+						switch (header.charAt(end)) {
+							case ',' : //end of parameters list
+								value = header.substring(begin, end);
+								if (attributes == null)
+									attributes = new Hashtable(2, 3);
+								attributes.put(attribute, value);
+								if (entries == null)
+									entries = new Hashtable(3, 3);
+								entries.put(path, attributes);
+								attributes = null;
+								continue entry;
+							case ';' : //another parameter
+								value = header.substring(begin, end);
+								if (attributes == null)
+									attributes = new Hashtable(2, 3);
+								attributes.put(attribute, value);
+								begin = end + 1;
+								continue;
+							case '\"' : //endof quoted part
+								quoted = false;
+								value = header.substring(begin, end - 1);
+								if (attributes == null)
+									attributes = new Hashtable(2, 3);
+								attributes.put(attribute, value);
+								begin = end + 1;
+								continue;
+							default : //invalid syntax
+								end = readToken(header, begin, false, true);
+								begin = end + 1;
+								continue entry;
+						}
+					}
+					break;
+				case ',' : //no description
+					if (begin == end)
+						begin = end + 2;
+					else
+						begin = end + 1;
+					continue;
+				default :// invalid syntax
+					end = readToken(header, end + 1, false, true);
+					begin = end + 1;
 					continue;
-				}
 			}
-			index = token.indexOf("type=");
-			if (index != -1) { //there is type attribute
-				type = token.substring(index + 5);
-				if ((type = typeToMIME(type)) != null) {
-					entries.put(path, type);
-				}
+
+			if (attributes != null) {
+				if (entries == null)
+					entries = new Hashtable(3, 3);
+				entries.put(path, attributes);
+				attributes = null;
 			}
 		}
 		return entries;
 	}
 
 	/**
-	 * 
-	 * @param mime mime type 
-	 * @return true if mime is avalid mime type
+	 * Reads the next token from the manifest header.
+	 * @param token the valiue of the manifest header.
+	 * @param begin index of the char from which to start
+	 * @param quoted if the consequent part of teh string is guoted
+	 * @param skipInvalidPath if true all chars till the first comma are skipped
+	 * @return the index of the first character from the string which is 
+	 *         different from the expected, or -1 if not found
 	 */
-	private static boolean isValidMIME(String mime) {
-		return ProvisioningService.MIME_BUNDLE.equals(mime) || ProvisioningService.MIME_BUNDLE_ALT.equals(mime) || ProvisioningService.MIME_STRING.equals(mime) || ProvisioningService.MIME_BYTE_ARRAY.equals(mime) || ProvisioningService.MIME_BUNDLE_URL.equals(mime);
+	private static int readToken(String token, int begin, boolean quoted, boolean skipInvalidPath) {
+		char c = 0;
+		int len = token.length();
+		if (begin >= len)
+			return -1;
+		if (quoted) {
+			while ((c = token.charAt(begin)) != '\"') {
+				if (++begin == len)
+					return -1;
+			}
+			return begin;
+		}
+		if (skipInvalidPath) {
+			while ((c = token.charAt(begin)) != ',') {
+				if (++begin == len)
+					return -1;
+			}
+			return begin;
+		}
+		while ((c = token.charAt(begin)) >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '_' || c == '-' || c == '/' || c == '.' || c == ':') {
+			if (++begin == len)
+				return -1;
+		}
+		return begin;
+	}
+
+	static final String TYPE = "type";
+
+	/**
+	 * Filters the Dictionary returned from {@link #parseEntries(String)}.
+	 * Returns Dictionary which maps entry paths to values of the attribute,
+	 * which name is given as argument.
+	 */
+	private static Dictionary filterAttributes(String attribute, Dictionary entries) {
+		if (entries == null)
+			return null;
+		Dictionary filtered = null;
+		Enumeration paths = entries.keys();
+		Dictionary attributes = null;
+		String path = null, type = null, mime = null;
+		while (paths.hasMoreElements()) {
+			path = (String) paths.nextElement();
+			attributes = (Dictionary) entries.get(path);
+			if ((type = (String) attributes.get(attribute)) != null && (mime = typeToMIME(type)) != null) {
+				if (filtered == null)
+					filtered = new Hashtable(3, 3);
+				filtered.put(path, mime);
+			}
+		}
+		return filtered;
 	}
 
 	/**
@@ -1354,6 +1499,8 @@ public class ProvisioningAgent implements BundleActivator, ProvisioningService,
 	}
 
 	private static String removeWhiteSpaces(String s) {
+		if (s == null)
+			return null;
 		char curr;
 		StringBuffer sb = new StringBuffer();
 		for (int i = 0; i < s.length(); i++) {
diff --git a/eclipse/plugins/org.eclipse.equinox.jmx.client.rmi/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.jmx.client.rmi/META-INF/MANIFEST.MF
index d1e325e..838beef 100644
--- a/eclipse/plugins/org.eclipse.equinox.jmx.client.rmi/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.jmx.client.rmi/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: RMI Transport Client Plug-in (Incubation)
 Bundle-SymbolicName: org.eclipse.equinox.jmx.client.rmi;singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 1.0.0.qualifier
 Bundle-Localization: plugin
 Eclipse-LazyStart: true
 Bundle-RequiredExecutionEnvironment: J2SE-1.5,
diff --git a/eclipse/plugins/org.eclipse.equinox.jmx.common/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.jmx.common/META-INF/MANIFEST.MF
index 3358bfa..83c8bd9 100644
--- a/eclipse/plugins/org.eclipse.equinox.jmx.common/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.jmx.common/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Resource Monitoring Common Bundle (Incubation)
 Bundle-SymbolicName: org.eclipse.equinox.jmx.common
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Localization: plugin
 Eclipse-LazyStart: true
 Bundle-Activator: org.eclipse.equinox.jmx.internal.common.Activator
diff --git a/eclipse/plugins/org.eclipse.equinox.jsp.jasper.registry/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.jsp.jasper.registry/META-INF/MANIFEST.MF
index 3d28948..4623005 100644
--- a/eclipse/plugins/org.eclipse.equinox.jsp.jasper.registry/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.jsp.jasper.registry/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.jsp.jasper.registry
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.jsp.jasper.registry.Activator
 Import-Package: org.eclipse.equinox.jsp.jasper,
  org.osgi.framework;version="1.3.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
index 07a5c7e..05fb0e2 100644
--- a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
@@ -4,12 +4,12 @@ Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.jsp.jasper
-Bundle-Version: 1.0.200.qualifier
+Bundle-Version: 1.0.201.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.jsp.jasper.Activator
-Import-Package: javax.servlet;version="2.4",
- javax.servlet.http;version="2.4",
- javax.servlet.jsp;version="2.0",
- org.apache.jasper.servlet,
+Import-Package: javax.servlet;version="[2.4, 3.0)",
+ javax.servlet.http;version="[2.4, 3.0)",
+ javax.servlet.jsp;version="[2.0, 2.1)",
+ org.apache.jasper.servlet;version="[0, 6)",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.http;version="1.2.0",
  org.osgi.service.packageadmin;version="1.2.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
index 61cb9c0..3303026 100644
--- a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
+++ b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/internal/jsp/jasper/JspClassLoader.java
@@ -20,7 +20,6 @@ import java.util.Enumeration;
 import java.util.StringTokenizer;
 
 import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 
 /**
@@ -76,20 +75,6 @@ public class JspClassLoader extends URLClassLoader {
 	private void addBundleClassPathJars(Bundle bundle) {
 		Dictionary headers = bundle.getHeaders();
 		String classPath = (String) headers.get(Constants.BUNDLE_CLASSPATH);
-		BundleContext context = bundle.getBundleContext();
-		Bundle[] inner = context.getBundles();
-		for(int i = 0 ; i < inner.length ; i++){
-		    String loc = inner[i].getLocation();
-		    if(loc.startsWith("reference:file:plugins/")){
-			String p = loc.replaceFirst("^reference:file:", "file:///usr/lib/eclipse/");
-			try {
-			    URL u = new URL(p);
-			    super.addURL(u);
-			} catch(Exception e){
-			    e.printStackTrace();
-			}
-		    }
-		}
 		if (classPath != null) {
 			StringTokenizer tokenizer = new StringTokenizer(classPath, ","); //$NON-NLS-1$
 			while (tokenizer.hasMoreTokens()) {
diff --git a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java
index 14068b0..5792818 100644
--- a/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java
+++ b/eclipse/plugins/org.eclipse.equinox.jsp.jasper/src/org/eclipse/equinox/jsp/jasper/JspServlet.java
@@ -168,7 +168,7 @@ public class JspServlet extends HttpServlet {
 			String path = resourceName.substring(0, lastSlash);
 			if (path.length() == 0)
 				path = "/"; //$NON-NLS-1$
-			String file = resourceName.substring(lastSlash + 1);
+			String file = sanitizeEntryName(resourceName.substring(lastSlash + 1));
 			Enumeration entryPaths = bundle.findEntries(path, file, false);
 			if (entryPaths != null && entryPaths.hasMoreElements())
 				return (URL) entryPaths.nextElement();
@@ -176,6 +176,29 @@ public class JspServlet extends HttpServlet {
 			return delegate.getResource(name);
 		}
 
+		private String sanitizeEntryName(String name) {
+			StringBuffer buffer = null;
+			for (int i = 0; i < name.length(); i++) {
+				char c = name.charAt(i);
+				switch (c) {
+					case '*' :
+					case '\\' :
+						// we need to escape '*' and '\'
+						if (buffer == null) {
+							buffer = new StringBuffer(name.length() + 16);
+							buffer.append(name.substring(0, i));
+						}
+						buffer.append('\\').append(c);
+						break;
+					default :
+						if (buffer != null)
+							buffer.append(c);
+						break;
+				}
+			}
+			return (buffer == null) ? name : buffer.toString();
+		}
+
 		public InputStream getResourceAsStream(String name) {
 			try {
 				URL resourceURL = getResource(name);
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
index 5841d58..069a235 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.carbon.macosx;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=carbon) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
 Bundle-Localization: launcher.carbon.macosx
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
index f0f39f3..c7df9b3 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.cocoa.macosx.x86_64;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )
 Bundle-Localization: launcher.cocoa.macosx.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
index 9616423..a284c15 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.cocoa.macosx;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
 Bundle-Localization: launcher.cocoa.macosx
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project
new file mode 100644
index 0000000..980375b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.launcher.gtk.aix.ppc64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9b58379
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.aix.ppc64
+Bundle-Version: 1.0.0.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=aix) (osgi.arch=ppc64))
+Bundle-Localization: launcher.gtk.aix.ppc64
+Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/about.html b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/about.html
rename to eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties
new file mode 100644
index 0000000..7be314c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               eclipse_*.so,\
+               launcher.gtk.aix.ppc64.properties,\
+               about.html
+               
+customBuildCallbacks=customBuildCallbacks.xml
+generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/customBuildCallbacks.xml
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/customBuildCallbacks.xml
rename to eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/customBuildCallbacks.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties
new file mode 100644
index 0000000..425bb64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Equinox Launcher GTK AIX PPC64 Fragment
+providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
index 4a7b55a..90d6f67 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.ppc;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=ppc))
 Bundle-Localization: launcher.gtk.linux.ppc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project
new file mode 100644
index 0000000..957d54b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.launcher.gtk.linux.ppc64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1df2f3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.ppc64;singleton:=true
+Bundle-Version: 1.0.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=ppc64))
+Bundle-Localization: launcher.gtk.linux.ppc64
+Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/about.html b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/about.html
rename to eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties
new file mode 100644
index 0000000..8356be9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               eclipse_*.so,\
+               launcher.gtk.linux.ppc64.properties,\
+               about.html
+               
+customBuildCallbacks=customBuildCallbacks.xml
+generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/customBuildCallbacks.xml
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/customBuildCallbacks.xml
rename to eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/customBuildCallbacks.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties
new file mode 100644
index 0000000..b0663ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2007 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Equinox Launcher Linux PPC64 Fragment
+providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
index f715c8b..57288ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.s390;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.1.1.qualifier
 Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=s390))
 Bundle-Localization: launcher.gtk.linux.s390
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
index 626db38..28fa3d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.s390x;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.1.1.qualifier
 Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=s390x))
 Bundle-Localization: launcher.gtk.linux.s390x
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
index d60530a..1ce7aa5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.x86;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
 Bundle-Localization: launcher.gtk.linux.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
index aac7b33..364f608 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.x86_64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))
 Bundle-Localization: launcher.gtk.linux.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
index 73431fd..c60d378 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.solaris.sparc;singleton:=true
-Bundle-Version: 1.0.201.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=solaris) (osgi.arch=sparc))
 Bundle-Localization: launcher.gtk.solaris.sparc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
index ad02a5d..f988fc0 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.solaris.x86;singleton:=true
-Bundle-Version: 1.0.201.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=solaris) (osgi.arch=x86))
 Bundle-Localization: launcher.gtk.solaris.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
index 02caaa5..497120a 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.aix.ppc;singleton:=true
-Bundle-Version: 1.0.201.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=aix) (osgi.arch=ppc))
 Bundle-Localization: launcher.motif.aix.ppc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.project b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.project
deleted file mode 100644
index a97a672..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.launcher.motif.hpux.PA_RISC</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index acb6b98..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Dec 06 11:43:24 EST 2006
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
deleted file mode 100644
index 963f200..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.hpux.PA_RISC;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
-Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=hpux) (osgi.arch=PA_RISC))
-Bundle-Localization: launcher.motif.hpux.PA_RISC
-Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties
deleted file mode 100644
index 06bb413..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
-               eclipse_*.so,\
-               launcher.motif.hpux.PA_RISC.properties,\
-               about.html
-               
-customBuildCallbacks=customBuildCallbacks.xml
-generateSourceBundle=false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties
deleted file mode 100644
index 6b562f3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Launcher PA_RISC Fragment
-providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
index 7aabb7e..5fda8d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.hpux.ia64_32;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Bundle-Vendor: %providerName
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=hpux) (osgi.arch=ia64_32) )
 Bundle-Localization: launcher.motif.hpux.ia64_32
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
index ec6ce7c..bcd19b5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.linux.x86;singleton:=true
-Bundle-Version: 1.0.201.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=linux) (osgi.arch=x86))
 Bundle-Localization: launcher.motif.linux.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
index d460e39..705be99 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Sparc Fragment
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.solaris.sparc;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=solaris) (osgi.arch=sparc))
 Bundle-Localization: launcher.motif.solaris.sparc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
index 5d53bc9..bf49462 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.ia64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.2.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=ia64))
 Bundle-Localization: launcher.win32.win32.ia64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
index 2923282..ba4014b 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.x86; singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
 Bundle-Localization: launcher.win32.win32.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
index 44b87b7..1f8f59e 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.x86_64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))
 Bundle-Localization: launcher.win32.win32.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.classpath b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.classpath
deleted file mode 100644
index 751c8f2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.project b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.project
deleted file mode 100644
index c8be0ba..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.launcher.wpf.win32.x86</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
index 5816428..62809da 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.wpf.win32.x86; singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=wpf) (osgi.os=win32) (osgi.arch=x86))
 Bundle-Localization: launcher.wpf.win32.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/build.properties
deleted file mode 100644
index adb8345..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-bin.includes = META-INF/,\
-               eclipse_*.dll,\
-               com_*.dll,\
-               launcher.wpf.win32.x86.properties,\
-               about.html
-generateSourceBundle=false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/launcher.wpf.win32.x86.properties b/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/launcher.wpf.win32.x86.properties
deleted file mode 100644
index 253aace..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher.wpf.win32.x86/launcher.wpf.win32.x86.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Launcher WPF Win32 X86 Fragment
-providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/META-INF/MANIFEST.MF
index 1228e50..2b676ce 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.launcher
-Bundle-Version: 1.0.201.qualifier
+Bundle-SymbolicName: org.eclipse.equinox.launcher;singleton:=true
+Bundle-Version: 1.1.1.qualifier
 Main-Class: org.eclipse.equinox.launcher.Main
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
index f715c8b..57288ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.s390;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.1.1.qualifier
 Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=s390))
 Bundle-Localization: launcher.gtk.linux.s390
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
index 626db38..28fa3d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.s390x;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.1.1.qualifier
 Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=s390x))
 Bundle-Localization: launcher.gtk.linux.s390x
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
index be1e9db..f988fc0 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.solaris.x86;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=solaris) (osgi.arch=x86))
 Bundle-Localization: launcher.gtk.solaris.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
index 5841d58..069a235 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.carbon.macosx;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=carbon) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
 Bundle-Localization: launcher.carbon.macosx
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
index f0f39f3..c7df9b3 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.cocoa.macosx.x86_64;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )
 Bundle-Localization: launcher.cocoa.macosx.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
index 9616423..a284c15 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.cocoa.macosx;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
 Bundle-Localization: launcher.cocoa.macosx
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project
new file mode 100644
index 0000000..980375b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.launcher.gtk.aix.ppc64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9b58379
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.aix.ppc64
+Bundle-Version: 1.0.0.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=aix) (osgi.arch=ppc64))
+Bundle-Localization: launcher.gtk.aix.ppc64
+Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/about.html b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/about.html
rename to eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties
new file mode 100644
index 0000000..7be314c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               eclipse_*.so,\
+               launcher.gtk.aix.ppc64.properties,\
+               about.html
+               
+customBuildCallbacks=customBuildCallbacks.xml
+generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/customBuildCallbacks.xml
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/customBuildCallbacks.xml
copy to eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/customBuildCallbacks.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties
new file mode 100644
index 0000000..425bb64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64/launcher.gtk.aix.ppc64.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Equinox Launcher GTK AIX PPC64 Fragment
+providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
index 4a7b55a..90d6f67 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.ppc;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=ppc))
 Bundle-Localization: launcher.gtk.linux.ppc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project
new file mode 100644
index 0000000..957d54b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/.project
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.launcher.gtk.linux.ppc64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1df2f3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.ppc64;singleton:=true
+Bundle-Version: 1.0.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=ppc64))
+Bundle-Localization: launcher.gtk.linux.ppc64
+Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/about.html b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/about.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/about.html
copy to eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties
new file mode 100644
index 0000000..8356be9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/build.properties
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+               eclipse_*.so,\
+               launcher.gtk.linux.ppc64.properties,\
+               about.html
+               
+customBuildCallbacks=customBuildCallbacks.xml
+generateSourceBundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/customBuildCallbacks.xml
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.launcher.carbon.macosx/customBuildCallbacks.xml
copy to eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/customBuildCallbacks.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties
new file mode 100644
index 0000000..b0663ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64/launcher.gtk.linux.ppc64.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2007 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName = Equinox Launcher Linux PPC64 Fragment
+providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
index d60530a..1ce7aa5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.x86;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
 Bundle-Localization: launcher.gtk.linux.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
index aac7b33..364f608 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.linux.x86_64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))
 Bundle-Localization: launcher.gtk.linux.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
index cceedfb..c60d378 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.gtk.solaris.sparc;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=solaris) (osgi.arch=sparc))
 Bundle-Localization: launcher.gtk.solaris.sparc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
index 8eca9b3..497120a 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.aix.ppc;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=aix) (osgi.arch=ppc))
 Bundle-Localization: launcher.motif.aix.ppc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/build.properties
index c64efe3..e890e22 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc/build.properties
@@ -1,5 +1,6 @@
 bin.includes = META-INF/,\
                eclipse_*.so,\
+               libeclipse-motif.so, \
                launcher.motif.aix.ppc.properties,\
                about.html
                
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index acb6b98..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Dec 06 11:43:24 EST 2006
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
deleted file mode 100644
index 963f200..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.hpux.PA_RISC;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
-Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=hpux) (osgi.arch=PA_RISC))
-Bundle-Localization: launcher.motif.hpux.PA_RISC
-Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/README.TXT b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/README.TXT
new file mode 100644
index 0000000..affe393
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/README.TXT
@@ -0,0 +1,2 @@
+The org.eclipse.equinox.launcher.motif.hpux.PA_RISC launcher is no longer maintained.  
+Content has been deleted.  The tag v20100118 contains the last content before deletion.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties
deleted file mode 100644
index 06bb413..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
-               eclipse_*.so,\
-               launcher.motif.hpux.PA_RISC.properties,\
-               about.html
-               
-customBuildCallbacks=customBuildCallbacks.xml
-generateSourceBundle=false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties
deleted file mode 100644
index 6b562f3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.PA_RISC/launcher.motif.hpux.PA_RISC.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-# 
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Launcher PA_RISC Fragment
-providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
index 7aabb7e..5fda8d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.hpux.ia64_32;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Bundle-Vendor: %providerName
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=hpux) (osgi.arch=ia64_32) )
 Bundle-Localization: launcher.motif.hpux.ia64_32
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
index 9ab1d59..bcd19b5 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.linux.x86;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=linux) (osgi.arch=x86))
 Bundle-Localization: launcher.motif.linux.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
index 9f7a558..705be99 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Sparc Fragment
 Bundle-SymbolicName: org.eclipse.equinox.launcher.motif.solaris.sparc;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=solaris) (osgi.arch=sparc))
 Bundle-Localization: launcher.motif.solaris.sparc
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
index 5d53bc9..bf49462 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.ia64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.2.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=ia64))
 Bundle-Localization: launcher.win32.win32.ia64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
index 2923282..ba4014b 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.x86; singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
 Bundle-Localization: launcher.win32.win32.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
index 44b87b7..1f8f59e 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.win32.win32.x86_64;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="1.0.0"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))
 Bundle-Localization: launcher.win32.win32.x86_64
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
index 5816428..62809da 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86/META-INF/MANIFEST.MF
@@ -3,8 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.launcher.wpf.win32.x86; singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.1.0)"
+Bundle-Version: 1.1.2.qualifier
+Fragment-Host: org.eclipse.equinox.launcher;bundle-version="[1.0.0,1.2.0)"
 Eclipse-PlatformFilter: (& (osgi.ws=wpf) (osgi.os=win32) (osgi.arch=x86))
 Bundle-Localization: launcher.wpf.win32.x86
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
index 72c9192..57749e4 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at 
@@ -23,6 +23,8 @@ public class JNIBridge {
 	//TODO: This class should not be public
 	private native void _set_exit_data(String sharedId, String data);
 
+	private native void _set_launcher_info(String launcher, String name);
+
 	private native void _update_splash();
 
 	private native long _get_splash_handle();
@@ -84,6 +86,22 @@ public class JNIBridge {
 	}
 
 	/**
+	 * @noreference This method is not intended to be referenced by clients
+	 */
+	public boolean setLauncherInfo(String launcher, String name) {
+		try {
+			_set_launcher_info(launcher, name);
+			return true;
+		} catch (UnsatisfiedLinkError e) {
+			if (!libraryLoaded) {
+				loadLibrary();
+				return setLauncherInfo(launcher, name);
+			}
+			return false;
+		}
+	}
+
+	/**
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public boolean showSplash(String bitmap) {
@@ -131,6 +149,17 @@ public class JNIBridge {
 	}
 
 	/**
+	 * Whether or not we loaded the shared library here from java.  
+	 * False does not imply the library is not available, it could have
+	 * been loaded natively by the executable.
+	 * 
+	 * @return boolean
+	 */
+	boolean isLibraryLoadedByJava() {
+		return libraryLoaded;
+	}
+
+	/**
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public boolean takeDownSplash() {
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
index 88801d2..82a5b3f 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems) - bug 301226
  *******************************************************************************/
 package org.eclipse.equinox.launcher;
 
@@ -33,6 +34,7 @@ import org.eclipse.equinox.internal.launcher.Constants;
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public class Main {
+
 	/**
 	 * Indicates whether this instance is running in debug mode.
 	 */
@@ -188,16 +190,23 @@ public class Main {
 	private static final String PROP_NL = "osgi.nl"; //$NON-NLS-1$
 	static final String PROP_NOSHUTDOWN = "osgi.noShutdown"; //$NON-NLS-1$
 	private static final String PROP_DEBUG = "osgi.debug"; //$NON-NLS-1$	
+	private static final String PROP_OS = "osgi.os"; //$NON-NLS-1$
+	private static final String PROP_WS = "osgi.ws"; //$NON-NLS-1$
+	private static final String PROP_ARCH = "osgi.arch"; //$NON-NLS-1$
 
 	private static final String PROP_EXITCODE = "eclipse.exitcode"; //$NON-NLS-1$
 	private static final String PROP_EXITDATA = "eclipse.exitdata"; //$NON-NLS-1$
 	private static final String PROP_LAUNCHER = "eclipse.launcher"; //$NON-NLS-1$
+	private static final String PROP_LAUNCHER_NAME = "eclipse.launcher.name"; //$NON-NLS-1$
 
 	private static final String PROP_VM = "eclipse.vm"; //$NON-NLS-1$
 	private static final String PROP_VMARGS = "eclipse.vmargs"; //$NON-NLS-1$
 	private static final String PROP_COMMANDS = "eclipse.commands"; //$NON-NLS-1$
 	private static final String PROP_ECLIPSESECURITY = "eclipse.security"; //$NON-NLS-1$
 
+	// Suffix for location properties - see LocationManager.
+	private static final String READ_ONLY_AREA_SUFFIX = ".readOnly"; //$NON-NLS-1$
+
 	// Data mode constants for user, configuration and data locations.
 	private static final String NONE = "@none"; //$NON-NLS-1$
 	private static final String NO_DEFAULT = "@noDefault"; //$NON-NLS-1$
@@ -289,13 +298,20 @@ public class Main {
 	private String getWS() {
 		if (ws != null)
 			return ws;
+
+		String osgiWs = System.getProperty(PROP_WS);
+		if (osgiWs != null) {
+			ws = osgiWs;
+			return ws;
+		}
+
 		String osName = getOS();
 		if (osName.equals(Constants.OS_WIN32))
 			return Constants.WS_WIN32;
 		if (osName.equals(Constants.OS_LINUX))
 			return Constants.WS_GTK;
 		if (osName.equals(Constants.OS_MACOSX))
-			return Constants.WS_CARBON;
+			return Constants.WS_COCOA;
 		if (osName.equals(Constants.OS_HPUX))
 			return Constants.WS_MOTIF;
 		if (osName.equals(Constants.OS_AIX))
@@ -307,9 +323,26 @@ public class Main {
 		return Constants.WS_UNKNOWN;
 	}
 
+	private String getAlternateWS(String defaultWS) {
+		// We'll have already tried the default, so we only need to map
+		// in one direction. (default -> alternate)
+		if (Constants.WS_COCOA.equals(defaultWS))
+			return Constants.WS_CARBON;
+		if (Constants.WS_GTK.equals(defaultWS))
+			return Constants.WS_MOTIF;
+		if (Constants.WS_WIN32.equals(defaultWS))
+			return Constants.WS_WPF;
+		return Constants.WS_UNKNOWN;
+	}
+
 	private String getOS() {
 		if (os != null)
 			return os;
+		String osgiOs = System.getProperty(PROP_OS);
+		if (osgiOs != null) {
+			os = osgiOs;
+			return os;
+		}
 		String osName = System.getProperties().getProperty("os.name"); //$NON-NLS-1$
 		if (osName.regionMatches(true, 0, Constants.OS_WIN32, 0, 3))
 			return Constants.OS_WIN32;
@@ -339,6 +372,11 @@ public class Main {
 	private String getArch() {
 		if (arch != null)
 			return arch;
+		String osgiArch = System.getProperty(PROP_ARCH);
+		if (osgiArch != null) {
+			arch = osgiArch;
+			return arch;
+		}
 		String name = System.getProperties().getProperty("os.arch");//$NON-NLS-1$
 		// Map i386 architecture to x86
 		if (name.equalsIgnoreCase(Constants.INTERNAL_ARCH_I386))
@@ -350,6 +388,19 @@ public class Main {
 		return name;
 	}
 
+	private String getFragmentString(String fragmentOS, String fragmentWS, String fragmentArch) {
+		StringBuffer buffer = new StringBuffer(PLUGIN_ID);
+		buffer.append('.');
+		buffer.append(fragmentWS);
+		buffer.append('.');
+		buffer.append(fragmentOS);
+		if (!(fragmentOS.equals(Constants.OS_MACOSX) && !Constants.ARCH_X86_64.equals(fragmentArch))) {
+			buffer.append('.');
+			buffer.append(fragmentArch);
+		}
+		return buffer.toString();
+	}
+
 	/**
 	 *  Sets up the JNI bridge to native calls
 	 */
@@ -367,61 +418,67 @@ public class Main {
 		if (libPath == null) {
 			//find our fragment name
 			String fragmentOS = getOS();
+			String fragmentWS = getWS();
 			String fragmentArch = getArch();
-			StringBuffer buffer = new StringBuffer(PLUGIN_ID);
-			buffer.append('.');
-			buffer.append(getWS());
-			buffer.append('.');
-			buffer.append(fragmentOS);
-			if (!(fragmentOS.equals(Constants.OS_MACOSX) && !Constants.ARCH_X86_64.equals(fragmentArch))) {
-				buffer.append('.');
-				buffer.append(fragmentArch);
+
+			libPath = getLibraryPath(getFragmentString(fragmentOS, fragmentWS, fragmentArch), defaultPath);
+			if (libPath == null && ws == null) {
+				// no ws was specified and we didn't find the default fragment, try an alternate ws
+				String alternateWS = getAlternateWS(fragmentWS);
+				libPath = getLibraryPath(getFragmentString(fragmentOS, alternateWS, fragmentArch), defaultPath);
+				if (libPath != null) {
+					System.getProperties().put(PROP_WS, alternateWS);
+				}
 			}
-			String fragmentName = buffer.toString();
-			String fragment = null;
-			if (inDevelopmentMode) {
-				String devPathList = devClassPathProps.getProperty(PLUGIN_ID);
-				String[] locations = getArrayFromList(devPathList);
-				if (locations.length > 0) {
-					File location = new File(locations[0]);
-					if (location.isAbsolute()) {
-						String dir = location.getParent();
-						fragment = searchFor(fragmentName, dir);
-						if (fragment != null)
-							libPath = getLibraryFromFragment(fragment);
-					}
+		}
+		library = libPath;
+		if (library != null)
+			bridge = new JNIBridge(library);
+	}
+
+	private String getLibraryPath(String fragmentName, URL[] defaultPath) {
+		String libPath = null;
+		String fragment = null;
+		if (inDevelopmentMode && devClassPathProps != null) {
+			String devPathList = devClassPathProps.getProperty(PLUGIN_ID);
+			String[] locations = getArrayFromList(devPathList);
+			if (locations.length > 0) {
+				File location = new File(locations[0]);
+				if (location.isAbsolute()) {
+					String dir = location.getParent();
+					fragment = searchFor(fragmentName, dir);
+					if (fragment != null)
+						libPath = getLibraryFromFragment(fragment);
 				}
 			}
-			if (libPath == null && bootLocation != null) {
-				URL[] urls = defaultPath;
-				if (urls != null && urls.length > 0) {
-					//the last one is most interesting
-					for (int i = urls.length - 1; i >= 0 && libPath == null; i--) {
-						File entryFile = new File(urls[i].getFile());
-						String dir = entryFile.getParent();
-						if (inDevelopmentMode) {
-							String devDir = dir + "/" + PLUGIN_ID + "/fragments"; //$NON-NLS-1$ //$NON-NLS-2$
-							fragment = searchFor(fragmentName, devDir);
-						}
-						if (fragment == null)
-							fragment = searchFor(fragmentName, dir);
-						if (fragment != null)
-							libPath = getLibraryFromFragment(fragment);
+		}
+		if (libPath == null && bootLocation != null) {
+			URL[] urls = defaultPath;
+			if (urls != null && urls.length > 0) {
+				//the last one is most interesting
+				for (int i = urls.length - 1; i >= 0 && libPath == null; i--) {
+					File entryFile = new File(urls[i].getFile());
+					String dir = entryFile.getParent();
+					if (inDevelopmentMode) {
+						String devDir = dir + "/" + PLUGIN_ID + "/fragments"; //$NON-NLS-1$ //$NON-NLS-2$
+						fragment = searchFor(fragmentName, devDir);
 					}
+					if (fragment == null)
+						fragment = searchFor(fragmentName, dir);
+					if (fragment != null)
+						libPath = getLibraryFromFragment(fragment);
 				}
 			}
-			if (libPath == null) {
-				URL install = getInstallLocation();
-				String location = install.getFile();
-				location += "/plugins/"; //$NON-NLS-1$
-				fragment = searchFor(fragmentName, location);
-				if (fragment != null)
-					libPath = getLibraryFromFragment(fragment);
-			}
 		}
-		library = libPath;
-		if (library != null)
-			bridge = new JNIBridge(library);
+		if (libPath == null) {
+			URL install = getInstallLocation();
+			String location = install.getFile();
+			location += "/plugins/"; //$NON-NLS-1$
+			fragment = searchFor(fragmentName, location);
+			if (fragment != null)
+				libPath = getLibraryFromFragment(fragment);
+		}
+		return libPath;
 	}
 
 	private String getLibraryFromFragment(String fragment) {
@@ -505,6 +562,10 @@ public class Main {
 		if (!checkVersion(System.getProperty("java.version"), System.getProperty(PROP_REQUIRED_JAVA_VERSION))) //$NON-NLS-1$
 			return;
 
+		// verify configuration location is writable
+		if (!checkConfigurationLocation(configurationLocation))
+			return;
+
 		setSecurityPolicy(bootPath);
 		// splash handling is done here, because the default case needs to know
 		// the location of the boot plugin we are going to use
@@ -600,6 +661,41 @@ public class Main {
 	}
 
 	/**
+	 * Checks whether the given location can be created and is writable.
+	 * If the system property "osgi.configuration.area.readOnly" is set
+	 * the check always succeeds.
+	 * <p>Will set PROP_EXITCODE/PROP_EXITDATA accordingly if check fails.</p>
+	 * 
+	 * @param locationUrl  configuration area URL, may be <code>null</code>
+	 * @return a boolean indicating whether the checking passed 
+	 */
+	private boolean checkConfigurationLocation(URL locationUrl) {
+		if (locationUrl == null || !"file".equals(locationUrl.getProtocol())) //$NON-NLS-1$
+			return true;
+		if (Boolean.valueOf(System.getProperty(PROP_CONFIG_AREA + READ_ONLY_AREA_SUFFIX)).booleanValue()) {
+			// user wants readonly config area
+			return true;
+		}
+		File configDir = new File(locationUrl.getFile()).getAbsoluteFile();
+		if (!configDir.exists()) {
+			configDir.mkdirs();
+			if (!configDir.exists()) {
+				System.getProperties().put(PROP_EXITCODE, "15"); //$NON-NLS-1$
+				System.getProperties().put(PROP_EXITDATA, "<title>Invalid Configuration Location</title>The configuration area at '" + configDir + //$NON-NLS-1$
+						"' could not be created.  Please choose a writable location using the '-configuration' command line option."); //$NON-NLS-1$
+				return false;
+			}
+		}
+		if (!canWrite(configDir)) {
+			System.getProperties().put(PROP_EXITCODE, "15"); //$NON-NLS-1$
+			System.getProperties().put(PROP_EXITDATA, "<title>Invalid Configuration Location</title>The configuration area at '" + configDir + //$NON-NLS-1$
+					"' is not writable.  Please choose a writable location using the '-configuration' command line option."); //$NON-NLS-1$
+			return false;
+		}
+		return true;
+	}
+
+	/**
 	 * Returns a string representation of the given URL String.  This converts
 	 * escaped sequences (%..) in the URL into the appropriate characters.
 	 * NOTE: due to class visibility there is a copy of this method
@@ -760,7 +856,7 @@ public class Main {
 			for (int j = 0; j < entries.length; j++)
 				qualifiedPath += ", " + FILE_SCHEME + path + entries[j]; //$NON-NLS-1$
 			extensionProperties.put(PROP_CLASSPATH, qualifiedPath);
-			mergeProperties(System.getProperties(), extensionProperties);
+			mergeProperties(System.getProperties(), extensionProperties, null);
 			if (inDevelopmentMode) {
 				String name = extensions[i];
 				if (name.startsWith(REFERENCE_SCHEME)) {
@@ -923,7 +1019,7 @@ public class Main {
 				matches.add(candidates[i]);
 		}
 		String[] names = (String[]) matches.toArray(new String[matches.size()]);
-		int result = findMax(names);
+		int result = findMax(target, names);
 		if (result == -1)
 			return null;
 		File candidate = new File(start, names[result]);
@@ -981,15 +1077,16 @@ public class Main {
 		return searchFor(target, start);
 	}
 
-	protected int findMax(String[] candidates) {
+	protected int findMax(String prefix, String[] candidates) {
 		int result = -1;
 		Object maxVersion = null;
 		for (int i = 0; i < candidates.length; i++) {
 			String name = (candidates[i] != null) ? candidates[i] : ""; //$NON-NLS-1$
 			String version = ""; //$NON-NLS-1$ // Note: directory with version suffix is always > than directory without version suffix
-			int index = name.indexOf('_');
-			if (index != -1)
-				version = name.substring(index + 1);
+			if (prefix == null)
+				version = name; //webstart just passes in versions
+			else if (name.startsWith(prefix + "_")) //$NON-NLS-1$
+				version = name.substring(prefix.length() + 1); //prefix_version
 			Object currentVersion = getVersionElements(version);
 			if (maxVersion == null) {
 				result = i;
@@ -1346,9 +1443,15 @@ public class Main {
 
 	private void setExitData() {
 		String data = System.getProperty(PROP_EXITDATA);
-		if (data == null || bridge == null)
+		if (data == null)
 			return;
-		bridge.setExitData(exitData, data);
+		//if the bridge is null then we have nothing to send the data to;
+		//exitData is a shared memory id, if we loaded the library from java, we need a non-null exitData
+		//if the executable loaded the library, then we don't need the exitData id
+		if (bridge == null || (bridge.isLibraryLoadedByJava() && exitData == null))
+			System.out.println(data);
+		else
+			bridge.setExitData(exitData, data);
 	}
 
 	/**
@@ -1500,8 +1603,7 @@ public class Main {
 
 			// look for the name to use by the launcher
 			if (args[i - 1].equalsIgnoreCase(NAME)) {
-				//not doing anything with this right now, but still consume it
-				//name = arg;
+				System.getProperties().put(PROP_LAUNCHER_NAME, arg);
 				found = true;
 			}
 
@@ -1644,7 +1746,7 @@ public class Main {
 		Properties configuration = baseConfiguration;
 		if (configuration == null || !getConfigurationLocation().equals(baseConfigurationLocation))
 			configuration = loadConfiguration(getConfigurationLocation());
-		mergeProperties(System.getProperties(), configuration);
+		mergeProperties(System.getProperties(), configuration, null);
 		if ("false".equalsIgnoreCase(System.getProperty(PROP_CONFIG_CASCADED))) //$NON-NLS-1$
 			// if we are not cascaded then remove the parent property even if it was set.
 			System.getProperties().remove(PROP_SHARED_CONFIG_AREA);
@@ -1666,10 +1768,10 @@ public class Main {
 				else {
 					// if the parent we are about to read is the same as the base config we read above,
 					// just reuse the base
-					configuration = baseConfiguration;
+					Properties sharedConfiguration = baseConfiguration;
 					if (!sharedConfigURL.equals(baseConfigurationLocation))
-						configuration = loadConfiguration(sharedConfigURL);
-					mergeProperties(System.getProperties(), configuration);
+						sharedConfiguration = loadConfiguration(sharedConfigURL);
+					mergeProperties(System.getProperties(), sharedConfiguration, configuration);
 					System.getProperties().put(PROP_SHARED_CONFIG_AREA, sharedConfigURL.toExternalForm());
 					if (debug)
 						System.out.println("Shared configuration location:\n    " + sharedConfigURL.toExternalForm()); //$NON-NLS-1$
@@ -1918,6 +2020,7 @@ public class Main {
 		if (splashLocation == null)
 			return;
 
+		bridge.setLauncherInfo(System.getProperty(PROP_LAUNCHER), System.getProperty(PROP_LAUNCHER_NAME));
 		bridge.showSplash(splashLocation);
 		long handle = bridge.getSplashHandle();
 		if (handle != 0 && handle != -1) {
@@ -2380,7 +2483,8 @@ public class Main {
 		}
 	}
 
-	private void mergeProperties(Properties destination, Properties source) {
+	private void mergeProperties(Properties destination, Properties source, Properties userConfiguration) {
+		final String EXT_OVERRIDE_USER = ".override.user"; //$NON-NLS-1$
 		if (destination == null || source == null)
 			return;
 		for (Enumeration e = source.keys(); e.hasMoreElements();) {
@@ -2396,6 +2500,23 @@ public class Main {
 				continue;
 			}
 			String value = source.getProperty(key);
+
+			// Check to see if we are supposed to override existing values from the user configuraiton.
+			// This is done only in the case of shared install where we have already set the user values 
+			// but want to override them with values from the shared location's config.
+			if (userConfiguration != null && !key.endsWith(EXT_OVERRIDE_USER)) {
+				// check all levels to see if the "override" property was set
+				final String overrideKey = key + EXT_OVERRIDE_USER;
+				boolean shouldOverride = destination.getProperty(overrideKey) != null || source.getProperty(overrideKey) != null;
+				// only set the value if the user specified the override property and if the 
+				// original property wasn't set by a commad-line arg
+				if (shouldOverride && !userConfiguration.contains(key)) {
+					destination.put(key, value);
+					continue;
+				}
+			}
+
+			// only set the value if it doesn't already exist to preserve ordering (command-line, user config, shared config)
 			if (destination.getProperty(key) == null)
 				destination.put(key, value);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
index 067e2b6..c4c7440 100644
--- a/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
+++ b/eclipse/plugins/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
@@ -115,7 +115,7 @@ public class WebStartMain extends Main {
 		for (int i = 0; i < versions.length; i++) {
 			versions[i] = ((BundleInfo) matches.get(i)).version;
 		}
-		highest = findMax(versions);
+		highest = findMax(null, versions);
 		return ((BundleInfo) matches.get(highest)).location;
 	}
 
@@ -146,7 +146,7 @@ public class WebStartMain extends Main {
 		for (int i = 0; i < versions.length; i++) {
 			versions[i] = ((BundleInfo) matches.get(i)).version;
 		}
-		highest = findMax(versions);
+		highest = findMax(null, versions);
 		return (BundleInfo) (removeMatch ? matches.remove(highest) : matches.get(highest));
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.log/.project b/eclipse/plugins/org.eclipse.equinox.log/.project
index bc6c96b..1efeb87 100644
--- a/eclipse/plugins/org.eclipse.equinox.log/.project
+++ b/eclipse/plugins/org.eclipse.equinox.log/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.log/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.log/META-INF/MANIFEST.MF
index 398f0c5..dfa64ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.log/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.log/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.log
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.2.100.qualifier
 Bundle-Localization: plugin
 Import-Package: org.osgi.framework;version="1.3.0",
  org.osgi.service.event;version="1.0.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.log/src/org/eclipse/equinox/log/LogPermissionCollection.java b/eclipse/plugins/org.eclipse.equinox.log/src/org/eclipse/equinox/log/LogPermissionCollection.java
index 76bdb6f..df45d54 100644
--- a/eclipse/plugins/org.eclipse.equinox.log/src/org/eclipse/equinox/log/LogPermissionCollection.java
+++ b/eclipse/plugins/org.eclipse.equinox.log/src/org/eclipse/equinox/log/LogPermissionCollection.java
@@ -29,7 +29,7 @@ public final class LogPermissionCollection extends PermissionCollection {
 			throw new IllegalArgumentException("invalid permission: " + permission); //$NON-NLS-1$
 		if (isReadOnly())
 			throw new SecurityException("attempt to add a LogPermission to a readonly LogPermissionCollection"); //$NON-NLS-1$
-		if (permission == null)
+		if (permission != null)
 			logPermission = (LogPermission) permission;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.metatype/.project b/eclipse/plugins/org.eclipse.equinox.metatype/.project
index eeb18ab..79a49a3 100644
--- a/eclipse/plugins/org.eclipse.equinox.metatype/.project
+++ b/eclipse/plugins/org.eclipse.equinox.metatype/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF
index f5e9e4c..5eb3e47 100644
--- a/eclipse/plugins/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.metatype/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-SymbolicName: org.eclipse.equinox.metatype
 Bundle-Activator: org.eclipse.equinox.metatype.Activator
 Import-Package: org.eclipse.osgi.util,
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.classpath
index ef37949..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.classpath
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" output="bin_ant" path="src_ant"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch
deleted file mode 100644
index c2ad0a0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch	
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.artifact.repository"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.project b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.project
index 529f564..641a8f9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.project
@@ -21,17 +21,12 @@
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<triggers>full,incremental,</triggers>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
 			<arguments>
-				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value><project>/.externalToolBuilders/org.eclipse.equinox.p2.artifact.repository buildAntTasks.xml.launch</value>
-				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<name>org.eclipse.pde.ds.core.builder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
index fc844dc..c75efa1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Dec 09 10:24:31 EST 2008
+#Tue Dec 22 19:31:57 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,17 +7,17 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -26,7 +26,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -88,7 +88,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 979e4e8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
index a279085..2eb1090 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/META-INF/MANIFEST.MF
@@ -1,39 +1,28 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.repository;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.repository;singleton:=true
+Bundle-Version: 1.1.1.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.repository.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.artifact.mirror;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processing;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
+Export-Package: org.eclipse.equinox.internal.p2.artifact.processing;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
  org.eclipse.equinox.internal.p2.artifact.processors.md5;x-internal:=true,
  org.eclipse.equinox.internal.p2.artifact.processors.pack200;x-friends:="org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.optimizers",
- org.eclipse.equinox.internal.p2.artifact.repository;x-friends:="org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.reconciler.dropins",
- org.eclipse.equinox.internal.p2.artifact.repository.ant,
- org.eclipse.equinox.internal.p2.artifact.repository.simple;x-friends:="org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.tests",
- org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-  x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
-   org.eclipse.equinox.p2.artifact.processors,
-   org.eclipse.equinox.p2.director.app,
+ org.eclipse.equinox.internal.p2.artifact.repository;
+  x-friends:="org.eclipse.equinox.p2.metadata.generator,
+   org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.reconciler.dropins,
+   org.eclipse.equinox.p2.ui,
+   org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.repository.tools",
+ org.eclipse.equinox.internal.p2.artifact.repository.simple;
+  x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,
+   org.eclipse.equinox.p2.tests,
    org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.garbagecollector,
-   org.eclipse.equinox.p2.reconciler.dropins,
-   org.eclipse.equinox.p2.installer,
    org.eclipse.equinox.p2.publisher,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core",
+   org.eclipse.equinox.p2.extensionlocation",
  org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
   x-friends:="org.eclipse.equinox.p2.artifact.processors,
    org.eclipse.equinox.p2.artifact.optimizers,
@@ -41,43 +30,34 @@ Export-Package: org.eclipse.equinox.internal.p2.artifact.mirror;x-internal:=true
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.ui,
    org.eclipse.equinox.p2.publisher,
-   org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository;
-  x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.extensionlocation,
    org.eclipse.equinox.p2.updatesite"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.registry,
+ org.eclipse.equinox.p2.metadata
 Import-Package: javax.xml.parsers,
  org.eclipse.core.runtime.jobs,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.jarprocessor,
  org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.p2.persistence,
  org.eclipse.equinox.internal.p2.repository,
  org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.metadata,
  org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.equinox.security.storage,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
  org.eclipse.internal.provisional.equinox.p2.jarprocessor;resolution:=optional,
- org.eclipse.osgi.framework.log;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.1.0",
  org.eclipse.osgi.signedcontent;version="1.0.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.util.tracker;version="1.3.0",
+ org.osgi.service.prefs;version="1.1.1",
  org.w3c.dom,
  org.xml.sax;resolution:=optional
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.repository.Activator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Service-Component: OSGI-INF/repositoryManager.xml
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
-Require-Bundle: org.eclipse.ecf.filetransfer,
- org.eclipse.ecf,
- org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry
-Eclipse-BuddyPolicy: registered
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml
new file mode 100644
index 0000000..62a650e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/OSGI-INF/repositoryManager.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.artifact.repository">
+   <implementation class="org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/build.properties
index f00d7fb..57d41dd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/build.properties
@@ -1,25 +1,12 @@
-###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                plugin.xml,\
                about.html,\
                plugin.properties,\
-               ant_tasks/artifactRepository-ant.jar
+               OSGI-INF/
 src.includes = about.html,\
                schema/
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
-                     ant_tasks/artifactRepository-ant.jar
-source.ant_tasks/artifactRepository-ant.jar = src_ant/
-output.ant_tasks/artifactRepository-ant.jar = bin_ant/
+source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml
deleted file mode 100644
index 78fb71d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/buildAntTasks.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.artifact.repository" default="default" basedir=".">
-
-	<target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
-		<mkdir dir="${basedir}/ant_tasks" />
-		<delete file="${basedir}/ant_tasks/artifactRepository-ant.jar" failonerror="false"/>
-		<jar destfile="${basedir}/ant_tasks/artifactRepository-ant.jar" basedir="${basedir}/bin_ant"/>
-	</target>
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/plugin.xml
index 4a2c12a..7025c7f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/plugin.xml
@@ -13,7 +13,7 @@
 
    <extension id="simpleRepository"  point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
 		<filter suffix="artifacts.xml"/>
-		<factory class="org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory"/>
+		<factory class="org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory"/>
    </extension>
    
    <extension id="compositeRepository"  point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
@@ -27,55 +27,9 @@
 		<step class="org.eclipse.equinox.internal.p2.artifact.repository.SignatureVerifier"/>
 	</extension>
 
-   <extension id="mirrorApplication"  point="org.eclipse.core.runtime.applications">
-      <application cardinality="1" thread="main" visible="true">
-         <run class="org.eclipse.equinox.internal.p2.artifact.mirror.MirrorApplication"/>
-      </application>
-   </extension>
-   
    	<extension
 			point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
 			id="org.eclipse.equinox.p2.processing.MD5Verifier">
 		<step class="org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier"/>
 	</extension>
-	
-	<extension point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">
-		<artifactComparator class="org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5ArtifactComparator"
-		id="org.eclipse.equinox.artifact.md5.comparator"/>
-	</extension>
-	
-	<extension point="org.eclipse.ant.core.antTasks">
-		
-		<antTask
-			library="ant_tasks/artifactRepository-ant.jar"
-			name="p2.composite.artifact.repository.add"
-			class="org.eclipse.equinox.internal.p2.artifact.repository.ant.AddChildTask">
-		</antTask>
-		
-		<antTask
-			library="ant_tasks/artifactRepository-ant.jar"
-			name="p2.composite.artifact.repository.create"
-			class="org.eclipse.equinox.internal.p2.artifact.repository.ant.CreateCompositeArtifactRepositoryTask">
-		</antTask>
-
-		<antTask
-			library="ant_tasks/artifactRepository-ant.jar"
-			name="p2.artifact.mirror"
-			class="org.eclipse.equinox.internal.p2.artifact.repository.ant.MirrorApplicationTask">
-		</antTask>
-		
-		<antTask
-			library="ant_tasks/artifactRepository-ant.jar"
-			name="p2.composite.artifact.repository.remove"
-			class="org.eclipse.equinox.internal.p2.artifact.repository.ant.RemoveChildTask">
-		</antTask>
-		
-		<antTask
-			library="ant_tasks/artifactRepository-ant.jar"
-			name="p2.composite.artifact.repository.validate"
-			class="org.eclipse.equinox.internal.p2.artifact.repository.ant.ValidateTask">
-		</antTask>
-
-	</extension>
-
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/pom.xml
new file mode 100644
index 0000000..1427534
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.artifact.repository</artifactId>
+  <version>1.1.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd
index 003ec59..36a7db0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/schema/artifactRepositories.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.equinox.p2.artifact.repository" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.equinox.p2.artifact.repository" id="artifactRepositories" name="Artifact Repositories"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to provide artifact repository implementations
       </documentation>
@@ -12,14 +12,14 @@
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
             <element ref="factory"/>
-            <element ref="filter" minOccurs="0" maxOccurs="1"/>
+            <element ref="filter"/>
          </sequence>
          <attribute name="point" type="string" use="required">
             <annotation>
@@ -40,9 +40,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -56,9 +56,9 @@
                   the fully-qualified name of a class which implements 
 <samp>org.eclipse.equinox.p2.artifact.repository.IArtifactRepository</samp>.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.artifact.repository.IArtifactRepository"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -77,45 +77,45 @@
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          org.eclipse.equinox.p2.artifact.repository 1.0.0
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter extension point usage example here.]
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the class attribute must represent a subclass of <tt>org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory</tt>
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This bundle provides an artifact repository factory for the IArtifactRepositoryManager#TYPE_SIMPLE_REPOSITORY repository type.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2007, 2008 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java
deleted file mode 100644
index a0602b4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/FileMirrorLog.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import java.io.*;
-import java.util.Date;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class FileMirrorLog implements IArtifactMirrorLog {
-
-	private static final String INDENT = "\t"; //$NON-NLS-1$
-	private static final String SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-	private BufferedWriter out;
-	private boolean consoleMessage = false;
-	private int minSeverity = IStatus.OK;
-	private boolean hasRoot = false;
-
-	public FileMirrorLog(String location, int minSeverity, String root) {
-		this.minSeverity = minSeverity;
-		try {
-			File log = new File(location);
-			if (log.getParentFile().exists() || log.getParentFile().mkdirs()) {
-				out = new BufferedWriter(new FileWriter(log, true));
-				if (root != null) {
-					log(root + " - " + new Date()); //$NON-NLS-1$
-					hasRoot = true;
-				}
-			} else
-				throw new IOException(Messages.exception_unableToCreateParentDir);
-		} catch (IOException e) {
-			exceptionOccurred(null, e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
-	 */
-	public void log(IArtifactDescriptor descriptor, IStatus status) {
-		if (status.getSeverity() >= minSeverity) {
-			log(descriptor.toString());
-			log(status, INDENT);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
-	 */
-	public void log(IStatus status) {
-		log(status, ""); //$NON-NLS-1$
-	}
-
-	/*
-	 * Write a status to the log, indenting it based on status depth.
-	 * @param status the status to log
-	 * @param depth the depth of the status
-	 */
-	private void log(IStatus status, String prefix) {
-		if (status.getSeverity() >= minSeverity) {
-			// Write status to log
-			log(prefix + status.getMessage());
-
-			// Write exception to log if applicable
-			String exceptionMessage = status.getException() != null ? status.getException().getMessage() : null;
-			if (exceptionMessage != null)
-				log(prefix + exceptionMessage);
-
-			// Write the children of the status to the log
-			IStatus[] nestedStatus = status.getChildren();
-			if (nestedStatus != null)
-				for (int i = 0; i < nestedStatus.length; i++)
-					log(nestedStatus[i], prefix + INDENT);
-		}
-	}
-
-	/*
-	 * Write a message to the log
-	 * @param message the message to write
-	 */
-	private void log(String message) {
-		try {
-			out.write((hasRoot ? INDENT : "") + message + SEPARATOR); //$NON-NLS-1$
-		} catch (IOException e) {
-			exceptionOccurred((hasRoot ? INDENT : "") + message, e); //$NON-NLS-1$
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
-	 */
-	public void close() {
-		try {
-			if (out != null)
-				out.close();
-		} catch (IOException e) {
-			exceptionOccurred(null, e);
-		}
-	}
-
-	/*
-	 * Show an error message if this the first time, and print status messages.
-	 */
-	private void exceptionOccurred(String message, Exception e) {
-		if (!consoleMessage) {
-			System.err.println(Messages.MirrorLog_Exception_Occurred);
-			e.printStackTrace(System.err);
-			System.err.println(Messages.MirrorLog_Console_Log);
-			consoleMessage = true;
-		}
-		if (message != null)
-			System.out.println(message);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java
deleted file mode 100644
index 959a7a3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/IArtifactMirrorLog.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public interface IArtifactMirrorLog {
-
-	// Log a status associated with a descriptor 
-	public void log(IArtifactDescriptor descriptor, IStatus status);
-
-	// Log a status
-	public void log(IStatus status);
-
-	// Notify that logging is completed & cleanup resources 
-	public void close();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java
deleted file mode 100644
index 83983b5..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5ArtifactComparator;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
-	private URI sourceLocation;
-	private URI destinationLocation;
-	private URI baselineLocation;
-	private IArtifactRepository source;
-	private IArtifactRepository destination;
-	private IArtifactRepository baseline;
-	private boolean append = true;
-	private boolean raw = false;
-	private boolean failOnError = true;
-	private boolean validate = false;
-	private boolean verbose = false;
-	private IArtifactRepositoryManager cachedManager;
-	private boolean sourceLoaded = false;
-	private boolean destinationLoaded = false;
-	private boolean baselineLoaded = false;
-	private boolean compare = false;
-	private String comparatorID = MD5ArtifactComparator.MD5_COMPARATOR_ID; //use MD5 as default
-	private String destinationName;
-	private IArtifactMirrorLog mirrorLog;
-	private IArtifactMirrorLog comparatorLog;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
-	 */
-	public Object start(IApplicationContext context) throws Exception {
-		try {
-			Map args = context.getArguments();
-			initializeFromArguments((String[]) args.get(IApplicationContext.APPLICATION_ARGS));
-			setupRepositories();
-
-			Mirroring mirroring = new Mirroring(source, destination, raw);
-			mirroring.setCompare(compare);
-			mirroring.setComparatorId(comparatorID);
-			mirroring.setBaseline(baseline);
-			mirroring.setValidate(validate);
-			if (comparatorLog != null)
-				mirroring.setComparatorLog(comparatorLog);
-
-			IStatus result = mirroring.run(failOnError, verbose);
-			if (!result.isOK()) {
-				//only noteworthy statuses should be resulted from mirroring.run
-				if (result.matches(IStatus.INFO))
-					System.err.println("Mirroring completed. Please check log file for more information."); //$NON-NLS-1$
-				else
-					System.err.println("Mirroring completed with warnings and/or errors. Please check log file for more information."); //$NON-NLS-1$
-				log(result);
-			}
-			return IApplication.EXIT_OK;
-		} catch (Exception e) {
-			System.err.println(e.getMessage());
-			throw e;
-		} finally {
-			cleanup();
-		}
-	}
-
-	/*
-	 * Return the artifact repository manager. We need to check the service here
-	 * as well as creating one manually in case we are running a stand-alone application
-	 * in which no one has registered a manager yet.
-	 */
-	private IArtifactRepositoryManager getManager() {
-		if (cachedManager != null)
-			return cachedManager;
-		IArtifactRepositoryManager result = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		// service not available... create one and hang onto it
-		if (result == null) {
-			cachedManager = new ArtifactRepositoryManager();
-			result = cachedManager;
-		}
-		return result;
-	}
-
-	private void setupRepositories() throws ProvisionException {
-		if (destinationLocation == null || sourceLocation == null)
-			throw new IllegalStateException(Messages.exception_needSourceDestination);
-
-		//Check if repositories are already loaded
-		sourceLoaded = getManager().contains(sourceLocation);
-		destinationLoaded = getManager().contains(destinationLocation);
-
-		//must execute before initializeDestination is called
-		source = getManager().loadRepository(sourceLocation, 0, null);
-		destination = initializeDestination();
-
-		if (baselineLocation != null) {
-			baselineLoaded = getManager().contains(baselineLocation);
-			try {
-				baseline = getManager().loadRepository(baselineLocation, 0, null);
-			} catch (ProvisionException e) {
-				// catch the exception and log it. we will continue without doing a baseline comparison
-				System.err.println("Error occurred while trying to load baseline repository.");
-				e.printStackTrace();
-			}
-		}
-	}
-
-	private IArtifactRepository initializeDestination() throws ProvisionException {
-		try {
-			IArtifactRepository repository = getManager().loadRepository(destinationLocation, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
-			if (repository != null && repository.isModifiable()) {
-				if (destinationName != null)
-					repository.setName(destinationName);
-				if (!append)
-					repository.removeAll();
-				return repository;
-			}
-		} catch (ProvisionException e) {
-			//fall through and create a new repository below
-		}
-		//This code assumes source has been successfully loaded before this point
-		//No existing repository; create a new repository at destinationLocation but with source's attributes.
-		// TODO for now create a Simple repo by default.
-		return (IArtifactRepository) RepositoryHelper.validDestinationRepository(getManager().createRepository(destinationLocation, destinationName == null ? source.getName() : destinationName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, source.getProperties()));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.app.IApplication#stop()
-	 */
-	public void stop() {
-		// nothing to do
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-
-		String comparatorLogLocation = null;
-		String mirrorLogLocation = null;
-
-		for (int i = 0; i < args.length; i++) {
-			// check for args without parameters (i.e., a flag arg)
-			if (args[i].equalsIgnoreCase("-raw")) //$NON-NLS-1$
-				raw = true;
-			if (args[i].equalsIgnoreCase("-ignoreErrors")) //$NON-NLS-1$
-				failOnError = false;
-			if (args[i].equalsIgnoreCase("-verbose")) //$NON-NLS-1$
-				verbose = true;
-			if (args[i].equalsIgnoreCase("-compare")) //$NON-NLS-1$
-				compare = true;
-			if (args[i].equalsIgnoreCase("-validate")) //$NON-NLS-1$
-				validate = true;
-
-			// check for args with parameters. If we are at the last argument or 
-			// if the next one has a '-' as the first character, then we can't have 
-			// an arg with a param so continue.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-			String arg = args[++i];
-
-			if (args[i - 1].equalsIgnoreCase("-comparator")) //$NON-NLS-1$
-				comparatorID = arg;
-			if (args[i - 1].equalsIgnoreCase("-comparatorLog")) //$NON-NLS-1$
-				comparatorLogLocation = arg;
-			if (args[i - 1].equalsIgnoreCase("-destinationName")) //$NON-NLS-1$
-				destinationName = arg;
-			if (args[i - 1].equalsIgnoreCase("-writeMode")) //$NON-NLS-1$
-				if (args[i].equalsIgnoreCase("clean")) //$NON-NLS-1$
-					append = false;
-			if (args[i - 1].equalsIgnoreCase("-log")) //$NON-NLS-1$
-				mirrorLogLocation = arg;
-
-			try {
-				if (args[i - 1].equalsIgnoreCase("-source")) //$NON-NLS-1$
-					sourceLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
-				if (args[i - 1].equalsIgnoreCase("-destination")) //$NON-NLS-1$
-					destinationLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
-				if (args[i - 1].equalsIgnoreCase("-compareAgainst")) { //$NON-NLS-1$
-					baselineLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
-					compare = true;
-				}
-			} catch (URISyntaxException e) {
-				throw new IllegalArgumentException(NLS.bind(Messages.exception_malformedRepoURI, arg));
-			}
-		}
-		// Create logs
-		if (mirrorLogLocation != null)
-			mirrorLog = getLog(mirrorLogLocation, "p2.artifact.mirror"); //$NON-NLS-1$
-		if (comparatorLogLocation != null && comparatorID != null)
-			comparatorLog = getLog(comparatorLogLocation, comparatorID);
-	}
-
-	public void setLog(IArtifactMirrorLog log) {
-		mirrorLog = log;
-	}
-
-	/*
-	 * Create a MirrorLog based on a filename
-	 */
-	private IArtifactMirrorLog getLog(String location, String root) {
-		if (location.toLowerCase().endsWith(".xml")) //$NON-NLS-1$
-			return new XMLMirrorLog(location, verbose ? IStatus.INFO : IStatus.ERROR, root);
-		return new FileMirrorLog(location, verbose ? IStatus.INFO : IStatus.ERROR, root);
-	}
-
-	/*
-	 * Log the result of mirroring
-	 */
-	private void log(IStatus status) {
-		if (mirrorLog == null) {
-			FrameworkLog log = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
-			if (log != null)
-				System.err.println("Log file location: " + log.getFile()); //$NON-NLS-1$
-			LogHelper.log(status);
-		} else
-			mirrorLog.log(status);
-	}
-
-	/*
-	 * Cleanup
-	 */
-	private void cleanup() {
-		//if the repository was not already loaded before the mirror application started, close it.
-		if (!sourceLoaded && sourceLocation != null)
-			getManager().removeRepository(sourceLocation);
-		if (!destinationLoaded && destinationLocation != null)
-			getManager().removeRepository(destinationLocation);
-		if (baselineLocation != null && !baselineLoaded)
-			getManager().removeRepository(baselineLocation);
-
-		// Close logs
-		if (mirrorLog != null)
-			mirrorLog.close();
-		if (comparatorLog != null)
-			comparatorLog.close();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java
deleted file mode 100644
index 4557369..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/Mirroring.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *  	Compeople AG (Stefan Liebig) - various ongoing maintenance
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A utility class that performs mirroring of artifacts between repositories.
- */
-public class Mirroring {
-	private IArtifactRepository source;
-	private IArtifactRepository destination;
-	private IArtifactRepository baseline;
-	private boolean raw;
-	private boolean compare = false;
-	private boolean validate = false;
-	private IArtifactComparator comparator;
-	private String comparatorID;
-	private IArtifactKey[] keysToMirror;
-	private IArtifactMirrorLog comparatorLog;
-
-	private IArtifactComparator getComparator() {
-		if (comparator == null)
-			comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
-		return comparator;
-	}
-
-	public Mirroring(IArtifactRepository source, IArtifactRepository destination, boolean raw) {
-		this.source = source;
-		this.destination = destination;
-		this.raw = raw;
-	}
-
-	public void setCompare(boolean compare) {
-		this.compare = compare;
-	}
-
-	public void setComparatorId(String id) {
-		this.comparatorID = id;
-	}
-
-	public void setComparatorLog(IArtifactMirrorLog comparatorLog) {
-		this.comparatorLog = comparatorLog;
-	}
-
-	public void setBaseline(IArtifactRepository baseline) {
-		this.baseline = baseline;
-	}
-
-	public void setValidate(boolean validate) {
-		this.validate = validate;
-	}
-
-	public MultiStatus run(boolean failOnError, boolean verbose) {
-		if (!destination.isModifiable())
-			throw new IllegalStateException(NLS.bind(Messages.exception_destinationNotModifiable, destination.getLocation()));
-		if (compare)
-			getComparator(); //initialize the comparator. Only needed if we're comparing. Used to force error if comparatorID is invalid.
-		IArtifactKey[] keys = keysToMirror == null ? source.getArtifactKeys() : keysToMirror;
-		MultiStatus multiStatus = new MultiStatus(Activator.ID, IStatus.OK, Messages.message_mirroringStatus, null);
-		for (int i = 0; i < keys.length; i++) {
-			IArtifactKey key = keys[i];
-			IArtifactDescriptor[] descriptors = source.getArtifactDescriptors(key);
-			for (int j = 0; j < descriptors.length; j++) {
-				IStatus result = mirror(descriptors[j], verbose);
-				//Only log INFO and WARNING if we want verbose logging. Always log ERRORs
-				if (!result.isOK() && (verbose || result.getSeverity() == IStatus.ERROR))
-					multiStatus.add(result);
-				//stop mirroring as soon as we have an error
-				if (failOnError && multiStatus.getSeverity() == IStatus.ERROR)
-					return multiStatus;
-			}
-		}
-		if (validate) {
-			// Simple validation of the mirror
-			IStatus validation = validateMirror(verbose);
-			if (!validation.isOK() && (verbose || validation.getSeverity() == IStatus.ERROR))
-				multiStatus.add(validation);
-		}
-		return multiStatus;
-	}
-
-	private IStatus mirror(IArtifactDescriptor descriptor, boolean verbose) {
-		IArtifactDescriptor newDescriptor = raw ? descriptor : new ArtifactDescriptor(descriptor);
-
-		if (verbose)
-			System.out.println("Mirroring: " + descriptor.getArtifactKey() + " (Descriptor: " + descriptor + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-		if (compare && baseline != null)
-			if (baseline.contains(descriptor)) {
-				// we have to create an output stream based on the descriptor found in the baseline otherwise all
-				// the properties will be copied over from the wrong descriptor and our repository will be inconsistent.
-				IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(descriptor);
-
-				// if we found a descriptor in the baseline then we'll use it to copy the artifact
-				if (baselineDescriptor != null) {
-					MultiStatus status = new MultiStatus(Activator.ID, IStatus.OK, NLS.bind(Messages.Mirroring_compareAndDownload, descriptor), null);
-					//Compare source against baseline
-					IStatus comparison = getComparator().compare(baseline, baselineDescriptor, source, descriptor);
-					if (comparatorLog != null)
-						comparatorLog.log(baselineDescriptor, comparison);
-					status.add(comparison);
-					if (destination.contains(baselineDescriptor))
-						return compareToDestination(baselineDescriptor);
-
-					//download artifact from baseline
-					status.add(downloadArtifact(baseline, baselineDescriptor, baselineDescriptor));
-					return status;
-				}
-			}
-
-		// Check if the destination already contains the file. 
-		if (destination.contains(newDescriptor)) {
-			if (compare)
-				return compareToDestination(descriptor);
-			String message = NLS.bind(Messages.mirror_alreadyExists, descriptor, destination);
-			return new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, message, null);
-		}
-
-		return downloadArtifact(source, newDescriptor, descriptor);
-	}
-
-	/**
-	 * Takes an IArtifactDescriptor descriptor and the ProvisionException that was thrown when destination.getOutputStream(descriptor)
-	 * and compares descriptor to the duplicate descriptor in the destination.
-	 * 
-	 * Callers should verify the ProvisionException was thrown due to the artifact existing in the destination before invoking this method.
-	 * @param descriptor
-	 * @return the status of the compare
-	 */
-	private IStatus compareToDestination(IArtifactDescriptor descriptor) {
-		IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(descriptor.getArtifactKey());
-		IArtifactDescriptor destDescriptor = null;
-		for (int i = 0; destDescriptor == null && i < destDescriptors.length; i++) {
-			if (destDescriptors[i].equals(descriptor))
-				destDescriptor = destDescriptors[i];
-		}
-		if (destDescriptor == null)
-			return new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, Messages.Mirroring_NO_MATCHING_DESCRIPTOR, null);
-		return compare(source, descriptor, destination, destDescriptor);
-	}
-
-	private IStatus compare(IArtifactRepository sourceRepository, IArtifactDescriptor sourceDescriptor, IArtifactRepository destRepository, IArtifactDescriptor destDescriptor) {
-		IStatus comparison = getComparator().compare(sourceRepository, sourceDescriptor, destRepository, destDescriptor);
-		if (comparatorLog != null)
-			comparatorLog.log(sourceDescriptor, comparison);
-		return comparison;
-	}
-
-	/*
-	 * Create, and execute a MirrorRequest for a given descriptor.
-	 */
-	private IStatus downloadArtifact(IArtifactRepository sourceRepo, IArtifactDescriptor destDescriptor, IArtifactDescriptor srcDescriptor) {
-		RawMirrorRequest request = new RawMirrorRequest(srcDescriptor, destDescriptor, destination);
-		request.setSourceRepository(sourceRepo);
-
-		request.perform(new NullProgressMonitor());
-
-		return request.getResult();
-	}
-
-	public void setArtifactKeys(IArtifactKey[] keys) {
-		this.keysToMirror = keys;
-	}
-
-	/*
-	 *  Get the equivalent descriptor from the baseline repository
-	 */
-	private IArtifactDescriptor getBaselineDescriptor(IArtifactDescriptor descriptor) {
-		IArtifactDescriptor[] baselineDescriptors = baseline.getArtifactDescriptors(descriptor.getArtifactKey());
-		for (int i = 0; i < baselineDescriptors.length; i++) {
-			if (baselineDescriptors[i].equals(descriptor))
-				return baselineDescriptors[i];
-		}
-		return null;
-	}
-
-	/* 
-	 * Simple validation of a mirror to see if all source descriptors are present in the destination
-	 */
-	private IStatus validateMirror(boolean verbose) {
-		MultiStatus status = new MultiStatus(Activator.ID, 0, Messages.Mirroring_ValidationError, null);
-
-		// The keys that were mirrored in this session
-		IArtifactKey[] keys = keysToMirror == null ? source.getArtifactKeys() : keysToMirror;
-
-		for (int i = 0; i < keys.length; i++) {
-			IArtifactDescriptor[] srcDescriptors = source.getArtifactDescriptors(keys[i]);
-			IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(keys[i]);
-
-			Arrays.sort(srcDescriptors, new ArtifactDescriptorComparator());
-			Arrays.sort(destDescriptors, new ArtifactDescriptorComparator());
-
-			int src = 0;
-			int dest = 0;
-			while (src < srcDescriptors.length && dest < destDescriptors.length) {
-				if (!destDescriptors[dest].equals(srcDescriptors[src])) {
-					if (destDescriptors[dest].toString().compareTo((srcDescriptors[src].toString())) > 0) {
-						// Missing an artifact
-						if (verbose)
-							System.out.println(NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src]));
-						status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src++])));
-					} else {
-						// Its okay if there are extra descriptors in the destination
-						dest++;
-					}
-				} else {
-					// check properties for differences
-					Map destMap = destDescriptors[dest].getProperties();
-					Map srcProperties = null;
-					if (baseline != null) {
-						IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(destDescriptors[dest]);
-						if (baselineDescriptor != null)
-							srcProperties = baselineDescriptor.getProperties();
-					}
-					// Baseline not set, or could not find descriptor so we'll use the source descriptor
-					if (srcProperties == null)
-						srcProperties = srcDescriptors[src].getProperties();
-
-					// Cycle through properties of the originating descriptor & compare
-					for (Iterator iter = srcProperties.keySet().iterator(); iter.hasNext();) {
-						String key = (String) iter.next();
-						if (!srcProperties.get(key).equals(destMap.get(key))) {
-							if (verbose)
-								System.out.println(NLS.bind(Messages.Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)}));
-							status.add(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)})));
-						}
-					}
-					src++;
-					dest++;
-				}
-			}
-
-			// If there are still source descriptors they're missing from the destination repository 
-			while (src < srcDescriptors.length) {
-				if (verbose)
-					System.out.println(NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src]));
-				status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_MISSING_DESCRIPTOR, srcDescriptors[src++])));
-			}
-		}
-
-		return status;
-	}
-
-	// Simple comparator for ArtifactDescriptors
-	protected class ArtifactDescriptorComparator implements Comparator {
-
-		public int compare(Object arg0, Object arg1) {
-			if (arg0 != null && arg1 != null)
-				return arg0.toString().compareTo(arg1.toString());
-			else if (arg1 == null && arg0 == null)
-				return 0;
-			else if (arg1 == null)
-				return 1;
-			return -1;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java
deleted file mode 100644
index 81e56d5..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/mirror/XMLMirrorLog.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.mirror;
-
-import java.io.*;
-import java.util.Date;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class XMLMirrorLog implements IArtifactMirrorLog {
-	private static final String DEFAULT_FORMAT = "canonical"; //$NON-NLS-1$
-	// Constants used in XML tags
-	private static final String LOG = "log"; //$NON-NLS-1$
-	private static final String TIME_ATTRIBUTE = "time"; //$NON-NLS-1$
-	private static final String DESCRIPTOR_ELEMENT = "descriptor"; //$NON-NLS-1$
-	private static final String DESCRIPTOR_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
-	private static final String DESCRIPTOR_FORMAT_ATTRIBUTE = "format"; //$NON-NLS-1$
-	private static final String DESCRIPTOR_ID_ATTRIBUTE = "id"; //$NON-NLS-1$
-	private static final String DESCRIPTOR_VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
-	private static final String STATUS_ELEMENT = "status"; //$NON-NLS-1$
-	private static final String STATUS_SEVERITY_ATTRIBUTE = "severity"; //$NON-NLS-1$
-	private static final String STATUS_MESSAGE_ATTRIBUTE = "message"; //$NON-NLS-1$
-
-	private int minStatus = IStatus.OK;
-	private XMLWriter writer;
-	private OutputStream outputStream;
-	private boolean consoleMessage = false;
-
-	public XMLMirrorLog(String location, int minStatus, String root) {
-		this.minStatus = minStatus;
-
-		try {
-			outputStream = new FileOutputStream(location);
-			writer = new XMLWriter(outputStream, null);
-			if (root != null)
-				writer.start(root.toLowerCase());
-			else
-				writer.start(LOG);
-			writer.attribute(TIME_ATTRIBUTE, new Date());
-		} catch (UnsupportedEncodingException e) {
-			exceptionOccurred(e);
-		} catch (FileNotFoundException e) {
-			exceptionOccurred(e);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
-	 */
-	public void log(IArtifactDescriptor descriptor, IStatus status) {
-		if (status.getSeverity() < minStatus)
-			return;
-		// Start descriptor tag
-		if (writer != null) {
-			writer.start(DESCRIPTOR_ELEMENT);
-			writer.attribute(DESCRIPTOR_ID_ATTRIBUTE, descriptor.getArtifactKey().getId());
-			writer.attribute(DESCRIPTOR_CLASSIFIER_ATTRIBUTE, descriptor.getArtifactKey().getClassifier());
-			writer.attribute(DESCRIPTOR_VERSION_ATTRIBUTE, descriptor.getArtifactKey().getVersion());
-			if (descriptor.getProperties().get(IArtifactDescriptor.FORMAT) != null)
-				writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, descriptor.getProperties().get(IArtifactDescriptor.FORMAT));
-			else
-				writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, DEFAULT_FORMAT);
-		} else
-			// Creation of the XML writer failed, dump results to the console
-			System.out.println(descriptor);
-
-		log(status);
-
-		// Close descriptor tag
-		if (writer != null)
-			writer.end();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
-	 */
-	public void log(IStatus status) {
-		if (status.getSeverity() < minStatus)
-			return;
-
-		if (writer != null) {
-			// Start status tag
-			writer.start(STATUS_ELEMENT);
-			// Set severity attribute
-			switch (status.getSeverity()) {
-				case IStatus.OK :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "OK"); //$NON-NLS-1$
-					break;
-				case IStatus.INFO :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "INFO"); //$NON-NLS-1$
-					break;
-				case IStatus.WARNING :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "WARNING"); //$NON-NLS-1$
-					break;
-				case IStatus.ERROR :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "ERROR"); //$NON-NLS-1$
-					break;
-				case IStatus.CANCEL :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "CANCEL"); //$NON-NLS-1$
-					break;
-				default :
-					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, status.getSeverity());
-			}
-			// Set  message attribute
-			writer.attribute(STATUS_MESSAGE_ATTRIBUTE, status.getMessage());
-		} else
-			// Creation of the XML writer failed, dump results to the console
-			System.out.println(status);
-
-		// Log children statuses
-		IStatus[] nestedStatus = status.getChildren();
-		if (nestedStatus != null)
-			for (int i = 0; i < nestedStatus.length; i++)
-				log(nestedStatus[i]);
-
-		// Close status tag
-		if (writer != null)
-			writer.end();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
-	 */
-	public void close() {
-		try {
-			if (writer != null) {
-				// Close opening tag & flush results
-				writer.end();
-				writer.flush();
-			}
-		} finally {
-			if (outputStream != null)
-				try {
-					// Close output stream
-					outputStream.close();
-				} catch (IOException e) {
-					exceptionOccurred(e);
-				}
-		}
-	}
-
-	/*
-	 * Show an error message if this the first time
-	 */
-	private void exceptionOccurred(Exception e) {
-		if (!consoleMessage) {
-			System.err.println(Messages.MirrorLog_Exception_Occurred);
-			e.printStackTrace(System.err);
-			System.err.println(Messages.MirrorLog_Console_Log);
-			consoleMessage = true;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java
deleted file mode 100644
index 52c61ad..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5ArtifactComparator.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.processors.md5;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-public class MD5ArtifactComparator implements IArtifactComparator {
-
-	public static String MD5_COMPARATOR_ID = "org.eclipse.equinox.artifact.md5.comparator"; //$NON-NLS-1$
-
-	public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor) {
-		String sourceMD5 = sourceDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
-		String destMD5 = destDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
-
-		if (sourceMD5 == null && destMD5 == null)
-			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5Infomation, sourceDescriptor));
-
-		if (sourceMD5 == null)
-			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, source, sourceDescriptor));
-
-		if (destMD5 == null)
-			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, destination, destDescriptor));
-
-		if (sourceMD5.equals(destMD5))
-			return Status.OK_STATUS;
-
-		return new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.warning_differentMD5, new Object[] {URIUtil.toUnencodedString(sourceDescriptor.getRepository().getLocation()), URIUtil.toUnencodedString(destDescriptor.getRepository().getLocation()), sourceDescriptor}));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
index 3e102c4..49aa609 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
@@ -17,9 +17,10 @@ import java.security.NoSuchAlgorithmException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
 import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
 import org.eclipse.osgi.util.NLS;
 
 public class MD5Verifier extends ProcessingStep {
@@ -38,8 +39,8 @@ public class MD5Verifier extends ProcessingStep {
 	}
 
 	//This handle the case where the MD5 verification is initiated by a processing step
-	public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
-		super.initialize(descriptor, context);
+	public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+		super.initialize(agent, descriptor, context);
 		String data = descriptor.getData();
 		if (IArtifactDescriptor.DOWNLOAD_MD5.equals(data))
 			expectedMD5 = context.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
@@ -50,7 +51,7 @@ public class MD5Verifier extends ProcessingStep {
 		basicInitialize(descriptor);
 	}
 
-	private void basicInitialize(ProcessingStepDescriptor descriptor) {
+	private void basicInitialize(IProcessingStepDescriptor descriptor) {
 		int code = (descriptor == null) ? IStatus.ERROR : descriptor.isRequired() ? IStatus.ERROR : IStatus.INFO;
 		if (expectedMD5 == null || expectedMD5.length() != 32)
 			setStatus(new Status(code, Activator.ID, NLS.bind(Messages.Error_invalid_hash, expectedMD5)));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
index b7e113c..41616ab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
@@ -19,8 +19,6 @@ public class Messages extends NLS {
 	public static String Error_invalid_hash;
 	public static String Error_MD5_unavailable;
 	public static String Error_unexpected_hash;
-	public static String info_noMD5Infomation;
-	public static String info_noMD5InRepository;
 	public static String warning_differentMD5;
 
 	static {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
index 736b651..f82bb99 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
@@ -13,7 +13,4 @@ Error_invalid_hash=MD5 value not available or incorrect size, {0}.
 Error_MD5_unavailable=Could not create MD5 algorithm.
 Error_unexpected_hash=MD5 hash is not as expected. Expected: {0} and found {1}.
 
-info_noMD5Infomation=No MD5 information available for the artifact [{0}].
-info_noMD5InRepository=The repository {0} does not contain MD5 information for artifact [{1}].
-
 warning_differentMD5=The repositories {0} and {1} have different MD5 sums for the artifact [{2}].
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
index 7ba8e63..fa96f4b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
@@ -18,8 +18,10 @@ import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep
 import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
 import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
+import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
 
@@ -28,6 +30,7 @@ import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExec
  */
 public class Pack200ProcessorStep extends AbstractBufferingStep {
 	public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
+	private static boolean detailedResult = false;
 
 	private File incoming;
 
@@ -36,10 +39,23 @@ public class Pack200ProcessorStep extends AbstractBufferingStep {
 		return new BufferedOutputStream(new FileOutputStream(incoming));
 	}
 
-	public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
-		super.initialize(descriptor, context);
-		if (!UnpackStep.canUnpack())
-			setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured")); //$NON-NLS-1$
+	public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+		super.initialize(agent, descriptor, context);
+		if (!UnpackStep.canUnpack()) {
+			IStatus status = null;
+			if (detailedResult) {
+				status = new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured."); //$NON-NLS-1$
+				detailedResult = true;
+			} else {
+				String[] locations = Utils.getPack200Commands("unpack200"); //$NON-NLS-1$
+				StringBuffer locationTried = new StringBuffer(100);
+				for (int i = 0; i < locations.length; i++) {
+					locationTried.append(locations[i]).append(", "); //$NON-NLS-1$
+				}
+				status = new Status(IStatus.ERROR, Activator.ID, "Unpack facility not configured. The locations searched for unpack200 are: " + locationTried); //$NON-NLS-1$
+			}
+			setStatus(status);
+		}
 	}
 
 	protected void cleanupTempFiles() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
index 6343fb2..043ba76 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
 public class Activator implements BundleActivator {
 	public static final String ID = "org.eclipse.equinox.p2.artifact.repository"; //$NON-NLS-1$
 	public static final String REPO_PROVIDER_XPT = ID + '.' + "artifactRepositories"; //$NON-NLS-1$
 
 	private static BundleContext context;
-	private ServiceRegistration repositoryManagerRegistration;
-	private ArtifactRepositoryManager repositoryManager;
 
 	public static BundleContext getContext() {
 		return Activator.context;
@@ -27,19 +25,9 @@ public class Activator implements BundleActivator {
 
 	public void start(BundleContext aContext) throws Exception {
 		Activator.context = aContext;
-		repositoryManager = new ArtifactRepositoryManager();
-		repositoryManagerRegistration = aContext.registerService(IArtifactRepositoryManager.class.getName(), repositoryManager, null);
 	}
 
 	public void stop(BundleContext aContext) throws Exception {
 		Activator.context = null;
-		if (repositoryManagerRegistration != null)
-			repositoryManagerRegistration.unregister();
-		repositoryManagerRegistration = null;
-		if (repositoryManager != null) {
-			repositoryManager.shutdown();
-			repositoryManager = null;
-		}
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java
new file mode 100644
index 0000000..6a0a015
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryComponent.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.artifact.repository;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+
+/**
+ * Service factory providing {@link IArtifactRepositoryManager} instances.
+ */
+public class ArtifactRepositoryComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		return new ArtifactRepositoryManager(agent);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
index 46811e7..155f09f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,17 +12,17 @@
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
 import java.net.URI;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.repository.helpers.LocationProperties;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
 
 /**
  * Default implementation of {@link IArtifactRepositoryManager}.
@@ -30,35 +30,41 @@ import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.Artif
  * TODO the current assumption that the "location" is the dir/root limits us to 
  * having just one repository in a given URL..  
  */
-public class ArtifactRepositoryManager extends AbstractRepositoryManager implements IArtifactRepositoryManager {
+public class ArtifactRepositoryManager extends AbstractRepositoryManager<IArtifactKey> implements IArtifactRepositoryManager {
 
-	public ArtifactRepositoryManager() {
-		super();
+	public ArtifactRepositoryManager(IProvisioningAgent agent) {
+		super(agent);
 	}
 
 	public void addRepository(IArtifactRepository repository) {
 		super.addRepository(repository, true, null);
 	}
 
-	public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Properties destinationDescriptorProperties, Properties destinationRepositoryProperties) {
+	public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Map<String, String> destinationDescriptorProperties, Map<String, String> destinationRepositoryProperties) {
 		return new MirrorRequest(key, destination, destinationDescriptorProperties, destinationRepositoryProperties);
 	}
 
-	public IArtifactRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException {
+	public IArtifactRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		return (IArtifactRepository) doCreateRepository(location, name, type, properties);
 	}
 
-	protected IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException {
+	public IArtifactRepository getRepository(URI location) {
+		return (IArtifactRepository) basicGetRepository(location);
+	}
+
+	protected IRepository<IArtifactKey> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException {
 		ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
 		if (factory == null)
 			return null;
+		factory.setAgent(agent);
 		return factory.create(location, name, type, properties);
 	}
 
-	protected IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
+	protected IRepository<IArtifactKey> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
 		ArtifactRepositoryFactory factory = (ArtifactRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
 		if (factory == null)
 			return null;
+		factory.setAgent(agent);
 		return factory.load(location, flags, monitor.newChild(10));
 	}
 
@@ -97,17 +103,23 @@ public class ArtifactRepositoryManager extends AbstractRepositoryManager impleme
 		return (IArtifactRepository) basicRefreshRepository(location, monitor);
 	}
 
+	protected String[] getPreferredRepositorySearchOrder(LocationProperties properties) {
+		return properties.getArtifactFactorySearchOrder();
+	}
+
 	/**
 	 * Restore the download cache
 	 */
 	protected void restoreSpecialRepositories() {
 		// TODO while recreating, we may want to have proxies on repo instead of the real repo object to limit what is activated.
-		AgentLocation location = (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
+		IAgentLocation location = (IAgentLocation) getAgent().getService(IAgentLocation.SERVICE_NAME);
 		if (location == null)
 			// TODO should do something here since we are failing to restore.
 			return;
+		URI cacheLocation = URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
+
 		try {
-			loadRepository(location.getArtifactRepositoryURI(), null);
+			loadRepository(cacheLocation, null);
 			return;
 		} catch (ProvisionException e) {
 			// log but still continue and try to create a new one
@@ -115,9 +127,9 @@ public class ArtifactRepositoryManager extends AbstractRepositoryManager impleme
 				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while loading download cache.", e)); //$NON-NLS-1$
 		}
 		try {
-			Map properties = new HashMap(1);
+			Map<String, String> properties = new HashMap<String, String>(1);
 			properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
-			createRepository(location.getArtifactRepositoryURI(), "download cache", TYPE_SIMPLE_REPOSITORY, properties); //$NON-NLS-1$
+			createRepository(cacheLocation, "download cache", TYPE_SIMPLE_REPOSITORY, properties); //$NON-NLS-1$
 		} catch (ProvisionException e) {
 			LogHelper.log(e);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java
index 352daa6..2248eab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRequest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
 
 /**
  * Base class for all requests on an {@link IArtifactRepository}.
@@ -35,7 +35,7 @@ public abstract class ArtifactRequest implements IArtifactRequest {
 	}
 
 	/**
-	 * Returns the result of the previous call to {@link #perform(IProgressMonitor)},
+	 * Returns the result of the previous call to {@link #perform(IArtifactRepository, IProgressMonitor)},
 	 * or <code>null</code> if perform has never been called.
 	 * 
 	 * @return The result of the previous perform call.
@@ -54,13 +54,14 @@ public abstract class ArtifactRequest implements IArtifactRequest {
 	/**
 	 * Performs the artifact request, and sets the result status.
 	 * 
+	 * @param sourceRepository the repository to download the artifact from 
 	 * @param monitor a progress monitor, or <code>null</code> if progress
 	 *    reporting is not desired
 	 */
-	abstract public void perform(IProgressMonitor monitor);
+	abstract public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor);
 
 	/**
-	 * Sets the result of an invocation of {@link #perform(IProgressMonitor)}.
+	 * Sets the result of an invocation of {@link #perform(IArtifactRepository, IProgressMonitor)}.
 	 * This method is called by subclasses to set the result status for
 	 * this request.
 	 * 
@@ -70,7 +71,7 @@ public abstract class ArtifactRequest implements IArtifactRequest {
 		result = value;
 	}
 
-	public void setSourceRepository(IArtifactRepository value) {
+	protected void setSourceRepository(IArtifactRepository value) {
 		source = value;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index 411fc37..928d34b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
@@ -18,18 +19,18 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
 import org.eclipse.osgi.util.NLS;
 
-public class CompositeArtifactRepository extends AbstractArtifactRepository implements IArtifactRepository, ICompositeRepository {
+public class CompositeArtifactRepository extends AbstractArtifactRepository implements ICompositeRepository<IArtifactKey> {
 
 	static final public String REPOSITORY_TYPE = CompositeArtifactRepository.class.getName();
 	static final private Integer REPOSITORY_VERSION = new Integer(1);
@@ -40,16 +41,20 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 
 	// keep a list of the child URIs. they can be absolute or relative. they may or may not point
 	// to a valid reachable repo
-	private List childrenURIs = new ArrayList();
+	private List<URI> childrenURIs = new ArrayList<URI>();
 	// keep a list of the repositories that we have successfully loaded
-	private List loadedRepos = new ArrayList();
+	private List<ChildInfo> loadedRepos = new ArrayList<ChildInfo>();
+	private IArtifactRepositoryManager manager;
+	private boolean disableSave;
 
 	/**
 	 * Create a Composite repository in memory.
 	 * @return the repository or null if unable to create one
 	 */
-	public static CompositeArtifactRepository createMemoryComposite() {
-		IArtifactRepositoryManager manager = getManager();
+	public static CompositeArtifactRepository createMemoryComposite(IProvisioningAgent agent) {
+		if (agent == null)
+			return null;
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			return null;
 		try {
@@ -71,21 +76,26 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		return null;
 	}
 
-	static private IArtifactRepositoryManager getManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	private IArtifactRepositoryManager getManager() {
+		return manager;
 	}
 
-	/*
+	/**
 	 * This is only called by the parser when loading a repository.
 	 */
-	public CompositeArtifactRepository(CompositeRepositoryState state) {
-		super(state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
+	CompositeArtifactRepository(IArtifactRepositoryManager manager, CompositeRepositoryState state) {
+		super(manager.getAgent(), state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
+		this.manager = manager;
 		for (int i = 0; i < state.getChildren().length; i++)
 			addChild(state.getChildren()[i], false);
 	}
 
-	public CompositeArtifactRepository(URI location, String repositoryName, Map properties) {
-		super(repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
+	/**
+	 * @noreference This constructor is not intended to be referenced by clients.
+	 */
+	protected CompositeArtifactRepository(IArtifactRepositoryManager manager, URI location, String repositoryName, Map<String, String> properties) {
+		super(manager.getAgent(), repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
+		this.manager = manager;
 		save();
 	}
 
@@ -103,7 +113,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		result.setProvider(getProvider());
 		result.setProperties(getProperties());
 		// it is important to directly access the field so we have the relative URIs
-		result.setChildren((URI[]) childrenURIs.toArray(new URI[childrenURIs.size()]));
+		result.setChildren(childrenURIs.toArray(new URI[childrenURIs.size()]));
 		return result;
 	}
 
@@ -112,7 +122,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	 * in it. Return a boolean value indicating whether or not the object was 
 	 * actually added.
 	 */
-	private static boolean add(List list, Object obj) {
+	private static <T> boolean add(List<T> list, T obj) {
 		return list.contains(obj) ? false : list.add(obj);
 	}
 
@@ -121,23 +131,11 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	private static URI getActualLocation(URI base, String extension) {
-		final String name = CONTENT_FILENAME + extension;
-		String spec = base.toString();
-		if (spec.endsWith(name))
-			return base;
-		if (spec.endsWith("/")) //$NON-NLS-1$
-			spec += name;
-		else
-			spec += "/" + name; //$NON-NLS-1$
-		try {
-			return new URI(spec);
-		} catch (URISyntaxException e) {
-			return null;
-		}
+		return URIUtil.append(base, CONTENT_FILENAME + extension);
 	}
 
 	private boolean isLocal() {
-		return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
+		return "file".equalsIgnoreCase(getLocation().getScheme()); //$NON-NLS-1$
 	}
 
 	public boolean isModifiable() {
@@ -149,7 +147,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	private void addChild(URI childURI, boolean save) {
-		URI absolute = URIUtil.makeAbsolute(childURI, location);
+		URI absolute = URIUtil.makeAbsolute(childURI, getLocation());
 		if (childrenURIs.contains(childURI) || childrenURIs.contains(absolute))
 			return;
 		childrenURIs.add(childURI);
@@ -163,40 +161,39 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		}
 	}
 
-	public boolean addChild(URI childURI, String comparatorID) {
-		try {
-			IArtifactRepository repo = load(childURI);
-			if (isSane(repo, comparatorID)) {
-				addChild(childURI);
-				//Add was successful
-				return true;
-			}
-		} catch (ProvisionException e) {
-			LogHelper.log(e);
-		}
-
-		//Add was not successful
-		return false;
-	}
+	//	public boolean addChild(URI childURI, String comparatorID) {
+	//		try {
+	//			IArtifactRepository repo = load(childURI);
+	//			if (isSane(repo, comparatorID)) {
+	//				addChild(childURI);
+	//				//Add was successful
+	//				return true;
+	//			}
+	//		} catch (ProvisionException e) {
+	//			LogHelper.log(e);
+	//		}
+	//
+	//		//Add was not successful
+	//		return false;
+	//	}
 
 	public void removeChild(URI childURI) {
 		boolean removed = childrenURIs.remove(childURI);
 		// if the child wasn't there make sure and try the other permutation
 		// (absolute/relative) to see if it really is in the list.
-		URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, location) : URIUtil.makeAbsolute(childURI, location);
+		URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, getLocation()) : URIUtil.makeAbsolute(childURI, getLocation());
 		if (!removed)
 			childrenURIs.remove(other);
 
 		if (removed) {
 			// we removed the child from the list so remove the associated repo object as well
 			ChildInfo found = null;
-			for (Iterator iter = loadedRepos.iterator(); found == null && iter.hasNext();) {
-				ChildInfo current = (ChildInfo) iter.next();
+			for (ChildInfo current : loadedRepos) {
 				URI repoLocation = current.repo.getLocation();
-				if (URIUtil.sameURI(childURI, repoLocation))
-					found = current;
-				else if (URIUtil.sameURI(other, repoLocation))
+				if (URIUtil.sameURI(childURI, repoLocation) || URIUtil.sameURI(other, repoLocation)) {
 					found = current;
+					break;
+				}
 			}
 			if (found != null)
 				loadedRepos.remove(found);
@@ -210,10 +207,18 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		save();
 	}
 
-	public List getChildren() {
-		List result = new ArrayList();
-		for (Iterator iter = childrenURIs.iterator(); iter.hasNext();)
-			result.add(URIUtil.makeAbsolute((URI) iter.next(), location));
+	public List<URI> getChildren() {
+		List<URI> result = new ArrayList<URI>();
+		for (URI uri : childrenURIs)
+			result.add(URIUtil.makeAbsolute(uri, getLocation()));
+		return result;
+	}
+
+	public List<IArtifactRepository> getLoadedChildren() {
+		List<IArtifactRepository> result = new ArrayList<IArtifactRepository>(loadedRepos.size());
+		for (ChildInfo info : loadedRepos) {
+			result.add(info.repo);
+		}
 		return result;
 	}
 
@@ -262,8 +267,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	public boolean contains(IArtifactKey key) {
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
-			ChildInfo current = (ChildInfo) repositoryIterator.next();
+		for (ChildInfo current : loadedRepos) {
 			if (current.isGood() && current.repo.contains(key))
 				return true;
 		}
@@ -271,8 +275,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	public boolean contains(IArtifactDescriptor descriptor) {
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
-			ChildInfo current = (ChildInfo) repositoryIterator.next();
+		for (ChildInfo current : loadedRepos) {
 			if (current.isGood() && current.repo.contains(descriptor))
 				return true;
 		}
@@ -280,36 +283,24 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
-		ArrayList result = new ArrayList();
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
-			ChildInfo current = (ChildInfo) repositoryIterator.next();
+		ArrayList<IArtifactDescriptor> result = new ArrayList<IArtifactDescriptor>();
+		for (ChildInfo current : loadedRepos) {
 			if (current.isGood()) {
 				IArtifactDescriptor[] tempResult = current.repo.getArtifactDescriptors(key);
 				for (int i = 0; i < tempResult.length; i++)
 					add(result, tempResult[i]);
 			}
 		}
-		return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
-	}
-
-	public IArtifactKey[] getArtifactKeys() {
-		ArrayList result = new ArrayList();
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
-			ChildInfo current = (ChildInfo) repositoryIterator.next();
-			if (current.isGood()) {
-				IArtifactKey[] tempResult = current.repo.getArtifactKeys();
-				for (int i = 0; i < tempResult.length; i++)
-					add(result, tempResult[i]);
-			}
-		}
-		return (IArtifactKey[]) result.toArray(new IArtifactKey[result.size()]);
+		return result.toArray(new IArtifactDescriptor[result.size()]);
 	}
 
 	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
 		SubMonitor subMonitor = SubMonitor.convert(monitor, requests.length);
 		MultiStatus multiStatus = new MultiStatus(Activator.ID, IStatus.OK, Messages.message_childrenRepos, null);
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext() && requests.length > 0;) {
-			IArtifactRepository current = ((ChildInfo) repositoryIterator.next()).repo;
+		for (ChildInfo childInfo : loadedRepos) {
+			if (requests.length == 0)
+				break;
+			IArtifactRepository current = childInfo.repo;
 			IArtifactRequest[] applicable = getRequestsForRepository(current, requests);
 			IStatus dlStatus = current.getArtifacts(applicable, subMonitor.newChild(requests.length));
 			multiStatus.add(dlStatus);
@@ -333,25 +324,28 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	private IStatus getRawOrNormalArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor, boolean raw) {
-		for (Iterator childIterator = loadedRepos.iterator(); childIterator.hasNext();) {
-			ChildInfo current = (ChildInfo) childIterator.next();
+		for (Iterator<ChildInfo> childIterator = loadedRepos.iterator(); childIterator.hasNext();) {
+			ChildInfo current = childIterator.next();
 			if (current.isGood() && current.repo.contains(descriptor)) {
 				// Child hasn't failed & contains descriptor
 				IStatus status = raw ? current.repo.getRawArtifact(descriptor, destination, monitor) : current.repo.getArtifact(descriptor, destination, monitor);
-				if (!status.isOK()) {
-					// Download failed
-					if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL)
-						// Child has mirrors & wants to be retried, or we were canceled
-						return status;
-					// Child has failed us, mark it bad
-					current.setBad();
-					if (childIterator.hasNext())
-						// More children are available, set retry
-						return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, current.repo.getLocation(), descriptor.getArtifactKey()), null);
-					// Nothing that can be done, pass child's failure on
-					return status;
+				if (status.isOK()) {
+					//we are done with this artifact so forgive bad children so they can try again on next artifact
+					resetChildFailures();
+					return Status.OK_STATUS;
 				}
-				return Status.OK_STATUS;
+				// Download failed
+				if (status.getCode() == CODE_RETRY || status.getCode() == IStatus.CANCEL)
+					// Child has mirrors & wants to be retried, or we were canceled
+					return status;
+				// Child has failed us, mark it bad
+				current.setBad(true);
+				// If more children are available, set retry
+				if (childIterator.hasNext())
+					return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {status}, NLS.bind(Messages.retryRequest, current.repo.getLocation(), descriptor.getArtifactKey()), null);
+				// Nothing that can be done, pass child's failure on
+				resetChildFailures();
+				return status;
 			}
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
@@ -359,8 +353,18 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.artifact_not_found, descriptor));
 	}
 
+	/**
+	 * Rests the failure state on all children to 'good'. This is done after a successful
+	 * download to ensure that children who failed to obtain one artifact get a chance
+	 * on the next artifact.
+	 */
+	private void resetChildFailures() {
+		for (ChildInfo current : loadedRepos)
+			current.setBad(false);
+	}
+
 	private IArtifactRequest[] filterUnfetched(IArtifactRequest[] requests) {
-		ArrayList filteredRequests = new ArrayList();
+		ArrayList<IArtifactRequest> filteredRequests = new ArrayList<IArtifactRequest>();
 		for (int i = 0; i < requests.length; i++) {
 			if (requests[i].getResult() == null || !requests[i].getResult().isOK()) {
 				filteredRequests.add(requests[i]);
@@ -373,23 +377,31 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 	}
 
 	private IArtifactRequest[] getRequestsForRepository(IArtifactRepository repository, IArtifactRequest[] requests) {
-		ArrayList applicable = new ArrayList();
+		ArrayList<IArtifactRequest> applicable = new ArrayList<IArtifactRequest>();
 		for (int i = 0; i < requests.length; i++) {
 			if (repository.contains(requests[i].getArtifactKey()))
 				applicable.add(requests[i]);
 		}
-		return (IArtifactRequest[]) applicable.toArray(new IArtifactRequest[applicable.size()]);
+		return applicable.toArray(new IArtifactRequest[applicable.size()]);
 	}
 
-	private void save() {
+	/**
+	 * This method is only protected for testing purposes
+	 * 
+	 * @nooverride This method is not intended to be re-implemented or extended by clients.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected void save() {
+		if (disableSave)
+			return;
 		if (!isModifiable())
 			return;
-		boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
+		boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
 		OutputStream os = null;
 		try {
-			URI actualLocation = getActualLocation(location, false);
+			URI actualLocation = getActualLocation(getLocation(), false);
 			File artifactsFile = URIUtil.toFile(actualLocation);
-			File jarFile = URIUtil.toFile(getActualLocation(location, true));
+			File jarFile = URIUtil.toFile(getActualLocation(getLocation(), true));
 			if (!compress) {
 				if (jarFile.exists()) {
 					jarFile.delete();
@@ -415,13 +427,13 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 			super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
 			new CompositeRepositoryIO().write(toState(), os, PI_REPOSITORY_TYPE);
 		} catch (IOException e) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, location), e));
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, getLocation()), e));
 		}
 	}
 
 	private IArtifactRepository load(URI repoURI) throws ProvisionException {
 		// make sure we are dealing with an absolute location
-		repoURI = URIUtil.makeAbsolute(repoURI, location);
+		repoURI = URIUtil.makeAbsolute(repoURI, getLocation());
 		boolean loaded = getManager().contains(repoURI);
 		IArtifactRepository repo = getManager().loadRepository(repoURI, null);
 		if (!loaded) {
@@ -433,73 +445,73 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 		return repo;
 	}
 
-	/**
-	 * A method to check if the content of a repository is consistent with the other children by
-	 * comparing content using the artifactComparator specified by the comparatorID
-	 * @param toCheckRepo the repository to check
-	 * @param comparatorID
-	 * @return <code>true</code> if toCheckRepo is consistent, <code>false</code> if toCheckRepo 
-	 * contains an equal descriptor to that of a child and they refer to different artifacts on disk.
-	 */
-	private boolean isSane(IArtifactRepository toCheckRepo, String comparatorID) {
-		IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
-		for (Iterator repositoryIterator = loadedRepos.iterator(); repositoryIterator.hasNext();) {
-			IArtifactRepository current = ((ChildInfo) repositoryIterator.next()).repo;
-			if (!current.equals(toCheckRepo)) {
-				if (!isSane(toCheckRepo, current, comparator))
-					return false;
-			}
-		}
-		return true;
-	}
-
-	/*
-	 * Check the two given repositories against each other using the given comparator.
-	 */
-	private boolean isSane(IArtifactRepository one, IArtifactRepository two, IArtifactComparator comparator) {
-		IArtifactKey[] toCheckKeys = one.getArtifactKeys();
-		for (int i = 0; i < toCheckKeys.length; i++) {
-			IArtifactKey key = toCheckKeys[i];
-			if (!two.contains(key))
-				continue;
-			IArtifactDescriptor[] toCheckDescriptors = one.getArtifactDescriptors(key);
-			IArtifactDescriptor[] currentDescriptors = two.getArtifactDescriptors(key);
-			for (int j = 0; j < toCheckDescriptors.length; j++) {
-				if (!two.contains(toCheckDescriptors[j]))
-					continue;
-				for (int k = 0; k < currentDescriptors.length; k++) {
-					if (currentDescriptors[k].equals(toCheckDescriptors[j])) {
-						IStatus compareResult = comparator.compare(two, currentDescriptors[k], two, toCheckDescriptors[j]);
-						if (!compareResult.isOK()) {
-							LogHelper.log(compareResult);
-							return false;
-						}
-						break;
-					}
-				}
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * A method that verifies that all children with matching artifact descriptors contain the same set of bytes
-	 * The verification is done using the artifactComparator specified by comparatorID
-	 * Assumes more valuable logging and output is the responsibility of the artifactComparator implementation.
-	 * @param comparatorID
-	 * @returns true if the repository is consistent, false if two equal descriptors refer to different artifacts on disk.
-	 */
-	public boolean validate(String comparatorID) {
-		IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
-		ChildInfo[] repos = (ChildInfo[]) loadedRepos.toArray(new ChildInfo[loadedRepos.size()]);
-		for (int outer = 0; outer < repos.length; outer++) {
-			for (int inner = outer + 1; inner < repos.length; inner++) {
-				if (!isSane(repos[outer].repo, repos[inner].repo, comparator))
-					return false;
-			}
-		}
-		return true;
-	}
+	//	/**
+	//	 * A method to check if the content of a repository is consistent with the other children by
+	//	 * comparing content using the artifactComparator specified by the comparatorID
+	//	 * @param toCheckRepo the repository to check
+	//	 * @param comparatorID
+	//	 * @return <code>true</code> if toCheckRepo is consistent, <code>false</code> if toCheckRepo 
+	//	 * contains an equal descriptor to that of a child and they refer to different artifacts on disk.
+	//	 */
+	//	private boolean isSane(IArtifactRepository toCheckRepo, String comparatorID) {
+	//		IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
+	//		for (ChildInfo childInfo : loadedRepos) {
+	//			IArtifactRepository current = childInfo.repo;
+	//			if (!current.equals(toCheckRepo)) {
+	//				if (!isSane(toCheckRepo, current, comparator))
+	//					return false;
+	//			}
+	//		}
+	//		return true;
+	//	}
+	//
+	//	/*
+	//	 * Check the two given repositories against each other using the given comparator.
+	//	 */
+	//	private boolean isSane(IArtifactRepository one, IArtifactRepository two, IArtifactComparator comparator) {
+	//		IQueryResult<IArtifactKey> toCheckKeys = one.query(ArtifactKeyQuery.ALL_KEYS, null);
+	//		for (Iterator<IArtifactKey> iterator = toCheckKeys.iterator(); iterator.hasNext();) {
+	//			IArtifactKey key = iterator.next();
+	//			if (!two.contains(key))
+	//				continue;
+	//			IArtifactDescriptor[] toCheckDescriptors = one.getArtifactDescriptors(key);
+	//			IArtifactDescriptor[] currentDescriptors = two.getArtifactDescriptors(key);
+	//			for (int j = 0; j < toCheckDescriptors.length; j++) {
+	//				if (!two.contains(toCheckDescriptors[j]))
+	//					continue;
+	//				for (int k = 0; k < currentDescriptors.length; k++) {
+	//					if (currentDescriptors[k].equals(toCheckDescriptors[j])) {
+	//						IStatus compareResult = comparator.compare(two, currentDescriptors[k], two, toCheckDescriptors[j]);
+	//						if (!compareResult.isOK()) {
+	//							LogHelper.log(compareResult);
+	//							return false;
+	//						}
+	//						break;
+	//					}
+	//				}
+	//			}
+	//		}
+	//		return true;
+	//	}
+	//
+	//	/**
+	//	 * A method that verifies that all children with matching artifact descriptors contain the same set of bytes
+	//	 * The verification is done using the artifactComparator specified by comparatorID
+	//	 * Assumes more valuable logging and output is the responsibility of the artifactComparator implementation.
+	//	 * @param comparatorID
+	//	 * @returns true if the repository is consistent, false if two equal descriptors refer to different artifacts on disk.
+	//	 */
+	//	private boolean validate(String comparatorID) {
+	//		IArtifactComparator comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
+	//		ChildInfo[] repos = loadedRepos.toArray(new ChildInfo[loadedRepos.size()]);
+	//		for (int outer = 0; outer < repos.length; outer++) {
+	//			for (int inner = outer + 1; inner < repos.length; inner++) {
+	//				if (!isSane(repos[outer].repo, repos[inner].repo, comparator))
+	//					return false;
+	//			}
+	//		}
+	//		return true;
+	//	}
 
 	private static class ChildInfo {
 		IArtifactRepository repo;
@@ -509,12 +521,60 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
 			this.repo = IArtifactRepository;
 		}
 
-		void setBad() {
-			good = false;
+		void setBad(boolean bad) {
+			good = !bad;
 		}
 
 		boolean isGood() {
 			return good;
 		}
 	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		// Query all the all the repositories this composite repo contains
+		List<IArtifactRepository> repos = new ArrayList<IArtifactRepository>();
+		for (ChildInfo info : loadedRepos) {
+			if (info.isGood())
+				repos.add(info.repo);
+		}
+		IQueryable<IArtifactKey> queryable = QueryUtil.compoundQueryable(repos);
+		return queryable.query(query, monitor);
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		// Query all the all the repositories this composite repo contains
+		List<IQueryable<IArtifactDescriptor>> repos = new ArrayList<IQueryable<IArtifactDescriptor>>();
+		for (ChildInfo info : loadedRepos) {
+			if (info.isGood())
+				repos.add(info.repo.descriptorQueryable());
+		}
+		return QueryUtil.compoundQueryable(repos);
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		IStatus result = null;
+		synchronized (this) {
+			try {
+				disableSave = true;
+				runnable.run(monitor);
+			} catch (OperationCanceledException oce) {
+				return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+			} catch (Throwable e) {
+				result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+			} finally {
+				disableSave = false;
+				try {
+					save();
+				} catch (Exception e) {
+					if (result != null)
+						result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
+					else
+						result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+				}
+			}
+		}
+		if (result == null)
+			result = Status.OK_STATUS;
+		return result;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java
index e587abf..180ed01 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepositoryFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
@@ -19,91 +20,107 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.repository.CacheManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
 import org.eclipse.osgi.util.NLS;
 
 public class CompositeArtifactRepositoryFactory extends ArtifactRepositoryFactory {
 
+	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
+	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
+	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
+
+	private IArtifactRepositoryManager getManager() {
+		if (getAgent() != null)
+			return (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+		return null;
+	}
+
+	/**
+	 * Returns a file in the local file system that contains the contents of the
+	 * metadata repository at the given location.
+	 */
+	private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
+		File localFile = null;
+		URI jarLocation = CompositeArtifactRepository.getActualLocation(location, true);
+		URI xmlLocation = CompositeArtifactRepository.getActualLocation(location, false);
+		// If the repository is local, we can return the repository file directly
+		if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
+			//look for a compressed local file
+			localFile = URIUtil.toFile(jarLocation);
+			if (localFile.exists())
+				return localFile;
+			//look for an uncompressed local file
+			localFile = URIUtil.toFile(xmlLocation);
+			if (localFile.exists())
+				return localFile;
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
+		}
+		//file is not local, create a cache of the repository metadata
+		CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
+		if (cache == null)
+			throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
+		localFile = cache.createCache(location, CompositeArtifactRepository.CONTENT_FILENAME, monitor);
+		if (localFile == null) {
+			//there is no remote file in either form
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
+		}
+		return localFile;
+	}
+
 	public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
-		final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
 		long time = 0;
 		final String debugMsg = "Restoring artifact repository "; //$NON-NLS-1$
 		if (Tracing.DEBUG_METADATA_PARSING) {
 			Tracing.debug(debugMsg + location);
 			time = -System.currentTimeMillis();
 		}
-		File localFile = null;
-		boolean local = false;
+
+		SubMonitor sub = SubMonitor.convert(monitor, 400);
 		try {
-			SubMonitor sub = SubMonitor.convert(monitor, 300);
-			OutputStream artifacts = null;
-			// try with compressed
-			boolean compress = true;
-			if (PROTOCOL_FILE.equals(location.getScheme())) {
-				local = true;
-				localFile = URIUtil.toFile(CompositeArtifactRepository.getActualLocation(location, true));
-				if (!localFile.exists()) {
-					localFile = URIUtil.toFile(CompositeArtifactRepository.getActualLocation(location, false));
-					compress = false;
-				}
-			} else {
-				//not local, return null if the caller wanted a modifiable repo
-				if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
-					return null;
-				}
+			//non local repos are not modifiable
+			if (!PROTOCOL_FILE.equals(location.getScheme()) && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0)
+				return null;
 
-				//download to local temp file
-				localFile = File.createTempFile(CompositeArtifactRepository.CONTENT_FILENAME, CompositeArtifactRepository.XML_EXTENSION);
-				try {
-					artifacts = new BufferedOutputStream(new FileOutputStream(localFile));
-					IStatus status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
-					if (!status.isOK()) {
-						// retry uncompressed
-						compress = false;
-						status = getTransport().download(CompositeArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
-						if (!status.isOK())
-							throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
-					}
-				} finally {
-					if (artifacts != null)
-						artifacts.close();
-				}
-			}
-			InputStream descriptorStream = null;
+			File localFile = getLocalFile(location, sub.newChild(300));
+			InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
+			JarInputStream jarStream = null;
 			try {
-				descriptorStream = new BufferedInputStream(new FileInputStream(localFile));
-				if (compress) {
-					URI actualLocation = CompositeArtifactRepository.getActualLocation(location, false);
-					JarInputStream jInStream = new JarInputStream(descriptorStream);
-					JarEntry jarEntry = jInStream.getNextJarEntry();
-					String filename = URIUtil.lastSegment(actualLocation);
-					while (jarEntry != null && filename != null && !(filename.equals(jarEntry.getName()))) {
-						jarEntry = jInStream.getNextJarEntry();
+				//if reading from a jar, obtain a stream on the entry with the actual contents
+				if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
+					jarStream = new JarInputStream(inStream);
+					JarEntry jarEntry = jarStream.getNextJarEntry();
+					String entryName = CompositeArtifactRepository.CONTENT_FILENAME + XML_EXTENSION;
+					while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
+						jarEntry = jarStream.getNextJarEntry();
 					}
-					if (jarEntry == null) {
-						//there is a jar but the entry is missing or invalid, so treat this as an invalid repository
-						throw new IOException(NLS.bind(Messages.io_invalidLocation, actualLocation.getPath()));
-					}
-					descriptorStream = jInStream;
+
+					//there is a jar but the entry is missing or invalid, so treat this as an invalid repository
+					if (jarEntry == null)
+						throw new IOException(NLS.bind(Messages.io_invalidLocation, location.getPath()));
 				}
+				//parse the repository descriptor file
+				sub.setWorkRemaining(100);
+				InputStream descriptorStream = jarStream != null ? jarStream : inStream;
 				CompositeRepositoryIO io = new CompositeRepositoryIO();
 				CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeArtifactRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
 				if (resultState.getLocation() == null)
 					resultState.setLocation(location);
-				CompositeArtifactRepository result = new CompositeArtifactRepository(resultState);
+				CompositeArtifactRepository result = new CompositeArtifactRepository(getManager(), resultState);
 				if (Tracing.DEBUG_METADATA_PARSING) {
 					time += System.currentTimeMillis();
 					Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
 				}
 				return result;
 			} finally {
-				if (descriptorStream != null)
-					descriptorStream.close();
+				safeClose(jarStream);
+				safeClose(inStream);
 			}
 		} catch (FileNotFoundException e) {
 			String msg = NLS.bind(Messages.io_failedRead, location);
@@ -112,16 +129,25 @@ public class CompositeArtifactRepositoryFactory extends ArtifactRepositoryFactor
 			String msg = NLS.bind(Messages.io_failedRead, location);
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
 		} finally {
-			if (!local && localFile != null && !localFile.delete())
-				localFile.deleteOnExit();
+			if (monitor != null)
+				monitor.done();
 		}
 	}
 
-	public IArtifactRepository create(URI location, String name, String type, Map properties) {
-		return new CompositeArtifactRepository(location, name, properties);
+	public IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) {
+		return new CompositeArtifactRepository(getManager(), location, name, properties);
 	}
 
-	private Transport getTransport() {
-		return RepositoryTransport.getInstance();
+	/**
+	 * Closes a stream, ignoring any secondary exceptions
+	 */
+	private void safeClose(InputStream stream) {
+		if (stream == null)
+			return;
+		try {
+			stream.close();
+		} catch (IOException e) {
+			//ignore
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
index c15f22c..72dedad 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
@@ -17,6 +17,7 @@ public class Messages extends NLS {
 
 	public static String artifact_not_found;
 	public static String available_already_in;
+	public static String no_location;
 	public static String downloading;
 	public static String error_closing_stream;
 	public static String io_failedRead;
@@ -39,25 +40,14 @@ public class Messages extends NLS {
 	public static String sar_reportStatus;
 
 	public static String mirror_alreadyExists;
-	public static String message_mirroringStatus;
 	public static String message_childrenRepos;
 	public static String exception_comparatorNotFound;
 	public static String exception_noComparators;
-	public static String exception_destinationNotModifiable;
-	public static String exception_needSourceDestination;
-	public static String exception_malformedRepoURI;
 	public static String exception_unsupportedAddToComposite;
 
 	public static String exception_unsupportedGetOutputStream;
 	public static String exception_unsupportedRemoveFromComposite;
 
-	public static String Mirroring_NO_MATCHING_DESCRIPTOR;
-	public static String Mirroring_MISSING_DESCRIPTOR;
-	public static String Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY;
-
-	public static String Mirroring_ValidationError;
-	public static String Mirroring_compareAndDownload;
-
 	public static String MirrorLog_Console_Log;
 	public static String MirrorLog_Exception_Occurred;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
index 5623b78..1262780 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *  	Compeople AG (Stefan Liebig) - various ongoing maintenance
  *   	Genuitec LLC - various bug fixes
@@ -13,48 +13,68 @@
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
 import java.io.*;
-import java.util.Properties;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
 import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
 import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
 import org.eclipse.osgi.util.NLS;
 
 /**
  * A request to mirror (copy) an artifact into a given destination artifact repository.
  */
 public class MirrorRequest extends ArtifactRequest {
-	private static final ProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
+	/**
+	 * The name of a repository property on an artifact repository, indicating the base URI
+	 * to be used for reporting download statistics.
+	 */
+	private static final String PROP_STATS_URI = "p2.statsURI"; //$NON-NLS-1$
+
+	/**
+	 * The name of a property on an artifact descriptor, indicating the relative download URI
+	 * to be used to report download statistics for that artifact. The value of this property,
+	 * if present, is appended to the {@link #PROP_STATS_URI} to create the full URI
+	 * for reporting download statistics for that artifact.
+	 */
+	private static final String PROP_DOWNLOAD_STATS = "download.stats"; //$NON-NLS-1$
 
 	protected final IArtifactRepository target;
 
-	private final Properties targetDescriptorProperties;
-	private final Properties targetRepositoryProperties;
+	private final Map<String, String> targetDescriptorProperties;
+	private final Map<String, String> targetRepositoryProperties;
 	protected IArtifactDescriptor descriptor;
 
-	public MirrorRequest(IArtifactKey key, IArtifactRepository targetRepository, Properties targetDescriptorProperties, Properties targetRepositoryProperties) {
+	public MirrorRequest(IArtifactKey key, IArtifactRepository targetRepository, Map<String, String> targetDescriptorProperties, Map<String, String> targetRepositoryProperties) {
 		super(key);
 		target = targetRepository;
 		if (targetDescriptorProperties == null || targetDescriptorProperties.isEmpty()) {
 			this.targetDescriptorProperties = null;
 		} else {
-			this.targetDescriptorProperties = new Properties();
+			this.targetDescriptorProperties = new HashMap<String, String>();
 			this.targetDescriptorProperties.putAll(targetDescriptorProperties);
 		}
 
 		if (targetRepositoryProperties == null || targetRepositoryProperties.isEmpty()) {
 			this.targetRepositoryProperties = null;
 		} else {
-			this.targetRepositoryProperties = new Properties();
+			this.targetRepositoryProperties = new HashMap<String, String>();
 			this.targetRepositoryProperties.putAll(targetRepositoryProperties);
 		}
 	}
 
-	public void perform(IProgressMonitor monitor) {
+	public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor) {
 		monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
+		setSourceRepository(sourceRepository);
 		// Do we already have the artifact in the target?
 		if (target.contains(getArtifactKey())) {
 			setResult(new Status(IStatus.OK, Activator.ID, NLS.bind(Messages.available_already_in, getArtifactKey())));
@@ -91,7 +111,7 @@ public class MirrorRequest extends ArtifactRequest {
 			return;
 		}
 
-		ArtifactDescriptor destinationDescriptor = getDestinationDescriptor(descriptor);
+		IArtifactDescriptor destinationDescriptor = getDestinationDescriptor(descriptor);
 		IStatus status = transfer(destinationDescriptor, descriptor, monitor);
 		// if ok, cancelled or transfer has already been done with the canonical form return with status set 
 		if (status.getSeverity() == IStatus.CANCEL) {
@@ -125,21 +145,21 @@ public class MirrorRequest extends ArtifactRequest {
 			setResult(new MultiStatus(Activator.ID, canonicalStatus.getCode() != 0 ? canonicalStatus.getCode() : status.getCode(), new IStatus[] {status, canonicalStatus}, Messages.MirrorRequest_multipleDownloadProblems, null));
 	}
 
-	private ArtifactDescriptor getDestinationDescriptor(IArtifactDescriptor sourceDescriptor) {
+	private IArtifactDescriptor getDestinationDescriptor(IArtifactDescriptor sourceDescriptor) {
 		// Get the descriptor to use to store the artifact
 		// Since we are mirroring, ensure we clear out data from the original descriptor that may
 		// not apply in the new repo location.
 		// TODO this is brittle.  perhaps the repo itself should do this?  there are cases where
 		// we really do need to give the repo the actual descriptor to use however...
-		ArtifactDescriptor destinationDescriptor = new ArtifactDescriptor(sourceDescriptor);
-		destinationDescriptor.setProcessingSteps(EMPTY_STEPS);
-		destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, null);
-		destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, null);
-		destinationDescriptor.setProperty(IArtifactDescriptor.FORMAT, null);
-		if (targetDescriptorProperties != null)
-			destinationDescriptor.addProperties(targetDescriptorProperties);
-		if (targetRepositoryProperties != null)
-			destinationDescriptor.addRepositoryProperties(targetRepositoryProperties);
+		IArtifactDescriptor destinationDescriptor = target.createArtifactDescriptor(sourceDescriptor.getArtifactKey());
+		//		destinationDescriptor.setProcessingSteps(EMPTY_STEPS);
+		//		destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, null);
+		//		destinationDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, null);
+		//		destinationDescriptor.setProperty(IArtifactDescriptor.FORMAT, null);
+		if (targetDescriptorProperties != null && destinationDescriptor instanceof ArtifactDescriptor)
+			((ArtifactDescriptor) destinationDescriptor).addProperties(targetDescriptorProperties);
+		if (targetRepositoryProperties != null && destinationDescriptor instanceof SimpleArtifactDescriptor)
+			((SimpleArtifactDescriptor) destinationDescriptor).addRepositoryProperties(targetRepositoryProperties);
 		return destinationDescriptor;
 	}
 
@@ -158,9 +178,37 @@ public class MirrorRequest extends ArtifactRequest {
 		do {
 			status = transferSingle(destinationDescriptor, sourceDescriptor, monitor);
 		} while (status.getSeverity() == IStatus.ERROR && status.getCode() == IArtifactRepository.CODE_RETRY);
+		if (status.isOK())
+			collectStats(sourceDescriptor, monitor);
 		return status;
 	}
 
+	/**
+	 * Collect download statistics, if specified by the descriptor and the source repository
+	 */
+	private void collectStats(IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) {
+		final String statsProperty = sourceDescriptor.getProperty(PROP_DOWNLOAD_STATS);
+		if (statsProperty == null)
+			return;
+		String statsRoot = sourceDescriptor.getRepository().getProperties().get(PROP_STATS_URI);
+		if (statsRoot == null)
+			return;
+		URI statsURI;
+		try {
+			statsURI = URIUtil.append(new URI(statsRoot), statsProperty);
+		} catch (URISyntaxException e) {
+			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Unable to report download statistics due to invalid URL: " + statsRoot + " suffix: " + statsProperty)); //$NON-NLS-1$ //$NON-NLS-2$
+			return;
+		}
+		try {
+			RepositoryTransport.getInstance().getLastModified(statsURI, monitor);
+		} catch (FileNotFoundException e) {
+			//ignore because it is expected that the statistics URI doesn't represent an existing file
+		} catch (Exception e) {
+			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Failure reporting download statistics to URL: " + statsURI, e)); //$NON-NLS-1$
+		}
+	}
+
 	private IStatus transferSingle(IArtifactDescriptor destinationDescriptor, IArtifactDescriptor sourceDescriptor, IProgressMonitor monitor) {
 		OutputStream destination;
 		try {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
index 8104d23..2d4ca3c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorSelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.artifact.repository;
 
+import java.io.FileNotFoundException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
@@ -21,7 +22,7 @@ import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.repository.DownloadStatus;
 import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.w3c.dom.*;
 import org.xml.sax.InputSource;
 
@@ -39,9 +40,16 @@ public class MirrorSelector {
 	/**
 	 * Encapsulates information about a single mirror
 	 */
-	public static class MirrorInfo implements Comparable {
+	public static class MirrorInfo implements Comparable<MirrorInfo> {
+		private static final long PRIMARY_FAILURE_LINGER_TIME = 30000; // Retry again after 30 seconds
+		private static final long SECONDARY_FAILURE_LINGER_TIME = 300000; // Wait 5 minutes
+		private static final int ACCEPTABLE_FILE_NOT_FOUND_COUNT = 5; // Given an established connection, those are generally quick
+		private static final Timer resetFailure = new Timer(true);
+
 		long bytesPerSecond;
 		int failureCount;
+		int fileNotFoundCount;
+		int totalFailureCount;
 		private final int initialRank;
 		String locationString;
 
@@ -51,36 +59,86 @@ public class MirrorSelector {
 			if (!locationString.endsWith("/")) //$NON-NLS-1$
 				locationString = locationString + "/"; //$NON-NLS-1$
 			failureCount = 0;
+			totalFailureCount = 0;
 			bytesPerSecond = DownloadStatus.UNKNOWN_RATE;
 		}
 
 		/**
 		 * Comparison used to sort mirrors.
 		 */
-		public int compareTo(Object o) {
-			if (!(o instanceof MirrorInfo))
-				return 0;
-			MirrorInfo that = (MirrorInfo) o;
-			//less failures is better
-			if (this.failureCount != that.failureCount)
-				return this.failureCount - that.failureCount;
-			//faster is better
-			if (this.bytesPerSecond != that.bytesPerSecond)
-				return (int) (that.bytesPerSecond - this.bytesPerSecond);
-			//trust that initial rank indicates geographical proximity
-			return this.initialRank - that.initialRank;
+		public synchronized int compareTo(MirrorInfo that) {
+			synchronized (that) {
+				double rank = 0.0;
+				if (bytesPerSecond != that.bytesPerSecond) {
+					if (bytesPerSecond != DownloadStatus.UNKNOWN_RATE && that.bytesPerSecond != DownloadStatus.UNKNOWN_RATE) {
+						if (bytesPerSecond > that.bytesPerSecond)
+							rank -= (double) bytesPerSecond / (double) that.bytesPerSecond;
+						else
+							rank += (double) that.bytesPerSecond / (double) bytesPerSecond;
+					}
+				}
+
+				//less failures is better
+				if (failureCount != that.failureCount) {
+					if (failureCount > that.failureCount)
+						rank += ((double) (failureCount + 1) / (double) (that.failureCount + 1)) * 2.0;
+					else
+						rank -= ((double) (that.failureCount + 1) / (double) (failureCount + 1)) * 2.0;
+				}
+
+				if (rank == 0.0)
+					//trust that initial rank indicates geographical proximity
+					rank = initialRank - that.initialRank;
+
+				if (rank == 0.0)
+					return 0;
+
+				int intRank;
+				intRank = (int) rank;
+				if (intRank == 0)
+					intRank = rank > 0 ? 1 : -1;
+				return intRank;
+			}
 		}
 
-		public void incrementFailureCount() {
-			this.failureCount++;
+		public synchronized String toString() {
+			return "Mirror(" + locationString + ',' + failureCount + ',' + bytesPerSecond + ')'; //$NON-NLS-1$
 		}
 
-		public void setBytesPerSecond(long newValue) {
-			this.bytesPerSecond = newValue;
+		public synchronized void decrementFailureCount() {
+			if (failureCount > 0)
+				failureCount--;
 		}
 
-		public String toString() {
-			return "Mirror(" + locationString + ',' + failureCount + ',' + bytesPerSecond + ')'; //$NON-NLS-1$
+		public synchronized void incrementFailureCount() {
+			++failureCount;
+			++totalFailureCount;
+			if (totalFailureCount < 3) {
+				resetFailure.schedule(new TimerTask() {
+					@Override
+					public void run() {
+						decrementFailureCount();
+					}
+				}, totalFailureCount == 1 ? PRIMARY_FAILURE_LINGER_TIME : SECONDARY_FAILURE_LINGER_TIME);
+			}
+		}
+
+		public synchronized void setBytesPerSecond(long newValue) {
+			// Any non-positive value is treated as an unknown rate
+			if (newValue <= 0)
+				newValue = DownloadStatus.UNKNOWN_RATE;
+
+			if (newValue > 0)
+				// Back in commission
+				failureCount = 0;
+			bytesPerSecond = newValue;
+		}
+
+		public synchronized void incrementFileNotFoundCount() {
+			if (++fileNotFoundCount > ACCEPTABLE_FILE_NOT_FOUND_COUNT) {
+				incrementFailureCount();
+				fileNotFoundCount = 0;
+			}
 		}
 	}
 
@@ -91,7 +149,7 @@ public class MirrorSelector {
 
 	MirrorInfo[] mirrors;
 
-	private final IRepository repository;
+	private final IRepository<?> repository;
 
 	private final Random random = new Random();
 
@@ -100,10 +158,10 @@ public class MirrorSelector {
 	 * not contacted and the mirrorsURL document is not parsed until a
 	 * mirror location request is sent.
 	 */
-	public MirrorSelector(IRepository repository) {
+	public MirrorSelector(IRepository<?> repository) {
 		this.repository = repository;
 		try {
-			String base = (String) repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL);
+			String base = repository.getProperties().get(IRepository.PROP_MIRRORS_BASE_URL);
 			if (base != null) {
 				this.baseURI = new URI(base);
 			} else {
@@ -204,7 +262,7 @@ public class MirrorSelector {
 	private MirrorInfo[] initMirrors(IProgressMonitor monitor) {
 		if (mirrors != null)
 			return mirrors;
-		String mirrorsURL = (String) repository.getProperties().get(IRepository.PROP_MIRRORS_URL);
+		String mirrorsURL = repository.getProperties().get(IRepository.PROP_MIRRORS_URL);
 		if (mirrorsURL != null)
 			mirrors = computeMirrors(mirrorsURL, monitor);
 		return mirrors;
@@ -223,8 +281,16 @@ public class MirrorSelector {
 		for (int i = 0; i < mirrors.length; i++) {
 			MirrorInfo mirror = mirrors[i];
 			if (toDownload.startsWith(mirror.locationString)) {
-				if (!result.isOK() && result.getSeverity() != IStatus.CANCEL)
-					mirror.incrementFailureCount();
+				if (!result.isOK() && result.getSeverity() != IStatus.CANCEL) {
+					// Punishing a mirror harshly for a FileNotFoundException can be very wrong.
+					// Some artifacts are not found on any mirror. When that's the case,
+					// the best mirrors will be the first to receive that kind of punishment.
+					//
+					if (result.getException() instanceof FileNotFoundException)
+						mirror.incrementFileNotFoundCount();
+					else
+						mirror.incrementFailureCount();
+				}
 				if (result instanceof DownloadStatus) {
 					long oldRate = mirror.bytesPerSecond;
 					long newRate = ((DownloadStatus) result).getTransferRate();
@@ -235,7 +301,6 @@ public class MirrorSelector {
 				}
 				if (Tracing.DEBUG_MIRRORS)
 					Tracing.debug("Updated mirror " + mirror); //$NON-NLS-1$
-				Arrays.sort(mirrors);
 				return;
 			}
 		}
@@ -246,9 +311,11 @@ public class MirrorSelector {
 	 * @return whether or not there is a valid mirror in this selector.
 	 */
 	public synchronized boolean hasValidMirror() {
-		// return true if there is a mirror and it has not failed.  Since the mirrors
-		// list is sorted with failures last, we only have to test the first element for failure.
-		return mirrors != null && mirrors.length > 0 && mirrors[0].failureCount == 0;
+		// return true if there is a mirror and it doesn't have multiple failures.
+		if (mirrors == null || mirrors.length == 0)
+			return false;
+		Arrays.sort(mirrors);
+		return mirrors[0].failureCount < 2;
 	}
 
 	/**
@@ -260,22 +327,37 @@ public class MirrorSelector {
 		int mirrorCount;
 		if (mirrors == null || (mirrorCount = mirrors.length) == 0)
 			return null;
-		//this is a function that randomly selects a mirror based on a logarithmic
-		//distribution. Mirror 0 has a 1/2 chance of being selected, mirror 1 has a 1/4 chance, 
-		// mirror 2 has a 1/8 chance, etc. This introduces some variation in the mirror 
-		//selection, while still heavily favoring better mirrors
-		//the algorithm computes the most significant digit in a binary number by computing the base 2 logarithm
-		//if the first digit is most significant, mirror 0 is selected, if the second is most significant, mirror 1 is selected, etc
-		int highestMirror = Math.min(15, mirrorCount);
-		int result = (int) (Math.log(random.nextInt(1 << highestMirror) + 1) / LOG2);
-		if (result >= highestMirror || result < 0)
-			result = highestMirror - 1;
-		MirrorInfo selected = mirrors[highestMirror - 1 - result];
-		//if we selected a mirror that has failed in the past, revert to best available mirror
-		if (selected.failureCount > 0)
+
+		MirrorInfo selected;
+		if (mirrorCount == 1)
 			selected = mirrors[0];
-		//for now, don't tolerate failing mirrors
-		if (selected.failureCount > 0)
+		else {
+			Arrays.sort(mirrors);
+			for (;;) {
+				//this is a function that randomly selects a mirror based on a logarithmic
+				//distribution. Mirror 0 has a 1/2 chance of being selected, mirror 1 has a 1/4 chance, 
+				// mirror 2 has a 1/8 chance, etc. This introduces some variation in the mirror 
+				//selection, while still heavily favoring better mirrors
+				//the algorithm computes the most significant digit in a binary number by computing the base 2 logarithm
+				//if the first digit is most significant, mirror 0 is selected, if the second is most significant, mirror 1 is selected, etc
+				int highestMirror = Math.min(15, mirrorCount);
+				int result = (int) (Math.log(random.nextInt(1 << highestMirror) + 1) / LOG2);
+				if (result >= highestMirror || result < 0)
+					result = highestMirror - 1;
+
+				int mirrorIndex = highestMirror - 1 - result;
+				selected = mirrors[mirrorIndex];
+
+				// If the ranking of the selected mirror is significantly worse then the top ranked
+				// mirror, then we consider this a bad choice and reiterate.
+				if (mirrorIndex == 0 || mirrors[0].compareTo(selected) < 4)
+					// This is good enough
+					break;
+			}
+		}
+
+		//for now, don't tolerate mirrors with multiple failures
+		if (selected.failureCount > 1)
 			return null;
 		return selected;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
index 3c82b55..740775e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
@@ -14,10 +14,10 @@ import java.io.OutputStream;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier;
 import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
 import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
 import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 import org.eclipse.osgi.util.NLS;
 
 public class RawMirrorRequest extends MirrorRequest {
@@ -29,8 +29,9 @@ public class RawMirrorRequest extends MirrorRequest {
 		this.targetDescriptor = targetDescriptor;
 	}
 
-	public void perform(IProgressMonitor monitor) {
+	public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor) {
 		monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
+		setSourceRepository(sourceRepository);
 		// Do we already have the descriptor in the target?
 		if (target.contains(targetDescriptor)) {
 			setResult(new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.mirror_alreadyExists, targetDescriptor, target)));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java
index 5533067..2108b52 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/SignatureVerifier.java
@@ -78,7 +78,7 @@ public class SignatureVerifier extends ProcessingStep {
 		} catch (GeneralSecurityException e) {
 			return new Status(IStatus.ERROR, Activator.ID, Messages.SignatureVerification_failedRead + inputFile, e);
 		}
-		ArrayList allStatus = new ArrayList(0);
+		ArrayList<IStatus> allStatus = new ArrayList<IStatus>(0);
 		SignedContentEntry[] entries = signedContent.getSignedEntries();
 		for (int i = 0; i < entries.length; i++)
 			try {
@@ -90,7 +90,7 @@ public class SignatureVerifier extends ProcessingStep {
 				break;
 			}
 		if (allStatus.size() > 0)
-			return new MultiStatus(Activator.ID, IStatus.ERROR, (IStatus[]) allStatus.toArray(new IStatus[allStatus.size()]), Messages.SignatureVerification_invalidFileContent + inputFile, null);
+			return new MultiStatus(Activator.ID, IStatus.ERROR, allStatus.toArray(new IStatus[allStatus.size()]), Messages.SignatureVerification_invalidFileContent + inputFile, null);
 		return Status.OK_STATUS;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
index 9b80fc9..64bf989 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
@@ -10,6 +10,7 @@
 ###############################################################################
 artifact_not_found=Artifact not found: {0}.
 available_already_in=The artifact is already available in the repository {0}.
+no_location=No location for {0}.
 downloading=Downloading {0}
 error_closing_stream=Error closing the output stream for {0} on repository {1}.
 
@@ -36,19 +37,10 @@ sar_reportStatus=Problems downloading artifact: {0}.
 
 mirror_alreadyExists=Artifact: {0} already exists in repository: {1}.
 
-message_mirroringStatus = Messages while mirroring artifact descriptors.
 message_childrenRepos = Messages while trying children repositories.
 
 exception_comparatorNotFound = The Artifact Comparator {0} was not found.
 exception_noComparators = No Artifact Comparators are available.
-exception_destinationNotModifiable = The destination repository must be modifiable: {0}.
-exception_needSourceDestination = Must specify a source and destination.
-exception_malformedRepoURI = The repository location ({0}) must be a URI.
-Mirroring_NO_MATCHING_DESCRIPTOR=Could not match descriptor for compare
-Mirroring_MISSING_DESCRIPTOR=Missing descriptor: {0}.
-Mirroring_DIFFERENT_DESCRIPTOR_PROPERTY=Descriptor {0} has different properties for {1}, source: {2}, destination: {3}. 
-Mirroring_ValidationError=Error occurred while validating mirror.
-Mirroring_compareAndDownload=Compare and download of {0} from baseline.
 MirrorLog_Console_Log=Logging to the console instead.
 MirrorLog_Exception_Occurred=An exception occurred while writing to the log:
 MirrorRequest_multipleDownloadProblems=Multiple problems occurred while downloading.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
index e3697cb..bf6fed2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.equinox.internal.p2.artifact.repository.simple;
 
 import java.io.*;
 import java.net.URI;
-import java.util.Iterator;
 import java.util.Set;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.URIUtil;
@@ -93,9 +92,9 @@ public class BlobStore {
 	/**
 	 * Delete all of the blobs in the given set.
 	 */
-	public void deleteBlobs(Set set) {
-		for (Iterator i = set.iterator(); i.hasNext();)
-			deleteBlob((byte[]) i.next());
+	public void deleteBlobs(Set<byte[]> set) {
+		for (byte[] blob : set)
+			deleteBlob(blob);
 	}
 
 	public URI fileFor(byte[] uuid) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
index 0001a28..20373a7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
@@ -12,13 +12,12 @@ package org.eclipse.equinox.internal.p2.artifact.repository.simple;
 import java.util.LinkedList;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
 
 public class DownloadJob extends Job {
 	static final Object FAMILY = new Object();
 
-	private LinkedList requestsPending;
+	private LinkedList<IArtifactRequest> requestsPending;
 	private SimpleArtifactRepository repository;
 	private IProgressMonitor masterMonitor;
 	private MultiStatus overallStatus;
@@ -28,7 +27,7 @@ public class DownloadJob extends Job {
 		setSystem(true);
 	}
 
-	void initialize(SimpleArtifactRepository repository, LinkedList requestsPending, IProgressMonitor masterMonitor, MultiStatus overallStatus) {
+	void initialize(SimpleArtifactRepository repository, LinkedList<IArtifactRequest> requestsPending, IProgressMonitor masterMonitor, MultiStatus overallStatus) {
 		this.repository = repository;
 		this.requestsPending = requestsPending;
 		this.masterMonitor = masterMonitor;
@@ -53,7 +52,7 @@ public class DownloadJob extends Job {
 			synchronized (requestsPending) {
 				if (requestsPending.isEmpty())
 					break;
-				request = (IArtifactRequest) requestsPending.removeFirst();
+				request = requestsPending.removeFirst();
 			}
 			if (masterMonitor.isCanceled())
 				return Status.CANCEL_STATUS;
@@ -61,7 +60,7 @@ public class DownloadJob extends Job {
 			SubProgressMonitor subMonitor = new SubProgressMonitor(masterMonitor, 1);
 			subMonitor.beginTask("", 1); //$NON-NLS-1$
 			try {
-				IStatus status = repository.getArtifact((ArtifactRequest) request, subMonitor);
+				IStatus status = repository.getArtifact(request, subMonitor);
 				if (!status.isOK()) {
 					synchronized (overallStatus) {
 						overallStatus.add(status);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java
new file mode 100644
index 0000000..4455432
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/KeyIndex.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.artifact.repository.simple;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.index.Index;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ * An index that maps id to IArtifactKey
+ */
+public class KeyIndex extends Index<IArtifactKey> {
+	// Memory conserving map. Stores either String -> IArtifactKey
+	// or String -> IArtifactKey[]
+	// A stored array is always length >= 2.
+	private final Map<String, Object> artifactMap;
+
+	public KeyIndex(Collection<IArtifactKey> artifactKeys) {
+		artifactMap = new HashMap<String, Object>(artifactKeys.size());
+		for (IArtifactKey ak : artifactKeys) {
+			Object prev = artifactMap.put(ak.getId(), ak);
+			if (prev != null) {
+				if (prev instanceof IArtifactKey)
+					artifactMap.put(ak.getId(), new IArtifactKey[] {(IArtifactKey) prev, ak});
+				else {
+					IArtifactKey[] prevArr = (IArtifactKey[]) prev;
+					IArtifactKey[] nxtArr = new IArtifactKey[prevArr.length + 1];
+					System.arraycopy(prevArr, 0, nxtArr, 0, prevArr.length);
+					nxtArr[prevArr.length] = ak;
+					artifactMap.put(ak.getId(), nxtArr);
+				}
+			}
+		}
+	}
+
+	public Iterator<IArtifactKey> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+		Object queriedKeys = getQueriedIDs(ctx, variable, ArtifactKey.MEMBER_ID, booleanExpr, null);
+		if (queriedKeys == null)
+			return null;
+
+		Collection<IArtifactKey> collector = null;
+		if (queriedKeys.getClass().isArray()) {
+			Object[] keyArr = (Object[]) queriedKeys;
+			int idx = keyArr.length;
+			while (--idx >= 0) {
+				Object v = artifactMap.get(keyArr[idx]);
+				if (v == null)
+					continue;
+				if (collector == null)
+					collector = new ArrayList<IArtifactKey>();
+				if (v instanceof IArtifactKey)
+					collector.add((IArtifactKey) v);
+				else {
+					IArtifactKey[] akArr = (IArtifactKey[]) v;
+					for (IArtifactKey ak : akArr)
+						collector.add(ak);
+				}
+			}
+			if (collector == null)
+				collector = CollectionUtils.emptySet();
+		} else {
+			Object v = artifactMap.get(queriedKeys);
+			if (v == null)
+				collector = CollectionUtils.emptySet();
+			else if (v instanceof IArtifactKey)
+				collector = Collections.singleton((IArtifactKey) v);
+			else
+				collector = CollectionUtils.unmodifiableList((IArtifactKey[]) v);
+		}
+		return collector.iterator();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java
index de962a7..80b6b3e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/Mapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,7 +53,7 @@ public class Mapper {
 
 	public URI map(URI repositoryLocation, String classifier, String id, String version, String format) {
 		String locationString = URIUtil.toUnencodedString(repositoryLocation);
-		Dictionary values = new Hashtable(5);
+		Dictionary<String, Object> values = new Hashtable<String, Object>(5);
 		if (repositoryLocation != null)
 			values.put(REPOURL, locationString);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactDescriptor.java
new file mode 100644
index 0000000..baa1886
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactDescriptor.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.artifact.repository.simple;
+
+import java.util.Map;
+import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+
+public class SimpleArtifactDescriptor extends ArtifactDescriptor {
+	public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
+
+	protected Map<String, String> repositoryProperties = new OrderedProperties();
+
+	public SimpleArtifactDescriptor(IArtifactKey key) {
+		super(key);
+	}
+
+	public SimpleArtifactDescriptor(IArtifactDescriptor base) {
+		super(base);
+	}
+
+	public String getRepositoryProperty(String propertyKey) {
+		return repositoryProperties.get(propertyKey);
+	}
+
+	public void setRepositoryProperty(String key, String value) {
+		if (value == null)
+			repositoryProperties.remove(key);
+		else
+			repositoryProperties.put(key, value);
+	}
+
+	public void addRepositoryProperties(Map<String, String> additionalProperties) {
+		repositoryProperties.putAll(additionalProperties);
+	}
+
+	/**
+	 * Returns a read-only collection of the repository properties of the artifact descriptor.
+	 * @return the repository properties of this artifact descriptor.
+	 */
+	public Map<String, String> getRepositoryProperties() {
+		return OrderedProperties.unmodifiableProperties(repositoryProperties);
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null || !(obj instanceof SimpleArtifactDescriptor))
+			return false;
+
+		SimpleArtifactDescriptor other = (SimpleArtifactDescriptor) obj;
+
+		//Properties affecting SimpleArtifactRepository#getLocation
+		String locationProperty = getRepositoryProperty(ARTIFACT_REFERENCE);
+		String otherProperty = other.getRepositoryProperty(ARTIFACT_REFERENCE);
+		// want not null and the same, or both null
+		if (locationProperty != null ? !locationProperty.equals(otherProperty) : otherProperty != null)
+			return false;
+
+		return super.equals(obj);
+	}
+
+	public int hashCode() {
+		int superHash = super.hashCode();
+		String ref = getRepositoryProperty(ARTIFACT_REFERENCE);
+		if (ref != null)
+			return 31 * superHash + ref.hashCode();
+		return superHash;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index fc225be..329611e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -1,13 +1,15 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * 	IBM Corporation - initial API and implementation
  * 	Genuitec, LLC - support for multi-threaded downloads
+ *  Cloudsmith Inc. - query indexes
+ *  Sonatype Inc - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.artifact.repository.simple;
 
@@ -15,6 +17,7 @@ import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
+import java.util.Map.Entry;
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import org.eclipse.core.runtime.*;
@@ -23,19 +26,27 @@ import org.eclipse.equinox.internal.p2.artifact.processors.md5.MD5Verifier;
 import org.eclipse.equinox.internal.p2.artifact.repository.*;
 import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
+import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
 import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
 import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
 import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
 import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
 import org.eclipse.osgi.util.NLS;
 
-public class SimpleArtifactRepository extends AbstractArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
+public class SimpleArtifactRepository extends AbstractArtifactRepository implements IFileArtifactRepository, IIndexProvider<IArtifactKey> {
 	/** 
 	 * A boolean property controlling whether mirroring is enabled.
 	 */
@@ -43,6 +54,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 
 	public static final boolean MD5_CHECK_ENABLED = !"false".equals(Activator.getContext().getProperty("eclipse.p2.MD5Check")); //$NON-NLS-1$//$NON-NLS-2$
 
+	public static final String CONTENT_FILENAME = "artifacts"; //$NON-NLS-1$
+
 	/** 
 	 * The key for a integer property controls the maximum number
 	 * of threads that should be used when optimizing downloads from a remote
@@ -182,7 +195,6 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	private static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
 	private static final String ARTIFACT_UUID = "artifact.uuid"; //$NON-NLS-1$
 	static final private String BLOBSTORE = ".blobstore/"; //$NON-NLS-1$
-	static final private String CONTENT_FILENAME = "artifacts"; //$NON-NLS-1$
 	static final private String[][] PACKED_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed))", "${repoUrl}/plugins/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
 			{"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
 			{"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$ //$NON-NLS-2$
@@ -197,12 +209,16 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 
 	static final private Integer REPOSITORY_VERSION = new Integer(1);
 	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-	protected Set artifactDescriptors = new HashSet();
-	protected Map artifactMap = new HashMap();
+	protected Set<SimpleArtifactDescriptor> artifactDescriptors = new HashSet<SimpleArtifactDescriptor>();
+	/**
+	 * Map<IArtifactKey,List<IArtifactDescriptor>> containing the index of artifacts in the repository.
+	 */
+	private Map<IArtifactKey, List<IArtifactDescriptor>> artifactMap = new HashMap<IArtifactKey, List<IArtifactDescriptor>>();
 	private transient BlobStore blobStore;
 	transient private Mapper mapper = new Mapper();
+	private KeyIndex keyIndex;
+	private boolean snapshotNeeded = false;
 
-	static final private String PACKED_FORMAT = "packed"; //$NON-NLS-1$
 	static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
 
 	private static final int DEFAULT_MAX_THREADS = 4;
@@ -211,6 +227,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 
 	private MirrorSelector mirrors;
 
+	private boolean disableSave = false;
+
 	static void delete(File toDelete) {
 		if (toDelete.isDirectory()) {
 			File[] children = toDelete.listFiles();
@@ -223,24 +241,12 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		toDelete.delete();
 	}
 
-	public static URI getActualLocation(URI base, boolean compress) throws IOException {
+	public static URI getActualLocation(URI base, boolean compress) {
 		return getActualLocation(base, compress ? JAR_EXTENSION : XML_EXTENSION);
 	}
 
-	private static URI getActualLocation(URI base, String extension) throws IOException {
-		final String name = CONTENT_FILENAME + extension;
-		String spec = base.toString();
-		if (spec.endsWith(name))
-			return base;
-		if (spec.endsWith("/")) //$NON-NLS-1$
-			spec += name;
-		else
-			spec += "/" + name; //$NON-NLS-1$
-		try {
-			return new URI(spec);
-		} catch (URISyntaxException e) {
-			throw new IOException(NLS.bind(Messages.io_invalidLocation, spec));
-		}
+	private static URI getActualLocation(URI base, String extension) {
+		return URIUtil.append(base, CONTENT_FILENAME + extension);
 	}
 
 	public static URI getBlobStoreLocation(URI base) {
@@ -250,42 +256,60 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	/*
 	 * This is only called by the parser when loading a repository.
 	 */
-	SimpleArtifactRepository(String name, String type, String version, String description, String provider, Set artifacts, String[][] mappingRules, Map properties) {
-		super(name, type, version, null, description, provider, properties);
+	SimpleArtifactRepository(IProvisioningAgent agent, String name, String type, String version, String description, String provider, Set<SimpleArtifactDescriptor> artifacts, String[][] mappingRules, Map<String, String> properties) {
+		super(agent, name, type, version, null, description, provider, properties);
 		this.artifactDescriptors.addAll(artifacts);
 		this.mappingRules = mappingRules;
-		for (Iterator it = artifactDescriptors.iterator(); it.hasNext();)
-			mapDescriptor((IArtifactDescriptor) it.next());
+		for (SimpleArtifactDescriptor desc : artifactDescriptors)
+			mapDescriptor(desc);
 	}
 
-	private void mapDescriptor(IArtifactDescriptor descriptor) {
+	private synchronized void mapDescriptor(IArtifactDescriptor descriptor) {
 		IArtifactKey key = descriptor.getArtifactKey();
-		Collection descriptors = (Collection) artifactMap.get(key);
+		if (snapshotNeeded) {
+			cloneAritfactMap();
+			snapshotNeeded = false;
+		}
+		List<IArtifactDescriptor> descriptors = artifactMap.get(key);
 		if (descriptors == null) {
-			descriptors = new ArrayList();
+			descriptors = new ArrayList<IArtifactDescriptor>();
 			artifactMap.put(key, descriptors);
 		}
 		descriptors.add(descriptor);
+		keyIndex = null;
 	}
 
-	private void unmapDescriptor(IArtifactDescriptor descriptor) {
+	private synchronized void unmapDescriptor(IArtifactDescriptor descriptor) {
 		IArtifactKey key = descriptor.getArtifactKey();
-		Collection descriptors = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> descriptors = artifactMap.get(key);
 		if (descriptors == null)
 			return;
 
+		if (snapshotNeeded) {
+			cloneAritfactMap();
+			snapshotNeeded = false;
+			descriptors = artifactMap.get(key);
+		}
 		descriptors.remove(descriptor);
 		if (descriptors.isEmpty())
 			artifactMap.remove(key);
+		keyIndex = null;
+	}
+
+	private void cloneAritfactMap() {
+		HashMap<IArtifactKey, List<IArtifactDescriptor>> clone = new HashMap<IArtifactKey, List<IArtifactDescriptor>>(artifactMap.size());
+		for (Entry<IArtifactKey, List<IArtifactDescriptor>> entry : artifactMap.entrySet())
+			clone.put(entry.getKey(), new ArrayList<IArtifactDescriptor>(entry.getValue()));
+		artifactMap = clone;
 	}
 
-	public SimpleArtifactRepository(String repositoryName, URI location, Map properties) {
-		super(repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
+	public SimpleArtifactRepository(IProvisioningAgent agent, String repositoryName, URI location, Map<String, String> properties) {
+		super(agent, repositoryName, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties);
 		initializeAfterLoad(location);
 		if (properties != null) {
 			if (properties.containsKey(PUBLISH_PACK_FILES_AS_SIBLINGS)) {
 				synchronized (this) {
-					String newValue = (String) properties.get(PUBLISH_PACK_FILES_AS_SIBLINGS);
+					String newValue = properties.get(PUBLISH_PACK_FILES_AS_SIBLINGS);
 					if (Boolean.TRUE.toString().equals(newValue)) {
 						mappingRules = PACKED_MAPPING_RULES;
 					} else {
@@ -299,37 +323,63 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public synchronized void addDescriptor(IArtifactDescriptor toAdd) {
-		// TODO perhaps the argument here should be ArtifactDescriptor.  IArtifactDescriptors are for 
-		// people who are reading the repository.
-		// TODO: here we may want to ensure that the artifact has not been added concurrently
-		((ArtifactDescriptor) toAdd).setRepository(this);
-		artifactDescriptors.add(toAdd);
-		mapDescriptor(toAdd);
+		if (artifactDescriptors.contains(toAdd))
+			return;
+
+		SimpleArtifactDescriptor internalDescriptor = createInternalDescriptor(toAdd);
+		artifactDescriptors.add(internalDescriptor);
+		mapDescriptor(internalDescriptor);
 		save();
 	}
 
-	public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
+		return new SimpleArtifactDescriptor(key);
+	}
 
+	private SimpleArtifactDescriptor createInternalDescriptor(IArtifactDescriptor descriptor) {
+		SimpleArtifactDescriptor internal = new SimpleArtifactDescriptor(descriptor);
+
+		internal.setRepository(this);
+		if (isFolderBased(descriptor))
+			internal.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
+
+		//clear out the UUID if we aren't using the blobstore.
+		if (flatButPackedEnabled(descriptor) && internal.getProperty(ARTIFACT_UUID) != null) {
+			internal.setProperty(ARTIFACT_UUID, null);
+		}
+
+		if (descriptor instanceof SimpleArtifactDescriptor) {
+			Map<String, String> repoProperties = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperties();
+			for (Map.Entry<String, String> entry : repoProperties.entrySet()) {
+				internal.setRepositoryProperty(entry.getKey(), entry.getValue());
+			}
+		}
+		return internal;
+	}
+
+	public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
 		for (int i = 0; i < descriptors.length; i++) {
-			((ArtifactDescriptor) descriptors[i]).setRepository(this);
-			artifactDescriptors.add(descriptors[i]);
-			mapDescriptor(descriptors[i]);
+			if (artifactDescriptors.contains(descriptors[i]))
+				continue;
+			SimpleArtifactDescriptor internalDescriptor = createInternalDescriptor(descriptors[i]);
+			artifactDescriptors.add(internalDescriptor);
+			mapDescriptor(internalDescriptor);
 		}
 		save();
 	}
 
 	private synchronized OutputStream addPostSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
-		ArrayList steps = new ArrayList();
+		ArrayList<ProcessingStep> steps = new ArrayList<ProcessingStep>();
 		steps.add(new SignatureVerifier());
 		if (steps.isEmpty())
 			return destination;
-		ProcessingStep[] stepArray = (ProcessingStep[]) steps.toArray(new ProcessingStep[steps.size()]);
+		ProcessingStep[] stepArray = steps.toArray(new ProcessingStep[steps.size()]);
 		// TODO should probably be using createAndLink here
 		return handler.link(stepArray, destination, monitor);
 	}
 
 	private OutputStream addPreSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
-		ArrayList steps = new ArrayList();
+		ArrayList<ProcessingStep> steps = new ArrayList<ProcessingStep>();
 		if (IArtifactDescriptor.TYPE_ZIP.equals(descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE)))
 			steps.add(new ZipVerifierStep());
 		if (MD5_CHECK_ENABLED && descriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5) != null)
@@ -337,7 +387,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		// Add steps here if needed
 		if (steps.isEmpty())
 			return destination;
-		ProcessingStep[] stepArray = (ProcessingStep[]) steps.toArray(new ProcessingStep[steps.size()]);
+		ProcessingStep[] stepArray = steps.toArray(new ProcessingStep[steps.size()]);
 		// TODO should probably be using createAndLink here
 		return handler.link(stepArray, destination, monitor);
 	}
@@ -367,7 +417,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public synchronized boolean contains(IArtifactDescriptor descriptor) {
-		return artifactDescriptors.contains(descriptor);
+		SimpleArtifactDescriptor simpleDescriptor = createInternalDescriptor(descriptor);
+		return artifactDescriptors.contains(simpleDescriptor);
 	}
 
 	public synchronized boolean contains(IArtifactKey key) {
@@ -382,7 +433,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		if (descriptor.getProcessingSteps().length == 0) {
 			descriptor.setProperty(ARTIFACT_UUID, null);
 			IArtifactKey key = descriptor.getArtifactKey();
-			URI result = mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
+			URI result = mapper.map(getLocation(), key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
 			if (result != null) {
 				if (isFolderBased(descriptor) && URIUtil.lastSegment(result).endsWith(JAR_EXTENSION)) {
 					return URIUtil.removeFileExtension(result);
@@ -404,13 +455,20 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	 * descriptor existed in the repository, and was successfully removed.
 	 */
 	private boolean doRemoveArtifact(IArtifactDescriptor descriptor) {
-		if (((ArtifactDescriptor) descriptor).getRepositoryProperty(ArtifactDescriptor.ARTIFACT_REFERENCE) == null) {
+		SimpleArtifactDescriptor simple = null;
+		if (descriptor instanceof SimpleArtifactDescriptor)
+			simple = (SimpleArtifactDescriptor) descriptor;
+		else
+			simple = createInternalDescriptor(descriptor);
+		if (simple.getRepositoryProperty(SimpleArtifactDescriptor.ARTIFACT_REFERENCE) == null) {
 			File file = getArtifactFile(descriptor);
-			if (file == null)
-				return false;
-			delete(file);
-			if (file.exists())
-				return false;
+			if (file != null) {
+				// If the file != null remove it, otherwise just remove
+				// the descriptor
+				delete(file);
+				if (file.exists())
+					return false;
+			}
 		}
 		boolean result = artifactDescriptors.remove(descriptor);
 		if (result)
@@ -446,7 +504,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		//download from the best available mirror
 		URI baseLocation = getLocation(descriptor);
 		if (baseLocation == null)
-			return new Status(IStatus.ERROR, Activator.ID, "Can not find the location of " + descriptor);
+			return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.no_location, descriptor));
 		URI mirrorLocation = getMirror(baseLocation, monitor);
 		IStatus status = downloadArtifact(descriptor, mirrorLocation, destination, monitor);
 		IStatus result = reportStatus(descriptor, destination, status);
@@ -494,6 +552,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		return mirrors.getMirrorLocation(baseLocation, monitor);
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		// if we are adapting to file or writable repositories then make sure we have a file location
 		if (adapter == IFileArtifactRepository.class)
@@ -502,9 +561,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		return super.getAdapter(adapter);
 	}
 
-	IStatus getArtifact(ArtifactRequest request, IProgressMonitor monitor) {
-		request.setSourceRepository(this);
-		request.perform(monitor);
+	IStatus getArtifact(IArtifactRequest request, IProgressMonitor monitor) {
+		request.perform(this, monitor);
 		return request.getResult();
 	}
 
@@ -523,11 +581,11 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
-		Collection result = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> result = artifactMap.get(key);
 		if (result == null)
 			return new IArtifactDescriptor[0];
 
-		return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
+		return result.toArray(new IArtifactDescriptor[result.size()]);
 	}
 
 	public File getArtifactFile(IArtifactDescriptor descriptor) {
@@ -544,14 +602,9 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		return getArtifactFile(descriptor);
 	}
 
-	public synchronized IArtifactKey[] getArtifactKeys() {
-		// there may be more descriptors than keys to collect up the unique keys
-		return (IArtifactKey[]) artifactMap.keySet().toArray(new IArtifactKey[artifactMap.keySet().size()]);
-	}
-
 	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
 		final MultiStatus overallStatus = new MultiStatus(Activator.ID, IStatus.OK, null, null);
-		LinkedList requestsPending = new LinkedList(Arrays.asList(requests));
+		LinkedList<IArtifactRequest> requestsPending = new LinkedList<IArtifactRequest>(Arrays.asList(requests));
 
 		int numberOfJobs = Math.min(requests.length, getMaximumThreads());
 		if (numberOfJobs <= 1 || (!isForceThreading() && isLocal())) {
@@ -560,7 +613,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 				for (int i = 0; i < requests.length; i++) {
 					if (monitor.isCanceled())
 						return Status.CANCEL_STATUS;
-					IStatus result = getArtifact((ArtifactRequest) requests[i], subMonitor.newChild(1));
+					IStatus result = getArtifact(requests[i], subMonitor.newChild(1));
 					if (!result.isOK())
 						overallStatus.add(result);
 				}
@@ -591,12 +644,11 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public synchronized IArtifactDescriptor getCompleteArtifactDescriptor(IArtifactKey key) {
-		Collection descriptors = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> descriptors = artifactMap.get(key);
 		if (descriptors == null)
 			return null;
 
-		for (Iterator iterator = descriptors.iterator(); iterator.hasNext();) {
-			IArtifactDescriptor desc = (IArtifactDescriptor) iterator.next();
+		for (IArtifactDescriptor desc : descriptors) {
 			// look for a descriptor that matches the key and is "complete"
 			if (desc.getArtifactKey().equals(key) && desc.getProcessingSteps().length == 0)
 				return desc;
@@ -604,7 +656,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		return null;
 	}
 
-	public synchronized Set getDescriptors() {
+	public synchronized Set<SimpleArtifactDescriptor> getDescriptors() {
 		return artifactDescriptors;
 	}
 
@@ -615,7 +667,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	 * this arrangement "flat but packed".
 	 */
 	private boolean flatButPackedEnabled(IArtifactDescriptor descriptor) {
-		return Boolean.TRUE.toString().equals(getProperties().get(PUBLISH_PACK_FILES_AS_SIBLINGS)) && PACKED_FORMAT.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
+		return Boolean.TRUE.toString().equals(getProperties().get(PUBLISH_PACK_FILES_AS_SIBLINGS)) && IArtifactDescriptor.FORMAT_PACKED.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
 	}
 
 	/**
@@ -623,7 +675,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	 */
 	private URI getLocationForPackedButFlatArtifacts(IArtifactDescriptor descriptor) {
 		IArtifactKey key = descriptor.getArtifactKey();
-		return mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
+		return mapper.map(getLocation(), key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
 	}
 
 	public synchronized URI getLocation(IArtifactDescriptor descriptor) {
@@ -638,8 +690,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 
 		try {
 			// if the artifact is just a reference then return the reference location
-			if (descriptor instanceof ArtifactDescriptor) {
-				String artifactReference = ((ArtifactDescriptor) descriptor).getRepositoryProperty(ArtifactDescriptor.ARTIFACT_REFERENCE);
+			if (descriptor instanceof SimpleArtifactDescriptor) {
+				String artifactReference = ((SimpleArtifactDescriptor) descriptor).getRepositoryProperty(SimpleArtifactDescriptor.ARTIFACT_REFERENCE);
 				if (artifactReference != null) {
 					try {
 						return new URI(artifactReference);
@@ -652,11 +704,12 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 			// if the descriptor is complete then use the mapping rules...
 			if (descriptor.getProcessingSteps().length == 0) {
 				IArtifactKey key = descriptor.getArtifactKey();
-				URI result = mapper.map(location, key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
+				URI result = mapper.map(getLocation(), key.getClassifier(), key.getId(), key.getVersion().toString(), descriptor.getProperty(IArtifactDescriptor.FORMAT));
 				if (result != null) {
 					if (isFolderBased(descriptor) && URIUtil.lastSegment(result).endsWith(JAR_EXTENSION))
 						return URIUtil.removeFileExtension(result);
-
+					if (result.getScheme() == null && "file".equals(getLocation().getScheme())) //$NON-NLS-1$
+						return URIUtil.makeAbsolute(result, new File(System.getProperty("user.dir")).toURI()); //$NON-NLS-1$
 					return result;
 				}
 			}
@@ -671,23 +724,30 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	 * Returns the maximum number of concurrent download threads.
 	 */
 	private int getMaximumThreads() {
+		int repoMaxThreads = DEFAULT_MAX_THREADS;
+		int userMaxThreads = DEFAULT_MAX_THREADS;
 		try {
-			String maxThreadString = (String) getProperties().get(PROP_MAX_THREADS);
+			String maxThreadString = getProperties().get(PROP_MAX_THREADS);
 			if (maxThreadString != null)
-				return Math.max(1, Integer.parseInt(maxThreadString));
+				repoMaxThreads = Math.max(1, Integer.parseInt(maxThreadString));
 		} catch (NumberFormatException nfe) {
-			// return default number of threads
+			// default number of threads
 		}
-		return DEFAULT_MAX_THREADS;
+		try {
+			String maxThreadString = Activator.getContext().getProperty(PROP_MAX_THREADS);
+			if (maxThreadString != null)
+				userMaxThreads = Math.max(1, Integer.parseInt(maxThreadString));
+		} catch (NumberFormatException nfe) {
+			// default number of threads
+		}
+		return Math.min(repoMaxThreads, userMaxThreads);
 	}
 
 	public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException {
 		assertModifiable();
 
 		// Create a copy of the original descriptor that we can manipulate and add to our repo.
-		ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptor);
-		if (isFolderBased(descriptor))
-			newDescriptor.setRepositoryProperty(ARTIFACT_FOLDER, Boolean.TRUE.toString());
+		ArtifactDescriptor newDescriptor = createInternalDescriptor(descriptor);
 
 		// Check if the artifact is already in this repository, check the newDescriptor instead of the original
 		// since the implementation of hash/equals on the descriptor matters here.
@@ -699,7 +759,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		// Determine writing location
 		URI newLocation = createLocation(newDescriptor);
 		if (newLocation == null)
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, "No location for " + newDescriptor));
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.no_location, newDescriptor)));
 		String file = URIUtil.toFile(newLocation).getAbsolutePath();
 
 		// TODO at this point we have to assume that the repository is file-based.  Eventually 
@@ -764,13 +824,12 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	// use this method to setup any transient fields etc after the object has been restored from a stream
-	public synchronized void initializeAfterLoad(URI location) {
-		this.location = location;
-		blobStore = new BlobStore(getBlobStoreLocation(location), 128);
+	public synchronized void initializeAfterLoad(URI repoLocation) {
+		setLocation(repoLocation);
+		blobStore = new BlobStore(getBlobStoreLocation(repoLocation), 128);
 		initializeMapper();
-		for (Iterator i = artifactDescriptors.iterator(); i.hasNext();) {
-			((ArtifactDescriptor) i.next()).setRepository(this);
-		}
+		for (SimpleArtifactDescriptor desc : artifactDescriptors)
+			desc.setRepository(this);
 	}
 
 	private synchronized void initializeMapper() {
@@ -779,13 +838,17 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	private boolean isFolderBased(IArtifactDescriptor descriptor) {
-		// if the artifact is just a reference then return the reference location
-		if (descriptor instanceof ArtifactDescriptor) {
-			String useArtifactFolder = ((ArtifactDescriptor) descriptor).getRepositoryProperty(ARTIFACT_FOLDER);
+		// This is called from createInternalDescriptor, so if we aren't a
+		// SimpleArtifactDescriptor then just check the descriptor properties instead 
+		// of creating the internal descriptor.
+		SimpleArtifactDescriptor internalDescriptor = null;
+		if (descriptor instanceof SimpleArtifactDescriptor)
+			internalDescriptor = (SimpleArtifactDescriptor) descriptor;
+		if (internalDescriptor != null) {
+			String useArtifactFolder = internalDescriptor.getRepositoryProperty(ARTIFACT_FOLDER);
 			if (useArtifactFolder != null)
 				return Boolean.valueOf(useArtifactFolder).booleanValue();
 		}
-		//TODO: refactor this when the artifact folder property is consistently set in repository properties
 		return Boolean.valueOf(descriptor.getProperty(ARTIFACT_FOLDER)).booleanValue();
 	}
 
@@ -794,7 +857,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	private boolean isLocal() {
-		return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
+		return "file".equalsIgnoreCase(getLocation().getScheme()); //$NON-NLS-1$
 	}
 
 	public boolean isModifiable() {
@@ -803,13 +866,13 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 
 	public OutputStream processDestination(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
 		destination = addPostSteps(handler, descriptor, destination, monitor);
-		destination = handler.createAndLink(descriptor.getProcessingSteps(), descriptor, destination, monitor);
+		destination = handler.createAndLink(getProvisioningAgent(), descriptor.getProcessingSteps(), descriptor, destination, monitor);
 		destination = addPreSteps(handler, descriptor, destination, monitor);
 		return destination;
 	}
 
 	public synchronized void removeAll() {
-		IArtifactDescriptor[] toRemove = (IArtifactDescriptor[]) artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
+		IArtifactDescriptor[] toRemove = artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
 		boolean changed = false;
 		for (int i = 0; i < toRemove.length; i++)
 			changed |= doRemoveArtifact(toRemove[i]);
@@ -873,18 +936,20 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public void save() {
-		boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
+		if (disableSave)
+			return;
+		boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
 		save(compress);
 	}
 
-	public void save(boolean compress) {
+	private void save(boolean compress) {
 		assertModifiable();
 		OutputStream os = null;
 		try {
 			try {
-				URI actualLocation = getActualLocation(location, false);
+				URI actualLocation = getActualLocation(getLocation(), false);
 				File artifactsFile = URIUtil.toFile(actualLocation);
-				File jarFile = URIUtil.toFile(getActualLocation(location, true));
+				File jarFile = URIUtil.toFile(getActualLocation(getLocation(), true));
 				if (!compress) {
 					if (jarFile.exists()) {
 						jarFile.delete();
@@ -907,7 +972,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 					os = jOs;
 				}
 				super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
-				new SimpleArtifactRepositoryIO().write(this, os);
+				new SimpleArtifactRepositoryIO(getProvisioningAgent()).write(this, os);
 			} catch (IOException e) {
 				// TODO proper exception handling
 				e.printStackTrace();
@@ -936,7 +1001,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 		}
 		save();
 		//force repository manager to reload this repository because it caches properties
-		ArtifactRepositoryManager manager = (ArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+		ArtifactRepositoryManager manager = (ArtifactRepositoryManager) getProvisioningAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager.removeRepository(getLocation()))
 			manager.addRepository(this);
 		return oldValue;
@@ -947,6 +1012,68 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
 	}
 
 	public String toString() {
-		return location.toString();
+		return getLocation().toString();
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		return new IQueryable<IArtifactDescriptor>() {
+			public IQueryResult<IArtifactDescriptor> query(IQuery<IArtifactDescriptor> query, IProgressMonitor monitor) {
+				synchronized (SimpleArtifactRepository.this) {
+					snapshotNeeded = true;
+					Collection<List<IArtifactDescriptor>> descs = SimpleArtifactRepository.this.artifactMap.values();
+					return query.perform(new CompoundIterator<IArtifactDescriptor>(descs.iterator()));
+				}
+			}
+		};
+	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		return IndexProvider.query(this, query, monitor);
+	}
+
+	public synchronized Iterator<IArtifactKey> everything() {
+		snapshotNeeded = true;
+		return artifactMap.keySet().iterator();
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		IStatus result = null;
+		synchronized (this) {
+			try {
+				disableSave = true;
+				runnable.run(monitor);
+			} catch (OperationCanceledException oce) {
+				return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+			} catch (Throwable e) {
+				result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+			} finally {
+				disableSave = false;
+				try {
+					save();
+				} catch (Exception e) {
+					if (result != null)
+						result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
+					else
+						result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+				}
+			}
+		}
+		if (result == null)
+			result = Status.OK_STATUS;
+		return result;
+	}
+
+	public synchronized IIndex<IArtifactKey> getIndex(String memberName) {
+		if (ArtifactKey.MEMBER_ID.equals(memberName)) {
+			snapshotNeeded = true;
+			if (keyIndex == null)
+				keyIndex = new KeyIndex(artifactMap.keySet());
+			return keyIndex;
+		}
+		return null;
+	}
+
+	public Object getManagedProperty(Object client, String memberName, Object key) {
+		return null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java
new file mode 100644
index 0000000..4ebeb06
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryFactory.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.artifact.repository.simple;
+
+import java.io.*;
+import java.net.URI;
+import java.util.Map;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
+import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.internal.p2.repository.CacheManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
+import org.eclipse.osgi.util.NLS;
+
+public class SimpleArtifactRepositoryFactory extends ArtifactRepositoryFactory {
+	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
+	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
+	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
+
+	public SimpleArtifactRepositoryFactory() {
+		super();
+	}
+
+	/**
+	 * Returns a file in the local file system that contains the contents of the
+	 * metadata repository at the given location.
+	 */
+	private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
+		File localFile = null;
+		URI jarLocation = SimpleArtifactRepository.getActualLocation(location, true);
+		URI xmlLocation = SimpleArtifactRepository.getActualLocation(location, false);
+		// If the repository is local, we can return the repository file directly
+		if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
+			//look for a compressed local file
+			localFile = URIUtil.toFile(jarLocation);
+			if (localFile.exists())
+				return localFile;
+			//look for an uncompressed local file
+			localFile = URIUtil.toFile(xmlLocation);
+			if (localFile.exists())
+				return localFile;
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
+		}
+		// file is not local, create a cache of the repository metadata
+		CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
+		if (cache == null)
+			throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
+		localFile = cache.createCache(location, SimpleArtifactRepository.CONTENT_FILENAME, monitor);
+		if (localFile == null) {
+			// there is no remote file in either form - this should not really happen as
+			// createCache should bail out with exception if something is wrong. This is an internal
+			// error.
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.repoMan_internalError, null));
+		}
+		return localFile;
+	}
+
+	public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
+		long time = 0;
+		final String debugMsg = "Restoring artifact repository "; //$NON-NLS-1$
+		if (Tracing.DEBUG_METADATA_PARSING) {
+			Tracing.debug(debugMsg + location);
+			time = -System.currentTimeMillis();
+		}
+		SubMonitor sub = SubMonitor.convert(monitor, 400);
+		try {
+			File localFile = getLocalFile(location, sub.newChild(300));
+			InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
+			JarInputStream jarStream = null;
+			try {
+				//if reading from a jar, obtain a stream on the entry with the actual contents
+				if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
+					jarStream = new JarInputStream(inStream);
+					JarEntry jarEntry = jarStream.getNextJarEntry();
+					String entryName = SimpleArtifactRepository.CONTENT_FILENAME + XML_EXTENSION;
+					while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
+						jarEntry = jarStream.getNextJarEntry();
+					}
+					//if there is a jar but the entry is missing or invalid, treat this as an invalid repository
+					if (jarEntry == null)
+						throw new IOException(NLS.bind(Messages.io_invalidLocation, location));
+				}
+				//parse the repository descriptor file
+				sub.setWorkRemaining(100);
+				InputStream descriptorStream = jarStream != null ? jarStream : inStream;
+				SimpleArtifactRepositoryIO io = new SimpleArtifactRepositoryIO(getAgent());
+				SimpleArtifactRepository result = (SimpleArtifactRepository) io.read(localFile.toURL(), descriptorStream, sub.newChild(100));
+				result.initializeAfterLoad(location);
+				if (result != null && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0 && !result.isModifiable())
+					return null;
+				if (Tracing.DEBUG_METADATA_PARSING) {
+					time += System.currentTimeMillis();
+					Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
+				}
+				return result;
+			} finally {
+				safeClose(jarStream);
+				safeClose(inStream);
+			}
+		} catch (FileNotFoundException e) {
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
+		} catch (IOException e) {
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
+		} finally {
+			if (monitor != null)
+				monitor.done();
+		}
+	}
+
+	public IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) {
+		return new SimpleArtifactRepository(getAgent(), name, location, properties);
+	}
+
+	/**
+	 * Closes a stream, ignoring any secondary exceptions
+	 */
+	private void safeClose(InputStream stream) {
+		if (stream == null)
+			return;
+		try {
+			stream.close();
+		} catch (IOException e) {
+			//ignore
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
index b7b10d0..06df4e3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepositoryIO.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,11 +22,12 @@ import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
 import org.eclipse.equinox.internal.p2.persistence.XMLParser;
 import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 import org.xml.sax.*;
@@ -42,6 +43,12 @@ import org.xml.sax.*;
 //		 for getting a repository reader/writer given a repository type
 public class SimpleArtifactRepositoryIO {
 
+	private final IProvisioningAgent agent;
+
+	public SimpleArtifactRepositoryIO(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
 	/**
 	 * Writes the given artifact repository to the stream.
 	 * This method performs buffering, and closes the stream when finished.
@@ -106,9 +113,9 @@ public class SimpleArtifactRepositoryIO {
 		// Constants defining the structure of the XML for a SimpleArtifactRepository
 
 		// A format version number for simple artifact repository XML.
-		public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
-		public static final Version CURRENT_VERSION = new Version(1, 1, 0);
-		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
+		public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
+		public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
+		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
 
 		// Constants for processing instructions
 		public static final String PI_REPOSITORY_TARGET = "artifactRepository"; //$NON-NLS-1$
@@ -173,11 +180,10 @@ public class SimpleArtifactRepositoryIO {
 			}
 		}
 
-		private void writeArtifacts(Set artifactDescriptors) {
+		private void writeArtifacts(Set<SimpleArtifactDescriptor> artifactDescriptors) {
 			start(ARTIFACTS_ELEMENT);
 			attribute(COLLECTION_SIZE_ATTRIBUTE, artifactDescriptors.size());
-			for (Iterator iter = artifactDescriptors.iterator(); iter.hasNext();) {
-				ArtifactDescriptor descriptor = (ArtifactDescriptor) iter.next();
+			for (SimpleArtifactDescriptor descriptor : artifactDescriptors) {
 				IArtifactKey key = descriptor.getArtifactKey();
 				start(ARTIFACT_ELEMENT);
 				attribute(ARTIFACT_CLASSIFIER_ATTRIBUTE, key.getClassifier());
@@ -191,7 +197,7 @@ public class SimpleArtifactRepositoryIO {
 			end(ARTIFACTS_ELEMENT);
 		}
 
-		private void writeProcessingSteps(ProcessingStepDescriptor[] processingSteps) {
+		private void writeProcessingSteps(IProcessingStepDescriptor[] processingSteps) {
 			if (processingSteps.length > 0) {
 				start(PROCESSING_STEPS_ELEMENT);
 				attribute(COLLECTION_SIZE_ATTRIBUTE, processingSteps.length);
@@ -323,11 +329,11 @@ public class SimpleArtifactRepositoryIO {
 				if (isValidXML()) {
 					String[][] mappingRules = (mappingRulesHandler == null ? new String[0][0] //
 							: mappingRulesHandler.getMappingRules());
-					Map properties = (propertiesHandler == null ? new OrderedProperties(0) //
+					Map<String, String> properties = (propertiesHandler == null ? new OrderedProperties(0) //
 							: propertiesHandler.getProperties());
-					Set artifacts = (artifactsHandler == null ? new HashSet(0) //
+					Set<SimpleArtifactDescriptor> artifacts = (artifactsHandler == null ? new HashSet<SimpleArtifactDescriptor>(0) //
 							: artifactsHandler.getArtifacts());
-					repository = new SimpleArtifactRepository(attrValues[0], attrValues[1], attrValues[2], attrValues[3], //
+					repository = new SimpleArtifactRepository(agent, attrValues[0], attrValues[1], attrValues[2], attrValues[3], //
 							attrValues[4], artifacts, mappingRules, properties);
 				}
 			}
@@ -335,18 +341,18 @@ public class SimpleArtifactRepositoryIO {
 
 		protected class MappingRulesHandler extends AbstractHandler {
 
-			private List mappingRules;
+			private List<String[]> mappingRules;
 
 			public MappingRulesHandler(AbstractHandler parentHandler, Attributes attributes) {
 				super(parentHandler, MAPPING_RULES_ELEMENT);
 				String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-				mappingRules = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+				mappingRules = (size != null ? new ArrayList<String[]>(new Integer(size).intValue()) : new ArrayList<String[]>(4));
 			}
 
 			public String[][] getMappingRules() {
 				String[][] rules = new String[mappingRules.size()][2];
 				for (int index = 0; index < mappingRules.size(); index++) {
-					String[] ruleAttributes = (String[]) mappingRules.get(index);
+					String[] ruleAttributes = mappingRules.get(index);
 					rules[index] = ruleAttributes;
 				}
 				return rules;
@@ -365,7 +371,7 @@ public class SimpleArtifactRepositoryIO {
 
 			private final String[] required = new String[] {MAPPING_RULE_FILTER_ATTRIBUTE, MAPPING_RULE_OUTPUT_ATTRIBUTE};
 
-			public MappingRuleHandler(AbstractHandler parentHandler, Attributes attributes, List mappingRules) {
+			public MappingRuleHandler(AbstractHandler parentHandler, Attributes attributes, List<String[]> mappingRules) {
 				super(parentHandler, MAPPING_RULE_ELEMENT);
 				mappingRules.add(parseRequiredAttributes(attributes, required));
 			}
@@ -377,15 +383,15 @@ public class SimpleArtifactRepositoryIO {
 
 		protected class ArtifactsHandler extends AbstractHandler {
 
-			private Set artifacts;
+			private Set<SimpleArtifactDescriptor> artifacts;
 
 			public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
 				super(parentHandler, ARTIFACTS_ELEMENT);
 				String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-				artifacts = (size != null ? new LinkedHashSet(new Integer(size).intValue()) : new LinkedHashSet(4));
+				artifacts = (size != null ? new LinkedHashSet<SimpleArtifactDescriptor>(new Integer(size).intValue()) : new LinkedHashSet<SimpleArtifactDescriptor>(4));
 			}
 
-			public Set getArtifacts() {
+			public Set<SimpleArtifactDescriptor> getArtifacts() {
 				return artifacts;
 			}
 
@@ -402,20 +408,20 @@ public class SimpleArtifactRepositoryIO {
 
 			private final String[] required = new String[] {ARTIFACT_CLASSIFIER_ATTRIBUTE, ID_ATTRIBUTE, VERSION_ATTRIBUTE};
 
-			private Set artifacts;
-			ArtifactDescriptor currentArtifact = null;
+			private Set<SimpleArtifactDescriptor> artifacts;
+			SimpleArtifactDescriptor currentArtifact = null;
 
 			private PropertiesHandler propertiesHandler = null;
 			private PropertiesHandler repositoryPropertiesHandler = null;
 			private ProcessingStepsHandler processingStepsHandler = null;
 
-			public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, Set artifacts) {
+			public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, Set<SimpleArtifactDescriptor> artifacts) {
 				super(parentHandler, ARTIFACT_ELEMENT);
 				this.artifacts = artifacts;
 				String[] values = parseRequiredAttributes(attributes, required);
 				Version version = checkVersion(ARTIFACT_ELEMENT, VERSION_ATTRIBUTE, values[2]);
 				// TODO: resolve access restriction on ArtifactKey construction
-				currentArtifact = new ArtifactDescriptor(new ArtifactKey(values[0], values[1], version));
+				currentArtifact = new SimpleArtifactDescriptor(new ArtifactKey(values[0], values[1], version));
 			}
 
 			public void startElement(String name, Attributes attributes) {
@@ -444,13 +450,13 @@ public class SimpleArtifactRepositoryIO {
 
 			protected void finished() {
 				if (isValidXML() && currentArtifact != null) {
-					Map properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
+					Map<String, String> properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
 					currentArtifact.addProperties(properties);
 
 					properties = (repositoryPropertiesHandler == null ? new OrderedProperties(0) : repositoryPropertiesHandler.getProperties());
 					currentArtifact.addRepositoryProperties(properties);
 
-					ProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
+					IProcessingStepDescriptor[] processingSteps = (processingStepsHandler == null ? new ProcessingStepDescriptor[0] //
 							: processingStepsHandler.getProcessingSteps());
 					currentArtifact.setProcessingSteps(processingSteps);
 					artifacts.add(currentArtifact);
@@ -460,16 +466,16 @@ public class SimpleArtifactRepositoryIO {
 
 		protected class ProcessingStepsHandler extends AbstractHandler {
 
-			private List processingSteps;
+			private List<IProcessingStepDescriptor> processingSteps;
 
 			public ProcessingStepsHandler(AbstractHandler parentHandler, Attributes attributes) {
 				super(parentHandler, PROCESSING_STEPS_ELEMENT);
 				String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-				processingSteps = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+				processingSteps = (size != null ? new ArrayList<IProcessingStepDescriptor>(new Integer(size).intValue()) : new ArrayList<IProcessingStepDescriptor>(4));
 			}
 
-			public ProcessingStepDescriptor[] getProcessingSteps() {
-				return (ProcessingStepDescriptor[]) processingSteps.toArray(new ProcessingStepDescriptor[processingSteps.size()]);
+			public IProcessingStepDescriptor[] getProcessingSteps() {
+				return processingSteps.toArray(new ProcessingStepDescriptor[processingSteps.size()]);
 			}
 
 			public void startElement(String name, Attributes attributes) {
@@ -486,7 +492,7 @@ public class SimpleArtifactRepositoryIO {
 			private final String[] required = new String[] {ID_ATTRIBUTE, STEP_REQUIRED_ATTRIBUTE};
 			private final String[] optional = new String[] {STEP_DATA_ATTRIBUTE};
 
-			public ProcessingStepHandler(AbstractHandler parentHandler, Attributes attributes, List processingSteps) {
+			public ProcessingStepHandler(AbstractHandler parentHandler, Attributes attributes, List<IProcessingStepDescriptor> processingSteps) {
 				super(parentHandler, PROCESSING_STEP_ELEMENT);
 				String[] attributeValues = parseAttributes(attributes, required, optional);
 				processingSteps.add(new ProcessingStepDescriptor(attributeValues[0], attributeValues[2], checkBoolean(PROCESSING_STEP_ELEMENT, STEP_REQUIRED_ATTRIBUTE, attributeValues[1]).booleanValue()));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java
deleted file mode 100644
index b9568b0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactComparatorFactory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *		Compeople AG (Stefan Liebig) - various ongoing maintenance
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.osgi.util.NLS;
-
-public class ArtifactComparatorFactory {
-	private static final String comparatorPoint = "org.eclipse.equinox.p2.artifact.repository.artifactComparators"; //$NON-NLS-1$
-	private static final String ATTR_ID = "id"; //$NON-NLS-1$
-	private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
-
-	public static IArtifactComparator getArtifactComparator(String comparatorID) {
-		IConfigurationElement[] extensions = RegistryFactory.getRegistry().getConfigurationElementsFor(comparatorPoint);
-
-		IConfigurationElement element = null;
-		if (comparatorID == null && extensions.length > 0) {
-			element = extensions[0]; //just take the first one
-		} else {
-			for (int i = 0; i < extensions.length; i++) {
-				if (extensions[i].getAttribute(ATTR_ID).equals(comparatorID)) {
-					element = extensions[i];
-					break;
-				}
-			}
-		}
-		if (element != null) {
-			try {
-				Object execExt = element.createExecutableExtension(ATTR_CLASS);
-				if (execExt instanceof IArtifactComparator)
-					return (IArtifactComparator) execExt;
-			} catch (Exception e) {
-				//fall through
-			}
-		}
-
-		if (comparatorID != null)
-			throw new IllegalArgumentException(NLS.bind(Messages.exception_comparatorNotFound, comparatorID));
-		throw new IllegalArgumentException(Messages.exception_noComparators);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java
deleted file mode 100644
index 33c5263..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/ArtifactDescriptor.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import java.util.Arrays;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * This represents information about a given artifact stored on a particular byte server.
- */
-public class ArtifactDescriptor implements IArtifactDescriptor {
-	public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
-
-	private static final ProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
-
-	protected IArtifactKey key; // The key associated with this artifact
-
-	// The list of post processing steps that must be applied one the artifact once it 
-	// has been downloaded (e.g, unpack, then md5 checksum, then...)
-	protected ProcessingStepDescriptor[] processingSteps = EMPTY_STEPS;
-
-	protected Map properties = new OrderedProperties();
-	protected Map repositoryProperties = new OrderedProperties();
-
-	protected transient IArtifactRepository repository;
-
-	// QUESTION: Do we need any description or user readable name
-
-	public ArtifactDescriptor(IArtifactDescriptor base) {
-		super();
-		key = base.getArtifactKey();
-		processingSteps = base.getProcessingSteps();
-		properties.putAll(base.getProperties());
-		repository = base.getRepository();
-		// TODO this property is hardcoded for the blob store.
-		//		setProperty("artifact.uuid", base.getProperty("artifact.uuid"));
-	}
-
-	public ArtifactDescriptor(ArtifactDescriptor base) {
-		super();
-		key = base.key;
-		processingSteps = base.processingSteps;
-		properties = base.properties;
-		repository = base.repository;
-	}
-
-	public ArtifactDescriptor(IArtifactKey key) {
-		super();
-		this.key = key;
-	}
-
-	public IArtifactKey getArtifactKey() {
-		return key;
-	}
-
-	public String getProperty(String propertyKey) {
-		return (String) properties.get(propertyKey);
-	}
-
-	public void setProperty(String key, String value) {
-		if (value == null)
-			properties.remove(key);
-		else
-			properties.put(key, value);
-	}
-
-	public void addProperties(Map additionalProperties) {
-		properties.putAll(additionalProperties);
-	}
-
-	/**
-	 * Returns a read-only collection of the properties of the artifact descriptor.
-	 * @return the properties of this artifact descriptor.
-	 */
-	public Map getProperties() {
-		return OrderedProperties.unmodifiableProperties(properties);
-	}
-
-	public String getRepositoryProperty(String propertyKey) {
-		return (String) repositoryProperties.get(propertyKey);
-	}
-
-	public void setRepositoryProperty(String key, String value) {
-		if (value == null)
-			repositoryProperties.remove(key);
-		else
-			repositoryProperties.put(key, value);
-	}
-
-	public void addRepositoryProperties(Map additionalProperties) {
-		repositoryProperties.putAll(additionalProperties);
-	}
-
-	/**
-	 * Returns a read-only collection of the repository properties of the artifact descriptor.
-	 * @return the repository properties of this artifact descriptor.
-	 */
-	public Map getRepositoryProperties() {
-		return OrderedProperties.unmodifiableProperties(repositoryProperties);
-	}
-
-	public ProcessingStepDescriptor[] getProcessingSteps() {
-		return processingSteps;
-	}
-
-	public void setProcessingSteps(ProcessingStepDescriptor[] value) {
-		processingSteps = value == null ? EMPTY_STEPS : value;
-	}
-
-	// Implementation of both equals and hash depends on the implementation of
-	// SimpleArtifactRepository#getOutputStream(IArtifactDescriptor)
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		ArtifactDescriptor other = (ArtifactDescriptor) obj;
-		if (key == null) {
-			if (other.key != null)
-				return false;
-		} else if (!key.equals(other.key))
-			return false;
-		if (!Arrays.equals(processingSteps, other.processingSteps))
-			return false;
-
-		//Properties affecting SimpleArtifactRepository#getLocation
-		String locationProperty = getRepositoryProperty(ARTIFACT_REFERENCE);
-		String otherProperty = other.getRepositoryProperty(ARTIFACT_REFERENCE);
-		// want not null and the same, or both null
-		if (locationProperty != null ? !locationProperty.equals(otherProperty) : otherProperty != null)
-			return false;
-
-		locationProperty = getProperty(FORMAT);
-		otherProperty = other.getProperty(FORMAT);
-		if (locationProperty != null ? !locationProperty.equals(otherProperty) : otherProperty != null)
-			return false;
-
-		return true;
-	}
-
-	private int hashCode(Object[] array) {
-		int prime = 31;
-		if (array == null)
-			return 0;
-		int result = 1;
-		for (int index = 0; index < array.length; index++) {
-			result = prime * result + (array[index] == null ? 0 : array[index].hashCode());
-		}
-		return result;
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((key == null) ? 0 : key.hashCode());
-		result = prime * result + hashCode(processingSteps);
-
-		String[] hashProperties = new String[] {getRepositoryProperty(ARTIFACT_REFERENCE), getProperty(FORMAT)};
-		result = prime * result + hashCode(hashProperties);
-		return result;
-	}
-
-	public IArtifactRepository getRepository() {
-		return repository;
-	}
-
-	public void setRepository(IArtifactRepository value) {
-		repository = value;
-	}
-
-	public String toString() {
-		String format = getProperty(IArtifactDescriptor.FORMAT);
-		if (format == null)
-			return "canonical: " + key.toString(); //$NON-NLS-1$
-		return format + ": " + key.toString(); //$NON-NLS-1$
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java
deleted file mode 100644
index 6ba7d55..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactComparator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import org.eclipse.core.runtime.IStatus;
-
-public interface IArtifactComparator {
-
-	/**
-	 * Compare 2 equivalent IArtifactDescriptors from different repositories.
-	 * 
-	 * IArtifactDescriptors with the same id and version should represent the same 
-	 * set of bytes.  The comparator should ensure this is true and return an error
-	 * or warning otherwise.
-	 *
-	 * @param source - The source IArtifactRepository
-	 * @param sourceDescriptor - The IArtifactDescriptor from the source repository
-	 * @param destination - The target IArtifactRepository
-	 * @param destDescriptor - The IArtifactDescriptor from the target repository
-	 *
-	 * @return IStatus
-	 */
-	public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java
deleted file mode 100644
index 8359506..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactDescriptor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public interface IArtifactDescriptor {
-
-	public static final String DOWNLOAD_SIZE = "download.size"; //$NON-NLS-1$
-	public static final String ARTIFACT_SIZE = "artifact.size"; //$NON-NLS-1$
-	public static final String DOWNLOAD_MD5 = "download.md5"; //$NON-NLS-1$
-	public static final String DOWNLOAD_CONTENTTYPE = "download.contentType"; //$NON-NLS-1$
-	public static final String TYPE_ZIP = "application/zip"; //$NON-NLS-1$
-	public static final String ARTIFACT_MD5 = "artifact.md5"; //$NON-NLS-1$
-	public static final String FORMAT = "format"; //$NON-NLS-1$
-
-	/**
-	 * Return the key for the artifact described by this descriptor.
-	 * @return the key associated with this descriptor
-	 */
-	public abstract IArtifactKey getArtifactKey();
-
-	/**
-	 * Return the value of the given property in this descriptor  <code>null</code> 
-	 * is returned if no such property exists
-	 * @param key the property key to look for
-	 * @return the value of the given property or <code>null</code>
-	 */
-	public abstract String getProperty(String key);
-
-	/**
-	 * Returns a read-only collection of the properties of the artifact descriptor.
-	 * @return the properties of this artifact descriptor.
-	 */
-	public Map getProperties();
-
-	/** 
-	 * Return the list of processing steps associated with this descriptor.
-	 * An empty set of steps implies that this descriptor describes a complete
-	 * copy of the artifact in its native form.
-	 * @return the list of processing steps for this descriptor
-	 */
-	public abstract ProcessingStepDescriptor[] getProcessingSteps();
-
-	/**
-	 * Return the artifact repository that holds the artifact described by this descriptor.
-	 * <code>null</code> is returned if this descriptor is not held in a repository.
-	 * 
-	 * @return the repository holding this artifact or <code>null</code> if none.
-	 */
-	public abstract IArtifactRepository getRepository();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java
deleted file mode 100644
index c793545..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepository.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import java.io.OutputStream;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
-
-/**
- * A repository containing artifacts.
- * <p>
- * This interface is not intended to be implemented by clients.  Artifact repository
- * implementations must subclass {@link AbstractArtifactRepository} rather than 
- * implementing this interface directly.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRepository extends IRepository {
-
-	/** 
-	 * The return code to use when a client could/should retry a failed getArtifact() operation.
-	 * For example, the repository may have additional mirrors that could be consulted.
-	 */
-	public static int CODE_RETRY = 13;
-
-	/**
-	 * Add the given descriptor to the set of descriptors in this repository.  This is 
-	 * a relatively low-level operation that should be used only when the actual related 
-	 * content is in this repository and the given descriptor accurately describes 
-	 * that content.
-	 * @param descriptor the descriptor to add.
-	 */
-	public void addDescriptor(IArtifactDescriptor descriptor);
-
-	/**
-	 * Add the given artifact descriptors to this repository
-	 * @param descriptors the artifact descriptors to add
-	 */
-	public void addDescriptors(IArtifactDescriptor[] descriptors);
-
-	/** 
-	 * Returns true if this repository contains the given descriptor.
-	 * @param descriptor the descriptor to query
-	 * @return true if the given descriptor is already in this repository
-	 */
-	public boolean contains(IArtifactDescriptor descriptor);
-
-	/** 
-	 * Returns true if this repository contains the given artifact key.
-	 * @param key the key to query
-	 * @return true if the given key is already in this repository
-	 */
-	public boolean contains(IArtifactKey key);
-
-	/**
-	 * Write to the given output stream the bytes represented by the artifact descriptor processed by the processing steps of the given descriptor.
-	 */
-	public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
-	/**
-	 * Write to the given output stream the bytes represented by the artifact descriptor without processing by the steps of the given descriptor. 
-	 */
-	public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
-	/**
-	 * Return the set of artifact descriptors describing the ways that this repository
-	 * can supply the artifact associated with the given artifact key
-	 * @param key the artifact key to lookup
-	 * @return the descriptors associated with the given key
-	 */
-	public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
-
-	/**
-	 * Returns the list of artifact keys managed by this repository
-	 * @return list of artifact keys
-	 */
-	public IArtifactKey[] getArtifactKeys();
-
-	/**
-	 * Executes the given artifact requests on this byte server.
-	 * @param requests The artifact requests
-	 * @param monitor
-	 * @return a status object that is <code>OK</code> if requests were
-	 * processed successfully. Otherwise, a status indicating information,
-	 * warnings, or errors that occurred while executing the artifact requests
-	 */
-	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
-
-	/**
-	 * Open an output stream to which a client can write the data for the given 
-	 * artifact descriptor.
-	 * @param descriptor the descriptor describing the artifact data to be written to the 
-	 * resultant stream
-	 * @return the stream to which the artifact content can be written. The returned output
-	 *  stream may implement <code>IStateful</code>.
-	 * @throws ProvisionException if the output stream could not be created.  Reasons include:
-	 * <ul>
-	 * <li>An I/O exception occurred (@link {@link ProvisionException#REPOSITORY_FAILED_WRITE}) .</li>
-	 * <li>An artifact already exists at that location ({@link ProvisionException#ARTIFACT_EXISTS}).</li>
-	 * </ul>
-	 */
-	public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
-
-	/**
-	 * Remove the all keys, descriptors, and contents from this repository.
-	 */
-	public void removeAll();
-
-	/**
-	 * Remove the given descriptor and its corresponding content in this repository.  
-	 * @param descriptor the descriptor to remove.
-	 */
-	public void removeDescriptor(IArtifactDescriptor descriptor);
-
-	/**
-	 * Remove the given key and all related content and descriptors from this repository.  
-	 * @param key the key to remove.
-	 */
-	public void removeDescriptor(IArtifactKey key);
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
deleted file mode 100644
index c804670..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRepositoryManager.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * A metadata repository manager is used to create, access, and manipulate
- * {@link IArtifactRepository} instances. See {@link IRepositoryManager}
- * for a general description of the characteristics of repository managers.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRepositoryManager extends IRepositoryManager {
-	/**
-	 * The name used for obtaining a reference to the metadata repository manager service
-	 */
-	public static final String SERVICE_NAME = IArtifactRepositoryManager.class.getName();
-
-	public static final IArtifactRequest[] NO_ARTIFACT_REQUEST = new IArtifactRequest[0];
-
-	/**
-	 * Repository type for a simple repository based on a URL or local file system location.
-	 */
-	public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.simpleRepository"; //$NON-NLS-1$
-	public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.compositeRepository"; //$NON-NLS-1$
-
-	/**
-	 * Return a new request to mirror the given artifact into the destination repository.
-	 * @param key the artifact to mirror
-	 * @param destination the destination where the artifact will be mirrored
-	 * @param destinationDescriptorProperties additional properties for use in creating the repository's ArtifactDescriptor, 
-	 * or <code>null</code> to indicate no additional properties are needed
-	 * @param destinationRepositoryProperties additional repository specific properties for use in creating the repositor's ArtifactDescriptor,
-	 * , or <code>null</code> to indicate no additional properties are needed
-	 * @return the newly created request object
-	 */
-	public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Properties destinationDescriptorProperties, Properties destinationRepositoryProperties);
-
-	/**
-	 * Creates and returns a new empty artifact repository of the given type at 
-	 * the given location.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * 
-	 * @param location the absolute location for the new repository
-	 * @param name the name of the new repository
-	 * @param type the kind of repository to create
-	 * @param properties the properties to set on the repository
-	 * @return the newly created repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>The repository type is unknown.</li>
-	 * <li>There was an error writing to the given repository location.</li>
-	 * <li>A repository already exists at that location.</li>
-	 * </ul>
-	 */
-	public IArtifactRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException;
-
-	/**
-	 * Loads the repository at the given location.  The location is expected to contain 
-	 * data that describes a valid artifact repository of a known type.  If this manager
-	 * already knows a repository at the given location then that repository is returned.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * 
-	 * @param location the absolute location in which to look for a repository description
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return a repository object for the given location
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Loads the repository at the given location.  The location is expected to contain 
-	 * data that describes a valid artifact repository of a known type.  If this manager
-	 * already knows a repository at the given location then that repository is returned.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * <p>
-	 * The flags passed in should be taken as a hint for the type of repository to load.  If
-	 * the manager cannot load a repository that satisfies these hints, it can fail fast.
-	 * </p>
-	 * @param location the absolute location in which to look for a repository description
-	 * @param flags - bit-wise or of flags to consider when loading the repository
-	 *  (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return a repository object for the given location
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
-	 */
-	public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Refreshes the repository corresponding to the given URL. This method discards
-	 * any cached state held by the repository manager and reloads the repository
-	 * contents. The provided repository location must already be known to the repository
-	 * manager.
-	 * 
-	 * @param location The absolute location of the repository to refresh
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The refreshed metadata repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>The location is not known to the repository manager.</li>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public IArtifactRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java
deleted file mode 100644
index f68e11d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IArtifactRequest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IArtifactRequest {
-
-	public IArtifactKey getArtifactKey();
-
-	/**
-	 * Returns the result of the previous call to {@link ArtifactRequest#perform(IProgressMonitor)},
-	 * or <code>null</code> if perform has never been called.
-	 * 
-	 * @return The result of the previous perform call.
-	 */
-	public IStatus getResult();
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java
deleted file mode 100644
index 6e6e07b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/IFileArtifactRepository.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository;
-
-import java.io.File;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-
-public interface IFileArtifactRepository extends IArtifactRepository {
-	/**
-	 * Return the location of the full local file corresponding to the given 
-	 * artifact key to the given key, or <code>null</code> if not available.
-	 * 
-	 * @return the location of the requested artifact or<code>null</code> if not available
-	 */
-	public File getArtifactFile(IArtifactKey key);
-
-	/**
-	 * Return the location of the local file corresponding to the given 
-	 * artifact descriptor, or <code>null</code> if not available.
-	 * 
-	 * @return the location of the requested descriptor or<code>null</code> if not available
-	 */
-	public File getArtifactFile(IArtifactDescriptor descriptor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
index 15375f9..c0e4858 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStep.java
@@ -14,8 +14,10 @@ package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processi
 import java.io.IOException;
 import java.io.OutputStream;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
 import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
 
 /**
  * ProcessingSteps process the data written to them and pass the resultant data on
@@ -39,7 +41,7 @@ public abstract class ProcessingStep extends OutputStream implements IStateful {
 	 * @param descriptor description of the step
 	 * @param context the context in which the step is being used
 	 */
-	public void initialize(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+	public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
 		// nothing to do here!
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java
deleted file mode 100644
index f7db92d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepDescriptor.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2007, 2008 compeople AG and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* 	compeople AG (Stefan Liebig) - initial API and implementation
-*******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing;
-
-/**
- * The description of a processor step.
- */
-public class ProcessingStepDescriptor {
-
-	private final String processorId; //the operation to be applied (e.g: unpack, md5, signature verification, etc.)
-	private final String data; //data requested for the processing (eg. expected checksum)
-	private final boolean required; //whether the step is optional or not
-
-	/**
-	 * Create a processing step description.
-	 * 
-	 * @param processorId
-	 * @param data
-	 * @param required
-	 */
-	public ProcessingStepDescriptor(String processorId, String data, boolean required) {
-		super();
-		this.processorId = processorId;
-		this.data = data;
-		this.required = required;
-	}
-
-	public String getProcessorId() {
-		return processorId;
-	}
-
-	public String getData() {
-		return data;
-	}
-
-	public boolean isRequired() {
-		return required;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((data == null) ? 0 : data.hashCode());
-		result = prime * result + ((processorId == null) ? 0 : processorId.hashCode());
-		result = prime * result + (required ? 1231 : 1237);
-		return result;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof ProcessingStepDescriptor))
-			return false;
-		final ProcessingStepDescriptor other = (ProcessingStepDescriptor) obj;
-		if (data == null) {
-			if (other.data != null)
-				return false;
-		} else if (!data.equals(other.data))
-			return false;
-		if (processorId == null) {
-			if (other.processorId != null)
-				return false;
-		} else if (!processorId.equals(other.processorId))
-			return false;
-		if (required != other.required)
-			return false;
-		return true;
-	}
-
-	public String toString() {
-		return "Processor: " + processorId + (required ? "(req)" : "(notReq)") + " ,data: " + data; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
index 508c464..e5530e9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/p2/artifact/repository/processing/ProcessingStepHandler.java
@@ -16,8 +16,10 @@ import java.util.ArrayList;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
 import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.ArtifactOutputStream;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
 import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -42,7 +44,7 @@ public class ProcessingStepHandler {
 		IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID);
 		if (point == null)
 			return false;
-		ProcessingStepDescriptor[] steps = descriptor.getProcessingSteps();
+		IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps();
 		for (int i = 0; i < steps.length; i++) {
 			if (point.getExtension(steps[i].getProcessorId()) == null)
 				return false;
@@ -60,11 +62,11 @@ public class ProcessingStepHandler {
 	public static IStatus getStatus(OutputStream stream, boolean deep) {
 		if (!deep)
 			return getStatus(stream);
-		ArrayList list = new ArrayList();
+		ArrayList<IStatus> list = new ArrayList<IStatus>();
 		int severity = collectStatus(stream, list);
 		if (severity == IStatus.OK)
 			return Status.OK_STATUS;
-		IStatus[] result = (IStatus[]) list.toArray(new IStatus[list.size()]);
+		IStatus[] result = list.toArray(new IStatus[list.size()]);
 		return new MultiStatus(Activator.ID, severity, result, Messages.processing_step_results, null);
 	}
 
@@ -74,15 +76,15 @@ public class ProcessingStepHandler {
 	 * @return the requested status
 	 */
 	public static IStatus getErrorStatus(OutputStream stream) {
-		ArrayList list = new ArrayList();
+		ArrayList<IStatus> list = new ArrayList<IStatus>();
 		int severity = collectErrorStatus(stream, list);
 		if (severity == IStatus.OK)
 			return Status.OK_STATUS;
-		IStatus[] result = (IStatus[]) list.toArray(new IStatus[list.size()]);
+		IStatus[] result = list.toArray(new IStatus[list.size()]);
 		return new MultiStatus(Activator.ID, 0, result, Messages.processing_step_results, null);
 	}
 
-	private static int collectErrorStatus(OutputStream stream, ArrayList list) {
+	private static int collectErrorStatus(OutputStream stream, ArrayList<IStatus> list) {
 		IStatus status = getStatus(stream);
 		if (!status.isOK())
 			list.add(status);
@@ -105,7 +107,7 @@ public class ProcessingStepHandler {
 		return Status.OK_STATUS;
 	}
 
-	private static int collectStatus(OutputStream stream, ArrayList list) {
+	private static int collectStatus(OutputStream stream, ArrayList<IStatus> list) {
 		IStatus status = getStatus(stream);
 		list.add(status);
 		OutputStream destination = getDestination(stream);
@@ -125,14 +127,14 @@ public class ProcessingStepHandler {
 		return null;
 	}
 
-	public ProcessingStep[] create(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
+	public ProcessingStep[] create(IProvisioningAgent agent, IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context) {
 		ProcessingStep[] result = new ProcessingStep[descriptors.length];
 		for (int i = 0; i < descriptors.length; i++)
-			result[i] = create(descriptors[i], context);
+			result[i] = create(agent, descriptors[i], context);
 		return result;
 	}
 
-	public ProcessingStep create(ProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
+	public ProcessingStep create(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
 		IExtensionRegistry registry = RegistryFactory.getRegistry();
 		IExtension extension = registry.getExtension(PROCESSING_STEPS_EXTENSION_ID, descriptor.getProcessorId());
 		Exception error;
@@ -141,7 +143,7 @@ public class ProcessingStepHandler {
 			try {
 				Object object = config[0].createExecutableExtension("class"); //$NON-NLS-1$
 				ProcessingStep step = (ProcessingStep) object;
-				step.initialize(descriptor, context);
+				step.initialize(agent, descriptor, context);
 				return step;
 			} catch (Exception e) {
 				error = e;
@@ -155,10 +157,10 @@ public class ProcessingStepHandler {
 		return result;
 	}
 
-	public OutputStream createAndLink(ProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
+	public OutputStream createAndLink(IProvisioningAgent agent, IProcessingStepDescriptor[] descriptors, IArtifactDescriptor context, OutputStream output, IProgressMonitor monitor) {
 		if (descriptors == null)
 			return output;
-		ProcessingStep[] steps = create(descriptors, context);
+		ProcessingStep[] steps = create(agent, descriptors, context);
 		return link(steps, output, monitor);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java
deleted file mode 100644
index a5b0450..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/AbstractArtifactRepository.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository;
-
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
-
-public abstract class AbstractArtifactRepository extends AbstractRepository implements IArtifactRepository {
-
-	protected AbstractArtifactRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
-		super(name, type, version, location, description, provider, properties);
-	}
-
-	public abstract boolean contains(IArtifactDescriptor descriptor);
-
-	public abstract boolean contains(IArtifactKey key);
-
-	public abstract IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
-
-	public abstract IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
-
-	public abstract IArtifactKey[] getArtifactKeys();
-
-	public abstract IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
-
-	public abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
-
-	public void addDescriptor(IArtifactDescriptor descriptor) {
-		assertModifiable();
-	}
-
-	public void addDescriptors(IArtifactDescriptor[] descriptors) {
-		assertModifiable();
-	}
-
-	public void removeDescriptor(IArtifactDescriptor descriptor) {
-		assertModifiable();
-	}
-
-	public void removeDescriptor(IArtifactKey key) {
-		assertModifiable();
-	}
-
-	public void removeAll() {
-		assertModifiable();
-	}
-
-	public boolean equals(Object o) {
-		if (this == o) {
-			return true;
-		}
-		if (!(o instanceof AbstractArtifactRepository)) {
-			return false;
-		}
-		if (URIUtil.sameURI(getLocation(), ((AbstractArtifactRepository) o).getLocation()))
-			return true;
-		return false;
-	}
-
-	public int hashCode() {
-		return (this.getLocation().toString().hashCode()) * 87;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java
deleted file mode 100644
index fce9f4e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/ArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * An artifact repository factory is responsible for creating and loading instances
- * of a particular type of artifact repository. Factories are provided via the 
- * <tt>org.eclipse.equinox.p2.artifact.repository.artifactRepositories</tt> extension point.
- */
-public abstract class ArtifactRepositoryFactory {
-
-	/**
-	 * Creates and returns a new empty artifact repository of the given type at 
-	 * the given location.
-	 * 
-	 * @param location the location for the new repository
-	 * @param name the name of the new repository
-	 * @param type the kind of repository to create
-	 * @param properties the properties to set on the repository
-	 * @return the newly created repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>The repository type is unknown.</li>
-	 * <li>There was an error writing to the given repository location.</li>
-	 * <li>A repository already exists at that location.</li>
-	 * </ul>
-	 */
-	public abstract IArtifactRepository create(URI location, String name, String type, Map properties) throws ProvisionException;
-
-	/**
-	 * Loads and returns the repository of this factory's type at the given location. 
-	 * <p>
-	 * The error code returned in the case of failure is significant. In particular an
-	 * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
-	 * that the location definitely identifies a repository of this type, but an error occurred
-	 * while loading the repository. The repository manager will not attempt to load
-	 * a repository from that location using any other factory.  An error code of
-	 * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
-	 * repository of this type at the given location, and the repository manager is free
-	 * to try again with a different repository factory.
-	 * </p>
-	 * <p>
-	 * The flags passed in should be taken as a hint for the type of repository to load.  If
-	 * the factory knows it will not load a repository that satisfies these hints, it can fail
-	 * fast and return null.
-	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
-	 * </p>
-	 * @param location the location in which to look for a repository description
-	 * @param flags to consider while loading the repository
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return a repository object for the given location
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public abstract IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java
deleted file mode 100644
index d9744ea..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/artifact/repository/SimpleArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryIO;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.p2.repository.Transport;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleArtifactRepositoryFactory extends ArtifactRepositoryFactory {
-
-	public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
-		final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-		long time = 0;
-		final String debugMsg = "Restoring artifact repository "; //$NON-NLS-1$
-		if (Tracing.DEBUG_METADATA_PARSING) {
-			Tracing.debug(debugMsg + location);
-			time = -System.currentTimeMillis();
-		}
-		File localFile = null;
-		boolean local = false;
-		try {
-			SubMonitor sub = SubMonitor.convert(monitor, 300);
-			OutputStream artifacts = null;
-			// try with compressed
-			boolean compress = true;
-			if (PROTOCOL_FILE.equals(location.getScheme())) {
-				local = true;
-				localFile = URIUtil.toFile(SimpleArtifactRepository.getActualLocation(location, true));
-				if (!localFile.exists()) {
-					localFile = URIUtil.toFile(SimpleArtifactRepository.getActualLocation(location, false));
-					compress = false;
-				}
-			} else {
-				//not local, return null if the caller wanted a modifiable repo
-				if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
-					return null;
-				}
-
-				//download to local temp file
-				localFile = File.createTempFile("artifacts", ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
-				try {
-					artifacts = new BufferedOutputStream(new FileOutputStream(localFile));
-					IStatus status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
-					if (!status.isOK()) {
-						// not meaningful to continue on an authentication exception (user will likely just be prompted again)
-						if (status.getCode() == ProvisionException.REPOSITORY_FAILED_AUTHENTICATION)
-							throw new ProvisionException(status);
-						// retry uncompressed
-						compress = false;
-						status = getTransport().download(SimpleArtifactRepository.getActualLocation(location, compress), artifacts, sub.newChild(100));
-						if (!status.isOK())
-							throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
-					}
-				} finally {
-					if (artifacts != null)
-						artifacts.close();
-				}
-			}
-			InputStream descriptorStream = null;
-			try {
-				descriptorStream = new BufferedInputStream(new FileInputStream(localFile));
-				if (compress) {
-					URI actualLocation = SimpleArtifactRepository.getActualLocation(location, false);
-					JarInputStream jInStream = new JarInputStream(descriptorStream);
-					JarEntry jarEntry = jInStream.getNextJarEntry();
-					String filename = URIUtil.lastSegment(actualLocation);
-					while (jarEntry != null && filename != null && !(filename.equals(jarEntry.getName()))) {
-						jarEntry = jInStream.getNextJarEntry();
-					}
-					if (jarEntry == null) {
-						//there is a jar but the entry is missing or invalid, so treat this as an invalid repository
-						throw new IOException(NLS.bind(Messages.io_invalidLocation, actualLocation.getPath()));
-					}
-					descriptorStream = jInStream;
-				}
-				SimpleArtifactRepositoryIO io = new SimpleArtifactRepositoryIO();
-				SimpleArtifactRepository result = (SimpleArtifactRepository) io.read(localFile.toURL(), descriptorStream, sub.newChild(100));
-				result.initializeAfterLoad(location);
-				if (Tracing.DEBUG_METADATA_PARSING) {
-					time += System.currentTimeMillis();
-					Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
-				}
-				return result;
-			} finally {
-				if (descriptorStream != null)
-					descriptorStream.close();
-			}
-		} catch (FileNotFoundException e) {
-			String msg = NLS.bind(Messages.io_failedRead, location);
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
-		} catch (IOException e) {
-			String msg = NLS.bind(Messages.io_failedRead, location);
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
-		} finally {
-			if (!local && localFile != null && !localFile.delete())
-				localFile.deleteOnExit();
-		}
-	}
-
-	public IArtifactRepository create(URI location, String name, String type, Map properties) {
-		return new SimpleArtifactRepository(name, location, properties);
-	}
-
-	private Transport getTransport() {
-		return RepositoryTransport.getInstance();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java
deleted file mode 100644
index a2e1228..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AddChildTask.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task to add a child artifact repository to an already-existing composite artifact repository.
- */
-public class AddChildTask extends Task {
-
-	URI location; // location of the composite repository
-	URI child; // address of the child to add
-	String comparatorID; // comparator to use for compare (optional)
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException("Unable to acquire artifact repository manager service.");
-
-		// get the composite repository
-		CompositeArtifactRepository repo = null;
-		try {
-			repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
-		} catch (ProvisionException e) {
-			throw new BuildException("Exception while loading repository.", e);
-		}
-
-		// just do a straight add if the user didn't specify a comparator.
-		if (comparatorID == null) {
-			repo.addChild(child);
-			return;
-		}
-
-		// otherwise run the comparator when we try and add the child and print out the result.
-		if (repo.addChild(child, comparatorID))
-			System.out.println(child + " was added successfully.");
-		else
-			System.out.println(child + " was not added.");
-	}
-
-	/*
-	 * Set the location of the composite repository.
-	 */
-	public void setLocation(String value) throws URISyntaxException {
-		location = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set the location of the child repository.
-	 */
-	public void setChild(String value) throws URISyntaxException {
-		child = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set the identifier of the comparator to use.
-	 */
-	public void setComparatorID(String value) {
-		comparatorID = value;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java
deleted file mode 100644
index 9d30c11..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/AntMirrorLog.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog;
-import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-public class AntMirrorLog implements IArtifactMirrorLog {
-
-	private boolean consoleMessage = false;
-	private Method log;
-	private Object task;
-
-	public AntMirrorLog(Object task) throws NoSuchMethodException {
-		this.task = task;
-		try {
-			log = task.getClass().getMethod("log", new Class[] {String.class, int.class}); //$NON-NLS-1$
-		} catch (SecurityException e) {
-			exceptionOccurred(null, e);
-		}
-	}
-
-	public void log(IArtifactDescriptor descriptor, IStatus status) {
-		log(descriptor.toString(), status.getSeverity());
-		log(status);
-	}
-
-	public void log(IStatus status) {
-		int severity = status.getSeverity();
-		// Log the status message
-		log(status.getMessage(), severity);
-		// Log the exception if applicable
-		if (status.getException() != null)
-			log(status.getException().getMessage(), severity);
-
-		// Log any children of this status
-		IStatus[] nestedStatus = status.getChildren();
-		if (nestedStatus != null)
-			for (int i = 0; i < nestedStatus.length; i++)
-				log(nestedStatus[i]);
-	}
-
-	public void close() {
-		// nothing to do here
-	}
-
-	/*
-	 * Log a message to the Ant Task
-	 */
-	private void log(String message, int statusSeverity) {
-		try {
-			log.invoke(task, new Object[] {message, new Integer(mapLogLevels(statusSeverity))});
-		} catch (IllegalArgumentException e) {
-			exceptionOccurred(message, e);
-		} catch (IllegalAccessException e) {
-			exceptionOccurred(message, e);
-		} catch (InvocationTargetException e) {
-			exceptionOccurred(message, e);
-		}
-	}
-
-	/*
-	 * Show an error message if this the first time, and print status messages.
-	 */
-	private void exceptionOccurred(String message, Exception e) {
-		if (!consoleMessage) {
-			System.err.println(Messages.MirrorLog_Exception_Occurred);
-			e.printStackTrace(System.err);
-			System.err.println(Messages.MirrorLog_Console_Log);
-			consoleMessage = true;
-		}
-		if (message != null)
-			System.out.println(message);
-	}
-
-	/**
-	 * Copied from AntLogAdapter in pde build.
-	 */
-	private int mapLogLevels(int iStatusLevel) {
-		switch (iStatusLevel) {
-			case IStatus.ERROR :
-				return 0;
-			case IStatus.OK :
-				return 2;
-			case IStatus.INFO :
-				return 2;
-			case IStatus.WARNING :
-				return 1;
-			default :
-				return 1;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java
deleted file mode 100644
index a86224e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/CreateCompositeArtifactRepositoryTask.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-/**
- * Ant task for creating a new composite artifact repository.
- */
-public class CreateCompositeArtifactRepositoryTask extends Task {
-
-	URI location; // desired location of the composite repository
-	String name = "Composite Artifact Repository";
-	boolean compressed = true;
-	boolean failOnExists = false; // should we fail if a repo already exists?
-	Map properties = new HashMap();
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		validate();
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException("Unable to aquire artifact repository manager service.");
-
-		// remove the repo first.
-		manager.removeRepository(location);
-
-		// first try and load to see if one already exists at that location.
-		// if we have an already existing repository at that location, then throw an error
-		// if the user told us to
-		try {
-			IArtifactRepository repository = manager.loadRepository(location, null);
-			if (repository instanceof CompositeArtifactRepository) {
-				if (failOnExists)
-					throw new BuildException("Composite repository already exists at location: " + location);
-				return;
-			} else {
-				// we have a non-composite repo at this location. that is ok because we can co-exist.
-			}
-		} catch (ProvisionException e) {
-			// re-throw the exception if we got anything other than "repo not found"
-			if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
-				throw new BuildException("Exception while trying to read repository at: " + location, e);
-		}
-
-		// set the properties
-		if (compressed)
-			properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
-
-		// create the repository
-		try {
-			manager.createRepository(location, name, IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, properties);
-		} catch (ProvisionException e) {
-			throw new BuildException("Error occurred while creating composite artifact repository.", e);
-		}
-	}
-
-	/*
-	 * Perform basic sanity checking of some of the parameters.
-	 */
-	private void validate() {
-		if (location == null)
-			throw new BuildException("Must specify repository location.");
-		if (name == null)
-			throw new BuildException("Must specify a repository name.");
-	}
-
-	/*
-	 * Set the name of the composite repository.
-	 */
-	public void setName(String value) {
-		name = value;
-	}
-
-	/*
-	 * Set the location of the repository.
-	 */
-	public void setLocation(String value) throws URISyntaxException {
-		location = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set a value indicating whether or not the repository should be compressed.
-	 */
-	public void setCompressed(boolean value) {
-		compressed = value;
-	}
-
-	/*
-	 * Set whether or not we should fail the operation if a repository
-	 * already exists at the location.
-	 */
-	public void setFailOnExists(boolean value) {
-		failOnExists = value;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java
deleted file mode 100644
index 5040961..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/MirrorApplicationTask.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.mirror.MirrorApplication;
-import org.osgi.framework.Bundle;
-
-/**
- * Ant task for running the artifact repository mirroring application.
- */
-public class MirrorApplicationTask extends Task {
-
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private static final String ARG_COMPARATOR = "-comparator"; //$NON-NLS-1$
-	private static final String ARG_COMPARE = "-compare"; //$NON-NLS-1$
-	private static final String ARG_COMPARE_AGAINST = "-compareAgainst"; //$NON-NLS-1$
-	private static final String ARG_COMPARATOR_LOG = "-comparatorLog"; //$NON-NLS-1$
-	private static final String ARG_DESTINATION = "-destination"; //$NON-NLS-1$
-	private static final String ARG_DESTINATION_NAME = "-destinationName"; //$NON-NLS-1$
-	private static final String ARG_IGNORE_ERRORS = "-ignoreErrors"; //$NON-NLS-1$
-	private static final String ARG_LOG = "-log"; //$NON-NLS-1$
-	private static final String ARG_RAW = "-raw"; //$NON-NLS-1$
-	private static final String ARG_SOURCE = "-source"; //$NON-NLS-1$
-	private static final String ARG_VERBOSE = "-verbose"; //$NON-NLS-1$
-	private static final String ARG_WRITE_MODE = "-writeMode"; //$NON-NLS-1$
-
-	URL source;
-	URL destination;
-	String destinationName;
-	URL baseline; // location of known good repository for compare against (optional)
-	File mirrorLog; // file to log mirror output to (optional)
-	File comparatorLog; // file to comparator output to (optional)
-	String comparatorID; // specifies a comparator (optional)
-	String writeMode;
-	boolean compare = false;
-	boolean ignoreErrors = false;
-	boolean raw = false; // use raw artifact descriptors?
-	boolean verbose = false;
-
-	/*
-	 * Runs the mirror application with the given arguments.
-	 */
-	private void runMirrorApplication(final String[] args) throws Exception {
-		MirrorApplication app = new MirrorApplication();
-		if (mirrorLog == null)
-			app.setLog(new AntMirrorLog(this));
-		app.start(new IApplicationContext() {
-
-			public void applicationRunning() {
-				// nothing to do
-			}
-
-			public Map getArguments() {
-				Map arguments = new HashMap();
-				arguments.put(IApplicationContext.APPLICATION_ARGS, args);
-				return arguments;
-			}
-
-			public String getBrandingApplication() {
-				return null;
-			}
-
-			public Bundle getBrandingBundle() {
-				return null;
-			}
-
-			public String getBrandingDescription() {
-				return null;
-			}
-
-			public String getBrandingId() {
-				return null;
-			}
-
-			public String getBrandingName() {
-				return null;
-			}
-
-			public String getBrandingProperty(String key) {
-				return null;
-			}
-		});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		// Compare against if baseline specified
-		boolean compareAgainst = baseline != null;
-		boolean comparator = comparatorID != null;
-
-		// create arguments
-		String[] args = new String[] { //
-		ARG_SOURCE, source.toExternalForm(), //
-				ARG_DESTINATION, destination.toExternalForm(), //
-				ARG_WRITE_MODE, writeMode == null ? EMPTY_STRING : writeMode, //
-				compare ? ARG_COMPARE : EMPTY_STRING, //
-				ignoreErrors ? ARG_IGNORE_ERRORS : EMPTY_STRING, //
-				raw ? ARG_RAW : EMPTY_STRING, //
-				verbose ? ARG_VERBOSE : EMPTY_STRING, //
-				compareAgainst ? ARG_COMPARE_AGAINST : EMPTY_STRING, //
-				compareAgainst ? baseline.toExternalForm() : EMPTY_STRING, //
-				comparator ? ARG_COMPARATOR : EMPTY_STRING, //
-				comparator ? comparatorID : EMPTY_STRING, //
-				mirrorLog != null ? ARG_LOG : EMPTY_STRING, //
-				mirrorLog != null ? mirrorLog.getAbsolutePath() : EMPTY_STRING, //
-				comparatorLog != null ? ARG_COMPARATOR_LOG : EMPTY_STRING, //
-				comparatorLog != null ? comparatorLog.getAbsolutePath() : EMPTY_STRING, //
-				destinationName != null ? ARG_DESTINATION_NAME : EMPTY_STRING, //
-				destinationName != null ? destinationName : EMPTY_STRING};
-
-		try {
-			runMirrorApplication(args);
-		} catch (Exception e) {
-			throw new BuildException("Exception while running mirror application.", e);
-		}
-	}
-
-	/*
-	 * Set the location of the source.
-	 */
-	public void setSource(String value) throws MalformedURLException {
-		source = new URL(value);
-	}
-
-	/*
-	 * Set the location of the destination.
-	 */
-	public void setDestination(String value) throws MalformedURLException {
-		destination = new URL(value);
-	}
-
-	/*
-	 * Set the name of the destination repository.
-	 */
-	public void setDestinationName(String value) {
-		destinationName = value;
-	}
-
-	/*
-	 * Set the location of the baseline repository. (used in comparison)
-	 */
-	public void setBaseline(String value) throws MalformedURLException {
-		baseline = new URL(value);
-		compare = true;
-	}
-
-	/*
-	 * Set the identifier of the comparator to use.
-	 */
-	public void setComparatorID(String value) {
-		comparatorID = value;
-		compare = true;
-	}
-
-	/*
-	 * Set the location of the comparator log
-	 */
-	public void setComparatorLog(String value) {
-		comparatorLog = new File(value);
-	}
-
-	/*
-	 * Set the write mode. (e.g. clean or append)
-	 */
-	public void setWriteMode(String value) {
-		writeMode = value;
-	}
-
-	/*
-	 * Set the log location if applicable
-	 */
-	public void setLog(String value) {
-		mirrorLog = new File(value);
-	}
-
-	/*
-	 * Set whether or not the application should be calling a comparator when mirroring.
-	 */
-	public void setCompare(boolean value) {
-		compare = value;
-	}
-
-	/*
-	 * Set whether or not we should ignore errors when running the mirror application.
-	 */
-	public void setIgnoreErrors(boolean value) {
-		ignoreErrors = value;
-	}
-
-	/*
-	 * Set whether or not the the artifacts are raw.
-	 */
-	public void setRaw(boolean value) {
-		raw = value;
-	}
-
-	/*
-	 * Set whether or not the mirror application should be run in verbose mode.
-	 */
-	public void setVerbose(boolean value) {
-		verbose = value;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java
deleted file mode 100644
index 2a12126..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/RemoveChildTask.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task for removing a specific child from a composite artifact repository.
- */
-public class RemoveChildTask extends Task {
-
-	URI location; // location of the composite repository
-	URI child; // location of child to remove
-	boolean allChildren = false; // should we remove all children?
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException("Unable to aquire artifact repository manager service.");
-
-		// load repository
-		CompositeArtifactRepository repo;
-		try {
-			repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
-		} catch (ProvisionException e) {
-			throw new BuildException("Error occurred while loading repository.", e);
-		}
-
-		// remove all children or just a specified child
-		if (allChildren)
-			repo.removeAllChildren();
-		else
-			repo.removeChild(child);
-	}
-
-	/*
-	 * Set the repository location.
-	 */
-	public void setLocation(String value) throws URISyntaxException {
-		location = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set the child repository location.
-	 */
-	public void setChild(String value) throws URISyntaxException {
-		child = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set whether or not we want to remove all the children.
-	 */
-	public void setAllChildren(String value) {
-		allChildren = Boolean.valueOf(value).booleanValue();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java b/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java
deleted file mode 100644
index 96a4d3a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.artifact.repository/src_ant/org/eclipse/equinox/internal/p2/artifact/repository/ant/ValidateTask.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Ant task for validating the contents of a composite artifact repository.
- */
-public class ValidateTask extends Task {
-
-	URI location; // location of the composite repository
-	String comparatorID; // specifies the comparator we want to use.
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException("Unable to aquire artifact repository manager service.");
-
-		// load the repository
-		CompositeArtifactRepository repo = null;
-		try {
-			repo = (CompositeArtifactRepository) manager.loadRepository(location, null);
-		} catch (ProvisionException e) {
-			throw new BuildException("Exception while loading repository.", e);
-		}
-
-		// perform the sanity check
-		if (repo.validate(comparatorID))
-			System.err.println("Valid repository at: " + location);
-		else
-			System.err.println("Invalid repository at: " + location);
-	}
-
-	/*
-	 * Set the repository location.
-	 */
-	public void setLocation(String value) throws URISyntaxException {
-		location = URIUtil.fromString(value);
-	}
-
-	/*
-	 * Set the ID of the comparator.
-	 */
-	public void setComparatorID(String value) {
-		comparatorID = value;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.console/.classpath
index 7cdeb73..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
index a455b62..f3c4905 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
@@ -1,33 +1,36 @@
-#Thu Sep 13 22:02:41 EDT 2007
+#Fri Jan 22 13:20:25 EST 2010
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
 org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
 org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -41,6 +44,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -48,7 +52,9 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
@@ -59,29 +65,34 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warnin
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -153,7 +164,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..d5facb7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Fri Jan 22 13:26:41 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
index 876770c..b19c5c7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
@@ -1,29 +1,28 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.console;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.console;singleton:=true
+Bundle-Version: 1.0.200.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.console.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.console.Activator
-Eclipse-LazyStart: true
-Export-Package: org.eclipse.equinox.internal.p2.console;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.tools"
-Import-Package: org.eclipse.core.runtime;common=split,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.repository,
+Export-Package: org.eclipse.equinox.internal.p2.console;x-friends:="org.eclipse.equinox.p2.director.app"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.1.0",
  org.osgi.framework;version="1.4.0",
- org.osgi.util.tracker;version="1.3.3"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+ org.osgi.util.tracker;version="1.3.0"
+Bundle-ActivationPolicy: lazy
+Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/Provisioning console.launch b/eclipse/plugins/org.eclipse.equinox.p2.console/Provisioning console.launch
index c4d8769..b8541dc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/Provisioning console.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/Provisioning console.launch	
@@ -5,16 +5,18 @@
 <stringAttribute key="bootstrap" value=""/>
 <stringAttribute key="checked" value="[NONE]"/>
 <booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="d:\tmp\selfhosting"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Provisioning console"/>
 <booleanAttribute key="default_auto_start" value="false"/>
 <intAttribute key="default_start_level" value="4"/>
 <booleanAttribute key="includeOptional" value="true"/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.6.0-openjdk-1.6.0.0.x86_64"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -noexit"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
 <booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app*1.0.100.v20080303 at default:default,org.eclipse.equinox.preferences*3.2.200.v20080201 at default:default,javax.servlet*2.4.0.v200711021030 at default:default,org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717 at default:false,org.eclipse.core.runtime*3.4.0.v20080303 at default:default,org.eclipse.core.jobs*3.3.100.v20080224 at default:default,org.eclipse.core.net*1.0.100.I20080226 at default:default,org.eclipse.equinox.common*3.4.0.v20080201 at default:default,org.eclipse.osgi.services*3.1.200.v20071203 at default:default,org.eclipse.osgi*3.4.0.v20080304@:,org.eclipse.core.runtime.compatibility.auth*3.2.100.v20070502 at default:default,org.eclipse.equinox.registry*3.4.0.v20080201 at default:default,org.eclipse.core.contenttype*3.3.0.v20080201 at default:default"/>
+<stringAttribute key="target_bundles" value="org.eclipse.osgi.services at default:default,org.eclipse.ecf.ssl at default:false,org.eclipse.equinox.common at 2:true,org.eclipse.core.net at default:default,org.eclipse.equinox.security at default:default,org.eclipse.ecf.provider.filetransfer.httpclient at default:default,org.eclipse.core.net.linux.x86_64 at default:false,org.eclipse.core.contenttype at default:default,org.apache.commons.codec at default:default,org.eclipse.equinox.ds at 1:true,org.eclipse.equinox.app at default:default,org.eclipse.ecf at default:default,javax.servlet at default:default,org.eclipse.ecf.provider.filetransfer.ssl at default:false,org.apache.commons.logging at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.util at default:default,org.eclipse.core.runtime.compatibility.auth at default:default,org.eclipse.core.runtime at default:true,org.eclipse.equinox.preferences at default:default,org.apache.commons.httpclient at default:default,org.eclipse.core.jobs at default:default,org.eclipse.osgi at -1:true,org.eclipse.equinox.registry at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.concurrent at default:default,org.eclipse.ant.core at default:default,org.eclipse.core.runtime.compatibility.registry at default:false,org.eclipse.ecf.identity at default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl at default:false,org.eclipse.core.variables at default:default"/>
 <booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.generator*0.1.0.qualifier at default:default,org.eclipse.equinox.frameworkadmin*0.1.0.qualifier at default:default,org.sat4j.pb*2.0.0.v20080307 at default:default,org.eclipse.equinox.p2.garbagecollector*0.1.0.qualifier at default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier at default:default,org.eclipse.ecf.provider.filetransfer*1.6.0.qualifier at default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier at default:default,org.eclipse.equinox.p2.exemplarysetup*0.1.0.qualifier at default:true,org.eclipse.equinox.p2.console*0.1.0.qualifier at default:true,org.eclipse.equinox.p2.touchpoint.eclipse*0.1.0.qualifier at default:default,org.eclipse.ecf*1.4.0.qualifier at default:default,org.eclipse.equinox.p2.artifact.repository*0.1.0.qualifier at default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier at default:true,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier at default:default,org.sat4j.core*2.0.0.v20080307 at default:default,org.eclipse.equinox.simpleconfigurator.manipulator*0.1.0.qualifier at default:default,org.eclipse.equinox.p2.director*0.1.0.qualifier at default:default,org.eclipse.equinox.p2.engine*0.1.0.qualifier at default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier at default:default,org.eclipse.equinox.p2.touchpoint.natives*0.1.0.qualifier at default:default,org.eclipse.equinox.simpleconfigurator*0.1.0.qualifier at 1:true,org.eclipse.equinox.p2.jarprocessor*0.1.0.qualifier at default:default,org.eclipse.ecf.identity*1.3.0.qualifier at default:default"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.touchpoint.osgi at default:default,org.eclipse.equinox.p2.garbagecollector at default:default,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.metadata.generator at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.frameworkadmin at default:default,org.eclipse.equinox.p2.updatesite at default:default,org.eclipse.equinox.frameworkadmin.equinox at default:true,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.extensionlocation at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.sat4j.pb at default:default,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.publisher at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.p2.exemplarysetup at default:true,org.eclipse.equinox.p2.operations at default:default,org.eclipse.equinox.p2.artifact.optimizers at default:default,ie.wombat.jbdiff at default:default,org.eclipse.equinox.p2.ql at default:default,org.eclipse.equinox.p2.repository at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.simpleconfigurator.manipulator at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.equinox.p2.sar at default:default,org.eclipse.equinox.p2.artifact.processors at default:default,org.eclipse.equinox.p2.console at default:true,org.eclipse.equinox.p2.repository.tools at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.directorywatcher at default:default,org.sat4j.core at default:default,org.eclipse.equinox.simpleconfigurator at 1:true"/>
 </launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.console/build.properties
index a6b8330..246ea6c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/build.properties
@@ -15,3 +15,5 @@ bin.includes = META-INF/,\
                about.html,\
                plugin.properties
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.console/pom.xml
new file mode 100644
index 0000000..f1d09e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.console</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
index 78398a0..10304f9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2008, 2009, IBM Corporation and others. All rights reserved. This
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,11 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Composent, Inc. - additions
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.console;
 
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
 import org.osgi.framework.*;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
@@ -21,7 +22,7 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
 	private static final String PROVIDER_NAME = "org.eclipse.osgi.framework.console.CommandProvider"; //$NON-NLS-1$
 	private static BundleContext context;
 
-	private ServiceTracker profileTracker;
+	private ServiceTracker agentTracker;
 	private ProvCommandProvider provider;
 	private ServiceRegistration providerRegistration = null;
 
@@ -33,8 +34,8 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
 		super();
 	}
 
-	public void start(BundleContext context) throws Exception {
-		Activator.context = context;
+	public void start(BundleContext ctxt) throws Exception {
+		Activator.context = ctxt;
 		boolean registerCommands = true;
 		try {
 			Class.forName(PROVIDER_NAME);
@@ -43,13 +44,13 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
 		}
 
 		if (registerCommands) {
-			profileTracker = new ServiceTracker(context, IProfileRegistry.class.getName(), this);
-			profileTracker.open();
+			agentTracker = new ServiceTracker(context, IProvisioningAgent.SERVICE_NAME, this);
+			agentTracker.open();
 		}
 	}
 
-	public void stop(BundleContext context) throws Exception {
-		profileTracker.close();
+	public void stop(BundleContext ctxt) throws Exception {
+		agentTracker.close();
 		if (providerRegistration != null)
 			providerRegistration.unregister();
 		providerRegistration = null;
@@ -57,15 +58,15 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer {
 	}
 
 	public Object addingService(ServiceReference reference) {
-		BundleContext context = Activator.getContext();
-		IProfileRegistry registry = (IProfileRegistry) context.getService(reference);
-		provider = new ProvCommandProvider(context.getProperty("eclipse.p2.profile"), registry);
-		providerRegistration = context.registerService(PROVIDER_NAME, provider, null);
-		return registry;
+		BundleContext ctxt = Activator.getContext();
+		IProvisioningAgent agent = (IProvisioningAgent) ctxt.getService(reference);
+		provider = new ProvCommandProvider(ctxt.getProperty("eclipse.p2.profile"), agent); //$NON-NLS-1$
+		providerRegistration = ctxt.registerService(PROVIDER_NAME, provider, null);
+		return agent;
 	}
 
 	public void modifiedService(ServiceReference reference, Object service) {
-		// TODO Auto-generated method stub
+		// nothing
 	}
 
 	public void removedService(ServiceReference reference, Object service) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
index 0250c92..3024d11 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  * 
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors: 
+ * 	IBM Corporation - initial API and implementation
  * 	Band XI - add more commands
+ *		Composent, Inc. - command additions
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.console;
 
@@ -15,18 +17,14 @@ import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.eclipse.osgi.framework.console.CommandProvider;
 
@@ -38,9 +36,12 @@ public class ProvCommandProvider implements CommandProvider {
 	private static final String WILDCARD_ANY = "*"; //$NON-NLS-1$
 	public static final String NEW_LINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 
+	private final IProvisioningAgent agent;
+
 	//	private Profile profile;
 
-	public ProvCommandProvider(String profileId, IProfileRegistry registry) {
+	public ProvCommandProvider(String profileId, IProvisioningAgent agent) {
+		this.agent = agent;
 		// look up the profile we are currently running and use it as the
 		// default.
 		// TODO define a way to spec the default profile to manage
@@ -56,60 +57,90 @@ public class ProvCommandProvider implements CommandProvider {
 	}
 
 	/**
-	 * Adds a metadata repository.
+	 * Adds both a metadata repository and artifact repository
 	 */
 	public void _provaddrepo(CommandInterpreter interpreter) {
 		String urlString = interpreter.nextArgument();
 		if (urlString == null) {
-			interpreter.print("Repository location must be provided");
-			interpreter.println();
+			interpreter.println("Repository location must be provided");
 			return;
 		}
-		URI repoURL = toURI(interpreter, urlString);
-		if (repoURL == null)
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
 			return;
-		if (ProvisioningHelper.addMetadataRepository(repoURL) == null)
-			interpreter.println("Unable to add repository: " + repoURL);
+		// add metadata repo
+		if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null) {
+			interpreter.println("Unable to add metadata repository: " + repoURI);
+		} else // add artifact repo at same URL
+		if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null) {
+			interpreter.println("Unable to add artifact repository: " + repoURI);
+		}
 	}
 
 	public void _provdelrepo(CommandInterpreter interpreter) {
 		String urlString = interpreter.nextArgument();
 		if (urlString == null) {
-			interpreter.print("Repository location must be provided");
-			interpreter.println();
+			interpreter.println("Repository location must be provided");
 			return;
 		}
-		URI repoURL = toURI(interpreter, urlString);
-		if (repoURL == null)
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
+			return;
+		ProvisioningHelper.removeMetadataRepository(agent, repoURI);
+		ProvisioningHelper.removeArtifactRepository(agent, repoURI);
+	}
+
+	/**
+	 * Adds a metadata repository.
+	 */
+	public void _provaddmetadatarepo(CommandInterpreter interpreter) {
+		String urlString = interpreter.nextArgument();
+		if (urlString == null) {
+			interpreter.println("Repository location must be provided");
 			return;
-		ProvisioningHelper.removeMetadataRepository(repoURL);
+		}
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
+			return;
+		if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null)
+			interpreter.println("Unable to add repository: " + repoURI);
+	}
+
+	public void _provdelmetadatarepo(CommandInterpreter interpreter) {
+		String urlString = interpreter.nextArgument();
+		if (urlString == null) {
+			interpreter.println("Repository location must be provided");
+			return;
+		}
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
+			return;
+		ProvisioningHelper.removeMetadataRepository(agent, repoURI);
 	}
 
 	public void _provaddartifactrepo(CommandInterpreter interpreter) {
 		String urlString = interpreter.nextArgument();
 		if (urlString == null) {
-			interpreter.print("Repository location must be provided");
-			interpreter.println();
+			interpreter.println("Repository location must be provided");
 			return;
 		}
-		URI repoURL = toURI(interpreter, urlString);
-		if (repoURL == null)
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
 			return;
-		if (ProvisioningHelper.addArtifactRepository(repoURL) == null)
-			interpreter.println("Unable to add repository: " + repoURL);
+		if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null)
+			interpreter.println("Unable to add repository " + repoURI);
 	}
 
 	public void _provdelartifactrepo(CommandInterpreter interpreter) {
 		String urlString = interpreter.nextArgument();
 		if (urlString == null) {
-			interpreter.print("Repository location must be provided");
-			interpreter.println();
+			interpreter.println("Repository location must be provided");
 			return;
 		}
-		URI repoURL = toURI(interpreter, urlString);
-		if (repoURL == null)
+		URI repoURI = toURI(interpreter, urlString);
+		if (repoURI == null)
 			return;
-		ProvisioningHelper.removeArtifactRepository(repoURL);
+		ProvisioningHelper.removeArtifactRepository(agent, repoURI);
 	}
 
 	/**
@@ -119,24 +150,36 @@ public class ProvCommandProvider implements CommandProvider {
 		String iu = interpreter.nextArgument();
 		String version = interpreter.nextArgument();
 		String profileId = interpreter.nextArgument();
-		if (profileId == null || profileId.equals("this"))
+		if (profileId == null || profileId.equals("this")) //$NON-NLS-1$
 			profileId = IProfileRegistry.SELF;
 		if (iu == null || version == null || profileId == null) {
-			interpreter.println("Installable unit id, version, and profile Id must be provided");
+			interpreter.println("Installable unit id, version, and profileid must be provided");
 			return;
 		}
 		IStatus s = null;
 		try {
-			s = ProvisioningHelper.install(iu, version, ProvisioningHelper.getProfile(profileId), new NullProgressMonitor());
+			s = ProvisioningHelper.install(agent, iu, version, ProvisioningHelper.getProfile(agent, profileId), new NullProgressMonitor());
 		} catch (ProvisionException e) {
-			interpreter.println("installation failed ");
-			e.printStackTrace();
+			interpreter.println("Installation failed with ProvisionException for " + iu + " " + version);
+			interpreter.printStackTrace(e);
 			return;
 		}
 		if (s.isOK())
-			interpreter.println("installation complete");
-		else
-			interpreter.println("installation failed " + s.getMessage());
+			interpreter.println("Installation complete for " + iu + " " + version);
+		else {
+			interpreter.println("Installation failed for " + iu + " " + version);
+			interpreter.println(flattenStatus(s.getChildren(), "  "));
+		}
+	}
+
+	private String flattenStatus(IStatus[] childs, String indent) {
+		StringBuffer sb = new StringBuffer();
+
+		for (int i = 0; (childs != null) && (i < childs.length); i++) {
+			sb.append(indent).append(childs[i].getMessage()).append(NEW_LINE);
+			sb.append(flattenStatus(childs[i].getChildren(), indent + "  "));
+		}
+		return sb.toString();
 	}
 
 	/**
@@ -151,16 +194,16 @@ public class ProvCommandProvider implements CommandProvider {
 			return;
 		}
 		String environments = interpreter.nextArgument();
-		Properties props = new Properties();
-		props.setProperty(IProfile.PROP_INSTALL_FOLDER, location);
-		props.setProperty(IProfile.PROP_FLAVOR, flavor);
+		Map<String, String> props = new HashMap<String, String>();
+		props.put(IProfile.PROP_INSTALL_FOLDER, location);
 		if (environments != null)
-			props.setProperty(IProfile.PROP_ENVIRONMENTS, environments);
+			props.put(IProfile.PROP_ENVIRONMENTS, environments);
 
 		try {
-			ProvisioningHelper.addProfile(profileId, props);
+			ProvisioningHelper.addProfile(agent, profileId, props);
 		} catch (ProvisionException e) {
-			interpreter.println("add profile failed " + e.getMessage());
+			interpreter.println("Add profile failed.  " + e.getMessage());
+			interpreter.printStackTrace(e);
 		}
 	}
 
@@ -170,10 +213,10 @@ public class ProvCommandProvider implements CommandProvider {
 	public void _provdelprofile(CommandInterpreter interpreter) {
 		String profileId = interpreter.nextArgument();
 		if (profileId == null) {
-			interpreter.println("Id must be provided");
+			interpreter.println("profileid must be provided");
 			return;
 		}
-		ProvisioningHelper.removeProfile(profileId);
+		ProvisioningHelper.removeProfile(agent, profileId);
 	}
 
 	/**
@@ -188,12 +231,42 @@ public class ProvCommandProvider implements CommandProvider {
 		URI repoURL = null;
 		if (urlString != null && !urlString.equals(WILDCARD_ANY))
 			repoURL = toURI(interpreter, urlString);
-		IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(repoURL, new InstallableUnitQuery(id, new VersionRange(version)), null));
+		IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
 		for (int i = 0; i < units.length; i++)
 			println(interpreter, units[i]);
 	}
 
 	/**
+	 * Lists the installable units that match the given URL and query. A third
+	 * boolean argument can be provided where <code>true</code> means "full query"
+	 * and <code>false</code> means "e;match query"e;. The default is <code>false</code>.
+	 * 
+	 * @param interpreter
+	 */
+	public void _provlquery(CommandInterpreter interpreter) {
+		String urlString = processArgument(interpreter.nextArgument());
+		String expression = processArgument(interpreter.nextArgument());
+		if (expression == null) {
+			interpreter.println("Please enter a query");
+			return;
+		}
+		boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
+		URI repoURL = null;
+		if (urlString != null && !urlString.equals(WILDCARD_ANY))
+			repoURL = toURI(interpreter, urlString);
+
+		IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
+		IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, query, null));
+		// Now print out results
+		if (units.length == 0)
+			interpreter.println("No units found");
+		else {
+			for (int i = 0; i < units.length; i++)
+				println(interpreter, units[i]);
+		}
+	}
+
+	/**
 	 * Lists the known metadata repositories, or the contents of a given
 	 * metadata repository.
 	 * 
@@ -204,7 +277,7 @@ public class ProvCommandProvider implements CommandProvider {
 		String id = processArgument(interpreter.nextArgument());
 		String version = processArgument(interpreter.nextArgument());
 		if (urlString == null) {
-			URI[] repositories = ProvisioningHelper.getMetadataRepositories();
+			URI[] repositories = ProvisioningHelper.getMetadataRepositories(agent);
 			if (repositories != null)
 				for (int i = 0; i < repositories.length; i++)
 					interpreter.println(repositories[i]);
@@ -213,7 +286,7 @@ public class ProvCommandProvider implements CommandProvider {
 		URI repoLocation = toURI(interpreter, urlString);
 		if (repoLocation == null)
 			return;
-		IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(repoLocation, new InstallableUnitQuery(id, new VersionRange(version)), null));
+		IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoLocation, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
 		for (int i = 0; i < units.length; i++)
 			println(interpreter, units[i]);
 	}
@@ -226,21 +299,20 @@ public class ProvCommandProvider implements CommandProvider {
 	 */
 	public void _provlg(CommandInterpreter interpreter) {
 		String urlString = processArgument(interpreter.nextArgument());
-		IQueryable queryable = null;
+		IQueryable<IInstallableUnit> queryable = null;
 		if (urlString == null) {
-			queryable = (IQueryable) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+			queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 			if (queryable == null)
 				return;
 		} else {
 			URI repoURL = toURI(interpreter, urlString);
 			if (repoURL == null)
 				return;
-			queryable = ProvisioningHelper.getMetadataRepository(repoURL);
+			queryable = ProvisioningHelper.getMetadataRepository(agent, repoURL);
 			if (queryable == null)
 				return;
 		}
-		Query query = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
-		IInstallableUnit[] units = sort(queryable.query(query, new Collector(), null));
+		IInstallableUnit[] units = sort(queryable.query(QueryUtil.createIUGroupQuery(), null));
 		for (int i = 0; i < units.length; i++)
 			println(interpreter, units[i]);
 	}
@@ -254,7 +326,7 @@ public class ProvCommandProvider implements CommandProvider {
 	public void _provlar(CommandInterpreter interpreter) {
 		String urlString = processArgument(interpreter.nextArgument());
 		if (urlString == null) {
-			URI[] repositories = ProvisioningHelper.getArtifactRepositories();
+			URI[] repositories = ProvisioningHelper.getArtifactRepositories(agent);
 			if (repositories == null)
 				return;
 			for (int i = 0; i < repositories.length; i++)
@@ -264,27 +336,28 @@ public class ProvCommandProvider implements CommandProvider {
 		URI repoURL = toURI(interpreter, urlString);
 		if (repoURL == null)
 			return;
-		IArtifactRepository repo = ProvisioningHelper.getArtifactRepository(repoURL);
-		IArtifactKey[] keys = null;
+		IArtifactRepository repo = ProvisioningHelper.getArtifactRepository(agent, repoURL);
+		IQueryResult<IArtifactKey> keys = null;
 		try {
-			keys = (repo != null) ? repo.getArtifactKeys() : null;
+			keys = (repo != null) ? repo.query(ArtifactKeyQuery.ALL_KEYS, null) : null;
 		} catch (UnsupportedOperationException e) {
-			interpreter.println("Repository does not support list commands.");
+			interpreter.println("Repository does not support queries.");
 			return;
 		}
-		if (keys == null || keys.length == 0) {
+		if (keys == null || keys.isEmpty()) {
 			interpreter.println("Repository has no artifacts");
 			return;
 		}
 		IFileArtifactRepository fileRepo = (IFileArtifactRepository) repo.getAdapter(IFileArtifactRepository.class);
-		for (int i = 0; i < keys.length; i++) {
-			IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(keys[i]);
+		for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
+			IArtifactKey key = iterator.next();
+			IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(key);
 			for (int j = 0; j < descriptors.length; j++) {
 				IArtifactDescriptor descriptor = descriptors[j];
 				File location = null;
 				if (fileRepo != null)
 					location = fileRepo.getArtifactFile(descriptor);
-				println(interpreter, keys[i], location);
+				println(interpreter, key, location);
 			}
 
 		}
@@ -320,60 +393,286 @@ public class ProvCommandProvider implements CommandProvider {
 		String id = processArgument(interpreter.nextArgument());
 		String range = processArgument(interpreter.nextArgument());
 		if (profileId == null) {
-			IProfile[] profiles = ProvisioningHelper.getProfiles();
+			IProfile[] profiles = ProvisioningHelper.getProfiles(agent);
 			for (int i = 0; i < profiles.length; i++)
 				interpreter.println(profiles[i].getProfileId());
 			return;
 		}
 		// determine which profile is to be listed
 		IProfile target = null;
-		if (profileId.equals("this"))
+		if (profileId.equals("this")) //$NON-NLS-1$
 			profileId = IProfileRegistry.SELF;
-		target = ProvisioningHelper.getProfile(profileId);
+		target = ProvisioningHelper.getProfile(agent, profileId);
 		if (target == null)
 			return;
 
 		// list the profile contents
-		IInstallableUnit[] result = sort(target.query(new InstallableUnitQuery(id, new VersionRange(range)), new Collector(), null));
+		IInstallableUnit[] result = sort(target.query(QueryUtil.createIUQuery(id, new VersionRange(range)), null));
 		for (int i = 0; i < result.length; i++)
 			interpreter.println(result[i]);
 	}
 
-	private IInstallableUnit[] sort(Collector collector) {
-		IInstallableUnit[] units = (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);
-		Arrays.sort(units, new Comparator() {
-			public int compare(Object arg0, Object arg1) {
+	/**
+	 * Lists the profile timestamps for a given profile id, if no profile id, the default profile
+	 * is used.
+	 * 
+	 * @param interpreter
+	 */
+	public void _provlpts(CommandInterpreter interpreter) {
+		String profileId = processArgument(interpreter.nextArgument());
+		if (profileId == null || profileId.equals("this")) { //$NON-NLS-1$
+			profileId = IProfileRegistry.SELF;
+		}
+		long[] profileTimestamps = ProvisioningHelper.getProfileTimestamps(agent, profileId);
+		// if no profile timestamps for given id, print that out and done
+		if (profileTimestamps == null || profileTimestamps.length == 0) {
+			interpreter.print("No timestamps found for profile ");
+			interpreter.println(profileId);
+			return;
+		}
+		// else if there are some timestamps then print them out on separate line
+		interpreter.print("Timestamps for profile ");
+		interpreter.println(profileId);
+		for (int i = 0; i < profileTimestamps.length; i++) {
+			interpreter.print("\t"); //$NON-NLS-1$
+			interpreter.println(new Long(profileTimestamps[i]));
+		}
+	}
+
+	/**
+	 * Revert a profile to a given timestamp
+	 */
+	public void _provrevert(CommandInterpreter interpreter) {
+		String timestamp = interpreter.nextArgument();
+		if (timestamp == null) {
+			interpreter.println("Valid timestamp must be provided.  Timestamps can be retrieved via 'provlpts' command.");
+			return;
+		}
+		Long ts = null;
+		try {
+			ts = new Long(timestamp);
+		} catch (NumberFormatException e) {
+			interpreter.println("Timestamp " + timestamp + " not valid.  Timestamps can be retrieved via 'provlpts' command.");
+			return;
+		}
+		String profileId = interpreter.nextArgument();
+		if (profileId == null || profileId.equals("this"))
+			profileId = IProfileRegistry.SELF;
+
+		IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
+		if (profile == null) {
+			interpreter.println("Profile " + profileId + " not found");
+			return;
+		}
+		IStatus s = null;
+		try {
+			s = ProvisioningHelper.revertToPreviousState(agent, profile, ts.longValue());
+		} catch (ProvisionException e) {
+			interpreter.println("revert failed ");
+			interpreter.printStackTrace(e);
+			return;
+		}
+		if (s.isOK())
+			interpreter.println("revert completed");
+		else {
+			interpreter.println("revert failed ");
+			printErrorStatus(interpreter, s);
+		}
+	}
+
+	private IInstallableUnit[] sort(IQueryResult<IInstallableUnit> queryResult) {
+		IInstallableUnit[] units = queryResult.toArray(IInstallableUnit.class);
+		Arrays.sort(units, new Comparator<IInstallableUnit>() {
+			public int compare(IInstallableUnit arg0, IInstallableUnit arg1) {
 				return arg0.toString().compareTo(arg1.toString());
 			}
 		});
 		return units;
 	}
 
+	public void _provlgp(CommandInterpreter interpreter) {
+		String profileId = processArgument(interpreter.nextArgument());
+		if (profileId == null || profileId.equals("this")) {
+			profileId = IProfileRegistry.SELF;
+		}
+		IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
+		if (profile == null) {
+			interpreter.println("Profile " + profileId + " not found");
+			return;
+		}
+		IInstallableUnit[] units = sort(profile.query(QueryUtil.createIUGroupQuery(), new NullProgressMonitor()));
+		// Now print out results
+		for (int i = 0; i < units.length; i++)
+			println(interpreter, units[i]);
+	}
+
+	/**
+	 * Lists the installable units that match the given profile id and query. The id can be
+	 * "this" to denote the self profile. A third boolean argument can be provided
+	 * where <code>true</code> means "full query" and <code>false</code> means
+	 * "e;match query"e;. The default is <code>false</code>.
+	 * 
+	 * @param interpreter
+	 */
+	public void _provlpquery(CommandInterpreter interpreter) {
+		String profileId = processArgument(interpreter.nextArgument());
+		if (profileId == null || profileId.equals("this")) {
+			profileId = IProfileRegistry.SELF;
+		}
+
+		String expression = processArgument(interpreter.nextArgument());
+		if (expression == null) {
+			interpreter.println("Please enter a query");
+			return;
+		}
+
+		boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
+		IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
+
+		IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
+		if (profile == null) {
+			interpreter.println("Profile " + profileId + " not found");
+			return;
+		}
+		IInstallableUnit[] units = sort(profile.query(query, new NullProgressMonitor()));
+		// Now print out results
+		if (units.length == 0)
+			interpreter.println("No units found");
+		else {
+			for (int i = 0; i < units.length; i++)
+				println(interpreter, units[i]);
+		}
+	}
+
+	public void _provremove(CommandInterpreter interpreter) {
+		String iu = interpreter.nextArgument();
+		String version = interpreter.nextArgument();
+		String profileId = interpreter.nextArgument();
+		if (profileId == null || profileId.equals("this"))
+			profileId = IProfileRegistry.SELF;
+		if (version == null) {
+			version = Version.emptyVersion.toString();
+		}
+		if (iu == null) {
+			interpreter.println("Installable unit id must be provided");
+			return;
+		}
+		IStatus s = null;
+		try {
+			s = ProvisioningHelper.uninstall(agent, iu, version, ProvisioningHelper.getProfile(agent, profileId), new NullProgressMonitor());
+		} catch (ProvisionException e) {
+			interpreter.println("Remove failed with ProvisionException for " + iu + " " + version);
+			interpreter.printStackTrace(e);
+			return;
+		}
+		if (s.isOK())
+			interpreter.println("Remove complete for " + iu + " " + version);
+		else {
+			interpreter.println("Remove failed for " + iu + " " + version);
+			printErrorStatus(interpreter, s);
+		}
+	}
+
+	private void printErrorStatus(CommandInterpreter interpreter, IStatus status) {
+		interpreter.print("--Error status ");
+		interpreter.print("message=" + status.getMessage());
+		interpreter.print(",code=" + status.getCode());
+		String severityString = null;
+		switch (status.getSeverity()) {
+			case IStatus.INFO :
+				severityString = "INFO";
+				break;
+			case IStatus.CANCEL :
+				severityString = "CANCEL";
+				break;
+			case IStatus.WARNING :
+				severityString = "WARNING";
+				break;
+			case IStatus.ERROR :
+				severityString = "ERROR";
+				break;
+		}
+		interpreter.print(",severity=" + severityString);
+		interpreter.print(",bundle=" + status.getPlugin());
+		interpreter.println("--");
+		Throwable t = status.getException();
+		if (t != null)
+			interpreter.printStackTrace(t);
+		IStatus[] children = status.getChildren();
+		if (children != null && children.length > 0) {
+			interpreter.println("Error status children:");
+			for (int i = 0; i < children.length; i++) {
+				printErrorStatus(interpreter, children[i]);
+			}
+		}
+		interpreter.println("--End Error Status--");
+	}
+
 	public String getHelp() {
 		StringBuffer help = new StringBuffer();
 		help.append(NEW_LINE);
-		help.append("---"); //$NON-NLS-1$
-		help.append("Provisioning Commands");
-		help.append("---"); //$NON-NLS-1$
+		help.append("---");
+		help.append("P2 Provisioning Commands");
+		help.append("---");
+		help.append(NEW_LINE);
+
+		help.append("---");
+		help.append("Repository Commands");
+		help.append("---");
+		help.append(NEW_LINE);
+		help.append("\tprovaddrepo <repository URI> - Adds a both a metadata and artifact repository at URI");
+		help.append(NEW_LINE);
+		help.append("\tprovdelrepo <repository URI> - Deletes a metadata and artifact repository at URI");
+		help.append(NEW_LINE);
+		help.append("\tprovaddmetadatarepo <repository URI> - Adds a metadata repository at URI");
+		help.append(NEW_LINE);
+		help.append("\tprovdelmetadatarepo <repository URI> - Deletes a metadata repository at URI");
 		help.append(NEW_LINE);
-		help.append("\tprovlr [<repository URL> <iu id | *> <version range | *>]   - Lists all metadata repositories, or the contents of a given metadata repository");
+		help.append("\tprovaddartifactrepo <repository URI> - Adds an artifact repository at URI");
 		help.append(NEW_LINE);
-		help.append("\tprovlar [<repository URL>] - Lists all artifact repositories, or the contents of a given artifact repository");
+		help.append("\tprovdelartifactrepo <repository URI> - Deletes an artifact repository URI");
 		help.append(NEW_LINE);
-		help.append("\tprovliu [<repository URL | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo.  * matches all");
+		help.append("\tprovlg [<repository URI> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repo or in all repos if URI is omitted");
 		help.append(NEW_LINE);
-		help.append("\tprovlp [<profile id | *> - Lists all profiles, or the contents of the profile at the given profile");
+		help.append("\tprovlr [<repository URI> <iu id | *> <version range | *>]   - Lists all metadata repositories, or the contents of a given metadata repository");
 		help.append(NEW_LINE);
-		help.append("\tprovlg [<repository URL> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repo or in all repos if the URL is omitted");
+		help.append("\tprovlar [<repository URI>] - Lists all artifact repositories, or the contents of a given artifact repository");
 		help.append(NEW_LINE);
-		help.append("\tprovinstall <InstallableUnit> <version> <profileId> - Provisions an IU to the profile with the give id");
+		help.append("\tprovliu [<repository URI | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo.  * matches all");
+		help.append(NEW_LINE);
+		help.append("\tprovlquery <repository URI | *> <expression> [ true | false ] - Lists the IUs that match the query expression in the given repo.  * matches all. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
+		help.append(NEW_LINE);
+
+		help.append("---");
+		help.append("Profile Registry Commands");
+		help.append("---");
+		help.append(NEW_LINE);
+
+		help.append("\tprovaddprofile <profileid> <location> <flavor> - Adds a profile with the given profileid, location and flavor");
 		help.append(NEW_LINE);
-		help.append("\tprovaddrepo <repository URL> - Adds a metadata repository");
+		help.append("\tprovdelprofile <profileid> - Deletes a profile with the given profileid");
 		help.append(NEW_LINE);
-		help.append("\tprovaddartifactrepo <repository URL> - Adds an artifact repository");
+		help.append("\tprovlp [<profileid | *>] - Lists all profiles, or the contents of the profile at the given profile");
 		help.append(NEW_LINE);
-		help.append("\tprovaddprofile <profileId> <location> <flavor> - Adds a profile with the given id, location and flavor");
+		help.append("\tprovlgp [<profileid>] - Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted");
 		help.append(NEW_LINE);
+		help.append("\tprovlpts [<profileid>] - Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported");
+		help.append(NEW_LINE);
+		help.append("\tprovlpquery <profileid | this> <expression> [ true | false ] - Lists the IUs that match the query expression in the given profile. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
+		help.append(NEW_LINE);
+
+		help.append("---");
+		help.append("Install Commands");
+		help.append("---");
+		help.append(NEW_LINE);
+
+		help.append("\tprovinstall <InstallableUnit> <version> <profileid> - installs an IU to the profileid.  If no profileid is given, installs into default profile.");
+		help.append(NEW_LINE);
+		help.append("\tprovremove <InstallableUnit> <version> <profileid> - Removes an IU from the profileid.  If no profileid is given, installs into default profile.");
+		help.append(NEW_LINE);
+		help.append("\tprovrevert <profileTimestamp> <profileid>] - Reverts to a given profileTimestamp for an optional profileId");
+		help.append(NEW_LINE);
+
 		return help.toString();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
index d941814..883f580 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,34 +7,37 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.console;
 
 import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
 
 public class ProvisioningHelper {
 
-	public static IMetadataRepository addMetadataRepository(URI location) {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+	static IMetadataRepository addMetadataRepository(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
-			throw new IllegalStateException("No metadata repository manager found"); //$NON-NLS-1$
+			throw new IllegalStateException("No metadata repository manager found");
 		try {
 			return manager.loadRepository(location, null);
 		} catch (ProvisionException e) {
@@ -42,7 +45,7 @@ public class ProvisioningHelper {
 		}
 
 		// for convenience create and add a repository here
-		String repositoryName = location + " - metadata"; //$NON-NLS-1$
+		String repositoryName = location + " - metadata";
 		try {
 			return manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
 		} catch (ProvisionException e) {
@@ -50,8 +53,8 @@ public class ProvisioningHelper {
 		}
 	}
 
-	public static IMetadataRepository getMetadataRepository(URI location) {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+	static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("No metadata repository manager found");
 		try {
@@ -61,15 +64,15 @@ public class ProvisioningHelper {
 		}
 	}
 
-	public static void removeMetadataRepository(URI location) {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+	static void removeMetadataRepository(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("No metadata repository manager found");
 		manager.removeRepository(location);
 	}
 
-	public static IArtifactRepository addArtifactRepository(URI location) {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	static IArtifactRepository addArtifactRepository(IProvisioningAgent agent, URI location) {
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			// TODO log here
 			return null;
@@ -79,7 +82,7 @@ public class ProvisioningHelper {
 			//fall through and create a new repository
 		}
 		// could not load a repo at that location so create one as a convenience
-		String repositoryName = location + " - artifacts"; //$NON-NLS-1$
+		String repositoryName = location + " - artifacts";
 		try {
 			return manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
 		} catch (ProvisionException e) {
@@ -87,33 +90,27 @@ public class ProvisioningHelper {
 		}
 	}
 
-	public static void removeArtifactRepository(URI location) {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	static void removeArtifactRepository(IProvisioningAgent agent, URI location) {
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			// TODO log here
 			return;
 		manager.removeRepository(location);
 	}
 
-	public static IProfile addProfile(String profileId, Properties properties) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
+	static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileRegistry == null)
 			return null;
 		IProfile profile = profileRegistry.getProfile(profileId);
 		if (profile != null)
 			return profile;
 
-		Map profileProperties = new HashMap();
-
-		for (Iterator it = properties.keySet().iterator(); it.hasNext();) {
-			String key = (String) it.next();
-			profileProperties.put(key, properties.getProperty(key));
-		}
-
+		Map<String, String> profileProperties = new HashMap<String, String>(properties);
 		if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
 			EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
 			if (info != null)
-				profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch());
+				profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 			else
 				profileProperties.put(IProfile.PROP_ENVIRONMENTS, "");
 		}
@@ -121,22 +118,22 @@ public class ProvisioningHelper {
 		return profileRegistry.addProfile(profileId, profileProperties);
 	}
 
-	public static void removeProfile(String profileId) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
+	static void removeProfile(IProvisioningAgent agent, String profileId) {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileRegistry == null)
 			return;
 		profileRegistry.removeProfile(profileId);
 	}
 
-	public static IProfile[] getProfiles() {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
+	static IProfile[] getProfiles(IProvisioningAgent agent) {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileRegistry == null)
 			return new IProfile[0];
 		return profileRegistry.getProfiles();
 	}
 
-	public static IProfile getProfile(String id) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
+	static IProfile getProfile(IProvisioningAgent agent, String id) {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileRegistry == null)
 			return null;
 		return profileRegistry.getProfile(id);
@@ -152,24 +149,20 @@ public class ProvisioningHelper {
 	 * @param monitor A progress monitor, or <code>null</code>
 	 * @return The IUs that match the query
 	 */
-	public static Collector getInstallableUnits(URI location, Query query, IProgressMonitor monitor) {
-		return getInstallableUnits(location, query, new Collector(), monitor);
-	}
-
-	public static Collector getInstallableUnits(URI location, Query query, Collector collector, IProgressMonitor monitor) {
-		IQueryable queryable = null;
+	static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		IQueryable<IInstallableUnit> queryable = null;
 		if (location == null) {
-			queryable = (IQueryable) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+			queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		} else {
-			queryable = getMetadataRepository(location);
+			queryable = getMetadataRepository(agent, location);
 		}
 		if (queryable != null)
-			return queryable.query(query, collector, monitor);
-		return collector;
+			return queryable.query(query, monitor);
+		return Collector.emptyCollector();
 	}
 
-	public static URI[] getMetadataRepositories() {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+	static URI[] getMetadataRepositories(IProvisioningAgent agent) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			// TODO log here
 			return null;
@@ -182,15 +175,15 @@ public class ProvisioningHelper {
 	/**
 	 * Install the described IU
 	 */
-	public static IStatus install(String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
+	static IStatus install(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
 		if (profile == null)
 			return null;
-		Collector units = getInstallableUnits(null, new InstallableUnitQuery(unitId, new Version(version)), progress);
+		IQueryResult<IInstallableUnit> units = getInstallableUnits(agent, (URI) null, QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
 		if (units.isEmpty()) {
 			StringBuffer error = new StringBuffer();
 			error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
 			error.append("Repositories searched:\n");
-			URI[] repos = getMetadataRepositories();
+			URI[] repos = getMetadataRepositories(agent);
 			if (repos != null) {
 				for (int i = 0; i < repos.length; i++)
 					error.append(repos[i] + "\n");
@@ -198,23 +191,22 @@ public class ProvisioningHelper {
 			throw new ProvisionException(error.toString());
 		}
 
-		IPlanner planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
+		IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
 		if (planner == null)
 			throw new ProvisionException("No planner service found.");
 
-		IEngine engine = (IEngine) ServiceHelper.getService(Activator.getContext(), IEngine.SERVICE_NAME);
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
 		if (engine == null)
 			throw new ProvisionException("No director service found.");
-		IInstallableUnit[] toInstall = (IInstallableUnit[]) units.toArray(IInstallableUnit.class);
-		ProvisioningContext context = new ProvisioningContext();
+		ProvisioningContext context = new ProvisioningContext(agent);
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
-		request.addInstallableUnits(toInstall);
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
+		request.addAll(units.toUnmodifiableSet());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
 		return PlanExecutionHelper.executePlan(result, engine, context, progress);
 	}
 
-	public static URI[] getArtifactRepositories() {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	static URI[] getArtifactRepositories(IProvisioningAgent agent) {
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			// TODO log here
 			return null;
@@ -224,8 +216,8 @@ public class ProvisioningHelper {
 		return null;
 	}
 
-	public static IArtifactRepository getArtifactRepository(URI repoURL) {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	static IArtifactRepository getArtifactRepository(IProvisioningAgent agent, URI repoURL) {
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		try {
 			if (manager != null)
 				return manager.loadRepository(repoURL, null);
@@ -234,4 +226,83 @@ public class ProvisioningHelper {
 		}
 		return null;
 	}
+
+	static long[] getProfileTimestamps(IProvisioningAgent agent, String profileId) {
+		if (profileId == null) {
+			profileId = IProfileRegistry.SELF;
+		}
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (profileRegistry == null)
+			return null;
+		return profileRegistry.listProfileTimestamps(profileId);
+	}
+
+	static IStatus revertToPreviousState(IProvisioningAgent agent, IProfile profile, long revertToPreviousState) throws ProvisionException {
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		if (engine == null)
+			throw new ProvisionException("No p2 engine found.");
+		IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+		if (planner == null)
+			throw new ProvisionException("No planner found.");
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (profileRegistry == null)
+			throw new ProvisionException("profile registry cannot be null");
+		// If given profile is null, then get/use the self profile
+		if (profile == null) {
+			profile = getProfile(agent, IProfileRegistry.SELF);
+		}
+		IProfile targetProfile = null;
+		if (revertToPreviousState == 0) {
+			long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
+			if (profiles.length == 0)
+				// Nothing to do, as the profile does not have any previous timestamps
+				return Status.OK_STATUS;
+			targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
+		} else {
+			targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
+		}
+		if (targetProfile == null)
+			throw new ProvisionException("target profile with timestamp=" + revertToPreviousState + " not found");
+		URI[] artifactRepos = getArtifactRepositories(agent);
+		URI[] metadataRepos = getMetadataRepositories(agent);
+		IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
+		ProvisioningContext context = new ProvisioningContext(agent);
+		context.setMetadataRepositories(metadataRepos);
+		context.setArtifactRepositories(artifactRepos);
+		return PlanExecutionHelper.executePlan(plan, engine, context, new NullProgressMonitor());
+	}
+
+	/**
+	 * Install the described IU
+	 */
+	static IStatus uninstall(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
+		if (profile == null)
+			return null;
+		IQueryResult<IInstallableUnit> units = profile.query(QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
+		if (units.isEmpty()) {
+			StringBuffer error = new StringBuffer();
+			error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
+			error.append("Repositories searched:\n");
+			URI[] repos = getMetadataRepositories(agent);
+			if (repos != null) {
+				for (int i = 0; i < repos.length; i++)
+					error.append(repos[i] + "\n"); //$NON-NLS-1$
+			}
+			throw new ProvisionException(error.toString());
+		}
+
+		IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+		if (planner == null)
+			throw new ProvisionException("No planner service found.");
+
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		if (engine == null)
+			throw new ProvisionException("No engine service found.");
+		ProvisioningContext context = new ProvisioningContext(agent);
+		ProfileChangeRequest request = new ProfileChangeRequest(profile);
+		request.removeAll(units.toUnmodifiableSet());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
+		return PlanExecutionHelper.executePlan(result, engine, context, progress);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.core/.classpath
index ce73933..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/.options b/eclipse/plugins/org.eclipse.equinox.p2.core/.options
index 92221e7..a4d705b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/.options
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/.options
@@ -35,4 +35,7 @@ org.eclipse.equinox.p2.core/planner/projector=false
 org.eclipse.equinox.p2.core/reconciler=false
 
 #Detailed debugging information about the publisher
-org.eclipse.equinox.p2.core/publisher=false
\ No newline at end of file
+org.eclipse.equinox.p2.core/publisher=false
+
+#Detailed debugging information about event clients
+org.eclipse.equinox.p2.core/events/client = false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/.project b/eclipse/plugins/org.eclipse.equinox.p2.core/.project
index 8d4f38d..b15e13e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs
index 64189fb..545312e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Oct 20 11:41:53 EDT 2008
+#Tue Dec 22 00:34:34 CET 2009
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,17 +8,17 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
@@ -26,7 +26,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -88,7 +88,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -160,7 +160,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
index 9a497dd..4b1bcb6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
@@ -1,69 +1,37 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.core;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.core;singleton:=true
+Bundle-Version: 2.0.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.equinox.internal.p2.core.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
-Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.preferences;version="3.2.0",
- org.eclipse.osgi.framework.eventmgr;version="1.2.0",
- org.eclipse.osgi.framework.log;version="1.0.0",
- org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.debug;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.prefs;version="1.1.0",
- org.osgi.util.tracker;version="1.3.3",
- org.xml.sax,
- org.xml.sax.helpers
 Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.repository",
  org.eclipse.equinox.internal.p2.core.helpers;
-  x-friends:="org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.artifact.processors,
+  x-friends:="org.eclipse.equinox.frameworkadmin.test,
    org.eclipse.equinox.p2.artifact.optimizers,
-   org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.director.app,
-   org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.download,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.installer,
-   org.eclipse.equinox.p2.metadata,
-   org.eclipse.equinox.p2.metadata.generator,
-   org.eclipse.equinox.frameworkadmin.test,
-   org.eclipse.equinox.p2.metadata.repository,
-   org.eclipse.equinox.p2.repositoryoptimizer,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.equinox.p2.updatechecker.app,
-   org.eclipse.equinox.p2.garbagecollector,
-   org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.reconciler.dropins,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.publisher,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.equinox.p2.repository",
- org.eclipse.equinox.internal.provisional.p2.core;
-  x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
    org.eclipse.equinox.p2.artifact.processors,
    org.eclipse.equinox.p2.artifact.repository,
    org.eclipse.equinox.p2.console,
    org.eclipse.equinox.p2.director,
    org.eclipse.equinox.p2.director.app,
    org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.download,
    org.eclipse.equinox.p2.engine,
    org.eclipse.equinox.p2.extensionlocation,
+   org.eclipse.equinox.p2.garbagecollector,
    org.eclipse.equinox.p2.installer,
+   org.eclipse.equinox.p2.metadata,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.metadata.repository,
+   org.eclipse.equinox.p2.operations,
    org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.ql,
    org.eclipse.equinox.p2.reconciler.dropins,
+   org.eclipse.equinox.p2.repository,
+   org.eclipse.equinox.p2.repository.tools,
+   org.eclipse.equinox.p2.repositoryoptimizer,
    org.eclipse.equinox.p2.touchpoint.eclipse,
    org.eclipse.equinox.p2.touchpoint.natives,
    org.eclipse.equinox.p2.ui,
@@ -71,71 +39,37 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ
    org.eclipse.equinox.p2.ui.sdk,
    org.eclipse.equinox.p2.ui.sdk.scheduler,
    org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.metadata,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.equinox.p2.repository,
-   org.eclipse.pde.core",
+   org.eclipse.equinox.p2.updatechecker.app,
+   org.eclipse.equinox.p2.updatesite",
  org.eclipse.equinox.internal.provisional.p2.core.eventbus;
-  x-friends:="org.eclipse.equinox.p2.metadata,
-   org.eclipse.equinox.p2.metadata.generator,
-   org.eclipse.equinox.p2.metadata.repository,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.garbagecollector,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.publisher,
-   org.eclipse.equinox.p2.repository",
- org.eclipse.equinox.internal.provisional.p2.core.location;
   x-friends:="org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.metadata.repository,
    org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.internal.provisional.p2.query;
-  x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
-   org.eclipse.equinox.p2.artifact.processors,
-   org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.director.app,
    org.eclipse.equinox.p2.directorywatcher,
    org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.exemplarysetup,
-   org.eclipse.equinox.p2.extensionlocation,
    org.eclipse.equinox.p2.garbagecollector,
-   org.eclipse.equinox.p2.installer,
-   org.eclipse.equinox.p2.jarprocessor,
    org.eclipse.equinox.p2.metadata,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.metadata.repository,
-   org.eclipse.equinox.p2.reconciler.dropins,
+   org.eclipse.equinox.p2.operations,
+   org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.repository,
    org.eclipse.equinox.p2.touchpoint.eclipse,
    org.eclipse.equinox.p2.touchpoint.natives,
    org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
    org.eclipse.equinox.p2.ui.sdk,
    org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.publisher,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core"
-Eclipse-LazyStart: true
-Bundle-ClassPath: .
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+   org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.p2.core;version="2.0.0",
+ org.eclipse.equinox.p2.core.spi;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
-Bundle-Activator: org.eclipse.equinox.internal.p2.core.Activator
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry;bundle-version="[3.4.0,4.0.0)"
+Bundle-ActivationPolicy: lazy
+Service-Component: OSGI-INF/eventBus.xml, OSGI-INF/agentProvider.xml
+Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.2.0",
+ org.eclipse.osgi.framework.log;version="1.0.0",
+ org.eclipse.osgi.service.debug;version="1.0.0",
+ org.eclipse.osgi.util;version="1.0.0",
+ org.osgi.framework;version="1.3.0",
+ org.osgi.util.tracker;version="1.3.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml b/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml
new file mode 100644
index 0000000..adf24cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.di.agentProvider">
+   <implementation class="org.eclipse.equinox.internal.p2.core.DefaultAgentProvider"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.IProvisioningAgentProvider"/>
+   </service>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml b/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml
new file mode 100644
index 0000000..cae6c43
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.core.eventbus">
+   <implementation class="org.eclipse.equinox.internal.p2.core.EventBusComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus"/>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.core/build.properties
index a6b8330..98b7174 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
+# Copyright (c) 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,10 +8,13 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               OSGI-INF/
 src.includes = about.html
+source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.core/pom.xml
new file mode 100644
index 0000000..829e767
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.core</artifactId>
+  <version>2.0.2.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
index d6855b3..8571bc6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,18 +11,18 @@
 package org.eclipse.equinox.internal.p2.core;
 
 import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.*;
 import java.util.Dictionary;
 import java.util.Hashtable;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.p2.core.*;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.osgi.framework.*;
 import org.osgi.util.tracker.ServiceTracker;
 
 public class Activator implements BundleActivator {
-	public static AgentLocation agentDataLocation = null;
+	public static IAgentLocation agentDataLocation = null;
 
 	public static BundleContext context;
 	private static final String DEFAULT_AGENT_LOCATION = "../p2"; //$NON-NLS-1$
@@ -44,19 +44,21 @@ public class Activator implements BundleActivator {
 	private static final String VAR_USER_DIR = "@user.dir"; //$NON-NLS-1$
 	private static final String VAR_USER_HOME = "@user.home"; //$NON-NLS-1$
 
+	private IProvisioningAgent agent;
 	private ServiceRegistration agentLocationRegistration = null;
+
 	ServiceTracker logTracker;
 
 	/**
 	 * NOTE: This method is copied from LocationHelper in org.eclipse.osgi
 	 * due to access restrictions.
 	 */
-	private static URL adjustTrailingSlash(URL url, boolean trailingSlash) throws MalformedURLException {
-		String file = url.getFile();
+	private static URI adjustTrailingSlash(URI url, boolean trailingSlash) throws URISyntaxException {
+		String file = url.toString();
 		if (trailingSlash == (file.endsWith("/"))) //$NON-NLS-1$
 			return url;
 		file = trailingSlash ? file + "/" : file.substring(0, file.length() - 1); //$NON-NLS-1$
-		return new URL(url.getProtocol(), url.getHost(), file);
+		return new URI(file);
 	}
 
 	/**
@@ -68,22 +70,25 @@ public class Activator implements BundleActivator {
 	 * @param trailingSlash flag to indicate a trailing slash on the spec
 	 * @return a URL
 	 */
-	private static URL buildURL(String spec, boolean trailingSlash) {
+	private static URI buildURL(String spec, boolean trailingSlash) {
 		if (spec == null)
 			return null;
 		boolean isFile = spec.startsWith("file:"); //$NON-NLS-1$
 		try {
 			if (isFile)
-				return adjustTrailingSlash(new File(spec.substring(5)).toURL(), trailingSlash);
-			return new URL(spec);
-		} catch (MalformedURLException e) {
+				return adjustTrailingSlash(new File(spec.substring(5)).toURI(), trailingSlash);
+			//for compatibility only allow non-file URI if it is also a legal URL
+			//when given "c:/foo" we want to treat it as a file rather than a URI with protocol "c"
+			new URL(spec);
+			return new URI(spec);
+		} catch (Exception e) {
 			// if we failed and it is a file spec, there is nothing more we can do
 			// otherwise, try to make the spec into a file URL.
 			if (isFile)
 				return null;
 			try {
-				return adjustTrailingSlash(new File(spec).toURL(), trailingSlash);
-			} catch (MalformedURLException e1) {
+				return adjustTrailingSlash(new File(spec).toURI(), trailingSlash);
+			} catch (URISyntaxException e1) {
 				return null;
 			}
 		}
@@ -114,19 +119,16 @@ public class Activator implements BundleActivator {
 		return value + source.substring(var.length());
 	}
 
-	private AgentLocation buildLocation(String property, URL defaultLocation, boolean readOnlyDefault, boolean addTrailingSlash) {
+	private IAgentLocation buildLocation(String property, URI defaultLocation, boolean readOnlyDefault, boolean addTrailingSlash) {
 		String location = Activator.context.getProperty(property);
-		// the user/product may specify a non-default readOnly setting   
-		String userReadOnlySetting = Activator.context.getProperty(property + READ_ONLY_AREA_SUFFIX);
-		boolean readOnly = (userReadOnlySetting == null ? readOnlyDefault : Boolean.valueOf(userReadOnlySetting).booleanValue());
 		// if the instance location is not set, predict where the workspace will be and 
 		// put the instance area inside the workspace meta area.
 		if (location == null)
-			return new BasicLocation(property, defaultLocation, readOnly);
+			return new AgentLocation(defaultLocation);
 		if (location.equalsIgnoreCase(NONE))
 			return null;
 		if (location.equalsIgnoreCase(NO_DEFAULT))
-			return new BasicLocation(property, null, readOnly);
+			return new AgentLocation(null);
 		if (location.startsWith(VAR_USER_HOME)) {
 			String base = substituteVar(location, VAR_USER_HOME, PROP_USER_HOME);
 			location = new Path(base).toFile().getAbsolutePath();
@@ -137,11 +139,10 @@ public class Activator implements BundleActivator {
 			//note the config dir system property is already a URL
 			location = substituteVar(location, VAR_CONFIG_DIR, PROP_CONFIG_DIR);
 		}
-		URL url = buildURL(location, addTrailingSlash);
-		BasicLocation result = null;
+		URI url = buildURL(location, addTrailingSlash);
+		AgentLocation result = null;
 		if (url != null) {
-			result = new BasicLocation(property, null, readOnly);
-			result.set(url, false);
+			result = new AgentLocation(url);
 		}
 		return result;
 	}
@@ -157,20 +158,52 @@ public class Activator implements BundleActivator {
 		return logTracker;
 	}
 
+	/**
+	 * Register the agent instance representing the currently running system.
+	 * This will be the "default" agent for anyone not specifically trying to manipulate
+	 * a different p2 agent location
+	 */
+	private void registerAgent() {
+		//no need to register an agent if there is no agent location
+		if (agentDataLocation == null)
+			return;
+		ServiceReference agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		IProvisioningAgentProvider provider = null;
+		if (agentProviderRef != null)
+			provider = (IProvisioningAgentProvider) context.getService(agentProviderRef);
+
+		if (provider == null) {
+			// If we don't have a provider, which could happen if the p2.core bundle is
+			// eagerly started, we should create one.
+			provider = new DefaultAgentProvider();
+			((DefaultAgentProvider) provider).activate(context);
+		}
+
+		try {
+			agent = provider.createAgent(null);
+		} catch (Exception e) {
+			final String msg = "Unable to instantiate p2 agent at location " + agentDataLocation.getRootLocation(); //$NON-NLS-1$
+			LogHelper.log(new Status(IStatus.ERROR, ID, msg, e));
+		}
+	}
+
 	public void start(BundleContext aContext) throws Exception {
 		instance = this;
 		Activator.context = aContext;
-		URL defaultLocation = new URL(aContext.getProperty(PROP_CONFIG_DIR) + DEFAULT_AGENT_LOCATION + '/');
+		URI defaultLocation = URIUtil.fromString(aContext.getProperty(PROP_CONFIG_DIR) + DEFAULT_AGENT_LOCATION + '/');
 		agentDataLocation = buildLocation(PROP_AGENT_DATA_AREA, defaultLocation, false, true);
-		Dictionary locationProperties = new Hashtable();
+		Dictionary<String, Object> locationProperties = new Hashtable<String, Object>();
 		if (agentDataLocation != null) {
 			locationProperties.put("type", PROP_AGENT_DATA_AREA); //$NON-NLS-1$
-			agentLocationRegistration = aContext.registerService(AgentLocation.SERVICE_NAME, agentDataLocation, locationProperties);
+			agentLocationRegistration = aContext.registerService(IAgentLocation.SERVICE_NAME, agentDataLocation, locationProperties);
 		}
+		registerAgent();
 	}
 
 	public void stop(BundleContext aContext) throws Exception {
+		unregisterAgent();
 		instance = null;
+		agentDataLocation = null;
 		if (agentLocationRegistration != null)
 			agentLocationRegistration.unregister();
 		if (logTracker != null) {
@@ -179,4 +212,11 @@ public class Activator implements BundleActivator {
 		}
 		Activator.context = null;
 	}
+
+	private void unregisterAgent() {
+		if (agent != null) {
+			agent.stop();
+			agent = null;
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java
new file mode 100644
index 0000000..75849e0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.core;
+
+import java.net.URI;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+
+/**
+ * Internal class.
+ */
+public class AgentLocation implements IAgentLocation {
+
+	private URI location = null;
+
+	public AgentLocation(URI location) {
+		this.location = location;
+	}
+
+	public synchronized URI getRootLocation() {
+		return location;
+	}
+
+	public URI getDataArea(String touchpointId) {
+		return URIUtil.append(getRootLocation(), touchpointId + '/');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/BasicLocation.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/BasicLocation.java
deleted file mode 100644
index f59f5bf..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/BasicLocation.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.net.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-
-/**
- * Internal class.
- */
-public class BasicLocation implements AgentLocation {
-
-	private URL location = null;
-	private URL defaultValue;
-
-	public BasicLocation(String property, URL defaultValue, boolean isReadOnly) {
-		super();
-		this.defaultValue = defaultValue;
-	}
-
-	public synchronized URL getURL() {
-		if (location == null && defaultValue != null)
-			setURL(defaultValue, false);
-		return location;
-	}
-
-	/**
-	 * @deprecated
-	 */
-	public synchronized boolean setURL(URL value, boolean lock) {
-		//		if (location != null)
-		//			throw new IllegalStateException(Messages.ECLIPSE_CANNOT_CHANGE_LOCATION);
-		////		File file = null;
-		////		if (value.getProtocol().equalsIgnoreCase("file")) { //$NON-NLS-1$
-		////			try {
-		////				String basePath = new File(value.getFile()).getCanonicalPath();
-		////				value = new URL("file:" + basePath); //$NON-NLS-1$
-		////			} catch (IOException e) {
-		////				// do nothing just use the original value
-		////			}
-		////			file = new File(value.getFile(), LOCK_FILENAME);
-		////		}
-		//		lock = lock && !isReadOnly;
-		//		if (lock) {
-		//			try {
-		//				if (!lock(file))
-		//					return false;
-		//			} catch (IOException e) {
-		//				return false;
-		//			}
-		//		}
-		//		lockFile = file;
-		location = value;
-		//		LocationManager.buildURL(value.toExternalForm(), true);
-		//		if (property != null)
-		//			System.setProperty(property, location.toExternalForm());
-		return lock;
-	}
-
-	public boolean set(URL value, boolean lock) {
-		location = value;
-		return lock;
-	}
-
-	public URI getArtifactRepositoryURI() {
-		//the cache is a co-located repository
-		return getMetadataRepositoryURI();
-	}
-
-	public URI getMetadataRepositoryURI() {
-		try {
-			return URIUtil.toURI(new URL(getDataArea(Activator.ID), "cache/")); //$NON-NLS-1$
-		} catch (MalformedURLException e) {
-			// TODO Auto-generated catch block
-		} catch (URISyntaxException e) {
-			// TODO Auto-generated catch block
-		}
-		return null;
-	}
-
-	public URL getDataArea(String touchpointId) {
-		try {
-			return new URL(getURL(), touchpointId + '/');
-		} catch (MalformedURLException e) {
-			// TODO Auto-generated catch block
-			return null;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
new file mode 100644
index 0000000..158e281
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.core;
+
+import java.net.URI;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import org.eclipse.equinox.p2.core.*;
+import org.osgi.framework.*;
+
+/**
+ * Default implementation of {@link IProvisioningAgentProvider}.
+ */
+public class DefaultAgentProvider implements IProvisioningAgentProvider {
+	private BundleContext context;
+
+	public void activate(BundleContext aContext) {
+		this.context = aContext;
+	}
+
+	public IProvisioningAgent createAgent(URI location) {
+		ProvisioningAgent result = new ProvisioningAgent();
+		result.setBundleContext(context);
+		result.setLocation(location);
+		IAgentLocation agentLocation = (IAgentLocation) result.getService(IAgentLocation.SERVICE_NAME);
+		Dictionary<String, Object> properties = new Hashtable<String, Object>(5);
+		if (agentLocation != null)
+			properties.put("locationURI", String.valueOf(agentLocation.getRootLocation())); //$NON-NLS-1$
+		//make the currently running system have a higher service ranking
+		if (location == null) {
+			properties.put(Constants.SERVICE_RANKING, new Integer(100));
+			properties.put(IProvisioningAgent.SERVICE_CURRENT, Boolean.TRUE.toString());
+		}
+		ServiceRegistration reg = context.registerService(IProvisioningAgent.SERVICE_NAME, result, properties);
+		result.setServiceRegistration(reg);
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java
new file mode 100644
index 0000000..095efde
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.core;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * Factory for creating {@link IProvisioningEventBus} instances.
+ */
+public class EventBusComponent implements IAgentServiceFactory {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
+	 */
+	public Object createService(IProvisioningAgent agent) {
+		return new ProvisioningEventBus();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
new file mode 100644
index 0000000..20df0d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
@@ -0,0 +1,188 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.core;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentService;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.osgi.framework.*;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Represents a p2 agent instance.
+ */
+public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCustomizer {
+
+	private final Map<String, Object> agentServices = Collections.synchronizedMap(new HashMap<String, Object>());
+	private BundleContext context;
+	private volatile boolean stopped = false;
+	private ServiceRegistration reg;
+	private final Map<ServiceReference, ServiceTracker> trackers = Collections.synchronizedMap(new HashMap<ServiceReference, ServiceTracker>());
+
+	/**
+	 * Instantiates a provisioning agent.
+	 */
+	public ProvisioningAgent() {
+		super();
+		registerService(IProvisioningAgent.INSTALLER_AGENT, this);
+		registerService(IProvisioningAgent.INSTALLER_PROFILEID, "_SELF_"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.IProvisioningAgent#getService(java.lang.String)
+	 */
+	public Object getService(String serviceName) {
+		//synchronize so concurrent gets always obtain the same service
+		synchronized (agentServices) {
+			checkRunning();
+			Object service = agentServices.get(serviceName);
+			if (service != null)
+				return service;
+			//attempt to get factory service from service registry
+			ServiceReference[] refs;
+			try {
+				refs = context.getServiceReferences(IAgentServiceFactory.SERVICE_NAME, "(" + IAgentServiceFactory.PROP_CREATED_SERVICE_NAME + '=' + serviceName + ')'); //$NON-NLS-1$
+			} catch (InvalidSyntaxException e) {
+				e.printStackTrace();
+				return null;
+			}
+			if (refs == null || refs.length == 0)
+				return null;
+			//track the factory so that we can automatically remove the service when the factory goes away
+			ServiceTracker tracker = new ServiceTracker(context, refs[0], this);
+			tracker.open();
+			IAgentServiceFactory factory = (IAgentServiceFactory) tracker.getService();
+			if (factory == null) {
+				tracker.close();
+				return null;
+			}
+			service = factory.createService(this);
+			if (service == null) {
+				tracker.close();
+				return null;
+			}
+			registerService(serviceName, service);
+			trackers.put(refs[0], tracker);
+			return service;
+		}
+	}
+
+	private void checkRunning() {
+		if (stopped)
+			throw new IllegalStateException("Attempt to access stopped agent: " + this); //$NON-NLS-1$
+	}
+
+	public void registerService(String serviceName, Object service) {
+		checkRunning();
+		agentServices.put(serviceName, service);
+		if (service instanceof IAgentService)
+			((IAgentService) service).start();
+	}
+
+	public void setBundleContext(BundleContext context) {
+		this.context = context;
+	}
+
+	public void setLocation(URI location) {
+		//treat a null location as using the currently running platform
+		IAgentLocation agentLocation = null;
+		if (location == null) {
+			ServiceReference ref = context.getServiceReference(IAgentLocation.SERVICE_NAME);
+			if (ref != null) {
+				agentLocation = (IAgentLocation) context.getService(ref);
+				context.ungetService(ref);
+			}
+		} else {
+			agentLocation = new AgentLocation(location);
+		}
+		registerService(IAgentLocation.SERVICE_NAME, agentLocation);
+	}
+
+	public void unregisterService(String serviceName, Object service) {
+		synchronized (agentServices) {
+			if (stopped)
+				return;
+			if (agentServices.get(serviceName) == service)
+				agentServices.remove(serviceName);
+		}
+		if (service instanceof IAgentService)
+			((IAgentService) service).stop();
+	}
+
+	public void stop() {
+		List<Object> toStop;
+		synchronized (agentServices) {
+			toStop = new ArrayList<Object>(agentServices.values());
+		}
+		//give services a chance to do their own shutdown
+		for (Object service : toStop) {
+			if (service instanceof IAgentService)
+				if (service != this)
+					((IAgentService) service).stop();
+		}
+		stopped = true;
+		//close all service trackers
+		synchronized (trackers) {
+			for (ServiceTracker t : trackers.values())
+				t.close();
+			trackers.clear();
+		}
+		if (reg != null) {
+			reg.unregister();
+			reg = null;
+		}
+	}
+
+	public void setServiceRegistration(ServiceRegistration reg) {
+		this.reg = reg;
+	}
+
+	/*(non-Javadoc)
+	 * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+	 */
+	public Object addingService(ServiceReference reference) {
+		if (stopped)
+			return null;
+		return context.getService(reference);
+	}
+
+	/*(non-Javadoc)
+	 * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
+	 */
+	public void modifiedService(ServiceReference reference, Object service) {
+		//nothing to do
+	}
+
+	/*(non-Javadoc)
+	 * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
+	 */
+	public void removedService(ServiceReference reference, Object factoryService) {
+		if (stopped)
+			return;
+		String serviceName = (String) reference.getProperty(IAgentServiceFactory.PROP_CREATED_SERVICE_NAME);
+		if (serviceName == null)
+			return;
+		Object registered = agentServices.get(serviceName);
+		if (registered == null)
+			return;
+		if (FrameworkUtil.getBundle(registered.getClass()) == FrameworkUtil.getBundle(factoryService.getClass())) {
+			//the service we are holding is going away
+			unregisterService(serviceName, registered);
+			ServiceTracker toRemove = trackers.remove(reference);
+			if (toRemove != null)
+				toRemove.close();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
index 90493e0..eff6881 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,15 +11,19 @@
 package org.eclipse.equinox.internal.p2.core;
 
 import java.util.EventObject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.*;
+import org.eclipse.equinox.p2.core.spi.IAgentService;
 import org.eclipse.osgi.framework.eventmgr.*;
 
 /**
  * Default implementation of the {@link IProvisioningEventBus} service.
  */
-public class ProvisioningEventBus implements EventDispatcher, IProvisioningEventBus {
-	private CopyOnWriteIdentityMap syncListeners = new CopyOnWriteIdentityMap();
-	private CopyOnWriteIdentityMap asyncListeners = new CopyOnWriteIdentityMap();
+public class ProvisioningEventBus implements EventDispatcher, IProvisioningEventBus, IAgentService {
+	private final CopyOnWriteIdentityMap syncListeners = new CopyOnWriteIdentityMap();
+	private final CopyOnWriteIdentityMap asyncListeners = new CopyOnWriteIdentityMap();
 	private EventManager eventManager = new EventManager("Provisioning Event Dispatcher"); //$NON-NLS-1$
 
 	private Object dispatchEventLock = new Object();
@@ -53,15 +57,11 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
 	public void removeListener(ProvisioningListener toRemove) {
 		if (toRemove instanceof SynchronousProvisioningListener) {
 			synchronized (syncListeners) {
-				if (syncListeners != null) {
-					syncListeners.remove(toRemove);
-				}
+				syncListeners.remove(toRemove);
 			}
 		} else {
 			synchronized (asyncListeners) {
-				if (asyncListeners != null) {
-					asyncListeners.remove(toRemove);
-				}
+				asyncListeners.remove(toRemove);
 			}
 		}
 	}
@@ -107,8 +107,7 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
 		try {
 			((ProvisioningListener) eventListener).notify((EventObject) eventObject);
 		} catch (Exception e) {
-			e.printStackTrace();
-			//TODO Need to do the appropriate logging
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Exception during event notification", e)); //$NON-NLS-1$
 		} finally {
 			synchronized (dispatchEventLock) {
 				dispatchingEvents--;
@@ -139,4 +138,18 @@ public class ProvisioningEventBus implements EventDispatcher, IProvisioningEvent
 		if (interrupted)
 			Thread.currentThread().interrupt();
 	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
+	 */
+	public void start() {
+		//nothing to do
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
+	 */
+	public void stop() {
+		close();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
deleted file mode 100644
index 9303784..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/StringPool.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.util.HashMap;
-
-/**
- * A string pool is used for sharing strings in a way that eliminates duplicate
- * equal strings.  A string pool instance can be maintained over a long period
- * of time, or used as a temporary structure during a string sharing pass over
- * a data structure.
- * <p>
- * This class is not intended to be subclassed by clients.
- * </p>
- */
-public final class StringPool {
-	private int savings;
-	private final HashMap map = new HashMap();
-
-	/**
-	 * Creates a new string pool.
-	 */
-	public StringPool() {
-		super();
-	}
-
-	/**
-	 * Adds a <code>String</code> to the pool.  Returns a <code>String</code>
-	 * that is equal to the argument but that is unique within this pool.
-	 * @param string The string to add to the pool
-	 * @return A string that is equal to the argument.
-	 */
-	public String add(String string) {
-		if (string == null)
-			return string;
-		Object result = map.get(string);
-		if (result != null) {
-			if (result != string)
-				savings += 44 + 2 * string.length();
-			return (String) result;
-		}
-		//explicitly copy the string to trim excess baggage
-		String trim = new String(string.toCharArray());
-		map.put(string, trim);
-		return trim;
-	}
-
-	/**
-	 * Returns an estimate of the size in bytes that was saved by sharing strings in 
-	 * the pool.  In particular, this returns the size of all strings that were added to the
-	 * pool after an equal string had already been added.  This value can be used
-	 * to estimate the effectiveness of a string sharing operation, in order to 
-	 * determine if or when it should be performed again.
-	 * 
-	 * In some cases this does not precisely represent the number of bytes that 
-	 * were saved.  For example, say the pool already contains string S1.  Now 
-	 * string S2, which is equal to S1 but not identical, is added to the pool five 
-	 * times. This method will return the size of string S2 multiplied by the 
-	 * number of times it was added, even though the actual savings in this case
-	 * is only the size of a single copy of S2.
-	 */
-	public int getSavedStringCount() {
-		return savings;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
new file mode 100644
index 0000000..5bea8c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.core.helpers;
+
+import java.io.*;
+import java.lang.reflect.Array;
+import java.util.*;
+
+/**
+ * Helper class that provides some useful support when dealing with collections.
+ */
+public class CollectionUtils {
+
+	/**
+	 * A unmodifiable {@link List} implementation on top of an object array.
+	 * @param <E> The element type.
+	 */
+	private static class UnmodifiableArrayList<E> extends AbstractList<E> implements RandomAccess, java.io.Serializable {
+		private static final long serialVersionUID = 7435304230643855579L;
+		final E[] array;
+
+		UnmodifiableArrayList(E[] array) {
+			this.array = array;
+		}
+
+		public boolean contains(Object o) {
+			return indexOf(o) != -1;
+		}
+
+		public E get(int index) {
+			return array[index];
+		}
+
+		public int indexOf(Object o) {
+			int size = array.length;
+			if (o == null) {
+				for (int i = 0; i < size; i++)
+					if (array[i] == null)
+						return i;
+			} else {
+				for (int i = 0; i < size; i++)
+					if (o.equals(array[i]))
+						return i;
+			}
+			return -1;
+		}
+
+		public Iterator<E> iterator() {
+			return listIterator();
+		}
+
+		/**
+		 * Rapid iterator, motivated by the fact that we don't need to check
+		 * for concurrent modifications.
+		 */
+		public ListIterator<E> listIterator() {
+			return new ListIterator<E>() {
+				private int index = 0;
+
+				public boolean hasNext() {
+					return index < array.length;
+				}
+
+				public E next() {
+					if (index >= array.length)
+						throw new NoSuchElementException();
+					return array[index++];
+				}
+
+				public boolean hasPrevious() {
+					return index > 0;
+				}
+
+				public E previous() {
+					if (--index < 0) {
+						++index;
+						throw new NoSuchElementException();
+					}
+					return array[index];
+				}
+
+				public int nextIndex() {
+					return index;
+				}
+
+				public int previousIndex() {
+					return index - 1;
+				}
+
+				public void remove() {
+					throw new UnsupportedOperationException();
+				}
+
+				public void set(E e) {
+					throw new UnsupportedOperationException();
+				}
+
+				public void add(E e) {
+					throw new UnsupportedOperationException();
+				}
+			};
+		}
+
+		public int lastIndexOf(Object o) {
+			int idx = array.length;
+			if (o == null) {
+				while (--idx >= 0)
+					if (array[idx] == null)
+						return idx;
+			} else {
+				while (--idx >= 0)
+					if (o.equals(array[idx]))
+						return idx;
+			}
+			return -1;
+		}
+
+		public E set(int index, E element) {
+			throw new UnsupportedOperationException();
+		}
+
+		public int size() {
+			return array.length;
+		}
+
+		public Object[] toArray() {
+			return array.clone();
+		}
+
+		@SuppressWarnings("unchecked")
+		public <T> T[] toArray(T[] a) {
+			int size = array.length;
+			if (a.length < size)
+				a = (T[]) Array.newInstance(a.getClass().getComponentType(), size);
+			System.arraycopy(this.array, 0, a, 0, size);
+			while (size < a.length)
+				a[size++] = null;
+			return a;
+		}
+	}
+
+	/**
+	 * Creates a combined hash for an array of objects.
+	 * @param objects The objects to hash
+	 * @return The combined hashCode of the objects.
+	 */
+	public static int hashCode(Object objects[]) {
+		if (objects == null)
+			return 0;
+
+		int result = 1;
+		int idx = objects.length;
+		while (--idx >= 0) {
+			Object object = objects[idx];
+			result = 17 * result + (object == null ? 0 : object.hashCode());
+		}
+		return result;
+	}
+
+	/**
+	 * The emptyList() method was introduced in Java 1.5 so we need this here to be able to
+	 * down compile to 1.4.
+	 * @param <T> The type of the elements
+	 * @return An empty list
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> List<T> emptyList() {
+		return Collections.EMPTY_LIST;
+	}
+
+	/**
+	 * The emptySet() method was introduced in Java 1.5 so we need this here to be able to
+	 * down compile to 1.4.
+	 * @param <T> The type of the elements
+	 * @return An empty set
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> Set<T> emptySet() {
+		return Collections.EMPTY_SET;
+	}
+
+	/**
+	 * The emptyMap() method was introduced in Java 1.5 so we need this here to be able to
+	 * down compile to 1.4.
+	 * @param <K> The type of the map keys
+	 * @param <V> The type of the map values
+	 * @return An empty set
+	 */
+	@SuppressWarnings("unchecked")
+	public static <K, V> Map<K, V> emptyMap() {
+		return Collections.EMPTY_MAP;
+	}
+
+	/**
+	 * Returns an unmodifiable list that is backed by the <code>array</code>.
+	 * @param <T> The list element type
+	 * @param array The array of elements
+	 * @return The unmodifiable list
+	 */
+	public static <T> List<T> unmodifiableList(T[] array) {
+		return array == null || array.length == 0 ? CollectionUtils.<T> emptyList() : new UnmodifiableArrayList<T>(array);
+	}
+
+	/**
+	 * Reads a property list using the {@link Properties#load(InputStream)} method. The
+	 * properties are stored in a map.
+	 * @param stream The stream to read from
+	 * @return The resulting map
+	 * @throws IOException propagated from the load method.
+	 */
+	public static Map<String, String> loadProperties(InputStream stream) throws IOException {
+		Properties properties = new Properties();
+		properties.load(stream);
+		return toMap(properties);
+	}
+
+	/**
+	 * Copies all elements from <code>properties</code> into a Map. The returned map might be unmodifiable
+	 * @param properties
+	 * @return The map containing all elements
+	 */
+	public static Map<String, String> toMap(Properties properties) {
+		if (properties == null || properties.isEmpty())
+			return emptyMap();
+
+		Map<String, String> props = new HashMap<String, String>(properties.size());
+		putAll(properties, props);
+		return props;
+	}
+
+	/**
+	 * Copies all elements from <code>properties</code> into the given <code>result</code>.
+	 * @param properties
+	 * @param result
+	 */
+	public static void putAll(Properties properties, Map<String, String> result) {
+		for (Enumeration<Object> keys = properties.keys(); keys.hasMoreElements();) {
+			String key = (String) keys.nextElement();
+			result.put(key, properties.getProperty(key));
+		}
+	}
+
+	/**
+	 * Stores the properties using {@link Properties#store(OutputStream, String)} on the given <code>stream</code>.
+	 * @param properties The properties to store
+	 * @param stream The stream to store to
+	 * @param comment The comment to use
+	 * @throws IOException
+	 */
+	public static void storeProperties(Map<String, String> properties, OutputStream stream, String comment) throws IOException {
+		Properties props = new Properties();
+		props.putAll(properties);
+		props.store(stream, comment);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java
index 96a9f98..ded76df 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java
@@ -21,10 +21,10 @@ public class FileUtils {
 
 	private static File[] untarFile(File source, File outputDir) throws IOException, TarException {
 		TarFile tarFile = new TarFile(source);
-		List untarredFiles = new ArrayList();
+		List<File> untarredFiles = new ArrayList<File>();
 		try {
-			for (Enumeration e = tarFile.entries(); e.hasMoreElements();) {
-				TarEntry entry = (TarEntry) e.nextElement();
+			for (Enumeration<TarEntry> e = tarFile.entries(); e.hasMoreElements();) {
+				TarEntry entry = e.nextElement();
 				InputStream input = tarFile.getInputStream(entry);
 				try {
 					File outFile = new File(outputDir, entry.getName());
@@ -52,7 +52,7 @@ public class FileUtils {
 		} finally {
 			tarFile.close();
 		}
-		return (File[]) untarredFiles.toArray(new File[untarredFiles.size()]);
+		return untarredFiles.toArray(new File[untarredFiles.size()]);
 	}
 
 	/**
@@ -107,7 +107,7 @@ public class FileUtils {
 			in.close();
 			throw new IOException(Messages.Util_Invalid_Zip_File_Format);
 		}
-		ArrayList unzippedFiles = new ArrayList();
+		ArrayList<File> unzippedFiles = new ArrayList<File>();
 		do {
 			File outFile = new File(outputDir, ze.getName());
 			unzippedFiles.add(outFile);
@@ -131,7 +131,7 @@ public class FileUtils {
 		} while ((ze = in.getNextEntry()) != null);
 		in.close();
 
-		return (File[]) unzippedFiles.toArray(new File[unzippedFiles.size()]);
+		return unzippedFiles.toArray(new File[unzippedFiles.size()]);
 	}
 
 	// Delete empty directories under dir, including dir itself.
@@ -243,8 +243,8 @@ public class FileUtils {
 	public static void zip(File[] inclusions, File[] exclusions, File destinationArchive, IPathComputer pathComputer) throws IOException {
 		FileOutputStream fileOutput = new FileOutputStream(destinationArchive);
 		ZipOutputStream output = new ZipOutputStream(fileOutput);
-		HashSet exclusionSet = exclusions == null ? new HashSet() : new HashSet(Arrays.asList(exclusions));
-		HashSet directoryEntries = new HashSet();
+		HashSet<File> exclusionSet = exclusions == null ? new HashSet<File>() : new HashSet<File>(Arrays.asList(exclusions));
+		HashSet<IPath> directoryEntries = new HashSet<IPath>();
 		try {
 			for (int i = 0; i < inclusions.length; i++) {
 				pathComputer.reset();
@@ -273,11 +273,11 @@ public class FileUtils {
 	 * @param pathComputer - computer used to create the path of the files in the result.
 	 * @throws IOException
 	 */
-	public static void zip(ZipOutputStream output, File source, Set exclusions, IPathComputer pathComputer) throws IOException {
-		zip(output, source, exclusions, pathComputer, new HashSet());
+	public static void zip(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer) throws IOException {
+		zip(output, source, exclusions, pathComputer, new HashSet<IPath>());
 	}
 
-	public static void zip(ZipOutputStream output, File source, Set exclusions, IPathComputer pathComputer, Set directoryEntries) throws IOException {
+	public static void zip(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
 		if (exclusions.contains(source))
 			return;
 		if (source.isDirectory()) //if the file path is a URL then isDir and isFile are both false
@@ -286,7 +286,7 @@ public class FileUtils {
 			zipFile(output, source, pathComputer, directoryEntries);
 	}
 
-	private static void zipDirectoryEntry(ZipOutputStream output, IPath entry, long time, Set directoryEntries) throws IOException {
+	private static void zipDirectoryEntry(ZipOutputStream output, IPath entry, long time, Set<IPath> directoryEntries) throws IOException {
 		entry = entry.addTrailingSeparator();
 		if (!directoryEntries.contains(entry)) {
 			//make sure parent entries are in the zip
@@ -314,7 +314,7 @@ public class FileUtils {
 	 * Zip the contents of the given directory into the zip file represented by
 	 * the given zip stream. Prepend the given prefix to the file paths.
 	 */
-	private static void zipDir(ZipOutputStream output, File source, Set exclusions, IPathComputer pathComputer, Set directoryEntries) throws IOException {
+	private static void zipDir(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
 		File[] files = source.listFiles();
 		if (files.length == 0) {
 			zipDirectoryEntry(output, pathComputer.computePath(source), source.lastModified(), directoryEntries);
@@ -326,16 +326,16 @@ public class FileUtils {
 		// foo/bar.txt
 		// foo/something/bar2.txt
 		// foo/something/else/bar3.txt
-		Arrays.sort(files, new Comparator() {
-			public int compare(Object arg0, Object arg1) {
-				Path a = new Path(((File) arg0).getAbsolutePath());
-				Path b = new Path(((File) arg1).getAbsolutePath());
+		Arrays.sort(files, new Comparator<File>() {
+			public int compare(File arg0, File arg1) {
+				Path a = new Path(arg0.getAbsolutePath());
+				Path b = new Path(arg1.getAbsolutePath());
 				if (a.segmentCount() == b.segmentCount()) {
-					if (((File) arg0).isDirectory() && ((File) arg1).isFile())
+					if (arg0.isDirectory() && arg1.isFile())
 						return 1;
-					else if (((File) arg0).isDirectory() && ((File) arg1).isDirectory())
+					else if (arg0.isDirectory() && arg1.isDirectory())
 						return 0;
-					else if (((File) arg0).isFile() && ((File) arg1).isDirectory())
+					else if (arg0.isFile() && arg1.isDirectory())
 						return -1;
 					else
 						return 0;
@@ -352,7 +352,7 @@ public class FileUtils {
 	 * Add the given file to the zip file represented by the specified stream.
 	 * Prepend the given prefix to the path of the file.
 	 */
-	private static void zipFile(ZipOutputStream output, File source, IPathComputer pathComputer, Set directoryEntries) throws IOException {
+	private static void zipFile(ZipOutputStream output, File source, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
 		boolean isManifest = false; //manifest files are special
 		InputStream input = new BufferedInputStream(new FileInputStream(source));
 		try {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java
index cb3fd61..749401c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@ package org.eclipse.equinox.internal.p2.core.helpers;
 import java.util.ArrayList;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
@@ -39,7 +39,7 @@ public class LogHelper {
 	 */
 	private static FrameworkLogEntry getLog(IStatus status) {
 		Throwable t = status.getException();
-		ArrayList childlist = new ArrayList();
+		ArrayList<FrameworkLogEntry> childlist = new ArrayList<FrameworkLogEntry>();
 
 		int stackCode = t instanceof CoreException ? 1 : 0;
 		// ensure a substatus inside a CoreException is properly logged 
@@ -57,7 +57,7 @@ public class LogHelper {
 			}
 		}
 
-		FrameworkLogEntry[] children = (FrameworkLogEntry[]) (childlist.size() == 0 ? null : childlist.toArray(new FrameworkLogEntry[childlist.size()]));
+		FrameworkLogEntry[] children = (childlist.size() == 0 ? null : childlist.toArray(new FrameworkLogEntry[childlist.size()]));
 
 		return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), stackCode, t, children);
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
index 442132b..2520f2d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
@@ -26,11 +26,11 @@ import java.util.*;
  * The class does not support default properties as they can be expressed by 
  * creating java.util.Properties hierarchies.
  */
-public class OrderedProperties extends Dictionary implements Map {
+public class OrderedProperties extends Dictionary<String, String> implements Map<String, String> {
 
-	LinkedHashMap propertyMap = null;
+	LinkedHashMap<String, String> propertyMap = null;
 
-	public static OrderedProperties unmodifiableProperties(Map properties) {
+	public static OrderedProperties unmodifiableProperties(Map<String, String> properties) {
 		return new UnmodifiableProperties(properties);
 	}
 
@@ -40,12 +40,12 @@ public class OrderedProperties extends Dictionary implements Map {
 
 	public OrderedProperties(int size) {
 		super();
-		propertyMap = new LinkedHashMap(size);
+		propertyMap = new LinkedHashMap<String, String>(size);
 	}
 
 	public OrderedProperties(OrderedProperties properties) {
 		super();
-		propertyMap = new LinkedHashMap(properties.size());
+		propertyMap = new LinkedHashMap<String, String>(properties.size());
 		putAll(properties);
 	}
 
@@ -67,11 +67,11 @@ public class OrderedProperties extends Dictionary implements Map {
 	}
 
 	public String getProperty(String key) {
-		return (String) (propertyMap == null ? null : propertyMap.get(key));
+		return (propertyMap == null ? null : propertyMap.get(key));
 	}
 
 	public void putAll(OrderedProperties properties) {
-		putAll((Map) properties);
+		putAll(properties);
 	}
 
 	/**
@@ -79,7 +79,7 @@ public class OrderedProperties extends Dictionary implements Map {
 	 */
 	private void init() {
 		if (propertyMap == null) {
-			propertyMap = new LinkedHashMap();
+			propertyMap = new LinkedHashMap<String, String>();
 		}
 	}
 
@@ -95,9 +95,9 @@ public class OrderedProperties extends Dictionary implements Map {
 		propertyMap = null;
 	}
 
-	public Object put(Object arg0, Object arg1) {
+	public String put(String key, String value) {
 		init();
-		return propertyMap.put(arg0, arg1);
+		return propertyMap.put(key, value);
 	}
 
 	public boolean containsKey(Object key) {
@@ -108,29 +108,29 @@ public class OrderedProperties extends Dictionary implements Map {
 		return propertyMap != null ? propertyMap.containsValue(value) : false;
 	}
 
-	public Set entrySet() {
-		return propertyMap != null ? propertyMap.entrySet() : Collections.EMPTY_SET;
+	public Set<Map.Entry<String, String>> entrySet() {
+		return propertyMap != null ? propertyMap.entrySet() : CollectionUtils.<Map.Entry<String, String>> emptySet();
 	}
 
-	public Object get(Object key) {
+	public String get(Object key) {
 		return propertyMap != null ? propertyMap.get(key) : null;
 	}
 
-	public Set keySet() {
-		return propertyMap != null ? propertyMap.keySet() : Collections.EMPTY_SET;
+	public Set<String> keySet() {
+		return propertyMap != null ? propertyMap.keySet() : CollectionUtils.<String> emptySet();
 	}
 
-	public void putAll(Map arg0) {
+	public void putAll(Map<? extends String, ? extends String> arg0) {
 		init();
 		propertyMap.putAll(arg0);
 	}
 
-	public Object remove(Object key) {
+	public String remove(Object key) {
 		return propertyMap != null ? propertyMap.remove(key) : null;
 	}
 
-	public Collection values() {
-		return propertyMap != null ? propertyMap.values() : Collections.EMPTY_LIST;
+	public Collection<String> values() {
+		return propertyMap != null ? propertyMap.values() : CollectionUtils.<String> emptyList();
 	}
 
 	public boolean equals(Object o) {
@@ -147,8 +147,8 @@ public class OrderedProperties extends Dictionary implements Map {
 			return rhs.propertyMap.equals(this.propertyMap);
 		}
 		if (this.propertyMap == null) {
-			if (o instanceof Map)
-				return ((Map) o).isEmpty();
+			if (o instanceof Map<?, ?>)
+				return ((Map<?, ?>) o).isEmpty();
 			return false;
 		}
 		return this.propertyMap.equals(o);
@@ -164,54 +164,36 @@ public class OrderedProperties extends Dictionary implements Map {
 		return sb.toString();
 	}
 
-	private class ElementsEnum implements Enumeration {
+	private class StringsEnum implements Enumeration<String> {
 
-		Iterator iterator = null;
+		private final Iterator<String> iterator;
 
-		public ElementsEnum(OrderedProperties properties) {
-			iterator = properties.propertyMap.values().iterator();
+		public StringsEnum(Collection<String> elems) {
+			this.iterator = elems.iterator();
 		}
 
 		public boolean hasMoreElements() {
 			return iterator.hasNext();
 		}
 
-		public Object nextElement() {
+		public String nextElement() {
 			return iterator.next();
 		}
 	}
 
-	public Enumeration elements() {
-		return new ElementsEnum(this);
-	}
-
-	private class KeysEnum implements Enumeration {
-
-		Iterator iterator = null;
-
-		public KeysEnum(OrderedProperties properties) {
-			iterator = properties.propertyMap.keySet().iterator();
-		}
-
-		public boolean hasMoreElements() {
-			return iterator.hasNext();
-		}
-
-		public Object nextElement() {
-			return iterator.next();
-		}
+	public Enumeration<String> elements() {
+		return new StringsEnum(propertyMap.values());
 	}
 
-	public Enumeration keys() {
-		return new KeysEnum(this);
+	public Enumeration<String> keys() {
+		return new StringsEnum(propertyMap.keySet());
 	}
 
 	private static class UnmodifiableProperties extends OrderedProperties {
 
-		UnmodifiableProperties(Map properties) {
+		UnmodifiableProperties(Map<String, String> properties) {
 			super();
-			for (Iterator iter = properties.entrySet().iterator(); iter.hasNext();) {
-				Map.Entry entry = (Map.Entry) iter.next();
+			for (Map.Entry<String, String> entry : properties.entrySet()) {
 				super.put(entry.getKey(), entry.getValue());
 			}
 		}
@@ -220,15 +202,15 @@ public class OrderedProperties extends Dictionary implements Map {
 			throw new UnsupportedOperationException();
 		}
 
-		public synchronized Object put(Object key, Object value) {
+		public synchronized String put(String key, String value) {
 			throw new UnsupportedOperationException();
 		}
 
-		public synchronized Object remove(Object key) {
+		public synchronized String remove(Object key) {
 			throw new UnsupportedOperationException();
 		}
 
-		public synchronized void putAll(Map t) {
+		public synchronized void putAll(Map<? extends String, ? extends String> t) {
 			throw new UnsupportedOperationException();
 		}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/QueryHelpers.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/QueryHelpers.java
deleted file mode 100644
index 3a6cf3e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/QueryHelpers.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * Static helper methods for the Query API.
- */
-public class QueryHelpers {
-	/**
-	 * Gets the ID for a Query. 
-	 */
-	public static String getId(Query query) {
-		return query.getClass().getName();
-	}
-
-	/**
-	 * Gets a particular property of a query.
-	 * @param query The query to retrieve the property from
-	 * @param property The property to retrieve 
-	 */
-	public static Object getProperty(Query query, String property) {
-		Class clazz = query.getClass();
-		Object result = null;
-		try {
-			Method method = clazz.getMethod("get" + property, new Class[0]); //$NON-NLS-1$
-			result = method.invoke(query, new Object[0]);
-		} catch (SecurityException e) {
-			return null;
-		} catch (NoSuchMethodException e) {
-			return null;
-		} catch (IllegalArgumentException e) {
-			return null;
-		} catch (IllegalAccessException e) {
-			return null;
-		} catch (InvocationTargetException e) {
-			return null;
-		}
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java
index c1995c2..2d6a9e5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java
@@ -26,7 +26,7 @@ public class StringHelper {
 				if (spec.length() > 0)
 					resultArr = new String[] {spec};
 			} else {
-				List result = new ArrayList();
+				List<String> result = new ArrayList<String>();
 				while (splitIdx >= 0) {
 					String part = spec.substring(0, splitIdx).trim();
 					if (part.length() > 0)
@@ -37,7 +37,7 @@ public class StringHelper {
 				spec = spec.trim();
 				if (spec.length() > 0)
 					result.add(spec);
-				resultArr = (String[]) result.toArray(new String[result.size()]);
+				resultArr = result.toArray(new String[result.size()]);
 			}
 		}
 		return resultArr;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java
index 5500bc7..4b49712 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java
@@ -70,13 +70,13 @@ public class TarFile {
 	 * 
 	 * @return enumeration of all files in the archive
 	 */
-	public Enumeration entries() {
-		return new Enumeration() {
+	public Enumeration<TarEntry> entries() {
+		return new Enumeration<TarEntry>() {
 			public boolean hasMoreElements() {
 				return (curEntry != null);
 			}
 
-			public Object nextElement() {
+			public TarEntry nextElement() {
 				TarEntry oldEntry = curEntry;
 				try {
 					curEntry = entryEnumerationStream.getNextEntry();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
index ca929c5..7712732 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
@@ -35,12 +35,15 @@ public class Tracing {
 	public static boolean DEBUG_RECONCILER = false;
 	public static boolean DEBUG_REMOVE_REPO = false;
 	public static boolean DEBUG_UPDATE_CHECK = false;
+	public static boolean DEBUG_EVENTS_CLIENT = false;
+	public static boolean DEBUG_VERIFIER = false;
 
 	static {
 		DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.context, DebugOptions.class.getName());
 		if (options != null) {
 			DEBUG = options.getBooleanOption(Activator.ID + "/debug", false); //$NON-NLS-1$
 			if (DEBUG) {
+				DEBUG_EVENTS_CLIENT = options.getBooleanOption(Activator.ID + "/events/client", false); //$NON-NLS-1$
 				DEBUG_GENERATOR_PARSING = options.getBooleanOption(Activator.ID + "/generator/parsing", false); //$NON-NLS-1$
 				DEBUG_INSTALL_REGISTRY = options.getBooleanOption(Activator.ID + "/engine/installregistry", false); //$NON-NLS-1$
 				DEBUG_METADATA_PARSING = options.getBooleanOption(Activator.ID + "/metadata/parsing", false); //$NON-NLS-1$
@@ -53,6 +56,7 @@ public class Tracing {
 				DEBUG_RECONCILER = options.getBooleanOption(Activator.ID + "/reconciler", false); //$NON-NLS-1$
 				DEBUG_REMOVE_REPO = options.getBooleanOption(Activator.ID + "/core/removeRepo", false); //$NON-NLS-1$
 				DEBUG_UPDATE_CHECK = options.getBooleanOption(Activator.ID + "/updatechecker", false); //$NON-NLS-1$
+				DEBUG_VERIFIER = options.getBooleanOption(Activator.ID + "/verifier", false); //$NON-NLS-1$
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java
index 8f28f2f..1eb23ba 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,14 +28,42 @@ public class URLUtil {
 	 * @return The local file corresponding to the given url, or <code>null</code>
 	 */
 	public static File toFile(URL url) {
+
+		if (!"file".equalsIgnoreCase(url.getProtocol())) //$NON-NLS-1$
+			return null;
+		//assume all illegal characters have been properly encoded, so use URI class to unencode
+
+		String externalForm = url.toExternalForm();
+		String pathString = externalForm.substring(5);
+
 		try {
-			if (!"file".equalsIgnoreCase(url.getProtocol())) //$NON-NLS-1$
-				return null;
-			//assume all illegal characters have been properly encoded, so use URI class to unencode
-			return new File(new URI(url.toExternalForm()));
+			if (pathString.indexOf('/') == 0) {
+				if (pathString.indexOf("//") == 0) //$NON-NLS-1$
+					externalForm = "file:" + ensureUNCPath(pathString); //$NON-NLS-1$
+				return new File(new URI(externalForm));
+			}
+			if (pathString.indexOf(':') == 1)
+				return new File(new URI("file:/" + pathString)); //$NON-NLS-1$
+
+			return new File(new URI(pathString).getSchemeSpecificPart());
 		} catch (Exception e) {
 			//URL contains unencoded characters
-			return new File(url.getFile());
+			return new File(pathString);
+		}
+	}
+
+	/**
+	 * Ensures the given path string starts with exactly four leading slashes.
+	 */
+	private static String ensureUNCPath(String path) {
+		int len = path.length();
+		StringBuffer result = new StringBuffer(len);
+		for (int i = 0; i < 4; i++) {
+			//	if we have hit the first non-slash character, add another leading slash
+			if (i >= len || result.length() > 0 || path.charAt(i) != '/')
+				result.append('/');
 		}
+		result.append(path);
+		return result.toString();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/FormatException.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/FormatException.java
deleted file mode 100644
index d4a555d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/FormatException.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-/**
- * Exception thrown by the {@link VersionFormatParser}
- *
- */
-public class FormatException extends Exception {
-
-	private static final long serialVersionUID = -867104101610941043L;
-
-	public FormatException(String message) {
-		super(message);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUI.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUI.java
deleted file mode 100644
index 0bfa2e8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUI.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.security.cert.Certificate;
-
-/**
- * Callback API for prompting for user information from within lower level code.
- */
-public interface IServiceUI {
-	/**
-	 * Authentication information returned from an authentication prompt request.
-	 */
-	public static class AuthenticationInfo {
-		private final boolean save;
-		private final String userName;
-		private final String password;
-
-		public AuthenticationInfo(String userName, String password, boolean saveResult) {
-			this.userName = userName;
-			this.password = password;
-			this.save = saveResult;
-		}
-
-		public boolean saveResult() {
-			return save;
-		}
-
-		public String getUserName() {
-			return userName;
-		}
-
-		public String getPassword() {
-			return password;
-		}
-	}
-
-	/**
-	 * Opens a UI prompt for authentication details
-	 * 
-	 * @param location - the location requiring login details, may be <code>null</code>.
-	 * @return The authentication result
-	 */
-	public AuthenticationInfo getUsernamePassword(String location);
-
-	/**
-	 * Opens a UI prompt for authentication details when cached or remembered details
-	 * where not accepted.
-	 * 
-	 * @param location  the location requiring login details
-	 * @param previousInfo - the previously used authentication details - may not be null.
-	 * @return The authentication result
-	 */
-	public AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo);
-
-	/**
-	 * Displays a list of certificates to the user.
-	 *  
-	 * @param certificates - a list of certificates to display to the user
-	 * @return An array of certificates that have been accepted.
-	 */
-	public Certificate[] showCertificates(Certificate[][] certificates);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUICheckUnsigned.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUICheckUnsigned.java
deleted file mode 100644
index e5d3676..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/IServiceUICheckUnsigned.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-/**
- * An extension to {@link IServiceUI} for prompting the user about installing unsigned content.
- */
-public interface IServiceUICheckUnsigned {
-	/**
-	 * Prompts the user that they are installing unsigned content.
-	 * @param details Detailed information about the items that have unsigned content.
-	 * @return <code>true</code> if the installation should proceed, and <code>false</code> otherwise.
-	 */
-	public boolean promptForUnsignedContent(String[] details);
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Messages.java
deleted file mode 100644
index cf6d25a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Messages.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * TODO Shouldn't be a public class in an API package.
- */
-public class Messages extends NLS {
-	public static String _0_is_not_a_positive_integer_in_osgi_1;
-
-	public static String _0_is_not_a_string_in_osgi_1;
-
-	public static String _0_is_not_a_valid_qualifier_in_osgi_1;
-
-	public static String array_can_not_be_empty;
-
-	public static String array_can_not_have_character_group;
-
-	public static String auto_can_not_have_pad_value;
-
-	public static String cannot_combine_ignore_with_other_instruction;
-
-	public static String cannot_combine_range_upper_bound_with_pad_value;
-
-	public static String character_group_defined_more_then_once;
-
-	public static String colon_expected_before_original_version_0;
-
-	public static String default_defined_more_then_once;
-
-	public static String delimiter_can_not_be_ignored;
-
-	public static String delimiter_can_not_have_default_value;
-
-	public static String delimiter_can_not_have_pad_value;
-
-	public static String delimiter_can_not_have_range;
-
-	public static String EOS_after_escape;
-
-	public static String expected_orignal_after_colon_0;
-
-	public static String expected_orignal_after_slash_0;
-
-	public static String expected_slash_after_raw_vector_0;
-
-	public static String format_0_unable_to_parse_1;
-
-	public static String format_0_unable_to_parse_empty_version;
-
-	public static String format_is_empty;
-
-	public static String format_must_be_delimited_by_colon_0;
-
-	public static String group_can_not_be_empty;
-
-	public static String ignore_defined_more_then_once;
-
-	public static String illegal_character_encountered_ascii_0;
-
-	public static String illegal_number_of_entries_0_in_osgi_1;
-
-	public static String missing_comma_in_range_0;
-
-	public static String negative_character_range;
-
-	public static String neither_raw_vector_nor_format_specified_0;
-
-	public static String number_can_not_have_pad_value;
-
-	public static String only_format_specified_0;
-
-	public static String original_must_start_with_colon_0;
-
-	public static String original_stated_but_missing_0;
-
-	public static String pad_defined_more_then_once;
-
-	public static String pad_not_allowed_in_osgi_0;
-
-	public static String performing_subquery;
-
-	public static String premature_end_of_format;
-
-	public static String premature_end_of_format_expected_0;
-
-	public static String premature_EOS_0;
-
-	public static String range_boundaries_0_and_1_cannot_have_different_formats;
-
-	public static String range_defined_more_then_once;
-
-	public static String range_max_cannot_be_less_then_range_min;
-
-	public static String range_max_cannot_be_zero;
-
-	public static String range_min_0_is_not_less_then_range_max_1;
-
-	public static String raw_and_original_must_use_same_range_inclusion_0;
-
-	public static String raw_element_can_not_have_pad_value;
-
-	public static String raw_element_expected_0;
-
-	public static String string_can_not_have_pad_value;
-
-	public static String syntax_error_in_version_format_0_1_2;
-
-	public static String syntax_error_in_version_format_0_1_found_2_expected_3;
-
-	public static String unbalanced_format_parenthesis;
-
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.core.messages"; //$NON-NLS-1$
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// Prevent instance creation
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/ProvisionException.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/ProvisionException.java
deleted file mode 100644
index dd1feee..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/ProvisionException.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.Activator;
-
-/**
- * A checked exception indicating a recoverable error occurred while provisioning.
- * The status provides a further description of the problem.
- * 
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class ProvisionException extends CoreException {
-	private static final long serialVersionUID = 1L;
-
-	//General and core status codes [0-1000]
-	/**
-	 * Status code constant (value 1) for an uncategorized error.
-	 */
-	public static final int INTERNAL_ERROR = 1;
-
-	//Repository status codes [1000-1999]
-	//General repository codes [1000-1099]
-	/** 
-	 * Status code constant (value 1000) indicating a repository
-	 * unexpectedly does not exist.
-	 */
-	public static final int REPOSITORY_NOT_FOUND = 1000;
-
-	/** 
-	 * Status code constant (value 1001) indicating a repository
-	 * unexpectedly exists.
-	 */
-	public static final int REPOSITORY_EXISTS = 1001;
-
-	/** 
-	 * Status code constant (value 1002) indicating a repository
-	 * could not be read
-	 */
-	public static final int REPOSITORY_FAILED_READ = 1002;
-
-	/** 
-	 * Status code constant (value 1003) indicating a failure occurred
-	 * while writing to a repository.
-	 */
-	public static final int REPOSITORY_FAILED_WRITE = 1003;
-
-	/** 
-	 * Status code constant (value 1004) indicating a repository
-	 * could not be written because it is a read-only repository.
-	 */
-	public static final int REPOSITORY_READ_ONLY = 1004;
-
-	/** 
-	 * Status code constant (value 1005) indicating an attempt was
-	 * made to create or access a repository of unknown type.
-	 */
-	public static final int REPOSITORY_UNKNOWN_TYPE = 1005;
-	/** 
-	 * Status code constant (value 1006) indicating that a specified
-	 * repository location is not valid.
-	 */
-	public static final int REPOSITORY_INVALID_LOCATION = 1006;
-
-	/** 
-	 * Status code constant (value 1007) indicating that there was
-	 * an authentication error while reading a repository
-	 */
-	public static final int REPOSITORY_FAILED_AUTHENTICATION = 1007;
-
-	//Metadata repository codes [1100-1199]
-
-	//Artifact repository codes [1200-1299]
-
-	/** 
-	 * Status code constant (value 1200) indicating an artifact unexpectedly
-	 * does not exist.
-	 */
-	public static final int ARTIFACT_NOT_FOUND = 1200;
-
-	/** 
-	 * Status code constant (value 1201) indicating an artifact unexpectedly
-	 * already exists.
-	 */
-	public static final int ARTIFACT_EXISTS = 1201;
-
-	/**
-	 * Status code constant (value 1202) indicating an artifact's size
-	 * could not be found.
-	 */
-	public static final int ARTIFACT_INCOMPLETE_SIZING = 1202;
-
-	/**
-	 * Creates a new exception with the given status object.  The message
-	 * of the given status is used as the exception message.
-	 *
-	 * @param status the status object to be associated with this exception
-	 */
-	public ProvisionException(IStatus status) {
-		super(status);
-	}
-
-	/**
-	 * Creates a new exception with the given message and a severity of 
-	 * {@link IStatus#ERROR}.
-	 *
-	 * @param message The human-readable problem message
-	 */
-	public ProvisionException(String message) {
-		super(new Status(IStatus.ERROR, Activator.ID, message));
-	}
-
-	/**
-	 * Creates a new exception with the given message and cause, and
-	 * a severity of {@link IStatus#ERROR}.
-	 *
-	 * @param message The human-readable problem message
-	 * @param cause The underlying cause of the exception
-	 */
-	public ProvisionException(String message, Throwable cause) {
-		super(new Status(IStatus.ERROR, Activator.ID, message, cause));
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Version.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Version.java
deleted file mode 100644
index 7e43425..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/Version.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     Cloudsmith Inc - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * <p>The Omni Version is composed of a vector of Comparable objects and a pad value. The pad
- * might be <code>null</code>. The vector can contain integers, strings, {@link VersionVector}
- * instances, or one of the special objects {@link VersionVector#MAX_VALUE MAX_VALUE},
- * {@link VersionVector#MAXS_VALUE MAXS_VALUE}, or {@link VersionVector#MIN_VALUE MIN_VALUE}.</p>
- *
- * <p>When two versions are compared, they are always considered padded to infinity by their
- * pad value or by {@link VersionVector#MIN_VALUE MIN_VALUE} in case the pad value is
- * <code>null</code>. The comparison is type sensitive so that:</p><pre>
- * MAX_VALUE > Integer > VersionVector > MAXS_VALUE > String > MIN_VALUE<br/>
- * </pre>
- *
- * The class is signature compatible with {@link org.osgi.framework.Version} but attempts
- * to use it as such might render a {@link UnsupportedOperationException} in case the
- * vector holds incompatible values. The method {@link #isOSGiCompatible()} can be used
- * to test.
- * 
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class Version extends VersionVector {
-	private static final Integer cache[] = new Integer[100];
-
-	private static final char[] allowedOSGiChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-".toCharArray(); //$NON-NLS-1$
-
-	public static final Integer ZERO_INT = new Integer(0);
-
-	public static final Integer MAX_INT_OBJ = new Integer(Integer.MAX_VALUE);
-
-	static {
-		cache[0] = ZERO_INT;
-		for (int i = 1; i < cache.length; i++)
-			cache[i] = new Integer(i);
-	}
-
-	static Integer valueOf(int i) {
-		try {
-			return cache[i];
-		} catch (ArrayIndexOutOfBoundsException e) {
-			return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i);
-		}
-	}
-
-	/**
-	 * The empty OSGi version "0.0.0". Equivalent to calling
-	 * <code>new Version(0,0,0)</code>.
-	 */
-	public static final Version emptyVersion = new Version(0, 0, 0);
-
-	/**
-	 * The version that is semantically greater then all other versions.
-	 */
-	public static final Version MAX_VERSION = new Version("raw:MpM"); //$NON-NLS-1$
-
-	/**
-	 * The version that is semantically less then all other versions.
-	 */
-	public static final Version MIN_VERSION = new Version("raw:-M"); //$NON-NLS-1$
-
-	private static final long serialVersionUID = 8202715438560849928L;
-
-	/**
-	 * Creates an OSGi version identifier from the specified numerical components.
-	 * 
-	 * <p>
-	 * The qualifier is set to the empty string.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @throws IllegalArgumentException If the numerical components are
-	 *         negative.
-	 */
-	public static Version createOSGi(int major, int minor, int micro) {
-		return createOSGi(major, minor, micro, null);
-	}
-
-	/**
-	 * Creates an OSGi version identifier from the specified components.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @param qualifier Qualifier component of the version identifier. If
-	 *        <code>null</code> is specified, then the qualifier will be set to
-	 *        the empty string.
-	 * @throws IllegalArgumentException If the numerical components are negative
-	 *         or the qualifier string is invalid.
-	 */
-	public static Version createOSGi(int major, int minor, int micro, String qualifier) {
-		// TODO: Eliminate duplicates
-		return new Version(major, minor, micro, qualifier);
-	}
-
-	/**
-	 * Create an omni version from an OSGi <code>version</code>.
-	 * @param version The OSGi version. Can be <code>null</code>.
-	 * @return The created omni version
-	 */
-	public static Version fromOSGiVersion(org.osgi.framework.Version version) {
-		if (version == null)
-			return null;
-		if (version.equals(org.osgi.framework.Version.emptyVersion))
-			return emptyVersion;
-		return new Version(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
-	}
-
-	/**
-	 * Parses a version identifier from the specified string.
-	 * 
-	 * @param version String representation of the version identifier. Leading
-	 *        and trailing whitespace will be ignored.
-	 * @return A <code>Version</code> object representing the version identifier
-	 *         or <code>null</code> if <code>version</code> is <code>null</code> or
-	 *         an empty string.
-	 * @throws IllegalArgumentException If <code>version</code> is improperly
-	 *         formatted.
-	 */
-	public static Version create(String version) {
-		// TODO: Eliminate duplicates
-		if (version != null) {
-			Version v = new Version();
-			if (VersionParser.parseInto(version, 0, version.length(), v))
-				return v;
-		}
-		return null;
-	}
-
-	/**
-	 * Parses a version identifier from the specified string. This method is for backward
-	 * compatibility with OSGi and will return the OSGi {@link #emptyVersion} when
-	 * the provided string is empty or <code>null</code>.
-	 * 
-	 * @param version String representation of the version identifier. Leading
-	 *        and trailing whitespace will be ignored.
-	 * @return A <code>Version</code> object representing the version
-	 *         identifier. If <code>version</code> is <code>null</code> or
-	 *         the empty string then the OSGi <code>emptyVersion</code> will be
-	 *         returned.
-	 * @throws IllegalArgumentException If <code>version</code> is improperly
-	 *         formatted.
-	 * @see #create(String)
-	 */
-	public static Version parseVersion(String version) {
-		if (version == null || version.length() == 0 || "0.0.0".equals(version)) //$NON-NLS-1$
-			return emptyVersion;
-		Version v = create(version);
-		return v == null ? emptyVersion : v;
-	}
-
-	/**
-	 * Convert <code>version</code> into its OSGi equivalent if possible.
-	 *
-	 * @param version The version to convert. Can be <code>null</code>
-	 * @return The converted version or <code>null</code> if the argument was <code>null</code>
-	 * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
-	 */
-	public static org.osgi.framework.Version toOSGiVersion(Version version) {
-		if (version == null)
-			return null;
-		if (version.equals(emptyVersion))
-			return org.osgi.framework.Version.emptyVersion;
-		return new org.osgi.framework.Version(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
-	}
-
-	/**
-	 * For exception messages only
-	 * @param i the index of the entry
-	 * @return the name of the entry
-	 */
-	private static String getOSGiEntryName(int i) {
-		String name = null;
-		switch (i) {
-			case 0 :
-				name = "major"; //$NON-NLS-1$
-				break;
-			case 1 :
-				name = "minor"; //$NON-NLS-1$
-				break;
-			case 2 :
-				name = "micro"; //$NON-NLS-1$
-				break;
-			case 3 :
-				name = "qualifier"; //$NON-NLS-1$
-		}
-		return name;
-	}
-
-	/**
-	 * The optional format
-	 */
-	private VersionFormat format;
-
-	/**
-	 * The optional original string
-	 */
-	private String original;
-
-	/**
-	 * Creates an OSGi version identifier from the specified numerical components.
-	 * 
-	 * <p>
-	 * The qualifier is set to the empty string.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @throws IllegalArgumentException If the numerical components are
-	 *         negative.
-	 * @deprecated Use {@link #createOSGi(int, int, int)}. This constructor will not remain public
-	 */
-	public Version(int major, int minor, int micro) {
-		this(major, minor, micro, null);
-	}
-
-	/**
-	 * Creates an OSGi version identifier from the specified components.
-	 * 
-	 * @param major Major component of the version identifier.
-	 * @param minor Minor component of the version identifier.
-	 * @param micro Micro component of the version identifier.
-	 * @param qualifier Qualifier component of the version identifier. If
-	 *        <code>null</code> is specified, then the qualifier will be set to
-	 *        the empty string.
-	 * @throws IllegalArgumentException If the numerical components are negative
-	 *         or the qualifier string is invalid.
-	 * @deprecated Use {@link #createOSGi(int, int, int, String)}. This constructor will not remain public
-	 */
-	public Version(int major, int minor, int micro, String qualifier) {
-		if (qualifier != null && qualifier.length() == 0)
-			qualifier = null;
-		Comparable[] vector = new Comparable[qualifier == null ? 3 : 4];
-		vector[0] = valueOf(major);
-		vector[1] = valueOf(minor);
-		vector[2] = valueOf(micro);
-		if (qualifier != null)
-			vector[3] = qualifier;
-		init(vector, null, VersionFormat.OSGI_FORMAT, null);
-		validateOSGI(true);
-	}
-
-	/**
-	 * Created a version identifier from the specified string.
-	 * 
-	 * @param version String representation of the version identifier.
-	 * @throws IllegalArgumentException If <code>version</code> is improperly
-	 *         formatted.
-	 * @deprecated Use {@link #parseVersion(String)}. This constructor will not remain public
-	 */
-	public Version(String version) {
-		if (!VersionParser.parseInto(version, 0, version.length(), this)) {
-			// Version is OSGi empty
-			init(new Comparable[] {ZERO_INT, ZERO_INT, ZERO_INT}, null, VersionFormat.OSGI_FORMAT, null);
-		}
-	}
-
-	Version() {
-		// Empty constructor
-	}
-
-	Version(Comparable[] array, Comparable padValue, VersionFormat format, String original) {
-		init(array, padValue, format, original);
-	}
-
-	/**
-	 * Returns the optional format.
-	 */
-	public VersionFormat getFormat() {
-		return format;
-	}
-
-	/**
-	 * Returns the OSGi major component of this version identifier.
-	 * 
-	 * @return The major component.
-	 * @throws UnsupportedOperationException if the first element in the
-	 * vector is not a number.
-	 * @see #isOSGiCompatible()
-	 */
-	public int getMajor() {
-		return getIntElement(0);
-	}
-
-	/**
-	 * Returns the OSGi micro component of this version identifier.
-	 * 
-	 * @return The micro component.
-	 * @throws UnsupportedOperationException if the third element in the
-	 * vector is not a number.
-	 * @see #isOSGiCompatible()
-	 */
-	public int getMicro() {
-		return getIntElement(2);
-	}
-
-	/**
-	 * Returns the OSGi minor component of this version identifier.
-	 * 
-	 * @return The minor component.
-	 * @throws UnsupportedOperationException if the second element in the
-	 * vector is not a number.
-	 * @see #isOSGiCompatible()
-	 */
-	public int getMinor() {
-		return getIntElement(1);
-	}
-
-	/**
-	 * Returns the <code>original</code> part of the string for this version
-	 * or <code>null</code> if no such part was provided when the version was
-	 * created. An OSGi type version will always return the OSGi string representation.
-	 *
-	 * @return The <code>original</code> part of the version string or
-	 * <code>null</code> if that part was missing.
-	 */
-	public String getOriginal() {
-		return original;
-	}
-
-	/**
-	 * Returns the OSGi qualifier component of this version identifier.
-	 * 
-	 * @return The qualifier component or <code>null</code> if not set.
-	 * @throws UnsupportedOperationException if the fourth element in the
-	 * vector is set to something other then a string.
-	 * @see #isOSGiCompatible()
-	 */
-	public String getQualifier() {
-		Comparable[] vector = getVector();
-		if (vector.length < 4)
-			return null;
-		if (!(vector[3] instanceof String))
-			throw new UnsupportedOperationException();
-		return (String) vector[3];
-	}
-
-	/**
-	 * Checks if this version is in compliance with the OSGi version spec.
-	 * @return A flag indicating whether the version is OSGi compatible or not.
-	 */
-	public boolean isOSGiCompatible() {
-		return format == VersionFormat.OSGI_FORMAT || validateOSGI(false);
-	}
-
-	/**
-	 * Appends the original for this version onto the <code>sb</code> StringBuffer
-	 * if present.
-	 * @param sb The buffer that will receive the raw string format
-	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
-	 */
-	public void originalToString(StringBuffer sb, boolean rangeSafe) {
-		if (original != null) {
-			if (rangeSafe) {
-				// Escape all range delimiters while appending
-				String s = original;
-				int end = s.length();
-				for (int idx = 0; idx < end; ++idx) {
-					char c = s.charAt(idx);
-					if (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' ')
-						sb.append('\\');
-					sb.append(c);
-				}
-			} else
-				sb.append(original);
-		}
-	}
-
-	/**
-	 * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
-	 * @param sb The buffer that will receive the raw string format
-	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
-	 */
-	public void rawToString(StringBuffer sb, boolean rangeSafe) {
-		super.toString(sb, rangeSafe);
-	}
-
-	/**
-	 * Appends the string representation of this version onto the
-	 * <code>sb</code> StringBuffer.
-	 * @param sb The buffer that will receive the version string
-	 */
-	public void toString(StringBuffer sb) {
-		if (format == VersionFormat.OSGI_FORMAT) {
-			Comparable[] vector = getVector();
-			sb.append(vector[0]);
-			sb.append('.');
-			sb.append(vector[1]);
-			sb.append('.');
-			sb.append(vector[2]);
-			if (vector.length > 3) {
-				sb.append('.');
-				sb.append(vector[3]);
-			}
-			return;
-		}
-		sb.append(VersionParser.RAW_PREFIX);
-		super.toString(sb, false);
-		if (format != null || original != null) {
-			sb.append('/');
-			if (format != null)
-				format.toString(sb);
-			if (original != null) {
-				sb.append(':');
-				originalToString(sb, false);
-			}
-		}
-	}
-
-	void init(Comparable[] vec, Comparable pad, VersionFormat fmt, String orig) {
-		init(vec, pad);
-		format = fmt;
-		//don't need to retain original for OSGi version
-		if (fmt != VersionFormat.OSGI_FORMAT)
-			original = orig;
-	}
-
-	private int getIntElement(int i) {
-		Comparable[] vector = getVector();
-		if (!(vector.length > i && vector[i] instanceof Integer))
-			throw new UnsupportedOperationException();
-		return ((Integer) vector[i]).intValue();
-	}
-
-	// Preserve singletons during deserialization
-	private Object readResolve() {
-		Version v = this;
-		if (equals(MAX_VERSION))
-			v = MAX_VERSION;
-		else if (equals(MIN_VERSION))
-			v = MIN_VERSION;
-		else if (equals(emptyVersion))
-			v = emptyVersion;
-		else if (equals(VersionRange.OSGi_versionMax))
-			v = VersionRange.OSGi_versionMax;
-		else if (equals(VersionRange.OSGi_versionMin))
-			v = VersionRange.OSGi_versionMin;
-		return v;
-	}
-
-	boolean validateOSGI(boolean throwDetailed) {
-		Comparable[] vector = getVector();
-		if (vector.length < 3 || vector.length > 4) {
-			if (throwDetailed)
-				throw new IllegalArgumentException(NLS.bind(Messages.illegal_number_of_entries_0_in_osgi_1, valueOf(vector.length), this));
-			return false;
-		}
-
-		if (getPad() != null) {
-			if (throwDetailed)
-				throw new IllegalArgumentException(NLS.bind(Messages.pad_not_allowed_in_osgi_0, this));
-			return false;
-		}
-
-		for (int i = 0; i < 3; ++i) {
-			Object e = vector[i];
-			if (!(e instanceof Integer && ((Integer) e).intValue() >= 0)) {
-				if (throwDetailed)
-					throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_positive_integer_in_osgi_1, getOSGiEntryName(i), this));
-				return false;
-			}
-		}
-		if (vector.length == 4) {
-			Object e = vector[3];
-			if (!(e instanceof String)) {
-				if (throwDetailed)
-					throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_string_in_osgi_1, getOSGiEntryName(3), this));
-				return false;
-			}
-
-			String s = (String) e;
-			int idx = s.length();
-			char[] allowed = allowedOSGiChars;
-			int ctop = allowed.length;
-			outer: while (--idx >= 0) {
-				char c = s.charAt(idx);
-				int cdx = ctop;
-				while (--cdx >= 0)
-					if (c == allowed[cdx])
-						continue outer;
-				if (throwDetailed)
-					throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_valid_qualifier_in_osgi_1, getOSGiEntryName(3), this));
-				return false;
-			}
-		}
-		return true;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormat.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormat.java
deleted file mode 100644
index 603a49d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormat.java
+++ /dev/null
@@ -1,1245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.io.Serializable;
-import java.util.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * <p>The VersionFormat represents the Omni Version Format in compiled form. It
- * is also a parser for versions of that format.</p>
- * <p>An instance of VersionFormat is immutable and thus thread safe. The parser
- * does not maintain any state.</p>
- * 
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VersionFormat implements Serializable {
-	private static final long serialVersionUID = 6888925893926932754L;
-
-	/**
-	 * Represents one fragment of a format (i.e. auto, number, string, delimiter, etc.)
-	 */
-	static abstract class Fragment implements Serializable {
-		private static final long serialVersionUID = 4109185333058622681L;
-
-		private final Qualifier qualifier;
-
-		Fragment(Qualifier qualifier) {
-			this.qualifier = qualifier;
-		}
-
-		public final boolean equals(Object f) {
-			return f == this || getClass().equals(f.getClass()) && qualifier.equals(((Fragment) f).qualifier);
-		}
-
-		public final int hashCode() {
-			return 11 * qualifier.hashCode();
-		}
-
-		public boolean isGroup() {
-			return false;
-		}
-
-		public String toString() {
-			StringBuffer sb = new StringBuffer();
-			toString(sb);
-			return sb.toString();
-		}
-
-		Comparable getDefaultValue() {
-			return null;
-		}
-
-		Fragment getFirstLeaf() {
-			return this;
-		}
-
-		Comparable getPadValue() {
-			return null;
-		}
-
-		Qualifier getQualifier() {
-			return qualifier;
-		}
-
-		boolean parse(List segments, String version, int maxPos, TreeInfo info) {
-			return qualifier.parse(new Fragment[] {this}, 0, segments, version, maxPos, info);
-		}
-
-		abstract boolean parseOne(List segments, String version, int maxPos, TreeInfo info);
-
-		void setDefaults(List segments) {
-			// No-op at this level
-		}
-
-		void toString(StringBuffer sb) {
-			if (!(qualifier == VersionFormatParser.EXACT_ONE_QUALIFIER || (qualifier == VersionFormatParser.ZERO_OR_ONE_QUALIFIER && this.isGroup())))
-				qualifier.toString(sb);
-		}
-	}
-
-	/**
-	 * Specifies the min and max occurrences of a fragment
-	 */
-	static class Qualifier implements Serializable {
-		private static final long serialVersionUID = 7494021832824671685L;
-
-		private final int max;
-		private final int min;
-
-		Qualifier(int min, int max) {
-			this.min = min;
-			this.max = max;
-		}
-
-		public boolean equals(Object o) {
-			if (o == this)
-				return true;
-			if (!(o instanceof Qualifier))
-				return false;
-			Qualifier oq = (Qualifier) o;
-			return min == oq.min && max == oq.max;
-		}
-
-		public int hashCode() {
-			return 31 * min + 67 * max;
-		}
-
-		public String toString() {
-			StringBuffer sb = new StringBuffer();
-			toString(sb);
-			return sb.toString();
-		}
-
-		int getMax() {
-			return max;
-		}
-
-		int getMin() {
-			return min;
-		}
-
-		boolean parse(Fragment[] fragments, int fragIdx, List segments, String version, int maxPos, TreeInfo info) {
-			Fragment fragment = fragments[fragIdx++];
-			int idx = 0;
-
-			// Do the required parsing. I.e. iterate this fragment
-			// min number of times.
-			//
-			for (; idx < min; ++idx)
-				if (!fragment.parseOne(segments, version, maxPos, info))
-					return false;
-
-			for (; idx < max; ++idx) {
-				// We are greedy. Continue parsing until we get an exception
-				// and remember the state before each parse is performed.
-				//
-				info.pushState(segments.size(), fragment);
-				if (!fragment.parseOne(segments, version, maxPos, info)) {
-					info.popState(segments, fragment);
-					break;
-				}
-			}
-			int maxParsed = idx;
-
-			for (;;) {
-				// Pad with default values unless the max is unbounded
-				//
-				if (max != Integer.MAX_VALUE) {
-					for (; idx < max; ++idx)
-						fragment.setDefaults(segments);
-				}
-
-				if (fragIdx == fragments.length)
-					// We are the last segment
-					//
-					return true;
-
-				// Try to parse the next segment. If it fails, pop the state of
-				// this segment (or a child thereof) and try again
-				//
-				if (fragments[fragIdx].getQualifier().parse(fragments, fragIdx, segments, version, maxPos, info))
-					return true;
-
-				// Be less greedy, step back one position and try again.
-				//
-				if (maxParsed <= min)
-					// We have no more states to pop. Tell previous that we failed.
-					//
-					return false;
-
-				info.popState(segments, fragment);
-				idx = --maxParsed; // segments now have room for one more default value
-			}
-		}
-
-		void toString(StringBuffer sb) {
-			if (min == 0) {
-				if (max == 1)
-					sb.append('?');
-				else if (max == Integer.MAX_VALUE)
-					sb.append('*');
-				else {
-					sb.append('{');
-					sb.append(min);
-					sb.append(',');
-					sb.append(max);
-					sb.append('}');
-				}
-			} else if (max == Integer.MAX_VALUE) {
-				if (min == 1)
-					sb.append('+');
-				else {
-					sb.append('{');
-					sb.append(min);
-					sb.append(",}"); //$NON-NLS-1$
-				}
-			} else {
-				sb.append('{');
-				sb.append(min);
-				if (min != max) {
-					sb.append(',');
-					sb.append(max);
-				}
-				sb.append('}');
-			}
-		}
-
-		// Preserve singleton when deserialized
-		private Object readResolve() {
-			Qualifier q = this;
-			if (min == 0) {
-				if (max == 1)
-					q = VersionFormatParser.ZERO_OR_ONE_QUALIFIER;
-				else if (max == Integer.MAX_VALUE)
-					q = VersionFormatParser.ZERO_OR_MANY_QUALIFIER;
-			} else if (min == 1) {
-				if (max == 1)
-					q = VersionFormatParser.EXACT_ONE_QUALIFIER;
-				else if (max == Integer.MAX_VALUE)
-					q = VersionFormatParser.ONE_OR_MANY_QUALIFIER;
-			}
-			return q;
-		}
-	}
-
-	private static class AutoFragment extends RangeFragment {
-		private static final long serialVersionUID = -1016534328164247755L;
-
-		AutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-			super(instr, qualifier);
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			maxPos = checkRange(pos, maxPos);
-			if (maxPos < 0)
-				return false;
-
-			char c = version.charAt(pos);
-			if (VersionParser.isDigit(c) && isAllowed(c)) {
-				// Parse to next non-digit
-				//
-				int start = pos;
-				int value = c - '0';
-				while (++pos < maxPos) {
-					c = version.charAt(pos);
-					if (!(VersionParser.isDigit(c) && isAllowed(c)))
-						break;
-					value *= 10;
-					value += (c - '0');
-				}
-				int len = pos - start;
-				if (rangeMin > len || len > rangeMax)
-					return false;
-
-				if (!isIgnored())
-					segments.add(Version.valueOf(value));
-				info.setPosition(pos);
-				return true;
-			}
-
-			if (!(VersionParser.isLetter(c) && isAllowed(c)))
-				return false;
-
-			// Parse to next non-letter or next delimiter
-			//
-			int start = pos++;
-			for (; pos < maxPos; ++pos) {
-				c = version.charAt(pos);
-				if (!(VersionParser.isLetter(c) && isAllowed(c)))
-					break;
-			}
-			int len = pos - start;
-			if (rangeMin > len || len > rangeMax)
-				return false;
-
-			if (!isIgnored())
-				segments.add(version.substring(start, pos));
-			info.setPosition(pos);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append('a');
-			super.toString(sb);
-		}
-	}
-
-	private static class DelimiterFragment extends Fragment {
-		private static final long serialVersionUID = 8173654376143370605L;
-		private final char[] delimChars;
-		private final boolean inverted;
-
-		DelimiterFragment(VersionFormatParser.Instructions ep, Qualifier qualifier) {
-			super(qualifier);
-			if (ep == null) {
-				delimChars = null;
-				inverted = false;
-			} else {
-				inverted = ep.inverted;
-				delimChars = ep.characters;
-			}
-		}
-
-		boolean isMatch(String version, int pos) {
-			char c = version.charAt(pos);
-			if (delimChars != null) {
-				for (int idx = 0; idx < delimChars.length; ++idx)
-					if (c == delimChars[idx])
-						return !inverted;
-				return inverted;
-			} else if (VersionParser.isLetterOrDigit(c))
-				return false;
-
-			return true;
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			if (pos < maxPos && isMatch(version, pos)) {
-				// Just swallow, a delimiter does not contribute to the vector.
-				//
-				info.setPosition(pos + 1);
-				return true;
-			}
-			return false;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append('d');
-			if (delimChars != null)
-				appendCharacterRange(sb, delimChars, inverted);
-			super.toString(sb);
-		}
-	}
-
-	static boolean equalsAllowNull(Object a, Object b) {
-		return (a == null) ? (b == null) : (b != null && a.equals(b));
-	}
-
-	private static abstract class ElementFragment extends Fragment {
-		private static final long serialVersionUID = -6834591415456539713L;
-		private final Comparable defaultValue;
-		private final boolean ignored;
-		private final Comparable padValue;
-
-		ElementFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-			super(qualifier);
-			if (instr != null) {
-				ignored = instr.ignore;
-				defaultValue = instr.defaultValue;
-				padValue = instr.padValue;
-			} else {
-				ignored = false;
-				defaultValue = null;
-				padValue = null;
-			}
-		}
-
-		Comparable getDefaultValue() {
-			return defaultValue;
-		}
-
-		Comparable getPadValue() {
-			return padValue;
-		}
-
-		boolean isIgnored() {
-			return ignored;
-		}
-
-		void setDefaults(List segments) {
-			Object defaultVal = getDefaultValue();
-			if (defaultVal != null)
-				segments.add(defaultVal);
-		}
-
-		void toString(StringBuffer sb) {
-			if (ignored) {
-				sb.append('=');
-				sb.append('!');
-				sb.append(';');
-			}
-			if (defaultValue != null) {
-				sb.append('=');
-				VersionVector.rawToString(sb, false, defaultValue);
-				sb.append(';');
-			}
-			if (padValue != null) {
-				sb.append('=');
-				sb.append('p');
-				VersionVector.rawToString(sb, false, padValue);
-				sb.append(';');
-			}
-			super.toString(sb);
-		}
-	}
-
-	private static class GroupFragment extends ElementFragment {
-		private static final long serialVersionUID = 9219978678087669699L;
-		private final boolean array;
-		private final Fragment[] fragments;
-
-		GroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
-			super(instr, qualifier);
-			this.fragments = fragments;
-			this.array = array;
-		}
-
-		public boolean isGroup() {
-			return !array;
-		}
-
-		Fragment getFirstLeaf() {
-			return fragments[0].getFirstLeaf();
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			if (array) {
-				ArrayList subSegs = new ArrayList();
-				boolean success = fragments[0].getQualifier().parse(fragments, 0, subSegs, version, maxPos, info);
-				if (!success || subSegs.isEmpty())
-					return false;
-
-				Comparable padValue = info.getPadValue();
-				if (padValue != null)
-					info.setPadValue(null); // Prevent outer group from getting this.
-				else
-					padValue = getPadValue();
-
-				VersionParser.removeRedundantTrail(segments, padValue);
-				segments.add(new VersionVector((Comparable[]) subSegs.toArray(new Comparable[subSegs.size()]), padValue));
-				return true;
-			}
-
-			if (fragments[0].getQualifier().parse(fragments, 0, segments, version, maxPos, info)) {
-				Comparable padValue = getPadValue();
-				if (padValue != null)
-					info.setPadValue(padValue);
-				return true;
-			}
-			return false;
-		}
-
-		void setDefaults(List segments) {
-			Comparable dflt = getDefaultValue();
-			if (dflt != null) {
-				// A group default overrides any defaults within the
-				// group fragments
-				super.setDefaults(segments);
-			} else {
-				// Assign defaults for all fragments
-				for (int idx = 0; idx < fragments.length; ++idx)
-					fragments[idx].setDefaults(segments);
-			}
-		}
-
-		void toString(StringBuffer sb) {
-			if (array) {
-				sb.append('<');
-				for (int idx = 0; idx < fragments.length; ++idx)
-					fragments[idx].toString(sb);
-				sb.append('>');
-			} else {
-				if (getQualifier() == VersionFormatParser.ZERO_OR_ONE_QUALIFIER) {
-					sb.append('[');
-					for (int idx = 0; idx < fragments.length; ++idx)
-						fragments[idx].toString(sb);
-					sb.append(']');
-				} else {
-					sb.append('(');
-					for (int idx = 0; idx < fragments.length; ++idx)
-						fragments[idx].toString(sb);
-					sb.append(')');
-				}
-			}
-			super.toString(sb);
-		}
-	}
-
-	private static class LiteralFragment extends Fragment {
-		private static final long serialVersionUID = 6210696245839471802L;
-		private final String string;
-
-		LiteralFragment(Qualifier qualifier, String string) {
-			super(qualifier);
-			this.string = string;
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			int litLen = string.length();
-			if (pos + litLen > maxPos)
-				return false;
-
-			for (int idx = 0; idx < litLen; ++idx, ++pos) {
-				if (string.charAt(idx) != version.charAt(pos))
-					return false;
-			}
-			info.setPosition(pos);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			String str = string;
-			if (str.length() != 1) {
-				sb.append('\'');
-				toStringEscaped(sb, str, "\'"); //$NON-NLS-1$
-				sb.append('\'');
-			} else {
-				char c = str.charAt(0);
-				switch (c) {
-					case '\'' :
-					case '\\' :
-					case '<' :
-					case '[' :
-					case '(' :
-					case '{' :
-					case '?' :
-					case '*' :
-					case '+' :
-					case '=' :
-						sb.append('\\');
-						sb.append(c);
-						break;
-					default :
-						if (VersionParser.isLetterOrDigit(c)) {
-							sb.append('\\');
-							sb.append(c);
-						} else
-							sb.append(c);
-				}
-			}
-			super.toString(sb);
-		}
-	}
-
-	private static class NumberFragment extends RangeFragment {
-		private static final long serialVersionUID = -8552754381106711507L;
-		private final boolean signed;
-
-		NumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
-			super(instr, qualifier);
-			this.signed = signed;
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			maxPos = checkRange(pos, maxPos);
-			if (maxPos < 0)
-				return false;
-
-			// Parse to next non-digit
-			//
-			int start = pos;
-			int value;
-
-			char c = version.charAt(pos);
-			if (signed || characters != null) {
-				boolean negate = false;
-				if (signed && c == '-' && pos + 1 < maxPos) {
-					negate = true;
-					c = version.charAt(++pos);
-				}
-
-				if (!(c >= '0' && c <= '9' && isAllowed(c)))
-					return false;
-
-				// Parse to next non-digit
-				//
-				value = c - '0';
-				while (++pos < maxPos) {
-					c = version.charAt(pos);
-					if (!(c >= '0' && c <= '9' && isAllowed(c)))
-						break;
-					value *= 10;
-					value += (c - '0');
-				}
-				if (negate)
-					value = -value;
-			} else {
-				if (c < '0' || c > '9')
-					return false;
-
-				// Parse to next non-digit
-				//
-				value = c - '0';
-				while (++pos < maxPos) {
-					c = version.charAt(pos);
-					if (c < '0' || c > '9')
-						break;
-					value *= 10;
-					value += (c - '0');
-				}
-			}
-
-			int len = pos - start;
-			if (rangeMin > len || len > rangeMax)
-				return false;
-
-			if (!isIgnored())
-				segments.add(Version.valueOf(value));
-			info.setPosition(pos);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append(signed ? 'N' : 'n');
-			super.toString(sb);
-		}
-	}
-
-	private static class PadFragment extends ElementFragment {
-		private static final long serialVersionUID = 5052010199974380170L;
-
-		PadFragment(Qualifier qualifier) {
-			super(null, qualifier);
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			if (pos >= maxPos || version.charAt(pos) != 'p')
-				return false;
-
-			int[] position = new int[] {++pos};
-			Comparable v = VersionParser.parseRawElement(version, position, maxPos);
-			if (v == null)
-				return false;
-
-			if (!isIgnored())
-				info.setPadValue(v);
-			info.setPosition(position[0]);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append('p');
-			super.toString(sb);
-		}
-	}
-
-	private static class QuotedFragment extends RangeFragment {
-		private static final long serialVersionUID = 6057751133533608969L;
-
-		QuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-			super(instr, qualifier);
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			if (pos >= maxPos)
-				return false;
-
-			char endQuote;
-			char quote = version.charAt(pos);
-			switch (quote) {
-				case '<' :
-					endQuote = '>';
-					break;
-				case '{' :
-					endQuote = '}';
-					break;
-				case '(' :
-					endQuote = ')';
-					break;
-				case '[' :
-					endQuote = ']';
-					break;
-				case '>' :
-					endQuote = '<';
-					break;
-				case '}' :
-					endQuote = '{';
-					break;
-				case ')' :
-					endQuote = '(';
-					break;
-				case ']' :
-					endQuote = '[';
-					break;
-				default :
-					if (VersionParser.isLetterOrDigit(quote))
-						return false;
-					endQuote = quote;
-			}
-			int start = ++pos;
-			char c = version.charAt(pos);
-			while (c != endQuote && isAllowed(c) && ++pos < maxPos)
-				c = version.charAt(pos);
-
-			if (c != endQuote || rangeMin > pos - start)
-				// End quote not found
-				return false;
-
-			int len = pos - start;
-			if (rangeMin > len || len > rangeMax)
-				return false;
-
-			if (!isIgnored())
-				segments.add(version.substring(start, pos));
-			info.setPosition(++pos); // Skip quote
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append('q');
-			super.toString(sb);
-		}
-	}
-
-	private static abstract class RangeFragment extends ElementFragment {
-		private static final long serialVersionUID = -6680402803630334708L;
-		final char[] characters;
-		final boolean inverted;
-		final int rangeMax;
-		final int rangeMin;
-
-		RangeFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-			super(instr, qualifier);
-			if (instr == null) {
-				characters = null;
-				inverted = false;
-				rangeMin = 0;
-				rangeMax = Integer.MAX_VALUE;
-			} else {
-				characters = instr.characters;
-				inverted = instr.inverted;
-				rangeMin = instr.rangeMin;
-				rangeMax = instr.rangeMax;
-			}
-		}
-
-		/**
-		 * Checks that pos is at a valid character position, that we
-		 * have at least the required minimum characters left, and
-		 * if a maximum number of characters is set, limits the
-		 * returned value to a maxPos that reflects that maximum.
-		 * @param pos the current position
-		 * @param maxPos the current maxPos
-		 * @return maxPos, possibly limited by rangeMax
-		 */
-		int checkRange(int pos, int maxPos) {
-			int check = pos;
-			if (rangeMin == 0)
-				check++; // Verify one character
-			else
-				check += rangeMin;
-
-			if (check > maxPos)
-				// Less then min characters left
-				maxPos = -1;
-			else {
-				if (rangeMax != Integer.MAX_VALUE) {
-					check = pos + rangeMax;
-					if (check < maxPos)
-						maxPos = check;
-				}
-			}
-			return maxPos;
-		}
-
-		boolean isAllowed(char c) {
-			char[] crs = characters;
-			if (crs != null) {
-				int idx = crs.length;
-				while (--idx >= 0)
-					if (c == crs[idx])
-						return !inverted;
-				return inverted;
-			}
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			if (characters != null)
-				appendCharacterRange(sb, characters, inverted);
-			if (rangeMin != 0 || rangeMax != Integer.MAX_VALUE) {
-				sb.append('=');
-				sb.append('{');
-				sb.append(rangeMin);
-				if (rangeMin != rangeMax) {
-					sb.append(',');
-					if (rangeMax != Integer.MAX_VALUE)
-						sb.append(rangeMax);
-				}
-				sb.append('}');
-				sb.append(';');
-			}
-			super.toString(sb);
-		}
-	}
-
-	private static class RawFragment extends ElementFragment {
-		private static final long serialVersionUID = 4107448125256042602L;
-
-		RawFragment(VersionFormatParser.Instructions processing, Qualifier qualifier) {
-			super(processing, qualifier);
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int[] position = new int[] {info.getPosition()};
-			Comparable v = VersionParser.parseRawElement(version, position, maxPos);
-			if (v == null)
-				return false;
-
-			if (!isIgnored())
-				segments.add(v);
-			info.setPosition(position[0]);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append('r');
-			super.toString(sb);
-		}
-	}
-
-	private static class StringFragment extends RangeFragment {
-		private static final long serialVersionUID = -2265924553606430164L;
-		final boolean anyChar;
-
-		StringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean noLimit) {
-			super(instr, qualifier);
-			anyChar = noLimit;
-		}
-
-		boolean parseOne(List segments, String version, int maxPos, TreeInfo info) {
-			int pos = info.getPosition();
-			maxPos = checkRange(pos, maxPos);
-			if (maxPos < 0)
-				return false;
-
-			// Parse to next delimiter or end of string
-			//
-			int start = pos;
-			if (characters != null) {
-				if (anyChar) {
-					// Swallow everything that matches the allowed characters
-					for (; pos < maxPos; ++pos) {
-						if (!isAllowed(version.charAt(pos)))
-							break;
-					}
-				} else {
-					// Swallow letters that matches the allowed characters
-					for (; pos < maxPos; ++pos) {
-						char c = version.charAt(pos);
-						if (!(VersionParser.isLetter(c) && isAllowed(c)))
-							break;
-					}
-				}
-			} else {
-				if (anyChar)
-					// Swallow all characters
-					pos = maxPos;
-				else {
-					// Swallow all letters
-					for (; pos < maxPos; ++pos) {
-						if (!VersionParser.isLetter(version.charAt(pos)))
-							break;
-					}
-				}
-			}
-			int len = pos - start;
-			if (len == 0 || rangeMin > len || len > rangeMax)
-				return false;
-
-			if (!isIgnored())
-				segments.add(version.substring(start, pos));
-			info.setPosition(pos);
-			return true;
-		}
-
-		void toString(StringBuffer sb) {
-			sb.append(anyChar ? 'S' : 's');
-			super.toString(sb);
-		}
-	}
-
-	private static class TreeInfo extends ArrayList {
-		private static final long serialVersionUID = 4770093863009659750L;
-
-		private static class StateInfo {
-			Fragment fragment;
-			int segmentCount;
-			int position;
-
-			StateInfo(int position, int segmentCount, Fragment fragment) {
-				this.fragment = fragment;
-				this.position = position;
-				this.segmentCount = segmentCount;
-			}
-		}
-
-		private Comparable padValue;
-		private int top;
-
-		TreeInfo(Fragment frag, int pos) {
-			add(new StateInfo(pos, 0, frag));
-			top = 0;
-		}
-
-		Comparable getPadValue() {
-			return padValue;
-		}
-
-		int getPosition() {
-			return ((StateInfo) get(top)).position;
-		}
-
-		void popState(List segments, Fragment frag) {
-			int idx = top;
-			while (idx > 0) {
-				StateInfo si = (StateInfo) get(idx);
-				if (si.fragment == frag) {
-					int nsegs = segments.size();
-					int segMax = si.segmentCount;
-					while (nsegs > segMax)
-						segments.remove(--nsegs);
-					top = idx - 1;
-					break;
-				}
-			}
-		}
-
-		void pushState(int segCount, Fragment fragment) {
-			int pos = ((StateInfo) get(top)).position;
-			if (++top == size())
-				add(new StateInfo(pos, segCount, fragment));
-			else {
-				StateInfo si = (StateInfo) get(top);
-				si.fragment = fragment;
-				si.position = pos;
-				si.segmentCount = segCount;
-			}
-		}
-
-		void setPadValue(Comparable pad) {
-			padValue = pad;
-		}
-
-		void setPosition(int pos) {
-			((StateInfo) get(top)).position = pos;
-		}
-	}
-
-	/**
-	 * The predefined OSGi format that is used when parsing OSGi
-	 * versions.
-	 */
-	public static final VersionFormat OSGI_FORMAT;
-
-	/**
-	 * The predefined OSGi format that is used when parsing raw
-	 * versions.
-	 */
-	public static final VersionFormat RAW_FORMAT;
-
-	private static final Map formatCache = Collections.synchronizedMap(new HashMap());
-
-	private static final String OSGI_FORMAT_STRING = "n[.n=0;[.n=0;[.S=[A-Za-z0-9_-];]]]"; //$NON-NLS-1$
-
-	private static final String RAW_FORMAT_STRING = "r(.r)*p?"; //$NON-NLS-1$
-
-	static {
-		try {
-			VersionFormatParser parser = new VersionFormatParser();
-			OSGI_FORMAT = new VersionFormat(parser.compile(OSGI_FORMAT_STRING, 0, OSGI_FORMAT_STRING.length()));
-			formatCache.put(OSGI_FORMAT_STRING, OSGI_FORMAT);
-			RAW_FORMAT = new RawFormat(parser.compile(RAW_FORMAT_STRING, 0, RAW_FORMAT_STRING.length()));
-			formatCache.put(RAW_FORMAT_STRING, RAW_FORMAT);
-		} catch (FormatException e) {
-			// If this happens, something is wrong with the actual
-			// implementation of the FormatCompiler.
-			//
-			throw new ExceptionInInitializerError(e);
-		}
-	}
-
-	/**
-	 * Compile a version format string into a compiled format. This method is
-	 * shorthand for:<pre>CompiledFormat.compile(format, 0, format.length())</pre>.
-	 *
-	 * @param format The format to compile.
-	 * @return The compiled format
-	 * @throws FormatException If the format could not be compiled
-	 */
-	public static VersionFormat compile(String format) throws FormatException {
-		return compile(format, 0, format.length());
-	}
-
-	/**
-	 * Compile a version format string into a compiled format. The parsing starts
-	 * at position start and ends at position end. The returned format is cached so
-	 * subsequent calls to this method using the same format string will yield the
-	 * same compiled format instance.
-	 *
-	 * @param format The format string to compile.
-	 * @param start Start position in the format string
-	 * @param end End position in the format string
-	 * @return The compiled format
-	 * @throws FormatException If the format could not be compiled
-	 */
-	public static VersionFormat compile(String format, int start, int end) throws FormatException {
-		String fmtString = format.substring(start, end).intern();
-		synchronized (fmtString) {
-			VersionFormat fmt = (VersionFormat) formatCache.get(fmtString);
-			if (fmt == null) {
-				VersionFormatParser parser = new VersionFormatParser();
-				fmt = new VersionFormat(parser.compile(format, start, end));
-				formatCache.put(fmtString, fmt);
-			}
-			return fmt;
-		}
-	}
-
-	/**
-	 * Parse a version string using the {@link #RAW_FORMAT} parser.
-	 *
-	 * @param version The version to parse.
-	 * @param originalFormat The original format to assign to the created version. Can be <code>null</code>.
-	 * @param original The original version string to assign to the created version. Can be <code>null</code>.
-	 * @return A created version
-	 * @throws IllegalArgumentException If the version string could not be parsed.
-	 */
-	static Version parseRaw(String version, VersionFormat originalFormat, String original) {
-		Comparable[] padReturn = new Comparable[1];
-		Comparable[] vector = RAW_FORMAT.parse(version, 0, version.length(), padReturn);
-		return new Version(vector, padReturn[0], originalFormat, original);
-	}
-
-	static void appendCharacterRange(StringBuffer sb, char[] range, boolean inverted) {
-		sb.append('=');
-		sb.append('[');
-		if (inverted)
-			sb.append('^');
-		int top = range.length;
-		for (int idx = 0; idx < top; ++idx) {
-			char b = range[idx];
-			if (b == '\\' || b == ']' || (b == '-' && idx + 1 < top))
-				sb.append('\\');
-
-			sb.append(b);
-			int ndx = idx + 1;
-			if (ndx + 2 < top) {
-				char c = b;
-				for (; ndx < top; ++ndx) {
-					char n = range[ndx];
-					if (c + 1 != n)
-						break;
-					c = n;
-				}
-				if (ndx <= idx + 3)
-					continue;
-
-				sb.append('-');
-				if (c == '\\' || c == ']' || (c == '-' && idx + 1 < top))
-					sb.append('\\');
-				sb.append(c);
-				idx = ndx - 1;
-			}
-		}
-		sb.append(']');
-		sb.append(';');
-	}
-
-	static Fragment createAutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-		return new AutoFragment(instr, qualifier);
-	}
-
-	static Fragment createDelimiterFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-		return new DelimiterFragment(instr, qualifier);
-	}
-
-	static Fragment createGroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
-		return new GroupFragment(instr, qualifier, fragments, array);
-	}
-
-	static Fragment createLiteralFragment(Qualifier qualifier, String literal) {
-		return new LiteralFragment(qualifier, literal);
-	}
-
-	static Fragment createNumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
-		return new NumberFragment(instr, qualifier, signed);
-	}
-
-	static Fragment createPadFragment(Qualifier qualifier) {
-		return new PadFragment(qualifier);
-	}
-
-	static Fragment createQuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-		return new QuotedFragment(instr, qualifier);
-	}
-
-	static Fragment createRawFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
-		return new RawFragment(instr, qualifier);
-	}
-
-	static Fragment createStringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean unbound) {
-		return new StringFragment(instr, qualifier, unbound);
-	}
-
-	static void toStringEscaped(StringBuffer sb, String value, String escapes) {
-		for (int idx = 0; idx < value.length(); ++idx) {
-			char c = value.charAt(idx);
-			if (c == '\\' || escapes.indexOf(c) >= 0)
-				sb.append('\\');
-			sb.append(c);
-		}
-	}
-
-	private final Fragment topFragment;
-
-	private String fmtString;
-
-	VersionFormat(Fragment topFragment) {
-		this.topFragment = topFragment;
-	}
-
-	public boolean equals(Object o) {
-		return this == o || o instanceof VersionFormat && toString().equals(o.toString());
-	}
-
-	public int hashCode() {
-		return 11 * toString().hashCode();
-	}
-
-	/**
-	 * Parse the given version string.
-	 * @param version The version string to parse.
-	 * @return A created version.
-	 * @throws IllegalArgumentException If the version string could not be parsed.
-	 */
-	public Version parse(String version) {
-		return parse(version, 0, version.length());
-	}
-
-	/**
-	 * Parse the given version string.
-	 * @param version The version string to parse.
-	 * @param start Start position in the version string
-	 * @return A created version.
-	 * @throws IllegalArgumentException If the version string could not be parsed.
-	 */
-	public Version parse(String version, int start, int maxPos) {
-		Comparable[] padReturn = new Comparable[1];
-		Comparable[] vector = parse(version, start, maxPos, padReturn);
-		return new Version(vector, padReturn[0], this, version.substring(start, maxPos));
-	}
-
-	/**
-	 * Returns the string representation of this compiled format
-	 */
-	public synchronized String toString() {
-		if (fmtString == null) {
-			StringBuffer sb = new StringBuffer();
-			toString(sb);
-		}
-		return fmtString;
-	}
-
-	/**
-	 * Appends the string representation of this compiled format to
-	 * the given StringBuffer.
-	 * @param sb The buffer that will receive the string representation
-	 */
-	public synchronized void toString(StringBuffer sb) {
-		if (fmtString != null)
-			sb.append(fmtString);
-		else {
-			int start = sb.length();
-			sb.append("format"); //$NON-NLS-1$
-			if (topFragment.getPadValue() != null) {
-				sb.append('(');
-				topFragment.toString(sb);
-				sb.append(')');
-			} else
-				topFragment.toString(sb);
-			fmtString = sb.substring(start);
-		}
-	}
-
-	TreeInfo createInfo(int start) {
-		return new TreeInfo(topFragment, start);
-	}
-
-	Comparable[] parse(String version, int start, int maxPos, Comparable[] padReturn) {
-		ArrayList entries = new ArrayList();
-		if (start == maxPos)
-			throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_empty_version, this, version.substring(start, maxPos)));
-		TreeInfo info = new TreeInfo(topFragment, start);
-		if (!(topFragment.parse(entries, version, maxPos, info) && info.getPosition() == maxPos))
-			throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_1, this, version.substring(start, maxPos)));
-		Comparable pad = info.getPadValue();
-		VersionParser.removeRedundantTrail(entries, pad);
-		padReturn[0] = pad;
-		return (Comparable[]) entries.toArray(new Comparable[entries.size()]);
-	}
-
-	// Preserve cache during deserialization
-	private Object readResolve() {
-		synchronized (formatCache) {
-			String string = toString();
-			VersionFormat fmt = (VersionFormat) formatCache.put(string, this);
-			if (fmt == null)
-				fmt = this;
-			else
-				// Put old format back
-				formatCache.put(string, fmt);
-			return fmt;
-		}
-	}
-}
-
-class RawFormat extends VersionFormat {
-	private static final long serialVersionUID = 8851695938450999819L;
-
-	RawFormat(Fragment topFragment) {
-		super(topFragment);
-	}
-
-	/**
-	 * Parse but do not assign this format as the Version format nor the version
-	 * string as the original.
-	 */
-	public Version parse(String version, int start, int maxPos) {
-		Comparable[] padReturn = new Comparable[1];
-		Comparable[] vector = parse(version, start, maxPos, padReturn);
-		return new Version(vector, padReturn[0], null, null);
-	}
-
-	// Preserve singleton when deserialized
-	private Object readResolve() {
-		return RAW_FORMAT;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormatParser.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormatParser.java
deleted file mode 100644
index 4a31345..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionFormatParser.java
+++ /dev/null
@@ -1,528 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This is the Omni Version Format parser. It will parse a version format in string form
- * into a group of {@link VersionFormat.Fragment} elements. That group, wrapped in a
- * {@link VersionFormat}, becomes the parser for versions corresponding to the format.
- *
- * The class is not intended to included in a public API. Instead VersionFormats should
- * be created using {@link VersionFormat#parse(String)}
- *
- */
-class VersionFormatParser {
-
-	static class Instructions {
-		char[] characters = null;
-		Comparable defaultValue = null;
-		boolean ignore = false;
-		boolean inverted = false;
-		Comparable padValue = null;
-		int rangeMax = Integer.MAX_VALUE;
-		int rangeMin = 0;
-	}
-
-	static final VersionFormat.Qualifier EXACT_ONE_QUALIFIER = new VersionFormat.Qualifier(1, 1);
-
-	static final VersionFormat.Qualifier ONE_OR_MANY_QUALIFIER = new VersionFormat.Qualifier(1, Integer.MAX_VALUE);
-
-	static final VersionFormat.Qualifier ZERO_OR_MANY_QUALIFIER = new VersionFormat.Qualifier(0, Integer.MAX_VALUE);
-
-	static final VersionFormat.Qualifier ZERO_OR_ONE_QUALIFIER = new VersionFormat.Qualifier(0, 1);
-
-	private int current;
-
-	private List currentList;
-
-	private int eos;
-
-	private String format;
-
-	private int start;
-
-	VersionFormat.Fragment compile(String fmt, int pos, int maxPos) throws FormatException {
-		format = fmt;
-		if (start >= maxPos)
-			throw new FormatException(Messages.format_is_empty);
-
-		start = pos;
-		current = pos;
-		eos = maxPos;
-		currentList = new ArrayList();
-		while (current < eos)
-			parseFragment();
-
-		VersionFormat.Fragment topFrag;
-		switch (currentList.size()) {
-			case 0 :
-				throw new FormatException(Messages.format_is_empty);
-			case 1 :
-				VersionFormat.Fragment frag = (VersionFormat.Fragment) currentList.get(0);
-				if (frag.isGroup()) {
-					topFrag = frag;
-					break;
-				}
-				// Fall through to default
-			default :
-				topFrag = VersionFormat.createGroupFragment(null, EXACT_ONE_QUALIFIER, (VersionFormat.Fragment[]) currentList.toArray(new VersionFormat.Fragment[currentList.size()]), false);
-		}
-		currentList = null;
-		return topFrag;
-	}
-
-	private void assertChar(char expected) throws FormatException {
-		if (current >= eos)
-			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, new String(new char[] {expected})));
-
-		char c = format.charAt(current);
-		if (c != expected)
-			throw formatException(c, new String(new char[] {expected}));
-		++current;
-	}
-
-	private FormatException formatException(char found, String expected) {
-		return formatException(new String(new char[] {found}), expected);
-	}
-
-	private FormatException formatException(String message) {
-		return new FormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), new Integer(current), message}));
-	}
-
-	private FormatException formatException(String found, String expected) {
-		return new FormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), new Integer(current), found, expected}));
-	}
-
-	private FormatException illegalControlCharacter(char c) {
-		return formatException(NLS.bind(Messages.illegal_character_encountered_ascii_0, Version.valueOf(c)));
-	}
-
-	private String parseAndConsiderEscapeUntil(char endChar) throws FormatException {
-		StringBuffer sb = new StringBuffer();
-		while (current < eos) {
-			char c = format.charAt(current++);
-			if (c == endChar)
-				break;
-
-			if (c < 32)
-				throw illegalControlCharacter(c);
-
-			if (c == '\\') {
-				if (current == eos)
-					throw formatException(Messages.EOS_after_escape);
-				c = format.charAt(current++);
-				if (c < 32)
-					throw illegalControlCharacter(c);
-			}
-			sb.append(c);
-		}
-		return sb.toString();
-	}
-
-	private void parseAuto() throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.padValue != null)
-				throw formatException(Messages.auto_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createAutoFragment(ep, parseQualifier()));
-	}
-
-	private void parseBracketGroup() throws FormatException {
-		List saveList = currentList;
-		currentList = new ArrayList();
-		while (current < eos && format.charAt(current) != ']')
-			parseFragment();
-
-		if (current == eos)
-			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "]")); //$NON-NLS-1$
-
-		++current;
-		VersionFormatParser.Instructions ep = parseProcessing();
-		saveList.add(VersionFormat.createGroupFragment(ep, ZERO_OR_ONE_QUALIFIER, (VersionFormat.Fragment[]) currentList.toArray(new VersionFormat.Fragment[currentList.size()]), false));
-		currentList = saveList;
-	}
-
-	private void parseCharacterGroup(VersionFormatParser.Instructions ep) throws FormatException {
-		assertChar('[');
-
-		StringBuffer sb = new StringBuffer();
-		outer: for (; current < eos; ++current) {
-			char c = format.charAt(current);
-			switch (c) {
-				case '\\' :
-					if (current + 1 < eos) {
-						sb.append(format.charAt(++current));
-						continue;
-					}
-					throw formatException(Messages.premature_end_of_format);
-				case '^' :
-					if (sb.length() == 0)
-						ep.inverted = true;
-					else
-						sb.append(c);
-					continue;
-				case ']' :
-					break outer;
-				case '-' :
-					if (sb.length() > 0 && current + 1 < eos) {
-						char rangeEnd = format.charAt(++current);
-						if (rangeEnd == ']') {
-							// Use dash verbatim when last in range
-							sb.append(c);
-							break outer;
-						}
-
-						char rangeStart = sb.charAt(sb.length() - 1);
-						if (rangeEnd < rangeStart)
-							throw formatException(Messages.negative_character_range);
-						while (++rangeStart <= rangeEnd)
-							sb.append(rangeStart);
-						continue;
-					}
-					// Fall through to default
-				default :
-					if (c < 32)
-						throw illegalControlCharacter(c);
-					sb.append(c);
-			}
-		}
-		assertChar(']');
-		int top = sb.length();
-		char[] chars = new char[top];
-		sb.getChars(0, top, chars, 0);
-		ep.characters = chars;
-	}
-
-	private void parseDelimiter() throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.rangeMin != 0 || ep.rangeMax != Integer.MAX_VALUE)
-				throw formatException(Messages.delimiter_can_not_have_range);
-			if (ep.ignore)
-				throw formatException(Messages.delimiter_can_not_be_ignored);
-			if (ep.defaultValue != null)
-				throw formatException(Messages.delimiter_can_not_have_default_value);
-			if (ep.padValue != null)
-				throw formatException(Messages.delimiter_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createDelimiterFragment(ep, parseQualifier()));
-	}
-
-	private void parseFragment() throws FormatException {
-		if (current == eos)
-			throw formatException(Messages.premature_end_of_format);
-		char c = format.charAt(current++);
-		switch (c) {
-			case '(' :
-				parseGroup(false);
-				break;
-			case '<' :
-				parseGroup(true);
-				break;
-			case '[' :
-				parseBracketGroup();
-				break;
-			case 'a' :
-				parseAuto();
-				break;
-			case 'r' :
-				parseRaw();
-				break;
-			case 'n' :
-				parseNumber(false);
-				break;
-			case 'N' :
-				parseNumber(true);
-				break;
-			case 's' :
-				parseString(false);
-				break;
-			case 'S' :
-				parseString(true);
-				break;
-			case 'd' :
-				parseDelimiter();
-				break;
-			case 'q' :
-				parseQuotedString();
-				break;
-			case 'p' :
-				parsePad();
-				break;
-			default :
-				parseLiteral(c);
-		}
-	}
-
-	private void parseGroup(boolean array) throws FormatException {
-		List saveList = currentList;
-		currentList = new ArrayList();
-		char expectedEnd = array ? '>' : ')';
-		while (current < eos && format.charAt(current) != expectedEnd)
-			parseFragment();
-		assertChar(expectedEnd);
-
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.characters != null)
-				throw formatException(Messages.array_can_not_have_character_group);
-			if (ep.rangeMax != Integer.MAX_VALUE && ep.padValue != null) {
-				throw formatException(Messages.cannot_combine_range_upper_bound_with_pad_value);
-			}
-		}
-
-		if (currentList.isEmpty())
-			throw formatException(array ? Messages.array_can_not_be_empty : Messages.group_can_not_be_empty);
-		saveList.add(VersionFormat.createGroupFragment(ep, parseQualifier(), (VersionFormat.Fragment[]) currentList.toArray(new VersionFormat.Fragment[currentList.size()]), array));
-		currentList = saveList;
-	}
-
-	private int parseIntegerLiteral() throws FormatException {
-		if (current == eos)
-			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "<integer>")); //$NON-NLS-1$
-
-		char c = format.charAt(current);
-		if (!VersionParser.isDigit(c))
-			throw formatException(c, "<integer>"); //$NON-NLS-1$
-
-		int value = c - '0';
-		while (++current < eos) {
-			c = format.charAt(current);
-			if (!VersionParser.isDigit(c))
-				break;
-			value *= 10;
-			value += (c - '0');
-		}
-		return value;
-	}
-
-	private void parseLiteral(char c) throws FormatException {
-		String value;
-		switch (c) {
-			case '\'' :
-				value = parseAndConsiderEscapeUntil(c);
-				break;
-			case ')' :
-			case ']' :
-			case '{' :
-			case '}' :
-			case '?' :
-			case '*' :
-				throw formatException(c, "<literal>"); //$NON-NLS-1$
-			default :
-				if (VersionParser.isLetterOrDigit(c))
-					throw formatException(c, "<literal>"); //$NON-NLS-1$
-
-				if (c < 32)
-					throw illegalControlCharacter(c);
-
-				if (c == '\\') {
-					if (current == eos)
-						throw formatException(Messages.EOS_after_escape);
-					c = format.charAt(current++);
-					if (c < 32)
-						throw illegalControlCharacter(c);
-				}
-				value = new String(new char[] {c});
-		}
-		currentList.add(VersionFormat.createLiteralFragment(parseQualifier(), value));
-	}
-
-	private int[] parseMinMax() throws FormatException {
-
-		int max = Integer.MAX_VALUE;
-		++current;
-		int min = parseIntegerLiteral();
-		char c = format.charAt(current);
-		if (c == '}') {
-			max = min;
-			if (max == 0)
-				throw formatException(Messages.range_max_cannot_be_zero);
-			++current;
-		} else if (c == ',' && current + 1 < eos) {
-			if (format.charAt(++current) != '}') {
-				max = parseIntegerLiteral();
-				if (max == 0)
-					throw formatException(Messages.range_max_cannot_be_zero);
-				if (max < min)
-					throw formatException(Messages.range_max_cannot_be_less_then_range_min);
-			}
-			assertChar('}');
-		} else
-			throw formatException(c, "},"); //$NON-NLS-1$
-		return new int[] {min, max};
-	}
-
-	private void parseNumber(boolean signed) throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.padValue != null)
-				throw formatException(Messages.number_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createNumberFragment(ep, parseQualifier(), signed));
-	}
-
-	private void parsePad() throws FormatException {
-		currentList.add(VersionFormat.createPadFragment(parseQualifier()));
-	}
-
-	private VersionFormatParser.Instructions parseProcessing() throws FormatException {
-		if (current >= eos)
-			return null;
-
-		char c = format.charAt(current);
-		if (c != '=')
-			return null;
-
-		VersionFormatParser.Instructions ep = new VersionFormatParser.Instructions();
-		do {
-			current++;
-			parseProcessingInstruction(ep);
-		} while (current < eos && format.charAt(current) == '=');
-		return ep;
-	}
-
-	private void parseProcessingInstruction(VersionFormatParser.Instructions processing) throws FormatException {
-		if (current == eos)
-			throw formatException(Messages.premature_end_of_format);
-
-		char c = format.charAt(current);
-		if (c == 'p') {
-			// =pad(<raw-element>);
-			//
-			if (processing.padValue != null)
-				throw formatException(Messages.pad_defined_more_then_once);
-			if (processing.ignore)
-				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
-			++current;
-			processing.padValue = parseRawElement();
-		} else if (c == '!') {
-			// =ignore;
-			//
-			if (processing.ignore)
-				throw formatException(Messages.ignore_defined_more_then_once);
-			if (processing.padValue != null || processing.characters != null || processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE || processing.defaultValue != null)
-				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
-			++current;
-			processing.ignore = true;
-		} else if (c == '[') {
-			// =[<character group];
-			//
-			if (processing.characters != null)
-				throw formatException(Messages.character_group_defined_more_then_once);
-			if (processing.ignore)
-				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
-			parseCharacterGroup(processing);
-		} else if (c == '{') {
-			// ={min,max};
-			//
-			if (processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE)
-				throw formatException(Messages.range_defined_more_then_once);
-			if (processing.ignore)
-				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
-			int[] minMax = parseMinMax();
-			processing.rangeMin = minMax[0];
-			processing.rangeMax = minMax[1];
-		} else {
-			// =<raw-element>;
-			if (processing.defaultValue != null)
-				throw formatException(Messages.default_defined_more_then_once);
-			if (processing.ignore)
-				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
-			processing.defaultValue = parseRawElement();
-		}
-		assertChar(';');
-	}
-
-	private VersionFormat.Qualifier parseQualifier() throws FormatException {
-		if (current >= eos)
-			return EXACT_ONE_QUALIFIER;
-
-		char c = format.charAt(current);
-		if (c == '?') {
-			++current;
-			return ZERO_OR_ONE_QUALIFIER;
-		}
-
-		if (c == '*') {
-			++current;
-			return ZERO_OR_MANY_QUALIFIER;
-		}
-
-		if (c == '+') {
-			++current;
-			return ONE_OR_MANY_QUALIFIER;
-		}
-
-		if (c != '{')
-			return EXACT_ONE_QUALIFIER;
-
-		int[] minMax = parseMinMax();
-		int min = minMax[0];
-		int max = minMax[1];
-
-		// Use singletons for commonly used ranges
-		//
-		if (min == 0) {
-			if (max == 1)
-				return ZERO_OR_ONE_QUALIFIER;
-			if (max == Integer.MAX_VALUE)
-				return ZERO_OR_MANY_QUALIFIER;
-		} else if (min == 1) {
-			if (max == 1)
-				return EXACT_ONE_QUALIFIER;
-			if (max == Integer.MAX_VALUE)
-				return ONE_OR_MANY_QUALIFIER;
-		}
-		return new VersionFormat.Qualifier(min, max);
-	}
-
-	private void parseQuotedString() throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.padValue != null)
-				throw formatException(Messages.string_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createQuotedFragment(ep, parseQualifier()));
-	}
-
-	private void parseRaw() throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.padValue != null)
-				throw formatException(Messages.raw_element_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createRawFragment(ep, parseQualifier()));
-	}
-
-	private Comparable parseRawElement() throws FormatException {
-		int[] position = new int[] {current};
-		Comparable v = VersionParser.parseRawElement(format, position, eos);
-		if (v == null)
-			throw new FormatException(NLS.bind(Messages.raw_element_expected_0, format));
-		current = position[0];
-		return v;
-	}
-
-	private void parseString(boolean unlimited) throws FormatException {
-		VersionFormatParser.Instructions ep = parseProcessing();
-		if (ep != null) {
-			if (ep.padValue != null)
-				throw formatException(Messages.string_can_not_have_pad_value);
-		}
-		currentList.add(VersionFormat.createStringFragment(ep, parseQualifier(), unlimited));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionParser.java
deleted file mode 100644
index 98560bf..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionParser.java
+++ /dev/null
@@ -1,364 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The Omni Version parser. Not intended for public API. Instead use
- * {@link Version#Version(String)} or {@link Version#parseVersion(String)}.
- *
- * The class also contains some general purpose parser support methods
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-abstract class VersionParser {
-	static void removeRedundantTrail(List segments, Comparable padValue) {
-		Comparable redundantTrail = padValue == null ? VersionVector.MIN_VALUE : padValue;
-		int idx = segments.size();
-		while (--idx >= 0 && segments.get(idx).equals(redundantTrail))
-			segments.remove(idx);
-	}
-
-	static final String RAW_PREFIX = "raw:"; //$NON-NLS-1$
-
-	private VersionParser() {
-		// Prevent class from being instantiated
-	}
-
-	/**
-	 * Parse the <code>version</code> string and assing the parsed portions to the <code>receiver</code>.
-	 * This method is called from the version string constructor.
-	 *
-	 * @param version The string to be parsed
-	 * @param start Start position in the <code>version</code> string
-	 * @param maxPos End position in the <code>version</code> string
-	 * @param receiver The version to be filled in
-	 * @returns <code>true</code> if a version indeed was parsed or <code>false</code> if the string
-	 * contained only whitespace.
-	 * @throws IllegalArgumentException if the version is malformed
-	 */
-	static boolean parseInto(String version, int start, int maxPos, Version receiver) throws IllegalArgumentException {
-		// trim leading and trailing whitespace
-		int pos = skipWhite(version, start);
-		maxPos = skipTrailingWhite(version, start, maxPos);
-		if (pos == maxPos)
-			return false;
-
-		Comparable[] padReturn = new Comparable[1];
-		Comparable[] vector = null;
-		Comparable pad = null;
-		VersionFormat fmt = null;
-		char c = version.charAt(pos);
-		if (isDigit(c)) {
-			fmt = VersionFormat.OSGI_FORMAT;
-			vector = fmt.parse(version, pos, maxPos, padReturn);
-			receiver.init(vector, padReturn[0], fmt, version);
-			return true;
-		}
-
-		if (!isLetter(c))
-			throw new IllegalArgumentException();
-
-		if (version.startsWith(RAW_PREFIX, pos)) {
-			VersionFormat rawFmt = VersionFormat.RAW_FORMAT;
-			pos += 4;
-
-			// Find ending '/' that is neither quoted or escaped
-			int end = maxPos;
-			for (int idx = pos; idx < maxPos; ++idx) {
-				c = version.charAt(idx);
-				switch (c) {
-					case '/' :
-						end = idx;
-						break;
-					case '\\' :
-						++idx;
-						continue;
-					case '\'' :
-					case '"' :
-						for (++idx; idx < maxPos; ++idx) {
-							char e = version.charAt(idx);
-							if (e == c) {
-								break;
-							}
-							if (e == '\\')
-								++idx;
-						}
-						// fall through to default
-					default :
-						continue;
-				}
-				break;
-			}
-
-			vector = rawFmt.parse(version, pos, end, padReturn);
-			pad = padReturn[0];
-			pos = end;
-			if (pos == maxPos) {
-				// This was a pure raw version
-				//
-				receiver.init(vector, pad, null, null);
-				return true;
-			}
-
-			if (version.charAt(pos) != '/')
-				throw new IllegalArgumentException(NLS.bind(Messages.expected_slash_after_raw_vector_0, version.substring(start, maxPos)));
-			++pos;
-
-			if (pos == maxPos)
-				throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_slash_0, version.substring(start, maxPos)));
-		}
-
-		if (version.startsWith("format(", pos)) { //$NON-NLS-1$
-			// Parse the format
-			//
-			pos += 7;
-			try {
-				// Find matching ')' that is neither quoted or escaped
-				//
-				int end = findEndOfFormat(version, pos, maxPos);
-				fmt = VersionFormat.compile(version, pos, end);
-				pos = end + 1;
-			} catch (FormatException e) {
-				throw new IllegalArgumentException(e.getMessage());
-			}
-			if (pos == maxPos) {
-				// This was a raw version with format but no original
-				//
-				if (vector == null)
-					throw new IllegalArgumentException(NLS.bind(Messages.only_format_specified_0, version.substring(start, maxPos)));
-				receiver.init(vector, pad, fmt, null);
-				return true;
-			}
-		}
-
-		if (fmt == null && vector == null)
-			throw new IllegalArgumentException(NLS.bind(Messages.neither_raw_vector_nor_format_specified_0, version.substring(start, maxPos)));
-
-		if (version.charAt(pos) != ':')
-			throw new IllegalArgumentException(NLS.bind(Messages.colon_expected_before_original_version_0, version.substring(start, maxPos)));
-
-		pos++;
-		if (pos == maxPos)
-			throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_colon_0, version.substring(start, maxPos)));
-
-		if (vector == null) {
-			// Vector and pad must be created by parsing the original
-			//
-			vector = fmt.parse(version, pos, maxPos, padReturn);
-			pad = padReturn[0];
-		}
-		receiver.init(vector, pad, fmt, version.substring(pos));
-		return true;
-	}
-
-	static boolean isDigit(char c) {
-		return c >= '0' && c <= '9';
-	}
-
-	static boolean isLetter(char c) {
-		return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
-	}
-
-	static boolean isLetterOrDigit(char c) {
-		return isDigit(c) || isLetter(c);
-	}
-
-	static int findEndOfFormat(String string, int pos, int maxPos) {
-		int end = -1;
-		int depth = 1;
-		for (int idx = pos; idx < maxPos; ++idx) {
-			char c = string.charAt(idx);
-			switch (c) {
-				case ')' :
-					if (--depth == 0) {
-						end = idx;
-						break;
-					}
-					continue;
-				case '(' :
-					++depth;
-					continue;
-				case '\\' :
-					++idx;
-					continue;
-				case '\'' :
-				case '"' :
-					for (++idx; idx < maxPos; ++idx) {
-						char e = string.charAt(idx);
-						if (e == c) {
-							break;
-						}
-						if (e == '\\')
-							++idx;
-					}
-					// fall through to default
-				default :
-					continue;
-			}
-			break;
-		}
-		if (depth != 0)
-			throw new IllegalArgumentException(NLS.bind(Messages.unbalanced_format_parenthesis, string.substring(pos - 1, maxPos)));
-		return end;
-	}
-
-	static Comparable parseRawElement(String value, int[] position, int maxPos) {
-		int current = position[0];
-		if (current >= maxPos)
-			return null;
-
-		boolean negate = false;
-		char c = value.charAt(current);
-		Comparable v;
-		switch (c) {
-			case '\'' :
-			case '"' : {
-				StringBuffer sb = new StringBuffer();
-				for (;;) {
-					char q = c;
-					if (++current == maxPos)
-						return null;
-					c = value.charAt(current);
-					while (c != q) {
-						if (c < 32)
-							return null;
-						sb.append(c);
-						if (++current == maxPos)
-							return null;
-						c = value.charAt(current);
-					}
-					if (++current == maxPos)
-						break;
-					c = value.charAt(current);
-					if (c != '\'' && c != '"')
-						break;
-				}
-				v = sb.toString();
-				break;
-			}
-			case '<' : {
-				if (++current == maxPos)
-					return null;
-
-				position[0] = current;
-				v = parseRawVector(value, position, maxPos);
-				if (v == null)
-					return null;
-				current = position[0];
-				break;
-			}
-			case 'm' :
-				v = VersionVector.MAXS_VALUE;
-				++current;
-				break;
-			case 'M' :
-				v = VersionVector.MAX_VALUE;
-				++current;
-				break;
-			case '-' :
-				if (++current >= maxPos)
-					return null;
-
-				c = value.charAt(current);
-				if (c == 'M') {
-					++current;
-					v = VersionVector.MIN_VALUE;
-					break;
-				}
-				negate = true;
-				// Fall through to default
-			default : {
-				if (isDigit(c)) {
-					int start = current++;
-					while (current < maxPos && isDigit(value.charAt(current)))
-						++current;
-					int val = Integer.parseInt(value.substring(start, current));
-					if (negate)
-						val = -val;
-					v = Version.valueOf(val);
-					break;
-				}
-				return null;
-			}
-		}
-		position[0] = current;
-		return v;
-	}
-
-	private static Comparable parseRawVector(String value, int[] position, int maxPos) {
-		int pos = position[0];
-		if (pos >= maxPos)
-			return null;
-
-		char c = value.charAt(pos);
-		if (c == '>')
-			return null;
-
-		ArrayList rawList = new ArrayList();
-		boolean padMarkerSeen = (c == 'p');
-		if (padMarkerSeen) {
-			if (++pos >= maxPos)
-				return null;
-			position[0] = pos;
-		}
-
-		Comparable pad = null;
-		for (;;) {
-			Comparable elem = parseRawElement(value, position, maxPos);
-			if (elem == null)
-				return null;
-
-			if (padMarkerSeen)
-				pad = elem;
-			else
-				rawList.add(elem);
-
-			pos = position[0];
-			if (pos >= maxPos)
-				return null;
-
-			c = value.charAt(pos);
-			position[0] = ++pos;
-			if (c == '>')
-				break;
-
-			if (padMarkerSeen || pos >= maxPos)
-				return null;
-
-			if (c == 'p') {
-				padMarkerSeen = true;
-				continue;
-			}
-
-			if (c != '.')
-				return null;
-		}
-		removeRedundantTrail(rawList, pad);
-		return new VersionVector((Comparable[]) rawList.toArray(new Comparable[rawList.size()]), pad);
-	}
-
-	static int skipWhite(String string, int pos) {
-		int top = string.length();
-		while (pos < top && string.charAt(pos) <= ' ')
-			++pos;
-		return pos;
-	}
-
-	static int skipTrailingWhite(String string, int start, int end) {
-		while (end > start && string.charAt(end - 1) <= ' ')
-			--end;
-		return end;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionRange.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionRange.java
deleted file mode 100644
index 3b83816..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionRange.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Cloudsmith Inc - rewrite to handle non-OSGi versions.
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.io.Serializable;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class represents a version range with Omni Version bounds. It is signature
- * equivalent with the OSGi {@link org.eclipse.osgi.service.resolver.VersionRange VersionRange}
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VersionRange implements Serializable {
-	private static final long serialVersionUID = 4988030307298088028L;
-
-	static final Version OSGi_versionMin = new Version(0, 0, 0);
-	static final Version OSGi_versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
-	/**
-	 * TODO: This should not be OSGi but it has to be that for now since the resolver creates
-	 * a filter where the min and max are converted into strings. When the filter is evaluated an
-	 * attempt is made to recreate them as OSGi versions.
-	 *
-	 * An empty OSGi Version range.
-	 */
-	public static final VersionRange emptyRange = new VersionRange(OSGi_versionMin, true, OSGi_versionMax, true);
-
-	private final Version minVersion;
-	private final boolean includeMin;
-	private final Version maxVersion;
-	private final boolean includeMax;
-
-	private static int copyEscaped(String vr, int pos, String breakChars, StringBuffer sb) {
-		int top = vr.length();
-		pos = VersionParser.skipWhite(vr, pos);
-		if (pos >= top)
-			throw new IllegalArgumentException();
-
-		char c = vr.charAt(pos);
-		for (;;) {
-			if (c == '\\' && ++pos < top)
-				c = vr.charAt(pos);
-			else {
-				if (c <= ' ')
-					return VersionParser.skipWhite(vr, pos);
-				if (breakChars != null && breakChars.indexOf(c) >= 0)
-					break;
-			}
-			sb.append(c);
-			if (++pos >= top)
-				break;
-			c = vr.charAt(pos);
-		}
-		return pos;
-	}
-
-	/**
-	 * Constructs a VersionRange with the specified minVersion and maxVersion.
-	 * @param minVersion the minimum version of the range
-	 * @param maxVersion the maximum version of the range
-	 */
-	public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
-		if (minVersion == null) {
-			if (maxVersion == null) {
-				// For backward compatibility with the OSGi version version range
-				minVersion = OSGi_versionMin;
-				maxVersion = OSGi_versionMax;
-			} else
-				minVersion = maxVersion.getFormat() == VersionFormat.OSGI_FORMAT ? OSGi_versionMin : Version.MIN_VERSION;
-		} else {
-			if (maxVersion == null)
-				maxVersion = minVersion.getFormat() == VersionFormat.OSGI_FORMAT ? OSGi_versionMax : Version.MAX_VERSION;
-			else {
-				if (minVersion != maxVersion && minVersion.equals(maxVersion))
-					maxVersion = minVersion;
-				else if (!(minVersion.getFormat() == null ? maxVersion.getFormat() == null : minVersion.getFormat().equals(maxVersion.getFormat()))) {
-					// We always allow the MIN and MAX boundaries but if the other end is OSGi, then they too must be OSGi
-					if (minVersion.equals(Version.MIN_VERSION)) {
-						if (maxVersion.getFormat() == VersionFormat.OSGI_FORMAT)
-							minVersion = OSGi_versionMin;
-					} else if (maxVersion.equals(Version.MAX_VERSION)) {
-						if (minVersion.getFormat() == VersionFormat.OSGI_FORMAT)
-							maxVersion = OSGi_versionMax;
-					} else
-						throw new IllegalArgumentException(NLS.bind(Messages.range_boundaries_0_and_1_cannot_have_different_formats, minVersion, maxVersion));
-				}
-			}
-		}
-		this.minVersion = minVersion;
-		this.includeMin = includeMin;
-		this.maxVersion = maxVersion;
-		this.includeMax = includeMax;
-		validateRange();
-	}
-
-	/**
-	 * Constructs a VersionRange from the given versionRange String.
-	 * @param versionRange a version range String that specifies a range of
-	 * versions.
-	 */
-	public VersionRange(String versionRange) {
-		int top = 0;
-		int pos = 0;
-		if (versionRange != null) {
-			top = versionRange.length();
-			pos = VersionParser.skipWhite(versionRange, 0);
-			top = VersionParser.skipTrailingWhite(versionRange, pos, top);
-		}
-
-		if (pos >= top) {
-			minVersion = OSGi_versionMin;
-			includeMin = true;
-			maxVersion = OSGi_versionMax;
-			includeMax = true;
-			return;
-		}
-
-		char c = versionRange.charAt(pos);
-		int[] position = new int[1];
-		boolean rawPrefix = false;
-		VersionFormat fmt = null;
-		if (VersionParser.isLetter(c)) {
-			if (versionRange.startsWith("raw:", pos)) { //$NON-NLS-1$
-				rawPrefix = true;
-				pos += 4;
-			} else {
-				position[0] = pos;
-				fmt = parseFormat(versionRange, position);
-				pos = position[0];
-				if (pos >= versionRange.length())
-					throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
-
-				c = versionRange.charAt(pos);
-				if (c != ':')
-					throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
-				++pos;
-			}
-			pos = VersionParser.skipWhite(versionRange, pos);
-			if (pos >= top)
-				throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
-			c = versionRange.charAt(pos);
-		} else
-			fmt = VersionFormat.OSGI_FORMAT;
-
-		String minStr;
-		String maxStr;
-		StringBuffer sb = new StringBuffer();
-		if (c == '[' || c == '(') {
-			includeMin = (c == '[');
-			pos = copyEscaped(versionRange, ++pos, ",)]", sb); //$NON-NLS-1$
-			if (pos >= top)
-				throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
-			c = versionRange.charAt(pos++);
-			if (c != ',')
-				throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
-
-			minStr = sb.toString();
-			sb.setLength(0);
-			pos = copyEscaped(versionRange, pos, ")]", sb); //$NON-NLS-1$
-			if (pos >= top)
-				throw new IllegalArgumentException();
-			maxStr = sb.toString();
-
-			c = versionRange.charAt(pos++);
-			includeMax = (c == ']');
-		} else {
-			StringBuffer sbMin = new StringBuffer();
-			pos = copyEscaped(versionRange, pos, rawPrefix ? "/" : null, sbMin); //$NON-NLS-1$
-			includeMin = includeMax = true;
-			minStr = sbMin.toString();
-			maxStr = null;
-		}
-
-		if (rawPrefix) {
-			String origMin = null;
-			String origMax = null;
-			pos = VersionParser.skipWhite(versionRange, pos);
-			if (pos < top && versionRange.charAt(pos) == '/') {
-				if (++pos == top)
-					throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
-				position[0] = pos;
-				fmt = parseFormat(versionRange, position);
-				pos = VersionParser.skipWhite(versionRange, position[0]);
-				if (pos < top) {
-					boolean origUseIncDelims = false;
-					c = versionRange.charAt(pos);
-					if (c != ':')
-						throw new IllegalArgumentException(NLS.bind(Messages.original_must_start_with_colon_0, versionRange));
-
-					pos = VersionParser.skipWhite(versionRange, ++pos);
-					if (pos == top)
-						throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
-
-					c = versionRange.charAt(pos);
-					if (c == '[' || c == '(') {
-						if (includeMin != (c == '[') || maxStr == null)
-							throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
-						pos = VersionParser.skipWhite(versionRange, ++pos);
-						origUseIncDelims = true;
-					}
-
-					sb.setLength(0);
-					if (maxStr == null) {
-						copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
-						origMin = sb.toString();
-					} else {
-						pos = copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
-						if (pos >= top)
-							throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
-						c = versionRange.charAt(pos++);
-						if (c != ',')
-							throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
-						origMin = sb.toString();
-
-						sb.setLength(0);
-						pos = copyEscaped(versionRange, pos, "])", sb); //$NON-NLS-1$
-						if (origUseIncDelims) {
-							if (pos >= top)
-								throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
-							c = versionRange.charAt(pos++);
-							if (includeMax != (c == ']'))
-								throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
-						}
-						origMax = sb.toString();
-					}
-				}
-			}
-			Version minV = VersionFormat.parseRaw(minStr, fmt, origMin);
-
-			// We might have parsed the Version.MIN_VERSION. If so, replace it. The format is incorrect.
-			//
-			boolean isOSGi = (fmt == VersionFormat.OSGI_FORMAT);
-			boolean isMinMin = (minV.getVector().length == 0 && minV.getPad() == null);
-			minVersion = isMinMin ? (isOSGi ? OSGi_versionMin : Version.MIN_VERSION) : minV;
-
-			if (maxStr != null) {
-				if (maxStr.equals(minStr))
-					maxVersion = minV;
-				else {
-					Version maxV = VersionFormat.parseRaw(maxStr, fmt, origMax);
-					Comparable[] maxVector = maxV.getVector();
-
-					// We might have parsed the Version.MAX_VERSION. If so, replace it. The format is incorrect.
-					//
-					boolean isMaxMax = (maxVector.length == 0 && maxV.getPad() == VersionVector.MAX_VALUE);
-					maxVersion = isMaxMax ? (isOSGi ? OSGi_versionMax : Version.MAX_VERSION) : maxV;
-				}
-			} else
-				maxVersion = (fmt == VersionFormat.OSGI_FORMAT ? OSGi_versionMax : Version.MAX_VERSION);
-		} else {
-			if (fmt == null)
-				fmt = VersionFormat.OSGI_FORMAT;
-			minVersion = fmt.parse(minStr);
-			if (maxStr != null) {
-				if (maxStr.equals(minStr))
-					maxVersion = minVersion;
-				else
-					maxVersion = fmt.parse(maxStr);
-			} else {
-				maxVersion = (fmt == VersionFormat.OSGI_FORMAT) ? OSGi_versionMax : Version.MAX_VERSION;
-			}
-		}
-		validateRange();
-	}
-
-	private static VersionFormat parseFormat(String versionRange, int[] position) {
-		int pos = VersionParser.skipWhite(versionRange, position[0]);
-		if (!versionRange.startsWith("format(", pos)) //$NON-NLS-1$
-			return null;
-
-		pos += 7;
-		int end = VersionParser.findEndOfFormat(versionRange, pos, versionRange.length());
-		try {
-			position[0] = end + 1;
-			return VersionFormat.compile(versionRange, pos, end);
-		} catch (FormatException e) {
-			throw new IllegalArgumentException(e.getMessage());
-		}
-	}
-
-	/**
-	 * Returns the version format.
-	 */
-	public VersionFormat getFormat() {
-		return minVersion.equals(Version.MIN_VERSION) ? maxVersion.getFormat() : minVersion.getFormat();
-	}
-
-	/**
-	 * Returns the minimum Version of this VersionRange
-	 * @return the minimum Version of this VersionRange
-	 */
-	public Version getMinimum() {
-		return minVersion;
-	}
-
-	/**
-	 * Indicates if the minimum version is included in the version range.
-	 * @return true if the minimum version is included in the version range;
-	 * otherwise false is returned
-	 */
-	public boolean getIncludeMinimum() {
-		return includeMin;
-	}
-
-	/**
-	 * Returns the maximum Version of this VersionRange
-	 * @return the maximum Version of this VersionRange
-	 */
-	public Version getMaximum() {
-		return maxVersion;
-	}
-
-	/**
-	 * Indicates if the maximum version is included in the version range.
-	 * @return true if the maximum version is included in the version range;
-	 * otherwise false is returned
-	 */
-	public boolean getIncludeMaximum() {
-		return includeMax;
-	}
-
-	public VersionRange intersect(VersionRange r2) {
-		int minCompare = minVersion.compareTo(r2.getMinimum());
-		int maxCompare = maxVersion.compareTo(r2.getMaximum());
-
-		boolean resultMinIncluded;
-		Version resultMin;
-		if (minCompare == 0) {
-			if (maxCompare == 0 && includeMin == r2.getIncludeMinimum() && includeMax == r2.getIncludeMaximum())
-				return this;
-			resultMin = minVersion;
-			resultMinIncluded = includeMin && r2.getIncludeMinimum();
-		} else if (minCompare < 0) {
-			resultMin = r2.getMinimum();
-			resultMinIncluded = r2.getIncludeMinimum();
-		} else { // minCompare > 0)
-			resultMin = minVersion;
-			resultMinIncluded = includeMin;
-		}
-
-		boolean resultMaxIncluded;
-		Version resultMax;
-		if (maxCompare > 0) {
-			resultMax = r2.getMaximum();
-			resultMaxIncluded = r2.getIncludeMaximum();
-		} else if (maxCompare < 0) {
-			resultMax = maxVersion;
-			resultMaxIncluded = includeMax;
-		} else {//maxCompare == 0
-			resultMax = maxVersion;
-			resultMaxIncluded = includeMax && r2.getIncludeMaximum();
-		}
-
-		int minMaxCmp = resultMin.compareTo(resultMax);
-		if (minMaxCmp < 0 || (minMaxCmp == 0 && resultMinIncluded && resultMaxIncluded))
-			return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
-
-		return null;
-	}
-
-	/**
-	 * Returns whether the given version is included in this VersionRange.
-	 * This will depend on the minimum and maximum versions of this VersionRange
-	 * and the given version.
-	 * 
-	 * @param version a version to be tested for inclusion in this VersionRange. 
-	 * (may be <code>null</code>)
-	 * @return <code>true</code> if the version is include, 
-	 * <code>false</code> otherwise 
-	 */
-	public boolean isIncluded(Version version) {
-		if (version == null)
-			return false;
-
-		if (minVersion == maxVersion)
-			// Can only happen when both includeMin and includeMax are true
-			return minVersion.equals(version);
-
-		int minCheck = includeMin ? 0 : -1;
-		int maxCheck = includeMax ? 0 : 1;
-		return minVersion.compareTo(version) <= minCheck && maxVersion.compareTo(version) >= maxCheck;
-	}
-
-	/**
-	 * Checks if the versions of this range is in compliance with the OSGi version spec.
-	 * @return A flag indicating whether the range is OSGi compatible or not.
-	 */
-	public boolean isOSGiCompatible() {
-		return minVersion.isOSGiCompatible() && maxVersion.isOSGiCompatible();
-	}
-
-	public boolean equals(Object object) {
-		if (!(object instanceof VersionRange))
-			return false;
-		VersionRange vr = (VersionRange) object;
-		return includeMin == vr.includeMin && includeMax == vr.includeMax && minVersion.equals(vr.getMinimum()) && maxVersion.equals(vr.getMaximum());
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + maxVersion.hashCode();
-		result = prime * result + minVersion.hashCode();
-		result = prime * result + (includeMax ? 1231 : 1237);
-		result = prime * result + (includeMin ? 1231 : 1237);
-		return result;
-	}
-
-	public String toString() {
-		StringBuffer result = new StringBuffer();
-		toString(result);
-		return result.toString();
-	}
-
-	public void toString(StringBuffer result) {
-		VersionFormat fmt = getFormat();
-		if (fmt == VersionFormat.OSGI_FORMAT) {
-			if (includeMin && includeMax && OSGi_versionMax.equals(maxVersion)) {
-				minVersion.toString(result);
-			} else {
-				result.append(includeMin ? '[' : '(');
-				minVersion.toString(result);
-				result.append(',');
-				maxVersion.toString(result);
-				result.append(includeMax ? ']' : ')');
-			}
-			return;
-		}
-
-		boolean gtEqual = includeMin && includeMax && Version.MAX_VERSION.equals(maxVersion);
-		result.append("raw:"); //$NON-NLS-1$
-		if (gtEqual) {
-			minVersion.rawToString(result, true);
-		} else {
-			result.append(includeMin ? '[' : '(');
-			minVersion.rawToString(result, true);
-			result.append(',');
-			maxVersion.rawToString(result, true);
-			result.append(includeMax ? ']' : ')');
-		}
-		boolean hasOriginal = (minVersion.getOriginal() != null || maxVersion.getOriginal() != null);
-		if (fmt != null || hasOriginal) {
-			result.append('/');
-			if (fmt != null)
-				fmt.toString(result);
-			if (hasOriginal) {
-				result.append(':');
-				if (gtEqual) {
-					minVersion.originalToString(result, true);
-				} else {
-					if (Version.MIN_VERSION.equals(minVersion))
-						minVersion.rawToString(result, true);
-					else
-						minVersion.originalToString(result, true);
-					result.append(',');
-					maxVersion.originalToString(result, true);
-				}
-			}
-		}
-	}
-
-	// Preserve singletons during deserialization
-	private Object readResolve() {
-		VersionRange vr = this;
-		if (equals(emptyRange))
-			vr = emptyRange;
-		return vr;
-	}
-
-	private void validateRange() {
-		int cmp = minVersion.compareTo(maxVersion);
-		if (!(cmp < 0 || (cmp == 0 && includeMin && includeMax)))
-			throw new IllegalArgumentException(NLS.bind(Messages.range_min_0_is_not_less_then_range_max_1, minVersion, maxVersion));
-	}
-
-	public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
-		if (range.equals(emptyRange))
-			return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
-		return new org.eclipse.osgi.service.resolver.VersionRange(Version.toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), Version.toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
-	}
-
-	public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
-		if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
-			return emptyRange;
-		return new VersionRange(Version.fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), Version.fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionVector.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionVector.java
deleted file mode 100644
index cc95fcd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionVector.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import java.io.Serializable;
-
-/**
- * The VersionVector represents an array of Comparable objects. The array can be
- * nested since a VersionVector is Comparable in itself.
- *  
- * @Immutable
- */
-public class VersionVector implements Comparable, Serializable {
-
-	private static final class MaxStringValue implements Comparable, Serializable {
-		private static final long serialVersionUID = -4936252230441132767L;
-
-		MaxStringValue() {
-			// Empty constructor
-		}
-
-		public int compareTo(Object o) {
-			return o == this ? 0 : (o == MAX_VALUE || o instanceof Integer || o instanceof VersionVector ? -1 : 1);
-		}
-
-		// For singleton deserialization
-		private Object readResolve() {
-			return MAXS_VALUE;
-		}
-
-		public String toString() {
-			return "m"; //$NON-NLS-1$
-		}
-	}
-
-	private static final class MaxValue implements Comparable, Serializable {
-		private static final long serialVersionUID = -5889641741635253589L;
-
-		MaxValue() {
-			// Empty constructor
-		}
-
-		public int compareTo(Object o) {
-			return o == this ? 0 : 1;
-		}
-
-		public String toString() {
-			return "M"; //$NON-NLS-1$
-		}
-
-		// For singleton deserialization
-		private Object readResolve() {
-			return MAX_VALUE;
-		}
-	}
-
-	private static class MinValue implements Comparable, Serializable {
-		private static final long serialVersionUID = -1066323980049812226L;
-
-		MinValue() {
-			// Empty constructor
-		}
-
-		public int compareTo(Object o) {
-			return o == this ? 0 : -1;
-		}
-
-		public String toString() {
-			return "-M"; //$NON-NLS-1$
-		}
-
-		private Object readResolve() {
-			return MIN_VALUE;
-		}
-	}
-
-	/**
-	 * A value that is greater then any other value
-	 */
-	public static final Comparable MAX_VALUE = new MaxValue();
-
-	/**
-	 * A value that is greater then any string but less then {@link #MAX_VALUE} and
-	 * any Integer or VersionVector.
-	 */
-	public static final Comparable MAXS_VALUE = new MaxStringValue();
-
-	/**
-	 * A value that is less then any other value
-	 */
-	public static final Comparable MIN_VALUE = new MinValue();
-
-	private static final long serialVersionUID = -8385373304298723744L;
-
-	static void rawToString(StringBuffer sb, boolean forRange, Comparable e) {
-		if (e instanceof String) {
-			writeQuotedString(sb, forRange, (String) e, '\'', 0, false);
-		} else if (e instanceof VersionVector) {
-			sb.append('<');
-			((VersionVector) e).toString(sb, forRange);
-			sb.append('>');
-		} else
-			sb.append(e);
-	}
-
-	/**
-	 * Write a string within quotes. If the string is found to contain the quote, an attempt is made
-	 * to flip quote character (single quote becomes double quote and vice versa). A string that contains
-	 * both will be written as several adjacent quoted strings so that each string is quoted with a
-	 * quote character that it does not contain.
-	 * @param sb The buffer that will receive the string
-	 * @param rangeSafe Set to <code>true</code> if the resulting string will be used in a range string
-	 *        and hence need to escape the range delimiter characters
-	 * @param s The string to be written
-	 * @param quote The quote character to start with. Must be the single or double quote character.
-	 * @param startPos The start position
-	 * @param didFlip True if the call is recursive and thus, cannot switch quotes in the first string.
-	 */
-	static void writeQuotedString(StringBuffer sb, boolean rangeSafe, String s, char quote, int startPos, boolean didFlip) {
-		int quotePos = sb.length();
-		sb.append(quote);
-		boolean otherSeen = false;
-		int top = s.length();
-		for (int idx = startPos; idx < top; ++idx) {
-			char c = s.charAt(idx);
-			if (c == '\'' || c == '"') {
-				if (c == quote) {
-					char otherQuote = quote == '\'' ? '"' : '\'';
-					if (didFlip || otherSeen) {
-						// We can only flip once
-						sb.append(quote);
-						writeQuotedString(sb, rangeSafe, s, otherQuote, idx, true);
-						return;
-					}
-					quote = otherQuote;
-					sb.setCharAt(quotePos, quote);
-					didFlip = true;
-				} else
-					otherSeen = true;
-			}
-			if (rangeSafe && (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' '))
-				sb.append('\\');
-			sb.append(c);
-		}
-		sb.append(quote);
-	}
-
-	private static int compareSegments(Comparable a, Comparable b) {
-		if (a == b)
-			return 0;
-
-		if (a instanceof Integer && b instanceof Integer) {
-			int ai = ((Integer) a).intValue();
-			int bi = ((Integer) b).intValue();
-			return ai > bi ? 1 : (ai < bi ? -1 : 0);
-		}
-
-		if (a instanceof String && b instanceof String)
-			return a.compareTo(b);
-
-		if (a == MAX_VALUE || a == MIN_VALUE || a == MAXS_VALUE)
-			return a.compareTo(b);
-
-		if (b == MAX_VALUE || b == MIN_VALUE || b == MAXS_VALUE)
-			return -b.compareTo(a);
-
-		if (a instanceof Integer)
-			return 1;
-		if (b instanceof Integer)
-			return -1;
-		if (a instanceof VersionVector)
-			return (b instanceof VersionVector) ? a.compareTo(b) : 1;
-
-		if (b instanceof VersionVector)
-			return -1;
-
-		throw new IllegalArgumentException();
-	}
-
-	private Comparable padValue;
-
-	private Comparable[] vector;
-
-	VersionVector() {
-		// Constructor used in conjunction with init (when version is parsed from string)
-	}
-
-	VersionVector(Comparable[] vector, Comparable pad) {
-		this.vector = vector;
-		this.padValue = (pad == MIN_VALUE) ? null : pad;
-	}
-
-	public int compareTo(Object o) {
-		if (o == this)
-			return 0;
-
-		VersionVector ov = (VersionVector) o;
-		Comparable[] t_vector = vector;
-		Comparable[] o_vector = ov.vector;
-		int top = t_vector.length;
-		if (top > o_vector.length)
-			top = o_vector.length;
-
-		for (int idx = 0; idx < top; ++idx) {
-			int cmp = compareSegments(t_vector[idx], o_vector[idx]);
-			if (cmp != 0)
-				return cmp;
-		}
-
-		// All elements compared equal up to this point. Check
-		// pad values
-		if (top < t_vector.length)
-			return (ov.padValue == null) ? 1 : compareReminder(top, ov.padValue);
-
-		if (top < o_vector.length)
-			return (padValue == null) ? -1 : -ov.compareReminder(top, padValue);
-
-		// Lengths are equal. Compare pad values
-		return padValue == null ? (ov.padValue == null ? 0 : -1) : (ov.padValue == null ? 1 : compareSegments(padValue, ov.padValue));
-	}
-
-	public boolean equals(Object o) {
-		if (o == this)
-			return true;
-
-		if (!(o instanceof VersionVector))
-			return false;
-
-		VersionVector ov = (VersionVector) o;
-
-		// We compare pad first since it is impossible for versions with
-		// different pad to be equal (versions are padded to infinity) 
-		if (padValue == null) {
-			if (ov.padValue != null)
-				return false;
-		} else {
-			if (ov.padValue == null || !padValue.equals(ov.padValue))
-				return false;
-		}
-
-		Comparable[] t_vector = vector;
-		Comparable[] o_vector = ov.vector;
-		int idx = t_vector.length;
-
-		// If the length of the vector differs, the versions cannot be equal
-		// since segments equal to pad are stripped by the parser
-		if (idx != o_vector.length)
-			return false;
-
-		while (--idx >= 0)
-			if (!t_vector[idx].equals(o_vector[idx]))
-				return false;
-
-		return true;
-	}
-
-	/**
-	 * Returns the pad value used when comparing this versions to
-	 * versions that has a raw vector with a larger number of elements
-	 * @return The pad value or <code>null</code> if not set.
-	 */
-	public Comparable getPad() {
-		return padValue;
-	}
-
-	/**
-	 * An element from the raw vector
-	 * @param index The zero based index of the desired element
-	 * @return An element from the raw vector
-	 */
-	public Comparable getSegment(int index) {
-		return vector[index];
-	}
-
-	/**
-	 * Returns the number of elements in the raw vector
-	 * @return The element count
-	 */
-	public int getSegmentCount() {
-		return vector.length;
-	}
-
-	public int hashCode() {
-		int hashCode = padValue == null ? 31 : padValue.hashCode();
-		int idx = vector.length;
-		while (--idx >= 0) {
-			Object elem = vector[idx];
-			if (elem != null)
-				hashCode += elem.hashCode();
-			hashCode = hashCode * 31;
-		}
-		return hashCode;
-	}
-
-	public String toString() {
-		StringBuffer sb = new StringBuffer();
-		toString(sb);
-		return sb.toString();
-	}
-
-	/**
-	 * Append the string representation of this instance to the
-	 * <code>sb</code> buffer.
-	 * @param sb The buffer to append to
-	 */
-	public void toString(StringBuffer sb) {
-		toString(sb, false);
-	}
-
-	/**
-	 * Append the string representation of this instance to the
-	 * <code>sb</code> buffer.
-	 * @param sb The buffer to append to
-	 * @param rangeSafe If <code>true</code>, the range delimiters will be escaped
-	 * with backslash.
-	 */
-	public void toString(StringBuffer sb, boolean rangeSafe) {
-		int top = vector.length;
-		if (top == 0)
-			// Write one pad value as explicit. It will be considered
-			// redundant and removed by the parser but the raw format
-			// does not allow zero elements
-			rawToString(sb, rangeSafe, padValue == null ? MIN_VALUE : padValue);
-		else {
-			for (int idx = 0; idx < top; ++idx) {
-				if (idx > 0)
-					sb.append('.');
-				rawToString(sb, rangeSafe, vector[idx]);
-			}
-		}
-		if (padValue != null) {
-			sb.append('p');
-			rawToString(sb, rangeSafe, padValue);
-		}
-	}
-
-	/**
-	 * This method is package protected since it violates the immutable
-	 * contract.
-	 * @return The raw vector. Must be treated as read-only
-	 */
-	Comparable[] getVector() {
-		return vector;
-	}
-
-	void init(Comparable[] vec, Comparable pad) {
-		vector = vec;
-		padValue = (pad == MIN_VALUE) ? null : pad;
-	}
-
-	private int compareReminder(int idx, Comparable othersPad) {
-		int cmp;
-		for (cmp = 0; idx < vector.length && cmp == 0; ++idx)
-			cmp = compareSegments(vector[idx], othersPad);
-		if (cmp == 0)
-			cmp = (padValue == null) ? -1 : padValue.compareTo(othersPad);
-		return cmp;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionedName.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionedName.java
deleted file mode 100644
index b12e084..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/VersionedName.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *     EclipseSource - ongoing development
- *     Thomas Hallgreen - Fix for bug 268659
- *     IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core;
-
-import org.eclipse.equinox.internal.p2.core.helpers.StringHelper;
-
-/**
- * An object representing a (name,version) pair. 
- * @TODO Should be consistent in calling the first part either "name" or "id", but not both.
- * 
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VersionedName {
-	private final String id;
-	private final Version version;
-
-	/**
-	 * Creates and returns a new {@link VersionedName} from the given string specification.  
-	 * The specification must be of the form "name/version", or just "name" if the version is absent
-	 * <p>
-	 * This factory method can be used to reconstruct a {@link VersionedName}
-	 * instance from the string representation produced by a previous invocation of 
-	 * {@link #toString()}.
-	 * 
-	 * @param spec the specification for the versioned name to create
-	 * @return the parsed versioned named
-	 * @throws IllegalArgumentException If <code>spec</code> is improperly
-	 *         formatted.
-	 */
-	public static VersionedName parse(String spec) {
-		String[] segments = StringHelper.getArrayFromString(spec, '/');
-		return new VersionedName(segments[0], segments.length == 1 ? null : segments[1]);
-	}
-
-	/**
-	 * Creates a new versioned name with the given id and version.
-	 * 
-	 * @param id The identifier
-	 * @param version The version
-	 * @throws IllegalArgumentException If <code>version</code> is improperly
-	 *         formatted.
-	 */
-	public VersionedName(String id, String version) {
-		this.id = id;
-		this.version = Version.parseVersion(version);
-	}
-
-	/**
-	 * Creates a new versioned name with the given id and version.
-	 * 
-	 * @param id The identifier
-	 * @param version The version
-	 */
-	public VersionedName(String id, Version version) {
-		this.id = id;
-		this.version = (version == null) ? Version.emptyVersion : version;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-
-		if (!(obj instanceof VersionedName))
-			return false;
-
-		VersionedName vname = (VersionedName) obj;
-		return id.equals(vname.id) && version.equals(vname.version);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return id.hashCode() * 31 + version.hashCode();
-	}
-
-	/**
-	 * Returns the name portion of this versioned name.
-	 * @TODO Should be getName() for consistency?
-	 * 
-	 * @return The name portion of this versioned name.
-	 */
-	public String getId() {
-		return id;
-	}
-
-	/**
-	 * Returns the version portion of this versioned name.
-	 * @return the version portion of this versioned name.
-	 */
-	public Version getVersion() {
-		return version;
-	}
-
-	/**
-	 * Returns a string representation of this versioned name.
-	 * The result can be used to later construct an equal {@link VersionedName}
-	 * instance using {{@link #parse(String)}.
-	 * @return A string representation of this name
-	 */
-	public String toString() {
-		return Version.emptyVersion.equals(version) ? id : id + '/' + version.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/location/AgentLocation.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/location/AgentLocation.java
deleted file mode 100644
index aacd84a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/location/AgentLocation.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core.location;
-
-import java.net.URI;
-import java.net.URL;
-
-public interface AgentLocation {
-	public static final String SERVICE_NAME = AgentLocation.class.getName();
-
-	public URI getArtifactRepositoryURI();
-
-	public URI getMetadataRepositoryURI();
-
-	/**
-	 * Returns the location where the bundle with the given namespace
-	 * may write its agent-related data.
-	 * @param namespace The namespace of the bundle storing the data
-	 * @return The data location
-	 */
-	public URL getDataArea(String namespace);
-
-	/**
-	 * Returns the actual {@link URL} of this location.  If the location's value has been set, 
-	 * that value is returned.  If the value is not set and the location allows defaults, 
-	 * the value is set to the default and returned.  In all other cases <code>null</code>
-	 * is returned.
-	 * 
-	 * @return the URL for this location or <code>null</code> if none
-	 */
-	public URL getURL();
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/messages.properties
deleted file mode 100644
index 2d675ff..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/messages.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-###############################################################################
- # Copyright (c) 2009 Cloudsmith Inc. and others.
- # All rights reserved. This program and the accompanying materials
- # are made available under the terms of the Eclipse Public License v1.0
- # which accompanies this distribution, and is available at
- # http://www.eclipse.org/legal/epl-v10.html
- #
- # Contributors:
- #     Cloudsmith Inc. - initial API and implementation
-###############################################################################
-_0_is_not_a_positive_integer_in_osgi_1=The {0} value is not a positive in OSGi version: "{1}"
-_0_is_not_a_string_in_osgi_1=The {0} value is not a string in OSGi version: "{1}"
-_0_is_not_a_valid_qualifier_in_osgi_1=The {0} value is invalid in OSGi version: "{1}"
-array_can_not_be_empty=Array format can not be empty
-array_can_not_have_character_group=Array format can not have a character group
-auto_can_not_have_pad_value=Auto format can not have a pad value
-cannot_combine_ignore_with_other_instruction=Cannot combine ignore with other instruction
-cannot_combine_range_upper_bound_with_pad_value=Cannot combine range upper bound with pad value
-character_group_defined_more_then_once=Character group was defined more then once
-colon_expected_before_original_version_0=A colon was expected before original version: {0}
-default_defined_more_then_once=Default defined more then once
-delimiter_can_not_be_ignored=A delimiter cannot be ignored
-delimiter_can_not_have_default_value=A delimiter cannot have a default value
-delimiter_can_not_have_pad_value=A delimiter cannot have a pad value
-delimiter_can_not_have_range=A delimiter cannot have a range
-EOS_after_escape=End of string was encountere after the escape character
-expected_orignal_after_colon_0=An original version was expected after colon: {0}
-expected_orignal_after_slash_0=A format or colon was expected after slash: {0}
-expected_slash_after_raw_vector_0=A slash was expected after a raw version: {0}
-format_0_unable_to_parse_1=Format "{0}" was unable to parse {1}
-format_0_unable_to_parse_empty_version=Format "{0}" was unable to parse an empty version
-format_is_empty=Format is empty
-format_must_be_delimited_by_colon_0=Format must be delimited by version range: {0}
-group_can_not_be_empty=A group can not be empty
-ignore_defined_more_then_once=More then one definition of ignore
-illegal_character_encountered_ascii_0=An illegal character was encountered. Code = {0}
-illegal_number_of_entries_0_in_osgi_1=Illegal number of entries {0} in OSGi version: "{1}"
-missing_comma_in_range_0=Missing comma in range "{0}"
-negative_character_range=The character range is negative
-neither_raw_vector_nor_format_specified_0=Neither raw version nor format was specified: {0}
-number_can_not_have_pad_value=A number cannot have a pad value
-only_format_specified_0=Only a format was specified: {0}
-original_must_start_with_colon_0=Original version must start with colon: {0}
-original_stated_but_missing_0=Expected original version after colon: {0}
-pad_defined_more_then_once=Pad was defined more then once
-pad_not_allowed_in_osgi_0=Pad is not allowed in an OSGi version: "{0}"
-performing_subquery=Performing subquery
-premature_end_of_format=Premature end of format
-premature_end_of_format_expected_0=Premature end of format, "{0}" expected
-premature_EOS_0=Premature end of string in "{0}"
-range_defined_more_then_once=Range defined more then once
-range_max_cannot_be_less_then_range_min=The range maximum must not be less then its minimum
-range_max_cannot_be_zero=The range maximum cannot be zero
-range_min_0_is_not_less_then_range_max_1=Range minimum "{0}" is not less then range maximum "{1}" (inclusion is required at both ends if the versions are equal)
-range_boundaries_0_and_1_cannot_have_different_formats=Range boundaries "{0}" and "{1}" cannot have different formats
-raw_and_original_must_use_same_range_inclusion_0=Raw and original must use the same range inclusion markers in range "{0}"
-raw_element_can_not_have_pad_value=A raw element cannot have a pad value
-raw_element_expected_0=A raw element was expected: {0}
-string_can_not_have_pad_value=A string cannot have a pad value
-syntax_error_in_version_format_0_1_2=Syntax error in version format "{0}" at position {1}: {2}
-syntax_error_in_version_format_0_1_found_2_expected_3=Syntax error in version format "{0}" at position {1}: Found {2} when {3} was expected
-unbalanced_format_parenthesis=Unbalanced format parenthesis
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Collector.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Collector.java
deleted file mode 100644
index 2cbf6eb..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Collector.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.Messages;
-
-/**
- * A collector is a generic visitor that collects objects passed to it,
- * and can then express the result of the visit in various forms. The collector
- * can also short-circuit a traversal by returning <code>false</code> from
- * its {@link #accept(Object)} method.
- * <p>
- * This default collector just accepts all objects passed to it.  Clients may subclass
- * to perform different processing on the objects passed to it.
- */
-public class Collector implements IQueryable {
-	private Set collected = null;
-
-	/**
-	 * Creates a new collector.
-	 */
-	public Collector() {
-		super();
-	}
-
-	/**
-	 * Accepts an object.
-	 * <p>
-	 * This default implementation adds the objects to a list. Clients may
-	 * override this method to perform additional filtering, add different objects 
-	 * to the list, short-circuit the traversal, or process the objects directly without 
-	 * collecting them.
-	 * 
-	 * @param object the object to collect or visit
-	 * @return <code>true</code> if the traversal should continue,
-	 * or <code>false</code> to indicate the traversal should stop.
-	 */
-	public boolean accept(Object object) {
-		getCollection().add(object);
-		return true;
-	}
-
-	/**
-	 * Returns the collection that is being used to collect results. Unlike {@linkplain #toCollection()},
-	 * this returns the actual modifiable collection that is being used to store results. The
-	 * return value is only intended to be used within subclasses and should not be exposed
-	 * outside of a collection class.
-	 * 
-	 * @return the collection being used to collect results.
-	 */
-	protected Collection getCollection() {
-		if (collected == null)
-			collected = new HashSet();
-		return collected;
-	}
-
-	/**
-	 * Returns whether this collector is empty.
-	 * @return <code>true</code> if this collector has accepted any results,
-	 * and <code>false</code> otherwise.
-	 */
-	public boolean isEmpty() {
-		return collected == null || collected.isEmpty();
-	}
-
-	/**
-	 * Returns an iterator on the collected objects.
-	 * 
-	 * @return an iterator of the collected objects.
-	 */
-	public Iterator iterator() {
-		return collected == null ? Collections.EMPTY_LIST.iterator() : collected.iterator();
-	}
-
-	/**
-	 * Returns the number of collected objects.
-	 */
-	public int size() {
-		return collected == null ? 0 : collected.size();
-	}
-
-	/**
-	 * Returns the collected objects as an array
-	 * 
-	 * @param clazz The type of array to return
-	 * @return The array of results
-	 * @throws ArrayStoreException the runtime type of the specified array is
-	 *         not a supertype of the runtime type of every collected object
-	 */
-	public Object[] toArray(Class clazz) {
-		int size = collected == null ? 0 : collected.size();
-		Object[] result = (Object[]) Array.newInstance(clazz, size);
-		if (size != 0)
-			collected.toArray(result);
-		return result;
-	}
-
-	/**
-	 * Returns the collected objects as an immutable collection.
-	 * 
-	 * @return An unmodifiable collection of the collected objects
-	 */
-	public Collection toCollection() {
-		return collected == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(collected);
-	}
-
-	/**
-	 * Performs a query on this results of this collector.  
-	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		Iterator iter = collector == this ? toCollection().iterator() : iterator();
-		if (monitor == null)
-			monitor = new NullProgressMonitor();
-		try {
-			monitor.beginTask(Messages.performing_subquery, 1);
-			collector = query.perform(iter, collector);
-			monitor.worked(1);
-		} finally {
-			monitor.done();
-		}
-		return collector;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompositeQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompositeQuery.java
deleted file mode 100644
index cf1de98..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompositeQuery.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.QueryHelpers;
-
-/**
- * A Composite Query is an aggregate query in which each sub-query
- * is executed in succession.  The results from the ith sub-query
- * are piped as input into the i+1th sub-query.
- */
-public class CompositeQuery implements Query {
-	protected Query[] queries;
-
-	public CompositeQuery(Query[] queries) {
-		this.queries = queries;
-	}
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId() {
-		return QueryHelpers.getId(this);
-	}
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property) {
-		return QueryHelpers.getProperty(this, property);
-	}
-
-	/**
-	 * Set the queries of this composite.  This is needed to allow subclasses of 
-	 * CompsiteQuery to set the queries in a constructor
-	 */
-	protected final void setQueries(Query[] queries) {
-		this.queries = queries;
-	}
-
-	public Collector perform(Iterator iterator, Collector result) {
-		Collector collector;
-		Iterator iter = iterator;
-		for (int i = 0; i < queries.length; i++) {
-			// Take the results of the previous query and using them
-			// to drive the next one (i.e. composing queries)
-			collector = queries[i].perform(iter, new Collector());
-			iter = collector.iterator();
-		}
-		boolean gatherResults = true;
-		while (iter.hasNext() && gatherResults)
-			gatherResults = result.accept(iter.next());
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQuery.java
deleted file mode 100644
index 6fab917..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQuery.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.QueryHelpers;
-
-/**
- * A query that combines a group of sub-queries.<P>
- * 
- * In a CompoundQuery each sub-query is executed and the results are combined using
- * either logical AND or logical OR operations. <P>
- * 
- * Clients are expected to call {@link CompoundQuery#createCompoundQuery(Query[], boolean)}
- * to create a concrete instance of a CompoundQuery.  If all Queries are instances of 
- * {@link IMatchQuery} then the resulting compound query will be a MatchCompoundQuery, otherwise the
- * resulting compound query will be a {@link ContextQuery}.
- * 
- * @noextend This class is not intended to be subclassed by clients.
- */
-public abstract class CompoundQuery implements Query {
-	protected Query[] queries;
-	protected boolean and;
-
-	/**
-	 * Creates a compound query that combines the given queries. The queries
-	 * will be performed by the compound query in the given order. This method
-	 * might not perform all queries if it can determine the result of the compound
-	 * expression without doing so.
-	 * 
-	 * If all the queries are instances of {@link IMatchQuery} then the resulting
-	 * compound query will be an instance of IMatchQuery, otherwise the resulting
-	 * compound query will be a context query.
-	 * 
-	 * @param queries The queries to perform
-	 * @param and <code>true</code> if this query represents a logical 'and', and
-	 * <code>false</code> if this query represents a logical 'or'.
-	 */
-	public static CompoundQuery createCompoundQuery(Query[] queries, boolean and) {
-		if (isMatchQueries(queries)) {
-			return new CompoundQuery.MatchCompoundQuery(queries, and);
-		}
-		return new CompoundQuery.ContextCompoundQuery(queries, and);
-	}
-
-	/**
-	 * Returns the queries that make up this compound query
-	 */
-	public Query[] getQueries() {
-		return queries;
-	}
-
-	/**
-	 * Returns whether this compound query combines its queries with a logical
-	 * 'and' or 'or'.
-	 * @return <code>true</code> if this query represents a logical 'and', and
-	 * <code>false</code> if this query represents a logical 'or'.
-	 */
-	public boolean isAnd() {
-		return and;
-	}
-
-	protected CompoundQuery(Query[] queries, boolean and) {
-		this.queries = queries;
-		this.and = and;
-	}
-
-	/**
-	 * @param queries
-	 */
-	private static boolean isMatchQueries(Query[] queries) {
-		for (int i = 0; i < queries.length; i++) {
-			if (!(queries[i] instanceof IMatchQuery)) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId() {
-		return QueryHelpers.getId(this);
-	}
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property) {
-		return QueryHelpers.getProperty(this, property);
-	}
-
-	/**
-	 * The compound query instantiated when all queries are Match Queries.
-	 */
-	private static class MatchCompoundQuery extends CompoundQuery implements IMatchQuery {
-
-		protected MatchCompoundQuery(Query[] queries, boolean and) {
-			super(queries, and);
-		}
-
-		public boolean isMatch(Object candidate) {
-			for (int i = 0; i < queries.length; i++) {
-				boolean valid = ((IMatchQuery) queries[i]).isMatch(candidate);
-				// if we are OR'ing then the first time we find a requirement that is met, return success
-				if (valid && !and)
-					return true;
-				// if we are AND'ing then the first time we find a requirement that is NOT met, return failure
-				if (!valid && and)
-					return false;
-			}
-			// if we get past the requirements check and we are AND'ing then return true 
-			// since all requirements must have been met.  If we are OR'ing then return false 
-			// since none of the requirements were met.
-			return and;
-		}
-
-		/**
-		 * Performs this query on the given iterator, passing all objects in the iterator 
-		 * that match the criteria of this query to the given result.
-		 */
-		public final Collector perform(Iterator iterator, Collector result) {
-			prePerform();
-			try {
-				while (iterator.hasNext()) {
-					Object candidate = iterator.next();
-					if (isMatch(candidate))
-						if (!result.accept(candidate))
-							break;
-				}
-			} finally {
-				postPerform();
-			}
-			return result;
-		}
-
-		public void prePerform() {
-			for (int i = 0; i < queries.length; i++) {
-				((IMatchQuery) queries[i]).prePerform();
-			}
-		}
-
-		public void postPerform() {
-			for (int i = 0; i < queries.length; i++) {
-				((IMatchQuery) queries[i]).postPerform();
-			}
-		}
-	}
-
-	/**
-	 * The compound query instantiated when any of the queries are not 
-	 * match queries.
-	 */
-	private static class ContextCompoundQuery extends CompoundQuery {
-
-		protected ContextCompoundQuery(Query[] queries, boolean and) {
-			super(queries, and);
-		}
-
-		/*
-		 * A collector that takes the set to puts the elements in.
-		 */
-		class SetCollector extends Collector {
-			Set s = null;
-
-			public SetCollector(Set s) {
-				this.s = s;
-			}
-
-			public boolean accept(Object object) {
-				s.add(object);
-				return true;
-			}
-		}
-
-		public Collector perform(Iterator iterator, Collector result) {
-			if (queries.length < 1)
-				return result;
-
-			Collection data = new LinkedList();
-
-			while (iterator.hasNext()) {
-				data.add(iterator.next());
-			}
-
-			Set[] resultSets = new Set[queries.length];
-			for (int i = 0; i < queries.length; i++) {
-				resultSets[i] = new HashSet();
-				queries[i].perform(data.iterator(), new SetCollector(resultSets[i]));
-			}
-
-			Set set = resultSets[0];
-			for (int i = 1; i < resultSets.length; i++) {
-				if (isAnd())
-					set.retainAll(resultSets[i]);
-				else
-					set.addAll(resultSets[i]);
-			}
-
-			Iterator resultIterator = set.iterator();
-			boolean gatherResults = true;
-			while (resultIterator.hasNext() && gatherResults)
-				gatherResults = result.accept(resultIterator.next());
-			return result;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQueryable.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQueryable.java
deleted file mode 100644
index b63eff4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/CompoundQueryable.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-
-/**
- * A queryable that holds a number of other IQueryables and provides
- * a mechanism for querying the entire set.
- */
-public class CompoundQueryable implements IQueryable {
-
-	private IQueryable[] queryables;
-
-	public CompoundQueryable(IQueryable[] queryables) {
-		this.queryables = queryables;
-	}
-
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		if (monitor == null) {
-			monitor = new NullProgressMonitor();
-		}
-		boolean isMatchQuery = query instanceof IMatchQuery;
-		Collector results = collector;
-		int totalWork = isMatchQuery ? queryables.length : queryables.length + 1;
-
-		try {
-			SubMonitor subMonitor = SubMonitor.convert(monitor, totalWork * 10);
-			if (!isMatchQuery) {
-				// If it is not a match query, then collect the results
-				// as a list, we will query this list for the final results
-				results = new ListCollector();
-			}
-			for (int i = 0; i < queryables.length; i++) {
-				if (subMonitor.isCanceled())
-					break;
-				results = queryables[i].query(query, results, subMonitor.newChild(10));
-			}
-
-			if (!isMatchQuery) {
-				// If it is not a MatchQuery then we must query the results.
-				collector = results.query(query, collector, subMonitor.newChild(10));
-			} else
-				collector = results;
-		} finally {
-			monitor.done();
-		}
-
-		return collector;
-	}
-
-	/**
-	 * A list collector.
-	 * 
-	 * This is a collector backed as a list.
-	 *
-	 */
-	private class ListCollector extends Collector {
-		private List collected;
-
-		public ListCollector() {
-			super();
-		}
-
-		public boolean accept(Object object) {
-			if (collected == null)
-				collected = new ArrayList();
-			collected.add(object);
-			return true;
-		}
-
-		/**
-		 * Returns the collected objects as an immutable collection.
-		 * 
-		 * @return An unmodifiable collection of the collected objects
-		 */
-		public Collection toCollection() {
-			return collected == null ? Collections.EMPTY_LIST : Collections.unmodifiableList(collected);
-		}
-
-		public Iterator iterator() {
-			return collected == null ? Collections.EMPTY_LIST.iterator() : collected.iterator();
-		}
-
-		public int size() {
-			return collected == null ? 0 : collected.size();
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/ContextQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/ContextQuery.java
deleted file mode 100644
index 4b768d6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/ContextQuery.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.QueryHelpers;
-
-/**
- * ContextQuery is the abstract superclass for Queries that require the entire
- * input to evaluate the results.  Queries must consider the group of elements before
- * processing the results. <P>
- * 
- * ContextQueries must also be transitive. That is, if run on a subset of the 
- * input, the order in which they are executed must not matter. If there is the 
- * need for a non-transitive query, please see:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=261403
- * <p>
- * Users of this query must call {@link #perform(Iterator, Collector)} to compute 
- * the results. <P>
- * This class may be subclassed by clients. Subclasses should specify the type
- * of object they support querying on. Subclasses are also encouraged to clearly
- * specify their match algorithm, and expose the parameters involved in the match
- * computation, to allow {@link IQueryable} implementations to optimize their
- * execution of the query. <P>
- * 
- */
-public abstract class ContextQuery implements Query {
-
-	/**
-	 * Evaluates the query for a specific input.  
-	 * 
-	 * @param iterator The elements for which to evaluate the query on
-	 * @param result A collector to collect the results.  For each element accepted 
-	 * by the query,{@link Collector#accept(Object)} must be called.
-	 * @return The results of the query.  The collector returned must be
-	 * the collector passed in.
-	 */
-	public abstract Collector perform(Iterator iterator, Collector result);
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId() {
-		return QueryHelpers.getId(this);
-	}
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property) {
-		return QueryHelpers.getProperty(this, property);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IMatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IMatchQuery.java
deleted file mode 100644
index 7c36c3d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IMatchQuery.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-/**
- * A query in which the elements can be evaluated by calling isMatch on. Each
- * element can be evaluated independently of all other elements.  Match queries
- * can be evaluated in parallel as each call {@link #isMatch(Object)} is mutually
- * exclusive from all other calls. <P>
- * 
- * @spi Clients should not implement this interface, but rather extend {@link MatchQuery}.
- */
-public interface IMatchQuery extends Query {
-
-	/**
-	 * Returns whether the given object satisfies the parameters of this query.
-	 * 
-	 * @param candidate The object to perform the query against
-	 * @return <code>true</code> if the unit satisfies the parameters
-	 * of this query, and <code>false</code> otherwise
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public boolean isMatch(Object candidate);
-
-	/**
-	 * Execute any pre-processing that must be done before this query is performed against
-	 * a particular iterator.  This method may be used by subclasses to do any calculations,
-	 * caching, or other preparation for the query.
-	 * <p>
-	 * This method is internal to the framework.  Subclasses may override this method, but
-	 * should not call this method.
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public void prePerform();
-
-	/**
-	 * Execute any post-processing that must be done after this query has been performed against
-	 * a particular iterator.  This method may be used by subclasses to clear caches or any other
-	 * cleanup that should occur after a query.  
-	 * <p>
-	 * This method will be called even if the query does not complete successfully.
-	 * <p>
-	 * This method is internal to the framework.  Subclasses may override this method, but
-	 * should not call this method.
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public void postPerform();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IQueryable.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IQueryable.java
deleted file mode 100644
index 4cb76d8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/IQueryable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * An IQueryable contains objects, and is able to perform queries on those objects.
- * <p>
- * This interface may be implemented by clients.
- */
-public interface IQueryable {
-	/**
-	 * Performs a query, passing any objects that satisfy the
-	 * query to the provided collector.
-	 * <p>
-	 * This method is long-running; progress and cancellation are provided
-	 * by the given progress monitor. 
-	 * </p>
-	 * 
-	 * @param query The query to perform
-	 * @param collector Collects the results of the query
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The collector argument
-	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/MatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/MatchQuery.java
deleted file mode 100644
index 52db5cb..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/MatchQuery.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-*   IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.QueryHelpers;
-
-/**
- * This class represents the superclass of most of p2's queries.  Every element
- * in the query can be evaluated by calling isMatch on it. If {@link #isMatch(Object)} returns true, 
- * then the element WILL be included in the query result.  If {@link #isMatch(Object)} returns false, then 
- * the element WILL NOT be included in the query result.
- * <p>
- * This class may be subclassed by clients. Subclasses should specify the type
- * of object they support querying on. Subclasses are also encouraged to clearly
- * specify their match algorithm, and expose the parameters involved in the match
- * computation, to allow {@link IQueryable} implementations to optimize their
- * execution of the query. 
- */
-public abstract class MatchQuery implements IMatchQuery {
-
-	/**
-	 * Returns whether the given object satisfies the parameters of this query.
-	 * 
-	 * @param candidate The object to perform the query against
-	 * @return <code>true</code> if the unit satisfies the parameters
-	 * of this query, and <code>false</code> otherwise
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 * Clients should call {@link #perform(Iterator, Collector)}
-	 */
-	public abstract boolean isMatch(Object candidate);
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId() {
-		return QueryHelpers.getId(this);
-	}
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property) {
-		return QueryHelpers.getProperty(this, property);
-	}
-
-	/**
-	 * Performs this query on the given iterator, passing all objects in the iterator 
-	 * that match the criteria of this query to the given result.
-	 */
-	public final Collector perform(Iterator iterator, Collector result) {
-		prePerform();
-		try {
-			while (iterator.hasNext()) {
-				Object candidate = iterator.next();
-				if (isMatch(candidate))
-					if (!result.accept(candidate))
-						break;
-			}
-		} finally {
-			postPerform();
-		}
-		return result;
-	}
-
-	/**
-	 * Execute any pre-processing that must be done before this query is performed against
-	 * a particular iterator.  This method may be used by subclasses to do any calculations,
-	 * caching, or other preparation for the query.
-	 * <p>
-	 * This method is internal to the framework.  Subclasses may override this method, but
-	 * should not call this method.
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public void prePerform() {
-		// nothing to do by default
-	}
-
-	/**
-	 * Execute any post-processing that must be done after this query has been performed against
-	 * a particular iterator.  This method may be used by subclasses to clear caches or any other
-	 * cleanup that should occur after a query.  
-	 * <p>
-	 * This method will be called even if the query does not complete successfully.
-	 * <p>
-	 * This method is internal to the framework.  Subclasses may override this method, but
-	 * should not call this method.
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public void postPerform() {
-		// nothing to do by default
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Query.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Query.java
deleted file mode 100644
index 955c892..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/query/Query.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.query;
-
-import java.util.Iterator;
-
-/**
- * The superclass of all queries that can be performed on an {@link IQueryable}.
- * <p>
- * 
- * <B>NOTE:  This interface does not follow the proper naming convention. It should 
- * be IQuery, however, for historic reasons it is Query.  This is likely to change.</B>
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface Query {
-
-	/**
-	 * Evaluates the query for a specific input.  
-	 * 
-	 * @param iterator The elements for which to evaluate the query on
-	 * @param result A collector to collect the results.  For each element accepted 
-	 * by the query,{@link Collector#accept(Object)} must be called.
-	 * @return The results of the query.  The collector returned must be
-	 * the collector passed in.
-	 */
-	public abstract Collector perform(Iterator iterator, Collector result);
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId();
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java
new file mode 100644
index 0000000..13b18ab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import java.net.URI;
+
+/**
+ * An instance of this service represents the location of a provisioning agent's 
+ * metadata. 
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IAgentLocation {
+	/**
+	 * Service name constant for the agent location service.
+	 */
+	public static final String SERVICE_NAME = IAgentLocation.class.getName();
+
+	/**
+	 * Returns the location where the bundle with the given namespace
+	 * may write its agent-related data.
+	 * @param namespace The namespace of the bundle storing the data
+	 * @return The data location
+	 */
+	public URI getDataArea(String namespace);
+
+	/**
+	 * Returns the root {@link URI} of the agent metadata.
+	 * 
+	 * @return the location of the agent metadata
+	 */
+	public URI getRootLocation();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java
new file mode 100644
index 0000000..b6c20e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * A provisioning agent is comprised of a modular, extensible set of related services.
+ * Each agent instance has its own separate instances of these services that are
+ * not shared with other agents. There is at most one instance of a given service
+ * tracked by an agent at any given time, which ensures all services that make
+ * up an agent instance share common service instances with each other.
+ * <p>
+ * Services are registered with an agent either directly, via the {@link #registerService(String, Object)}
+ * method, or indirectly by registering an {@link IAgentServiceFactory} in the OSGi
+ * service registry.
+ * </p>
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProvisioningAgent {
+	/**
+	 * Service name constant for the agent service. Note that an agent obtained directly
+	 * as a service typically represents the agent of the currently running system. To
+	 * obtain an agent for a different system the {@link IProvisioningAgentProvider} 
+	 * service must be used.
+	 */
+	public static final String SERVICE_NAME = IProvisioningAgent.class.getName();
+
+	public static final String INSTALLER_AGENT = "org.eclipse.equinox.p2.installer.agent"; //$NON-NLS-1$
+	public static final String INSTALLER_PROFILEID = "org.eclipse.equinox.p2.installer.profile.id"; //$NON-NLS-1$
+
+	/**
+	 * Service property identifying whether an agent is the default agent.
+	 * 
+	 * <p>
+	 * This property may be used by clients wishing to obtain or track the
+	 * provisioning agent for the currently running system. When the value of
+	 * this property is <code>"true"</code> then the corresponding service is
+	 * the agent for the currently running system. If the property is undefined or
+	 * has any other value, then the service is not the agent for the currently running system.
+	 * </p>
+	 */
+	public static final String SERVICE_CURRENT = "agent.current"; //$NON-NLS-1$
+
+	/**
+	 * Returns the service with the given service name, or <code>null</code>
+	 * if no such service is available in this agent.
+	 * @exception IllegalStateException if this agent has been stopped
+	 */
+	public Object getService(String serviceName);
+
+	/**
+	 * Registers a service with this provisioning agent.
+	 * 
+	 * @param serviceName The name of the service to register
+	 * @param service The service implementation
+	 * @exception IllegalStateException if this agent has been stopped
+	 */
+	public void registerService(String serviceName, Object service);
+
+	/**
+	 * Stops the provisioning agent. This causes services provided by this 
+	 * agent to be cleaned up and discarded. No services provided by the agent
+	 * should be referenced after the agent has been stopped, and subsequent
+	 * attempts to obtain services after the agent has stopped will fail.
+	 * <p>
+	 * An agent should only be stopped by the client who first created the agent
+	 * by invoking {@link IProvisioningAgentProvider#createAgent(java.net.URI)}.
+	 * </p>
+	 */
+	public void stop();
+
+	/**
+	 * Unregisters a service that has previously been registered with this
+	 * agent via {@link #registerService(String, Object)}. This method has
+	 * no effect if no such service is registered with this agent.
+	 * 
+	 * @param serviceName The name of the service to unregister
+	 * @param service The service implementation to unregister.
+	 */
+	public void unregisterService(String serviceName, Object service);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java
new file mode 100644
index 0000000..11fdd11
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import java.net.URI;
+
+/**
+ * An OSGi service that is used to create or obtain instances of an
+ * {@link IProvisioningAgent}.
+ * @since 2.0
+ */
+public interface IProvisioningAgentProvider {
+
+	/**
+	 * Service name constant for the agent provider service.
+	 */
+	public static final String SERVICE_NAME = IProvisioningAgentProvider.class.getName();
+
+	/**
+	 * Creates a provisioning agent who metadata is stored at the given location.
+	 * If a <code>null</code> location is provided, the provisioning agent for the 
+	 * currently running system is returned, if available. If a <code>null</code>
+	 * location is provided and the currently running system has not been provisioned
+	 * by any known agent, <code>null</code> is returned.
+	 * <p>
+	 * Callers of this method are responsible for stopping the agent
+	 * when they are finished using it by invoking {@link IProvisioningAgent#stop()}.
+	 * </p>
+	 * @param location The location where the agent metadata is stored
+	 * @return A provisioning agent, or <code>null</code> if a <code>null</code>
+	 * parameter is provided and there is no currently running agent.
+	 * @throws ProvisionException If agent creation failed. Reasons include:
+	 * <ul>
+	 * <li>The location is not writeable.</li>
+	 * </ul>
+	 * @see IProvisioningAgent#stop()
+	 */
+	public IProvisioningAgent createAgent(URI location) throws ProvisionException;
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
new file mode 100644
index 0000000..af5b678
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.Activator;
+
+/**
+ * A checked exception indicating a recoverable error occurred while provisioning.
+ * The status provides a further description of the problem.
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class ProvisionException extends CoreException {
+	private static final long serialVersionUID = 1L;
+
+	//General and core status codes [0-1000]
+	/**
+	 * Status code constant (value 1) for an uncategorized error.
+	 */
+	public static final int INTERNAL_ERROR = 1;
+
+	//Repository status codes [1000-1999]
+	//General repository codes [1000-1099]
+	/** 
+	 * Status code constant (value 1000) indicating a repository
+	 * unexpectedly does not exist.
+	 */
+	public static final int REPOSITORY_NOT_FOUND = 1000;
+
+	/** 
+	 * Status code constant (value 1001) indicating a repository
+	 * unexpectedly exists.
+	 */
+	public static final int REPOSITORY_EXISTS = 1001;
+
+	/** 
+	 * Status code constant (value 1002) indicating a repository
+	 * could not be read
+	 */
+	public static final int REPOSITORY_FAILED_READ = 1002;
+
+	/** 
+	 * Status code constant (value 1003) indicating a failure occurred
+	 * while writing to a repository.
+	 */
+	public static final int REPOSITORY_FAILED_WRITE = 1003;
+
+	/** 
+	 * Status code constant (value 1004) indicating a repository
+	 * could not be written because it is a read-only repository.
+	 */
+	public static final int REPOSITORY_READ_ONLY = 1004;
+
+	/** 
+	 * Status code constant (value 1005) indicating an attempt was
+	 * made to create or access a repository of unknown type.
+	 */
+	public static final int REPOSITORY_UNKNOWN_TYPE = 1005;
+	/** 
+	 * Status code constant (value 1006) indicating that a specified
+	 * repository location is not valid.
+	 */
+	public static final int REPOSITORY_INVALID_LOCATION = 1006;
+
+	/** 
+	 * Status code constant (value 1007) indicating that there was
+	 * an authentication error while reading a repository
+	 */
+	public static final int REPOSITORY_FAILED_AUTHENTICATION = 1007;
+
+	//Metadata repository codes [1100-1199]
+
+	//Artifact repository codes [1200-1299]
+
+	/** 
+	 * Status code constant (value 1200) indicating an artifact unexpectedly
+	 * does not exist.
+	 */
+	public static final int ARTIFACT_NOT_FOUND = 1200;
+
+	/** 
+	 * Status code constant (value 1201) indicating an artifact unexpectedly
+	 * already exists.
+	 */
+	public static final int ARTIFACT_EXISTS = 1201;
+
+	/**
+	 * Status code constant (value 1202) indicating an artifact's size
+	 * could not be found.
+	 */
+	public static final int ARTIFACT_INCOMPLETE_SIZING = 1202;
+
+	/**
+	 * Creates a new exception with the given status object.  The message
+	 * of the given status is used as the exception message.
+	 *
+	 * @param status the status object to be associated with this exception
+	 */
+	public ProvisionException(IStatus status) {
+		super(status);
+	}
+
+	/**
+	 * Creates a new exception with the given message and a severity of 
+	 * {@link IStatus#ERROR}.
+	 *
+	 * @param message The human-readable problem message
+	 */
+	public ProvisionException(String message) {
+		super(new Status(IStatus.ERROR, Activator.ID, message));
+	}
+
+	/**
+	 * Creates a new exception with the given message and cause, and
+	 * a severity of {@link IStatus#ERROR}.
+	 *
+	 * @param message The human-readable problem message
+	 * @param cause The underlying cause of the exception
+	 */
+	public ProvisionException(String message, Throwable cause) {
+		super(new Status(IStatus.ERROR, Activator.ID, message, cause));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java
new file mode 100644
index 0000000..2510d4d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core;
+
+import java.security.cert.Certificate;
+
+/**
+ * Service used for prompting for user information from within lower level code.
+ * Implementors of this service are responsible for registering the service.
+ * 
+ * It is possible that the UIServices service is requested very early in the startup
+ * sequence for an application.  For example, applications that check for updates 
+ * during startup will trigger the service lookup if a server requiring authentication
+ * is detected.  For this reason, implementors of UIServices should ensure that the 
+ * bundle providing the service is partitioned appropriately.
+ * 
+ * @since 2.0
+ */
+public abstract class UIServices {
+	/**
+	 * Service name constant for the UI service.
+	 */
+	public static final String SERVICE_NAME = UIServices.class.getName();
+
+	/**
+	 * Authentication information returned from an authentication prompt request.
+	 */
+	public static class AuthenticationInfo {
+		private final boolean save;
+		private final String userName;
+		private final String password;
+
+		public AuthenticationInfo(String userName, String password, boolean saveResult) {
+			this.userName = userName;
+			this.password = password;
+			this.save = saveResult;
+		}
+
+		public boolean saveResult() {
+			return save;
+		}
+
+		public String getUserName() {
+			return userName;
+		}
+
+		public String getPassword() {
+			return password;
+		}
+	}
+
+	/**
+	 * Trust information returned from a trust request.	 *
+	 */
+	public static class TrustInfo {
+		private final Certificate[] trustedCertificates;
+		private final boolean saveTrustedCertificates;
+		private final boolean trustUnsigned;
+
+		public TrustInfo(Certificate[] trusted, boolean save, boolean trustUnsigned) {
+			this.trustedCertificates = trusted;
+			this.saveTrustedCertificates = save;
+			this.trustUnsigned = trustUnsigned;
+		}
+
+		/**
+		 * Return an array of the certificates that should be trusted for the
+		 * requested operation.
+		 * 
+		 * @return the trusted certificates, or <code>null</code> if there are
+		 * no certificates that were verified as trusted.
+		 */
+		public Certificate[] getTrustedCertificates() {
+			return trustedCertificates;
+		}
+
+		/**
+		 * Return a boolean indicating whether the trusted certificates should
+		 * be persisted for future operations.
+		 * 
+		 * @return <code>true</code> if the trusted certificates should be persisted, <code>false</code> if 
+		 * the trust only applies for this request.
+		 */
+		public boolean persistTrust() {
+			return saveTrustedCertificates;
+		}
+
+		/**
+		 * Return a boolean indicating whether the unsigned content should be trusted
+		 * during this operation.
+		 * 
+		 * @return <code>true</code> if the unsigned content should be trusted, or if there was no unsigned content, 
+		 * and <code>false</code> if there was unsigned content and should not be trusted.
+		 */
+		public boolean trustUnsignedContent() {
+			return trustUnsigned;
+		}
+	}
+
+	/**
+	 * Opens a UI prompt for authentication details
+	 * 
+	 * @param location - the location requiring login details, may be <code>null</code>.
+	 * @return The authentication result
+	 */
+	public abstract AuthenticationInfo getUsernamePassword(String location);
+
+	/**
+	 * Opens a UI prompt for authentication details when cached or remembered details
+	 * where not accepted.
+	 * 
+	 * @param location  the location requiring login details
+	 * @param previousInfo - the previously used authentication details - may not be null.
+	 * @return The authentication result
+	 */
+	public abstract AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo);
+
+	/**
+	 * Opens a UI prompt to capture information about trusted content.
+	 *  
+	 * @param untrustedChain - an array of certificate chains for which there is no current trust anchor.  May be
+	 * <code>null</code>, which means there are no untrusted certificate chains.
+	 * @param unsignedDetail - an array of strings, where each String describes content that is not signed.
+	 * May be <code>null</code>, which means there is no unsigned content
+	 * @return  the TrustInfo that describes the user's choices for trusting certificates and
+	 * unsigned content. 
+	 */
+	public abstract TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html
new file mode 100644
index 0000000..e79ec12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides core support for interacting with a p2-based provisioning system
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for creating, using, and extending a provisioning system.
+A provisioning agent ties together a set of related services that work together
+to implement a provisioning system. For end users of the provisioning system,
+they simply instantiate or obtain an agent and get the services they require from
+the agent. Extenders can register a factory for adding new services to the system,
+or add services directly to an agent.
+</p>
+<p>
+This package also provides some basic utility classes that are common across large
+parts of the system.
+</p>
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java
new file mode 100644
index 0000000..c8a69af
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core.spi;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+
+/**
+ * Services created by {@link IAgentServiceFactory} objects can optionally implement
+ * this interface to participate in the agent lifecycle.
+ * @since 2.0
+ */
+public interface IAgentService {
+	/**
+	 * This method is invoked when a service is added to an agent. This can occur
+	 * either because a client looked up the service and it was lazily instantiated by
+	 * the agent, or because the service was registered manually via {@link IProvisioningAgent#registerService(String, Object)}.
+	 */
+	public void start();
+
+	/**
+	 * This method is invoked when a service is removed from an agent. This can occur
+	 * either because the agent was stopped, or because the service was manually
+	 * unregistered via {@link IProvisioningAgent#unregisterService(String, Object)}.
+	 * <p>
+	 * Services must not attempt to obtain further services from their agent while
+	 * stopping, as some required services may no longer be available.
+	 */
+	public void stop();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java
new file mode 100644
index 0000000..0c1b7de
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.core.spi;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+
+/**
+ * A factory for creating a service that forms part of a provisioning agent instance.
+ * Factories themselves are registered in the OSGi service registry so that they
+ * can be obtained by a provisioning agent.
+ * @since 2.0
+ */
+public interface IAgentServiceFactory {
+	/**
+	 * The service name for the factory service.
+	 */
+	public static final String SERVICE_NAME = IAgentServiceFactory.class.getName();
+
+	/**
+	 * The service property specifying the name of the service created by this factory.
+	 */
+	public static final String PROP_CREATED_SERVICE_NAME = "p2.agent.servicename"; //$NON-NLS-1$
+
+	/**
+	 * Instantiates a service instance for the given provisioning agent.
+	 * 
+	 * @param agent The agent this service will belong to
+	 * @return The created service
+	 */
+	public Object createService(IProvisioningAgent agent);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html
new file mode 100644
index 0000000..70d3ca5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides API for customizing and extending a p2-based provisioning system
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for extending and customizing a provisioning system.
+A provisioning agent ties together a set of related services that work together
+to implement a provisioning system. Extenders can register a factory for adding new 
+services to the system, or add services directly to an agent.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.classpath
index 75116d7..834ea83 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" output="bin_ant" path="src_ant"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
index 225deca..14a07a3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch	
@@ -2,7 +2,7 @@
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1255396835944_5" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.equinox.p2.director.app" type="4"/>
</launchConfigurationWorkingSet>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 <listEntry value="/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml"/>
 </listAttribute>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
index 05a85c1..f01b97a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
@@ -1,23 +1,24 @@
-#Fri Apr 24 11:01:33 EDT 2009
+#Fri Jan 22 13:29:43 EST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
 org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
 org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -26,7 +27,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -50,6 +51,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -60,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
@@ -68,7 +70,7 @@ org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
@@ -81,6 +83,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverridin
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
@@ -88,7 +91,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..233758b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Wed Oct 07 15:35:11 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
index fa286ac..16245de 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
@@ -1,32 +1,30 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.director.app;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.director.app;singleton:=true
+Bundle-Version: 1.0.201.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.director.app.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
+Export-Package: org.eclipse.equinox.internal.p2.director.app;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.equinox.app,
- org.eclipse.equinox.internal.p2.console,
  org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.engine.phases,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.osgi.framework.log,
  org.eclipse.osgi.service.environment,
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.osgi.framework
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.app.Activator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.osgi;bundle-version="3.4.0"
-Export-Package: org.eclipse.equinox.internal.p2.director.app;x-internal:=true
+ org.eclipse.osgi.util,
+ org.osgi.framework,
+ org.osgi.service.packageadmin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.director.app/build.properties
index fd5507d..d80a7ff 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/build.properties
@@ -21,3 +21,5 @@ src.includes = about.html
 jars.compile.order=.,ant_tasks/director-ant.jar
 extra.ant_tasks/director-ant.jar = platform:/plugin/org.apache.ant
 jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/config.ini b/eclipse/plugins/org.eclipse.equinox.p2.director.app/config.ini
index 9cfadc2..fe07723 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/config.ini
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/config.ini
@@ -55,7 +55,6 @@ osgi.bundles=\
 	org.eclipse.equinox.p2.director.app,\
 	org.eclipse.equinox.p2.download,\
 	org.eclipse.equinox.p2.engine,\
-	org.eclipse.equinox.p2.exemplarysetup at start,\
 	org.eclipse.equinox.p2.jarprocessor,\
 	org.eclipse.equinox.p2.metadata,\
 	org.eclipse.equinox.p2.metadata.repository,\
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/director app.launch b/eclipse/plugins/org.eclipse.equinox.p2.director.app/director app.launch
index 72c6475..e2020f8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/director app.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/director app.launch	
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
 <booleanAttribute key="append.args" value="true"/>
 <booleanAttribute key="automaticAdd" value="false"/>
@@ -11,14 +11,14 @@
 <intAttribute key="default_start_level" value="4"/>
 <booleanAttribute key="includeOptional" value="false"/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.director.app.application
-metadataRepository file:d:/tmp/cdt/site.xml -artifactRepository file:d:/tmp/cdt/site.xml -installIU org.eclipse.cdt.feature.group -destination d:/tmp/remoteInstall/eclipse/ -profile SDKProfile"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consoleLog -application org.eclipse.equinox.p2.director -installIU org.eclipse.e4.workbench.sdk -p2.os macosx -p2.ws cocoa -p2.arch x86 -roaming -profile SDKProfile -metadatarepository file:/Users/Pascal/tmp/paul/helios/,file:/Users/Pascal/tmp/paul/e4/ -destination /Users/Pascal/tmp/paul/install -bundlepool /Users/Pascal/tmp/paul/install"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.p2.data.area=d:/tmp/remoteInstall/eclipse/p2"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Doff.eclipse.p2.data.area=file:/Application/eclipse/p2/
-Doff.eclipse.p2.profile=SDKProfile"/>
 <stringAttribute key="pde.version" value="3.3"/>
 <booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.ant.core at default:default,org.eclipse.equinox.app at default:default,org.eclipse.osgi@:,org.eclipse.equinox.security at default:default,org.eclipse.equinox.security.win32.x86 at default:false,org.eclipse.core.variables at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.equinox.common at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.core.runtime.compatibility.registry at default:false,org.eclipse.core.jobs at default:default,org.eclipse.core.contenttype at default:default,org.eclipse.core.runtime at default:true,org.eclipse.osgi.services at default:default,org.eclipse.core.runtime.compatibility.auth at default:default"/>
+<stringAttribute key="target_bundles" value="org.eclipse.equinox.security at default:default,org.eclipse.core.runtime at default:true,org.eclipse.equinox.security.macosx at default:false,org.eclipse.osgi at -1:true,org.eclipse.core.runtime.compatibility.auth at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.ant.core at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.core.contenttype at default:default,org.eclipse.core.runtime.compatibility.registry at default:false,org.eclipse.equinox.common at 2:true,org.eclipse.osgi.services at default:default,org.eclipse.equinox.app at default:default,org.eclipse.core.variables at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.core.jobs at default:default"/>
 <booleanAttribute key="tracing" value="false"/>
 <booleanAttribute key="useDefaultConfigArea" value="true"/>
 <booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.exemplarysetup at default:true,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.frameworkadmin.equinox at default:true,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.frameworkadmin at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.director.app at default:default,org.eclipse.equinox.p2.director at default:default,org.sat4j.pb at default:default,org.eclipse.equinox.simpleconfigurator.manipulator at default:true,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.p2.metadata.generator at default:default,org.eclipse.equinox.p2.garbagecollector at default:default,org.eclipse.equinox.p2.updatesite at default:default,org.eclipse.equinox.p2.console at default:default,org.eclipse.equinox.p2.engine at default:default,org.sat4j.core at default:default"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.garbagecollector at default:default,org.eclipse.equinox.p2.director.app at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.equinox.p2.metadata.generator at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.p2.exemplarysetup at default:true,org.eclipse.equinox.simpleconfigurator.manipulator at default:true,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.repository at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.p2.console at default:default,org.sat4j.pb at default:default,org.eclipse.equinox.p2.updatesite at default:default,org.eclipse.equinox.frameworkadmin at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.frameworkadmin.equinox at default:true,org.sat4j.core at default:default,org.eclipse.ecf.provider.filetransfer.ssl at default:false,org.eclipse.ecf at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.ecf.ssl at default:false,org.eclipse.equinox.p2.publisher at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default"/>
 </launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.director.app/plugin.xml
index d429492..6d9af37 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/plugin.xml
@@ -23,4 +23,11 @@
 	<extension point="org.eclipse.ant.core.extraClasspathEntries">
 		<extraClasspathEntry library="ant_tasks/director-ant.jar"/>
 	</extension>
+	<extension point="org.eclipse.ant.core.antTasks">
+		<antTask
+			library="ant_tasks/director-ant.jar"
+			name="p2.director"
+			class="org.eclipse.equinox.p2.director.app.ant.DirectorTask">
+		</antTask>
+	</extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.director.app/pom.xml
new file mode 100644
index 0000000..4451f7c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.director.app</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
index e58c046..2a16dcc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.director.app;
 
@@ -19,37 +20,34 @@ import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.console.ProvisioningHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
 import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.framework.log.FrameworkLog;
+import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.ServiceReference;
 
 /**
  * This is the original p2 director application created for the p2 1.0 release. There
  * is a replacement application in {@link DirectorApplication} that should be preferred
  * over this implementation where possible. This implementation remains for backwards
  * compatibility purposes.
+ * @deprecated
  */
 public class Application implements IApplication {
 	private static final Integer EXIT_ERROR = new Integer(13);
 	static private final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
 	static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
-	static private final String EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$
-	static private final String FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
-	static private final String SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
 
 	public static final int COMMAND_INSTALL = 0;
 	public static final int COMMAND_UNINSTALL = 1;
@@ -83,43 +81,86 @@ public class Application implements IApplication {
 	private boolean noProfileId = false;
 
 	private int command = -1;
-
-	private ServiceReference packageAdminRef;
-	private PackageAdmin packageAdmin;
+	protected IProvisioningAgent agent;
 
 	private void ambigousCommand(int cmd1, int cmd2) throws CoreException {
 		throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Ambigous_Command, new Object[] {COMMAND_NAMES[cmd1], COMMAND_NAMES[cmd2]})));
 	}
 
-	private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collector roots, boolean install) {
+	private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IQueryResult<IInstallableUnit> roots, boolean install) {
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
 		markRoots(request, roots);
 		if (install) {
-			request.addInstallableUnits((IInstallableUnit[]) roots.toArray(IInstallableUnit.class));
+			request.addAll(roots.toUnmodifiableSet());
 		} else {
-			request.removeInstallableUnits((IInstallableUnit[]) roots.toArray(IInstallableUnit.class));
+			request.removeAll(roots.toUnmodifiableSet());
 		}
 		return request;
 	}
 
-	synchronized Bundle getBundle(String symbolicName) {
-		if (packageAdmin == null)
+	/*
+	 * Copied from ProvisioningHelper 1.57
+	 */
+	static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (profileRegistry == null)
 			return null;
+		IProfile profile = profileRegistry.getProfile(profileId);
+		if (profile != null)
+			return profile;
+
+		Map<String, String> profileProperties = new HashMap<String, String>(properties);
+		if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
+			EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
+			if (info != null)
+				profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+			else
+				profileProperties.put(IProfile.PROP_ENVIRONMENTS, ""); //$NON-NLS-1$
+		}
+		return profileRegistry.addProfile(profileId, profileProperties);
+	}
 
-		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
+	/*
+	 * Copied from ProvisioningHelper 1.57
+	 */
+	static IProfile getProfile(IProvisioningAgent agent, String id) {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (profileRegistry == null)
+			return null;
+		return profileRegistry.getProfile(id);
+	}
+
+	/*
+	 * Copied from ProvisioningHelper 1.57
+	 */
+	static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		if (manager == null)
+			throw new IllegalStateException("No metadata repository manager found"); //$NON-NLS-1$
+		try {
+			return manager.loadRepository(location, null);
+		} catch (ProvisionException e) {
 			return null;
-		//Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
-				return bundles[i];
-			}
 		}
-		return null;
+	}
+
+	/*
+	 * Copied from ProvisioningHelper 1.57
+	 */
+	static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		IQueryable<IInstallableUnit> queryable = null;
+		if (location == null) {
+			queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		} else {
+			queryable = getMetadataRepository(agent, location);
+		}
+		if (queryable != null)
+			return queryable.query(query, monitor);
+		return Collector.emptyCollector();
 	}
 
 	private String getEnvironmentProperty() {
-		Properties values = new Properties();
+		Map<String, String> values = new HashMap<String, String>();
 		if (os != null)
 			values.put("osgi.os", os); //$NON-NLS-1$
 		if (nl != null)
@@ -138,33 +179,29 @@ public class Application implements IApplication {
 			profileId = IProfileRegistry.SELF;
 			noProfileId = true;
 		}
-		IProfile profile = ProvisioningHelper.getProfile(profileId);
+		IProfile profile = getProfile(agent, profileId);
 		if (profile == null) {
 			if (destination == null)
 				missingArgument("destination"); //$NON-NLS-1$
 			if (flavor == null)
 				flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
 
-			Properties props = new Properties();
-			props.setProperty(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
-			props.setProperty(IProfile.PROP_FLAVOR, flavor);
+			Map<String, String> props = new HashMap<String, String>();
+			props.put(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
 			if (bundlePool == null || bundlePool.equals(Messages.destination_commandline))
-				props.setProperty(IProfile.PROP_CACHE, destination.toOSString());
+				props.put(IProfile.PROP_CACHE, destination.toOSString());
 			else
-				props.setProperty(IProfile.PROP_CACHE, bundlePool);
+				props.put(IProfile.PROP_CACHE, bundlePool);
 			if (roamingProfile)
-				props.setProperty(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
+				props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
 
 			String env = getEnvironmentProperty();
 			if (env != null)
-				props.setProperty(IProfile.PROP_ENVIRONMENTS, env);
+				props.put(IProfile.PROP_ENVIRONMENTS, env);
 			if (profileProperties != null) {
 				putProperties(profileProperties, props);
 			}
-			profile = ProvisioningHelper.addProfile(profileId, props);
-			String currentFlavor = profile.getProperty(IProfile.PROP_FLAVOR);
-			if (currentFlavor != null && !currentFlavor.endsWith(flavor))
-				throw new RuntimeException(NLS.bind("Install flavor {0} not consistent with profile flavor {1}", flavor, currentFlavor)); //$NON-NLS-1$
+			profile = addProfile(agent, profileId, props);
 		}
 		return profile;
 	}
@@ -174,7 +211,7 @@ public class Application implements IApplication {
 			if (throwException)
 				missingArgument("artifactRepository"); //$NON-NLS-1$
 		} else {
-			artifactManager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+			artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 			if (artifactManager == null) {
 				if (throwException)
 					throw new ProvisionException(Messages.Application_NoManager);
@@ -204,7 +241,7 @@ public class Application implements IApplication {
 			if (throwException)
 				missingArgument("metadataRepository"); //$NON-NLS-1$
 		} else {
-			metadataManager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+			metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 			if (metadataManager == null) {
 				if (throwException)
 					throw new ProvisionException(Messages.Application_NoManager);
@@ -231,23 +268,27 @@ public class Application implements IApplication {
 		}
 	}
 
-	private void initializeServices() {
-		IDirector director = (IDirector) ServiceHelper.getService(Activator.getContext(), IDirector.class.getName());
+	private void initializeServices() throws ProvisionException {
+		ServiceReference agentProviderRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(agentProviderRef);
+		agent = provider.createAgent(null);
+
+		IDirector director = (IDirector) agent.getService(IDirector.SERVICE_NAME);
 		if (director == null)
 			throw new RuntimeException(Messages.Missing_director);
 
-		planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
+		planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
 		if (planner == null)
 			throw new RuntimeException(Messages.Missing_planner);
 
-		engine = (IEngine) ServiceHelper.getService(Activator.getContext(), IEngine.SERVICE_NAME);
+		engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
 		if (engine == null)
 			throw new RuntimeException(Messages.Missing_Engine);
 	}
 
-	private void markRoots(ProfileChangeRequest request, Collector roots) {
-		for (Iterator iterator = roots.iterator(); iterator.hasNext();) {
-			request.setInstallableUnitProfileProperty((IInstallableUnit) iterator.next(), IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+	private void markRoots(IProfileChangeRequest request, IQueryResult<IInstallableUnit> roots) {
+		for (Iterator<IInstallableUnit> iterator = roots.iterator(); iterator.hasNext();) {
+			request.setInstallableUnitProfileProperty(iterator.next(), IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
 		}
 	}
 
@@ -256,7 +297,7 @@ public class Application implements IApplication {
 	}
 
 	private IStatus planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) {
-		ProvisioningPlan result;
+		IProvisioningPlan result;
 		IStatus operationStatus;
 		result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		if (!result.getStatus().isOK())
@@ -268,13 +309,13 @@ public class Application implements IApplication {
 	}
 
 	private void printRequest(ProfileChangeRequest request) {
-		IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
-		IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
-		for (int i = 0; i < toAdd.length; i++) {
-			System.out.println(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
+		Collection<IInstallableUnit> toAdd = request.getAdditions();
+		Collection<IInstallableUnit> toRemove = request.getRemovals();
+		for (IInstallableUnit added : toAdd) {
+			System.out.println(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
 		}
-		for (int i = 0; i < toRemove.length; i++) {
-			System.out.println(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].getVersion()));
+		for (IInstallableUnit removed : toRemove) {
+			System.out.println(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
 		}
 	}
 
@@ -345,7 +386,7 @@ public class Application implements IApplication {
 
 			if (opt.equalsIgnoreCase("-version")) { //$NON-NLS-1$
 				if (arg != null && !arg.startsWith(ANT_PROPERTY_PREFIX))
-					version = new Version(arg);
+					version = Version.create(arg);
 			}
 
 			if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_UNINSTALL])) {
@@ -375,7 +416,7 @@ public class Application implements IApplication {
 	 * @param pairs	a comma separated list of tag=value pairs
 	 * @param properties the collection into which the pairs are put
 	 */
-	private void putProperties(String pairs, Properties properties) {
+	private void putProperties(String pairs, Map<String, String> properties) {
 		StringTokenizer tok = new StringTokenizer(pairs, ",", true); //$NON-NLS-1$
 		while (tok.hasMoreTokens()) {
 			String next = tok.nextToken().trim();
@@ -391,14 +432,14 @@ public class Application implements IApplication {
 	}
 
 	public Object run(String[] args) throws Exception {
-		System.out.println("This application is deprecated. Please use the org.eclipse.equinox.p2.director application.");
+		System.out.println(Messages.Deprecated_application);
 		long time = -System.currentTimeMillis();
 		initializeServices();
 		processArguments(args);
 
 		IStatus operationStatus = Status.OK_STATUS;
-		InstallableUnitQuery query;
-		Collector roots;
+		IQuery<IInstallableUnit> query;
+		IQueryResult<IInstallableUnit> roots;
 		try {
 			initializeRepositories(command == COMMAND_INSTALL);
 			switch (command) {
@@ -406,11 +447,11 @@ public class Application implements IApplication {
 				case COMMAND_UNINSTALL :
 
 					IProfile profile = initializeProfile();
-					query = new InstallableUnitQuery(root, version == null ? VersionRange.emptyRange : new VersionRange(version, true, version, true));
-					roots = collectRootIUs(metadataRepositoryLocations, new CompositeQuery(new Query[] {query, new LatestIUVersionQuery()}), new Collector());
-					if (roots.size() <= 0)
-						roots = profile.query(query, roots, new NullProgressMonitor());
-					if (roots.size() <= 0) {
+					query = QueryUtil.createIUQuery(root, version == null ? VersionRange.emptyRange : new VersionRange(version, true, version, true));
+					roots = collectRootIUs(metadataRepositoryLocations, QueryUtil.createLatestQuery(query));
+					if (roots.isEmpty())
+						roots = profile.query(query, new NullProgressMonitor());
+					if (roots.isEmpty()) {
 						System.out.println(NLS.bind(Messages.Missing_IU, root));
 						logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_IU, root)));
 						return EXIT_ERROR;
@@ -427,7 +468,8 @@ public class Application implements IApplication {
 							logFailure(multi);
 							return EXIT_ERROR;
 						}
-						ProvisioningContext context = new ProvisioningContext(metadataRepositoryLocations);
+						ProvisioningContext context = new ProvisioningContext(agent);
+						context.setMetadataRepositories(metadataRepositoryLocations);
 						context.setArtifactRepositories(artifactRepositoryLocations);
 						ProfileChangeRequest request = buildProvisioningRequest(profile, roots, command == COMMAND_INSTALL);
 						printRequest(request);
@@ -439,14 +481,14 @@ public class Application implements IApplication {
 					}
 					break;
 				case COMMAND_LIST :
-					query = new InstallableUnitQuery(null, VersionRange.emptyRange);
+					query = QueryUtil.createIUQuery(null, VersionRange.emptyRange);
 					if (metadataRepositoryLocations == null)
 						missingArgument("metadataRepository"); //$NON-NLS-1$
 
-					roots = collectRootIUs(metadataRepositoryLocations, query, null);
-					Iterator unitIterator = roots.iterator();
+					roots = collectRootIUs(metadataRepositoryLocations, query);
+					Iterator<IInstallableUnit> unitIterator = roots.iterator();
 					while (unitIterator.hasNext()) {
-						IInstallableUnit iu = (IInstallableUnit) unitIterator.next();
+						IInstallableUnit iu = unitIterator.next();
 						System.out.println(iu.getId());
 					}
 					break;
@@ -479,77 +521,49 @@ public class Application implements IApplication {
 		}
 	}
 
-	class LocationQueryable implements IQueryable {
+	class LocationQueryable implements IQueryable<IInstallableUnit> {
 		private URI location;
 
 		public LocationQueryable(URI location) {
 			this.location = location;
 		}
 
-		public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-			return ProvisioningHelper.getInstallableUnits(location, query, collector, monitor);
+		public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			return getInstallableUnits(agent, location, query, monitor);
 		}
 	}
 
-	private Collector collectRootIUs(URI[] locations, Query query, Collector collector) {
+	private IQueryResult<IInstallableUnit> collectRootIUs(URI[] locations, IQuery<IInstallableUnit> query) {
 		IProgressMonitor nullMonitor = new NullProgressMonitor();
 
 		if (locations == null || locations.length == 0)
-			return ProvisioningHelper.getInstallableUnits(null, query, collector, nullMonitor);
+			return getInstallableUnits(agent, (URI) null, query, nullMonitor);
 
-		Collector result = collector != null ? collector : new Collector();
-		IQueryable[] locationQueryables = new IQueryable[locations.length];
-		for (int i = 0; i < locations.length; i++) {
-			locationQueryables[i] = new LocationQueryable(locations[i]);
-		}
-		return new CompoundQueryable(locationQueryables).query(query, result, nullMonitor);
-	}
-
-	private synchronized void setPackageAdmin(PackageAdmin service) {
-		packageAdmin = service;
-	}
-
-	private boolean startEarly(String bundleName) throws BundleException {
-		Bundle bundle = getBundle(bundleName);
-		if (bundle == null)
-			return false;
-		bundle.start(Bundle.START_TRANSIENT);
-		return true;
+		List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(locations.length);
+		for (int i = 0; i < locations.length; i++)
+			locationQueryables.add(new LocationQueryable(locations[i]));
+		return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
 	}
 
 	public Object start(IApplicationContext context) throws Exception {
-		packageAdminRef = Activator.getContext().getServiceReference(PackageAdmin.class.getName());
-		setPackageAdmin((PackageAdmin) Activator.getContext().getService(packageAdminRef));
-		if (!startEarly(EXEMPLARY_SETUP)) {
-			logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, EXEMPLARY_SETUP)));
-			return EXIT_ERROR;
-		}
-		if (!startEarly(SIMPLE_CONFIGURATOR_MANIPULATOR)) {
-			logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, SIMPLE_CONFIGURATOR_MANIPULATOR)));
-			return EXIT_ERROR;
-		}
-		if (!startEarly(FRAMEWORKADMIN_EQUINOX)) {
-			logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_bundle, FRAMEWORKADMIN_EQUINOX)));
-			return EXIT_ERROR;
-		}
-
 		return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
 	}
 
 	public void stop() {
-		setPackageAdmin(null);
-		Activator.getContext().ungetService(packageAdminRef);
+		//nothing to do
 	}
 
-	private String toString(Properties context) {
+	private String toString(Map<String, String> context) {
 		StringBuffer result = new StringBuffer();
-		for (Enumeration iter = context.keys(); iter.hasMoreElements();) {
-			String key = (String) iter.nextElement();
+		boolean first = true;
+		for (String key : context.keySet()) {
+			if (first)
+				first = false;
+			else
+				result.append(',');
 			result.append(key);
 			result.append('=');
 			result.append(context.get(key));
-			if (iter.hasMoreElements())
-				result.append(',');
 		}
 		return result.toString();
 	}
@@ -584,9 +598,10 @@ public class Application implements IApplication {
 		// will set it back later (see bug 269468)
 		request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
 
-		ProvisioningContext context = new ProvisioningContext(new URI[0]);
+		ProvisioningContext context = new ProvisioningContext(agent);
+		context.setMetadataRepositories(new URI[0]);
 		context.setArtifactRepositories(new URI[0]);
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
 	}
 
@@ -596,9 +611,10 @@ public class Application implements IApplication {
 	private IStatus setRoaming(IProfile profile) {
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
 		request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
-		ProvisioningContext context = new ProvisioningContext(new URI[0]);
+		ProvisioningContext context = new ProvisioningContext(agent);
+		context.setMetadataRepositories(new URI[0]);
 		context.setArtifactRepositories(new URI[0]);
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
 	}
 
@@ -606,7 +622,7 @@ public class Application implements IApplication {
 		if (spec == null)
 			return null;
 		String[] urlSpecs = getArrayFromString(spec, ","); //$NON-NLS-1$
-		ArrayList result = new ArrayList(urlSpecs.length);
+		ArrayList<URI> result = new ArrayList<URI>(urlSpecs.length);
 		for (int i = 0; i < urlSpecs.length; i++) {
 			try {
 				result.add(URIUtil.fromString(urlSpecs[i]));
@@ -616,7 +632,7 @@ public class Application implements IApplication {
 		}
 		if (result.size() == 0)
 			return null;
-		return (URI[]) result.toArray(new URI[result.size()]);
+		return result.toArray(new URI[result.size()]);
 	}
 
 	/**
@@ -626,13 +642,13 @@ public class Application implements IApplication {
 	public static String[] getArrayFromString(String list, String separator) {
 		if (list == null || list.trim().equals("")) //$NON-NLS-1$
 			return new String[0];
-		List result = new ArrayList();
+		List<String> result = new ArrayList<String>();
 		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
 			String token = tokens.nextToken().trim();
 			if (!token.equals("")) //$NON-NLS-1$
 				result.add(token);
 		}
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 	private void logFailure(IStatus status) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index 4410053..c7e4be0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,28 +9,29 @@
  *     IBM Corporation - initial API and implementation
  *     Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.director.app;
 
 import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.security.cert.Certificate;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.console.ProvisioningHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
 import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.eclipse.osgi.util.NLS;
@@ -38,21 +39,39 @@ import org.osgi.framework.*;
 import org.osgi.service.packageadmin.PackageAdmin;
 
 /**
- * This director implementation is a complete replacement for the old director application
- * found in {@link Application}. This implementation has simplified command line 
+ * This director implementation is a complete replacement for the old director application. 
+ * This implementation has simplified command line 
  * arguments, and doesn't require the user to set system property such as the
  * p2 data location. See bug 268138 for related discussion.
  */
 public class DirectorApplication implements IApplication {
-	class LocationQueryable implements IQueryable {
+	class AvoidTrustPromptService extends UIServices {
+		@Override
+		public AuthenticationInfo getUsernamePassword(String location) {
+			return null;
+		}
+
+		@Override
+		public AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo) {
+			return null;
+		}
+
+		@Override
+		public TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail) {
+			return new TrustInfo(null, false, true);
+		}
+	}
+
+	class LocationQueryable implements IQueryable<IInstallableUnit> {
 		private URI location;
 
 		public LocationQueryable(URI location) {
 			this.location = location;
+			Assert.isNotNull(location);
 		}
 
-		public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-			return ProvisioningHelper.getInstallableUnits(location, query, collector, monitor);
+		public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			return getInstallableUnits(location, query, monitor);
 		}
 	}
 
@@ -92,9 +111,10 @@ public class DirectorApplication implements IApplication {
 	}
 
 	private static final CommandLineOption OPTION_HELP = new CommandLineOption(new String[] {"-help", "-h", "-?"}, null, Messages.Help_Prints_this_command_line_help); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	private static final CommandLineOption OPTION_LIST = new CommandLineOption(new String[] {"-list", "-l"}, null, Messages.Help_List_all_IUs_found_in_repos); //$NON-NLS-1$ //$NON-NLS-2$
+	private static final CommandLineOption OPTION_LIST = new CommandLineOption(new String[] {"-list", "-l"}, Messages.Help_lb_lt_comma_separated_list_gt_rb, Messages.Help_List_all_IUs_found_in_repos); //$NON-NLS-1$ //$NON-NLS-2$
 	private static final CommandLineOption OPTION_INSTALL_IU = new CommandLineOption(new String[] {"-installIU", "-installIUs", "-i"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Installs_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	private static final CommandLineOption OPTION_UNINSTALL_IU = new CommandLineOption(new String[] {"-uninstallIU", "-uninstallIUs", "-u"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Uninstalls_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	private static final CommandLineOption OPTION_REVERT = new CommandLineOption(new String[] {"-revert"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Revert_to_previous_state); //$NON-NLS-1$
 	private static final CommandLineOption OPTION_DESTINATION = new CommandLineOption(new String[] {"-destination", "-d"}, Messages.Help_lt_path_gt, Messages.Help_The_folder_in_which_the_targetd_product_is_located); //$NON-NLS-1$ //$NON-NLS-2$
 	private static final CommandLineOption OPTION_METADATAREPOS = new CommandLineOption(new String[] {"-metadatarepository", "metadatarepositories", "-m"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_metadata_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	private static final CommandLineOption OPTION_ARTIFACTREPOS = new CommandLineOption(new String[] {"-artifactrepository", "artifactrepositories", "-a"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_artifact_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -110,30 +130,33 @@ public class DirectorApplication implements IApplication {
 	private static final CommandLineOption OPTION_P2_WS = new CommandLineOption(new String[] {"-p2.ws"}, null, Messages.Help_The_WS_when_profile_is_created); //$NON-NLS-1$
 	private static final CommandLineOption OPTION_P2_ARCH = new CommandLineOption(new String[] {"-p2.arch"}, null, Messages.Help_The_ARCH_when_profile_is_created); //$NON-NLS-1$
 	private static final CommandLineOption OPTION_P2_NL = new CommandLineOption(new String[] {"-p2.nl"}, null, Messages.Help_The_NL_when_profile_is_created); //$NON-NLS-1$
+	private static final CommandLineOption OPTION_PURGEHISTORY = new CommandLineOption(new String[] {"-purgeHistory"}, null, Messages.Help_Purge_the_install_registry); //$NON-NLS-1$
+	private static final CommandLineOption OPTION_FOLLOW_REFERENCES = new CommandLineOption(new String[] {"-followReferences"}, null, Messages.Help_Follow_references); //$NON-NLS-1$
 
-	static private final String BUNDLE_CORE = "org.eclipse.equinox.p2.core"; //$NON-NLS-1$
-	static private final String BUNDLE_ENGINE = "org.eclipse.equinox.p2.engine"; //$NON-NLS-1$
-	static private final String BUNDLE_EXEMPLARY_SETUP = "org.eclipse.equinox.p2.exemplarysetup"; //$NON-NLS-1$
-	static private final String BUNDLE_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
-	static private final String BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
 	private static final Integer EXIT_ERROR = new Integer(13);
 	static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
-	static private final String PROP_P2_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
-
 	static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
+	static private final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
+
+	private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
 
 	public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
 
-	private static void getURIs(List uris, String spec) throws CoreException {
+	private static void getURIs(List<URI> uris, String spec) throws CoreException {
 		if (spec == null)
 			return;
 		String[] urlSpecs = StringHelper.getArrayFromString(spec, ',');
 		for (int i = 0; i < urlSpecs.length; i++) {
 			try {
-				uris.add(URIUtil.fromString(urlSpecs[i]));
-			} catch (URISyntaxException e) {
-				throw new ProvisionException(NLS.bind(Messages.unable_to_parse_0_to_uri_1, urlSpecs[i], e.getMessage()));
+				uris.add(new URI(urlSpecs[i]));
+			} catch (URISyntaxException e1) {
+				try {
+					uris.add(URIUtil.fromString(urlSpecs[i]));
+				} catch (URISyntaxException e) {
+					throw new ProvisionException(NLS.bind(Messages.unable_to_parse_0_to_uri_1, urlSpecs[i], e.getMessage()));
+				}
 			}
+
 		}
 	}
 
@@ -146,40 +169,55 @@ public class DirectorApplication implements IApplication {
 		throw new ProvisionException(NLS.bind(Messages.option_0_requires_an_argument, args[argIdx - 1]));
 	}
 
-	private static void parseIUsArgument(List vnames, String arg) {
+	private static String getOptionalArgument(String[] args, int argIdx) {
+		//Look ahead to the next argument
+		++argIdx;
+		if (argIdx < args.length) {
+			String arg = args[argIdx];
+			if (!arg.startsWith("-")) //$NON-NLS-1$
+				return arg;
+		}
+		return null;
+	}
+
+	private static void parseIUsArgument(List<IVersionedId> vnames, String arg) {
 		String[] roots = StringHelper.getArrayFromString(arg, ',');
 		for (int i = 0; i < roots.length; ++i)
-			vnames.add(VersionedName.parse(roots[i]));
+			vnames.add(VersionedId.parse(roots[i]));
 	}
 
-	private static String processFileArgument(String arg) {
+	private static File processFileArgument(String arg) {
 		if (arg.startsWith("file:")) //$NON-NLS-1$
 			arg = arg.substring(5);
 
 		// we create a path object here to handle ../ entries in the middle of paths
-		return Path.fromOSString(arg).toOSString();
+		return Path.fromOSString(arg).toFile();
 	}
 
 	private IArtifactRepositoryManager artifactManager;
-	private IMetadataRepositoryManager metadataManager;
+	IMetadataRepositoryManager metadataManager;
 
 	private URI[] artifactReposForRemoval;
 	private URI[] metadataReposForRemoval;
 
-	private final List artifactRepositoryLocations = new ArrayList();
-	private final List metadataRepositoryLocations = new ArrayList();
-	private final List rootsToInstall = new ArrayList();
-	private final List rootsToUninstall = new ArrayList();
+	private final List<URI> artifactRepositoryLocations = new ArrayList<URI>();
+	private final List<URI> metadataRepositoryLocations = new ArrayList<URI>();
+	private final List<IVersionedId> rootsToInstall = new ArrayList<IVersionedId>();
+	private final List<IVersionedId> rootsToUninstall = new ArrayList<IVersionedId>();
+	private final List<IVersionedId> rootsToList = new ArrayList<IVersionedId>();
 
-	private String bundlePool = null;
-	private String destination;
-	private String sharedLocation;
+	private File bundlePool = null;
+	private File destination;
+	private File sharedLocation;
 	private String flavor;
 	private boolean printHelpInfo = false;
 	private boolean printIUList = false;
+	private long revertToPreviousState = -1;
 	private boolean verifyOnly = false;
 	private boolean roamingProfile = false;
+	private boolean purgeRegistry = false;
 	private boolean stackTrace = false;
+	private boolean followReferences = false;
 	private String profileId;
 	private String profileProperties; // a comma-separated list of property pairs "tag=value"
 	private String ws;
@@ -192,19 +230,17 @@ public class DirectorApplication implements IApplication {
 	private PackageAdmin packageAdmin;
 	private ServiceReference packageAdminRef;
 	private IPlanner planner;
+	private ILog log = null;
 
-	private String preservedDataArea;
-	private String preservedProfile;
-	private boolean restartCore;
-	private boolean restartEngine;
-	private boolean restartExemplarySetup;
+	private IProvisioningAgent targetAgent;
+	private boolean noArtifactRepositorySpecified = false;
 
-	private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IInstallableUnit[] installs, IInstallableUnit[] uninstalls) {
+	private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collection<IInstallableUnit> installs, Collection<IInstallableUnit> uninstalls) {
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
 		markRoots(request, installs);
 		markRoots(request, uninstalls);
-		request.addInstallableUnits(installs);
-		request.removeInstallableUnits(uninstalls);
+		request.addAll(installs);
+		request.removeAll(uninstalls);
 		return request;
 	}
 
@@ -221,40 +257,41 @@ public class DirectorApplication implements IApplication {
 		}
 	}
 
-	private Collector collectRootIUs(Query query, Collector collector) {
+	private IQueryResult<IInstallableUnit> collectRootIUs(IQuery<IInstallableUnit> query) {
 		IProgressMonitor nullMonitor = new NullProgressMonitor();
 
 		int top = metadataRepositoryLocations.size();
 		if (top == 0)
-			return ProvisioningHelper.getInstallableUnits(null, query, collector, nullMonitor);
+			return getInstallableUnits(null, query, nullMonitor);
 
-		Collector result = collector != null ? collector : new Collector();
-		IQueryable[] locationQueryables = new IQueryable[top];
+		List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(top);
 		for (int i = 0; i < top; i++)
-			locationQueryables[i] = new LocationQueryable((URI) metadataRepositoryLocations.get(i));
-		return new CompoundQueryable(locationQueryables).query(query, result, nullMonitor);
+			locationQueryables.add(new LocationQueryable(metadataRepositoryLocations.get(i)));
+		return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
 	}
 
-	private IInstallableUnit[] collectRoots(IProfile profile, List rootNames, boolean forInstall) throws CoreException {
-		ArrayList allRoots = new ArrayList();
+	private Collection<IInstallableUnit> collectRoots(IProfile profile, List<IVersionedId> rootNames, boolean forInstall) throws CoreException {
+		ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
 		int top = rootNames.size();
 		for (int i = 0; i < top; ++i) {
-			VersionedName rootName = (VersionedName) rootNames.get(i);
+			IVersionedId rootName = rootNames.get(i);
 			Version v = rootName.getVersion();
-			Query query = new InstallableUnitQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
-			Collector roots;
+			IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
+			IQueryResult<IInstallableUnit> roots = null;
 			if (forInstall)
-				roots = collectRootIUs(new CompositeQuery(new Query[] {query, new LatestIUVersionQuery()}), new Collector());
-			else
-				roots = new Collector();
-			if (roots.size() <= 0)
-				roots = profile.query(query, roots, new NullProgressMonitor());
-			if (roots.size() <= 0)
-				throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_IU, rootName)));
-			allRoots.addAll(roots.toCollection());
-		}
-		return (IInstallableUnit[]) allRoots.toArray(new IInstallableUnit[allRoots.size()]);
+				roots = collectRootIUs(QueryUtil.createLatestQuery(query));
 
+			if (roots == null || roots.isEmpty())
+				roots = profile.query(query, new NullProgressMonitor());
+
+			Iterator<IInstallableUnit> itor = roots.iterator();
+			if (!itor.hasNext())
+				throw new CoreException(new Status(IStatus.ERROR, org.eclipse.equinox.internal.p2.director.app.Activator.ID, NLS.bind(Messages.Missing_IU, rootName)));
+			do {
+				allRoots.add(itor.next());
+			} while (itor.hasNext());
+		}
+		return allRoots;
 	}
 
 	synchronized Bundle getBundle(String symbolicName) {
@@ -274,7 +311,7 @@ public class DirectorApplication implements IApplication {
 	}
 
 	private String getEnvironmentProperty() {
-		HashMap values = new HashMap();
+		HashMap<String, String> values = new HashMap<String, String>();
 		if (os != null)
 			values.put("osgi.os", os); //$NON-NLS-1$
 		if (nl != null)
@@ -286,50 +323,50 @@ public class DirectorApplication implements IApplication {
 		return values.isEmpty() ? null : toString(values);
 	}
 
-	private IProfile initializeProfile() throws CoreException {
+	private IProfile getProfile() {
+		IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileId == null) {
 			profileId = IProfileRegistry.SELF;
 			noProfileId = true;
 		}
-		IProfile profile = ProvisioningHelper.getProfile(profileId);
+		return profileRegistry.getProfile(profileId);
+	}
+
+	private IProfile initializeProfile() throws CoreException {
+		IProfile profile = getProfile();
 		if (profile == null) {
 			if (destination == null)
 				missingArgument("destination"); //$NON-NLS-1$
 			if (flavor == null)
 				flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
 
-			Properties props = new Properties();
-			props.setProperty(IProfile.PROP_INSTALL_FOLDER, destination);
-			props.setProperty(IProfile.PROP_FLAVOR, flavor);
+			Map<String, String> props = new HashMap<String, String>();
+			props.put(IProfile.PROP_INSTALL_FOLDER, destination.toString());
 			if (bundlePool == null)
-				props.setProperty(IProfile.PROP_CACHE, sharedLocation == null ? destination : sharedLocation);
+				props.put(IProfile.PROP_CACHE, sharedLocation == null ? destination.getAbsolutePath() : sharedLocation.getAbsolutePath());
 			else
-				props.setProperty(IProfile.PROP_CACHE, bundlePool);
+				props.put(IProfile.PROP_CACHE, bundlePool.getAbsolutePath());
 			if (roamingProfile)
-				props.setProperty(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
+				props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
 
 			String env = getEnvironmentProperty();
 			if (env != null)
-				props.setProperty(IProfile.PROP_ENVIRONMENTS, env);
+				props.put(IProfile.PROP_ENVIRONMENTS, env);
 			if (profileProperties != null)
 				putProperties(profileProperties, props);
-			profile = ProvisioningHelper.addProfile(profileId, props);
-			String currentFlavor = profile.getProperty(IProfile.PROP_FLAVOR);
-			if (currentFlavor != null && !currentFlavor.endsWith(flavor))
-				throw new RuntimeException(NLS.bind(Messages.flavor_0_inconsistent_with_flavor_1, flavor, currentFlavor));
+			profile = ((IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME)).addProfile(profileId, props);
 		}
 		return profile;
 	}
 
 	private void initializeRepositories() throws CoreException {
-		if (rootsToInstall.isEmpty())
+		if (rootsToInstall.isEmpty() && revertToPreviousState == -1 && !printIUList)
 			// Not much point initializing repositories if we have nothing to install
 			return;
-
 		if (artifactRepositoryLocations == null)
 			missingArgument("-artifactRepository"); //$NON-NLS-1$
 
-		artifactManager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+		artifactManager = (IArtifactRepositoryManager) targetAgent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (artifactManager == null)
 			throw new ProvisionException(Messages.Application_NoManager);
 
@@ -337,7 +374,7 @@ public class DirectorApplication implements IApplication {
 		boolean anyValid = false; // do we have any valid repos or did they all fail to load?
 		artifactReposForRemoval = new URI[artifactRepositoryLocations.size()];
 		for (int i = 0; i < artifactRepositoryLocations.size(); i++) {
-			URI location = (URI) artifactRepositoryLocations.get(i);
+			URI location = artifactRepositoryLocations.get(i);
 			try {
 				if (!artifactManager.contains(location)) {
 					artifactManager.loadRepository(location, null);
@@ -346,17 +383,16 @@ public class DirectorApplication implements IApplication {
 				anyValid = true;
 			} catch (ProvisionException e) {
 				//one of the repositories did not load
-				LogHelper.log(e.getStatus());
+				logStatus(e.getStatus());
 			}
 		}
 		if (!anyValid)
-			//all repositories failed to load
-			throw new ProvisionException(Messages.Application_NoRepositories);
+			noArtifactRepositorySpecified = true;
 
 		if (metadataRepositoryLocations == null)
 			missingArgument("metadataRepository"); //$NON-NLS-1$
 
-		metadataManager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		metadataManager = (IMetadataRepositoryManager) targetAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (metadataManager == null)
 			throw new ProvisionException(Messages.Application_NoManager);
 
@@ -365,7 +401,7 @@ public class DirectorApplication implements IApplication {
 		int top = metadataRepositoryLocations.size();
 		metadataReposForRemoval = new URI[top];
 		for (int i = 0; i < top; i++) {
-			URI location = (URI) metadataRepositoryLocations.get(i);
+			URI location = metadataRepositoryLocations.get(i);
 			try {
 				if (!metadataManager.contains(location)) {
 					metadataManager.loadRepository(location, null);
@@ -374,7 +410,7 @@ public class DirectorApplication implements IApplication {
 				anyValid = true;
 			} catch (ProvisionException e) {
 				//one of the repositories did not load
-				LogHelper.log(e.getStatus());
+				logStatus(e.getStatus());
 			}
 		}
 		if (!anyValid)
@@ -386,77 +422,90 @@ public class DirectorApplication implements IApplication {
 		BundleContext context = Activator.getContext();
 		packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
 		packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
+		ServiceReference agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) context.getService(agentProviderRef);
+		URI p2DataArea;
 		if (destination != null || sharedLocation != null) {
-			restartExemplarySetup = stopTransient(BUNDLE_EXEMPLARY_SETUP);
-			restartEngine = stopTransient(BUNDLE_ENGINE); // Since it uses the agent data location
-			restartCore = stopTransient(BUNDLE_CORE); // Since it manages the agent data location	
-
-			// Set/Clear properties that we don't want to inherit from the caller
-			String p2DataArea = sharedLocation == null ? new File(destination, "p2").getAbsolutePath() : sharedLocation; //$NON-NLS-1$
-			preservedDataArea = System.setProperty(PROP_P2_DATA_AREA, p2DataArea);
-			if (profileId == null) {
-				if (destination != null) {
-					File configIni = new File(destination, "configuration/config.ini"); //$NON-NLS-1$
-					InputStream in = null;
-					try {
-						Properties ciProps = new Properties();
-						in = new BufferedInputStream(new FileInputStream(configIni));
-						ciProps.load(in);
-						profileId = ciProps.getProperty(PROP_P2_PROFILE);
-					} catch (IOException e) {
-						// Ignore
-					} finally {
-						if (in != null)
-							try {
-								in.close();
-							} catch (IOException e) {
-								// Ignore;
-							}
-					}
-					if (profileId == null)
-						profileId = destination;
+			File dataAreaFile = sharedLocation == null ? new File(destination, "p2") : sharedLocation;//$NON-NLS-1$
+			p2DataArea = dataAreaFile.toURI();
+		} else {
+			p2DataArea = null;
+		}
+		targetAgent = provider.createAgent(p2DataArea);
+		targetAgent.registerService(IProvisioningAgent.INSTALLER_AGENT, provider.createAgent(null));
+
+		context.ungetService(agentProviderRef);
+		if (profileId == null) {
+			if (destination != null) {
+				File configIni = new File(destination, "configuration/config.ini"); //$NON-NLS-1$
+				InputStream in = null;
+				try {
+					Properties ciProps = new Properties();
+					in = new BufferedInputStream(new FileInputStream(configIni));
+					ciProps.load(in);
+					profileId = ciProps.getProperty(PROP_P2_PROFILE);
+				} catch (IOException e) {
+					// Ignore
+				} finally {
+					if (in != null)
+						try {
+							in.close();
+						} catch (IOException e) {
+							// Ignore;
+						}
 				}
+				if (profileId == null)
+					profileId = destination.toString();
 			}
-			if (profileId == null)
-				preservedProfile = System.setProperty(PROP_P2_PROFILE, profileId);
-			else
-				System.getProperties().remove(PROP_P2_PROFILE);
 		}
+		if (profileId != null)
+			targetAgent.registerService(PROP_P2_PROFILE, profileId);
+		else
+			targetAgent.unregisterService(PROP_P2_PROFILE, null);
 
-		if (!startTransient(BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR))
-			throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_SIMPLE_CONFIGURATOR_MANIPULATOR));
-		if (!startTransient(BUNDLE_FRAMEWORKADMIN_EQUINOX))
-			throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_FRAMEWORKADMIN_EQUINOX));
-		if (!startTransient(BUNDLE_CORE))
-			throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_CORE));
-		if (!startTransient(BUNDLE_ENGINE))
-			throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_ENGINE));
-		if (!startTransient(BUNDLE_EXEMPLARY_SETUP))
-			throw new ProvisionException(NLS.bind(Messages.Missing_bundle, BUNDLE_EXEMPLARY_SETUP));
-
-		IDirector director = (IDirector) ServiceHelper.getService(context, IDirector.class.getName());
+		IDirector director = (IDirector) targetAgent.getService(IDirector.SERVICE_NAME);
 		if (director == null)
 			throw new ProvisionException(Messages.Missing_director);
 
-		planner = (IPlanner) ServiceHelper.getService(context, IPlanner.class.getName());
+		planner = (IPlanner) targetAgent.getService(IPlanner.SERVICE_NAME);
 		if (planner == null)
 			throw new ProvisionException(Messages.Missing_planner);
 
-		engine = (IEngine) ServiceHelper.getService(context, IEngine.SERVICE_NAME);
+		engine = (IEngine) targetAgent.getService(IEngine.SERVICE_NAME);
 		if (engine == null)
 			throw new ProvisionException(Messages.Missing_Engine);
+
+		targetAgent.registerService(UIServices.SERVICE_NAME, new AvoidTrustPromptService());
 	}
 
-	private void logFailure(IStatus status) {
-		FrameworkLog log = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
+	private void logStatus(IStatus status) {
 		if (log != null)
-			System.err.println("Application failed, log file location: " + log.getFile()); //$NON-NLS-1$
-		LogHelper.log(status);
+			log.log(status);
+		else
+			LogHelper.log(status);
 	}
 
-	private void markRoots(ProfileChangeRequest request, IInstallableUnit[] roots) {
-		for (int idx = 0; idx < roots.length; ++idx)
-			request.setInstallableUnitProfileProperty(roots[idx], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+	private void printMessage(String message) {
+		if (log != null)
+			log.log(message);
+		else
+			System.out.println(message);
+	}
+
+	private void logFailure(IStatus status) {
+		if (log == null) {
+			FrameworkLog frameworkLog = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
+			if (frameworkLog != null)
+				System.err.println("Application failed, log file location: " + frameworkLog.getFile()); //$NON-NLS-1$
+		}
+
+		logStatus(status);
+	}
+
+	private void markRoots(IProfileChangeRequest request, Collection<IInstallableUnit> roots) {
+		for (IInstallableUnit root : roots) {
+			request.setInstallableUnitProfileProperty(root, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+		}
 	}
 
 	private void missingArgument(String argumentName) throws CoreException {
@@ -464,29 +513,44 @@ public class DirectorApplication implements IApplication {
 	}
 
 	private void performList() throws CoreException {
-		Query query = new InstallableUnitQuery(null, VersionRange.emptyRange);
 		if (metadataRepositoryLocations.isEmpty())
 			missingArgument("metadataRepository"); //$NON-NLS-1$
 
-		Collector roots = collectRootIUs(query, null);
-		Iterator unitIterator = roots.iterator();
-		while (unitIterator.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) unitIterator.next();
-			System.out.println(iu.getId());
+		ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
+		if (rootsToList.size() == 0) {
+			Iterator<IInstallableUnit> roots = collectRootIUs(QueryUtil.createIUAnyQuery()).iterator();
+			while (roots.hasNext())
+				allRoots.add(roots.next());
+		} else {
+			for (IVersionedId rootName : rootsToList) {
+				Version v = rootName.getVersion();
+				IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
+				Iterator<IInstallableUnit> roots = collectRootIUs(query).iterator();
+				while (roots.hasNext())
+					allRoots.add(roots.next());
+			}
+		}
+
+		Collections.sort(allRoots);
+		for (IInstallableUnit iu : allRoots) {
+			System.out.println(iu.getId() + '=' + iu.getVersion());
 		}
 	}
 
 	private void performProvisioningActions() throws CoreException {
 		IProfile profile = initializeProfile();
-		IInstallableUnit[] installs = collectRoots(profile, rootsToInstall, true);
-		IInstallableUnit[] uninstalls = collectRoots(profile, rootsToUninstall, false);
+		Collection<IInstallableUnit> installs = collectRoots(profile, rootsToInstall, true);
+		Collection<IInstallableUnit> uninstalls = collectRoots(profile, rootsToUninstall, false);
 
 		// keep this result status in case there is a problem so we can report it to the user
 		boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
 		try {
 			updateRoamingProperties(profile);
-			ProvisioningContext context = new ProvisioningContext((URI[]) metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
-			context.setArtifactRepositories((URI[]) artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
+			ProvisioningContext context = new ProvisioningContext(targetAgent);
+			context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
+			context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
+			context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
+			context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
 			ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls);
 			printRequest(request);
 			planAndExecute(profile, context, request);
@@ -498,25 +562,45 @@ public class DirectorApplication implements IApplication {
 	}
 
 	private void planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) throws CoreException {
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		IStatus operationStatus = result.getStatus();
 		if (!operationStatus.isOK())
 			throw new CoreException(operationStatus);
+		executePlan(context, result);
+	}
+
+	private void executePlan(ProvisioningContext context, IProvisioningPlan result) throws CoreException {
+		IStatus operationStatus;
 		if (!verifyOnly) {
 			operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
-			if (!operationStatus.isOK())
+			if (!operationStatus.isOK()) {
+				if (noArtifactRepositorySpecified && hasNoRepositoryFound(operationStatus))
+					throw new ProvisionException(Messages.Application_NoRepositories);
 				throw new CoreException(operationStatus);
+			}
 		}
 	}
 
+	private boolean hasNoRepositoryFound(IStatus status) {
+		if (status.getException() != null && NO_ARTIFACT_REPOSITORIES_AVAILABLE.equals(status.getException().getMessage()))
+			return true;
+		if (status.isMultiStatus()) {
+			for (IStatus child : status.getChildren()) {
+				if (hasNoRepositoryFound(child))
+					return true;
+			}
+		}
+		return false;
+	}
+
 	private void printRequest(ProfileChangeRequest request) {
-		IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
-		for (int i = 0; i < toAdd.length; i++) {
-			System.out.println(NLS.bind(Messages.Installing, toAdd[i].getId(), toAdd[i].getVersion()));
+		Collection<IInstallableUnit> toAdd = request.getAdditions();
+		for (IInstallableUnit added : toAdd) {
+			printMessage(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
 		}
-		IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
-		for (int i = 0; i < toRemove.length; i++) {
-			System.out.println(NLS.bind(Messages.Uninstalling, toRemove[i].getId(), toRemove[i].getVersion()));
+		Collection<IInstallableUnit> toRemove = request.getRemovals();
+		for (IInstallableUnit removed : toRemove) {
+			printMessage(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
 		}
 	}
 
@@ -526,11 +610,23 @@ public class DirectorApplication implements IApplication {
 			return;
 		}
 
+		// Set platform environment defaults
+		EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
+		os = info.getOS();
+		ws = info.getWS();
+		nl = info.getNL();
+		arch = info.getOSArch();
+
 		for (int i = 0; i < args.length; i++) {
 			// check for args without parameters (i.e., a flag arg)
 			String opt = args[i];
 			if (OPTION_LIST.isOption(opt)) {
 				printIUList = true;
+				String optionalArgument = getOptionalArgument(args, i);
+				if (optionalArgument != null) {
+					parseIUsArgument(rootsToList, optionalArgument);
+					i++;
+				}
 				continue;
 			}
 
@@ -549,6 +645,17 @@ public class DirectorApplication implements IApplication {
 				continue;
 			}
 
+			if (OPTION_REVERT.isOption(opt)) {
+				String targettedState = getOptionalArgument(args, i);
+				if (targettedState == null) {
+					revertToPreviousState = 0;
+				} else {
+					i++;
+					revertToPreviousState = Long.valueOf(targettedState).longValue();
+				}
+				continue;
+
+			}
 			if (OPTION_PROFILE.isOption(opt)) {
 				profileId = getRequiredArgument(args, ++i);
 				continue;
@@ -569,7 +676,7 @@ public class DirectorApplication implements IApplication {
 				}
 				if (sharedLocation == null)
 					// -shared without an argument means "Use default shared area"
-					sharedLocation = Path.fromOSString(System.getProperty("user.home")).append(".p2/").toOSString(); //$NON-NLS-1$ //$NON-NLS-2$
+					sharedLocation = Path.fromOSString(System.getProperty("user.home")).append(".p2/").toFile(); //$NON-NLS-1$ //$NON-NLS-2$
 				continue;
 			}
 
@@ -615,6 +722,16 @@ public class DirectorApplication implements IApplication {
 				continue;
 			}
 
+			if (OPTION_PURGEHISTORY.isOption(opt)) {
+				purgeRegistry = true;
+				continue;
+			}
+
+			if (OPTION_FOLLOW_REFERENCES.isOption(opt)) {
+				followReferences = true;
+				continue;
+			}
+
 			if (OPTION_P2_OS.isOption(opt)) {
 				os = getRequiredArgument(args, ++i);
 				continue;
@@ -637,8 +754,8 @@ public class DirectorApplication implements IApplication {
 			throw new ProvisionException(NLS.bind(Messages.unknown_option_0, opt));
 		}
 
-		if (!printHelpInfo && !printIUList && rootsToInstall.isEmpty() && rootsToUninstall.isEmpty()) {
-			System.out.println(Messages.Help_Missing_argument);
+		if (!printHelpInfo && !printIUList && !purgeRegistry && rootsToInstall.isEmpty() && rootsToUninstall.isEmpty() && revertToPreviousState == -1) {
+			printMessage(Messages.Help_Missing_argument);
 			printHelpInfo = true;
 		}
 	}
@@ -647,7 +764,7 @@ public class DirectorApplication implements IApplication {
 	 * @param pairs	a comma separated list of tag=value pairs
 	 * @param properties the collection into which the pairs are put
 	 */
-	private void putProperties(String pairs, Properties properties) {
+	private void putProperties(String pairs, Map<String, String> properties) {
 		String[] propPairs = StringHelper.getArrayFromString(pairs, ',');
 		for (int i = 0; i < propPairs.length; ++i) {
 			String propPair = propPairs[i];
@@ -663,37 +780,18 @@ public class DirectorApplication implements IApplication {
 		}
 	}
 
-	private void restoreServices() throws CoreException {
+	private void cleanupServices() {
 		BundleContext context = Activator.getContext();
-		try {
-			if (destination == null && sharedLocation == null)
-				return;
-
-			stopTransient(BUNDLE_EXEMPLARY_SETUP);
-			stopTransient(BUNDLE_CORE); // Since it manages the agent data location
-
-			if (preservedDataArea != null)
-				System.setProperty(PROP_P2_DATA_AREA, preservedDataArea);
-			else
-				System.getProperties().remove(PROP_P2_DATA_AREA);
-
-			if (preservedProfile != null)
-				System.setProperty(PROP_P2_PROFILE, preservedProfile);
-			else
-				System.getProperties().remove(PROP_P2_PROFILE);
-
-			if (restartCore)
-				startTransient(BUNDLE_CORE);
-			if (restartEngine)
-				startTransient(BUNDLE_ENGINE);
-			if (restartExemplarySetup)
-				startTransient(BUNDLE_EXEMPLARY_SETUP);
-		} finally {
-			context.ungetService(packageAdminRef);
+		//dispose agent
+		if (targetAgent != null) {
+			targetAgent.stop();
+			targetAgent = null;
 		}
+		if (packageAdminRef != null)
+			context.ungetService(packageAdminRef);
 	}
 
-	public Object run(String[] args) throws CoreException {
+	public Object run(String[] args) {
 		long time = System.currentTimeMillis();
 
 		try {
@@ -703,14 +801,19 @@ public class DirectorApplication implements IApplication {
 			else {
 				initializeServices();
 				initializeRepositories();
-				if (!(rootsToInstall.isEmpty() && rootsToUninstall.isEmpty()))
+				if (revertToPreviousState >= 0) {
+					revertToPreviousState();
+				} else if (!(rootsToInstall.isEmpty() && rootsToUninstall.isEmpty()))
 					performProvisioningActions();
 				if (printIUList)
 					performList();
-				System.out.println(NLS.bind(Messages.Operation_complete, new Long(System.currentTimeMillis() - time)));
+				if (purgeRegistry)
+					purgeRegistry();
+				printMessage(NLS.bind(Messages.Operation_complete, new Long(System.currentTimeMillis() - time)));
 			}
 			return IApplication.EXIT_OK;
 		} catch (CoreException e) {
+			printMessage(Messages.Operation_failed);
 			deeplyPrint(e.getStatus(), System.err, 0);
 			logFailure(e.getStatus());
 			//set empty exit data to suppress error dialog from launcher
@@ -719,11 +822,45 @@ public class DirectorApplication implements IApplication {
 		} finally {
 			if (packageAdminRef != null) {
 				cleanupRepositories();
-				restoreServices();
+				cleanupServices();
 			}
 		}
 	}
 
+	private void purgeRegistry() throws ProvisionException {
+		if (getProfile() == null)
+			return;
+		IProfileRegistry registry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
+		long[] allProfiles = registry.listProfileTimestamps(profileId);
+		for (int i = 0; i < allProfiles.length - 1; i++) {
+			registry.removeProfile(profileId, allProfiles[i]);
+		}
+	}
+
+	private void revertToPreviousState() throws CoreException {
+		IProfile profile = initializeProfile();
+		IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
+		IProfile targetProfile = null;
+		if (revertToPreviousState == 0) {
+			long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
+			if (profiles.length == 0)
+				return;
+			targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
+		} else {
+			targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
+		}
+		if (targetProfile == null)
+			throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profile));
+		IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
+
+		ProvisioningContext context = new ProvisioningContext(targetAgent);
+		context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
+		context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
+		context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
+		context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
+		executePlan(context, plan);
+	}
+
 	/**
 	 * Sets a system property, using the EnvironmentInfo service if possible.
 	 */
@@ -741,6 +878,22 @@ public class DirectorApplication implements IApplication {
 			strm.print(' ');
 	}
 
+	IQueryResult<IInstallableUnit> getInstallableUnits(URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		IQueryable<IInstallableUnit> queryable = null;
+		if (location == null) {
+			queryable = metadataManager;
+		} else {
+			try {
+				queryable = metadataManager.loadRepository(location, monitor);
+			} catch (ProvisionException e) {
+				//repository is not available - just return empty result
+			}
+		}
+		if (queryable != null)
+			return queryable.query(query, monitor);
+		return Collector.emptyCollector();
+	}
+
 	private void deeplyPrint(CoreException ce, PrintStream strm, int level) {
 		appendLevelPrefix(strm, level);
 		if (stackTrace)
@@ -785,7 +938,7 @@ public class DirectorApplication implements IApplication {
 	}
 
 	private void performHelpInfo() {
-		CommandLineOption[] allOptions = new CommandLineOption[] {OPTION_HELP, OPTION_LIST, OPTION_INSTALL_IU, OPTION_UNINSTALL_IU, OPTION_DESTINATION, OPTION_METADATAREPOS, OPTION_ARTIFACTREPOS, OPTION_REPOSITORIES, OPTION_VERIFY_ONLY, OPTION_PROFILE, OPTION_FLAVOR, OPTION_SHARED, OPTION_BUNDLEPOOL, OPTION_PROFILE_PROPS, OPTION_ROAMING, OPTION_P2_OS, OPTION_P2_WS, OPTION_P2_ARCH, OPTION_P2_NL};
+		CommandLineOption[] allOptions = new CommandLineOption[] {OPTION_HELP, OPTION_LIST, OPTION_INSTALL_IU, OPTION_UNINSTALL_IU, OPTION_REVERT, OPTION_DESTINATION, OPTION_METADATAREPOS, OPTION_ARTIFACTREPOS, OPTION_REPOSITORIES, OPTION_VERIFY_ONLY, OPTION_PROFILE, OPTION_FLAVOR, OPTION_SHARED, OPTION_BUNDLEPOOL, OPTION_PROFILE_PROPS, OPTION_ROAMING, OPTION_P2_OS, OPTION_P2_WS, OPTION_P2_ARCH, OPTION_P2_NL, OPTION_PURGEHISTORY, OPTION_FOLLOW_REFERENCES};
 		for (int i = 0; i < allOptions.length; ++i) {
 			allOptions[i].appendHelp(System.out);
 		}
@@ -797,9 +950,10 @@ public class DirectorApplication implements IApplication {
 	private IStatus setRoaming(IProfile profile) {
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
 		request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
-		ProvisioningContext context = new ProvisioningContext(new URI[0]);
+		ProvisioningContext context = new ProvisioningContext(targetAgent);
+		context.setMetadataRepositories(new URI[0]);
 		context.setArtifactRepositories(new URI[0]);
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
 	}
 
@@ -807,47 +961,14 @@ public class DirectorApplication implements IApplication {
 		return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
 	}
 
-	private boolean startTransient(String bundleName) throws CoreException {
-		Bundle bundle = getBundle(bundleName);
-		if (bundle == null)
-			return false;
-		try {
-			bundle.start(Bundle.START_TRANSIENT);
-		} catch (BundleException e) {
-			throw new ProvisionException(NLS.bind(Messages.unable_to_start_bundle_0, bundleName));
-		}
-		return true;
-	}
-
-	public void stop() {
-		// Nothing left to do here
-	}
-
-	private boolean stopTransient(String bundleName) throws CoreException {
-		Bundle bundle = getBundle(bundleName);
-		boolean wasActive = false;
-		if (bundle != null) {
-			wasActive = (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING)) != 0;
-			if (wasActive)
-				try {
-					bundle.stop(Bundle.STOP_TRANSIENT);
-				} catch (BundleException e) {
-					throw new ProvisionException(NLS.bind(Messages.unable_to_stop_bundle_0, bundleName));
-				}
-		}
-		return wasActive;
-	}
-
-	private String toString(Map context) {
+	private String toString(Map<String, String> context) {
 		StringBuffer result = new StringBuffer();
-		Iterator entries = context.entrySet().iterator();
-		while (entries.hasNext()) {
-			Map.Entry entry = (Map.Entry) entries.next();
+		for (Map.Entry<String, String> entry : context.entrySet()) {
 			if (result.length() > 0)
 				result.append(',');
-			result.append((String) entry.getKey());
+			result.append(entry.getKey());
 			result.append('=');
-			result.append((String) entry.getValue());
+			result.append(entry.getValue());
 		}
 		return result.toString();
 	}
@@ -869,11 +990,10 @@ public class DirectorApplication implements IApplication {
 			return;
 
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
-		File destinationFile = new File(destination);
-		if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
-			request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination);
-		if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
-			request.setProfileProperty(IProfile.PROP_CACHE, destination);
+		if (!destination.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
+			request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination.getAbsolutePath());
+		if (!destination.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
+			request.setProfileProperty(IProfile.PROP_CACHE, destination.getAbsolutePath());
 		if (request.getProfileProperties().size() == 0)
 			return;
 
@@ -882,11 +1002,21 @@ public class DirectorApplication implements IApplication {
 		// will set it back later (see bug 269468)
 		request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
 
-		ProvisioningContext context = new ProvisioningContext(new URI[0]);
+		ProvisioningContext context = new ProvisioningContext(targetAgent);
+		context.setMetadataRepositories(new URI[0]);
 		context.setArtifactRepositories(new URI[0]);
-		ProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
+		IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
 		IStatus status = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
 		if (!status.isOK())
-			throw new CoreException(new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {status}, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null));
+			throw new CoreException(new MultiStatus(org.eclipse.equinox.internal.p2.director.app.Activator.ID, IStatus.ERROR, new IStatus[] {status}, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null));
+	}
+
+	public void stop() {
+		if (log != null)
+			log.close();
+	}
+
+	public void setLog(ILog log) {
+		this.log = log;
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
new file mode 100644
index 0000000..7d12bf3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
@@ -0,0 +1,14 @@
+package org.eclipse.equinox.internal.p2.director.app;
+
+import org.eclipse.core.runtime.IStatus;
+
+public interface ILog {
+
+	// Log a status
+	public void log(IStatus status);
+
+	public void log(String message);
+
+	// Notify that logging is completed & cleanup resources 
+	public void close();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
index 46327e4..8f3163b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -15,6 +15,8 @@ import org.eclipse.osgi.util.NLS;
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.director.app.messages"; //$NON-NLS-1$
 
+	public static String could_not_remove_initialProfile;
+
 	public static String Deprecated_application;
 	public static String Ambigous_Command;
 	public static String Application_NoManager;
@@ -23,8 +25,6 @@ public class Messages extends NLS {
 	public static String Cant_change_roaming;
 	public static String destination_commandline;
 
-	public static String flavor_0_inconsistent_with_flavor_1;
-
 	public static String Help_A_list_of_properties_in_the_form_key_value_pairs;
 	public static String Help_A_list_of_URLs_denoting_artifact_repositories;
 	public static String Help_A_list_of_URLs_denoting_colocated_repositories;
@@ -36,6 +36,7 @@ public class Messages extends NLS {
 	public static String Help_lb_lt_path_gt_rb;
 	public static String Help_List_all_IUs_found_in_repos;
 	public static String Help_lt_comma_separated_list_gt;
+	public static String Help_lb_lt_comma_separated_list_gt_rb;
 	public static String Help_lt_name_gt;
 	public static String Help_lt_path_gt;
 	public static String Help_Missing_argument;
@@ -48,26 +49,32 @@ public class Messages extends NLS {
 	public static String Help_The_OS_when_profile_is_created;
 	public static String Help_The_WS_when_profile_is_created;
 	public static String Help_Uninstalls_the_listed_IUs;
+	public static String Help_Revert_to_previous_state;
 	public static String Help_Use_a_shared_location_for_the_install;
+	public static String Help_Purge_the_install_registry;
+	public static String Help_Follow_references;
 
 	public static String Ignored_repo;
 	public static String Installing;
-	public static String Missing_bundle;
 	public static String Missing_director;
 	public static String Missing_Engine;
 	public static String Missing_IU;
 	public static String Missing_planner;
 	public static String Missing_profileid;
 	public static String Missing_Required_Argument;
+	public static String Missing_profile;
+
 	public static String Operation_complete;
 	public static String Operation_failed;
 	public static String option_0_requires_an_argument;
 	public static String unable_to_parse_0_to_uri_1;
-	public static String unable_to_start_bundle_0;
-	public static String unable_to_stop_bundle_0;
 	public static String Uninstalling;
 	public static String unknown_option_0;
 
+	public static String problem_CallingDirector;
+	public static String problem_repoMustBeURI;
+	public static String unableToWriteLogFile;
+
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
index 19acd62..ab49951 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
 #	   Cloudsmith - ongoing development
 ###############################################################################
 destination_commandline=<destination>
-Deprecated_application=This application is deprecated. Please use the org.eclipse.equinox.p2.director application.
+Deprecated_application=This application is deprecated and will be removed in a future release. Please use the org.eclipse.equinox.p2.director application.
 Help_Only_verify_dont_install=Only verify that the actions can be performed. Don't actually install or remove anything.
 Operation_complete=Operation completed in {0} ms.
 Operation_failed=Installation failed.
@@ -19,20 +19,18 @@ Cant_change_roaming=Problem while updating the profile {0}.
 Missing_profileid = Must specify a profile id if a destination is specified.
 Missing_director=Director could not be loaded.
 Missing_Engine=Engine could not be loaded.
-Missing_bundle=The ''{0}'' bundle is missing.
 Missing_planner=Planner could not be loaded.
 Missing_IU=The installable unit {0} has not been found.
 Missing_Required_Argument=Missing required argument -{0}.
 Help_A_list_of_properties_in_the_form_key_value_pairs=A list of properties in the form key=value pairs. Effective only when a new profile is created.
 Help_A_list_of_URLs_denoting_artifact_repositories=A list of URL's denoting artifact repositories.
-Help_A_list_of_URLs_denoting_colocated_repositories=A list of URL's denoting colocated meta-data and artifact repositories.
+Help_A_list_of_URLs_denoting_colocated_repositories=A list of URL's denoting co-located meta-data and artifact repositories.
 Help_A_list_of_URLs_denoting_metadata_repositories=A list of URL's denoting meta-data repositories.
 Ambigous_Command=Cannot execute both {0} and {1} in one invocation.
 Application_NoManager=The repository manager is not available.
 Application_NoRepositories=Unable to load repositories.
 Help_Defines_flavor_to_use_for_created_profile=Defines what flavor to use for a newly created profile.
 Help_Defines_what_profile_to_use_for_the_actions=Defines what profile to use for the actions.
-flavor_0_inconsistent_with_flavor_1=Install flavor {0} not consistent with profile flavor {1}.
 Help_Indicates_that_the_product_can_be_moved=Indicates that the product resulting from the installation can be moved. Effective only when a new profile is created.
 Installing=Installing {0} {1}.
 Help_Installs_the_listed_IUs=Installs the listed IU's. Each entry in the list is in the form <id> [ '/' <version> ].
@@ -41,8 +39,10 @@ Help_Uninstalls_the_listed_IUs=Uninstalls the listed IU's. Each entry in the lis
 Help_Use_a_shared_location_for_the_install=Use a shared location for the install. The <path> defaults to ${user.home}/.p2
 Ignored_repo=The repository {1} will not be considered.
 Help_lb_lt_path_gt_rb=[ <path> ]
-Help_List_all_IUs_found_in_repos=Lists all IU's found in the given repositories.
+Help_List_all_IUs_found_in_repos=Lists all IU's found in the given repositories. IUs can optionally be listed.  Each entry in the list is in the form <id> [ '/' <version> ].
+Help_Revert_to_previous_state=Revert the installation to a previous state [ the number representing the previous state of the profile  as found in p2/org.eclipse.equinox.p2.engine/<profileId>/ ].
 Help_lt_comma_separated_list_gt=<comma separated list>
+Help_lb_lt_comma_separated_list_gt_rb=[ <comma separated list> ]
 Help_lt_name_gt=<name>
 Help_lt_path_gt=<path>
 option_0_requires_an_argument=Option {0} requires an argument.
@@ -53,8 +53,13 @@ Help_The_location_where_the_plugins_and_features_will_be_stored=The location whe
 Help_The_NL_when_profile_is_created=The language to use when the profile is created.
 Help_The_OS_when_profile_is_created=The OS to use when the profile is created.
 Help_The_WS_when_profile_is_created=The windowing system to use when the profile is created.
+Help_Purge_the_install_registry=Remove the history of the profile registry.
+Help_Follow_references=Follow repository references.
 unable_to_parse_0_to_uri_1=Unable to parse {0} into an URI: {1}.
-unable_to_start_bundle_0=Unable to start bundle {0}.
-unable_to_stop_bundle_0=Unable to stop bundle {0}.
 unknown_option_0=Unknown option {0}. Use -help for a list of known options.
 Help_Missing_argument=The argument specifying what to install or uninstall is missing.
+Missing_profile = The profile to revert to could not be found.
+problem_CallingDirector=A problem occured while invoking the director.
+problem_repoMustBeURI = The repository location ({0}) must be a URI.
+unableToWriteLogFile=Unable to write to the log file {0}.
+could_not_remove_initialProfile=Could not remove the initial profile created {0}.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
index eff7e35..a753b22 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,103 +10,163 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.director.app.ant;
 
-import java.io.File;
+import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import org.apache.tools.ant.*;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.director.app.Application;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.internal.p2.director.app.*;
+import org.eclipse.equinox.p2.metadata.VersionedId;
+import org.eclipse.osgi.util.NLS;
 
 /**
  * An Ant task to call the p2 Director application.
  * 
  * @since 1.0
  */
-public class DirectorTask extends Task {
+public class DirectorTask extends Task implements ILog {
+	private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
+	private static final String ENTRY = "!ENTRY "; //$NON-NLS-1$
+	private static final String SUBENTRY = "!SUBENTRY "; //$NON-NLS-1$
+	private static final String logEntry = "{0} {1} {2}\n"; //$NON-NLS-1$
+	private static final String MESSAGE = "!MESSAGE "; //$NON-NLS-1$
 
-	boolean roaming;
-	boolean list;
-	String profile, flavor, os, ws, nl, arch, installIU, uninstallIU;
-	File destination, bundlePool;
-	URI metadataRepository, artifactRepository;
-	Version version;
+	private boolean roaming;
+	private boolean list;
+	private String profile, flavor, os, ws, nl, arch, uninstallIU;
+	private String extraArguments;
+	private File destination, bundlePool, agentLocation;
+	private URI metadataRepository, artifactRepository;
+	private List<IUDescription> ius = new ArrayList<IUDescription>();
+	private String outputProperty;
+	private StringBuffer outputBuffer = null;
+	private File logFile = null;
+
+	public static class IUDescription {
+		private String id = null;
+		private String version = null;
+
+		public VersionedId getVersionedId() {
+			return new VersionedId(id, version);
+		}
+
+		public void setId(String id) {
+			this.id = id;
+		}
+
+		public void setVersion(String version) {
+			if (version.length() > 0 && !version.startsWith(ANT_PREFIX))
+				this.version = version;
+		}
+	}
 
 	/*
 	 * (non-Javadoc)
 	 * @see org.apache.tools.ant.Task#execute()
 	 */
 	public void execute() throws BuildException {
+		Object result = null;
 		try {
+			if (outputProperty != null)
+				outputBuffer = new StringBuffer();
+
 			// collect the arguments and call the application
-			new Application().run(getArguments());
+			DirectorApplication application = new DirectorApplication();
+			application.setLog(this);
+			result = application.run(getArguments());
 		} catch (Exception e) {
-			throw new BuildException("Exception while calling the director task.", e);
+			getProject().log(Messages.problem_CallingDirector, e, Project.MSG_ERR);
+			throw new BuildException(Messages.problem_CallingDirector, e);
+		} finally {
+			log(outputBuffer);
 		}
+		if (result != null && !result.equals(IApplication.EXIT_OK)) {
+			getProject().log(Messages.problem_CallingDirector, Project.MSG_ERR);
+			throw new BuildException(Messages.problem_CallingDirector);
+		}
+	}
+
+	public void addConfiguredIu(IUDescription iu) {
+		ius.add(iu);
 	}
 
 	private String[] getArguments() {
-		List result = new ArrayList();
+		List<String> result = new ArrayList<String>();
 		if (roaming)
-			result.add("-roaming");
+			result.add("-roaming"); //$NON-NLS-1$
 		if (profile != null) {
-			result.add("-profile");
+			result.add("-profile"); //$NON-NLS-1$
 			result.add(profile);
 		}
+		if (extraArguments != null) {
+			StringTokenizer tokenizer = new StringTokenizer(extraArguments);
+			while (tokenizer.hasMoreTokens()) {
+				result.add(tokenizer.nextToken());
+			}
+		}
 		if (destination != null) {
-			result.add("-destination");
+			result.add("-destination"); //$NON-NLS-1$
 			result.add(destination.getAbsolutePath());
 		}
 		if (bundlePool != null) {
-			result.add("-bundlePool");
+			result.add("-bundlePool"); //$NON-NLS-1$
 			result.add(bundlePool.getAbsolutePath());
 		}
+		if (agentLocation != null) {
+			result.add("-shared"); //$NON-NLS-1$
+			result.add(agentLocation.getAbsolutePath());
+		}
 		if (metadataRepository != null) {
-			result.add("-metadataRepository");
-			result.add(metadataRepository.toString());
+			result.add("-metadataRepository"); //$NON-NLS-1$
+			result.add(URIUtil.toUnencodedString(metadataRepository));
 		}
 		if (artifactRepository != null) {
-			result.add("-artifactRepository");
-			result.add(artifactRepository.toString());
+			result.add("-artifactRepository"); //$NON-NLS-1$
+			result.add(URIUtil.toUnencodedString(artifactRepository));
 		}
 		if (flavor != null) {
-			result.add("-flavor");
+			result.add("-flavor"); //$NON-NLS-1$
 			result.add(flavor);
 		}
-		if (version != null) {
-			result.add("-version");
-			result.add(version.toString());
+		if (ius.size() > 0) {
+			result.add("-installIUs"); //$NON-NLS-1$
+			StringBuffer arg = new StringBuffer();
+			for (Iterator<IUDescription> iterator = ius.iterator(); iterator.hasNext();) {
+				IUDescription object = iterator.next();
+				arg.append(object.getVersionedId().toString());
+				if (iterator.hasNext())
+					arg.append(',');
+			}
+			result.add(arg.toString());
 		}
 		if (os != null) {
-			result.add("-p2.os");
+			result.add("-p2.os"); //$NON-NLS-1$
 			result.add(os);
 		}
 		if (ws != null) {
-			result.add("-p2.ws");
+			result.add("-p2.ws"); //$NON-NLS-1$
 			result.add(ws);
 		}
 		if (arch != null) {
-			result.add("-p2.arch");
+			result.add("-p2.arch"); //$NON-NLS-1$
 			result.add(arch);
 		}
 		if (nl != null) {
-			result.add("-p2.nl");
+			result.add("-p2.nl"); //$NON-NLS-1$
 			result.add(nl);
 		}
 		if (list) {
-			result.add(Application.COMMAND_NAMES[Application.COMMAND_LIST]);
-		}
-		if (installIU != null) {
-			result.add(Application.COMMAND_NAMES[Application.COMMAND_INSTALL]);
-			result.add(installIU);
+			result.add("-list"); //$NON-NLS-1$
 		}
+
 		if (uninstallIU != null) {
-			result.add(Application.COMMAND_NAMES[Application.COMMAND_UNINSTALL]);
+			result.add("-uninstallIU"); //$NON-NLS-1$
 			result.add(uninstallIU);
 		}
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 	public void setArch(String value) {
@@ -117,7 +177,7 @@ public class DirectorTask extends Task {
 		try {
 			artifactRepository = URIUtil.fromString(value);
 		} catch (URISyntaxException e) {
-			log("Error setting the artifact repository.", e, Project.MSG_ERR);
+			log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
 		}
 	}
 
@@ -130,50 +190,143 @@ public class DirectorTask extends Task {
 	}
 
 	public void setFlavor(String value) {
-		flavor = value;
-	}
-
-	public void setInstallIU(String value) {
-		installIU = value;
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			flavor = value;
 	}
 
 	public void setList(String value) {
-		list = Boolean.valueOf(value).booleanValue();
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			list = Boolean.valueOf(value).booleanValue();
 	}
 
 	public void setMetadataRepository(String value) {
 		try {
 			metadataRepository = URIUtil.fromString(value);
 		} catch (URISyntaxException e) {
-			log("Error setting the metadata repository.", e, Project.MSG_ERR);
+			log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
 		}
 	}
 
 	public void setNl(String value) {
-		nl = value;
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			nl = value;
 	}
 
 	public void setOs(String value) {
-		os = value;
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			os = value;
 	}
 
 	public void setProfile(String value) {
-		profile = value;
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			profile = value;
+	}
+
+	public void setExtraArguments(String value) {
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX)) {
+			extraArguments = value;
+		}
+
 	}
 
 	public void setRoaming(String value) {
-		roaming = Boolean.valueOf(value).booleanValue();
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			roaming = Boolean.valueOf(value).booleanValue();
 	}
 
 	public void setUninstallIU(String value) {
-		uninstallIU = value;
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			uninstallIU = value;
 	}
 
-	public void setVersion(String value) {
-		version = new Version(value);
+	public void setWs(String value) {
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			ws = value;
 	}
 
-	public void setWs(String value) {
-		ws = value;
+	public void setAgentLocation(String value) {
+		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
+			agentLocation = new File(value);
+	}
+
+	public void log(String msg) {
+		if (outputBuffer != null) {
+			outputBuffer.append(msg);
+			if (!msg.endsWith("\n")) //$NON-NLS-1$
+				outputBuffer.append('\n');
+		}
+		super.log(msg, Project.MSG_INFO);
+	}
+
+	public void log(IStatus status) {
+		log(0, status);
+		if (status.isMultiStatus()) {
+			IStatus[] children = status.getChildren();
+			for (int i = 0; i < children.length; i++) {
+				log(1, children[i]);
+			}
+		}
+	}
+
+	private void log(int depth, IStatus status) {
+		log(status.getMessage(), status.getException(), Project.MSG_ERR);
+		if (outputBuffer != null) {
+			if (depth == 0)
+				outputBuffer.append(ENTRY);
+			else
+				outputBuffer.append(SUBENTRY);
+			outputBuffer.append(NLS.bind(logEntry, new String[] {status.getPlugin(), Integer.toString(status.getSeverity()), Integer.toString(status.getCode())}));
+			outputBuffer.append(MESSAGE);
+			outputBuffer.append(status.getMessage());
+			outputBuffer.append('\n');
+		}
+	}
+
+	private void log(StringBuffer buffer) {
+		if (outputBuffer == null)
+			return;
+
+		String logString = outputBuffer.toString();
+		getProject().setNewProperty(outputProperty, logString);
+
+		if (logFile != null) {
+			File parentFile = logFile.getParentFile();
+			if (parentFile != null && !parentFile.exists())
+				parentFile.mkdirs();
+
+			FileWriter writer = null;
+			try {
+				writer = new FileWriter(logFile);
+				writer.write(logString);
+
+			} catch (IOException e) {
+				getProject().log(NLS.bind(Messages.unableToWriteLogFile, logFile.getAbsolutePath()), e, Project.MSG_WARN);
+			} finally {
+				if (writer != null) {
+					try {
+						writer.close();
+					} catch (IOException e) {
+						//ignore
+					}
+				}
+			}
+		}
+	}
+
+	public void setOutputProperty(String property) {
+		this.outputProperty = property;
+	}
+
+	public void setLogFile(String file) {
+		if (file != null && !file.startsWith(ANT_PREFIX)) {
+			this.logFile = new File(file);
+			if (!logFile.isAbsolute()) {
+				logFile = new File(getProject().getBaseDir(), file);
+			}
+		}
+	}
+
+	public void close() {
+		// ILog#close(),  nothing to do here
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.director/.classpath
index f402582..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/.project b/eclipse/plugins/org.eclipse.equinox.p2.director/.project
index 4cb0b36..9b9c15e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs
index b486acc..5e1105f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Sat Feb 28 12:14:19 CET 2009
+#Mon Dec 21 23:16:26 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -8,23 +8,23 @@ org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
index a9e7496..e5fb562 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
@@ -1,41 +1,44 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.director;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.director;singleton:=true
+Bundle-Version: 2.0.3.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.equinox.internal.p2.director.DirectorActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.p2.director;x-friends:="org.eclipse.equinox.p2.exemplarysetup,org.eclipse.pde.core",
- org.eclipse.equinox.internal.p2.rollback;x-friends:="org.eclipse.equinox.p2.ui",
+Export-Package: org.eclipse.equinox.internal.p2.director;x-friends:="org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.operations,org.eclipse.pde.core",
+ org.eclipse.equinox.internal.p2.rollback;x-internal:=true,
  org.eclipse.equinox.internal.provisional.p2.director;
   x-friends:="org.eclipse.equinox.p2.console,
    org.eclipse.equinox.p2.director.app,
    org.eclipse.equinox.p2.installer,
+   org.eclipse.equinox.p2.operations,
    org.eclipse.equinox.p2.reconciler.dropins,
+   org.eclipse.equinox.p2.touchpoint.eclipse,
    org.eclipse.equinox.p2.ui,
    org.eclipse.equinox.p2.ui.admin,
    org.eclipse.equinox.p2.ui.sdk,
    org.eclipse.equinox.p2.ui.sdk.scheduler,
    org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.pde.core"
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.DirectorActivator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+   org.eclipse.pde.core,
+   org.eclipse.pde.ui",
+ org.eclipse.equinox.p2.planner;version="2.0.0"
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
- org.sat4j.core;bundle-version="[2.1.0,2.3)",
- org.sat4j.pb;bundle-version="[2.1.0,2.3)",
- org.eclipse.core.jobs;bundle-version="3.3.0"
+ org.sat4j.core;bundle-version="[2.2.0,2.3.0)",
+ org.sat4j.pb;bundle-version="[2.2.0,2.3.0)",
+ org.eclipse.core.jobs;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Service-Component: OSGI-INF/director.xml, OSGI-INF/planner.xml
+Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.provisional.configurator,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.osgi.util;version="1.0.0",
+ org.osgi.framework;version="1.3.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/director.xml b/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/director.xml
new file mode 100644
index 0000000..d4b2487
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/director.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.director">
+   <implementation class="org.eclipse.equinox.internal.p2.director.DirectorComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.director.IDirector"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml b/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml
new file mode 100644
index 0000000..be04207
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.planner">
+   <implementation class="org.eclipse.equinox.internal.p2.director.PlannerComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.planner.IPlanner"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.director/build.properties
index a6b8330..9ac550c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
+# Copyright (c) 2007, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,10 +8,13 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
+               OSGI-INF/,\
                .,\
                about.html,\
                plugin.properties
 src.includes = about.html
+source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.director/pom.xml
new file mode 100644
index 0000000..7977545
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.director</artifactId>
+  <version>2.0.2.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java
index 131953d..bebb503 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java
@@ -7,28 +7,23 @@
  * 
  *  Contributors:
  *      IBM Corporation - initial API and implementation
+ *      Cloudsmith Inc. - converted into expression based query
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
 
 /**
  * A query that accepts any patch that applies to a given installable unit.
  */
-public class ApplicablePatchQuery extends MatchQuery {
-
-	/**
-	 * A query that matches any patch.
-	 */
-	public static final Query ANY = new MatchQuery() {
-		public boolean isMatch(Object candidate) {
-			return candidate instanceof IInstallableUnitPatch;
-		}
-	};
-
-	IInstallableUnit iu;
+public class ApplicablePatchQuery extends ExpressionMatchQuery<IInstallableUnit> {
+	private static final IExpression applicablePatches = ExpressionUtil.parse(//
+			"applicabilityScope.empty || applicabilityScope.exists(rqArr | rqArr.all(rq | $0 ~= rq))"); //$NON-NLS-1$
 
 	/**
 	 * Creates a new patch query on the given installable unit. Patches that can
@@ -36,26 +31,6 @@ public class ApplicablePatchQuery extends MatchQuery {
 	 * @param iu The unit to compare patches against
 	 */
 	public ApplicablePatchQuery(IInstallableUnit iu) {
-		this.iu = iu;
-	}
-
-	public boolean isMatch(Object candidate) {
-		if (!(candidate instanceof IInstallableUnitPatch))
-			return false;
-		IInstallableUnitPatch patchIU = (IInstallableUnitPatch) candidate;
-		IRequiredCapability[][] scopeDescription = patchIU.getApplicabilityScope();
-		if (scopeDescription.length == 0)
-			return true;
-
-		for (int i = 0; i < scopeDescription.length; i++) {
-			int matchedScopeEntry = scopeDescription[i].length;
-			for (int j = 0; j < scopeDescription[i].length; j++) {
-				if (iu.satisfies(scopeDescription[i][j]))
-					matchedScopeEntry--;
-			}
-			if (matchedScopeEntry == 0)
-				return true;
-		}
-		return false;
+		super(IInstallableUnitPatch.class, applicablePatches, iu);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
index 68d9d74..fc60f0d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
@@ -11,51 +11,46 @@
 package org.eclipse.equinox.internal.p2.director;
 
 import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.QueryUtil;
 
 public class AttachmentHelper {
 	private static final IInstallableUnitFragment[] NO_FRAGMENTS = new IInstallableUnitFragment[0];
 
-	public static Collection attachFragments(Collection toAttach, Map fragmentsToIUs) {
-		Map fragmentBindings = new HashMap();
+	public static Collection<IInstallableUnit> attachFragments(Iterator<IInstallableUnit> toAttach, Map<IInstallableUnitFragment, List<IInstallableUnit>> fragmentsToIUs) {
+		Map<IInstallableUnit, IInstallableUnitFragment[]> fragmentBindings = new HashMap<IInstallableUnit, IInstallableUnitFragment[]>();
 		//Build a map inverse of the one provided in input (host --> List of fragments)
-		Map iusToFragment = new HashMap(fragmentsToIUs.size());
-		for (Iterator iterator = fragmentsToIUs.entrySet().iterator(); iterator.hasNext();) {
-			Entry mapping = (Entry) iterator.next();
-			IInstallableUnitFragment fragment = (IInstallableUnitFragment) mapping.getKey();
-			List existingMatches = (List) mapping.getValue();
+		Map<IInstallableUnit, List<IInstallableUnitFragment>> iusToFragment = new HashMap<IInstallableUnit, List<IInstallableUnitFragment>>(fragmentsToIUs.size());
+		for (Map.Entry<IInstallableUnitFragment, List<IInstallableUnit>> mapping : fragmentsToIUs.entrySet()) {
+			IInstallableUnitFragment fragment = mapping.getKey();
+			List<IInstallableUnit> existingMatches = mapping.getValue();
 
-			for (Iterator iterator2 = existingMatches.iterator(); iterator2.hasNext();) {
-				Object host = iterator2.next();
-				List potentialFragments = (List) iusToFragment.get(host);
+			for (IInstallableUnit host : existingMatches) {
+				List<IInstallableUnitFragment> potentialFragments = iusToFragment.get(host);
 				if (potentialFragments == null) {
-					potentialFragments = new ArrayList();
+					potentialFragments = new ArrayList<IInstallableUnitFragment>();
 					iusToFragment.put(host, potentialFragments);
 				}
 				potentialFragments.add(fragment);
 			}
 		}
 
-		for (Iterator iterator = iusToFragment.entrySet().iterator(); iterator.hasNext();) {
-			Entry entry = (Entry) iterator.next();
-			IInstallableUnit hostIU = (IInstallableUnit) entry.getKey();
-			List potentialIUFragments = (List) entry.getValue();
-			ArrayList applicableFragments = new ArrayList();
-			for (Iterator iterator2 = potentialIUFragments.iterator(); iterator2.hasNext();) {
-				IInstallableUnit dependentIU = (IInstallableUnitFragment) iterator2.next();
-				if (hostIU.equals(dependentIU) || !dependentIU.isFragment())
+		for (Map.Entry<IInstallableUnit, List<IInstallableUnitFragment>> entry : iusToFragment.entrySet()) {
+			IInstallableUnit hostIU = entry.getKey();
+			List<IInstallableUnitFragment> potentialIUFragments = entry.getValue();
+			ArrayList<IInstallableUnitFragment> applicableFragments = new ArrayList<IInstallableUnitFragment>();
+			for (IInstallableUnitFragment potentialFragment : potentialIUFragments) {
+				if (hostIU.equals(potentialFragment))
 					continue;
 
-				IInstallableUnitFragment potentialFragment = (IInstallableUnitFragment) dependentIU;
-
 				// Check to make sure the host meets the requirements of the fragment
-				IRequiredCapability reqsFromFragment[] = potentialFragment.getHost();
+				Collection<IRequirement> reqsFromFragment = potentialFragment.getHost();
 				boolean match = true;
 				boolean requirementMatched = false;
-				for (int l = 0; l < reqsFromFragment.length && match == true; l++) {
+				for (Iterator<IRequirement> iterator = reqsFromFragment.iterator(); iterator.hasNext() && match == true;) {
+					IRequirement reqs = iterator.next();
 					requirementMatched = false;
-					if (hostIU.satisfies(reqsFromFragment[l]))
+					if (hostIU.satisfies(reqs))
 						requirementMatched = true;
 					if (requirementMatched == false) {
 						match = false;
@@ -70,37 +65,48 @@ public class AttachmentHelper {
 
 			IInstallableUnitFragment theFragment = null;
 			int specificityLevel = 0;
-			for (Iterator iterator4 = applicableFragments.iterator(); iterator4.hasNext();) {
-				IInstallableUnitFragment fragment = (IInstallableUnitFragment) iterator4.next();
-				if (fragment.getHost().length > specificityLevel) {
+			LinkedList<IInstallableUnitFragment> fragments = new LinkedList<IInstallableUnitFragment>();
+			for (IInstallableUnitFragment fragment : applicableFragments) {
+				if (isTranslation(fragment)) {
+					fragments.add(fragment);
+					continue;
+				}
+				if (fragment.getHost().size() > specificityLevel) {
 					theFragment = fragment;
-					specificityLevel = fragment.getHost().length;
+					specificityLevel = fragment.getHost().size();
 				}
 			}
 			if (theFragment != null)
-				fragmentBindings.put(hostIU, theFragment);
+				fragments.addFirst(theFragment);
+			if (!fragments.isEmpty())
+				fragmentBindings.put(hostIU, fragments.toArray(new IInstallableUnitFragment[fragments.size()]));
 		}
 		//build the collection of resolved IUs
-		Collection result = new HashSet(toAttach.size());
-		for (Iterator iterator = toAttach.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
+		Collection<IInstallableUnit> result = new HashSet<IInstallableUnit>();
+		while (toAttach.hasNext()) {
+			IInstallableUnit iu = toAttach.next();
 			if (iu == null)
 				continue;
 			//just return fragments as they are
-			if (iu.isFragment()) {
+			if (QueryUtil.isFragment(iu)) {
 				result.add(iu);
 				continue;
 			}
 			//return a new IU that combines the IU with its bound fragments
-			IInstallableUnitFragment fragment = (IInstallableUnitFragment) fragmentBindings.get(iu);
-			IInstallableUnitFragment[] fragments;
-			if (fragment == null)
+			IInstallableUnitFragment[] fragments = fragmentBindings.get(iu);
+			if (fragments == null)
 				fragments = NO_FRAGMENTS;
-			else
-				fragments = new IInstallableUnitFragment[] {fragment};
 			result.add(MetadataFactory.createResolvedInstallableUnit(iu, fragments));
 		}
 		return result;
 	}
 
+	private static boolean isTranslation(IInstallableUnitFragment fragment) {
+		for (IProvidedCapability capability : fragment.getProvidedCapabilities()) {
+			// TODO make the constant in the TranslationSupport class public and use it
+			if ("org.eclipse.equinox.p2.localization".equals(capability.getNamespace())) //$NON-NLS-1$
+				return true;
+		}
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
new file mode 100644
index 0000000..08935c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.director;
+
+import org.eclipse.equinox.p2.planner.IPlanner;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.engine.IEngine;
+
+public class DirectorComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+		return new SimpleDirector(engine, planner);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java
index 0a85e57..719546c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java
@@ -12,15 +12,15 @@ package org.eclipse.equinox.internal.p2.director;
 
 import java.util.Arrays;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.osgi.util.NLS;
 
-public abstract class Explanation implements Comparable {
+public abstract class Explanation implements Comparable<Explanation> {
 
 	public static class PatchedHardRequirement extends Explanation {
 		public final IInstallableUnit iu;
 		public final IInstallableUnitPatch patch;
-		public final IRequiredCapability req;
+		public final IRequirement req;
 
 		public PatchedHardRequirement(IInstallableUnit iu, IInstallableUnitPatch patch) {
 			this.iu = iu;
@@ -28,7 +28,7 @@ public abstract class Explanation implements Comparable {
 			this.patch = patch;
 		}
 
-		public PatchedHardRequirement(IInstallableUnit iu, IRequiredCapability req, IInstallableUnitPatch patch) {
+		public PatchedHardRequirement(IInstallableUnit iu, IRequirement req, IInstallableUnitPatch patch) {
 			this.iu = iu;
 			this.req = req;
 			this.patch = patch;
@@ -49,13 +49,19 @@ public abstract class Explanation implements Comparable {
 		public String toString() {
 			return NLS.bind(Messages.Explanation_patchedHardDependency, new Object[] {patch, iu, req});
 		}
+
+		@Override
+		public int shortAnswer() {
+			return Explanation.VIOLATED_PATCHED_HARD_REQUIREMENT;
+		}
+
 	}
 
 	public static class HardRequirement extends Explanation {
 		public final IInstallableUnit iu;
-		public final IRequiredCapability req;
+		public final IRequirement req;
 
-		public HardRequirement(IInstallableUnit iu, IRequiredCapability req) {
+		public HardRequirement(IInstallableUnit iu, IRequirement req) {
 			this.iu = iu;
 			this.req = req;
 		}
@@ -74,6 +80,11 @@ public abstract class Explanation implements Comparable {
 		public String toString() {
 			return NLS.bind(Messages.Explanation_hardDependency, iu, req);
 		}
+
+		@Override
+		public int shortAnswer() {
+			return VIOLATED_HARD_REQUIREMENT;
+		}
 	}
 
 	public static class IUInstalled extends Explanation {
@@ -94,6 +105,11 @@ public abstract class Explanation implements Comparable {
 		public IStatus toStatus() {
 			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_alreadyInstalled, getUserReadableName(iu)));
 		}
+
+		@Override
+		public int shortAnswer() {
+			return IU_INSTALLED;
+		}
 	}
 
 	public static class IUToInstall extends Explanation {
@@ -114,15 +130,47 @@ public abstract class Explanation implements Comparable {
 		public IStatus toStatus() {
 			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_toInstall, getUserReadableName(iu)));
 		}
+
+		@Override
+		public int shortAnswer() {
+			return IU_TO_INSTALL;
+		}
+	}
+
+	public static class NotInstallableRoot extends Explanation {
+		public final IRequirement req;
+
+		public NotInstallableRoot(IRequirement req) {
+			this.req = req;
+		}
+
+		public String toString() {
+			return NLS.bind(Messages.Explanation_missingRootFilter, req);
+		}
+
+		public IStatus toStatus() {
+			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRootFilter, req));
+		}
+
+		protected int orderValue() {
+			return 2;
+		}
+
+		@Override
+		public int shortAnswer() {
+			return NON_INSTALLABLE_ROOT;
+		}
 	}
 
 	public static class MissingIU extends Explanation {
 		public final IInstallableUnit iu;
-		public final IRequiredCapability req;
+		public final IRequirement req;
+		public boolean isEntryPoint;
 
-		public MissingIU(IInstallableUnit iu, IRequiredCapability req) {
+		public MissingIU(IInstallableUnit iu, IRequirement req, boolean isEntryPoint) {
 			this.iu = iu;
 			this.req = req;
+			this.isEntryPoint = isEntryPoint;
 		}
 
 		public int orderValue() {
@@ -134,19 +182,47 @@ public abstract class Explanation implements Comparable {
 		}
 
 		public String toString() {
-			String filter = req.getFilter();
-			if (filter == null) {
+			if (isEntryPoint) {
+				return NLS.bind(Messages.Explanation_missingRootRequired, req);
+			}
+			if (req.getFilter() == null) {
 				return NLS.bind(Messages.Explanation_missingRequired, iu, req);
 			}
-			return NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {filter, iu, req});
+			return NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {req.getFilter(), iu, req});
 		}
 
 		public IStatus toStatus() {
-			String filter = req.getFilter();
-			if (filter == null) {
+			if (isEntryPoint) {
+				return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRootRequired, req));
+			}
+			if (req.getFilter() == null) {
 				return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequired, getUserReadableName(iu), req));
 			}
-			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {filter, getUserReadableName(iu), req}));
+			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {req.getFilter(), getUserReadableName(iu), req}));
+		}
+	}
+
+	public static class MissingGreedyIU extends Explanation {
+		public final IInstallableUnit iu;
+
+		public MissingGreedyIU(IInstallableUnit iu) {
+			this.iu = iu;
+		}
+
+		public int orderValue() {
+			return 3;
+		}
+
+		public int shortAnswer() {
+			return MISSING_REQUIREMENT;
+		}
+
+		public String toString() {
+			return NLS.bind(Messages.Explanation_missingNonGreedyRequired, iu);
+		}
+
+		public IStatus toStatus() {
+			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingNonGreedyRequired, getUserReadableName(iu)));
 		}
 	}
 
@@ -178,8 +254,6 @@ public abstract class Explanation implements Comparable {
 
 	}
 
-	public static final int MISSING_REQUIREMENT = 1;
-
 	public static final Explanation OPTIONAL_REQUIREMENT = new Explanation() {
 
 		public int orderValue() {
@@ -189,16 +263,27 @@ public abstract class Explanation implements Comparable {
 		public String toString() {
 			return Messages.Explanation_optionalDependency;
 		}
+
+		@Override
+		public int shortAnswer() {
+			return OTHER_REASON;
+		}
 	};
 
+	public static final int MISSING_REQUIREMENT = 1;
 	public static final int VIOLATED_SINGLETON_CONSTRAINT = 2;
+	public static final int IU_INSTALLED = 3;
+	public static final int IU_TO_INSTALL = 4;
+	public static final int VIOLATED_HARD_REQUIREMENT = 5;
+	public static final int VIOLATED_PATCHED_HARD_REQUIREMENT = 6;
+	public static final int NON_INSTALLABLE_ROOT = 7;
+	public static final int OTHER_REASON = 100;
 
 	protected Explanation() {
 		super();
 	}
 
-	public int compareTo(Object arg0) {
-		Explanation exp = (Explanation) arg0;
+	public int compareTo(Explanation exp) {
 		if (this.orderValue() == exp.orderValue()) {
 			return this.toString().compareTo(exp.toString());
 		}
@@ -207,9 +292,7 @@ public abstract class Explanation implements Comparable {
 
 	protected abstract int orderValue();
 
-	public int shortAnswer() {
-		throw new UnsupportedOperationException();
-	}
+	abstract public int shortAnswer();
 
 	/**
 	 * Returns a representation of this explanation as a status object.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/HasMatchCollector.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/HasMatchCollector.java
deleted file mode 100644
index c789d85..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/HasMatchCollector.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * A collector that short-circuits on the first match.
- */
-public class HasMatchCollector extends Collector {
-	private boolean hasMatch = false;
-
-	public boolean accept(Object object) {
-		hasMatch = true;
-		return false;
-	}
-
-	public boolean isEmpty() {
-		return !hasMatch;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
index 831cf7e..7e04e06 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
@@ -30,6 +30,8 @@ public class Messages extends NLS {
 	public static String Director_Task_Resolving_Dependencies;
 	public static String Director_Unsatisfied_Dependencies;
 	public static String Director_error_applying_configuration;
+	public static String Director_For_Target;
+	public static String Director_For_Target_Unselect_Required;
 
 	public static String Explanation_alreadyInstalled;
 	public static String Explanation_from;
@@ -37,7 +39,10 @@ public class Messages extends NLS {
 	public static String Explanation_hardDependency;
 	public static String Explanation_patchedHardDependency;
 	public static String Explanation_missingRequired;
+	public static String Explanation_missingRootRequired;
+	public static String Explanation_missingNonGreedyRequired;
 	public static String Explanation_missingRequiredFilter;
+	public static String Explanation_missingRootFilter;
 	public static String Explanation_optionalDependency;
 	public static String Explanation_rootMissing;
 	public static String Explanation_rootSingleton;
@@ -56,5 +61,7 @@ public class Messages extends NLS {
 	public static String Planner_can_not_install_preq;
 	public static String Planner_no_profile_registry;
 	public static String Planner_profile_out_of_sync;
+	public static String RequestStatus_message;
+	public static String Planner_no_installer_agent;
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
index 8bad481..bcdc4c0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
@@ -11,137 +11,105 @@
 package org.eclipse.equinox.internal.p2.director;
 
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.InstallableUnitOperand;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.*;
 
 public class OperationGenerator {
-	private static final IInstallableUnit NULL_IU = MetadataFactory.createResolvedInstallableUnit(MetadataFactory.createInstallableUnit(new InstallableUnitDescription()), new IInstallableUnitFragment[0]);
+	private static final IInstallableUnit NULL_IU = MetadataFactory.createResolvedInstallableUnit(MetadataFactory.createInstallableUnit(new MetadataFactory.InstallableUnitDescription()), new IInstallableUnitFragment[0]);
+	private final IProvisioningPlan plan;
 
-	public InstallableUnitOperand[] generateOperation(Collection from_, Collection to_) {
-		Collection intersection = new HashSet(from_);
+	public OperationGenerator(IProvisioningPlan plan) {
+		this.plan = plan;
+	}
+
+	public void generateOperation(Collection<IInstallableUnit> from_, Collection<IInstallableUnit> to_) {
+		Collection<IInstallableUnit> intersection = new HashSet<IInstallableUnit>(from_);
 		intersection.retainAll(to_);
 
-		HashSet tmpFrom = new HashSet(from_);
-		HashSet tmpTo = new HashSet(to_);
+		HashSet<IInstallableUnit> tmpFrom = new HashSet<IInstallableUnit>(from_);
+		HashSet<IInstallableUnit> tmpTo = new HashSet<IInstallableUnit>(to_);
 		tmpFrom.removeAll(intersection);
 		tmpTo.removeAll(intersection);
 
-		List from = new ArrayList(tmpFrom);
+		List<IInstallableUnit> from = new ArrayList<IInstallableUnit>(tmpFrom);
 		Collections.sort(from);
 
-		List to = new ArrayList(tmpTo);
+		List<IInstallableUnit> to = new ArrayList<IInstallableUnit>(tmpTo);
 		Collections.sort(to);
 
-		ArrayList operations = new ArrayList();
-		generateUpdates(from, to, operations);
-		generateInstallUninstall(from, to, operations);
-		generateConfigurationChanges(to_, intersection, operations);
-		InstallableUnitOperand[] ops = (InstallableUnitOperand[]) operations.toArray(new InstallableUnitOperand[operations.size()]);
-		return ops;
+		generateUpdates(from, to);
+		generateInstallUninstall(from, to);
+		generateConfigurationChanges(to_, intersection);
 	}
 
 	//This generates operations that are causing the IUs to be reconfigured.
-	private void generateConfigurationChanges(Collection to_, Collection intersection, ArrayList operations) {
+	private void generateConfigurationChanges(Collection<IInstallableUnit> to_, Collection<IInstallableUnit> intersection) {
 		if (intersection.size() == 0)
 			return;
 		//We retain from each set the things that are the same.
 		//Note that despite the fact that they are the same, a different CU can be attached.
 		//The objects contained in the intersection are the one that were originally in the from collection.
-		TreeSet to = new TreeSet(to_);
-		for (Iterator iterator = intersection.iterator(); iterator.hasNext();) {
-			IInstallableUnit fromIU = (IInstallableUnit) iterator.next();
-			IInstallableUnit toIU = (IInstallableUnit) to.tailSet(fromIU).first();
-			generateConfigurationOperation(fromIU, toIU, operations);
+		TreeSet<IInstallableUnit> to = new TreeSet<IInstallableUnit>(to_);
+		for (IInstallableUnit fromIU : intersection) {
+			IInstallableUnit toIU = to.tailSet(fromIU).first();
+			generateConfigurationOperation(fromIU, toIU);
 		}
 
 	}
 
-	private void generateConfigurationOperation(IInstallableUnit fromIU, IInstallableUnit toIU, ArrayList operations) {
-		IInstallableUnitFragment[] fromFragments = fromIU.getFragments();
-		IInstallableUnitFragment[] toFragments = toIU.getFragments();
+	private void generateConfigurationOperation(IInstallableUnit fromIU, IInstallableUnit toIU) {
+		Collection<IInstallableUnitFragment> fromFragments = fromIU.getFragments();
+		Collection<IInstallableUnitFragment> toFragments = toIU.getFragments();
 		if (fromFragments == toFragments)
 			return;
 		//Check to see if the two arrays are equals independently of the order of the fragments
-		boolean different = false;
-		if (fromFragments != null && toFragments != null) {
-			if (fromFragments.length != toFragments.length)
-				different = true;
-			else {
-				for (int i = 0; i < fromFragments.length; i++) {
-					boolean found = false;
-					for (int j = 0; j < toFragments.length; j++) {
-						if (fromFragments[i].equals(toFragments[j]))
-							found = true;
-					}
-					if (!found) {
-						different = true;
-						break;
-					}
-				}
-			}
-		} else {
-			//One of the two array is null
-			different = true;
-		}
-		if (!different)
+		if (fromFragments.size() == toFragments.size() && fromFragments.containsAll(toFragments))
 			return;
-		operations.add(new InstallableUnitOperand(fromIU, toIU));
+		plan.updateInstallableUnit(fromIU, toIU);
 	}
 
-	private void generateInstallUninstall(List from, List to, ArrayList operations) {
+	private void generateInstallUninstall(List<IInstallableUnit> from, List<IInstallableUnit> to) {
 		int toIdx = 0;
 		int fromIdx = 0;
 		while (fromIdx != from.size() && toIdx != to.size()) {
-			IInstallableUnit fromIU = (IInstallableUnit) from.get(fromIdx);
-			IInstallableUnit toIU = (IInstallableUnit) to.get(toIdx);
+			IInstallableUnit fromIU = from.get(fromIdx);
+			IInstallableUnit toIU = to.get(toIdx);
 			int comparison = toIU.compareTo(fromIU);
 			if (comparison < 0) {
-				operations.add(createInstallOperation(toIU));
+				plan.addInstallableUnit(toIU);
 				toIdx++;
 			} else if (comparison == 0) {
 				toIdx++;
 				fromIdx++;
 				//				System.out.println("same " + fromIU);
 			} else {
-				operations.add(createUninstallOperation(fromIU));
+				plan.removeInstallableUnit(fromIU);
 				fromIdx++;
 			}
 		}
 		if (fromIdx != from.size()) {
 			for (int i = fromIdx; i < from.size(); i++) {
-				operations.add(createUninstallOperation((IInstallableUnit) from.get(i)));
+				plan.removeInstallableUnit(from.get(i));
 			}
 		}
 		if (toIdx != to.size()) {
 			for (int i = toIdx; i < to.size(); i++) {
-				operations.add(createInstallOperation((IInstallableUnit) to.get(i)));
+				plan.addInstallableUnit(to.get(i));
 			}
 		}
 	}
 
-	private void generateUpdates(List from, List to, ArrayList operations) {
-		Set processed = new HashSet();
-		Set removedFromTo = new HashSet();
-
+	private void generateUpdates(List<IInstallableUnit> from, List<IInstallableUnit> to) {
 		if (to.isEmpty() || from.isEmpty())
 			return;
 
-		Map fromById = new HashMap();
-		for (Iterator iterator = from.iterator(); iterator.hasNext();) {
-			IInstallableUnit iuFrom = (IInstallableUnit) iterator.next();
-			List ius = (List) fromById.get(iuFrom.getId());
-			if (ius == null) {
-				ius = new ArrayList();
-				fromById.put(iuFrom.getId(), ius);
-			}
-			ius.add(iuFrom);
-		}
+		Set<IInstallableUnit> processed = new HashSet<IInstallableUnit>();
+		Set<IInstallableUnit> removedFromTo = new HashSet<IInstallableUnit>();
 
+		QueryableArray indexedFromElements = new QueryableArray(from.toArray(new IInstallableUnit[from.size()]));
 		for (int toIdx = 0; toIdx < to.size(); toIdx++) {
-			IInstallableUnit iuTo = (IInstallableUnit) to.get(toIdx);
+			IInstallableUnit iuTo = to.get(toIdx);
 			if (iuTo.getId().equals(next(to, toIdx).getId())) { //This handle the case where there are multiple versions of the same IU in the target. Eg we are trying to update from A 1.0.0 to A 1.1.1 and A 1.2.2
 				toIdx = skip(to, iuTo, toIdx) - 1;
 				//System.out.println("Can't update " + iuTo + " because another iu with same id is in the target state");
@@ -150,60 +118,47 @@ public class OperationGenerator {
 			if (iuTo.getUpdateDescriptor() == null)
 				continue;
 
-			List fromIdIndexList = (List) fromById.get(iuTo.getUpdateDescriptor().getId());
-			if (fromIdIndexList == null)
-				continue;
+			//TODO we eventually need to handle the case where an IU is a merge of several others.
 
-			//when the ui we update from is in the new state, skip (for example FROM is A, C, B & TO is C (update of
-			InstallableUnitQuery updateQuery = new InstallableUnitQuery(iuTo.getUpdateDescriptor().getId(), iuTo.getUpdateDescriptor().getRange());
-			Iterator updates = updateQuery.perform(fromIdIndexList.iterator(), new Collector()).iterator();
+			IQuery<IInstallableUnit> updateQuery = QueryUtil.createMatchQuery(iuTo.getUpdateDescriptor().getIUsBeingUpdated().iterator().next(), new Object[0]);
+			iuTo.getUpdateDescriptor().getIUsBeingUpdated();
+			IQueryResult<IInstallableUnit> updates = indexedFromElements.query(updateQuery, null);
 
-			if (!updates.hasNext()) { //Nothing to update from.
+			if (updates.isEmpty()) { //Nothing to update from.
 				continue;
 			}
-			IInstallableUnit iuFrom = (IInstallableUnit) updates.next();
-			if (updates.hasNext()) { //There are multiple IUs to update from
+			Iterator<IInstallableUnit> updatesIterator = updates.iterator();
+			IInstallableUnit iuFrom = updatesIterator.next();
+			if (updatesIterator.hasNext()) { //There are multiple IUs to update from
 				//System.out.println("Can't update  " + iuTo + " because there are multiple IUs to update from (" + toString(iusFrom) + ')');
 				continue;
 			}
 			if (iuTo.equals(iuFrom)) {
 				from.remove(iuFrom);
-				fromIdIndexList.remove(iuFrom);
+				//				fromIdIndexList.remove(iuFrom);
 				removedFromTo.add(iuTo);
 				continue;
 			}
-			operations.add(createUpdateOperation(iuFrom, iuTo));
+			plan.updateInstallableUnit(iuFrom, iuTo);
 			from.remove(iuFrom);
-			fromIdIndexList.remove(iuFrom);
+			//			fromIdIndexList.remove(iuFrom);
 			processed.add(iuTo);
 		}
 		to.removeAll(processed);
 		to.removeAll(removedFromTo);
 	}
 
-	private InstallableUnitOperand createUninstallOperation(IInstallableUnit iu) {
-		return new InstallableUnitOperand(iu, null);
-	}
-
-	private InstallableUnitOperand createInstallOperation(IInstallableUnit iu) {
-		return new InstallableUnitOperand(null, iu);
-	}
-
-	private InstallableUnitOperand createUpdateOperation(IInstallableUnit from, IInstallableUnit to) {
-		return new InstallableUnitOperand(from, to);
-	}
-
-	private IInstallableUnit next(List l, int i) {
+	private IInstallableUnit next(List<IInstallableUnit> l, int i) {
 		i++;
 		if (i >= l.size())
 			return NULL_IU;
-		return (IInstallableUnit) l.get(i);
+		return l.get(i);
 	}
 
-	private int skip(List c, IInstallableUnit id, int idx) {
+	private int skip(List<IInstallableUnit> c, IInstallableUnit id, int idx) {
 		int i = idx;
 		for (; i < c.size(); i++) {
-			if (!id.getId().equals(((IInstallableUnit) c.get(i)).getId()))
+			if (!id.getId().equals(c.get(i).getId()))
 				return i;
 		}
 		return i;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java
index 2d1de7a..4d42093 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java
@@ -8,10 +8,11 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
-import java.util.Dictionary;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import java.util.Map;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.query.IQueryable;
 
 public class PermissiveSlicer extends Slicer {
 	private boolean includeOptionalDependencies; //Cause optional dependencies not be followed as part of the
@@ -21,7 +22,7 @@ public class PermissiveSlicer extends Slicer {
 	private boolean evalFilterTo;
 	private boolean onlyFilteredRequirements;
 
-	public PermissiveSlicer(IQueryable input, Dictionary context, boolean includeOptionalDependencies, boolean everythingGreedy, boolean evalFilterTo, boolean considerOnlyStrictDependency, boolean onlyFilteredRequirements) {
+	public PermissiveSlicer(IQueryable<IInstallableUnit> input, Map<String, String> context, boolean includeOptionalDependencies, boolean everythingGreedy, boolean evalFilterTo, boolean considerOnlyStrictDependency, boolean onlyFilteredRequirements) {
 		super(input, context, true);
 		this.considerFilter = (context != null && context.size() > 1) ? true : false;
 		this.includeOptionalDependencies = includeOptionalDependencies;
@@ -39,14 +40,14 @@ public class PermissiveSlicer extends Slicer {
 		return evalFilterTo;
 	}
 
-	protected boolean isApplicable(IRequiredCapability req) {
+	protected boolean isApplicable(IRequirement req) {
 		//Every filter in this method needs to continue except when the filter does not pass
 		if (!includeOptionalDependencies)
-			if (req.isOptional())
+			if (req.getMin() == 0)
 				return false;
 
 		if (considerOnlyStrictDependency) {
-			if (!req.getRange().getMinimum().equals(req.getRange().getMaximum()))
+			if (!RequiredCapability.isVersionStrict(req.getMatches()))
 				return false;
 		}
 
@@ -65,7 +66,7 @@ public class PermissiveSlicer extends Slicer {
 		return evalFilterTo;
 	}
 
-	protected boolean isGreedy(IRequiredCapability req) {
+	protected boolean isGreedy(IRequirement req) {
 		if (everythingGreedy) {
 			return true;
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
new file mode 100644
index 0000000..515e795
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.director;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * A service factory that provides planner implementations
+ */
+public class PlannerComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		return new SimplePlanner(agent);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
index 62c2305..48c0756 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -8,6 +8,7 @@
  * Daniel Le Berre - Fix in the encoding and the optimization function
  * Alban Browaeys - Optimized string concatenation in bug 251357
  * Jed Anderson - switch from opb files to API calls to DependencyHelper in bug 200380
+ *     Sonatype, Inc. - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
@@ -16,16 +17,16 @@ import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.CapabilityQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import org.eclipse.equinox.internal.p2.director.Explanation.NotInstallableRoot;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.*;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.InvalidSyntaxException;
-import org.sat4j.pb.IPBSolver;
-import org.sat4j.pb.SolverFactory;
+import org.sat4j.pb.*;
 import org.sat4j.pb.tools.DependencyHelper;
 import org.sat4j.pb.tools.WeightedObject;
 import org.sat4j.specs.*;
@@ -38,30 +39,50 @@ import org.sat4j.specs.*;
 public class Projector {
 	static boolean DEBUG = Tracing.DEBUG_PLANNER_PROJECTOR;
 	private static boolean DEBUG_ENCODING = false;
-	private IQueryable picker;
+	private IQueryable<IInstallableUnit> picker;
 	private QueryableArray patches;
 
-	private Map noopVariables; //key IU, value AbstractVariable
-	private List abstractVariables;
+	private Map<IInstallableUnit, AbstractVariable> noopVariables; //key IU, value AbstractVariable
+	private List<AbstractVariable> abstractVariables;
 
-	private TwoTierMap slice; //The IUs that have been considered to be part of the problem
+	private Map<String, Map<Version, IInstallableUnit>> slice; //The IUs that have been considered to be part of the problem
 
-	private Dictionary selectionContext;
+	private IInstallableUnit selectionContext;
 
-	DependencyHelper dependencyHelper;
-	private Collection solution;
-	private Collection assumptions;
+	DependencyHelper<Object, Explanation> dependencyHelper;
+	private Collection<IInstallableUnit> solution;
+	private Collection<Object> assumptions;
 
 	private MultiStatus result;
 
-	private Collection alreadyInstalledIUs;
+	private Collection<IInstallableUnit> alreadyInstalledIUs;
+	private IQueryable<IInstallableUnit> lastState;
+
 	private boolean considerMetaRequirements;
 	private IInstallableUnit entryPoint;
-	private Map fragments = new HashMap();
+	private Map<IInstallableUnitFragment, Set<IInstallableUnit>> fragments = new HashMap<IInstallableUnitFragment, Set<IInstallableUnit>>();
+
+	private int numberOfInstalledIUs;
+
+	//Non greedy things
+	private Set<IInstallableUnit> nonGreedyIUs; //All the IUs that would satisfy non greedy dependencies
+	private Map<IInstallableUnit, AbstractVariable> nonGreedyVariables = new HashMap<IInstallableUnit, AbstractVariable>();
+	private Map<AbstractVariable, List<Object>> nonGreedyProvider = new HashMap<AbstractVariable, List<Object>>(); //Keeps track of all the "object" that provide an IU that is non greedly requested  
 
 	static class AbstractVariable {
+		//		private String name;
+
+		public AbstractVariable(String name) {
+			//						this.name = name;
+		}
+
+		public AbstractVariable() {
+			// TODO Auto-generated constructor stub
+		}
+
 		public String toString() {
 			return "AbstractVariable: " + hashCode(); //$NON-NLS-1$
+			//			return name == null ? "AbstractVariable: " + hashCode() : name; //$NON-NLS-1$
 		}
 	}
 
@@ -69,7 +90,7 @@ public class Projector {
 	 * Job for computing SAT failure explanation in the background.
 	 */
 	class ExplanationJob extends Job {
-		private Set explanation;
+		private Set<Explanation> explanation;
 
 		public ExplanationJob() {
 			super(Messages.Planner_NoSolution);
@@ -86,7 +107,7 @@ public class Projector {
 			dependencyHelper.stopExplanation();
 		}
 
-		public Set getExplanationResult() {
+		public Set<Explanation> getExplanationResult() {
 			return explanation;
 		}
 
@@ -102,8 +123,8 @@ public class Projector {
 					long stop = System.currentTimeMillis();
 					Tracing.debug("Explanation found: " + (stop - start)); //$NON-NLS-1$
 					Tracing.debug("Explanation:"); //$NON-NLS-1$
-					for (Iterator i = explanation.iterator(); i.hasNext();) {
-						Tracing.debug(i.next().toString());
+					for (Explanation ex : explanation) {
+						Tracing.debug(ex.toString());
 					}
 				}
 			} catch (TimeoutException e) {
@@ -112,7 +133,7 @@ public class Projector {
 			} finally {
 				//must never have a null result, because caller is waiting on result to be non-null
 				if (explanation == null)
-					explanation = Collections.EMPTY_SET;
+					explanation = CollectionUtils.emptySet();
 			}
 			synchronized (this) {
 				ExplanationJob.this.notify();
@@ -122,19 +143,27 @@ public class Projector {
 
 	}
 
-	public Projector(IQueryable q, Dictionary context, boolean considerMetaRequirements) {
+	public Projector(IQueryable<IInstallableUnit> q, Map<String, String> context, Set<IInstallableUnit> nonGreedyIUs, boolean considerMetaRequirements) {
 		picker = q;
-		noopVariables = new HashMap();
-		slice = new TwoTierMap();
-		selectionContext = context;
-		abstractVariables = new ArrayList();
+		noopVariables = new HashMap<IInstallableUnit, AbstractVariable>();
+		slice = new HashMap<String, Map<Version, IInstallableUnit>>();
+		selectionContext = InstallableUnit.contextIU(context);
+		abstractVariables = new ArrayList<AbstractVariable>();
 		result = new MultiStatus(DirectorActivator.PI_DIRECTOR, IStatus.OK, Messages.Planner_Problems_resolving_plan, null);
-		assumptions = new ArrayList();
+		assumptions = new ArrayList<Object>();
+		this.nonGreedyIUs = nonGreedyIUs;
 		this.considerMetaRequirements = considerMetaRequirements;
 	}
 
-	public void encode(IInstallableUnit entryPointIU, IInstallableUnit[] alreadyExistingRoots, IInstallableUnit[] newRoots, IProgressMonitor monitor) {
+	protected boolean isInstalled(IInstallableUnit iu) {
+		return !lastState.query(QueryUtil.createIUQuery(iu), null).isEmpty();
+	}
+
+	@SuppressWarnings("unchecked")
+	public void encode(IInstallableUnit entryPointIU, IInstallableUnit[] alreadyExistingRoots, IQueryable<IInstallableUnit> installedIUs, Collection<IInstallableUnit> newRoots, IProgressMonitor monitor) {
 		alreadyInstalledIUs = Arrays.asList(alreadyExistingRoots);
+		numberOfInstalledIUs = sizeOf(installedIUs);
+		lastState = installedIUs;
 		this.entryPoint = entryPointIU;
 		try {
 			long start = 0;
@@ -144,38 +173,42 @@ public class Projector {
 			}
 			IPBSolver solver;
 			if (DEBUG_ENCODING) {
-				solver = SolverFactory.newOPBStringSolver();
+				solver = new UserFriendlyPBStringSolver<Object>();
 			} else {
 				solver = SolverFactory.newEclipseP2();
 			}
 			solver.setTimeoutOnConflicts(1000);
-			Collector collector = picker.query(InstallableUnitQuery.ANY, new Collector(), null);
-			dependencyHelper = new DependencyHelper(solver);
-
-			Iterator iusToEncode = collector.iterator();
-			if (DEBUG) {
-				List iusToOrder = new ArrayList();
-				while (iusToEncode.hasNext()) {
-					iusToOrder.add(iusToEncode.next());
-				}
-				Collections.sort(iusToOrder);
-				iusToEncode = iusToOrder.iterator();
+			IQueryResult<IInstallableUnit> queryResult = picker.query(QueryUtil.createIUAnyQuery(), null);
+			if (DEBUG_ENCODING) {
+				dependencyHelper = new DependencyHelper<Object, Explanation>(solver, false);
+				((UserFriendlyPBStringSolver<Object>) solver).setMapping(dependencyHelper.getMappingToDomain());
+			} else {
+				dependencyHelper = new DependencyHelper<Object, Explanation>(solver);
+			}
+			Iterator<IInstallableUnit> iusToEncode = queryResult.iterator();
+			List<IInstallableUnit> iusToOrder = new ArrayList<IInstallableUnit>();
+			while (iusToEncode.hasNext()) {
+				iusToOrder.add(iusToEncode.next());
 			}
+			Collections.sort(iusToOrder);
+			iusToEncode = iusToOrder.iterator();
 			while (iusToEncode.hasNext()) {
 				if (monitor.isCanceled()) {
 					result.merge(Status.CANCEL_STATUS);
 					throw new OperationCanceledException();
 				}
-				IInstallableUnit iuToEncode = (IInstallableUnit) iusToEncode.next();
+				IInstallableUnit iuToEncode = iusToEncode.next();
 				if (iuToEncode != entryPointIU) {
 					processIU(iuToEncode, false);
 				}
 			}
+			createMustHave(entryPointIU, alreadyExistingRoots);
+
 			createConstraintsForSingleton();
 
-			createMustHave(entryPointIU, alreadyExistingRoots, newRoots);
+			createConstraintsForNonGreedy();
 
-			createOptimizationFunction(entryPointIU);
+			createOptimizationFunction(entryPointIU, newRoots);
 			if (DEBUG) {
 				long stop = System.currentTimeMillis();
 				Tracing.debug("Projection complete: " + (stop - start)); //$NON-NLS-1$
@@ -190,70 +223,116 @@ public class Projector {
 		}
 	}
 
+	private void createConstraintsForNonGreedy() throws ContradictionException {
+		for (IInstallableUnit iu : nonGreedyIUs) {
+			AbstractVariable var = getNonGreedyVariable(iu);
+			List<Object> providers = nonGreedyProvider.get(var);
+			if (providers == null || providers.size() == 0) {
+				dependencyHelper.setFalse(var, new Explanation.MissingGreedyIU(iu));
+			} else {
+				createImplication(var, providers, Explanation.OPTIONAL_REQUIREMENT);//FIXME
+			}
+		}
+
+	}
+
+	/**
+	 * Efficiently compute the size of a queryable
+	 */
+	private int sizeOf(IQueryable<IInstallableUnit> installedIUs) {
+		IQueryResult<IInstallableUnit> qr = installedIUs.query(QueryUtil.createIUAnyQuery(), null);
+		if (qr instanceof Collector<?>)
+			return ((Collector<?>) qr).size();
+		return qr.toUnmodifiableSet().size();
+	}
+
 	//Create an optimization function favoring the highest version of each IU
-	private void createOptimizationFunction(IInstallableUnit metaIu) {
+	private void createOptimizationFunction(IInstallableUnit metaIu, Collection<IInstallableUnit> newRoots) {
 
-		List weightedObjects = new ArrayList();
+		List<WeightedObject<? extends Object>> weightedObjects = new ArrayList<WeightedObject<? extends Object>>();
 
-		Set s = slice.entrySet();
-		final BigInteger POWER = BigInteger.valueOf(2);
+		Set<IInstallableUnit> transitiveClosure;
+		if (newRoots.isEmpty()) {
+			transitiveClosure = CollectionUtils.emptySet();
+		} else {
+			IQueryable<IInstallableUnit> queryable = new Slicer(picker, selectionContext, false).slice(newRoots.toArray(new IInstallableUnit[newRoots.size()]), new NullProgressMonitor());
+			if (queryable == null) {
+				transitiveClosure = CollectionUtils.emptySet();
+			} else {
+				transitiveClosure = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet();
+			}
+		}
+
+		Set<Entry<String, Map<Version, IInstallableUnit>>> s = slice.entrySet();
+		final BigInteger POWER = BigInteger.valueOf(numberOfInstalledIUs > 0 ? numberOfInstalledIUs + 1 : 2);
 
 		BigInteger maxWeight = POWER;
-		for (Iterator iterator = s.iterator(); iterator.hasNext();) {
-			Map.Entry entry = (Map.Entry) iterator.next();
-			HashMap conflictingEntries = (HashMap) entry.getValue();
+		for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
+			Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
+
+			List<IInstallableUnit> toSort = new ArrayList<IInstallableUnit>(conflictingEntries.values());
 			if (conflictingEntries.size() == 1) {
+				IInstallableUnit iu = toSort.get(0);
+				if (iu != metaIu) {
+					weightedObjects.add(WeightedObject.newWO(iu, POWER));
+				}
 				continue;
 			}
-			List toSort = new ArrayList(conflictingEntries.values());
 			Collections.sort(toSort, Collections.reverseOrder());
-			BigInteger weight = BigInteger.ONE;
+			BigInteger weight = POWER;
 			int count = toSort.size();
+			boolean installedIuMet = false;
+			boolean rootedMet = false;
 			for (int i = 0; i < count; i++) {
-				weightedObjects.add(WeightedObject.newWO(toSort.get(i), weight));
+				IInstallableUnit iu = toSort.get(i);
+				if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
+					installedIuMet = true;
+					weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
+				} else if (!installedIuMet && !rootedMet && isRoot(iu, newRoots)) {
+					rootedMet = true;
+					weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
+				} else {
+					weightedObjects.add(WeightedObject.newWO(iu, weight));
+				}
 				weight = weight.multiply(POWER);
 			}
 			if (weight.compareTo(maxWeight) > 0)
 				maxWeight = weight;
 		}
 
-		maxWeight = maxWeight.multiply(POWER);
-
-		// Weight the no-op variables beneath the abstract variables
-		for (Iterator iterator = noopVariables.values().iterator(); iterator.hasNext();) {
-			weightedObjects.add(WeightedObject.newWO(iterator.next(), maxWeight));
-		}
-
-		maxWeight = maxWeight.multiply(POWER);
+		// no need to add one here, since maxWeight is strictly greater than the
+		// maximal weight used so far.
+		maxWeight = maxWeight.multiply(POWER).multiply(BigInteger.valueOf(s.size()));
 
 		// Add the abstract variables
 		BigInteger abstractWeight = maxWeight.negate();
-		for (Iterator iterator = abstractVariables.iterator(); iterator.hasNext();) {
-			weightedObjects.add(WeightedObject.newWO(iterator.next(), abstractWeight));
+		for (AbstractVariable var : abstractVariables) {
+			weightedObjects.add(WeightedObject.newWO(var, abstractWeight));
 		}
 
-		maxWeight = maxWeight.multiply(POWER);
+		maxWeight = maxWeight.multiply(POWER).add(BigInteger.ONE);
 
 		BigInteger optionalWeight = maxWeight.negate();
 		long countOptional = 1;
-		List requestedPatches = new ArrayList();
-		IRequiredCapability[] reqs = metaIu.getRequiredCapabilities();
-		for (int j = 0; j < reqs.length; j++) {
-			if (!reqs[j].isOptional())
+		List<IInstallableUnit> requestedPatches = new ArrayList<IInstallableUnit>();
+		Collection<IRequirement> reqs = metaIu.getRequirements();
+		for (IRequirement req : reqs) {
+			if (req.getMin() > 0 || !req.isGreedy())
 				continue;
-			Collector matches = picker.query(new CapabilityQuery(reqs[j]), new Collector(), null);
-			for (Iterator iterator = matches.iterator(); iterator.hasNext();) {
-				IInstallableUnit match = (IInstallableUnit) iterator.next();
+			IQueryResult<IInstallableUnit> matches = picker.query(QueryUtil.createMatchQuery(req.getMatches()), null);
+			for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
+				IInstallableUnit match = iterator.next();
 				if (match instanceof IInstallableUnitPatch) {
 					requestedPatches.add(match);
 					countOptional = countOptional + 1;
-				} else
+				} else {
 					weightedObjects.add(WeightedObject.newWO(match, optionalWeight));
+				}
 			}
 		}
 
 		BigInteger patchWeight = maxWeight.multiply(POWER).multiply(BigInteger.valueOf(countOptional)).negate();
-		for (Iterator iterator = requestedPatches.iterator(); iterator.hasNext();) {
+		for (Iterator<IInstallableUnit> iterator = requestedPatches.iterator(); iterator.hasNext();) {
 			weightedObjects.add(WeightedObject.newWO(iterator.next(), patchWeight));
 		}
 		if (!weightedObjects.isEmpty()) {
@@ -261,11 +340,14 @@ public class Projector {
 		}
 	}
 
-	private void createObjectiveFunction(List weightedObjects) {
+	private boolean isRoot(IInstallableUnit iu, Collection<IInstallableUnit> newRoots) {
+		return newRoots.contains(iu);
+	}
+
+	private void createObjectiveFunction(List<WeightedObject<? extends Object>> weightedObjects) {
 		if (DEBUG) {
 			StringBuffer b = new StringBuffer();
-			for (Iterator i = weightedObjects.iterator(); i.hasNext();) {
-				WeightedObject object = (WeightedObject) i.next();
+			for (WeightedObject<? extends Object> object : weightedObjects) {
 				if (b.length() > 0)
 					b.append(", "); //$NON-NLS-1$
 				b.append(object.getWeight());
@@ -274,10 +356,12 @@ public class Projector {
 			}
 			Tracing.debug("objective function: " + b); //$NON-NLS-1$
 		}
-		dependencyHelper.setObjectiveFunction((WeightedObject[]) weightedObjects.toArray(new WeightedObject[weightedObjects.size()]));
+		@SuppressWarnings("unchecked")
+		WeightedObject<Object>[] array = (WeightedObject<Object>[]) weightedObjects.toArray(new WeightedObject<?>[weightedObjects.size()]);
+		dependencyHelper.setObjectiveFunction(array);
 	}
 
-	private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots, IInstallableUnit[] newRoots) throws ContradictionException {
+	private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots) throws ContradictionException {
 		processIU(iu, true);
 		if (DEBUG) {
 			Tracing.debug(iu + "=1"); //$NON-NLS-1$
@@ -286,93 +370,168 @@ public class Projector {
 		assumptions.add(iu);
 	}
 
-	private void createNegation(IInstallableUnit iu, IRequiredCapability req) throws ContradictionException {
+	private void createNegation(IInstallableUnit iu, IRequirement req) throws ContradictionException {
 		if (DEBUG) {
 			Tracing.debug(iu + "=0"); //$NON-NLS-1$
 		}
-		dependencyHelper.setFalse(iu, new Explanation.MissingIU(iu, req));
+		dependencyHelper.setFalse(iu, new Explanation.MissingIU(iu, req, iu == this.entryPoint));
 	}
 
 	// Check whether the requirement is applicable
-	private boolean isApplicable(IRequiredCapability req) {
-		String filter = req.getFilter();
-		if (filter == null)
-			return true;
-		try {
-			return DirectorActivator.context.createFilter(filter).match(selectionContext);
-		} catch (InvalidSyntaxException e) {
-			return false;
-		}
+	private boolean isApplicable(IRequirement req) {
+		IMatchExpression<IInstallableUnit> filter = req.getFilter();
+		return filter == null || filter.isMatch(selectionContext);
 	}
 
 	private boolean isApplicable(IInstallableUnit iu) {
-		String enablementFilter = iu.getFilter();
-		if (enablementFilter == null)
-			return true;
-		try {
-			return DirectorActivator.context.createFilter(enablementFilter).match(selectionContext);
-		} catch (InvalidSyntaxException e) {
-			return false;
-		}
+		IMatchExpression<IInstallableUnit> filter = iu.getFilter();
+		return filter == null || filter.isMatch(selectionContext);
 	}
 
-	private void expandRequirement(IRequiredCapability req, IInstallableUnit iu, List optionalAbstractRequirements, boolean isRootIu) throws ContradictionException {
+	private void expandNegatedRequirement(IRequirement req, IInstallableUnit iu, List<AbstractVariable> optionalAbstractRequirements, boolean isRootIu) throws ContradictionException {
 		if (!isApplicable(req))
 			return;
-		List matches = getApplicableMatches(req);
-		if (isHostRequirement(iu, req)) {
-			rememberHostMatches(iu, matches);
+		List<IInstallableUnit> matches = getApplicableMatches(req);
+		if (matches.isEmpty()) {
+			return;
+		}
+		Explanation explanation;
+		if (isRootIu) {
+			IInstallableUnit reqIu = matches.get(0);
+			if (alreadyInstalledIUs.contains(reqIu)) {
+				explanation = new Explanation.IUInstalled(reqIu);
+			} else {
+				explanation = new Explanation.IUToInstall(reqIu);
+			}
+		} else {
+			explanation = new Explanation.HardRequirement(iu, req);
+		}
+		createNegationImplication(iu, matches, explanation);
+	}
+
+	private void determinePotentialHostsForFragment(IInstallableUnit iu) {
+		// determine matching hosts only for fragments
+		if (!(iu instanceof IInstallableUnitFragment))
+			return;
+
+		IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
+		// for each host requirement, find matches and remember them 
+		for (IRequirement req : fragment.getHost()) {
+			List<IInstallableUnit> matches = getApplicableMatches(req);
+			rememberHostMatches((IInstallableUnitFragment) iu, matches);
+		}
+	}
+
+	private void expandRequirement(IRequirement req, IInstallableUnit iu, List<AbstractVariable> optionalAbstractRequirements, boolean isRootIu) throws ContradictionException {
+		if (req.getMax() == 0) {
+			expandNegatedRequirement(req, iu, optionalAbstractRequirements, isRootIu);
+			return;
 		}
-		if (!req.isOptional()) {
+		if (!isApplicable(req))
+			return;
+		List<IInstallableUnit> matches = getApplicableMatches(req);
+		determinePotentialHostsForFragment(iu);
+		if (req.getMin() > 0) {
 			if (matches.isEmpty()) {
-				missingRequirement(iu, req);
+				if (iu == entryPoint && emptyBecauseFiltered) {
+					dependencyHelper.setFalse(iu, new NotInstallableRoot(req));
+				} else {
+					missingRequirement(iu, req);
+				}
 			} else {
-				IInstallableUnit reqIu = (IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
-				Explanation explanation;
-				if (isRootIu) {
-					if (alreadyInstalledIUs.contains(reqIu)) {
-						explanation = new Explanation.IUInstalled(reqIu);
+				if (req.isGreedy()) {
+					IInstallableUnit reqIu = matches.get(0);
+					Explanation explanation;
+					if (isRootIu) {
+						if (alreadyInstalledIUs.contains(reqIu)) {
+							explanation = new Explanation.IUInstalled(reqIu);
+						} else {
+							explanation = new Explanation.IUToInstall(reqIu);
+						}
 					} else {
-						explanation = new Explanation.IUToInstall(reqIu);
+						explanation = new Explanation.HardRequirement(iu, req);
+					}
+					createImplication(iu, matches, explanation);
+					IInstallableUnit current;
+					for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+						current = it.next();
+						if (nonGreedyIUs.contains(current)) {
+							addNonGreedyProvider(getNonGreedyVariable(current), iu);
+						}
 					}
 				} else {
-					explanation = new Explanation.HardRequirement(iu, req);
+					List<Object> newConstraint = new ArrayList<Object>(matches.size());
+					IInstallableUnit current;
+					for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+						current = it.next();
+						newConstraint.add(getNonGreedyVariable(current));
+					}
+					createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
 				}
-				createImplication(iu, matches, explanation);
 			}
 		} else {
 			if (!matches.isEmpty()) {
-				AbstractVariable abs = getAbstractVariable();
-				createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+				IInstallableUnit current;
+				AbstractVariable abs;
+				if (req.isGreedy()) {
+					abs = getAbstractVariable(req);
+					createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+					for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+						current = it.next();
+						if (nonGreedyIUs.contains(current)) {
+							addNonGreedyProvider(getNonGreedyVariable(current), abs);
+						}
+					}
+				} else {
+					abs = getAbstractVariable(req, false);
+					List<Object> newConstraint = new ArrayList<Object>();
+					for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+						current = it.next();
+						newConstraint.add(getNonGreedyVariable(current));
+					}
+					createImplication(new Object[] {abs, iu}, newConstraint, Explanation.OPTIONAL_REQUIREMENT);
+				}
 				optionalAbstractRequirements.add(abs);
 			}
 		}
 	}
 
-	private void expandRequirements(IRequiredCapability[] reqs, IInstallableUnit iu, boolean isRootIu) throws ContradictionException {
-		if (reqs.length == 0) {
-			return;
+	private void addNonGreedyProvider(AbstractVariable nonGreedyVariable, Object o) {
+		List<Object> providers = nonGreedyProvider.get(nonGreedyVariable);
+		if (providers == null) {
+			providers = new ArrayList<Object>();
+			nonGreedyProvider.put(nonGreedyVariable, providers);
 		}
-		List optionalAbstractRequirements = new ArrayList();
-		for (int i = 0; i < reqs.length; i++) {
-			expandRequirement(reqs[i], iu, optionalAbstractRequirements, isRootIu);
+		providers.add(o);
+	}
+
+	private void expandRequirements(Collection<IRequirement> reqs, IInstallableUnit iu, boolean isRootIu) throws ContradictionException {
+		if (reqs.isEmpty())
+			return;
+		List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
+		for (IRequirement req : reqs) {
+			expandRequirement(req, iu, optionalAbstractRequirements, isRootIu);
 		}
 		createOptionalityExpression(iu, optionalAbstractRequirements);
 	}
 
 	public void processIU(IInstallableUnit iu, boolean isRootIU) throws ContradictionException {
 		iu = iu.unresolved();
-
-		slice.put(iu.getId(), iu.getVersion(), iu);
+		Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId());
+		if (iuSlice == null) {
+			iuSlice = new HashMap<Version, IInstallableUnit>();
+			slice.put(iu.getId(), iuSlice);
+		}
+		iuSlice.put(iu.getVersion(), iu);
 		if (!isApplicable(iu)) {
 			createNegation(iu, null);
 			return;
 		}
 
-		Collector applicablePatches = getApplicablePatches(iu);
+		IQueryResult<IInstallableUnit> applicablePatches = getApplicablePatches(iu);
 		expandLifeCycle(iu, isRootIU);
 		//No patches apply, normal code path
-		if (applicablePatches.size() == 0) {
+		if (applicablePatches.isEmpty()) {
 			expandRequirements(getRequiredCapabilities(iu), iu, isRootIU);
 		} else {
 			//Patches are applicable to the IU
@@ -380,28 +539,38 @@ public class Projector {
 		}
 	}
 
-	private IRequiredCapability[] getRequiredCapabilities(IInstallableUnit iu) {
-		if (considerMetaRequirements == false || iu.getMetaRequiredCapabilities().length == 0)
-			return iu.getRequiredCapabilities();
-		IRequiredCapability[] aggregatedCapabilities = new IRequiredCapability[iu.getRequiredCapabilities().length + iu.getMetaRequiredCapabilities().length];
-		System.arraycopy(iu.getRequiredCapabilities(), 0, aggregatedCapabilities, 0, iu.getRequiredCapabilities().length);
-		System.arraycopy(iu.getMetaRequiredCapabilities(), 0, aggregatedCapabilities, iu.getRequiredCapabilities().length, iu.getMetaRequiredCapabilities().length);
-		return aggregatedCapabilities;
+	private Collection<IRequirement> getRequiredCapabilities(IInstallableUnit iu) {
+		boolean isFragment = iu instanceof IInstallableUnitFragment;
+		//Short-circuit for the case of an IInstallableUnit 
+		if ((!isFragment) && iu.getMetaRequirements().size() == 0)
+			return iu.getRequirements();
+
+		ArrayList<IRequirement> aggregatedRequirements = new ArrayList<IRequirement>(iu.getRequirements().size() + iu.getMetaRequirements().size() + (isFragment ? ((IInstallableUnitFragment) iu).getHost().size() : 0));
+		aggregatedRequirements.addAll(iu.getRequirements());
+
+		if (iu instanceof IInstallableUnitFragment) {
+			aggregatedRequirements.addAll(((IInstallableUnitFragment) iu).getHost());
+		}
+
+		if (considerMetaRequirements)
+			aggregatedRequirements.addAll(iu.getMetaRequirements());
+		return aggregatedRequirements;
 	}
 
 	static final class Pending {
-		List matches;
+		List<? super IInstallableUnitPatch> matches;
 		Explanation explanation;
 		Object left;
 	}
 
-	private void expandRequirementsWithPatches(IInstallableUnit iu, Collector applicablePatches, boolean isRootIu) throws ContradictionException {
+	private void expandRequirementsWithPatches(IInstallableUnit iu, IQueryResult<IInstallableUnit> applicablePatches, boolean isRootIu) throws ContradictionException {
 		//Unmodified dependencies
-		Map unchangedRequirements = new HashMap(getRequiredCapabilities(iu).length);
-		Map nonPatchedRequirements = new HashMap(getRequiredCapabilities(iu).length);
-		for (Iterator iterator = applicablePatches.iterator(); iterator.hasNext();) {
+		Collection<IRequirement> iuRequirements = getRequiredCapabilities(iu);
+		Map<IRequirement, List<IInstallableUnitPatch>> unchangedRequirements = new HashMap<IRequirement, List<IInstallableUnitPatch>>(iuRequirements.size());
+		Map<IRequirement, Pending> nonPatchedRequirements = new HashMap<IRequirement, Pending>(iuRequirements.size());
+		for (Iterator<IInstallableUnit> iterator = applicablePatches.iterator(); iterator.hasNext();) {
 			IInstallableUnitPatch patch = (IInstallableUnitPatch) iterator.next();
-			IRequiredCapability[][] reqs = mergeRequirements(iu, patch);
+			IRequirement[][] reqs = mergeRequirements(iu, patch);
 			if (reqs.length == 0)
 				return;
 
@@ -410,16 +579,20 @@ public class Projector {
 			// noop(IU)-> ~ABS
 			// IU -> (noop(IU) or ABS)
 			// Therefore we only need one optional requirement statement per IU
-			List optionalAbstractRequirements = new ArrayList();
+			List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
 			for (int i = 0; i < reqs.length; i++) {
 				//The requirement is unchanged
 				if (reqs[i][0] == reqs[i][1]) {
+					if (reqs[i][0].getMax() == 0) {
+						expandNegatedRequirement(reqs[i][0], iu, optionalAbstractRequirements, isRootIu);
+						return;
+					}
 					if (!isApplicable(reqs[i][0]))
 						continue;
 
-					List patchesAppliedElseWhere = (List) unchangedRequirements.get(reqs[i][0]);
+					List<IInstallableUnitPatch> patchesAppliedElseWhere = unchangedRequirements.get(reqs[i][0]);
 					if (patchesAppliedElseWhere == null) {
-						patchesAppliedElseWhere = new ArrayList();
+						patchesAppliedElseWhere = new ArrayList<IInstallableUnitPatch>();
 						unchangedRequirements.put(reqs[i][0], patchesAppliedElseWhere);
 					}
 					patchesAppliedElseWhere.add(patch);
@@ -429,32 +602,64 @@ public class Projector {
 				//Generate dependency when the patch is applied
 				//P1 -> (A -> D) equiv. (P1 & A) -> D
 				if (isApplicable(reqs[i][1])) {
-					IRequiredCapability req = reqs[i][1];
-					List matches = getApplicableMatches(req);
-					if (isHostRequirement(iu, req)) {
-						rememberHostMatches(iu, matches);
-					}
-					if (!req.isOptional()) {
+					IRequirement req = reqs[i][1];
+					List<IInstallableUnit> matches = getApplicableMatches(req);
+					determinePotentialHostsForFragment(iu);
+					if (req.getMin() > 0) {
 						if (matches.isEmpty()) {
 							missingRequirement(patch, req);
 						} else {
-							IInstallableUnit reqIu = (IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
-							Explanation explanation;
-							if (isRootIu) {
-								if (alreadyInstalledIUs.contains(reqIu)) {
-									explanation = new Explanation.IUInstalled(reqIu);
+							IInstallableUnit current;
+							if (req.isGreedy()) {
+								IInstallableUnit reqIu = matches.get(0);
+								Explanation explanation;
+								if (isRootIu) {
+									if (alreadyInstalledIUs.contains(reqIu)) {
+										explanation = new Explanation.IUInstalled(reqIu);
+									} else {
+										explanation = new Explanation.IUToInstall(reqIu);
+									}
 								} else {
-									explanation = new Explanation.IUToInstall(reqIu);
+									explanation = new Explanation.PatchedHardRequirement(iu, req, patch);
+								}
+								createImplication(new Object[] {patch, iu}, matches, explanation);
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									if (nonGreedyIUs.contains(current)) {
+										addNonGreedyProvider(getNonGreedyVariable(current), iu);
+									}
 								}
 							} else {
-								explanation = new Explanation.PatchedHardRequirement(iu, req, patch);
+								List<Object> newConstraint = new ArrayList<Object>();
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									newConstraint.add(getNonGreedyVariable(current));
+								}
+								createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
 							}
-							createImplication(new Object[] {patch, iu}, matches, explanation);
 						}
 					} else {
 						if (!matches.isEmpty()) {
-							AbstractVariable abs = getAbstractVariable();
-							createImplication(new Object[] {patch, abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+							IInstallableUnit current;
+							AbstractVariable abs;
+							if (req.isGreedy()) {
+								abs = getAbstractVariable(req);
+								createImplication(new Object[] {patch, abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									if (nonGreedyIUs.contains(current)) {
+										addNonGreedyProvider(getNonGreedyVariable(current), abs);
+									}
+								}
+							} else {
+								abs = getAbstractVariable(req, false);
+								List<Object> newConstraint = new ArrayList<Object>(matches.size());
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									newConstraint.add(getNonGreedyVariable(current));
+								}
+								createImplication(new Object[] {patch, abs, iu}, newConstraint, Explanation.OPTIONAL_REQUIREMENT);
+							}
 							optionalAbstractRequirements.add(abs);
 						}
 					}
@@ -462,57 +667,100 @@ public class Projector {
 				//Generate dependency when the patch is not applied
 				//-P1 -> (A -> B) ( equiv. A -> (P1 or B) )
 				if (isApplicable(reqs[i][0])) {
-					IRequiredCapability req = reqs[i][0];
+					IRequirement req = reqs[i][0];
 
 					// Fix: if multiple patches apply to the same IU-req, we need to make sure we list each
 					// patch as an optional match
-					Pending pending = (Pending) nonPatchedRequirements.get(req);
+					Pending pending = nonPatchedRequirements.get(req);
 					if (pending != null) {
 						pending.matches.add(patch);
 						continue;
 					}
-
-					List matches = getApplicableMatches(req);
-					if (isHostRequirement(iu, req)) {
-						rememberHostMatches(iu, matches);
-					}
-					if (!req.isOptional()) {
+					pending = new Pending();
+					pending.left = iu;
+					List<IInstallableUnit> matches = getApplicableMatches(req);
+					determinePotentialHostsForFragment(iu);
+					if (req.getMin() > 0) {
 						if (matches.isEmpty()) {
-							dependencyHelper.implication(new Object[] {iu}).implies(patch).named(new Explanation.HardRequirement(iu, null));
+							matches.add(patch);
+							pending.explanation = new Explanation.HardRequirement(iu, req);
+							pending.matches = matches;
 						} else {
+							// manage non greedy IUs
+							IInstallableUnit current;
+							List<Object> nonGreedys = new ArrayList<Object>();
+							for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+								current = it.next();
+								if (nonGreedyIUs.contains(current)) {
+									nonGreedys.add(getNonGreedyVariable(current));
+								}
+							}
 							matches.add(patch);
-							IInstallableUnit reqIu = (IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
-
-							Explanation explanation;
-							if (isRootIu) {
-								if (alreadyInstalledIUs.contains(reqIu)) {
-									explanation = new Explanation.IUInstalled(reqIu);
+							if (req.isGreedy()) {
+								IInstallableUnit reqIu = matches.get(0);///(IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
+								Explanation explanation;
+								if (isRootIu) {
+									if (alreadyInstalledIUs.contains(reqIu)) {
+										explanation = new Explanation.IUInstalled(reqIu);
+									} else {
+										explanation = new Explanation.IUToInstall(reqIu);
+									}
 								} else {
-									explanation = new Explanation.IUToInstall(reqIu);
+									explanation = new Explanation.HardRequirement(iu, req);
+								}
+
+								// Fix: make sure we collect all patches that will impact this IU-req, not just one
+								pending.explanation = explanation;
+								pending.matches = matches;
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									if (nonGreedyIUs.contains(current)) {
+										addNonGreedyProvider(getNonGreedyVariable(current), iu);
+									}
 								}
 							} else {
-								explanation = new Explanation.HardRequirement(iu, req);
+								List<Object> newConstraint = new ArrayList<Object>(matches.size());
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									newConstraint.add(getNonGreedyVariable(current));
+								}
+								pending.explanation = new Explanation.HardRequirement(iu, req);
+								pending.matches = newConstraint;
 							}
-
-							// Fix: make sure we collect all patches that will impact this IU-req, not just one
-							pending = new Pending();
-							pending.left = iu;
-							pending.explanation = explanation;
-							pending.matches = matches;
 							nonPatchedRequirements.put(req, pending);
+
 						}
 					} else {
 						if (!matches.isEmpty()) {
-							AbstractVariable abs = getAbstractVariable();
+							IInstallableUnit current;
+							AbstractVariable abs;
 							matches.add(patch);
-
-							// Fix: make sure we collect all patches that will impact this IU-req, not just one
 							pending = new Pending();
-							pending.left = new Object[] {abs, iu};
 							pending.explanation = Explanation.OPTIONAL_REQUIREMENT;
-							pending.matches = matches;
-							nonPatchedRequirements.put(req, pending);
 
+							if (req.isGreedy()) {
+								abs = getAbstractVariable(req);
+								// Fix: make sure we collect all patches that will impact this IU-req, not just one
+								pending.left = new Object[] {abs, iu};
+								pending.matches = matches;
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									if (nonGreedyIUs.contains(current)) {
+										addNonGreedyProvider(getNonGreedyVariable(current), abs);
+									}
+								}
+							} else {
+								abs = getAbstractVariable(req, false);
+								List<Object> newConstraint = new ArrayList<Object>(matches.size());
+								for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+									current = it.next();
+									newConstraint.add(getNonGreedyVariable(current));
+								}
+								newConstraint.add(patch);
+								pending.left = new Object[] {abs, iu};
+								pending.matches = newConstraint;
+							}
+							nonPatchedRequirements.put(req, pending);
 							optionalAbstractRequirements.add(abs);
 						}
 					}
@@ -522,28 +770,24 @@ public class Projector {
 		}
 
 		// Fix: now create the pending non-patch requirements based on the full set of patches
-		for (Iterator iterator = nonPatchedRequirements.values().iterator(); iterator.hasNext();) {
-			Pending pending = (Pending) iterator.next();
+		for (Pending pending : nonPatchedRequirements.values()) {
 			createImplication(pending.left, pending.matches, pending.explanation);
 		}
 
-		List optionalAbstractRequirements = new ArrayList();
-		for (Iterator iterator = unchangedRequirements.entrySet().iterator(); iterator.hasNext();) {
-			Entry entry = (Entry) iterator.next();
-			List patchesApplied = (List) entry.getValue();
-			List allPatches = new ArrayList(applicablePatches.toCollection());
-			allPatches.removeAll(patchesApplied);
-			List requiredPatches = new ArrayList();
-			for (Iterator iterator2 = allPatches.iterator(); iterator2.hasNext();) {
-				IInstallableUnitPatch patch = (IInstallableUnitPatch) iterator2.next();
-				requiredPatches.add(patch);
-			}
-			IRequiredCapability req = (IRequiredCapability) entry.getKey();
-			List matches = getApplicableMatches(req);
-			if (isHostRequirement(iu, req)) {
-				rememberHostMatches(iu, matches);
+		List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
+		for (Entry<IRequirement, List<IInstallableUnitPatch>> entry : unchangedRequirements.entrySet()) {
+			List<IInstallableUnitPatch> patchesApplied = entry.getValue();
+			Iterator<IInstallableUnit> allPatches = applicablePatches.iterator();
+			List<IInstallableUnitPatch> requiredPatches = new ArrayList<IInstallableUnitPatch>();
+			while (allPatches.hasNext()) {
+				IInstallableUnitPatch patch = (IInstallableUnitPatch) allPatches.next();
+				if (!patchesApplied.contains(patch))
+					requiredPatches.add(patch);
 			}
-			if (!req.isOptional()) {
+			IRequirement req = entry.getKey();
+			List<IInstallableUnit> matches = getApplicableMatches(req);
+			determinePotentialHostsForFragment(iu);
+			if (req.getMin() > 0) {
 				if (matches.isEmpty()) {
 					if (requiredPatches.isEmpty()) {
 						missingRequirement(iu, req);
@@ -551,27 +795,69 @@ public class Projector {
 						createImplication(iu, requiredPatches, new Explanation.HardRequirement(iu, req));
 					}
 				} else {
+					// manage non greedy IUs
+					IInstallableUnit current;
+					List<Object> nonGreedys = new ArrayList<Object>(matches.size());
+					for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+						current = it.next();
+						if (nonGreedyIUs.contains(current)) {
+							nonGreedys.add(getNonGreedyVariable(current));
+						}
+					}
 					if (!requiredPatches.isEmpty())
 						matches.addAll(requiredPatches);
-					IInstallableUnit reqIu = (IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
-					Explanation explanation;
-					if (isRootIu) {
-						if (alreadyInstalledIUs.contains(reqIu)) {
-							explanation = new Explanation.IUInstalled(reqIu);
+					if (req.isGreedy()) {
+						IInstallableUnit reqIu = matches.get(0);
+						Explanation explanation;
+						if (isRootIu) {
+							if (alreadyInstalledIUs.contains(reqIu)) {
+								explanation = new Explanation.IUInstalled(reqIu);
+							} else {
+								explanation = new Explanation.IUToInstall(reqIu);
+							}
 						} else {
-							explanation = new Explanation.IUToInstall(reqIu);
+							explanation = new Explanation.HardRequirement(iu, req);
+						}
+						createImplication(iu, matches, explanation);
+						for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+							current = it.next();
+							if (nonGreedyIUs.contains(current)) {
+								addNonGreedyProvider(getNonGreedyVariable(current), iu);
+							}
 						}
 					} else {
-						explanation = new Explanation.HardRequirement(iu, req);
+						List<Object> newConstraint = new ArrayList<Object>(matches.size());
+						for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+							current = it.next();
+							newConstraint.add(getNonGreedyVariable(current));
+						}
+						createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
 					}
-					createImplication(iu, matches, explanation);
 				}
 			} else {
 				if (!matches.isEmpty()) {
+					IInstallableUnit current;
 					if (!requiredPatches.isEmpty())
 						matches.addAll(requiredPatches);
-					AbstractVariable abs = getAbstractVariable();
-					createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+					AbstractVariable abs;
+					if (req.isGreedy()) {
+						abs = getAbstractVariable(req);
+						createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
+						for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+							current = it.next();
+							if (nonGreedyIUs.contains(current)) {
+								addNonGreedyProvider(getNonGreedyVariable(current), iu);
+							}
+						}
+					} else {
+						abs = getAbstractVariable(req, false);
+						List<Object> newConstraint = new ArrayList<Object>(matches.size());
+						for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+							current = it.next();
+							newConstraint.add(getNonGreedyVariable(current));
+						}
+						createImplication(new Object[] {abs, iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
+					}
 					optionalAbstractRequirements.add(abs);
 				}
 			}
@@ -583,64 +869,68 @@ public class Projector {
 		if (!(iu instanceof IInstallableUnitPatch))
 			return;
 		IInstallableUnitPatch patch = (IInstallableUnitPatch) iu;
-		IRequiredCapability req = patch.getLifeCycle();
+		IRequirement req = patch.getLifeCycle();
 		if (req == null)
 			return;
-		expandRequirement(req, iu, Collections.EMPTY_LIST, isRootIu);
+		expandRequirement(req, iu, CollectionUtils.<AbstractVariable> emptyList(), isRootIu);
 	}
 
-	private void missingRequirement(IInstallableUnit iu, IRequiredCapability req) throws ContradictionException {
+	private void missingRequirement(IInstallableUnit iu, IRequirement req) throws ContradictionException {
 		result.add(new Status(IStatus.WARNING, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_Unsatisfied_dependency, iu, req)));
 		createNegation(iu, req);
 	}
 
+	private boolean emptyBecauseFiltered;
+
 	/**
 	 * @param req
 	 * @return a list of mandatory requirements if any, an empty list if req.isOptional().
 	 */
-	private List getApplicableMatches(IRequiredCapability req) {
-		List target = new ArrayList();
-		Collector matches = picker.query(new CapabilityQuery(req), new Collector(), null);
-		for (Iterator iterator = matches.iterator(); iterator.hasNext();) {
-			IInstallableUnit match = (IInstallableUnit) iterator.next();
+	private List<IInstallableUnit> getApplicableMatches(IRequirement req) {
+		List<IInstallableUnit> target = new ArrayList<IInstallableUnit>();
+		IQueryResult<IInstallableUnit> matches = picker.query(QueryUtil.createMatchQuery(req.getMatches()), null);
+		for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
+			IInstallableUnit match = iterator.next();
 			if (isApplicable(match)) {
 				target.add(match);
 			}
 		}
+		emptyBecauseFiltered = !matches.isEmpty() && target.isEmpty();
 		return target;
 	}
 
 	//Return a new array of requirements representing the application of the patch
-	private IRequiredCapability[][] mergeRequirements(IInstallableUnit iu, IInstallableUnitPatch patch) {
+	private IRequirement[][] mergeRequirements(IInstallableUnit iu, IInstallableUnitPatch patch) {
 		if (patch == null)
 			return null;
-		IRequirementChange[] changes = patch.getRequirementsChange();
-		IRequiredCapability[] originalRequirements = new IRequiredCapability[iu.getRequiredCapabilities().length];
-		System.arraycopy(iu.getRequiredCapabilities(), 0, originalRequirements, 0, originalRequirements.length);
-		List rrr = new ArrayList();
+		List<IRequirementChange> changes = patch.getRequirementsChange();
+		Collection<IRequirement> iuRequirements = iu.getRequirements();
+		IRequirement[] originalRequirements = iuRequirements.toArray(new IRequirement[iuRequirements.size()]);
+		List<IRequirement[]> rrr = new ArrayList<IRequirement[]>();
 		boolean found = false;
-		for (int i = 0; i < changes.length; i++) {
+		for (int i = 0; i < changes.size(); i++) {
+			IRequirementChange change = changes.get(i);
 			for (int j = 0; j < originalRequirements.length; j++) {
-				if (originalRequirements[j] != null && changes[i].matches(originalRequirements[j])) {
+				if (originalRequirements[j] != null && change.matches((IRequiredCapability) originalRequirements[j])) {
 					found = true;
-					if (changes[i].newValue() != null)
-						rrr.add(new IRequiredCapability[] {originalRequirements[j], changes[i].newValue()});
+					if (change.newValue() != null)
+						rrr.add(new IRequirement[] {originalRequirements[j], change.newValue()});
 					else
 						// case where a requirement is removed
-						rrr.add(new IRequiredCapability[] {originalRequirements[j], null});
+						rrr.add(new IRequirement[] {originalRequirements[j], null});
 					originalRequirements[j] = null;
 				}
 				//				break;
 			}
-			if (!found && changes[i].applyOn() == null && changes[i].newValue() != null) //Case where a new requirement is added
-				rrr.add(new IRequiredCapability[] {null, changes[i].newValue()});
+			if (!found && change.applyOn() == null && change.newValue() != null) //Case where a new requirement is added
+				rrr.add(new IRequirement[] {null, change.newValue()});
 		}
 		//Add all the unmodified requirements to the result
 		for (int i = 0; i < originalRequirements.length; i++) {
 			if (originalRequirements[i] != null)
-				rrr.add(new IRequiredCapability[] {originalRequirements[i], originalRequirements[i]});
+				rrr.add(new IRequirement[] {originalRequirements[i], originalRequirements[i]});
 		}
-		return (IRequiredCapability[][]) rrr.toArray(new IRequiredCapability[rrr.size()][]);
+		return rrr.toArray(new IRequirement[rrr.size()][]);
 	}
 
 	/**
@@ -652,26 +942,34 @@ public class Projector {
 	 * @param optionalRequirements
 	 * @throws ContradictionException
 	 */
-	private void createOptionalityExpression(IInstallableUnit iu, List optionalRequirements) throws ContradictionException {
+	private void createOptionalityExpression(IInstallableUnit iu, List<AbstractVariable> optionalRequirements) throws ContradictionException {
 		if (optionalRequirements.isEmpty())
 			return;
 		AbstractVariable noop = getNoOperationVariable(iu);
-		for (Iterator i = optionalRequirements.iterator(); i.hasNext();) {
-			AbstractVariable abs = (AbstractVariable) i.next();
+		for (AbstractVariable abs : optionalRequirements) {
 			createIncompatibleValues(abs, noop);
 		}
 		optionalRequirements.add(noop);
 		createImplication(iu, optionalRequirements, Explanation.OPTIONAL_REQUIREMENT);
 	}
 
-	private void createImplication(Object left, List right, Explanation name) throws ContradictionException {
+	//This will create as many implication as there is element in the right argument
+	private void createNegationImplication(Object left, List<?> right, Explanation name) throws ContradictionException {
+		if (DEBUG) {
+			Tracing.debug(name + ": " + left + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		for (Object r : right)
+			dependencyHelper.implication(new Object[] {left}).impliesNot(r).named(name);
+	}
+
+	private void createImplication(Object left, List<?> right, Explanation name) throws ContradictionException {
 		if (DEBUG) {
 			Tracing.debug(name + ": " + left + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		dependencyHelper.implication(new Object[] {left}).implies(right.toArray()).named(name);
 	}
 
-	private void createImplication(Object[] left, List right, Explanation name) throws ContradictionException {
+	private void createImplication(Object[] left, List<?> right, Explanation name) throws ContradictionException {
 		if (DEBUG) {
 			Tracing.debug(name + ": " + Arrays.asList(left) + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
 		}
@@ -679,28 +977,26 @@ public class Projector {
 	}
 
 	//Return IUPatches that are applicable for the given iu
-	private Collector getApplicablePatches(IInstallableUnit iu) {
+	private IQueryResult<IInstallableUnit> getApplicablePatches(IInstallableUnit iu) {
 		if (patches == null)
-			patches = new QueryableArray((IInstallableUnit[]) picker.query(ApplicablePatchQuery.ANY, new Collector(), null).toArray(IInstallableUnit.class));
+			patches = new QueryableArray(picker.query(QueryUtil.createIUPatchQuery(), null).toArray(IInstallableUnit.class));
 
-		return patches.query(new ApplicablePatchQuery(iu), new Collector(), null);
+		return patches.query(new ApplicablePatchQuery(iu), null);
 	}
 
 	//Create constraints to deal with singleton
 	//When there is a mix of singleton and non singleton, several constraints are generated
 	private void createConstraintsForSingleton() throws ContradictionException {
-		Set s = slice.entrySet();
-		for (Iterator iterator = s.iterator(); iterator.hasNext();) {
-			Map.Entry entry = (Map.Entry) iterator.next();
-			HashMap conflictingEntries = (HashMap) entry.getValue();
+		Set<Entry<String, Map<Version, IInstallableUnit>>> s = slice.entrySet();
+		for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
+			Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
 			if (conflictingEntries.size() < 2)
 				continue;
 
-			Collection conflictingVersions = conflictingEntries.values();
-			List singletons = new ArrayList();
-			List nonSingletons = new ArrayList();
-			for (Iterator conflictIterator = conflictingVersions.iterator(); conflictIterator.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) conflictIterator.next();
+			Collection<IInstallableUnit> conflictingVersions = conflictingEntries.values();
+			List<IInstallableUnit> singletons = new ArrayList<IInstallableUnit>();
+			List<IInstallableUnit> nonSingletons = new ArrayList<IInstallableUnit>();
+			for (IInstallableUnit iu : conflictingVersions) {
 				if (iu.isSingleton()) {
 					singletons.add(iu);
 				} else {
@@ -712,12 +1008,12 @@ public class Projector {
 
 			IInstallableUnit[] singletonArray;
 			if (nonSingletons.isEmpty()) {
-				singletonArray = (IInstallableUnit[]) singletons.toArray(new IInstallableUnit[singletons.size()]);
+				singletonArray = singletons.toArray(new IInstallableUnit[singletons.size()]);
 				createAtMostOne(singletonArray);
 			} else {
-				singletonArray = (IInstallableUnit[]) singletons.toArray(new IInstallableUnit[singletons.size() + 1]);
-				for (Iterator iterator2 = nonSingletons.iterator(); iterator2.hasNext();) {
-					singletonArray[singletonArray.length - 1] = (IInstallableUnit) iterator2.next();
+				singletonArray = singletons.toArray(new IInstallableUnit[singletons.size() + 1]);
+				for (IInstallableUnit nonSingleton : nonSingletons) {
+					singletonArray[singletonArray.length - 1] = nonSingleton;
 					createAtMostOne(singletonArray);
 				}
 			}
@@ -732,7 +1028,7 @@ public class Projector {
 			}
 			Tracing.debug("At most 1 of " + b); //$NON-NLS-1$
 		}
-		dependencyHelper.atMost(1, ius).named(new Explanation.Singleton(ius));
+		dependencyHelper.atMost(1, (Object[]) ius).named(new Explanation.Singleton(ius));
 	}
 
 	private void createIncompatibleValues(AbstractVariable v1, AbstractVariable v2) throws ContradictionException {
@@ -744,24 +1040,39 @@ public class Projector {
 			}
 			Tracing.debug("At most 1 of " + b); //$NON-NLS-1$
 		}
-		dependencyHelper.atMost(1, vars).named(Explanation.OPTIONAL_REQUIREMENT);
+		dependencyHelper.atMost(1, (Object[]) vars).named(Explanation.OPTIONAL_REQUIREMENT);
+	}
+
+	private AbstractVariable getAbstractVariable(IRequirement req) {
+		return getAbstractVariable(req, true);
 	}
 
-	private AbstractVariable getAbstractVariable() {
-		AbstractVariable abstractVariable = new AbstractVariable();
-		abstractVariables.add(abstractVariable);
+	private AbstractVariable getAbstractVariable(IRequirement req, boolean appearInOptFunction) {
+		AbstractVariable abstractVariable = DEBUG_ENCODING ? new AbstractVariable("Abs_" + req.toString()) : new AbstractVariable(); //$NON-NLS-1$
+		if (appearInOptFunction) {
+			abstractVariables.add(abstractVariable);
+		}
 		return abstractVariable;
 	}
 
 	private AbstractVariable getNoOperationVariable(IInstallableUnit iu) {
-		AbstractVariable v = (AbstractVariable) noopVariables.get(iu);
+		AbstractVariable v = noopVariables.get(iu);
 		if (v == null) {
-			v = new AbstractVariable();
+			v = DEBUG_ENCODING ? new AbstractVariable("Noop_" + iu.toString()) : new AbstractVariable(); //$NON-NLS-1$
 			noopVariables.put(iu, v);
 		}
 		return v;
 	}
 
+	private AbstractVariable getNonGreedyVariable(IInstallableUnit iu) {
+		AbstractVariable v = nonGreedyVariables.get(iu);
+		if (v == null) {
+			v = DEBUG_ENCODING ? new AbstractVariable("NG_" + iu.toString()) : new AbstractVariable(); //$NON-NLS-1$
+			nonGreedyVariables.put(iu, v);
+		}
+		return v;
+	}
+
 	public IStatus invokeSolver(IProgressMonitor monitor) {
 		if (result.getSeverity() == IStatus.ERROR)
 			return result;
@@ -786,7 +1097,8 @@ public class Projector {
 					Tracing.debug("Unsatisfiable !"); //$NON-NLS-1$
 					Tracing.debug("Solver solution NOT found: " + (stop - start)); //$NON-NLS-1$
 				}
-				result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_Unsatisfiable_problem));
+				result = new MultiStatus(DirectorActivator.PI_DIRECTOR, SimplePlanner.UNSATISFIABLE, result.getChildren(), Messages.Planner_Unsatisfiable_problem, null);
+				result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, SimplePlanner.UNSATISFIABLE, Messages.Planner_Unsatisfiable_problem, null));
 			}
 		} catch (TimeoutException e) {
 			result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_Timeout));
@@ -799,10 +1111,10 @@ public class Projector {
 	}
 
 	private void backToIU() {
-		solution = new ArrayList();
-		IVec sat4jSolution = dependencyHelper.getSolution();
-		for (Iterator i = sat4jSolution.iterator(); i.hasNext();) {
-			Object var = i.next();
+		solution = new ArrayList<IInstallableUnit>();
+		IVec<Object> sat4jSolution = dependencyHelper.getSolution();
+		for (Iterator<Object> iter = sat4jSolution.iterator(); iter.hasNext();) {
+			Object var = iter.next();
 			if (var instanceof IInstallableUnit) {
 				IInstallableUnit iu = (IInstallableUnit) var;
 				if (iu == entryPoint)
@@ -812,23 +1124,23 @@ public class Projector {
 		}
 	}
 
-	private void printSolution(Collection state) {
-		ArrayList l = new ArrayList(state);
+	private void printSolution(Collection<IInstallableUnit> state) {
+		ArrayList<IInstallableUnit> l = new ArrayList<IInstallableUnit>(state);
 		Collections.sort(l);
 		Tracing.debug("Solution:"); //$NON-NLS-1$
 		Tracing.debug("Numbers of IUs selected: " + l.size()); //$NON-NLS-1$
-		for (Iterator iterator = l.iterator(); iterator.hasNext();) {
-			Tracing.debug(iterator.next().toString());
+		for (IInstallableUnit s : l) {
+			Tracing.debug(s.toString());
 		}
 	}
 
-	public Collection extractSolution() {
+	public Collection<IInstallableUnit> extractSolution() {
 		if (DEBUG)
 			printSolution(solution);
 		return solution;
 	}
 
-	public Set getExplanation(IProgressMonitor monitor) {
+	public Set<Explanation> getExplanation(IProgressMonitor monitor) {
 		ExplanationJob job = new ExplanationJob();
 		job.schedule();
 		monitor.setTaskName(Messages.Planner_NoSolution);
@@ -856,16 +1168,14 @@ public class Projector {
 		return job.getExplanationResult();
 	}
 
-	public Map getFragmentAssociation() {
-		Map resolvedFragments = new HashMap(fragments.size());
-		for (Iterator iterator = fragments.entrySet().iterator(); iterator.hasNext();) {
-			Entry fragment = (Entry) iterator.next();
+	public Map<IInstallableUnitFragment, List<IInstallableUnit>> getFragmentAssociation() {
+		Map<IInstallableUnitFragment, List<IInstallableUnit>> resolvedFragments = new HashMap<IInstallableUnitFragment, List<IInstallableUnit>>(fragments.size());
+		for (Entry<IInstallableUnitFragment, Set<IInstallableUnit>> fragment : fragments.entrySet()) {
 			if (!dependencyHelper.getBooleanValueFor(fragment.getKey()))
 				continue;
-			Set potentialHosts = (Set) fragment.getValue();
-			List resolvedHost = new ArrayList(potentialHosts.size());
-			for (Iterator iterator2 = potentialHosts.iterator(); iterator2.hasNext();) {
-				Object host = iterator2.next();
+			Set<IInstallableUnit> potentialHosts = fragment.getValue();
+			List<IInstallableUnit> resolvedHost = new ArrayList<IInstallableUnit>(potentialHosts.size());
+			for (IInstallableUnit host : potentialHosts) {
 				if (dependencyHelper.getBooleanValueFor(host))
 					resolvedHost.add(host);
 			}
@@ -875,26 +1185,13 @@ public class Projector {
 		return resolvedFragments;
 	}
 
-	private void rememberHostMatches(IInstallableUnit fragment, List matches) {
-		Set existingMatches = (Set) fragments.get(fragment);
+	private void rememberHostMatches(IInstallableUnitFragment fragment, List<IInstallableUnit> matches) {
+		Set<IInstallableUnit> existingMatches = fragments.get(fragment);
 		if (existingMatches == null) {
-			existingMatches = new HashSet();
+			existingMatches = new HashSet<IInstallableUnit>();
 			fragments.put(fragment, existingMatches);
 			existingMatches.addAll(matches);
 		}
 		existingMatches.retainAll(matches);
 	}
-
-	private boolean isHostRequirement(IInstallableUnit iu, IRequiredCapability req) {
-		if (!(iu instanceof IInstallableUnitFragment))
-			return false;
-		IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
-		IRequiredCapability[] reqs = fragment.getHost();
-		for (int i = 0; i < reqs.length; i++) {
-			if (req.equals(reqs[i]))
-				return true;
-		}
-		return false;
-	}
-
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java
index 013c1a1..671039c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java
@@ -7,92 +7,52 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - query indexes
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.CapabilityQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-
-public class QueryableArray implements IQueryable {
-	static class IUCapability {
-		final IInstallableUnit iu;
-		final IProvidedCapability capability;
-
-		public IUCapability(IInstallableUnit iu, IProvidedCapability capability) {
-			this.iu = iu;
-			this.capability = capability;
-		}
-	}
-
-	private final List dataSet;
-	private Map namedCapabilityIndex;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
+import org.eclipse.equinox.internal.p2.metadata.index.CapabilityIndex;
+import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+
+public class QueryableArray extends IndexProvider<IInstallableUnit> {
+	private final List<IInstallableUnit> dataSet;
+	private IIndex<IInstallableUnit> capabilityIndex;
+	private TranslationSupport translationSupport;
 
 	public QueryableArray(IInstallableUnit[] ius) {
-		dataSet = Arrays.asList(ius);
+		dataSet = CollectionUtils.unmodifiableList(ius);
 	}
 
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		if (query instanceof CapabilityQuery)
-			return queryCapability((CapabilityQuery) query, collector, monitor);
-		return query.perform(dataSet.iterator(), collector);
+	public Iterator<IInstallableUnit> everything() {
+		return dataSet.iterator();
 	}
 
-	private Collector queryCapability(CapabilityQuery query, Collector collector, IProgressMonitor monitor) {
-		generateNamedCapabilityIndex();
-
-		IRequiredCapability[] requiredCapabilities = query.getRequiredCapabilities();
-		Collection resultIUs = null;
-		for (int i = 0; i < requiredCapabilities.length; i++) {
-			Collection matchingIUs = findMatchingIUs(requiredCapabilities[i]);
-			if (matchingIUs == null)
-				return collector;
-			if (resultIUs == null)
-				resultIUs = matchingIUs;
-			else
-				resultIUs.retainAll(matchingIUs);
+	public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
+		if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
+			if (capabilityIndex == null)
+				capabilityIndex = new CapabilityIndex(dataSet.iterator());
+			return capabilityIndex;
 		}
-
-		for (Iterator iterator = resultIUs.iterator(); iterator.hasNext();)
-			collector.accept(iterator.next());
-
-		return collector;
+		return null;
 	}
 
-	private Collection findMatchingIUs(IRequiredCapability requiredCapability) {
-		List iuCapabilities = (List) namedCapabilityIndex.get(requiredCapability.getName());
-		if (iuCapabilities == null)
+	public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
+		if (!(client instanceof IInstallableUnit))
 			return null;
-
-		Set matchingIUs = new HashSet();
-		for (Iterator iterator = iuCapabilities.iterator(); iterator.hasNext();) {
-			IUCapability iuCapability = (IUCapability) iterator.next();
-			if (iuCapability.capability.satisfies(requiredCapability))
-				matchingIUs.add(iuCapability.iu);
-		}
-		return matchingIUs;
-	}
-
-	private void generateNamedCapabilityIndex() {
-		if (namedCapabilityIndex != null)
-			return;
-
-		namedCapabilityIndex = new HashMap();
-		for (Iterator iterator = dataSet.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-
-			IProvidedCapability[] providedCapabilities = iu.getProvidedCapabilities();
-			for (int i = 0; i < providedCapabilities.length; i++) {
-				String name = providedCapabilities[i].getName();
-				List iuCapabilities = (List) namedCapabilityIndex.get(name);
-				if (iuCapabilities == null) {
-					iuCapabilities = new ArrayList(5);
-					namedCapabilityIndex.put(name, iuCapabilities);
-				}
-				iuCapabilities.add(new IUCapability(iu, providedCapabilities[i]));
-			}
+		IInstallableUnit iu = (IInstallableUnit) client;
+		if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
+			if (translationSupport == null)
+				translationSupport = new TranslationSupport(this);
+			return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
 		}
+		return null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
index 6e858f3..ea506ee 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
@@ -1,18 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  * 
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors: 
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
+import org.eclipse.equinox.p2.planner.IPlanner;
+
+import java.util.Collection;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class SimpleDirector implements IDirector {
@@ -21,19 +25,19 @@ public class SimpleDirector implements IDirector {
 	private IEngine engine;
 	private IPlanner planner;
 
-	public SimpleDirector() {
-		engine = (IEngine) ServiceHelper.getService(DirectorActivator.context, IEngine.SERVICE_NAME);
+	public SimpleDirector(IEngine engine, IPlanner planner) {
 		if (engine == null)
 			throw new IllegalStateException("Provisioning engine is not registered"); //$NON-NLS-1$
-		planner = (IPlanner) ServiceHelper.getService(DirectorActivator.context, IPlanner.class.getName());
+		this.engine = engine;
 		if (planner == null)
 			throw new IllegalStateException("Unable to find provisioning planner"); //$NON-NLS-1$
+		this.planner = planner;
 	}
 
 	public IStatus revert(IProfile currentProfile, IProfile revertProfile, ProvisioningContext context, IProgressMonitor monitor) {
 		SubMonitor sub = SubMonitor.convert(monitor, Messages.Director_Task_Updating, PlanWork + EngineWork);
 		try {
-			ProvisioningPlan plan = planner.getDiffPlan(currentProfile, revertProfile, sub.newChild(PlanWork));
+			IProvisioningPlan plan = planner.getDiffPlan(currentProfile, revertProfile, sub.newChild(PlanWork));
 			return PlanExecutionHelper.executePlan(plan, engine, context, sub.newChild(EngineWork));
 		} finally {
 			sub.done();
@@ -44,12 +48,12 @@ public class SimpleDirector implements IDirector {
 		String taskName = NLS.bind(Messages.Director_Task_Installing, request.getProfile().getProperty(IProfile.PROP_INSTALL_FOLDER));
 		SubMonitor sub = SubMonitor.convert(monitor, taskName, PlanWork + EngineWork);
 		try {
-			IInstallableUnit[] installRoots = request.getAddedInstallableUnits();
+			Collection<IInstallableUnit> installRoots = request.getAdditions();
 			// mark the roots as such
-			for (int i = 0; i < installRoots.length; i++) {
-				request.setInstallableUnitProfileProperty(installRoots[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+			for (IInstallableUnit root : installRoots) {
+				request.setInstallableUnitProfileProperty(root, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
 			}
-			ProvisioningPlan plan = planner.getProvisioningPlan(request, context, sub.newChild(PlanWork));
+			IProvisioningPlan plan = planner.getProvisioningPlan(request, context, sub.newChild(PlanWork));
 			return PlanExecutionHelper.executePlan(plan, engine, context, sub.newChild(EngineWork));
 		} finally {
 			sub.done();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
index c5fe539..93080db 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -7,26 +7,32 @@
  * Contributors:
  * 	IBM Corporation - initial API and implementation
  * 	Genuitec - bug fixes
+ *  Sonatype, Inc. - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
+import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.*;
-import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.internal.p2.director.Explanation.MissingIU;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
 import org.eclipse.equinox.internal.p2.rollback.FormerState;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
 import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.planner.*;
+import org.eclipse.equinox.p2.query.*;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 
 public class SimplePlanner implements IPlanner {
 	private static boolean DEBUG = Tracing.DEBUG_PLANNER_OPERANDS;
@@ -38,85 +44,182 @@ public class SimplePlanner implements IPlanner {
 	private static final String EXPLANATION = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$
 	private static final String CONSIDER_METAREQUIREMENTS = "org.eclipse.equinox.p2.planner.resolveMetaRequirements"; //$NON-NLS-1$
 
-	private ProvisioningPlan generateProvisioningPlan(Collection fromState, Collection toState, ProfileChangeRequest changeRequest, ProvisioningPlan installerPlan) {
-		InstallableUnitOperand[] iuOperands = generateOperations(fromState, toState);
-		PropertyOperand[] propertyOperands = generatePropertyOperations(changeRequest);
+	static final int UNSATISFIABLE = 1; //status code indicating that the problem is not satisfiable
 
-		Operand[] operands = new Operand[iuOperands.length + propertyOperands.length];
-		System.arraycopy(iuOperands, 0, operands, 0, iuOperands.length);
-		System.arraycopy(propertyOperands, 0, operands, iuOperands.length, propertyOperands.length);
+	private final IProvisioningAgent agent;
+	private final IProfileRegistry profileRegistry;
+	private final IEngine engine;
+
+	private IProvisioningPlan generateProvisioningPlan(Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest, IProvisioningPlan installerPlan, ProvisioningContext context) {
+		IProvisioningPlan plan = engine.createPlan(changeRequest.getProfile(), context);
+		planIUOperations(plan, fromState, toState);
+		planPropertyOperations(plan, changeRequest);
 
 		if (DEBUG) {
+			Object[] operands = new Object[0];
+			try {
+				Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
+				operands = (Object[]) getOperands.invoke(plan, new Object[0]);
+			} catch (Throwable e) {
+				// ignore
+			}
 			for (int i = 0; i < operands.length; i++) {
 				Tracing.debug(operands[i].toString());
 			}
 		}
-		return new ProvisioningPlan(Status.OK_STATUS, operands, computeActualChangeRequest(toState, changeRequest), null, installerPlan, changeRequest);
+
+		Map<IInstallableUnit, RequestStatus>[] changes = computeActualChangeRequest(toState, changeRequest);
+		Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
+		Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
+
+		QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
+		PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
+
+		plan.setStatus(plannerStatus);
+		plan.setInstallerPlan(installerPlan);
+
+		IStatus verificationStatus = verifyPlan(plan);
+		if (!verificationStatus.isOK())
+			plan.setStatus(verificationStatus);
+
+		return plan;
 	}
 
-	private Map[] buildDetailedErrors(ProfileChangeRequest changeRequest) {
-		IInstallableUnit[] added = changeRequest.getAddedInstallableUnits();
-		IInstallableUnit[] removed = changeRequest.getRemovedInstallableUnits();
-		Map requestStatus = new HashMap(added.length + removed.length);
-		for (int i = 0; i < added.length; i++) {
-			requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.ERROR, null));
+	/*
+	 * Give clients the opportunity to veto the given provisioning plan. Return a status
+	 * indicating the result of the verifier's analysis of the plan. If a verifier is not 
+	 * registered, if verification is disabled, or if the verifier is misbehaving then
+	 * return an OK status and continue with the provisioning operation as if the verifier
+	 * had not run at all. 
+	 */
+	private IStatus verifyPlan(final IProvisioningPlan plan) {
+		final BundleContext context = DirectorActivator.context;
+		if (context == null)
+			return Status.OK_STATUS;
+		String value = context.getProperty("eclipse.p2.verifyPlan"); //$NON-NLS-1$
+		if ("false".equalsIgnoreCase(value)) { //$NON-NLS-1$
+			if (Tracing.DEBUG_VERIFIER)
+				Tracing.debug("Plan verification disabled by user."); //$NON-NLS-1$
+			return Status.OK_STATUS;
+		}
+		ServiceReference ref = context.getServiceReference(PlanVerifier.class.getName());
+		if (ref == null) {
+			if (Tracing.DEBUG_VERIFIER)
+				Tracing.debug("Skipping plan verification. No verifier available."); //$NON-NLS-1$
+			return Status.OK_STATUS;
+		}
+		final PlanVerifier verifier = (PlanVerifier) context.getService(ref);
+		if (verifier == null) {
+			if (Tracing.DEBUG_VERIFIER)
+				Tracing.debug("Skipping plan verification. No verifier available."); //$NON-NLS-1$
+			return Status.OK_STATUS;
+		}
+		final IStatus[] result = new IStatus[1];
+		result[0] = Status.OK_STATUS;
+		ISafeRunnable job = new ISafeRunnable() {
+			public void handleException(Throwable exception) {
+				if (Tracing.DEBUG_VERIFIER)
+					Tracing.debug("Exception while running verifier. Check log for details."); //$NON-NLS-1$
+				// log the exception 
+				LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "Exception while running plan verifier.", exception)); //$NON-NLS-1$
+				// don't let a bad verifier prevent the operation. fall through and return OK so execution of the plan continues
+			}
+
+			public void run() throws Exception {
+				if (Tracing.DEBUG_VERIFIER)
+					Tracing.debug("Running plan verifier."); //$NON-NLS-1$
+				long start = System.currentTimeMillis();
+				result[0] = verifier.verify(plan);
+				if (Tracing.DEBUG_VERIFIER)
+					Tracing.debug("Verification complete in " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		};
+		try {
+			SafeRunner.run(job);
+		} finally {
+			context.ungetService(ref);
 		}
-		for (int i = 0; i < removed.length; i++) {
-			requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.ERROR, null));
+		return result[0];
+	}
+
+	private Map<IInstallableUnit, RequestStatus>[] buildDetailedErrors(ProfileChangeRequest changeRequest) {
+		Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
+		Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+		Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedAdditions.size());
+		for (IInstallableUnit added : requestedAdditions) {
+			requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.ERROR, null));
 		}
-		return new Map[] {requestStatus, null};
+		for (IInstallableUnit removed : requestedRemovals) {
+			requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
+		}
+		@SuppressWarnings("unchecked")
+		Map<IInstallableUnit, RequestStatus>[] maps = new Map[] {requestStatus, null};
+		return maps;
 	}
 
-	private Map[] computeActualChangeRequest(Collection toState, ProfileChangeRequest changeRequest) {
-		IInstallableUnit[] added = changeRequest.getAddedInstallableUnits();
-		IInstallableUnit[] removed = changeRequest.getRemovedInstallableUnits();
-		Map requestStatus = new HashMap(added.length + removed.length);
-		for (int i = 0; i < added.length; i++) {
-			if (toState.contains(added[i]))
-				requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.OK, null));
+	private Map<IInstallableUnit, RequestStatus>[] computeActualChangeRequest(Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest) {
+		Collection<IInstallableUnit> requestedAdditions = changeRequest.getAdditions();
+		Collection<IInstallableUnit> requestedRemovals = changeRequest.getRemovals();
+		Map<IInstallableUnit, RequestStatus> requestStatus = new HashMap<IInstallableUnit, RequestStatus>(requestedAdditions.size() + requestedRemovals.size());
+		for (IInstallableUnit added : requestedAdditions) {
+			if (toState.contains(added))
+				requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.OK, null));
 			else
-				requestStatus.put(added[i], new RequestStatus(added[i], RequestStatus.ADDED, IStatus.ERROR, null));
+				requestStatus.put(added, new RequestStatus(added, RequestStatus.ADDED, IStatus.ERROR, null));
 		}
 
-		for (int i = 0; i < removed.length; i++) {
-			if (!toState.contains(removed[i]))
-				requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.OK, null));
+		for (IInstallableUnit removed : requestedRemovals) {
+			if (!toState.contains(removed))
+				requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.OK, null));
 			else
-				requestStatus.put(removed[i], new RequestStatus(removed[i], RequestStatus.REMOVED, IStatus.ERROR, null));
+				requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
 		}
 
 		//Compute the side effect changes (e.g. things installed optionally going away)
-		Collection includedIUs = new HashSet(changeRequest.getProfile().query(new IUProfilePropertyQuery(changeRequest.getProfile(), INCLUSION_RULES, null), new Collector(), null).toCollection());
-		Map sideEffectStatus = new HashMap(includedIUs.size());
-		includedIUs.removeAll(toState);
-		for (Iterator iterator = includedIUs.iterator(); iterator.hasNext();) {
-			IInstallableUnit removal = (IInstallableUnit) iterator.next();
-			if (!requestStatus.containsKey(removal))
+		Iterator<IInstallableUnit> includedIUs = changeRequest.getProfile().query(new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY), null).iterator();
+		Map<IInstallableUnit, RequestStatus> sideEffectStatus = new HashMap<IInstallableUnit, RequestStatus>();
+		while (includedIUs.hasNext()) {
+			IInstallableUnit removal = includedIUs.next();
+			if (!toState.contains(removal) && !requestStatus.containsKey(removal)) {
 				sideEffectStatus.put(removal, new RequestStatus(removal, RequestStatus.REMOVED, IStatus.INFO, null));
+			}
 		}
-		return new Map[] {requestStatus, sideEffectStatus};
+		@SuppressWarnings("unchecked")
+		Map<IInstallableUnit, RequestStatus>[] maps = new Map[] {requestStatus, sideEffectStatus};
+		return maps;
 	}
 
 	/**
 	 * Converts a set containing a list of resolver explanations into a human-readable status object.
 	 */
-	private IStatus convertExplanationToStatus(Set explanations) {
+	private IStatus convertExplanationToStatus(Set<Explanation> explanations) {
 		if (explanations == null)
 			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_Unsatisfied_Dependencies);
+
+		// hack to create a useful message when a user installs something intended for a target platform into the IDE
+		ArrayList<IStatus> forTargets = new ArrayList<IStatus>(0);
+		for (Explanation next : explanations) {
+			if (next instanceof Explanation.MissingIU) {
+				Explanation.MissingIU missingIU = (MissingIU) next;
+				if (missingIU.req instanceof IRequiredCapability && "A.PDE.Target.Platform".equals(((IRequiredCapability) missingIU.req).getNamespace())) //$NON-NLS-1$
+					forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, missingIU.getUserReadableName(missingIU.iu)));
+			}
+		}
+		if (forTargets.size() > 0) {
+			// add a blurb about disabling 'include required software'.  The following line could be removed if bug 309863 is fixed
+			forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_For_Target_Unselect_Required));
+			// return a multi status with all the IUs that require A.PDE.Target.Platform
+			return new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, forTargets.toArray(new IStatus[forTargets.size()]), Messages.Director_For_Target, null);
+		}
 		MultiStatus root = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, Messages.Director_Unsatisfied_Dependencies, null);
 		//try to find a more specific root message if possible
 		String specificMessage = null;
-		for (Iterator it = explanations.iterator(); it.hasNext();) {
-			final Object next = it.next();
-			if (next instanceof Explanation) {
-				root.add(((Explanation) next).toStatus());
-				if (specificMessage == null && next instanceof Explanation.MissingIU)
-					specificMessage = Messages.Explanation_rootMissing;
-				else if (specificMessage == null && next instanceof Explanation.Singleton) {
-					specificMessage = Messages.Explanation_rootSingleton;
-				}
-			} else
-				root.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, next.toString()));
+		for (Explanation next : explanations) {
+			root.add(next.toStatus());
+			if (specificMessage == null && next instanceof Explanation.MissingIU)
+				specificMessage = Messages.Explanation_rootMissing;
+			else if (specificMessage == null && next instanceof Explanation.Singleton)
+				specificMessage = Messages.Explanation_rootSingleton;
 		}
 		//use a more specific root message if available
 		if (specificMessage != null) {
@@ -127,94 +230,66 @@ public class SimplePlanner implements IPlanner {
 		return root;
 	}
 
-	private PropertyOperand[] generatePropertyOperations(ProfileChangeRequest profileChangeRequest) {
-		IProfile profile = profileChangeRequest.getProfile();
-		List operands = new ArrayList();
-		// First deal with profile properties to remove.  Only generate an operand if the property was there in the first place
+	private void planPropertyOperations(IProvisioningPlan plan, ProfileChangeRequest profileChangeRequest) {
+
+		// First deal with profile properties to remove.
 		String[] toRemove = profileChangeRequest.getPropertiesToRemove();
-		Map existingProperties = profile.getProperties();
 		for (int i = 0; i < toRemove.length; i++) {
-			if (existingProperties.containsKey(toRemove[i]))
-				operands.add(new PropertyOperand(toRemove[i], existingProperties.get(toRemove[i]), null));
+			plan.setProfileProperty(toRemove[i], null);
 		}
 		// Now deal with profile property changes/additions
-		Map propertyChanges = profileChangeRequest.getPropertiesToAdd();
-		Iterator iter = propertyChanges.entrySet().iterator();
-		while (iter.hasNext()) {
-			Map.Entry entry = (Map.Entry) iter.next();
-			operands.add(new PropertyOperand((String) entry.getKey(), existingProperties.get(entry.getKey()), entry.getValue()));
+		Map<String, String> propertyChanges = profileChangeRequest.getPropertiesToAdd();
+		for (Map.Entry<String, String> entry : propertyChanges.entrySet()) {
+			plan.setProfileProperty(entry.getKey(), entry.getValue());
 		}
+
 		// Now deal with iu property changes/additions.
-		// TODO we aren't yet checking that the IU will exist in the final profile, will the engine do this?
-		Map allIUPropertyChanges = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
-		iter = allIUPropertyChanges.entrySet().iterator();
-		while (iter.hasNext()) {
-			Map.Entry entry = (Map.Entry) iter.next();
-			IInstallableUnit iu = (IInstallableUnit) entry.getKey();
-			Map iuPropertyChanges = (Map) entry.getValue();
-			Iterator iuPropIter = iuPropertyChanges.entrySet().iterator();
-			while (iuPropIter.hasNext()) {
-				Map.Entry entry2 = (Map.Entry) iuPropIter.next();
-				Object oldValue = profile.getInstallableUnitProperty(iu, (String) entry2.getKey());
-				operands.add(new InstallableUnitPropertyOperand(iu, (String) entry2.getKey(), oldValue, entry2.getValue()));
+		Map<IInstallableUnit, Map<String, String>> allIUPropertyChanges = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
+		for (Map.Entry<IInstallableUnit, Map<String, String>> entry : allIUPropertyChanges.entrySet()) {
+			IInstallableUnit iu = entry.getKey();
+			for (Map.Entry<String, String> entry2 : entry.getValue().entrySet()) {
+				plan.setInstallableUnitProfileProperty(iu, entry2.getKey(), entry2.getValue());
 			}
 		}
 		// Now deal with iu property removals.
-		// TODO we could optimize by not generating property removals for IU's that aren't there or won't be there.
-		Map allIUPropertyDeletions = profileChangeRequest.getInstallableUnitProfilePropertiesToRemove();
-		iter = allIUPropertyDeletions.entrySet().iterator();
-		while (iter.hasNext()) {
-			Map.Entry entry = (Map.Entry) iter.next();
-			IInstallableUnit iu = (IInstallableUnit) entry.getKey();
-			Map existingIUProperties = profile.getInstallableUnitProperties(iu);
-			List iuPropertyRemovals = (List) entry.getValue();
-			for (Iterator it = iuPropertyRemovals.iterator(); it.hasNext();) {
-				String key = (String) it.next();
-				if (existingIUProperties.containsKey(key))
-					operands.add(new InstallableUnitPropertyOperand(iu, key, existingIUProperties.get(key), null));
+		Map<IInstallableUnit, List<String>> allIUPropertyDeletions = profileChangeRequest.getInstallableUnitProfilePropertiesToRemove();
+		for (Map.Entry<IInstallableUnit, List<String>> entry : allIUPropertyDeletions.entrySet()) {
+			IInstallableUnit iu = entry.getKey();
+			List<String> iuPropertyRemovals = entry.getValue();
+			for (String key : iuPropertyRemovals) {
+				plan.setInstallableUnitProfileProperty(iu, key, null);
 			}
 
 		}
-		return (PropertyOperand[]) operands.toArray(new PropertyOperand[operands.size()]);
 	}
 
-	private InstallableUnitOperand[] generateOperations(Collection fromState, Collection toState) {
-		return new OperationGenerator().generateOperation(fromState, toState);
+	private void planIUOperations(IProvisioningPlan plan, Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState) {
+		new OperationGenerator(plan).generateOperation(fromState, toState);
 	}
 
-	public ProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) {
+	public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) {
 		SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
 		sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
 		try {
-			ProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile);
-			ProvisioningContext context = new ProvisioningContext(new URI[0]);
+			IProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile);
+			ProvisioningContext context = new ProvisioningContext(agent);
 			if (context.getProperty(INCLUDE_PROFILE_IUS) == null)
 				context.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString());
-			context.setExtraIUs(new ArrayList(targetProfile.available(InstallableUnitQuery.ANY, new Collector(), null).toCollection()));
+			context.setExtraInstallableUnits(Arrays.asList(targetProfile.available(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class)));
 			return getProvisioningPlan(profileChangeRequest, context, sub.newChild(ExpandWork / 2));
 		} finally {
 			sub.done();
 		}
 	}
 
-	public static IInstallableUnit[] findPlannerMarkedIUs(final IProfile profile) {
-		Query markerQuery = new MatchQuery() {
-			public boolean isMatch(Object candidate) {
-				if (!(candidate instanceof IInstallableUnit))
-					return false;
-
-				IInstallableUnit iu = (IInstallableUnit) candidate;
-
-				String inclusion = profile.getInstallableUnitProperty(iu, INCLUSION_RULES);
-				return (inclusion != null);
-			}
-		};
-		return (IInstallableUnit[]) profile.query(markerQuery, new Collector(), null).toArray(IInstallableUnit.class);
+	public static Collection<IInstallableUnit> findPlannerMarkedIUs(final IProfile profile) {
+		IQuery<IInstallableUnit> markerQuery = new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY);
+		return profile.query(markerQuery, null).toUnmodifiableSet();
 	}
 
-	public static Dictionary createSelectionContext(Map properties) {
-		Hashtable result = new Hashtable(properties);
-		String environments = (String) properties.get(IProfile.PROP_ENVIRONMENTS);
+	public static Map<String, String> createSelectionContext(Map<String, String> properties) {
+		HashMap<String, String> result = new HashMap<String, String>(properties);
+		String environments = properties.get(IProfile.PROP_ENVIRONMENTS);
 		if (environments == null)
 			return result;
 		for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$
@@ -227,48 +302,35 @@ public class SimplePlanner implements IPlanner {
 		return result;
 	}
 
-	private IInstallableUnit[] gatherAvailableInstallableUnits(IInstallableUnit[] additionalSource, URI[] repositories, ProvisioningContext context, IProgressMonitor monitor) {
-		Map resultsMap = new HashMap();
+	private IInstallableUnit[] gatherAvailableInstallableUnits(IInstallableUnit[] additionalSource, ProvisioningContext context, IProgressMonitor monitor) {
+		Map<String, IInstallableUnit> resultsMap = new HashMap<String, IInstallableUnit>();
 		if (additionalSource != null) {
 			for (int i = 0; i < additionalSource.length; i++) {
 				String key = additionalSource[i].getId() + "_" + additionalSource[i].getVersion().toString(); //$NON-NLS-1$
 				resultsMap.put(key, additionalSource[i]);
 			}
 		}
-		if (context != null) {
-			for (Iterator iter = context.getExtraIUs().iterator(); iter.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) iter.next();
+		if (context == null) {
+			context = new ProvisioningContext(agent);
+		} else {
+			for (IInstallableUnit iu : context.getExtraInstallableUnits()) {
 				String key = iu.getId() + '_' + iu.getVersion().toString();
 				resultsMap.put(key, iu);
 			}
 		}
-
-		IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) ServiceHelper.getService(DirectorActivator.context, IMetadataRepositoryManager.class.getName());
-		if (repositories == null)
-			repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
-
-		SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 200);
-		for (int i = 0; i < repositories.length; i++) {
-			try {
-				if (sub.isCanceled())
-					throw new OperationCanceledException();
-
-				IMetadataRepository repository = repoMgr.loadRepository(repositories[i], sub.newChild(100));
-				Collector matches = repository.query(new InstallableUnitQuery(null, VersionRange.emptyRange), new Collector(), sub.newChild(100));
-				for (Iterator it = matches.iterator(); it.hasNext();) {
-					IInstallableUnit iu = (IInstallableUnit) it.next();
-					String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
-					IInstallableUnit currentIU = (IInstallableUnit) resultsMap.get(key);
-					if (currentIU == null || hasHigherFidelity(iu, currentIU))
-						resultsMap.put(key, iu);
-				}
-			} catch (ProvisionException e) {
-				//skip unreadable repositories
-			}
+		SubMonitor sub = SubMonitor.convert(monitor, 1000);
+		IQueryable<IInstallableUnit> queryable = context.getMetadata(sub.newChild(500));
+		IQueryResult<IInstallableUnit> matches = queryable.query(QueryUtil.createIUQuery(null, VersionRange.emptyRange), sub.newChild(500));
+		for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+			IInstallableUnit iu = it.next();
+			String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
+			IInstallableUnit currentIU = resultsMap.get(key);
+			if (currentIU == null || hasHigherFidelity(iu, currentIU))
+				resultsMap.put(key, iu);
 		}
 		sub.done();
-		Collection results = resultsMap.values();
-		return (IInstallableUnit[]) results.toArray(new IInstallableUnit[results.size()]);
+		Collection<IInstallableUnit> results = resultsMap.values();
+		return results.toArray(new IInstallableUnit[results.size()]);
 	}
 
 	private static boolean hasHigherFidelity(IInstallableUnit iu, IInstallableUnit currentIU) {
@@ -277,10 +339,19 @@ public class SimplePlanner implements IPlanner {
 		return false;
 	}
 
-	private boolean satisfyMetaRequirements(Map props) {
+	public SimplePlanner(IProvisioningAgent agent) {
+		Assert.isNotNull(agent);
+		this.agent = agent;
+		this.engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		this.profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		Assert.isNotNull(engine);
+		Assert.isNotNull(profileRegistry);
+	}
+
+	private boolean satisfyMetaRequirements(Map<String, String> props) {
 		if (props == null)
 			return true;
-		if (props.get(CONSIDER_METAREQUIREMENTS) == null || "true".equalsIgnoreCase((String) props.get(CONSIDER_METAREQUIREMENTS))) //$NON-NLS-1$
+		if (props.get(CONSIDER_METAREQUIREMENTS) == null || "true".equalsIgnoreCase(props.get(CONSIDER_METAREQUIREMENTS))) //$NON-NLS-1$
 			return true;
 		return false;
 	}
@@ -298,34 +369,56 @@ public class SimplePlanner implements IPlanner {
 
 			Object[] updatedPlan = updatePlannerInfo(profileChangeRequest, context);
 
-			URI[] metadataRepositories = (context != null) ? context.getMetadataRepositories() : null;
-			Dictionary newSelectionContext = createSelectionContext(profileChangeRequest.getProfileProperties());
+			Map<String, String> newSelectionContext = createSelectionContext(profileChangeRequest.getProfileProperties());
 
-			List extraIUs = new ArrayList(Arrays.asList(profileChangeRequest.getAddedInstallableUnits()));
-			extraIUs.addAll(Arrays.asList(profileChangeRequest.getRemovedInstallableUnits()));
-			if (context == null || context.getProperty(INCLUDE_PROFILE_IUS) == null || context.getProperty(INCLUDE_PROFILE_IUS).equalsIgnoreCase(Boolean.TRUE.toString()))
-				extraIUs.addAll(profile.available(InstallableUnitQuery.ANY, new Collector(), null).toCollection());
+			List<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(profileChangeRequest.getAdditions());
+			extraIUs.addAll(profileChangeRequest.getRemovals());
+			if (context == null || context.getProperty(INCLUDE_PROFILE_IUS) == null || context.getProperty(INCLUDE_PROFILE_IUS).equalsIgnoreCase(Boolean.TRUE.toString())) {
+				Iterator<IInstallableUnit> itor = profile.available(QueryUtil.createIUAnyQuery(), null).iterator();
+				while (itor.hasNext())
+					extraIUs.add(itor.next());
+			}
 
-			IInstallableUnit[] availableIUs = gatherAvailableInstallableUnits((IInstallableUnit[]) extraIUs.toArray(new IInstallableUnit[extraIUs.size()]), metadataRepositories, context, sub.newChild(ExpandWork / 4));
+			IInstallableUnit[] availableIUs = gatherAvailableInstallableUnits(extraIUs.toArray(new IInstallableUnit[extraIUs.size()]), context, sub.newChild(ExpandWork / 4));
 
 			Slicer slicer = new Slicer(new QueryableArray(availableIUs), newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
-			IQueryable slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4));
-			if (slice == null)
-				return new ProvisioningPlan(slicer.getStatus(), profileChangeRequest, null);
-			Projector projector = new Projector(slice, newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
-			projector.encode((IInstallableUnit) updatedPlan[0], (IInstallableUnit[]) updatedPlan[1], profileChangeRequest.getAddedInstallableUnits(), sub.newChild(ExpandWork / 4));
+			IQueryable<IInstallableUnit> slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4));
+			if (slice == null) {
+				IProvisioningPlan plan = engine.createPlan(profile, context);
+				plan.setStatus(slicer.getStatus());
+				return plan;
+			}
+			@SuppressWarnings("unchecked")
+			final IQueryable<IInstallableUnit>[] queryables = new IQueryable[] {slice, new QueryableArray(profileChangeRequest.getAdditions().toArray(new IInstallableUnit[profileChangeRequest.getAdditions().size()]))};
+			slice = new CompoundQueryable<IInstallableUnit>(queryables);
+			Projector projector = new Projector(slice, newSelectionContext, slicer.getNonGreedyIUs(), satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
+			projector.encode((IInstallableUnit) updatedPlan[0], (IInstallableUnit[]) updatedPlan[1], profile, profileChangeRequest.getAdditions(), sub.newChild(ExpandWork / 4));
 			IStatus s = projector.invokeSolver(sub.newChild(ExpandWork / 4));
-			if (s.getSeverity() == IStatus.CANCEL)
-				return new ProvisioningPlan(s, profileChangeRequest, null);
+			if (s.getSeverity() == IStatus.CANCEL) {
+				IProvisioningPlan plan = engine.createPlan(profile, context);
+				plan.setStatus(s);
+				return plan;
+			}
 			if (s.getSeverity() == IStatus.ERROR) {
 				sub.setTaskName(Messages.Planner_NoSolution);
-				if (context != null && !(context.getProperty(EXPLANATION) == null || Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION))))
-					return new ProvisioningPlan(s, profileChangeRequest, null);
+				if (s.getCode() != UNSATISFIABLE || (context != null && !(context.getProperty(EXPLANATION) == null || Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION))))) {
+					IProvisioningPlan plan = engine.createPlan(profile, context);
+					plan.setStatus(s);
+					return plan;
+				}
 
 				//Extract the explanation
-				Set explanation = projector.getExplanation(sub.newChild(ExpandWork / 4));
+				Set<Explanation> explanation = projector.getExplanation(sub.newChild(ExpandWork / 4));
 				IStatus explanationStatus = convertExplanationToStatus(explanation);
-				return new ProvisioningPlan(explanationStatus, new Operand[0], buildDetailedErrors(profileChangeRequest), new RequestStatus(null, RequestStatus.REMOVED, IStatus.ERROR, explanation), null, profileChangeRequest);
+
+				Map<IInstallableUnit, RequestStatus>[] changes = buildDetailedErrors(profileChangeRequest);
+				Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
+				Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
+				PlannerStatus plannerStatus = new PlannerStatus(explanationStatus, new RequestStatus(null, RequestStatus.REMOVED, IStatus.ERROR, explanation), requestChanges, requestSideEffects, null);
+
+				IProvisioningPlan plan = engine.createPlan(profile, context);
+				plan.setStatus(plannerStatus);
+				return plan;
 			}
 			//The resolution succeeded. We can forget about the warnings since there is a solution.
 			if (Tracing.DEBUG && s.getSeverity() != IStatus.OK)
@@ -338,124 +431,187 @@ public class SimplePlanner implements IPlanner {
 		}
 	}
 
-	public ProvisioningPlan getProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
+	public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
+		ProfileChangeRequest pcr = (ProfileChangeRequest) request;
 		SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
 		sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
 		try {
 			//Get the solution for the initial request
-			Object resolutionResult = getSolutionFor(profileChangeRequest, context, sub.newChild(ExpandWork / 2));
-			if (resolutionResult instanceof ProvisioningPlan)
-				return (ProvisioningPlan) resolutionResult;
+			Object resolutionResult = getSolutionFor(pcr, context, sub.newChild(ExpandWork / 2));
+			if (resolutionResult instanceof IProvisioningPlan)
+				return (IProvisioningPlan) resolutionResult;
 
-			Collection newState = ((Projector) resolutionResult).extractSolution();
-			Collection fullState = new ArrayList();
+			Collection<IInstallableUnit> newState = ((Projector) resolutionResult).extractSolution();
+			Collection<IInstallableUnit> fullState = new ArrayList<IInstallableUnit>();
 			fullState.addAll(newState);
-			newState = AttachmentHelper.attachFragments(newState, ((Projector) resolutionResult).getFragmentAssociation());
+			newState = AttachmentHelper.attachFragments(newState.iterator(), ((Projector) resolutionResult).getFragmentAssociation());
 
-			ProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, profileChangeRequest);
+			IProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, pcr, context);
 
 			//Create a plan for installing necessary pieces to complete the installation (e.g touchpoint actions)
-			return createInstallerPlan(profileChangeRequest.getProfile(), profileChangeRequest, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
+			return createInstallerPlan(pcr.getProfile(), pcr, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
 		} catch (OperationCanceledException e) {
-			return new ProvisioningPlan(Status.CANCEL_STATUS, profileChangeRequest, null);
+			IProvisioningPlan plan = engine.createPlan(pcr.getProfile(), context);
+			plan.setStatus(Status.CANCEL_STATUS);
+			return plan;
 		} finally {
 			sub.done();
 		}
 	}
 
+	//	private IProvisioningPlan generateAbsoluteProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
+	//		Set<IInstallableUnit> toState = profileChangeRequest.getProfile().query(QueryUtil.createIUAnyQuery(), null).toSet();
+	//		HashSet<IInstallableUnit> fromState = new HashSet<IInstallableUnit>(toState);
+	//		toState.removeAll(profileChangeRequest.getRemovals());
+	//		toState.addAll(profileChangeRequest.getAdditions());
+	//
+	//		IProvisioningPlan plan = engine.createPlan(profileChangeRequest.getProfile(), context);
+	//		planIUOperations(plan, fromState, toState);
+	//		planPropertyOperations(plan, profileChangeRequest);
+	//
+	//		if (DEBUG) {
+	//			Object[] operands = new Object[0];
+	//			try {
+	//				Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
+	//				operands = (Object[]) getOperands.invoke(plan, new Object[0]);
+	//			} catch (Throwable e) {
+	//				// ignore
+	//			}
+	//			for (int i = 0; i < operands.length; i++) {
+	//				Tracing.debug(operands[i].toString());
+	//			}
+	//		}
+	//		Map<IInstallableUnit, RequestStatus>[] changes = computeActualChangeRequest(toState, profileChangeRequest);
+	//		Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
+	//		Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
+	//		QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
+	//		PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
+	//		plan.setStatus(plannerStatus);
+	//		return plan;
+	//	}
+
 	//Verify that all the meta requirements necessary to perform the uninstallation (if necessary) and all t
-	private Collection areMetaRequirementsSatisfied(IProfile oldProfile, Collection newProfile, ProvisioningPlan initialPlan) {
-		Collection allMetaRequirements = extractMetaRequirements(newProfile, initialPlan);
-		for (Iterator iterator = allMetaRequirements.iterator(); iterator.hasNext();) {
-			IRequiredCapability requirement = (IRequiredCapability) iterator.next();
-			if (oldProfile.query(new CapabilityQuery(requirement), new HasMatchCollector(), null).isEmpty())
+	private Collection<IRequirement> areMetaRequirementsSatisfied(IProfile oldProfile, Collection<IInstallableUnit> newProfile, IProvisioningPlan initialPlan) {
+		Collection<IRequirement> allMetaRequirements = extractMetaRequirements(newProfile, initialPlan);
+		for (IRequirement requirement : allMetaRequirements) {
+			if (oldProfile.query(QueryUtil.createLimitQuery(QueryUtil.createMatchQuery(requirement.getMatches()), 1), null).isEmpty())
 				return allMetaRequirements;
 		}
 		return null;
 	}
 
 	//Return all the meta requirements for the list of IU specified and all the meta requirements listed necessary to satisfy the uninstallation 
-	private Collection extractMetaRequirements(Collection ius, ProvisioningPlan plan) {
-		Set allMetaRequirements = new HashSet();
-		for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			IRequiredCapability[] reqs = iu.getMetaRequiredCapabilities();
-			for (int i = 0; i < reqs.length; i++) {
-				allMetaRequirements.add(reqs[i]);
-			}
+	private Collection<IRequirement> extractMetaRequirements(Collection<IInstallableUnit> ius, IProvisioningPlan plan) {
+		Set<IRequirement> allMetaRequirements = new HashSet<IRequirement>();
+		for (IInstallableUnit iu : ius) {
+			allMetaRequirements.addAll(iu.getMetaRequirements());
 		}
-		Collector c2 = plan.getRemovals().query(InstallableUnitQuery.ANY, new Collector(), null);
-		for (Iterator iterator = c2.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			IRequiredCapability[] reqs = iu.getMetaRequiredCapabilities();
-			for (int i = 0; i < reqs.length; i++) {
-				allMetaRequirements.add(reqs[i]);
-			}
+		IQueryResult<IInstallableUnit> queryResult = plan.getRemovals().query(QueryUtil.createIUAnyQuery(), null);
+		for (Iterator<IInstallableUnit> iterator = queryResult.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			allMetaRequirements.addAll(iu.getMetaRequirements());
 		}
 		return allMetaRequirements;
 	}
 
-	private ProvisioningPlan createInstallerPlan(IProfile profile, ProfileChangeRequest initialRequest, Collection unattachedState, Collection expectedState, ProvisioningPlan initialPlan, ProvisioningContext initialContext, IProgressMonitor monitor) {
+	private IProvisioningPlan createInstallerPlan(IProfile profile, ProfileChangeRequest initialRequest, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, IProvisioningPlan initialPlan, ProvisioningContext initialContext, IProgressMonitor monitor) {
 		SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
 
 		try {
 			sub.setTaskName(Messages.Director_Task_installer_plan);
-			IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(DirectorActivator.context, IProfileRegistry.class.getName());
-			if (profileRegistry == null)
-				return new ProvisioningPlan(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_no_profile_registry), initialRequest, null);
+			if (profileRegistry == null) {
+				IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+				plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_no_profile_registry));
+				return plan;
+			}
 
-			IProfile agentProfile = profileRegistry.getProfile(IProfileRegistry.SELF);
-			if (agentProfile == null)
+			//No installer agent set
+			if (agent.getService(IProvisioningAgent.INSTALLER_AGENT) == null) {
+				return initialPlan;
+			}
+
+			IProfile installerProfile = ((IProfileRegistry) ((IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT)).getService(IProfileRegistry.SERVICE_NAME)).getProfile((String) agent.getService(IProvisioningAgent.INSTALLER_PROFILEID));
+			if (installerProfile == null)
 				return initialPlan;
 
-			if (profile.getProfileId().equals(agentProfile.getProfileId())) {
-				if (profile.getTimestamp() != agentProfile.getTimestamp())
-					return new ProvisioningPlan(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync, profile.getProfileId())), initialRequest, null);
-				return createInstallerPlanForCohostedCase(profile, initialRequest, initialPlan, unattachedState, expectedState, initialContext, sub);
+			//The target and the installer are in the same agent / profile registry
+			if (haveSameLocation(agent, (IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT))) {
+				//The target and the installer are the same profile (e.g. the eclipse SDK)
+				if (profile.getProfileId().equals(installerProfile.getProfileId())) {
+					if (profile.getTimestamp() != installerProfile.getTimestamp()) {
+						IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+						plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync, profile.getProfileId())));
+						return plan;
+					}
+					return createInstallerPlanForCohostedCase(profile, initialRequest, initialPlan, unattachedState, expectedState, initialContext, sub);
+				}
+
 			}
 
-			if (satisfyMetaRequirements(profile) && !profile.getProfileId().equals(agentProfile.getProfileId())) {
-				return createInstallerPlanForCohostedCaseFromExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, agentProfile, sub);
+			if (satisfyMetaRequirements(profile) && !profile.getProfileId().equals(installerProfile.getProfileId())) {
+				return createInstallerPlanForCohostedCaseFromExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, installerProfile, sub);
 			}
-			return createInstallerPlanForExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, agentProfile, sub);
+
+			return createInstallerPlanForExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, installerProfile, sub);
+
 		} finally {
 			sub.done();
 		}
 	}
 
-	private ProvisioningPlan createInstallerPlanForCohostedCaseFromExternalInstaller(IProfile profile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection newState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
-		ProvisioningPlan planForProfile = generatePlan(null, newState, initialRequest);
+	private boolean haveSameLocation(IProvisioningAgent agent1, IProvisioningAgent agent2) {
+		if (agent1 == null || agent2 == null)
+			return false;
+		if (agent1 == agent2)
+			return true;
+		IAgentLocation thisLocation = (IAgentLocation) agent1.getService(IAgentLocation.SERVICE_NAME);
+		IAgentLocation otherLocation = (IAgentLocation) agent2.getService(IAgentLocation.SERVICE_NAME);
+		if (thisLocation == null || otherLocation == null || (thisLocation == null && otherLocation == null))
+			return false;
+		return thisLocation.getRootLocation().equals(otherLocation.getRootLocation());
+	}
+
+	private IProvisioningPlan createInstallerPlanForCohostedCaseFromExternalInstaller(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> newState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
+		IProvisioningPlan planForProfile = generatePlan(null, newState, initialRequest, initialContext);
 		return createInstallerPlanForExternalInstaller(profile, initialRequest, planForProfile, newState, initialContext, agentProfile, sub);
 	}
 
 	//Deal with the case where the agent profile is different than the one being provisioned
-	private ProvisioningPlan createInstallerPlanForExternalInstaller(IProfile targetedProfile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection expectedState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
-		Collection metaRequirements = areMetaRequirementsSatisfied(agentProfile, expectedState, initialPlan);
+	private IProvisioningPlan createInstallerPlanForExternalInstaller(IProfile targetedProfile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
+		IProfileRegistry installerRegistry = (IProfileRegistry) ((IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT)).getService(IProfileRegistry.SERVICE_NAME);
+		IProfile installerProfile = installerRegistry.getProfile((String) agent.getService(IProvisioningAgent.INSTALLER_PROFILEID));
+
+		Collection<IRequirement> metaRequirements = areMetaRequirementsSatisfied(installerProfile, expectedState, initialPlan);
 		if (metaRequirements == null)
 			return initialPlan;
 
 		IInstallableUnit actionsIU = createIUForMetaRequirements(targetedProfile, metaRequirements);
-		IInstallableUnit previousActionsIU = getPreviousIUForMetaRequirements(agentProfile, getActionGatheringIUId(targetedProfile), sub);
+		IInstallableUnit previousActionsIU = getPreviousIUForMetaRequirements(installerProfile, getActionGatheringIUId(targetedProfile), sub);
 
-		ProfileChangeRequest agentRequest = new ProfileChangeRequest(agentProfile);
-		agentRequest.addInstallableUnits(new IInstallableUnit[] {actionsIU});
+		ProfileChangeRequest agentRequest = new ProfileChangeRequest(installerProfile);
+		agentRequest.add(actionsIU);
 		if (previousActionsIU != null)
-			agentRequest.removeInstallableUnits(new IInstallableUnit[] {previousActionsIU});
+			agentRequest.remove(previousActionsIU);
 		Object externalInstallerPlan = getSolutionFor(agentRequest, initialContext, sub.newChild(10));
-		if (externalInstallerPlan instanceof ProvisioningPlan && ((ProvisioningPlan) externalInstallerPlan).getStatus().getSeverity() == IStatus.ERROR) {
+		if (externalInstallerPlan instanceof IProvisioningPlan && ((IProvisioningPlan) externalInstallerPlan).getStatus().getSeverity() == IStatus.ERROR) {
 			MultiStatus externalInstallerStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_can_not_install_preq, null);
-			externalInstallerStatus.add(((ProvisioningPlan) externalInstallerPlan).getStatus());
-			return new ProvisioningPlan(externalInstallerStatus, initialRequest, new ProvisioningPlan(externalInstallerStatus, agentRequest, null));
+			externalInstallerStatus.add(((IProvisioningPlan) externalInstallerPlan).getStatus());
+			IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+			plan.setStatus(externalInstallerStatus);
+			IProvisioningPlan installerPlan = engine.createPlan(agentProfile, initialContext);
+			installerPlan.setStatus(externalInstallerStatus);
+			plan.setInstallerPlan(installerPlan);
+			return plan;
 		}
 
-		initialPlan.setInstallerPlan(generatePlan((Projector) externalInstallerPlan, null, agentRequest));
+		initialPlan.setInstallerPlan(generatePlan((Projector) externalInstallerPlan, null, agentRequest, initialContext));
 		return initialPlan;
 	}
 
 	//Deal with the case where the actions needs to be installed in the same profile than the one we are performing the initial request
 	//The expectedState represents the result of the initialRequest where the metaRequirements have been satisfied.
-	private ProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, ProvisioningPlan initialPlan, Collection unattachedState, Collection expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
-		Collection metaRequirements = initialRequest.getRemovedInstallableUnits().length == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
+	private IProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
+		Collection<IRequirement> metaRequirements = initialRequest.getRemovals().size() == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
 		if (metaRequirements == null || metaRequirements.isEmpty())
 			return initialPlan;
 
@@ -465,110 +621,112 @@ public class SimplePlanner implements IPlanner {
 
 		//Create an agent request from the initial request
 		ProfileChangeRequest agentRequest = new ProfileChangeRequest(profile);
-		for (Iterator it = initialRequest.getPropertiesToAdd().entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			agentRequest.setProfileProperty((String) entry.getKey(), entry.getValue());
+		for (Map.Entry<String, String> entry : initialRequest.getPropertiesToAdd().entrySet()) {
+			agentRequest.setProfileProperty(entry.getKey(), entry.getValue());
 		}
 		String[] removedProperties = initialRequest.getPropertiesToRemove();
 		for (int i = 0; i < removedProperties.length; i++) {
 			agentRequest.removeProfileProperty(removedProperties[i]);
 		}
-		Map removedIUProperties = initialRequest.getInstallableUnitProfilePropertiesToRemove();
-		for (Iterator iterator = removedIUProperties.entrySet().iterator(); iterator.hasNext();) {
-			Entry entry = (Entry) iterator.next();
-			ArrayList value = (ArrayList) entry.getValue();
-			for (Iterator iterator2 = value.iterator(); iterator2.hasNext();) {
-				agentRequest.removeInstallableUnitProfileProperty((IInstallableUnit) entry.getKey(), (String) iterator2.next());
+		Map<IInstallableUnit, List<String>> removedIUProperties = initialRequest.getInstallableUnitProfilePropertiesToRemove();
+		for (Map.Entry<IInstallableUnit, List<String>> entry : removedIUProperties.entrySet()) {
+			for (String propKey : entry.getValue()) {
+				agentRequest.removeInstallableUnitProfileProperty(entry.getKey(), propKey);
 			}
 		}
 
 		if (previousMetaRequirementIU != null)
-			agentRequest.removeInstallableUnits(new IInstallableUnit[] {previousMetaRequirementIU});
-		agentRequest.addInstallableUnits(new IInstallableUnit[] {metaRequirementIU});
+			agentRequest.remove(previousMetaRequirementIU);
+		agentRequest.add(metaRequirementIU);
 
-		ProvisioningContext agentCtx = new ProvisioningContext(new URI[0]);
-		ArrayList extraIUs = new ArrayList(unattachedState);
-		agentCtx.setExtraIUs(extraIUs);
+		ProvisioningContext agentCtx = new ProvisioningContext(agent);
+		agentCtx.setMetadataRepositories(new URI[0]);
+		ArrayList<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(unattachedState);
+		agentCtx.setExtraInstallableUnits(extraIUs);
 		Object agentSolution = getSolutionFor(agentRequest, agentCtx, monitor.newChild(3));
-		if (agentSolution instanceof ProvisioningPlan && ((ProvisioningPlan) agentSolution).getStatus().getSeverity() == IStatus.ERROR) {
+		if (agentSolution instanceof IProvisioningPlan && ((IProvisioningPlan) agentSolution).getStatus().getSeverity() == IStatus.ERROR) {
 			MultiStatus agentStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_actions_and_software_incompatible, null);
-			agentStatus.add(((ProvisioningPlan) agentSolution).getStatus());
-			return new ProvisioningPlan(agentStatus, initialRequest, new ProvisioningPlan(agentStatus, agentRequest, null));
+			agentStatus.add(((IProvisioningPlan) agentSolution).getStatus());
+			IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
+			plan.setStatus(agentStatus);
+			IProvisioningPlan installerPlan = engine.createPlan(initialRequest.getProfile(), initialContext);
+			installerPlan.setStatus(agentStatus);
+			plan.setInstallerPlan(installerPlan);
+			return plan;
 		}
 
 		//Compute the installer plan. It is the difference between what is currently in the profile and the solution we just computed
-		Collection agentState = ((Projector) agentSolution).extractSolution();
+		Collection<IInstallableUnit> agentState = ((Projector) agentSolution).extractSolution();
 		agentState.remove(metaRequirementIU); //Remove the fake IU
-		agentState = AttachmentHelper.attachFragments(agentState, ((Projector) agentSolution).getFragmentAssociation());
+		agentState = AttachmentHelper.attachFragments(agentState.iterator(), ((Projector) agentSolution).getFragmentAssociation());
 
 		ProvisioningContext noRepoContext = createNoRepoContext(initialRequest);
 		//...This computes the attachment of what is currently in the profile 
 		Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(initialRequest.getProfile())), noRepoContext, new NullProgressMonitor());
-		if (initialSolution instanceof ProvisioningPlan) {
+		if (initialSolution instanceof IProvisioningPlan) {
 			LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + initialRequest.getProfile().getProfileId() + " version " + initialRequest.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-			return (ProvisioningPlan) initialSolution;
+			return (IProvisioningPlan) initialSolution;
 		}
-		Collection initialState = initialRequest.getProfile().query(InstallableUnitQuery.ANY, new Collector(), null).toCollection();
-		initialState = AttachmentHelper.attachFragments(initialState, ((Projector) initialSolution).getFragmentAssociation());
+		Iterator<IInstallableUnit> profileState = initialRequest.getProfile().query(QueryUtil.createIUAnyQuery(), null).iterator();
+		Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
 
-		ProvisioningPlan agentPlan = generateProvisioningPlan(initialState, agentState, initialRequest, null);
+		IProvisioningPlan agentPlan = generateProvisioningPlan(initialState, agentState, initialRequest, null, initialContext);
 
 		//Compute the installation plan. It is the difference between the state after the installer plan has run and the expectedState.
-		return generateProvisioningPlan(agentState, expectedState, initialRequest, agentPlan);
+		return generateProvisioningPlan(agentState, expectedState, initialRequest, agentPlan, initialContext);
 	}
 
 	//Compute the set of operands based on the solution obtained previously
-	private ProvisioningPlan generatePlan(Projector newSolution, Collection newState, ProfileChangeRequest request) {
+	private IProvisioningPlan generatePlan(Projector newSolution, Collection<IInstallableUnit> newState, ProfileChangeRequest request, ProvisioningContext context) {
 		//Compute the attachment of the new state if not provided
 		if (newState == null) {
 			newState = newSolution.extractSolution();
-			newState = AttachmentHelper.attachFragments(newState, newSolution.getFragmentAssociation());
+			newState = AttachmentHelper.attachFragments(newState.iterator(), newSolution.getFragmentAssociation());
 		}
 		ProvisioningContext noRepoContext = createNoRepoContext(request);
 
 		//Compute the attachment of the previous state
 		Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(request.getProfile())), noRepoContext, new NullProgressMonitor());
-		if (initialSolution instanceof ProvisioningPlan) {
+		if (initialSolution instanceof IProvisioningPlan) {
 			LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + request.getProfile().getProfileId() + " version " + request.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-			return (ProvisioningPlan) initialSolution;
+			return (IProvisioningPlan) initialSolution;
 		}
-		Collection initialState = request.getProfile().query(InstallableUnitQuery.ANY, new Collector(), null).toCollection();
-		initialState = AttachmentHelper.attachFragments(initialState, ((Projector) initialSolution).getFragmentAssociation());
+		Iterator<IInstallableUnit> profileState = request.getProfile().query(QueryUtil.createIUAnyQuery(), null).iterator();
+		Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
 
 		//Generate the plan
-		return generateProvisioningPlan(initialState, newState, request, null);
+		return generateProvisioningPlan(initialState, newState, request, null, context);
 	}
 
 	private ProvisioningContext createNoRepoContext(ProfileChangeRequest request) {
-		ProvisioningContext noRepoContext = new ProvisioningContext(new URI[0]);
+		ProvisioningContext noRepoContext = new ProvisioningContext(agent);
+		noRepoContext.setMetadataRepositories(new URI[0]);
 		noRepoContext.setArtifactRepositories(new URI[0]);
 		noRepoContext.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString());
-		ArrayList extraIUs = new ArrayList();
-		extraIUs.addAll(request.getProfile().query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor()).toCollection());
-		noRepoContext.setExtraIUs(extraIUs);
+		noRepoContext.setExtraInstallableUnits(new ArrayList<IInstallableUnit>(request.getProfile().query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor()).toUnmodifiableSet()));
 		return noRepoContext;
 	}
 
 	private IInstallableUnit getPreviousIUForMetaRequirements(IProfile profile, String iuId, IProgressMonitor monitor) {
-		Collector c = profile.query(new InstallableUnitQuery(iuId), new Collector(), monitor);
-		if (c.size() == 0)
+		IQueryResult<IInstallableUnit> c = profile.query(QueryUtil.createIUQuery(iuId), monitor);
+		if (c.isEmpty())
 			return null;
-		return (IInstallableUnit) c.toArray(IInstallableUnit.class)[0];
+		return c.iterator().next();
 	}
 
 	private String getActionGatheringIUId(IProfile profile) {
 		return ID_IU_FOR_ACTIONS + '.' + profile.getProfileId();
 	}
 
-	private IInstallableUnit createIUForMetaRequirements(IProfile profile, Collection metaRequirements) {
+	private IInstallableUnit createIUForMetaRequirements(IProfile profile, Collection<IRequirement> metaRequirements) {
 		InstallableUnitDescription description = new InstallableUnitDescription();
 		String id = getActionGatheringIUId(profile);
 		description.setId(id);
 		Version version = Version.createOSGi(1, 0, 0, Long.toString(profile.getTimestamp()));
 		description.setVersion(version);
-		description.addRequiredCapabilities(metaRequirements);
+		description.addRequirements(metaRequirements);
 
-		ArrayList providedCapabilities = new ArrayList();
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
 		IProvidedCapability providedCapability = MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, id, version);
 		providedCapabilities.add(providedCapability);
 		description.addProvidedCapabilities(providedCapabilities);
@@ -577,12 +735,12 @@ public class SimplePlanner implements IPlanner {
 		return actionsIU;
 	}
 
-	private IInstallableUnit createIURepresentingTheProfile(ArrayList allRequirements) {
+	private IInstallableUnit createIURepresentingTheProfile(Set<IRequirement> allRequirements) {
 		InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
 		String time = Long.toString(System.currentTimeMillis());
 		iud.setId(time);
 		iud.setVersion(Version.createOSGi(0, 0, 0, time));
-		iud.setRequiredCapabilities((IRequiredCapability[]) allRequirements.toArray(new IRequiredCapability[allRequirements.size()]));
+		iud.setRequirements(allRequirements.toArray(new IRequirement[allRequirements.size()]));
 		return MetadataFactory.createInstallableUnit(iud);
 	}
 
@@ -590,55 +748,53 @@ public class SimplePlanner implements IPlanner {
 	//It returns at index 0 a meta IU representing everything that needs to be installed
 	//It returns at index 1 all the IUs that are in the profile after the removal have been done, but before the addition have been done 
 	private Object[] updatePlannerInfo(ProfileChangeRequest profileChangeRequest, ProvisioningContext context) {
-		Collection includedIUs = profileChangeRequest.getProfile().query(new IUProfilePropertyQuery(profileChangeRequest.getProfile(), INCLUSION_RULES, null), new Collector(), null).toCollection();
-		Collection alreadyInstalled = new HashSet(includedIUs);
+		IQueryResult<IInstallableUnit> alreadyInstalled = profileChangeRequest.getProfile().query(new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY), null);
 
-		IInstallableUnit[] added = profileChangeRequest.getAddedInstallableUnits();
-		IInstallableUnit[] removed = profileChangeRequest.getRemovedInstallableUnits();
+		Collection<IInstallableUnit> additionRequested = profileChangeRequest.getAdditions();
+		Collection<IInstallableUnit> removalRequested = profileChangeRequest.getRemovals();
 
-		for (Iterator iterator = profileChangeRequest.getInstallableUnitProfilePropertiesToRemove().entrySet().iterator(); iterator.hasNext();) {
-			Map.Entry object = (Map.Entry) iterator.next();
-			if (((List) object.getValue()).contains(INCLUSION_RULES))
-				profileChangeRequest.setInstallableUnitProfileProperty((IInstallableUnit) object.getKey(), INCLUSION_RULES, PlannerHelper.createStrictInclusionRule((IInstallableUnit) object.getKey()));
+		for (Map.Entry<IInstallableUnit, List<String>> object : profileChangeRequest.getInstallableUnitProfilePropertiesToRemove().entrySet()) {
+			if (object.getValue().contains(INCLUSION_RULES))
+				profileChangeRequest.setInstallableUnitProfileProperty(object.getKey(), INCLUSION_RULES, ProfileInclusionRules.createStrictInclusionRule(object.getKey()));
 		}
 		//Remove the iu properties associated to the ius removed and the iu properties being removed as well
-		if (removed.length != 0) {
-			for (Iterator iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) iterator.next();
-				for (int i = 0; i < removed.length; i++) {
-					if (iu.equals(removed[i])) {
-						profileChangeRequest.removeInstallableUnitProfileProperty(removed[i], INCLUSION_RULES);
+		if (removalRequested.size() != 0) {
+			for (Iterator<IInstallableUnit> iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
+				IInstallableUnit iu = iterator.next();
+				for (IInstallableUnit removed : removalRequested) {
+					if (iu.equals(removed)) {
+						profileChangeRequest.removeInstallableUnitProfileProperty(removed, INCLUSION_RULES);
 						iterator.remove();
 						break;
 					}
 				}
 			}
 		}
-		ArrayList gatheredRequirements = new ArrayList();
+		Set<IRequirement> gatheredRequirements = new HashSet<IRequirement>();
 
 		//Process all the IUs being added
-		Map iuPropertiesToAdd = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
-		for (int i = 0; i < added.length; i++) {
-			Map propertiesForIU = (Map) iuPropertiesToAdd.get(added[i]);
-			IRequiredCapability profileRequirement = null;
+		Map<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
+		for (IInstallableUnit added : additionRequested) {
+			Map<String, String> propertiesForIU = iuPropertiesToAdd.get(added);
+			IRequirement profileRequirement = null;
 			if (propertiesForIU != null) {
-				profileRequirement = createRequirement(added[i], (String) propertiesForIU.get(INCLUSION_RULES));
+				profileRequirement = createRequirement(added, propertiesForIU.get(INCLUSION_RULES));
 			}
 			if (profileRequirement == null) {
-				profileChangeRequest.setInstallableUnitProfileProperty(added[i], INCLUSION_RULES, PlannerHelper.createStrictInclusionRule(added[i]));
-				profileRequirement = createStrictRequirement(added[i]);
+				profileChangeRequest.setInstallableUnitProfileProperty(added, INCLUSION_RULES, ProfileInclusionRules.createStrictInclusionRule(added));
+				profileRequirement = createStrictRequirement(added);
 			}
 			gatheredRequirements.add(profileRequirement);
 		}
 
 		//Process the IUs that were already there
-		for (Iterator iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			Map propertiesForIU = (Map) iuPropertiesToAdd.get(iu);
-			IRequiredCapability profileRequirement = null;
+		for (Iterator<IInstallableUnit> iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			Map<String, String> propertiesForIU = iuPropertiesToAdd.get(iu);
+			IRequirement profileRequirement = null;
 			//Test if the value has changed
 			if (propertiesForIU != null) {
-				profileRequirement = createRequirement(iu, (String) propertiesForIU.get(INCLUSION_RULES));
+				profileRequirement = createRequirement(iu, propertiesForIU.get(INCLUSION_RULES));
 			}
 			if (profileRequirement == null) {
 				profileRequirement = createRequirement(iu, profileChangeRequest.getProfile().getInstallableUnitProperty(iu, INCLUSION_RULES));
@@ -647,60 +803,46 @@ public class SimplePlanner implements IPlanner {
 		}
 
 		//Now add any other requirement that we need to see satisfied
-		if (context != null && context.getAdditionalRequirements() != null)
-			gatheredRequirements.addAll(context.getAdditionalRequirements());
-		return new Object[] {createIURepresentingTheProfile(gatheredRequirements), (IInstallableUnit[]) alreadyInstalled.toArray(new IInstallableUnit[alreadyInstalled.size()])};
+		if (profileChangeRequest.getExtraRequirements() != null)
+			gatheredRequirements.addAll(profileChangeRequest.getExtraRequirements());
+		return new Object[] {createIURepresentingTheProfile(gatheredRequirements), alreadyInstalled.toArray(IInstallableUnit.class)};
 	}
 
-	private IRequiredCapability createRequirement(IInstallableUnit iu, String rule) {
+	private IRequirement createRequirement(IInstallableUnit iu, String rule) {
 		if (rule == null)
 			return null;
-		if (rule.equals(PlannerHelper.createStrictInclusionRule(iu))) {
+		if (rule.equals(ProfileInclusionRules.createStrictInclusionRule(iu))) {
 			return createStrictRequirement(iu);
 		}
-		if (rule.equals(PlannerHelper.createOptionalInclusionRule(iu))) {
+		if (rule.equals(ProfileInclusionRules.createOptionalInclusionRule(iu))) {
 			return createOptionalRequirement(iu);
 		}
 		return null;
 	}
 
-	private IRequiredCapability createOptionalRequirement(IInstallableUnit iu) {
-		return MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, true, false, true);
+	private IRequirement createOptionalRequirement(IInstallableUnit iu) {
+		return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, true, false, true);
 	}
 
-	private IRequiredCapability createStrictRequirement(IInstallableUnit iu) {
-		return MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
+	private IRequirement createStrictRequirement(IInstallableUnit iu) {
+		return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
 	}
 
-	public IInstallableUnit[] updatesFor(IInstallableUnit toUpdate, ProvisioningContext context, IProgressMonitor monitor) {
-		Map resultsMap = new HashMap();
+	public IQueryResult<IInstallableUnit> updatesFor(IInstallableUnit toUpdate, ProvisioningContext context, IProgressMonitor monitor) {
+		Map<String, IInstallableUnit> resultsMap = new HashMap<String, IInstallableUnit>();
 
-		IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) ServiceHelper.getService(DirectorActivator.context, IMetadataRepositoryManager.class.getName());
-		URI[] repositories = context.getMetadataRepositories();
-		if (repositories == null)
-			repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
-
-		SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 200);
-		for (int i = 0; i < repositories.length; i++) {
-			try {
-				if (sub.isCanceled())
-					throw new OperationCanceledException();
-				IMetadataRepository repository = repoMgr.loadRepository(repositories[i], sub.newChild(100));
-				Collector matches = repository.query(new UpdateQuery(toUpdate), new Collector(), sub.newChild(100));
-				for (Iterator it = matches.iterator(); it.hasNext();) {
-					IInstallableUnit iu = (IInstallableUnit) it.next();
-					String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
-					IInstallableUnit currentIU = (IInstallableUnit) resultsMap.get(key);
-					if (currentIU == null || hasHigherFidelity(iu, currentIU))
-						resultsMap.put(key, iu);
-				}
-			} catch (ProvisionException e) {
-				//skip unreadable repositories
-			}
+		SubMonitor sub = SubMonitor.convert(monitor, 1000);
+		IQueryable<IInstallableUnit> queryable = context.getMetadata(sub.newChild(500));
+		IQueryResult<IInstallableUnit> matches = queryable.query(new UpdateQuery(toUpdate), sub.newChild(500));
+		for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
+			IInstallableUnit iu = it.next();
+			String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
+			IInstallableUnit currentIU = resultsMap.get(key);
+			if (currentIU == null || hasHigherFidelity(iu, currentIU))
+				resultsMap.put(key, iu);
 		}
 		sub.done();
-		Collection results = resultsMap.values();
-		return (IInstallableUnit[]) results.toArray(new IInstallableUnit[results.size()]);
+		return new CollectionResult<IInstallableUnit>(resultsMap.values());
 	}
 
 	//helper class to trick the resolver to believe that everything is optional
@@ -711,37 +853,25 @@ public class SimplePlanner implements IPlanner {
 			profile = p;
 		}
 
-		public Collector available(Query query, Collector collector, IProgressMonitor monitor) {
-			return profile.available(query, collector, monitor);
+		public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			return profile.available(query, monitor);
 		}
 
-		public Map getInstallableUnitProperties(IInstallableUnit iu) {
+		public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu) {
 			return profile.getInstallableUnitProperties(iu);
 		}
 
 		public String getInstallableUnitProperty(IInstallableUnit iu, String key) {
 			if (INCLUSION_RULES.equals(key))
-				return PlannerHelper.createOptionalInclusionRule(iu);
+				return ProfileInclusionRules.createOptionalInclusionRule(iu);
 			return profile.getInstallableUnitProperty(iu, key);
 		}
 
-		public Map getLocalProperties() {
-			return profile.getLocalProperties();
-		}
-
-		public String getLocalProperty(String key) {
-			return profile.getLocalProperty(key);
-		}
-
-		public IProfile getParentProfile() {
-			return profile.getParentProfile();
-		}
-
 		public String getProfileId() {
 			return profile.getProfileId();
 		}
 
-		public Map getProperties() {
+		public Map<String, String> getProperties() {
 			return profile.getProperties();
 		}
 
@@ -749,24 +879,21 @@ public class SimplePlanner implements IPlanner {
 			return profile.getProperty(key);
 		}
 
-		public String[] getSubProfileIds() {
-			return profile.getSubProfileIds();
+		public IProvisioningAgent getProvisioningAgent() {
+			return profile.getProvisioningAgent();
 		}
 
 		public long getTimestamp() {
 			return profile.getTimestamp();
 		}
 
-		public boolean hasSubProfiles() {
-			return profile.hasSubProfiles();
-		}
-
-		public boolean isRootProfile() {
-			return profile.isRootProfile();
+		public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			return profile.query(query, monitor);
 		}
+	}
 
-		public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-			return profile.query(query, collector, monitor);
-		}
+	public IProfileChangeRequest createChangeRequest(IProfile profileToChange) {
+		return new ProfileChangeRequest(profileToChange);
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java
index f26d799..b9544ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *      IBM Corporation - initial API and implementation
+ *      Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.director;
 
@@ -14,35 +15,38 @@ import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.CapabilityQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnitPatch;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.*;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.InvalidSyntaxException;
 
 public class Slicer {
 	private static boolean DEBUG = false;
-	private IQueryable possibilites;
-
-	private LinkedList toProcess;
-	private Set considered; //IUs to add to the slice
-	private TwoTierMap slice; //The IUs that have been considered to be part of the problem
-
-	protected Dictionary selectionContext;
-	private MultiStatus result;
-
-	private boolean considerMetaRequirements = false;
+	private final IQueryable<IInstallableUnit> possibilites;
+	private final boolean considerMetaRequirements;
+	protected final IInstallableUnit selectionContext;
+	private final Map<String, Map<Version, IInstallableUnit>> slice; //The IUs that have been considered to be part of the problem
+	private final MultiStatus result;
+
+	private LinkedList<IInstallableUnit> toProcess;
+	private Set<IInstallableUnit> considered; //IUs to add to the slice
+	private Set<IInstallableUnit> nonGreedyIUs = new HashSet<IInstallableUnit>(); //IUs that are brought in by non greedy dependencies
+
+	public Slicer(IQueryable<IInstallableUnit> input, Map<String, String> context, boolean considerMetaRequirements) {
+		this(input, InstallableUnit.contextIU(context), considerMetaRequirements);
+	}
 
-	public Slicer(IQueryable input, Dictionary context, boolean considerMetaRequirements) {
-		possibilites = input;
-		slice = new TwoTierMap();
-		selectionContext = context;
-		result = new MultiStatus(DirectorActivator.PI_DIRECTOR, IStatus.OK, Messages.Planner_Problems_resolving_plan, null);
+	public Slicer(IQueryable<IInstallableUnit> possibilites, IInstallableUnit selectionContext, boolean considerMetaRequirements) {
+		this.possibilites = possibilites;
+		this.selectionContext = selectionContext;
 		this.considerMetaRequirements = considerMetaRequirements;
+		slice = new HashMap<String, Map<Version, IInstallableUnit>>();
+		result = new MultiStatus(DirectorActivator.PI_DIRECTOR, IStatus.OK, Messages.Planner_Problems_resolving_plan, null);
 	}
 
-	public IQueryable slice(IInstallableUnit[] ius, IProgressMonitor monitor) {
+	public IQueryable<IInstallableUnit> slice(IInstallableUnit[] ius, IProgressMonitor monitor) {
 		try {
 			long start = 0;
 			if (DEBUG) {
@@ -51,15 +55,16 @@ public class Slicer {
 			}
 
 			validateInput(ius);
-			considered = new HashSet(Arrays.asList(ius));
-			toProcess = new LinkedList(considered);
+			considered = new HashSet<IInstallableUnit>(Arrays.asList(ius));
+			toProcess = new LinkedList<IInstallableUnit>(considered);
 			while (!toProcess.isEmpty()) {
 				if (monitor.isCanceled()) {
 					result.merge(Status.CANCEL_STATUS);
 					throw new OperationCanceledException();
 				}
-				processIU((IInstallableUnit) toProcess.removeFirst());
+				processIU(toProcess.removeFirst());
 			}
+			computeNonGreedyIUs();
 			if (DEBUG) {
 				long stop = System.currentTimeMillis();
 				System.out.println("Slicing complete: " + (stop - start)); //$NON-NLS-1$
@@ -71,7 +76,23 @@ public class Slicer {
 			LogHelper.log(result);
 		if (result.getSeverity() == IStatus.ERROR)
 			return null;
-		return new QueryableArray((IInstallableUnit[]) considered.toArray(new IInstallableUnit[considered.size()]));
+		return new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()]));
+	}
+
+	private void computeNonGreedyIUs() {
+		IQueryable<IInstallableUnit> queryable = new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()]));
+		Iterator<IInstallableUnit> it = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).iterator();
+		while (it.hasNext()) {
+			Collection<IRequirement> reqs = getRequirements(it.next().unresolved());
+			for (IRequirement req : reqs) {
+				if (!isApplicable(req))
+					continue;
+
+				if (!isGreedy(req)) {
+					nonGreedyIUs.addAll(queryable.query(QueryUtil.createMatchQuery(req.getMatches()), null).toUnmodifiableSet());
+				}
+			}
+		}
 	}
 
 	public MultiStatus getStatus() {
@@ -82,96 +103,97 @@ public class Slicer {
 	private void validateInput(IInstallableUnit[] ius) {
 		for (int i = 0; i < ius.length; i++) {
 			if (!isApplicable(ius[i]))
-				throw new IllegalStateException("The IU " + ius[i] + " can't be installed in this environment because its filter does not match."); //$NON-NLS-1$//$NON-NLS-2$
+				throw new IllegalStateException(NLS.bind(Messages.Explanation_missingRootFilter, ius[i]));
 		}
 	}
 
 	// Check whether the requirement is applicable
-	protected boolean isApplicable(IRequiredCapability req) {
-		String filter = req.getFilter();
-		if (filter == null)
-			return true;
-		try {
-			return DirectorActivator.context.createFilter(filter).match(selectionContext);
-		} catch (InvalidSyntaxException e) {
-			return false;
-		}
+	protected boolean isApplicable(IRequirement req) {
+		IMatchExpression<IInstallableUnit> filter = req.getFilter();
+		return filter == null || filter.isMatch(selectionContext);
 	}
 
 	protected boolean isApplicable(IInstallableUnit iu) {
-		String enablementFilter = iu.getFilter();
-		if (enablementFilter == null)
-			return true;
-		try {
-			return DirectorActivator.context.createFilter(enablementFilter).match(selectionContext);
-		} catch (InvalidSyntaxException e) {
-			return false;
-		}
+		IMatchExpression<IInstallableUnit> filter = iu.getFilter();
+		return filter == null || filter.isMatch(selectionContext);
 	}
 
 	protected void processIU(IInstallableUnit iu) {
 		iu = iu.unresolved();
 
-		slice.put(iu.getId(), iu.getVersion(), iu);
+		Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId());
+		if (iuSlice == null) {
+
+			iuSlice = new HashMap<Version, IInstallableUnit>();
+			slice.put(iu.getId(), iuSlice);
+		}
+		iuSlice.put(iu.getVersion(), iu);
 		if (!isApplicable(iu)) {
 			return;
 		}
 
-		IRequiredCapability[] reqs = getRequiredCapabilities(iu);
-		if (reqs.length == 0) {
+		Collection<IRequirement> reqs = getRequirements(iu);
+		if (reqs.isEmpty())
 			return;
-		}
-		for (int i = 0; i < reqs.length; i++) {
-			if (!isApplicable(reqs[i]))
+		for (IRequirement req : reqs) {
+			if (!isApplicable(req))
 				continue;
 
-			if (!isGreedy(reqs[i])) {
+			if (!isGreedy(req)) {
 				continue;
 			}
 
-			expandRequirement(iu, reqs[i]);
+			expandRequirement(iu, req);
 		}
 	}
 
-	protected boolean isGreedy(IRequiredCapability req) {
+	protected boolean isGreedy(IRequirement req) {
 		return req.isGreedy();
 	}
 
-	private IRequiredCapability[] getRequiredCapabilities(IInstallableUnit iu) {
-		if (!(iu instanceof IInstallableUnitPatch)) {
-			if (iu.getMetaRequiredCapabilities().length == 0 || considerMetaRequirements == false)
-				return iu.getRequiredCapabilities();
-			IRequiredCapability[] aggregatedCapabilities = new IRequiredCapability[iu.getRequiredCapabilities().length + iu.getMetaRequiredCapabilities().length];
-			System.arraycopy(iu.getRequiredCapabilities(), 0, aggregatedCapabilities, 0, iu.getRequiredCapabilities().length);
-			System.arraycopy(iu.getMetaRequiredCapabilities(), 0, aggregatedCapabilities, iu.getRequiredCapabilities().length, iu.getMetaRequiredCapabilities().length);
-			return aggregatedCapabilities;
+	private Collection<IRequirement> getRequirements(IInstallableUnit iu) {
+		boolean isPatch = iu instanceof IInstallableUnitPatch;
+		boolean isFragment = iu instanceof IInstallableUnitFragment;
+		//Short-circuit for the case of an IInstallableUnit 
+		if ((!isFragment) && (!isPatch) && iu.getMetaRequirements().size() == 0)
+			return iu.getRequirements();
+
+		ArrayList<IRequirement> aggregatedRequirements = new ArrayList<IRequirement>(iu.getRequirements().size() + iu.getMetaRequirements().size() + (isFragment ? ((IInstallableUnitFragment) iu).getHost().size() : 0) + (isPatch ? ((IInstallableUnitPatch) iu).getRequirementsChange().size() : 0));
+		aggregatedRequirements.addAll(iu.getRequirements());
+
+		if (iu instanceof IInstallableUnitFragment) {
+			aggregatedRequirements.addAll(((IInstallableUnitFragment) iu).getHost());
 		}
-		IRequiredCapability[] aggregatedCapabilities;
-		IInstallableUnitPatch patchIU = (IInstallableUnitPatch) iu;
-		IRequirementChange[] changes = patchIU.getRequirementsChange();
-		int initialRequirementCount = iu.getRequiredCapabilities().length;
-		aggregatedCapabilities = new IRequiredCapability[initialRequirementCount + changes.length];
-		System.arraycopy(iu.getRequiredCapabilities(), 0, aggregatedCapabilities, 0, initialRequirementCount);
-		for (int i = 0; i < changes.length; i++) {
-			aggregatedCapabilities[initialRequirementCount++] = changes[i].newValue();
+
+		if (iu instanceof InstallableUnitPatch) {
+			IInstallableUnitPatch patchIU = (IInstallableUnitPatch) iu;
+			List<IRequirementChange> changes = patchIU.getRequirementsChange();
+			for (int i = 0; i < changes.size(); i++)
+				aggregatedRequirements.add(changes.get(i).newValue());
 		}
-		return aggregatedCapabilities;
+
+		if (considerMetaRequirements)
+			aggregatedRequirements.addAll(iu.getMetaRequirements());
+		return aggregatedRequirements;
 	}
 
-	private void expandRequirement(IInstallableUnit iu, IRequiredCapability req) {
-		Collector matches = possibilites.query(new CapabilityQuery(req), new Collector(), null);
+	private void expandRequirement(IInstallableUnit iu, IRequirement req) {
+		if (req.getMax() == 0)
+			return;
+		IQueryResult<IInstallableUnit> matches = possibilites.query(QueryUtil.createMatchQuery(req.getMatches()), null);
 		int validMatches = 0;
-		for (Iterator iterator = matches.iterator(); iterator.hasNext();) {
-			IInstallableUnit match = (IInstallableUnit) iterator.next();
+		for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
+			IInstallableUnit match = iterator.next();
 			if (!isApplicable(match))
 				continue;
 			validMatches++;
-			if (!slice.containsKey(match.getId(), match.getVersion()))
+			Map<Version, IInstallableUnit> iuSlice = slice.get(match.getId());
+			if (iuSlice == null || !iuSlice.containsKey(match.getVersion()))
 				consider(match);
 		}
 
 		if (validMatches == 0) {
-			if (req.isOptional()) {
+			if (req.getMin() == 0) {
 				if (DEBUG)
 					System.out.println("No IU found to satisfy optional dependency of " + iu + " on req " + req); //$NON-NLS-1$//$NON-NLS-2$
 			} else {
@@ -184,4 +206,8 @@ public class Slicer {
 		if (considered.add(match))
 			toProcess.addLast(match);
 	}
+
+	Set<IInstallableUnit> getNonGreedyIUs() {
+		return nonGreedyIUs;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/TwoTierMap.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/TwoTierMap.java
deleted file mode 100644
index 84ba95c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/TwoTierMap.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.util.*;
-
-/**
- * The purpose of this class is to provide a two-tier map.
- * MapOf(key1 => MapOf(key2 => value)).
- * Even though this class implements Map the behavior of
- * the methods aren't exactly the same as that of a real
- * Map - especially, entrySet(), keySet() etc. works off
- * the outer map while values() returns all the values of
- * all the inner maps.
- */
-public class TwoTierMap implements Map, Serializable {
-
-	private static final long serialVersionUID = 362497720873186265L;
-
-	private Map outerMap;
-	private int policy;
-
-	public static final int POLICY_NONE = 0, POLICY_BOTH_MAPS_PRESERVE_ORDERING = 1 << 0, POLICY_INNER_MAP_PRESERVE_EXISTING = 1 << 1, POLICY_INNER_MAP_SORTED_ASCENDING = 1 << 2, POLICY_INNER_MAP_SORTED_DESCENDING = 1 << 3, POLICY_INNER_MAP_ENSURE_SINGLETON = 1 << 4;
-
-	private static final int POLICY_INNER_MAP_SORTED_MASK = POLICY_INNER_MAP_SORTED_ASCENDING | POLICY_INNER_MAP_SORTED_DESCENDING;
-
-	public TwoTierMap() {
-		this(8, POLICY_NONE);
-	}
-
-	public TwoTierMap(int initialCapacity) {
-		this(initialCapacity, POLICY_NONE);
-	}
-
-	/**
-	 * Creates a two-tier map with the specified
-	 * initialCapacity and policy. The policy determines
-	 * whether the outer map is ordered, inner map is
-	 * sorted, clobber values of inner map etc.
-	 */
-	public TwoTierMap(int initialCapacity, int policy) {
-		this.policy = policy;
-		this.outerMap = shouldUseOrderedMap() ? new LinkedHashMap(initialCapacity) : new HashMap(initialCapacity);
-	}
-
-	/**
-	 * Insert the value with key key1 into the inner map 
-	 * that is obtained from the outer map with key key2.
-	 * If you have set POLICY_INNER_MAP_PRESERVE_EXISTING
-	 * at the time of creating this, it will not overwrite
-	 * if there is already a non-null value at key2. 
-	 * The other POLICY_INNER_MAP_* policies determine 
-	 * what kind of inner map is created.
-	 * @param key1 The key for outer map.
-	 * @param key2 The key for inner map.
-	 * @param value The value.
-	 * @return Existing value if any, otherwise null.
-	 */
-	public Object put(Object key1, Object key2, Object value) {
-		Map innerMap = (Map) this.outerMap.get(key1);
-		if (innerMap == null) {
-			if (shouldUseSingletonInnerMap()) {
-				this.outerMap.put(key1, Collections.singletonMap(key2, value));
-				return null;
-			}
-			innerMap = createInnerMap();
-			this.outerMap.put(key1, innerMap);
-		}
-		// It is faster to check for already existing entry 
-		// this way instead of containsKey() check. Of course,
-		// this will prevent us from recognizing a null entry, 
-		// which I think shouldn't be a problem.
-		Object existing = innerMap.put(key2, value);
-		if (existing != null && shouldPreserveExisting()) {
-			innerMap.put(key2, existing);
-		}
-		return existing;
-	}
-
-	/**
-	 * Get the object stored in the inner map using key2
-	 * as key where the inner map is obtained from the 
-	 * outer map using key1.
-	 * @param key1 The key for outer map.
-	 * @param key2 The key for inner map.
-	 * @return The object for key2 in inner map for key1 
-	 * in the outer map. 
-	 */
-	public Object get(Object key1, Object key2) {
-		if (key1 == null || key2 == null)
-			return getAll(key1);
-		Map innerMap = (Map) this.outerMap.get(key1);
-		Object value = innerMap == null ? null : innerMap.get(key2);
-		return value;
-	}
-
-	/**
-	 * Get all the values in the inner map for key1 in
-	 * the outer map.
-	 * @param key1 The key for outer map.
-	 * @return Collection of values in the inner map.
-	 */
-	public Collection getAll(Object key1) {
-		if (key1 == null)
-			// return all
-			return values();
-		Map innerMap = (Map) this.outerMap.get(key1);
-		return innerMap == null ? Collections.EMPTY_LIST : Collections.unmodifiableCollection(innerMap.values());
-
-	}
-
-	public Object remove(Object key1, Object key2) {
-		if (key1 == null || key2 == null)
-			return removeAll(key1);
-		Map innerMap = (Map) this.outerMap.get(key1);
-		if (innerMap == null)
-			return null;
-		if (shouldUseSingletonInnerMap()) {
-			Object result = innerMap.get(key2);
-			if (result != null) {
-				this.outerMap.remove(key1);
-			}
-			return result;
-		}
-		Object result = innerMap.remove(key2);
-		if (result != null && innerMap.isEmpty()) {
-			this.outerMap.remove(key1);
-		}
-		return result;
-	}
-
-	public Collection removeAll(Object key1) {
-		if (key1 == null)
-			return Collections.EMPTY_LIST;
-		Map innerMap = (Map) this.outerMap.remove(key1);
-		return innerMap == null ? Collections.EMPTY_LIST : innerMap.values();
-	}
-
-	/**
-	 * Determine whether there exists a valid object for
-	 * key2 in the inner map for key1 in the outer map.
-	 * @param key1 The key for outer map.
-	 * @param key2 The key for inner map.
-	 * @return true if a non-null object exists; otherwise
-	 * false.
-	 */
-	public boolean containsKey(Object key1, Object key2) {
-		if (key1 == null)
-			return false;
-		if (key2 == null)
-			return containsKey(key1);
-		return get(key1, key2) != null;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#clear()
-	 */
-	public void clear() {
-		this.outerMap.clear();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#containsKey(java.lang.Object)
-	 */
-	public boolean containsKey(Object key) {
-		return this.outerMap.containsKey(key);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#containsValue(java.lang.Object)
-	 */
-	public boolean containsValue(Object value) {
-		for (Iterator it = entrySet().iterator(); it.hasNext();) {
-			Map.Entry entry = (Map.Entry) it.next();
-			Map innerMap = (Map) entry.getValue();
-			if (innerMap.containsValue(value))
-				return true;
-		}
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#size()
-	 */
-	public int size() {
-		return this.outerMap.size();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#isEmpty()
-	 */
-	public boolean isEmpty() {
-		return this.size() == 0;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#entrySet()
-	 */
-	public Set entrySet() {
-		return Collections.unmodifiableSet(this.outerMap.entrySet());
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#values()
-	 */
-	public Collection values() {
-		ArrayList result = new ArrayList(size());
-		for (Iterator it = this.outerMap.keySet().iterator(); it.hasNext();) {
-			Object key = it.next();
-			// A null key will cause infinite recursion!
-			if (key != null) {
-				result.addAll(getAll(key));
-			}
-		}
-		return result;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#get(java.lang.Object)
-	 */
-	public Object get(Object key) {
-		if (key instanceof Object[]) {
-			Object[] keys = (Object[]) key;
-			return get(keys[0], keys[1]);
-		} else
-			return getAll(key);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#keySet()
-	 */
-	public Set keySet() {
-		return Collections.unmodifiableSet(this.outerMap.keySet());
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#put(java.lang.Object, java.lang.Object)
-	 */
-	public Object put(Object key, Object value) {
-		if (key instanceof Object[]) {
-			Object[] keys = (Object[]) key;
-			return put(keys[0], keys[1], value);
-		}
-		throw new IllegalArgumentException("First arg should be an array!"); //$NON-NLS-1$
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#putAll(java.util.Map)
-	 */
-	public void putAll(Map t) {
-		throw new UnsupportedOperationException();
-	}
-
-	/* (non-Javadoc)
-	 * @see java.util.Map#remove(java.lang.Object)
-	 */
-	public Object remove(Object key) {
-		if (key instanceof Object[]) {
-			Object[] keys = (Object[]) key;
-			return remove(keys[0], keys[1]);
-		} else
-			return removeAll(key);
-	}
-
-	public String toString() {
-		StringBuffer sb = new StringBuffer();
-		if (this.outerMap.isEmpty()) {
-			sb.append("  (Empty)"); //$NON-NLS-1$
-		} else {
-			for (Iterator it = this.outerMap.entrySet().iterator(); it.hasNext();) {
-				Map.Entry entry = (Map.Entry) it.next();
-				sb.append("  ").append(entry.getKey()) //$NON-NLS-1$
-						.append(" = ") //$NON-NLS-1$
-						.append(entry.getValue()).append('\n');
-			}
-			sb.setLength(sb.length() - 1);
-		}
-		return sb.toString();
-	}
-
-	public void dump(PrintStream ps) {
-		if (ps == null) {
-			ps = System.out;
-		}
-		ps.println(this.toString());
-	}
-
-	private Map createInnerMap() {
-		Map innerMap;
-		if (shouldUseSortedInnerMap()) {
-			innerMap = new TreeMap(new ValueComparator(shouldSortInAscendingOrder()));
-		} else if (shouldUseOrderedMap()) {
-			innerMap = new LinkedHashMap(2);
-		} else {
-			innerMap = new HashMap(2);
-		}
-		return innerMap;
-	}
-
-	private boolean shouldPreserveExisting() {
-		return (this.policy & POLICY_INNER_MAP_PRESERVE_EXISTING) == POLICY_INNER_MAP_PRESERVE_EXISTING;
-	}
-
-	private boolean shouldUseOrderedMap() {
-		return (this.policy & POLICY_BOTH_MAPS_PRESERVE_ORDERING) == POLICY_BOTH_MAPS_PRESERVE_ORDERING;
-	}
-
-	private boolean shouldUseSortedInnerMap() {
-		return (this.policy & POLICY_INNER_MAP_SORTED_MASK) != 0;
-	}
-
-	private boolean shouldSortInAscendingOrder() {
-		return (this.policy & POLICY_INNER_MAP_SORTED_MASK) == POLICY_INNER_MAP_SORTED_ASCENDING;
-	}
-
-	private boolean shouldUseSingletonInnerMap() {
-		return (this.policy & POLICY_INNER_MAP_ENSURE_SINGLETON) == POLICY_INNER_MAP_ENSURE_SINGLETON;
-	}
-
-	private static class ValueComparator implements Comparator, Serializable {
-		private static final long serialVersionUID = 362497720873186266L;
-		private boolean ascending;
-
-		public ValueComparator(boolean ascending) {
-			this.ascending = ascending;
-		}
-
-		/* (non-Javadoc)
-		 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-		 */
-		public int compare(Object o1, Object o2) {
-			try {
-				if (o1 instanceof Comparable) {
-					int cmp = ((Comparable) o1).compareTo(o2);
-					return this.ascending ? cmp : (0 - cmp);
-				}
-			} catch (Exception e) {
-				// Ignore
-			}
-			return 1;
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
index 5ca20c9..a21c0d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
@@ -16,6 +16,8 @@ Director_Task_Resolving_Dependencies=Calculating requirements and dependencies.
 Director_Unsatisfied_Dependencies=\
 Cannot complete the install because some dependencies are not satisfiable
 Director_error_applying_configuration=Unexpected failure applying configuration after for the installer plan execution.
+Director_For_Target = The following software cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation.
+Director_For_Target_Unselect_Required = If provisioning a target platform then try disabling the option 'Include required software'
 
 Explanation_alreadyInstalled=Software currently installed: {0}
 Explanation_from=From: {0}
@@ -23,7 +25,10 @@ Explanation_fromPatch=From Patch: {0}
 Explanation_hardDependency=Cannot satisfy dependency: {0} depends on: {1}
 Explanation_patchedHardDependency=Cannot satisfy patched ({0}) dependency: {1} depends on: {2}
 Explanation_missingRequired=Missing requirement: {0} requires ''{1}'' but it could not be found
+Explanation_missingRootRequired=You requested to install ''{0}'' but it could not be found
+Explanation_missingNonGreedyRequired=Missing non greedy requirement: ''{0}'' is required non greedily but it could not be found
 Explanation_missingRequiredFilter=Missing requirement for filter {0}: {1} requires ''{2}'' but it could not be found
+Explanation_missingRootFilter={0} cannot be installed in this environment because its filter is not applicable.
 Explanation_optionalDependency=Optional dependency
 Explanation_rootMissing=Cannot complete the install because one or more required items could not be found.
 Explanation_rootSingleton=Cannot complete the install because of a conflicting dependency.
@@ -41,4 +46,6 @@ Planner_Unexpected_problem=An unexpected error occurred while resolving.
 Planner_actions_and_software_incompatible=The actions required to successfully install the requested software are incompatible with the software to install. 
 Planner_can_not_install_preq=The actions required to successfully install the requested software can not be installed. 
 Planner_no_profile_registry=Profile Registry is not registered.
-Planner_profile_out_of_sync=The copies of profile {0} are not in sync.
\ No newline at end of file
+Planner_profile_out_of_sync=The copies of profile {0} are not in sync.
+Planner_no_installer_agent=Problems resolving meta requirements while installing in profile {0}. 
+RequestStatus_message=Plan status for {0}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
index f9ac500..f957427 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
@@ -7,21 +7,23 @@
  * 
  *  Contributors:
  *      IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.rollback;
 
+import org.eclipse.equinox.p2.query.QueryUtil;
+
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.equinox.internal.p2.director.SimplePlanner;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
 
 public class FormerState {
 
-	public static ProfileChangeRequest generateProfileDeltaChangeRequest(IProfile current, IProfile target) {
+	public static IProfileChangeRequest generateProfileDeltaChangeRequest(IProfile current, IProfile target) {
 		ProfileChangeRequest request = new ProfileChangeRequest(current);
 
 		synchronizeProfileProperties(request, current, target);
@@ -31,81 +33,73 @@ public class FormerState {
 		return request;
 	}
 
-	private static void synchronizeAllIUProperties(ProfileChangeRequest request, IProfile current, IProfile target) {
-		Collection currentIUs = current.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection();
-		Collection targetIUs = target.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection();
-		List iusToAdd = new ArrayList(targetIUs);
-		iusToAdd.remove(currentIUs);
+	private static void synchronizeAllIUProperties(IProfileChangeRequest request, IProfile current, IProfile target) {
+		Set<IInstallableUnit> currentIUset = current.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet();
+		Iterator<IInstallableUnit> targetIUs = target.query(QueryUtil.createIUAnyQuery(), null).iterator();
+		List<IInstallableUnit> iusToAdd = new ArrayList<IInstallableUnit>();
+		List<IInstallableUnit> iusToUpdate = new ArrayList<IInstallableUnit>();
+		while (targetIUs.hasNext()) {
+			IInstallableUnit nxt = targetIUs.next();
+			if (currentIUset.contains(nxt))
+				iusToUpdate.add(nxt);
+			else
+				iusToAdd.add(nxt);
+		}
 
 		//additions
-		for (Iterator iterator = iusToAdd.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			for (Iterator it = target.getInstallableUnitProperties(iu).entrySet().iterator(); it.hasNext();) {
-				Entry entry = (Entry) it.next();
-				String key = (String) entry.getKey();
-				String value = (String) entry.getValue();
-				request.setInstallableUnitProfileProperty(iu, key, value);
+		for (IInstallableUnit iu : iusToAdd) {
+			for (Entry<String, String> entry : target.getInstallableUnitProperties(iu).entrySet()) {
+				request.setInstallableUnitProfileProperty(iu, entry.getKey(), entry.getValue());
 			}
 		}
 
 		// updates
-		List iusToUpdate = new ArrayList(targetIUs);
-		iusToUpdate.remove(iusToAdd);
-		for (Iterator iterator = iusToUpdate.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			Map propertiesToSet = new HashMap(target.getInstallableUnitProperties(iu));
-			for (Iterator it = current.getInstallableUnitProperties(iu).entrySet().iterator(); it.hasNext();) {
-				Entry entry = (Entry) it.next();
-				String key = (String) entry.getKey();
-				String newValue = (String) propertiesToSet.get(key);
+		for (IInstallableUnit iu : iusToUpdate) {
+			Map<String, String> propertiesToSet = new HashMap<String, String>(target.getInstallableUnitProperties(iu));
+			for (Entry<String, String> entry : current.getInstallableUnitProperties(iu).entrySet()) {
+				String key = entry.getKey();
+				String newValue = propertiesToSet.get(key);
 				if (newValue == null) {
 					request.removeInstallableUnitProfileProperty(iu, key);
 				} else if (newValue.equals(entry.getValue()))
 					propertiesToSet.remove(key);
 			}
 
-			for (Iterator it = propertiesToSet.entrySet().iterator(); it.hasNext();) {
-				Entry entry = (Entry) it.next();
-				String key = (String) entry.getKey();
-				String value = (String) entry.getValue();
-				request.setInstallableUnitProfileProperty(iu, key, value);
+			for (Entry<String, String> entry : propertiesToSet.entrySet()) {
+				request.setInstallableUnitProfileProperty(iu, entry.getKey(), entry.getValue());
 			}
 		}
 	}
 
-	private static void synchronizeMarkedIUs(ProfileChangeRequest request, IProfile current, IProfile target) {
-		IInstallableUnit[] currentPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(current);
-		IInstallableUnit[] targetPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(target);
+	private static void synchronizeMarkedIUs(IProfileChangeRequest request, IProfile current, IProfile target) {
+		Collection<IInstallableUnit> currentPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(current);
+		Collection<IInstallableUnit> targetPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(target);
 
 		//additions
-		List markedIUsToAdd = new ArrayList(Arrays.asList(targetPlannerMarkedIUs));
-		markedIUsToAdd.removeAll(Arrays.asList(currentPlannerMarkedIUs));
-		request.addInstallableUnits((IInstallableUnit[]) markedIUsToAdd.toArray(new IInstallableUnit[markedIUsToAdd.size()]));
+		Collection<IInstallableUnit> markedIUsToAdd = new HashSet<IInstallableUnit>(targetPlannerMarkedIUs);
+		markedIUsToAdd.removeAll(currentPlannerMarkedIUs);
+		request.addAll(markedIUsToAdd);
 
 		// removes
-		List markedIUsToRemove = new ArrayList(Arrays.asList(currentPlannerMarkedIUs));
-		markedIUsToRemove.removeAll(Arrays.asList(targetPlannerMarkedIUs));
-		request.removeInstallableUnits((IInstallableUnit[]) markedIUsToRemove.toArray(new IInstallableUnit[markedIUsToRemove.size()]));
+		Collection<IInstallableUnit> markedIUsToRemove = new HashSet<IInstallableUnit>(currentPlannerMarkedIUs);
+		markedIUsToRemove.removeAll(targetPlannerMarkedIUs);
+		request.removeAll(markedIUsToRemove);
 	}
 
-	private static void synchronizeProfileProperties(ProfileChangeRequest request, IProfile current, IProfile target) {
-		Map profilePropertiesToSet = new HashMap(target.getProperties());
-		for (Iterator it = current.getProperties().entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			String key = (String) entry.getKey();
+	private static void synchronizeProfileProperties(IProfileChangeRequest request, IProfile current, IProfile target) {
+		Map<String, String> profilePropertiesToSet = new HashMap<String, String>(target.getProperties());
+		for (Entry<String, String> entry : current.getProperties().entrySet()) {
+			String key = entry.getKey();
 
-			String newValue = (String) profilePropertiesToSet.get(key);
+			String newValue = profilePropertiesToSet.get(key);
 			if (newValue == null) {
 				request.removeProfileProperty(key);
 			} else if (newValue.equals(entry.getValue()))
 				profilePropertiesToSet.remove(key);
 		}
 
-		for (Iterator it = profilePropertiesToSet.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			String key = (String) entry.getKey();
-			String value = (String) entry.getValue();
-			request.setProfileProperty(key, value);
+		for (Entry<String, String> entry : profilePropertiesToSet.entrySet()) {
+			request.setProfileProperty(entry.getKey(), entry.getValue());
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java
index 6201888..585c89c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java
@@ -12,8 +12,8 @@ package org.eclipse.equinox.internal.provisional.p2.director;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
 
 /**
  * Directors are responsible for determining what should be done to a given 
@@ -28,6 +28,11 @@ import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
 public interface IDirector {
 
 	/**
+	 * Service name constant for the director service.
+	 */
+	public static final String SERVICE_NAME = IDirector.class.getName();
+
+	/**
 	 * performs the change request with the given context.
 	 * 
 	 * @param profileChangeRequest The change request
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java
deleted file mode 100644
index 6f5b1f6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IPlanner.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-/**
- * Planners are responsible for determining what should be done to a given 
- * profile to reshape it as requested. That is, given the current state of a 
- * profile, a description of the desired end state of that profile and metadata 
- * describing the available IUs, a planner produces a plan that lists the
- * provisioning operands that the engine should perform.  
- */
-public interface IPlanner {
-	public ProvisioningPlan getProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor);
-
-	public IInstallableUnit[] updatesFor(IInstallableUnit toUpdate, ProvisioningContext context, IProgressMonitor monitor);
-
-	public ProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor);
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java
index 0f9ab37..ed2d8e3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java
@@ -16,19 +16,19 @@ import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.director.DirectorActivator;
 import org.eclipse.equinox.internal.p2.director.Messages;
 import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
+import org.eclipse.equinox.p2.engine.*;
 
 public class PlanExecutionHelper {
-	public static IStatus executePlan(ProvisioningPlan result, IEngine engine, ProvisioningContext context, IProgressMonitor progress) {
-		return executePlan(result, engine, new DefaultPhaseSet(), context, progress);
+	public static IStatus executePlan(IProvisioningPlan result, IEngine engine, ProvisioningContext context, IProgressMonitor progress) {
+		return executePlan(result, engine, PhaseSetFactory.createDefaultPhaseSet(), context, progress);
 	}
 
-	public static IStatus executePlan(ProvisioningPlan result, IEngine engine, PhaseSet phaseSet, ProvisioningContext context, IProgressMonitor progress) {
+	public static IStatus executePlan(IProvisioningPlan result, IEngine engine, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor progress) {
 		if (!result.getStatus().isOK())
 			return result.getStatus();
 
 		if (result.getInstallerPlan() != null) {
-			IStatus installerPlanStatus = engine.perform(result.getInstallerPlan().getProfileChangeRequest().getProfile(), phaseSet, result.getInstallerPlan().getOperands(), context, progress);
+			IStatus installerPlanStatus = ((IEngine) result.getInstallerPlan().getProfile().getProvisioningAgent().getService(IEngine.SERVICE_NAME)).perform(result.getInstallerPlan(), phaseSet, progress);
 			if (!installerPlanStatus.isOK())
 				return installerPlanStatus;
 			Configurator configChanger = (Configurator) ServiceHelper.getService(DirectorActivator.context, Configurator.class.getName());
@@ -38,6 +38,6 @@ public class PlanExecutionHelper {
 				return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_error_applying_configuration, e);
 			}
 		}
-		return engine.perform(result.getProfileChangeRequest().getProfile(), phaseSet, result.getOperands(), context, progress);
+		return engine.perform(result, phaseSet, progress);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanVerifier.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanVerifier.java
new file mode 100644
index 0000000..5231685
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanVerifier.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.provisional.p2.director;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+
+/**
+ * Verifier is responsible for checking plan sanity
+ */
+public abstract class PlanVerifier {
+	/**
+	 * Verifies provisioning plan from P2 solver
+	 */
+	public abstract IStatus verify(IProvisioningPlan plan);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerHelper.java
deleted file mode 100644
index 6cac100..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerHelper.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class PlannerHelper {
-	public static String createOptionalInclusionRule(IInstallableUnit iu) {
-		return "OPTIONAL"; //$NON-NLS-1$
-	}
-
-	public static String createStrictInclusionRule(IInstallableUnit iu) {
-		return "STRICT"; //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
new file mode 100644
index 0000000..b4b8306
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
@@ -0,0 +1,117 @@
+package org.eclipse.equinox.internal.provisional.p2.director;
+
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.*;
+
+public class PlannerStatus implements IStatus {
+
+	private final IStatus status;
+	private final RequestStatus globalRequestStatus;
+	private final Map<IInstallableUnit, RequestStatus> requestChanges;
+	private final Map<IInstallableUnit, RequestStatus> requestSideEffects;
+	private final IQueryable<IInstallableUnit> plannedState;
+
+	private static final IQueryable<IInstallableUnit> EMPTY_IU_QUERYABLE = new IQueryable<IInstallableUnit>() {
+		public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			return Collector.emptyCollector();
+		}
+	};
+
+	public PlannerStatus(IStatus status, RequestStatus globalRequestStatus, Map<IInstallableUnit, RequestStatus> requestChanges, Map<IInstallableUnit, RequestStatus> requestSideEffects, IQueryable<IInstallableUnit> plannedState) {
+		this.status = status;
+		this.globalRequestStatus = globalRequestStatus;
+		this.requestChanges = requestChanges;
+		this.requestSideEffects = requestSideEffects;
+		this.plannedState = (plannedState == null) ? EMPTY_IU_QUERYABLE : plannedState;
+	}
+
+	/**
+	 * Returns a request status object containing additional global details on the planning of the request
+	 * 
+	 * @return An IStatus object with global details on the planning process
+	 */
+	public RequestStatus getRequestStatus() {
+		return globalRequestStatus;
+	}
+
+	/**
+	 * Returns a map of the problems associated with changes to the given installable unit
+	 * in this plan. A status with severity {@link IStatus#OK} is returned if the unit
+	 * can be provisioned successfully
+	 * 
+	 * @return A map of {@link IInstallableUnit} to {@link IStatus} of the requested 
+	 * changes and their corresponding explanation.
+	 */
+	public Map<IInstallableUnit, RequestStatus> getRequestChanges() {
+		return requestChanges;
+	}
+
+	/**
+	 * Returns a map of side-effects that will occur as a result of the plan being executed.
+	 * Side-effects of an install may include:
+	 * <ul>
+	 * <li>Optional software being installed that will become satisfied once the plan
+	 * is executed.</li>
+	 * <li>Optional software currently in the profile that will be uninstalled as a result
+	 * of the plan being executed. This occurs when the optional software has dependencies
+	 * that are incompatible with the software being installed.
+	 * This includes additional software that will be installed as a result of the change,
+	 * or optional changes and their corresponding explanation.
+	 * @return A map of {@link IInstallableUnit} to {@link IStatus} of the additional side effect
+	 * status, or <code>null</code> if there are no side effects.
+	 */
+	public Map<IInstallableUnit, RequestStatus> getRequestSideEffects() {
+		return requestSideEffects;
+	}
+
+	/**
+	 * Returns the set of InstallableUnits that make up the expected planned state in terms 
+	 * of additions and removals to the profile based on the planning process. 
+	 * 
+	 * @return An IQueryable of the InstallableUnits in the planned state. 
+	 */
+	public IQueryable<IInstallableUnit> getPlannedState() {
+		return plannedState;
+	}
+
+	// Remaining Methods Delegate to wrapped Status 
+	public IStatus[] getChildren() {
+		return status.getChildren();
+	}
+
+	public int getCode() {
+		return status.getCode();
+	}
+
+	public Throwable getException() {
+		return status.getException();
+	}
+
+	public String getMessage() {
+		return status.getMessage();
+	}
+
+	public String getPlugin() {
+		return status.getPlugin();
+	}
+
+	public int getSeverity() {
+		return status.getSeverity();
+	}
+
+	public boolean isMultiStatus() {
+		return status.isMultiStatus();
+	}
+
+	public boolean isOK() {
+		return status.isOK();
+	}
+
+	public boolean matches(int severityMask) {
+		return status.matches(severityMask);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
index 99f2672..ac2ee18 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProfileChangeRequest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,28 +7,41 @@
  * 
  *  Contributors:
  *      IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.director;
 
 import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.director.Messages;
+import org.eclipse.equinox.internal.p2.director.SimplePlanner;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
 
-public class ProfileChangeRequest implements Cloneable {
+/**
+ * @noreference This class was unintentionally left in the provisional API package and
+ * 	is intended to be made internal in Eclipse 3.7. Clients should create and manipulate 
+ * 	profile change requests via the API {@link IPlanner#createChangeRequest(IProfile)}
+ * 	and methods on {@link IProfileChangeRequest}.
+ */
+public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
 
 	private final IProfile profile;
-	private ArrayList iusToRemove = null; // list of ius to remove
-	private ArrayList iusToAdd = null; // list of ius to add
-	private ArrayList propertiesToRemove = null; // list of keys for properties to be removed
-	private HashMap propertiesToAdd = null; // map of key->value for properties to be added
-	private HashMap iuPropertiesToAdd = null; // map iu->map of key->value pairs for properties to be added for an iu
-	private HashMap iuPropertiesToRemove = null; // map of iu->list of property keys to be removed for an iu
-
-	public static ProfileChangeRequest createByProfileId(String profileId) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(DirectorActivator.context, IProfileRegistry.class.getName());
+	private ArrayList<IInstallableUnit> iusToRemove = null; // list of ius to remove
+	private ArrayList<IInstallableUnit> iusToAdd = null; // list of ius to add
+	private ArrayList<String> propertiesToRemove = null; // list of keys for properties to be removed
+	private HashMap<String, String> propertiesToAdd = null; // map of key->value for properties to be added
+	private HashMap<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = null; // map iu->map of key->value pairs for properties to be added for an iu
+	private HashMap<IInstallableUnit, List<String>> iuPropertiesToRemove = null; // map of iu->list of property keys to be removed for an iu
+	private ArrayList<IRequirement> additionalRequirements;
+
+	public static ProfileChangeRequest createByProfileId(IProvisioningAgent agent, String profileId) {
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (profileRegistry == null)
 			throw new IllegalStateException(Messages.Planner_no_profile_registry);
 		IProfile profile = profileRegistry.getProfile(profileId);
@@ -38,20 +51,23 @@ public class ProfileChangeRequest implements Cloneable {
 	}
 
 	public ProfileChangeRequest(IProfile profile) {
+		this.profile = profile;
+	}
+
+	public void setProfile(IProfile profile) {
 		if (profile == null)
 			throw new IllegalArgumentException("Profile cannot be null."); //$NON-NLS-1$
-		this.profile = profile;
 	}
 
 	public IProfile getProfile() {
 		return profile;
 	}
 
-	public Map getProfileProperties() {
-		Map result = new HashMap(profile.getProperties());
+	public Map<String, String> getProfileProperties() {
+		Map<String, String> result = new HashMap<String, String>(profile.getProperties());
 		if (propertiesToRemove != null) {
-			for (Iterator it = propertiesToRemove.iterator(); it.hasNext();) {
-				result.remove(it.next());
+			for (String key : propertiesToRemove) {
+				result.remove(key);
 			}
 		}
 		if (propertiesToAdd != null)
@@ -60,125 +76,206 @@ public class ProfileChangeRequest implements Cloneable {
 		return result;
 	}
 
-	public void addInstallableUnits(IInstallableUnit[] toInstall) {
+	//done
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#addInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+	 */
+	public void add(IInstallableUnit toInstall) {
 		if (iusToAdd == null)
-			iusToAdd = new ArrayList(toInstall.length);
+			iusToAdd = new ArrayList<IInstallableUnit>();
+		iusToAdd.add(toInstall);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#addInstallableUnits(java.util.Collection)
+	 */
+	public void addAll(Collection<IInstallableUnit> toInstall) {
+		for (IInstallableUnit iu : toInstall)
+			add(iu);
+	}
+
+	public void addInstallableUnits(IInstallableUnit... toInstall) {
 		for (int i = 0; i < toInstall.length; i++)
-			iusToAdd.add(toInstall[i]);
+			add(toInstall[i]);
 	}
 
-	public void removeInstallableUnits(IInstallableUnit[] toUninstall) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+	 */
+	public void remove(IInstallableUnit toUninstall) {
 		if (iusToRemove == null)
-			iusToRemove = new ArrayList(toUninstall.length);
+			iusToRemove = new ArrayList<IInstallableUnit>();
+		iusToRemove.add(toUninstall);
+	}
+
+	public void removeInstallableUnits(IInstallableUnit[] toUninstall) {
 		for (int i = 0; i < toUninstall.length; i++)
-			iusToRemove.add(toUninstall[i]);
+			remove(toUninstall[i]);
 	}
 
-	public void setProfileProperty(String key, Object value) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnits(java.util.Collection)
+	 */
+	public void removeAll(Collection<IInstallableUnit> toUninstall) {
+		for (IInstallableUnit iu : toUninstall)
+			remove(iu);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setProfileProperty(java.lang.String, java.lang.String)
+	 */
+	public void setProfileProperty(String key, String value) {
 		if (propertiesToAdd == null)
-			propertiesToAdd = new HashMap();
+			propertiesToAdd = new HashMap<String, String>();
 		propertiesToAdd.put(key, value);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeProfileProperty(java.lang.String)
+	 */
 	public void removeProfileProperty(String key) {
 		if (propertiesToRemove == null)
-			propertiesToRemove = new ArrayList(1);
+			propertiesToRemove = new ArrayList<String>(1);
 		propertiesToRemove.add(key);
 	}
 
-	public void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, Object value) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setInstallableUnitProfileProperty(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String, java.lang.String)
+	 */
+	public void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value) {
 		if (iuPropertiesToAdd == null)
-			iuPropertiesToAdd = new HashMap();
-		Map properties = (Map) iuPropertiesToAdd.get(iu);
+			iuPropertiesToAdd = new HashMap<IInstallableUnit, Map<String, String>>();
+		Map<String, String> properties = iuPropertiesToAdd.get(iu);
 		if (properties == null) {
-			properties = new HashMap();
+			properties = new HashMap<String, String>();
 			iuPropertiesToAdd.put(iu, properties);
 		}
 		properties.put(key, value);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnitProfileProperty(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String)
+	 */
 	public void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key) {
 		if (iuPropertiesToRemove == null)
-			iuPropertiesToRemove = new HashMap();
-		List keys = (List) iuPropertiesToRemove.get(iu);
+			iuPropertiesToRemove = new HashMap<IInstallableUnit, List<String>>();
+		List<String> keys = iuPropertiesToRemove.get(iu);
 		if (keys == null) {
-			keys = new ArrayList();
+			keys = new ArrayList<String>();
 			iuPropertiesToRemove.put(iu, keys);
 		}
-		keys.add(key);
+		if (!keys.contains(key))
+			keys.add(key);
 	}
 
-	public IInstallableUnit[] getRemovedInstallableUnits() {
+	public Collection<IInstallableUnit> getRemovals() {
 		if (iusToRemove == null)
-			return new IInstallableUnit[0];
-		return (IInstallableUnit[]) iusToRemove.toArray(new IInstallableUnit[iusToRemove.size()]);
+			return CollectionUtils.emptyList();
+		return Collections.unmodifiableList(iusToRemove);
 	}
 
-	public IInstallableUnit[] getAddedInstallableUnits() {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#getAddedInstallableUnits()
+	 */
+	public Collection<IInstallableUnit> getAdditions() {
 		if (iusToAdd == null)
-			return new IInstallableUnit[0];
-		return (IInstallableUnit[]) iusToAdd.toArray(new IInstallableUnit[iusToAdd.size()]);
+			return CollectionUtils.emptyList();
+		return Collections.unmodifiableList(iusToAdd);
 	}
 
 	// String [key, key, key] names of properties to remove
 	public String[] getPropertiesToRemove() {
 		if (propertiesToRemove == null)
 			return new String[0];
-		return (String[]) propertiesToRemove.toArray(new String[propertiesToRemove.size()]);
+		return propertiesToRemove.toArray(new String[propertiesToRemove.size()]);
 	}
 
 	// map of key value pairs
-	public Map getPropertiesToAdd() {
+	public Map<String, String> getPropertiesToAdd() {
 		if (propertiesToAdd == null)
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 		return propertiesToAdd;
 	}
 
 	// map of iu->list of property keys to be removed for an iu	
-	public Map getInstallableUnitProfilePropertiesToRemove() {
+	public Map<IInstallableUnit, List<String>> getInstallableUnitProfilePropertiesToRemove() {
 		if (iuPropertiesToRemove == null)
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 		return iuPropertiesToRemove;
 	}
 
 	// TODO This can be represented and returned in whatever way makes most sense for planner/engine
 	// map iu->map of key->value pairs for properties to be added for an iu
-	public Map getInstallableUnitProfilePropertiesToAdd() {
+	public Map<IInstallableUnit, Map<String, String>> getInstallableUnitProfilePropertiesToAdd() {
 		if (iuPropertiesToAdd == null)
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 		return iuPropertiesToAdd;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#setInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit, java.lang.String)
+	 */
 	public void setInstallableUnitInclusionRules(IInstallableUnit iu, String value) {
-		if (iuPropertiesToAdd == null)
-			iuPropertiesToAdd = new HashMap();
-		Map properties = (Map) iuPropertiesToAdd.get(iu);
-		if (properties == null) {
-			properties = new HashMap();
-			iuPropertiesToAdd.put(iu, properties);
-		}
-		properties.put(SimplePlanner.INCLUSION_RULES, value);
+		setInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES, value);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#removeInstallableUnitInclusionRules(org.eclipse.equinox.p2.metadata.IInstallableUnit)
+	 */
 	public void removeInstallableUnitInclusionRules(IInstallableUnit iu) {
-		if (iuPropertiesToRemove == null)
-			iuPropertiesToRemove = new HashMap();
-		List keys = (List) iuPropertiesToRemove.get(iu);
-		if (keys == null) {
-			keys = new ArrayList();
-			iuPropertiesToRemove.put(iu, keys);
-		}
-		keys.add(SimplePlanner.INCLUSION_RULES);
+		removeInstallableUnitProfileProperty(iu, SimplePlanner.INCLUSION_RULES);
 	}
 
+	@SuppressWarnings("unchecked")
 	public Object clone() {
 		ProfileChangeRequest result = new ProfileChangeRequest(profile);
-		result.iusToRemove = iusToRemove == null ? null : (ArrayList) iusToRemove.clone();
-		result.iusToAdd = iusToAdd == null ? null : (ArrayList) iusToAdd.clone();
-		result.propertiesToRemove = propertiesToRemove == null ? null : (ArrayList) propertiesToRemove.clone();
-		result.propertiesToAdd = propertiesToAdd == null ? null : (HashMap) propertiesToAdd.clone();
-		result.iuPropertiesToAdd = iuPropertiesToAdd == null ? null : (HashMap) iuPropertiesToAdd.clone();
-		result.iuPropertiesToRemove = iuPropertiesToRemove == null ? null : (HashMap) iuPropertiesToRemove.clone();
+		result.iusToRemove = iusToRemove == null ? null : (ArrayList<IInstallableUnit>) iusToRemove.clone();
+		result.iusToAdd = iusToAdd == null ? null : (ArrayList<IInstallableUnit>) iusToAdd.clone();
+		result.propertiesToRemove = propertiesToRemove == null ? null : (ArrayList<String>) propertiesToRemove.clone();
+		result.propertiesToAdd = propertiesToAdd == null ? null : (HashMap<String, String>) propertiesToAdd.clone();
+		result.iuPropertiesToAdd = iuPropertiesToAdd == null ? null : (HashMap<IInstallableUnit, Map<String, String>>) iuPropertiesToAdd.clone();
+		result.iuPropertiesToRemove = iuPropertiesToRemove == null ? null : (HashMap<IInstallableUnit, List<String>>) iuPropertiesToRemove.clone();
+		result.additionalRequirements = additionalRequirements == null ? null : (ArrayList<IRequirement>) additionalRequirements.clone();
 		return result;
 	}
+
+	public String toString() {
+		StringBuffer result = new StringBuffer(1000);
+		result.append("==Profile change request for "); //$NON-NLS-1$
+		result.append(profile.getProfileId());
+		result.append('\n');
+		if (iusToAdd != null) {
+			result.append("==Additions=="); //$NON-NLS-1$
+			result.append('\n');
+			for (IInstallableUnit iu : iusToAdd) {
+				result.append('\t');
+				result.append(iu);
+				result.append('\n');
+			}
+		}
+		if (iusToRemove != null) {
+			result.append("==Removals=="); //$NON-NLS-1$
+			result.append('\n');
+			for (IInstallableUnit iu : iusToRemove) {
+				result.append('\t');
+				result.append(iu);
+				result.append('\n');
+			}
+		}
+		return result.toString();
+	}
+
+	public void addExtraRequirements(Collection<IRequirement> requirements) {
+		if (additionalRequirements == null)
+			additionalRequirements = new ArrayList<IRequirement>(requirements.size());
+		additionalRequirements.addAll(requirements);
+	}
+
+	public Collection<IRequirement> getExtraRequirements() {
+		return additionalRequirements;
+	}
+
+	public void clearExtraRequirements() {
+		additionalRequirements = null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProvisioningPlan.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProvisioningPlan.java
deleted file mode 100644
index e57d534..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/ProvisioningPlan.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.engine.InstallableUnitOperand;
-import org.eclipse.equinox.internal.provisional.p2.engine.Operand;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-
-public class ProvisioningPlan {
-	IStatus status;
-	Operand[] operands;
-	Map actualChangeRequest;
-	Map sideEffectChanges;
-	ProvisioningPlan installerPlan;
-	RequestStatus globalRequestStatus;
-	ProfileChangeRequest originalChangeRequest;
-
-	public ProvisioningPlan(IStatus status, ProfileChangeRequest originalRequest, ProvisioningPlan installerPlan) {
-		this(status, new Operand[0], null, null, installerPlan, originalRequest);
-	}
-
-	public ProvisioningPlan(IStatus status, Operand[] operands, Map[] actualChangeRequest, RequestStatus globalStatus, ProvisioningPlan installerPlan, ProfileChangeRequest originalRequest) {
-		this.status = status;
-		this.operands = operands;
-		if (actualChangeRequest != null) {
-			this.actualChangeRequest = actualChangeRequest[0];
-			this.sideEffectChanges = actualChangeRequest[1];
-		}
-		this.globalRequestStatus = globalStatus;
-		this.installerPlan = installerPlan;
-		originalChangeRequest = originalRequest;
-	}
-
-	public IStatus getStatus() {
-		return status;
-	}
-
-	public ProfileChangeRequest getProfileChangeRequest() {
-		return originalChangeRequest;
-	}
-
-	/**
-	 * The operands to pass to the engine.
-	 * @return the operands to be executed. This may be an empty array if the
-	 * plan has errors or if there is nothing to do.
-	 */
-	public Operand[] getOperands() {
-		return operands;
-	}
-
-	public IQueryable getRemovals() {
-		return new QueryablePlan(false);
-	}
-
-	public IQueryable getAdditions() {
-		return new QueryablePlan(true);
-	}
-
-	public RequestStatus getRequestStatus(IInstallableUnit iu) {
-		if (actualChangeRequest == null)
-			return null;
-		return (RequestStatus) actualChangeRequest.get(iu);
-	}
-
-	public RequestStatus getRequestStatus() {
-		return globalRequestStatus;
-	}
-
-	public Map getSideEffectChanges() {
-		if (sideEffectChanges == null)
-			return Collections.EMPTY_MAP;
-		return sideEffectChanges;
-	}
-
-	private class QueryablePlan implements IQueryable {
-		private boolean addition;
-
-		public QueryablePlan(boolean add) {
-			this.addition = add;
-		}
-
-		public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-			if (operands == null || status.getSeverity() == IStatus.ERROR)
-				return collector;
-			Collection list = new ArrayList();
-			for (int i = 0; i < operands.length; i++) {
-				if (!(operands[i] instanceof InstallableUnitOperand))
-					continue;
-				InstallableUnitOperand op = ((InstallableUnitOperand) operands[i]);
-				IInstallableUnit iu = addition ? op.second() : op.first();
-				if (iu != null)
-					list.add(iu);
-			}
-			return query.perform(list.iterator(), collector);
-		}
-	}
-
-	public ProvisioningPlan getInstallerPlan() {
-		return installerPlan;
-	}
-
-	public void setInstallerPlan(ProvisioningPlan p) {
-		installerPlan = p;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java
index 42e5026..b1f6796 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java
@@ -10,33 +10,34 @@
 package org.eclipse.equinox.internal.provisional.p2.director;
 
 import java.util.*;
-import org.eclipse.equinox.internal.p2.director.Explanation;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.director.*;
 import org.eclipse.equinox.internal.p2.director.Explanation.IUInstalled;
 import org.eclipse.equinox.internal.p2.director.Explanation.IUToInstall;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
 
-public class RequestStatus {
+public class RequestStatus extends Status {
 	public static final byte ADDED = 0;
 	public static final byte REMOVED = 1;
 
 	private byte initialRequestType;
 	private IInstallableUnit iu;
-	private int severity;
-	private Set explanation;
+	private Set<Explanation> explanation;
 	private Explanation detailedExplanation;
-	private Set conflictingRootIUs;
-	private Set conflictingInstalledIUs;
+	private Set<IInstallableUnit> conflictingRootIUs;
+	private Set<IInstallableUnit> conflictingInstalledIUs;
 
-	public RequestStatus(IInstallableUnit iu, byte initialRequesType, int severity, Set explanation) {
+	public RequestStatus(IInstallableUnit iu, byte initialRequesType, int severity, Set<Explanation> explanation) {
+		super(severity, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.RequestStatus_message, iu));
 		this.iu = iu;
-		this.severity = severity;
 		this.initialRequestType = initialRequesType;
 		this.explanation = explanation;
-		conflictingRootIUs = new HashSet();
-		conflictingInstalledIUs = new HashSet();
+		conflictingRootIUs = new HashSet<IInstallableUnit>();
+		conflictingInstalledIUs = new HashSet<IInstallableUnit>();
 		if (explanation != null) {
-			Iterator iterator = explanation.iterator();
-			Object o = null;
+			Iterator<Explanation> iterator = explanation.iterator();
+			Explanation o = null;
 			while (iterator.hasNext() && ((o = iterator.next()) instanceof Explanation.IUToInstall)) {
 				conflictingRootIUs.add(((IUToInstall) o).iu);
 			}
@@ -46,7 +47,7 @@ public class RequestStatus {
 					conflictingInstalledIUs.add(((IUInstalled) o).iu);
 				}
 			}
-			detailedExplanation = (Explanation) o;
+			detailedExplanation = o;
 		}
 	}
 
@@ -58,24 +59,20 @@ public class RequestStatus {
 		return iu;
 	}
 
-	public int getSeverity() {
-		return severity;
-	}
-
 	//Return the already installed roots with which this IU is in conflict
 	//Return an empty set if there is no conflict
-	public Set getConflictsWithInstalledRoots() {
+	public Set<IInstallableUnit> getConflictsWithInstalledRoots() {
 		return conflictingRootIUs;
 	}
 
 	//Return the already installed roots with which this IU is in conflict
 	//Return an empty set if there is no conflict
-	public Set getConflictsWithAnyRoots() {
+	public Set<IInstallableUnit> getConflictsWithAnyRoots() {
 		return conflictingInstalledIUs;
 	}
 
 	//Return an explanation as to why this IU can not be resolved.
-	public Set getExplanations() {
+	public Set<Explanation> getExplanations() {
 		//To start with, this does not have to return the most specific explanation. If it simply returns an global explanation it is good enough.
 		return explanation;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
new file mode 100644
index 0000000..d852770
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.planner;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+/**
+ * Planners are responsible for determining what should be done to a given 
+ * profile to reshape it as requested. That is, given the current state of a 
+ * profile, a description of the desired changes to that profile and metadata 
+ * describing the available installable units, a planner produces a concrete plan that lists the
+ * exact steps that the engine should perform.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IPlanner {
+	/**
+	 * Service name constant for the planner service.
+	 */
+	public static final String SERVICE_NAME = IPlanner.class.getName();
+
+	/**
+	 * Returns a plan describing the set of changes that must be performed to
+	 * satisfy the given profile change request.
+	 * 
+	 * @param profileChangeRequest the request to be evaluated
+	 * @param context the context in which the request is processed
+	 * @param monitor a monitor on which planning
+	 * @return the plan representing the system that needs to be
+	 */
+	public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor);
+
+	public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor);
+
+	public IProfileChangeRequest createChangeRequest(IProfile profileToChange);
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients. 
+	 * You may want to consider using the org.eclipse.equinox.p2.operations.UpdateOperation class instead. 
+	 */
+	public IQueryResult<IInstallableUnit> updatesFor(IInstallableUnit iu, ProvisioningContext context, IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java
new file mode 100644
index 0000000..ecb953e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 Sonatype, Inc and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     Sonatype, Inc. - initial API and implementation
+ *     IBM Corporation - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.planner;
+
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+
+/**
+ *  A profile change request is a description of a set of changes that a client
+ *  would like to perform on a profile. The request is provided as input to an
+ *  {@link IPlanner}, which validates which of the requested changes can be
+ *  performed, and what other changes are required in order to make the profile
+ *  state consistent.
+ *
+ *  It is important to note that a change request can only be submitted once to the planner.
+ *  
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProfileChangeRequest {
+
+	/**
+	 * Causes the installation of the mentioned IU.
+	 * @param toInstall the entity to add to the profile
+	 */
+	public abstract void add(IInstallableUnit toInstall);
+
+	/**
+	 * Causes the installation of all the IUs mentioned
+	 * @param toInstall the installable units to be added to the profile
+	 */
+	public abstract void addAll(Collection<IInstallableUnit> toInstall);
+
+	/**
+	 * Requests the removal of the specified installable unit
+	 * 
+	 * @param toUninstall the installable units to be remove from the profile
+	 */
+	public abstract void remove(IInstallableUnit toUninstall);
+
+	/**
+	 * Requests the removal of all installable units in the provided collection
+	 * @param toUninstall the installable units to be remove from the profile
+	 */
+	public abstract void removeAll(Collection<IInstallableUnit> toUninstall);
+
+	/**
+	 * Add extra requirements that must be satisfied by the planner.
+	 * 
+	 * @param requirements the additional requirements
+	 */
+	public void addExtraRequirements(Collection<IRequirement> requirements);
+
+	/**
+	 * Associate an inclusion rule with the installable unit. An inclusion rule will dictate how
+	 * the installable unit is treated when its dependencies are not satisfied.
+	 * <p>
+	 * The provided inclusion rule must be one of the values specified in {@link ProfileInclusionRules}.
+	 * </p>
+	 * @param iu the installable unit to set an inclusion rule for
+	 * @param inclusionRule The inclusion rule.
+	 */
+	public abstract void setInstallableUnitInclusionRules(IInstallableUnit iu, String inclusionRule);
+
+	/**
+	 * Removes all inclusion rules associated with the given installable unit
+	 * 
+	 * @param iu the installable unit to remove inclusion rules for
+	 */
+	public abstract void removeInstallableUnitInclusionRules(IInstallableUnit iu);
+
+	/** 
+	 * Set a global property on the profile
+	 * 
+	 * @param key key of the property
+	 * @param value value of the property
+	 */
+	public abstract void setProfileProperty(String key, String value);
+
+	/** 
+	 * Remove a global property on the profile
+	 * 
+	 * @param key key of the property
+	 */
+	public abstract void removeProfileProperty(String key);
+
+	/** 
+	 * Associate a property with a given installable unit.
+	 * 
+	 * @param key key of the property
+	 * @param value value of the property
+	 */
+	public abstract void setInstallableUnitProfileProperty(IInstallableUnit iu, String key, String value);
+
+	/** 
+	 * Remove a property with a given installable unit.
+	 * @param iu The installable until to remove a property for
+	 * @param key key of the property
+	 */
+	public abstract void removeInstallableUnitProfileProperty(IInstallableUnit iu, String key);
+
+	/**
+	 *  Provide the set of installable units that have been requested for addition
+	 * @return a collection of the installable units to add
+	 */
+	public abstract Collection<IInstallableUnit> getAdditions();
+
+	/**
+	 *  Provide the set of installable units that have been requested for removal
+	 * @return a collection of the installable units to remove
+	 */
+	public abstract Collection<IInstallableUnit> getRemovals();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java
new file mode 100644
index 0000000..dda4a15
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *      Sonatype Inc - Refactoring
+ *******************************************************************************/
+package org.eclipse.equinox.p2.planner;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * Helper method to decide on the way the installable units are being included.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class ProfileInclusionRules {
+	private ProfileInclusionRules() {
+		//Can't instantiate profile inclusion rules
+	}
+
+	/**
+	 * Returns an inclusion rule to strictly install the given installable unit. Strictly
+	 * installed installable units will never be uninstalled in order to satisfy a
+	 * later profile change request. That is, when there is a dependency conflict
+	 * between a strictly installed unit and a non-strict unit, the strictly installed
+	 * installable unit will take precedence.
+	 * 
+	 * @param iu the installable unit to be installed.
+	 * @return an opaque token to be passed to the {@link IProfileChangeRequest#setInstallableUnitInclusionRules(IInstallableUnit, String)}
+	 */
+	public static String createStrictInclusionRule(IInstallableUnit iu) {
+		return "STRICT"; //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns an inclusion rule to optionally install the given installable unit. An optionally
+	 * installed installable unit will automatically be removed from the profile if any of
+	 * its dependencies become unsatisfied.
+	 * 
+	 * @param iu the installable unit to be installed.
+	 * @return an opaque token to be passed to the {@link IProfileChangeRequest#setInstallableUnitInclusionRules(IInstallableUnit, String)}
+	 */
+	public static String createOptionalInclusionRule(IInstallableUnit iu) {
+		return "OPTIONAL"; //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html
new file mode 100644
index 0000000..acb4d22
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides core support for interacting with a dependency resolution mechanism.
+<h2>
+Package Specification</h2>
+<p>
+This package specifies an API for performing dependency resolution of the p2 metadata. 
+</p>
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.classpath
index 6f3b481..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
index b94ca9b..925b1bf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
@@ -1,329 +1,329 @@
-#Thu Oct 09 08:15:15 EDT 2008
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+#Wed Dec 23 00:33:28 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
 org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
 org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_header=false
 org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
 org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
index d4994d8..208e370 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
@@ -1,33 +1,32 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.directorywatcher;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.directorywatcher;singleton:=true
+Bundle-Version: 1.0.203.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.provisional.p2.directorywatcher.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
+Export-Package: org.eclipse.equinox.internal.provisional.p2.directorywatcher;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
+ org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.metadata.expression,
  org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.publisher,
  org.eclipse.equinox.p2.publisher.actions,
  org.eclipse.equinox.p2.publisher.eclipse,
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.resolver;version="1.1.0",
  org.eclipse.osgi.util,
  org.osgi.framework;version="1.4.0",
- org.osgi.service.cm;version="1.2.0";resolution:=optional,
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.util.tracker;version="1.3.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.provisional.p2.directorywatcher;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
-Bundle-Activator: org.eclipse.equinox.internal.provisional.p2.directorywatcher.Activator
-Bundle-ActivationPolicy: lazy
+ org.osgi.service.packageadmin;version="1.2.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/build.properties
index dc77b9c..ca50309 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/build.properties
@@ -15,3 +15,5 @@ bin.includes = META-INF/,\
                about.html,\
                plugin.properties
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/pom.xml
new file mode 100644
index 0000000..7cec2ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.directorywatcher</artifactId>
+  <version>1.0.202.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
index 54c196c..05cd04b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
@@ -14,8 +14,9 @@ package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
 import java.io.File;
 import java.net.URI;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.osgi.framework.*;
 import org.osgi.service.packageadmin.PackageAdmin;
 
@@ -40,11 +41,11 @@ public class Activator implements BundleActivator {
 	}
 
 	public static IArtifactRepositoryManager getArtifactRepositoryManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(context, IArtifactRepositoryManager.class.getName());
+		return (IArtifactRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IArtifactRepositoryManager.SERVICE_NAME);
 	}
 
 	public static IMetadataRepositoryManager getMetadataRepositoryManager() {
-		return (IMetadataRepositoryManager) ServiceHelper.getService(context, IMetadataRepositoryManager.class.getName());
+		return (IMetadataRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IMetadataRepositoryManager.SERVICE_NAME);
 	}
 
 	public static URI getDefaultRepositoryLocation(Object object, String repositoryName) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
index 8abed29..574a856 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
@@ -14,46 +14,55 @@ import java.io.OutputStream;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
 
 public class CachingArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
 
 	private static final String NULL = ""; //$NON-NLS-1$
 	private IArtifactRepository innerRepo;
-	private Set descriptorsToAdd = new HashSet();
-	private Map artifactMap = new HashMap();
-	private Set descriptorsToRemove = new HashSet();
-	private Map propertyChanges = new HashMap();
+	private Set<IArtifactDescriptor> descriptorsToAdd = new HashSet<IArtifactDescriptor>();
+	private Map<IArtifactKey, List<IArtifactDescriptor>> artifactMap = new HashMap<IArtifactKey, List<IArtifactDescriptor>>();
+	private Set<IArtifactDescriptor> descriptorsToRemove = new HashSet<IArtifactDescriptor>();
+	private Map<String, String> propertyChanges = new HashMap<String, String>();
 
 	protected CachingArtifactRepository(IArtifactRepository innerRepo) {
 		this.innerRepo = innerRepo;
 	}
 
 	public void save() {
-		savePropertyChanges();
-		saveAdditions();
-		saveRemovals();
-	}
-
-	private void saveRemovals() {
-		for (Iterator i = descriptorsToRemove.iterator(); i.hasNext();)
-			innerRepo.removeDescriptor((IArtifactDescriptor) i.next());
+		innerRepo.executeBatch(new IRunnableWithProgress() {
+			public void run(IProgressMonitor monitor) {
+				savePropertyChanges();
+				saveAdditions();
+				saveRemovals();
+			}
+		}, null);
+	}
+
+	void saveRemovals() {
+		for (IArtifactDescriptor desc : descriptorsToRemove)
+			innerRepo.removeDescriptor(desc);
 		descriptorsToRemove.clear();
 	}
 
-	private void saveAdditions() {
+	void saveAdditions() {
 		if (descriptorsToAdd.isEmpty())
 			return;
-		innerRepo.addDescriptors((IArtifactDescriptor[]) descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
+		innerRepo.addDescriptors(descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
 		descriptorsToAdd.clear();
 		artifactMap.clear();
 	}
 
-	private void savePropertyChanges() {
-		for (Iterator i = propertyChanges.keySet().iterator(); i.hasNext();) {
-			String key = (String) i.next();
-			String value = (String) propertyChanges.get(key);
+	void savePropertyChanges() {
+		for (String key : propertyChanges.keySet()) {
+			String value = propertyChanges.get(key);
 			innerRepo.setProperty(key, value == NULL ? null : value);
 		}
 		propertyChanges.clear();
@@ -61,9 +70,9 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 
 	private void mapDescriptor(IArtifactDescriptor descriptor) {
 		IArtifactKey key = descriptor.getArtifactKey();
-		Collection descriptors = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> descriptors = artifactMap.get(key);
 		if (descriptors == null) {
-			descriptors = new ArrayList();
+			descriptors = new ArrayList<IArtifactDescriptor>();
 			artifactMap.put(key, descriptors);
 		}
 		descriptors.add(descriptor);
@@ -71,7 +80,7 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 
 	private void unmapDescriptor(IArtifactDescriptor descriptor) {
 		IArtifactKey key = descriptor.getArtifactKey();
-		Collection descriptors = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> descriptors = artifactMap.get(key);
 		if (descriptors == null) {
 			// we do not have the descriptor locally so remember it to be removed from
 			// the inner repo on save.
@@ -99,19 +108,12 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 	}
 
 	public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
-		Collection result = (Collection) artifactMap.get(key);
+		List<IArtifactDescriptor> result = artifactMap.get(key);
 		if (result == null)
 			return innerRepo.getArtifactDescriptors(key);
+		result = new ArrayList<IArtifactDescriptor>(result);
 		result.addAll(Arrays.asList(innerRepo.getArtifactDescriptors(key)));
-		return (IArtifactDescriptor[]) result.toArray(new IArtifactDescriptor[result.size()]);
-	}
-
-	public synchronized IArtifactKey[] getArtifactKeys() {
-		// there may be more descriptors than keys to collect up the unique keys
-		HashSet result = new HashSet();
-		result.addAll(artifactMap.keySet());
-		result.addAll(Arrays.asList(innerRepo.getArtifactKeys()));
-		return (IArtifactKey[]) result.toArray(new IArtifactKey[result.size()]);
+		return result.toArray(new IArtifactDescriptor[result.size()]);
 	}
 
 	public synchronized boolean contains(IArtifactDescriptor descriptor) {
@@ -139,7 +141,7 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 	}
 
 	public synchronized void removeAll() {
-		IArtifactDescriptor[] toRemove = (IArtifactDescriptor[]) descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]);
+		IArtifactDescriptor[] toRemove = descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]);
 		for (int i = 0; i < toRemove.length; i++)
 			doRemoveArtifact(toRemove[i]);
 	}
@@ -180,15 +182,23 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 		return innerRepo.getName();
 	}
 
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		// TODO need to combine the local and inner properties
 		return innerRepo.getProperties();
 	}
 
+	public String getProperty(String key) {
+		return innerRepo.getProperty(key);
+	}
+
 	public String getProvider() {
 		return innerRepo.getProvider();
 	}
 
+	public IProvisioningAgent getProvisioningAgent() {
+		return innerRepo.getProvisioningAgent();
+	}
+
 	public String getType() {
 		return innerRepo.getType();
 	}
@@ -201,24 +211,13 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 		return innerRepo.isModifiable();
 	}
 
-	public void setDescription(String description) {
-		innerRepo.setDescription(description);
-	}
-
-	public void setName(String name) {
-		innerRepo.setName(name);
-	}
-
 	public String setProperty(String key, String value) {
-		String result = (String) getProperties().get(key);
+		String result = getProperties().get(key);
 		propertyChanges.put(key, value == null ? NULL : value);
 		return result;
 	}
 
-	public void setProvider(String provider) {
-		innerRepo.setProvider(provider);
-	}
-
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		return innerRepo.getAdapter(adapter);
 	}
@@ -234,4 +233,47 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
 			return ((IFileArtifactRepository) innerRepo).getArtifactFile(descriptor);
 		return null;
 	}
+
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
+		return innerRepo.createArtifactDescriptor(key);
+	}
+
+	public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
+		return innerRepo.createArtifactKey(classifier, id, version);
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		final Collection<List<IArtifactDescriptor>> descs = artifactMap.values();
+		IQueryable<IArtifactDescriptor> cached = new IQueryable<IArtifactDescriptor>() {
+			public IQueryResult<IArtifactDescriptor> query(IQuery<IArtifactDescriptor> query, IProgressMonitor monitor) {
+				return query.perform(new CompoundIterator<IArtifactDescriptor>(descs.iterator()));
+			}
+		};
+
+		return QueryUtil.compoundQueryable(cached, innerRepo.descriptorQueryable());
+	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		final Iterator<IArtifactKey> keyIterator = artifactMap.keySet().iterator();
+		IQueryable<IArtifactKey> cached = new IQueryable<IArtifactKey>() {
+			public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> q, IProgressMonitor mon) {
+				return q.perform(keyIterator);
+			}
+		};
+
+		IQueryable<IArtifactKey> compound = QueryUtil.compoundQueryable(cached, innerRepo);
+		return compound.query(query, monitor);
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		try {
+			runnable.run(monitor);
+		} catch (OperationCanceledException oce) {
+			return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+		} catch (Exception e) {
+			return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+		}
+		return Status.OK_STATUS;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
index dea2d35..c47d076 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
@@ -62,14 +62,14 @@ public class DirectoryWatcher {
 	final File[] directories;
 
 	long poll = 2000;
-	private Set listeners = new HashSet();
-	private HashSet scannedFiles = new HashSet();
-	private HashSet removals;
-	private Set pendingDeletions;
+	private Set<DirectoryChangeListener> listeners = new HashSet<DirectoryChangeListener>();
+	private HashSet<File> scannedFiles = new HashSet<File>();
+	private HashSet<File> removals;
+	private Set<File> pendingDeletions;
 	private WatcherThread watcher;
 
-	public DirectoryWatcher(Dictionary properties, BundleContext context) {
-		String dir = (String) properties.get(DIR);
+	public DirectoryWatcher(Map<String, String> properties, BundleContext context) {
+		String dir = properties.get(DIR);
 		if (dir == null)
 			dir = "./load"; //$NON-NLS-1$
 
@@ -131,10 +131,10 @@ public class DirectoryWatcher {
 
 	private void startPoll() {
 		removals = scannedFiles;
-		scannedFiles = new HashSet();
-		pendingDeletions = new HashSet();
-		for (Iterator i = listeners.iterator(); i.hasNext();)
-			((DirectoryChangeListener) i.next()).startPoll();
+		scannedFiles = new HashSet<File>();
+		pendingDeletions = new HashSet<File>();
+		for (DirectoryChangeListener listener : listeners)
+			listener.startPoll();
 	}
 
 	private void scanDirectories() {
@@ -155,8 +155,7 @@ public class DirectoryWatcher {
 					// removed at the end.  Then notify all the listeners as needed.
 					scannedFiles.add(file);
 					removals.remove(file);
-					for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
-						DirectoryChangeListener listener = (DirectoryChangeListener) iterator.next();
+					for (DirectoryChangeListener listener : listeners) {
 						if (isInterested(listener, file))
 							processFile(file, listener);
 					}
@@ -168,8 +167,8 @@ public class DirectoryWatcher {
 	private void stopPoll() {
 		notifyRemovals();
 		removals = scannedFiles;
-		for (Iterator i = listeners.iterator(); i.hasNext();)
-			((DirectoryChangeListener) i.next()).stopPoll();
+		for (DirectoryChangeListener listener : listeners)
+			listener.stopPoll();
 		processPendingDeletions();
 	}
 
@@ -181,11 +180,9 @@ public class DirectoryWatcher {
 	 * Notify the listeners of the files that have been deleted or marked for deletion.
 	 */
 	private void notifyRemovals() {
-		Set removed = removals;
-		for (Iterator i = listeners.iterator(); i.hasNext();) {
-			DirectoryChangeListener listener = (DirectoryChangeListener) i.next();
-			for (Iterator j = removed.iterator(); j.hasNext();) {
-				File file = (File) j.next();
+		Set<File> removed = removals;
+		for (DirectoryChangeListener listener : listeners) {
+			for (File file : removed) {
 				if (isInterested(listener, file))
 					listener.removed(file);
 			}
@@ -213,8 +210,8 @@ public class DirectoryWatcher {
 	 * Try to remove the files that have been marked for deletion.
 	 */
 	private void processPendingDeletions() {
-		for (Iterator iterator = pendingDeletions.iterator(); iterator.hasNext();) {
-			File file = (File) iterator.next();
+		for (Iterator<File> iterator = pendingDeletions.iterator(); iterator.hasNext();) {
+			File file = iterator.next();
 			if (!file.exists() || file.delete())
 				iterator.remove();
 			new File(file.getPath() + DEL_EXT).delete();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
index 600681a..00b12b7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
@@ -10,16 +10,18 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
 
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.metadata.Version;
+
 import java.io.File;
 import java.net.URI;
+import java.util.HashMap;
 import java.util.Map;
-import java.util.Properties;
 import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 
 /**
  * Entry advice captures the name, location, modified time, shape etc of something
@@ -27,8 +29,8 @@ import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
  * only one entry at a time and that entry is the the only entry being published.  
  */
 public class EntryAdvice implements IPropertyAdvice {
-	private Properties metadataProps = new Properties();
-	private Properties artifactProps = new Properties();
+	private Map<String, String> metadataProps = new HashMap<String, String>();
+	private Map<String, String> artifactProps = new HashMap<String, String>();
 
 	public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
 		return true;
@@ -42,27 +44,23 @@ public class EntryAdvice implements IPropertyAdvice {
 		if (reference == null)
 			artifactProps.remove(RepositoryListener.ARTIFACT_REFERENCE);
 		else
-			artifactProps.setProperty(RepositoryListener.ARTIFACT_REFERENCE, reference.toString());
+			artifactProps.put(RepositoryListener.ARTIFACT_REFERENCE, reference.toString());
 		if (location.isDirectory())
-			artifactProps.setProperty(RepositoryListener.ARTIFACT_FOLDER, Boolean.TRUE.toString());
+			artifactProps.put(RepositoryListener.ARTIFACT_FOLDER, Boolean.TRUE.toString());
 		else
 			artifactProps.remove(RepositoryListener.ARTIFACT_FOLDER);
-		artifactProps.setProperty(RepositoryListener.FILE_NAME, location.getAbsolutePath());
-		metadataProps.setProperty(RepositoryListener.FILE_NAME, location.getAbsolutePath());
-		metadataProps.setProperty(RepositoryListener.FILE_LAST_MODIFIED, Long.toString(timestamp));
+		artifactProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
+		metadataProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
+		metadataProps.put(RepositoryListener.FILE_LAST_MODIFIED, Long.toString(timestamp));
 		if (linkFile != null)
-			metadataProps.setProperty(Site.PROP_LINK_FILE, linkFile);
-	}
-
-	public Map getInstructions(File location) {
-		return null;
+			metadataProps.put(Site.PROP_LINK_FILE, linkFile);
 	}
 
-	public Properties getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
+	public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
 		return artifactProps;
 	}
 
-	public Properties getInstallableUnitProperties(InstallableUnitDescription iu) {
+	public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu) {
 		return metadataProps;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
index 4b280a9..721a6d9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,25 +11,24 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.io.File;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
 import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.util.NLS;
 
@@ -38,12 +37,12 @@ public class RepositoryListener extends DirectoryChangeListener {
 	public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
 	public static final String FILE_LAST_MODIFIED = "file.lastModified"; //$NON-NLS-1$
 	public static final String FILE_NAME = "file.name"; //$NON-NLS-1$
-	private final IMetadataRepository metadataRepository;
-	private final CachingArtifactRepository artifactRepository;
+	private IMetadataRepository metadataRepository;
+	private CachingArtifactRepository artifactRepository;
 	// at any point in time currentFiles is the list of files/dirs that the watcher has seen and 
 	// believes to be on disk.
-	private final Map currentFiles = new HashMap();
-	private final Collection polledSeenFiles = new HashSet();
+	private final Map<File, Long> currentFiles = new HashMap<File, Long>();
+	private final Collection<File> polledSeenFiles = new HashSet<File>();
 
 	private EntryAdvice advice = new EntryAdvice();
 	private PublisherInfo info;
@@ -57,9 +56,22 @@ public class RepositoryListener extends DirectoryChangeListener {
 	 * @param hidden <code>true</code> if the repository should be hidden, <code>false</code> if not.
 	 */
 	public RepositoryListener(String repositoryName, boolean hidden) {
-		URI location = Activator.getDefaultRepositoryLocation(this, repositoryName);
-		metadataRepository = initializeMetadataRepository(repositoryName, location, hidden);
-		artifactRepository = initializeArtifactRepository(repositoryName, location, hidden);
+		Map<String, String> properties = null;
+		if (hidden) {
+			properties = new HashMap<String, String>();
+			properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
+		}
+		initialize(repositoryName, properties);
+	}
+
+	public RepositoryListener(String name, Map<String, String> properties) {
+		initialize(name, properties);
+	}
+
+	private void initialize(String name, Map<String, String> properties) {
+		URI location = Activator.getDefaultRepositoryLocation(this, name);
+		metadataRepository = initializeMetadataRepository(name, location, properties);
+		artifactRepository = initializeArtifactRepository(name, location, properties);
 		initializePublisher();
 	}
 
@@ -74,10 +86,10 @@ public class RepositoryListener extends DirectoryChangeListener {
 		info.setArtifactRepository(artifactRepository);
 		info.setMetadataRepository(metadataRepository);
 		info.addAdvice(advice);
-		info.setArtifactOptions(IPublisherInfo.A_INDEX);
+		info.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_NO_MD5);
 	}
 
-	protected CachingArtifactRepository initializeArtifactRepository(String repositoryName, URI repositoryLocation, boolean hidden) {
+	protected CachingArtifactRepository initializeArtifactRepository(String name, URI repositoryLocation, Map<String, String> properties) {
 		IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
 		if (manager == null)
 			throw new IllegalStateException(Messages.artifact_repo_manager_not_registered);
@@ -89,12 +101,6 @@ public class RepositoryListener extends DirectoryChangeListener {
 			//fall through and create a new repository
 		}
 		try {
-			String name = repositoryName;
-			Map properties = new HashMap(1);
-			if (hidden) {
-				properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
-				name = "artifact listener " + repositoryName; //$NON-NLS-1$
-			}
 			IArtifactRepository result = manager.createRepository(repositoryLocation, name, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
 			return result == null ? null : new CachingArtifactRepository(result);
 		} catch (ProvisionException e) {
@@ -103,7 +109,7 @@ public class RepositoryListener extends DirectoryChangeListener {
 		}
 	}
 
-	protected IMetadataRepository initializeMetadataRepository(String repositoryName, URI repositoryLocation, boolean hidden) {
+	protected IMetadataRepository initializeMetadataRepository(String name, URI repositoryLocation, Map<String, String> properties) {
 		IMetadataRepositoryManager manager = Activator.getMetadataRepositoryManager();
 		if (manager == null)
 			throw new IllegalStateException(Messages.metadata_repo_manager_not_registered);
@@ -114,12 +120,6 @@ public class RepositoryListener extends DirectoryChangeListener {
 			//fall through and create new repository
 		}
 		try {
-			String name = repositoryName;
-			Map properties = new HashMap(1);
-			if (hidden) {
-				properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
-				name = "metadata listener " + repositoryName; //$NON-NLS-1$
-			}
 			return manager.createRepository(repositoryLocation, name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
 		} catch (ProvisionException e) {
 			LogHelper.log(e);
@@ -164,7 +164,7 @@ public class RepositoryListener extends DirectoryChangeListener {
 	}
 
 	private boolean processFeature(File file, boolean isAddition) {
-		String link = (String) metadataRepository.getProperties().get(Site.PROP_LINK_FILE);
+		String link = metadataRepository.getProperties().get(Site.PROP_LINK_FILE);
 		advice.setProperties(file, file.lastModified(), file.toURI(), link);
 		return publish(new FeaturesAction(new File[] {file}), isAddition);
 	}
@@ -179,7 +179,7 @@ public class RepositoryListener extends DirectoryChangeListener {
 	}
 
 	public Long getSeenFile(File file) {
-		Long lastSeen = (Long) currentFiles.get(file);
+		Long lastSeen = currentFiles.get(file);
 		if (lastSeen != null)
 			polledSeenFiles.add(file);
 		return lastSeen;
@@ -192,7 +192,7 @@ public class RepositoryListener extends DirectoryChangeListener {
 	}
 
 	public void stopPoll() {
-		final Set filesToRemove = new HashSet(currentFiles.keySet());
+		final Set<File> filesToRemove = new HashSet<File>(currentFiles.keySet());
 		filesToRemove.removeAll(polledSeenFiles);
 		polledSeenFiles.clear();
 
@@ -205,37 +205,31 @@ public class RepositoryListener extends DirectoryChangeListener {
 	/**
 	 * Flush all the pending changes to the metadata repository.
 	 */
-	private void synchronizeMetadataRepository(final Collection removedFiles) {
+	private void synchronizeMetadataRepository(final Collection<File> removedFiles) {
 		if (metadataRepository == null)
 			return;
-		final Collection changes = iusToChange.getIUs(null, null);
+		final Collection<IInstallableUnit> changes = iusToChange.getIUs(null, null);
 		// first remove any IUs that have changed or that are associated with removed files
 		if (!removedFiles.isEmpty() || !changes.isEmpty()) {
-			// create a query that will identify all ius related to removed files or ius that have changed
-			IMatchQuery removeQuery = new MatchQuery() {
-				public boolean isMatch(Object candidate) {
-					if (!(candidate instanceof IInstallableUnit))
-						return false;
-					IInstallableUnit iu = (IInstallableUnit) candidate;
-					if (changes.contains(iu))
-						return true;
-					String filename = iu.getProperty(FILE_NAME);
-					if (filename == null) {
-						String message = NLS.bind(Messages.filename_missing, "installable unit", iu.getId()); //$NON-NLS-1$
-						LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
-						return false;
-					}
-					File iuFile = new File(filename);
-					return removedFiles.contains(iuFile);
-				}
-			};
-			metadataRepository.removeInstallableUnits(removeQuery, null);
+			metadataRepository.removeInstallableUnits(changes);
+
+			// create a query that will identify all ius related to removed files.
+			// We convert the java.io.File objects to Strings before doing the comparison
+			// because when we have large numbers of files, the performance is much better.
+			// See bug 324353.
+			Collection<String> paths = new HashSet<String>(removedFiles.size());
+			for (File file : removedFiles)
+				paths.add(file.getAbsolutePath());
+			IQuery<IInstallableUnit> removeQuery = QueryUtil.createMatchQuery( //
+					"$1.exists(x | properties[$0] == x)", FILE_NAME, paths); //$NON-NLS-1$
+			IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
+			metadataRepository.removeInstallableUnits(toRemove.toUnmodifiableSet());
 		}
 		// Then add all the new IUs as well as the new copies of the ones that have changed
-		Collection additions = iusToAdd.getIUs(null, null);
+		Collection<IInstallableUnit> additions = iusToAdd.getIUs(null, null);
 		additions.addAll(changes);
 		if (!additions.isEmpty())
-			metadataRepository.addInstallableUnits((IInstallableUnit[]) additions.toArray(new IInstallableUnit[additions.size()]));
+			metadataRepository.addInstallableUnits(additions);
 	}
 
 	/**
@@ -243,25 +237,23 @@ public class RepositoryListener extends DirectoryChangeListener {
 	 * descriptors related to any file that has been removed and flush the repo
 	 * to ensure that all the additions and removals have been completed.
 	 */
-	private void synchronizeArtifactRepository(final Collection removedFiles) {
+	private void synchronizeArtifactRepository(final Collection<File> removedFiles) {
 		if (artifactRepository == null)
 			return;
 		if (!removedFiles.isEmpty()) {
-			final List keys = new ArrayList(Arrays.asList(artifactRepository.getArtifactKeys()));
-			for (Iterator it = keys.iterator(); it.hasNext();) {
-				IArtifactKey key = (IArtifactKey) it.next();
-				IArtifactDescriptor[] descriptors = artifactRepository.getArtifactDescriptors(key);
-				for (int i = 0; i < descriptors.length; i++) {
-					ArtifactDescriptor descriptor = (ArtifactDescriptor) descriptors[i];
-					String filename = descriptor.getRepositoryProperty(FILE_NAME);
-					if (filename == null) {
+			IArtifactDescriptor[] descriptors = artifactRepository.descriptorQueryable().query(ArtifactDescriptorQuery.ALL_DESCRIPTORS, null).toArray(IArtifactDescriptor.class);
+			for (IArtifactDescriptor d : descriptors) {
+				SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) d;
+				String filename = descriptor.getRepositoryProperty(FILE_NAME);
+				if (filename == null) {
+					if (Tracing.DEBUG) {
 						String message = NLS.bind(Messages.filename_missing, "artifact", descriptor.getArtifactKey()); //$NON-NLS-1$
 						LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
-					} else {
-						File artifactFile = new File(filename);
-						if (removedFiles.contains(artifactFile))
-							artifactRepository.removeDescriptor(descriptor);
 					}
+				} else {
+					File artifactFile = new File(filename);
+					if (removedFiles.contains(artifactFile))
+						artifactRepository.removeDescriptor(descriptor);
 				}
 			}
 		}
@@ -275,13 +267,15 @@ public class RepositoryListener extends DirectoryChangeListener {
 	private void synchronizeCurrentFiles() {
 		currentFiles.clear();
 		if (metadataRepository != null) {
-			Collector ius = metadataRepository.query(InstallableUnitQuery.ANY, new Collector(), null);
-			for (Iterator it = ius.iterator(); it.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) it.next();
+			IQueryResult<IInstallableUnit> ius = metadataRepository.query(QueryUtil.createIUAnyQuery(), null);
+			for (Iterator<IInstallableUnit> it = ius.iterator(); it.hasNext();) {
+				IInstallableUnit iu = it.next();
 				String filename = iu.getProperty(FILE_NAME);
 				if (filename == null) {
-					String message = NLS.bind(Messages.filename_missing, "installable unit", iu.getId()); //$NON-NLS-1$
-					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
+					if (Tracing.DEBUG) {
+						String message = NLS.bind(Messages.filename_missing, "installable unit", iu.getId()); //$NON-NLS-1$
+						LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
+					}
 				} else {
 					File iuFile = new File(filename);
 					Long iuLastModified = new Long(iu.getProperty(FILE_LAST_MODIFIED));
diff --git a/eclipse/plugins/org.eclipse.equinox.log/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.log/.classpath
copy to eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.gitignore b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.project b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.project
new file mode 100644
index 0000000..75f8519
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.discovery.compatibility</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..c65423d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,349 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..8f3db4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,57 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_core
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.staticondemandthreshold=3
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.format_source_code=true
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.tasks.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000..d8c6d26
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.team.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000..4ed1154
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Feb 16 15:42:51 PST 2010
+commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..5937a85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,24 @@
+#Tue May 20 17:39:22 PDT 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=2
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8382b99
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.equinox.p2.discovery.compatibility;singleton:=true
+Bundle-Version: 1.0.1.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.3.0",
+ org.eclipse.equinox.p2.core;bundle-version="2.0.0",
+ org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,2.1.0)"
+Export-Package: org.eclipse.equinox.internal.p2.discovery.compatibility;x-friends:="org.eclipse.equinox.p2.ui.discovery",
+ org.eclipse.equinox.internal.p2.discovery.compatibility.util;x-friends:="org.eclipse.equinox.p2.ui.discovery"
+Bundle-Localization: plugin
+Bundle-Activator: org.eclipse.equinox.internal.p2.discovery.compatibility.Activator
+Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/about.html b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/about.html
new file mode 100644
index 0000000..bc6e2b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>July 3, 2008</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/build.properties
new file mode 100644
index 0000000..0f42be3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/build.properties
@@ -0,0 +1,22 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Tasktop Technologies - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               schema/,\
+               plugin.properties,\
+               xsd/
+src.includes = about.html,\
+               schema/,\
+               xsd/
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.properties
new file mode 100644
index 0000000..38b4c3f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+extension-point.name = Connector Discovery
+Bundle-Vendor = Eclipse.org - Equinox
+Bundle-Name = Equinox Provisioning Discovery
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.xml
new file mode 100644
index 0000000..ea8a807
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?><!--
+    Copyright (c) 2009 Tasktop Technologies and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+    
+    Contributors:
+        Tasktop Technologies - initial API and implementation
+ -->
+<plugin>
+   <extension-point id="org.eclipse.mylyn.discovery.core.connectorDiscovery" name="%extension-point.name" schema="schema/connectorDiscovery.exsd"/>
+
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/pom.xml
new file mode 100644
index 0000000..4b043d7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.discovery.compatiblity</artifactId>
+  <version>1.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/schema/connectorDiscovery.exsd b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/schema/connectorDiscovery.exsd
new file mode 100644
index 0000000..73f19d0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/schema/connectorDiscovery.exsd
@@ -0,0 +1,434 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.mylyn.discovery.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.eclipse.mylyn.discovery.core" id="connectorDiscovery" name="Connector Discovery"/>
+      </appinfo>
+      <documentation>
+         An extension point for contributing to the Mylyn connector discovery mechanism.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element internal="true" />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="connectorCategory" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="connectorDescriptor" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="certification" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="connectorDescriptor">
+      <annotation>
+         <documentation>
+            A description of a connector, including kinds, description, licensing and brand.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="featureFilter" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="icon" minOccurs="0" maxOccurs="1"/>
+            <element ref="overview" minOccurs="0" maxOccurs="1"/>
+            <element ref="iu" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="kind" type="string">
+            <annotation>
+               <documentation>
+                  must be a comma-delimited list of the following values: 'document', 'task', 'vcs'
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the name of the connector including the name of the organization that produces the repository if appropriate, for example 'Mozilla Bugzilla'.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="provider" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name of the organization that supplies the connector.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="license" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The short name of the license, for example 'EPL 1.0', 'GPL 2.0', or 'Commercial'.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  A description of the connector.  Plug-ins should provide a description, especially if the description is not self-evident from the @name and @organization.
+
+Only the first 162 characters of the description are displayed in the UI and line breaks are ignored.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="siteUrl" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The URL of the update site containing the connector.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the feature that installs this connector
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="categoryId" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the id of the connectorCategory in which this connector belongs
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.mylyn.discovery.core.connectorDiscovery/connectorCategory/@id"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="platformFilter" type="string">
+            <annotation>
+               <documentation>
+                  E.g., "(& (osgi.os=macosx) (osgi.ws=carbon))"
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="groupId" type="string">
+            <annotation>
+               <documentation>
+                  The id of the connectorCategory group.  See group/@id for more details.
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.mylyn.discovery.core.connectorDiscovery/connectorDescriptor/@groupId"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="certificationId" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.mylyn.discovery.core.connectorDiscovery/certification/@id"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="connectorCategory">
+      <annotation>
+         <documentation>
+            a category of connectors, which is a way of organizing connectors in top-level groups.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="icon" minOccurs="0" maxOccurs="1"/>
+            <element ref="overview" minOccurs="0" maxOccurs="1"/>
+            <element ref="group" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  an id that uniquely identifies the category
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the name of the category, as it is displayed in the ui.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A description of the category
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="relevance" type="string">
+            <annotation>
+               <documentation>
+                  A relevance, which is a number from 0 to 100.  Categories with higher relevance are displayed with preference in the UI.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="icon">
+      <complexType>
+         <attribute name="image16" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="image32" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="image48" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="image64" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="image128" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="overview">
+      <annotation>
+         <documentation>
+            An overview that provides more detailed information, which may include a summary, url and screenshot.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="summary" type="string">
+            <annotation>
+               <documentation>
+                  A description providing detailed information about the item.  Newlines can be used to format the text into multiple paragraphs if necessary.  Text must fit into an area 320x240, otherwise it will be truncated in the UI.  More lengthy descriptions can be provided on a  web page if required, see @url.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="url" type="string">
+            <annotation>
+               <documentation>
+                  An URL that points to a web page with more information relevant to the connector or category.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="screenshot" type="string">
+            <annotation>
+               <documentation>
+                  320x240 PNG, JPEG or GIF
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="featureFilter">
+      <annotation>
+         <documentation>
+            A means of specifying that a feature must be present in order for the connectorDescriptor to be presented to the user.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="featureId" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the feature to test
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="version" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A version specifier, specified in the same manner as version dependencies are specified in an OSGi manifest.  For example: "[3.0,4.0)"
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="group">
+      <annotation>
+         <documentation>
+            groups provide a way to anchor connectors in a grouping with other like entries.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  An identifier that identifies the group.  Must be unique for a particular connectorCategory.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="certification">
+      <complexType>
+         <sequence>
+            <element ref="icon" minOccurs="0" maxOccurs="1"/>
+            <element ref="description"/>
+         </sequence>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  An id that uniquely identifies the certification.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name of the certification, as it is displayed in the ui.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="url" type="string">
+            <annotation>
+               <documentation>
+                  An URL that points to a web page with more information relevant to the certification.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="description" type="string">
+      <annotation>
+         <appinfo>
+            <meta.element translatable="true"/>
+         </appinfo>
+         <documentation>
+            A textual description.
+         </documentation>
+      </annotation>
+   </element>
+
+   <element name="iu">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the feature that is to be installed.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         3.2
+      </documentation>
+   </annotation>
+
+
+
+
+   <annotation>
+      <appinfo>
+         <meta.section type="copyright"/>
+      </appinfo>
+      <documentation>
+         Copyright (c) 2009 Tasktop Technologies and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Activator.java
new file mode 100644
index 0000000..6210e04
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Activator.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *      Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.CacheManager;
+import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
+import org.osgi.framework.BundleContext;
+
+public class Activator extends Plugin {
+
+	private static Activator plugin;
+
+	private CacheManager manager;
+
+	public static final String ID = "org.eclipse.equinox.p2.discovery.compatibility"; //$NON-NLS-1$
+
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	public void stop(BundleContext context) throws Exception {
+		super.stop(context);
+		plugin = null;
+	}
+
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	public synchronized CacheManager getCacheManager() {
+		if (manager == null) {
+			manager = new CacheManager(new RepositoryTransport());
+		}
+		return manager;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoverySource.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoverySource.java
new file mode 100644
index 0000000..b31db64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoverySource.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.net.URL;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author David Green
+ */
+public class BundleDiscoverySource extends AbstractCatalogSource {
+
+	private final Bundle bundle;
+
+	public BundleDiscoverySource(Bundle bundle) {
+		if (bundle == null) {
+			throw new IllegalArgumentException();
+		}
+		this.bundle = bundle;
+	}
+
+	@Override
+	public Object getId() {
+		return "bundle:" + bundle.getSymbolicName(); //$NON-NLS-1$
+	}
+
+	@Override
+	public URL getResource(String relativeUrl) {
+		return bundle.getEntry(relativeUrl);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
new file mode 100644
index 0000000..2629e4b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.*;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * A strategy for discovering via installed platform {@link Bundle bundles}.
+ * 
+ * @author David Green
+ */
+public class BundleDiscoveryStrategy extends AbstractDiscoveryStrategy {
+
+	public BundleDiscoveryStrategy() {
+		// constructor
+	}
+
+	@Override
+	public void performDiscovery(IProgressMonitor monitor) throws CoreException {
+		if (items == null || categories == null) {
+			throw new IllegalStateException();
+		}
+		IExtensionPoint extensionPoint = getExtensionRegistry().getExtensionPoint(ConnectorDiscoveryExtensionReader.EXTENSION_POINT_ID);
+		IExtension[] extensions = extensionPoint.getExtensions();
+		monitor.beginTask(Messages.BundleDiscoveryStrategy_task_loading_local_extensions, extensions.length == 0 ? 1 : extensions.length);
+		try {
+			if (extensions.length > 0) {
+				processExtensions(new SubProgressMonitor(monitor, extensions.length), extensions);
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	protected void processExtensions(IProgressMonitor monitor, IExtension[] extensions) {
+		monitor.beginTask(Messages.BundleDiscoveryStrategy_task_processing_extensions, extensions.length == 0 ? 1 : extensions.length);
+		try {
+			ConnectorDiscoveryExtensionReader extensionReader = new ConnectorDiscoveryExtensionReader();
+
+			for (IExtension extension : extensions) {
+				AbstractCatalogSource discoverySource = computeDiscoverySource(extension.getContributor());
+				IConfigurationElement[] elements = extension.getConfigurationElements();
+				for (IConfigurationElement element : elements) {
+					if (monitor.isCanceled()) {
+						return;
+					}
+					try {
+						if (ConnectorDiscoveryExtensionReader.CONNECTOR_DESCRIPTOR.equals(element.getName())) {
+							CatalogItem descriptor = extensionReader.readConnectorDescriptor(element, CatalogItem.class);
+							descriptor.setSource(discoverySource);
+							items.add(descriptor);
+						} else if (ConnectorDiscoveryExtensionReader.CONNECTOR_CATEGORY.equals(element.getName())) {
+							CatalogCategory category = extensionReader.readConnectorCategory(element, CatalogCategory.class);
+							category.setSource(discoverySource);
+							if (!discoverySource.getPolicy().isPermitCategories()) {
+								LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.BundleDiscoveryStrategy_categoryDisallowed, new Object[] {category.getName(), category.getId(), element.getContributor().getName()}), null));
+							} else {
+								categories.add(category);
+							}
+						} else if (ConnectorDiscoveryExtensionReader.CERTIFICATION.equals(element.getName())) {
+							Certification certification = extensionReader.readCertification(element, Certification.class);
+							certification.setSource(discoverySource);
+							certifications.add(certification);
+						} else {
+							throw new ValidationException(NLS.bind(Messages.BundleDiscoveryStrategy_unexpected_element, element.getName()));
+						}
+					} catch (ValidationException e) {
+						LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.BundleDiscoveryStrategy_3, element.getContributor().getName(), e.getMessage()), e));
+					}
+				}
+				monitor.worked(1);
+			}
+
+			tags.addAll(extensionReader.getTags());
+		} finally {
+			monitor.done();
+		}
+	}
+
+	protected AbstractCatalogSource computeDiscoverySource(IContributor contributor) {
+		Policy policy = new Policy(true);
+		BundleDiscoverySource bundleDiscoverySource = new BundleDiscoverySource(Platform.getBundle(contributor.getName()));
+		bundleDiscoverySource.setPolicy(policy);
+		return bundleDiscoverySource;
+	}
+
+	protected IExtensionRegistry getExtensionRegistry() {
+		return Platform.getExtensionRegistry();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/ConnectorDiscoveryExtensionReader.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/ConnectorDiscoveryExtensionReader.java
new file mode 100644
index 0000000..84afa69
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/ConnectorDiscoveryExtensionReader.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.util.*;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+
+/**
+ * Connector Discovery extension point reader, for extension points of type
+ * <tt>org.eclipse.mylyn.discovery.core.connectorDiscovery</tt>
+ * 
+ * @author David Green
+ */
+public class ConnectorDiscoveryExtensionReader {
+
+	private static final String P2_FEATURE_GROUP_SUFFIX = ".feature.group"; //$NON-NLS-1$
+
+	public static final String EXTENSION_POINT_ID = "org.eclipse.mylyn.discovery.core.connectorDiscovery"; //$NON-NLS-1$
+
+	public static final String CONNECTOR_DESCRIPTOR = "connectorDescriptor"; //$NON-NLS-1$
+
+	public static final String CONNECTOR_CATEGORY = "connectorCategory"; //$NON-NLS-1$
+
+	public static final String CERTIFICATION = "certification"; //$NON-NLS-1$
+
+	public static final String ICON = "icon"; //$NON-NLS-1$
+
+	public static final String OVERVIEW = "overview"; //$NON-NLS-1$
+
+	public static final String FEATURE_FILTER = "featureFilter"; //$NON-NLS-1$
+
+	public static final String GROUP = "group"; //$NON-NLS-1$
+
+	public static Tag DOCUMENT = new Tag("document", Messages.ConnectorDiscoveryExtensionReader_Documents); //$NON-NLS-1$
+
+	public static Tag TASK = new Tag("task", Messages.ConnectorDiscoveryExtensionReader_Tasks); //$NON-NLS-1$
+
+	public static Tag VCS = new Tag("vcs", Messages.ConnectorDiscoveryExtensionReader_Version_Control); //$NON-NLS-1$
+
+	public static final Tag[] DEFAULT_TAGS = new Tag[] {DOCUMENT, TASK, VCS};
+
+	private Map<String, Tag> tagById = new HashMap<String, Tag>();
+
+	public ConnectorDiscoveryExtensionReader() {
+		// constructor
+	}
+
+	/**
+	 * return the enum constant whose {@link Tag#getValue() value} is the same as the given value.
+	 * 
+	 * @param value
+	 *            the string value, or null
+	 * @return the corresponding enum constant or null if the given value was null
+	 * @throws IllegalArgumentException
+	 *             if the given value does not correspond to any enum constant
+	 */
+	public static Tag fromValue(String value) throws IllegalArgumentException {
+		if (value == null) {
+			return null;
+		}
+		for (Tag tag : DEFAULT_TAGS) {
+			if (tag.getValue().equals(value)) {
+				return tag;
+			}
+		}
+		throw new IllegalArgumentException(value);
+	}
+
+	public Set<Tag> getTags() {
+		return new HashSet<Tag>(tagById.values());
+	}
+
+	private Tag getTag(String id) {
+		if (id == null) {
+			return null;
+		}
+		// first, look for known tag
+		Tag result = tagById.get(id);
+		if (result != null) {
+			return result;
+		}
+		// second, search default tags
+		for (Tag tag : DEFAULT_TAGS) {
+			if (tag.getValue().equals(id)) {
+				tagById.put(id, tag);
+				return tag;
+			}
+		}
+		// third, create new tag
+		result = new Tag(id, id);
+		tagById.put(id, result);
+		return result;
+	}
+
+	public CatalogItem readConnectorDescriptor(IConfigurationElement element) throws ValidationException {
+		return readConnectorDescriptor(element, CatalogItem.class);
+	}
+
+	public <T extends CatalogItem> T readConnectorDescriptor(IConfigurationElement element, Class<T> clazz) throws ValidationException {
+		T connectorDescriptor;
+		try {
+			connectorDescriptor = clazz.newInstance();
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+
+		try {
+			String kinds = element.getAttribute("kind"); //$NON-NLS-1$
+			if (kinds != null) {
+				String[] akinds = kinds.split("\\s*,\\s*"); //$NON-NLS-1$
+				for (String kind : akinds) {
+					Tag tag = getTag(kind);
+					if (tag != null) {
+						connectorDescriptor.addTag(tag);
+					}
+				}
+			}
+		} catch (IllegalArgumentException e) {
+			throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_value_kind);
+		}
+		connectorDescriptor.setName(element.getAttribute("name")); //$NON-NLS-1$
+		connectorDescriptor.setProvider(element.getAttribute("provider")); //$NON-NLS-1$
+		connectorDescriptor.setLicense(element.getAttribute("license")); //$NON-NLS-1$
+		connectorDescriptor.setDescription(element.getAttribute("description")); //$NON-NLS-1$
+		connectorDescriptor.setSiteUrl(element.getAttribute("siteUrl")); //$NON-NLS-1$
+		connectorDescriptor.setId(element.getAttribute("id")); //$NON-NLS-1$
+		connectorDescriptor.setCategoryId(element.getAttribute("categoryId")); //$NON-NLS-1$
+		connectorDescriptor.setCertificationId(element.getAttribute("certificationId")); //$NON-NLS-1$
+		connectorDescriptor.setPlatformFilter(element.getAttribute("platformFilter")); //$NON-NLS-1$
+		connectorDescriptor.setGroupId(element.getAttribute("groupId")); //$NON-NLS-1$
+
+		IConfigurationElement[] children = element.getChildren("iu"); //$NON-NLS-1$
+		if (children.length > 0) {
+			for (IConfigurationElement child : children) {
+				connectorDescriptor.getInstallableUnits().add(getFeatureId(child.getAttribute("id"))); //$NON-NLS-1$
+			}
+		} else {
+			// no particular iu specified, use connector id
+			connectorDescriptor.getInstallableUnits().add(getFeatureId(connectorDescriptor.getId()));
+		}
+		for (IConfigurationElement child : element.getChildren("featureFilter")) { //$NON-NLS-1$
+			FeatureFilter featureFilterItem = readFeatureFilter(child);
+			featureFilterItem.setItem(connectorDescriptor);
+			connectorDescriptor.getFeatureFilter().add(featureFilterItem);
+		}
+		for (IConfigurationElement child : element.getChildren("icon")) { //$NON-NLS-1$
+			Icon iconItem = readIcon(child);
+			if (connectorDescriptor.getIcon() != null) {
+				throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_element_icon);
+			}
+			connectorDescriptor.setIcon(iconItem);
+		}
+		for (IConfigurationElement child : element.getChildren("overview")) { //$NON-NLS-1$
+			Overview overviewItem = readOverview(child);
+			overviewItem.setItem(connectorDescriptor);
+			if (connectorDescriptor.getOverview() != null) {
+				throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_element_overview);
+			}
+			connectorDescriptor.setOverview(overviewItem);
+		}
+
+		connectorDescriptor.validate();
+
+		return connectorDescriptor;
+	}
+
+	private String getFeatureId(String id) {
+		if (!id.endsWith(P2_FEATURE_GROUP_SUFFIX)) {
+			return id + P2_FEATURE_GROUP_SUFFIX;
+		}
+		return id;
+	}
+
+	public CatalogCategory readConnectorCategory(IConfigurationElement element) throws ValidationException {
+		return readConnectorCategory(element, CatalogCategory.class);
+	}
+
+	public <T extends CatalogCategory> T readConnectorCategory(IConfigurationElement element, Class<T> clazz) throws ValidationException {
+		T connectorCategory;
+		try {
+			connectorCategory = clazz.newInstance();
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+
+		connectorCategory.setId(element.getAttribute("id")); //$NON-NLS-1$
+		connectorCategory.setName(element.getAttribute("name")); //$NON-NLS-1$
+		connectorCategory.setDescription(element.getAttribute("description")); //$NON-NLS-1$
+		connectorCategory.setRelevance(element.getAttribute("relevance")); //$NON-NLS-1$
+
+		for (IConfigurationElement child : element.getChildren("icon")) { //$NON-NLS-1$
+			Icon iconItem = readIcon(child);
+			if (connectorCategory.getIcon() != null) {
+				throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_element_icon);
+			}
+			connectorCategory.setIcon(iconItem);
+		}
+		for (IConfigurationElement child : element.getChildren("overview")) { //$NON-NLS-1$
+			Overview overviewItem = readOverview(child);
+			overviewItem.setCategory(connectorCategory);
+			if (connectorCategory.getOverview() != null) {
+				throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_element_overview);
+			}
+			connectorCategory.setOverview(overviewItem);
+		}
+		for (IConfigurationElement child : element.getChildren("group")) { //$NON-NLS-1$
+			Group groupItem = readGroup(child);
+			groupItem.setCategory(connectorCategory);
+			connectorCategory.getGroup().add(groupItem);
+		}
+
+		connectorCategory.validate();
+
+		return connectorCategory;
+	}
+
+	public <T extends Certification> T readCertification(IConfigurationElement element, Class<T> clazz) throws ValidationException {
+		T certification;
+		try {
+			certification = clazz.newInstance();
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+
+		certification.setId(element.getAttribute("id")); //$NON-NLS-1$
+		certification.setName(element.getAttribute("name")); //$NON-NLS-1$
+		certification.setUrl(element.getAttribute("url")); //$NON-NLS-1$
+
+		for (IConfigurationElement child : element.getChildren("icon")) { //$NON-NLS-1$
+			Icon iconItem = readIcon(child);
+			if (certification.getIcon() != null) {
+				throw new ValidationException(Messages.ConnectorDiscoveryExtensionReader_unexpected_element_icon);
+			}
+			certification.setIcon(iconItem);
+		}
+		for (IConfigurationElement child : element.getChildren("description")) { //$NON-NLS-1$
+			certification.setDescription(child.getValue());
+		}
+		certification.validate();
+
+		return certification;
+	}
+
+	public Icon readIcon(IConfigurationElement element) throws ValidationException {
+		Icon icon = new Icon();
+
+		icon.setImage16(element.getAttribute("image16")); //$NON-NLS-1$
+		icon.setImage32(element.getAttribute("image32")); //$NON-NLS-1$
+		icon.setImage48(element.getAttribute("image48")); //$NON-NLS-1$
+		icon.setImage64(element.getAttribute("image64")); //$NON-NLS-1$
+		icon.setImage128(element.getAttribute("image128")); //$NON-NLS-1$
+
+		icon.validate();
+
+		return icon;
+	}
+
+	public Overview readOverview(IConfigurationElement element) throws ValidationException {
+		Overview overview = new Overview();
+
+		overview.setSummary(element.getAttribute("summary")); //$NON-NLS-1$
+		overview.setUrl(element.getAttribute("url")); //$NON-NLS-1$
+		overview.setScreenshot(element.getAttribute("screenshot")); //$NON-NLS-1$
+
+		overview.validate();
+
+		return overview;
+	}
+
+	public FeatureFilter readFeatureFilter(IConfigurationElement element) throws ValidationException {
+		FeatureFilter featureFilter = new FeatureFilter();
+
+		featureFilter.setFeatureId(element.getAttribute("featureId")); //$NON-NLS-1$
+		featureFilter.setVersion(element.getAttribute("version")); //$NON-NLS-1$
+
+		featureFilter.validate();
+
+		return featureFilter;
+	}
+
+	public Group readGroup(IConfigurationElement element) throws ValidationException {
+		Group group = new Group();
+
+		group.setId(element.getAttribute("id")); //$NON-NLS-1$
+
+		group.validate();
+
+		return group;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Directory.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Directory.java
new file mode 100644
index 0000000..0432288
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Directory.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A directory representing locations of discovery sources.
+ * 
+ * @author David Green
+ */
+public class Directory {
+
+	/**
+	 * an entry in the directory, which represents a specific discovery source. Future versions of this class may
+	 * include policy or other attributes declared by the directory.
+	 */
+	public static final class Entry {
+		private String location;
+
+		private boolean permitCategories;
+
+		public Entry() {
+		}
+
+		/**
+		 * the location of the entry (an URL)
+		 */
+		public String getLocation() {
+			return location;
+		}
+
+		/**
+		 * the location of the entry (an URL)
+		 */
+		public void setLocation(String location) {
+			this.location = location;
+		}
+
+		/**
+		 * indicate if creation of categories by this location is permitted
+		 */
+		public boolean isPermitCategories() {
+			return permitCategories;
+		}
+
+		/**
+		 * indicate if creation of categories by this location is permitted
+		 */
+		public void setPermitCategories(boolean permitCategories) {
+			this.permitCategories = permitCategories;
+		}
+	}
+
+	private final List<Entry> entries = new ArrayList<Entry>();
+
+	public List<Entry> getEntries() {
+		return entries;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java
new file mode 100644
index 0000000..539ec4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.io.IOException;
+import java.io.Reader;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Directory.Entry;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.DefaultSaxErrorHandler;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.IOWithCauseException;
+import org.eclipse.osgi.util.NLS;
+import org.xml.sax.*;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+/**
+ * A parser for {@link Directory directories}.
+ * 
+ * @author David Green
+ */
+public class DirectoryParser {
+	/**
+	 * parse the contents of a directory. The caller must close the given reader.
+	 * 
+	 * @param directoryContents
+	 *            the contents of the directory
+	 * @return a directory with 0 or more entries
+	 * @throws IOException
+	 *             if the directory cannot be read.
+	 */
+	public Directory parse(Reader directoryContents) throws IOException {
+		XMLReader xmlReader;
+		try {
+			xmlReader = XMLReaderFactory.createXMLReader();
+		} catch (SAXException e) {
+			throw new IOWithCauseException(e.getMessage(), e);
+		}
+		xmlReader.setErrorHandler(new DefaultSaxErrorHandler());
+
+		DirectoryContentHandler contentHandler = new DirectoryContentHandler();
+		xmlReader.setContentHandler(contentHandler);
+
+		try {
+			xmlReader.parse(new InputSource(directoryContents));
+		} catch (SAXException e) {
+			throw new IOWithCauseException(e.getMessage(), e);
+		}
+
+		if (contentHandler.directory == null) {
+			throw new IOException(Messages.DirectoryParser_no_directory);
+		}
+
+		return contentHandler.directory;
+	}
+
+	private class DirectoryContentHandler implements ContentHandler {
+
+		Directory directory;
+
+		public void characters(char[] ch, int start, int length) throws SAXException {
+			// ignore
+		}
+
+		public void endDocument() throws SAXException {
+			// ignore
+		}
+
+		public void endElement(String uri, String localName, String qName) throws SAXException {
+			// ignore
+		}
+
+		public void endPrefixMapping(String prefix) throws SAXException {
+			// ignore
+		}
+
+		public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
+			// ignore
+		}
+
+		public void processingInstruction(String target, String data) throws SAXException {
+			// ignore
+		}
+
+		public void setDocumentLocator(Locator locator) {
+			// ignore
+		}
+
+		public void skippedEntity(String name) throws SAXException {
+			// ignore
+		}
+
+		public void startDocument() throws SAXException {
+			// ignore
+		}
+
+		public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
+			if ("directory".equals(localName)) { //$NON-NLS-1$
+				if (directory != null) {
+					unexpectedElement(localName);
+				}
+				directory = new Directory();
+			} else if (directory != null && "entry".equals(localName)) { //$NON-NLS-1$
+				String url = atts.getValue("", "url"); //$NON-NLS-1$ //$NON-NLS-2$
+				if (url != null && url.length() > 0) {
+					Entry entry = new Entry();
+					entry.setLocation(url);
+					entry.setPermitCategories(Boolean.parseBoolean(atts.getValue("permitCategories"))); //$NON-NLS-1$
+					directory.getEntries().add(entry);
+				}
+			}
+			// else ignore
+		}
+
+		private void unexpectedElement(String localName) throws SAXException {
+			throw new SAXException(NLS.bind(Messages.DirectoryParser_unexpected_element, localName));
+		}
+
+		public void startPrefixMapping(String prefix, String uri) throws SAXException {
+			// ignore
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DiscoveryRegistryStrategy.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DiscoveryRegistryStrategy.java
new file mode 100644
index 0000000..b42f33f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DiscoveryRegistryStrategy.java
@@ -0,0 +1,196 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.spi.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Directory.Entry;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author David Green
+ */
+class DiscoveryRegistryStrategy extends RegistryStrategy {
+
+	private final List<JarFile> jars = new ArrayList<JarFile>();
+
+	private final Map<IContributor, File> contributorToJarFile = new HashMap<IContributor, File>();
+
+	private final Map<IContributor, Entry> contributorToDirectoryEntry = new HashMap<IContributor, Entry>();
+
+	private final Object token;
+
+	private Map<File, Entry> bundleFileToDirectoryEntry;
+
+	public DiscoveryRegistryStrategy(File[] storageDirs, boolean[] cacheReadOnly, Object token) {
+		super(storageDirs, cacheReadOnly);
+		this.token = token;
+	}
+
+	@Override
+	public void onStart(IExtensionRegistry registry, boolean loadedFromCache) {
+		super.onStart(registry, loadedFromCache);
+		if (!loadedFromCache) {
+			processDiscoveryCoreBundle(registry);
+			processBundles(registry);
+		}
+	}
+
+	private void processDiscoveryCoreBundle(IExtensionRegistry registry) {
+		// we must add a contribution from the core bundle so that we get the
+		// extension point itself
+		try {
+			Bundle bundle = Platform.getBundle("org.eclipse.equinox.p2.discovery.compatibility"); //$NON-NLS-1$
+			IContributor contributor = new RegistryContributor(bundle.getSymbolicName(), bundle.getSymbolicName(), null, null);
+
+			InputStream inputStream = bundle.getEntry("plugin.xml").openStream(); //$NON-NLS-1$
+			try {
+				registry.addContribution(inputStream, contributor, false, bundle.getSymbolicName(), null, token);
+			} finally {
+				inputStream.close();
+			}
+		} catch (IOException e) {
+			throw new IllegalStateException();
+		}
+	}
+
+	private void processBundles(IExtensionRegistry registry) {
+		if (bundleFileToDirectoryEntry == null) {
+			throw new IllegalStateException();
+		}
+		for (java.util.Map.Entry<File, Entry> bundleFile : bundleFileToDirectoryEntry.entrySet()) {
+			try {
+				processBundle(registry, bundleFile.getValue(), bundleFile.getKey());
+			} catch (Exception e) {
+				LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.DiscoveryRegistryStrategy_cannot_load_bundle, new Object[] {bundleFile.getKey().getName(), bundleFile.getValue().getLocation(), e.getMessage()}), e));
+			}
+		}
+	}
+
+	private void processBundle(IExtensionRegistry registry, Directory.Entry entry, File bundleFile) throws IOException {
+		JarFile jarFile = new JarFile(bundleFile);
+		jars.add(jarFile);
+
+		ZipEntry pluginXmlEntry = jarFile.getEntry("plugin.xml"); //$NON-NLS-1$
+		if (pluginXmlEntry == null) {
+			throw new IOException(Messages.DiscoveryRegistryStrategy_missing_pluginxml);
+		}
+		IContributor contributor = new RegistryContributor(bundleFile.getName(), bundleFile.getName(), null, null);
+		if (((IDynamicExtensionRegistry) registry).hasContributor(contributor)) {
+			jarFile.close();
+			return;
+		}
+		contributorToJarFile.put(contributor, bundleFile);
+		contributorToDirectoryEntry.put(contributor, entry);
+
+		ResourceBundle translationBundle = loadTranslationBundle(jarFile);
+
+		InputStream inputStream = jarFile.getInputStream(pluginXmlEntry);
+		try {
+			registry.addContribution(inputStream, contributor, false, bundleFile.getPath(), translationBundle, token);
+		} finally {
+			inputStream.close();
+		}
+	}
+
+	private ResourceBundle loadTranslationBundle(JarFile jarFile) throws IOException {
+		List<String> bundleNames = computeBundleNames("plugin"); //$NON-NLS-1$
+		for (String bundleName : bundleNames) {
+			ZipEntry entry = jarFile.getEntry(bundleName);
+			if (entry != null) {
+				InputStream inputStream = jarFile.getInputStream(entry);
+				try {
+					PropertyResourceBundle resourceBundle = new PropertyResourceBundle(inputStream);
+					return resourceBundle;
+				} finally {
+					inputStream.close();
+				}
+			}
+		}
+		return null;
+	}
+
+	private List<String> computeBundleNames(String baseName) {
+		String suffix = ".properties"; //$NON-NLS-1$
+		String name = baseName;
+		List<String> bundleNames = new ArrayList<String>();
+		Locale locale = Locale.getDefault();
+		bundleNames.add(name + suffix);
+		if (locale.getLanguage() != null && locale.getLanguage().length() > 0) {
+			name = name + '_' + locale.getLanguage();
+			bundleNames.add(0, name + suffix);
+		}
+		if (locale.getCountry() != null && locale.getCountry().length() > 0) {
+			name = name + '_' + locale.getCountry();
+			bundleNames.add(0, name + suffix);
+		}
+		if (locale.getVariant() != null && locale.getVariant().length() > 0) {
+			name = name + '_' + locale.getVariant();
+			bundleNames.add(0, name + suffix);
+		}
+		return bundleNames;
+	}
+
+	@Override
+	public void onStop(IExtensionRegistry registry) {
+		try {
+			super.onStop(registry);
+		} finally {
+			for (JarFile jar : jars) {
+				try {
+					jar.close();
+				} catch (Exception e) {
+				}
+			}
+			jars.clear();
+		}
+	}
+
+	/**
+	 * get the jar file that corresponds to the given contributor.
+	 * 
+	 * @throws IllegalArgumentException
+	 *             if the given contributor is unknown
+	 */
+	public File getJarFile(IContributor contributor) {
+		File file = contributorToJarFile.get(contributor);
+		if (file == null) {
+			throw new IllegalArgumentException(contributor.getName());
+		}
+		return file;
+	}
+
+	/**
+	 * get the directory entry that corresponds to the given contributor.
+	 * 
+	 * @throws IllegalArgumentException
+	 *             if the given contributor is unknown
+	 */
+	public Entry getDirectoryEntry(IContributor contributor) {
+		Entry entry = contributorToDirectoryEntry.get(contributor);
+		if (entry == null) {
+			throw new IllegalArgumentException(contributor.getName());
+		}
+		return entry;
+	}
+
+	public void setBundles(Map<File, Entry> bundleFileToDirectoryEntry) {
+		this.bundleFileToDirectoryEntry = bundleFileToDirectoryEntry;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/JarDiscoverySource.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/JarDiscoverySource.java
new file mode 100644
index 0000000..666cff5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/JarDiscoverySource.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.*;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+
+/**
+ * @author David Green
+ */
+public class JarDiscoverySource extends AbstractCatalogSource {
+
+	private final String id;
+
+	private final File jarFile;
+
+	public JarDiscoverySource(String id, File jarFile) {
+		this.id = id;
+		this.jarFile = jarFile;
+	}
+
+	@Override
+	public Object getId() {
+		return id;
+	}
+
+	@Override
+	public URL getResource(String resourceName) {
+		try {
+			String prefix = jarFile.toURI().toURL().toExternalForm();
+
+			return new URL("jar:" + prefix + "!/" + URLEncoder.encode(resourceName, "utf-8")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		} catch (MalformedURLException e) {
+			throw new IllegalStateException(e);
+		} catch (UnsupportedEncodingException e) {
+			throw new IllegalStateException(e);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Messages.java
new file mode 100644
index 0000000..5626eaa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/Messages.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     Sonatype, Inc. - added caching support
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+public class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.discovery.compatibility.messages"; //$NON-NLS-1$
+
+	public static String BundleDiscoveryStrategy_3;
+
+	public static String BundleDiscoveryStrategy_categoryDisallowed;
+
+	public static String BundleDiscoveryStrategy_task_loading_local_extensions;
+
+	public static String BundleDiscoveryStrategy_task_processing_extensions;
+
+	public static String BundleDiscoveryStrategy_unexpected_element;
+
+	public static String CacheManager_AuthenticationFaileFor_0;
+
+	public static String CacheManager_FailedCommunication_0;
+
+	public static String CacheManager_Neither_0_nor_1_found;
+
+	public static String CacheManage_ErrorRenamingCache;
+
+	public static String ConnectorDiscoveryExtensionReader_Documents;
+
+	public static String ConnectorDiscoveryExtensionReader_Tasks;
+
+	public static String ConnectorDiscoveryExtensionReader_unexpected_element_icon;
+
+	public static String ConnectorDiscoveryExtensionReader_unexpected_element_overview;
+
+	public static String ConnectorDiscoveryExtensionReader_unexpected_value_kind;
+
+	public static String ConnectorDiscoveryExtensionReader_Version_Control;
+
+	public static String DirectoryParser_no_directory;
+
+	public static String DirectoryParser_unexpected_element;
+
+	public static String DiscoveryRegistryStrategy_cannot_load_bundle;
+
+	public static String DiscoveryRegistryStrategy_missing_pluginxml;
+
+	public static String RemoteBundleDiscoveryStrategy_cannot_download_bundle;
+
+	public static String RemoteBundleDiscoveryStrategy_empty_directory;
+
+	public static String RemoteBundleDiscoveryStrategy_Invalid_source_specified_Error;
+
+	public static String RemoteBundleDiscoveryStrategy_io_failure_discovery_directory;
+
+	public static String RemoteBundleDiscoveryStrategy_io_failure_temp_storage;
+
+	public static String RemoteBundleDiscoveryStrategy_task_remote_discovery;
+
+	public static String RemoteBundleDiscoveryStrategy_unexpectedError;
+
+	public static String RemoteBundleDiscoveryStrategy_unknown_host_discovery_directory;
+
+	public static String RemoteBundleDiscoveryStrategy_unrecognized_discovery_url;
+
+	public static String SiteVerifier_Error_with_cause;
+
+	public static String SiteVerifier_Unexpected_Error;
+
+	public static String SiteVerifier_Verify_Job_Label;
+
+	public static String TransportUtil_InternalError;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		// constructor
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java
new file mode 100644
index 0000000..707aa94
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java
@@ -0,0 +1,310 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     Sonatype, Inc. - added caching support
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.*;
+import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.*;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Directory.Entry;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil.TextContentProcessor;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * A discovery strategy that downloads a simple directory of remote jars. The directory is first downloaded, then each
+ * remote jar is downloaded.
+ * 
+ * @author David Green
+ */
+ at SuppressWarnings("restriction")
+public class RemoteBundleDiscoveryStrategy extends BundleDiscoveryStrategy {
+
+	private String directoryUrl;
+
+	private DiscoveryRegistryStrategy registryStrategy;
+
+	private File temporaryStorage;
+
+	private int maxDiscoveryJarDownloadAttempts = 1;
+
+	@Override
+	public void performDiscovery(IProgressMonitor monitor) throws CoreException {
+		if (items == null || categories == null || directoryUrl == null || tags == null) {
+			throw new IllegalStateException();
+		}
+		if (registryStrategy != null) {
+			throw new IllegalStateException();
+		}
+
+		final int totalTicks = 100000;
+		final int ticksTenPercent = totalTicks / 10;
+		monitor.beginTask(Messages.RemoteBundleDiscoveryStrategy_task_remote_discovery, totalTicks);
+		try {
+			File registryCacheFolder;
+			try {
+				if (temporaryStorage != null && temporaryStorage.exists()) {
+					delete(temporaryStorage);
+				}
+				temporaryStorage = File.createTempFile(RemoteBundleDiscoveryStrategy.class.getSimpleName(), ".tmp"); //$NON-NLS-1$
+				temporaryStorage.delete();
+				if (!temporaryStorage.mkdirs()) {
+					throw new IOException();
+				}
+				registryCacheFolder = new File(temporaryStorage, ".rcache"); //$NON-NLS-1$
+				if (!registryCacheFolder.mkdirs()) {
+					throw new IOException();
+				}
+			} catch (IOException e) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.RemoteBundleDiscoveryStrategy_io_failure_temp_storage, e));
+			}
+			if (monitor.isCanceled()) {
+				return;
+			}
+
+			Directory directory;
+			try {
+				final Directory[] temp = new Directory[1];
+				TransportUtil.readResource(new URI(directoryUrl), new TextContentProcessor() {
+					public void process(Reader reader) throws IOException {
+						DirectoryParser parser = new DirectoryParser();
+						temp[0] = parser.parse(reader);
+					}
+				}, new SubProgressMonitor(monitor, ticksTenPercent));
+				directory = temp[0];
+				if (directory == null) {
+					throw new IllegalStateException();
+				}
+			} catch (UnknownHostException e) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.RemoteBundleDiscoveryStrategy_unknown_host_discovery_directory, e.getMessage()), e));
+			} catch (URISyntaxException e) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.RemoteBundleDiscoveryStrategy_Invalid_source_specified_Error, directoryUrl), e));
+			} catch (IOException e) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.RemoteBundleDiscoveryStrategy_io_failure_discovery_directory, e));
+			}
+			if (monitor.isCanceled()) {
+				return;
+			}
+			if (directory.getEntries().isEmpty()) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.RemoteBundleDiscoveryStrategy_empty_directory));
+			}
+
+			Map<File, Directory.Entry> bundleFileToDirectoryEntry = new HashMap<File, Directory.Entry>();
+
+			ExecutorService executorService = createExecutorService(directory.getEntries().size());
+			try {
+				List<Future<DownloadBundleJob>> futures = new ArrayList<Future<DownloadBundleJob>>();
+				// submit jobs
+				for (Directory.Entry entry : directory.getEntries()) {
+					futures.add(executorService.submit(new DownloadBundleJob(entry, monitor)));
+				}
+				int futureSize = ticksTenPercent * 4 / directory.getEntries().size();
+				// collect job results
+				for (Future<DownloadBundleJob> job : futures) {
+					try {
+						DownloadBundleJob bundleJob;
+						for (;;) {
+							try {
+								bundleJob = job.get(1L, TimeUnit.SECONDS);
+								break;
+							} catch (TimeoutException e) {
+								if (monitor.isCanceled()) {
+									return;
+								}
+							}
+						}
+						if (bundleJob.file != null) {
+							bundleFileToDirectoryEntry.put(bundleJob.file, bundleJob.entry);
+						}
+						monitor.worked(futureSize);
+					} catch (ExecutionException e) {
+						Throwable cause = e.getCause();
+						if (cause instanceof OperationCanceledException) {
+							monitor.setCanceled(true);
+							return;
+						}
+						IStatus status;
+						if (cause instanceof CoreException) {
+							status = ((CoreException) cause).getStatus();
+						} else {
+							status = new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.RemoteBundleDiscoveryStrategy_unexpectedError, cause);
+						}
+						// log errors but continue on
+						LogHelper.log(status);
+					} catch (InterruptedException e) {
+						monitor.setCanceled(true);
+						return;
+					}
+				}
+			} finally {
+				executorService.shutdownNow();
+			}
+
+			try {
+				registryStrategy = new DiscoveryRegistryStrategy(new File[] {registryCacheFolder}, new boolean[] {false}, this);
+				registryStrategy.setBundles(bundleFileToDirectoryEntry);
+				IExtensionRegistry extensionRegistry = new ExtensionRegistry(registryStrategy, this, this);
+				try {
+					IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(ConnectorDiscoveryExtensionReader.EXTENSION_POINT_ID);
+					if (extensionPoint != null) {
+						IExtension[] extensions = extensionPoint.getExtensions();
+						if (extensions.length > 0) {
+							processExtensions(new SubProgressMonitor(monitor, ticksTenPercent * 3), extensions);
+						}
+					}
+				} finally {
+					extensionRegistry.stop(this);
+				}
+			} finally {
+				registryStrategy = null;
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	private class DownloadBundleJob implements Callable<DownloadBundleJob> {
+		private final IProgressMonitor monitor;
+
+		private final Entry entry;
+
+		private File file;
+
+		public DownloadBundleJob(Entry entry, IProgressMonitor monitor) {
+			this.entry = entry;
+			this.monitor = monitor;
+		}
+
+		public DownloadBundleJob call() {
+
+			String bundleUrl = entry.getLocation();
+			for (int attemptCount = 0; attemptCount < maxDiscoveryJarDownloadAttempts; ++attemptCount) {
+				try {
+					String lastPathElement = bundleUrl.lastIndexOf('/') == -1 ? bundleUrl : bundleUrl.substring(bundleUrl.lastIndexOf('/'));
+					File target = File.createTempFile(lastPathElement.replaceAll("^[a-zA-Z0-9_.]", "_") + "_", ".jar", temporaryStorage); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+
+					if (monitor.isCanceled()) {
+						break;
+					}
+
+					TransportUtil.downloadResource(new URI(bundleUrl), target, new NullProgressMonitor() {
+						@Override
+						public boolean isCanceled() {
+							return super.isCanceled() || monitor.isCanceled();
+						}
+					}/*don't use sub progress monitor here*/);
+					file = target;
+				} catch (URISyntaxException e) {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.RemoteBundleDiscoveryStrategy_Invalid_source_specified_Error, bundleUrl), e));
+				} catch (IOException e) {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.RemoteBundleDiscoveryStrategy_cannot_download_bundle, bundleUrl, e.getMessage()), e));
+					if (isUnknownHostException(e)) {
+						break;
+					}
+				} catch (CoreException e) {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.RemoteBundleDiscoveryStrategy_cannot_download_bundle, bundleUrl, e.getMessage()), e));
+				}
+			}
+			return this;
+		}
+	}
+
+	private ExecutorService createExecutorService(int size) {
+		final int maxThreads = 4;
+		return Executors.newFixedThreadPool(Math.min(size, maxThreads));
+	}
+
+	/**
+	 * walk the exception chain to determine if the given exception or any of its underlying causes are an
+	 * {@link UnknownHostException}.
+	 * 
+	 * @return true if the exception or one of its causes are {@link UnknownHostException}.
+	 */
+	private boolean isUnknownHostException(Throwable t) {
+		while (t != null) {
+			if (t instanceof UnknownHostException) {
+				return true;
+			}
+			Throwable t2 = t.getCause();
+			if (t2 == t) {
+				break;
+			}
+			t = t2;
+		}
+		return false;
+	}
+
+	private void delete(File file) {
+		if (file.exists()) {
+			if (file.isDirectory()) {
+				File[] children = file.listFiles();
+				if (children != null) {
+					for (File child : children) {
+						delete(child);
+					}
+				}
+			}
+			if (!file.delete()) {
+				// fail quietly
+			}
+		}
+	}
+
+	@Override
+	public void dispose() {
+		super.dispose();
+		if (temporaryStorage != null) {
+			delete(temporaryStorage);
+		}
+	}
+
+	public String getDirectoryUrl() {
+		return directoryUrl;
+	}
+
+	public void setDirectoryUrl(String directoryUrl) {
+		this.directoryUrl = directoryUrl;
+	}
+
+	@Override
+	protected AbstractCatalogSource computeDiscoverySource(IContributor contributor) {
+		Entry directoryEntry = registryStrategy.getDirectoryEntry(contributor);
+		Policy policy = new Policy(directoryEntry.isPermitCategories());
+		JarDiscoverySource discoverySource = new JarDiscoverySource(contributor.getName(), registryStrategy.getJarFile(contributor));
+		discoverySource.setPolicy(policy);
+		return discoverySource;
+	}
+
+	/**
+	 * indicate how many times discovyer jar downloads should be attempted
+	 */
+	public int getMaxDiscoveryJarDownloadAttempts() {
+		return maxDiscoveryJarDownloadAttempts;
+	}
+
+	/**
+	 * indicate how many times discovyer jar downloads should be attempted
+	 * 
+	 * @param maxDiscoveryJarDownloadAttempts
+	 *            a number >= 1
+	 */
+	public void setMaxDiscoveryJarDownloadAttempts(int maxDiscoveryJarDownloadAttempts) {
+		if (maxDiscoveryJarDownloadAttempts < 1 || maxDiscoveryJarDownloadAttempts > 2) {
+			throw new IllegalArgumentException();
+		}
+		this.maxDiscoveryJarDownloadAttempts = maxDiscoveryJarDownloadAttempts;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/SiteVerifier.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/SiteVerifier.java
new file mode 100644
index 0000000..4f6cf71
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/SiteVerifier.java
@@ -0,0 +1,131 @@
+package org.eclipse.equinox.internal.p2.discovery.compatibility;
+
+import java.net.URI;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.util.TransportUtil;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Verifies if site URIs point to valid P2 repositories.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class SiteVerifier {
+
+	private final Catalog catalog;
+
+	public SiteVerifier(Catalog catalog) {
+		this.catalog = catalog;
+	}
+
+	/**
+	 * Determine update site availability. This may be performed automatically as part of discovery when
+	 * {@link #isVerifyUpdateSiteAvailability()} is true, or it may be invoked later by calling this method.
+	 */
+	public void verifySiteAvailability(IProgressMonitor monitor) {
+		// NOTE: we don't put java.net.URLs in the map since it involves DNS activity when
+		//       computing the hash code.
+		Map<String, Collection<CatalogItem>> urlToDescriptors = new HashMap<String, Collection<CatalogItem>>();
+
+		for (CatalogItem descriptor : catalog.getItems()) {
+			String url = descriptor.getSiteUrl();
+			if (url == null) {
+				continue;
+			}
+			if (!url.endsWith("/")) { //$NON-NLS-1$
+				url += "/"; //$NON-NLS-1$
+			}
+			Collection<CatalogItem> collection = urlToDescriptors.get(url);
+			if (collection == null) {
+				collection = new ArrayList<CatalogItem>();
+				urlToDescriptors.put(url, collection);
+			}
+			collection.add(descriptor);
+		}
+		final int totalTicks = urlToDescriptors.size();
+		monitor.beginTask(Messages.SiteVerifier_Verify_Job_Label, totalTicks);
+		try {
+			if (!urlToDescriptors.isEmpty()) {
+				ExecutorService executorService = Executors.newFixedThreadPool(Math.min(urlToDescriptors.size(), 4));
+				try {
+					List<Future<VerifyUpdateSiteJob>> futures = new ArrayList<Future<VerifyUpdateSiteJob>>(urlToDescriptors.size());
+					for (String url : urlToDescriptors.keySet()) {
+						futures.add(executorService.submit(new VerifyUpdateSiteJob(url)));
+					}
+					for (Future<VerifyUpdateSiteJob> jobFuture : futures) {
+						try {
+							for (;;) {
+								try {
+									VerifyUpdateSiteJob job = jobFuture.get(1L, TimeUnit.SECONDS);
+
+									Collection<CatalogItem> descriptors = urlToDescriptors.get(job.url);
+									for (CatalogItem descriptor : descriptors) {
+										descriptor.setAvailable(job.ok);
+									}
+									break;
+								} catch (TimeoutException e) {
+									if (monitor.isCanceled()) {
+										return;
+									}
+								}
+							}
+						} catch (InterruptedException e) {
+							monitor.setCanceled(true);
+							return;
+						} catch (ExecutionException e) {
+							if (e.getCause() instanceof OperationCanceledException) {
+								monitor.setCanceled(true);
+								return;
+							}
+							LogHelper.log(computeStatus(e, Messages.SiteVerifier_Unexpected_Error));
+						}
+						monitor.worked(1);
+					}
+				} finally {
+					executorService.shutdownNow();
+				}
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	private IStatus computeStatus(ExecutionException e, String message) {
+		Throwable cause = e.getCause();
+		if (cause.getMessage() != null) {
+			message = NLS.bind(Messages.SiteVerifier_Error_with_cause, message, cause.getMessage());
+		}
+		return new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, message, e);
+	}
+
+	private static class VerifyUpdateSiteJob implements Callable<VerifyUpdateSiteJob> {
+
+		private final String url;
+
+		private boolean ok = false;
+
+		public VerifyUpdateSiteJob(String url) {
+			this.url = url;
+		}
+
+		public VerifyUpdateSiteJob call() throws Exception {
+			URL baseUrl = new URL(url);
+			List<URI> locations = new ArrayList<URI>();
+			for (String location : new String[] {"content.jar", "content.xml", "site.xml", "compositeContent.jar", "compositeContent.xml"}) { //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+				locations.add(new URL(baseUrl, location).toURI());
+			}
+			ok = TransportUtil.verifyAvailability(locations, true, new NullProgressMonitor());
+			return this;
+		}
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/messages.properties
new file mode 100644
index 0000000..f20bfad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/messages.properties
@@ -0,0 +1,43 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+#      Sonatype, Inc. - added caching support
+###############################################################################
+BundleDiscoveryStrategy_3={0}: {1}
+BundleDiscoveryStrategy_categoryDisallowed=Cannot create category ''{0}'' with id ''{1}'' from {2}: disallowed
+BundleDiscoveryStrategy_task_loading_local_extensions=Loading local extensions
+BundleDiscoveryStrategy_task_processing_extensions=Processing extensions
+BundleDiscoveryStrategy_unexpected_element=unexpected element ''{0}''
+CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found.
+CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}.
+CacheManager_FailedCommunication_0=Communication with {0} failed.
+CacheManage_ErrorRenamingCache=An error occurred while downloading {0}. The cache file {1} could not be renamed to {2}.
+ConnectorDiscoveryExtensionReader_Documents=Documents
+ConnectorDiscoveryExtensionReader_Tasks=Tasks
+ConnectorDiscoveryExtensionReader_unexpected_element_icon=Unexpected element icon
+ConnectorDiscoveryExtensionReader_unexpected_element_overview=Unexpected element overview
+ConnectorDiscoveryExtensionReader_unexpected_value_kind=Unexpected value for kind
+ConnectorDiscoveryExtensionReader_Version_Control=Version Control
+DirectoryParser_no_directory=Unexpected content: no directory available
+DirectoryParser_unexpected_element=Unexpected element ''{0}''
+DiscoveryRegistryStrategy_cannot_load_bundle=Cannot load bundle {0} from url {1}: {2}
+DiscoveryRegistryStrategy_missing_pluginxml=no plugin.xml in bundle
+RemoteBundleDiscoveryStrategy_cannot_download_bundle=Cannot download bundle at {0}: {1}
+RemoteBundleDiscoveryStrategy_empty_directory=Discovery directory is empty
+RemoteBundleDiscoveryStrategy_Invalid_source_specified_Error=Invalid source location specified: ''{0}''
+RemoteBundleDiscoveryStrategy_io_failure_discovery_directory=IO failure: cannot load discovery directory
+RemoteBundleDiscoveryStrategy_io_failure_temp_storage=IO failure: cannot create temporary storage area
+RemoteBundleDiscoveryStrategy_task_remote_discovery=remote discovery
+RemoteBundleDiscoveryStrategy_unexpectedError=Unexpected error
+RemoteBundleDiscoveryStrategy_unknown_host_discovery_directory=Cannot access {0}: unknown host: please check your Internet connection and try again.
+RemoteBundleDiscoveryStrategy_unrecognized_discovery_url=Unrecognized discovery bundle URL: {0}
+SiteVerifier_Error_with_cause={0}: {1}
+SiteVerifier_Unexpected_Error=Unexpected error while verifying site availability
+SiteVerifier_Verify_Job_Label=Verifying availability
+TransportUtil_InternalError=Internal Error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java
new file mode 100644
index 0000000..adf3b99
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java
@@ -0,0 +1,218 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc - additional implementation
+ *     Sonatype, Inc. - additional implementation and p2 discovery support
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility.util;
+
+import java.io.*;
+import java.net.URI;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Activator;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Messages;
+import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
+import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
+import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * A class to manage discovery cache files. Creating the cache files will place
+ * the file in the plugin state location in a cache directory.
+ */
+ at SuppressWarnings("restriction")
+public class CacheManager {
+
+	private static final String PREFIX = "discovery"; //$NON-NLS-1$
+
+	private static final String DOWNLOADING = "downloading"; //$NON-NLS-1$
+
+	private final RepositoryTransport transport;
+
+	/**
+	 * IStateful implementation of BufferedOutputStream. Class is used to get the status from
+	 * a download operation.
+	 */
+	private static class StatefulStream extends BufferedOutputStream implements IStateful {
+		private IStatus status;
+
+		public StatefulStream(OutputStream stream) {
+			super(stream);
+		}
+
+		public IStatus getStatus() {
+
+			return status;
+		}
+
+		public void setStatus(IStatus aStatus) {
+			status = aStatus;
+		}
+
+	}
+
+	public CacheManager(RepositoryTransport transport) {
+		this.transport = transport;
+	}
+
+	/**
+	 * Returns a hash of the location.
+	 */
+	private int computeHash(URI location) {
+		return location.hashCode();
+	}
+
+	/**
+	 * Returns a local cache file with the contents of the given remote location,
+	 * or <code>null</code> if a local cache could not be created.
+	 * 
+	 * @param location the remote location to be cached
+	 * @param monitor a progress monitor
+	 * @return A {@link File} object pointing to the cache file or <code>null</code>
+	 * @throws FileNotFoundException if neither jar nor xml index file exists at given location 
+	 * @throws AuthenticationFailedException if jar not available and xml causes authentication fail
+	 * @throws IOException on general IO errors
+	 * @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
+	 * @throws OperationCanceledException - if user cancelled
+	 */
+	public File createCache(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
+		SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
+		try {
+			File cacheFile = getCache(location);
+
+			boolean stale = true;
+			long lastModified = 0L;
+
+			if (cacheFile != null) {
+				lastModified = cacheFile.lastModified();
+			}
+			// get last modified on jar
+			long lastModifiedRemote = 0L;
+			// bug 269588 - server may return 0 when file exists, so extra flag is needed
+			try {
+				lastModifiedRemote = transport.getLastModified(location, submonitor.newChild(1));
+				if (lastModifiedRemote <= 0)
+					LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + location)); //$NON-NLS-1$
+			} catch (AuthenticationFailedException e) {
+				// it is not meaningful to continue - the credentials are for the server
+				// do not pass the exception - it gives no additional meaningful user information
+				throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, location), null));
+			} catch (CoreException e) {
+				throw new ProvisionException(e.getStatus());
+			} catch (OperationCanceledException e) {
+				// must pass this on
+				throw e;
+			}
+			if (submonitor.isCanceled())
+				throw new OperationCanceledException();
+			stale = lastModifiedRemote > lastModified || lastModifiedRemote <= 0;
+
+			if (!stale)
+				return cacheFile;
+
+			// The cache is stale or missing, so we need to update it from the remote location
+			cacheFile = getCacheFile(location);
+			updateCache(cacheFile, location, lastModifiedRemote, submonitor);
+			return cacheFile;
+		} finally {
+			submonitor.done();
+		}
+	}
+
+	/**
+	 * Deletes the local cache file(s) for the given location
+	 * @param location
+	 */
+	void deleteCache(URI location) {
+		File cacheFile = getCache(location);
+		// delete the cache file if it exists
+		safeDelete(cacheFile);
+		// delete a resumable download if it exists
+		safeDelete(new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName()));
+	}
+
+	/**
+	 * Determines the local file paths of the locations potential cache file.
+	 * @param location The location to compute the cache for
+	 * @param PREFIX The prefix to use for this location
+	 * @return A {@link File} array with the cache files for JAR and XML extensions.
+	 */
+	private File getCache(URI location) {
+		File cacheFile = getCacheFile(location);
+		return cacheFile.exists() ? cacheFile : null;
+	}
+
+	private File getCacheFile(URI location) {
+		return new File(getCacheDirectory(), PREFIX + computeHash(location));
+	}
+
+	/**
+	 * Returns the file corresponding to the data area to be used by the cache manager.
+	 */
+	protected File getCacheDirectory() {
+		return Activator.getDefault().getStateLocation().append("cache").toFile(); //$NON-NLS-1$
+	}
+
+	private boolean safeDelete(File file) {
+		if (file.exists()) {
+			if (!file.delete()) {
+				file.deleteOnExit();
+				return true;
+			}
+		}
+		return false;
+	}
+
+	protected void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
+		cacheFile.getParentFile().mkdirs();
+		File downloadDir = new File(cacheFile.getParentFile(), DOWNLOADING);
+		if (!downloadDir.exists())
+			downloadDir.mkdir();
+		File tempFile = new File(downloadDir, cacheFile.getName());
+		// Ensure that the file from a previous download attempt is removed 
+		if (tempFile.exists())
+			safeDelete(tempFile);
+
+		tempFile.createNewFile();
+
+		StatefulStream stream = null;
+		try {
+			stream = new StatefulStream(new FileOutputStream(tempFile));
+		} catch (Exception e) {
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+		}
+		IStatus result = null;
+		try {
+			submonitor.setWorkRemaining(1000);
+			result = transport.download(remoteFile, stream, submonitor.newChild(1000));
+		} catch (OperationCanceledException e) {
+			// need to pick up the status - a new operation canceled exception is thrown at the end
+			// as status will be CANCEL.
+			result = stream.getStatus();
+		} finally {
+			stream.close();
+			// If there was any problem fetching the file, delete the temp file
+			if (result == null || !result.isOK())
+				safeDelete(tempFile);
+		}
+		if (result.isOK()) {
+			if (cacheFile.exists())
+				safeDelete(cacheFile);
+			if (tempFile.renameTo(cacheFile))
+				return;
+			result = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.CacheManage_ErrorRenamingCache, new Object[] {remoteFile.toString(), tempFile.getAbsolutePath(), cacheFile.getAbsolutePath()}));
+		}
+
+		if (result.getSeverity() == IStatus.CANCEL || submonitor.isCanceled())
+			throw new OperationCanceledException();
+		throw new ProvisionException(result);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/DefaultSaxErrorHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/DefaultSaxErrorHandler.java
new file mode 100644
index 0000000..06d2210
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/DefaultSaxErrorHandler.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility.util;
+
+import org.xml.sax.*;
+
+/**
+ * A default implementation of an error handler that throws exceptions on all errors.
+ * 
+ * @author David Green
+ */
+public class DefaultSaxErrorHandler implements ErrorHandler {
+
+	public void warning(SAXParseException exception) throws SAXException {
+		// ignore
+	}
+
+	public void fatalError(SAXParseException exception) throws SAXException {
+		throw exception;
+	}
+
+	public void error(SAXParseException exception) throws SAXException {
+		throw exception;
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/IOWithCauseException.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/IOWithCauseException.java
new file mode 100644
index 0000000..89b911b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/IOWithCauseException.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.compatibility.util;
+
+import java.io.IOException;
+
+/**
+ * An IO Exception that allows for {@link #getCause() a cause}.
+ * 
+ * @author David Green
+ */
+public class IOWithCauseException extends IOException {
+
+	private static final long serialVersionUID = 1L;
+
+	private final Throwable cause;
+
+	public IOWithCauseException(String message, Throwable cause) {
+		super(message);
+		this.cause = cause;
+	}
+
+	public IOWithCauseException(Throwable cause) {
+		this.cause = cause;
+	}
+
+	@Override
+	public Throwable getCause() {
+		return cause;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/TransportUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/TransportUtil.java
new file mode 100644
index 0000000..59e9892
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/TransportUtil.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     Sonatype, Inc. - transport split and caching support
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.compatibility.util;
+
+import java.io.*;
+import java.net.URI;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Activator;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.Messages;
+import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
+import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
+
+/**
+ * A utility for accessing web resources
+ * 
+ * @author David Green
+ */
+public class TransportUtil {
+
+	/**
+	 * Extend to process character content.
+	 * 
+	 * @see TransportUtil#readResource(URI, TextContentProcessor, IProgressMonitor)
+	 */
+	public interface TextContentProcessor {
+
+		public void process(Reader reader) throws IOException;
+
+	}
+
+	/**
+	 * Download an HTTP-based resource
+	 * 
+	 * @param target
+	 *            the target file to which the content is saved
+	 * @param location
+	 *            the web location of the content
+	 * @param monitor
+	 *            the monitor
+	 * @throws IOException
+	 *             if a network or IO problem occurs
+	 * @throws CoreException 
+	 */
+	public static void downloadResource(URI location, File target, IProgressMonitor monitor) throws IOException, CoreException {
+		CacheManager cm = Activator.getDefault().getCacheManager();
+		File cacheFile = cm.createCache(location, monitor);
+		if (cacheFile == null) {
+			throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.TransportUtil_InternalError));
+		}
+		copyStream(new BufferedInputStream(new FileInputStream(cacheFile)), true, new BufferedOutputStream(new FileOutputStream(target)), true);
+	}
+
+	public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
+		try {
+			int written = 0;
+			byte[] buffer = new byte[16 * 1024];
+			int len;
+			while ((len = in.read(buffer)) != -1) {
+				out.write(buffer, 0, len);
+				written += len;
+			}
+			return written;
+		} finally {
+			try {
+				if (closeIn) {
+					in.close();
+				}
+			} finally {
+				if (closeOut) {
+					out.close();
+				}
+			}
+		}
+	}
+
+	/**
+	 * Read a web-based resource at the specified location using the given processor.
+	 * 
+	 * @param location
+	 *            the web location of the content
+	 * @param processor
+	 *            the processor that will handle content
+	 * @param monitor
+	 *            the monitor
+	 * @throws IOException
+	 *             if a network or IO problem occurs
+	 * @throws CoreException
+	 */
+	public static void readResource(URI location, TextContentProcessor processor, IProgressMonitor monitor) throws IOException, CoreException {
+		CacheManager cm = Activator.getDefault().getCacheManager();
+		File cacheFile = cm.createCache(location, monitor);
+		if (cacheFile == null) {
+			throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.TransportUtil_InternalError));
+		}
+		InputStream in = new BufferedInputStream(new FileInputStream(cacheFile));
+		try {
+			// FIXME how can the charset be determined?
+			BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8")); //$NON-NLS-1$
+			processor.process(reader);
+		} finally {
+			in.close();
+		}
+	}
+
+	/**
+	 * Verify availability of resources at the given web locations. Normally this would be done using an HTTP HEAD.
+	 * 
+	 * @param locations
+	 *            the locations of the resource to verify
+	 * @param one
+	 *            indicate if only one of the resources must exist
+	 * @param monitor
+	 *            the monitor
+	 * @return true if the resource exists
+	 * @throws CoreException
+	 * @throws AuthenticationFailedException
+	 */
+	public static boolean verifyAvailability(List<? extends URI> locations, boolean one, IProgressMonitor monitor) throws IOException, CoreException {
+		if (locations.isEmpty() || locations.size() > 5) {
+			throw new IllegalArgumentException();
+		}
+		int countFound = 0;
+		for (URI location : locations) {
+			try {
+				new RepositoryTransport().getLastModified(location, monitor);
+				if (one) {
+					return true;
+				}
+				++countFound;
+			} catch (FileNotFoundException e) {
+				if (!one) {
+					return false;
+				}
+				continue;
+			}
+		}
+		return countFound == locations.size();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/xsd/directory.xsd b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/xsd/directory.xsd
new file mode 100644
index 0000000..8ffd96c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery.compatibility/xsd/directory.xsd
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns:tns="http://www.eclipse.org/mylyn/discovery/directory/" 
+	xmlns="http://www.w3.org/2001/XMLSchema" 
+	targetNamespace="http://www.eclipse.org/mylyn/discovery/directory/">
+	
+	<annotation>
+		<documentation>
+		Describes the XML format used by a Mylyn discovery directory.
+		</documentation>
+	</annotation>
+	
+	<complexType name="OpenAttrsComplex">
+		<annotation>
+			<documentation>extend this type to allow for attributes from other namespaces</documentation>
+		</annotation>
+		<complexContent>
+			<restriction base="anyType">
+				<anyAttribute namespace="##other" processContents="lax"/>
+			</restriction>
+		</complexContent>
+	</complexType>
+	
+	
+    <element name="directory">
+    	<complexType>
+    		<complexContent>
+				<extension base="tns:OpenAttrsComplex">
+		    		<sequence>
+		    			<element ref="tns:entry" minOccurs="0" maxOccurs="unbounded"/>
+		    		</sequence>
+    			</extension>
+    		</complexContent>
+    	</complexType>
+    </element>
+    
+    <element name="entry">
+		<complexType>
+ 			<complexContent>
+				<extension base="tns:OpenAttrsComplex">
+					<attribute name="url" type="anyURI"/>
+					<attribute name="permitCategories" type="boolean"/>
+				</extension>
+			</complexContent>
+		</complexType>
+	</element>
+</schema>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.classpath
new file mode 100644
index 0000000..9364019
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
+		<accessrules>
+			<accessrule kind="accessible" pattern="org/eclipse/equinox/internal/p2/core/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.gitignore b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.project b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.project
new file mode 100644
index 0000000..997b422
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.discovery</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..c65423d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,349 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..8f3db4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,57 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_core
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.staticondemandthreshold=3
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.format_source_code=true
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..ec06d1d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Tue Feb 16 15:42:45 PST 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000..d8c6d26
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000..1935f1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Feb 16 15:42:45 PST 2010
+commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..5937a85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,24 @@
+#Tue May 20 17:39:22 PDT 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=2
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c209808
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.equinox.p2.discovery;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.3.0",
+ org.eclipse.equinox.p2.core;bundle-version="2.0.0"
+Export-Package: org.eclipse.equinox.internal.p2.discovery;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository",
+ org.eclipse.equinox.internal.p2.discovery.model;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository",
+ org.eclipse.equinox.internal.p2.discovery.util;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository"
+Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/about.html b/eclipse/plugins/org.eclipse.equinox.p2.discovery/about.html
new file mode 100644
index 0000000..bc6e2b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>July 3, 2008</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery/build.properties
new file mode 100644
index 0000000..4057797
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/build.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Tasktop Technologies - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties
+src.includes = about.html
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery/plugin.properties
new file mode 100644
index 0000000..38b4c3f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+extension-point.name = Connector Discovery
+Bundle-Vendor = Eclipse.org - Equinox
+Bundle-Name = Equinox Provisioning Discovery
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.discovery/pom.xml
new file mode 100644
index 0000000..e306864
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.discovery</artifactId>
+  <version>1.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java
new file mode 100644
index 0000000..44f2066
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery;
+
+import java.net.URL;
+
+/**
+ * @author David Green
+ */
+public abstract class AbstractCatalogSource {
+
+	private Policy policy = Policy.defaultPolicy();
+
+	/**
+	 * an identifier that can be used to determine the origin of the source, typically for logging purposes.
+	 */
+	public abstract Object getId();
+
+	/**
+	 * get a resource by an URL relative to the root of the source.
+	 * 
+	 * @param resourceName
+	 *            the relative resource name
+	 * @return an URL to the resource, or null if it is known that the resource does not exist.
+	 */
+	public abstract URL getResource(String resourceName);
+
+	public Policy getPolicy() {
+		return policy;
+	}
+
+	public void setPolicy(Policy policy) {
+		this.policy = policy;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java
new file mode 100644
index 0000000..e45cf86
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery;
+
+import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+
+/**
+ * An abstraction of a strategy for discovering connectors and categories. Strategy design pattern. Note that strategies
+ * are not reusable and must be disposed.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public abstract class AbstractDiscoveryStrategy {
+
+	protected List<CatalogCategory> categories;
+
+	protected List<Certification> certifications;
+
+	protected List<CatalogItem> items;
+
+	protected List<Tag> tags;
+
+	public void dispose() {
+		// ignore
+	}
+
+	public List<CatalogCategory> getCategories() {
+		return categories;
+	}
+
+	public List<Certification> getCertifications() {
+		return certifications;
+	}
+
+	public List<CatalogItem> getItems() {
+		return items;
+	}
+
+	public List<Tag> getTags() {
+		return tags;
+	}
+
+	/**
+	 * Perform discovery and add discovered items to {@link #getCategories() categories} and {@link #getItems()}.
+	 */
+	public abstract void performDiscovery(IProgressMonitor monitor) throws CoreException;
+
+	public void setCategories(List<CatalogCategory> categories) {
+		this.categories = categories;
+	}
+
+	public void setCertifications(List<Certification> certifications) {
+		this.certifications = certifications;
+	}
+
+	public void setItems(List<CatalogItem> connectors) {
+		this.items = connectors;
+	}
+
+	public void setTags(List<Tag> itemKinds) {
+		this.tags = itemKinds;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
new file mode 100644
index 0000000..411854d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
@@ -0,0 +1,318 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.*;
+
+/**
+ * A means of discovering connectors.
+ * 
+ * @author David Green
+ */
+public class Catalog {
+
+	private List<CatalogItem> items = Collections.emptyList();
+
+	private List<CatalogCategory> categories = Collections.emptyList();
+
+	private List<Certification> certifications = Collections.emptyList();
+
+	private List<CatalogItem> filteredItems = Collections.emptyList();
+
+	private final List<AbstractDiscoveryStrategy> discoveryStrategies = new ArrayList<AbstractDiscoveryStrategy>();
+
+	private List<Tag> tags = Collections.emptyList();
+
+	private Dictionary<Object, Object> environment = System.getProperties();
+
+	private boolean verifyUpdateSiteAvailability = false;
+
+	private Map<String, Version> featureToVersion = null;
+
+	public Catalog() {
+		// constructor
+	}
+
+	/**
+	 * get the discovery strategies to use.
+	 */
+	public List<AbstractDiscoveryStrategy> getDiscoveryStrategies() {
+		return discoveryStrategies;
+	}
+
+	/**
+	 * Initialize this by performing discovery. Discovery may take a long time as it involves network access.
+	 * PRECONDITION: must add at least one {@link #getDiscoveryStrategies() discovery strategy} prior to calling.
+	 */
+	public IStatus performDiscovery(IProgressMonitor monitor) {
+		MultiStatus status = new MultiStatus(DiscoveryCore.ID_PLUGIN, 0, Messages.Catalog_Failed_to_discovery_all_Error, null);
+		if (discoveryStrategies.isEmpty()) {
+			throw new IllegalStateException();
+		}
+		List<CatalogItem> newItems = new ArrayList<CatalogItem>();
+		List<CatalogCategory> newCategories = new ArrayList<CatalogCategory>();
+		List<Certification> newCertifications = new ArrayList<Certification>();
+		List<Tag> newTags = new ArrayList<Tag>();
+
+		final int totalTicks = 100000;
+		final int discoveryTicks = totalTicks - (totalTicks / 10);
+		monitor.beginTask(Messages.Catalog_task_discovering_connectors, totalTicks);
+		try {
+			for (AbstractDiscoveryStrategy discoveryStrategy : discoveryStrategies) {
+				if (monitor.isCanceled()) {
+					status.add(Status.CANCEL_STATUS);
+					break;
+				}
+				discoveryStrategy.setCategories(newCategories);
+				discoveryStrategy.setItems(newItems);
+				discoveryStrategy.setCertifications(newCertifications);
+				discoveryStrategy.setTags(newTags);
+				try {
+					discoveryStrategy.performDiscovery(new SubProgressMonitor(monitor, discoveryTicks / discoveryStrategies.size()));
+				} catch (CoreException e) {
+					status.add(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_Strategy_failed_Error, discoveryStrategy.getClass().getSimpleName()), e));
+				}
+			}
+
+			update(newCategories, newItems, newCertifications, newTags);
+		} finally {
+			monitor.done();
+		}
+		return status;
+	}
+
+	protected void update(List<CatalogCategory> newCategories, List<CatalogItem> newItems, List<Certification> newCertifications, List<Tag> newTags) {
+		this.categories = newCategories;
+		this.items = newItems;
+		this.certifications = newCertifications;
+		this.tags = newTags;
+		this.filteredItems = new ArrayList<CatalogItem>();
+
+		filterDescriptors();
+		connectCategoriesToDescriptors();
+		connectCertificationsToDescriptors();
+	}
+
+	/**
+	 * get the top-level categories
+	 * 
+	 * @return the categories, or an empty list if there are none.
+	 */
+	public List<CatalogCategory> getCategories() {
+		return categories;
+	}
+
+	/**
+	 * get the connectors that were discovered and not filtered
+	 * 
+	 * @return the connectors, or an empty list if there are none.
+	 */
+	public List<CatalogItem> getItems() {
+		return items;
+	}
+
+	public List<Tag> getTags() {
+		return tags;
+	}
+
+	/**
+	 * get the connectors that were discovered but filtered
+	 * 
+	 * @return the filtered connectors, or an empty list if there were none.
+	 */
+	public List<CatalogItem> getFilteredItems() {
+		return filteredItems;
+	}
+
+	/**
+	 * get a list of known certifications
+	 * 
+	 * @return the certifications, or an empty list if there are none.
+	 */
+	public List<Certification> getCertifications() {
+		return certifications;
+	}
+
+	/**
+	 * The environment used to resolve {@link CatalogItem#getPlatformFilter() platform filters}. Defaults to the
+	 * current environment.
+	 */
+	public Dictionary<Object, Object> getEnvironment() {
+		return environment;
+	}
+
+	/**
+	 * The environment used to resolve {@link CatalogItem#getPlatformFilter() platform filters}. Defaults to the
+	 * current environment.
+	 */
+	public void setEnvironment(Dictionary<Object, Object> environment) {
+		if (environment == null) {
+			throw new IllegalArgumentException();
+		}
+		this.environment = environment;
+	}
+
+	/**
+	 * indicate if update site availability should be verified. The default is false.
+	 * 
+	 * @see CatalogItem#getAvailable()
+	 * @see #setVerifyUpdateSiteAvailability(boolean)
+	 */
+	public boolean isVerifyUpdateSiteAvailability() {
+		return verifyUpdateSiteAvailability;
+	}
+
+	/**
+	 * indicate if update site availability should be verified. The default is false.
+	 * 
+	 * @see CatalogItem#getAvailable()
+	 * @see #isVerifyUpdateSiteAvailability()
+	 */
+	public void setVerifyUpdateSiteAvailability(boolean verifyUpdateSiteAvailability) {
+		this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
+	}
+
+	/**
+	 * <em>not for general use: public for testing purposes only</em> A map of installed features to their version. Used
+	 * to resolve {@link CatalogItem#getFeatureFilter() feature filters}.
+	 */
+	public Map<String, Version> getFeatureToVersion() {
+		return featureToVersion;
+	}
+
+	/**
+	 * <em>not for general use: public for testing purposes only</em> A map of installed features to their version. Used
+	 * to resolve {@link CatalogItem#getFeatureFilter() feature filters}.
+	 */
+	public void setFeatureToVersion(Map<String, Version> featureToVersion) {
+		this.featureToVersion = featureToVersion;
+	}
+
+	private void connectCertificationsToDescriptors() {
+		Map<String, Certification> idToCertification = new HashMap<String, Certification>();
+		for (Certification certification : certifications) {
+			Certification previous = idToCertification.put(certification.getId(), certification);
+			if (previous != null) {
+				LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind("Duplicate certification id ''{0}'': declaring sources: {1}, {2}", //$NON-NLS-1$
+						new Object[] {certification.getId(), certification.getSource().getId(), previous.getSource().getId()})));
+			}
+		}
+
+		for (CatalogItem connector : items) {
+			if (connector.getCertificationId() != null) {
+				Certification certification = idToCertification.get(connector.getCertificationId());
+				if (certification != null) {
+					connector.setCertification(certification);
+				} else {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind("Unknown category ''{0}'' referenced by connector ''{1}'' declared in {2}", new Object[] { //$NON-NLS-1$
+							connector.getCertificationId(), connector.getId(), connector.getSource().getId()})));
+				}
+			}
+		}
+	}
+
+	private void connectCategoriesToDescriptors() {
+		Map<String, CatalogCategory> idToCategory = new HashMap<String, CatalogCategory>();
+		for (CatalogCategory category : categories) {
+			CatalogCategory previous = idToCategory.put(category.getId(), category);
+			if (previous != null) {
+				LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_duplicate_category_id, new Object[] {category.getId(), category.getSource().getId(), previous.getSource().getId()})));
+			}
+		}
+
+		for (CatalogItem connector : items) {
+			CatalogCategory category = idToCategory.get(connector.getCategoryId());
+			if (category != null) {
+				category.getItems().add(connector);
+				connector.setCategory(category);
+			} else {
+				LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_bundle_references_unknown_category, new Object[] {connector.getCategoryId(), connector.getId(), connector.getSource().getId()})));
+			}
+		}
+	}
+
+	/**
+	 * eliminate any connectors whose {@link CatalogItem#getPlatformFilter() platform filters} don't match
+	 */
+	private void filterDescriptors() {
+		for (CatalogItem connector : new ArrayList<CatalogItem>(items)) {
+			if (connector.getPlatformFilter() != null && connector.getPlatformFilter().trim().length() > 0) {
+				boolean match = false;
+				try {
+					Filter filter = FrameworkUtil.createFilter(connector.getPlatformFilter());
+					match = filter.match(environment);
+				} catch (InvalidSyntaxException e) {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_illegal_filter_syntax, new Object[] {connector.getPlatformFilter(), connector.getId(), connector.getSource().getId()})));
+				}
+				if (!match) {
+					items.remove(connector);
+					filteredItems.add(connector);
+				}
+			}
+			for (FeatureFilter featureFilter : connector.getFeatureFilter()) {
+				if (featureToVersion == null) {
+					featureToVersion = computeFeatureToVersion();
+				}
+				boolean match = false;
+				Version version = featureToVersion.get(featureFilter.getFeatureId());
+				if (version != null) {
+					VersionRange versionRange = new VersionRange(featureFilter.getVersion());
+					if (versionRange.isIncluded(version)) {
+						match = true;
+					}
+				}
+				if (!match) {
+					items.remove(connector);
+					filteredItems.add(connector);
+					break;
+				}
+			}
+		}
+	}
+
+	private Map<String, Version> computeFeatureToVersion() {
+		Map<String, Version> map = new HashMap<String, Version>();
+		for (IBundleGroupProvider provider : Platform.getBundleGroupProviders()) {
+			for (IBundleGroup bundleGroup : provider.getBundleGroups()) {
+				for (Bundle bundle : bundleGroup.getBundles()) {
+					map.put(bundle.getSymbolicName(), bundle.getVersion());
+				}
+			}
+		}
+		return map;
+	}
+
+	public void dispose() {
+		for (final AbstractDiscoveryStrategy strategy : discoveryStrategies) {
+			SafeRunner.run(new ISafeRunnable() {
+
+				public void run() throws Exception {
+					strategy.dispose();
+				}
+
+				public void handleException(Throwable exception) {
+					LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.Catalog_exception_disposing + strategy.getClass().getName(), exception));
+				}
+			});
+		}
+	}
+
+	public void setTags(List<Tag> tags) {
+		this.tags = new ArrayList<Tag>(tags);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
new file mode 100644
index 0000000..4f02074
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author David Green
+ */
+public abstract class DiscoveryCore {
+
+	public static final String ID_PLUGIN = "org.eclipse.equinox.p2.discovery"; //$NON-NLS-1$
+
+	private DiscoveryCore() {
+	}
+
+	public static Dictionary<Object, Object> createEnvironment() {
+		Dictionary<Object, Object> environment = new Hashtable<Object, Object>(System.getProperties());
+		// add the installed Mylyn version to the environment so that we can
+		// have
+		// connectors that are filtered based on version of Mylyn
+		IProduct product = Platform.getProduct();
+		if (product != null) {
+			environment.put("org.eclipse.product.id", product.getId()); //$NON-NLS-1$
+		}
+		return environment;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java
new file mode 100644
index 0000000..a6bbe4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.discovery.messages"; //$NON-NLS-1$
+
+	public static String Catalog_bundle_references_unknown_category;
+
+	public static String Catalog_duplicate_category_id;
+
+	public static String Catalog_exception_disposing;
+
+	public static String Catalog_Failed_to_discovery_all_Error;
+
+	public static String Catalog_illegal_filter_syntax;
+
+	public static String Catalog_Strategy_failed_Error;
+
+	public static String Catalog_task_discovering_connectors;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java
new file mode 100644
index 0000000..63b3d64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery;
+
+/**
+ * A policy defines what is permitted.
+ * 
+ * @author David Green
+ */
+public class Policy {
+
+	/**
+	 * Define system property <code>org.eclipse.mylyn.internal.discovery.core.model.Policy.permissive=true</code> to
+	 * allow for categories to be permitted by anyone. For testing purposes.
+	 */
+	private static final boolean PERMISSIVE = Boolean.getBoolean(Policy.class.getName() + ".permissive"); //$NON-NLS-1$
+
+	private static final Policy DEFAULT = new Policy(false);
+
+	private final boolean permitCategories;
+
+	public Policy(boolean permitCategories) {
+		this.permitCategories = permitCategories;
+	}
+
+	public boolean isPermitCategories() {
+		return permitCategories || PERMISSIVE;
+	}
+
+	public static Policy defaultPolicy() {
+		return DEFAULT;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties
new file mode 100644
index 0000000..c0f5d07
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+Catalog_bundle_references_unknown_category=Unknown category ''{0}'' referenced by connector ''{1}'' declared in {2}
+Catalog_duplicate_category_id=Duplicate category id ''{0}'': declaring sources: {1}, {2}
+Catalog_exception_disposing=exception disposing 
+Catalog_Failed_to_discovery_all_Error=Failed to discover all connectors.
+Catalog_illegal_filter_syntax=Illegal filter syntax ''{0}'' in connector ''{1}'' declared in {2}
+Catalog_Strategy_failed_Error={0} failed with an error
+Catalog_task_discovering_connectors=Retrieving listing
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java
new file mode 100644
index 0000000..f70a962
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * @author Steffen Pingel
+ */
+public class AbstractCatalogItem {
+
+	private Object data;
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
new file mode 100644
index 0000000..bb1b636
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
@@ -0,0 +1,152 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+
+/**
+ * @author David Green
+ */
+public class CatalogCategory extends AbstractCatalogItem {
+
+	private AbstractCatalogSource source;
+
+	private final List<CatalogItem> items = new ArrayList<CatalogItem>();
+
+	protected String id;
+
+	protected String name;
+
+	protected String description;
+
+	protected String relevance;
+
+	protected Icon icon;
+
+	protected Overview overview;
+
+	protected java.util.List<Group> group = new java.util.ArrayList<Group>();
+
+	public List<CatalogItem> getItems() {
+		return items;
+	}
+
+	public AbstractCatalogSource getSource() {
+		return source;
+	}
+
+	public void setSource(AbstractCatalogSource source) {
+		this.source = source;
+	}
+
+	/**
+	 * an id that uniquely identifies the category
+	 */
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * the name of the category, as it is displayed in the ui.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * A description of the category
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * A relevance, which is a number from 0 to 100. Categories with higher relevance are displayed with preference in
+	 * the UI.
+	 */
+	public String getRelevance() {
+		return relevance;
+	}
+
+	public void setRelevance(String relevance) {
+		this.relevance = relevance;
+	}
+
+	public Icon getIcon() {
+		return icon;
+	}
+
+	public void setIcon(Icon icon) {
+		this.icon = icon;
+	}
+
+	public Overview getOverview() {
+		return overview;
+	}
+
+	public void setOverview(Overview overview) {
+		this.overview = overview;
+	}
+
+	public java.util.List<Group> getGroup() {
+		return group;
+	}
+
+	public void setGroup(java.util.List<Group> group) {
+		this.group = group;
+	}
+
+	public void validate() throws ValidationException {
+		if (id == null || id.length() == 0) {
+			throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_id);
+		}
+		if (name == null || name.length() == 0) {
+			throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_name);
+		}
+		if (description == null || description.length() == 0) {
+			throw new ValidationException("Must specify connectorCategory/@description"); //$NON-NLS-1$
+		}
+		if (icon != null) {
+			icon.validate();
+		}
+		if (relevance != null) {
+			try {
+				int r = Integer.parseInt(relevance, 10);
+				if (r < 0 || r > 100) {
+					throw new NumberFormatException();
+				}
+			} catch (NumberFormatException e) {
+				throw new ValidationException(Messages.CatalogCategory_CatalogCategory_relevance_invalid);
+			}
+		}
+		if (overview != null) {
+			overview.validate();
+		}
+		for (Group groupItem : group) {
+			groupItem.validate();
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
new file mode 100644
index 0000000..0359f65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
@@ -0,0 +1,366 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.net.MalformedURLException;
+import java.util.*;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+
+/**
+ * @author David Green
+ */
+public class CatalogItem extends AbstractCatalogItem {
+
+	private AbstractCatalogSource source;
+
+	private CatalogCategory category;
+
+	private boolean selected;
+
+	private Boolean available;
+
+	private Certification certification;
+
+	private final PropertyChangeSupport changeSupport;
+
+	private boolean installed;
+
+	private Set<Tag> tags;
+
+	protected String name;
+
+	protected String provider;
+
+	protected String license;
+
+	protected String description;
+
+	protected String siteUrl;
+
+	protected String id;
+
+	protected String categoryId;
+
+	protected String platformFilter;
+
+	protected String groupId;
+
+	protected java.util.List<FeatureFilter> featureFilter = new java.util.ArrayList<FeatureFilter>();
+
+	protected java.util.List<String> installableUnits = new java.util.ArrayList<String>();
+
+	protected Icon icon;
+
+	protected Overview overview;
+
+	protected String certificationId;
+
+	public CatalogItem() {
+		changeSupport = new PropertyChangeSupport(this);
+	}
+
+	public CatalogCategory getCategory() {
+		return category;
+	}
+
+	public void setCategory(CatalogCategory category) {
+		this.category = category;
+	}
+
+	public AbstractCatalogSource getSource() {
+		return source;
+	}
+
+	public void setSource(AbstractCatalogSource source) {
+		this.source = source;
+	}
+
+	public Certification getCertification() {
+		return certification;
+	}
+
+	public void setCertification(Certification certification) {
+		this.certification = certification;
+	}
+
+	/**
+	 * support selection
+	 * 
+	 * @return true if the item is selected, otherwise false
+	 */
+	public boolean isSelected() {
+		return selected;
+	}
+
+	/**
+	 * support selection
+	 * 
+	 * @param selected
+	 *            true if the item is selected, otherwise false
+	 */
+	public void setSelected(boolean selected) {
+		this.selected = selected;
+	}
+
+	/**
+	 * indicate if this connector is available
+	 * 
+	 * @return true if available, false if not, or null if availability is unknown
+	 */
+	public Boolean getAvailable() {
+		return available;
+	}
+
+	/**
+	 * indicate if this connector is available
+	 * 
+	 * @param available
+	 *            true if available, false if not, or null if availability is unknown
+	 */
+	public void setAvailable(Boolean available) {
+		if (available != this.available || (available != null && !available.equals(this.available))) {
+			Boolean previous = this.available;
+			this.available = available;
+			changeSupport.firePropertyChange("available", previous, this.available); //$NON-NLS-1$
+		}
+	}
+
+	public void addPropertyChangeListener(PropertyChangeListener listener) {
+		changeSupport.addPropertyChangeListener(listener);
+	}
+
+	public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+		changeSupport.addPropertyChangeListener(propertyName, listener);
+	}
+
+	public void removePropertyChangeListener(PropertyChangeListener listener) {
+		changeSupport.removePropertyChangeListener(listener);
+	}
+
+	public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+		changeSupport.removePropertyChangeListener(propertyName, listener);
+	}
+
+	/**
+	 * the name of the connector including the name of the organization that produces the repository if appropriate, for
+	 * example 'Mozilla Bugzilla'.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * The name of the organization that supplies the connector.
+	 */
+	public String getProvider() {
+		return provider;
+	}
+
+	public void setProvider(String provider) {
+		this.provider = provider;
+	}
+
+	/**
+	 * The short name of the license, for example 'EPL 1.0', 'GPL 2.0', or 'Commercial'.
+	 */
+	public String getLicense() {
+		return license;
+	}
+
+	public void setLicense(String license) {
+		this.license = license;
+	}
+
+	/**
+	 * A description of the connector. Plug-ins should provide a description, especially if the description is not
+	 * self-evident from the @name and
+	 * 
+	 * @organization.
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * The URL of the update site containing the connector.
+	 */
+	public String getSiteUrl() {
+		return siteUrl;
+	}
+
+	public void setSiteUrl(String siteUrl) {
+		this.siteUrl = siteUrl;
+	}
+
+	/**
+	 * The id of the feature that installs this connector
+	 */
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * the id of the connectorCategory in which this connector belongs
+	 */
+	public String getCategoryId() {
+		return categoryId;
+	}
+
+	public void setCategoryId(String categoryId) {
+		this.categoryId = categoryId;
+	}
+
+	public String getCertificationId() {
+		return certificationId;
+	}
+
+	public void setCertificationId(String certificationId) {
+		this.certificationId = certificationId;
+	}
+
+	/**
+	 * E.g., "(& (osgi.os=macosx) (osgi.ws=carbon))"
+	 */
+	public String getPlatformFilter() {
+		return platformFilter;
+	}
+
+	public void setPlatformFilter(String platformFilter) {
+		this.platformFilter = platformFilter;
+	}
+
+	/**
+	 * The id of the connectorCategory group. See group/@id for more details.
+	 */
+	public String getGroupId() {
+		return groupId;
+	}
+
+	public void setGroupId(String groupId) {
+		this.groupId = groupId;
+	}
+
+	public java.util.List<FeatureFilter> getFeatureFilter() {
+		return featureFilter;
+	}
+
+	public void setFeatureFilter(java.util.List<FeatureFilter> featureFilter) {
+		this.featureFilter = featureFilter;
+	}
+
+	public Icon getIcon() {
+		return icon;
+	}
+
+	public void setIcon(Icon icon) {
+		this.icon = icon;
+	}
+
+	public Overview getOverview() {
+		return overview;
+	}
+
+	public void setOverview(Overview overview) {
+		this.overview = overview;
+	}
+
+	public void validate() throws ValidationException {
+		if (name == null || name.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_name);
+		}
+		if (provider == null || provider.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_provider);
+		}
+		if (license == null || license.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_license);
+		}
+		if (siteUrl == null || siteUrl.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_siteUrl);
+		}
+		try {
+			new java.net.URL(siteUrl);
+		} catch (MalformedURLException e) {
+			throw new ValidationException(Messages.CatalogItem_invalid_CatalogItem_siteUrl);
+		}
+		if (id == null || id.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_id);
+		}
+		if (categoryId == null || categoryId.length() == 0) {
+			throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_categoryId);
+		}
+		for (FeatureFilter featureFilterItem : featureFilter) {
+			featureFilterItem.validate();
+		}
+		if (icon != null) {
+			icon.validate();
+		}
+		if (overview != null) {
+			overview.validate();
+		}
+	}
+
+	public java.util.List<String> getInstallableUnits() {
+		return installableUnits;
+	}
+
+	public void setInstallableUnits(java.util.List<String> installableUnits) {
+		this.installableUnits = installableUnits;
+	}
+
+	public boolean isInstalled() {
+		return installed;
+	}
+
+	public void setInstalled(boolean installed) {
+		this.installed = installed;
+	}
+
+	public Set<Tag> getTags() {
+		if (tags == null) {
+			return Collections.emptySet();
+		} else {
+			return Collections.unmodifiableSet(tags);
+		}
+	}
+
+	public boolean hasTag(Tag tag) {
+		return tags == null ? false : tags.contains(tag);
+	}
+
+	public void addTag(Tag tag) {
+		if (tags == null) {
+			tags = new HashSet<Tag>();
+		}
+		tags.add(tag);
+	}
+
+	public boolean removeTag(Tag tag) {
+		if (tags == null) {
+			return false;
+		}
+		return tags.remove(tag);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java
new file mode 100644
index 0000000..4122aa8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+
+/**
+ * @author Steffen Pingel
+ */
+public class Certification {
+
+	private AbstractCatalogSource source;
+
+	protected String id;
+
+	protected String name;
+
+	protected String description;
+
+	protected Icon icon;
+
+	protected String url;
+
+	public AbstractCatalogSource getSource() {
+		return source;
+	}
+
+	public void setSource(AbstractCatalogSource source) {
+		this.source = source;
+	}
+
+	/**
+	 * an id that uniquely identifies the category
+	 */
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * the name of the category, as it is displayed in the ui.
+	 */
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * A description of the category
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public Icon getIcon() {
+		return icon;
+	}
+
+	public void setIcon(Icon icon) {
+		this.icon = icon;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public void validate() throws ValidationException {
+		if (id == null || id.length() == 0) {
+			throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_id);
+		}
+		if (name == null || name.length() == 0) {
+			throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_name);
+		}
+		if (icon != null) {
+			icon.validate();
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java
new file mode 100644
index 0000000..4e9d50b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * A means of specifying that a feature must be present in order for the connectorDescriptor to be presented to the
+ * user.
+ * 
+ * @author David Green
+ */
+public class FeatureFilter {
+
+	protected String featureId;
+
+	protected String version;
+
+	protected CatalogItem item;
+
+	public FeatureFilter() {
+	}
+
+	/**
+	 * The id of the feature to test
+	 */
+	public String getFeatureId() {
+		return featureId;
+	}
+
+	public void setFeatureId(String featureId) {
+		this.featureId = featureId;
+	}
+
+	/**
+	 * A version specifier, specified in the same manner as version dependencies are specified in an OSGi manifest. For
+	 * example: "[3.0,4.0)"
+	 */
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public CatalogItem getItem() {
+		return item;
+	}
+
+	public void setItem(CatalogItem catalogItem) {
+		this.item = catalogItem;
+	}
+
+	public void validate() throws ValidationException {
+		if (featureId == null || featureId.length() == 0) {
+			throw new ValidationException(Messages.FeatureFilter_must_specify_featureFilter_featureId);
+		}
+		if (version == null || version.length() == 0) {
+			throw new ValidationException(Messages.FeatureFilter_must_specify_featureFilter_version);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java
new file mode 100644
index 0000000..d59aa8e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Task top Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * groups provide a way to anchor connectors in a grouping with other like entries.
+ * 
+ * @author David Green
+ */
+public class Group {
+
+	protected String id;
+
+	protected CatalogCategory category;
+
+	public Group() {
+	}
+
+	/**
+	 * An identifier that identifies the group. Must be unique for a particular connectorCategory.
+	 */
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public CatalogCategory getCategory() {
+		return category;
+	}
+
+	public void setCategory(CatalogCategory category) {
+		this.category = category;
+	}
+
+	public void validate() throws ValidationException {
+		if (id == null || id.length() == 0) {
+			throw new ValidationException(Messages.Group_must_specify_group_id);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java
new file mode 100644
index 0000000..dc3edb6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * @author David Green
+ */
+public class Icon {
+
+	protected String image16;
+
+	protected String image32;
+
+	protected String image48;
+
+	protected String image64;
+
+	protected String image128;
+
+	public Icon() {
+	}
+
+	public String getImage16() {
+		return image16;
+	}
+
+	public void setImage16(String image16) {
+		this.image16 = image16;
+	}
+
+	public String getImage32() {
+		return image32;
+	}
+
+	public void setImage32(String image32) {
+		this.image32 = image32;
+	}
+
+	public String getImage48() {
+		return image48;
+	}
+
+	public void setImage48(String image48) {
+		this.image48 = image48;
+	}
+
+	public String getImage64() {
+		return image64;
+	}
+
+	public void setImage64(String image64) {
+		this.image64 = image64;
+	}
+
+	public String getImage128() {
+		return image128;
+	}
+
+	public void setImage128(String image128) {
+		this.image128 = image128;
+	}
+
+	public void validate() throws ValidationException {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java
new file mode 100644
index 0000000..3446f4e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.discovery.model.messages"; //$NON-NLS-1$
+
+	public static String CatalogCategory_CatalogCategory_relevance_invalid;
+
+	public static String CatalogCategory_must_specify_CatalogCategory_id;
+
+	public static String CatalogCategory_must_specify_CatalogCategory_name;
+
+	public static String CatalogItem_invalid_CatalogItem_siteUrl;
+
+	public static String CatalogItem_must_specify_CatalogItem_categoryId;
+
+	public static String CatalogItem_must_specify_CatalogItem_id;
+
+	public static String CatalogItem_must_specify_CatalogItem_license;
+
+	public static String CatalogItem_must_specify_CatalogItem_name;
+
+	public static String CatalogItem_must_specify_CatalogItem_provider;
+
+	public static String CatalogItem_must_specify_CatalogItem_siteUrl;
+
+	public static String FeatureFilter_must_specify_featureFilter_featureId;
+
+	public static String FeatureFilter_must_specify_featureFilter_version;
+
+	public static String Group_must_specify_group_id;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java
new file mode 100644
index 0000000..f1ab32c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * @author David Green
+ */
+public class Overview {
+
+	protected String summary;
+
+	protected String url;
+
+	protected String screenshot;
+
+	protected CatalogItem item;
+
+	protected CatalogCategory category;
+
+	public Overview() {
+	}
+
+	/**
+	 * A description providing detailed information about the item. Newlines can be used to format the text into
+	 * multiple paragraphs if necessary. Text must fit into an area 320x240, otherwise it will be truncated in the UI.
+	 * More lengthy descriptions can be provided on a web page if required, see @url.
+	 */
+	public String getSummary() {
+		return summary;
+	}
+
+	public void setSummary(String summary) {
+		this.summary = summary;
+	}
+
+	/**
+	 * An URL that points to a web page with more information relevant to the connector or category.
+	 */
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	/**
+	 * 320x240 PNG, JPEG or GIF
+	 */
+	public String getScreenshot() {
+		return screenshot;
+	}
+
+	public void setScreenshot(String screenshot) {
+		this.screenshot = screenshot;
+	}
+
+	public CatalogItem getItem() {
+		return item;
+	}
+
+	public void setItem(CatalogItem item) {
+		this.item = item;
+	}
+
+	public CatalogCategory getCategory() {
+		return category;
+	}
+
+	public void setCategory(CatalogCategory category) {
+		this.category = category;
+	}
+
+	public void validate() throws ValidationException {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java
new file mode 100644
index 0000000..f4f1f8b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+/**
+ * Provides means to tag items in the catalog.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class Tag extends AbstractCatalogItem {
+
+	private final Object classifier;
+
+	private final String value;
+
+	private final String label;
+
+	public Tag(String value, String label) {
+		this(null, value, label);
+	}
+
+	public Tag(Object tagClassifier, String value, String label) {
+		this.classifier = tagClassifier;
+		this.value = value;
+		this.label = label;
+	}
+
+	/**
+	 * the classifier, which places the tag in a logical category
+	 * 
+	 * @return the classifier or null if this tag is not in any category
+	 */
+	public Object getTagClassifier() {
+		return classifier;
+	}
+
+	/**
+	 * Returns the value of the tag, not intended for display.
+	 */
+	public String getValue() {
+		return value;
+	}
+
+	/**
+	 * Returns a short user-visible value that is used by the user to identify the tag.
+	 */
+	public String getLabel() {
+		return label;
+	}
+
+	@Override
+	public String toString() {
+		return "Tag [classifier=" + classifier + ", value=" + value + ", label=" + label + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	}
+
+	@Override
+	public int hashCode() {
+		// we don't include the label here
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((classifier == null) ? 0 : classifier.hashCode());
+		result = prime * result + ((value == null) ? 0 : value.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		// we don't consider the label when comparing equality
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		Tag other = (Tag) obj;
+		if (classifier == null) {
+			if (other.classifier != null) {
+				return false;
+			}
+		} else if (!classifier.equals(other.classifier)) {
+			return false;
+		}
+		if (value == null) {
+			if (other.value != null) {
+				return false;
+			}
+		} else if (!value.equals(other.value)) {
+			return false;
+		}
+		return true;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java
new file mode 100644
index 0000000..2035d22
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.model;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+
+/**
+ * Indicate that a validation has occurred on the model.
+ * 
+ * @author David Green
+ */
+public class ValidationException extends CoreException {
+
+	private static final long serialVersionUID = -7542361242327905294L;
+
+	public ValidationException(String message) {
+		super(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, message));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties
new file mode 100644
index 0000000..8b0f428
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+CatalogCategory_CatalogCategory_relevance_invalid=connectorCategory/@relevance must be an integer >= 0 and <= 100
+CatalogCategory_must_specify_CatalogCategory_id=Must specify connectorCategory/@id
+CatalogCategory_must_specify_CatalogCategory_name=Must specify connectorCategory/@name
+CatalogItem_invalid_CatalogItem_siteUrl=Invalid connectorDescriptor/@siteUrl
+CatalogItem_must_specify_CatalogItem_categoryId=Must specify connectorDescriptor/@categoryId
+CatalogItem_must_specify_CatalogItem_id=Must specify connectorDescriptor/@id
+CatalogItem_must_specify_CatalogItem_license=Must specify connectorDescriptor/@license
+CatalogItem_must_specify_CatalogItem_name=Must specify connectorDescriptor/@name
+CatalogItem_must_specify_CatalogItem_provider=Must specify connectorDescriptor/@provider
+CatalogItem_must_specify_CatalogItem_siteUrl=Must specify connectorDescriptor/@siteUrl
+FeatureFilter_must_specify_featureFilter_featureId=Must specify featureFilter/@featureId
+FeatureFilter_must_specify_featureFilter_version=Must specify featureFilter/@version
+Group_must_specify_group_id=Must specify group/@id
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
new file mode 100644
index 0000000..80e2fc3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.discovery.util;
+
+import java.util.Comparator;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+
+/**
+ * A comparator that orders categories by relevance and name.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class CatalogCategoryComparator implements Comparator<CatalogCategory> {
+
+	public int compare(CatalogCategory o1, CatalogCategory o2) {
+		if (o1 == o2) {
+			return 0;
+		}
+		String r1 = o1.getRelevance();
+		String r2 = o2.getRelevance();
+		int i = 0;
+		if (r1 != null && r2 != null) {
+			// don't have to worry about format, since they were already validated
+			// note that higher relevance appears first, thus the reverse order of
+			// the comparison.
+			i = new Integer(r2).compareTo(new Integer(r1));
+		} else if (r1 == null && r2 != null) {
+			return 1;
+		} else if (r2 == null && r1 != null) {
+			return -1;
+		}
+		if (i == 0) {
+			i = o1.getName().compareToIgnoreCase(o2.getName());
+			if (i == 0) {
+				i = o1.getId().compareTo(o2.getId());
+			}
+		}
+		return i;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java
new file mode 100644
index 0000000..116e3d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.discovery.util;
+
+import java.util.Comparator;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+
+/**
+ * A comparator that orders connectors by group and alphabetically by their name.
+ * 
+ * @author David Green
+ */
+public class CatalogItemComparator implements Comparator<CatalogItem> {
+
+	/**
+	 * compute the index of the group id
+	 * 
+	 * @param groupId
+	 *            the group id or null
+	 * @return the index, or -1 if not found
+	 */
+	private int computeGroupIndex(CatalogCategory category, String groupId) {
+		if (groupId != null) {
+			int index = -1;
+			for (Group group : category.getGroup()) {
+				++index;
+				if (group.getId().equals(groupId)) {
+					return index;
+				}
+			}
+		}
+		return -1;
+	}
+
+	public int compare(CatalogItem o1, CatalogItem o2) {
+		if (o1.getCategory() != o2.getCategory()) {
+			throw new IllegalArgumentException();
+		}
+		if (o1 == o2) {
+			return 0;
+		}
+		int g1 = computeGroupIndex(o1.getCategory(), o1.getGroupId());
+		int g2 = computeGroupIndex(o2.getCategory(), o2.getGroupId());
+		int i;
+		if (g1 != g2) {
+			if (g1 == -1) {
+				i = 1;
+			} else if (g2 == -1) {
+				i = -1;
+			} else {
+				i = g1 - g2;
+			}
+		} else {
+			i = o1.getName().compareToIgnoreCase(o2.getName());
+			if (i == 0) {
+				i = o1.getId().compareTo(o2.getId());
+			}
+		}
+		return i;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.engine/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/.project b/eclipse/plugins/org.eclipse.equinox.p2.engine/.project
index 8fc2ba3..80984bc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs
index c98c987..0c57496 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Feb 22 09:19:01 EST 2008
+#Mon Dec 21 23:51:30 CET 2009
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
index 88c82d0..48d9847 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
@@ -1,64 +1,54 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.engine;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.engine;singleton:=true
+Bundle-Version: 2.0.1.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.engine.EngineActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.102.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.engine;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives",
- org.eclipse.equinox.internal.provisional.p2.engine;
-  x-friends:="org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.director.app,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.garbagecollector,
-   org.eclipse.equinox.p2.installer,
-   org.eclipse.equinox.p2.reconciler.dropins,
+Export-Package: org.eclipse.equinox.internal.p2.engine;
+  x-friends:="org.eclipse.equinox.p2.garbagecollector,
    org.eclipse.equinox.p2.touchpoint.eclipse,
    org.eclipse.equinox.p2.touchpoint.natives,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.sdk,
    org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.p2.engine.phases;x-friends:="org.eclipse.equinox.p2.ui,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.director.app"
+   org.eclipse.pde.build",
+ org.eclipse.equinox.internal.p2.engine.phases;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.ui.sdk.scheduler",
+ org.eclipse.equinox.p2.engine;version="2.0.0",
+ org.eclipse.equinox.p2.engine.query;version="2.0.0",
+ org.eclipse.equinox.p2.engine.spi;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common,
+ org.eclipse.equinox.registry,
+ org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.100",
+ org.eclipse.core.jobs;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,2.1.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,2.1.0)",
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,2.1.0)"
+Eclipse-RegisterBuddy: org.eclipse.equinox.p2.metadata.repository
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Service-Component: OSGI-INF/profileRegistry.xml, OSGI-INF/engine.xml
 Import-Package: javax.xml.parsers,
  org.eclipse.core.internal.preferences,
  org.eclipse.core.runtime.preferences,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.metadata.repository.io,
- org.eclipse.equinox.internal.p2.persistence,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.security.storage;version="1.0.0",
  org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.1.0",
+ org.eclipse.osgi.service.debug;version="1.1.0",
+ org.eclipse.osgi.service.security;version="1.0.0",
  org.eclipse.osgi.signedcontent;version="1.0.0",
  org.eclipse.osgi.util;version="1.0.0",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.prefs,
- org.osgi.util.tracker;version="1.3.3",
+ org.osgi.util.tracker;version="1.4.0",
  org.xml.sax
-Bundle-Activator: org.eclipse.equinox.internal.p2.engine.EngineActivator
-Eclipse-LazyStart: true
-Eclipse-RegisterBuddy: org.eclipse.equinox.p2.metadata.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.registry,
- org.eclipse.osgi,
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.100",
- org.eclipse.core.jobs;bundle-version="[3.4.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml b/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml
new file mode 100644
index 0000000..e656d36
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.engine">
+   <implementation class="org.eclipse.equinox.internal.p2.engine.EngineComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.engine.IEngine"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml b/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml
new file mode 100644
index 0000000..3d4ac83
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.engine.registry">
+   <implementation class="org.eclipse.equinox.internal.p2.engine.ProfileRegistryComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.engine.IProfileRegistry"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.engine/build.properties
index 9e88140..c83017c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/build.properties
@@ -8,9 +8,9 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
+               OSGI-INF/,\
                .,\
                plugin.xml,\
                about.html,\
@@ -18,3 +18,6 @@ bin.includes = META-INF/,\
                .options
 src.includes = about.html,\
                schema/
+source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.engine/pom.xml
new file mode 100644
index 0000000..f3cd327
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.engine</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/actions.exsd b/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/actions.exsd
index 05b25cc..d1069d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/actions.exsd
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/actions.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.equinox.p2.engine" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.equinox.p2.engine" id="actions" name="Actions"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter description of this extension point.]
       </documentation>
@@ -12,9 +12,9 @@
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
@@ -39,9 +39,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -68,9 +68,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction:"/>
-               </appinfo>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.engine.spi.ProvisioningAction:"/>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="touchpointType" type="string">
@@ -98,36 +98,36 @@
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter the first release in which this extension point appears.]
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter extension point usage example here.]
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiinfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter API information here.]
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter information about supplied implementation of this extension point.]
       </documentation>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd b/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd
index 12534af..6635c97 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd
@@ -2,19 +2,19 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.equinox.p2.engine" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.equinox.p2.engine" id="touchpoints" name="Touchpoints"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         [Enter description of this extension point.]
+         Touchpoints are the provisioning system's interface to some part of the environment in which installable units are being installed. Defining a new touchpoint allows you to "teach" the provisioning system how to interact with some aspect of the environment (an operating system, another native application, etc).
       </documentation>
    </annotation>
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
@@ -39,9 +39,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -68,9 +68,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.engine.ITouchpoint"/>
-               </appinfo>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.engine.spi.Touchpoint:"/>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="description" type="string">
@@ -84,25 +84,25 @@
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         [Enter the first release in which this extension point appears.]
+         @since org.eclipse.equinox.p2.engine 1.0
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          <p>
    <pre>
- <extension point="org.eclipse.equinox.p2.engine.installAdaptors" id="eclipse" name="Eclipse Install Adaptor">
+ <extension point="org.eclipse.equinox.p2.engine.touchpoints" id="eclipse" name="My Touchpoint">
   <installAdaptor 
    type="eclipse" 
-   class="org.eclipse.equinox.internal.p2.eclipseAdaptor.EclipseInstallAdaptor"
+   class="com.xyz.MyTouchpoint"
    version="1.0.0"/>
  </extension>
    </pre>
@@ -111,22 +111,34 @@
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         [Enter API information here.]
+         Touchpoint implementations must extend org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         [Enter information about supplied implementation of this extension point.]
+         The platform provides touchpoint implementations for interacting with the operating system (org.eclipse.equinox.p2.native) and the OSGi framework (org.eclipse.equinox.p2.osgi).
       </documentation>
    </annotation>
 
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2008, 2009 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
 
 </schema>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java
index 514bd39..acbca84 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java
@@ -14,10 +14,10 @@ import java.util.HashMap;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.VersionRange;
 import org.eclipse.osgi.util.NLS;
 
 public class ActionManager implements IRegistryChangeListener {
@@ -28,8 +28,13 @@ public class ActionManager implements IRegistryChangeListener {
 	private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
 	private static final String TOUCHPOINT_TYPE = "touchpointType"; //$NON-NLS-1$
 	private static final String TOUCHPOINT_VERSION = "touchpointVersion"; //$NON-NLS-1$
+	/**
+	 * Service name constant for the action manager service. This service is used internally
+	 * by the engine implementation and should not be referenced directly by clients.
+	 */
+	public static final String SERVICE_NAME = ActionManager.class.getName();
 
-	private HashMap actionMap;
+	private HashMap<String, IConfigurationElement> actionMap;
 	private TouchpointManager touchpointManager;
 
 	public ActionManager() {
@@ -57,7 +62,7 @@ public class ActionManager implements IRegistryChangeListener {
 	}
 
 	public ProvisioningAction getAction(String actionId, VersionRange versionRange) {
-		IConfigurationElement actionElement = (IConfigurationElement) getActionMap().get(actionId);
+		IConfigurationElement actionElement = getActionMap().get(actionId);
 		if (actionElement != null && actionElement.isValid()) {
 			try {
 				ProvisioningAction action = (ProvisioningAction) actionElement.createExecutableExtension(ATTRIBUTE_CLASS);
@@ -80,12 +85,12 @@ public class ActionManager implements IRegistryChangeListener {
 		return null;
 	}
 
-	private synchronized Map getActionMap() {
+	private synchronized Map<String, IConfigurationElement> getActionMap() {
 		if (actionMap != null)
 			return actionMap;
 		IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(EngineActivator.ID, PT_ACTIONS);
 		IExtension[] extensions = point.getExtensions();
-		actionMap = new HashMap(extensions.length);
+		actionMap = new HashMap<String, IConfigurationElement>(extensions.length);
 		for (int i = 0; i < extensions.length; i++) {
 			try {
 				IConfigurationElement[] elements = extensions[i].getConfigurationElements();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java
new file mode 100644
index 0000000..e22bff6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+
+
+/**
+ * @since 2.0
+ */
+public class BeginOperationEvent extends TransactionEvent {
+
+	private static final long serialVersionUID = 6389318375739324865L;
+
+	public BeginOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
+		super(profile, phaseSet, operands, engine);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java
new file mode 100644
index 0000000..deb496f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+
+
+/**
+ * @since 2.0
+ */
+public class CommitOperationEvent extends TransactionEvent {
+	private static final long serialVersionUID = -523967775426133720L;
+
+	public CommitOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
+		super(profile, phaseSet, operands, engine);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
index 04df2df..437b200 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
@@ -14,9 +14,11 @@ import java.io.File;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.service.debug.DebugOptions;
 
 public class DebugHelper {
@@ -52,22 +54,23 @@ public class DebugHelper {
 		System.out.println(buffer.toString());
 	}
 
-	public static String formatArray(Object[] array, boolean toString, boolean newLines) {
-		if (array == null || array.length == 0)
+	public static String formatArray(Collection<? extends Object> array, boolean toString, boolean newLines) {
+		if (array == null || array.size() == 0)
 			return "[]"; //$NON-NLS-1$
 
 		StringBuffer buffer = new StringBuffer();
 		buffer.append('[');
-		int i = 0;
-		for (;;) {
+		boolean first = true;
+		for (Object elem : array) {
+			if (first)
+				first = false;
+			else
+				buffer.append(',');
+
 			if (toString)
-				buffer.append(array[i].toString());
+				buffer.append(elem.toString());
 			else
-				buffer.append(array[i].getClass().getName());
-			i++;
-			if (i == array.length)
-				break;
-			buffer.append(',');
+				buffer.append(elem.getClass().getName());
 			if (newLines)
 				buffer.append(DebugHelper.LINE_SEPARATOR);
 			else
@@ -99,7 +102,7 @@ public class DebugHelper {
 				operandStrings[i] = operands[i].toString();
 			}
 		}
-		return DebugHelper.formatArray(operandStrings, true, true);
+		return DebugHelper.formatArray(Arrays.asList(operandStrings), true, true);
 	}
 
 	public static String formatInstallableUnitOperand(InstallableUnitOperand iuOperand) {
@@ -116,19 +119,15 @@ public class DebugHelper {
 
 	public static String formatPhaseSet(PhaseSet phaseSet) {
 		StringBuffer buffer = new StringBuffer(phaseSet.getClass().getName());
-		buffer.append(DebugHelper.formatArray(phaseSet.getPhases(), false, false));
+		buffer.append(DebugHelper.formatArray(Arrays.asList(phaseSet.getPhases()), false, false));
 		return buffer.toString();
 	}
 
 	public static String formatContext(ProvisioningContext context) {
-		StringBuffer buffer = new StringBuffer();
-		buffer.append("{artifactRepos=" + DebugHelper.formatArray(context.getArtifactRepositories(), true, false)); //$NON-NLS-1$
-		buffer.append(", metadataRepos=" + DebugHelper.formatArray(context.getMetadataRepositories(), true, false)); //$NON-NLS-1$
-		buffer.append(", properties=" + context.getProperties() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
-		return buffer.toString();
+		return context.toString();
 	}
 
-	public static String formatAction(ProvisioningAction action, Map parameters) {
+	public static String formatAction(ProvisioningAction action, Map<String, Object> parameters) {
 		StringBuffer buffer = new StringBuffer();
 		buffer.append(action.getClass().getName());
 		if (action instanceof ParameterizedProvisioningAction) {
@@ -141,16 +140,16 @@ public class DebugHelper {
 		return buffer.toString();
 	}
 
-	public static String formatParameters(Map parameters) {
-		Iterator it = parameters.entrySet().iterator();
+	public static String formatParameters(Map<String, ? extends Object> parameters) {
+		Iterator<? extends Entry<String, ? extends Object>> it = parameters.entrySet().iterator();
 		if (!it.hasNext())
 			return "{}"; //$NON-NLS-1$
 
 		StringBuffer buffer = new StringBuffer();
 		buffer.append('{');
 		for (;;) {
-			Entry e = (Entry) it.next();
-			String key = (String) e.getKey();
+			Entry<String, ? extends Object> e = it.next();
+			String key = e.getKey();
 			buffer.append(key);
 			buffer.append('=');
 			Object value = e.getValue();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java
index 0030f83..8daa26b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,34 +11,32 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.engine;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.internal.p2.engine.phases.Collect;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
 
 public class DownloadManager {
 	private ProvisioningContext provContext = null;
-	ArrayList requestsToProcess = new ArrayList();
-
-	private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
+	ArrayList<IArtifactRequest> requestsToProcess = new ArrayList<IArtifactRequest>();
+	private IProvisioningAgent agent = null;
 
 	/**
-	 * This Comparator sorts the repositories such that ´local´ repositories are first
+	 * This Comparator sorts the repositories such that local repositories are first.
+	 * TODO: This is copied from the ProvisioningContext class. Can we combine them? 
+	 * See https://bugs.eclipse.org/335153.
 	 */
-	private static final Comparator LOCAL_FIRST_COMPARATOR = new Comparator() {
-
-		public int compare(Object arg0, Object arg1) {
-			Assert.isTrue(arg0 instanceof URI);
-			Assert.isTrue(arg1 instanceof URI);
-
-			String protocol0 = ((URI) arg0).getScheme();
-			String protocol1 = ((URI) arg1).getScheme();
+	private static final Comparator<IArtifactRepository> LOCAL_FIRST_COMPARATOR = new Comparator<IArtifactRepository>() {
+		private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
 
+		public int compare(IArtifactRepository arg0, IArtifactRepository arg1) {
+			String protocol0 = arg0.getLocation().getScheme();
+			String protocol1 = arg1.getLocation().getScheme();
 			if (FILE_PROTOCOL.equals(protocol0) && !FILE_PROTOCOL.equals(protocol1))
 				return -1;
 			if (!FILE_PROTOCOL.equals(protocol0) && FILE_PROTOCOL.equals(protocol1))
@@ -47,8 +45,9 @@ public class DownloadManager {
 		}
 	};
 
-	public DownloadManager(ProvisioningContext context) {
+	public DownloadManager(ProvisioningContext context, IProvisioningAgent agent) {
 		provContext = context;
+		this.agent = agent;
 	}
 
 	/*
@@ -68,8 +67,8 @@ public class DownloadManager {
 	}
 
 	private void filterUnfetched() {
-		for (Iterator iterator = requestsToProcess.iterator(); iterator.hasNext();) {
-			IArtifactRequest request = (IArtifactRequest) iterator.next();
+		for (Iterator<IArtifactRequest> iterator = requestsToProcess.iterator(); iterator.hasNext();) {
+			IArtifactRequest request = iterator.next();
 			if (request.getResult() != null && request.getResult().isOK()) {
 				iterator.remove();
 			}
@@ -80,51 +79,49 @@ public class DownloadManager {
 	 * Start the downloads. Return a status message indicating success or failure of the overall operation
 	 */
 	public IStatus start(IProgressMonitor monitor) {
-		SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.download_artifact, requestsToProcess.size());
+		SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.download_artifact, 1000);
 		try {
 			if (requestsToProcess.isEmpty())
 				return Status.OK_STATUS;
 
-			IArtifactRepositoryManager repoMgr = (IArtifactRepositoryManager) ServiceHelper.getService(EngineActivator.getContext(), IArtifactRepositoryManager.class.getName());
-			URI[] repositories = null;
-			if (provContext == null || provContext.getArtifactRepositories() == null)
-				repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
-			else
-				repositories = provContext.getArtifactRepositories();
+			if (provContext == null)
+				provContext = new ProvisioningContext(agent);
+
+			IQueryable<IArtifactRepository> repoQueryable = provContext.getArtifactRepositories(subMonitor.newChild(250));
+			IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
+			IArtifactRepository[] repositories = repoQueryable.query(all, subMonitor.newChild(250)).toArray(IArtifactRepository.class);
 			if (repositories.length == 0)
-				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.download_no_repository, new Exception());
+				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.download_no_repository, new Exception(Collect.NO_ARTIFACT_REPOSITORIES_AVAILABLE));
+			// Although we get a sorted list back from the ProvisioningContext above, it 
+			// gets unsorted when we convert the queryable into an array so we must re-sort it.
+			// See https://bugs.eclipse.org/335153.
 			Arrays.sort(repositories, LOCAL_FIRST_COMPARATOR);
-			fetch(repoMgr, repositories, subMonitor);
+			fetch(repositories, subMonitor.newChild(500));
 			return overallStatus(monitor);
 		} finally {
 			subMonitor.done();
 		}
 	}
 
-	private void fetch(IArtifactRepositoryManager repoMgr, URI[] repositories, SubMonitor monitor) {
+	private void fetch(IArtifactRepository[] repositories, IProgressMonitor mon) {
+		SubMonitor monitor = SubMonitor.convert(mon, requestsToProcess.size());
 		for (int i = 0; i < repositories.length && !requestsToProcess.isEmpty() && !monitor.isCanceled(); i++) {
-			try {
-				IArtifactRepository current = repoMgr.loadRepository(repositories[i], monitor.newChild(0));
-				IArtifactRequest[] requests = getRequestsForRepository(current);
-				IStatus dlStatus = current.getArtifacts(requests, monitor.newChild(requests.length));
-				if (dlStatus.getSeverity() == IStatus.CANCEL)
-					return;
-				filterUnfetched();
-				monitor.setWorkRemaining(requestsToProcess.size());
-			} catch (ProvisionException e) {
-				//skip unreachable repositories
-			}
+			IArtifactRequest[] requests = getRequestsForRepository(repositories[i]);
+			IStatus dlStatus = repositories[i].getArtifacts(requests, monitor.newChild(requests.length));
+			if (dlStatus.getSeverity() == IStatus.CANCEL)
+				return;
+			filterUnfetched();
+			monitor.setWorkRemaining(requestsToProcess.size());
 		}
 	}
 
 	private IArtifactRequest[] getRequestsForRepository(IArtifactRepository repository) {
-		ArrayList applicable = new ArrayList();
-		for (Iterator it = requestsToProcess.iterator(); it.hasNext();) {
-			IArtifactRequest request = (IArtifactRequest) it.next();
+		ArrayList<IArtifactRequest> applicable = new ArrayList<IArtifactRequest>();
+		for (IArtifactRequest request : requestsToProcess) {
 			if (repository.contains(request.getArtifactKey()))
 				applicable.add(request);
 		}
-		return (IArtifactRequest[]) applicable.toArray(new IArtifactRequest[applicable.size()]);
+		return applicable.toArray(new IArtifactRequest[applicable.size()]);
 	}
 
 	//	private void notifyFetched() {
@@ -140,8 +137,8 @@ public class DownloadManager {
 			return Status.OK_STATUS;
 
 		MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		for (Iterator iterator = requestsToProcess.iterator(); iterator.hasNext();) {
-			IStatus failed = ((IArtifactRequest) iterator.next()).getResult();
+		for (IArtifactRequest request : requestsToProcess) {
+			IStatus failed = request.getResult();
 			if (failed != null && !failed.isOK())
 				result.add(failed);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
new file mode 100644
index 0000000..9536fdb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+
+/**
+ * Concrete implementation of the {@link IEngine} API.
+ */
+public class Engine implements IEngine {
+
+	private static final String ENGINE = "engine"; //$NON-NLS-1$
+	private IProvisioningAgent agent;
+
+	public Engine(IProvisioningAgent agent) {
+		this.agent = agent;
+		agent.registerService(ActionManager.SERVICE_NAME, new ActionManager());
+	}
+
+	private void checkArguments(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
+		if (iprofile == null)
+			throw new IllegalArgumentException(Messages.null_profile);
+
+		if (phaseSet == null)
+			throw new IllegalArgumentException(Messages.null_phaseset);
+
+		if (operands == null)
+			throw new IllegalArgumentException(Messages.null_operands);
+	}
+
+	public IStatus perform(IProvisioningPlan plan, IPhaseSet phaseSet, IProgressMonitor monitor) {
+		return perform(plan.getProfile(), phaseSet, ((ProvisioningPlan) plan).getOperands(), plan.getContext(), monitor);
+	}
+
+	public IStatus perform(IProvisioningPlan plan, IProgressMonitor monitor) {
+		return perform(plan, PhaseSetFactory.createDefaultPhaseSet(), monitor);
+	}
+
+	public IStatus perform(IProfile iprofile, IPhaseSet phases, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
+		PhaseSet phaseSet = (PhaseSet) phases;
+		checkArguments(iprofile, phaseSet, operands, context, monitor);
+		SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+
+		if (context == null)
+			context = new ProvisioningContext(agent);
+
+		if (monitor == null)
+			monitor = new NullProgressMonitor();
+
+		Profile profile = profileRegistry.validate(iprofile);
+
+		profileRegistry.lockProfile(profile);
+		try {
+			eventBus.publishEvent(new BeginOperationEvent(profile, phaseSet, operands, this));
+			if (DebugHelper.DEBUG_ENGINE)
+				DebugHelper.debug(ENGINE, "Beginning engine operation for profile=" + profile.getProfileId() + " [" + profile.getTimestamp() + "]:" + DebugHelper.LINE_SEPARATOR + DebugHelper.formatOperation(phaseSet, operands, context)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+			EngineSession session = new EngineSession(agent, profile, context);
+
+			MultiStatus result = phaseSet.perform(session, operands, monitor);
+			if (result.isOK() || result.matches(IStatus.INFO | IStatus.WARNING)) {
+				if (DebugHelper.DEBUG_ENGINE)
+					DebugHelper.debug(ENGINE, "Preparing to commit engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
+				result.merge(session.prepare(monitor));
+			}
+			if (result.matches(IStatus.ERROR | IStatus.CANCEL)) {
+				if (DebugHelper.DEBUG_ENGINE)
+					DebugHelper.debug(ENGINE, "Rolling back engine operation for profile=" + profile.getProfileId() + ". Reason was: " + result.toString()); //$NON-NLS-1$ //$NON-NLS-2$
+				IStatus status = session.rollback(monitor, result.getSeverity());
+				if (status.matches(IStatus.ERROR))
+					LogHelper.log(status);
+				eventBus.publishEvent(new RollbackOperationEvent(profile, phaseSet, operands, this, result));
+			} else {
+				if (DebugHelper.DEBUG_ENGINE)
+					DebugHelper.debug(ENGINE, "Committing engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
+				if (profile.isChanged())
+					profileRegistry.updateProfile(profile);
+				IStatus status = session.commit(monitor);
+				if (status.matches(IStatus.ERROR))
+					LogHelper.log(status);
+				eventBus.publishEvent(new CommitOperationEvent(profile, phaseSet, operands, this));
+			}
+			//if there is only one child status, return that status instead because it will have more context
+			IStatus[] children = result.getChildren();
+			return children.length == 1 ? children[0] : result;
+		} finally {
+			profileRegistry.unlockProfile(profile);
+			profile.setChanged(false);
+		}
+	}
+
+	protected IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
+		checkArguments(iprofile, phaseSet, operands, context, monitor);
+
+		if (context == null)
+			context = new ProvisioningContext(agent);
+
+		if (monitor == null)
+			monitor = new NullProgressMonitor();
+
+		ActionManager actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME);
+		return phaseSet.validate(actionManager, iprofile, operands, context, monitor);
+	}
+
+	public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context) {
+		return new ProvisioningPlan(profile, null, context);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
index ead37e3..6aa9710 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
@@ -10,15 +10,10 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.engine;
 
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.Engine;
-import org.eclipse.equinox.internal.provisional.p2.engine.IEngine;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
-public class EngineActivator implements BundleActivator, ServiceTrackerCustomizer {
+public class EngineActivator implements BundleActivator {
 	private static BundleContext context;
 	public static final String ID = "org.eclipse.equinox.p2.engine"; //$NON-NLS-1$
 
@@ -57,46 +52,15 @@ public class EngineActivator implements BundleActivator, ServiceTrackerCustomize
 	 */
 	public static final String UNSIGNED_ALLOW = "allow"; //$NON-NLS-1$
 
-	private ServiceRegistration registration;
-
-	private ServiceTracker tracker;
-
 	public static BundleContext getContext() {
 		return context;
 	}
 
-	public Object addingService(ServiceReference reference) {
-		if (registration == null) {
-			IProvisioningEventBus eventBus = (IProvisioningEventBus) context.getService(reference);
-			registration = context.registerService(IEngine.SERVICE_NAME, new Engine(eventBus), null);
-			return eventBus;
-		}
-		return null;
-	}
-
-	public void modifiedService(ServiceReference reference, Object service) {
-		// nothing to do
-	}
-
-	public void removedService(ServiceReference reference, Object service) {
-		if (registration != null) {
-			registration.unregister();
-			registration = null;
-		}
-	}
-
 	public void start(BundleContext aContext) throws Exception {
 		EngineActivator.context = aContext;
-		tracker = new ServiceTracker(aContext, IProvisioningEventBus.SERVICE_NAME, this);
-		tracker.open();
 	}
 
 	public void stop(BundleContext aContext) throws Exception {
-		tracker.close();
-		tracker = null;
-		//ensure there are no more profile preference save jobs running
-		Job.getJobManager().join(ProfilePreferences.PROFILE_SAVE_JOB_FAMILY, null);
-
 		EngineActivator.context = null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java
new file mode 100644
index 0000000..e303c4e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.engine.IEngine;
+
+/**
+ * Component that provides a factory that can create and initialize
+ * {@link IEngine} instances.
+ */
+public class EngineComponent implements IAgentServiceFactory {
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
+	 */
+	public Object createService(IProvisioningAgent agent) {
+		//ensure there is a garbage collector created for this agent if available
+		agent.getService("org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector"); //$NON-NLS-1$
+		//various parts of the engine may need an open-ended set of services, so we pass the agent to the engine directly
+		return new Engine(agent);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java
new file mode 100644
index 0000000..a5ffc73
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java
@@ -0,0 +1,401 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TODO: not API
+ */
+public class EngineSession {
+	private static final String ENGINE_SESSION = "enginesession"; //$NON-NLS-1$
+
+	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	private static class ActionsRecord {
+		Operand operand;
+		List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
+
+		ActionsRecord(Operand operand) {
+			this.operand = operand;
+		}
+	}
+
+	private List<Object[]> phaseActionRecordsPairs = new ArrayList<Object[]>();
+
+	private Phase currentPhase;
+	boolean currentPhaseActive;
+
+	private List<ActionsRecord> currentActionRecords;
+	private ActionsRecord currentRecord;
+
+	private IProfile profile;
+
+	private ProvisioningContext context;
+
+	private final HashMap<String, Object> sessionServices = new HashMap<String, Object>();
+
+	private Set<Touchpoint> touchpoints = new HashSet<Touchpoint>();
+
+	private final IProvisioningAgent agent;
+
+	public EngineSession(IProvisioningAgent agent, IProfile profile, ProvisioningContext context) {
+		super();
+		this.agent = agent;
+		this.profile = profile;
+		this.context = context;
+	}
+
+	public IProfile getProfile() {
+		return profile;
+	}
+
+	public IProvisioningAgent getAgent() {
+		return agent;
+	}
+
+	public ProvisioningContext getProvisioningContext() {
+		return context;
+	}
+
+	public File getProfileDataDirectory() {
+		SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		return profileRegistry.getProfileDataDirectory(profile.getProfileId());
+	}
+
+	/**
+	 * This is the interface through which parts of the engine obtain the services they need
+	 * @param serviceName The name of the service to obtain
+	 * @return The service instance, or <code>null</code> if no such service is available
+	 */
+	public Object getxService(String serviceName) {
+		Object result = sessionServices.get(serviceName);
+		if (result != null)
+			return result;
+		return agent.getService(serviceName);
+	}
+
+	IStatus prepare(IProgressMonitor monitor) {
+		monitor.subTask(Messages.preparing);
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		for (Touchpoint touchpoint : touchpoints) {
+			try {
+				status.add(touchpoint.prepare(profile));
+			} catch (RuntimeException e) {
+				// "touchpoint.prepare" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
+			}
+		}
+
+		if (status.matches(IStatus.ERROR)) {
+			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_prepare_error, profile.getProfileId()), null);
+			result.merge(status);
+			return result;
+		}
+		return status;
+	}
+
+	IStatus commit(IProgressMonitor monitor) {
+		monitor.subTask(Messages.committing);
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		phaseActionRecordsPairs.clear();
+		for (Touchpoint touchpoint : touchpoints) {
+			try {
+				IStatus result = touchpoint.commit(profile);
+				if (!result.isOK())
+					status.add(result);
+			} catch (RuntimeException e) {
+				// "touchpoint.commit" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
+			}
+		}
+
+		if (status.matches(IStatus.ERROR)) {
+			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
+			result.merge(status);
+			return result;
+		}
+		return status;
+	}
+
+	IStatus rollback(IProgressMonitor monitor, int severity) {
+		if (severity == IStatus.CANCEL)
+			monitor.subTask(Messages.rollingback_cancel);
+
+		if (severity == IStatus.ERROR)
+			monitor.subTask(Messages.rollingback_error);
+
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+
+		if (currentPhaseActive) {
+			try {
+				IStatus result = rollBackPhase(currentPhase, currentActionRecords);
+				if (!result.isOK())
+					status.add(result);
+			} catch (RuntimeException e) {
+				// "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
+			}
+			currentPhaseActive = false;
+			currentActionRecords = null;
+			currentRecord = null;
+		}
+		currentPhase = null;
+
+		for (ListIterator<Object[]> it = phaseActionRecordsPairs.listIterator(phaseActionRecordsPairs.size()); it.hasPrevious();) {
+			Object[] pair = it.previous();
+			Phase phase = (Phase) pair[0];
+			@SuppressWarnings("unchecked")
+			List<ActionsRecord> actionRecords = (List<ActionsRecord>) pair[1];
+			try {
+				final IStatus result = rollBackPhase(phase, actionRecords);
+				if (!result.isOK())
+					status.add(result);
+			} catch (RuntimeException e) {
+				// "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
+			}
+		}
+
+		phaseActionRecordsPairs.clear();
+		for (Touchpoint touchpoint : touchpoints) {
+			try {
+				IStatus result = touchpoint.rollback(profile);
+				if (!result.isOK())
+					status.add(result);
+			} catch (RuntimeException e) {
+				// "touchpoint.rollback" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
+			}
+		}
+
+		if (status.matches(IStatus.ERROR)) {
+			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
+			result.merge(status);
+			return result;
+		}
+		return status;
+	}
+
+	private IStatus rollBackPhase(Phase phase, List<ActionsRecord> actionRecords) {
+		MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		try {
+			phase.actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME);
+
+			if (!currentPhaseActive)
+				phase.prePerform(result, this, new NullProgressMonitor());
+
+			for (ListIterator<ActionsRecord> it = actionRecords.listIterator(actionRecords.size()); it.hasPrevious();) {
+				ActionsRecord record = it.previous();
+				List<ProvisioningAction> reversedActions = new ArrayList<ProvisioningAction>(record.actions);
+				Collections.reverse(reversedActions);
+				ProvisioningAction[] actions = reversedActions.toArray(new ProvisioningAction[record.actions.size()]);
+				try {
+					phase.undo(result, this, profile, record.operand, actions, context);
+				} catch (RuntimeException e) {
+					// "phase.undo" calls user code and might throw an unchecked exception
+					// we catch the error here to gather information on where the problem occurred.
+					result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
+				} catch (LinkageError e) {
+					// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+					result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
+				}
+			}
+			phase.postPerform(result, this, new NullProgressMonitor());
+		} finally {
+			phase.actionManager = null;
+		}
+		return result;
+	}
+
+	void recordPhaseEnter(Phase phase) {
+		if (phase == null)
+			throw new IllegalArgumentException(Messages.null_phase);
+
+		if (currentPhase != null)
+			throw new IllegalStateException(Messages.phase_started);
+
+		currentPhase = phase;
+
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugPhaseEnter(phase);
+	}
+
+	void recordPhaseStart(Phase phase) {
+		if (phase == null)
+			throw new IllegalArgumentException(Messages.null_phase);
+
+		if (currentPhase != phase)
+			throw new IllegalArgumentException(Messages.not_current_phase);
+
+		currentPhaseActive = true;
+		currentActionRecords = new ArrayList<ActionsRecord>();
+	}
+
+	void recordPhaseEnd(Phase phase) {
+		if (currentPhase == null)
+			throw new IllegalStateException(Messages.phase_not_started);
+
+		if (currentPhase != phase)
+			throw new IllegalArgumentException(Messages.not_current_phase);
+
+		phaseActionRecordsPairs.add(new Object[] {currentPhase, currentActionRecords});
+		currentActionRecords = null;
+		currentPhaseActive = false;
+	}
+
+	void recordPhaseExit(Phase phase) {
+		if (currentPhase == null)
+			throw new IllegalStateException(Messages.phase_not_started);
+
+		if (currentPhase != phase)
+			throw new IllegalArgumentException(Messages.not_current_phase);
+
+		currentPhase = null;
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugPhaseExit(phase);
+	}
+
+	void recordOperandStart(Operand operand) {
+		if (operand == null)
+			throw new IllegalArgumentException(Messages.null_operand);
+
+		if (currentRecord != null)
+			throw new IllegalStateException(Messages.operand_started);
+
+		currentRecord = new ActionsRecord(operand);
+		currentActionRecords.add(currentRecord);
+
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugOperandStart(operand);
+	}
+
+	void recordOperandEnd(Operand operand) {
+		if (currentRecord == null)
+			throw new IllegalStateException(Messages.operand_not_started);
+
+		if (currentRecord.operand != operand)
+			throw new IllegalArgumentException(Messages.not_current_operand);
+
+		currentRecord = null;
+
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugOperandEnd(operand);
+	}
+
+	void recordActionExecute(ProvisioningAction action, Map<String, Object> parameters) {
+		if (action == null)
+			throw new IllegalArgumentException(Messages.null_action);
+
+		currentRecord.actions.add(action);
+
+		Touchpoint touchpoint = action.getTouchpoint();
+		if (touchpoint != null)
+			touchpoints.add(touchpoint);
+
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugActionExecute(action, parameters);
+	}
+
+	public void recordActionUndo(ProvisioningAction action, Map<String, Object> parameters) {
+		if (DebugHelper.DEBUG_ENGINE_SESSION)
+			debugActionUndo(action, parameters);
+	}
+
+	public String getContextString(Phase phase, Operand operand, ProvisioningAction action) {
+		if (action instanceof ParameterizedProvisioningAction) {
+			ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) action;
+			action = parameterizedAction.getAction();
+		}
+		String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), getCurrentActionId()});
+		return message;
+	}
+
+	public String getContextString() {
+		String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), getCurrentPhaseId(), getCurrentOperandId(), getCurrentActionId()});
+		return message;
+	}
+
+	private Object getCurrentActionId() {
+		if (currentRecord == null || currentRecord.actions.isEmpty())
+			return EMPTY_STRING;
+
+		Object currentAction = currentRecord.actions.get(currentRecord.actions.size() - 1);
+		if (currentAction instanceof ParameterizedProvisioningAction) {
+			ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) currentAction;
+			currentAction = parameterizedAction.getAction();
+		}
+		return currentAction.getClass().getName();
+	}
+
+	private String getCurrentPhaseId() {
+		if (currentPhase == null)
+			return EMPTY_STRING;
+		return currentPhase.getClass().getName();
+	}
+
+	private String getCurrentOperandId() {
+		if (currentRecord == null)
+			return EMPTY_STRING;
+		return currentRecord.operand.toString();
+	}
+
+	private static void debugPhaseEnter(Phase phase) {
+		DebugHelper.debug(ENGINE_SESSION, "Entering phase: " + phase.getClass().getName()); //$NON-NLS-1$
+	}
+
+	private static void debugPhaseExit(Phase phase) {
+		DebugHelper.debug(ENGINE_SESSION, "Exiting phase: " + phase.getClass().getName()); //$NON-NLS-1$
+	}
+
+	private static void debugOperandStart(Operand operand) {
+		DebugHelper.debug(ENGINE_SESSION, "Starting processing of operand: " + operand.toString()); //$NON-NLS-1$
+	}
+
+	private static void debugOperandEnd(Operand operand) {
+		DebugHelper.debug(ENGINE_SESSION, "Ending processing of operand: " + operand.toString()); //$NON-NLS-1$
+	}
+
+	private static void debugActionExecute(ProvisioningAction action, Map<String, Object> parameters) {
+		DebugHelper.debug(ENGINE_SESSION, "Executing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
+	}
+
+	private static void debugActionUndo(ProvisioningAction action, Map<String, Object> parameters) {
+		DebugHelper.debug(ENGINE_SESSION, "Undoing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java
new file mode 100644
index 0000000..e3c55af
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ *  Copyright (c) 2008 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IProfile;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+/**
+ * @since 2.0
+ */
+public interface ISurrogateProfileHandler {
+
+	public abstract IProfile createProfile(String id);
+
+	public abstract boolean isSurrogate(IProfile profile);
+
+	public abstract IQueryResult<IInstallableUnit> queryProfile(IProfile profile, IQuery<IInstallableUnit> query, IProgressMonitor monitor);
+
+	public abstract boolean updateProfile(IProfile selfProfile);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java
new file mode 100644
index 0000000..2488c5c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IProfile;
+
+import java.util.EventObject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * @since 2.0
+ */
+public class InstallableUnitEvent extends EventObject {
+	public static final int UNINSTALL = 0;
+	public static final int INSTALL = 1;
+	private static final long serialVersionUID = 3318712818811459886L;
+
+	private String phaseId;
+	private boolean prePhase;
+
+	private IProfile profile;
+	private IInstallableUnit iu;
+	private Touchpoint touchpoint;
+	private IStatus result;
+	private int type;
+
+	public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint) {
+		this(phaseId, prePhase, profile, iu, type, touchpoint, null);
+	}
+
+	public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint, IStatus result) {
+		super(profile);
+		this.phaseId = phaseId;
+		this.prePhase = prePhase;
+		this.profile = profile;
+		this.iu = iu;
+		if (type != UNINSTALL && type != INSTALL)
+			throw new IllegalArgumentException(Messages.InstallableUnitEvent_type_not_install_or_uninstall);
+		this.type = type;
+		this.result = result;
+		this.touchpoint = touchpoint;
+
+	}
+
+	public Touchpoint getTouchpoint() {
+		return touchpoint;
+	}
+
+	public IProfile getProfile() {
+		return profile;
+	}
+
+	public IInstallableUnit getInstallableUnit() {
+		return iu;
+	}
+
+	public String getPhase() {
+		return phaseId;
+	}
+
+	public boolean isPre() {
+		return prePhase;
+	}
+
+	public boolean isPost() {
+		return !prePhase;
+	}
+
+	public IStatus getResult() {
+		return (result != null ? result : Status.OK_STATUS);
+	}
+
+	public boolean isInstall() {
+		return type == INSTALL;
+	}
+
+	public boolean isUninstall() {
+		return type == UNINSTALL;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
new file mode 100644
index 0000000..25fa41b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * @since 2.0
+ */
+public class InstallableUnitOperand extends Operand {
+	private final IInstallableUnit first;
+	private final IInstallableUnit second;
+
+	/**
+	 * Creates a new operand that represents replacing an installable unit
+	 * with another. At least one of the provided installable units must be
+	 * non-null.
+	 * 
+	 * @param first The installable unit being removed, or <code>null</code>
+	 * @param second The installable unit being added, or <code>null</code>
+	 */
+	public InstallableUnitOperand(IInstallableUnit first, IInstallableUnit second) {
+		//the operand must have at least one non-null units
+		Assert.isTrue(first != null || second != null);
+		this.first = first;
+		this.second = second;
+	}
+
+	public IInstallableUnit first() {
+		return first;
+	}
+
+	public IInstallableUnit second() {
+		return second;
+	}
+
+	public String toString() {
+		return first + " --> " + second; //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
new file mode 100644
index 0000000..3cdb6a7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.*;
+
+public abstract class InstallableUnitPhase extends Phase {
+	public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
+	public static final String PARM_IU = "iu"; //$NON-NLS-1$
+	public static final String PARM_INSTALL_FOLDER = "installFolder"; //$NON-NLS-1$
+
+	protected InstallableUnitPhase(String phaseId, int weight, boolean forced) {
+		super(phaseId, weight, forced);
+	}
+
+	protected InstallableUnitPhase(String phaseId, int weight) {
+		this(phaseId, weight, false);
+	}
+
+	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER));
+		return super.initializePhase(monitor, profile, parameters);
+	}
+
+	protected IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		mergeStatus(status, initializeOperand(profile, iuOperand, parameters, monitor));
+		IInstallableUnit unit = (IInstallableUnit) parameters.get(PARM_IU);
+		if (unit != null) {
+			Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
+			if (touchpoint != null) {
+				parameters.put(PARM_TOUCHPOINT, touchpoint);
+			}
+		}
+		mergeStatus(status, super.initializeOperand(profile, operand, parameters, monitor));
+		return status;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		return Status.OK_STATUS;
+	}
+
+	protected IStatus completeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
+
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		mergeStatus(status, super.completeOperand(profile, iuOperand, parameters, monitor));
+		mergeStatus(status, completeOperand(profile, iuOperand, parameters, monitor));
+		return status;
+	}
+
+	protected IStatus completeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		return Status.OK_STATUS;
+	}
+
+	final protected List<ProvisioningAction> getActions(Operand operand) {
+		if (!(operand instanceof InstallableUnitOperand))
+			return null;
+
+		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
+		return getActions(iuOperand);
+	}
+
+	protected abstract List<ProvisioningAction> getActions(InstallableUnitOperand operand);
+
+	final public boolean isApplicable(Operand operand) {
+		if (!(operand instanceof InstallableUnitOperand))
+			return false;
+
+		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
+		return isApplicable(iuOperand);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand operand) {
+		return true;
+	}
+
+	protected final List<ProvisioningAction> getActions(IInstallableUnit unit, String key) {
+		List<ITouchpointInstruction> instructions = getInstructions(unit, key);
+		int instrSize = instructions.size();
+		if (instrSize == 0)
+			return null;
+
+		List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
+		InstructionParser instructionParser = new InstructionParser(getActionManager());
+		for (int i = 0; i < instrSize; i++) {
+			actions.addAll(instructionParser.parseActions(instructions.get(i), unit.getTouchpointType()));
+		}
+		return actions;
+	}
+
+	private final static List<ITouchpointInstruction> getInstructions(IInstallableUnit unit, String key) {
+		Collection<ITouchpointData> data = unit.getTouchpointData();
+		int dataSize = data.size();
+		if (dataSize == 0)
+			return CollectionUtils.emptyList();
+
+		ArrayList<ITouchpointInstruction> matches = new ArrayList<ITouchpointInstruction>(dataSize);
+		for (ITouchpointData td : data) {
+			ITouchpointInstruction instructions = td.getInstruction(key);
+			if (instructions != null)
+				matches.add(instructions);
+		}
+		return matches;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
new file mode 100644
index 0000000..39d1bb5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * @since 2.0
+ */
+public class InstallableUnitPropertyOperand extends PropertyOperand {
+	private final IInstallableUnit iu;
+
+	/**
+	 * Creates a new operand that represents replacing a property value associated
+	 * with an IU with another.  At least one of the provided property values must be
+	 * non-null.
+	 * 
+	 * @param iu The IInstallableUnit with which the property is associated
+	 * @param key The key of the property being modified
+	 * @param first The property value being removed, or <code>null</code>
+	 * @param second The property value being added, or <code>null</code>
+	 */
+	public InstallableUnitPropertyOperand(IInstallableUnit iu, String key, Object first, Object second) {
+		super(key, first, second);
+		//the iu must be specified.
+		Assert.isTrue(iu != null);
+		this.iu = iu;
+	}
+
+	public IInstallableUnit getInstallableUnit() {
+		return iu;
+	}
+
+	public String toString() {
+		return "[IInstallableUnit property for " + iu.toString() + "] " + super.toString(); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
index d6cddef..ae44c39 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
@@ -12,11 +12,9 @@ package org.eclipse.equinox.internal.p2.engine;
 
 import java.util.*;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.engine.MissingAction;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointInstruction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.osgi.util.NLS;
 
 public class InstructionParser {
@@ -40,22 +38,21 @@ public class InstructionParser {
 		this.actionManager = actionManager;
 	}
 
-	public ProvisioningAction[] parseActions(ITouchpointInstruction instruction, ITouchpointType touchpointType) {
-		List actions = new ArrayList();
-		Map importMap = parseImportAttribute(instruction.getImportAttribute());
+	public List<ProvisioningAction> parseActions(ITouchpointInstruction instruction, ITouchpointType touchpointType) {
+		List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
+		Map<String, ActionEntry> importMap = parseImportAttribute(instruction.getImportAttribute());
 		StringTokenizer tokenizer = new StringTokenizer(instruction.getBody(), ";"); //$NON-NLS-1$
 		while (tokenizer.hasMoreTokens()) {
 			actions.add(parseAction(tokenizer.nextToken(), importMap, touchpointType));
 		}
-
-		return (ProvisioningAction[]) actions.toArray(new ProvisioningAction[actions.size()]);
+		return actions;
 	}
 
-	private Map parseImportAttribute(String importAttribute) {
+	private Map<String, ActionEntry> parseImportAttribute(String importAttribute) {
 		if (importAttribute == null)
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 
-		Map result = new HashMap();
+		Map<String, ActionEntry> result = new HashMap<String, ActionEntry>();
 		StringTokenizer tokenizer = new StringTokenizer(importAttribute, ","); //$NON-NLS-1$
 		while (tokenizer.hasMoreTokens()) {
 			StringTokenizer actionTokenizer = new StringTokenizer(tokenizer.nextToken(), ";"); //$NON-NLS-1$
@@ -74,7 +71,7 @@ public class InstructionParser {
 		return result;
 	}
 
-	private ProvisioningAction parseAction(String statement, Map qualifier, ITouchpointType touchpointType) {
+	private ProvisioningAction parseAction(String statement, Map<String, ActionEntry> qualifier, ITouchpointType touchpointType) {
 		int openBracket = statement.indexOf('(');
 		int closeBracket = statement.lastIndexOf(')');
 		if (openBracket == -1 || closeBracket == -1 || openBracket > closeBracket)
@@ -86,10 +83,10 @@ public class InstructionParser {
 
 		String nameValuePairs = statement.substring(openBracket + 1, closeBracket);
 		if (nameValuePairs.length() == 0)
-			return new ParameterizedProvisioningAction(action, Collections.EMPTY_MAP, statement);
+			return new ParameterizedProvisioningAction(action, CollectionUtils.<String, String> emptyMap(), statement);
 
 		StringTokenizer tokenizer = new StringTokenizer(nameValuePairs, ","); //$NON-NLS-1$
-		Map parameters = new HashMap();
+		Map<String, String> parameters = new HashMap<String, String>();
 		while (tokenizer.hasMoreTokens()) {
 			String nameValuePair = tokenizer.nextToken();
 			int colonIndex = nameValuePair.indexOf(":"); //$NON-NLS-1$
@@ -102,9 +99,9 @@ public class InstructionParser {
 		return new ParameterizedProvisioningAction(action, parameters, statement);
 	}
 
-	private ProvisioningAction lookupAction(String actionId, Map importMap, ITouchpointType touchpointType) {
+	private ProvisioningAction lookupAction(String actionId, Map<String, ActionEntry> importMap, ITouchpointType touchpointType) {
 		VersionRange versionRange = null;
-		ActionEntry actionEntry = (ActionEntry) importMap.get(actionId);
+		ActionEntry actionEntry = importMap.get(actionId);
 		if (actionEntry != null) {
 			actionId = actionEntry.actionId;
 			versionRange = actionEntry.versionRange;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
index 9468e23..94b91b9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
@@ -12,44 +12,100 @@ package org.eclipse.equinox.internal.p2.engine;
 
 import org.eclipse.osgi.util.NLS;
 
-class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.engine.messages"; //$NON-NLS-1$
+public class Messages extends NLS {
+	public static String action_not_found;
+
+	public static String action_syntax_error;
+	public static String action_undo_error;
 
 	public static String ActionManager_Exception_Creating_Action_Extension;
 	public static String ActionManager_Required_Touchpoint_Not_Found;
+
+	public static String actions_not_found;
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.engine.messages"; //$NON-NLS-1$
+
+	public static String CertificateChecker_CertificateError;
+	public static String CertificateChecker_CertificateRejected;
+	public static String CertificateChecker_KeystoreConnectionError;
+
+	public static String CertificateChecker_SignedContentError;
+	public static String CertificateChecker_SignedContentIOError;
+	public static String CertificateChecker_UnsignedNotAllowed;
+
+	public static String committing;
 	public static String download_artifact;
 	public static String download_no_repository;
-
+	public static String Engine_Operation_Canceled_By_User;
 	public static String error_parsing_profile;
-
 	public static String error_persisting_profile;
+	public static String forced_action_execute_error;
+	public static String InstallableUnitEvent_type_not_install_or_uninstall;
+	public static String io_FailedRead;
+	public static String io_NotFound;
+	public static String not_current_operand;
+	public static String not_current_phase;
+	public static String null_action;
 
-	public static String ParameterizedProvisioningAction_action_or_parameters_null;
+	public static String null_operand;
+	public static String null_operands;
+	public static String null_phase;
+	public static String null_phases;
+	public static String null_phaseset;
+	public static String null_profile;
+	public static String operand_not_started;
 
-	public static String profile_does_not_exist;
+	public static String operand_started;
 
+	public static String ParameterizedProvisioningAction_action_or_parameters_null;
+	public static String phase_error;
+	public static String phase_not_started;
+	public static String phase_started;
+	public static String phase_undo_error;
+	public static String phase_undo_operand_error;
+
+	public static String Phase_Collect_Error;
+	public static String Phase_Install_Error;
+	public static String Phase_Configure_Error;
+	public static String Phase_Configure_Task;
+	public static String Phase_Install_Task;
+	public static String Phase_Sizing_Error;
+	public static String Phase_Sizing_Warning;
+	public static String Phase_Unconfigure_Error;
+	public static String Phase_Uninstall_Error;
+
+	public static String phaseid_not_positive;
+	public static String phaseid_not_set;
+	public static String preparing;
+	public static String profile_does_not_exist;
+	public static String Profile_Duplicate_Root_Profile_Id;
+	public static String profile_lock_not_reentrant;
 	public static String profile_not_current;
-
+	public static String profile_changed;
 	public static String profile_not_registered;
-
-	public static String Profile_Duplicate_Root_Profile_Id;
 	public static String Profile_Null_Profile_Id;
 	public static String Profile_Parent_Not_Found;
-
 	public static String ProfilePreferences_saving;
-
 	public static String reg_dir_not_available;
+	public static String rollingback_cancel;
+	public static String rollingback_error;
+	public static String session_commit_error;
+	public static String session_context;
+	public static String session_prepare_error;
+	public static String shared_profile_not_found;
+	public static String Shared_Profile;
 
+	public static String SimpleProfileRegistry_Bad_profile_location;
+	public static String SimpleProfileRegistry_CannotRemoveCurrentSnapshot;
 	public static String SimpleProfileRegistry_Parser_Error_Parsing_Registry;
 	public static String SimpleProfileRegistry_Parser_Has_Incompatible_Version;
-
 	public static String SimpleProfileRegistry_Profile_in_use;
 	public static String SimpleProfileRegistry_Profile_not_locked;
 	public static String SimpleProfileRegistry_Profile_not_locked_due_to_exception;
-	public static String SimpleProfileRegistry_Bad_profile_location;
 
 	public static String thread_not_owner;
-	public static String profile_lock_not_reentrant;
+	public static String touchpoint_commit_error;
+	public static String touchpoint_prepare_error;
+	public static String touchpoint_rollback_error;
 
 	public static String TouchpointManager_Attribute_Not_Specified;
 	public static String TouchpointManager_Conflicting_Touchpoint_Types;
@@ -57,12 +113,6 @@ class Messages extends NLS {
 	public static String TouchpointManager_Incorrectly_Named_Extension;
 	public static String TouchpointManager_Null_Creating_Touchpoint_Extension;
 	public static String TouchpointManager_Null_Touchpoint_Type_Argument;
-	public static String shared_profile_not_found;
-	public static String action_syntax_error;
-
-	public static String io_FailedRead;
-
-	public static String io_NotFound;
 
 	static {
 		// initialize resource bundles
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java
new file mode 100644
index 0000000..2df1952
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.Map;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 2.0
+ */
+public class MissingAction extends ProvisioningAction {
+
+	private String actionId;
+	private VersionRange versionRange;
+
+	public MissingAction(String actionId, VersionRange versionRange) {
+		this.actionId = actionId;
+		this.versionRange = versionRange;
+	}
+
+	public String getActionId() {
+		return actionId;
+	}
+
+	public VersionRange getVersionRange() {
+		return versionRange;
+	}
+
+	public IStatus execute(Map<String, Object> parameters) {
+		throw new IllegalArgumentException(NLS.bind(Messages.action_not_found, actionId + (versionRange == null ? "" : "/" + versionRange.toString()))); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public IStatus undo(Map<String, Object> parameters) {
+		// do nothing as we want this action to undo successfully
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java
new file mode 100644
index 0000000..a8ecbd5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 2.0
+ */
+public class MissingActionsException extends ProvisionException {
+
+	private static final long serialVersionUID = 8617693596359747490L;
+	private final MissingAction[] missingActions;
+
+	public MissingActionsException(MissingAction[] missingActions) {
+		super(getMissingActionsMessage(missingActions));
+		this.missingActions = missingActions;
+	}
+
+	private static String getMissingActionsMessage(MissingAction[] missingActions) {
+
+		if (missingActions.length == 0)
+			throw new IllegalArgumentException("Bad exception: No missing actions"); //$NON-NLS-1$
+
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < missingActions.length; i++) {
+			MissingAction missingAction = missingActions[i];
+			buffer.append(missingAction.getActionId());
+			if (missingAction.getVersionRange() != null) {
+				buffer.append("/"); //$NON-NLS-1$
+				buffer.append(missingAction.getVersionRange().toString());
+			}
+			if (i + 1 != missingActions.length)
+				buffer.append(", "); //$NON-NLS-1$
+		}
+
+		return NLS.bind(Messages.actions_not_found, buffer.toString());
+	}
+
+	public MissingAction[] getMissingActions() {
+		return missingActions;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
new file mode 100644
index 0000000..1d0d5a1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+
+/**
+ * The common base class for engine operands.
+ * 
+ * @since 2.0
+ */
+public class Operand {
+	// marker class
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
index 3005e22..0b73128 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
@@ -13,16 +13,16 @@ package org.eclipse.equinox.internal.p2.engine;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
 
 public class ParameterizedProvisioningAction extends ProvisioningAction {
 
 	private ProvisioningAction action;
-	private Map actionParameters;
+	private Map<String, String> actionParameters;
 	private String actionText;
 
-	public ParameterizedProvisioningAction(ProvisioningAction action, Map actionParameters, String actionText) {
+	public ParameterizedProvisioningAction(ProvisioningAction action, Map<String, String> actionParameters, String actionText) {
 		if (action == null || actionParameters == null)
 			throw new IllegalArgumentException(Messages.ParameterizedProvisioningAction_action_or_parameters_null);
 		this.action = action;
@@ -30,28 +30,27 @@ public class ParameterizedProvisioningAction extends ProvisioningAction {
 		this.actionText = actionText;
 	}
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		parameters = processActionParameters(parameters);
 		return action.execute(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		parameters = processActionParameters(parameters);
 		return action.undo(parameters);
 	}
 
-	private Map processActionParameters(Map parameters) {
-		Map result = new HashMap(parameters);
-		for (Iterator it = actionParameters.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			String name = (String) entry.getKey();
-			String value = processVariables((String) entry.getValue(), parameters);
+	private Map<String, Object> processActionParameters(Map<String, Object> parameters) {
+		Map<String, Object> result = new HashMap<String, Object>(parameters);
+		for (Entry<String, String> entry : actionParameters.entrySet()) {
+			String name = entry.getKey();
+			String value = processVariables(entry.getValue(), parameters);
 			result.put(name, value);
 		}
 		return Collections.unmodifiableMap(result);
 	}
 
-	private String processVariables(String parameterValue, Map parameters) {
+	private String processVariables(String parameterValue, Map<String, Object> parameters) {
 
 		int variableBeginIndex = parameterValue.indexOf("${"); //$NON-NLS-1$
 		if (variableBeginIndex == -1)
@@ -85,7 +84,7 @@ public class ParameterizedProvisioningAction extends ProvisioningAction {
 		return action;
 	}
 
-	public Map getParameters() {
+	public Map<String, String> getParameters() {
 		return actionParameters;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
new file mode 100644
index 0000000..99046da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.osgi.util.NLS;
+
+public abstract class Phase {
+	protected static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
+	protected static final String PARM_PHASE_ID = "phaseId"; //$NON-NLS-1$
+	protected static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
+	protected static final String PARM_PROFILE_DATA_DIRECTORY = "profileDataDirectory"; //$NON-NLS-1$
+	protected static final String PARM_CONTEXT = "context"; //$NON-NLS-1$
+	/**
+	 * Internal property.
+	 */
+	protected static final String PARM_AGENT = "agent"; //$NON-NLS-1$
+	protected static final String PARM_FORCED = "forced"; //$NON-NLS-1$
+	protected static final String PARM_TOUCHPOINT = "touchpoint"; //$NON-NLS-1$
+
+	protected final String phaseId;
+	protected final int weight;
+	protected final boolean forced;
+	protected int prePerformWork = 1000;
+	protected int mainPerformWork = 10000;
+	protected int postPerformWork = 1000;
+	private Map<String, Object> operandParameters = null;
+	private Map<String, Object> phaseParameters = new HashMap<String, Object>();
+	private Map<Touchpoint, Map<String, Object>> touchpointToTouchpointPhaseParameters = new HashMap<Touchpoint, Map<String, Object>>();
+	private Map<Touchpoint, Map<String, Object>> touchpointToTouchpointOperandParameters = new HashMap<Touchpoint, Map<String, Object>>();
+	ActionManager actionManager; // injected from phaseset
+
+	protected Phase(String phaseId, int weight, boolean forced) {
+		if (phaseId == null || phaseId.length() == 0)
+			throw new IllegalArgumentException(Messages.phaseid_not_set);
+		if (weight <= 0)
+			throw new IllegalArgumentException(Messages.phaseid_not_positive);
+		this.weight = weight;
+		this.phaseId = phaseId;
+		this.forced = forced;
+	}
+
+	protected Phase(String phaseId, int weight) {
+		this(phaseId, weight, false);
+	}
+
+	final protected ActionManager getActionManager() {
+		return actionManager;
+	}
+
+	public String toString() {
+		return getClass().getName() + " - " + this.weight; //$NON-NLS-1$
+	}
+
+	void perform(MultiStatus status, EngineSession session, Operand[] operands, IProgressMonitor monitor) {
+		SubMonitor subMonitor = SubMonitor.convert(monitor, prePerformWork + mainPerformWork + postPerformWork);
+		session.recordPhaseEnter(this);
+		prePerform(status, session, subMonitor.newChild(prePerformWork));
+		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+			return;
+		session.recordPhaseStart(this);
+
+		subMonitor.setWorkRemaining(mainPerformWork + postPerformWork);
+		mainPerform(status, session, operands, subMonitor.newChild(mainPerformWork));
+		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+			return;
+
+		session.recordPhaseEnd(this);
+		subMonitor.setWorkRemaining(postPerformWork);
+		postPerform(status, session, subMonitor.newChild(postPerformWork));
+		phaseParameters.clear();
+		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+			return;
+		session.recordPhaseExit(this);
+		subMonitor.done();
+	}
+
+	void prePerform(MultiStatus status, EngineSession session, IProgressMonitor monitor) {
+		IProfile profile = session.getProfile();
+		phaseParameters.put(PARM_PROFILE, profile);
+		phaseParameters.put(PARM_PROFILE_DATA_DIRECTORY, session.getProfileDataDirectory());
+		phaseParameters.put(PARM_CONTEXT, session.getProvisioningContext());
+		phaseParameters.put(PARM_PHASE_ID, phaseId);
+		phaseParameters.put(PARM_FORCED, Boolean.toString(forced));
+		phaseParameters.put(PARM_AGENT, session.getAgent());
+		mergeStatus(status, initializePhase(monitor, profile, phaseParameters));
+	}
+
+	private void mainPerform(MultiStatus status, EngineSession session, Operand[] operands, SubMonitor subMonitor) {
+		IProfile profile = session.getProfile();
+		subMonitor.beginTask(null, operands.length);
+		for (int i = 0; i < operands.length; i++) {
+			subMonitor.setWorkRemaining(operands.length - i);
+			if (subMonitor.isCanceled())
+				throw new OperationCanceledException();
+			Operand operand = operands[i];
+			if (!isApplicable(operand))
+				continue;
+
+			session.recordOperandStart(operand);
+			List<ProvisioningAction> actions = getActions(operand);
+			operandParameters = new HashMap<String, Object>(phaseParameters);
+			operandParameters.put(PARM_OPERAND, operand);
+			mergeStatus(status, initializeOperand(profile, operand, operandParameters, subMonitor));
+			if (status.matches(IStatus.ERROR | IStatus.CANCEL)) {
+				operandParameters = null;
+				return;
+			}
+
+			Touchpoint operandTouchpoint = (Touchpoint) operandParameters.get(PARM_TOUCHPOINT);
+			if (operandTouchpoint != null) {
+				mergeStatus(status, initializeTouchpointParameters(profile, operand, operandTouchpoint, subMonitor));
+				if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+					return;
+
+				operandParameters = touchpointToTouchpointOperandParameters.get(operandTouchpoint);
+			}
+
+			operandParameters = Collections.unmodifiableMap(operandParameters);
+			if (actions != null) {
+				for (int j = 0; j < actions.size(); j++) {
+					ProvisioningAction action = actions.get(j);
+					Map<String, Object> parameters = operandParameters;
+					Touchpoint touchpoint = action.getTouchpoint();
+					if (touchpoint != null) {
+						mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, subMonitor));
+						if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+							return;
+
+						parameters = touchpointToTouchpointOperandParameters.get(touchpoint);
+					}
+					IStatus actionStatus = null;
+					try {
+						session.recordActionExecute(action, parameters);
+						actionStatus = action.execute(parameters);
+					} catch (RuntimeException e) {
+						if (!forced)
+							throw e;
+						// "action.execute" calls user code and might throw an unchecked exception
+						// we catch the error here to gather information on where the problem occurred.
+						actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
+					} catch (LinkageError e) {
+						if (!forced)
+							throw e;
+						// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+						actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
+					}
+					if (forced && actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
+						MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
+						result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
+						LogHelper.log(result);
+						actionStatus = Status.OK_STATUS;
+					}
+					mergeStatus(status, actionStatus);
+					if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+						return;
+				}
+			}
+			mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, subMonitor));
+			mergeStatus(status, completeOperand(profile, operand, operandParameters, subMonitor));
+			if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+				return;
+			operandParameters = null;
+			session.recordOperandEnd(operand);
+			subMonitor.worked(1);
+		}
+	}
+
+	private IStatus initializeTouchpointParameters(IProfile profile, Operand operand, Touchpoint touchpoint, IProgressMonitor monitor) {
+		if (touchpointToTouchpointOperandParameters.containsKey(touchpoint))
+			return Status.OK_STATUS;
+
+		Map<String, Object> touchpointPhaseParameters = touchpointToTouchpointPhaseParameters.get(touchpoint);
+		if (touchpointPhaseParameters == null) {
+			touchpointPhaseParameters = new HashMap<String, Object>(phaseParameters);
+			IStatus status = touchpoint.initializePhase(monitor, profile, phaseId, touchpointPhaseParameters);
+			if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
+				return status;
+			touchpointToTouchpointPhaseParameters.put(touchpoint, touchpointPhaseParameters);
+		}
+
+		Map<String, Object> touchpointOperandParameters = new HashMap<String, Object>(touchpointPhaseParameters);
+		touchpointOperandParameters.putAll(operandParameters);
+		IStatus status = touchpoint.initializeOperand(profile, touchpointOperandParameters);
+		if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
+			return status;
+		touchpointToTouchpointOperandParameters.put(touchpoint, touchpointOperandParameters);
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * Merges a given IStatus into a MultiStatus
+	 */
+	protected static void mergeStatus(MultiStatus multi, IStatus status) {
+		if (status != null && !status.isOK())
+			multi.merge(status);
+	}
+
+	void postPerform(MultiStatus status, EngineSession session, IProgressMonitor monitor) {
+		IProfile profile = session.getProfile();
+		mergeStatus(status, touchpointCompletePhase(monitor, profile, phaseParameters));
+		mergeStatus(status, completePhase(monitor, profile, phaseParameters));
+	}
+
+	void undo(MultiStatus status, EngineSession session, IProfile profile, Operand operand, ProvisioningAction[] actions, ProvisioningContext context) {
+		if (operandParameters == null) {
+			operandParameters = new HashMap<String, Object>(phaseParameters);
+			operandParameters.put(PARM_OPERAND, operand);
+			mergeStatus(status, initializeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
+			Touchpoint operandTouchpoint = (Touchpoint) operandParameters.get(PARM_TOUCHPOINT);
+			if (operandTouchpoint != null) {
+				mergeStatus(status, initializeTouchpointParameters(profile, operand, operandTouchpoint, new NullProgressMonitor()));
+				if (status.matches(IStatus.ERROR | IStatus.CANCEL))
+					return;
+
+				operandParameters = touchpointToTouchpointOperandParameters.get(operandTouchpoint);
+			}
+			operandParameters = Collections.unmodifiableMap(operandParameters);
+		}
+		for (int j = 0; j < actions.length; j++) {
+			ProvisioningAction action = actions[j];
+			Map<String, Object> parameters = operandParameters;
+			Touchpoint touchpoint = action.getTouchpoint();
+			if (touchpoint != null) {
+				mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, new NullProgressMonitor()));
+				if (status.matches(IStatus.ERROR))
+					return;
+
+				parameters = touchpointToTouchpointOperandParameters.get(touchpoint);
+			}
+			IStatus actionStatus = null;
+			try {
+				session.recordActionUndo(action, parameters);
+				actionStatus = action.undo(parameters);
+			} catch (RuntimeException e) {
+				// "action.undo" calls user code and might throw an unchecked exception
+				// we catch the error here to gather information on where the problem occurred.
+				actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
+			} catch (LinkageError e) {
+				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+				actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
+			}
+			if (actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
+				MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
+				result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
+				result.merge(actionStatus);
+			}
+		}
+		mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, new NullProgressMonitor()));
+		mergeStatus(status, completeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
+		operandParameters = null;
+	}
+
+	public boolean isApplicable(Operand operand) {
+		return true;
+	}
+
+	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	IStatus touchpointCompletePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		if (touchpointToTouchpointPhaseParameters.isEmpty())
+			return Status.OK_STATUS;
+
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		for (Map.Entry<Touchpoint, Map<String, Object>> entry : touchpointToTouchpointPhaseParameters.entrySet()) {
+			Touchpoint touchpoint = entry.getKey();
+			Map<String, Object> touchpointParameters = entry.getValue();
+			mergeStatus(status, touchpoint.completePhase(monitor, profile, phaseId, touchpointParameters));
+		}
+		touchpointToTouchpointPhaseParameters.clear();
+		return status;
+	}
+
+	protected IStatus completeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		return Status.OK_STATUS;
+	}
+
+	IStatus touchpointCompleteOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		if (touchpointToTouchpointOperandParameters.isEmpty())
+			return Status.OK_STATUS;
+
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		for (Map.Entry<Touchpoint, Map<String, Object>> entry : touchpointToTouchpointOperandParameters.entrySet()) {
+			Touchpoint touchpoint = entry.getKey();
+			Map<String, Object> touchpointParameters = entry.getValue();
+			mergeStatus(status, touchpoint.completeOperand(profile, touchpointParameters));
+		}
+		touchpointToTouchpointOperandParameters.clear();
+		return status;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		return Status.OK_STATUS;
+	}
+
+	protected abstract List<ProvisioningAction> getActions(Operand operand);
+
+	/**
+	 * Returns a human-readable message to be displayed in case of an error performing
+	 * this phase. Subclasses should override.
+	 */
+	protected String getProblemMessage() {
+		return NLS.bind(Messages.phase_error, getClass().getName());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java
new file mode 100644
index 0000000..0f7ec63
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.osgi.util.NLS;
+
+public class PhaseSet implements IPhaseSet {
+
+	private final Phase[] phases;
+
+	public PhaseSet(Phase[] phases) {
+		if (phases == null)
+			throw new IllegalArgumentException(Messages.null_phases);
+
+		this.phases = phases;
+	}
+
+	public final MultiStatus perform(EngineSession session, Operand[] operands, IProgressMonitor monitor) {
+		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
+		int[] weights = getProgressWeights(operands);
+		int totalWork = getTotalWork(weights);
+		SubMonitor pm = SubMonitor.convert(monitor, totalWork);
+		try {
+			for (int i = 0; i < phases.length; i++) {
+				if (pm.isCanceled()) {
+					status.add(Status.CANCEL_STATUS);
+					return status;
+				}
+				Phase phase = phases[i];
+				phase.actionManager = (ActionManager) session.getAgent().getService(ActionManager.SERVICE_NAME);
+				try {
+					phase.perform(status, session, operands, pm.newChild(weights[i]));
+				} catch (OperationCanceledException e) {
+					// propagate operation cancellation
+					status.add(new Status(IStatus.CANCEL, EngineActivator.ID, e.getMessage(), e));
+				} catch (RuntimeException e) {
+					// "perform" calls user code and might throw an unchecked exception
+					// we catch the error here to gather information on where the problem occurred.
+					status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
+				} catch (LinkageError e) {
+					// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+					status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
+				} finally {
+					phase.actionManager = null;
+				}
+				if (status.matches(IStatus.CANCEL)) {
+					MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.CANCEL, Messages.Engine_Operation_Canceled_By_User, null);
+					result.merge(status);
+					return result;
+				} else if (status.matches(IStatus.ERROR)) {
+					MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, phase.getProblemMessage(), null);
+					result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(), null));
+					result.merge(status);
+					return result;
+				}
+			}
+		} finally {
+			pm.done();
+		}
+		return status;
+	}
+
+	public final IStatus validate(ActionManager actionManager, IProfile profile, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
+		Set<MissingAction> missingActions = new HashSet<MissingAction>();
+		for (int i = 0; i < phases.length; i++) {
+			Phase phase = phases[i];
+			phase.actionManager = actionManager;
+			try {
+				for (int j = 0; j < operands.length; j++) {
+					Operand operand = operands[j];
+					try {
+						if (!phase.isApplicable(operand))
+							continue;
+
+						List<ProvisioningAction> actions = phase.getActions(operand);
+						if (actions == null)
+							continue;
+						for (int k = 0; k < actions.size(); k++) {
+							ProvisioningAction action = actions.get(k);
+							if (action instanceof MissingAction)
+								missingActions.add((MissingAction) action);
+						}
+					} catch (RuntimeException e) {
+						// "perform" calls user code and might throw an unchecked exception
+						// we catch the error here to gather information on where the problem occurred.
+						return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
+					} catch (LinkageError e) {
+						// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
+						return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
+					}
+				}
+			} finally {
+				phase.actionManager = null;
+			}
+		}
+		if (!missingActions.isEmpty()) {
+			MissingAction[] missingActionsArray = missingActions.toArray(new MissingAction[missingActions.size()]);
+			MissingActionsException exception = new MissingActionsException(missingActionsArray);
+			return (new Status(IStatus.ERROR, EngineActivator.ID, exception.getMessage(), exception));
+		}
+		return Status.OK_STATUS;
+	}
+
+	private String getContextString(IProfile profile, Phase phase, Operand operand) {
+		return NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), ""}); //$NON-NLS-1$
+	}
+
+	private int getTotalWork(int[] weights) {
+		int sum = 0;
+		for (int i = 0; i < weights.length; i++)
+			sum += weights[i];
+		return sum;
+	}
+
+	private int[] getProgressWeights(Operand[] operands) {
+		int[] weights = new int[phases.length];
+		for (int i = 0; i < phases.length; i += 1) {
+			if (operands.length > 0)
+				//alter weights according to the number of operands applicable to that phase
+				weights[i] = (phases[i].weight * countApplicable(phases[i], operands) / operands.length);
+			else
+				weights[i] = phases[i].weight;
+		}
+		return weights;
+	}
+
+	private int countApplicable(Phase phase, Operand[] operands) {
+		int count = 0;
+		for (int i = 0; i < operands.length; i++) {
+			if (phase.isApplicable(operands[i]))
+				count++;
+		}
+		return count;
+	}
+
+	public String[] getPhaseIds() {
+		String[] ids = new String[phases.length];
+		for (int i = 0; i < ids.length; i++) {
+			ids[i] = phases[i].phaseId;
+		}
+		return ids;
+	}
+
+	public Phase[] getPhases() {
+		return phases;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
index 226271b..a5c1995 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
@@ -1,49 +1,79 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  * 
- * Contributors: IBM Corporation - initial API and implementation
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *    Cloudsmith Inc. - query indexes
+ * 
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.engine;
 
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ISurrogateProfileHandler;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.index.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
 import org.eclipse.osgi.util.NLS;
 
-public class Profile implements IQueryable, IProfile {
+public class Profile extends IndexProvider<IInstallableUnit> implements IProfile {
 
+	/**
+	 * An index that limits the candidates to those units that has profile properties
+	 */
+	class ProfilePropertyIndex implements IIndex<IInstallableUnit> {
+		public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+			return iuProperties.keySet().iterator();
+		}
+	}
+
+	private final IProvisioningAgent agent;
 	//Internal id of the profile
 	private final String profileId;
 
 	private Profile parentProfile;
 
+	private IIndex<IInstallableUnit> idIndex;
+
+	private IIndex<IInstallableUnit> propertiesIndex;
+
+	private IIndex<IInstallableUnit> capabilityIndex;
+
+	private TranslationSupport translationSupport;
+
 	/**
 	 * 	A collection of child profiles.
 	 */
-	private List subProfileIds; // child profile ids
+	private List<String> subProfileIds; // child profile ids
 
-	private static final String[] noSubProfiles = new String[0];
 	/**
 	 * This storage is to be used by the touchpoints to store data.
 	 */
 	private OrderedProperties storage = new OrderedProperties();
 
-	private Set ius = new HashSet();
-	private Map iuProperties = new HashMap();
+	private IUMap ius = new IUMap();
+	final Map<IInstallableUnit, OrderedProperties> iuProperties = new HashMap<IInstallableUnit, OrderedProperties>();
 	private boolean changed = false;
 
 	private long timestamp;
 	private ISurrogateProfileHandler surrogateProfileHandler;
 
-	public Profile(String profileId, Profile parent, Map properties) {
+	public Profile(IProvisioningAgent agent, String profileId, Profile parent, Map<String, String> properties) {
+		this.agent = agent;
 		if (profileId == null || profileId.length() == 0) {
 			throw new IllegalArgumentException(NLS.bind(Messages.Profile_Null_Profile_Id, null));
 		}
@@ -51,6 +81,7 @@ public class Profile implements IQueryable, IProfile {
 		setParent(parent);
 		if (properties != null)
 			storage.putAll(properties);
+
 	}
 
 	/* (non-Javadoc)
@@ -92,7 +123,7 @@ public class Profile implements IQueryable, IProfile {
 
 	public void addSubProfile(String subProfileId) throws IllegalArgumentException {
 		if (subProfileIds == null)
-			subProfileIds = new ArrayList();
+			subProfileIds = new ArrayList<String>();
 
 		if (!subProfileIds.contains(subProfileId))
 			subProfileIds.add(subProfileId);
@@ -116,11 +147,10 @@ public class Profile implements IQueryable, IProfile {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getSubProfileIds()
 	 */
-	public String[] getSubProfileIds() {
+	public List<String> getSubProfileIds() {
 		if (subProfileIds == null)
-			return noSubProfiles;
-
-		return (String[]) subProfileIds.toArray(new String[subProfileIds.size()]);
+			return CollectionUtils.emptyList();
+		return Collections.unmodifiableList(subProfileIds);
 	}
 
 	/* (non-Javadoc)
@@ -155,24 +185,58 @@ public class Profile implements IQueryable, IProfile {
 		changed = true;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#query(org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.equinox.internal.provisional.p2.query.Collector, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		return query.perform(ius.iterator(), collector);
+	public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
+		if (InstallableUnit.MEMBER_ID.equals(memberName)) {
+			if (idIndex == null)
+				idIndex = new IdIndex(ius);
+			return idIndex;
+		}
+
+		if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
+			if (capabilityIndex == null)
+				capabilityIndex = new CapabilityIndex(ius.iterator());
+			return capabilityIndex;
+		}
+
+		if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName)) {
+			if (propertiesIndex == null)
+				propertiesIndex = new ProfilePropertyIndex();
+			return propertiesIndex;
+		}
+		return null;
+	}
+
+	public Iterator<IInstallableUnit> everything() {
+		return ius.iterator();
 	}
 
-	public Collector available(Query query, Collector collector, IProgressMonitor monitor) {
+	public Object getManagedProperty(Object client, String memberName, Object key) {
+		if (!(client instanceof IInstallableUnit))
+			return null;
+		IInstallableUnit iu = (IInstallableUnit) client;
+		if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName) && key instanceof String)
+			return getInstallableUnitProperty(iu, (String) key);
+		if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
+			synchronized (this) {
+				if (translationSupport == null)
+					translationSupport = new TranslationSupport(this);
+				return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
+			}
+		}
+		return null;
+	}
+
+	public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
 		if (surrogateProfileHandler != null)
-			return surrogateProfileHandler.queryProfile(this, query, collector, monitor);
-		return query.perform(ius.iterator(), collector);
+			return surrogateProfileHandler.queryProfile(this, query, monitor);
+		return query(query, new NullProgressMonitor());
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getInstallableUnitProperty(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit, java.lang.String)
 	 */
 	public String getInstallableUnitProperty(IInstallableUnit iu, String key) {
-		OrderedProperties properties = (OrderedProperties) iuProperties.get(createIUKey(iu));
+		OrderedProperties properties = iuProperties.get(iu);
 		if (properties == null)
 			return null;
 
@@ -180,11 +244,11 @@ public class Profile implements IQueryable, IProfile {
 	}
 
 	public String setInstallableUnitProperty(IInstallableUnit iu, String key, String value) {
-		String iuKey = createIUKey(iu);
-		OrderedProperties properties = (OrderedProperties) iuProperties.get(iuKey);
+		//		String iuKey = createIUKey(iu);
+		OrderedProperties properties = iuProperties.get(iu);
 		if (properties == null) {
 			properties = new OrderedProperties();
-			iuProperties.put(iuKey, properties);
+			iuProperties.put(iu, properties);
 		}
 
 		changed = true;
@@ -192,47 +256,51 @@ public class Profile implements IQueryable, IProfile {
 	}
 
 	public String removeInstallableUnitProperty(IInstallableUnit iu, String key) {
-		String iuKey = createIUKey(iu);
-		OrderedProperties properties = (OrderedProperties) iuProperties.get(iuKey);
+		//		String iuKey = createIUKey(iu);
+		OrderedProperties properties = iuProperties.get(iu);
 		if (properties == null)
 			return null;
 
-		String oldValue = (String) properties.remove(key);
+		String oldValue = properties.remove(key);
 		if (properties.isEmpty())
-			iuProperties.remove(iuKey);
+			iuProperties.remove(iu);
 
 		changed = true;
 		return oldValue;
 	}
 
-	private static String createIUKey(IInstallableUnit iu) {
-		return iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
-	}
+	//	private static String createIUKey(IInstallableUnit iu) {
+	//		return iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
+	//	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getLocalProperties()
 	 */
-	public Map getLocalProperties() {
+	public Map<String, String> getLocalProperties() {
 		return OrderedProperties.unmodifiableProperties(storage);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getProperties()
 	 */
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		if (parentProfile == null)
 			return getLocalProperties();
 
-		Map properties = new HashMap(parentProfile.getProperties());
+		Map<String, String> properties = new HashMap<String, String>(parentProfile.getProperties());
 		properties.putAll(storage);
 		return OrderedProperties.unmodifiableProperties(properties);
 	}
 
+	public IProvisioningAgent getProvisioningAgent() {
+		return agent;
+	}
+
 	/**
 	 * 	Add all the properties in the map to the local properties
 	 * 	of the profile.
 	 */
-	public void addProperties(Map properties) {
+	public void addProperties(Map<String, String> properties) {
 		storage.putAll(properties);
 		changed = true;
 	}
@@ -255,8 +323,8 @@ public class Profile implements IQueryable, IProfile {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getInstallableUnitProperties(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit)
 	 */
-	public Map getInstallableUnitProperties(IInstallableUnit iu) {
-		OrderedProperties properties = (OrderedProperties) iuProperties.get(createIUKey(iu));
+	public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu) {
+		OrderedProperties properties = iuProperties.get(iu);
 		if (properties == null)
 			properties = new OrderedProperties();
 
@@ -287,22 +355,21 @@ public class Profile implements IQueryable, IProfile {
 		if (parentProfile != null)
 			parentSnapshot = parentProfile.snapshot();
 
-		Profile snapshot = new Profile(profileId, parentSnapshot, storage);
+		Profile snapshot = new Profile(agent, profileId, parentSnapshot, storage);
 		if (surrogateProfileHandler != null)
 			snapshot.setSurrogateProfileHandler(surrogateProfileHandler);
 		snapshot.setTimestamp(timestamp);
 
 		if (subProfileIds != null) {
-			for (Iterator it = subProfileIds.iterator(); it.hasNext();) {
-				String subProfileId = (String) it.next();
+			for (String subProfileId : subProfileIds) {
 				snapshot.addSubProfile(subProfileId);
 			}
 		}
 
-		for (Iterator it = ius.iterator(); it.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) it.next();
+		for (Iterator<IInstallableUnit> iter = ius.iterator(); iter.hasNext();) {
+			IInstallableUnit iu = iter.next();
 			snapshot.addInstallableUnit(iu);
-			Map properties = getInstallableUnitProperties(iu);
+			Map<String, String> properties = getInstallableUnitProperties(iu);
 			if (properties != null)
 				snapshot.addInstallableUnitProperties(iu, properties);
 		}
@@ -310,26 +377,34 @@ public class Profile implements IQueryable, IProfile {
 		return snapshot;
 	}
 
-	public void addInstallableUnitProperties(IInstallableUnit iu, Map properties) {
-		for (Iterator it = properties.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			String key = (String) entry.getKey();
-			String value = (String) entry.getValue();
-			setInstallableUnitProperty(iu, key, value);
+	public void addInstallableUnitProperties(IInstallableUnit iu, Map<String, String> properties) {
+		for (Entry<String, String> entry : properties.entrySet()) {
+			setInstallableUnitProperty(iu, entry.getKey(), entry.getValue());
 		}
 	}
 
 	public void clearInstallableUnitProperties(IInstallableUnit iu) {
-		iuProperties.remove(createIUKey(iu));
+		iuProperties.remove(iu);
 		changed = true;
 	}
 
 	public void clearOrphanedInstallableUnitProperties() {
-		List iuKeys = new ArrayList();
-		for (Iterator it = ius.iterator(); it.hasNext();)
-			iuKeys.add(createIUKey((IInstallableUnit) it.next()));
+		Set<IInstallableUnit> keys = iuProperties.keySet();
+		//		Set orphans = new HashSet();
+		Collection<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
+		for (IInstallableUnit iu : keys) {
+			if (!ius.contains(iu))
+				toRemove.add(iu);
+		}
 
-		iuProperties.keySet().retainAll(iuKeys);
+		for (IInstallableUnit iu : toRemove) {
+			iuProperties.remove(iu);
+		}
+		//		List iuKeys = new ArrayList();
+		//		for (Iterator it = ius.iterator(); it.hasNext();)
+		//			iuKeys.add((IInstallableUnit) it.next());
+		//
+		//		iuProperties.keySet().retainAll(iuKeys);
 	}
 
 	public long getTimestamp() {
@@ -343,4 +418,11 @@ public class Profile implements IQueryable, IProfile {
 	public void setSurrogateProfileHandler(ISurrogateProfileHandler surrogateProfileHandler) {
 		this.surrogateProfileHandler = surrogateProfileHandler;
 	}
+
+	/**
+	 * Prints a string representation for debugging purposes only.
+	 */
+	public String toString() {
+		return "Profile(" + getProfileId() + ')'; //$NON-NLS-1$
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java
new file mode 100644
index 0000000..c81fd93
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.EventObject;
+import org.eclipse.equinox.p2.engine.IProfileEvent;
+
+/**
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class ProfileEvent extends EventObject implements IProfileEvent {
+	private static final long serialVersionUID = 3082402920617281765L;
+
+	private int reason;
+
+	public ProfileEvent(String profileId, int reason) {
+		super(profileId);
+		this.reason = reason;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProfileEvent#getReason()
+	 */
+	public int getReason() {
+		return reason;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProfileEvent#getProfileId()
+	 */
+	public String getProfileId() {
+		return (String) getSource();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.EventObject#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("ProfileEvent["); //$NON-NLS-1$
+		buffer.append(getProfileId());
+		buffer.append("-->"); //$NON-NLS-1$
+		switch (reason) {
+			case IProfileEvent.ADDED :
+				buffer.append("ADDED"); //$NON-NLS-1$
+				break;
+			case IProfileEvent.REMOVED :
+				buffer.append("REMOVED"); //$NON-NLS-1$
+				break;
+			case IProfileEvent.CHANGED :
+				buffer.append("CHANGED"); //$NON-NLS-1$
+				break;
+		}
+		buffer.append("] "); //$NON-NLS-1$
+		return buffer.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
index 326a85c..3dfe7df 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
@@ -16,16 +16,19 @@ import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
 import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
 import org.eclipse.osgi.util.NLS;
 
 public class ProfileMetadataRepository extends AbstractMetadataRepository {
@@ -37,12 +40,13 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
 	public static final String TYPE = "org.eclipse.equinox.p2.engine.repo.metadataRepository"; //$NON-NLS-1$
 	public static final Integer VERSION = new Integer(1);
 	private IProfile profile;
+	private HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
 
-	public ProfileMetadataRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
-		super(location.toString(), TYPE, VERSION.toString(), location, null, null, null);
+	public ProfileMetadataRepository(IProvisioningAgent agent, URI location, IProgressMonitor monitor) throws ProvisionException {
+		super(agent, location.toString(), TYPE, VERSION.toString(), location, null, null, null);
 
 		try {
-			profile = getProfile(location);
+			profile = getProfile(agent, location);
 		} catch (RuntimeException e) {
 			throw new ProvisionException(new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.REPOSITORY_FAILED_READ, e.getMessage(), e));
 		}
@@ -50,19 +54,19 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
 	}
 
 	private void publishArtifactRepos() {
-		List artifactRepos = findArtifactRepos();
+		List<URI> artifactRepos = findArtifactRepos();
 
-		IProvisioningEventBus bus = (IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME);
+		IProvisioningEventBus bus = (IProvisioningEventBus) getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
 		if (bus == null)
 			return;
-		for (Iterator it = artifactRepos.iterator(); it.hasNext();) {
-			URI repo = (URI) it.next();
+		for (URI repo : artifactRepos) {
+			repositories.add(new RepositoryReference(repo, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED));
 			bus.publishEvent(new RepositoryEvent(repo, IRepository.TYPE_ARTIFACT, RepositoryEvent.DISCOVERED, true));
 		}
 	}
 
-	private List findArtifactRepos() {
-		List artifactRepos = new ArrayList();
+	private List<URI> findArtifactRepos() {
+		List<URI> artifactRepos = new ArrayList<URI>();
 		File p2Directory = findP2Directory();
 
 		// Add the profile registry's default agent artifact repository.
@@ -134,7 +138,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
 	}
 
 	private File findP2Directory() {
-		File target = new File(location);
+		File target = new File(getLocation());
 		if (target.isFile())
 			target = target.getParentFile();
 
@@ -151,23 +155,19 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
 		return p2EngineDirectory.getParentFile();
 	}
 
-	public void initialize(RepositoryState state) {
-		// nothing to do
+	public Collection<IRepositoryReference> getReferences() {
+		return Collections.unmodifiableCollection(repositories);
 	}
 
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		return profile.query(query, collector, monitor);
+	public void initialize(RepositoryState state) {
+		// nothing to do
 	}
 
-	public static void validate(URI location, IProgressMonitor monitor) throws ProvisionException {
-		try {
-			getProfile(location);
-		} catch (RuntimeException e) {
-			throw new ProvisionException(new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.REPOSITORY_FAILED_READ, e.getMessage(), e));
-		}
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		return profile.query(query, monitor);
 	}
 
-	private static IProfile getProfile(URI location) throws ProvisionException {
+	private static IProfile getProfile(IProvisioningAgent agent, URI location) throws ProvisionException {
 		if (!FILE_SCHEME.equalsIgnoreCase(location.getScheme()))
 			fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
 
@@ -197,7 +197,7 @@ public class ProfileMetadataRepository extends AbstractMetadataRepository {
 		File registryDirectory = target.getParentFile();
 		if (registryDirectory == null)
 			fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
-		SimpleProfileRegistry profileRegistry = new SimpleProfileRegistry(registryDirectory, null, false);
+		SimpleProfileRegistry profileRegistry = new SimpleProfileRegistry(agent, registryDirectory, null, false);
 		if (timestamp == -1) {
 			long[] timestamps = profileRegistry.listProfileTimestamps(profileId);
 			timestamp = timestamps[timestamps.length - 1];
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java
index 184d7e4..5d4cd16 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java
@@ -10,14 +10,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.engine;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
 import java.net.URI;
 import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
 
 public class ProfileMetadataRepositoryFactory extends MetadataRepositoryFactory {
 
@@ -25,7 +24,7 @@ public class ProfileMetadataRepositoryFactory extends MetadataRepositoryFactory
 	 * @throws ProvisionException
 	 * documenting to avoid warning 
 	 */
-	public IMetadataRepository create(URI location, String name, String type, Map properties) throws ProvisionException {
+	public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		return null;
 	}
 
@@ -34,15 +33,6 @@ public class ProfileMetadataRepositoryFactory extends MetadataRepositoryFactory
 		if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
 			return null;
 		}
-		return new ProfileMetadataRepository(location, monitor);
-	}
-
-	public IStatus validate(URI location, IProgressMonitor monitor) {
-		try {
-			ProfileMetadataRepository.validate(location, monitor);
-		} catch (ProvisionException e) {
-			return e.getStatus();
-		}
-		return Status.OK_STATUS;
+		return new ProfileMetadataRepository(getAgent(), location, monitor);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
index 4ebf2a3..0a6beca 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
@@ -13,8 +13,8 @@ package org.eclipse.equinox.internal.p2.engine;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.osgi.framework.BundleContext;
 import org.xml.sax.Attributes;
 
@@ -96,7 +96,7 @@ public abstract class ProfileParser extends MetadataParser implements ProfileXML
 			return 0;
 		}
 
-		public Map getProperties() {
+		public Map<String, String> getProperties() {
 			if (propertiesHandler == null)
 				return null;
 			return propertiesHandler.getProperties();
@@ -108,16 +108,16 @@ public abstract class ProfileParser extends MetadataParser implements ProfileXML
 			return unitsHandler.getUnits();
 		}
 
-		public Map getIUProperties(IInstallableUnit iu) {
+		public Map<String, String> getIUProperties(IInstallableUnit iu) {
 			if (iusPropertiesHandler == null)
 				return null;
 
-			Map iusPropertiesMap = iusPropertiesHandler.getIUsPropertiesMap();
+			Map<String, Map<String, String>> iusPropertiesMap = iusPropertiesHandler.getIUsPropertiesMap();
 			if (iusPropertiesMap == null)
 				return null;
 
 			String iuIdentity = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
-			return (Map) iusPropertiesMap.get(iuIdentity);
+			return iusPropertiesMap.get(iuIdentity);
 		}
 	}
 
@@ -126,10 +126,10 @@ public abstract class ProfileParser extends MetadataParser implements ProfileXML
 		private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
 
 		private String iuIdentity;
-		private Map iusPropertiesMap;
+		private Map<String, Map<String, String>> iusPropertiesMap;
 		private PropertiesHandler propertiesHandler;
 
-		public IUPropertiesHandler(AbstractHandler parentHandler, Attributes attributes, Map iusPropertiesMap) {
+		public IUPropertiesHandler(AbstractHandler parentHandler, Attributes attributes, Map<String, Map<String, String>> iusPropertiesMap) {
 			super(parentHandler, IU_PROPERTIES_ELEMENT);
 			this.iusPropertiesMap = iusPropertiesMap;
 
@@ -156,15 +156,16 @@ public abstract class ProfileParser extends MetadataParser implements ProfileXML
 
 	protected class IUsPropertiesHandler extends AbstractHandler {
 
-		private Map iusPropertiesMap;
+		private Map<String, Map<String, String>> iusPropertiesMap;
 
 		public IUsPropertiesHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, IUS_PROPERTIES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			iusPropertiesMap = (size != null ? new LinkedHashMap(new Integer(size).intValue()) : new LinkedHashMap(4));
+			String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
+			int size = (sizeStr != null ? new Integer(sizeStr).intValue() : 4);
+			iusPropertiesMap = new LinkedHashMap<String, Map<String, String>>(size);
 		}
 
-		public Map getIUsPropertiesMap() {
+		public Map<String, Map<String, String>> getIUsPropertiesMap() {
 			return iusPropertiesMap;
 		}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
index 8c84e40..ea3831b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,11 +16,13 @@ import org.eclipse.core.internal.preferences.EclipsePreferences;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.security.storage.EncodingUtils;
+import org.osgi.framework.*;
 import org.osgi.service.prefs.BackingStoreException;
 
 /**
@@ -30,9 +32,12 @@ import org.osgi.service.prefs.BackingStoreException;
  */
 public class ProfilePreferences extends EclipsePreferences {
 	private class SaveJob extends Job {
-		SaveJob() {
+		IProvisioningAgent agent;
+
+		SaveJob(IProvisioningAgent agent) {
 			super(Messages.ProfilePreferences_saving);
 			setSystem(true);
+			this.agent = agent;
 		}
 
 		public boolean belongsTo(Object family) {
@@ -41,20 +46,31 @@ public class ProfilePreferences extends EclipsePreferences {
 
 		protected IStatus run(IProgressMonitor monitor) {
 			try {
-				doSave();
+				doSave(agent);
+			} catch (IllegalStateException e) {
+				if (Tracing.DEBUG_PROFILE_PREFERENCES) {
+					Tracing.debug("Attempt to save preferences after agent has been stopped"); //$NON-NLS-1$
+					e.printStackTrace();
+				}
+				//ignore - this means the provisioning agent has already been stopped, and since
+				//this job is joined during agent stop, it means this job has been scheduled after the 
+				//agent stopped and therefore can't have any interesting changes to save
 			} catch (BackingStoreException e) {
 				LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Exception saving profile preferences", e)); //$NON-NLS-1$
+			} catch (RuntimeException e) {
+				LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Exception saving profile preferences", e)); //$NON-NLS-1$
 			}
 			return Status.OK_STATUS;
 		}
 	}
 
 	// cache which nodes have been loaded from disk
-	private static Set loadedNodes = Collections.synchronizedSet(new HashSet());
+	private static Set<String> loadedNodes = Collections.synchronizedSet(new HashSet<String>());
 
 	public static final Object PROFILE_SAVE_JOB_FAMILY = new Object();
 
 	private static final long SAVE_SCHEDULE_DELAY = 500;
+
 	//private IPath location;
 	private IEclipsePreferences loadLevel;
 	private Object profileLock;
@@ -70,24 +86,25 @@ public class ProfilePreferences extends EclipsePreferences {
 	public ProfilePreferences(EclipsePreferences nodeParent, String nodeName) {
 		super(nodeParent, nodeName);
 
+		//path is /profile/{agent location}/{profile id}/qualifier
+
 		// cache the segment count
 		String path = absolutePath();
 		segmentCount = getSegmentCount(path);
 
-		if (segmentCount <= 1)
+		if (segmentCount <= 2)
 			return;
 
-		if (segmentCount == 2)
+		if (segmentCount == 3)
 			profileLock = new Object();
 
-		if (segmentCount < 3)
+		if (segmentCount < 4)
 			return;
 		// cache the qualifier
-		qualifier = getSegment(path, 2);
+		qualifier = getSegment(path, 3);
 	}
 
-	private boolean containsProfile(String profileId) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(EngineActivator.getContext(), IProfileRegistry.class.getName());
+	private boolean containsProfile(IProfileRegistry profileRegistry, String profileId) {
 		if (profileId == null || profileRegistry == null)
 			return false;
 		return profileRegistry.containsProfile(profileId);
@@ -97,13 +114,17 @@ public class ProfilePreferences extends EclipsePreferences {
 	 * (non-Javadoc)
 	 * Create an Engine phase to save profile preferences
 	 */
-	protected void doSave() throws BackingStoreException {
+	protected void doSave(IProvisioningAgent agent) throws BackingStoreException {
 		synchronized (((ProfilePreferences) parent).profileLock) {
-			String profileId = getSegment(absolutePath(), 1);
-			if (!containsProfile(profileId)) {
+			String profileId = getSegment(absolutePath(), 2);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			//can't save anything without a profile registry
+			if (registry == null)
+				return;
+			if (!containsProfile(registry, profileId)) {
 				//use the default location for the self profile, otherwise just do nothing and return
 				if (IProfileRegistry.SELF.equals(profileId)) {
-					IPath location = getDefaultLocation();
+					IPath location = getDefaultLocation(agent);
 					if (location != null) {
 						super.save(location);
 						return;
@@ -113,21 +134,64 @@ public class ProfilePreferences extends EclipsePreferences {
 					Tracing.debug("Not saving preferences since there is no file for node: " + absolutePath()); //$NON-NLS-1$
 				return;
 			}
-			super.save(getProfileLocation(profileId));
+			super.save(getProfileLocation(registry, profileId));
+		}
+	}
+
+	/**
+	 * Returns a reference to the agent service corresponding to the given encoded
+	 * agent location. Never returns null; throws an exception if the agent could not be found.
+	 */
+	private ServiceReference getAgent(String segment) throws BackingStoreException {
+		String locationString = EncodingUtils.decodeSlashes(segment);
+		Exception failure = null;
+		try {
+			String filter = "(locationURI=" + encodeForFilter(locationString) + ')'; //$NON-NLS-1$
+			final BundleContext context = EngineActivator.getContext();
+			if (context != null) {
+				ServiceReference[] refs = context.getServiceReferences(IProvisioningAgent.SERVICE_NAME, filter);
+				if (refs != null && refs.length > 0)
+					return refs[0];
+			}
+		} catch (InvalidSyntaxException e) {
+			failure = e;
+		}
+		throw new BackingStoreException("Unable to determine provisioning agent from location: " + segment, failure); //$NON-NLS-1$
+	}
+
+	/**
+	 * Encodes a string so that it is suitable for use as a value for a filter property.
+	 * Any reserved filter characters are escaped.
+	 */
+	private String encodeForFilter(String string) {
+		StringBuffer result = new StringBuffer(string.length());
+		char[] input = string.toCharArray();
+		for (int i = 0; i < input.length; i++) {
+			switch (input[i]) {
+				case '(' :
+				case ')' :
+				case '*' :
+				case '\\' :
+					result.append('\\');
+					//fall through
+				default :
+					result.append(input[i]);
+			}
 		}
+		return result.toString();
 	}
 
 	/**
 	 * Returns the preference file to use when there is no active profile.
 	 */
-	private IPath getDefaultLocation() {
+	private IPath getDefaultLocation(IProvisioningAgent agent) {
 		//use engine agent location for preferences if there is no self profile
-		AgentLocation location = (AgentLocation) ServiceHelper.getService(EngineActivator.getContext(), AgentLocation.SERVICE_NAME);
+		IAgentLocation location = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 		if (location == null) {
 			LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Agent location service not available", new RuntimeException())); //$NON-NLS-1$
 			return null;
 		}
-		IPath dataArea = new Path(URLUtil.toFile(location.getDataArea(EngineActivator.ID)).getAbsolutePath());
+		IPath dataArea = new Path(URIUtil.toFile(location.getDataArea(EngineActivator.ID)).getAbsolutePath());
 		return computeLocation(dataArea, qualifier);
 	}
 
@@ -139,7 +203,7 @@ public class ProfilePreferences extends EclipsePreferences {
 			// Walk backwards up the tree starting at this node.
 			// This is important to avoid a chicken/egg thing on startup.
 			IEclipsePreferences node = this;
-			for (int i = 3; i < segmentCount; i++)
+			for (int i = 4; i < segmentCount; i++)
 				node = (EclipsePreferences) node.parent();
 			loadLevel = node;
 		}
@@ -149,8 +213,8 @@ public class ProfilePreferences extends EclipsePreferences {
 	/**
 	 * Returns the location of the preference file for the given profile.
 	 */
-	private IPath getProfileLocation(String profileId) {
-		SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) ServiceHelper.getService(EngineActivator.getContext(), IProfileRegistry.class.getName());
+	private IPath getProfileLocation(IProfileRegistry registry, String profileId) {
+		SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) registry;
 		File profileDataDirectory = profileRegistry.getProfileDataDirectory(profileId);
 		return computeLocation(new Path(profileDataDirectory.getAbsolutePath()), qualifier);
 	}
@@ -173,21 +237,28 @@ public class ProfilePreferences extends EclipsePreferences {
 	 */
 	protected void load() throws BackingStoreException {
 		synchronized (((ProfilePreferences) parent).profileLock) {
-			String profileId = getSegment(absolutePath(), 1);
-			if (!containsProfile(profileId)) {
-				//use the default location for the self profile, otherwise just do nothing and return
-				if (IProfileRegistry.SELF.equals(profileId)) {
-					IPath location = getDefaultLocation();
-					if (location != null) {
-						load(location);
-						return;
+			ServiceReference agentRef = getAgent(getSegment(absolutePath(), 1));
+			IProvisioningAgent agent = (IProvisioningAgent) EngineActivator.getContext().getService(agentRef);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			try {
+				String profileId = getSegment(absolutePath(), 2);
+				if (!containsProfile(registry, profileId)) {
+					//use the default location for the self profile, otherwise just do nothing and return
+					if (IProfileRegistry.SELF.equals(profileId)) {
+						IPath location = getDefaultLocation(agent);
+						if (location != null) {
+							load(location);
+							return;
+						}
 					}
+					if (Tracing.DEBUG_PROFILE_PREFERENCES)
+						Tracing.debug("Not loading preferences since there is no file for node: " + absolutePath()); //$NON-NLS-1$
+					return;
 				}
-				if (Tracing.DEBUG_PROFILE_PREFERENCES)
-					Tracing.debug("Not loading preferences since there is no file for node: " + absolutePath()); //$NON-NLS-1$
-				return;
+				load(getProfileLocation(registry, profileId));
+			} finally {
+				EngineActivator.getContext().ungetService(agentRef);
 			}
-			load(getProfileLocation(profileId));
 		}
 	}
 
@@ -204,12 +275,22 @@ public class ProfilePreferences extends EclipsePreferences {
 	 * Schedules the save job. This method is synchronized to protect lazily initialization 
 	 * of the save job instance.
 	 */
-	protected synchronized void save() {
-		if (saveJob == null)
-			saveJob = new SaveJob();
+	protected synchronized void save() throws BackingStoreException {
+		try {
+			ServiceReference agentRef = getAgent(getSegment(absolutePath(), 1));
+			IProvisioningAgent agent = (IProvisioningAgent) EngineActivator.getContext().getService(agentRef);
+			if (saveJob == null || saveJob.agent != agent)
+				saveJob = new SaveJob(agent);
+			EngineActivator.getContext().ungetService(agentRef);
+		} catch (BackingStoreException e) {
+			if (Tracing.DEBUG_PROFILE_PREFERENCES)
+				e.printStackTrace();
+			//get agent has already gone away so we can't save preferences
+			//TODO see bug 300450
+		}
 		//only schedule a save if the engine bundle is still running
 		BundleContext context = EngineActivator.getContext();
-		if (context == null)
+		if (context == null || saveJob == null)
 			return;
 		try {
 			if (context.getBundle().getState() == Bundle.ACTIVE)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java
new file mode 100644
index 0000000..7c3bb02
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+
+/**
+ * Instantiates default instances of {@link IProfileRegistry}.
+ */
+public class ProfileRegistryComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		IAgentLocation location = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
+		SimpleProfileRegistry registry = new SimpleProfileRegistry(agent, SimpleProfileRegistry.getDefaultRegistryDirectory(location));
+		registry.setEventBus((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME));
+		return registry;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java
index 282f0e4..6562cf5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java
@@ -10,14 +10,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.engine;
 
+import org.eclipse.equinox.p2.query.QueryUtil;
+
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.*;
 import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataWriter;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 
 public class ProfileWriter extends MetadataWriter implements ProfileXMLConstants {
 
@@ -29,16 +29,10 @@ public class ProfileWriter extends MetadataWriter implements ProfileXMLConstants
 		start(PROFILE_ELEMENT);
 		attribute(ID_ATTRIBUTE, profile.getProfileId());
 		attribute(TIMESTAMP_ATTRIBUTE, Long.toString(profile.getTimestamp()));
-		IProfile parentProfile = profile.getParentProfile();
-		if (parentProfile != null)
-			attribute(PARENT_ID_ATTRIBUTE, parentProfile.getProfileId());
-		writeProperties(profile.getLocalProperties());
-		Collector collector = profile.query(InstallableUnitQuery.ANY, new Collector(), null);
-		ArrayList ius = new ArrayList(collector.toCollection());
-		Collections.sort(ius, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				IInstallableUnit iu1 = (IInstallableUnit) o1;
-				IInstallableUnit iu2 = (IInstallableUnit) o2;
+		writeProperties(profile.getProperties());
+		ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>(profile.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet());
+		Collections.sort(ius, new Comparator<IInstallableUnit>() {
+			public int compare(IInstallableUnit iu1, IInstallableUnit iu2) {
 				int IdCompare = iu1.getId().compareTo(iu2.getId());
 				if (IdCompare != 0)
 					return IdCompare;
@@ -52,14 +46,14 @@ public class ProfileWriter extends MetadataWriter implements ProfileXMLConstants
 		flush();
 	}
 
-	private void writeInstallableUnitsProperties(Iterator it, int size, IProfile profile) {
+	private void writeInstallableUnitsProperties(Iterator<IInstallableUnit> it, int size, IProfile profile) {
 		if (size == 0)
 			return;
 		start(IUS_PROPERTIES_ELEMENT);
 		attribute(COLLECTION_SIZE_ATTRIBUTE, size);
 		while (it.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) it.next();
-			Map properties = profile.getInstallableUnitProperties(iu);
+			IInstallableUnit iu = it.next();
+			Map<String, String> properties = profile.getInstallableUnitProperties(iu);
 			if (properties.isEmpty())
 				continue;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java
index 3d24608..f28e9e0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java
@@ -11,8 +11,8 @@
 package org.eclipse.equinox.internal.p2.engine;
 
 import org.eclipse.equinox.internal.p2.persistence.XMLConstants;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
 
 /**
  *	Constants defining the structure of the XML for a Profile
@@ -20,9 +20,9 @@ import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
 public interface ProfileXMLConstants extends XMLConstants {
 
 	// A format version number for profile XML.
-	public static final Version CURRENT_VERSION = new Version(1, 0, 0);
-	public static final Version COMPATIBLE_VERSION = new Version(0, 0, 1);
-	public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
+	public static final Version CURRENT_VERSION = Version.createOSGi(1, 0, 0);
+	public static final Version COMPATIBLE_VERSION = Version.createOSGi(0, 0, 1);
+	public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
 
 	// Constants for profile elements
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
new file mode 100644
index 0000000..8125ee5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * @since 2.0
+ */
+public class PropertyOperand extends Operand {
+	private final Object first;
+	private final Object second;
+	private final String key;
+
+	/**
+	 * Creates a new operand that represents replacing a property value
+	 * with another.  At least one of the provided property values must be
+	 * non-null.
+	 * 
+	 * @param key The key of the property being modified
+	 * @param first The property value being removed, or <code>null</code>
+	 * @param second The property value being added, or <code>null</code>
+	 */
+	public PropertyOperand(String key, Object first, Object second) {
+		//the operand must specify have a key and have at least one non-null value
+		Assert.isTrue(key != null && (first != null || second != null));
+		this.first = first;
+		this.second = second;
+		this.key = key;
+	}
+
+	public Object first() {
+		return first;
+	}
+
+	public Object second() {
+		return second;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public String toString() {
+		return key + " = " + first + " --> " + second; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
new file mode 100644
index 0000000..72f1ade
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.*;
+
+/**
+ * @since 2.0
+ */
+public class ProvisioningPlan implements IProvisioningPlan {
+
+	final IProfile profile;
+	final List<Operand> operands = new ArrayList<Operand>();
+	final ProvisioningContext context;
+	IStatus status;
+	private IProvisioningPlan installerPlan;
+
+	public ProvisioningPlan(IProfile profile, Operand[] operands, ProvisioningContext context) {
+		this(Status.OK_STATUS, profile, operands, context, null);
+	}
+
+	public ProvisioningPlan(IStatus status, IProfile profile, ProvisioningContext context, IProvisioningPlan installerPlan) {
+		this(status, profile, null, context, installerPlan);
+	}
+
+	public ProvisioningPlan(IStatus status, IProfile profile, Operand[] operands, ProvisioningContext context, IProvisioningPlan installerPlan) {
+		Assert.isNotNull(profile);
+		this.status = status;
+		this.profile = profile;
+		if (operands != null)
+			this.operands.addAll(Arrays.asList(operands));
+		this.context = (context == null) ? new ProvisioningContext(profile.getProvisioningAgent()) : context;
+		this.installerPlan = installerPlan;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getStatus()
+	 */
+	public IStatus getStatus() {
+		return status;
+	}
+
+	public void setStatus(IStatus status) {
+		this.status = status;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getProfile()
+	 */
+	public IProfile getProfile() {
+		return profile;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getOperands()
+	 */
+	public Operand[] getOperands() {
+		return operands.toArray(new Operand[operands.size()]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getRemovals()
+	 */
+	public IQueryable<IInstallableUnit> getRemovals() {
+		return new QueryablePlan(false);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getAdditions()
+	 */
+	public IQueryable<IInstallableUnit> getAdditions() {
+		return new QueryablePlan(true);
+	}
+
+	private class QueryablePlan implements IQueryable<IInstallableUnit> {
+		private boolean addition;
+
+		public QueryablePlan(boolean add) {
+			this.addition = add;
+		}
+
+		public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+			if (operands == null || status.getSeverity() == IStatus.ERROR)
+				return Collector.emptyCollector();
+			Collection<IInstallableUnit> list = new ArrayList<IInstallableUnit>();
+			for (Operand operand : operands) {
+				if (!(operand instanceof InstallableUnitOperand))
+					continue;
+				InstallableUnitOperand op = ((InstallableUnitOperand) operand);
+				IInstallableUnit iu = addition ? op.second() : op.first();
+				if (iu != null)
+					list.add(iu);
+			}
+			return query.perform(list.iterator());
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getInstallerPlan()
+	 */
+	public IProvisioningPlan getInstallerPlan() {
+		return installerPlan;
+	}
+
+	public ProvisioningContext getContext() {
+		return context;
+	}
+
+	public void setInstallerPlan(IProvisioningPlan p) {
+		installerPlan = p;
+	}
+
+	public void addInstallableUnit(IInstallableUnit iu) {
+		operands.add(new InstallableUnitOperand(null, iu));
+	}
+
+	public void removeInstallableUnit(IInstallableUnit iu) {
+		operands.add(new InstallableUnitOperand(iu, null));
+	}
+
+	public void updateInstallableUnit(IInstallableUnit iu1, IInstallableUnit iu2) {
+		operands.add(new InstallableUnitOperand(iu1, iu2));
+	}
+
+	public void setProfileProperty(String name, String value) {
+		String currentValue = profile.getProperty(name);
+		if (value == null && currentValue == null)
+			return;
+		operands.add(new PropertyOperand(name, currentValue, value));
+	}
+
+	public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value) {
+		String currentValue = profile.getInstallableUnitProperty(iu, name);
+		if (value == null && currentValue == null)
+			return;
+		operands.add(new InstallableUnitPropertyOperand(iu, name, currentValue, value));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java
new file mode 100644
index 0000000..50ef2e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * @since 2.0
+ */
+public class RollbackOperationEvent extends TransactionEvent {
+
+	private static final long serialVersionUID = -2076492953949691215L;
+	private IStatus cause;
+
+	public RollbackOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine, IStatus cause) {
+		super(profile, phaseSet, operands, engine);
+		this.cause = cause;
+	}
+
+	public IStatus getStatus() {
+		return cause;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
index 406d4c5..57aabb9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,30 +10,31 @@ package org.eclipse.equinox.internal.p2.engine;
 
 import java.io.*;
 import java.lang.ref.SoftReference;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
 import java.util.*;
 import java.util.Map.Entry;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
 import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
+import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.core.spi.IAgentService;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
-public class SimpleProfileRegistry implements IProfileRegistry {
+public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
 
 	private static final String PROFILE_REGISTRY = "profile registry"; //$NON-NLS-1$
 
@@ -42,11 +43,13 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	public static final String DEFAULT_STORAGE_DIR = "profileRegistry"; //$NON-NLS-1$
 	private static final String DATA_EXT = ".data"; //$NON-NLS-1$
 
+	protected final IProvisioningAgent agent;
+
 	/**
 	 * Reference to Map of String(Profile id)->Profile. 
 	 */
-	private SoftReference profiles;
-	private Map profileLocks = new HashMap();
+	private SoftReference<Map<String, Profile>> profiles;
+	private Map<String, ProfileLock> profileLocks = new HashMap<String, ProfileLock>();
 
 	private String self;
 
@@ -57,30 +60,51 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 
 	ISurrogateProfileHandler surrogateProfileHandler;
 
-	public SimpleProfileRegistry() {
-		this(null, new SurrogateProfileHandler(), true);
+	private IProvisioningEventBus eventBus;
+
+	public SimpleProfileRegistry(IProvisioningAgent agent, File registryDirectory) {
+		this(agent, registryDirectory, new SurrogateProfileHandler(agent), true);
 	}
 
-	public SimpleProfileRegistry(File registryDirectory, ISurrogateProfileHandler handler, boolean updateSelfProfile) {
-		store = (registryDirectory != null) ? registryDirectory : getDefaultRegistryDirectory();
+	public SimpleProfileRegistry(IProvisioningAgent agent, File registryDirectory, ISurrogateProfileHandler handler, boolean updateSelfProfile) {
+		this.agent = agent;
+		store = registryDirectory;
 		surrogateProfileHandler = handler;
-		self = EngineActivator.getContext().getProperty("eclipse.p2.profile"); //$NON-NLS-1$
+		Assert.isNotNull(store, "Profile registry requires a directory"); //$NON-NLS-1$
+		findSelf();
 		this.updateSelfProfile = updateSelfProfile;
 	}
 
-	private static File getDefaultRegistryDirectory() {
+	/**
+	 * Determine the id of the "self" profile. This is only applicable for the registry
+	 * of the currently running system.
+	 */
+	private void findSelf() {
+		//the location for the currently running system is registered as a service
+		final BundleContext context = EngineActivator.getContext();
+		if (context == null)
+			return;
+		ServiceReference ref = context.getServiceReference(IAgentLocation.SERVICE_NAME);
+		if (ref == null)
+			return;
+		IAgentLocation location = (IAgentLocation) context.getService(ref);
+		if (location == null)
+			return;
+		if (store.equals(getDefaultRegistryDirectory(location))) {
+			//we are the registry for the currently running system
+			self = context.getProperty("eclipse.p2.profile"); //$NON-NLS-1$
+		}
+		context.ungetService(ref);
+	}
+
+	public static File getDefaultRegistryDirectory(IAgentLocation agent) {
 		File registryDirectory = null;
-		AgentLocation agent = (AgentLocation) ServiceHelper.getService(EngineActivator.getContext(), AgentLocation.class.getName());
 		if (agent == null)
 			throw new IllegalStateException("Profile Registry inialization failed: Agent Location is not available"); //$NON-NLS-1$
-		try {
-			URL registryURL = new URL(agent.getDataArea(EngineActivator.ID), DEFAULT_STORAGE_DIR);
-			registryDirectory = new File(registryURL.getPath());
-			registryDirectory.mkdirs();
-
-		} catch (MalformedURLException e) {
-			//this is not possible because we know the above URL is valid
-		}
+		final URI engineDataArea = agent.getDataArea(EngineActivator.ID);
+		URI registryURL = URIUtil.append(engineDataArea, DEFAULT_STORAGE_DIR);
+		registryDirectory = new File(registryURL);
+		registryDirectory.mkdirs();
 		return registryDirectory;
 	}
 
@@ -88,13 +112,17 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	 * If the current profile for self is marked as a roaming profile, we need
 	 * to update its install and bundle pool locations.
 	 */
-	private void updateSelfProfile(Map profileMap) {
+	private void updateSelfProfile(Map<String, Profile> profileMap) {
 		if (profileMap == null)
 			return;
-		Profile selfProfile = (Profile) profileMap.get(self);
+		Profile selfProfile = profileMap.get(self);
 		if (selfProfile == null)
 			return;
 
+		//register default locale provider where metadata translations are found
+		//TODO ideally this should not be hard-coded to the current profile
+		TranslationSupport.getInstance().setTranslationSource(selfProfile);
+
 		if (DebugHelper.DEBUG_PROFILE_REGISTRY)
 			DebugHelper.debug(PROFILE_REGISTRY, "SimpleProfileRegistry.updateSelfProfile"); //$NON-NLS-1$
 		boolean changed = false;
@@ -167,7 +195,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		} catch (IOException e) {
 			LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.error_parsing_profile, profileFile), e));
 		}
-		return (IProfile) parser.getProfileMap().get(id);
+		return parser.getProfileMap().get(id);
 	}
 
 	public synchronized long[] listProfileTimestamps(String id) {
@@ -204,7 +232,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	private Profile internalGetProfile(String id) {
 		if (SELF.equals(id))
 			id = self;
-		Profile profile = (Profile) getProfileMap().get(id);
+		Profile profile = getProfileMap().get(id);
 		if (profile == null && self != null && self.equals(id))
 			profile = createSurrogateProfile(id);
 
@@ -221,16 +249,15 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 
 		saveProfile(profile);
 		resetProfiles();
-		return (Profile) getProfileMap().get(id);
+		return getProfileMap().get(id);
 	}
 
 	public synchronized IProfile[] getProfiles() {
-		Map profileMap = getProfileMap();
+		Map<String, Profile> profileMap = getProfileMap();
 		Profile[] result = new Profile[profileMap.size()];
 		int i = 0;
-		for (Iterator it = profileMap.values().iterator(); it.hasNext(); i++) {
-			Profile profile = (Profile) it.next();
-			result[i] = profile.snapshot();
+		for (Profile profile : profileMap.values()) {
+			result[i++] = profile.snapshot();
 		}
 		return result;
 	}
@@ -238,16 +265,16 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	/**
 	 * Returns an initialized map of String(Profile id)->Profile. 
 	 */
-	protected Map getProfileMap() {
+	protected Map<String, Profile> getProfileMap() {
 		if (profiles != null) {
-			Map result = (Map) profiles.get();
+			Map<String, Profile> result = profiles.get();
 			if (result != null)
 				return result;
 		}
-		Map result = restore();
+		Map<String, Profile> result = restore();
 		if (result == null)
-			result = new LinkedHashMap(8);
-		profiles = new SoftReference(result);
+			result = new LinkedHashMap<String, Profile>(8);
+		profiles = new SoftReference<Map<String, Profile>>(result);
 		if (updateSelfProfile) {
 			//update self profile on first load
 			updateSelfProfile(result);
@@ -261,39 +288,39 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		if (current == null)
 			throw new IllegalArgumentException(NLS.bind(Messages.profile_does_not_exist, id));
 
-		ProfileLock lock = (ProfileLock) profileLocks.get(id);
+		ProfileLock lock = profileLocks.get(id);
 		lock.checkLocked();
 
 		current.clearLocalProperties();
 		current.clearInstallableUnits();
 
 		current.addProperties(profile.getLocalProperties());
-		Collector collector = profile.query(InstallableUnitQuery.ANY, new Collector(), null);
-		for (Iterator collectorIt = collector.iterator(); collectorIt.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) collectorIt.next();
+		IQueryResult<IInstallableUnit> queryResult = profile.query(QueryUtil.createIUAnyQuery(), null);
+		for (Iterator<IInstallableUnit> queryResultIt = queryResult.iterator(); queryResultIt.hasNext();) {
+			IInstallableUnit iu = queryResultIt.next();
 			current.addInstallableUnit(iu);
-			Map iuProperties = profile.getInstallableUnitProperties(iu);
+			Map<String, String> iuProperties = profile.getInstallableUnitProperties(iu);
 			if (iuProperties != null)
 				current.addInstallableUnitProperties(iu, iuProperties);
 		}
 		saveProfile(current);
 		profile.clearOrphanedInstallableUnitProperties();
 		profile.setTimestamp(current.getTimestamp());
-		broadcastChangeEvent(id, ProfileEvent.CHANGED);
+		broadcastChangeEvent(id, IProfileEvent.CHANGED);
 	}
 
 	public IProfile addProfile(String id) throws ProvisionException {
 		return addProfile(id, null, null);
 	}
 
-	public IProfile addProfile(String id, Map profileProperties) throws ProvisionException {
+	public IProfile addProfile(String id, Map<String, String> profileProperties) throws ProvisionException {
 		return addProfile(id, profileProperties, null);
 	}
 
-	public synchronized IProfile addProfile(String id, Map profileProperties, String parentId) throws ProvisionException {
+	public synchronized IProfile addProfile(String id, Map<String, String> profileProperties, String parentId) throws ProvisionException {
 		if (SELF.equals(id))
 			id = self;
-		Map profileMap = getProfileMap();
+		Map<String, Profile> profileMap = getProfileMap();
 		if (profileMap.get(id) != null)
 			throw new ProvisionException(NLS.bind(Messages.Profile_Duplicate_Root_Profile_Id, id));
 
@@ -301,17 +328,17 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		if (parentId != null) {
 			if (SELF.equals(parentId))
 				parentId = self;
-			parent = (Profile) profileMap.get(parentId);
+			parent = profileMap.get(parentId);
 			if (parent == null)
 				throw new ProvisionException(NLS.bind(Messages.Profile_Parent_Not_Found, parentId));
 		}
 
-		Profile profile = new Profile(id, parent, profileProperties);
+		Profile profile = new Profile(agent, id, parent, profileProperties);
 		if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(profile))
 			profile.setSurrogateProfileHandler(surrogateProfileHandler);
 		profileMap.put(id, profile);
 		saveProfile(profile);
-		broadcastChangeEvent(id, ProfileEvent.ADDED);
+		broadcastChangeEvent(id, IProfileEvent.ADDED);
 		return profile.snapshot();
 	}
 
@@ -319,14 +346,14 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		if (SELF.equals(profileId))
 			profileId = self;
 		//note we need to maintain a reference to the profile map until it is persisted to prevent gc
-		Map profileMap = getProfileMap();
-		Profile profile = (Profile) profileMap.get(profileId);
+		Map<String, Profile> profileMap = getProfileMap();
+		Profile profile = profileMap.get(profileId);
 		if (profile == null)
 			return;
 
-		String[] subProfileIds = profile.getSubProfileIds();
-		for (int i = 0; i < subProfileIds.length; i++) {
-			removeProfile(subProfileIds[i]);
+		List<String> subProfileIds = profile.getSubProfileIds();
+		for (int i = 0; i < subProfileIds.size(); i++) {
+			removeProfile(subProfileIds.get(i));
 		}
 		internalLockProfile(profile);
 		// The above call recursively locked the parent(s). So save it away to rewind the locking process.
@@ -343,20 +370,44 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		profileMap.remove(profileId);
 		profileLocks.remove(profileId);
 		deleteProfile(profileId);
-		broadcastChangeEvent(profileId, ProfileEvent.REMOVED);
+		broadcastChangeEvent(profileId, IProfileEvent.REMOVED);
 	}
 
-	private void broadcastChangeEvent(String profileId, byte reason) {
-		((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.class.getName())).publishEvent(new ProfileEvent(profileId, reason));
+	public synchronized void removeProfile(String id, long timestamp) throws ProvisionException {
+		if (SELF.equals(id))
+			id = self;
+
+		if (profiles != null) {
+			IProfile profile = getProfile(id);
+			if (profile != null && profile.getTimestamp() == timestamp)
+				throw new ProvisionException(Messages.SimpleProfileRegistry_CannotRemoveCurrentSnapshot);
+		}
+
+		File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
+		if (!profileDirectory.isDirectory())
+			return;
+
+		File profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_GZ_EXT);
+		if (!profileFile.exists()) {
+			profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_EXT);
+			if (!profileFile.exists())
+				return;
+		}
+		FileUtils.deleteAll(profileFile);
+	}
+
+	private void broadcastChangeEvent(String profileId, int reason) {
+		if (eventBus != null)
+			eventBus.publishEvent(new ProfileEvent(profileId, reason));
 	}
 
 	/**
 	 * Restores the profile registry from disk, and returns the loaded profile map.
 	 * Returns <code>null</code> if unable to read the registry.
 	 */
-	private Map restore() {
+	private Map<String, Profile> restore() {
 		if (store == null || !store.isDirectory())
-			throw new IllegalStateException(Messages.reg_dir_not_available);
+			throw new IllegalStateException(NLS.bind(Messages.reg_dir_not_available, store));
 
 		Parser parser = new Parser(EngineActivator.getContext(), EngineActivator.ID);
 		File[] profileDirectories = store.listFiles(new FileFilter() {
@@ -367,7 +418,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		for (int i = 0; i < profileDirectories.length; i++) {
 			String directoryName = profileDirectories[i].getName();
 			String profileId = unescape(directoryName.substring(0, directoryName.lastIndexOf(PROFILE_EXT)));
-			ProfileLock lock = (ProfileLock) profileLocks.get(profileId);
+			ProfileLock lock = profileLocks.get(profileId);
 			if (lock == null) {
 				lock = new ProfileLock(this, profileDirectories[i]);
 				profileLocks.put(profileId, lock);
@@ -459,6 +510,10 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 		}
 	}
 
+	public void setEventBus(IProvisioningEventBus bus) {
+		this.eventBus = bus;
+	}
+
 	/**
 	 * Returns whether the profile file for the given profile should be written in gzip format.
 	 */
@@ -469,7 +524,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 			return false;
 
 		//check whether the profile contains the p2 engine from 3.5.0 or earlier
-		return profile.available(new InstallableUnitQuery("org.eclipse.equinox.p2.engine", new VersionRange("[0.0.0, 1.0.101)")), new Collector(), null).isEmpty(); //$NON-NLS-1$//$NON-NLS-2$
+		return profile.available(QueryUtil.createIUQuery("org.eclipse.equinox.p2.engine", new VersionRange("[0.0.0, 1.0.101)")), null).isEmpty(); //$NON-NLS-1$//$NON-NLS-2$
 	}
 
 	private void deleteProfile(String profileId) {
@@ -537,7 +592,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	 * 	as written by the Writer class.
 	 */
 	class Parser extends ProfileParser {
-		private final Map profileHandlers = new HashMap();
+		private final Map<String, ProfileHandler> profileHandlers = new HashMap<String, ProfileHandler>();
 
 		public Parser(BundleContext context, String bundleId) {
 			super(context, bundleId);
@@ -580,29 +635,28 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 			return this;
 		}
 
-		public Map getProfileMap() {
-			Map profileMap = new HashMap();
-			for (Iterator it = profileHandlers.keySet().iterator(); it.hasNext();) {
-				String profileId = (String) it.next();
+		public Map<String, Profile> getProfileMap() {
+			Map<String, Profile> profileMap = new HashMap<String, Profile>();
+			for (String profileId : profileHandlers.keySet()) {
 				addProfile(profileId, profileMap);
 			}
 			return profileMap;
 		}
 
-		private void addProfile(String profileId, Map profileMap) {
+		private void addProfile(String profileId, Map<String, Profile> profileMap) {
 			if (profileMap.containsKey(profileId))
 				return;
 
-			ProfileHandler profileHandler = (ProfileHandler) profileHandlers.get(profileId);
+			ProfileHandler profileHandler = profileHandlers.get(profileId);
 			Profile parentProfile = null;
 
 			String parentId = profileHandler.getParentId();
 			if (parentId != null) {
 				addProfile(parentId, profileMap);
-				parentProfile = (Profile) profileMap.get(parentId);
+				parentProfile = profileMap.get(parentId);
 			}
 
-			Profile profile = new Profile(profileId, parentProfile, profileHandler.getProperties());
+			Profile profile = new Profile(agent, profileId, parentProfile, profileHandler.getProperties());
 			if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(profile))
 				profile.setSurrogateProfileHandler(surrogateProfileHandler);
 
@@ -613,13 +667,10 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 				for (int i = 0; i < ius.length; i++) {
 					IInstallableUnit iu = ius[i];
 					profile.addInstallableUnit(iu);
-					Map iuProperties = profileHandler.getIUProperties(iu);
+					Map<String, String> iuProperties = profileHandler.getIUProperties(iu);
 					if (iuProperties != null) {
-						for (Iterator it = iuProperties.entrySet().iterator(); it.hasNext();) {
-							Entry entry = (Entry) it.next();
-							String key = (String) entry.getKey();
-							String value = (String) entry.getValue();
-							profile.setInstallableUnitProperty(iu, key, value);
+						for (Entry<String, String> entry : iuProperties.entrySet()) {
+							profile.setInstallableUnitProperty(iu, entry.getKey(), entry.getValue());
 						}
 					}
 				}
@@ -683,12 +734,12 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 			if (profile.isChanged()) {
 				if (DebugHelper.DEBUG_PROFILE_REGISTRY)
 					DebugHelper.debug(PROFILE_REGISTRY, "Profile is marked as changed."); //$NON-NLS-1$
-				throw new IllegalStateException(NLS.bind(Messages.profile_not_current, profile.getProfileId()));
+				throw new IllegalStateException(NLS.bind(Messages.profile_changed, profile.getProfileId()));
 			}
 			if (!checkTimestamps(profile, internalProfile)) {
 				if (DebugHelper.DEBUG_PROFILE_REGISTRY)
 					DebugHelper.debug(PROFILE_REGISTRY, "Unexpected timestamp difference in profile."); //$NON-NLS-1$
-				throw new IllegalStateException(NLS.bind(Messages.profile_not_current, profile.getProfileId()));
+				throw new IllegalStateException(NLS.bind(Messages.profile_not_current, new String[] {profile.getProfileId(), Long.toString(internalProfile.getTimestamp()), Long.toString(profile.getTimestamp())}));
 			}
 			isCurrent = true;
 		} finally {
@@ -699,26 +750,12 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	}
 
 	private boolean internalLockProfile(IProfile profile) {
-		ProfileLock lock = (ProfileLock) profileLocks.get(profile.getProfileId());
+		ProfileLock lock = profileLocks.get(profile.getProfileId());
 		if (lock == null) {
 			lock = new ProfileLock(this, new File(store, escape(profile.getProfileId()) + PROFILE_EXT));
 			profileLocks.put(profile.getProfileId(), lock);
 		}
-		if (!lock.lock())
-			return false;
-
-		if (profile.getParentProfile() == null)
-			return true;
-
-		boolean locked = false;
-		try {
-			locked = internalLockProfile(profile.getParentProfile());
-		} finally {
-			// this check is done here to ensure we unlock even if a runtime exception is thrown
-			if (!locked)
-				lock.unlock();
-		}
-		return locked;
+		return lock.lock();
 	}
 
 	private boolean checkTimestamps(IProfile profile, IProfile internalProfile) {
@@ -739,9 +776,6 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 			return false;
 		}
 
-		if (profile.getParentProfile() != null)
-			return checkTimestamps(profile.getParentProfile(), internalProfile.getParentProfile());
-
 		return true;
 	}
 
@@ -783,10 +817,7 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 	}
 
 	private void internalUnlockProfile(IProfile profile) {
-		if (profile.getParentProfile() != null)
-			internalUnlockProfile(profile.getParentProfile());
-
-		ProfileLock lock = (ProfileLock) profileLocks.get(profile.getProfileId());
+		ProfileLock lock = profileLocks.get(profile.getProfileId());
 		lock.unlock();
 	}
 
@@ -806,4 +837,23 @@ public class SimpleProfileRegistry implements IProfileRegistry {
 			throw new IllegalStateException("Could not create profile data area " + profileDataArea.getAbsolutePath() + "for: " + id); //$NON-NLS-1$ //$NON-NLS-2$
 		return profileDataArea;
 	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
+	 */
+	public void start() {
+		//nothing to do
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
+	 */
+	public void stop() {
+		try {
+			//ensure there are no more profile preference save jobs running
+			Job.getJobManager().join(ProfilePreferences.PROFILE_SAVE_JOB_FAMILY, null);
+		} catch (InterruptedException e) {
+			//ignore
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java
new file mode 100644
index 0000000..b82a208
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.internal.p2.engine.phases.Sizing;
+import org.eclipse.equinox.p2.engine.ISizingPhaseSet;
+
+public class SizingPhaseSet extends PhaseSet implements ISizingPhaseSet {
+
+	private static Sizing sizing;
+
+	public SizingPhaseSet() {
+		super(new Phase[] {sizing = new Sizing(100)});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.ISizingPhaseSet#getDiskSize()
+	 */
+	public long getDiskSize() {
+		return sizing.getDiskSize();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.engine.ISizingPhaseSet#getDownloadSize()
+	 */
+	public long getDownloadSize() {
+		return sizing.getDownloadSize();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
index bacfb6f..37ab89e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,91 +11,100 @@
 package org.eclipse.equinox.internal.p2.engine;
 
 import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.lang.ref.SoftReference;
+import java.net.*;
+import java.util.ArrayList;
 import java.util.Iterator;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ISurrogateProfileHandler;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.query.*;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.eclipse.osgi.util.NLS;
 
 public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 
 	private static final String NATIVE_TOUCHPOINT_TYPE = "org.eclipse.equinox.p2.native"; //$NON-NLS-1$
-	private static final String PROP_TYPE_ROOT = "org.eclipse.equinox.p2.type.root"; //$NON-NLS-1$
 	private static final String P2_ENGINE_DIR = "p2/" + EngineActivator.ID + "/"; //$NON-NLS-1$//$NON-NLS-2$
 	private static final String OSGI_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
 	private static final String ECLIPSE_INI_IGNORED = "eclipse.ini.ignored"; //$NON-NLS-1$
-	private static final String IU_LOCKED = Integer.toString(IInstallableUnit.LOCK_UNINSTALL | IInstallableUnit.LOCK_UPDATE);
+	private static final String IU_LOCKED = Integer.toString(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE);
 	private static final String PROP_SURROGATE = "org.eclipse.equinox.p2.surrogate"; //$NON-NLS-1$
 	private static final String PROP_SHARED_TIMESTAMP = "org.eclipse.equinox.p2.shared.timestamp"; //$NON-NLS-1$
 	private static final String PROP_BASE = "org.eclipse.equinox.p2.base"; //$NON-NLS-1$
 	private static final String PROP_RESOLVE = "org.eclipse.equinox.p2.resolve"; //$NON-NLS-1$
 	private static final String OPTIONAL = "OPTIONAL"; //$NON-NLS-1$
+	private static final String STRICT = "STRICT"; //$NON-NLS-1$
 	private static final String PROP_INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$
 
+	private final IProvisioningAgent agent;
+
 	private SimpleProfileRegistry profileRegistry;
 
+	private SoftReference<IProfile> cachedProfile;
+
 	private static void addSharedProfileBaseIUs(final IProfile sharedProfile, final Profile userProfile) {
-		Query rootIUQuery = new MatchQuery() {
-			public boolean isMatch(Object candidate) {
-				if (candidate instanceof IInstallableUnit) {
-					IInstallableUnit iu = (IInstallableUnit) candidate;
-					if (Boolean.valueOf(sharedProfile.getInstallableUnitProperty(iu, PROP_TYPE_ROOT)).booleanValue())
-						return true;
-					if (iu.getTouchpointType().getId().equals(NATIVE_TOUCHPOINT_TYPE))
-						return true;
-				}
-				return false;
-			}
-		};
-		Collector rootIUs = sharedProfile.query(rootIUQuery, new Collector(), null);
-		for (Iterator iterator = rootIUs.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
+		IQuery<IInstallableUnit> rootIUQuery = QueryUtil.createMatchQuery( //
+				"profileProperties[$0] == 'true' || (touchpointType != null && touchpointType.id == $1)",//$NON-NLS-1$
+				IProfile.PROP_PROFILE_ROOT_IU, NATIVE_TOUCHPOINT_TYPE);
+		IQueryResult<IInstallableUnit> rootIUs = sharedProfile.query(rootIUQuery, null);
+		for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
 			userProfile.addInstallableUnit(iu);
 			userProfile.addInstallableUnitProperties(iu, sharedProfile.getInstallableUnitProperties(iu));
-			userProfile.setInstallableUnitProperty(iu, IInstallableUnit.PROP_PROFILE_LOCKED_IU, IU_LOCKED);
+			userProfile.setInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, IU_LOCKED);
 			userProfile.setInstallableUnitProperty(iu, PROP_BASE, Boolean.TRUE.toString());
 		}
+
+		IInstallableUnit sharedProfileIU = createSharedProfileIU(sharedProfile);
+		userProfile.addInstallableUnit(sharedProfileIU);
+		userProfile.setInstallableUnitProperty(sharedProfileIU, PROP_INCLUSION_RULES, STRICT);
+		userProfile.setInstallableUnitProperty(sharedProfileIU, PROP_BASE, Boolean.TRUE.toString());
+	}
+
+	private static IInstallableUnit createSharedProfileIU(final IProfile sharedProfile) {
+		InstallableUnitDescription iuDescription = new InstallableUnitDescription();
+		iuDescription.setId("SharedProfile_" + sharedProfile.getProfileId()); //$NON-NLS-1$
+		iuDescription.setVersion(Version.createOSGi(1, 0, 0, Long.toString(sharedProfile.getTimestamp())));
+
+		ArrayList<IProvidedCapability> iuCapabilities = new ArrayList<IProvidedCapability>();
+		IProvidedCapability selfCapability = MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, iuDescription.getId(), iuDescription.getVersion());
+		iuCapabilities.add(selfCapability);
+		iuDescription.addProvidedCapabilities(iuCapabilities);
+
+		ArrayList<IRequirement> iuRequirements = new ArrayList<IRequirement>();
+		IQueryResult<IInstallableUnit> allIUs = sharedProfile.query(QueryUtil.createIUAnyQuery(), null);
+		for (Iterator<IInstallableUnit> iterator = allIUs.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			IRequirement iuRequirement = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
+			iuRequirements.add(iuRequirement);
+		}
+		iuDescription.addRequirements(iuRequirements);
+		iuDescription.setProperty(IInstallableUnit.PROP_NAME, NLS.bind(Messages.Shared_Profile, null));
+
+		IInstallableUnit sharedProfileIU = MetadataFactory.createInstallableUnit(iuDescription);
+		return sharedProfileIU;
 	}
 
 	private static void removeUserProfileBaseIUs(final Profile userProfile) {
-		Query rootIUQuery = new MatchQuery() {
-			public boolean isMatch(Object candidate) {
-				if (candidate instanceof IInstallableUnit) {
-					IInstallableUnit iu = (IInstallableUnit) candidate;
-					if (Boolean.valueOf(userProfile.getInstallableUnitProperty(iu, PROP_BASE)).booleanValue())
-						return true;
-				}
-				return false;
-			}
-		};
-		Collector rootIUs = userProfile.query(rootIUQuery, new Collector(), null);
-		for (Iterator iterator = rootIUs.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
+		IQuery<IInstallableUnit> baseIUQuery = new IUProfilePropertyQuery(PROP_BASE, Boolean.TRUE.toString());
+		IQueryResult<IInstallableUnit> rootIUs = userProfile.query(baseIUQuery, null);
+		for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
 			userProfile.removeInstallableUnit(iu);
 		}
 	}
 
 	private static void markRootsOptional(final Profile userProfile) {
-		Query rootIUQuery = new MatchQuery() {
-			public boolean isMatch(Object candidate) {
-				if (candidate instanceof IInstallableUnit) {
-					IInstallableUnit iu = (IInstallableUnit) candidate;
-					if (Boolean.valueOf(userProfile.getInstallableUnitProperty(iu, PROP_TYPE_ROOT)).booleanValue())
-						return true;
-				}
-				return false;
-			}
-		};
-		Collector rootIUs = userProfile.query(rootIUQuery, new Collector(), null);
-		for (Iterator iterator = rootIUs.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
+		IQueryResult<IInstallableUnit> rootIUs = userProfile.query(new UserVisibleRootQuery(), null);
+		for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
 			userProfile.setInstallableUnitProperty(iu, PROP_INCLUSION_RULES, OPTIONAL);
 		}
 	}
@@ -131,15 +140,21 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 		userProfile.setProperty(IProfile.PROP_LAUNCHER_CONFIGURATION, launcherConfigFile.getAbsolutePath());
 	}
 
+	public SurrogateProfileHandler(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
 	private synchronized SimpleProfileRegistry getProfileRegistry() {
 		if (profileRegistry == null) {
 			String installArea = EngineActivator.getContext().getProperty(OSGI_INSTALL_AREA);
 			try {
 				URL registryURL = new URL(installArea + P2_ENGINE_DIR + SimpleProfileRegistry.DEFAULT_STORAGE_DIR);
-				File sharedRegistryDirectory = new File(registryURL.getPath());
-				profileRegistry = new SimpleProfileRegistry(sharedRegistryDirectory, null, false);
+				File sharedRegistryDirectory = URIUtil.toFile(URIUtil.toURI(registryURL));
+				profileRegistry = new SimpleProfileRegistry(agent, sharedRegistryDirectory, null, false);
 			} catch (MalformedURLException e) {
 				//this is not possible because we know the above URL is valid
+			} catch (URISyntaxException e) {
+				//this is not possible because we know the above URL is valid
 			}
 		}
 		return profileRegistry;
@@ -151,7 +166,20 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 		long[] timestamps = registry.listProfileTimestamps(id);
 		if (timestamps.length == 0)
 			return null;
-		return registry.getProfile(id, timestamps[timestamps.length - 1]);
+
+		long currentTimestamp = timestamps[timestamps.length - 1];
+
+		//see if we have a cached profile
+		if (cachedProfile != null) {
+			IProfile profile = cachedProfile.get();
+			if (profile != null && profile.getProfileId().equals(id) && profile.getTimestamp() == currentTimestamp)
+				return profile;
+		}
+
+		final IProfile profile = registry.getProfile(id, currentTimestamp);
+		if (profile != null)
+			cachedProfile = new SoftReference<IProfile>(profile);
+		return profile;
 	}
 
 	/* (non-Javadoc)
@@ -162,7 +190,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 		if (sharedProfile == null)
 			return null;
 
-		Profile userProfile = new Profile(id, null, sharedProfile.getProperties());
+		Profile userProfile = new Profile(agent, id, null, sharedProfile.getProperties());
 		userProfile.setProperty(PROP_SURROGATE, Boolean.TRUE.toString());
 		userProfile.setSurrogateProfileHandler(this);
 		updateProperties(sharedProfile, userProfile);
@@ -180,12 +208,16 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.p2.engine.ISurrogateProfileHandler#queryProfile(org.eclipse.equinox.internal.provisional.p2.engine.IProfile, org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.equinox.internal.provisional.p2.query.Collector, org.eclipse.core.runtime.IProgressMonitor)
 	 */
-	public Collector queryProfile(IProfile profile, Query query, Collector collector, IProgressMonitor monitor) {
+	public IQueryResult<IInstallableUnit> queryProfile(IProfile profile, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
 		IProfile sharedProfile = getSharedProfile(profile.getProfileId());
-		if (sharedProfile != null)
-			sharedProfile.query(query, collector, monitor);
+		if (sharedProfile == null)
+			return profile.query(query, monitor);
 
-		return profile.query(query, collector, monitor);
+		// TODO: Should consider using a sequenced iterator here instead of collecting
+		Collector<IInstallableUnit> result = new Collector<IInstallableUnit>();
+		result.addAll(sharedProfile.query(query, monitor));
+		result.addAll(profile.query(query, monitor));
+		return result;
 	}
 
 	public boolean updateProfile(IProfile userProfile) {
@@ -202,7 +234,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
 		Profile writableUserProfile = (Profile) userProfile;
 		updateProperties(sharedProfile, writableUserProfile);
 		removeUserProfileBaseIUs(writableUserProfile);
-		if (!userProfile.query(InstallableUnitQuery.ANY, new Collector(), null).isEmpty()) {
+		if (!userProfile.query(QueryUtil.createIUAnyQuery(), null).isEmpty()) {
 			writableUserProfile.setProperty(PROP_RESOLVE, Boolean.TRUE.toString());
 			markRootsOptional(writableUserProfile);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java
index 0f397a2..fb5e4df 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java
@@ -14,10 +14,8 @@ import java.util.HashMap;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.osgi.util.NLS;
 
 //TODO This needs to support multiple version of each touchpoint and have a lookup that supports version semantics
@@ -64,7 +62,7 @@ public class TouchpointManager implements IRegistryChangeListener {
 
 		public Version getVersion() {
 			try {
-				return new Version(element.getAttribute(ATTRIBUTE_VERSION));
+				return Version.create(element.getAttribute(ATTRIBUTE_VERSION));
 			} catch (InvalidRegistryObjectException e) {
 				return null;
 			}
@@ -91,7 +89,7 @@ public class TouchpointManager implements IRegistryChangeListener {
 	// TODO: Do we really want to store the touchpoints? The danger is 
 	//	     that if two installations are performed simultaneously, then...
 	// TODO: Figure out locking, concurrency requirements for touchpoints.
-	private Map touchpointEntries;
+	private Map<String, TouchpointEntry> touchpointEntries;
 
 	public TouchpointManager() {
 		RegistryFactory.getRegistry().addRegistryChangeListener(this, EngineActivator.ID);
@@ -115,7 +113,7 @@ public class TouchpointManager implements IRegistryChangeListener {
 		if (typeId == null || typeId.length() == 0)
 			throw new IllegalArgumentException(Messages.TouchpointManager_Null_Touchpoint_Type_Argument);
 
-		TouchpointEntry entry = (TouchpointEntry) getTouchpointEntries().get(typeId);
+		TouchpointEntry entry = getTouchpointEntries().get(typeId);
 		if (entry == null)
 			return null;
 		if (versionRange != null) {
@@ -130,13 +128,13 @@ public class TouchpointManager implements IRegistryChangeListener {
 	/*
 	 * Construct a map of the extensions that implement the touchpoints extension point.
 	 */
-	private synchronized Map getTouchpointEntries() {
+	private synchronized Map<String, TouchpointEntry> getTouchpointEntries() {
 		if (touchpointEntries != null)
 			return touchpointEntries;
 
 		IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(EngineActivator.ID, PT_TOUCHPOINTS);
 		IExtension[] extensions = point.getExtensions();
-		touchpointEntries = new HashMap(extensions.length);
+		touchpointEntries = new HashMap<String, TouchpointEntry>(extensions.length);
 		for (int i = 0; i < extensions.length; i++) {
 			try {
 				IConfigurationElement[] elements = extensions[i].getConfigurationElements();
@@ -154,7 +152,7 @@ public class TouchpointManager implements IRegistryChangeListener {
 					if (touchpointEntries.get(id) == null) {
 						touchpointEntries.put(id, new TouchpointEntry(elements[j]));
 					} else {
-						reportError(NLS.bind(Messages.TouchpointManager_Conflicting_Touchpoint_Types, ATTRIBUTE_TYPE, id));
+						reportError(NLS.bind(Messages.TouchpointManager_Conflicting_Touchpoint_Types, id));
 					}
 				}
 			} catch (InvalidRegistryObjectException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java
new file mode 100644
index 0000000..63ba080
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine;
+
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+
+import java.util.EventObject;
+
+/**
+ * @since 2.0
+ */
+public abstract class TransactionEvent extends EventObject {
+	private static final long serialVersionUID = 6278706971855493984L;
+	protected IProfile profile;
+	protected PhaseSet phaseSet;
+	protected Operand[] operands;
+
+	public TransactionEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
+		super(engine);
+		this.profile = profile;
+		this.phaseSet = phaseSet;
+		this.operands = operands;
+	}
+
+	public IProfile getProfile() {
+		return profile;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
index a7514e8..13784b3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
@@ -40,12 +40,67 @@ SimpleProfileRegistry_Profile_in_use=The profile is currently in use.
 SimpleProfileRegistry_Profile_not_locked=The profile is not locked.
 SimpleProfileRegistry_Profile_not_locked_due_to_exception=Profile not locked due to exception: {0}
 SimpleProfileRegistry_Bad_profile_location=Bad profile location: {0}
+SimpleProfileRegistry_CannotRemoveCurrentSnapshot=Cannot remove the current profile timestamp
 profile_does_not_exist=Profile to be updated does not exist: {0}.
-profile_not_current=Profile {0} is not current.
+profile_not_current=Profile {0} is not current. Expected timestamp {1} but was {2}.
+profile_changed=Profile {0} is marked as changed.
 profile_not_registered=Profile {0} not registered.
-reg_dir_not_available=Registry Directory not available.
+reg_dir_not_available=Registry Directory not available: {0}.
 thread_not_owner=Thread not lock owner.
 profile_lock_not_reentrant=Lock failed. Profile does not permit reentrant locking.
+Shared_Profile=Shared profile
 shared_profile_not_found=Shared profile {0} not found.
 
 ProfilePreferences_saving=Saving profile preferences
+phase_error=An error occurred during the {0} phase.
+action_undo_error=An error occurred while rolling back the engine operation while undoing the {0} action.
+forced_action_execute_error=An error occurred while performing the engine operation while executing the {0} action in forced mode. The operation will continue.
+phaseid_not_positive=Phase weight must be positive.
+phaseid_not_set=Phase id must be set.
+action_not_found=No action found for: {0}.
+actions_not_found=No actions found for: {0}.
+not_current_phase=Current phase does not match argument.
+null_operands=Operands must not be null.
+null_phase=Phase must not be null.
+null_phases=Phases must not be null
+null_phaseset=PhaseSet must not be null.
+null_profile=Profile must not be null.
+touchpoint_prepare_error=An error occurred while preparing the engine operation for the {0} touchpoint.
+touchpoint_commit_error=An error occurred while committing the engine operation for the {0} touchpoint.
+touchpoint_rollback_error=An error occurred while rolling back the engine operation for the {0} touchpoint.
+phase_undo_error=An error occurred while undoing the {0} phase.
+phase_undo_operand_error=An error occurred while undoing the {0} phase for operand {1}.
+phase_not_started=There is no phase to end.
+phase_started=A phase is already started.
+
+session_prepare_error=An error occurred while preparing the engine session for profile: {0}.
+session_commit_error=An error occurred while committing the engine session for profile: {0}.
+null_operand=Operand must not be null.
+operand_started=An operand is already started.
+operand_not_started=There is no operand to end.
+not_current_operand=Current operand does not match argument.
+null_action=Action must not be null
+session_context=session context was:(profile={0}, phase={1}, operand={2}, action={3}).
+preparing=Preparing to commit the provisioning operation.
+committing=Committing the provisioning operation.
+rollingback_error=An error was detected while performing the engine operation and the changes are being rolled back. See the log for details.
+rollingback_cancel=The engine operation was cancelled and the changes are being rolled back.
+
+Engine_Operation_Canceled_By_User=Operation canceled by the user.
+InstallableUnitEvent_type_not_install_or_uninstall=type must be either UNINSTALL(0) or INSTALL(1)
+CertificateChecker_CertificateError=An invalid certificate was found.
+CertificateChecker_CertificateRejected=One or more certificates rejected. Cannot proceed with installation.
+CertificateChecker_KeystoreConnectionError=Cannot connect to keystore.
+CertificateChecker_SignedContentError=Error with signed content.
+CertificateChecker_SignedContentIOError=Error reading signed content.
+CertificateChecker_UnsignedNotAllowed=Installing unsigned artifacts is not permitted: {0}
+
+Phase_Collect_Error=An error occurred while collecting items to be installed
+Phase_Configure_Error=An error occurred while configuring the installed items
+Phase_Configure_Task=Configuring {0}
+Phase_Install_Error=An error occurred while installing the items
+Phase_Install_Task=Installing {0}
+Phase_Sizing_Error=Error computing the size.  Some of the items to be installed could not be found.
+Phase_Sizing_Warning=The size may not be accurate.  Some of the items did not report a size.
+Phase_Unconfigure_Error=An error occurred while unconfiguring the items to uninstall
+Phase_Uninstall_Error=An error occurred while uninstalling
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
new file mode 100644
index 0000000..6607b5c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.io.File;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.cert.Certificate;
+import java.util.ArrayList;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.engine.EngineActivator;
+import org.eclipse.equinox.internal.p2.engine.Messages;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.core.UIServices.TrustInfo;
+import org.eclipse.osgi.service.security.TrustEngine;
+import org.eclipse.osgi.signedcontent.*;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class CertificateChecker {
+	private ArrayList<File> artifacts;
+	private final IProvisioningAgent agent;
+
+	public CertificateChecker() {
+		this(null);
+	}
+
+	public CertificateChecker(IProvisioningAgent agent) {
+		this.agent = agent;
+		artifacts = new ArrayList<File>();
+	}
+
+	public IStatus start() {
+		final BundleContext context = EngineActivator.getContext();
+		ServiceReference contentFactoryRef = context.getServiceReference(SignedContentFactory.class.getName());
+		SignedContentFactory verifierFactory = (SignedContentFactory) context.getService(contentFactoryRef);
+		try {
+			return checkCertificates(verifierFactory);
+		} finally {
+			context.ungetService(contentFactoryRef);
+		}
+	}
+
+	private IStatus checkCertificates(SignedContentFactory verifierFactory) {
+		UIServices serviceUI = (UIServices) agent.getService(UIServices.SERVICE_NAME);
+		SignedContent content = null;
+		SignerInfo[] signerInfo = null;
+		ArrayList<Certificate> untrusted = new ArrayList<Certificate>();
+		ArrayList<File> unsigned = new ArrayList<File>();
+		ArrayList<Certificate[]> untrustedChain = new ArrayList<Certificate[]>();
+		IStatus status = Status.OK_STATUS;
+		if (artifacts.size() == 0 || serviceUI == null)
+			return status;
+		for (File artifact : artifacts) {
+			try {
+				content = verifierFactory.getSignedContent(artifact);
+				if (!content.isSigned()) {
+					unsigned.add(artifact);
+					continue;
+				}
+				signerInfo = content.getSignerInfos();
+			} catch (GeneralSecurityException e) {
+				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentError, e);
+			} catch (IOException e) {
+				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentIOError, e);
+			}
+			for (int i = 0; i < signerInfo.length; i++) {
+				if (!signerInfo[i].isTrusted()) {
+					Certificate[] certificateChain = signerInfo[i].getCertificateChain();
+					if (!untrusted.contains(certificateChain[0])) {
+						untrusted.add(certificateChain[0]);
+						untrustedChain.add(certificateChain);
+					}
+				}
+			}
+		}
+		String policy = getUnsignedContentPolicy();
+		//if there is unsigned content and we should never allow it, then fail without further checking certificates
+		if (!unsigned.isEmpty() && EngineActivator.UNSIGNED_FAIL.equals(policy))
+			return new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.CertificateChecker_UnsignedNotAllowed, unsigned));
+
+		String[] details;
+		// If we always allow unsigned content, or we don't have any, we don't prompt the user about it
+		if (EngineActivator.UNSIGNED_ALLOW.equals(policy) || unsigned.isEmpty())
+			details = null;
+		else {
+			details = new String[unsigned.size()];
+			for (int i = 0; i < details.length; i++) {
+				details[i] = unsigned.get(i).toString();
+			}
+		}
+		Certificate[][] unTrustedCertificateChains;
+		if (untrusted.isEmpty()) {
+			unTrustedCertificateChains = null;
+		} else {
+			unTrustedCertificateChains = new Certificate[untrustedChain.size()][];
+			for (int i = 0; i < untrustedChain.size(); i++) {
+				unTrustedCertificateChains[i] = untrustedChain.get(i);
+			}
+		}
+
+		// If there was no unsigned content, and nothing untrusted, no need to prompt.
+		if (details == null && unTrustedCertificateChains == null)
+			return status;
+
+		TrustInfo trustInfo = serviceUI.getTrustInfo(unTrustedCertificateChains, details);
+
+		// If user doesn't trust unsigned content, cancel the operation
+		if (!trustInfo.trustUnsignedContent())
+			return Status.CANCEL_STATUS;
+
+		Certificate[] trustedCertificates = trustInfo.getTrustedCertificates();
+		// If we had untrusted chains and nothing was trusted, cancel the operation
+		if (unTrustedCertificateChains != null && trustedCertificates == null) {
+			return new Status(IStatus.CANCEL, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
+		}
+		// Anything that was trusted should be removed from the untrusted list
+		if (trustedCertificates != null) {
+			for (int i = 0; i < trustedCertificates.length; i++) {
+				untrusted.remove(trustedCertificates[i]);
+			}
+		}
+
+		// If there is still untrusted content, cancel the operation
+		if (untrusted.size() > 0)
+			return new Status(IStatus.CANCEL, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
+		// If we should persist the trusted certificates, add them to the trust engine
+		if (trustInfo.persistTrust())
+			return persistTrustedCertificates(trustedCertificates);
+
+		return status;
+	}
+
+	private IStatus persistTrustedCertificates(Certificate[] trustedCertificates) {
+		if (trustedCertificates == null)
+			// I'm pretty sure this would be a bug; trustedCertificates should never be null here.
+			return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
+		ServiceTracker trustEngineTracker = new ServiceTracker(EngineActivator.getContext(), TrustEngine.class.getName(), null);
+		trustEngineTracker.open();
+		Object[] trustEngines = trustEngineTracker.getServices();
+		try {
+			if (trustEngines == null)
+				return null;
+			for (Certificate trustedCertificate : trustedCertificates) {
+				for (Object engine : trustEngines) {
+					TrustEngine trustEngine = (TrustEngine) engine;
+					if (trustEngine.isReadOnly())
+						continue;
+					try {
+						trustEngine.addTrustAnchor(trustedCertificate, trustedCertificate.toString());
+						// this should mean we added an anchor successfully; continue to next cert
+						break;
+					} catch (IOException e) {
+						//just return an INFO so the user can proceed with the install
+						return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_KeystoreConnectionError, e);
+					} catch (GeneralSecurityException e) {
+						return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_CertificateError, e);
+					}
+				}
+			}
+		} finally {
+			trustEngineTracker.close();
+		}
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * Return the policy on unsigned content.
+	 */
+	private String getUnsignedContentPolicy() {
+		String policy = EngineActivator.getContext().getProperty(EngineActivator.PROP_UNSIGNED_POLICY);
+		if (policy == null)
+			policy = EngineActivator.UNSIGNED_PROMPT;
+		return policy;
+
+	}
+
+	public void add(File toAdd) {
+		artifacts.add(toAdd);
+	}
+
+	public void add(Object[] toAdd) {
+		for (int i = 0; i < toAdd.length; i++) {
+			if (toAdd[i] instanceof File)
+				add((File) toAdd[i]);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
new file mode 100644
index 0000000..513c0f1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitPhase;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+
+/**
+ * An install phase that checks if the certificates used to sign the artifacts
+ * being installed are from a trusted source.
+ */
+public class CheckTrust extends InstallableUnitPhase {
+
+	public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
+
+	public CheckTrust(int weight) {
+		super(PhaseSetFactory.PHASE_CHECK_TRUST, weight);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.second() != null);
+	}
+
+	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		@SuppressWarnings("unchecked")
+		Collection<File> artifactRequests = (Collection<File>) parameters.get(PARM_ARTIFACT_FILES);
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+
+		// Instantiate a check trust manager
+		CertificateChecker certificateChecker = new CertificateChecker(agent);
+		certificateChecker.add(artifactRequests.toArray());
+		IStatus status = certificateChecker.start();
+
+		return status;
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
+		IInstallableUnit unit = operand.second();
+		List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
+		if (parsedActions != null)
+			return parsedActions;
+
+		ITouchpointType type = unit.getTouchpointType();
+		if (type == null || type == ITouchpointType.NONE)
+			return null;
+
+		String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
+		ProvisioningAction action = getActionManager().getAction(actionId, null);
+		if (action == null) {
+			return null;
+		}
+		return Collections.singletonList(action);
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IInstallableUnit iu = operand.second();
+		parameters.put(PARM_IU, iu);
+
+		return super.initializeOperand(profile, operand, parameters, monitor);
+	}
+
+	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		parameters.put(PARM_ARTIFACT_FILES, new ArrayList<File>());
+		return super.initializePhase(monitor, profile, parameters);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
new file mode 100644
index 0000000..af60604
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
+
+/**
+ * The goal of the collect phase is to ask the touchpoints if the artifacts associated with an IU need to be downloaded.
+ */
+public class Collect extends InstallableUnitPhase {
+	public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
+	public static final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
+
+	public Collect(int weight) {
+		super(PhaseSetFactory.PHASE_COLLECT, weight);
+		//re-balance work since postPerform will do almost all the time-consuming work
+		prePerformWork = 0;
+		mainPerformWork = 100;
+		postPerformWork = 1000;
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.second() != null && !op.second().equals(op.first()));
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
+		IInstallableUnit unit = operand.second();
+		List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
+		if (parsedActions != null)
+			return parsedActions;
+
+		ITouchpointType type = unit.getTouchpointType();
+		if (type == null || type == ITouchpointType.NONE)
+			return null;
+
+		String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
+		ProvisioningAction action = getActionManager().getAction(actionId, null);
+		if (action == null) {
+			return null;
+		}
+		return Collections.singletonList(action);
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Collect_Error;
+	}
+
+	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		@SuppressWarnings("unchecked")
+		List<IArtifactRequest[]> artifactRequests = (List<IArtifactRequest[]>) parameters.get(PARM_ARTIFACT_REQUESTS);
+		ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+
+		DownloadManager dm = new DownloadManager(context, agent);
+		for (IArtifactRequest[] requests : artifactRequests) {
+			dm.add(requests);
+		}
+		return dm.start(monitor);
+	}
+
+	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		parameters.put(PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
+		return null;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
+		// defer setting the IU until after the super method to avoid triggering touchpoint initialization
+		IInstallableUnit iu = operand.second();
+		parameters.put(PARM_IU, iu);
+		return status;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
new file mode 100644
index 0000000..165f3af
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
+
+public class Configure extends InstallableUnitPhase {
+
+	public Configure(int weight) {
+		super(PhaseSetFactory.PHASE_CONFIGURE, weight);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.second() != null);
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
+		IInstallableUnit unit = currentOperand.second();
+		if (QueryUtil.isFragment(unit))
+			return null;
+		return getActions(unit, phaseId);
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Configure_Error;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IInstallableUnit iu = operand.second();
+		monitor.subTask(NLS.bind(Messages.Phase_Configure_Task, iu.getId()));
+		parameters.put(PARM_IU, iu);
+
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts != null && artifacts.size() > 0)
+			parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
+
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
new file mode 100644
index 0000000..9fe045e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.osgi.util.NLS;
+
+public class Install extends InstallableUnitPhase {
+
+	final static class BeforeInstallEventAction extends ProvisioningAction {
+
+		public IStatus execute(Map<String, Object> parameters) {
+			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			profile.removeInstallableUnit(iu);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+			return null;
+		}
+	}
+
+	final static class AfterInstallEventAction extends ProvisioningAction {
+
+		public IStatus execute(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			profile.addInstallableUnit(iu);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+			return null;
+		}
+	}
+
+	public Install(int weight) {
+		super(PhaseSetFactory.PHASE_INSTALL, weight);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.second() != null && !op.second().equals(op.first()));
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
+		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Installing_IU, unit.getId()));
+
+		ProvisioningAction beforeAction = new BeforeInstallEventAction();
+		ProvisioningAction afterAction = new AfterInstallEventAction();
+
+		IInstallableUnit unit = currentOperand.second();
+		Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
+		if (touchpoint != null) {
+			beforeAction.setTouchpoint(touchpoint);
+			afterAction.setTouchpoint(touchpoint);
+		}
+
+		ArrayList<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
+		actions.add(beforeAction);
+
+		if (QueryUtil.isFragment(unit)) {
+			actions.add(afterAction);
+			return actions;
+		}
+
+		List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
+		if (parsedActions != null)
+			actions.addAll(parsedActions);
+		actions.add(afterAction);
+		return actions;
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Install_Error;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IInstallableUnit iu = operand.second();
+		monitor.subTask(NLS.bind(Messages.Phase_Install_Task, iu.getId()));
+		parameters.put(PARM_IU, iu);
+
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts != null && artifacts.size() > 0)
+			parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
+
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
new file mode 100644
index 0000000..ba69b2c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.util.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+public class Property extends Phase {
+
+	public class ProfilePropertyAction extends ProvisioningAction {
+
+		public IStatus execute(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
+
+			if (propertyOperand.second() == null)
+				removeProfileProperty(profile, propertyOperand);
+			else
+				setProfileProperty(profile, propertyOperand, false);
+
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
+
+			if (propertyOperand.first() == null)
+				removeProfileProperty(profile, propertyOperand);
+			else
+				setProfileProperty(profile, propertyOperand, true);
+
+			return null;
+		}
+
+		private void setProfileProperty(Profile profile, PropertyOperand propertyOperand, boolean undo) {
+
+			String value = (String) (undo ? propertyOperand.first() : propertyOperand.second());
+
+			if (propertyOperand instanceof InstallableUnitPropertyOperand) {
+				InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
+				profile.setInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey(), value);
+			} else {
+				profile.setProperty(propertyOperand.getKey(), value);
+			}
+		}
+
+		private void removeProfileProperty(Profile profile, PropertyOperand propertyOperand) {
+			if (propertyOperand instanceof InstallableUnitPropertyOperand) {
+				InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
+				profile.removeInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey());
+			} else {
+				profile.removeProperty(propertyOperand.getKey());
+			}
+		}
+	}
+
+	public class UpdateInstallableUnitProfilePropertiesAction extends ProvisioningAction {
+
+		// we do not need to use a memento here since the profile is not persisted unless the operation is successful
+		Map<String, String> originalSourceProperties;
+		Map<String, String> originalTargetProperties;
+
+		public IStatus execute(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+
+			IInstallableUnit source = iuOperand.first();
+			originalSourceProperties = profile.getInstallableUnitProperties(source);
+
+			IInstallableUnit target = iuOperand.second();
+			originalTargetProperties = profile.getInstallableUnitProperties(target);
+
+			profile.addInstallableUnitProperties(target, originalSourceProperties);
+			profile.clearInstallableUnitProperties(source);
+
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+
+			IInstallableUnit source = iuOperand.first();
+			profile.clearInstallableUnitProperties(source);
+			profile.addInstallableUnitProperties(source, originalSourceProperties);
+
+			IInstallableUnit target = iuOperand.second();
+			profile.clearInstallableUnitProperties(target);
+			profile.addInstallableUnitProperties(target, originalTargetProperties);
+
+			return null;
+		}
+	}
+
+	public class RemoveInstallableUnitProfilePropertiesAction extends ProvisioningAction {
+
+		// we do not need to use a memento here since the profile is not persisted unless the operation is successful
+		Map<String, String> originalSourceProperties;
+		Map<String, String> originalTargetProperties;
+
+		public IStatus execute(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+
+			IInstallableUnit source = iuOperand.first();
+			originalSourceProperties = profile.getInstallableUnitProperties(source);
+			profile.clearInstallableUnitProperties(source);
+
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
+
+			IInstallableUnit source = iuOperand.first();
+			profile.clearInstallableUnitProperties(source);
+			profile.addInstallableUnitProperties(source, originalSourceProperties);
+
+			return null;
+		}
+	}
+
+	public Property(int weight) {
+		super(PhaseSetFactory.PHASE_PROPERTY, weight);
+	}
+
+	protected List<ProvisioningAction> getActions(Operand operand) {
+		if (operand instanceof PropertyOperand)
+			return Collections.<ProvisioningAction> singletonList(new ProfilePropertyAction());
+
+		if (operand instanceof InstallableUnitOperand) {
+			InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
+			if (iuOperand.first() != null) {
+				if (iuOperand.second() != null) {
+					return Collections.<ProvisioningAction> singletonList(new UpdateInstallableUnitProfilePropertiesAction());
+				}
+				return Collections.<ProvisioningAction> singletonList(new RemoveInstallableUnitProfilePropertiesAction());
+			}
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
new file mode 100644
index 0000000..792f04c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+
+public class Sizing extends InstallableUnitPhase {
+	private static final String PHASE_ID = "sizing"; //$NON-NLS-1$
+	private static final String COLLECT_PHASE_ID = "collect"; //$NON-NLS-1$
+
+	private long sizeOnDisk;
+	private long dlSize;
+
+	public Sizing(int weight) {
+		super(PHASE_ID, weight);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.second() != null && !op.second().equals(op.first()));
+	}
+
+	public long getDiskSize() {
+		return sizeOnDisk;
+	}
+
+	public long getDownloadSize() {
+		return dlSize;
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
+		IInstallableUnit unit = operand.second();
+		List<ProvisioningAction> parsedActions = getActions(unit, COLLECT_PHASE_ID);
+		if (parsedActions != null)
+			return parsedActions;
+
+		ITouchpointType type = unit.getTouchpointType();
+		if (type == null || type == ITouchpointType.NONE)
+			return null;
+
+		String actionId = getActionManager().getTouchpointQualifiedActionId(COLLECT_PHASE_ID, type);
+		ProvisioningAction action = getActionManager().getAction(actionId, null);
+		if (action == null) {
+			return null;
+		}
+		return Collections.singletonList(action);
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Sizing_Error;
+	}
+
+	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		@SuppressWarnings("unchecked")
+		List<IArtifactRequest[]> artifactRequests = (List<IArtifactRequest[]>) parameters.get(Collect.PARM_ARTIFACT_REQUESTS);
+		ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
+		int statusCode = 0;
+
+		Set<IArtifactRequest> artifactsToObtain = new HashSet<IArtifactRequest>(artifactRequests.size());
+
+		for (IArtifactRequest[] requests : artifactRequests) {
+			if (requests == null)
+				continue;
+			for (int i = 0; i < requests.length; i++) {
+				artifactsToObtain.add(requests[i]);
+			}
+		}
+
+		if (monitor.isCanceled())
+			return Status.CANCEL_STATUS;
+
+		SubMonitor sub = SubMonitor.convert(monitor, 1000);
+		IQueryable<IArtifactRepository> repoQueryable = context.getArtifactRepositories(sub.newChild(500));
+		IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
+		IArtifactRepository[] repositories = repoQueryable.query(all, sub.newChild(500)).toArray(IArtifactRepository.class);
+
+		for (IArtifactRequest artifactRequest : artifactsToObtain) {
+			if (sub.isCanceled())
+				break;
+			boolean found = false;
+			for (int i = 0; i < repositories.length; i++) {
+				IArtifactRepository repo = repositories[i];
+				if (sub.isCanceled())
+					return Status.CANCEL_STATUS;
+				IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(artifactRequest.getArtifactKey());
+				if (descriptors.length > 0) {
+					if (descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE) != null)
+						sizeOnDisk += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
+					else
+						statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
+					if (descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE) != null)
+						dlSize += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE));
+					else
+						statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
+					found = true;
+					break;
+				}
+			}
+			if (!found)
+				// The artifact wasn't present in any repository
+				return new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.ARTIFACT_NOT_FOUND, Messages.Phase_Sizing_Error, null);
+		}
+		if (statusCode != 0)
+			return new Status(IStatus.WARNING, EngineActivator.ID, statusCode, Messages.Phase_Sizing_Warning, null);
+		return null;
+	}
+
+	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+		parameters.put(Collect.PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
+		return null;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
+		// defer setting the IU until after the super method to avoid triggering touchpoint initialization
+		IInstallableUnit iu = operand.second();
+		parameters.put(PARM_IU, iu);
+		return status;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
new file mode 100644
index 0000000..d6181ab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+public class Unconfigure extends InstallableUnitPhase {
+
+	public Unconfigure(int weight, boolean forced) {
+		super(PhaseSetFactory.PHASE_UNCONFIGURE, weight, forced);
+	}
+
+	public Unconfigure(int weight) {
+		this(weight, false);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.first() != null);
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
+		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Unconfiguring_IU, unit.getId()));
+
+		IInstallableUnit unit = currentOperand.first();
+		if (QueryUtil.isFragment(unit))
+			return null;
+
+		return getActions(unit, phaseId);
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Unconfigure_Error;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IInstallableUnit iu = operand.first();
+		parameters.put(PARM_IU, iu);
+
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts != null && artifacts.size() > 0)
+			parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
+
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
new file mode 100644
index 0000000..f0b7adc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.engine.phases;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+public class Uninstall extends InstallableUnitPhase {
+
+	final static class BeforeUninstallEventAction extends ProvisioningAction {
+		public IStatus execute(Map<String, Object> parameters) {
+			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			profile.addInstallableUnit(iu);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
+			return null;
+		}
+	}
+
+	final static class AfterUninstallEventAction extends ProvisioningAction {
+		public IStatus execute(Map<String, Object> parameters) {
+			Profile profile = (Profile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			profile.removeInstallableUnit(iu);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
+			return null;
+		}
+
+		public IStatus undo(Map<String, Object> parameters) {
+			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
+			String phaseId = (String) parameters.get(PARM_PHASE_ID);
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
+			return null;
+		}
+	}
+
+	public Uninstall(int weight, boolean forced) {
+		super(PhaseSetFactory.PHASE_UNINSTALL, weight, forced);
+	}
+
+	public Uninstall(int weight) {
+		this(weight, false);
+	}
+
+	protected boolean isApplicable(InstallableUnitOperand op) {
+		return (op.first() != null && !op.first().equals(op.second()));
+	}
+
+	protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
+		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Uninstalling_IU, unit.getId()));
+
+		ProvisioningAction beforeAction = new BeforeUninstallEventAction();
+		ProvisioningAction afterAction = new AfterUninstallEventAction();
+
+		IInstallableUnit unit = currentOperand.first();
+		Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
+		if (touchpoint != null) {
+			beforeAction.setTouchpoint(touchpoint);
+			afterAction.setTouchpoint(touchpoint);
+		}
+
+		ArrayList<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
+		actions.add(beforeAction);
+
+		if (QueryUtil.isFragment(unit)) {
+			actions.add(afterAction);
+			return actions;
+		}
+
+		List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
+		if (parsedActions != null)
+			actions.addAll(parsedActions);
+		actions.add(afterAction);
+		return actions;
+	}
+
+	protected String getProblemMessage() {
+		return Messages.Phase_Uninstall_Error;
+	}
+
+	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
+		IInstallableUnit iu = operand.first();
+		parameters.put(PARM_IU, iu);
+
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts != null && artifacts.size() > 0)
+			parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
+
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/BeginOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/BeginOperationEvent.java
deleted file mode 100644
index d9de82c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/BeginOperationEvent.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-public class BeginOperationEvent extends TransactionEvent {
-
-	private static final long serialVersionUID = 6389318375739324865L;
-
-	public BeginOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
-		super(profile, phaseSet, operands, engine);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CertificateChecker.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CertificateChecker.java
deleted file mode 100644
index e21eb6f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CertificateChecker.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUICheckUnsigned;
-import org.eclipse.osgi.service.security.TrustEngine;
-import org.eclipse.osgi.signedcontent.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class CertificateChecker {
-	private ArrayList artifacts;
-	private ServiceTracker trustEngineTracker;
-
-	public CertificateChecker() {
-		artifacts = new ArrayList();
-		trustEngineTracker = new ServiceTracker(EngineActivator.getContext(), TrustEngine.class.getName(), null);
-		trustEngineTracker.open();
-	}
-
-	public IStatus start() {
-		return checkCertificates();
-	}
-
-	private IStatus checkCertificates() {
-		SignedContentFactory verifierFactory = (SignedContentFactory) ServiceHelper.getService(EngineActivator.getContext(), SignedContentFactory.class.getName());
-		IServiceUI serviceUI = (IServiceUI) ServiceHelper.getService(EngineActivator.getContext(), IServiceUI.class.getName());
-		SignedContent content = null;
-		SignerInfo[] signerInfo = null;
-		ArrayList untrusted = new ArrayList();
-		ArrayList unsigned = new ArrayList();
-		ArrayList untrustedChain = new ArrayList();
-		IStatus status = Status.OK_STATUS;
-		if (artifacts.size() == 0 || serviceUI == null)
-			return status;
-		TrustEngine trustEngine = (TrustEngine) trustEngineTracker.getService();
-		for (Iterator it = artifacts.iterator(); it.hasNext();) {
-			File artifact = (File) it.next();
-			try {
-				content = verifierFactory.getSignedContent(artifact);
-				if (!content.isSigned()) {
-					unsigned.add(artifact);
-					continue;
-				}
-				signerInfo = content.getSignerInfos();
-			} catch (GeneralSecurityException e) {
-				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentError, e);
-			} catch (IOException e) {
-				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentIOError, e);
-			}
-			for (int i = 0; i < signerInfo.length; i++) {
-				Certificate[] certificateChain = signerInfo[i].getCertificateChain();
-				try {
-					Certificate trustAnchor = trustEngine.findTrustAnchor(certificateChain);
-					if (trustAnchor == null) {
-						if (!untrusted.contains(certificateChain[0])) {
-							untrusted.add(certificateChain[0]);
-							untrustedChain.add(certificateChain);
-						}
-					}
-				} catch (IOException e) {
-					return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_KeystoreConnectionError, e);
-				}
-			}
-		}
-		status = checkUnsigned(serviceUI, unsigned);
-		if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.CANCEL)
-			return status;
-		if (!untrusted.isEmpty()) {
-			Certificate[][] certificates;
-			certificates = new Certificate[untrustedChain.size()][];
-			for (int i = 0; i < untrustedChain.size(); i++) {
-				certificates[i] = (Certificate[]) untrustedChain.get(i);
-			}
-			Certificate[] trustedCertificates = serviceUI.showCertificates(certificates);
-			if (trustedCertificates == null) {
-				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
-			}
-			for (int i = 0; i < trustedCertificates.length; i++) {
-				untrusted.remove(trustedCertificates[i]);
-			}
-			if (untrusted.size() > 0)
-				return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
-			// add newly trusted certificates to trust engine
-			for (int i = 0; i < trustedCertificates.length; i++) {
-				try {
-					trustEngine.addTrustAnchor(trustedCertificates[i], trustedCertificates[i].toString());
-				} catch (IOException e) {
-					//just return an INFO so the user can proceed with the install
-					return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_KeystoreConnectionError, e);
-				} catch (GeneralSecurityException e) {
-					return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_CertificateError, e);
-				}
-			}
-		}
-
-		return status;
-	}
-
-	/**
-	 * Perform necessary checks on unsigned content.
-	 */
-	private IStatus checkUnsigned(IServiceUI serviceUI, ArrayList unsigned) {
-		if (unsigned.isEmpty())
-			return Status.OK_STATUS;
-		String policy = EngineActivator.getContext().getProperty(EngineActivator.PROP_UNSIGNED_POLICY);
-		//if the policy says we should always allow it, there is nothing more to do
-		if (EngineActivator.UNSIGNED_ALLOW.equals(policy))
-			return Status.OK_STATUS;
-		//if the policy says we should never allow unsigned, then fail
-		if (EngineActivator.UNSIGNED_FAIL.equals(policy))
-			return new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.CertificateChecker_UnsignedNotAllowed, unsigned));
-		//default policy is to prompt for confirmation if possible
-		if (serviceUI instanceof IServiceUICheckUnsigned) {
-			String[] details = new String[unsigned.size()];
-			for (int i = 0; i < details.length; i++) {
-				details[i] = unsigned.get(i).toString();
-			}
-			if (!((IServiceUICheckUnsigned) serviceUI).promptForUnsignedContent(details))
-				return Status.CANCEL_STATUS;
-		}
-		return Status.OK_STATUS;
-	}
-
-	public void add(File toAdd) {
-		artifacts.add(toAdd);
-	}
-
-	public void add(Object[] toAdd) {
-		for (int i = 0; i < toAdd.length; i++) {
-			if (toAdd[i] instanceof File)
-				add((File) toAdd[i]);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CommitOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CommitOperationEvent.java
deleted file mode 100644
index 00f89a1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/CommitOperationEvent.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-public class CommitOperationEvent extends TransactionEvent {
-	private static final long serialVersionUID = -523967775426133720L;
-
-	public CommitOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
-		super(profile, phaseSet, operands, engine);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/DefaultPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/DefaultPhaseSet.java
deleted file mode 100644
index 4842ad1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/DefaultPhaseSet.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.ArrayList;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.*;
-
-public class DefaultPhaseSet extends PhaseSet {
-
-	private static final boolean forcedUninstall = Boolean.valueOf(EngineActivator.getContext().getProperty("org.eclipse.equinox.p2.engine.forcedUninstall")).booleanValue(); //$NON-NLS-1$
-
-	public static int PHASE_CHECK_TRUST = 0x01;
-	public static int PHASE_COLLECT = 0x02;
-	public static int PHASE_CONFIGURE = 0x04;
-	public static int PHASE_INSTALL = 0x08;
-	public static int PHASE_PROPERTY = 0x10;
-	public static int PHASE_UNCONFIGURE = 0x20;
-	public static int PHASE_UNINSTALL = 0x40;
-
-	public DefaultPhaseSet() {
-		this(new Phase[] {new Collect(100), new Unconfigure(10, forcedUninstall), new Uninstall(50, forcedUninstall), new Property(1), new CheckTrust(10), new Install(50), new Configure(10)});
-	}
-
-	private DefaultPhaseSet(Phase[] phases) {
-		super(phases);
-	}
-
-	/**
-	 * Creates a default phase set that covers all the provisioning operations.
-	 * Phases can be specified for exclusion.
-	 * 
-	 * @param exclude - A set of bit options that specify the phases to exclude.
-	 * See {@link DefaultPhaseSet} for possible options
-	 * @return the {@link PhaseSet}
-	 */
-	public static final PhaseSet createDefaultPhaseSet(int exclude) {
-		ArrayList phases = new ArrayList();
-		if ((PHASE_COLLECT & exclude) != PHASE_COLLECT)
-			phases.add(new Collect(100));
-		if ((PHASE_UNCONFIGURE & exclude) != PHASE_UNCONFIGURE)
-			phases.add(new Unconfigure(10, forcedUninstall));
-		if ((PHASE_UNINSTALL & exclude) != PHASE_UNINSTALL)
-			phases.add(new Uninstall(50, forcedUninstall));
-		if ((PHASE_PROPERTY & exclude) != PHASE_PROPERTY)
-			phases.add(new Property(1));
-		if ((PHASE_CHECK_TRUST & exclude) != PHASE_CHECK_TRUST)
-			phases.add(new CheckTrust(10));
-		if ((PHASE_INSTALL & exclude) != PHASE_INSTALL)
-			phases.add(new Install(50));
-		if ((PHASE_CONFIGURE & exclude) != PHASE_CONFIGURE)
-			phases.add(new Configure(10));
-		return new DefaultPhaseSet((Phase[]) phases.toArray(new Phase[phases.size()]));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Engine.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Engine.java
deleted file mode 100644
index 65f2eda..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Engine.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.io.File;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-
-public class Engine implements IEngine {
-	private static final String ENGINE = "engine"; //$NON-NLS-1$
-
-	private final IProvisioningEventBus eventBus;
-	private ActionManager actionManager;
-
-	public Engine(IProvisioningEventBus eventBus) {
-		this.eventBus = eventBus;
-		this.actionManager = new ActionManager();
-	}
-
-	public IStatus perform(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		checkArguments(iprofile, phaseSet, operands, context, monitor);
-
-		if (context == null)
-			context = new ProvisioningContext();
-
-		if (monitor == null)
-			monitor = new NullProgressMonitor();
-
-		SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) ServiceHelper.getService(EngineActivator.getContext(), IProfileRegistry.class.getName());
-
-		Profile profile = profileRegistry.validate(iprofile);
-
-		profileRegistry.lockProfile(profile);
-		try {
-			eventBus.publishEvent(new BeginOperationEvent(profile, phaseSet, operands, this));
-			if (DebugHelper.DEBUG_ENGINE)
-				DebugHelper.debug(ENGINE, "Beginning engine operation for profile=" + profile.getProfileId() + " [" + profile.getTimestamp() + "]:" + DebugHelper.LINE_SEPARATOR + DebugHelper.formatOperation(phaseSet, operands, context)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
-			File profileDataDirectory = profileRegistry.getProfileDataDirectory(profile.getProfileId());
-
-			EngineSession session = new EngineSession(profile, profileDataDirectory, context);
-
-			MultiStatus result = phaseSet.perform(actionManager, session, profile, operands, context, monitor);
-			if (result.isOK() || result.matches(IStatus.INFO | IStatus.WARNING)) {
-				if (DebugHelper.DEBUG_ENGINE)
-					DebugHelper.debug(ENGINE, "Preparing to commit engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
-				result.merge(session.prepare(monitor));
-			}
-			if (result.matches(IStatus.ERROR | IStatus.CANCEL)) {
-				if (DebugHelper.DEBUG_ENGINE)
-					DebugHelper.debug(ENGINE, "Rolling back engine operation for profile=" + profile.getProfileId() + ". Reason was: " + result.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-				IStatus status = session.rollback(monitor, result.getSeverity());
-				if (status.matches(IStatus.ERROR))
-					LogHelper.log(status);
-				eventBus.publishEvent(new RollbackOperationEvent(profile, phaseSet, operands, this, result));
-			} else {
-				if (DebugHelper.DEBUG_ENGINE)
-					DebugHelper.debug(ENGINE, "Committing engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
-				if (profile.isChanged())
-					profileRegistry.updateProfile(profile);
-				IStatus status = session.commit(monitor);
-				if (status.matches(IStatus.ERROR))
-					LogHelper.log(status);
-				eventBus.publishEvent(new CommitOperationEvent(profile, phaseSet, operands, this));
-			}
-			//if there is only one child status, return that status instead because it will have more context
-			IStatus[] children = result.getChildren();
-			return children.length == 1 ? children[0] : result;
-		} finally {
-			profileRegistry.unlockProfile(profile);
-			profile.setChanged(false);
-		}
-	}
-
-	public IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		checkArguments(iprofile, phaseSet, operands, context, monitor);
-
-		if (context == null)
-			context = new ProvisioningContext();
-
-		if (monitor == null)
-			monitor = new NullProgressMonitor();
-
-		return phaseSet.validate(actionManager, iprofile, operands, context, monitor);
-	}
-
-	private void checkArguments(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		if (iprofile == null)
-			throw new IllegalArgumentException(Messages.null_profile);
-
-		if (phaseSet == null)
-			throw new IllegalArgumentException(Messages.null_phaseset);
-
-		if (operands == null)
-			throw new IllegalArgumentException(Messages.null_operands);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/EngineSession.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/EngineSession.java
deleted file mode 100644
index fa8814f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/EngineSession.java
+++ /dev/null
@@ -1,362 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.osgi.util.NLS;
-
-public class EngineSession {
-	private static final String ENGINE_SESSION = "enginesession"; //$NON-NLS-1$
-
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
-	private static class ActionsRecord {
-		Operand operand;
-		List actions = new ArrayList();
-
-		ActionsRecord(Operand operand) {
-			this.operand = operand;
-		}
-	}
-
-	private List phaseActionRecordsPairs = new ArrayList();
-
-	private Phase currentPhase;
-	boolean currentPhaseActive;
-
-	private List currentActionRecords;
-	private ActionsRecord currentRecord;
-
-	private IProfile profile;
-
-	private File profileDataDirectory;
-
-	private ProvisioningContext context;
-
-	private Set touchpoints = new HashSet();
-
-	public EngineSession(IProfile profile, File profileDataDirectory, ProvisioningContext context) {
-		this.profile = profile;
-		this.profileDataDirectory = profileDataDirectory;
-		this.context = context;
-	}
-
-	public File getProfileDataDirectory() {
-		return profileDataDirectory;
-	}
-
-	IStatus prepare(IProgressMonitor monitor) {
-		monitor.subTask(Messages.preparing);
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		for (Iterator iterator = touchpoints.iterator(); iterator.hasNext();) {
-			Touchpoint touchpoint = (Touchpoint) iterator.next();
-			try {
-				status.add(touchpoint.prepare(profile));
-			} catch (RuntimeException e) {
-				// "touchpoint.prepare" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
-			}
-		}
-
-		if (status.matches(IStatus.ERROR)) {
-			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_prepare_error, profile.getProfileId()), null);
-			result.merge(status);
-			return result;
-		}
-		return status;
-	}
-
-	IStatus commit(IProgressMonitor monitor) {
-		monitor.subTask(Messages.committing);
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		phaseActionRecordsPairs.clear();
-		for (Iterator iterator = touchpoints.iterator(); iterator.hasNext();) {
-			Touchpoint touchpoint = (Touchpoint) iterator.next();
-			try {
-				IStatus result = touchpoint.commit(profile);
-				if (!result.isOK())
-					status.add(result);
-			} catch (RuntimeException e) {
-				// "touchpoint.commit" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
-			}
-		}
-
-		if (status.matches(IStatus.ERROR)) {
-			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
-			result.merge(status);
-			return result;
-		}
-		return status;
-	}
-
-	IStatus rollback(IProgressMonitor monitor, int severity) {
-		if (severity == IStatus.CANCEL)
-			monitor.subTask(Messages.rollingback_cancel);
-
-		if (severity == IStatus.ERROR)
-			monitor.subTask(Messages.rollingback_error);
-
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-
-		if (currentPhaseActive) {
-			try {
-				IStatus result = rollBackPhase(currentPhase, currentActionRecords);
-				if (!result.isOK())
-					status.add(result);
-			} catch (RuntimeException e) {
-				// "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
-			}
-			currentPhaseActive = false;
-			currentActionRecords = null;
-			currentRecord = null;
-		}
-		currentPhase = null;
-
-		for (ListIterator it = phaseActionRecordsPairs.listIterator(phaseActionRecordsPairs.size()); it.hasPrevious();) {
-			Object[] pair = (Object[]) it.previous();
-			Phase phase = (Phase) pair[0];
-			List actionRecords = (List) pair[1];
-			try {
-				final IStatus result = rollBackPhase(phase, actionRecords);
-				if (!result.isOK())
-					status.add(result);
-			} catch (RuntimeException e) {
-				// "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
-			}
-		}
-
-		phaseActionRecordsPairs.clear();
-		for (Iterator iterator = touchpoints.iterator(); iterator.hasNext();) {
-			Touchpoint touchpoint = (Touchpoint) iterator.next();
-			try {
-				IStatus result = touchpoint.rollback(profile);
-				if (!result.isOK())
-					status.add(result);
-			} catch (RuntimeException e) {
-				// "touchpoint.rollback" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
-			}
-		}
-
-		if (status.matches(IStatus.ERROR)) {
-			MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
-			result.merge(status);
-			return result;
-		}
-		return status;
-	}
-
-	private IStatus rollBackPhase(Phase phase, List actionRecords) {
-		MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-
-		if (!currentPhaseActive)
-			phase.prePerform(result, this, profile, context, new NullProgressMonitor());
-
-		for (ListIterator it = actionRecords.listIterator(actionRecords.size()); it.hasPrevious();) {
-			ActionsRecord record = (ActionsRecord) it.previous();
-			ProvisioningAction[] actions = (ProvisioningAction[]) record.actions.toArray(new ProvisioningAction[record.actions.size()]);
-			try {
-				phase.undo(result, this, profile, record.operand, actions, context);
-			} catch (RuntimeException e) {
-				// "phase.undo" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
-			}
-		}
-		phase.postPerform(result, profile, context, new NullProgressMonitor());
-		return result;
-	}
-
-	void recordPhaseEnter(Phase phase) {
-		if (phase == null)
-			throw new IllegalArgumentException(Messages.null_phase);
-
-		if (currentPhase != null)
-			throw new IllegalStateException(Messages.phase_started);
-
-		currentPhase = phase;
-
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugPhaseEnter(phase);
-	}
-
-	void recordPhaseStart(Phase phase) {
-		if (phase == null)
-			throw new IllegalArgumentException(Messages.null_phase);
-
-		if (currentPhase != phase)
-			throw new IllegalArgumentException(Messages.not_current_phase);
-
-		currentPhaseActive = true;
-		currentActionRecords = new ArrayList();
-	}
-
-	void recordPhaseEnd(Phase phase) {
-		if (currentPhase == null)
-			throw new IllegalStateException(Messages.phase_not_started);
-
-		if (currentPhase != phase)
-			throw new IllegalArgumentException(Messages.not_current_phase);
-
-		phaseActionRecordsPairs.add(new Object[] {currentPhase, currentActionRecords});
-		currentActionRecords = null;
-		currentPhaseActive = false;
-	}
-
-	void recordPhaseExit(Phase phase) {
-		if (currentPhase == null)
-			throw new IllegalStateException(Messages.phase_not_started);
-
-		if (currentPhase != phase)
-			throw new IllegalArgumentException(Messages.not_current_phase);
-
-		currentPhase = null;
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugPhaseExit(phase);
-	}
-
-	void recordOperandStart(Operand operand) {
-		if (operand == null)
-			throw new IllegalArgumentException(Messages.null_operand);
-
-		if (currentRecord != null)
-			throw new IllegalStateException(Messages.operand_started);
-
-		currentRecord = new ActionsRecord(operand);
-		currentActionRecords.add(currentRecord);
-
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugOperandStart(operand);
-	}
-
-	void recordOperandEnd(Operand operand) {
-		if (currentRecord == null)
-			throw new IllegalStateException(Messages.operand_not_started);
-
-		if (currentRecord.operand != operand)
-			throw new IllegalArgumentException(Messages.not_current_operand);
-
-		currentRecord = null;
-
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugOperandEnd(operand);
-	}
-
-	void recordActionExecute(ProvisioningAction action, Map parameters) {
-		if (action == null)
-			throw new IllegalArgumentException(Messages.null_action);
-
-		currentRecord.actions.add(action);
-
-		Touchpoint touchpoint = action.getTouchpoint();
-		if (touchpoint != null)
-			touchpoints.add(touchpoint);
-
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugActionExecute(action, parameters);
-	}
-
-	public void recordActionUndo(ProvisioningAction action, Map parameters) {
-		if (DebugHelper.DEBUG_ENGINE_SESSION)
-			debugActionUndo(action, parameters);
-	}
-
-	public String getContextString(Phase phase, Operand operand, ProvisioningAction action) {
-		if (action instanceof ParameterizedProvisioningAction) {
-			ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) action;
-			action = parameterizedAction.getAction();
-		}
-		String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), getCurrentActionId()});
-		return message;
-	}
-
-	public String getContextString() {
-		String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), getCurrentPhaseId(), getCurrentOperandId(), getCurrentActionId()});
-		return message;
-	}
-
-	private Object getCurrentActionId() {
-		if (currentRecord == null || currentRecord.actions.isEmpty())
-			return EMPTY_STRING;
-
-		Object currentAction = currentRecord.actions.get(currentRecord.actions.size() - 1);
-		if (currentAction instanceof ParameterizedProvisioningAction) {
-			ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) currentAction;
-			currentAction = parameterizedAction.getAction();
-		}
-		return currentAction.getClass().getName();
-	}
-
-	private String getCurrentPhaseId() {
-		if (currentPhase == null)
-			return EMPTY_STRING;
-		return currentPhase.getClass().getName();
-	}
-
-	private String getCurrentOperandId() {
-		if (currentRecord == null)
-			return EMPTY_STRING;
-		return currentRecord.operand.toString();
-	}
-
-	private static void debugPhaseEnter(Phase phase) {
-		DebugHelper.debug(ENGINE_SESSION, "Entering phase: " + phase.getClass().getName()); //$NON-NLS-1$
-	}
-
-	private static void debugPhaseExit(Phase phase) {
-		DebugHelper.debug(ENGINE_SESSION, "Exiting phase: " + phase.getClass().getName()); //$NON-NLS-1$
-	}
-
-	private static void debugOperandStart(Operand operand) {
-		DebugHelper.debug(ENGINE_SESSION, "Starting processing of operand: " + operand.toString()); //$NON-NLS-1$
-	}
-
-	private static void debugOperandEnd(Operand operand) {
-		DebugHelper.debug(ENGINE_SESSION, "Ending processing of operand: " + operand.toString()); //$NON-NLS-1$
-	}
-
-	private static void debugActionExecute(ProvisioningAction action, Map parameters) {
-		DebugHelper.debug(ENGINE_SESSION, "Executing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
-	}
-
-	private static void debugActionUndo(ProvisioningAction action, Map parameters) {
-		DebugHelper.debug(ENGINE_SESSION, "Undoing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IEngine.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IEngine.java
deleted file mode 100644
index 29cf5f2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IEngine.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Band XI International, LLC and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Band XI - initial API and implementation
- *   IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-public interface IEngine {
-	public static final String SERVICE_NAME = IEngine.class.getName();
-
-	public IStatus perform(IProfile profile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor);
-
-	public IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfile.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfile.java
deleted file mode 100644
index 237b08f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfile.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-
-public interface IProfile extends IQueryable {
-
-	/**
-	 * Profile property constant indicating the flavor for the profile.
-	 */
-	public static final String PROP_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$
-	/**
-	 * Profile property constant indicating the install folder for the profile.
-	 */
-	public static final String PROP_INSTALL_FOLDER = "org.eclipse.equinox.p2.installFolder"; //$NON-NLS-1$
-	/**
-	 * Profile property constant indicating the configuration folder for the profile.
-	 */
-	public static final String PROP_CONFIGURATION_FOLDER = "org.eclipse.equinox.p2.configurationFolder"; //$NON-NLS-1$
-	/**
-	 * Profile property constant indicating the location of the launcher configuration file for the profile.
-	 */
-	public static final String PROP_LAUNCHER_CONFIGURATION = "org.eclipse.equinox.p2.launcherConfiguration"; //$NON-NLS-1$
-
-	/**
-	 * Profile property constant indicating the installed language(s) for the profile.
-	 */
-	public static final String PROP_NL = "org.eclipse.equinox.p2.nl"; //$NON-NLS-1$
-	/**
-	 * Profile property constant for a string property indicating a user visible short 
-	 * textual description of this profile. May be empty or <code>null</code>, and 
-	 * generally will be for non-top level install contexts.
-	 */
-	public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
-	/**
-	 * Profile property constant for a string property indicating a user visible name of this profile.
-	 * May be empty or <code>null</code>, and generally will be for non-top level
-	 * install contexts.
-	 */
-	public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
-	/**
-	 * Profile property constant indicating the list of environments
-	 * (e.g., OS, WS, ...) in which a profile can operate. The value of the property
-	 * is a comma-delimited string of key/value pairs.
-	 */
-	public static final String PROP_ENVIRONMENTS = "org.eclipse.equinox.p2.environments"; //$NON-NLS-1$
-	/**
-	 * Profile property constant for a boolean property indicating if the profiling
-	 * is roaming.  A roaming profile is one whose physical install location varies
-	 * and is updated whenever it runs.
-	 */
-	public static final String PROP_ROAMING = "org.eclipse.equinox.p2.roaming"; //$NON-NLS-1$
-	/**
-	 * Profile property constant indicating the bundle pool cache location.
-	 */
-	public static final String PROP_CACHE = "org.eclipse.equinox.p2.cache"; //$NON-NLS-1$
-
-	/**
-	 * Profile property constant indicating a shared read-only bundle pool cache location.
-	 */
-	public static final String PROP_SHARED_CACHE = "org.eclipse.equinox.p2.cache.shared"; //$NON-NLS-1$
-
-	/**
-	 * Profile property constant for a boolean property indicating if update features should
-	 * be installed in this profile
-	 */
-	public static final String PROP_INSTALL_FEATURES = "org.eclipse.update.install.features"; //$NON-NLS-1$
-
-	public String getProfileId();
-
-	public IProfile getParentProfile();
-
-	/*
-	 * 	A profile is a root profile if it is not a sub-profile
-	 * 	of another profile.
-	 */
-	public boolean isRootProfile();
-
-	public boolean hasSubProfiles();
-
-	public String[] getSubProfileIds();
-
-	/**
-	 * Get the stored value associated with the given key.
-	 * If the profile is a sub-profile and there is no value
-	 * locally associated with the key, then the chain
-	 * of parent profiles will be traversed to get an associated
-	 * value from the nearest ancestor.
-	 *  
-	 * <code>null</code> is return if none of this profile
-	 * or its ancestors associates a value with the key.
-	 */
-	public String getProperty(String key);
-
-	/**
-	 * Get the stored value associated with the given key in this profile.
-	 * No traversal of the ancestor hierarchy is done for sub-profiles.
-	 */
-	public String getLocalProperty(String key);
-
-	public String getInstallableUnitProperty(IInstallableUnit iu, String key);
-
-	/**
-	 * Get an <i>unmodifiable copy</i> of the local properties
-	 * associated with the profile.
-	 * 
-	 * @return an <i>unmodifiable copy</i> of the Profile properties.
-	 */
-	public Map getLocalProperties();
-
-	public Map getProperties();
-
-	public Map getInstallableUnitProperties(IInstallableUnit iu);
-
-	public long getTimestamp();
-
-	public Collector available(Query query, Collector collector, IProgressMonitor monitor);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfileRegistry.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfileRegistry.java
deleted file mode 100644
index 364967e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IProfileRegistry.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * This encapsulates the access to the profile registry. 
- * It deals with persistence in a transparent way.
- */
-public interface IProfileRegistry {
-	public static final String SELF = "_SELF_"; //$NON-NLS-1$
-
-	/**
-	 * Return the profile in the registry that has the given id. If it does not exist, 
-	 * then return <code>null</code>.
-	 * 
-	 * @param id the profile identifier
-	 * @return the profile or <code>null</code>
-	 */
-	IProfile getProfile(String id);
-
-	/**
-	 * Return the profile in the registry that has the given id and timestamp. If it does not exist, 
-	 * then return <code>null</code>.
-	 * 
-	 * @param id the profile identifier
-	 * @param timestamp the profile's timestamp
-
-	 * @return the profile or <code>null</code>
-	 */
-	IProfile getProfile(String id, long timestamp);
-
-	/**
-	 * Return an array of timestamps in ascending order for the profile in question. If there are none, then
-	 * return an empty array.
-	 * 
-	 * @return the array of timestamps
-	 */
-	long[] listProfileTimestamps(String id);
-
-	/**
-	 * Return an array of profiles known to this registry. If there are none, then
-	 * return an empty array.
-	 * 
-	 * @return the array of profiles
-	 */
-	IProfile[] getProfiles();
-
-	/**
-	 * Add the given profile to this profile registry.
-	 * 
-	 * @param id the profile id
-	 * 
-	 * @throws ProvisionException if a profile
-	 *         with the same id is already present in the registry.
-	 */
-	IProfile addProfile(String id) throws ProvisionException;
-
-	/**
-	 * Add the given profile to this profile registry.
-	 * 
-	 * @param id the profile id
-	 * @param properties the profile properties
-	 * 
-	 * @throws ProvisionException if a profile
-	 *         with the same id is already present in the registry.
-	 */
-	IProfile addProfile(String id, Map properties) throws ProvisionException;
-
-	/**
-	 * Add the given profile to this profile registry.
-	 * 
-	 * @param id the profile id
-	 * @param properties the profile properties
-	 * @param parentId the id of a parent profile
-	 * 
-	 * @throws ProvisionException if a profile
-	 *         with the same id is already present in the registry or the parentId is not a registered Profile.
-	 */
-	IProfile addProfile(String id, Map properties, String parentId) throws ProvisionException;
-
-	/**
-	 * Returns whether this profile registry contains a profile with the given id.
-	 * 
-	 * @param profileId The id of the profile to search for
-	 * @return <code>true</code> if this registry contains a profile with the given id,
-	 * and <code>false</code> otherwise.
-	 */
-	public boolean containsProfile(String profileId);
-
-	/**
-	 * Remove the given profile from this profile registry.  This method has no effect
-	 * if this registry does not contain a profile with the given id.
-	 * 
-	 * @param id the profile to remove
-	 */
-	void removeProfile(String id);
-
-	/**
-	 * Check if the given profile from this profile registry is up-to-date.
-	 * 
-	 * @param profile the profile to check
-	 * @return boolean  true if the profile is current; false otherwise.
-	 */
-	public boolean isCurrent(IProfile profile);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ISurrogateProfileHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ISurrogateProfileHandler.java
deleted file mode 100644
index 7f9dfbf..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ISurrogateProfileHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-public interface ISurrogateProfileHandler {
-
-	public abstract IProfile createProfile(String id);
-
-	public abstract boolean isSurrogate(IProfile profile);
-
-	public abstract Collector queryProfile(IProfile profile, Query query, Collector collector, IProgressMonitor monitor);
-
-	public abstract boolean updateProfile(IProfile selfProfile);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IUProfilePropertyQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IUProfilePropertyQuery.java
deleted file mode 100644
index e40514f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/IUProfilePropertyQuery.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-
-/**
- * A query that searches for {@link IInstallableUnit} instances that have
- * a property associated with the specified profile, whose value matches the provided value.
- */
-public class IUProfilePropertyQuery extends IUPropertyQuery {
-	private IProfile profile;
-
-	/**
-	 * Creates a new query on the given property name and value.
-	 * Because the queryable for this query is typically the profile
-	 * instance, we use a reference to the profile rather than the
-	 * profile id for performance reasons.
-	 */
-	public IUProfilePropertyQuery(IProfile profile, String propertyName, String propertyValue) {
-		super(propertyName, propertyValue);
-		this.profile = profile;
-	}
-
-	protected String getProperty(IInstallableUnit iu, String name) {
-		return profile.getInstallableUnitProperty(iu, name);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitEvent.java
deleted file mode 100644
index 13f9889..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitEvent.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.EventObject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-
-public class InstallableUnitEvent extends EventObject {
-	public static final int UNINSTALL = 0;
-	public static final int INSTALL = 1;
-	private static final long serialVersionUID = 3318712818811459886L;
-
-	private String phaseId;
-	private boolean prePhase;
-
-	private IProfile profile;
-	private InstallableUnitOperand operand;
-	private Touchpoint touchpoint;
-	private IStatus result;
-	private int type;
-
-	public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, InstallableUnitOperand operand, int type, Touchpoint touchpoint) {
-		this(phaseId, prePhase, profile, operand, type, touchpoint, null);
-	}
-
-	public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, InstallableUnitOperand operand, int type, Touchpoint touchpoint, IStatus result) {
-		super(profile);
-		this.phaseId = phaseId;
-		this.prePhase = prePhase;
-		this.profile = profile;
-		this.operand = operand;
-		if (type != UNINSTALL && type != INSTALL)
-			throw new IllegalArgumentException(Messages.InstallableUnitEvent_type_not_install_or_uninstall);
-		this.type = type;
-		this.result = result;
-		this.touchpoint = touchpoint;
-
-	}
-
-	public Touchpoint getTouchpoint() {
-		return touchpoint;
-	}
-
-	public IProfile getProfile() {
-		return profile;
-	}
-
-	public InstallableUnitOperand getOperand() {
-		return operand;
-	}
-
-	public String getPhase() {
-		return phaseId;
-	}
-
-	public boolean isPre() {
-		return prePhase;
-	}
-
-	public boolean isPost() {
-		return !prePhase;
-	}
-
-	public IStatus getResult() {
-		return (result != null ? result : Status.OK_STATUS);
-	}
-
-	public boolean isInstall() {
-		return type == INSTALL;
-	}
-
-	public boolean isUninstall() {
-		return type == UNINSTALL;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitOperand.java
deleted file mode 100644
index f469d48..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitOperand.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class InstallableUnitOperand extends Operand {
-	private final IInstallableUnit first;
-	private final IInstallableUnit second;
-
-	/**
-	 * Creates a new operand that represents replacing an installable unit
-	 * with another. At least one of the provided installable units must be
-	 * non-null.
-	 * 
-	 * @param first The installable unit being removed, or <code>null</code>
-	 * @param second The installable unit being added, or <code>null</code>
-	 */
-	public InstallableUnitOperand(IInstallableUnit first, IInstallableUnit second) {
-		//the operand must have at least one non-null units
-		Assert.isTrue(first != null || second != null);
-		this.first = first;
-		this.second = second;
-	}
-
-	public IInstallableUnit first() {
-		return first;
-	}
-
-	public IInstallableUnit second() {
-		return second;
-	}
-
-	public String toString() {
-		return first + " --> " + second; //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java
deleted file mode 100644
index 2d76e36..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPhase.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.p2.engine.InstructionParser;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-public abstract class InstallableUnitPhase extends Phase {
-	public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
-	public static final String PARM_IU = "iu"; //$NON-NLS-1$
-	public static final String PARM_INSTALL_FOLDER = "installFolder"; //$NON-NLS-1$
-
-	protected InstallableUnitPhase(String phaseId, int weight, boolean forced) {
-		super(phaseId, weight, forced);
-	}
-
-	protected InstallableUnitPhase(String phaseId, int weight) {
-		this(phaseId, weight, false);
-	}
-
-	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER));
-		return super.initializePhase(monitor, profile, parameters);
-	}
-
-	protected IStatus initializeOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
-		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		mergeStatus(status, initializeOperand(profile, iuOperand, parameters, monitor));
-		mergeStatus(status, super.initializeOperand(profile, operand, parameters, monitor));
-		return status;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		return Status.OK_STATUS;
-	}
-
-	protected IStatus completeOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
-		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		mergeStatus(status, super.completeOperand(profile, iuOperand, parameters, monitor));
-		mergeStatus(status, completeOperand(profile, iuOperand, parameters, monitor));
-		return status;
-	}
-
-	protected IStatus completeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		return Status.OK_STATUS;
-	}
-
-	final protected ProvisioningAction[] getActions(Operand operand) {
-		if (!(operand instanceof InstallableUnitOperand))
-			return null;
-
-		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-		return getActions(iuOperand);
-	}
-
-	protected abstract ProvisioningAction[] getActions(InstallableUnitOperand operand);
-
-	final public boolean isApplicable(Operand operand) {
-		if (!(operand instanceof InstallableUnitOperand))
-			return false;
-
-		InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-		return isApplicable(iuOperand);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand operand) {
-		return true;
-	}
-
-	protected final ProvisioningAction[] getActions(IInstallableUnit unit, String key) {
-		ITouchpointInstruction[] instructions = getInstructions(unit, key);
-		if (instructions == null || instructions.length == 0)
-			return null;
-
-		List actions = new ArrayList();
-		InstructionParser instructionParser = new InstructionParser(getActionManager());
-		for (int i = 0; i < instructions.length; i++) {
-			actions.addAll(Arrays.asList(instructionParser.parseActions(instructions[i], unit.getTouchpointType())));
-		}
-		return (ProvisioningAction[]) actions.toArray(new ProvisioningAction[actions.size()]);
-	}
-
-	private final static ITouchpointInstruction[] getInstructions(IInstallableUnit unit, String key) {
-		ITouchpointData[] data = unit.getTouchpointData();
-		if (data == null)
-			return null;
-
-		ArrayList matches = new ArrayList(data.length);
-		for (int i = 0; i < data.length; i++) {
-			ITouchpointInstruction instructions = data[i].getInstruction(key);
-			if (instructions != null)
-				matches.add(instructions);
-		}
-
-		ITouchpointInstruction[] result = (ITouchpointInstruction[]) matches.toArray(new ITouchpointInstruction[matches.size()]);
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPropertyOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPropertyOperand.java
deleted file mode 100644
index 0e299f1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/InstallableUnitPropertyOperand.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class InstallableUnitPropertyOperand extends PropertyOperand {
-	private final IInstallableUnit iu;
-
-	/**
-	 * Creates a new operand that represents replacing a property value associated
-	 * with an IU with another.  At least one of the provided property values must be
-	 * non-null.
-	 * 
-	 * @param iu The IInstallableUnit with which the property is associated
-	 * @param key The key of the property being modified
-	 * @param first The property value being removed, or <code>null</code>
-	 * @param second The property value being added, or <code>null</code>
-	 */
-	public InstallableUnitPropertyOperand(IInstallableUnit iu, String key, Object first, Object second) {
-		super(key, first, second);
-		//the iu must be specified.
-		Assert.isTrue(iu != null);
-		this.iu = iu;
-	}
-
-	public IInstallableUnit getInstallableUnit() {
-		return iu;
-	}
-
-	public String toString() {
-		return "[IInstallableUnit property for " + iu.toString() + "] " + super.toString(); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Memento.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Memento.java
deleted file mode 100644
index eb4c153..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Memento.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.*;
-
-public class Memento {
-	private static final long serialVersionUID = 3257399736837461585L;
-	private static final Collection simples = Arrays.asList(new Class[] {String.class, Integer.class, Long.class, Float.class, Double.class, Byte.class, Short.class, Character.class, Boolean.class});
-	private static final Collection simpleArrays = Arrays.asList(new Class[] {String[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Byte[].class, Short[].class, Character[].class, Boolean[].class});
-	private static final Collection primitiveArrays = Arrays.asList(new Class[] {long[].class, int[].class, short[].class, char[].class, byte[].class, double[].class, float[].class, boolean[].class});
-
-	Map mementoMap = new HashMap();
-
-	public Object remove(String key) {
-		if (key == null)
-			throw new NullPointerException();
-
-		// TODO: persist change
-		return mementoMap.remove(key);
-	}
-
-	public Object put(String key, Object value) {
-		if (key == null)
-			throw new NullPointerException();
-
-		validateValue(value);
-
-		// TODO: persist change
-		return mementoMap.put(key, value);
-	}
-
-	public Object get(String key) {
-		if (key == null)
-			throw new NullPointerException();
-
-		return mementoMap.get(key);
-	}
-
-	public Enumeration getKeys() {
-		return new Enumeration() {
-			Iterator keysIterator = mementoMap.keySet().iterator();
-
-			public boolean hasMoreElements() {
-				return keysIterator.hasNext();
-			}
-
-			public Object nextElement() {
-				return keysIterator.next();
-			}
-		};
-	}
-
-	private static void validateValue(Object value) {
-		if (value == null)
-			return;
-
-		Class clazz = value.getClass();
-
-		if (simples.contains(clazz))
-			return;
-
-		if (simpleArrays.contains(clazz) || primitiveArrays.contains(clazz))
-			return;
-
-		throw new IllegalArgumentException(clazz.getName());
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Messages.java
deleted file mode 100644
index b4aef5a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Messages.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.osgi.util.NLS;
-
-//TODO Shouldn't have messages class in API package
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.engine.messages"; //$NON-NLS-1$
-	public static String CertificateChecker_CertificateError;
-	public static String CertificateChecker_CertificateRejected;
-	public static String CertificateChecker_KeystoreConnectionError;
-	public static String CertificateChecker_SignedContentIOError;
-	public static String CertificateChecker_SignedContentError;
-	public static String CertificateChecker_UnsignedNotAllowed;
-	public static String not_current_phase;
-	public static String null_operands;
-	public static String null_phase;
-	public static String null_phases;
-	public static String null_phaseset;
-	public static String null_profile;
-	public static String phase_error;
-	public static String phase_not_started;
-	public static String phase_started;
-	public static String phaseid_not_positive;
-	public static String phaseid_not_set;
-	public static String Engine_Operation_Canceled_By_User;
-	public static String InstallableUnitEvent_type_not_install_or_uninstall;
-	public static String touchpoint_prepare_error;
-	public static String touchpoint_commit_error;
-	public static String touchpoint_rollback_error;
-	public static String phase_undo_error;
-	public static String phase_undo_operand_error;
-	public static String session_prepare_error;
-	public static String session_commit_error;
-	public static String null_operand;
-	public static String operand_started;
-	public static String operand_not_started;
-	public static String not_current_operand;
-	public static String null_action;
-	public static String session_context;
-	public static String action_not_found;
-	public static String actions_not_found;
-	public static String preparing;
-	public static String committing;
-	public static String rollingback_cancel;
-	public static String rollingback_error;
-	public static String action_undo_error;
-	public static String forced_action_execute_error;
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		//
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingAction.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingAction.java
deleted file mode 100644
index 6db28f7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.osgi.util.NLS;
-
-public class MissingAction extends ProvisioningAction {
-
-	private String actionId;
-	private VersionRange versionRange;
-
-	public MissingAction(String actionId, VersionRange versionRange) {
-		this.actionId = actionId;
-		this.versionRange = versionRange;
-	}
-
-	public String getActionId() {
-		return actionId;
-	}
-
-	public VersionRange getVersionRange() {
-		return versionRange;
-	}
-
-	public IStatus execute(Map parameters) {
-		throw new IllegalArgumentException(NLS.bind(Messages.action_not_found, actionId + (versionRange == null ? "" : "/" + versionRange.toString()))); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	public IStatus undo(Map parameters) {
-		// do nothing as we want this action to undo successfully
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingActionsException.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingActionsException.java
deleted file mode 100644
index 0c68603..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/MissingActionsException.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-public class MissingActionsException extends ProvisionException {
-
-	private static final long serialVersionUID = 8617693596359747490L;
-	private final MissingAction[] missingActions;
-
-	public MissingActionsException(MissingAction[] missingActions) {
-		super(getMissingActionsMessage(missingActions));
-		this.missingActions = missingActions;
-	}
-
-	private static String getMissingActionsMessage(MissingAction[] missingActions) {
-
-		if (missingActions.length == 0)
-			throw new IllegalArgumentException("Bad exception: No missing actions"); //$NON-NLS-1$
-
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0; i < missingActions.length; i++) {
-			MissingAction missingAction = missingActions[i];
-			buffer.append(missingAction.getActionId());
-			if (missingAction.getVersionRange() != null) {
-				buffer.append("/"); //$NON-NLS-1$
-				buffer.append(missingAction.getVersionRange().toString());
-			}
-			if (i + 1 != missingActions.length)
-				buffer.append(", "); //$NON-NLS-1$
-		}
-
-		return NLS.bind(Messages.actions_not_found, buffer.toString());
-	}
-
-	public MissingAction[] getMissingActions() {
-		return missingActions;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Operand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Operand.java
deleted file mode 100644
index fa7b278..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Operand.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-/**
- * The common base class for engine operands.
- * 
- * @see IEngine#perform(IProfile, PhaseSet, Operand[], ProvisioningContext, org.eclipse.core.runtime.IProgressMonitor)
- */
-public class Operand {
-	// marker class
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Phase.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Phase.java
deleted file mode 100644
index b58afd3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Phase.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.engine.ActionManager;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class Phase {
-	protected static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
-	protected static final String PARM_PHASE_ID = "phaseId"; //$NON-NLS-1$
-	protected static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
-	protected static final String PARM_PROFILE_DATA_DIRECTORY = "profileDataDirectory"; //$NON-NLS-1$
-	protected static final String PARM_CONTEXT = "context"; //$NON-NLS-1$
-	protected static final String PARM_FORCED = "forced"; //$NON-NLS-1$
-
-	protected final String phaseId;
-	protected final int weight;
-	protected final boolean forced;
-	protected int prePerformWork = 1000;
-	protected int mainPerformWork = 10000;
-	protected int postPerformWork = 1000;
-	private Map operandParameters = null;
-	private Map phaseParameters = new HashMap();
-	private Map touchpointToTouchpointPhaseParameters = new HashMap();
-	private Map touchpointToTouchpointOperandParameters = new HashMap();
-	ActionManager actionManager; // injected from phaseset
-
-	protected Phase(String phaseId, int weight, boolean forced) {
-		if (phaseId == null || phaseId.length() == 0)
-			throw new IllegalArgumentException(Messages.phaseid_not_set);
-		if (weight <= 0)
-			throw new IllegalArgumentException(Messages.phaseid_not_positive);
-		this.weight = weight;
-		this.phaseId = phaseId;
-		this.forced = forced;
-	}
-
-	protected Phase(String phaseId, int weight) {
-		this(phaseId, weight, false);
-	}
-
-	final protected ActionManager getActionManager() {
-		return actionManager;
-	}
-
-	public String toString() {
-		return getClass().getName() + " - " + this.weight; //$NON-NLS-1$
-	}
-
-	public final void perform(MultiStatus status, EngineSession session, IProfile profile, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		SubMonitor subMonitor = SubMonitor.convert(monitor, prePerformWork + mainPerformWork + postPerformWork);
-		session.recordPhaseEnter(this);
-		prePerform(status, session, profile, context, subMonitor.newChild(prePerformWork));
-		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-			return;
-		session.recordPhaseStart(this);
-
-		subMonitor.setWorkRemaining(mainPerformWork + postPerformWork);
-		mainPerform(status, session, profile, operands, context, subMonitor.newChild(mainPerformWork));
-		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-			return;
-
-		session.recordPhaseEnd(this);
-		subMonitor.setWorkRemaining(postPerformWork);
-		postPerform(status, profile, context, subMonitor.newChild(postPerformWork));
-		phaseParameters.clear();
-		if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-			return;
-		session.recordPhaseExit(this);
-		subMonitor.done();
-	}
-
-	void prePerform(MultiStatus status, EngineSession session, IProfile profile, ProvisioningContext context, IProgressMonitor monitor) {
-		phaseParameters.put(PARM_PROFILE, profile);
-		phaseParameters.put(PARM_PROFILE_DATA_DIRECTORY, session.getProfileDataDirectory());
-		phaseParameters.put(PARM_CONTEXT, context);
-		phaseParameters.put(PARM_PHASE_ID, phaseId);
-		phaseParameters.put(PARM_FORCED, Boolean.toString(forced));
-		mergeStatus(status, initializePhase(monitor, profile, phaseParameters));
-	}
-
-	private void mainPerform(MultiStatus status, EngineSession session, IProfile profile, Operand[] operands, ProvisioningContext context, SubMonitor subMonitor) {
-		subMonitor.beginTask("", operands.length); //$NON-NLS-1$
-		for (int i = 0; i < operands.length; i++) {
-			subMonitor.setWorkRemaining(operands.length - i);
-			if (subMonitor.isCanceled())
-				throw new OperationCanceledException();
-			Operand operand = operands[i];
-			if (!isApplicable(operand))
-				continue;
-
-			session.recordOperandStart(operand);
-			ProvisioningAction[] actions = getActions(operand);
-			Map tempOperandParameters = new HashMap(phaseParameters);
-			tempOperandParameters.put(PARM_OPERAND, operand);
-			mergeStatus(status, initializeOperand(profile, operand, tempOperandParameters, subMonitor));
-			if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-				return;
-
-			operandParameters = Collections.unmodifiableMap(tempOperandParameters);
-			if (actions != null) {
-				for (int j = 0; j < actions.length; j++) {
-					ProvisioningAction action = actions[j];
-					Map parameters = operandParameters;
-					Touchpoint touchpoint = action.getTouchpoint();
-					if (touchpoint != null) {
-						mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, subMonitor));
-						if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-							return;
-
-						parameters = (Map) touchpointToTouchpointOperandParameters.get(touchpoint);
-					}
-					IStatus actionStatus = null;
-					try {
-						session.recordActionExecute(action, parameters);
-						actionStatus = action.execute(parameters);
-					} catch (RuntimeException e) {
-						if (!forced)
-							throw e;
-						// "action.execute" calls user code and might throw an unchecked exception
-						// we catch the error here to gather information on where the problem occurred.
-						actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
-					} catch (LinkageError e) {
-						if (!forced)
-							throw e;
-						// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-						actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
-					}
-					if (forced && actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
-						MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
-						result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
-						LogHelper.log(result);
-						actionStatus = Status.OK_STATUS;
-					}
-					mergeStatus(status, actionStatus);
-					if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-						return;
-				}
-			}
-			mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, subMonitor));
-			mergeStatus(status, completeOperand(profile, operand, operandParameters, subMonitor));
-			if (status.matches(IStatus.ERROR | IStatus.CANCEL))
-				return;
-			operandParameters = null;
-			session.recordOperandEnd(operand);
-			subMonitor.worked(1);
-		}
-	}
-
-	private IStatus initializeTouchpointParameters(IProfile profile, Operand operand, Touchpoint touchpoint, IProgressMonitor monitor) {
-		if (touchpointToTouchpointOperandParameters.containsKey(touchpoint))
-			return Status.OK_STATUS;
-
-		Map touchpointPhaseParameters = (Map) touchpointToTouchpointPhaseParameters.get(touchpoint);
-		if (touchpointPhaseParameters == null) {
-			touchpointPhaseParameters = new HashMap(phaseParameters);
-			IStatus status = touchpoint.initializePhase(monitor, profile, phaseId, touchpointPhaseParameters);
-			if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
-				return status;
-			touchpointToTouchpointPhaseParameters.put(touchpoint, touchpointPhaseParameters);
-		}
-
-		Map touchpointOperandParameters = new HashMap(touchpointPhaseParameters);
-		touchpointOperandParameters.putAll(operandParameters);
-		IStatus status = touchpoint.initializeOperand(profile, operand, touchpointOperandParameters);
-		if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
-			return status;
-		touchpointToTouchpointOperandParameters.put(touchpoint, touchpointOperandParameters);
-		return Status.OK_STATUS;
-	}
-
-	/**
-	 * Merges a given IStatus into a MultiStatus
-	 */
-	protected static void mergeStatus(MultiStatus multi, IStatus status) {
-		if (status != null && !status.isOK())
-			multi.merge(status);
-	}
-
-	void postPerform(MultiStatus status, IProfile profile, ProvisioningContext context, IProgressMonitor monitor) {
-		mergeStatus(status, touchpointCompletePhase(monitor, profile, phaseParameters));
-		mergeStatus(status, completePhase(monitor, profile, phaseParameters));
-	}
-
-	void undo(MultiStatus status, EngineSession session, IProfile profile, Operand operand, ProvisioningAction[] actions, ProvisioningContext context) {
-		if (operandParameters == null) {
-			operandParameters = new HashMap(phaseParameters);
-			operandParameters.put(PARM_OPERAND, operand);
-			mergeStatus(status, initializeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
-			operandParameters = Collections.unmodifiableMap(operandParameters);
-		}
-		for (int j = 0; j < actions.length; j++) {
-			ProvisioningAction action = actions[j];
-			Map parameters = operandParameters;
-			Touchpoint touchpoint = action.getTouchpoint();
-			if (touchpoint != null) {
-				mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, new NullProgressMonitor()));
-				if (status.matches(IStatus.ERROR))
-					return;
-
-				parameters = (Map) touchpointToTouchpointOperandParameters.get(touchpoint);
-			}
-			IStatus actionStatus = null;
-			try {
-				session.recordActionUndo(action, parameters);
-				actionStatus = action.undo(parameters);
-			} catch (RuntimeException e) {
-				// "action.undo" calls user code and might throw an unchecked exception
-				// we catch the error here to gather information on where the problem occurred.
-				actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
-			} catch (LinkageError e) {
-				// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-				actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
-			}
-			if (actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
-				MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
-				result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
-				result.merge(actionStatus);
-			}
-		}
-		mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, new NullProgressMonitor()));
-		mergeStatus(status, completeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
-		operandParameters = null;
-	}
-
-	public boolean isApplicable(Operand operand) {
-		return true;
-	}
-
-	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		return Status.OK_STATUS;
-	}
-
-	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		return Status.OK_STATUS;
-	}
-
-	IStatus touchpointCompletePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		if (touchpointToTouchpointPhaseParameters.isEmpty())
-			return Status.OK_STATUS;
-
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		for (Iterator it = touchpointToTouchpointPhaseParameters.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			Touchpoint touchpoint = (Touchpoint) entry.getKey();
-			Map touchpointParameters = (Map) entry.getValue();
-			mergeStatus(status, touchpoint.completePhase(monitor, profile, phaseId, touchpointParameters));
-		}
-		touchpointToTouchpointPhaseParameters.clear();
-		return status;
-	}
-
-	protected IStatus completeOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
-		return Status.OK_STATUS;
-	}
-
-	IStatus touchpointCompleteOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
-		if (touchpointToTouchpointOperandParameters.isEmpty())
-			return Status.OK_STATUS;
-
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		for (Iterator it = touchpointToTouchpointOperandParameters.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			Touchpoint touchpoint = (Touchpoint) entry.getKey();
-			Map touchpointParameters = (Map) entry.getValue();
-			mergeStatus(status, touchpoint.completeOperand(profile, operand, touchpointParameters));
-		}
-		touchpointToTouchpointOperandParameters.clear();
-		return status;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, Operand operand, Map parameters, IProgressMonitor monitor) {
-		return Status.OK_STATUS;
-	}
-
-	protected abstract ProvisioningAction[] getActions(Operand operand);
-
-	/**
-	 * Returns a human-readable message to be displayed in case of an error performing
-	 * this phase. Subclasses should override.
-	 */
-	protected String getProblemMessage() {
-		return NLS.bind(Messages.phase_error, getClass().getName());
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PhaseSet.java
deleted file mode 100644
index 2c24a2f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PhaseSet.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.ActionManager;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class PhaseSet {
-	private final Phase[] phases;
-
-	public PhaseSet(Phase[] phases) {
-		if (phases == null)
-			throw new IllegalArgumentException(Messages.null_phases);
-
-		this.phases = phases;
-	}
-
-	public final MultiStatus perform(ActionManager actionManager, EngineSession session, IProfile profile, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-		int[] weights = getProgressWeights(operands);
-		int totalWork = getTotalWork(weights);
-		SubMonitor pm = SubMonitor.convert(monitor, totalWork);
-		try {
-			for (int i = 0; i < phases.length; i++) {
-				if (pm.isCanceled()) {
-					status.add(Status.CANCEL_STATUS);
-					return status;
-				}
-				Phase phase = phases[i];
-				phase.actionManager = actionManager;
-				try {
-					phase.perform(status, session, profile, operands, context, pm.newChild(weights[i]));
-				} catch (OperationCanceledException e) {
-					// propagate operation cancellation
-					status.add(new Status(IStatus.CANCEL, EngineActivator.ID, e.getMessage(), e));
-				} catch (RuntimeException e) {
-					// "perform" calls user code and might throw an unchecked exception
-					// we catch the error here to gather information on where the problem occurred.
-					status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
-				} catch (LinkageError e) {
-					// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-					status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
-				} finally {
-					phase.actionManager = null;
-				}
-				if (status.matches(IStatus.CANCEL)) {
-					MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.CANCEL, Messages.Engine_Operation_Canceled_By_User, null);
-					result.merge(status);
-					return result;
-				} else if (status.matches(IStatus.ERROR)) {
-					MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, phase.getProblemMessage(), null);
-					result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(), null));
-					result.merge(status);
-					return result;
-				}
-			}
-		} finally {
-			pm.done();
-		}
-		return status;
-	}
-
-	public final IStatus validate(ActionManager actionManager, IProfile profile, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
-		Set missingActions = new HashSet();
-		for (int i = 0; i < phases.length; i++) {
-			Phase phase = phases[i];
-			phase.actionManager = actionManager;
-			try {
-				for (int j = 0; j < operands.length; j++) {
-					Operand operand = operands[j];
-					try {
-						if (!phase.isApplicable(operand))
-							continue;
-
-						ProvisioningAction[] actions = phase.getActions(operand);
-						if (actions == null)
-							continue;
-						for (int k = 0; k < actions.length; k++) {
-							ProvisioningAction action = actions[k];
-							if (action instanceof MissingAction)
-								missingActions.add(action);
-						}
-					} catch (RuntimeException e) {
-						// "perform" calls user code and might throw an unchecked exception
-						// we catch the error here to gather information on where the problem occurred.
-						return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
-					} catch (LinkageError e) {
-						// Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
-						return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
-					}
-				}
-			} finally {
-				phase.actionManager = null;
-			}
-		}
-		if (!missingActions.isEmpty()) {
-			MissingAction[] missingActionsArray = (MissingAction[]) missingActions.toArray(new MissingAction[missingActions.size()]);
-			MissingActionsException exception = new MissingActionsException(missingActionsArray);
-			return (new Status(IStatus.ERROR, EngineActivator.ID, exception.getMessage(), exception));
-		}
-		return Status.OK_STATUS;
-	}
-
-	private String getContextString(IProfile profile, Phase phase, Operand operand) {
-		return NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), ""}); //$NON-NLS-1$
-	}
-
-	private int getTotalWork(int[] weights) {
-		int sum = 0;
-		for (int i = 0; i < weights.length; i++)
-			sum += weights[i];
-		return sum;
-	}
-
-	private int[] getProgressWeights(Operand[] operands) {
-		int[] weights = new int[phases.length];
-		for (int i = 0; i < phases.length; i += 1) {
-			if (operands.length > 0)
-				//alter weights according to the number of operands applicable to that phase
-				weights[i] = (phases[i].weight * countApplicable(phases[i], operands) / operands.length);
-			else
-				weights[i] = phases[i].weight;
-		}
-		return weights;
-	}
-
-	private int countApplicable(Phase phase, Operand[] operands) {
-		int count = 0;
-		for (int i = 0; i < operands.length; i++) {
-			if (phase.isApplicable(operands[i]))
-				count++;
-		}
-		return count;
-	}
-
-	public Phase[] getPhases() {
-		return phases;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileEvent.java
deleted file mode 100644
index d96796f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileEvent.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.EventObject;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class ProfileEvent extends EventObject {
-	private static final long serialVersionUID = 3082402920617281765L;
-
-	public static final byte ADDED = 0;
-	public static final byte REMOVED = 1;
-	public static final byte CHANGED = 2;
-
-	private byte reason;
-
-	public ProfileEvent(String profileId, byte reason) {
-		super(profileId);
-		this.reason = reason;
-	}
-
-	public byte getReason() {
-		return reason;
-	}
-
-	public String getProfileId() {
-		return (String) getSource();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileScope.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileScope.java
deleted file mode 100644
index 70d72d6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProfileScope.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.internal.preferences.PreferencesService;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-
-public final class ProfileScope implements IScopeContext {
-
-	/*
-	 * String constant (value of <code>"profile"</code>) used for the 
-	 * scope name for this preference scope.
-	 */
-	public static final String SCOPE = "profile"; //$NON-NLS-1$
-
-	private String profileId;
-
-	/*
-	 * Create and return a new profile scope for the given profile. The given
-	 * profile must not be null.
-	 */
-	public ProfileScope(String profileId) {
-		super();
-		if (profileId == null)
-			throw new IllegalArgumentException();
-		this.profileId = profileId;
-	}
-
-	public IPath getLocation() {
-		// Null returned as the location should only be used when the profile is locked
-		return null;
-	}
-
-	public String getName() {
-		return SCOPE;
-	}
-
-	/*
-	 * Default path hierarchy for profile nodes is /profile/<profileId>/<qualifier>.
-	 * 
-	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
-	 */
-	public IEclipsePreferences getNode(String qualifier) {
-		if (qualifier == null)
-			throw new IllegalArgumentException();
-		return (IEclipsePreferences) PreferencesService.getDefault().getRootNode().node(getName()).node(profileId).node(qualifier);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (!super.equals(obj))
-			return false;
-		if (!(obj instanceof ProfileScope))
-			return false;
-		ProfileScope other = (ProfileScope) obj;
-		return profileId.equals(other.profileId);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return super.hashCode() + profileId.hashCode();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PropertyOperand.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PropertyOperand.java
deleted file mode 100644
index 24c536e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/PropertyOperand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-
-public class PropertyOperand extends Operand {
-	private final Object first;
-	private final Object second;
-	private final String key;
-
-	/**
-	 * Creates a new operand that represents replacing a property value
-	 * with another.  At least one of the provided property values must be
-	 * non-null.
-	 * 
-	 * @param key The key of the property being modified
-	 * @param first The property value being removed, or <code>null</code>
-	 * @param second The property value being added, or <code>null</code>
-	 */
-	public PropertyOperand(String key, Object first, Object second) {
-		//the operand must specify have a key and have at least one non-null value
-		Assert.isTrue(key != null && (first != null || second != null));
-		this.first = first;
-		this.second = second;
-		this.key = key;
-	}
-
-	public Object first() {
-		return first;
-	}
-
-	public Object second() {
-		return second;
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public String toString() {
-		return key + " = " + first + " --> " + second; //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningAction.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningAction.java
deleted file mode 100644
index dc1b052..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-
-public abstract class ProvisioningAction {
-
-	private Memento memento = new Memento();
-	private Touchpoint touchpoint;
-
-	protected Memento getMemento() {
-		return memento;
-	}
-
-	public abstract IStatus execute(Map parameters);
-
-	public abstract IStatus undo(Map parameters);
-
-	// TODO: these probably should not be visible
-	public void setTouchpoint(Touchpoint touchpoint) {
-		this.touchpoint = touchpoint;
-	}
-
-	public Touchpoint getTouchpoint() {
-		return touchpoint;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningContext.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningContext.java
deleted file mode 100644
index 5e021c3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/ProvisioningContext.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- * 	IBM Corporation - initial API and implementation
- *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.net.URI;
-import java.util.*;
-
-public class ProvisioningContext {
-	private URI[] metadataRepositories; //metadata repositories to consult
-	private URI[] artifactRepositories; //artifact repositories to consult
-	private Properties properties = new Properties();
-	private List extraIUs = new ArrayList();
-	private Collection additionalRequirements;
-
-	public ProvisioningContext() {
-		// null repos means look at them all
-		metadataRepositories = null;
-		artifactRepositories = null;
-	}
-
-	public ProvisioningContext(URI[] metadataRepositories) {
-		this.metadataRepositories = metadataRepositories;
-	}
-
-	/**
-	 * Artifact repositories to consult when performing an operation.
-	 * @param artifactRepositories array of URLs
-	*/
-	public void setArtifactRepositories(URI[] artifactRepositories) {
-		this.artifactRepositories = artifactRepositories;
-	}
-
-	public URI[] getMetadataRepositories() {
-		return metadataRepositories;
-	}
-
-	public URI[] getArtifactRepositories() {
-		return artifactRepositories;
-	}
-
-	public String getProperty(String key) {
-		return properties.getProperty(key);
-	}
-
-	public void setProperty(String key, String value) {
-		properties.setProperty(key, value);
-	}
-
-	public Properties getProperties() {
-		return properties;
-	}
-
-	public List getExtraIUs() {
-		return extraIUs;
-	}
-
-	public void setExtraIUs(List extraIUs) {
-		this.extraIUs = extraIUs;
-	}
-
-	public void setAdditionalRequirements(Collection requirements) {
-		additionalRequirements = requirements;
-	}
-
-	public Collection getAdditionalRequirements() {
-		return additionalRequirements;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/RollbackOperationEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/RollbackOperationEvent.java
deleted file mode 100644
index 4d0032c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/RollbackOperationEvent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import org.eclipse.core.runtime.IStatus;
-
-public class RollbackOperationEvent extends TransactionEvent {
-
-	private static final long serialVersionUID = -2076492953949691215L;
-	private IStatus cause;
-
-	public RollbackOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine, IStatus cause) {
-		super(profile, phaseSet, operands, engine);
-		this.cause = cause;
-	}
-
-	public IStatus getStatus() {
-		return cause;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Touchpoint.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Touchpoint.java
deleted file mode 100644
index 4cc43fb..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/Touchpoint.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-
-/**
- * A touchpoint is responsible for executing a given phase for a given 
- * targeted system (eclipse, native). The order of phases is defined in the {@link PhaseSet}.  
- */
-public abstract class Touchpoint {
-
-	/** NOT API -- this is for backwards compatibility only */
-	public String qualifyAction(String actionId) {
-		return actionId;
-	}
-
-	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus initializeOperand(IProfile profile, Operand operand, Map parameters) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus completeOperand(IProfile profile, Operand operand, Map parameters) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus prepare(IProfile profile) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus commit(IProfile profile) {
-		return Status.OK_STATUS;
-	}
-
-	public IStatus rollback(IProfile profile) {
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/TransactionEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/TransactionEvent.java
deleted file mode 100644
index efb574f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/TransactionEvent.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine;
-
-import java.util.EventObject;
-
-public abstract class TransactionEvent extends EventObject {
-	private static final long serialVersionUID = 6278706971855493984L;
-	protected IProfile profile;
-	protected PhaseSet phaseSet;
-	protected Operand[] operands;
-
-	public TransactionEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
-		super(engine);
-		this.profile = profile;
-		this.phaseSet = phaseSet;
-		this.operands = operands;
-	}
-
-	public IProfile getProfile() {
-		return profile;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/messages.properties
deleted file mode 100644
index 364307a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/messages.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-###############################################################################
-#  Copyright (c) 2007, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-action_not_found=No action found for: {0}.
-action_undo_error=An error occurred while rolling back the engine operation while undoing the {0} action.
-forced_action_execute_error=An error occurred while performing the engine operation while executing the {0} action in forced mode. The operation will continue.
-actions_not_found=No actions found for: {0}.
-not_current_phase=Current phase does not match argument.
-null_operands=Operands must not be null.
-null_phase=Phase must not be null.
-null_phases=Phases must not be null
-null_phaseset=PhaseSet must not be null.
-null_profile=Profile must not be null.
-touchpoint_prepare_error=An error occurred while preparing the engine operation for the {0} touchpoint.
-touchpoint_commit_error=An error occurred while committing the engine operation for the {0} touchpoint.
-touchpoint_rollback_error=An error occurred while rolling back the engine operation for the {0} touchpoint.
-phase_error=An error occurred during the {0} phase.
-phase_undo_error=An error occurred while undoing the {0} phase.
-phase_undo_operand_error=An error occurred while undoing the {0} phase for operand {1}.
-phase_not_started=There is no phase to end.
-phase_started=A phase is already started.
-phaseid_not_positive=Phase weight must be positive.
-phaseid_not_set=Phase id must be set.
-session_prepare_error=An error occurred while preparing the engine session for profile: {0}.
-session_commit_error=An error occurred while committing the engine session for profile: {0}.
-null_operand=Operand must not be null.
-operand_started=An operand is already started.
-operand_not_started=There is no operand to end.
-not_current_operand=Current operand does not match argument.
-null_action=Action must not be null
-session_context=session context was:(profile={0}, phase={1}, operand={2}, action={3}).
-preparing=Preparing to commit the provisioning operation.
-committing=Committing the provisioning operation.
-rollingback_error=An error was detected while performing the engine operation and the changes are being rolled back. See the log for details.
-rollingback_cancel=The engine operation was cancelled and the changes are being rolled back.
-
-Engine_Operation_Canceled_By_User=Operation canceled by the user.
-InstallableUnitEvent_type_not_install_or_uninstall=type must be either UNINSTALL(0) or INSTALL(1)
-CertificateChecker_CertificateError=An invalid certificate was found.
-CertificateChecker_CertificateRejected=One or more certificates rejected. Cannot proceed with installation.
-CertificateChecker_KeystoreConnectionError=Cannot connect to keystore.
-CertificateChecker_SignedContentError=Error with signed content.
-CertificateChecker_SignedContentIOError=Error reading signed content.
-CertificateChecker_UnsignedNotAllowed=Installing unsigned artifacts is not permitted: {0}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/CheckTrust.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/CheckTrust.java
deleted file mode 100644
index 28445c3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/CheckTrust.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
-
-/**
- * An install phase that checks if the certificates used to sign the artifacts
- * being installed are from a trusted source.
- */
-public class CheckTrust extends InstallableUnitPhase {
-
-	private static final String PHASE_ID = "checkTrust"; //$NON-NLS-1$
-	public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
-
-	public CheckTrust(int weight) {
-		super(PHASE_ID, weight);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.second() != null);
-	}
-
-	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		Collection artifactRequests = (Collection) parameters.get(PARM_ARTIFACT_FILES);
-
-		// Instantiate a check trust manager
-		CertificateChecker certificateChecker = new CertificateChecker();
-		certificateChecker.add(artifactRequests.toArray());
-		IStatus status = certificateChecker.start();
-
-		return status;
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand operand) {
-		IInstallableUnit unit = operand.second();
-		ProvisioningAction[] parsedActions = getActions(unit, phaseId);
-		if (parsedActions != null)
-			return parsedActions;
-
-		ITouchpointType type = unit.getTouchpointType();
-		if (type == null || type == ITouchpointType.NONE)
-			return null;
-
-		String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
-		ProvisioningAction action = getActionManager().getAction(actionId, null);
-		if (action == null) {
-			return null;
-		}
-		return new ProvisioningAction[] {action};
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		IInstallableUnit iu = operand.second();
-		parameters.put(PARM_IU, iu);
-
-		return super.initializeOperand(profile, operand, parameters, monitor);
-	}
-
-	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		parameters.put(PARM_ARTIFACT_FILES, new ArrayList());
-		return super.initializePhase(monitor, profile, parameters);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Collect.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Collect.java
deleted file mode 100644
index c0fc59c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Collect.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.engine.DownloadManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
-
-/**
- * The goal of the collect phase is to ask the touchpoints if the artifacts associated with an IU need to be downloaded.
- */
-public class Collect extends InstallableUnitPhase {
-	private static final String PHASE_ID = "collect"; //$NON-NLS-1$
-	public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
-
-	public Collect(int weight) {
-		super(PHASE_ID, weight);
-		//re-balance work since postPerform will do almost all the time-consuming work
-		prePerformWork = 0;
-		mainPerformWork = 100;
-		postPerformWork = 1000;
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.second() != null && !op.second().equals(op.first()));
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand operand) {
-		IInstallableUnit unit = operand.second();
-		ProvisioningAction[] parsedActions = getActions(unit, phaseId);
-		if (parsedActions != null)
-			return parsedActions;
-
-		ITouchpointType type = unit.getTouchpointType();
-		if (type == null || type == ITouchpointType.NONE)
-			return null;
-
-		String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
-		ProvisioningAction action = getActionManager().getAction(actionId, null);
-		if (action == null) {
-			return null;
-		}
-		return new ProvisioningAction[] {action};
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Collect_Error;
-	}
-
-	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		List artifactRequests = (List) parameters.get(PARM_ARTIFACT_REQUESTS);
-		ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
-
-		DownloadManager dm = new DownloadManager(context);
-		for (Iterator it = artifactRequests.iterator(); it.hasNext();) {
-			IArtifactRequest[] requests = (IArtifactRequest[]) it.next();
-			dm.add(requests);
-		}
-		return dm.start(monitor);
-	}
-
-	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		parameters.put(PARM_ARTIFACT_REQUESTS, new ArrayList());
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Configure.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Configure.java
deleted file mode 100644
index 78e7f25..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Configure.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class Configure extends InstallableUnitPhase {
-
-	public Configure(int weight) {
-		super("configure", weight); //$NON-NLS-1$
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.second() != null);
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand currentOperand) {
-		IInstallableUnit unit = currentOperand.second();
-		if (unit.isFragment())
-			return null;
-		return getActions(unit, phaseId);
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Configure_Error;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		IInstallableUnit iu = operand.second();
-		monitor.subTask(NLS.bind(Messages.Phase_Configure_Task, iu.getId()));
-		parameters.put(PARM_IU, iu);
-
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts != null && artifacts.length > 0)
-			parameters.put(PARM_ARTIFACT, artifacts[0]);
-
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Install.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Install.java
deleted file mode 100644
index e0e9c0f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Install.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class Install extends InstallableUnitPhase {
-
-	final static class BeforeInstallEventAction extends ProvisioningAction {
-
-		public IStatus execute(Map parameters) {
-			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
-			profile.removeInstallableUnit(iu);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
-			return null;
-		}
-	}
-
-	final static class AfterInstallEventAction extends ProvisioningAction {
-
-		public IStatus execute(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
-			profile.addInstallableUnit(iu);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
-			return null;
-		}
-	}
-
-	private static final String PHASE_ID = "install"; //$NON-NLS-1$
-
-	public Install(int weight) {
-		super(PHASE_ID, weight);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.second() != null && !op.second().equals(op.first()));
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand currentOperand) {
-		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Installing_IU, unit.getId()));
-
-		ProvisioningAction beforeAction = new BeforeInstallEventAction();
-		ProvisioningAction afterAction = new AfterInstallEventAction();
-
-		IInstallableUnit unit = currentOperand.second();
-		Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
-		if (touchpoint != null) {
-			beforeAction.setTouchpoint(touchpoint);
-			afterAction.setTouchpoint(touchpoint);
-		}
-
-		if (unit.isFragment())
-			return new ProvisioningAction[] {beforeAction, afterAction};
-
-		ProvisioningAction[] parsedActions = getActions(unit, phaseId);
-		if (parsedActions == null)
-			return new ProvisioningAction[] {beforeAction, afterAction};
-
-		ProvisioningAction[] actions = new ProvisioningAction[parsedActions.length + 2];
-		actions[0] = beforeAction;
-		System.arraycopy(parsedActions, 0, actions, 1, parsedActions.length);
-		actions[actions.length - 1] = afterAction;
-		return actions;
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Install_Error;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		IInstallableUnit iu = operand.second();
-		monitor.subTask(NLS.bind(Messages.Phase_Install_Task, iu.getId()));
-		parameters.put(PARM_IU, iu);
-
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts != null && artifacts.length > 0)
-			parameters.put(PARM_ARTIFACT, artifacts[0]);
-
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Messages.java
deleted file mode 100644
index 081b6f2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Messages.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import org.eclipse.osgi.util.NLS;
-
-//TODO Shouldn't have messages class in API package
-class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.engine.phases.messages"; //$NON-NLS-1$
-	public static String Phase_Collect_Error;
-	public static String Phase_Install_Error;
-	public static String Phase_Configure_Error;
-	public static String Phase_Configure_Task;
-	public static String Phase_Install_Task;
-	public static String Phase_Sizing_Error;
-	public static String Phase_Sizing_Warning;
-	public static String Phase_Unconfigure_Error;
-	public static String Phase_Uninstall_Error;
-
-	static {
-		// initialize resource bundles
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// Do not instantiate
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Property.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Property.java
deleted file mode 100644
index 7a23871..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Property.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class Property extends Phase {
-
-	public class ProfilePropertyAction extends ProvisioningAction {
-
-		public IStatus execute(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
-
-			if (propertyOperand.second() == null)
-				removeProfileProperty(profile, propertyOperand);
-			else
-				setProfileProperty(profile, propertyOperand, false);
-
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
-
-			if (propertyOperand.first() == null)
-				removeProfileProperty(profile, propertyOperand);
-			else
-				setProfileProperty(profile, propertyOperand, true);
-
-			return null;
-		}
-
-		private void setProfileProperty(Profile profile, PropertyOperand propertyOperand, boolean undo) {
-
-			String value = (String) (undo ? propertyOperand.first() : propertyOperand.second());
-
-			if (propertyOperand instanceof InstallableUnitPropertyOperand) {
-				InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
-				profile.setInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey(), value);
-			} else {
-				profile.setProperty(propertyOperand.getKey(), value);
-			}
-		}
-
-		private void removeProfileProperty(Profile profile, PropertyOperand propertyOperand) {
-			if (propertyOperand instanceof InstallableUnitPropertyOperand) {
-				InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
-				profile.removeInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey());
-			} else {
-				profile.removeProperty(propertyOperand.getKey());
-			}
-		}
-	}
-
-	public class UpdateInstallableUnitProfilePropertiesAction extends ProvisioningAction {
-
-		// we do not need to use a memento here since the profile is not persisted unless the operation is successful
-		Map originalSourceProperties;
-		Map originalTargetProperties;
-
-		public IStatus execute(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
-			IInstallableUnit source = iuOperand.first();
-			originalSourceProperties = profile.getInstallableUnitProperties(source);
-
-			IInstallableUnit target = iuOperand.second();
-			originalTargetProperties = profile.getInstallableUnitProperties(target);
-
-			profile.addInstallableUnitProperties(target, originalSourceProperties);
-			profile.clearInstallableUnitProperties(source);
-
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
-			IInstallableUnit source = iuOperand.first();
-			profile.clearInstallableUnitProperties(source);
-			profile.addInstallableUnitProperties(source, originalSourceProperties);
-
-			IInstallableUnit target = iuOperand.second();
-			profile.clearInstallableUnitProperties(target);
-			profile.addInstallableUnitProperties(target, originalTargetProperties);
-
-			return null;
-		}
-	}
-
-	public class RemoveInstallableUnitProfilePropertiesAction extends ProvisioningAction {
-
-		// we do not need to use a memento here since the profile is not persisted unless the operation is successful
-		Map originalSourceProperties;
-		Map originalTargetProperties;
-
-		public IStatus execute(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
-			IInstallableUnit source = iuOperand.first();
-			originalSourceProperties = profile.getInstallableUnitProperties(source);
-			profile.clearInstallableUnitProperties(source);
-
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
-			IInstallableUnit source = iuOperand.first();
-			profile.clearInstallableUnitProperties(source);
-			profile.addInstallableUnitProperties(source, originalSourceProperties);
-
-			return null;
-		}
-	}
-
-	private static final String PHASE_ID = "property"; //$NON-NLS-1$
-
-	public Property(int weight) {
-		super(PHASE_ID, weight);
-	}
-
-	protected ProvisioningAction[] getActions(Operand operand) {
-		if (operand instanceof PropertyOperand)
-			return new ProvisioningAction[] {new ProfilePropertyAction()};
-
-		if (operand instanceof InstallableUnitOperand) {
-			InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-			if (iuOperand.first() != null) {
-				if (iuOperand.second() != null) {
-					return new ProvisioningAction[] {new UpdateInstallableUnitProfilePropertiesAction()};
-				}
-				return new ProvisioningAction[] {new RemoveInstallableUnitProfilePropertiesAction()};
-			}
-		}
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java
deleted file mode 100644
index 1145fb7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Sizing.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-public class Sizing extends InstallableUnitPhase {
-	private static final String PHASE_ID = "sizing"; //$NON-NLS-1$
-	private static final String COLLECT_PHASE_ID = "collect"; //$NON-NLS-1$
-
-	private long sizeOnDisk;
-	private long dlSize;
-
-	public Sizing(int weight, String phaseName) {
-		super(PHASE_ID, weight);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.second() != null && !op.second().equals(op.first()));
-	}
-
-	public long getDiskSize() {
-		return sizeOnDisk;
-	}
-
-	public long getDlSize() {
-		return dlSize;
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand operand) {
-		IInstallableUnit unit = operand.second();
-		ProvisioningAction[] parsedActions = getActions(unit, COLLECT_PHASE_ID);
-		if (parsedActions != null)
-			return parsedActions;
-
-		ITouchpointType type = unit.getTouchpointType();
-		if (type == null || type == ITouchpointType.NONE)
-			return null;
-
-		String actionId = getActionManager().getTouchpointQualifiedActionId(COLLECT_PHASE_ID, type);
-		ProvisioningAction action = getActionManager().getAction(actionId, null);
-		if (action == null) {
-			return null;
-		}
-		return new ProvisioningAction[] {action};
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Sizing_Error;
-	}
-
-	protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		List artifactRequests = (List) parameters.get(Collect.PARM_ARTIFACT_REQUESTS);
-		ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
-		int statusCode = 0;
-
-		Set artifactsToObtain = new HashSet(artifactRequests.size());
-
-		for (Iterator it = artifactRequests.iterator(); it.hasNext();) {
-			IArtifactRequest[] requests = (IArtifactRequest[]) it.next();
-			if (requests == null)
-				continue;
-			for (int i = 0; i < requests.length; i++) {
-				artifactsToObtain.add(requests[i]);
-			}
-		}
-
-		if (monitor.isCanceled())
-			return Status.CANCEL_STATUS;
-
-		IArtifactRepositoryManager repoMgr = (IArtifactRepositoryManager) ServiceHelper.getService(EngineActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		URI[] repositories = null;
-		if (context == null || context.getArtifactRepositories() == null)
-			repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
-		else
-			repositories = context.getArtifactRepositories();
-
-		for (Iterator iterator = artifactsToObtain.iterator(); iterator.hasNext() && !monitor.isCanceled();) {
-			IArtifactRequest artifactRequest = (IArtifactRequest) iterator.next();
-			boolean found = false;
-			for (int i = 0; i < repositories.length; i++) {
-				IArtifactRepository repo;
-				try {
-					repo = repoMgr.loadRepository(repositories[i], monitor);
-				} catch (ProvisionException e) {
-					continue;//skip unresponsive repositories
-				}
-				if (monitor.isCanceled())
-					return Status.CANCEL_STATUS;
-				IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(artifactRequest.getArtifactKey());
-				if (descriptors.length > 0) {
-					if (descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE) != null)
-						sizeOnDisk += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
-					else
-						statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
-					if (descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE) != null)
-						dlSize += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE));
-					else
-						statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
-					found = true;
-					break;
-				}
-			}
-			if (!found)
-				// The artifact wasn't present in any repository
-				return new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.ARTIFACT_NOT_FOUND, Messages.Phase_Sizing_Error, null);
-		}
-		if (statusCode != 0)
-			return new Status(IStatus.WARNING, EngineActivator.ID, statusCode, Messages.Phase_Sizing_Warning, null);
-		return null;
-	}
-
-	protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-		parameters.put(Collect.PARM_ARTIFACT_REQUESTS, new ArrayList());
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Unconfigure.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Unconfigure.java
deleted file mode 100644
index 2eb8eb4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Unconfigure.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class Unconfigure extends InstallableUnitPhase {
-
-	public Unconfigure(int weight, boolean forced) {
-		super("unconfigure", weight, forced); //$NON-NLS-1$
-	}
-
-	public Unconfigure(int weight) {
-		this(weight, false);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.first() != null);
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand currentOperand) {
-		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Unconfiguring_IU, unit.getId()));
-
-		IInstallableUnit unit = currentOperand.first();
-		if (unit.isFragment())
-			return null;
-
-		return getActions(unit, phaseId);
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Unconfigure_Error;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		IInstallableUnit iu = operand.first();
-		parameters.put(PARM_IU, iu);
-
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts != null && artifacts.length > 0)
-			parameters.put(PARM_ARTIFACT, artifacts[0]);
-
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Uninstall.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Uninstall.java
deleted file mode 100644
index 5b66522..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/Uninstall.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.engine.phases;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-public class Uninstall extends InstallableUnitPhase {
-
-	final static class BeforeUninstallEventAction extends ProvisioningAction {
-		public IStatus execute(Map parameters) {
-			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
-			profile.addInstallableUnit(iu);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
-			return null;
-		}
-	}
-
-	final static class AfterUninstallEventAction extends ProvisioningAction {
-		public IStatus execute(Map parameters) {
-			Profile profile = (Profile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
-			profile.removeInstallableUnit(iu);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, operand, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
-			return null;
-		}
-
-		public IStatus undo(Map parameters) {
-			IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
-			String phaseId = (String) parameters.get(PARM_PHASE_ID);
-			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-			((IProvisioningEventBus) ServiceHelper.getService(EngineActivator.getContext(), IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, operand, InstallableUnitEvent.INSTALL, getTouchpoint()));
-			return null;
-		}
-	}
-
-	private static final String PHASE_ID = "uninstall"; //$NON-NLS-1$
-
-	public Uninstall(int weight, boolean forced) {
-		super(PHASE_ID, weight, forced);
-	}
-
-	public Uninstall(int weight) {
-		this(weight, false);
-	}
-
-	protected boolean isApplicable(InstallableUnitOperand op) {
-		return (op.first() != null && !op.first().equals(op.second()));
-	}
-
-	protected ProvisioningAction[] getActions(InstallableUnitOperand currentOperand) {
-		//TODO: monitor.subTask(NLS.bind(Messages.Engine_Uninstalling_IU, unit.getId()));
-
-		ProvisioningAction beforeAction = new BeforeUninstallEventAction();
-		ProvisioningAction afterAction = new AfterUninstallEventAction();
-
-		IInstallableUnit unit = currentOperand.first();
-		Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
-		if (touchpoint != null) {
-			beforeAction.setTouchpoint(touchpoint);
-			afterAction.setTouchpoint(touchpoint);
-		}
-
-		if (unit.isFragment())
-			return new ProvisioningAction[] {beforeAction, afterAction};
-		ProvisioningAction[] parsedActions = getActions(unit, phaseId);
-		if (parsedActions == null)
-			return new ProvisioningAction[] {beforeAction, afterAction};
-
-		ProvisioningAction[] actions = new ProvisioningAction[parsedActions.length + 2];
-		actions[0] = beforeAction;
-		System.arraycopy(parsedActions, 0, actions, 1, parsedActions.length);
-		actions[actions.length - 1] = afterAction;
-		return actions;
-	}
-
-	protected String getProblemMessage() {
-		return Messages.Phase_Uninstall_Error;
-	}
-
-	protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map parameters, IProgressMonitor monitor) {
-		IInstallableUnit iu = operand.first();
-		parameters.put(PARM_IU, iu);
-
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts != null && artifacts.length > 0)
-			parameters.put(PARM_ARTIFACT, artifacts[0]);
-
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/messages.properties
deleted file mode 100644
index 58a0dd1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/provisional/p2/engine/phases/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-#  Copyright (c) 2007, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-Phase_Collect_Error=An error occurred while collecting items to be installed
-Phase_Configure_Error=An error occurred while configuring the installed items
-Phase_Configure_Task=Configuring {0}
-Phase_Install_Error=An error occurred while installing the items
-Phase_Install_Task=Installing {0}
-Phase_Sizing_Error=Error computing the size.  Some of the items to be installed could not be found.
-Phase_Sizing_Warning=The size may not be accurate.  Some of the items did not report a size.
-Phase_Unconfigure_Error=An error occurred while unconfiguring the items to uninstall
-Phase_Uninstall_Error=An error occurred while uninstalling
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
new file mode 100644
index 0000000..fd626d3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Band XI International, LLC and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Band XI - initial API and implementation
+ *   IBM - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * The engine is a service that naively performs a set of requested changes to a provisioned
+ * system. No attempt is made to determine whether the requested changes or the
+ * resulting system are valid or consistent. It is assumed that the engine client has
+ * crafted a valid provisioning plan for the engine to perform, typically by using a planner
+ * service.
+ * <p>
+ * The engine operates by executing a series of installation phases. The client can
+ * customize the set of phases that are executed, or else the engine will execute
+ * a default set of phases. During each phase the changes described by the provisioning
+ * plan are performed against the profile being provisioned.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IEngine {
+	/**
+	 * Service name constant for the engine service.
+	 */
+	public static final String SERVICE_NAME = IEngine.class.getName();
+
+	/**
+	 * Creates a provisioning plan whose methods can be use to provide pre-validated changes.
+	 * This is an advanced method for clients that know they are creating changes that do
+	 * not require validation by a planner. Most clients should instead obtain a validated plan
+	 * from a planner.
+	 * 
+	 * @param profile The profile to operate against
+	 * @param context The provisioning context for the plan
+	 * @return A provisioning plan
+	 */
+
+	public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context);
+
+	/**
+	 * Executes a provisioning plan.
+	 * 
+	 * @param plan The plan describing the changes to be made
+	 * @param phaseSet The phases to run, or <code>null</code> to run default phases
+	 * @param monitor A progress monitor, or <code>null</code> if progress reporting is not required
+	 * @return The result of executing the plan
+	 */
+	public IStatus perform(IProvisioningPlan plan, IPhaseSet phaseSet, IProgressMonitor monitor);
+
+	/**
+	 * Executes a provisioning plan with a default phase set and context.
+	 * 
+	 * @param plan The plan describing the changes to be made
+	 * @param monitor A progress monitor, or <code>null</code> if progress reporting is not required
+	 * @return The result of executing the plan
+	 */
+	public IStatus perform(IProvisioningPlan plan, IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java
new file mode 100644
index 0000000..0d315e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+/**
+ * Describes a set of provisioning phases to be performed by an {@link IEngine}.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IPhaseSet {
+
+	/**
+	 * Returns the ids of the phases to be performed by this phase set. The order
+	 * of the returned ids indicates the order in which the phases will be run.
+	 * @return The phase ids.
+	 */
+	public String[] getPhaseIds();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java
new file mode 100644
index 0000000..aded178
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.*;
+
+/**
+ * Represents the state of a profile in a profile registry at a given moment in time.
+ * Note this object contains only a snapshot of a particular profile state, and will
+ * never be updated if subsequent changes are made to this profile. A client should
+ * never retain an {@link IProfile} instance, but rather retain the profile id and obtain
+ * the current state of the profile from the profile registry only when required.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProfile extends IQueryable<IInstallableUnit> {
+
+	/**
+	 * Constant used to indicate that an installable unit is not locked in anyway.
+	 * @see #PROP_PROFILE_LOCKED_IU
+	 */
+	public static int LOCK_NONE = 0;
+	/**
+	 * Constant used to indicate that an installable unit is locked so that it may
+	 * not be uninstalled.
+	 * @see #PROP_PROFILE_LOCKED_IU
+	 */
+	public static int LOCK_UNINSTALL = 1 << 0;
+	/**
+	 * Constant used to indicate that an installable unit is locked so that it may
+	 * not be updated.
+	 * @see #PROP_PROFILE_LOCKED_IU
+	 */
+	public static int LOCK_UPDATE = 1 << 1;
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.type.lock"</code>) for an
+	 * integer property indicating how an installable unit is locked in its profile.
+	 * The integer is a bit-mask indicating the different locks defined on the installable
+	 * unit.  The property should be obtained from a profile using 
+	 * IProfile#getInstallableUnitProperty(IInstallableUnit, String).
+	 * 
+	 * @see #LOCK_UNINSTALL
+	 * @see #LOCK_UPDATE
+	 * @see #LOCK_NONE
+	 */
+	public static final String PROP_PROFILE_LOCKED_IU = "org.eclipse.equinox.p2.type.lock"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.type.root"</code>) for a
+	 * boolean property indicating whether an installable unit should be considered
+	 * a root of the install. Typically this means the unit will appear to the end user
+	 * as a top-level installed item. The property should be obtained from a profile using 
+	 * IProfile#getInstallableUnitProperty(IInstallableUnit, String).
+	 * 
+	 * @see #LOCK_UNINSTALL
+	 * @see #LOCK_UPDATE
+	 * @see #LOCK_NONE
+	 */
+	public static final String PROP_PROFILE_ROOT_IU = "org.eclipse.equinox.p2.type.root"; //$NON-NLS-1$
+
+	/**
+	 * Profile property constant indicating the install folder for the profile.
+	 */
+	public static final String PROP_INSTALL_FOLDER = "org.eclipse.equinox.p2.installFolder"; //$NON-NLS-1$
+	/**
+	 * Profile property constant indicating the configuration folder for the profile.
+	 */
+	public static final String PROP_CONFIGURATION_FOLDER = "org.eclipse.equinox.p2.configurationFolder"; //$NON-NLS-1$
+	/**
+	 * Profile property constant indicating the location of the launcher configuration file for the profile.
+	 */
+	public static final String PROP_LAUNCHER_CONFIGURATION = "org.eclipse.equinox.p2.launcherConfiguration"; //$NON-NLS-1$
+
+	/**
+	 * Profile property constant indicating the installed language(s) for the profile.
+	 */
+	public static final String PROP_NL = "org.eclipse.equinox.p2.nl"; //$NON-NLS-1$
+	/**
+	 * Profile property constant for a string property indicating a user visible short 
+	 * textual description of this profile. May be empty or <code>null</code>, and 
+	 * generally will be for non-top level install contexts.
+	 */
+	public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
+	/**
+	 * Profile property constant for a string property indicating a user visible name of this profile.
+	 * May be empty or <code>null</code>, and generally will be for non-top level
+	 * install contexts.
+	 */
+	public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
+	/**
+	 * Profile property constant indicating the list of environments
+	 * (e.g., OS, WS, ...) in which a profile can operate. The value of the property
+	 * is a comma-delimited string of key/value pairs.
+	 */
+	public static final String PROP_ENVIRONMENTS = "org.eclipse.equinox.p2.environments"; //$NON-NLS-1$
+	/**
+	 * Profile property constant for a boolean property indicating if the profiling
+	 * is roaming.  A roaming profile is one whose physical install location varies
+	 * and is updated whenever it runs.
+	 */
+	public static final String PROP_ROAMING = "org.eclipse.equinox.p2.roaming"; //$NON-NLS-1$
+	/**
+	 * Profile property constant indicating the bundle pool cache location.
+	 */
+	public static final String PROP_CACHE = "org.eclipse.equinox.p2.cache"; //$NON-NLS-1$
+
+	/**
+	 * Profile property constant indicating a shared read-only bundle pool cache location.
+	 */
+	public static final String PROP_SHARED_CACHE = "org.eclipse.equinox.p2.cache.shared"; //$NON-NLS-1$
+
+	/**
+	 * Profile property constant for a boolean property indicating if update features should
+	 * be installed in this profile
+	 */
+	public static final String PROP_INSTALL_FEATURES = "org.eclipse.update.install.features"; //$NON-NLS-1$
+
+	/**
+	 * Returns the provisioning agent that manages this profile
+	 * @return A provisioning agent.
+	 */
+	public IProvisioningAgent getProvisioningAgent();
+
+	/**
+	 * Returns the id of this profile, unique within a given profile registry
+	 * @return the profile id
+	 */
+	public String getProfileId();
+
+	/**
+	 * Returns the profile property associated with the given key,
+	 * or <code>null</code> if this property is not present
+	 * @param key The property kid
+	 * @return the property value, or <code>null</code>
+	 */
+	public String getProperty(String key);
+
+	/**
+	 * Returns the profile property associated with the given installable unit.
+	 * @param iu the installable unit to return the property for
+	 * @param key the property key
+	 * @return the property value, or <code>null</code> if no such property is defined
+	 */
+	public String getInstallableUnitProperty(IInstallableUnit iu, String key);
+
+	/**
+	 * Returns an unmodifiable map of all profile properties.
+	 * @return a map of all profile properties.
+	 */
+	public Map<String, String> getProperties();
+
+	/**
+	 * Returns an unmodifiable map of all profile properties associated with the given
+	 * installable unit in this profile.
+	 * @param iu the installable unit to return profile properties for
+	 * @return an unmodifiable map of installable unit profile properties
+	 */
+	public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu);
+
+	/**
+	 * Returns a timestamp describing when this profile snapshot was created.
+	 * @return A profile timestamp
+	 */
+	public long getTimestamp();
+
+	/**
+	 * Returns the installable units in this profile that match the given query. In a shared
+	 * install, this will include both the installable units in the shared base location, and in
+	 * the current user's private install area.
+	 * @param query
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The installable units that match the given query
+	 */
+	public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java
new file mode 100644
index 0000000..a1f5b34
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+
+/**
+ * An event indicating that a profile has been added, removed, or changed.
+ * @see IProvisioningEventBus
+ * @since 2.0
+ */
+public interface IProfileEvent {
+
+	/**
+	 * Event constant (value 0) indicating that a profile has been added to a profile registry.
+	 */
+	public static final int ADDED = 0;
+	/**
+	 * Event constant (value 1) indicating that a profile has been removed from a profile registry.
+	 */
+	public static final int REMOVED = 1;
+	/**
+	 * Event constant (value 0) indicating that a profile has been changed in a profile registry.
+	 */
+	public static final int CHANGED = 2;
+
+	/**
+	 * Returns the reason for the event. The reason will be one of the event constants
+	 * {@link #ADDED}, {@link #REMOVED}, or {@link #CHANGED}.
+	 * @return the reason for the event
+	 */
+	public int getReason();
+
+	/**
+	 * Returns the id of the profile that changed.
+	 * @return the id of the profile that changed
+	 */
+	public String getProfileId();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java
new file mode 100644
index 0000000..3dfaa6e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import java.util.Map;
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+/**
+ * This encapsulates the access to the profile registry. 
+ * It deals with persistence in a transparent way.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProfileRegistry {
+	/**
+	 * A special profile id representing the profile of the currently running system.
+	 * This constant can be used when invoking {@link #getProfile(String)} to obtain
+	 * the profile of the currently running system. Note that a given profile registry
+	 * may not have a defined self profile, for example if the running system doesn't
+	 * have a profile, or resides in a different profile registry.
+	 */
+	public static final String SELF = "_SELF_"; //$NON-NLS-1$
+	/**
+	 * Service name constant for the profile registry service.
+	 */
+	public static final String SERVICE_NAME = IProfileRegistry.class.getName();
+
+	/**
+	 * Return the profile in the registry that has the given id. If it does not exist, 
+	 * then return <code>null</code>.
+	 * 
+	 * @param id the profile identifier
+	 * @return the profile or <code>null</code>
+	 */
+	public IProfile getProfile(String id);
+
+	/**
+	 * Return the profile in the registry that has the given id and timestamp. If it does not exist, 
+	 * then return <code>null</code>.
+	 * 
+	 * @param id the profile identifier
+	 * @param timestamp the profile's timestamp
+	 * @return the profile or <code>null</code>
+	 */
+	public IProfile getProfile(String id, long timestamp);
+
+	/**
+	 * Return an array of timestamps in ascending order for the profile id in question. 
+	 * If there are none, then return an empty array.
+	 * 
+	 * @param id the id of the profile to list timestamps for
+	 * @return the array of timestamps
+	 */
+	public long[] listProfileTimestamps(String id);
+
+	/**
+	 * Return an array of profiles known to this registry. If there are none, then
+	 * return an empty array.
+	 * 
+	 * @return the array of profiles
+	 */
+	public IProfile[] getProfiles();
+
+	/**
+	 * Add the given profile to this profile registry.
+	 * 
+	 * @param id the profile id
+	 * @throws ProvisionException if a profile
+	 *         with the same id is already present in the registry.
+	 * @return the new empty profile
+	 */
+	public IProfile addProfile(String id) throws ProvisionException;
+
+	/**
+	 * Add the given profile to this profile registry.
+	 * 
+	 * @param id the profile id
+	 * @param properties the profile properties
+	 * @throws ProvisionException if a profile
+	 *         with the same id is already present in the registry.
+	 * @return the new empty profile
+	 */
+	public IProfile addProfile(String id, Map<String, String> properties) throws ProvisionException;
+
+	/**
+	 * Returns whether this profile registry contains a profile with the given id.
+	 * 
+	 * @param profileId The id of the profile to search for
+	 * @return <code>true</code> if this registry contains a profile with the given id,
+	 * and <code>false</code> otherwise.
+	 */
+	public boolean containsProfile(String profileId);
+
+	/**
+	 * Remove the given profile snapshot from this profile registry. This method has no effect
+	 * if this registry does not contain a profile with the given id and timestamp.
+	 * The current profile cannot be removed using this method.
+	 * 
+	 * @param id the profile to remove
+	 * @param timestamp the timestamp of the profile to remove 
+	 * @throws ProvisionException if the profile with the specified id and timestamp is the current profile.
+	 */
+	public void removeProfile(String id, long timestamp) throws ProvisionException;
+
+	/**
+	 * Remove the given profile from this profile registry.  This method has no effect
+	 * if this registry does not contain a profile with the given id.
+	 * 
+	 * @param id the profile to remove
+	 */
+	public void removeProfile(String id);
+
+	/**
+	 * Check if the given profile from this profile registry is up-to-date.
+	 * 
+	 * @param profile the profile to check
+	 * @return boolean  true if the profile is current; false otherwise.
+	 */
+	public boolean isCurrent(IProfile profile);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
new file mode 100644
index 0000000..c67ab03
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryable;
+
+/**
+ * A provisioning plan describes a proposed set of changes to a profile. The
+ * proposed changes may represent a valid and consistent set of changes, or it
+ * may represent a set of changes that would cause errors if executed. In this
+ * case the plan contains information about the severity and explanation for the
+ * problems.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProvisioningPlan {
+
+	/**
+	 * Returns the proposed set of installable units to be added to the profile.
+	 * 
+	 * @return The proposed profile additions
+	 */
+	public IQueryable<IInstallableUnit> getAdditions();
+
+	/**
+	 * Returns the provisioning context in which this plan was created.
+	 * 
+	 * @return The plan's provisioning context
+	 */
+	public ProvisioningContext getContext();
+
+	/**
+	 * Returns a plan describing the proposed set of changes to the provisioning infrastructure
+	 * required by this plan.  The installer changes must be performed before this plan 
+	 * can be successfully executed.
+	 * 
+	 * @return The installer plan.
+	 */
+	public IProvisioningPlan getInstallerPlan();
+
+	/**
+	 * Returns the profile that this plan will operate on.
+	 * 
+	 * @return The target profile for this plan
+	 */
+	public IProfile getProfile();
+
+	/**
+	 * Returns the proposed set of installable units to be removed from this profile.
+	 * 
+	 * @return The proposed profile removals.
+	 */
+	public IQueryable<IInstallableUnit> getRemovals();
+
+	/**
+	 * Returns the overall plan status. The severity of this status indicates
+	 * whether the plan can be successfully executed or not:
+	 * <ul>
+	 * <li>A status of {@link IStatus#OK} indicates that the plan can be executed successfully.</li>
+	 * <li>A status of {@link IStatus#INFO} or {@link IStatus#WARNING} indicates
+	 * that the plan can be executed but may cause problems.</li>
+	 * <li>A status of {@link IStatus#ERROR} indicates that the plan cannot be executed
+	 * successfully.</li>
+	 * <li>A status of {@link IStatus#CANCEL} indicates that the plan computation was
+	 * canceled and is incomplete. A canceled plan cannot be executed.</li>
+	 * </ul>
+	 * 
+	 * @return The overall plan status.
+	 */
+	public IStatus getStatus();
+
+	/**
+	 * Adds an installable unit to the plan. This will cause the given installable unit
+	 * to be installed into the profile when this plan is executed by the engine. 
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param iu the installable unit to add
+	 */
+	public void addInstallableUnit(IInstallableUnit iu);
+
+	/**
+	 * Removes an installable unit from the plan. This will cause the given installable unit
+	 * to be remove from the profile when this plan is executed by the engine. 
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param iu the installable unit to add
+	 */
+	public void removeInstallableUnit(IInstallableUnit iu);
+
+	/**
+	 * Adds a profile property corresponding to the given installable unit to the plan. 
+	 * This will cause the given installable unit property to be installed into the profile 
+	 * when this plan is executed by the engine. 
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param iu the installable unit to set a property for
+	 * @param name the property name
+	 * @param value the property value
+	 */
+	public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value);
+
+	/**
+	 * Sets the installer plan for this plan. The installer plan describes the set of changes
+	 * that must be made to the provisioning agent in order for this plan to execute
+	 * successfully.
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param installerPlan the plan describing changes to the provisioning agent
+	 */
+	public void setInstallerPlan(IProvisioningPlan installerPlan);
+
+	/**
+	 * Sets a profile property in the plan. This will cause the given property
+	 * to be added to the profile when this plan is executed by the engine. 
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param name the profile property name
+	 * @param value the profile property value
+	 */
+	public void setProfileProperty(String name, String value);
+
+	/**
+	 * Sets the overall plan status, describing whether the planner constructing
+	 * this plan believes it will install successfully, or whether it contains errors
+	 * or the plan computation has been canceled.
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param status the plan status
+	 */
+	public void setStatus(IStatus status);
+
+	/**
+	 * Adds an instruction to replace one installable unit in the profile with another.
+	 * This will cause the 'from' installable unit property to be uninstalled from the profile 
+	 * and the 'to' installable unit to be added to the profile when this plan is executed 
+	 * by the engine. 
+	 * <p>
+	 * This is an advanced operation that should only be performed by clients crafting
+	 * their own custom plan. Most clients should instead use a planner service
+	 * to construct a valid plan based on a profile change request.
+	 * </p>
+	 * @param from the installable unit to remove
+	 * @param to the installable unit to add
+	 */
+	public void updateInstallableUnit(IInstallableUnit from, IInstallableUnit to);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java
new file mode 100644
index 0000000..f8037fc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+/**
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface ISizingPhaseSet extends IPhaseSet {
+
+	public long getDiskSize();
+
+	public long getDownloadSize();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
new file mode 100644
index 0000000..75d974c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.phases.*;
+
+/**
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class PhaseSetFactory {
+
+	private static final boolean forcedUninstall = Boolean.valueOf(EngineActivator.getContext().getProperty("org.eclipse.equinox.p2.engine.forcedUninstall")).booleanValue(); //$NON-NLS-1$
+
+	/**
+	 * A phase id (value "checkTrust") describing the certificate trust check phase.
+	 * This phase examines the code signing certificates of the artifacts being installed
+	 * to ensure they are signed and trusted by the running system.
+	 */
+	public static String PHASE_CHECK_TRUST = "checkTrust"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "collect") describing the collect phase.
+	 * This phase gathers all the artifacts to be installed, typically by copying them
+	 * from some repository into a suitable local location for the application being installed.
+	 */
+	public static String PHASE_COLLECT = "collect"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "configure") describing the configuration phase.
+	 * This phase writes configuration data related to the software being provisioned.
+	 * Until configuration occurs the end user of the software will be have access to
+	 * the installed functionality.
+	 */
+	public static String PHASE_CONFIGURE = "configure"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "install") describing the install phase.
+	 * This phase performs any necessary transformations on the downloaded
+	 * artifacts to put them in the correct shape for the running application, such
+	 * as decompressing or moving content, setting file permissions, etc).
+	 */
+	public static String PHASE_INSTALL = "install"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "property") describing the property modification phase.
+	 * This phase performs changes to profile properties.
+	 */
+	public static String PHASE_PROPERTY = "property"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "unconfigure") describing the unconfigure phase.
+	 * This phase removes configuration data related to the software being removed.
+	 * This phase is the inverse of the changes performed in the configure phase.
+	 */
+	public static String PHASE_UNCONFIGURE = "unconfigure"; //$NON-NLS-1$
+	/**
+	 * A phase id (value "uninstall") describing the uninstall phase.
+	 * This phase removes artifacts from the system being provisioned that are
+	 * no longer required in the new profile.
+	 */
+	public static String PHASE_UNINSTALL = "uninstall"; //$NON-NLS-1$
+
+	private static final List<String> ALL_PHASES_LIST = Arrays.asList(new String[] {PHASE_COLLECT, PHASE_UNCONFIGURE, PHASE_UNINSTALL, PHASE_PROPERTY, PHASE_CHECK_TRUST, PHASE_INSTALL, PHASE_CONFIGURE});
+
+	/**
+	 * Creates a default phase set that covers all the provisioning operations.
+	 * Phases can be specified for exclusion.
+	 * 
+	 * @param exclude - A set of bit options that specify the phases to exclude.
+	 * See {@link PhaseSetFactory} for possible options
+	 * @return the {@link PhaseSet}
+	 */
+	public static final IPhaseSet createDefaultPhaseSetExcluding(String[] exclude) {
+		if (exclude == null || exclude.length == 0)
+			return createDefaultPhaseSet();
+		List<String> excludeList = Arrays.asList(exclude);
+		List<String> includeList = new ArrayList<String>(ALL_PHASES_LIST);
+		includeList.removeAll(excludeList);
+		return createPhaseSetIncluding(includeList.toArray(new String[includeList.size()]));
+	}
+
+	/**
+	 * Creates a default phase set that covers all the provisioning operations.
+	 * Phases can be specified for inclusion.
+	 * 
+	 * @param include - A set of bit options that specify the phases to include.
+	 * See {@link PhaseSetFactory} for possible options
+	 * @return the {@link PhaseSet}
+	 */
+	public static final IPhaseSet createPhaseSetIncluding(String[] include) {
+		if (include == null || include.length == 0)
+			return new PhaseSet(new Phase[0]);
+		List<String> includeList = Arrays.asList(include);
+		ArrayList<Phase> phases = new ArrayList<Phase>();
+		if (includeList.contains(PHASE_COLLECT))
+			phases.add(new Collect(100));
+		if (includeList.contains(PHASE_CHECK_TRUST))
+			phases.add(new CheckTrust(10));
+		if (includeList.contains(PHASE_UNCONFIGURE))
+			phases.add(new Unconfigure(10, forcedUninstall));
+		if (includeList.contains(PHASE_UNINSTALL))
+			phases.add(new Uninstall(50, forcedUninstall));
+		if (includeList.contains(PHASE_PROPERTY))
+			phases.add(new Property(1));
+		if (includeList.contains(PHASE_INSTALL))
+			phases.add(new Install(50));
+		if (includeList.contains(PHASE_CONFIGURE))
+			phases.add(new Configure(10));
+		return new PhaseSet(phases.toArray(new Phase[phases.size()]));
+	}
+
+	public static IPhaseSet createDefaultPhaseSet() {
+		return createPhaseSetIncluding(ALL_PHASES_LIST.toArray(new String[ALL_PHASES_LIST.size()]));
+	}
+
+	public static ISizingPhaseSet createSizingPhaseSet() {
+		return new SizingPhaseSet();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java
new file mode 100644
index 0000000..2a4c265
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import org.eclipse.core.internal.preferences.PreferencesService;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.security.storage.EncodingUtils;
+
+/**
+ * A profile scope contains the preferences associated with a particular profile
+ * in a provisioned system.
+ * @see IProfile
+ * @since 2.0
+ */
+public final class ProfileScope implements IScopeContext {
+
+	/**
+	 * String constant (value of <code>"profile"</code>) used for the 
+	 * scope name for this preference scope.
+	 */
+	public static final String SCOPE = "profile"; //$NON-NLS-1$
+
+	private String profileId;
+
+	private IAgentLocation location;
+
+	/**
+	 * Creates and returns a profile scope for the given profile id and agent.
+	 * @param agentLocation The location of the provisioning agent to obtain profile preferences for
+	 * @param profileId The id of the profile to obtain preferences for
+	 */
+	public ProfileScope(IAgentLocation agentLocation, String profileId) {
+		super();
+		Assert.isNotNull(agentLocation);
+		Assert.isNotNull(profileId);
+		this.profileId = profileId;
+		this.location = agentLocation;
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
+	 */
+	public IPath getLocation() {
+		// Null returned as the location should only be used when the profile is locked
+		return null;
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
+	 */
+	public String getName() {
+		return SCOPE;
+	}
+
+	/*
+	 * Default path hierarchy for profile nodes is /profile/<profileId>/<qualifier>.
+	 * 
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
+	 */
+	public IEclipsePreferences getNode(String qualifier) {
+		if (qualifier == null)
+			throw new IllegalArgumentException();
+		String locationString = EncodingUtils.encodeSlashes(location.getRootLocation().toString());
+		//format is /profile/{agentLocationURI}/{profileId}/qualifier
+		return (IEclipsePreferences) PreferencesService.getDefault().getRootNode().node(getName()).node(locationString).node(profileId).node(qualifier);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (!super.equals(obj))
+			return false;
+		if (!(obj instanceof ProfileScope))
+			return false;
+		ProfileScope other = (ProfileScope) obj;
+		return profileId.equals(other.profileId);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return super.hashCode() + profileId.hashCode();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
new file mode 100644
index 0000000..ea11ce4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
@@ -0,0 +1,390 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ * 	IBM Corporation - initial API and implementation
+ *     WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
+ *	Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.DebugHelper;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+
+/**
+ * A provisioning context defines the scope in which a provisioning operation
+ * occurs. A context can be used to specify the set of repositories available
+ * to the planner and engine as they perform provisioning work.
+ * @since 2.0
+ */
+public class ProvisioningContext {
+	private IProvisioningAgent agent;
+	private URI[] artifactRepositories; //artifact repositories to consult
+	private final List<IInstallableUnit> extraIUs = Collections.synchronizedList(new ArrayList<IInstallableUnit>());
+	private URI[] metadataRepositories; //metadata repositories to consult
+	private final Map<String, String> properties = new HashMap<String, String>();
+	private Map<String, URI> referencedArtifactRepositories = null;
+
+	private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
+
+	class ArtifactRepositoryQueryable implements IQueryable<IArtifactRepository> {
+		List<IArtifactRepository> repositories;
+
+		ArtifactRepositoryQueryable(List<IArtifactRepository> repositories) {
+			this.repositories = repositories;
+		}
+
+		public IQueryResult<IArtifactRepository> query(IQuery<IArtifactRepository> query, IProgressMonitor mon) {
+			return query.perform(repositories.listIterator());
+		}
+	}
+
+	/**
+	 * This Comparator sorts the repositories such that local repositories are first
+	 */
+	private static final Comparator<URI> LOCAL_FIRST_COMPARATOR = new Comparator<URI>() {
+
+		public int compare(URI arg0, URI arg1) {
+			String protocol0 = arg0.getScheme();
+			String protocol1 = arg1.getScheme();
+
+			if (FILE_PROTOCOL.equals(protocol0) && !FILE_PROTOCOL.equals(protocol1))
+				return -1;
+			if (!FILE_PROTOCOL.equals(protocol0) && FILE_PROTOCOL.equals(protocol1))
+				return 1;
+			return 0;
+		}
+	};
+
+	/**
+	 * Instructs the provisioning context to follow metadata repository references when 
+	 * providing queryables for obtaining metadata and artifacts.  When this property is set to
+	 * "true", then metadata repository references that are encountered while loading the 
+	 * specified metadata repositories will be included in the provisioning
+	 * context.  
+	 *
+	 * @see #getMetadata(IProgressMonitor)
+	 * @see #setMetadataRepositories(URI[])
+	 */
+	public static final String FOLLOW_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followRepositoryReferences"; //$NON-NLS-1$
+
+	private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
+
+	/**
+	 * Creates a new provisioning context that includes all available metadata and
+	 * artifact repositories available to the specified provisioning agent.
+	 *
+	 * @param agent the provisioning agent from which to obtain any necessary services.
+	 */
+	public ProvisioningContext(IProvisioningAgent agent) {
+		this.agent = agent;
+		// null repos means look at them all
+		metadataRepositories = null;
+		artifactRepositories = null;
+		setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, Boolean.TRUE.toString());
+	}
+
+	/**
+	 * Returns a queryable that can be used to obtain any artifact keys that
+	 * are needed for the provisioning operation.
+	 *
+	 * @param monitor a progress monitor to be used when creating the queryable
+	 * @return a queryable that can be used to query available artifact keys.
+	 *
+	 * @see #setArtifactRepositories(URI[])
+	 */
+	public IQueryable<IArtifactKey> getArtifactKeys(IProgressMonitor monitor) {
+		return QueryUtil.compoundQueryable(getLoadedArtifactRepositories(monitor));
+	}
+
+	/**
+	 * Returns a queryable that can be used to obtain any artifact descriptors that
+	 * are needed for the provisioning operation.
+	 *
+	 * @param monitor a progress monitor to be used when creating the queryable
+	 * @return a queryable that can be used to query available artifact descriptors.
+	 *
+	 * @see #setArtifactRepositories(URI[])
+	 */
+	public IQueryable<IArtifactDescriptor> getArtifactDescriptors(IProgressMonitor monitor) {
+		List<IArtifactRepository> repos = getLoadedArtifactRepositories(monitor);
+		List<IQueryable<IArtifactDescriptor>> descriptorQueryables = new ArrayList<IQueryable<IArtifactDescriptor>>();
+		for (IArtifactRepository repo : repos) {
+			descriptorQueryables.add(repo.descriptorQueryable());
+		}
+		return QueryUtil.compoundQueryable(descriptorQueryables);
+	}
+
+	/**
+	 * Returns a queryable that can be used to obtain any artifact repositories that
+	 * are needed for the provisioning operation.
+	 *
+	 * @param monitor a progress monitor to be used when creating the queryable
+	 * @return a queryable that can be used to query available artifact repositories.
+	 *
+	 * @see #setArtifactRepositories(URI[])
+	 */
+	public IQueryable<IArtifactRepository> getArtifactRepositories(IProgressMonitor monitor) {
+		return new ArtifactRepositoryQueryable(getLoadedArtifactRepositories(monitor));
+	}
+
+	/**
+	 * Return an array of loaded artifact repositories.
+	 */
+	private List<IArtifactRepository> getLoadedArtifactRepositories(IProgressMonitor monitor) {
+		IArtifactRepositoryManager repoManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+		URI[] repositories = artifactRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : artifactRepositories;
+		Arrays.sort(repositories, LOCAL_FIRST_COMPARATOR);
+
+		List<IArtifactRepository> repos = new ArrayList<IArtifactRepository>();
+		SubMonitor sub = SubMonitor.convert(monitor, (repositories.length + 1) * 100);
+		for (int i = 0; i < repositories.length; i++) {
+			if (sub.isCanceled())
+				throw new OperationCanceledException();
+			try {
+				repos.add(repoManager.loadRepository(repositories[i], sub.newChild(100)));
+			} catch (ProvisionException e) {
+				//skip unreadable repositories
+			}
+			// Remove this URI from the list of extra references if it is there.
+			if (referencedArtifactRepositories != null)
+				referencedArtifactRepositories.remove(repositories[i]);
+		}
+		// Are there any extra artifact repository references to consider?
+		if (referencedArtifactRepositories != null && referencedArtifactRepositories.size() > 0 && shouldFollowArtifactReferences()) {
+			SubMonitor innerSub = SubMonitor.convert(sub.newChild(100), referencedArtifactRepositories.size() * 100);
+			for (URI referencedURI : referencedArtifactRepositories.values()) {
+				try {
+					repos.add(repoManager.loadRepository(referencedURI, innerSub.newChild(100)));
+				} catch (ProvisionException e) {
+					// skip unreadable repositories
+				}
+			}
+		}
+		return repos;
+	}
+
+	private Set<IMetadataRepository> getLoadedMetadataRepositories(IProgressMonitor monitor) {
+		IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		URI[] repositories = metadataRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : metadataRepositories;
+
+		HashMap<String, IMetadataRepository> repos = new HashMap<String, IMetadataRepository>();
+		SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100);
+
+		// Clear out the list of remembered artifact repositories
+		referencedArtifactRepositories = new HashMap<String, URI>();
+		for (int i = 0; i < repositories.length; i++) {
+			if (sub.isCanceled())
+				throw new OperationCanceledException();
+			loadMetadataRepository(repoManager, repositories[i], repos, shouldFollowReferences(), sub.newChild(100));
+		}
+		Set<IMetadataRepository> set = new HashSet<IMetadataRepository>();
+		set.addAll(repos.values());
+		return set;
+	}
+
+	private void loadMetadataRepository(IMetadataRepositoryManager manager, URI location, HashMap<String, IMetadataRepository> repos, boolean followMetadataRepoReferences, IProgressMonitor monitor) {
+		// if we've already processed this repo, don't do it again.  This keeps us from getting
+		// caught up in circular references.
+		if (repos.containsKey(location.toString()))
+			return;
+
+		SubMonitor sub = SubMonitor.convert(monitor, 1000);
+		// First load the repository itself.
+		IMetadataRepository repository;
+		try {
+			repository = manager.loadRepository(location, sub.newChild(500));
+		} catch (ProvisionException e) {
+			// nothing more to do
+			return;
+		}
+		repos.put(location.toString(), repository);
+		Collection<IRepositoryReference> references = repository.getReferences();
+		// We always load artifact repositories referenced by this repository.  We might load
+		// metadata repositories
+		if (references.size() > 0) {
+			IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+			SubMonitor repoSubMon = SubMonitor.convert(sub.newChild(500), 100 * references.size());
+			for (IRepositoryReference ref : references) {
+				try {
+					if (ref.getType() == IRepository.TYPE_METADATA && followMetadataRepoReferences && isEnabled(manager, ref)) {
+						loadMetadataRepository(manager, ref.getLocation(), repos, followMetadataRepoReferences, repoSubMon.newChild(100));
+					} else if (ref.getType() == IRepository.TYPE_ARTIFACT) {
+						// We want to remember all enabled artifact repository locations.
+						if (isEnabled(artifactManager, ref))
+							referencedArtifactRepositories.put(ref.getLocation().toString(), ref.getLocation());
+					}
+				} catch (IllegalArgumentException e) {
+					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=311338
+					// ignore invalid location and keep going
+				}
+			}
+		} else {
+			sub.done();
+		}
+
+	}
+
+	// If the manager knows about the repo, consider its enablement state in the manager.
+	// If the manager does not know about the repo, consider the reference enablement state
+	@SuppressWarnings("rawtypes")
+	private boolean isEnabled(IRepositoryManager manager, IRepositoryReference reference) {
+		return (manager.contains(reference.getLocation()) && manager.isEnabled(reference.getLocation())) || ((!manager.contains(reference.getLocation())) && ((reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED));
+	}
+
+	private boolean shouldFollowReferences() {
+		return Boolean.valueOf(getProperty(FOLLOW_REPOSITORY_REFERENCES)).booleanValue();
+	}
+
+	private boolean shouldFollowArtifactReferences() {
+		return Boolean.valueOf(getProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES)).booleanValue();
+	}
+
+	/**
+	 * Returns a queryable that can be used to obtain any metadata (installable units)
+	 * that are needed for the provisioning operation.
+	 * 
+	 * The provisioning context has a distinct lifecycle, whereby the metadata
+	 * and artifact repositories to be used are determined when the client retrieves
+	 * retrieves the metadata queryable.  Clients should not reset the list of
+	 * metadata repository locations or artifact repository locations once the
+	 * metadata queryable has been retrieved.
+	 *
+	 * @param monitor a progress monitor to be used when creating the queryable
+	 * @return a queryable that can be used to query available metadata.
+	 *
+	 * @see #setMetadataRepositories(URI[])
+	 * @see #FOLLOW_REPOSITORY_REFERENCES
+	 */
+	public IQueryable<IInstallableUnit> getMetadata(IProgressMonitor monitor) {
+		return QueryUtil.compoundQueryable(getLoadedMetadataRepositories(monitor));
+	}
+
+	/**
+	 * Returns the list of additional installable units that should be considered as
+	 * available for installation by the planner. Returns an empty list if
+	 * there are no extra installable units to consider. This method has no effect on the
+	 * execution of the engine.
+	 *
+	 * @return The extra installable units that are available
+	 */
+	public List<IInstallableUnit> getExtraInstallableUnits() {
+		return extraIUs;
+	}
+
+	/**
+	 * Returns the properties that are defined in this context. Context properties can
+	 * be used to influence the behavior of either the planner or engine.
+	 *
+	 * @return the defined provisioning context properties
+	 */
+	public Map<String, String> getProperties() {
+		return properties;
+	}
+
+	/**
+	 * Returns the value of the property with the given key, or <code>null</code>
+	 * if no such property is defined
+	 * @param key the property key
+	 * @return the property value, or <code>null</code>
+	 */
+	public String getProperty(String key) {
+		return properties.get(key);
+	}
+
+	/**
+	 * Sets the artifact repositories to consult when performing an operation.
+	 * <p>
+	 * The provisioning context has a distinct lifecycle, whereby the metadata
+	 * and artifact repositories to be used are determined when the client 
+	 * retrieves the metadata queryable.  Clients should not reset the list of
+	 * artifact repository locations once the metadata queryable has been retrieved.
+	 *
+	 * @param artifactRepositories the artifact repository locations
+	*/
+	public void setArtifactRepositories(URI[] artifactRepositories) {
+		this.artifactRepositories = artifactRepositories;
+	}
+
+	/**
+	 * Sets the metadata repositories to consult when performing an operation.
+	 * <p>
+	 * The provisioning context has a distinct lifecycle, whereby the metadata
+	 * and artifact repositories to be used are determined when the client 
+	 * retrieves the metadata queryable.  Clients should not reset the list of
+	 * metadata repository locations once the metadata queryable has been retrieved.
+
+	 * @param metadataRepositories the metadata repository locations
+	*/
+	public void setMetadataRepositories(URI[] metadataRepositories) {
+		this.metadataRepositories = metadataRepositories;
+	}
+
+	/**
+	 * Sets the list of additional installable units that should be considered as
+	 * available for installation by the planner. This method has no effect on the
+	 * execution of the engine.
+	 * @param extraIUs the extra installable units
+	 */
+	public void setExtraInstallableUnits(List<IInstallableUnit> extraIUs) {
+		this.extraIUs.clear();
+		//copy the list to prevent future client tampering
+		if (extraIUs != null)
+			this.extraIUs.addAll(extraIUs);
+	}
+
+	/**
+	 * Sets a property on this provisioning context. Context properties can
+	 * be used to influence the behavior of either the planner or engine.
+	 * @param key the property key
+	 * @param value the property value
+	 */
+	public void setProperty(String key, String value) {
+		properties.put(key, value);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("{artifactRepos=" + DebugHelper.formatArray(null != artifactRepositories ? Arrays.asList(artifactRepositories) : null, true, false)); //$NON-NLS-1$
+		buffer.append(", metadataRepos=" + DebugHelper.formatArray(null != metadataRepositories ? Arrays.asList(metadataRepositories) : null, true, false)); //$NON-NLS-1$
+		buffer.append(", properties=" + getProperties() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
+		return buffer.toString();
+	}
+
+	/**
+	 * Return the array of repository locations for artifact repositories.
+	 * @return an array of repository locations.  This is never <code>null</code>.
+	 *
+	 * @deprecated This method will be removed in the next release.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305086
+	 * @noreference This method will be removed in the next release.
+	 * 
+	 * @see #getArtifactRepositories()
+	 * @see #getArtifactDescriptors(IProgressMonitor)
+	 * @see #getArtifactKeys(IProgressMonitor)
+	 */
+	public URI[] getArtifactRepositories() {
+		IArtifactRepositoryManager repoManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+		URI[] repositories = artifactRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : artifactRepositories;
+		Arrays.sort(repositories, LOCAL_FIRST_COMPARATOR);
+		return repositories;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html
new file mode 100644
index 0000000..8cf8516
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html
@@ -0,0 +1,22 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides support for interacting with the p2 provisioning engine
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for interacting with the p2 provisioning engine. The engine
+is a naive service that blindly performs a set of requested changes to a provisioned
+system. No attempt is made to resolve dependencies or determine whether the
+resulting system is valid or consistent. It is assumed that the engine client has
+crafted a valid provisioning plan for the engine to perform, typically by using a planner
+service.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
new file mode 100644
index 0000000..2dac783
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine.query;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+/**
+ * A query that searches for {@link IInstallableUnit} instances that have
+ * a property associated with the specified profile, whose value matches the provided value.
+ * @since 2.0
+ */
+public class IUProfilePropertyQuery extends ExpressionMatchQuery<IInstallableUnit> {
+	/**
+	 * A property value constant that will match any defined property value.
+	 * @see #IUProfilePropertyQuery(String, String)
+	 */
+	public static final String ANY = "*"; //$NON-NLS-1$
+
+	private static final IExpression matchValue = ExpressionUtil.parse("profileProperties[$0] == $1"); //$NON-NLS-1$
+	private static final IExpression matchAny = ExpressionUtil.parse("profileProperties[$0] != null"); //$NON-NLS-1$
+
+	private static IMatchExpression<IInstallableUnit> createMatch(String propertyName, String propertyValue) {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		return ANY.equals(propertyValue) ? factory.<IInstallableUnit> matchExpression(matchAny, propertyName) : factory.<IInstallableUnit> matchExpression(matchValue, propertyName, propertyValue);
+	}
+
+	/**
+	 * Creates a new query on the given property name and value.
+	 * Because the queryable for this query is typically the profile
+	 * instance, we use a reference to the profile rather than the
+	 * profile id for performance reasons.
+	 * @param propertyName The name of the property to match
+	 * @param propertyValue The value to compare to. A value of {@link #ANY} will match any value.
+	 */
+	public IUProfilePropertyQuery(String propertyName, String propertyValue) {
+		super(IInstallableUnit.class, createMatch(propertyName, propertyValue));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
new file mode 100644
index 0000000..0236a16
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine.query;
+
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * A query matching all the {@link IInstallableUnit}s that are marked visible to the user. 
+ * @since 2.0
+ */
+public class UserVisibleRootQuery extends IUProfilePropertyQuery {
+
+	/**
+	 * Creates a new query that will match all installable units marked visible to the user.
+	 */
+	public UserVisibleRootQuery() {
+		super(IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit}, in the context of a {@link IProfile} is visible to the user 
+	 * @param iu the element being tested.
+	 * @param profile the context in which the iu is tested
+	 * @return <tt>true</tt> if the element is visible to the user.
+	 */
+	public static boolean isUserVisible(IInstallableUnit iu, IProfile profile) {
+		String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
+		return Boolean.valueOf(value).booleanValue();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html
new file mode 100644
index 0000000..3aad2eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides queries specific to profiles
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for querying the profile.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
new file mode 100644
index 0000000..3b0ac09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine.spi;
+
+import java.util.*;
+
+/**
+ * @since 2.0
+ */
+public final class Memento {
+	private static final long serialVersionUID = 3257399736837461585L;
+	private static final Collection<Class<?>> simples = Arrays.<Class<?>> asList(String.class, Integer.class, Long.class, Float.class, Double.class, Byte.class, Short.class, Character.class, Boolean.class);
+	private static final Collection<Class<?>> simpleArrays = Arrays.<Class<?>> asList(String[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Byte[].class, Short[].class, Character[].class, Boolean[].class);
+	private static final Collection<Class<?>> primitiveArrays = Arrays.<Class<?>> asList(long[].class, int[].class, short[].class, char[].class, byte[].class, double[].class, float[].class, boolean[].class);
+
+	Map<String, Object> mementoMap = new HashMap<String, Object>();
+
+	public Object remove(String key) {
+		if (key == null)
+			throw new NullPointerException();
+
+		// TODO: persist change
+		return mementoMap.remove(key);
+	}
+
+	public Object put(String key, Object value) {
+		if (key == null)
+			throw new NullPointerException();
+
+		validateValue(value);
+
+		// TODO: persist change
+		return mementoMap.put(key, value);
+	}
+
+	public Object get(String key) {
+		if (key == null)
+			throw new NullPointerException();
+
+		return mementoMap.get(key);
+	}
+
+	public Enumeration<String> getKeys() {
+		return new Enumeration<String>() {
+			Iterator<String> keysIterator = mementoMap.keySet().iterator();
+
+			public boolean hasMoreElements() {
+				return keysIterator.hasNext();
+			}
+
+			public String nextElement() {
+				return keysIterator.next();
+			}
+		};
+	}
+
+	private static void validateValue(Object value) {
+		if (value == null)
+			return;
+
+		Class<? extends Object> clazz = value.getClass();
+
+		if (simples.contains(clazz))
+			return;
+
+		if (simpleArrays.contains(clazz) || primitiveArrays.contains(clazz))
+			return;
+
+		throw new IllegalArgumentException(clazz.getName());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
new file mode 100644
index 0000000..2154abc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine.spi;
+
+import java.util.Map;
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * @since 2.0
+ */
+public abstract class ProvisioningAction {
+
+	private Memento memento = new Memento();
+	private Touchpoint touchpoint;
+
+	protected Memento getMemento() {
+		return memento;
+	}
+
+	public abstract IStatus execute(Map<String, Object> parameters);
+
+	public abstract IStatus undo(Map<String, Object> parameters);
+
+	// TODO: these probably should not be visible
+	public void setTouchpoint(Touchpoint touchpoint) {
+		this.touchpoint = touchpoint;
+	}
+
+	public Touchpoint getTouchpoint() {
+		return touchpoint;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
new file mode 100644
index 0000000..dc2258d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.engine.spi;
+
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.*;
+
+/**
+ * A touchpoint is responsible for executing the required provisioning steps
+ * for each phase corresponding to a particular targeted system (eclipse, native). 
+ * The order of phases is defined in the {@link IPhaseSet}.  
+ * @since 2.0
+ */
+public abstract class Touchpoint {
+
+	/** 
+	 * This method is for backwards compatibility only, to be used by touchpoints
+	 * that existed prior to action ids being fully qualified by the engine.
+	 * @param actionId the unqualified action id
+	 * @return the qualified action id
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public String qualifyAction(String actionId) {
+		return actionId;
+	}
+
+	/**
+	 * This method is called at the beginning of execution of an engine phase. This
+	 * is an opportunity for the touchpoint to initialize any phase-specific structures.
+	 * <p>
+	 * The result of this method can be used to abort execution of the entire engine
+	 * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
+	 * The result can also contain warnings or informational status that will be aggregated
+	 * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
+	 * </p>
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting and cancellation are not desired
+	 * @param profile the profile that is being operated on
+	 * @param phaseId the id of the phase
+	 * @param parameters data provided by the engine to the touchpoint 
+	 * @return the result of phase initialization
+	 */
+	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the end of execution of an engine phase. This
+	 * is an opportunity for the touchpoint to clean up any phase-specific structures
+	 * or perform any final work for the current phase.
+	 * <p>
+	 * The result of this method can be used to abort execution of the entire engine
+	 * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
+	 * The result can also contain warnings or informational status that will be aggregated
+	 * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
+	 * </p>
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting and cancellation are not desired
+	 * @param profile the profile that is being operated on
+	 * @param phaseId the id of the phase
+	 * @param parameters data provided by the engine to the touchpoint 
+	 * @return the result of phase completion
+	 */
+	public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the beginning of processing of a single engine operand
+	 * (for example a given installable unit being installed or uninstalled). This
+	 * is an opportunity for the touchpoint to initialize any data structures specific
+	 * to a single operand.
+	 * <p>
+	 * The result of this method can be used to abort execution of the entire engine
+	 * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
+	 * The result can also contain warnings or informational status that will be aggregated
+	 * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
+	 * </p>
+	 * @param profile the profile that is being operated on
+	 * @param parameters data provided by the engine to the touchpoint 
+	 * @return the result of initialization
+	 */
+	public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the end of processing of a single engine operand
+	 * (for example a given installable unit being installed or uninstalled). This
+	 * is an opportunity for the touchpoint to clean up any data structures specific
+	 * to a single operand.
+	 * <p>
+	 * The result of this method can be used to abort execution of the entire engine
+	 * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
+	 * The result can also contain warnings or informational status that will be aggregated
+	 * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
+	 * </p>
+	 * @param profile the profile that is being operated on
+	 * @param parameters data provided by the engine to the touchpoint 
+	 * @return the result of the completion work
+	 */
+	public IStatus completeOperand(IProfile profile, Map<String, Object> parameters) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the beginning of an engine operation before any
+	 * phases have been executed. This is an opportunity to perform precondition
+	 * checks against the profile, or initialize any data structures common to an
+	 * entire execution of the engine.
+	 * <p>
+	 * The result of this method can be used to abort execution of the entire engine
+	 * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
+	 * The result can also contain warnings or informational status that will be aggregated
+	 * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
+	 * </p>
+	 * 
+	 * @param profile the profile about to be modified
+	 * @return the result of preparation work
+	 */
+	public IStatus prepare(IProfile profile) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the end of an engine operation after all phases have 
+	 * been executed. When this method is invoked, it signals that the engine
+	 * operation was a complete success, and the touchpoint should commit
+	 * or persistent any changes it has made to some persistent storage (for
+	 * example the file system).
+	 * <p>
+	 * The result of this method can be used to report on the success or failure
+	 * of the commit. However, at this point it is too late for the engine operation
+	 * to fail, and the result returned from this method will not prevent the engine
+	 * from completing its work.
+	 * </p>
+	 * 
+	 * @param profile the profile that was modified
+	 * @return the result of commit work
+	 */
+	public IStatus commit(IProfile profile) {
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * This method is called at the end of an engine operation after all phases have 
+	 * been executed. When this method is invoked, it signals that the engine
+	 * operation was a failure, and the touchpoint should discard any
+	 * changes it has made.
+	 * <p>
+	 * The result of this method can be used to report on the success or failure
+	 * of the rollback. However, at this point it is too late for the engine operation
+	 * to be stopped, and the result returned from this method will not prevent the engine
+	 * from completing its rollback work.
+	 * </p>
+	 * 
+	 * @param profile the profile that was modified
+	 * @return the result of commit work
+	 */
+	public IStatus rollback(IProfile profile) {
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html
new file mode 100644
index 0000000..d53f58d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides support for registering new provisioning actions and touchpoints.
+<h2>
+Package Specification</h2>
+<p>
+This package specifies SPI for registering new actions and new touchpoints to the engine.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.classpath
deleted file mode 100644
index 7cdeb73..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.project b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.project
deleted file mode 100644
index 1b81b1e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.p2.exemplarysetup</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b3fb58a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,339 +0,0 @@
-#Thu Sep 06 23:48:04 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index bb66afe..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:11 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
deleted file mode 100644
index 75a8567..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.exemplarysetup;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Import-Package: org.eclipse.equinox.internal.p2.core,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.director,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.osgi.framework;version="1.3.0"
-Eclipse-LazyStart: true
-Bundle-Activator: org.eclipse.equinox.internal.p2.exemplarysetup.Activator
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common
-Export-Package: org.eclipse.equinox.internal.p2.exemplarysetup;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/build.properties
deleted file mode 100644
index a6b8330..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties
-src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
deleted file mode 100644
index a0c085e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-#  Copyright (c) 2007, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox Provisioning Exemplary Setup
-providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/src/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/src/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java
deleted file mode 100644
index a67cfe5..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/src/org/eclipse/equinox/internal/p2/exemplarysetup/Activator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.exemplarysetup;
-
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.director.SimpleDirector;
-import org.eclipse.equinox.internal.p2.director.SimplePlanner;
-import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
-import org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-
-public class Activator implements BundleActivator {
-	public static BundleContext context;
-
-	private IProvisioningEventBus bus;
-	private ServiceRegistration registrationBus;
-
-	private ServiceRegistration registrationDefaultManager;
-
-	//	private ArtifactRepositoryManager artifactRepoManager;
-	//	private ServiceRegistration registrationArtifactRepoManager;
-
-	private IProfileRegistry profileRegistry;
-	private ServiceRegistration registrationProfileRegistry;
-
-	private IDirector director;
-	private ServiceRegistration registrationDirector;
-
-	private IPlanner planner;
-	private ServiceRegistration registrationPlanner;
-
-	private ServiceReference metadataRepositoryReference;
-
-	public void start(BundleContext aContext) throws Exception {
-		//Need to do the configuration of all the bits and pieces:
-		Activator.context = aContext;
-
-		registerEventBus();
-		//create the profile registry
-		registerProfileRegistry();
-		registerMetadataRepositoryManager();
-
-		//create the director and planner.  The planner must be
-		//registered first because the director finds it in its constructor.
-		registerPlanner();
-		registerDirector();
-		startGarbageCollector();
-
-		//create artifact repositories
-		//		registerDefaultArtifactRepoManager();
-	}
-
-	private void startGarbageCollector() {
-		new GarbageCollector();
-	}
-
-	public void stop(BundleContext aContext) throws Exception {
-		//		unregisterDefaultArtifactRepoManager();
-		unregisterDirector();
-		unregisterPlanner();
-		unregisterDefaultMetadataRepoManager();
-		unregisterProfileRegistry();
-		unregisterEventBus();
-		Activator.context = null;
-
-	}
-
-	private void registerDirector() {
-		director = new SimpleDirector();
-		registrationDirector = context.registerService(IDirector.class.getName(), director, null);
-	}
-
-	private void unregisterDirector() {
-		registrationDirector.unregister();
-		registrationDirector = null;
-		director = null;
-	}
-
-	private void registerPlanner() {
-		planner = new SimplePlanner();
-		registrationPlanner = context.registerService(IPlanner.class.getName(), planner, null);
-	}
-
-	private void unregisterPlanner() {
-		registrationPlanner.unregister();
-		registrationPlanner = null;
-		planner = null;
-	}
-
-	private void registerProfileRegistry() {
-		profileRegistry = new SimpleProfileRegistry();
-		registrationProfileRegistry = context.registerService(IProfileRegistry.class.getName(), profileRegistry, null);
-	}
-
-	private void unregisterProfileRegistry() {
-		registrationProfileRegistry.unregister();
-		registrationProfileRegistry = null;
-		profileRegistry = null;
-	}
-
-	/**
-	 * Returns a metadata repository manager, registering a service if there isn't
-	 * one registered already.
-	 */
-	private void registerMetadataRepositoryManager() {
-		//register a metadata repository manager if there isn't one already registered
-		metadataRepositoryReference = context.getServiceReference(IMetadataRepositoryManager.SERVICE_NAME);
-		if (metadataRepositoryReference == null) {
-			registrationDefaultManager = context.registerService(IMetadataRepositoryManager.SERVICE_NAME, new MetadataRepositoryManager(), null);
-			metadataRepositoryReference = registrationDefaultManager.getReference();
-		}
-	}
-
-	private void unregisterDefaultMetadataRepoManager() {
-		//unget the service obtained for the metadata cache
-		if (metadataRepositoryReference != null) {
-			context.ungetService(metadataRepositoryReference);
-			metadataRepositoryReference = null;
-		}
-
-		//unregister the service if we registered it
-		if (registrationDefaultManager != null) {
-			registrationDefaultManager.unregister();
-			registrationDefaultManager = null;
-		}
-	}
-
-	private void registerEventBus() {
-		bus = new ProvisioningEventBus();
-		registrationBus = context.registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
-	}
-
-	private void unregisterEventBus() {
-		registrationBus.unregister();
-		registrationBus = null;
-		bus.close();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
index aceba4d..e742b02 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Nov 20 12:57:22 PST 2008
+#Tue Dec 22 19:30:45 CET 2009
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
index 694c7fb..84f75ec 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
@@ -1,34 +1,35 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
 Bundle-SymbolicName: org.eclipse.equinox.p2.extensionlocation;singleton:=true
+Bundle-Version: 1.2.0.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.extensionlocation.Activator
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
 Export-Package: org.eclipse.equinox.internal.p2.extensionlocation;x-friends:="org.eclipse.equinox.p2.reconciler.dropins"
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.p2.metadata
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
+ org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.metadata.repository,
  org.eclipse.equinox.internal.p2.publisher.eclipse,
  org.eclipse.equinox.internal.p2.touchpoint.eclipse,
  org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
  org.eclipse.equinox.internal.provisional.p2.directorywatcher,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.publisher.eclipse,
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.datalocation;version="1.1.0",
  org.eclipse.osgi.service.resolver;version="1.2.0",
  org.eclipse.osgi.util,
  org.osgi.framework
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/build.properties
index 3945947..6684475 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/build.properties
@@ -17,3 +17,5 @@ bin.includes = META-INF/,\
                about.html
 source.. = src/
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/pom.xml
new file mode 100644
index 0000000..0f9c3a1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.extensionlocation</artifactId>
+  <version>1.2.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
index a6aa543..c05ff68 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
@@ -17,9 +17,10 @@ import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.osgi.framework.*;
 
@@ -63,32 +64,24 @@ public class Activator implements BundleActivator {
 	}
 
 	public static IProfile getCurrentProfile() {
-		ServiceReference reference = bundleContext.getServiceReference(IProfileRegistry.class.getName());
+		IProfileRegistry profileRegistry = (IProfileRegistry) getCurrentAgent().getService(IProfileRegistry.SERVICE_NAME);
+		return profileRegistry.getProfile(IProfileRegistry.SELF);
+	}
+
+	public static IProvisioningAgent getCurrentAgent() {
+		ServiceReference reference = bundleContext.getServiceReference(IProvisioningAgent.SERVICE_NAME);
 		if (reference == null)
 			return null;
-		IProfileRegistry profileRegistry = (IProfileRegistry) bundleContext.getService(reference);
-		try {
-			return profileRegistry.getProfile(IProfileRegistry.SELF);
-		} finally {
-			bundleContext.ungetService(reference);
-		}
+		return (IProvisioningAgent) bundleContext.getService(reference);
 	}
 
 	public static IFileArtifactRepository getBundlePoolRepository() {
-		ServiceReference reference = bundleContext.getServiceReference(IProfileRegistry.class.getName());
-		if (reference == null)
-			return null;
-		IProfileRegistry profileRegistry = (IProfileRegistry) bundleContext.getService(reference);
-		IProfile profile = null;
-		try {
-			profile = profileRegistry.getProfile(IProfileRegistry.SELF);
-		} finally {
-			bundleContext.ungetService(reference);
-		}
-		if (profile == null)
+		IProfile profile = getCurrentProfile();
+		IProvisioningAgent agent = getCurrentAgent();
+		if (profile == null || agent == null)
 			return null;
 
-		return Util.getAggregatedBundleRepository(profile, Util.AGGREGATE_CACHE | Util.AGGREGATE_SHARED_CACHE);
+		return Util.getAggregatedBundleRepository(agent, profile, Util.AGGREGATE_CACHE | Util.AGGREGATE_SHARED_CACHE);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java
index 6615f00..c109aaf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java
@@ -10,25 +10,28 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.extensionlocation;
 
+import org.eclipse.equinox.p2.query.IQueryResult;
+
 import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
+import java.util.*;
 import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
 
 public class BundlePoolFilteredListener extends DirectoryChangeListener {
 
 	private DirectoryChangeListener delegate;
-	private Set bundlePoolFiles = new HashSet();
+	private Set<File> bundlePoolFiles = new HashSet<File>();
 
 	public BundlePoolFilteredListener(DirectoryChangeListener listener) {
 		delegate = listener;
 		IFileArtifactRepository bundlePool = Activator.getBundlePoolRepository();
 		if (bundlePool != null) {
-			IArtifactKey[] keys = bundlePool.getArtifactKeys();
-			for (int i = 0; i < keys.length; i++) {
-				File artifactFile = bundlePool.getArtifactFile(keys[i]);
+			IQueryResult<IArtifactKey> keys = bundlePool.query(ArtifactKeyQuery.ALL_KEYS, null);
+			for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
+				IArtifactKey key = iterator.next();
+				File artifactFile = bundlePool.getArtifactFile(key);
 				if (artifactFile != null)
 					bundlePoolFiles.add(artifactFile);
 			}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
index 0d67e3d..984f563 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
@@ -15,18 +15,22 @@ import java.io.*;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.spi.AbstractRepository;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 
-public class ExtensionLocationArtifactRepository extends AbstractRepository implements IFileArtifactRepository, Constants {
+public class ExtensionLocationArtifactRepository extends AbstractRepository<IArtifactKey> implements IFileArtifactRepository, Constants {
 
 	public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.artifactRepository"; //$NON-NLS-1$
 	public static final Integer VERSION = new Integer(1);
-	public static final List STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new Object[] {"artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new String[] {"artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
 	IFileArtifactRepository artifactRepository;
 	private File base;
@@ -48,8 +52,8 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository impl
 	 * Constructor for the class. Return a new extension location repository based on 
 	 * the given url and nested repository.
 	 */
-	public ExtensionLocationArtifactRepository(URI location, IFileArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
-		super(Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
+	public ExtensionLocationArtifactRepository(IProvisioningAgent agent, URI location, IFileArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
+		super(agent, Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
 		this.artifactRepository = repository;
 		this.base = getBaseDirectory(location);
 	}
@@ -64,7 +68,9 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository impl
 
 	void reload() {
 		try {
-			ExtensionLocationArtifactRepository repo = (ExtensionLocationArtifactRepository) new ExtensionLocationArtifactRepositoryFactory().load(getLocation(), 0, null);
+			ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
+			factory.setAgent(getProvisioningAgent());
+			ExtensionLocationArtifactRepository repo = (ExtensionLocationArtifactRepository) factory.load(getLocation(), 0, null);
 			artifactRepository = repo.artifactRepository;
 			base = repo.base;
 		} catch (ProvisionException e) {
@@ -186,11 +192,6 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository impl
 		return artifactRepository.getArtifactDescriptors(key);
 	}
 
-	public IArtifactKey[] getArtifactKeys() {
-		ensureInitialized();
-		return artifactRepository.getArtifactKeys();
-	}
-
 	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
 		ensureInitialized();
 		return artifactRepository.getArtifacts(requests, monitor);
@@ -211,7 +212,7 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository impl
 		return artifactRepository.getArtifactFile(descriptor);
 	}
 
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		ensureInitialized();
 		return artifactRepository.getProperties();
 	}
@@ -229,4 +230,33 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository impl
 		ensureInitialized();
 		return oldValue;
 	}
+
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
+		return artifactRepository.createArtifactDescriptor(key);
+	}
+
+	public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
+		return artifactRepository.createArtifactKey(classifier, id, version);
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		ensureInitialized();
+		return artifactRepository.descriptorQueryable();
+	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		ensureInitialized();
+		return artifactRepository.query(query, monitor);
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		try {
+			runnable.run(monitor);
+		} catch (OperationCanceledException oce) {
+			return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+		} catch (Exception e) {
+			return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+		}
+		return Status.OK_STATUS;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
index b584ab2..7b3574c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
@@ -10,16 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.extensionlocation;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
 import java.net.URI;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
 import org.eclipse.osgi.util.NLS;
 
 public class ExtensionLocationArtifactRepositoryFactory extends ArtifactRepositoryFactory {
@@ -27,7 +26,7 @@ public class ExtensionLocationArtifactRepositoryFactory extends ArtifactReposito
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
 	 */
-	public IArtifactRepository create(URI location, String name, String type, Map properties) throws ProvisionException {
+	public IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		// TODO proper progress monitoring
 		IStatus status = validate(location, null);
 		if (!status.isOK())
@@ -39,8 +38,10 @@ public class ExtensionLocationArtifactRepositoryFactory extends ArtifactReposito
 		// make sure that we aren't trying to create a repo at a location
 		// where one already exists
 		boolean failed = false;
+		final SimpleArtifactRepositoryFactory simpleFactory = new SimpleArtifactRepositoryFactory();
+		simpleFactory.setAgent(getAgent());
 		try {
-			new SimpleArtifactRepositoryFactory().load(repoLocation, 0, null);
+			simpleFactory.load(repoLocation, 0, null);
 			failed = true;
 		} catch (ProvisionException e) {
 			// expected
@@ -49,8 +50,8 @@ public class ExtensionLocationArtifactRepositoryFactory extends ArtifactReposito
 			String msg = NLS.bind(Messages.repo_already_exists, location);
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_EXISTS, msg, null));
 		}
-		IFileArtifactRepository repo = (IFileArtifactRepository) new SimpleArtifactRepositoryFactory().create(repoLocation, name, type, properties);
-		return new ExtensionLocationArtifactRepository(location, repo, null);
+		IFileArtifactRepository repo = (IFileArtifactRepository) simpleFactory.create(repoLocation, name, type, properties);
+		return new ExtensionLocationArtifactRepository(getAgent(), location, repo, null);
 	}
 
 	/* (non-Javadoc)
@@ -72,8 +73,10 @@ public class ExtensionLocationArtifactRepositoryFactory extends ArtifactReposito
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
 		// TODO proper progress monitoring
 		try {
-			IFileArtifactRepository repo = (IFileArtifactRepository) new SimpleArtifactRepositoryFactory().load(repoLocation, flags, null);
-			return new ExtensionLocationArtifactRepository(location, repo, monitor);
+			final SimpleArtifactRepositoryFactory simpleFactory = new SimpleArtifactRepositoryFactory();
+			simpleFactory.setAgent(getAgent());
+			IFileArtifactRepository repo = (IFileArtifactRepository) simpleFactory.load(repoLocation, flags, null);
+			return new ExtensionLocationArtifactRepository(getAgent(), location, repo, monitor);
 		} catch (ProvisionException e) {
 			return create(location, Activator.getRepositoryName(location), ExtensionLocationArtifactRepository.TYPE, null);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
index ae3736d..55f0d0c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,12 +16,15 @@ import java.io.FilenameFilter;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 
@@ -29,7 +32,7 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
 
 	public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.metadataRepository"; //$NON-NLS-1$
 	public static final Integer VERSION = new Integer(1);
-	public static final List STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new Object[] {"artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList("artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
 	IMetadataRepository metadataRepository;
 	private File base;
@@ -49,8 +52,8 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
 	 * Constructor for the class. Return a new extension location repository based on the 
 	 * given location and specified nested repo.
 	 */
-	public ExtensionLocationMetadataRepository(URI location, IMetadataRepository repository, IProgressMonitor monitor) throws ProvisionException {
-		super(Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
+	public ExtensionLocationMetadataRepository(IProvisioningAgent agent, URI location, IMetadataRepository repository, IProgressMonitor monitor) throws ProvisionException {
+		super(agent, Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
 		this.metadataRepository = repository;
 		this.base = getBaseDirectory(location);
 	}
@@ -65,7 +68,9 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
 
 	void reload() {
 		try {
-			ExtensionLocationMetadataRepository repo = (ExtensionLocationMetadataRepository) new ExtensionLocationMetadataRepositoryFactory().load(getLocation(), 0, null);
+			ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
+			factory.setAgent(getProvisioningAgent());
+			ExtensionLocationMetadataRepository repo = (ExtensionLocationMetadataRepository) factory.load(getLocation(), 0, null);
 			metadataRepository = repo.metadataRepository;
 			base = repo.base;
 		} catch (ProvisionException e) {
@@ -80,32 +85,42 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository#addInstallableUnits(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
 	 */
-	public void addInstallableUnits(IInstallableUnit[] installableUnits) {
+	public Collection<IRepositoryReference> getReferences() {
+		return CollectionUtils.emptyList();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addInstallableUnits(java.util.Collection)
+	 */
+	@Override
+	public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
 		throw new UnsupportedOperationException();
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository#removeAll()
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
 	 */
+	@Override
 	public void removeAll() {
 		throw new UnsupportedOperationException();
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository#removeInstallableUnits(org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.core.runtime.IProgressMonitor)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeInstallableUnits(java.util.Collection)
 	 */
-	public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
+	@Override
+	public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
 		throw new UnsupportedOperationException();
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.query.IQueryable#query(org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.equinox.internal.provisional.p2.query.Collector, org.eclipse.core.runtime.IProgressMonitor)
+	 * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
 	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
 		ensureInitialized();
-		return metadataRepository.query(query, collector, monitor);
+		return metadataRepository.query(query, monitor);
 	}
 
 	public static void validate(URI location, IProgressMonitor monitor) throws ProvisionException {
@@ -172,17 +187,26 @@ public class ExtensionLocationMetadataRepository extends AbstractMetadataReposit
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository#getProperties()
+	 * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#getProperties()
 	 */
-	public Map getProperties() {
+	@Override
+	public Map<String, String> getProperties() {
 		ensureInitialized();
 		return metadataRepository.getProperties();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#initialize(org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState)
+	 */
+	@Override
 	public void initialize(RepositoryState repositoryState) {
 		//nothing to do
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
+	 */
+	@Override
 	public String setProperty(String key, String value) {
 		ensureInitialized();
 		String oldValue = metadataRepository.setProperty(key, value);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
index 628ffeb..e8e02d3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
@@ -10,23 +10,22 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.extensionlocation;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
 import java.net.URI;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory;
+import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
 import org.eclipse.osgi.util.NLS;
 
 public class ExtensionLocationMetadataRepositoryFactory extends MetadataRepositoryFactory {
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
 	 */
-	public IMetadataRepository create(URI location, String name, String type, Map properties) throws ProvisionException {
+	public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		// TODO proper progress monitoring
 		IStatus status = validate(location, null);
 		if (!status.isOK())
@@ -38,8 +37,10 @@ public class ExtensionLocationMetadataRepositoryFactory extends MetadataReposito
 		// ensure that we aren't trying to create a repository at a location
 		// where one already exists
 		boolean failed = false;
+		final SimpleMetadataRepositoryFactory simpleFactory = new SimpleMetadataRepositoryFactory();
+		simpleFactory.setAgent(getAgent());
 		try {
-			new SimpleMetadataRepositoryFactory().load(repoLocation, 0, null);
+			simpleFactory.load(repoLocation, 0, null);
 			failed = true;
 		} catch (ProvisionException e) {
 			// expected
@@ -48,12 +49,12 @@ public class ExtensionLocationMetadataRepositoryFactory extends MetadataReposito
 			String msg = NLS.bind(Messages.repo_already_exists, location.toString());
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_EXISTS, msg, null));
 		}
-		IMetadataRepository repository = new SimpleMetadataRepositoryFactory().create(repoLocation, name, null, properties);
-		return new ExtensionLocationMetadataRepository(location, repository, null);
+		IMetadataRepository repository = simpleFactory.create(repoLocation, name, null, properties);
+		return new ExtensionLocationMetadataRepository(getAgent(), location, repository, null);
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
 		//return null if the caller wanted a modifiable repo
@@ -71,15 +72,17 @@ public class ExtensionLocationMetadataRepositoryFactory extends MetadataReposito
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
 		// TODO proper progress monitoring
 		try {
-			IMetadataRepository repository = new SimpleMetadataRepositoryFactory().load(repoLocation, flags, null);
-			return new ExtensionLocationMetadataRepository(location, repository, monitor);
+			final SimpleMetadataRepositoryFactory simpleFactory = new SimpleMetadataRepositoryFactory();
+			simpleFactory.setAgent(getAgent());
+			IMetadataRepository repository = simpleFactory.load(repoLocation, flags, null);
+			return new ExtensionLocationMetadataRepository(getAgent(), location, repository, monitor);
 		} catch (ProvisionException e) {
 			return create(location, Activator.getRepositoryName(location), ExtensionLocationMetadataRepository.TYPE, null);
 		}
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus validate(URI location, IProgressMonitor monitor) {
 		try {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
index 05113e8..74e1307 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
 import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.directorywatcher.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 
@@ -52,12 +52,21 @@ public class SiteListener extends DirectoryChangeListener {
 	private static boolean contains(String[] plugins, File file) {
 		String filename = file.getAbsolutePath();
 		for (int i = 0; i < plugins.length; i++)
-			if (filename.endsWith(new File(plugins[i]).toString()))
+			if (filename.endsWith(plugins[i]))
 				return true;
 		return false;
 	}
 
 	/**
+	 * Converts a list of file names to a normalized form suitable for comparison.
+	 */
+	private String[] normalize(String[] filenames) {
+		for (int i = 0; i < filenames.length; i++)
+			filenames[i] = new File(filenames[i]).toString();
+		return filenames;
+	}
+
+	/**
 	 * Given one repo and a base location, ensure cause the other repo to be loaded and then 
 	 * poll the base location once updating the repositories accordingly.  This method is used to 
 	 * ensure that both the metadata and artifact repos corresponding to one location are 
@@ -73,10 +82,12 @@ public class SiteListener extends DirectoryChangeListener {
 			if (metadataRepository == null) {
 				artifactRepository.reload();
 				ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
+				factory.setAgent(artifactRepository.getProvisioningAgent());
 				metadataRepository = (ExtensionLocationMetadataRepository) factory.load(artifactRepository.getLocation(), 0, null);
 			} else if (artifactRepository == null) {
 				metadataRepository.reload();
 				ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
+				factory.setAgent(metadataRepository.getProvisioningAgent());
 				artifactRepository = (ExtensionLocationArtifactRepository) factory.load(metadataRepository.getLocation(), 0, null);
 			}
 		} catch (ProvisionException e) {
@@ -105,16 +116,16 @@ public class SiteListener extends DirectoryChangeListener {
 	/*
 	 * Create a new site listener on the given site.
 	 */
-	public SiteListener(Map properties, String url, DirectoryChangeListener delegate) {
+	public SiteListener(Map<String, String> properties, String url, DirectoryChangeListener delegate) {
 		this.siteLocation = url;
 		this.delegate = delegate;
-		this.policy = (String) properties.get(SITE_POLICY);
-		Collection listCollection = new HashSet();
-		String listString = (String) properties.get(SITE_LIST);
+		this.policy = properties.get(SITE_POLICY);
+		Collection<String> listCollection = new HashSet<String>();
+		String listString = properties.get(SITE_LIST);
 		if (listString != null)
 			for (StringTokenizer tokenizer = new StringTokenizer(listString, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
 				listCollection.add(tokenizer.nextToken());
-		this.list = (String[]) listCollection.toArray(new String[listCollection.size()]);
+		this.list = normalize(listCollection.toArray(new String[listCollection.size()]));
 	}
 
 	/* (non-Javadoc)
@@ -220,16 +231,24 @@ public class SiteListener extends DirectoryChangeListener {
 		String urlString = siteLocation;
 		if (urlString.endsWith(Constants.EXTENSION_LOCATION))
 			urlString = urlString.substring(0, urlString.length() - Constants.EXTENSION_LOCATION.length());
-		List result = new ArrayList();
-		for (Enumeration e = properties.elements(); e.hasMoreElements();) {
+		List<String> result = new ArrayList<String>();
+		for (Enumeration<Object> e = properties.elements(); e.hasMoreElements();) {
 			String line = (String) e.nextElement();
 			StringTokenizer tokenizer = new StringTokenizer(line, ";"); //$NON-NLS-1$
 			String targetSite = tokenizer.nextToken();
-			if (!urlString.equals(targetSite))
+			try {
+				// the urlString is coming from the site location which is an encoded URI
+				// so we need to encode the targetSite string before we check for equality
+				if (!urlString.equals(URIUtil.fromString(targetSite).toString()))
+					continue;
+			} catch (URISyntaxException e1) {
+				// shouldn't happen
+				e1.printStackTrace();
 				continue;
+			}
 			result.add(tokenizer.nextToken());
 		}
-		toBeRemoved = (String[]) result.toArray(new String[result.size()]);
+		toBeRemoved = result.toArray(new String[result.size()]);
 		return toBeRemoved;
 	}
 
@@ -241,7 +260,7 @@ public class SiteListener extends DirectoryChangeListener {
 	private String[] getManagedFiles() {
 		if (managedFiles != null)
 			return managedFiles;
-		List result = new ArrayList();
+		List<String> result = new ArrayList<String>();
 		File siteFile;
 		try {
 			siteFile = URIUtil.toFile(new URI(siteLocation));
@@ -249,24 +268,23 @@ public class SiteListener extends DirectoryChangeListener {
 			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to create a URL from site location: " + siteLocation, e)); //$NON-NLS-1$
 			return new String[0];
 		}
-		Map pluginCache = getPlugins(siteFile);
-		Map featureCache = getFeatures(siteFile);
-		for (Iterator iter = featureCache.keySet().iterator(); iter.hasNext();) {
-			File featureFile = (File) iter.next();
+		Map<String, File> pluginCache = getPlugins(siteFile);
+		Map<File, Feature> featureCache = getFeatures(siteFile);
+		for (File featureFile : featureCache.keySet()) {
 			// add the feature path
 			result.add(featureFile.toString());
-			Feature feature = (Feature) featureCache.get(featureFile);
+			Feature feature = featureCache.get(featureFile);
 			FeatureEntry[] entries = feature.getEntries();
 			for (int inner = 0; inner < entries.length; inner++) {
 				FeatureEntry entry = entries[inner];
 				// grab the right location from the plug-in cache
 				String key = entry.getId() + '/' + entry.getVersion();
-				File pluginLocation = (File) pluginCache.get(key);
+				File pluginLocation = pluginCache.get(key);
 				if (pluginLocation != null)
 					result.add(pluginLocation.toString());
 			}
 		}
-		managedFiles = (String[]) result.toArray(new String[result.size()]);
+		managedFiles = normalize(result.toArray(new String[result.size()]));
 		return managedFiles;
 	}
 
@@ -274,8 +292,8 @@ public class SiteListener extends DirectoryChangeListener {
 	 * Iterate over the feature directory and return a map of 
 	 * File to Feature objects (from the generator bundle)
 	 */
-	private Map getFeatures(File location) {
-		Map result = new HashMap();
+	private Map<File, Feature> getFeatures(File location) {
+		Map<File, Feature> result = new HashMap<File, Feature>();
 		File featureDir = new File(location, FEATURES);
 		File[] children = featureDir.listFiles();
 		for (int i = 0; i < children.length; i++) {
@@ -294,9 +312,9 @@ public class SiteListener extends DirectoryChangeListener {
 	 * Iterate over the plugins directory and return a map of
 	 * plug-in id/version to File locations.
 	 */
-	private Map getPlugins(File location) {
+	private Map<String, File> getPlugins(File location) {
 		File[] plugins = new File(location, PLUGINS).listFiles();
-		Map result = new HashMap();
+		Map<String, File> result = new HashMap<String, File>();
 		for (int i = 0; plugins != null && i < plugins.length; i++) {
 			File bundleLocation = plugins[i];
 			if (bundleLocation.isDirectory() || bundleLocation.getName().endsWith(".jar")) { //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.classpath
index 7cdeb73..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.project b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.project
index 772f2af..478c5b8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
index 78523cd..2d0c6c8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Aug 16 11:00:59 EDT 2007
+#Tue Dec 29 18:58:34 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -62,7 +62,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -72,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -144,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
index 91469c1..3206be5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
@@ -1,27 +1,30 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.garbagecollector;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.garbagecollector;singleton:=true
+Bundle-Version: 1.0.100.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.garbagecollector.GCActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
+Export-Package: org.eclipse.equinox.internal.p2.garbagecollector;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.pde.core"
+Require-Bundle: org.eclipse.equinox.p2.engine,
+ org.eclipse.osgi;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.equinox.registry;bundle-version="[3.4.0,4.0.0)"
 Import-Package: org.eclipse.core.runtime.preferences,
  org.eclipse.equinox.app;version="1.0.0",
  org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
  org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.4.0",
- org.osgi.service.prefs;version="1.1.0",
- org.osgi.util.tracker;version="1.3.3"
-Bundle-Activator: org.eclipse.equinox.internal.p2.garbagecollector.GCActivator
-Export-Package: org.eclipse.equinox.internal.p2.garbagecollector;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.pde.core"
-Eclipse-LazyStart: true
-Require-Bundle: org.eclipse.equinox.p2.engine,
- org.eclipse.osgi;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.equinox.registry;bundle-version="[3.4.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+ org.osgi.service.prefs;version="1.1.0"
+Service-Component: OSGI-INF/garbagecollector.xml
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml
new file mode 100644
index 0000000..d50c2d2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.garbagecollector">
+   <implementation class="org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollectorComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/build.properties
index f84c26e..078feef 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/build.properties
@@ -1,19 +1,12 @@
-###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                plugin.xml,\
                schema/,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               OSGI-INF/garbagecollector.xml
 src.includes = about.html
+javacSource = 1.5
+javacTarget = jsr14
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/pom.xml
new file mode 100644
index 0000000..0633ff4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.garbagecollector</artifactId>
+  <version>1.0.100.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
index b4c63d7..7569f22 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
@@ -13,9 +13,9 @@ package org.eclipse.equinox.internal.p2.garbagecollector;
 import java.util.Map;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
 
 /**
  * @since 1.0
@@ -24,12 +24,13 @@ public class Application implements IApplication {
 
 	private static final String DEFAULT_PROFILE_ID = "SDKProfile"; //$NON-NLS-1$
 	private String profileId;
+	private IProvisioningAgent agent;
 
 	/*
 	 * Return the profile with the given id, or null if not found.
 	 */
 	private IProfile getProfile(String id) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(GCActivator.getContext(), IProfileRegistry.class.getName());
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		return profileRegistry == null ? null : profileRegistry.getProfile(id);
 	}
 
@@ -37,20 +38,28 @@ public class Application implements IApplication {
 	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 	 */
 	public Object start(IApplicationContext context) throws Exception {
-		// TODO - do we have to start exemplarySetup here?
-		Map allArgs = context.getArguments();
+		Map<?, ?> allArgs = context.getArguments();
 		String[] args = (String[]) allArgs.get(IApplicationContext.APPLICATION_ARGS);
 		processArguments(args);
 		// if the user didn't give us a profile id, then use the default SDK one
 		if (profileId == null)
 			profileId = DEFAULT_PROFILE_ID;
+
+		initializeServices();
 		IProfile profile = getProfile(profileId);
 		if (profile == null)
-			throw new IllegalArgumentException("\"" + profileId + "\" is not a valid profile identifier.");
-		new GarbageCollector().runGC(profile);
+			throw new IllegalArgumentException("\"" + profileId + "\" is not a valid profile identifier."); //$NON-NLS-1$//$NON-NLS-2$
+		GarbageCollector gc = (GarbageCollector) agent.getService(GarbageCollector.SERVICE_NAME);
+		gc.runGC(profile);
+		agent.stop();
 		return null;
 	}
 
+	private void initializeServices() throws ProvisionException {
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) GCActivator.getService(IProvisioningAgentProvider.SERVICE_NAME);
+		agent = provider.createAgent(null);
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.app.IApplication#stop()
 	 */
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java
index cf0eb70..4cf97c9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.garbagecollector;
 
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 
 /**
  * Given a MarkSet, the CoreGarbageCollector removes any IArtifactDescriptors which
@@ -23,29 +28,28 @@ public class CoreGarbageCollector {
 	/**
 	 * When set to true, information will be logged every time an artifact is removed 
 	 */
-	private static boolean debugMode = false;
+	static boolean debugMode = false;
 
 	/**
 	 * Given a list of IArtifactKeys and an IArtifactRepository, removes all artifacts
 	 * in aRepository that are not mapped to by an IArtifactKey in markSet
 	 */
-	public synchronized void clean(IArtifactKey[] markSet, IArtifactRepository aRepository) {
-		IArtifactKey[] repositoryKeys = aRepository.getArtifactKeys();
-		for (int j = 0; j < repositoryKeys.length; j++) {
-			boolean artifactIsActive = false;
-			for (int k = 0; k < markSet.length; k++) {
-				if (repositoryKeys[j].equals(markSet[k])) {
-					artifactIsActive = true;
-					break;
+	public synchronized void clean(IArtifactKey[] markSet, final IArtifactRepository aRepository) {
+		Set<IArtifactKey> set = new HashSet<IArtifactKey>(Arrays.asList(markSet));
+		//this query will match all artifact keys that are not in the given set
+		IQuery<IArtifactKey> query = QueryUtil.createQuery(IArtifactKey.class, "unique($0)", set); //$NON-NLS-1$
+		final IQueryResult<IArtifactKey> inactive = aRepository.query(query, null);
+		aRepository.executeBatch(new IRunnableWithProgress() {
+			public void run(IProgressMonitor monitor) {
+				for (Iterator<IArtifactKey> iterator = inactive.iterator(); iterator.hasNext();) {
+					IArtifactKey key = iterator.next();
+					aRepository.removeDescriptor(key);
+					if (debugMode) {
+						Tracing.debug("Key removed:" + key); //$NON-NLS-1$
+					}
 				}
 			}
-			if (!artifactIsActive) {
-				aRepository.removeDescriptor(repositoryKeys[j]);
-				if (debugMode) {
-					Tracing.debug("Key removed:" + repositoryKeys[j]); //$NON-NLS-1$
-				}
-			}
-		}
+		}, new NullProgressMonitor());
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
index 65ddf8b..8392aa7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
@@ -10,17 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.garbagecollector;
 
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
 import org.eclipse.osgi.service.debug.DebugOptions;
 import org.osgi.framework.*;
-import org.osgi.service.prefs.Preferences;
 
 public class GCActivator implements BundleActivator {
 	public static final String ID = "org.eclipse.equinox.p2.garbagecollector"; //$NON-NLS-1$
@@ -30,81 +21,24 @@ public class GCActivator implements BundleActivator {
 
 	static BundleContext context;
 
-	private SynchronousProvisioningListener busListener;
-
-	static Object getService(BundleContext ctx, String name) {
-		ServiceReference reference = ctx.getServiceReference(name);
+	static Object getService(String name) {
+		ServiceReference reference = context.getServiceReference(name);
 		if (reference == null)
 			return null;
-		Object result = ctx.getService(reference);
-		ctx.ungetService(reference);
+		Object result = context.getService(reference);
+		context.ungetService(reference);
 		return result;
 	}
 
 	public void start(BundleContext inContext) throws Exception {
 		GCActivator.context = inContext;
-		DebugOptions debug = (DebugOptions) getService(inContext, DebugOptions.class.getName());
+		DebugOptions debug = (DebugOptions) getService(DebugOptions.class.getName());
 		if (debug != null) {
 			CoreGarbageCollector.setDebugMode(debug.getBooleanOption(DEBUG_STRING, DEFAULT_DEBUG));
 		}
-		registerGCTrigger();
-	}
-
-	//	Register the listener used to trigger the GC.
-	private void registerGCTrigger() {
-		IProvisioningEventBus eventBus = (IProvisioningEventBus) getService(GCActivator.context, IProvisioningEventBus.SERVICE_NAME);
-		if (eventBus == null) {
-			LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.Missing_bus));
-			return;
-		}
-		eventBus.addListener(busListener = new SynchronousProvisioningListener() {
-			//The GC is triggered when an uninstall event occurred during a "transaction" and the transaction is committed.   
-			private boolean uninstallEventOccurred = false;
-
-			public void notify(EventObject o) {
-				if (o instanceof InstallableUnitEvent) {
-					InstallableUnitEvent event = (InstallableUnitEvent) o;
-					if (event.isUninstall() && event.isPost()) {
-						uninstallEventOccurred = true;
-					}
-				} else if (o instanceof CommitOperationEvent) {
-					if (uninstallEventOccurred == true) {
-						CommitOperationEvent event = (CommitOperationEvent) o;
-						if (getBooleanPreference(GC_ENABLED, true)) {
-							new GarbageCollector().runGC(event.getProfile());
-						}
-						uninstallEventOccurred = false;
-					}
-				} else if (o instanceof RollbackOperationEvent) {
-					uninstallEventOccurred = false;
-				}
-			}
-		});
-	}
-
-	protected boolean getBooleanPreference(String key, boolean defaultValue) {
-		IPreferencesService prefService = (IPreferencesService) getService(context, IPreferencesService.class.getName());
-		if (prefService == null)
-			return defaultValue;
-		List nodes = new ArrayList();
-		// todo we should look in the instance scope as well but have to be careful that the instance location has been set
-		nodes.add(new ConfigurationScope().getNode(ID));
-		nodes.add(new DefaultScope().getNode(ID));
-		return Boolean.valueOf(prefService.get(key, Boolean.toString(defaultValue), (Preferences[]) nodes.toArray(new Preferences[nodes.size()]))).booleanValue();
-	}
-
-	private void unregisterGCTrigger() {
-		IProvisioningEventBus eventBus = (IProvisioningEventBus) getService(GCActivator.context, IProvisioningEventBus.SERVICE_NAME);
-		if (eventBus != null && busListener != null)
-			eventBus.removeListener(busListener);
 	}
 
 	public void stop(BundleContext inContext) throws Exception {
-		unregisterGCTrigger();
 		GCActivator.context = null;
 	}
-
-	public static BundleContext getContext() {
-		return context;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
index 4db8c45..b8ba3c8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,11 +12,18 @@ package org.eclipse.equinox.internal.p2.garbagecollector;
 
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentService;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.osgi.service.prefs.Preferences;
 
 /**
  * The main control point for the p2 garbage collector.  Takes a Profile and runs the CoreGarbageCollector with the
@@ -29,17 +36,126 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
  * checked to see if its artifact repository is already a key in markSet.  If so, that MarkSet's artifact keys 
  * are added to the list that is mapped to by the artifact repository. 
  */
-public class GarbageCollector {
+public class GarbageCollector implements SynchronousProvisioningListener, IAgentService {
+	/**
+	 * Service name constant for the garbage collection service.
+	 */
+	public static final String SERVICE_NAME = GarbageCollector.class.getName();
+
+	private class ParameterizedSafeRunnable implements ISafeRunnable {
+		IProfile aProfile;
+		MarkSet[] aProfileMarkSets;
+		IConfigurationElement cfg;
+
+		public ParameterizedSafeRunnable(IConfigurationElement runtAttribute, IProfile profile) {
+			cfg = runtAttribute;
+			aProfile = profile;
+		}
+
+		public MarkSet[] getResult() {
+			return aProfileMarkSets;
+		}
+
+		public void handleException(Throwable exception) {
+			LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.Error_in_extension, exception));
+		}
+
+		public void run() throws Exception {
+			MarkSetProvider aMarkSetProvider = (MarkSetProvider) cfg.createExecutableExtension(ATTRIBUTE_CLASS);
+			if (aMarkSetProvider == null) {
+				aProfileMarkSets = null;
+				return;
+			}
+			aProfileMarkSets = aMarkSetProvider.getMarkSets(agent, aProfile);
+		}
+	}
+
 	private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
+
 	private static final String PT_MARKSET = GCActivator.ID + ".marksetproviders"; //$NON-NLS-1$
+	final IProvisioningAgent agent;
+
+	//The GC is triggered when an uninstall event occurred during a "transaction" and the transaction is committed.   
+	String uninstallEventProfileId = null;
 
 	/**
 	 * Maps IArtifactRepository objects to their respective "marked set" of IArtifactKeys
 	 */
-	private Map markSet;
+	private Map<IArtifactRepository, Collection<IArtifactKey>> markSet;
+
+	public GarbageCollector(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
+	private void addKeys(Collection<IArtifactKey> keyList, IArtifactKey[] keyArray) {
+		for (int i = 0; i < keyArray.length; i++)
+			keyList.add(keyArray[i]);
+	}
+
+	private void contributeMarkSets(IConfigurationElement runAttribute, IProfile profile, boolean addRepositories) {
+		ParameterizedSafeRunnable providerExecutor = new ParameterizedSafeRunnable(runAttribute, profile);
+		SafeRunner.run(providerExecutor);
+		MarkSet[] aProfileMarkSets = providerExecutor.getResult();
+		if (aProfileMarkSets == null || aProfileMarkSets.length == 0 || aProfileMarkSets[0] == null)
+			return;
+
+		for (int i = 0; i < aProfileMarkSets.length; i++) {
+			if (aProfileMarkSets[i] == null) {
+				continue;
+			}
+			Collection<IArtifactKey> keys = markSet.get(aProfileMarkSets[i].getRepo());
+			if (keys == null) {
+				if (addRepositories) {
+					keys = new HashSet<IArtifactKey>();
+					markSet.put(aProfileMarkSets[i].getRepo(), keys);
+					addKeys(keys, aProfileMarkSets[i].getKeys());
+				}
+			} else {
+				addKeys(keys, aProfileMarkSets[i].getKeys());
+			}
+		}
+	}
+
+	protected boolean getBooleanPreference(String key, boolean defaultValue) {
+		IPreferencesService prefService = (IPreferencesService) GCActivator.getService(IPreferencesService.class.getName());
+		if (prefService == null)
+			return defaultValue;
+		List<IEclipsePreferences> nodes = new ArrayList<IEclipsePreferences>();
+		// todo we should look in the instance scope as well but have to be careful that the instance location has been set
+		nodes.add(new ConfigurationScope().getNode(GCActivator.ID));
+		nodes.add(new DefaultScope().getNode(GCActivator.ID));
+		return Boolean.valueOf(prefService.get(key, Boolean.toString(defaultValue), nodes.toArray(new Preferences[nodes.size()]))).booleanValue();
+	}
+
+	private void invokeCoreGC() {
+		for (IArtifactRepository nextRepo : markSet.keySet()) {
+			IArtifactKey[] keys = markSet.get(nextRepo).toArray(new IArtifactKey[0]);
+			MarkSet aMarkSet = new MarkSet(keys, nextRepo);
+			new CoreGarbageCollector().clean(aMarkSet.getKeys(), aMarkSet.getRepo());
+		}
+	}
+
+	public void notify(EventObject o) {
+		if (o instanceof InstallableUnitEvent) {
+			InstallableUnitEvent event = (InstallableUnitEvent) o;
+			if (event.isUninstall() && event.isPost()) {
+				uninstallEventProfileId = event.getProfile().getProfileId();
+			}
+		} else if (o instanceof CommitOperationEvent) {
+			if (uninstallEventProfileId != null) {
+				CommitOperationEvent event = (CommitOperationEvent) o;
+				if (uninstallEventProfileId.equals(event.getProfile().getProfileId()) && getBooleanPreference(GCActivator.GC_ENABLED, true))
+					runGC(event.getProfile());
+				uninstallEventProfileId = null;
+			}
+		} else if (o instanceof RollbackOperationEvent) {
+			if (uninstallEventProfileId != null && uninstallEventProfileId.equals(((RollbackOperationEvent) o).getProfile().getProfileId()))
+				uninstallEventProfileId = null;
+		}
+	}
 
 	public void runGC(IProfile profile) {
-		markSet = new HashMap();
+		markSet = new HashMap<IArtifactRepository, Collection<IArtifactKey>>();
 		if (!traverseMainProfile(profile))
 			return;
 
@@ -50,6 +166,25 @@ public class GarbageCollector {
 		invokeCoreGC();
 	}
 
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
+	 */
+	public void start() {
+		IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+		if (eventBus == null)
+			return;
+		eventBus.addListener(this);
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
+	 */
+	public void stop() {
+		IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+		if (eventBus != null)
+			eventBus.removeListener(this);
+	}
+
 	private boolean traverseMainProfile(IProfile profile) {
 		IExtensionRegistry registry = RegistryFactory.getRegistry();
 		IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
@@ -69,16 +204,6 @@ public class GarbageCollector {
 		return true;
 	}
 
-	private void invokeCoreGC() {
-		Iterator keyIterator = markSet.keySet().iterator();
-		while (keyIterator.hasNext()) {
-			IArtifactRepository nextRepo = (IArtifactRepository) keyIterator.next();
-			IArtifactKey[] keys = (IArtifactKey[]) ((Collection) markSet.get(nextRepo)).toArray(new IArtifactKey[0]);
-			MarkSet aMarkSet = new MarkSet(keys, nextRepo);
-			new CoreGarbageCollector().clean(aMarkSet.getKeys(), aMarkSet.getRepo());
-		}
-	}
-
 	private void traverseRegisteredProfiles() {
 		IExtensionRegistry registry = RegistryFactory.getRegistry();
 		IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
@@ -91,7 +216,7 @@ public class GarbageCollector {
 				continue;
 			}
 
-			IProfileRegistry profileRegistry = (IProfileRegistry) GCActivator.getService(GCActivator.getContext(), IProfileRegistry.class.getName());
+			IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 			if (profileRegistry == null)
 				return;
 			IProfile[] registeredProfiles = profileRegistry.getProfiles();
@@ -101,61 +226,4 @@ public class GarbageCollector {
 			}
 		}
 	}
-
-	private class ParameterizedSafeRunnable implements ISafeRunnable {
-		IConfigurationElement cfg;
-		IProfile aProfile;
-		MarkSet[] aProfileMarkSets;
-
-		public ParameterizedSafeRunnable(IConfigurationElement runtAttribute, IProfile profile) {
-			cfg = runtAttribute;
-			aProfile = profile;
-		}
-
-		public void handleException(Throwable exception) {
-			LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.Error_in_extension, exception));
-		}
-
-		public void run() throws Exception {
-			MarkSetProvider aMarkSetProvider = (MarkSetProvider) cfg.createExecutableExtension(ATTRIBUTE_CLASS);
-			if (aMarkSetProvider == null) {
-				aProfileMarkSets = null;
-				return;
-			}
-			aProfileMarkSets = aMarkSetProvider.getMarkSets(aProfile);
-		}
-
-		public MarkSet[] getResult() {
-			return aProfileMarkSets;
-		}
-	}
-
-	private void contributeMarkSets(IConfigurationElement runAttribute, IProfile profile, boolean addRepositories) {
-		ParameterizedSafeRunnable providerExecutor = new ParameterizedSafeRunnable(runAttribute, profile);
-		SafeRunner.run(providerExecutor);
-		MarkSet[] aProfileMarkSets = providerExecutor.getResult();
-		if (aProfileMarkSets == null || aProfileMarkSets.length == 0 || aProfileMarkSets[0] == null)
-			return;
-
-		for (int i = 0; i < aProfileMarkSets.length; i++) {
-			if (aProfileMarkSets[i] == null) {
-				continue;
-			}
-			Collection keys = (Collection) markSet.get(aProfileMarkSets[i].getRepo());
-			if (keys == null) {
-				if (addRepositories) {
-					keys = new HashSet();
-					markSet.put(aProfileMarkSets[i].getRepo(), keys);
-					addKeys(keys, aProfileMarkSets[i].getKeys());
-				}
-			} else {
-				addKeys(keys, aProfileMarkSets[i].getKeys());
-			}
-		}
-	}
-
-	private void addKeys(Collection keyList, IArtifactKey[] keyArray) {
-		for (int i = 0; i < keyArray.length; i++)
-			keyList.add(keyArray[i]);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java
new file mode 100644
index 0000000..5b0f0da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.garbagecollector;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * Component for instantiating p2 garbage collectors.
+ */
+public class GarbageCollectorComponent implements IAgentServiceFactory {
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
+	 */
+	public Object createService(IProvisioningAgent agent) {
+		return new GarbageCollector(agent);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java
index d8b2446..453e0d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java
@@ -11,8 +11,8 @@
 package org.eclipse.equinox.internal.p2.garbagecollector;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 
 /**
  * Wrapper class used to store an IArtifactRepository and its root set of IArtifactKeys.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java
index edb21b3..f69716c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java
@@ -10,8 +10,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.garbagecollector;
 
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 
 /** 
  * Any class which declares itself as an extension to the <tt>org.eclipse.equinox.p2.garbagecollector.marksetproviders</tt>
@@ -28,13 +29,13 @@ public abstract class MarkSetProvider {
 	 * @param profile A profile whose ArtifactRepositories require a garbage collection
 	 * @return An array of MarkSet object(s) containing p's IArtifactRepository and its root set of IArtifactKeys
 	 */
-	public abstract MarkSet[] getMarkSets(IProfile profile);
+	public abstract MarkSet[] getMarkSets(IProvisioningAgent agent, IProfile profile);
 
 	/**
 	 * Returns the IArtifactRepository for which this MarkSetProvider provides a MarkSet.
 	 * @param p The Profile whose IArtifactRepository is required
 	 * @return The IArtifactRepository for which this MarkSetProvider provides a MarkSet.
 	 */
-	public abstract IArtifactRepository getRepository(IProfile p);
+	public abstract IArtifactRepository getRepository(IProvisioningAgent agent, IProfile p);
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
index cd0fea7..c08ad60 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.garbagecollector.messages"; //$NON-NLS-1$
 
 	public static String Error_in_extension;
-	public static String Missing_bus;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
index a2eba87..b1f4dea 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2005, 2008 IBM Corporation and others.
+#  Copyright (c) 2005, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -9,4 +9,3 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 Error_in_extension=An error occurred while calling to an IMarkSetProvider.
-Missing_bus=ProvisioningEventBus service could not be obtained, CoreGarbageCollector will not function properly.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.installer/.classpath
index 7cdeb73..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
index 99a0b3d..5dd2785 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.core.prefs
@@ -1,30 +1,33 @@
-#Thu Oct 11 16:46:31 EDT 2007
+#Wed Feb 17 13:57:50 EST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
 org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
 org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -40,6 +43,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -47,7 +51,9 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
@@ -58,6 +64,7 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warnin
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -69,20 +76,22 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -154,7 +163,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..d4e11d5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Wed Feb 17 13:57:32 EST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644
index 0000000..7f465d5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,94 @@
+#Wed Feb 17 13:55:35 EST 2010
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Ignore
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..6438a34
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,31 @@
+#Wed Feb 17 13:56:07 EST 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
index b0d85cd..0097637 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/META-INF/MANIFEST.MF
@@ -4,23 +4,24 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.installer;singleton:=true
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.installer.InstallerActivator
 Bundle-ActivationPolicy: lazy
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.equinox.app,
  org.eclipse.equinox.common,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.artifact.repository,
+ org.eclipse.equinox.p2.director;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
  org.eclipse.swt,
  org.eclipse.core.net;bundle-version="1.1.0",
  org.eclipse.equinox.p2.repository;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
 Export-Package: org.eclipse.equinox.internal.p2.installer;x-internal:=true,
  org.eclipse.equinox.internal.p2.installer.ui;x-internal:=true,
  org.eclipse.equinox.internal.provisional.p2.installer;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.installer/build.properties
index 973e370..f85c9d6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/build.properties
@@ -17,3 +17,5 @@ bin.includes = plugin.xml,\
                about.html,\
                plugin.properties
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/installer.product b/eclipse/plugins/org.eclipse.equinox.p2.installer/installer.product
index bfc6437..61ab802 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/installer.product
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/installer.product
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="Equinox p2 Installer" id="org.eclipse.equinox.p2.installer.product" application="org.eclipse.equinox.p2.installer.application" useFeatures="false" includeLaunchers="true">
+<product name="Equinox p2 Installer" id="org.eclipse.equinox.p2.installer.product" application="org.eclipse.equinox.p2.installer.application" version="1.1.0.qualifier" useFeatures="false" includeLaunchers="true">
 
    <aboutInfo>
       <image path="product_lg.gif"/>
@@ -17,6 +17,7 @@
    </configIni>
 
    <launcherArgs>
+      <vmArgs>-Xmx512m</vmArgs>
    </launcherArgs>
 
    <windowImages/>
@@ -37,11 +38,15 @@
       <plugin id="org.apache.commons.codec"/>
       <plugin id="org.apache.commons.httpclient"/>
       <plugin id="org.apache.commons.logging"/>
+      <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.expressions"/>
       <plugin id="org.eclipse.core.jobs"/>
       <plugin id="org.eclipse.core.net"/>
       <plugin id="org.eclipse.core.net.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.net.linux.x86_64" fragment="true"/>
       <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.core.net.win32.x86_64" fragment="true"/>
+      <plugin id="org.eclipse.core.runtime"/>
       <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
       <plugin id="org.eclipse.ecf"/>
       <plugin id="org.eclipse.ecf.filetransfer"/>
@@ -53,6 +58,7 @@
       <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
       <plugin id="org.eclipse.equinox.app"/>
       <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.ds"/>
       <plugin id="org.eclipse.equinox.frameworkadmin"/>
       <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
       <plugin id="org.eclipse.equinox.launcher"/>
@@ -60,30 +66,27 @@
       <plugin id="org.eclipse.equinox.launcher.cocoa.macosx" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.cocoa.macosx.x86_64" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.gtk.linux.s390x" fragment="true"/>
+      <plugin id="org.eclipse.equinox.launcher.gtk.linux.ppc64" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.gtk.linux.x86_64" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.gtk.solaris.sparc" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.gtk.solaris.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.motif.aix.ppc" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.motif.hpux.PA_RISC" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.motif.hpux.ia64_32" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.motif.linux.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.motif.solaris.sparc" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.win32.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.equinox.launcher.wpf.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
       <plugin id="org.eclipse.equinox.p2.core"/>
       <plugin id="org.eclipse.equinox.p2.director"/>
       <plugin id="org.eclipse.equinox.p2.engine"/>
-      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
       <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
       <plugin id="org.eclipse.equinox.p2.installer"/>
       <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
       <plugin id="org.eclipse.equinox.p2.metadata"/>
       <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+      <plugin id="org.eclipse.equinox.p2.ql"/>
       <plugin id="org.eclipse.equinox.p2.repository"/>
       <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
       <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
@@ -95,6 +98,7 @@
       <plugin id="org.eclipse.equinox.simpleconfigurator"/>
       <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
       <plugin id="org.eclipse.equinox.transforms.hook" fragment="true"/>
+      <plugin id="org.eclipse.equinox.util"/>
       <plugin id="org.eclipse.osgi"/>
       <plugin id="org.eclipse.osgi.services"/>
       <plugin id="org.eclipse.swt"/>
@@ -102,21 +106,18 @@
       <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
       <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.linux.ppc" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.s390" fragment="true"/>
-      <plugin id="org.eclipse.swt.gtk.linux.s390x" fragment="true"/>
+      <plugin id="org.eclipse.swt.gtk.linux.ppc64" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.solaris.sparc" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.solaris.x86" fragment="true"/>
       <plugin id="org.eclipse.swt.motif.aix.ppc" fragment="true"/>
-      <plugin id="org.eclipse.swt.motif.hpux.PA_RISC" fragment="true"/>
       <plugin id="org.eclipse.swt.motif.hpux.ia64_32" fragment="true"/>
       <plugin id="org.eclipse.swt.motif.linux.x86" fragment="true"/>
       <plugin id="org.eclipse.swt.motif.solaris.sparc" fragment="true"/>
       <plugin id="org.eclipse.swt.photon.qnx.x86" fragment="true"/>
       <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
-      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>
-      <plugin id="org.eclipse.swt.wpf.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/>    
       <plugin id="org.sat4j.core"/>
       <plugin id="org.sat4j.pb"/>
    </plugins>
@@ -124,6 +125,7 @@
    <configurations>
       <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="4" />
       <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
       <plugin id="org.eclipse.equinox.frameworkadmin.equinox" autoStart="true" startLevel="3" />
       <plugin id="org.eclipse.equinox.registry" autoStart="true" startLevel="3" />
       <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.installer/pom.xml
new file mode 100644
index 0000000..929d3c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.installer</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
index f928dca..5c376a7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,7 +21,9 @@ import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.installer.ui.SWTInstallAdvisor;
 import org.eclipse.equinox.internal.provisional.p2.installer.InstallAdvisor;
 import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.osgi.framework.*;
+import org.eclipse.equinox.p2.core.*;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 
 /**
  * This is a simple installer application built using P2.  The application must be given
@@ -137,9 +139,9 @@ public class InstallApplication implements IApplication {
 			InstallDescription description = null;
 			try {
 				description = computeInstallDescription();
-				startRequiredBundles(description);
+				IProvisioningAgent agent = startAgent(description);
 				//perform long running install operation
-				InstallUpdateProductOperation operation = new InstallUpdateProductOperation(InstallerActivator.getDefault().getContext(), description);
+				InstallUpdateProductOperation operation = new InstallUpdateProductOperation(agent, description);
 				IStatus result = advisor.performInstall(operation);
 				if (!result.isOK()) {
 					LogHelper.log(result);
@@ -156,6 +158,7 @@ public class InstallApplication implements IApplication {
 					//TODO present the user an option to immediately start the product
 					advisor.setResult(result);
 				}
+				agent.stop();
 			} catch (OperationCanceledException e) {
 				advisor.setResult(Status.CANCEL_STATUS);
 			} catch (Exception e) {
@@ -194,30 +197,16 @@ public class InstallApplication implements IApplication {
 	/**
 	 * Starts the p2 bundles needed to continue with the install.
 	 */
-	private void startRequiredBundles(InstallDescription description) throws CoreException {
+	private IProvisioningAgent startAgent(InstallDescription description) throws CoreException {
 		IPath installLocation = description.getInstallLocation();
 		if (installLocation == null)
 			throw fail(Messages.App_NoInstallLocation, null);
 		//set agent location if specified
 		IPath agentLocation = description.getAgentLocation();
-		if (agentLocation != null) {
-			String agentArea = System.getProperty("eclipse.p2.data.area"); //$NON-NLS-1$
-			// TODO a bit of a hack here.  If the value is already set and it is set to @config/p2 then 
-			// it may well be the default value put in by PDE.  Overwrite it.
-			// Its kind of unclear why we would NOT overwrite.  At this point the user set their choice
-			// of shared or standalone and those dicate where the agent should put its info...
-			if (agentArea == null || agentArea.length() == 0 || agentArea.startsWith("@config")) //$NON-NLS-1$
-				System.setProperty("eclipse.p2.data.area", agentLocation.toOSString()); //$NON-NLS-1$ 
-		}
-		//start up p2
 		try {
-			if (agentLocation != null) {
-				// reset the agent location
-				InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.core").stop(Bundle.STOP_TRANSIENT); //$NON-NLS-1$
-				InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.core").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-			}
-			InstallerActivator.getDefault().getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-		} catch (BundleException e) {
+			IProvisioningAgentProvider provider = (IProvisioningAgentProvider) getService(InstallerActivator.getDefault().getContext(), IProvisioningAgentProvider.SERVICE_NAME);
+			return provider.createAgent(agentLocation == null ? null : agentLocation.toFile().toURI());
+		} catch (ProvisionException e) {
 			throw fail(Messages.App_FailedStart, e);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
index 37c349b..ed8e946 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallDescriptionParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *     Code 9 - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.installer;
 
@@ -16,9 +17,12 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
+import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
+import org.eclipse.equinox.p2.metadata.VersionedId;
 import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
 
 /**
  * This class is responsible for loading install descriptions from a stream.
@@ -59,12 +63,10 @@ public class InstallDescriptionParser {
 				throw new IllegalStateException("Can't find install description file: " + installerDescription);
 			}
 		}
-		in = propsURI.toURL().openStream();
-
-		Properties properties = new Properties();
+		Map<String, String> properties;
 		try {
-			if (in != null)
-				properties.load(in);
+			in = RepositoryTransport.getInstance().stream(propsURI, monitor);
+			properties = CollectionUtils.loadProperties(in);
 		} finally {
 			safeClose(in);
 		}
@@ -75,7 +77,7 @@ public class InstallDescriptionParser {
 		initializeProfileProperties(result, properties);
 
 		// now override the properties from anything interesting in system properties
-		result = initialize(result, System.getProperties(), base);
+		result = initialize(result, CollectionUtils.toMap(System.getProperties()), base);
 		return result;
 	}
 
@@ -91,63 +93,63 @@ public class InstallDescriptionParser {
 		return URI.create(uriString.substring(0, slashIndex + 1));
 	}
 
-	private static InstallDescription initialize(InstallDescription description, Properties properties, URI base) {
-		String property = properties.getProperty(PROP_ARTIFACT_REPOSITORY);
+	private static InstallDescription initialize(InstallDescription description, Map<String, String> properties, URI base) {
+		String property = properties.get(PROP_ARTIFACT_REPOSITORY);
 		if (property != null)
 			description.setArtifactRepositories(getURIs(property, base));
 
-		property = properties.getProperty(PROP_METADATA_REPOSITORY);
+		property = properties.get(PROP_METADATA_REPOSITORY);
 		if (property != null)
 			description.setMetadataRepositories(getURIs(property, base));
 
-		property = properties.getProperty(PROP_IS_AUTO_START);
+		property = properties.get(PROP_IS_AUTO_START);
 		if (property != null)
 			description.setAutoStart(Boolean.TRUE.toString().equalsIgnoreCase(property));
 
-		property = properties.getProperty(PROP_LAUNCHER_NAME);
+		property = properties.get(PROP_LAUNCHER_NAME);
 		if (property != null)
 			description.setLauncherName(property);
 
-		property = properties.getProperty(PROP_INSTALL_LOCATION);
+		property = properties.get(PROP_INSTALL_LOCATION);
 		if (property != null)
 			description.setInstallLocation(new Path(property));
 
-		property = properties.getProperty(PROP_AGENT_LOCATION);
+		property = properties.get(PROP_AGENT_LOCATION);
 		if (property != null)
 			description.setAgentLocation(new Path(property));
 
-		property = properties.getProperty(PROP_BUNDLE_LOCATION);
+		property = properties.get(PROP_BUNDLE_LOCATION);
 		if (property != null)
 			description.setBundleLocation(new Path(property));
 
-		property = properties.getProperty(PROP_PROFILE_NAME);
+		property = properties.get(PROP_PROFILE_NAME);
 		if (property != null)
 			description.setProductName(property);
 
 		// Process the retro root id and rootVersion properties
-		String id = properties.getProperty(PROP_ROOT_ID);
+		String id = properties.get(PROP_ROOT_ID);
 		if (id != null) {
-			String version = properties.getProperty(PROP_ROOT_VERSION);
+			String version = properties.get(PROP_ROOT_VERSION);
 			try {
-				description.setRoots(new VersionedName[] {new VersionedName(id, version)});
+				description.setRoots(new IVersionedId[] {new VersionedId(id, version)});
 			} catch (IllegalArgumentException e) {
 				LogHelper.log(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, "Invalid version in install description: " + version, e)); //$NON-NLS-1$
 			}
 		}
 
-		String rootSpec = properties.getProperty(PROP_ROOTS);
+		String rootSpec = properties.get(PROP_ROOTS);
 		if (rootSpec != null) {
 			String[] rootList = getArrayFromString(rootSpec, ","); //$NON-NLS-1$
-			ArrayList roots = new ArrayList(rootList.length);
+			ArrayList<IVersionedId> roots = new ArrayList<IVersionedId>(rootList.length);
 			for (int i = 0; i < rootList.length; i++) {
 				try {
-					roots.add(VersionedName.parse(rootList[i]));
+					roots.add(VersionedId.parse(rootList[i]));
 				} catch (IllegalArgumentException e) {
 					LogHelper.log(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, "Invalid version in install description: " + rootList[i], e)); //$NON-NLS-1$
 				}
 			}
 			if (!roots.isEmpty())
-				description.setRoots((VersionedName[]) roots.toArray(new VersionedName[roots.size()]));
+				description.setRoots(roots.toArray(new IVersionedId[roots.size()]));
 		}
 		return description;
 	}
@@ -159,9 +161,9 @@ public class InstallDescriptionParser {
 	 * @param description
 	 * @param properties
 	 */
-	private static void initializeProfileProperties(InstallDescription description, Properties properties) {
+	private static void initializeProfileProperties(InstallDescription description, Map<String, String> properties) {
 		//any remaining properties are profile properties
-		Map profileProperties = new HashMap(properties);
+		Map<String, String> profileProperties = new HashMap<String, String>(properties);
 		profileProperties.remove(PROP_PROFILE_NAME);
 		profileProperties.remove(PROP_ARTIFACT_REPOSITORY);
 		profileProperties.remove(PROP_METADATA_REPOSITORY);
@@ -183,7 +185,7 @@ public class InstallDescriptionParser {
 	 */
 	private static URI[] getURIs(String spec, URI base) {
 		String[] urlSpecs = getArrayFromString(spec, ","); //$NON-NLS-1$
-		ArrayList result = new ArrayList(urlSpecs.length);
+		ArrayList<URI> result = new ArrayList<URI>(urlSpecs.length);
 		for (int i = 0; i < urlSpecs.length; i++) {
 			try {
 				URI uri = URIUtil.fromString(urlSpecs[i]);
@@ -195,7 +197,7 @@ public class InstallDescriptionParser {
 		}
 		if (result.isEmpty())
 			return null;
-		return (URI[]) result.toArray(new URI[result.size()]);
+		return result.toArray(new URI[result.size()]);
 	}
 
 	private static void safeClose(InputStream in) {
@@ -214,13 +216,13 @@ public class InstallDescriptionParser {
 	public static String[] getArrayFromString(String list, String separator) {
 		if (list == null || list.trim().equals("")) //$NON-NLS-1$
 			return new String[0];
-		List result = new ArrayList();
+		List<String> result = new ArrayList<String>();
 		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
 			String token = tokens.nextToken().trim();
 			if (!token.equals("")) //$NON-NLS-1$
 				result.add(token);
 		}
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
index 2e22451..bb2477c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallUpdateProductOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Code 9 - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.installer;
 
@@ -15,23 +16,20 @@ import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
 import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
 import org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation;
 import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
 
 /**
  * This operation performs installation or update of an Eclipse-based product.
@@ -39,7 +37,7 @@ import org.osgi.framework.ServiceReference;
 public class InstallUpdateProductOperation implements IInstallOperation {
 
 	private IArtifactRepositoryManager artifactRepoMan;
-	private BundleContext bundleContext;
+	private IProvisioningAgent agent;
 	private IDirector director;
 	private final InstallDescription installDescription;
 	private boolean isInstall = true;
@@ -47,33 +45,31 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 	private IProfileRegistry profileRegistry;
 	private IStatus result;
 
-	private ArrayList serviceReferences = new ArrayList();
-
-	public InstallUpdateProductOperation(BundleContext context, InstallDescription description) {
-		this.bundleContext = context;
+	public InstallUpdateProductOperation(IProvisioningAgent agent, InstallDescription description) {
+		this.agent = agent;
 		this.installDescription = description;
 	}
 
 	/**
 	 * Determine what top level installable units should be installed by the director
 	 */
-	private IInstallableUnit[] computeUnitsToInstall() throws CoreException {
-		ArrayList result = new ArrayList();
-		VersionedName roots[] = installDescription.getRoots();
+	private Collection<IInstallableUnit> computeUnitsToInstall() throws CoreException {
+		ArrayList<IInstallableUnit> units = new ArrayList<IInstallableUnit>();
+		IVersionedId roots[] = installDescription.getRoots();
 		for (int i = 0; i < roots.length; i++) {
-			VersionedName root = roots[i];
+			IVersionedId root = roots[i];
 			IInstallableUnit iu = findUnit(root);
 			if (iu != null)
-				result.add(iu);
+				units.add(iu);
 		}
-		return (IInstallableUnit[]) result.toArray(new IInstallableUnit[result.size()]);
+		return units;
 	}
 
 	/**
 	 * This profile is being updated; return the units to uninstall from the profile.
 	 */
-	private IInstallableUnit[] computeUnitsToUninstall(IProfile p) {
-		return (IInstallableUnit[]) p.query(InstallableUnitQuery.ANY, new Collector(), null).toArray(IInstallableUnit.class);
+	private IQueryResult<IInstallableUnit> computeUnitsToUninstall(IProfile p) {
+		return p.query(QueryUtil.createIUAnyQuery(), null);
 	}
 
 	/**
@@ -82,7 +78,7 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 	private IProfile createProfile() throws ProvisionException {
 		IProfile profile = getProfile();
 		if (profile == null) {
-			Map properties = new HashMap();
+			Map<String, String> properties = new HashMap<String, String>();
 			properties.put(IProfile.PROP_INSTALL_FOLDER, installDescription.getInstallLocation().toString());
 			EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(InstallerActivator.getDefault().getContext(), EnvironmentInfo.class.getName());
 			String env = "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -104,20 +100,20 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 		prepareMetadataRepositories();
 		prepareArtifactRepositories();
 		IProfile p = createProfile();
-		IInstallableUnit[] toInstall = computeUnitsToInstall();
+		Collection<IInstallableUnit> toInstall = computeUnitsToInstall();
 		monitor.worked(5);
 
 		IStatus s;
 		ProfileChangeRequest request = new ProfileChangeRequest(p);
 		if (isInstall) {
 			monitor.setTaskName(NLS.bind(Messages.Op_Installing, installDescription.getProductName()));
-			request.addInstallableUnits(toInstall);
+			request.addAll(toInstall);
 			s = director.provision(request, null, monitor.newChild(90));
 		} else {
 			monitor.setTaskName(NLS.bind(Messages.Op_Updating, installDescription.getProductName()));
-			IInstallableUnit[] toUninstall = computeUnitsToUninstall(p);
-			request.removeInstallableUnits(toUninstall);
-			request.addInstallableUnits(toInstall);
+			IQueryResult<IInstallableUnit> toUninstall = computeUnitsToUninstall(p);
+			request.removeAll(toUninstall.toUnmodifiableSet());
+			request.addAll(toInstall);
 			s = director.provision(request, null, monitor.newChild(90));
 		}
 		if (!s.isOK())
@@ -142,7 +138,7 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 	 * Finds and returns the installable unit with the given id, and optionally the
 	 * given version.
 	 */
-	private IInstallableUnit findUnit(VersionedName spec) throws CoreException {
+	private IInstallableUnit findUnit(IVersionedId spec) throws CoreException {
 		String id = spec.getId();
 		if (id == null)
 			throw fail(Messages.Op_NoId);
@@ -150,13 +146,12 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 		VersionRange range = VersionRange.emptyRange;
 		if (version != null && !version.equals(Version.emptyVersion))
 			range = new VersionRange(version, true, version, true);
-		Query query = new InstallableUnitQuery(id, range);
-		Collector collector = new Collector();
-		Iterator matches = metadataRepoMan.query(query, collector, null).iterator();
+		IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, range);
+		Iterator<IInstallableUnit> matches = metadataRepoMan.query(query, null).iterator();
 		// pick the newest match
 		IInstallableUnit newest = null;
 		while (matches.hasNext()) {
-			IInstallableUnit candidate = (IInstallableUnit) matches.next();
+			IInstallableUnit candidate = matches.next();
 			if (newest == null || (newest.getVersion().compareTo(candidate.getVersion()) < 0))
 				newest = candidate;
 		}
@@ -191,13 +186,9 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 	}
 
 	private Object getService(String name) throws CoreException {
-		ServiceReference ref = bundleContext.getServiceReference(name);
-		if (ref == null)
-			throw fail(Messages.Op_NoService + name);
-		Object service = bundleContext.getService(ref);
+		Object service = agent.getService(name);
 		if (service == null)
 			throw fail(Messages.Op_NoServiceImpl + name);
-		serviceReferences.add(ref);
 		return service;
 	}
 
@@ -233,20 +224,15 @@ public class InstallUpdateProductOperation implements IInstallOperation {
 	}
 
 	private void postInstall() {
-		for (Iterator it = serviceReferences.iterator(); it.hasNext();) {
-			ServiceReference sr = (ServiceReference) it.next();
-			bundleContext.ungetService(sr);
-		}
-		serviceReferences.clear();
+		//nothing to do
 	}
 
 	private void preInstall() throws CoreException {
 		//obtain required services
-		serviceReferences.clear();
-		director = (IDirector) getService(IDirector.class.getName());
-		metadataRepoMan = (IMetadataRepositoryManager) getService(IMetadataRepositoryManager.class.getName());
-		artifactRepoMan = (IArtifactRepositoryManager) getService(IArtifactRepositoryManager.class.getName());
-		profileRegistry = (IProfileRegistry) getService(IProfileRegistry.class.getName());
+		director = (IDirector) getService(IDirector.SERVICE_NAME);
+		metadataRepoMan = (IMetadataRepositoryManager) getService(IMetadataRepositoryManager.SERVICE_NAME);
+		artifactRepoMan = (IArtifactRepositoryManager) getService(IArtifactRepositoryManager.SERVICE_NAME);
+		profileRegistry = (IProfileRegistry) getService(IProfileRegistry.SERVICE_NAME);
 	}
 
 	private void prepareArtifactRepositories() throws ProvisionException {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java
index 57a66c2..da6f3ff 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/InstallerActivator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.installer;
 
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle
@@ -24,10 +24,6 @@ public class InstallerActivator implements BundleActivator {
 
 	private BundleContext context;
 
-	private PackageAdmin packageAdmin = null;
-
-	private ServiceReference packageAdminRef = null;
-
 	/**
 	 * Returns the shared instance
 	 *
@@ -44,21 +40,6 @@ public class InstallerActivator implements BundleActivator {
 		//nothing to do
 	}
 
-	public Bundle getBundle(String symbolicName) {
-		if (packageAdmin == null)
-			return null;
-		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
-			return null;
-		//Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
-				return bundles[i];
-			}
-		}
-		return null;
-	}
-
 	/**
 	 * Returns the bundle context for this bundle.
 	 * @return the bundle context
@@ -74,8 +55,6 @@ public class InstallerActivator implements BundleActivator {
 	public void start(BundleContext aContext) throws Exception {
 		this.context = aContext;
 		plugin = this;
-		packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
-		packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
 	}
 
 	/*
@@ -83,9 +62,6 @@ public class InstallerActivator implements BundleActivator {
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 	 */
 	public void stop(BundleContext aContext) throws Exception {
-		context.ungetService(packageAdminRef);
-		packageAdmin = null;
-		packageAdminRef = null;
 		plugin = null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java
index dd03c2a..82334a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/Messages.java
@@ -37,8 +37,11 @@ public class Messages extends NLS {
 	public static String Dialog_LocationField;
 	public static String Dialog_LocationLabel;
 	public static String Dialog_LocationPrompt;
+	public static String Dialog_ManualProxyCheckBox;
 	public static String Dialog_PromptStart;
+	public static String Dialog_ProxiesGroup;
 	public static String Dialog_SelectLocation;
+	public static String Dialog_SettingsButton;
 	public static String Dialog_SharedButton;
 	public static String Dialog_ShellTitle;
 	public static String Dialog_StandaloneButton;
@@ -47,11 +50,29 @@ public class Messages extends NLS {
 	public static String Op_Installing;
 	public static String Op_IUNotFound;
 	public static String Op_NoId;
-	public static String Op_NoService;
 	public static String Op_NoServiceImpl;
 	public static String Op_Preparing;
 	public static String Op_UpdateComplete;
 	public static String Op_Updating;
+	public static String ProxiesDialog_DialogTitle;
+	public static String ProxiesDialog_EmptyHostMessage;
+	public static String ProxiesDialog_EmptyPasswordMessage;
+	public static String ProxiesDialog_EmptyProtMessage;
+	public static String ProxiesDialog_EmptyUserMessage;
+	public static String ProxiesDialog_FailedToReadProxySettingsMessage;
+	public static String ProxiesDialog_FailedToSetProxyMessage;
+	public static String ProxiesDialog_HostLabel;
+	public static String ProxiesDialog_InvalitHostMessage;
+	public static String ProxiesDialog_NegativValue;
+	public static String ProxiesDialog_OkLabel;
+	public static String ProxiesDialog_PasswordLabel;
+	public static String ProxiesDialog_PortLabel;
+	public static String ProxiesDialog_ServiceNotAvailableMessage;
+	public static String ProxiesDialog_ShemaLabel;
+	public static String ProxiesDialog_StatusPrefix;
+	public static String ProxiesDialog_UnknownProxyTypeMessage;
+	public static String ProxiesDialog_UserLabel;
+	public static String ProxiesDialog_WrongFormat;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
index cda5bbd..b34f850 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/messages.properties
@@ -28,8 +28,11 @@ Dialog_LayoutGroup=Layout
 Dialog_LocationField=Location
 Dialog_LocationLabel=Select the product install directory:
 Dialog_LocationPrompt=Select where you want {0} to be installed
+Dialog_ManualProxyCheckBox=Use manual proxy settings
 Dialog_PromptStart=Install complete. Do you want to start {0} immediately?
+Dialog_ProxiesGroup=Proxy Settings
 Dialog_SelectLocation=Select the install location
+Dialog_SettingsButton=Settings...
 Dialog_SharedButton=&Shared install
 Dialog_ShellTitle=Installer
 Dialog_StandaloneButton=Stand-&alone install
@@ -38,8 +41,26 @@ Op_InstallComplete=Install complete
 Op_Installing=Installing {0}
 Op_IUNotFound=Installable unit not found: 
 Op_NoId=Installable unit id not specified
-Op_NoService=Install requires a service that is not available: 
 Op_NoServiceImpl=Install requires a service implementation that is not available: 
 Op_Preparing=Preparing to install
 Op_UpdateComplete=Update complete
 Op_Updating=Updating {0}
+ProxiesDialog_DialogTitle=Proxy Settings Dialog
+ProxiesDialog_EmptyHostMessage=Empty host
+ProxiesDialog_EmptyPasswordMessage=Empty password
+ProxiesDialog_EmptyProtMessage=Empty port
+ProxiesDialog_EmptyUserMessage=Empty user
+ProxiesDialog_FailedToReadProxySettingsMessage=Failed to read proxy settings
+ProxiesDialog_FailedToSetProxyMessage=Failed to set proxy settings.
+ProxiesDialog_HostLabel=Host:
+ProxiesDialog_InvalitHostMessage=Invalid host
+ProxiesDialog_NegativValue=Proxy value can not be negativ
+ProxiesDialog_OkLabel=OK
+ProxiesDialog_PasswordLabel=Password:
+ProxiesDialog_PortLabel=Port:
+ProxiesDialog_ServiceNotAvailableMessage=Failed to set proxy settings. Service not available
+ProxiesDialog_ShemaLabel=Schema:
+ProxiesDialog_StatusPrefix=Status: 
+ProxiesDialog_UnknownProxyTypeMessage=Not applied because proxy type unknown.
+ProxiesDialog_UserLabel=User:
+ProxiesDialog_WrongFormat=Wrong proxy format
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
index 7e1e062..d78406a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/InstallDialog.java
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.installer.ui;
 
+import org.eclipse.core.net.proxy.IProxyService;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.installer.InstallerActivator;
-import org.eclipse.equinox.internal.p2.installer.Messages;
+import org.eclipse.equinox.internal.p2.installer.*;
 import org.eclipse.equinox.internal.provisional.p2.installer.IInstallOperation;
 import org.eclipse.equinox.internal.provisional.p2.installer.InstallDescription;
 import org.eclipse.osgi.util.NLS;
@@ -160,6 +160,8 @@ public class InstallDialog {
 	private Shell shell;
 
 	private boolean waitingForClose = false;
+	private Button proxySettingsButton;
+	private Button manualProxyTypeCheckBox;
 
 	/**
 	 * Creates and opens a progress monitor dialog.
@@ -172,6 +174,7 @@ public class InstallDialog {
 		createProgressControls();
 		createButtonBar();
 
+		shell.pack();
 		shell.layout();
 		shell.open();
 	}
@@ -306,6 +309,54 @@ public class InstallDialog {
 		settingsExplain.setLayoutData(data);
 		settingsExplain.setText(Messages.Dialog_ExplainStandalone);
 
+		//The group asking for the product proxy configuration
+		Group proxySettingsGroup = new Group(settingsGroup, SWT.NONE);
+		proxySettingsGroup.setLayout(new GridLayout());
+		proxySettingsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+		proxySettingsGroup.setText(Messages.Dialog_ProxiesGroup);
+
+		//The sub-group with check box, label entry field and settings button
+		Composite proxySettingsFieldGroup = new Composite(proxySettingsGroup, SWT.NONE);
+		proxySettingsFieldGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+		layout = new GridLayout();
+		layout.numColumns = 3;
+		layout.makeColumnsEqualWidth = false;
+		proxySettingsFieldGroup.setLayout(layout);
+
+		manualProxyTypeCheckBox = new Button(proxySettingsFieldGroup, SWT.CHECK);
+		manualProxyTypeCheckBox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		manualProxyTypeCheckBox.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				IProxyService proxies = (IProxyService) InstallApplication.getService(InstallerActivator.getDefault().getContext(), IProxyService.class.getName());
+				if (proxies != null) {
+					//When the manual check box is selected the system properties should be disabled. 
+					//This cases the net component to switch to manual proxy provider.
+					proxies.setSystemProxiesEnabled(!manualProxyTypeCheckBox.getSelection());
+					if (proxySettingsButton != null) {
+						proxySettingsButton.setEnabled(manualProxyTypeCheckBox.getSelection());
+					}
+				} else {
+					openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
+				}
+			}
+		});
+		manualProxyTypeCheckBox.setText(Messages.Dialog_ManualProxyCheckBox);
+		proxySettingsButton = new Button(proxySettingsFieldGroup, SWT.PUSH);
+		proxySettingsButton.setLayoutData(new GridData(BUTTON_WIDTH, SWT.DEFAULT));
+		proxySettingsButton.setText(Messages.Dialog_SettingsButton);
+		proxySettingsButton.setEnabled(manualProxyTypeCheckBox.getSelection());
+		proxySettingsButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				IProxyService proxies = (IProxyService) InstallApplication.getService(InstallerActivator.getDefault().getContext(), IProxyService.class.getName());
+				if (proxies != null) {
+					ProxiesDialog proxiesDialog = new ProxiesDialog(proxies);
+					proxiesDialog.open();
+				} else {
+					openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
+				}
+			}
+		});
+
 		//make the entire group invisible until we actually need to prompt for locations
 		settingsGroup.setVisible(false);
 	}
@@ -504,4 +555,10 @@ public class InstallDialog {
 		else
 			settingsExplain.setText(Messages.Dialog_ExplainShared);
 	}
+
+	private void openMessage(String msg, int style) {
+		MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(), style);
+		messageBox.setMessage(msg);
+		messageBox.open();
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java
new file mode 100644
index 0000000..91dc773
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/p2/installer/ui/ProxiesDialog.java
@@ -0,0 +1,312 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     EclipseSource
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.installer.ui;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.net.proxy.IProxyData;
+import org.eclipse.core.net.proxy.IProxyService;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.installer.InstallerActivator;
+import org.eclipse.equinox.internal.p2.installer.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+public final class ProxiesDialog {
+
+	private IProxyData data;
+	private Label typeLabel;
+	private Combo typeCombo;
+	private Label hostLabel;
+	private Text hostText;
+	private Label portLabel;
+	private Text portText;
+
+	private Label userIdLabel;
+	private Text userIdText;
+	private Label passwordLabel;
+	private Text passwordText;
+	private Button okButton;
+	private Button cancelButton;
+	private final IProxyService service;
+	private Shell shell;
+	private List<String> types;
+	private Label statuslabel;
+
+	public ProxiesDialog(IProxyService service) {
+		if (service == null) {
+			throw new IllegalArgumentException();
+		}
+
+		this.service = service;
+		initTypes();
+	}
+
+	public IProxyData getValue() {
+		return data;
+	}
+
+	public void open() {
+		this.data = service.getProxyData(IProxyData.HTTP_PROXY_TYPE);
+		if (data == null) {
+			openMessage(Messages.ProxiesDialog_FailedToReadProxySettingsMessage, SWT.ICON_ERROR | SWT.OK);
+			return;
+		}
+
+		Shell activeShell = Display.getDefault().getActiveShell();
+		shell = new Shell(activeShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.MIN | SWT.RESIZE);
+		//Computes the bounds
+		Rectangle bounds = null;
+		if (activeShell == null) {
+			bounds = new Rectangle(300, 200, 600, 400);
+		} else {
+			Rectangle parentBounds = activeShell.getBounds();
+			bounds = new Rectangle(parentBounds.x + 100, parentBounds.y + 100, 600, 400);
+		}
+		shell.setBounds(bounds);
+
+		shell.setText(Messages.ProxiesDialog_DialogTitle);
+		shell.setLayout(new GridLayout());
+
+		createDialogArea(shell);
+		createButtonBar(shell);
+
+		shell.pack();
+		shell.open();
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		composite.setLayout(new GridLayout(4, false));
+		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
+
+		typeLabel = new Label(composite, SWT.NONE);
+		typeLabel.setText(Messages.ProxiesDialog_ShemaLabel);
+		typeLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
+		typeCombo = new Combo(composite, SWT.BORDER);
+		typeCombo.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 3, 1));
+		//Currently only these three proxy types are supported.
+		for (int i = 0; i < types.size(); i++) {
+			typeCombo.add(types.get(i));
+		}
+
+		typeCombo.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				String selection = typeCombo.getText();
+				IProxyData selectedProxy = service.getProxyData(selection);
+				if (selectedProxy == null) {
+					updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_UnknownProxyTypeMessage, null));
+				} else {
+					data = selectedProxy;
+					applyData();
+				}
+			}
+		});
+
+		hostLabel = new Label(composite, SWT.NONE);
+		hostLabel.setText(Messages.ProxiesDialog_HostLabel);
+		hostLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
+		hostText = new Text(composite, SWT.BORDER);
+		GridData gdata = new GridData(SWT.FILL, SWT.TOP, true, false);
+		gdata.widthHint = 250;
+		hostText.setLayoutData(gdata);
+
+		portLabel = new Label(composite, SWT.NONE);
+		portLabel.setText(Messages.ProxiesDialog_PortLabel);
+		portText = new Text(composite, SWT.BORDER);
+		gdata = new GridData();
+		gdata.widthHint = 30;
+		portText.setLayoutData(gdata);
+
+		userIdLabel = new Label(composite, SWT.NONE);
+		userIdLabel.setText(Messages.ProxiesDialog_UserLabel);
+		userIdLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
+		userIdText = new Text(composite, SWT.BORDER);
+		userIdText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3, 1));
+
+		passwordLabel = new Label(composite, SWT.NONE);
+		passwordLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, true, 1, 1));
+		passwordLabel.setText(Messages.ProxiesDialog_PasswordLabel);
+		passwordText = new Text(composite, SWT.BORDER);
+		passwordText.setEchoChar('*');
+		passwordText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 3, 1));
+
+		ModifyListener validationListener = new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				updateStatus();
+			}
+		};
+		typeCombo.addModifyListener(validationListener);
+		hostText.addModifyListener(validationListener);
+		portText.addModifyListener(validationListener);
+		userIdText.addModifyListener(validationListener);
+		passwordText.addModifyListener(validationListener);
+
+		//Initialize the UI with the selected data
+		applyData();
+		hostText.setFocus();
+		updateStatus();
+		return composite;
+	}
+
+	private void createButtonBar(Composite parent) {
+		Composite buttonBar = new Composite(parent, SWT.NONE);
+		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+		gridData.horizontalAlignment = SWT.RIGHT;
+		buttonBar.setLayoutData(gridData);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 3;
+		layout.makeColumnsEqualWidth = false;
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		buttonBar.setLayout(layout);
+
+		statuslabel = new Label(buttonBar, SWT.NONE);
+		gridData = new GridData(300, SWT.DEFAULT);
+		statuslabel.setLayoutData(gridData);
+
+		okButton = new Button(buttonBar, SWT.PUSH);
+		gridData = new GridData(100, SWT.DEFAULT);
+		okButton.setLayoutData(gridData);
+		okButton.setText(Messages.ProxiesDialog_OkLabel);
+		okButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				okPressed();
+				shell.dispose();
+			}
+		});
+
+		cancelButton = new Button(buttonBar, SWT.PUSH);
+		cancelButton.setLayoutData(gridData);
+		cancelButton.setText(Messages.Dialog_CancelButton);
+		cancelButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				shell.dispose();
+			}
+		});
+	}
+
+	public void create() {
+		validateHostName();
+	}
+
+	private String toString(String str) {
+		return str == null ? "" : str; //$NON-NLS-1$
+	}
+
+	private void applyData() {
+		typeCombo.setText(toString(data.getType()));
+		hostText.setText(toString(data.getHost()));
+		if (data.getPort() != -1) {
+			portText.setText(toString(Integer.toString(data.getPort())));
+		} else {
+			portText.setText(""); //$NON-NLS-1$
+		}
+		userIdText.setText(toString(data.getUserId()));
+		passwordText.setText(toString(data.getPassword()));
+	}
+
+	private boolean validateHostName() {
+		try {
+			new URI(hostText.getText());
+		} catch (URISyntaxException e) {
+			updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_InvalitHostMessage, null));
+			return false;
+		}
+		return true;
+	}
+
+	protected void okPressed() {
+		data.setHost(hostText.getText());
+		data.setPort(Integer.parseInt(portText.getText()));
+		data.setUserid(userIdText.getText());
+		data.setPassword(passwordText.getText());
+		try {
+			if (service != null) {
+				service.setProxyData(new IProxyData[] {data});
+			} else {
+				openMessage(Messages.ProxiesDialog_ServiceNotAvailableMessage, SWT.ICON_ERROR | SWT.OK);
+			}
+		} catch (Exception e) {
+			openMessage(Messages.ProxiesDialog_FailedToSetProxyMessage + e.getLocalizedMessage(), SWT.ICON_ERROR | SWT.OK);
+		}
+	}
+
+	protected void updateStatus() {
+		if (!validateHostName()) {
+			return;
+		}
+		if (hostText.getText().length() == 0) {
+			updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyHostMessage, null));
+			return;
+		}
+
+		if (userIdText.getText().length() == 0) {
+			updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyUserMessage, null));
+			return;
+		}
+
+		if (passwordText.getText().length() == 0) {
+			updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyPasswordMessage, null));
+			return;
+		}
+
+		try {
+			//Port checks
+			String portAsString = portText.getText();
+			if (portAsString == null || portAsString.length() == 0) {
+				updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_EmptyProtMessage, null));
+				return;
+			}
+			int port = Integer.parseInt(portAsString);
+			if (port < 0) {
+				updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_NegativValue, null));
+				return;
+			}
+		} catch (NumberFormatException e) {
+			updateStatus(new Status(IStatus.ERROR, InstallerActivator.PI_INSTALLER, IStatus.OK, Messages.ProxiesDialog_WrongFormat, null));
+			return;
+		}
+		updateStatus(Status.OK_STATUS);
+	}
+
+	private void updateStatus(IStatus status) {
+
+		if (okButton != null) {
+			okButton.setEnabled(status.isOK());
+		}
+		if (statuslabel != null) {
+			String statusText = status.isOK() ? "" : Messages.ProxiesDialog_StatusPrefix + status.getMessage(); //$NON-NLS-1$
+			statuslabel.setText(statusText);
+		}
+	}
+
+	private void openMessage(String msg, int style) {
+		MessageBox messageBox = new MessageBox(Display.getDefault().getActiveShell(), style);
+		messageBox.setMessage(msg);
+		messageBox.open();
+	}
+
+	private void initTypes() {
+		types = new ArrayList<String>();
+		types.add(IProxyData.HTTP_PROXY_TYPE);
+		types.add(IProxyData.HTTPS_PROXY_TYPE);
+		types.add(IProxyData.SOCKS_PROXY_TYPE);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
index 55f982b..b8adccc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.installer/src/org/eclipse/equinox/internal/provisional/p2/installer/InstallDescription.java
@@ -15,7 +15,7 @@ import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
 
 /**
  * An install information captures all the data needed to perform a product install.
@@ -31,8 +31,8 @@ public class InstallDescription {
 	private String launcherName;
 	private URI[] metadataRepos;
 	private String productName;
-	private VersionedName[] roots;
-	private final Map profileProperties = new HashMap();
+	private IVersionedId[] roots;
+	private final Map<String, String> profileProperties = new HashMap<String, String>();
 
 	/**
 	 * Returns the p2 agent location, or <code>null</code> to indicate
@@ -85,7 +85,7 @@ public class InstallDescription {
 	/**
 	 * Returns the profile properties for this install.
 	 */
-	public Map getProfileProperties() {
+	public Map<String, String> getProfileProperties() {
 		return profileProperties;
 	}
 
@@ -139,7 +139,7 @@ public class InstallDescription {
 	 * Supplies a set of profile properties to be added when the profile is created.
 	 * @param properties the profile properties to be added
 	 */
-	public void setProfileProperties(Map properties) {
+	public void setProfileProperties(Map<String, String> properties) {
 		profileProperties.putAll(properties);
 	}
 
@@ -147,7 +147,7 @@ public class InstallDescription {
 	 * Returns the set of roots to be installed for this installation
 	 * @return the roots to install
 	 */
-	public VersionedName[] getRoots() {
+	public IVersionedId[] getRoots() {
 		return roots;
 	}
 
@@ -155,7 +155,7 @@ public class InstallDescription {
 	 * Set the list of roots to install
 	 * @param value the set of roots to install
 	 */
-	public void setRoots(VersionedName[] value) {
+	public void setRoots(IVersionedId[] value) {
 		roots = value;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
index dfcc592..a465148 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
@@ -1,340 +1,345 @@
-#Wed Aug 29 00:45:32 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+#Thu Sep 24 13:53:16 EDT 2009
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
 org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.incompleteClasspath=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.nullReference=ignore
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
index 9dc4051..0d3112f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,60 @@
-#Wed Aug 29 00:45:32 EDT 2007
-eclipse.preferences.version=1
+#Thu Sep 24 13:53:46 EDT 2009
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.sort_members=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.remove_unused_private_members=false
+org.eclipse.jdt.ui.staticondemandthreshold=3
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.never_use_parentheses_in_expressions=true
 formatter_profile=_core
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.organize_imports=true
+sp_cleanup.always_use_blocks=true
+org.eclipse.jdt.ui.importorder=;
+sp_cleanup.use_blocks=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members_all=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.ondemandthreshold=3
+sp_cleanup.add_missing_methods=false
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.format_source_code=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.remove_unused_private_fields=true
 formatter_settings_version=11
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+org.eclipse.jdt.ui.ignorelowercasenames=true
+sp_cleanup.add_serial_version_id=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
index 86bd99a..5c21d1f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
@@ -4,10 +4,13 @@ Bundle-SymbolicName: org.eclipse.equinox.p2.jarprocessor;singleton:=true
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
  J2SE-1.4
+Main-Class: org.eclipse.equinox.internal.p2.jarprocessor.Main
 Export-Package: org.eclipse.equinox.internal.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build",
  org.eclipse.equinox.internal.p2.jarprocessor.unsigner;x-internal:=true,
  org.eclipse.equinox.internal.p2.jarprocessor.verifier;x-internal:=true,
  org.eclipse.internal.provisional.equinox.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build"
+Import-Package: org.eclipse.core.runtime.jobs;resolution:=optional
+Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/localbuild.xml b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
index 107dcb2..e5729a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
@@ -8,5 +8,7 @@
 		<mkdir dir="lib" />
 		<delete file="lib/jarprocessor-ant.jar" failonerror="false"/>
 		<jar destfile="lib/jarprocessor-ant.jar" basedir="bin_ant"/>
+		<eclipse.convertPath fileSystemPath="${basedir}/lib" property="resourcePath"/>
+		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
 	</target>
 </project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/pom.xml
new file mode 100644
index 0000000..2443cf4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.jarprocessor</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
index f5652ae..dde6660 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,16 +15,12 @@ import java.util.List;
 import java.util.Properties;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.IProcessStep;
 
-/**
- * @author aniefer at ca.ibm.com
- *
- */
 public abstract class CommandStep implements IProcessStep {
 	protected String command = null;
 	protected String extension = null;
-	private  Properties options = null;
+	private Properties options = null;
 	protected boolean verbose = false;
-	
+
 	public CommandStep(Properties options, String command, String extension, boolean verbose) {
 		this.command = command;
 		this.extension = extension;
@@ -35,18 +31,16 @@ public abstract class CommandStep implements IProcessStep {
 	protected static int execute(String[] cmd) {
 		return execute(cmd, false);
 	}
-	
+
 	protected static int execute(String[] cmd, boolean verbose) {
 		Runtime runtime = Runtime.getRuntime();
 		Process proc = null;
 		try {
 			proc = runtime.exec(cmd);
-			StreamProcessor errorStreamProcessor = new StreamProcessor(proc.getErrorStream(), StreamProcessor.STDERR, verbose); 
-			StreamProcessor outputStreamProcessor = new StreamProcessor(proc.getInputStream(), StreamProcessor.STDOUT, verbose); 
-			errorStreamProcessor.start();
-			outputStreamProcessor.start();
+			StreamProcessor.start(proc.getErrorStream(), StreamProcessor.STDERR, verbose);
+			StreamProcessor.start(proc.getInputStream(), StreamProcessor.STDOUT, verbose);
 		} catch (Exception e) {
-			if(verbose) {
+			if (verbose) {
 				System.out.println("Error executing command " + Utils.concat(cmd)); //$NON-NLS-1$
 				e.printStackTrace();
 			}
@@ -56,18 +50,18 @@ public abstract class CommandStep implements IProcessStep {
 			int result = proc.waitFor();
 			return result;
 		} catch (InterruptedException e) {
-			if(verbose)
+			if (verbose)
 				e.printStackTrace();
 		}
 		return -1;
 	}
-	
+
 	public Properties getOptions() {
-		if(options == null)
+		if (options == null)
 			options = new Properties();
 		return options;
 	}
-	
+
 	public void adjustInf(File input, Properties inf, List containers) {
 		//nothing
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
index 9258caf..3d51973 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
@@ -12,11 +12,7 @@ package org.eclipse.equinox.internal.p2.jarprocessor;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
 
 public class PackStep extends CommandStep {
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
index cdab812..df1a236 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,21 +12,36 @@ package org.eclipse.equinox.internal.p2.jarprocessor;
 
 import java.io.*;
 
-public class StreamProcessor extends Thread {
+public class StreamProcessor {
+	private static final String JOBS = "org.eclipse.core.runtime.jobs.Job"; //$NON-NLS-1$
+	public static final String STREAM_PROCESSOR = "Stream Processor"; //$NON-NLS-1$
 	public static final String STDERR = "STDERR"; //$NON-NLS-1$
 	public static final String STDOUT = "STDOUT"; //$NON-NLS-1$
 
-	private InputStream inputStream;
-	private String name;
-	private boolean verbose;
+	static private boolean haveJobs = false;
 
-	public StreamProcessor(InputStream is, String name, boolean verbose) {
-		this.inputStream = is;
-		this.name = name;
-		this.verbose = verbose;
+	static {
+		try {
+			haveJobs = (Class.forName(JOBS) != null);
+		} catch (ClassNotFoundException e) {
+			//no jobs
+		}
+	}
+
+	static public void start(final InputStream is, final String name, final boolean verbose) {
+		if (haveJobs) {
+			new StreamProcessorJob(is, name, verbose).schedule();
+		} else {
+			Thread job = new Thread(STREAM_PROCESSOR) {
+				public void run() {
+					StreamProcessor.run(is, name, verbose);
+				}
+			};
+			job.start();
+		}
 	}
 
-	public void run() {
+	static public void run(InputStream inputStream, String name, boolean verbose) {
 		try {
 			InputStreamReader isr = new InputStreamReader(inputStream);
 			BufferedReader br = new BufferedReader(isr);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
new file mode 100644
index 0000000..db404fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.jarprocessor;
+
+import java.io.InputStream;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+
+public class StreamProcessorJob extends Job {
+	private InputStream inputStream = null;
+	private String name = null;
+	private boolean verbose = false;
+
+	public StreamProcessorJob(InputStream stream, String name, boolean verbose) {
+		super(StreamProcessor.STREAM_PROCESSOR + " : " + name); //$NON-NLS-1$
+		setPriority(Job.SHORT);
+		setSystem(true);
+		this.inputStream = stream;
+		this.name = name;
+		this.verbose = verbose;
+	}
+
+	protected IStatus run(IProgressMonitor monitor) {
+		StreamProcessor.run(inputStream, name, verbose);
+		inputStream = null;
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
index 9cf22bc..d6bbc6a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
@@ -15,7 +15,6 @@ import java.util.*;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.zip.ZipException;
-
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
index 9dad578..9f413f0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
@@ -10,19 +10,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.jarprocessor;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipOutputStream;
-
+import java.io.*;
+import java.util.*;
+import java.util.zip.*;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
 
@@ -34,20 +24,20 @@ public class ZipProcessor {
 
 	private JarProcessorExecutor executor = null;
 	private JarProcessorExecutor.Options options = null;
-	
+
 	private String workingDirectory = null;
 	private Properties properties = null;
 	private Set packExclusions = null;
 	private Set signExclusions = null;
-	
+
 	public void setExecutor(JarProcessorExecutor executor) {
 		this.executor = executor;
 	}
-	
+
 	public void setOptions(JarProcessorExecutor.Options options) {
 		this.options = options;
 	}
-	
+
 	public void setWorkingDirectory(String dir) {
 		workingDirectory = dir;
 	}
@@ -61,7 +51,7 @@ public class ZipProcessor {
 	private boolean repacking() {
 		return options.repack || (options.pack && options.signCommand != null);
 	}
-	
+
 	public void processZip(File zipFile) throws ZipException, IOException {
 		if (options.verbose)
 			System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
@@ -180,7 +170,7 @@ public class ZipProcessor {
 						Utils.transferStreams(entryStream, zipOut, false);
 						zipOut.closeEntry();
 					} catch (ZipException e) {
-						if(options.verbose) {
+						if (options.verbose) {
 							System.out.println("Warning: " + name + " already exists in " + outputFile.getName() + ".  Skipping.");
 						}
 					}
@@ -189,7 +179,7 @@ public class ZipProcessor {
 
 				if (extractedFile != null)
 					Utils.clear(extractedFile);
-				
+
 				if (options.verbose) {
 					System.out.println();
 					System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
index 075d88b..322d779 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
@@ -11,10 +11,9 @@
 
 package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
 
-import java.io.File;
-import java.io.FileNotFoundException;
+import java.io.*;
+import java.util.Iterator;
 import java.util.Properties;
-
 import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
 import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
@@ -39,14 +38,14 @@ public class Verifier extends JarProcessorExecutor {
 		}
 
 		String workingDirectory = null;
-		String [] input;
-		
-		if(args.length == 0) {
+		String[] input;
+
+		if (args.length == 0) {
 			workingDirectory = "."; //$NON-NLS-1$
 			input = new String[] {"."}; //$NON-NLS-1$
-		}else {
+		} else {
 			int idx = 0;
-			if(args[0] == "-help"){ //$NON-NLS-1$
+			if (args[0] == "-help") { //$NON-NLS-1$
 				printUsage();
 				return;
 			}
@@ -60,43 +59,50 @@ public class Verifier extends JarProcessorExecutor {
 			input = new String[args.length - idx];
 			System.arraycopy(args, idx, input, 0, args.length - idx);
 		}
-		
+
 		File workingDir = new File(workingDirectory);
 		boolean clear = false;
-		if( workingDir.exists()) {
-			workingDir = new File( workingDir, "jarprocessor.verifier.temp"); //$NON-NLS-1$
+		if (workingDir.exists()) {
+			workingDir = new File(workingDir, "jarprocessor.verifier.temp"); //$NON-NLS-1$
 			clear = true;
 		}
-		
+
 		Verifier verifier = new Verifier();
 		verifier.verify(workingDir, input);
-		
-		if(clear)
+
+		if (clear)
 			workingDir.deleteOnExit();
 	}
 
 	public void verify(final File workingDirectory, String[] input) {
-		Properties options = new Properties();
+		options = new Options();
+		options.verbose = false;
+		options.repack = true; // We first unpack first during repack/sign phase
+		options.pack = true; // then we are verifying during the pack phase.
+		options.outputDir = workingDirectory.toString();
 
-		JarProcessor unpacker = new JarProcessor();
-		unpacker.addProcessStep(new UnpackStep(options, false));
-		unpacker.setWorkingDirectory(workingDirectory.getAbsolutePath());
+		Properties properties = new Properties();
 
 		/* There is no need to use a full processor to do the verification unless we want to verify nested jars as well.
 		 * So for now, use a custom processor to just call the verify step directly.
 		 */
-		final VerifyStep verifyStep = new VerifyStep(options, false);
+		final VerifyStep verifyStep = new VerifyStep(properties, false);
 		JarProcessor verifier = new JarProcessor() {
-			public File processJar(File inputFile) {
-				return verifyStep.postProcess(inputFile, workingDirectory, null);
+			public File processJar(File inputFile) throws IOException {
+				Iterator iterator = getStepIterator();
+				if (iterator.hasNext() && iterator.next() instanceof VerifyStep)
+					return verifyStep.postProcess(inputFile, workingDirectory, null);
+				//else we are unpacking, call super
+				return super.processJar(inputFile);
 			}
 		};
+		verifier.setWorkingDirectory(workingDirectory.getAbsolutePath());
 
 		for (int i = 0; i < input.length; i++) {
 			File inputFile = new File(input[i]);
 			if (inputFile.exists()) {
 				try {
-					process(inputFile, Utils.PACK_GZ_FILTER, true, unpacker, verifier);
+					process(inputFile, Utils.PACK_GZ_FILTER, true, verifier, properties);
 				} catch (FileNotFoundException e) {
 					e.printStackTrace();
 				}
@@ -104,4 +110,12 @@ public class Verifier extends JarProcessorExecutor {
 		}
 		Utils.clear(workingDirectory);
 	}
+
+	public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
+		processor.addProcessStep(new VerifyStep(properties, processOptions.verbose));
+	}
+
+	public void addPackUnpackStep(JarProcessor processor, Properties properties, Options processOptions) {
+		processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
index 7e63698..f9b1935 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
@@ -13,7 +13,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.List;
 import java.util.Properties;
-
 import org.eclipse.equinox.internal.p2.jarprocessor.CommandStep;
 import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
index 0badecc..b22bc8e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import org.eclipse.equinox.internal.p2.jarprocessor.*;
 
 public class JarProcessor {
 	public static final String PACKED_SUFFIX = "pack.gz"; //$NON-NLS-1$
-	
+
 	private List steps = new ArrayList();
 	private String workingDirectory = ""; //$NON-NLS-1$
 	private int depth = -1;
@@ -54,15 +54,15 @@ public class JarProcessor {
 	}
 
 	public void setWorkingDirectory(String dir) {
-		if(dir != null)
+		if (dir != null)
 			workingDirectory = dir;
 	}
-	
+
 	public void setVerbose(boolean verbose) {
 		this.verbose = verbose;
 	}
-	
-	public void setProcessAll(boolean all){
+
+	public void setProcessAll(boolean all) {
 		this.processAll = all;
 	}
 
@@ -74,6 +74,10 @@ public class JarProcessor {
 		steps.clear();
 	}
 
+	public Iterator getStepIterator() {
+		return steps.iterator();
+	}
+
 	/**
 	 * Recreate a jar file.  The replacements map specifies entry names to be replaced, the replacements are
 	 * expected to be found in directory.
@@ -103,11 +107,11 @@ public class JarProcessor {
 							} catch (Exception e) {
 								if (verbose) {
 									e.printStackTrace();
-									System.out.println("Warning: Problem reading " +replacement.getPath() + ", using " + jar.getName() + File.separator + entry.getName()  + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+									System.out.println("Warning: Problem reading " + replacement.getPath() + ", using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 								}
 							}
 						} else if (verbose) {
-							System.out.println("Warning: " + replacement.getPath() + " not found, using " + jar.getName() + File.separator + entry.getName() + " instead.");	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							System.out.println("Warning: " + replacement.getPath() + " not found, using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 						}
 					}
 				}
@@ -115,8 +119,8 @@ public class JarProcessor {
 					try {
 						in = new BufferedInputStream(jar.getInputStream(entry));
 						newEntry = new JarEntry(entry.getName());
-					} catch( Exception e ) {
-						if(verbose) {
+					} catch (Exception e) {
+						if (verbose) {
 							e.printStackTrace();
 							System.out.println("ERROR: problem reading " + entry.getName() + " from " + jar.getName()); //$NON-NLS-1$ //$NON-NLS-2$
 						}
@@ -166,28 +170,28 @@ public class JarProcessor {
 	}
 
 	private void extractEntries(JarFile jar, File tempDir, Map data, Properties inf) throws IOException {
-		if(inf != null ) {
+		if (inf != null) {
 			//skip if excluding children
-			if(inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN)){
+			if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN)) {
 				String excludeChildren = inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN);
-				if( Boolean.valueOf(excludeChildren).booleanValue() )
-					if(verbose){
-						for(int i = 0; i <= depth; i++)
+				if (Boolean.valueOf(excludeChildren).booleanValue())
+					if (verbose) {
+						for (int i = 0; i <= depth; i++)
 							System.out.print("  "); //$NON-NLS-1$
 						System.out.println("Children of " + jar.getName() + "are excluded from processing."); //$NON-NLS-1$ //$NON-NLS-2$
 					}
-					return;
+				return;
 			}
 		}
-		
+
 		Enumeration entries = jar.entries();
 		if (entries.hasMoreElements()) {
 			for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
 				String name = entry.getName();
 				String newName = recursionEffect(name);
 				if (newName != null) {
-					if(verbose){
-						for(int i = 0; i <= depth; i++)
+					if (verbose) {
+						for (int i = 0; i <= depth; i++)
 							System.out.print("  "); //$NON-NLS-1$
 						System.out.println("Processing nested file: " + name); //$NON-NLS-1$
 					}
@@ -210,16 +214,17 @@ public class JarProcessor {
 					extracted.setLastModified(entry.getTime());
 
 					//recurse
-					containingInfs.addFirst(inf);
 					String dir = getWorkingDirectory();
-					setWorkingDirectory(parentDir.getCanonicalPath());
-					File result = processJar(extracted);
-
-					newName = name.substring(0, name.length() - extracted.getName().length()) + result.getName();
-					data.put(name, newName);
-
-					setWorkingDirectory(dir);
-					containingInfs.removeFirst();
+					try {
+						containingInfs.addFirst(inf);
+						setWorkingDirectory(parentDir.getCanonicalPath());
+						File result = processJar(extracted);
+						newName = name.substring(0, name.length() - extracted.getName().length()) + result.getName();
+						data.put(name, newName);
+					} finally {
+						setWorkingDirectory(dir);
+						containingInfs.removeFirst();
+					}
 
 					//delete the extracted item leaving the recursion result
 					if (!name.equals(newName))
@@ -259,96 +264,97 @@ public class JarProcessor {
 	}
 
 	public File processJar(File input) throws IOException {
+		File tempDir = null;
 		++depth;
-		long lastModified = input.lastModified();
-		File workingDir = new File(getWorkingDirectory());
-		if (!workingDir.exists())
-			workingDir.mkdirs();
-
-		boolean skip = Utils.shouldSkipJar(input, processAll, verbose);
-		if (depth == 0 && verbose) {
-			if (skip)
-				System.out.println("Skipping " + input.getPath()); //$NON-NLS-1$
-			else {
-				System.out.print("Running "); //$NON-NLS-1$ 
-				for (Iterator iter = steps.iterator(); iter.hasNext();) {
-					IProcessStep step = (IProcessStep) iter.next();
-					System.out.print(step.getStepName() + " "); //$NON-NLS-1$
+		try {
+			long lastModified = input.lastModified();
+			File workingDir = new File(getWorkingDirectory());
+			if (!workingDir.exists())
+				workingDir.mkdirs();
+
+			boolean skip = Utils.shouldSkipJar(input, processAll, verbose);
+			if (depth == 0 && verbose) {
+				if (skip)
+					System.out.println("Skipping " + input.getPath()); //$NON-NLS-1$
+				else {
+					System.out.print("Running "); //$NON-NLS-1$ 
+					for (Iterator iter = steps.iterator(); iter.hasNext();) {
+						IProcessStep step = (IProcessStep) iter.next();
+						System.out.print(step.getStepName() + " "); //$NON-NLS-1$
+					}
+					System.out.println("on " + input.getPath()); //$NON-NLS-1$
 				}
-				System.out.println("on " + input.getPath()); //$NON-NLS-1$
 			}
-		}
 
-		if (skip) {
-			//This jar was not marked as conditioned, and we are only processing conditioned jars, so do nothing
-			--depth;
-			return input;
-		}
+			if (skip) {
+				//This jar was not marked as conditioned, and we are only processing conditioned jars, so do nothing
+				return input;
+			}
 
-		//pre
-		File workingFile = preProcess(input, workingDir);
+			//pre
+			File workingFile = preProcess(input, workingDir);
 
-		//Extract entries from jar and recurse on them
-		File tempDir = null;
-		if (depth == 0) {
-			tempDir = new File(workingDir, "temp." + workingFile.getName()); //$NON-NLS-1$
-		} else {
-			File parent = workingDir.getParentFile();
-			tempDir = new File(parent, "temp_" + depth + '_' + workingFile.getName()); //$NON-NLS-1$
-		}
+			//Extract entries from jar and recurse on them
+			if (depth == 0) {
+				tempDir = new File(workingDir, "temp." + workingFile.getName()); //$NON-NLS-1$
+			} else {
+				File parent = workingDir.getParentFile();
+				tempDir = new File(parent, "temp_" + depth + '_' + workingFile.getName()); //$NON-NLS-1$
+			}
 
-		JarFile jar = new JarFile(workingFile, false);
-		Map replacements = new HashMap();
-		Properties inf = Utils.getEclipseInf(workingFile, verbose);
-		extractEntries(jar, tempDir, replacements, inf);
-
-		if (inf != null)
-			adjustInf(workingFile, inf);
-
-		//Recreate the jar with replacements. 
-		//TODO: This is not strictly necessary if we didn't change the inf file and didn't change any content
-		File tempJar = null;
-		tempJar = new File(tempDir, workingFile.getName());
-		File parent = tempJar.getParentFile();
-		if (!parent.exists())
-			parent.mkdirs();
-		JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
-		recreateJar(jar, jarOut, replacements, tempDir, inf);
-
-		jar.close();
-		if (tempJar != null) {
-			if (!workingFile.equals(input)) {
-				workingFile.delete();
+			JarFile jar = new JarFile(workingFile, false);
+			Map replacements = new HashMap();
+			Properties inf = Utils.getEclipseInf(workingFile, verbose);
+			extractEntries(jar, tempDir, replacements, inf);
+
+			if (inf != null)
+				adjustInf(workingFile, inf);
+
+			//Recreate the jar with replacements. 
+			//TODO: This is not strictly necessary if we didn't change the inf file and didn't change any content
+			File tempJar = null;
+			tempJar = new File(tempDir, workingFile.getName());
+			File parent = tempJar.getParentFile();
+			if (!parent.exists())
+				parent.mkdirs();
+			JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
+			recreateJar(jar, jarOut, replacements, tempDir, inf);
+
+			jar.close();
+			if (tempJar != null) {
+				if (!workingFile.equals(input)) {
+					workingFile.delete();
+				}
+				workingFile = tempJar;
 			}
-			workingFile = tempJar;
-		}
 
-		//post
-		File result = postProcess(workingFile, workingDir);
-		
-		//have to normalize after the post steps
-		normalize(result, workingDir);
-		
-		if (!result.equals(workingFile) && !workingFile.equals(input))
-			workingFile.delete();
-		if (!result.getParentFile().equals(workingDir)) {
-			File finalFile = new File(workingDir, result.getName());
-			if (finalFile.exists())
-				finalFile.delete();
-			result.renameTo(finalFile);
-			result = finalFile;
-		}
+			//post
+			File result = postProcess(workingFile, workingDir);
 
-		if (tempDir.exists())
-			Utils.clear(tempDir);
+			//have to normalize after the post steps
+			normalize(result, workingDir);
 
-		result.setLastModified(lastModified);
-		--depth;
-		return result;
+			if (!result.equals(workingFile) && !workingFile.equals(input))
+				workingFile.delete();
+			if (!result.getParentFile().equals(workingDir)) {
+				File finalFile = new File(workingDir, result.getName());
+				if (finalFile.exists())
+					finalFile.delete();
+				result.renameTo(finalFile);
+				result = finalFile;
+			}
+
+			result.setLastModified(lastModified);
+			return result;
+		} finally {
+			--depth;
+			if (tempDir != null && tempDir.exists())
+				Utils.clear(tempDir);
+		}
 	}
-	
+
 	private void normalize(File input, File directory) {
-		if(input.getName().endsWith(JarProcessor.PACKED_SUFFIX)) {
+		if (input.getName().endsWith(JarProcessor.PACKED_SUFFIX)) {
 			//not a jar
 			return;
 		}
@@ -359,7 +365,7 @@ public class JarProcessor {
 				jar = new JarFile(input, false);
 			} catch (JarException e) {
 				//not a jar
-				return ;
+				return;
 			}
 			JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
 			InputStream in = null;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
index 8d64a4c..332333f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
@@ -13,6 +13,7 @@ package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
 
 import java.io.*;
 import java.util.Properties;
+import java.util.Set;
 import java.util.zip.ZipException;
 import org.eclipse.equinox.internal.p2.jarprocessor.*;
 
@@ -28,7 +29,12 @@ public class JarProcessorExecutor {
 		public File input = null;
 	}
 
-	public void runJarProcessor(Options options) {
+	protected Options options = null;
+	private Set packExclusions = null;
+	private Set signExclusions = null;
+
+	public void runJarProcessor(Options processOptions) {
+		this.options = processOptions;
 		if (options.input.isFile() && options.input.getName().endsWith(".zip")) { //$NON-NLS-1$
 			ZipProcessor processor = new ZipProcessor();
 			processor.setWorkingDirectory(options.outputDir);
@@ -45,7 +51,6 @@ public class JarProcessorExecutor {
 			}
 		} else {
 			JarProcessor processor = new JarProcessor();
-			JarProcessor packProcessor = null;
 
 			processor.setWorkingDirectory(options.outputDir);
 			processor.setProcessAll(options.processAll);
@@ -67,28 +72,14 @@ public class JarProcessorExecutor {
 						Utils.close(in);
 					}
 				}
-			}
-
-			if (options.unpack)
-				addUnpackStep(processor, properties, options);
 
-			if (options.repack || (options.pack && options.signCommand != null))
-				addPackUnpackStep(processor, properties, options);
-
-			if (options.signCommand != null)
-				addSignStep(processor, properties, options);
-
-			if (options.pack) {
-				packProcessor = new JarProcessor();
-				packProcessor.setWorkingDirectory(options.outputDir);
-				packProcessor.setProcessAll(options.processAll);
-				packProcessor.setVerbose(options.verbose);
-				addPackStep(packProcessor, properties, options);
+				packExclusions = Utils.getPackExclusions(properties);
+				signExclusions = Utils.getSignExclusions(properties);
 			}
 
 			try {
 				FileFilter filter = createFileFilter(options);
-				process(options.input, filter, options.verbose, processor, packProcessor);
+				process(options.input, filter, options.verbose, processor, properties);
 			} catch (FileNotFoundException e) {
 				if (options.verbose)
 					e.printStackTrace();
@@ -96,11 +87,59 @@ public class JarProcessorExecutor {
 		}
 	}
 
-	protected FileFilter createFileFilter(Options options) {
-		return options.unpack ? Utils.PACK_GZ_FILTER : Utils.JAR_FILTER;
+	protected FileFilter createFileFilter(Options processOptions) {
+		return processOptions.unpack ? Utils.PACK_GZ_FILTER : Utils.JAR_FILTER;
+	}
+
+	protected String getRelativeName(File file) {
+		if (options.input == null)
+			return file.toString();
+		try {
+			File input = options.input.getCanonicalFile();
+			File subFile = file.getCanonicalFile();
+
+			if (input.isFile())
+				return subFile.getName();
+
+			if (!subFile.toString().startsWith(input.toString())) {
+				// the file is not under the base folder.
+				return file.toString();
+			}
+
+			File parent = subFile.getParentFile();
+			String result = subFile.getName();
+			while (!parent.equals(input)) {
+				result = parent.getName() + '/' + result;
+				parent = parent.getParentFile();
+			}
+			return result;
+
+		} catch (IOException e) {
+			return file.getName();
+		}
+	}
+
+	private boolean shouldPack(String name) {
+		if (!options.pack)
+			return false;
+		return packExclusions == null ? true : !packExclusions.contains(name);
 	}
-	
-	protected void process(File input, FileFilter filter, boolean verbose, JarProcessor processor, JarProcessor packProcessor) throws FileNotFoundException {
+
+	private boolean shouldSign(String name) {
+		if (options.signCommand == null)
+			return false;
+		return signExclusions == null ? true : !signExclusions.contains(name);
+	}
+
+	private boolean shouldRepack(String name) {
+		if (shouldSign(name) && shouldPack(name))
+			return true;
+		if (!options.repack)
+			return false;
+		return packExclusions == null ? true : !packExclusions.contains(name);
+	}
+
+	protected void process(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
 		if (!input.exists())
 			throw new FileNotFoundException();
 
@@ -113,12 +152,32 @@ public class JarProcessorExecutor {
 			return;
 		for (int i = 0; i < files.length; i++) {
 			if (files[i].isDirectory()) {
-				processDirectory(files[i], filter, verbose, processor, packProcessor);
+				processDirectory(files[i], filter, verbose, processor, packProperties);
 			} else if (filter.accept(files[i])) {
 				try {
-					File result = processor.processJar(files[i]);
-					if (packProcessor != null && result != null && result.exists()) {
-						packProcessor.processJar(result);
+					processor.clearProcessSteps();
+					if (options.unpack) {
+						addUnpackStep(processor, packProperties, options);
+						processor.processJar(files[i]);
+					} else {
+						String name = getRelativeName(files[i]);
+						boolean sign = shouldSign(name);
+						boolean repack = shouldRepack(name);
+
+						if (repack || sign) {
+							processor.clearProcessSteps();
+							if (repack)
+								addPackUnpackStep(processor, packProperties, options);
+							if (sign)
+								addSignStep(processor, packProperties, options);
+							files[i] = processor.processJar(files[i]);
+						}
+
+						if (shouldPack(name)) {
+							processor.clearProcessSteps();
+							addPackStep(processor, packProperties, options);
+							processor.processJar(files[i]);
+						}
 					}
 				} catch (IOException e) {
 					if (verbose)
@@ -128,32 +187,28 @@ public class JarProcessorExecutor {
 		}
 	}
 
-	protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, JarProcessor packProcessor) throws FileNotFoundException{
+	protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
 		if (!input.isDirectory())
 			return;
 		String dir = processor.getWorkingDirectory();
 		processor.setWorkingDirectory(dir + "/" + input.getName()); //$NON-NLS-1$
-		if (packProcessor != null)
-			packProcessor.setWorkingDirectory(dir + "/" + input.getName()); //$NON-NLS-1$
-		process(input, filter, verbose, processor, packProcessor);
+		process(input, filter, verbose, processor, packProperties);
 		processor.setWorkingDirectory(dir);
-		if (packProcessor != null)
-			packProcessor.setWorkingDirectory(dir);
 	}
-	
-	public void addPackUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options options) {
-		processor.addProcessStep(new PackUnpackStep(properties, options.verbose));
+
+	public void addPackUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
+		processor.addProcessStep(new PackUnpackStep(properties, processOptions.verbose));
 	}
 
-	public void addSignStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options options) {
-		processor.addProcessStep(new SignCommandStep(properties, options.signCommand, options.verbose));
+	public void addSignStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
+		processor.addProcessStep(new SignCommandStep(properties, processOptions.signCommand, processOptions.verbose));
 	}
 
-	public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options options) {
-		processor.addProcessStep(new PackStep(properties, options.verbose));
+	public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
+		processor.addProcessStep(new PackStep(properties, processOptions.verbose));
 	}
 
-	public void addUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options options) {
-		processor.addProcessStep(new UnpackStep(properties, options.verbose));
+	public void addUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
+		processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
index bb1fbf9..7639262 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
@@ -10,13 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.jarprocessor.ant;
 
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileNotFoundException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-
+import java.io.*;
+import java.util.*;
 import org.apache.tools.ant.Project;
 import org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
@@ -29,7 +24,7 @@ public class AntBasedProcessorExecutor extends JarProcessorExecutor {
 	private List inputFiles;
 	private HashSet filterSet = null;
 	private FileFilter baseFilter = null;
-	
+
 	public AntBasedProcessorExecutor(Properties signArguments, Project project, String antTaskName) {
 		this.signArguments = signArguments;
 		this.project = project;
@@ -54,15 +49,15 @@ public class AntBasedProcessorExecutor extends JarProcessorExecutor {
 		return filterSet;
 	}
 
-	protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, JarProcessor packProcessor) throws FileNotFoundException{
-		if (filterSet != null && filterSet.contains(input)){
-			File [] files = input.listFiles();
+	protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
+		if (filterSet != null && filterSet.contains(input)) {
+			File[] files = input.listFiles();
 			for (int i = 0; i < files.length; i++) {
 				if (files[i].isDirectory() || baseFilter.accept(files[i]))
 					filterSet.add(files[i]);
 			}
 		}
-		super.processDirectory(input, filter, verbose, processor, packProcessor);
+		super.processDirectory(input, filter, verbose, processor, packProperties);
 	}
 
 	public void addSignStep(JarProcessor processor, Properties properties, Options options) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
index 8f6993f..c8cfbfa 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
@@ -13,10 +13,7 @@ package org.eclipse.equinox.internal.p2.jarprocessor.ant;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Properties;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Task;
+import org.apache.tools.ant.*;
 import org.apache.tools.ant.types.FileSet;
 import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
index ec9c3e8..4356918 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch	
@@ -2,12 +2,12 @@
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1255396900634_19" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.equinox.p2.metadata.generator" type="4"/>
</launchConfigurationWorkingSet>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.generator"/>
+<listEntry value="/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
+<listEntry value="1"/>
 </listAttribute>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
 <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
@@ -15,6 +15,6 @@
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.generator"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value=""/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
 </launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
index 9c85103..ce58f5e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Feb 21 15:21:23 EST 2008
+#Fri Mar 12 16:58:17 EST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -19,6 +19,8 @@ org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=error
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
@@ -43,6 +45,7 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -51,7 +54,9 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
@@ -62,8 +67,10 @@ org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warnin
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
@@ -74,11 +81,13 @@ org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
index 992b215..6dd9150 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
@@ -1,38 +1,44 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.generator;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.generator;singleton:=true
+Bundle-Version: 1.0.202.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.generator.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
+Export-Package: org.eclipse.equinox.internal.p2.metadata.generator;x-internal:=true,
+ org.eclipse.equinox.internal.p2.metadata.generator.features;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
+ org.eclipse.equinox.internal.provisional.p2.metadata.generator;
+  x-friends:="org.eclipse.equinox.p2.ui.sdk,
+   org.eclipse.equinox.p2.touchpoint.eclipse,
+   org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.extensionlocation,
+   org.eclipse.equinox.p2.updatesite"
 Require-Bundle: org.eclipse.equinox.p2.core,
  org.eclipse.osgi,
- org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
+ org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.p2.repository
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-ActivationPolicy: lazy
 Import-Package: javax.xml.parsers,
  org.eclipse.equinox.app;version="1.0.0",
+ org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.internal.frameworkadmin.equinox,
  org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.p2.artifact.repository,
  org.eclipse.equinox.internal.p2.metadata,
+ org.eclipse.equinox.internal.p2.metadata.query,
  org.eclipse.equinox.internal.p2.metadata.repository,
+ org.eclipse.equinox.internal.p2.repository.helpers,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
  org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
  org.w3c.dom,
  org.xml.sax,
  org.xml.sax.helpers
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.generator.Activator
-Export-Package: org.eclipse.equinox.internal.p2.metadata.generator;x-internal:=true,
- org.eclipse.equinox.internal.p2.metadata.generator.features;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-  x-friends:="org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.updatesite"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/plugin.xml
index 9b38c12..a0e5290 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/plugin.xml
@@ -21,17 +21,4 @@
             name="Equinox Provisioning Metadata Generator">
       </product>
    </extension>
-
-	<extension point="org.eclipse.ant.core.antTasks">
-		<antTask
-			library="ant_tasks/generator-ant.jar"
-			name="p2.generator"
-			class="org.eclipse.equinox.internal.p2.metadata.generator.ant.GeneratorTask">
-		</antTask>
-	</extension>
-
-	<extension point="org.eclipse.ant.core.extraClasspathEntries">
-		<extraClasspathEntry library="ant_tasks/generator-ant.jar"/>
-	</extension>
-
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/pom.xml
new file mode 100644
index 0000000..53585eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.metadata.generator</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
index 86a32ed..3d2dd9f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.generator;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -21,20 +19,16 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
 import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
 import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.ServiceReference;
 
 public class EclipseGeneratorApplication implements IApplication {
 
@@ -49,12 +43,6 @@ public class EclipseGeneratorApplication implements IApplication {
 
 	static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
 
-	private ArtifactRepositoryManager defaultArtifactManager;
-	private ServiceRegistration registrationDefaultArtifactManager;
-	private MetadataRepositoryManager defaultMetadataManager;
-	private ServiceRegistration registrationDefaultMetadataManager;
-	private IProvisioningEventBus bus;
-	private ServiceRegistration registrationBus;
 	private Generator.GeneratorResult incrementalResult = null;
 	private boolean generateRootIU = true;
 	private URI metadataLocation;
@@ -69,6 +57,9 @@ public class EclipseGeneratorApplication implements IApplication {
 	//whether repository xml files should be compressed
 	private String compress = "false"; //$NON-NLS-1$
 
+	private ServiceReference agentRef;
+	private IProvisioningAgent agent;
+
 	private File getExecutableName(String base, EclipseInstallGeneratorInfoProvider provider) {
 		File location = provider.getExecutableLocation();
 		if (location == null)
@@ -106,7 +97,7 @@ public class EclipseGeneratorApplication implements IApplication {
 	private void initializeArtifactRepository(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
 		if (artifactLocation == null)
 			return;
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		URI location = artifactLocation;
 
 		String repositoryName = (artifactRepoName != null && artifactRepoName.length() > 0) ? artifactRepoName : artifactLocation + " - artifacts"; //$NON-NLS-1$
@@ -170,7 +161,7 @@ public class EclipseGeneratorApplication implements IApplication {
 		Map properties = new HashMap(1);
 		properties.put(IRepository.PROP_COMPRESSED, compress);
 
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		try {
 			IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
 			manager.removeRepository(location);
@@ -305,27 +296,6 @@ public class EclipseGeneratorApplication implements IApplication {
 		}
 	}
 
-	private void registerDefaultArtifactRepoManager() {
-		if (ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName()) == null) {
-			defaultArtifactManager = new ArtifactRepositoryManager();
-			registrationDefaultArtifactManager = Activator.getContext().registerService(IArtifactRepositoryManager.class.getName(), defaultArtifactManager, null);
-		}
-	}
-
-	private void registerDefaultMetadataRepoManager() {
-		if (ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName()) == null) {
-			defaultMetadataManager = new MetadataRepositoryManager();
-			registrationDefaultMetadataManager = Activator.getContext().registerService(IMetadataRepositoryManager.class.getName(), defaultMetadataManager, null);
-		}
-	}
-
-	private void registerEventBus() {
-		if (ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME) == null) {
-			bus = new ProvisioningEventBus();
-			registrationBus = Activator.getContext().registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
-		}
-	}
-
 	public Object run(String args[]) throws Exception {
 		EclipseInstallGeneratorInfoProvider provider = new EclipseInstallGeneratorInfoProvider();
 		processCommandLineArguments(args, provider);
@@ -337,9 +307,7 @@ public class EclipseGeneratorApplication implements IApplication {
 	}
 
 	public Object run(EclipseInstallGeneratorInfoProvider provider) throws Exception {
-		registerEventBus();
-		registerDefaultMetadataRepoManager();
-		registerDefaultArtifactRepoManager();
+		initializeAgent();
 		initialize(provider);
 
 		if (provider.getBaseLocation() == null && provider.getProductFile() == null && !generateRootIU) {
@@ -372,6 +340,24 @@ public class EclipseGeneratorApplication implements IApplication {
 		return new Integer(1);
 	}
 
+	private void initializeAgent() throws ProvisionException {
+		agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
+		if (agentRef != null) {
+			agent = (IProvisioningAgent) Activator.getContext().getService(agentRef);
+			if (agent != null)
+				return;
+		}
+		ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		if (providerRef == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(providerRef);
+		if (provider == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		//obtain agent for currently running system
+		agent = provider.createAgent(null);
+		Activator.getContext().ungetService(providerRef);
+	}
+
 	protected IStatus generate(EclipseInstallGeneratorInfoProvider provider) {
 		Generator generator = new Generator(provider);
 		if (incrementalResult != null)
@@ -387,17 +373,9 @@ public class EclipseGeneratorApplication implements IApplication {
 	}
 
 	public void stop() {
-		if (registrationDefaultMetadataManager != null) {
-			registrationDefaultMetadataManager.unregister();
-			registrationDefaultMetadataManager = null;
-		}
-		if (registrationDefaultArtifactManager != null) {
-			registrationDefaultArtifactManager.unregister();
-			registrationDefaultArtifactManager = null;
-		}
-		if (registrationBus != null) {
-			registrationBus.unregister();
-			registrationBus = null;
+		if (agentRef != null) {
+			Activator.getContext().ungetService(agentRef);
+			agentRef = null;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
index e00cf7a..6e9a293 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
@@ -13,13 +13,10 @@ package org.eclipse.equinox.internal.p2.metadata.generator;
 import java.io.*;
 import java.util.*;
 import org.eclipse.equinox.internal.p2.metadata.generator.features.ProductFile;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
 import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
+import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.MatchQuery;
 
 public class ProductQuery extends MatchQuery {
 	private static final String EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
@@ -29,25 +26,6 @@ public class ProductQuery extends MatchQuery {
 	private final Map children = new HashMap();
 	private final String versionAdvice;
 
-	// Collector collects the largest version of each IU
-	private final Collector collector = new Collector() {
-		private final HashMap elements = new HashMap();
-
-		public boolean accept(Object object) {
-			if (!(object instanceof IInstallableUnit))
-				return true;
-			IInstallableUnit iu = (IInstallableUnit) object;
-			if (elements.containsKey(iu.getId())) {
-				IInstallableUnit existing = (IInstallableUnit) elements.get(iu.getId());
-				if (existing.getVersion().compareTo(iu.getVersion()) >= 0)
-					return true;
-				getCollection().remove(existing);
-			}
-			elements.put(iu.getId(), iu);
-			return super.accept(object);
-		}
-	};
-
 	public ProductQuery(ProductFile product, String flavor, Map configIUs, String versionAdvice) {
 		this.product = product;
 		this.flavor = flavor;
@@ -55,10 +33,6 @@ public class ProductQuery extends MatchQuery {
 		initialize(configIUs);
 	}
 
-	public Collector getCollector() {
-		return this.collector;
-	}
-
 	private Properties loadVersions(String location) {
 		Properties properties = new Properties();
 		if (location == null)
@@ -93,7 +67,7 @@ public class ProductQuery extends MatchQuery {
 
 			VersionRange range = VersionRange.emptyRange;
 			if (versions.containsKey(item)) {
-				Version value = new Version(versions.getProperty(item));
+				Version value = Version.create(versions.getProperty(item));
 				range = new VersionRange(value, true, value, true);
 			}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
index 4d2fb97..5897881 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2010 IBM Corporation and others.
+ *  Copyright (c) 2000, 2008 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
index 0d1809e..a48dac7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,23 +10,24 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
 import java.net.*;
 import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
 import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
@@ -44,12 +45,8 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 	private final static String frameworkAdminFillter = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 	private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
 	private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-	private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
-	private static final String ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
 	private static final String ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
 
-	private static final String PARAMETER_BASEURL = "org.eclipse.equinox.simpleconfigurator.baseUrl"; //$NON-NLS-1$
-
 	private String os;
 
 	/**
@@ -213,7 +210,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 		result.setVersion("0.0.0"); //$NON-NLS-1$
 		result.setMarkedAsStarted(true);
 		result.setSpecialConfigCommands("mkdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
-		result.setSpecialUnconfigCommands("rmdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
 		return result;
 	}
 
@@ -277,7 +273,8 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 		if (value != null) {
 			try {
 				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
-				BundleInfo[] bundleInfos = readConfiguration(new URL(value));
+				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
+				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
 				data.setBundles(bundleInfos);
 			} catch (MalformedURLException e1) {
 				// ignore
@@ -296,91 +293,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 	}
 
 	/**
-	 * @deprecated moved to DataLoader
-	 */
-	public static BundleInfo[] readConfiguration(URL url) throws IOException {
-		List bundles = new ArrayList();
-		try {
-			// System.out.println("readConfiguration(URL url):url()=" + url);
-			// URL configFileUrl = getConfigFileUrl();
-			// URL configFileUrl = Utils.getUrl("file",null,
-			// inputFile.getAbsolutePath());
-			BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
-			// BufferedReader r = new BufferedReader(new FileReader(inputFile));
-
-			String line;
-			try {
-				URL baseUrl = new URL(url, "./"); //$NON-NLS-1$
-				while ((line = r.readLine()) != null) {
-					if (line.startsWith("#")) //$NON-NLS-1$
-						continue;
-					line = line.trim();// symbolicName,version,location,startlevel,expectedState
-					if (line.length() == 0)
-						continue;
-
-					// (expectedState is an integer).
-					if (line.startsWith(PARAMETER_BASEURL + "=")) { //$NON-NLS-1$
-						String baseUrlSt = line.substring((PARAMETER_BASEURL + "=").length()); //$NON-NLS-1$
-						if (!baseUrlSt.endsWith("/")) //$NON-NLS-1$
-							baseUrlSt += "/"; //$NON-NLS-1$
-						baseUrl = new URL(url, baseUrlSt);
-						continue;
-					}
-					StringTokenizer tok = new StringTokenizer(line, ",", true); //$NON-NLS-1$
-					String symbolicName = tok.nextToken();
-					if (symbolicName.equals(",")) //$NON-NLS-1$
-						symbolicName = null;
-					else
-						tok.nextToken(); // ,
-
-					String version = tok.nextToken();
-					if (version.equals(",")) //$NON-NLS-1$
-						version = null;
-					else
-						tok.nextToken(); // ,
-
-					String urlSt = tok.nextToken();
-					if (urlSt.equals(",")) { //$NON-NLS-1$
-						if (symbolicName != null && version != null)
-							urlSt = symbolicName + "_" + version + ".jar"; //$NON-NLS-1$ //$NON-NLS-2$
-						else
-							urlSt = null;
-					} else
-						tok.nextToken(); // ,
-					try {
-						new URL(urlSt);
-					} catch (MalformedURLException e) {
-						urlSt = Utils.getUrlInFull(urlSt, baseUrl).toExternalForm();
-					}
-
-					int sl = Integer.parseInt(tok.nextToken().trim());
-					tok.nextToken(); // ,
-					boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue();
-
-					BundleInfo bInfo;
-					try {
-						bInfo = new BundleInfo(symbolicName, version, new URI(urlSt), sl, markedAsStarted);
-
-						bundles.add(bInfo);
-					} catch (URISyntaxException e) {
-						e.printStackTrace();
-						throw new IllegalStateException("Error coverting url based string to uri: " + e.getMessage());
-					}
-				}
-			} finally {
-				try {
-					r.close();
-				} catch (IOException ex) {
-					// ignore
-				}
-			}
-		} catch (MalformedURLException e) {
-			// TODO log something
-		}
-		return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
-	}
-
-	/**
 	 * @deprecated logic moved to EclipseInstallAction (and related actions)
 	 */
 	public ArrayList getDefaultIUs(Set ius) {
@@ -438,19 +350,8 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 				e.printStackTrace();
 			}
 		}
-		//		try {
-		//			frameworkAdminTracker.waitForService(500);
-		//		} catch (InterruptedException e) {
-		//			// ignore
-		//		}
-
-		FrameworkAdmin admin = (FrameworkAdmin) frameworkAdminTracker.getService();
-		if (admin == null) {
-			startBundle(ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX);
-			startBundle(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR);
-			admin = (FrameworkAdmin) frameworkAdminTracker.getService();
-		}
-		return admin;
+
+		return (FrameworkAdmin) frameworkAdminTracker.getService();
 	}
 
 	private Collection getIUs(Set ius, String prefix) {
@@ -627,27 +528,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
 		this.siteLocation = location;
 	}
 
-	private boolean startBundle(String bundleId) {
-		PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
-		if (packageAdmin == null)
-			return false;
-
-		Bundle[] bundles = packageAdmin.getBundles(bundleId, null);
-		if (bundles != null && bundles.length > 0) {
-			for (int i = 0; i < bundles.length; i++) {
-				try {
-					if ((bundles[0].getState() & Bundle.RESOLVED) > 0) {
-						bundles[0].start();
-						return true;
-					}
-				} catch (BundleException e) {
-					// failed, try next bundle
-				}
-			}
-		}
-		return false;
-	}
-
 	public String getVersionAdvice() {
 		return versionAdvice;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
index 3875e28..870a3b6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 
 /**
  */
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
index 8eb9157..f406356 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,25 +16,29 @@ import java.net.URISyntaxException;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
 import org.eclipse.equinox.internal.p2.metadata.generator.*;
 import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
 import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
 import org.eclipse.osgi.service.environment.Constants;
 import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.NLS;
@@ -184,24 +188,25 @@ public class Generator {
 
 		GeneratorResult productContents = new GeneratorResult();
 
-		ProductQuery query = new ProductQuery(productFile, info.getFlavor(), result.configurationIUs, info.getVersionAdvice());
-		Collector collector = info.getMetadataRepository().query(query, query.getCollector(), null);
-		for (Iterator iterator = collector.iterator(); iterator.hasNext();) {
+		ProductQuery productQuery = new ProductQuery(productFile, info.getFlavor(), result.configurationIUs, info.getVersionAdvice());
+		IQuery query = QueryUtil.createLatestQuery(productQuery);
+		IQueryResult queryResult = info.getMetadataRepository().query(query, null);
+		for (Iterator iterator = queryResult.iterator(); iterator.hasNext();) {
 			productContents.rootIUs.add(iterator.next());
 		}
 
 		String version = getProductVersion();
-		VersionRange range = new VersionRange(new Version(version), true, new Version(version), true);
+		VersionRange range = new VersionRange(Version.create(version), true, Version.create(version), true);
 		ArrayList requires = new ArrayList(1);
-		requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_LAUCHER_SUFFIX, range, null, false, true));
-		requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, range, null, false, false));
-		requires.add(MetadataFactory.createRequiredCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, range, null, false, false));
+		requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_LAUCHER_SUFFIX, range, null, false, true));
+		requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, range, null, false, false));
+		requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, range, null, false, false));
 
 		//default CUs		
-		requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
-		requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
+		requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
+		requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
 		if (productFile.useFeatures())
-			requires.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.ECLIPSE_FEATURE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, MetadataGeneratorHelper.INSTALL_FEATURES_FILTER, true, false));
+			requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.ECLIPSE_FEATURE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, MetadataGeneratorHelper.INSTALL_FEATURES_FILTER, true, false));
 
 		InstallableUnitDescription root = createTopLevelIUDescription(productContents, productFile.getId(), version, productFile.getProductName(), requires, false);
 		return MetadataFactory.createInstallableUnit(root);
@@ -223,7 +228,7 @@ public class Generator {
 		InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
 		root.setSingleton(true);
 		root.setId(configurationIdentification);
-		root.setVersion(new Version(configurationVersion));
+		root.setVersion(Version.create(configurationVersion));
 		root.setProperty(IInstallableUnit.PROP_NAME, configurationName);
 
 		ArrayList reqsConfigurationUnits = new ArrayList(result.rootIUs.size());
@@ -231,17 +236,17 @@ public class Generator {
 			IInstallableUnit iu = (IInstallableUnit) iterator.next();
 			VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
 			//			boolean isOptional = checkOptionalRootDependency(iu);
-			reqsConfigurationUnits.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
+			reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
 		}
 		if (requires != null)
 			reqsConfigurationUnits.addAll(requires);
-		root.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[reqsConfigurationUnits.size()]));
+		root.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
 		root.setArtifacts(new IArtifactKey[0]);
 
 		root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 		root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(configurationIdentification, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
-		root.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
-		root.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configurationIdentification, new Version(configurationVersion))});
+		root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		root.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configurationIdentification, Version.create(configurationVersion))});
 		root.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
 		Map touchpointData = new HashMap();
 
@@ -363,7 +368,7 @@ public class Generator {
 		IMetadataRepository metadataRepository = info.getMetadataRepository();
 		if (metadataRepository != null) {
 			Set allGeneratedUnits = result.allGeneratedIUs();
-			metadataRepository.addInstallableUnits((IInstallableUnit[]) allGeneratedUnits.toArray(new IInstallableUnit[allGeneratedUnits.size()]));
+			metadataRepository.addInstallableUnits(allGeneratedUnits);
 		}
 
 		return Status.OK_STATUS;
@@ -400,7 +405,7 @@ public class Generator {
 							format = (String) bundleManifest.get(BundleDescriptionFactory.BUNDLE_FILE_KEY);
 						boolean isDir = (format != null && format.equals(BundleDescriptionFactory.DIR) ? true : false);
 
-						IArtifactKey key = new ArtifactKey(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, bd.getSymbolicName(), new Version(bd.getVersion().toString()));
+						IArtifactKey key = new ArtifactKey(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, bd.getSymbolicName(), Version.create(bd.getVersion().toString()));
 						IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(key, new File(bd.getLocation()), true, false);
 						((ArtifactDescriptor) ad).setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
 						File bundleFile = new File(bd.getLocation());
@@ -511,7 +516,7 @@ public class Generator {
 		while (i > -1) {
 			Version version = null;
 			try {
-				version = new Version(name.substring(i));
+				version = Version.create(name.substring(i));
 				bundleInfo.setSymbolicName(name.substring(0, i));
 				bundleInfo.setVersion(version.toString());
 				return new GeneratorBundleInfo(bundleInfo);
@@ -522,9 +527,8 @@ public class Generator {
 		}
 
 		//Query the repo
-		Query query = new InstallableUnitQuery(name);
-		Collector collector = new Collector();
-		Iterator matches = info.getMetadataRepository().query(query, collector, null).iterator();
+		IQuery query = QueryUtil.createIUQuery(name);
+		Iterator matches = info.getMetadataRepository().query(query, null).iterator();
 		//pick the newest match
 		IInstallableUnit newest = null;
 		while (matches.hasNext()) {
@@ -580,7 +584,7 @@ public class Generator {
 				continue;
 			}
 
-			IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), new Version(bundle.getVersion()), false, bundle, info.getFlavor() + cuIdPrefix, filter);
+			IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor() + cuIdPrefix, filter);
 			if (cu != null) {
 				allCUs.add(cu);
 				result.rootIUs.add(cu);
@@ -597,7 +601,7 @@ public class Generator {
 		IMetadataRepository metadataRepository = info.getMetadataRepository();
 		if (metadataRepository != null && !allCUs.isEmpty()) {
 			// Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
-			metadataRepository.addInstallableUnits((IInstallableUnit[]) allCUs.toArray(new IInstallableUnit[allCUs.size()]));
+			metadataRepository.addInstallableUnits(allCUs);
 		}
 
 	}
@@ -637,12 +641,11 @@ public class Generator {
 			if (configuredIU == null) {
 				if (!generateRootIU && data == null)
 					continue;
-				Query query = new InstallableUnitQuery(bundle.getSymbolicName());
-				Collector collector = new Collector();
+				IQuery query = QueryUtil.createIUQuery(bundle.getSymbolicName());
 				IMetadataRepository metadataRepository = info.getMetadataRepository();
 				if (metadataRepository == null)
 					continue;
-				Iterator matches = metadataRepository.query(query, collector, null).iterator();
+				Iterator matches = metadataRepository.query(query, null).iterator();
 				//pick the newest match
 				IInstallableUnit newest = null;
 				while (matches.hasNext()) {
@@ -657,8 +660,8 @@ public class Generator {
 				}
 			}
 			bundle.setVersion(configuredIU.getVersion().toString());
-			String filter = configuredIU == null ? null : configuredIU.getFilter();
-			IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), new Version(bundle.getVersion()), false, bundle, info.getFlavor(), filter);
+			IMatchExpression filter = configuredIU == null ? null : configuredIU.getFilter();
+			IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor(), filter);
 			//the configuration unit should share the same platform filter as the IU being configured.
 			if (cu != null) {
 				result.rootIUs.add(cu);
@@ -683,7 +686,7 @@ public class Generator {
 		IMetadataRepository metadataRepository = info.getMetadataRepository();
 		if (metadataRepository != null && !defaults.isEmpty()) {
 			// Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
-			metadataRepository.addInstallableUnits((IInstallableUnit[]) defaults.toArray(new IInstallableUnit[defaults.size()]));
+			metadataRepository.addInstallableUnits(defaults);
 		}
 	}
 
@@ -706,12 +709,12 @@ public class Generator {
 		ArrayList required = new ArrayList(rootCategory.size());
 		for (Iterator iterator = rootCategory.iterator(); iterator.hasNext();) {
 			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			required.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
+			required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
 		}
-		cat.setRequiredCapabilities((IRequiredCapability[]) required.toArray(new IRequiredCapability[required.size()]));
+		cat.setRequirements((IRequirement[]) required.toArray(new IRequirement[required.size()]));
 		cat.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, categoryId, Version.emptyVersion)});
 		cat.setArtifacts(new IArtifactKey[0]);
-		cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
+		cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
 		return MetadataFactory.createInstallableUnit(cat);
 	}
 
@@ -796,12 +799,12 @@ public class Generator {
 		String launcherIdPrefix = productNamespace + PRODUCT_LAUCHER_SUFFIX;
 		String launcherId = launcherIdPrefix + '.' + ws + '.' + os + '.' + arch;
 		iu.setId(launcherId);
-		Version launcherVersion = new Version(version);
+		Version launcherVersion = Version.create(version);
 		iu.setVersion(launcherVersion);
 		iu.setSingleton(true);
-		String filter = null;
+		IMatchExpression filter = null;
 		if (!ws.equals(CONFIG_ANY) && !os.equals(CONFIG_ANY) && !arch.equals(CONFIG_ANY)) {
-			filter = "(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			filter = InstallableUnit.parseFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			iu.setFilter(filter);
 		}
 
@@ -814,7 +817,7 @@ public class Generator {
 		String launcherFragment = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
 		if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
 			launcherFragment += '.' + arch;
-		iu.setRequiredCapabilities(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
+		iu.setRequirements(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
 		result.rootIUs.add(MetadataFactory.createInstallableUnit(iu));
 
 		//Create the CU
@@ -824,8 +827,8 @@ public class Generator {
 		cu.setVersion(launcherVersion);
 		if (filter != null)
 			cu.setFilter(filter);
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(launcherVersion, true, launcherVersion, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(launcherVersion, true, launcherVersion, true), null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 		//TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
 		cu.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configUnitId, launcherVersion)});
 
@@ -888,7 +891,7 @@ public class Generator {
 					return name.endsWith(".exe"); //$NON-NLS-1$
 				}
 			});
-			if (launcherNameIU != null && launcherFiles != null && launcherFiles.length > 0)
+			if (launcherFiles != null && launcherFiles.length > 0)
 				launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[0].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
 		}
 		touchpointData.put("install", configurationData); //$NON-NLS-1$
@@ -933,7 +936,7 @@ public class Generator {
 			String configUnitId = info.getFlavor() + productFile.getId() + ".config." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
 
 			String version = getProductVersion();
-			Version cuVersion = new Version(version);
+			Version cuVersion = Version.create(version);
 			cu.setId(configUnitId);
 			cu.setVersion(cuVersion);
 			cu.setSingleton(true);
@@ -979,7 +982,7 @@ public class Generator {
 
 		InstallableUnitDescription cu = new MetadataFactory.InstallableUnitDescription();
 		String configUnitId = info.getFlavor() + productFile.getId() + ".ini." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
-		Version cuVersion = new Version(version);
+		Version cuVersion = Version.create(version);
 		cu.setId(configUnitId);
 		cu.setVersion(cuVersion);
 		cu.setSingleton(true);
@@ -1023,10 +1026,10 @@ public class Generator {
 			String location = feature.getLocation();
 			boolean isExploded = (location.endsWith(".jar") ? false : true); //$NON-NLS-1$
 			IInstallableUnit featureIU = MetadataGeneratorHelper.createFeatureJarIU(feature, true);
-			IArtifactKey[] artifacts = featureIU.getArtifacts();
+			Collection artifacts = featureIU.getArtifacts();
 			storePluginShape(feature, result);
-			for (int arti = 0; arti < artifacts.length; arti++) {
-				IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(artifacts[arti], new File(location), true, false);
+			for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
+				IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor((IArtifactKey) iterator.next(), new File(location), true, false);
 				if (isExploded)
 					publishArtifact(ad, new File(location).listFiles(), destination, false, new File(location));
 				else
@@ -1135,8 +1138,10 @@ public class Generator {
 		try {
 			URI associateLocation = URIUtil.fromString(location);
 			int flags = isEnabled ? IRepository.ENABLED : IRepository.NONE;
-			metadataRepo.addReference(associateLocation, name, IRepository.TYPE_METADATA, flags);
-			metadataRepo.addReference(associateLocation, name, IRepository.TYPE_ARTIFACT, flags);
+			ArrayList refs = new ArrayList();
+			refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_METADATA, flags));
+			refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_ARTIFACT, flags));
+			metadataRepo.addReferences(refs);
 		} catch (URISyntaxException e) {
 			String message = "Invalid site reference: " + location; //$NON-NLS-1$
 			if (featureId != null)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
index e26620c..fdfef7d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
 
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 
 public class GeneratorBundleInfo extends BundleInfo {
 	//	public static final int NO_LEVEL = -1;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
index cf812ea..21dd8e2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
@@ -15,8 +15,8 @@ import java.net.URI;
 import java.util.*;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 public interface IGeneratorInfo {
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
index 93594b9..53efbdb 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,6 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-
 import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -23,19 +21,22 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.*;
 import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
 import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
 import org.eclipse.equinox.internal.p2.metadata.generator.features.SiteCategory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
 import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.ManifestElement;
@@ -50,7 +51,6 @@ import org.osgi.framework.Constants;
 public class MetadataGeneratorHelper {
 	/**
 	 * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
-	 * @see IRequiredCapability#getNamespace()
 	 * @see IProvidedCapability#getNamespace()
 	 */
 	public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
@@ -58,28 +58,24 @@ public class MetadataGeneratorHelper {
 	/**
 	 * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
 	 * representing and OSGi bundle resource
-	 * @see IRequiredCapability#getName()
 	 * @see IProvidedCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
 	/**
 	 * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
 	 * representing a feature
-	 * @see IRequiredCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
 
 	/**
 	 * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
 	 * representing a source bundle
-	 * @see IRequiredCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
 
 	/**
 	 * A capability namespace representing the localization (translation)
 	 * of strings from a specified IU in a specified locale
-	 * @see IRequiredCapability#getNamespace()
 	 * @see IProvidedCapability#getNamespace()
 	 * TODO: this should be in API, probably in IInstallableUnit
 	 */
@@ -97,13 +93,13 @@ public class MetadataGeneratorHelper {
 
 	private static final String CAPABILITY_NS_UPDATE_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
 
-	private static final Version DEFAULT_JRE_VERSION = new Version("1.6"); //$NON-NLS-1$
+	private static final Version DEFAULT_JRE_VERSION = Version.create("1.6"); //$NON-NLS-1$
 
 	public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
 	public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
 	public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
 
-	public static final String INSTALL_FEATURES_FILTER = "(org.eclipse.update.install.features=true)"; //$NON-NLS-1$
+	public static final IMatchExpression INSTALL_FEATURES_FILTER = InstallableUnit.parseFilter("(org.eclipse.update.install.features=true)"); //$NON-NLS-1$
 
 	private static final String IU_NAMESPACE = IInstallableUnit.NAMESPACE_IU_ID;
 
@@ -116,22 +112,22 @@ public class MetadataGeneratorHelper {
 	private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
 
 	//TODO - need to come up with a way to infer launcher version
-	private static final Version LAUNCHER_VERSION = new Version(1, 0, 0);
-
-	private static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+	private static final Version LAUNCHER_VERSION = Version.createOSGi(1, 0, 0);
 
-	public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", new Version(1, 0, 0)); //$NON-NLS-1$
-	public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", new Version(1, 0, 0)); //$NON-NLS-1$
+	public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
+	public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
 
-	public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new Version(1, 0, 0));
-	public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, new Version(1, 0, 0));
-	public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, new Version(1, 0, 0));
+	public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
+	public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
+	public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
 
 	static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
 
 	static final String BUNDLE_ADVICE_FILE = "META-INF/p2.inf"; //$NON-NLS-1$
 	static final String ADVICE_INSTRUCTIONS_PREFIX = "instructions."; //$NON-NLS-1$
 
+	static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
+
 	public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk, boolean asIs, boolean recur) {
 		//TODO this size calculation is bogus
 		ArtifactDescriptor result = new ArtifactDescriptor(key);
@@ -140,9 +136,11 @@ public class MetadataGeneratorHelper {
 			// TODO - this is wrong but I'm testing a work-around for bug 205842
 			result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
 		}
-		String md5 = computeMD5(pathOnDisk);
-		if (md5 != null)
-			result.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
+		if (asIs) {
+			String md5 = computeMD5(pathOnDisk);
+			if (md5 != null)
+				result.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
+		}
 		return result;
 	}
 
@@ -188,7 +186,6 @@ public class MetadataGeneratorHelper {
 	 * @deprecated moved to AbstractPublishingAction
 	 */
 	public static IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
-		final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
 		//TODO this size calculation is bogus
 		ArtifactDescriptor result = new ArtifactDescriptor(key);
 		if (pathOnDisk != null) {
@@ -196,16 +193,21 @@ public class MetadataGeneratorHelper {
 			// TODO - this is wrong but I'm testing a work-around for bug 205842
 			result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
 		}
-		ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+		IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
 		result.setProcessingSteps(steps);
-		result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
+		result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
 		return result;
 	}
 
 	/**
 	 * @deprecated moved to BundlesAction
 	 */
-	public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String filter) {
+	public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String ldapFilter) {
+		IMatchExpression filter = ldapFilter == null ? null : InstallableUnit.parseFilter(ldapFilter);
+		return createBundleConfigurationUnit(iuId, iuVersion, isBundleFragment, configInfo, configurationFlavor, filter);
+	}
+
+	public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, IMatchExpression filter) {
 		if (configInfo == null)
 			return null;
 
@@ -215,13 +217,13 @@ public class MetadataGeneratorHelper {
 		cu.setVersion(iuVersion);
 
 		//Indicate the IU to which this CU apply
-		cu.setHost(new IRequiredCapability[] { //
-				MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, iuId, new VersionRange(iuVersion, true, versionMax, true), null, false, false, true), //
-						MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(new Version(1, 0, 0), true, new Version(2, 0, 0), false), null, false, false, false)});
+		cu.setHost(new IRequirement[] { //
+				MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, iuId, new VersionRange(iuVersion, true, Version.MAX_VERSION, true), null, false, false, true), //
+						MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
 
 		//Adds capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, iuVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, iuVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		Map touchpointData = new HashMap();
 		touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -248,9 +250,9 @@ public class MetadataGeneratorHelper {
 	private static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
 		VersionRange updateRange = null;
 		if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
-			updateRange = new VersionRange(Version.emptyVersion, true, Version.fromOSGiVersion(base), false);
+			updateRange = new VersionRange(Version.emptyVersion, true, fromOSGiVersion(base), false);
 		} else {
-			updateRange = new VersionRange("0.0.0"); //$NON-NLS-1$
+			updateRange = VersionRange.emptyRange;
 		}
 		return updateRange;
 	}
@@ -266,7 +268,7 @@ public class MetadataGeneratorHelper {
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		iu.setSingleton(bd.isSingleton());
 		iu.setId(bd.getSymbolicName());
-		iu.setVersion(Version.fromOSGiVersion(bd.getVersion()));
+		iu.setVersion(fromOSGiVersion(bd.getVersion()));
 		iu.setFilter(bd.getPlatformFilter());
 
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
@@ -280,9 +282,9 @@ public class MetadataGeneratorHelper {
 		//		if (requiresAFragment)
 		//			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
 		if (isFragment)
-			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
 		for (int j = 0; j < requiredBundles.length; j++)
-			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), VersionRange.fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
 
 		// Process the import packages
 		ImportPackageSpecification osgiImports[] = bd.getImportPackages();
@@ -293,23 +295,23 @@ public class MetadataGeneratorHelper {
 			if (importPackageName.indexOf('*') != -1)
 				continue;
 
-			VersionRange versionRange = VersionRange.fromOSGiVersionRange(importSpec.getVersionRange());
+			VersionRange versionRange = fromOSGiVersionRange(importSpec.getVersionRange());
 
 			//TODO this needs to be refined to take into account all the attribute handled by imports
-			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
 		}
-		iu.setRequiredCapabilities((IRequiredCapability[]) reqsDeps.toArray(new IRequiredCapability[reqsDeps.size()]));
+		iu.setRequirements((IRequirement[]) reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
 
 		// Create set of provided capabilities
 		ArrayList providedCapabilities = new ArrayList();
-		providedCapabilities.add(createSelfCapability(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
-		providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
+		providedCapabilities.add(createSelfCapability(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
+		providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
 
 		// Process the export package
 		ExportPackageDescription exports[] = bd.getExportPackages();
 		for (int i = 0; i < exports.length; i++) {
 			//TODO make sure that we support all the refinement on the exports
-			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), Version.fromOSGiVersion(exports[i].getVersion())));
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), fromOSGiVersion(exports[i].getVersion())));
 		}
 		// Here we add a bundle capability to identify bundles
 		if (isBinaryBundle)
@@ -318,7 +320,7 @@ public class MetadataGeneratorHelper {
 			providedCapabilities.add(SOURCE_BUNDLE_CAPABILITY);
 
 		if (isFragment)
-			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), Version.fromOSGiVersion(bd.getVersion())));
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), fromOSGiVersion(bd.getVersion())));
 
 		if (manifestLocalizations != null) {
 			for (Iterator iter = manifestLocalizations.keySet().iterator(); iter.hasNext();) {
@@ -416,14 +418,14 @@ public class MetadataGeneratorHelper {
 		InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
 		String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
 		fragment.setId(fragmentId);
-		fragment.setVersion(Version.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
+		fragment.setVersion(fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
 
 		HostSpecification hostSpec = bd.getHost();
-		IRequiredCapability[] hostReqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), VersionRange.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
+		IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
 		fragment.setHost(hostReqs);
 
 		fragment.setSingleton(true);
-		fragment.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 
 		// Create a provided capability for each locale and add the translated properties.
 		ArrayList providedCapabilities = new ArrayList(hostLocalizations.keySet().size());
@@ -464,7 +466,7 @@ public class MetadataGeneratorHelper {
 	}
 
 	private static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
-		return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), new Version(1, 0, 0));
+		return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
 	}
 
 	/**
@@ -488,13 +490,13 @@ public class MetadataGeneratorHelper {
 		for (Iterator iterator = featureIUs.iterator(); iterator.hasNext();) {
 			IInstallableUnit iu = (IInstallableUnit) iterator.next();
 			VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
-			reqsConfigurationUnits.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
+			reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
 		}
 		//note that update sites don't currently support nested categories, but it may be useful to add in the future
 		if (parentCategory != null) {
-			reqsConfigurationUnits.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
+			reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter() == null ? null : parentCategory.getFilter(), false, false));
 		}
-		cat.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[reqsConfigurationUnits.size()]));
+		cat.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
 
 		// Create set of provided capabilities
 		ArrayList providedCapabilities = new ArrayList();
@@ -517,7 +519,7 @@ public class MetadataGeneratorHelper {
 		cat.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 
 		cat.setArtifacts(new IArtifactKey[0]);
-		cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
+		cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
 		return MetadataFactory.createInstallableUnit(cat);
 	}
 
@@ -557,15 +559,15 @@ public class MetadataGeneratorHelper {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = createDefaultConfigUnitId(OSGI_BUNDLE_CLASSIFIER, configurationFlavor);
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on bundles
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
 		cu.setHost(reqs);
 		Map touchpointData = new HashMap();
 
@@ -593,15 +595,15 @@ public class MetadataGeneratorHelper {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on features
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
 		cu.setHost(reqs);
 
 		cu.setFilter(INSTALL_FEATURES_FILTER);
@@ -617,15 +619,15 @@ public class MetadataGeneratorHelper {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on source providers
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
 		cu.setHost(reqs);
 		Map touchpointData = new HashMap();
 
@@ -639,7 +641,7 @@ public class MetadataGeneratorHelper {
 	 * @deprecated moved to FeaturesAction
 	 */
 	public static IArtifactKey createFeatureArtifactKey(String fsn, String version) {
-		return new ArtifactKey(ECLIPSE_FEATURE_CLASSIFIER, fsn, new Version(version));
+		return new ArtifactKey(ECLIPSE_FEATURE_CLASSIFIER, fsn, Version.create(version));
 	}
 
 	/**
@@ -656,7 +658,7 @@ public class MetadataGeneratorHelper {
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/false);
 		iu.setId(id);
-		Version version = Version.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
+		Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
 		iu.setVersion(version);
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
 		iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
@@ -667,7 +669,7 @@ public class MetadataGeneratorHelper {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		if (feature.getApplication() != null)
@@ -755,7 +757,7 @@ public class MetadataGeneratorHelper {
 		if (transformIds)
 			id = getTransformedId(id, /*isPlugin*/false, /*isGroup*/true);
 		iu.setId(id);
-		Version version = Version.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
+		Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
 		iu.setVersion(version);
 		iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
 		if (feature.getDescription() != null)
@@ -765,27 +767,27 @@ public class MetadataGeneratorHelper {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
 
 		FeatureEntry entries[] = feature.getEntries();
-		IRequiredCapability[] required = new IRequiredCapability[entries.length + (featureIU == null ? 0 : 1)];
+		IRequirement[] required = new IRequirement[entries.length + (featureIU == null ? 0 : 1)];
 		for (int i = 0; i < entries.length; i++) {
 			VersionRange range = getVersionRange(entries[i]);
 			String requiredId = entries[i].getId();
 			if (transformIds)
 				requiredId = getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true);
-			required[i] = MetadataFactory.createRequiredCapability(IU_NAMESPACE, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false);
+			required[i] = MetadataFactory.createRequirement(IU_NAMESPACE, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false);
 		}
 		// the feature IU could be null if we are just generating a feature structure rather than
 		// actual features.
 		if (featureIU != null)
-			required[entries.length] = MetadataFactory.createRequiredCapability(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false);
-		iu.setRequiredCapabilities(required);
+			required[entries.length] = MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false);
+		iu.setRequirements(required);
 		iu.setTouchpointType(ITouchpointType.NONE);
-		iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
 		// TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
 		// 		 of the feature?
 		// iu.setFilter(filter);
@@ -825,7 +827,7 @@ public class MetadataGeneratorHelper {
 		InstallableUnitPatchDescription iu = new MetadataFactory.InstallableUnitPatchDescription();
 		String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
 		iu.setId(id);
-		Version version = Version.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
+		Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
 		iu.setVersion(version);
 		iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
 		if (feature.getDescription() != null)
@@ -835,7 +837,7 @@ public class MetadataGeneratorHelper {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
@@ -846,35 +848,36 @@ public class MetadataGeneratorHelper {
 		ArrayList requirementChanges = new ArrayList();
 		for (int i = 0; i < entries.length; i++) {
 			VersionRange range = getVersionRange(entries[i]);
-			IRequiredCapability req = MetadataFactory.createRequiredCapability(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
+			IRequirement req = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
 			if (entries[i].isRequires()) {
 				applicabilityScope.add(req);
+				if (applicabilityScope.size() == 1) {
+					iu.setLifeCycle(MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, null, false, false, false));
+				}
 				continue;
 			}
 			if (entries[i].isPlugin()) {
-				IRequiredCapability from = MetadataFactory.createRequiredCapability(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
+				IRequirement from = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
 				requirementChanges.add(MetadataFactory.createRequirementChange(from, req));
 				continue;
 			}
 			patchRequirements.add(req);
 		}
 		//Always add a requirement on the IU containing the feature jar
-		patchRequirements.add(MetadataFactory.createRequiredCapability(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false));
-		iu.setRequiredCapabilities((IRequiredCapability[]) patchRequirements.toArray(new IRequiredCapability[patchRequirements.size()]));
-		iu.setApplicabilityScope(new IRequiredCapability[][] {(IRequiredCapability[]) applicabilityScope.toArray(new IRequiredCapability[applicabilityScope.size()])});
+		patchRequirements.add(MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false));
+		iu.setRequirements((IRequirement[]) patchRequirements.toArray(new IRequirement[patchRequirements.size()]));
+		iu.setApplicabilityScope(new IRequirement[][] {(IRequirement[]) applicabilityScope.toArray(new IRequirement[applicabilityScope.size()])});
 		iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
 
 		//Generate lifecycle
-		IRequiredCapability lifeCycle = null;
-		if (applicabilityScope.size() > 0) {
-			IRequiredCapability req = (IRequiredCapability) applicabilityScope.get(0);
-			lifeCycle = MetadataFactory.createRequiredCapability(req.getNamespace(), req.getName(), req.getRange(), null, false, false, false);
-			iu.setLifeCycle(lifeCycle);
-		}
+		//		IRequirement lifeCycle = null;
+		//		if (applicabilityScope.size() > 0) {
+		//			IRequirement req = (IRequirement) applicabilityScope.get(0);
+		//		}
 
 		iu.setTouchpointType(ITouchpointType.NONE);
-		iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
-		iu.setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
 		// TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
 		// 		 of the feature?
 		// iu.setFilter(filter);
@@ -940,8 +943,8 @@ public class MetadataGeneratorHelper {
 		String configId = "config." + id;//$NON-NLS-1$
 		cu.setId(configId);
 		cu.setVersion(version);
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, versionMax, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, Version.MAX_VERSION, true), null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configId, version)});
 		cu.setTouchpointType(TOUCHPOINT_NATIVE);
 		Map touchpointData = new HashMap();
@@ -1007,8 +1010,8 @@ public class MetadataGeneratorHelper {
 		String configUnitId = configurationFlavor + launcherId;
 		cu.setId(configUnitId);
 		cu.setVersion(LAUNCHER_VERSION);
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(LAUNCHER_VERSION, true, versionMax, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(LAUNCHER_VERSION, true, Version.MAX_VERSION, true), null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, LAUNCHER_VERSION)});
 		cu.setTouchpointType(TOUCHPOINT_NATIVE);
 		Map touchpointData = new HashMap();
@@ -1143,11 +1146,11 @@ public class MetadataGeneratorHelper {
 		Version version = DEFAULT_JRE_VERSION;
 		//TODO Find a better way to determine JRE version
 		if (profileName.indexOf("1.6") > 0) { //$NON-NLS-1$
-			version = new Version("1.6"); //$NON-NLS-1$
+			version = Version.create("1.6"); //$NON-NLS-1$
 		} else if (profileName.indexOf("1.5") > 0) { //$NON-NLS-1$
-			version = new Version("1.5"); //$NON-NLS-1$
+			version = Version.create("1.5"); //$NON-NLS-1$
 		} else if (profileName.indexOf("1.4") > 0) { //$NON-NLS-1$
-			version = new Version("1.4"); //$NON-NLS-1$
+			version = Version.create("1.4"); //$NON-NLS-1$
 		}
 		iu.setVersion(version);
 		try {
@@ -1160,7 +1163,7 @@ public class MetadataGeneratorHelper {
 	/**
 	 * @deprecated moved to FeaturesAction
 	 */
-	public static String getFilter(FeatureEntry entry) {
+	public static IMatchExpression getFilter(FeatureEntry entry) {
 		StringBuffer result = new StringBuffer();
 		result.append("(&"); //$NON-NLS-1$
 		if (entry.getFilter() != null)
@@ -1176,7 +1179,7 @@ public class MetadataGeneratorHelper {
 		if (result.length() == 2)
 			return null;
 		result.append(')');
-		return result.toString();
+		return InstallableUnit.parseFilter(result.toString());
 	}
 
 	/**
@@ -1193,20 +1196,22 @@ public class MetadataGeneratorHelper {
 		String versionSpec = entry.getVersion();
 		if (versionSpec == null)
 			return VersionRange.emptyRange;
-		Version version = new Version(versionSpec);
+		Version version = Version.create(versionSpec);
 		if (version.equals(Version.emptyVersion))
 			return VersionRange.emptyRange;
 		if (!entry.isRequires())
 			return new VersionRange(version, true, version, true);
 		String match = entry.getMatch();
+
+		org.osgi.framework.Version osgiVersion = toOSGiVersion(version);
 		if (match == null || match.equals("compatible")) { //$NON-NLS-1$
-			Version upper = new Version(version.getMajor() + 1, 0, 0);
+			Version upper = Version.createOSGi(osgiVersion.getMajor() + 1, 0, 0);
 			return new VersionRange(version, true, upper, false);
 		}
 		if (match.equals("perfect")) //$NON-NLS-1$
 			return new VersionRange(version, true, version, true);
 		if (match.equals("equivalent")) { //$NON-NLS-1$
-			Version upper = new Version(version.getMajor(), version.getMinor() + 1, 0);
+			Version upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor() + 1, 0);
 			return new VersionRange(version, true, upper, false);
 		}
 		if (match.equals("greaterOrEqual")) //$NON-NLS-1$
@@ -1383,4 +1388,47 @@ public class MetadataGeneratorHelper {
 		return localizations;
 	}
 
+	/**
+	 * Convert <code>version</code> into its OSGi equivalent if possible.
+	 *
+	 * @param version The version to convert. Can be <code>null</code>
+	 * @return The converted version or <code>null</code> if the argument was <code>null</code>
+	 * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
+	 */
+	public static org.osgi.framework.Version toOSGiVersion(Version version) {
+		if (version == null)
+			return null;
+		if (version == Version.emptyVersion)
+			return org.osgi.framework.Version.emptyVersion;
+		if (version == Version.MAX_VERSION)
+			return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+
+		BasicVersion bv = (BasicVersion) version;
+		return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
+	}
+
+	/**
+	 * Create an omni version from an OSGi <code>version</code>.
+	 * @param version The OSGi version. Can be <code>null</code>.
+	 * @return The created omni version
+	 */
+	public static Version fromOSGiVersion(org.osgi.framework.Version version) {
+		if (version == null)
+			return null;
+		if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
+			return Version.MAX_VERSION;
+		return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
+	}
+
+	public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
+		if (range.equals(VersionRange.emptyRange))
+			return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
+		return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
+	}
+
+	public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
+		if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
+			return VersionRange.emptyRange;
+		return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
+	}
 };
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.classpath
index ef37949..834ea83 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" output="bin_ant" path="src_ant"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch
index 864bdaf..d3596d8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch	
@@ -1,12 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml"/>
+<listEntry value="/org.eclipse.equinox.p2.metadata.repository"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
+<listEntry value="4"/>
 </listAttribute>
 <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
@@ -15,4 +14,4 @@
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
+</launchConfiguration>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.project b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.project
index b1aa25a..920d1f2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.project
@@ -26,6 +26,11 @@
 			</arguments>
 		</buildCommand>
 		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
 			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
 			<triggers>full,incremental,</triggers>
 			<arguments>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
index 904df31..6a7984c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Feb 22 11:22:59 EST 2008
+#Mon Dec 28 00:17:37 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
index 4fdf597..6bf168c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
@@ -1,68 +1,50 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.repository;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.repository;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.repository.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
-Export-Package: org.eclipse.equinox.internal.p2.metadata.mirror;x-internal:=true,
- org.eclipse.equinox.internal.p2.metadata.repository;
+Export-Package: org.eclipse.equinox.internal.p2.metadata.repository;
   x-friends:="org.eclipse.equinox.p2.engine,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.publisher,
    org.eclipse.equinox.p2.reconciler.dropins,
    org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.metadata.repository.io;x-friends:="org.eclipse.equinox.p2.engine",
- org.eclipse.equinox.internal.provisional.p2.metadata.repository;
-  x-friends:="org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.director,
-   org.eclipse.equinox.p2.director.app,
-   org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.installer,
-   org.eclipse.equinox.p2.metadata.generator,
-   org.eclipse.equinox.p2.publisher,
-   org.eclipse.equinox.p2.reconciler.dropins,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.updatechecker,
    org.eclipse.equinox.p2.updatesite,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;x-friends:="org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.engine"
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;resolution:=optional,
+   org.eclipse.equinox.p2.extensionlocation,
+   org.eclipse.equinox.p2.repository.tools",
+ org.eclipse.equinox.internal.p2.metadata.repository.io;x-friends:="org.eclipse.equinox.p2.engine"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.registry,
+ org.eclipse.ecf.filetransfer;bundle-version="2.0.0"
+Import-Package: javax.xml.parsers, 
+ org.eclipse.ecf.core.util,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.metadata,
+ org.eclipse.equinox.internal.p2.metadata.index,
  org.eclipse.equinox.internal.p2.persistence,
  org.eclipse.equinox.internal.p2.repository,
  org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core,
  org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.query,
  org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.equinox.security.storage,
- org.eclipse.osgi.service.resolver;version="1.1.0",
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
+ org.osgi.service.prefs;version="1.1.1",
  org.xml.sax
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.repository.Activator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Service-Component: OSGI-INF/repositoryManager.xml
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry,
- org.eclipse.ecf;bundle-version="1.2.0",
- org.eclipse.ecf.filetransfer;bundle-version="2.0.0",
- org.eclipse.osgi;bundle-version="3.4.0",
- org.eclipse.core.jobs;bundle-version="[3.2.0,4.0.0)"
-Eclipse-BuddyPolicy: registered
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
new file mode 100644
index 0000000..fdf2579
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.metadata.repository">
+   <implementation class="org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/build.properties
index 7a8c0c1..ffda852 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/build.properties
@@ -15,7 +15,8 @@ bin.includes = META-INF/,\
                about.html,\
                plugin.xml,\
                plugin.properties,\
-               ant_tasks/metadataRepository-ant.jar
+               ant_tasks/metadataRepository-ant.jar,\
+               OSGI-INF/
 src.includes = about.html,\
                schema/
 jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
@@ -23,3 +24,5 @@ jars.compile.order = .,\
                      ant_tasks/metadataRepository-ant.jar
 source.ant_tasks/metadataRepository-ant.jar = src_ant/
 output.ant_tasks/metadataRepository-ant.jar = bin_ant/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.launch b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.launch
deleted file mode 100644
index 4d7cb3c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/p2 tools - mirror metadata.launch	
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2 tools - mirror metadata"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication
-source http://download.eclipse.org/eclipse/updates/3.4milestones/
-destination file:c:/p2"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.security at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.app at default:true,org.eclipse.osgi.services at default:default,org.eclipse.osgi@:,org.eclipse.equinox.launcher at default:default,org.eclipse.equinox.common at default:default,org.eclipse.equinox.registry at default:default,javax.servlet at default:default,org.eclipse.core.jobs at default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.sat4j.pb at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.p2.director at default:default,org.sat4j.core at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.console at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.engine at default:default,org.eclipse.ecf at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.jarprocessor at default:default"/>
-</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/plugin.xml
index c1bac45..3deee95 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/plugin.xml
@@ -4,20 +4,9 @@
    <extension-point id="metadataRepositories" name="Metadata Repositories" schema="schema/metadataRepositories.exsd"/>
    <extension id="simpleRepository"  point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
 		<filter suffix="content.xml"/>
-		<factory class="org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory"/>
-   </extension>
-   <extension
-         id="mirrorApplication"
-         point="org.eclipse.core.runtime.applications">
-      <application
-            cardinality="1"
-            thread="main"
-            visible="true">
-         <run
-               class="org.eclipse.equinox.internal.p2.metadata.mirror.MirrorApplication">
-         </run>
-      </application>
+		<factory class="org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory"/>
    </extension>
+
    <extension id="compositeRepository"  point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
         <filter suffix="compositeContent.xml"/>
         <factory class="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory"/>
@@ -36,12 +25,6 @@
 			class="org.eclipse.equinox.internal.p2.metadata.repository.ant.CreateCompositeMetadataRepositoryTask">
 		</antTask>
 		
-   		<antTask
-			library="ant_tasks/metadataRepository-ant.jar"
-			name="p2.metadata.mirror"
-			class="org.eclipse.equinox.internal.p2.metadata.repository.ant.MirrorApplicationTask">
-		</antTask>
-		
 		<antTask
 			library="ant_tasks/metadataRepository-ant.jar"
 			name="p2.composite.metadata.repository.remove"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/pom.xml
new file mode 100644
index 0000000..af77333
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<artifactId>org.eclipse.equinox.p2-parent</artifactId>
+		<groupId>org.eclipse</groupId>
+		<version>0.0.1-SNAPSHOT</version>
+		<relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+	</parent>
+	<groupId>org.eclipse</groupId>
+	<artifactId>org.eclipse.equinox.p2.metadata.repository</artifactId>
+	<version>1.1.0.qualifier</version>
+	<packaging>eclipse-plugin</packaging>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.sonatype.tycho</groupId>
+				<artifactId>maven-osgi-compiler-plugin</artifactId>
+				<version>${tycho-version}</version>
+				<configuration>
+					<extraClasspathElements>
+						<extraClasspathElement>
+							<groupId>org.apache.ant</groupId>
+							<artifactId>ant</artifactId>
+							<version>1.7.1</version>
+						</extraClasspathElement>
+					</extraClasspathElements>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant</artifactId>
+			<version>1.7.1</version>
+		</dependency>
+
+	</dependencies>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
index f32458c..20624c4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.equinox.p2.metadata.repository" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.equinox.p2.metadata.repository" id="metadataRepositories" name="Metadata Repositories"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to provide metadata repository implementations
       </documentation>
@@ -12,14 +12,14 @@
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
             <element ref="factory"/>
-            <element ref="filter" minOccurs="0" maxOccurs="1"/>
+            <element ref="filter"/>
          </sequence>
          <attribute name="point" type="string" use="required">
             <annotation>
@@ -40,9 +40,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -56,9 +56,9 @@
                   the fully-qualified name of a class which implements 
 <samp>org.eclipse.equinox.p2.artifact.repository.IArtifactRepository</samp>.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.artifact.repository.IArtifactRepository"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -77,27 +77,27 @@
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          org.eclipse.equinox.p2.metadata.repository 1.0.0
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          [Enter extension point usage example here.]
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the class attribute must represent an 
 implementor of <tt>org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory</tt>
@@ -105,18 +105,18 @@ implementor of <tt>org.eclipse.equinox.internal.provisional.spi.p2.metadat
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This bundle provides an artifact repository factory for the IMetadataRepositoryManager#TYPE_SIMPLE_REPOSITORY repository type.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2007, 2008 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java
deleted file mode 100644
index 535fed6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
-	private String[] rootSpecs;
-	private URI sourceLocation;
-	private URI destinationLocation;
-	private IMetadataRepository source;
-	private IMetadataRepository destination;
-	private boolean transitive = false;
-	private boolean append = true;
-	private IMetadataRepositoryManager cachedManager;
-	private boolean sourceLoaded = false;
-	private boolean destinationLoaded = false;
-	private String destinationName;
-
-	/**
-	 * Convert a list of tokens into an array. The list separator has to be
-	 * specified.
-	 */
-	public static String[] getArrayArgsFromString(String list, String separator) {
-		if (list == null || list.trim().equals("")) //$NON-NLS-1$
-			return new String[0];
-		List result = new ArrayList();
-		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
-			String token = tokens.nextToken().trim();
-			if (!token.equals("")) { //$NON-NLS-1$
-				if ((token.indexOf('[') >= 0 || token.indexOf('(') >= 0) && tokens.hasMoreTokens())
-					result.add(token + separator + tokens.nextToken());
-				else
-					result.add(token);
-			}
-		}
-		return (String[]) result.toArray(new String[result.size()]);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
-	 */
-	public Object start(IApplicationContext context) throws Exception {
-		try {
-			initializeFromArguments((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
-			setupRepositories();
-			new Mirroring().mirror(source, destination, rootSpecs, transitive);
-			return IApplication.EXIT_OK;
-		} catch (Exception e) {
-			System.err.println(e.getMessage());
-			throw e;
-		} finally {
-			//if the repository was not already loaded before the mirror application started, close it.
-			if (!sourceLoaded && sourceLocation != null)
-				getManager().removeRepository(sourceLocation);
-			if (!destinationLoaded && destinationLocation != null)
-				getManager().removeRepository(destinationLocation);
-		}
-	}
-
-	private void setupRepositories() throws ProvisionException {
-		if (destinationLocation == null || sourceLocation == null)
-			throw new IllegalStateException("Must specify a source and destination"); //$NON-NLS-1$
-
-		//Check if repositories are already loaded
-		//TODO modify the contains statement once the API is available
-		sourceLoaded = getManager().contains(sourceLocation);
-		//TODO modify the contains statement once the API is available
-		destinationLoaded = getManager().contains(destinationLocation);
-
-		//must execute before initializeDestination is called
-		source = getManager().loadRepository(sourceLocation, 0, null);
-		destination = initializeDestination();
-	}
-
-	/*
-	 * Return the metadata repository manager. We need to check the service here
-	 * as well as creating one manually in case we are running a stand-alone application
-	 * in which no one has registered a manager yet.
-	 */
-	private IMetadataRepositoryManager getManager() {
-		if (cachedManager != null)
-			return cachedManager;
-		IMetadataRepositoryManager result = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
-		// service not available... create one and hang onto it
-		if (result == null) {
-			cachedManager = new MetadataRepositoryManager();
-			result = cachedManager;
-		}
-		return result;
-	}
-
-	private IMetadataRepository initializeDestination() throws ProvisionException {
-		try {
-			IMetadataRepository repository = getManager().loadRepository(destinationLocation, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
-			if (repository != null && repository.isModifiable()) {
-				if (destinationName != null)
-					repository.setName(destinationName);
-				if (!append)
-					repository.removeAll();
-				return repository;
-			}
-		} catch (ProvisionException e) {
-			//fall through and create repo
-		}
-		//This code assumes source has been successfully loaded before this point
-		//No existing repository; create a new repository at destinationLocation but with source's attributes.
-		// TODO for now create a Simple repo by default.
-		return (IMetadataRepository) RepositoryHelper.validDestinationRepository(getManager().createRepository(destinationLocation, destinationName == null ? source.getName() : destinationName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, source.getProperties()));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.app.IApplication#stop()
-	 */
-	public void stop() {
-		//do nothing
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-		for (int i = 0; i < args.length; i++) {
-			// check for args with parameters. If we are at the last argument or 
-			// if the next one has a '-' as the first character, then we can't have 
-			// an arg with a param so continue.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-			String arg = args[++i];
-
-			if (args[i - 1].equalsIgnoreCase("-destinationName")) //$NON-NLS-1$
-				destinationName = arg;
-			if (args[i - 1].equalsIgnoreCase("-writeMode")) //$NON-NLS-1$
-				if (args[i].equalsIgnoreCase("clean")) //$NON-NLS-1$
-					append = false;
-
-			try {
-				if (args[i - 1].equalsIgnoreCase("-source")) //$NON-NLS-1$
-					sourceLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
-				if (args[i - 1].equalsIgnoreCase("-destination")) //$NON-NLS-1$
-					destinationLocation = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
-			} catch (URISyntaxException e) {
-				throw new IllegalArgumentException("Repository location (" + arg + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-			if (args[i - 1].equalsIgnoreCase("-roots")) //$NON-NLS-1$
-				rootSpecs = getArrayArgsFromString(arg, ","); //$NON-NLS-1$
-			if (args[i - 1].equalsIgnoreCase("-transitive")) //$NON-NLS-1$
-				transitive = true;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java
deleted file mode 100644
index 9746962..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/Mirroring.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * A utility class that performs mirroring of metadatas between repositories.
- */
-public class Mirroring {
-
-	public void validate(IMetadataRepository source, IMetadataRepository destination) {
-		if (source == null)
-			throw new IllegalStateException("Source repository is null."); //$NON-NLS-1$
-		if (destination == null)
-			throw new IllegalStateException("Destination repository is null."); //$NON-NLS-1$
-		if (!destination.isModifiable())
-			throw new IllegalStateException("Destination repository must be modifiable: " + destination.getLocation()); //$NON-NLS-1$
-	}
-
-	public void mirror(IMetadataRepository source, IMetadataRepository destination, String[] rootSpecs, boolean transitive) {
-		if (rootSpecs == null)
-			mirror(source, destination, InstallableUnitQuery.ANY, transitive);
-		else {
-			VersionRangedName[] roots = new VersionRangedName[rootSpecs.length];
-			for (int i = 0; i < rootSpecs.length; i++)
-				roots[i] = VersionRangedName.parse(rootSpecs[i]);
-			mirror(source, destination, new RangeQuery(roots), transitive);
-		}
-	}
-
-	public void mirror(IMetadataRepository source, IMetadataRepository destination, Query query, boolean transitive) {
-		validate(source, destination);
-		Collector result = source.query(query, new Collector(), null);
-		mirror(source, destination, (IInstallableUnit[]) result.toArray(IInstallableUnit.class), transitive);
-	}
-
-	private void mirror(IMetadataRepository source, IMetadataRepository destination, IInstallableUnit[] roots, boolean transitive) {
-		if (transitive)
-			roots = addTransitiveIUs(source, roots);
-		destination.addInstallableUnits(roots);
-	}
-
-	protected IInstallableUnit[] addTransitiveIUs(IMetadataRepository source, IInstallableUnit[] roots) {
-		// TODO Here we should create a profile from the source repo and discover all the 
-		// IUs that are needed to support the given roots.  For now just assume that the 
-		// given roots are enough.
-		return roots;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java
deleted file mode 100644
index e24e109..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/RangeQuery.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A convenience query that will match any {@link IInstallableUnit}
- * it encounters.
- */
-public class RangeQuery extends MatchQuery {
-	private VersionRangedName[] targets;
-
-	/**
-	 * Creates a query that will match any {@link IInstallableUnit} with the given
-	 * VerionRangedName.
-	 * 
-	 * @param targets The installable unit names with versions to match, or <code>null</code> to match any id
-	 */
-	public RangeQuery(VersionRangedName[] targets) {
-		this.targets = targets;
-	}
-
-	/**
-	 * Returns true if the <code>IInstallableUnit</code> object is contained in the <code>VerionRangedName</code>'s or targets is null.
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		if (targets == null)
-			return true;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		for (int i = 0; i < targets.length; i++) {
-			VersionRangedName entry = targets[i];
-			if (entry.getId().equalsIgnoreCase(candidate.getId()) && entry.getVersionRange().isIncluded(candidate.getVersion()))
-				return true;
-		}
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java
deleted file mode 100644
index 9d2f4c0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/mirror/VersionRangedName.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *     IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-public class VersionRangedName {
-	private final String id;
-	private final VersionRange range;
-
-	/**
-	 * Creates and returns a new version ranged id from the given spec.  The spec should be
-	 * id/version range.
-	 * @param spec the spec for the version ranged id to create
-	 * @return the parsed versioned id
-	 */
-	public static VersionRangedName parse(String spec) {
-		String[] segments = MirrorApplication.getArrayArgsFromString(spec, "/"); //$NON-NLS-1$
-		return new VersionRangedName(segments[0], segments.length == 1 ? null : segments[1]);
-	}
-
-	public VersionRangedName(String id, String rangeSpec) {
-		this(id, new VersionRange(rangeSpec));
-	}
-
-	public VersionRangedName(String id, VersionRange range) {
-		if (id == null)
-			throw new IllegalArgumentException("id cannot be null"); //$NON-NLS-1$
-		this.id = id;
-		this.range = range != null ? range : new VersionRange(null);
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public VersionRange getVersionRange() {
-		return range;
-	}
-
-	public String toString() {
-		return id + "/" + (range == null ? "0.0.0" : range.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
index 83380b3..1d92ba7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
@@ -11,72 +11,25 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
+public class Activator implements BundleActivator {
 
 	public static final String ID = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
 	public static final String REPO_PROVIDER_XPT = ID + '.' + "metadataRepositories"; //$NON-NLS-1$
 
 	private static BundleContext bundleContext;
-	private static CacheManager cacheManager;
-	private ServiceRegistration repositoryManagerRegistration;
-	private MetadataRepositoryManager repositoryManager;
-	private ServiceTracker tracker;
 
 	public static BundleContext getContext() {
 		return bundleContext;
 	}
 
-	public static CacheManager getCacheManager() {
-		return cacheManager;
+	public void start(BundleContext aContext) throws Exception {
+		bundleContext = aContext;
 	}
 
-	public void start(BundleContext context) throws Exception {
-		Activator.bundleContext = context;
-		cacheManager = new CacheManager();
-
-		// need to track event bus coming and going to make sure cache gets cleaned on
-		// repository removals
-		tracker = new ServiceTracker(context, IProvisioningEventBus.SERVICE_NAME, this);
-		tracker.open();
-
-		cacheManager.registerRepoEventListener();
-		repositoryManager = new MetadataRepositoryManager();
-		repositoryManagerRegistration = context.registerService(IMetadataRepositoryManager.class.getName(), repositoryManager, null);
-	}
-
-	public void stop(BundleContext context) throws Exception {
-		if (cacheManager != null) {
-			cacheManager.unregisterRepoEventListener();
-			cacheManager = null;
-		}
-		Activator.bundleContext = null;
-		if (repositoryManagerRegistration != null)
-			repositoryManagerRegistration.unregister();
-		repositoryManagerRegistration = null;
-		if (repositoryManager != null) {
-			repositoryManager.shutdown();
-			repositoryManager = null;
-		}
-	}
-
-	public Object addingService(ServiceReference reference) {
-		cacheManager.registerRepoEventListener();
-		return null;
-	}
-
-	public void modifiedService(ServiceReference reference, Object service) {
-		// ignored
-
-	}
-
-	public void removedService(ServiceReference reference, Object service) {
-		// ignored
-
+	public void stop(BundleContext aContext) throws Exception {
+		bundleContext = null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java
deleted file mode 100644
index 1d4f074..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CacheManager.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Cloudsmith Inc - additional implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.repository.*;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A class to manage metadata cache files. Creating the cache files will place
- * the file in the AgentData location in a cache directory.
- * 
- * Using the bus listeners will allow the manager to listen for repository
- * events. When a repository is removed, it will remove the cache file if one
- * was created for the repository.
- */
-public class CacheManager {
-	/**
-	 * IStateful implementation of BufferedOutputStream. Class is used to get the status from
-	 * a download operation.
-	 */
-	private static class StatefulStream extends BufferedOutputStream implements IStateful {
-		private IStatus status;
-
-		public StatefulStream(OutputStream stream) {
-			super(stream);
-		}
-
-		public IStatus getStatus() {
-
-			return status;
-		}
-
-		public void setStatus(IStatus aStatus) {
-			status = aStatus;
-		}
-
-	}
-
-	private static SynchronousProvisioningListener busListener;
-	private static final String DOWNLOADING = "downloading"; //$NON-NLS-1$
-	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-	private static final String PROP_RESUMABLE = "org.eclipse.equinox.p2.metadata.repository.resumable"; //$NON-NLS-1$
-	private static final String RESUME_DEFAULT = "true"; //$NON-NLS-1$
-	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-
-	private final HashSet knownPrefixes = new HashSet(5);
-
-	/**
-	 * Returns a hash of the repository location.
-	 */
-	private int computeHash(URI repositoryLocation) {
-		return repositoryLocation.hashCode();
-	}
-
-	/**
-	 * Returns a local cache file with the contents of the given remote location,
-	 * or <code>null</code> if a local cache could not be created.
-	 * 
-	 * @param repositoryLocation The remote location to be cached
-	 * @param prefix The prefix to use when creating the cache file
-	 * @param monitor a progress monitor
-	 * @return A {@link File} object pointing to the cache file or <code>null</code>
-	 * if the location is not a repository.
-	 * @throws FileNotFoundException if neither jar nor xml index file exists at given location 
-	 * @throws AuthenticationFailedException if jar not available and xml causes authentication fail
-	 * @throws IOException on general IO errors
-	 * @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
-	 * @throws OperationCanceledException - if user canceled
-	 */
-	public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor) throws IOException, ProvisionException {
-
-		SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
-		try {
-			knownPrefixes.add(prefix);
-			File cacheFile = getCache(repositoryLocation, prefix);
-			URI jarLocation = URIUtil.append(repositoryLocation, prefix + JAR_EXTENSION);
-			URI xmlLocation = URIUtil.append(repositoryLocation, prefix + XML_EXTENSION);
-			int hashCode = computeHash(repositoryLocation);
-
-			// Knowing if cache is stale is complicated by the fact that a jar could have been 
-			// produced after an xml index (and vice versa), and by the need to capture any
-			// errors, as these needs to be reported to the user as something meaningful - instead of
-			// just a general "can't read repository".
-			// (Previous impl of stale checking ignored errors, and caused multiple round-trips)
-			boolean stale = true;
-			long lastModified = 0L;
-			String name = null;
-			String useExtension = JAR_EXTENSION;
-			URI remoteFile = jarLocation;
-
-			if (cacheFile != null) {
-				lastModified = cacheFile.lastModified();
-				name = cacheFile.getName();
-			}
-			// get last modified on jar
-			long lastModifiedRemote = 0L;
-			// bug 269588 - server may return 0 when file exists, so extra flag is needed
-			boolean useJar = true;
-			try {
-				lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1));
-				if (lastModifiedRemote <= 0)
-					LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$
-			} catch (AuthenticationFailedException e) {
-				// it is not meaningful to continue - the credentials are for the server
-				// do not pass the exception - it gives no additional meaningful user information
-				throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
-			} catch (CoreException e) {
-				useJar = false;
-				// give up on a timeout - if we did not get a 404 on the jar, we will just prolong the pain
-				// by (almost certainly) also timing out on the xml.
-				if (e.getStatus() != null && e.getStatus().getException() != null) {
-					Throwable ex = e.getStatus().getException();
-					if (ex.getClass() == java.net.SocketTimeoutException.class)
-						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), ex));
-				}
-			} catch (OperationCanceledException e) {
-				// must pass this on
-				throw e;
-			} catch (Exception e) {
-				// not ideal, just skip the jar on error, and try the xml instead - report errors for
-				// the xml.
-				useJar = false;
-			}
-			if (submonitor.isCanceled())
-				throw new OperationCanceledException();
-
-			if (useJar) {
-				// There is a jar, and it should be used - cache is stale if it is xml based or
-				// if older (irrespective of jar or xml).
-				// Bug 269588 - also stale if remote reports 0
-				stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(XML_EXTENSION) || lastModifiedRemote <= 0);
-			} else {
-				// Also need to check remote XML file, and handle cancel, and errors
-				// (Status is reported based on finding the XML file as giving up on certain errors
-				// when checking for the jar may not be correct).
-				try {
-					lastModifiedRemote = getTransport().getLastModified(xmlLocation, submonitor.newChild(1));
-					// if lastModifiedRemote is 0 - something is wrong in the communication stack, as 
-					// a FileNotFound exception should have been thrown.
-					// bug 269588 - server may return 0 when file exists - site is not correctly configured
-					if (lastModifiedRemote <= 0)
-						LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + xmlLocation)); //$NON-NLS-1$
-
-				} catch (UserCancelledException e) {
-					throw new OperationCanceledException();
-				} catch (FileNotFoundException e) {
-					throw new FileNotFoundException(NLS.bind(Messages.CacheManager_Neither_0_nor_1_found, jarLocation, xmlLocation));
-				} catch (AuthenticationFailedException e) {
-					// do not pass the exception, it provides no additional meaningful user information
-					throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
-				} catch (CoreException e) {
-					IStatus status = e.getStatus();
-					if (status == null)
-						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e));
-					else if (status.getException() instanceof FileNotFoundException)
-						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
-					throw new ProvisionException(status);
-
-				}
-				// There is an xml, and it should be used - cache is stale if it is jar based or
-				// if older (irrespective of jar or xml).
-				// bug 269588 - server may return 0 when file exists - assume it is stale
-				stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(JAR_EXTENSION) || lastModifiedRemote <= 0);
-				useExtension = XML_EXTENSION;
-				remoteFile = xmlLocation;
-			}
-
-			if (!stale)
-				return cacheFile;
-
-			// The cache is stale or missing, so we need to update it from the remote location
-			cacheFile = new File(getCacheDirectory(), prefix + hashCode + useExtension);
-			updateCache(cacheFile, remoteFile, lastModifiedRemote, submonitor);
-			return cacheFile;
-		} finally {
-			submonitor.done();
-		}
-	}
-
-	/**
-	 * Deletes the local cache file(s) for the given repository
-	 * @param repositoryLocation
-	 */
-	void deleteCache(URI repositoryLocation) {
-		for (Iterator it = knownPrefixes.iterator(); it.hasNext();) {
-			String prefix = (String) it.next();
-			File[] cacheFiles = getCacheFiles(repositoryLocation, prefix);
-			for (int i = 0; i < cacheFiles.length; i++) {
-				// delete the cache file if it exists
-				safeDelete(cacheFiles[i]);
-				// delete a resumable download if it exists
-				safeDelete(new File(new File(cacheFiles[i].getParentFile(), DOWNLOADING), cacheFiles[i].getName()));
-			}
-		}
-	}
-
-	/**
-	 * Determines the local file path of the repository's cache file.
-	 * @param repositoryLocation The location to compute the cache for
-	 * @param prefix The prefix to use for this location
-	 * @return A {@link File} pointing to the cache file or <code>null</code> if
-	 * the cache file does not exist.
-	 */
-	private File getCache(URI repositoryLocation, String prefix) {
-		File[] files = getCacheFiles(repositoryLocation, prefix);
-		if (files[0].exists())
-			return files[0];
-		return files[1].exists() ? files[1] : null;
-	}
-
-	/**
-	 * Returns the file corresponding to the data area to be used by the cache manager.
-	 */
-	private File getCacheDirectory() {
-		AgentLocation agentLocation = (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
-		URL dataArea = agentLocation.getDataArea(Activator.ID + "/cache/"); //$NON-NLS-1$
-		return URLUtil.toFile(dataArea);
-	}
-
-	/**
-	 * Determines the local file paths of the repository's potential cache files.
-	 * @param repositoryLocation The location to compute the cache for
-	 * @param prefix The prefix to use for this location
-	 * @return A {@link File} array with the cache files for JAR and XML extensions.
-	 */
-	private File[] getCacheFiles(URI repositoryLocation, String prefix) {
-		File[] files = new File[2];
-		File dataAreaFile = getCacheDirectory();
-		int hashCode = computeHash(repositoryLocation);
-		files[0] = new File(dataAreaFile, prefix + hashCode + JAR_EXTENSION);
-		files[1] = new File(dataAreaFile, prefix + hashCode + XML_EXTENSION);
-		return files;
-	}
-
-	private RepositoryTransport getTransport() {
-		return RepositoryTransport.getInstance();
-	}
-
-	public boolean isResumeEnabled() {
-		String resumeProp = System.getProperty(PROP_RESUMABLE, RESUME_DEFAULT);
-		return Boolean.valueOf(resumeProp).booleanValue();
-	}
-
-	/**
-	 * Make cacheFile resumable and return true if it was possible.
-	 * @param cacheFile - the partially downloaded file to make resumeable
-	 * @param remoteFile The remote file being cached
-	 * @param status - the download status reported for the partial download
-	 * @return true if the file was made resumable, false otherwise
-	 */
-	private boolean makeResumeable(File cacheFile, URI remoteFile, IStatus status) {
-		if (status == null || status.isOK() || cacheFile == null || !(status instanceof DownloadStatus))
-			return false;
-		// check if resume feature is turned off
-		if (!isResumeEnabled())
-			return false;
-		DownloadStatus downloadStatus = (DownloadStatus) status;
-		long currentLength = cacheFile.length();
-		// if cache file does not exist, or nothing was written to it, there is nothing to resume
-		if (currentLength == 0L)
-			return false;
-
-		long reportedSize = downloadStatus.getFileSize();
-		long reportedModified = downloadStatus.getLastModified();
-
-		if (reportedSize == DownloadStatus.UNKNOWN_SIZE || reportedSize == 0L) {
-			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because filesize not reported.", remoteFile))); //$NON-NLS-1$
-			return false;
-		}
-		if (reportedModified <= 0) {
-			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because last-modified not reported.", remoteFile))); //$NON-NLS-1$
-			return false;
-		}
-
-		// if more than what was reported has been written something odd is going on, and we can't
-		// trust the reported size. 
-		// There is a small chance that user canceled in the time window after the full download is seen, and the result is returned. In this
-		// case the reported and current lengths will be equal.
-		if (reportedSize < currentLength) {
-			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind("Download of {0} not resumable because more was read then reported size.", remoteFile))); //$NON-NLS-1$
-			return false;
-		}
-		File resumeDir = new File(cacheFile.getParentFile(), DOWNLOADING);
-		if (!resumeDir.mkdir()) {
-			if (!(resumeDir.exists() && resumeDir.isDirectory())) {
-				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not create directory {0} for resumable download of {1}", resumeDir, remoteFile))); //$NON-NLS-1$
-				return false;
-			}
-		}
-		// move partial cache file to "downloading" directory
-		File resumeFile = new File(resumeDir, cacheFile.getName());
-		if (!cacheFile.renameTo(resumeFile)) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move {0} to {1} for resumed download", cacheFile, resumeFile))); //$NON-NLS-1$
-			return false;
-		}
-		// touch the file with remote modified time
-		if (!resumeFile.setLastModified(reportedModified)) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not set last modified time on {0} for resumed download", resumeFile))); //$NON-NLS-1$
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * Adds a {@link SynchronousProvisioningListener} to the event bus for
-	 * deleting cache files when the corresponding repository is deleted.
-	 */
-	public void registerRepoEventListener() {
-		IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
-		if (eventBus == null) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "ProvisioningEventBus could not be obtained. Metadata caches may not be cleaned up properly.")); //$NON-NLS-1$
-			return;
-		}
-		if (busListener == null) {
-			busListener = new SynchronousProvisioningListener() {
-				public void notify(EventObject o) {
-					if (o instanceof RepositoryEvent) {
-						RepositoryEvent event = (RepositoryEvent) o;
-						if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) {
-							deleteCache(event.getRepositoryLocation());
-						}
-					}
-				}
-			};
-		}
-		// the bus could have disappeared and is now back again - so do this every time
-		eventBus.addListener(busListener);
-	}
-
-	private boolean safeDelete(File file) {
-		if (file.exists()) {
-			if (!file.delete()) {
-				file.deleteOnExit();
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Removes the {@link SynchronousProvisioningListener} that cleans up the
-	 * cache file from the event bus.
-	 */
-	public void unregisterRepoEventListener() {
-		IProvisioningEventBus eventBus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
-		if (eventBus != null && busListener != null) {
-			eventBus.removeListener(busListener);
-			busListener = null;
-		}
-	}
-
-	private void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
-		cacheFile.getParentFile().mkdirs();
-		File resumeFile = new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName());
-		// if append should be performed or not
-		boolean append = false;
-		if (resumeFile.exists()) {
-			// the resume file can be too old
-			if (lastModifiedRemote != resumeFile.lastModified() || lastModifiedRemote <= 0)
-				safeDelete(resumeFile);
-			else {
-				if (resumeFile.renameTo(cacheFile))
-					append = true;
-				else
-					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind("Could not move resumable file {0} into cache", resumeFile))); //$NON-NLS-1$
-			}
-		}
-
-		StatefulStream metadata = new StatefulStream(new FileOutputStream(cacheFile, append));
-		IStatus result = null;
-		try {
-			submonitor.setWorkRemaining(1000);
-			// resume from cache file's length if in append mode
-			result = getTransport().download(remoteFile, metadata, append ? cacheFile.length() : -1, submonitor.newChild(1000));
-		} catch (OperationCanceledException e) {
-			// need to pick up the status - a new operation canceled exception is thrown at the end
-			// as status will be CANCEL.
-			result = metadata.getStatus();
-		} finally {
-			metadata.close();
-			// result is null if a runtime error (other than OperationCanceledException) 
-			// occurred, just delete the cache file (or a later attempt could fail 
-			// with "premature end of file").
-			if (result == null)
-				cacheFile.delete();
-		}
-		if (result.isOK())
-			return;
-
-		// if possible, keep a partial download to be resumed.
-		if (!makeResumeable(cacheFile, remoteFile, result))
-			cacheFile.delete();
-
-		if (result.getSeverity() == IStatus.CANCEL || submonitor.isCanceled())
-			throw new OperationCanceledException();
-		throw new ProvisionException(result);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
index 98dce00..f10a0a0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,6 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -22,18 +19,21 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
 import org.eclipse.osgi.util.NLS;
 
-public class CompositeMetadataRepository extends AbstractMetadataRepository implements IMetadataRepository, ICompositeRepository {
+public class CompositeMetadataRepository extends AbstractMetadataRepository implements ICompositeRepository<IInstallableUnit>, IIndexProvider<IInstallableUnit> {
 
 	static final public String REPOSITORY_TYPE = CompositeMetadataRepository.class.getName();
 	public static final String PI_REPOSITORY_TYPE = "compositeMetadataRepository"; //$NON-NLS-1$
@@ -43,27 +43,30 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 
 	// keep a list of the child URIs. they can be absolute or relative. they may or may not point
 	// to a valid reachable repo
-	private List childrenURIs = new ArrayList();
+	private List<URI> childrenURIs = new ArrayList<URI>();
 	// keep a list of the repositories that we have successfully loaded
-	private List loadedRepos = new ArrayList();
+	private List<IMetadataRepository> loadedRepos = new ArrayList<IMetadataRepository>();
+	private IMetadataRepositoryManager manager;
 
 	/**
 	 * Create a Composite repository in memory.
 	 * @return the repository or null if unable to create one
 	 */
-	public static CompositeMetadataRepository createMemoryComposite() {
-		IMetadataRepositoryManager manager = getManager();
-		if (manager == null)
+	public static CompositeMetadataRepository createMemoryComposite(IProvisioningAgent agent) {
+		if (agent == null)
+			return null;
+		IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		if (repoManager == null)
 			return null;
 		try {
 			//create a unique opaque URI 
 			long time = System.currentTimeMillis();
 			URI repositoryURI = new URI("memory:" + String.valueOf(time)); //$NON-NLS-1$
-			while (manager.contains(repositoryURI))
+			while (repoManager.contains(repositoryURI))
 				repositoryURI = new URI("memory:" + String.valueOf(++time)); //$NON-NLS-1$
 
-			CompositeMetadataRepository result = (CompositeMetadataRepository) manager.createRepository(repositoryURI, repositoryURI.toString(), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
-			manager.removeRepository(repositoryURI);
+			CompositeMetadataRepository result = (CompositeMetadataRepository) repoManager.createRepository(repositoryURI, repositoryURI.toString(), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
+			repoManager.removeRepository(repositoryURI);
 			return result;
 		} catch (ProvisionException e) {
 			// just return null
@@ -74,20 +77,21 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 		return null;
 	}
 
-	static private IMetadataRepositoryManager getManager() {
-		return (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+	private IMetadataRepositoryManager getManager() {
+		return manager;
 	}
 
 	private boolean isLocal() {
-		return "file".equalsIgnoreCase(location.getScheme()); //$NON-NLS-1$
+		return "file".equalsIgnoreCase(getLocation().getScheme()); //$NON-NLS-1$
 	}
 
 	public boolean isModifiable() {
 		return isLocal();
 	}
 
-	public CompositeMetadataRepository(URI location, String name, Map properties) {
-		super(name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
+	CompositeMetadataRepository(IMetadataRepositoryManager manager, URI location, String name, Map<String, String> properties) {
+		super(manager.getAgent(), name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
+		this.manager = manager;
 		//when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
 		save();
 	}
@@ -95,8 +99,9 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 	/*
 	 * This is only called by the parser when loading a repository.
 	 */
-	public CompositeMetadataRepository(CompositeRepositoryState state) {
-		super(state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
+	CompositeMetadataRepository(IMetadataRepositoryManager manager, CompositeRepositoryState state) {
+		super(manager.getAgent(), state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
+		this.manager = manager;
 		for (int i = 0; i < state.getChildren().length; i++)
 			addChild(state.getChildren()[i], false);
 	}
@@ -115,26 +120,28 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 		result.setProvider(getProvider());
 		result.setProperties(getProperties());
 		// it is important to directly access the field so we have the relative URIs
-		result.setChildren((URI[]) childrenURIs.toArray(new URI[childrenURIs.size()]));
+		result.setChildren(childrenURIs.toArray(new URI[childrenURIs.size()]));
 		return result;
 	}
 
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
 		try {
 			// Query all the all the repositories this composite repo contains
-			CompoundQueryable queryable = new CompoundQueryable((IQueryable[]) loadedRepos.toArray(new IQueryable[loadedRepos.size()]));
-			collector = queryable.query(query, collector, monitor);
+			IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
+			return queryable.query(query, monitor);
 		} finally {
 			if (monitor != null)
 				monitor.done();
 		}
-		return collector;
 	}
 
 	private void addChild(URI childURI, boolean save) {
-		URI absolute = URIUtil.makeAbsolute(childURI, location);
+		URI absolute = URIUtil.makeAbsolute(childURI, getLocation());
 		if (childrenURIs.contains(childURI) || childrenURIs.contains(absolute))
 			return;
 		// always add the URI to the list of child URIs (even if we can't load it later)
@@ -158,28 +165,33 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.ICompositeRepository#addChild(java.net.URI)
+	 */
 	public void addChild(URI childURI) {
 		addChild(childURI, true);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeChild(java.net.URI)
+	 */
 	public void removeChild(URI childURI) {
 		boolean removed = childrenURIs.remove(childURI);
 		// if the child wasn't there make sure and try the other permutation
 		// (absolute/relative) to see if it really is in the list.
-		URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, location) : URIUtil.makeAbsolute(childURI, location);
+		URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, getLocation()) : URIUtil.makeAbsolute(childURI, getLocation());
 		if (!removed)
 			removed = childrenURIs.remove(other);
 
 		if (removed) {
 			// we removed the child from the list so remove the associated repo object as well
 			IMetadataRepository found = null;
-			for (Iterator iter = loadedRepos.iterator(); found == null && iter.hasNext();) {
-				IMetadataRepository current = (IMetadataRepository) iter.next();
+			for (IMetadataRepository current : loadedRepos) {
 				URI repoLocation = current.getLocation();
-				if (URIUtil.sameURI(childURI, repoLocation))
-					found = current;
-				else if (URIUtil.sameURI(other, repoLocation))
+				if (URIUtil.sameURI(childURI, repoLocation) || URIUtil.sameURI(other, repoLocation)) {
 					found = current;
+					break;
+				}
 			}
 			if (found != null)
 				loadedRepos.remove(found);
@@ -187,22 +199,37 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeAllChildren()
+	 */
 	public void removeAllChildren() {
 		childrenURIs.clear();
 		loadedRepos.clear();
 		save();
 	}
 
-	public synchronized void addInstallableUnits(IInstallableUnit[] installableUnits) {
-		throw new UnsupportedOperationException("Cannot add IUs to a composite repository");
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
+	 */
+	@Override
+	public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
+		throw new UnsupportedOperationException("Cannot add IUs to a composite repository"); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
+	 */
+	@Override
 	public synchronized void removeAll() {
-		throw new UnsupportedOperationException("Cannot remove IUs to a composite repository");
+		throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
 	}
 
-	public synchronized boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
-		throw new UnsupportedOperationException("Cannot remove IUs to a composite repository");
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
+	 */
+	@Override
+	public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
+		throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
 	}
 
 	private static File getActualLocation(URI location, String extension) {
@@ -224,17 +251,30 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 		return getActualLocation(location, XML_EXTENSION);
 	}
 
-	public synchronized void addReference(URI repositoryLocation, int repositoryType, int options) {
-		throw new UnsupportedOperationException("Cannot add References to a composite repository");
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
+	 */
+	public synchronized void addReferences(Collection<? extends IRepositoryReference> references) {
+		throw new UnsupportedOperationException("Cannot add References to a composite repository"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
+	 */
+	public Collection<IRepositoryReference> getReferences() {
+		HashSet<IRepositoryReference> allRefs = new HashSet<IRepositoryReference>();
+		for (IMetadataRepository child : loadedRepos)
+			allRefs.addAll(child.getReferences());
+		return allRefs;
 	}
 
 	// caller should be synchronized
 	private void save() {
 		if (!isModifiable())
 			return;
-		File file = getActualLocation(location);
-		File jarFile = getActualLocation(location, JAR_EXTENSION);
-		boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
+		File file = getActualLocation(getLocation());
+		File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
+		boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
 		try {
 			OutputStream output = null;
 			if (!compress) {
@@ -264,14 +304,17 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 			super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
 			new CompositeRepositoryIO().write(toState(), output, PI_REPOSITORY_TYPE);
 		} catch (IOException e) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, location), e));
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, getLocation()), e));
 		}
 	}
 
-	public List getChildren() {
-		List result = new ArrayList();
-		for (Iterator iter = childrenURIs.iterator(); iter.hasNext();)
-			result.add(URIUtil.makeAbsolute((URI) iter.next(), location));
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.ICompositeRepository#getChildren()
+	 */
+	public List<URI> getChildren() {
+		List<URI> result = new ArrayList<URI>();
+		for (URI childURI : childrenURIs)
+			result.add(URIUtil.makeAbsolute(childURI, getLocation()));
 		return result;
 	}
 
@@ -283,12 +326,49 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
 
 	//TODO this should never be called. What do we do?
 	public void initialize(RepositoryState state) {
-		this.name = state.Name;
-		this.type = state.Type;
-		this.version = state.Version.toString();
-		this.provider = state.Provider;
-		this.description = state.Description;
-		this.location = state.Location;
-		this.properties = state.Properties;
+		setName(state.Name);
+		setType(state.Type);
+		setVersion(state.Version.toString());
+		setProvider(state.Provider);
+		setDescription(state.Description);
+		setLocation(state.Location);
+		setProperties(state.Properties);
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
+	 */
+	@SuppressWarnings("unchecked")
+	public IIndex<IInstallableUnit> getIndex(String memberName) {
+		IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
+		if (queryable instanceof IIndexProvider<?>) {
+			return ((IIndexProvider<IInstallableUnit>) queryable).getIndex(memberName);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
+	 */
+	@SuppressWarnings("unchecked")
+	public Iterator<IInstallableUnit> everything() {
+		IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
+		if (queryable instanceof IIndexProvider<?>) {
+			return ((IIndexProvider<IInstallableUnit>) queryable).everything();
+		}
+		return Collections.EMPTY_LIST.iterator();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getManagedProperty(java.lang.Object, java.lang.String, java.lang.Object)
+	 */
+	@SuppressWarnings("unchecked")
+	public Object getManagedProperty(Object client, String memberName, Object key) {
+		IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
+		if (queryable instanceof IIndexProvider<?>) {
+			return ((IIndexProvider<IInstallableUnit>) queryable).getManagedProperty(client, memberName, key);
+		}
+		return null;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
index c2560bb..0c5d3c3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
@@ -7,9 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
+import org.eclipse.equinox.internal.p2.repository.CacheManager;
+
 import java.io.*;
 import java.net.URI;
 import java.util.Map;
@@ -19,10 +22,11 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
 import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
 import org.eclipse.osgi.util.NLS;
 
 public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactory {
@@ -32,8 +36,14 @@ public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactor
 	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
 	public static final String CONTENT_FILENAME = "compositeContent"; //$NON-NLS-1$
 
-	public IMetadataRepository create(URI location, String name, String type, Map properties) {
-		return new CompositeMetadataRepository(location, name, properties);
+	public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
+		return new CompositeMetadataRepository(getManager(), location, name, properties);
+	}
+
+	private IMetadataRepositoryManager getManager() {
+		if (getAgent() != null)
+			return (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+		return null;
 	}
 
 	/**
@@ -58,7 +68,10 @@ public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactor
 			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
 		}
 		//file is not local, create a cache of the repository metadata
-		localFile = Activator.getCacheManager().createCache(location, CONTENT_FILENAME, monitor);
+		CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
+		if (cache == null)
+			throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
+		localFile = cache.createCache(location, CONTENT_FILENAME, monitor);
 		if (localFile == null) {
 			//there is no remote file in either form
 			String msg = NLS.bind(Messages.io_failedRead, location);
@@ -67,27 +80,10 @@ public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactor
 		return localFile;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public IStatus validate(URI location, IProgressMonitor monitor) {
-		try {
-			validateAndLoad(location, false, 0, monitor);
-		} catch (ProvisionException e) {
-			return e.getStatus();
-		}
-		return Status.OK_STATUS;
-	}
-
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
-		return validateAndLoad(location, true, flags, monitor);
-	}
-
-	protected IMetadataRepository validateAndLoad(URI location, boolean doLoad, int flags, IProgressMonitor monitor) throws ProvisionException {
 		long time = 0;
 		final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
 		if (Tracing.DEBUG_METADATA_PARSING) {
@@ -118,19 +114,17 @@ public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactor
 				}
 				//parse the repository descriptor file
 				sub.setWorkRemaining(100);
-				if (doLoad) {
-					InputStream descriptorStream = jarStream != null ? jarStream : inStream;
-					CompositeRepositoryIO io = new CompositeRepositoryIO();
-					CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeMetadataRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
-					if (resultState.getLocation() == null)
-						resultState.setLocation(location);
-					CompositeMetadataRepository result = new CompositeMetadataRepository(resultState);
-					if (Tracing.DEBUG_METADATA_PARSING) {
-						time += System.currentTimeMillis();
-						Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
-					}
-					return result;
+				InputStream descriptorStream = jarStream != null ? jarStream : inStream;
+				CompositeRepositoryIO io = new CompositeRepositoryIO();
+				CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeMetadataRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
+				if (resultState.getLocation() == null)
+					resultState.setLocation(location);
+				CompositeMetadataRepository result = new CompositeMetadataRepository(getManager(), resultState);
+				if (Tracing.DEBUG_METADATA_PARSING) {
+					time += System.currentTimeMillis();
+					Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
 				}
+				return result;
 			} finally {
 				safeClose(jarStream);
 				safeClose(inStream);
@@ -145,7 +139,6 @@ public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactor
 			if (monitor != null)
 				monitor.done();
 		}
-		return null;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
index 6f9e61d..6f848b1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,32 +11,36 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
 import java.io.*;
 import java.net.URI;
 import java.util.*;
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.index.*;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
 
 /**
  * A metadata repository that resides in the local file system.  If the repository
  * location is a directory, this implementation will traverse the directory structure
  * and combine any metadata repository files that are found.
  */
-public class LocalMetadataRepository extends AbstractMetadataRepository {
+public class LocalMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
 
 	static final private String CONTENT_FILENAME = "content"; //$NON-NLS-1$
 	static final private String REPOSITORY_TYPE = LocalMetadataRepository.class.getName();
@@ -44,8 +48,13 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 	static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
 	static final private String XML_EXTENSION = ".xml"; //$NON-NLS-1$
 
-	protected HashSet units = new LinkedHashSet();
-	protected HashSet repositories = new HashSet();
+	protected IUMap units = new IUMap();
+	protected HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
+	private IIndex<IInstallableUnit> idIndex;
+	private IIndex<IInstallableUnit> capabilityIndex;
+	private TranslationSupport translationSupport;
+	private boolean snapshotNeeded = false;
+	private boolean disableSave = false;
 
 	private static File getActualLocation(URI location, String extension) {
 		File spec = URIUtil.toFile(location);
@@ -69,8 +78,8 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 	/**
 	 * This no argument constructor is called when restoring an existing repository.
 	 */
-	public LocalMetadataRepository() {
-		super();
+	public LocalMetadataRepository(IProvisioningAgent agent) {
+		super(agent);
 	}
 
 	/**
@@ -78,36 +87,94 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 	 * @param location The location of the repository
 	 * @param name The name of the repository
 	 */
-	public LocalMetadataRepository(URI location, String name, Map properties) {
-		super(name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
+	public LocalMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
+		super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
 		if (!location.getScheme().equals("file")) //$NON-NLS-1$
 			throw new IllegalArgumentException("Invalid local repository location: " + location); //$NON-NLS-1$
 		//when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
 		save();
 	}
 
-	public synchronized void addInstallableUnits(IInstallableUnit[] installableUnits) {
-		if (installableUnits == null || installableUnits.length == 0)
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
+	 */
+	@Override
+	public synchronized void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
+		if (installableUnits == null || installableUnits.isEmpty())
 			return;
-		units.addAll(Arrays.asList(installableUnits));
+		if (snapshotNeeded) {
+			units = units.clone();
+			idIndex = null; // Backed by units
+			snapshotNeeded = false;
+		}
+		units.addAll(installableUnits);
+		capabilityIndex = null; // Generated, not backed by units
 		save();
 	}
 
-	public synchronized void addReference(URI repositoryLocation, String nickname, int repositoryType, int options) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
+	 */
+	@Override
+	public void addReferences(Collection<? extends IRepositoryReference> references) {
 		assertModifiable();
-		repositories.add(new RepositoryReference(repositoryLocation, nickname, repositoryType, options));
+		repositories.addAll(references);
+		save();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
+	 */
+	public Collection<IRepositoryReference> getReferences() {
+		return Collections.unmodifiableCollection(repositories);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
+	 */
+	public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
+		if (InstallableUnit.MEMBER_ID.equals(memberName)) {
+			snapshotNeeded = true;
+			if (idIndex == null)
+				idIndex = new IdIndex(units);
+			return idIndex;
+		}
+
+		if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
+			snapshotNeeded = true;
+			if (capabilityIndex == null)
+				capabilityIndex = new CapabilityIndex(units.iterator());
+			return capabilityIndex;
+		}
+		return null;
+	}
+
+	public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
+		if (!(client instanceof IInstallableUnit))
+			return null;
+		IInstallableUnit iu = (IInstallableUnit) client;
+		if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
+			if (translationSupport == null)
+				translationSupport = new TranslationSupport(this);
+			return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#initialize(org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState)
+	 */
+	@Override
 	public void initialize(RepositoryState state) {
 		synchronized (this) {
-			this.name = state.Name;
-			this.type = state.Type;
-			this.version = state.Version.toString();
-			this.provider = state.Provider;
-			this.description = state.Description;
-			this.location = state.Location;
-			this.properties = state.Properties;
-			this.units.addAll(Arrays.asList(state.Units));
+			setName(state.Name);
+			setType(state.Type);
+			setVersion(state.Version.toString());
+			setProvider(state.Provider);
+			setDescription(state.Description);
+			setLocation(state.Location);
+			setProperties(state.Properties);
+			this.units.addAll(state.Units);
 			this.repositories.addAll(Arrays.asList(state.Repositories));
 		}
 		publishRepositoryReferences();
@@ -117,48 +184,81 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 	 * Broadcast discovery events for all repositories referenced by this repository.
 	 */
 	public void publishRepositoryReferences() {
-		IProvisioningEventBus bus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
+		IProvisioningEventBus bus = (IProvisioningEventBus) getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
 		if (bus == null)
 			return;
 
-		List repositoriesSnapshot = createRepositoriesSnapshot();
-		for (Iterator it = repositoriesSnapshot.iterator(); it.hasNext();) {
-			RepositoryReference reference = (RepositoryReference) it.next();
-			boolean isEnabled = (reference.Options & IRepository.ENABLED) != 0;
-			bus.publishEvent(new RepositoryEvent(reference.Location, reference.Type, RepositoryEvent.DISCOVERED, isEnabled));
+		List<IRepositoryReference> repositoriesSnapshot = createRepositoriesSnapshot();
+		for (IRepositoryReference reference : repositoriesSnapshot) {
+			boolean isEnabled = (reference.getOptions() & IRepository.ENABLED) != 0;
+			bus.publishEvent(new RepositoryEvent(reference.getLocation(), reference.getType(), RepositoryEvent.DISCOVERED, isEnabled));
 		}
 	}
 
-	private synchronized List createRepositoriesSnapshot() {
+	private synchronized List<IRepositoryReference> createRepositoriesSnapshot() {
 		if (repositories.isEmpty())
-			return Collections.EMPTY_LIST;
-		return new ArrayList(repositories);
+			return CollectionUtils.emptyList();
+		return new ArrayList<IRepositoryReference>(repositories);
 	}
 
 	// use this method to setup any transient fields etc after the object has been restored from a stream
 	public synchronized void initializeAfterLoad(URI aLocation) {
-		this.location = aLocation;
+		setLocation(aLocation);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#isModifiable()
+	 */
+	@Override
 	public boolean isModifiable() {
 		return true;
 	}
 
-	public synchronized Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		return query.perform(units.iterator(), collector);
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		return IndexProvider.query(this, query, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
+	 */
+	public synchronized Iterator<IInstallableUnit> everything() {
+		snapshotNeeded = true;
+		return units.iterator();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
+	 */
+	@Override
 	public synchronized void removeAll() {
-		units.clear();
+		if (snapshotNeeded) {
+			units = new IUMap();
+			idIndex = null; // Backed by units
+			snapshotNeeded = false;
+		} else
+			units.clear();
+		capabilityIndex = null; // Generated, not backed by units.
 		save();
 	}
 
-	public synchronized boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
+	 */
+	@Override
+	public synchronized boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
 		boolean changed = false;
-		Collector results = query.perform(units.iterator(), new Collector());
-		if (results.size() > 0) {
+		if (installableUnits != null && !installableUnits.isEmpty()) {
 			changed = true;
-			units.removeAll(results.toCollection());
+			if (snapshotNeeded) {
+				units = units.clone();
+				idIndex = null; // Backed by units
+				snapshotNeeded = false;
+			}
+			units.removeAll(installableUnits);
+			capabilityIndex = null; // Generated, not backed by units.
 		}
 		if (changed)
 			save();
@@ -166,10 +266,17 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 	}
 
 	// caller should be synchronized
-	private void save() {
-		File file = getActualLocation(location);
-		File jarFile = getActualLocation(location, JAR_EXTENSION);
-		boolean compress = "true".equalsIgnoreCase((String) properties.get(PROP_COMPRESSED)); //$NON-NLS-1$
+	/**
+	 * Marking protected so we can test.  This is internal, so it shouldn't matter, but I'll
+	 * mark it as no override just to be clear.
+	 * @nooverride This method is not intended to be re-implemented or extended by clients.
+	 */
+	protected void save() {
+		if (disableSave)
+			return;
+		File file = getActualLocation(getLocation());
+		File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
+		boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
 		try {
 			OutputStream output = null;
 			if (!compress) {
@@ -197,12 +304,16 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 				output = jOutput;
 			}
 			super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
-			new MetadataRepositoryIO().write(this, output);
+			new MetadataRepositoryIO(getProvisioningAgent()).write(this, output);
 		} catch (IOException e) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + location, e)); //$NON-NLS-1$
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
+	 */
+	@Override
 	public String setProperty(String key, String newValue) {
 		String oldValue = null;
 		synchronized (this) {
@@ -212,9 +323,37 @@ public class LocalMetadataRepository extends AbstractMetadataRepository {
 			save();
 		}
 		//force repository manager to reload this repository because it caches properties
-		MetadataRepositoryManager manager = (MetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager.removeRepository(getLocation()))
 			manager.addRepository(this);
 		return oldValue;
 	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		IStatus result = null;
+		synchronized (this) {
+			try {
+				disableSave = true;
+				runnable.run(monitor);
+			} catch (OperationCanceledException oce) {
+				return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+			} catch (Throwable e) {
+				result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+			} finally {
+				disableSave = false;
+				try {
+					save();
+				} catch (Exception e) {
+					if (result != null)
+						result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
+					else
+						result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+				}
+			}
+		}
+		if (result == null)
+			result = Status.OK_STATUS;
+		return result;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
index 56712b7..c764e06 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
@@ -1,10 +1,11 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors: IBM Corporation - initial API and implementation
+ * Sonatype Inc - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
@@ -22,20 +23,16 @@ public class Messages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String CacheManager_AuthenticationFaileFor_0;
-	public static String CacheManager_FailedCommunicationWithRepo_0;
-	public static String CacheManager_Neither_0_nor_1_found;
 	public static String io_failedRead;
 	public static String io_failedWrite;
 
 	public static String io_IncompatibleVersion;
 	public static String io_parseError;
 
+	public static String no_provisioning_agent;
+
 	public static String repo_loading;
 
 	public static String repoMan_internalError;
-	public static String repoMan_notExists;
 	public static String repoMan_invalidLocation;
-	public static String repoMan_relativeLocation;
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java
new file mode 100644
index 0000000..7cb5c05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.repository;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+
+/**
+ * Service factory for creating {@link IMetadataRepositoryManager} instances.
+ */
+public class MetadataRepositoryComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		return new MetadataRepositoryManager(agent);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
index b123f4d..afd6a7c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
@@ -11,7 +11,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+
 import java.io.*;
+import java.lang.reflect.Constructor;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Iterator;
@@ -23,14 +29,12 @@ import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
 import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser;
 import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataWriter;
 import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository.RepositoryState;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 import org.xml.sax.*;
@@ -40,6 +44,12 @@ import org.xml.sax.*;
  */
 public class MetadataRepositoryIO {
 
+	protected final IProvisioningAgent agent;
+
+	public MetadataRepositoryIO(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
 	/**
 	 * Reads metadata from the given stream, and returns the contained array
 	 * of abstract metadata repositories.
@@ -95,9 +105,9 @@ public class MetadataRepositoryIO {
 		// Constants defining the structure of the XML for a MetadataRepository
 
 		// A format version number for metadata repository XML.
-		public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
-		public static final Version CURRENT_VERSION = new Version(1, 1, 0);
-		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
+		public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
+		public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
+		public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
 
 		// Constants for processing Instructions
 		public static final String PI_REPOSITORY_TARGET = "metadataRepository"; //$NON-NLS-1$
@@ -107,7 +117,7 @@ public class MetadataRepositoryIO {
 
 	}
 
-	protected XMLWriter.ProcessingInstruction[] createPI(Class repositoryClass) {
+	protected XMLWriter.ProcessingInstruction[] createPI(Class<?> repositoryClass) {
 		//TODO We should remove this processing instruction, but currently old clients rely on this. See bug 210450.
 		return new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(XMLConstants.PI_REPOSITORY_TARGET, XMLConstants.CURRENT_VERSION)};
 	}
@@ -115,7 +125,7 @@ public class MetadataRepositoryIO {
 	// XML writer for a IMetadataRepository
 	protected class Writer extends MetadataWriter implements XMLConstants {
 
-		public Writer(OutputStream output, Class repositoryClass) throws IOException {
+		public Writer(OutputStream output, Class<? extends IMetadataRepository> repositoryClass) throws IOException {
 			super(output, createPI(repositoryClass));
 		}
 
@@ -131,11 +141,12 @@ public class MetadataRepositoryIO {
 			attributeOptional(DESCRIPTION_ATTRIBUTE, repository.getDescription()); // TODO: could be cdata?
 
 			writeProperties(repository.getProperties());
-			Collector units = repository.query(InstallableUnitQuery.ANY, new Collector(), null);
 			if (repository instanceof LocalMetadataRepository) {
-				Set references = ((LocalMetadataRepository) repository).repositories;
+				Set<IRepositoryReference> references = ((LocalMetadataRepository) repository).repositories;
 				writeRepositoryReferences(references.iterator(), references.size());
 			}
+			// The size attribute is a problematic since it forces the use of a collection.
+			Set<IInstallableUnit> units = repository.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet();
 			writeInstallableUnits(units.iterator(), units.size());
 
 			end(REPOSITORY_ELEMENT);
@@ -143,34 +154,34 @@ public class MetadataRepositoryIO {
 		}
 
 		/**
-		 * Writes a list of {@link RepositoryReference}.
-		 * @param references An Iterator of {@link RepositoryReference}.
+		 * Writes a list of {@link IRepositoryReference}.
+		 * @param references An Iterator of {@link IRepositoryReference}.
 		 * @param size The number of references  to write
 		 */
-		protected void writeRepositoryReferences(Iterator references, int size) {
+		protected void writeRepositoryReferences(Iterator<IRepositoryReference> references, int size) {
 			if (size == 0)
 				return;
 			start(REPOSITORY_REFERENCES_ELEMENT);
 			attribute(COLLECTION_SIZE_ATTRIBUTE, size);
 			while (references.hasNext())
-				writeRepositoryReference((RepositoryReference) references.next());
+				writeRepositoryReference(references.next());
 			end(REPOSITORY_REFERENCES_ELEMENT);
 		}
 
-		private void writeRepositoryReference(RepositoryReference reference) {
+		private void writeRepositoryReference(IRepositoryReference reference) {
 			start(REPOSITORY_REFERENCE_ELEMENT);
-			attribute(URI_ATTRIBUTE, reference.Location.toString());
+			attribute(URI_ATTRIBUTE, reference.getLocation().toString());
 
 			try {
 				// we write the URL attribute for backwards compatibility with 3.4.x
 				// this attribute should be removed if we make a breaking format change.
-				attribute(URL_ATTRIBUTE, URIUtil.toURL(reference.Location).toExternalForm());
+				attribute(URL_ATTRIBUTE, URIUtil.toURL(reference.getLocation()).toExternalForm());
 			} catch (MalformedURLException e) {
-				attribute(URL_ATTRIBUTE, reference.Location.toString());
+				attribute(URL_ATTRIBUTE, reference.getLocation().toString());
 			}
 
-			attribute(TYPE_ATTRIBUTE, Integer.toString(reference.Type));
-			attribute(OPTIONS_ATTRIBUTE, Integer.toString(reference.Options));
+			attribute(TYPE_ATTRIBUTE, Integer.toString(reference.getType()));
+			attribute(OPTIONS_ATTRIBUTE, Integer.toString(reference.getOptions()));
 			end(REPOSITORY_REFERENCE_ELEMENT);
 		}
 	}
@@ -300,27 +311,23 @@ public class MetadataRepositoryIO {
 							: propertiesHandler.getProperties());
 					state.Units = (unitsHandler == null ? new IInstallableUnit[0] //
 							: unitsHandler.getUnits());
-					state.Repositories = repositoryReferencesHandler == null ? new RepositoryReference[0] : repositoryReferencesHandler.getReferences();
+					state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences();
+					Object repositoryObject = null;
+					//can't create repository if missing type - this is already logged when parsing attributes
+					if (state.Type == null)
+						return;
 					try {
-						//can't create repository if missing type - this is already logged when parsing attributes
-						if (state.Type == null)
-							return;
-						Class clazz = Class.forName(state.Type);
-						Object repositoryObject = clazz.newInstance();
-						if (repositoryObject instanceof AbstractMetadataRepository) {
-							repository = (AbstractMetadataRepository) repositoryObject;
-							repository.initialize(state);
-						}
-					} catch (InstantiationException e) {
-						// TODO: Throw a SAXException
-						e.printStackTrace();
-					} catch (IllegalAccessException e) {
-						// TODO: Throw a SAXException
-						e.printStackTrace();
-					} catch (ClassNotFoundException e) {
+						Class<?> clazz = Class.forName(state.Type);
+						Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class);
+						repositoryObject = ctor.newInstance(agent);
+					} catch (Exception e) {
 						// TODO: Throw a SAXException
 						e.printStackTrace();
 					}
+					if (repositoryObject instanceof AbstractMetadataRepository) {
+						repository = (AbstractMetadataRepository) repositoryObject;
+						repository.initialize(state);
+					}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
index 1c41377..e1afa91 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,45 +12,48 @@
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
 import java.net.URI;
-import java.util.*;
+import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.equinox.internal.p2.repository.helpers.LocationProperties;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
 
 /**
  * Default implementation of {@link IMetadataRepositoryManager}.
  */
-public class MetadataRepositoryManager extends AbstractRepositoryManager implements IMetadataRepositoryManager {
+public class MetadataRepositoryManager extends AbstractRepositoryManager<IInstallableUnit> implements IMetadataRepositoryManager {
 
-	public MetadataRepositoryManager() {
-		super();
+	public MetadataRepositoryManager(IProvisioningAgent agent) {
+		super(agent);
 	}
 
 	public void addRepository(IMetadataRepository repository) {
 		super.addRepository(repository, true, null);
 	}
 
-	public IMetadataRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException {
+	public IMetadataRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		return (IMetadataRepository) doCreateRepository(location, name, type, properties);
 	}
 
-	protected IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException {
+	protected IRepository<IInstallableUnit> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException {
 		MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
 		if (factory == null)
 			return null;
+		factory.setAgent(agent);
 		return factory.create(location, name, type, properties);
 	}
 
-	protected IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
+	protected IRepository<IInstallableUnit> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
 		MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
 		if (factory == null)
 			return null;
+		factory.setAgent(agent);
 		return factory.load(location, flags, monitor.newChild(10));
 	}
 
@@ -70,6 +73,10 @@ public class MetadataRepositoryManager extends AbstractRepositoryManager impleme
 		return Activator.REPO_PROVIDER_XPT;
 	}
 
+	protected String[] getPreferredRepositorySearchOrder(LocationProperties properties) {
+		return properties.getMetadataFactorySearchOrder();
+	}
+
 	/**
 	 * Restores metadata repositories specified as system properties.
 	 */
@@ -81,9 +88,6 @@ public class MetadataRepositoryManager extends AbstractRepositoryManager impleme
 		return IRepository.TYPE_METADATA;
 	}
 
-	/**
-	 * @deprecated see {@link #loadRepository(URI, int, IProgressMonitor)}
-	 */
 	public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
 		return loadRepository(location, 0, monitor);
 	}
@@ -92,80 +96,8 @@ public class MetadataRepositoryManager extends AbstractRepositoryManager impleme
 		return (IMetadataRepository) loadRepository(location, monitor, null, flags);
 	}
 
-	/**
-	 * Performs a query against all of the installable units of each known 
-	 * repository, accumulating any objects that satisfy the query in the 
-	 * provided collector.
-	 * <p>
-	 * Note that using this method can be quite expensive, as every known
-	 * metadata repository will be loaded in order to query each one.  If a
-	 * client wishes to query only certain repositories, it is better to use
-	 * {@link #getKnownRepositories(int)} to filter the list of repositories
-	 * loaded and then query each of the returned repositories.
-	 * <p>
-	 * This method is long-running; progress and cancellation are provided
-	 * by the given progress monitor. 
-	 * 
-	 * @param query The query to perform against each installable unit in each known repository
-	 * @param collector Collects the results of the query
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The collector argument
-	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		URI[] locations = getKnownRepositories(REPOSITORIES_ALL);
-		List queryables = new ArrayList(locations.length); // use a list since we don't know exactly how many will load
-		SubMonitor sub = SubMonitor.convert(monitor, locations.length * 10);
-		for (int i = 0; i < locations.length; i++) {
-			try {
-				if (sub.isCanceled())
-					throw new OperationCanceledException();
-				queryables.add(loadRepository(locations[i], sub.newChild(9)));
-			} catch (ProvisionException e) {
-				//ignore this repository for this query
-			}
-		}
-		try {
-			IQueryable[] queryablesArray = (IQueryable[]) queryables.toArray(new IQueryable[queryables.size()]);
-			CompoundQueryable compoundQueryable = new CompoundQueryable(queryablesArray);
-			compoundQueryable.query(query, collector, sub.newChild(locations.length * 1));
-		} finally {
-			sub.done();
-		}
-		return collector;
-	}
-
 	public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
 		return (IMetadataRepository) basicRefreshRepository(location, monitor);
 	}
 
-	public IStatus validateRepositoryLocation(URI location, IProgressMonitor monitor) {
-		if (!location.isAbsolute())
-			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.repoMan_relativeLocation, location.toString()), null);
-		IMetadataRepository result = getRepository(location);
-		if (result != null)
-			return Status.OK_STATUS;
-		String[] suffixes = getAllSuffixes();
-		SubMonitor sub = SubMonitor.convert(monitor, Messages.repo_loading, suffixes.length * 100);
-		IStatus status = new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.repoMan_notExists, location.toString()), null);
-		for (int i = 0; i < suffixes.length; i++) {
-			SubMonitor loopMonitor = sub.newChild(100);
-			IExtension[] providers = findMatchingRepositoryExtensions(suffixes[i], null);
-			// Loop over the candidates and return the first one that successfully loads
-			loopMonitor.beginTask("", providers.length * 10); //$NON-NLS-1$
-			for (int j = 0; j < providers.length; j++) {
-				MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(providers[j], EL_FACTORY);
-				if (factory != null) {
-					status = factory.validate(location, loopMonitor.newChild(10));
-					if (status.isOK()) {
-						sub.done();
-						return status;
-					}
-				}
-			}
-
-		}
-		sub.done();
-		return status;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
new file mode 100644
index 0000000..4f98f6e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.repository;
+
+import org.eclipse.equinox.internal.p2.repository.CacheManager;
+
+import java.io.*;
+import java.net.URI;
+import java.util.Map;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
+import org.eclipse.osgi.util.NLS;
+
+public class SimpleMetadataRepositoryFactory extends MetadataRepositoryFactory {
+
+	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
+	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
+	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
+
+	public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
+		if (location.getScheme().equals("file")) //$NON-NLS-1$
+			return new LocalMetadataRepository(getAgent(), location, name, properties);
+		return new URLMetadataRepository(getAgent(), location, name, properties);
+	}
+
+	/**
+	 * Returns a file in the local file system that contains the contents of the
+	 * metadata repository at the given location.
+	 */
+	private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
+		File localFile = null;
+		URI jarLocation = URLMetadataRepository.getActualLocation(location, JAR_EXTENSION);
+		URI xmlLocation = URLMetadataRepository.getActualLocation(location, XML_EXTENSION);
+		// If the repository is local, we can return the repository file directly
+		if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
+			//look for a compressed local file
+			localFile = URIUtil.toFile(jarLocation);
+			if (localFile.exists())
+				return localFile;
+			//look for an uncompressed local file
+			localFile = URIUtil.toFile(xmlLocation);
+			if (localFile.exists())
+				return localFile;
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
+		}
+		// file is not local, create a cache of the repository metadata
+		CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
+		if (cache == null)
+			throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
+		localFile = cache.createCache(location, URLMetadataRepository.CONTENT_FILENAME, monitor);
+		if (localFile == null) {
+			// there is no remote file in either form - this should not really happen as
+			// createCache should bail out with exception if something is wrong. This is an internal
+			// error.
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.repoMan_internalError, null));
+		}
+		return localFile;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
+		long time = 0;
+		final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
+		if (Tracing.DEBUG_METADATA_PARSING) {
+			Tracing.debug(debugMsg + location);
+			time = -System.currentTimeMillis();
+		}
+		SubMonitor sub = SubMonitor.convert(monitor, 400);
+		try {
+			File localFile = getLocalFile(location, sub.newChild(300));
+			InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
+			JarInputStream jarStream = null;
+			try {
+				//if reading from a jar, obtain a stream on the entry with the actual contents
+				if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
+					jarStream = new JarInputStream(inStream);
+					JarEntry jarEntry = jarStream.getNextJarEntry();
+					String entryName = URLMetadataRepository.CONTENT_FILENAME + URLMetadataRepository.XML_EXTENSION;
+					while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
+						jarEntry = jarStream.getNextJarEntry();
+					}
+					//if there is a jar but the entry is missing or invalid, treat this as an invalid repository
+					if (jarEntry == null)
+						throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
+				}
+				//parse the repository descriptor file
+				sub.setWorkRemaining(100);
+				InputStream descriptorStream = jarStream != null ? jarStream : inStream;
+				IMetadataRepository result = new MetadataRepositoryIO(getAgent()).read(localFile.toURL(), descriptorStream, sub.newChild(100));
+				if (result != null && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0 && !result.isModifiable())
+					return null;
+				if (result instanceof LocalMetadataRepository)
+					((LocalMetadataRepository) result).initializeAfterLoad(location);
+				if (result instanceof URLMetadataRepository)
+					((URLMetadataRepository) result).initializeAfterLoad(location);
+				if (Tracing.DEBUG_METADATA_PARSING) {
+					time += System.currentTimeMillis();
+					Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
+				}
+				return result;
+			} finally {
+				safeClose(jarStream);
+				safeClose(inStream);
+			}
+		} catch (FileNotFoundException e) {
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
+		} catch (IOException e) {
+			String msg = NLS.bind(Messages.io_failedRead, location);
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
+		} finally {
+			if (monitor != null)
+				monitor.done();
+		}
+	}
+
+	/**
+	 * Closes a stream, ignoring any secondary exceptions
+	 */
+	private void safeClose(InputStream stream) {
+		if (stream == null)
+			return;
+		try {
+			stream.close();
+		} catch (IOException e) {
+			//ignore
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
index 8e3a402..c07bf3b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
+ *     Cloudsmith Inc. - query indexes
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository;
 
@@ -15,22 +16,35 @@ import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.index.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
 
 /**
  * A metadata repository backed by an arbitrary URL.
  */
-public class URLMetadataRepository extends AbstractMetadataRepository {
+public class URLMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
 
 	public static final String CONTENT_FILENAME = "content"; //$NON-NLS-1$
+	protected Collection<IRepositoryReference> references;
 	public static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
 	private static final String REPOSITORY_TYPE = URLMetadataRepository.class.getName();
 	private static final Integer REPOSITORY_VERSION = new Integer(1);
 
 	transient protected URI content;
-	protected HashSet units = new LinkedHashSet();
+	protected IUMap units = new IUMap();
+	private IIndex<IInstallableUnit> idIndex;
+	private IIndex<IInstallableUnit> capabilityIndex;
+	private TranslationSupport translationSupport;
 
 	public static URI getActualLocation(URI base) {
 		return getActualLocation(base, XML_EXTENSION);
@@ -42,12 +56,12 @@ public class URLMetadataRepository extends AbstractMetadataRepository {
 		return URIUtil.append(base, CONTENT_FILENAME + extension);
 	}
 
-	public URLMetadataRepository() {
-		super();
+	public URLMetadataRepository(IProvisioningAgent agent) {
+		super(agent);
 	}
 
-	public URLMetadataRepository(URI location, String name, Map properties) {
-		super(name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
+	public URLMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
+		super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
 		content = getActualLocation(location);
 	}
 
@@ -57,27 +71,63 @@ public class URLMetadataRepository extends AbstractMetadataRepository {
 	}
 
 	public synchronized void initialize(RepositoryState state) {
-		this.name = state.Name;
-		this.type = state.Type;
-		this.version = state.Version.toString();
-		this.provider = state.Provider;
-		this.description = state.Description;
-		this.location = state.Location;
-		this.properties = state.Properties;
-		this.units.addAll(Arrays.asList(state.Units));
+		setName(state.Name);
+		setType(state.Type);
+		setVersion(state.Version.toString());
+		setProvider(state.Provider);
+		setDescription(state.Description);
+		setLocation(state.Location);
+		setProperties(state.Properties);
+		this.units.addAll(state.Units);
+		this.references = CollectionUtils.unmodifiableList(state.Repositories);
 	}
 
 	// Use this method to setup any transient fields etc after the object has been restored from a stream
 	public synchronized void initializeAfterLoad(URI repoLocation) {
-		this.location = repoLocation;
-		content = getActualLocation(location);
+		setLocation(repoLocation);
+		content = getActualLocation(repoLocation);
+	}
+
+	public Collection<IRepositoryReference> getReferences() {
+		return references;
 	}
 
 	public boolean isModifiable() {
 		return false;
 	}
 
-	public synchronized Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		return query.perform(units.iterator(), collector);
+	public synchronized IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		return IndexProvider.query(this, query, monitor);
+	}
+
+	public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
+		if (InstallableUnit.MEMBER_ID.equals(memberName)) {
+			if (idIndex == null)
+				idIndex = new IdIndex(units);
+			return idIndex;
+		}
+
+		if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
+			if (capabilityIndex == null)
+				capabilityIndex = new CapabilityIndex(units.iterator());
+			return capabilityIndex;
+		}
+		return null;
+	}
+
+	public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
+		if (!(client instanceof IInstallableUnit))
+			return null;
+		IInstallableUnit iu = (IInstallableUnit) client;
+		if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
+			if (translationSupport == null)
+				translationSupport = new TranslationSupport(this);
+			return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
+		}
+		return null;
+	}
+
+	public Iterator<IInstallableUnit> everything() {
+		return units.iterator();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
index a8ec4d7..390dbea 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,31 +14,47 @@ package org.eclipse.equinox.internal.p2.metadata.repository.io;
 
 import java.net.URI;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
 import org.eclipse.equinox.internal.p2.persistence.XMLParser;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.*;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.RepositoryReference;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
 import org.osgi.framework.BundleContext;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 
 public abstract class MetadataParser extends XMLParser implements XMLConstants {
+	static final ILicense[] NO_LICENSES = new ILicense[0];
 
 	public MetadataParser(BundleContext context, String bundleId) {
 		super(context, bundleId);
 	}
 
-	protected class RepositoryReferencesHandler extends AbstractHandler {
-		private HashSet references;
+	protected abstract class AbstractMetadataHandler extends AbstractHandler {
+
+		public AbstractMetadataHandler(ContentHandler parentHandler, String elementHandled) {
+			super(parentHandler, elementHandled);
+		}
+
+		int getOptionalSize(Attributes attributes, int dflt) {
+			String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
+			return sizeStr != null ? Integer.parseInt(sizeStr) : dflt;
+		}
+	}
+
+	protected class RepositoryReferencesHandler extends AbstractMetadataHandler {
+		private HashSet<IRepositoryReference> references;
 
 		public RepositoryReferencesHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, REPOSITORY_REFERENCES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			references = (size != null ? new HashSet(Integer.parseInt(size)) : new HashSet(4));
+			references = new HashSet<IRepositoryReference>(getOptionalSize(attributes, 4));
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -49,8 +65,8 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 			}
 		}
 
-		public RepositoryReference[] getReferences() {
-			return (RepositoryReference[]) references.toArray(new RepositoryReference[references.size()]);
+		public IRepositoryReference[] getReferences() {
+			return references.toArray(new IRepositoryReference[references.size()]);
 		}
 	}
 
@@ -58,7 +74,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 		private final String[] required = new String[] {TYPE_ATTRIBUTE, OPTIONS_ATTRIBUTE};
 
-		public RepositoryReferenceHandler(AbstractHandler parentHandler, Attributes attributes, Set references) {
+		public RepositoryReferenceHandler(AbstractHandler parentHandler, Attributes attributes, Set<IRepositoryReference> references) {
 			super(parentHandler, REPOSITORY_REFERENCE_ELEMENT);
 			String[] values = parseRequiredAttributes(attributes, required);
 			String name = parseOptionalAttribute(attributes, NAME_ATTRIBUTE);
@@ -74,23 +90,20 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 	}
 
-	protected class InstallableUnitsHandler extends AbstractHandler {
-		private ArrayList units;
+	protected class InstallableUnitsHandler extends AbstractMetadataHandler {
+		private ArrayList<InstallableUnitDescription> units;
 
 		public InstallableUnitsHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, INSTALLABLE_UNITS_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			units = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			units = new ArrayList<InstallableUnitDescription>(getOptionalSize(attributes, 4));
 		}
 
 		public IInstallableUnit[] getUnits() {
 			int size = units.size();
 			IInstallableUnit[] result = new IInstallableUnit[size];
 			int i = 0;
-			for (Iterator it = units.iterator(); it.hasNext(); i++) {
-				InstallableUnitDescription desc = (InstallableUnitDescription) it.next();
-				result[i] = MetadataFactory.createInstallableUnit(desc);
-			}
+			for (InstallableUnitDescription desc : units)
+				result[i++] = MetadataFactory.createInstallableUnit(desc);
 			return result;
 		}
 
@@ -127,9 +140,9 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		private Version version;
 		private boolean singleton;
 
-		private List units;
+		private List<InstallableUnitDescription> units;
 
-		public InstallableUnitHandler(AbstractHandler parentHandler, Attributes attributes, List units) {
+		public InstallableUnitHandler(AbstractHandler parentHandler, Attributes attributes, List<InstallableUnitDescription> units) {
 			super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
 			String[] values = parseAttributes(attributes, REQUIRED_IU_ATTRIBUTES, OPTIONAL_IU_ATTRIBUTES);
 			this.units = units;
@@ -160,19 +173,19 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 				} else {
 					duplicateElement(this, name, attributes);
 				}
-			} else if (REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
+			} else if (REQUIREMENTS_ELEMENT.equals(name)) {
 				if (requiredCapabilitiesHandler == null) {
 					requiredCapabilitiesHandler = new RequiredCapabilitiesHandler(this, attributes);
 				} else {
 					duplicateElement(this, name, attributes);
 				}
-			} else if (HOST_REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
+			} else if (HOST_REQUIREMENTS_ELEMENT.equals(name)) {
 				if (hostRequiredCapabilitiesHandler == null) {
 					hostRequiredCapabilitiesHandler = new HostRequiredCapabilitiesHandler(this, attributes);
 				} else {
 					duplicateElement(this, name, attributes);
 				}
-			} else if (META_REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
+			} else if (META_REQUIREMENTS_ELEMENT.equals(name)) {
 				if (metaRequiredCapabilitiesHandler == null) {
 					metaRequiredCapabilitiesHandler = new MetaRequiredCapabilitiesHandler(this, attributes);
 				} else {
@@ -247,7 +260,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 			if (isValidXML()) {
 				if (requirementChangesHandler != null) {
 					currentUnit = new MetadataFactory.InstallableUnitPatchDescription();
-					((InstallableUnitPatchDescription) currentUnit).setRequirementChanges((IRequirementChange[]) requirementChangesHandler.getRequirementChanges().toArray(new IRequirementChange[requirementChangesHandler.getRequirementChanges().size()]));
+					((InstallableUnitPatchDescription) currentUnit).setRequirementChanges(requirementChangesHandler.getRequirementChanges().toArray(new IRequirementChange[requirementChangesHandler.getRequirementChanges().size()]));
 					if (applicabilityScopeHandler != null)
 						((InstallableUnitPatchDescription) currentUnit).setApplicabilityScope(applicabilityScopeHandler.getScope());
 					if (lifeCycleHandler != null)
@@ -264,15 +277,15 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 				OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
 				String updateFrom = null;
 				VersionRange updateRange = null;
-				for (Enumeration e = properties.keys(); e.hasMoreElements();) {
-					String key = (String) e.nextElement();
-					String value = properties.getProperty(key);
+				for (Entry<String, String> e : properties.entrySet()) {
+					String key = e.getKey();
+					String value = e.getValue();
 					//Backward compatibility
-					if (key.equals("equinox.p2.update.from")) {
+					if (key.equals("equinox.p2.update.from")) { //$NON-NLS-1$
 						updateFrom = value;
 						continue;
 					}
-					if (key.equals("equinox.p2.update.range")) {
+					if (key.equals("equinox.p2.update.range")) { //$NON-NLS-1$
 						updateRange = new VersionRange(value);
 						continue;
 					}
@@ -285,8 +298,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 				//End of backward compatibility
 
 				if (licensesHandler != null) {
-					ILicense license = licensesHandler.getLicense();
-					currentUnit.setLicense(license);
+					currentUnit.setLicenses(licensesHandler.getLicenses());
 				}
 
 				if (copyrightHandler != null) {
@@ -296,10 +308,10 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 				IProvidedCapability[] providedCapabilities = (providedCapabilitiesHandler == null ? new IProvidedCapability[0] : providedCapabilitiesHandler.getProvidedCapabilities());
 				currentUnit.setCapabilities(providedCapabilities);
-				IRequiredCapability[] requiredCapabilities = (requiredCapabilitiesHandler == null ? new IRequiredCapability[0] : requiredCapabilitiesHandler.getRequiredCapabilities());
-				currentUnit.setRequiredCapabilities(requiredCapabilities);
-				IRequiredCapability[] metaRequiredCapabilities = (metaRequiredCapabilitiesHandler == null ? new IRequiredCapability[0] : metaRequiredCapabilitiesHandler.getMetaRequiredCapabilities());
-				currentUnit.setMetaRequiredCapabilities(metaRequiredCapabilities);
+				IRequirement[] requiredCapabilities = (requiredCapabilitiesHandler == null ? new IRequirement[0] : requiredCapabilitiesHandler.getRequiredCapabilities());
+				currentUnit.setRequirements(requiredCapabilities);
+				IRequirement[] metaRequiredCapabilities = (metaRequiredCapabilitiesHandler == null ? new IRequirement[0] : metaRequiredCapabilitiesHandler.getMetaRequiredCapabilities());
+				currentUnit.setMetaRequirements(metaRequiredCapabilities);
 				if (filterHandler != null) {
 					currentUnit.setFilter(filterHandler.getText());
 				}
@@ -320,13 +332,12 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 	}
 
-	protected class ApplicabilityScopesHandler extends AbstractHandler {
-		private List scopes;
+	protected class ApplicabilityScopesHandler extends AbstractMetadataHandler {
+		private List<IRequirement[]> scopes;
 
 		public ApplicabilityScopesHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, APPLICABILITY_SCOPE);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			scopes = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			scopes = new ArrayList<IRequirement[]>(getOptionalSize(attributes, 4));
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -337,22 +348,22 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 			}
 		}
 
-		public IRequiredCapability[][] getScope() {
-			return (IRequiredCapability[][]) scopes.toArray(new IRequiredCapability[scopes.size()][]);
+		public IRequirement[][] getScope() {
+			return scopes.toArray(new IRequirement[scopes.size()][]);
 		}
 	}
 
 	protected class ApplicabilityScopeHandler extends AbstractHandler {
 		private RequiredCapabilitiesHandler children;
-		private List scopes;
+		private List<IRequirement[]> scopes;
 
-		public ApplicabilityScopeHandler(AbstractHandler parentHandler, Attributes attributes, List scopes) {
+		public ApplicabilityScopeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement[]> scopes) {
 			super(parentHandler, APPLY_ON);
 			this.scopes = scopes;
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (REQUIRED_CAPABILITIES_ELEMENT.equals(name)) {
+			if (REQUIREMENTS_ELEMENT.equals(name)) {
 				children = new RequiredCapabilitiesHandler(this, attributes);
 			} else {
 				duplicateElement(this, name, attributes);
@@ -366,13 +377,12 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 	}
 
-	protected class RequirementsChangeHandler extends AbstractHandler {
-		private List requirementChanges;
+	protected class RequirementsChangeHandler extends AbstractMetadataHandler {
+		private List<IRequirementChange> requirementChanges;
 
 		public RequirementsChangeHandler(InstallableUnitHandler parentHandler, Attributes attributes) {
 			super(parentHandler, REQUIREMENT_CHANGES);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			requirementChanges = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			requirementChanges = new ArrayList<IRequirementChange>(getOptionalSize(attributes, 4));
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -383,20 +393,20 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 			}
 		}
 
-		public List getRequirementChanges() {
+		public List<IRequirementChange> getRequirementChanges() {
 			return requirementChanges;
 		}
 	}
 
 	protected class RequirementChangeHandler extends AbstractHandler {
-		private List from;
-		private List to;
-		private List requirementChanges;
+		private List<IRequirement> from;
+		private List<IRequirement> to;
+		private List<IRequirementChange> requirementChanges;
 
-		public RequirementChangeHandler(AbstractHandler parentHandler, Attributes attributes, List requirementChanges) {
+		public RequirementChangeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirementChange> requirementChanges) {
 			super(parentHandler, REQUIREMENT_CHANGE);
-			from = new ArrayList(1);
-			to = new ArrayList(1);
+			from = new ArrayList<IRequirement>(1);
+			to = new ArrayList<IRequirement>(1);
 			this.requirementChanges = requirementChanges;
 		}
 
@@ -414,21 +424,21 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 
 		protected void finished() {
-			requirementChanges.add(MetadataFactory.createRequirementChange(from.size() == 0 ? null : (IRequiredCapability) from.get(0), to.size() == 0 ? null : (IRequiredCapability) to.get(0)));
+			requirementChanges.add(MetadataFactory.createRequirementChange(from.size() == 0 ? null : (IRequirement) from.get(0), to.size() == 0 ? null : (IRequirement) to.get(0)));
 		}
 	}
 
 	protected class RequirementChangeEltHandler extends AbstractHandler {
-		private List requirement;
+		private List<IRequirement> requirement;
 
-		public RequirementChangeEltHandler(AbstractHandler parentHandler, String parentId, Attributes attributes, List from) {
+		public RequirementChangeEltHandler(AbstractHandler parentHandler, String parentId, Attributes attributes, List<IRequirement> from) {
 			super(parentHandler, parentId);
 			requirement = from;
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (REQUIRED_CAPABILITY_ELEMENT.equals(name))
-				new RequiredCapabilityHandler(this, attributes, requirement);
+			if (REQUIREMENT_ELEMENT.equals(name))
+				new RequirementHandler(this, attributes, requirement);
 			else {
 				invalidElement(name, attributes);
 			}
@@ -437,39 +447,38 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 	}
 
 	protected class LifeCycleHandler extends AbstractHandler {
-		private List lifeCycleRequirement;
+		private List<IRequirement> lifeCycleRequirement;
 
 		public LifeCycleHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, LIFECYCLE);
-			lifeCycleRequirement = new ArrayList(1);
+			lifeCycleRequirement = new ArrayList<IRequirement>(1);
 		}
 
-		public IRequiredCapability getLifeCycleRequirement() {
+		public IRequirement getLifeCycleRequirement() {
 			if (lifeCycleRequirement.size() == 0)
 				return null;
-			return (IRequiredCapability) lifeCycleRequirement.get(0);
+			return lifeCycleRequirement.get(0);
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (REQUIRED_CAPABILITY_ELEMENT.equals(name)) {
-				new RequiredCapabilityHandler(this, attributes, lifeCycleRequirement);
+			if (REQUIREMENT_ELEMENT.equals(name)) {
+				new RequirementHandler(this, attributes, lifeCycleRequirement);
 			} else {
 				invalidElement(name, attributes);
 			}
 		}
 	}
 
-	protected class ProvidedCapabilitiesHandler extends AbstractHandler {
-		private List providedCapabilities;
+	protected class ProvidedCapabilitiesHandler extends AbstractMetadataHandler {
+		private List<IProvidedCapability> providedCapabilities;
 
 		public ProvidedCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, PROVIDED_CAPABILITIES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			providedCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			providedCapabilities = new ArrayList<IProvidedCapability>(getOptionalSize(attributes, 4));
 		}
 
 		public IProvidedCapability[] getProvidedCapabilities() {
-			return (IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]);
+			return providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -483,7 +492,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 	protected class ProvidedCapabilityHandler extends AbstractHandler {
 
-		public ProvidedCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List capabilities) {
+		public ProvidedCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List<IProvidedCapability> capabilities) {
 			super(parentHandler, PROVIDED_CAPABILITY_ELEMENT);
 			String[] values = parseRequiredAttributes(attributes, REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES);
 			Version version = checkVersion(PROVIDED_CAPABILITY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
@@ -495,126 +504,167 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 	}
 
-	protected class HostRequiredCapabilitiesHandler extends AbstractHandler {
-		private List requiredCapabilities;
+	protected class HostRequiredCapabilitiesHandler extends AbstractMetadataHandler {
+		private List<IRequirement> requiredCapabilities;
 
 		public HostRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
-			super(parentHandler, HOST_REQUIRED_CAPABILITIES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			super(parentHandler, HOST_REQUIREMENTS_ELEMENT);
+			requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
 		}
 
-		public IRequiredCapability[] getHostRequiredCapabilities() {
-			return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
+		public IRequirement[] getHostRequiredCapabilities() {
+			return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
-				new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
+			if (name.equals(REQUIREMENT_ELEMENT)) {
+				new RequirementHandler(this, attributes, requiredCapabilities);
 			} else {
 				invalidElement(name, attributes);
 			}
 		}
 	}
 
-	protected class MetaRequiredCapabilitiesHandler extends AbstractHandler {
-		private List requiredCapabilities;
+	protected class MetaRequiredCapabilitiesHandler extends AbstractMetadataHandler {
+		private List<IRequirement> requiredCapabilities;
 
 		public MetaRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
-			super(parentHandler, META_REQUIRED_CAPABILITIES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			super(parentHandler, META_REQUIREMENTS_ELEMENT);
+			requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
 		}
 
-		public IRequiredCapability[] getMetaRequiredCapabilities() {
-			return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
+		public IRequirement[] getMetaRequiredCapabilities() {
+			return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
-				new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
+			if (name.equals(REQUIREMENT_ELEMENT)) {
+				new RequirementHandler(this, attributes, requiredCapabilities);
 			} else {
 				invalidElement(name, attributes);
 			}
 		}
 	}
 
-	protected class RequiredCapabilitiesHandler extends AbstractHandler {
-		private List requiredCapabilities;
+	protected class RequiredCapabilitiesHandler extends AbstractMetadataHandler {
+		private List<IRequirement> requiredCapabilities;
 
 		public RequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
-			super(parentHandler, REQUIRED_CAPABILITIES_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			requiredCapabilities = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			super(parentHandler, REQUIREMENTS_ELEMENT);
+			requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
 		}
 
-		public IRequiredCapability[] getRequiredCapabilities() {
-			return (IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]);
+		public IRequirement[] getRequiredCapabilities() {
+			return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
-			if (name.equals(REQUIRED_CAPABILITY_ELEMENT)) {
-				new RequiredCapabilityHandler(this, attributes, requiredCapabilities);
+			if (name.equals(REQUIREMENT_ELEMENT)) {
+				new RequirementHandler(this, attributes, requiredCapabilities);
 			} else {
 				invalidElement(name, attributes);
 			}
 		}
 	}
 
-	protected class RequiredCapabilityHandler extends AbstractHandler {
+	protected class RequirementHandler extends AbstractHandler {
+		private List<IRequirement> capabilities;
 
-		private IRequiredCapability currentCapability = null;
+		private String match;
+		private String matchParams;
+		private String namespace;
+		private String name;
+		private VersionRange range;
+		private int min;
+		private int max;
+		private boolean greedy;
 
 		private TextHandler filterHandler = null;
-		private CapabilitySelectorsHandler selectorsHandler = null;
-
-		public RequiredCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List capabilities) {
-			super(parentHandler, REQUIRED_CAPABILITY_ELEMENT);
-			String[] values = parseAttributes(attributes, REQIURED_CAPABILITY_ATTRIBUTES, OPTIONAL_CAPABILITY_ATTRIBUTES);
-			VersionRange range = checkVersionRange(REQUIRED_CAPABILITY_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[2]);
-			boolean isOptional = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_OPTIONAL_ATTRIBUTE, values[3], false).booleanValue();
-			boolean isMultiple = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_MULTIPLE_ATTRIBUTE, values[4], false).booleanValue();
-			boolean isGreedy = checkBoolean(REQUIRED_CAPABILITY_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[5], true).booleanValue();
-			currentCapability = MetadataFactory.createRequiredCapability(values[0], values[1], range, null, isOptional, isMultiple, isGreedy);
-			capabilities.add(currentCapability);
+		private TextHandler descriptionHandler = null;
+
+		public RequirementHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement> capabilities) {
+			super(parentHandler, REQUIREMENT_ELEMENT);
+			this.capabilities = capabilities;
+			if (attributes.getIndex(NAMESPACE_ATTRIBUTE) >= 0) {
+				String[] values = parseAttributes(attributes, REQIURED_CAPABILITY_ATTRIBUTES, OPTIONAL_CAPABILITY_ATTRIBUTES);
+				namespace = values[0];
+				name = values[1];
+				range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[2]);
+				boolean isOptional = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_OPTIONAL_ATTRIBUTE, values[3], false).booleanValue();
+				min = isOptional ? 0 : 1;
+				boolean isMultiple = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_MULTIPLE_ATTRIBUTE, values[4], false).booleanValue();
+				max = isMultiple ? Integer.MAX_VALUE : 1;
+				greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[5], true).booleanValue();
+			} else {
+				// Expression based requirement
+				String[] values = parseAttributes(attributes, REQIUREMENT_ATTRIBUTES, OPTIONAL_REQUIREMENT_ATTRIBUTES);
+				match = values[0];
+				matchParams = values[1];
+				min = values[2] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MIN_ATTRIBUTE, values[2]);
+				max = values[3] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MAX_ATTRIBUTE, values[3]);
+				greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[4], true).booleanValue();
+			}
 		}
 
 		public void startElement(String name, Attributes attributes) {
 			if (name.equals(CAPABILITY_FILTER_ELEMENT)) {
 				filterHandler = new TextHandler(this, CAPABILITY_FILTER_ELEMENT, attributes);
-			} else if (name.equals(CAPABILITY_SELECTORS_ELEMENT)) {
-				selectorsHandler = new CapabilitySelectorsHandler(this, attributes);
+			} else if (name.equals(REQUIREMENT_DESCRIPTION_ELEMENT)) {
+				descriptionHandler = new TextHandler(this, REQUIREMENT_DESCRIPTION_ELEMENT, attributes);
 			} else {
 				invalidElement(name, attributes);
 			}
 		}
 
 		protected void finished() {
-			if (isValidXML()) {
-				if (currentCapability != null) {
-					if (filterHandler != null) {
-						currentCapability.setFilter(filterHandler.getText());
-					}
-					if (selectorsHandler != null) {
-						currentCapability.setSelectors(selectorsHandler.getSelectors());
+			if (!isValidXML())
+				return;
+			IMatchExpression<IInstallableUnit> filter = null;
+			if (filterHandler != null) {
+				try {
+					filter = InstallableUnit.parseFilter(filterHandler.getText());
+				} catch (ExpressionParseException e) {
+					if (removeWhiteSpace(filterHandler.getText()).equals("(&(|)(|)(|))")) {//$NON-NLS-1$
+						// We could log this I guess
+					} else {
+						throw e;
 					}
 				}
 			}
+			String description = descriptionHandler == null ? null : descriptionHandler.getText();
+			IRequirement requirement;
+			if (match != null) {
+				IMatchExpression<IInstallableUnit> matchExpr = createMatchExpression(match, matchParams);
+				requirement = MetadataFactory.createRequirement(matchExpr, filter, min, max, greedy, description);
+			} else
+				requirement = MetadataFactory.createRequirement(namespace, name, range, filter, min, max, greedy, description);
+			capabilities.add(requirement);
+		}
+
+		private String removeWhiteSpace(String s) {
+			if (s == null)
+				return ""; //$NON-NLS-1$
+			StringBuffer builder = new StringBuffer();
+			for (int i = 0; i < s.length(); i++) {
+				if (s.charAt(i) != ' ')
+					builder.append(s.charAt(i));
+			}
+			return builder.toString();
 		}
 	}
 
 	protected class ArtifactsHandler extends AbstractHandler {
 
-		private List artifacts;
+		private List<IArtifactKey> artifacts;
 
 		public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, ARTIFACT_KEYS_ELEMENT);
 			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			artifacts = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			artifacts = (size != null ? new ArrayList<IArtifactKey>(new Integer(size).intValue()) : new ArrayList<IArtifactKey>(4));
 		}
 
 		public IArtifactKey[] getArtifactKeys() {
-			return (IArtifactKey[]) artifacts.toArray(new IArtifactKey[artifacts.size()]);
+			return artifacts.toArray(new IArtifactKey[artifacts.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -630,7 +680,7 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 		private final String[] required = new String[] {CLASSIFIER_ATTRIBUTE, ID_ATTRIBUTE, VERSION_ATTRIBUTE};
 
-		public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, List artifacts) {
+		public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, List<IArtifactKey> artifacts) {
 			super(parentHandler, ARTIFACT_KEY_ELEMENT);
 			String[] values = parseRequiredAttributes(attributes, required);
 			Version version = checkVersion(ARTIFACT_KEY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
@@ -642,29 +692,6 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		}
 	}
 
-	protected class CapabilitySelectorsHandler extends AbstractHandler {
-
-		private List selectors;
-
-		public CapabilitySelectorsHandler(AbstractHandler parentHandler, Attributes attributes) {
-			super(parentHandler, CAPABILITY_SELECTORS_ELEMENT);
-			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			selectors = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
-		}
-
-		public String[] getSelectors() {
-			return (String[]) selectors.toArray(new String[selectors.size()]);
-		}
-
-		public void startElement(String name, Attributes attributes) {
-			if (name.equals(CAPABILITY_SELECTOR_ELEMENT)) {
-				new TextHandler(this, CAPABILITY_SELECTOR_ELEMENT, attributes, selectors);
-			} else {
-				invalidElement(name, attributes);
-			}
-		}
-	}
-
 	protected class TouchpointTypeHandler extends AbstractHandler {
 
 		private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
@@ -691,18 +718,18 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 		ITouchpointData touchpointData = null;
 
-		List data = null;
+		List<TouchpointInstructionsHandler> data = null;
 
 		public TouchpointDataHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, TOUCHPOINT_DATA_ELEMENT);
 			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			data = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			data = (size != null ? new ArrayList<TouchpointInstructionsHandler>(new Integer(size).intValue()) : new ArrayList<TouchpointInstructionsHandler>(4));
 		}
 
 		public ITouchpointData[] getTouchpointData() {
 			ITouchpointData[] result = new ITouchpointData[data.size()];
 			for (int i = 0; i < result.length; i++)
-				result[i] = ((TouchpointInstructionsHandler) data.get(i)).getTouchpointData();
+				result[i] = data.get(i).getTouchpointData();
 			return result;
 		}
 
@@ -717,12 +744,12 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 	protected class TouchpointInstructionsHandler extends AbstractHandler {
 
-		Map instructions = null;
+		Map<String, ITouchpointInstruction> instructions = null;
 
-		public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List data) {
+		public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List<TouchpointInstructionsHandler> data) {
 			super(parentHandler, TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
 			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			instructions = (size != null ? new LinkedHashMap(new Integer(size).intValue()) : new LinkedHashMap(4));
+			instructions = (size != null ? new LinkedHashMap<String, ITouchpointInstruction>(new Integer(size).intValue()) : new LinkedHashMap<String, ITouchpointInstruction>(4));
 		}
 
 		public ITouchpointData getTouchpointData() {
@@ -743,11 +770,11 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 		private final String[] required = new String[] {TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE};
 		private final String[] optional = new String[] {TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE};
 
-		Map instructions = null;
+		Map<String, ITouchpointInstruction> instructions = null;
 		String key = null;
 		String qualifier = null;
 
-		public TouchpointInstructionHandler(AbstractHandler parentHandler, Attributes attributes, Map instructions) {
+		public TouchpointInstructionHandler(AbstractHandler parentHandler, Attributes attributes, Map<String, ITouchpointInstruction> instructions) {
 			super(parentHandler, TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
 			String[] values = parseAttributes(attributes, required, optional);
 			key = values[0];
@@ -765,17 +792,46 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 	}
 
 	protected class UpdateDescriptorHandler extends TextHandler {
-		private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
-		private final String[] optional = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE};
+		private final String[] requiredSimple = new String[] {ID_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
+		private final String[] optionalSimple = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE};
+
+		private final String[] requiredComplex = new String[] {MATCH_ATTRIBUTE};
+		private final String[] optionalComplex = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE, MATCH_PARAMETERS_ATTRIBUTE};
 
 		private IUpdateDescriptor descriptor;
 
 		public UpdateDescriptorHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
-			String[] values = parseAttributes(attributes, required, optional);
-			VersionRange range = checkVersionRange(REQUIRED_CAPABILITY_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
-			int severity = new Integer(values[2]).intValue();
-			descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, values[3]);
+			boolean simple = attributes.getIndex(ID_ATTRIBUTE) >= 0;
+			String[] values;
+			int severityIdx;
+			String description;
+			if (simple) {
+				values = parseAttributes(attributes, requiredSimple, optionalSimple);
+				severityIdx = 2;
+				description = values[3];
+			} else {
+				values = parseAttributes(attributes, requiredComplex, optionalComplex);
+				severityIdx = 1;
+				description = values[2];
+			}
+
+			int severity;
+			try {
+				severity = new Integer(values[severityIdx]).intValue();
+			} catch (NumberFormatException e) {
+				invalidAttributeValue(UPDATE_DESCRIPTOR_ELEMENT, UPDATE_DESCRIPTOR_SEVERITY, values[severityIdx]);
+				severity = IUpdateDescriptor.NORMAL;
+			}
+			URI location = parseURIAttribute(attributes, false);
+
+			if (simple) {
+				VersionRange range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
+				descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, description, location);
+			} else {
+				IMatchExpression<IInstallableUnit> r = createMatchExpression(values[0], values[3]);
+				descriptor = MetadataFactory.createUpdateDescriptor(Collections.singleton(r), severity, description, location);
+			}
 		}
 
 		public IUpdateDescriptor getUpdateDescriptor() {
@@ -787,21 +843,22 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 	 * 	Handler for a list of licenses.
 	 */
 	protected class LicensesHandler extends AbstractHandler {
+
 		// Note this handler is set up to handle multiple license elements, but for now
 		// the API for IInstallableUnit only reflects one.
 		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
-		private List licenses;
+		private List<ILicense> licenses;
 
 		public LicensesHandler(ContentHandler parentHandler, Attributes attributes) {
 			super(parentHandler, LICENSES_ELEMENT);
 			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			licenses = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(2));
+			licenses = (size != null ? new ArrayList<ILicense>(new Integer(size).intValue()) : new ArrayList<ILicense>(2));
 		}
 
-		public ILicense getLicense() {
+		public ILicense[] getLicenses() {
 			if (licenses.size() == 0)
-				return null;
-			return (ILicense) licenses.get(0);
+				return NO_LICENSES;
+			return licenses.toArray(new ILicense[licenses.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -821,9 +878,9 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 
 		URI location = null;
 
-		private final List licenses;
+		private final List<ILicense> licenses;
 
-		public LicenseHandler(AbstractHandler parentHandler, Attributes attributes, List licenses) {
+		public LicenseHandler(AbstractHandler parentHandler, Attributes attributes, List<ILicense> licenses) {
 			super(parentHandler, LICENSE_ELEMENT);
 			location = parseURIAttribute(attributes, false);
 			this.licenses = licenses;
@@ -859,4 +916,19 @@ public abstract class MetadataParser extends XMLParser implements XMLConstants {
 			return copyright;
 		}
 	}
+
+	static IMatchExpression<IInstallableUnit> createMatchExpression(String match, String matchParams) {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		IExpression expr = ExpressionUtil.parse(match);
+		Object[] params;
+		if (matchParams == null)
+			params = new Object[0];
+		else {
+			IExpression[] arrayExpr = ExpressionUtil.getOperands(ExpressionUtil.parse(matchParams));
+			params = new Object[arrayExpr.length];
+			for (int idx = 0; idx < arrayExpr.length; ++idx)
+				params[idx] = arrayExpr[idx].evaluate(null);
+		}
+		return factory.matchExpression(expr, params);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
index 7879ab7..98ff47f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
@@ -14,13 +14,14 @@ package org.eclipse.equinox.internal.p2.metadata.repository.io;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
-import java.util.Iterator;
-import java.util.Map;
+import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
 import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
 import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
 
 public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 
@@ -34,13 +35,15 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 	 * @param units An Iterator of {@link IInstallableUnit}.
 	 * @param size The number of units to write
 	 */
-	protected void writeInstallableUnits(Iterator units, int size) {
+	protected void writeInstallableUnits(Iterator<IInstallableUnit> units, int size) {
 		if (size == 0)
 			return;
 		start(INSTALLABLE_UNITS_ELEMENT);
+
+		// The size is a bummer. Is it really needed? It forces the use of a collect
 		attribute(COLLECTION_SIZE_ATTRIBUTE, size);
 		while (units.hasNext())
-			writeInstallableUnit((IInstallableUnit) units.next());
+			writeInstallableUnit(units.next());
 		end(INSTALLABLE_UNITS_ELEMENT);
 	}
 
@@ -52,9 +55,13 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 		attribute(SINGLETON_ATTRIBUTE, iu.isSingleton(), true);
 		//		attribute(FRAGMENT_ATTRIBUTE, iu.isFragment(), false);
 
-		if (iu.isFragment() && iu instanceof IInstallableUnitFragment) {
+		boolean simpleRequirements = hasOnlySimpleRequirements(iu);
+		if (!simpleRequirements)
+			attribute(GENERATION_ATTRIBUTE, 2);
+
+		if (iu instanceof IInstallableUnitFragment) {
 			IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
-			writeHostRequiredCapabilities(fragment.getHost());
+			writeHostRequirements(fragment.getHost());
 		}
 
 		if (iu instanceof IInstallableUnitPatch) {
@@ -66,73 +73,115 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 
 		writeUpdateDescriptor(resolvedIU, resolvedIU.getUpdateDescriptor());
 		writeProperties(iu.getProperties());
-		writeMetaRequiredCapabilities(iu.getMetaRequiredCapabilities());
+		writeMetaRequirements(iu.getMetaRequirements());
 		writeProvidedCapabilities(iu.getProvidedCapabilities());
-		writeRequiredCapabilities(iu.getRequiredCapabilities());
-		writeTrimmedCdata(IU_FILTER_ELEMENT, iu.getFilter());
+		if (simpleRequirements && iu instanceof IInstallableUnitFragment) {
+			Collection<IRequirement> mergedRequirementsAndFragmentHostForPre36Compatibility = new LinkedHashSet<IRequirement>(iu.getRequirements());
+			mergedRequirementsAndFragmentHostForPre36Compatibility.addAll(((IInstallableUnitFragment) iu).getHost());
+			writeRequirements(mergedRequirementsAndFragmentHostForPre36Compatibility);
+		} else {
+			writeRequirements(iu.getRequirements());
+		}
+		writeTrimmedCdata(IU_FILTER_ELEMENT, iu.getFilter() == null ? null : iu.getFilter().getParameters()[0].toString());
 
 		writeArtifactKeys(iu.getArtifacts());
 		writeTouchpointType(iu.getTouchpointType());
 		writeTouchpointData(iu.getTouchpointData());
-		writeLicenses(iu.getLicense());
+		writeLicenses(iu.getLicenses());
 		writeCopyright(iu.getCopyright());
 
 		end(INSTALLABLE_UNIT_ELEMENT);
 	}
 
-	protected void writeLifeCycle(IRequiredCapability capability) {
+	private boolean hasOnlySimpleRequirements(IInstallableUnit iu) {
+		for (IRequirement r : iu.getRequirements())
+			if (r.getMax() == 0 || !RequiredCapability.isSimpleRequirement(r.getMatches()))
+				return false;
+
+		if (iu.getUpdateDescriptor() != null) {
+			for (IMatchExpression<IInstallableUnit> m : iu.getUpdateDescriptor().getIUsBeingUpdated()) {
+				if (!RequiredCapability.isSimpleRequirement(m))
+					return false;
+			}
+		}
+		
+		for (IRequirement r : iu.getMetaRequirements())
+			if (r.getMax() == 0 || !RequiredCapability.isSimpleRequirement(r.getMatches()))
+				return false;
+
+		if (iu instanceof IInstallableUnitFragment) {
+			for (IRequirement r : ((IInstallableUnitFragment) iu).getHost())
+				if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
+					return false;
+		}
+
+		if (iu instanceof IInstallableUnitPatch) {
+			IInstallableUnitPatch iuPatch = (IInstallableUnitPatch) iu;
+			for (IRequirement[] rArr : iuPatch.getApplicabilityScope())
+				for (IRequirement r : rArr)
+					if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
+						return false;
+
+			IRequirement lifeCycle = iuPatch.getLifeCycle();
+			if (lifeCycle != null && !RequiredCapability.isSimpleRequirement(lifeCycle.getMatches()))
+				return false;
+		}
+		return true;
+	}
+
+	protected void writeLifeCycle(IRequirement capability) {
 		if (capability == null)
 			return;
 		start(LIFECYCLE);
-		writeRequiredCapability(capability);
+		writeRequirement(capability);
 		end(LIFECYCLE);
 	}
 
-	protected void writeHostRequiredCapabilities(IRequiredCapability[] capabilities) {
-		if (capabilities != null && capabilities.length > 0) {
-			start(HOST_REQUIRED_CAPABILITIES_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
-			for (int i = 0; i < capabilities.length; i++) {
-				writeRequiredCapability(capabilities[i]);
+	protected void writeHostRequirements(Collection<IRequirement> hostRequirements) {
+		if (hostRequirements != null && hostRequirements.size() > 0) {
+			start(HOST_REQUIREMENTS_ELEMENT);
+			attribute(COLLECTION_SIZE_ATTRIBUTE, hostRequirements.size());
+			for (IRequirement req : hostRequirements) {
+				writeRequirement(req);
 			}
-			end(HOST_REQUIRED_CAPABILITIES_ELEMENT);
+			end(HOST_REQUIREMENTS_ELEMENT);
 		}
 	}
 
-	protected void writeProvidedCapabilities(IProvidedCapability[] capabilities) {
-		if (capabilities != null && capabilities.length > 0) {
+	protected void writeProvidedCapabilities(Collection<IProvidedCapability> capabilities) {
+		if (capabilities != null && capabilities.size() > 0) {
 			start(PROVIDED_CAPABILITIES_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
-			for (int i = 0; i < capabilities.length; i++) {
+			attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.size());
+			for (IProvidedCapability capability : capabilities) {
 				start(PROVIDED_CAPABILITY_ELEMENT);
-				attribute(NAMESPACE_ATTRIBUTE, capabilities[i].getNamespace());
-				attribute(NAME_ATTRIBUTE, capabilities[i].getName());
-				attribute(VERSION_ATTRIBUTE, capabilities[i].getVersion());
+				attribute(NAMESPACE_ATTRIBUTE, capability.getNamespace());
+				attribute(NAME_ATTRIBUTE, capability.getName());
+				attribute(VERSION_ATTRIBUTE, capability.getVersion());
 				end(PROVIDED_CAPABILITY_ELEMENT);
 			}
 			end(PROVIDED_CAPABILITIES_ELEMENT);
 		}
 	}
 
-	protected void writeMetaRequiredCapabilities(IRequiredCapability[] capabilities) {
-		if (capabilities != null && capabilities.length > 0) {
-			start(META_REQUIRED_CAPABILITIES_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
-			for (int i = 0; i < capabilities.length; i++) {
-				writeRequiredCapability(capabilities[i]);
+	protected void writeMetaRequirements(Collection<IRequirement> metaRequirements) {
+		if (metaRequirements != null && metaRequirements.size() > 0) {
+			start(META_REQUIREMENTS_ELEMENT);
+			attribute(COLLECTION_SIZE_ATTRIBUTE, metaRequirements.size());
+			for (IRequirement req : metaRequirements) {
+				writeRequirement(req);
 			}
-			end(META_REQUIRED_CAPABILITIES_ELEMENT);
+			end(META_REQUIREMENTS_ELEMENT);
 		}
 	}
 
-	protected void writeRequiredCapabilities(IRequiredCapability[] capabilities) {
-		if (capabilities != null && capabilities.length > 0) {
-			start(REQUIRED_CAPABILITIES_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.length);
-			for (int i = 0; i < capabilities.length; i++) {
-				writeRequiredCapability(capabilities[i]);
+	protected void writeRequirements(Collection<IRequirement> requirements) {
+		if (requirements != null && requirements.size() > 0) {
+			start(REQUIREMENTS_ELEMENT);
+			attribute(COLLECTION_SIZE_ATTRIBUTE, requirements.size());
+			for (IRequirement req : requirements) {
+				writeRequirement(req);
 			}
-			end(REQUIRED_CAPABILITIES_ELEMENT);
+			end(REQUIREMENTS_ELEMENT);
 		}
 	}
 
@@ -140,28 +189,35 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 		if (descriptor == null)
 			return;
 
+		if (descriptor.getIUsBeingUpdated().size() > 1)
+			throw new IllegalStateException();
+		IMatchExpression<IInstallableUnit> singleUD = descriptor.getIUsBeingUpdated().iterator().next();
 		start(UPDATE_DESCRIPTOR_ELEMENT);
-		attribute(ID_ATTRIBUTE, descriptor.getId());
-		attribute(VERSION_RANGE_ATTRIBUTE, descriptor.getRange());
+		if (RequiredCapability.isSimpleRequirement(singleUD)) {
+			attribute(ID_ATTRIBUTE, RequiredCapability.extractName(singleUD));
+			attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(singleUD));
+		} else {
+			writeMatchExpression(singleUD);
+		}
 		attribute(UPDATE_DESCRIPTOR_SEVERITY, descriptor.getSeverity());
 		attribute(DESCRIPTION_ATTRIBUTE, descriptor.getDescription());
 		end(UPDATE_DESCRIPTOR_ELEMENT);
 	}
 
-	protected void writeApplicabilityScope(IRequiredCapability[][] capabilities) {
+	protected void writeApplicabilityScope(IRequirement[][] capabilities) {
 		start(APPLICABILITY_SCOPE);
 		for (int i = 0; i < capabilities.length; i++) {
 			start(APPLY_ON);
-			writeRequiredCapabilities(capabilities[i]);
+			writeRequirements(Arrays.asList(capabilities[i]));
 			end(APPLY_ON);
 		}
 		end(APPLICABILITY_SCOPE);
 	}
 
-	protected void writeRequirementsChange(IRequirementChange[] changes) {
+	protected void writeRequirementsChange(List<IRequirementChange> changes) {
 		start(REQUIREMENT_CHANGES);
-		for (int i = 0; i < changes.length; i++) {
-			writeRequirementChange(changes[i]);
+		for (int i = 0; i < changes.size(); i++) {
+			writeRequirementChange(changes.get(i));
 		}
 		end(REQUIREMENT_CHANGES);
 	}
@@ -170,49 +226,62 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 		start(REQUIREMENT_CHANGE);
 		if (change.applyOn() != null) {
 			start(REQUIREMENT_FROM);
-			writeRequiredCapability(change.applyOn());
+			writeRequirement(change.applyOn());
 			end(REQUIREMENT_FROM);
 		}
 		if (change.newValue() != null) {
 			start(REQUIREMENT_TO);
-			writeRequiredCapability(change.newValue());
+			writeRequirement(change.newValue());
 			end(REQUIREMENT_TO);
 		}
 		end(REQUIREMENT_CHANGE);
 	}
 
-	protected void writeRequiredCapability(IRequiredCapability capability) {
-		start(REQUIRED_CAPABILITY_ELEMENT);
-		attribute(NAMESPACE_ATTRIBUTE, capability.getNamespace());
-		attribute(NAME_ATTRIBUTE, capability.getName());
-		attribute(VERSION_RANGE_ATTRIBUTE, capability.getRange());
-		attribute(CAPABILITY_OPTIONAL_ATTRIBUTE, capability.isOptional(), false);
-		attribute(CAPABILITY_MULTIPLE_ATTRIBUTE, capability.isMultiple(), false);
-		attribute(CAPABILITY_GREED_ATTRIBUTE, capability.isGreedy(), true);
-		writeTrimmedCdata(CAPABILITY_FILTER_ELEMENT, capability.getFilter());
-
-		String[] selectors = capability.getSelectors();
-		if (selectors.length > 0) {
-			start(CAPABILITY_SELECTORS_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, selectors.length);
-			for (int j = 0; j < selectors.length; j++) {
-				writeTrimmedCdata(CAPABILITY_SELECTOR_ELEMENT, selectors[j]);
-			}
-			end(CAPABILITY_SELECTORS_ELEMENT);
+	protected void writeRequirement(IRequirement requirement) {
+		start(REQUIREMENT_ELEMENT);
+		IMatchExpression<IInstallableUnit> match = requirement.getMatches();
+		if (requirement.getMax() > 0 && RequiredCapability.isSimpleRequirement(match)) {
+			attribute(NAMESPACE_ATTRIBUTE, RequiredCapability.extractNamespace(match));
+			attribute(NAME_ATTRIBUTE, RequiredCapability.extractName(match));
+			attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(match));
+			attribute(CAPABILITY_OPTIONAL_ATTRIBUTE, requirement.getMin() == 0, false);
+			attribute(CAPABILITY_MULTIPLE_ATTRIBUTE, requirement.getMax() > 1, false);
+		} else {
+			writeMatchExpression(match);
+			if (requirement.getMin() != 1)
+				attribute(MIN_ATTRIBUTE, requirement.getMin());
+			if (requirement.getMax() != 1)
+				attribute(MAX_ATTRIBUTE, requirement.getMax());
 		}
+		attribute(CAPABILITY_GREED_ATTRIBUTE, requirement.isGreedy(), true);
+		if (requirement.getFilter() != null)
+			writeTrimmedCdata(CAPABILITY_FILTER_ELEMENT, requirement.getFilter().getParameters()[0].toString());
+		if (requirement.getDescription() != null)
+			writeTrimmedCdata(REQUIREMENT_DESCRIPTION_ELEMENT, requirement.getDescription());
+		end(REQUIREMENT_ELEMENT);
+	}
 
-		end(REQUIRED_CAPABILITY_ELEMENT);
+	private void writeMatchExpression(IMatchExpression<IInstallableUnit> match) {
+		attribute(MATCH_ATTRIBUTE, ExpressionUtil.getOperand(match));
+		Object[] params = match.getParameters();
+		if (params.length > 0) {
+			IExpressionFactory factory = ExpressionUtil.getFactory();
+			IExpression[] constantArray = new IExpression[params.length];
+			for (int idx = 0; idx < params.length; ++idx)
+				constantArray[idx] = factory.constant(params[idx]);
+			attribute(MATCH_PARAMETERS_ATTRIBUTE, factory.array(constantArray));
+		}
 	}
 
-	protected void writeArtifactKeys(IArtifactKey[] artifactKeys) {
-		if (artifactKeys != null && artifactKeys.length > 0) {
+	protected void writeArtifactKeys(Collection<IArtifactKey> artifactKeys) {
+		if (artifactKeys != null && artifactKeys.size() > 0) {
 			start(ARTIFACT_KEYS_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, artifactKeys.length);
-			for (int i = 0; i < artifactKeys.length; i++) {
+			attribute(COLLECTION_SIZE_ATTRIBUTE, artifactKeys.size());
+			for (IArtifactKey artifactKey : artifactKeys) {
 				start(ARTIFACT_KEY_ELEMENT);
-				attribute(ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE, artifactKeys[i].getClassifier());
-				attribute(ID_ATTRIBUTE, artifactKeys[i].getId());
-				attribute(VERSION_ATTRIBUTE, artifactKeys[i].getVersion());
+				attribute(ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE, artifactKey.getClassifier());
+				attribute(ID_ATTRIBUTE, artifactKey.getId());
+				attribute(VERSION_ATTRIBUTE, artifactKey.getVersion());
 				end(ARTIFACT_KEY_ELEMENT);
 			}
 			end(ARTIFACT_KEYS_ELEMENT);
@@ -226,21 +295,19 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 		end(TOUCHPOINT_TYPE_ELEMENT);
 	}
 
-	protected void writeTouchpointData(ITouchpointData[] touchpointData) {
-		if (touchpointData != null && touchpointData.length > 0) {
+	protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) {
+		if (touchpointData != null && touchpointData.size() > 0) {
 			start(TOUCHPOINT_DATA_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.length);
-			for (int i = 0; i < touchpointData.length; i++) {
-				ITouchpointData nextData = touchpointData[i];
-				Map instructions = nextData.getInstructions();
+			attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size());
+			for (ITouchpointData nextData : touchpointData) {
+				Map<String, ITouchpointInstruction> instructions = nextData.getInstructions();
 				if (instructions.size() > 0) {
 					start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
 					attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size());
-					for (Iterator iter = instructions.entrySet().iterator(); iter.hasNext();) {
-						Map.Entry entry = (Map.Entry) iter.next();
+					for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) {
 						start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
 						attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey());
-						ITouchpointInstruction instruction = (ITouchpointInstruction) entry.getValue();
+						ITouchpointInstruction instruction = entry.getValue();
 						if (instruction.getImportAttribute() != null)
 							attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute());
 						cdata(instruction.getBody(), true);
@@ -262,27 +329,31 @@ public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
 		}
 	}
 
-	private void writeLicenses(ILicense license) {
-		if (license != null) {
+	private void writeLicenses(Collection<ILicense> licenses) {
+		if (licenses != null && licenses.size() > 0) {
 			// In the future there may be more than one license, so we write this 
 			// as a collection of one.
 			// See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
 			start(LICENSES_ELEMENT);
-			attribute(COLLECTION_SIZE_ATTRIBUTE, 1);
-			start(LICENSE_ELEMENT);
-			if (license.getLocation() != null) {
-				attribute(URI_ATTRIBUTE, license.getLocation().toString());
-
-				try {
-					// we write the URL attribute for backwards compatibility with 3.4.x
-					// this attribute should be removed if we make a breaking format change.
-					attribute(URL_ATTRIBUTE, URIUtil.toURL(license.getLocation()).toExternalForm());
-				} catch (MalformedURLException e) {
-					attribute(URL_ATTRIBUTE, license.getLocation().toString());
+			attribute(COLLECTION_SIZE_ATTRIBUTE, licenses.size());
+			for (ILicense license : licenses) {
+				if (license == null)
+					continue;
+				start(LICENSE_ELEMENT);
+				if (license.getLocation() != null) {
+					attribute(URI_ATTRIBUTE, license.getLocation().toString());
+
+					try {
+						// we write the URL attribute for backwards compatibility with 3.4.x
+						// this attribute should be removed if we make a breaking format change.
+						attribute(URL_ATTRIBUTE, URIUtil.toURL(license.getLocation()).toExternalForm());
+					} catch (MalformedURLException e) {
+						attribute(URL_ATTRIBUTE, license.getLocation().toString());
+					}
 				}
+				cdata(license.getBody(), true);
+				end(LICENSE_ELEMENT);
 			}
-			cdata(license.getBody(), true);
-			end(LICENSE_ELEMENT);
 			end(LICENSES_ELEMENT);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
index 0c0109f..014f1b8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
@@ -10,16 +10,16 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository.io;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
 
 public interface XMLConstants extends org.eclipse.equinox.internal.p2.persistence.XMLConstants {
 
 	// Constants defining the structure of the XML for metadata objects
 
 	// A format version number for metadata XML.
-	public static final Version CURRENT_VERSION = new Version(0, 0, 1);
-	public static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, new Version(2, 0, 0), false);
+	public static final Version CURRENT_VERSION = Version.createOSGi(0, 0, 1);
+	public static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, Version.createOSGi(2, 0, 0), false);
 
 	// Constants for processing Instructions
 	public static final String PI_METADATA_TARGET = "metadata"; //$NON-NLS-1$
@@ -36,10 +36,10 @@ public interface XMLConstants extends org.eclipse.equinox.internal.p2.persistenc
 	// Constants for sub-elements of an installable unit element
 	public static final String ARTIFACT_KEYS_ELEMENT = "artifacts"; //$NON-NLS-1$
 	public static final String ARTIFACT_KEY_ELEMENT = "artifact"; //$NON-NLS-1$
-	public static final String REQUIRED_CAPABILITIES_ELEMENT = "requires"; //$NON-NLS-1$
-	public static final String HOST_REQUIRED_CAPABILITIES_ELEMENT = "hostRequirements"; //$NON-NLS-1$
-	public static final String META_REQUIRED_CAPABILITIES_ELEMENT = "metaRequirements"; //$NON-NLS-1$
-	public static final String REQUIRED_CAPABILITY_ELEMENT = "required"; //$NON-NLS-1$
+	public static final String REQUIREMENTS_ELEMENT = "requires"; //$NON-NLS-1$
+	public static final String HOST_REQUIREMENTS_ELEMENT = "hostRequirements"; //$NON-NLS-1$
+	public static final String META_REQUIREMENTS_ELEMENT = "metaRequirements"; //$NON-NLS-1$
+	public static final String REQUIREMENT_ELEMENT = "required"; //$NON-NLS-1$
 	public static final String PROVIDED_CAPABILITIES_ELEMENT = "provides"; //$NON-NLS-1$
 	public static final String PROVIDED_CAPABILITY_ELEMENT = "provided"; //$NON-NLS-1$
 	public static final String[] REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_ATTRIBUTE};
@@ -61,18 +61,20 @@ public interface XMLConstants extends org.eclipse.equinox.internal.p2.persistenc
 	public static final String FRAGMENT_ATTRIBUTE = "fragment"; //$NON-NLS-1$
 	public static final String[] REQUIRED_IU_ATTRIBUTES = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
 	public static final String[] OPTIONAL_IU_ATTRIBUTES = new String[] {SINGLETON_ATTRIBUTE};
+	public static final String GENERATION_ATTRIBUTE = "generation"; //$NON-NLS-1$
 
 	// Constants for sub-elements of a required capability element
 	public static final String CAPABILITY_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
-	public static final String CAPABILITY_SELECTORS_ELEMENT = "selectors"; //$NON-NLS-1$
-	public static final String CAPABILITY_SELECTOR_ELEMENT = "selector"; //$NON-NLS-1$
+	public static final String REQUIREMENT_DESCRIPTION_ELEMENT = "description"; //$NON-NLS-1$
 
 	// Constants for attributes of a required capability element
 	public static final String CAPABILITY_OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
 	public static final String CAPABILITY_MULTIPLE_ATTRIBUTE = "multiple"; //$NON-NLS-1$
 	public static final String CAPABILITY_GREED_ATTRIBUTE = "greedy"; //$NON-NLS-1$
 	public static final String[] REQIURED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
+	public static final String[] REQIUREMENT_ATTRIBUTES = new String[] {MATCH_ATTRIBUTE};
 	public static final String[] OPTIONAL_CAPABILITY_ATTRIBUTES = new String[] {CAPABILITY_OPTIONAL_ATTRIBUTE, CAPABILITY_MULTIPLE_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
+	public static final String[] OPTIONAL_REQUIREMENT_ATTRIBUTES = new String[] {MATCH_PARAMETERS_ATTRIBUTE, MIN_ATTRIBUTE, MAX_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
 
 	// Constants for attributes of an artifact key element
 	public static final String ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
index 4bc4d5e..eae8344 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
@@ -14,11 +14,6 @@ io_failedWrite=Error occurred while writing repository at {0}.
 io_IncompatibleVersion=Metadata repository has incompatible version {0}; expected {1}.
 io_parseError=Error parsing metadata repository
 repo_loading = Loading the repository {0}.
-
+no_provisioning_agent=Unable to acquire provisioning agent service.
 repoMan_internalError=Internal error.
-repoMan_notExists=No repository found at {0}.
 repoMan_invalidLocation={0} is not a valid repository location.
-repoMan_relativeLocation=The provided location is not absolute: {0}
-CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found.
-CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}.
-CacheManager_FailedCommunicationWithRepo_0=Communication with repository at {0} failed.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java
deleted file mode 100644
index 206b614..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepository.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.repository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.AbstractMetadataRepository;
-
-/**
- * A metadata repository stores information about a set of installable units
- * <p>
- * This interface is not intended to be implemented by clients.  Metadata repository
- * implementations must subclass {@link AbstractMetadataRepository} rather than 
- * implementing this interface directly.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IMetadataRepository extends IRepository, IQueryable {
-
-	/** 
-	 * Add the given installable units to this repository
-	 * @param installableUnits the installable units to add
-	 */
-	public void addInstallableUnits(IInstallableUnit[] installableUnits);
-
-	/**
-	 * Adds a reference to another repository to this repository. When a repository
-	 * is loaded by {@link IMetadataRepositoryManager}, its references
-	 * are automatically added to the repository manager's set of known repositories.
-	 * <p>
-	 * Note that this method does not add the <b>contents</b> of the given
-	 * repository to this repository, but merely adds the location of another
-	 * repository to the metadata of this repository.
-	 * <p>
-	 * The {@link IRepository#ENABLED} option flag controls whether the 
-	 * referenced repository should be marked as enabled when added to the repository
-	 * manager. If this flag is set, the repository will be marked as enabled when
-	 * added to the repository manager. If this flag is missing, the repository will
-	 * be marked as disabled.
-	 * 
-	 * @param location the location of the repository to add
-	 * @param nickname The nickname of the repository, or <code>null</code>
-	 * @param type the repository type (currently either {@link IRepository#TYPE_METADATA}
-	 * or {@link IRepository#TYPE_ARTIFACT}).
-	 * @param options bit-wise or of option constants (currently either 
-	 * {@link IRepository#ENABLED} or {@link IRepository#NONE}).
-	 * @see IMetadataRepositoryManager#setEnabled(URI, boolean)
-	 */
-	public void addReference(URI location, String nickname, int type, int options);
-
-	/**
-	 * Removes all installable units that match the given query from this repository.
-	 * 
-	 * @param query the installable units to remove
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return <code>true</code> if any units were actually removed, and
-	 * <code>false</code> otherwise
-	 */
-	public boolean removeInstallableUnits(Query query, IProgressMonitor monitor);
-
-	/**
-	 * Remove all installable units from this repository.  
-	 */
-	public void removeAll();
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java
deleted file mode 100644
index 679e16d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/p2/metadata/repository/IMetadataRepositoryManager.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * A metadata repository manager is used to create, access, and manipulate
- * {@link IMetadataRepository} instances. See {@link IRepositoryManager}
- * for a general description of the characteristics of repository managers.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IMetadataRepositoryManager extends IRepositoryManager, IQueryable {
-	/**
-	 * The name used for obtaining a reference to the metadata repository manager service
-	 */
-	public static final String SERVICE_NAME = IMetadataRepositoryManager.class.getName();
-
-	/**
-	 * Repository type for a simple repository based on a URL or local file system location.
-	 */
-	public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.simpleRepository"; //$NON-NLS-1$
-	public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.compositeRepository"; //$NON-NLS-1$
-
-	/**
-	 * Creates and returns a new empty metadata repository of the given type at 
-	 * the given location.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * 
-	 * @param location the absolute location for the new repository
-	 * @param name the name of the new repository
-	 * @param type the kind of repository to create
-	 * @param properties the properties to set on the repository
-	 * @return the newly created repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>The repository type is unknown.</li>
-	 * <li>There was an error writing to the given repository location.</li>
-	 * <li>A repository already exists at that location.</li>
-	 * </ul>
-	 */
-	public IMetadataRepository createRepository(URI location, String name, String type, Map properties) throws ProvisionException;
-
-	/**
-	 * Loads a repository corresponding to the given URL.  If a repository has
-	 * previously been loaded at the given location, the same cached repository
-	 * may be returned.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * 
-	 * @param location The absolute location of the repository to load
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The loaded metadata repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Loads a repository corresponding to the given URL.  If a repository has
-	 * previously been loaded at the given location, the same cached repository
-	 * may be returned.
-	 * <p>
-	 * The resulting repository is added to the list of repositories tracked by
-	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
-	 * if they do not want the repository manager to remember the repository for subsequent
-	 * load attempts.
-	 * </p>
-	 * <p>
-	 * The flags passed in should be taken as a hint for the type of repository to load.  If
-	 * the manager cannot load a repository that satisfies these hints, it can fail fast.
-	 * </p>
-	 * @param location The absolute location of the repository to load
-	 * @param flags - bit-wise or of flags to consider when loading the repository
-	 *  (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The loaded metadata repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
-	 */
-	public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Refreshes the repository corresponding to the given URL. This method discards
-	 * any cached state held by the repository manager and reloads the repository
-	 * contents. The provided repository location must already be known to the repository
-	 * manager.
-	 * 
-	 * @param location The absolute location of the repository to refresh
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The refreshed metadata repository
-	 * @throws ProvisionException if the repository could not be refreshed.  Reasons include:
-	 * <ul>
-	 * <li>The location is not known to the repository manager.</li>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Validates a given URL and returns a status indicating whether a valid repository is likely
-	 * to be found at the given URL. Callers must assume that the validity of a 
-	 * repository location cannot be completely determined until an attempt to load 
-	 * the repository is made.  
-	 * 
-	 * @param location The absolute location of the repository to validate
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return A status indicating whether a valid repository is likely located at the
-	 * location.  A status with severity <code>OK</code> indicates that the repository is
-	 * likely to be loadable, or that as much validation as could be done was successful.
-	 * Reasons for a non-OK status include:
-	 * <ul>
-	 * <li>The specified location is not a valid repository location.</li>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public IStatus validateRepositoryLocation(URI location, IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java
deleted file mode 100644
index 4229da3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/AbstractMetadataRepository.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.provisional.spi.p2.repository.AbstractRepository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * The common base class for all metadata repositories.
- * <p>
- * Clients may subclass this class.
- * <p>
- */
-public abstract class AbstractMetadataRepository extends AbstractRepository implements IMetadataRepository {
-
-	//TODO Consider removing from abstract class, this is currently an implementation detail of the simple metadata repo parser
-	public static class RepositoryState {
-		public String Name;
-		public String Type;
-		public Version Version;
-		public String Provider;
-		public String Description;
-		public URI Location;
-		public Map Properties;
-		public IInstallableUnit[] Units;
-		public RepositoryReference[] Repositories;
-	}
-
-	public AbstractMetadataRepository() {
-		super("noName", "noType", "noVersion", null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-
-	//TODO Consider removing from abstract class, this is currently an implementation detail of the simple metadata repo parser
-	public abstract void initialize(RepositoryState state);
-
-	protected AbstractMetadataRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
-		super(name, type, version, location, description, provider, properties);
-	}
-
-	public void addInstallableUnits(IInstallableUnit[] installableUnit) {
-		assertModifiable();
-	}
-
-	public void addReference(URI repositoryLocation, String nickname, int repositoryType, int options) {
-		assertModifiable();
-	}
-
-	public void removeAll() {
-		assertModifiable();
-	}
-
-	public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
-		assertModifiable();
-		return false;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java
deleted file mode 100644
index cfd2114..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/MetadataRepositoryFactory.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-
-/**
- * A metadata repository factory is responsible for creating and loading instances
- * of a particular type of metadata repository. Factories are provided via the 
- * <tt>org.eclipse.equinox.p2.metadata.repository.metadataRepositories</tt> extension point.
- */
-public abstract class MetadataRepositoryFactory {
-
-	/**
-	 * Creates and returns a new empty metadata repository of the given type at 
-	 * the given location.
-	 * 
-	 * @param location the location for the new repository
-	 * @param name the name of the new repository
-	 * @param type the kind of repository to create
-	 * @param properties the properties to set on the repository
-	 * @return the newly created repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>The repository type is not supported by this factory.</li>
-	 * <li>There was an error writing to the given repository location.</li>
-	 * </ul>
-	 */
-	public abstract IMetadataRepository create(URI location, String name, String type, Map properties) throws ProvisionException;
-
-	/**
-	 * Loads a repository corresponding to the given URL.
-	 * <p>
-	 * The error code returned in the case of failure is significant. In particular an
-	 * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
-	 * that the location definitely identifies a repository of this type, but an error occurred
-	 * while loading the repository. The repository manager will not attempt to load
-	 * a repository from that location using any other factory.  An error code of
-	 * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
-	 * repository of this type at the given location, and the repository manager is free
-	 * to try again with a different repository factory.
-	 * </p>
-	 * <p>
-	 * The flags passed in should be taken as a hint for the type of repository to load.  If
-	 * the factory knows it will not load a repository that satisfies these hints, it can fail
-	 * fast and return null.<br>
-	 * See {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE}
-	 * </p>
-	 * @param location The location of the repository to load
-	 * @param flags to consider while loading the repository
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The loaded metadata repository
-	 * @throws ProvisionException if the repository could not be created.  Reasons include:
-	 * <ul>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public abstract IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
-
-	/**
-	 * Validates a candidate repository URL and returns a status indicating the
-	 * likelihood of a valid repository being located at the location.  Implementors 
-	 * should make all attempts to validate the URL that can be made without 
-	 * actually loading the repository.  The computation for this method must be 
-	 * significantly faster than loading the repository.  Early detectable error 
-	 * conditions, such as the non-existence of the location, or an inability to read 
-	 * the location, should be determined in this method.
-	 * 
-	 * @param location The location of the repository to validate
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return A status indicating whether a valid repository is likely located at the
-	 * location.  A status with severity <code>OK</code> indicates that the repository is
-	 * likely to be loadable, or that as much validation as could be done was successful.
-	 * Reasons for a non-OK status include:
-	 * <ul>
-	 * <li>The specified location is not a valid repository location.</li>
-	 * <li>There is no existing repository at that location.</li>
-	 * <li>The repository at that location could not be read.</li>
-	 * </ul>
-	 */
-	public abstract IStatus validate(URI location, IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java
deleted file mode 100644
index 9a7e2d8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/RepositoryReference.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;
-
-import java.net.URI;
-
-/**
- * Serialization helper class for repository references.
- */
-public class RepositoryReference {
-	public URI Location;
-	public int Type;
-	public int Options;
-	public String Nickname;
-
-	public RepositoryReference(URI location, String nickname, int type, int options) {
-		this.Location = location;
-		this.Type = type;
-		this.Options = options;
-		this.Nickname = nickname;
-	}
-
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		RepositoryReference other = (RepositoryReference) obj;
-		if (Location == null) {
-			if (other.Location != null)
-				return false;
-		} else if (!Location.equals(other.Location))
-			return false;
-		if (Type != other.Type)
-			return false;
-		return true;
-	}
-
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((Location == null) ? 0 : Location.hashCode());
-		result = prime * result + Type;
-		return result;
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
deleted file mode 100644
index 012c44d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.metadata.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
-	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
-	public IMetadataRepository create(URI location, String name, String type, Map properties) {
-		if (location.getScheme().equals("file")) //$NON-NLS-1$
-			return new LocalMetadataRepository(location, name, properties);
-		return new URLMetadataRepository(location, name, properties);
-	}
-
-	/**
-	 * Returns a file in the local file system that contains the contents of the
-	 * metadata repository at the given location.
-	 */
-	private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
-		File localFile = null;
-		URI jarLocation = URLMetadataRepository.getActualLocation(location, JAR_EXTENSION);
-		URI xmlLocation = URLMetadataRepository.getActualLocation(location, XML_EXTENSION);
-		// If the repository is local, we can return the repository file directly
-		if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
-			//look for a compressed local file
-			localFile = URIUtil.toFile(jarLocation);
-			if (localFile.exists())
-				return localFile;
-			//look for an uncompressed local file
-			localFile = URIUtil.toFile(xmlLocation);
-			if (localFile.exists())
-				return localFile;
-			String msg = NLS.bind(Messages.io_failedRead, location);
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
-		}
-		// file is not local, create a cache of the repository metadata
-		localFile = Activator.getCacheManager().createCache(location, URLMetadataRepository.CONTENT_FILENAME, monitor);
-		if (localFile == null) {
-			// there is no remote file in either form - this should not really happen as
-			// createCache should bail out with exception if something is wrong. This is an internal
-			// error.
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.repoMan_internalError, null));
-		}
-		return localFile;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public IStatus validate(URI location, IProgressMonitor monitor) {
-		try {
-			validateAndLoad(location, false, 0, monitor);
-		} catch (ProvisionException e) {
-			return e.getStatus();
-		}
-		return Status.OK_STATUS;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
-		return validateAndLoad(location, true, flags, monitor);
-	}
-
-	protected IMetadataRepository validateAndLoad(URI location, boolean doLoad, int flags, IProgressMonitor monitor) throws ProvisionException {
-		long time = 0;
-		final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
-		if (Tracing.DEBUG_METADATA_PARSING) {
-			Tracing.debug(debugMsg + location);
-			time = -System.currentTimeMillis();
-		}
-		SubMonitor sub = SubMonitor.convert(monitor, 400);
-		try {
-			File localFile = getLocalFile(location, sub.newChild(300));
-			InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
-			JarInputStream jarStream = null;
-			try {
-				//if reading from a jar, obtain a stream on the entry with the actual contents
-				if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
-					jarStream = new JarInputStream(inStream);
-					JarEntry jarEntry = jarStream.getNextJarEntry();
-					String entryName = URLMetadataRepository.CONTENT_FILENAME + URLMetadataRepository.XML_EXTENSION;
-					while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
-						jarEntry = jarStream.getNextJarEntry();
-					}
-					//if there is a jar but the entry is missing or invalid, treat this as an invalid repository
-					if (jarEntry == null)
-						throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
-				}
-				//parse the repository descriptor file
-				sub.setWorkRemaining(100);
-				if (doLoad) {
-					InputStream descriptorStream = jarStream != null ? jarStream : inStream;
-					IMetadataRepository result = new MetadataRepositoryIO().read(localFile.toURL(), descriptorStream, sub.newChild(100));
-					if (result != null && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0 && !result.isModifiable())
-						return null;
-					if (result instanceof LocalMetadataRepository)
-						((LocalMetadataRepository) result).initializeAfterLoad(location);
-					if (result instanceof URLMetadataRepository)
-						((URLMetadataRepository) result).initializeAfterLoad(location);
-					if (Tracing.DEBUG_METADATA_PARSING) {
-						time += System.currentTimeMillis();
-						Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$ 
-					}
-					return result;
-				}
-			} finally {
-				safeClose(jarStream);
-				safeClose(inStream);
-			}
-		} catch (FileNotFoundException e) {
-			String msg = NLS.bind(Messages.io_failedRead, location);
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
-		} catch (IOException e) {
-			String msg = NLS.bind(Messages.io_failedRead, location);
-			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
-		} finally {
-			if (monitor != null)
-				monitor.done();
-		}
-		return null;
-	}
-
-	/**
-	 * Closes a stream, ignoring any secondary exceptions
-	 */
-	private void safeClose(InputStream stream) {
-		if (stream == null)
-			return;
-		try {
-			stream.close();
-		} catch (IOException e) {
-			//ignore
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
new file mode 100644
index 0000000..0ba8f6a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.repository.ant;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.metadata.repository.Messages;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+
+public class AbstractMDRTask extends Task {
+	/*
+	 * Return the provisioning agent. Throw an exception if it cannot be obtained.
+	 */
+	public static IProvisioningAgent getAgent() throws BuildException {
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new BuildException(Messages.no_provisioning_agent);
+		return agent;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
index a19d18a..96c1400 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
@@ -13,18 +13,15 @@ package org.eclipse.equinox.internal.p2.metadata.repository.ant;
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 
 /**
  * Ant task for adding a child repository to a composite metadata repository.
  */
-public class AddChildTask extends Task {
+public class AddChildTask extends AbstractMDRTask {
 
 	URI location; // location of the composite repository
 	URI child; // address of the child to add
@@ -34,7 +31,7 @@ public class AddChildTask extends Task {
 	 */
 	public void execute() {
 		validate();
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new BuildException("Unable to aquire metadata repository manager service.");
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
index b655825..10260fa 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
@@ -10,38 +10,34 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata.repository.ant;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.Map;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 
 /**
  * Ant task for creating a new composite metadata repository.
  */
-public class CreateCompositeMetadataRepositoryTask extends Task {
+public class CreateCompositeMetadataRepositoryTask extends AbstractMDRTask {
 
 	URI location; // desired location of the composite repository
 	String name = "Composite Metadata Repository";
 	boolean compressed = true; // compress by default
 	boolean failOnExists = false; // should we fail if one already exists?
-	Map properties = new HashMap();
+	Map<String, String> properties = new HashMap<String, String>();
 
 	/* (non-Javadoc)
 	 * @see org.apache.tools.ant.Task#execute()
 	 */
 	public void execute() {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new BuildException("Unable to aquire metadata repository manager service.");
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java
deleted file mode 100644
index 07ef39e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/MirrorApplicationTask.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.metadata.mirror.MirrorApplication;
-import org.osgi.framework.Bundle;
-
-/**
- * Ant task for running the metadata mirror application.
- */
-public class MirrorApplicationTask extends Task {
-
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private static final String ARG_DESTINATION = "-destination"; //$NON-NLS-1$
-	private static final String ARG_DESTINATION_NAME = "-destinationName"; //$NON-NLS-1$
-	private static final String ARG_SOURCE = "-source"; //$NON-NLS-1$
-	private static final String ARG_WRITE_MODE = "-writeMode"; //$NON-NLS-1$
-	URL source;
-	URL destination;
-	String destinationName;
-	String writeMode;
-
-	//TODO add transitive and roots attributed when implemented.
-
-	/*
-	 * Run the mirror application with the given arguments.
-	 */
-	private void runMirrorApplication(final String[] args) throws Exception {
-		new MirrorApplication().start(new IApplicationContext() {
-
-			public void applicationRunning() {
-				// nothing to do
-			}
-
-			public Map getArguments() {
-				Map arguments = new HashMap();
-				arguments.put(IApplicationContext.APPLICATION_ARGS, args);
-				return arguments;
-			}
-
-			public String getBrandingApplication() {
-				return null;
-			}
-
-			public Bundle getBrandingBundle() {
-				return null;
-			}
-
-			public String getBrandingDescription() {
-				return null;
-			}
-
-			public String getBrandingId() {
-				return null;
-			}
-
-			public String getBrandingName() {
-				return null;
-			}
-
-			public String getBrandingProperty(String key) {
-				return null;
-			}
-		});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() {
-		// create arguments
-		String[] args = new String[] { //
-		ARG_SOURCE, source.toExternalForm(), //
-				ARG_DESTINATION, destination.toExternalForm(), // 
-				ARG_WRITE_MODE, writeMode == null ? EMPTY_STRING : writeMode, //
-				destinationName == null ? EMPTY_STRING : ARG_DESTINATION_NAME, //
-				destinationName == null ? EMPTY_STRING : destinationName};
-
-		try {
-			runMirrorApplication(args);
-		} catch (Exception e) {
-			throw new BuildException("Error occurred while running metadata mirror application.", e);
-		}
-	}
-
-	/*
-	 * Set the source location.
-	 */
-	public void setSource(String value) throws MalformedURLException {
-		source = new URL(value);
-	}
-
-	/*
-	 * Set the destination location.
-	 */
-	public void setDestination(String value) throws MalformedURLException {
-		destination = new URL(value);
-	}
-
-	/*
-	 * Set the destination name.
-	 */
-	public void setDestinationName(String value) {
-		destinationName = value;
-	}
-
-	/*
-	 * Set the write mode for the application. (e.g. clean or append)
-	 */
-	public void setWriteMode(String value) {
-		writeMode = value;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
index 3e12f47..31f6f1c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
@@ -13,19 +13,16 @@ package org.eclipse.equinox.internal.p2.metadata.repository.ant;
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 
 /**
  * Ant task to remove a specific child repository (or all the children repositories) 
  * from a composite metadata repository.
  */
-public class RemoveChildTask extends Task {
+public class RemoveChildTask extends AbstractMDRTask {
 
 	URI location; // location of the composite repository
 	URI child; // address of the child to be removed
@@ -35,7 +32,7 @@ public class RemoveChildTask extends Task {
 	 * @see org.apache.tools.ant.Task#execute()
 	 */
 	public void execute() {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new BuildException("Unable to aquire metadata repository manager service.");
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.classpath
index 7cdeb73..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.project b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.project
index f697ae2..e81f675 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/.api_filters b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/.api_filters
new file mode 100644
index 0000000..d8f48e5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.equinox.p2.metadata" version="2">
+    <resource path="src/org/eclipse/equinox/p2/query/CompoundQueryable.java" type="org.eclipse.equinox.p2.query.CompoundQueryable">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="IndexProvider<T>"/>
+                <message_argument value="CompoundQueryable<T>"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
index ed5b63b..1ffc4aa 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Nov 05 17:01:21 EST 2007
+#Mon Dec 21 22:17:52 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -74,7 +74,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
@@ -88,7 +87,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -160,7 +159,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
index d2989ad..52afe4b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
@@ -1,54 +1,52 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.metadata;singleton:=true
+Bundle-Version: 2.0.1.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.MetadataActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
 Export-Package: org.eclipse.equinox.internal.p2.metadata;
-  x-friends:="org.eclipse.equinox.p2.metadata.generator,
-   org.eclipse.equinox.p2.metadata.repository,
-   org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.artifact.optimizers,
-   org.eclipse.equinox.p2.artifact.processors,
-   org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.publisher",
- org.eclipse.equinox.internal.provisional.p2.metadata;
   x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
    org.eclipse.equinox.p2.artifact.processors,
    org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.core,
    org.eclipse.equinox.p2.director,
    org.eclipse.equinox.p2.director.app,
-   org.eclipse.equinox.p2.directorywatcher,
    org.eclipse.equinox.p2.engine,
-   org.eclipse.equinox.p2.exemplarysetup,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.garbagecollector,
    org.eclipse.equinox.p2.installer,
-   org.eclipse.equinox.p2.jarprocessor,
-   org.eclipse.equinox.p2.metadata,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.metadata.repository,
+   org.eclipse.equinox.p2.operations,
    org.eclipse.equinox.p2.publisher,
-   org.eclipse.equinox.p2.reconciler.dropins,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.touchpoint.natives,
+   org.eclipse.equinox.p2.ql,
    org.eclipse.equinox.p2.ui,
-   org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.equinox.p2.updatechecker,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core",
- org.eclipse.equinox.internal.provisional.p2.metadata.query;
+   org.eclipse.equinox.p2.touchpoint.eclipse",
+ org.eclipse.equinox.internal.p2.metadata.expression;
+  x-friends:="org.eclipse.equinox.p2.artifact.repository,
+   org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.engine,
+   org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.ql",
+ org.eclipse.equinox.internal.p2.metadata.expression.parser;x-friends:="org.eclipse.equinox.p2.ql",
+ org.eclipse.equinox.internal.p2.metadata.index;
+  x-friends:="org.eclipse.equinox.p2.artifact.repository,
+   org.eclipse.equinox.p2.director,
+   org.eclipse.equinox.p2.engine,
+   org.eclipse.equinox.p2.director.app,
+   org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.engine,
+   org.eclipse.equinox.p2.metadata.repository,
+   org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.ql,
+   org.eclipse.equinox.p2.ui,
+   org.eclipse.equinox.p2.operations,
+   org.eclipse.equinox.p2.tests,
+   org.eclipse.equinox.p2.touchpoint.eclipse",
+ org.eclipse.equinox.internal.p2.metadata.query;
   x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
    org.eclipse.equinox.p2.artifact.processors,
    org.eclipse.equinox.p2.artifact.repository,
+   org.eclipse.equinox.p2.console,
    org.eclipse.equinox.p2.core,
    org.eclipse.equinox.p2.director,
    org.eclipse.equinox.p2.director.app,
@@ -62,7 +60,11 @@ Export-Package: org.eclipse.equinox.internal.p2.metadata;
    org.eclipse.equinox.p2.metadata,
    org.eclipse.equinox.p2.metadata.generator,
    org.eclipse.equinox.p2.metadata.repository,
+   org.eclipse.equinox.p2.operations,
+   org.eclipse.equinox.p2.publisher,
+   org.eclipse.equinox.p2.ql,
    org.eclipse.equinox.p2.reconciler.dropins,
+   org.eclipse.equinox.p2.repository.tools,
    org.eclipse.equinox.p2.touchpoint.eclipse,
    org.eclipse.equinox.p2.touchpoint.natives,
    org.eclipse.equinox.p2.ui,
@@ -72,17 +74,18 @@ Export-Package: org.eclipse.equinox.internal.p2.metadata;
    org.eclipse.equinox.p2.ui.sdk.scheduler,
    org.eclipse.equinox.p2.updatechecker,
    org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.console,
-   org.eclipse.equinox.p2.publisher,
-   org.eclipse.pde.ui,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.pde.core"
-Import-Package: org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.MetadataActivator
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
+   org.eclipse.pde.core,
+   org.eclipse.pde.ui",
+ org.eclipse.equinox.p2.metadata;version="2.0.0",
+ org.eclipse.equinox.p2.metadata.expression;version="2.0.0",
+ org.eclipse.equinox.p2.metadata.index;version="2.0.0",
+ org.eclipse.equinox.p2.query;version="2.0.0"
 Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.core
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)"
+Import-Package: org.eclipse.osgi.service.localization;version="1.0.0",
+ org.eclipse.osgi.util,
+ org.osgi.framework;version="1.3.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.metadata/build.properties
index a6b8330..0feab6a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/build.properties
@@ -13,5 +13,9 @@ output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
-src.includes = about.html
+               plugin.properties,\
+               OSGI-INF/
+src.includes = about.html,\
+               OSGI-INF/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.metadata/pom.xml
new file mode 100644
index 0000000..7e143b3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.metadata</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
index 8b76db4..c2021b2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
@@ -13,17 +13,22 @@ package org.eclipse.equinox.internal.p2.metadata;
 import java.util.ArrayList;
 import java.util.StringTokenizer;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
 
 /** 
  * The concrete type for representing IArtifactKey's.
  * <p>
  * See {link IArtifact for a description of the lifecycle of artifact keys) 
  */
-public class ArtifactKey implements IArtifactKey {
+public class ArtifactKey implements IArtifactKey, IMemberProvider {
 	private static final String SEPARATOR = ","; //$NON-NLS-1$
 
+	public static final String MEMBER_ID = "id"; //$NON-NLS-1$
+	public static final String MEMBER_CLASSIFIER = "classifier"; //$NON-NLS-1$
+	public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
+
 	private final String id;
 	private final String classifier;
 	private final Version version;
@@ -31,7 +36,7 @@ public class ArtifactKey implements IArtifactKey {
 	private static String[] getArrayFromList(String stringList, String separator) {
 		if (stringList == null || stringList.trim().length() == 0)
 			return new String[0];
-		ArrayList list = new ArrayList();
+		ArrayList<String> list = new ArrayList<String>();
 		boolean separatorSeen = true;
 		StringTokenizer tokens = new StringTokenizer(stringList, separator, true);
 		while (tokens.hasMoreTokens()) {
@@ -48,7 +53,7 @@ public class ArtifactKey implements IArtifactKey {
 		}
 		if (separatorSeen)
 			list.add(""); //$NON-NLS-1$
-		return (String[]) list.toArray(new String[list.size()]);
+		return list.toArray(new String[list.size()]);
 	}
 
 	public static IArtifactKey parse(String specification) {
@@ -79,6 +84,12 @@ public class ArtifactKey implements IArtifactKey {
 		this.version = version;
 	}
 
+	public ArtifactKey(IArtifactKey artifactKey) {
+		this.classifier = artifactKey.getClassifier();
+		this.id = artifactKey.getId();
+		this.version = artifactKey.getVersion();
+	}
+
 	public String getClassifier() {
 		return classifier;
 	}
@@ -116,4 +127,17 @@ public class ArtifactKey implements IArtifactKey {
 		return data.toString();
 	}
 
+	public Object getMember(String memberName) {
+		// It is OK to use identity comparisons here since
+		// a) All constant valued strings are always interned
+		// b) The Member constructor always interns the name
+		//
+		if (MEMBER_ID == memberName)
+			return id;
+		if (MEMBER_VERSION == memberName)
+			return version;
+		if (MEMBER_CLASSIFIER == memberName)
+			return classifier;
+		throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
new file mode 100644
index 0000000..0514284
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * The abstract BasicVersion class adds the methods necessary to to compare and serialize
+ * versions in version ranges. The class is not intended as public API.
+ */
+public abstract class BasicVersion extends Version {
+	private static final long serialVersionUID = -2983093417537485027L;
+
+	/**
+	 * Returns the OSGi major component of this version identifier.
+	 * 
+	 * @return The major component.
+	 * @throws UnsupportedOperationException if the first element in the
+	 * vector is not a number.
+	 * @see #isOSGiCompatible()
+	 */
+	public abstract int getMajor();
+
+	/**
+	 * Returns the OSGi micro component of this version identifier.
+	 * 
+	 * @return The micro component.
+	 * @throws UnsupportedOperationException if the third element in the
+	 * vector is not a number.
+	 * @see #isOSGiCompatible()
+	 */
+	public abstract int getMicro();
+
+	/**
+	 * Returns the OSGi minor component of this version identifier.
+	 * 
+	 * @return The minor component.
+	 * @throws UnsupportedOperationException if the second element in the
+	 * vector is not a number.
+	 * @see #isOSGiCompatible()
+	 */
+	public abstract int getMinor();
+
+	/**
+	 * Returns the OSGi qualifier component of this version identifier.
+	 * 
+	 * @return The qualifier component or <code>null</code> if not set.
+	 * @throws UnsupportedOperationException if the fourth element in the
+	 * vector is set to something other then a string.
+	 * @see #isOSGiCompatible()
+	 */
+	public abstract String getQualifier();
+
+	/**
+	 * Appends the original for this version onto the <code>sb</code> StringBuffer
+	 * if present.
+	 * @param sb The buffer that will receive the raw string format
+	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
+	 */
+	public abstract void originalToString(StringBuffer sb, boolean rangeSafe);
+
+	/**
+	 * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
+	 * @param sb The buffer that will receive the raw string format
+	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
+	 */
+	public abstract void rawToString(StringBuffer sb, boolean rangeSafe);
+
+	/**
+	 * This method is package protected since it violates the immutable
+	 * contract.
+	 * @return The raw vector. Must be treated as read-only
+	 */
+	abstract Comparable<?>[] getVector();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
index b29e5f3..b565788 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
@@ -10,9 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.ICopyright;
-
 import java.net.URI;
+import org.eclipse.equinox.p2.metadata.ICopyright;
 
 /**
  * The <code>Copyright</code> class represents a software copyright.  A copyright has 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
new file mode 100644
index 0000000..ef92ee0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
@@ -0,0 +1,45 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import org.eclipse.equinox.p2.metadata.*;
+
+/**
+ * A required capability represents some external constraint on an {@link IInstallableUnit}.
+ * Each capability represents something an {@link IInstallableUnit} needs that
+ * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
+ * entirely generic, and are intended to be capable of representing anything that
+ * an {@link IInstallableUnit} may need either at install time, or at runtime.
+ * <p>
+ * Capabilities are segmented into namespaces.  Anyone can introduce new 
+ * capability namespaces. Some well-known namespaces are introduced directly
+ * by the provisioning framework.
+ * 
+ * @see IInstallableUnit#NAMESPACE_IU_ID
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IRequiredCapability extends IRequirement {
+
+	//	public String getFilter();
+
+	public String getName();
+
+	public String getNamespace();
+
+	/**
+	 * Returns the range of versions that satisfy this required capability. Returns
+	 * an empty version range ({@link VersionRange#emptyRange} if any version
+	 * will satisfy the capability.
+	 * @return the range of versions that satisfy this required capability.
+	 */
+	public VersionRange getRange();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
new file mode 100644
index 0000000..99d7b75
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - rewrite for smaller memory footprint
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.*;
+
+/**
+ * A map that stores {@link IInstallableUnit} instances in a way that is efficient to query
+ */
+public class IUMap implements Cloneable {
+	/**
+	 * Iterator over all the {@link IInstallableUnit} instances in the map.
+	 */
+	public class MapIterator implements Iterator<IInstallableUnit> {
+		//iterator over the keys in UIMap
+		private final Iterator<Object> unitIterator;
+		private IInstallableUnit[] currentBucket;
+		private int bucketIndex = 0;
+		private IInstallableUnit nextElement = null;
+
+		MapIterator() {
+			super();
+			unitIterator = units.values().iterator();
+		}
+
+		public boolean hasNext() {
+			return positionNext();
+		}
+
+		public IInstallableUnit next() {
+			if (!positionNext())
+				throw new NoSuchElementException();
+
+			IInstallableUnit nxt = nextElement;
+			nextElement = null;
+			return nxt;
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+
+		private boolean positionNext() {
+			if (nextElement != null)
+				return true;
+
+			if (currentBucket != null) {
+				nextElement = currentBucket[bucketIndex];
+				if (++bucketIndex == currentBucket.length) {
+					currentBucket = null;
+					bucketIndex = -1;
+				}
+				return true;
+			}
+
+			if (!unitIterator.hasNext())
+				return false;
+
+			Object val = unitIterator.next();
+			if (val instanceof IInstallableUnit)
+				nextElement = (IInstallableUnit) val;
+			else {
+				currentBucket = (IInstallableUnit[]) val;
+				nextElement = currentBucket[0];
+				bucketIndex = 1;
+			}
+			return true;
+		}
+	}
+
+	/**
+	 * Map<String,Object> mapping IU id to either arrays of iu's or a single iu with that id.
+	 */
+	final Map<String, Object> units = new HashMap<String, Object>();
+
+	public IUMap() {
+		//
+	}
+
+	private IUMap(IUMap cloneSource) {
+		units.putAll(cloneSource.units);
+	}
+
+	public void add(IInstallableUnit unit) {
+		String key = unit.getId();
+		Object matching = units.get(key);
+		if (matching == null) {
+			units.put(key, unit);
+			return;
+		}
+
+		// We already had something at this key position. It must be
+		// preserved.
+		if (matching.getClass().isArray()) {
+			// Entry is an array. Add unique
+			IInstallableUnit[] iuArr = (IInstallableUnit[]) matching;
+			int idx = iuArr.length;
+			while (--idx >= 0)
+				if (iuArr[idx].equals(unit))
+					// This unit has already been added
+					return;
+
+			IInstallableUnit[] iuArrPlus = new IInstallableUnit[iuArr.length + 1];
+			System.arraycopy(iuArr, 0, iuArrPlus, 0, iuArr.length);
+			iuArrPlus[iuArr.length] = unit;
+			units.put(unit.getId(), iuArrPlus);
+		} else {
+			IInstallableUnit old = (IInstallableUnit) matching;
+			if (!old.equals(unit))
+				units.put(key, new IInstallableUnit[] {old, unit});
+		}
+	}
+
+	public void addAll(IInstallableUnit[] toAdd) {
+		for (int i = 0; i < toAdd.length; i++)
+			add(toAdd[i]);
+	}
+
+	public void addAll(Collection<IInstallableUnit> toAdd) {
+		for (IInstallableUnit unit : toAdd) {
+			add(unit);
+		}
+	}
+
+	public void clear() {
+		units.clear();
+	}
+
+	@Override
+	public IUMap clone() {
+		return new IUMap(this);
+	}
+
+	public Iterator<IInstallableUnit> iterator() {
+		return new MapIterator();
+	}
+
+	public boolean contains(IInstallableUnit unit) {
+		return !internalGet(unit.getId(), unit.getVersion()).isEmpty();
+	}
+
+	/**
+	 * Returns a collection of units that has the given <code>id</code>.
+	 * @param id The id of the desired units. Must not be <code>null</code>.
+	 * @return The units corresponding to the given <code>id</code>.
+	 */
+	public Collection<IInstallableUnit> getUnits(String id) {
+		Object bucket = units.get(id);
+		if (bucket == null)
+			return CollectionUtils.emptyList();
+		return bucket.getClass().isArray() ? CollectionUtils.unmodifiableList((IInstallableUnit[]) bucket) : Collections.<IInstallableUnit> singletonList((IInstallableUnit) bucket);
+	}
+
+	public IQueryResult<IInstallableUnit> get(String id) {
+		return internalGet(id, null);
+	}
+
+	private IQueryResult<IInstallableUnit> internalGet(String id, Version version) {
+		if (id == null) {
+			IQuery<IInstallableUnit> query = version == null ? QueryUtil.createIUAnyQuery() : QueryUtil.createIUQuery(null, version);
+			return query.perform(iterator());
+		}
+
+		Collection<IInstallableUnit> idUnits = getUnits(id);
+		if (idUnits.isEmpty())
+			return Collector.emptyCollector();
+		return version == null ? new CollectionResult<IInstallableUnit>(idUnits) : QueryUtil.createIUQuery(id, version).perform(idUnits.iterator());
+	}
+
+	public IInstallableUnit get(String id, Version version) {
+		IQueryResult<IInstallableUnit> result = internalGet(id, version);
+		return result.isEmpty() ? null : result.iterator().next();
+	}
+
+	public void remove(IInstallableUnit unit) {
+		String key = unit.getId();
+		Object matching = units.get(key);
+		if (matching == null)
+			return;
+
+		if (matching instanceof IInstallableUnit) {
+			if (matching.equals(unit))
+				units.remove(key);
+			return;
+		}
+
+		IInstallableUnit[] array = (IInstallableUnit[]) matching;
+		int idx = array.length;
+		while (--idx >= 0) {
+			if (unit.equals(array[idx])) {
+				if (array.length == 2) {
+					// We no longer need this array. Replace it with the
+					// entry that we keep.
+					units.put(key, idx == 0 ? array[1] : array[0]);
+					break;
+				}
+
+				// Shrink the array
+				IInstallableUnit[] newArray = new IInstallableUnit[array.length - 1];
+				if (idx > 0)
+					System.arraycopy(array, 0, newArray, 0, idx);
+				if (idx + 1 < array.length)
+					System.arraycopy(array, idx + 1, newArray, idx, array.length - (idx + 1));
+				units.put(key, newArray);
+				break;
+			}
+		}
+	}
+
+	public void removeAll(Collection<IInstallableUnit> toRemove) {
+		for (IInstallableUnit iu : toRemove)
+			remove(iu);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
index 7fec119..8d564e0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
@@ -11,68 +11,94 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import java.util.ArrayList;
-import java.util.Map;
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-
-public class InstallableUnit implements IInstallableUnit {
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+public class InstallableUnit implements IInstallableUnit, IMemberProvider {
+	@SuppressWarnings("serial")
+	private static final Map<IFilterExpression, IMatchExpression<IInstallableUnit>> filterCache = new LinkedHashMap<IFilterExpression, IMatchExpression<IInstallableUnit>>() {
+		public boolean removeEldestEntry(Map.Entry<IFilterExpression, IMatchExpression<IInstallableUnit>> expr) {
+			return size() > 64;
+		}
+	};
 
 	private static final OrderedProperties NO_PROPERTIES = new OrderedProperties();
 	private static final IProvidedCapability[] NO_PROVIDES = new IProvidedCapability[0];
-	private static final IRequiredCapability[] NO_REQUIRES = new IRequiredCapability[0];
+	private static final IRequirement[] NO_REQUIRES = new IRequirement[0];
 	private static final IArtifactKey[] NO_ARTIFACTS = new IArtifactKey[0];
 	private static final ITouchpointData[] NO_TOUCHPOINT_DATA = new ITouchpointData[0];
+	private static final ILicense[] NO_LICENSE = new ILicense[0];
+
+	private static final IExpression filterWrap;
+
+	public static final String MEMBER_PROVIDED_CAPABILITIES = "providedCapabilities"; //$NON-NLS-1$
+	public static final String MEMBER_ID = "id"; //$NON-NLS-1$
+	public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
+	public static final String MEMBER_PROPERTIES = "properties"; //$NON-NLS-1$
+	public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
+	public static final String MEMBER_ARTIFACTS = "artifacts"; //$NON-NLS-1$
+	public static final String MEMBER_REQUIREMENTS = "requirements"; //$NON-NLS-1$
+	public static final String MEMBER_LICENSES = "licenses"; //$NON-NLS-1$
+	public static final String MEMBER_COPYRIGHT = "copyright"; //$NON-NLS-1$
+	public static final String MEMBER_TOUCHPOINT_DATA = "touchpointData"; //$NON-NLS-1$
+	public static final String MEMBER_TOUCHPOINT_TYPE = "touchpointType"; //$NON-NLS-1$
+	public static final String MEMBER_UPDATE_DESCRIPTOR = "updateDescriptor"; //$NON-NLS-1$
+	public static final String MEMBER_SINGLETON = "singleton"; //$NON-NLS-1$
+
+	static {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		filterWrap = factory.matches(factory.member(factory.thisVariable(), MEMBER_PROPERTIES), factory.indexedParameter(0));
+	}
 
 	private IArtifactKey[] artifacts = NO_ARTIFACTS;
-	private String filter;
+	private IMatchExpression<IInstallableUnit> filter;
 
 	private String id;
 
 	private OrderedProperties properties;
 	private OrderedProperties localizedProperties;
 	IProvidedCapability[] providedCapabilities = NO_PROVIDES;
-	private IRequiredCapability[] requires = NO_REQUIRES;
-	private IRequiredCapability[] metaRequires = NO_REQUIRES;
+	private IRequirement[] requires = NO_REQUIRES;
+	private IRequirement[] metaRequires = NO_REQUIRES;
 
 	private boolean singleton;
 
-	private ArrayList touchpointData = null;
+	private ITouchpointData[] touchpointData = NO_TOUCHPOINT_DATA;
 
 	private ITouchpointType touchpointType;
 
-	private Version version;
+	private Version version = Version.emptyVersion;
 
 	private IUpdateDescriptor updateInfo;
-	private ILicense license;
+	private ILicense[] licenses = NO_LICENSE;
 	private ICopyright copyright;
+	public static final String MEMBER_TRANSLATED_PROPERTIES = "translatedProperties"; //$NON-NLS-1$
+	public static final String MEMBER_PROFILE_PROPERTIES = "profileProperties"; //$NON-NLS-1$
 
 	public InstallableUnit() {
 		super();
 	}
 
 	public void addTouchpointData(ITouchpointData newData) {
-		ensureTouchpointDataCapacity(1);
-		touchpointData.add(newData);
-	}
-
-	public int compareTo(Object toCompareTo) {
-		if (!(toCompareTo instanceof IInstallableUnit)) {
-			return -1;
+		int tl = touchpointData.length;
+		if (tl == 0)
+			touchpointData = new ITouchpointData[] {newData};
+		else {
+			ITouchpointData[] newDatas = new ITouchpointData[tl + 1];
+			System.arraycopy(touchpointData, 0, newDatas, 0, tl);
+			newDatas[tl] = newData;
+			touchpointData = newDatas;
 		}
-		IInstallableUnit other = (IInstallableUnit) toCompareTo;
-		if (getId().compareTo(other.getId()) == 0)
-			return (getVersion().compareTo(other.getVersion()));
-		return getId().compareTo(other.getId());
 	}
 
-	private void ensureTouchpointDataCapacity(int size) {
-		if (touchpointData != null) {
-			touchpointData.ensureCapacity(size);
-		} else {
-			touchpointData = new ArrayList(size);
-		}
+	public int compareTo(IInstallableUnit other) {
+		int cmp = getId().compareTo(other.getId());
+		if (cmp == 0)
+			cmp = getVersion().compareTo(other.getVersion());
+		return cmp;
 	}
 
 	public boolean equals(Object obj) {
@@ -96,16 +122,16 @@ public class InstallableUnit implements IInstallableUnit {
 		return true;
 	}
 
-	public IArtifactKey[] getArtifacts() {
-		return artifacts;
+	public Collection<IArtifactKey> getArtifacts() {
+		return CollectionUtils.unmodifiableList(artifacts);
 	}
 
-	public String getFilter() {
+	public IMatchExpression<IInstallableUnit> getFilter() {
 		return filter;
 	}
 
-	public IInstallableUnitFragment[] getFragments() {
-		return null;
+	public Collection<IInstallableUnitFragment> getFragments() {
+		return CollectionUtils.emptyList();
 	}
 
 	public String getId() {
@@ -118,7 +144,7 @@ public class InstallableUnit implements IInstallableUnit {
 	 * 
 	 * @return an <i>unmodifiable copy</i> of the IU properties.
 	 */
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		return OrderedProperties.unmodifiableProperties(properties());
 	}
 
@@ -136,18 +162,21 @@ public class InstallableUnit implements IInstallableUnit {
 		return properties().getProperty(key);
 	}
 
-	public IProvidedCapability[] getProvidedCapabilities() {
-		return providedCapabilities;
+	public Collection<IProvidedCapability> getProvidedCapabilities() {
+		return CollectionUtils.unmodifiableList(providedCapabilities);
+	}
+
+	public String getProperty(String key, String locale) {
+		return TranslationSupport.getInstance().getIUProperty(this, key, locale);
 	}
 
-	public IRequiredCapability[] getRequiredCapabilities() {
-		return requires;
+	public List<IRequirement> getRequirements() {
+		return CollectionUtils.unmodifiableList(requires);
 
 	}
 
-	public ITouchpointData[] getTouchpointData() {
-		return (touchpointData == null ? NO_TOUCHPOINT_DATA //
-				: (ITouchpointData[]) touchpointData.toArray(new ITouchpointData[touchpointData.size()]));
+	public Collection<ITouchpointData> getTouchpointData() {
+		return CollectionUtils.unmodifiableList(touchpointData);
 	}
 
 	public ITouchpointType getTouchpointType() {
@@ -166,10 +195,6 @@ public class InstallableUnit implements IInstallableUnit {
 		return result;
 	}
 
-	public boolean isFragment() {
-		return false;
-	}
-
 	public boolean isResolved() {
 		return false;
 	}
@@ -196,21 +221,41 @@ public class InstallableUnit implements IInstallableUnit {
 			providedCapabilities = newCapabilities;
 	}
 
-	public void setFilter(String filter) {
+	public void setFilter(IMatchExpression<IInstallableUnit> filter) {
 		this.filter = filter;
 	}
 
+	public void setFilter(String filter) {
+		setFilter(parseFilter(filter));
+	}
+
 	public void setId(String id) {
 		this.id = id;
 	}
 
+	public static IMatchExpression<IInstallableUnit> parseFilter(String filterStr) {
+		IFilterExpression filter = ExpressionUtil.parseLDAP(filterStr);
+		if (filter == null)
+			return null;
+
+		synchronized (filterCache) {
+			IMatchExpression<IInstallableUnit> matchExpr = filterCache.get(filter);
+			if (matchExpr != null)
+				return matchExpr;
+
+			matchExpr = ExpressionUtil.getFactory().<IInstallableUnit> matchExpression(filterWrap, filter);
+			filterCache.put(filter, matchExpr);
+			return matchExpr;
+		}
+	}
+
 	/*
 	 * Helper method to cache localized properties
 	 */
 	public String setLocalizedProperty(String key, String value) {
 		if (localizedProperties == null)
 			localizedProperties = new OrderedProperties();
-		return (String) localizedProperties.put(key, value);
+		return localizedProperties.put(key, value);
 	}
 
 	public String setProperty(String key, String value) {
@@ -221,12 +266,12 @@ public class InstallableUnit implements IInstallableUnit {
 		return (String) properties.setProperty(key, value);
 	}
 
-	public void setRequiredCapabilities(IRequiredCapability[] capabilities) {
+	public void setRequiredCapabilities(IRequirement[] capabilities) {
 		if (capabilities.length == 0) {
 			this.requires = NO_REQUIRES;
 		} else {
 			//copy array for safety
-			this.requires = (IRequiredCapability[]) capabilities.clone();
+			this.requires = capabilities.clone();
 		}
 	}
 
@@ -258,12 +303,16 @@ public class InstallableUnit implements IInstallableUnit {
 		this.updateInfo = updateInfo;
 	}
 
-	public void setLicense(ILicense license) {
-		this.license = license;
+	public void setLicenses(ILicense[] license) {
+		this.licenses = license == null ? NO_LICENSE : license;
 	}
 
-	public ILicense getLicense() {
-		return license;
+	public Collection<ILicense> getLicenses() {
+		return CollectionUtils.unmodifiableList(licenses);
+	}
+
+	public Collection<ILicense> getLicenses(String locale) {
+		return CollectionUtils.unmodifiableList(TranslationSupport.getInstance().getLicenses(this, locale));
 	}
 
 	public void setCopyright(ICopyright copyright) {
@@ -274,24 +323,75 @@ public class InstallableUnit implements IInstallableUnit {
 		return copyright;
 	}
 
-	public boolean satisfies(IRequiredCapability candidate) {
-		IProvidedCapability[] provides = getProvidedCapabilities();
-		for (int i = 0; i < provides.length; i++)
-			if (provides[i].satisfies(candidate))
-				return true;
-		return false;
+	public ICopyright getCopyright(String locale) {
+		return TranslationSupport.getInstance().getCopyright(this, locale);
 	}
 
-	public IRequiredCapability[] getMetaRequiredCapabilities() {
-		return metaRequires;
+	public boolean satisfies(IRequirement candidate) {
+		return candidate.isMatch(this);
 	}
 
-	public void setMetaRequiredCapabilities(IRequiredCapability[] metaReqs) {
+	public Collection<IRequirement> getMetaRequirements() {
+		return CollectionUtils.unmodifiableList(metaRequires);
+	}
+
+	public void setMetaRequiredCapabilities(IRequirement[] metaReqs) {
 		if (metaReqs.length == 0) {
 			this.metaRequires = NO_REQUIRES;
 		} else {
 			//copy array for safety
-			this.metaRequires = (IRequiredCapability[]) metaReqs.clone();
+			this.metaRequires = metaReqs.clone();
 		}
 	}
+
+	public Object getMember(String memberName) {
+		// It is OK to use identity comparisons here since
+		// a) All constant valued strings are always interned
+		// b) The Member constructor always interns the name
+		//
+		if (MEMBER_PROVIDED_CAPABILITIES == memberName)
+			return providedCapabilities;
+		if (MEMBER_ID == memberName)
+			return id;
+		if (MEMBER_VERSION == memberName)
+			return version;
+		if (MEMBER_PROPERTIES == memberName)
+			return properties;
+		if (MEMBER_FILTER == memberName)
+			return filter;
+		if (MEMBER_ARTIFACTS == memberName)
+			return artifacts;
+		if (MEMBER_REQUIREMENTS == memberName)
+			return requires;
+		if (MEMBER_LICENSES == memberName)
+			return licenses;
+		if (MEMBER_COPYRIGHT == memberName)
+			return copyright;
+		if (MEMBER_TOUCHPOINT_DATA == memberName)
+			return touchpointData;
+		if (MEMBER_TOUCHPOINT_TYPE == memberName)
+			return touchpointType;
+		if (MEMBER_UPDATE_DESCRIPTOR == memberName)
+			return updateInfo;
+		if (MEMBER_SINGLETON == memberName)
+			return Boolean.valueOf(singleton);
+		throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
+	}
+
+	public static IInstallableUnit contextIU(String ws, String os, String arch) {
+		InstallableUnit ctxIU = new InstallableUnit();
+		ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
+		ctxIU.setProperty("osgi.ws", ws); //$NON-NLS-1$
+		ctxIU.setProperty("osgi.os", os); //$NON-NLS-1$
+		ctxIU.setProperty("osgi.arch", arch); //$NON-NLS-1$
+		return ctxIU;
+	}
+
+	public static IInstallableUnit contextIU(Map<String, String> environment) {
+		InstallableUnit ctxIU = new InstallableUnit();
+		ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
+		for (Map.Entry<String, String> entry : environment.entrySet())
+			ctxIU.setProperty(entry.getKey(), entry.getValue());
+		return ctxIU;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
index 7709c9d..33e8bb4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
@@ -10,37 +10,29 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnitFragment;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
+import org.eclipse.equinox.p2.metadata.IRequirement;
 
 public class InstallableUnitFragment extends InstallableUnit implements IInstallableUnitFragment {
 
-	private IRequiredCapability[] hostRequirements;
+	private Collection<IRequirement> hostRequirements;
 
 	public InstallableUnitFragment() {
 		super();
 	}
 
-	public void setHost(IRequiredCapability[] hostRequirements) {
+	public void setHost(Collection<IRequirement> hostRequirements) {
 		if (hostRequirements == null)
 			return;
 		this.hostRequirements = hostRequirements;
-		addRequiredCapability(hostRequirements);
 	}
 
-	private void addRequiredCapability(IRequiredCapability[] toAdd) {
-		IRequiredCapability[] current = super.getRequiredCapabilities();
-		IRequiredCapability[] result = new IRequiredCapability[current.length + toAdd.length];
-		System.arraycopy(current, 0, result, 0, current.length);
-		System.arraycopy(toAdd, 0, result, current.length, toAdd.length);
-		setRequiredCapabilities(result);
-	}
-
-	public boolean isFragment() {
-		return true;
+	public Collection<IRequirement> getHost() {
+		return hostRequirements;
 	}
 
-	public IRequiredCapability[] getHost() {
-		return hostRequirements;
+	public Object getMember(String memberName) {
+		return "host".equals(memberName) ? hostRequirements : super.getMember(memberName); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
index 3101354..6b09791 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
@@ -8,45 +8,63 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.*;
 
 public class InstallableUnitPatch extends InstallableUnit implements IInstallableUnitPatch {
+	public static final String MEMBER_APPLICABILITY_SCOPE = "applicabilityScope"; //$NON-NLS-1$
+	public static final String MEMBER_LIFECYCLE = "lifeCycle"; //$NON-NLS-1$
+	public static final String MEMBER_REQUIREMENTS_CHANGE = "requirementsChange"; //$NON-NLS-1$
+
 	private IRequirementChange[] changes;
-	private IRequiredCapability lifeCycle;
-	private IRequiredCapability[][] scope;
-
-	private void addRequiredCapability(IRequiredCapability[] toAdd) {
-		IRequiredCapability[] current = super.getRequiredCapabilities();
-		IRequiredCapability[] result = new IRequiredCapability[current.length + toAdd.length];
-		System.arraycopy(current, 0, result, 0, current.length);
-		System.arraycopy(toAdd, 0, result, current.length, toAdd.length);
+	private IRequirement lifeCycle;
+	private IRequirement[][] scope;
+
+	private void addRequiredCapability(IRequirement[] toAdd) {
+		List<IRequirement> current = super.getRequirements();
+		int currSize = current.size();
+		IRequirement[] result = new IRequirement[currSize + toAdd.length];
+		for (int i = 0; i < currSize; ++i)
+			result[i] = current.get(i);
+		System.arraycopy(toAdd, 0, result, current.size(), toAdd.length);
 		setRequiredCapabilities(result);
 	}
 
-	public IRequiredCapability[][] getApplicabilityScope() {
+	public IRequirement[][] getApplicabilityScope() {
 		return scope;
 	}
 
-	public IRequiredCapability getLifeCycle() {
+	public IRequirement getLifeCycle() {
 		return lifeCycle;
 	}
 
-	public IRequirementChange[] getRequirementsChange() {
-		return changes;
+	public List<IRequirementChange> getRequirementsChange() {
+		return CollectionUtils.unmodifiableList(changes);
 	}
 
-	public void setApplicabilityScope(IRequiredCapability[][] applyTo) {
+	public void setApplicabilityScope(IRequirement[][] applyTo) {
 		scope = applyTo;
 	}
 
-	public void setLifeCycle(IRequiredCapability lifeCycle) {
+	public void setLifeCycle(IRequirement lifeCycle) {
 		if (lifeCycle == null)
 			return;
 		this.lifeCycle = lifeCycle;
-		addRequiredCapability(new IRequiredCapability[] {lifeCycle});
+		addRequiredCapability(new IRequirement[] {lifeCycle});
 	}
 
 	public void setRequirementsChange(IRequirementChange[] changes) {
 		this.changes = changes;
 	}
+
+	public Object getMember(String memberName) {
+		if (MEMBER_APPLICABILITY_SCOPE == memberName)
+			return scope;
+		if (MEMBER_LIFECYCLE == memberName)
+			return lifeCycle;
+		if (MEMBER_REQUIREMENTS_CHANGE == memberName)
+			return changes;
+		return super.getMember(memberName);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
index b89285f..38c62c1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
@@ -11,13 +11,12 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.net.URI;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import org.eclipse.equinox.p2.metadata.ILicense;
 
 /**
  * The <code>License</code> class represents a software license.  A license has required body text
@@ -39,7 +38,7 @@ public class License implements ILicense {
 	/**
 	 * The <code>digest</code> is the cached message digest of the normalized body
 	 */
-	private BigInteger digest;
+	private String digest;
 
 	/**
 	 * Creates a new license object which is identified by users using the <code>body</code> field.
@@ -50,11 +49,12 @@ public class License implements ILicense {
 	 * @param body the license body, cannot be <code>null</code>
 	 * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
 	 */
-	public License(URI location, String body) {
+	public License(URI location, String body, String uuid) {
 		if (body == null)
 			throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
 		this.body = body;
 		this.location = location;
+		this.digest = uuid;
 	}
 
 	/**
@@ -79,9 +79,10 @@ public class License implements ILicense {
 	 * version of the license where all whitespace has been reduced to one space.
 	 * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
 	 */
-	public synchronized BigInteger getDigest() {
+	public synchronized String getUUID() {
 		if (digest == null)
-			digest = calculateLicenseDigest();
+			digest = calculateLicenseDigest().toString(16);
+
 		return digest;
 	}
 
@@ -95,7 +96,7 @@ public class License implements ILicense {
 			return false;
 		if (obj instanceof ILicense) {
 			ILicense other = (ILicense) obj;
-			if (other.getDigest().equals(getDigest()))
+			if (other.getUUID().equals(getUUID()))
 				return true;
 		}
 		return false;
@@ -105,7 +106,7 @@ public class License implements ILicense {
 	 * @see java.lang.Object#hashCode()
 	 */
 	public int hashCode() {
-		return getDigest().hashCode();
+		return getUUID().hashCode();
 	}
 
 	private BigInteger calculateLicenseDigest() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java
new file mode 100644
index 0000000..654d4c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TODO Shouldn't be a public class in an API package.
+ */
+public class Messages extends NLS {
+
+	public static String _0_is_not_a_valid_qualifier_in_osgi_1;
+
+	public static String array_can_not_be_empty;
+
+	public static String array_can_not_have_character_group;
+
+	public static String auto_can_not_have_pad_value;
+
+	public static String cannot_combine_ignore_with_other_instruction;
+
+	public static String cannot_combine_range_upper_bound_with_pad_value;
+
+	public static String character_group_defined_more_then_once;
+
+	public static String colon_expected_before_original_version_0;
+
+	public static String default_defined_more_then_once;
+
+	public static String delimiter_can_not_be_ignored;
+
+	public static String delimiter_can_not_have_default_value;
+
+	public static String delimiter_can_not_have_pad_value;
+
+	public static String delimiter_can_not_have_range;
+
+	public static String EOS_after_escape;
+
+	public static String expected_orignal_after_colon_0;
+
+	public static String expected_orignal_after_slash_0;
+
+	public static String expected_slash_after_raw_vector_0;
+
+	public static String filter_trailing_characters;
+
+	public static String filter_missing_leftparen;
+
+	public static String filter_missing_rightparen;
+
+	public static String filter_invalid_operator;
+
+	public static String filter_missing_attr;
+
+	public static String filter_invalid_value;
+
+	public static String filter_missing_value;
+
+	public static String filter_premature_end;
+
+	public static String format_0_unable_to_parse_1;
+
+	public static String format_0_unable_to_parse_empty_version;
+
+	public static String format_is_empty;
+
+	public static String format_must_be_delimited_by_colon_0;
+
+	public static String group_can_not_be_empty;
+
+	public static String ignore_defined_more_then_once;
+
+	public static String illegal_character_encountered_ascii_0;
+
+	public static String missing_comma_in_range_0;
+
+	public static String negative_character_range;
+
+	public static String neither_raw_vector_nor_format_specified_0;
+
+	public static String number_can_not_have_pad_value;
+
+	public static String only_format_specified_0;
+
+	public static String only_max_and_empty_string_defaults_can_have_translations;
+
+	public static String original_must_start_with_colon_0;
+
+	public static String original_stated_but_missing_0;
+
+	public static String pad_defined_more_then_once;
+
+	public static String performing_subquery;
+
+	public static String premature_end_of_format;
+
+	public static String premature_end_of_format_expected_0;
+
+	public static String premature_EOS_0;
+
+	public static String range_boundaries_0_and_1_cannot_have_different_formats;
+
+	public static String range_defined_more_then_once;
+
+	public static String range_max_cannot_be_less_then_range_min;
+
+	public static String range_max_cannot_be_zero;
+
+	public static String range_min_0_is_not_less_then_range_max_1;
+
+	public static String raw_and_original_must_use_same_range_inclusion_0;
+
+	public static String raw_element_can_not_have_pad_value;
+
+	public static String raw_element_expected_0;
+
+	public static String string_can_not_have_pad_value;
+
+	public static String syntax_error_in_version_format_0_1_2;
+
+	public static String syntax_error_in_version_format_0_1_found_2_expected_3;
+
+	public static String unbalanced_format_parenthesis;
+
+	public static String no_expression_factory;
+
+	public static String no_expression_parser;
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.messages"; //$NON-NLS-1$
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		// Prevent instance creation
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
index 40881fc..94677c6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
@@ -15,18 +15,22 @@ import org.osgi.framework.BundleContext;
 
 public class MetadataActivator implements BundleActivator {
 	public static final String PI_METADATA = "org.eclipse.equinox.p2.metadata"; //$NON-NLS-1$
-	public static BundleContext context;
+
+	public static MetadataActivator instance;
+
+	private BundleContext context;
 
 	public static BundleContext getContext() {
-		return context;
+		MetadataActivator activator = instance;
+		return activator == null ? null : activator.context;
 	}
 
 	public void start(BundleContext aContext) throws Exception {
-		MetadataActivator.context = aContext;
+		context = aContext;
+		instance = this;
 	}
 
 	public void stop(BundleContext aContext) throws Exception {
-		MetadataActivator.context = null;
+		instance = null;
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
new file mode 100644
index 0000000..5704d4d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
@@ -0,0 +1,226 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.util.List;
+import org.eclipse.equinox.p2.metadata.IVersionFormat;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @Immutable
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class OSGiVersion extends BasicVersion {
+
+	private static final long serialVersionUID = -4530178927569560877L;
+
+	private static final boolean[] allowedOSGiChars;
+
+	private final int major;
+
+	private final int minor;
+
+	private final int micro;
+
+	private final Comparable<?> qualifier;
+
+	static {
+		allowedOSGiChars = new boolean[128];
+		for (int c = '0'; c <= '9'; ++c)
+			allowedOSGiChars[c] = true;
+		for (int c = 'A'; c <= 'Z'; ++c)
+			allowedOSGiChars[c] = true;
+		for (int c = 'a'; c <= 'z'; ++c)
+			allowedOSGiChars[c] = true;
+		allowedOSGiChars['_'] = true;
+		allowedOSGiChars['-'] = true;
+	}
+
+	public static boolean isValidOSGiQualifier(Comparable<?> e) {
+		if (e == VersionVector.MAXS_VALUE)
+			return true;
+
+		if (!(e instanceof String))
+			return false;
+
+		String s = (String) e;
+		int idx = s.length();
+		boolean[] allowed = allowedOSGiChars;
+		while (--idx >= 0) {
+			int c = s.charAt(idx);
+			if (c < '-' || c > 'z' || !allowed[c])
+				return false;
+		}
+		return true;
+	}
+
+	static BasicVersion fromVector(List<Comparable<?>> vector) {
+		int vtop = vector.size() - 1;
+		Comparable<?> pad = vector.get(vtop);
+		if (vtop != 4) {
+			if (vtop == 0) {
+				if (pad == null)
+					return (BasicVersion) emptyVersion;
+				if (pad == VersionVector.MAX_VALUE)
+					return (BasicVersion) MAX_VERSION;
+			}
+			throw new IllegalArgumentException();
+		}
+		int major = ((Integer) vector.get(0)).intValue();
+		int minor = ((Integer) vector.get(1)).intValue();
+		int micro = ((Integer) vector.get(2)).intValue();
+		Comparable<?> qualifier = vector.get(3);
+		return (major == 0 && minor == 0 && micro == 0 && qualifier == VersionVector.MINS_VALUE) ? (BasicVersion) emptyVersion : new OSGiVersion(major, minor, micro, qualifier);
+	}
+
+	public OSGiVersion(int major, int minor, int micro, Comparable<? extends Object> qualifier) {
+		this.major = major;
+		this.minor = minor;
+		this.micro = micro;
+		if (!isValidOSGiQualifier(qualifier))
+			throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_valid_qualifier_in_osgi_1, "qualifier", this)); //$NON-NLS-1$
+		//intern the qualifier string to avoid duplication
+		if (qualifier instanceof String)
+			qualifier = ((String) qualifier).intern();
+		this.qualifier = qualifier;
+	}
+
+	public int compareTo(Version v) {
+		int result;
+		if (!(v instanceof OSGiVersion)) {
+			BasicVersion ov = (BasicVersion) v;
+			result = VersionVector.compare(getVector(), null, ov.getVector(), ov.getPad());
+		} else {
+			OSGiVersion ov = (OSGiVersion) v;
+			result = major - ov.major;
+			if (result == 0) {
+				result = minor - ov.minor;
+				if (result == 0) {
+					result = micro - ov.micro;
+					if (result == 0)
+						result = VersionVector.compareSegments(qualifier, ov.qualifier);
+				}
+			}
+		}
+		return result;
+	}
+
+	public boolean equals(Object object) {
+		if (object == this)
+			return true;
+
+		if (!(object instanceof OSGiVersion)) {
+			if (object instanceof BasicVersion) {
+				BasicVersion ov = (BasicVersion) object;
+				return VersionVector.equals(getVector(), null, ov.getVector(), ov.getPad());
+			}
+			return false;
+		}
+
+		OSGiVersion other = (OSGiVersion) object;
+		return micro == other.micro && minor == other.minor && major == other.major && qualifier.equals(other.qualifier);
+	}
+
+	public IVersionFormat getFormat() {
+		return VersionFormat.OSGI_FORMAT;
+	}
+
+	public int getMajor() {
+		return major;
+	}
+
+	public int getMicro() {
+		return micro;
+	}
+
+	public int getMinor() {
+		return minor;
+	}
+
+	public String getOriginal() {
+		return toString();
+	}
+
+	public String getQualifier() {
+		return qualifier == VersionVector.MAXS_VALUE ? IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION : (String) qualifier;
+	}
+
+	public int hashCode() {
+		return (major << 24) + (minor << 16) + (micro << 8) + qualifier.hashCode();
+	}
+
+	public boolean isOSGiCompatible() {
+		return true;
+	}
+
+	public void originalToString(StringBuffer sb, boolean rangeSafe) {
+		toString(sb);
+	}
+
+	public void rawToString(StringBuffer sb, boolean rangeSafe) {
+		sb.append(major);
+		sb.append('.');
+		sb.append(minor);
+		sb.append('.');
+		sb.append(micro);
+		sb.append('.');
+		sb.append('\'');
+		sb.append(qualifier);
+		sb.append('\'');
+	}
+
+	public void toString(StringBuffer sb) {
+		sb.append(major);
+		sb.append('.');
+		sb.append(minor);
+		sb.append('.');
+		sb.append(micro);
+		if (qualifier != VersionVector.MINS_VALUE) {
+			sb.append('.');
+			sb.append(getQualifier());
+		}
+	}
+
+	public Comparable<?>[] getVector() {
+		return new Comparable[] {VersionParser.valueOf(major), VersionParser.valueOf(minor), VersionParser.valueOf(micro), qualifier};
+	}
+
+	public Comparable<?> getPad() {
+		return null;
+	}
+
+	public Comparable<?> getSegment(int index) {
+		switch (index) {
+			case 0 :
+				return VersionParser.valueOf(major);
+			case 1 :
+				return VersionParser.valueOf(minor);
+			case 2 :
+				return VersionParser.valueOf(micro);
+			case 3 :
+				return qualifier;
+		}
+		throw new ArrayIndexOutOfBoundsException(index); // Not in the imaginary vector array
+	}
+
+	public int getSegmentCount() {
+		return 4;
+	}
+
+	private Object readResolve() {
+		OSGiVersion v = this;
+		// Preserve the empty string singleton.
+		if (qualifier.equals(VersionVector.MINS_VALUE))
+			v = new OSGiVersion(major, minor, micro, VersionVector.MINS_VALUE);
+		return v;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
new file mode 100644
index 0000000..48ca355
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.equinox.p2.metadata.IVersionFormat;
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * <p>The Generic Omni Version is composed of a vector of Comparable objects and a pad value. The pad
+ * might be <code>null</code>. The vector can contain integers, strings, {@link VersionVector}
+ * instances, or one of the special objects {@link VersionVector#MAX_VALUE MAX_VALUE},
+ * {@link VersionVector#MAXS_VALUE MAXS_VALUE}, or {@link VersionVector#MIN_VALUE MIN_VALUE}.</p>
+ *
+ * <p>When two versions are compared, they are always considered padded to infinity by their
+ * pad value or by {@link VersionVector#MIN_VALUE MIN_VALUE} in case the pad value is
+ * <code>null</code>. The comparison is type sensitive so that:</p><pre>
+ * MAX_VALUE > Integer > VersionVector > MAXS_VALUE > String > MIN_VALUE<br/>
+ * </pre>
+ *
+ * @Immutable
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class OmniVersion extends BasicVersion {
+	private static final long serialVersionUID = 1996212688810048879L;
+
+	private static OmniVersion minimumVersion;
+
+	private static OmniVersion maximumVersion;
+
+	private static final Comparable<?>[] emptyVector = new Comparable<?>[0];
+
+	private final Comparable<?>[] vector;
+
+	private final Comparable<?> padValue;
+
+	/**
+	 * The optional format
+	 */
+	private final IVersionFormat format;
+
+	/**
+	 * The optional original string
+	 */
+	private final String original;
+
+	static BasicVersion fromVector(List<Comparable<?>> vector, IVersionFormat format, String original) {
+		int vtop = vector.size() - 1;
+		Comparable<?> padValue = vector.get(vtop);
+		if (vtop == 0) {
+			if (padValue == null)
+				return (BasicVersion) emptyVersion;
+			if (padValue == VersionVector.MAX_VALUE)
+				return (BasicVersion) MAX_VERSION;
+		}
+		if (vtop == 3 && padValue == null && vector.get(0) == VersionParser.ZERO_INT && vector.get(1) == VersionParser.ZERO_INT && vector.get(2) == VersionParser.ZERO_INT)
+			return (BasicVersion) emptyVersion;
+
+		return new OmniVersion(vector, format, original);
+	}
+
+	public static Version createMinVersion() {
+		if (minimumVersion == null)
+			minimumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(null), null, null);
+		return minimumVersion;
+	}
+
+	public static Version createMaxVersion() {
+		if (maximumVersion == null)
+			maximumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(VersionVector.MAX_VALUE), null, null);
+		return maximumVersion;
+	}
+
+	private OmniVersion(List<Comparable<?>> vector, IVersionFormat format, String original) {
+		int vtop = vector.size() - 1;
+		if (vtop > 0) {
+			Comparable<?>[] v = new Comparable<?>[vtop];
+			for (int idx = 0; idx < vtop; ++idx)
+				v[idx] = vector.get(idx);
+			this.vector = v;
+		} else
+			this.vector = emptyVector;
+		this.padValue = vector.get(vtop);
+		this.format = format;
+		this.original = original;
+	}
+
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+
+		if (!(o instanceof BasicVersion))
+			return false;
+
+		BasicVersion ov = (BasicVersion) o;
+		return VersionVector.equals(vector, padValue, ov.getVector(), ov.getPad());
+	}
+
+	public IVersionFormat getFormat() {
+		return format;
+	}
+
+	public int getMajor() {
+		return getIntElement(0);
+	}
+
+	public int getMicro() {
+		return getIntElement(2);
+	}
+
+	public int getMinor() {
+		return getIntElement(1);
+	}
+
+	public String getOriginal() {
+		return original;
+	}
+
+	public String getQualifier() {
+		if (vector.length == 3)
+			return VersionVector.MINS_VALUE;
+
+		if (vector.length != 4)
+			throw new UnsupportedOperationException();
+
+		Comparable<?> qualifier = vector[3];
+		if (qualifier == VersionVector.MAXS_VALUE)
+			return IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION;
+		if (!(qualifier instanceof String))
+			throw new UnsupportedOperationException();
+		return (String) qualifier;
+	}
+
+	public int hashCode() {
+		return VersionVector.hashCode(vector, padValue);
+	}
+
+	/**
+	 * Checks if this version is in compliance with the OSGi version spec.
+	 * @return A flag indicating whether the version is OSGi compatible or not.
+	 */
+	public boolean isOSGiCompatible() {
+		if (vector.length < 3 || vector.length > 4)
+			return (this == emptyVersion || this == MAX_VERSION);
+
+		if (getPad() != null)
+			return false;
+
+		for (int i = 0; i < 3; ++i) {
+			Object e = vector[i];
+			if (!(e instanceof Integer && ((Integer) e).intValue() >= 0))
+				return false;
+		}
+
+		if (vector.length == 3)
+			return true; // No qualifier. Still compatible
+		return OSGiVersion.isValidOSGiQualifier(vector[3]);
+	}
+
+	/**
+	 * Appends the original for this version onto the <code>sb</code> StringBuffer
+	 * if present.
+	 * @param sb The buffer that will receive the raw string format
+	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
+	 */
+	public void originalToString(StringBuffer sb, boolean rangeSafe) {
+		if (original != null) {
+			if (rangeSafe) {
+				// Escape all range delimiters while appending
+				String s = original;
+				int end = s.length();
+				for (int idx = 0; idx < end; ++idx) {
+					char c = s.charAt(idx);
+					if (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' ')
+						sb.append('\\');
+					sb.append(c);
+				}
+			} else
+				sb.append(original);
+		}
+	}
+
+	/**
+	 * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
+	 * @param sb The buffer that will receive the raw string format
+	 * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
+	 */
+	public void rawToString(StringBuffer sb, boolean rangeSafe) {
+		VersionVector.toString(sb, vector, padValue, rangeSafe);
+	}
+
+	/**
+	 * Appends the string representation of this version onto the
+	 * <code>sb</code> StringBuffer.
+	 * @param sb The buffer that will receive the version string
+	 */
+	public void toString(StringBuffer sb) {
+		if (this == emptyVersion)
+			sb.append("0.0.0"); //$NON-NLS-1$
+		else {
+			sb.append(RAW_PREFIX);
+			VersionVector.toString(sb, vector, padValue, false);
+			if (format != null || original != null) {
+				sb.append('/');
+				if (format != null)
+					format.toString(sb);
+				if (original != null) {
+					sb.append(':');
+					originalToString(sb, false);
+				}
+			}
+		}
+	}
+
+	private int getIntElement(int i) {
+		if (!(vector.length > i && vector[i] instanceof Integer))
+			throw new UnsupportedOperationException();
+		return ((Integer) vector[i]).intValue();
+	}
+
+	// Preserve singletons during deserialization
+	private Object readResolve() {
+		Version v = this;
+		if (equals(MAX_VERSION))
+			v = MAX_VERSION;
+		else if (equals(emptyVersion))
+			v = emptyVersion;
+		return v;
+	}
+
+	public Comparable<?> getPad() {
+		return padValue;
+	}
+
+	public Comparable<?> getSegment(int index) {
+		return vector[index];
+	}
+
+	public int getSegmentCount() {
+		return vector.length;
+	}
+
+	Comparable<?>[] getVector() {
+		return vector;
+	}
+
+	public int compareTo(Version v) {
+		BasicVersion ov = (BasicVersion) v;
+		return VersionVector.compare(vector, padValue, ov.getVector(), ov.getPad());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
index 4c8b307..eec34bf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
@@ -12,14 +12,18 @@
 package org.eclipse.equinox.internal.p2.metadata;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
 
 /**
  * Describes a capability as exposed or required by an installable unit
  */
-public class ProvidedCapability implements IProvidedCapability {
+public class ProvidedCapability implements IProvidedCapability, IMemberProvider {
+	public static final String MEMBER_NAME = "name"; //$NON-NLS-1$
+	public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
+	public static final String MEMBER_NAMESPACE = "namespace"; //$NON-NLS-1$
+
 	private final String name;
 	private final String namespace;
 	private final Version version;
@@ -61,21 +65,21 @@ public class ProvidedCapability implements IProvidedCapability {
 		return namespace.hashCode() * name.hashCode() * version.hashCode();
 	}
 
-	/**
-	 * Returns whether this provided capability satisfies the given required capability.
-	 * @return <code>true</code> if this capability satisfies the given required
-	 * capability, and <code>false</code> otherwise.
-	 */
-	public boolean satisfies(IRequiredCapability candidate) {
-		if (getName() == null || !getName().equals(candidate.getName()))
-			return false;
-		if (getNamespace() == null || !getNamespace().equals(candidate.getNamespace()))
-			return false;
-		return candidate.getRange().isIncluded(version);
-	}
-
 	public String toString() {
 		return namespace + '/' + name + '/' + version;
 	}
 
+	public Object getMember(String memberName) {
+		// It is OK to use identity comparisons here since
+		// a) All constant valued strings are always interned
+		// b) The Member constructor always interns the name
+		//
+		if (MEMBER_NAME == memberName)
+			return name;
+		if (MEMBER_VERSION == memberName)
+			return version;
+		if (MEMBER_NAMESPACE == memberName)
+			return namespace;
+		throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
index a4df514..9829dc7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
@@ -12,9 +12,8 @@
 package org.eclipse.equinox.internal.p2.metadata;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
 
 /**
  * A required capability represents some external constraint on an {@link IInstallableUnit}.
@@ -29,73 +28,130 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
  * 
  * @see IInstallableUnit#NAMESPACE_IU_ID
  */
-public class RequiredCapability implements IRequiredCapability {
-	private static final String[] NO_SELECTORS = new String[0];
-
-	private String filter;
-	private final boolean multiple;
-	private final String name;//never null
-	private final String namespace;//never null
-	private boolean optional;
-	private boolean greedy = true;
-	private final VersionRange range;//never null
-	private String[] selectors = NO_SELECTORS;//never null
+public class RequiredCapability implements IRequiredCapability, IMemberProvider {
+	private final IMatchExpression<IInstallableUnit> filter;
+	private final IMatchExpression<IInstallableUnit> matchExpression;
+
+	public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
+	public static final String MEMBER_MIN = "min"; //$NON-NLS-1$
+	public static final String MEMBER_MAX = "max"; //$NON-NLS-1$
+	public static final String MEMBER_GREEDY = "greedy"; //$NON-NLS-1$
+	public static final String MEMBER_MATCH = "match"; //$NON-NLS-1$
+
+	private final boolean greedy;
+	private final int min;
+	private final int max;
+	private String description;
+
+	private static final IExpression allVersionsExpression;
+	private static final IExpression range_II_Expression;
+	private static final IExpression range_IN_Expression;
+	private static final IExpression range_NI_Expression;
+	private static final IExpression range_NN_Expression;
+	private static final IExpression strictVersionExpression;
+	private static final IExpression openEndedExpression;
+	private static final IExpression openEndedNonInclusiveExpression;
+
+	static {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		IExpression xVar = factory.variable("x"); //$NON-NLS-1$
+		IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
+		IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
+
+		IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
+
+		IExpression versionCmpLow = factory.indexedParameter(2);
+		IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
+		IExpression versionGt = factory.greater(versionMember, versionCmpLow);
+		IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
+
+		IExpression versionCmpHigh = factory.indexedParameter(3);
+		IExpression versionLt = factory.less(versionMember, versionCmpHigh);
+		IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
+
+		IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
+		allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
+		strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
+		openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
+		openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
+		range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
+		range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
+		range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
+		range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
+	}
 
 	/**
 	 * TODO replace booleans with int options flag.
 	 */
 	public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
-		Assert.isNotNull(namespace);
-		Assert.isNotNull(name);
-		this.namespace = namespace;
-		this.name = name;
-		this.range = range == null ? VersionRange.emptyRange : range;
-		this.optional = optional;
+		this(namespace, name, range, filter, optional, multiple, true);
+	}
+
+	public RequiredCapability(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
+		this.matchExpression = requirement;
 		this.filter = filter;
-		this.multiple = multiple;
+		this.min = min;
+		this.max = max;
+		this.greedy = greedy;
+		this.description = description;
 	}
 
 	public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
-		this(namespace, name, range, filter, optional, multiple);
+		this(namespace, name, range, filter == null ? (IMatchExpression<IInstallableUnit>) null : InstallableUnit.parseFilter(filter), optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, greedy, null);
+	}
+
+	public RequiredCapability(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
+		Assert.isNotNull(namespace);
+		Assert.isNotNull(name);
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		if (range == null || range.equals(VersionRange.emptyRange)) {
+			matchExpression = factory.matchExpression(allVersionsExpression, name, namespace);
+		} else {
+			if (range.getMinimum().equals(range.getMaximum())) {
+				// Explicit version appointed
+				matchExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
+			} else {
+				if (range.getMaximum().equals(Version.MAX_VERSION)) {
+					// Open ended
+					matchExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
+				} else {
+					matchExpression = factory.matchExpression(//
+							range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
+									: (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
+							name, namespace, range.getMinimum(), range.getMaximum());
+				}
+			}
+		}
+		this.min = min;
+		this.max = max;
 		this.greedy = greedy;
+		this.filter = filter;
+		this.description = description;
 	}
 
 	public boolean equals(Object obj) {
 		if (this == obj)
 			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof IRequiredCapability))
+
+		if (!(obj instanceof IRequirement))
 			return false;
-		final IRequiredCapability other = (IRequiredCapability) obj;
+
+		IRequirement other = (IRequirement) obj;
 		if (filter == null) {
 			if (other.getFilter() != null)
 				return false;
 		} else if (!filter.equals(other.getFilter()))
 			return false;
-		if (multiple != other.isMultiple())
-			return false;
-		if (!name.equals(other.getName()))
-			return false;
-		if (!namespace.equals(other.getNamespace()))
-			return false;
-		if (optional != other.isOptional())
-			return false;
-		if (!range.equals(other.getRange()))
-			return false;
-		return true;
-	}
 
-	public String getFilter() {
-		return filter;
+		return min == other.getMin() && max == other.getMax() && greedy == other.isGreedy() && matchExpression.equals(other.getMatches());
 	}
 
 	public String getName() {
-		return name;
+		return (String) matchExpression.getParameters()[0];
 	}
 
 	public String getNamespace() {
-		return namespace;
+		return (String) matchExpression.getParameters()[1];
 	}
 
 	/**
@@ -105,62 +161,25 @@ public class RequiredCapability implements IRequiredCapability {
 	 * @return the range of versions that satisfy this required capability.
 	 */
 	public VersionRange getRange() {
-		return range;
-	}
-
-	/**
-	 * Returns the properties to use for evaluating required capability filters 
-	 * downstream from this capability. For example, if the selector "doc"
-	 * is provided, then a downstream InstallableUnit with a required capability
-	 * filtered with "doc=true" will be included.
-	 */
-	public String[] getSelectors() {
-		return selectors;
+		return extractRange(matchExpression);
 	}
 
 	public int hashCode() {
 		final int prime = 31;
 		int result = 1;
 		result = prime * result + ((filter == null) ? 0 : filter.hashCode());
-		result = prime * result + (multiple ? 1231 : 1237);
-		result = prime * result + name.hashCode();
-		result = prime * result + namespace.hashCode();
-		result = prime * result + (optional ? 1231 : 1237);
-		result = prime * result + range.hashCode();
+		result = prime * result + matchExpression.hashCode();
 		return result;
 	}
 
-	public boolean isMultiple() {
-		return multiple;
-	}
-
-	public boolean isOptional() {
-		return optional;
-	}
-
-	/**
-	 * TODO This object shouldn't be mutable since it makes equality unstable, and
-	 * introduces lifecycle issues (how are the changes persisted, etc)
-	 */
-	public void setFilter(String filter) {
-		this.filter = filter;
-	}
-
-	/**
-	 * TODO This object shouldn't be mutable since it makes equality unstable, and
-	 * introduces lifecycle issues (how are the changes persisted, etc)
-	 */
-	public void setSelectors(String[] selectors) {
-		this.selectors = selectors;
-	}
-
 	public boolean isGreedy() {
 		return greedy;
 	}
 
 	public String toString() {
 		StringBuffer result = new StringBuffer();
-
+		if (matchExpression.getParameters().length == 0)
+			return matchExpression.toString();
 		if (IInstallableUnit.NAMESPACE_IU_ID.equals(getNamespace())) {
 			//print nothing for an IU id dependency because this is the default (most common) case
 			result.append(""); //$NON-NLS-1$
@@ -175,6 +194,7 @@ public class RequiredCapability implements IRequiredCapability {
 			result.append(' ');
 		result.append(getName());
 		result.append(' ');
+		VersionRange range = getRange();
 		//for an exact version match, print a simpler expression
 		if (range.getMinimum().equals(range.getMaximum()))
 			result.append('[').append(range.getMinimum()).append(']');
@@ -182,4 +202,90 @@ public class RequiredCapability implements IRequiredCapability {
 			result.append(range);
 		return result.toString();
 	}
+
+	public int getMin() {
+		return min;
+	}
+
+	public int getMax() {
+		return max;
+	}
+
+	public IMatchExpression<IInstallableUnit> getMatches() {
+		return matchExpression;
+	}
+
+	public IMatchExpression<IInstallableUnit> getFilter() {
+		return filter;
+	}
+
+	public boolean isMatch(IInstallableUnit candidate) {
+		return matchExpression.isMatch(candidate);
+	}
+
+	public static boolean isVersionStrict(IMatchExpression<IInstallableUnit> matchExpression) {
+		return ExpressionUtil.getOperand(matchExpression) == strictVersionExpression;
+	}
+
+	public static String extractName(IMatchExpression<IInstallableUnit> matchExpression) {
+		assertValid(matchExpression);
+		return (String) matchExpression.getParameters()[0];
+	}
+
+	public static String extractNamespace(IMatchExpression<IInstallableUnit> matchExpression) {
+		assertValid(matchExpression);
+		return (String) matchExpression.getParameters()[1];
+	}
+
+	public static VersionRange extractRange(IMatchExpression<IInstallableUnit> matchExpression) {
+		IExpression expr = assertValid(matchExpression);
+		Object[] params = matchExpression.getParameters();
+		if (params.length < 3)
+			return VersionRange.emptyRange;
+		Version v = (Version) params[2];
+		if (params.length < 4) {
+			if (expr.equals(strictVersionExpression))
+				return new VersionRange(v, true, v, true);
+			return new VersionRange(v, expr.equals(openEndedExpression), Version.MAX_VERSION, true);
+		}
+		Version h = (Version) params[3];
+		return new VersionRange(v, expr.equals(range_II_Expression) || expr.equals(range_IN_Expression), h, expr.equals(range_II_Expression) || expr.equals(range_NI_Expression));
+	}
+
+	public static boolean isSimpleRequirement(IMatchExpression<IInstallableUnit> matchExpression) {
+		return isPredefined(ExpressionUtil.getOperand(matchExpression));
+	}
+
+	private static IExpression assertValid(IMatchExpression<IInstallableUnit> matchExpression) {
+		IExpression expr = ExpressionUtil.getOperand(matchExpression);
+		if (!isPredefined(expr))
+			throw new IllegalArgumentException();
+		return expr;
+	}
+
+	private static boolean isPredefined(IExpression expr) {
+		return expr.equals(allVersionsExpression) || expr.equals(range_II_Expression) || expr.equals(range_IN_Expression) || expr.equals(range_NI_Expression) || expr.equals(range_NN_Expression) || expr.equals(strictVersionExpression) || expr.equals(openEndedExpression) || expr.equals(openEndedNonInclusiveExpression);
+	}
+
+	public Object getMember(String memberName) {
+		// It is OK to use identity comparisons here since
+		// a) All constant valued strings are always interned
+		// b) The Member constructor always interns the name
+		//
+		if (MEMBER_FILTER == memberName)
+			return filter;
+		if (MEMBER_MIN == memberName)
+			return new Integer(min);
+		if (MEMBER_MAX == memberName)
+			return new Integer(max);
+		if (MEMBER_GREEDY == memberName)
+			return Boolean.valueOf(greedy);
+		if (MEMBER_MATCH == memberName)
+			return matchExpression;
+		throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
+	}
+
+	public String getDescription() {
+		return description;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
index e1d1fcc..d67a1ca 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
@@ -10,10 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequirementChange;
+import org.eclipse.equinox.p2.metadata.IRequirementChange;
 
 public class RequirementChange implements IRequirementChange {
 	private IRequiredCapability applyOn;
@@ -42,46 +39,7 @@ public class RequirementChange implements IRequirementChange {
 		if (toMatch.getRange().equals(applyOn.getRange()))
 			return true;
 
-		return intersect(toMatch.getRange(), applyOn.getRange()) == null ? false : true;
-	}
-
-	private VersionRange intersect(VersionRange r1, VersionRange r2) {
-		Version resultMin = null;
-		boolean resultMinIncluded = false;
-		Version resultMax = null;
-		boolean resultMaxIncluded = false;
-
-		int minCompare = r1.getMinimum().compareTo(r2.getMinimum());
-		if (minCompare < 0) {
-			resultMin = r2.getMinimum();
-			resultMinIncluded = r2.getIncludeMinimum();
-		} else if (minCompare > 0) {
-			resultMin = r1.getMinimum();
-			resultMinIncluded = r1.getIncludeMinimum();
-		} else if (minCompare == 0) {
-			resultMin = r1.getMinimum();
-			resultMinIncluded = r1.getIncludeMinimum() && r2.getIncludeMinimum();
-		}
-
-		int maxCompare = r1.getMaximum().compareTo(r2.getMaximum());
-		if (maxCompare > 0) {
-			resultMax = r2.getMaximum();
-			resultMaxIncluded = r2.getIncludeMaximum();
-		} else if (maxCompare < 0) {
-			resultMax = r1.getMaximum();
-			resultMaxIncluded = r1.getIncludeMaximum();
-		} else if (maxCompare == 0) {
-			resultMax = r1.getMaximum();
-			resultMaxIncluded = r1.getIncludeMaximum() && r2.getIncludeMaximum();
-		}
-
-		int resultRangeComparison = resultMin.compareTo(resultMax);
-		if (resultRangeComparison < 0)
-			return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
-		else if (resultRangeComparison == 0 && resultMinIncluded == resultMaxIncluded)
-			return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
-		else
-			return null;
+		return toMatch.getRange().intersect(applyOn.getRange()) != null;
 	}
 
 	public int hashCode() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
index e7279ec..bc508ec 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
@@ -12,41 +12,45 @@
 package org.eclipse.equinox.internal.p2.metadata;
 
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 
 public class ResolvedInstallableUnit implements IInstallableUnit {
-	private static IInstallableUnit[] NO_IU = new IInstallableUnit[0];
+	private static IInstallableUnitFragment[] NO_IU = new IInstallableUnitFragment[0];
 
-	private IInstallableUnit[] fragments = NO_IU;
-	protected IInstallableUnit original;
+	private final IInstallableUnitFragment[] fragments;
+	protected final IInstallableUnit original;
 
 	public ResolvedInstallableUnit(IInstallableUnit resolved) {
-		this.original = resolved;
+		this(resolved, null);
 	}
 
 	public ResolvedInstallableUnit(IInstallableUnit resolved, IInstallableUnitFragment[] fragments) {
 		this.original = resolved;
-		this.fragments = fragments;
+		this.fragments = fragments == null ? NO_IU : fragments;
 	}
 
-	public IInstallableUnitFragment[] getFragments() {
-		ArrayList result = new ArrayList();
-		if (fragments != null)
-			result.addAll(Arrays.asList(fragments));
-		for (int i = 0; i < result.size(); i++) {
-			IInstallableUnit fragment = (IInstallableUnit) result.get(i);
+	public Collection<IInstallableUnitFragment> getFragments() {
+		int fcount = fragments.length;
+		if (fcount == 0)
+			return CollectionUtils.emptyList();
+
+		ArrayList<IInstallableUnitFragment> result = new ArrayList<IInstallableUnitFragment>(fcount);
+		result.addAll(Arrays.asList(fragments));
+		for (int i = 0; i < fcount; i++) {
+			IInstallableUnit fragment = fragments[i];
 			if (fragment.isResolved())
-				result.addAll(Arrays.asList(fragment.getFragments()));
+				result.addAll(fragment.getFragments());
 		}
-		return (IInstallableUnitFragment[]) result.toArray(new IInstallableUnitFragment[result.size()]);
+		return result;
 	}
 
-	public IArtifactKey[] getArtifacts() {
+	public Collection<IArtifactKey> getArtifacts() {
 		return original.getArtifacts();
 	}
 
-	public String getFilter() {
+	public IMatchExpression<IInstallableUnit> getFilter() {
 		return original.getFilter();
 	}
 
@@ -58,59 +62,56 @@ public class ResolvedInstallableUnit implements IInstallableUnit {
 		return original.getProperty(key);
 	}
 
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		return original.getProperties();
 	}
 
-	public IProvidedCapability[] getProvidedCapabilities() {
-		ArrayList result = new ArrayList();
-		result.addAll(Arrays.asList(original.getProvidedCapabilities()));
-		for (int i = 0; i < fragments.length; i++) {
-			result.addAll(Arrays.asList(fragments[i].getProvidedCapabilities()));
-		}
-		return (IProvidedCapability[]) result.toArray(new IProvidedCapability[result.size()]);
-	}
-
-	public IRequiredCapability[] getRequiredCapabilities() {
-		ArrayList result = new ArrayList(original.getRequiredCapabilities().length + 2);
-		result.addAll(Arrays.asList(original.getRequiredCapabilities()));
-		for (int i = 0; i < fragments.length; i++) {
-			IRequiredCapability hostReqs[] = ((IInstallableUnitFragment) fragments[i]).getHost();
-			IRequiredCapability normalReqs[] = fragments[i].getRequiredCapabilities();
-			for (int j = 0; j < normalReqs.length; j++) {
-				boolean hostMatch = false;
-				for (int k = 0; k < hostReqs.length; k++) {
-					if (normalReqs[j].equals(hostReqs[k])) {
-						hostMatch = true;
-						break;
-					}
-				}
-				if (!hostMatch)
-					result.add(normalReqs[j]);
-			}
-		}
-		return (IRequiredCapability[]) result.toArray(new IRequiredCapability[result.size()]);
+	public String getProperty(String key, String locale) {
+		return original.getProperty(key, locale);
 	}
 
-	public IRequiredCapability[] getMetaRequiredCapabilities() {
-		ArrayList result = new ArrayList();
-		result.addAll(Arrays.asList(original.getMetaRequiredCapabilities()));
-		for (int i = 0; i < fragments.length; i++) {
-			result.addAll(Arrays.asList(fragments[i].getMetaRequiredCapabilities()));
-		}
-		return (IRequiredCapability[]) result.toArray(new IRequiredCapability[result.size()]);
+	public Collection<IProvidedCapability> getProvidedCapabilities() {
+		Collection<IProvidedCapability> originalCapabilities = original.getProvidedCapabilities();
+		if (fragments.length == 0)
+			return originalCapabilities;
+
+		ArrayList<IProvidedCapability> result = new ArrayList<IProvidedCapability>(originalCapabilities);
+		for (int i = 0; i < fragments.length; i++)
+			result.addAll(fragments[i].getProvidedCapabilities());
+		return result;
 	}
 
-	public ITouchpointData[] getTouchpointData() {
-		ArrayList result = new ArrayList();
-		result.addAll(Arrays.asList(original.getTouchpointData()));
-		for (int i = 0; i < fragments.length; i++) {
-			ITouchpointData[] data = fragments[i].getTouchpointData();
-			for (int j = 0; j < data.length; j++) {
-				result.add(data[j]);
-			}
-		}
-		return (ITouchpointData[]) result.toArray(new ITouchpointData[result.size()]);
+	public Collection<IRequirement> getRequirements() {
+		Collection<IRequirement> originalCapabilities = original.getRequirements();
+		if (fragments.length == 0)
+			return originalCapabilities;
+
+		ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
+		for (int i = 0; i < fragments.length; i++)
+			result.addAll(fragments[i].getRequirements());
+		return result;
+	}
+
+	public Collection<IRequirement> getMetaRequirements() {
+		Collection<IRequirement> originalCapabilities = original.getMetaRequirements();
+		if (fragments.length == 0)
+			return originalCapabilities;
+
+		ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
+		for (int i = 0; i < fragments.length; i++)
+			result.addAll(fragments[i].getMetaRequirements());
+		return result;
+	}
+
+	public Collection<ITouchpointData> getTouchpointData() {
+		Collection<ITouchpointData> originalTouchpointData = original.getTouchpointData();
+		if (fragments.length == 0)
+			return originalTouchpointData;
+
+		ArrayList<ITouchpointData> result = new ArrayList<ITouchpointData>(originalTouchpointData);
+		for (int i = 0; i < fragments.length; i++)
+			result.addAll(fragments[i].getTouchpointData());
+		return result;
 	}
 
 	public ITouchpointType getTouchpointType() {
@@ -121,10 +122,6 @@ public class ResolvedInstallableUnit implements IInstallableUnit {
 		return original.getVersion();
 	}
 
-	public boolean isFragment() {
-		return original.isFragment();
-	}
-
 	public boolean isSingleton() {
 		return original.isSingleton();
 	}
@@ -152,14 +149,11 @@ public class ResolvedInstallableUnit implements IInstallableUnit {
 		return original;
 	}
 
-	public int compareTo(Object toCompareTo) {
-		if (!(toCompareTo instanceof IInstallableUnit)) {
-			return -1;
-		}
-		IInstallableUnit other = (IInstallableUnit) toCompareTo;
-		if (getId().compareTo(other.getId()) == 0)
-			return (getVersion().compareTo(other.getVersion()));
-		return getId().compareTo(other.getId());
+	public int compareTo(IInstallableUnit other) {
+		int cmp = getId().compareTo(other.getId());
+		if (cmp == 0)
+			cmp = getVersion().compareTo(other.getVersion());
+		return cmp;
 	}
 
 	public boolean isResolved() {
@@ -174,20 +168,24 @@ public class ResolvedInstallableUnit implements IInstallableUnit {
 		return original.getUpdateDescriptor();
 	}
 
-	public ILicense getLicense() {
-		return original.getLicense();
+	public Collection<ILicense> getLicenses() {
+		return original.getLicenses();
+	}
+
+	public Collection<ILicense> getLicenses(String locale) {
+		return original.getLicenses(locale);
 	}
 
 	public ICopyright getCopyright() {
 		return original.getCopyright();
 	}
 
-	public boolean satisfies(IRequiredCapability candidate) {
-		IProvidedCapability[] provides = getProvidedCapabilities();
-		for (int i = 0; i < provides.length; i++)
-			if (provides[i].satisfies(candidate))
-				return true;
-		return false;
+	public ICopyright getCopyright(String locale) {
+		return original.getCopyright(locale);
+	}
+
+	public boolean satisfies(IRequirement candidate) {
+		return candidate.isMatch(this);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
index 9ea83d4..7bcc16c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
@@ -11,9 +11,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import java.util.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+
+import java.util.Collections;
+import java.util.Map;
 import java.util.Map.Entry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.ITouchpointData;
+import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
 
 /**
  * Touchpoint data instances contain the additional information needed by a touchpoint
@@ -31,7 +35,7 @@ public class TouchpointData implements ITouchpointData {
 	 * of keys supported is up to the touchpoint that will process these
 	 * instructions. This map is never null.
 	 */
-	private Map instructions;
+	private Map<String, ITouchpointInstruction> instructions;
 
 	public int hashCode() {
 		return 31 * 1 + ((instructions == null) ? 0 : instructions.hashCode());
@@ -56,7 +60,7 @@ public class TouchpointData implements ITouchpointData {
 	/**
 	 * Clients must use the factory method on {@link MetadataFactory}.
 	 */
-	public TouchpointData(Map instructions) {
+	public TouchpointData(Map<String, ITouchpointInstruction> instructions) {
 		this.instructions = instructions;
 	}
 
@@ -64,7 +68,7 @@ public class TouchpointData implements ITouchpointData {
 	 * Returns the touchpoint instruction corresponding to the given key.
 	 */
 	public ITouchpointInstruction getInstruction(String instructionKey) {
-		return (ITouchpointInstruction) instructions.get(instructionKey);
+		return instructions.get(instructionKey);
 	}
 
 	/**
@@ -73,7 +77,7 @@ public class TouchpointData implements ITouchpointData {
 	 *
 	 * @return the touchpoint instructions
 	 */
-	public Map getInstructions() {
+	public Map<String, ITouchpointInstruction> getInstructions() {
 		return Collections.unmodifiableMap(instructions);
 	}
 
@@ -82,8 +86,7 @@ public class TouchpointData implements ITouchpointData {
 	 */
 	public String toString() {
 		StringBuffer result = new StringBuffer();
-		for (Iterator iterator = instructions.entrySet().iterator(); iterator.hasNext();) {
-			Entry instruction = (Entry) iterator.next();
+		for (Entry<String, ITouchpointInstruction> instruction : instructions.entrySet()) {
 			result.append(instruction.getKey()).append(" -> ").append(instruction.getValue()).append('\n'); //$NON-NLS-1$
 		}
 		return result.toString();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
index e59e9be..44bbe1b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
@@ -11,10 +11,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+
 import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointInstruction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
+import java.util.Map.Entry;
+import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
 
 /**
  * A touchpoint instruction contains either a sequence of instruction statements
@@ -65,16 +66,18 @@ public class TouchpointInstruction implements ITouchpointInstruction {
 	 * where the keys are parameter names, and the values are parameter values
 	 * @return An encoded touchpoint instruction statement
 	 */
-	public static String encodeAction(String actionName, Map parameters) {
+	public static String encodeAction(String actionName, Map<String, String> parameters) {
 		StringBuffer result = new StringBuffer(actionName);
 		result.append('(');
-		for (Iterator it = parameters.entrySet().iterator(); it.hasNext();) {
-			Map.Entry entry = (Map.Entry) it.next();
+		boolean first = true;
+		for (Entry<String, String> entry : parameters.entrySet()) {
+			if (first)
+				first = false;
+			else
+				result.append(',');
 			result.append(entry.getKey());
 			result.append(':');
-			appendEncoded(result, (String) entry.getValue());
-			if (it.hasNext())
-				result.append(',');
+			appendEncoded(result, entry.getValue());
 		}
 		result.append(')').append(';');
 		return result.toString();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
index 7cba96c..86bb05b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
@@ -11,8 +11,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.Version;
+
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
 
 /**
  * Identifies a particular touchpoint. A touchpoint is identified by an id 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
new file mode 100644
index 0000000..571abd7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *     Cloudsmith Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.lang.ref.SoftReference;
+import java.util.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.osgi.service.localization.LocaleProvider;
+
+/**
+ * TranslationSupport provides string translations for properties of an 
+ * IInstallableUnit.  Clients can specify an {@link IQueryable} that should be used
+ * to obtain the translation fragment IU's, as well as the locale that
+ * should be used for translations.
+ * 
+ * @since 2.0
+ */
+public class TranslationSupport {
+	// TODO: these constants should come from API, eg. IInstallableUnit or ???
+	static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
+	private static TranslationSupport instance;
+
+	static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
+	private IQueryable<IInstallableUnit> fragmentSource;
+
+	private static IExpression capabilityMatch = ExpressionUtil.parse("providedCapabilities.exists(x | x.namespace == $0 && $1.exists(n | x.name == n))"); //$NON-NLS-1$
+	private static IExpression haveHostMatch = ExpressionUtil.parse("host.exists(h | $0 ~= h)"); //$NON-NLS-1$
+
+	// Cache the IU fragments that provide localizations for a given locale.
+	// Map<String,SoftReference<IQueryResult>>: locale => soft reference to a queryResult
+	private final Map<String, SoftReference<IQueryResult<IInstallableUnit>>> localeCollectorCache = new HashMap<String, SoftReference<IQueryResult<IInstallableUnit>>>(2);
+
+	private LocaleProvider localeProvider;
+	private boolean loggedMissingSource = false;;
+
+	public synchronized static TranslationSupport getInstance() {
+		if (instance == null)
+			instance = new TranslationSupport();
+		return instance;
+	}
+
+	/**
+	 * Create an instance of TranslationSupport for the current locale.
+	 * Unless otherwise specified, the currently running profile will serve
+	 * as the source of the translation fragments.
+	 * 
+	 * @since 2.0
+	 */
+	public TranslationSupport() {
+		super();
+	}
+
+	/**
+	 * Create an instance of TranslationSupport for the current locale.
+	 * using the <code>fragmentSource</code> as the source of the translation fragments.
+	 * 
+	 * @since 2.0
+	 */
+	public TranslationSupport(IQueryable<IInstallableUnit> fragmentSource) {
+		this.fragmentSource = fragmentSource;
+	}
+
+	/**
+	 */
+	private List<String> buildLocaleVariants(String locale) {
+		ArrayList<String> result = new ArrayList<String>(4);
+		int lastSeparator;
+		while (true) {
+			result.add(locale);
+			lastSeparator = locale.lastIndexOf('_');
+			if (lastSeparator == -1)
+				break;
+			locale = locale.substring(0, lastSeparator);
+		}
+		// Add the default locale (most general)
+		result.add(DEFAULT_LOCALE.toString());
+		return result;
+	}
+
+	/**
+	 * Cache the translated property value to optimize future retrieval of the same value.
+	 * Currently we just cache on the installable unit object in memory. In future
+	 * we should push support for localized property retrieval into IInstallableUnit
+	 * so we aren't required to reach around the API here.
+	 */
+	private String cacheResult(IInstallableUnit iu, String localizedKey, String localizedValue) {
+		if (iu instanceof InstallableUnit)
+			((InstallableUnit) iu).setLocalizedProperty(localizedKey, localizedValue);
+		return localizedValue;
+	}
+
+	/**
+	 * Return the copyright for the specified IInstallableUnit, 
+	 * localized for the receiver's locale.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @return the localized copyright defined by the IInstallableUnit
+	 */
+	public ICopyright getCopyright(IInstallableUnit iu, String locale) {
+		if (locale == null)
+			locale = getCurrentLocale();
+		ICopyright copyright = iu.getCopyright();
+		String body = (copyright != null ? copyright.getBody() : null);
+		if (body == null || body.length() <= 1 || body.charAt(0) != '%')
+			return copyright;
+		final String actualKey = body.substring(1); // Strip off the %
+		body = getLocalizedIUProperty(iu, actualKey, locale);
+		return MetadataFactory.createCopyright(copyright.getLocation(), body);
+	}
+
+	private String getCurrentLocale() {
+		if (localeProvider != null)
+			return localeProvider.getLocale().toString();
+		return Locale.getDefault().toString();
+	}
+
+	/**
+	 * Return the localized value for the specified IInstallableUnit
+	 * property.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @param propertyKey the name of the property to be retrieved
+	 * @param locale The locale to return the property for
+	 * @return the localized property value, or <code>null</code> if no
+	 * such property is defined.
+	 */
+	public String getIUProperty(IInstallableUnit iu, String propertyKey, String locale) {
+		if (locale == null)
+			locale = getCurrentLocale();
+		String value = iu.getProperty(propertyKey);
+		if (value == null || value.length() <= 1 || value.charAt(0) != '%')
+			return value;
+		// else have a localizable property
+		final String actualKey = value.substring(1); // Strip off the %
+		return getLocalizedIUProperty(iu, actualKey, locale);
+	}
+
+	/**
+	 * Return the localized value for the specified IInstallableUnit
+	 * property using the locale specified in the <code>propertyKey</code>.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @param propertyKey the name and locale of the property to be retrieved
+	 * @return the localized property value, or <code>null</code> if no
+	 * such property is defined.
+	 */
+	public String getIUProperty(IInstallableUnit iu, KeyWithLocale propertyKey) {
+		return getIUProperty(iu, propertyKey.getKey(), propertyKey.getLocale().toString());
+	}
+
+	/**
+	 * Return the localized value for the specified IInstallableUnit
+	 * property using the default locale.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @param propertyKey the name of the property to be retrieved
+	 * @return the localized property value, or <code>null</code> if no
+	 * such property is defined.
+	 */
+	public String getIUProperty(IInstallableUnit iu, String propertyKey) {
+		return getIUProperty(iu, propertyKey, null);
+	}
+
+	private ILicense getLicense(IInstallableUnit iu, ILicense license, String locale) {
+		String body = (license != null ? license.getBody() : null);
+		if (body == null || body.length() <= 1 || body.charAt(0) != '%')
+			return license;
+		final String actualKey = body.substring(1); // Strip off the %
+		body = getLocalizedIUProperty(iu, actualKey, locale);
+		return MetadataFactory.createLicense(license.getLocation(), body);
+	}
+
+	/**
+	 * Return an array of licenses for the specified IInstallableUnit, 
+	 * localized for the receiver's locale.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @return the localized licenses defined by the IInstallableUnit
+	 */
+	public ILicense[] getLicenses(IInstallableUnit iu, String locale) {
+		if (locale == null)
+			locale = getCurrentLocale();
+		Collection<ILicense> licenses = iu.getLicenses();
+		ILicense[] translatedLicenses = new ILicense[licenses.size()];
+		int i = 0;
+		for (ILicense iLicense : licenses) {
+			translatedLicenses[i++] = getLicense(iu, iLicense, locale);
+		}
+		return translatedLicenses;
+	}
+
+	/**
+	 * Return an update descriptor localized for the receiver's locale.
+	 * 
+	 * @param iu the IInstallableUnit in question
+	 * @return the localized update descriptor defined by the IInstallableUnit
+	 */
+	public IUpdateDescriptor getUpdateDescriptor(IInstallableUnit iu, String locale) {
+		if (locale == null)
+			locale = getCurrentLocale();
+
+		IUpdateDescriptor descriptor = iu.getUpdateDescriptor();
+		String body = (descriptor != null ? descriptor.getDescription() : null);
+		if (body == null || body.length() <= 1 || body.charAt(0) != '%')
+			return descriptor;
+		final String actualKey = body.substring(1); // Strip off the %
+		body = getLocalizedIUProperty(iu, actualKey, locale);
+		return MetadataFactory.createUpdateDescriptor(descriptor.getIUsBeingUpdated(), descriptor.getSeverity(), body, descriptor.getLocation());
+	}
+
+	/**
+	 * Collects the installable unit fragments that contain locale data for the given locales.
+	 */
+	private synchronized IQueryResult<IInstallableUnit> getLocalizationFragments(List<String> localeVariants, String locale) {
+		if (fragmentSource == null) {
+			if (!loggedMissingSource) {
+				loggedMissingSource = true;
+				LogHelper.log(new Status(IStatus.INFO, MetadataActivator.PI_METADATA, "No translation source unavailable. Default language will be used.")); //$NON-NLS-1$
+			}
+			return Collector.emptyCollector();
+		}
+
+		SoftReference<IQueryResult<IInstallableUnit>> queryResultReference = localeCollectorCache.get(locale);
+		if (queryResultReference != null) {
+			IQueryResult<IInstallableUnit> cached = queryResultReference.get();
+			if (cached != null)
+				return cached;
+		}
+
+		IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, capabilityMatch, NAMESPACE_IU_LOCALIZATION, localeVariants);
+		IQueryResult<IInstallableUnit> collected = fragmentSource.query(iuQuery, null);
+		localeCollectorCache.put(locale, new SoftReference<IQueryResult<IInstallableUnit>>(collected));
+		return collected;
+	}
+
+	private String getLocalizedIUProperty(IInstallableUnit iu, String actualKey, String locale) {
+		String localizedKey = makeLocalizedKey(actualKey, locale);
+		String localizedValue = null;
+
+		//first check for a cached localized value
+		if (iu instanceof InstallableUnit)
+			localizedValue = ((InstallableUnit) iu).getLocalizedProperty(localizedKey);
+		//next check if the localized value is stored in the same IU (common case)
+		if (localizedValue == null)
+			localizedValue = iu.getProperty(localizedKey);
+		if (localizedValue != null)
+			return localizedValue;
+
+		final List<String> locales = buildLocaleVariants(locale);
+		final IInstallableUnit theUnit = iu;
+
+		IQueryResult<IInstallableUnit> localizationFragments = getLocalizationFragments(locales, locale);
+
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, factory.matchExpression(haveHostMatch, theUnit));
+		IQueryResult<IInstallableUnit> collected = iuQuery.perform(localizationFragments.iterator());
+		if (!collected.isEmpty()) {
+			String translation = null;
+			for (Iterator<IInstallableUnit> iter = collected.iterator(); iter.hasNext() && translation == null;) {
+				IInstallableUnit localizationIU = iter.next();
+				for (Iterator<String> jter = locales.iterator(); jter.hasNext();) {
+					String localeKey = makeLocalizedKey(actualKey, jter.next());
+					translation = localizationIU.getProperty(localeKey);
+					if (translation != null)
+						return cacheResult(iu, localizedKey, translation);
+				}
+			}
+		}
+
+		for (String nextLocale : locales) {
+			String localeKey = makeLocalizedKey(actualKey, nextLocale);
+			String nextValue = iu.getProperty(localeKey);
+			if (nextValue != null)
+				return cacheResult(iu, localizedKey, nextValue);
+		}
+
+		return cacheResult(iu, localizedKey, actualKey);
+	}
+
+	private String makeLocalizedKey(String actualKey, String localeImage) {
+		return localeImage + '.' + actualKey;
+	}
+
+	/**
+	 * Set the locale that should be used when obtaining translations.
+	 * @param provider the locale for which translations should be retrieved.
+	 */
+	public synchronized void setLocaleProvider(LocaleProvider provider) {
+		if (provider != this.localeProvider) {
+			this.localeProvider = provider;
+			localeCollectorCache.clear();
+		}
+	}
+
+	/**
+	 * Set the {@link IQueryable} that should be used to obtain translation fragment
+	 * IUs. Returns the previous translation source.
+	 * 
+	 * @param queryable an {@link IQueryable} that can supply the appropriate NLS
+	 * translation fragments
+	 */
+	public synchronized IQueryable<IInstallableUnit> setTranslationSource(IQueryable<IInstallableUnit> queryable) {
+		IQueryable<IInstallableUnit> previous = fragmentSource;
+		if (previous != queryable) {
+			this.fragmentSource = queryable;
+			localeCollectorCache.clear();
+		}
+		return previous;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
index d8d0a55..eab12ed 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
@@ -8,44 +8,43 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.metadata;
 
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
+import java.net.URI;
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 
 public class UpdateDescriptor implements IUpdateDescriptor {
+	private Collection<IMatchExpression<IInstallableUnit>> descriptors;
+
 	private String description;
-	private String id;
-	private VersionRange range;
 	private int severity;
+	private URI location;
 
-	public UpdateDescriptor(String id, VersionRange range, int severity, String description) {
-		this.id = id;
-		this.range = range;
+	public UpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
+		this.descriptors = descriptors;
 		this.severity = severity;
 		this.description = description;
+		this.location = location;
 	}
 
 	public String getDescription() {
 		return description;
 	}
 
-	public String getId() {
-		return id;
+	public int getSeverity() {
+		return severity;
 	}
 
-	public VersionRange getRange() {
-		return range;
+	public boolean isUpdateOf(IInstallableUnit iu) {
+		return descriptors.iterator().next().isMatch(iu);
 	}
 
-	public int getSeverity() {
-		return severity;
+	public Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated() {
+		return descriptors;
 	}
 
-	public boolean isUpdateOf(IInstallableUnit iu) {
-		if (!id.equals(iu.getId()))
-			return false;
-		if (range.isIncluded(iu.getVersion()))
-			return true;
-		return false;
+	public URI getLocation() {
+		return location;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
new file mode 100644
index 0000000..98bee1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.io.Serializable;
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.VersionFormatParser.Fragment;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * <p>The VersionFormat represents the Omni Version Format in compiled form. It
+ * is also a parser for versions of that format.</p>
+ * <p>An instance of VersionFormat is immutable and thus thread safe. The parser
+ * does not maintain any state.</p>
+ * 
+ * @Immutable
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class VersionFormat implements IVersionFormat, Serializable {
+
+	/**
+	 * The string representation of the Omni Version format used for parsing OSGi versions.
+	 */
+	public static final String OSGI_FORMAT_STRING = "n[.n=0;[.n=0;[.S='';=[A-Za-z0-9_-];]]]"; //$NON-NLS-1$
+
+	/**
+	 * The string representation of the Omni Version format used for parsing raw versions.
+	 */
+	public static final String RAW_FORMAT_STRING = "r(.r)*p?"; //$NON-NLS-1$
+
+	private static final long serialVersionUID = -5689435955091405520L;
+
+	private static class StateInfo {
+		Fragment fragment;
+		int position;
+		int segmentCount;
+
+		StateInfo(int position, int segmentCount, Fragment fragment) {
+			this.fragment = fragment;
+			this.position = position;
+			this.segmentCount = segmentCount;
+		}
+	}
+
+	static class TreeInfo extends ArrayList<StateInfo> {
+		private static final long serialVersionUID = 4474591345244587260L;
+
+		private Comparable<?> padValue;
+		private int top;
+
+		TreeInfo(Fragment frag, int pos) {
+			add(new StateInfo(pos, 0, frag));
+			top = 0;
+		}
+
+		Comparable<?> getPadValue() {
+			return padValue;
+		}
+
+		int getPosition() {
+			return get(top).position;
+		}
+
+		void popState(List<Comparable<?>> segments, Fragment frag) {
+			int idx = top;
+			while (idx > 0) {
+				StateInfo si = get(idx);
+				if (si.fragment == frag) {
+					int nsegs = segments.size();
+					int segMax = si.segmentCount;
+					while (nsegs > segMax)
+						segments.remove(--nsegs);
+					top = idx - 1;
+					break;
+				}
+			}
+		}
+
+		void pushState(int segCount, Fragment fragment) {
+			int pos = get(top).position;
+			if (++top == size())
+				add(new StateInfo(pos, segCount, fragment));
+			else {
+				StateInfo si = get(top);
+				si.fragment = fragment;
+				si.position = pos;
+				si.segmentCount = segCount;
+			}
+		}
+
+		void setPadValue(Comparable<?> pad) {
+			padValue = pad;
+		}
+
+		void setPosition(int pos) {
+			get(top).position = pos;
+		}
+	}
+
+	private static final Map<String, VersionFormat> formatCache = Collections.synchronizedMap(new HashMap<String, VersionFormat>());
+
+	/**
+	 * The predefined OSGi format that is used when parsing OSGi
+	 * versions.
+	 */
+	public static final VersionFormat OSGI_FORMAT;
+
+	/**
+	 * The predefined OSGi format that is used when parsing raw
+	 * versions.
+	 */
+	public static final VersionFormat RAW_FORMAT;
+
+	static {
+		try {
+			VersionFormatParser parser = new VersionFormatParser();
+			OSGI_FORMAT = new VersionFormat(parser.compile(OSGI_FORMAT_STRING, 0, OSGI_FORMAT_STRING.length()));
+			formatCache.put(OSGI_FORMAT_STRING, OSGI_FORMAT);
+			RAW_FORMAT = new RawFormat(parser.compile(RAW_FORMAT_STRING, 0, RAW_FORMAT_STRING.length()));
+			formatCache.put(RAW_FORMAT_STRING, RAW_FORMAT);
+		} catch (VersionFormatException e) {
+			// If this happens, something is wrong with the actual
+			// implementation of the FormatCompiler.
+			//
+			throw new ExceptionInInitializerError(e);
+		}
+	}
+
+	/**
+	 * Compile a version format string into a compiled format. This method is
+	 * shorthand for:<pre>CompiledFormat.compile(format, 0, format.length())</pre>.
+	 *
+	 * @param format The format to compile.
+	 * @return The compiled format
+	 * @throws VersionFormatException If the format could not be compiled
+	 */
+	public static IVersionFormat compile(String format) throws VersionFormatException {
+		return compile(format, 0, format.length());
+	}
+
+	/**
+	 * Compile a version format string into a compiled format. The parsing starts
+	 * at position start and ends at position end. The returned format is cached so
+	 * subsequent calls to this method using the same format string will yield the
+	 * same compiled format instance.
+	 *
+	 * @param format The format string to compile.
+	 * @param start Start position in the format string
+	 * @param end End position in the format string
+	 * @return The compiled format
+	 * @throws VersionFormatException If the format could not be compiled
+	 */
+	public static VersionFormat compile(String format, int start, int end) throws VersionFormatException {
+		String fmtString = format.substring(start, end).intern();
+		synchronized (fmtString) {
+			VersionFormat fmt = formatCache.get(fmtString);
+			if (fmt == null) {
+				VersionFormatParser parser = new VersionFormatParser();
+				fmt = new VersionFormat(parser.compile(format, start, end));
+				formatCache.put(fmtString, fmt);
+			}
+			return fmt;
+		}
+	}
+
+	/**
+	 * Parse a version string using the {@link #RAW_FORMAT} parser.
+	 *
+	 * @param version The version to parse.
+	 * @param originalFormat The original format to assign to the created version. Can be <code>null</code>.
+	 * @param original The original version string to assign to the created version. Can be <code>null</code>.
+	 * @return A created version
+	 * @throws IllegalArgumentException If the version string could not be parsed.
+	 */
+	public static BasicVersion parseRaw(String version, IVersionFormat originalFormat, String original) {
+		List<Comparable<?>> vector = RAW_FORMAT.parse(version, 0, version.length());
+		return (originalFormat == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, originalFormat, original);
+	}
+
+	static void rawToString(StringBuffer sb, boolean forRange, Comparable<?> e) {
+		if (e instanceof String) {
+			writeQuotedString(sb, forRange, (String) e, '\'', 0, false);
+		} else if (e instanceof VersionVector) {
+			sb.append('<');
+			((VersionVector) e).toString(sb, forRange);
+			sb.append('>');
+		} else
+			sb.append(e);
+	}
+
+	/**
+	 * Write a string within quotes. If the string is found to contain the quote, an attempt is made
+	 * to flip quote character (single quote becomes double quote and vice versa). A string that contains
+	 * both will be written as several adjacent quoted strings so that each string is quoted with a
+	 * quote character that it does not contain.
+	 * @param sb The buffer that will receive the string
+	 * @param rangeSafe Set to <code>true</code> if the resulting string will be used in a range string
+	 *        and hence need to escape the range delimiter characters
+	 * @param s The string to be written
+	 * @param quote The quote character to start with. Must be the single or double quote character.
+	 * @param startPos The start position
+	 * @param didFlip True if the call is recursive and thus, cannot switch quotes in the first string.
+	 */
+	private static void writeQuotedString(StringBuffer sb, boolean rangeSafe, String s, char quote, int startPos, boolean didFlip) {
+		int quotePos = sb.length();
+		sb.append(quote);
+		boolean otherSeen = false;
+		int top = s.length();
+		for (int idx = startPos; idx < top; ++idx) {
+			char c = s.charAt(idx);
+			if (c == '\'' || c == '"') {
+				if (c == quote) {
+					char otherQuote = quote == '\'' ? '"' : '\'';
+					if (didFlip || otherSeen) {
+						// We can only flip once
+						sb.append(quote);
+						writeQuotedString(sb, rangeSafe, s, otherQuote, idx, true);
+						return;
+					}
+					quote = otherQuote;
+					sb.setCharAt(quotePos, quote);
+					didFlip = true;
+				} else
+					otherSeen = true;
+			}
+			if (rangeSafe && (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' '))
+				sb.append('\\');
+			sb.append(c);
+		}
+		sb.append(quote);
+	}
+
+	private String fmtString;
+
+	private final Fragment topFragment;
+
+	VersionFormat(Fragment topFragment) {
+		this.topFragment = topFragment;
+	}
+
+	TreeInfo createInfo(int start) {
+		return new TreeInfo(topFragment, start);
+	}
+
+	public boolean equals(Object o) {
+		return this == o || o instanceof VersionFormat && toString().equals(o.toString());
+	}
+
+	public int hashCode() {
+		return 11 * toString().hashCode();
+	}
+
+	public Version parse(String version) {
+		List<Comparable<?>> vector = parse(version, 0, version.length());
+		return (this == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, this, version);
+	}
+
+	List<Comparable<?>> parse(String version, int start, int maxPos) {
+		if (start == maxPos)
+			throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_empty_version, this, version.substring(start, maxPos)));
+		TreeInfo info = new TreeInfo(topFragment, start);
+		ArrayList<Comparable<?>> entries = new ArrayList<Comparable<?>>(5);
+		if (!(topFragment.parse(entries, version, maxPos, info) && info.getPosition() == maxPos))
+			throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_1, this, version.substring(start, maxPos)));
+		entries.add(VersionParser.removeRedundantTrail(entries, info.getPadValue()));
+		return entries;
+	}
+
+	// Preserve cache during deserialization
+	private Object readResolve() {
+		synchronized (formatCache) {
+			String string = toString();
+			string = string.substring(7, string.length() - 1); // Strip of "format(" and ")"
+			VersionFormat fmt = formatCache.get(string);
+			if (fmt == null) {
+				fmt = this;
+				formatCache.put(string, fmt);
+			}
+			return fmt;
+		}
+	}
+
+	/**
+	 * Returns the string representation of this compiled format
+	 */
+	public synchronized String toString() {
+		if (fmtString == null) {
+			StringBuffer sb = new StringBuffer();
+			toString(sb);
+		}
+		return fmtString;
+	}
+
+	public synchronized void toString(StringBuffer sb) {
+		if (fmtString != null)
+			sb.append(fmtString);
+		else {
+			int start = sb.length();
+			sb.append("format"); //$NON-NLS-1$
+			if (topFragment.getPadValue() != null) {
+				sb.append('(');
+				topFragment.toString(sb);
+				sb.append(')');
+			} else
+				topFragment.toString(sb);
+			fmtString = sb.substring(start);
+		}
+	}
+}
+
+class RawFormat extends VersionFormat {
+	private static final long serialVersionUID = -6070590518921019745L;
+
+	RawFormat(Fragment topFragment) {
+		super(topFragment);
+	}
+
+	/**
+	 * Parse but do not assign this format as the Version format nor the version
+	 * string as the original.
+	 */
+	public Version parse(String version) {
+		List<Comparable<?>> vector = parse(version, 0, version.length());
+		return OmniVersion.fromVector(vector, null, null);
+	}
+
+	// Preserve singleton when deserialized
+	private Object readResolve() {
+		return RAW_FORMAT;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
new file mode 100644
index 0000000..83170c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
@@ -0,0 +1,1548 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import org.eclipse.equinox.p2.metadata.VersionFormatException;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.metadata.VersionFormat.TreeInfo;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This is the Omni Version Format parser. It will parse a version format in string form
+ * into a group of {@link VersionFormatParser.Fragment} elements. That group, wrapped in a
+ * {@link VersionFormat}, becomes the parser for versions corresponding to the format.
+ *
+ * The class is not intended to included in a public API. Instead VersionFormats should
+ * be created using {@link VersionFormat#parse(String)}
+ *
+ */
+class VersionFormatParser {
+
+	static class Instructions {
+		char[] characters = null;
+		Comparable<?> defaultValue = null;
+		char oppositeTranslationChar = 0;
+		int oppositeTranslationRepeat = 0;
+		boolean ignore = false;
+		boolean inverted = false;
+		Comparable<?> padValue = null;
+		int rangeMax = Integer.MAX_VALUE;
+		int rangeMin = 0;
+	}
+
+	static final Qualifier EXACT_ONE_QUALIFIER = new Qualifier(1, 1);
+
+	static final Qualifier ONE_OR_MANY_QUALIFIER = new Qualifier(1, Integer.MAX_VALUE);
+
+	static final Qualifier ZERO_OR_MANY_QUALIFIER = new Qualifier(0, Integer.MAX_VALUE);
+
+	static final Qualifier ZERO_OR_ONE_QUALIFIER = new Qualifier(0, 1);
+
+	/**
+	 * Represents one fragment of a format (i.e. auto, number, string, delimiter, etc.)
+	 */
+	static abstract class Fragment implements Serializable {
+		private static final long serialVersionUID = 4109185333058622681L;
+
+		private final Qualifier qualifier;
+
+		Fragment(Qualifier qualifier) {
+			this.qualifier = qualifier;
+		}
+
+		public final boolean equals(Object f) {
+			return f == this || getClass().equals(f.getClass()) && qualifier.equals(((Fragment) f).qualifier);
+		}
+
+		public final int hashCode() {
+			return 11 * qualifier.hashCode();
+		}
+
+		public boolean isGroup() {
+			return false;
+		}
+
+		public String toString() {
+			StringBuffer sb = new StringBuffer();
+			toString(sb);
+			return sb.toString();
+		}
+
+		Comparable<?> getDefaultValue() {
+			return null;
+		}
+
+		Fragment getFirstLeaf() {
+			return this;
+		}
+
+		Comparable<?> getPadValue() {
+			return null;
+		}
+
+		Qualifier getQualifier() {
+			return qualifier;
+		}
+
+		boolean parse(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			return qualifier.parse(new Fragment[] {this}, 0, segments, version, maxPos, info);
+		}
+
+		abstract boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info);
+
+		void setDefaults(List<Comparable<?>> segments) {
+			// No-op at this level
+		}
+
+		void toString(StringBuffer sb) {
+			if (!(qualifier == VersionFormatParser.EXACT_ONE_QUALIFIER || (qualifier == VersionFormatParser.ZERO_OR_ONE_QUALIFIER && this.isGroup())))
+				qualifier.toString(sb);
+		}
+	}
+
+	/**
+	 * Specifies the min and max occurrences of a fragment
+	 */
+	static class Qualifier implements Serializable {
+		private static final long serialVersionUID = 7494021832824671685L;
+
+		private final int max;
+		private final int min;
+
+		Qualifier(int min, int max) {
+			this.min = min;
+			this.max = max;
+		}
+
+		public boolean equals(Object o) {
+			if (o == this)
+				return true;
+			if (!(o instanceof Qualifier))
+				return false;
+			Qualifier oq = (Qualifier) o;
+			return min == oq.min && max == oq.max;
+		}
+
+		public int hashCode() {
+			return 31 * min + 67 * max;
+		}
+
+		public String toString() {
+			StringBuffer sb = new StringBuffer();
+			toString(sb);
+			return sb.toString();
+		}
+
+		int getMax() {
+			return max;
+		}
+
+		int getMin() {
+			return min;
+		}
+
+		boolean parse(Fragment[] fragments, int fragIdx, List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			Fragment fragment = fragments[fragIdx++];
+			int idx = 0;
+
+			// Do the required parsing. I.e. iterate this fragment
+			// min number of times.
+			//
+			for (; idx < min; ++idx)
+				if (!fragment.parseOne(segments, version, maxPos, info))
+					return false;
+
+			for (; idx < max; ++idx) {
+				// We are greedy. Continue parsing until we get an exception
+				// and remember the state before each parse is performed.
+				//
+				info.pushState(segments.size(), fragment);
+				if (!fragment.parseOne(segments, version, maxPos, info)) {
+					info.popState(segments, fragment);
+					break;
+				}
+			}
+			int maxParsed = idx;
+
+			for (;;) {
+				// Pad with default values unless the max is unbounded
+				//
+				if (idx < max) {
+					if (max != Integer.MAX_VALUE) {
+						for (; idx < max; ++idx)
+							fragment.setDefaults(segments);
+					}
+				} else {
+					if (fragment instanceof StringFragment) {
+						// Check for translations if we default to for MINS or MAXS
+						StringFragment stringFrag = (StringFragment) fragment;
+						Comparable<?> opposite = stringFrag.getOppositeDefaultValue();
+						if (opposite != null) {
+							idx = segments.size() - 1;
+							if (stringFrag.isOppositeTranslation(segments.get(idx)))
+								segments.set(idx, opposite);
+						}
+					}
+				}
+
+				if (fragIdx == fragments.length)
+					// We are the last segment
+					//
+					return true;
+
+				// Try to parse the next segment. If it fails, pop the state of
+				// this segment (or a child thereof) and try again
+				//
+				if (fragments[fragIdx].getQualifier().parse(fragments, fragIdx, segments, version, maxPos, info))
+					return true;
+
+				// Be less greedy, step back one position and try again.
+				//
+				if (maxParsed <= min)
+					// We have no more states to pop. Tell previous that we failed.
+					//
+					return false;
+
+				info.popState(segments, fragment);
+				idx = --maxParsed; // segments now have room for one more default value
+			}
+		}
+
+		void toString(StringBuffer sb) {
+			if (min == 0) {
+				if (max == 1)
+					sb.append('?');
+				else if (max == Integer.MAX_VALUE)
+					sb.append('*');
+				else {
+					sb.append('{');
+					sb.append(min);
+					sb.append(',');
+					sb.append(max);
+					sb.append('}');
+				}
+			} else if (max == Integer.MAX_VALUE) {
+				if (min == 1)
+					sb.append('+');
+				else {
+					sb.append('{');
+					sb.append(min);
+					sb.append(",}"); //$NON-NLS-1$
+				}
+			} else {
+				sb.append('{');
+				sb.append(min);
+				if (min != max) {
+					sb.append(',');
+					sb.append(max);
+				}
+				sb.append('}');
+			}
+		}
+
+		// Preserve singleton when deserialized
+		private Object readResolve() {
+			Qualifier q = this;
+			if (min == 0) {
+				if (max == 1)
+					q = VersionFormatParser.ZERO_OR_ONE_QUALIFIER;
+				else if (max == Integer.MAX_VALUE)
+					q = VersionFormatParser.ZERO_OR_MANY_QUALIFIER;
+			} else if (min == 1) {
+				if (max == 1)
+					q = VersionFormatParser.EXACT_ONE_QUALIFIER;
+				else if (max == Integer.MAX_VALUE)
+					q = VersionFormatParser.ONE_OR_MANY_QUALIFIER;
+			}
+			return q;
+		}
+	}
+
+	private static class AutoFragment extends RangeFragment {
+		private static final long serialVersionUID = -1016534328164247755L;
+
+		AutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+			super(instr, qualifier);
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			maxPos = checkRange(pos, maxPos);
+			if (maxPos < 0)
+				return false;
+
+			char c = version.charAt(pos);
+			if (VersionParser.isDigit(c) && isAllowed(c)) {
+				// Parse to next non-digit
+				//
+				int start = pos;
+				int value = c - '0';
+				while (++pos < maxPos) {
+					c = version.charAt(pos);
+					if (!(VersionParser.isDigit(c) && isAllowed(c)))
+						break;
+					value *= 10;
+					value += (c - '0');
+				}
+				int len = pos - start;
+				if (rangeMin > len || len > rangeMax)
+					return false;
+
+				if (!isIgnored())
+					segments.add(VersionParser.valueOf(value));
+				info.setPosition(pos);
+				return true;
+			}
+
+			if (!(VersionParser.isLetter(c) && isAllowed(c)))
+				return false;
+
+			// Parse to next non-letter or next delimiter
+			//
+			int start = pos++;
+			for (; pos < maxPos; ++pos) {
+				c = version.charAt(pos);
+				if (!(VersionParser.isLetter(c) && isAllowed(c)))
+					break;
+			}
+			int len = pos - start;
+			if (rangeMin > len || len > rangeMax)
+				return false;
+
+			if (!isIgnored())
+				segments.add(version.substring(start, pos));
+			info.setPosition(pos);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append('a');
+			super.toString(sb);
+		}
+	}
+
+	private static class DelimiterFragment extends Fragment {
+		private static final long serialVersionUID = 8173654376143370605L;
+		private final char[] delimChars;
+		private final boolean inverted;
+
+		DelimiterFragment(VersionFormatParser.Instructions ep, Qualifier qualifier) {
+			super(qualifier);
+			if (ep == null) {
+				delimChars = null;
+				inverted = false;
+			} else {
+				inverted = ep.inverted;
+				delimChars = ep.characters;
+			}
+		}
+
+		boolean isMatch(String version, int pos) {
+			char c = version.charAt(pos);
+			if (delimChars != null) {
+				for (int idx = 0; idx < delimChars.length; ++idx)
+					if (c == delimChars[idx])
+						return !inverted;
+				return inverted;
+			} else if (VersionParser.isLetterOrDigit(c))
+				return false;
+
+			return true;
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			if (pos < maxPos && isMatch(version, pos)) {
+				// Just swallow, a delimiter does not contribute to the vector.
+				//
+				info.setPosition(pos + 1);
+				return true;
+			}
+			return false;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append('d');
+			if (delimChars != null)
+				appendCharacterRange(sb, delimChars, inverted);
+			super.toString(sb);
+		}
+	}
+
+	static void appendCharacterRange(StringBuffer sb, char[] range, boolean inverted) {
+		sb.append('=');
+		sb.append('[');
+		if (inverted)
+			sb.append('^');
+		int top = range.length;
+		for (int idx = 0; idx < top; ++idx) {
+			char b = range[idx];
+			if (b == '\\' || b == ']' || (b == '-' && idx + 1 < top))
+				sb.append('\\');
+
+			sb.append(b);
+			int ndx = idx + 1;
+			if (ndx + 2 < top) {
+				char c = b;
+				for (; ndx < top; ++ndx) {
+					char n = range[ndx];
+					if (c + 1 != n)
+						break;
+					c = n;
+				}
+				if (ndx <= idx + 3)
+					continue;
+
+				sb.append('-');
+				if (c == '\\' || c == ']' || (c == '-' && idx + 1 < top))
+					sb.append('\\');
+				sb.append(c);
+				idx = ndx - 1;
+			}
+		}
+		sb.append(']');
+		sb.append(';');
+	}
+
+	static Fragment createAutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+		return new AutoFragment(instr, qualifier);
+	}
+
+	static Fragment createDelimiterFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+		return new DelimiterFragment(instr, qualifier);
+	}
+
+	static Fragment createGroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
+		return new GroupFragment(instr, qualifier, fragments, array);
+	}
+
+	static Fragment createLiteralFragment(Qualifier qualifier, String literal) {
+		return new LiteralFragment(qualifier, literal);
+	}
+
+	static Fragment createNumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
+		return new NumberFragment(instr, qualifier, signed);
+	}
+
+	static Fragment createPadFragment(Qualifier qualifier) {
+		return new PadFragment(qualifier);
+	}
+
+	static Fragment createQuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+		return new QuotedFragment(instr, qualifier);
+	}
+
+	static Fragment createRawFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+		return new RawFragment(instr, qualifier);
+	}
+
+	static Fragment createStringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean unbound) {
+		return new StringFragment(instr, qualifier, unbound);
+	}
+
+	static boolean equalsAllowNull(Object a, Object b) {
+		return (a == null) ? (b == null) : (b != null && a.equals(b));
+	}
+
+	private static abstract class ElementFragment extends Fragment {
+		private static final long serialVersionUID = -6834591415456539713L;
+		private final Comparable<?> defaultValue;
+		private final boolean ignored;
+		private final Comparable<?> padValue;
+
+		ElementFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+			super(qualifier);
+			if (instr != null) {
+				ignored = instr.ignore;
+				defaultValue = instr.defaultValue;
+				padValue = instr.padValue;
+			} else {
+				ignored = false;
+				defaultValue = null;
+				padValue = null;
+			}
+		}
+
+		Comparable<?> getDefaultValue() {
+			return defaultValue;
+		}
+
+		Comparable<?> getPadValue() {
+			return padValue;
+		}
+
+		boolean isIgnored() {
+			return ignored;
+		}
+
+		void setDefaults(List<Comparable<?>> segments) {
+			Comparable<?> defaultVal = getDefaultValue();
+			if (defaultVal != null)
+				segments.add(defaultVal);
+		}
+
+		void toString(StringBuffer sb) {
+			if (ignored) {
+				sb.append('=');
+				sb.append('!');
+				sb.append(';');
+			}
+			if (defaultValue != null) {
+				sb.append('=');
+				VersionFormat.rawToString(sb, false, defaultValue);
+				sb.append(';');
+			}
+			if (padValue != null) {
+				sb.append('=');
+				sb.append('p');
+				VersionFormat.rawToString(sb, false, padValue);
+				sb.append(';');
+			}
+			super.toString(sb);
+		}
+	}
+
+	private static class GroupFragment extends ElementFragment {
+		private static final long serialVersionUID = 9219978678087669699L;
+		private final boolean array;
+		private final Fragment[] fragments;
+
+		GroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
+			super(instr, qualifier);
+			this.fragments = fragments;
+			this.array = array;
+		}
+
+		public boolean isGroup() {
+			return !array;
+		}
+
+		Fragment getFirstLeaf() {
+			return fragments[0].getFirstLeaf();
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			if (array) {
+				ArrayList<Comparable<?>> subSegs = new ArrayList<Comparable<?>>();
+				boolean success = fragments[0].getQualifier().parse(fragments, 0, subSegs, version, maxPos, info);
+				if (!success || subSegs.isEmpty())
+					return false;
+
+				Comparable<?> padValue = info.getPadValue();
+				if (padValue != null)
+					info.setPadValue(null); // Prevent outer group from getting this.
+				else
+					padValue = getPadValue();
+
+				padValue = VersionParser.removeRedundantTrail(segments, padValue);
+				segments.add(new VersionVector(subSegs.toArray(new Comparable[subSegs.size()]), padValue));
+				return true;
+			}
+
+			if (fragments[0].getQualifier().parse(fragments, 0, segments, version, maxPos, info)) {
+				Comparable<?> padValue = getPadValue();
+				if (padValue != null)
+					info.setPadValue(padValue);
+				return true;
+			}
+			return false;
+		}
+
+		void setDefaults(List<Comparable<?>> segments) {
+			Comparable<?> dflt = getDefaultValue();
+			if (dflt != null) {
+				// A group default overrides any defaults within the
+				// group fragments
+				super.setDefaults(segments);
+			} else {
+				// Assign defaults for all fragments
+				for (int idx = 0; idx < fragments.length; ++idx)
+					fragments[idx].setDefaults(segments);
+			}
+		}
+
+		void toString(StringBuffer sb) {
+			if (array) {
+				sb.append('<');
+				for (int idx = 0; idx < fragments.length; ++idx)
+					fragments[idx].toString(sb);
+				sb.append('>');
+			} else {
+				if (getQualifier() == VersionFormatParser.ZERO_OR_ONE_QUALIFIER) {
+					sb.append('[');
+					for (int idx = 0; idx < fragments.length; ++idx)
+						fragments[idx].toString(sb);
+					sb.append(']');
+				} else {
+					sb.append('(');
+					for (int idx = 0; idx < fragments.length; ++idx)
+						fragments[idx].toString(sb);
+					sb.append(')');
+				}
+			}
+			super.toString(sb);
+		}
+	}
+
+	private static class LiteralFragment extends Fragment {
+		private static final long serialVersionUID = 6210696245839471802L;
+		private final String string;
+
+		LiteralFragment(Qualifier qualifier, String string) {
+			super(qualifier);
+			this.string = string;
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			int litLen = string.length();
+			if (pos + litLen > maxPos)
+				return false;
+
+			for (int idx = 0; idx < litLen; ++idx, ++pos) {
+				if (string.charAt(idx) != version.charAt(pos))
+					return false;
+			}
+			info.setPosition(pos);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			String str = string;
+			if (str.length() != 1) {
+				sb.append('\'');
+				VersionFormatParser.toStringEscaped(sb, str, "\'"); //$NON-NLS-1$
+				sb.append('\'');
+			} else {
+				char c = str.charAt(0);
+				switch (c) {
+					case '\'' :
+					case '\\' :
+					case '<' :
+					case '[' :
+					case '(' :
+					case '{' :
+					case '?' :
+					case '*' :
+					case '+' :
+					case '=' :
+						sb.append('\\');
+						sb.append(c);
+						break;
+					default :
+						if (VersionParser.isLetterOrDigit(c)) {
+							sb.append('\\');
+							sb.append(c);
+						} else
+							sb.append(c);
+				}
+			}
+			super.toString(sb);
+		}
+	}
+
+	private static class NumberFragment extends RangeFragment {
+		private static final long serialVersionUID = -8552754381106711507L;
+		private final boolean signed;
+
+		NumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
+			super(instr, qualifier);
+			this.signed = signed;
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			maxPos = checkRange(pos, maxPos);
+			if (maxPos < 0)
+				return false;
+
+			// Parse to next non-digit
+			//
+			int start = pos;
+			int value;
+
+			char c = version.charAt(pos);
+			if (signed || characters != null) {
+				boolean negate = false;
+				if (signed && c == '-' && pos + 1 < maxPos) {
+					negate = true;
+					c = version.charAt(++pos);
+				}
+
+				if (!(c >= '0' && c <= '9' && isAllowed(c)))
+					return false;
+
+				// Parse to next non-digit
+				//
+				value = c - '0';
+				while (++pos < maxPos) {
+					c = version.charAt(pos);
+					if (!(c >= '0' && c <= '9' && isAllowed(c)))
+						break;
+					value *= 10;
+					value += (c - '0');
+				}
+				if (negate)
+					value = -value;
+			} else {
+				if (c < '0' || c > '9')
+					return false;
+
+				// Parse to next non-digit
+				//
+				value = c - '0';
+				while (++pos < maxPos) {
+					c = version.charAt(pos);
+					if (c < '0' || c > '9')
+						break;
+					value *= 10;
+					value += (c - '0');
+				}
+			}
+
+			int len = pos - start;
+			if (rangeMin > len || len > rangeMax)
+				return false;
+
+			if (!isIgnored())
+				segments.add(VersionParser.valueOf(value));
+			info.setPosition(pos);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append(signed ? 'N' : 'n');
+			super.toString(sb);
+		}
+	}
+
+	private static class PadFragment extends ElementFragment {
+		private static final long serialVersionUID = 5052010199974380170L;
+
+		PadFragment(Qualifier qualifier) {
+			super(null, qualifier);
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			if (pos >= maxPos || version.charAt(pos) != 'p')
+				return false;
+
+			int[] position = new int[] {++pos};
+			Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
+			if (v == null)
+				return false;
+
+			if (!isIgnored())
+				info.setPadValue(v);
+			info.setPosition(position[0]);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append('p');
+			super.toString(sb);
+		}
+	}
+
+	private static class QuotedFragment extends RangeFragment {
+		private static final long serialVersionUID = 6057751133533608969L;
+
+		QuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+			super(instr, qualifier);
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			if (pos >= maxPos)
+				return false;
+
+			char endQuote;
+			char quote = version.charAt(pos);
+			switch (quote) {
+				case '<' :
+					endQuote = '>';
+					break;
+				case '{' :
+					endQuote = '}';
+					break;
+				case '(' :
+					endQuote = ')';
+					break;
+				case '[' :
+					endQuote = ']';
+					break;
+				case '>' :
+					endQuote = '<';
+					break;
+				case '}' :
+					endQuote = '{';
+					break;
+				case ')' :
+					endQuote = '(';
+					break;
+				case ']' :
+					endQuote = '[';
+					break;
+				default :
+					if (VersionParser.isLetterOrDigit(quote))
+						return false;
+					endQuote = quote;
+			}
+			int start = ++pos;
+			char c = version.charAt(pos);
+			while (c != endQuote && isAllowed(c) && ++pos < maxPos)
+				c = version.charAt(pos);
+
+			if (c != endQuote || rangeMin > pos - start)
+				// End quote not found
+				return false;
+
+			int len = pos - start;
+			if (rangeMin > len || len > rangeMax)
+				return false;
+
+			if (!isIgnored())
+				segments.add(version.substring(start, pos));
+			info.setPosition(++pos); // Skip quote
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append('q');
+			super.toString(sb);
+		}
+	}
+
+	private static abstract class RangeFragment extends ElementFragment {
+		private static final long serialVersionUID = -6680402803630334708L;
+		final char[] characters;
+		final boolean inverted;
+		final int rangeMax;
+		final int rangeMin;
+
+		RangeFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
+			super(instr, qualifier);
+			if (instr == null) {
+				characters = null;
+				inverted = false;
+				rangeMin = 0;
+				rangeMax = Integer.MAX_VALUE;
+			} else {
+				characters = instr.characters;
+				inverted = instr.inverted;
+				rangeMin = instr.rangeMin;
+				rangeMax = instr.rangeMax;
+			}
+		}
+
+		/**
+		 * Checks that pos is at a valid character position, that we
+		 * have at least the required minimum characters left, and
+		 * if a maximum number of characters is set, limits the
+		 * returned value to a maxPos that reflects that maximum.
+		 * @param pos the current position
+		 * @param maxPos the current maxPos
+		 * @return maxPos, possibly limited by rangeMax
+		 */
+		int checkRange(int pos, int maxPos) {
+			int check = pos;
+			if (rangeMin == 0)
+				check++; // Verify one character
+			else
+				check += rangeMin;
+
+			if (check > maxPos)
+				// Less then min characters left
+				maxPos = -1;
+			else {
+				if (rangeMax != Integer.MAX_VALUE) {
+					check = pos + rangeMax;
+					if (check < maxPos)
+						maxPos = check;
+				}
+			}
+			return maxPos;
+		}
+
+		boolean isAllowed(char c) {
+			char[] crs = characters;
+			if (crs != null) {
+				int idx = crs.length;
+				while (--idx >= 0)
+					if (c == crs[idx])
+						return !inverted;
+				return inverted;
+			}
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			if (characters != null)
+				appendCharacterRange(sb, characters, inverted);
+			if (rangeMin != 0 || rangeMax != Integer.MAX_VALUE) {
+				sb.append('=');
+				sb.append('{');
+				sb.append(rangeMin);
+				if (rangeMin != rangeMax) {
+					sb.append(',');
+					if (rangeMax != Integer.MAX_VALUE)
+						sb.append(rangeMax);
+				}
+				sb.append('}');
+				sb.append(';');
+			}
+			super.toString(sb);
+		}
+	}
+
+	private static class RawFragment extends ElementFragment {
+		private static final long serialVersionUID = 4107448125256042602L;
+
+		RawFragment(VersionFormatParser.Instructions processing, Qualifier qualifier) {
+			super(processing, qualifier);
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int[] position = new int[] {info.getPosition()};
+			Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
+			if (v == null)
+				return false;
+
+			if (!isIgnored())
+				segments.add(v);
+			info.setPosition(position[0]);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append('r');
+			super.toString(sb);
+		}
+	}
+
+	private static class StringFragment extends RangeFragment {
+		private static final long serialVersionUID = -2265924553606430164L;
+		final boolean anyChar;
+		private final char oppositeTranslationChar;
+		private final int oppositeTranslationRepeat;
+
+		StringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean noLimit) {
+			super(instr, qualifier);
+			anyChar = noLimit;
+			char otc = 0;
+			int otr = 0;
+			if (instr != null) {
+				otc = instr.oppositeTranslationChar;
+				otr = instr.oppositeTranslationRepeat;
+				if (instr.defaultValue == VersionVector.MINS_VALUE) {
+					if (otc == 0)
+						otc = 'z';
+					if (otr == 0)
+						otr = 3;
+				} else if (instr.defaultValue == VersionVector.MAXS_VALUE) {
+					if (otc == 0)
+						otc = '-';
+					otr = 1;
+				}
+			}
+			oppositeTranslationChar = otc;
+			oppositeTranslationRepeat = otr;
+		}
+
+		Comparable<?> getOppositeDefaultValue() {
+			Comparable<?> dflt = getDefaultValue();
+			return dflt == VersionVector.MAXS_VALUE ? VersionVector.MINS_VALUE : (dflt == VersionVector.MINS_VALUE ? VersionVector.MAXS_VALUE : null);
+		}
+
+		public boolean isOppositeTranslation(Object val) {
+			if (val instanceof String) {
+				String str = (String) val;
+				int idx = oppositeTranslationRepeat;
+				if (str.length() == idx) {
+					while (--idx >= 0)
+						if (str.charAt(idx) != oppositeTranslationChar)
+							break;
+					return idx < 0;
+				}
+			}
+			return false;
+		}
+
+		boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
+			int pos = info.getPosition();
+			maxPos = checkRange(pos, maxPos);
+			if (maxPos < 0)
+				return false;
+
+			// Parse to next delimiter or end of string
+			//
+			int start = pos;
+			if (characters != null) {
+				if (anyChar) {
+					// Swallow everything that matches the allowed characters
+					for (; pos < maxPos; ++pos) {
+						if (!isAllowed(version.charAt(pos)))
+							break;
+					}
+				} else {
+					// Swallow letters that matches the allowed characters
+					for (; pos < maxPos; ++pos) {
+						char c = version.charAt(pos);
+						if (!(VersionParser.isLetter(c) && isAllowed(c)))
+							break;
+					}
+				}
+			} else {
+				if (anyChar)
+					// Swallow all characters
+					pos = maxPos;
+				else {
+					// Swallow all letters
+					for (; pos < maxPos; ++pos) {
+						if (!VersionParser.isLetter(version.charAt(pos)))
+							break;
+					}
+				}
+			}
+			int len = pos - start;
+			if (len == 0 || rangeMin > len || len > rangeMax)
+				return false;
+
+			if (!isIgnored())
+				segments.add(version.substring(start, pos));
+			info.setPosition(pos);
+			return true;
+		}
+
+		void toString(StringBuffer sb) {
+			sb.append(anyChar ? 'S' : 's');
+			super.toString(sb);
+		}
+	}
+
+	private int current;
+
+	private List<Fragment> currentList;
+
+	private int eos;
+
+	private String format;
+
+	private int start;
+
+	Fragment compile(String fmt, int pos, int maxPos) throws VersionFormatException {
+		format = fmt;
+		if (start >= maxPos)
+			throw new VersionFormatException(Messages.format_is_empty);
+
+		start = pos;
+		current = pos;
+		eos = maxPos;
+		currentList = new ArrayList<Fragment>();
+		while (current < eos)
+			parseFragment();
+
+		Fragment topFrag;
+		switch (currentList.size()) {
+			case 0 :
+				throw new VersionFormatException(Messages.format_is_empty);
+			case 1 :
+				Fragment frag = currentList.get(0);
+				if (frag.isGroup()) {
+					topFrag = frag;
+					break;
+				}
+				// Fall through to default
+			default :
+				topFrag = createGroupFragment(null, EXACT_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false);
+		}
+		currentList = null;
+		return topFrag;
+	}
+
+	private void assertChar(char expected) throws VersionFormatException {
+		if (current >= eos)
+			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, new String(new char[] {expected})));
+
+		char c = format.charAt(current);
+		if (c != expected)
+			throw formatException(c, new String(new char[] {expected}));
+		++current;
+	}
+
+	private VersionFormatException formatException(char found, String expected) {
+		return formatException(new String(new char[] {found}), expected);
+	}
+
+	private VersionFormatException formatException(String message) {
+		return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), new Integer(current), message}));
+	}
+
+	private VersionFormatException formatException(String found, String expected) {
+		return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), new Integer(current), found, expected}));
+	}
+
+	private VersionFormatException illegalControlCharacter(char c) {
+		return formatException(NLS.bind(Messages.illegal_character_encountered_ascii_0, VersionParser.valueOf(c)));
+	}
+
+	private String parseAndConsiderEscapeUntil(char endChar) throws VersionFormatException {
+		StringBuffer sb = new StringBuffer();
+		while (current < eos) {
+			char c = format.charAt(current++);
+			if (c == endChar)
+				break;
+
+			if (c < 32)
+				throw illegalControlCharacter(c);
+
+			if (c == '\\') {
+				if (current == eos)
+					throw formatException(Messages.EOS_after_escape);
+				c = format.charAt(current++);
+				if (c < 32)
+					throw illegalControlCharacter(c);
+			}
+			sb.append(c);
+		}
+		return sb.toString();
+	}
+
+	private void parseAuto() throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.padValue != null)
+				throw formatException(Messages.auto_can_not_have_pad_value);
+		}
+		currentList.add(createAutoFragment(ep, parseQualifier()));
+	}
+
+	private void parseBracketGroup() throws VersionFormatException {
+		List<Fragment> saveList = currentList;
+		currentList = new ArrayList<Fragment>();
+		while (current < eos && format.charAt(current) != ']')
+			parseFragment();
+
+		if (current == eos)
+			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "]")); //$NON-NLS-1$
+
+		++current;
+		VersionFormatParser.Instructions ep = parseProcessing();
+		saveList.add(createGroupFragment(ep, ZERO_OR_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false));
+		currentList = saveList;
+	}
+
+	private void parseCharacterGroup(VersionFormatParser.Instructions ep) throws VersionFormatException {
+		assertChar('[');
+
+		StringBuffer sb = new StringBuffer();
+		outer: for (; current < eos; ++current) {
+			char c = format.charAt(current);
+			switch (c) {
+				case '\\' :
+					if (current + 1 < eos) {
+						sb.append(format.charAt(++current));
+						continue;
+					}
+					throw formatException(Messages.premature_end_of_format);
+				case '^' :
+					if (sb.length() == 0)
+						ep.inverted = true;
+					else
+						sb.append(c);
+					continue;
+				case ']' :
+					break outer;
+				case '-' :
+					if (sb.length() > 0 && current + 1 < eos) {
+						char rangeEnd = format.charAt(++current);
+						if (rangeEnd == ']') {
+							// Use dash verbatim when last in range
+							sb.append(c);
+							break outer;
+						}
+
+						char rangeStart = sb.charAt(sb.length() - 1);
+						if (rangeEnd < rangeStart)
+							throw formatException(Messages.negative_character_range);
+						while (++rangeStart <= rangeEnd)
+							sb.append(rangeStart);
+						continue;
+					}
+					// Fall through to default
+				default :
+					if (c < 32)
+						throw illegalControlCharacter(c);
+					sb.append(c);
+			}
+		}
+		assertChar(']');
+		int top = sb.length();
+		char[] chars = new char[top];
+		sb.getChars(0, top, chars, 0);
+		ep.characters = chars;
+	}
+
+	private void parseDelimiter() throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.rangeMin != 0 || ep.rangeMax != Integer.MAX_VALUE)
+				throw formatException(Messages.delimiter_can_not_have_range);
+			if (ep.ignore)
+				throw formatException(Messages.delimiter_can_not_be_ignored);
+			if (ep.defaultValue != null)
+				throw formatException(Messages.delimiter_can_not_have_default_value);
+			if (ep.padValue != null)
+				throw formatException(Messages.delimiter_can_not_have_pad_value);
+		}
+		currentList.add(createDelimiterFragment(ep, parseQualifier()));
+	}
+
+	private void parseFragment() throws VersionFormatException {
+		if (current == eos)
+			throw formatException(Messages.premature_end_of_format);
+		char c = format.charAt(current++);
+		switch (c) {
+			case '(' :
+				parseGroup(false);
+				break;
+			case '<' :
+				parseGroup(true);
+				break;
+			case '[' :
+				parseBracketGroup();
+				break;
+			case 'a' :
+				parseAuto();
+				break;
+			case 'r' :
+				parseRaw();
+				break;
+			case 'n' :
+				parseNumber(false);
+				break;
+			case 'N' :
+				parseNumber(true);
+				break;
+			case 's' :
+				parseString(false);
+				break;
+			case 'S' :
+				parseString(true);
+				break;
+			case 'd' :
+				parseDelimiter();
+				break;
+			case 'q' :
+				parseQuotedString();
+				break;
+			case 'p' :
+				parsePad();
+				break;
+			default :
+				parseLiteral(c);
+		}
+	}
+
+	private void parseGroup(boolean array) throws VersionFormatException {
+		List<Fragment> saveList = currentList;
+		currentList = new ArrayList<Fragment>();
+		char expectedEnd = array ? '>' : ')';
+		while (current < eos && format.charAt(current) != expectedEnd)
+			parseFragment();
+		assertChar(expectedEnd);
+
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.characters != null)
+				throw formatException(Messages.array_can_not_have_character_group);
+			if (ep.rangeMax != Integer.MAX_VALUE && ep.padValue != null) {
+				throw formatException(Messages.cannot_combine_range_upper_bound_with_pad_value);
+			}
+		}
+
+		if (currentList.isEmpty())
+			throw formatException(array ? Messages.array_can_not_be_empty : Messages.group_can_not_be_empty);
+		saveList.add(createGroupFragment(ep, parseQualifier(), currentList.toArray(new Fragment[currentList.size()]), array));
+		currentList = saveList;
+	}
+
+	private int parseIntegerLiteral() throws VersionFormatException {
+		if (current == eos)
+			throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "<integer>")); //$NON-NLS-1$
+
+		char c = format.charAt(current);
+		if (!VersionParser.isDigit(c))
+			throw formatException(c, "<integer>"); //$NON-NLS-1$
+
+		int value = c - '0';
+		while (++current < eos) {
+			c = format.charAt(current);
+			if (!VersionParser.isDigit(c))
+				break;
+			value *= 10;
+			value += (c - '0');
+		}
+		return value;
+	}
+
+	private void parseLiteral(char c) throws VersionFormatException {
+		String value;
+		switch (c) {
+			case '\'' :
+				value = parseAndConsiderEscapeUntil(c);
+				break;
+			case ')' :
+			case ']' :
+			case '{' :
+			case '}' :
+			case '?' :
+			case '*' :
+				throw formatException(c, "<literal>"); //$NON-NLS-1$
+			default :
+				if (VersionParser.isLetterOrDigit(c))
+					throw formatException(c, "<literal>"); //$NON-NLS-1$
+
+				if (c < 32)
+					throw illegalControlCharacter(c);
+
+				if (c == '\\') {
+					if (current == eos)
+						throw formatException(Messages.EOS_after_escape);
+					c = format.charAt(current++);
+					if (c < 32)
+						throw illegalControlCharacter(c);
+				}
+				value = new String(new char[] {c});
+		}
+		currentList.add(createLiteralFragment(parseQualifier(), value));
+	}
+
+	private int[] parseMinMax() throws VersionFormatException {
+
+		int max = Integer.MAX_VALUE;
+		++current;
+		int min = parseIntegerLiteral();
+		char c = format.charAt(current);
+		if (c == '}') {
+			max = min;
+			if (max == 0)
+				throw formatException(Messages.range_max_cannot_be_zero);
+			++current;
+		} else if (c == ',' && current + 1 < eos) {
+			if (format.charAt(++current) != '}') {
+				max = parseIntegerLiteral();
+				if (max == 0)
+					throw formatException(Messages.range_max_cannot_be_zero);
+				if (max < min)
+					throw formatException(Messages.range_max_cannot_be_less_then_range_min);
+			}
+			assertChar('}');
+		} else
+			throw formatException(c, "},"); //$NON-NLS-1$
+		return new int[] {min, max};
+	}
+
+	private void parseNumber(boolean signed) throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.padValue != null)
+				throw formatException(Messages.number_can_not_have_pad_value);
+		}
+		currentList.add(createNumberFragment(ep, parseQualifier(), signed));
+	}
+
+	private void parsePad() throws VersionFormatException {
+		currentList.add(createPadFragment(parseQualifier()));
+	}
+
+	private VersionFormatParser.Instructions parseProcessing() throws VersionFormatException {
+		if (current >= eos)
+			return null;
+
+		char c = format.charAt(current);
+		if (c != '=')
+			return null;
+
+		VersionFormatParser.Instructions ep = new VersionFormatParser.Instructions();
+		do {
+			current++;
+			parseProcessingInstruction(ep);
+		} while (current < eos && format.charAt(current) == '=');
+		return ep;
+	}
+
+	private void parseProcessingInstruction(VersionFormatParser.Instructions processing) throws VersionFormatException {
+		if (current == eos)
+			throw formatException(Messages.premature_end_of_format);
+
+		char c = format.charAt(current);
+		if (c == 'p') {
+			// =pad(<raw-element>);
+			//
+			if (processing.padValue != null)
+				throw formatException(Messages.pad_defined_more_then_once);
+			if (processing.ignore)
+				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
+			++current;
+			processing.padValue = parseRawElement();
+		} else if (c == '!') {
+			// =ignore;
+			//
+			if (processing.ignore)
+				throw formatException(Messages.ignore_defined_more_then_once);
+			if (processing.padValue != null || processing.characters != null || processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE || processing.defaultValue != null)
+				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
+			++current;
+			processing.ignore = true;
+		} else if (c == '[') {
+			// =[<character group];
+			//
+			if (processing.characters != null)
+				throw formatException(Messages.character_group_defined_more_then_once);
+			if (processing.ignore)
+				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
+			parseCharacterGroup(processing);
+		} else if (c == '{') {
+			// ={min,max};
+			//
+			if (processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE)
+				throw formatException(Messages.range_defined_more_then_once);
+			if (processing.ignore)
+				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
+			int[] minMax = parseMinMax();
+			processing.rangeMin = minMax[0];
+			processing.rangeMax = minMax[1];
+		} else {
+			// =<raw-element>;
+			if (processing.defaultValue != null)
+				throw formatException(Messages.default_defined_more_then_once);
+			if (processing.ignore)
+				throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
+			Comparable<?> dflt = parseRawElement();
+			processing.defaultValue = dflt;
+			if (current < eos && format.charAt(current) == '{') {
+				// =m{<translated min char>}
+				// =''{<translated max char>,<max char repeat>}
+				if (++current == eos)
+					throw formatException(Messages.premature_end_of_format);
+				processing.oppositeTranslationChar = format.charAt(current++);
+				if (current == eos)
+					throw formatException(Messages.premature_end_of_format);
+
+				if (dflt == VersionVector.MINS_VALUE) {
+					processing.oppositeTranslationRepeat = 3;
+					if (format.charAt(current) == ',') {
+						++current;
+						processing.oppositeTranslationRepeat = parseIntegerLiteral();
+					}
+				} else if (dflt != VersionVector.MAXS_VALUE) {
+					current -= 2;
+					throw formatException(Messages.only_max_and_empty_string_defaults_can_have_translations);
+				}
+				assertChar('}');
+			}
+		}
+		assertChar(';');
+	}
+
+	private Qualifier parseQualifier() throws VersionFormatException {
+		if (current >= eos)
+			return EXACT_ONE_QUALIFIER;
+
+		char c = format.charAt(current);
+		if (c == '?') {
+			++current;
+			return ZERO_OR_ONE_QUALIFIER;
+		}
+
+		if (c == '*') {
+			++current;
+			return ZERO_OR_MANY_QUALIFIER;
+		}
+
+		if (c == '+') {
+			++current;
+			return ONE_OR_MANY_QUALIFIER;
+		}
+
+		if (c != '{')
+			return EXACT_ONE_QUALIFIER;
+
+		int[] minMax = parseMinMax();
+		int min = minMax[0];
+		int max = minMax[1];
+
+		// Use singletons for commonly used ranges
+		//
+		if (min == 0) {
+			if (max == 1)
+				return ZERO_OR_ONE_QUALIFIER;
+			if (max == Integer.MAX_VALUE)
+				return ZERO_OR_MANY_QUALIFIER;
+		} else if (min == 1) {
+			if (max == 1)
+				return EXACT_ONE_QUALIFIER;
+			if (max == Integer.MAX_VALUE)
+				return ONE_OR_MANY_QUALIFIER;
+		}
+		return new Qualifier(min, max);
+	}
+
+	private void parseQuotedString() throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.padValue != null)
+				throw formatException(Messages.string_can_not_have_pad_value);
+		}
+		currentList.add(createQuotedFragment(ep, parseQualifier()));
+	}
+
+	private void parseRaw() throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.padValue != null)
+				throw formatException(Messages.raw_element_can_not_have_pad_value);
+		}
+		currentList.add(createRawFragment(ep, parseQualifier()));
+	}
+
+	private Comparable<?> parseRawElement() throws VersionFormatException {
+		int[] position = new int[] {current};
+		Comparable<?> v = VersionParser.parseRawElement(format, position, eos);
+		if (v == null)
+			throw new VersionFormatException(NLS.bind(Messages.raw_element_expected_0, format));
+		current = position[0];
+		return v;
+	}
+
+	private void parseString(boolean unlimited) throws VersionFormatException {
+		VersionFormatParser.Instructions ep = parseProcessing();
+		if (ep != null) {
+			if (ep.padValue != null)
+				throw formatException(Messages.string_can_not_have_pad_value);
+		}
+		currentList.add(createStringFragment(ep, parseQualifier(), unlimited));
+	}
+
+	static void toStringEscaped(StringBuffer sb, String value, String escapes) {
+		for (int idx = 0; idx < value.length(); ++idx) {
+			char c = value.charAt(idx);
+			if (c == '\\' || escapes.indexOf(c) >= 0)
+				sb.append('\\');
+			sb.append(c);
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
new file mode 100644
index 0000000..49cb031
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionFormatException;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Omni Version parser. Not intended for public API. Instead use
+ * {@link Version#create(String)} or {@link Version#parseVersion(String)}.
+ *
+ * The class also contains some general purpose parser support methods
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public abstract class VersionParser {
+	public static final Integer ZERO_INT = new Integer(0);
+
+	public static final Integer MAX_INT_OBJ = new Integer(Integer.MAX_VALUE);
+
+	private static final Integer cache[] = new Integer[100];
+
+	static {
+		cache[0] = ZERO_INT;
+		for (int i = 1; i < cache.length; i++)
+			cache[i] = new Integer(i);
+	}
+
+	public static Integer valueOf(int i) {
+		if (i >= 0 && i < cache.length)
+			return cache[i];
+
+		return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i);
+	}
+
+	static Comparable<?> removeRedundantTrail(List<Comparable<?>> segments, Comparable<?> padValue) {
+		Comparable<?> redundantTrail;
+		if (padValue == null)
+			redundantTrail = VersionVector.MIN_VALUE;
+		else {
+			redundantTrail = padValue;
+			if (padValue == VersionVector.MIN_VALUE)
+				padValue = null;
+		}
+
+		int idx = segments.size();
+		while (--idx >= 0 && segments.get(idx).equals(redundantTrail))
+			segments.remove(idx);
+
+		return padValue;
+	}
+
+	private VersionParser() {
+		// Prevent class from being instantiated
+	}
+
+	/**
+	 * Parse the <code>version</code> string and assing the parsed portions to the <code>receiver</code>.
+	 * This method is called from the version string constructor.
+	 *
+	 * @param version The string to be parsed
+	 * @param start Start position in the <code>version</code> string
+	 * @param maxPos End position in the <code>version</code> string
+	 * @returns a version if one indeed was parsed or <code>null</code> if the string
+	 * contained only whitespace.
+	 * @throws IllegalArgumentException if the version is malformed
+	 */
+	public static Version parse(String version, int start, int maxPos) throws IllegalArgumentException {
+		// trim leading and trailing whitespace
+		int pos = skipWhite(version, start);
+		maxPos = skipTrailingWhite(version, start, maxPos);
+		if (pos == maxPos)
+			return null;
+
+		List<Comparable<?>> vector = null;
+		VersionFormat fmt = null;
+		char c = version.charAt(pos);
+		if (isDigit(c)) {
+			return OSGiVersion.fromVector(VersionFormat.OSGI_FORMAT.parse(version, pos, maxPos));
+		}
+
+		if (!isLetter(c))
+			throw new IllegalArgumentException();
+
+		if (version.startsWith(Version.RAW_PREFIX, pos)) {
+			VersionFormat rawFmt = VersionFormat.RAW_FORMAT;
+			pos += 4;
+
+			// Find ending '/' that is neither quoted or escaped
+			int end = maxPos;
+			for (int idx = pos; idx < maxPos; ++idx) {
+				c = version.charAt(idx);
+				switch (c) {
+					case '/' :
+						end = idx;
+						break;
+					case '\\' :
+						++idx;
+						continue;
+					case '\'' :
+					case '"' :
+						for (++idx; idx < maxPos; ++idx) {
+							char e = version.charAt(idx);
+							if (e == c) {
+								break;
+							}
+							if (e == '\\')
+								++idx;
+						}
+						// fall through to default
+					default :
+						continue;
+				}
+				break;
+			}
+
+			vector = rawFmt.parse(version, pos, end);
+			pos = end;
+			if (pos == maxPos)
+				// This was a pure raw version
+				//
+				return OmniVersion.fromVector(vector, null, null);
+
+			if (version.charAt(pos) != '/')
+				throw new IllegalArgumentException(NLS.bind(Messages.expected_slash_after_raw_vector_0, version.substring(start, maxPos)));
+			++pos;
+
+			if (pos == maxPos)
+				throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_slash_0, version.substring(start, maxPos)));
+		}
+
+		if (version.startsWith("format(", pos)) { //$NON-NLS-1$
+			// Parse the format
+			//
+			pos += 7;
+			try {
+				// Find matching ')' that is neither quoted or escaped
+				//
+				int end = findEndOfFormat(version, pos, maxPos);
+				fmt = VersionFormat.compile(version, pos, end);
+				pos = end + 1;
+			} catch (VersionFormatException e) {
+				throw new IllegalArgumentException(e.getMessage());
+			}
+			if (pos == maxPos) {
+				// This was a raw version with format but no original
+				//
+				if (vector == null)
+					throw new IllegalArgumentException(NLS.bind(Messages.only_format_specified_0, version.substring(start, maxPos)));
+				return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, null);
+			}
+		}
+
+		if (fmt == null && vector == null)
+			throw new IllegalArgumentException(NLS.bind(Messages.neither_raw_vector_nor_format_specified_0, version.substring(start, maxPos)));
+
+		if (version.charAt(pos) != ':')
+			throw new IllegalArgumentException(NLS.bind(Messages.colon_expected_before_original_version_0, version.substring(start, maxPos)));
+
+		pos++;
+		if (pos == maxPos)
+			throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_colon_0, version.substring(start, maxPos)));
+
+		if (vector == null) {
+			// Vector and pad must be created by parsing the original
+			//
+			vector = fmt.parse(version, pos, maxPos);
+		}
+		return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, version.substring(pos));
+	}
+
+	static boolean isDigit(char c) {
+		return c >= '0' && c <= '9';
+	}
+
+	public static boolean isLetter(char c) {
+		return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+	}
+
+	static boolean isLetterOrDigit(char c) {
+		return isDigit(c) || isLetter(c);
+	}
+
+	public static int findEndOfFormat(String string, int pos, int maxPos) {
+		int end = -1;
+		int depth = 1;
+		for (int idx = pos; idx < maxPos; ++idx) {
+			char c = string.charAt(idx);
+			switch (c) {
+				case ')' :
+					if (--depth == 0) {
+						end = idx;
+						break;
+					}
+					continue;
+				case '(' :
+					++depth;
+					continue;
+				case '\\' :
+					++idx;
+					continue;
+				case '\'' :
+				case '"' :
+					for (++idx; idx < maxPos; ++idx) {
+						char e = string.charAt(idx);
+						if (e == c) {
+							break;
+						}
+						if (e == '\\')
+							++idx;
+					}
+					// fall through to default
+				default :
+					continue;
+			}
+			break;
+		}
+		if (depth != 0)
+			throw new IllegalArgumentException(NLS.bind(Messages.unbalanced_format_parenthesis, string.substring(pos - 1, maxPos)));
+		return end;
+	}
+
+	static Comparable<?> parseRawElement(String value, int[] position, int maxPos) {
+		int current = position[0];
+		if (current >= maxPos)
+			return null;
+
+		boolean negate = false;
+		char c = value.charAt(current);
+		Comparable<?> v;
+		switch (c) {
+			case '\'' :
+			case '"' : {
+				StringBuffer sb = new StringBuffer();
+				for (;;) {
+					char q = c;
+					if (++current == maxPos)
+						return null;
+					c = value.charAt(current);
+					while (c != q) {
+						if (c < 32)
+							return null;
+						sb.append(c);
+						if (++current == maxPos)
+							return null;
+						c = value.charAt(current);
+					}
+					if (++current == maxPos)
+						break;
+					c = value.charAt(current);
+					if (c != '\'' && c != '"')
+						break;
+				}
+				v = sb.length() == 0 ? VersionVector.MINS_VALUE : sb.toString();
+				break;
+			}
+			case '<' : {
+				if (++current == maxPos)
+					return null;
+
+				position[0] = current;
+				v = parseRawVector(value, position, maxPos);
+				if (v == null)
+					return null;
+				current = position[0];
+				break;
+			}
+			case 'm' :
+				v = VersionVector.MAXS_VALUE;
+				++current;
+				break;
+			case 'M' :
+				v = VersionVector.MAX_VALUE;
+				++current;
+				break;
+			case '-' :
+				if (++current >= maxPos)
+					return null;
+
+				c = value.charAt(current);
+				if (c == 'M') {
+					++current;
+					v = VersionVector.MIN_VALUE;
+					break;
+				}
+				negate = true;
+				// Fall through to default
+			default : {
+				if (isDigit(c)) {
+					int start = current++;
+					while (current < maxPos && isDigit(value.charAt(current)))
+						++current;
+					int val = Integer.parseInt(value.substring(start, current));
+					if (negate)
+						val = -val;
+					v = valueOf(val);
+					break;
+				}
+				return null;
+			}
+		}
+		position[0] = current;
+		return v;
+	}
+
+	private static Comparable<?> parseRawVector(String value, int[] position, int maxPos) {
+		int pos = position[0];
+		if (pos >= maxPos)
+			return null;
+
+		char c = value.charAt(pos);
+		if (c == '>')
+			return null;
+
+		ArrayList<Comparable<?>> rawList = new ArrayList<Comparable<?>>();
+		boolean padMarkerSeen = (c == 'p');
+		if (padMarkerSeen) {
+			if (++pos >= maxPos)
+				return null;
+			position[0] = pos;
+		}
+
+		Comparable<?> pad = null;
+		for (;;) {
+			Comparable<?> elem = parseRawElement(value, position, maxPos);
+			if (elem == null)
+				return null;
+
+			if (padMarkerSeen)
+				pad = elem;
+			else
+				rawList.add(elem);
+
+			pos = position[0];
+			if (pos >= maxPos)
+				return null;
+
+			c = value.charAt(pos);
+			position[0] = ++pos;
+			if (c == '>')
+				break;
+
+			if (padMarkerSeen || pos >= maxPos)
+				return null;
+
+			if (c == 'p') {
+				padMarkerSeen = true;
+				continue;
+			}
+
+			if (c != '.')
+				return null;
+		}
+		pad = removeRedundantTrail(rawList, pad);
+		return new VersionVector(rawList.toArray(new Comparable[rawList.size()]), pad);
+	}
+
+	public static int skipWhite(String string, int pos) {
+		int top = string.length();
+		while (pos < top && string.charAt(pos) <= ' ')
+			++pos;
+		return pos;
+	}
+
+	public static int skipTrailingWhite(String string, int start, int end) {
+		while (end > start && string.charAt(end - 1) <= ' ')
+			--end;
+		return end;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
new file mode 100644
index 0000000..1d1e312
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
@@ -0,0 +1,337 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata;
+
+import java.io.Serializable;
+
+/**
+ * The VersionVector represents an array of Comparable objects. The array can be
+ * nested since a VersionVector is Comparable in itself.
+ *  
+ * @Immutable
+ */
+public class VersionVector implements Comparable<VersionVector>, Serializable {
+
+	interface MinMaxComparable extends Comparable<Object>, Serializable {
+		//
+	}
+
+	private static final class MaxStringValue implements MinMaxComparable {
+		private static final long serialVersionUID = -4936252230441132767L;
+
+		MaxStringValue() {
+			// Empty constructor
+		}
+
+		public int compareTo(Object o) {
+			return o == this ? 0 : (o == MAX_VALUE || o instanceof Integer || o instanceof VersionVector ? -1 : 1);
+		}
+
+		// For singleton deserialization
+		private Object readResolve() {
+			return MAXS_VALUE;
+		}
+
+		public String toString() {
+			return "m"; //$NON-NLS-1$
+		}
+	}
+
+	private static final class MaxValue implements MinMaxComparable {
+		private static final long serialVersionUID = -5889641741635253589L;
+
+		MaxValue() {
+			// Empty constructor
+		}
+
+		public int compareTo(Object o) {
+			return o == this ? 0 : 1;
+		}
+
+		// For singleton deserialization
+		private Object readResolve() {
+			return MAX_VALUE;
+		}
+
+		public String toString() {
+			return "M"; //$NON-NLS-1$
+		}
+	}
+
+	private static class MinValue implements MinMaxComparable {
+		private static final long serialVersionUID = -1066323980049812226L;
+
+		MinValue() {
+			// Empty constructor
+		}
+
+		public int compareTo(Object o) {
+			return o == this ? 0 : -1;
+		}
+
+		private Object readResolve() {
+			return MIN_VALUE;
+		}
+
+		public String toString() {
+			return "-M"; //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * A value that is greater then any other value
+	 */
+	public static final Comparable<Object> MAX_VALUE = new MaxValue();
+
+	/**
+	 * A value that is greater then any string but less then {@link #MAX_VALUE} and
+	 * any Integer or VersionVector.
+	 */
+	public static final Comparable<Object> MAXS_VALUE = new MaxStringValue();
+
+	/**
+	 * A value that is less then any other value
+	 */
+	public static final Comparable<Object> MIN_VALUE = new MinValue();
+
+	/**
+	 * A value that is greater then {@link #MIN_VALUE} and less then any string,
+	 * Integer, or VersionVector (a.k.a. empty_string)
+	 */
+	public static final String MINS_VALUE = ""; //$NON-NLS-1$
+
+	private static final long serialVersionUID = -8385373304298723744L;
+
+	static int compare(Comparable<?>[] vectorA, Comparable<?> padA, Comparable<?>[] vectorB, Comparable<?> padB) {
+		int top = vectorA.length;
+		if (top > vectorB.length)
+			top = vectorB.length;
+
+		for (int idx = 0; idx < top; ++idx) {
+			int cmp = compareSegments(vectorA[idx], vectorB[idx]);
+			if (cmp != 0)
+				return cmp;
+		}
+
+		// All elements compared equal up to this point. Check
+		// pad values
+		if (top < vectorA.length)
+			return (padB == null) ? 1 : compareReminder(top, vectorA, padA, padB);
+
+		if (top < vectorB.length)
+			return (padA == null) ? -1 : -compareReminder(top, vectorB, padB, padA);
+
+		// Lengths are equal. Compare pad values
+		return padA == null ? (padB == null ? 0 : -1) : (padB == null ? 1 : compareSegments(padA, padB));
+	}
+
+	static boolean equals(Comparable<?>[] vectorA, Comparable<?> padValueA, Comparable<?>[] vectorB, Comparable<?> padValueB) {
+		// We compare pad first since it is impossible for versions with
+		// different pad to be equal (versions are padded to infinity) 
+		if (padValueA == null) {
+			if (padValueB != null)
+				return false;
+		} else {
+			if (padValueB == null || !padValueA.equals(padValueB))
+				return false;
+		}
+
+		int idx = vectorA.length;
+
+		// If the length of the vector differs, the versions cannot be equal
+		// since segments equal to pad are stripped by the parser
+		if (idx != vectorB.length)
+			return false;
+
+		while (--idx >= 0)
+			if (!vectorA[idx].equals(vectorB[idx]))
+				return false;
+
+		return true;
+	}
+
+	static int hashCode(Comparable<?>[] vector, Comparable<?> padValue) {
+		int hashCode = padValue == null ? 31 : padValue.hashCode();
+		int idx = vector.length;
+		while (--idx >= 0) {
+			Object elem = vector[idx];
+			if (elem != null)
+				hashCode += elem.hashCode();
+			hashCode = hashCode * 31;
+		}
+		return hashCode;
+	}
+
+	static void toString(StringBuffer sb, Comparable<?>[] vector, Comparable<?> padValue, boolean rangeSafe) {
+		int top = vector.length;
+		if (top == 0)
+			// Write one pad value as explicit. It will be considered
+			// redundant and removed by the parser but the raw format
+			// does not allow zero elements
+			VersionFormat.rawToString(sb, rangeSafe, padValue == null ? MIN_VALUE : padValue);
+		else {
+			for (int idx = 0; idx < top; ++idx) {
+				if (idx > 0)
+					sb.append('.');
+				VersionFormat.rawToString(sb, rangeSafe, vector[idx]);
+			}
+		}
+		if (padValue != null) {
+			sb.append('p');
+			VersionFormat.rawToString(sb, rangeSafe, padValue);
+		}
+	}
+
+	private static int compareReminder(int idx, Comparable<?>[] vector, Comparable<?> padValue, Comparable<?> othersPad) {
+		int cmp;
+		for (cmp = 0; idx < vector.length && cmp == 0; ++idx)
+			cmp = compareSegments(vector[idx], othersPad);
+		if (cmp == 0)
+			cmp = (padValue == null) ? -1 : compareSegments(padValue, othersPad);
+		return cmp;
+	}
+
+	static int compareSegments(Comparable<?> a, Comparable<?> b) {
+		if (a == b)
+			return 0;
+
+		if (a instanceof Integer && b instanceof Integer) {
+			int ai = ((Integer) a).intValue();
+			int bi = ((Integer) b).intValue();
+			return ai > bi ? 1 : (ai < bi ? -1 : 0);
+		}
+
+		if (a instanceof String && b instanceof String)
+			return ((String) a).compareTo((String) b);
+
+		if (a == MAX_VALUE || a == MIN_VALUE || a == MAXS_VALUE)
+			return ((MinMaxComparable) a).compareTo(b);
+
+		if (b == MAX_VALUE || b == MIN_VALUE || b == MAXS_VALUE)
+			return -((MinMaxComparable) b).compareTo(a);
+
+		if (a instanceof Integer)
+			return 1;
+		if (b instanceof Integer)
+			return -1;
+		if (a instanceof VersionVector)
+			return (b instanceof VersionVector) ? ((VersionVector) a).compareTo((VersionVector) b) : 1;
+
+		if (b instanceof VersionVector)
+			return -1;
+
+		throw new IllegalArgumentException();
+	}
+
+	private final Comparable<?> padValue;
+
+	private final Comparable<?>[] vector;
+
+	public VersionVector(Comparable<?>[] vector, Comparable<?> pad) {
+		this.vector = vector;
+		this.padValue = (pad == MIN_VALUE) ? null : pad;
+	}
+
+	public int compareTo(VersionVector ov) {
+		if (ov == this)
+			return 0;
+
+		return compare(vector, padValue, ov.vector, ov.padValue);
+	}
+
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+
+		if (!(o instanceof VersionVector))
+			return false;
+
+		VersionVector ov = (VersionVector) o;
+		return equals(vector, padValue, ov.vector, ov.padValue);
+	}
+
+	/**
+	 * Returns the pad value used when comparing this versions to
+	 * versions that has a raw vector with a larger number of elements
+	 * @return The pad value or <code>null</code> if not set.
+	 */
+	public Comparable<?> getPad() {
+		return padValue;
+	}
+
+	/**
+	 * An element from the raw vector
+	 * @param index The zero based index of the desired element
+	 * @return An element from the raw vector
+	 */
+	public Comparable<?> getSegment(int index) {
+		return vector[index];
+	}
+
+	/**
+	 * Returns the number of elements in the raw vector
+	 * @return The element count
+	 */
+	public int getSegmentCount() {
+		return vector.length;
+	}
+
+	/**
+	 * This method is package protected since it violates the immutable
+	 * contract.
+	 * @return The raw vector. Must be treated as read-only
+	 */
+	Comparable<?>[] getVector() {
+		return vector;
+	}
+
+	public int hashCode() {
+		return hashCode(vector, padValue);
+	}
+
+	public String toString() {
+		StringBuffer sb = new StringBuffer();
+		toString(sb);
+		return sb.toString();
+	}
+
+	/**
+	 * Append the string representation of this instance to the
+	 * <code>sb</code> buffer.
+	 * @param sb The buffer to append to
+	 */
+	public void toString(StringBuffer sb) {
+		toString(sb, vector, padValue, false);
+	}
+
+	/**
+	 * Append the string representation of this instance to the
+	 * <code>sb</code> buffer.
+	 * @param sb The buffer to append to
+	 * @param rangeSafe If <code>true</code>, the range delimiters will be escaped
+	 * with backslash.
+	 */
+	void toString(StringBuffer sb, boolean rangeSafe) {
+		toString(sb, vector, padValue, rangeSafe);
+	}
+
+	private Object readResolve() {
+		VersionVector vv = this;
+		// Preserve the emptyString singleton
+		int idx = vector.length;
+		while (--idx >= 0)
+			if (MINS_VALUE.equals(vector[idx]))
+				vector[idx] = MINS_VALUE;
+		if (MINS_VALUE.equals(padValue))
+			vv = new VersionVector(vector, MINS_VALUE);
+		return vv;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
new file mode 100644
index 0000000..4de9755
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * A collection filter that yields true if the <code>filter</code> yields true for
+ * all of the elements of the <code>collection</code>
+ */
+final class All extends CollectionFilter {
+	All(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		Variable variable = lambda.getItemVariable();
+		while (itor.hasNext()) {
+			variable.setValue(context, itor.next());
+			if (lambda.evaluate(context) != Boolean.TRUE)
+				return Boolean.FALSE;
+		}
+		return Boolean.TRUE;
+	}
+
+	public int getExpressionType() {
+		return TYPE_ALL;
+	}
+
+	public String getOperator() {
+		return KEYWORD_ALL;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
new file mode 100644
index 0000000..7e8adf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * n-ary AND operator. The full evaluation is <code>true</code> if all its operands evaluate to
+ * <code>true</code>. 
+ */
+final class And extends NAry {
+	And(Expression[] operands) {
+		super(assertLength(operands, 2, OPERATOR_AND));
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		for (int idx = 0; idx < operands.length; ++idx) {
+			if (operands[idx].evaluate(context) != Boolean.TRUE)
+				return Boolean.FALSE;
+		}
+		return Boolean.TRUE;
+	}
+
+	public int getExpressionType() {
+		return TYPE_AND;
+	}
+
+	public String getOperator() {
+		return OPERATOR_AND;
+	}
+
+	public int getPriority() {
+		return PRIORITY_AND;
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		buf.append("(&"); //$NON-NLS-1$
+		for (int idx = 0; idx < operands.length; ++idx)
+			operands[idx].toLDAPString(buf);
+		buf.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
new file mode 100644
index 0000000..9095f55
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An array of expressions
+ */
+final class Array extends NAry {
+	final class ArrayIterator implements Iterator<Object> {
+		private final IEvaluationContext context;
+
+		private int pos = -1;
+
+		public ArrayIterator(IEvaluationContext context) {
+			this.context = context;
+		}
+
+		public boolean hasNext() {
+			return pos + 1 < operands.length;
+		}
+
+		public Object next() {
+			if (++pos >= operands.length) {
+				--pos;
+				throw new NoSuchElementException();
+			}
+			return operands[pos].evaluate(context);
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+	}
+
+	Array(Expression[] operands) {
+		super(assertLength(operands, 0, OPERATOR_ARRAY));
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		return new ArrayIterator(context);
+	}
+
+	public int getExpressionType() {
+		return TYPE_ARRAY;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		bld.append('[');
+		elementsToString(bld, rootVariable, operands);
+		bld.append(']');
+	}
+
+	public String getOperator() {
+		return OPERATOR_ARRAY;
+	}
+
+	public int getPriority() {
+		return PRIORITY_FUNCTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
new file mode 100644
index 0000000..130f1f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression representing a variable stack in the current thread.
+ */
+class Assignment extends Binary {
+	Assignment(Variable variable, Expression expression) {
+		super(variable, expression);
+	}
+
+	public final Object evaluate(IEvaluationContext context) {
+		Object value = rhs.evaluate(context);
+		context.setValue(lhs, value);
+		return value;
+	}
+
+	public int getExpressionType() {
+		return TYPE_ASSIGNMENT;
+	}
+
+	public int getPriority() {
+		return IExpressionConstants.PRIORITY_ASSIGNMENT;
+	}
+
+	public String getOperator() {
+		return OPERATOR_ASSIGN;
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Iterator<?> value = rhs.evaluateAsIterator(context);
+		context.setValue(lhs, value);
+		return value;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
new file mode 100644
index 0000000..dddcdb9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * This class represents indexed or keyed access to an indexed collection
+ * or a map.
+ */
+class At extends Binary {
+	protected At(Expression lhs, Expression rhs) {
+		super(lhs, rhs);
+	}
+
+	public Object evaluate(org.eclipse.equinox.p2.metadata.expression.IEvaluationContext context) {
+		Object lval;
+		if (lhs instanceof DynamicMember) {
+			DynamicMember lm = (DynamicMember) lhs;
+			Object instance = lm.operand.evaluate(context);
+			if (instance instanceof IInstallableUnit) {
+				String name = lm.getName();
+				if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES == name || InstallableUnit.MEMBER_PROFILE_PROPERTIES == name) {
+					IIndexProvider<?> indexProvider = context.getIndexProvider();
+					if (indexProvider == null)
+						throw new UnsupportedOperationException("No managed properties available to QL"); //$NON-NLS-1$
+					return indexProvider.getManagedProperty(instance, name, rhs.evaluate(context));
+				}
+				if (InstallableUnit.MEMBER_PROPERTIES == name) {
+					// Avoid full copy of the properties map just to get one member
+					return ((IInstallableUnit) instance).getProperty((String) rhs.evaluate(context));
+				}
+			}
+			lval = lm.invoke(instance);
+		} else
+			lval = lhs.evaluate(context);
+
+		Object rval = rhs.evaluate(context);
+		if (lval == null)
+			throw new IllegalArgumentException("Unable to use [] on null"); //$NON-NLS-1$
+
+		if (lval instanceof Map<?, ?>)
+			return ((Map<?, ?>) lval).get(rval);
+
+		if (rval instanceof Number) {
+			if (lval instanceof List<?>)
+				return ((List<?>) lval).get(((Number) rval).intValue());
+			if (lval != null && lval.getClass().isArray())
+				return ((Object[]) lval)[((Number) rval).intValue()];
+		}
+
+		if (lval instanceof Dictionary<?, ?>)
+			return ((Dictionary<?, ?>) lval).get(rval);
+
+		throw new IllegalArgumentException("Unable to use [] on a " + lval.getClass().getName()); //$NON-NLS-1$
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object value = evaluate(context);
+		if (!(value instanceof Iterator<?>))
+			value = RepeatableIterator.create(value);
+		return (Iterator<?>) value;
+	}
+
+	public int getExpressionType() {
+		return TYPE_AT;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		appendOperand(bld, rootVariable, lhs, getPriority());
+		bld.append('[');
+		appendOperand(bld, rootVariable, rhs, PRIORITY_MAX);
+		bld.append(']');
+	}
+
+	public String getOperator() {
+		return OPERATOR_AT;
+	}
+
+	public int getPriority() {
+		return PRIORITY_MEMBER;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
new file mode 100644
index 0000000..546ebf5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+
+/**
+ * The abstract base class for all binary operations
+ */
+public abstract class Binary extends Expression {
+	public final Expression lhs;
+
+	public final Expression rhs;
+
+	protected Binary(Expression lhs, Expression rhs) {
+		this.lhs = lhs;
+		this.rhs = rhs;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return super.accept(visitor) && lhs.accept(visitor) && rhs.accept(visitor);
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0) {
+			Binary be = (Binary) e;
+			cmp = lhs.compareTo(be.lhs);
+			if (cmp == 0)
+				cmp = rhs.compareTo(be.rhs);
+		}
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		if (super.equals(o)) {
+			Binary bo = (Binary) o;
+			return lhs.equals(bo.lhs) && rhs.equals(bo.rhs);
+		}
+		return false;
+	}
+
+	public int getPriority() {
+		return PRIORITY_BINARY; // Default priority
+	}
+
+	public int hashCode() {
+		int result = 31 + lhs.hashCode();
+		return 31 * result + rhs.hashCode();
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		appendOperand(bld, rootVariable, lhs, getPriority());
+		bld.append(' ');
+		bld.append(getOperator());
+		bld.append(' ');
+		appendOperand(bld, rootVariable, rhs, getPriority());
+	}
+
+	/**
+	 * Appends the LDAP filter attribute name from the lhs expression if
+	 * possible. 
+	 * @throws UnsupportedOperationException when this expression does not conform to an
+	 * LDAP filter binary expression
+	 */
+	void appendLDAPAttribute(StringBuffer buf) {
+		if (lhs instanceof DynamicMember) {
+			DynamicMember attr = (DynamicMember) lhs;
+			if (attr.operand instanceof Variable) {
+				buf.append(attr.getName());
+				return;
+			}
+		}
+		throw new UnsupportedOperationException();
+	}
+
+	private static char hexChar(int value) {
+		return (char) (value < 10 ? ('0' + value) : ('a' + (value - 10)));
+	}
+
+	static void appendLDAPEscaped(StringBuffer bld, String str) {
+		appendLDAPEscaped(bld, str, true);
+	}
+
+	static void appendLDAPEscaped(StringBuffer bld, String str, boolean escapeWild) {
+		int top = str.length();
+		for (int idx = 0; idx < top; ++idx) {
+			char c = str.charAt(idx);
+			if (!escapeWild) {
+				if (c == '*') {
+					bld.append(c);
+					continue;
+				} else if (c == '\\' && idx + 1 < top && str.charAt(idx + 1) == '*') {
+					bld.append("\\2a"); //$NON-NLS-1$
+					++idx;
+					continue;
+				}
+			}
+			if (c == '(' || c == ')' || c == '*' || c == '\\' || c < ' ' || c > 127) {
+				short cs = (short) c;
+				bld.append('\\');
+				bld.append(hexChar((cs & 0x00f0) >> 4));
+				bld.append(hexChar(cs & 0x000f));
+			} else
+				bld.append(c);
+		}
+	}
+
+	/**
+	 * Appends the LDAP filter value from the rhs expression if
+	 * possible. 
+	 * @throws UnsupportedOperationException when this expression does not conform to an
+	 * LDAP filter binary expression
+	 */
+	void appendLDAPValue(StringBuffer buf) {
+		if (rhs instanceof Literal) {
+			Object value = rhs.evaluate(null);
+			if (value instanceof String || value instanceof Version) {
+				appendLDAPEscaped(buf, value.toString());
+				return;
+			}
+		}
+		throw new UnsupportedOperationException();
+	}
+
+	int countAccessToEverything() {
+		return lhs.countAccessToEverything() + rhs.countAccessToEverything();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
new file mode 100644
index 0000000..6749180
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+
+
+/**
+ * A function that obtains a class based on a String
+ */
+public final class BooleanFunction extends Function {
+
+	public BooleanFunction(Expression[] operands) {
+		super(assertLength(operands, 1, 1, KEYWORD_BOOLEAN));
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return v instanceof String || v instanceof Boolean;
+	}
+
+	Object createInstance(Object arg) {
+		if (arg instanceof String)
+			return Boolean.valueOf("true".equalsIgnoreCase((String) arg)); //$NON-NLS-1$
+		if (arg instanceof Boolean)
+			return arg;
+		return Boolean.FALSE;
+	}
+
+	public String getOperator() {
+		return KEYWORD_BOOLEAN;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
new file mode 100644
index 0000000..ddef522
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+
+
+/**
+ * A function that obtains a class based on a String
+ */
+public final class ClassFunction extends Function {
+
+	public ClassFunction(Expression[] operands) {
+		super(assertLength(operands, 1, 1, KEYWORD_CLASS));
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return v instanceof String;
+	}
+
+	Object createInstance(Object arg) {
+		try {
+			return Class.forName((String) arg);
+		} catch (ClassNotFoundException e) {
+			throw new IllegalArgumentException(e.getMessage());
+		}
+	}
+
+	public String getOperator() {
+		return KEYWORD_CLASS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
new file mode 100644
index 0000000..6a017ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
@@ -0,0 +1,392 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Constructor;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Comparator;
+import org.eclipse.equinox.internal.p2.metadata.MetadataActivator;
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * A comparator that performs coercion if needed before comparison.
+ * @param <T> The type for the comparator.
+ */
+public abstract class CoercingComparator<T> {
+	static class BooleanCoercer extends CoercingComparator<Boolean> {
+		public int compare(Boolean o1, Boolean o2) {
+			return o1.booleanValue() == o2.booleanValue() ? 0 : (o1.booleanValue() ? 1 : -1);
+		}
+
+		@Override
+		Boolean coerce(Object v) {
+			if (v instanceof Boolean)
+				return (Boolean) v;
+			if (v instanceof String) {
+				String sv = ((String) v).trim();
+				if (sv.equalsIgnoreCase("true")) //$NON-NLS-1$
+					return Boolean.TRUE;
+				if (sv.equalsIgnoreCase("false")) //$NON-NLS-1$
+					return Boolean.FALSE;
+			}
+			throw uncoercable(v);
+		}
+
+		@Override
+		Class<Boolean> getCoerceClass() {
+			return Boolean.class;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 7;
+		}
+	}
+
+	static class ClassCoercer extends CoercingComparator<Class<?>> {
+		public int compare(Class<?> o1, Class<?> o2) {
+			return o1.getName().compareTo(o2.getName());
+		}
+
+		@Override
+		Class<?> coerce(Object v) {
+			if (v instanceof Class<?>)
+				return (Class<?>) v;
+			if (v instanceof String) {
+				try {
+					return MetadataActivator.getContext().getBundle().loadClass(((String) v).trim());
+				} catch (Exception e) {
+					//
+				}
+			}
+			throw uncoercable(v);
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		Class<Class<?>> getCoerceClass() {
+			Class<?> cls = Class.class;
+			return (Class<Class<?>>) cls;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 11;
+		}
+	}
+
+	static class FromStringCoercer<T extends Comparable<Object>> extends CoercingComparator<T> {
+		private final Class<T> coerceClass;
+		private final Constructor<T> constructor;
+
+		public FromStringCoercer(Class<T> coerceClass, Constructor<T> constructor) {
+			this.coerceClass = coerceClass;
+			this.constructor = constructor;
+		}
+
+		@Override
+		T coerce(Object v) {
+			if (v instanceof String) {
+				try {
+					return constructor.newInstance(new Object[] {((String) v).trim()});
+				} catch (Exception e) {
+					//
+				}
+			}
+			throw uncoercable(v);
+		}
+
+		@Override
+		int compare(T o1, T o2) {
+			return o1.compareTo(o2);
+		}
+
+		@Override
+		Class<T> getCoerceClass() {
+			return coerceClass;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 0;
+		}
+	}
+
+	static class IntegerCoercer extends CoercingComparator<Integer> {
+		public int compare(Integer o1, Integer o2) {
+			return o1.compareTo(o2);
+		}
+
+		@Override
+		Integer coerce(Object v) {
+			if (v instanceof Integer)
+				return (Integer) v;
+			if (v instanceof Number)
+				return new Integer(((Number) v).intValue());
+			if (v instanceof String) {
+				try {
+					return Integer.valueOf(((String) v).trim());
+				} catch (NumberFormatException e) {
+					//
+				}
+			}
+			throw uncoercable(v);
+		}
+
+		@Override
+		Class<Integer> getCoerceClass() {
+			return Integer.class;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 6;
+		}
+	}
+
+	static class LongCoercer extends CoercingComparator<Long> {
+		public int compare(Long o1, Long o2) {
+			return o1.compareTo(o2);
+		}
+
+		@Override
+		Long coerce(Object v) {
+			if (v instanceof Long)
+				return (Long) v;
+			if (v instanceof Number)
+				return new Long(((Number) v).longValue());
+			if (v instanceof String) {
+				try {
+					return Long.valueOf(((String) v).trim());
+				} catch (NumberFormatException e) {
+					//
+				}
+			}
+			throw uncoercable(v);
+		}
+
+		@Override
+		Class<Long> getCoerceClass() {
+			return Long.class;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 5;
+		}
+	}
+
+	static class StringCoercer extends CoercingComparator<String> {
+		public int compare(String o1, String o2) {
+			return o1.compareTo(o2);
+		}
+
+		@Override
+		String coerce(Object v) {
+			if (v instanceof Class<?>)
+				return ((Class<?>) v).getName();
+			return v.toString();
+		}
+
+		@Override
+		Class<String> getCoerceClass() {
+			return String.class;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 10;
+		}
+	}
+
+	static class VersionCoercer extends CoercingComparator<Version> {
+		public int compare(Version o1, Version o2) {
+			return o1.compareTo(o2);
+		}
+
+		boolean canCoerceTo(Class<?> cls) {
+			return Version.class.isAssignableFrom(cls);
+		}
+
+		@Override
+		Version coerce(Object v) {
+			if (v instanceof Version)
+				return (Version) v;
+			if (v instanceof String)
+				return Version.create((String) v);
+			if (v instanceof String) {
+				try {
+					return Version.create((String) v);
+				} catch (NumberFormatException e) {
+					//
+				}
+			}
+			throw uncoercable(v);
+		}
+
+		@Override
+		Class<Version> getCoerceClass() {
+			return Version.class;
+		}
+
+		@Override
+		int getCoercePrio() {
+			return 1;
+		}
+	}
+
+	private static class SetAccessibleAction implements PrivilegedAction<Object> {
+		private final AccessibleObject accessible;
+
+		SetAccessibleAction(AccessibleObject accessible) {
+			this.accessible = accessible;
+		}
+
+		public Object run() {
+			accessible.setAccessible(true);
+			return null;
+		}
+	}
+
+	private static CoercingComparator<?>[] coercers = {new ClassCoercer(), new BooleanCoercer(), new LongCoercer(), new IntegerCoercer(), new VersionCoercer(), new StringCoercer()};
+
+	private static final Class<?>[] constructorType = new Class<?>[] {String.class};
+
+	/**
+	 * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/comparison to the comparator
+	 * according to priority.
+	 * @param o1 the first object to be compared.
+	 * @param o2 the second object to be compared.
+	 * @return The result of the comparison
+	 * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
+	 * @see Comparator#compare(Object, Object)
+	 */
+	@SuppressWarnings({"unchecked", "rawtypes"})
+	public static <TA extends Object, TB extends Object> int coerceAndCompare(TA o1, TB o2) throws IllegalArgumentException {
+		if (o1 == null || o2 == null)
+			throw new IllegalArgumentException("Cannot compare null to anything"); //$NON-NLS-1$
+
+		if (o1 instanceof Comparable && o1.getClass().isAssignableFrom(o2.getClass()))
+			return ((Comparable) o1).compareTo(o2);
+
+		if (o2 instanceof Comparable && o2.getClass().isAssignableFrom(o1.getClass()))
+			return -((Comparable) o2).compareTo(o1);
+
+		CoercingComparator<TA> ca = getComparator(o1, o2);
+		CoercingComparator<TB> cb = getComparator(o2, o1);
+		return ca.getCoercePrio() <= cb.getCoercePrio() ? ca.compare(o1, ca.coerce(o2)) : cb.compare(cb.coerce(o1), o2);
+	}
+
+	/**
+	 * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/equal to the comparator
+	 * according to priority.
+	 * @param o1 the first object to be compared.
+	 * @param o2 the second object to be compared.
+	 * @return The result of the equality test
+	 * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
+	 * @see Object#equals(Object)
+	 */
+	public static <TA extends Object, TB extends Object> boolean coerceAndEquals(TA o1, TB o2) throws IllegalArgumentException {
+		if (o1 == o2)
+			return true;
+
+		if (o1 == null || o2 == null)
+			return false;
+
+		if (o1.getClass() != o2.getClass()) {
+			if (o1.getClass().isAssignableFrom(o2.getClass()))
+				return o1.equals(o2);
+			if (o2.getClass().isAssignableFrom(o1.getClass()))
+				return o2.equals(o1);
+			try {
+				CoercingComparator<TA> ca = getComparator(o1, o2);
+				CoercingComparator<TB> cb = getComparator(o2, o1);
+				return ca.getCoercePrio() <= cb.getCoercePrio() ? o1.equals(ca.coerce(o2)) : o2.equals(cb.coerce(o1));
+			} catch (IllegalArgumentException e) {
+				//
+			}
+		}
+		return o1.equals(o2);
+	}
+
+	/**
+	 * Obtains the coercing comparator for the given <code>value</code>.
+	 * @param value The value 
+	 * @return The coercing comparator
+	 */
+	@SuppressWarnings("unchecked")
+	public static <V extends Object> CoercingComparator<V> getComparator(V value, Object v2) {
+		Class<V> vClass = (Class<V>) value.getClass();
+		CoercingComparator<?>[] carr = coercers;
+		int idx = carr.length;
+		while (--idx >= 0) {
+			CoercingComparator<?> c = carr[idx];
+			if (c.canCoerceTo(vClass)) {
+				CoercingComparator<V> cv = (CoercingComparator<V>) c;
+				return cv;
+			}
+		}
+
+		if (value instanceof Comparable<?> && v2 instanceof String) {
+			Class<Comparable<Object>> cClass = (Class<Comparable<Object>>) vClass;
+			Constructor<Comparable<Object>> constructor;
+			try {
+				constructor = cClass.getConstructor(constructorType);
+				if (!constructor.isAccessible())
+					AccessController.doPrivileged(new SetAccessibleAction(constructor));
+				synchronized (CoercingComparator.class) {
+					int top = coercers.length;
+					CoercingComparator<?>[] nc = new CoercingComparator<?>[top + 1];
+					System.arraycopy(coercers, 0, nc, 1, top);
+					CoercingComparator<V> cv = (CoercingComparator<V>) new FromStringCoercer<Comparable<Object>>(cClass, constructor);
+					nc[0] = cv;
+					coercers = nc;
+					return cv;
+				}
+			} catch (Exception e) {
+				//
+			}
+		}
+		throw new IllegalArgumentException("No comparator for " + vClass.getName()); //$NON-NLS-1$
+	}
+
+	protected IllegalArgumentException uncoercable(Object v) {
+		StringBuffer sb = new StringBuffer("Cannot coerce "); //$NON-NLS-1$
+		if (v instanceof String) {
+			sb.append('\'');
+			sb.append(v);
+			sb.append('\'');
+		} else if (v instanceof Number) {
+			sb.append("number "); //$NON-NLS-1$
+			sb.append(v);
+		} else {
+			sb.append("an object of instance "); //$NON-NLS-1$
+			sb.append(v.getClass().getName());
+		}
+		sb.append(" into a "); //$NON-NLS-1$
+		sb.append(getCoerceClass().getName());
+		return new IllegalArgumentException(sb.toString());
+	}
+
+	boolean canCoerceTo(Class<?> cls) {
+		return cls == getCoerceClass();
+	}
+
+	abstract T coerce(Object v);
+
+	abstract int compare(T o1, T o2);
+
+	abstract Class<T> getCoerceClass();
+
+	abstract int getCoercePrio();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
new file mode 100644
index 0000000..5cd8a41
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ */
+final class Collect extends CollectionFilter {
+	final class CollectIterator implements Iterator<Object> {
+		private final IEvaluationContext context;
+
+		private final IExpression variable;
+
+		private final Iterator<?> innerIterator;
+
+		public CollectIterator(IEvaluationContext context, Iterator<?> iterator) {
+			this.context = context;
+			this.variable = lambda.getItemVariable();
+			this.innerIterator = iterator;
+		}
+
+		public boolean hasNext() {
+			return innerIterator.hasNext();
+		}
+
+		public Object next() {
+			context.setValue(variable, innerIterator.next());
+			return lambda.evaluate(context);
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+	}
+
+	Collect(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		return evaluateAsIterator(context, itor);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> itor) {
+		return new CollectIterator(context, itor);
+	}
+
+	public int getExpressionType() {
+		return TYPE_COLLECT;
+	}
+
+	public String getOperator() {
+		return KEYWORD_COLLECT;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
new file mode 100644
index 0000000..5a1e43f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * Some kind of operation that is performed for each element of a collection. I.e.
+ * <code>x.<operation>(y | <expression&rt;)</code>
+ */
+public abstract class CollectionFilter extends Unary {
+	public static void appendProlog(StringBuffer bld, Variable rootVariable, Expression lhs, String operator) {
+		if (lhs != rootVariable) {
+			appendOperand(bld, rootVariable, lhs, PRIORITY_COLLECTION);
+			bld.append('.');
+		}
+		bld.append(operator);
+		bld.append('(');
+	}
+
+	public final LambdaExpression lambda;
+
+	protected CollectionFilter(Expression collection, LambdaExpression lambda) {
+		super(collection);
+		this.lambda = lambda;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return super.accept(visitor) && lambda.accept(visitor);
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = lambda.compareTo(((CollectionFilter) e).lambda);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && lambda.equals(((CollectionFilter) o).lambda);
+	}
+
+	public final Object evaluate(IEvaluationContext context) {
+		Iterator<?> lval = getInnerIterator(context);
+		context = lambda.prolog(context);
+		return evaluate(context, lval);
+	}
+
+	public final Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Iterator<?> lval = getInnerIterator(context);
+		context = lambda.prolog(context);
+		return evaluateAsIterator(context, lval);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		appendProlog(bld, rootVariable, operand, getOperator());
+		appendOperand(bld, rootVariable, lambda, PRIORITY_LAMBDA);
+		bld.append(')');
+	}
+
+	public int hashCode() {
+		int result = 31 + operand.hashCode();
+		return 31 * result + lambda.hashCode();
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+
+	protected abstract Object evaluate(final IEvaluationContext context, Iterator<?> iterator);
+
+	protected Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
+		throw new UnsupportedOperationException();
+	}
+
+	private transient IIndexProvider<?> lastIndexProvider;
+	private transient IIndex<?> lastIndex;
+
+	private IIndex<?> getIndex(Class<?> elementClass, IIndexProvider<?> indexProvider) {
+		if (lastIndexProvider == indexProvider)
+			return lastIndex;
+
+		for (String member : getIndexCandidateMembers(elementClass, lambda.getItemVariable(), lambda.getOperand())) {
+			IIndex<?> index = indexProvider.getIndex(member);
+			if (index != null)
+				lastIndex = index;
+		}
+		lastIndexProvider = indexProvider;
+		return lastIndex;
+	}
+
+	protected Iterator<?> getInnerIterator(IEvaluationContext context) {
+		Object collection = operand.evaluate(context);
+		if (collection instanceof Everything<?>) {
+			// Try to find an index
+			//
+			IIndexProvider<?> indexProvider = context.getIndexProvider();
+			if (indexProvider != null) {
+				Class<?> elementClass = ((Everything<?>) collection).getElementClass();
+				IIndex<?> index = getIndex(elementClass, indexProvider);
+				if (index != null) {
+					Iterator<?> indexed = index.getCandidates(context, lambda.getItemVariable(), lambda.getOperand());
+					if (indexed != null)
+						return indexed;
+				}
+			}
+		}
+
+		// No index. We need every element
+		if (collection instanceof IRepeatableIterator<?>)
+			return ((IRepeatableIterator<?>) collection).getCopy();
+
+		Iterator<?> itor = RepeatableIterator.create(collection);
+		if (operand instanceof Variable)
+			((Variable) operand).setValue(context, itor);
+		return itor;
+	}
+
+	int countAccessToEverything() {
+		return operand.countAccessToEverything() + lambda.countAccessToEverything();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
new file mode 100644
index 0000000..7e958e4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * Comparisons for magnitude.
+ */
+final class Compare extends Binary {
+	static IllegalArgumentException uncomparable(Object lval, Object rval) {
+		return new IllegalArgumentException("Cannot compare a " + lval.getClass().getName() + " to a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
+	}
+
+	final boolean compareLess;
+
+	final boolean equalOK;
+
+	Compare(Expression lhs, Expression rhs, boolean compareLess, boolean equalOK) {
+		super(lhs, rhs);
+		this.compareLess = compareLess;
+		this.equalOK = equalOK;
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		int cmpResult = CoercingComparator.coerceAndCompare(lhs.evaluate(context), rhs.evaluate(context));
+		return Boolean.valueOf(cmpResult == 0 ? equalOK : (cmpResult < 0 ? compareLess : !compareLess));
+	}
+
+	public int getExpressionType() {
+		return compareLess ? (equalOK ? TYPE_LESS_EQUAL : TYPE_LESS) : (equalOK ? TYPE_GREATER_EQUAL : TYPE_GREATER);
+	}
+
+	public String getOperator() {
+		return compareLess ? (equalOK ? OPERATOR_LT_EQUAL : OPERATOR_LT) : (equalOK ? OPERATOR_GT_EQUAL : OPERATOR_GT);
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		if (!equalOK)
+			buf.append("(!"); //$NON-NLS-1$
+		buf.append('(');
+		appendLDAPAttribute(buf);
+		if (equalOK)
+			buf.append(compareLess ? OPERATOR_LT_EQUAL : OPERATOR_GT_EQUAL);
+		else
+			buf.append(compareLess ? OPERATOR_GT_EQUAL : OPERATOR_LT_EQUAL);
+		appendLDAPValue(buf);
+		buf.append(')');
+		if (!equalOK)
+			buf.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
new file mode 100644
index 0000000..4aaf2a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * A CompoundIterator will assume that its contained iterator that will produce
+ * elements that in turn can be represented as iterators. The elements of those
+ * iterators will be returned in sequence, thus removing one iterator dimension.
+ * Elements of the contained iterator that are not iterators will be coerced
+ * into iterators using {@link RepeatableIterator#create(Object)}.
+ */
+public class CompoundIterator<T> implements Iterator<T> {
+	private static final Object NO_ELEMENT = new Object();
+	private final Iterator<? extends Object> iteratorIterator;
+	private Iterator<T> currentIterator;
+
+	private T nextObject = noElement();
+
+	/**
+	 * Creates a compound iterator that will iterated over the elements
+	 * of the provided <code>iterator</code>. Each element will be coerced
+	 * into an iterator and its elements in turn are returned
+	 * in succession by the compound iterator.
+	 *
+	 * @param iterator
+	 */
+	public CompoundIterator(Iterator<? extends Object> iterator) {
+		this.iteratorIterator = iterator;
+	}
+
+	public boolean hasNext() {
+		return positionNext();
+	}
+
+	public T next() {
+		if (!positionNext())
+			throw new NoSuchElementException();
+
+		T nxt = nextObject;
+		nextObject = noElement();
+		return nxt;
+	}
+
+	/**
+	 * Remove is not supported by this iterator so calling this method
+	 * will always yield an exception.
+	 * @throws UnsupportedOperationException
+	 */
+	public void remove() {
+		throw new UnsupportedOperationException();
+	}
+
+	@SuppressWarnings("unchecked")
+	private boolean positionNext() {
+		if (nextObject != NO_ELEMENT)
+			return true;
+
+		while (currentIterator == null || !currentIterator.hasNext()) {
+			if (!iteratorIterator.hasNext())
+				return false;
+
+			Object nextItor = iteratorIterator.next();
+			currentIterator = (nextItor instanceof Iterator<?>) ? (Iterator<T>) nextItor : RepeatableIterator.<T> create(nextItor);
+		}
+		nextObject = currentIterator.next();
+		return true;
+	}
+
+	@SuppressWarnings("unchecked")
+	private static <T> T noElement() {
+		return (T) NO_ELEMENT;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
new file mode 100644
index 0000000..a2b7cf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * Comparisons for magnitude.
+ */
+final class Condition extends Binary {
+	final Expression ifFalse;
+
+	Condition(Expression test, Expression ifTrue, Expression ifFalse) {
+		super(test, ifTrue);
+		this.ifFalse = ifFalse;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && ifFalse.equals(((Condition) o).ifFalse);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluate(context) : ifFalse.evaluate(context);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluateAsIterator(context) : ifFalse.evaluateAsIterator(context);
+	}
+
+	public int hashCode() {
+		return super.hashCode() * 31 + ifFalse.hashCode();
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		super.toString(bld, rootVariable);
+		bld.append(' ');
+		bld.append(OPERATOR_ELSE);
+		bld.append(' ');
+		appendOperand(bld, rootVariable, ifFalse, getPriority());
+	}
+
+	public int getExpressionType() {
+		return TYPE_CONDITION;
+	}
+
+	public String getOperator() {
+		return OPERATOR_IF;
+	}
+
+	public int getPriority() {
+		return IExpressionConstants.PRIORITY_CONDITION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java
new file mode 100644
index 0000000..a574311
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * The context expression is the top expression in context queries. It introduces the
+ * variable 'everything' and initialized it with the iterator that represents all
+ * available items.
+ */
+public class ContextExpression<T> extends Unary implements IContextExpression<T> {
+	private static final Object[] noParams = new Object[0];
+	protected final Object[] parameters;
+
+	public ContextExpression(Expression expression, Object[] parameters) {
+		super(expression);
+		this.parameters = parameters == null ? noParams : parameters;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return super.accept(visitor) && operand.accept(visitor);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		operand.toString(bld, rootVariable);
+	}
+
+	public IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider) {
+		Variable everything = ExpressionFactory.EVERYTHING;
+		IEvaluationContext context = EvaluationContext.create(parameters, everything);
+		context.setValue(everything, new Everything<T>(elementClass, indexProvider));
+		context.setIndexProvider(indexProvider);
+		return context;
+	}
+
+	public IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> iterator) {
+		Variable everything = ExpressionFactory.EVERYTHING;
+		IEvaluationContext context = EvaluationContext.create(parameters, everything);
+		context.setValue(everything, new Everything<T>(elementClass, iterator, operand));
+		return context;
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return operand.evaluate(parameters.length == 0 ? context : EvaluationContext.create(context, parameters));
+	}
+
+	public int getExpressionType() {
+		return 0;
+	}
+
+	public String getOperator() {
+		throw new UnsupportedOperationException();
+	}
+
+	public int getPriority() {
+		return operand.getPriority();
+	}
+
+	public Object[] getParameters() {
+		return parameters;
+	}
+
+	public int hashCode() {
+		return operand.hashCode();
+	}
+
+	@SuppressWarnings("unchecked")
+	public Iterator<T> iterator(IEvaluationContext context) {
+		return (Iterator<T>) operand.evaluateAsIterator(context);
+	}
+
+	public void toString(StringBuffer bld) {
+		toString(bld, ExpressionFactory.EVERYTHING);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
new file mode 100644
index 0000000..2de0b95
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+
+/**
+ * A function that executes some code
+ */
+final class CurryedLambdaExpression extends LambdaExpression {
+	private static final Assignment[] emptyAssignmentArray = new Assignment[0];
+	private final Assignment[] assignments;
+
+	CurryedLambdaExpression(Variable each, Assignment[] assignments, Expression body) {
+		super(each, body);
+		if (assignments == null)
+			assignments = emptyAssignmentArray;
+		this.assignments = assignments;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		if (super.accept(visitor) && each.accept(visitor)) {
+			for (int idx = 0; idx < assignments.length; ++idx)
+				if (!assignments[idx].accept(visitor))
+					return false;
+			return true;
+		}
+		return false;
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = compare(assignments, ((CurryedLambdaExpression) e).assignments);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && equals(assignments, ((CurryedLambdaExpression) o).assignments);
+	}
+
+	public int hashCode() {
+		return 31 * super.hashCode() + hashCode(assignments);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		int top = assignments.length;
+		if (top > 0) {
+			for (int idx = 0; idx < top; ++idx) {
+				appendOperand(bld, rootVariable, assignments[idx].rhs, IExpressionConstants.PRIORITY_COMMA);
+				bld.append(", "); //$NON-NLS-1$
+			}
+			bld.append(OPERATOR_EACH);
+			bld.append(", {"); //$NON-NLS-1$
+			for (int idx = 0; idx < top; ++idx) {
+				appendOperand(bld, rootVariable, assignments[idx].lhs, IExpressionConstants.PRIORITY_COMMA);
+				bld.append(", "); //$NON-NLS-1$
+			}
+		}
+		super.toString(bld, rootVariable);
+		if (top > 0)
+			bld.append('}');
+	}
+
+	public IEvaluationContext prolog(IEvaluationContext context) {
+		IEvaluationContext lambdaContext;
+		int top = assignments.length + 1;
+		Variable[] vars = new Variable[top];
+		vars[0] = getItemVariable();
+		for (int idx = 1; idx < top; ++idx)
+			vars[idx] = (Variable) assignments[idx - 1].lhs;
+		lambdaContext = EvaluationContext.create(context, vars);
+		for (int idx = 1; idx < top; ++idx)
+			lambdaContext.setValue(vars[idx], assignments[idx - 1].rhs.evaluate(context));
+		return lambdaContext;
+	}
+
+	int countAccessToEverything() {
+		int cnt = 0;
+		for (int idx = 0; idx < assignments.length; ++idx)
+			cnt += assignments[idx].countAccessToEverything();
+		cnt += super.countAccessToEverything();
+		return cnt;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
new file mode 100644
index 0000000..7452c31
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that performs the == and != comparisons
+ */
+final class Equals extends Binary {
+	final boolean negate;
+
+	Equals(Expression lhs, Expression rhs, boolean negate) {
+		super(lhs, rhs);
+		this.negate = negate;
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		boolean result = CoercingComparator.coerceAndEquals(lhs.evaluate(context), rhs.evaluate(context));
+		if (negate)
+			result = !result;
+		return Boolean.valueOf(result);
+	}
+
+	public int getExpressionType() {
+		return negate ? TYPE_NOT_EQUALS : TYPE_EQUALS;
+	}
+
+	public String getOperator() {
+		return negate ? OPERATOR_NOT_EQUALS : OPERATOR_EQUALS;
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		if (negate)
+			buf.append("(!"); //$NON-NLS-1$
+		buf.append('(');
+		appendLDAPAttribute(buf);
+		buf.append('=');
+		appendLDAPValue(buf);
+		buf.append(')');
+		if (negate)
+			buf.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
new file mode 100644
index 0000000..49e9bbc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * Highly specialized evaluation contexts optimized for misc purposes
+ */
+public class EvaluationContext implements IEvaluationContext {
+	public static class SingleVariableContext extends EvaluationContext {
+		private Object value;
+
+		private final IExpression variable;
+
+		public SingleVariableContext(EvaluationContext parentContext, IExpression variable, Object[] parameters) {
+			super(parentContext, parameters);
+			this.variable = variable;
+		}
+
+		public Object getValue(IExpression var) {
+			return variable == var ? value : parentContext.getValue(var);
+		}
+
+		public void setValue(IExpression var, Object val) {
+			if (variable == var)
+				value = val;
+			else
+				parentContext.setValue(var, val);
+		}
+	}
+
+	public static class MultiVariableContext extends EvaluationContext {
+		private final Object[] values;
+
+		public MultiVariableContext(EvaluationContext parentContext, IExpression[] variables, Object[] parameters) {
+			super(parentContext, parameters);
+			values = new Object[variables.length * 2];
+			for (int idx = 0, ndx = 0; ndx < variables.length; ++ndx, idx += 2)
+				values[idx] = variables[ndx];
+		}
+
+		public Object getValue(IExpression variable) {
+			for (int idx = 0; idx < values.length; ++idx)
+				if (values[idx++] == variable)
+					return values[idx];
+			return parentContext.getValue(variable);
+		}
+
+		public void setValue(IExpression variable, Object value) {
+			for (int idx = 0; idx < values.length; ++idx)
+				if (values[idx++] == variable) {
+					values[idx] = value;
+					return;
+				}
+			parentContext.setValue(variable, value);
+		}
+	}
+
+	private static final Object[] noParameters = new Object[0];
+
+	private static final EvaluationContext INSTANCE = new EvaluationContext(null, noParameters);
+
+	public static IEvaluationContext create() {
+		return INSTANCE;
+	}
+
+	public static IEvaluationContext create(IEvaluationContext parent, IExpression variable) {
+		return new SingleVariableContext((EvaluationContext) parent, variable, ((EvaluationContext) parent).parameters);
+	}
+
+	public static IEvaluationContext create(IEvaluationContext parent, IExpression[] variables) {
+		return create(parent, ((EvaluationContext) parent).parameters, variables);
+	}
+
+	public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters, IExpression[] variables) {
+		if (variables == null || variables.length == 0)
+			return create(parent, parameters);
+		if (parameters == null)
+			parameters = noParameters;
+		return variables.length == 1 ? new SingleVariableContext((EvaluationContext) parent, variables[0], parameters) : new MultiVariableContext((EvaluationContext) parent, variables, parameters);
+	}
+
+	public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters) {
+		if (parameters == null)
+			parameters = noParameters;
+		return new EvaluationContext((EvaluationContext) parent, parameters);
+	}
+
+	public static IEvaluationContext create(IExpression variable) {
+		return new SingleVariableContext(INSTANCE, variable, noParameters);
+	}
+
+	public static IEvaluationContext create(IExpression[] variables) {
+		return create(INSTANCE, noParameters, variables);
+	}
+
+	public static IEvaluationContext create(Object[] parameters, IExpression variable) {
+		if (parameters == null)
+			parameters = noParameters;
+		return new SingleVariableContext(INSTANCE, variable, parameters);
+	}
+
+	public static IEvaluationContext create(Object[] parameters, IExpression[] variables) {
+		return create(INSTANCE, parameters, variables);
+	}
+
+	final EvaluationContext parentContext;
+
+	private final Object[] parameters;
+
+	private IIndexProvider<?> indexProvider;
+
+	EvaluationContext(EvaluationContext parentContext, Object[] parameters) {
+		this.parentContext = parentContext;
+		this.parameters = parameters;
+	}
+
+	public final Object getParameter(int position) {
+		return parameters[position];
+	}
+
+	public Object getValue(IExpression variable) {
+		if (parentContext == null)
+			throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
+		return parentContext.getValue(variable);
+	}
+
+	public void setValue(IExpression variable, Object value) {
+		if (parentContext == null)
+			throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
+		parentContext.setValue(variable, value);
+	}
+
+	public IIndexProvider<?> getIndexProvider() {
+		if (indexProvider == null) {
+			if (parentContext == null)
+				return null;
+			return parentContext.getIndexProvider();
+		}
+		return indexProvider;
+	}
+
+	public void setIndexProvider(IIndexProvider<?> indexProvider) {
+		this.indexProvider = indexProvider;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
new file mode 100644
index 0000000..0b3a1cf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Collection;
+import java.util.Iterator;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * The immutable context used when evaluating an expression.
+ */
+public final class Everything<T> extends MatchIteratorFilter<T> implements IRepeatableIterator<T> {
+	private boolean atStart = true;
+
+	private final Class<? extends T> elementClass;
+
+	public Everything(Class<? extends T> elementClass, Collection<T> collection) {
+		super(RepeatableIterator.<T> create(collection == null ? CollectionUtils.<T> emptyList() : collection));
+		this.elementClass = elementClass;
+	}
+
+	public Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, Expression expression) {
+		this(elementClass, iterator, needsRepeadedAccessToEverything(expression));
+	}
+
+	public Everything(Class<? extends T> elementClass, IIndexProvider<? extends T> indexProvider) {
+		super(RepeatableIterator.<T> create(indexProvider));
+		this.elementClass = elementClass;
+	}
+
+	Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, boolean needsRepeat) {
+		super(needsRepeat ? RepeatableIterator.create(iterator) : iterator);
+		this.elementClass = elementClass;
+	}
+
+	public IRepeatableIterator<T> getCopy() {
+		Iterator<? extends T> iterator = getInnerIterator();
+		if (iterator instanceof IRepeatableIterator<?>)
+			return new Everything<T>(elementClass, ((IRepeatableIterator<? extends T>) iterator).getCopy(), false);
+		if (atStart)
+			return this;
+		throw new UnsupportedOperationException();
+	}
+
+	public T next() {
+		atStart = false;
+		return super.next();
+	}
+
+	public Class<? extends T> getElementClass() {
+		return elementClass;
+	}
+
+	public Object getIteratorProvider() {
+		Iterator<? extends T> iterator = getInnerIterator();
+		if (iterator instanceof IRepeatableIterator<?>)
+			return ((IRepeatableIterator<?>) iterator).getIteratorProvider();
+		return this;
+	}
+
+	protected boolean isMatch(T val) {
+		return elementClass.isInstance(val);
+	}
+
+	/**
+	 * Checks if the expression will make repeated requests for the 'everything' iterator.
+	 * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
+	 */
+	private static boolean needsRepeadedAccessToEverything(Expression expression) {
+		return expression.countAccessToEverything() > 1;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
new file mode 100644
index 0000000..14fbc5d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * A collection filter that yields true if the <code>filter</code> yields true for
+ * any of the elements of the <code>collection</code>
+ */
+final class Exists extends CollectionFilter {
+	Exists(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		Variable variable = lambda.getItemVariable();
+		while (itor.hasNext()) {
+			variable.setValue(context, itor.next());
+			if (lambda.evaluate(context) == Boolean.TRUE)
+				return Boolean.TRUE;
+		}
+		return Boolean.FALSE;
+	}
+
+	public int getExpressionType() {
+		return TYPE_EXISTS;
+	}
+
+	public String getOperator() {
+		return KEYWORD_EXISTS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
new file mode 100644
index 0000000..d8b5ac7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
@@ -0,0 +1,490 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+/**
+ * The base class of the expression tree.
+ */
+public abstract class Expression implements IExpression, Comparable<Expression>, IExpressionConstants {
+
+	static final Expression[] emptyArray = new Expression[0];
+
+	public static void appendOperand(StringBuffer bld, Variable rootVariable, Expression operand, int priority) {
+		if (priority < operand.getPriority()) {
+			bld.append('(');
+			operand.toString(bld, rootVariable);
+			bld.append(')');
+		} else
+			operand.toString(bld, rootVariable);
+	}
+
+	public static Expression[] assertLength(Expression[] operands, int minLength, int maxLength, String operand) {
+		if (operands == null)
+			operands = emptyArray;
+		if (operands.length < minLength)
+			throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
+		if (operands.length > maxLength)
+			throw new IllegalArgumentException("Too many operands for " + operand); //$NON-NLS-1$
+		return operands;
+	}
+
+	public static Expression[] assertLength(Expression[] operands, int length, String operand) {
+		if (operands == null)
+			operands = emptyArray;
+		if (operands.length < length)
+			throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
+		return operands;
+	}
+
+	public static int compare(Expression[] arr1, Expression[] arr2) {
+		int max = arr1.length;
+		if (max > arr2.length)
+			max = arr2.length;
+		for (int idx = 0; idx < max; ++idx) {
+			int cmp = arr1[idx].compareTo(arr2[idx]);
+			if (cmp != 0)
+				return cmp;
+		}
+		if (max == arr2.length) {
+			if (max < arr1.length)
+				return 1;
+			return 0;
+		}
+		return -1;
+	}
+
+	public static boolean equals(Expression[] arr1, Expression[] arr2) {
+		int idx = arr1.length;
+		if (idx != arr2.length)
+			return false;
+		while (--idx >= 0)
+			if (!arr1[idx].equals(arr2[idx]))
+				return false;
+		return true;
+	}
+
+	public static int hashCode(Expression[] arr) {
+		int idx = arr.length;
+		int result = 1;
+		while (--idx >= 0)
+			result = 31 * result + arr[idx].hashCode();
+		return result;
+	}
+
+	public static void elementsToString(StringBuffer bld, Variable rootVariable, Expression[] elements) {
+		int top = elements.length;
+		if (top > 0) {
+			elements[0].toString(bld, rootVariable);
+			for (int idx = 1; idx < top; ++idx) {
+				bld.append(", "); //$NON-NLS-1$
+				appendOperand(bld, rootVariable, elements[idx], PRIORITY_MAX);
+			}
+		}
+	}
+
+	public static List<String> getIndexCandidateMembers(Class<?> elementClass, Variable itemVariable, Expression operand) {
+		MembersFinder finder = new MembersFinder(elementClass, itemVariable);
+		operand.accept(finder);
+		return finder.getMembers();
+	}
+
+	/**
+	 * Let the visitor visit this instance and all expressions that this
+	 * instance contains.
+	 * @param visitor The visiting visitor.
+	 * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
+	 */
+	public boolean accept(IExpressionVisitor visitor) {
+		return visitor.visit(this);
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = getPriority() - e.getPriority();
+		if (cmp == 0) {
+			int e1 = getExpressionType();
+			int e2 = e.getExpressionType();
+			cmp = e1 > e2 ? 1 : (e1 == e2 ? 0 : -1);
+		}
+		return cmp;
+	}
+
+	public boolean equals(Object e) {
+		if (e == this)
+			return true;
+		if (e == null || getClass() != e.getClass())
+			return false;
+		return getExpressionType() == ((Expression) e).getExpressionType();
+	}
+
+	/**
+	 * Evaluate this expression with given context and variables.
+	 * @param context The evaluation context
+	 * @return The result of the evaluation.
+	 */
+	public abstract Object evaluate(IEvaluationContext context);
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object value = evaluate(context);
+		if (!(value instanceof Iterator<?>))
+			value = RepeatableIterator.create(value);
+		return (Iterator<?>) value;
+	}
+
+	public abstract String getOperator();
+
+	public abstract int getPriority();
+
+	public boolean isReferenceTo(Variable variable) {
+		return this == variable;
+	}
+
+	public final String toLDAPString() {
+		StringBuffer bld = new StringBuffer();
+		toLDAPString(bld);
+		return bld.toString();
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		throw new UnsupportedOperationException();
+	}
+
+	public final String toString() {
+		StringBuffer bld = new StringBuffer();
+		toString(bld);
+		return bld.toString();
+	}
+
+	public void toString(StringBuffer bld) {
+		toString(bld, ExpressionFactory.THIS);
+	}
+
+	public abstract void toString(StringBuffer bld, Variable rootVariable);
+
+	private static class Compacter {
+		private Expression base;
+
+		private List<Expression> parts;
+
+		private int op;
+
+		Compacter(Expression base, int op) {
+			this.base = base;
+			this.op = op;
+		}
+
+		Expression getResultingFilter() {
+			if (parts == null)
+				return base;
+
+			int partsOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
+			return addFilter(base, normalize(parts, partsOp), op);
+		}
+
+		boolean merge(Expression b) {
+			Expression[] aArr;
+			Expression[] bArr;
+			if (base.getExpressionType() == op)
+				aArr = getFilterImpls(base);
+			else
+				aArr = new Expression[] {base};
+
+			if (b.getExpressionType() == op)
+				bArr = getFilterImpls(b);
+			else
+				bArr = new Expression[] {b};
+
+			List<Expression> common = null;
+			List<Expression> onlyA = null;
+
+			int atop = aArr.length;
+			int btop = bArr.length;
+			int aidx;
+			int bidx;
+			for (aidx = 0; aidx < atop; ++aidx) {
+				Expression af = aArr[aidx];
+				for (bidx = 0; bidx < btop; ++bidx) {
+					Expression bf = bArr[bidx];
+					if (af.equals(bf)) {
+						if (common == null)
+							common = new ArrayList<Expression>();
+						common.add(af);
+						break;
+					}
+				}
+				if (bidx == btop) {
+					if (onlyA == null)
+						onlyA = new ArrayList<Expression>();
+					onlyA.add(af);
+				}
+			}
+			if (common == null)
+				// Nothing in common
+				return false;
+
+			if (onlyA == null && parts == null)
+				return true;
+
+			List<Expression> onlyB = null;
+			for (bidx = 0; bidx < btop; ++bidx) {
+				Expression bf = bArr[bidx];
+				for (aidx = 0; aidx < atop; ++aidx)
+					if (bf.equals(aArr[aidx]))
+						break;
+				if (aidx == atop) {
+					if (onlyB == null)
+						onlyB = new ArrayList<Expression>();
+					onlyB.add(bf);
+				}
+			}
+
+			if (onlyB == null && parts == null) {
+				// All of B is already covered by base
+				base = b;
+				return true;
+			}
+
+			if (parts == null)
+				parts = new ArrayList<Expression>();
+
+			if (onlyA != null) {
+				base = normalize(common, op);
+				Expression af = normalize(onlyA, op);
+				if (!parts.contains(af))
+					parts.add(af);
+			}
+			Expression bf = normalize(onlyB, op);
+			if (!parts.contains(bf))
+				parts.add(bf);
+			return true;
+		}
+	}
+
+	public static class VariableFinder implements IExpressionVisitor {
+		private boolean found = false;
+		private final Variable variable;
+
+		public VariableFinder(Variable variable) {
+			this.variable = variable;
+		}
+
+		public boolean visit(IExpression expression) {
+			if (((Expression) expression).isReferenceTo(variable))
+				found = true;
+			return !found;
+		}
+
+		public void reset() {
+			found = false;
+		}
+
+		public boolean isFound() {
+			return found;
+		}
+	}
+
+	private static class MembersFinder implements IExpressionVisitor {
+		private List<String> members;
+		private final Class<?> elementClass;
+		private final IExpression operand;
+
+		MembersFinder(Class<?> elementClass, IExpression operand) {
+			this.elementClass = elementClass;
+			this.operand = operand;
+		}
+
+		public boolean visit(IExpression expression) {
+			if (expression instanceof Matches) {
+				if (IInstallableUnit.class.isAssignableFrom(elementClass)) {
+					// This one is a bit special since an
+					// IInstallableUnit ~= IRequirement often
+					// means that we can reuse the requirement
+					// expression.
+					Matches matches = (Matches) expression;
+					if (matches.lhs == operand) {
+						if (members == null)
+							members = new ArrayList<String>();
+						if (!members.contains(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES))
+							members.add(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
+					}
+				}
+
+				// No point in scanning for more index candidates in a matches expression
+				return false;
+			}
+
+			if (expression instanceof Member) {
+				Member member = (Member) expression;
+				if (member.getOperand() == operand) {
+					String name = member.getName();
+					if (members == null)
+						members = new ArrayList<String>();
+					if (!members.contains(name))
+						members.add(member.getName());
+					return false;
+				}
+			}
+			return true;
+		}
+
+		List<String> getMembers() {
+			return members == null ? CollectionUtils.<String> emptyList() : members;
+		}
+	}
+
+	static Expression addFilter(Expression base, Expression subFilter, int expressionType) {
+		if (base.equals(subFilter))
+			return base;
+
+		ArrayList<Expression> filters = new ArrayList<Expression>(2);
+		filters.add(base);
+		filters.add(subFilter);
+		return normalize(filters, expressionType);
+	}
+
+	static Expression normalize(List<Expression> operands, int op) {
+		int top = operands.size();
+		if (top == 1)
+			return operands.get(0);
+
+		// a | (b | c) becomes a | b | c
+		// a & (b & c) becomes a & b & c
+		//
+		for (int idx = 0; idx < top; ++idx) {
+			Expression f = operands.get(idx);
+			if (f.getExpressionType() != op)
+				continue;
+
+			Expression[] sfs = getFilterImpls(f);
+			operands.remove(idx);
+			--top;
+			for (int ndx = 0; ndx < sfs.length; ++ndx) {
+				Expression nf = sfs[ndx];
+				if (!operands.contains(nf))
+					operands.add(nf);
+			}
+		}
+		top = operands.size();
+		if (top == 1)
+			return operands.get(0);
+
+		Collections.sort(operands);
+		List<Compacter> splits = new ArrayList<Compacter>();
+		int reverseOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
+
+		for (int idx = 0; idx < top; ++idx)
+			merge(splits, operands.get(idx), reverseOp);
+
+		operands.clear();
+		top = splits.size();
+		for (int idx = 0; idx < top; ++idx) {
+			Expression filter = splits.get(idx).getResultingFilter();
+			if (!operands.contains(filter))
+				operands.add(filter);
+		}
+		top = operands.size();
+		if (top == 1)
+			return operands.get(0);
+
+		Collections.sort(operands);
+		Expression[] expArray = operands.toArray(new Expression[top]);
+		return op == TYPE_AND ? new And(expArray) : new Or(expArray);
+	}
+
+	static void merge(List<Compacter> splits, Expression base, int op) {
+		int top = splits.size();
+		for (int idx = 0; idx < top; ++idx) {
+			Compacter split = splits.get(idx);
+			if (split.merge(base))
+				return;
+		}
+		splits.add(new Compacter(base, op));
+	}
+
+	static Expression[] getFilterImpls(Expression expression) {
+		if (expression instanceof NAry)
+			return ((NAry) expression).operands;
+		throw new IllegalArgumentException();
+	}
+
+	static Set<?> asSet(Object val, boolean forcePrivateCopy) {
+		if (val == null)
+			throw new IllegalArgumentException("Cannot convert null into an set"); //$NON-NLS-1$
+
+		if (val instanceof IRepeatableIterator<?>) {
+			Object provider = ((IRepeatableIterator<?>) val).getIteratorProvider();
+			if (!forcePrivateCopy) {
+				if (provider instanceof Set<?>)
+					return (Set<?>) provider;
+				if (provider instanceof IQueryResult<?>)
+					return ((IQueryResult<?>) provider).toUnmodifiableSet();
+			}
+
+			if (provider instanceof Collection<?>)
+				val = provider;
+		} else {
+			if (!forcePrivateCopy) {
+				if (val instanceof Set<?>)
+					return (Set<?>) val;
+				if (val instanceof IQueryResult<?>)
+					return ((IQueryResult<?>) val).toUnmodifiableSet();
+			}
+		}
+
+		HashSet<Object> result;
+		if (val instanceof Collection<?>)
+			result = new HashSet<Object>((Collection<?>) val);
+		else {
+			result = new HashSet<Object>();
+			Iterator<?> iterator = RepeatableIterator.create(val);
+			while (iterator.hasNext())
+				result.add(iterator.next());
+		}
+		return result;
+	}
+
+	private static class TranslationSupportFinder implements IExpressionVisitor {
+		private boolean found;
+
+		TranslationSupportFinder() { //
+		}
+
+		public boolean visit(IExpression expression) {
+			if (expression.getExpressionType() == TYPE_MEMBER && InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(((Member) expression).getName()))
+				found = true;
+			return !found;
+		}
+
+		boolean isFound() {
+			return found;
+		}
+	}
+
+	/**
+	 * Checks if the expression will make repeated requests for the 'everything' iterator.
+	 * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
+	 */
+	public boolean needsTranslationSupport() {
+		TranslationSupportFinder tsFinder = new TranslationSupportFinder();
+		accept(tsFinder);
+		return tsFinder.isFound();
+	}
+
+	int countAccessToEverything() {
+		return 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
new file mode 100644
index 0000000..ec8abf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
@@ -0,0 +1,293 @@
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.IQuery;
+
+public class ExpressionFactory implements IExpressionFactory, IExpressionConstants {
+	public static final Variable EVERYTHING = new Variable(VARIABLE_EVERYTHING);
+	protected static final Map<String, Constructor<?>> functionMap;
+	public static final IExpressionFactory INSTANCE = new ExpressionFactory();
+
+	public static final Variable THIS = new Variable(VARIABLE_THIS);
+
+	static {
+		Class<?>[] args = new Class[] {Expression[].class};
+		Map<String, Constructor<?>> f = new HashMap<String, Constructor<?>>();
+		try {
+			f.put(KEYWORD_BOOLEAN, BooleanFunction.class.getConstructor(args));
+			f.put(KEYWORD_FILTER, FilterFunction.class.getConstructor(args));
+			f.put(KEYWORD_VERSION, VersionFunction.class.getConstructor(args));
+			f.put(KEYWORD_RANGE, RangeFunction.class.getConstructor(args));
+			f.put(KEYWORD_CLASS, ClassFunction.class.getConstructor(args));
+			f.put(KEYWORD_SET, SetFunction.class.getConstructor(args));
+			f.put(KEYWORD_IQUERY, WrappedIQuery.class.getConstructor(args));
+			functionMap = Collections.unmodifiableMap(f);
+		} catch (Exception e) {
+			throw new ExceptionInInitializerError(e);
+		}
+	}
+
+	protected static Expression[] convertArray(IExpression[] operands) {
+		Expression[] ops = new Expression[operands.length];
+		System.arraycopy(operands, 0, ops, 0, operands.length);
+		return ops;
+	}
+
+	public IExpression all(IExpression collection, IExpression lambda) {
+		return new All((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IExpression and(IExpression... operands) {
+		if (operands.length == 0)
+			return Literal.TRUE_CONSTANT;
+		if (operands.length == 1)
+			return operands[0];
+		return new And(convertArray(operands));
+	}
+
+	public IExpression array(IExpression... operands) {
+		return new Array(convertArray(operands));
+	}
+
+	public IExpression assignment(IExpression variable, IExpression expression) {
+		return new Assignment((Variable) variable, (Expression) expression);
+	}
+
+	public IExpression at(IExpression target, IExpression key) {
+		return new At((Expression) target, (Expression) key);
+	}
+
+	public IExpression collect(IExpression collection, IExpression lambda) {
+		return new Collect((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse) {
+		return new Condition((Expression) test, (Expression) ifTrue, (Expression) ifFalse);
+	}
+
+	public IExpression constant(Object value) {
+		return Literal.create(value);
+	}
+
+	@SuppressWarnings("unchecked")
+	public <T> IContextExpression<T> contextExpression(IExpression expression, Object... parameters) {
+
+		if (expression instanceof IContextExpression<?>) {
+			if (parameters.length > 0)
+				// Not good.
+				throw new IllegalArgumentException("IContextExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
+			return (IContextExpression<T>) expression;
+		}
+		if (expression instanceof IMatchExpression<?>)
+			throw new IllegalArgumentException("IMatchExpression cannot be turned into a context expression"); //$NON-NLS-1$
+		return new ContextExpression<T>((Expression) expression, parameters);
+	}
+
+	public IEvaluationContext createContext(IExpression[] variables, Object... parameters) {
+		return EvaluationContext.create(parameters, variables);
+	}
+
+	public IEvaluationContext createContext(Object... parameters) {
+		return EvaluationContext.create(parameters, (Variable[]) null);
+	}
+
+	public IExpression equals(IExpression lhs, IExpression rhs) {
+		return new Equals((Expression) lhs, (Expression) rhs, false);
+	}
+
+	public IExpression exists(IExpression collection, IExpression lambda) {
+		return new Exists((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IFilterExpression filterExpression(IExpression expression) {
+		return new LDAPFilter((Expression) expression);
+	}
+
+	public IExpression first(IExpression collection, IExpression lambda) {
+		return new First((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IExpression flatten(IExpression collection) {
+		return new Flatten((Expression) collection);
+	}
+
+	public IExpression function(Object function, IExpression... args) {
+		try {
+			return (IExpression) ((Constructor<?>) function).newInstance(new Object[] {convertArray(args)});
+		} catch (IllegalArgumentException e) {
+			throw e;
+		} catch (InvocationTargetException e) {
+			Throwable t = e.getCause();
+			if (t instanceof RuntimeException)
+				throw (RuntimeException) t;
+			throw new RuntimeException(t);
+		} catch (InstantiationException e) {
+			throw new RuntimeException(e);
+		} catch (IllegalAccessException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	public Map<String, ? extends Object> getFunctionMap() {
+		return functionMap;
+	}
+
+	public IExpression greater(IExpression lhs, IExpression rhs) {
+		return new Compare((Expression) lhs, (Expression) rhs, false, false);
+	}
+
+	public IExpression greaterEqual(IExpression lhs, IExpression rhs) {
+		return new Compare((Expression) lhs, (Expression) rhs, false, true);
+	}
+
+	public IExpression indexedParameter(int index) {
+		return new Parameter(index);
+	}
+
+	public IExpression intersect(IExpression c1, IExpression c2) {
+		return new Intersect((Expression) c1, (Expression) c2);
+	}
+
+	public IExpression lambda(IExpression variable, IExpression body) {
+		return new LambdaExpression((Variable) variable, (Expression) body);
+	}
+
+	public IExpression lambda(IExpression variable, IExpression[] assignments, IExpression body) {
+		if (assignments.length == 0)
+			return lambda(variable, body);
+		Assignment[] asgns = new Assignment[assignments.length];
+		System.arraycopy(assignments, 0, asgns, 0, assignments.length);
+		return new CurryedLambdaExpression((Variable) variable, asgns, (Expression) body);
+	}
+
+	public IExpression latest(IExpression collection) {
+		return new Latest((Expression) collection);
+	}
+
+	public IExpression less(IExpression lhs, IExpression rhs) {
+		return new Compare((Expression) lhs, (Expression) rhs, true, false);
+	}
+
+	public IExpression lessEqual(IExpression lhs, IExpression rhs) {
+		return new Compare((Expression) lhs, (Expression) rhs, true, true);
+	}
+
+	public IExpression limit(IExpression collection, IExpression limit) {
+		return new Limit((Expression) collection, (Expression) limit);
+	}
+
+	public IExpression limit(IExpression collection, int count) {
+		return new Limit((Expression) collection, Literal.create(new Integer(count)));
+	}
+
+	public IExpression matches(IExpression lhs, IExpression rhs) {
+		return new Matches((Expression) lhs, (Expression) rhs);
+	}
+
+	@SuppressWarnings("unchecked")
+	public <T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters) {
+		if (expression instanceof IMatchExpression<?>) {
+			if (parameters.length > 0)
+				// Not good.
+				throw new IllegalArgumentException("IMatchExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
+			return (IMatchExpression<T>) expression;
+		}
+		if (expression instanceof IContextExpression<?>)
+			throw new IllegalArgumentException("IContextExpression cannot be turned into a match expression"); //$NON-NLS-1$
+		return new MatchExpression<T>((Expression) expression, parameters);
+	}
+
+	public IExpression member(IExpression target, String name) {
+		if ("empty".equals(name)) //$NON-NLS-1$
+			return new Member.EmptyMember((Expression) target);
+		if ("length".equals(name)) //$NON-NLS-1$
+			return new Member.LengthMember((Expression) target);
+		return new Member.DynamicMember((Expression) target, name);
+	}
+
+	public IExpression memberCall(IExpression target, String name, IExpression... args) {
+		if (args.length == 0)
+			return member(target, name);
+
+		Expression[] eargs = convertArray(args);
+
+		// Insert functions that takes arguments here
+
+		//
+		StringBuffer bld = new StringBuffer();
+		bld.append("Don't know how to do a member call with "); //$NON-NLS-1$
+		bld.append(name);
+		bld.append('(');
+		Expression.elementsToString(bld, null, eargs);
+		bld.append(')');
+		throw new IllegalArgumentException(bld.toString());
+	}
+
+	@SuppressWarnings("unchecked")
+	public IExpression normalize(List<? extends IExpression> operands, int expressionType) {
+		return Expression.normalize((List<Expression>) operands, expressionType);
+	}
+
+	public IExpression not(IExpression operand) {
+		if (operand instanceof Equals) {
+			Equals eq = (Equals) operand;
+			return new Equals(eq.lhs, eq.rhs, !eq.negate);
+		}
+		if (operand instanceof Compare) {
+			Compare cmp = (Compare) operand;
+			return new Compare(cmp.lhs, cmp.rhs, !cmp.compareLess, !cmp.equalOK);
+		}
+		if (operand instanceof Not)
+			return ((Not) operand).operand;
+
+		return new Not((Expression) operand);
+	}
+
+	public IExpression or(IExpression... operands) {
+		if (operands.length == 0)
+			return Literal.TRUE_CONSTANT;
+		if (operands.length == 1)
+			return operands[0];
+		return new Or(convertArray(operands));
+	}
+
+	public IExpression pipe(IExpression... operands) {
+		return Pipe.createPipe(convertArray(operands));
+	}
+
+	public IExpression select(IExpression collection, IExpression lambda) {
+		return new Select((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IExpression thisVariable() {
+		return THIS;
+	}
+
+	public IExpression toExpression(IQuery<?> query) {
+		Literal queryConstant = Literal.create(query);
+		return new WrappedIQuery(new Expression[] {queryConstant});
+	}
+
+	public IExpression traverse(IExpression collection, IExpression lambda) {
+		return new Traverse((Expression) collection, (LambdaExpression) lambda);
+	}
+
+	public IExpression union(IExpression c1, IExpression c2) {
+		return new Union((Expression) c1, (Expression) c2);
+	}
+
+	public IExpression unique(IExpression collection, IExpression cache) {
+		return new Unique((Expression) collection, (Expression) cache);
+	}
+
+	public IExpression variable(String name) {
+		if (VARIABLE_EVERYTHING.equals(name))
+			return EVERYTHING;
+		if (VARIABLE_THIS.equals(name))
+			return THIS;
+		return new Variable(name);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
new file mode 100644
index 0000000..07fa923
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+
+/**
+ * A function that creates an OSGi filter based on a String
+ */
+public final class FilterFunction extends Function {
+	public FilterFunction(Expression[] operands) {
+		super(assertLength(operands, 1, 1, KEYWORD_FILTER));
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return v instanceof String;
+	}
+
+	Object createInstance(Object arg) {
+		return ExpressionUtil.parseLDAP((String) arg);
+	}
+
+	public String getOperator() {
+		return KEYWORD_FILTER;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
new file mode 100644
index 0000000..de5c8b5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * A collection filter that yields the first element of the <code>collection</code> for which
+ * the <code>filter</code> yields <code>true</code>
+ */
+final class First extends CollectionFilter {
+	First(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		Variable variable = lambda.getItemVariable();
+		while (itor.hasNext()) {
+			Object each = itor.next();
+			variable.setValue(context, each);
+			if (lambda.evaluate(context) == Boolean.TRUE)
+				return each;
+		}
+		return null;
+	}
+
+	public int getExpressionType() {
+		return TYPE_FIRST;
+	}
+
+	public String getOperator() {
+		return KEYWORD_FIRST;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
new file mode 100644
index 0000000..181caa2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that yields a new collection consisting of all elements of the
+ * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
+ */
+final class Flatten extends UnaryCollectionFilter {
+	Flatten(Expression collection) {
+		super(collection);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		return new CompoundIterator<Object>(operand.evaluateAsIterator(context));
+	}
+
+	public int getExpressionType() {
+		return TYPE_FLATTEN;
+	}
+
+	public String getOperator() {
+		return IExpressionConstants.KEYWORD_FLATTEN;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
new file mode 100644
index 0000000..49908cb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that represents a function such as filter(<expr>) or version(<expr>)
+ */
+public abstract class Function extends NAry {
+
+	private Object instance;
+
+	protected Function(Expression[] operands) {
+		super(operands);
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return true;
+	}
+
+	Object createInstance(Object arg) {
+		throw new UnsupportedOperationException();
+	}
+
+	final Object createInstance(String arg) {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		if (instance != null)
+			return instance;
+
+		Expression operand = operands[0];
+		Object arg = operand.evaluate(context);
+		if (assertSingleArgumentClass(arg)) {
+			Object result = createInstance(arg);
+			if (operand instanceof Literal || operand instanceof Parameter)
+				// operand won't change over time so we can cache this instance.
+				instance = result;
+			return result;
+		}
+		String what = arg == null ? "null" : ("a " + arg.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		throw new IllegalArgumentException("Cannot create a " + getOperator() + " from " + what); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object value = evaluate(context);
+		if (!(value instanceof Iterator<?>))
+			value = RepeatableIterator.create(value);
+		return (Iterator<?>) value;
+	}
+
+	public int getExpressionType() {
+		return TYPE_FUNCTION;
+	}
+
+	public int getPriority() {
+		return PRIORITY_FUNCTION;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		bld.append(getOperator());
+		bld.append('(');
+		elementsToString(bld, rootVariable, operands);
+		bld.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
new file mode 100644
index 0000000..033a594
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+public interface IExpressionConstants {
+	String KEYWORD_ALL = "all"; //$NON-NLS-1$
+
+	String KEYWORD_BOOLEAN = "boolean"; //$NON-NLS-1$
+	String KEYWORD_CLASS = "class"; //$NON-NLS-1$
+	String KEYWORD_EXISTS = "exists"; //$NON-NLS-1$
+	String KEYWORD_FALSE = "false"; //$NON-NLS-1$
+	String KEYWORD_FILTER = "filter"; //$NON-NLS-1$
+	String KEYWORD_NULL = "null"; //$NON-NLS-1$
+	String KEYWORD_RANGE = "range"; //$NON-NLS-1$
+	String KEYWORD_TRUE = "true"; //$NON-NLS-1$
+	String KEYWORD_COLLECT = "collect"; //$NON-NLS-1$
+	String KEYWORD_FIRST = "first"; //$NON-NLS-1$
+	String KEYWORD_FLATTEN = "flatten"; //$NON-NLS-1$
+	String KEYWORD_INTERSECT = "intersect"; //$NON-NLS-1$
+	String KEYWORD_IQUERY = "iquery"; //$NON-NLS-1$
+	String KEYWORD_LATEST = "latest"; //$NON-NLS-1$
+	String KEYWORD_LIMIT = "limit"; //$NON-NLS-1$
+	String KEYWORD_LOCALIZED_KEYS = "localizedKeys"; //$NON-NLS-1$
+	String KEYWORD_LOCALIZED_MAP = "localizedMap"; //$NON-NLS-1$
+	String KEYWORD_LOCALIZED_PROPERTY = "localizedProperty"; //$NON-NLS-1$
+	String KEYWORD_SATISFIES_ALL = "satisfiesAll"; //$NON-NLS-1$
+	String KEYWORD_SATISFIES_ANY = "satisfiesAny"; //$NON-NLS-1$
+	String KEYWORD_SELECT = "select"; //$NON-NLS-1$
+	String KEYWORD_SET = "set"; //$NON-NLS-1$
+	String KEYWORD_TRAVERSE = "traverse"; //$NON-NLS-1$
+	String KEYWORD_UNION = "union"; //$NON-NLS-1$
+	String KEYWORD_UNIQUE = "unique"; //$NON-NLS-1$
+	String KEYWORD_VERSION = "version"; //$NON-NLS-1$
+
+	String OPERATOR_AND = "&&"; //$NON-NLS-1$
+	String OPERATOR_AT = "[]"; //$NON-NLS-1$
+	String OPERATOR_EQUALS = "=="; //$NON-NLS-1$
+	String OPERATOR_GT = ">"; //$NON-NLS-1$
+	String OPERATOR_GT_EQUAL = ">="; //$NON-NLS-1$
+	String OPERATOR_LT = "<"; //$NON-NLS-1$
+	String OPERATOR_LT_EQUAL = "<="; //$NON-NLS-1$
+	String OPERATOR_MATCHES = "~="; //$NON-NLS-1$
+	String OPERATOR_MEMBER = "."; //$NON-NLS-1$
+	String OPERATOR_NOT = "!"; //$NON-NLS-1$
+	String OPERATOR_NOT_EQUALS = "!="; //$NON-NLS-1$
+	String OPERATOR_OR = "||"; //$NON-NLS-1$
+	String OPERATOR_PARAMETER = "$"; //$NON-NLS-1$
+	String OPERATOR_ARRAY = "[]"; //$NON-NLS-1$
+	String OPERATOR_ASSIGN = "="; //$NON-NLS-1$
+	String OPERATOR_EACH = "_"; //$NON-NLS-1$
+	String OPERATOR_ELSE = ":"; //$NON-NLS-1$
+	String OPERATOR_IF = "?"; //$NON-NLS-1$
+
+	int PRIORITY_LITERAL = 1;
+	int PRIORITY_VARIABLE = 1;
+	int PRIORITY_FUNCTION = 2; // for extend query expressions
+	int PRIORITY_MEMBER = 3;
+	int PRIORITY_COLLECTION = 4;
+	int PRIORITY_NOT = 5;
+	int PRIORITY_BINARY = 6;
+	int PRIORITY_AND = 7;
+	int PRIORITY_OR = 8;
+	int PRIORITY_CONDITION = 9;
+	int PRIORITY_ASSIGNMENT = 10;
+	int PRIORITY_LAMBDA = 11;
+	int PRIORITY_COMMA = 12;
+	int PRIORITY_MAX = 20;
+
+	String VARIABLE_EVERYTHING = "everything"; //$NON-NLS-1$
+	String VARIABLE_THIS = "this"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
new file mode 100644
index 0000000..f20e266
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+
+public interface IRepeatableIterator<T> extends Iterator<T> {
+	/**
+	 * Returns a copy that will iterate over the same elements
+	 * as this iterator. The contents or position of this iterator
+	 * is left unchanged. 
+	 * @return A re-initialized copy of this iterator.
+	 */
+	IRepeatableIterator<T> getCopy();
+
+	Object getIteratorProvider();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
new file mode 100644
index 0000000..2ebbe0f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * n-ary <code>intersect</code> operator. The result is the set of elements that were found in all operands. 
+ */
+final class Intersect extends Binary {
+	Intersect(Expression operand, Expression param) {
+		super(operand, param);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Set<?> resultSet = asSet(lhs.evaluate(context), false); // Safe since it will not be modified
+		Iterator<?> itor = rhs.evaluateAsIterator(context);
+		Set<Object> retained = new HashSet<Object>();
+		while (itor.hasNext()) {
+			Object value = itor.next();
+			if (resultSet.contains(value))
+				retained.add(value);
+		}
+		return RepeatableIterator.create(retained);
+	}
+
+	public int getExpressionType() {
+		return TYPE_INTERSECT;
+	}
+
+	public String getOperator() {
+		return KEYWORD_INTERSECT;
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
new file mode 100644
index 0000000..291a6ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.io.Serializable;
+
+/**
+ * Map a string for an LDAP APPROX (~=) comparison.
+ * This implementation removes white spaces and transforms everything to lower case.
+ */
+public final class LDAPApproximation implements Serializable, Comparable<LDAPApproximation> {
+	private static final long serialVersionUID = 4782295637798543587L;
+	private final String pattern;
+	private transient String approxPattern;
+
+	public LDAPApproximation(String pattern) {
+		this.pattern = pattern;
+	}
+
+	public int compareTo(LDAPApproximation o) {
+		return pattern.compareTo(o.pattern);
+	}
+
+	public boolean equals(Object o) {
+		return o == this || (o instanceof LDAPApproximation && ((LDAPApproximation) o).pattern.equals(pattern));
+	}
+
+	public int hashCode() {
+		return 3 * pattern.hashCode();
+	}
+
+	/**
+	 * Matches the <code>value</code> with the compiled expression. The value
+	 * is considered matching if all characters are matched by the expression. A
+	 * partial match is not enough.
+	 * @param value The value to match
+	 * @return <code>true</code> if the value was a match.
+	 */
+	public boolean isMatch(CharSequence value) {
+		if (value == null)
+			return false;
+		if (approxPattern == null)
+			approxPattern = approxString(pattern);
+		return approxString(value).equals(approxPattern);
+	}
+
+	public String toString() {
+		return pattern;
+	}
+
+	private static String approxString(CharSequence input) {
+		boolean changed = false;
+		char[] output = new char[input.length()];
+		int cursor = 0;
+		for (int i = 0, length = output.length; i < length; i++) {
+			char c = input.charAt(i);
+			if (Character.isWhitespace(c)) {
+				changed = true;
+				continue;
+			}
+			if (Character.isUpperCase(c)) {
+				changed = true;
+				c = Character.toLowerCase(c);
+			}
+			output[cursor++] = c;
+		}
+		return changed ? new String(output, 0, cursor) : input.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
new file mode 100644
index 0000000..b81f1f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
@@ -0,0 +1,74 @@
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Dictionary;
+import java.util.Map;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.osgi.framework.Filter;
+import org.osgi.framework.ServiceReference;
+
+public class LDAPFilter extends Unary implements IFilterExpression {
+
+	LDAPFilter(Expression expression) {
+		super(expression);
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return operand.accept(visitor);
+	}
+
+	public boolean equals(Object o) {
+		return (o instanceof Filter && !(o instanceof LDAPFilter)) ? equals(ExpressionUtil.parseLDAP(o.toString())) : super.equals(o);
+	}
+
+	@Override
+	public String getOperator() {
+		return operand.getOperator();
+	}
+
+	@Override
+	public int getPriority() {
+		return operand.getPriority();
+	}
+
+	public int getExpressionType() {
+		return 0;
+	}
+
+	public boolean match(Map<String, ? extends Object> map) {
+		return isMatch(MemberProvider.create(map, true));
+	}
+
+	@SuppressWarnings("rawtypes")
+	public boolean match(Dictionary dictionary) {
+		return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, true));
+	}
+
+	public boolean isMatch(Object candidate) {
+		Variable self = ExpressionFactory.THIS;
+		IEvaluationContext ctx = EvaluationContext.create(self);
+		self.setValue(ctx, candidate);
+		return Boolean.TRUE == operand.evaluate(ctx);
+	}
+
+	public boolean match(ServiceReference reference) {
+		return isMatch(reference == null ? MemberProvider.emptyProvider() : MemberProvider.create(reference, true));
+	}
+
+	public boolean matchCase(Map<String, ? extends Object> map) {
+		return isMatch(map == null ? MemberProvider.emptyProvider() : MemberProvider.create(map, false));
+	}
+
+	@SuppressWarnings("rawtypes")
+	public boolean matchCase(Dictionary dictionary) {
+		return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, false));
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		operand.toLDAPString(bld);
+	}
+
+	@Override
+	public Object evaluate(IEvaluationContext context) {
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
new file mode 100644
index 0000000..f497319
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+
+/**
+ * A function that executes some code
+ */
+public class LambdaExpression extends Unary {
+	protected final Variable each;
+
+	protected LambdaExpression(Variable each, Expression body) {
+		super(body);
+		this.each = each;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return super.accept(visitor) && each.accept(visitor);
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = each.compareTo(((LambdaExpression) e).each);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && each.equals(((LambdaExpression) o).each);
+	}
+
+	public int hashCode() {
+		int result = 31 + operand.hashCode();
+		return 31 * result + each.hashCode();
+	}
+
+	public int getExpressionType() {
+		return TYPE_LAMBDA;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		each.toString(bld, rootVariable);
+		bld.append(" | "); //$NON-NLS-1$
+		appendOperand(bld, rootVariable, operand, IExpressionConstants.PRIORITY_COMMA);
+	}
+
+	public Variable getItemVariable() {
+		return each;
+	}
+
+	public String getOperator() {
+		return "|"; //$NON-NLS-1$
+	}
+
+	public int getPriority() {
+		return IExpressionConstants.PRIORITY_LAMBDA;
+	}
+
+	public IEvaluationContext prolog(IEvaluationContext context) {
+		return EvaluationContext.create(context, each);
+	}
+
+	int countAccessToEverything() {
+		return 2 * super.countAccessToEverything();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
new file mode 100644
index 0000000..cf96f06
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that is especially targeted towards {@link IVersionedId} instances. It will
+ * reject any objects that is not an <code>IVersionedId</code> and it will ensure that the
+ * resulting iterator only iterates over the latest version of any found id.
+ */
+final class Latest extends UnaryCollectionFilter {
+
+	Latest(Expression collection) {
+		super(collection);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		HashMap<String, IVersionedId> greatestIUVersion;
+		if (operand instanceof Select) {
+			// Inline element evaluation here so that we don't build a map that is
+			// larger then it has to be
+			Select select = (Select) operand;
+			Iterator<?> iterator = select.operand.evaluateAsIterator(context);
+			if (!iterator.hasNext())
+				return Collections.EMPTY_SET.iterator();
+
+			greatestIUVersion = new HashMap<String, IVersionedId>();
+			LambdaExpression lambda = select.lambda;
+			context = lambda.prolog(context);
+			Variable variable = lambda.getItemVariable();
+			while (iterator.hasNext()) {
+				Object next = iterator.next();
+				if (!(next instanceof IVersionedId))
+					continue;
+
+				variable.setValue(context, next);
+				if (lambda.evaluate(context) != Boolean.TRUE)
+					continue;
+
+				IVersionedId versionedID = (IVersionedId) next;
+				String id = versionedID.getId();
+				IVersionedId prev = greatestIUVersion.put(id, versionedID);
+				if (prev == null)
+					continue;
+				if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
+					greatestIUVersion.put(id, prev);
+			}
+		} else {
+			Iterator<?> iterator = operand.evaluateAsIterator(context);
+			if (iterator == null)
+				return null;
+			if (!iterator.hasNext())
+				return Collections.EMPTY_SET.iterator();
+
+			greatestIUVersion = new HashMap<String, IVersionedId>();
+			while (iterator.hasNext()) {
+				Object next = iterator.next();
+				if (!(next instanceof IVersionedId))
+					continue;
+
+				IVersionedId versionedID = (IVersionedId) next;
+				String id = versionedID.getId();
+
+				IVersionedId prev = greatestIUVersion.put(id, versionedID);
+				if (prev == null)
+					continue;
+
+				if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
+					greatestIUVersion.put(id, prev);
+			}
+		}
+		return greatestIUVersion.values().iterator();
+	}
+
+	public int getExpressionType() {
+		return TYPE_LATEST;
+	}
+
+	public String getOperator() {
+		return IExpressionConstants.KEYWORD_LATEST;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
new file mode 100644
index 0000000..d477675
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * A collection filter that limits the number of entries in the collection
+ */
+final class Limit extends Binary {
+
+	/**
+	 * An iterator that stops iterating after a given number of iterations.
+	 */
+	static final class CountingIterator<T> implements Iterator<T> {
+		private final Iterator<? extends T> innerIterator;
+		private int counter;
+
+		public CountingIterator(Iterator<? extends T> iterator, int count) {
+			this.innerIterator = iterator;
+			this.counter = count;
+		}
+
+		public boolean hasNext() {
+			return counter > 0 && innerIterator.hasNext();
+		}
+
+		public T next() {
+			if (counter > 0) {
+				--counter;
+				return innerIterator.next();
+			}
+			throw new NoSuchElementException();
+		}
+
+		public void remove() {
+			innerIterator.remove();
+		}
+	}
+
+	Limit(Expression operand, Expression param) {
+		super(operand, param);
+	}
+
+	Limit(Expression operand, int limit) {
+		this(operand, (Expression) ExpressionFactory.INSTANCE.constant(new Integer(limit)));
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object rval = rhs.evaluate(context);
+		int limit = -1;
+		if (rval instanceof Integer)
+			limit = ((Integer) rval).intValue();
+		if (limit < 0)
+			throw new IllegalArgumentException("limit expression did not evalutate to a positive integer"); //$NON-NLS-1$
+		return limit == 0 ? CollectionUtils.emptySet().iterator() : new CountingIterator<Object>(lhs.evaluateAsIterator(context), limit);
+	}
+
+	public int getExpressionType() {
+		return TYPE_LIMIT;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
+		appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
+		bld.append(')');
+	}
+
+	public String getOperator() {
+		return KEYWORD_LIMIT;
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
new file mode 100644
index 0000000..fffdf96
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.SimplePattern;
+import org.osgi.framework.Filter;
+
+/**
+ * An expression that represents a constant value.
+ */
+public final class Literal extends Expression {
+	public static final Literal FALSE_CONSTANT = new Literal(Boolean.FALSE);
+
+	public static final Literal NULL_CONSTANT = new Literal(null);
+
+	public static final Literal TRUE_CONSTANT = new Literal(Boolean.TRUE);
+
+	public static Literal create(Object value) {
+		if (value == null)
+			return NULL_CONSTANT;
+		if (value == Boolean.TRUE)
+			return TRUE_CONSTANT;
+		if (value == Boolean.FALSE)
+			return FALSE_CONSTANT;
+		return new Literal(value);
+	}
+
+	public final Object value;
+
+	private Literal(Object value) {
+		this.value = value;
+	}
+
+	@SuppressWarnings({"unchecked", "rawtypes"})
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp != 0)
+			return cmp;
+
+		Object eValue = ((Literal) e).value;
+		if (value == null)
+			return eValue == null ? 0 : -1;
+
+		if (eValue == null)
+			return 1;
+
+		if (eValue.getClass() == value.getClass())
+			return ((Comparable) value).compareTo(eValue);
+
+		return eValue.getClass().getName().compareTo(value.getClass().getName());
+	}
+
+	public boolean equals(Object o) {
+		if (super.equals(o)) {
+			Literal bo = (Literal) o;
+			return value == null ? bo.value == null : value.equals(bo.value);
+		}
+		return false;
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return value;
+	}
+
+	public int getExpressionType() {
+		return TYPE_LITERAL;
+	}
+
+	public String getOperator() {
+		return "<literal>"; //$NON-NLS-1$
+	}
+
+	public int getPriority() {
+		return PRIORITY_LITERAL;
+	}
+
+	public int hashCode() {
+		return 31 + value.hashCode();
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		if (!(value instanceof Filter))
+			throw new UnsupportedOperationException();
+		buf.append(value.toString());
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		appendValue(bld, value);
+	}
+
+	private static void appendValue(StringBuffer bld, Object value) {
+		if (value == null)
+			bld.append("null"); //$NON-NLS-1$
+		else if (value == Boolean.TRUE)
+			bld.append("true"); //$NON-NLS-1$
+		else if (value == Boolean.FALSE)
+			bld.append("false"); //$NON-NLS-1$
+		else if (value instanceof String)
+			appendQuotedString(bld, (String) value);
+		else if (value instanceof Number)
+			bld.append(value.toString());
+		else if (value instanceof SimplePattern) {
+			appendEscaped(bld, '/', value.toString());
+		} else if (value instanceof Version) {
+			bld.append("version("); //$NON-NLS-1$
+			appendQuotedString(bld, value.toString());
+			bld.append(')');
+		} else if (value instanceof VersionRange) {
+			bld.append("range("); //$NON-NLS-1$
+			appendQuotedString(bld, value.toString());
+			bld.append(')');
+		} else if (value instanceof Class<?>) {
+			bld.append("class("); //$NON-NLS-1$
+			appendQuotedString(bld, value.toString());
+			bld.append(')');
+		} else if (value instanceof Filter) {
+			bld.append("filter("); //$NON-NLS-1$
+			appendQuotedString(bld, value.toString());
+			bld.append(')');
+		} else if (value instanceof Set<?>) {
+			bld.append("set("); //$NON-NLS-1$
+			appendLiteralCollection(bld, (Collection<?>) value);
+			bld.append(')');
+		} else if (value instanceof Collection<?>)
+			appendLiteralCollection(bld, (Collection<?>) value);
+		else
+			bld.append(value);
+
+	}
+
+	private static void appendLiteralCollection(StringBuffer bld, Collection<?> collection) {
+		bld.append('[');
+		Iterator<?> iter = collection.iterator();
+		if (iter.hasNext()) {
+			appendValue(bld, iter.next());
+			while (iter.hasNext()) {
+				bld.append(',');
+				appendValue(bld, iter.next());
+			}
+		}
+		bld.append(']');
+	}
+
+	private static void appendQuotedString(StringBuffer bld, String str) {
+		if (str.indexOf('\'') < 0) {
+			bld.append('\'');
+			bld.append(str);
+			bld.append('\'');
+		} else
+			appendEscaped(bld, '"', str);
+	}
+
+	private static void appendEscaped(StringBuffer bld, char delimiter, String str) {
+		bld.append(delimiter);
+		int top = str.length();
+		for (int idx = 0; idx < top; ++idx) {
+			char c = str.charAt(idx);
+			if (c == delimiter || c == '\\')
+				bld.append('\\');
+			bld.append(c);
+		}
+		bld.append(delimiter);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
new file mode 100644
index 0000000..dfdf619
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Arrays;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * The MatchExpression is a wrapper for an {@link IExpression} that is expected
+ * to return a boolean value. The wrapper provides the evaluation context needed
+ * to evaluate the expression.
+ */
+public class MatchExpression<T> extends Unary implements IMatchExpression<T> {
+	private static final Object[] noParams = new Object[0];
+	private final Object[] parameters;
+
+	MatchExpression(Expression expression, Object[] parameters) {
+		super(expression);
+		this.parameters = parameters == null ? noParams : parameters;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return operand.accept(visitor);
+	}
+
+	public IEvaluationContext createContext() {
+		return EvaluationContext.create(parameters, ExpressionFactory.THIS);
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && Arrays.equals(parameters, ((MatchExpression<?>) o).parameters);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return operand.evaluate(parameters.length == 0 ? context : EvaluationContext.create(context, parameters));
+	}
+
+	public int getExpressionType() {
+		return 0;
+	}
+
+	public String getOperator() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object[] getParameters() {
+		return parameters;
+	}
+
+	/**
+	 * Returns the predicate expression that is used for the match
+	 * @return The predicate expression
+	 */
+	IExpression getPredicate() {
+		return operand;
+	}
+
+	public int getPriority() {
+		return operand.getPriority();
+	}
+
+	public int hashCode() {
+		return operand.hashCode() * 31 + CollectionUtils.hashCode(parameters);
+	}
+
+	public boolean isMatch(IEvaluationContext context, T value) {
+		ExpressionFactory.THIS.setValue(context, value);
+		return Boolean.TRUE == operand.evaluate(context);
+	}
+
+	public boolean isMatch(T value) {
+		return isMatch(createContext(), value);
+	}
+
+	public void toLDAPString(StringBuffer bld) {
+		operand.toLDAPString(bld);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		operand.toString(bld, rootVariable);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
new file mode 100644
index 0000000..8d21ed8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * An iterator filter using a boolean {@link #isMatch(Object)} method.
+ */
+public abstract class MatchIteratorFilter<T> implements Iterator<T> {
+	private static final Object NO_ELEMENT = new Object();
+
+	private final Iterator<? extends T> innerIterator;
+
+	private T nextObject = noElement();
+
+	public MatchIteratorFilter(Iterator<? extends T> iterator) {
+		this.innerIterator = iterator;
+	}
+
+	public boolean hasNext() {
+		return positionNext();
+	}
+
+	public T next() {
+		if (!positionNext())
+			throw new NoSuchElementException();
+
+		T nxt = nextObject;
+		nextObject = noElement();
+		return nxt;
+	}
+
+	public void remove() {
+		throw new UnsupportedOperationException();
+	}
+
+	protected Iterator<? extends T> getInnerIterator() {
+		return innerIterator;
+	}
+
+	protected abstract boolean isMatch(T val);
+
+	private boolean positionNext() {
+		if (nextObject != NO_ELEMENT)
+			return true;
+
+		while (innerIterator.hasNext()) {
+			T nxt = innerIterator.next();
+			if (isMatch(nxt)) {
+				nextObject = nxt;
+				return true;
+			}
+		}
+		return false;
+	}
+
+	@SuppressWarnings("unchecked")
+	private static <T> T noElement() {
+		return (T) NO_ELEMENT;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
new file mode 100644
index 0000000..0c8f0ba
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.osgi.framework.Filter;
+
+/**
+ * <p>A class that performs "matching" The actual algorithm used for
+ * performing the match varies depending on the types of the items to match.</p>
+ * <p>The following things can be matched:</p>
+ * <table border="1" cellpadding="3">
+ * <tr><th>LHS</th><th>RHS</th><th>Implemented as</th></tr>
+ * <tr><td>{@link String}</td><td>{@link SimplePattern}</td><td>rhs.isMatch(lhs)</td></tr>
+ * <tr><td>{@link String}</td><td>{@link LDAPApproximation}</td><td>rhs.isMatch(lhs)</td></tr>
+ * <tr><td><any></td><td>{@link Class}</td><td>rhs.isInstance(lhs)</td></tr>
+ * <tr><td>{@link Class}</td><td>{@link Class}</td><td>rhs.isAssignableFrom(lhs)</td></tr>
+ * </table>
+ */
+public class Matches extends Binary {
+	protected Matches(Expression lhs, Expression rhs) {
+		super(lhs, rhs);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return Boolean.valueOf(match(lhs.evaluate(context), rhs.evaluate(context)));
+	}
+
+	protected boolean match(Object lval, Object rval) {
+		if (lval == null || rval == null)
+			return false;
+
+		if (rval instanceof IRequirement) {
+			IRequirement requirement = (IRequirement) rval;
+			if (lval instanceof IInstallableUnit)
+				return Boolean.valueOf(((IInstallableUnit) lval).satisfies(requirement));
+		} else if (rval instanceof VersionRange) {
+			VersionRange range = (VersionRange) rval;
+			if (lval instanceof Version)
+				return Boolean.valueOf(range.isIncluded((Version) lval));
+			if (lval instanceof String)
+				return range.isIncluded(Version.create((String) lval));
+		} else if (rval instanceof SimplePattern) {
+			if (lval instanceof CharSequence)
+				return ((SimplePattern) rval).isMatch((CharSequence) lval);
+			if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
+				return ((SimplePattern) rval).isMatch(lval.toString());
+		} else if (rval instanceof LDAPFilter) {
+			return ((LDAPFilter) rval).isMatch(MemberProvider.create(lval, true));
+		} else if (rval instanceof Filter) {
+			if (lval instanceof IInstallableUnit)
+				return Boolean.valueOf(((Filter) rval).match(new Hashtable<String, String>(((IInstallableUnit) lval).getProperties())));
+			if (lval instanceof Dictionary<?, ?>)
+				return Boolean.valueOf(((Filter) rval).match((Dictionary<?, ?>) lval));
+			if (lval instanceof Map<?, ?>)
+				return Boolean.valueOf(((Filter) rval).match(new Hashtable<Object, Object>((Map<?, ?>) lval)));
+		} else if (rval instanceof Locale) {
+			if (lval instanceof String)
+				return Boolean.valueOf(matchLocaleVariants((Locale) rval, (String) lval));
+		} else if (rval instanceof IMatchExpression<?>) {
+			@SuppressWarnings("unchecked")
+			IMatchExpression<Object> me = (IMatchExpression<Object>) rval;
+			return me.isMatch(lval);
+		} else if (rval instanceof IUpdateDescriptor) {
+			if (lval instanceof IInstallableUnit)
+				return Boolean.valueOf(((IUpdateDescriptor) rval).isUpdateOf((IInstallableUnit) lval));
+		} else if (rval instanceof LDAPApproximation) {
+			if (lval instanceof CharSequence)
+				return ((LDAPApproximation) rval).isMatch((CharSequence) lval);
+			if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
+				return ((LDAPApproximation) rval).isMatch(lval.toString());
+		} else if (rval instanceof Class<?>) {
+			Class<?> rclass = (Class<?>) rval;
+			return lval instanceof Class<?> ? rclass.isAssignableFrom((Class<?>) lval) : rclass.isInstance(lval);
+		}
+		throw new IllegalArgumentException("Cannot match a " + lval.getClass().getName() + " with a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
+	}
+
+	public int getExpressionType() {
+		return TYPE_MATCHES;
+	}
+
+	public String getOperator() {
+		return OPERATOR_MATCHES;
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		if (!(rhs instanceof Literal))
+			throw new UnsupportedOperationException();
+
+		boolean escapeWild = true;
+		Object val = rhs.evaluate(null);
+		buf.append('(');
+		appendLDAPAttribute(buf);
+		if (val instanceof LDAPApproximation) {
+			buf.append(getOperator());
+		} else if (val instanceof SimplePattern) {
+			buf.append('=');
+			escapeWild = false;
+		} else
+			throw new UnsupportedOperationException();
+		appendLDAPEscaped(buf, val.toString(), escapeWild);
+		buf.append(')');
+	}
+
+	private static boolean equals(String a, String b, int startPos, int endPos) {
+		if (endPos - startPos != b.length())
+			return false;
+
+		int bidx = 0;
+		while (startPos < endPos)
+			if (a.charAt(startPos++) != b.charAt(bidx++))
+				return false;
+		return true;
+	}
+
+	private static boolean matchLocaleVariants(Locale rval, String lval) {
+		int uscore = lval.indexOf('_');
+		if (uscore < 0)
+			// No country and no variant. Just match language
+			return lval.equals(rval.getLanguage());
+
+		if (!equals(lval, rval.getLanguage(), 0, uscore))
+			// Language part doesn't match. Give up.
+			return false;
+
+		// Check country and variant
+		int countryStart = uscore + 1;
+		uscore = lval.indexOf('_', countryStart);
+		return uscore < 0 ? equals(lval, rval.getCountry(), countryStart, lval.length()) //
+				: equals(lval, rval.getCountry(), countryStart, uscore) && equals(lval, rval.getVariant(), uscore + 1, lval.length());
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
new file mode 100644
index 0000000..d9a975c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.lang.reflect.*;
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * <p>An expression that performs member calls to obtain some value
+ * from some object instance. It uses standard bean semantics so
+ * that an attempt to obtain "value" will cause an
+ * attempt to call <code>getValue()</code> and if no such method
+ * exists, <code>isValue()</code> and if that doesn't work either,
+ * <code>value()</code>.</p>
+ */
+public abstract class Member extends Unary {
+
+	public static final class DynamicMember extends Member {
+		private static final String GET_PREFIX = "get"; //$NON-NLS-1$
+		private static final String IS_PREFIX = "is"; //$NON-NLS-1$
+		private static final Class<?>[] NO_ARG_TYPES = new Class[0];
+
+		private Class<?> lastClass;
+
+		private transient Method method;
+		private transient String methodName;
+
+		DynamicMember(Expression operand, String name) {
+			super(operand, name, Expression.emptyArray);
+		}
+
+		public Object evaluate(IEvaluationContext context) {
+			return invoke(operand.evaluate(context));
+		}
+
+		public final Object invoke(Object self) {
+			if (self instanceof IMemberProvider)
+				return ((IMemberProvider) self).getMember(name);
+
+			if (self == null)
+				throw new IllegalArgumentException("Cannot access member \'" + name + "\' in null"); //$NON-NLS-1$//$NON-NLS-2$
+
+			Class<?> c = self.getClass();
+			synchronized (this) {
+				if (methodName == null) {
+					String n = name;
+					if (!(n.startsWith(GET_PREFIX) || n.startsWith(IS_PREFIX)))
+						n = GET_PREFIX + Character.toUpperCase(n.charAt(0)) + n.substring(1);
+					methodName = n;
+				}
+				if (lastClass == null || !lastClass.isAssignableFrom(c)) {
+					Method m;
+					for (;;) {
+						try {
+							m = c.getMethod(methodName, NO_ARG_TYPES);
+							if (!Modifier.isPublic(m.getModifiers()))
+								throw new NoSuchMethodException();
+							break;
+						} catch (NoSuchMethodException e) {
+							if (methodName.startsWith(GET_PREFIX))
+								// Switch from using getXxx() to isXxx()
+								methodName = IS_PREFIX + Character.toUpperCase(name.charAt(0)) + name.substring(1);
+							else if (methodName.startsWith(IS_PREFIX))
+								// Switch from using isXxx() to xxx()
+								methodName = name;
+							else
+								throw new IllegalArgumentException("Cannot find a public member \'" + name + "\' in a " + self.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
+						}
+					}
+
+					// Since we already checked that it's public. This will speed
+					// up the calls a bit.
+					m.setAccessible(true);
+					lastClass = c;
+					method = m;
+				}
+
+				Exception checked;
+				try {
+					return method.invoke(self, NO_ARGS);
+				} catch (IllegalArgumentException e) {
+					throw e;
+				} catch (IllegalAccessException e) {
+					checked = e;
+				} catch (InvocationTargetException e) {
+					Throwable cause = e.getTargetException();
+					if (cause instanceof RuntimeException)
+						throw (RuntimeException) cause;
+					if (cause instanceof Error)
+						throw (Error) cause;
+					checked = (Exception) cause;
+				}
+				throw new RuntimeException("Problem invoking " + methodName + " on a " + self.getClass().getName(), checked); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+
+	public static class LengthMember extends Member {
+		private static final Integer ZERO = new Integer(0);
+
+		LengthMember(Expression operand) {
+			super(operand, "length", Expression.emptyArray); //$NON-NLS-1$
+		}
+
+		public Object evaluate(IEvaluationContext context) {
+			int len = getLength(operand.evaluate(context));
+			return len == 0 ? ZERO : new Integer(len);
+		}
+
+		int getLength(Object val) {
+			if (val == null)
+				return 0;
+
+			if (val.getClass().isArray())
+				return java.lang.reflect.Array.getLength(val);
+
+			if (val instanceof Collection<?>)
+				return ((Collection<?>) val).size();
+
+			if (val instanceof String)
+				return ((String) val).length();
+
+			if (val instanceof Map<?, ?>)
+				return ((Map<?, ?>) val).size();
+
+			return 0;
+		}
+	}
+
+	public static class EmptyMember extends LengthMember {
+		EmptyMember(Expression operand) {
+			super(operand);
+		}
+
+		public Object evaluate(IEvaluationContext context) {
+			Object val = operand.evaluate(context);
+			boolean empty = (val instanceof Iterator<?>) ? !((Iterator<?>) val).hasNext() : getLength(val) == 0;
+			return Boolean.valueOf(empty);
+		}
+	}
+
+	static final Object[] NO_ARGS = new Object[0];
+
+	static Member createDynamicMember(Expression operand, String name) {
+		return new DynamicMember(operand, name);
+	}
+
+	protected final Expression[] argExpressions;
+
+	final String name;
+
+	protected Member(Expression operand, String name, Expression[] args) {
+		super(operand);
+		this.name = name.intern();
+		this.argExpressions = args;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		if (super.accept(visitor))
+			for (int idx = 0; idx < argExpressions.length; ++idx)
+				if (!argExpressions[idx].accept(visitor))
+					return false;
+		return true;
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0) {
+			cmp = name.compareTo(((Member) e).name);
+			if (cmp == 0)
+				cmp = compare(argExpressions, ((Member) e).argExpressions);
+		}
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		if (super.equals(o)) {
+			Member mo = (Member) o;
+			return name.equals(mo.name) && equals(argExpressions, mo.argExpressions);
+		}
+		return false;
+	}
+
+	public int getExpressionType() {
+		return TYPE_MEMBER;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getOperator() {
+		return OPERATOR_MEMBER;
+	}
+
+	public int getPriority() {
+		return PRIORITY_MEMBER;
+	}
+
+	public int hashCode() {
+		int result = 31 + name.hashCode();
+		result = 31 * result + operand.hashCode();
+		return 31 * result + hashCode(argExpressions);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		if (operand != rootVariable) {
+			appendOperand(bld, rootVariable, operand, getPriority());
+			bld.append('.');
+		}
+		bld.append(name);
+		if (argExpressions.length > 0) {
+			bld.append('(');
+			elementsToString(bld, rootVariable, argExpressions);
+			bld.append(')');
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
new file mode 100644
index 0000000..c466d99
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
@@ -0,0 +1,135 @@
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
+import org.osgi.framework.ServiceReference;
+
+public abstract class MemberProvider implements IMemberProvider {
+
+	static class DictionaryMemberProvider extends MemberProvider {
+		private final Dictionary<String, ? extends Object> dictionary;
+
+		public DictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
+			this.dictionary = dictionary;
+		}
+
+		public Object getMember(String memberName) {
+			return dictionary.get(memberName);
+		}
+	}
+
+	static class CIDictionaryMemberProvider extends DictionaryMemberProvider {
+		public CIDictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
+			super(lowerCaseKeys(dictionary));
+		}
+
+		@Override
+		public Object getMember(String memberName) {
+			return super.getMember(memberName == null ? null : memberName.toLowerCase());
+		}
+
+		private static Dictionary<String, ? extends Object> lowerCaseKeys(Dictionary<String, ? extends Object> dictionary) {
+			boolean hasUpperCase = false;
+			for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
+				String key = keys.nextElement();
+				if (key.toLowerCase() != key) {
+					hasUpperCase = true;
+					break;
+				}
+			}
+			if (!hasUpperCase)
+				return dictionary;
+
+			Dictionary<String, Object> lcMap = new Hashtable<String, Object>(dictionary.size());
+			for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
+				String key = keys.nextElement();
+				if (lcMap.put(key.toLowerCase(), dictionary.get(key)) != null)
+					throw new IllegalArgumentException("case variants of the same key name: '" + key + '\''); //$NON-NLS-1$
+			}
+			return lcMap;
+		}
+	}
+
+	static class MapMemberProvider extends MemberProvider {
+		private final Map<String, ? extends Object> map;
+
+		public MapMemberProvider(Map<String, ? extends Object> map) {
+			this.map = map;
+		}
+
+		public Object getMember(String memberName) {
+			return map.get(memberName);
+		}
+	}
+
+	static class CIMapMemberProvider extends MapMemberProvider {
+		public CIMapMemberProvider(Map<String, ? extends Object> map) {
+			super(lowerCaseKeys(map));
+		}
+
+		@Override
+		public Object getMember(String memberName) {
+			return super.getMember(memberName == null ? null : memberName.toLowerCase());
+		}
+
+		private static Map<String, ? extends Object> lowerCaseKeys(Map<String, ? extends Object> map) {
+			boolean hasUpperCase = false;
+			Set<? extends Entry<String, ? extends Object>> entrySet = map.entrySet();
+			for (Entry<String, ?> entry : entrySet) {
+				String key = entry.getKey();
+				String lowKey = key.toLowerCase();
+				if (key != lowKey) {
+					hasUpperCase = true;
+					break;
+				}
+			}
+			if (!hasUpperCase)
+				return map;
+
+			Map<String, Object> lcMap = new HashMap<String, Object>(map.size());
+			for (Entry<String, ?> entry : entrySet) {
+				if (lcMap.put(entry.getKey().toLowerCase(), entry.getValue()) != null)
+					throw new IllegalArgumentException("case variants of the same key name: '" + entry.getKey() + '\''); //$NON-NLS-1$
+			}
+			return lcMap;
+		}
+	}
+
+	static class ServiceRefMemberProvider extends MemberProvider {
+		private final ServiceReference serviceRef;
+
+		public ServiceRefMemberProvider(ServiceReference serviceRef) {
+			this.serviceRef = serviceRef;
+		}
+
+		public Object getMember(String memberName) {
+			return serviceRef.getProperty(memberName);
+		}
+	}
+
+	private static final MemberProvider emptyProvider = create(CollectionUtils.emptyMap(), false);
+
+	/**
+	 * Create a new member provider on the given value. The value can be an instance of a {@link Map}, {@link Dictionary},
+	 * or {@link ServiceReference}.
+	 * @param value The value that provides the members
+	 * @param caseInsensitive <code>true</code> if the members should be retrievable in a case insensitive way.
+	 * @return A member provided that is backed by <code>value</code>. 
+	 */
+	@SuppressWarnings("unchecked")
+	public static MemberProvider create(Object value, boolean caseInsensitive) {
+		if (value instanceof Map<?, ?>)
+			return caseInsensitive ? new CIMapMemberProvider((Map<String, ?>) value) : new MapMemberProvider((Map<String, ?>) value);
+		if (value instanceof Dictionary<?, ?>)
+			return caseInsensitive ? new CIDictionaryMemberProvider((Dictionary<String, ?>) value) : new DictionaryMemberProvider((Dictionary<String, ?>) value);
+		if (value instanceof ServiceReference)
+			return new ServiceRefMemberProvider((ServiceReference) value);
+		throw new IllegalArgumentException();
+	}
+
+	public static MemberProvider emptyProvider() {
+		return emptyProvider;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
new file mode 100644
index 0000000..da8491e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+
+/**
+ * The abstract baseclass for all N-ary expressions
+ */
+public abstract class NAry extends Expression {
+	public final Expression[] operands;
+
+	protected NAry(Expression[] operands) {
+		this.operands = operands;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		if (super.accept(visitor))
+			for (int idx = 0; idx < operands.length; ++idx)
+				if (!operands[idx].accept(visitor))
+					return false;
+		return true;
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = compare(operands, ((NAry) e).operands);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && equals(operands, ((NAry) o).operands);
+	}
+
+	public abstract String getOperator();
+
+	public int hashCode() {
+		return hashCode(operands);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		appendOperand(bld, rootVariable, operands[0], getPriority());
+		for (int idx = 1; idx < operands.length; ++idx) {
+			bld.append(' ');
+			bld.append(getOperator());
+			bld.append(' ');
+			appendOperand(bld, rootVariable, operands[idx], getPriority());
+		}
+	}
+
+	int countAccessToEverything() {
+		int cnt = 0;
+		for (int idx = 0; idx < operands.length; ++idx)
+			cnt += operands[idx].countAccessToEverything();
+		return cnt;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
new file mode 100644
index 0000000..5246859
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that yields <code>true</code> when its operand does not.
+ */
+final class Not extends Unary {
+	Not(Expression operand) {
+		super(operand);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return Boolean.valueOf(operand.evaluate(context) != Boolean.TRUE);
+	}
+
+	public int getExpressionType() {
+		return TYPE_NOT;
+	}
+
+	public String getOperator() {
+		return OPERATOR_NOT;
+	}
+
+	public int getPriority() {
+		return PRIORITY_NOT;
+	}
+
+	public int hashCode() {
+		return 3 * operand.hashCode();
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		buf.append("(!"); //$NON-NLS-1$
+		operand.toLDAPString(buf);
+		buf.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
new file mode 100644
index 0000000..3280504
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * n-ary OR operator. The full evaluation is <code>false</code> if none of its operands
+ * evaluate to <code>true</code>.
+ */
+final class Or extends NAry {
+	public Or(Expression[] operands) {
+		super(assertLength(operands, 2, OPERATOR_OR));
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		for (int idx = 0; idx < operands.length; ++idx) {
+			if (operands[idx].evaluate(context) == Boolean.TRUE)
+				return Boolean.TRUE;
+		}
+		return Boolean.FALSE;
+	}
+
+	public int getExpressionType() {
+		return TYPE_OR;
+	}
+
+	public String getOperator() {
+		return OPERATOR_OR;
+	}
+
+	public int getPriority() {
+		return PRIORITY_OR;
+	}
+
+	public void toLDAPString(StringBuffer buf) {
+		buf.append("(|"); //$NON-NLS-1$
+		for (int idx = 0; idx < operands.length; ++idx)
+			operands[idx].toLDAPString(buf);
+		buf.append(')');
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
new file mode 100644
index 0000000..b4c5634
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * The abstract base class for the indexed and keyed parameters
+ */
+public class Parameter extends Expression {
+	final int position;
+
+	Parameter(int position) {
+		this.position = position;
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = position - ((Parameter) e).position;
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+		if (o == null)
+			return false;
+		return getClass() == o.getClass() && position == ((Parameter) o).position;
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return context.getParameter(position);
+	}
+
+	public int getExpressionType() {
+		return TYPE_PARAMETER;
+	}
+
+	public String getOperator() {
+		return OPERATOR_PARAMETER;
+	}
+
+	public int getPriority() {
+		return PRIORITY_VARIABLE;
+	}
+
+	public int hashCode() {
+		return 31 * (1 + position);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		bld.append('$');
+		bld.append(position);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
new file mode 100644
index 0000000..6da2c93
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+public class Pipe extends NAry {
+
+	private class NoIndexProvider implements IIndexProvider<Object> {
+		private final IIndexProvider<?> indexProvider;
+		private Everything<Object> everything;
+
+		NoIndexProvider(IIndexProvider<?> indexProvider) { //
+			this.indexProvider = indexProvider;
+		}
+
+		public IIndex<Object> getIndex(String memberName) {
+			return null;
+		}
+
+		public Iterator<Object> everything() {
+			return everything.getCopy();
+		}
+
+		public Object getManagedProperty(Object client, String memberName, Object key) {
+			if (indexProvider != null)
+				return indexProvider.getManagedProperty(client, memberName, key);
+			if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
+				IInstallableUnit iu = (IInstallableUnit) client;
+				return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
+			}
+			return null;
+		}
+
+		@SuppressWarnings("unchecked")
+		void setEverything(Everything<?> everything) {
+			this.everything = (Everything<Object>) everything;
+		}
+	}
+
+	public static Expression createPipe(Expression[] operands) {
+		// We expect two types of expressions. The ones that act on THIS
+		// i.e. boolean match expressions or the ones that act EVERYTHING
+		// by iterating a collection.
+		//
+		// Our task here is to convert all booleans into collections so
+		// that:
+		//  <boolean expression> becomes select(x | <boolean expression)
+		//
+		// If we find consecutive boolean expressions, we can actually
+		// make one more optimization:
+		//  <expr1>, <expr2> becomes select(x | <expr1> && <expr2>)
+
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		ArrayList<Expression> pipeables = new ArrayList<Expression>();
+		ArrayList<Expression> booleans = new ArrayList<Expression>();
+		VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
+		for (int idx = 0; idx < operands.length; ++idx) {
+			Expression operand = operands[idx];
+			finder.reset();
+			operand.accept(finder);
+			if (finder.isFound()) {
+				if (!booleans.isEmpty()) {
+					// Concatenate all found booleans.
+					pipeables.add(makePipeableOfBooleans(factory, booleans));
+					booleans.clear();
+				}
+				pipeables.add(operand);
+			} else
+				booleans.add(operand);
+		}
+
+		if (!booleans.isEmpty()) {
+			if (pipeables.isEmpty())
+				return normalizeBoolean(factory, booleans);
+			pipeables.add(makePipeableOfBooleans(factory, booleans));
+		}
+		int top = pipeables.size();
+		if (top > 1)
+			return new Pipe(pipeables.toArray(new Expression[top]));
+		return (top == 1) ? pipeables.get(0) : Literal.TRUE_CONSTANT;
+	}
+
+	private static Expression normalizeBoolean(IExpressionFactory factory, ArrayList<Expression> booleans) {
+		int top = booleans.size();
+		Expression boolExpr;
+		if (top > 1)
+			boolExpr = (Expression) factory.and(booleans.toArray(new IExpression[top]));
+		else if (top == 1)
+			boolExpr = booleans.get(0);
+		else
+			boolExpr = Literal.TRUE_CONSTANT;
+		return boolExpr;
+	}
+
+	private static Expression makePipeableOfBooleans(IExpressionFactory factory, ArrayList<Expression> booleans) {
+		Expression boolExpr = normalizeBoolean(factory, booleans);
+		Object[] params = null;
+		if (boolExpr instanceof MatchExpression<?>) {
+			MatchExpression<?> matchExpr = (MatchExpression<?>) boolExpr;
+			boolExpr = (Expression) matchExpr.getPredicate();
+			params = matchExpr.getParameters();
+			if (params.length == 0)
+				params = null;
+		}
+		Expression expr = (Expression) factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, boolExpr));
+		if (params != null)
+			expr = new ContextExpression<Object>(expr, params);
+		return expr;
+	}
+
+	private Pipe(Expression[] operands) {
+		super(operands);
+	}
+
+	public int getExpressionType() {
+		return TYPE_PIPE;
+	}
+
+	@Override
+	public String getOperator() {
+		return "pipe"; //$NON-NLS-1$
+	}
+
+	@Override
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	@Override
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Iterator<?> iterator = operands[0].evaluateAsIterator(context);
+		if (operands.length == 0 || !iterator.hasNext())
+			return iterator;
+
+		Class<Object> elementClass = Object.class;
+		Variable everything = ExpressionFactory.EVERYTHING;
+		IEvaluationContext nextContext = EvaluationContext.create(context, everything);
+		NoIndexProvider noIndexProvider = new NoIndexProvider(context.getIndexProvider());
+		everything.setValue(nextContext, noIndexProvider);
+		nextContext.setIndexProvider(noIndexProvider);
+		for (int idx = 1; idx < operands.length; ++idx) {
+			Expression expr = operands[idx];
+			noIndexProvider.setEverything(new Everything<Object>(elementClass, iterator, expr));
+			iterator = expr.evaluateAsIterator(nextContext);
+			if (!iterator.hasNext())
+				break;
+		}
+		return iterator;
+	}
+
+	@Override
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
new file mode 100644
index 0000000..2c2619a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.lang.reflect.Array;
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+/**
+ * A result optimized for dealing with iterators returned from
+ * expression evaluation.
+ */
+public class QueryResult<T> implements IQueryResult<T> {
+
+	private final IRepeatableIterator<T> iterator;
+	private boolean firstUse = true;
+
+	/**
+	 * Create an QueryResult based on the given iterator. The <code>oneShot</code> parameter
+	 * can be set to <code>true</code> if the returned instance is expected to be perused
+	 * only once. This will allow some optimizations since the result of the iteration doesn't
+	 * need to be copied in preparation for a second iteration.
+	 *
+	 * @param iterator The iterator to use as the result iterator.
+	 */
+	public QueryResult(Iterator<T> iterator) {
+		this.iterator = (iterator instanceof IRepeatableIterator<?>) ? (IRepeatableIterator<T>) iterator : RepeatableIterator.create(iterator);
+	}
+
+	public QueryResult(Collection<T> collection) {
+		this.iterator = RepeatableIterator.create(collection);
+	}
+
+	public boolean isEmpty() {
+		return !iterator.hasNext();
+	}
+
+	public Iterator<T> iterator() {
+		if (firstUse) {
+			firstUse = false;
+			return iterator;
+		}
+		return iterator.getCopy();
+	}
+
+	@SuppressWarnings("unchecked")
+	public T[] toArray(Class<T> clazz) {
+		Object provider = iterator.getIteratorProvider();
+		if (provider.getClass().isArray())
+			return (T[]) provider;
+
+		Collection<T> c = toUnmodifiableSet();
+		return c.toArray((T[]) Array.newInstance(clazz, c.size()));
+	}
+
+	@SuppressWarnings("unchecked")
+	public Set<T> toSet() {
+		Object provider = iterator.getIteratorProvider();
+		if (provider instanceof Collection<?>)
+			return new HashSet<T>((Collection<T>) provider);
+		if (provider instanceof IIndexProvider<?>)
+			return iteratorToSet(((IIndexProvider<T>) provider).everything());
+		if (provider.getClass().isArray()) {
+			T[] elems = (T[]) provider;
+			int idx = elems.length;
+			HashSet<T> copy = new HashSet<T>(idx);
+			while (--idx >= 0)
+				copy.add(elems[idx]);
+			return copy;
+		}
+		if (provider instanceof Map<?, ?>)
+			return new HashSet<T>((Set<T>) ((Map<?, ?>) provider).entrySet());
+		return iteratorToSet(iterator());
+	}
+
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		return query.perform(iterator());
+	}
+
+	@SuppressWarnings("unchecked")
+	public Set<T> toUnmodifiableSet() {
+		Object provider = iterator.getIteratorProvider();
+		if (provider instanceof Set<?>)
+			return Collections.unmodifiableSet((Set<T>) provider);
+		if (provider instanceof Map<?, ?>)
+			return Collections.unmodifiableSet((Set<T>) ((Map<?, ?>) provider).entrySet());
+		return toSet();
+	}
+
+	private Set<T> iteratorToSet(Iterator<T> iter) {
+		HashSet<T> set = new HashSet<T>();
+		while (iter.hasNext())
+			set.add(iter.next());
+		return set;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
new file mode 100644
index 0000000..068dc13
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+
+import org.eclipse.equinox.p2.metadata.VersionRange;
+
+/**
+ * A function that creates a {@link VersionRange} from a String
+ */
+public final class RangeFunction extends Function {
+
+	public RangeFunction(Expression[] operands) {
+		super(assertLength(operands, 1, 1, KEYWORD_RANGE));
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return v instanceof String;
+	}
+
+	Object createInstance(Object arg) {
+		return new VersionRange((String) arg);
+	}
+
+	public String getOperator() {
+		return KEYWORD_RANGE;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
new file mode 100644
index 0000000..5f94dab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+public class RepeatableIterator<T> implements IRepeatableIterator<T> {
+	private final Collection<T> values;
+	private final Iterator<T> iterator;
+
+	@SuppressWarnings("unchecked")
+	public static <T> IRepeatableIterator<T> create(Object unknown) {
+		if (unknown.getClass().isArray())
+			return create((T[]) unknown);
+		if (unknown instanceof Iterator<?>)
+			return create((Iterator<T>) unknown);
+		if (unknown instanceof List<?>)
+			return create((List<T>) unknown);
+		if (unknown instanceof Collection<?>)
+			return create((Collection<T>) unknown);
+		if (unknown instanceof Map<?, ?>)
+			return create((Set<T>) ((Map<?, ?>) unknown).entrySet());
+		if (unknown instanceof IQueryResult<?>)
+			return create((IQueryResult<T>) unknown);
+		if (unknown instanceof IIndexProvider<?>)
+			return create((IIndexProvider<T>) unknown);
+		throw new IllegalArgumentException("Cannot convert a " + unknown.getClass().getName() + " into an iterator"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public static <T> IRepeatableIterator<T> create(Iterator<T> iterator) {
+		return iterator instanceof IRepeatableIterator<?> ? ((IRepeatableIterator<T>) iterator).getCopy() : new RepeatableIterator<T>(iterator);
+	}
+
+	public static <T> IRepeatableIterator<T> create(Collection<T> values) {
+		return new RepeatableIterator<T>(values);
+	}
+
+	public static <T> IRepeatableIterator<T> create(IQueryResult<T> values) {
+		return new QueryResultIterator<T>(values);
+	}
+
+	public static <T> IRepeatableIterator<T> create(T[] values) {
+		return new ArrayIterator<T>(values);
+	}
+
+	public static <T> IRepeatableIterator<T> create(IIndexProvider<T> values) {
+		return new IndexProviderIterator<T>(values);
+	}
+
+	RepeatableIterator(Iterator<T> iterator) {
+		HashSet<T> v = new HashSet<T>();
+		while (iterator.hasNext())
+			v.add(iterator.next());
+		values = v;
+		this.iterator = v.iterator();
+	}
+
+	RepeatableIterator(Collection<T> values) {
+		this.values = values;
+		this.iterator = values.iterator();
+	}
+
+	public IRepeatableIterator<T> getCopy() {
+		return new RepeatableIterator<T>(values);
+	}
+
+	public boolean hasNext() {
+		return iterator.hasNext();
+	}
+
+	public T next() {
+		return iterator.next();
+	}
+
+	public void remove() {
+		throw new UnsupportedOperationException();
+	}
+
+	public Object getIteratorProvider() {
+		return values;
+	}
+
+	static class ArrayIterator<T> implements IRepeatableIterator<T> {
+		private final T[] array;
+		private int position = -1;
+
+		public ArrayIterator(T[] array) {
+			this.array = array;
+		}
+
+		public Object getIteratorProvider() {
+			return array;
+		}
+
+		public boolean hasNext() {
+			return position + 1 < array.length;
+		}
+
+		public T next() {
+			if (++position >= array.length)
+				throw new NoSuchElementException();
+			return array[position];
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+
+		public IRepeatableIterator<T> getCopy() {
+			return new ArrayIterator<T>(array);
+		}
+	}
+
+	static class IndexProviderIterator<T> implements IRepeatableIterator<T> {
+		private final IIndexProvider<T> indexProvider;
+		private final Iterator<T> iterator;
+
+		IndexProviderIterator(IIndexProvider<T> indexProvider) {
+			this.iterator = indexProvider.everything();
+			this.indexProvider = indexProvider;
+		}
+
+		public IRepeatableIterator<T> getCopy() {
+			return new IndexProviderIterator<T>(indexProvider);
+		}
+
+		public Object getIteratorProvider() {
+			return indexProvider;
+		}
+
+		public boolean hasNext() {
+			return iterator.hasNext();
+		}
+
+		public T next() {
+			return iterator.next();
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+	}
+
+	static class QueryResultIterator<T> implements IRepeatableIterator<T> {
+		private final IQueryResult<T> queryResult;
+
+		private final Iterator<T> iterator;
+
+		QueryResultIterator(IQueryResult<T> queryResult) {
+			this.queryResult = queryResult;
+			this.iterator = queryResult.iterator();
+		}
+
+		public IRepeatableIterator<T> getCopy() {
+			return new QueryResultIterator<T>(queryResult);
+		}
+
+		public Object getIteratorProvider() {
+			return queryResult;
+		}
+
+		public boolean hasNext() {
+			return iterator.hasNext();
+		}
+
+		public T next() {
+			return iterator.next();
+		}
+
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
new file mode 100644
index 0000000..771dfeb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that yields a new collection consisting of all elements of the
+ * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
+ */
+final class Select extends CollectionFilter {
+	Select(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		return evaluateAsIterator(context, itor);
+	}
+
+	protected Iterator<?> evaluateAsIterator(final IEvaluationContext context, Iterator<?> itor) {
+		return new MatchIteratorFilter<Object>(itor) {
+			protected boolean isMatch(Object val) {
+				lambda.getItemVariable().setValue(context, val);
+				return lambda.evaluate(context) == Boolean.TRUE;
+			}
+		};
+	}
+
+	public int getExpressionType() {
+		return TYPE_SELECT;
+	}
+
+	public String getOperator() {
+		return KEYWORD_SELECT;
+	}
+
+	boolean isCollection() {
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
new file mode 100644
index 0000000..fc4bf5a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.HashSet;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+public final class SetFunction extends Function {
+
+	public SetFunction(Expression[] operands) {
+		super(operands);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		HashSet<Object> result = new HashSet<Object>();
+		for (int idx = 0; idx < operands.length; ++idx)
+			result.add(operands[idx].evaluate(context));
+		return result;
+	}
+
+	public String getOperator() {
+		return KEYWORD_SET;
+	}
+
+	boolean isCollection() {
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
new file mode 100644
index 0000000..a35e3c7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that will collect items recursively based on a <code>rule</code>.
+ * The <code>rule</code> is applied for each item in the <code>collection</code> and
+ * is supposed to create a new collection. The <code>rule</code> is then applied for each item
+ * in the new collection. All items are collected into a set and items that are already
+ * in that set will not be perused again. The set becomes the result of the traversal.
+ */
+final class Traverse extends CollectionFilter {
+
+	Traverse(Expression collection, LambdaExpression lambda) {
+		super(collection, lambda);
+	}
+
+	public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
+		return evaluateAsIterator(context, itor);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
+		HashSet<Object> collector = new HashSet<Object>();
+		while (iterator.hasNext())
+			traverse(collector, iterator.next(), context);
+		return collector.iterator();
+	}
+
+	public int getExpressionType() {
+		return TYPE_TRAVERSE;
+	}
+
+	public String getOperator() {
+		return KEYWORD_TRAVERSE;
+	}
+
+	void traverse(Set<Object> collector, Object parent, IEvaluationContext context) {
+		if (collector.add(parent)) {
+			Variable variable = lambda.getItemVariable();
+			context = EvaluationContext.create(context, variable);
+			variable.setValue(context, parent);
+			Iterator<?> subIterator = lambda.evaluateAsIterator(context);
+			while (subIterator.hasNext())
+				traverse(collector, subIterator.next(), context);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
new file mode 100644
index 0000000..7299a09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
+
+/**
+ * The abstract base class for all unary expressions
+ */
+public abstract class Unary extends Expression {
+	public final Expression operand;
+
+	protected Unary(Expression operand) {
+		this.operand = operand;
+	}
+
+	public boolean accept(IExpressionVisitor visitor) {
+		return super.accept(visitor) && operand.accept(visitor);
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = operand.compareTo(((Unary) e).operand);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && operand.equals(((Unary) o).operand);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return operand.evaluate(context);
+	}
+
+	public int hashCode() {
+		return operand.hashCode() * 3 + operand.getExpressionType();
+	}
+
+	public Expression getOperand() {
+		return operand;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		bld.append(getOperator());
+		appendOperand(bld, rootVariable, operand, getPriority());
+	}
+
+	int countAccessToEverything() {
+		return operand.countAccessToEverything();
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
new file mode 100644
index 0000000..dbf141b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+abstract class UnaryCollectionFilter extends Unary {
+
+	UnaryCollectionFilter(Expression collection) {
+		super(collection);
+	}
+
+	public int hashCode() {
+		return 5 * operand.hashCode();
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		if (operand instanceof Select) {
+			Select select = (Select) operand;
+			CollectionFilter.appendProlog(bld, rootVariable, select.operand, getOperator());
+			appendOperand(bld, rootVariable, select.lambda, getPriority());
+		} else
+			CollectionFilter.appendProlog(bld, rootVariable, operand, getOperator());
+		bld.append(')');
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
new file mode 100644
index 0000000..8c731fd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import java.util.Set;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ */
+final class Union extends Binary {
+	Union(Expression operand, Expression param) {
+		super(operand, param);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		@SuppressWarnings("unchecked")
+		Set<Object> resultSet = (Set<Object>) asSet(lhs.evaluate(context), true);
+		Iterator<?> itor = rhs.evaluateAsIterator(context);
+		while (itor.hasNext())
+			resultSet.add(itor.next());
+		return RepeatableIterator.create(resultSet);
+	}
+
+	public int getExpressionType() {
+		return TYPE_UNION;
+	}
+
+	public String getOperator() {
+		return KEYWORD_UNION;
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
new file mode 100644
index 0000000..58d1e5b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression that ensures that the elements of its collection is only returned
+ * once throughout the whole query.
+ */
+final class Unique extends Binary {
+	/**
+	 * A UniqueIterator that uses a set as a discriminator, ensuring that
+	 * no element is returned twice.
+	 */
+	static class UniqueIterator<T> extends MatchIteratorFilter<T> {
+		final Set<T> uniqueSet;
+
+		public UniqueIterator(Iterator<? extends T> iterator, Set<T> uniqueSet) {
+			super(iterator);
+			this.uniqueSet = uniqueSet;
+		}
+
+		protected boolean isMatch(T val) {
+			synchronized (uniqueSet) {
+				return uniqueSet.add(val);
+			}
+		}
+	}
+
+	Unique(Expression collection, Expression explicitCache) {
+		super(collection, explicitCache);
+	}
+
+	public Object evaluate(IEvaluationContext context) {
+		return evaluateAsIterator(context);
+	}
+
+	@SuppressWarnings("unchecked")
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object explicitCache = rhs.evaluate(context);
+		Set<Object> uniqueSet;
+		if (explicitCache == null)
+			// No cache, we just ensure that the iteration is unique
+			uniqueSet = new HashSet<Object>();
+		else {
+			if (!(explicitCache instanceof Set<?>))
+				throw new IllegalArgumentException("Unique cache must be a java.util.Set"); //$NON-NLS-1$
+			uniqueSet = (Set<Object>) explicitCache;
+		}
+		return new UniqueIterator<Object>(lhs.evaluateAsIterator(context), uniqueSet);
+	}
+
+	public int getExpressionType() {
+		return TYPE_UNIQUE;
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
+		if (rhs != Literal.NULL_CONSTANT)
+			appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
+		bld.append(')');
+	}
+
+	public String getOperator() {
+		return KEYWORD_UNIQUE;
+	}
+
+	public int getPriority() {
+		return PRIORITY_COLLECTION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
new file mode 100644
index 0000000..dc26267
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+
+/**
+ * An expression representing a variable stack in the current thread.
+ */
+public class Variable extends Expression {
+
+	private final String name;
+
+	public Variable(String name) {
+		this.name = name;
+	}
+
+	public int compareTo(Expression e) {
+		int cmp = super.compareTo(e);
+		if (cmp == 0)
+			cmp = name.compareTo(((Variable) e).name);
+		return cmp;
+	}
+
+	public boolean equals(Object o) {
+		return super.equals(o) && name.equals(((Variable) o).name);
+	}
+
+	public final Object evaluate(IEvaluationContext context) {
+		return context.getValue(this);
+	}
+
+	public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
+		Object value = context.getValue(this);
+		if (value instanceof IRepeatableIterator<?>)
+			return ((IRepeatableIterator<?>) value).getCopy();
+
+		Iterator<?> itor = RepeatableIterator.create(value);
+		setValue(context, itor);
+		return itor;
+	}
+
+	public int getExpressionType() {
+		return TYPE_VARIABLE;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getOperator() {
+		return "<variable>"; //$NON-NLS-1$
+	}
+
+	public int getPriority() {
+		return PRIORITY_VARIABLE;
+	}
+
+	public int hashCode() {
+		return name.hashCode();
+	}
+
+	public final void setValue(IEvaluationContext context, Object value) {
+		context.setValue(this, value);
+	}
+
+	public void toString(StringBuffer bld, Variable rootVariable) {
+		bld.append(name);
+	}
+
+	int countAccessToEverything() {
+		return this == ExpressionFactory.EVERYTHING ? 1 : 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
new file mode 100644
index 0000000..afd9099
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * A function that creates a {@link Version} from a string
+ */
+public final class VersionFunction extends Function {
+
+	public VersionFunction(Expression[] operands) {
+		super(assertLength(operands, 1, 1, KEYWORD_VERSION));
+	}
+
+	boolean assertSingleArgumentClass(Object v) {
+		return v instanceof String;
+	}
+
+	Object createInstance(Object arg) {
+		return Version.create((String) arg);
+	}
+
+	public String getOperator() {
+		return KEYWORD_VERSION;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
new file mode 100644
index 0000000..827de35
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.query.IMatchQuery;
+import org.eclipse.equinox.p2.query.IQuery;
+
+public final class WrappedIQuery extends Function {
+
+	/**
+	 * <p>The WrappedIQuery constructor takes an array with one or two arguments.
+	 * The first argument must evaluate to an instance of {@link IQuery}. The second
+	 * argument is optional. The following applies:</p><ul>
+	 * <li>If first argument evaluates to an instance of {@link IMatchQuery}, then
+	 * a provided second argument assumed to be the candidate to match. The
+	 * variable <code>this</code> will be used if no second argument is not provided.</li>
+	 * <li>For all other types of queries the second argument must evaluate
+	 * to an iterator. If it is not provided, it defaults to the variable
+	 * <code>everything</code>.
+	 * </ul>
+	 * @param operands
+	 */
+	public WrappedIQuery(Expression[] operands) {
+		super(assertLength(operands, 1, 2, KEYWORD_IQUERY));
+	}
+
+	@SuppressWarnings("unchecked")
+	public Object evaluate(IEvaluationContext context) {
+		Object query = operands[0].evaluate(context);
+
+		if (query instanceof IMatchQuery<?>) {
+			Object value = null;
+			if (operands.length > 1)
+				value = operands[1].evaluate(context);
+			else
+				value = ExpressionFactory.THIS.evaluate(context);
+			return Boolean.valueOf(((IMatchQuery<Object>) query).isMatch(value));
+		}
+
+		if (!(query instanceof IQuery<?>))
+			throw new IllegalArgumentException("iquery first argument must be an IQuery instance"); //$NON-NLS-1$
+
+		Iterator<?> iterator = null;
+		if (operands.length > 1)
+			iterator = operands[1].evaluateAsIterator(context);
+		else
+			iterator = ExpressionFactory.EVERYTHING.evaluateAsIterator(context);
+
+		return ((IQuery<Object>) query).perform((Iterator<Object>) iterator);
+	}
+
+	public String getOperator() {
+		return KEYWORD_IQUERY;
+	}
+
+	@Override
+	public boolean isReferenceTo(Variable variable) {
+		Object firstOp = operands[0];
+		if (firstOp instanceof Literal) {
+			Object query = ((Literal) firstOp).value;
+			return (query instanceof IMatchQuery<?>) ? variable == ExpressionFactory.THIS : variable == ExpressionFactory.EVERYTHING;
+		}
+		return false;
+	}
+
+	int countAccessToEverything() {
+		return isReferenceTo(ExpressionFactory.EVERYTHING) ? 1 : 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
new file mode 100644
index 0000000..f86a657
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
@@ -0,0 +1,631 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression.parser;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
+import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+public class ExpressionParser extends Stack<IExpression> implements IExpressionConstants, IExpressionParser {
+	private static final long serialVersionUID = 5481439062356612378L;
+
+	protected static final int TOKEN_OR = 1;
+	protected static final int TOKEN_AND = 2;
+
+	protected static final int TOKEN_EQUAL = 10;
+	protected static final int TOKEN_NOT_EQUAL = 11;
+	protected static final int TOKEN_LESS = 12;
+	protected static final int TOKEN_LESS_EQUAL = 13;
+	protected static final int TOKEN_GREATER = 14;
+	protected static final int TOKEN_GREATER_EQUAL = 15;
+	protected static final int TOKEN_MATCHES = 16;
+
+	protected static final int TOKEN_NOT = 20;
+	protected static final int TOKEN_DOT = 21;
+	protected static final int TOKEN_COMMA = 22;
+	protected static final int TOKEN_PIPE = 23;
+	protected static final int TOKEN_DOLLAR = 24;
+	protected static final int TOKEN_IF = 25;
+	protected static final int TOKEN_ELSE = 26;
+
+	protected static final int TOKEN_LP = 30;
+	protected static final int TOKEN_RP = 31;
+	protected static final int TOKEN_LB = 32;
+	protected static final int TOKEN_RB = 33;
+	protected static final int TOKEN_LC = 34;
+	protected static final int TOKEN_RC = 35;
+
+	protected static final int TOKEN_IDENTIFIER = 40;
+	protected static final int TOKEN_LITERAL = 41;
+
+	protected static final int TOKEN_NULL = 50;
+	protected static final int TOKEN_TRUE = 51;
+	protected static final int TOKEN_FALSE = 52;
+
+	private static final int TOKEN_ALL = 60;
+	private static final int TOKEN_EXISTS = 61;
+
+	protected static final int TOKEN_END = 0;
+	protected static final int TOKEN_ERROR = -1;
+
+	protected static final Map<String, Integer> keywords;
+	static {
+		keywords = new HashMap<String, Integer>();
+		keywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
+		keywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
+		keywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
+		keywords.put(KEYWORD_ALL, new Integer(TOKEN_ALL));
+		keywords.put(KEYWORD_EXISTS, new Integer(TOKEN_EXISTS));
+	}
+
+	protected final IExpressionFactory factory;
+
+	protected String expression;
+	protected int tokenPos;
+	protected int currentToken;
+	protected int lastTokenPos;
+	protected Object tokenValue;
+	protected String rootVariable;
+
+	public ExpressionParser(IExpressionFactory factory) {
+		this.factory = factory;
+	}
+
+	public synchronized IExpression parse(String exprString) {
+		expression = exprString;
+		tokenPos = 0;
+		currentToken = 0;
+		tokenValue = null;
+		IExpression thisVariable = factory.thisVariable();
+		rootVariable = ExpressionUtil.getName(thisVariable);
+		push(thisVariable);
+		try {
+			nextToken();
+			IExpression expr = currentToken == TOKEN_END ? factory.constant(Boolean.TRUE) : parseCondition();
+			assertToken(TOKEN_END);
+			return expr;
+		} finally {
+			clear(); // pop all items
+		}
+	}
+
+	public synchronized IExpression parseQuery(String exprString) {
+		expression = exprString;
+		tokenPos = 0;
+		currentToken = 0;
+		tokenValue = null;
+		rootVariable = VARIABLE_EVERYTHING;
+		IExpression everythingVariable = factory.variable(VARIABLE_EVERYTHING);
+		push(everythingVariable);
+		try {
+			nextToken();
+			IExpression expr = parseCondition();
+			assertToken(TOKEN_END);
+			return expr;
+		} finally {
+			clear(); // pop all items
+		}
+	}
+
+	protected Map<String, Integer> keywordToTokenMap() {
+		return keywords;
+	}
+
+	protected IExpression parseCondition() {
+		// Just a hook in this parser. Conditions are not supported
+		return parseOr();
+	}
+
+	protected IExpression parseOr() {
+		IExpression expr = parseAnd();
+		if (currentToken != TOKEN_OR)
+			return expr;
+
+		ArrayList<IExpression> exprs = new ArrayList<IExpression>();
+		exprs.add(expr);
+		do {
+			nextToken();
+			exprs.add(parseAnd());
+		} while (currentToken == TOKEN_OR);
+		return factory.or(exprs.toArray(new IExpression[exprs.size()]));
+	}
+
+	protected IExpression parseAnd() {
+		IExpression expr = parseBinary();
+		if (currentToken != TOKEN_AND)
+			return expr;
+
+		ArrayList<IExpression> exprs = new ArrayList<IExpression>();
+		exprs.add(expr);
+		do {
+			nextToken();
+			exprs.add(parseBinary());
+		} while (currentToken == TOKEN_AND);
+		return factory.and(exprs.toArray(new IExpression[exprs.size()]));
+	}
+
+	protected IExpression parseBinary() {
+		IExpression expr = parseNot();
+		for (;;) {
+			switch (currentToken) {
+				case TOKEN_OR :
+				case TOKEN_AND :
+				case TOKEN_RP :
+				case TOKEN_RB :
+				case TOKEN_RC :
+				case TOKEN_COMMA :
+				case TOKEN_IF :
+				case TOKEN_ELSE :
+				case TOKEN_END :
+					break;
+				case TOKEN_EQUAL :
+				case TOKEN_NOT_EQUAL :
+				case TOKEN_GREATER :
+				case TOKEN_GREATER_EQUAL :
+				case TOKEN_LESS :
+				case TOKEN_LESS_EQUAL :
+				case TOKEN_MATCHES :
+					int realToken = currentToken;
+					nextToken();
+					IExpression rhs;
+					if (realToken == TOKEN_MATCHES && currentToken == TOKEN_LITERAL && tokenValue instanceof String)
+						rhs = factory.constant(new LDAPApproximation((String) tokenValue));
+					else
+						rhs = parseNot();
+					switch (realToken) {
+						case TOKEN_EQUAL :
+							expr = factory.equals(expr, rhs);
+							break;
+						case TOKEN_NOT_EQUAL :
+							expr = factory.not(factory.equals(expr, rhs));
+							break;
+						case TOKEN_GREATER :
+							expr = factory.greater(expr, rhs);
+							break;
+						case TOKEN_GREATER_EQUAL :
+							expr = factory.greaterEqual(expr, rhs);
+							break;
+						case TOKEN_LESS :
+							expr = factory.less(expr, rhs);
+							break;
+						case TOKEN_LESS_EQUAL :
+							expr = factory.lessEqual(expr, rhs);
+							break;
+						default :
+							expr = factory.matches(expr, rhs);
+					}
+					continue;
+				default :
+					throw syntaxError();
+			}
+			break;
+		}
+		return expr;
+	}
+
+	protected IExpression parseNot() {
+		if (currentToken == TOKEN_NOT) {
+			nextToken();
+			IExpression expr = parseNot();
+			return factory.not(expr);
+		}
+		return parseCollectionExpression();
+	}
+
+	protected IExpression parseCollectionExpression() {
+		IExpression expr = parseCollectionLHS();
+		if (expr == null) {
+			expr = parseMember();
+			if (currentToken != TOKEN_DOT)
+				return expr;
+			nextToken();
+		}
+		for (;;) {
+			int funcToken = currentToken;
+			nextToken();
+			assertToken(TOKEN_LP);
+			nextToken();
+			expr = parseCollectionRHS(expr, funcToken);
+			if (currentToken != TOKEN_DOT)
+				break;
+			nextToken();
+		}
+		return expr;
+	}
+
+	protected IExpression parseCollectionLHS() {
+		IExpression expr = null;
+		switch (currentToken) {
+			case TOKEN_EXISTS :
+			case TOKEN_ALL :
+				expr = getVariableOrRootMember(rootVariable);
+				break;
+		}
+		return expr;
+	}
+
+	protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
+		switch (funcToken) {
+			case TOKEN_EXISTS :
+				expr = factory.exists(expr, parseLambdaDefinition());
+				break;
+			case TOKEN_ALL :
+				expr = factory.all(expr, parseLambdaDefinition());
+				break;
+			default :
+				throw syntaxError();
+		}
+		return expr;
+	}
+
+	protected IExpression parseLambdaDefinition() {
+		assertToken(TOKEN_IDENTIFIER);
+		IExpression each = factory.variable((String) tokenValue);
+		push(each);
+		try {
+			nextToken();
+			assertToken(TOKEN_PIPE);
+			nextToken();
+			IExpression body = parseCondition();
+			assertToken(TOKEN_RP);
+			nextToken();
+			return factory.lambda(each, body);
+		} finally {
+			pop();
+		}
+	}
+
+	protected IExpression parseMember() {
+		IExpression expr = parseUnary();
+		String name;
+		while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
+			int savePos = tokenPos;
+			int saveToken = currentToken;
+			Object saveTokenValue = tokenValue;
+			nextToken();
+			if (saveToken == TOKEN_DOT) {
+				switch (currentToken) {
+					case TOKEN_IDENTIFIER :
+						name = (String) tokenValue;
+						nextToken();
+						expr = factory.member(expr, name);
+						break;
+
+					default :
+						tokenPos = savePos;
+						currentToken = saveToken;
+						tokenValue = saveTokenValue;
+						return expr;
+				}
+			} else {
+				IExpression atExpr = parseMember();
+				assertToken(TOKEN_RB);
+				nextToken();
+				expr = factory.at(expr, atExpr);
+			}
+		}
+		return expr;
+	}
+
+	protected IExpression parseUnary() {
+		IExpression expr;
+		switch (currentToken) {
+			case TOKEN_LP :
+				nextToken();
+				expr = parseCondition();
+				assertToken(TOKEN_RP);
+				nextToken();
+				break;
+			case TOKEN_LITERAL :
+				expr = factory.constant(tokenValue);
+				nextToken();
+				break;
+			case TOKEN_IDENTIFIER :
+				expr = getVariableOrRootMember((String) tokenValue);
+				nextToken();
+				break;
+			case TOKEN_NULL :
+				expr = factory.constant(null);
+				nextToken();
+				break;
+			case TOKEN_TRUE :
+				expr = factory.constant(Boolean.TRUE);
+				nextToken();
+				break;
+			case TOKEN_FALSE :
+				expr = factory.constant(Boolean.FALSE);
+				nextToken();
+				break;
+			case TOKEN_DOLLAR :
+				expr = parseParameter();
+				break;
+			default :
+				throw syntaxError();
+		}
+		return expr;
+	}
+
+	private IExpression parseParameter() {
+		if (currentToken == TOKEN_DOLLAR) {
+			nextToken();
+			if (currentToken == TOKEN_LITERAL && tokenValue instanceof Integer) {
+				IExpression param = factory.indexedParameter(((Integer) tokenValue).intValue());
+				nextToken();
+				return param;
+			}
+		}
+		throw syntaxError();
+	}
+
+	protected IExpression[] parseArray() {
+		IExpression expr = parseCondition();
+		if (currentToken != TOKEN_COMMA)
+			return new IExpression[] {expr};
+
+		ArrayList<IExpression> operands = new ArrayList<IExpression>();
+		operands.add(expr);
+		do {
+			nextToken();
+			if (currentToken == TOKEN_LC)
+				// We don't allow lambdas in the array
+				break;
+			operands.add(parseCondition());
+		} while (currentToken == TOKEN_COMMA);
+		return operands.toArray(new IExpression[operands.size()]);
+	}
+
+	protected void assertToken(int token) {
+		if (currentToken != token)
+			throw syntaxError();
+	}
+
+	protected IExpression getVariableOrRootMember(String id) {
+		int idx = size();
+		while (--idx >= 0) {
+			IExpression v = get(idx);
+			if (id.equals(v.toString()))
+				return v;
+		}
+
+		if (rootVariable == null || rootVariable.equals(id))
+			throw syntaxError("No such variable: " + id); //$NON-NLS-1$
+
+		return factory.member(getVariableOrRootMember(rootVariable), id);
+	}
+
+	protected void nextToken() {
+		tokenValue = null;
+		int top = expression.length();
+		char c = 0;
+		while (tokenPos < top) {
+			c = expression.charAt(tokenPos);
+			if (!Character.isWhitespace(c))
+				break;
+			++tokenPos;
+		}
+		if (tokenPos >= top) {
+			lastTokenPos = top;
+			currentToken = TOKEN_END;
+			return;
+		}
+
+		lastTokenPos = tokenPos;
+		switch (c) {
+			case '|' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '|') {
+					tokenValue = OPERATOR_OR;
+					currentToken = TOKEN_OR;
+					tokenPos += 2;
+				} else {
+					currentToken = TOKEN_PIPE;
+					++tokenPos;
+				}
+				break;
+
+			case '&' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '&') {
+					tokenValue = OPERATOR_AND;
+					currentToken = TOKEN_AND;
+					tokenPos += 2;
+				} else
+					currentToken = TOKEN_ERROR;
+				break;
+
+			case '=' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
+					tokenValue = OPERATOR_EQUALS;
+					currentToken = TOKEN_EQUAL;
+					tokenPos += 2;
+				} else
+					currentToken = TOKEN_ERROR;
+				break;
+
+			case '!' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
+					tokenValue = OPERATOR_NOT_EQUALS;
+					currentToken = TOKEN_NOT_EQUAL;
+					tokenPos += 2;
+				} else {
+					currentToken = TOKEN_NOT;
+					++tokenPos;
+				}
+				break;
+
+			case '~' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
+					tokenValue = OPERATOR_MATCHES;
+					currentToken = TOKEN_MATCHES;
+					tokenPos += 2;
+				} else
+					currentToken = TOKEN_ERROR;
+				break;
+
+			case '>' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
+					tokenValue = OPERATOR_GT_EQUAL;
+					currentToken = TOKEN_GREATER_EQUAL;
+					tokenPos += 2;
+				} else {
+					currentToken = TOKEN_GREATER;
+					++tokenPos;
+				}
+				break;
+
+			case '<' :
+				if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
+					tokenValue = OPERATOR_LT_EQUAL;
+					currentToken = TOKEN_LESS_EQUAL;
+					tokenPos += 2;
+				} else {
+					currentToken = TOKEN_LESS;
+					++tokenPos;
+				}
+				break;
+
+			case '?' :
+				currentToken = TOKEN_IF;
+				++tokenPos;
+				break;
+
+			case ':' :
+				currentToken = TOKEN_ELSE;
+				++tokenPos;
+				break;
+
+			case '.' :
+				currentToken = TOKEN_DOT;
+				++tokenPos;
+				break;
+
+			case '$' :
+				currentToken = TOKEN_DOLLAR;
+				++tokenPos;
+				break;
+
+			case '{' :
+				currentToken = TOKEN_LC;
+				++tokenPos;
+				break;
+
+			case '}' :
+				currentToken = TOKEN_RC;
+				++tokenPos;
+				break;
+
+			case '(' :
+				currentToken = TOKEN_LP;
+				++tokenPos;
+				break;
+
+			case ')' :
+				currentToken = TOKEN_RP;
+				++tokenPos;
+				break;
+
+			case '[' :
+				currentToken = TOKEN_LB;
+				++tokenPos;
+				break;
+
+			case ']' :
+				currentToken = TOKEN_RB;
+				++tokenPos;
+				break;
+
+			case ',' :
+				currentToken = TOKEN_COMMA;
+				++tokenPos;
+				break;
+
+			case '"' :
+			case '\'' :
+				parseDelimitedString(c);
+				break;
+
+			case '/' :
+				parseDelimitedString(c);
+				if (currentToken == TOKEN_LITERAL)
+					tokenValue = SimplePattern.compile((String) tokenValue);
+				break;
+
+			default :
+				if (Character.isDigit(c)) {
+					int start = tokenPos++;
+					while (tokenPos < top && Character.isDigit(expression.charAt(tokenPos)))
+						++tokenPos;
+					tokenValue = Integer.valueOf(expression.substring(start, tokenPos));
+					currentToken = TOKEN_LITERAL;
+					break;
+				}
+				if (Character.isJavaIdentifierStart(c)) {
+					int start = tokenPos++;
+					while (tokenPos < top && Character.isJavaIdentifierPart(expression.charAt(tokenPos)))
+						++tokenPos;
+					String word = expression.substring(start, tokenPos);
+					Integer token = keywordToTokenMap().get(word);
+					if (token == null)
+						currentToken = TOKEN_IDENTIFIER;
+					else
+						currentToken = token.intValue();
+					tokenValue = word;
+					break;
+				}
+				throw syntaxError();
+		}
+	}
+
+	protected void popVariable() {
+		if (isEmpty())
+			throw syntaxError();
+		pop();
+	}
+
+	protected ExpressionParseException syntaxError() {
+		Object tv = tokenValue;
+		if (tv == null) {
+			if (lastTokenPos >= expression.length())
+				return syntaxError("Unexpected end of expression"); //$NON-NLS-1$
+			tv = expression.substring(lastTokenPos, lastTokenPos + 1);
+		}
+		return syntaxError("Unexpected token \"" + tv + '"'); //$NON-NLS-1$
+	}
+
+	protected ExpressionParseException syntaxError(String message) {
+		return new ExpressionParseException(expression, message, tokenPos);
+	}
+
+	private void parseDelimitedString(char delim) {
+		int start = ++tokenPos;
+		StringBuffer buf = new StringBuffer();
+		int top = expression.length();
+		while (tokenPos < top) {
+			char ec = expression.charAt(tokenPos);
+			if (ec == delim)
+				break;
+			if (ec == '\\') {
+				if (++tokenPos == top)
+					break;
+				ec = expression.charAt(tokenPos);
+			}
+			buf.append(ec);
+			++tokenPos;
+		}
+		if (tokenPos == top) {
+			tokenPos = start - 1;
+			currentToken = TOKEN_ERROR;
+		} else {
+			++tokenPos;
+			tokenValue = buf.toString();
+			currentToken = TOKEN_LITERAL;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
new file mode 100644
index 0000000..1878fe7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
@@ -0,0 +1,283 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression.parser;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.Messages;
+import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
+import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Parser class for OSGi filter strings. This class parses the complete filter string and builds a tree of Filter
+ * objects rooted at the parent.
+ */
+public class LDAPFilterParser {
+	@SuppressWarnings("serial")
+	private static final Map<String, IFilterExpression> filterCache = Collections.<String, IFilterExpression> synchronizedMap(new LinkedHashMap<String, IFilterExpression>() {
+		public boolean removeEldestEntry(Map.Entry<String, IFilterExpression> expr) {
+			return size() > 64;
+		}
+	});
+
+	private final IExpressionFactory factory;
+
+	private final IExpression self;
+
+	private final StringBuffer sb = new StringBuffer();
+
+	private String filterString;
+
+	private int position;
+
+	public LDAPFilterParser(IExpressionFactory factory) {
+		this.factory = factory;
+		self = factory.variable(IExpressionConstants.VARIABLE_THIS);
+		position = 0;
+	}
+
+	public IFilterExpression parse(String filterStr) {
+		IFilterExpression filter = filterCache.get(filterStr);
+		if (filter != null)
+			return filter;
+
+		synchronized (this) {
+			filterString = filterStr;
+			position = 0;
+			try {
+				IExpression expr = parseFilter();
+				if (position != filterString.length())
+					throw syntaxException(Messages.filter_trailing_characters);
+				filter = factory.filterExpression(expr);
+				filterCache.put(filterStr, filter);
+				return filter;
+			} catch (StringIndexOutOfBoundsException e) {
+				throw syntaxException(Messages.filter_premature_end);
+			}
+		}
+	}
+
+	private IExpression parseAnd() {
+		skipWhiteSpace();
+		char c = filterString.charAt(position);
+		if (c != '(')
+			throw syntaxException(Messages.filter_missing_leftparen);
+
+		ArrayList<IExpression> operands = new ArrayList<IExpression>();
+		while (c == '(') {
+			IExpression child = parseFilter();
+			if (!operands.contains(child))
+				operands.add(child);
+			c = filterString.charAt(position);
+		}
+		// int sz = operands.size();
+		// return sz == 1 ? operands.get(0) : factory.and(operands.toArray(new IExpression[sz]));
+		return factory.normalize(operands, IExpression.TYPE_AND);
+	}
+
+	private IExpression parseAttr() {
+		skipWhiteSpace();
+
+		int begin = position;
+		int end = position;
+
+		char c = filterString.charAt(begin);
+		while (!(c == '~' || c == '<' || c == '>' || c == '=' || c == '(' || c == ')')) {
+			position++;
+			if (!Character.isWhitespace(c))
+				end = position;
+			c = filterString.charAt(position);
+		}
+		if (end == begin)
+			throw syntaxException(Messages.filter_missing_attr);
+		return factory.member(self, filterString.substring(begin, end));
+	}
+
+	private IExpression parseFilter() {
+		IExpression filter;
+		skipWhiteSpace();
+
+		if (filterString.charAt(position) != '(')
+			throw syntaxException(Messages.filter_missing_leftparen);
+
+		position++;
+		filter = parseFiltercomp();
+
+		skipWhiteSpace();
+
+		if (filterString.charAt(position) != ')')
+			throw syntaxException(Messages.filter_missing_rightparen);
+
+		position++;
+		skipWhiteSpace();
+
+		return filter;
+	}
+
+	private IExpression parseFiltercomp() {
+		skipWhiteSpace();
+
+		char c = filterString.charAt(position);
+
+		switch (c) {
+			case '&' : {
+				position++;
+				return parseAnd();
+			}
+			case '|' : {
+				position++;
+				return parseOr();
+			}
+			case '!' : {
+				position++;
+				return parseNot();
+			}
+		}
+		return parseItem();
+	}
+
+	private IExpression parseItem() {
+		IExpression attr = parseAttr();
+
+		skipWhiteSpace();
+		String value;
+
+		boolean[] hasWild = {false};
+		char c = filterString.charAt(position);
+		switch (c) {
+			case '~' :
+			case '>' :
+			case '<' :
+				if (filterString.charAt(position + 1) != '=')
+					throw syntaxException(Messages.filter_invalid_operator);
+				position += 2;
+				int savePos = position;
+				value = parseValue(hasWild);
+				if (hasWild[0]) {
+					// Unescaped wildcard found. This is not legal for the given operator
+					position = savePos;
+					throw syntaxException(Messages.filter_invalid_value);
+				}
+				switch (c) {
+					case '>' :
+						return factory.greaterEqual(attr, factory.constant(value));
+					case '<' :
+						return factory.lessEqual(attr, factory.constant(value));
+				}
+				return factory.matches(attr, factory.constant(new LDAPApproximation(value)));
+			case '=' :
+				position++;
+				value = parseValue(hasWild);
+				return hasWild[0] ? factory.matches(attr, factory.constant(SimplePattern.compile(value))) : factory.equals(attr, factory.constant(value));
+		}
+		throw syntaxException(Messages.filter_invalid_operator);
+	}
+
+	private IExpression parseNot() {
+		skipWhiteSpace();
+
+		if (filterString.charAt(position) != '(')
+			throw syntaxException(Messages.filter_missing_leftparen);
+		return factory.not(parseFilter());
+	}
+
+	private IExpression parseOr() {
+		skipWhiteSpace();
+		char c = filterString.charAt(position);
+		if (c != '(')
+			throw syntaxException(Messages.filter_missing_leftparen);
+
+		ArrayList<IExpression> operands = new ArrayList<IExpression>();
+		while (c == '(') {
+			IExpression child = parseFilter();
+			operands.add(child);
+			c = filterString.charAt(position);
+		}
+		// int sz = operands.size();
+		// return sz == 1 ? operands.get(0) : factory.or(operands.toArray(new IExpression[sz]));
+		return factory.normalize(operands, IExpression.TYPE_OR);
+	}
+
+	private static int hexValue(char c) {
+		int v;
+		if (c <= '9')
+			v = c - '0';
+		else if (c <= 'F')
+			v = (c - 'A') + 10;
+		else
+			v = (c - 'a') + 10;
+		return v;
+	}
+
+	private String parseValue(boolean[] hasWildBin) {
+		sb.setLength(0);
+		int savePos = position;
+		boolean hasEscapedWild = false;
+		parseloop: while (true) {
+			char c = filterString.charAt(position);
+			switch (c) {
+				case '*' :
+					if (hasEscapedWild && !hasWildBin[0]) {
+						// We must redo the parse.
+						position = savePos;
+						hasWildBin[0] = true;
+						return parseValue(hasWildBin);
+					}
+					hasWildBin[0] = true;
+					sb.append(c);
+					position++;
+					break;
+
+				case ')' :
+					break parseloop;
+
+				case '(' :
+					throw syntaxException(Messages.filter_invalid_value);
+
+				case '\\' :
+					c = filterString.charAt(++position);
+					if (c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f' && position + 1 < filterString.length()) {
+						char nc = filterString.charAt(position + 1);
+						if (nc >= '0' && nc <= '9' || nc >= 'A' && nc <= 'F' || nc >= 'a' && nc <= 'f') {
+							// Assume proper \xx escape where xx are hex digits
+							++position;
+							c = (char) (((hexValue(c) << 4) & 0xf0) | (hexValue(nc) & 0x0f));
+							if (c == '*' && hasWildBin != null) {
+								hasEscapedWild = true;
+								if (hasWildBin[0])
+									sb.append('\\');
+							}
+						}
+					}
+					/* fall through into default */
+
+				default :
+					sb.append(c);
+					position++;
+					break;
+			}
+		}
+		if (sb.length() == 0)
+			throw syntaxException(Messages.filter_missing_value);
+		return sb.toString();
+	}
+
+	private void skipWhiteSpace() {
+		for (int top = filterString.length(); position < top; ++position)
+			if (!Character.isWhitespace(filterString.charAt(position)))
+				break;
+	}
+
+	protected ExpressionParseException syntaxException(String message) {
+		return new ExpressionParseException(NLS.bind(message, filterString, Integer.toString(position)));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
new file mode 100644
index 0000000..b82dc65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
@@ -0,0 +1,356 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.expression.parser;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.Variable;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
+
+public class QLParser extends ExpressionParser {
+	private static final long serialVersionUID = 882034383978853143L;
+
+	private static final int TOKEN_ANY = 42;
+
+	private static final int TOKEN_LATEST = 70;
+	private static final int TOKEN_LIMIT = 71;
+	private static final int TOKEN_FIRST = 72;
+	private static final int TOKEN_FLATTEN = 73;
+	private static final int TOKEN_UNIQUE = 74;
+	private static final int TOKEN_SELECT = 75;
+	private static final int TOKEN_COLLECT = 76;
+	private static final int TOKEN_TRAVERSE = 77;
+	private static final int TOKEN_INTERSECT = 78;
+	private static final int TOKEN_UNION = 79;
+
+	private static final Map<String, Integer> qlKeywords;
+	static {
+		qlKeywords = new HashMap<String, Integer>();
+		qlKeywords.putAll(keywords);
+		qlKeywords.put(KEYWORD_COLLECT, new Integer(TOKEN_COLLECT));
+		qlKeywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
+		qlKeywords.put(KEYWORD_FIRST, new Integer(TOKEN_FIRST));
+		qlKeywords.put(KEYWORD_FLATTEN, new Integer(TOKEN_FLATTEN));
+		qlKeywords.put(KEYWORD_LATEST, new Integer(TOKEN_LATEST));
+		qlKeywords.put(KEYWORD_LIMIT, new Integer(TOKEN_LIMIT));
+		qlKeywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
+		qlKeywords.put(KEYWORD_SELECT, new Integer(TOKEN_SELECT));
+		qlKeywords.put(KEYWORD_TRAVERSE, new Integer(TOKEN_TRAVERSE));
+		qlKeywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
+		qlKeywords.put(KEYWORD_UNIQUE, new Integer(TOKEN_UNIQUE));
+		qlKeywords.put(KEYWORD_INTERSECT, new Integer(TOKEN_INTERSECT));
+		qlKeywords.put(KEYWORD_UNION, new Integer(TOKEN_UNION));
+		qlKeywords.put(OPERATOR_EACH, new Integer(TOKEN_ANY));
+	}
+
+	public QLParser(IExpressionFactory factory) {
+		super(factory);
+	}
+
+	protected Map<String, Integer> keywordToTokenMap() {
+		return qlKeywords;
+	}
+
+	protected IExpression parseCondition() {
+		IExpression expr = parseOr();
+		if (currentToken == TOKEN_IF) {
+			nextToken();
+			IExpression ifTrue = parseOr();
+			assertToken(TOKEN_ELSE);
+			nextToken();
+			expr = factory.condition(expr, ifTrue, parseOr());
+		}
+		return expr;
+	}
+
+	protected IExpression parseMember() {
+		IExpression expr = parseFunction();
+		String name;
+		while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
+			int savePos = tokenPos;
+			int saveToken = currentToken;
+			Object saveTokenValue = tokenValue;
+			nextToken();
+			if (saveToken == TOKEN_DOT) {
+				switch (currentToken) {
+					case TOKEN_IDENTIFIER :
+						name = (String) tokenValue;
+						nextToken();
+						if (currentToken == TOKEN_LP) {
+							nextToken();
+							IExpression[] callArgs = parseArray();
+							assertToken(TOKEN_RP);
+							nextToken();
+							expr = factory.memberCall(expr, name, callArgs);
+						} else
+							expr = factory.member(expr, name);
+						break;
+
+					default :
+						tokenPos = savePos;
+						currentToken = saveToken;
+						tokenValue = saveTokenValue;
+						return expr;
+				}
+			} else {
+				IExpression atExpr = parseMember();
+				assertToken(TOKEN_RB);
+				nextToken();
+				expr = factory.at(expr, atExpr);
+			}
+		}
+		return expr;
+	}
+
+	protected IExpression parseFunction() {
+		if (currentToken == TOKEN_IDENTIFIER) {
+			Object function = factory.getFunctionMap().get(tokenValue);
+			if (function != null) {
+				int savePos = tokenPos;
+				int saveToken = currentToken;
+				Object saveTokenValue = tokenValue;
+
+				nextToken();
+				if (currentToken == TOKEN_LP) {
+					nextToken();
+					IExpression[] args = currentToken == TOKEN_RP ? IExpressionFactory.NO_ARGS : parseArray();
+					assertToken(TOKEN_RP);
+					nextToken();
+					return factory.function(function, args);
+				}
+				tokenPos = savePos;
+				currentToken = saveToken;
+				tokenValue = saveTokenValue;
+			}
+		}
+		return parseUnary();
+	}
+
+	protected IExpression parseCollectionLHS() {
+		IExpression expr;
+		switch (currentToken) {
+			case TOKEN_SELECT :
+			case TOKEN_COLLECT :
+			case TOKEN_FIRST :
+			case TOKEN_FLATTEN :
+			case TOKEN_TRAVERSE :
+			case TOKEN_LATEST :
+			case TOKEN_LIMIT :
+			case TOKEN_INTERSECT :
+			case TOKEN_UNION :
+			case TOKEN_UNIQUE :
+				expr = getVariableOrRootMember(rootVariable);
+				break;
+			default :
+				expr = super.parseCollectionLHS();
+		}
+		return expr;
+	}
+
+	protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
+		switch (funcToken) {
+			case TOKEN_SELECT :
+				expr = factory.select(expr, parseLambdaDefinition());
+				break;
+			case TOKEN_COLLECT :
+				expr = factory.collect(expr, parseLambdaDefinition());
+				break;
+			case TOKEN_FIRST :
+				expr = factory.first(expr, parseLambdaDefinition());
+				break;
+			case TOKEN_TRAVERSE :
+				expr = factory.traverse(expr, parseLambdaDefinition());
+				break;
+			case TOKEN_LATEST :
+				if (currentToken == TOKEN_RP) {
+					expr = factory.latest(expr);
+					assertToken(TOKEN_RP);
+					nextToken();
+				} else
+					expr = factory.latest(factory.select(expr, parseLambdaDefinition()));
+				break;
+			case TOKEN_FLATTEN :
+				if (currentToken == TOKEN_RP) {
+					expr = factory.flatten(expr);
+					assertToken(TOKEN_RP);
+					nextToken();
+				} else
+					expr = factory.flatten(factory.select(expr, parseLambdaDefinition()));
+				break;
+			case TOKEN_LIMIT :
+				expr = factory.limit(expr, parseCondition());
+				assertToken(TOKEN_RP);
+				nextToken();
+				break;
+			case TOKEN_INTERSECT :
+				expr = factory.intersect(expr, parseCondition());
+				assertToken(TOKEN_RP);
+				nextToken();
+				break;
+			case TOKEN_UNION :
+				expr = factory.union(expr, parseCondition());
+				assertToken(TOKEN_RP);
+				nextToken();
+				break;
+			case TOKEN_UNIQUE :
+				if (currentToken == TOKEN_RP)
+					expr = factory.unique(expr, factory.constant(null));
+				else {
+					expr = factory.unique(expr, parseMember());
+					assertToken(TOKEN_RP);
+					nextToken();
+				}
+				break;
+			default :
+				expr = super.parseCollectionRHS(expr, funcToken);
+		}
+		return expr;
+	}
+
+	protected IExpression parseUnary() {
+		IExpression expr;
+		switch (currentToken) {
+			case TOKEN_LB :
+				nextToken();
+				expr = factory.array(parseArray());
+				assertToken(TOKEN_RB);
+				nextToken();
+				break;
+			case TOKEN_ANY :
+				expr = factory.variable(OPERATOR_EACH);
+				nextToken();
+				break;
+			default :
+				expr = super.parseUnary();
+		}
+		return expr;
+	}
+
+	protected IExpression parseLambdaDefinition() {
+		boolean endingRC = false;
+		int anyIndex = -1;
+		IExpression[] initializers = IExpressionFactory.NO_ARGS;
+		IExpression[] variables;
+		if (currentToken == TOKEN_LC) {
+			// Lambda starts without currying.
+			endingRC = true;
+			nextToken();
+			anyIndex = 0;
+			variables = parseVariables();
+			if (variables == null)
+				// empty means no pipe at the end.
+				throw syntaxError();
+		} else {
+			anyIndex = 0;
+			variables = parseVariables();
+			if (variables == null) {
+				anyIndex = -1;
+				initializers = parseArray();
+				assertToken(TOKEN_LC);
+				nextToken();
+				endingRC = true;
+				for (int idx = 0; idx < initializers.length; ++idx) {
+					IExpression initializer = initializers[idx];
+					if (initializer instanceof Variable && OPERATOR_EACH.equals(initializer.toString())) {
+						if (anyIndex == -1)
+							anyIndex = idx;
+						else
+							anyIndex = -1; // Second Each. This is illegal
+						break;
+					}
+				}
+				if (anyIndex == -1)
+					throw new IllegalArgumentException("Exaclty one _ must be present among the currying expressions"); //$NON-NLS-1$
+
+				variables = parseVariables();
+				if (variables == null)
+					// empty means no pipe at the end.
+					throw syntaxError();
+			}
+
+		}
+		nextToken();
+		IExpression body = parseCondition();
+		if (endingRC) {
+			assertToken(TOKEN_RC);
+			nextToken();
+		}
+
+		assertToken(TOKEN_RP);
+		nextToken();
+		IExpression each;
+		IExpression[] assignments;
+		if (initializers.length == 0) {
+			if (variables.length != 1)
+				throw new IllegalArgumentException("Must have exactly one variable unless currying is used"); //$NON-NLS-1$
+			each = variables[0];
+			assignments = IExpressionFactory.NO_ARGS;
+		} else {
+			if (initializers.length != variables.length)
+				throw new IllegalArgumentException("Number of currying expressions and variables differ"); //$NON-NLS-1$
+
+			if (initializers.length == 1) {
+				// This is just a map from _ to some variable
+				each = variables[0];
+				assignments = IExpressionFactory.NO_ARGS;
+			} else {
+				int idx;
+				each = variables[anyIndex];
+				assignments = new IExpression[initializers.length - 1];
+				for (idx = 0; idx < anyIndex; ++idx)
+					assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
+				for (++idx; idx < initializers.length; ++idx)
+					assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
+			}
+		}
+		return factory.lambda(each, assignments, body);
+	}
+
+	private IExpression[] parseVariables() {
+		int savePos = tokenPos;
+		int saveToken = currentToken;
+		Object saveTokenValue = tokenValue;
+		List<Object> ids = null;
+		while (currentToken == TOKEN_IDENTIFIER) {
+			if (ids == null)
+				ids = new ArrayList<Object>();
+			ids.add(tokenValue);
+			nextToken();
+			if (currentToken == TOKEN_COMMA) {
+				nextToken();
+				continue;
+			}
+			break;
+		}
+
+		if (currentToken != TOKEN_PIPE) {
+			// This was not a variable list
+			tokenPos = savePos;
+			currentToken = saveToken;
+			tokenValue = saveTokenValue;
+			return null;
+		}
+
+		if (ids == null)
+			// Empty list but otherwise OK
+			return IExpressionFactory.NO_ARGS;
+
+		int top = ids.size();
+		IExpression[] result = new IExpression[top];
+		for (int idx = 0; idx < top; ++idx) {
+			String name = (String) ids.get(idx);
+			IExpression var = factory.variable(name);
+			push(var);
+			result[idx] = var;
+		}
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
new file mode 100644
index 0000000..53943c8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.index;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * An in-memory implementation of a CapabilityIndex based on a Map.
+ */
+ at SuppressWarnings("unchecked")
+public class CapabilityIndex extends Index<IInstallableUnit> {
+
+	private final Map<String, Object> capabilityMap;
+
+	public CapabilityIndex(Iterator<IInstallableUnit> itor) {
+		HashMap<String, Object> index = new HashMap<String, Object>(300);
+		while (itor.hasNext()) {
+			IInstallableUnit iu = itor.next();
+			Collection<IProvidedCapability> pcs = iu.getProvidedCapabilities();
+			for (IProvidedCapability pc : pcs) {
+				String name = pc.getName();
+				Object prev = index.put(name, iu);
+				if (prev == null || prev == iu)
+					continue;
+
+				ArrayList<IInstallableUnit> list;
+				if (prev instanceof IInstallableUnit) {
+					list = new ArrayList<IInstallableUnit>();
+					list.add((IInstallableUnit) prev);
+				} else
+					list = (ArrayList<IInstallableUnit>) prev;
+				list.add(iu);
+				index.put(name, list);
+			}
+		}
+		this.capabilityMap = index;
+	}
+
+	private Object getRequirementIDs(IEvaluationContext ctx, IExpression requirement, Object queriedKeys) {
+		switch (requirement.getExpressionType()) {
+			case IExpression.TYPE_AND :
+				// AND is OK if at least one of the branches require the queried key
+				for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
+					Object test = getRequirementIDs(ctx, expr, queriedKeys);
+					if (test != null) {
+						if (test == Boolean.FALSE)
+							// Failing exists so the AND will fail altogether
+							return test;
+
+						// It's safe to break here since an and'ing several queries
+						// for different keys and the same input will yield false anyway.
+						return test;
+					}
+				}
+				return null;
+
+			case IExpression.TYPE_OR :
+				// OR is OK if all the branches require the queried key
+				for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
+					Object test = getRequirementIDs(ctx, expr, queriedKeys);
+					if (test == null)
+						// This branch did not require the key so index cannot be used
+						return null;
+
+					if (test == Boolean.FALSE)
+						// Branch will always fail regardless of input, so just ignore
+						continue;
+
+					queriedKeys = test;
+				}
+				return queriedKeys;
+
+			case IExpression.TYPE_ALL :
+			case IExpression.TYPE_EXISTS :
+				CollectionFilter cf = (CollectionFilter) requirement;
+				if (isIndexedMember(cf.getOperand(), ExpressionFactory.THIS, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
+					LambdaExpression lambda = cf.lambda;
+					return getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
+				}
+		}
+		return null;
+	}
+
+	@Override
+	protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
+		if (booleanExpr.getExpressionType() != IExpression.TYPE_MATCHES)
+			return super.getQueriedIDs(ctx, variable, memberName, booleanExpr, queriedKeys);
+
+		Matches matches = (Matches) booleanExpr;
+		if (matches.lhs != variable)
+			return null;
+
+		Object rhsObj = matches.rhs.evaluate(ctx);
+		if (!(rhsObj instanceof IRequirement))
+			return null;
+
+		// Let the requirement expression participate in the
+		// index usage query
+		//
+		IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
+		return RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
+	}
+
+	public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+		Object queriedKeys = null;
+
+		// booleanExpression must be a collection filter on providedCapabilities
+		// or an IInstallableUnit used in a match expression.
+		//
+		IExpression expr = booleanExpr;
+		int type = booleanExpr.getExpressionType();
+		if (type == 0) {
+			// wrapper
+			expr = ((Unary) booleanExpr).operand;
+			type = expr.getExpressionType();
+		}
+
+		switch (type) {
+			case IExpression.TYPE_ALL :
+			case IExpression.TYPE_EXISTS :
+				CollectionFilter cf = (CollectionFilter) expr;
+				if (isIndexedMember(cf.getOperand(), variable, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
+					// This is providedCapabilities.exists or providedCapabilites.all
+					//
+					LambdaExpression lambda = cf.lambda;
+					queriedKeys = getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
+				} else {
+					// Might be the requirements array.
+					//
+					Expression op = cf.getOperand();
+					if (op instanceof Member && InstallableUnit.MEMBER_REQUIREMENTS.equals(((Member) op).getName())) {
+						queriedKeys = getQueriedIDs(ctx, variable, ProvidedCapability.MEMBER_NAME, booleanExpr, queriedKeys);
+					}
+				}
+				break;
+
+			case IExpression.TYPE_MATCHES :
+				Matches matches = (Matches) expr;
+				if (matches.lhs != variable)
+					break;
+
+				Object rhsObj = matches.rhs.evaluate(ctx);
+				if (!(rhsObj instanceof IRequirement))
+					break;
+
+				// Let the requirement expression participate in the
+				// index usage query
+				//
+				IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
+				queriedKeys = RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
+				break;
+
+			default :
+				queriedKeys = null;
+		}
+
+		if (queriedKeys == null)
+			// Index cannot be used.
+			return null;
+
+		Collection<IInstallableUnit> matchingIUs;
+		if (queriedKeys == Boolean.FALSE) {
+			// It has been determined that the expression has no chance
+			// to succeed regardless of input
+			matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
+		} else if (queriedKeys instanceof Collection<?>) {
+			matchingIUs = new HashSet<IInstallableUnit>();
+			for (Object key : (Collection<Object>) queriedKeys)
+				collectMatchingIUs((String) key, matchingIUs);
+		} else {
+			Object v = capabilityMap.get(queriedKeys);
+			if (v == null)
+				matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
+			else if (v instanceof IInstallableUnit)
+				matchingIUs = Collections.singleton((IInstallableUnit) v);
+			else
+				matchingIUs = (Collection<IInstallableUnit>) v;
+		}
+		return matchingIUs.iterator();
+	}
+
+	private void collectMatchingIUs(String name, Collection<IInstallableUnit> collector) {
+		Object v = capabilityMap.get(name);
+		if (v == null)
+			return;
+		if (v instanceof IInstallableUnit)
+			collector.add((IInstallableUnit) v);
+		else
+			collector.addAll((Collection<IInstallableUnit>) v);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
new file mode 100644
index 0000000..77e207f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.index;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+
+public class CompoundIndex<T> implements IIndex<T> {
+
+	private final Collection<IIndex<T>> indexes;
+
+	public CompoundIndex(Collection<IIndex<T>> indexes) {
+		this.indexes = indexes;
+	}
+
+	public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+		Set<T> result = null;
+		for (IIndex<T> index : indexes) {
+			Iterator<T> indexResult = index.getCandidates(ctx, variable, booleanExpr);
+			if (indexResult == null)
+				return null;
+			if (indexResult.hasNext()) {
+				if (result == null)
+					result = new HashSet<T>();
+				do {
+					result.add(indexResult.next());
+				} while (indexResult.hasNext());
+			}
+		}
+		if (result == null)
+			result = CollectionUtils.emptySet();
+		return result.iterator();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
new file mode 100644
index 0000000..a415e8c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.index;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.IUMap;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+public class IdIndex extends Index<IInstallableUnit> {
+	private final IUMap iuMap;
+
+	public IdIndex(IUMap iuMap) {
+		this.iuMap = iuMap;
+	}
+
+	public IdIndex(Iterator<IInstallableUnit> ius) {
+		iuMap = new IUMap();
+		while (ius.hasNext())
+			iuMap.add(ius.next());
+	}
+
+	public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+		Object queriedKeys = getQueriedIDs(ctx, variable, InstallableUnit.MEMBER_ID, booleanExpr, null);
+		if (queriedKeys == null)
+			return null;
+
+		if (queriedKeys instanceof Collection<?>) {
+			HashSet<IInstallableUnit> collector = new HashSet<IInstallableUnit>();
+			for (Object key : (Collection<?>) queriedKeys)
+				collector.addAll(iuMap.getUnits((String) key));
+			return collector.iterator();
+		}
+		return iuMap.getUnits((String) queriedKeys).iterator();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
new file mode 100644
index 0000000..b5051bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.index;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+
+public abstract class Index<T> implements IIndex<T> {
+
+	protected static boolean isIndexedMember(IExpression expr, IExpression variable, String memberName) {
+		if (expr instanceof Member) {
+			Member member = (Member) expr;
+			return member.getOperand() == variable && member.getName().equals(memberName);
+		}
+		return false;
+	}
+
+	protected static Object concatenateUnique(Object previous, Object toAdd) {
+		if (previous == null || toAdd == null || toAdd == Boolean.FALSE)
+			return toAdd;
+
+		if (previous instanceof ArrayList<?>) {
+			@SuppressWarnings("unchecked")
+			ArrayList<Object> prevArr = (ArrayList<Object>) previous;
+			if (!prevArr.contains(toAdd))
+				prevArr.add(toAdd);
+			return previous;
+		}
+		if (previous.equals(toAdd))
+			return previous;
+
+		ArrayList<Object> arr = new ArrayList<Object>();
+		arr.add(previous);
+		arr.add(toAdd);
+		return arr;
+	}
+
+	protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
+		IExpression targetExpr = booleanExpr;
+		if (booleanExpr instanceof IMatchExpression<?>) {
+			targetExpr = ((Unary) targetExpr).operand;
+			ctx = ((IMatchExpression<?>) booleanExpr).createContext();
+		}
+		int type = targetExpr.getExpressionType();
+		switch (type) {
+			case IExpression.TYPE_EQUALS :
+				Binary eqExpr = (Binary) targetExpr;
+				IExpression lhs = eqExpr.lhs;
+				IExpression rhs = eqExpr.rhs;
+				if (isIndexedMember(lhs, variable, memberName)) {
+					Object val = safeEvaluate(ctx, rhs);
+					if (val == null)
+						return null;
+					return concatenateUnique(queriedKeys, val);
+				}
+				if (isIndexedMember(rhs, variable, memberName)) {
+					Object val = safeEvaluate(ctx, lhs);
+					if (val == null)
+						return null;
+					return concatenateUnique(queriedKeys, val);
+				}
+
+				// Not applicable for indexing
+				return null;
+
+			case IExpression.TYPE_AND :
+				// AND is OK if at least one of the branches require the queried key
+				for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
+					Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
+					if (test != null) {
+						if (test == Boolean.FALSE)
+							// Failing exists so the AND will fail altogether
+							return test;
+
+						// It's safe to break here since an and'ing several queries
+						// for different keys and the same input will yield false anyway.
+						return test;
+					}
+				}
+				return null;
+
+			case IExpression.TYPE_OR :
+				// OR is OK if all the branches require the queried key
+				for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
+					Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
+					if (test == null)
+						// This branch did not require the key so index cannot be used
+						return null;
+
+					if (test == Boolean.FALSE)
+						// Branch will always fail regardless of input, so just ignore
+						continue;
+
+					queriedKeys = test;
+				}
+				return queriedKeys;
+
+			case IExpression.TYPE_EXISTS :
+			case IExpression.TYPE_ALL :
+				// We must evaluate the lhs to find the referenced keys
+				//
+				CollectionFilter cf = (CollectionFilter) targetExpr;
+				Iterator<?> values;
+				try {
+					values = cf.getOperand().evaluateAsIterator(ctx);
+				} catch (IllegalArgumentException e) {
+					return null;
+				}
+				if (!values.hasNext())
+					// No keys are requested but we know that an exists must
+					// fail at this point. An all will however succeed regardless
+					// of what is used as input.
+					return type == IExpression.TYPE_ALL ? null : Boolean.FALSE;
+
+				LambdaExpression lambda = cf.lambda;
+				IEvaluationContext lambdaCtx = lambda.prolog(ctx);
+				Variable lambdaVar = lambda.getItemVariable();
+				IExpression filterExpr = lambda.getOperand();
+				do {
+					lambdaVar.setValue(lambdaCtx, values.next());
+					queriedKeys = getQueriedIDs(lambdaCtx, variable, memberName, filterExpr, queriedKeys);
+					if (queriedKeys == null)
+						// No use continuing. The expression does not require the key
+						return null;
+				} while (values.hasNext());
+				return queriedKeys;
+		}
+		return null;
+	}
+
+	private static Object safeEvaluate(IEvaluationContext ctx, IExpression expr) {
+		try {
+			return expr.evaluate(ctx);
+		} catch (IllegalArgumentException e) {
+			return null;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
new file mode 100644
index 0000000..c7899d6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
@@ -0,0 +1,23 @@
+package org.eclipse.equinox.internal.p2.metadata.index;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
+import org.eclipse.equinox.p2.query.*;
+
+public abstract class IndexProvider<T> implements IIndexProvider<T>, IQueryable<T> {
+	public static <Q> IQueryResult<Q> query(IIndexProvider<Q> indexProvider, IQuery<Q> query, IProgressMonitor monitor) {
+		if (monitor != null)
+			monitor.beginTask(null, IProgressMonitor.UNKNOWN);
+		IQueryResult<Q> result = (query instanceof IQueryWithIndex<?>) ? ((IQueryWithIndex<Q>) query).perform(indexProvider) : query.perform(indexProvider.everything());
+		if (monitor != null) {
+			monitor.worked(1);
+			monitor.done();
+		}
+		return result;
+	}
+
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		return query(this, query, monitor);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
new file mode 100644
index 0000000..540b615
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
@@ -0,0 +1,69 @@
+###############################################################################
+ # Copyright (c) 2009 Cloudsmith Inc. and others.
+ # All rights reserved. This program and the accompanying materials
+ # are made available under the terms of the Eclipse Public License v1.0
+ # which accompanies this distribution, and is available at
+ # http://www.eclipse.org/legal/epl-v10.html
+ #
+ # Contributors:
+ #     Cloudsmith Inc. - initial API and implementation
+###############################################################################
+_0_is_not_a_valid_qualifier_in_osgi_1=The {0} value is invalid in OSGi version: "{1}"
+array_can_not_be_empty=Array format can not be empty
+array_can_not_have_character_group=Array format can not have a character group
+auto_can_not_have_pad_value=Auto format can not have a pad value
+cannot_combine_ignore_with_other_instruction=Cannot combine ignore with other instruction
+cannot_combine_range_upper_bound_with_pad_value=Cannot combine range upper bound with pad value
+character_group_defined_more_then_once=Character group was defined more then once
+colon_expected_before_original_version_0=A colon was expected before original version: {0}
+default_defined_more_then_once=Default defined more then once
+delimiter_can_not_be_ignored=A delimiter cannot be ignored
+delimiter_can_not_have_default_value=A delimiter cannot have a default value
+delimiter_can_not_have_pad_value=A delimiter cannot have a pad value
+delimiter_can_not_have_range=A delimiter cannot have a range
+EOS_after_escape=End of string was encountere after the escape character
+expected_orignal_after_colon_0=An original version was expected after colon: {0}
+expected_orignal_after_slash_0=A format or colon was expected after slash: {0}
+expected_slash_after_raw_vector_0=A slash was expected after a raw version: {0}
+filter_missing_leftparen=Filter "{0}" Missing ''('' at position {1}
+filter_missing_rightparen=Filter "{0}" Missing '')'' at position {1}
+filter_trailing_characters=Filter "{0}" Extraneous trailing characters at position {1}
+filter_invalid_operator=Filter "{0}" Invalid operator at position {1}
+filter_missing_attr=Filter "{0}" Missing attr at position {1}
+filter_missing_value=Filter "{0}" is missing value at position {1}
+filter_invalid_value=Filter "{0}" has invalid value at position {1}
+filter_premature_end=Filter "{0}" ends before it is complete
+format_0_unable_to_parse_1=Format "{0}" was unable to parse {1}
+format_0_unable_to_parse_empty_version=Format "{0}" was unable to parse an empty version
+format_is_empty=Format is empty
+format_must_be_delimited_by_colon_0=Format must be delimited by version range: {0}
+group_can_not_be_empty=A group can not be empty
+ignore_defined_more_then_once=More then one definition of ignore
+illegal_character_encountered_ascii_0=An illegal character was encountered. Code = {0}
+missing_comma_in_range_0=Missing comma in range "{0}"
+negative_character_range=The character range is negative
+neither_raw_vector_nor_format_specified_0=Neither raw version nor format was specified: {0}
+number_can_not_have_pad_value=A number cannot have a pad value
+only_format_specified_0=Only a format was specified: {0}
+only_max_and_empty_string_defaults_can_have_translations=Only max string and empty string defaults can have translations
+original_must_start_with_colon_0=Original version must start with colon: {0}
+original_stated_but_missing_0=Expected original version after colon: {0}
+no_expression_factory=No Expression Factory service has been registered
+no_expression_parser=No Expression Parser service has been registered
+pad_defined_more_then_once=Pad was defined more then once
+performing_subquery=Performing subquery
+premature_end_of_format=Premature end of format
+premature_end_of_format_expected_0=Premature end of format, "{0}" expected
+premature_EOS_0=Premature end of string in "{0}"
+range_defined_more_then_once=Range defined more then once
+range_max_cannot_be_less_then_range_min=The range maximum must not be less then its minimum
+range_max_cannot_be_zero=The range maximum cannot be zero
+range_min_0_is_not_less_then_range_max_1=Range minimum "{0}" is not less then range maximum "{1}" (inclusion is required at both ends if the versions are equal)
+range_boundaries_0_and_1_cannot_have_different_formats=Range boundaries "{0}" and "{1}" cannot have different formats
+raw_and_original_must_use_same_range_inclusion_0=Raw and original must use the same range inclusion markers in range "{0}"
+raw_element_can_not_have_pad_value=A raw element cannot have a pad value
+raw_element_expected_0=A raw element was expected: {0}
+string_can_not_have_pad_value=A string cannot have a pad value
+syntax_error_in_version_format_0_1_2=Syntax error in version format "{0}" at position {1}: {2}
+syntax_error_in_version_format_0_1_found_2_expected_3=Syntax error in version format "{0}" at position {1}: Found {2} when {3} was expected
+unbalanced_format_parenthesis=Unbalanced format parenthesis
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
new file mode 100644
index 0000000..9ff7248
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.metadata.query;
+
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * A query that finds all IUs that are considered an "Update" of the 
+ * specified IU.  
+ */
+public final class UpdateQuery extends ExpressionMatchQuery<IInstallableUnit> {
+	private static final IExpression expr1;
+	private static final IExpression expr2;
+
+	static {
+		IExpressionParser parser = ExpressionUtil.getParser();
+
+		// This expression is used in case the updateFrom is an IInstallableUnitPatch
+		//
+		expr1 = parser.parse("$0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
+
+		// When updateFrom is not an IInstallableUnitPatch, we need to do one of two things depending
+		// on if the current item is an InstallableUnitPatch or not.
+		//
+		expr2 = parser.parse("this ~= class('org.eclipse.equinox.p2.metadata.IInstallableUnitPatch')" + // //$NON-NLS-1$
+				"? $0 ~= lifeCycle" + // //$NON-NLS-1$
+				": $0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
+	}
+
+	public UpdateQuery(IInstallableUnit updateFrom) {
+		super(IInstallableUnit.class, updateFrom instanceof IInstallableUnitPatch ? expr1 : expr2, updateFrom, IInstallableUnitPatch.class);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java
deleted file mode 100644
index ef26c25..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IArtifactKey.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Provide standardized artifact information to uniquely identify the 
- * corresponding bytes (perhaps not stored as a file). 
- * <p>
- * Artifact keys represent both a unique opaque identifier as well as structured 
- * and standardized pieces of information.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IArtifactKey {
-
-	/**
-	 * Returns the classifier for this artifact key. The returned value can be empty.
-	 * @return the classifier segment of the key.
-	 */
-	public String getClassifier();
-
-	/**
-	 * Returns the id for this artifact key. The returned value can be empty.
-	 * @return the classifier segment of the key.
-	 */
-	public String getId();
-
-	/**
-	 * Returns the version for this artifact key. 
-	 * @return the version segment of the key.
-	 */
-	public Version getVersion();
-
-	/**
-	 * Returns the canonical string form of this artifact key.
-	 * @return the canonical string representing this key
-	 */
-	public String toExternalForm();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java
deleted file mode 100644
index 990b874..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ICopyright.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.net.URI;
-
-/**
- * The <code>ICopyright</code> interface represents a software copyright.  A copyright has 
- * required body text which may be the full text or a summary.  An optional location field can be specified
- * which links to full text.  
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ICopyright {
-
-	/**
-	 * Returns the location of a document containing the copyright notice.
-	 * 
-	 * @return The location of the copyright notice, or <code>null</code>
-	 */
-	public URI getLocation();
-
-	/**
-	 * Returns the license body.
-	 * 
-	 * @return the license body, never <code>null</code>
-	 */
-	public String getBody();
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java
deleted file mode 100644
index 2e2d2cd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnit.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
- * 		IBM Corporation - initial API and implementation
- * 		Genuitec, LLC - added license support
- * 		EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IInstallableUnit extends Comparable {
-
-	/**
-	 * A capability namespace representing a particular profile flavor.
-	 */
-	public static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$
-
-	/**
-	 * A capability namespace representing a particular InstallableUnit by id.
-	 * Each InstallableUnit automatically provides a capability in this namespace representing
-	 * itself, and other InstallableUnits can require such a capability to state that they
-	 * require a particular InstallableUnit to be present.
-	 * 
-	 * @see IInstallableUnit#getId()
-	 */
-	public static final String NAMESPACE_IU_ID = "org.eclipse.equinox.p2.iu"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.partial.iu"</code>) for a 
-	 * boolean property indicating the IU is generated from incomplete information and
-	 * should be replaced by the complete IU if available.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_PARTIAL_IU = "org.eclipse.equinox.p2.partial.iu"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.profile"</code>) for a 
-	 * boolean property indicating that an installable unit is a profile.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_TYPE_PROFILE = "org.eclipse.equinox.p2.type.profile"; //$NON-NLS-1$	 
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.category"</code>) for a 
-	 * boolean property indicating that an installable unit is a category.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.fragment"</code>) for a 
-	 * boolean property indicating that an installable unit is a fragment.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_TYPE_FRAGMENT = "org.eclipse.equinox.p2.type.fragment"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.group"</code>) for a 
-	 * boolean property indicating that an installable unit is a group.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a 
-	 * boolean property indicating that an installable unit is a group.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.type.lock"</code>) for an
-	 * integer property indicating how an installable unit is locked in its profile.
-	 * The integer is a bit-mask indicating the different locks defined on the installable
-	 * unit.  The property should be obtained from a profile using 
-	 * IProfile#getInstallableUnitProperty(IInstallableUnit, String).
-	 * 
-	 * @see #LOCK_UNINSTALL
-	 * @see #LOCK_UPDATE
-	 * @see #LOCK_NONE
-	 */
-	public static final String PROP_PROFILE_LOCKED_IU = "org.eclipse.equinox.p2.type.lock"; //$NON-NLS-1$
-
-	//TODO Move to UI
-	public static final String PROP_PROFILE_ROOT_IU = "org.eclipse.equinox.p2.type.root"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.contact"</code>) for a 
-	 * String property containing a contact address where problems can be reported, 
-	 * such as an email address.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_CONTACT = "org.eclipse.equinox.p2.contact"; //$NON-NLS-1$
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.description"</code>) for a 
-	 * String property containing a human-readable description of the installable unit.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.description.url"</code>) for a 
-	 * String property containing a URL to the description of the installable unit.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_DESCRIPTION_URL = "org.eclipse.equinox.p2.description.url"; //$NON-NLS-1$
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.doc.url"</code>) for a 
-	 * String property containing a URL for documentation about the installable unit.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_DOC_URL = "org.eclipse.equinox.p2.doc.url"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.bundle.localization"</code>) for a String
-	 * property containing the bundle localization property file name
-	 */
-	public static final String PROP_BUNDLE_LOCALIZATION = "org.eclipse.equinox.p2.bundle.localization"; //$NON-NLS-1$
-
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.name"</code>) for a 
-	 * String property containing a human-readable name for the installable unit.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
-	/**
-	 * A property key (value <code>"org.eclipse.equinox.p2.provider"</code>) for a 
-	 * String property containing information about the vendor or provider of the 
-	 * installable unit.
-	 * 
-	 * @see #getProperty(String)
-	 */
-	public static final String PROP_PROVIDER = "org.eclipse.equinox.p2.provider"; //$NON-NLS-1$
-
-	/**
-	 * Constant used to indicate that an installable unit is not locked in anyway.
-	 * @see #PROP_PROFILE_LOCKED_IU
-	 */
-	public static int LOCK_NONE = 0;
-	/**
-	 * Constant used to indicate that an installable unit is locked so that it may
-	 * not be uninstalled.
-	 * @see #PROP_PROFILE_LOCKED_IU
-	 */
-	public static int LOCK_UNINSTALL = 1 << 0;
-	/**
-	 * Constant used to indicate that an installable unit is locked so that it may
-	 * not be updated. updates.
-	 * @see #PROP_PROFILE_LOCKED_IU
-	 */
-	public static int LOCK_UPDATE = 1 << 1;
-
-	public IArtifactKey[] getArtifacts();
-
-	/**
-	 * Returns the filter on this installable unit. The filter is matched against
-	 * the selection context of the profile the unit is installed into. An IU will not
-	 * be installed if it has a filter condition that is not satisfied by the context.
-	 * 
-	 * See Profile#getSelectionContext.
-	 */
-	public String getFilter();
-
-	/**
-	 * Returns the fragments that have been bound to this installable unit, or
-	 * <code>null</code> if this unit is not resolved.
-	 * 
-	 * @see #isResolved()
-	 * @return The fragments bound to this installable unit, or <code>null</code>
-	 */
-	public IInstallableUnitFragment[] getFragments();
-
-	public String getId();
-
-	/**
-	 * Get an <i>unmodifiable copy</i> of the properties
-	 * associated with the installable unit.
-	 * 
-	 * @return an <i>unmodifiable copy</i> of the IU properties.
-	 */
-	public Map getProperties();
-
-	public String getProperty(String key);
-
-	public IProvidedCapability[] getProvidedCapabilities();
-
-	public IRequiredCapability[] getRequiredCapabilities();
-
-	public IRequiredCapability[] getMetaRequiredCapabilities();
-
-	public ITouchpointData[] getTouchpointData();
-
-	public ITouchpointType getTouchpointType();
-
-	public Version getVersion();
-
-	public boolean isFragment();
-
-	/**
-	 * Returns whether this installable unit has been resolved. A resolved
-	 * installable unit represents the union of an installable unit and some
-	 * fragments.
-	 * 
-	 * @see #getFragments()
-	 * @see #unresolved()
-	 * @return <code>true</code> if this installable unit is resolved, and 
-	 * <code>false</code> otherwise.
-	 */
-	public boolean isResolved();
-
-	public boolean isSingleton();
-
-	/**
-	 * Returns whether this unit has a provided capability that satisfies the given 
-	 * required capability.
-	 * @return <code>true</code> if this unit satisfies the given required
-	 * capability, and <code>false</code> otherwise.
-	 */
-	public boolean satisfies(IRequiredCapability candidate);
-
-	/**
-	 * Returns the unresolved equivalent of this installable unit. If this unit is
-	 * already unresolved, this method returns the receiver. Otherwise, this
-	 * method returns an installable unit with the same id and version, but without
-	 * any fragments attached.
-	 * 
-	 * @see #getFragments()
-	 * @see #isResolved()
-	 * @return The unresolved equivalent of this unit
-	 */
-	public IInstallableUnit unresolved();
-
-	/**
-	 * Returns information about what this installable unit is an update of.
-	 * @return The lineage information about the installable unit
-	 */
-	public IUpdateDescriptor getUpdateDescriptor();
-
-	/**
-	 * Returns the license that applies to this installable unit.
-	 * @return the license that applies to this installable unit or <code>null</code>
-	 */
-	public ILicense getLicense();
-
-	/**
-	 * Returns the copyright that applies to this installable unit.
-	 * @return the copyright that applies to this installable unit or <code>null</code>
-	 */
-	public ICopyright getCopyright();
-
-	/**
-	 * Returns whether this InstallableUnit is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type IInstallableUnit
-	 *  <li> The result of <b>getId()</b> on both objects are equal
-	 *  <li> The result of <b>getVersion()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object obj);
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java
deleted file mode 100644
index a803f63..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitFragment.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IInstallableUnitFragment extends IInstallableUnit {
-	public IRequiredCapability[] getHost();
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java
deleted file mode 100644
index f67c712..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IInstallableUnitPatch.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-/**
- * An installable unit patch is an installable unit that alters the required capabilities of another
- * installable unit. 
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IInstallableUnitPatch extends IInstallableUnit {
-	/**
-	 * The applicability scope of a patch describes the installable units that this
-	 * patch should be applied to. Specifically, this patch will be applied to all installable
-	 * units that satisfy all of the required capabilities in one or more of the given 
-	 * required capability arrays. 
-	 * <p>
-	 * The returned two-dimensional array can be considered
-	 * as a boolean expression, where items in the inner array are connected by
-	 * AND operators, and each of the arrays are separated by OR operators. For example
-	 * a scope of [[r1, r2, r3], [r4, r5]] will match any unit whose provided capabilities
-	 * satisfy the expression ((r1 ^ r2 ^ r3) | (r4 ^ r5)).
-	 */
-	IRequiredCapability[][] getApplicabilityScope();
-
-	/**
-	 * Returns the requirement changes imposed by the patch.
-	 * @return The patch requirement changes.
-	 */
-	IRequirementChange[] getRequirementsChange();
-
-	/**
-	 * Returns the required capability that defines the lifecycle of this patch. The
-	 * patch will be installed into a profile if and only if the lifecycle capability
-	 * is satisfied by some IU in the profile. If a future provisioning operation causes
-	 * the requirement to no longer be satisfied, the patch will be uninstalled.
-	 */
-	IRequiredCapability getLifeCycle();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java
deleted file mode 100644
index 99916de..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ILicense.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
- *   IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.math.BigInteger;
-import java.net.URI;
-
-/**
- * The <code>ILicense</code> interface represents a software license.  A license has required body text
- * which may be the full text or an annotation.  An optional URL field can be specified
- * which links to full text.  Licenses can be easily compared using their digests.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ILicense {
-
-	/**
-	 * Returns the location of a document containing the full license.
-	 * 
-	 * @return the location of the license document, or <code>null</code>
-	 */
-	public URI getLocation();
-
-	/**
-	 * Returns the license body.
-	 * @return the license body, never <code>null</code>
-	 */
-	public String getBody();
-
-	/**
-	 * Returns the message digest of the license body.  The digest is calculated on a normalized
-	 * version of the license where all whitespace has been reduced to one space.
-	 * 
-	 * Any SPI must maintain the same semantics as:
-	 * <code>{@link org.eclipse.equinox.internal.provisional.p2.metadata.ILicense#getDigest()}</code>
-	 * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
-	 */
-	public BigInteger getDigest();
-
-	/**
-	 * Returns whether this license is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type ILicense
-	 *  <li> The result of <b>getDigest()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object obj);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
deleted file mode 100644
index bc43a9b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IProvidedCapability.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
- *   IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IProvidedCapability {
-
-	public String getName();
-
-	public String getNamespace();
-
-	public Version getVersion();
-
-	/**
-	 * Returns whether this provided capability satisfies the given required capability.
-	 * @return <code>true</code> if this capability satisfies the given required
-	 * capability, and <code>false</code> otherwise.
-	 * 
-	 * This method must maintain the following semantics:
-	 * <ul>
-	 *  <li> If the provided capability and the candidate have different names, 
-	 *       return false
-	 *  <li> If the provided capability and the candidate have different namespaces.
-	 *       return false
-	 *  <li> If the candidate's version range includes the provided capability's
-	 *       version, return true
-	 *  <li> otherwise, return false    
-	 * </ul>
-	 * 
-	 */
-	public boolean satisfies(IRequiredCapability candidate);
-
-	/**
-	 * Returns whether this provided capability is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type IProvidedCapability
-	 *  <li> The result of <b>getName()</b> on both objects are equal
-	 *  <li> The result of <b>getNamespace()</b> on both objects are equal
-	 *  <li> The result of <b>getVersion()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object other);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java
deleted file mode 100644
index 3c38a0b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequiredCapability.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * A required capability represents some external constraint on an {@link IInstallableUnit}.
- * Each capability represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- * <p>
- * Capabilities are segmented into namespaces.  Anyone can introduce new 
- * capability namespaces. Some well-known namespaces are introduced directly
- * by the provisioning framework.
- * 
- * @see IInstallableUnit#NAMESPACE_IU_ID
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRequiredCapability {
-
-	public String getFilter();
-
-	public String getName();
-
-	public String getNamespace();
-
-	/**
-	 * Returns the range of versions that satisfy this required capability. Returns
-	 * an empty version range ({@link VersionRange#emptyRange} if any version
-	 * will satisfy the capability.
-	 * @return the range of versions that satisfy this required capability.
-	 */
-	public VersionRange getRange();
-
-	/**
-	 * Returns the properties to use for evaluating required capability filters 
-	 * downstream from this capability. For example, if the selector "doc"
-	 * is provided, then a downstream InstallableUnit with a required capability
-	 * filtered with "doc=true" will be included.
-	 */
-	public String[] getSelectors();
-
-	public boolean isMultiple();
-
-	public boolean isOptional();
-
-	/**
-	 * TODO This object shouldn't be mutable since it makes equality unstable, and
-	 * introduces lifecycle issues (how are the changes persisted, etc)
-	 */
-	public void setFilter(String filter);
-
-	/**
-	 * TODO This object shouldn't be mutable since it makes equality unstable, and
-	 * introduces lifecycle issues (how are the changes persisted, etc)
-	 */
-	public void setSelectors(String[] selectors);
-
-	public boolean isGreedy();
-
-	/**
-	 * Returns whether this required capability is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type IRequiredCapability
-	 *  <li> The result of <b>getFilter()</b> on both objects are equal
-	 *  <li> The result of <b>isMultiple()</b> on both objects are equal
-	 *  <li> The result of <b>getName()</b> on both objects are equal
-	 *  <li> The result of <b>geNamespace()</b> on both objects are equal
-	 *  <li> The result of <b>isOptional()</b> on both objects are equal
-	 *  <li> The result of <b>getRange()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object other);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java
deleted file mode 100644
index 59578f7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IRequirementChange.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRequirementChange {
-
-	public IRequiredCapability applyOn();
-
-	public IRequiredCapability newValue();
-
-	public boolean matches(IRequiredCapability toMatch);
-
-	/**
-	 * Returns whether this requirement change is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type IRequiredCapability
-	 *  <li> The result of <b>applyOn()</b> on both objects are equal
-	 *  <li> The result of <b>newValue()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object other);
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java
deleted file mode 100644
index c1ea83b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointData.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.util.Map;
-
-/**
- * ITouchpoint data instances contain the additional information needed by a touchpoint
- * to execute each engine phase it participates in. This includes the sequence of
- * instruction statements to be executed during each phase, and any additional
- * supporting data needed to perform the phase.
- *
- * @see MetadataFactory#createTouchpointData(Map)
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITouchpointData {
-
-	/**
-	 * Returns the touchpoint instruction corresponding to the given key.
-	 */
-	public ITouchpointInstruction getInstruction(String instructionKey);
-
-	/**
-	 * Returns an unmodifiable map of the touchpoint instructions. The map
-	 * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
-	 *
-	 * @return the touchpoint instructions
-	 */
-	public Map getInstructions();
-
-	/**
-	 * Returns whether this TouchpointData is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type ITouchpointData
-	 *  <li> The result of <b>getInstructions()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object obj);
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java
deleted file mode 100644
index e2322f5..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointInstruction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-/**
- * A touchpoint instruction contains either a sequence of instruction statements
- * to be executed during a particular engine phase, or some simple string value
- * that is needed by a touchpoint to execute its phases.
- * <p>
- * The format of a touchpoint instruction statement sequence is as follows:
- * 
- *   statement-sequence :
- *     | statement ';'
- *      | statement-sequence statement
- *      ;
- *
- *Where a statement is of the format:
- *
- *  statement :
- *      | actionName '(' parameters ')'
- *      ;
- *
- *  parameters :
- *      | // empty
- *      | parameter
- *      | parameters ',' parameter
- *      ;
- *
- *   parameter : 
- *      | paramName ':' paramValue
- *      ;
- *
- * actionName, paramName, paramValue :
- *      | String 
- *      ;
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITouchpointInstruction {
-
-	/**
-	 * Returns the body of this touchpoint instruction. The body is either a sequence
-	 * of instruction statements, or a simple string value.
-	 * 
-	 * @return The body of this touchpoint instruction
-	 */
-	public String getBody();
-
-	//TODO What is this? Please doc
-	public String getImportAttribute();
-
-	/**
-	 * Returns whether this TouchpointInstruction is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type ITouchpointInstruction
-	 *  <li> The result of <b>getBody()</b> on both objects are equal
-	 *  <li> The result of <b>getImportAttribute()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object obj);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java
deleted file mode 100644
index db36a94..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/ITouchpointType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-
-/**
- * Identifies a particular touchpoint. A touchpoint is identified by an id 
- * and a version.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITouchpointType {
-
-	/**
-	 * A touchpoint type indicating an undefined touchpoint type. Identity (==)
-	 * must be used to test for the <code>NONE</code> type.
-	 */
-	public static final ITouchpointType NONE = new ITouchpointType() {
-
-		public String getId() {
-			return "null"; //$NON-NLS-1$
-		}
-
-		public Version getVersion() {
-			return Version.emptyVersion;
-		}
-	};
-
-	public String getId();
-
-	public Version getVersion();
-
-	/**
-	 * Returns whether this TouchpointInstruction is equal to the given object.
-	 * 
-	 * This method returns <i>true</i> if:
-	 * <ul>
-	 *  <li> Both this object and the given object are of type ITouchpointType
-	 *  <li> The result of <b>getId()</b> on both objects are equal
-	 *  <li> The result of <b>getVersion()</b> on both objects are equal
-	 * </ul> 
-	 */
-	public boolean equals(Object obj);
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java
deleted file mode 100644
index 73c0f3b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/IUpdateDescriptor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IUpdateDescriptor {
-	public final int NORMAL = 0;
-	public final int HIGH = 1;
-
-	/**
-	 * The identifier of an installable unit that the installable unit containing this object is an update for.
-	 * @return An installable unit id
-	 */
-	public String getId();
-
-	/**
-	 * The range of the installable unit that the installable unit containing this object is an update for.
-	 * @return A version range
-	 */
-	public VersionRange getRange();
-
-	/**
-	 * The description of the update. This allows to explain what the update is about.
-	 * @return A description
-	 */
-	public String getDescription();
-
-	/**
-	 * The importance of the update descriptor represented as a int.
-	 * @return The severity.
-	 */
-	public int getSeverity();
-
-	/**
-	 * Helper method indicating whether or not an installable unit is an update for the installable unit passed  
-	 * @param iu the installable unit checked
-	 * @return A boolean indicating whether or not an installable unit is an update.
-	 */
-	public boolean isUpdateOf(IInstallableUnit iu);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java
deleted file mode 100644
index 67eaded..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/MetadataFactory.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Genuitec, LLC
- *		EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata;
-
-import java.net.URI;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-/**
- * A factory class for instantiating various p2 metadata objects.
- */
-public class MetadataFactory {
-	/**
-	 * A description containing information about an installable unit. Once created,
-	 * installable units are immutable. This description class allows a client to build
-	 * up the state for an installable unit incrementally, and then finally product
-	 * the resulting immutable unit.
-	 */
-	public static class InstallableUnitDescription {
-		protected InstallableUnit unit;
-
-		public InstallableUnitDescription() {
-			super();
-		}
-
-		public void addProvidedCapabilities(Collection additional) {
-			if (additional == null || additional.size() == 0)
-				return;
-			IProvidedCapability[] current = unit().getProvidedCapabilities();
-			IProvidedCapability[] result = new IProvidedCapability[additional.size() + current.length];
-			System.arraycopy(current, 0, result, 0, current.length);
-			int j = current.length;
-			for (Iterator i = additional.iterator(); i.hasNext();)
-				result[j++] = (IProvidedCapability) i.next();
-			unit().setCapabilities(result);
-		}
-
-		public void addRequiredCapabilities(Collection additional) {
-			if (additional == null || additional.size() == 0)
-				return;
-			IRequiredCapability[] current = unit().getRequiredCapabilities();
-			IRequiredCapability[] result = new IRequiredCapability[additional.size() + current.length];
-			System.arraycopy(current, 0, result, 0, current.length);
-			int j = current.length;
-			for (Iterator i = additional.iterator(); i.hasNext();)
-				result[j++] = (IRequiredCapability) i.next();
-			unit().setRequiredCapabilities(result);
-		}
-
-		public void addTouchpointData(ITouchpointData data) {
-			Assert.isNotNull(data);
-			unit().addTouchpointData(data);
-		}
-
-		public String getId() {
-			return unit().getId();
-		}
-
-		public IProvidedCapability[] getProvidedCapabilities() {
-			return unit().getProvidedCapabilities();
-		}
-
-		public IRequiredCapability[] getRequiredCapabilities() {
-			return unit().getRequiredCapabilities();
-		}
-
-		public IRequiredCapability[] getMetaRequiredCapabilities() {
-			return unit().getMetaRequiredCapabilities();
-		}
-
-		/**
-		 * Returns the current touchpoint data on this installable unit description. The
-		 * touchpoint data may change if further data is added to the description.
-		 * 
-		 * @return The current touchpoint data on this description
-		 */
-		public ITouchpointData[] getTouchpointData() {
-			return unit().getTouchpointData();
-
-		}
-
-		public Version getVersion() {
-			return unit().getVersion();
-		}
-
-		public void setArtifacts(IArtifactKey[] value) {
-			unit().setArtifacts(value);
-		}
-
-		public void setCapabilities(IProvidedCapability[] exportedCapabilities) {
-			unit().setCapabilities(exportedCapabilities);
-		}
-
-		public void setCopyright(ICopyright copyright) {
-			unit().setCopyright(copyright);
-		}
-
-		public void setFilter(String filter) {
-			unit().setFilter(filter);
-		}
-
-		public void setId(String id) {
-			unit().setId(id);
-		}
-
-		public void setLicense(ILicense license) {
-			unit().setLicense(license);
-		}
-
-		public void setProperty(String key, String value) {
-			unit().setProperty(key, value);
-		}
-
-		public void setRequiredCapabilities(IRequiredCapability[] requirements) {
-			unit().setRequiredCapabilities(requirements);
-		}
-
-		public void setMetaRequiredCapabilities(IRequiredCapability[] metaRequirements) {
-			unit().setMetaRequiredCapabilities(metaRequirements);
-		}
-
-		public void setSingleton(boolean singleton) {
-			unit().setSingleton(singleton);
-		}
-
-		public void setTouchpointType(ITouchpointType type) {
-			unit().setTouchpointType(type);
-		}
-
-		public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
-			unit().setUpdateDescriptor(updateInfo);
-		}
-
-		public void setVersion(Version newVersion) {
-			unit().setVersion(newVersion);
-		}
-
-		InstallableUnit unit() {
-			if (unit == null) {
-				unit = new InstallableUnit();
-				unit.setArtifacts(new IArtifactKey[0]);
-			}
-			return unit;
-		}
-
-		IInstallableUnit unitCreate() {
-			IInstallableUnit result = unit();
-			this.unit = null;
-			return result;
-		}
-	}
-
-	/**
-	 * Description of an installable unit patch. The description will automatically have
-	 * the {@link IInstallableUnit#PROP_TYPE_FRAGMENT} set to <code>true</code>.
-	 */
-	public static class InstallableUnitFragmentDescription extends InstallableUnitDescription {
-		public InstallableUnitFragmentDescription() {
-			super();
-			setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		}
-
-		public void setHost(IRequiredCapability[] hostRequirements) {
-			((InstallableUnitFragment) unit()).setHost(hostRequirements);
-		}
-
-		InstallableUnit unit() {
-			if (unit == null)
-				unit = new InstallableUnitFragment();
-			return unit;
-		}
-	}
-
-	/**
-	 * Description of an installable unit patch. The description will automatically have
-	 * the {@link IInstallableUnit#PROP_TYPE_PATCH} set to <code>true</code>.
-	 */
-	public static class InstallableUnitPatchDescription extends InstallableUnitDescription {
-
-		public InstallableUnitPatchDescription() {
-			super();
-			setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString());
-		}
-
-		public void setApplicabilityScope(IRequiredCapability[][] applyTo) {
-			if (applyTo == null)
-				throw new IllegalArgumentException("A patch scope can not be null"); //$NON-NLS-1$
-			((InstallableUnitPatch) unit()).setApplicabilityScope(applyTo);
-		}
-
-		public void setLifeCycle(IRequiredCapability lifeCycle) {
-			((InstallableUnitPatch) unit()).setLifeCycle(lifeCycle);
-		}
-
-		public void setRequirementChanges(IRequirementChange[] changes) {
-			((InstallableUnitPatch) unit()).setRequirementsChange(changes);
-		}
-
-		InstallableUnit unit() {
-			if (unit == null) {
-				unit = new InstallableUnitPatch();
-				((InstallableUnitPatch) unit()).setApplicabilityScope(new IRequiredCapability[0][0]);
-			}
-			return unit;
-		}
-	}
-
-	/**
-	 * Singleton touchpoint data for a touchpoint with no instructions.
-	 */
-	private static final ITouchpointData EMPTY_TOUCHPOINT_DATA = new TouchpointData(Collections.EMPTY_MAP);
-
-	private static ITouchpointType[] typeCache = new ITouchpointType[5];
-
-	private static int typeCacheOffset;
-
-	/**
-	 * Returns an {@link IInstallableUnit} based on the given 
-	 * description.  Once the installable unit has been created, the information is 
-	 * discarded from the description object.
-	 * 
-	 * @param description The description of the unit to create
-	 * @return The created installable unit
-	 */
-	public static IInstallableUnit createInstallableUnit(InstallableUnitDescription description) {
-		Assert.isNotNull(description);
-		return description.unitCreate();
-	}
-
-	/**
-	 * Returns an {@link IInstallableUnitFragment} based on the given 
-	 * description.  Once the fragment has been created, the information is 
-	 * discarded from the description object.
-	 * 
-	 * @param description The description of the unit to create
-	 * @return The created installable unit fragment
-	 */
-	public static IInstallableUnitFragment createInstallableUnitFragment(InstallableUnitFragmentDescription description) {
-		Assert.isNotNull(description);
-		return (IInstallableUnitFragment) description.unitCreate();
-	}
-
-	/**
-	 * Returns an {@link IInstallableUnitPatch} based on the given 
-	 * description.  Once the patch installable unit has been created, the information is 
-	 * discarded from the description object.
-	 * 
-	 * @param description The description of the unit to create
-	 * @return The created installable unit patch
-	 */
-	public static IInstallableUnitPatch createInstallableUnitPatch(InstallableUnitPatchDescription description) {
-		Assert.isNotNull(description);
-		return (IInstallableUnitPatch) description.unitCreate();
-	}
-
-	/**
-	 * Returns a {@link IProvidedCapability} with the given values.
-	 * 
-	 * @param namespace The capability namespace
-	 * @param name The capability name
-	 * @param version The capability version
-	 */
-	public static IProvidedCapability createProvidedCapability(String namespace, String name, Version version) {
-		return new ProvidedCapability(namespace, name, version);
-	}
-
-	/**
-	 * Returns a {@link IRequiredCapability} with the given values.
-	 * 
-	 * @param namespace The capability namespace
-	 * @param name The required capability name
-	 * @param range The range of versions that are required, or <code>null</code>
-	 * to indicate that any version will do.
-	 * @param filter The filter used to evaluate whether this capability is applicable in the
-	 * current environment, or <code>null</code> to indicate this capability is always applicable
-	 * @param optional <code>true</code> if this required capability is optional,
-	 * and <code>false</code> otherwise.
-	 * @param multiple <code>true</code> if this capability can be satisfied by multiple provided capabilities, or it requires exactly one match
-	 */
-	public static IRequiredCapability createRequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
-		return new RequiredCapability(namespace, name, range, filter, optional, multiple);
-	}
-
-	public static IRequiredCapability createRequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
-		return new RequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
-	}
-
-	/**
-	 * Returns a new requirement change.
-	 * @param applyOn The source of the requirement change - the kind of requirement to apply the change to
-	 * @param newValue The result of the requirement change - the requirement to replace the source requirement with
-	 * @return a requirement change
-	 */
-	public static IRequirementChange createRequirementChange(IRequiredCapability applyOn, IRequiredCapability newValue) {
-		return new RequirementChange(applyOn, newValue);
-	}
-
-	/**
-	 * Returns a new {@link ICopyright}.
-	 * @param location the location of a document containing the copyright notice, or <code>null</code>
-	 * @param body the copyright body, cannot be <code>null</code>
-	 * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
-	 */
-	public static ICopyright createCopyright(URI location, String body) {
-		return new Copyright(location, body);
-	}
-
-	/**
-	 * Return a new {@link ILicense}
-	 * The body should contain either the full text of the license or an summary for a license
-	 * fully specified in the given location.
-	 * 
-	 * @param location the location of a document containing the full license, or <code>null</code>
-	 * @param body the license body, cannot be <code>null</code>
-	 * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
-	 */
-	public static ILicense createLicense(URI location, String body) {
-		return new License(location, body);
-	}
-
-	/**
-	 * Returns an {@link IInstallableUnit} that represents the given
-	 * unit bound to the given fragments.
-	 * 
-	 * @see IInstallableUnit#isResolved()
-	 * @param unit The unit to be bound
-	 * @param fragments The fragments to be bound
-	 * @return A resolved installable unit
-	 */
-	public static IInstallableUnit createResolvedInstallableUnit(IInstallableUnit unit, IInstallableUnitFragment[] fragments) {
-		if (unit.isResolved())
-			return unit;
-		Assert.isNotNull(unit);
-		Assert.isNotNull(fragments);
-		return new ResolvedInstallableUnit(unit, fragments);
-
-	}
-
-	/**
-	 * Returns an instance of {@link ITouchpointData} with the given instructions.
-	 * 
-	 * @param instructions The instructions for the touchpoint data.
-	 * @return The created touchpoint data
-	 */
-	public static ITouchpointData createTouchpointData(Map instructions) {
-		Assert.isNotNull(instructions);
-		//copy the map to protect against subsequent change by caller
-		if (instructions.isEmpty())
-			return EMPTY_TOUCHPOINT_DATA;
-
-		Map result = new LinkedHashMap(instructions.size());
-		for (Iterator iterator = instructions.entrySet().iterator(); iterator.hasNext();) {
-			Entry entry = (Entry) iterator.next();
-			Object value = entry.getValue();
-			if (value == null || value instanceof String)
-				value = createTouchpointInstruction((String) value, null);
-
-			result.put(entry.getKey(), value);
-		}
-		return new TouchpointData(result);
-	}
-
-	public static ITouchpointInstruction createTouchpointInstruction(String body, String importAttribute) {
-		return new TouchpointInstruction(body, importAttribute);
-	}
-
-	/**
-	 * Returns a {@link TouchpointType} with the given id and version.
-	 * 
-	 * @param id The touchpoint id
-	 * @param version The touchpoint version
-	 * @return A touchpoint type instance with the given id and version
-	 */
-	public static ITouchpointType createTouchpointType(String id, Version version) {
-		Assert.isNotNull(id);
-		Assert.isNotNull(version);
-
-		if (id.equals(ITouchpointType.NONE.getId()) && version.equals(ITouchpointType.NONE.getVersion()))
-			return ITouchpointType.NONE;
-
-		synchronized (typeCache) {
-			ITouchpointType result = getCachedTouchpointType(id, version);
-			if (result != null)
-				return result;
-			result = new TouchpointType(id, version);
-			putCachedTouchpointType(result);
-			return result;
-		}
-	}
-
-	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
-		return new UpdateDescriptor(id, range, severity, description);
-	}
-
-	private static ITouchpointType getCachedTouchpointType(String id, Version version) {
-		for (int i = 0; i < typeCache.length; i++) {
-			if (typeCache[i] != null && typeCache[i].getId().equals(id) && typeCache[i].getVersion().equals(version))
-				return typeCache[i];
-		}
-		return null;
-	}
-
-	private static void putCachedTouchpointType(ITouchpointType result) {
-		//simple rotating buffer
-		typeCache[typeCacheOffset] = result;
-		typeCacheOffset = (typeCacheOffset + 1) % typeCache.length;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java
deleted file mode 100644
index 8a7bf23..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/CapabilityQuery.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that searches for {@link IInstallableUnit} instances that provide
- * capabilities that match one or more required capabilities.
- */
-public class CapabilityQuery extends MatchQuery {
-	private IRequiredCapability[] required;
-
-	/**
-	 * Creates a new query on the given required capability.
-	 * @param required The required capability
-	 */
-	public CapabilityQuery(IRequiredCapability required) {
-		this.required = new IRequiredCapability[] {required};
-	}
-
-	/**
-	 * Creates a new query on the given required capabilities. The installable
-	 * unit must provide capabilities that match all of the given required capabilities
-	 * for this query to be satisfied.
-	 * @param required The required capabilities
-	 */
-	public CapabilityQuery(IRequiredCapability[] required) {
-		this.required = required;
-	}
-
-	/**
-	 * Returns the required capability that this query is matching against.
-	 * @return the required capability that this query is matching against.
-	 */
-	public IRequiredCapability[] getRequiredCapabilities() {
-		return required;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		for (int i = 0; i < required.length; i++)
-			if (!candidate.satisfies(required[i]))
-				return false;
-		return true;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java
deleted file mode 100644
index aff9037..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/IUPropertyQuery.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that searches for {@link IInstallableUnit} instances that have
- * a property whose value matches the provided value.  If no property name is 
- * specified, then all {@link IInstallableUnit} instances are accepted.
- */
-public class IUPropertyQuery extends MatchQuery {
-	private String propertyName;
-	private String propertyValue;
-
-	/**
-	 * Creates a new query on the given property name and value.
-	 */
-	public IUPropertyQuery(String propertyName, String propertyValue) {
-		this.propertyName = propertyName;
-		this.propertyValue = propertyValue;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		if (propertyName == null)
-			return true;
-		String value = getProperty(candidate, propertyName);
-		if (value != null && (value.equals(propertyValue) || propertyValue == null))
-			return true;
-		return false;
-	}
-
-	protected String getProperty(IInstallableUnit iu, String name) {
-		return iu.getProperty(name);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java
deleted file mode 100644
index 92cfe76..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/InstallableUnitQuery.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that matches on the id and version of an {@link IInstallableUnit}.
- */
-public class InstallableUnitQuery extends MatchQuery {
-	/**
-	 * A convenience query that will match any {@link IInstallableUnit}
-	 * it encounters.
-	 */
-	public static final InstallableUnitQuery ANY = new InstallableUnitQuery(null);
-
-	private String id;
-	private final VersionRange range;
-
-	/**
-	 * Creates a query that will match any {@link IInstallableUnit} with the given
-	 * id, regardless of version.
-	 * 
-	 * @param id The installable unit id to match, or <code>null</code> to match any id
-	 */
-	public InstallableUnitQuery(String id) {
-		this.id = id;
-		this.range = null;
-	}
-
-	/**
-	 * Creates a query that will match any {@link IInstallableUnit} with the given
-	 * id, and whose version falls in the provided range.
-	 * 
-	 * @param id The installable unit id to match, or <code>null</code> to match any id
-	 * @param range The version range to match
-	 */
-	public InstallableUnitQuery(String id, VersionRange range) {
-		this.id = id;
-		this.range = range;
-	}
-
-	/**
-	 * Creates a query that will match any {@link IInstallableUnit} with the given
-	 * id and version.
-	 * 
-	 * @param id The installable unit id to match, or <code>null</code> to match any id
-	 * @param version The precise version that a matching unit must have
-	 */
-	public InstallableUnitQuery(String id, Version version) {
-		this.id = id;
-		this.range = new VersionRange(version, true, version, true);
-	}
-
-	/**
-	 * Returns the id that this query will match against.
-	 * @return The installable unit it
-	 */
-	public String getId() {
-		return id;
-	}
-
-	/**
-	 * Returns the version range that this query will match against.
-	 * @return The installable unit version range.
-	 */
-	public VersionRange getRange() {
-		return range;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		if (id != null && !id.equals(candidate.getId()))
-			return false;
-		if (range != null && !range.isIncluded(candidate.getVersion()))
-			return false;
-		return true;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java
deleted file mode 100644
index c591a25..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/LatestIUVersionQuery.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.ContextQuery;
-
-/**
- * This query returns the latest version for each unique IU Id.  
- * All other elements are discarded.
- */
-public class LatestIUVersionQuery extends ContextQuery {
-
-	/**
-	 * Performs the LatestIUVersionQuery
-	 */
-	public Collector perform(Iterator iterator, Collector result) {
-		HashMap greatestIUVersion = new HashMap();
-		while (iterator.hasNext()) {
-			Object next = iterator.next();
-
-			if (!(next instanceof IInstallableUnit))
-				// Don't accept things if they are not IUs
-				continue;
-			IInstallableUnit iu = (IInstallableUnit) next;
-			if (greatestIUVersion.containsKey(iu.getId())) {
-				IInstallableUnit currentIU = (IInstallableUnit) greatestIUVersion.get(iu.getId());
-				if (currentIU.getVersion().compareTo(iu.getVersion()) < 0)
-					greatestIUVersion.put(iu.getId(), iu);
-			} else
-				greatestIUVersion.put(iu.getId(), iu);
-		}
-
-		Collection values = greatestIUVersion.values();
-		Iterator valuesIterator = values.iterator();
-		boolean continueGather = true;
-
-		while (valuesIterator.hasNext() && continueGather) {
-			IInstallableUnit nextIU = (IInstallableUnit) valuesIterator.next();
-			continueGather = result.accept(nextIU);
-		}
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java
deleted file mode 100644
index 243e03a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/provisional/p2/metadata/query/UpdateQuery.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-public class UpdateQuery extends MatchQuery {
-	private IInstallableUnit updateFrom;
-
-	public UpdateQuery(IInstallableUnit updateFrom) {
-		this.updateFrom = updateFrom;
-	}
-
-	public boolean isMatch(Object candidate) {
-		if (candidate instanceof IInstallableUnitPatch && !(updateFrom instanceof IInstallableUnitPatch)) {
-			IInstallableUnitPatch potentialPatch = (IInstallableUnitPatch) candidate;
-			IRequiredCapability lifeCycle = potentialPatch.getLifeCycle();
-			if (lifeCycle == null)
-				return false;
-			return updateFrom.satisfies(lifeCycle);
-		}
-		IInstallableUnit candidateIU = (IInstallableUnit) candidate;
-		IUpdateDescriptor descriptor = candidateIU.getUpdateDescriptor();
-		if (descriptor != null && descriptor.isUpdateOf(updateFrom)) {
-			if (!updateFrom.getId().equals(candidateIU.getId()))
-				return true;
-			return updateFrom.getVersion().compareTo(candidateIU.getVersion()) < 0;
-		}
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
new file mode 100644
index 0000000..fdcba7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+
+/**
+ * Provide standardised artifact information to uniquely identify the 
+ * corresponding bytes (perhaps not stored as a file). 
+ * <p>
+ * Artifact keys represent both a unique opaque identifier as well as structured 
+ * and standardised pieces of information.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IArtifactKey extends IVersionedId {
+
+	/**
+	 * Returns the classifier for this artifact key. The returned value can be empty.
+	 * @return the classifier segment of the key.
+	 */
+	public String getClassifier();
+
+	/**
+	 * Returns the id for this artifact key.
+	 * @return the id segment of the key.
+	 */
+	public String getId();
+
+	/**
+	 * Returns the version for this artifact key. 
+	 * @return the version segment of the key.
+	 */
+	public Version getVersion();
+
+	/**
+	 * Returns the canonical string form of this artifact key.
+	 * @return the canonical string representing this key
+	 */
+	public String toExternalForm();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
new file mode 100644
index 0000000..d8ad2bd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
@@ -0,0 +1,39 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.net.URI;
+
+/**
+ * The <code>ICopyright</code> interface represents a software copyright.  A copyright has 
+ * required body text which may be the full text or a summary.  An optional location field can be specified
+ * which links to full text.  
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface ICopyright {
+
+	/**
+	 * Returns the location of a document containing the copyright notice.
+	 * 
+	 * @return The location of the copyright notice, or <code>null</code>
+	 */
+	public URI getLocation();
+
+	/**
+	 * Returns the license body.
+	 * 
+	 * @return the license body, never <code>null</code>
+	 */
+	public String getBody();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
new file mode 100644
index 0000000..fecc130
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: 
+ * 		IBM Corporation - initial API and implementation
+ * 		Genuitec, LLC - added license support
+ * 		EclipseSource - ongoing development
+ ******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.util.Collection;
+import java.util.Map;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+
+/**
+ * An installable unit represents an atomic, indivisible unit of installable functionality
+ * in a provisioned system. Everything that can be installed or uninstalled in a system, 
+ * including both concrete artifacts and instructions describing steps to be performed
+ * during install, must be expressed as one or more installable units. Thus the set of
+ * installable units present in a system, together with the existing environment 
+ * (operating system, etc), completely describes the initial installed state of that system.
+ * <p>
+ * Installable units may have dependencies on functionality provided by other installable
+ * units, such that the unit cannot be installed unless some other installable unit
+ * is present in the installed system that provides a matching capability. Such 
+ * dependencies are referred to as <i>required capabilities</i>. Conversely,
+ * installable units may declared <i>provided capabilities</i>, describing the
+ * capabilities that they make available to other units in the system. Note the
+ * weak coupling at work here: installable units never directly depend on each other,
+ * but instead depend on abstract capabilities that any other installable unit may provide.
+ * </p>
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IInstallableUnit extends IVersionedId, Comparable<IInstallableUnit> {
+
+	/**
+	 * A capability namespace representing a particular InstallableUnit by id.
+	 * Each InstallableUnit automatically provides a capability in this namespace representing
+	 * itself, and other InstallableUnits can require such a capability to state that they
+	 * require a particular InstallableUnit to be present.
+	 * 
+	 * @see IInstallableUnit#getId()
+	 */
+	public static final String NAMESPACE_IU_ID = "org.eclipse.equinox.p2.iu"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.partial.iu"</code>) for a 
+	 * boolean property indicating the IU is generated from incomplete information and
+	 * should be replaced by the complete IU if available.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_PARTIAL_IU = "org.eclipse.equinox.p2.partial.iu"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.contact"</code>) for a 
+	 * String property containing a contact address where problems can be reported, 
+	 * such as an email address.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_CONTACT = "org.eclipse.equinox.p2.contact"; //$NON-NLS-1$
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.description"</code>) for a 
+	 * String property containing a human-readable description of the installable unit.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.description.url"</code>) for a 
+	 * String property containing a URL to the description of the installable unit.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_DESCRIPTION_URL = "org.eclipse.equinox.p2.description.url"; //$NON-NLS-1$
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.doc.url"</code>) for a 
+	 * String property containing a URL for documentation about the installable unit.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_DOC_URL = "org.eclipse.equinox.p2.doc.url"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.bundle.localization"</code>) for a String
+	 * property containing the bundle localization property file name
+	 */
+	public static final String PROP_BUNDLE_LOCALIZATION = "org.eclipse.equinox.p2.bundle.localization"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.name"</code>) for a 
+	 * String property containing a human-readable name for the installable unit.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.provider"</code>) for a 
+	 * String property containing information about the vendor or provider of the 
+	 * installable unit.
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_PROVIDER = "org.eclipse.equinox.p2.provider"; //$NON-NLS-1$
+
+	/**
+	 * A property key (value <code>"org.eclipse.equinox.p2.icon"</code>) for a String
+	 * property containing a URI for an icon that should be shown when displaying this 
+	 * installable unit in a user interface.  
+	 * 
+	 * @see #getProperty(String)
+	 */
+	public static final String PROP_ICON = "org.eclipse.equinox.p2.icon"; //$NON-NLS-1$
+
+	/**
+	 * Returns the collection of artifacts associated with this installable unit.
+	 * Installing this unit into a system will cause these artifacts to be fetched from
+	 * a repository and applied to the installed system. Uninstalling this unit
+	 * will cause these artifacts to be removed from the system.
+	 * 
+	 * @return The artifacts associated with this installable unit
+	 */
+	public Collection<IArtifactKey> getArtifacts();
+
+	/**
+	 * Returns the filter on this installable unit. The filter is matched against
+	 * the properties of the environment the unit is installed into. An installable
+	 * unit will not be installed if it has a filter condition that is not satisfied by the 
+	 * properties of the environment.
+	 * 
+	 * @return The installation filter for this unit, or <code>null</code>
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public IMatchExpression<IInstallableUnit> getFilter();
+
+	/**
+	 * Returns the fragments that have been bound to this installable unit, or
+	 * <code>null</code> if this unit is not resolved.
+	 * 
+	 * @see #isResolved()
+	 * @return The fragments bound to this installable unit, or <code>null</code>
+	 */
+	public Collection<IInstallableUnitFragment> getFragments();
+
+	/**
+	 * Returns an <i>unmodifiable copy</i> of the properties
+	 * associated with the installable unit.
+	 * 
+	 * @return an <i>unmodifiable copy</i> of the properties of this installable unit.
+	 */
+	public Map<String, String> getProperties();
+
+	/**
+	 * Returns the untranslated property of this installable unit associated with the given key. 
+	 * Returns <code>null</code> if no such property is defined.
+	 * <p>
+	 * If the property value has been externalized, this method will return a string containing
+	 * the translation key rather than a human-readable string. For this reason, clients
+	 * wishing to obtain the value for a property that is typically translated should use
+	 * {@link #getProperty(String, String)} instead.
+	 * </p>
+	 * 
+	 * @param key The property key to retrieve a property value for
+	 * @return the property that applies to this installable unit or <code>null</code>
+	 */
+	public String getProperty(String key);
+
+	/**
+	 * Returns the property of this installable unit associated with the given key. 
+	 * Returns <code>null</code> if no such property is defined or no applicable
+	 * translation is available.
+	 * 
+	 * @param key The property key to retrieve a property value for
+	 * @param locale The locale to translate the property for, or null to use the current locale.
+	 * @return the property that applies to this installable unit or <code>null</code>
+	 */
+	public String getProperty(String key, String locale);
+
+	/**
+	 * Returns the collection of capabilities provided by this installable unit. 
+	 * 
+	 * @return The collection of capabilities provided by this installable unit. 
+	 */
+	public Collection<IProvidedCapability> getProvidedCapabilities();
+
+	public Collection<IRequirement> getRequirements();
+
+	public Collection<IRequirement> getMetaRequirements();
+
+	public Collection<ITouchpointData> getTouchpointData();
+
+	public ITouchpointType getTouchpointType();
+
+	/**
+	 * Returns whether this installable unit has been resolved. A resolved
+	 * installable unit represents the union of an installable unit and some
+	 * fragments.
+	 * 
+	 * @see #getFragments()
+	 * @see #unresolved()
+	 * @return <code>true</code> if this installable unit is resolved, and 
+	 * <code>false</code> otherwise.
+	 */
+	public boolean isResolved();
+
+	/**
+	 * Returns whether this installable unit is a singleton. Only one singleton
+	 * installable unit with a given id is allowed to exist in a given installed system.
+	 * Attempting to install multiple versions of a singleton will fail.
+	 * @return <code>true</code> if this unit is a singleton, and <code>false</code> otherwise
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public boolean isSingleton();
+
+	/**
+	 * Returns whether this unit has a provided capability that satisfies the given 
+	 * requirement.
+	 * @return <code>true</code> if this unit satisfies the given requirement, and <code>false</code> otherwise.
+	 */
+	public boolean satisfies(IRequirement candidate);
+
+	/**
+	 * Returns the unresolved equivalent of this installable unit. If this unit is
+	 * already unresolved, this method returns the receiver. Otherwise, this
+	 * method returns an installable unit with the same id and version, but without
+	 * any fragments attached.
+	 * 
+	 * @see #getFragments()
+	 * @see #isResolved()
+	 * @return The unresolved equivalent of this unit
+	 */
+	public IInstallableUnit unresolved();
+
+	/**
+	 * Returns information about what this installable unit is an update of.
+	 * @return The lineage information about the installable unit
+	 */
+	public IUpdateDescriptor getUpdateDescriptor();
+
+	/**
+	 * Returns the untranslated licenses that apply to this installable unit. 
+	 * <p>
+	 * If the license text has been externalized, this method will return strings containing
+	 * the translation keys rather than human-readable strings. For this reason, clients
+	 * wishing to obtain a license for display to an end user should use {@link #getLicenses(String)}
+	 * instead.
+	 * </p>
+	 * @return the licenses that apply to this installable unit
+	 */
+	public Collection<ILicense> getLicenses();
+
+	/**
+	 * Returns the licenses that apply to this installable unit. Any translation of the
+	 * licenses for the given locale will be applied. Returns an empty collection if this
+	 * unit has no licenses, or if the available licenses are externalized and do not
+	 * have translations available for the given locale.
+	 * 
+	 * @param locale The locale to translate the license for, or null to use the current locale.
+	 * @return the translated licenses that apply to this installable unit
+	 */
+	public Collection<ILicense> getLicenses(String locale);
+
+	/**
+	 * Returns the untranslated copyright that applies to this installable unit.
+	 * <p>
+	 * If the copyright text has been externalized, this method will return strings containing
+	 * the translation keys rather than human-readable strings. For this reason, clients
+	 * wishing to obtain a copyright for display to an end user should use {@link #getCopyright(String)}
+	 * instead.
+	 * </p>
+	 * @return the copyright that applies to this installable unit or <code>null</code>
+	 */
+	public ICopyright getCopyright();
+
+	/**
+	 * Returns the copyright that applies to this installable unit. Any translation of the
+	 * copyright for the given locale will be applied. Returns <code>null</code> if this
+	 * unit has no copyright, or if the copyright is externalized and no translations are
+	 * available for the given locale.
+	 * 
+	 * @param locale The locale to translate the copyright for, or null to use the current locale.
+	 * @return the copyright that applies to this installable unit or <code>null</code>
+	 */
+	public ICopyright getCopyright(String locale);
+
+	/**
+	 * Returns whether this InstallableUnit is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type IInstallableUnit
+	 *  <li> The result of <b>getId()</b> on both objects are equal
+	 *  <li> The result of <b>getVersion()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object obj);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
new file mode 100644
index 0000000..1e00481
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.util.Collection;
+
+/**
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IInstallableUnitFragment extends IInstallableUnit {
+	public Collection<IRequirement> getHost();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
new file mode 100644
index 0000000..6f0a029
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.util.List;
+
+/**
+ * An installable unit patch is an installable unit that alters the required capabilities of another
+ * installable unit. 
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IInstallableUnitPatch extends IInstallableUnit {
+	/**
+	 * The applicability scope of a patch describes the installable units that this
+	 * patch should be applied to. Specifically, this patch will be applied to all installable
+	 * units that satisfy all of the required capabilities in one or more of the given 
+	 * required capability arrays. 
+	 * <p>
+	 * The returned two-dimensional array can be considered
+	 * as a boolean expression, where items in the inner array are connected by
+	 * AND operators, and each of the arrays are separated by OR operators. For example
+	 * a scope of [[r1, r2, r3], [r4, r5]] will match any unit whose provided capabilities
+	 * satisfy the expression ((r1 ^ r2 ^ r3) | (r4 ^ r5)).
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	IRequirement[][] getApplicabilityScope();
+
+	/**
+	 * Returns the requirement changes imposed by the patch.
+	 * @return The patch requirement changes.
+	 */
+	List<IRequirementChange> getRequirementsChange();
+
+	/**
+	 * Returns the required capability that defines the lifecycle of this patch. The
+	 * patch will be installed into a profile if and only if the lifecycle capability
+	 * is satisfied by some IU in the profile. If a future provisioning operation causes
+	 * the requirement to no longer be satisfied, the patch will be uninstalled.
+	 */
+	IRequirement getLifeCycle();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
new file mode 100644
index 0000000..5d613ad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
@@ -0,0 +1,58 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+ *   IBM - ongoing development
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.net.URI;
+
+/**
+ * The <code>ILicense</code> interface represents a software license.  A license has required body text
+ * which may be the full text or an annotation.  An optional URL field can be specified
+ * which links to full text.  Licenses can be easily compared using their digests.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface ILicense {
+
+	/**
+	 * Returns the location of a document containing the full license.
+	 * 
+	 * @return the location of the license document, or <code>null</code>
+	 */
+	public URI getLocation();
+
+	/**
+	 * Returns the license body.
+	 * @return the license body, never <code>null</code>
+	 */
+	public String getBody();
+
+	/**
+	 * Returns the message digest of the license body.  The digest is calculated on a normalized
+	 * version of the license where all whitespace has been reduced to one space.
+	 * 
+	 * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
+	 */
+	public String getUUID();
+
+	/**
+	 * Returns whether this license is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type ILicense
+	 *  <li> The result of <b>getDigest()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object obj);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
new file mode 100644
index 0000000..2d7cc12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
@@ -0,0 +1,56 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+ *   IBM - ongoing development
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+/**
+ * Describes a capability as exposed or required by an installable unit
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IProvidedCapability {
+
+	/**
+	 * 
+	 * @return String
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public String getName();
+
+	/**
+	 * 
+	 * @return String
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public String getNamespace();
+
+	/**
+	 * 
+	 * @return String
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public Version getVersion();
+
+	/**
+	 * Returns whether this provided capability is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type IProvidedCapability
+	 *  <li> The result of <b>getName()</b> on both objects are equal
+	 *  <li> The result of <b>getNamespace()</b> on both objects are equal
+	 *  <li> The result of <b>getVersion()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object other);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
new file mode 100644
index 0000000..5338d47
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
@@ -0,0 +1,84 @@
+/******************************************************************************* 
+* Copyright (c) 2009, 2010 IBM and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+
+/**
+ * A requirement represents some external constraint on an {@link IInstallableUnit}.
+ * Each requirement represents something an {@link IInstallableUnit} needs that
+ * it expects to be provided by another {@link IInstallableUnit}. Requirements are
+ * entirely generic, and are intended to be capable of representing anything that
+ * an {@link IInstallableUnit} may need either at install time, or at runtime.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IRequirement {
+
+	/**
+	 * Returns the minimum cardinality of the requirement. That is, the minimum
+	 * number of capabilities that must be provided that match this requirement before
+	 * this requirement is considered fully satisfied.  A minimum cardinality of 0 indicates 
+	 * that the requirement is optional.
+	 * 
+	 * @return the minimum cardinality of this requirement
+	 */
+	int getMin();
+
+	/**
+	 * Returns the maximum cardinality of the requirement. That is, the maximum
+	 * number of capabilities that are permitted to be present that satisfy this requirement.
+	 * A maximum cardinality of 0 indicates that there must <em>not</em> be
+	 * any installable unit in the system that satisfies this requirement.
+	 * 
+	 * @return the maximum cardinality of this requirement
+	 */
+	int getMax();
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	IMatchExpression<IInstallableUnit> getFilter();
+
+	/**
+	 * Returns a boolean match expression that will return true for any
+	 * {@link IInstallableUnit} that matches the requirement.
+	 * @return A boolean match expression for installable unit matching.
+	 */
+	IMatchExpression<IInstallableUnit> getMatches();
+
+	/**
+	 * Returns whether the provided capabilities of the given installable unit satisfy
+	 * this requirement.
+	 * 
+	 * @param iu the installable unit to check for matching capabilities
+	 * @return <code>true</code> if the given installable unit satisfies this
+	 * requirement, and <code>false</code> otherwise.
+	 */
+	boolean isMatch(IInstallableUnit iu);
+
+	/**
+	 * Returns whether this requirement should cause extra installable units
+	 * to be installed in order to satisfy it. 
+	 * @return <code>true</code> if additional installable units should be installed
+	 * to satisfy this requirement, and <code>false</code> otherwise
+	 */
+	boolean isGreedy();
+
+	/**
+	 * Returns a textual description of this requirement.
+	 * 
+	 * @return a textual description of this requirement
+	 */
+	String getDescription();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
new file mode 100644
index 0000000..27d89bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
@@ -0,0 +1,53 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+
+/**
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IRequirementChange {
+
+	/**
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public IRequiredCapability applyOn();
+
+	/**
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+
+	public IRequiredCapability newValue();
+
+	/**
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+
+	public boolean matches(IRequiredCapability toMatch);
+
+	/**
+	 * Returns whether this requirement change is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type IRequiredCapability
+	 *  <li> The result of <b>applyOn()</b> on both objects are equal
+	 *  <li> The result of <b>newValue()</b> on both objects are equal
+	 * </ul> 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public boolean equals(Object other);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
new file mode 100644
index 0000000..89530b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
@@ -0,0 +1,51 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.util.Map;
+
+/**
+ * ITouchpoint data instances contain the additional information needed by a touchpoint
+ * to execute each engine phase it participates in. This includes the sequence of
+ * instruction statements to be executed during each phase, and any additional
+ * supporting data needed to perform the phase.
+ *
+ * @see MetadataFactory#createTouchpointData(Map)
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface ITouchpointData {
+
+	/**
+	 * Returns the touchpoint instruction corresponding to the given key.
+	 */
+	public ITouchpointInstruction getInstruction(String instructionKey);
+
+	/**
+	 * Returns an unmodifiable map of the touchpoint instructions. The map
+	 * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
+	 *
+	 * @return the touchpoint instructions
+	 */
+	public Map<String, ITouchpointInstruction> getInstructions();
+
+	/**
+	 * Returns whether this TouchpointData is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type ITouchpointData
+	 *  <li> The result of <b>getInstructions()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object obj);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
new file mode 100644
index 0000000..e7c9b49
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
@@ -0,0 +1,73 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+/**
+ * A touchpoint instruction contains either a sequence of instruction statements
+ * to be executed during a particular engine phase, or some simple string value
+ * that is needed by a touchpoint to execute its phases.
+ * <p>
+ * The format of a touchpoint instruction statement sequence is as follows:
+ * 
+ *   statement-sequence :
+ *     | statement ';'
+ *      | statement-sequence statement
+ *      ;
+ *
+ *Where a statement is of the format:
+ *
+ *  statement :
+ *      | actionName '(' parameters ')'
+ *      ;
+ *
+ *  parameters :
+ *      | // empty
+ *      | parameter
+ *      | parameters ',' parameter
+ *      ;
+ *
+ *   parameter : 
+ *      | paramName ':' paramValue
+ *      ;
+ *
+ * actionName, paramName, paramValue :
+ *      | String 
+ *      ;
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface ITouchpointInstruction {
+
+	/**
+	 * Returns the body of this touchpoint instruction. The body is either a sequence
+	 * of instruction statements, or a simple string value.
+	 * 
+	 * @return The body of this touchpoint instruction
+	 */
+	public String getBody();
+
+	//TODO What is this? Please doc
+	public String getImportAttribute();
+
+	/**
+	 * Returns whether this TouchpointInstruction is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type ITouchpointInstruction
+	 *  <li> The result of <b>getBody()</b> on both objects are equal
+	 *  <li> The result of <b>getImportAttribute()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object obj);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
new file mode 100644
index 0000000..02218f7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
@@ -0,0 +1,54 @@
+/******************************************************************************* 
+* Copyright (c) 2008, 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+
+/**
+ * Identifies a particular touchpoint. A touchpoint is identified by an id 
+ * and a version.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface ITouchpointType {
+
+	/**
+	 * A touchpoint type indicating an undefined touchpoint type. Identity (==)
+	 * must be used to test for the <code>NONE</code> type.
+	 */
+	public static final ITouchpointType NONE = new ITouchpointType() {
+
+		public String getId() {
+			return "null"; //$NON-NLS-1$
+		}
+
+		public Version getVersion() {
+			return Version.emptyVersion;
+		}
+	};
+
+	public String getId();
+
+	public Version getVersion();
+
+	/**
+	 * Returns whether this TouchpointInstruction is equal to the given object.
+	 * 
+	 * This method returns <i>true</i> if:
+	 * <ul>
+	 *  <li> Both this object and the given object are of type ITouchpointType
+	 *  <li> The result of <b>getId()</b> on both objects are equal
+	 *  <li> The result of <b>getVersion()</b> on both objects are equal
+	 * </ul> 
+	 */
+	public boolean equals(Object obj);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
new file mode 100644
index 0000000..0fff4eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.net.URI;
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+
+/**
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IUpdateDescriptor {
+	public final int NORMAL = 0;
+	public final int HIGH = 1;
+
+	Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated();
+
+	/**
+	 * The description of the update. This allows to explain what the update is about.
+	 * @return A description
+	 */
+	public String getDescription();
+
+	/**
+	 * Returns the location of a document containing the description.
+	 * 
+	 * @return the location of the document, or <code>null</code>
+	 */
+	public URI getLocation();
+
+	/**
+	 * The importance of the update descriptor represented as a int.
+	 * @return The severity.
+	 */
+	public int getSeverity();
+
+	/**
+	 * Helper method indicating whether or not an installable unit is an update for the installable unit passed  
+	 * @param iu the installable unit checked
+	 * @return A boolean indicating whether or not an installable unit is an update.
+	 */
+	public boolean isUpdateOf(IInstallableUnit iu);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
new file mode 100644
index 0000000..5946216
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+/**
+ * <p>The IVersionFormat represents the Omni Version Format in compiled form. It
+ * is also a parser for versions of that format.</p>
+ * <p>An instance of IVersionFormat is immutable and thus thread safe. The parser
+ * does not maintain any state.</p>
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IVersionFormat {
+
+	/**
+	 * The string that by default will be interpreted as the logical max string when parsing
+	 * optional elements of type string and a default that is the empty string (i.e. OSGi)
+	 */
+	static final String DEFAULT_MAX_STRING_TRANSLATION = "zzz"; //$NON-NLS-1$
+
+	/**
+	 * The string that by default will be interpreted as the logical min string when parsing
+	 * optional elements of type string and a default that is the max string (i.e. Maven triplets)
+	 */
+	static final String DEFAULT_MIN_STRING_TRANSLATION = "-"; //$NON-NLS-1$
+
+	/**
+	 * Appends the string representation of this compiled format to
+	 * the given StringBuffer.
+	 * @param sb The buffer that will receive the string representation
+	 */
+	void toString(StringBuffer sb);
+
+	/**
+	 * Parse the given version string.
+	 * @param version The version string to parse.
+	 * @return A created version.
+	 * @throws IllegalArgumentException If the version string could not be parsed.
+	 */
+	Version parse(String version);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
new file mode 100644
index 0000000..eb8aec3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *     IBM - Ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+
+/**
+ * An interface representing a (id,version) pair. 
+ * @since 2.0
+ */
+public interface IVersionedId {
+	/**
+	 * Returns the id portion of this versioned id.
+	 * 
+	 * @return The id portion of this versioned id.
+	 */
+	String getId();
+
+	/**
+	 * Returns the version portion of this versioned id.
+	 * 
+	 * @return the version portion of this versioned id.
+	 */
+	Version getVersion();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
new file mode 100644
index 0000000..8892a7c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.io.Serializable;
+import java.util.Locale;
+
+/**
+ * A key that can be used to extract a localized property for a specified Locale
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public final class KeyWithLocale implements Serializable {
+	private static final long serialVersionUID = 8818242663547645188L;
+	private final String key;
+	private final Locale locale;
+
+	public KeyWithLocale(String key, Locale locale) {
+		this.key = key;
+		this.locale = locale;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public Locale getLocale() {
+		return locale;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
new file mode 100644
index 0000000..dc43ce8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
@@ -0,0 +1,766 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Genuitec, LLC
+ *		EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * A factory class for instantiating various p2 metadata objects.
+ * @noextend 
+ * @noimplement
+ * @since 2.0
+ */
+public final class MetadataFactory {
+	/**
+	 * A description containing information about an installable unit. Once created,
+	 * installable units are immutable. This description class allows a client to build
+	 * up the state for an installable unit incrementally, and then finally produce
+	 * the resulting immutable unit.
+	 */
+	public static class InstallableUnitDescription {
+		InstallableUnit unit;
+
+		/**
+		 * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a 
+		 * boolean property indicating that an installable unit is a group.
+		 * 
+		 */
+		public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
+
+		/**
+		 * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a 
+		 * boolean property indicating that an installable unit is a patch.
+		 * 
+		 */
+		public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
+
+		/**
+		 * A property key (value <code>"org.eclipse.equinox.p2.type.fragment"</code>) for a 
+		 * boolean property indicating that an installable unit is a fragment.
+		 * 
+		 */
+		public static final String PROP_TYPE_FRAGMENT = "org.eclipse.equinox.p2.type.fragment"; //$NON-NLS-1$
+
+		/**
+		 * A property key (value <code>"org.eclipse.equinox.p2.type.category"</code>) for a 
+		 * boolean property indicating that an installable unit is a category.
+		 * 
+		 */
+		public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
+
+		public InstallableUnitDescription() {
+			super();
+		}
+
+		/**
+		 * Add the specified capabilities to the installable unit.
+		 * @param additional the capabilities to add.
+		 */
+		public void addProvidedCapabilities(Collection<IProvidedCapability> additional) {
+			if (additional == null || additional.size() == 0)
+				return;
+			Collection<IProvidedCapability> current = unit().getProvidedCapabilities();
+			ArrayList<IProvidedCapability> all = new ArrayList<IProvidedCapability>(additional.size() + current.size());
+			all.addAll(current);
+			all.addAll(additional);
+			unit().setCapabilities(all.toArray(new IProvidedCapability[all.size()]));
+		}
+
+		/** @deprecated Use addRequirements(additional) instead */
+		public void addRequiredCapabilities(Collection<IRequirement> additional) {
+			addRequirements(additional);
+		}
+
+		/**
+		 * Add the specified requirements to the installable unit.
+		 * @param additional the requirements to add
+		 */
+		public void addRequirements(Collection<IRequirement> additional) {
+			if (additional == null || additional.size() == 0)
+				return;
+			List<IRequirement> current = unit().getRequirements();
+			ArrayList<IRequirement> all = new ArrayList<IRequirement>(additional.size() + current.size());
+			all.addAll(current);
+			all.addAll(additional);
+			unit().setRequiredCapabilities(all.toArray(new IRequirement[all.size()]));
+		}
+
+		public void addTouchpointData(ITouchpointData data) {
+			Assert.isNotNull(data);
+			unit().addTouchpointData(data);
+		}
+
+		/**
+		 * Returns the id of the installable unit.
+		 */
+		public String getId() {
+			return unit().getId();
+		}
+
+		/**
+		 * Return a collection of all the capabilities specified on this installable unit.
+		 */
+		public Collection<IProvidedCapability> getProvidedCapabilities() {
+			return unit().getProvidedCapabilities();
+		}
+
+		/** @deprecated Use getRequirements() instead */
+		public List<IRequirement> getRequiredCapabilities() {
+			return getRequirements();
+		}
+
+		/**
+		 * Return a collection of the requirements specified on this installable unit.
+		 */
+		public List<IRequirement> getRequirements() {
+			return unit().getRequirements();
+		}
+
+		/** @deprecated Use getMetaRequirements() instead */
+		public Collection<IRequirement> getMetaRequiredCapabilities() {
+			return getMetaRequirements();
+		}
+
+		/**
+		 * Return a collection of the meta requirements specified on this installable unit.
+		 */
+		public Collection<IRequirement> getMetaRequirements() {
+			return unit().getMetaRequirements();
+		}
+
+		/**
+		 * Returns the current touchpoint data on this installable unit description. The
+		 * touchpoint data may change if further data is added to the description.
+		 * 
+		 * @return The current touchpoint data on this description
+		 */
+		public Collection<ITouchpointData> getTouchpointData() {
+			return unit().getTouchpointData();
+
+		}
+
+		/**
+		 * Return the versiono on this installable unit description.
+		 */
+		public Version getVersion() {
+			return unit().getVersion();
+		}
+
+		/**
+		 * Set the artifact keys for the installable unit. Previous values will be overwritten.
+		 * @param value the artifacts to the used.
+		 */
+		public void setArtifacts(IArtifactKey[] value) {
+			unit().setArtifacts(value);
+		}
+
+		/**
+		 * Set the capabilities for the installable unit. Previous values will be overwritten.
+		 * @param exportedCapabilities the capabilities to be used.
+		 */
+		public void setCapabilities(IProvidedCapability[] exportedCapabilities) {
+			unit().setCapabilities(exportedCapabilities);
+		}
+
+		/**
+		 * Set the copyright for the installable unit. Previous values will be overwritten.
+		 * @param copyright the copyright to be used.
+		 */
+		public void setCopyright(ICopyright copyright) {
+			unit().setCopyright(copyright);
+		}
+
+		public void setFilter(IMatchExpression<IInstallableUnit> filter) {
+			unit().setFilter(filter);
+		}
+
+		public void setFilter(String filter) {
+			unit().setFilter(filter);
+		}
+
+		/** 
+		 * Set the id of the installable unit.
+		 */
+		public void setId(String id) {
+			unit().setId(id);
+		}
+
+		/**
+		 * Set the licenses for the installable unit. Previous values will be overwritten.
+		 */
+		public void setLicenses(ILicense[] licenses) {
+			unit().setLicenses(licenses);
+		}
+
+		/**
+		 * Set a property with a specified value for this installable unit.
+		 * @param key key with which the specified value is to be associated
+		 * @param value value to be associated with the specified key
+		 */
+		public void setProperty(String key, String value) {
+			unit().setProperty(key, value);
+		}
+
+		/** @deprecated Use setRequirements(requirements) instead */
+		public void setRequiredCapabilities(IRequirement[] requirements) {
+			setRequirements(requirements);
+		}
+
+		/**
+		 * Set the requirements for the installable unit. Previous values will be overwritten.
+		 * @param requirements the requirements to be used.
+		 */
+		public void setRequirements(IRequirement[] requirements) {
+			unit().setRequiredCapabilities(requirements);
+		}
+
+		/** @deprecated Use setMetaRequirements(requirements) instead */
+		public void setMetaRequiredCapabilities(IRequirement[] metaRequirements) {
+			setMetaRequirements(metaRequirements);
+		}
+
+		/**
+		 * Set the meta requirements for the installable unit. Previous values will be overwritten.
+		 * @param metaRequirements the meta requirements to be used.
+		 */
+		public void setMetaRequirements(IRequirement[] metaRequirements) {
+			unit().setMetaRequiredCapabilities(metaRequirements);
+		}
+
+		/**
+		 * Change the singleton status of the installable unit.
+		 */
+		public void setSingleton(boolean singleton) {
+			unit().setSingleton(singleton);
+		}
+
+		/**
+		 * Set the touchpoint type for the installable unit.
+		 */
+		public void setTouchpointType(ITouchpointType type) {
+			unit().setTouchpointType(type);
+		}
+
+		/**
+		 * Set the update descriptor for the installable unit.
+		 */
+		public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
+			unit().setUpdateDescriptor(updateInfo);
+		}
+
+		/**
+		 * Set the version of this installable unit.
+		 * @param newVersion version to be set on the installable unit.
+		 */
+		public void setVersion(Version newVersion) {
+			unit().setVersion(newVersion);
+		}
+
+		InstallableUnit unit() {
+			if (unit == null) {
+				unit = new InstallableUnit();
+				unit.setArtifacts(new IArtifactKey[0]);
+			}
+			return unit;
+		}
+
+		IInstallableUnit unitCreate() {
+			IInstallableUnit result = unit();
+			this.unit = null;
+			return result;
+		}
+	}
+
+	/**
+	 * A description containing information about an installable unit fragment. Once created,
+	 * installable units are immutable. This description class allows a client to build
+	 * up the state for an installable unit fragment incrementally, and then finally produce
+	 * the resulting immutable unit.
+	 */
+	public static class InstallableUnitFragmentDescription extends InstallableUnitDescription {
+		public InstallableUnitFragmentDescription() {
+			super();
+			setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		}
+
+		/**
+		 * Specify the requirements identifying the host to which the installable unit fragment should be attached to. 
+		 */
+		public void setHost(IRequirement... hostRequirement) {
+			((InstallableUnitFragment) unit()).setHost(Arrays.asList(hostRequirement));
+		}
+
+		InstallableUnit unit() {
+			if (unit == null)
+				unit = new InstallableUnitFragment();
+			return unit;
+		}
+	}
+
+	/**
+	 * A description containing information about an installable unit patch. Once created,
+	 * installable units are immutable. This description class allows a client to build
+	 * up the state for an installable unit patch incrementally, and then finally produce
+	 * the resulting immutable unit.
+	 */
+	public static class InstallableUnitPatchDescription extends InstallableUnitDescription {
+
+		public InstallableUnitPatchDescription() {
+			super();
+			setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
+		}
+
+		/**
+		 * Set the applicability scope for the installable unit patch.
+		 */
+		public void setApplicabilityScope(IRequirement[][] applyTo) {
+			if (applyTo == null)
+				throw new IllegalArgumentException("A patch scope can not be null"); //$NON-NLS-1$
+			((InstallableUnitPatch) unit()).setApplicabilityScope(applyTo);
+		}
+
+		/**
+		 * Set the lifecycle change for the installable unit patch.
+		 */
+		public void setLifeCycle(IRequirement lifeCycle) {
+			((InstallableUnitPatch) unit()).setLifeCycle(lifeCycle);
+		}
+
+		/**
+		 * Set the requirement change for the installable unit patch.
+		 */
+		public void setRequirementChanges(IRequirementChange[] changes) {
+			((InstallableUnitPatch) unit()).setRequirementsChange(changes);
+		}
+
+		InstallableUnit unit() {
+			if (unit == null) {
+				unit = new InstallableUnitPatch();
+				((InstallableUnitPatch) unit()).setApplicabilityScope(new IRequirement[0][0]);
+			}
+			return unit;
+		}
+	}
+
+	/**
+	 * Singleton touchpoint data for a touchpoint with no instructions.
+	 */
+	private static final ITouchpointData EMPTY_TOUCHPOINT_DATA = new TouchpointData(CollectionUtils.<String, ITouchpointInstruction> emptyMap());
+
+	private static ITouchpointType[] typeCache = new ITouchpointType[5];
+
+	private static int typeCacheOffset;
+
+	/**
+	 * Returns an {@link IInstallableUnit} based on the given 
+	 * description.  Once the installable unit has been created, the information is 
+	 * discarded from the description object.
+	 * 
+	 * @param description The description of the unit to create
+	 * @return The created installable unit
+	 */
+	public static IInstallableUnit createInstallableUnit(InstallableUnitDescription description) {
+		Assert.isNotNull(description);
+		return description.unitCreate();
+	}
+
+	/**
+	 * Returns an {@link IInstallableUnitFragment} based on the given 
+	 * description.  Once the fragment has been created, the information is 
+	 * discarded from the description object.
+	 * 
+	 * @param description The description of the unit to create
+	 * @return The created installable unit fragment
+	 */
+	public static IInstallableUnitFragment createInstallableUnitFragment(InstallableUnitFragmentDescription description) {
+		Assert.isNotNull(description);
+		return (IInstallableUnitFragment) description.unitCreate();
+	}
+
+	/**
+	 * Returns an {@link IInstallableUnitPatch} based on the given 
+	 * description.  Once the patch installable unit has been created, the information is 
+	 * discarded from the description object.
+	 * 
+	 * @param description The description of the unit to create
+	 * @return The created installable unit patch
+	 */
+	public static IInstallableUnitPatch createInstallableUnitPatch(InstallableUnitPatchDescription description) {
+		Assert.isNotNull(description);
+		return (IInstallableUnitPatch) description.unitCreate();
+	}
+
+	/**
+	 * Returns a {@link IProvidedCapability} with the given values.
+	 * 
+	 * @param namespace The capability namespace
+	 * @param name The capability name
+	 * @param version The capability version
+	 */
+	public static IProvidedCapability createProvidedCapability(String namespace, String name, Version version) {
+		return new ProvidedCapability(namespace, name, version);
+	}
+
+	/**
+	 * Returns a {@link IRequirement} with the given values.
+	 * 
+	 * @param namespace The capability namespace
+	 * @param name The required capability name
+	 * @param range The range of versions that are required, or <code>null</code>
+	 * to indicate that any version will do.
+	 * @param filter The filter used to evaluate whether this capability is applicable in the
+	 * current environment, or <code>null</code> to indicate this capability is always applicable
+	 * @param optional <code>true</code> if this required capability is optional,
+	 * and <code>false</code> otherwise.
+	 * @param multiple <code>true</code> if this capability can be satisfied by multiple provided capabilities, 
+	 * or <code>false</code> if it requires exactly one match
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, boolean optional, boolean multiple) {
+		return new RequiredCapability(namespace, name, range, filter, optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, true, null);
+	}
+
+	/**
+	 * Create and return a new requirement ({@link IRequirement}) with the specified values.
+	 * 
+	 * @param namespace the namespace for the requirement. Must not be <code>null</code>.
+	 * @param name the name for the requirement. Must not be <code>null</code>.
+	 * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
+	 * @param filter The filter used to evaluate whether this capability is applicable in the
+	 * 	current environment, or <code>null</code> to indicate this capability is always applicable
+	 * @param minCard minimum cardinality
+	 * @param maxCard maximum cardinality
+	 * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
+		return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, null);
+	}
+
+	/**
+	 * Create and return a new requirement ({@link IRequirement}) with the specified values.
+	 * 
+	 * @param requirement the match expression
+	 * @param filter The filter used to evaluate whether this capability is applicable in the
+	 * 	current environment, or <code>null</code> to indicate this capability is always applicable
+	 * @param minCard minimum cardinality
+	 * @param maxCard maximum cardinality
+	 * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
+		return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, null);
+	}
+
+	/**
+	 * Create and return a new requirement ({@link IRequirement}) with the specified values.
+	 * 
+	 * @param namespace the namespace for the requirement. Must not be <code>null</code>.
+	 * @param name the name for the requirement. Must not be <code>null</code>.
+	 * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
+	 * @param filter The filter used to evaluate whether this capability is applicable in the
+	 * 	current environment, or <code>null</code> to indicate this capability is always applicable
+	 * @param optional <code>true</code> if this requirement is optional, and <code>false</code> otherwise.
+	 * @param multiple <code>true</code> if this requirement can be satisfied by multiple provided capabilities, or <code>false</code> 
+	 * 	if it requires exactly one match
+	 * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
+		return new RequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
+	}
+
+	/**
+	 * Create and return a new requirement ({@link IRequirement}) with the specified values.
+	 * 
+	 * @param namespace the namespace for the requirement. Must not be <code>null</code>.
+	 * @param name the name for the requirement. Must not be <code>null</code>.
+	 * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
+	 * @param filter The filter used to evaluate whether this capability is applicable in the
+	 * 	current environment, or <code>null</code> to indicate this capability is always applicable
+	 * @param minCard minimum cardinality
+	 * @param maxCard maximum cardinality
+	 * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
+	 * @param description a <code>String</code> description of the requirement, or <code>null</code>
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
+		return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, description);
+	}
+
+	/**
+	 * Create and return a new requirement ({@link IRequirement}) with the specified values.
+	 *  
+	 * @param requirement the match expression
+	 * @param filter the filter, or <code>null</code>
+	 * @param minCard minimum cardinality
+	 * @param maxCard maximum cardinality
+	 * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
+	 * @param description a <code>String</code> description of the requirement, or <code>null</code>
+	 * @return the requirement
+	 */
+	public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
+		return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, description);
+	}
+
+	/**
+	 * Returns a new requirement change.
+	 * @param applyOn The source of the requirement change - the kind of requirement to apply the change to
+	 * @param newValue The result of the requirement change - the requirement to replace the source requirement with
+	 * @return a requirement change
+	 */
+	public static IRequirementChange createRequirementChange(IRequirement applyOn, IRequirement newValue) {
+		if ((applyOn == null || applyOn instanceof IRequiredCapability) && (newValue == null || newValue instanceof IRequiredCapability))
+			return new RequirementChange((IRequiredCapability) applyOn, (IRequiredCapability) newValue);
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Returns a new {@link ICopyright}.
+	 * @param location the location of a document containing the copyright notice, or <code>null</code>
+	 * @param body the copyright body, cannot be <code>null</code>
+	 * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
+	 */
+	public static ICopyright createCopyright(URI location, String body) {
+		return new Copyright(location, body);
+	}
+
+	/**
+	 * Return a new {@link ILicense}
+	 * The body should contain either the full text of the license or an summary for a license
+	 * fully specified in the given location.
+	 * 
+	 * @param location the location of a document containing the full license, or <code>null</code>
+	 * @param body the license body, cannot be <code>null</code>
+	 * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
+	 */
+	public static ILicense createLicense(URI location, String body) {
+		return new License(location, body, null);
+	}
+
+	/**
+	 * Returns an {@link IInstallableUnit} that represents the given
+	 * unit bound to the given fragments.
+	 * 
+	 * @see IInstallableUnit#isResolved()
+	 * @param unit The unit to be bound
+	 * @param fragments The fragments to be bound
+	 * @return A resolved installable unit
+	 */
+	public static IInstallableUnit createResolvedInstallableUnit(IInstallableUnit unit, IInstallableUnitFragment[] fragments) {
+		if (unit.isResolved())
+			return unit;
+		Assert.isNotNull(unit);
+		Assert.isNotNull(fragments);
+		return new ResolvedInstallableUnit(unit, fragments);
+
+	}
+
+	/**
+	 * Returns an instance of {@link ITouchpointData} with the given instructions.
+	 * 
+	 * @param instructions The instructions for the touchpoint data.
+	 * @return The created touchpoint data
+	 */
+	public static ITouchpointData createTouchpointData(Map<String, ? extends Object> instructions) {
+		Assert.isNotNull(instructions);
+		//copy the map to protect against subsequent change by caller
+		if (instructions.isEmpty())
+			return EMPTY_TOUCHPOINT_DATA;
+
+		Map<String, ITouchpointInstruction> result = new LinkedHashMap<String, ITouchpointInstruction>(instructions.size());
+
+		for (Map.Entry<String, ? extends Object> entry : instructions.entrySet()) {
+			Object value = entry.getValue();
+			ITouchpointInstruction instruction;
+			if (value == null || value instanceof String)
+				instruction = createTouchpointInstruction((String) value, null);
+			else
+				instruction = (ITouchpointInstruction) value;
+			result.put(entry.getKey(), instruction);
+		}
+		return new TouchpointData(result);
+	}
+
+	/**
+	 * Merge the given touchpoint instructions with a pre-existing touchpoint data
+	 * @param initial - the initial ITouchpointData
+	 * @param incomingInstructions - Map of ITouchpointInstructions to merge into the initial touchpoint data
+	 * @return the merged ITouchpointData
+	 */
+	public static ITouchpointData mergeTouchpointData(ITouchpointData initial, Map<String, ITouchpointInstruction> incomingInstructions) {
+		if (incomingInstructions == null || incomingInstructions.size() == 0)
+			return initial;
+
+		Map<String, ITouchpointInstruction> resultInstructions = new HashMap<String, ITouchpointInstruction>(initial.getInstructions());
+		for (String key : incomingInstructions.keySet()) {
+			ITouchpointInstruction instruction = incomingInstructions.get(key);
+			ITouchpointInstruction existingInstruction = resultInstructions.get(key);
+
+			if (existingInstruction != null) {
+				String body = existingInstruction.getBody();
+				if (body == null || body.length() == 0)
+					body = instruction.getBody();
+				else if (instruction.getBody() != null) {
+					if (!body.endsWith(";")) //$NON-NLS-1$
+						body += ';';
+					body += instruction.getBody();
+				}
+
+				String importAttribute = existingInstruction.getImportAttribute();
+				if (importAttribute == null || importAttribute.length() == 0)
+					importAttribute = instruction.getImportAttribute();
+				else if (instruction.getImportAttribute() != null) {
+					if (!importAttribute.endsWith(",")) //$NON-NLS-1$
+						importAttribute += ',';
+					importAttribute += instruction.getBody();
+				}
+				instruction = createTouchpointInstruction(body, importAttribute);
+			}
+			resultInstructions.put(key, instruction);
+		}
+		return createTouchpointData(resultInstructions);
+	}
+
+	public static ITouchpointInstruction createTouchpointInstruction(String body, String importAttribute) {
+		return new TouchpointInstruction(body, importAttribute);
+	}
+
+	/**
+	 * Returns a {@link TouchpointType} with the given id and version.
+	 * 
+	 * @param id The touchpoint id
+	 * @param version The touchpoint version
+	 * @return A touchpoint type instance with the given id and version
+	 */
+	public static ITouchpointType createTouchpointType(String id, Version version) {
+		Assert.isNotNull(id);
+		Assert.isNotNull(version);
+
+		if (id.equals(ITouchpointType.NONE.getId()) && version.equals(ITouchpointType.NONE.getVersion()))
+			return ITouchpointType.NONE;
+
+		synchronized (typeCache) {
+			ITouchpointType result = getCachedTouchpointType(id, version);
+			if (result != null)
+				return result;
+			result = new TouchpointType(id, version);
+			putCachedTouchpointType(result);
+			return result;
+		}
+	}
+
+	public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
+		return new UpdateDescriptor(descriptors, severity, description, location);
+	}
+
+	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
+		return createUpdateDescriptor(id, range, severity, description, null);
+	}
+
+	/**
+	 * Create and return a new update descriptor {@link IUpdateDescriptor} with the specified values.
+	 * 
+	 * @param id the identifiter for the update. Must not be <code>null</code>.
+	 * @param range the version range. A <code>null</code> range is equivalent to {@link VersionRange#emptyRange} and matches all versions.
+	 * @param severity the severity
+	 * @param description a <code>String</code> description or <code>null</code>
+	 * @param location a {@link URI} specifying the location or <code>null</code> 
+	 * @return the update descriptor
+	 */
+	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description, URI location) {
+		Collection<IMatchExpression<IInstallableUnit>> descriptors = new ArrayList<IMatchExpression<IInstallableUnit>>(1);
+		descriptors.add(createMatchExpressionFromRange(IInstallableUnit.NAMESPACE_IU_ID, id, range));
+		return createUpdateDescriptor(descriptors, severity, description, location);
+	}
+
+	private static final IExpression allVersionsExpression;
+	private static final IExpression range_II_Expression;
+	private static final IExpression range_IN_Expression;
+	private static final IExpression range_NI_Expression;
+	private static final IExpression range_NN_Expression;
+	private static final IExpression strictVersionExpression;
+	private static final IExpression openEndedExpression;
+	private static final IExpression openEndedNonInclusiveExpression;
+
+	static {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		IExpression xVar = factory.variable("x"); //$NON-NLS-1$
+		IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
+		IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
+
+		IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
+
+		IExpression versionCmpLow = factory.indexedParameter(2);
+		IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
+		IExpression versionGt = factory.greater(versionMember, versionCmpLow);
+		IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
+
+		IExpression versionCmpHigh = factory.indexedParameter(3);
+		IExpression versionLt = factory.less(versionMember, versionCmpHigh);
+		IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
+
+		IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
+		allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
+		strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
+		openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
+		openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
+		range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
+		range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
+		range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
+		range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
+	}
+
+	private static IMatchExpression<IInstallableUnit> createMatchExpressionFromRange(String namespace, String name, VersionRange range) {
+		IMatchExpression<IInstallableUnit> resultExpression = null;
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		if (range == null || range.equals(VersionRange.emptyRange)) {
+			resultExpression = factory.matchExpression(allVersionsExpression, name, namespace);
+		} else {
+			if (range.getMinimum().equals(range.getMaximum())) {
+				// Explicit version appointed
+				resultExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
+			} else {
+				if (range.getMaximum().equals(Version.MAX_VERSION)) {
+					// Open ended
+					resultExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
+				} else {
+					resultExpression = factory.matchExpression(//
+							range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
+									: (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
+							name, namespace, range.getMinimum(), range.getMaximum());
+				}
+			}
+		}
+		return resultExpression;
+	}
+
+	private static ITouchpointType getCachedTouchpointType(String id, Version version) {
+		for (int i = 0; i < typeCache.length; i++) {
+			if (typeCache[i] != null && typeCache[i].getId().equals(id) && typeCache[i].getVersion().equals(version))
+				return typeCache[i];
+		}
+		return null;
+	}
+
+	private static void putCachedTouchpointType(ITouchpointType result) {
+		//simple rotating buffer
+		typeCache[typeCacheOffset] = result;
+		typeCacheOffset = (typeCacheOffset + 1) % typeCache.length;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
new file mode 100644
index 0000000..3b3d1b3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Cloudsmith Inc - initial API and implementation.
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.metadata;
+
+import java.io.Serializable;
+import org.eclipse.equinox.internal.p2.metadata.*;
+
+/**
+ * A class that represents a Version in the Omni Version format. A Version can be though of as an
+ * array of comparable elements and an optional pad value. The pad value is used when comparing
+ * two versions with a different number of segments.
+ *
+ * The Omni Version can convert almost any version into a raw format that it uses for comparisons.
+ * This enables a unified order of all such versions and solves problems that arise when the
+ * version semantics are different. A good example is the OSGi version versus the version used in Maven.
+ * The lack of qualifier in the OSGi version implies that the qualifier is an empty string. So a version
+ * without a qualifier is the smallest of all other versions with the same major,minor,micro number.
+ * With Maven semantics, it's the opposite. If the qualifier is removed, the resulting version is
+ * considered higher then all other versions with the same major, minor, and micro number. The
+ * Omni version solves this by using different raw representations of the OSGi and Maven versions.
+ *
+ * The Omni version addresses a lot of other issues as well, such as reordering of the elements
+ * or treating some parts of a version as irrelevant when comparing.
+ * 
+ * The class is signature compatible with {@link org.osgi.framework.Version} but attempts
+ * to use it as such might render a {@link UnsupportedOperationException} in case the
+ * raw vector holds incompatible values. The method {@link #isOSGiCompatible()} can be used
+ * to test.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public abstract class Version implements Comparable<Version>, Serializable {
+	public static final String RAW_PREFIX = "raw:"; //$NON-NLS-1$
+
+	/**
+	 * The version that is semantically greater then all other versions.
+	 */
+	public static final Version MAX_VERSION = OmniVersion.createMaxVersion();
+
+	/**
+	 * The version that is semantically less then all other versions.
+	 */
+	public static final Version emptyVersion = OmniVersion.createMinVersion();
+
+	private static final long serialVersionUID = 6218979149720923857L;
+
+	/**
+	 * Compile a version format string into a compiled format..
+	 *
+	 * @param format The format to compile.
+	 * @return The compiled format
+	 * @throws VersionFormatException If the format could not be compiled
+	 */
+	public static IVersionFormat compile(String format) throws VersionFormatException {
+		return VersionFormat.compile(format, 0, format.length());
+	}
+
+	/**
+	 * Parses a version identifier from the specified string.
+	 * 
+	 * @param version String representation of the version identifier. Leading
+	 *        and trailing whitespace will be ignored.
+	 * @return A <code>Version</code> object representing the version identifier
+	 *         or <code>null</code> if <code>version</code> is <code>null</code> or
+	 *         an empty string.
+	 * @throws IllegalArgumentException If <code>version</code> is improperly
+	 *         formatted.
+	 */
+	public static Version create(String version) {
+		return version == null ? null : VersionParser.parse(version, 0, version.length());
+	}
+
+	/**
+	 * Creates an OSGi version identifier from the specified numerical components.
+	 * 
+	 * <p>
+	 * The qualifier is set to the empty string.
+	 * 
+	 * @param major Major component of the version identifier.
+	 * @param minor Minor component of the version identifier.
+	 * @param micro Micro component of the version identifier.
+	 * @throws IllegalArgumentException If the numerical components are
+	 *         negative.
+	 */
+	public static Version createOSGi(int major, int minor, int micro) {
+		return createOSGi(major, minor, micro, null);
+	}
+
+	/**
+	 * Creates an OSGi version identifier from the specified components.
+	 * 
+	 * @param major Major component of the version identifier.
+	 * @param minor Minor component of the version identifier.
+	 * @param micro Micro component of the version identifier.
+	 * @param qualifier Qualifier component of the version identifier. If
+	 *        <code>null</code> is specified, then the qualifier will be set to
+	 *        the empty string.
+	 * @throws IllegalArgumentException If the numerical components are negative
+	 *         or the qualifier string is invalid.
+	 */
+	public static Version createOSGi(int major, int minor, int micro, String qualifier) {
+		Comparable<?> logicQualifier;
+		if (qualifier == null || qualifier.length() == 0) {
+			if (major == 0 && minor == 0 && micro == 0)
+				return emptyVersion;
+			logicQualifier = VersionVector.MINS_VALUE; // So that we can do identity compare
+		} else if (qualifier.equals(IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION))
+			logicQualifier = VersionVector.MAXS_VALUE;
+		else
+			logicQualifier = qualifier;
+		return new OSGiVersion(major, minor, micro, logicQualifier);
+	}
+
+	/**
+	 * Parses a version identifier from the specified string. This method is for backward
+	 * compatibility with OSGi and will return the OSGi "0.0.0" version when
+	 * the provided string is empty or <code>null</code>.
+	 * 
+	 * @param version String representation of the version identifier. Leading
+	 *        and trailing whitespace will be ignored.
+	 * @return A <code>Version</code> object representing the version
+	 *         identifier. If <code>version</code> is <code>null</code> or
+	 *         the empty string then the OSGi <code>emptyVersion</code> will be
+	 *         returned.
+	 * @throws IllegalArgumentException If <code>version</code> is improperly
+	 *         formatted.
+	 * @see #create(String)
+	 */
+	public static Version parseVersion(String version) {
+		if (version == null || version.length() == 0)
+			return Version.emptyVersion;
+		Version v = create(version);
+		return v == null ? Version.emptyVersion : v;
+	}
+
+	/**
+	 * Returns the optional format.
+	 */
+	public abstract IVersionFormat getFormat();
+
+	/**
+	 * Returns the <code>original</code> part of the string for this version
+	 * or <code>null</code> if no such part was provided when the version was
+	 * created. An OSGi type version will always return the OSGi string representation.
+	 *
+	 * @return The <code>original</code> part of the version string or
+	 * <code>null</code> if that part was missing.
+	 */
+	public abstract String getOriginal();
+
+	/**
+	 * Returns the pad value used when comparing this versions to
+	 * versions that has a larger number of segments
+	 * @return The pad value or <code>null</code> if not set.
+	 */
+	public abstract Comparable<?> getPad();
+
+	/**
+	 * An element from the raw vector representation of this version.
+	 * @param index The zero based index of the desired element
+	 * @return An element from the raw vector
+	 */
+	public abstract Comparable<?> getSegment(int index);
+
+	/**
+	 * Returns the number of elements in the raw vector representation of this version.
+	 * @return The number of elements in the raw vector.
+	 */
+	public abstract int getSegmentCount();
+
+	/**
+	 * Checks if this version is in compliance with the OSGi version spec.
+	 * @return A flag indicating whether the version is OSGi compatible or not.
+	 */
+	public abstract boolean isOSGiCompatible();
+
+	public String toString() {
+		StringBuffer buf = new StringBuffer(20);
+		toString(buf);
+		return buf.toString();
+	}
+
+	/**
+	 * Appends the string representation of this version onto the
+	 * <code>sb</code> StringBuffer.
+	 * @param sb The buffer that will receive the version string
+	 */
+	public abstract void toString(StringBuffer sb);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
new file mode 100644
index 0000000..4585b5c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+/**
+ * Exception thrown when parsing Omni Version formats.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class VersionFormatException extends Exception {
+
+	private static final long serialVersionUID = -867104101610941043L;
+
+	public VersionFormatException(String message) {
+		super(message);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
new file mode 100644
index 0000000..5fde149
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
@@ -0,0 +1,470 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc - rewrite to handle non-OSGi versions.
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import java.io.Serializable;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This class represents a version range with Omni Version bounds. It is signature
+ * equivalent with the OSGi org.eclipse.osgi.service.resolver.VersionRange
+ *
+ * @Immutable
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class VersionRange implements Serializable {
+	private static final long serialVersionUID = 4988030307298088028L;
+
+	/**
+	 * TODO: This should not be OSGi but it has to be that for now since the resolver creates
+	 * a filter where the min and max are converted into strings. When the filter is evaluated an
+	 * attempt is made to recreate them as OSGi versions.
+	 *
+	 * An empty OSGi Version range.
+	 */
+	public static final VersionRange emptyRange = new VersionRange(Version.emptyVersion, true, Version.MAX_VERSION, true);
+
+	private final Version minVersion;
+	private final boolean includeMin;
+	private final Version maxVersion;
+	private final boolean includeMax;
+
+	private static int copyEscaped(String vr, int pos, String breakChars, StringBuffer sb) {
+		int top = vr.length();
+		pos = VersionParser.skipWhite(vr, pos);
+		if (pos >= top)
+			throw new IllegalArgumentException();
+
+		char c = vr.charAt(pos);
+		for (;;) {
+			if (c == '\\' && ++pos < top)
+				c = vr.charAt(pos);
+			else {
+				if (c <= ' ')
+					return VersionParser.skipWhite(vr, pos);
+				if (breakChars != null && breakChars.indexOf(c) >= 0)
+					break;
+			}
+			sb.append(c);
+			if (++pos >= top)
+				break;
+			c = vr.charAt(pos);
+		}
+		return pos;
+	}
+
+	/**
+	 * Constructs a VersionRange with the specified minVersion and maxVersion.
+	 * @param minVersion the minimum version of the range
+	 * @param maxVersion the maximum version of the range
+	 */
+	public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
+		if (minVersion == null) {
+			if (maxVersion == null) {
+				minVersion = Version.emptyVersion;
+				maxVersion = Version.MAX_VERSION;
+			} else
+				minVersion = Version.emptyVersion;
+		} else {
+			if (maxVersion == null)
+				maxVersion = Version.MAX_VERSION;
+			else {
+				if (minVersion != maxVersion && minVersion.equals(maxVersion))
+					maxVersion = minVersion;
+				else if (!(minVersion.getFormat() == null ? maxVersion.getFormat() == null : minVersion.getFormat().equals(maxVersion.getFormat()))) {
+					// We always allow the MIN and MAX boundaries
+					if (!(minVersion.equals(Version.emptyVersion) || maxVersion.equals(Version.MAX_VERSION)))
+						throw new IllegalArgumentException(NLS.bind(Messages.range_boundaries_0_and_1_cannot_have_different_formats, minVersion, maxVersion));
+				}
+			}
+		}
+		this.minVersion = minVersion;
+		this.includeMin = includeMin;
+		this.maxVersion = maxVersion;
+		this.includeMax = includeMax;
+		validateRange();
+	}
+
+	/**
+	 * Constructs a VersionRange from the given versionRange String.
+	 * @param versionRange a version range String that specifies a range of
+	 * versions.
+	 */
+	public VersionRange(String versionRange) {
+		int top = 0;
+		int pos = 0;
+		if (versionRange != null) {
+			top = versionRange.length();
+			pos = VersionParser.skipWhite(versionRange, 0);
+			top = VersionParser.skipTrailingWhite(versionRange, pos, top);
+		}
+
+		if (pos >= top) {
+			minVersion = Version.emptyVersion;
+			includeMin = true;
+			maxVersion = Version.MAX_VERSION;
+			includeMax = true;
+			return;
+		}
+
+		char c = versionRange.charAt(pos);
+		int[] position = new int[1];
+		boolean rawPrefix = false;
+		IVersionFormat fmt = null;
+		if (VersionParser.isLetter(c)) {
+			if (versionRange.startsWith("raw:", pos)) { //$NON-NLS-1$
+				rawPrefix = true;
+				pos += 4;
+			} else {
+				position[0] = pos;
+				fmt = parseFormat(versionRange, position);
+				pos = position[0];
+				if (pos >= versionRange.length())
+					throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
+
+				c = versionRange.charAt(pos);
+				if (c != ':')
+					throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
+				++pos;
+			}
+			pos = VersionParser.skipWhite(versionRange, pos);
+			if (pos >= top)
+				throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
+			c = versionRange.charAt(pos);
+		} else
+			fmt = VersionFormat.OSGI_FORMAT;
+
+		String minStr;
+		String maxStr;
+		StringBuffer sb = new StringBuffer();
+		if (c == '[' || c == '(') {
+			includeMin = (c == '[');
+			pos = copyEscaped(versionRange, ++pos, ",)]", sb); //$NON-NLS-1$
+			if (pos >= top)
+				throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
+			c = versionRange.charAt(pos++);
+			if (c != ',')
+				throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
+
+			minStr = sb.toString();
+			sb.setLength(0);
+			pos = copyEscaped(versionRange, pos, ")]", sb); //$NON-NLS-1$
+			if (pos >= top)
+				throw new IllegalArgumentException();
+			maxStr = sb.toString();
+
+			c = versionRange.charAt(pos++);
+			includeMax = (c == ']');
+		} else {
+			StringBuffer sbMin = new StringBuffer();
+			pos = copyEscaped(versionRange, pos, rawPrefix ? "/" : null, sbMin); //$NON-NLS-1$
+			includeMin = includeMax = true;
+			minStr = sbMin.toString();
+			maxStr = null;
+		}
+
+		if (rawPrefix) {
+			String origMin = null;
+			String origMax = null;
+			pos = VersionParser.skipWhite(versionRange, pos);
+			if (pos < top && versionRange.charAt(pos) == '/') {
+				if (++pos == top)
+					throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
+				position[0] = pos;
+				fmt = parseFormat(versionRange, position);
+				pos = VersionParser.skipWhite(versionRange, position[0]);
+				if (pos < top) {
+					boolean origUseIncDelims = false;
+					c = versionRange.charAt(pos);
+					if (c != ':')
+						throw new IllegalArgumentException(NLS.bind(Messages.original_must_start_with_colon_0, versionRange));
+
+					pos = VersionParser.skipWhite(versionRange, ++pos);
+					if (pos == top)
+						throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
+
+					c = versionRange.charAt(pos);
+					if (c == '[' || c == '(') {
+						if (includeMin != (c == '[') || maxStr == null)
+							throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
+						pos = VersionParser.skipWhite(versionRange, ++pos);
+						origUseIncDelims = true;
+					}
+
+					sb.setLength(0);
+					if (maxStr == null) {
+						copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
+						origMin = sb.toString();
+					} else {
+						pos = copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
+						if (pos >= top)
+							throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
+						c = versionRange.charAt(pos++);
+						if (c != ',')
+							throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
+						origMin = sb.toString();
+
+						sb.setLength(0);
+						pos = copyEscaped(versionRange, pos, "])", sb); //$NON-NLS-1$
+						if (origUseIncDelims) {
+							if (pos >= top)
+								throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
+							c = versionRange.charAt(pos++);
+							if (includeMax != (c == ']'))
+								throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
+						}
+						origMax = sb.toString();
+					}
+				}
+			}
+			minVersion = VersionFormat.parseRaw(minStr, fmt, origMin);
+			if (maxStr != null) {
+				if (maxStr.equals(minStr))
+					maxVersion = minVersion;
+				else
+					maxVersion = VersionFormat.parseRaw(maxStr, fmt, origMax);
+			} else
+				maxVersion = Version.MAX_VERSION;
+		} else {
+			if (fmt == null)
+				fmt = VersionFormat.OSGI_FORMAT;
+			minVersion = fmt.parse(minStr);
+			if (maxStr != null) {
+				if (maxStr.equals(minStr))
+					maxVersion = minVersion;
+				else
+					maxVersion = fmt.parse(maxStr);
+			} else {
+				maxVersion = Version.MAX_VERSION;
+			}
+		}
+		validateRange();
+	}
+
+	private static IVersionFormat parseFormat(String versionRange, int[] position) {
+		int pos = VersionParser.skipWhite(versionRange, position[0]);
+		if (!versionRange.startsWith("format(", pos)) //$NON-NLS-1$
+			return null;
+
+		pos += 7;
+		int end = VersionParser.findEndOfFormat(versionRange, pos, versionRange.length());
+		try {
+			position[0] = end + 1;
+			return VersionFormat.compile(versionRange, pos, end);
+		} catch (VersionFormatException e) {
+			throw new IllegalArgumentException(e.getMessage());
+		}
+	}
+
+	/**
+	 * Returns the version format.
+	 */
+	public IVersionFormat getFormat() {
+		return minVersion.equals(Version.emptyVersion) ? maxVersion.getFormat() : minVersion.getFormat();
+	}
+
+	/**
+	 * Returns the minimum Version of this VersionRange
+	 * @return the minimum Version of this VersionRange
+	 */
+	public Version getMinimum() {
+		return minVersion;
+	}
+
+	/**
+	 * Indicates if the minimum version is included in the version range.
+	 * @return true if the minimum version is included in the version range;
+	 * otherwise false is returned
+	 */
+	public boolean getIncludeMinimum() {
+		return includeMin;
+	}
+
+	/**
+	 * Returns the maximum Version of this VersionRange
+	 * @return the maximum Version of this VersionRange
+	 */
+	public Version getMaximum() {
+		return maxVersion;
+	}
+
+	/**
+	 * Indicates if the maximum version is included in the version range.
+	 * @return true if the maximum version is included in the version range;
+	 * otherwise false is returned
+	 */
+	public boolean getIncludeMaximum() {
+		return includeMax;
+	}
+
+	public VersionRange intersect(VersionRange r2) {
+		int minCompare = minVersion.compareTo(r2.getMinimum());
+		int maxCompare = maxVersion.compareTo(r2.getMaximum());
+
+		boolean resultMinIncluded;
+		Version resultMin;
+		if (minCompare == 0) {
+			if (maxCompare == 0 && includeMin == r2.getIncludeMinimum() && includeMax == r2.getIncludeMaximum())
+				return this;
+			resultMin = minVersion;
+			resultMinIncluded = includeMin && r2.getIncludeMinimum();
+		} else if (minCompare < 0) {
+			resultMin = r2.getMinimum();
+			resultMinIncluded = r2.getIncludeMinimum();
+		} else { // minCompare > 0)
+			resultMin = minVersion;
+			resultMinIncluded = includeMin;
+		}
+
+		boolean resultMaxIncluded;
+		Version resultMax;
+		if (maxCompare > 0) {
+			resultMax = r2.getMaximum();
+			resultMaxIncluded = r2.getIncludeMaximum();
+		} else if (maxCompare < 0) {
+			resultMax = maxVersion;
+			resultMaxIncluded = includeMax;
+		} else {//maxCompare == 0
+			resultMax = maxVersion;
+			resultMaxIncluded = includeMax && r2.getIncludeMaximum();
+		}
+
+		int minMaxCmp = resultMin.compareTo(resultMax);
+		if (minMaxCmp < 0 || (minMaxCmp == 0 && resultMinIncluded && resultMaxIncluded))
+			return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
+
+		return null;
+	}
+
+	/**
+	 * Returns whether the given version is included in this VersionRange.
+	 * This will depend on the minimum and maximum versions of this VersionRange
+	 * and the given version.
+	 * 
+	 * @param version a version to be tested for inclusion in this VersionRange. 
+	 * (may be <code>null</code>)
+	 * @return <code>true</code> if the version is include, 
+	 * <code>false</code> otherwise 
+	 */
+	public boolean isIncluded(Version version) {
+		if (version == null)
+			return false;
+
+		if (minVersion == maxVersion)
+			// Can only happen when both includeMin and includeMax are true
+			return minVersion.equals(version);
+
+		int minCheck = includeMin ? 0 : -1;
+		int maxCheck = includeMax ? 0 : 1;
+		return minVersion.compareTo(version) <= minCheck && maxVersion.compareTo(version) >= maxCheck;
+	}
+
+	/**
+	 * Checks if the versions of this range is in compliance with the OSGi version spec.
+	 * @return A flag indicating whether the range is OSGi compatible or not.
+	 */
+	public boolean isOSGiCompatible() {
+		return minVersion.isOSGiCompatible() && maxVersion.isOSGiCompatible();
+	}
+
+	public boolean equals(Object object) {
+		if (!(object instanceof VersionRange))
+			return false;
+		VersionRange vr = (VersionRange) object;
+		return includeMin == vr.includeMin && includeMax == vr.includeMax && minVersion.equals(vr.getMinimum()) && maxVersion.equals(vr.getMaximum());
+	}
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + maxVersion.hashCode();
+		result = prime * result + minVersion.hashCode();
+		result = prime * result + (includeMax ? 1231 : 1237);
+		result = prime * result + (includeMin ? 1231 : 1237);
+		return result;
+	}
+
+	public String toString() {
+		StringBuffer result = new StringBuffer();
+		toString(result);
+		return result.toString();
+	}
+
+	public void toString(StringBuffer result) {
+		boolean gtEqual = includeMin && includeMax && Version.MAX_VERSION.equals(maxVersion);
+		if (gtEqual && Version.emptyVersion.equals(minVersion)) {
+			minVersion.toString(result);
+			return;
+		}
+
+		IVersionFormat fmt = getFormat();
+		if (fmt == VersionFormat.OSGI_FORMAT) {
+			if (gtEqual) {
+				minVersion.toString(result);
+			} else {
+				result.append(includeMin ? '[' : '(');
+				minVersion.toString(result);
+				result.append(',');
+				maxVersion.toString(result);
+				result.append(includeMax ? ']' : ')');
+			}
+			return;
+		}
+
+		result.append("raw:"); //$NON-NLS-1$
+		if (gtEqual) {
+			((BasicVersion) minVersion).rawToString(result, true);
+		} else {
+			result.append(includeMin ? '[' : '(');
+			((BasicVersion) minVersion).rawToString(result, true);
+			result.append(',');
+			((BasicVersion) maxVersion).rawToString(result, true);
+			result.append(includeMax ? ']' : ')');
+		}
+		boolean hasOriginal = (minVersion.getOriginal() != null || maxVersion.getOriginal() != null);
+		if (fmt != null || hasOriginal) {
+			result.append('/');
+			if (fmt != null)
+				fmt.toString(result);
+			if (hasOriginal) {
+				result.append(':');
+				if (gtEqual) {
+					((BasicVersion) minVersion).originalToString(result, true);
+				} else {
+					if (Version.emptyVersion.equals(minVersion))
+						((BasicVersion) minVersion).rawToString(result, true);
+					else
+						((BasicVersion) minVersion).originalToString(result, true);
+					result.append(',');
+					((BasicVersion) maxVersion).originalToString(result, true);
+				}
+			}
+		}
+	}
+
+	// Preserve singletons during deserialization
+	private Object readResolve() {
+		VersionRange vr = this;
+		if (equals(emptyRange))
+			vr = emptyRange;
+		return vr;
+	}
+
+	private void validateRange() {
+		int cmp = minVersion.compareTo(maxVersion);
+		if (!(cmp < 0 || (cmp == 0 && includeMin && includeMax)))
+			throw new IllegalArgumentException(NLS.bind(Messages.range_min_0_is_not_less_then_range_max_1, minVersion, maxVersion));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
new file mode 100644
index 0000000..ebd1273
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Code 9 and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Code 9 - initial API and implementation
+ *     EclipseSource - ongoing development
+ *     Thomas Hallgren - Fix for bug 268659
+ *     IBM - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata;
+
+import org.eclipse.equinox.internal.p2.core.helpers.StringHelper;
+
+/**
+ * An object representing a (id,version) pair. An instance of this class can be constructed
+ * by invoking the constructor or calling {@link VersionedId#parse(String)} with a string 
+ * representation of this VersionedID.
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * 
+ * @since 2.0
+ */
+public class VersionedId implements IVersionedId {
+	private final String id;
+	private final Version version;
+
+	/**
+	 * Creates and returns a new {@link VersionedId} from the given string specification.  
+	 * The specification must be of the form "id/version", or just "id" if the version is absent
+	 * <p>
+	 * This factory method can be used to reconstruct a {@link VersionedId}
+	 * instance from the string representation produced by a previous invocation of 
+	 * {@link #toString()}.
+	 * 
+	 * @param spec the specification for the versioned id to create
+	 * @return the parsed versioned id
+	 * @throws IllegalArgumentException If <code>spec</code> is improperly
+	 *         formatted.
+	 */
+	public static IVersionedId parse(String spec) {
+		String[] segments = StringHelper.getArrayFromString(spec, '/');
+		return new VersionedId(segments[0], segments.length == 1 ? null : segments[1]);
+	}
+
+	/**
+	 * Creates a new versioned id with the given id and version.
+	 * 
+	 * @param id The identifier
+	 * @param version The version
+	 * @throws IllegalArgumentException If <code>version</code> is improperly
+	 *         formatted.
+	 */
+	public VersionedId(String id, String version) {
+		this.id = id;
+		this.version = Version.parseVersion(version);
+	}
+
+	/**
+	 * Creates a new versioned id with the given id and version.
+	 * 
+	 * @param id The identifier
+	 * @param version The version
+	 */
+	public VersionedId(String id, Version version) {
+		this.id = id;
+		this.version = (version == null) ? Version.emptyVersion : version;
+	}
+
+	/**
+	 * @return the ID of this VersionedID
+	 */
+	public String getId() {
+		return id;
+	}
+
+	/**
+	 * @return the Version of this VersionedID
+	 */
+	public Version getVersion() {
+		return version;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+
+		if (!(obj instanceof VersionedId))
+			return false;
+
+		VersionedId vname = (VersionedId) obj;
+		return id.equals(vname.id) && version.equals(vname.version);
+	}
+
+	public int hashCode() {
+		return id.hashCode() * 31 + version.hashCode();
+	}
+
+	/**
+	 * Returns a string representation of this versioned id.
+	 * The result can be used to later construct an equal {@link VersionedId}
+	 * instance using {{@link #parse(String)}.
+	 * @return A string representation of this versioned id
+	 */
+	public String toString() {
+		return Version.emptyVersion.equals(version) ? id : id + '/' + version.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
new file mode 100644
index 0000000..1d08324
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+/**
+ * An exception used by an expression parser that indicates that something went wrong when
+ * parsing.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class ExpressionParseException extends RuntimeException {
+	private static final long serialVersionUID = 8432875384760577764L;
+
+	public ExpressionParseException(String message) {
+		super(message);
+	}
+
+	public ExpressionParseException(String expression, String message, int position) {
+		super("Parse error in string \"" + expression + "\": " + message + " at position " + position); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
new file mode 100644
index 0000000..28864fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.parser.LDAPFilterParser;
+import org.eclipse.equinox.internal.p2.metadata.expression.parser.QLParser;
+
+/**
+ * Global access to factory, parser, and methods for introspection
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 2.0
+ */
+public final class ExpressionUtil {
+	private static final IExpressionParser expressionParser = new QLParser(ExpressionFactory.INSTANCE);
+	private static final LDAPFilterParser ldapFilterParser = new LDAPFilterParser(ExpressionFactory.INSTANCE);
+	public static final IExpression TRUE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.TRUE);
+	public static final IExpression FALSE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.FALSE);
+
+	private ExpressionUtil() {
+		//We don't want to ppl to instantiate this class
+	}
+
+	/**
+	 * Returns the global expression factory
+	 * @return The global expression factory.
+	 */
+	public static IExpressionFactory getFactory() {
+		return ExpressionFactory.INSTANCE;
+	}
+
+	/**
+	 * Creates and returns a new expression parser
+	 * @return The new parser
+	 */
+	public static IExpressionParser getParser() {
+		return expressionParser;
+	}
+
+	/**
+	 * Parse an LDAP filter from the <code>filter</code> string. If <code>filter</code> is <code>null</code>
+	 * or a string that is empty or only consists of whitespace, then this method returns <code>null</code>.
+	 * @param filter The filter to parse. Can be <code>null</code> or empty.
+	 * @return An expression that corresponds to the LDAP filter or <code>null</code>.
+	 * @throws ExpressionParseException If the syntax was invalid
+	 */
+	public static IFilterExpression parseLDAP(String filter) throws IllegalArgumentException {
+		filter = trimmedOrNull(filter);
+		return filter == null ? null : ldapFilterParser.parse(filter);
+	}
+
+	/**
+	 * Create a new expression. The expression will have access to the global
+	 * variable 'this' and to the context parameters.
+	 * @param expression The string representing the boolean expression.
+	 * @return The resulting expression tree.
+	 * @throws ExpressionParseException If the syntax was invalid
+	 */
+	public static IExpression parse(String expression) {
+		expression = trimmedOrNull(expression);
+		return expression == null ? null : getParser().parse(expression);
+	}
+
+	/**
+	 * Create an arbitrary expression. The expression will have access to the global
+	 * variable 'everything' and to the context parameters.
+	 * @param expression The string representing the boolean expression.
+	 * @return The resulting expression tree.
+	 * @throws ExpressionParseException If the syntax was invalid
+	 */
+	public static IExpression parseQuery(String expression) {
+		expression = trimmedOrNull(expression);
+		return expression == null ? null : getParser().parseQuery(expression);
+	}
+
+	/**
+	 * If <code>str</code> is <code>null</code>, then this method returns <code>null</code>.
+	 * Otherwise <code>str</code> is trimmed from whitespace at both ends. If the result
+	 * of the trim is an empty string, then <code>null</code> is returned, otherwise the
+	 * result of the trim is returned.
+	 * @param str The string to trim. Can be <code>null</code>.
+	 * @return The trimmed string or <code>null</code>.
+	 */
+	public static String trimmedOrNull(String str) {
+		if (str != null) {
+			str = str.trim();
+			if (str.length() == 0)
+				str = null;
+		}
+		return str;
+	}
+
+	/**
+	 * Obtains the Left Hand Side (LHS) of a binary expression.
+	 * @param expression The expression to introspect
+	 * @return The left hand side operator
+	 * @throws IllegalArgumentException if the expression is not a binary expression
+	 * @see IExpression#TYPE_AT
+	 * @see IExpression#TYPE_EQUALS
+	 * @see IExpression#TYPE_GREATER
+	 * @see IExpression#TYPE_GREATER_EQUAL
+	 * @see IExpression#TYPE_LESS
+	 * @see IExpression#TYPE_LESS_EQUAL
+	 * @see IExpression#TYPE_MATCHES
+	 * @see IExpression#TYPE_NOT_EQUALS
+	 */
+	public static IExpression getLHS(IExpression expression) {
+		if (expression instanceof Binary)
+			return ((Binary) expression).lhs;
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Obtains the name of a variable or member expression.
+	 * @param expression The expression to introspect
+	 * @return The name of the expression
+	 * @throws IllegalArgumentException if the expression is not a variable or a member
+	 * @see IExpression#TYPE_MEMBER
+	 * @see IExpression#TYPE_VARIABLE
+	 */
+	public static String getName(IExpression expression) {
+		if (expression instanceof Member)
+			return ((Member) expression).getName();
+		if (expression instanceof Variable)
+			return ((Variable) expression).getName();
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Obtains the operand of an unary expression
+	 * @param expression The expression to introspect
+	 * @return The expression operand
+	 * @throws IllegalArgumentException if the expression is not an unary expression
+	 * @see IExpression#TYPE_ALL
+	 * @see IExpression#TYPE_EXISTS
+	 * @see IExpression#TYPE_LAMBDA
+	 * @see IExpression#TYPE_NOT
+	 */
+	public static IExpression getOperand(IExpression expression) {
+		if (expression instanceof Unary)
+			return ((Unary) expression).operand;
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Obtains the operands of an n-ary expression
+	 * @param expression The expression to introspect
+	 * @return The expression operand
+	 * @throws IllegalArgumentException if the expression is not a n-ary expression
+	 * @see IExpression#TYPE_AND
+	 * @see IExpression#TYPE_OR
+	 */
+	public static IExpression[] getOperands(IExpression expression) {
+		if (expression instanceof NAry)
+			return ((NAry) expression).operands;
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Obtains the Right Hand Side (RHS) of a binary expression.
+	 * @param expression The expression to introspect
+	 * @return The right hand side operator
+	 * @throws IllegalArgumentException if the expression is not a binary expression
+	 * @see IExpression#TYPE_AT
+	 * @see IExpression#TYPE_EQUALS
+	 * @see IExpression#TYPE_GREATER
+	 * @see IExpression#TYPE_GREATER_EQUAL
+	 * @see IExpression#TYPE_LESS
+	 * @see IExpression#TYPE_LESS_EQUAL
+	 * @see IExpression#TYPE_MATCHES
+	 * @see IExpression#TYPE_NOT_EQUALS
+	 */
+	public static IExpression getRHS(IExpression expression) {
+		if (expression instanceof Binary)
+			return ((Binary) expression).rhs;
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Obtains the value of a literal expression
+	 * @param expression The expression to introspect
+	 * @return The literal value
+	 * @throws IllegalArgumentException if the expression is not a literal
+	 * @see IExpression#TYPE_LITERAL
+	 */
+	public static Object getValue(IExpression expression) {
+		if (expression instanceof Literal)
+			return ((Literal) expression).value;
+		throw new IllegalArgumentException();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
new file mode 100644
index 0000000..a89e54e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * This is an expression that will need access to the global variable
+ * <code>everything</code>.
+ * @since 2.0
+ */
+public interface IContextExpression<T> extends IExpression {
+
+	/**
+	 * <p>Creates a new context to be passed to a subsequent evaluation. The context
+	 * will have the variable 'everything' set to an expression that represents
+	 * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
+	 * <p>The values of the iterator will be copied if necessary (when everything is referenced
+	 * more then once).</p>
+	 * @param elementClass the class of the iterator elements
+	 * @param indexProvider The index provider that represents all queried material.
+	 * @return A new evaluation context.
+	 */
+	IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider);
+
+	/**
+	 * <p>Creates a new context to be passed to a subsequent evaluation. The context
+	 * will have the variable 'everything' set to an expression that represents
+	 * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
+	 * <p>The values of the iterator will be copied if necessary (when everything is referenced
+	 * more then once).</p>
+	 * @param elementClass the class of the iterator elements
+	 * @param everything The iterator that represents all queried material.
+	 * @return A new evaluation context.
+	 */
+	IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> everything);
+
+	/**
+	 * Returns the parameters that this context expression was created with.
+	 * @return An array of parameters, possibly empty but never <code>null</code>.
+	 */
+	Object[] getParameters();
+
+	/**
+	 * Evaluate the expression and return the expected collection result as an iterator
+	 * @param context The evaluation context
+	 * @return The result of the evaluation.
+	 */
+	Iterator<T> iterator(IEvaluationContext context);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
new file mode 100644
index 0000000..ee30214
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * The evaluation context. Contexts can be nested and new contexts are pushed for each closure
+ * during an evaluation of an expression.
+ * @since 2.0
+ */
+public interface IEvaluationContext {
+	IIndexProvider<?> getIndexProvider();
+
+	void setIndexProvider(IIndexProvider<?> indexProvider);
+
+	/**
+	 * Retrieve the value of the given <code>variable</code> from this context
+	 * @param variable The variable who's value should be retrieved
+	 * @return The current value for the variable
+	 */
+	Object getValue(IExpression variable);
+
+	/**
+	 * Set the current value for the given <code>variable</code> to <code>value</code>
+	 * @param variable The variable who's value should be set
+	 * @param value The new value for the variable.
+	 */
+	void setValue(IExpression variable, Object value);
+
+	/**
+	 * Returns the value of the parameter at the given <code>position</code>
+	 * @param position The zero based position for the parameter
+	 * @return The parameter value
+	 */
+	Object getParameter(int position);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
new file mode 100644
index 0000000..802c8ba
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+/**
+ * A node in the expression tree
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented directly by clients.
+ * @noextend This interface is not intended to be extended directly by clients.
+ */
+public interface IExpression {
+	int TYPE_ALL = 1;
+	int TYPE_AND = 2;
+	int TYPE_AT = 3;
+	int TYPE_EQUALS = 4;
+	int TYPE_EXISTS = 5;
+	int TYPE_GREATER = 6;
+	int TYPE_GREATER_EQUAL = 7;
+	int TYPE_LAMBDA = 8;
+	int TYPE_LESS = 9;
+	int TYPE_LESS_EQUAL = 10;
+	int TYPE_LITERAL = 11;
+	int TYPE_MATCHES = 12;
+	int TYPE_MEMBER = 13;
+	int TYPE_NOT = 14;
+	int TYPE_NOT_EQUALS = 15;
+	int TYPE_OR = 16;
+	int TYPE_PARAMETER = 17;
+	int TYPE_VARIABLE = 18;
+	int TYPE_ARRAY = 20;
+	int TYPE_ASSIGNMENT = 21;
+	int TYPE_COLLECT = 22;
+	int TYPE_CONDITION = 23;
+	int TYPE_FIRST = 24;
+	int TYPE_FLATTEN = 25;
+	int TYPE_FUNCTION = 26;
+	int TYPE_INTERSECT = 27;
+	int TYPE_LATEST = 28;
+	int TYPE_LIMIT = 29;
+	int TYPE_PIPE = 30;
+	int TYPE_SELECT = 31;
+	int TYPE_TRAVERSE = 32;
+	int TYPE_UNION = 33;
+	int TYPE_UNIQUE = 34;
+
+	/**
+	 * Let the visitor visit this instance and all expressions that this
+	 * instance contains.
+	 * @param visitor The visiting visitor.
+	 * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
+	 */
+	boolean accept(IExpressionVisitor visitor);
+
+	/**
+	 * Evaluate this expression with given context and variables.
+	 * @param context The evaluation context
+	 * @return The result of the evaluation.
+	 */
+	Object evaluate(IEvaluationContext context);
+
+	/**
+	 * Returns the expression type (see TYPE_xxx constants).
+	 */
+	int getExpressionType();
+
+	/**
+	 * Appends the string representation of this expression to the collector <code>collector</code>.
+	 */
+	void toString(StringBuffer collector);
+
+	/**
+	 * Appends the an LDAP filter representation of this expression to the <code>collector</code>.
+	 * @throws UnsupportedOperationException if the expression contains nodes
+	 * that cannot be represented in an LDAP filter
+	 */
+	void toLDAPString(StringBuffer collector);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
new file mode 100644
index 0000000..7a6701c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
@@ -0,0 +1,400 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import java.util.List;
+import java.util.Map;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.query.IQuery;
+
+/**
+ * This interface provides all the factory methods needed to create the
+ * nodes of the expression tree.
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented directly by clients.
+ * @noextend This interface is not intended to be extended directly by clients.
+ */
+public interface IExpressionFactory {
+	String FUNC_BOOLEAN = "boolean"; //$NON-NLS-1$
+	String FUNC_VERSION = "version"; //$NON-NLS-1$
+	String FUNC_CLASS = "class"; //$NON-NLS-1$
+	String FUNC_RANGE = "range"; //$NON-NLS-1$
+	String FUNC_FILTER = "filter"; //$NON-NLS-1$
+
+	IExpression[] NO_ARGS = new IExpression[0];
+
+	/**
+	 * Create a collection filter that yields true if the <code>lambda</code> yields true for
+	 * all of the elements of the <code>collection</code>
+	 * @param collection The collection providing the elements to test
+	 * @param lambda The lambda that performs the test
+	 * @return A boolean expression
+	 */
+	IExpression all(IExpression collection, IExpression lambda);
+
+	/**
+	 * Create a logical <i>and</i> of its <code>operands</code>.
+	 * @param operands The boolean operands
+	 * @return A boolean expression
+	 */
+	IExpression and(IExpression... operands);
+
+	/**
+	 * Creates an expression that represents a variable assignment
+	 * @param variable The variable
+	 * @param expression The expression that yields the value to assign to the variable
+	 * @return An assignment expression
+	 */
+	IExpression assignment(IExpression variable, IExpression expression);
+
+	/**
+	 * Create an expression that collects the result of evaluating each element in a new collection.
+	 * @param collection The collection providing the elements to evaluate
+	 * @param lambda The lambda that creates each new element
+	 * @return A collection expression
+	 */
+	IExpression collect(IExpression collection, IExpression lambda);
+
+	/**
+	 * Create an expression that first evaluates a <code>test</code> and then, depending on the outcome,
+	 * evaluates either <code>ifTrue</code> or <code>ifFalse</code>. The expression yields the result
+	 * of the <code>ifTrue</code> or <code>ifFalse</code> evaluation.
+	 * @param test The test
+	 * @param ifTrue The code to evaluate when the test evaluates to <code>true</code>
+	 * @param ifFalse The code to evaluate when the test evaluates to <code>false</code>
+	 * @return The conditional expression
+	 */
+	IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse);
+
+	/**
+	 * Create an expression that yields the first element of the
+	 * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
+	 * @param collection The collection providing the elements to test
+	 * @param lambda The lambda that performs the test
+	 * @return An element expression
+	 */
+	IExpression first(IExpression collection, IExpression lambda);
+
+	/**
+	 * Intended to be applied on collections of collections. Yields a single collection with
+	 * all elements from the source collections, in the order they are evaluated.
+	 * @param collection The collection providing the collections that provides all elements
+	 * @return A collection expression
+	 */
+	IExpression flatten(IExpression collection);
+
+	/**
+	 * Creates a lambda expression that takes more then one variable (currying). Suitable for use
+	 * in most collection expressions.
+	 * @param variable The element variable that the lambda uses
+	 * @param body The body of the lambda
+	 * @param initialAssignments Assignments to evaluate once before calling the body for each element.
+	 * @return A lambda expression with currying
+	 */
+	IExpression lambda(IExpression variable, IExpression[] initialAssignments, IExpression body);
+
+	/**
+	 * Creates a member call expression.
+	 * @param target The target for the member call
+	 * @param name The name of the member
+	 * @param args The arguments to use for the call
+	 * @return A member expression
+	 */
+	IExpression memberCall(IExpression target, String name, IExpression... args);
+
+	/**
+	 * <p>Recursively traverse and collect elements based on a condition</p>
+	 * <p>A common scenario in p2 is that you want to start with a set of roots and then find
+	 * all items that fulfill the root requirements. Those items in turn introduce new
+	 * requirements so you want to find them too. The process continues until no more
+	 * requirements can be satisfied. This type of query can be performed using the traverse
+	 * function.</p>
+	 * <p>The function will evaluate an expression, once for each element, collect
+	 * elements for which the evaluation returned true, then then re-evaluate using the
+	 * collected result as source of elements. No element is evaluated twice. This continues
+	 * until no more elements are found.</p>
+	 * @param collection The collection providing the elements to test
+	 * @param lambda The lambda that collects the children for the next iteration
+	 * @return A collection expression
+	 */
+	IExpression traverse(IExpression collection, IExpression lambda);
+
+	/**
+	 * Create an expression that yields a new collection where each element is unique. An
+	 * optional <code>cache</code> can be provided if the uniqueness should span a larger
+	 * scope then just the source collection.
+	 * @param collection The source collection
+	 * @param cache Optional cache to use when uniqueness should span over several invocations
+	 * @return A collection expression
+	 */
+	IExpression unique(IExpression collection, IExpression cache);
+
+	/**
+	 * Create an array of elements.
+	 * @param elements The elements of the array
+	 * @return An array expression
+	 */
+	IExpression array(IExpression... elements);
+
+	/**
+	 * Create an lookup of <code>key</code> in the <code>target</code>.
+	 * The key expression should evaluate to a string or an integer.
+	 * @param target The target for the lookup
+	 * @param key The key to use for the lookup
+	 * @return A lookup expression
+	 */
+	IExpression at(IExpression target, IExpression key);
+
+	/**
+	 * Create an evaluation context with one single variable
+	 * @param params Indexed parameters to use in the expression
+	 * @return the context
+	 */
+	IEvaluationContext createContext(Object... params);
+
+	/**
+	 * Create an evaluation context with one single variable
+	 * @param params Indexed parameters to use in the expression
+	 * @param variables The variables that will be maintained by the context
+	 * @return the context
+	 */
+	IEvaluationContext createContext(IExpression[] variables, Object... params);
+
+	/**
+	 * Creates an expression that evaluates to the constant <code>value</code>.
+	 * @param value The constant
+	 * @return A constant expression
+	 */
+	IExpression constant(Object value);
+
+	/**
+	 * Creates a top level expression that represents a full query.
+	 * @param expr The query
+	 * @param parameters The parameters of the query
+	 * @return A top level query expression
+	 */
+	<T> IContextExpression<T> contextExpression(IExpression expr, Object... parameters);
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> is equal to <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression equals(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Create a collection filter that yields true if the <code>lambda</code> yields true for
+	 * at least one of the elements of the <code>collection</code>
+	 * @param collection The collection providing the elements to test
+	 * @param lambda The lambda that performs the test
+	 * @return A boolean expression
+	 */
+	IExpression exists(IExpression collection, IExpression lambda);
+
+	/**
+	 * Creates a top level expression suitable for predicate matching
+	 * @param expression The boolean expression
+	 * @return A top level predicate expression
+	 */
+	IFilterExpression filterExpression(IExpression expression);
+
+	/**
+	 * Given one of the values in the map returned by {@link #getFunctionMap()}, this method
+	 * returns a function expression.
+	 * @param function The value obtained from the map.
+	 * @param args The arguments to evaluate and pass when evaluating the function.
+	 * @return A function expression
+	 */
+	IExpression function(Object function, IExpression... args);
+
+	/**
+	 * Returns a map of functions supported by this factory. The map is keyed by
+	 * function names and the value is an object suitable to pass to the {@link #function(Object, IExpression[])}
+	 * method.
+	 * @return A key/function map.
+	 */
+	Map<String, ? extends Object> getFunctionMap();
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> is greater than <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression greater(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> is greater than or equal to <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression greaterEqual(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Creates an indexed parameter expression
+	 * @param index The index to use
+	 * @return a parameter expression
+	 */
+	IExpression indexedParameter(int index);
+
+	/**
+	 * Create an <i>intersection</i> of <code>c1</code> and <code>c2</code> 
+	 * @param c1 first collection
+	 * @param c2 second collection
+	 * @return An intersect expression
+	 */
+	IExpression intersect(IExpression c1, IExpression c2);
+
+	/**
+	 * Creates a lambda expression that takes exactly one variable. Suitable for use
+	 * in most collection expressions.
+	 * @param variable The element variable that the lambda uses
+	 * @param body The body of the lambda
+	 * @return A lambda expression
+	 */
+	IExpression lambda(IExpression variable, IExpression body);
+
+	/**
+	 * Create an expression that yields a new collection consisting of the latest version of
+	 * the elements of the <code>collection</code>. Each element in <code>collection</code>
+	 * must implement the {@link IVersionedId} interface.
+	 * @param collection The collection providing the versioned elements
+	 * @return A collection expression
+	 */
+	IExpression latest(IExpression collection);
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> is less than <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression less(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> is less than or equal to <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression lessEqual(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Create an expression that yields a new collection consisting of the <i>count</i>
+	 * first elements of the source collection.
+	 * @param collection The source collection
+	 * @param count The element count limit
+	 * @return A collection expression
+	 */
+	IExpression limit(IExpression collection, int count);
+
+	/**
+	 * Create an expression that yields a new collection consisting of the <i>n</i> first
+	 * elements of the source collection where <i>n</i> is determined by <code>limit</code>.
+	 * @param collection The source collection
+	 * @param limit The expression that evaluates to the element count limit
+	 * @return A collection expression
+	 */
+	IExpression limit(IExpression collection, IExpression limit);
+
+	/**
+	 * Performs boolean normalization on the expression to create a canonical form.
+	 * @param operands The operands to normalize
+	 * @param expressionType The type (must be either {@link IExpression#TYPE_AND}
+	 * or {@link IExpression#TYPE_OR}.
+	 * @return The normalized expression
+	 */
+	IExpression normalize(List<? extends IExpression> operands, int expressionType);
+
+	/**
+	 * Create an expression that tests if <code>lhs</code> matches <code>rhs</code>.
+	 * @param lhs The left hand side value.
+	 * @param rhs The right hand side value.
+	 * @return A boolean expression
+	 */
+	IExpression matches(IExpression lhs, IExpression rhs);
+
+	/**
+	 * Creates a parameterized top level expression suitable for predicate matching
+	 * @param expression The boolean expression
+	 * @param parameters The parameters to use in the call
+	 * @return A top level predicate expression
+	 */
+	<T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters);
+
+	/**
+	 * Creates a member accessor expression.
+	 * @param target The target for the member access
+	 * @param name The name of the member
+	 * @return A member expression
+	 */
+	IExpression member(IExpression target, String name);
+
+	/**
+	 * Creates an expression that negates the result of evaluating its <code>operand</code>.
+	 * @param operand The boolean expression to negate
+	 * @return A boolean expression
+	 */
+	IExpression not(IExpression operand);
+
+	/**
+	 * Create a logical <i>or</i> of its <code>operands</code>.
+	 * @param operands The boolean operands
+	 * @return A boolean expression
+	 */
+	IExpression or(IExpression... operands);
+
+	/**
+	 * Create a pipe of expressions.
+	 * @param expressions The expressions that make out the pipe
+	 * @return A pipe expression
+	 */
+	IExpression pipe(IExpression... expressions);
+
+	/**
+	 * Create an expression that yields a new collection consisting of all elements of the
+	 * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
+	 * @param collection The collection providing the elements to test
+	 * @param lambda The lambda that performs the test
+	 * @return A collection expression
+	 */
+	IExpression select(IExpression collection, IExpression lambda);
+
+	/**
+	 * Returns the variable that represents <code>this</this> in an expression
+	 * @return The <code>this</this> variable.
+	 */
+	IExpression thisVariable();
+
+	/**
+	 * Wrap an {@link IQuery} as an expression.
+	 * @param query
+	 * @return An expression that wraps the query
+	 */
+	IExpression toExpression(IQuery<?> query);
+
+	/**
+	 * Create a <i>union</i> of <code>c1</code> and <code>c2</code> 
+	 * @param c1 first collection
+	 * @param c2 second collection
+	 * @return A union expression
+	 */
+	IExpression union(IExpression c1, IExpression c2);
+
+	/**
+	 * Creates an expression that represents a variable
+	 * @param name The name of the variable
+	 * @return A variable expression
+	 */
+	IExpression variable(String name);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
new file mode 100644
index 0000000..c9f43b3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+
+/**
+ * A parser that produces an expression tree based on a string representation. An
+ * implementation will use the {@link IExpressionFactory} to create the actual expressions
+ * @since 2.0
+ */
+public interface IExpressionParser {
+	/**
+	 * Create a new expression. The expression will have access to the global
+	 * variable 'this' and to the context parameters.
+	 * @param exprString The string representing the boolean expression.
+	 * @return The resulting expression tree.
+	 * @throws ExpressionParseException
+	 */
+	IExpression parse(String exprString);
+
+	/**
+	 * Create an arbitrary expression. The expression will have access to the global
+	 * variable 'everything' and to the context parameters.
+	 * @param exprString The string representing the boolean expression.
+	 * @return The resulting expression tree.
+	 * @throws ExpressionParseException
+	 */
+	IExpression parseQuery(String exprString);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
new file mode 100644
index 0000000..1c314d8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+/**
+ * A general purpose visitor that will visit each node in an expression tree.
+ * @since 2.0
+ */
+public interface IExpressionVisitor {
+	/**
+	 * The method that will be called for each expression that is
+	 * visited.
+	 * @param expression The expression that the visitor visits.
+	 * @return <code>true</code> to continue visiting other expressions or
+	 * <code>false</code> to break out.
+	 */
+	boolean visit(IExpression expression);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
new file mode 100644
index 0000000..8e5bcba
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import java.util.Map;
+import org.osgi.framework.Filter;
+
+/**
+ * An interface that combines the IExpression with the LDAP filter. The
+ * string representation is the LDAP filter syntax.
+ * @since 2.0
+ */
+public interface IFilterExpression extends IExpression, Filter {
+	/**
+	 * Filter using a <code>Map</code>. This <code>Filter</code> is
+	 * executed using the specified <code>Map</code>'s keys and values.
+	 * The keys are case insensitively matched with this <code>Filter</code>.
+	 * 
+	 * @param map The <code>Map</code> whose keys are used in the
+	 *        match.
+	 * @return <code>true</code> if the <code>map</code>'s keys and
+	 *         values match this filter; <code>false</code> otherwise.
+	 * @throws IllegalArgumentException If <code>map</code> contains case
+	 *         variants of the same key name.
+	 */
+	boolean match(Map<String, ? extends Object> map);
+
+	/**
+	 * Filter with case sensitivity using a <code>Map</code>. This
+	 * <code>Filter</code> is executed using the specified
+	 * <code>Map</code>'s keys and values. The keys are case sensitively
+	 * matched with this <code>Filter</code>.
+	 * 
+	 * @param map The <code>Map</code> whose keys are used in the
+	 *        match.
+	 * @return <code>true</code> if the <code>map</code>'s keys and
+	 *         values match this filter; <code>false</code> otherwise.
+	 */
+	boolean matchCase(Map<String, ? extends Object> map);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
new file mode 100644
index 0000000..ac425e9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+/**
+ * A match expression is a boolean expression matching a candidate of a
+ * specific type. An {@link IEvaluationContext} is needed in order to evaluate
+ * a match and this class provides two ways of doing that. Either a context
+ * is created first and then reused in several subsequent calls to
+ * {@link #isMatch(IEvaluationContext, Object)} or, if no repeated calls are
+ * expected, the {@link #isMatch(Object)} method can be used. It will then
+ * create a context on each call.
+ * @since 2.0
+ */
+public interface IMatchExpression<T> extends IExpression {
+	/**
+	 * <p>Creates a new context to be passed to repeated subsequent evaluations. The context
+	 * will introduce 'this' as an uninitialized variable and make the parameters available.
+	 * @return A new evaluation context.
+	 */
+	IEvaluationContext createContext();
+
+	/**
+	 * Returns the parameters that this match expression was created with.
+	 * @return An array of parameters, possibly empty but never <code>null</code>.
+	 */
+	Object[] getParameters();
+
+	/**
+	 * This method creates a new evaluation context and assigns the <code>candidate</code>
+	 * to the 'this' variable of the <code>context</code> and then evaluates the expression.
+	 * This is essentially a short form for <pre>isMatch(createContext(), candidate)</pre>.
+	 * @param candidate The object to test.
+	 * @return the result of the evaluation.
+	 */
+	boolean isMatch(T candidate);
+
+	/**
+	 * This method assigns <code>candidate</code> to the 'this' variable of the
+	 * <code>context</code> and then evaluates the expression.
+	 * @param context A context
+	 * @param candidate The object to test.
+	 * @return the result of the evaluation.
+	 */
+	boolean isMatch(IEvaluationContext context, T candidate);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
new file mode 100644
index 0000000..44cf39d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009 - 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+/**
+ * This interface may be implemented by any class that wants to provide easy
+ * (high performance) access to its member to the expression evaluator. It
+ * also gives the implementing class a way to hide or rename the members
+ * otherwise accessible using getters.
+ * @since 2.0
+ */
+public interface IMemberProvider {
+	/**
+	 * Returns the value for the specified member. Implementers can rely
+	 * on that the <code>memberName</code> is a string that has been
+	 * internalized using {@link String#intern()}.
+	 * @param memberName The name of the member
+	 * @return The member value.
+	 * @throws IllegalArgumentException if the instance has no member with
+	 * the given name.
+	 */
+	Object getMember(String memberName);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
new file mode 100644
index 0000000..0ba2c09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.expression;
+
+import java.io.Serializable;
+
+/**
+ * A simple compiled pattern. It supports two kinds of wildcards. The '*' (any character zero to many times)
+ * and the '?' (any character exactly one time).
+ * @since 2.0
+ */
+public class SimplePattern implements Serializable, Comparable<SimplePattern> {
+	private static final long serialVersionUID = -2477990705739062410L;
+
+	/**
+	 * Matches the <code>value</code> with the compiled expression. The value
+	 * is considered matching if all characters are matched by the expression. A
+	 * partial match is not enough.
+	 * @param value The value to match
+	 * @return <code>true</code> if the value was a match.
+	 */
+	public boolean isMatch(CharSequence value) {
+		if (node == null)
+			node = parse(pattern, 0);
+		return node.match(value, 0);
+	}
+
+	public String toString() {
+		return pattern;
+	}
+
+	public int compareTo(SimplePattern o) {
+		return pattern.compareTo(o.pattern);
+	}
+
+	public boolean equals(Object o) {
+		return o == this || (o instanceof SimplePattern && ((SimplePattern) o).pattern.equals(pattern));
+	}
+
+	public int hashCode() {
+		return 3 * pattern.hashCode();
+	}
+
+	private final String pattern;
+	private transient Node node;
+
+	private SimplePattern(String pattern) {
+		this.pattern = pattern;
+	}
+
+	static class AllNode extends Node {
+		boolean match(CharSequence value, int pos) {
+			return true;
+		}
+	}
+
+	static class RubberBandNode extends Node {
+		final Node next;
+
+		RubberBandNode(Node next) {
+			this.next = next;
+		}
+
+		boolean match(CharSequence value, int pos) {
+			int top = value.length();
+			String ending = next.getEndingConstant();
+			if (ending != null) {
+				// value must end with this constant. It will be faster
+				// to scan backwards from the end.
+				int clen = ending.length();
+				if (clen > top - pos)
+					return false;
+				while (clen > 0)
+					if (ending.charAt(--clen) != value.charAt(--top))
+						return false;
+				return true;
+			}
+
+			while (pos < top) {
+				if (next.match(value, pos++))
+					return true;
+			}
+			return false;
+		}
+	}
+
+	static class AnyCharacterNode extends Node {
+		final Node next;
+
+		AnyCharacterNode(Node next) {
+			this.next = next;
+		}
+
+		boolean match(CharSequence value, int pos) {
+			int top = value.length();
+			return next == null ? pos + 1 == top : next.match(value, pos + 1);
+		}
+	}
+
+	static class EndConstantNode extends Node {
+		final String constant;
+
+		EndConstantNode(String constant) {
+			this.constant = constant;
+		}
+
+		boolean match(CharSequence value, int pos) {
+			int max = constant.length() + pos;
+			int top = value.length();
+			if (top != max)
+				return false;
+
+			int idx = 0;
+			while (pos < max)
+				if (value.charAt(pos++) != constant.charAt(idx++))
+					return false;
+			return true;
+		}
+
+		String getEndingConstant() {
+			return constant;
+		}
+	}
+
+	static class ConstantNode extends Node {
+		final Node next;
+		final String constant;
+
+		ConstantNode(Node next, String constant) {
+			this.next = next;
+			this.constant = constant;
+		}
+
+		boolean match(CharSequence value, int pos) {
+			int max = constant.length() + pos;
+			int top = value.length();
+			if (top < max)
+				return false;
+
+			int idx = 0;
+			while (pos < max)
+				if (value.charAt(pos++) != constant.charAt(idx++))
+					return false;
+			return next == null ? (pos == top) : next.match(value, pos);
+		}
+	}
+
+	static abstract class Node {
+		abstract boolean match(CharSequence value, int pos);
+
+		String getEndingConstant() {
+			return null;
+		}
+	}
+
+	public static SimplePattern compile(String pattern) {
+		if (pattern == null)
+			throw new IllegalArgumentException("Pattern can not be null"); //$NON-NLS-1$
+		return new SimplePattern(pattern);
+	}
+
+	private static Node parse(String pattern, int pos) {
+		int top = pattern.length();
+		StringBuffer bld = null;
+		Node parsedNode = null;
+		while (pos < top) {
+			char c = pattern.charAt(pos);
+			switch (c) {
+				case '*' :
+					++pos;
+					parsedNode = pos == top ? new AllNode() : new RubberBandNode(parse(pattern, pos));
+					break;
+				case '?' :
+					parsedNode = new AnyCharacterNode(parse(pattern, pos + 1));
+					break;
+				case '\\' :
+					if (++pos == top)
+						throw new IllegalArgumentException("Pattern ends with escape"); //$NON-NLS-1$
+					c = pattern.charAt(pos);
+					// fall through
+				default :
+					if (bld == null)
+						bld = new StringBuffer();
+					bld.append(c);
+					++pos;
+					continue;
+			}
+			break;
+		}
+
+		if (bld != null) {
+			String constant = bld.toString();
+			parsedNode = parsedNode == null ? new EndConstantNode(constant) : new ConstantNode(parsedNode, constant);
+		}
+		return parsedNode;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
new file mode 100644
index 0000000..04c5240
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides a simple expression language used to represent requirements and filters in the metadada<h2>
+Package Specification</h2>
+<p>
+This package defines a simple expression language that is used to define requirements and filters in the metadata, but also form the base of the p2 query language.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
new file mode 100644
index 0000000..ebb8ce2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.index;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ * Indexed access to the elements provided by an IQueryable
+ * @since 2.0
+ */
+public interface IIndex<T> {
+	/**
+	 * Obtains the elements that are candidates for the given <code>booleanExpr</code> when applied
+	 * using the given <code>variable</code> as <code>this</code>.
+	 * The returned set of elements are the elements that must be present in order for the expression
+	 * to evaluate to <code>true</code>. The set may contain false positives.
+	 * 
+	 * TODO: Write more about how the valid set of elements is determined.
+	 * 
+	 * @param ctx The evaluation context used when examining the <code>booleanExpr</code>.
+	 * @param variable The variable used as <code>this</code>.
+	 * @param booleanExpr The boolean expression.
+	 * @return The candidate elements or <code>null</code> if this index cannot be used.
+	 */
+	Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
new file mode 100644
index 0000000..e85ec87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.index;
+
+import java.util.Iterator;
+
+/**
+ * An index provider is typically an IQueryable.
+ * @since 2.0
+ */
+public interface IIndexProvider<T> {
+	/**
+	 * Return an index optimized for producing candidates based on values
+	 * for a <code>memberName</code> that denotes a member of the index
+	 * type. 
+	 * @param memberName A member of type <code>T</code>.
+	 * @return An index or <code>null</code> if this provider does not support
+	 * this index.
+	 */
+	IIndex<T> getIndex(String memberName);
+
+	/**
+	 * Return the iterator that delivers all rows that the target query should
+	 * consider. This is used when no index can be found for any possible
+	 * member.
+	 * @return An iterator. Possibly empty but never <code>null</code>.
+	 */
+	Iterator<T> everything();
+
+	/**
+	 * Returns a property that this index manages on behalf of a <code>client</code> object.
+	 * Examples of this is the properties that a profile manages for installable
+	 * units.
+	 * @param client The client for which the property is managed. Typically an IU.
+	 * @param memberName The name of the managed properties, i.e. "profileProperties"
+	 * @param key The property key
+	 * @return The managed property value or <code>null</code> if no value could be found.
+	 */
+	Object getManagedProperty(Object client, String memberName, Object key);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
new file mode 100644
index 0000000..d944e85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.metadata.index;
+
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+
+/**
+ * An extension of the {@link IQuery} that allows use of indexes.
+ * @since 2.0
+ */
+public interface IQueryWithIndex<T> extends IQuery<T> {
+	/**
+	 * Evaluates the query using the <code>indexProvider</code>. The query
+	 * is first analyzed for index candidates (typically expressions like
+	 * id == <some value>) and if possible, indexes returned by
+	 * {@link IIndexProvider#getIndex(String)} will be used
+	 * in place of the iterator returned by {@link IIndexProvider#everything()}. 
+	 * 
+	 * @param indexProvider The provider of the material to evaluate the query on
+	 * @return The results of the query.
+	 */
+	IQueryResult<T> perform(IIndexProvider<T> indexProvider);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
new file mode 100644
index 0000000..3486d12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides classes for metadata query indexing
+<h2>
+Package Specification</h2>
+<p>
+This package provides API for creating and manipulating indices that are used
+to optimize queries against a particular queryable source.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
new file mode 100644
index 0000000..8b40121
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines the metadata being handled by p2.
+<h2>
+Package Specification</h2>
+<p>
+This API package defines the constructs being manipulated by p2 such as installable units.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
new file mode 100644
index 0000000..6edd2e0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.lang.reflect.Array;
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+
+/**
+ * This class allows to adapt java collections to a p2 a query result  and as such something queryable  
+ * @since 2.0
+ */
+public class CollectionResult<T> implements IQueryResult<T> {
+	private final Collection<T> collection;
+
+	public CollectionResult(Collection<T> collection) {
+		this.collection = collection == null ? CollectionUtils.<T> emptySet() : collection;
+	}
+
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		return query.perform(iterator());
+	}
+
+	public boolean isEmpty() {
+		return collection.isEmpty();
+	}
+
+	public Iterator<T> iterator() {
+		return collection.iterator();
+	}
+
+	public T[] toArray(Class<T> clazz) {
+		int size = collection.size();
+		@SuppressWarnings("unchecked")
+		T[] result = (T[]) Array.newInstance(clazz, size);
+		if (size != 0)
+			collection.toArray(result);
+		return result;
+	}
+
+	public Set<T> toSet() {
+		return new HashSet<T>(collection);
+	}
+
+	public Set<T> toUnmodifiableSet() {
+		return collection instanceof Set<?> ? Collections.<T> unmodifiableSet((Set<T>) collection) : toSet();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
new file mode 100644
index 0000000..c387ce7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.lang.reflect.Array;
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.Messages;
+
+/**
+ * A collector is a generic visitor that collects objects passed to it,
+ * and can then express the result of the visit in various forms. The collector
+ * can also short-circuit a traversal by returning <code>false</code> from
+ * its {@link #accept(Object)} method.
+ * <p>
+ * This default collector just accepts all objects passed to it.  Clients may subclass
+ * to perform different processing on the objects passed to it.
+ * @param <T> The type of object accepted by this collector
+ * @since 2.0
+ */
+public class Collector<T> implements IQueryResult<T> {
+	private Set<T> collected = null;
+
+	public static final Collector<?> EMPTY_COLLECTOR = new Collector<Object>() {
+		public boolean accept(Object val) {
+			return false;
+		}
+	};
+
+	@SuppressWarnings("unchecked")
+	public static final <T> Collector<T> emptyCollector() {
+		return (Collector<T>) EMPTY_COLLECTOR;
+	}
+
+	/**
+	 * Creates a new collector.
+	 */
+	public Collector() {
+		super();
+	}
+
+	/**
+	 * Accepts an object.
+	 * <p>
+	 * This default implementation adds the objects to a list. Clients may
+	 * override this method to perform additional filtering, add different objects 
+	 * to the list, short-circuit the traversal, or process the objects directly without 
+	 * collecting them.
+	 * 
+	 * @param object the object to collect or visit
+	 * @return <code>true</code> if the traversal should continue,
+	 * or <code>false</code> to indicate the traversal should stop.
+	 */
+	public boolean accept(T object) {
+		getCollection().add(object);
+		return true;
+	}
+
+	/**
+	 * Adds the elements from one collector to this collector
+	 * @param queryResult The collector from which the elements should be retrieved
+	 */
+	public void addAll(IQueryResult<T> queryResult) {
+		boolean keepGoing = true;
+		for (Iterator<T> iter = queryResult.iterator(); iter.hasNext() && keepGoing;) {
+			keepGoing = accept(iter.next());
+		}
+	}
+
+	/**
+	 * Returns the collection that is being used to collect results. Unlike {@linkplain #toSet()},
+	 * this returns the actual modifiable collection that is being used to store results. The
+	 * return value is only intended to be used within subclasses and should not be exposed
+	 * outside of a collection class.
+	 * 
+	 * @return the collection being used to collect results.
+	 */
+	protected Collection<T> getCollection() {
+		if (collected == null)
+			collected = new HashSet<T>();
+		return collected;
+	}
+
+	/**
+	 * Returns whether this collector is empty.
+	 * @return <code>true</code> if this collector has accepted any results,
+	 * and <code>false</code> otherwise.
+	 */
+	public boolean isEmpty() {
+		return collected == null || collected.isEmpty();
+	}
+
+	/**
+	 * Returns an iterator on the collected objects.
+	 * 
+	 * @return an iterator of the collected objects.
+	 */
+	public Iterator<T> iterator() {
+		return collected == null ? CollectionUtils.<T> emptyList().iterator() : collected.iterator();
+	}
+
+	/**
+	 * Returns the number of collected objects.
+	 */
+	public int size() {
+		return collected == null ? 0 : collected.size();
+	}
+
+	/**
+	 * Returns the collected objects as an array
+	 * 
+	 * @param clazz The type of array to return
+	 * @return The array of results
+	 * @throws ArrayStoreException the runtime type of the specified array is
+	 *         not a super-type of the runtime type of every collected object
+	 */
+	public T[] toArray(Class<T> clazz) {
+		int size = collected == null ? 0 : collected.size();
+		@SuppressWarnings("unchecked")
+		T[] result = (T[]) Array.newInstance(clazz, size);
+		if (size != 0)
+			collected.toArray(result);
+		return result;
+	}
+
+	/**
+	 * Returns a copy of the collected objects.
+	 * 
+	 * @return An unmodifiable collection of the collected objects
+	 */
+	public Set<T> toSet() {
+		return collected == null ? new HashSet<T>() : new HashSet<T>(collected);
+	}
+
+	/**
+	 * Performs a query on this results of this collector.  
+	 */
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		IQueryResult<T> result;
+		if (monitor == null)
+			monitor = new NullProgressMonitor();
+		try {
+			monitor.beginTask(Messages.performing_subquery, 1);
+			result = query.perform(iterator());
+			monitor.worked(1);
+		} finally {
+			monitor.done();
+		}
+		return result;
+	}
+
+	/**
+	 * Returns the collected objects as an immutable collection.
+	 * 
+	 * @return An unmodifiable collection of the collected objects
+	 */
+	@SuppressWarnings("unchecked")
+	public Set<T> toUnmodifiableSet() {
+		return collected == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(collected);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
new file mode 100644
index 0000000..dab517c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
@@ -0,0 +1,167 @@
+/******************************************************************************* 
+* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.*;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
+import org.eclipse.equinox.internal.p2.metadata.index.CompoundIndex;
+import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.KeyWithLocale;
+import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+
+/**
+ * A queryable that holds a number of other IQueryables and provides
+ * a mechanism for querying the entire set.
+ * @since 2.0
+ */
+public final class CompoundQueryable<T> extends IndexProvider<T> {
+
+	static class PassThroughIndex<T> implements IIndex<T> {
+		private final Iterator<T> iterator;
+
+		public PassThroughIndex(Iterator<T> iterator) {
+			this.iterator = iterator;
+		}
+
+		public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
+			return iterator;
+		}
+	}
+
+	private IQueryable<T>[] queryables;
+
+	public CompoundQueryable(IQueryable<T>[] queryables) {
+		this.queryables = queryables;
+	}
+
+	/**
+	 * Creates a queryable that combines the given collection of input queryables
+	 * 
+	 * @param queryables The collection of queryables to be combined
+	 */
+	@SuppressWarnings("unchecked")
+	CompoundQueryable(Collection<? extends IQueryable<T>> queryables) {
+		this(queryables.toArray(new IQueryable[queryables.size()]));
+	}
+
+	/**
+	 * Creates a queryable that combines the two provided input queryables
+	 * 
+	 * @param query1 The first queryable
+	 * @param query2 The second queryable
+	 */
+	@SuppressWarnings("unchecked")
+	CompoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
+		this(new IQueryable[] {query1, query2});
+	}
+
+	public IIndex<T> getIndex(String memberName) {
+		// Check that at least one of the queryable can present an index
+		// for the given member.
+		boolean found = false;
+		for (IQueryable<T> queryable : queryables) {
+			if (queryable instanceof IIndexProvider<?>) {
+				@SuppressWarnings("unchecked")
+				IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
+				if (ip.getIndex(memberName) != null) {
+					found = true;
+					break;
+				}
+			}
+		}
+
+		if (!found)
+			// Nobody had an index for this member
+			return null;
+
+		ArrayList<IIndex<T>> indexes = new ArrayList<IIndex<T>>(queryables.length);
+		for (IQueryable<T> queryable : queryables) {
+			if (queryable instanceof IIndexProvider<?>) {
+				@SuppressWarnings("unchecked")
+				IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
+				IIndex<T> index = ip.getIndex(memberName);
+				if (index != null)
+					indexes.add(index);
+				else
+					indexes.add(new PassThroughIndex<T>(ip.everything()));
+			} else {
+				indexes.add(new PassThroughIndex<T>(getIteratorFromQueryable(queryable)));
+			}
+		}
+		return indexes.size() == 1 ? indexes.get(0) : new CompoundIndex<T>(indexes);
+	}
+
+	public Iterator<T> everything() {
+		if (queryables.length == 0)
+			return CollectionUtils.<T> emptySet().iterator();
+
+		if (queryables.length == 1)
+			return getIteratorFromQueryable(queryables[0]);
+
+		ArrayList<Iterator<T>> iterators = new ArrayList<Iterator<T>>(queryables.length);
+		for (IQueryable<T> queryable : queryables)
+			iterators.add(getIteratorFromQueryable(queryable));
+		return new CompoundIterator<T>(iterators.iterator());
+	}
+
+	public Object getManagedProperty(Object client, String memberName, Object key) {
+		for (IQueryable<T> queryable : queryables) {
+			if (queryable instanceof IIndexProvider<?>) {
+				@SuppressWarnings("unchecked")
+				IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
+				Object value = ip.getManagedProperty(client, memberName, key);
+				if (value != null)
+					return value;
+			}
+		}
+
+		// When asked for translatedProperties we should return from the IU when the property is not found.
+		if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
+			IInstallableUnit iu = (IInstallableUnit) client;
+			return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
+		}
+		return null;
+	}
+
+	static class IteratorCapture<T> implements IQuery<T> {
+		private Iterator<T> capturedIterator;
+
+		public IQueryResult<T> perform(Iterator<T> iterator) {
+			capturedIterator = iterator;
+			return Collector.emptyCollector();
+		}
+
+		public IExpression getExpression() {
+			return null;
+		}
+
+		Iterator<T> getCapturedIterator() {
+			return capturedIterator == null ? CollectionUtils.<T> emptySet().iterator() : capturedIterator;
+		}
+	}
+
+	private static <T> Iterator<T> getIteratorFromQueryable(IQueryable<T> queryable) {
+		if (queryable instanceof IIndexProvider<?>) {
+			@SuppressWarnings("unchecked")
+			IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
+			return ip.everything();
+		}
+		IteratorCapture<T> capture = new IteratorCapture<T>();
+		queryable.query(capture, new NullProgressMonitor());
+		return capture.getCapturedIterator();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
new file mode 100644
index 0000000..b81bcfe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.index.*;
+
+/**
+ * A query that matches candidates against an expression.
+ * @since 2.0
+ */
+public class ExpressionMatchQuery<T> implements IMatchQuery<T>, IQueryWithIndex<T> {
+	private final IMatchExpression<T> expression;
+	private final Class<? extends T> matchingClass;
+	private final IEvaluationContext context;
+	private final List<String> indexedMembers;
+
+	public ExpressionMatchQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
+		this.matchingClass = matchingClass;
+		this.expression = ExpressionUtil.getFactory().<T> matchExpression(expression, parameters);
+		this.context = this.expression.createContext();
+		this.indexedMembers = Expression.getIndexCandidateMembers(matchingClass, ExpressionFactory.THIS, (Expression) expression);
+	}
+
+	public ExpressionMatchQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
+		this(matchingClass, ExpressionUtil.parse(expression), parameters);
+	}
+
+	public IEvaluationContext getContext() {
+		return context;
+	}
+
+	public Class<? extends T> getMatchingClass() {
+		return matchingClass;
+	}
+
+	public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
+		if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
+			return new QueryResult<T>(RepeatableIterator.create(indexProvider));
+		Iterator<T> iterator = null;
+		int top = indexedMembers.size();
+		for (int idx = 0; idx < top; ++idx) {
+			IIndex<T> index = indexProvider.getIndex(indexedMembers.get(idx));
+			if (index != null) {
+				iterator = index.getCandidates(context, ExpressionFactory.THIS, expression);
+				if (iterator != null)
+					break;
+			}
+		}
+		if (iterator == null)
+			iterator = RepeatableIterator.create(indexProvider);
+		context.setIndexProvider(indexProvider);
+		return perform(iterator);
+	}
+
+	public IQueryResult<T> perform(Iterator<T> iterator) {
+		if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
+			return new QueryResult<T>(iterator);
+
+		HashSet<T> result = null;
+		while (iterator.hasNext()) {
+			T value = iterator.next();
+			if (isMatch(value)) {
+				if (result == null)
+					result = new HashSet<T>();
+				result.add(value);
+			}
+		}
+		return result == null ? Collector.<T> emptyCollector() : new CollectionResult<T>(result);
+	}
+
+	public boolean isMatch(T candidate) {
+		if (!matchingClass.isInstance(candidate))
+			return false;
+		ExpressionFactory.THIS.setValue(context, candidate);
+		return Boolean.TRUE == expression.evaluate(context);
+	}
+
+	public IMatchExpression<T> getExpression() {
+		return expression;
+	}
+
+	public void setIndexProvider(IIndexProvider<T> indexProvider) {
+		context.setIndexProvider(indexProvider);
+	}
+
+	public void prePerform() { //
+	}
+
+	public void postPerform() { //
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
new file mode 100644
index 0000000..8ec52f4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+
+import java.util.Iterator;
+import org.eclipse.equinox.internal.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
+import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
+
+/**
+ * A query that evaluates using an iterator as input and produces a new iterator.
+ * @since 2.0
+ */
+public class ExpressionQuery<T> implements IQueryWithIndex<T> {
+	private final IContextExpression<T> expression;
+	private final Class<? extends T> elementClass;
+
+	public ExpressionQuery(Class<? extends T> elementClass, IExpression expression, Object... parameters) {
+		this.elementClass = elementClass;
+		this.expression = ExpressionUtil.getFactory().<T> contextExpression(expression, parameters);
+	}
+
+	public ExpressionQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
+		this(matchingClass, ExpressionUtil.parseQuery(expression), parameters);
+	}
+
+	public Class<? extends T> getElementClass() {
+		return elementClass;
+	}
+
+	public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
+		return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, indexProvider)));
+	}
+
+	public IQueryResult<T> perform(Iterator<T> iterator) {
+		return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, iterator)));
+	}
+
+	public IContextExpression<T> getExpression() {
+		return expression;
+	}
+
+	public static <T> Class<? extends T> getElementClass(IQuery<T> query) {
+		@SuppressWarnings("unchecked")
+		Class<? extends T> elementClass = (Class<T>) Object.class;
+		if (query instanceof ExpressionMatchQuery<?>)
+			elementClass = ((ExpressionMatchQuery<T>) query).getMatchingClass();
+		else if (query instanceof ExpressionQuery<?>)
+			elementClass = ((ExpressionQuery<T>) query).getElementClass();
+		return elementClass;
+	}
+
+	public static <T> IContextExpression<T> createExpression(IQuery<T> query) {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		IExpression expr = query.getExpression();
+		Object[] parameters;
+		if (expr == null) {
+			expr = factory.toExpression(query);
+			if (query instanceof IMatchQuery<?>)
+				expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
+			parameters = new Object[0];
+		} else {
+			if (expr instanceof MatchExpression<?>) {
+				MatchExpression<?> matchExpr = (MatchExpression<?>) expr;
+				parameters = matchExpr.getParameters();
+				expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, matchExpr.operand));
+			} else if (expr instanceof ContextExpression<?>) {
+				ContextExpression<?> contextExpr = (ContextExpression<?>) expr;
+				parameters = contextExpr.getParameters();
+				expr = contextExpr.operand;
+			} else
+				parameters = new Object[0];
+		}
+		return factory.contextExpression(expr, parameters);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
new file mode 100644
index 0000000..e0a6413
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
@@ -0,0 +1,43 @@
+/******************************************************************************* 
+* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+/**
+ * A query in which the elements can be evaluated by calling isMatch on. Each
+ * element can be evaluated independently of all other elements.  Match queries
+ * can be evaluated in parallel as each call {@link #isMatch(Object)} is mutually
+ * exclusive from all other calls. <P>
+ * 
+ * @noimplement This interface is not intended to be implemented by clients. Clients
+ * creating custom queries must extend {@link ExpressionMatchQuery}.
+ * @deprecated If possible, use one of the predefined queries in {@link QueryUtil} or 
+ * use the {@link QueryUtil#createMatchQuery(String, Object...)}
+ * to create a custom expression based query. If the query cannot be expressed using
+ * the p2QL, then use a predefined or custom expression query as a first filter
+ * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
+ * like so:<pre>
+ * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
+ *   // do your match here
+ * }</pre>
+ * @since 2.0
+ */
+public interface IMatchQuery<T> extends IQuery<T> {
+
+	/**
+	 * Returns whether the given object satisfies the parameters of this query.
+	 * 
+	 * @param candidate The object to perform the query against
+	 * @return <code>true</code> if the unit satisfies the parameters
+	 * of this query, and <code>false</code> otherwise
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public boolean isMatch(T candidate);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
new file mode 100644
index 0000000..14860a5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ * The root interface for all queries that can be performed on an {@link IQueryable}.
+ * A query is a piece of logic that selects some objects from a list of provided
+ * inputs using some established criteria.
+ * <p>
+ * Any given query must be stable - running the same query on the same inputs
+ * must return an equal query result each time the query is executed. Thus a client
+ * that has performed a query can freely cache the result as long as they know the
+ * query input has not changed.
+ * </p>
+ * 
+ * @param <T> The type of input object that this query accepts
+ * @noimplement This interface is not intended to be implemented directly by clients.
+ * @noextend This interface is not intended to be extended directly by clients.
+ * @since 2.0
+ */
+public interface IQuery<T> {
+	/**
+	 * Evaluates the query for a specific input.  
+	 * 
+	 * @param iterator The elements for which to evaluate the query on
+	 * @return The results of the query.
+	 */
+	IQueryResult<T> perform(Iterator<T> iterator);
+
+	/**
+	 * Returns the IExpression backing this query or <code>null</code> if
+	 * this is not an expression query.
+	 * @return An expression or <code>null</code>.
+	 */
+	IExpression getExpression();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
new file mode 100644
index 0000000..0f7ce76
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
@@ -0,0 +1,57 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * An IQueryResult represents the results of a query.  
+ * 
+ * @since 2.0
+ */
+public interface IQueryResult<T> extends IQueryable<T> {
+	/**
+	 * Returns whether this QueryResult  is empty.
+	 * @return <code>true</code> if this QueryResult has accepted any results,
+	 * and <code>false</code> otherwise.
+	 */
+	public boolean isEmpty();
+
+	/**
+	 * Returns an iterator on the collected objects.
+	 * 
+	 * @return an iterator of the collected objects.
+	 */
+	public Iterator<T> iterator();
+
+	/**
+	 * Returns the collected objects as an array
+	 * 
+	 * @param clazz The type of array to return
+	 * @return The array of results
+	 * @throws ArrayStoreException the runtime type of the specified array is
+	 *         not a super-type of the runtime type of every collected object
+	 */
+	public T[] toArray(Class<T> clazz);
+
+	/**
+	 * Creates a new Set copy with the contents of this query result. The
+	 * copy can be altered without any side effects on its origin.
+	 * @return A detached copy of the result.
+	 */
+	public Set<T> toSet();
+
+	/**
+	 * Returns a Set backed by this query result. The set is immutable.
+	 * @return A Set backed by this query result.
+	 */
+	public Set<T> toUnmodifiableSet();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
new file mode 100644
index 0000000..22b4d8b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * An IQueryable contains objects, and is able to perform queries on those objects.
+ * <p>
+ * This interface may be implemented by clients.
+ * @since 2.0
+ */
+public interface IQueryable<T> {
+	/**
+	 * Performs a query, passing any objects that satisfy the
+	 * query to the provided collector.
+	 * <p>
+	 * This method is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * </p>
+	 * 
+	 * @param query The query to perform
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The collector argument
+	 */
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
new file mode 100644
index 0000000..f320f7e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
@@ -0,0 +1,100 @@
+/******************************************************************************* 
+* Copyright (c) 2009, 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+*   IBM Corporation - ongoing development
+******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.Iterator;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ * This class represents a simple Java-based query. Clients may subclass and
+ * override the {@link #isMatch(Object)} method in order to write simple
+ * queries against p2 metadata.
+ * <p>
+ * Note that hand-written queries cannot be optimized for queryables containing
+ * indices, or for remote queryables. In general you should use one of the pre-defined
+ * queries found in {@link QueryUtil} if possible, to obtain queries optimized for indexing and
+ * remote execution. This class is intended for simple queries against small data
+ * sources where indexed lookup and remote query execution are not needed.
+ * </p>
+ * @deprecated If possible, use one of the predefined queries in {@link QueryUtil} 
+ * or use the {@link QueryUtil#createMatchQuery(String, Object...)}
+ * to create a custom expression based query. If the query cannot be expressed using
+ * the p2QL, then use a predefined or custom expression query as a first filter
+ * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
+ * like so:<pre>
+ * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
+ *   // do your match here
+ * }</pre>
+ * @since 2.0
+ */
+public abstract class MatchQuery<T> implements IMatchQuery<T> {
+
+	/**
+	 * Returns whether the given object satisfies the parameters of this query.
+	 * 
+	 * @param candidate The object to perform the query against
+	 * @return <code>true</code> if the unit satisfies the parameters
+	 * of this query, and <code>false</code> otherwise
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 * Clients should call {@link #perform(Iterator)}
+	 */
+	public abstract boolean isMatch(T candidate);
+
+	/**
+	 * Performs this query on the given iterator, passing all objects in the iterator 
+	 * that match the criteria of this query to the given result.
+	 */
+	public final IQueryResult<T> perform(Iterator<T> iterator) {
+		Collector<T> result = new Collector<T>();
+		while (iterator.hasNext()) {
+			T candidate = iterator.next();
+			if (candidate != null && isMatch(candidate))
+				if (!result.accept(candidate))
+					break;
+		}
+		return result;
+	}
+
+	/**
+	 * Execute any pre-processing that must be done before this query is performed against
+	 * a particular iterator.  This method may be used by subclasses to do any calculations,
+	 * caching, or other preparation for the query.
+	 * <p>
+	 * This method is internal to the framework.  Subclasses may override this method, but
+	 * should not call this method.
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void prePerform() {
+		// nothing to do by default
+	}
+
+	/**
+	 * Execute any post-processing that must be done after this query has been performed against
+	 * a particular iterator.  This method may be used by subclasses to clear caches or any other
+	 * cleanup that should occur after a query.  
+	 * <p>
+	 * This method will be called even if the query does not complete successfully.
+	 * <p>
+	 * This method is internal to the framework.  Subclasses may override this method, but
+	 * should not call this method.
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void postPerform() {
+		// nothing to do by default
+	}
+
+	public IExpression getExpression() {
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
new file mode 100644
index 0000000..5b4c54c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
@@ -0,0 +1,519 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.query;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.expression.ContextExpression;
+import org.eclipse.equinox.internal.p2.metadata.expression.ExpressionFactory;
+import org.eclipse.equinox.internal.p2.metadata.expression.Expression.VariableFinder;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.*;
+
+/**
+ * Helper class for query related tasks.
+ * @since 2.0
+ */
+public class QueryUtil {
+
+	public static final IQuery<IInstallableUnit> ALL_UNITS = QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
+
+	public static final String ANY = "*"; //$NON-NLS-1$
+
+	public static final IQuery<IInstallableUnit> NO_UNITS = QueryUtil.createQuery("limit(0)"); //$NON-NLS-1$
+
+	public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
+
+	public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
+
+	public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
+
+	private static final IExpression matchesRequirementsExpression = ExpressionUtil.parse("$0.exists(r | this ~= r)"); //$NON-NLS-1$
+
+	private static final IExpression matchIU_ID = ExpressionUtil.parse("id == $0"); //$NON-NLS-1$
+	private static final IExpression matchIU_IDAndRange = ExpressionUtil.parse("id == $0 && version ~= $1"); //$NON-NLS-1$
+	private static final IExpression matchIU_IDAndVersion = ExpressionUtil.parse("id == $0 && version == $1"); //$NON-NLS-1$
+	private static final IExpression matchIU_Range = ExpressionUtil.parse("version ~= $0"); //$NON-NLS-1$
+	private static final IExpression matchIU_Version = ExpressionUtil.parse("version == $0"); //$NON-NLS-1$
+	private static final IExpression matchIU_propAny = ExpressionUtil.parse("properties[$0] != null"); //$NON-NLS-1$
+	private static final IExpression matchIU_propNull = ExpressionUtil.parse("properties[$0] == null"); //$NON-NLS-1$
+	private static final IExpression matchIU_propTrue = ExpressionUtil.parse("properties[$0] == true"); //$NON-NLS-1$
+	private static final IExpression matchIU_propValue = ExpressionUtil.parse("properties[$0] == $1"); //$NON-NLS-1$
+
+	/**
+	 * Creates a queryable that combines the given collection of input queryables
+	 * 
+	 * @param queryables The collection of queryables to be combined
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> IQueryable<T> compoundQueryable(Collection<? extends IQueryable<T>> queryables) {
+		return new CompoundQueryable<T>(queryables.toArray(new IQueryable[queryables.size()]));
+	}
+
+	/**
+	 * Creates a queryable that combines the two provided input queryables
+	 * 
+	 * @param query1 The first queryable
+	 * @param query2 The second queryable
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> IQueryable<T> compoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
+		return new CompoundQueryable<T>(new IQueryable[] {query1, query2});
+	}
+
+	/**
+	 * Creates a compound query that combines the given queries. If all queries
+	 * are candidate match queries, then the queries will be concatenated as a
+	 * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
+	 * flag. If at least one query is a full query, all queries will instead be evaluated
+	 * using intersection when <code>and</code> is <code>true</code> or a union.
+	 * 
+	 * @param queries The queries to perform
+	 * @param and <code>true</code> if this query represents an intersection or a
+	 * logical 'and', and <code>false</code> if this query represents a union or
+	 * a logical 'or'.
+	 * @return A compound query
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> IQuery<T> createCompoundQuery(Collection<? extends IQuery<? extends T>> queries, boolean and) {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		int top = queries.size();
+		if (top == 1)
+			return (IQuery<T>) queries.iterator().next();
+
+		Class<? extends T> elementClass = (Class<T>) Object.class;
+		if (top == 0)
+			return QueryUtil.<T> createMatchQuery(elementClass, ExpressionUtil.TRUE_EXPRESSION);
+
+		IExpression[] expressions = new IExpression[top];
+		boolean justBooleans = true;
+		boolean justContexts = true;
+		int idx = 0;
+		for (IQuery<? extends T> query : queries) {
+			if (query instanceof IMatchQuery<?>)
+				justContexts = false;
+			else
+				justBooleans = false;
+
+			IExpression expr = query.getExpression();
+			if (expr == null)
+				expr = factory.toExpression(query);
+
+			Class<? extends T> ec = ExpressionQuery.getElementClass(query);
+			if (elementClass == null)
+				elementClass = ec;
+			else if (elementClass != ec) {
+				if (elementClass.isAssignableFrom(ec)) {
+					if (and)
+						// Use most restrictive class
+						elementClass = ec;
+				} else if (ec.isAssignableFrom(elementClass)) {
+					if (!and)
+						// Use least restrictive class
+						elementClass = ec;
+				}
+			}
+			expressions[idx++] = expr;
+		}
+
+		if (justBooleans) {
+			IExpression compound = and ? factory.and(expressions) : factory.or(expressions);
+			return QueryUtil.<T> createMatchQuery(elementClass, compound);
+		}
+
+		if (!justContexts) {
+			// Mix of boolean queries and context queries. All must be converted into context then.
+			for (idx = 0; idx < expressions.length; ++idx)
+				expressions[idx] = makeContextExpression(factory, expressions[idx]);
+		}
+
+		IExpression compound = expressions[0];
+		for (idx = 1; idx < expressions.length; ++idx)
+			compound = and ? factory.intersect(compound, expressions[idx]) : factory.union(compound, expressions[idx]);
+		return QueryUtil.<T> createQuery(elementClass, compound);
+	}
+
+	/**
+	 * Creates a compound query that combines the two queries. If both queries
+	 * are candidate match queries, then the queries will be concatenated as a
+	 * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
+	 * flag. If at least one query is a full query, all queries will instead be evaluated
+	 * using intersection when <code>and</code> is <code>true</code> or a union.
+	 * 
+	 * @param query1 the first query
+	 * @param query2 the second query
+	 * @param and <code>true</code> if this query represents an intersection or a
+	 * logical 'and', and <code>false</code> if this query represents a union or
+	 * a logical 'or'.
+	 * @return A compound query
+	 */
+	public static <T> IQuery<T> createCompoundQuery(IQuery<? extends T> query1, IQuery<T> query2, boolean and) {
+		ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
+		queries.add(query1);
+		queries.add(query2);
+		return createCompoundQuery(queries, and);
+	}
+
+	/**
+	 * Returns a query that matches all {@link InstallableUnit} elements
+	 */
+	public static IQuery<IInstallableUnit> createIUAnyQuery() {
+		return ALL_UNITS;
+	}
+
+	/**
+	 * Creates a new query that will return the members of the
+	 * given <code>category</code>.  If the specified {@link IInstallableUnit} 
+	 * is not a category, then no installable unit will satisfy the query. 
+	 * 
+	 * @param category The category
+	 * @return A query that returns category members
+	 */
+	public static IQuery<IInstallableUnit> createIUCategoryMemberQuery(IInstallableUnit category) {
+		if (QueryUtil.isCategory(category))
+			return QueryUtil.createMatchQuery(matchesRequirementsExpression, category.getRequirements());
+		return NO_UNITS;
+	}
+
+	/**
+	 * Creates a query matching every {@link IInstallableUnit} that is a category.
+	 * @return The query that matches categories
+	 * @since 2.0 
+	 */
+	public static IQuery<IInstallableUnit> createIUCategoryQuery() {
+		return createIUPropertyQuery(QueryUtil.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
+	}
+
+	/**
+	 * Creates a query matching every {@link IInstallableUnit} that is a group. 
+	 * @return a query that matches all groups
+	 */
+	public static IQuery<IInstallableUnit> createIUGroupQuery() {
+		return createIUPropertyQuery(PROP_TYPE_GROUP, Boolean.TRUE.toString());
+	}
+
+	/**
+	 * Creates an {@link IInstallableUnit} that will match all patches.
+	 * @return The created query
+	 */
+	public static IQuery<IInstallableUnit> createIUPatchQuery() {
+		return createIUPropertyQuery(QueryUtil.PROP_TYPE_PATCH, Boolean.TRUE.toString());
+	}
+
+	/**
+	 * Creates a query that searches for {@link IInstallableUnit} instances that have
+	 * a property whose value matches the provided value.  If no property name is 
+	 * specified, then all {@link IInstallableUnit} instances are accepted.
+	 * @param propertyName The key of the property to match or <code>null</code> to match all
+	 * @param propertyValue The value of the property. Can be {@link #ANY} to match all values
+	 * except <code>null</code>
+	 * @return The query matching properties
+	 */
+	public static IQuery<IInstallableUnit> createIUPropertyQuery(String propertyName, String propertyValue) {
+		if (propertyName == null)
+			return QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
+		if (propertyValue == null)
+			return QueryUtil.createMatchQuery(matchIU_propNull, propertyName);
+		if (ANY.equals(propertyValue))
+			return QueryUtil.createMatchQuery(matchIU_propAny, propertyName);
+		if (Boolean.valueOf(propertyValue).booleanValue())
+			return QueryUtil.createMatchQuery(matchIU_propTrue, propertyName);
+		return QueryUtil.createMatchQuery(matchIU_propValue, propertyName, propertyValue);
+	}
+
+	/**
+	 * Creates a query that will match any {@link IInstallableUnit} with the given
+	 * id and version.
+	 * 
+	 * @param versionedId The precise id/version combination that a matching unit must have
+	 * @return a query that matches IU's by id and version
+	 */
+	public static IQuery<IInstallableUnit> createIUQuery(IVersionedId versionedId) {
+		return createIUQuery(versionedId.getId(), versionedId.getVersion());
+	}
+
+	/**
+	 * Creates a query that will match any {@link IInstallableUnit} with the given
+	 * id, regardless of version.
+	 * 
+	 * @param id The installable unit id to match, or <code>null</code> to match any id
+	 * @return a query that matches IU's by id
+	 */
+	public static IQuery<IInstallableUnit> createIUQuery(String id) {
+		return id == null ? ALL_UNITS : QueryUtil.createMatchQuery(matchIU_ID, id);
+	}
+
+	/**
+	 * Creates a query that will match any {@link IInstallableUnit} with the given
+	 * id and version.
+	 * 
+	 * @param id The installable unit id to match, or <code>null</code> to match any id
+	 * @param version The precise version that a matching unit must have or <code>null</code>
+	 * to match any version
+	 * @return a query that matches IU's by id and version
+	 */
+	public static IQuery<IInstallableUnit> createIUQuery(String id, Version version) {
+		if (version == null || version.equals(Version.emptyVersion))
+			return createIUQuery(id);
+		if (id == null)
+			return QueryUtil.createMatchQuery(matchIU_Version, version);
+		return QueryUtil.createMatchQuery(matchIU_IDAndVersion, id, version);
+	}
+
+	/**
+	 * Creates a query that will match any {@link IInstallableUnit} with the given
+	 * id, and whose version falls in the provided range.
+	 * 
+	 * @param id The installable unit id to match, or <code>null</code> to match any id
+	 * @param range The version range to match or <code>null</code> to match any range.
+	 * @return a query that matches IU's by id and range
+	 */
+	public static IQuery<IInstallableUnit> createIUQuery(String id, VersionRange range) {
+		if (range == null || range.equals(VersionRange.emptyRange))
+			return createIUQuery(id);
+		if (id == null)
+			return QueryUtil.createMatchQuery(matchIU_Range, range);
+		return QueryUtil.createMatchQuery(matchIU_IDAndRange, id, range);
+	}
+
+	/**
+	 * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}.  
+	 * All other elements are discarded.
+	 * @return A query matching the latest version for each id.
+	 */
+	public static IQuery<IInstallableUnit> createLatestIUQuery() {
+		return QueryUtil.createQuery(ExpressionUtil.getFactory().latest(ExpressionFactory.EVERYTHING));
+	}
+
+	/**
+	 * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}
+	 * from the collection produced by <code>query</code>. 
+	 * All other elements are discarded.
+	 * @param query The query that precedes the latest query when evaluating.
+	 * @return A query matching the latest version for each id.
+	 */
+	public static <T extends IVersionedId> IQuery<T> createLatestQuery(IQuery<T> query) {
+		IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		@SuppressWarnings("unchecked")
+		Class<T> elementClass = (Class<T>) IVersionedId.class;
+		return QueryUtil.createQuery(elementClass, factory.latest(((ContextExpression<?>) ctxExpr).operand), ctxExpr.getParameters());
+	}
+
+	/**
+	 * Creates a limit query that can be used to limit the number of query results returned.  Once
+	 * the limit is reached, the query is terminated.
+	 * @param query The query that should be limited
+	 * @param limit A positive integer denoting the limit
+	 * @return A limited query
+	 * @since 2.0
+	 */
+	public static <T> IQuery<T> createLimitQuery(IQuery<T> query, int limit) {
+		IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		return QueryUtil.createQuery(ExpressionQuery.getElementClass(query), factory.limit(((ContextExpression<T>) ctxExpr).operand, limit), ctxExpr.getParameters());
+	}
+
+	/**
+	 * Creates an {@link IInstallableUnit} query that will iterate over all candidates and discriminate by
+	 * applying the boolean <code>matchExpression</code> on each candidate.
+	 * @param matchExpression The boolean expression used for filtering one candidate
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static IQuery<IInstallableUnit> createMatchQuery(IExpression matchExpression, Object... parameters) {
+		return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
+	}
+
+	/**
+	 * Parses the <code>matchExpression</code> and creates an {@link IInstallableUnit} query that will
+	 * iterate over all candidates and discriminate by applying the boolean <code>matchExpression</code>
+	 * on each candidate.
+	 * @param matchExpression The boolean expression used for filtering one candidate
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static IQuery<IInstallableUnit> createMatchQuery(String matchExpression, Object... parameters) {
+		return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
+	}
+
+	/**
+	 * Creates an query that will iterate over all candidates and discriminate all
+	 * candidates that are not instances of <code>matchinClass></code> or for which
+	 * the boolean <code>matchExpression</code> returns false.
+	 * @param matchingClass The class that matching candidates must be an instance of
+	 * @param matchExpression The boolean expression used for filtering one candidate
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, IExpression matchExpression, Object... parameters) {
+		return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
+	}
+
+	/**
+	 * Parses the <code>matchExpression</code> and creates an query that will iterate over
+	 * all candidates and discriminate all candidates that are not instances of
+	 * <code>matchinClass></code> or for which the boolean <code>matchExpression</code>
+	 * returns false.
+	 * @param matchingClass The class that matching candidates must be an instance of
+	 * @param matchExpression The boolean expression used for filtering one candidate
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, String matchExpression, Object... parameters) {
+		return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
+	}
+
+	/**
+	 * <p>Creates a piped query based on the provided input queries.</p>
+	 * <p>A pipe is a composite query in which each sub-query is executed in succession.  
+	 * The results from the ith sub-query are piped as input into the i+1th sub-query. The
+	 * query will short-circuit if any query returns an empty result set.</p>
+	 * 
+	 * @param queries the ordered list of queries to perform
+	 * @return A query pipe
+	 */
+	@SuppressWarnings("unchecked")
+	public static <T> IQuery<T> createPipeQuery(Collection<? extends IQuery<? extends T>> queries) {
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		int top = queries.size();
+		IExpression[] expressions = new IExpression[top];
+		int idx = 0;
+		for (IQuery<? extends T> query : queries) {
+			IExpression expr = query.getExpression();
+			if (expr == null)
+				expr = factory.toExpression(query);
+			expressions[idx++] = expr;
+		}
+		IExpression pipe = factory.pipe(expressions);
+		VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
+		pipe.accept(finder);
+		return finder.isFound() ? QueryUtil.<T> createQuery((Class<T>) Object.class, pipe) : QueryUtil.<T> createMatchQuery((Class<T>) Object.class, pipe);
+	}
+
+	/**
+	 * <p>Creates a piped query based on the provided input queries.</p>
+	 * <p>A pipe is a composite query in which each sub-query is executed in succession.  
+	 * The results from the ith sub-query are piped as input into the i+1th sub-query. The
+	 * query will short-circuit if any query returns an empty result set.</p>
+	 *
+	 * @param query1 the first query
+	 * @param query2 the second query
+	 * @return A query pipe
+	 */
+	public static <T> IQuery<T> createPipeQuery(IQuery<? extends T> query1, IQuery<? extends T> query2) {
+		ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
+		queries.add(query1);
+		queries.add(query2);
+		return createPipeQuery(queries);
+	}
+
+	/**
+	 * Creates an {@link IInstallableUnit} query based on an <code>expression</code> that
+	 * uses all candidates as input.
+	 * @param expression The query expression
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static IQuery<IInstallableUnit> createQuery(IExpression expression, Object... parameters) {
+		return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
+	}
+
+	/**
+	 * Parses the <code>expression</code> and creates an {@link IInstallableUnit} query. The
+	 * <code>expression</code> is expected to use all candidates as input.
+	 * @param expression The query expression
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static IQuery<IInstallableUnit> createQuery(String expression, Object... parameters) {
+		return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
+	}
+
+	/**
+	 * Creates a query that will limit the result to instances of the <code>matchinClass</code>. The
+	 * <code>expression</code> is expected to use all candidates as input.
+	 * @param matchingClass The class used as discriminator for the result
+	 * @param expression The query expression
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
+		return new ExpressionQuery<T>(matchingClass, expression, parameters);
+	}
+
+	/**
+	 * Parses the <code>expression</code> and creates a query that will limit the result
+	 * to instances of the <code>matchinClass</code>. The <code>expression</code> is expected
+	 * to use all candidates as input.
+	 * @param matchingClass The class used as discriminator for the result
+	 * @param expression The query expression
+	 * @param parameters Values for parameter substitution
+	 * @return The created query
+	 */
+	public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
+		return new ExpressionQuery<T>(matchingClass, expression, parameters);
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit} is a category. 
+	 * @param iu the element being tested.
+	 * @return <tt>true</tt> if the parameter is a category.
+	 */
+	public static boolean isCategory(IInstallableUnit iu) {
+		String value = iu.getProperty(PROP_TYPE_CATEGORY);
+		if (value != null && (value.equals(Boolean.TRUE.toString())))
+			return true;
+		return false;
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit} is a fragment. 
+	 * @param iu the element being tested.
+	 * @return <tt>true</tt> if the parameter is a fragment.
+	 */
+	public static boolean isFragment(IInstallableUnit iu) {
+		return iu instanceof IInstallableUnitFragment;
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit} is a group. 
+	 * @param iu the element being tested.
+	 * @return <tt>true</tt> if the parameter is a group.
+	 */
+	public static boolean isGroup(IInstallableUnit iu) {
+		String value = iu.getProperty(PROP_TYPE_GROUP);
+		if (value != null && (value.equals(Boolean.TRUE.toString())))
+			return true;
+		return false;
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit} is a patch. 
+	 * @param iu the element being tested.
+	 * @return <tt>true</tt> if the parameter is a patch.
+	 */
+	public static boolean isPatch(IInstallableUnit iu) {
+		String value = iu.getProperty(PROP_TYPE_PATCH);
+		if (value != null && (value.equals(Boolean.TRUE.toString())))
+			return true;
+		return false;
+	}
+
+	private static IExpression makeContextExpression(IExpressionFactory factory, IExpression expr) {
+		VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
+		expr.accept(finder);
+		if (!finder.isFound())
+			expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
+		return expr;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
new file mode 100644
index 0000000..ddcfd40
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides common classes for the query mechanism.
+<h2>
+Package Specification</h2>
+<p>
+This package provide low level infrastructure for querying collections of metadata.
+Additional queries can be found in the org.eclipse.equinox.p2.metadata.query package and more domain specific queries can be found in the touchpoints.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.log/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.operations/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.log/.classpath
copy to eclipse/plugins/org.eclipse.equinox.p2.operations/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/.project b/eclipse/plugins/org.eclipse.equinox.p2.operations/.project
new file mode 100644
index 0000000..e5272e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.operations</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..69f49b6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,329 @@
+#Tue Dec 29 23:18:33 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs
copy to eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs
copy to eclipse/plugins/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9acb2cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.operations;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.operations.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.operations;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.equinox.p2.operations;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="3.6.0",
+ org.eclipse.core.jobs;bundle-version="3.5.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.director,
+ org.eclipse.equinox.internal.p2.repository.helpers,
+ org.eclipse.equinox.internal.provisional.configurator,
+ org.eclipse.equinox.internal.provisional.p2.core.eventbus,
+ org.eclipse.equinox.internal.provisional.p2.director,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.osgi.util;version="1.1.0",
+ org.osgi.framework;version="1.4.0"
diff --git a/eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/about.html b/eclipse/plugins/org.eclipse.equinox.p2.operations/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.core.filesystem.qnx.x86/about.html
rename to eclipse/plugins/org.eclipse.equinox.p2.operations/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.operations/build.properties
new file mode 100644
index 0000000..ca50309
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2005, 2007 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties
+src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.operations/plugin.properties
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.updatechecker/plugin.properties
copy to eclipse/plugins/org.eclipse.equinox.p2.operations/plugin.properties
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.operations/pom.xml
new file mode 100644
index 0000000..961f543
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.operations</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java
new file mode 100644
index 0000000..9580bc9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.operations;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * Activator class that registers the update checker service.
+ */
+public class Activator implements BundleActivator {
+	public static final String ID = "org.eclipse.equinox.p2.operations"; //$NON-NLS-1$
+	private static BundleContext context;
+
+	public static BundleContext getContext() {
+		return context;
+	}
+
+	public void start(BundleContext bundleContext) throws Exception {
+		Activator.context = bundleContext;
+	}
+
+	public void stop(BundleContext bundleContext) throws Exception {
+		Activator.context = null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java
new file mode 100644
index 0000000..3c47f24
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.operations;
+
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+
+/**
+ * IFailedStatusEvaluator determines what to do (if anything)
+ * when a profile change cannot be resolved successfully.
+ * 
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IFailedStatusEvaluator {
+	public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java
new file mode 100644
index 0000000..34f92df
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.operations;
+
+/**
+ * IStatusCodes defines codes for common status conditions when
+ * performing provisioning operations.
+ * 
+ * This interface is not intended to be implemented
+ * 
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IStatusCodes {
+
+	//Operation status codes [10000-10999] - note these cannot conflict with the core codes
+	//in ProvisionException or we'll see strange results.
+
+	public static final int NOTHING_TO_UPDATE = 10000;
+
+	// Status codes associated with profile change request or plans being altered from the original intent
+	public static final int PROFILE_CHANGE_ALTERED = 10001;
+	public static final int IU_REQUEST_ALTERED = 10002;
+	public static final int ALTERED_IMPLIED_UPDATE = 10003;
+	public static final int ALTERED_IGNORED_IMPLIED_DOWNGRADE = 10004;
+	public static final int ALTERED_IGNORED_ALREADY_INSTALLED = 10005;
+	public static final int ALTERED_PARTIAL_INSTALL = 10006;
+	public static final int ALTERED_PARTIAL_UNINSTALL = 10007;
+	public static final int ALTERED_SIDE_EFFECT_UPDATE = 10008;
+	public static final int ALTERED_SIDE_EFFECT_REMOVE = 10009;
+	public static final int ALTERED_SIDE_EFFECT_INSTALL = 10010;
+	public static final int ALTERED_IGNORED_INSTALL_REQUEST = 10011;
+	public static final int ALTERED_IGNORED_UNINSTALL_REQUEST = 10012;
+	public static final int ALTERED_IGNORED_IMPLIED_UPDATE = 10013;
+
+	// Status codes associated with inability to perform an operation
+	public static final int UNEXPECTED_NOTHING_TO_DO = 10050;
+	public static final int EXPECTED_NOTHING_TO_DO = 10051;
+	public static final int OPERATION_ALREADY_IN_PROGRESS = 10052;
+
+	// Status codes associated with repositories
+	public static final int INVALID_REPOSITORY_LOCATION = 10100;
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java
new file mode 100644
index 0000000..55e98c1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.operations;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 2.0
+ *
+ */
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.operations.messages"; //$NON-NLS-1$
+
+	public static String InstallOperation_ComputeProfileChangeProgress;
+
+	public static String InstallOperation_InstallJobName;
+	public static String InstallOperation_ResolveJobName;
+
+	public static String ProfileChangeOperation_NoProfileChangeRequest;
+	public static String ProfileChangeOperation_ResolveTaskName;
+
+	public static String ProvisioningJob_GenericErrorStatusMessage;
+	public static String ProvisioningSession_AgentNotFound;
+
+	public static String ProvisioningSession_InstallPlanConfigurationError;
+
+	public static String PlanAnalyzer_IgnoringInstall;
+	public static String PlanAnalyzer_LockedImpliedUpdate0;
+	public static String PlanAnalyzer_PartialInstall;
+	public static String PlanAnalyzer_PartialUninstall;
+	public static String PlanAnalyzer_SideEffectInstall;
+	public static String PlanAnalyzer_SideEffectUninstall;
+	public static String PlannerResolutionJob_NullProvisioningPlan;
+
+	public static String PlanAnalyzer_IgnoringImpliedDowngrade;
+	public static String PlanAnalyzer_ImpliedUpdate;
+	public static String PlanAnalyzer_Items;
+	public static String PlanAnalyzer_NothingToDo;
+
+	public static String PlanAnalyzer_NoUpdates;
+	public static String PlanAnalyzer_AlreadyInstalled;
+	public static String PlanAnalyzer_AnotherOperationInProgress;
+	public static String PlanAnalyzer_RequestAltered;
+	public static String PlanAnalyzer_UnexpectedError;
+
+	public static String RepositoryTracker_DuplicateLocation;
+	public static String RepositoryTracker_InvalidLocation;
+
+	public static String ResolutionResult_SummaryStatus;
+
+	public static String SizingPhaseSet_PhaseSetName;
+
+	public static String UninstallOperation_ProvisioningJobName;
+	public static String UninstallOperation_ResolveJobName;
+
+	public static String UpdateOperation_ProfileChangeRequestProgress;
+	public static String UpdateOperation_ResolveJobName;
+	public static String UpdateOperation_UpdateJobName;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
new file mode 100644
index 0000000..3b2d72a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
@@ -0,0 +1,163 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.operations;
+
+import java.util.Collection;
+import java.util.Map.Entry;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.provisional.p2.director.*;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * This class analyzes a profile change request and the resultant provisioning plan,
+ * and reports problems in a way that can be communicated to a user.
+ * 
+ * @since 3.5
+ */
+public class PlanAnalyzer {
+
+	public static IStatus getStatus(int statusCode, IInstallableUnit affectedIU) {
+		switch (statusCode) {
+			case IStatusCodes.NOTHING_TO_UPDATE :
+				return new Status(IStatus.INFO, Activator.ID, statusCode, Messages.PlanAnalyzer_NoUpdates, null);
+			case IStatusCodes.PROFILE_CHANGE_ALTERED :
+				return new MultiStatus(Activator.ID, statusCode, Messages.PlanAnalyzer_RequestAltered, null);
+			case IStatusCodes.ALTERED_IMPLIED_UPDATE :
+				return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_ImpliedUpdate, getIUString(affectedIU)), null);
+			case IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE :
+				return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_LockedImpliedUpdate0, getIUString(affectedIU)), null);
+			case IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE :
+				return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_IgnoringImpliedDowngrade, getIUString(affectedIU)), null);
+			case IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED :
+				return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_AlreadyInstalled, getIUString(affectedIU)), null);
+			case IStatusCodes.ALTERED_PARTIAL_INSTALL :
+				return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_PartialInstall, getIUString(affectedIU)), null);
+			case IStatusCodes.ALTERED_PARTIAL_UNINSTALL :
+				return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_PartialUninstall, getIUString(affectedIU)), null);
+			case IStatusCodes.UNEXPECTED_NOTHING_TO_DO :
+				return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_NothingToDo, getIUString(affectedIU)), null);
+			case IStatusCodes.OPERATION_ALREADY_IN_PROGRESS :
+				return new Status(IStatus.ERROR, Activator.ID, statusCode, Messages.PlanAnalyzer_AnotherOperationInProgress, null);
+			default :
+				return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_UnexpectedError, new Integer(statusCode), getIUString(affectedIU)), null);
+		}
+	}
+
+	public static MultiStatus getProfileChangeAlteredStatus() {
+		return (MultiStatus) getStatus(IStatusCodes.PROFILE_CHANGE_ALTERED, null);
+	}
+
+	public static ResolutionResult computeResolutionResult(ProfileChangeRequest originalRequest, IProvisioningPlan plan, MultiStatus originalStatus) {
+		Assert.isNotNull(originalRequest);
+		Assert.isNotNull(plan);
+		Assert.isNotNull(originalStatus);
+
+		ResolutionResult report = new ResolutionResult();
+
+		// If the plan was canceled, no further analysis is needed
+		if (plan.getStatus().getSeverity() == IStatus.CANCEL) {
+			report.addSummaryStatus(plan.getStatus());
+			return report;
+		}
+
+		if (nothingToDo(originalRequest)) {
+			report.addSummaryStatus(getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null));
+			IStatus[] details = originalStatus.getChildren();
+			for (int i = 0; i < details.length; i++)
+				report.addSummaryStatus(details[i]);
+			return report;
+		}
+
+		// If there was already some status supplied before resolution, this should get included
+		// with the report.  For example, this might contain information about the profile request
+		// being altered before resolution began.
+		if (originalStatus != null && originalStatus.getChildren().length > 0) {
+			report.addSummaryStatus(originalStatus);
+		}
+
+		// If the overall plan had a non-OK status, capture that in the report.
+		if (!plan.getStatus().isOK())
+			report.addSummaryStatus(plan.getStatus());
+
+		// Now we compare what was requested with what is going to happen.
+		// In the long run, when a RequestStatus can provide actual explanation/status
+		// about failures, we might want to add this information to the overall status.
+		// As it stands now, if the provisioning plan is in error, that info is more detailed
+		// than the request status.  So we will only add request status info to the overall
+		// status when the overall status is not in error.
+
+		PlannerStatus plannerStatus = plan.getStatus() instanceof PlannerStatus ? (PlannerStatus) plan.getStatus() : null;
+		// If there is no additional plannerStatus details just return the report
+		if (plannerStatus == null)
+			return report;
+
+		if (plan.getStatus().getSeverity() != IStatus.ERROR) {
+			Collection<IInstallableUnit> iusAdded = originalRequest.getAdditions();
+			for (IInstallableUnit added : iusAdded) {
+				RequestStatus rs = plannerStatus.getRequestChanges().get(added);
+				if (rs.getSeverity() == IStatus.ERROR) {
+					// This is a serious error so it must also appear in the overall status
+					IStatus fail = new Status(IStatus.ERROR, Activator.ID, IStatusCodes.ALTERED_IGNORED_INSTALL_REQUEST, NLS.bind(Messages.PlanAnalyzer_IgnoringInstall, getIUString(added)), null);
+					report.addStatus(added, fail);
+					report.addSummaryStatus(fail);
+				}
+			}
+			Collection<IInstallableUnit> iusRemoved = originalRequest.getRemovals();
+			for (IInstallableUnit removed : iusRemoved) {
+				RequestStatus rs = plannerStatus.getRequestChanges().get(removed);
+				if (rs.getSeverity() == IStatus.ERROR) {
+					// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
+					// We are making assumptions here about why the planner chose to ignore an uninstall.
+					// Assume it could not be uninstalled because of some other dependency, yet the planner did not view
+					// this as an error.  So we inform the user that we can only uninstall parts of it.  The root property will be
+					// removed per the original change request.
+					IStatus fail = new Status(IStatus.INFO, Activator.ID, IStatusCodes.ALTERED_PARTIAL_UNINSTALL, NLS.bind(Messages.PlanAnalyzer_PartialUninstall, getIUString(removed)), null);
+					report.addStatus(removed, fail);
+					report.addSummaryStatus(fail);
+				}
+			}
+		}
+
+		// Now process the side effects
+		if (plannerStatus.getRequestSideEffects() != null) {
+			for (Entry<IInstallableUnit, RequestStatus> entry : plannerStatus.getRequestSideEffects().entrySet()) {
+				IInstallableUnit iu = entry.getKey();
+				RequestStatus rs = entry.getValue();
+				if (rs.getInitialRequestType() == RequestStatus.ADDED) {
+					report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_INSTALL, NLS.bind(Messages.PlanAnalyzer_SideEffectInstall, getIUString(iu)), null));
+				} else {
+					report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_REMOVE, NLS.bind(Messages.PlanAnalyzer_SideEffectUninstall, getIUString(iu)), null));
+				}
+			}
+		}
+
+		return report;
+
+	}
+
+	private static String getIUString(IInstallableUnit iu) {
+		if (iu == null)
+			return Messages.PlanAnalyzer_Items;
+		// Get the iu name in the default locale
+		String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+		if (name != null)
+			return name;
+		return iu.getId();
+	}
+
+	private static boolean nothingToDo(ProfileChangeRequest request) {
+		return request.getAdditions().size() == 0 && request.getRemovals().size() == 0 && request.getInstallableUnitProfilePropertiesToAdd().size() == 0 && request.getInstallableUnitProfilePropertiesToRemove().size() == 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java
new file mode 100644
index 0000000..69c984e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.operations;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+
+/**
+ * Class representing a provisioning profile plan
+ *
+ * @since 2.0
+ */
+public class PlannerResolutionJob extends ProvisioningJob implements IProfileChangeJob {
+
+	ProfileChangeRequest request;
+	String profileId;
+	IProvisioningPlan plan;
+	MultiStatus additionalStatus;
+	ResolutionResult report;
+	ProvisioningContext firstPass, successful;
+	IFailedStatusEvaluator evaluator;
+
+	public static MultiStatus getProfileChangeRequestAlteredStatus() {
+		return PlanAnalyzer.getProfileChangeAlteredStatus();
+	}
+
+	public PlannerResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus) {
+		super(label, session);
+		this.request = request;
+		this.profileId = profileId;
+		if (context == null)
+			firstPass = new ProvisioningContext(session.getProvisioningAgent());
+		else
+			firstPass = context;
+		this.evaluator = evaluator;
+		Assert.isNotNull(additionalStatus);
+		this.additionalStatus = additionalStatus;
+	}
+
+	public IProvisioningPlan getProvisioningPlan() {
+		return plan;
+	}
+
+	public ProfileChangeRequest getProfileChangeRequest() {
+		return request;
+	}
+
+	public ProvisioningContext getActualProvisioningContext() {
+		return successful;
+	}
+
+	public void setFirstPassProvisioningContext(ProvisioningContext firstPass) {
+		this.firstPass = firstPass;
+	}
+
+	public IStatus runModal(IProgressMonitor monitor) {
+		SubMonitor sub;
+		if (evaluator != null) {
+			sub = SubMonitor.convert(monitor, 1000);
+		} else {
+			sub = SubMonitor.convert(monitor, 500);
+		}
+
+		plan = ((IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME)).getProvisioningPlan(request, firstPass, sub.newChild(500));
+		IStatus status;
+		if (plan == null) {
+			status = new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan);
+			additionalStatus.add(status);
+		} else {
+			status = plan.getStatus();
+		}
+
+		if (status.getSeverity() != IStatus.ERROR || evaluator == null) {
+			successful = firstPass;
+			return status;
+		}
+
+		// First resolution was in error, try again with an alternate provisioning context
+		ProvisioningContext secondPass = evaluator.getSecondPassProvisioningContext(plan);
+		if (secondPass == null)
+			return status;
+
+		successful = secondPass;
+		plan = ((IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME)).getProvisioningPlan(request, secondPass, sub.newChild(500));
+		if (plan == null) {
+			status = new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan);
+			additionalStatus.add(status);
+			return status;
+		}
+		return plan.getStatus();
+	}
+
+	public ResolutionResult getResolutionResult() {
+		if (report == null) {
+			if (plan == null) {
+				if (additionalStatus.getSeverity() != IStatus.ERROR) {
+					additionalStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan));
+				}
+				report = new ResolutionResult();
+				report.addSummaryStatus(additionalStatus);
+			} else {
+				report = PlanAnalyzer.computeResolutionResult(request, plan, additionalStatus);
+			}
+		}
+		return report;
+	}
+
+	public String getProfileId() {
+		return profileId;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java
new file mode 100644
index 0000000..0d0d90b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.operations;
+
+import java.util.HashMap;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * ResolutionResult describes problems in a provisioning plan in a structured
+ * way that can be presented to a user.
+ * 
+ * @since 2.0
+ */
+public class ResolutionResult {
+	private static final String NESTING_INDENT = "  "; //$NON-NLS-1$
+
+	private final HashMap<IInstallableUnit, MultiStatus> iuToStatusMap = new HashMap<IInstallableUnit, MultiStatus>();
+	private MultiStatus summaryStatus;
+
+	public IStatus getSummaryStatus() {
+		if (summaryStatus != null)
+			return summaryStatus;
+		return Status.OK_STATUS;
+	}
+
+	public void addSummaryStatus(IStatus status) {
+		if (summaryStatus == null) {
+			summaryStatus = new MultiStatus(Activator.ID, 0, Messages.ResolutionResult_SummaryStatus, null);
+		}
+		summaryStatus.add(status);
+	}
+
+	public IStatus statusOf(IInstallableUnit iu) {
+		return iuToStatusMap.get(iu);
+	}
+
+	public void addStatus(IInstallableUnit iu, IStatus status) {
+		MultiStatus iuSummaryStatus = iuToStatusMap.get(iu);
+		if (iuSummaryStatus == null) {
+			iuSummaryStatus = new MultiStatus(Activator.ID, IStatusCodes.IU_REQUEST_ALTERED, new IStatus[] {status}, getIUString(iu), null);
+		} else
+			iuSummaryStatus.add(status);
+	}
+
+	private String getIUString(IInstallableUnit iu) {
+		if (iu == null)
+			return Messages.PlanAnalyzer_Items;
+		// Get the iu name in the default locale
+		String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+		if (name != null)
+			return name;
+		return iu.getId();
+	}
+
+	public String getSummaryReport() {
+		if (summaryStatus != null) {
+			StringBuffer buffer = new StringBuffer();
+			appendDetailText(summaryStatus, buffer, -1, false);
+			return buffer.toString();
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	// Answers null if there is nothing to say about the ius
+	public String getDetailedReport(IInstallableUnit[] ius) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < ius.length; i++) {
+			MultiStatus iuStatus = iuToStatusMap.get(ius[i]);
+			if (iuStatus != null)
+				appendDetailText(iuStatus, buffer, 0, true);
+		}
+		String report = buffer.toString();
+		if (report.length() == 0)
+			return null;
+		return report;
+	}
+
+	void appendDetailText(IStatus status, StringBuffer buffer, int indent, boolean includeTopLevelMessage) {
+		if (includeTopLevelMessage) {
+			for (int i = 0; i < indent; i++)
+				buffer.append(NESTING_INDENT);
+			if (status.getMessage() != null)
+				buffer.append(status.getMessage());
+		}
+		Throwable t = status.getException();
+		if (t != null) {
+			// A provision (or core) exception occurred.  Get its status message or if none, its top level message.
+			// Indent by one more level (note the <=)
+			buffer.append('\n');
+			for (int i = 0; i <= indent; i++)
+				buffer.append(NESTING_INDENT);
+			if (t instanceof CoreException) {
+				IStatus exceptionStatus = ((CoreException) t).getStatus();
+				if (exceptionStatus != null && exceptionStatus.getMessage() != null)
+					buffer.append(exceptionStatus.getMessage());
+				else {
+					String details = t.getLocalizedMessage();
+					if (details != null)
+						buffer.append(details);
+				}
+			} else {
+				String details = t.getLocalizedMessage();
+				if (details != null)
+					buffer.append(details);
+			}
+		}
+		// Now print the children status info (if there are children)
+		IStatus[] children = status.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			if (buffer.length() > 0)
+				buffer.append('\n');
+			appendDetailText(children[i], buffer, indent + 1, true);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java
new file mode 100644
index 0000000..d60e9b3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.operations;
+
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+
+public class SearchForUpdatesResolutionJob extends PlannerResolutionJob {
+
+	IRunnableWithProgress searchForUpdatesRunnable;
+	ProfileChangeRequest[] requestHolder;
+	UpdateOperation operation;
+
+	public SearchForUpdatesResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus, IRunnableWithProgress searchForUpdatesRunnable, ProfileChangeRequest[] requestHolder, UpdateOperation operation) {
+		super(label, session, profileId, request, context, evaluator, additionalStatus);
+		this.searchForUpdatesRunnable = searchForUpdatesRunnable;
+		this.requestHolder = requestHolder;
+		this.operation = operation;
+	}
+
+	public IStatus runModal(IProgressMonitor monitor) {
+		SubMonitor sub = SubMonitor.convert(monitor);
+		try {
+			searchForUpdatesRunnable.run(sub.newChild(500));
+			if (requestHolder.length > 0)
+				this.request = requestHolder[0];
+		} catch (OperationCanceledException e) {
+			return Status.CANCEL_STATUS;
+		} catch (InvocationTargetException e) {
+			// ignore, we don't actually throw this in the supplied runnable
+		}
+		if (request != null)
+			return super.runModal(sub.newChild(500));
+		return operation.getResolutionResult();
+	}
+
+	// This is made public for the automated tests
+	public ProfileChangeRequest getProfileChangeRequest() {
+		return request;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties
new file mode 100644
index 0000000..1e91ac0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties
@@ -0,0 +1,44 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+InstallOperation_ComputeProfileChangeProgress=Checking the install request
+InstallOperation_InstallJobName=Installing Software
+InstallOperation_ResolveJobName=Computing install requirements
+ProfileChangeOperation_NoProfileChangeRequest=Could not interpret the installation request.
+ProfileChangeOperation_ResolveTaskName=Analyzing the install operation
+ProvisioningJob_GenericErrorStatusMessage=Error encountered while running {0}
+ProvisioningSession_AgentNotFound=No provisioning agent could be found
+ProvisioningSession_InstallPlanConfigurationError=A problem was encountered while preparing the system for the installation
+PlanAnalyzer_IgnoringInstall="{0}" is not applicable to the current configuration and will not be installed.
+PlanAnalyzer_LockedImpliedUpdate0={0} will be ignored because it is already installed, and updates are not permitted.
+PlanAnalyzer_PartialInstall="{0}" is already present because other installed software requires it.  It will be added to the installed software list.
+PlanAnalyzer_PartialUninstall= "{0}" cannot be fully uninstalled because other installed software requires it.  The parts that are not required will be uninstalled.
+PlanAnalyzer_SideEffectInstall="{0}" will also be installed in order to complete this operation.
+PlanAnalyzer_SideEffectUninstall="{0}" must be uninstalled in order to complete this operation.
+PlannerResolutionJob_NullProvisioningPlan=Unexpected Error.  Could not process the request. Check the error log for details.
+PlanAnalyzer_IgnoringImpliedDowngrade="{0}" will be ignored because a newer version is already installed. 
+PlanAnalyzer_ImpliedUpdate="{0}" is already installed, so an update will be performed instead.
+PlanAnalyzer_Items=Items
+PlanAnalyzer_NothingToDo=Cannot complete the request.  See the error log for details.
+PlanAnalyzer_NoUpdates=No updates were found.
+PlanAnalyzer_AlreadyInstalled="{0}" will be ignored because it is already installed.
+PlanAnalyzer_AnotherOperationInProgress=Cannot continue the operation.  There is another install operation in progress.
+PlanAnalyzer_RequestAltered=Your original request has been modified.
+PlanAnalyzer_UnexpectedError=Unexpected error code {0} encountered for {1}.
+RepositoryTracker_DuplicateLocation=Duplicate location
+RepositoryTracker_InvalidLocation=The location "{0}" is not a valid software site location.
+ResolutionResult_SummaryStatus=Operation details
+SizingPhaseSet_PhaseSetName=Compute sizes
+
+UninstallOperation_ProvisioningJobName=Uninstalling Software
+UninstallOperation_ResolveJobName=Calculating Uninstall Validity
+UpdateOperation_ProfileChangeRequestProgress=Computing update request
+UpdateOperation_ResolveJobName=Computing Update Requirements
+UpdateOperation_UpdateJobName=Updating Software
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java
new file mode 100644
index 0000000..e964169
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+/**
+ * Interface for a provisioning job that operates on a
+ * profile.
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IProfileChangeJob {
+
+	/**
+	 * Return the string id of the profile involved in this job.
+	 * 
+	 * @return the id of the profile
+	 */
+	public String getProfileId();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
new file mode 100644
index 0000000..0da9c62
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.director.Explanation;
+import org.eclipse.equinox.internal.p2.operations.*;
+import org.eclipse.equinox.internal.provisional.p2.director.*;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+/**
+ * An InstallOperation describes an operation that installs IInstallableUnits into
+ * a profile.
+ * 
+ * The following snippet shows how one might use an InstallOperation to perform a synchronous resolution and
+ * then kick off an install in the background:
+ * 
+ * <pre>
+ * InstallOperation op = new InstallOperation(session, new IInstallableUnit [] { myIU });
+ * IStatus result = op.resolveModal(monitor);
+ * if (result.isOK()) {
+ *   op.getProvisioningJob(monitor).schedule();
+ * }
+ * </pre>
+ * 
+ * @since 2.0
+ * @see ProfileChangeOperation
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class InstallOperation extends ProfileChangeOperation {
+
+	private Collection<IInstallableUnit> toInstall;
+
+	/**
+	 * Create an install operation on the specified provisioning session that installs
+	 * the supplied IInstallableUnits.  Unless otherwise specified, the operation will
+	 * be associated with the currently running profile.
+	 * 
+	 * @param session the session to use for obtaining provisioning services
+	 * @param toInstall the IInstallableUnits to be installed into the profile.
+	 */
+	public InstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall) {
+		super(session);
+		this.toInstall = toInstall;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.MultiStatus, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
+		request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
+		IProfile profile;
+		profile = session.getProfileRegistry().getProfile(profileId);
+		SubMonitor sub = SubMonitor.convert(monitor, Messages.InstallOperation_ComputeProfileChangeProgress, toInstall.size());
+		for (IInstallableUnit entryToInstall : toInstall) {
+			// If the user is installing a patch, we mark it optional.  This allows
+			// the patched IU to be updated later by removing the patch.
+			if (QueryUtil.isPatch(entryToInstall))
+				request.setInstallableUnitInclusionRules(entryToInstall, ProfileInclusionRules.createOptionalInclusionRule(entryToInstall));
+
+			// Check to see if it is already installed.  This may alter the request.
+			IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(QueryUtil.createIUQuery(entryToInstall.getId()), null);
+			// TODO ideally we should only do this check if the iu is a singleton, but in practice many iu's that should
+			// be singletons are not, so we don't check this (yet)
+			// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=230878
+			if (!alreadyInstalled.isEmpty()) { //  && installedIU.isSingleton()
+				IInstallableUnit installedIU = alreadyInstalled.iterator().next();
+				int compareTo = entryToInstall.getVersion().compareTo(installedIU.getVersion());
+				// If the iu is a newer version of something already installed, consider this an
+				// update request
+				if (compareTo > 0) {
+					boolean lockedForUpdate = false;
+					String value = profile.getInstallableUnitProperty(installedIU, IProfile.PROP_PROFILE_LOCKED_IU);
+					if (value != null)
+						lockedForUpdate = (Integer.parseInt(value) & IProfile.LOCK_UPDATE) == IProfile.LOCK_UPDATE;
+					if (lockedForUpdate) {
+						// Add a status telling the user that this implies an update, but the
+						// iu should not be updated
+						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, entryToInstall));
+					} else {
+						request.add(entryToInstall);
+						request.remove(installedIU);
+						// Add a status informing the user that the update has been inferred
+						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, entryToInstall));
+						// Mark it as a root if it hasn't been already
+						if (!UserVisibleRootQuery.isUserVisible(installedIU, profile))
+							request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+					}
+				} else if (compareTo < 0) {
+					// An implied downgrade.  We will not put this in the plan, add a status informing the user
+					status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, entryToInstall));
+				} else {
+					//					if (rootMarkerKey != null) {
+					if (UserVisibleRootQuery.isUserVisible(installedIU, profile))
+						// It is already a root, nothing to do. We tell the user it was already installed
+						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED, entryToInstall));
+					else {
+						// It was already installed but not as a root.  Tell the user that parts of it are already installed and mark
+						// it as a root. 
+						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_PARTIAL_INSTALL, entryToInstall));
+						request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+					}
+					//					}
+				}
+			} else {
+				// Install it and mark as a root
+				request.add(entryToInstall);
+				//				if (rootMarkerKey != null)
+				request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+			}
+			sub.worked(1);
+		}
+		sub.done();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
+	 */
+	protected String getResolveJobName() {
+		return Messages.InstallOperation_ResolveJobName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
+	 */
+	protected String getProvisioningJobName() {
+		return Messages.InstallOperation_InstallJobName;
+
+	}
+
+	@Override
+	ProvisioningContext getFirstPassProvisioningContext() {
+		// Set it back to no referencing for first pass in case we reuse this context.
+		context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, null);
+		return context;
+	}
+
+	@Override
+	IFailedStatusEvaluator getSecondPassEvaluator() {
+		return new IFailedStatusEvaluator() {
+			public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
+				// Follow metadata repository references if the first try fails
+				// There should be real API for this!
+				if (missingRequirement(failedPlan))
+					context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, Boolean.toString(true));
+				return context;
+			}
+		};
+	}
+
+	// this is very reachy
+	private boolean missingRequirement(IProvisioningPlan failedPlan) {
+		IStatus status = failedPlan.getStatus();
+		RequestStatus requestStatus = null;
+		if (status instanceof PlannerStatus)
+			requestStatus = ((PlannerStatus) status).getRequestStatus();
+		return requestStatus != null && requestStatus.getShortExplanation() == Explanation.MISSING_REQUIREMENT;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java
new file mode 100644
index 0000000..63ed0e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java
@@ -0,0 +1,383 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.operations.*;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * ProfileChangeOperation describes a provisioning operation that modifies a profile.
+ * The operation must first be resolved, followed by the actual provisioning
+ * work being performed.  This two-pass nature of the ProfileChangeOperation allows
+ * resolution status to be reported to a client to determine whether the operation
+ * should proceed.  Each phase of the operation can be performed synchronously or in
+ * the background as a job.  To perform the operation synchronously:
+ * 
+ *  <pre>
+ *     IStatus result = op.resolveModal(monitor);
+ *     if (result.isOK())
+ *       op.getProvisioningJob(null).runModal(monitor);
+ *     else {
+ *       // interpret the result
+ *     }
+ *  </pre>
+ *  
+ *  To perform the resolution synchronously and the provisioning job in the
+ *  background:
+ *  
+ *  <pre>
+ *     IStatus status = op.resolveModal(monitor);
+ *     if (status.isOK()) {
+ *       ProvisioningJob job = op.getProvisioningJob(monitor);
+ *       job.schedule();
+ *     } else {
+ *       // interpret the result
+ *     }
+ *  </pre>
+ *  
+ *  To resolve in the background and perform the job when it is complete:
+ * 
+ *  <pre>
+ *     ProvisioningJob job = op.getResolveJob(monitor);
+ *     job.addJobChangeListener(new JobChangeAdapter() {
+ *       public void done (JobChangeEvent event) {
+ *         if (event.getResult().isOK() {
+ *            op.getProvisioningJob(monitor).schedule();
+ *         } else {
+ *            // interpret the result
+ *         }
+ *       }
+ *     });
+ *     job.schedule();
+ *     
+ *  </pre>
+ *  
+ * In general, it is expected that clients create a new ProfileChangeOperation if 
+ * the resolution result of the current operation is not satisfactory.  However,
+ * subclasses may prescribe a different life cycle where appropriate.
+ * 
+ * When retrieving the resolution and provisioning jobs managed by this operation, 
+ * a client may supply a progress monitor to be used by the job.  When the job is
+ * run by the platform job manager, both the platform job manager progress indicator 
+ * and the monitor supplied by the client will be updated.
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public abstract class ProfileChangeOperation implements IProfileChangeJob {
+
+	ProvisioningSession session;
+	String profileId;
+	ProvisioningContext context;
+	MultiStatus noChangeRequest;
+	PlannerResolutionJob job;
+	ProfileChangeRequest request;
+
+	/**
+	 * Create an operation using the provided provisioning session.
+	 * Unless otherwise specified by the client, the operation is
+	 * performed on the currently running profile.
+	 * 
+	 * @param session the provisioning session providing the services
+	 */
+	protected ProfileChangeOperation(ProvisioningSession session) {
+		this.session = session;
+		this.profileId = IProfileRegistry.SELF;
+		this.context = new ProvisioningContext(session.getProvisioningAgent());
+	}
+
+	/**
+	 * Resolve the operation in the current thread using the specified progress
+	 * monitor.  Return a status describing the result of the resolution.
+	 * 
+	 * @param monitor the progress monitor to use
+	 * @return a status describing the resolution results
+	 */
+	public final IStatus resolveModal(IProgressMonitor monitor) {
+		if (monitor == null)
+			monitor = new NullProgressMonitor();
+		prepareToResolve();
+		makeResolveJob(monitor);
+		if (job != null) {
+			job.runModal(monitor);
+		}
+		return getResolutionResult();
+
+	}
+
+	/**
+	 * Set the id of the profile that will be modified by this operation.
+	 * @param id the profile id
+	 */
+	public void setProfileId(String id) {
+		this.profileId = id;
+	}
+
+	/**
+	 * Return a job that can be used to resolve this operation in the background.
+	 * 
+	 * @param monitor a progress monitor that should be used to report the job's progress in addition
+	 * to the standard job progress reporting.  Can be <code>null</code>.  If provided, this monitor 
+	 * will be called from a background thread.
+	 * 
+	 * @return a job that can be scheduled to perform the provisioning operation.
+	 */
+	public final ProvisioningJob getResolveJob(IProgressMonitor monitor) {
+		SubMonitor mon = SubMonitor.convert(monitor, Messages.ProfileChangeOperation_ResolveTaskName, 1000);
+		prepareToResolve();
+		makeResolveJob(mon.newChild(100));
+		job.setAdditionalProgressMonitor(mon.newChild(900));
+		return job;
+	}
+
+	/**
+	 * Perform any processing that must occur just before resolving this operation.
+	 */
+	protected void prepareToResolve() {
+		// default is to do nothing
+	}
+
+	void makeResolveJob(IProgressMonitor monitor) {
+		noChangeRequest = PlanAnalyzer.getProfileChangeAlteredStatus();
+		if (session.hasScheduledOperationsFor(profileId)) {
+			noChangeRequest.add(PlanAnalyzer.getStatus(IStatusCodes.OPERATION_ALREADY_IN_PROGRESS, null));
+		} else {
+			computeProfileChangeRequest(noChangeRequest, monitor);
+		}
+		if (request == null) {
+			if (noChangeRequest.getChildren().length == 0)
+				// No explanation for failure was provided.  It shouldn't happen, but...
+				noChangeRequest = new MultiStatus(Activator.ID, IStatusCodes.UNEXPECTED_NOTHING_TO_DO, new IStatus[] {PlanAnalyzer.getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null)}, Messages.ProfileChangeOperation_NoProfileChangeRequest, null);
+			return;
+		}
+		createPlannerResolutionJob();
+	}
+
+	/**
+	 * Compute the profile change request for this operation, adding any relevant intermediate status
+	 * to the supplied status.  
+	 * 
+	 * @param status a multi-status to be used to add relevant status.  If a profile change request cannot
+	 * be computed for any reason, a status should be added to explain the problem.
+	 * 
+	 * @param monitor the progress monitor to use for computing the profile change request
+	 */
+	protected abstract void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor);
+
+	private void createPlannerResolutionJob() {
+		job = new PlannerResolutionJob(getResolveJobName(), session, profileId, request, getFirstPassProvisioningContext(), getSecondPassEvaluator(), noChangeRequest);
+	}
+
+	/**
+	 * Return an appropriate name for the resolution job.
+	 * 
+	 * @return the resolution job name.
+	 */
+	protected abstract String getResolveJobName();
+
+	/**
+	 * Return an appropriate name for the provisioning job.
+	 * 
+	 * @return the provisioning job name.
+	 */
+	protected abstract String getProvisioningJobName();
+
+	/**
+	 * Return a status indicating the result of resolving this
+	 * operation.  A <code>null</code> return indicates that
+	 * resolving has not occurred yet.
+	 * 
+	 * @return the status of the resolution, or <code>null</code>
+	 * if resolution has not yet occurred.
+	 */
+	public IStatus getResolutionResult() {
+		if (request == null) {
+			if (noChangeRequest != null) {
+				// If there is only one child message, use the specific message
+				if (noChangeRequest.getChildren().length == 1)
+					return noChangeRequest.getChildren()[0];
+				return noChangeRequest;
+			}
+			return null;
+		}
+		if (job != null && job.getResolutionResult() != null)
+			return job.getResolutionResult().getSummaryStatus();
+		return null;
+	}
+
+	/**
+	 * Return a string that can be used to describe the results of the resolution
+	 * to a client.
+	 * 
+	 * @return a string describing the resolution details, or <code>null</code> if the
+	 * operation has not been resolved.
+	 */
+	public String getResolutionDetails() {
+		if (job != null && job.getResolutionResult() != null)
+			return job.getResolutionResult().getSummaryReport();
+		// We couldn't resolve, but we have some status describing
+		// why there is no profile change request.
+		IStatus result = getResolutionResult();
+		if (result != null)
+			return result.getMessage();
+		return null;
+
+	}
+
+	/**
+	 * Return a string that describes the specific resolution results
+	 * related to the supplied {@link IInstallableUnit}.
+	 * 
+	 * @param iu the IInstallableUnit for which resolution details are requested
+	 * 
+	 * @return a string describing the results for the installable unit, or <code>null</code> if
+	 * there are no specific results available for the installable unit.
+	 */
+	public String getResolutionDetails(IInstallableUnit iu) {
+		if (job != null && job.getResolutionResult() != null)
+			return job.getResolutionResult().getDetailedReport(new IInstallableUnit[] {iu});
+		return null;
+
+	}
+
+	/**
+	 * Return the provisioning plan obtained by resolving the receiver.
+	 * 
+	 * @return the provisioning plan.  This may be <code>null</code> if the operation
+	 * has not been resolved, or if a plan could not be obtained when attempting to
+	 * resolve.  If the plan is null and the operation has been resolved, then the
+	 * resolution result will explain the problem.
+	 * 
+	 * @see #hasResolved()
+	 * @see #getResolutionResult()
+	 */
+	public IProvisioningPlan getProvisioningPlan() {
+		if (job != null)
+			return job.getProvisioningPlan();
+		return null;
+	}
+
+	/**
+	 * Return the profile change request that describes the receiver.
+	 * 
+	 * @return the profile change request.  This may be <code>null</code> if the operation
+	 * has not been resolved, or if a profile change request could not be assembled given
+	 * the operation's state.  If the profile change request is null and the operation has
+	 * been resolved, the the resolution result will explain the problem.
+	 * 
+	 * @see #hasResolved()
+	 * @see #getResolutionResult()
+	 */
+	public ProfileChangeRequest getProfileChangeRequest() {
+		if (job != null)
+			return job.getProfileChangeRequest();
+		return null;
+	}
+
+	/**
+	 * Return a provisioning job that can be used to perform the resolved operation.  The job is 
+	 * created using the default values associated with a new job.  It is up to clients to configure
+	 * the priority of the job and set any appropriate properties, such as
+	 * {@link Job#setUser(boolean)}, 
+	 * {@link Job#setSystem(boolean)}, or {@link Job#setProperty(QualifiedName, Object)},
+	 * before scheduling it.
+	 * 
+	 * @param monitor a progress monitor that should be used to report the job's progress in addition
+	 * to the standard job progress reporting.  Can be <code>null</code>.  If provided, this monitor 
+	 * will be called from a background thread.
+	 * 
+	 * @return a job that can be used to perform the provisioning operation.  This may be <code>null</code> 
+	 * if the operation has not been resolved, or if a plan could not be obtained when attempting to
+	 * resolve.  If the job is null and the operation has been resolved, then the resolution result 
+	 * will explain the problem.
+	 * 
+	 * @see #hasResolved()
+	 * @see #getResolutionResult()
+	 */
+	public ProvisioningJob getProvisioningJob(IProgressMonitor monitor) {
+		IStatus status = getResolutionResult();
+		if (status.getSeverity() != IStatus.CANCEL && status.getSeverity() != IStatus.ERROR) {
+			if (job.getProvisioningPlan() != null) {
+				ProfileModificationJob pJob = new ProfileModificationJob(getProvisioningJobName(), session, profileId, job.getProvisioningPlan(), job.getActualProvisioningContext());
+				pJob.setAdditionalProgressMonitor(monitor);
+				return pJob;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Set the provisioning context that should be used to resolve and perform the provisioning for
+	 * the operation.  This must be set before an attempt is made to resolve the operation
+	 * for it to have any effect.
+	 * 
+	 * @param context the provisioning context.
+	 */
+	public void setProvisioningContext(ProvisioningContext context) {
+		this.context = context;
+		if (job != null)
+			updateJobProvisioningContexts(job, context);
+	}
+
+	/**
+	 * Get the provisioning context that will be used to resolve and perform the provisioning for
+	 * the operation.
+	 * 
+	 * @return the provisioning context
+	 */
+	public ProvisioningContext getProvisioningContext() {
+		return context;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.IProfileChangeJob#getProfileId()
+	 */
+	public String getProfileId() {
+		return profileId;
+	}
+
+	/**
+	 * Return a boolean indicating whether the operation has been resolved.  This method
+	 * should be used to determine whether a client can expect to retrieve a profile
+	 * change request, provisioning plan, or resolution result.  It is possible that this
+	 * method return <code>false</code> while resolution is taking place if it is performed
+	 * in the background.
+	 * 
+	 * @return <code>true</code> if the operation has been resolved, <code>false</code>
+	 * if it has not resolved.
+	 */
+	public boolean hasResolved() {
+		return getResolutionResult() != null;
+	}
+
+	ProvisioningContext getFirstPassProvisioningContext() {
+		return getProvisioningContext();
+	}
+
+	IFailedStatusEvaluator getSecondPassEvaluator() {
+		return new IFailedStatusEvaluator() {
+			public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
+				return null;
+			}
+		};
+	}
+
+	protected void updateJobProvisioningContexts(PlannerResolutionJob job, ProvisioningContext context) {
+		job.setFirstPassProvisioningContext(context);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
new file mode 100644
index 0000000..eeeb1de
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.operations;
+
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.engine.*;
+
+/**
+ * A job that modifies a profile according to a specified provisioning plan.  
+ * 
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class ProfileModificationJob extends ProvisioningJob implements IProfileChangeJob {
+
+	IProvisioningPlan plan;
+	String profileId;
+	IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSet();
+	ProvisioningContext provisioningContext;
+	int restartPolicy = ProvisioningJob.RESTART_OR_APPLY;
+	private String taskName;
+
+	/**
+	 * Create a job that will update a profile according to the specified provisioning plan.
+	 * 
+	 * @param name the name of the job
+	 * @param session the provisioning session to use to obtain provisioning services
+	 * @param profileId the id of the profile to be altered
+	 * @param plan the provisioning plan describing how the profile is to be altered
+	 * @param context the provisioning context describing how the operation is to be performed
+	 */
+	public ProfileModificationJob(String name, ProvisioningSession session, String profileId, IProvisioningPlan plan, ProvisioningContext context) {
+		super(name, session);
+		this.plan = plan;
+		this.profileId = profileId;
+		this.provisioningContext = context;
+	}
+
+	/**
+	 * Set the phase set to be used when running the provisioning plan.  This method need only
+	 * be used when the default phase set is not sufficient.  For example, clients could 
+	 * use this method to perform a sizing or to download artifacts without provisioning them.
+	 * 
+	 * @param phaseSet the provisioning phases to be run during provisioning.
+	 */
+	public void setPhaseSet(IPhaseSet phaseSet) {
+		this.phaseSet = phaseSet;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.IProfileChangeJob#getProfileId()
+	 */
+	public String getProfileId() {
+		return profileId;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IStatus runModal(IProgressMonitor monitor) {
+		String task = taskName;
+		IStatus status = Status.OK_STATUS;
+		if (task == null)
+			task = getName();
+		monitor.beginTask(task, 1000);
+		try {
+			status = getSession().performProvisioningPlan(plan, phaseSet, provisioningContext, new SubProgressMonitor(monitor, 1000));
+		} finally {
+			monitor.done();
+		}
+		return status;
+	}
+
+	/**
+	 * Sets the top level task name for progress when running this operation.
+	 * 
+	 * @param label the label to be used for the task name
+	 */
+	public void setTaskName(String label) {
+		this.taskName = label;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProvisioningJob#getRestartPolicy()
+	 */
+	public int getRestartPolicy() {
+		return restartPolicy;
+	}
+
+	/**
+	 * Set the restart policy that describes whether restart is needed after
+	 * performing this job.
+	 * 
+	 * @param policy an integer describing the restart policy
+	 * @see ProvisioningJob#RESTART_NONE
+	 * @see ProvisioningJob#RESTART_ONLY
+	 * @see ProvisioningJob#RESTART_OR_APPLY
+	 */
+	public void setRestartPolicy(int policy) {
+		restartPolicy = policy;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java
new file mode 100644
index 0000000..3e834b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.operations;
+
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.operations.Activator;
+import org.eclipse.equinox.internal.p2.operations.Messages;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Abstract class representing provisioning jobs.  Provisioning jobs
+ * can be run in the background by scheduling them, or they can
+ * be run by a client in a modal context.  An additional progress monitor
+ * can be set into the job for progress reporting.
+ * 
+ * @since 2.0
+ */
+public abstract class ProvisioningJob extends Job {
+
+	/**
+	 * Class for multiplexing progress across multiple progress monitors.
+	 */
+	private static class DoubleProgressMonitor extends ProgressMonitorWrapper {
+
+		IProgressMonitor additionalMonitor;
+
+		protected DoubleProgressMonitor(IProgressMonitor monitor1, IProgressMonitor monitor2) {
+			super(monitor1);
+			additionalMonitor = monitor2;
+		}
+
+		public void beginTask(String name, int totalWork) {
+			super.beginTask(name, totalWork);
+			additionalMonitor.beginTask(name, totalWork);
+		}
+
+		public void clearBlocked() {
+			super.clearBlocked();
+			if (additionalMonitor instanceof IProgressMonitorWithBlocking)
+				((IProgressMonitorWithBlocking) additionalMonitor).clearBlocked();
+		}
+
+		public void done() {
+			super.done();
+			additionalMonitor.done();
+		}
+
+		public void internalWorked(double work) {
+			super.internalWorked(work);
+			additionalMonitor.internalWorked(work);
+		}
+
+		public boolean isCanceled() {
+			if (super.isCanceled())
+				return true;
+			return additionalMonitor.isCanceled();
+		}
+
+		public void setBlocked(IStatus reason) {
+			super.setBlocked(reason);
+			if (additionalMonitor instanceof IProgressMonitorWithBlocking)
+				((IProgressMonitorWithBlocking) additionalMonitor).setBlocked(reason);
+		}
+
+		public void setCanceled(boolean b) {
+			super.setCanceled(b);
+			additionalMonitor.setCanceled(b);
+		}
+
+		public void setTaskName(String name) {
+			super.setTaskName(name);
+			additionalMonitor.setTaskName(name);
+		}
+
+		public void subTask(String name) {
+			super.subTask(name);
+			additionalMonitor.subTask(name);
+		}
+
+		public void worked(int work) {
+			super.worked(work);
+			additionalMonitor.worked(work);
+		}
+	}
+
+	/**
+	 * Constant which indicates that the job does not require a restart
+	 * upon completion.  This constant is typically used for operations that 
+	 * do not modify the running profile.
+	 * 
+	 * @since 2.0
+	 */
+	public static final int RESTART_NONE = 1;
+
+	/**
+	 * Constant which indicates that the job requires the user to either
+	 * restart or apply the configuration changes in order to pick up the
+	 * changes performed by the job.  This constant is typically used for
+	 * operations that modify the running profile.
+	 * 
+	 * @since 2.0
+	 */
+	public static final int RESTART_OR_APPLY = 2;
+	/**
+	 * Constant which indicates that the job requires the user to restart
+	 * in order to pick up the changes performed by the job.  This constant
+	 * is typically used for operations that modify the running profile but don't 
+	 * handle dynamic changes without restarting the workbench.
+	 * 
+	 * @since 2.0
+	 */
+	public static final int RESTART_ONLY = 3;
+
+	private ProvisioningSession session;
+	private IProgressMonitor additionalMonitor;
+
+	/**
+	 * Create a provisioning job with the given name that uses the
+	 * provided provisioning session for retrieving any services
+	 * needed.
+	 * 
+	 * @param name the name of the job
+	 * @param session the session providing the services
+	 */
+	public ProvisioningJob(String name, ProvisioningSession session) {
+		super(name);
+		this.session = session;
+	}
+
+	/**
+	 * Return the provisioning session that is used by the receiver
+	 * when retrieving necessary provisioning services.
+	 * 
+	 * @return the session
+	 * @see ProvisioningSession
+	 */
+	protected ProvisioningSession getSession() {
+		return session;
+	}
+
+	private IProgressMonitor getCombinedProgressMonitor(IProgressMonitor mon1, IProgressMonitor mon2) {
+		if (mon1 == null)
+			return mon2;
+		if (mon2 == null)
+			return mon1;
+		return new DoubleProgressMonitor(mon1, mon2);
+	}
+
+	public void setAdditionalProgressMonitor(IProgressMonitor monitor) {
+		additionalMonitor = monitor;
+	}
+
+	/**
+	 * Executes this job.  Returns the result of the execution.
+	 * This method is overridden to look for a wrapped progress monitor for
+	 * reporting progress.
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 * 
+	 */
+	public final IStatus run(IProgressMonitor monitor) {
+		IProgressMonitor wrappedMonitor = getCombinedProgressMonitor(monitor, additionalMonitor);
+		IStatus status = Status.OK_STATUS;
+		try {
+			status = runModal(wrappedMonitor);
+		} catch (OperationCanceledException e) {
+			status = Status.CANCEL_STATUS;
+		}
+		return status;
+	}
+
+	/**
+	 * Perform the specific work involved in running this job in
+	 * the current thread.  This method can be called directly by
+	 * clients, or in the course of running the job in the
+	 * background.
+	 * 
+	 * @param monitor
+	 *            the progress monitor to use for the operation
+	 *            
+	 * @return a status indicating the result of the operation.
+	 * 
+	 */
+	public abstract IStatus runModal(IProgressMonitor monitor);
+
+	/**
+	 * Return the restart policy that is appropriate for this job.
+	 * 
+	 * @return a constant indicating the restart policy
+	 * 
+	 * @see #RESTART_NONE
+	 * @see #RESTART_ONLY
+	 * @see #RESTART_OR_APPLY
+	 */
+	public int getRestartPolicy() {
+		return RESTART_NONE;
+	}
+
+	/**
+	 * Return an error status that can be used to report the specified exception.
+	 * 
+	 * @param message the message that should be used in the status
+	 * @param e the exception to be reported
+	 * @return a status that can be used to describe the exception
+	 */
+	protected IStatus getErrorStatus(String message, ProvisionException e) {
+		if (message == null)
+			if (e == null)
+				message = NLS.bind(Messages.ProvisioningJob_GenericErrorStatusMessage, getName());
+			else
+				message = e.getLocalizedMessage();
+		return new Status(IStatus.ERROR, Activator.ID, message, e);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
new file mode 100644
index 0000000..16280fa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
@@ -0,0 +1,228 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import java.io.IOException;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.operations.Activator;
+import org.eclipse.equinox.internal.p2.operations.Messages;
+import org.eclipse.equinox.internal.provisional.configurator.Configurator;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+
+/**
+ * ProvisioningSession provides the context for a provisioning session, including
+ * the provisioning services that should be used.  It also provides utility
+ * methods for commonly performed provisioning tasks.
+ * 
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class ProvisioningSession {
+	private IProvisioningAgent agent;
+
+	Set<Job> scheduledJobs = Collections.synchronizedSet(new HashSet<Job>());
+
+	/**
+	 * Create a provisioning session using the services of the supplied agent.
+	 * @param agent the provisioning agent that supplies services.  Must not be <code>null</code>.
+	 */
+	public ProvisioningSession(IProvisioningAgent agent) {
+		Assert.isNotNull(agent, Messages.ProvisioningSession_AgentNotFound);
+		this.agent = agent;
+	}
+
+	/**
+	 * Return the provisioning agent used to retrieve provisioning services.
+	 * @return the provisioning agent
+	 */
+	public IProvisioningAgent getProvisioningAgent() {
+		return agent;
+	}
+
+	/**
+	 * Return the agent location for this session
+	 * @return the agent location
+	 */
+	IAgentLocation getAgentLocation() {
+		return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the artifact repository manager for this session
+	 * @return the repository manager
+	 */
+	IArtifactRepositoryManager getArtifactRepositoryManager() {
+		return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the metadata repository manager for this session
+	 * @return the repository manager
+	 */
+	IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+	}
+
+	IProfileRegistry getProfileRegistry() {
+		return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the provisioning engine for this session
+	 * @return the provisioning engine
+	 */
+	IEngine getEngine() {
+		return (IEngine) agent.getService(IEngine.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the provisioning event bus used for dispatching events.
+	 * @return the event bus
+	 */
+	IProvisioningEventBus getProvisioningEventBus() {
+		return (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the planner used for this session
+	 * @return the planner
+	 */
+	IPlanner getPlanner() {
+		return (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+	}
+
+	/**
+	 * Perform the specified provisioning plan.
+	 * 
+	 * @param plan the provisioning plan to be performed
+	 * @param phaseSet the phase set to be used for the plan
+	 * @param context the provisioning context to be used during provisioning
+	 * @param monitor the progress monitor to use while performing the plan
+	 * @return a status describing the result of performing the plan
+	 */
+	public IStatus performProvisioningPlan(IProvisioningPlan plan, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor monitor) {
+		IPhaseSet set;
+		if (phaseSet == null)
+			set = PhaseSetFactory.createDefaultPhaseSet();
+		else
+			set = phaseSet;
+
+		// 300 ticks for download, 100 to install handlers, 100 to compute the plan, 100 to install the rest
+		SubMonitor mon = SubMonitor.convert(monitor, 600);
+		int ticksUsed = 0;
+
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=272355
+		// The exact profile instance used in the profile change request and passed to the engine must be used for all
+		// of these operations, otherwise we can get profile out of synch errors.	
+		IProfile profile = plan.getProfile();
+
+		if (plan.getInstallerPlan() != null) {
+			if (doesPhaseSetIncludeDownload(set)) {
+				// If the phase set calls for download, then we want to download the install plan artifacts
+				// at the same time as the actual install artifacts.  This way, we will only install the install handler
+				// after already knowing we have successfully obtained the artifacts that will be installed afterward.
+				IProvisioningPlan downloadPlan = getEngine().createPlan(profile, context);
+				Iterator<IInstallableUnit> it = QueryUtil.compoundQueryable(plan.getAdditions(), plan.getInstallerPlan().getAdditions()).query(QueryUtil.createIUAnyQuery(), null).iterator();
+				while (it.hasNext()) {
+					downloadPlan.addInstallableUnit(it.next());
+				}
+				IPhaseSet download = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT});
+				IStatus downloadStatus = getEngine().perform(downloadPlan, download, mon.newChild(300));
+				if (!downloadStatus.isOK()) {
+					mon.done();
+					return downloadStatus;
+				}
+				ticksUsed = 300;
+			}
+			// we pre-downloaded if necessary.  Now perform the install plan against the original phase set.
+			IStatus installerPlanStatus = getEngine().perform(plan.getInstallerPlan(), set, mon.newChild(100));
+			if (!installerPlanStatus.isOK()) {
+				mon.done();
+				return installerPlanStatus;
+			}
+			ticksUsed += 100;
+			// Apply the configuration
+			Configurator configChanger = (Configurator) ServiceHelper.getService(Activator.getContext(), Configurator.class.getName());
+			try {
+				configChanger.applyConfiguration();
+			} catch (IOException e) {
+				mon.done();
+				return new Status(IStatus.ERROR, Activator.ID, Messages.ProvisioningSession_InstallPlanConfigurationError, e);
+			}
+		}
+		return getEngine().perform(plan, set, mon.newChild(500 - ticksUsed));
+	}
+
+	private boolean doesPhaseSetIncludeDownload(IPhaseSet set) {
+		String[] phaseIds = set.getPhaseIds();
+		for (int i = 0; i < phaseIds.length; i++)
+			if (phaseIds[i].equals(PhaseSetFactory.PHASE_COLLECT))
+				return true;
+		return false;
+	}
+
+	/**
+	 * Return a boolean indicating whether any other provisioning operations are
+	 * scheduled for the specified profile.
+	 * 
+	 * @param profileId the id of the profile in question
+	 * @return <code>true</code> if there are pending provisioning operations for
+	 * this profile, <code>false</code> if there are not.
+	 * @see #rememberJob(Job)
+	 */
+	public boolean hasScheduledOperationsFor(String profileId) {
+		Job[] jobs = getScheduledJobs();
+		for (int i = 0; i < jobs.length; i++) {
+			if (jobs[i] instanceof IProfileChangeJob) {
+				String id = ((IProfileChangeJob) jobs[i]).getProfileId();
+				if (profileId.equals(id))
+					return true;
+			}
+		}
+		return false;
+	}
+
+	private Job[] getScheduledJobs() {
+		synchronized (scheduledJobs) {
+			return scheduledJobs.toArray(new Job[scheduledJobs.size()]);
+		}
+	}
+
+	/**
+	 * Remember the specified job.  Remembered jobs are
+	 * checked when callers want to know what work is scheduled for
+	 * a particular profile.
+	 * 
+	 * @param job the job to be remembered
+	 * @see #hasScheduledOperationsFor(String)
+	 */
+	public void rememberJob(Job job) {
+		scheduledJobs.add(job);
+		job.addJobChangeListener(new JobChangeAdapter() {
+			public void done(IJobChangeEvent event) {
+				scheduledJobs.remove(event.getJob());
+			}
+		});
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java
new file mode 100644
index 0000000..fd2a99a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.operations;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.operations.*;
+import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * RepositoryTracker defines a service that retrieves repositories, tracks their status, and
+ * reports errors.
+ * 
+ * @since 2.0
+ */
+public abstract class RepositoryTracker {
+
+	/**
+	 * A status code used to indicate that a repository location was not valid.
+	 */
+	public static final int STATUS_INVALID_REPOSITORY_LOCATION = IStatusCodes.INVALID_REPOSITORY_LOCATION;
+
+	// What repositories to show
+	private int artifactRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
+	private int metadataRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
+	/**
+	 * List<URI> of repositories that have already been reported to the user as not found.
+	 */
+	private final List<URI> reposNotFound = Collections.synchronizedList(new ArrayList<URI>());
+
+	/**
+	 * Return an array of repository locations known for the specified provisioning session.
+	 * 
+	 * @param session the provisioning session providing the provisioning services
+	 * @return an array of repository locations known by this tracker
+	 */
+	public abstract URI[] getKnownRepositories(ProvisioningSession session);
+
+	/**
+	 * Return a status appropriate for reporting an invalid repository location.
+	 * @param locationText the text representation of the location
+	 * @return a status that describes an invalid location
+	 */
+	public IStatus getInvalidLocationStatus(String locationText) {
+		return new Status(IStatus.ERROR, Activator.ID, IStatusCodes.INVALID_REPOSITORY_LOCATION, NLS.bind(Messages.RepositoryTracker_InvalidLocation, locationText), null);
+	}
+
+	/**
+	 * Return a repository location represented by the supplied string. The provided
+	 * string should either be an unencoded string representation of a URI, or a
+	 * local file system path. This method is generally suitable for converting a 
+	 * location string entered by an end user into a suitable URI representation.
+	 * 
+	 * @param locationString a text representation of the location
+	 * @return a repository location URI, or <code>null</code> if the
+	 * text could not be interpreted.
+	 */
+	public URI locationFromString(String locationString) {
+		URI userLocation;
+		try {
+			userLocation = URIUtil.fromString(locationString);
+		} catch (URISyntaxException e) {
+			return null;
+		}
+		// If a path separator char was used, interpret as a local file URI
+		String uriString = URIUtil.toUnencodedString(userLocation);
+		if (uriString.length() > 0 && (uriString.charAt(0) == '/' || uriString.charAt(0) == File.separatorChar))
+			return RepositoryHelper.localRepoURIHelper(userLocation);
+		return userLocation;
+	}
+
+	/**
+	 * Validate the specified repository location.
+	 * 
+	 * @param session the provisioning session providing the repository services
+	 * @param location the location in question
+	 * @param contactRepositories <code>true</code> if the appropriate repository manager(s) should be
+	 * consulted regarding the validity of the location, or <code>false</code> if the repository manager
+	 * should not be consulted.
+	 * @param monitor the progress monitor
+	 * @return a status indicating the current status of the repository
+	 */
+
+	public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
+		// First validate syntax issues
+		IStatus localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
+		if (!localValidationStatus.isOK()) {
+			// bad syntax, but it could just be non-absolute.
+			// In this case, use the helper
+			String locationString = URIUtil.toUnencodedString(location);
+			if (locationString.length() > 0 && (locationString.charAt(0) == '/' || locationString.charAt(0) == File.separatorChar)) {
+				location = RepositoryHelper.localRepoURIHelper(location);
+				localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
+			}
+		}
+
+		if (!localValidationStatus.isOK())
+			return localValidationStatus;
+
+		// Syntax was ok, now look for duplicates
+		URI[] knownRepositories = getKnownRepositories(session);
+		for (int i = 0; i < knownRepositories.length; i++) {
+			if (URIUtil.sameURI(knownRepositories[i], location)) {
+				localValidationStatus = new Status(IStatus.ERROR, Activator.ID, IStatusCodes.INVALID_REPOSITORY_LOCATION, Messages.RepositoryTracker_DuplicateLocation, null);
+				break;
+			}
+		}
+		return localValidationStatus;
+	}
+
+	/**
+	 * Add the specified location to the list of "not found" repositories.
+	 * This list is used to ensure that errors are not reported multiple times
+	 * for the same repository.
+	 * 
+	 * The caller is already assumed to have reported any errors if necessary.
+	 * 
+	 * @param location the location of the repository that cannot be found
+	 */
+	public void addNotFound(URI location) {
+		reposNotFound.add(location);
+	}
+
+	/**
+	 * Answer a boolean indicating whether not found status has already been
+	 * reported for the specified location.
+	 * 
+	 * @param location the location in question
+	 * @return <code>true</code> if the repository has already been reported as
+	 * being not found, <code>false</code> if no status has been reported for this
+	 * location.
+	 */
+	public boolean hasNotFoundStatusBeenReported(URI location) {
+		// We don't check for things like case variants or end slash variants
+		// because we know that the repository managers already did this.
+		return reposNotFound.contains(location);
+	}
+
+	/**
+	 * Clear the list of repositories that have already been reported as not found.
+	 */
+	public void clearRepositoriesNotFound() {
+		reposNotFound.clear();
+	}
+
+	/**
+	 * Remove the specified repository from the list of repositories that
+	 * have already been reported as not found.  This method has no effect
+	 * if the repository has never been reported as not found.
+	 * 
+	 * @param location the location in question
+	 */
+	public void clearRepositoryNotFound(URI location) {
+		reposNotFound.remove(location);
+	}
+
+	/**
+	 * Return the repository flags suitable for retrieving known repositories from 
+	 * a repository manager
+	 * 
+	 * @return the repository flags
+	 * 
+	 */
+	public int getArtifactRepositoryFlags() {
+		return artifactRepositoryFlags;
+	}
+
+	/**
+	 * Set the repository flags suitable for retrieving known repositories from 
+	 * a repository manager
+	 * 
+	 * @param flags the repository flags
+	 * 
+	 */
+	public void setArtifactRepositoryFlags(int flags) {
+		artifactRepositoryFlags = flags;
+	}
+
+	/**
+	 * Return the repository flags suitable for retrieving known repositories from 
+	 * a repository manager
+	 * 
+	 * @return the repository flags
+	 * 
+	 */
+	public int getMetadataRepositoryFlags() {
+		return metadataRepositoryFlags;
+	}
+
+	/**
+	 * Set the repository flags suitable for retrieving known repositories from 
+	 * a repository manager
+	 * 
+	 * @param flags the repository flags
+	 * 
+	 */
+
+	public void setMetadataRepositoryFlags(int flags) {
+		metadataRepositoryFlags = flags;
+	}
+
+	/**
+	 * Report a failure to load the specified repository.
+	 * <p>
+	 * This default implementation simply logs the failure. Subclasses may override
+	 * to provide additional error reporting.
+	 * </p>
+	 * @param location the location of the failed repository
+	 * @param exception the failure that occurred
+	 */
+	public void reportLoadFailure(final URI location, ProvisionException exception) {
+		// special handling when the repo location is bad.  We don't want to continually report it
+		int code = exception.getStatus().getCode();
+		if (code == IStatusCodes.INVALID_REPOSITORY_LOCATION || code == ProvisionException.REPOSITORY_INVALID_LOCATION || code == ProvisionException.REPOSITORY_NOT_FOUND) {
+			if (hasNotFoundStatusBeenReported(location))
+				return;
+			addNotFound(location);
+		}
+
+		LogHelper.log(exception.getStatus());
+	}
+
+	/**
+	 * Add a repository at the specified location.
+	 *
+	 * @param location the location of the new repository
+	 * @param nickname the nickname for the repository, or <code>null</code> if there is no nickname
+	 * @param session the session to use for provisioning services
+	 */
+	public abstract void addRepository(URI location, String nickname, ProvisioningSession session);
+
+	/**
+	 * Remove the repositories at the specified locations
+	 *
+	 * @param locations the locations
+	 * @param session the session to use for provisioning services
+	 */
+	public abstract void removeRepositories(URI[] locations, ProvisioningSession session);
+
+	/**
+	 * Refresh the repositories at the specified locations
+	 * @param locations the locations
+	 * @param session the session to use for provisioning services
+	 * @param monitor the progress monitor to use
+	 */
+	public abstract void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
new file mode 100644
index 0000000..45a0f03
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import java.net.URI;
+import java.util.Collection;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.equinox.internal.p2.operations.IFailedStatusEvaluator;
+import org.eclipse.equinox.internal.p2.operations.Messages;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * An UninstallOperation describes an operation that uninstalls {@link IInstallableUnit}s from
+ * a profile.
+ * 
+ * The following snippet shows how one might use an UninstallOperation to perform a synchronous resolution and
+ * then kick off an uninstall in the background:
+ * 
+ * <pre>
+ * UninstallOperation op = new UninstallOperation(session, new IInstallableUnit [] { removeThisIU });
+ * IStatus result = op.resolveModal(monitor);
+ * if (result.isOK()) {
+ *   op.getProvisioningJob(monitor).schedule();
+ * }
+ * </pre>
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class UninstallOperation extends ProfileChangeOperation {
+
+	private Collection<IInstallableUnit> toUninstall;
+
+	/**
+	 * Create an uninstall operation on the specified provisioning session that uninstalls
+	 * the specified IInstallableUnits.  Unless otherwise specified, the operation will
+	 * be associated with the currently running profile.
+	 * 
+	 * @param session the session to use for obtaining provisioning services
+	 * @param toUninstall the IInstallableUnits to be installed into the profile.
+	 */
+	public UninstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toUninstall) {
+		super(session);
+		this.toUninstall = toUninstall;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
+		request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
+		request.removeAll(toUninstall);
+		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
+		// We ask to remove the the profile root property in addition to removing the IU.  In theory this
+		// should be redundant, but there are cases where the planner decides not to uninstall something because
+		// it is needed by others.  We still want to remove the root in this case.
+		//		if (rootMarkerKey != null)
+		for (IInstallableUnit iuToUninstall : toUninstall) {
+			request.removeInstallableUnitProfileProperty(iuToUninstall, IProfile.PROP_PROFILE_ROOT_IU);
+		}
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
+	 */
+	protected String getProvisioningJobName() {
+		return Messages.UninstallOperation_ProvisioningJobName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
+	 */
+	protected String getResolveJobName() {
+		return Messages.UninstallOperation_ResolveJobName;
+	}
+
+	@Override
+	ProvisioningContext getFirstPassProvisioningContext() {
+		ProvisioningContext pc = new ProvisioningContext(session.getProvisioningAgent());
+		pc.setMetadataRepositories(new URI[0]);
+		pc.setArtifactRepositories(new URI[0]);
+		return pc;
+	}
+
+	@Override
+	IFailedStatusEvaluator getSecondPassEvaluator() {
+		return new IFailedStatusEvaluator() {
+			public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
+				return context;
+			}
+		};
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java
new file mode 100644
index 0000000..8188710
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * A simple data structure describing a possible update.
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class Update {
+
+	public IInstallableUnit toUpdate;
+	public IInstallableUnit replacement;
+
+	/**
+	 * Creates a new update description.
+	 * @param toUpdate The installable unit to update
+	 * @param replacement The replacement installable unit
+	 */
+	public Update(IInstallableUnit toUpdate, IInstallableUnit replacement) {
+		this.toUpdate = toUpdate;
+		this.replacement = replacement;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof Update))
+			return false;
+		if (toUpdate == null)
+			return false;
+		if (replacement == null)
+			return false;
+		Update other = (Update) obj;
+		return toUpdate.equals(other.toUpdate) && replacement.equals(other.replacement);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((toUpdate == null) ? 0 : toUpdate.hashCode());
+		result = prime * result + ((replacement == null) ? 0 : replacement.hashCode());
+		return result;
+	}
+
+	/*(non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return "Update " + toUpdate.toString() + " ==> " + replacement.toString(); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
new file mode 100644
index 0000000..03fee84
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
@@ -0,0 +1,343 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.operations;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.operations.*;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+
+/**
+ * An UpdateOperation describes an operation that updates {@link IInstallableUnit}s in
+ * a profile.
+ * 
+ * The following snippet shows how one might use an UpdateOperation to check for updates
+ * to the profile and then install them in the background.
+ * 
+ * <pre>
+ * UpdateOperation op = new UpdateOperation(session);
+ * IStatus result = op.resolveModal(monitor);
+ * if (result.isOK()) {
+ *   op.getProvisioningJob(monitor).schedule();
+ * }
+ * </pre>
+ * 
+ * The life cycle of an UpdateOperation is different than that of the other
+ * operations.  Since assembling the list of possible updates may be costly,
+ * clients should not have to create a new update operation if the desired updates
+ * to be applied need to change.  In this case, the client can set a new set of
+ * chosen updates on the update operation and resolve again.
+ * 
+ * <pre>
+ * UpdateOperation op = new UpdateOperation(session);
+ * IStatus result = op.resolveModal(monitor);
+ * if (result.isOK()) {
+ *   op.getProvisioningJob(monitor).schedule();
+ * } else if (result.getSeverity() == IStatus.ERROR) {
+ *   Update [] chosenUpdates = letUserPickFrom(op.getPossibleUpdates());
+ *   op.setSelectedUpdates(chosenUpdates);
+ *   IStatus result = op.resolveModal(monitor);
+ * }
+ * </pre>
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 2.0
+ */
+public class UpdateOperation extends ProfileChangeOperation {
+
+	/**
+	 * A status code used to indicate that there were no updates found when
+	 * looking for updates.
+	 */
+	public static final int STATUS_NOTHING_TO_UPDATE = IStatusCodes.NOTHING_TO_UPDATE;
+
+	private Collection<IInstallableUnit> iusToUpdate;
+	private HashMap<IInstallableUnit, List<Update>> possibleUpdatesByIU = new HashMap<IInstallableUnit, List<Update>>();
+	private List<Update> defaultUpdates;
+
+	/**
+	 * Create an update operation on the specified provisioning session that updates
+	 * the specified IInstallableUnits.  Unless otherwise specified, the operation will
+	 * be associated with the currently running profile.
+	 * 
+	 * @param session the session to use for obtaining provisioning services
+	 * @param toBeUpdated the IInstallableUnits to be updated.
+	 */
+	public UpdateOperation(ProvisioningSession session, Collection<IInstallableUnit> toBeUpdated) {
+		super(session);
+		this.iusToUpdate = toBeUpdated;
+	}
+
+	/**
+	 * Create an update operation that will update all of the user-visible installable
+	 * units in the profile (the profile roots).
+	 * 
+	 * @param session the session providing the provisioning services
+	 */
+	public UpdateOperation(ProvisioningSession session) {
+		this(session, null);
+	}
+
+	/**
+	 * Set the updates that should be selected from the set of available updates.
+	 * If the selected updates are not specified, then the latest available update
+	 * for each IInstallableUnit with updates will be chosen.
+	 * 
+	 * @param defaultUpdates the updates that should be chosen from all of the available
+	 * updates. 
+	 */
+	public void setSelectedUpdates(Update[] defaultUpdates) {
+		this.defaultUpdates = new ArrayList<Update>(Arrays.asList(defaultUpdates));
+	}
+
+	/**
+	 * Get the updates that have been selected from the set of available updates.
+	 * If none have been specified by the client, then the latest available update
+	 * for each IInstallableUnit with updates will be chosen.
+	 * 
+	 * @return the updates that should be chosen from all of the available updates
+	 */
+	public Update[] getSelectedUpdates() {
+		if (defaultUpdates == null)
+			return new Update[0];
+		return defaultUpdates.toArray(new Update[defaultUpdates.size()]);
+	}
+
+	/**
+	 * Get the list of all possible updates.  This list may include multiple versions
+	 * of updates for the same IInstallableUnit, as well as patches to the IInstallableUnit.
+	 * 
+	 * @return an array of all possible updates
+	 */
+	public Update[] getPossibleUpdates() {
+		ArrayList<Update> all = new ArrayList<Update>();
+		for (List<Update> updates : possibleUpdatesByIU.values())
+			all.addAll(updates);
+		return all.toArray(new Update[all.size()]);
+	}
+
+	private Update[] updatesFor(IInstallableUnit iu, IProfile profile, IProgressMonitor monitor) {
+		List<Update> updates;
+		if (possibleUpdatesByIU.containsKey(iu)) {
+			// We've already looked them up in the planner, use the cache
+			updates = possibleUpdatesByIU.get(iu);
+		} else {
+			// We must consult the planner
+			IQueryResult<IInstallableUnit> replacements = session.getPlanner().updatesFor(iu, context, monitor);
+			updates = new ArrayList<Update>();
+			for (Iterator<IInstallableUnit> replacementIterator = replacements.iterator(); replacementIterator.hasNext();) {
+				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=273967
+				// In the case of patches, it's possible that a patch is returned as an available update
+				// even though it is already installed, because we are querying each IU for updates individually.
+				// For now, we ignore any proposed update that is already installed.
+				IInstallableUnit replacementIU = replacementIterator.next();
+				IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(QueryUtil.createIUQuery(replacementIU), null);
+				if (alreadyInstalled.isEmpty()) {
+					Update update = new Update(iu, replacementIU);
+					updates.add(update);
+				}
+			}
+			possibleUpdatesByIU.put(iu, updates);
+		}
+		return updates.toArray(new Update[updates.size()]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
+		// Here we create a profile change request by finding the latest version available for any replacement, unless
+		// otherwise specified in the selections.
+		// We have to consider the scenario where the only updates available are patches, in which case the original
+		// IU should not be removed as part of the update.
+		Set<IInstallableUnit> toBeUpdated = new HashSet<IInstallableUnit>();
+		HashSet<Update> elementsToPlan = new HashSet<Update>();
+		boolean selectionSpecified = defaultUpdates != null;
+		IProfile profile = session.getProfileRegistry().getProfile(profileId);
+		if (profile == null)
+			return;
+
+		SubMonitor sub = SubMonitor.convert(monitor, Messages.UpdateOperation_ProfileChangeRequestProgress, 100 * iusToUpdate.size());
+		for (IInstallableUnit iuToUpdate : iusToUpdate) {
+			SubMonitor iuMon = sub.newChild(100);
+			Update[] updates = updatesFor(iuToUpdate, profile, iuMon);
+			for (int j = 0; j < updates.length; j++) {
+				toBeUpdated.add(iuToUpdate);
+				if (defaultUpdates != null && defaultUpdates.contains(updates[j])) {
+					elementsToPlan.add(updates[j]);
+				}
+
+			}
+			if (!selectionSpecified) {
+				// If no selection was specified, we must figure out the latest version to apply.
+				// The rules are that a true update will always win over a patch, but if only
+				// patches are available, they should all be selected.
+				// We first gather the latest versions of everything proposed.
+				// Patches are keyed by their id because they are unique and should not be compared to
+				// each other.  Updates are keyed by the IU they are updating so we can compare the
+				// versions and select the latest one
+				HashMap<String, Update> latestVersions = new HashMap<String, Update>();
+				boolean foundUpdate = false;
+				boolean foundPatch = false;
+				for (int j = 0; j < updates.length; j++) {
+					String key;
+					if (QueryUtil.isPatch(updates[j].replacement)) {
+						foundPatch = true;
+						key = updates[j].replacement.getId();
+					} else {
+						foundUpdate = true;
+						key = updates[j].toUpdate.getId();
+					}
+					Update latestUpdate = latestVersions.get(key);
+					IInstallableUnit latestIU = latestUpdate == null ? null : latestUpdate.replacement;
+					if (latestIU == null || updates[j].replacement.getVersion().compareTo(latestIU.getVersion()) > 0)
+						latestVersions.put(key, updates[j]);
+				}
+				// If there is a true update available, ignore any patches found
+				// Patches are keyed by their own id
+				if (foundPatch && foundUpdate) {
+					Set<String> keys = new HashSet<String>();
+					keys.addAll(latestVersions.keySet());
+					for (String id : keys) {
+						// Get rid of things keyed by a different id.  We've already made sure
+						// that updates with a different id are keyed under the original id
+						if (!id.equals(iuToUpdate.getId())) {
+							latestVersions.remove(id);
+						}
+					}
+				}
+				elementsToPlan.addAll(latestVersions.values());
+			}
+			sub.worked(100);
+		}
+
+		if (toBeUpdated.size() <= 0 || elementsToPlan.isEmpty()) {
+			sub.done();
+			status.add(PlanAnalyzer.getStatus(IStatusCodes.NOTHING_TO_UPDATE, null));
+			return;
+		}
+
+		request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
+		for (Update update : elementsToPlan) {
+			IInstallableUnit theUpdate = update.replacement;
+			if (defaultUpdates == null) {
+				defaultUpdates = new ArrayList<Update>();
+				defaultUpdates.add(update);
+			} else {
+				if (!defaultUpdates.contains(update))
+					defaultUpdates.add(update);
+			}
+			request.add(theUpdate);
+			request.setInstallableUnitProfileProperty(theUpdate, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+			if (QueryUtil.isPatch(theUpdate)) {
+				request.setInstallableUnitInclusionRules(theUpdate, ProfileInclusionRules.createOptionalInclusionRule(theUpdate));
+			} else {
+				request.remove(update.toUpdate);
+			}
+
+		}
+		sub.done();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
+	 */
+	protected String getProvisioningJobName() {
+		return Messages.UpdateOperation_UpdateJobName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
+	 */
+	protected String getResolveJobName() {
+		return Messages.UpdateOperation_ResolveJobName;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#prepareToResolve()
+	 */
+	protected void prepareToResolve() {
+		super.prepareToResolve();
+		if (iusToUpdate == null) {
+			iusToUpdate = getInstalledIUs();
+		}
+	}
+
+	/*
+	 * Get the IInstallable units for the specified profile
+	 * 
+	 * @param profileId the profile in question
+	 * @param all <code>true</code> if all IInstallableUnits in the profile should
+	 * be returned, <code>false</code> only those IInstallableUnits marked as (user visible) roots
+	 * should be returned.
+	 * 
+	 * @return an array of IInstallableUnits installed in the profile.
+	 */
+	private Collection<IInstallableUnit> getInstalledIUs() {
+		IProfile profile = session.getProfileRegistry().getProfile(profileId);
+		if (profile == null)
+			return CollectionUtils.emptyList();
+		IQuery<IInstallableUnit> query = new UserVisibleRootQuery();
+		IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
+		return queryResult.toUnmodifiableSet();
+	}
+
+	/*
+	 * Overridden to delay computation of the profile change request until the resolution
+	 * occurs.  This is done because computing the request is expensive (it involves searching
+	 * for updates).
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#makeResolveJob(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	void makeResolveJob(IProgressMonitor monitor) {
+		// throw away any previous requests
+		request = null;
+		noChangeRequest = PlanAnalyzer.getProfileChangeAlteredStatus();
+		// the requestHolder is a hack to work around the fact that there is no public API
+		// for the resolution job to get the request from the operation after it has been
+		// computed.
+		final ProfileChangeRequest[] requestHolder = new ProfileChangeRequest[1];
+		job = new SearchForUpdatesResolutionJob(getResolveJobName(), session, profileId, request, getFirstPassProvisioningContext(), getSecondPassEvaluator(), noChangeRequest, new IRunnableWithProgress() {
+			public void run(IProgressMonitor mon) throws OperationCanceledException {
+				// We only check for other jobs running if this job is *not* scheduled
+				if (job.getState() == Job.NONE && session.hasScheduledOperationsFor(profileId)) {
+					noChangeRequest.add(PlanAnalyzer.getStatus(IStatusCodes.OPERATION_ALREADY_IN_PROGRESS, null));
+				} else {
+					computeProfileChangeRequest(noChangeRequest, mon);
+					requestHolder[0] = UpdateOperation.this.request;
+				}
+			}
+		}, requestHolder, this);
+	}
+
+	/*
+	 * Overridden because our resolution job life cycle is different.  We have a job
+	 * before we've computed the profile change request, so we must ensure that we
+	 * have already computed the profile change request.
+	 * 
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#hasResolved()
+	 */
+	public boolean hasResolved() {
+		return request != null && super.hasResolved();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html
new file mode 100644
index 0000000..c0f0a93
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html
@@ -0,0 +1,33 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Describes high level provisioning operations that can be resolved and performed
+either modally or in the background.  
+<h2>
+Package Specification</h2>
+<p>
+This package consists of several kinds of operations and supporting classes:
+<ul>
+<li><b>Profile Change Operations</b> describe high level provisioning operations that
+modify a profile.  These operations generally are performed in two phases, the resolution
+of the operation, followed by the provisioning of the resolved operation.  Both the
+resolution and the provisioning tasks can be performed either synchronously or as jobs.
+</li>
+<li><b>Provisioning Jobs</b> describe lower level provisioning tasks that can
+be performed synchronously or in the background.
+</li>
+<li><b>ProvisioningSession</b> represents a particular instance of a p2 provisioning
+system.  It provides access to all of the p2 core services as well as utility methods
+for commonly performed provisioning tasks.
+</li>
+</ul>
+<p>
+ at since 2.0
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.classpath
index ef37949..834ea83 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" output="bin_ant" path="src_ant"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch
index 623ba59..3c6003b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch	
@@ -2,7 +2,7 @@
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1255396868921_12" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.equinox.p2.publisher" type="4"/>
</launchConfigurationWorkingSet>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 <listEntry value="/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml"/>
 </listAttribute>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
index d1b4550..f9763e4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Nov 27 14:50:33 EST 2008
+#Tue Feb 16 09:33:59 EST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,25 +7,26 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -49,6 +50,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -73,7 +75,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
@@ -81,6 +82,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverridin
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
@@ -88,7 +90,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -160,7 +162,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch b/eclipse/plugins/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch
index aef15c1..632914e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch	
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
 <booleanAttribute key="append.args" value="true"/>
 <booleanAttribute key="automaticAdd" value="false"/>
@@ -15,9 +15,9 @@
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
 <stringAttribute key="pde.version" value="3.3"/>
 <booleanAttribute key="show_selected_only" value="true"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app at default:true,org.eclipse.equinox.preferences at default:default,org.eclipse.ecf.ssl at default:false,org.eclipse.core.jobs at default:default,org.eclipse.osgi.services at default:default,org.eclipse.equinox.security at default:default,org.eclipse.core.net at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.osgi at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.equinox.launcher at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.frameworkadmin.equinox at 3:true,org.eclipse.equinox.common at default:default,org.eclipse.equinox.frameworkadmin at 3:true,org.eclipse.ecf at default:default,org.eclipse.equinox.p2.jarprocessor at default:default"/>
+<stringAttribute key="target_bundles" value="org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.osgi.services at default:default,org.eclipse.core.jobs at default:default,org.eclipse.equinox.app at default:true,org.eclipse.ecf.ssl at default:false,org.eclipse.equinox.launcher at default:default,org.eclipse.equinox.common at 2:true,org.eclipse.ecf at default:default,org.eclipse.equinox.frameworkadmin.equinox at 3:true,org.eclipse.equinox.security at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.core.net at default:default,org.eclipse.osgi at -1:true,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.frameworkadmin at 3:true,org.eclipse.ecf.identity at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.p2.jarprocessor at default:default"/>
 <booleanAttribute key="tracing" value="false"/>
 <booleanAttribute key="useDefaultConfigArea" value="true"/>
 <booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.publisher at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.simpleconfigurator at 3:true,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.simpleconfigurator.manipulator at 3:true,org.eclipse.equinox.p2.metadata at default:default"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator at 3:true,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.publisher at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.simpleconfigurator at 3:true"/>
 </launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
index db348c3..aae9cab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
@@ -1,58 +1,68 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
-Bundle-Version: 1.0.1.qualifier
 Bundle-Name: %bundleName
+Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
+Bundle-Version: 1.1.2.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
 Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.publisher;
+  x-friends:="org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.touchpoint.eclipse,
+   org.eclipse.equinox.p2.ui.sdk,
+   org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.internal.p2.publisher.compatibility;x-internal:=true,
+ org.eclipse.equinox.internal.p2.publisher.eclipse;
+  x-friends:="org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.extensionlocation,
+   org.eclipse.equinox.p2.repository.tools,
+   org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.internal.p2.swt.tools;x-internal:=true,
+ org.eclipse.equinox.p2.publisher;x-friends:="org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.p2.publisher.actions;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher",
+ org.eclipse.equinox.p2.publisher.eclipse;
+  x-friends:="org.eclipse.equinox.p2.directorywatcher,
+   org.eclipse.equinox.p2.extensionlocation,
+   org.eclipse.equinox.p2.touchpoint.eclipse,
+   org.eclipse.equinox.p2.updatesite,
+   org.eclipse.equinox.p2.repository.tools",
+ org.eclipse.equinox.spi.p2.publisher;x-friends:="org.eclipse.equinox.p2.updatesite"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
 Import-Package: javax.xml.parsers,
  org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
+ org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.internal.frameworkadmin.equinox,
  org.eclipse.equinox.internal.frameworkadmin.utils,
  org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.core,
+ org.eclipse.equinox.internal.p2.artifact.repository.simple,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.metadata,
+ org.eclipse.equinox.internal.p2.metadata.expression,
+ org.eclipse.equinox.internal.p2.metadata.index,
  org.eclipse.equinox.internal.p2.metadata.repository,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi,
  org.eclipse.osgi.service.datalocation;version="1.2.0",
  org.eclipse.osgi.service.environment;version="1.1.0",
  org.eclipse.osgi.service.pluginconversion;version="1.0.0",
  org.eclipse.osgi.service.resolver;version="1.2.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.4.0",
+ org.osgi.service.application;version="1.1.0",
  org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.util.tracker;version="1.3.3",
- org.w3c.dom,
  org.xml.sax,
  org.xml.sax.helpers
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
-Export-Package: org.eclipse.equinox.internal.p2.publisher;
-  x-friends:="org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.ui.sdk",
- org.eclipse.equinox.internal.p2.publisher.eclipse;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.p2.swt.tools;x-internal:=true,
- org.eclipse.equinox.p2.publisher;x-friends:="org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.p2.publisher.actions;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher",
- org.eclipse.equinox.p2.publisher.eclipse;
-  x-friends:="org.eclipse.equinox.p2.directorywatcher,
-   org.eclipse.equinox.p2.extensionlocation,
-   org.eclipse.equinox.p2.touchpoint.eclipse,
-   org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.spi.p2.publisher;x-friends:="org.eclipse.equinox.p2.updatesite"
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.publisher/build.properties
index 23f024b..cf42581 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2005, 2009 EclipseSource and others.
+#  Copyright (c) 2005, 2010 EclipseSource and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -22,5 +22,8 @@ bin.includes = META-INF/,\
 src.includes = about.html
 jars.compile.order = .,\
                      ant_tasks/publisher-ant.jar
+javacWarnings..=+unusedThrown
 extra.ant_tasks/publisher-ant.jar = platform:/plugin/org.apache.ant
 jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.publisher/plugin.xml
index 315440e..210c1d9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/plugin.xml
@@ -1,34 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.5"?>
 <plugin>
-   <extension id="InstallPublisher" point="org.eclipse.core.runtime.applications">
-      <application
-            cardinality="1"
-            thread="any"
-            visible="true">
-         <run
-               class="org.eclipse.equinox.p2.publisher.eclipse.InstallPublisherApplication">
-         </run>
-      </application>
-   </extension>
-   <extension id="ProductPublisher" point="org.eclipse.core.runtime.applications">
-      <application
-            cardinality="1"
-            thread="any"
-            visible="true">
-         <run
-               class="org.eclipse.equinox.p2.publisher.eclipse.ProductPublisherApplication">
-         </run>
-      </application>
-   </extension>
-   <extension id="FeaturesAndBundlesPublisher" point="org.eclipse.core.runtime.applications">
-      <application
-            cardinality="1"
-            thread="any"
-            visible="true">
-         <run
-               class="org.eclipse.equinox.p2.publisher.eclipse.FeaturesAndBundlesPublisherApplication">
-         </run>
-      </application>
-   </extension>
+	<extension id="InstallPublisher" point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="any" visible="true">
+			<run class="org.eclipse.equinox.p2.publisher.eclipse.InstallPublisherApplication" />
+		</application>
+	</extension>
+	<extension id="org.eclipse.equinox.p2.publisher.EclipseGenerator" point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="main" visible="true">
+			<run class="org.eclipse.equinox.internal.p2.publisher.compatibility.GeneratorApplication" />
+		</application>
+	</extension>
+	<extension id="ProductPublisher" point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="any" visible="true">
+			<run class="org.eclipse.equinox.p2.publisher.eclipse.ProductPublisherApplication" />
+		</application>
+	</extension>
+	<extension id="FeaturesAndBundlesPublisher" point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="any" visible="true">
+			<run class="org.eclipse.equinox.p2.publisher.eclipse.FeaturesAndBundlesPublisherApplication" />
+		</application>
+	</extension>
 
 	<extension point="org.eclipse.ant.core.antTasks">
 		<antTask
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.publisher/pom.xml
new file mode 100644
index 0000000..745ba5c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.publisher</artifactId>
+  <version>1.1.2.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
index d318b67..80380db 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
@@ -20,11 +20,11 @@ public class Activator implements BundleActivator {
 		return context;
 	}
 
-	public void start(BundleContext context) throws Exception {
-		Activator.context = context;
+	public void start(BundleContext bundleContext) throws Exception {
+		Activator.context = bundleContext;
 	}
 
-	public void stop(BundleContext context) throws Exception {
+	public void stop(BundleContext bundleContext) throws Exception {
 		Activator.context = null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
index bb921c6..aa1c2d2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
@@ -1,21 +1,23 @@
 /*******************************************************************************
- * Copyright (c) 2008 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors: 
  *   Code 9 - initial API and implementation
+ *   IBM Corporation - Ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.publisher;
 
-import java.util.ArrayList;
+import java.io.File;
+import java.util.*;
 
 public class FileSetDescriptor {
 	private final String key;
 	private String configSpec = null;
-	private String files = ""; //$NON-NLS-1$
-	private final ArrayList permissions = new ArrayList();
+	private HashSet<File> fileset = new HashSet<File>();
+	private final ArrayList<String[]> permissions = new ArrayList<String[]>();
 	private String links = ""; //$NON-NLS-1$
 
 	public FileSetDescriptor(String key, String configSpec) {
@@ -23,8 +25,8 @@ public class FileSetDescriptor {
 		this.configSpec = configSpec;
 	}
 
-	public void setFiles(String property) {
-		files = property;
+	public void addFiles(File[] files) {
+		fileset.addAll(Arrays.asList(files));
 	}
 
 	// a permission spec is { <perm>, file patterns }
@@ -49,11 +51,14 @@ public class FileSetDescriptor {
 	}
 
 	public String[][] getPermissions() {
-		return (String[][]) permissions.toArray(new String[permissions.size()][]);
+		return permissions.toArray(new String[permissions.size()][]);
 	}
 
-	public String getFiles() {
-		return files;
+	public File[] getFiles() {
+		return fileset.toArray(new File[fileset.size()]);
 	}
 
+	public int size() {
+		return fileset.size();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
index ed027a0..52637b1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
@@ -18,19 +18,21 @@ public class Messages extends NLS {
 	public static String exception_errorReadingManifest;
 	public static String exception_errorLoadingManifest;
 	public static String exception_noPluginConverter;
-	public static String exception_errorPublishingArtifacts;
 	public static String exception_noArtifactRepo;
 	public static String exception_noMetadataRepo;
-	public static String exception_errorLoadingProperties;
 	public static String exception_noBundlesOrLocations;
 	public static String exception_noFeaturesOrLocations;
 	public static String exception_invalidSiteReference;
 	public static String exception_invalidSiteReferenceInFeature;
+	public static String exception_repoMustBeURL;
+	public static String exception_sourcePath;
 
 	public static String message_generatingMetadata;
 	public static String message_generationCompleted;
 	public static String message_noSimpleconfigurator;
 
+	public static String exception_artifactRepoNoAppendDestroysInput;
+
 	public static String error_rootIU_generation;
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
new file mode 100644
index 0000000..d66af45
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.publisher;
+
+import java.io.*;
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+/**
+ * Tokenzier which supports quoting using '"'
+ * The resulting tokens will not contain the quote character '"' unless it was escaped '\"'
+ */
+public class QuotedTokenizer implements Enumeration<String> {
+	private StreamTokenizer tokenizer = null;
+
+	/**
+	 * Default delimiter is whitespace characters
+	 * @param str - String to be tokenized
+	 */
+	public QuotedTokenizer(String str) {
+		this(str, null);
+	}
+
+	/**
+	 * Tokenize based on the given delimiters.  The quote character '"' can not be
+	 * used as a delimiter.
+	 * @param str - String to be tokenized
+	 * @param delim - delimiter characters
+	 * @throws IllegalArgumentException if delim contains the quote character '"'
+	 */
+	public QuotedTokenizer(String str, String delim) {
+		if (delim != null && delim.indexOf('"') > -1)
+			throw new IllegalArgumentException();
+
+		StringReader reader = new StringReader(str);
+		tokenizer = new StreamTokenizer(reader);
+
+		tokenizer.resetSyntax();
+		if (delim == null)
+			tokenizer.ordinaryChars(0, 0x20);
+		else
+			tokenizer.wordChars(0, 0x20);
+		tokenizer.wordChars(0x21, 0xFF); //characters > 0xFF are also word chars
+		tokenizer.quoteChar('"');
+
+		if (delim != null) {
+			for (int i = 0; i < delim.length(); i++) {
+				tokenizer.ordinaryChar(delim.charAt(i));
+			}
+		}
+	}
+
+	/**
+	 * Test to see if more tokens are available
+	 * @return true if there is another token
+	 */
+	public boolean hasMoreTokens() {
+		return (token(null) != StreamTokenizer.TT_EOF);
+	}
+
+	/**
+	 * Return the next token,
+	 * @return the next token
+	 * @throws NoSuchElementException if there are no more tokens
+	 */
+	public String nextToken() {
+		StringBuffer buffer = new StringBuffer(10);
+		int tokenType = token(buffer);
+
+		if (tokenType == StreamTokenizer.TT_EOF)
+			throw new NoSuchElementException();
+
+		return buffer.toString();
+	}
+
+	/**
+	 * Get the next token, or check that there is a next token
+	 * @param buffer to hold the token, or null if we just want to know if there is one 
+	 */
+	private int token(StringBuffer buffer) {
+		int tokenType = 0;
+		int next = 0;
+
+		get_token: while (true) {
+			try {
+				tokenType = tokenizer.nextToken();
+			} catch (IOException e) {
+				tokenType = StreamTokenizer.TT_EOF;
+			}
+			switch (tokenType) {
+				case StreamTokenizer.TT_WORD :
+				case '"' :
+					if (buffer == null) {
+						//we just wanted to know if there was something coming
+						tokenizer.pushBack();
+						return tokenType;
+					}
+					buffer.append(tokenizer.sval);
+
+					// peek at the next token, 
+					try {
+						next = tokenizer.nextToken();
+						tokenizer.pushBack();
+					} catch (IOException e) {
+						next = StreamTokenizer.TT_EOF;
+					}
+
+					//if the next token is a quote, it is still this token, otherwise we are done
+					if (next == '"')
+						continue;
+					break get_token;
+				case StreamTokenizer.TT_EOF :
+					break get_token;
+				default :
+					//ordinary char from delim, if we have something we are done, otherwise keep looking for a token
+					if (buffer != null && buffer.length() > 0)
+						break get_token;
+					continue;
+			}
+		}
+		return tokenType;
+	}
+
+	public boolean hasMoreElements() {
+		return hasMoreTokens();
+	}
+
+	public String nextElement() {
+		return nextToken();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.java
deleted file mode 100644
index 31cc016..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/SingleElementCollector.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * Collect a single element and stop the Query
- */
-public class SingleElementCollector extends Collector {
-
-	public boolean accept(Object object) {
-		super.accept(object);
-		return false;
-	}
-
-	public Object getElement() {
-		if (!isEmpty())
-			return iterator().next();
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
new file mode 100644
index 0000000..f7bed22
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.publisher.compatibility;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.publisher.Activator;
+import org.osgi.service.application.*;
+
+/**
+ * @since 1.1
+ */
+public class GeneratorApplication implements IApplication {
+	protected static final String APP_ID = "app.id"; //$NON-NLS-1$
+
+	public static final String UPDATE_SITE_APPLICATION = "org.eclipse.equinox.p2.publisher.UpdateSitePublisher"; //$NON-NLS-1$
+	public static final String INSTALL_APPLICATION = "org.eclipse.equinox.p2.publisher.InstallPublisher"; //$NON-NLS-1$
+	public static final String FEATURES_BUNDLES_APPLICATION = "org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher"; //$NON-NLS-1$
+
+	public Object start(IApplicationContext context) throws Exception {
+		return run((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
+	}
+
+	public void stop() {
+		// TODO Auto-generated method stub
+	}
+
+	public Object run(String[] arguments) {
+		Map<String, Object> argumentMap = parseArguments(arguments);
+		return launchApplication(argumentMap);
+	}
+
+	protected Object launchApplication(Map<String, Object> applicationMap) {
+		String applicationId = (String) applicationMap.get(APP_ID);
+		String filter = "(service.pid=" + applicationId + ")"; //$NON-NLS-1$//$NON-NLS-2$
+		ApplicationDescriptor descriptor = (ApplicationDescriptor) ServiceHelper.getService(Activator.getContext(), ApplicationDescriptor.class.getName(), filter);
+		try {
+			ApplicationHandle handle = descriptor.launch(applicationMap);
+			return handle.getExitValue(0);
+		} catch (ApplicationException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	private Map<String, Object> parseArguments(String[] arguments) {
+		Map<String, Object> applicationMap = new HashMap<String, Object>();
+		Map<String, String> args = new HashMap<String, String>(arguments.length);
+		for (int i = 0; i < arguments.length; i++) {
+			if (i == arguments.length - 1 || arguments[i + 1].startsWith(IGeneratorConstants.DASH))
+				args.put(arguments[i], null);
+			else
+				args.put(arguments[i], arguments[++i]);
+		}
+
+		//adjust the short forms
+		if (args.containsKey(IGeneratorConstants.AR))
+			args.put(IGeneratorConstants.ARTIFACT_REPO, args.remove(IGeneratorConstants.AR));
+		if (args.containsKey(IGeneratorConstants.MR))
+			args.put(IGeneratorConstants.METADATA_REPO, args.remove(IGeneratorConstants.MR));
+		if (args.containsKey(IGeneratorConstants.PA))
+			args.put(IGeneratorConstants.PUBLISH_ARTIFACTS, args.remove(IGeneratorConstants.PA));
+		if (args.containsKey(IGeneratorConstants.PAR))
+			args.put(IGeneratorConstants.PUBLISH_ATIFACT_REPOSITORY, args.remove(IGeneratorConstants.PAR));
+
+		if (args.containsKey(IGeneratorConstants.ROOT)) {
+			String rootId = args.remove(IGeneratorConstants.ROOT);
+			args.put(IGeneratorConstants.IU, rootId);
+			args.put(IGeneratorConstants.ID, rootId);
+		}
+
+		if (args.containsKey(IGeneratorConstants.ROOT_VERSION))
+			args.put(IGeneratorConstants.VERSION, args.remove(IGeneratorConstants.ROOT_VERSION));
+
+		String source = null;
+		// -inplace and -updateSite become -source, and imply -append
+		if (args.containsKey(IGeneratorConstants.UPDATE_SITE))
+			source = args.remove(IGeneratorConstants.UPDATE_SITE);
+		if (args.containsKey(IGeneratorConstants.INPLACE))
+			source = args.remove(IGeneratorConstants.INPLACE);
+		if (source != null) {
+			args.put(IGeneratorConstants.SOURCE, source);
+			args.put(IGeneratorConstants.APPEND, null);
+
+			//if not specified, repo locations are based on source
+			String repoLocation = URIUtil.toUnencodedString(new File(source).toURI());
+			if (!args.containsKey(IGeneratorConstants.ARTIFACT_REPO))
+				args.put(IGeneratorConstants.ARTIFACT_REPO, repoLocation);
+			if (!args.containsKey(IGeneratorConstants.METADATA_REPO))
+				args.put(IGeneratorConstants.METADATA_REPO, repoLocation);
+		}
+
+		File base = new File(args.get(IGeneratorConstants.SOURCE));
+		File configuration = new File(base, "configuration"); //$NON-NLS-1$
+		if (configuration.exists()) {
+			applicationMap.put(APP_ID, INSTALL_APPLICATION);
+		} else if (args.containsKey(IGeneratorConstants.SITE)) {
+			applicationMap.put(APP_ID, UPDATE_SITE_APPLICATION);
+		} else if (args.containsKey(IGeneratorConstants.CONFIG)) {
+			applicationMap.put(APP_ID, INSTALL_APPLICATION);
+		} else {
+			applicationMap.put(APP_ID, FEATURES_BUNDLES_APPLICATION);
+		}
+
+		applicationMap.put(IApplicationContext.APPLICATION_ARGS, flattenMap(args));
+		return applicationMap;
+	}
+
+	private String[] flattenMap(Map<String, String> map) {
+		ArrayList<String> list = new ArrayList<String>(map.size());
+		for (Iterator<String> iterator = map.keySet().iterator(); iterator.hasNext();) {
+			String key = iterator.next();
+			String value = map.get(key);
+			list.add(key);
+			if (value != null)
+				list.add(value);
+		}
+		return list.toArray(new String[list.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
new file mode 100644
index 0000000..30bd49c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.publisher.compatibility;
+
+/**
+ * @since 1.1
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IGeneratorConstants {
+	public static final String DASH = "-"; //$NON-NLS-1$
+
+	//arguments understood by the old metadata generator application
+	public static final String PUBLISH_ARTIFACTS = "-publishArtifacts"; //$NON-NLS-1$
+	public static final String PA = "-pa"; //$NON-NLS-1$
+	public static final String PUBLISH_ATIFACT_REPOSITORY = "-publishArtifactRepository"; //$NON-NLS-1$
+	public static final String PAR = "-par"; //$NON-NLS-1$
+	public static final String APPEND = "-append"; //$NON-NLS-1$
+	public static final String NO_DEFAULT_IUS = "-noDefaultIUs"; //$NON-NLS-1$
+	public static final String COMPRESS = "-compress"; //$NON-NLS-1$
+	public static final String REUSE_PACK200 = "-reusePack200Files"; //$NON-NLS-1$
+	public static final String SOURCE = "-source"; //$NON-NLS-1$
+	public static final String INPLACE = "-inplace"; //$NON-NLS-1$
+	public static final String CONFIG = "-config"; //$NON-NLS-1$
+	public static final String UPDATE_SITE = "-updateSite"; //$NON-NLS-1$
+	public static final String EXE = "-exe"; //$NON-NLS-1$
+	public static final String LAUNCHER_CONFIG = "-launcherConfig"; //$NON-NLS-1$
+	public static final String METADATA_REPO_NAME = "-metadataRepositoryName"; //$NON-NLS-1$
+	public static final String METADATA_REPO = "-metadataRepository"; //$NON-NLS-1$
+	public static final String MR = "-mr"; //$NON-NLS-1$
+	public static final String ARTIFACT_REPO = "-artifactRepository"; //$NON-NLS-1$
+	public static final String AR = "-ar"; //$NON-NLS-1$
+	public static final String ARTIFACT_REPO_NAME = "-artifactRepositoryName"; //$NON-NLS-1$
+	public static final String FLAVOR = "-flavor"; //$NON-NLS-1$
+	public static final String PRODUCT_FILE = "-productFile"; //$NON-NLS-1$
+	public static final String FEATURES = "-features"; //$NON-NLS-1$
+	public static final String BUNDLES = "-bundles"; //$NON-NLS-1$
+	public static final String BASE = "-base"; //$NON-NLS-1$
+	public static final String ROOT = "-root"; //$NON-NLS-1$
+	public static final String ROOT_VERSION = "-rootVersion"; //$NON-NLS-1$
+	public static final String P2_OS = "-p2.os"; //$NON-NLS-1$
+	public static final String SITE = "-site"; //$NON-NLS-1$
+	public static final String IU = "-iu"; //$NON-NLS-1$
+	public static final String ID = "-id"; //$NON-NLS-1$
+	public static final String VERSION = "-version"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
index 8381929..5878b64 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
@@ -83,16 +83,18 @@ public class BrandingIron {
 
 		if ("win32".equals(os)) //$NON-NLS-1$
 			brandWindows();
-		if ("linux".equals(os)) //$NON-NLS-1$
+		else if ("linux".equals(os)) //$NON-NLS-1$
 			brandLinux();
-		if ("solaris".equals(os)) //$NON-NLS-1$
+		else if ("solaris".equals(os)) //$NON-NLS-1$
 			brandSolaris();
-		if ("macosx".equals(os)) //$NON-NLS-1$
+		else if ("macosx".equals(os)) //$NON-NLS-1$
 			brandMac();
-		if ("aix".equals(os)) //$NON-NLS-1$
+		else if ("aix".equals(os)) //$NON-NLS-1$
 			brandAIX();
-		if ("hpux".equals(os)) //$NON-NLS-1$
+		else if ("hpux".equals(os)) //$NON-NLS-1$
 			brandHPUX();
+		else
+			renameLauncher();
 	}
 
 	private void brandAIX() {
@@ -133,7 +135,13 @@ public class BrandingIron {
 		//Because java does not support the rename of a folder, files are copied.
 
 		//Initialize the target folders
-		String target = root + '/' + name + ".app/Contents"; //$NON-NLS-1$
+		String appName = name;
+		if (appName.equals("eclipse")) //$NON-NLS-1$
+			appName = "Eclipse"; //$NON-NLS-1$
+		else if (appName.equals("launcher")) //$NON-NLS-1$
+			appName = "Launcher"; //$NON-NLS-1$
+
+		String target = root + '/' + appName + ".app/Contents"; //$NON-NLS-1$
 		new File(target).mkdirs();
 		new File(target + "/MacOS").mkdirs(); //$NON-NLS-1$
 		new File(target + "/Resources").mkdirs(); //$NON-NLS-1$
@@ -158,13 +166,16 @@ public class BrandingIron {
 			brandMacSplash(initialRoot, target, iconName);
 		}
 
-		File rootFolder = new File(initialRoot);
-		rootFolder.delete();
-		if (rootFolder.exists()) {
-			//if the rootFolder still exists, its because there were other files that need to be moved over
-			moveContents(rootFolder, new File(target));
+		File rootFolder = getCanonicalFile(new File(initialRoot));
+		File targetFolder = getCanonicalFile(new File(target));
+		if (!rootFolder.equals(targetFolder)) {
+			rootFolder.delete();
+			if (rootFolder.exists()) {
+				//if the rootFolder still exists, its because there were other files that need to be moved over
+				moveContents(rootFolder, targetFolder);
+			}
+			rootFolder.getParentFile().delete();
 		}
-		rootFolder.getParentFile().delete();
 	}
 
 	/**
@@ -243,16 +254,21 @@ public class BrandingIron {
 	}
 
 	private void brandWindows() throws Exception {
-		File templateLauncher = new File(root, "launcher.exe"); //$NON-NLS-1$
+		File templateLauncher = new File(root, name + ".exe"); //$NON-NLS-1$
+		if (!templateLauncher.exists())
+			templateLauncher = new File(root, "launcher.exe"); //$NON-NLS-1$
 		if (!templateLauncher.exists())
 			templateLauncher = new File(root, "eclipse.exe"); //$NON-NLS-1$
 		if (brandIcons) {
-			String[] args = new String[icons.length + 1];
-			args[0] = templateLauncher.getAbsolutePath();
-			System.arraycopy(icons, 0, args, 1, icons.length);
-			IconExe.main(args);
+			if (templateLauncher.exists()) {
+				String[] args = new String[icons.length + 1];
+				args[0] = templateLauncher.getAbsolutePath();
+				System.arraycopy(icons, 0, args, 1, icons.length);
+				IconExe.main(args);
+			}
 		}
-		templateLauncher.renameTo(new File(root, name + ".exe")); //$NON-NLS-1$
+		if (templateLauncher.exists() && !templateLauncher.getName().equals(name + ".exe")) //$NON-NLS-1$
+			templateLauncher.renameTo(new File(root, name + ".exe")); //$NON-NLS-1$
 	}
 
 	private void renameLauncher() {
@@ -262,17 +278,17 @@ public class BrandingIron {
 
 	private void copyMacLauncher(String initialRoot, String target) {
 		String targetLauncher = target + "/MacOS/"; //$NON-NLS-1$
-		File launcher = new File(initialRoot + "/MacOS/launcher"); //$NON-NLS-1$
-		File eclipseLauncher = new File(initialRoot + "/MacOS/eclipse"); //$NON-NLS-1$
+		File launcher = getCanonicalFile(new File(initialRoot + "/MacOS/launcher")); //$NON-NLS-1$
+		File eclipseLauncher = getCanonicalFile(new File(initialRoot + "/MacOS/eclipse")); //$NON-NLS-1$
+		File targetFile = getCanonicalFile(new File(targetLauncher, name));
 		if (!launcher.exists()) {
 			launcher = eclipseLauncher;
-		} else if (eclipseLauncher.exists()) {
+		} else if (eclipseLauncher.exists() && !targetFile.equals(eclipseLauncher)) {
 			//we may actually have both if exporting from the mac
 			eclipseLauncher.delete();
 		}
-		File targetFile = new File(targetLauncher, name);
 		try {
-			if (targetFile.getCanonicalFile().equals(launcher.getCanonicalFile())) {
+			if (targetFile.equals(launcher)) {
 				try {
 					//Force the executable bit on the exe because it has been lost when copying the file
 					Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
@@ -296,23 +312,42 @@ public class BrandingIron {
 		launcher.getParentFile().delete();
 	}
 
-	private void copyMacIni(String initialRoot, String target, String iconName) {
-		File brandedIni = new File(initialRoot, "/MacOS/" + name + ".ini"); //$NON-NLS-1$ //$NON-NLS-2$
-
-		File ini = new File(initialRoot, "/MacOS/eclipse.ini"); //$NON-NLS-1$
-		if (!ini.exists() && !brandedIni.exists())
-			return;
+	private File getCanonicalFile(File file) {
+		try {
+			return file.getCanonicalFile();
+		} catch (IOException e) {
+			return file;
+		}
+	}
 
-		if (brandedIni.exists() && ini.exists()) {
+	private void copyMacIni(String initialRoot, String target, String iconName) {
+		// 3 possibilities, in order of preference:
+		// rcp.app/Contents/MacOS/rcp.ini   		(targetFile)
+		// Eclipse.app/Contents/MacOS/rcp.ini		(brandedIni)
+		// Eclipse.app/Contents/MacOs/eclipse.ini	(ini)
+		File targetFile = getCanonicalFile(new File(target, "/MacOS/" + name + ".ini")); //$NON-NLS-1$//$NON-NLS-2$
+		File brandedIni = getCanonicalFile(new File(initialRoot, "/MacOS/" + name + ".ini")); //$NON-NLS-1$ //$NON-NLS-2$
+		File ini = getCanonicalFile(new File(initialRoot, "/MacOS/eclipse.ini")); //$NON-NLS-1$
+
+		if (targetFile.exists()) {
+			//an ini already exists at the target, use that
+			if (brandedIni.exists() && !brandedIni.equals(targetFile))
+				brandedIni.delete();
+			if (ini.exists() && !ini.equals(targetFile))
+				ini.delete();
+			ini = targetFile;
+		} else if (brandedIni.exists()) {
 			//take the one that is already branded
-			ini.delete();
+			if (ini.exists() && !ini.equals(brandedIni))
+				ini.delete();
 			ini = brandedIni;
+		} else if (!ini.exists()) {
+			return;
 		}
 
 		StringBuffer buffer;
 		try {
 			buffer = readFile(ini);
-			ini.delete();
 		} catch (IOException e) {
 			System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
 			return;
@@ -327,8 +362,9 @@ public class BrandingIron {
 		}
 
 		try {
-			File targetFile = new File(target, "/MacOS/" + name + ".ini"); //$NON-NLS-1$//$NON-NLS-2$
 			transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(targetFile));
+			if (!ini.equals(targetFile))
+				ini.delete();
 		} catch (FileNotFoundException e) {
 			System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
 			return;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
index dc1d5f3..b6244ce 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
@@ -9,20 +9,20 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.publisher.eclipse;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
 import java.net.*;
-import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.osgi.framework.Constants;
 
 public class DataLoader {
 
@@ -34,95 +34,10 @@ public class DataLoader {
 	private final static String frameworkAdminFillter = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
 
 	private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-	private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator"; //$NON-NLS-1$
-	private static final String ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX = "org.eclipse.equinox.frameworkadmin.equinox"; //$NON-NLS-1$
-	private static final String PARAMETER_BASEURL = "org.eclipse.equinox.simpleconfigurator.baseUrl"; //$NON-NLS-1$
 
 	private Manipulator manipulator;
 	private File configurationLocation;
 
-	public static BundleInfo[] readConfiguration(URL url) throws IOException {
-		List bundles = new ArrayList();
-		try {
-			// System.out.println("readConfiguration(URL url):url()=" + url);
-			// URL configFileUrl = getConfigFileUrl();
-			// URL configFileUrl = Utils.getUrl("file",null,
-			// inputFile.getAbsolutePath());
-			BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
-			// BufferedReader r = new BufferedReader(new FileReader(inputFile));
-
-			String line;
-			try {
-				URL baseUrl = new URL(url, "./"); //$NON-NLS-1$
-				while ((line = r.readLine()) != null) {
-					if (line.startsWith("#")) //$NON-NLS-1$
-						continue;
-					line = line.trim();// symbolicName,version,location,startlevel,expectedState
-					if (line.length() == 0)
-						continue;
-
-					// (expectedState is an integer).
-					if (line.startsWith(PARAMETER_BASEURL + "=")) { //$NON-NLS-1$
-						String baseUrlSt = line.substring((PARAMETER_BASEURL + "=").length()); //$NON-NLS-1$
-						if (!baseUrlSt.endsWith("/")) //$NON-NLS-1$
-							baseUrlSt += "/"; //$NON-NLS-1$
-						baseUrl = new URL(url, baseUrlSt);
-						continue;
-					}
-					StringTokenizer tok = new StringTokenizer(line, ",", true); //$NON-NLS-1$
-					String symbolicName = tok.nextToken();
-					if (symbolicName.equals(",")) //$NON-NLS-1$
-						symbolicName = null;
-					else
-						tok.nextToken(); // ,
-
-					String version = tok.nextToken();
-					if (version.equals(",")) //$NON-NLS-1$
-						version = null;
-					else
-						tok.nextToken(); // ,
-
-					String urlSt = tok.nextToken();
-					if (urlSt.equals(",")) { //$NON-NLS-1$
-						if (symbolicName != null && version != null)
-							urlSt = symbolicName + "_" + version + ".jar"; //$NON-NLS-1$ //$NON-NLS-2$
-						else
-							urlSt = null;
-					} else
-						tok.nextToken(); // ,
-					try {
-						new URL(urlSt);
-					} catch (MalformedURLException e) {
-						urlSt = Utils.getUrlInFull(urlSt, baseUrl).toExternalForm();
-					}
-
-					int sl = Integer.parseInt(tok.nextToken().trim());
-					tok.nextToken(); // ,
-					boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue();
-
-					BundleInfo bInfo;
-					try {
-						bInfo = new BundleInfo(symbolicName, version, new URI(urlSt), sl, markedAsStarted);
-
-						bundles.add(bInfo);
-					} catch (URISyntaxException e) {
-						e.printStackTrace();
-						throw new IllegalStateException("Error coverting url based string to uri: " + e.getMessage());
-					}
-				}
-			} finally {
-				try {
-					r.close();
-				} catch (IOException ex) {
-					// ignore
-				}
-			}
-		} catch (MalformedURLException e) {
-			// TODO log something
-		}
-		return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
-	}
-
 	/**
 	 * 
 	 * @param configurationLocation configuration file (i.e. config.ini).
@@ -139,6 +54,8 @@ public class DataLoader {
 		LauncherData launcherData = manipulator.getLauncherData();
 		launcherData.setFwPersistentDataLocation(config, true);
 		launcherData.setLauncher(executable);
+		if (executable == null)
+			launcherData.setHome(config.getParentFile());
 		try {
 			manipulator.load();
 		} catch (IllegalStateException e2) {
@@ -171,7 +88,9 @@ public class DataLoader {
 		if (value != null) {
 			try {
 				//config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
-				BundleInfo[] bundleInfos = readConfiguration(new URL(value));
+				SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
+				//input stream will be buffered and closed for us
+				BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
 				data.setBundles(bundleInfos);
 			} catch (MalformedURLException e1) {
 				// ignore
@@ -206,33 +125,6 @@ public class DataLoader {
 	}
 
 	private FrameworkAdmin getFrameworkAdmin() {
-		FrameworkAdmin frameworkAdmin = (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
-		if (frameworkAdmin == null) {
-			startBundle(ORG_ECLIPSE_EQUINOX_FRAMEWORKADMIN_EQUINOX);
-			startBundle(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_MANIPULATOR);
-			frameworkAdmin = (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
-		}
-		return frameworkAdmin;
-	}
-
-	private boolean startBundle(String bundleId) {
-		PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getContext(), PackageAdmin.class.getName());
-		if (packageAdmin == null)
-			return false;
-
-		Bundle[] bundles = packageAdmin.getBundles(bundleId, null);
-		if (bundles != null && bundles.length > 0) {
-			for (int i = 0; i < bundles.length; i++) {
-				try {
-					if ((bundles[0].getState() & Bundle.RESOLVED) > 0) {
-						bundles[0].start();
-						return true;
-					}
-				} catch (BundleException e) {
-					// failed, try next bundle
-				}
-			}
-		}
-		return false;
+		return (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
index 3307790..e10b6c5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
@@ -12,7 +12,8 @@
 package org.eclipse.equinox.internal.p2.publisher.eclipse;
 
 import java.io.*;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Set;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
@@ -23,7 +24,7 @@ import org.eclipse.osgi.service.environment.Constants;
 public class ExecutablesDescriptor {
 
 	private File location;
-	private Set files;
+	private Set<File> files;
 	private String executableName;
 	private boolean temporary = false;
 	private String os;
@@ -33,14 +34,14 @@ public class ExecutablesDescriptor {
 		// TODO this may need to get more intelligent
 		// if MacOS its going to be baseName.app/Contents/MacOS/baseName
 		if (Constants.OS_MACOSX.equals(os)) {
-			return new File(root, baseName + ".app/Contents/MacOS/" + baseName);
+			return new File(root, baseName + ".app/Contents/MacOS/" + baseName); //$NON-NLS-1$
 		}
 		// if it is not Mac and not Windows it must be a UNIX flavor
 		if (!Constants.OS_WIN32.equals(os)) {
 			return new File(root, baseName);
 		}
 		// otherwise we are left with windows
-		return new File(root, baseName + ".exe");
+		return new File(root, baseName + ".exe"); //$NON-NLS-1$
 	}
 
 	/**
@@ -56,10 +57,10 @@ public class ExecutablesDescriptor {
 		if (executablesFeatureLocation == null || !executablesFeatureLocation.exists())
 			return null;
 		String[] config = AbstractPublisherAction.parseConfigSpec(configSpec);
-		File result = new File(executablesFeatureLocation, "bin/" + config[0] + "/" + config[1] + "/" + config[2]);
+		File result = new File(executablesFeatureLocation, "bin/" + config[0] + "/" + config[1] + "/" + config[2]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		if (!result.exists())
 			return null;
-		return new ExecutablesDescriptor(config[1], "launcher", result, new File[] {result});
+		return new ExecutablesDescriptor(config[1], "launcher", result, new File[] {result}); //$NON-NLS-1$
 	}
 
 	/**
@@ -125,9 +126,9 @@ public class ExecutablesDescriptor {
 		this.executableName = executable;
 		this.location = location;
 		if (files == null)
-			this.files = new HashSet(11);
+			this.files = new HashSet<File>(11);
 		else {
-			this.files = new HashSet(files.length);
+			this.files = new HashSet<File>(files.length);
 			for (int i = 0; i < files.length; i++)
 				addAllFiles(files[i]);
 		}
@@ -138,7 +139,7 @@ public class ExecutablesDescriptor {
 		this.location = descriptor.location;
 		this.executableName = descriptor.executableName;
 		this.temporary = descriptor.temporary;
-		this.files = new HashSet(descriptor.files);
+		this.files = new HashSet<File>(descriptor.files);
 	}
 
 	public void addAllFiles(File file) {
@@ -180,7 +181,7 @@ public class ExecutablesDescriptor {
 	}
 
 	public File[] getFiles() {
-		File[] result = (File[]) files.toArray(new File[files.size()]);
+		File[] result = files.toArray(new File[files.size()]);
 		for (int i = 0; i < result.length; i++)
 			result[i] = new File(location, result[i].getPath());
 		return result;
@@ -223,8 +224,8 @@ public class ExecutablesDescriptor {
 		try {
 			tempFile = File.createTempFile("p2.brandingIron", ""); //$NON-NLS-1$ //$NON-NLS-2$
 			tempFile.delete();
-			for (Iterator i = files.iterator(); i.hasNext();)
-				FileUtils.copy(location, tempFile, (File) i.next(), true);
+			for (File file : files)
+				FileUtils.copy(location, tempFile, file, true);
 		} catch (IOException e) {
 			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
 		}
@@ -245,9 +246,8 @@ public class ExecutablesDescriptor {
 		String targetExecutable = executableName;
 		String executableExtension = Constants.OS_WIN32.equals(os) ? ".exe" : ""; //$NON-NLS-1$ //$NON-NLS-2$
 		targetExecutable = executableName + executableExtension;
-		Set filesCopy = new HashSet(files);
-		for (Iterator i = filesCopy.iterator(); i.hasNext();) {
-			File file = (File) i.next();
+		Set<File> filesCopy = new HashSet<File>(files);
+		for (File file : filesCopy) {
 			String base = file.getParent();
 
 			// use String concatenation here because new File("", "foo") is absolute on at least windows...
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
index ae6239b..3e51ed2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
@@ -33,7 +33,7 @@ public class FeatureManifestParser extends DefaultHandler {
 	private URL url;
 	private StringBuffer characters = null;
 
-	private List messageKeys = new ArrayList();
+	private List<String> messageKeys = new ArrayList<String>();
 
 	public FeatureManifestParser() {
 		this(true);
@@ -104,7 +104,7 @@ public class FeatureManifestParser extends DefaultHandler {
 		return result;
 	}
 
-	public List getMessageKeys() {
+	public List<String> getMessageKeys() {
 		return messageKeys;
 	}
 
@@ -187,6 +187,9 @@ public class FeatureManifestParser extends DefaultHandler {
 		if (flag != null)
 			entry.setOptional(Boolean.valueOf(flag).booleanValue());
 		setEnvironment(attributes, entry);
+		String filter = attributes.getValue("filter"); //$NON-NLS-1$
+		if (filter != null)
+			entry.setFilter(filter);
 		result.addEntry(entry);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
index 47a8020..08fd6a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
@@ -51,8 +51,8 @@ public class FeatureParser extends DefaultHandler {
 				input = new BufferedInputStream(new FileInputStream(file));
 				feature = parser.parse(input);
 				if (feature != null) {
-					List messageKeys = parser.getMessageKeys();
-					String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
+					List<String> messageKeys = parser.getMessageKeys();
+					String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
 					feature.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
 				}
 			} catch (FileNotFoundException e) {
@@ -76,8 +76,8 @@ public class FeatureParser extends DefaultHandler {
 				InputStream input = new BufferedInputStream(jar.getInputStream(entry));
 				feature = parser.parse(input);
 				if (feature != null) {
-					List messageKeys = parser.getMessageKeys();
-					String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
+					List<String> messageKeys = parser.getMessageKeys();
+					String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
 					feature.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
 				}
 			} catch (IOException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
index b301e4a..4c55a27 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.publisher.eclipse;
 
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 
 public class GeneratorBundleInfo extends BundleInfo {
 	private IInstallableUnit iu = null;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
index cdb7a70..56b46ab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
@@ -12,7 +12,9 @@ package org.eclipse.equinox.internal.p2.publisher.eclipse;
 
 import java.io.File;
 import java.util.List;
-import java.util.Properties;
+import java.util.Map;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
 
 /**
  * Represents a product file.  
@@ -33,17 +35,17 @@ public interface IProductDescriptor {
 	 * @param includeFragments whether or not to include the fragments in the return value
 	 * @return the list of bundles in this product
 	 */
-	public List getBundles(boolean includeFragments);
+	public List<IVersionedId> getBundles(boolean includeFragments);
 
 	/**
 	 * Returns a list<VersionedName> of fragments that constitute this product.
 	 */
-	public List getFragments();
+	public List<IVersionedId> getFragments();
 
 	/**
 	 * Returns a List<VersionedName> of features that constitute this product.
 	 */
-	public List getFeatures();
+	public List<IVersionedId> getFeatures();
 
 	/**
 	 * Returns the path to the config.ini file as specified in the .product file.
@@ -98,7 +100,7 @@ public interface IProductDescriptor {
 	/**
 	 * Returns the properties for a product file.
 	 */
-	public Properties getConfigurationProperties();
+	public Map<String, String> getConfigurationProperties();
 
 	/**
 	 * Returns a list of icons for this product for a given OS.
@@ -109,7 +111,7 @@ public interface IProductDescriptor {
 	 * Returns a List<BundleInfo> for each bundle that has custom configuration data.
 	 * @return A List<BundleInfo>
 	 */
-	public List getBundleInfos();
+	public List<BundleInfo> getBundleInfos();
 
 	/**
 	 * This is needed for config.ini files and p2 advice
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index 5089d0c..6fac40d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -17,11 +17,11 @@ import java.io.*;
 import java.util.*;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.core.helpers.*;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.VersionedId;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
@@ -33,15 +33,15 @@ import org.xml.sax.helpers.DefaultHandler;
 public class ProductFile extends DefaultHandler implements IProductDescriptor {
 	private static final String ATTRIBUTE_PATH = "path"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$
-	private static final String ATTRIBUTE_FRAGMENT = "fragment"; //$NON-NLS-1$
+	protected static final String ATTRIBUTE_FRAGMENT = "fragment"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_LOCATION = "location"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_AUTO_START = "autoStart"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_START_LEVEL = "startLevel"; //$NON-NLS-1$
-	private static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
-	private static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
+	protected static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
+	protected static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_UID = "uid"; //$NON-NLS-1$
 
 	private static final String PROPERTY_ECLIPSE_APPLICATION = "eclipse.application"; //$NON-NLS-1$
@@ -121,25 +121,25 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 	private SAXParser parser;
 	private String launcherName = null;
 	//	private boolean useIco = false;
-	private Map icons = new HashMap(6);
+	private Map<String, Collection<String>> icons = new HashMap<String, Collection<String>>(6);
 	private String configPath = null;
-	private final Map platformSpecificConfigPaths = new HashMap();
+	private final Map<String, String> platformSpecificConfigPaths = new HashMap<String, String>();
 	private String configPlatform = null;
 	private String platformConfigPath = null;
 	private String id = null;
 	private String uid = null;
 	private boolean useFeatures = false;
-	private List plugins = null;
-	private List fragments = null;
-	private List features = null;
+	protected List<IVersionedId> plugins = null;
+	protected List<IVersionedId> fragments = null;
+	private List<IVersionedId> features = null;
 	private String splashLocation = null;
 	private String productName = null;
 	private String application = null;
 	private String version = null;
 	private Properties launcherArgs = new Properties();
 	private File location;
-	private List bundleInfos;
-	private Properties properties;
+	private List<BundleInfo> bundleInfos;
+	private Map<String, String> properties;
 	private String licenseURL;
 	private String licenseText = null;
 
@@ -201,11 +201,11 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 	 * Returns the properties found in .product file.  Properties
 	 * are located in the <configurations> block of the file
 	 */
-	public Properties getConfigurationProperties() {
-		Properties result = properties != null ? properties : new Properties();
-		if (application != null && !result.contains(PROPERTY_ECLIPSE_APPLICATION))
+	public Map<String, String> getConfigurationProperties() {
+		Map<String, String> result = properties != null ? properties : new HashMap<String, String>();
+		if (application != null && !result.containsKey(PROPERTY_ECLIPSE_APPLICATION))
 			result.put(PROPERTY_ECLIPSE_APPLICATION, application);
-		if (id != null && !result.contains(PROPERTY_ECLIPSE_PRODUCT))
+		if (id != null && !result.containsKey(PROPERTY_ECLIPSE_PRODUCT))
 			result.put(PROPERTY_ECLIPSE_PRODUCT, id);
 
 		return result;
@@ -216,17 +216,17 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 	 * @param includeFragments Indicates whether or not fragments should
 	 * be included in the list
 	 */
-	public List getBundles(boolean includeFragments) {
-		List p = plugins != null ? plugins : Collections.EMPTY_LIST;
+	public List<IVersionedId> getBundles(boolean includeFragments) {
+		List<IVersionedId> p = plugins != null ? plugins : CollectionUtils.<IVersionedId> emptyList();
 		if (!includeFragments)
 			return p;
 
-		List f = fragments != null ? fragments : Collections.EMPTY_LIST;
+		List<IVersionedId> f = fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
 		int size = p.size() + f.size();
 		if (size == 0)
-			return Collections.EMPTY_LIST;
+			return CollectionUtils.emptyList();
 
-		List both = new ArrayList(size);
+		List<IVersionedId> both = new ArrayList<IVersionedId>(size);
 		both.addAll(p);
 		both.addAll(f);
 		return both;
@@ -237,37 +237,33 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 	 * in the product file.
 	 * @return A List<BundleInfo>
 	 */
-	public List getBundleInfos() {
-		return bundleInfos != null ? bundleInfos : Collections.EMPTY_LIST;
+	public List<BundleInfo> getBundleInfos() {
+		return bundleInfos != null ? bundleInfos : CollectionUtils.<BundleInfo> emptyList();
 	}
 
 	/**
 	 * Returns a list<VersionedName> of fragments that constitute this product.
 	 */
-	public List getFragments() {
-		if (fragments == null)
-			return Collections.EMPTY_LIST;
-		return fragments;
+	public List<IVersionedId> getFragments() {
+		return fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
 	}
 
 	/**
 	 * Returns a List<VersionedName> of features that constitute this product.
 	 */
-	public List getFeatures() {
-		if (features == null)
-			return Collections.EMPTY_LIST;
-		return features;
+	public List<IVersionedId> getFeatures() {
+		return features != null ? features : CollectionUtils.<IVersionedId> emptyList();
 	}
 
 	public String[] getIcons(String os) {
-		Collection result = (Collection) icons.get(os);
+		Collection<String> result = icons.get(os);
 		if (result == null)
 			return null;
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 	public String getConfigIniPath(String os) {
-		String specific = (String) platformSpecificConfigPaths.get(os);
+		String specific = platformSpecificConfigPaths.get(os);
 		return specific == null ? configPath : specific;
 	}
 
@@ -509,7 +505,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 		if (value == null)
 			value = ""; //$NON-NLS-1$
 		if (properties == null)
-			properties = new Properties();
+			properties = new HashMap<String, String>();
 		properties.put(name, value);
 	}
 
@@ -527,7 +523,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 		if (value != null)
 			info.setMarkedAsStarted(Boolean.valueOf(value).booleanValue());
 		if (bundleInfos == null)
-			bundleInfos = new ArrayList();
+			bundleInfos = new ArrayList<BundleInfo>();
 		bundleInfos.add(info);
 	}
 
@@ -642,24 +638,24 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 			launcherArgs.setProperty(key, value);
 	}
 
-	private void processPlugin(Attributes attributes) {
+	protected void processPlugin(Attributes attributes) {
 		String fragment = attributes.getValue(ATTRIBUTE_FRAGMENT);
-		VersionedName name = new VersionedName(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
+		IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
 		if (fragment != null && new Boolean(fragment).booleanValue()) {
 			if (fragments == null)
-				fragments = new ArrayList();
+				fragments = new ArrayList<IVersionedId>();
 			fragments.add(name);
 		} else {
 			if (plugins == null)
-				plugins = new ArrayList();
+				plugins = new ArrayList<IVersionedId>();
 			plugins.add(name);
 		}
 	}
 
 	private void processFeature(Attributes attributes) {
-		VersionedName name = new VersionedName(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
+		IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
 		if (features == null)
-			features = new ArrayList();
+			features = new ArrayList<IVersionedId>();
 		features.add(name);
 	}
 
@@ -720,9 +716,9 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
 		if (!iconFile.isFile())
 			iconFile = new File(location.getParentFile(), value);
 
-		Collection list = (Collection) icons.get(os);
+		Collection<String> list = icons.get(os);
 		if (list == null) {
-			list = new ArrayList(6);
+			list = new ArrayList<String>(6);
 			icons.put(os, list);
 		}
 		list.add(iconFile.getAbsolutePath());
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
index caa6191..fb2d606 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
@@ -14,15 +14,15 @@ exception_errorReadingManifest = An error occurred while parsing the bundle mani
 exception_errorLoadingManifest = An error occurred while loading the manifest {0}.
 exception_noBundlesOrLocations=No bundles or locations provided.
 exception_noFeaturesOrLocations=No features or locations provided.
-exception_errorPublishingArtifacts = An error occurred while publishing artifacts.
-exception_errorLoadingProperties = An error occurred while loading the properties file {0}.
 exception_noPluginConverter=Unable to acquire PluginConverter service during generation for: {0}.
 exception_noArtifactRepo=An artifact repository must be specified in order to publish artifacts.
 exception_noMetadataRepo=A metadata repository must be specified.
 exception_invalidSiteReference=Invalid site reference: {0}
 exception_invalidSiteReferenceInFeature=Invalid site reference {0} in feature {1}.
+exception_repoMustBeURL=Repository location ({0}) must be a URL.
+exception_sourcePath=Source location ({0}) must be a valid file-system path.
 message_generatingMetadata = Generating metadata for {0}.
 message_generationCompleted = Generation completed with success [{0} seconds].
 message_noSimpleconfigurator = Could not find simpleconfigurator bundle.
-
+exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) may destroy input files.
 error_rootIU_generation = Could not generate root IU {0}, {1}, {2}..
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
index 3efd455..6367a40 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
@@ -25,33 +25,33 @@ import java.util.*;
  * Know To Start Programming 64-Bit Windows Systems".
  */
 public class IconExe {
-	
-	 /**
-	 * Replace the Desktop icons provided in the Windows executable program
-	 * with matching icons provided by the user.
-	 *
- 	 * Takes 2 arguments
-	 * argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
-	 * argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
-	 *
-	 * Note 1. Write access to the executable program is required. As a result, that
-	 * program must not be currently running or edited elsewhere.
-	 * 
-     * Note 2. The Eclipse 3.4 launcher requires an .ico file with the following 7 images (in any order).
-     * 1. 48x48, 32 bit (RGB / Alpha Channel)
-     * 2. 32x32, 32 bit (RGB / Alpha Channel)
-     * 3. 16x16, 32 bit (RGB / Alpha Channel)
-     * 4. 48x48, 8 bit (256 colors)
-     * 5. 32x32, 8 bit (256 colors)
-     * 6. 24x24, 8 bit (256 colors)
-     * 7. 16x16, 8 bit (256 colors)	 
-     * A user icon matching exactly the width/height/depth of an executable icon will be written
-	 * to the executable and will replace that executable icon. If an executable icon
-	 * does not match a user icon, it is silently left as is.
-	 * 
-	 * Note 3. This function modifies the content of the executable program and may cause
-	 * its corruption.
-	 */
+
+	/**
+	* Replace the Desktop icons provided in the Windows executable program
+	* with matching icons provided by the user.
+	*
+	* Takes 2 arguments
+	* argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
+	* argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
+	*
+	* Note 1. Write access to the executable program is required. As a result, that
+	* program must not be currently running or edited elsewhere.
+	* 
+	* Note 2. The Eclipse 3.4 launcher requires an .ico file with the following 7 images (in any order).
+	* 1. 48x48, 32 bit (RGB / Alpha Channel)
+	* 2. 32x32, 32 bit (RGB / Alpha Channel)
+	* 3. 16x16, 32 bit (RGB / Alpha Channel)
+	* 4. 48x48, 8 bit (256 colors)
+	* 5. 32x32, 8 bit (256 colors)
+	* 6. 24x24, 8 bit (256 colors)
+	* 7. 16x16, 8 bit (256 colors)	 
+	* A user icon matching exactly the width/height/depth of an executable icon will be written
+	* to the executable and will replace that executable icon. If an executable icon
+	* does not match a user icon, it is silently left as is.
+	* 
+	* Note 3. This function modifies the content of the executable program and may cause
+	* its corruption.
+	*/
 	public static void main(String[] args) throws Exception {
 		if (args.length < 2) {
 			System.err.println("Usage: IconExe <windows executable> <ico file>"); //$NON-NLS-1$
@@ -59,7 +59,7 @@ public class IconExe {
 		}
 		ImageLoader loader = new ImageLoader();
 
-		List images = new ArrayList();
+		List<ImageData> images = new ArrayList<ImageData>();
 		for (int i = 1; i < args.length; i++) {
 			try {
 				//An ICO should contain 7 images, a BMP will contain 1
@@ -72,40 +72,41 @@ public class IconExe {
 			}
 		}
 		ImageData[] data = new ImageData[images.size()];
-		data = (ImageData[]) images.toArray(data);
-		
+		data = images.toArray(data);
+
 		int nMissing = unloadIcons(args[0], data);
 		if (nMissing != 0)
 			System.err.println("Error - " + nMissing + " icon(s) not replaced in " + args[0] + " using " + args[1]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	}
-	
+
 	/* Implementation */
 
 	/** 
 	 * Retrieve the Desktop icons provided in the Windows executable program.
 	 * These icons are typically shown in various places of the Windows desktop.
 	 * 
-     * Note. The Eclipse 3.4 launcher returns the following 7 images (in any order).
-     * 1. 48x48, 32 bit (RGB / Alpha Channel)
-     * 2. 32x32, 32 bit (RGB / Alpha Channel)
-     * 3. 16x16, 32 bit (RGB / Alpha Channel)
-     * 4. 48x48, 8 bit (256 colors)
-     * 5. 32x32, 8 bit (256 colors)
-     * 6. 24x24, 8 bit (256 colors)
-     * 7. 16x16, 8 bit (256 colors)
+	 * Note. The Eclipse 3.4 launcher returns the following 7 images (in any order).
+	 * 1. 48x48, 32 bit (RGB / Alpha Channel)
+	 * 2. 32x32, 32 bit (RGB / Alpha Channel)
+	 * 3. 16x16, 32 bit (RGB / Alpha Channel)
+	 * 4. 48x48, 8 bit (256 colors)
+	 * 5. 32x32, 8 bit (256 colors)
+	 * 6. 24x24, 8 bit (256 colors)
+	 * 7. 16x16, 8 bit (256 colors)
 	 * 
 	 * @param program the Windows executable e.g c:/eclipse/eclipse.exe
-	 */	
+	 */
 	static ImageData[] loadIcons(String program) throws FileNotFoundException, IOException {
 		RandomAccessFile raf = new RandomAccessFile(program, "r"); //$NON-NLS-1$
 		IconExe iconExe = new IconExe();
 		IconResInfo[] iconInfo = iconExe.getIcons(raf);
 		ImageData[] data = new ImageData[iconInfo.length];
-		for (int i = 0; i < data.length; i++) data[i] = iconInfo[i].data;
+		for (int i = 0; i < data.length; i++)
+			data[i] = iconInfo[i].data;
 		raf.close();
 		return data;
 	}
-	
+
 	/** 
 	 * Replace the Desktop icons provided in the Windows executable program
 	 * with icons provided by the user.
@@ -125,10 +126,10 @@ public class IconExe {
 	 * 1. 48x48, 32 bit (RGB / Alpha Channel)
 	 * 2. 32x32, 32 bit (RGB / Alpha Channel)
 	 * 3. 16x16, 32 bit (RGB / Alpha Channel)
-     * 4. 48x48, 8 bit (256 colors)
+	 * 4. 48x48, 8 bit (256 colors)
 	 * 5. 32x32, 8 bit (256 colors)
-     * 6. 24x24, 8 bit (256 colors)
-     * 7. 16x16, 8 bit (256 colors)
+	 * 6. 24x24, 8 bit (256 colors)
+	 * 7. 16x16, 8 bit (256 colors)
 	 * 
 	 * Note 4. This function modifies the content of the executable program and may cause
 	 * its corruption. 
@@ -136,16 +137,16 @@ public class IconExe {
 	 * @param program the Windows executable e.g c:/eclipse/eclipse.exe
 	 * @param icons to write to the given executable
 	 * @return the number of icons from the original program that were not successfully replaced (0 if success)
-	 */	
+	 */
 	static int unloadIcons(String program, ImageData[] icons) throws FileNotFoundException, IOException {
 		RandomAccessFile raf = new RandomAccessFile(program, "rw"); //$NON-NLS-1$
 		IconExe iconExe = new IconExe();
 		IconResInfo[] iconInfo = iconExe.getIcons(raf);
 		// Display an error if  no icons found in target executable.
 		if (iconInfo.length == 0) {
-		    System.err.println("Warning - no icons detected in \"" + program + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
-		    raf.close();
-		    return 0;
+			System.err.println("Warning - no icons detected in \"" + program + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
+			raf.close();
+			return 0;
 		}
 		int cnt = 0;
 		for (int i = 0; i < iconInfo.length; i++) {
@@ -163,34 +164,39 @@ public class IconExe {
 		raf.close();
 		return iconInfo.length - cnt;
 	}
-	
+
 	public static final String VERSION = "20050124"; //$NON-NLS-1$
-	
+
 	static final boolean DEBUG = false;
+
 	public static class IconResInfo {
 		ImageData data;
 		int offset;
 		int size;
 	}
-	
+
 	IconResInfo[] iconInfo = null;
 	int iconCnt;
-	
+
 	IconResInfo[] getIcons(RandomAccessFile raf) throws IOException {
 		iconInfo = new IconResInfo[4];
 		iconCnt = 0;
 		IMAGE_DOS_HEADER imageDosHeader = new IMAGE_DOS_HEADER();
 		read(raf, imageDosHeader);
-		if (imageDosHeader.e_magic != IMAGE_DOS_SIGNATURE) return new IconResInfo[0];
+		if (imageDosHeader.e_magic != IMAGE_DOS_SIGNATURE)
+			return new IconResInfo[0];
 		int imageNtHeadersOffset = imageDosHeader.e_lfanew;
 		raf.seek(imageNtHeadersOffset);
 		IMAGE_NT_HEADERS imageNtHeaders = new IMAGE_NT_HEADERS();
 		read(raf, imageNtHeaders);
-		if (imageNtHeaders.Signature != IMAGE_NT_SIGNATURE) return new IconResInfo[0];
+		if (imageNtHeaders.Signature != IMAGE_NT_SIGNATURE)
+			return new IconResInfo[0];
 		// DumpResources
 		int resourcesRVA = imageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
-		if (resourcesRVA == 0) return new IconResInfo[0];
-		if (DEBUG) System.out.println("* Resources (RVA= "+resourcesRVA+")"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (resourcesRVA == 0)
+			return new IconResInfo[0];
+		if (DEBUG)
+			System.out.println("* Resources (RVA= " + resourcesRVA + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 		IMAGE_SECTION_HEADER imageSectionHeader = new IMAGE_SECTION_HEADER();
 		int firstSectionOffset = imageNtHeadersOffset + IMAGE_NT_HEADERS.FIELD_OFFSET_OptionalHeader + imageNtHeaders.FileHeader.SizeOfOptionalHeader;
 		raf.seek(firstSectionOffset);
@@ -203,7 +209,8 @@ public class IconExe {
 				break;
 			}
 		}
-		if (!found) return new IconResInfo[0];
+		if (!found)
+			return new IconResInfo[0];
 		int delta = imageSectionHeader.VirtualAddress - imageSectionHeader.PointerToRawData;
 		int imageResourceDirectoryOffset = resourcesRVA - delta;
 		dumpResourceDirectory(raf, imageResourceDirectoryOffset, imageResourceDirectoryOffset, delta, 0, 0, false);
@@ -215,3125 +222,3118 @@ public class IconExe {
 		return iconInfo;
 	}
 
-void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException {
-	if (DEBUG) System.out.println("** LEVEL "+level); //$NON-NLS-1$
+	void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException {
+		if (DEBUG)
+			System.out.println("** LEVEL " + level); //$NON-NLS-1$
 
-	IMAGE_RESOURCE_DIRECTORY imageResourceDirectory = new IMAGE_RESOURCE_DIRECTORY();
-	raf.seek(imageResourceDirectoryOffset);
-	read(raf, imageResourceDirectory);
+		IMAGE_RESOURCE_DIRECTORY imageResourceDirectory = new IMAGE_RESOURCE_DIRECTORY();
+		raf.seek(imageResourceDirectoryOffset);
+		read(raf, imageResourceDirectory);
 
-	if (DEBUG) {
-		String sType = ""+type; //$NON-NLS-1$
-		// level 1 resources are resource types
-		if (level == 1) {
-			System.out.println("___________________________"); //$NON-NLS-1$
-			if (type == RT_ICON) sType = "RT_ICON"; //$NON-NLS-1$
-			if (type == RT_GROUP_ICON) sType = "RT_GROUP_ICON"; //$NON-NLS-1$
+		if (DEBUG) {
+			String sType = "" + type; //$NON-NLS-1$
+			// level 1 resources are resource types
+			if (level == 1) {
+				System.out.println("___________________________"); //$NON-NLS-1$
+				if (type == RT_ICON)
+					sType = "RT_ICON"; //$NON-NLS-1$
+				if (type == RT_GROUP_ICON)
+					sType = "RT_GROUP_ICON"; //$NON-NLS-1$
+			}
+			System.out.println("Resource Directory [" + sType + "]" + " (Named " + imageResourceDirectory.NumberOfNamedEntries + ", ID " + imageResourceDirectory.NumberOfIdEntries + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 		}
-		System.out.println("Resource Directory ["+sType+"]"+" (Named "+imageResourceDirectory.NumberOfNamedEntries+", ID "+imageResourceDirectory.NumberOfIdEntries+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-	}
 
-	IMAGE_RESOURCE_DIRECTORY_ENTRY[] imageResourceDirectoryEntries = new IMAGE_RESOURCE_DIRECTORY_ENTRY[imageResourceDirectory.NumberOfIdEntries];
-	for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
-		imageResourceDirectoryEntries[i] = new IMAGE_RESOURCE_DIRECTORY_ENTRY();
-		read(raf, imageResourceDirectoryEntries[i]);
-	}
-	for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
-		if (imageResourceDirectoryEntries[i].DataIsDirectory) {
-			dumpResourceDirectory(raf, imageResourceDirectoryEntries[i].OffsetToDirectory + resourceBase, resourceBase, delta, imageResourceDirectoryEntries[i].Id, level + 1, rt_icon_root ? true : type == RT_ICON);
-		} else {
-			// Resource found
-			/// pResDirEntry->Name
-			IMAGE_RESOURCE_DIRECTORY_ENTRY irde = imageResourceDirectoryEntries[i];
-			IMAGE_RESOURCE_DATA_ENTRY data = new IMAGE_RESOURCE_DATA_ENTRY();
-			raf.seek(imageResourceDirectoryEntries[i].OffsetToData + resourceBase);
-			read(raf, data);
-			if (DEBUG) System.out.println("Resource Id "+irde.Id+" Data Offset RVA "+data.OffsetToData+", Size "+data.Size); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			if (rt_icon_root) {
-				if (DEBUG) System.out.println("iconcnt "+iconCnt+" |"+iconInfo.length); //$NON-NLS-1$ //$NON-NLS-2$
-				iconInfo[iconCnt] = new IconResInfo();
-				iconInfo[iconCnt].data = parseIcon(raf, data.OffsetToData - delta, data.Size);
-				iconInfo[iconCnt].offset = data.OffsetToData - delta;
-				iconInfo[iconCnt].size = data.Size;	
-				iconCnt++;
-				if (iconCnt == iconInfo.length) {
-					IconResInfo[] newArray = new IconResInfo[iconInfo.length + 4];
-					System.arraycopy(iconInfo, 0, newArray, 0, iconInfo.length);
-					iconInfo = newArray;
+		IMAGE_RESOURCE_DIRECTORY_ENTRY[] imageResourceDirectoryEntries = new IMAGE_RESOURCE_DIRECTORY_ENTRY[imageResourceDirectory.NumberOfIdEntries];
+		for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
+			imageResourceDirectoryEntries[i] = new IMAGE_RESOURCE_DIRECTORY_ENTRY();
+			read(raf, imageResourceDirectoryEntries[i]);
+		}
+		for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
+			if (imageResourceDirectoryEntries[i].DataIsDirectory) {
+				dumpResourceDirectory(raf, imageResourceDirectoryEntries[i].OffsetToDirectory + resourceBase, resourceBase, delta, imageResourceDirectoryEntries[i].Id, level + 1, rt_icon_root ? true : type == RT_ICON);
+			} else {
+				// Resource found
+				/// pResDirEntry->Name
+				IMAGE_RESOURCE_DIRECTORY_ENTRY irde = imageResourceDirectoryEntries[i];
+				IMAGE_RESOURCE_DATA_ENTRY data = new IMAGE_RESOURCE_DATA_ENTRY();
+				raf.seek(imageResourceDirectoryEntries[i].OffsetToData + resourceBase);
+				read(raf, data);
+				if (DEBUG)
+					System.out.println("Resource Id " + irde.Id + " Data Offset RVA " + data.OffsetToData + ", Size " + data.Size); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				if (rt_icon_root) {
+					if (DEBUG)
+						System.out.println("iconcnt " + iconCnt + " |" + iconInfo.length); //$NON-NLS-1$ //$NON-NLS-2$
+					iconInfo[iconCnt] = new IconResInfo();
+					iconInfo[iconCnt].data = parseIcon(raf, data.OffsetToData - delta, data.Size);
+					iconInfo[iconCnt].offset = data.OffsetToData - delta;
+					iconInfo[iconCnt].size = data.Size;
+					iconCnt++;
+					if (iconCnt == iconInfo.length) {
+						IconResInfo[] newArray = new IconResInfo[iconInfo.length + 4];
+						System.arraycopy(iconInfo, 0, newArray, 0, iconInfo.length);
+						iconInfo = newArray;
+					}
 				}
 			}
 		}
- 	}
-}
-
-static ImageData parseIcon(RandomAccessFile raf, int offset, int size) throws IOException {
-	raf.seek(offset);
-	BITMAPINFO bitmapInfo = new BITMAPINFO();
-	read(raf, bitmapInfo);
-	bitmapInfo.bmiHeader.biHeight /= 2;
-	int width = bitmapInfo.bmiHeader.biWidth;
-	int height = bitmapInfo.bmiHeader.biHeight;
-	int depth = bitmapInfo.bmiHeader.biBitCount;
-
-	PaletteData palette = loadPalette(bitmapInfo.bmiHeader, raf);
-	byte[] shapeData = loadData(bitmapInfo.bmiHeader, raf);
-	bitmapInfo.bmiHeader.biBitCount = 1;
-	byte[] maskData = loadData(bitmapInfo.bmiHeader, raf);
-	maskData = convertPad(maskData, width, height, 1, 4, 2);
-	bitInvertData(maskData, 0, maskData.length);
-	return ImageData.internal_new(
-		width,
-		height,
-		depth,
-		palette,
-		4,
-		shapeData,
-		2,
-		maskData,
-		null,
-		-1,
-		-1,
-		SWT.IMAGE_ICO,
-		0,
-		0,
-		0,
-		0);
-}
-
-static byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
-	// Destructively bit invert data in the given byte array.
-	for (int i = startIndex; i < endIndex; i++) {
-		data[i] = (byte)(255 - data[i - startIndex]);
 	}
-	return data;
-}
 
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
-static PaletteData loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
-	int depth = bih.biBitCount;
-	if (depth <= 8) {
-		int numColors = bih.biClrUsed;
-		if (numColors == 0) {
-			numColors = 1 << depth;
-		} else {
-			if (numColors > 256)
-				numColors = 256;
+	static ImageData parseIcon(RandomAccessFile raf, int offset, int size) throws IOException {
+		raf.seek(offset);
+		BITMAPINFO bitmapInfo = new BITMAPINFO();
+		read(raf, bitmapInfo);
+		bitmapInfo.bmiHeader.biHeight /= 2;
+		int width = bitmapInfo.bmiHeader.biWidth;
+		int height = bitmapInfo.bmiHeader.biHeight;
+		int depth = bitmapInfo.bmiHeader.biBitCount;
+
+		PaletteData palette = loadPalette(bitmapInfo.bmiHeader, raf);
+		byte[] shapeData = loadData(bitmapInfo.bmiHeader, raf);
+		bitmapInfo.bmiHeader.biBitCount = 1;
+		byte[] maskData = loadData(bitmapInfo.bmiHeader, raf);
+		maskData = convertPad(maskData, width, height, 1, 4, 2);
+		bitInvertData(maskData, 0, maskData.length);
+		return ImageData.internal_new(width, height, depth, palette, 4, shapeData, 2, maskData, null, -1, -1, SWT.IMAGE_ICO, 0, 0, 0, 0);
+	}
+
+	static byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
+		// Destructively bit invert data in the given byte array.
+		for (int i = startIndex; i < endIndex; i++) {
+			data[i] = (byte) (255 - data[i - startIndex]);
 		}
-		byte[] buf = new byte[numColors * 4];
-		raf.read(buf);
-		return paletteFromBytes(buf, numColors);
+		return data;
 	}
-	if (depth == 16) return new PaletteData(0x7C00, 0x3E0, 0x1F);
-	if (depth == 24) return new PaletteData(0xFF, 0xFF00, 0xFF0000);
-	return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
-}
-static PaletteData paletteFromBytes(byte[] bytes, int numColors) {
-	int bytesOffset = 0;
-	RGB[] colors = new RGB[numColors];
-	for (int i = 0; i < numColors; i++) {
-		colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF,
-			bytes[bytesOffset + 1] & 0xFF,
-			bytes[bytesOffset] & 0xFF);
-		bytesOffset += 4;
-	}
-	return new PaletteData(colors);
-}
-static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
-	int stride = (bih.biWidth * bih.biBitCount + 7) / 8;
-	stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
-	byte[] data = loadData(bih, raf, stride);
-	flipScanLines(data, stride, bih.biHeight);
-	return data;
-}
-static void flipScanLines(byte[] data, int stride, int height) {
-	int i1 = 0;
-	int i2 = (height - 1) * stride;
-	for (int i = 0; i < height / 2; i++) {
-		for (int index = 0; index < stride; index++) {
-			byte b = data[index + i1];
-			data[index + i1] = data[index + i2];
-			data[index + i2] = b;
-		}
-		i1 += stride;
-		i2 -= stride;
+
+	static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
+		if (pad == newPad)
+			return data;
+		int stride = (width * depth + 7) / 8;
+		int bpl = (stride + (pad - 1)) / pad * pad;
+		int newBpl = (stride + (newPad - 1)) / newPad * newPad;
+		byte[] newData = new byte[height * newBpl];
+		int srcIndex = 0, destIndex = 0;
+		for (int y = 0; y < height; y++) {
+			System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
+			srcIndex += bpl;
+			destIndex += newBpl;
+		}
+		return newData;
 	}
-}
-static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) throws IOException {
-	int dataSize = bih.biHeight * stride;
-	byte[] data = new byte[dataSize];
-	int cmp = bih.biCompression;
-	if (cmp == 0) { // BMP_NO_COMPRESSION
-		raf.read(data);
-	} else {
-		if (DEBUG) System.out.println("ICO cannot be compressed?"); //$NON-NLS-1$
-	}
-	return data;
-}
 
-static void unloadIcon(RandomAccessFile raf, ImageData icon) throws IOException {
-	int sizeImage = (((icon.width * icon.depth + 31) / 32 * 4) +
-		((icon.width + 31) / 32 * 4)) * icon.height;
-	write4(raf, BMPHeaderFixedSize);
-	write4(raf, icon.width);
-	write4(raf, icon.height * 2);
-	writeU2(raf, 1);
-	writeU2(raf, icon.depth);
-	write4(raf, 0);
-	write4(raf, sizeImage);
-	write4(raf, 0);
-	write4(raf, 0);
-	write4(raf, icon.palette.colors != null ? icon.palette.colors.length : 0);
-	write4(raf, 0);
-	
-	byte[] rgbs = paletteToBytes(icon.palette);
-	raf.write(rgbs);
-	unloadShapeData(raf, icon);
-	unloadMaskData(raf, icon);
-}
-static byte[] paletteToBytes(PaletteData pal) {
-	int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
-	byte[] bytes = new byte[n * 4];
-	int offset = 0;
-	for (int i = 0; i < n; i++) {
-		RGB col = pal.colors[i];
-		bytes[offset] = (byte)col.blue;
-		bytes[offset + 1] = (byte)col.green;
-		bytes[offset + 2] = (byte)col.red;
-		offset += 4;
-	}
-	return bytes;
-}
-static void unloadMaskData(RandomAccessFile raf, ImageData icon) {
-	ImageData mask = icon.getTransparencyMask();
-	int bpl = (icon.width + 7) / 8;
-	int pad = mask.scanlinePad;
-	int srcBpl = (bpl + pad - 1) / pad * pad;
-	int destBpl = (bpl + 3) / 4 * 4;
-	byte[] buf = new byte[destBpl];
-	int offset = (icon.height - 1) * srcBpl;
-	byte[] data = mask.data;
-	try {
-		for (int i = 0; i < icon.height; i++) {
-			System.arraycopy(data, offset, buf, 0, bpl);
-			bitInvertData(buf, 0, bpl);
-			raf.write(buf, 0, destBpl);
-			offset -= srcBpl;
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
+	static PaletteData loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
+		int depth = bih.biBitCount;
+		if (depth <= 8) {
+			int numColors = bih.biClrUsed;
+			if (numColors == 0) {
+				numColors = 1 << depth;
+			} else {
+				if (numColors > 256)
+					numColors = 256;
+			}
+			byte[] buf = new byte[numColors * 4];
+			raf.read(buf);
+			return paletteFromBytes(buf, numColors);
+		}
+		if (depth == 16)
+			return new PaletteData(0x7C00, 0x3E0, 0x1F);
+		if (depth == 24)
+			return new PaletteData(0xFF, 0xFF00, 0xFF0000);
+		return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
+	}
+
+	static PaletteData paletteFromBytes(byte[] bytes, int numColors) {
+		int bytesOffset = 0;
+		RGB[] colors = new RGB[numColors];
+		for (int i = 0; i < numColors; i++) {
+			colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF, bytes[bytesOffset + 1] & 0xFF, bytes[bytesOffset] & 0xFF);
+			bytesOffset += 4;
+		}
+		return new PaletteData(colors);
 	}
-}
-static void unloadShapeData(RandomAccessFile raf, ImageData icon) {
-	int bpl = (icon.width * icon.depth + 7) / 8;
-	int pad = icon.scanlinePad;
-	int srcBpl = (bpl + pad - 1) / pad * pad;
-	int destBpl = (bpl + 3) / 4 * 4;
-	byte[] buf = new byte[destBpl];
-	int offset = (icon.height - 1) * srcBpl;
-	byte[] data = icon.data;
-	try {
-		for (int i = 0; i < icon.height; i++) {
-			System.arraycopy(data, offset, buf, 0, bpl);
-			raf.write(buf, 0, destBpl);
-			offset -= srcBpl;
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
+
+	static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
+		int stride = (bih.biWidth * bih.biBitCount + 7) / 8;
+		stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
+		byte[] data = loadData(bih, raf, stride);
+		flipScanLines(data, stride, bih.biHeight);
+		return data;
 	}
-}
-static boolean readIconGroup(RandomAccessFile raf, int offset, int size) throws IOException {
-	raf.seek(offset);
-	NEWHEADER newHeader = new NEWHEADER();
-	read(raf, newHeader);
-	if (newHeader.ResType != RES_ICON) return false;
-	RESDIR[] resDir = new RESDIR[newHeader.ResCount];
-	for (int i = 0; i < newHeader.ResCount; i++) {
-		resDir[i] = new RESDIR();
-		read(raf, resDir[i]);
-	}
-	return true;
-}
 
-static void copyFile(String src, String dst) throws FileNotFoundException, IOException {
-	File srcFile = new File(src);
-	File dstFile = new File(dst);
-	InputStream in = new BufferedInputStream(new FileInputStream(srcFile));
-	OutputStream out = new BufferedOutputStream(new FileOutputStream(dstFile));
-	int c;
-	while ((c = in.read()) != -1) out.write(c); 
-	in.close();
-	out.close();
-}
+	static void flipScanLines(byte[] data, int stride, int height) {
+		int i1 = 0;
+		int i2 = (height - 1) * stride;
+		for (int i = 0; i < height / 2; i++) {
+			for (int index = 0; index < stride; index++) {
+				byte b = data[index + i1];
+				data[index + i1] = data[index + i2];
+				data[index + i2] = b;
+			}
+			i1 += stride;
+			i2 -= stride;
+		}
+	}
 
-/* IO utilities to parse Windows executable */
-static final int IMAGE_DOS_SIGNATURE = 0x5a4d;
-static final int IMAGE_NT_SIGNATURE = 0x00004550;
-static final int IMAGE_DIRECTORY_ENTRY_RESOURCE = 2;
-static final int RES_ICON = 1;
-static final int RT_ICON = 3;
-static final int RT_GROUP_ICON = 14;
-static final int BMPHeaderFixedSize = 40;
-static final int IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;
-static final int IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;
-	
-public static class IMAGE_DOS_HEADER {
-	int e_magic; // WORD
-	int e_cblp; // WORD
-	int e_cp; // WORD
-	int e_crlc; // WORD
-	int e_cparhdr; // WORD
-	int e_minalloc; // WORD
-	int e_maxalloc; // WORD
-	int e_ss; // WORD
-	int e_sp; // WORD
-	int e_csum; // WORD
-	int e_ip; // WORD
-	int e_cs; // WORD
-	int e_lfarlc; // WORD
-	int e_ovno; // WORD
-	int[] e_res = new int[4]; // WORD[4]
-	int e_oemid; // WORD
-	int e_oeminfo; // WORD
-	int[] e_res2 = new int[10]; // WORD[10]
-	int e_lfanew; // LONG
-}
+	static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) throws IOException {
+		int dataSize = bih.biHeight * stride;
+		byte[] data = new byte[dataSize];
+		int cmp = bih.biCompression;
+		if (cmp == 0) { // BMP_NO_COMPRESSION
+			raf.read(data);
+		} else {
+			if (DEBUG)
+				System.out.println("ICO cannot be compressed?"); //$NON-NLS-1$
+		}
+		return data;
+	}
 
-public static class IMAGE_FILE_HEADER {
-	int Machine; // WORD
-	int NumberOfSections; // WORD
-	int TimeDateStamp; // DWORD
-	int PointerToSymbolTable; // DWORD
-	int NumberOfSymbols; // DWORD
-	int SizeOfOptionalHeader; // WORD
-	int Characteristics; // WORD
-}
+	static void unloadIcon(RandomAccessFile raf, ImageData icon) throws IOException {
+		int sizeImage = (((icon.width * icon.depth + 31) / 32 * 4) + ((icon.width + 31) / 32 * 4)) * icon.height;
+		write4(raf, BMPHeaderFixedSize);
+		write4(raf, icon.width);
+		write4(raf, icon.height * 2);
+		writeU2(raf, 1);
+		writeU2(raf, icon.depth);
+		write4(raf, 0);
+		write4(raf, sizeImage);
+		write4(raf, 0);
+		write4(raf, 0);
+		write4(raf, icon.palette.colors != null ? icon.palette.colors.length : 0);
+		write4(raf, 0);
+
+		byte[] rgbs = paletteToBytes(icon.palette);
+		raf.write(rgbs);
+		unloadShapeData(raf, icon);
+		unloadMaskData(raf, icon);
+	}
+
+	static byte[] paletteToBytes(PaletteData pal) {
+		int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
+		byte[] bytes = new byte[n * 4];
+		int offset = 0;
+		for (int i = 0; i < n; i++) {
+			RGB col = pal.colors[i];
+			bytes[offset] = (byte) col.blue;
+			bytes[offset + 1] = (byte) col.green;
+			bytes[offset + 2] = (byte) col.red;
+			offset += 4;
+		}
+		return bytes;
+	}
+
+	static void unloadMaskData(RandomAccessFile raf, ImageData icon) {
+		ImageData mask = icon.getTransparencyMask();
+		int bpl = (icon.width + 7) / 8;
+		int pad = mask.scanlinePad;
+		int srcBpl = (bpl + pad - 1) / pad * pad;
+		int destBpl = (bpl + 3) / 4 * 4;
+		byte[] buf = new byte[destBpl];
+		int offset = (icon.height - 1) * srcBpl;
+		byte[] data = mask.data;
+		try {
+			for (int i = 0; i < icon.height; i++) {
+				System.arraycopy(data, offset, buf, 0, bpl);
+				bitInvertData(buf, 0, bpl);
+				raf.write(buf, 0, destBpl);
+				offset -= srcBpl;
+			}
+		} catch (IOException e) {
+			SWT.error(SWT.ERROR_IO, e);
+		}
+	}
 
-public static class IMAGE_DATA_DIRECTORY {
-	int VirtualAddress; // DWORD
-	int Size; // DWORD
-}
+	static void unloadShapeData(RandomAccessFile raf, ImageData icon) {
+		int bpl = (icon.width * icon.depth + 7) / 8;
+		int pad = icon.scanlinePad;
+		int srcBpl = (bpl + pad - 1) / pad * pad;
+		int destBpl = (bpl + 3) / 4 * 4;
+		byte[] buf = new byte[destBpl];
+		int offset = (icon.height - 1) * srcBpl;
+		byte[] data = icon.data;
+		try {
+			for (int i = 0; i < icon.height; i++) {
+				System.arraycopy(data, offset, buf, 0, bpl);
+				raf.write(buf, 0, destBpl);
+				offset -= srcBpl;
+			}
+		} catch (IOException e) {
+			SWT.error(SWT.ERROR_IO, e);
+		}
+	}
 
-public static class IMAGE_OPTIONAL_HEADER {
-    // Allocate enough storage for the 64 bit version of the header.
-    int Magic; // WORD
-    int MajorLinkerVersion; // BYTE
-    int MinorLinkerVersion; // BYTE
-    int SizeOfCode; // DWORD
-    int SizeOfInitializedData; // DWORD
-    int SizeOfUninitializedData; // DWORD
-    int AddressOfEntryPoint; // DWORD
-    int BaseOfCode; // DWORD
-    int BaseOfData; // DWORD
-    long ImageBase; // ULONGLONG
-    int SectionAlignment; // DWORD
-    int FileAlignment; // DWORD
-    int MajorOperatingSystemVersion; // WORD
-    int MinorOperatingSystemVersion; // WORD
-    int MajorImageVersion; // WORD
-    int MinorImageVersion; // WORD
-    int MajorSubsystemVersion; // WORD
-    int MinorSubsystemVersion; // WORD
-    int Win32VersionValue; // DWORD
-    int SizeOfImage; // DWORD
-    int SizeOfHeaders; // DWORD
-    int CheckSum; // DWORD
-    int Subsystem; // WORD
-    int DllCharacteristics; // WORD
-    long SizeOfStackReserve; // ULONGLONG
-    long SizeOfStackCommit; // ULONGLONG
-    long SizeOfHeapReserve; // ULONGLONG
-    long SizeOfHeapCommit; // ULONGLONG
-    int LoaderFlags; // DWORD
-    int NumberOfRvaAndSizes; // DWORD
-    IMAGE_DATA_DIRECTORY[] DataDirectory = new IMAGE_DATA_DIRECTORY[16];
-}
+	static boolean readIconGroup(RandomAccessFile raf, int offset, int size) throws IOException {
+		raf.seek(offset);
+		NEWHEADER newHeader = new NEWHEADER();
+		read(raf, newHeader);
+		if (newHeader.ResType != RES_ICON)
+			return false;
+		RESDIR[] resDir = new RESDIR[newHeader.ResCount];
+		for (int i = 0; i < newHeader.ResCount; i++) {
+			resDir[i] = new RESDIR();
+			read(raf, resDir[i]);
+		}
+		return true;
+	}
+
+	static void copyFile(String src, String dst) throws FileNotFoundException, IOException {
+		File srcFile = new File(src);
+		File dstFile = new File(dst);
+		InputStream in = new BufferedInputStream(new FileInputStream(srcFile));
+		OutputStream out = new BufferedOutputStream(new FileOutputStream(dstFile));
+		int c;
+		while ((c = in.read()) != -1)
+			out.write(c);
+		in.close();
+		out.close();
+	}
+
+	/* IO utilities to parse Windows executable */
+	static final int IMAGE_DOS_SIGNATURE = 0x5a4d;
+	static final int IMAGE_NT_SIGNATURE = 0x00004550;
+	static final int IMAGE_DIRECTORY_ENTRY_RESOURCE = 2;
+	static final int RES_ICON = 1;
+	static final int RT_ICON = 3;
+	static final int RT_GROUP_ICON = 14;
+	static final int BMPHeaderFixedSize = 40;
+	static final int IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;
+	static final int IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;
+
+	public static class IMAGE_DOS_HEADER {
+		int e_magic; // WORD
+		int e_cblp; // WORD
+		int e_cp; // WORD
+		int e_crlc; // WORD
+		int e_cparhdr; // WORD
+		int e_minalloc; // WORD
+		int e_maxalloc; // WORD
+		int e_ss; // WORD
+		int e_sp; // WORD
+		int e_csum; // WORD
+		int e_ip; // WORD
+		int e_cs; // WORD
+		int e_lfarlc; // WORD
+		int e_ovno; // WORD
+		int[] e_res = new int[4]; // WORD[4]
+		int e_oemid; // WORD
+		int e_oeminfo; // WORD
+		int[] e_res2 = new int[10]; // WORD[10]
+		int e_lfanew; // LONG
+	}
+
+	public static class IMAGE_FILE_HEADER {
+		int Machine; // WORD
+		int NumberOfSections; // WORD
+		int TimeDateStamp; // DWORD
+		int PointerToSymbolTable; // DWORD
+		int NumberOfSymbols; // DWORD
+		int SizeOfOptionalHeader; // WORD
+		int Characteristics; // WORD
+	}
+
+	public static class IMAGE_DATA_DIRECTORY {
+		int VirtualAddress; // DWORD
+		int Size; // DWORD
+	}
+
+	public static class IMAGE_OPTIONAL_HEADER {
+		// Allocate enough storage for the 64 bit version of the header.
+		int Magic; // WORD
+		int MajorLinkerVersion; // BYTE
+		int MinorLinkerVersion; // BYTE
+		int SizeOfCode; // DWORD
+		int SizeOfInitializedData; // DWORD
+		int SizeOfUninitializedData; // DWORD
+		int AddressOfEntryPoint; // DWORD
+		int BaseOfCode; // DWORD
+		int BaseOfData; // DWORD
+		long ImageBase; // ULONGLONG
+		int SectionAlignment; // DWORD
+		int FileAlignment; // DWORD
+		int MajorOperatingSystemVersion; // WORD
+		int MinorOperatingSystemVersion; // WORD
+		int MajorImageVersion; // WORD
+		int MinorImageVersion; // WORD
+		int MajorSubsystemVersion; // WORD
+		int MinorSubsystemVersion; // WORD
+		int Win32VersionValue; // DWORD
+		int SizeOfImage; // DWORD
+		int SizeOfHeaders; // DWORD
+		int CheckSum; // DWORD
+		int Subsystem; // WORD
+		int DllCharacteristics; // WORD
+		long SizeOfStackReserve; // ULONGLONG
+		long SizeOfStackCommit; // ULONGLONG
+		long SizeOfHeapReserve; // ULONGLONG
+		long SizeOfHeapCommit; // ULONGLONG
+		int LoaderFlags; // DWORD
+		int NumberOfRvaAndSizes; // DWORD
+		IMAGE_DATA_DIRECTORY[] DataDirectory = new IMAGE_DATA_DIRECTORY[16];
+	}
+
+	public static class IMAGE_NT_HEADERS {
+		int Signature; // DWORD
+		IMAGE_FILE_HEADER FileHeader = new IMAGE_FILE_HEADER();
+		IMAGE_OPTIONAL_HEADER OptionalHeader = new IMAGE_OPTIONAL_HEADER();
+		final static int FIELD_OFFSET_OptionalHeader = 24;
+	}
+
+	public static class IMAGE_SECTION_HEADER {
+		int[] Name = new int[8]; // BYTE[8]
+		int Misc_VirtualSize; // DWORD (union Misc { DWORD PhysicalAddress; DWORD VirtualSize }
+		int VirtualAddress; // DWORD
+		int SizeOfRawData; // DWORD
+		int PointerToRawData; // DWORD
+		int PointerToRelocations; // DWORD
+		int PointerToLinenumbers; // DWORD
+		int NumberOfRelocations; // WORD
+		int NumberOfLinenumbers; // WORD
+		int Characteristics; // DWORD
+	}
+
+	public static class IMAGE_RESOURCE_DIRECTORY {
+		int Characteristics; // DWORD
+		int TimeDateStamp; // DWORD
+		int MajorVersion; // WORD
+		int MinorVersion; // WORD
+		int NumberOfNamedEntries; // WORD - used
+		int NumberOfIdEntries; // WORD - used
+		final static int SIZEOF = 16;
+	}
+
+	public static class IMAGE_RESOURCE_DIRECTORY_ENTRY {
+		// union
+		int NameOffset; // DWORD 31 bits
+		boolean NameIsString; // DWORD 1 bit
+		int Name; // DWORD
+		int Id; // WORD
+		// union
+		int OffsetToData; // DWORD
+		int OffsetToDirectory; // DWORD 31 bits
+		boolean DataIsDirectory; // DWORD 1 bit
+	}
+
+	public static class IMAGE_RESOURCE_DATA_ENTRY {
+		int OffsetToData; // DWORD
+		int Size; // DWORD
+		int CodePage; // DWORD
+		int Reserved; // DWORD
+	}
+
+	public static class NEWHEADER {
+		int Reserved; // WORD
+		int ResType; // WORD
+		int ResCount; // WORD
+	}
+
+	public static class ICONRESDIR {
+		int Width; // BYTE
+		int Height; // BYTE
+		int ColorCount; // BYTE
+		int reserved; // BYTE
+	}
+
+	public static class CURSORDIR {
+		int Width; // WORD
+		int Height; // WORD
+	}
+
+	public static class RESDIR {
+		// union
+		ICONRESDIR Icon = new ICONRESDIR();
+		CURSORDIR Cursor = new CURSORDIR();
+		int Planes; // WORD
+		int BitCount; // WORD
+		int BytesInRes; // DWORD
+		int IconCursorId; // WORD
+	}
+
+	public static class BITMAPINFOHEADER {
+		int biSize; // DWORD
+		int biWidth; // LONG
+		int biHeight; // LONG
+		int biPlanes; // WORD
+		int biBitCount; // WORD
+		int biCompression; // DWORD
+		int biSizeImage; // DWORD
+		int biXPelsPerMeter; // LONG
+		int biYPelsPerMeter; // LONG
+		int biClrUsed; // DWORD
+		int biClrImportant; // DWORD
+	}
+
+	static class RGBQUAD {
+		int rgBlue; // BYTE
+		int rgbGreen; // BYTE
+		int rgbRed; // BYTE
+		int rgbReserved; // BYTE
+	}
+
+	static class BITMAPINFO {
+		BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
+		RGBQUAD[] bmiColors = null;
+	}
+
+	static void read(RandomAccessFile raf, BITMAPINFOHEADER bih) throws IOException {
+		bih.biSize = read4(raf);
+		bih.biWidth = read4(raf);
+		bih.biHeight = read4(raf);
+		bih.biPlanes = readU2(raf);
+		bih.biBitCount = readU2(raf);
+		bih.biCompression = read4(raf);
+		bih.biSizeImage = read4(raf);
+		bih.biXPelsPerMeter = read4(raf);
+		bih.biYPelsPerMeter = read4(raf);
+		bih.biClrUsed = read4(raf);
+		bih.biClrImportant = read4(raf);
+	}
+
+	static void read(RandomAccessFile raf, BITMAPINFO bi) throws IOException {
+		read(raf, bi.bmiHeader);
+	}
+
+	/* Little Endian helpers */
+	static int readU2(RandomAccessFile raf) throws IOException {
+		int b0 = raf.readByte() & 0xFF;
+		int b1 = raf.readByte() & 0xFF;
+		return (b1 << 8 | b0);
+	}
+
+	static int read4(RandomAccessFile raf) throws IOException {
+		int b0 = raf.readByte() & 0xFF;
+		int b1 = raf.readByte() & 0xFF;
+		int b2 = raf.readByte() & 0xFF;
+		int b3 = raf.readByte() & 0xFF;
+		return b3 << 24 | b2 << 16 | b1 << 8 | b0;
+	}
+
+	static long read8(RandomAccessFile raf) throws IOException {
+		int b0 = raf.readByte() & 0xFF;
+		int b1 = raf.readByte() & 0xFF;
+		int b2 = raf.readByte() & 0xFF;
+		int b3 = raf.readByte() & 0xFF;
+		int b4 = raf.readByte() & 0xFF;
+		int b5 = raf.readByte() & 0xFF;
+		int b6 = raf.readByte() & 0xFF;
+		int b7 = raf.readByte() & 0xFF;
+		return b7 << 56 | b6 << 48 | b5 << 40 | b4 << 32 | b3 << 24 | b2 << 16 | b1 << 8 | b0;
+	}
+
+	static void write4(RandomAccessFile raf, int value) throws IOException {
+		raf.write(value & 0xFF);
+		raf.write((value >> 8) & 0xFF);
+		raf.write((value >> 16) & 0xFF);
+		raf.write((value >> 24) & 0xFF);
+	}
+
+	static void writeU2(RandomAccessFile raf, int value) throws IOException {
+		raf.write(value & 0xFF);
+		raf.write((value >> 8) & 0xFF);
+	}
+
+	static void read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) throws IOException {
+		idh.e_magic = readU2(raf);
+		idh.e_cblp = readU2(raf);
+		idh.e_cp = readU2(raf);
+		idh.e_crlc = readU2(raf);
+		idh.e_cparhdr = readU2(raf);
+		idh.e_minalloc = readU2(raf);
+		idh.e_maxalloc = readU2(raf);
+		idh.e_ss = readU2(raf);
+		idh.e_sp = readU2(raf);
+		idh.e_csum = readU2(raf);
+		idh.e_ip = readU2(raf);
+		idh.e_cs = readU2(raf);
+		idh.e_lfarlc = readU2(raf);
+		idh.e_ovno = readU2(raf);
+		for (int i = 0; i < idh.e_res.length; i++)
+			idh.e_res[i] = readU2(raf);
+		idh.e_oemid = readU2(raf);
+		idh.e_oeminfo = readU2(raf);
+		for (int i = 0; i < idh.e_res2.length; i++)
+			idh.e_res2[i] = readU2(raf);
+		idh.e_lfanew = read4(raf);
+	}
+
+	static void read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) throws IOException {
+		ifh.Machine = readU2(raf);
+		ifh.NumberOfSections = readU2(raf);
+		ifh.TimeDateStamp = read4(raf);
+		ifh.PointerToSymbolTable = read4(raf);
+		ifh.NumberOfSymbols = read4(raf);
+		ifh.SizeOfOptionalHeader = readU2(raf);
+		ifh.Characteristics = readU2(raf);
+	}
+
+	static void read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) throws IOException {
+		idd.VirtualAddress = read4(raf);
+		idd.Size = read4(raf);
+	}
+
+	static void read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) throws IOException {
+		ioh.Magic = readU2(raf);
+
+		// Assume file is 32bit executable unless x64 magic is present
+		boolean is32 = !(ioh.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC);
+
+		ioh.MajorLinkerVersion = raf.read();
+		ioh.MinorLinkerVersion = raf.read();
+		ioh.SizeOfCode = read4(raf);
+		ioh.SizeOfInitializedData = read4(raf);
+		ioh.SizeOfUninitializedData = read4(raf);
+		ioh.AddressOfEntryPoint = read4(raf);
+		ioh.BaseOfCode = read4(raf);
+
+		if (is32) {
+			ioh.BaseOfData = read4(raf);
+			ioh.ImageBase = read4(raf);
+		} else {
+			// BaseOfData deleted in the 64 bit version PE32+
+			ioh.ImageBase = read8(raf);
+		}
 
-public static class IMAGE_NT_HEADERS {
-	int Signature; // DWORD
-	IMAGE_FILE_HEADER FileHeader = new IMAGE_FILE_HEADER();
-	IMAGE_OPTIONAL_HEADER OptionalHeader = new IMAGE_OPTIONAL_HEADER();
-	final static int FIELD_OFFSET_OptionalHeader = 24;  
-}
-	
-public static class IMAGE_SECTION_HEADER {
-	int[] Name = new int[8]; // BYTE[8]
-	int Misc_VirtualSize; // DWORD (union Misc { DWORD PhysicalAddress; DWORD VirtualSize }
-	int VirtualAddress; // DWORD
-	int SizeOfRawData; // DWORD
-	int PointerToRawData; // DWORD
-	int PointerToRelocations; // DWORD
-	int PointerToLinenumbers; // DWORD
-	int NumberOfRelocations; // WORD
-	int NumberOfLinenumbers; // WORD
-	int Characteristics; // DWORD
-}
+		ioh.SectionAlignment = read4(raf);
+		ioh.FileAlignment = read4(raf);
+		ioh.MajorOperatingSystemVersion = readU2(raf);
+		ioh.MinorOperatingSystemVersion = readU2(raf);
+		ioh.MajorImageVersion = readU2(raf);
+		ioh.MinorImageVersion = readU2(raf);
+		ioh.MajorSubsystemVersion = readU2(raf);
+		ioh.MinorSubsystemVersion = readU2(raf);
+		ioh.Win32VersionValue = read4(raf);
+		ioh.SizeOfImage = read4(raf);
+		ioh.SizeOfHeaders = read4(raf);
+		ioh.CheckSum = read4(raf);
+		ioh.Subsystem = readU2(raf);
+		ioh.DllCharacteristics = readU2(raf);
+
+		if (is32) {
+			ioh.SizeOfStackReserve = read4(raf);
+			ioh.SizeOfStackCommit = read4(raf);
+			ioh.SizeOfHeapReserve = read4(raf);
+			ioh.SizeOfHeapCommit = read4(raf);
+		} else {
+			ioh.SizeOfStackReserve = read8(raf);
+			ioh.SizeOfStackCommit = read8(raf);
+			ioh.SizeOfHeapReserve = read8(raf);
+			ioh.SizeOfHeapCommit = read8(raf);
+		}
 
-public static class IMAGE_RESOURCE_DIRECTORY {
-	int Characteristics; // DWORD
-	int TimeDateStamp; // DWORD
-	int MajorVersion; // WORD
-	int MinorVersion; // WORD
-	int NumberOfNamedEntries; // WORD - used
-	int NumberOfIdEntries; // WORD - used
-	final static int SIZEOF = 16;
-}
+		ioh.LoaderFlags = read4(raf);
+		ioh.NumberOfRvaAndSizes = read4(raf);
+		for (int i = 0; i < ioh.DataDirectory.length; i++) {
+			ioh.DataDirectory[i] = new IMAGE_DATA_DIRECTORY();
+			read(raf, ioh.DataDirectory[i]);
+		}
+	}
 
-public static class IMAGE_RESOURCE_DIRECTORY_ENTRY {
-	// union
-	int NameOffset; // DWORD 31 bits
-	boolean NameIsString; // DWORD 1 bit
-	int Name; // DWORD
-	int Id; // WORD
-	// union
-	int OffsetToData; // DWORD
-	int OffsetToDirectory; // DWORD 31 bits
-	boolean DataIsDirectory; // DWORD 1 bit
-}
+	static void read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) throws IOException {
+		inh.Signature = read4(raf);
+		read(raf, inh.FileHeader);
+		read(raf, inh.OptionalHeader);
+	}
 
-public static class IMAGE_RESOURCE_DATA_ENTRY {
-	int OffsetToData; // DWORD
-	int Size; // DWORD
-	int CodePage; // DWORD
-	int Reserved; // DWORD
-}
+	static void read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) throws IOException {
+		for (int i = 0; i < ish.Name.length; i++)
+			ish.Name[i] = raf.read();
+		ish.Misc_VirtualSize = read4(raf);
+		ish.VirtualAddress = read4(raf);
+		ish.SizeOfRawData = read4(raf);
+		ish.PointerToRawData = read4(raf);
+		ish.PointerToRelocations = read4(raf);
+		ish.PointerToLinenumbers = read4(raf);
+		ish.NumberOfRelocations = readU2(raf);
+		ish.NumberOfLinenumbers = readU2(raf);
+		ish.Characteristics = read4(raf);
+	}
 
-public static class NEWHEADER {
-	int Reserved; // WORD
-	int ResType; // WORD
-	int ResCount; // WORD
-}
+	static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) throws IOException {
+		ird.Characteristics = read4(raf);
+		ird.TimeDateStamp = read4(raf);
+		ird.MajorVersion = readU2(raf);
+		ird.MinorVersion = readU2(raf);
+		ird.NumberOfNamedEntries = readU2(raf);
+		ird.NumberOfIdEntries = readU2(raf);
+	}
 
-public static class ICONRESDIR {
-	int Width; // BYTE
-	int Height; // BYTE
-	int ColorCount; // BYTE
-	int reserved; // BYTE
-}
+	static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) throws IOException {
+		irde.Name = read4(raf);
+		irde.OffsetToData = read4(raf);
+		// construct other union members
+		irde.NameOffset = irde.Name & ~(1 << 31);
+		irde.NameIsString = (irde.Name & (1 << 31)) != 0;
+		irde.Id = irde.Name & 0xFFFF;
+		irde.OffsetToDirectory = irde.OffsetToData & ~(1 << 31);
+		irde.DataIsDirectory = (irde.OffsetToData & (1 << 31)) != 0;
+	}
 
-public static class CURSORDIR {
-	int Width; // WORD
-	int Height; // WORD
-}
+	static void read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) throws IOException {
+		irde.OffsetToData = read4(raf);
+		irde.Size = read4(raf);
+		irde.CodePage = read4(raf);
+		irde.Reserved = read4(raf);
+	}
 
-public static class RESDIR {
-	// union
-	ICONRESDIR Icon = new ICONRESDIR();
-	CURSORDIR Cursor = new CURSORDIR();
-	int Planes; // WORD
-	int BitCount; // WORD
-	int BytesInRes; // DWORD
-	int IconCursorId; // WORD
-}
+	static void read(RandomAccessFile raf, NEWHEADER nh) throws IOException {
+		nh.Reserved = readU2(raf);
+		nh.ResType = readU2(raf);
+		nh.ResCount = readU2(raf);
+	}
 
-public static class BITMAPINFOHEADER {
-	int biSize; // DWORD
-	int biWidth; // LONG
-	int biHeight; // LONG
-	int biPlanes; // WORD
-	int biBitCount; // WORD
-	int biCompression; // DWORD
-	int biSizeImage; // DWORD
-	int biXPelsPerMeter; // LONG
-	int biYPelsPerMeter; // LONG
-	int biClrUsed; // DWORD
-	int biClrImportant; // DWORD
-}
+	static void read(RandomAccessFile raf, ICONRESDIR i) throws IOException {
+		i.Width = raf.read();
+		i.Height = raf.read();
+		i.ColorCount = raf.read();
+		i.reserved = raf.read();
+	}
 
-static class RGBQUAD {
-	int rgBlue; // BYTE
-	int rgbGreen; // BYTE
-	int rgbRed; // BYTE
-	int rgbReserved; // BYTE
-}
-static class BITMAPINFO {
-	BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
-	RGBQUAD[] bmiColors = null;
-}
-static void read(RandomAccessFile raf, BITMAPINFOHEADER bih) throws IOException {
-	bih.biSize = read4(raf);
-	bih.biWidth = read4(raf);
-	bih.biHeight = read4(raf);
-	bih.biPlanes = readU2(raf);
-	bih.biBitCount = readU2(raf);
-	bih.biCompression = read4(raf);
-	bih.biSizeImage = read4(raf);
-	bih.biXPelsPerMeter = read4(raf);
-	bih.biYPelsPerMeter = read4(raf);
-	bih.biClrUsed = read4(raf);
-	bih.biClrImportant = read4(raf);
-}
-static void read(RandomAccessFile raf, BITMAPINFO bi) throws IOException {
-	read(raf, bi.bmiHeader);
-}
-/* Little Endian helpers */
-static int readU2(RandomAccessFile raf) throws IOException {
-	int b0 = raf.readByte() & 0xFF;
-	int b1 = raf.readByte() & 0xFF;
-	return (b1 << 8 | b0);
-}
-static int read4(RandomAccessFile raf) throws IOException {
-	int b0 = raf.readByte() & 0xFF;
-	int b1 = raf.readByte() & 0xFF;
-	int b2 = raf.readByte() & 0xFF;
-	int b3 = raf.readByte() & 0xFF;
-	return b3 << 24 | b2 << 16 | b1 << 8 | b0;
-}
-static long read8(RandomAccessFile raf) throws IOException {
-    int b0 = raf.readByte() & 0xFF;
-    int b1 = raf.readByte() & 0xFF;
-    int b2 = raf.readByte() & 0xFF;
-    int b3 = raf.readByte() & 0xFF;
-    int b4 = raf.readByte() & 0xFF;
-    int b5 = raf.readByte() & 0xFF;
-    int b6 = raf.readByte() & 0xFF;
-    int b7 = raf.readByte() & 0xFF;
-    return b7 << 56 | b6 << 48 | b5 << 40 | b4 << 32 | b3 << 24 | b2 << 16 | b1 << 8 | b0;
-}
-static void write4(RandomAccessFile raf, int value) throws IOException {
-	raf.write(value & 0xFF);
-	raf.write((value >> 8) & 0xFF);
-	raf.write((value >> 16) & 0xFF);
-	raf.write((value >> 24) & 0xFF);
-}
-static void writeU2(RandomAccessFile raf, int value) throws IOException {
-	raf.write(value & 0xFF);
-	raf.write((value >> 8) & 0xFF);
-}
-static void read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) throws IOException {
-	idh.e_magic = readU2(raf);
-	idh.e_cblp = readU2(raf);
-	idh.e_cp = readU2(raf);
-	idh.e_crlc = readU2(raf);
-	idh.e_cparhdr = readU2(raf);
-	idh.e_minalloc = readU2(raf);
-	idh.e_maxalloc = readU2(raf);
-	idh.e_ss = readU2(raf);
-	idh.e_sp = readU2(raf);
-	idh.e_csum = readU2(raf);
-	idh.e_ip = readU2(raf);
-	idh.e_cs = readU2(raf);
-	idh.e_lfarlc = readU2(raf);
-	idh.e_ovno = readU2(raf);
-	for (int i = 0; i < idh.e_res.length; i++) idh.e_res[i] = readU2(raf);
-	idh.e_oemid = readU2(raf);
-	idh.e_oeminfo = readU2(raf);
-	for (int i = 0; i < idh.e_res2.length; i++) idh.e_res2[i] = readU2(raf);
-	idh.e_lfanew = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) throws IOException {
-	ifh.Machine = readU2(raf);
-	ifh.NumberOfSections = readU2(raf);
-	ifh.TimeDateStamp = read4(raf);
-	ifh.PointerToSymbolTable = read4(raf);
-	ifh.NumberOfSymbols = read4(raf);
-	ifh.SizeOfOptionalHeader = readU2(raf);
-	ifh.Characteristics  = readU2(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) throws IOException {
-	idd.VirtualAddress = read4(raf);
-	idd.Size = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) throws IOException {
-	ioh.Magic = readU2(raf);
-	
-	// Assume file is 32bit executable unless x64 magic is present
-	boolean is32 = !(ioh.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC);
-	
-	ioh.MajorLinkerVersion = raf.read();
-	ioh.MinorLinkerVersion = raf.read();
-	ioh.SizeOfCode = read4(raf);
-	ioh.SizeOfInitializedData = read4(raf);
-	ioh.SizeOfUninitializedData = read4(raf);
-	ioh.AddressOfEntryPoint = read4(raf);
-	ioh.BaseOfCode = read4(raf);
-	
-	if (is32)
-	{
-	    ioh.BaseOfData = read4(raf);
-	    ioh.ImageBase = read4(raf);
-	}
-	else
-	{
-	    // BaseOfData deleted in the 64 bit version PE32+
-	    ioh.ImageBase = read8(raf);
-	}
-	
-	ioh.SectionAlignment = read4(raf);
-	ioh.FileAlignment = read4(raf);
-	ioh.MajorOperatingSystemVersion = readU2(raf);
-	ioh.MinorOperatingSystemVersion = readU2(raf);
-	ioh.MajorImageVersion = readU2(raf);
-	ioh.MinorImageVersion = readU2(raf);
-	ioh.MajorSubsystemVersion = readU2(raf);
-	ioh.MinorSubsystemVersion = readU2(raf);
-	ioh.Win32VersionValue = read4(raf);
-	ioh.SizeOfImage = read4(raf);
-	ioh.SizeOfHeaders = read4(raf);
-	ioh.CheckSum = read4(raf);
-	ioh.Subsystem = readU2(raf);
-	ioh.DllCharacteristics = readU2(raf);
-	
-	if (is32)
-	{
-    	ioh.SizeOfStackReserve = read4(raf);
-    	ioh.SizeOfStackCommit = read4(raf);
-    	ioh.SizeOfHeapReserve = read4(raf);
-    	ioh.SizeOfHeapCommit = read4(raf);
-	}
-	else 
-	{
-        ioh.SizeOfStackReserve = read8(raf);
-        ioh.SizeOfStackCommit = read8(raf);
-        ioh.SizeOfHeapReserve = read8(raf);
-        ioh.SizeOfHeapCommit = read8(raf);	    
-	}
-
-	ioh.LoaderFlags = read4(raf);
-	ioh.NumberOfRvaAndSizes = read4(raf);
-	for (int i = 0 ; i < ioh.DataDirectory.length; i++) {
-		ioh.DataDirectory[i] = new IMAGE_DATA_DIRECTORY();
-		read(raf, ioh.DataDirectory[i]);
+	static void read(RandomAccessFile raf, CURSORDIR c) throws IOException {
+		c.Width = readU2(raf);
+		c.Height = readU2(raf);
 	}
-}
-static void read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) throws IOException {
-	inh.Signature = read4(raf);
-	read(raf, inh.FileHeader);
-	read(raf, inh.OptionalHeader);
-}
-static void read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) throws IOException {
-	for (int i = 0 ; i < ish.Name.length; i++) ish.Name[i] = raf.read();
-	ish.Misc_VirtualSize = read4(raf);
-	ish.VirtualAddress = read4(raf);
-	ish.SizeOfRawData = read4(raf);
-	ish.PointerToRawData = read4(raf);
-	ish.PointerToRelocations = read4(raf);
-	ish.PointerToLinenumbers = read4(raf);
-	ish.NumberOfRelocations = readU2(raf);
-	ish.NumberOfLinenumbers = readU2(raf);
-	ish.Characteristics = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) throws IOException {
-	ird.Characteristics = read4(raf);
-	ird.TimeDateStamp = read4(raf);
-	ird.MajorVersion = readU2(raf);
-	ird.MinorVersion = readU2(raf);
-	ird.NumberOfNamedEntries = readU2(raf);
-	ird.NumberOfIdEntries = readU2(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) throws IOException {
-	irde.Name = read4(raf);
-	irde.OffsetToData = read4(raf);
-	// construct other union members
-	irde.NameOffset = irde.Name & ~ (1 << 31);
-	irde.NameIsString = (irde.Name & (1 << 31)) != 0;
-	irde.Id = irde.Name & 0xFFFF;
-	irde.OffsetToDirectory = irde.OffsetToData & ~ (1 << 31);
-	irde.DataIsDirectory = (irde.OffsetToData & (1 << 31)) != 0;
-}
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) throws IOException {
-	irde.OffsetToData = read4(raf);
-	irde.Size = read4(raf);
-	irde.CodePage = read4(raf);
-	irde.Reserved = read4(raf);
-}
-static void read(RandomAccessFile raf, NEWHEADER nh) throws IOException {
-	nh.Reserved = readU2(raf);
-	nh.ResType = readU2(raf);
-	nh.ResCount = readU2(raf);
-}
-static void read(RandomAccessFile raf, ICONRESDIR i) throws IOException {
-	i.Width = raf.read();
-	i.Height = raf.read();
-	i.ColorCount = raf.read();
-	i.reserved = raf.read();
-}
-static void read(RandomAccessFile raf, CURSORDIR c) throws IOException {
-	c.Width = readU2(raf);
-	c.Height = readU2(raf);
-}
-static void read(RandomAccessFile raf, RESDIR rs) throws IOException {
-	long start = raf.getFilePointer();
-	read(raf, rs.Icon);
-	raf.seek(start);
-	read(raf, rs.Cursor);
-	rs.Planes = readU2(raf);
-	rs.BitCount = readU2(raf);
-	rs.BytesInRes = read4(raf);
-	rs.IconCursorId = readU2(raf);
-}
 
-/* ImageData and Image Decoder inlining to avoid dependency on SWT 
- * The following section can be entirely removed if SWT can be used.
- */
+	static void read(RandomAccessFile raf, RESDIR rs) throws IOException {
+		long start = raf.getFilePointer();
+		read(raf, rs.Icon);
+		raf.seek(start);
+		read(raf, rs.Cursor);
+		rs.Planes = readU2(raf);
+		rs.BitCount = readU2(raf);
+		rs.BytesInRes = read4(raf);
+		rs.IconCursorId = readU2(raf);
+	}
 
-static class RGB {
-	
-	/**
-	 * the red component of the RGB
-	 */
-	public int red;
-	
-	/**
-	 * the green component of the RGB
-	 */
-	public int green;
-	
-	/**
-	 * the blue component of the RGB
+	/* ImageData and Image Decoder inlining to avoid dependency on SWT 
+	 * The following section can be entirely removed if SWT can be used.
 	 */
-	public int blue;
-	
-	static final long serialVersionUID = 3258415023461249074L;
-	
-/**
- * Constructs an instance of this class with the given
- * red, green and blue values.
- *
- * @param red the red component of the new instance
- * @param green the green component of the new instance
- * @param blue the blue component of the new instance
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
- * </ul>
- */
-public RGB(int red, int green, int blue) {
-	if ((red > 255) || (red < 0) ||
-		(green > 255) || (green < 0) ||
-		(blue > 255) || (blue < 0))
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	this.red = red;
-	this.green = green;
-	this.blue = blue;
-}
-
-/**
- * Compares the argument to the receiver, and returns true
- * if they represent the <em>same</em> object using a class
- * specific comparison.
- *
- * @param object the object to compare with this object
- * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise
- *
- * @see #hashCode()
- */
-public boolean equals (Object object) {
-	if (object == this) return true;
-	if (!(object instanceof RGB)) return false;
-	RGB rgb = (RGB)object;
-	return (rgb.red == this.red) && (rgb.green == this.green) && (rgb.blue == this.blue);
-}
 
-/**
- * Returns an integer hash code for the receiver. Any two 
- * objects which return <code>true</code> when passed to 
- * <code>equals</code> must return the same value for this
- * method.
- *
- * @return the receiver's hash
- *
- * @see #equals(Object)
- */
-public int hashCode () {
-	return (blue << 16) | (green << 8) | red;
-}
+	static class RGB {
+
+		/**
+		 * the red component of the RGB
+		 */
+		public int red;
+
+		/**
+		 * the green component of the RGB
+		 */
+		public int green;
+
+		/**
+		 * the blue component of the RGB
+		 */
+		public int blue;
+
+		static final long serialVersionUID = 3258415023461249074L;
+
+		/**
+		 * Constructs an instance of this class with the given
+		 * red, green and blue values.
+		 *
+		 * @param red the red component of the new instance
+		 * @param green the green component of the new instance
+		 * @param blue the blue component of the new instance
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
+		 * </ul>
+		 */
+		public RGB(int red, int green, int blue) {
+			if ((red > 255) || (red < 0) || (green > 255) || (green < 0) || (blue > 255) || (blue < 0))
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			this.red = red;
+			this.green = green;
+			this.blue = blue;
+		}
 
-/**
- * Returns a string containing a concise, human-readable
- * description of the receiver.
- *
- * @return a string representation of the <code>RGB</code>
- */
-public String toString () {
-	return "RGB {" + red + ", " + green + ", " + blue + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
+		/**
+		 * Compares the argument to the receiver, and returns true
+		 * if they represent the <em>same</em> object using a class
+		 * specific comparison.
+		 *
+		 * @param object the object to compare with this object
+		 * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise
+		 *
+		 * @see #hashCode()
+		 */
+		public boolean equals(Object object) {
+			if (object == this)
+				return true;
+			if (!(object instanceof RGB))
+				return false;
+			RGB rgb = (RGB) object;
+			return (rgb.red == this.red) && (rgb.green == this.green) && (rgb.blue == this.blue);
+		}
 
-//$NON-NLS-4$
-}
+		/**
+		 * Returns an integer hash code for the receiver. Any two 
+		 * objects which return <code>true</code> when passed to 
+		 * <code>equals</code> must return the same value for this
+		 * method.
+		 *
+		 * @return the receiver's hash
+		 *
+		 * @see #equals(Object)
+		 */
+		public int hashCode() {
+			return (blue << 16) | (green << 8) | red;
+		}
 
-}
-static class PaletteData {
-	
-	/**
-	 * true if the receiver is a direct palette, 
-	 * and false otherwise
-	 */
-	public boolean isDirect;
-	
-	/**
-	 * the RGB values for an indexed palette, where the
-	 * indices of the array correspond to pixel values
-	 */
-	public RGB[] colors;
-	
-	/**
-	 * the red mask for a direct palette
-	 */
-	public int redMask;
-	
-	/**
-	 * the green mask for a direct palette
-	 */
-	public int greenMask;
-	
-	/**
-	 * the blue mask for a direct palette
-	 */
-	public int blueMask;
-	
-	/**
-	 * the red shift for a direct palette
-	 */
-	public int redShift;
-	
-	/**
-	 * the green shift for a direct palette
-	 */
-	public int greenShift;
-	
-	/**
-	 * the blue shift for a direct palette
-	 */
-	public int blueShift;
+		/**
+		 * Returns a string containing a concise, human-readable
+		 * description of the receiver.
+		 *
+		 * @return a string representation of the <code>RGB</code>
+		 */
+		public String toString() {
+			return "RGB {" + red + ", " + green + ", " + blue + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
 
-/**
- * Constructs a new indexed palette given an array of RGB values.
- *
- * @param colors the array of <code>RGB</code>s for the palette
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public PaletteData(RGB[] colors) {
-	if (colors == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	this.colors = colors;
-	this.isDirect = false;
-}
+			//$NON-NLS-4$
+		}
 
-/**
- * Constructs a new direct palette given the red, green and blue masks.
- *
- * @param redMask the red mask
- * @param greenMask the green mask
- * @param blueMask the blue mask
- */
-public PaletteData(int redMask, int greenMask, int blueMask) {
-	this.redMask = redMask;
-	this.greenMask = greenMask;
-	this.blueMask = blueMask;
-	this.isDirect = true;
-	this.redShift = shiftForMask(redMask);
-	this.greenShift = shiftForMask(greenMask);
-	this.blueShift = shiftForMask(blueMask);
-}
+	}
 
-/**
- * Returns the pixel value corresponding to the given <code>RBG</code>.
- *
- * @param rgb the RGB to get the pixel value for
- * @return the pixel value for the given RGB
- * 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the RGB is not found in the palette</li>
- * </ul>
- */
-public int getPixel(RGB rgb) {
-	if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (isDirect) {
-		int pixel = 0;
-		pixel |= (redShift < 0 ? rgb.red << -redShift : rgb.red >>> redShift) & redMask;
-		pixel |= (greenShift < 0 ? rgb.green << -greenShift : rgb.green >>> greenShift) & greenMask;
-		pixel |= (blueShift < 0 ? rgb.blue << -blueShift : rgb.blue >>> blueShift) & blueMask;
-		return pixel;
-	} 
-
-	for (int i = 0; i < colors.length; i++) {
-		if (colors[i].equals(rgb)) return i;
-	}
-	/* The RGB did not exist in the palette */
-	SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	return 0;
-}
+	static class PaletteData {
+
+		/**
+		 * true if the receiver is a direct palette, 
+		 * and false otherwise
+		 */
+		public boolean isDirect;
+
+		/**
+		 * the RGB values for an indexed palette, where the
+		 * indices of the array correspond to pixel values
+		 */
+		public RGB[] colors;
+
+		/**
+		 * the red mask for a direct palette
+		 */
+		public int redMask;
+
+		/**
+		 * the green mask for a direct palette
+		 */
+		public int greenMask;
+
+		/**
+		 * the blue mask for a direct palette
+		 */
+		public int blueMask;
+
+		/**
+		 * the red shift for a direct palette
+		 */
+		public int redShift;
+
+		/**
+		 * the green shift for a direct palette
+		 */
+		public int greenShift;
+
+		/**
+		 * the blue shift for a direct palette
+		 */
+		public int blueShift;
+
+		/**
+		 * Constructs a new indexed palette given an array of RGB values.
+		 *
+		 * @param colors the array of <code>RGB</code>s for the palette
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
+		 * </ul>
+		 */
+		public PaletteData(RGB[] colors) {
+			if (colors == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			this.colors = colors;
+			this.isDirect = false;
+		}
 
-/**
- * Returns an <code>RGB</code> corresponding to the given pixel value.
- *
- * @param pixel the pixel to get the RGB value for
- * @return the RGB value for the given pixel
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the pixel does not exist in the palette</li>
- * </ul>
- */
-public RGB getRGB(int pixel) {
-	if (isDirect) {
-		int r = pixel & redMask;
-		r = (redShift < 0) ? r >>> -redShift : r << redShift;
-		int g = pixel & greenMask;
-		g = (greenShift < 0) ? g >>> -greenShift : g << greenShift;
-		int b = pixel & blueMask;
-		b = (blueShift < 0) ? b >>> -blueShift : b << blueShift;
-		return new RGB(r, g, b);
-	}
-	if (pixel < 0 || pixel >= colors.length) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	}
-	return colors[pixel];
-}
+		/**
+		 * Constructs a new direct palette given the red, green and blue masks.
+		 *
+		 * @param redMask the red mask
+		 * @param greenMask the green mask
+		 * @param blueMask the blue mask
+		 */
+		public PaletteData(int redMask, int greenMask, int blueMask) {
+			this.redMask = redMask;
+			this.greenMask = greenMask;
+			this.blueMask = blueMask;
+			this.isDirect = true;
+			this.redShift = shiftForMask(redMask);
+			this.greenShift = shiftForMask(greenMask);
+			this.blueShift = shiftForMask(blueMask);
+		}
 
-/**
- * Returns all the RGB values in the receiver if it is an
- * indexed palette, or null if it is a direct palette.
- *
- * @return the <code>RGB</code>s for the receiver or null
- */
-public RGB[] getRGBs() {
-	return colors;
-}
+		/**
+		 * Returns the pixel value corresponding to the given <code>RBG</code>.
+		 *
+		 * @param rgb the RGB to get the pixel value for
+		 * @return the pixel value for the given RGB
+		 * 
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if the RGB is not found in the palette</li>
+		 * </ul>
+		 */
+		public int getPixel(RGB rgb) {
+			if (rgb == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (isDirect) {
+				int pixel = 0;
+				pixel |= (redShift < 0 ? rgb.red << -redShift : rgb.red >>> redShift) & redMask;
+				pixel |= (greenShift < 0 ? rgb.green << -greenShift : rgb.green >>> greenShift) & greenMask;
+				pixel |= (blueShift < 0 ? rgb.blue << -blueShift : rgb.blue >>> blueShift) & blueMask;
+				return pixel;
+			}
 
-/**
- * Computes the shift value for a given mask.
- *
- * @param mask the mask to compute the shift for
- * @return the shift amount
- *
- * @see IconExe.PaletteData
- */
-int shiftForMask(int mask) {
-	for (int i = 31; i >= 0; i--) { 
-		if (((mask >> i) & 0x1) != 0) return 7 - i;
-	}
-	return 32;
-}
+			for (int i = 0; i < colors.length; i++) {
+				if (colors[i].equals(rgb))
+					return i;
+			}
+			/* The RGB did not exist in the palette */
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			return 0;
+		}
 
-}
-static class ImageLoader {
-	
-	/**
-	 * the array of ImageData objects in this ImageLoader.
-	 * This array is read in when the load method is called,
-	 * and it is written out when the save method is called
-	 */
-	public ImageData[] data;
-	
-	/**
-	 * the width of the logical screen on which the images
-	 * reside, in pixels (this corresponds to the GIF89a
-	 * Logical Screen Width value)
-	 */
-	public int logicalScreenWidth;
+		/**
+		 * Returns an <code>RGB</code> corresponding to the given pixel value.
+		 *
+		 * @param pixel the pixel to get the RGB value for
+		 * @return the RGB value for the given pixel
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if the pixel does not exist in the palette</li>
+		 * </ul>
+		 */
+		public RGB getRGB(int pixel) {
+			if (isDirect) {
+				int r = pixel & redMask;
+				r = (redShift < 0) ? r >>> -redShift : r << redShift;
+				int g = pixel & greenMask;
+				g = (greenShift < 0) ? g >>> -greenShift : g << greenShift;
+				int b = pixel & blueMask;
+				b = (blueShift < 0) ? b >>> -blueShift : b << blueShift;
+				return new RGB(r, g, b);
+			}
+			if (pixel < 0 || pixel >= colors.length) {
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			}
+			return colors[pixel];
+		}
 
-	/**
-	 * the height of the logical screen on which the images
-	 * reside, in pixels (this corresponds to the GIF89a
-	 * Logical Screen Height value)
-	 */
-	public int logicalScreenHeight;
+		/**
+		 * Returns all the RGB values in the receiver if it is an
+		 * indexed palette, or null if it is a direct palette.
+		 *
+		 * @return the <code>RGB</code>s for the receiver or null
+		 */
+		public RGB[] getRGBs() {
+			return colors;
+		}
 
-	/**
-	 * the background pixel for the logical screen (this 
-	 * corresponds to the GIF89a Background Color Index value).
-	 * The default is -1 which means 'unspecified background'
-	 * 
-	 */
-	public int backgroundPixel;
+		/**
+		 * Computes the shift value for a given mask.
+		 *
+		 * @param mask the mask to compute the shift for
+		 * @return the shift amount
+		 *
+		 * @see IconExe.PaletteData
+		 */
+		int shiftForMask(int mask) {
+			for (int i = 31; i >= 0; i--) {
+				if (((mask >> i) & 0x1) != 0)
+					return 7 - i;
+			}
+			return 32;
+		}
 
-	/**
-	 * the number of times to repeat the display of a sequence
-	 * of animated images (this corresponds to the commonly-used
-	 * GIF application extension for "NETSCAPE 2.0 01")
-	 */
-	public int repeatCount;
-		
-	/*
-	 * the set of ImageLoader event listeners, created on demand
-	 */
-	Vector imageLoaderListeners;
+	}
 
-/**
- * Construct a new empty ImageLoader.
- */
-public ImageLoader() {
-	reset();
-}
+	static class ImageLoader {
+
+		/**
+		 * the array of ImageData objects in this ImageLoader.
+		 * This array is read in when the load method is called,
+		 * and it is written out when the save method is called
+		 */
+		public ImageData[] data;
+
+		/**
+		 * the width of the logical screen on which the images
+		 * reside, in pixels (this corresponds to the GIF89a
+		 * Logical Screen Width value)
+		 */
+		public int logicalScreenWidth;
+
+		/**
+		 * the height of the logical screen on which the images
+		 * reside, in pixels (this corresponds to the GIF89a
+		 * Logical Screen Height value)
+		 */
+		public int logicalScreenHeight;
+
+		/**
+		 * the background pixel for the logical screen (this 
+		 * corresponds to the GIF89a Background Color Index value).
+		 * The default is -1 which means 'unspecified background'
+		 * 
+		 */
+		public int backgroundPixel;
+
+		/**
+		 * the number of times to repeat the display of a sequence
+		 * of animated images (this corresponds to the commonly-used
+		 * GIF application extension for "NETSCAPE 2.0 01")
+		 */
+		public int repeatCount;
+
+		/*
+		 * the set of ImageLoader event listeners, created on demand
+		 */
+		Vector<?> imageLoaderListeners;
+
+		/**
+		 * Construct a new empty ImageLoader.
+		 */
+		public ImageLoader() {
+			reset();
+		}
 
-/**
- * Resets the fields of the ImageLoader, except for the
- * <code>imageLoaderListeners</code> field.
- */
-void reset() {
-	data = null;
-	logicalScreenWidth = 0;
-	logicalScreenHeight = 0;
-	backgroundPixel = -1;
-	repeatCount = 1;
-}
+		/**
+		 * Resets the fields of the ImageLoader, except for the
+		 * <code>imageLoaderListeners</code> field.
+		 */
+		void reset() {
+			data = null;
+			logicalScreenWidth = 0;
+			logicalScreenHeight = 0;
+			backgroundPixel = -1;
+			repeatCount = 1;
+		}
 
-/**
- * Loads an array of <code>ImageData</code> objects from the
- * specified input stream. Throws an error if either an error
- * occurs while loading the images, or if the images are not
- * of a supported type. Returns the loaded image data array.
- *
- * @param stream the input stream to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified input stream
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO - if an input/output error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData[] load(InputStream stream) {
-	if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	reset();
-	data = FileFormat.load(stream, this);
-	return data;
-}
+		/**
+		 * Loads an array of <code>ImageData</code> objects from the
+		 * specified input stream. Throws an error if either an error
+		 * occurs while loading the images, or if the images are not
+		 * of a supported type. Returns the loaded image data array.
+		 *
+		 * @param stream the input stream to load the images from
+		 * @return an array of <code>ImageData</code> objects loaded from the specified input stream
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
+		 *    <li>ERROR_IO - if an input/output error occurs while reading data</li>
+		 *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
+		 * </ul>
+		 */
+		public ImageData[] load(InputStream stream) {
+			if (stream == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			reset();
+			data = FileFormat.load(stream, this);
+			return data;
+		}
 
-/**
- * Loads an array of <code>ImageData</code> objects from the
- * file with the specified name. Throws an error if either
- * an error occurs while loading the images, or if the images are
- * not of a supported type. Returns the loaded image data array.
- *
- * @param filename the name of the file to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified file
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO - if an IO error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData[] load(String filename) {
-	if (filename == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	InputStream stream = null;
-	try {
-		stream = new BufferedInputStream(new FileInputStream(filename));
-		return load(stream);
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	} finally {
-		try {
-			if (stream != null) stream.close();
-		} catch (IOException e) {
-			// Ignore error
+		/**
+		 * Loads an array of <code>ImageData</code> objects from the
+		 * file with the specified name. Throws an error if either
+		 * an error occurs while loading the images, or if the images are
+		 * not of a supported type. Returns the loaded image data array.
+		 *
+		 * @param filename the name of the file to load the images from
+		 * @return an array of <code>ImageData</code> objects loaded from the specified file
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
+		 *    <li>ERROR_IO - if an IO error occurs while reading data</li>
+		 *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
+		 * </ul>
+		 */
+		public ImageData[] load(String filename) {
+			if (filename == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			InputStream stream = null;
+			try {
+				stream = new BufferedInputStream(new FileInputStream(filename));
+				return load(stream);
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			} finally {
+				try {
+					if (stream != null)
+						stream.close();
+				} catch (IOException e) {
+					// Ignore error
+				}
+			}
+			return null;
 		}
 	}
-	return null;
-}
-}
-static class ImageData {
-	
-	/**
-	 * The width of the image, in pixels.
-	 */
-	public int width;
 
-	/**
-	 * The height of the image, in pixels.
-	 */
-	public int height;
+	static class ImageData {
+
+		/**
+		 * The width of the image, in pixels.
+		 */
+		public int width;
+
+		/**
+		 * The height of the image, in pixels.
+		 */
+		public int height;
+
+		/**
+		 * The color depth of the image, in bits per pixel.
+		 * <p>
+		 * Note that a depth of 8 or less does not necessarily
+		 * mean that the image is palette indexed, or
+		 * conversely that a depth greater than 8 means that
+		 * the image is direct color.  Check the associated
+		 * PaletteData's isDirect field for such determinations.
+		 */
+		public int depth;
+
+		/**
+		 * The scanline padding.
+		 * <p>
+		 * If one scanline of the image is not a multiple of
+		 * this number, it will be padded with zeros until it is.
+		 * </p>
+		 */
+		public int scanlinePad;
+
+		/**
+		 * The number of bytes per scanline.
+		 * <p>
+		 * This is a multiple of the scanline padding.
+		 * </p>
+		 */
+		public int bytesPerLine;
+
+		/**
+		 * The pixel data of the image.
+		 * <p>
+		 * Note that for 16 bit depth images the pixel data is stored
+		 * in least significant byte order; however, for 24bit and
+		 * 32bit depth images the pixel data is stored in most
+		 * significant byte order.
+		 * </p>
+		 */
+		public byte[] data;
+
+		/**
+		 * The color table for the image.
+		 */
+		public PaletteData palette;
+
+		/**
+		 * The transparent pixel.
+		 * <p>
+		 * Pixels with this value are transparent.
+		 * </p><p>
+		 * The default is -1 which means 'no transparent pixel'.
+		 * </p>
+		 */
+		public int transparentPixel;
+
+		/**
+		 * An icon-specific field containing the data from the icon mask.
+		 * <p>
+		 * This is a 1 bit bitmap stored with the most significant
+		 * bit first.  The number of bytes per scanline is
+		 * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.
+		 * </p><p>
+		 * The default is null which means 'no transparency mask'.
+		 * </p>
+		 */
+		public byte[] maskData;
+
+		/**
+		 * An icon-specific field containing the scanline pad of the mask.
+		 * <p>
+		 * If one scanline of the transparency mask is not a
+		 * multiple of this number, it will be padded with zeros until
+		 * it is.
+		 * </p>
+		 */
+		public int maskPad;
+
+		/**
+		 * The alpha data of the image.
+		 * <p>
+		 * Every pixel can have an <em>alpha blending</em> value that
+		 * varies from 0, meaning fully transparent, to 255 meaning
+		 * fully opaque.  The number of bytes per scanline is
+		 * 'width'.
+		 * </p>
+		 */
+		public byte[] alphaData;
+
+		/**
+		 * The global alpha value to be used for every pixel.
+		 * <p>
+		 * If this value is set, the <code>alphaData</code> field
+		 * is ignored and when the image is rendered each pixel
+		 * will be blended with the background an amount
+		 * proportional to this value.
+		 * </p><p>
+		 * The default is -1 which means 'no global alpha value'
+		 * </p>
+		 */
+		public int alpha;
+
+		/**
+		 * The type of file from which the image was read.
+		 * 
+		 * It is expressed as one of the following values:
+		 * <dl>
+		 * <dt><code>IMAGE_BMP</code></dt>
+		 * <dd>Windows BMP file format, no compression</dd>
+		 * <dt><code>IMAGE_BMP_RLE</code></dt>
+		 * <dd>Windows BMP file format, RLE compression if appropriate</dd>
+		 * <dt><code>IMAGE_GIF</code></dt>
+		 * <dd>GIF file format</dd>
+		 * <dt><code>IMAGE_ICO</code></dt>
+		 * <dd>Windows ICO file format</dd>
+		 * <dt><code>IMAGE_JPEG</code></dt>
+		 * <dd>JPEG file format</dd>
+		 * <dt><code>IMAGE_PNG</code></dt>
+		 * <dd>PNG file format</dd>
+		 * </dl>
+		 */
+		public int type;
+
+		/**
+		 * The x coordinate of the top left corner of the image
+		 * within the logical screen (this field corresponds to
+		 * the GIF89a Image Left Position value).
+		 */
+		public int x;
+
+		/**
+		 * The y coordinate of the top left corner of the image
+		 * within the logical screen (this field corresponds to
+		 * the GIF89a Image Top Position value).
+		 */
+		public int y;
+
+		/**
+		 * A description of how to dispose of the current image
+		 * before displaying the next.
+		 * 
+		 * It is expressed as one of the following values:
+		 * <dl>
+		 * <dt><code>DM_UNSPECIFIED</code></dt>
+		 * <dd>disposal method not specified</dd>
+		 * <dt><code>DM_FILL_NONE</code></dt>
+		 * <dd>do nothing - leave the image in place</dd>
+		 * <dt><code>DM_FILL_BACKGROUND</code></dt>
+		 * <dd>fill with the background color</dd>
+		 * <dt><code>DM_FILL_PREVIOUS</code></dt>
+		 * <dd>restore the previous picture</dd>
+		 * </dl>
+		 * (this field corresponds to the GIF89a Disposal Method value)
+		 */
+		public int disposalMethod;
+
+		/**
+		 * The time to delay before displaying the next image
+		 * in an animation (this field corresponds to the GIF89a
+		 * Delay Time value).
+		 */
+		public int delayTime;
+
+		/**
+		 * Arbitrary channel width data to 8-bit conversion table.
+		 */
+		static final byte[][] ANY_TO_EIGHT = new byte[9][];
+		static {
+			for (int b = 0; b < 9; ++b) {
+				byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
+				if (b == 0)
+					continue;
+				int inc = 0;
+				for (int bit = 0x10000; (bit >>= b) != 0;)
+					inc |= bit;
+				for (int v = 0, p = 0; v < 0x10000; v += inc)
+					data[p++] = (byte) (v >> 8);
+			}
+		}
+		static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
+
+		/**
+		 * Scaled 8x8 Bayer dither matrix.
+		 */
+		static final int[][] DITHER_MATRIX = { {0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000}, {0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000}, {0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000}, {0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000}, {0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000}, {0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000}, {0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000}, {0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000}};
+
+		/**
+		 * Constructs a new, empty ImageData with the given width, height,
+		 * depth and palette. The data will be initialized to an (all zero)
+		 * array of the appropriate size.
+		 *
+		 * @param width the width of the image
+		 * @param height the height of the image
+		 * @param depth the depth of the image
+		 * @param palette the palette of the image (must not be null)
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
+		 *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
+		 *    <li>ERROR_NULL_ARGUMENT - if the palette is null</li>
+		 * </ul>
+		 */
+		public ImageData(int width, int height, int depth, PaletteData palette) {
+			this(width, height, depth, palette, 4, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
+		}
 
-	/**
-	 * The color depth of the image, in bits per pixel.
-	 * <p>
-	 * Note that a depth of 8 or less does not necessarily
-	 * mean that the image is palette indexed, or
-	 * conversely that a depth greater than 8 means that
-	 * the image is direct color.  Check the associated
-	 * PaletteData's isDirect field for such determinations.
-	 */
-	public int depth;
+		/**
+		 * Constructs a new, empty ImageData with the given width, height,
+		 * depth, palette, scanlinePad and data.
+		 *
+		 * @param width the width of the image
+		 * @param height the height of the image
+		 * @param depth the depth of the image
+		 * @param palette the palette of the image
+		 * @param scanlinePad the padding of each line, in bytes
+		 * @param data the data of the image
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
+		 *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
+		 *    <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li>
+		 *    <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li>
+		 * </ul>
+		 */
+		public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {
+			this(width, height, depth, palette, scanlinePad, checkData(data), 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
+		}
 
-	/**
-	 * The scanline padding.
-	 * <p>
-	 * If one scanline of the image is not a multiple of
-	 * this number, it will be padded with zeros until it is.
-	 * </p>
-	 */
-	public int scanlinePad;
+		/**
+		 * Constructs an <code>ImageData</code> loaded from a file with the
+		 * specified name. Throws an error if an error occurs loading the
+		 * image, or if the image has an unsupported type.
+		 * <p>
+		 * This constructor is provided for convenience when loading a single
+		 * image only. If the file contains multiple images, only the first
+		 * one will be loaded. To load multiple images, use 
+		 * <code>ImageLoader.load()</code>.
+		 * </p>
+		 *
+		 * @param filename the name of the file to load the image from (must not be null)
+		 *
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
+		 *    <li>ERROR_IO if an IO error occurs while reading data</li>
+		 *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
+		 * </ul>
+		 */
+		public ImageData(String filename) {
+			ImageData[] data = new ImageLoader().load(filename);
+			if (data.length < 1)
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			ImageData i = data[0];
+			setAllFields(i.width, i.height, i.depth, i.scanlinePad, i.bytesPerLine, i.data, i.palette, i.transparentPixel, i.maskData, i.maskPad, i.alphaData, i.alpha, i.type, i.x, i.y, i.disposalMethod, i.delayTime);
+		}
 
-	/**
-	 * The number of bytes per scanline.
-	 * <p>
-	 * This is a multiple of the scanline padding.
-	 * </p>
-	 */
-	public int bytesPerLine;
-
-	/**
-	 * The pixel data of the image.
-	 * <p>
-	 * Note that for 16 bit depth images the pixel data is stored
-	 * in least significant byte order; however, for 24bit and
-	 * 32bit depth images the pixel data is stored in most
-	 * significant byte order.
-	 * </p>
-	 */
-	public byte[] data;
-
-	/**
-	 * The color table for the image.
-	 */
-	public PaletteData palette;
-
-	/**
-	 * The transparent pixel.
-	 * <p>
-	 * Pixels with this value are transparent.
-	 * </p><p>
-	 * The default is -1 which means 'no transparent pixel'.
-	 * </p>
-	 */
-	public int transparentPixel;
-
-	/**
-	 * An icon-specific field containing the data from the icon mask.
-	 * <p>
-	 * This is a 1 bit bitmap stored with the most significant
-	 * bit first.  The number of bytes per scanline is
-	 * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.
-	 * </p><p>
-	 * The default is null which means 'no transparency mask'.
-	 * </p>
-	 */
-	public byte[] maskData;
-
-	/**
-	 * An icon-specific field containing the scanline pad of the mask.
-	 * <p>
-	 * If one scanline of the transparency mask is not a
-	 * multiple of this number, it will be padded with zeros until
-	 * it is.
-	 * </p>
-	 */
-	public int maskPad;
-	
-	/**
-	 * The alpha data of the image.
-	 * <p>
-	 * Every pixel can have an <em>alpha blending</em> value that
-	 * varies from 0, meaning fully transparent, to 255 meaning
-	 * fully opaque.  The number of bytes per scanline is
-	 * 'width'.
-	 * </p>
-	 */
-	public byte[] alphaData;
-	
-	/**
-	 * The global alpha value to be used for every pixel.
-	 * <p>
-	 * If this value is set, the <code>alphaData</code> field
-	 * is ignored and when the image is rendered each pixel
-	 * will be blended with the background an amount
-	 * proportional to this value.
-	 * </p><p>
-	 * The default is -1 which means 'no global alpha value'
-	 * </p>
-	 */
-	public int alpha;
-
-	/**
-	 * The type of file from which the image was read.
-	 * 
-	 * It is expressed as one of the following values:
-	 * <dl>
-	 * <dt><code>IMAGE_BMP</code></dt>
-	 * <dd>Windows BMP file format, no compression</dd>
-	 * <dt><code>IMAGE_BMP_RLE</code></dt>
-	 * <dd>Windows BMP file format, RLE compression if appropriate</dd>
-	 * <dt><code>IMAGE_GIF</code></dt>
-	 * <dd>GIF file format</dd>
-	 * <dt><code>IMAGE_ICO</code></dt>
-	 * <dd>Windows ICO file format</dd>
-	 * <dt><code>IMAGE_JPEG</code></dt>
-	 * <dd>JPEG file format</dd>
-	 * <dt><code>IMAGE_PNG</code></dt>
-	 * <dd>PNG file format</dd>
-	 * </dl>
-	 */
-	public int type;
-
-	/**
-	 * The x coordinate of the top left corner of the image
-	 * within the logical screen (this field corresponds to
-	 * the GIF89a Image Left Position value).
-	 */
-	public int x;
-
-	/**
-	 * The y coordinate of the top left corner of the image
-	 * within the logical screen (this field corresponds to
-	 * the GIF89a Image Top Position value).
-	 */
-	public int y;
-
-	/**
-	 * A description of how to dispose of the current image
-	 * before displaying the next.
-	 * 
-	 * It is expressed as one of the following values:
-	 * <dl>
-	 * <dt><code>DM_UNSPECIFIED</code></dt>
-	 * <dd>disposal method not specified</dd>
-	 * <dt><code>DM_FILL_NONE</code></dt>
-	 * <dd>do nothing - leave the image in place</dd>
-	 * <dt><code>DM_FILL_BACKGROUND</code></dt>
-	 * <dd>fill with the background color</dd>
-	 * <dt><code>DM_FILL_PREVIOUS</code></dt>
-	 * <dd>restore the previous picture</dd>
-	 * </dl>
-	 * (this field corresponds to the GIF89a Disposal Method value)
-	 */
-	public int disposalMethod;
-
-	/**
-	 * The time to delay before displaying the next image
-	 * in an animation (this field corresponds to the GIF89a
-	 * Delay Time value).
-	 */
-	public int delayTime;
-
-	/**
-	 * Arbitrary channel width data to 8-bit conversion table.
-	 */
-	static final byte[][] ANY_TO_EIGHT = new byte[9][];
-	static {
-		for (int b = 0; b < 9; ++b) {
-			byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
-			if (b == 0) continue;
-			int inc = 0;
-			for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;
-			for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = (byte)(v >> 8);
+		/**
+		 * Prevents uninitialized instances from being created outside the package.
+		 */
+		ImageData() {
+			//empty constructor
 		}
-	}
-	static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
-
-	/**
-	 * Scaled 8x8 Bayer dither matrix.
-	 */
-	static final int[][] DITHER_MATRIX = {
-		{ 0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000 },
-		{ 0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000 },
-		{ 0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000 },
-		{ 0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000 },
-		{ 0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000 },
-		{ 0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000 },
-		{ 0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000 },
-		{ 0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000 }
-	};
-
-/**
- * Constructs a new, empty ImageData with the given width, height,
- * depth and palette. The data will be initialized to an (all zero)
- * array of the appropriate size.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
- *    <li>ERROR_NULL_ARGUMENT - if the palette is null</li>
- * </ul>
- */
-public ImageData(int width, int height, int depth, PaletteData palette) {
-	this(width, height, depth, palette,
-		4, null, 0, null,
-		null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-}
-
-/**
- * Constructs a new, empty ImageData with the given width, height,
- * depth, palette, scanlinePad and data.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image
- * @param scanlinePad the padding of each line, in bytes
- * @param data the data of the image
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
- *    <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li>
- *    <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li>
- * </ul>
- */
-public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {
-	this(width, height, depth, palette,
-		scanlinePad, checkData(data), 0, null,
-		null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-}
-
-/**
- * Constructs an <code>ImageData</code> loaded from a file with the
- * specified name. Throws an error if an error occurs loading the
- * image, or if the image has an unsupported type.
- * <p>
- * This constructor is provided for convenience when loading a single
- * image only. If the file contains multiple images, only the first
- * one will be loaded. To load multiple images, use 
- * <code>ImageLoader.load()</code>.
- * </p>
- *
- * @param filename the name of the file to load the image from (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO if an IO error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData(String filename) {
-	ImageData[] data = new ImageLoader().load(filename);
-	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
-	ImageData i = data[0];
-	setAllFields(
-		i.width,
-		i.height,
-		i.depth,
-		i.scanlinePad,
-		i.bytesPerLine,
-		i.data,
-		i.palette,
-		i.transparentPixel,
-		i.maskData,
-		i.maskPad,
-		i.alphaData,
-		i.alpha,
-		i.type,
-		i.x,
-		i.y,
-		i.disposalMethod,
-		i.delayTime);
-}
 
-/**
- * Prevents uninitialized instances from being created outside the package.
- */
-ImageData() {
-	//empty constructor
-}
+		/**
+		 * Constructs an image data by giving values for all non-computable fields.
+		 * <p>
+		 * This method is for internal use, and is not described further.
+		 * </p>
+		 */
+		ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime) {
+
+			if (palette == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8 || depth == 16 || depth == 24 || depth == 32)) {
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			}
+			if (width <= 0 || height <= 0) {
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			}
+			if (scanlinePad == 0)
+				SWT.error(SWT.ERROR_CANNOT_BE_ZERO);
 
-/**
- * Constructs an image data by giving values for all non-computable fields.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-ImageData(
-	int width, int height, int depth, PaletteData palette,
-	int scanlinePad, byte[] data, int maskPad, byte[] maskData,
-	byte[] alphaData, int alpha, int transparentPixel, int type,
-	int x, int y, int disposalMethod, int delayTime)
-{
-
-	if (palette == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8
-		|| depth == 16 || depth == 24 || depth == 32)) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	}
-	if (width <= 0 || height <= 0) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	}
-	if (scanlinePad == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);
-
-	int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1))
-		/ scanlinePad * scanlinePad;
-	setAllFields(
-		width,
-		height,
-		depth,
-		scanlinePad,
-		bytesPerLine,
-		data != null ? data : new byte[bytesPerLine * height],
-		palette,
-		transparentPixel,
-		maskData,
-		maskPad,
-		alphaData,
-		alpha,
-		type,
-		x,
-		y,
-		disposalMethod,
-		delayTime);
-}
+			int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1)) / scanlinePad * scanlinePad;
+			setAllFields(width, height, depth, scanlinePad, bytesPerLine, data != null ? data : new byte[bytesPerLine * height], palette, transparentPixel, maskData, maskPad, alphaData, alpha, type, x, y, disposalMethod, delayTime);
+		}
 
-/**
- * Initializes all fields in the receiver. This method must be called
- * by all public constructors to ensure that all fields are initialized
- * for a new ImageData object. If a new field is added to the class,
- * then it must be added to this method.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-void setAllFields(int width, int height, int depth, int scanlinePad,
-	int bytesPerLine, byte[] data, PaletteData palette, int transparentPixel,
-	byte[] maskData, int maskPad, byte[] alphaData, int alpha,
-	int type, int x, int y, int disposalMethod, int delayTime) {
-
-	this.width = width;
-	this.height = height;
-	this.depth = depth;
-	this.scanlinePad = scanlinePad;
-	this.bytesPerLine = bytesPerLine;
-	this.data = data;
-	this.palette = palette;
-	this.transparentPixel = transparentPixel;
-	this.maskData = maskData;
-	this.maskPad = maskPad;
-	this.alphaData = alphaData;
-	this.alpha = alpha;
-	this.type = type;
-	this.x = x;
-	this.y = y;
-	this.disposalMethod = disposalMethod;
-	this.delayTime = delayTime;
-}
+		/**
+		 * Initializes all fields in the receiver. This method must be called
+		 * by all public constructors to ensure that all fields are initialized
+		 * for a new ImageData object. If a new field is added to the class,
+		 * then it must be added to this method.
+		 * <p>
+		 * This method is for internal use, and is not described further.
+		 * </p>
+		 */
+		void setAllFields(int width, int height, int depth, int scanlinePad, int bytesPerLine, byte[] data, PaletteData palette, int transparentPixel, byte[] maskData, int maskPad, byte[] alphaData, int alpha, int type, int x, int y, int disposalMethod, int delayTime) {
+
+			this.width = width;
+			this.height = height;
+			this.depth = depth;
+			this.scanlinePad = scanlinePad;
+			this.bytesPerLine = bytesPerLine;
+			this.data = data;
+			this.palette = palette;
+			this.transparentPixel = transparentPixel;
+			this.maskData = maskData;
+			this.maskPad = maskPad;
+			this.alphaData = alphaData;
+			this.alpha = alpha;
+			this.type = type;
+			this.x = x;
+			this.y = y;
+			this.disposalMethod = disposalMethod;
+			this.delayTime = delayTime;
+		}
 
-/**	 
- * Invokes internal SWT functionality to create a new instance of
- * this class.
- * <p>
- * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- * API for <code>ImageData</code>. It is marked public only so that it
- * can be shared within the packages provided by SWT. It is subject
- * to change without notice, and should never be called from
- * application code.
- * </p>
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-public static ImageData internal_new(
-	int width, int height, int depth, PaletteData palette,
-	int scanlinePad, byte[] data, int maskPad, byte[] maskData,
-	byte[] alphaData, int alpha, int transparentPixel, int type,
-	int x, int y, int disposalMethod, int delayTime)
-{
-	return new ImageData(
-		width, height, depth, palette, scanlinePad, data, maskPad, maskData,
-		alphaData, alpha, transparentPixel, type, x, y, disposalMethod, delayTime);
-}
+		/**	 
+		 * Invokes internal SWT functionality to create a new instance of
+		 * this class.
+		 * <p>
+		 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+		 * API for <code>ImageData</code>. It is marked public only so that it
+		 * can be shared within the packages provided by SWT. It is subject
+		 * to change without notice, and should never be called from
+		 * application code.
+		 * </p>
+		 * <p>
+		 * This method is for internal use, and is not described further.
+		 * </p>
+		 */
+		public static ImageData internal_new(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime) {
+			return new ImageData(width, height, depth, palette, scanlinePad, data, maskPad, maskData, alphaData, alpha, transparentPixel, type, x, y, disposalMethod, delayTime);
+		}
 
-ImageData colorMaskImage(int pixel) {
-	ImageData mask = new ImageData(width, height, 1, bwPalette(),
-		2, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-	int[] row = new int[width];
-	for (int y = 0; y < height; y++) {
-		getPixels(0, y, width, row, 0);
-		for (int i = 0; i < width; i++) {
-			if (pixel != -1 && row[i] == pixel) {
-				row[i] = 0;
-			} else {
-				row[i] = 1;
+		ImageData colorMaskImage(int pixel) {
+			ImageData mask = new ImageData(width, height, 1, bwPalette(), 2, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
+			int[] row = new int[width];
+			for (int y = 0; y < height; y++) {
+				getPixels(0, y, width, row, 0);
+				for (int i = 0; i < width; i++) {
+					if (pixel != -1 && row[i] == pixel) {
+						row[i] = 0;
+					} else {
+						row[i] = 1;
+					}
+				}
+				mask.setPixels(0, y, width, row, 0);
 			}
+			return mask;
 		}
-		mask.setPixels(0, y, width, row, 0);
-	}
-	return mask;
-}
 
-static byte[] checkData(byte [] data) {
-	if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	return data;
-}
+		static byte[] checkData(byte[] data) {
+			if (data == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			return data;
+		}
 
-/**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the byte array to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4 or 8
- *        (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
-public void getPixels(int x, int y, int getWidth, byte[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error
-
-(SWT.ERROR_INVALID_ARGUMENT);
-	if (getWidth == 0) return;
-	int index;
-	int theByte;
-	int mask = 0;
-	int n = getWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		theByte = data[index] & 0xFF;
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((theByte & mask) == 0) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-					if (n > 0) theByte = data[index] & 0xFF;
+		/**
+		 * Returns <code>getWidth</code> pixel values starting at offset
+		 * <code>x</code> in scanline <code>y</code> in the receiver's
+		 * data starting at <code>startIndex</code>.
+		 *
+		 * @param x the x position of the first pixel to get
+		 * @param y the y position of the first pixel to get
+		 * @param getWidth the width of the data to get
+		 * @param pixels the buffer in which to put the pixels
+		 * @param startIndex the offset into the byte array to begin storing pixels
+		 *
+		 * @exception IndexOutOfBoundsException if getWidth is too large
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4 or 8
+		 *        (For higher depths, use the int[] version of this method.)</li>
+		 * </ul>
+		 */
+		public void getPixels(int x, int y, int getWidth, byte[] pixels, int startIndex) {
+			if (pixels == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
+				SWT.error
+
+				(SWT.ERROR_INVALID_ARGUMENT);
+			if (getWidth == 0)
+				return;
+			int index;
+			int theByte;
+			int mask = 0;
+			int n = getWidth;
+			int i = startIndex;
+			int srcX = x, srcY = y;
+			if (depth == 1) {
+				index = (y * bytesPerLine) + (x >> 3);
+				theByte = data[index] & 0xFF;
+				while (n > 0) {
+					mask = 1 << (7 - (srcX & 0x7));
+					if ((theByte & mask) == 0) {
+						pixels[i] = 0;
+					} else {
+						pixels[i] = 1;
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						if (n > 0)
+							theByte = data[index] & 0xFF;
+						srcX = 0;
+					} else {
+						if (mask == 1) {
+							index++;
+							if (n > 0)
+								theByte = data[index] & 0xFF;
+						}
+					}
 				}
+				return;
 			}
-		}
-		return;
-	}
-	if (depth == 2) {
-		index = (y * bytesPerLine) + (x >> 2);
-		theByte = data[index] & 0xFF;
-		int offset;
-		while (n > 0) {
-			offset = 3 - (srcX % 4);
-			mask = 3 << (offset * 2);
-			pixels[i] = (byte)((theByte & mask) >> (offset * 2));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					theByte = data[index] & 0xFF;
+			if (depth == 2) {
+				index = (y * bytesPerLine) + (x >> 2);
+				theByte = data[index] & 0xFF;
+				int offset;
+				while (n > 0) {
+					offset = 3 - (srcX % 4);
+					mask = 3 << (offset * 2);
+					pixels[i] = (byte) ((theByte & mask) >> (offset * 2));
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						if (n > 0)
+							theByte = data[index] & 0xFF;
+						srcX = 0;
+					} else {
+						if (offset == 0) {
+							index++;
+							theByte = data[index] & 0xFF;
+						}
+					}
 				}
+				return;
 			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		if ((x & 0x1) == 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte & 0x0F);
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		while (n > 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte >> 4);
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				pixels[i] = (byte)(theByte & 0x0F);
-				i++;
-				n--;
-				srcX++;
-				if (srcX >= width) {
-					srcY++;
-					index = srcY * bytesPerLine;
-					srcX = 0;
-				} else {
-					index++;
+			if (depth == 4) {
+				index = (y * bytesPerLine) + (x >> 1);
+				if ((x & 0x1) == 1) {
+					theByte = data[index] & 0xFF;
+					pixels[i] = (byte) (theByte & 0x0F);
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
 				}
+				while (n > 1) {
+					theByte = data[index] & 0xFF;
+					pixels[i] = (byte) (theByte >> 4);
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						pixels[i] = (byte) (theByte & 0x0F);
+						i++;
+						n--;
+						srcX++;
+						if (srcX >= width) {
+							srcY++;
+							index = srcY * bytesPerLine;
+							srcX = 0;
+						} else {
+							index++;
+						}
+					}
+				}
+				if (n > 0) {
+					theByte = data[index] & 0xFF;
+					pixels[i] = (byte) (theByte >> 4);
+				}
+				return;
 			}
-		}
-		if (n > 0) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte >> 4);
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = data[index];
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
+			if (depth == 8) {
+				index = (y * bytesPerLine) + x;
+				for (int j = 0; j < getWidth; j++) {
+					pixels[i] = data[index];
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
+				}
+				return;
 			}
+			SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
 		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
 
-/**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the buffer to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
-public void getPixels(int x, int y, int getWidth, int[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error
-
-(SWT.ERROR_INVALID_ARGUMENT);
-	if (getWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = getWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		theByte = data[index] & 0xFF;
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((theByte & mask) == 0) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-					if (n > 0) theByte = data[index] & 0xFF;
+		/**
+		 * Returns <code>getWidth</code> pixel values starting at offset
+		 * <code>x</code> in scanline <code>y</code> in the receiver's
+		 * data starting at <code>startIndex</code>.
+		 *
+		 * @param x the x position of the first pixel to get
+		 * @param y the y position of the first pixel to get
+		 * @param getWidth the width of the data to get
+		 * @param pixels the buffer in which to put the pixels
+		 * @param startIndex the offset into the buffer to begin storing pixels
+		 *
+		 * @exception IndexOutOfBoundsException if getWidth is too large
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
+		 * </ul>
+		 */
+		public void getPixels(int x, int y, int getWidth, int[] pixels, int startIndex) {
+			if (pixels == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
+				SWT.error
+
+				(SWT.ERROR_INVALID_ARGUMENT);
+			if (getWidth == 0)
+				return;
+			int index;
+			int theByte;
+			int mask;
+			int n = getWidth;
+			int i = startIndex;
+			int srcX = x, srcY = y;
+			if (depth == 1) {
+				index = (y * bytesPerLine) + (x >> 3);
+				theByte = data[index] & 0xFF;
+				while (n > 0) {
+					mask = 1 << (7 - (srcX & 0x7));
+					if ((theByte & mask) == 0) {
+						pixels[i] = 0;
+					} else {
+						pixels[i] = 1;
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						if (n > 0)
+							theByte = data[index] & 0xFF;
+						srcX = 0;
+					} else {
+						if (mask == 1) {
+							index++;
+							if (n > 0)
+								theByte = data[index] & 0xFF;
+						}
+					}
 				}
+				return;
 			}
-		}
-		return;
-	}		
-	if (depth == 2) {
-		index = (y * bytesPerLine) + (x >> 2);
-		theByte = data[index] & 0xFF;
-		int offset;
-		while (n > 0) {
-			offset = 3 - (srcX % 4);
-			mask = 3 << (offset * 2);
-			pixels[i] = (byte)((theByte & mask) >> (offset * 2));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
+			if (depth == 2) {
+				index = (y * bytesPerLine) + (x >> 2);
+				theByte = data[index] & 0xFF;
+				int offset;
+				while (n > 0) {
+					offset = 3 - (srcX % 4);
+					mask = 3 << (offset * 2);
+					pixels[i] = (byte) ((theByte & mask) >> (offset * 2));
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						if (n > 0)
+							theByte = data[index] & 0xFF;
+						srcX = 0;
+					} else {
+						if (offset == 0) {
+							index++;
+							theByte = data[index] & 0xFF;
+						}
+					}
+				}
+				return;
+			}
+			if (depth == 4) {
+				index = (y * bytesPerLine) + (x >> 1);
+				if ((x & 0x1) == 1) {
+					theByte = data[index] & 0xFF;
+					pixels[i] = theByte & 0x0F;
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
+				}
+				while (n > 1) {
 					theByte = data[index] & 0xFF;
+					pixels[i] = theByte >> 4;
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						pixels[i] = theByte & 0x0F;
+						i++;
+						n--;
+						srcX++;
+						if (srcX >= width) {
+							srcY++;
+							index = srcY * bytesPerLine;
+							srcX = 0;
+						} else {
+							index++;
+						}
+					}
+				}
+				if (n > 0) {
+					theByte = data[index] & 0xFF;
+					pixels[i] = theByte >> 4;
 				}
+				return;
 			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		if ((x & 0x1) == 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte & 0x0F;
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		while (n > 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte >> 4;
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				pixels[i] = theByte & 0x0F;
-				i++;
-				n--;
-				srcX++;
-				if (srcX >= width) {
-					srcY++;
-					index = srcY * bytesPerLine;
-					srcX = 0;
-				} else {
-					index++;
+			if (depth == 8) {
+				index = (y * bytesPerLine) + x;
+				for (int j = 0; j < getWidth; j++) {
+					pixels[i] = data[index] & 0xFF;
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
+				}
+				return;
+			}
+			if (depth == 16) {
+				index = (y * bytesPerLine) + (x * 2);
+				for (int j = 0; j < getWidth; j++) {
+					pixels[i] = ((data[index + 1] & 0xFF) << 8) + (data[index] & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 2;
+					}
+				}
+				return;
+			}
+			if (depth == 24) {
+				index = (y * bytesPerLine) + (x * 3);
+				for (int j = 0; j < getWidth; j++) {
+					pixels[i] = ((data[index] & 0xFF) << 16) | ((data[index + 1] & 0xFF) << 8) | (data[index + 2] & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 3;
+					}
+				}
+				return;
+			}
+			if (depth == 32) {
+				index = (y * bytesPerLine) + (x * 4);
+				i = startIndex;
+				for (int j = 0; j < getWidth; j++) {
+					pixels[i] = ((data[index] & 0xFF) << 24) | ((data[index + 1] & 0xFF) << 16) | ((data[index + 2] & 0xFF) << 8) | (data[index + 3] & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 4;
+					}
 				}
+				return;
 			}
+			SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
 		}
-		if (n > 0) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte >> 4;
+
+		/**
+		 * Returns an array of <code>RGB</code>s which comprise the
+		 * indexed color table of the receiver, or null if the receiver
+		 * has a direct color model.
+		 *
+		 * @return the RGB values for the image or null if direct color
+		 *
+		 * @see IconExe.PaletteData#getRGBs()
+		 */
+		public RGB[] getRGBs() {
+			return palette.getRGBs();
 		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = data[index] & 0xFF;
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
+
+		/**
+		 * Returns an <code>ImageData</code> which specifies the
+		 * transparency mask information for the receiver, or null if the
+		 * receiver has no transparency and is not an icon.
+		 *
+		 * @return the transparency mask or null if none exists
+		 */
+		public ImageData getTransparencyMask() {
+			if (getTransparencyType() == SWT.TRANSPARENCY_MASK) {
+				return new ImageData(width, height, 1, bwPalette(), maskPad, maskData);
 			}
+			return colorMaskImage(transparentPixel);
 		}
-		return;
-	}
-	if (depth == 16) {
-		index = (y * bytesPerLine) + (x * 2);
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index+1] & 0xFF) << 8) + (data[index] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 2;
-			}
-		}
-		return;
-	}
-	if (depth == 24) {
-		index = (y * bytesPerLine) + (x * 3);
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index] & 0xFF) << 16) | ((data[index+1] & 0xFF) << 8)
-				| (data[index+2] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 3;
-			}
-		}
-		return;
-	}
-	if (depth == 32) {
-		index = (y * bytesPerLine) + (x * 4);
-		i = startIndex;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index] & 0xFF) << 24) | ((data[index+1] & 0xFF) << 16)
-				| ((data[index+2] & 0xFF) << 8) | (data[index+3] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 4;
+
+		/**
+		 * Returns the image transparency type.
+		 *
+		 * @return the receiver's transparency type
+		 */
+		public int getTransparencyType() {
+			if (maskData != null)
+				return SWT.TRANSPARENCY_MASK;
+			if (transparentPixel != -1)
+				return SWT.TRANSPARENCY_PIXEL;
+			if (alphaData != null)
+				return SWT.TRANSPARENCY_ALPHA;
+			return SWT.TRANSPARENCY_NONE;
+		}
+
+		/**
+		 * Returns the byte order of the receiver.
+		 * 
+		 * @return MSB_FIRST or LSB_FIRST
+		 */
+		int getByteOrder() {
+			return depth != 16 ? MSB_FIRST : LSB_FIRST;
+		}
+
+		/**
+		 * Sets the pixel values starting at offset <code>x</code> in
+		 * scanline <code>y</code> in the receiver's data to the
+		 * values from the array <code>pixels</code> starting at
+		 * <code>startIndex</code>.
+		 *
+		 * @param x the x position of the pixel to set
+		 * @param y the y position of the pixel to set
+		 * @param putWidth the width of the pixels to set
+		 * @param pixels the pixels to set
+		 * @param startIndex the index at which to begin setting
+		 *
+		 * @exception IndexOutOfBoundsException if putWidth is too large
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8
+		 *        (For higher depths, use the int[] version of this method.)</li>
+		 * </ul>
+		 */
+		public void setPixels(int x, int y, int putWidth, byte[] pixels, int startIndex) {
+			if (pixels == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			if (putWidth == 0)
+				return;
+			int index;
+			int theByte;
+			int mask;
+			int n = putWidth;
+			int i = startIndex;
+			int srcX = x, srcY = y;
+			if (depth == 1) {
+				index = (y * bytesPerLine) + (x >> 3);
+				while (n > 0) {
+					mask = 1 << (7 - (srcX & 0x7));
+					if ((pixels[i] & 0x1) == 1) {
+						data[index] = (byte) ((data[index] & 0xFF) | mask);
+					} else {
+						data[index] = (byte) ((data[index] & 0xFF) & (mask ^ -1));
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						if (mask == 1) {
+							index++;
+						}
+					}
+				}
+				return;
+			}
+			if (depth == 2) {
+				byte[] masks = {(byte) 0xFC, (byte) 0xF3, (byte) 0xCF, (byte) 0x3F};
+				index = (y * bytesPerLine) + (x >> 2);
+				int offset = 3 - (x % 4);
+				while (n > 0) {
+					theByte = pixels[i] & 0x3;
+					data[index] = (byte) ((data[index] & masks[offset]) | (theByte << (offset * 2)));
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						offset = 0;
+						srcX = 0;
+					} else {
+						if (offset == 0) {
+							index++;
+							offset = 3;
+						} else {
+							offset--;
+						}
+					}
+				}
+				return;
 			}
+			if (depth == 4) {
+				index = (y * bytesPerLine) + (x >> 1);
+				boolean high = (x & 0x1) == 0;
+				while (n > 0) {
+					theByte = pixels[i] & 0x0F;
+					if (high) {
+						data[index] = (byte) ((data[index] & 0x0F) | (theByte << 4));
+					} else {
+						data[index] = (byte) ((data[index] & 0xF0) | theByte);
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						high = true;
+						srcX = 0;
+					} else {
+						if (!high)
+							index++;
+						high = !high;
+					}
+				}
+				return;
+			}
+			if (depth == 8) {
+				index = (y * bytesPerLine) + x;
+				for (int j = 0; j < putWidth; j++) {
+					data[index] = (byte) (pixels[i] & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
+				}
+				return;
+			}
+			SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
 		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
 
-/**
- * Returns an array of <code>RGB</code>s which comprise the
- * indexed color table of the receiver, or null if the receiver
- * has a direct color model.
- *
- * @return the RGB values for the image or null if direct color
- *
- * @see IconExe.PaletteData#getRGBs()
- */
-public RGB[] getRGBs() {
-	return palette.getRGBs();
-}
+		/**
+		 * Sets the pixel values starting at offset <code>x</code> in
+		 * scanline <code>y</code> in the receiver's data to the
+		 * values from the array <code>pixels</code> starting at
+		 * <code>startIndex</code>.
+		 *
+		 * @param x the x position of the pixel to set
+		 * @param y the y position of the pixel to set
+		 * @param putWidth the width of the pixels to set
+		 * @param pixels the pixels to set
+		 * @param startIndex the index at which to begin setting
+		 *
+		 * @exception IndexOutOfBoundsException if putWidth is too large
+		 * @exception IllegalArgumentException <ul>
+		 *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
+		 *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
+		 * </ul>
+		 * @exception RuntimeException <ul>
+		 *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
+		 * </ul>
+		 */
+		public void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex) {
+			if (pixels == null)
+				SWT.error(SWT.ERROR_NULL_ARGUMENT);
+			if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			if (putWidth == 0)
+				return;
+			int index;
+			int theByte;
+			int mask;
+			int n = putWidth;
+			int i = startIndex;
+			int pixel;
+			int srcX = x, srcY = y;
+			if (depth == 1) {
+				index = (y * bytesPerLine) + (x >> 3);
+				while (n > 0) {
+					mask = 1 << (7 - (srcX & 0x7));
+					if ((pixels[i] & 0x1) == 1) {
+						data[index] = (byte) ((data[index] & 0xFF) | mask);
+					} else {
+						data[index] = (byte) ((data[index] & 0xFF) & (mask ^ -1));
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						if (mask == 1) {
+							index++;
+						}
+					}
+				}
+				return;
+			}
+			if (depth == 2) {
+				byte[] masks = {(byte) 0xFC, (byte) 0xF3, (byte) 0xCF, (byte) 0x3F};
+				index = (y * bytesPerLine) + (x >> 2);
+				int offset = 3 - (x % 4);
+				while (n > 0) {
+					theByte = pixels[i] & 0x3;
+					data[index] = (byte) ((data[index] & masks[offset]) | (theByte << (offset * 2)));
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						offset = 3;
+						srcX = 0;
+					} else {
+						if (offset == 0) {
+							index++;
+							offset = 3;
+						} else {
+							offset--;
+						}
+					}
+				}
+				return;
+			}
+			if (depth == 4) {
+				index = (y * bytesPerLine) + (x >> 1);
+				boolean high = (x & 0x1) == 0;
+				while (n > 0) {
+					theByte = pixels[i] & 0x0F;
+					if (high) {
+						data[index] = (byte) ((data[index] & 0x0F) | (theByte << 4));
+					} else {
+						data[index] = (byte) ((data[index] & 0xF0) | theByte);
+					}
+					i++;
+					n--;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						high = true;
+						srcX = 0;
+					} else {
+						if (!high)
+							index++;
+						high = !high;
+					}
+				}
+				return;
+			}
+			if (depth == 8) {
+				index = (y * bytesPerLine) + x;
+				for (int j = 0; j < putWidth; j++) {
+					data[index] = (byte) (pixels[i] & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index++;
+					}
+				}
+				return;
 
-/**
- * Returns an <code>ImageData</code> which specifies the
- * transparency mask information for the receiver, or null if the
- * receiver has no transparency and is not an icon.
- *
- * @return the transparency mask or null if none exists
- */
-public ImageData getTransparencyMask() {
-	if (getTransparencyType() == SWT.TRANSPARENCY_MASK) {
-		return new ImageData(width, height, 1, bwPalette(), maskPad, maskData);
-	}
-	return colorMaskImage(transparentPixel);
-}
+			}
+			if (depth == 16) {
+				index = (y * bytesPerLine) + (x * 2);
+				for (int j = 0; j < putWidth; j++) {
+					pixel = pixels[i];
+					data[index] = (byte) (pixel & 0xFF);
+					data[index + 1] = (byte) ((pixel >> 8) & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 2;
+					}
+				}
+				return;
+			}
+			if (depth == 24) {
+				index = (y * bytesPerLine) + (x * 3);
+				for (int j = 0; j < putWidth; j++) {
+					pixel = pixels[i];
+					data[index] = (byte) ((pixel >> 16) & 0xFF);
+					data[index + 1] = (byte) ((pixel >> 8) & 0xFF);
+					data[index + 2] = (byte) (pixel & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 3;
+					}
+				}
+				return;
+			}
+			if (depth == 32) {
+				index = (y * bytesPerLine) + (x * 4);
+				for (int j = 0; j < putWidth; j++) {
+					pixel = pixels[i];
+					data[index] = (byte) ((pixel >> 24) & 0xFF);
+					data[index + 1] = (byte) ((pixel >> 16) & 0xFF);
+					data[index + 2] = (byte) ((pixel >> 8) & 0xFF);
+					data[index + 3] = (byte) (pixel & 0xFF);
+					i++;
+					srcX++;
+					if (srcX >= width) {
+						srcY++;
+						index = srcY * bytesPerLine;
+						srcX = 0;
+					} else {
+						index += 4;
+					}
+				}
+				return;
+			}
+			SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
+		}
 
-/**
- * Returns the image transparency type.
- *
- * @return the receiver's transparency type
- */
-public int getTransparencyType() {
-	if (maskData != null) return SWT.TRANSPARENCY_MASK;
-	if (transparentPixel != -1) return SWT.TRANSPARENCY_PIXEL;
-	if (alphaData != null) return SWT.TRANSPARENCY_ALPHA;
-	return SWT.TRANSPARENCY_NONE;
-}
+		/**
+		 * Returns a palette with 2 colors: black & white.
+		 */
+		static PaletteData bwPalette() {
+			return new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
+		}
 
-/**
- * Returns the byte order of the receiver.
- * 
- * @return MSB_FIRST or LSB_FIRST
- */
-int getByteOrder() {
-	return depth != 16 ? MSB_FIRST : LSB_FIRST;
-}
+		/**
+		 * Gets the offset of the most significant bit for
+		 * the given mask.
+		 */
+		static int getMSBOffset(int mask) {
+			for (int i = 31; i >= 0; i--) {
+				if (((mask >> i) & 0x1) != 0)
+					return i + 1;
+			}
+			return 0;
+		}
 
-/**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8
- *        (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
-public void setPixels(int x, int y, int putWidth, byte[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	if (putWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = putWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((pixels[i] & 0x1) == 1) {
-				data[index] = (byte)((data[index] & 0xFF) | mask);
-			} else {
-				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
+		/**
+		 * Finds the closest match.
+		 */
+		static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues) {
+			if (depth > 8) {
+				int rshift = 32 - getMSBOffset(redMask);
+				int gshift = 32 - getMSBOffset(greenMask);
+				int bshift = 32 - getMSBOffset(blueMask);
+				return (((red << 24) >>> rshift) & redMask) | (((green << 24) >>> gshift) & greenMask) | (((blue << 24) >>> bshift) & blueMask);
+			}
+			int r, g, b;
+			int minDistance = 0x7fffffff;
+			int nearestPixel = 0;
+			int n = reds.length;
+			for (int j = 0; j < n; j++) {
+				r = (reds[j] & 0xFF) - (red & 0xFF);
+				g = (greens[j] & 0xFF) - (green & 0xFF);
+				b = (blues[j] & 0xFF) - (blue & 0xFF);
+				int distance = r * r + g * g + b * b;
+				if (distance < minDistance) {
+					nearestPixel = j;
+					if (distance == 0)
+						break;
+					minDistance = distance;
 				}
 			}
+			return nearestPixel;
 		}
-		return;
-	}
-	if (depth == 2) {
-		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };
-		index = (y * bytesPerLine) + (x >> 2);
-		int offset = 3 - (x % 4);
-		while (n > 0) {
-			theByte = pixels[i] & 0x3;
-			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				offset = 0;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					offset = 3;
-				} else {
-					offset--;
+
+		static final ImageData convertMask(ImageData mask) {
+			if (mask.depth == 1)
+				return mask;
+			PaletteData palette = new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
+			ImageData newMask = new ImageData(mask.width, mask.height, 1, palette);
+			/* Find index of black in mask palette */
+			int blackIndex = 0;
+			RGB[] rgbs = mask.getRGBs();
+			if (rgbs != null) {
+				while (blackIndex < rgbs.length) {
+					if (rgbs[blackIndex].equals(palette.colors[0]))
+						break;
+					blackIndex++;
+				}
+			}
+			int[] pixels = new int[mask.width];
+			for (int y = 0; y < mask.height; y++) {
+				mask.getPixels(0, y, mask.width, pixels, 0);
+				for (int i = 0; i < pixels.length; i++) {
+					if (pixels[i] == blackIndex) {
+						pixels[i] = 0;
+					} else {
+						pixels[i] = 1;
+					}
 				}
+				newMask.setPixels(0, y, mask.width, pixels, 0);
 			}
+			return newMask;
 		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		boolean high = (x & 0x1) == 0;
-		while (n > 0) {
-			theByte = pixels[i] & 0x0F;
-			if (high) {
-				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));
-			} else {
-				data[index] = (byte)((data[index] & 0xF0) | theByte);
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				high = true;
-				srcX = 0;
-			} else {
-				if (!high) index++;
-				high = !high;
-			}
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < putWidth; j++) {
-			data[index] = (byte)(pixels[i] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
+
+		static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
+			if (pad == newPad)
+				return data;
+			int stride = (width * depth + 7) / 8;
+			int bpl = (stride + (pad - 1)) / pad * pad;
+			int newBpl = (stride + (newPad - 1)) / newPad * newPad;
+			byte[] newData = new byte[height * newBpl];
+			int srcIndex = 0, destIndex = 0;
+			for (int y = 0; y < height; y++) {
+				System.arraycopy(data, srcIndex, newData, destIndex, stride);
+				srcIndex += bpl;
+				destIndex += newBpl;
 			}
+			return newData;
 		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
 
-/**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
-public void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	if (putWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = putWidth;
-	int i = startIndex;
-	int pixel;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((pixels[i] & 0x1) == 1) {
-				data[index] = (byte)((data[index] & 0xFF) | mask);
-			} else {
-				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-				}
+		/**
+		 * Blit operation bits to be OR'ed together to specify the desired operation.
+		 */
+		static final int BLIT_SRC = 1, // copy source directly, else applies logic operations
+				BLIT_ALPHA = 2, // enable alpha blending
+				BLIT_DITHER = 4; // enable dithering in low color modes
+
+		/**
+		 * Alpha mode, values 0 - 255 specify global alpha level
+		 */
+		static final int ALPHA_OPAQUE = 255, // Fully opaque (ignores any alpha data)
+				ALPHA_TRANSPARENT = 0, // Fully transparent (ignores any alpha data)
+				ALPHA_CHANNEL_SEPARATE = -1, // Use alpha channel from separate alphaData
+				ALPHA_CHANNEL_SOURCE = -2, // Use alpha channel embedded in sourceData
+				ALPHA_MASK_UNPACKED = -3, // Use transparency mask formed by bytes in alphaData (non-zero is opaque)
+				ALPHA_MASK_PACKED = -4, // Use transparency mask formed by packed bits in alphaData
+				ALPHA_MASK_INDEX = -5, // Consider source palette indices transparent if in alphaData array
+				ALPHA_MASK_RGB = -6; // Consider source RGBs transparent if in RGB888 format alphaData array
+
+		/**
+		 * Byte and bit order constants.
+		 */
+		static final int LSB_FIRST = 0;
+		static final int MSB_FIRST = 1;
+
+		/**
+		 * Data types (internal)
+		 */
+		/*
+		private static final int
+			// direct / true color formats with arbitrary masks & shifts
+			TYPE_GENERIC_8 = 0,
+			TYPE_GENERIC_16_MSB = 1,
+			TYPE_GENERIC_16_LSB = 2,
+			TYPE_GENERIC_24 = 3,
+			TYPE_GENERIC_32_MSB = 4,
+			TYPE_GENERIC_32_LSB = 5,
+			// palette indexed color formats
+			TYPE_INDEX_8 = 6,
+			TYPE_INDEX_4 = 7,
+			TYPE_INDEX_2 = 8,
+			TYPE_INDEX_1_MSB = 9,
+			TYPE_INDEX_1_LSB = 10;
+		*/
+		/**
+		 * Computes the required channel shift from a mask.
+		 */
+		static int getChannelShift(int mask) {
+			if (mask == 0)
+				return 0;
+			int i;
+			for (i = 0; ((mask & 1) == 0) && (i < 32); ++i) {
+				mask >>>= 1;
+			}
+			return i;
+		}
+
+		/**
+		 * Computes the required channel width (depth) from a mask.
+		 */
+		static int getChannelWidth(int mask, int shift) {
+			if (mask == 0)
+				return 0;
+			int i;
+			mask >>>= shift;
+			for (i = shift; ((mask & 1) != 0) && (i < 32); ++i) {
+				mask >>>= 1;
 			}
+			return i - shift;
 		}
-		return;
-	}
-	if (depth == 2) {
-		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };
-		index = (y * bytesPerLine) + (x >> 2);
-		int offset = 3 - (x % 4);
-		while (n > 0) {
-			theByte = pixels[i] & 0x3;
-			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				offset = 3;
-				srcX = 0;
+
+		/**
+		 * Extracts a field from packed RGB data given a mask for that field.
+		 */
+		static byte getChannelField(int data, int mask) {
+			final int shift = getChannelShift(mask);
+			return ANY_TO_EIGHT[getChannelWidth(mask, shift)][(data & mask) >>> shift];
+		}
+
+		/* 
+		 * Fill in dithered gradated values for a color channel
+		 */
+		static final void buildDitheredGradientChannel(int from, int to, int steps, int bandWidth, int bandHeight, boolean vertical, byte[] bitmapData, int dp, int bytesPerLine, int bits) {
+			final int mask = 0xff00 >>> bits;
+			int val = from << 16;
+			final int inc = ((to << 16) - val) / steps + 1;
+			if (vertical) {
+				for (int dy = 0; dy < bandHeight; ++dy, dp += bytesPerLine) {
+					for (int dx = 0, dptr = dp; dx < bandWidth; ++dx, dptr += 4) {
+						final int thresh = DITHER_MATRIX[dy & 7][dx] >>> bits;
+						int temp = val + thresh;
+						if (temp > 0xffffff)
+							bitmapData[dptr] = -1;
+						else
+							bitmapData[dptr] = (byte) ((temp >>> 16) & mask);
+					}
+					val += inc;
+				}
 			} else {
-				if (offset == 0) {
-					index++;
-					offset = 3;
-				} else {
-					offset--;
+				for (int dx = 0; dx < bandWidth; ++dx, dp += 4) {
+					for (int dy = 0, dptr = dp; dy < bandHeight; ++dy, dptr += bytesPerLine) {
+						final int thresh = DITHER_MATRIX[dy][dx & 7] >>> bits;
+						int temp = val + thresh;
+						if (temp > 0xffffff)
+							bitmapData[dptr] = -1;
+						else
+							bitmapData[dptr] = (byte) ((temp >>> 16) & mask);
+					}
+					val += inc;
 				}
 			}
 		}
-		return;
 	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		boolean high = (x & 0x1) == 0;
-		while (n > 0) {
-			theByte = pixels[i] & 0x0F;
-			if (high) {
-				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));
-			} else {
-				data[index] = (byte)((data[index] & 0xF0) | theByte);
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				high = true;
-				srcX = 0;
-			} else {
-				if (!high) index++;
-				high = !high;
-			}
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < putWidth; j++) {
-			data[index] = (byte)(pixels[i] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
+
+	static class LEDataInputStream extends InputStream {
+		int position;
+		InputStream in;
+
+		/**
+		 * The byte array containing the bytes to read.
+		 */
+		protected byte[] buf;
+
+		/**
+		 * The current position within the byte array <code>buf</code>. A value
+		 * equal to buf.length indicates no bytes available.  A value of
+		 * 0 indicates the buffer is full.
+		 */
+		protected int pos;
+
+		public LEDataInputStream(InputStream input) {
+			this(input, 512);
 		}
-		return;
 
-	}
-	if (depth == 16) {
-		index = (y * bytesPerLine) + (x * 2);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)(pixel & 0xFF);
-			data[index + 1] = (byte)((pixel >> 8) & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 2;
-			}
-		}
-		return;
-	}
-	if (depth == 24) {
-		index = (y * bytesPerLine) + (x * 3);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)((pixel >> 16) & 0xFF);
-			data[index + 1] = (byte)((pixel >> 8) & 0xFF);
-			data[index + 2] = (byte)(pixel & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 3;
-			}
-		}
-		return;
-	}
-	if (depth == 32) {
-		index = (y * bytesPerLine) + (x * 4);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)((pixel >> 24) & 0xFF);
-			data[index + 1] = (byte)((pixel >> 16) & 0xFF);
-			data[index + 2] = (byte)((pixel >> 8) & 0xFF);
-			data[index + 3] = (byte)(pixel & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 4;
+		public LEDataInputStream(InputStream input, int bufferSize) {
+			this.in = input;
+			if (bufferSize > 0) {
+				buf = new byte[bufferSize];
+				pos = bufferSize;
+			} else
+				throw new IllegalArgumentException();
+		}
+
+		public void close() throws IOException {
+			buf = null;
+			if (in != null) {
+				in.close();
+				in = null;
 			}
 		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
 
-/**
- * Returns a palette with 2 colors: black & white.
- */
-static PaletteData bwPalette() {
-	return new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
-}
+		/**
+		 * Answer how many bytes were read.
+		 */
+		public int getPosition() {
+			return position;
+		}
 
-/**
- * Gets the offset of the most significant bit for
- * the given mask.
- */
-static int getMSBOffset(int mask) {
-	for (int i = 31; i >= 0; i--) {
-		if (((mask >> i) & 0x1) != 0) return i + 1;
-	}
-	return 0;
-}
+		/**
+		 * Answers how many bytes are available for reading without blocking
+		 */
+		public int available() throws IOException {
+			if (buf == null)
+				throw new IOException();
+			return (buf.length - pos) + in.available();
+		}
 
-/**
- * Finds the closest match.
- */
-static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues) {
-	if (depth > 8) {
-		int rshift = 32 - getMSBOffset(redMask);
-		int gshift = 32 - getMSBOffset(greenMask);
-		int bshift = 32 - getMSBOffset(blueMask);
-		return (((red << 24) >>> rshift) & redMask) |
-			(((green << 24) >>> gshift) & greenMask) |
-			(((blue << 24) >>> bshift) & blueMask);
-	}
-	int r, g, b;
-	int minDistance = 0x7fffffff;
-	int nearestPixel = 0;
-	int n = reds.length;
-	for (int j = 0; j < n; j++) {
-		r = (reds[j] & 0xFF) - (red & 0xFF);
-		g = (greens[j] & 0xFF) - (green & 0xFF);
-		b = (blues[j] & 0xFF) - (blue & 0xFF);
-		int distance = r*r + g*g + b*b;
-		if (distance < minDistance) {
-			nearestPixel = j;
-			if (distance == 0) break;
-			minDistance = distance;
-		}
-	}
-	return nearestPixel;
-}
+		/**
+		 * Answer the next byte of the input stream.
+		 */
+		public int read() throws IOException {
+			if (buf == null)
+				throw new IOException();
+			position++;
+			if (pos < buf.length)
+				return (buf[pos++] & 0xFF);
+			return in.read();
+		}
 
-static final ImageData convertMask(ImageData mask) {
-	if (mask.depth == 1) return mask;
-	PaletteData palette = new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255,255,255)});
-	ImageData newMask = new ImageData(mask.width, mask.height, 1, palette);
-	/* Find index of black in mask palette */
-	int blackIndex = 0;
-	RGB[] rgbs = mask.getRGBs();
-	if (rgbs != null) {
-		while (blackIndex < rgbs.length) {
-			if (rgbs[blackIndex].equals(palette.colors[0])) break;
-			blackIndex++;
-		}
-	}
-	int[] pixels = new int[mask.width];
-	for (int y = 0; y < mask.height; y++) {
-		mask.getPixels(0, y, mask.width, pixels, 0);
-		for (int i = 0; i < pixels.length; i++) {
-			if (pixels[i] == blackIndex) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
+		/**
+		 * Don't imitate the JDK behaviour of reading a random number
+		 * of bytes when you can actually read them all.
+		 */
+		public int read(byte b[], int off, int len) throws IOException {
+			int result;
+			int left = len;
+			result = readData(b, off, len);
+			while (true) {
+				if (result == -1)
+					return -1;
+				position += result;
+				if (result == left)
+					return len;
+				left -= result;
+				off += result;
+				result = readData(b, off, left);
 			}
 		}
-		newMask.setPixels(0, y, mask.width, pixels, 0);
-	}
-	return newMask;
-}
 
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;	
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, stride);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
+		/**
+		 * Reads at most <code>length</code> bytes from this LEDataInputStream and 
+		 * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+		 * <p>
+		 * Answer the number of bytes actually read or -1 if no bytes were read and 
+		 * end of stream was encountered.  This implementation reads bytes from 
+		 * the pushback buffer first, then the target stream if more bytes are required
+		 * to satisfy <code>count</code>.
+		 * </p>
+		 * @param buffer the byte array in which to store the read bytes.
+		 * @param offset the offset in <code>buffer</code> to store the read bytes.
+		 * @param length the maximum number of bytes to store in <code>buffer</code>.
+		 *
+		 * @return int the number of bytes actually read or -1 if end of stream.
+		 *
+		 * @exception java.io.IOException if an IOException occurs.
+		 */
+		private int readData(byte[] buffer, int offset, int length) throws IOException {
+			if (buf == null)
+				throw new IOException();
+			if (offset < 0 || offset > buffer.length || length < 0 || (length > buffer.length - offset)) {
+				throw new ArrayIndexOutOfBoundsException();
+			}
 
-/**
- * Blit operation bits to be OR'ed together to specify the desired operation.
- */
-static final int
-	BLIT_SRC = 1,     // copy source directly, else applies logic operations
-	BLIT_ALPHA = 2,   // enable alpha blending
-	BLIT_DITHER = 4;  // enable dithering in low color modes
+			int cacheCopied = 0;
+			int newOffset = offset;
 
-/**
- * Alpha mode, values 0 - 255 specify global alpha level
- */
-static final int
-	ALPHA_OPAQUE = 255,           // Fully opaque (ignores any alpha data)
-	ALPHA_TRANSPARENT = 0,        // Fully transparent (ignores any alpha data)
-	ALPHA_CHANNEL_SEPARATE = -1,  // Use alpha channel from separate alphaData
-	ALPHA_CHANNEL_SOURCE = -2,    // Use alpha channel embedded in sourceData
-	ALPHA_MASK_UNPACKED = -3,     // Use transparency mask formed by bytes in alphaData (non-zero is opaque)
-	ALPHA_MASK_PACKED = -4,       // Use transparency mask formed by packed bits in alphaData
-	ALPHA_MASK_INDEX = -5,        // Consider source palette indices transparent if in alphaData array
-	ALPHA_MASK_RGB = -6;          // Consider source RGBs transparent if in RGB888 format alphaData array
+			// Are there pushback bytes available?
+			int available = buf.length - pos;
+			if (available > 0) {
+				cacheCopied = (available >= length) ? length : available;
+				System.arraycopy(buf, pos, buffer, newOffset, cacheCopied);
+				newOffset += cacheCopied;
+				pos += cacheCopied;
+			}
 
-/**
- * Byte and bit order constants.
- */
-static final int LSB_FIRST = 0;
-static final int MSB_FIRST = 1;
+			// Have we copied enough?
+			if (cacheCopied == length)
+				return length;
 
-/**
- * Data types (internal)
- */
-/*
-private static final int
-	// direct / true color formats with arbitrary masks & shifts
-	TYPE_GENERIC_8 = 0,
-	TYPE_GENERIC_16_MSB = 1,
-	TYPE_GENERIC_16_LSB = 2,
-	TYPE_GENERIC_24 = 3,
-	TYPE_GENERIC_32_MSB = 4,
-	TYPE_GENERIC_32_LSB = 5,
-	// palette indexed color formats
-	TYPE_INDEX_8 = 6,
-	TYPE_INDEX_4 = 7,
-	TYPE_INDEX_2 = 8,
-	TYPE_INDEX_1_MSB = 9,
-	TYPE_INDEX_1_LSB = 10;
-*/
-/**
- * Computes the required channel shift from a mask.
- */
-static int getChannelShift(int mask) {
-	if (mask == 0) return 0;
-	int i;
-	for (i = 0; ((mask & 1) == 0) && (i < 32); ++i) {
-		mask >>>= 1;
-	}
-	return i;
-}
+			int inCopied = in.read(buffer, newOffset, length - cacheCopied);
 
-/**
- * Computes the required channel width (depth) from a mask.
- */
-static int getChannelWidth(int mask, int shift) {
-	if (mask == 0) return 0;
-	int i;
-	mask >>>= shift;
-	for (i = shift; ((mask & 1) != 0) && (i < 32); ++i) {
-		mask >>>= 1;
-	}
-	return i - shift;
-}
+			if (inCopied > 0)
+				return inCopied + cacheCopied;
+			if (cacheCopied == 0)
+				return inCopied;
+			return cacheCopied;
+		}
 
-/**
- * Extracts a field from packed RGB data given a mask for that field.
- */
-static byte getChannelField(int data, int mask) {
-	final int shift = getChannelShift(mask);
-	return ANY_TO_EIGHT[getChannelWidth(mask, shift)][(data & mask) >>> shift];
-}
+		/**
+		 * Answer an integer comprised of the next
+		 * four bytes of the input stream.
+		 */
+		public int readInt() throws IOException {
+			byte[] buf = new byte[4];
+			read(buf);
+			return ((((((buf[3] & 0xFF) << 8) | (buf[2] & 0xFF)) << 8) | (buf[1] & 0xFF)) << 8) | (buf[0] & 0xFF);
+		}
 
-/* 
- * Fill in dithered gradated values for a color channel
- */
-static final void buildDitheredGradientChannel(int from, int to, int steps,
-	int bandWidth, int bandHeight, boolean vertical,
-	byte[] bitmapData, int dp, int bytesPerLine, int bits) {
-	final int mask = 0xff00 >>> bits;
-	int val = from << 16;
-	final int inc = ((to << 16) - val) / steps + 1;
-	if (vertical) {
-		for (int dy = 0; dy < bandHeight; ++dy, dp += bytesPerLine) {
-			for (int dx = 0, dptr = dp; dx < bandWidth; ++dx, dptr += 4) {
-				final int thresh = DITHER_MATRIX[dy & 7][dx] >>> bits;
-				int temp = val + thresh;
-				if (temp > 0xffffff) bitmapData[dptr] = -1;
-				else bitmapData[dptr] = (byte)((temp >>> 16) & mask);
-			}
-			val += inc;
-		}
-	} else {
-		for (int dx = 0; dx < bandWidth; ++dx, dp += 4) {
-			for (int dy = 0, dptr = dp; dy < bandHeight; ++dy, dptr += bytesPerLine) {
-				final int thresh = DITHER_MATRIX[dy][dx & 7] >>> bits;
-				int temp = val + thresh;
-				if (temp > 0xffffff) bitmapData[dptr] = -1;
-				else bitmapData[dptr] = (byte)((temp >>> 16) & mask);
-			}
-			val += inc;
+		/**
+		 * Answer a short comprised of the next
+		 * two bytes of the input stream.
+		 */
+		public short readShort() throws IOException {
+			byte[] buf = new byte[2];
+			read(buf);
+			return (short) (((buf[1] & 0xFF) << 8) | (buf[0] & 0xFF));
+		}
+
+		/**
+		 * Push back the entire content of the given buffer <code>b</code>.
+		 * <p>
+		 * The bytes are pushed so that they would be read back b[0], b[1], etc. 
+		 * If the push back buffer cannot handle the bytes copied from <code>b</code>, 
+		 * an IOException will be thrown and no byte will be pushed back.
+		 * </p>
+		 * 
+		 * @param b the byte array containing bytes to push back into the stream
+		 *
+		 * @exception 	java.io.IOException if the pushback buffer is too small
+		 */
+		public void unread(byte[] b) throws IOException {
+			int length = b.length;
+			if (length > pos)
+				throw new IOException();
+			position -= length;
+			pos -= length;
+			System.arraycopy(b, 0, buf, pos, length);
 		}
 	}
-}
-}
 
-static class LEDataInputStream extends InputStream {
-	int position;
-	InputStream in;
+	public static abstract class FileFormat {
+		LEDataInputStream inputStream;
+		ImageLoader loader;
+		int compression;
 
-	/**
-	 * The byte array containing the bytes to read.
-	 */
-	protected byte[] buf;
-	
-	/**
-	 * The current position within the byte array <code>buf</code>. A value
-	 * equal to buf.length indicates no bytes available.  A value of
-	 * 0 indicates the buffer is full.
-	 */
-	protected int pos;
-	
-
-	public LEDataInputStream(InputStream input) {
-		this(input, 512);
-	}
-	
-	public LEDataInputStream(InputStream input, int bufferSize) {
-		this.in = input;
-		if (bufferSize > 0) {
-			buf = new byte[bufferSize];
-			pos = bufferSize;
-		} 
-		else throw new IllegalArgumentException();
-	}
-	
-	public void close() throws IOException {
-		buf = null;
-		if (in != null) {
-			in.close();
-			in = null;
-		}
-	}
-	
-	/**
-	 * Answer how many bytes were read.
-	 */
-	public int getPosition() {
-		return position;
-	}
-	
-	/**
-	 * Answers how many bytes are available for reading without blocking
-	 */
-	public int available() throws IOException {
-		if (buf == null) throw new IOException();
-		return (buf.length - pos) + in.available();
-	}
-	
-	/**
-	 * Answer the next byte of the input stream.
-	 */
-	public int read() throws IOException {
-		if (buf == null) throw new IOException();
-		position++;
-		if (pos < buf.length) return (buf[pos++] & 0xFF);
-		return in.read();
-	}
-	
-	/**
-	 * Don't imitate the JDK behaviour of reading a random number
-	 * of bytes when you can actually read them all.
-	 */
-	public int read(byte b[], int off, int len) throws IOException {
-		int result;
-		int left = len;
-		result = readData(b, off, len);
-		while (true) {
-			if (result == -1) return -1;
-			position += result;
-			if (result == left) return len;
-			left -= result;
-			off += result;
-			result = readData(b, off, left);
-		}
-	}
-	
-	/**
- 	 * Reads at most <code>length</code> bytes from this LEDataInputStream and 
- 	 * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- 	 * <p>
- 	 * Answer the number of bytes actually read or -1 if no bytes were read and 
- 	 * end of stream was encountered.  This implementation reads bytes from 
- 	 * the pushback buffer first, then the target stream if more bytes are required
- 	 * to satisfy <code>count</code>.
-	 * </p>
-	 * @param buffer the byte array in which to store the read bytes.
-	 * @param offset the offset in <code>buffer</code> to store the read bytes.
-	 * @param length the maximum number of bytes to store in <code>buffer</code>.
-	 *
-	 * @return int the number of bytes actually read or -1 if end of stream.
-	 *
-	 * @exception java.io.IOException if an IOException occurs.
-	 */
-	private int readData(byte[] buffer, int offset, int length) throws IOException {
-		if (buf == null) throw new IOException();
-		if (offset < 0 || offset > buffer.length ||
-  		 	length < 0 || (length > buffer.length - offset)) {
-	 		throw new ArrayIndexOutOfBoundsException();
-		 	}
-				
-		int cacheCopied = 0;
-		int newOffset = offset;
-	
-		// Are there pushback bytes available?
-		int available = buf.length - pos;
-		if (available > 0) {
-			cacheCopied = (available >= length) ? length : available;
-			System.arraycopy(buf, pos, buffer, newOffset, cacheCopied);
-			newOffset += cacheCopied;
-			pos += cacheCopied;
-		}
-	
-		// Have we copied enough?
-		if (cacheCopied == length) return length;
-
-		int inCopied = in.read(buffer, newOffset, length - cacheCopied);
-
-		if (inCopied > 0) return inCopied + cacheCopied;
-		if (cacheCopied == 0) return inCopied;
-		return cacheCopied;
-	}
-	
-	/**
-	 * Answer an integer comprised of the next
-	 * four bytes of the input stream.
-	 */
-	public int readInt() throws IOException {
-		byte[] buf = new byte[4];
-		read(buf);
-		return ((((((buf[3] & 0xFF) << 8) | 
-			(buf[2] & 0xFF)) << 8) | 
-			(buf[1] & 0xFF)) << 8) | 
-			(buf[0] & 0xFF);
-	}
-	
-	/**
-	 * Answer a short comprised of the next
-	 * two bytes of the input stream.
-	 */
-	public short readShort() throws IOException {
-		byte[] buf = new byte[2];
-		read(buf);
-		return (short)(((buf[1] & 0xFF) << 8) | (buf[0] & 0xFF));
-	}
-	
-	/**
-	 * Push back the entire content of the given buffer <code>b</code>.
-	 * <p>
-	 * The bytes are pushed so that they would be read back b[0], b[1], etc. 
-	 * If the push back buffer cannot handle the bytes copied from <code>b</code>, 
-	 * an IOException will be thrown and no byte will be pushed back.
-	 * </p>
-	 * 
-	 * @param b the byte array containing bytes to push back into the stream
-	 *
-	 * @exception 	java.io.IOException if the pushback buffer is too small
-	 */
-	public void unread(byte[] b) throws IOException {
-		int length = b.length;
-		if (length > pos) throw new IOException();
-		position -= length;
-		pos -= length;
-		System.arraycopy(b, 0, buf, pos, length);
-	}
-}
-public static abstract class FileFormat {	
-	LEDataInputStream inputStream;
-	ImageLoader loader;
-	int compression;
+		byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
+			// Destructively bit invert data in the given byte array.
+			for (int i = startIndex; i < endIndex; i++) {
+				data[i] = (byte) (255 - data[i - startIndex]);
+			}
+			return data;
+		}
 
-byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
-	// Destructively bit invert data in the given byte array.
-	for (int i = startIndex; i < endIndex; i++) {
-		data[i] = (byte)(255 - data[i - startIndex]);
-	}
-	return data;
-}
+		/**
+		 * Return whether or not the specified input stream
+		 * represents a supported file format.
+		 */
+		abstract boolean isFileFormat(LEDataInputStream stream);
 
-/**
- * Return whether or not the specified input stream
- * represents a supported file format.
- */
-abstract boolean isFileFormat(LEDataInputStream stream);
+		abstract ImageData[] loadFromByteStream();
 
-abstract ImageData[] loadFromByteStream();
+		public ImageData[] loadFromStream(LEDataInputStream stream) {
+			try {
+				inputStream = stream;
+				return loadFromByteStream();
+			} catch (Exception e) {
+				SWT.error(SWT.ERROR_IO, e);
+				return null;
+			}
+		}
 
-public ImageData[] loadFromStream(LEDataInputStream stream) {
-	try {
-		inputStream = stream;
-		return loadFromByteStream();
-	} catch (Exception e) {
-		SWT.error(SWT.ERROR_IO, e);
-		return null;
+		public static ImageData[] load(InputStream is, ImageLoader loader) {
+			LEDataInputStream stream = new LEDataInputStream(is);
+			boolean isSupported = false;
+			FileFormat fileFormat = new WinICOFileFormat();
+			if (fileFormat.isFileFormat(stream))
+				isSupported = true;
+			else {
+				fileFormat = new WinBMPFileFormat();
+				if (fileFormat.isFileFormat(stream))
+					isSupported = true;
+			}
+			if (!isSupported)
+				SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
+			fileFormat.loader = loader;
+			return fileFormat.loadFromStream(stream);
+		}
 	}
-}
 
-public static ImageData[] load(InputStream is, ImageLoader loader) {
-	LEDataInputStream stream = new LEDataInputStream(is);
-	boolean isSupported = false;	
-	FileFormat fileFormat = new WinICOFileFormat();
-	if (fileFormat.isFileFormat(stream)) isSupported = true;
-	else {
-		fileFormat = new WinBMPFileFormat();
-		if (fileFormat.isFileFormat(stream)) isSupported = true;
-	}
-	if (!isSupported) SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
-	fileFormat.loader = loader;
-	return fileFormat.loadFromStream(stream);
-}
-}
-static class WinBMPFileFormat extends FileFormat {
-	static final int BMPFileHeaderSize = 14;
-	static final int BMPHeaderFixedSize = 40;
-	int importantColors;
+	static class WinBMPFileFormat extends FileFormat {
+		static final int BMPFileHeaderSize = 14;
+		static final int BMPHeaderFixedSize = 40;
+		int importantColors;
 
-void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
-	if (cmp == 1) { // BMP_RLE8_COMPRESSION
-		if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
-			SWT.error(SWT.ERROR_INVALID_IMAGE);
-		return;
-	}
-	if (cmp == 2) { // BMP_RLE4_COMPRESSION
-		if (decompressRLE4Data(src, src.length, stride, dest, dest.length) <= 0)
+		void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
+			if (cmp == 1) { // BMP_RLE8_COMPRESSION
+				if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
+					SWT.error(SWT.ERROR_INVALID_IMAGE);
+				return;
+			}
+			if (cmp == 2) { // BMP_RLE4_COMPRESSION
+				if (decompressRLE4Data(src, src.length, stride, dest, dest.length) <= 0)
+					SWT.error(SWT.ERROR_INVALID_IMAGE);
+				return;
+			}
 			SWT.error(SWT.ERROR_INVALID_IMAGE);
-		return;
-	}
-	SWT.error(SWT.ERROR_INVALID_IMAGE);
-}
-int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
-	int sp = 0;
-	int se = numBytes;
-	int dp = 0;
-	int de = destSize;
-	int x = 0, y = 0;
-	while (sp < se) {
-		int len = src[sp] & 0xFF;
-		sp++;
-		if (len == 0) {
-			len = src[sp] & 0xFF;
-			sp++;
-			switch (len) {
-				case 0: /* end of line */
-					y++;
-					x = 0;
-					dp = y * stride;
-					if (dp >= de)
-						return -1;
-					break;
-				case 1: /* end of bitmap */
-					return 1;
-				case 2: /* delta */
-					x += src[sp] & 0xFF;
-					sp++;
-					y += src[sp] & 0xFF;
+		}
+
+		int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
+			int sp = 0;
+			int se = numBytes;
+			int dp = 0;
+			int de = destSize;
+			int x = 0, y = 0;
+			while (sp < se) {
+				int len = src[sp] & 0xFF;
+				sp++;
+				if (len == 0) {
+					len = src[sp] & 0xFF;
 					sp++;
-					dp = y * stride + x / 2;
-					if (dp >= de)
-						return -1;
-					break;
-				default: /* absolute mode run */
-					if ((len & 1) != 0) /* odd run lengths not currently supported */
+					switch (len) {
+						case 0 : /* end of line */
+							y++;
+							x = 0;
+							dp = y * stride;
+							if (dp >= de)
+								return -1;
+							break;
+						case 1 : /* end of bitmap */
+							return 1;
+						case 2 : /* delta */
+							x += src[sp] & 0xFF;
+							sp++;
+							y += src[sp] & 0xFF;
+							sp++;
+							dp = y * stride + x / 2;
+							if (dp >= de)
+								return -1;
+							break;
+						default : /* absolute mode run */
+							if ((len & 1) != 0) /* odd run lengths not currently supported */
+								return -1;
+							x += len;
+							len = len / 2;
+							if (len > (se - sp))
+								return -1;
+							if (len > (de - dp))
+								return -1;
+							for (int i = 0; i < len; i++) {
+								dest[dp] = src[sp];
+								dp++;
+								sp++;
+							}
+							if ((sp & 1) != 0)
+								sp++; /* word align sp? */
+							break;
+					}
+				} else {
+					if ((len & 1) != 0)
 						return -1;
 					x += len;
 					len = len / 2;
-					if (len > (se - sp))
-						return -1;
+					byte theByte = src[sp];
+					sp++;
 					if (len > (de - dp))
 						return -1;
 					for (int i = 0; i < len; i++) {
-						dest[dp] = src[sp];
+						dest[dp] = theByte;
 						dp++;
-						sp++;
 					}
-					if ((sp & 1) != 0)
-						sp++; /* word align sp? */
-					break;
-			}
-		} else {
-			if ((len & 1) != 0)
-				return -1;
-			x += len;
-			len = len / 2;
-			byte theByte = src[sp];
-			sp++;
-			if (len > (de - dp))
-				return -1;
-			for (int i = 0; i < len; i++) {
-				dest[dp] = theByte;
-				dp++;
+				}
 			}
+			return 1;
 		}
-	}
-	return 1;
-}
-int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
-	int sp = 0;
-	int se = numBytes;
-	int dp = 0;
-	int de = destSize;
-	int x = 0, y = 0;
-	while (sp < se) {
-		int len = src[sp] & 0xFF;
-		sp++;
-		if (len == 0) {
-			len = src[sp] & 0xFF;
-			sp++;
-			switch (len) {
-				case 0: /* end of line */
-					y++;
-					x = 0;
-					dp = y * stride;
-					if (dp >= de)
-						return -1;
-					break;
-				case 1: /* end of bitmap */
-					return 1;
-				case 2: /* delta */
-					x += src[sp] & 0xFF;
+
+		int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
+			int sp = 0;
+			int se = numBytes;
+			int dp = 0;
+			int de = destSize;
+			int x = 0, y = 0;
+			while (sp < se) {
+				int len = src[sp] & 0xFF;
+				sp++;
+				if (len == 0) {
+					len = src[sp] & 0xFF;
 					sp++;
-					y += src[sp] & 0xFF;
+					switch (len) {
+						case 0 : /* end of line */
+							y++;
+							x = 0;
+							dp = y * stride;
+							if (dp >= de)
+								return -1;
+							break;
+						case 1 : /* end of bitmap */
+							return 1;
+						case 2 : /* delta */
+							x += src[sp] & 0xFF;
+							sp++;
+							y += src[sp] & 0xFF;
+							sp++;
+							dp = y * stride + x;
+							if (dp >= de)
+								return -1;
+							break;
+						default : /* absolute mode run */
+							if (len > (se - sp))
+								return -1;
+							if (len > (de - dp))
+								return -1;
+							for (int i = 0; i < len; i++) {
+								dest[dp] = src[sp];
+								dp++;
+								sp++;
+							}
+							if ((sp & 1) != 0)
+								sp++; /* word align sp? */
+							x += len;
+							break;
+					}
+				} else {
+					byte theByte = src[sp];
 					sp++;
-					dp = y * stride + x;
-					if (dp >= de)
-						return -1;
-					break;
-				default: /* absolute mode run */
-					if (len > (se - sp))
-						return -1;
 					if (len > (de - dp))
 						return -1;
 					for (int i = 0; i < len; i++) {
-						dest[dp] = src[sp];
+						dest[dp] = theByte;
 						dp++;
-						sp++;
 					}
-					if ((sp & 1) != 0)
-						sp++; /* word align sp? */
 					x += len;
-					break;
+				}
 			}
-		} else {
-			byte theByte = src[sp];
-			sp++;
-			if (len > (de - dp))
-				return -1;
-			for (int i = 0; i < len; i++) {
-				dest[dp] = theByte;
-				dp++;
+			return 1;
+		}
+
+		boolean isFileFormat(LEDataInputStream stream) {
+			try {
+				byte[] header = new byte[18];
+				stream.read(header);
+				stream.unread(header);
+				int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24);
+				return header[0] == 0x42 && header[1] == 0x4D && infoHeaderSize >= BMPHeaderFixedSize;
+			} catch (Exception e) {
+				return false;
 			}
-			x += len;
 		}
-	}
-	return 1;
-}
-boolean isFileFormat(LEDataInputStream stream) {
-	try {
-		byte[] header = new byte[18];
-		stream.read(header);
-		stream.unread(header);
-		int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24);
-		return header[0] == 0x42 && header[1] == 0x4D && infoHeaderSize >= BMPHeaderFixedSize;
-	} catch (Exception e) {
-		return false;
-	}
-}
-byte[] loadData(byte[] infoHeader) {
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	int stride = (width * bitCount + 7) / 8;
-	stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
-	byte[] data = loadData(infoHeader, stride);
-	flipScanLines(data, stride, height);
-	return data;
-}
-byte[] loadData(byte[] infoHeader, int stride) {
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int dataSize = height * stride;
-	byte[] data = new byte[dataSize];
-	int cmp = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
-	if (cmp == 0) { // BMP_NO_COMPRESSION
-		try {
-			if (inputStream.read(data) != dataSize)
-				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
+
+		byte[] loadData(byte[] infoHeader) {
+			int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
+			int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
+			int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
+			int stride = (width * bitCount + 7) / 8;
+			stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
+			byte[] data = loadData(infoHeader, stride);
+			flipScanLines(data, stride, height);
+			return data;
 		}
-	} else {
-		int compressedSize = (infoHeader[20] & 0xFF) | ((infoHeader[21] & 0xFF) << 8) | ((infoHeader[22] & 0xFF) << 16) | ((infoHeader[23] & 0xFF) << 24);
-		byte[] compressed = new byte[compressedSize];
-		try {
-			if (inputStream.read(compressed) != compressedSize)
+
+		byte[] loadData(byte[] infoHeader, int stride) {
+			int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
+			int dataSize = height * stride;
+			byte[] data = new byte[dataSize];
+			int cmp = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
+			if (cmp == 0) { // BMP_NO_COMPRESSION
+				try {
+					if (inputStream.read(data) != dataSize)
+						SWT.error(SWT.ERROR_INVALID_IMAGE);
+				} catch (IOException e) {
+					SWT.error(SWT.ERROR_IO, e);
+				}
+			} else {
+				int compressedSize = (infoHeader[20] & 0xFF) | ((infoHeader[21] & 0xFF) << 8) | ((infoHeader[22] & 0xFF) << 16) | ((infoHeader[23] & 0xFF) << 24);
+				byte[] compressed = new byte[compressedSize];
+				try {
+					if (inputStream.read(compressed) != compressedSize)
+						SWT.error(SWT.ERROR_INVALID_IMAGE);
+				} catch (IOException e) {
+					SWT.error(SWT.ERROR_IO, e);
+				}
+				decompressData(compressed, data, stride, cmp);
+			}
+			return data;
+		}
+
+		int[] loadFileHeader() {
+			int[] header = new int[5];
+			try {
+				header[0] = inputStream.readShort();
+				header[1] = inputStream.readInt();
+				header[2] = inputStream.readShort();
+				header[3] = inputStream.readShort();
+				header[4] = inputStream.readInt();
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			if (header[0] != 0x4D42)
 				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
+			return header;
 		}
-		decompressData(compressed, data, stride, cmp);
-	}
-	return data;
-}
-int[] loadFileHeader() {
-	int[] header = new int[5];
-	try {
-		header[0] = inputStream.readShort();
-		header[1] = inputStream.readInt();
-		header[2] = inputStream.readShort();
-		header[3] = inputStream.readShort();
-		header[4] = inputStream.readInt();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if (header[0] != 0x4D42)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return header;
-}
-ImageData[] loadFromByteStream() {
-	int[] fileHeader = loadFileHeader();
-	byte[] infoHeader = new byte[BMPHeaderFixedSize];
-	try {
-		inputStream.read(infoHeader);
-	} catch (Exception e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	PaletteData palette = loadPalette(infoHeader);
-	if (inputStream.getPosition() < fileHeader[4]) {
-		// Seek to the specified offset
-		try {
-			inputStream.skip(fileHeader[4] - inputStream.getPosition());
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
+
+		ImageData[] loadFromByteStream() {
+			int[] fileHeader = loadFileHeader();
+			byte[] infoHeader = new byte[BMPHeaderFixedSize];
+			try {
+				inputStream.read(infoHeader);
+			} catch (Exception e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
+			int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
+			int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
+			PaletteData palette = loadPalette(infoHeader);
+			if (inputStream.getPosition() < fileHeader[4]) {
+				// Seek to the specified offset
+				try {
+					inputStream.skip(fileHeader[4] - inputStream.getPosition());
+				} catch (IOException e) {
+					SWT.error(SWT.ERROR_IO, e);
+				}
+			}
+			byte[] data = loadData(infoHeader);
+			this.compression = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
+			this.importantColors = (infoHeader[36] & 0xFF) | ((infoHeader[37] & 0xFF) << 8) | ((infoHeader[38] & 0xFF) << 16) | ((infoHeader[39] & 0xFF) << 24);
+			//	int xPelsPerMeter = (infoHeader[24] & 0xFF) | ((infoHeader[25] & 0xFF) << 8) | ((infoHeader[26] & 0xFF) << 16) | ((infoHeader[27] & 0xFF) << 24);
+			//	int yPelsPerMeter = (infoHeader[28] & 0xFF) | ((infoHeader[29] & 0xFF) << 8) | ((infoHeader[30] & 0xFF) << 16) | ((infoHeader[31] & 0xFF) << 24);
+			int type = (this.compression == 1 /*BMP_RLE8_COMPRESSION*/) || (this.compression == 2 /*BMP_RLE4_COMPRESSION*/) ? SWT.IMAGE_BMP_RLE : SWT.IMAGE_BMP;
+			return new ImageData[] {ImageData.internal_new(width, height, bitCount, palette, 4, data, 0, null, null, -1, -1, type, 0, 0, 0, 0)};
+		}
+
+		PaletteData loadPalette(byte[] infoHeader) {
+			int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
+			if (depth <= 8) {
+				int numColors = (infoHeader[32] & 0xFF) | ((infoHeader[33] & 0xFF) << 8) | ((infoHeader[34] & 0xFF) << 16) | ((infoHeader[35] & 0xFF) << 24);
+				if (numColors == 0) {
+					numColors = 1 << depth;
+				} else {
+					if (numColors > 256)
+						numColors = 256;
+				}
+				byte[] buf = new byte[numColors * 4];
+				try {
+					if (inputStream.read(buf) != buf.length)
+						SWT.error(SWT.ERROR_INVALID_IMAGE);
+				} catch (IOException e) {
+					SWT.error(SWT.ERROR_IO, e);
+				}
+				return paletteFromBytes(buf, numColors);
+			}
+			if (depth == 16)
+				return new PaletteData(0x7C00, 0x3E0, 0x1F);
+			if (depth == 24)
+				return new PaletteData(0xFF, 0xFF00, 0xFF0000);
+			return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
+		}
+
+		PaletteData paletteFromBytes(byte[] bytes, int numColors) {
+			int bytesOffset = 0;
+			RGB[] colors = new RGB[numColors];
+			for (int i = 0; i < numColors; i++) {
+				colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF, bytes[bytesOffset + 1] & 0xFF, bytes[bytesOffset] & 0xFF);
+				bytesOffset += 4;
+			}
+			return new PaletteData(colors);
 		}
+
+		/**
+		 * Answer a byte array containing the BMP representation of
+		 * the given device independent palette.
+		 */
+		static byte[] paletteToBytes(PaletteData pal) {
+			int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
+			byte[] bytes = new byte[n * 4];
+			int offset = 0;
+			for (int i = 0; i < n; i++) {
+				RGB col = pal.colors[i];
+				bytes[offset] = (byte) col.blue;
+				bytes[offset + 1] = (byte) col.green;
+				bytes[offset + 2] = (byte) col.red;
+				offset += 4;
+			}
+			return bytes;
+		}
+
+		void flipScanLines(byte[] data, int stride, int height) {
+			int i1 = 0;
+			int i2 = (height - 1) * stride;
+			for (int i = 0; i < height / 2; i++) {
+				for (int index = 0; index < stride; index++) {
+					byte b = data[index + i1];
+					data[index + i1] = data[index + i2];
+					data[index + i2] = b;
+				}
+				i1 += stride;
+				i2 -= stride;
+			}
+		}
+
 	}
-	byte[] data = loadData(infoHeader);
-	this.compression = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
-	this.importantColors = (infoHeader[36] & 0xFF) | ((infoHeader[37] & 0xFF) << 8) | ((infoHeader[38] & 0xFF) << 16) | ((infoHeader[39] & 0xFF) << 24);
-//	int xPelsPerMeter = (infoHeader[24] & 0xFF) | ((infoHeader[25] & 0xFF) << 8) | ((infoHeader[26] & 0xFF) << 16) | ((infoHeader[27] & 0xFF) << 24);
-//	int yPelsPerMeter = (infoHeader[28] & 0xFF) | ((infoHeader[29] & 0xFF) << 8) | ((infoHeader[30] & 0xFF) << 16) | ((infoHeader[31] & 0xFF) << 24);
-	int type = (this.compression == 1 /*BMP_RLE8_COMPRESSION*/) || (this.compression == 2 /*BMP_RLE4_COMPRESSION*/) ? SWT.IMAGE_BMP_RLE : SWT.IMAGE_BMP;
-	return new ImageData[] {
-		ImageData.internal_new(
-			width,
-			height,
-			bitCount,
-			palette,
-			4,
-			data,
-			0,
-			null,
-			null,
-			-1,
-			-1,
-			type,
-			0,
-			0,
-			0,
-			0)
-	};
-}
-PaletteData loadPalette(byte[] infoHeader) {
-	int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	if (depth <= 8) {
-		int numColors = (infoHeader[32] & 0xFF) | ((infoHeader[33] & 0xFF) << 8) | ((infoHeader[34] & 0xFF) << 16) | ((infoHeader[35] & 0xFF) << 24);
-		if (numColors == 0) {
-			numColors = 1 << depth;
-		} else {
-			if (numColors > 256)
-				numColors = 256;
+
+	static class WinICOFileFormat extends FileFormat {
+
+		static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
+			if (pad == newPad)
+				return data;
+			int stride = (width * depth + 7) / 8;
+			int bpl = (stride + (pad - 1)) / pad * pad;
+			int newBpl = (stride + (newPad - 1)) / newPad * newPad;
+			byte[] newData = new byte[height * newBpl];
+			int srcIndex = 0, destIndex = 0;
+			for (int y = 0; y < height; y++) {
+				System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
+				srcIndex += bpl;
+				destIndex += newBpl;
+			}
+			return newData;
 		}
-		byte[] buf = new byte[numColors * 4];
-		try {
-			if (inputStream.read(buf) != buf.length)
+
+		/**
+		 * Answer the size in bytes of the file representation of the given
+		 * icon
+		 */
+		int iconSize(ImageData i) {
+			int shapeDataStride = (i.width * i.depth + 31) / 32 * 4;
+			int maskDataStride = (i.width + 31) / 32 * 4;
+			int dataSize = (shapeDataStride + maskDataStride) * i.height;
+			int paletteSize = i.palette.colors != null ? i.palette.colors.length * 4 : 0;
+			return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize;
+		}
+
+		boolean isFileFormat(LEDataInputStream stream) {
+			try {
+				byte[] header = new byte[4];
+				stream.read(header);
+				stream.unread(header);
+				return header[0] == 0 && header[1] == 0 && header[2] == 1 && header[3] == 0;
+			} catch (Exception e) {
+				return false;
+			}
+		}
+
+		boolean isValidIcon(ImageData i) {
+			switch (i.depth) {
+				case 1 :
+				case 4 :
+				case 8 :
+					if (i.palette.isDirect)
+						return false;
+					int size = i.palette.colors.length;
+					return size == 2 || size == 16 || size == 32 || size == 256;
+				case 24 :
+				case 32 :
+					return i.palette.isDirect;
+			}
+			return false;
+		}
+
+		int loadFileHeader(LEDataInputStream byteStream) {
+			int[] fileHeader = new int[3];
+			try {
+				fileHeader[0] = byteStream.readShort();
+				fileHeader[1] = byteStream.readShort();
+				fileHeader[2] = byteStream.readShort();
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
 				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
+			int numIcons = fileHeader[2];
+			if (numIcons <= 0)
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			return numIcons;
 		}
-		return paletteFromBytes(buf, numColors);
-	}
-	if (depth == 16) return new PaletteData(0x7C00, 0x3E0, 0x1F);
-	if (depth == 24) return new PaletteData(0xFF, 0xFF00, 0xFF0000);
-	return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
-}
-PaletteData paletteFromBytes(byte[] bytes, int numColors) {
-	int bytesOffset = 0;
-	RGB[] colors = new RGB[numColors];
-	for (int i = 0; i < numColors; i++) {
-		colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF,
-			bytes[bytesOffset + 1] & 0xFF,
-			bytes[bytesOffset] & 0xFF);
-		bytesOffset += 4;
-	}
-	return new PaletteData(colors);
-}
-/**
- * Answer a byte array containing the BMP representation of
- * the given device independent palette.
- */
-static byte[] paletteToBytes(PaletteData pal) {
-	int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
-	byte[] bytes = new byte[n * 4];
-	int offset = 0;
-	for (int i = 0; i < n; i++) {
-		RGB col = pal.colors[i];
-		bytes[offset] = (byte)col.blue;
-		bytes[offset + 1] = (byte)col.green;
-		bytes[offset + 2] = (byte)col.red;
-		offset += 4;
-	}
-	return bytes;
-}
 
-void flipScanLines(byte[] data, int stride, int height) {
-	int i1 = 0;
-	int i2 = (height - 1) * stride;
-	for (int i = 0; i < height / 2; i++) {
-		for (int index = 0; index < stride; index++) {
-			byte b = data[index + i1];
-			data[index + i1] = data[index + i2];
-			data[index + i2] = b;
+		int loadFileHeader(LEDataInputStream byteStream, boolean hasHeader) {
+			int[] fileHeader = new int[3];
+			try {
+				if (hasHeader) {
+					fileHeader[0] = byteStream.readShort();
+					fileHeader[1] = byteStream.readShort();
+				} else {
+					fileHeader[0] = 0;
+					fileHeader[1] = 1;
+				}
+				fileHeader[2] = byteStream.readShort();
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			int numIcons = fileHeader[2];
+			if (numIcons <= 0)
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			return numIcons;
 		}
-		i1 += stride;
-		i2 -= stride;
-	}
-}
 
-}
+		ImageData[] loadFromByteStream() {
+			int numIcons = loadFileHeader(inputStream);
+			int[][] headers = loadIconHeaders(numIcons);
+			ImageData[] icons = new ImageData[headers.length];
+			for (int i = 0; i < icons.length; i++) {
+				icons[i] = loadIcon(headers[i]);
+			}
+			return icons;
+		}
 
-static class WinICOFileFormat extends FileFormat {
-	
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
-/**
- * Answer the size in bytes of the file representation of the given
- * icon
- */
-int iconSize(ImageData i) {
-	int shapeDataStride = (i.width * i.depth + 31) / 32 * 4;
-	int maskDataStride = (i.width + 31) / 32 * 4;
-	int dataSize = (shapeDataStride + maskDataStride) * i.height;
-	int paletteSize = i.palette.colors != null ? i.palette.colors.length * 4 : 0;
-	return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize;
-}
-boolean isFileFormat(LEDataInputStream stream) {
-	try {
-		byte[] header = new byte[4];
-		stream.read(header);
-		stream.unread(header);
-		return header[0] == 0 && header[1] == 0 && header[2] == 1 && header[3] == 0;
-	} catch (Exception e) {
-		return false;
-	}
-}
-boolean isValidIcon(ImageData i) {
-	switch (i.depth) {
-		case 1:
-		case 4:
-		case 8:
-			if (i.palette.isDirect) return false;
-			int size = i.palette.colors.length;
-			return size == 2 || size == 16 || size == 32 || size == 256;
-		case 24:
-		case 32:
-			return i.palette.isDirect;
-	}
-	return false;
-}
-int loadFileHeader(LEDataInputStream byteStream) {
-	int[] fileHeader = new int[3];
-	try {
-		fileHeader[0] = byteStream.readShort();
-		fileHeader[1] = byteStream.readShort();
-		fileHeader[2] = byteStream.readShort();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int numIcons = fileHeader[2];
-	if (numIcons <= 0)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return numIcons;
-}
-int loadFileHeader(LEDataInputStream byteStream, boolean hasHeader) {
-	int[] fileHeader = new int[3];
-	try {
-		if (hasHeader) {
-			fileHeader[0] = byteStream.readShort();
-			fileHeader[1] = byteStream.readShort();
-		} else {
-			fileHeader[0] = 0;
-			fileHeader[1] = 1;
-		}
-		fileHeader[2] = byteStream.readShort();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int numIcons = fileHeader[2];
-	if (numIcons <= 0)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return numIcons;
-}
-ImageData[] loadFromByteStream() {
-	int numIcons = loadFileHeader(inputStream);
-	int[][] headers = loadIconHeaders(numIcons);
-	ImageData[] icons = new ImageData[headers.length];
-	for (int i = 0; i < icons.length; i++) {
-		icons[i] = loadIcon(headers[i]);
-	}
-	return icons;
-}
-/**
- * Load one icon from the byte stream.
- */
-ImageData loadIcon(int[] iconHeader) {
-	byte[] infoHeader = loadInfoHeader(iconHeader);
-	WinBMPFileFormat bmpFormat = new WinBMPFileFormat();
-	bmpFormat.inputStream = inputStream;
-	PaletteData palette = bmpFormat.loadPalette(infoHeader);
-	byte[] shapeData = bmpFormat.loadData(infoHeader);
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	infoHeader[14] = 1;
-	infoHeader[15] = 0;
-	byte[] maskData = bmpFormat.loadData(infoHeader);
-	maskData = convertPad(maskData, width, height, 1, 4, 2);
-	bitInvertData(maskData, 0, maskData.length);
-	return ImageData.internal_new(
-		width,
-		height,
-		depth,
-		palette,
-		4,
-		shapeData,
-		2,
-		maskData,
-		null,
-		-1,
-		-1,
-		SWT.IMAGE_ICO,
-		0,
-		0,
-		0,
-		0);
-}
-int[][] loadIconHeaders(int numIcons) {
-	int[][] headers = new int[numIcons][7];
-	try {
-		for (int i = 0; i < numIcons; i++) {
-			headers[i][0] = inputStream.read();
-			headers[i][1] = inputStream.read();
-			headers[i][2] = inputStream.readShort();
-			headers[i][3] = inputStream.readShort();
-			headers[i][4] = inputStream.readShort();
-			headers[i][5] = inputStream.readInt();
-			headers[i][6] = inputStream.readInt();
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	return headers;
-}
-byte[] loadInfoHeader(int[] iconHeader) {
-	int width = iconHeader[0];
-	int height = iconHeader[1];
-	int numColors = iconHeader[2]; // the number of colors is in the low byte, but the high byte must be 0
-	if (numColors == 0) numColors = 256; // this is specified: '00' represents '256' (0x100) colors
-	if ((numColors != 2) && (numColors != 8) && (numColors != 16) &&
-		(numColors != 32) && (numColors != 256))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	if (inputStream.getPosition() < iconHeader[6]) {
-		// Seek to the specified offset
-		try {
-			inputStream.skip(iconHeader[6] - inputStream.getPosition());
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-			return null;
+		/**
+		 * Load one icon from the byte stream.
+		 */
+		ImageData loadIcon(int[] iconHeader) {
+			byte[] infoHeader = loadInfoHeader(iconHeader);
+			WinBMPFileFormat bmpFormat = new WinBMPFileFormat();
+			bmpFormat.inputStream = inputStream;
+			PaletteData palette = bmpFormat.loadPalette(infoHeader);
+			byte[] shapeData = bmpFormat.loadData(infoHeader);
+			int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
+			int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
+			int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
+			infoHeader[14] = 1;
+			infoHeader[15] = 0;
+			byte[] maskData = bmpFormat.loadData(infoHeader);
+			maskData = convertPad(maskData, width, height, 1, 4, 2);
+			bitInvertData(maskData, 0, maskData.length);
+			return ImageData.internal_new(width, height, depth, palette, 4, shapeData, 2, maskData, null, -1, -1, SWT.IMAGE_ICO, 0, 0, 0, 0);
+		}
+
+		int[][] loadIconHeaders(int numIcons) {
+			int[][] headers = new int[numIcons][7];
+			try {
+				for (int i = 0; i < numIcons; i++) {
+					headers[i][0] = inputStream.read();
+					headers[i][1] = inputStream.read();
+					headers[i][2] = inputStream.readShort();
+					headers[i][3] = inputStream.readShort();
+					headers[i][4] = inputStream.readShort();
+					headers[i][5] = inputStream.readInt();
+					headers[i][6] = inputStream.readInt();
+				}
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			return headers;
+		}
+
+		byte[] loadInfoHeader(int[] iconHeader) {
+			int width = iconHeader[0];
+			int height = iconHeader[1];
+			int numColors = iconHeader[2]; // the number of colors is in the low byte, but the high byte must be 0
+			if (numColors == 0)
+				numColors = 256; // this is specified: '00' represents '256' (0x100) colors
+			if ((numColors != 2) && (numColors != 8) && (numColors != 16) && (numColors != 32) && (numColors != 256))
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			if (inputStream.getPosition() < iconHeader[6]) {
+				// Seek to the specified offset
+				try {
+					inputStream.skip(iconHeader[6] - inputStream.getPosition());
+				} catch (IOException e) {
+					SWT.error(SWT.ERROR_IO, e);
+					return null;
+				}
+			}
+			byte[] infoHeader = new byte[WinBMPFileFormat.BMPHeaderFixedSize];
+			try {
+				inputStream.read(infoHeader);
+			} catch (IOException e) {
+				SWT.error(SWT.ERROR_IO, e);
+			}
+			if (((infoHeader[12] & 0xFF) | ((infoHeader[13] & 0xFF) << 8)) != 1)
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			int infoWidth = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
+			int infoHeight = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
+			int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
+			if (height == infoHeight && bitCount == 1)
+				height /= 2;
+			if (!((width == infoWidth) && (height * 2 == infoHeight) && (bitCount == 1 || bitCount == 4 || bitCount == 8 || bitCount == 24 || bitCount == 32)))
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
+			infoHeader[8] = (byte) (height & 0xFF);
+			infoHeader[9] = (byte) ((height >> 8) & 0xFF);
+			infoHeader[10] = (byte) ((height >> 16) & 0xFF);
+			infoHeader[11] = (byte) ((height >> 24) & 0xFF);
+			return infoHeader;
 		}
 	}
-	byte[] infoHeader = new byte[WinBMPFileFormat.BMPHeaderFixedSize];
-	try {
-		inputStream.read(infoHeader);
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if (((infoHeader[12] & 0xFF) | ((infoHeader[13] & 0xFF) << 8)) != 1)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int infoWidth = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int infoHeight = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	if (height == infoHeight && bitCount == 1) height /= 2;
-	if (!((width == infoWidth) && (height * 2 == infoHeight) &&
-		(bitCount == 1 || bitCount == 4 || bitCount == 8 || bitCount == 24 || bitCount == 32)))
-			SWT.error(SWT.ERROR_INVALID_IMAGE);
-	infoHeader[8] = (byte)(height & 0xFF);
-	infoHeader[9] = (byte)((height >> 8) & 0xFF);
-	infoHeader[10] = (byte)((height >> 16) & 0xFF);
-	infoHeader[11] = (byte)((height >> 24) & 0xFF);
-	return infoHeader;
-}
-}
-static class SWT {
-	public static final int IMAGE_ICO = 3;
-	public static final int ERROR_IO = 39;
-	public static final int ERROR_INVALID_IMAGE = 40;
-	public static final int ERROR_NULL_ARGUMENT = 4;
-	public static final int ERROR_INVALID_ARGUMENT = 5;
-	public static final int ERROR_CANNOT_BE_ZERO = 7;
-	public static final int IMAGE_UNDEFINED = -1;
-	public static final int ERROR_UNSUPPORTED_DEPTH = 38;
-	public static final int TRANSPARENCY_MASK = 1 << 1;
-	public static final int ERROR_UNSUPPORTED_FORMAT = 42;
-	public static final int TRANSPARENCY_ALPHA = 1 << 0;
-	public static final int TRANSPARENCY_NONE = 0x0;
-	public static final int TRANSPARENCY_PIXEL = 1 << 2;
-	public static final int IMAGE_BMP = 0;
-	public static final int IMAGE_BMP_RLE = 1;
-	
-	public static void error(int code) {
-		throw new RuntimeException("Error "+code); //$NON-NLS-1$
-	}
-	public static void error(int code, Throwable t) {
-		throw new RuntimeException(t);
+
+	static class SWT {
+		public static final int IMAGE_ICO = 3;
+		public static final int ERROR_IO = 39;
+		public static final int ERROR_INVALID_IMAGE = 40;
+		public static final int ERROR_NULL_ARGUMENT = 4;
+		public static final int ERROR_INVALID_ARGUMENT = 5;
+		public static final int ERROR_CANNOT_BE_ZERO = 7;
+		public static final int IMAGE_UNDEFINED = -1;
+		public static final int ERROR_UNSUPPORTED_DEPTH = 38;
+		public static final int TRANSPARENCY_MASK = 1 << 1;
+		public static final int ERROR_UNSUPPORTED_FORMAT = 42;
+		public static final int TRANSPARENCY_ALPHA = 1 << 0;
+		public static final int TRANSPARENCY_NONE = 0x0;
+		public static final int TRANSPARENCY_PIXEL = 1 << 2;
+		public static final int IMAGE_BMP = 0;
+		public static final int IMAGE_BMP_RLE = 1;
+
+		public static void error(int code) {
+			throw new RuntimeException("Error " + code); //$NON-NLS-1$
+		}
+
+		public static void error(int code, Throwable t) {
+			throw new RuntimeException(t);
+		}
 	}
 }
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
index 0896a31..457323f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
@@ -9,8 +9,8 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
 
 public class AbstractAdvice implements IPublisherAdvice {
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
index 486fbbe..5c2aa81 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
@@ -12,24 +12,25 @@ package org.eclipse.equinox.p2.publisher;
 
 import java.io.*;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
+import org.eclipse.equinox.internal.p2.core.helpers.*;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.SingleElementCollector;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.internal.p2.publisher.QuotedTokenizer;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.actions.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.osgi.framework.Filter;
-import org.osgi.framework.InvalidSyntaxException;
 
 public abstract class AbstractPublisherAction implements IPublisherAction {
 	public static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
@@ -44,13 +45,13 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	public static String[] getArrayFromString(String list, String separator) {
 		if (list == null || list.trim().equals("")) //$NON-NLS-1$
 			return new String[0];
-		List result = new ArrayList();
-		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
+		List<String> result = new ArrayList<String>();
+		for (QuotedTokenizer tokens = new QuotedTokenizer(list, separator); tokens.hasMoreTokens();) {
 			String token = tokens.nextToken().trim();
 			if (!token.equals("")) //$NON-NLS-1$
 				result.add(token);
 		}
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 	/**
@@ -99,7 +100,7 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @return the LDAP filter for the given spec.  <code>null</code> if the given spec does not 
 	 * parse into a filter.
 	 */
-	protected String createFilterSpec(String configSpec) {
+	protected IMatchExpression<IInstallableUnit> createFilterSpec(String configSpec) {
 		String[] config = parseConfigSpec(configSpec);
 		if (config[0] != null || config[1] != null || config[2] != null) {
 			String filterWs = config[0] != null && config[0] != CONFIG_ANY ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -107,29 +108,17 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 			String filterArch = config[2] != null && config[2] != CONFIG_ANY ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0)
 				return null;
-			return "(& " + filterWs + filterOs + filterArch + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+			return InstallableUnit.parseFilter("(& " + filterWs + filterOs + filterArch + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		return null;
 	}
 
-	protected boolean filterMatches(String filter, String configSpec) {
+	protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) {
 		if (filter == null)
 			return true;
 
-		Filter ldapFilter = null;
-		try {
-			ldapFilter = Activator.context.createFilter(filter);
-		} catch (InvalidSyntaxException e) {
-			// TODO true or false on error?
-			return true;
-		}
-
 		String[] config = parseConfigSpec(configSpec);
-		Dictionary environment = new Hashtable(3);
-		environment.put("osgi.ws", config[0]); //$NON-NLS-1$
-		environment.put("osgi.os", config[1]); //$NON-NLS-1$
-		environment.put("osgi.arch", config[2]); //$NON-NLS-1$
-		return ldapFilter.match(environment);
+		return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2]));
 	}
 
 	/**
@@ -155,32 +144,29 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param children descriptions of the IUs on which requirements are to be made
 	 * @return a collection of RequiredCapabilities representing the given IUs
 	 */
-	protected Collection createIURequirements(Collection children) {
-		ArrayList result = new ArrayList(children.size());
-		for (Iterator i = children.iterator(); i.hasNext();) {
-			Object next = i.next();
+	protected Collection<IRequirement> createIURequirements(Collection<? extends IVersionedId> children) {
+		ArrayList<IRequirement> result = new ArrayList<IRequirement>(children.size());
+		for (IVersionedId next : children) {
 			if (next instanceof IInstallableUnit) {
 				IInstallableUnit iu = (IInstallableUnit) next;
 				VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
-				result.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
-			} else if (next instanceof VersionedName) {
-				VersionedName name = (VersionedName) next;
-				Version version = name.getVersion();
+				result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
+			} else {
+				Version version = next.getVersion();
 				VersionRange range = (version == null || Version.emptyVersion.equals(version)) ? VersionRange.emptyRange : new VersionRange(version, true, version, true);
-				String filter = getFilterAdvice(name);
-				result.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, name.getId(), range, filter, false, false));
+				IMatchExpression<IInstallableUnit> filter = getFilterAdvice(next);
+				result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, next.getId(), range, filter, false, false));
 			}
 		}
 		return result;
 	}
 
-	private String getFilterAdvice(VersionedName name) {
+	private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
 		if (info == null)
 			return null;
-		Collection filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
-		for (Iterator i = filterAdvice.iterator(); i.hasNext();) {
-			IFilterAdvice advice = (IFilterAdvice) i.next();
-			String result = advice.getFilter(name.getId(), name.getVersion(), false);
+		Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
+		for (IFilterAdvice advice : filterAdvice) {
+			IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
 			if (result != null)
 				return result;
 		}
@@ -195,7 +181,6 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	}
 
 	protected IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
-		final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
 		//TODO this size calculation is bogus
 		ArtifactDescriptor result = new ArtifactDescriptor(key);
 		if (pathOnDisk != null) {
@@ -203,15 +188,15 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 			// TODO - this is wrong but I'm testing a work-around for bug 205842
 			result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
 		}
-		ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+		IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
 		result.setProcessingSteps(steps);
-		result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
+		result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
 		return result;
 	}
 
-	protected InstallableUnitDescription createParentIU(Collection children, String id, Version version) {
+	protected InstallableUnitDescription createParentIU(Collection<? extends IVersionedId> children, String id, Version version) {
 		InstallableUnitDescription root = createIUShell(id, version);
-		root.addRequiredCapabilities(createIURequirements(children));
+		root.addRequirements(createIURequirements(children));
 		addSelfCapability(root);
 		return root;
 	}
@@ -231,18 +216,17 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	}
 
 	protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
-		Collection advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
+		Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
 		if (advice.isEmpty())
 			return null;
 
-		List ius = new ArrayList();
-		for (Iterator iterator = advice.iterator(); iterator.hasNext();) {
-			IAdditionalInstallableUnitAdvice entry = (IAdditionalInstallableUnitAdvice) iterator.next();
+		List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
+		for (IAdditionalInstallableUnitAdvice entry : advice) {
 			InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
 			if (others != null)
 				ius.addAll(Arrays.asList(others));
 		}
-		return (InstallableUnitDescription[]) ius.toArray(new InstallableUnitDescription[ius.size()]);
+		return ius.toArray(new InstallableUnitDescription[ius.size()]);
 	}
 
 	/**
@@ -251,16 +235,17 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param descriptor the descriptor to decorate
 	 * @param info the publisher info supplying the advice
 	 */
-	protected static void processArtifactPropertiesAdvice(IInstallableUnit iu, ArtifactDescriptor descriptor, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
-		for (Iterator i = advice.iterator(); i.hasNext();) {
-			IPropertyAdvice entry = (IPropertyAdvice) i.next();
-			Properties props = entry.getArtifactProperties(iu, descriptor);
+	protected static void processArtifactPropertiesAdvice(IInstallableUnit iu, IArtifactDescriptor descriptor, IPublisherInfo info) {
+		if (!(descriptor instanceof SimpleArtifactDescriptor))
+			return;
+
+		Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
+		for (IPropertyAdvice entry : advice) {
+			Map<String, String> props = entry.getArtifactProperties(iu, descriptor);
 			if (props == null)
 				continue;
-			for (Iterator j = props.keySet().iterator(); j.hasNext();) {
-				String key = (String) j.next();
-				descriptor.setRepositoryProperty(key, props.getProperty(key));
+			for (Entry<String, String> pe : props.entrySet()) {
+				((SimpleArtifactDescriptor) descriptor).setRepositoryProperty(pe.getKey(), pe.getValue());
 			}
 		}
 	}
@@ -271,15 +256,13 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param info the publisher info supplying the advice
 	 */
 	protected static void processInstallableUnitPropertiesAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
-		for (Iterator i = advice.iterator(); i.hasNext();) {
-			IPropertyAdvice entry = (IPropertyAdvice) i.next();
-			Properties props = entry.getInstallableUnitProperties(iu);
+		Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
+		for (IPropertyAdvice entry : advice) {
+			Map<String, String> props = entry.getInstallableUnitProperties(iu);
 			if (props == null)
 				continue;
-			for (Iterator j = props.keySet().iterator(); j.hasNext();) {
-				String key = (String) j.next();
-				iu.setProperty(key, props.getProperty(key));
+			for (Entry<String, String> pe : props.entrySet()) {
+				iu.setProperty(pe.getKey(), pe.getValue());
 			}
 		}
 	}
@@ -290,24 +273,32 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param info the publisher info supplying the advice
 	 */
 	protected static void processCapabilityAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ICapabilityAdvice.class);
+		Collection<ICapabilityAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ICapabilityAdvice.class);
 		if (advice.isEmpty())
 			return;
 
-		for (Iterator i = advice.iterator(); i.hasNext();) {
-			ICapabilityAdvice entry = (ICapabilityAdvice) i.next();
+		for (ICapabilityAdvice entry : advice) {
 
 			//process required capabilities
-			IRequiredCapability[] requiredAdvice = entry.getRequiredCapabilities(iu);
+			IRequirement[] requiredAdvice = entry.getRequiredCapabilities(iu);
 			if (requiredAdvice != null) {
-				IRequiredCapability[] current = iu.getRequiredCapabilities();
-				Set resultRequiredCapabilities = new HashSet(Arrays.asList(current));
+				List<IRequirement> current = iu.getRequirements();
+				Set<IRequirement> resultRequiredCapabilities = new HashSet<IRequirement>(current);
 
 				// remove current required capabilities that match (same name and namespace) advice.
-				for (int j = 0; j < current.length; j++) {
-					IRequiredCapability currentRequiredCapability = current[j];
+				for (int j = 0; j < current.size(); j++) {
+					IRequirement curr = current.get(j);
+					IRequiredCapability currentRequiredCapability = null;
+					if (curr instanceof IRequiredCapability)
+						currentRequiredCapability = (IRequiredCapability) curr;
+					else
+						continue;
 					for (int k = 0; k < requiredAdvice.length; k++) {
-						IRequiredCapability requiredCapability = requiredAdvice[k];
+						IRequiredCapability requiredCapability = null;
+						if (requiredAdvice[k] instanceof IRequiredCapability)
+							requiredCapability = (IRequiredCapability) requiredAdvice[k];
+						else
+							continue;
 						if (requiredCapability.getNamespace().equals(currentRequiredCapability.getNamespace()) && requiredCapability.getName().equals(currentRequiredCapability.getName())) {
 							resultRequiredCapabilities.remove(currentRequiredCapability);
 							break;
@@ -316,20 +307,28 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 				}
 				// add all advice
 				resultRequiredCapabilities.addAll(Arrays.asList(requiredAdvice));
-				iu.setRequiredCapabilities((IRequiredCapability[]) resultRequiredCapabilities.toArray(new IRequiredCapability[resultRequiredCapabilities.size()]));
+				iu.setRequirements(resultRequiredCapabilities.toArray(new IRequirement[resultRequiredCapabilities.size()]));
 			}
 
 			//process meta required capabilities
-			IRequiredCapability[] metaRequiredAdvice = entry.getMetaRequiredCapabilities(iu);
+			IRequirement[] metaRequiredAdvice = entry.getMetaRequiredCapabilities(iu);
 			if (metaRequiredAdvice != null) {
-				IRequiredCapability[] current = iu.getMetaRequiredCapabilities();
-				Set resultMetaRequiredCapabilities = new HashSet(Arrays.asList(current));
+				Collection<IRequirement> current = iu.getMetaRequirements();
+				Set<IRequirement> resultMetaRequiredCapabilities = new HashSet<IRequirement>(current);
 
 				// remove current meta-required capabilities that match (same name and namespace) advice.
-				for (int j = 0; j < current.length; j++) {
-					IRequiredCapability currentMetaRequiredCapability = current[j];
+				for (IRequirement curr : current) {
+					IRequiredCapability currentMetaRequiredCapability = null;
+					if (curr instanceof IRequiredCapability)
+						currentMetaRequiredCapability = (IRequiredCapability) curr;
+					else
+						continue;
 					for (int k = 0; k < metaRequiredAdvice.length; k++) {
-						IRequiredCapability metaRequiredCapability = metaRequiredAdvice[k];
+						IRequiredCapability metaRequiredCapability = null;
+						if (metaRequiredAdvice[k] instanceof IRequiredCapability)
+							metaRequiredCapability = (IRequiredCapability) metaRequiredAdvice[k];
+						else
+							continue;
 						if (metaRequiredCapability.getNamespace().equals(currentMetaRequiredCapability.getNamespace()) && metaRequiredCapability.getName().equals(currentMetaRequiredCapability.getName())) {
 							resultMetaRequiredCapabilities.remove(currentMetaRequiredCapability);
 							break;
@@ -339,16 +338,15 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 
 				// add all advice
 				resultMetaRequiredCapabilities.addAll(Arrays.asList(metaRequiredAdvice));
-				iu.setMetaRequiredCapabilities((IRequiredCapability[]) resultMetaRequiredCapabilities.toArray(new IRequiredCapability[resultMetaRequiredCapabilities.size()]));
+				iu.setMetaRequirements(resultMetaRequiredCapabilities.toArray(new IRequirement[resultMetaRequiredCapabilities.size()]));
 			}
 
 			//process provided capabilities
 			IProvidedCapability[] providedAdvice = entry.getProvidedCapabilities(iu);
 			if (providedAdvice != null) {
-				IProvidedCapability[] current = iu.getProvidedCapabilities();
-				Set resultProvidedCapabilities = new HashSet(Arrays.asList(current));
-				for (int j = 0; j < current.length; j++) {
-					IProvidedCapability currentProvidedCapability = current[j];
+				Collection<IProvidedCapability> current = iu.getProvidedCapabilities();
+				Set<IProvidedCapability> resultProvidedCapabilities = new HashSet<IProvidedCapability>(current);
+				for (IProvidedCapability currentProvidedCapability : current) {
 					for (int k = 0; k < providedAdvice.length; k++) {
 						IProvidedCapability providedCapability = providedAdvice[k];
 						if (providedCapability.getNamespace().equals(currentProvidedCapability.getNamespace()) && providedCapability.getName().equals(currentProvidedCapability.getName())) {
@@ -358,7 +356,7 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 					}
 				}
 				resultProvidedCapabilities.addAll(Arrays.asList(providedAdvice));
-				iu.setCapabilities((IProvidedCapability[]) resultProvidedCapabilities.toArray(new IProvidedCapability[resultProvidedCapabilities.size()]));
+				iu.setCapabilities(resultProvidedCapabilities.toArray(new IProvidedCapability[resultProvidedCapabilities.size()]));
 			}
 		}
 	}
@@ -369,19 +367,23 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param currentInstructions The set of touchpoint instructions assembled for this IU so far
 	 * @param info The publisher info
 	 */
-	protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map currentInstructions, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
+	protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info) {
+		processTouchpointAdvice(iu, currentInstructions, info, null);
+	}
+
+	protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info, String configSpec) {
+		Collection<ITouchpointAdvice> advice = info.getAdvice(configSpec, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
 		if (currentInstructions == null) {
-			if (advice.isEmpty())
+			if (advice == null || advice.isEmpty())
 				return;
-
-			currentInstructions = Collections.EMPTY_MAP;
+			currentInstructions = CollectionUtils.emptyMap();
 		}
 
 		ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
-		for (Iterator i = advice.iterator(); i.hasNext();) {
-			ITouchpointAdvice entry = (ITouchpointAdvice) i.next();
-			result = entry.getTouchpointData(result);
+		if (advice != null) {
+			for (ITouchpointAdvice entry : advice) {
+				result = entry.getTouchpointData(result);
+			}
 		}
 		iu.addTouchpointData(result);
 	}
@@ -402,9 +404,14 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 		if (destination == null || destination.contains(descriptor))
 			return;
 
+		// if all we are doing is indexing things then add the descriptor and get on with it
+		if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
+			destination.addDescriptor(descriptor);
+			return;
+		}
+
+		// if the file is already in the same location the repo will put it, just add the descriptor and exit
 		if (destination instanceof IFileArtifactRepository) {
-			// TODO  need to review this logic to ensure it makes sense.
-			// if the file is already in the same location the repo will put it, just add the descriptor and exit
 			File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
 			if (inclusion.equals(descriptorFile)) {
 				destination.addDescriptor(descriptor);
@@ -412,24 +419,7 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 			}
 		}
 
-		// if all we are doing is indexing things then add the descriptor and get on with it
-		if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
-			destination.addDescriptor(descriptor);
-			return;
-		}
 		try {
-			if (destination instanceof IFileArtifactRepository) {
-				// TODO  need to review this logic to ensure it makes sense.
-				// if the file is already in the same location the repo will put it, just add the descriptor and exit
-				File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
-				if (inclusion.equals(descriptorFile)) {
-					destination.addDescriptor(descriptor);
-					return;
-				}
-			}
-
-			// TODO need to implement the overwrite story in the repos
-			//			boolean overwrite = (info.getArtifactOptions() & IPublisherInfo.A_OVERWRITE) > 0;
 			OutputStream output = destination.getOutputStream(descriptor);
 			if (output == null)
 				return;
@@ -497,26 +487,20 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @return the first matching IU or <code>null</code> if none.
 	 */
 	protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
-		Query query = null;
-		Collector collector = null;
-		if (version != null && !Version.emptyVersion.equals(version)) {
-			query = new InstallableUnitQuery(iuId, version);
-			collector = new SingleElementCollector();
-		} else {
-			query = new CompositeQuery(new Query[] {new InstallableUnitQuery(iuId), new LatestIUVersionQuery()});
-			collector = new Collector();
-		}
+		IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
+		if (version == null || Version.emptyVersion.equals(version))
+			query = QueryUtil.createLatestQuery(query);
 
+		IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
 		NullProgressMonitor progress = new NullProgressMonitor();
 		if (publisherResult != null)
-			collector = publisherResult.query(query, collector, progress);
+			collector = publisherResult.query(query, progress);
 		if (collector.isEmpty() && info.getMetadataRepository() != null)
-			collector = info.getMetadataRepository().query(query, collector, progress);
+			collector = info.getMetadataRepository().query(query, progress);
 		if (collector.isEmpty() && info.getContextMetadataRepository() != null)
-			collector = info.getContextMetadataRepository().query(query, collector, progress);
-
+			collector = info.getContextMetadataRepository().query(query, progress);
 		if (!collector.isEmpty())
-			return (IInstallableUnit) collector.iterator().next();
+			return collector.iterator().next();
 		return null;
 	}
 
@@ -527,21 +511,18 @@ public abstract class AbstractPublisherAction implements IPublisherAction {
 	 * @param versionRange the version range to consider
 	 * @return The the IUs with the matching ids in the given range
 	 */
-	protected IInstallableUnit[] queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
-		Query query = null;
-		Collector collector = new Collector();
-		query = new InstallableUnitQuery(iuId, versionRange);
+	protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
+		IQuery<IInstallableUnit> query = null;
+		IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
+		query = QueryUtil.createIUQuery(iuId, versionRange);
 		NullProgressMonitor progress = new NullProgressMonitor();
 		if (publisherResult != null)
-			collector = publisherResult.query(query, collector, progress);
-		if (collector.isEmpty() && info.getMetadataRepository() != null)
-			collector = info.getMetadataRepository().query(query, collector, progress);
-		if (collector.isEmpty() && info.getContextMetadataRepository() != null)
-			collector = info.getContextMetadataRepository().query(query, collector, progress);
-
-		if (!collector.isEmpty())
-			return (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);
-		return new IInstallableUnit[0];
+			queryResult = publisherResult.query(query, progress);
+		if (queryResult.isEmpty() && info.getMetadataRepository() != null)
+			queryResult = info.getMetadataRepository().query(query, progress);
+		if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
+			queryResult = info.getContextMetadataRepository().query(query, progress);
+		return queryResult;
 	}
 
 	public abstract IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
index c208684..99410f0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
@@ -14,25 +14,23 @@ package org.eclipse.equinox.p2.publisher;
 import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
 import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
 import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.ServiceReference;
 
 public abstract class AbstractPublisherApplication implements IApplication {
 
@@ -47,12 +45,6 @@ public abstract class AbstractPublisherApplication implements IApplication {
 
 	static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
 
-	private ArtifactRepositoryManager defaultArtifactManager;
-	private ServiceRegistration registrationDefaultArtifactManager;
-	private MetadataRepositoryManager defaultMetadataManager;
-	private ServiceRegistration registrationDefaultMetadataManager;
-	private IProvisioningEventBus bus;
-	private ServiceRegistration registrationBus;
 	protected PublisherInfo info;
 	protected String source;
 	protected URI metadataLocation;
@@ -69,6 +61,10 @@ public abstract class AbstractPublisherApplication implements IApplication {
 	protected String[] configurations;
 	private IStatus status;
 
+	private ServiceReference agentRef;
+
+	protected IProvisioningAgent agent;
+
 	/**
 	 * Returns the error message for this application, or the empty string
 	 * if the application terminated successfully.
@@ -77,76 +73,93 @@ public abstract class AbstractPublisherApplication implements IApplication {
 		return status;
 	}
 
-	protected void initialize(PublisherInfo info) throws ProvisionException {
+	protected void initialize(PublisherInfo publisherInfo) throws ProvisionException {
 		if (inplace) {
 			File location = new File(source);
 			if (metadataLocation == null)
 				metadataLocation = location.toURI();
 			if (artifactLocation == null)
 				artifactLocation = location.toURI();
-			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
+			publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
 		}
-		initializeRepositories(info);
+		initializeRepositories(publisherInfo);
 	}
 
 	protected IStatus createConfigurationEror(String message) {
 		return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
 	}
 
-	protected void initializeRepositories(PublisherInfo info) throws ProvisionException {
-		if (artifactLocation != null)
-			info.setArtifactRepository(Publisher.createArtifactRepository(artifactLocation, artifactRepoName, append, compress, reusePackedFiles));
-		else if ((info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
+	private boolean isEmpty(IArtifactRepository repo) {
+		IQueryResult<IArtifactKey> result = repo.query(QueryUtil.createLimitQuery(ArtifactKeyQuery.ALL_KEYS, 1), null);
+		return result.isEmpty();
+	}
+
+	protected void initializeRepositories(PublisherInfo publisherInfo) throws ProvisionException {
+		if (artifactLocation != null) {
+			IArtifactRepository repo = Publisher.createArtifactRepository(agent, artifactLocation, artifactRepoName, compress, reusePackedFiles);
+			if (!append && !isEmpty(repo)) {
+				File repoLocation = URIUtil.toFile(artifactLocation);
+				if (repoLocation != null && source != null) {
+					if (repoLocation.isFile())
+						repoLocation = repoLocation.getParentFile();
+					if (repoLocation.equals(new File(source)))
+						throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
+				}
+				repo.removeAll();
+			}
+			publisherInfo.setArtifactRepository(repo);
+		} else if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
 			throw new ProvisionException(createConfigurationEror(Messages.exception_noArtifactRepo));
 		if (metadataLocation == null)
 			throw new ProvisionException(createConfigurationEror(Messages.exception_noMetadataRepo));
-		info.setMetadataRepository(Publisher.createMetadataRepository(metadataLocation, metadataRepoName, append, compress));
+		publisherInfo.setMetadataRepository(Publisher.createMetadataRepository(agent, metadataLocation, metadataRepoName, append, compress));
 
 		if (contextMetadataRepositories != null && contextMetadataRepositories.length > 0) {
-			CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite();
+			CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite(agent);
 			if (contextMetadata != null) {
 				for (int i = 0; i < contextMetadataRepositories.length; i++)
 					contextMetadata.addChild(contextMetadataRepositories[i]);
 				if (contextMetadata.getChildren().size() > 0)
-					info.setContextMetadataRepository(contextMetadata);
+					publisherInfo.setContextMetadataRepository(contextMetadata);
 			}
 		}
 		if (contextArtifactRepositories != null && contextArtifactRepositories.length > 0) {
-			CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite();
+			CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite(agent);
 			if (contextArtifact != null) {
 				for (int i = 0; i < contextArtifactRepositories.length; i++)
 					contextArtifact.addChild(contextArtifactRepositories[i]);
 
 				if (contextArtifact.getChildren().size() > 0)
-					info.setContextArtifactRepository(contextArtifact);
+					publisherInfo.setContextArtifactRepository(contextArtifact);
 			}
 		}
 	}
 
-	protected void processCommandLineArguments(String[] args, PublisherInfo info) throws Exception {
+	protected void processCommandLineArguments(String[] args, PublisherInfo publisherInfo) throws Exception {
 		if (args == null)
 			return;
 		for (int i = 0; i < args.length; i++) {
 			// check for args without parameters (i.e., a flag arg)
-			processFlag(args[i], info);
+			processFlag(args[i], publisherInfo);
 
 			// check for args with parameters. If we are at the last argument or if the next one
 			// has a '-' as the first character, then we can't have an arg with a parm so continue.
 			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
 				continue;
-			processParameter(args[i], args[++i], info);
+			processParameter(args[i], args[++i], publisherInfo);
 		}
 	}
 
-	protected void processParameter(String arg, String parameter, PublisherInfo info) throws URISyntaxException {
+	@SuppressWarnings("unused")
+	protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
 		try {
 			if (arg.equalsIgnoreCase("-metadataRepository") || arg.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$
 				metadataLocation = URIUtil.fromString(parameter);
 
-			if (arg.equalsIgnoreCase("-artifactRepository") | arg.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
+			if (arg.equalsIgnoreCase("-artifactRepository") || arg.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
 				artifactLocation = URIUtil.fromString(parameter);
 		} catch (URISyntaxException e) {
-			throw new IllegalArgumentException("Repository location (" + parameter + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
+			throw new IllegalArgumentException(NLS.bind(Messages.exception_repoMustBeURL, parameter));
 		}
 
 		if (arg.equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$
@@ -156,7 +169,7 @@ public abstract class AbstractPublisherApplication implements IApplication {
 			// check here to see if the location actually exists so we can fail gracefully now rather than unpredictably later
 			// see bug 272956 where we would fail with an NPE if someone gave us a URL instead of a file-system path
 			if (!new File(parameter).exists())
-				throw new IllegalArgumentException("Source location (" + parameter + ") must be a valid file-system path.");
+				throw new IllegalArgumentException(NLS.bind(Messages.exception_sourcePath, parameter));
 			source = parameter;
 		}
 
@@ -164,61 +177,43 @@ public abstract class AbstractPublisherApplication implements IApplication {
 			artifactRepoName = parameter;
 
 		if (arg.equalsIgnoreCase("-configs")) //$NON-NLS-1$
-			info.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$
+			publisherInfo.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$
 
 		if (arg.equalsIgnoreCase("-contextMetadata")) //$NON-NLS-1$
-			info.setContextMetadataRepository(processMetadataRepositoryList(parameter));
+			setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories);
 
 		if (arg.equalsIgnoreCase("-contextArtifacts")) //$NON-NLS-1$
-			info.setContextArtifactRepository(processArtifactRepositoryList(parameter));
+			setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter));
 	}
 
-	private IArtifactRepository processArtifactRepositoryList(String parameter) {
+	private URI[] processRepositoryList(String parameter) {
 		String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
 		if (list == null || list.length == 0)
 			return null;
 
-		CompositeArtifactRepository result = CompositeArtifactRepository.createMemoryComposite();
+		List<URI> result = new ArrayList<URI>(list.length);
 		if (result != null) {
 			for (int i = 0; i < list.length; i++) {
 				try {
-					result.addChild(URIUtil.fromString(list[i]));
+					result.add(URIUtil.fromString(list[i]));
 				} catch (URISyntaxException e) {
 					// TODO Auto-generated catch block
 					e.printStackTrace();
 				}
 			}
 		}
-		return result;
-	}
-
-	private IMetadataRepository processMetadataRepositoryList(String parameter) {
-		String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
-		if (list == null || list.length == 0)
-			return null;
-
-		CompositeMetadataRepository result = CompositeMetadataRepository.createMemoryComposite();
-		if (result != null) {
-			for (int i = 0; i < list.length; i++) {
-				try {
-					result.addChild(URIUtil.fromString(list[i]));
-				} catch (URISyntaxException e) {
-					// TODO Auto-generated catch block
-				}
-			}
-		}
-		return result;
+		return result.toArray(new URI[result.size()]);
 	}
 
-	protected void processFlag(String arg, PublisherInfo info) {
+	protected void processFlag(String arg, PublisherInfo publisherInfo) {
 		if (arg.equalsIgnoreCase("-publishArtifacts") || arg.equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
-			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
+			publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
 
 		if (arg.equalsIgnoreCase("-publishArtifactRepository") || arg.equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
-			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX);
+			publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX);
 
 		if (arg.equalsIgnoreCase("-overwriteArtifacts")) //$NON-NLS-1$ 
-			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_OVERWRITE);
+			publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_OVERWRITE);
 
 		if (arg.equalsIgnoreCase("-append")) //$NON-NLS-1$
 			append = true;
@@ -233,25 +228,22 @@ public abstract class AbstractPublisherApplication implements IApplication {
 			inplace = true;
 	}
 
-	private void registerDefaultArtifactRepoManager() {
-		if (ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName()) == null) {
-			defaultArtifactManager = new ArtifactRepositoryManager();
-			registrationDefaultArtifactManager = Activator.getContext().registerService(IArtifactRepositoryManager.class.getName(), defaultArtifactManager, null);
-		}
-	}
-
-	private void registerDefaultMetadataRepoManager() {
-		if (ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName()) == null) {
-			defaultMetadataManager = new MetadataRepositoryManager();
-			registrationDefaultMetadataManager = Activator.getContext().registerService(IMetadataRepositoryManager.class.getName(), defaultMetadataManager, null);
-		}
-	}
-
-	private void registerEventBus() {
-		if (ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME) == null) {
-			bus = new ProvisioningEventBus();
-			registrationBus = Activator.getContext().registerService(IProvisioningEventBus.SERVICE_NAME, bus, null);
+	private void setupAgent() throws ProvisionException {
+		agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
+		if (agentRef != null) {
+			agent = (IProvisioningAgent) Activator.getContext().getService(agentRef);
+			if (agent != null)
+				return;
 		}
+		ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		if (providerRef == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(providerRef);
+		if (provider == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		//obtain agent for currently running system
+		agent = provider.createAgent(null);
+		Activator.getContext().ungetService(providerRef);
 	}
 
 	public Object run(String args[]) throws Exception {
@@ -276,18 +268,16 @@ public abstract class AbstractPublisherApplication implements IApplication {
 		return new PublisherInfo();
 	}
 
-	public Object run(PublisherInfo info) throws Exception {
+	public Object run(PublisherInfo publisherInfo) throws Exception {
 		try {
-			registerEventBus();
-			registerDefaultMetadataRepoManager();
-			registerDefaultArtifactRepoManager();
-			initialize(info);
-			validateInfo(info);
-			System.out.println(NLS.bind(Messages.message_generatingMetadata, info.getSummary()));
+			this.info = publisherInfo;
+			setupAgent();
+			initialize(publisherInfo);
+			System.out.println(NLS.bind(Messages.message_generatingMetadata, publisherInfo.getSummary()));
 
 			long before = System.currentTimeMillis();
 			IPublisherAction[] actions = createActions();
-			Publisher publisher = createPublisher(info);
+			Publisher publisher = createPublisher(publisherInfo);
 			IStatus result = publisher.publish(actions, new NullProgressMonitor());
 			long after = System.currentTimeMillis();
 
@@ -307,15 +297,8 @@ public abstract class AbstractPublisherApplication implements IApplication {
 
 	protected abstract IPublisherAction[] createActions();
 
-	protected Publisher createPublisher(PublisherInfo info) {
-		return new Publisher(info);
-	}
-
-	protected void validateInfo(PublisherInfo info) {
-		//		if (info.getBaseLocation() == null && info.getProduct() == null) {
-		//			System.out.println(Messages.exception_baseLocationNotSpecified);
-		//			return new Integer(-1);
-		//		}
+	protected Publisher createPublisher(PublisherInfo publisherInfo) {
+		return new Publisher(publisherInfo);
 	}
 
 	public Object start(IApplicationContext context) throws Exception {
@@ -323,17 +306,9 @@ public abstract class AbstractPublisherApplication implements IApplication {
 	}
 
 	public void stop() {
-		if (registrationDefaultMetadataManager != null) {
-			registrationDefaultMetadataManager.unregister();
-			registrationDefaultMetadataManager = null;
-		}
-		if (registrationDefaultArtifactManager != null) {
-			registrationDefaultArtifactManager.unregister();
-			registrationDefaultArtifactManager = null;
-		}
-		if (registrationBus != null) {
-			registrationBus.unregister();
-			registrationBus = null;
+		if (agentRef != null) {
+			Activator.getContext().ungetService(agentRef);
+			agentRef = null;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
index 94768d1..a0777d4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
@@ -9,7 +9,7 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 
 public interface IPublisherAdvice {
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
index 582c595..bba320f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.p2.publisher;
 
 import java.util.Collection;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 public interface IPublisherInfo {
 
@@ -35,6 +35,13 @@ public interface IPublisherInfo {
 	public static final int A_OVERWRITE = 4;
 
 	/**
+	 * A bitwise flag indicating that MD5 hash should not be generated when 
+	 * publishing an artifact. When this flag is not specified the MD5 hash will
+	 * be generated by default.
+	 */
+	public static final int A_NO_MD5 = 8;
+
+	/**
 	 * Returns the artifact repository into which any publishable artifacts are published
 	 * or <code>null</code> if none.
 	 * @return a destination artifact repository or <code>null</code>
@@ -65,7 +72,7 @@ public interface IPublisherInfo {
 	 * @param includeDefault whether or not to merge in the advice common to all configurations
 	 * @return the set of advice of the given type for the given configuration
 	 */
-	public Collection getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class type);
+	public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type);
 
 	/**
 	 * Add the given advice to the set of publishing advices.  
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
index d8b2104..44a56d4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.p2.publisher;
 
 import java.util.Collection;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.IQueryable;
 
 /**
  * Publisher results represent the result of running a publishing operation.  A result is a 
@@ -22,7 +22,7 @@ import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
  * determined by the actions involved in the operation and it is up to the consumer of the
  * result to interpret the collections.
  */
-public interface IPublisherResult extends IQueryable {
+public interface IPublisherResult extends IQueryable<IInstallableUnit> {
 	/**
 	 * Merge mode setting that causes all root results to be merged into 
 	 * the root of the merged results and all non-roots to become non-roots.
@@ -69,7 +69,7 @@ public interface IPublisherResult extends IQueryable {
 	 * @param ius the IUs to add
 	 * @param type the type of the IUs in this result
 	 */
-	public void addIUs(Collection ius, String type);
+	public void addIUs(Collection<IInstallableUnit> ius, String type);
 
 	/**
 	 * Returns the IUs of the given type with the given id in this result.
@@ -79,7 +79,7 @@ public interface IPublisherResult extends IQueryable {
 	 * @see #ROOT
 	 * @see #NON_ROOT
 	 */
-	public Collection getIUs(String id, String type);
+	public Collection<IInstallableUnit> getIUs(String id, String type);
 
 	/**
 	 * Returns the first available IU of the given type with the given id in this result.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
index 19467b9..49eeb0c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -13,38 +13,39 @@ package org.eclipse.equinox.p2.publisher;
 import java.net.URI;
 import java.util.Collection;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 
 public class Publisher {
 	static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
+	private static final long SERVICE_TIMEOUT = 5000;
 
 	private IPublisherInfo info;
 	private IPublisherResult results;
 
 	/**
-	 * Returns a metadata repository that corresponds to the given settings.  If a repo at the 
+	 * Returns a metadata repository that corresponds to the given settings.  If a repository at the 
 	 * given location already exists, it is updated with the settings and returned.  If no repository
 	 * is found then a new Simple repository is created, configured and returned
-	 * @param location the URL location of the repo
-	 * @param name the name of the repo
-	 * @param append whether or not the repo should appended or cleared
+	 * @param agent the provisioning agent to use when creating the repository
+	 * @param location the URL location of the repository
+	 * @param name the name of the repository
+	 * @param append whether or not the repository should appended or cleared
 	 * @param compress whether or not to compress the repository index
 	 * @return the discovered or created repository
 	 * @throws ProvisionException
 	 */
-	public static IMetadataRepository createMetadataRepository(URI location, String name, boolean append, boolean compress) throws ProvisionException {
+	public static IMetadataRepository createMetadataRepository(IProvisioningAgent agent, URI location, String name, boolean append, boolean compress) throws ProvisionException {
 		try {
-			IMetadataRepository result = loadMetadataRepository(location, true, true);
+			IMetadataRepository result = loadMetadataRepository(agent, location, true, true);
 			if (result != null && result.isModifiable()) {
 				result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
 				if (!append)
@@ -56,7 +57,7 @@ public class Publisher {
 		}
 
 		// 	the given repo location is not an existing repo so we have to create something
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
 		String repositoryName = name == null ? location + " - metadata" : name; //$NON-NLS-1$
 		IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
 		if (result != null) {
@@ -71,14 +72,14 @@ public class Publisher {
 
 	/**
 	 * Load a metadata repository from the given location.
-	 * @param location the URI location of the repo
+	 * @param location the URI location of the repository
 	 * @param modifiable whether to ask the manager for a modifiable repository
 	 * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
 	 * @return the loaded repository
 	 * @throws ProvisionException
 	 */
-	public static IMetadataRepository loadMetadataRepository(URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.context, IMetadataRepositoryManager.class.getName());
+	public static IMetadataRepository loadMetadataRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
+		IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
 		boolean existing = manager.contains(location);
 
 		IMetadataRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
@@ -88,33 +89,31 @@ public class Publisher {
 	}
 
 	/**
-	 * Returns an artifact repository that corresponds to the given settings.  If a repo at the 
+	 * Returns an artifact repository that corresponds to the given settings.  If a repository at the 
 	 * given location already exists, it is updated with the settings and returned.  If no repository
 	 * is found then a new Simple repository is created, configured and returned
-	 * @param location the URL location of the repo
-	 * @param name the name of the repo
-	 * @param append whether or not the repo should appended or cleared
+	 * @param agent the provisioning agent to use when creating the repository
+	 * @param location the URL location of the repository
+	 * @param name the name of the repository
 	 * @param compress whether or not to compress the repository index
 	 * @param reusePackedFiles whether or not to include discovered Pack200 files in the repository
 	 * @return the discovered or created repository
 	 * @throws ProvisionException
 	 */
-	public static IArtifactRepository createArtifactRepository(URI location, String name, boolean append, boolean compress, boolean reusePackedFiles) throws ProvisionException {
+	public static IArtifactRepository createArtifactRepository(IProvisioningAgent agent, URI location, String name, boolean compress, boolean reusePackedFiles) throws ProvisionException {
 		try {
-			IArtifactRepository result = loadArtifactRepository(location, true, true);
+			IArtifactRepository result = loadArtifactRepository(agent, location, true, true);
 			if (result != null && result.isModifiable()) {
 				result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
 				if (reusePackedFiles)
 					result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
-				if (!append)
-					result.removeAll();
 				return result;
 			}
 		} catch (ProvisionException e) {
 			//fall through and create a new repository
 		}
 
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
+		IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
 		String repositoryName = name != null ? name : location + " - artifacts"; //$NON-NLS-1$
 		IArtifactRepository result = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
 		if (result != null) {
@@ -131,14 +130,14 @@ public class Publisher {
 
 	/**
 	 * Load an artifact repository from the given location.
-	 * @param location the URI location of the repo
+	 * @param location the URI location of the repository
 	 * @param modifiable whether to ask the manager for a modifiable repository
 	 * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
 	 * @return the loaded repository
 	 * @throws ProvisionException
 	 */
-	public static IArtifactRepository loadArtifactRepository(URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.context, IArtifactRepositoryManager.class.getName());
+	public static IArtifactRepository loadArtifactRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
+		IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
 		boolean existing = manager.contains(location);
 
 		IArtifactRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
@@ -152,11 +151,72 @@ public class Publisher {
 		results = new PublisherResult();
 	}
 
+	/**
+	 * Obtains a service from the agent, waiting for a reasonable timeout period
+	 * if the service is not yet available. This method never returns <code>null</code>;
+	 * an exception is thrown if the service could not be obtained.
+	 * 
+	 * @param <T> The type of the service to return
+	 * @param agent The agent to obtain the service from
+	 * @param serviceName The name of the service to obtain
+	 * @return The service instance
+	 */
+	@SuppressWarnings("unchecked")
+	protected static <T> T getService(IProvisioningAgent agent, String serviceName) {
+		T service = (T) agent.getService(serviceName);
+		if (service != null)
+			return service;
+		long start = System.currentTimeMillis();
+		do {
+			try {
+				Thread.sleep(100);
+			} catch (InterruptedException e) {
+				//ignore and keep waiting
+			}
+			service = (T) agent.getService(serviceName);
+			if (service != null)
+				return service;
+		} while ((System.currentTimeMillis() - start) < SERVICE_TIMEOUT);
+		//could not obtain the service
+		throw new IllegalStateException("Unable to obtain required service: " + serviceName); //$NON-NLS-1$
+	}
+
 	public Publisher(IPublisherInfo info, IPublisherResult results) {
 		this.info = info;
 		this.results = results;
 	}
 
+	class ArtifactProcess implements IRunnableWithProgress {
+
+		private final IPublisherAction[] actions;
+		private final IPublisherInfo info;
+		private IStatus result = null;
+
+		public ArtifactProcess(IPublisherAction[] actions, IPublisherInfo info) {
+			this.info = info;
+			this.actions = actions;
+		}
+
+		public void run(IProgressMonitor monitor) {
+			MultiStatus finalStatus = new MultiStatus("this", 0, "publishing result", null); //$NON-NLS-1$//$NON-NLS-2$
+			for (int i = 0; i < actions.length; i++) {
+				if (monitor.isCanceled()) {
+					result = Status.CANCEL_STATUS;
+					return;
+				}
+				IStatus status = actions[i].perform(info, results, monitor);
+				finalStatus.merge(status);
+				monitor.worked(1);
+			}
+			result = finalStatus;
+		}
+
+		public IStatus getStatus() {
+			return result;
+		}
+
+	}
+
 	public IStatus publish(IPublisherAction[] actions, IProgressMonitor monitor) {
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
@@ -164,15 +224,20 @@ public class Publisher {
 		if (Tracing.DEBUG_PUBLISHING)
 			Tracing.debug("Invoking publisher"); //$NON-NLS-1$
 		try {
-			// run all the actions
-			MultiStatus finalStatus = new MultiStatus("this", 0, "publishing result", null); //$NON-NLS-1$//$NON-NLS-2$
-			for (int i = 0; i < actions.length; i++) {
-				if (sub.isCanceled())
-					return Status.CANCEL_STATUS;
-				IStatus status = actions[i].perform(info, results, monitor);
-				finalStatus.merge(status);
-				sub.worked(1);
+			ArtifactProcess artifactProcess = new ArtifactProcess(actions, info);
+
+			IStatus finalStatus = null;
+			if (info.getArtifactRepository() != null) {
+				finalStatus = info.getArtifactRepository().executeBatch(artifactProcess, sub);
+				if (finalStatus.isOK())
+					// If the batch process didn't report any errors, then 
+					// Use the status from our actions
+					finalStatus = artifactProcess.getStatus();
+			} else {
+				artifactProcess.run(sub);
+				finalStatus = artifactProcess.getStatus();
 			}
+
 			if (Tracing.DEBUG_PUBLISHING)
 				Tracing.debug("Publishing complete. Result=" + finalStatus); //$NON-NLS-1$
 			if (!finalStatus.isOK())
@@ -183,8 +248,8 @@ public class Publisher {
 		// if there were no errors, publish all the ius.
 		IMetadataRepository metadataRepository = info.getMetadataRepository();
 		if (metadataRepository != null) {
-			Collection ius = results.getIUs(null, null);
-			metadataRepository.addInstallableUnits((IInstallableUnit[]) ius.toArray(new IInstallableUnit[ius.size()]));
+			Collection<IInstallableUnit> ius = results.getIUs(null, null);
+			metadataRepository.addInstallableUnits(ius);
 		}
 		return Status.OK_STATUS;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
index 523d651..a72a78a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.p2.publisher;
 
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 public class PublisherInfo implements IPublisherInfo {
 
@@ -23,18 +23,23 @@ public class PublisherInfo implements IPublisherInfo {
 	private IMetadataRepository contextMetadataRepository;
 	private IArtifactRepository contextArtifactRepository;
 	private String[] configurations = new String[0];
-	private List adviceList = new ArrayList(11);
+	private List<IPublisherAdvice> adviceList = new ArrayList<IPublisherAdvice>(11);
 
 	public void addAdvice(IPublisherAdvice advice) {
 		adviceList.add(advice);
 	}
 
-	public Collection getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class type) {
-		ArrayList result = new ArrayList();
-		for (Iterator i = adviceList.iterator(); i.hasNext();) {
-			Object object = i.next();
-			if (type.isInstance(object) && ((IPublisherAdvice) object).isApplicable(configSpec, includeDefault, id, version))
-				result.add(object);
+	public List<IPublisherAdvice> getAdvice() {
+		return adviceList;
+	}
+
+	@SuppressWarnings("unchecked")
+	public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type) {
+		ArrayList<T> result = new ArrayList<T>();
+		for (IPublisherAdvice advice : adviceList) {
+			if (type.isInstance(advice) && advice.isApplicable(configSpec, includeDefault, id, version))
+				// Ideally, we would use Class.cast here but it was introduced in Java 1.5
+				result.add((T) advice);
 		}
 		return result;
 	}
@@ -88,7 +93,7 @@ public class PublisherInfo implements IPublisherInfo {
 	}
 
 	public String getSummary() {
-		return ".";
+		return "."; //$NON-NLS-1$
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
index ecd7a47..cf7d2a0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -7,58 +7,49 @@
  * Contributors: 
  *   Code 9 - initial API and implementation
  *   IBM - ongoing development
+ *   Cloudsmith Inc. - query indexes
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher;
 
 import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
+import org.eclipse.equinox.internal.p2.metadata.IUMap;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
+import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
+import org.eclipse.equinox.internal.p2.metadata.index.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.index.IIndex;
+import org.eclipse.equinox.p2.query.IQueryResult;
 
-public class PublisherResult implements IPublisherResult {
+public class PublisherResult extends IndexProvider<IInstallableUnit> implements IPublisherResult {
 
-	private static final Collection EMPTY_COLLECTION = new ArrayList(0);
-	final Map rootIUs = new HashMap();
-	final Map nonRootIUs = new HashMap();
+	final IUMap rootIUs = new IUMap();
+	final IUMap nonRootIUs = new IUMap();
+
+	private IIndex<IInstallableUnit> idIndex;
 
 	public void addIU(IInstallableUnit iu, String type) {
 		if (type == ROOT)
-			addIU(rootIUs, iu.getId(), iu);
+			rootIUs.add(iu);
 		if (type == NON_ROOT)
-			addIU(nonRootIUs, iu.getId(), iu);
+			nonRootIUs.add(iu);
 	}
 
-	public void addIUs(Collection ius, String type) {
-		for (Iterator i = ius.iterator(); i.hasNext();)
-			addIU((IInstallableUnit) i.next(), type);
-	}
-
-	private void addIU(Map map, String id, IInstallableUnit iu) {
-		Set ius = (Set) map.get(id);
-		if (ius == null) {
-			ius = new HashSet(11);
-			map.put(id, ius);
-		}
-		ius.add(iu);
+	public void addIUs(Collection<IInstallableUnit> ius, String type) {
+		for (IInstallableUnit iu : ius)
+			addIU(iu, type);
 	}
 
 	public IInstallableUnit getIU(String id, Version version, String type) {
 		if (type == null || type == ROOT) {
-			Collection ius = (Collection) rootIUs.get(id);
-			for (Iterator i = ius.iterator(); i.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) i.next();
-				if (iu.getVersion().equals(version))
-					return iu;
-			}
+			IInstallableUnit result = rootIUs.get(id, version);
+			if (result != null)
+				return result;
 		}
 		if (type == null || type == NON_ROOT) {
-			Collection ius = (Collection) nonRootIUs.get(id);
-			for (Iterator i = ius.iterator(); i.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) i.next();
-				if (iu.getVersion().equals(version))
-					return iu;
-			}
+			IInstallableUnit result = nonRootIUs.get(id, version);
+			if (result != null)
+				return result;
 		}
 		return null;
 	}
@@ -67,14 +58,14 @@ public class PublisherResult implements IPublisherResult {
 	// matching IU non-deterministically.
 	public IInstallableUnit getIU(String id, String type) {
 		if (type == null || type == ROOT) {
-			Collection ius = (Collection) rootIUs.get(id);
-			if (ius != null && ius.size() > 0)
-				return (IInstallableUnit) ius.iterator().next();
+			IQueryResult<IInstallableUnit> ius = rootIUs.get(id);
+			if (!ius.isEmpty())
+				return ius.iterator().next();
 		}
 		if (type == null || type == NON_ROOT) {
-			Collection ius = (Collection) nonRootIUs.get(id);
-			if (ius != null && ius.size() > 0)
-				return (IInstallableUnit) ius.iterator().next();
+			IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id);
+			if (!ius.isEmpty())
+				return ius.iterator().next();
 		}
 		return null;
 	}
@@ -82,33 +73,21 @@ public class PublisherResult implements IPublisherResult {
 	/**
 	 * Returns the IUs in this result with the given id.
 	 */
-	public Collection getIUs(String id, String type) {
+	public Collection<IInstallableUnit> getIUs(String id, String type) {
 		if (type == null) {
-			ArrayList result = new ArrayList();
-			result.addAll(id == null ? flatten(rootIUs.values()) : getIUs(rootIUs, id));
-			result.addAll(id == null ? flatten(nonRootIUs.values()) : getIUs(nonRootIUs, id));
+			// TODO can this be optimized?
+			ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>();
+			result.addAll(rootIUs.get(id).toUnmodifiableSet());
+			result.addAll(nonRootIUs.get(id).toUnmodifiableSet());
 			return result;
 		}
 		if (type == ROOT)
-			return id == null ? flatten(rootIUs.values()) : (Collection) rootIUs.get(id);
+			return rootIUs.get(id).toUnmodifiableSet();
 		if (type == NON_ROOT)
-			return id == null ? flatten(nonRootIUs.values()) : (Collection) nonRootIUs.get(id);
+			return nonRootIUs.get(id).toUnmodifiableSet();
 		return null;
 	}
 
-	private Collection getIUs(Map ius, String id) {
-		Collection result = (Collection) ius.get(id);
-		return result == null ? EMPTY_COLLECTION : result;
-	}
-
-	private List flatten(Collection values) {
-		ArrayList result = new ArrayList();
-		for (Iterator i = values.iterator(); i.hasNext();)
-			for (Iterator j = ((HashSet) i.next()).iterator(); j.hasNext();)
-				result.add(j.next());
-		return result;
-	}
-
 	public void merge(IPublisherResult result, int mode) {
 		if (mode == MERGE_MATCHING) {
 			addIUs(result.getIUs(null, ROOT), ROOT);
@@ -122,24 +101,27 @@ public class PublisherResult implements IPublisherResult {
 		}
 	}
 
-	class QueryableMap implements IQueryable {
-		private Map map;
-
-		public QueryableMap(Map map) {
-			this.map = map;
+	public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
+		if (InstallableUnit.MEMBER_ID.equals(memberName)) {
+			if (idIndex == null) {
+				ArrayList<IIndex<IInstallableUnit>> indexes = new ArrayList<IIndex<IInstallableUnit>>();
+				indexes.add(new IdIndex(nonRootIUs));
+				indexes.add(new IdIndex(rootIUs));
+				idIndex = new CompoundIndex<IInstallableUnit>(indexes);
+			}
+			return idIndex;
 		}
+		return null;
+	}
 
-		public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-			return query.perform(flatten(this.map.values()).iterator(), collector);
-		}
+	public Iterator<IInstallableUnit> everything() {
+		ArrayList<Iterator<IInstallableUnit>> iterators = new ArrayList<Iterator<IInstallableUnit>>();
+		iterators.add(nonRootIUs.iterator());
+		iterators.add(rootIUs.iterator());
+		return new CompoundIterator<IInstallableUnit>(iterators.iterator());
 	}
 
-	/**
-	 * Queries both the root and non root IUs
-	 */
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		IQueryable nonRootQueryable = new QueryableMap(nonRootIUs);
-		IQueryable rootQueryable = new QueryableMap(rootIUs);
-		return new CompoundQueryable(new IQueryable[] {nonRootQueryable, rootQueryable}).query(query, collector, monitor);
+	public Object getManagedProperty(Object client, String memberName, Object key) {
+		return null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
index a853d13..583cd33 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
@@ -10,8 +10,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 public interface IAdditionalInstallableUnitAdvice extends IPublisherAdvice {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
index 93c3902..11366d3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
@@ -11,16 +11,17 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.IRequirement;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 public interface ICapabilityAdvice extends IPublisherAdvice {
 
 	public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu);
 
-	public IRequiredCapability[] getRequiredCapabilities(InstallableUnitDescription iu);
+	public IRequirement[] getRequiredCapabilities(InstallableUnitDescription iu);
 
-	public IRequiredCapability[] getMetaRequiredCapabilities(InstallableUnitDescription iu);
+	public IRequirement[] getMetaRequiredCapabilities(InstallableUnitDescription iu);
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
new file mode 100644
index 0000000..732826f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.publisher.actions;
+
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
+import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
+
+public interface IFeatureRootAdvice extends IPublisherAdvice {
+
+	/**
+	 * Return an array of configSpecs for which this advice is applicable.
+	 * @see IPublisherAdvice#isApplicable(String, boolean, String, org.eclipse.equinox.p2.metadata.Version)
+	 * @return String [] : Array of configSpec ("ws,os,arch")
+	 */
+	public String[] getConfigurations();
+
+	public IPathComputer getRootFileComputer(String configSpec);
+
+	public FileSetDescriptor getDescriptor(String configSpec);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
index c4e0a0f..b26edb4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
@@ -9,7 +9,9 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 /**
@@ -34,6 +36,6 @@ public interface IFilterAdvice extends IPublisherAdvice {
 	 * @return the filter to use when depending on the given IU or <code>null</code>
 	 * if none.
 	 */
-	public String getFilter(String id, Version version, boolean exact);
+	public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact);
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
index 03868e0..a6deae3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
@@ -9,10 +9,12 @@
 ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
+import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
+
 /**
  * Provides advice about a license.
  */
-public interface ILicenseAdvice {
+public interface ILicenseAdvice extends IPublisherAdvice {
 
 	public String getLicenseURL();
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
index 86a0367..5874881 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
@@ -10,22 +10,23 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import java.util.Map;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 
 public interface IPropertyAdvice extends IPublisherAdvice {
 
 	/**
 	 * Returns the set of extra properties to be associated with the IU
 	 */
-	public Properties getInstallableUnitProperties(InstallableUnitDescription iu);
+	public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu);
 
 	/**
 	 * Returns the set of extra properties to be associated with the artifact descriptor
 	 * being published
 	 */
-	public Properties getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor);
+	public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor);
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
index 2c5cad6..9cd432b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
@@ -11,9 +11,10 @@
 package org.eclipse.equinox.p2.publisher.actions;
 
 import java.util.Collection;
+import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 import org.eclipse.equinox.p2.publisher.IPublisherResult;
 
-public interface IRootIUAdvice {
+public interface IRootIUAdvice extends IPublisherAdvice {
 
 	/**
 	 * Returns the list of children of the root for this publishing operation.
@@ -22,5 +23,5 @@ public interface IRootIUAdvice {
 	 * @param result 
 	 * @return the collection of children
 	 */
-	public Collection getChildren(IPublisherResult result);
+	public Collection<? extends Object> getChildren(IPublisherResult result);
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
index 0a800d9..1551b72 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.ITouchpointData;
+import org.eclipse.equinox.p2.metadata.ITouchpointData;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
index 13eb3e1..b2e0d1d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
@@ -10,7 +10,7 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 public interface IVersionAdvice extends IPublisherAdvice {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
index 850deaf..feb7f3f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
@@ -12,24 +12,24 @@ package org.eclipse.equinox.p2.publisher.actions;
 
 import java.io.*;
 import java.net.URL;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.util.ManifestElement;
 import org.osgi.framework.BundleException;
 
 public class JREAction extends AbstractPublisherAction {
 	private static final String DEFAULT_JRE_NAME = "a.jre"; //$NON-NLS-1$
-	private static final Version DEFAULT_JRE_VERSION = new Version("1.6"); //$NON-NLS-1$
+	private static final Version DEFAULT_JRE_VERSION = Version.parseVersion("1.6"); //$NON-NLS-1$
 	private static final String DEFAULT_PROFILE = "/profiles/JavaSE-1.6.profile"; //$NON-NLS-1$
 	private static final String PROFILE_LOCATION = "jre.action.profile.location"; //$NON-NLS-1$
 	private static final String PROFILE_NAME = "osgi.java.profile.name"; //$NON-NLS-1$
@@ -38,7 +38,7 @@ public class JREAction extends AbstractPublisherAction {
 
 	private File jreLocation;
 	private String environment;
-	private Properties profileProperties;
+	private Map<String, String> profileProperties;
 
 	public JREAction(File location) {
 		this.jreLocation = location;
@@ -75,11 +75,12 @@ public class JREAction extends AbstractPublisherAction {
 		String configId = "config." + iu.getId();//$NON-NLS-1$
 		cu.setId(configId);
 		cu.setVersion(iu.getVersion());
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, PublisherHelper.versionMax, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		VersionRange range = iu.getVersion() == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(iu.getVersion(), true, Version.MAX_VERSION, true);
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configId, iu.getVersion())});
 		cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 
 		if (jreLocation == null || !jreLocation.exists()) {
 			touchpointData.put("install", ""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -103,7 +104,7 @@ public class JREAction extends AbstractPublisherAction {
 		results.addIU(MetadataFactory.createInstallableUnit(cu), IPublisherResult.ROOT);
 
 		//Create the artifact descriptor
-		return PublisherHelper.createArtifactDescriptor(key, jreLocation);
+		return PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, jreLocation);
 	}
 
 	private IProvidedCapability[] generateJRECapability(String id, Version version) {
@@ -111,7 +112,7 @@ public class JREAction extends AbstractPublisherAction {
 			return new IProvidedCapability[0];
 
 		try {
-			ManifestElement[] jrePackages = ManifestElement.parseHeader(PROFILE_SYSTEM_PACKAGES, (String) profileProperties.get(PROFILE_SYSTEM_PACKAGES));
+			ManifestElement[] jrePackages = ManifestElement.parseHeader(PROFILE_SYSTEM_PACKAGES, profileProperties.get(PROFILE_SYSTEM_PACKAGES));
 			IProvidedCapability[] exportedPackageAsCapabilities = new IProvidedCapability[jrePackages.length + 1];
 			exportedPackageAsCapabilities[0] = PublisherHelper.createSelfCapability(id, version);
 			for (int i = 1; i <= jrePackages.length; i++) {
@@ -129,16 +130,16 @@ public class JREAction extends AbstractPublisherAction {
 		if (profileProperties == null || profileProperties.size() == 0)
 			return; //got nothing
 
-		String profileLocation = profileProperties.getProperty(PROFILE_LOCATION);
+		String profileLocation = profileProperties.get(PROFILE_LOCATION);
 
-		String profileName = profileLocation != null ? new Path(profileLocation).lastSegment() : profileProperties.getProperty(PROFILE_NAME);
+		String profileName = profileLocation != null ? new Path(profileLocation).lastSegment() : profileProperties.get(PROFILE_NAME);
 		if (profileName.endsWith(".profile")) //$NON-NLS-1$
 			profileName = profileName.substring(0, profileName.length() - 8);
 		Version version = null;
 		int idx = profileName.indexOf('-');
 		if (idx != -1) {
 			try {
-				version = new Version(profileName.substring(idx + 1));
+				version = Version.parseVersion(profileName.substring(idx + 1));
 			} catch (IllegalArgumentException e) {
 				//ignore
 			}
@@ -146,15 +147,15 @@ public class JREAction extends AbstractPublisherAction {
 		}
 		if (version == null) {
 			try {
-				String targetVersion = profileProperties.getProperty(PROFILE_TARGET_VERSION);
-				version = targetVersion != null ? new Version(targetVersion) : null;
+				String targetVersion = profileProperties.get(PROFILE_TARGET_VERSION);
+				version = targetVersion != null ? Version.parseVersion(targetVersion) : null;
 			} catch (IllegalArgumentException e) {
 				//ignore
 			}
 		}
 
 		if (version == null)
-			version = new Version("1.6"); //$NON-NLS-1$
+			version = DEFAULT_JRE_VERSION;
 
 		iu.setVersion(version);
 
@@ -188,13 +189,13 @@ public class JREAction extends AbstractPublisherAction {
 		}
 	}
 
-	private Properties loadProfile(File profileFile) {
+	private Map<String, String> loadProfile(File profileFile) {
 		if (profileFile == null || !profileFile.exists())
 			return null;
 
 		try {
 			InputStream stream = new BufferedInputStream(new FileInputStream(profileFile));
-			Properties properties = loadProfile(stream);
+			Map<String, String> properties = loadProfile(stream);
 			if (properties != null)
 				properties.put(PROFILE_LOCATION, profileFile.getAbsolutePath());
 			return properties;
@@ -204,7 +205,7 @@ public class JREAction extends AbstractPublisherAction {
 		return null;
 	}
 
-	private Properties loadProfile(URL profileURL) {
+	private Map<String, String> loadProfile(URL profileURL) {
 		if (profileURL == null)
 			return null;
 
@@ -220,12 +221,10 @@ public class JREAction extends AbstractPublisherAction {
 	/**
 	 * Always closes the stream when done
 	 */
-	private Properties loadProfile(InputStream stream) {
+	private Map<String, String> loadProfile(InputStream stream) {
 		if (stream != null) {
 			try {
-				Properties properties = new Properties();
-				properties.load(stream);
-				return properties;
+				return CollectionUtils.loadProperties(stream);
 			} catch (IOException e) {
 				return null;
 			} finally {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
index d49b4f7..e43e0d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
@@ -23,14 +23,14 @@ public class MergeResultsAction extends AbstractPublisherAction {
 		this.mode = mode;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		MultiStatus finalStatus = new MultiStatus(MergeResultsAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
 		for (int i = 0; i < actions.length; i++) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
 			IPublisherAction action = actions[i];
 			IPublisherResult result = new PublisherResult();
-			finalStatus.merge(action.perform(info, result, monitor));
+			finalStatus.merge(action.perform(publisherInfo, result, monitor));
 			results.merge(result, mode);
 		}
 		if (!finalStatus.isOK())
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
index aaba1d7..b06a1ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
@@ -9,11 +9,10 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.*;
 
 /**
  * An IFilterAdvice that looks up the desired IU in the publisher's input metadata
@@ -21,23 +20,24 @@ import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
  */
 public class QueryableFilterAdvice implements IFilterAdvice {
 
-	private IQueryable queryable;
+	private IQueryable<IInstallableUnit> queryable;
 
-	public QueryableFilterAdvice(IQueryable queryable) {
+	public QueryableFilterAdvice(IQueryable<IInstallableUnit> queryable) {
 		this.queryable = queryable;
 	}
 
-	public String getFilter(String id, Version version, boolean exact) {
-		InstallableUnitQuery query = new InstallableUnitQuery(id, version);
-		Collector result = queryable.query(query, new Collector(), null);
+	public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact) {
+		IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, version);
+		IQueryResult<IInstallableUnit> result = queryable.query(query, null);
 		if (!result.isEmpty())
-			return (((IInstallableUnit) result.iterator().next()).getFilter());
+			return result.iterator().next().getFilter();
 		if (exact)
 			return null;
-		query = new InstallableUnitQuery(id);
-		result = queryable.query(query, new Collector(), null);
+
+		query = QueryUtil.createIUQuery(id);
+		result = queryable.query(query, null);
 		if (!result.isEmpty())
-			return (((IInstallableUnit) result.iterator().next()).getFilter());
+			return result.iterator().next().getFilter();
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
index ffa7805..9a585ff 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
@@ -14,20 +14,19 @@ import java.io.File;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 
-// TODO need to merge this functionality with the FeaturesAction work on root files
 public class RootFilesAction extends AbstractPublisherAction {
 	private String idBase;
 	private Version version;
 	private String flavor;
+	private boolean createParent = true;
 
 	/**
 	 * Returns the id of the top level IU published by this action for the given id and flavor.
@@ -45,25 +44,31 @@ public class RootFilesAction extends AbstractPublisherAction {
 		this.flavor = flavor;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public void setCreateParent(boolean createParent) {
+		this.createParent = createParent;
+	}
+
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		setPublisherInfo(publisherInfo);
 		IPublisherResult innerResult = new PublisherResult();
 		// we have N platforms, generate a CU for each
 		// TODO try and find common properties across platforms
-		String[] configSpecs = info.getConfigurations();
+		String[] configSpecs = publisherInfo.getConfigurations();
 		for (int i = 0; i < configSpecs.length; i++) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
-			generateRootFileIUs(configSpecs[i], info, innerResult);
+			generateRootFileIUs(configSpecs[i], innerResult);
 		}
 		// merge the IUs  into the final result as non-roots and create a parent IU that captures them all
 		results.merge(innerResult, IPublisherResult.MERGE_ALL_NON_ROOT);
-		publishTopLevelRootFilesIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
+		if (createParent)
+			publishTopLevelRootFilesIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
 		if (monitor.isCanceled())
 			return Status.CANCEL_STATUS;
 		return Status.OK_STATUS;
 	}
 
-	private void publishTopLevelRootFilesIU(Collection children, IPublisherResult result) {
+	private void publishTopLevelRootFilesIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
 		InstallableUnitDescription descriptor = createParentIU(children, computeIUId(idBase, flavor), version);
 		descriptor.setSingleton(true);
 		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
@@ -76,7 +81,7 @@ public class RootFilesAction extends AbstractPublisherAction {
 	 * Generates IUs and CUs for the files that make up the root files for a given
 	 * ws/os/arch combination.
 	 */
-	private void generateRootFileIUs(String configSpec, IPublisherInfo info, IPublisherResult result) {
+	private void generateRootFileIUs(String configSpec, IPublisherResult result) {
 		// Create the IU for the executable
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		iu.setSingleton(true);
@@ -84,7 +89,7 @@ public class RootFilesAction extends AbstractPublisherAction {
 		String iuId = idPrefix + '.' + createIdString(configSpec);
 		iu.setId(iuId);
 		iu.setVersion(version);
-		String filter = createFilterSpec(configSpec);
+		IMatchExpression<IInstallableUnit> filter = createFilterSpec(configSpec);
 		iu.setFilter(filter);
 		IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version);
 		iu.setArtifacts(new IArtifactKey[] {key});
@@ -99,26 +104,26 @@ public class RootFilesAction extends AbstractPublisherAction {
 		cu.setId(configUnitId);
 		cu.setVersion(version);
 		cu.setFilter(filter);
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iuId, new VersionRange(version, true, version, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iuId, new VersionRange(version, true, version, true), null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 
 		//TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
 		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, version)});
 
 		cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
 		touchpointData.put("install", configurationData); //$NON-NLS-1$
 		String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
 		touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
-		cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
+		processTouchpointAdvice(cu, touchpointData, info, configSpec);
 		IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
 		result.addIU(unit, IPublisherResult.ROOT);
 
 		if ((info.getArtifactOptions() & (IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH)) > 0) {
 			// Create the artifact descriptor.  we have several files so no path on disk
-			IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null);
-			IRootFilesAdvice advice = getAdvice(configSpec, info);
+			IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, null);
+			IRootFilesAdvice advice = getAdvice(configSpec);
 			publishArtifact(descriptor, advice.getIncludedFiles(), advice.getExcludedFiles(), info, createPrefixComputer(advice.getRoot()));
 		}
 	}
@@ -133,16 +138,14 @@ public class RootFilesAction extends AbstractPublisherAction {
 	 * Compiles the <class>IRootFilesAdvice</class> from the <code>info</code> into one <class>IRootFilesAdvice</class> 
 	 * and returns the result.
 	 * @param configSpec
-	 * @param info - the publisher info holding the advice.
 	 * @return a compilation of <class>IRootfilesAdvice</class> from the <code>info</code>.
 	 */
-	private IRootFilesAdvice getAdvice(String configSpec, IPublisherInfo info) {
-		Collection advice = info.getAdvice(configSpec, true, null, null, IRootFilesAdvice.class);
-		ArrayList inclusions = new ArrayList();
-		ArrayList exclusions = new ArrayList();
+	private IRootFilesAdvice getAdvice(String configSpec) {
+		Collection<IRootFilesAdvice> advice = info.getAdvice(configSpec, true, null, null, IRootFilesAdvice.class);
+		ArrayList<File> inclusions = new ArrayList<File>();
+		ArrayList<File> exclusions = new ArrayList<File>();
 		File root = null;
-		for (Iterator i = advice.iterator(); i.hasNext();) {
-			IRootFilesAdvice entry = (IRootFilesAdvice) i.next();
+		for (IRootFilesAdvice entry : advice) {
 			// TODO for now we simply get root from the first advice that has one
 			if (root == null)
 				root = entry.getRoot();
@@ -153,8 +156,8 @@ public class RootFilesAction extends AbstractPublisherAction {
 			if (list != null)
 				exclusions.addAll(Arrays.asList(list));
 		}
-		File[] includeList = (File[]) inclusions.toArray(new File[inclusions.size()]);
-		File[] excludeList = (File[]) exclusions.toArray(new File[exclusions.size()]);
+		File[] includeList = inclusions.toArray(new File[inclusions.size()]);
+		File[] excludeList = exclusions.toArray(new File[exclusions.size()]);
 		return new RootFilesAdvice(root, includeList, excludeList, configSpec);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
index b9ca998..00dd7b5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
@@ -10,15 +10,17 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashSet;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
 import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.util.NLS;
@@ -32,7 +34,7 @@ public class RootIUAction extends AbstractPublisherAction {
 	private Version version;
 	private String id;
 	private String name;
-	private Collection versionAdvice;
+	private Collection<IVersionAdvice> versionAdvice;
 
 	public RootIUAction(String id, Version version, String name) {
 		this.id = id;
@@ -46,7 +48,7 @@ public class RootIUAction extends AbstractPublisherAction {
 	}
 
 	protected IStatus generateRootIU(IPublisherResult result) {
-		Collection children = getChildren(result);
+		Collection<? extends IVersionedId> children = getChildren(result);
 		InstallableUnitDescription descriptor = createTopLevelIUDescription(children, null, false);
 		processCapabilityAdvice(descriptor, info);
 		processTouchpointAdvice(descriptor, null, info);
@@ -68,14 +70,14 @@ public class RootIUAction extends AbstractPublisherAction {
 	}
 
 	protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
+		Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
 		if (advice.size() > 0) {
 			// Only process the first license we find for this IU.
-			ILicenseAdvice entry = (ILicenseAdvice) advice.iterator().next();
+			ILicenseAdvice entry = advice.iterator().next();
 			String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
 			String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
 			if (licenseText.length() > 0 || licenseUrl.length() > 0)
-				iu.setLicense(MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText));
+				iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
 		}
 	}
 
@@ -117,19 +119,17 @@ public class RootIUAction extends AbstractPublisherAction {
 	//		cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
 	//		return MetadataFactory.createInstallableUnit(cat);
 	//	}
-	private Collection getChildren(IPublisherResult result) {
+	private Collection<? extends IVersionedId> getChildren(IPublisherResult result) {
 		// get any roots that we have accummulated so far and search for
 		// children from the advice.
-		HashSet children = new HashSet();
-		Collection rootAdvice = info.getAdvice(null, true, null, null, IRootIUAdvice.class);
+		HashSet<IVersionedId> children = new HashSet<IVersionedId>();
+		Collection<IRootIUAdvice> rootAdvice = info.getAdvice(null, true, null, null, IRootIUAdvice.class);
 		if (rootAdvice == null)
 			return children;
-		for (Iterator i = rootAdvice.iterator(); i.hasNext();) {
-			IRootIUAdvice advice = (IRootIUAdvice) i.next();
-			Collection list = advice.getChildren(result);
+		for (IRootIUAdvice advice : rootAdvice) {
+			Collection<? extends Object> list = advice.getChildren(result);
 			if (list != null)
-				for (Iterator j = list.iterator(); j.hasNext();) {
-					Object object = j.next();
+				for (Object object : list) {
 					// if the advice is a string, look it up in the result.  if not there then 
 					// query the known metadata repos
 					if (object instanceof String) {
@@ -137,31 +137,30 @@ public class RootIUAction extends AbstractPublisherAction {
 						IInstallableUnit iu = queryForIU(result, childId, getVersionAdvice(childId));
 						if (iu != null)
 							children.add(iu);
-					} else if (object instanceof VersionedName) {
-						children.add(object);
-					} else if (object instanceof IInstallableUnit)
-						children.add(object);
+					} else if (object instanceof IVersionedId) {
+						children.add((IVersionedId) object);
+					}
 				}
 		}
 		return children;
 	}
 
-	private InstallableUnitDescription createTopLevelIUDescription(Collection children, Collection requires, boolean configureLauncherData) {
+	private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) {
 		InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
 		root.setSingleton(true);
 		root.setId(id);
 		root.setVersion(version);
 		root.setProperty(IInstallableUnit.PROP_NAME, name);
 
-		Collection requiredCapabilities = createIURequirements(children);
+		Collection<IRequirement> requiredCapabilities = createIURequirements(children);
 		if (requires != null)
 			requiredCapabilities.addAll(requires);
-		root.setRequiredCapabilities((IRequiredCapability[]) requiredCapabilities.toArray(new IRequiredCapability[requiredCapabilities.size()]));
+		root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]));
 		root.setArtifacts(new IArtifactKey[0]);
 
 		root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 		root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
-		root.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
 		root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)});
 		// TODO why is the type OSGI?
 		root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
@@ -174,8 +173,7 @@ public class RootIUAction extends AbstractPublisherAction {
 			if (versionAdvice == null)
 				return null;
 		}
-		for (Iterator i = versionAdvice.iterator(); i.hasNext();) {
-			IVersionAdvice advice = (IVersionAdvice) i.next();
+		for (IVersionAdvice advice : versionAdvice) {
 			// TODO have to figure a way to know the namespace here.  for now just look everywhere
 			Version result = advice.getVersion(IInstallableUnit.NAMESPACE_IU_ID, iuID);
 			if (result == null)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
index 85d6051..5dbfb52 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
@@ -20,13 +20,13 @@ import org.eclipse.equinox.p2.publisher.IPublisherResult;
  */
 public class RootIUAdvice extends AbstractAdvice implements IRootIUAdvice {
 
-	private Collection children;
+	private Collection<? extends Object> children;
 
-	public RootIUAdvice(Collection children) {
+	public RootIUAdvice(Collection<? extends Object> children) {
 		this.children = children;
 	}
 
-	public Collection getChildren(IPublisherResult result) {
+	public Collection<? extends Object> getChildren(IPublisherResult result) {
 		return children;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
index 3d275e3..bb858bc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
@@ -9,23 +9,24 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.actions;
 
+import java.util.Arrays;
 import java.util.Collection;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 import org.eclipse.equinox.p2.publisher.IPublisherResult;
+import org.eclipse.equinox.p2.query.IQuery;
 
 public class RootIUResultFilterAdvice extends AbstractAdvice implements IRootIUAdvice {
-	private Query query;
+	private IQuery<IInstallableUnit> query;
 
-	public RootIUResultFilterAdvice(Query query) {
+	public RootIUResultFilterAdvice(IQuery<IInstallableUnit> query) {
 		this.query = query;
 	}
 
-	public Collection getChildren(IPublisherResult result) {
-		Collection value = result.getIUs(null, IPublisherResult.ROOT);
+	public Collection<IInstallableUnit> getChildren(IPublisherResult result) {
+		Collection<IInstallableUnit> value = result.getIUs(null, IPublisherResult.ROOT);
 		if (query == null)
 			return value;
-		return query.perform(value.iterator(), new Collector()).toCollection();
+		return Arrays.asList(query.perform(value.iterator()).toArray(IInstallableUnit.class));
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
index ff0f394..491c40f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
@@ -11,14 +11,17 @@
 package org.eclipse.equinox.p2.publisher.actions;
 
 import java.io.*;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 
-	Map versions = new HashMap(11);
+	Map<String, Map<String, Version>> versions = new HashMap<String, Map<String, Version>>(11);
 
 	/**
 	 * Load the given namespace with version mappings from the properties file at 
@@ -33,35 +36,30 @@ public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 	}
 
 	public void load(String namespace, String location, String idSuffix) {
+		File file = new File(location);
 		if (namespace == null)
 			namespace = "null"; //$NON-NLS-1$
-		Properties properties = new Properties();
-		File file = new File(location);
-		if (file.exists()) {
-			InputStream stream = null;
-			try {
-				stream = new BufferedInputStream(new FileInputStream(file));
-				properties.load(stream);
-			} catch (IOException e) {
-				// nothing
-			} finally {
-				if (stream != null)
-					try {
-						stream.close();
-					} catch (IOException e) {
-						//nothing
-					}
-			}
+
+		Map<String, String> properties;
+		InputStream stream = null;
+		try {
+			stream = new BufferedInputStream(new FileInputStream(file));
+			properties = CollectionUtils.loadProperties(stream);
+		} catch (IOException e) {
+			return;
+		} finally {
+			if (stream != null)
+				try {
+					stream.close();
+				} catch (IOException e) {
+					//nothing
+				}
 		}
-		if (properties.size() > 0) {
-			Enumeration enumeration = properties.keys();
-			while (enumeration.hasMoreElements()) {
-				String key = (String) enumeration.nextElement();
-				if (idSuffix != null)
-					key += idSuffix;
-				String value = properties.getProperty(key);
-				setVersion(namespace, key, new Version(value));
-			}
+		for (Entry<String, String> entry : properties.entrySet()) {
+			String key = entry.getKey();
+			if (idSuffix != null)
+				key += idSuffix;
+			setVersion(namespace, key, Version.parseVersion(entry.getValue()));
 		}
 	}
 
@@ -72,18 +70,18 @@ public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 	 * @return the version advice found or <code>null</code> if none
 	 */
 	public Version getVersion(String namespace, String id) {
-		Map values = (Map) versions.get(namespace);
+		Map<String, Version> values = versions.get(namespace);
 		// if no one says anything then don't say anything.  someone else might have an opinion
 		if (values != null) {
-			Version result = (Version) values.get(id);
+			Version result = values.get(id);
 			if (result != null)
 				return result;
 		}
 
-		values = (Map) versions.get("null"); //$NON-NLS-1$
+		values = versions.get("null"); //$NON-NLS-1$
 		if (values == null)
 			return null;
-		return (Version) values.get(id);
+		return values.get(id);
 	}
 
 	/**
@@ -93,12 +91,12 @@ public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 	 * @param version the version advice for the given id or <code>null</code> to remove advice
 	 */
 	public void setVersion(String namespace, String id, Version version) {
-		Map values = (Map) versions.get(namespace);
+		Map<String, Version> values = versions.get(namespace);
 		if (values == null) {
 			// if we are clearing values then there is nothing to do
 			if (version == null)
 				return;
-			values = new HashMap();
+			values = new HashMap<String, Version>();
 			versions.put(namespace, values);
 		}
 		if (version == null)
@@ -111,10 +109,9 @@ public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 		if (!(advice instanceof VersionAdvice))
 			return this;
 		VersionAdvice source = (VersionAdvice) advice;
-		for (Iterator i = source.versions.keySet().iterator(); i.hasNext();) {
-			String namespace = (String) i.next();
-			Map myValues = (Map) versions.get(namespace);
-			Map sourceValues = (Map) source.versions.get(namespace);
+		for (String namespace : source.versions.keySet()) {
+			Map<String, Version> myValues = versions.get(namespace);
+			Map<String, Version> sourceValues = source.versions.get(namespace);
 			if (myValues == null)
 				versions.put(namespace, sourceValues);
 			else if (sourceValues != null)
@@ -123,10 +120,9 @@ public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
 		return this;
 	}
 
-	private Map merge(Map myValues, Map sourceValues) {
-		Map result = new HashMap(myValues);
-		for (Iterator i = sourceValues.keySet().iterator(); i.hasNext();) {
-			String key = (String) i.next();
+	private Map<String, Version> merge(Map<String, Version> myValues, Map<String, Version> sourceValues) {
+		Map<String, Version> result = new HashMap<String, Version>(myValues);
+		for (String key : sourceValues.keySet()) {
 			if (result.get(key) == null)
 				result.put(key, sourceValues.get(key));
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
index 6803662..a135377 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
@@ -27,19 +27,19 @@ public class AccumulateConfigDataAction extends AbstractPublisherAction {
 		loader = new DataLoader(configurationLocation, executableLocation);
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
-		storeConfigData(info, configSpec, results);
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		storeConfigData(publisherInfo, configSpec, results);
 		return Status.OK_STATUS;
 	}
 
-	protected void storeConfigData(IPublisherInfo info, String configSpec, IPublisherResult result) {
+	protected void storeConfigData(IPublisherInfo publisherInfo, String config, IPublisherResult result) {
 		ConfigData data = loader.getConfigData();
 		if (data == null)
 			return;
-		info.addAdvice(new ConfigAdvice(data, configSpec));
+		publisherInfo.addAdvice(new ConfigAdvice(data, config));
 		LauncherData launcherData = loader.getLauncherData();
 		if (launcherData == null)
 			return;
-		info.addAdvice(new LaunchingAdvice(launcherData, configSpec));
+		publisherInfo.addAdvice(new LaunchingAdvice(launcherData, config));
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
index 9e7b630..b1ab0c1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
@@ -10,19 +10,21 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
 import java.io.*;
-import java.util.*;
+import java.util.Map;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 import org.eclipse.equinox.p2.publisher.actions.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 
 /**
  * Publishing advice from a p2 advice file. An advice file (p2.inf) can be embedded
@@ -39,11 +41,11 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 	private final String id;
 	private final Version version;
 
-	private Map touchpointInstructions;
+	private Map<String, ITouchpointInstruction> touchpointInstructions;
 	private IProvidedCapability[] providedCapabilities;
-	private IRequiredCapability[] requiredCapabilities;
-	private IRequiredCapability[] metaRequiredCapabilities;
-	private Properties iuProperties;
+	private IRequirement[] requiredCapabilities;
+	private IRequirement[] metaRequiredCapabilities;
+	private Map<String, String> iuProperties;
 	private InstallableUnitDescription[] additionalIUs;
 	private boolean containsAdvice = false;
 
@@ -68,7 +70,7 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 		this.id = id;
 		this.version = version;
 
-		Map advice = loadAdviceMap(basePath, adviceFilePath);
+		Map<String, String> advice = loadAdviceMap(basePath, adviceFilePath);
 		if (advice.isEmpty())
 			return;
 
@@ -97,10 +99,10 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 	/**
 	 * Loads the advice file and returns it in map form.
 	 */
-	private static Map loadAdviceMap(IPath basePath, IPath adviceFilePath) {
+	private static Map<String, String> loadAdviceMap(IPath basePath, IPath adviceFilePath) {
 		File location = basePath.toFile();
 		if (location == null || !location.exists())
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 
 		ZipFile jar = null;
 		InputStream stream = null;
@@ -108,25 +110,22 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 			if (location.isDirectory()) {
 				File adviceFile = new File(location, adviceFilePath.toString());
 				if (!adviceFile.isFile())
-					return Collections.EMPTY_MAP;
+					return CollectionUtils.emptyMap();
 				stream = new BufferedInputStream(new FileInputStream(adviceFile));
 			} else if (location.isFile()) {
 				jar = new ZipFile(location);
 				ZipEntry entry = jar.getEntry(adviceFilePath.toString());
 				if (entry == null)
-					return Collections.EMPTY_MAP;
+					return CollectionUtils.emptyMap();
 
 				stream = new BufferedInputStream(jar.getInputStream(entry));
 			}
-
-			Properties advice = new Properties();
-			advice.load(stream);
-			return (advice != null ? advice : Collections.EMPTY_MAP);
+			return CollectionUtils.loadProperties(stream);
 		} catch (IOException e) {
 			String message = "An error occured while reading advice file: basePath=" + basePath + ", adviceFilePath=" + adviceFilePath + "."; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
 			IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
 			LogHelper.log(status);
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 		} finally {
 			if (stream != null)
 				try {
@@ -151,49 +150,18 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 	 * @see org.eclipse.equinox.p2.publisher.eclipse.ITouchpointAdvice#getTouchpointData()
 	 */
 	public ITouchpointData getTouchpointData(ITouchpointData existing) {
-		if (touchpointInstructions == null)
-			return existing;
-
-		Map resultInstructions = new HashMap(existing.getInstructions());
-		for (Iterator iterator = touchpointInstructions.keySet().iterator(); iterator.hasNext();) {
-			String key = (String) iterator.next();
-			ITouchpointInstruction instruction = (ITouchpointInstruction) touchpointInstructions.get(key);
-			ITouchpointInstruction existingInstruction = (ITouchpointInstruction) resultInstructions.get(key);
-
-			if (existingInstruction != null) {
-				String body = existingInstruction.getBody();
-				if (body == null || body.length() == 0)
-					body = instruction.getBody();
-				else if (instruction.getBody() != null) {
-					if (!body.endsWith(";")) //$NON-NLS-1$
-						body += ';';
-					body += instruction.getBody();
-				}
-
-				String importAttribute = existingInstruction.getImportAttribute();
-				if (importAttribute == null || importAttribute.length() == 0)
-					importAttribute = instruction.getImportAttribute();
-				else if (instruction.getImportAttribute() != null) {
-					if (!importAttribute.endsWith(",")) //$NON-NLS-1$
-						importAttribute += ',';
-					importAttribute += instruction.getBody();
-				}
-				instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute);
-			}
-			resultInstructions.put(key, instruction);
-		}
-		return MetadataFactory.createTouchpointData(resultInstructions);
+		return MetadataFactory.mergeTouchpointData(existing, touchpointInstructions);
 	}
 
 	public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu) {
 		return providedCapabilities;
 	}
 
-	public IRequiredCapability[] getRequiredCapabilities(InstallableUnitDescription iu) {
+	public IRequirement[] getRequiredCapabilities(InstallableUnitDescription iu) {
 		return requiredCapabilities;
 	}
 
-	public IRequiredCapability[] getMetaRequiredCapabilities(InstallableUnitDescription iu) {
+	public IRequirement[] getMetaRequiredCapabilities(InstallableUnitDescription iu) {
 		return metaRequiredCapabilities;
 	}
 
@@ -201,11 +169,11 @@ public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvic
 		return additionalIUs;
 	}
 
-	public Properties getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
+	public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
 		return null;
 	}
 
-	public Properties getInstallableUnitProperties(InstallableUnitDescription iu) {
+	public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu) {
 		return iuProperties;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
index 8760e9c..703c7c5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
@@ -13,11 +13,10 @@ import java.net.URISyntaxException;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 
 public class AdviceFileParser {
 
@@ -59,34 +58,34 @@ public class AdviceFileParser {
 	private static final String ARTIFACTS_PREFIX = "artifacts."; //$NON-NLS-1$
 	private static final String HOST_REQUIREMENTS_PREFIX = "hostRequirements."; //$NON-NLS-1$
 
-	public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
-	public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
+	public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
+	public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
 
-	private Properties adviceProperties = new Properties();
-	private List adviceProvides = new ArrayList();
-	private List adviceRequires = new ArrayList();
-	private List adviceMetaRequires = new ArrayList();
-	private Map adviceInstructions = new HashMap();
-	private List adviceOtherIUs = new ArrayList();
+	private Map<String, String> adviceProperties = new HashMap<String, String>();
+	private List<IProvidedCapability> adviceProvides = new ArrayList<IProvidedCapability>();
+	private List<IRequirement> adviceRequires = new ArrayList<IRequirement>();
+	private List<IRequirement> adviceMetaRequires = new ArrayList<IRequirement>();
+	private Map<String, ITouchpointInstruction> adviceInstructions = new HashMap<String, ITouchpointInstruction>();
+	private List<InstallableUnitDescription> adviceOtherIUs = new ArrayList<InstallableUnitDescription>();
 
-	private final Map advice;
-	private Iterator keysIterator;
+	private final Map<String, String> advice;
+	private Iterator<String> keysIterator;
 	private String current;
 	//	private String hostId; not currently used
 	private Version hostVersion;
 
-	public AdviceFileParser(String id, Version version, Map advice) {
+	public AdviceFileParser(String id, Version version, Map<String, String> advice) {
 		// this.hostId = id; not currently used
 		this.hostVersion = version;
 		this.advice = advice;
 	}
 
 	public void parse() {
-		String adviceVersion = (String) advice.get(ADVICE_VERSION);
+		String adviceVersion = advice.get(ADVICE_VERSION);
 		if (adviceVersion != null)
 			checkAdviceVersion(adviceVersion);
 
-		List keys = new ArrayList(advice.keySet());
+		List<String> keys = new ArrayList<String>(advice.keySet());
 		Collections.sort(keys);
 
 		keysIterator = keys.iterator();
@@ -115,20 +114,20 @@ public class AdviceFileParser {
 	}
 
 	private void checkAdviceVersion(String adviceVersion) {
-		Version version = new Version(adviceVersion);
+		Version version = Version.parseVersion(adviceVersion);
 		if (!VERSION_TOLERANCE.isIncluded(version))
 			throw new IllegalStateException("bad version: " + version + ". Expected range was " + VERSION_TOLERANCE); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 	private void next() {
-		current = (String) (keysIterator.hasNext() ? keysIterator.next() : null);
+		current = keysIterator.hasNext() ? keysIterator.next() : null;
 	}
 
 	private String currentValue() {
-		return ((String) advice.get(current)).trim();
+		return advice.get(current).trim();
 	}
 
-	private void parseProperties(String prefix, Map properties) {
+	private void parseProperties(String prefix, Map<String, String> properties) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex == -1)
@@ -138,7 +137,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseProperty(String prefix, Map properties) {
+	private void parseProperty(String prefix, Map<String, String> properties) {
 		String propertyName = null;
 		String propertyValue = null;
 		while (current != null && current.startsWith(prefix)) {
@@ -156,7 +155,7 @@ public class AdviceFileParser {
 		properties.put(propertyName, propertyValue);
 	}
 
-	private void parseProvides(String prefix, List provides) {
+	private void parseProvides(String prefix, List<IProvidedCapability> provides) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex == -1)
@@ -166,7 +165,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseProvided(String prefix, List provides) {
+	private void parseProvided(String prefix, List<IProvidedCapability> provides) {
 		String namespace = null;
 		String name = null;
 		Version capabilityVersion = null;
@@ -177,7 +176,7 @@ public class AdviceFileParser {
 			} else if (token.equals(NAMESPACE)) {
 				namespace = currentValue();
 			} else if (token.equals(VERSION)) {
-				capabilityVersion = new Version(substituteVersionAndQualifier(currentValue()));
+				capabilityVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
 			} else {
 				// we ignore elements we do not understand
 			}
@@ -188,7 +187,7 @@ public class AdviceFileParser {
 		provides.add(capability);
 	}
 
-	private void parseRequires(String prefix, List requires) {
+	private void parseRequires(String prefix, List<IRequirement> requires) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex == -1)
@@ -198,7 +197,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseRequired(String prefix, List requires) {
+	private void parseRequired(String prefix, List<IRequirement> requires) {
 
 		String namespace = null;
 		String name = null;
@@ -229,11 +228,11 @@ public class AdviceFileParser {
 			}
 			next();
 		}
-		IRequiredCapability capability = MetadataFactory.createRequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
+		IRequirement capability = MetadataFactory.createRequirement(namespace, name, range, filter, optional, multiple, greedy);
 		requires.add(capability);
 	}
 
-	private void parseInstructions(String prefix, Map instructions) {
+	private void parseInstructions(String prefix, Map<String, ITouchpointInstruction> instructions) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex != -1)
@@ -243,7 +242,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseInstruction(String prefix, Map instructions) {
+	private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) {
 		String phase = current.substring(current.lastIndexOf('.') + 1);
 		String body = currentValue();
 		next();
@@ -262,7 +261,7 @@ public class AdviceFileParser {
 		instructions.put(phase, instruction);
 	}
 
-	private void parseUnits(String prefix, List ius) {
+	private void parseUnits(String prefix, List<InstallableUnitDescription> ius) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex == -1)
@@ -272,7 +271,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseUnit(String prefix, List units) {
+	private void parseUnit(String prefix, List<InstallableUnitDescription> units) {
 		String unitId = null;
 		Version unitVersion = null;
 		boolean unitSingleton = false;
@@ -287,14 +286,14 @@ public class AdviceFileParser {
 		int unitUpdateSeverity = 0;
 		String unitUpdateDescription = null;
 
-		List unitArtifacts = new ArrayList();
-		Properties unitProperties = new Properties();
-		List unitHostRequirements = new ArrayList();
-		List unitProvides = new ArrayList();
-		List unitRequires = new ArrayList();
-		List unitMetaRequirements = new ArrayList();
-		List unitLicenses = new ArrayList();
-		Map unitInstructions = new HashMap();
+		List<IArtifactKey> unitArtifacts = new ArrayList<IArtifactKey>();
+		Map<String, String> unitProperties = new HashMap<String, String>();
+		List<IRequirement> unitHostRequirements = new ArrayList<IRequirement>();
+		List<IProvidedCapability> unitProvides = new ArrayList<IProvidedCapability>();
+		List<IRequirement> unitRequires = new ArrayList<IRequirement>();
+		List<IRequirement> unitMetaRequirements = new ArrayList<IRequirement>();
+		List<ILicense> unitLicenses = new ArrayList<ILicense>();
+		Map<String, ITouchpointInstruction> unitInstructions = new HashMap<String, ITouchpointInstruction>();
 		//		updatedescriptor ??
 
 		while (current != null && current.startsWith(prefix)) {
@@ -303,7 +302,7 @@ public class AdviceFileParser {
 				unitId = currentValue();
 				next();
 			} else if (token.equals(VERSION)) {
-				unitVersion = new Version(substituteVersionAndQualifier(currentValue()));
+				unitVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
 				next();
 			} else if (token.equals(SINGLETON)) {
 				unitSingleton = Boolean.valueOf(currentValue()).booleanValue();
@@ -321,7 +320,7 @@ public class AdviceFileParser {
 				unitTouchpointId = currentValue();
 				next();
 			} else if (token.equals(TOUCHPOINT_VERSION)) {
-				unitTouchpointVersion = new Version(substituteVersionAndQualifier(currentValue()));
+				unitTouchpointVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
 				next();
 			} else if (token.equals(UPDATE_ID)) {
 				unitUpdateId = currentValue();
@@ -377,29 +376,28 @@ public class AdviceFileParser {
 			description.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(unitUpdateId, unitUpdateRange, unitUpdateSeverity, unitUpdateDescription));
 
 		if (!unitLicenses.isEmpty())
-			description.setLicense((ILicense) unitLicenses.get(0));
+			description.setLicenses(unitLicenses.toArray(new ILicense[unitLicenses.size()]));
 
 		if (!unitArtifacts.isEmpty())
-			description.setArtifacts((IArtifactKey[]) unitArtifacts.toArray(new IArtifactKey[unitArtifacts.size()]));
+			description.setArtifacts(unitArtifacts.toArray(new IArtifactKey[unitArtifacts.size()]));
 
 		if (!unitHostRequirements.isEmpty())
-			((InstallableUnitFragmentDescription) description).setHost((IRequiredCapability[]) unitHostRequirements.toArray(new IRequiredCapability[unitHostRequirements.size()]));
+			((InstallableUnitFragmentDescription) description).setHost(unitHostRequirements.toArray(new IRequirement[unitHostRequirements.size()]));
 
 		if (!unitProperties.isEmpty()) {
-			for (Iterator iterator = unitProperties.entrySet().iterator(); iterator.hasNext();) {
-				Entry entry = (Entry) iterator.next();
-				description.setProperty((String) entry.getKey(), (String) entry.getValue());
+			for (Entry<String, String> entry : unitProperties.entrySet()) {
+				description.setProperty(entry.getKey(), entry.getValue());
 			}
 		}
 
 		if (!unitProvides.isEmpty())
-			description.setCapabilities((IProvidedCapability[]) unitProvides.toArray(new IProvidedCapability[unitProvides.size()]));
+			description.setCapabilities(unitProvides.toArray(new IProvidedCapability[unitProvides.size()]));
 
 		if (!unitRequires.isEmpty())
-			description.setRequiredCapabilities((IRequiredCapability[]) unitRequires.toArray(new IRequiredCapability[unitRequires.size()]));
+			description.setRequirements(unitRequires.toArray(new IRequirement[unitRequires.size()]));
 
 		if (!unitMetaRequirements.isEmpty())
-			description.setMetaRequiredCapabilities((IRequiredCapability[]) unitMetaRequirements.toArray(new IRequiredCapability[unitMetaRequirements.size()]));
+			description.setMetaRequirements(unitMetaRequirements.toArray(new IRequirement[unitMetaRequirements.size()]));
 
 		if (!unitInstructions.isEmpty())
 			description.addTouchpointData(MetadataFactory.createTouchpointData(unitInstructions));
@@ -407,7 +405,7 @@ public class AdviceFileParser {
 		adviceOtherIUs.add(description);
 	}
 
-	private void parseLicenses(String prefix, List licenses) {
+	private void parseLicenses(String prefix, List<ILicense> licenses) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex != -1)
@@ -417,7 +415,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseLicense(String prefix, List licenses) {
+	private void parseLicense(String prefix, List<ILicense> licenses) {
 		String body = currentValue();
 		next();
 
@@ -441,7 +439,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseArtifacts(String prefix, List artifacts) {
+	private void parseArtifacts(String prefix, List<IArtifactKey> artifacts) {
 		while (current != null && current.startsWith(prefix)) {
 			int dotIndex = current.indexOf('.', prefix.length());
 			if (dotIndex == -1)
@@ -451,7 +449,7 @@ public class AdviceFileParser {
 		}
 	}
 
-	private void parseArtifact(String prefix, List artifacts) {
+	private void parseArtifact(String prefix, List<IArtifactKey> artifacts) {
 		String artifactClassifier = null;
 		String artifactId = null;
 		Version artifactVersion = null;
@@ -462,7 +460,7 @@ public class AdviceFileParser {
 			} else if (token.equals(ID)) {
 				artifactId = currentValue();
 			} else if (token.equals(VERSION)) {
-				artifactVersion = new Version(substituteVersionAndQualifier(currentValue()));
+				artifactVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
 			} else {
 				// we ignore elements we do not understand
 			}
@@ -479,15 +477,19 @@ public class AdviceFileParser {
 		}
 
 		if (version.indexOf(QUALIFIER_SUBSTITUTION) != -1) {
-			String qualifier = hostVersion.getQualifier();
-			if (qualifier == null)
-				qualifier = ""; //$NON-NLS-1$
-			if (qualifier.length() == 0) {
-				// Note: this works only for OSGi versions and version ranges
-				// where the qualifier if present must be at the end of a version string
-				version = replace(version, "." + QUALIFIER_SUBSTITUTION, ""); //$NON-NLS-1$ //$NON-NLS-2$
+			try {
+				String qualifier = PublisherHelper.toOSGiVersion(hostVersion).getQualifier();
+				if (qualifier == null)
+					qualifier = ""; //$NON-NLS-1$
+				if (qualifier.length() == 0) {
+					// Note: this works only for OSGi versions and version ranges
+					// where the qualifier if present must be at the end of a version string
+					version = replace(version, "." + QUALIFIER_SUBSTITUTION, ""); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				version = replace(version, QUALIFIER_SUBSTITUTION, qualifier);
+			} catch (UnsupportedOperationException e) {
+				// Version cannot be converted to OSGi
 			}
-			version = replace(version, QUALIFIER_SUBSTITUTION, qualifier);
 		}
 		return version;
 	}
@@ -512,27 +514,27 @@ public class AdviceFileParser {
 		return buffer.toString();
 	}
 
-	public Properties getProperties() {
+	public Map<String, String> getProperties() {
 		if (adviceProperties.isEmpty())
 			return null;
 		return adviceProperties;
 	}
 
-	public IRequiredCapability[] getRequiredCapabilities() {
+	public IRequirement[] getRequiredCapabilities() {
 		if (adviceRequires.isEmpty())
 			return null;
 
-		return (IRequiredCapability[]) adviceRequires.toArray(new IRequiredCapability[adviceRequires.size()]);
+		return adviceRequires.toArray(new IRequirement[adviceRequires.size()]);
 	}
 
 	public IProvidedCapability[] getProvidedCapabilities() {
 		if (adviceProvides.isEmpty())
 			return null;
 
-		return (IProvidedCapability[]) adviceProvides.toArray(new IProvidedCapability[adviceProvides.size()]);
+		return adviceProvides.toArray(new IProvidedCapability[adviceProvides.size()]);
 	}
 
-	public Map getTouchpointInstructions() {
+	public Map<String, ITouchpointInstruction> getTouchpointInstructions() {
 		if (adviceInstructions.isEmpty())
 			return null;
 
@@ -543,13 +545,13 @@ public class AdviceFileParser {
 		if (adviceOtherIUs.isEmpty())
 			return null;
 
-		return (InstallableUnitDescription[]) adviceOtherIUs.toArray(new InstallableUnitDescription[adviceOtherIUs.size()]);
+		return adviceOtherIUs.toArray(new InstallableUnitDescription[adviceOtherIUs.size()]);
 	}
 
-	public IRequiredCapability[] getMetaRequiredCapabilities() {
+	public IRequirement[] getMetaRequiredCapabilities() {
 		if (adviceMetaRequires.isEmpty())
 			return null;
 
-		return (IRequiredCapability[]) adviceMetaRequires.toArray(new IRequiredCapability[adviceMetaRequires.size()]);
+		return adviceMetaRequires.toArray(new IRequirement[adviceMetaRequires.size()]);
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
index eec1adb..3c5497a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
@@ -10,14 +10,16 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
 import java.io.File;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
 
@@ -54,16 +56,16 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
 		this.location = location;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		// Create the basic actions and run them putting the IUs in a temporary result
-		Collection actions = createActions(info);
-		createAdvice(info, results);
+		Collection<IPublisherAction> actions = createActions(publisherInfo);
+		createAdvice(publisherInfo, results);
 		IPublisherResult innerResult = new PublisherResult();
 		MultiStatus finalStatus = new MultiStatus(ApplicationLauncherAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
-		for (Iterator i = actions.iterator(); i.hasNext();) {
+		for (IPublisherAction action : actions) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
-			finalStatus.merge(((IPublisherAction) i.next()).perform(info, innerResult, monitor));
+			finalStatus.merge(action.perform(publisherInfo, innerResult, monitor));
 		}
 		if (!finalStatus.isOK())
 			return finalStatus;
@@ -76,42 +78,40 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
 	/**
 	 * Create advice needed by the actions related to and following this action
 	 */
-	private void createAdvice(IPublisherInfo info, IPublisherResult results) {
-		createLauncherAdvice(info, results);
+	private void createAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
+		createLauncherAdvice(publisherInfo, results);
 	}
 
 	/**
 	 * Create and register advice that will tell people what versions of the launcher bundle and 
 	 * fragments are in use in this particular result.
 	 */
-	private void createLauncherAdvice(IPublisherInfo info, IPublisherResult results) {
-		Collection ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
+	private void createLauncherAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
+		Collection<IInstallableUnit> ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
 		VersionAdvice advice = new VersionAdvice();
 		boolean found = false;
-		for (Iterator i = ius.iterator(); i.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) i.next();
+		for (IInstallableUnit iu : ius) {
 			// skip over source bundles and fragments
 			// TODO should we use the source property here rather than magic name matching?
-			if (iu.getId().endsWith(".source") || iu.isFragment()) //$NON-NLS-1$
+			if (iu.getId().endsWith(".source") || QueryUtil.isFragment(iu)) //$NON-NLS-1$
 				continue;
 			advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
 			found = true;
 		}
 		if (found)
-			info.addAdvice(advice);
+			publisherInfo.addAdvice(advice);
 	}
 
-	private Collection getIUs(Collection ius, String prefix) {
-		Set result = new HashSet();
-		for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
-			IInstallableUnit tmp = (IInstallableUnit) iterator.next();
+	private Collection<IInstallableUnit> getIUs(Collection<IInstallableUnit> ius, String prefix) {
+		Set<IInstallableUnit> result = new HashSet<IInstallableUnit>();
+		for (IInstallableUnit tmp : ius) {
 			if (tmp.getId().startsWith(prefix))
 				result.add(tmp);
 		}
 		return result;
 	}
 
-	private void publishApplicationLauncherIU(Collection children, IPublisherResult result) {
+	private void publishApplicationLauncherIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
 		InstallableUnitDescription descriptor = createParentIU(children, computeIUId(id, flavor), version);
 		descriptor.setSingleton(true);
 		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
@@ -120,18 +120,18 @@ public class ApplicationLauncherAction extends AbstractPublisherAction {
 		result.addIU(rootIU, IPublisherResult.ROOT);
 	}
 
-	private Collection createActions(IPublisherInfo info) {
-		Collection actions = new ArrayList();
+	private Collection<IPublisherAction> createActions(IPublisherInfo publisherInfo) {
+		Collection<IPublisherAction> actions = new ArrayList<IPublisherAction>();
 		actions.add(new EquinoxLauncherCUAction(flavor, configSpecs));
 		actions.addAll(createExecutablesActions(configSpecs));
 		return actions;
 	}
 
-	protected Collection createExecutablesActions(String[] configSpecs) {
-		Collection actions = new ArrayList(configSpecs.length);
-		for (int i = 0; i < configSpecs.length; i++) {
-			ExecutablesDescriptor executables = computeExecutables(configSpecs[i]);
-			IPublisherAction action = new EquinoxExecutableAction(executables, configSpecs[i], id, version, flavor);
+	protected Collection<IPublisherAction> createExecutablesActions(String[] configs) {
+		Collection<IPublisherAction> actions = new ArrayList<IPublisherAction>(configs.length);
+		for (int i = 0; i < configs.length; i++) {
+			ExecutablesDescriptor executables = computeExecutables(configs[i]);
+			IPublisherAction action = new EquinoxExecutableAction(executables, configs[i], id, version, flavor);
 			actions.add(action);
 		}
 		return actions;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
index cf1358e..510da51 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
@@ -9,7 +9,7 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 
 public class BundleShapeAdvice extends AbstractAdvice implements IBundleShapeAdvice {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
index 7227389..3da9abb 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
@@ -12,25 +12,29 @@ package org.eclipse.equinox.p2.publisher.eclipse;
 
 import java.io.*;
 import java.util.*;
+import java.util.Map.Entry;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
 import org.eclipse.equinox.internal.p2.publisher.Activator;
 import org.eclipse.equinox.internal.p2.publisher.Messages;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
@@ -63,7 +67,6 @@ public class BundlesAction extends AbstractPublisherAction {
 	/**
 	 * A capability name in the {@link PublisherHelper#NAMESPACE_ECLIPSE_TYPE} namespace
 	 * representing and OSGi bundle resource
-	 * @see IRequiredCapability#getName()
 	 * @see IProvidedCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
@@ -71,7 +74,7 @@ public class BundlesAction extends AbstractPublisherAction {
 	/**
 	 * A capability name in the {@link PublisherHelper#NAMESPACE_ECLIPSE_TYPE} namespace
 	 * representing a source bundle
-	 * @see IRequiredCapability#getName()
+	 * @see IProvidedCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
 
@@ -79,10 +82,10 @@ public class BundlesAction extends AbstractPublisherAction {
 	private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
 	private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
 
-	public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new Version(1, 0, 0));
-	public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, new Version(1, 0, 0));
+	public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
+	public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
 
-	static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
+	static final String DEFAULT_BUNDLE_LOCALIZATION = "OSGI-INF/l10n/bundle"; //$NON-NLS-1$
 
 	private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL, Constants.BUNDLE_UPDATELOCATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION, Constants.BUNDLE_LOCALIZATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION};
 	public static final int BUNDLE_LOCALIZATION_INDEX = PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length - 1;
@@ -97,10 +100,10 @@ public class BundlesAction extends AbstractPublisherAction {
 	private BundleDescription[] bundles;
 
 	public static IArtifactKey createBundleArtifactKey(String bsn, String version) {
-		return new ArtifactKey(OSGI_BUNDLE_CLASSIFIER, bsn, new Version(version));
+		return new ArtifactKey(OSGI_BUNDLE_CLASSIFIER, bsn, Version.parseVersion(version));
 	}
 
-	public static IInstallableUnit createBundleConfigurationUnit(String hostId, Version cuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String filter) {
+	public static IInstallableUnit createBundleConfigurationUnit(String hostId, Version cuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, IMatchExpression<IInstallableUnit> filter) {
 		if (configInfo == null)
 			return null;
 
@@ -111,15 +114,16 @@ public class BundlesAction extends AbstractPublisherAction {
 
 		//Indicate the IU to which this CU apply
 		Version hostVersion = Version.parseVersion(configInfo.getVersion());
-		cu.setHost(new IRequiredCapability[] { //
-				MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, hostId, new VersionRange(hostVersion, true, PublisherHelper.versionMax, true), null, false, false, true), //
-						MetadataFactory.createRequiredCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(new Version(1, 0, 0), true, new Version(2, 0, 0), false), null, false, false, false)});
+		VersionRange range = hostVersion == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(hostVersion, true, Version.MAX_VERSION, true);
+		cu.setHost(new IRequirement[] { //
+		MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, hostId, range, null, false, false, true), //
+				MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
 
 		//Adds capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, cuVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, cuVersion), MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
 		touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
 		touchpointData.put("configure", createConfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
@@ -130,14 +134,15 @@ public class BundlesAction extends AbstractPublisherAction {
 	}
 
 	public static IInstallableUnit createBundleIU(BundleDescription bd, IArtifactKey key, IPublisherInfo info) {
-		Map manifest = (Map) bd.getUserObject();
-		Map manifestLocalizations = null;
+		@SuppressWarnings("unchecked")
+		Map<String, String> manifest = (Map<String, String>) bd.getUserObject();
+		Map<Locale, Map<String, String>> manifestLocalizations = null;
 		if (manifest != null && bd.getLocation() != null)
 			manifestLocalizations = getManifestLocalizations(manifest, new File(bd.getLocation()));
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		iu.setSingleton(bd.isSingleton());
 		iu.setId(bd.getSymbolicName());
-		iu.setVersion(Version.fromOSGiVersion(bd.getVersion()));
+		iu.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion()));
 		iu.setFilter(bd.getPlatformFilter());
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
 		iu.setArtifacts(new IArtifactKey[] {key});
@@ -148,13 +153,13 @@ public class BundlesAction extends AbstractPublisherAction {
 
 		//Process the required bundles
 		BundleSpecification requiredBundles[] = bd.getRequiredBundles();
-		ArrayList reqsDeps = new ArrayList();
+		ArrayList<IRequirement> reqsDeps = new ArrayList<IRequirement>();
 		//		if (requiresAFragment)
 		//			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
 		if (isFragment)
-			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
 		for (int j = 0; j < requiredBundles.length; j++)
-			reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), VersionRange.fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), PublisherHelper.fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
 
 		// Process the import packages
 		ImportPackageSpecification osgiImports[] = bd.getImportPackages();
@@ -164,22 +169,22 @@ public class BundlesAction extends AbstractPublisherAction {
 			String importPackageName = importSpec.getName();
 			if (importPackageName.indexOf('*') != -1)
 				continue;
-			VersionRange versionRange = VersionRange.fromOSGiVersionRange(importSpec.getVersionRange());
+			VersionRange versionRange = PublisherHelper.fromOSGiVersionRange(importSpec.getVersionRange());
 			//TODO this needs to be refined to take into account all the attribute handled by imports
-			reqsDeps.add(MetadataFactory.createRequiredCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
+			reqsDeps.add(MetadataFactory.createRequirement(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
 		}
-		iu.setRequiredCapabilities((IRequiredCapability[]) reqsDeps.toArray(new IRequiredCapability[reqsDeps.size()]));
+		iu.setRequirements(reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
 
 		// Create set of provided capabilities
-		ArrayList providedCapabilities = new ArrayList();
-		providedCapabilities.add(PublisherHelper.createSelfCapability(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
-		providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion())));
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
+		providedCapabilities.add(PublisherHelper.createSelfCapability(bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
+		providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
 
 		// Process the export package
 		ExportPackageDescription exports[] = bd.getExportPackages();
 		for (int i = 0; i < exports.length; i++) {
 			//TODO make sure that we support all the refinement on the exports
-			providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), Version.fromOSGiVersion(exports[i].getVersion())));
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), PublisherHelper.fromOSGiVersion(exports[i].getVersion())));
 		}
 		// Here we add a bundle capability to identify bundles
 		if (manifest != null && manifest.containsKey("Eclipse-SourceBundle")) //$NON-NLS-1$
@@ -187,21 +192,19 @@ public class BundlesAction extends AbstractPublisherAction {
 		else
 			providedCapabilities.add(BUNDLE_CAPABILITY);
 		if (isFragment)
-			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), Version.fromOSGiVersion(bd.getVersion())));
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
 
 		if (manifestLocalizations != null) {
-			for (Iterator iter = manifestLocalizations.keySet().iterator(); iter.hasNext();) {
-				Locale locale = (Locale) iter.next();
-				Properties translatedStrings = (Properties) manifestLocalizations.get(locale);
-				Enumeration propertyKeys = translatedStrings.propertyNames();
-				while (propertyKeys.hasMoreElements()) {
-					String nextKey = (String) propertyKeys.nextElement();
-					iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+			for (Entry<Locale, Map<String, String>> locEntry : manifestLocalizations.entrySet()) {
+				Locale locale = locEntry.getKey();
+				Map<String, String> translatedStrings = locEntry.getValue();
+				for (Entry<String, String> entry : translatedStrings.entrySet()) {
+					iu.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
 				}
 				providedCapabilities.add(PublisherHelper.makeTranslationCapability(bd.getSymbolicName(), locale));
 			}
 		}
-		iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 		processCapabilityAdvice(iu, info);
 
 		// Set certain properties from the manifest header attributes as IU properties.
@@ -212,7 +215,7 @@ public class BundlesAction extends AbstractPublisherAction {
 			int i = 0;
 			while (i < BUNDLE_IU_PROPERTY_MAP.length) {
 				if (manifest.containsKey(BUNDLE_IU_PROPERTY_MAP[i])) {
-					String value = (String) manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
+					String value = manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
 					if (value != null && value.length() > 0) {
 						iu.setProperty(BUNDLE_IU_PROPERTY_MAP[i + 1], value);
 					}
@@ -223,7 +226,7 @@ public class BundlesAction extends AbstractPublisherAction {
 
 		// Define the immutable metadata for this IU. In this case immutable means
 		// that this is something that will not impact the configuration.
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("manifest", toManifestString(manifest)); //$NON-NLS-1$
 		if (isDir(bd, info))
 			touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -236,19 +239,18 @@ public class BundlesAction extends AbstractPublisherAction {
 	static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
 		VersionRange updateRange = null;
 		if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
-			updateRange = new VersionRange(Version.emptyVersion, true, Version.fromOSGiVersion(base), false);
+			updateRange = new VersionRange(Version.emptyVersion, true, PublisherHelper.fromOSGiVersion(base), false);
 		} else {
-			updateRange = new VersionRange("0.0.0"); //$NON-NLS-1$
+			updateRange = VersionRange.emptyRange;
 		}
 		return updateRange;
 	}
 
 	private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) {
-		Map hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
-		if (hostLocalizations != null) {
-			return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
-		}
-		return null;
+		Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
+		if (hostLocalizations == null || hostLocalizations.isEmpty())
+			return null;
+		return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
 	}
 
 	/*
@@ -258,33 +260,31 @@ public class BundlesAction extends AbstractPublisherAction {
 	 * @param localizedStrings
 	 * @return installableUnitFragment
 	 */
-	private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map hostLocalizations) {
+	private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map<Locale, Map<String, String>> hostLocalizations) {
 		InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
 		String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
 		fragment.setId(fragmentId);
-		fragment.setVersion(Version.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
+		fragment.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
 
 		HostSpecification hostSpec = bd.getHost();
-		IRequiredCapability[] hostReqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), VersionRange.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
+		IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), PublisherHelper.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
 		fragment.setHost(hostReqs);
 
 		fragment.setSingleton(true);
-		fragment.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 
 		// Create a provided capability for each locale and add the translated properties.
-		ArrayList providedCapabilities = new ArrayList(hostLocalizations.keySet().size());
-		for (Iterator iter = hostLocalizations.keySet().iterator(); iter.hasNext();) {
-			Locale locale = (Locale) iter.next();
-			Properties translatedStrings = (Properties) hostLocalizations.get(locale);
-
-			Enumeration propertyKeys = translatedStrings.propertyNames();
-			while (propertyKeys.hasMoreElements()) {
-				String nextKey = (String) propertyKeys.nextElement();
-				fragment.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>(hostLocalizations.keySet().size());
+		providedCapabilities.add(PublisherHelper.createSelfCapability(fragmentId, fragment.getVersion()));
+		for (Entry<Locale, Map<String, String>> localeEntry : hostLocalizations.entrySet()) {
+			Locale locale = localeEntry.getKey();
+			Map<String, String> translatedStrings = localeEntry.getValue();
+			for (Entry<String, String> entry : translatedStrings.entrySet()) {
+				fragment.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
 			}
 			providedCapabilities.add(PublisherHelper.makeTranslationCapability(hostId, locale));
 		}
-		fragment.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		fragment.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 
 		return MetadataFactory.createInstallableUnitFragment(fragment);
 	}
@@ -325,17 +325,17 @@ public class BundlesAction extends AbstractPublisherAction {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = PublisherHelper.createDefaultConfigUnitId(OSGI_BUNDLE_CLASSIFIER, configurationFlavor);
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on bundles
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
 		cu.setHost(reqs);
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 
 		touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
 		touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -373,13 +373,11 @@ public class BundlesAction extends AbstractPublisherAction {
 		return false;
 	}
 
-	private static String toManifestString(Map p) {
+	private static String toManifestString(Map<String, String> p) {
 		if (p == null)
 			return null;
-		Collection properties = p.entrySet();
 		StringBuffer result = new StringBuffer();
-		for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
-			Map.Entry aProperty = (Map.Entry) iterator.next();
+		for (Entry<String, String> aProperty : p.entrySet()) {
 			if (aProperty.getKey().equals(BUNDLE_SHAPE))
 				continue;
 			result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
@@ -390,8 +388,8 @@ public class BundlesAction extends AbstractPublisherAction {
 	// Return a map from locale to property set for the manifest localizations
 	// from the given bundle directory and given bundle localization path/name
 	// manifest property value.
-	private static Map getManifestLocalizations(Map manifest, File bundleLocation) {
-		Map localizations;
+	private static Map<Locale, Map<String, String>> getManifestLocalizations(Map<String, String> manifest, File bundleLocation) {
+		Map<Locale, Map<String, String>> localizations;
 		Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
 		String[] bundleManifestValues = getManifestCachedValues(manifest);
 		String bundleLocalization = bundleManifestValues[BUNDLE_LOCALIZATION_INDEX]; // Bundle localization is the last one in the list
@@ -423,10 +421,10 @@ public class BundlesAction extends AbstractPublisherAction {
 		return result;
 	}
 
-	public static String[] getManifestCachedValues(Map manifest) {
+	public static String[] getManifestCachedValues(Map<String, String> manifest) {
 		String[] cachedValues = new String[PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length];
 		for (int j = 0; j < PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length; j++) {
-			String value = (String) manifest.get(PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES[j]);
+			String value = manifest.get(PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES[j]);
 			if (PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES[j].equals(Constants.BUNDLE_LOCALIZATION)) {
 				if (value == null)
 					value = DEFAULT_BUNDLE_LOCALIZATION;
@@ -441,8 +439,8 @@ public class BundlesAction extends AbstractPublisherAction {
 	// Return a map from locale to property set for the manifest localizations
 	// from the given bundle directory and given bundle localization path/name
 	// manifest property value.
-	public static Map getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
-		Map localizations;
+	public static Map<Locale, Map<String, String>> getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
+		Map<Locale, Map<String, String>> localizations;
 		Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
 		String hostBundleLocalization = hostBundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
 		if (hostBundleLocalization == null)
@@ -464,7 +462,8 @@ public class BundlesAction extends AbstractPublisherAction {
 		return (PluginConverter) ServiceHelper.getService(Activator.getContext(), PluginConverter.class.getName());
 	}
 
-	private static Dictionary convertPluginManifest(File bundleLocation, boolean logConversionException) {
+	@SuppressWarnings("unchecked")
+	private static Dictionary<String, String> convertPluginManifest(File bundleLocation, boolean logConversionException) {
 		PluginConverter converter;
 		try {
 			converter = acquirePluginConverter();
@@ -488,7 +487,7 @@ public class BundlesAction extends AbstractPublisherAction {
 		}
 	}
 
-	public static BundleDescription createBundleDescription(Dictionary enhancedManifest, File bundleLocation) {
+	public static BundleDescription createBundleDescription(Dictionary<String, String> enhancedManifest, File bundleLocation) {
 		try {
 			BundleDescription descriptor = StateObjectFactory.defaultFactory.createBundleDescription(null, enhancedManifest, bundleLocation == null ? null : bundleLocation.getAbsolutePath(), 1); //TODO Do we need to have a real bundle id
 			descriptor.setUserObject(enhancedManifest);
@@ -502,14 +501,14 @@ public class BundlesAction extends AbstractPublisherAction {
 	}
 
 	public static BundleDescription createBundleDescription(File bundleLocation) {
-		Dictionary manifest = loadManifest(bundleLocation);
+		Dictionary<String, String> manifest = loadManifest(bundleLocation);
 		if (manifest == null)
 			return null;
 		return createBundleDescription(manifest, bundleLocation);
 	}
 
-	public static Dictionary loadManifest(File bundleLocation) {
-		Dictionary manifest = basicLoadManifest(bundleLocation);
+	public static Dictionary<String, String> loadManifest(File bundleLocation) {
+		Dictionary<String, String> manifest = basicLoadManifest(bundleLocation);
 		if (manifest == null)
 			return null;
 		// if the bundle itself does not define its shape, infer the shape from the current form
@@ -518,7 +517,7 @@ public class BundlesAction extends AbstractPublisherAction {
 		return manifest;
 	}
 
-	public static Dictionary basicLoadManifest(File bundleLocation) {
+	public static Dictionary<String, String> basicLoadManifest(File bundleLocation) {
 		InputStream manifestStream = null;
 		ZipFile jarFile = null;
 		try {
@@ -537,32 +536,34 @@ public class BundlesAction extends AbstractPublisherAction {
 			String message = NLS.bind(Messages.exception_errorLoadingManifest, bundleLocation);
 			LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, e));
 		}
-
-		Dictionary manifest = null;
-		if (manifestStream != null) {
-			try {
-				Map manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
-				// TODO temporary hack.  We are reading a Map but everyone wants a Dictionary so convert.
-				// real answer is to have people expect a Map but that is a wider change.
-				manifest = new Hashtable(manifestMap);
-			} catch (IOException e) {
-				String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
-				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
-				return null;
-			} catch (BundleException e) {
-				String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
-				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
-				return null;
-			} finally {
+		Dictionary<String, String> manifest = null;
+		try {
+			if (manifestStream != null) {
 				try {
-					if (jarFile != null)
-						jarFile.close();
-				} catch (IOException e2) {
-					//Ignore
+					@SuppressWarnings("unchecked")
+					Map<String, String> manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
+					// TODO temporary hack.  We are reading a Map but everyone wants a Dictionary so convert.
+					// real answer is to have people expect a Map but that is a wider change.
+					manifest = new Hashtable<String, String>(manifestMap);
+				} catch (IOException e) {
+					String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
+					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
+					return null;
+				} catch (BundleException e) {
+					String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
+					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
+					return null;
 				}
+			} else {
+				manifest = convertPluginManifest(bundleLocation, true);
+			}
+		} finally {
+			try {
+				if (jarFile != null)
+					jarFile.close();
+			} catch (IOException e2) {
+				//Ignore
 			}
-		} else {
-			manifest = convertPluginManifest(bundleLocation, true);
 		}
 
 		if (manifest == null)
@@ -592,7 +593,7 @@ public class BundlesAction extends AbstractPublisherAction {
 		try {
 			if (bundles == null)
 				bundles = getBundleDescriptions(expandLocations(locations), monitor);
-			generateBundleIUs(bundles, results, monitor);
+			generateBundleIUs(bundles, publisherInfo, results, monitor);
 			bundles = null;
 		} catch (OperationCanceledException e) {
 			return Status.CANCEL_STATUS;
@@ -600,46 +601,46 @@ public class BundlesAction extends AbstractPublisherAction {
 		return Status.OK_STATUS;
 	}
 
-	protected void publishArtifact(IArtifactDescriptor descriptor, File base, File[] inclusions, IPublisherInfo info) {
-		IArtifactRepository destination = info.getArtifactRepository();
+	protected void publishArtifact(IArtifactDescriptor descriptor, File base, File[] inclusions, IPublisherInfo publisherInfo) {
+		IArtifactRepository destination = publisherInfo.getArtifactRepository();
 		if (descriptor == null || destination == null)
 			return;
 
 		// publish the given files
-		publishArtifact(descriptor, inclusions, null, info, createRootPrefixComputer(base));
+		publishArtifact(descriptor, inclusions, null, publisherInfo, createRootPrefixComputer(base));
 	}
 
-	protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo info) {
+	protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) {
 		// no files to publish so this is done.
-		if (jarFile == null || info == null)
+		if (jarFile == null || publisherInfo == null)
 			return;
 
 		// if the destination already contains the descriptor, there is nothing to do.
-		IArtifactRepository destination = info.getArtifactRepository();
+		IArtifactRepository destination = publisherInfo.getArtifactRepository();
 		if (destination == null || destination.contains(descriptor))
 			return;
 
-		super.publishArtifact(descriptor, jarFile, info);
+		super.publishArtifact(descriptor, jarFile, publisherInfo);
 
 		// if we are assimilating pack200 files then add the packed descriptor
 		// into the repo assuming it does not already exist.
 		boolean reuse = "true".equals(destination.getProperties().get(AbstractPublisherApplication.PUBLISH_PACK_FILES_AS_SIBLINGS)); //$NON-NLS-1$
-		if (reuse && (info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) {
+		if (reuse && (publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) {
 			File packFile = new Path(jarFile.getAbsolutePath()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
 			if (packFile.exists()) {
 				IArtifactDescriptor ad200 = createPack200ArtifactDescriptor(descriptor.getArtifactKey(), packFile, descriptor.getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
-				publishArtifact(ad200, packFile, info);
+				publishArtifact(ad200, packFile, publisherInfo);
 			}
 		}
 	}
 
 	private File[] expandLocations(File[] list) {
-		ArrayList result = new ArrayList();
+		ArrayList<File> result = new ArrayList<File>();
 		expandLocations(list, result);
-		return (File[]) result.toArray(new File[result.size()]);
+		return result.toArray(new File[result.size()]);
 	}
 
-	private void expandLocations(File[] list, ArrayList result) {
+	private void expandLocations(File[] list, ArrayList<File> result) {
 		if (list == null)
 			return;
 		for (int i = 0; i < list.length; i++) {
@@ -658,7 +659,12 @@ public class BundlesAction extends AbstractPublisherAction {
 		}
 	}
 
+	//TODO remove this method
 	protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherResult result, IProgressMonitor monitor) {
+		generateBundleIUs(bundleDescriptions, null, result, monitor);
+	}
+
+	protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherInfo info, IPublisherResult result, IProgressMonitor monitor) {
 
 		// This assumes that hosts are processed before fragments because for each fragment the host
 		// is queried for the strings that should be translated.
@@ -669,7 +675,7 @@ public class BundlesAction extends AbstractPublisherAction {
 			BundleDescription bd = bundleDescriptions[i];
 			if (bd != null && bd.getSymbolicName() != null && bd.getVersion() != null) {
 				//First check to see if there is already an IU around for this
-				IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), Version.fromOSGiVersion(bd.getVersion()));
+				IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()));
 				IArtifactKey key = createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString());
 				if (bundleIU == null) {
 					createAdviceFileAdvice(bundleDescriptions[i], info);
@@ -678,8 +684,8 @@ public class BundlesAction extends AbstractPublisherAction {
 				}
 
 				File location = new File(bd.getLocation());
-				IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(key, location);
-				processArtifactPropertiesAdvice(bundleIU, (ArtifactDescriptor) ad, info);
+				IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(info, key, location);
+				processArtifactPropertiesAdvice(bundleIU, ad, info);
 
 				// Publish according to the shape on disk
 				File bundleLocation = new File(bd.getLocation());
@@ -692,14 +698,15 @@ public class BundlesAction extends AbstractPublisherAction {
 				if (isFragment(bd)) {
 					// TODO: Need a test case for multiple hosts
 					String hostId = bd.getHost().getName();
-					VersionRange hostVersionRange = VersionRange.fromOSGiVersionRange(bd.getHost().getVersionRange());
-					IInstallableUnit[] hosts = queryForIUs(result, hostId, hostVersionRange);
+					VersionRange hostVersionRange = PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange());
+					IQueryResult<IInstallableUnit> hosts = queryForIUs(result, hostId, hostVersionRange);
 
-					for (int j = 0; j < hosts.length; j++) {
+					for (Iterator<IInstallableUnit> itor = hosts.iterator(); itor.hasNext();) {
+						IInstallableUnit host = itor.next();
 						String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
-						fragment = queryForIU(result, fragmentId, Version.fromOSGiVersion(bd.getVersion()));
+						fragment = queryForIU(result, fragmentId, PublisherHelper.fromOSGiVersion(bd.getVersion()));
 						if (fragment == null) {
-							String[] externalizedStrings = getExternalizedStrings(hosts[j]);
+							String[] externalizedStrings = getExternalizedStrings(host);
 							fragment = createHostLocalizationFragment(bundleIU, bd, hostId, externalizedStrings);
 						}
 					}
@@ -721,29 +728,30 @@ public class BundlesAction extends AbstractPublisherAction {
 	/**
 	 * Adds advice for any p2.inf file found in this bundle.
 	 */
-	private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo info) {
+	private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) {
 		String location = bundleDescription.getLocation();
 		if (location == null)
 			return;
 
-		AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), Version.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
+		AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
 		if (advice.containsAdvice())
-			info.addAdvice(advice);
+			publisherInfo.addAdvice(advice);
 
 	}
 
 	private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
-		Collection advice = info.getAdvice(null, true, bundle.getSymbolicName(), Version.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
+		Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
 		// if the advice has a shape, use it
 		if (advice != null && !advice.isEmpty()) {
 			// we know there is some advice but if there is more than one, take the first.
-			String shape = ((IBundleShapeAdvice) advice.iterator().next()).getShape();
+			String shape = advice.iterator().next().getShape();
 			if (shape != null)
 				return shape.equals(IBundleShapeAdvice.DIR);
 		}
 		// otherwise go with whatever we figured out from the manifest or the shape on disk
-		Map manifest = (Map) bundle.getUserObject();
-		String format = (String) manifest.get(BUNDLE_SHAPE);
+		@SuppressWarnings("unchecked")
+		Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
+		String format = manifest.get(BUNDLE_SHAPE);
 		return DIR.equals(format);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
index 2e25a1b..a095a55 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
@@ -9,8 +9,9 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import java.util.Map;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 
@@ -32,10 +33,8 @@ public class ConfigAdvice extends AbstractAdvice implements IConfigAdvice {
 		return configSpec;
 	}
 
-	public Properties getProperties() {
-		Properties result = new Properties();
-		result.putAll(data.getProperties());
-		return result;
+	public Map<String, String> getProperties() {
+		return CollectionUtils.toMap(data.getProperties());
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
index a3d55b8..3d77fde 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
@@ -14,11 +14,12 @@ import java.io.File;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.util.ManifestElement;
@@ -33,8 +34,9 @@ import org.osgi.framework.Constants;
 public class ConfigCUsAction extends AbstractPublisherAction {
 
 	protected static final String ORG_ECLIPSE_UPDATE_CONFIGURATOR = "org.eclipse.update.configurator"; //$NON-NLS-1$
-	private static Collection PROPERTIES_TO_SKIP;
-	private static HashSet PROGRAM_ARGS_TO_SKIP;
+	protected static final String DEFAULT_START_LEVEL = "osgi.bundles.defaultStartLevel"; //$NON-NLS-1$
+	private static Collection<String> PROPERTIES_TO_SKIP;
+	private static HashSet<String> PROGRAM_ARGS_TO_SKIP;
 	protected Version version;
 	protected String id;
 	protected String flavor;
@@ -43,18 +45,17 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 	// TODO consider moving this filtering to the LaunchingAdvice and ConfigAdvice so 
 	// it is not hardcoded in the action.
 	static {
-		PROPERTIES_TO_SKIP = new HashSet();
+		PROPERTIES_TO_SKIP = new HashSet<String>();
 		PROPERTIES_TO_SKIP.add("osgi.frameworkClassPath"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("osgi.framework"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("osgi.bundles"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("eof"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("eclipse.p2.profile"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("eclipse.p2.data.area"); //$NON-NLS-1$
-		PROPERTIES_TO_SKIP.add("osgi.launcherPath"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("org.eclipse.update.reconcile"); //$NON-NLS-1$
 		PROPERTIES_TO_SKIP.add("org.eclipse.equinox.simpleconfigurator.configUrl"); //$NON-NLS-1$
 
-		PROGRAM_ARGS_TO_SKIP = new HashSet();
+		PROGRAM_ARGS_TO_SKIP = new HashSet<String>();
 		PROGRAM_ARGS_TO_SKIP.add("--launcher.library"); //$NON-NLS-1$
 		PROGRAM_ARGS_TO_SKIP.add("-startup"); //$NON-NLS-1$
 		PROGRAM_ARGS_TO_SKIP.add("-configuration"); //$NON-NLS-1$
@@ -65,7 +66,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 	}
 
 	public static String getAbstractCUCapabilityId(String id, String type, String flavor, String configSpec) {
-		return id + "." + type;
+		return id + "." + type; //$NON-NLS-1$
 	}
 
 	/**
@@ -84,22 +85,22 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 		this.version = version;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		IPublisherResult innerResult = new PublisherResult();
 		this.outerResults = results;
-		this.info = info;
+		this.info = publisherInfo;
 		// we have N platforms, generate a CU for each
 		// TODO try and find common properties across platforms
-		String[] configSpecs = info.getConfigurations();
+		String[] configSpecs = publisherInfo.getConfigurations();
 		for (int i = 0; i < configSpecs.length; i++) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
 			String configSpec = configSpecs[i];
-			Collection configAdvice = info.getAdvice(configSpec, false, id, version, IConfigAdvice.class);
+			Collection<IConfigAdvice> configAdvice = publisherInfo.getAdvice(configSpec, false, id, version, IConfigAdvice.class);
 			BundleInfo[] bundles = fillInBundles(configAdvice, results);
-			publishBundleCUs(info, bundles, configSpec, innerResult);
+			publishBundleCUs(publisherInfo, bundles, configSpec, innerResult);
 			publishConfigIUs(configAdvice, innerResult, configSpec);
-			Collection launchingAdvice = info.getAdvice(configSpec, false, id, version, IExecutableAdvice.class);
+			Collection<IExecutableAdvice> launchingAdvice = publisherInfo.getAdvice(configSpec, false, id, version, IExecutableAdvice.class);
 			publishIniIUs(launchingAdvice, innerResult, configSpec);
 		}
 		// merge the IUs  into the final result as non-roots and create a parent IU that captures them all
@@ -108,7 +109,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 		return Status.OK_STATUS;
 	}
 
-	private void publishTopLevelConfigurationIU(Collection children, IPublisherResult result) {
+	private void publishTopLevelConfigurationIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
 		InstallableUnitDescription descriptor = createParentIU(children, computeIUId(id, flavor), version);
 		descriptor.setSingleton(true);
 		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
@@ -119,26 +120,41 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 
 	// there seem to be cases where the bundle infos are not filled in with symbolic name and version.
 	// fill in the missing data.
-	private BundleInfo[] fillInBundles(Collection configAdvice, IPublisherResult results) {
-		ArrayList result = new ArrayList();
-		for (Iterator j = configAdvice.iterator(); j.hasNext();) {
-			IConfigAdvice advice = (IConfigAdvice) j.next();
+	private BundleInfo[] fillInBundles(Collection<IConfigAdvice> configAdvice, IPublisherResult results) {
+		ArrayList<BundleInfo> result = new ArrayList<BundleInfo>();
+		for (IConfigAdvice advice : configAdvice) {
+
+			int defaultStart = BundleInfo.NO_LEVEL;
+			Map<String, String> adviceProperties = advice.getProperties();
+			if (adviceProperties.containsKey(DEFAULT_START_LEVEL)) {
+				try {
+					defaultStart = Integer.parseInt(adviceProperties.get(DEFAULT_START_LEVEL));
+				} catch (NumberFormatException e) {
+					//don't know default
+				}
+			}
+
 			BundleInfo[] bundles = advice.getBundles();
 			for (int i = 0; i < bundles.length; i++) {
 				BundleInfo bundleInfo = bundles[i];
+
+				if (bundleInfo.getStartLevel() != BundleInfo.NO_LEVEL && bundleInfo.getStartLevel() == defaultStart) {
+					bundleInfo.setStartLevel(BundleInfo.NO_LEVEL);
+				}
+
 				// prime the result with the current info.  This will be replaced if there is more info...
 				if ((bundleInfo.getSymbolicName() != null && bundleInfo.getVersion() != null) || bundleInfo.getLocation() == null)
 					result.add(bundles[i]);
 				else {
 					try {
 						File location = new File(bundleInfo.getLocation());
-						Dictionary manifest = BundlesAction.loadManifest(location);
+						Dictionary<String, String> manifest = BundlesAction.loadManifest(location);
 						if (manifest == null)
 							continue;
 						GeneratorBundleInfo newInfo = new GeneratorBundleInfo(bundleInfo);
-						ManifestElement[] element = ManifestElement.parseHeader("dummy-bsn", (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
+						ManifestElement[] element = ManifestElement.parseHeader("dummy-bsn", manifest.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
 						newInfo.setSymbolicName(element[0].getValue());
-						newInfo.setVersion((String) manifest.get(Constants.BUNDLE_VERSION));
+						newInfo.setVersion(manifest.get(Constants.BUNDLE_VERSION));
 						result.add(newInfo);
 					} catch (BundleException e) {
 						// TODO Auto-generated catch block
@@ -147,13 +163,13 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 				}
 			}
 		}
-		return (BundleInfo[]) result.toArray(new BundleInfo[result.size()]);
+		return result.toArray(new BundleInfo[result.size()]);
 	}
 
 	/**
 	 * Publish the IUs that capture the eclipse.ini information such as vmargs and program args, etc
 	 */
-	private void publishIniIUs(Collection launchingAdvice, IPublisherResult results, String configSpec) {
+	private void publishIniIUs(Collection<IExecutableAdvice> launchingAdvice, IPublisherResult results, String configSpec) {
 		if (launchingAdvice.isEmpty())
 			return;
 
@@ -168,7 +184,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 		if (configureData.length() == 0 && unconfigureData.length() == 0)
 			return;
 
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("configure", configureData); //$NON-NLS-1$
 		touchpointData.put("unconfigure", unconfigureData); //$NON-NLS-1$
 		IInstallableUnit cu = createCU(id, version, "ini", flavor, configSpec, touchpointData); //$NON-NLS-1$
@@ -178,7 +194,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 	/**
 	 * Publish the IUs that capture the config.ini information such as properties etc
 	 */
-	private void publishConfigIUs(Collection configAdvice, IPublisherResult results, String configSpec) {
+	private void publishConfigIUs(Collection<IConfigAdvice> configAdvice, IPublisherResult results, String configSpec) {
 		if (configAdvice.isEmpty())
 			return;
 
@@ -193,7 +209,7 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 		if (configureData.length() == 0 && unconfigureData.length() == 0)
 			return;
 
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("configure", configureData); //$NON-NLS-1$
 		touchpointData.put("unconfigure", unconfigureData); //$NON-NLS-1$
 		IInstallableUnit cu = createCU(id, version, "config", flavor, configSpec, touchpointData); //$NON-NLS-1$
@@ -206,36 +222,37 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 	 * with the name id.type and the given version.  This allows others to create an abstract
 	 * dependency on having one of these things around but not having to list out the configs.
 	 */
-	private IInstallableUnit createCU(String id, Version version, String type, String flavor, String configSpec, Map touchpointData) {
+	private IInstallableUnit createCU(String cuId, Version cuVersion, String cuType, String cuFlavor, String configSpec, Map<String, String> touchpointData) {
 		InstallableUnitDescription cu = new InstallableUnitDescription();
-		String resultId = createCUIdString(id, type, flavor, configSpec);
+		String resultId = createCUIdString(cuId, cuType, cuFlavor, configSpec);
 		cu.setId(resultId);
-		cu.setVersion(version);
+		cu.setVersion(cuVersion);
 		cu.setFilter(createFilterSpec(configSpec));
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		IProvidedCapability selfCapability = PublisherHelper.createSelfCapability(resultId, version);
-		String namespace = getAbstractCUCapabilityNamespace(id, type, flavor, configSpec);
-		String abstractId = getAbstractCUCapabilityId(id, type, flavor, configSpec);
-		IProvidedCapability abstractCapability = MetadataFactory.createProvidedCapability(namespace, abstractId, version);
+		IProvidedCapability selfCapability = PublisherHelper.createSelfCapability(resultId, cuVersion);
+		String namespace = getAbstractCUCapabilityNamespace(cuId, cuType, cuFlavor, configSpec);
+		String abstractId = getAbstractCUCapabilityId(cuId, cuType, cuFlavor, configSpec);
+		IProvidedCapability abstractCapability = MetadataFactory.createProvidedCapability(namespace, abstractId, cuVersion);
 		cu.setCapabilities(new IProvidedCapability[] {selfCapability, abstractCapability});
 		cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
 		cu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
 		return MetadataFactory.createInstallableUnit(cu);
 	}
 
-	protected String[] getConfigurationStrings(Collection configAdvice) {
+	protected String[] getConfigurationStrings(Collection<IConfigAdvice> configAdvice) {
 		String configurationData = ""; //$NON-NLS-1$
 		String unconfigurationData = ""; //$NON-NLS-1$
-		Set properties = new HashSet();
-		for (Iterator i = configAdvice.iterator(); i.hasNext();) {
-			IConfigAdvice advice = (IConfigAdvice) i.next();
-			for (Iterator iterator = advice.getProperties().entrySet().iterator(); iterator.hasNext();) {
-				Entry aProperty = (Entry) iterator.next();
-				String key = ((String) aProperty.getKey());
+		Set<String> properties = new HashSet<String>();
+		for (IConfigAdvice advice : configAdvice) {
+			for (Entry<String, String> aProperty : advice.getProperties().entrySet()) {
+				String key = aProperty.getKey();
 				if (shouldPublishProperty(key) && !properties.contains(key)) {
 					properties.add(key);
-					configurationData += "setProgramProperty(propName:" + key + ", propValue:" + ((String) aProperty.getValue()) + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-					unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
+					Map<String, String> parameters = new LinkedHashMap<String, String>();
+					parameters.put("propName", key); //$NON-NLS-1$
+					parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$
+					configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
+					parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$
+					unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
 				}
 			}
 		}
@@ -254,28 +271,32 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 		return !PROGRAM_ARGS_TO_SKIP.contains(key);
 	}
 
-	protected String[] getLauncherConfigStrings(Collection launchingAdvice) {
+	protected String[] getLauncherConfigStrings(Collection<IExecutableAdvice> launchingAdvice) {
 		String configurationData = ""; //$NON-NLS-1$
 		String unconfigurationData = ""; //$NON-NLS-1$
 
-		Set jvmSet = new HashSet();
-		Set programSet = new HashSet();
-		for (Iterator j = launchingAdvice.iterator(); j.hasNext();) {
-			IExecutableAdvice advice = (IExecutableAdvice) j.next();
+		Map<String, String> touchpointParameters = new LinkedHashMap<String, String>();
+		Set<String> jvmSet = new HashSet<String>();
+		Set<String> programSet = new HashSet<String>();
+		for (IExecutableAdvice advice : launchingAdvice) {
 			String[] jvmArgs = advice.getVMArguments();
 			for (int i = 0; i < jvmArgs.length; i++)
 				if (shouldPublishJvmArg(jvmArgs[i]) && !jvmSet.contains(jvmArgs[i])) {
 					jvmSet.add(jvmArgs[i]);
-					configurationData += "addJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
-					unconfigurationData += "removeJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
+					touchpointParameters.clear();
+					touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$
+					configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$
+					unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$
 				}
 			String[] programArgs = advice.getProgramArguments();
 			for (int i = 0; i < programArgs.length; i++)
 				if (shouldPublishProgramArg(programArgs[i]) && !programSet.contains(programArgs[i])) {
 					if (programArgs[i].startsWith("-")) //$NON-NLS-1$
 						programSet.add(programArgs[i]);
-					configurationData += "addProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
-					unconfigurationData += "removeProgramArg(programArg:" + programArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
+					touchpointParameters.clear();
+					touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$
+					configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$
+					unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$
 				} else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
 					// if we are not publishing then skip over the following arg as it is assumed to be a parameter
 					// to this command line arg.
@@ -289,12 +310,12 @@ public class ConfigCUsAction extends AbstractPublisherAction {
 	 * Publish the CUs related to the given set of bundles.  This generally covers the start-level and 
 	 * and whether or not the bundle is to be started.
 	 */
-	protected void publishBundleCUs(IPublisherInfo info, BundleInfo[] bundles, String configSpec, IPublisherResult result) {
+	protected void publishBundleCUs(IPublisherInfo publisherInfo, BundleInfo[] bundles, String configSpec, IPublisherResult result) {
 		if (bundles == null)
 			return;
 
 		String cuIdPrefix = ""; //$NON-NLS-1$
-		String filter = null;
+		IMatchExpression<IInstallableUnit> filter = null;
 		if (configSpec != null) {
 			cuIdPrefix = createIdString(configSpec);
 			filter = createFilterSpec(configSpec);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
index 8f96357..30734f3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
@@ -30,7 +30,8 @@ public class DefaultCUsAction extends AbstractPublisherAction {
 		this.start = start;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		setPublisherInfo(publisherInfo);
 		generateDefaultConfigIU(results);
 		return Status.OK_STATUS;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
index ed2be0c..184714a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
@@ -10,13 +10,12 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
 import java.io.File;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.*;
 
@@ -27,14 +26,15 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 	protected String name;
 	protected String executableName;
 	protected String flavor;
-	protected VersionedName[] topLevel;
+	protected IVersionedId[] topLevel;
 	protected String[] nonRootFiles;
 	protected boolean start = false;
 
 	protected EclipseInstallAction() {
+		//hidden
 	}
 
-	public EclipseInstallAction(String source, String id, Version version, String name, String executableName, String flavor, VersionedName[] topLevel, String[] nonRootFiles, boolean start) {
+	public EclipseInstallAction(String source, String id, Version version, String name, String executableName, String flavor, IVersionedId[] topLevel, String[] nonRootFiles, boolean start) {
 		this.source = source;
 		this.id = id;
 		this.version = version;
@@ -46,15 +46,15 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		this.start = start;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		monitor = SubMonitor.convert(monitor);
-		this.info = info;
+		this.info = publisherInfo;
 		IPublisherAction[] actions = createActions();
 		MultiStatus finalStatus = new MultiStatus(EclipseInstallAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
 		for (int i = 0; i < actions.length; i++) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
-			finalStatus.merge(actions[i].perform(info, results, monitor));
+			finalStatus.merge(actions[i].perform(publisherInfo, results, monitor));
 		}
 		if (!finalStatus.isOK())
 			return finalStatus;
@@ -63,9 +63,9 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 
 	protected IPublisherAction[] createActions() {
 		createAdvice();
-		ArrayList actions = new ArrayList();
+		ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
 		// create an action that just publishes the raw bundles and features
-		IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_NON_ROOT);
+		IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_ROOT);
 		actions.add(action);
 		actions.add(createApplicationExecutableAction(info.getConfigurations()));
 		actions.add(createRootFilesAction());
@@ -74,7 +74,7 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		actions.add(createConfigCUsAction());
 		actions.add(createDefaultCUsAction());
 		actions.add(createRootIUAction());
-		return (IPublisherAction[]) actions.toArray(new IPublisherAction[actions.size()]);
+		return actions.toArray(new IPublisherAction[actions.size()]);
 	}
 
 	private void createAdvice() {
@@ -96,7 +96,7 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		return new RootIUAction(id, version, name);
 	}
 
-	protected Collection getTopLevel() {
+	protected Collection<IVersionedId> getTopLevel() {
 		return Arrays.asList(topLevel);
 	}
 
@@ -108,13 +108,14 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		return new ApplicationLauncherAction(id, version, flavor, executableName, getExecutablesLocation(), configSpecs);
 	}
 
-	protected Collection createAccumulateConfigDataActions(String[] configs) {
-		Collection result = new ArrayList(configs.length);
+	protected Collection<IPublisherAction> createAccumulateConfigDataActions(String[] configs) {
+		File configuration = new File(source, "configuration/config.ini"); //$NON-NLS-1$
+		if (!configuration.exists())
+			configuration = null;
+
+		Collection<IPublisherAction> result = new ArrayList<IPublisherAction>(configs.length);
 		for (int i = 0; i < configs.length; i++) {
 			String configSpec = configs[i];
-			File configuration = computeConfigurationLocation(configSpec);
-			if (!configuration.exists())
-				configuration = null;
 			String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1];
 			File executable = ExecutablesDescriptor.findExecutable(os, computeExecutableLocation(configSpec), "eclipse"); //$NON-NLS-1$
 			if (!executable.exists())
@@ -122,6 +123,7 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 			IPublisherAction action = new AccumulateConfigDataAction(info, configSpec, configuration, executable);
 			result.add(action);
 		}
+
 		return result;
 	}
 
@@ -133,8 +135,8 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		return new FeaturesAction(new File[] {new File(source, "features")}); //$NON-NLS-1$
 	}
 
-	protected Collection createExecutablesActions(String[] configSpecs) {
-		Collection result = new ArrayList(configSpecs.length);
+	protected Collection<IPublisherAction> createExecutablesActions(String[] configSpecs) {
+		Collection<IPublisherAction> result = new ArrayList<IPublisherAction>(configSpecs.length);
 		for (int i = 0; i < configSpecs.length; i++) {
 			ExecutablesDescriptor executables = computeExecutables(configSpecs[i]);
 			IPublisherAction action = new EquinoxExecutableAction(executables, configSpecs[i], id, version, flavor);
@@ -175,7 +177,7 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 	protected File[] computeRootFileExclusions() {
 		if (nonRootFiles == null || nonRootFiles.length == 0)
 			return null;
-		ArrayList result = new ArrayList();
+		ArrayList<File> result = new ArrayList<File>();
 		for (int i = 0; i < nonRootFiles.length; i++) {
 			String filename = nonRootFiles[i];
 			File file = new File(filename);
@@ -184,7 +186,7 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 			else
 				result.add(new File(source, filename));
 		}
-		return (File[]) result.toArray(new File[result.size()]);
+		return result.toArray(new File[result.size()]);
 	}
 
 	protected ExecutablesDescriptor computeExecutables(String configSpec) {
@@ -209,34 +211,9 @@ public class EclipseInstallAction extends AbstractPublisherAction {
 		return new File(source);
 	}
 
-	protected File computeConfigurationLocation(String configSpec) {
-		return new File(source, "configuration/config.ini"); //$NON-NLS-1$
-	}
-
 	protected IPublisherAction createBundlesAction() {
 		// TODO need to add in the simple configorator and reconciler bundle descriptions.
 		// TODO bundles action needs to take bundleDescriptions directly rather than just files.
 		return new BundlesAction(new File[] {new File(source, "plugins")}); //$NON-NLS-1$
 	}
-
-	//TODO reconsitute these methods
-	//	private GeneratorBundleInfo createSimpleConfiguratorBundleInfo() {
-	//		GeneratorBundleInfo result = new GeneratorBundleInfo();
-	//		result.setSymbolicName(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR);
-	//		result.setVersion("0.0.0"); //$NON-NLS-1$
-	//		result.setStartLevel(1);
-	//		result.setMarkedAsStarted(true);
-	//		return result;
-	//	}
-	//
-	//	private GeneratorBundleInfo createDropinsReconcilerBundleInfo() {
-	//		GeneratorBundleInfo result = new GeneratorBundleInfo();
-	//		result.setSymbolicName(ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS);
-	//		result.setVersion("0.0.0"); //$NON-NLS-1$
-	//		result.setMarkedAsStarted(true);
-	//		result.setSpecialConfigCommands("mkdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
-	//		result.setSpecialUnconfigCommands("rmdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
-	//		return result;
-	//	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
index 1c19ed9..fe3e0b7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
@@ -16,13 +16,12 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.service.environment.Constants;
 
@@ -49,6 +48,7 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 	protected String flavor;
 
 	protected EquinoxExecutableAction() {
+		//hidden
 	}
 
 	public EquinoxExecutableAction(ExecutablesDescriptor executables, String configSpec, String idBase, Version version, String flavor) {
@@ -59,11 +59,12 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 		this.flavor = flavor;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult result, IProgressMonitor monitor) {
-		ExecutablesDescriptor brandedExecutables = brandExecutables(info, executables);
+	public IStatus perform(IPublisherInfo publisherinfo, IPublisherResult result, IProgressMonitor monitor) {
+		setPublisherInfo(publisherinfo);
+		ExecutablesDescriptor brandedExecutables = brandExecutables(executables);
 		try {
-			publishExecutableIU(info, brandedExecutables, result);
-			publishExecutableCU(info, brandedExecutables, result);
+			if (publishExecutableIU(brandedExecutables, result))
+				publishExecutableCU(brandedExecutables, result);
 			publishExecutableSetter(brandedExecutables, result);
 		} finally {
 			if (brandedExecutables.isTemporary())
@@ -84,11 +85,8 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 		iud.setVersion(version);
 		iud.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
 		iud.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)});
-
-		String filter = createFilterSpec(configSpec);
-		if (filter.length() > 0)
-			iud.setFilter(filter);
-		Map touchpointData = new HashMap();
+		iud.setFilter(createFilterSpec(configSpec));
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("configure", "setLauncherName(name:" + executableName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		touchpointData.put("unconfigure", "setLauncherName()"); //$NON-NLS-1$ //$NON-NLS-2$
 		iud.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
@@ -99,13 +97,19 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 	 * Publishes IUs and CUs for the files that make up the launcher for a given
 	 * ws/os/arch combination.
 	 */
-	protected void publishExecutableIU(IPublisherInfo info, ExecutablesDescriptor execDescriptor, IPublisherResult result) {
+	protected boolean publishExecutableIU(ExecutablesDescriptor execDescriptor, IPublisherResult result) {
+		String[] config = parseConfigSpec(configSpec);
+		if (execDescriptor.getFiles().length == 0 && (config.length == 0 || CONFIG_ANY.equalsIgnoreCase(config[0]))) {
+			return false; //no cu required
+		}
+		boolean publishCU = true;
+
 		// Create the IU for the executable
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		String id = getExecutableId();
 		iu.setId(id);
 		iu.setVersion(version);
-		String filter = createFilterSpec(configSpec);
+		IMatchExpression<IInstallableUnit> filter = createFilterSpec(configSpec);
 		iu.setFilter(filter);
 		iu.setSingleton(true);
 		iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
@@ -116,52 +120,57 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 		iu.setCapabilities(new IProvidedCapability[] {selfCapability, executableCapability});
 
 		//Create the artifact descriptor.  we have several files so no path on disk
-		IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version);
-		iu.setArtifacts(new IArtifactKey[] {key});
-		IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(key, null);
-		publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
-		if (execDescriptor.isTemporary())
-			FileUtils.deleteAll(execDescriptor.getLocation());
-
+		if (execDescriptor.getFiles().length == 0) {
+			publishCU = false;
+		} else {
+			IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version);
+			iu.setArtifacts(new IArtifactKey[] {key});
+			IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info.getArtifactRepository(), key, null);
+			publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
+			if (execDescriptor.isTemporary())
+				FileUtils.deleteAll(execDescriptor.getLocation());
+		}
 		// setup a requirement between the executable and the launcher fragment that has the shared library
-		String[] config = parseConfigSpec(configSpec);
-		String ws = config[0];
-		String os = config[1];
-		String arch = config[2];
-		String launcherFragment = EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
-		if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
-			launcherFragment += '.' + arch;
-		iu.setRequiredCapabilities(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
+		if (config.length > 0 && !CONFIG_ANY.equalsIgnoreCase(config[0])) {
+			String ws = config[0];
+			String os = config[1];
+			String arch = config[2];
+			String launcherFragment = EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
+			if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
+				launcherFragment += '.' + arch;
+			iu.setRequirements(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
+		}
 		result.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
+		return publishCU;
 	}
 
 	private String getExecutableId() {
-		return createCUIdString(idBase, TYPE, "", configSpec);
+		return createCUIdString(idBase, TYPE, "", configSpec); //$NON-NLS-1$
 	}
 
 	// Create the CU that installs (e.g., unzips) the executable
-	private void publishExecutableCU(IPublisherInfo info, ExecutablesDescriptor execDescriptor, IPublisherResult result) {
+	private void publishExecutableCU(ExecutablesDescriptor execDescriptor, IPublisherResult result) {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String id = createCUIdString(idBase, TYPE, flavor, configSpec);
 		cu.setId(id);
 		cu.setVersion(version);
 		cu.setFilter(createFilterSpec(configSpec));
 		String executableId = getExecutableId();
-		cu.setHost(new IRequiredCapability[] {MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, executableId, new VersionRange(version, true, version, true), null, false, false)});
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, executableId, new VersionRange(version, true, version, true), null, false, false)});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
 		//TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
 		cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)});
 		cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
 		String[] config = parseConfigSpec(configSpec);
 		String os = config[1];
-		Map touchpointData = computeInstallActions(execDescriptor, os);
+		Map<String, String> touchpointData = computeInstallActions(execDescriptor, os);
 		cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
 		IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
 		result.addIU(unit, IPublisherResult.ROOT);
 	}
 
-	private Map computeInstallActions(ExecutablesDescriptor execDescriptor, String os) {
-		Map touchpointData = new HashMap();
+	private Map<String, String> computeInstallActions(ExecutablesDescriptor execDescriptor, String os) {
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
 		if (Constants.OS_MACOSX.equals(os)) {
 			String execName = execDescriptor.getExecutableName();
@@ -181,15 +190,15 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 	/**
 	 * Brands a copy of the given executable descriptor with the information in the 
 	 * current product definition.  The files described in the descriptor are also copied
-	 * to a temporary location to avoid destructive modification
-	 * @param info the publisher info that sets the context for this operation
+	 * to a temporary location to avoid destructive modification.
+	 * 
 	 * @param descriptor the executable descriptor to brand.
 	 * @return the new descriptor
 	 */
-	protected ExecutablesDescriptor brandExecutables(IPublisherInfo info, ExecutablesDescriptor descriptor) {
+	protected ExecutablesDescriptor brandExecutables(ExecutablesDescriptor descriptor) {
 		ExecutablesDescriptor result = new ExecutablesDescriptor(descriptor);
 		result.makeTemporaryCopy();
-		IBrandingAdvice advice = getBrandingAdvice(info);
+		IBrandingAdvice advice = getBrandingAdvice();
 		if (advice == null)
 			partialBrandExecutables(result);
 		else
@@ -197,12 +206,12 @@ public class EquinoxExecutableAction extends AbstractPublisherAction {
 		return result;
 	}
 
-	private IBrandingAdvice getBrandingAdvice(IPublisherInfo info) {
+	private IBrandingAdvice getBrandingAdvice() {
 		// there is expected to only be one branding advice for a given configspec so
 		// just return the first one we find.
-		Collection advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
-		for (Iterator i = advice.iterator(); i.hasNext();)
-			return (IBrandingAdvice) i.next();
+		Collection<IBrandingAdvice> advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
+		for (Iterator<IBrandingAdvice> i = advice.iterator(); i.hasNext();)
+			return i.next();
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
index 1a090fe..abcafe7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
@@ -11,13 +11,15 @@
 package org.eclipse.equinox.p2.publisher.eclipse;
 
 import java.util.Collection;
-import java.util.Iterator;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.IVersionAdvice;
+import org.eclipse.osgi.service.environment.Constants;
 
 /**
  * Create CUs for all Equinox launcher related IUs for the given set of configurations
@@ -40,9 +42,10 @@ public class EquinoxLauncherCUAction extends AbstractPublisherAction {
 		this.configSpecs = configSpecs;
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
-		publishCU(ORG_ECLIPSE_EQUINOX_LAUNCHER, null, info, results);
-		publishLauncherFragmentCUs(info, results);
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		setPublisherInfo(publisherInfo);
+		publishCU(ORG_ECLIPSE_EQUINOX_LAUNCHER, null, results);
+		publishLauncherFragmentCUs(results);
 		return Status.OK_STATUS;
 	}
 
@@ -50,11 +53,20 @@ public class EquinoxLauncherCUAction extends AbstractPublisherAction {
 	 * For each of the configurations we are publishing, create a launcher fragment
 	 * CU if there is version advice for the fragment.
 	 */
-	private void publishLauncherFragmentCUs(IPublisherInfo info, IPublisherResult results) {
+	private void publishLauncherFragmentCUs(IPublisherResult results) {
+		String id = null;
 		for (int i = 0; i < configSpecs.length; i++) {
 			String configSpec = configSpecs[i];
-			String id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + configSpec;
-			publishCU(id, configSpec, info, results);
+			String[] specs = Utils.getTokens(configSpec, "."); //$NON-NLS-1$
+			if (specs.length > 0 && !AbstractPublisherAction.CONFIG_ANY.equalsIgnoreCase(specs[0])) {
+				if (specs.length > 2 && Constants.OS_MACOSX.equals(specs[1]) && !Constants.ARCH_X86_64.equals(specs[2])) {
+					//launcher fragment for mac only has arch for x86_64
+					id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + specs[0] + '.' + specs[1];
+				} else {
+					id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + configSpec;
+				}
+				publishCU(id, configSpec, results);
+			}
 		}
 	}
 
@@ -63,10 +75,9 @@ public class EquinoxLauncherCUAction extends AbstractPublisherAction {
 	 * launcher bundle iu then set it up as the startup JAR.  If it is a launcher fragment then 
 	 * configure it in as the launcher.library for this configuration.
 	 */
-	private void publishCU(String id, String configSpec, IPublisherInfo info, IPublisherResult results) {
-		Collection advice = info.getAdvice(configSpec, true, id, null, IVersionAdvice.class);
-		for (Iterator j = advice.iterator(); j.hasNext();) {
-			IVersionAdvice versionSpec = (IVersionAdvice) j.next();
+	private void publishCU(String id, String configSpec, IPublisherResult results) {
+		Collection<IVersionAdvice> advice = info.getAdvice(configSpec, true, id, null, IVersionAdvice.class);
+		for (IVersionAdvice versionSpec : advice) {
 			Version version = versionSpec.getVersion(IInstallableUnit.NAMESPACE_IU_ID, id);
 			if (version == null)
 				continue;
@@ -80,7 +91,7 @@ public class EquinoxLauncherCUAction extends AbstractPublisherAction {
 				bundle.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
 				bundle.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
 			}
-			String filter = configSpec == null ? null : createFilterSpec(configSpec);
+			IMatchExpression<IInstallableUnit> filter = configSpec == null ? null : createFilterSpec(configSpec);
 			IInstallableUnit cu = BundlesAction.createBundleConfigurationUnit(id, version, false, bundle, flavor, filter);
 			if (cu != null)
 				results.addIU(cu, IPublisherResult.ROOT);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
index 8445050..b57f0ea 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
@@ -10,8 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import java.util.ArrayList;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 
@@ -38,9 +37,9 @@ public class Feature {
 	private String installHandlerLibrary;
 
 	private URLEntry updateSite;
-	private ArrayList discoverySites;
+	private ArrayList<URLEntry> discoverySites;
 
-	private ArrayList entries;
+	private ArrayList<FeatureEntry> entries;
 	private String providerName;
 	private String os;
 	private String ws;
@@ -49,7 +48,7 @@ public class Feature {
 
 	private String location;
 
-	private Map localizations;
+	private Map<Locale, Map<String, String>> localizations;
 
 	public Feature(String id, String version) {
 		if (id == null)
@@ -63,7 +62,7 @@ public class Feature {
 			return;
 
 		if (this.discoverySites == null)
-			this.discoverySites = new ArrayList();
+			this.discoverySites = new ArrayList<URLEntry>();
 
 		URLEntry entry = new URLEntry(url, siteLabel);
 		this.discoverySites.add(entry);
@@ -71,7 +70,7 @@ public class Feature {
 
 	public void addEntry(FeatureEntry plugin) {
 		if (entries == null)
-			entries = new ArrayList();
+			entries = new ArrayList<FeatureEntry>();
 		entries.add(plugin);
 	}
 
@@ -114,13 +113,13 @@ public class Feature {
 	public URLEntry[] getDiscoverySites() {
 		if (discoverySites == null)
 			return new URLEntry[0];
-		return (URLEntry[]) discoverySites.toArray(new URLEntry[discoverySites.size()]);
+		return discoverySites.toArray(new URLEntry[discoverySites.size()]);
 	}
 
 	public FeatureEntry[] getEntries() {
 		if (entries == null)
 			return new FeatureEntry[0];
-		return (FeatureEntry[]) entries.toArray(new FeatureEntry[entries.size()]);
+		return entries.toArray(new FeatureEntry[entries.size()]);
 	}
 
 	public String getId() {
@@ -159,7 +158,7 @@ public class Feature {
 		return null;
 	}
 
-	public Map getLocalizations() {
+	public Map<Locale, Map<String, String>> getLocalizations() {
 		return this.localizations;
 	}
 
@@ -278,7 +277,7 @@ public class Feature {
 		this.license.setURL(licenseURL);
 	}
 
-	public void setLocalizations(Map localizations) {
+	public void setLocalizations(Map<Locale, Map<String, String>> localizations) {
 		this.localizations = localizations;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
index 2f6da54..53c8656 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 
 /**
  */
@@ -29,10 +29,6 @@ public class FeatureEntry {
 	private boolean unpack = true;
 	private boolean optional = false;
 	private boolean isPatch = false;
-
-	/**
-	 * Temporary field to add provisioning filters to features
-	 */
 	private String filter;
 
 	public static FeatureEntry createRequires(String id, String version, String match, String filter, boolean isPlugin) {
@@ -70,6 +66,11 @@ public class FeatureEntry {
 				return false;
 		} else if (!version.equals(other.version))
 			return false;
+
+		if (isPlugin() != other.isPlugin())
+			return false;
+		if (isRequires() != other.isRequires())
+			return false;
 		return true;
 	}
 
@@ -77,9 +78,6 @@ public class FeatureEntry {
 		return arch;
 	}
 
-	/**
-	 * Temporary method to add provisioning filters to features
-	 */
 	public String getFilter() {
 		return filter;
 	}
@@ -147,9 +145,6 @@ public class FeatureEntry {
 		this.nl = nl;
 	}
 
-	/**
-	 * Temporary method to add provisioning filters to features
-	 */
 	public void setFilter(String filter) {
 		this.filter = filter;
 
@@ -177,7 +172,7 @@ public class FeatureEntry {
 
 	public String toString() {
 		StringBuffer result = new StringBuffer();
-
+		result.append(isRequires ? "Requires: " : ""); //$NON-NLS-1$ //$NON-NLS-2$
 		result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
 		result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
 		result.append(version != null ? " " + version.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
index 0eb2ec1..72f059c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008-2009 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 Code 9 and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,28 +10,30 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import java.io.*;
+import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
+import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.*;
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
 import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
 import org.eclipse.equinox.internal.p2.publisher.*;
+import org.eclipse.equinox.internal.p2.publisher.Messages;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.util.NLS;
 
@@ -69,7 +71,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		if (feature.getApplication() != null)
@@ -98,7 +100,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 			iu.setProperty(PublisherHelper.ECLIPSE_INSTALL_HANDLER_PROP, installHandlerProperty);
 		}
 
-		ArrayList providedCapabilities = new ArrayList();
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
 		providedCapabilities.add(PublisherHelper.createSelfCapability(id, version));
 		providedCapabilities.add(PublisherHelper.FEATURE_CAPABILITY);
 		providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version));
@@ -106,19 +108,17 @@ public class FeaturesAction extends AbstractPublisherAction {
 		iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version), PublisherHelper.FEATURE_CAPABILITY, MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version)});
 		iu.setArtifacts(new IArtifactKey[] {createFeatureArtifactKey(feature.getId(), version.toString())});
 
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 		iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
 
-		Map localizations = feature.getLocalizations();
+		Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
 		if (localizations != null) {
-			for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
-				Locale locale = (Locale) iter.next();
-				Properties translatedStrings = (Properties) localizations.get(locale);
-				Enumeration propertyKeys = translatedStrings.propertyNames();
-				while (propertyKeys.hasMoreElements()) {
-					String nextKey = (String) propertyKeys.nextElement();
-					iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+			for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
+				Locale locale = locEntry.getKey();
+				Map<String, String> translatedStrings = locEntry.getValue();
+				for (Entry<String, String> entry : translatedStrings.entrySet()) {
+					iu.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
 				}
 				providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
 			}
@@ -154,35 +154,6 @@ public class FeaturesAction extends AbstractPublisherAction {
 		this.locations = locations;
 	}
 
-	// attach the described files from the given location to the given iu description.  Return
-	// the list of files identified.
-	private File[] attachFiles(InstallableUnitDescription iu, FileSetDescriptor descriptor, File location) {
-		String fileList = descriptor.getFiles();
-		String[] fileSpecs = getArrayFromString(fileList, ","); //$NON-NLS-1$
-		File[] files = new File[fileSpecs.length];
-		if (fileSpecs.length > 0) {
-			for (int i = 0; i < fileSpecs.length; i++) {
-				String spec = fileSpecs[i];
-				if (spec.startsWith("file:")) //$NON-NLS-1$
-					spec = spec.substring(5);
-				files[i] = new File(location, spec);
-			}
-		}
-		// add touchpoint actions to unzip and cleanup as needed
-		// TODO need to support fancy root file location specs
-		Map touchpointData = new HashMap(2);
-		String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
-		touchpointData.put("install", configurationData); //$NON-NLS-1$
-		String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
-		touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
-		iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
-		// prime the IU with an artifact key that will correspond to the zipped up root files.
-		IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion());
-		iu.setArtifacts(new IArtifactKey[] {key});
-		return files;
-	}
-
 	/**
 	 * Looks for advice in a p2.inf file inside the feature location.
 	 */
@@ -213,7 +184,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 		}
 	}
 
-	protected Object[] createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) {
+	protected IInstallableUnit createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) {
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		iu.setSingleton(true);
 		String id = featureId + '_' + descriptor.getKey();
@@ -225,22 +196,32 @@ public class FeaturesAction extends AbstractPublisherAction {
 		String configSpec = descriptor.getConfigSpec();
 		if (configSpec != null && configSpec.length() > 0)
 			iu.setFilter(createFilterSpec(configSpec));
-		File[] fileResult = attachFiles(iu, descriptor, location);
+
+		Map<String, String> touchpointData = new HashMap<String, String>(2);
+		String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
+		touchpointData.put("install", configurationData); //$NON-NLS-1$
+		String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
+		touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
+		iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
+
+		// prime the IU with an artifact key that will correspond to the zipped up root files.
+		IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion());
+		iu.setArtifacts(new IArtifactKey[] {key});
 		setupLinks(iu, descriptor);
 		setupPermissions(iu, descriptor);
 
 		IInstallableUnit iuResult = MetadataFactory.createInstallableUnit(iu);
 		// need to return both the iu and any files.
-		return new Object[] {iuResult, fileResult};
+		return iuResult;
 	}
 
-	protected IInstallableUnit createGroupIU(Feature feature, List childIUs, IPublisherInfo publisherInfo) {
+	protected IInstallableUnit createGroupIU(Feature feature, List<IInstallableUnit> childIUs, IPublisherInfo publisherInfo) {
 		if (isPatch(feature))
 			return createPatchIU(feature, childIUs, publisherInfo);
 		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
 		String id = getGroupId(feature.getId());
 		iu.setId(id);
-		Version version = Version.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
+		Version version = PublisherHelper.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
 		iu.setVersion(version);
 
 		iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
@@ -251,59 +232,56 @@ public class FeaturesAction extends AbstractPublisherAction {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, BundlesAction.computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
 
 		FeatureEntry entries[] = feature.getEntries();
-		List required = new ArrayList(entries.length + (childIUs == null ? 0 : childIUs.size()));
+		List<IRequirement> required = new ArrayList<IRequirement>(entries.length + (childIUs == null ? 0 : childIUs.size()));
 		for (int i = 0; i < entries.length; i++) {
 			VersionRange range = getVersionRange(entries[i]);
 			String requiredId = getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true);
-			required.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false));
+			required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false));
 		}
 
 		// link in all the children (if any) as requirements.
 		// TODO consider if these should be linked as exact version numbers.  Should be ok but may be brittle.
 		if (childIUs != null) {
 			for (int i = 0; i < childIUs.size(); i++) {
-				IInstallableUnit child = (IInstallableUnit) childIUs.get(i);
-				required.add(MetadataFactory.createRequiredCapability(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
+				IInstallableUnit child = childIUs.get(i);
+				IMatchExpression<IInstallableUnit> filter = child.getFilter();
+				required.add(MetadataFactory.createRequirement(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), filter, false, false));
 			}
 		}
-		iu.setRequiredCapabilities((IRequiredCapability[]) required.toArray(new IRequiredCapability[required.size()]));
+		iu.setRequirements(required.toArray(new IRequirement[required.size()]));
 		iu.setTouchpointType(ITouchpointType.NONE);
-		iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
 		processTouchpointAdvice(iu, null, publisherInfo);
 		processInstallableUnitPropertiesAdvice(iu, publisherInfo);
 
 		//Create a fake entry to reuse the logic to create the filters
 		FeatureEntry entry = new FeatureEntry("fake", "0.0.0", false); //$NON-NLS-1$ //$NON-NLS-2$
 		entry.setEnvironment(feature.getOS(), feature.getWS(), feature.getArch(), feature.getNL());
-		String filter = getFilter(entry);
-		if (filter != null)
-			iu.setFilter(filter);
+		iu.setFilter(getFilter(entry));
 
 		// Create set of provided capabilities
-		ArrayList providedCapabilities = new ArrayList();
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
 		providedCapabilities.add(createSelfCapability(id, version));
 
-		Map localizations = feature.getLocalizations();
+		Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
 		if (localizations != null) {
-			for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
-				Locale locale = (Locale) iter.next();
-				Properties translatedStrings = (Properties) localizations.get(locale);
-				Enumeration propertyKeys = translatedStrings.propertyNames();
-				while (propertyKeys.hasMoreElements()) {
-					String nextKey = (String) propertyKeys.nextElement();
-					iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+			for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
+				Locale locale = locEntry.getKey();
+				Map<String, String> translatedStrings = locEntry.getValue();
+				for (Entry<String, String> e : translatedStrings.entrySet()) {
+					iu.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
 				}
 				providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
 			}
 		}
 
-		iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 		processCapabilityAdvice(iu, publisherInfo);
 		return MetadataFactory.createInstallableUnit(iu);
 	}
@@ -312,7 +290,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 		return getTransformedId(featureId, /*isPlugin*/false, /*isGroup*/true);
 	}
 
-	private IInstallableUnit createPatchIU(Feature feature, List childIUs, IPublisherInfo publisherInfo) {
+	private IInstallableUnit createPatchIU(Feature feature, List<IInstallableUnit> childIUs, IPublisherInfo publisherInfo) {
 		InstallableUnitPatchDescription iu = new MetadataFactory.InstallableUnitPatchDescription();
 		String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
 		iu.setId(id);
@@ -326,24 +304,27 @@ public class FeaturesAction extends AbstractPublisherAction {
 		if (feature.getProviderName() != null)
 			iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
 		if (feature.getLicense() != null)
-			iu.setLicense(MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense()));
+			iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
 		if (feature.getCopyright() != null)
 			iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
 		iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, BundlesAction.computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
 
 		FeatureEntry entries[] = feature.getEntries();
-		ArrayList applicabilityScope = new ArrayList();
-		ArrayList patchRequirements = new ArrayList();
-		ArrayList requirementChanges = new ArrayList();
+		ArrayList<IRequirement> applicabilityScope = new ArrayList<IRequirement>();
+		ArrayList<IRequirement> patchRequirements = new ArrayList<IRequirement>();
+		ArrayList<IRequirementChange> requirementChanges = new ArrayList<IRequirementChange>();
 		for (int i = 0; i < entries.length; i++) {
 			VersionRange range = getVersionRange(entries[i]);
-			IRequiredCapability req = MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
+			IRequirement req = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
 			if (entries[i].isRequires()) {
 				applicabilityScope.add(req);
+				if (applicabilityScope.size() == 1) {
+					iu.setLifeCycle(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, null, false, false, false));
+				}
 				continue;
 			}
 			if (entries[i].isPlugin()) {
-				IRequiredCapability from = MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
+				IRequirement from = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
 				requirementChanges.add(MetadataFactory.createRequirementChange(from, req));
 				continue;
 			}
@@ -353,61 +334,51 @@ public class FeaturesAction extends AbstractPublisherAction {
 		//Always add a requirement on the IU containing the feature jar
 		if (childIUs != null) {
 			for (int i = 0; i < childIUs.size(); i++) {
-				IInstallableUnit child = (IInstallableUnit) childIUs.get(i);
-				patchRequirements.add(MetadataFactory.createRequiredCapability(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
+				IInstallableUnit child = childIUs.get(i);
+				patchRequirements.add(MetadataFactory.createRequirement(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
 			}
 		}
-		iu.setRequiredCapabilities((IRequiredCapability[]) patchRequirements.toArray(new IRequiredCapability[patchRequirements.size()]));
-		iu.setApplicabilityScope(new IRequiredCapability[][] {(IRequiredCapability[]) applicabilityScope.toArray(new IRequiredCapability[applicabilityScope.size()])});
-		iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
-		//Generate lifecycle
-		IRequiredCapability lifeCycle = null;
-		if (applicabilityScope.size() > 0) {
-			IRequiredCapability req = (IRequiredCapability) applicabilityScope.get(0);
-			lifeCycle = MetadataFactory.createRequiredCapability(req.getNamespace(), req.getName(), req.getRange(), null, false, false, false);
-			iu.setLifeCycle(lifeCycle);
-		}
+		iu.setRequirements(patchRequirements.toArray(new IRequirement[patchRequirements.size()]));
+		iu.setApplicabilityScope(new IRequirement[][] {applicabilityScope.toArray(new IRequirement[applicabilityScope.size()])});
+		iu.setRequirementChanges(requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
 
 		iu.setTouchpointType(ITouchpointType.NONE);
 		processTouchpointAdvice(iu, null, publisherInfo);
 		processInstallableUnitPropertiesAdvice(iu, publisherInfo);
-		iu.setProperty(IInstallableUnit.PROP_TYPE_GROUP, Boolean.TRUE.toString());
-		iu.setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
+		iu.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
 		// TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
 		// 		 of the feature?
 		// iu.setFilter(filter);
 
 		// Create set of provided capabilities
-		ArrayList providedCapabilities = new ArrayList();
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
 		providedCapabilities.add(createSelfCapability(id, version));
 
-		Map localizations = feature.getLocalizations();
+		Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
 		if (localizations != null) {
-			for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
-				Locale locale = (Locale) iter.next();
-				Properties translatedStrings = (Properties) localizations.get(locale);
-				Enumeration propertyKeys = translatedStrings.propertyNames();
-				while (propertyKeys.hasMoreElements()) {
-					String nextKey = (String) propertyKeys.nextElement();
-					iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+			for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
+				Locale locale = locEntry.getKey();
+				Map<String, String> translatedStrings = locEntry.getValue();
+				for (Entry<String, String> e : translatedStrings.entrySet()) {
+					iu.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
 				}
 				providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
 			}
 		}
 
-		iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 		processCapabilityAdvice(iu, publisherInfo);
 		return MetadataFactory.createInstallableUnitPatch(iu);
 	}
 
 	private File[] expandLocations(File[] list) {
-		ArrayList result = new ArrayList();
+		ArrayList<File> result = new ArrayList<File>();
 		expandLocations(list, result);
-		return (File[]) result.toArray(new File[result.size()]);
+		return result.toArray(new File[result.size()]);
 	}
 
-	private void expandLocations(File[] list, ArrayList result) {
+	private void expandLocations(File[] list, ArrayList<File> result) {
 		if (list == null)
 			return;
 		for (int i = 0; i < list.length; i++) {
@@ -432,7 +403,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 			createBundleShapeAdvice(feature, info);
 			createAdviceFileAdvice(feature, info);
 
-			ArrayList childIUs = new ArrayList();
+			ArrayList<IInstallableUnit> childIUs = new ArrayList<IInstallableUnit>();
 
 			IInstallableUnit featureJarIU = queryForIU(result, getTransformedId(feature.getId(), false, false), Version.parseVersion(feature.getVersion()));
 			if (featureJarIU == null)
@@ -464,48 +435,35 @@ public class FeaturesAction extends AbstractPublisherAction {
 		return createFeatureJarIU(feature, publisherInfo);
 	}
 
-	private IInstallableUnit generateRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor rootFile, IPublisherResult result, IPublisherInfo publisherInfo) {
-		File tempLocation = null;
-		try {
-			if (location.isFile()) {
-				// We cannot copy from a jar file. It must be expanded into a temporary folder
-				try {
-					tempLocation = File.createTempFile("p2.generator", ""); //$NON-NLS-1$ //$NON-NLS-2$
-					tempLocation.delete();
-					tempLocation.mkdirs();
-					FileUtils.unzipFile(location, tempLocation);
-				} catch (IOException e) {
-					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage()));
-					return null;
-				}
-				location = tempLocation;
-			}
-			Object[] iuAndFiles = createFeatureRootFileIU(featureId, featureVersion, location, rootFile);
-			IInstallableUnit iuResult = (IInstallableUnit) iuAndFiles[0];
-			File[] fileResult = (File[]) iuAndFiles[1];
-			if (fileResult != null && fileResult.length > 0) {
-				IArtifactKey artifact = iuResult.getArtifacts()[0];
-				ArtifactDescriptor descriptor = new ArtifactDescriptor(artifact);
-				publishArtifact(descriptor, fileResult, null, publisherInfo, FileUtils.createDynamicPathComputer(1));
-			}
-			result.addIU(iuResult, IPublisherResult.NON_ROOT);
-			return iuResult;
-		} finally {
-			if (tempLocation != null)
-				FileUtils.deleteAll(tempLocation);
-		}
-	}
+	protected ArrayList<IInstallableUnit> generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
+		ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
 
-	protected ArrayList generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
-		File location = new File(feature.getLocation());
-		Properties props = loadProperties(location, "build.properties"); //$NON-NLS-1$
-		ArrayList ius = new ArrayList();
-		FileSetDescriptor[] rootFileDescriptors = getRootFileDescriptors(props);
-		for (int i = 0; i < rootFileDescriptors.length; i++) {
-			IInstallableUnit iu = generateRootFileIU(feature.getId(), feature.getVersion(), location, rootFileDescriptors[i], result, publisherInfo);
-			if (iu != null)
+		Collection<IFeatureRootAdvice> collection = publisherInfo.getAdvice(null, false, feature.getId(), Version.parseVersion(feature.getVersion()), IFeatureRootAdvice.class);
+		if (collection.size() == 0)
+			return ius;
+
+		IFeatureRootAdvice advice = collection.iterator().next();
+		String[] configs = advice.getConfigurations();
+		for (int i = 0; i < configs.length; i++) {
+			String config = configs[i];
+
+			FileSetDescriptor descriptor = advice.getDescriptor(config);
+			if (descriptor != null && descriptor.size() > 0) {
+				IInstallableUnit iu = createFeatureRootFileIU(feature.getId(), feature.getVersion(), null, descriptor);
+
+				File[] files = descriptor.getFiles();
+				IArtifactKey artifactKey = iu.getArtifacts().iterator().next();
+				ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(artifactKey);
+				IPathComputer computer = advice.getRootFileComputer(config);
+				if (computer == null)
+					computer = FileUtils.createDynamicPathComputer(1);
+				publishArtifact(artifactDescriptor, files, null, publisherInfo, computer);
+
+				result.addIU(iu, IPublisherResult.NON_ROOT);
 				ius.add(iu);
+			}
 		}
+
 		return ius;
 	}
 
@@ -514,9 +472,9 @@ public class FeaturesAction extends AbstractPublisherAction {
 	 * @param location The update site location
 	 * @param nickname The update site label
 	 * @param featureId the identifier of the feature where the error occurred, or null
-	 * @param metadataRepo The repo into which the references are added
+	 * @param collector The list into which the references are added
 	 */
-	private void generateSiteReference(String location, String nickname, String featureId, IMetadataRepository metadataRepo) {
+	private void generateSiteReference(String location, String nickname, String featureId, List<IRepositoryReference> collector) {
 		if (location == null) {
 			String message = featureId == null ? NLS.bind(Messages.exception_invalidSiteReference, location) : NLS.bind(Messages.exception_invalidSiteReferenceInFeature, location, featureId);
 			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
@@ -525,8 +483,8 @@ public class FeaturesAction extends AbstractPublisherAction {
 
 		try {
 			URI associateLocation = new URI(location);
-			metadataRepo.addReference(associateLocation, nickname, IRepository.TYPE_METADATA, IRepository.NONE);
-			metadataRepo.addReference(associateLocation, nickname, IRepository.TYPE_ARTIFACT, IRepository.NONE);
+			collector.add(new RepositoryReference(associateLocation, nickname, IRepository.TYPE_METADATA, IRepository.NONE));
+			collector.add(new RepositoryReference(associateLocation, nickname, IRepository.TYPE_ARTIFACT, IRepository.NONE));
 		} catch (URISyntaxException e) {
 			String message = featureId == null ? NLS.bind(Messages.exception_invalidSiteReference, location) : NLS.bind(Messages.exception_invalidSiteReferenceInFeature, location, featureId);
 			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
@@ -538,15 +496,18 @@ public class FeaturesAction extends AbstractPublisherAction {
 		URLEntry updateURL = feature.getUpdateSite();
 		//don't enable feature update sites by default since this results in too many
 		//extra sites being loaded and searched (Bug 234177)
+		List<IRepositoryReference> collector = new ArrayList<IRepositoryReference>();
 		if (updateURL != null)
-			generateSiteReference(updateURL.getURL(), updateURL.getAnnotation(), feature.getId(), publisherInfo.getMetadataRepository());
+			generateSiteReference(updateURL.getURL(), updateURL.getAnnotation(), feature.getId(), collector);
 		URLEntry[] discoverySites = feature.getDiscoverySites();
 		for (int i = 0; i < discoverySites.length; i++)
-			generateSiteReference(discoverySites[i].getURL(), discoverySites[i].getAnnotation(), feature.getId(), publisherInfo.getMetadataRepository());
+			generateSiteReference(discoverySites[i].getURL(), discoverySites[i].getAnnotation(), feature.getId(), collector);
+		if (!collector.isEmpty())
+			publisherInfo.getMetadataRepository().addReferences(collector);
 	}
 
 	protected Feature[] getFeatures(File[] featureLocations) {
-		ArrayList result = new ArrayList(featureLocations.length);
+		ArrayList<Feature> result = new ArrayList<Feature>(featureLocations.length);
 		for (int i = 0; i < featureLocations.length; i++) {
 			Feature feature = new FeatureParser().parse(featureLocations[i]);
 			if (feature != null) {
@@ -554,10 +515,10 @@ public class FeaturesAction extends AbstractPublisherAction {
 				result.add(feature);
 			}
 		}
-		return (Feature[]) result.toArray(new Feature[result.size()]);
+		return result.toArray(new Feature[result.size()]);
 	}
 
-	private String getFilter(FeatureEntry entry) {
+	private IMatchExpression<IInstallableUnit> getFilter(FeatureEntry entry) {
 		StringBuffer result = new StringBuffer();
 		result.append("(&"); //$NON-NLS-1$
 		if (entry.getFilter() != null)
@@ -569,11 +530,11 @@ public class FeaturesAction extends AbstractPublisherAction {
 		if (result.length() == 2)
 			return null;
 		result.append(')');
-		return result.toString();
+		return InstallableUnit.parseFilter(result.toString());
 	}
 
 	private void expandFilter(String filter, String osgiFilterValue, StringBuffer result) {
-		if (filter != null) {
+		if (filter != null && filter.length() != 0) {
 			StringTokenizer token = new StringTokenizer(filter, ","); //$NON-NLS-1$
 			if (token.countTokens() == 1)
 				result.append('(' + osgiFilterValue + '=' + filter + ')');
@@ -587,50 +548,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 		}
 	}
 
-	protected FileSetDescriptor[] getRootFileDescriptors(Properties props) {
-		HashMap result = new HashMap();
-		for (Iterator i = props.keySet().iterator(); i.hasNext();) {
-			String property = (String) i.next();
-			// we only care about root properties
-			if (!(property.startsWith("root") && (property.length() == 4 || property.charAt(4) == '.'))) //$NON-NLS-1$
-				continue;
-			String[] spec = getArrayFromString(property, "."); //$NON-NLS-1$
-			String descriptorKey = spec[0];
-			String configSpec = null;
-			// if the spec is 4 or more then there must be a config involved to get it
-			if (spec.length > 3) {
-				configSpec = createConfigSpec(spec[2], spec[1], spec[3]);
-				descriptorKey += "." + createIdString(configSpec); //$NON-NLS-1$
-			}
-
-			FileSetDescriptor descriptor = (FileSetDescriptor) result.get(descriptorKey);
-			if (descriptor == null) {
-				descriptor = new FileSetDescriptor(descriptorKey, configSpec);
-				result.put(descriptorKey, descriptor);
-			}
-
-			// if the property was simply 'root'
-			if (spec.length == 1)
-				// it must be a straight file copy (without a config)
-				descriptor.setFiles(props.getProperty(property));
-			// if the last segment in the spec is "link"
-			else if (spec[spec.length - 1] == "link") //$NON-NLS-1$
-				descriptor.setLinks(props.getProperty(property));
-			else {
-				// if the second last segment is "permissions"
-				if (spec[spec.length - 2].equals("permissions")) //$NON-NLS-1$
-					descriptor.addPermissions(new String[] {spec[spec.length - 1], props.getProperty(property)});
-				else {
-					// so it is not a link or a permissions, it must be a straight file copy (with or without a config)
-					descriptor.setFiles(props.getProperty(property));
-				}
-			}
-		}
-		Collection values = result.values();
-		return (FileSetDescriptor[]) values.toArray(new FileSetDescriptor[values.size()]);
-	}
-
-	private VersionRange getVersionRange(FeatureEntry entry) {
+	protected VersionRange getVersionRange(FeatureEntry entry) {
 		String versionSpec = entry.getVersion();
 		if (versionSpec == null)
 			return VersionRange.emptyRange;
@@ -645,12 +563,14 @@ public class FeaturesAction extends AbstractPublisherAction {
 			return null;
 		if (match.equals("perfect")) //$NON-NLS-1$
 			return new VersionRange(version, true, version, true);
+
+		org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(version);
 		if (match.equals("equivalent")) { //$NON-NLS-1$
-			Version upper = Version.createOSGi(version.getMajor(), version.getMinor() + 1, 0);
+			Version upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor() + 1, 0);
 			return new VersionRange(version, true, upper, false);
 		}
 		if (match.equals("compatible")) { //$NON-NLS-1$
-			Version upper = Version.createOSGi(version.getMajor() + 1, 0, 0);
+			Version upper = Version.createOSGi(osgiVersion.getMajor() + 1, 0, 0);
 			return new VersionRange(version, true, upper, false);
 		}
 		if (match.equals("greaterOrEqual")) //$NON-NLS-1$
@@ -667,49 +587,6 @@ public class FeaturesAction extends AbstractPublisherAction {
 		return false;
 	}
 
-	private static Properties loadProperties(File location, String file) {
-		Properties props = new Properties();
-		try {
-			if (!location.isDirectory()) {
-				JarFile jar = null;
-				try {
-					jar = new JarFile(location);
-					JarEntry entry = jar.getJarEntry(file);
-					if (entry != null)
-						parseProperties(jar.getInputStream(entry), props, location.toString() + '#' + file);
-				} finally {
-					if (jar != null)
-						jar.close();
-				}
-			} else {
-				try {
-					InputStream in = null;
-					try {
-						File propsFile = new File(location, file);
-						in = new FileInputStream(propsFile);
-						parseProperties(in, props, propsFile.toString());
-					} finally {
-						if (in != null)
-							in.close();
-					}
-				} catch (FileNotFoundException e) {
-					// ignore if it is just a file not found.
-				}
-			}
-		} catch (IOException e) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, Messages.exception_errorPublishingArtifacts, e));
-		}
-		return props;
-	}
-
-	private static void parseProperties(InputStream in, Properties props, String file) {
-		try {
-			props.load(new BufferedInputStream(in));
-		} catch (IOException e) {
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.exception_errorLoadingProperties, file), e));
-		}
-	}
-
 	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		if (features == null && locations == null)
 			throw new IllegalStateException(Messages.exception_noFeaturesOrLocations);
@@ -725,10 +602,10 @@ public class FeaturesAction extends AbstractPublisherAction {
 		// TODO this is a little strange.  If there are several artifacts, how do we know which files go with
 		// which artifacts when we publish them?  For now it would be surprising to have more than one
 		// artifact per feature IU.
-		IArtifactKey[] artifacts = featureIU.getArtifacts();
-		for (int j = 0; j < artifacts.length; j++) {
+		Collection<IArtifactKey> artifacts = featureIU.getArtifacts();
+		for (IArtifactKey artifactKey : artifacts) {
 			File file = new File(feature.getLocation());
-			ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(artifacts[j], file);
+			ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(info, artifactKey, file);
 			processArtifactPropertiesAdvice(featureIU, ad, publisherInfo);
 			ad.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
 			// if the artifact is a dir then zip it up.
@@ -757,7 +634,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 		}
 
 		if (linkActions.length() > 0) {
-			Map touchpointData = new HashMap();
+			Map<String, String> touchpointData = new HashMap<String, String>();
 			//we do ln during configure to avoid complicating branding which uses the install phase
 			touchpointData.put("configure", linkActions.toString()); //$NON-NLS-1$
 			iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
@@ -765,7 +642,7 @@ public class FeaturesAction extends AbstractPublisherAction {
 	}
 
 	private void setupPermissions(InstallableUnitDescription iu, FileSetDescriptor descriptor) {
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		String[][] permsList = descriptor.getPermissions();
 		for (int i = 0; i < permsList.length; i++) {
 			String[] permSpec = permsList[i];
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
index a58f5f0..516cb99 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
@@ -12,7 +12,10 @@ package org.eclipse.equinox.p2.publisher.eclipse;
 import java.io.File;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.RootIUAction;
+import org.eclipse.equinox.p2.publisher.actions.RootIUResultFilterAdvice;
 
 /**
  * <p>
@@ -29,6 +32,9 @@ public class FeaturesAndBundlesPublisherApplication extends AbstractPublisherApp
 	protected File[] features = null;
 	protected File[] bundles = null;
 
+	protected String rootIU = null;
+	protected String rootVersion = null;
+
 	public FeaturesAndBundlesPublisherApplication() {
 		// nothing to do
 	}
@@ -41,6 +47,12 @@ public class FeaturesAndBundlesPublisherApplication extends AbstractPublisherApp
 
 		if (arg.equalsIgnoreCase("-bundles")) //$NON-NLS-1$
 			bundles = createFiles(parameter);
+
+		if (arg.equalsIgnoreCase("-iu")) //$NON-NLS-1$
+			rootIU = parameter;
+
+		if (arg.equalsIgnoreCase("-version")) //$NON-NLS-1$
+			rootVersion = parameter;
 	}
 
 	private File[] createFiles(String parameter) {
@@ -52,13 +64,19 @@ public class FeaturesAndBundlesPublisherApplication extends AbstractPublisherApp
 	}
 
 	protected IPublisherAction[] createActions() {
-		ArrayList result = new ArrayList();
+		ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
 		if (features == null)
 			features = new File[] {new File(source, "features")}; //$NON-NLS-1$
 		result.add(new FeaturesAction(features));
 		if (bundles == null)
 			bundles = new File[] {new File(source, "plugins")}; //$NON-NLS-1$
 		result.add(new BundlesAction(bundles));
-		return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
+
+		if (rootIU != null) {
+			result.add(new RootIUAction(rootIU, Version.parseVersion(rootVersion), rootIU));
+			info.addAdvice(new RootIUResultFilterAdvice(null));
+		}
+
+		return result.toArray(new IPublisherAction[result.size()]);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
index 3e92dc8..6f49520 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
@@ -9,10 +9,12 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
+import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
+
 /**
  * Advice for branding executables and other element while publishing.
  */
-public interface IBrandingAdvice {
+public interface IBrandingAdvice extends IPublisherAdvice {
 
 	/**
 	 * Returns the OS that this branding advice is relevant for.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
index 5e673ea..6c8eefd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
@@ -9,13 +9,13 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import java.util.Map;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
 
 public interface IConfigAdvice extends IPublisherAdvice {
 
 	public BundleInfo[] getBundles();
 
-	public Properties getProperties();
+	public Map<String, String> getProperties();
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
index 71a0813..ae180c2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
@@ -10,42 +10,49 @@
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.*;
 
 public class InstallPublisherApplication extends AbstractPublisherApplication {
 
 	protected String id;
-	protected Version version = new Version("1.0.0"); //$NON-NLS-1$
+	protected Version version = Version.parseVersion("1.0.0"); //$NON-NLS-1$
 	protected String name;
 	protected String executableName;
 	protected String flavor;
-	protected VersionedName[] topLevel;
+	protected IVersionedId[] topLevel;
 	protected boolean start;
 	protected String[] rootExclusions;
 
 	public InstallPublisherApplication() {
+		//hidden
 	}
 
-	protected void processFlag(String arg, PublisherInfo info) {
-		super.processFlag(arg, info);
+	protected void processFlag(String arg, PublisherInfo publisherInfo) {
+		super.processFlag(arg, publisherInfo);
 
 		if (arg.equalsIgnoreCase("-startAll")) //$NON-NLS-1$
 			start = true;
 	}
 
-	protected void processParameter(String arg, String parameter, PublisherInfo info) throws URISyntaxException {
-		super.processParameter(arg, parameter, info);
+	protected void initialize(PublisherInfo publisherInfo) throws ProvisionException {
+		super.initialize(publisherInfo);
+
+		if (publisherInfo.getConfigurations().length == 0)
+			publisherInfo.setConfigurations(new String[] {""}); //$NON-NLS-1$
+	}
+
+	protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
+		super.processParameter(arg, parameter, publisherInfo);
 
 		if (arg.equalsIgnoreCase("-id")) //$NON-NLS-1$
 			id = parameter;
 
 		if (arg.equalsIgnoreCase("-version")) //$NON-NLS-1$
-			version = new Version(parameter);
+			version = Version.parseVersion(parameter);
 
 		if (arg.equalsIgnoreCase("-name")) //$NON-NLS-1$
 			name = parameter;
@@ -57,24 +64,24 @@ public class InstallPublisherApplication extends AbstractPublisherApplication {
 			flavor = parameter;
 
 		if (arg.equalsIgnoreCase("-top")) //$NON-NLS-1$
-			topLevel = createVersionedNameList(parameter);
+			topLevel = createVersionedIdList(parameter);
 
 		if (arg.equalsIgnoreCase("-rootExclusions")) //$NON-NLS-1$
-			rootExclusions = AbstractPublisherAction.getArrayFromString(parameter, ",");
+			rootExclusions = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
 	}
 
-	private VersionedName[] createVersionedNameList(String parameter) {
+	private IVersionedId[] createVersionedIdList(String parameter) {
 		String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
-		VersionedName[] result = new VersionedName[list.length];
+		IVersionedId[] result = new IVersionedId[list.length];
 		for (int i = 0; i < result.length; i++)
-			result[i] = VersionedName.parse(list[i]);
+			result[i] = VersionedId.parse(list[i]);
 		return result;
 	}
 
 	protected IPublisherAction[] createActions() {
-		ArrayList result = new ArrayList();
+		ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
 		result.add(createEclipseInstallAction());
-		return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
+		return result.toArray(new IPublisherAction[result.size()]);
 	}
 
 	private IPublisherAction createEclipseInstallAction() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
index c66358b..2f803f4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
@@ -13,10 +13,9 @@ package org.eclipse.equinox.p2.publisher.eclipse;
 import java.io.File;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.metadata.VersionedId;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.*;
 
@@ -47,7 +46,7 @@ public class ProductAction extends AbstractPublisherAction {
 		createAdvice();
 
 		// create all the actions needed to publish a product
-		ArrayList actions = new ArrayList();
+		ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
 		// products include the executable so add actions to publish them
 		if (getExecutablesLocation() != null)
 			actions.add(createApplicationExecutableAction(info.getConfigurations()));
@@ -56,7 +55,7 @@ public class ProductAction extends AbstractPublisherAction {
 		actions.add(createJREAction());
 		actions.add(createDefaultCUsAction());
 		actions.add(createRootIUAction());
-		return (IPublisherAction[]) actions.toArray(new IPublisherAction[actions.size()]);
+		return actions.toArray(new IPublisherAction[actions.size()]);
 	}
 
 	protected IPublisherAction createApplicationExecutableAction(String[] configSpecs) {
@@ -119,7 +118,7 @@ public class ProductAction extends AbstractPublisherAction {
 	}
 
 	private void createRootAdvice() {
-		Collection list;
+		Collection<IVersionedId> list;
 		if (product.useFeatures())
 			// TODO: We need a real namespace here
 			list = versionElements(listElements(product.getFeatures(), ".feature.group"), IInstallableUnit.NAMESPACE_IU_ID); //$NON-NLS-1$ 
@@ -141,16 +140,15 @@ public class ProductAction extends AbstractPublisherAction {
 			info.addAdvice(new ProductFileAdvice(product, configSpecs[i]));
 	}
 
-	private Collection versionElements(Collection elements, String namespace) {
-		Collection versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
-		List result = new ArrayList();
-		for (Iterator i = elements.iterator(); i.hasNext();) {
-			VersionedName element = (VersionedName) i.next();
+	private Collection<IVersionedId> versionElements(Collection<IVersionedId> elements, String namespace) {
+		Collection<IVersionAdvice> versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
+		List<IVersionedId> result = new ArrayList<IVersionedId>();
+		for (IVersionedId element : elements) {
 			Version elementVersion = element.getVersion();
 			if (elementVersion == null || Version.emptyVersion.equals(elementVersion)) {
-				Iterator advice = versionAdvice.iterator();
+				Iterator<IVersionAdvice> advice = versionAdvice.iterator();
 				while (advice.hasNext()) {
-					elementVersion = ((VersionAdvice) advice.next()).getVersion(namespace, element.getId());
+					elementVersion = advice.next().getVersion(namespace, element.getId());
 					break;
 				}
 			}
@@ -161,7 +159,7 @@ public class ProductAction extends AbstractPublisherAction {
 				result.add(unit);
 			} else if (elementVersion != null) {
 				//best effort
-				result.add(new VersionedName(element.getId(), elementVersion));
+				result.add(new VersionedId(element.getId(), elementVersion));
 			}
 			//TODO we could still add a requirement on version 0.0.0 to get any version, but if the
 			//bundle is platform specific we will have broken metadata due to a missing filter
@@ -169,13 +167,12 @@ public class ProductAction extends AbstractPublisherAction {
 		return result;
 	}
 
-	private Collection listElements(List elements, String suffix) {
+	private Collection<IVersionedId> listElements(List<IVersionedId> elements, String suffix) {
 		if (suffix == null || suffix.length() == 0)
 			return elements;
-		ArrayList result = new ArrayList(elements.size());
-		for (Iterator i = elements.iterator(); i.hasNext();) {
-			VersionedName elementName = (VersionedName) i.next();
-			result.add(new VersionedName(elementName.getId() + suffix, elementName.getVersion()));
+		ArrayList<IVersionedId> result = new ArrayList<IVersionedId>(elements.size());
+		for (IVersionedId elementName : elements) {
+			result.add(new VersionedId(elementName.getId() + suffix, elementName.getVersion()));
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
index 8eced58..e054e7f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
@@ -7,17 +7,19 @@
  * Contributors: 
  *   Code 9 - initial API and implementation
  *   EclipseSource - ongoing development
+ *   IBM Corporation - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.p2.publisher.eclipse;
 
 import java.io.File;
 import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
 import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
 import org.eclipse.equinox.p2.publisher.actions.ILicenseAdvice;
@@ -27,7 +29,6 @@ import org.eclipse.equinox.p2.publisher.actions.ILicenseAdvice;
  * launching as well as the configuration (bundles, properties, ...)
  */
 public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice, IExecutableAdvice, IConfigAdvice, IBrandingAdvice {
-
 	private final static String OSGI_SPLASH_PATH = "osgi.splashPath"; //$NON-NLS-1$
 	private final static String SPLASH_PREFIX = "platform:/base/plugins/"; //$NON-NLS-1$
 	private IProductDescriptor product;
@@ -101,9 +102,9 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 	 * properties may be defined in the .product file, the config.ini
 	 * file, or both.
 	 */
-	public Properties getProperties() {
-		Properties result = new Properties();
-		result.putAll(configData.getProperties());
+	public Map<String, String> getProperties() {
+		Map<String, String> result = new HashMap<String, String>();
+		CollectionUtils.putAll(configData.getProperties(), result);
 		result.putAll(product.getConfigurationProperties());
 		return result;
 	}
@@ -156,9 +157,9 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 	private ConfigData getConfigData() {
 		DataLoader loader = createDataLoader();
 		ConfigData result;
-		if (loader != null)
+		if (loader != null) {
 			result = loader.getConfigData();
-		else
+		} else
 			result = generateConfigData();
 
 		addProductFileBundles(result); // these are the bundles specified in the <plugins/> tag
@@ -174,17 +175,16 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 		return result;
 	}
 
-	private void addProductFileConfigBundles(ConfigData configData) {
-		Set versionBoundBundles = new HashSet();
-		Map unboundedBundles = new HashMap();
+	private void addProductFileConfigBundles(ConfigData data) {
+		Set<BundleInfo> versionBoundBundles = new HashSet<BundleInfo>();
+		Map<String, List<BundleInfo>> unboundedBundles = new HashMap<String, List<BundleInfo>>();
 
-		BundleInfo[] bundles = configData.getBundles();
+		BundleInfo[] bundles = data.getBundles();
 		for (int i = 0; i < bundles.length; i++) {
 			// For each bundle we know about, cache it.  If the bundle doesn't have a version
 			// add it to a list of bundles by name
 			BundleInfo bundleInfo = bundles[i];
-			if (bundleInfo.getVersion() == null || bundleInfo.getVersion().equals("0.0.0")) { //$NON-NLS-1$
-				bundleInfo.setVersion("0.0.0"); //$NON-NLS-1$
+			if (bundleInfo.getVersion().equals(BundleInfo.EMPTY_VERSION)) {
 				addUnboundedBundle(unboundedBundles, bundleInfo);
 			} else {
 				versionBoundBundles.add(bundleInfo);
@@ -192,55 +192,51 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 			}
 		}
 
-		List bundleInfos = product.getBundleInfos();
-		for (Iterator i = bundleInfos.iterator(); i.hasNext();) {
+		List<BundleInfo> bundleInfos = product.getBundleInfos();
+		for (BundleInfo bundleInfo : bundleInfos) {
 			// For each bundle that has configuration information, if the bundle is in the 
 			// bundles bound by version, add the "configured" bundle instead
 			// If the bundle is not bound to a version, then replace all bounded versions
 			// with this one.  Otherwise, just add this one (don't replace)
-			BundleInfo bundleInfo = (BundleInfo) i.next();
-
 			if (versionBoundBundles.contains(bundleInfo)) {
 				// If we found a version with the same name and version, replace it with the "configured" bundle
-				configData.removeBundle(bundleInfo);
-				configData.addBundle(bundleInfo);
-			} else if (bundleInfo.getVersion() == null || bundleInfo.getVersion().equals("0.0.0")) {//$NON-NLS-1$
+				data.removeBundle(bundleInfo);
+				data.addBundle(bundleInfo);
+			} else if (bundleInfo.getVersion().equals(BundleInfo.EMPTY_VERSION)) {
 				// If we don't have a version number, look for all bundles that match by name
-				List list = (List) unboundedBundles.get(bundleInfo.getSymbolicName());
+				List<BundleInfo> list = unboundedBundles.get(bundleInfo.getSymbolicName());
 				if (list == null)
-					configData.addBundle(bundleInfo);
+					data.addBundle(bundleInfo);
 				else
-					for (Iterator iterator = list.iterator(); iterator.hasNext();) {
-						BundleInfo target = (BundleInfo) iterator.next();
+					for (BundleInfo target : list) {
 						target.setStartLevel(bundleInfo.getStartLevel());
 						target.setMarkedAsStarted(bundleInfo.isMarkedAsStarted());
 					}
 			} else {
 				// Otherwise we have a version, but we could not match it, so just add this one.
-				configData.addBundle(bundleInfo);
+				data.addBundle(bundleInfo);
 			}
 
 		}
 	}
 
-	private void addUnboundedBundle(Map data, BundleInfo bundleInfo) {
+	private void addUnboundedBundle(Map<String, List<BundleInfo>> data, BundleInfo bundleInfo) {
 		if (!data.containsKey(bundleInfo.getSymbolicName()))
-			data.put(bundleInfo.getSymbolicName(), new LinkedList());
-		((LinkedList) data.get(bundleInfo.getSymbolicName())).add(bundleInfo);
+			data.put(bundleInfo.getSymbolicName(), new LinkedList<BundleInfo>());
+		data.get(bundleInfo.getSymbolicName()).add(bundleInfo);
 	}
 
-	private void addProductFileBundles(ConfigData configData) {
-		List bundles = product.getBundles(true);
-		Set set = new HashSet();
-		set.addAll(Arrays.asList(configData.getBundles()));
+	private void addProductFileBundles(ConfigData data) {
+		List<IVersionedId> bundles = product.getBundles(true);
+		Set<BundleInfo> set = new HashSet<BundleInfo>();
+		set.addAll(Arrays.asList(data.getBundles()));
 
-		for (Iterator i = bundles.iterator(); i.hasNext();) {
-			VersionedName name = (VersionedName) i.next();
+		for (IVersionedId vid : bundles) {
 			BundleInfo bundleInfo = new BundleInfo();
-			bundleInfo.setSymbolicName(name.getId());
-			bundleInfo.setVersion(name.getVersion().toString());
+			bundleInfo.setSymbolicName(vid.getId());
+			bundleInfo.setVersion(vid.getVersion().toString());
 			if (!set.contains(bundleInfo))
-				configData.addBundle(bundleInfo);
+				data.addBundle(bundleInfo);
 		}
 	}
 
@@ -251,12 +247,11 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 
 		// Add all the bundles here.  We replace / update them later
 		// if we find configuration information
-		List bundles = product.getBundles(true);
-		for (Iterator i = bundles.iterator(); i.hasNext();) {
-			VersionedName name = (VersionedName) i.next();
+		List<IVersionedId> bundles = product.getBundles(true);
+		for (IVersionedId vid : bundles) {
 			BundleInfo bundleInfo = new BundleInfo();
-			bundleInfo.setSymbolicName(name.getId());
-			bundleInfo.setVersion(name.getVersion().toString());
+			bundleInfo.setSymbolicName(vid.getId());
+			bundleInfo.setVersion(vid.getVersion().toString());
 			result.addBundle(bundleInfo);
 		}
 		return result;
@@ -302,8 +297,8 @@ public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice,
 			location = product.getConfigIniPath(null);
 		if (location == null)
 			return null;
-		File configFile = new File(location);
 
+		File configFile = new File(location);
 		// We are assuming we are always relative from the product file
 		// However PDE tooling puts us relative from the workspace, that "relative" path also looks like an absolute path on linux
 		// Build may have copied the file to the correct place for us
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
index 08aede7..dc365e7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
@@ -15,7 +15,9 @@ import java.net.URISyntaxException;
 import java.util.ArrayList;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
 
 public class ProductPublisherApplication extends AbstractPublisherApplication {
 
@@ -24,12 +26,13 @@ public class ProductPublisherApplication extends AbstractPublisherApplication {
 	private String flavor;
 
 	public ProductPublisherApplication() {
+		//hidden
 	}
 
 	protected IPublisherAction[] createActions() {
-		ArrayList result = new ArrayList();
+		ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
 		result.add(createProductAction());
-		return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
+		return result.toArray(new IPublisherAction[result.size()]);
 	}
 
 	private IPublisherAction createProductAction() {
@@ -44,8 +47,8 @@ public class ProductPublisherApplication extends AbstractPublisherApplication {
 		return new ProductAction(source, productDescriptor, flavor, executablesFeature);
 	}
 
-	protected void processParameter(String arg, String parameter, PublisherInfo info) throws URISyntaxException {
-		super.processParameter(arg, parameter, info);
+	protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
+		super.processParameter(arg, parameter, publisherInfo);
 
 		if (arg.equalsIgnoreCase("-productFile")) //$NON-NLS-1$
 			product = parameter;
@@ -53,6 +56,15 @@ public class ProductPublisherApplication extends AbstractPublisherApplication {
 			executables = parameter;
 		if (arg.equalsIgnoreCase("-flavor")) //$NON-NLS-1$
 			flavor = parameter;
+		if (arg.equalsIgnoreCase("-pluginVersionsAdvice")) { //$NON-NLS-1$
+			VersionAdvice versionAdvice = new VersionAdvice();
+			versionAdvice.load(IInstallableUnit.NAMESPACE_IU_ID, parameter, null);
+			info.addAdvice(versionAdvice);
+		}
+		if (arg.equalsIgnoreCase("-featureVersionsAdvice")) { //$NON-NLS-1$
+			VersionAdvice versionAdvice = new VersionAdvice();
+			versionAdvice.load(IInstallableUnit.NAMESPACE_IU_ID, parameter, ".feature.group"); //$NON-NLS-1$
+			info.addAdvice(versionAdvice);
+		}
 	}
-
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
index cc47b68..b9566e8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
@@ -16,6 +16,7 @@ public class URLEntry {
 	private String url;
 
 	public URLEntry() {
+		//empty
 	}
 
 	public URLEntry(String url, String annotation) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
index 4dcf756..32d1e2e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
@@ -16,6 +16,7 @@ import java.net.URLConnection;
 import java.util.*;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 
 /**
  * 	Helper functions supporting the processing of localized
@@ -56,23 +57,23 @@ public final class LocalizationHelper {
 
 	// For the given root directory and path to localization files within that directory
 	// get a map from locale to property set for the localization property files.
-	public static Map getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
+	public static Map<Locale, Map<String, String>> getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
 		File fullPath = new File(root, localizationPath);
 		File localizationDir = fullPath.getParentFile();
 		final String localizationFile = fullPath.getName();
 		String[] localizationFiles = LocalizationHelper.getLocalizationFiles(localizationDir, localizationFile);
 
-		HashMap localizations = null;
+		HashMap<Locale, Map<String, String>> localizations = null;
 
-		if (localizationFiles != null) {
-			localizations = new HashMap(localizationFiles.length);
+		if (localizationFiles != null && localizationFiles.length > 0) {
+			localizations = new HashMap<Locale, Map<String, String>>(localizationFiles.length);
 			for (int i = 0; i < localizationFiles.length; i++) {
 				String nextFile = localizationFiles[i];
 				Locale nextLocale = getLocale(LocalizationHelper.getLocaleString(nextFile, localizationFile));
 
 				try {
-					Properties properties = loadProperties(root, nextFile);
-					Properties localizedStrings = getLocalizedProperties(propertyKeys, properties);
+					Map<String, String> properties = loadProperties(localizationDir, nextFile);
+					Map<String, String> localizedStrings = getLocalizedProperties(propertyKeys, properties);
 					if (localizedStrings.size() > 0) {
 						localizations.put(nextLocale, localizedStrings);
 						if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
@@ -88,13 +89,13 @@ public final class LocalizationHelper {
 		return localizations;
 	}
 
-	public static Map getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
+	public static Map<Locale, Map<String, String>> getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
 		ZipFile jarFile = null;
-		Map localizations = new HashMap(4);
+		Map<Locale, Map<String, String>> localizations = new HashMap<Locale, Map<String, String>>(4);
 		try {
 			jarFile = new ZipFile(root, ZipFile.OPEN_READ);
-			for (Enumeration entries = jarFile.entries(); entries.hasMoreElements();) {
-				ZipEntry nextEntry = (ZipEntry) entries.nextElement();
+			for (Enumeration<? extends ZipEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
+				ZipEntry nextEntry = entries.nextElement();
 				String nextName = nextEntry.getName();
 				String localeString = LocalizationHelper.getLocaleString(nextName, localizationPath);
 
@@ -103,9 +104,8 @@ public final class LocalizationHelper {
 					InputStream stream = null;
 					try {
 						stream = jarFile.getInputStream(nextEntry);
-						Properties properties = new Properties();
-						properties.load(stream);
-						Properties localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
+						Map<String, String> properties = CollectionUtils.loadProperties(stream);
+						Map<String, String> localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
 						if (localizedStrings.size() > 0) {
 							localizations.put(nextLocale, localizedStrings);
 							if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
@@ -134,8 +134,7 @@ public final class LocalizationHelper {
 	}
 
 	// Load a property set from given root and file with the given name
-	private static Properties loadProperties(File root, String propertyFilename) throws IOException {
-		Properties result = new Properties();
+	private static Map<String, String> loadProperties(File root, String propertyFilename) throws IOException {
 		InputStream propertyStream = null;
 		try {
 			try {
@@ -148,24 +147,23 @@ public final class LocalizationHelper {
 				}
 			} catch (FileNotFoundException e) {
 				// if there is no messages file then just return;
-				return result;
+				return CollectionUtils.emptyMap();
 			}
-			result.load(propertyStream);
+			return CollectionUtils.loadProperties(propertyStream);
 		} finally {
 			if (propertyStream != null)
 				propertyStream.close();
 		}
-		return result;
 	}
 
 	// Given a list of keys and the corresponding localized property set,
 	// return a new property set with those keys and the localized values. 
-	static public Properties getLocalizedProperties(String[] propertyKeys, Properties properties) {
-		Properties localizedProperties = new Properties();
+	static public Map<String, String> getLocalizedProperties(String[] propertyKeys, Map<String, String> properties) {
+		Map<String, String> localizedProperties = new HashMap<String, String>();
 		for (int i = 0; i < propertyKeys.length; i++) {
 			String key = propertyKeys[i];
 			if (key != null) {
-				String localizedValue = properties.getProperty(key);
+				String localizedValue = properties.get(key);
 				if (localizedValue != null)
 					localizedProperties.put(key, localizedValue);
 			}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
index d62efd0..9136fa8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,17 +16,17 @@ import java.io.*;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import java.util.Map.Entry;
+import org.eclipse.equinox.internal.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
 import org.eclipse.equinox.p2.publisher.IPublisherInfo;
 import org.eclipse.equinox.p2.publisher.PublisherInfo;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.osgi.framework.Constants;
 
@@ -38,29 +38,28 @@ import org.osgi.framework.Constants;
 public class PublisherHelper {
 	/**
 	 * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
-	 * @see IRequiredCapability#getNamespace()
 	 * @see IProvidedCapability#getNamespace()
 	 */
 	public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
 
+	public static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
 	/**
 	 * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace 
 	 * representing a feature
-	 * @see IRequiredCapability#getName()
+	 * @see IProvidedCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
 
 	/**
 	 * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace 
 	 * representing a source bundle
-	 * @see IRequiredCapability#getName()
+	 * @see IProvidedCapability#getName()
 	 */
 	public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
 
 	/**
 	 * A capability namespace representing the localization (translation)
 	 * of strings from a specified IU in a specified locale
-	 * @see IRequiredCapability#getNamespace()
 	 * @see IProvidedCapability#getNamespace()
 	 * TODO: this should be in API, probably in IInstallableUnit
 	 */
@@ -83,24 +82,45 @@ public class PublisherHelper {
 
 	public static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
 
-	public static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+	public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
+	public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
 
-	public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", new Version(1, 0, 0)); //$NON-NLS-1$
-	public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", new Version(1, 0, 0)); //$NON-NLS-1$
-
-	public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, new Version(1, 0, 0));
+	public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
 
 	public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk) {
-		//TODO this size calculation is bogus
-		ArtifactDescriptor result = new ArtifactDescriptor(key);
-		if (pathOnDisk != null) {
-			result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
-			// TODO - this is wrong but I'm testing a work-around for bug 205842
-			result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
+		return createArtifactDescriptor(null, null, key, pathOnDisk);
+	}
+
+	//TODO remove because the method with IPublisherInfo is more powerful
+	public static IArtifactDescriptor createArtifactDescriptor(IArtifactRepository artifactRepo, IArtifactKey key, File pathOnDisk) {
+		return createArtifactDescriptor(null, artifactRepo, key, pathOnDisk);
+	}
+
+	/**
+	 * Creates an artifact descriptor for the given key and path.
+	 * @param info the publisher info
+	 * @param key the key of the artifact to publish
+	 * @param pathOnDisk the path of the artifact on disk
+	 * @return a new artifact descriptor
+	 */
+	public static IArtifactDescriptor createArtifactDescriptor(IPublisherInfo info, IArtifactKey key, File pathOnDisk) {
+		return createArtifactDescriptor(info, info.getArtifactRepository(), key, pathOnDisk);
+	}
+
+	private static IArtifactDescriptor createArtifactDescriptor(IPublisherInfo info, IArtifactRepository artifactRepo, IArtifactKey key, File pathOnDisk) {
+		IArtifactDescriptor result = artifactRepo != null ? artifactRepo.createArtifactDescriptor(key) : new ArtifactDescriptor(key);
+		if (result instanceof ArtifactDescriptor) {
+			ArtifactDescriptor descriptor = (ArtifactDescriptor) result;
+			if (pathOnDisk != null) {
+				descriptor.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
+				descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
+			}
+			if (info == null || (info.getArtifactOptions() & IPublisherInfo.A_NO_MD5) == 0) {
+				String md5 = computeMD5(pathOnDisk);
+				if (md5 != null)
+					descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
+			}
 		}
-		String md5 = computeMD5(pathOnDisk);
-		if (md5 != null)
-			result.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
 		return result;
 	}
 
@@ -143,7 +163,7 @@ public class PublisherHelper {
 	}
 
 	public static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
-		return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), new Version(1, 0, 0));
+		return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
 	}
 
 	public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
@@ -154,19 +174,19 @@ public class PublisherHelper {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on features
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
 		cu.setHost(reqs);
 
 		cu.setFilter(INSTALL_FEATURES_FILTER);
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 		touchpointData.put("install", "installFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
 		touchpointData.put("uninstall", "uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
 		cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
@@ -178,17 +198,17 @@ public class PublisherHelper {
 		InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
 		String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
 		cu.setId(configUnitId);
-		Version configUnitVersion = new Version(1, 0, 0);
+		Version configUnitVersion = Version.createOSGi(1, 0, 0);
 		cu.setVersion(configUnitVersion);
 
 		// Add capabilities for fragment, self, and describing the flavor supported
-		cu.setProperty(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_FLAVOR, configurationFlavor, new Version(1, 0, 0))});
+		cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+		cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
 
 		// Create a required capability on source providers
-		IRequiredCapability[] reqs = new IRequiredCapability[] {MetadataFactory.createRequiredCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
+		IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
 		cu.setHost(reqs);
-		Map touchpointData = new HashMap();
+		Map<String, String> touchpointData = new HashMap<String, String>();
 
 		touchpointData.put("install", "addSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
 		touchpointData.put("uninstall", "removeSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -196,26 +216,25 @@ public class PublisherHelper {
 		return MetadataFactory.createInstallableUnit(cu);
 	}
 
-	private static void addExtraProperties(IInstallableUnit iiu, Properties extraProperties) {
+	private static void addExtraProperties(IInstallableUnit iiu, Map<String, String> extraProperties) {
 		if (iiu instanceof InstallableUnit) {
 			InstallableUnit iu = (InstallableUnit) iiu;
 
-			for (Enumeration e = extraProperties.propertyNames(); e.hasMoreElements();) {
-				String name = (String) e.nextElement();
-				iu.setProperty(name, extraProperties.getProperty(name));
+			for (Entry<String, String> entry : extraProperties.entrySet()) {
+				iu.setProperty(entry.getKey(), entry.getValue());
 			}
 		}
 	}
 
-	public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Properties extraProperties) {
-		ArrayList iusCreated = new ArrayList(1);
+	public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) {
+		ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1);
 		IPublisherInfo info = new PublisherInfo();
 		String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
-		info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), Version.fromOSGiVersion(bd.getVersion()), shape));
+		info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion()), shape));
 		IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
 		addExtraProperties(iu, extraProperties);
 		iusCreated.add(iu);
-		return (IInstallableUnit[]) (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
+		return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
 	}
 
 	public static ArtifactKey createBinaryArtifactKey(String id, Version version) {
@@ -226,4 +245,47 @@ public class PublisherHelper {
 		return MetadataFactory.createProvidedCapability(IU_NAMESPACE, installableUnitId, installableUnitVersion);
 	}
 
+	/**
+	 * Convert <code>version</code> into its OSGi equivalent if possible.
+	 *
+	 * @param version The version to convert. Can be <code>null</code>
+	 * @return The converted version or <code>null</code> if the argument was <code>null</code>
+	 * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
+	 */
+	public static org.osgi.framework.Version toOSGiVersion(Version version) {
+		if (version == null)
+			return null;
+		if (version == Version.emptyVersion)
+			return org.osgi.framework.Version.emptyVersion;
+		if (version == Version.MAX_VERSION)
+			return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+
+		BasicVersion bv = (BasicVersion) version;
+		return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
+	}
+
+	/**
+	 * Create an omni version from an OSGi <code>version</code>.
+	 * @param version The OSGi version. Can be <code>null</code>.
+	 * @return The created omni version
+	 */
+	public static Version fromOSGiVersion(org.osgi.framework.Version version) {
+		if (version == null)
+			return null;
+		if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
+			return Version.MAX_VERSION;
+		return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
+	}
+
+	public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
+		if (range.equals(VersionRange.emptyRange))
+			return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
+		return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
+	}
+
+	public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
+		if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
+			return VersionRange.emptyRange;
+		return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
index 3da757a..04f18eb 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
@@ -8,16 +8,28 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.publisher.ant;
 
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
+import org.eclipse.equinox.internal.p2.publisher.Activator;
 import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.osgi.util.NLS;
 
 public abstract class AbstractPublishTask extends Task {
 	protected static final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
@@ -77,32 +89,52 @@ public abstract class AbstractPublishTask extends Task {
 	protected boolean reusePackedFiles = false;
 	protected boolean append = true;
 	protected boolean publish = true;
+	protected String source = null;
 	protected URI metadataLocation;
 	protected String metadataRepoName;
 	protected URI artifactLocation;
 	protected String artifactRepoName;
 	protected PublisherInfo provider = null;
-	protected List contextRepositories = new ArrayList();
+	protected List<RepoEntry> contextRepositories = new ArrayList<RepoEntry>();
+
+	protected IProvisioningAgent getProvisioningAgent() {
+		return (IProvisioningAgent) ServiceHelper.getService(Activator.context, IProvisioningAgent.SERVICE_NAME);
+	}
 
 	protected IStatus createConfigurationEror(String message) {
 		return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
 	}
 
+	private boolean isEmpty(IArtifactRepository repo) {
+		IQueryResult<IArtifactKey> result = repo.query(QueryUtil.createLimitQuery(ArtifactKeyQuery.ALL_KEYS, 1), null);
+		return result.isEmpty();
+	}
+
 	protected void initializeRepositories(PublisherInfo info) throws ProvisionException {
-		if (artifactLocation != null)
-			info.setArtifactRepository(Publisher.createArtifactRepository(artifactLocation, artifactRepoName, append, compress, reusePackedFiles));
-		else if ((info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
+		if (artifactLocation != null) {
+			IArtifactRepository repo = Publisher.createArtifactRepository(getProvisioningAgent(), artifactLocation, artifactRepoName, compress, reusePackedFiles);
+			if (!append && !isEmpty(repo)) {
+				File repoLocation = URIUtil.toFile(artifactLocation);
+				if (repoLocation != null && source != null) {
+					if (repoLocation.isFile())
+						repoLocation = repoLocation.getParentFile();
+					if (repoLocation.equals(new File(source)))
+						throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
+				}
+				repo.removeAll();
+			}
+			info.setArtifactRepository(repo);
+		} else if ((info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
 			throw new ProvisionException(createConfigurationEror(Messages.exception_noArtifactRepo));
 		if (metadataLocation == null)
 			throw new ProvisionException(createConfigurationEror(Messages.exception_noMetadataRepo));
-		info.setMetadataRepository(Publisher.createMetadataRepository(metadataLocation, metadataRepoName, append, compress));
+		info.setMetadataRepository(Publisher.createMetadataRepository(getProvisioningAgent(), metadataLocation, metadataRepoName, append, compress));
 
 		if (contextRepositories.size() > 0) {
-			CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite();
-			CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite();
+			CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite(getProvisioningAgent());
+			CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite(getProvisioningAgent());
 
-			for (Iterator iterator = contextRepositories.iterator(); iterator.hasNext();) {
-				RepoEntry entry = (RepoEntry) iterator.next();
+			for (RepoEntry entry : contextRepositories) {
 				if (contextMetadata != null && entry.isMetadataRepository())
 					contextMetadata.addChild(entry.getRepositoryLocation());
 				if (contextArtifact != null && entry.isArtifactRepository())
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
index bd276c1..0c8bcab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
@@ -9,20 +9,21 @@
 package org.eclipse.equinox.internal.p2.publisher.ant;
 
 import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.types.FileSet;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.IPublisherAction;
 import org.eclipse.equinox.p2.publisher.Publisher;
 import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
 import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
 
 public class FeaturesAndBundlesPublisherTask extends AbstractPublishTask {
-	private ArrayList features = new ArrayList();
-	private ArrayList bundles = new ArrayList();
+	private ArrayList<Object> features = new ArrayList<Object>();
+	private ArrayList<Object> bundles = new ArrayList<Object>();
 
 	public void execute() throws BuildException {
 		try {
@@ -34,20 +35,19 @@ public class FeaturesAndBundlesPublisherTask extends AbstractPublishTask {
 		File[] f = getLocations(features);
 		File[] b = getLocations(bundles);
 
-		ArrayList actions = new ArrayList();
+		ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
 		if (f.length > 0)
 			actions.add(new FeaturesAction(f));
 		if (b.length > 0)
 			actions.add(new BundlesAction(b));
 
 		if (actions.size() > 0)
-			new Publisher(getInfo()).publish((IPublisherAction[]) actions.toArray(new IPublisherAction[actions.size()]), new NullProgressMonitor());
+			new Publisher(getInfo()).publish(actions.toArray(new IPublisherAction[actions.size()]), new NullProgressMonitor());
 	}
 
-	private File[] getLocations(List collection) {
-		ArrayList results = new ArrayList();
-		for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
-			Object obj = iterator.next();
+	private File[] getLocations(List<Object> collection) {
+		ArrayList<Object> results = new ArrayList<Object>();
+		for (Object obj : collection) {
 			if (obj instanceof FileSet) {
 				FileSet set = (FileSet) obj;
 
@@ -62,7 +62,7 @@ public class FeaturesAndBundlesPublisherTask extends AbstractPublishTask {
 				results.add(obj);
 			}
 		}
-		return (File[]) results.toArray(new File[results.size()]);
+		return results.toArray(new File[results.size()]);
 	}
 
 	public FileSet createFeatures() {
@@ -78,6 +78,7 @@ public class FeaturesAndBundlesPublisherTask extends AbstractPublishTask {
 	}
 
 	public void setSource(String source) {
+		super.source = source;
 		features.add(new File(source, "features")); //$NON-NLS-1$
 		bundles.add(new File(source, "plugins")); //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
index ba8cc48..2a4af02 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
@@ -9,13 +9,14 @@
 package org.eclipse.equinox.internal.p2.publisher.ant;
 
 import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
 import org.eclipse.equinox.p2.publisher.eclipse.ProductAction;
@@ -60,9 +61,8 @@ public class ProductPublisherTask extends AbstractPublishTask {
 	private String flavor;
 	private String productFile;
 	private String executables;
-	private String source;
-	private List configurations = new ArrayList(3);
-	private List advice = new ArrayList(3);
+	private List<ConfigElement> configurations = new ArrayList<ConfigElement>(3);
+	private List<AdviceElement> advice = new ArrayList<AdviceElement>(3);
 
 	public void execute() throws BuildException {
 		try {
@@ -99,8 +99,7 @@ public class ProductPublisherTask extends AbstractPublishTask {
 	}
 
 	protected void processAdvice(PublisherInfo info) {
-		for (Iterator iterator = advice.iterator(); iterator.hasNext();) {
-			AdviceElement element = (AdviceElement) iterator.next();
+		for (AdviceElement element : advice) {
 			if (element.kind == null || element.file == null)
 				continue;
 
@@ -125,7 +124,7 @@ public class ProductPublisherTask extends AbstractPublishTask {
 	}
 
 	public void setSource(String source) {
-		this.source = source;
+		super.source = source;
 	}
 
 	public void addConfiguredConfig(ConfigElement config) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
index 819deed..d25b041 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
@@ -10,13 +10,12 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.publisher.ant;
 
-import org.eclipse.equinox.internal.provisional.p2.core.VersionedName;
-
 import java.io.File;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.eclipse.EclipseInstallAction;
 
@@ -27,7 +26,6 @@ import org.eclipse.equinox.p2.publisher.eclipse.EclipseInstallAction;
  */
 public class PublisherTask extends AbstractPublishTask {
 
-	protected String source;
 	protected boolean inplace = false;
 	protected String[] configurations;
 	protected String mode;
@@ -39,7 +37,7 @@ public class PublisherTask extends AbstractPublishTask {
 	private String versionAdvice;
 	private String rootName;
 	private String executableName;
-	private VersionedName[] topLevel;
+	private IVersionedId[] topLevel;
 	private boolean start;
 	private String[] nonRootFiles;
 
@@ -68,7 +66,7 @@ public class PublisherTask extends AbstractPublishTask {
 			return new IPublisherAction[] {};
 		if (operation.equals("-source")) //$NON-NLS-1$
 			// TODO what to do in this case?
-			return new IPublisherAction[] {new EclipseInstallAction(operationValue, root, new Version(rootVersion), rootName, executableName, flavor, topLevel, nonRootFiles, start)};
+			return new IPublisherAction[] {new EclipseInstallAction(operationValue, root, Version.parseVersion(rootVersion), rootName, executableName, flavor, topLevel, nonRootFiles, start)};
 		// TODO what to do in this case?
 		return new IPublisherAction[] {};
 	}
@@ -81,11 +79,11 @@ public class PublisherTask extends AbstractPublishTask {
 
 	protected void initialize(PublisherInfo info) throws ProvisionException {
 		if (inplace) {
-			File location = new File(source);
+			File sourceLocation = new File(source);
 			if (metadataLocation == null)
-				metadataLocation = location.toURI();
+				metadataLocation = sourceLocation.toURI();
 			if (artifactLocation == null)
-				artifactLocation = location.toURI();
+				artifactLocation = sourceLocation.toURI();
 			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
 		} else
 			info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH | IPublisherInfo.A_OVERWRITE);
@@ -111,6 +109,7 @@ public class PublisherTask extends AbstractPublishTask {
 	}
 
 	public void setSource(String location) {
+		super.source = location;
 		operation = "-source"; //$NON-NLS-1$
 		operationValue = location;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.log/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ql/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.log/.classpath
copy to eclipse/plugins/org.eclipse.equinox.p2.ql/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/.project b/eclipse/plugins/org.eclipse.equinox.p2.ql/.project
new file mode 100644
index 0000000..bf129f0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/.project
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.ql</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..b069b3c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Thu Nov 12 08:11:03 CET 2009
+eclipse.preferences.version=1
+encoding//model/p2ql.ecorediag=UTF-8
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..62ea927
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,347 @@
+#Tue Dec 22 17:40:14 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs
copy to eclipse/plugins/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..072c165
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.ql;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.p2.ql;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.1"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)"
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/about.html b/eclipse/plugins/org.eclipse.equinox.p2.ql/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.core.resources.compatibility/about.html
rename to eclipse/plugins/org.eclipse.equinox.p2.ql/about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ql/build.properties
new file mode 100644
index 0000000..315ede3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/build.properties
@@ -0,0 +1,20 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id: build.properties,v 1.4 2010/02/19 12:13:14 thallgren Exp $
+
+bin.includes = .,\
+               META-INF/,\
+               plugin.properties,\
+               about.html,\
+               OSGI-INF/
+jars.compile.order = .
+source.. = src/
+output.. = bin/
+src.includes = about.html,\
+               model/,\
+               OSGI-INF/
+javacTarget=jsr14
+javacSource=1.5
+javacWarnings..=+fieldHiding
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/model/p2ql.bnf b/eclipse/plugins/org.eclipse.equinox.p2.ql/model/p2ql.bnf
new file mode 100644
index 0000000..476f541
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/model/p2ql.bnf
@@ -0,0 +1,67 @@
+condition
+	: orExpression ( '?' orExpression ':' orExpression )?
+	;
+
+orExpression : andExpression ( '||' andExpression )* ;
+
+andExpression : binaryExpression ( '&&' binaryExpression )* ;
+
+binaryExpression : notExpression ( op notExpression )?;
+
+op : '=' | '!=' | '>' | '>=' | '<' | '<=' | '~=' ;
+
+notExpression
+	: '!' notExpression
+	| collectionExpression
+	;
+
+collectionExpression
+	: memberExpression ( '.' collectionFunction )*
+	;
+
+memberExpression : constructor ( ( '.' ID ) | ( '[' memberExpression ']' ) )* ;
+
+constructor
+	: ( filter | version | range | class ) '(' unaryExpression ')'
+	| set '(' ( collectionExpression ( ',' collectionExpression )* )? ')'
+	| unaryExpression
+	;
+
+collectionFunction
+	: ( select | reject | exists | all | traverse ) '(' lambdaDefinition ')'
+	| limit '(' memberExpression ')'
+	| unique '(' memberExpression? ')'
+	| latest '(' lambdaDefinition? ')'
+	;
+
+lambdaDefinition
+	: initializer ( ',' initializer )* ( ',' '{' lambda '}' )?
+	| '{' lambda '}'
+	| lambda
+	;
+
+initializer
+	: '_'
+	| condition
+	;
+
+lambda
+	: ( ID ( ',' ID )* )? '|' condition
+	;
+
+unaryExpression
+	: '(' condition ')'
+	| '[' condition ( ',' condition )* ']' // #array construct
+	| '/' regexpPattern '/'
+	| STRING
+	| INT
+	| parameter
+	| 'null'
+	| 'true'
+	| 'false'
+	| ID
+	;
+
+parameter
+	: '$' INT | ID
+	;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.ql/plugin.properties
new file mode 100644
index 0000000..01d48c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id: plugin.properties,v 1.2 2010/02/08 04:22:38 johna Exp $
+
+pluginName =p2 query language
+providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ql/pom.xml
new file mode 100644
index 0000000..cffd94b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ql</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
new file mode 100644
index 0000000..60b277c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ql;
+
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IQLExpression extends IExpression {
+	//
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java
new file mode 100644
index 0000000..b87c009
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Cloudsmith Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Cloudsmith Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ql;
+
+import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
+
+/**
+ * This interface provides all the factory methods needed to create the all possible
+ * nodes of the expression tree.
+ */
+public interface IQLFactory extends IExpressionFactory {
+	//
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
new file mode 100644
index 0000000..b23b0f1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+A query language specialized in the querying of p2 constructs.
+<h2>
+Package Specification</h2>
+<p>
+This package specifies a query language specialized in the handling p2 constructs.
+service.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs
index b828310..45a5892 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Nov 20 12:56:54 PST 2008
+#Wed Dec 30 07:30:16 CET 2009
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product
index 50b1386..2d2a9af 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/Bootstrap.product
@@ -1,14 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="p2 bootstrap" id="org.eclipse.equinox.p2.reconciler.dropins.product" application="org.eclipse.equinox.p2.reconciler.application" useFeatures="false" includeLaunchers="true">
-
-   <configIni use="default">
-      <linux>/org.eclipse.equinox.p2.reconciler.dropins/config.ini</linux>
-      <macosx>/org.eclipse.equinox.p2.reconciler.dropins/config.ini</macosx>
-      <solaris>/org.eclipse.equinox.p2.reconciler.dropins/config.ini</solaris>
-      <win32>/org.eclipse.equinox.p2.reconciler.dropins/config.ini</win32>
-   </configIni>
+<product name="p2 bootstrap" id="org.eclipse.equinox.p2.reconciler.dropins.product" application="org.eclipse.equinox.p2.reconciler.application" version="1.1.0.qualifier" useFeatures="false" includeLaunchers="true">
 
    <launcherArgs>
       <vmArgs>-Dorg.eclipse.equinox.p2.reconciler.noConfig=true</vmArgs>
@@ -17,7 +10,7 @@
 
    <windowImages/>
 
-   <launcher name="eclipse.exe">
+   <launcher name="eclipse">
       <solaris/>
       <win useIco="false">
          <bmp/>
@@ -29,6 +22,7 @@
 
    <plugins>
       <plugin id="org.eclipse.core.contenttype"/>
+      <plugin id="org.eclipse.core.expressions"/>
       <plugin id="org.eclipse.core.jobs"/>
       <plugin id="org.eclipse.core.net"/>
       <plugin id="org.eclipse.core.net.win32.x86" fragment="true"/>
@@ -42,6 +36,7 @@
       <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
       <plugin id="org.eclipse.equinox.app"/>
       <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.ds"/>
       <plugin id="org.eclipse.equinox.frameworkadmin"/>
       <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
       <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
@@ -49,13 +44,13 @@
       <plugin id="org.eclipse.equinox.p2.director"/>
       <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
       <plugin id="org.eclipse.equinox.p2.engine"/>
-      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
       <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
       <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
       <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
       <plugin id="org.eclipse.equinox.p2.metadata"/>
       <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
       <plugin id="org.eclipse.equinox.p2.publisher"/>
+      <plugin id="org.eclipse.equinox.p2.ql"/>
       <plugin id="org.eclipse.equinox.p2.reconciler.dropins"/>
       <plugin id="org.eclipse.equinox.p2.repository"/>
       <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
@@ -66,6 +61,7 @@
       <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.simpleconfigurator"/>
       <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
+      <plugin id="org.eclipse.equinox.util"/>
       <plugin id="org.eclipse.osgi"/>
       <plugin id="org.eclipse.osgi.services"/>
       <plugin id="org.sat4j.core"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
index f687f95..b6cae71 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/META-INF/MANIFEST.MF
@@ -1,12 +1,16 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.reconciler.dropins;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.reconciler.dropins;singleton:=true
+Bundle-Version: 1.1.2.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.reconciler.dropins.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.reconciler.dropins.Activator
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Export-Package: org.eclipse.equinox.internal.p2.reconciler.dropins;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.p2.touchpoint.eclipse;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
 Import-Package: org.eclipse.equinox.app;version="1.0.0",
  org.eclipse.equinox.internal.p2.artifact.repository,
@@ -15,26 +19,21 @@ Import-Package: org.eclipse.equinox.app;version="1.0.0",
  org.eclipse.equinox.internal.p2.metadata.repository,
  org.eclipse.equinox.internal.p2.update,
  org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.director,
  org.eclipse.equinox.internal.provisional.p2.directorywatcher,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.datalocation;version="1.0.0",
  org.eclipse.osgi.service.environment;version="1.1.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.util.tracker;version="1.3.3",
- org.xml.sax
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.touchpoint.eclipse;bundle-version="1.0.0"
-Export-Package: org.eclipse.equinox.internal.p2.reconciler.dropins;x-internal:=true
+ org.osgi.service.packageadmin;version="1.2.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/build.properties
index 6861747..3a99d7d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/build.properties
@@ -15,6 +15,7 @@ bin.includes = META-INF/,\
                plugin.properties,\
                about.html,\
                plugin.xml,\
-               Bootstrap.product,\
-               config.ini
+               Bootstrap.product
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/config.ini b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/config.ini
deleted file mode 100644
index a28c5ec..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/config.ini
+++ /dev/null
@@ -1,55 +0,0 @@
-# Eclipse runtime configuration file
-# This file contains a number of key/value pairs that are merged into the 
-# System properties on system startup.  The values control the way the 
-# runtime is structured and runs.
-
-# Note:  Only platform:/base/ and file: URLs are supported.  In general the 
-# URLs given may include a version number (e.g., .../location_1.2.3).  
-# If a version is not specified, the system binds
-# to the location which matches exactly or to the versioned location with the
-# latest version number.  If a version number is given then only exact matches
-# are considered.
-
-# The URL for the runtime entry point.  The default value is
-# platform:/base/plugins/org.eclipse.osgi 
-#osgi.framework = platform:/base/plugins/org.eclipse.osgi
-
-# The classpath for the framework found at the osgi.framework location.  This 
-# comma-separated list contains either URLs or simple element names.  Simple
-# names are assumed to be relative to the framework's install directory.  
-# Typically this value need not be set as it is initialized by the framework itself.
-# Version match searching is not done for URLs listed here.
-#osgi.frameworkClassPath =
-
-# The comma-separated list of locations to search for the splash screen file (splash.bmp).
-# For each list element a subdirectory structure based on the pattern nl/<locale> is searched.
-# The system binds to the first matching file.  There is no default value.
-osgi.splashPath = platform:/base/plugins/org.eclipse.platform
-
-# The location of the splash screen file.  If this value is set at system startup it is used 
-# in favour of the osgi.splashPath searching outlined above.  If the value is not set 
-# the searching is done and this key is bound to the result of the search.
-#osgi.splashLocation =
-
-# The comma-separated list of bundles which are automatically installed and optionally started
-# once the system is up and running.  Each entry if of the form
-#     <URL | simple bundle location>[@ [<startlevel>] [":start"]]
-# If the startlevel is omitted then the framework will use the default start level for the bundle.
-# If the "start" tag is added then the bundle will be marked as started after being installed.
-# Simple bundle locations are interepreted as relative to the framework's parent directory.
-# The startlevel indicates the OSGi start level at which the bundle should run.
-# If this value is not set, the system computes an appropriate default.
-osgi.bundles=org.eclipse.equinox.common at 2:start, org.eclipse.equinox.p2.reconciler.dropins at 4:start, org.eclipse.core.runtime at start
-
-# The default start level.
-osgi.bundles.defaultStartLevel=4
-
-# The product to run.  A given Eclipse configuration may contain many products.
-# The product identified will supply the branding (window icons, title bar text) etc 
-# as well as define the default application to run.  
-eclipse.application=org.eclipse.equinox.p2.reconciler.application
-
-org.eclipse.update.reconcile=false
-
-# End of file marker - must be here
-eof=eof
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
new file mode 100644
index 0000000..a9d7831
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.reconciler.dropins</artifactId>
+  <version>1.1.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
index 6636bea..8abde42 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2011 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -20,18 +20,19 @@ import org.eclipse.equinox.internal.p2.extensionlocation.*;
 import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
 import org.eclipse.equinox.internal.p2.update.Configuration;
 import org.eclipse.equinox.internal.p2.update.PathUtil;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
 public class Activator implements BundleActivator {
 
@@ -47,12 +48,9 @@ public class Activator implements BundleActivator {
 	private static final String DIR_PLUGINS = "plugins"; //$NON-NLS-1$
 	private static final String DIR_FEATURES = "features"; //$NON-NLS-1$
 	private static final String EXT_LINK = ".link"; //$NON-NLS-1$
-	private static PackageAdmin packageAdmin;
 	private static BundleContext bundleContext;
-	private ServiceReference packageAdminRef;
-	private List watchers = new ArrayList();
-	private final static Set repositories = new HashSet();
-	private Collection filesToCheck = null;
+	private final static Set<IMetadataRepository> repositories = new HashSet<IMetadataRepository>();
+	private Collection<File> filesToCheck = null;
 
 	/**
 	 * Helper method to create an extension location metadata repository at the given URI. 
@@ -63,19 +61,30 @@ public class Activator implements BundleActivator {
 	 * @throws IllegalStateException
 	 * @throws ProvisionException 
 	 */
-	public static IMetadataRepository createExtensionLocationMetadataRepository(URI location, String name, Map properties) throws ProvisionException {
-		BundleContext context = getContext();
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(context, IMetadataRepositoryManager.class.getName());
+	public static IMetadataRepository createExtensionLocationMetadataRepository(URI location, String name, Map<String, String> properties) throws ProvisionException {
+		IProvisioningAgent agent = getAgent();
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("MetadataRepositoryManager not registered."); //$NON-NLS-1$
 		ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
-		IMetadataRepository repository = factory.create(location, name, ExtensionLocationMetadataRepository.TYPE, properties);
+		factory.setAgent(agent);
+
+		// always compress repositories that we are creating.
+		Map<String, String> repositoryProperties = new HashMap<String, String>();
+		repositoryProperties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+		if (properties != null)
+			repositoryProperties.putAll(properties);
+		IMetadataRepository repository = factory.create(location, name, ExtensionLocationMetadataRepository.TYPE, repositoryProperties);
 		//we need to add the concrete repository to the repository manager, or its properties will not be correct
 		((MetadataRepositoryManager) manager).addRepository(repository);
 		manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
 		return repository;
 	}
 
+	private static IProvisioningAgent getAgent() {
+		return (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
+	}
+
 	/**
 	 * Helper method to load an extension location metadata repository from the given URL.
 	 * 
@@ -83,8 +92,7 @@ public class Activator implements BundleActivator {
 	 * @throws ProvisionException
 	 */
 	public static IMetadataRepository loadMetadataRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
-		BundleContext context = getContext();
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(context, IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("MetadataRepositoryManager not registered."); //$NON-NLS-1$
 		IMetadataRepository repository = manager.loadRepository(location, monitor);
@@ -101,13 +109,20 @@ public class Activator implements BundleActivator {
 	 * @throws IllegalStateException
 	 * @throws ProvisionException 
 	 */
-	public static IArtifactRepository createExtensionLocationArtifactRepository(URI location, String name, Map properties) throws ProvisionException {
-		BundleContext context = getContext();
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(context, IArtifactRepositoryManager.class.getName());
+	public static IArtifactRepository createExtensionLocationArtifactRepository(URI location, String name, Map<String, String> properties) throws ProvisionException {
+		IProvisioningAgent agent = getAgent();
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("ArtifactRepositoryManager not registered."); //$NON-NLS-1$
 		ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
-		IArtifactRepository repository = factory.create(location, name, ExtensionLocationArtifactRepository.TYPE, properties);
+		factory.setAgent(agent);
+
+		// always compress repositories that we are creating.
+		Map<String, String> repositoryProperties = new HashMap<String, String>();
+		repositoryProperties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+		if (properties != null)
+			repositoryProperties.putAll(properties);
+		IArtifactRepository repository = factory.create(location, name, ExtensionLocationArtifactRepository.TYPE, repositoryProperties);
 		//we need to add the concrete repository to the repository manager, or its properties will not be correct
 		((ArtifactRepositoryManager) manager).addRepository(repository);
 		manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM, String.valueOf(true));
@@ -121,8 +136,7 @@ public class Activator implements BundleActivator {
 	 * @throws ProvisionException
 	 */
 	public static IArtifactRepository loadArtifactRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
-		BundleContext context = getContext();
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(context, IArtifactRepositoryManager.class.getName());
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException("ArtifactRepositoryManager not registered."); //$NON-NLS-1$
 		IArtifactRepository repository = manager.loadRepository(location, monitor);
@@ -134,7 +148,7 @@ public class Activator implements BundleActivator {
 	 * Return the set of metadata repositories known to this bundle. It is constructed from the repos
 	 * for the drop-ins as well as the ones in the configuration.
 	 */
-	public static Set getRepositories() {
+	public static Set<IMetadataRepository> getRepositories() {
 		return repositories;
 	}
 
@@ -142,8 +156,6 @@ public class Activator implements BundleActivator {
 	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
 	 */
 	public void start(BundleContext context) throws Exception {
-		packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
-		setPackageAdmin((PackageAdmin) context.getService(packageAdminRef));
 		bundleContext = context;
 
 		// check to see if there is really any work to do. Do this after setting the context, and
@@ -154,13 +166,6 @@ public class Activator implements BundleActivator {
 			return;
 		}
 
-		if (!startEarly("org.eclipse.equinox.p2.exemplarysetup")) //$NON-NLS-1$
-			return;
-		if (!startEarly("org.eclipse.equinox.simpleconfigurator.manipulator")) //$NON-NLS-1$
-			return;
-		if (!startEarly("org.eclipse.equinox.frameworkadmin.equinox")) //$NON-NLS-1$
-			return;
-
 		checkConfigIni();
 
 		// create the watcher for the "drop-ins" folder
@@ -225,9 +230,9 @@ public class Activator implements BundleActivator {
 			return false;
 
 		// gather the list of files/folders that we need to check
-		Collection files = getFilesToCheck();
-		for (Iterator iter = files.iterator(); iter.hasNext();) {
-			File file = (File) iter.next();
+		Collection<File> files = getFilesToCheck();
+		for (Iterator<File> iter = files.iterator(); iter.hasNext();) {
+			File file = iter.next();
 			String key = file.getAbsolutePath();
 			String timestamp = timestamps.getProperty(key);
 			if (timestamp == null)
@@ -271,11 +276,11 @@ public class Activator implements BundleActivator {
 	 * Return a collection of files which are interesting to us when we want to record timestamps
 	 * to figure out if something has changed and perhaps avoid an unnecessary reconcilation.
 	 */
-	private Collection getFilesToCheck() {
+	private Collection<File> getFilesToCheck() {
 		if (filesToCheck != null)
 			return filesToCheck;
 
-		Set result = new HashSet();
+		Set<File> result = new HashSet<File>();
 
 		// configuration/org.eclipse.update/platform.xml, configuration/../plugins, configuration/../features
 		File configuration = getConfigurationLocation();
@@ -319,8 +324,8 @@ public class Activator implements BundleActivator {
 	 * Iterate over the given collection of files (could be dropins or links folders) and 
 	 * return a collection of files that might be interesting to check the timestamps of.
 	 */
-	private Collection getDropinsToCheck(File[] files) {
-		Collection result = new HashSet();
+	private Collection<File> getDropinsToCheck(File[] files) {
+		Collection<File> result = new HashSet<File>();
 		for (int outer = 0; outer < files.length; outer++) {
 			// add top-level file/folder
 			result.add(files[outer]);
@@ -377,9 +382,9 @@ public class Activator implements BundleActivator {
 	 */
 	private void writeTimestamps() {
 		Properties timestamps = new Properties();
-		Collection files = getFilesToCheck();
-		for (Iterator iter = files.iterator(); iter.hasNext();) {
-			File file = (File) iter.next();
+		Collection<File> files = getFilesToCheck();
+		for (Iterator<File> iter = files.iterator(); iter.hasNext();) {
+			File file = iter.next();
 			timestamps.put(file.getAbsolutePath(), Long.toString(file.lastModified()));
 		}
 
@@ -402,14 +407,6 @@ public class Activator implements BundleActivator {
 		}
 	}
 
-	private boolean startEarly(String bundleName) throws BundleException {
-		Bundle bundle = getBundle(bundleName);
-		if (bundle == null)
-			return false;
-		bundle.start(Bundle.START_TRANSIENT);
-		return true;
-	}
-
 	/*
 	 * Synchronize the profile.
 	 */
@@ -418,7 +415,7 @@ public class Activator implements BundleActivator {
 		if (profile == null)
 			return;
 		// create the profile synchronizer on all available repositories
-		ProfileSynchronizer synchronizer = new ProfileSynchronizer(profile, repositories);
+		ProfileSynchronizer synchronizer = new ProfileSynchronizer(getAgent(), profile, repositories);
 		IStatus result = synchronizer.synchronize(monitor);
 		if (ProfileSynchronizer.isReconciliationApplicationRunning()) {
 			System.getProperties().put(PROP_APPLICATION_STATUS, result);
@@ -477,7 +474,7 @@ public class Activator implements BundleActivator {
 	 * Create a new directory watcher with a repository listener on the drop-ins folder. 
 	 */
 	private void watchDropins() {
-		List directories = new ArrayList();
+		List<File> directories = new ArrayList<File>();
 		File[] dropinsDirectories = getDropinsDirectories();
 		directories.addAll(Arrays.asList(dropinsDirectories));
 		File[] linksDirectories = getLinksDirectories();
@@ -485,8 +482,12 @@ public class Activator implements BundleActivator {
 		if (directories.isEmpty())
 			return;
 
-		DropinsRepositoryListener listener = new DropinsRepositoryListener(DROPINS);
-		DirectoryWatcher watcher = new DirectoryWatcher((File[]) directories.toArray(new File[directories.size()]));
+		// we will compress the repositories and mark them hidden as "system" repos.
+		Map<String, String> properties = new HashMap<String, String>();
+		properties.put(IRepository.PROP_COMPRESSED, Boolean.TRUE.toString());
+		properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
+		DropinsRepositoryListener listener = new DropinsRepositoryListener(getAgent(), DROPINS, properties);
+		DirectoryWatcher watcher = new DirectoryWatcher(directories.toArray(new File[directories.size()]));
 		watcher.addListener(listener);
 		watcher.poll();
 		repositories.addAll(listener.getMetadataRepositories());
@@ -496,13 +497,7 @@ public class Activator implements BundleActivator {
 	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
 	 */
 	public void stop(BundleContext context) throws Exception {
-		for (Iterator iter = watchers.iterator(); iter.hasNext();) {
-			DirectoryWatcher watcher = (DirectoryWatcher) iter.next();
-			watcher.stop();
-		}
 		bundleContext = null;
-		setPackageAdmin(null);
-		context.ungetService(packageAdminRef);
 	}
 
 	/*
@@ -576,7 +571,7 @@ public class Activator implements BundleActivator {
 	 * more than one to be returned here if we are running in shared mode.
 	 */
 	private static File[] getLinksDirectories() {
-		List linksDirectories = new ArrayList();
+		List<File> linksDirectories = new ArrayList<File>();
 		File root = getEclipseHome();
 		if (root != null)
 			linksDirectories.add(new File(root, LINKS));
@@ -589,7 +584,7 @@ public class Activator implements BundleActivator {
 			if (configuration != null && configuration.getParentFile() != null)
 				linksDirectories.add(new File(configuration.getParentFile(), LINKS));
 		}
-		return (File[]) linksDirectories.toArray(new File[linksDirectories.size()]);
+		return linksDirectories.toArray(new File[linksDirectories.size()]);
 	}
 
 	/*
@@ -599,11 +594,14 @@ public class Activator implements BundleActivator {
 	 * local dropins directory.
 	 */
 	private static File[] getDropinsDirectories() {
-		List dropinsDirectories = new ArrayList();
+		List<File> dropinsDirectories = new ArrayList<File>();
 		// did the user specify one via System properties?
 		String watchedDirectoryProperty = bundleContext.getProperty(DROPINS_DIRECTORY);
-		if (watchedDirectoryProperty != null)
+		if (watchedDirectoryProperty != null) {
+			// perform a variable substitution if necessary
+			watchedDirectoryProperty = substituteVariables(watchedDirectoryProperty);
 			dropinsDirectories.add(new File(watchedDirectoryProperty));
+		}
 
 		// always add the one in the Eclipse home directory
 		File root = getEclipseHome();
@@ -618,54 +616,43 @@ public class Activator implements BundleActivator {
 			if (configuration != null && configuration.getParentFile() != null)
 				dropinsDirectories.add(new File(configuration.getParentFile(), DROPINS));
 		}
-		return (File[]) dropinsDirectories.toArray(new File[dropinsDirectories.size()]);
+		return dropinsDirectories.toArray(new File[dropinsDirectories.size()]);
 	}
 
 	/*
 	 * Return the current profile or null if it cannot be retrieved.
 	 */
 	public static IProfile getCurrentProfile(BundleContext context) {
-		ServiceReference reference = context.getServiceReference(IProfileRegistry.class.getName());
-		if (reference == null)
+		IProvisioningAgent agent = getAgent();
+		IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (profileRegistry == null)
 			return null;
-		IProfileRegistry profileRegistry = (IProfileRegistry) context.getService(reference);
-		try {
-			return profileRegistry.getProfile(IProfileRegistry.SELF);
-		} finally {
-			context.ungetService(reference);
-		}
-	}
-
-	private static synchronized void setPackageAdmin(PackageAdmin service) {
-		packageAdmin = service;
+		return profileRegistry.getProfile(IProfileRegistry.SELF);
 	}
 
 	/*
-	 * Return the bundle with the given symbolic name, or null if it cannot be found.
-	 */
-	static synchronized Bundle getBundle(String symbolicName) {
-		if (packageAdmin == null)
-			return null;
-		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
-			return null;
-		//Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
-				return bundles[i];
-			}
-		}
-		return null;
-	}
-
-	// TODO Fix this up to get the services in a better way
-	public static IArtifactRepositoryManager getArtifactRepositoryManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(bundleContext, IArtifactRepositoryManager.class.getName());
+	  * Perform variable substitution on the given string. Replace vars in the form %foo%
+	  * with the equivalent property set in the System properties.
+	  */
+	public static String substituteVariables(String path) {
+		if (path == null)
+			return path;
+		int beginIndex = path.indexOf('%');
+		// no variable
+		if (beginIndex == -1)
+			return path;
+		beginIndex++;
+		int endIndex = path.indexOf('%', beginIndex);
+		// no matching end % to indicate variable
+		if (endIndex == -1)
+			return path;
+		// get the variable name and do a lookup
+		String var = path.substring(beginIndex, endIndex);
+		if (var.length() == 0 || var.indexOf(File.pathSeparatorChar) != -1)
+			return path;
+		var = getContext().getProperty(var);
+		if (var == null)
+			return path;
+		return path.substring(0, beginIndex - 1) + var + path.substring(endIndex + 1);
 	}
-
-	// TODO Fix this up to get the services in a better way
-	public static IMetadataRepositoryManager getMetadataRepositoryManager() {
-		return (IMetadataRepositoryManager) ServiceHelper.getService(bundleContext, IMetadataRepositoryManager.class.getName());
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
index 1d84ec2..a6f63d2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/DropinsRepositoryListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,22 +15,27 @@ import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
 import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepository;
 import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepository;
 import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
 
 public class DropinsRepositoryListener extends RepositoryListener {
+	private static final String PREFIX = "[reconciler] [dropins] "; //$NON-NLS-1$
 	private static final String PLUGINS = "plugins"; //$NON-NLS-1$
 	private static final String FEATURES = "features"; //$NON-NLS-1$
 	private static final String JAR = ".jar"; //$NON-NLS-1$
@@ -40,11 +45,13 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	private static final String DROPIN_ARTIFACT_REPOSITORIES = "dropin.artifactRepositories"; //$NON-NLS-1$
 	private static final String DROPIN_METADATA_REPOSITORIES = "dropin.metadataRepositories"; //$NON-NLS-1$
 	private static final String PIPE = "|"; //$NON-NLS-1$
-	private List metadataRepositories = new ArrayList();
-	private List artifactRepositories = new ArrayList();
+	private final IProvisioningAgent agent;
+	private List<IMetadataRepository> metadataRepositories = new ArrayList<IMetadataRepository>();
+	private List<IArtifactRepository> artifactRepositories = new ArrayList<IArtifactRepository>();
 
-	public DropinsRepositoryListener(String repositoryName) {
-		super(repositoryName, true);
+	public DropinsRepositoryListener(IProvisioningAgent agent, String repositoryName, Map<String, String> properties) {
+		super(repositoryName, properties);
+		this.agent = agent;
 	}
 
 	public boolean isInterested(File file) {
@@ -52,22 +59,28 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	}
 
 	public boolean added(File file) {
-		if (super.added(file))
+		if (super.added(file)) {
+			if (Tracing.DEBUG_RECONCILER)
+				Tracing.debug(PREFIX + "Interesting feature or bundle added: " + file); //$NON-NLS-1$
 			return true;
+		}
 		addRepository(file);
 		return true;
 	}
 
 	public boolean changed(File file) {
-		if (super.changed(file))
+		if (super.changed(file)) {
+			if (Tracing.DEBUG_RECONCILER)
+				Tracing.debug(PREFIX + "Interesting feature or bundle changed: " + file); //$NON-NLS-1$			
 			return true;
+		}
 		addRepository(file);
 		return true;
 	}
 
 	private void addRepository(File file) {
 		URI repoLocation = createRepositoryLocation(file);
-		Properties properties = new Properties();
+		Map<String, String> properties = new HashMap<String, String>();
 		// if the file pointed to a link file, keep track of the attribute
 		// so we can add it to the repo later
 		if (file.isFile() && file.getName().endsWith(LINK)) {
@@ -111,6 +124,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
 		} else {
 			path = path.trim();
 		}
+		path = Activator.substituteVariables(path);
 		File linkedFile = new File(path);
 		if (!linkedFile.isAbsolute()) {
 			// link support is relative to the install root
@@ -174,7 +188,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
 		return repo.toURI();
 	}
 
-	public void getMetadataRepository(URI repoURL, Properties properties) {
+	public void getMetadataRepository(URI repoURL, Map<String, String> properties) {
 		try {
 			IMetadataRepository repository = null;
 			try {
@@ -184,12 +198,23 @@ public class DropinsRepositoryListener extends RepositoryListener {
 				repository = Activator.loadMetadataRepository(repoURL, null);
 			}
 			metadataRepositories.add(repository);
+			debugRepository(repository);
 		} catch (ProvisionException ex) {
 			LogHelper.log(ex);
 		}
 	}
 
-	public void getArtifactRepository(URI repoURL, Properties properties) {
+	private void debugRepository(IMetadataRepository repository) {
+		if (!Tracing.DEBUG_RECONCILER)
+			return;
+		Tracing.debug(PREFIX + "Repository created " + repository.getLocation()); //$NON-NLS-1$
+		// Print out a list of all the IUs in the repository
+		IQueryResult<IInstallableUnit> result = repository.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor());
+		for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();)
+			Tracing.debug(PREFIX + "\t" + iter.next()); //$NON-NLS-1$
+	}
+
+	public void getArtifactRepository(URI repoURL, Map<String, String> properties) {
 		try {
 			IArtifactRepository repository = null;
 			try {
@@ -212,14 +237,14 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	}
 
 	private void synchronizeDropinMetadataRepositories() {
-		List currentRepositories = new ArrayList();
-		for (Iterator it = metadataRepositories.iterator(); it.hasNext();) {
-			IMetadataRepository repository = (IMetadataRepository) it.next();
+		List<String> currentRepositories = new ArrayList<String>();
+		for (Iterator<IMetadataRepository> it = metadataRepositories.iterator(); it.hasNext();) {
+			IMetadataRepository repository = it.next();
 			currentRepositories.add(repository.getLocation().toString());
 		}
-		List previousRepositories = getListRepositoryProperty(getMetadataRepository(), DROPIN_METADATA_REPOSITORIES);
-		for (Iterator iterator = previousRepositories.iterator(); iterator.hasNext();) {
-			String repository = (String) iterator.next();
+		List<String> previousRepositories = getListRepositoryProperty(getMetadataRepository(), DROPIN_METADATA_REPOSITORIES);
+		for (Iterator<String> iterator = previousRepositories.iterator(); iterator.hasNext();) {
+			String repository = iterator.next();
 			if (!currentRepositories.contains(repository))
 				removeMetadataRepository(repository);
 		}
@@ -227,7 +252,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	}
 
 	private void removeMetadataRepository(String urlString) {
-		IMetadataRepositoryManager manager = Activator.getMetadataRepositoryManager();
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException(Messages.metadata_repo_manager_not_registered);
 		try {
@@ -238,14 +263,14 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	}
 
 	private void synchronizeDropinArtifactRepositories() {
-		List currentRepositories = new ArrayList();
-		for (Iterator it = artifactRepositories.iterator(); it.hasNext();) {
-			IArtifactRepository repository = (IArtifactRepository) it.next();
+		List<String> currentRepositories = new ArrayList<String>();
+		for (Iterator<IArtifactRepository> it = artifactRepositories.iterator(); it.hasNext();) {
+			IArtifactRepository repository = it.next();
 			currentRepositories.add(repository.getLocation().toString());
 		}
-		List previousRepositories = getListRepositoryProperty(getArtifactRepository(), DROPIN_ARTIFACT_REPOSITORIES);
-		for (Iterator iterator = previousRepositories.iterator(); iterator.hasNext();) {
-			String repository = (String) iterator.next();
+		List<String> previousRepositories = getListRepositoryProperty(getArtifactRepository(), DROPIN_ARTIFACT_REPOSITORIES);
+		for (Iterator<String> iterator = previousRepositories.iterator(); iterator.hasNext();) {
+			String repository = iterator.next();
 			if (!currentRepositories.contains(repository))
 				removeArtifactRepository(repository);
 		}
@@ -253,7 +278,7 @@ public class DropinsRepositoryListener extends RepositoryListener {
 	}
 
 	public void removeArtifactRepository(String urlString) {
-		IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new IllegalStateException(Messages.artifact_repo_manager_not_registered);
 		try {
@@ -263,9 +288,9 @@ public class DropinsRepositoryListener extends RepositoryListener {
 		}
 	}
 
-	private List getListRepositoryProperty(IRepository repository, String key) {
-		List listProperty = new ArrayList();
-		String dropinRepositories = (String) repository.getProperties().get(key);
+	private List<String> getListRepositoryProperty(IRepository<?> repository, String key) {
+		List<String> listProperty = new ArrayList<String>();
+		String dropinRepositories = repository.getProperties().get(key);
 		if (dropinRepositories != null) {
 			StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
 			while (tokenizer.hasMoreTokens()) {
@@ -275,10 +300,10 @@ public class DropinsRepositoryListener extends RepositoryListener {
 		return listProperty;
 	}
 
-	private void setListRepositoryProperty(IRepository repository, String key, List listProperty) {
+	private void setListRepositoryProperty(IRepository<?> repository, String key, List<String> listProperty) {
 		StringBuffer buffer = new StringBuffer();
-		for (Iterator it = listProperty.iterator(); it.hasNext();) {
-			String repositoryString = (String) it.next();
+		for (Iterator<String> it = listProperty.iterator(); it.hasNext();) {
+			String repositoryString = it.next();
 			buffer.append(repositoryString);
 			if (it.hasNext())
 				buffer.append(PIPE);
@@ -287,8 +312,8 @@ public class DropinsRepositoryListener extends RepositoryListener {
 		repository.setProperty(key, value);
 	}
 
-	public Collection getMetadataRepositories() {
-		List result = new ArrayList(metadataRepositories);
+	public Collection<IMetadataRepository> getMetadataRepositories() {
+		List<IMetadataRepository> result = new ArrayList<IMetadataRepository>(metadataRepositories);
 		result.add(getMetadataRepository());
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java
index 79296ff..4d3cde8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc. - Ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.reconciler.dropins;
 
@@ -23,6 +24,8 @@ public class Messages extends NLS {
 	public static String metadata_repo_manager_not_registered;
 	public static String error_reading_link;
 	public static String error_resolving_link;
+	public static String remove_root;
+	public static String remove_all_roots;
 
 	static {
 		// initialize resource bundle
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
index 913f7f8..15eab62 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/PlatformXmlListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,14 +14,16 @@ import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.extensionlocation.*;
 import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -38,7 +40,7 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 	private boolean changed = false;
 	private File root;
 	private long lastModified = -1l;
-	private Set configRepositories;
+	private Set<IMetadataRepository> configRepositories;
 
 	private String toString(Feature[] features, String[] list) {
 		StringBuffer buffer = new StringBuffer();
@@ -127,7 +129,7 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 		if (changed) {
 			lastModified = root.lastModified();
 			try {
-				Configuration configuration = ConfigurationParser.parse(root, Activator.getOSGiInstallArea());
+				Configuration configuration = Configuration.load(root, Activator.getOSGiInstallArea());
 				synchronizeConfiguration(configuration);
 			} catch (ProvisionException e) {
 				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, Messages.errorProcessingConfg, e));
@@ -136,9 +138,9 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 		changed = false;
 	}
 
-	public Collection getMetadataRepositories() {
+	public Collection<IMetadataRepository> getMetadataRepositories() {
 		if (configRepositories == null)
-			return Collections.EMPTY_SET;
+			return CollectionUtils.emptySet();
 		return configRepositories;
 	}
 
@@ -147,20 +149,22 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 	 * currently associated with the given url string. Return null if one could not
 	 * be found.
 	 */
-	private IMetadataRepository getMatchingRepo(Collection repositoryList, String urlString) {
+	private IMetadataRepository getMatchingRepo(Collection<IMetadataRepository> repositoryList, String urlString) {
 		if (repositoryList == null)
 			return null;
 		IPath urlPath = new Path(urlString).makeAbsolute();
-		for (Iterator iter = repositoryList.iterator(); iter.hasNext();) {
-			IMetadataRepository repo = (IMetadataRepository) iter.next();
-			Path repoPath = new Path(URIUtil.toFile(repo.getLocation()).getAbsolutePath());
+		for (IMetadataRepository repo : repositoryList) {
+			File file = URIUtil.toFile(repo.getLocation());
+			if (file == null)
+				continue;
+			Path repoPath = new Path(file.getAbsolutePath());
 			if (repoPath.makeAbsolute().equals(urlPath))
 				return repo;
 			// normalize the URLs to be the same
 			if (repo instanceof ExtensionLocationMetadataRepository) {
 				try {
 					File one = ExtensionLocationMetadataRepository.getBaseDirectory(repo.getLocation());
-					File two = ExtensionLocationMetadataRepository.getBaseDirectory(URIUtil.fromString(urlString));
+					File two = ExtensionLocationMetadataRepository.getBaseDirectory(new URI(urlString));
 					if (one.equals(two))
 						return repo;
 				} catch (ProvisionException e) {
@@ -179,11 +183,10 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 	 * Ensure that we have a repository for each site in the given configuration.
 	 */
 	protected void synchronizeConfiguration(Configuration config) {
-		List sites = config.getSites();
-		Set newRepos = new LinkedHashSet();
-		Set toBeRemoved = new HashSet();
-		for (Iterator iter = sites.iterator(); iter.hasNext();) {
-			Site site = (Site) iter.next();
+		List<Site> sites = config.getSites();
+		Set<IMetadataRepository> newRepos = new LinkedHashSet<IMetadataRepository>();
+		Set<Site> toBeRemoved = new HashSet<Site>();
+		for (Site site : sites) {
 			String siteURL = site.getUrl();
 			IMetadataRepository match = getMatchingRepo(Activator.getRepositories(), siteURL);
 			if (match == null) {
@@ -201,8 +204,10 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 						continue;
 					}
 					String eclipseExtensionURL = siteURL + Constants.EXTENSION_LOCATION;
-					URI location = URIUtil.fromString(eclipseExtensionURL);
-					Map properties = new HashMap();
+					// use the URI constructor here and not URIUtil#fromString because 
+					// our string is already encoded
+					URI location = new URI(eclipseExtensionURL);
+					Map<String, String> properties = new HashMap<String, String>();
 					properties.put(SiteListener.SITE_POLICY, site.getPolicy());
 
 					// In a "USER-INCLUDE" we add the site's features to the list
@@ -223,7 +228,9 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 						} catch (ProvisionException inner) {
 							// handle the case where someone has removed the extension location from
 							// disk. Note: we use the siteURL not the eclipseextensionURL
-							URI fileURI = URIUtil.fromString(siteURL);
+							// use the URI constructor here and not URIUtil#fromString because 
+							// our string is already encoded
+							URI fileURI = new URI(siteURL);
 							File file = URIUtil.toFile(fileURI);
 							if (file != null && !file.exists()) {
 								toBeRemoved.add(site);
@@ -232,10 +239,8 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 							throw inner;
 						}
 						// set the repository properties here in case they have changed since the last time we loaded
-						for (Iterator inner = properties.keySet().iterator(); inner.hasNext();) {
-							String key = (String) inner.next();
-							String value = (String) properties.get(key);
-							metadataRepository.setProperty(key, value);
+						for (Entry<String, String> entry : properties.entrySet()) {
+							metadataRepository.setProperty(entry.getKey(), entry.getValue());
 						}
 					}
 					newRepos.add(metadataRepository);
@@ -246,9 +251,9 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 					} catch (ProvisionException ex) {
 						IArtifactRepository artifactRepository = Activator.loadArtifactRepository(location, null);
 						// set the repository properties here in case they have changed since the last time we loaded
-						for (Iterator inner = properties.keySet().iterator(); inner.hasNext();) {
-							String key = (String) inner.next();
-							String value = (String) properties.get(key);
+						for (Iterator<String> inner = properties.keySet().iterator(); inner.hasNext();) {
+							String key = inner.next();
+							String value = properties.get(key);
 							artifactRepository.setProperty(key, value);
 						}
 					}
@@ -264,8 +269,8 @@ public class PlatformXmlListener extends DirectoryChangeListener {
 			}
 		}
 		if (!toBeRemoved.isEmpty()) {
-			for (Iterator iter = toBeRemoved.iterator(); iter.hasNext();)
-				config.removeSite((Site) iter.next());
+			for (Iterator<Site> iter = toBeRemoved.iterator(); iter.hasNext();)
+				config.removeSite(iter.next());
 			try {
 				config.save(root, Activator.getOSGiInstallArea());
 			} catch (ProvisionException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index d67c22f..bfdc05e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -1,11 +1,12 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  * 
  * Contributors: 
- * IBM Corporation - initial implementation and ideas 
+ * IBM Corporation - initial implementation and ideas
+ *     Sonatype, Inc. - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.reconciler.dropins;
 
@@ -15,21 +16,25 @@ import java.net.URISyntaxException;
 import java.util.*;
 import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.internal.p2.core.helpers.*;
 import org.eclipse.equinox.internal.p2.extensionlocation.Constants;
 import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
+import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
@@ -42,29 +47,54 @@ public class ProfileSynchronizer {
 	private static final String PROFILE_TIMESTAMP = "PROFILE"; //$NON-NLS-1$
 	private static final String NO_TIMESTAMP = "-1"; //$NON-NLS-1$
 	private static final String PROP_FROM_DROPINS = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
+	private static final String INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$
+	private static final String INCLUSION_OPTIONAL = "OPTIONAL"; //$NON-NLS-1$
+	private static final String INCLUSION_STRICT = "STRICT"; //$NON-NLS-1$
 
 	private static final String CACHE_EXTENSIONS = "org.eclipse.equinox.p2.cache.extensions"; //$NON-NLS-1$
 	private static final String PIPE = "|"; //$NON-NLS-1$
 	private static final String EXPLANATION = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$
 	final IProfile profile;
 
-	final Map repositoryMap;
-	private Properties timestamps;
+	final Map<String, IMetadataRepository> repositoryMap;
+	private Map<String, String> timestamps;
+	private final IProvisioningAgent agent;
+
+	/*
+	 * Specialized profile change request so we can keep track of IUs which have moved
+	 * locations on disk.
+	 */
+	static class ReconcilerProfileChangeRequest extends ProfileChangeRequest {
+		List<IInstallableUnit> toMove = new ArrayList<IInstallableUnit>();
+
+		public ReconcilerProfileChangeRequest(IProfile profile) {
+			super(profile);
+		}
+
+		void moveAll(Collection<IInstallableUnit> list) {
+			toMove.addAll(list);
+		}
+
+		Collection<IInstallableUnit> getMoves() {
+			return toMove;
+		}
+	}
 
 	/*
 	 * Constructor for the class.
 	 */
-	public ProfileSynchronizer(IProfile profile, Collection repositories) {
+	public ProfileSynchronizer(IProvisioningAgent agent, IProfile profile, Collection<IMetadataRepository> repositories) {
+		this.agent = agent;
 		this.profile = profile;
-		this.repositoryMap = new HashMap();
-		for (Iterator it = repositories.iterator(); it.hasNext();) {
-			IMetadataRepository repository = (IMetadataRepository) it.next();
+		this.repositoryMap = new HashMap<String, IMetadataRepository>();
+		for (IMetadataRepository repository : repositories) {
 			repositoryMap.put(repository.getLocation().toString(), repository);
 		}
 	}
 
 	/*
 	 * Synchronize the profile with the list of metadata repositories.
+	 * TODO fix progress monitoring (although in practice the user doesn't see it or have a chance to cancel)
 	 */
 	public IStatus synchronize(IProgressMonitor monitor) {
 		readTimestamps();
@@ -72,75 +102,172 @@ public class ProfileSynchronizer {
 			return Status.OK_STATUS;
 
 		ProvisioningContext context = getContext();
-		context.setProperty(EXPLANATION, Boolean.FALSE.toString());
+		context.setProperty(EXPLANATION, new Boolean(Tracing.DEBUG_RECONCILER).toString());
 
-		ProfileChangeRequest request = createProfileChangeRequest(context);
 		String updatedCacheExtensions = synchronizeCacheExtensions();
+
+		// figure out if we really have anything to install/uninstall.
+		ReconcilerProfileChangeRequest request = createProfileChangeRequest(context);
 		if (request == null) {
-			if (updatedCacheExtensions != null) {
-				Operand operand = new PropertyOperand(CACHE_EXTENSIONS, null, updatedCacheExtensions);
-				IStatus engineResult = executeOperands(new Operand[] {operand}, context, null);
-				if (engineResult.getSeverity() != IStatus.ERROR && engineResult.getSeverity() != IStatus.CANCEL)
-					writeTimestamps();
-				return engineResult;
-			}
-			return Status.OK_STATUS;
+			if (updatedCacheExtensions == null)
+				return Status.OK_STATUS;
+			IStatus engineResult = setProperty(CACHE_EXTENSIONS, updatedCacheExtensions, context, null);
+			if (engineResult.getSeverity() != IStatus.ERROR && engineResult.getSeverity() != IStatus.CANCEL)
+				writeTimestamps();
+			return engineResult;
 		}
 		if (updatedCacheExtensions != null)
 			request.setProfileProperty(CACHE_EXTENSIONS, updatedCacheExtensions);
 
-		SubMonitor sub = SubMonitor.convert(monitor, 100);
-		try {
-			//create the provisioning plan
-			ProvisioningPlan plan = createProvisioningPlan(request, context, sub.newChild(50));
-			IStatus status = plan.getStatus();
-			if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.CANCEL)
-				return status;
-
-			Operand[] operands = plan.getOperands();
-			if (operands.length == 0 || containsOnlyInstallableUnitPropertyOperandAdditions(operands)) {
-				writeTimestamps();
-				return status;
-			}
+		// if some of the IUs move locations then construct a special plan and execute that first
+		IStatus moveResult = performRemoveForMovedIUs(request, context, monitor);
+		if (moveResult.getSeverity() == IStatus.ERROR || moveResult.getSeverity() == IStatus.CANCEL)
+			return moveResult;
 
-			//invoke the engine to perform installs/uninstalls
-			IStatus engineResult = executePlan(plan, context, sub.newChild(50));
-			if (engineResult.getSeverity() == IStatus.ERROR || engineResult.getSeverity() == IStatus.CANCEL)
-				return engineResult;
+		// now create a plan for the rest of the work and execute it
+		IStatus addRemoveResult = performAddRemove(request, context, monitor);
+		if (addRemoveResult.getSeverity() == IStatus.ERROR || addRemoveResult.getSeverity() == IStatus.CANCEL)
+			return addRemoveResult;
 
-			writeTimestamps();
+		// write out the new timestamps (for caching) and apply the configuration
+		writeTimestamps();
+		return applyConfiguration(false);
+	}
 
-			return applyConfiguration(false);
-		} finally {
-			sub.done();
+	/*
+	 * Return a list of the roots in the profile.
+	 */
+	private IQueryResult<IInstallableUnit> getStrictRoots() {
+		return profile.query(new IUProfilePropertyQuery(INCLUSION_RULES, INCLUSION_STRICT), null);
+	}
+
+	/*
+	 * Convert the profile change request into operands and have the engine execute them. There
+	 * is fancy logic here in case we are trying to remove IUs which are depended on by something
+	 * which is installed via the UI. Since the bundle has been removed from the file-system it is a forced
+	 * removal so we have to uninstall the UI-installed IU.
+	 */
+	private IStatus performAddRemove(ReconcilerProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
+		// if we have moves then we have previously removed them. 
+		// now we need to add them back (at the new location)
+		for (IInstallableUnit iu : request.getMoves()) {
+			request.add(iu);
+			request.setInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS, Boolean.TRUE.toString());
+			request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
+			request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.toString(IProfile.LOCK_UNINSTALL));
 		}
+
+		Collection<IInstallableUnit> additions = request.getAdditions();
+		Collection<IInstallableUnit> removals = request.getRemovals();
+		// see if there is any work to do
+		if (additions.isEmpty() && removals.isEmpty())
+			return Status.OK_STATUS;
+
+		// TODO See bug 270195. Eventually we will attempt to remove strictly installed IUs if their 
+		// dependent bundles have been deleted.
+		boolean removeStrictRoots = false;
+		if (removeStrictRoots)
+			return performStrictRootRemoval(request, context, monitor);
+		IProvisioningPlan plan = createProvisioningPlan(request, context, monitor);
+		debug(request, plan);
+		return executePlan(plan, context, monitor);
 	}
 
-	// This is a special case that occurs where all IUs being installed are not compatible with the profile so
-	// the operands will have no affect if executed on the profile.
-	private boolean containsOnlyInstallableUnitPropertyOperandAdditions(Operand[] operands) {
-		for (int i = 0; i < operands.length; i++) {
-			if (!(operands[i] instanceof InstallableUnitPropertyOperand))
-				return false;
+	// TODO re-enable after resolving bug 270195.
+	private IStatus performStrictRootRemoval(ReconcilerProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
+		Collection<IInstallableUnit> removals = request.getRemovals();
+		// if we don't have any removals then we don't have to worry about potentially
+		// invalidating things we already have installed, removal of roots, etc so just 
+		// create a regular plan.
+		IProvisioningPlan plan = null;
+		if (removals.isEmpty()) {
+			plan = createProvisioningPlan(request, context, monitor);
+			debug(request, plan);
+		} else {
+			// We are now creating a backup of the original request that will be used to create the final plan (where no optional magic is used)
+			ProfileChangeRequest finalRequest = (ProfileChangeRequest) request.clone();
+
+			// otherwise collect the roots, pretend they are optional, and see
+			// if the resulting plan affects them
+			Set<IInstallableUnit> strictRoots = getStrictRoots().toUnmodifiableSet();
+			Collection<IRequirement> forceNegation = new ArrayList<IRequirement>(removals.size());
+			for (IInstallableUnit iu : removals)
+				forceNegation.add(createNegation(iu));
+			request.addExtraRequirements(forceNegation);
+
+			// set all the profile roots to be optional to see how they would be effected by the plan
+			for (IInstallableUnit iu : strictRoots)
+				request.setInstallableUnitProfileProperty(iu, INCLUSION_RULES, INCLUSION_OPTIONAL);
+
+			// get the tentative plan back from the planner
+			plan = createProvisioningPlan(request, context, monitor);
+			debug(request, plan);
+			if (!plan.getStatus().isOK())
+				return plan.getStatus();
+
+			// Analyze the plan to see if any of the strict roots are being uninstalled.
+			int removedRoots = 0;
+			for (IInstallableUnit initialRoot : strictRoots) {
+				// if the root wasn't uninstalled, then continue
+				if (plan.getRemovals().query(QueryUtil.createIUQuery(initialRoot), null).isEmpty())
+					continue;
+				// otherwise add its removal to the change request, along with a negation and 
+				// change of strict to optional for their inclusion rule.
+				finalRequest.remove(initialRoot);
+				finalRequest.setInstallableUnitProfileProperty(initialRoot, INCLUSION_RULES, INCLUSION_OPTIONAL);
+				IRequirement negation = createNegation(initialRoot);
+				Collection<IRequirement> extra = new ArrayList<IRequirement>();
+				extra.add(negation);
+				request.addExtraRequirements(extra);
+				LogHelper.log(new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.remove_root, initialRoot.getId(), initialRoot.getVersion())));
+				removedRoots++;
+			}
 
-			InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) operands[i];
-			//check if this is a removal or update
-			if (iuPropertyOperand.first() != null)
-				return false;
+			// Check for the case where all the strict roots are being removed.
+			if (removedRoots == strictRoots.size())
+				return new Status(IStatus.ERROR, Activator.ID, Messages.remove_all_roots);
+			plan = createProvisioningPlan(finalRequest, context, monitor);
+			if (!plan.getStatus().isOK()) {
+				System.out.println("original request"); //$NON-NLS-1$
+				System.out.println(request);
+				System.out.println("final request"); //$NON-NLS-1$
+				System.out.println(finalRequest);
+				throw new IllegalStateException("The second plan is not resolvable."); //$NON-NLS-1$
+			}
 		}
-		return true;
+
+		// execute the plan and return the status
+		return executePlan(plan, context, monitor);
+	}
+
+	/*
+	 * If the request contains IUs to be moved then create and execute a plan which 
+	 * removes them. Otherwise just return.
+	 */
+	private IStatus performRemoveForMovedIUs(ReconcilerProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
+		Collection<IInstallableUnit> moves = request.getMoves();
+		if (moves.isEmpty())
+			return Status.OK_STATUS;
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		IProvisioningPlan plan = engine.createPlan(profile, context);
+		for (IInstallableUnit unit : moves)
+			plan.removeInstallableUnit(unit);
+		return executePlan(plan, context, monitor);
 	}
 
+	/*
+	 * Write out the timestamps of various repositories and folders/file to help 
+	 * us cache and detect cases where we don't have to perform a reconciliation.
+	 */
 	private void writeTimestamps() {
 		timestamps.clear();
 		timestamps.put(PROFILE_TIMESTAMP, Long.toString(profile.getTimestamp()));
-		for (Iterator it = repositoryMap.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			IMetadataRepository repository = (IMetadataRepository) entry.getValue();
-			Map props = repository.getProperties();
+		for (Entry<String, IMetadataRepository> entry : repositoryMap.entrySet()) {
+			IMetadataRepository repository = entry.getValue();
+			Map<String, String> props = repository.getProperties();
 			String timestamp = null;
 			if (props != null)
-				timestamp = (String) props.get(IRepository.PROP_TIMESTAMP);
+				timestamp = props.get(IRepository.PROP_TIMESTAMP);
 
 			if (timestamp == null)
 				timestamp = NO_TIMESTAMP;
@@ -152,7 +279,7 @@ public class ProfileSynchronizer {
 			File file = Activator.getContext().getDataFile(TIMESTAMPS_FILE_PREFIX + profile.getProfileId().hashCode());
 			OutputStream os = new BufferedOutputStream(new FileOutputStream(file));
 			try {
-				timestamps.store(os, "Timestamps for " + profile.getProfileId()); //$NON-NLS-1$
+				CollectionUtils.storeProperties(timestamps, os, "Timestamps for " + profile.getProfileId()); //$NON-NLS-1$
 			} finally {
 				if (os != null)
 					os.close();
@@ -164,31 +291,34 @@ public class ProfileSynchronizer {
 		}
 	}
 
+	/*
+	 * Check timestamps and return true if the profile is considered to be up-to-date or
+	 * false if we should perform a reconciliation.
+	 */
 	private boolean isUpToDate() {
 		// the user might want to force a reconciliation
 		if ("true".equals(Activator.getContext().getProperty("osgi.checkConfiguration"))) //$NON-NLS-1$//$NON-NLS-2$
 			return false;
 
-		String lastKnownProfileTimeStamp = (String) timestamps.remove(PROFILE_TIMESTAMP);
+		String lastKnownProfileTimeStamp = timestamps.remove(PROFILE_TIMESTAMP);
 		if (lastKnownProfileTimeStamp == null)
 			return false;
 		if (!lastKnownProfileTimeStamp.equals(Long.toString(profile.getTimestamp())))
 			return false;
 
 		//When we get here the timestamps map only contains information related to repos
-		for (Iterator it = repositoryMap.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			IMetadataRepository repository = (IMetadataRepository) entry.getValue();
+		for (Entry<String, IMetadataRepository> entry : repositoryMap.entrySet()) {
+			IMetadataRepository repository = entry.getValue();
 
-			Map props = repository.getProperties();
+			Map<String, String> props = repository.getProperties();
 			String currentTimestamp = null;
 			if (props != null)
-				currentTimestamp = (String) props.get(IRepository.PROP_TIMESTAMP);
+				currentTimestamp = props.get(IRepository.PROP_TIMESTAMP);
 
 			if (currentTimestamp == null)
 				currentTimestamp = NO_TIMESTAMP;
 
-			String lastKnownTimestamp = (String) timestamps.remove(entry.getKey());
+			String lastKnownTimestamp = timestamps.remove(entry.getKey());
 			//A repo has been added 
 			if (lastKnownTimestamp == null)
 				return false;
@@ -203,55 +333,60 @@ public class ProfileSynchronizer {
 		return true;
 	}
 
+	/*
+	 * Read the values of the stored timestamps that we use for caching.
+	 */
 	private void readTimestamps() {
 		File file = Activator.getContext().getDataFile(TIMESTAMPS_FILE_PREFIX + profile.getProfileId().hashCode());
-		timestamps = new Properties();
 		try {
 			InputStream is = new BufferedInputStream(new FileInputStream(file));
 			try {
-				timestamps.load(is);
+				timestamps = CollectionUtils.loadProperties(is);
 			} finally {
 				if (is != null)
 					is.close();
 			}
 		} catch (FileNotFoundException e) {
+			timestamps = new HashMap<String, String>();
 			//Ignore
 		} catch (IOException e) {
 			//Ignore
+			timestamps = new HashMap<String, String>();
 		}
 	}
 
 	private ProvisioningContext getContext() {
-		ArrayList repoURLs = new ArrayList();
-		for (Iterator iterator = repositoryMap.keySet().iterator(); iterator.hasNext();) {
+		ArrayList<URI> repoURLs = new ArrayList<URI>();
+		for (Iterator<String> iterator = repositoryMap.keySet().iterator(); iterator.hasNext();) {
 			try {
-				repoURLs.add(new URI((String) iterator.next()));
+				repoURLs.add(new URI(iterator.next()));
 			} catch (URISyntaxException e) {
 				//ignore
 			}
 		}
-		ProvisioningContext result = new ProvisioningContext((URI[]) repoURLs.toArray(new URI[repoURLs.size()]));
+		ProvisioningContext result = new ProvisioningContext(agent);
+		result.setMetadataRepositories(repoURLs.toArray(new URI[repoURLs.size()]));
 		result.setArtifactRepositories(new URI[0]);
 		return result;
 	}
 
 	private String synchronizeCacheExtensions() {
-		List currentExtensions = new ArrayList();
+		List<String> currentExtensions = new ArrayList<String>();
 		StringBuffer buffer = new StringBuffer();
 
-		List repositories = new ArrayList(repositoryMap.keySet());
+		List<String> repositories = new ArrayList<String>(repositoryMap.keySet());
 		final String OSGiInstallArea = Activator.getOSGiInstallArea().toExternalForm() + Constants.EXTENSION_LOCATION;
-		Collections.sort(repositories, new Comparator() {
-			public int compare(Object left, Object right) {
+		Collections.sort(repositories, new Comparator<String>() {
+			public int compare(String left, String right) {
 				if (OSGiInstallArea.equals(left))
 					return -1;
 				if (OSGiInstallArea.equals(right))
 					return 1;
-				return ((String) left).compareTo((String) right);
+				return left.compareTo(right);
 			}
 		});
-		for (Iterator it = repositories.iterator(); it.hasNext();) {
-			String repositoryId = (String) it.next();
+		for (Iterator<String> it = repositories.iterator(); it.hasNext();) {
+			String repositoryId = it.next();
 			try {
 				IArtifactRepository repository = Activator.loadArtifactRepository(new URI(repositoryId), null);
 
@@ -270,7 +405,7 @@ public class ProfileSynchronizer {
 		}
 		String currentExtensionsProperty = (buffer.length() == 0) ? null : buffer.toString();
 
-		List previousExtensions = new ArrayList();
+		List<String> previousExtensions = new ArrayList<String>();
 		String previousExtensionsProperty = profile.getProperty(CACHE_EXTENSIONS);
 		if (previousExtensionsProperty != null) {
 			StringTokenizer tokenizer = new StringTokenizer(previousExtensionsProperty, PIPE);
@@ -298,49 +433,98 @@ public class ProfileSynchronizer {
 		return result;
 	}
 
-	public ProfileChangeRequest createProfileChangeRequest(ProvisioningContext context) {
-		ProfileChangeRequest request = new ProfileChangeRequest(profile);
+	/*
+	 * Return a map of all the IUs in the profile
+	 * Use a map here so we have a copy of the original IU from the profile... we will need it later.
+	 */
+	private Map<IInstallableUnit, IInstallableUnit> getProfileIUs() {
+		IQueryResult<IInstallableUnit> profileQueryResult = profile.query(QueryUtil.createIUAnyQuery(), null);
+		Map<IInstallableUnit, IInstallableUnit> result = new HashMap<IInstallableUnit, IInstallableUnit>();
+		for (Iterator<IInstallableUnit> it = profileQueryResult.iterator(); it.hasNext();) {
+			IInstallableUnit iu = it.next();
+			result.put(iu, iu);
+		}
+		return result;
+	}
+
+	/*
+	 * Return a map of all the IUs available in the profile. This takes the shared parents into consideration, if applicable.
+	 * Use a map here so we have a copy of the original IU from the profile... we will need it later.
+	 */
+	private Map<IInstallableUnit, IInstallableUnit> getAvailableProfileIUs() {
+		IQueryResult<IInstallableUnit> profileQueryResult = profile.available(QueryUtil.createIUAnyQuery(), null);
+		Map<IInstallableUnit, IInstallableUnit> result = new HashMap<IInstallableUnit, IInstallableUnit>();
+		for (Iterator<IInstallableUnit> it = profileQueryResult.iterator(); it.hasNext();) {
+			IInstallableUnit iu = it.next();
+			result.put(iu, iu);
+		}
+		return result;
+	}
+
+	/*
+	 * Return the profile change requests that we need to execute in order to install everything from the
+	 * dropins folder(s). (or uninstall things that have been removed) We use a collection here because if
+	 * the user has moved bundles from the dropins to the plugins (for instance) then we need to uninstall
+	 * the old bundle and then re-install the new one. This is because the IUs for the moved bundles are
+	 * considered the same but they really differ in an IU property. (file location, which is not considered
+	 * as part of equality)
+	 */
+	public ReconcilerProfileChangeRequest createProfileChangeRequest(ProvisioningContext context) {
+		ReconcilerProfileChangeRequest request = new ReconcilerProfileChangeRequest(profile);
 
 		boolean resolve = Boolean.valueOf(profile.getProperty("org.eclipse.equinox.p2.resolve")).booleanValue(); //$NON-NLS-1$
 		if (resolve)
 			request.removeProfileProperty("org.eclipse.equinox.p2.resolve"); //$NON-NLS-1$
 
-		List toAdd = new ArrayList();
-		List toRemove = new ArrayList();
+		List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>();
+		List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
+		List<IInstallableUnit> toMove = new ArrayList<IInstallableUnit>();
 
 		boolean foundIUsToAdd = false;
-		Collection profileIUs = new HashSet(profile.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection());
+		Map<IInstallableUnit, IInstallableUnit> profileIUs = getProfileIUs();
 
 		// we use IProfile.available(...) here so that we also gather any shared IUs
-		Collection availableProfileIUs = new HashSet(profile.available(InstallableUnitQuery.ANY, new Collector(), null).toCollection());
+		Map<IInstallableUnit, IInstallableUnit> availableProfileIUs = getAvailableProfileIUs();
 
 		// get all IUs from all our repos (toAdd)
-		Collector allIUs = getAllIUsFromRepos();
-		for (Iterator iter = allIUs.iterator(); iter.hasNext();) {
-			final IInstallableUnit iu = (IInstallableUnit) iter.next();
-			// if the IU is already installed in the profile then skip it
-			if (!profileIUs.contains(iu)) {
-				if (Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_TYPE_GROUP)).booleanValue())
-					request.setInstallableUnitProfileProperty(iu, IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
+		IQueryResult<IInstallableUnit> allIUs = getAllIUsFromRepos();
+		for (Iterator<IInstallableUnit> iter = allIUs.iterator(); iter.hasNext();) {
+			final IInstallableUnit iu = iter.next();
+			IInstallableUnit existing = profileIUs.get(iu);
+			// check to see if it is really the same IU
+			if (existing == null) {
+				if (QueryUtil.isGroup(iu))
+					request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
 				// mark all IUs with special property
 				request.setInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS, Boolean.TRUE.toString());
-				request.setInstallableUnitInclusionRules(iu, PlannerHelper.createOptionalInclusionRule(iu));
-				request.setInstallableUnitProfileProperty(iu, IInstallableUnit.PROP_PROFILE_LOCKED_IU, Integer.toString(IInstallableUnit.LOCK_UNINSTALL));
+				request.setInstallableUnitInclusionRules(iu, ProfileInclusionRules.createOptionalInclusionRule(iu));
+				request.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, Integer.toString(IProfile.LOCK_UNINSTALL));
 				toAdd.add(iu);
 
 				// as soon as we find something locally that needs to be installed, then 
 				// everything from the parent's dropins must be installed locally as well.
-				if (!foundIUsToAdd && !availableProfileIUs.contains(iu)) {
+				if (!foundIUsToAdd && availableProfileIUs.get(iu) == null) {
 					foundIUsToAdd = true;
 				}
+			} else {
+				// if the IU is already installed in the profile then check to see if it was moved.
+				String one = iu.getProperty(RepositoryListener.FILE_NAME);
+				String two = existing.getProperty(RepositoryListener.FILE_NAME);
+				// if we have an IU which has been moved, keep track of it.
+				//
+				// cheat here... since we always set the filename property for bundles in the dropins,
+				// if the existing IU's filename is null then it isn't from the dropins. a better
+				// (and more expensive) way to find this out is to do an IU profile property query.
+				if (one != null && two != null && !one.equals(two))
+					toMove.add(iu);
 			}
 		}
 
 		// get all IUs from profile with marked property (existing)
-		Collector dropinIUs = profile.query(new IUProfilePropertyQuery(profile, PROP_FROM_DROPINS, Boolean.toString(true)), new Collector(), null);
-		Collection all = new HashSet(allIUs.toCollection());
-		for (Iterator iter = dropinIUs.iterator(); iter.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iter.next();
+		IQueryResult<IInstallableUnit> dropinIUs = profile.query(new IUProfilePropertyQuery(PROP_FROM_DROPINS, Boolean.TRUE.toString()), null);
+		Set<IInstallableUnit> all = allIUs.toUnmodifiableSet();
+		for (Iterator<IInstallableUnit> iter = dropinIUs.iterator(); iter.hasNext();) {
+			IInstallableUnit iu = iter.next();
 			// the STRICT policy is set when we install things via the UI, we use it to differentiate between IUs installed
 			// via the dropins and the UI. (dropins are considered optional) If an IU has both properties set it means that
 			// it was initially installed via the dropins but then upgraded via the UI. (properties are copied from the old IU
@@ -348,125 +532,192 @@ public class ProfileSynchronizer {
 			// will stick.
 			if ("STRICT".equals(profile.getInstallableUnitProperty(iu, "org.eclipse.equinox.p2.internal.inclusion.rules"))) { //$NON-NLS-1$//$NON-NLS-2$
 				request.removeInstallableUnitProfileProperty(iu, PROP_FROM_DROPINS);
-				request.removeInstallableUnitProfileProperty(iu, IInstallableUnit.PROP_PROFILE_LOCKED_IU);
+				request.removeInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
 				continue;
 			}
-			// remove the IUs that are in the intersection between the 2 sets
+			// if the IU from the profile is in the "all available" list, then it is already added
+			// otherwise if it isn't in the repo then we have to remove it from the profile.
 			if (all.contains(iu))
 				toAdd.remove(iu);
 			else
 				toRemove.add(iu);
 		}
 
-		if (!foundIUsToAdd && toRemove.isEmpty() && !resolve) {
+		if (!foundIUsToAdd && toRemove.isEmpty() && !resolve && toMove.isEmpty()) {
 			if (Tracing.DEBUG_RECONCILER)
 				Tracing.debug("[reconciler] Nothing to do."); //$NON-NLS-1$
 			return null;
 		}
 
-		context.setExtraIUs(toAdd);
-		request.addInstallableUnits((IInstallableUnit[]) toAdd.toArray(new IInstallableUnit[toAdd.size()]));
-		request.removeInstallableUnits((IInstallableUnit[]) toRemove.toArray(new IInstallableUnit[toRemove.size()]));
+		context.setExtraInstallableUnits(toAdd);
+		request.addAll(toAdd);
+		request.removeAll(toRemove);
+		request.moveAll(toMove);
+
 		debug(request);
 		return request;
 	}
 
 	/*
+	 * Create and return a negated requirement saying that the given IU must not exist in the profile.
+	 */
+	private IRequirement createNegation(IInstallableUnit unit) {
+		return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), //
+				new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false);
+	}
+
+	/*
+	 * If in debug mode, print out information which tells us whether or not the given 
+	 * provisioning plan matches the request.
+	 */
+	private void debug(ReconcilerProfileChangeRequest request, IProvisioningPlan plan) {
+		if (!Tracing.DEBUG_RECONCILER)
+			return;
+		final String PREFIX = "[reconciler] [plan] "; //$NON-NLS-1$
+		// get the request
+		List<IInstallableUnit> toAdd = new ArrayList<IInstallableUnit>(request.getAdditions());
+		List<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>(request.getRemovals());
+		List<IInstallableUnit> toMove = new ArrayList<IInstallableUnit>(request.getMoves());
+
+		// remove from the request everything that is in the plan
+		for (Iterator<IInstallableUnit> iterator = plan.getRemovals().query(QueryUtil.createIUAnyQuery(), null).iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			toRemove.remove(iu);
+		}
+		for (Iterator<IInstallableUnit> iterator = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			toAdd.remove(iu);
+		}
+		// Move operations are treated as doing a remove/add. The removes have already happened
+		// and at this point we are adding the moved IUs back at their new location. Remove the moved
+		// IUs from the added list because this will just confuse the user.
+		toAdd.removeAll(toMove);
+
+		// if anything is left in the request, then something is wrong with the plan
+		if (toAdd.size() == 0 && toRemove.size() == 0)
+			Tracing.debug(PREFIX + "Plan matches the request."); //$NON-NLS-1$
+		if (toAdd.size() != 0) {
+			Tracing.debug(PREFIX + "Some units will not be installed, because they are already installed or there are dependency issues:"); //$NON-NLS-1$
+			for (IInstallableUnit unit : toAdd)
+				Tracing.debug(PREFIX + unit);
+		}
+		if (toRemove.size() != 0) {
+			Tracing.debug(PREFIX + "Some units will not be uninstalled:"); //$NON-NLS-1$
+			for (IInstallableUnit unit : toRemove)
+				Tracing.debug(PREFIX + unit);
+		}
+	}
+
+	/*
 	 * If debugging is turned on, then print out the details for the given profile change request.
 	 */
-	private void debug(ProfileChangeRequest request) {
+	private void debug(ReconcilerProfileChangeRequest request) {
 		if (!Tracing.DEBUG_RECONCILER)
 			return;
 		final String PREFIX = "[reconciler] "; //$NON-NLS-1$
-		IInstallableUnit[] toAdd = request.getAddedInstallableUnits();
-		if (toAdd == null || toAdd.length == 0) {
+		Collection<IInstallableUnit> toAdd = request.getAdditions();
+		if (toAdd == null || toAdd.size() == 0) {
 			Tracing.debug(PREFIX + "No installable units to add."); //$NON-NLS-1$
 		} else {
-			for (int i = 0; i < toAdd.length; i++) {
-				Tracing.debug(PREFIX + "Adding IU: " + toAdd[i].getId() + ' ' + toAdd[i].getVersion()); //$NON-NLS-1$
+			for (IInstallableUnit add : toAdd) {
+				Tracing.debug(PREFIX + "Adding IU: " + add.getId() + ' ' + add.getVersion()); //$NON-NLS-1$
 			}
 		}
-		Map propsToAdd = request.getInstallableUnitProfilePropertiesToAdd();
+		Map<IInstallableUnit, Map<String, String>> propsToAdd = request.getInstallableUnitProfilePropertiesToAdd();
 		if (propsToAdd == null || propsToAdd.isEmpty()) {
 			Tracing.debug(PREFIX + "No IU properties to add."); //$NON-NLS-1$
 		} else {
-			for (Iterator iter = propsToAdd.keySet().iterator(); iter.hasNext();) {
-				Object key = iter.next();
-				Tracing.debug(PREFIX + "Adding IU property: " + key + "->" + propsToAdd.get(key)); //$NON-NLS-1$ //$NON-NLS-2$
+			for (Entry<IInstallableUnit, Map<String, String>> entry : propsToAdd.entrySet()) {
+				Tracing.debug(PREFIX + "Adding IU property: " + entry.getKey() + "->" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
 
-		IInstallableUnit[] toRemove = request.getRemovedInstallableUnits();
-		if (toRemove == null || toRemove.length == 0) {
+		Collection<IInstallableUnit> toRemove = request.getRemovals();
+		if (toRemove == null || toRemove.size() == 0) {
 			Tracing.debug(PREFIX + "No installable units to remove."); //$NON-NLS-1$
 		} else {
-			for (int i = 0; i < toRemove.length; i++) {
-				Tracing.debug(PREFIX + "Removing IU: " + toRemove[i].getId() + ' ' + toRemove[i].getVersion()); //$NON-NLS-1$
+			for (IInstallableUnit remove : toRemove) {
+				Tracing.debug(PREFIX + "Removing IU: " + remove.getId() + ' ' + remove.getVersion()); //$NON-NLS-1$
 			}
 		}
-		Map propsToRemove = request.getInstallableUnitProfilePropertiesToRemove();
+		Map<IInstallableUnit, List<String>> propsToRemove = request.getInstallableUnitProfilePropertiesToRemove();
 		if (propsToRemove == null || propsToRemove.isEmpty()) {
 			Tracing.debug(PREFIX + "No IU properties to remove."); //$NON-NLS-1$
 		} else {
-			for (Iterator iter = propsToRemove.keySet().iterator(); iter.hasNext();) {
-				Object key = iter.next();
-				Tracing.debug(PREFIX + "Removing IU property: " + key + "->" + propsToRemove.get(key)); //$NON-NLS-1$ //$NON-NLS-2$
+			for (Entry<IInstallableUnit, List<String>> entry : propsToRemove.entrySet()) {
+				Tracing.debug(PREFIX + "Removing IU property: " + entry.getKey() + "->" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
+
+		Collection<IInstallableUnit> toMove = request.getMoves();
+		if (toMove == null || toMove.isEmpty()) {
+			Tracing.debug(PREFIX + "No installable units to move."); //$NON-NLS-1$
+		} else {
+			for (IInstallableUnit move : toMove)
+				Tracing.debug(PREFIX + "Moving IU: " + move.getId() + ' ' + move.getVersion()); //$NON-NLS-1$
+		}
+
+		Collection<IRequirement> extra = request.getExtraRequirements();
+		if (extra == null || extra.isEmpty()) {
+			Tracing.debug(PREFIX + "No extra requirements."); //$NON-NLS-1$
+		} else {
+			for (IRequirement requirement : extra)
+				Tracing.debug(PREFIX + "Extra requirement: " + requirement); //$NON-NLS-1$
+		}
 	}
 
-	private Collector getAllIUsFromRepos() {
-		Collector allRepos = new Collector();
-		for (Iterator it = repositoryMap.entrySet().iterator(); it.hasNext();) {
-			Entry entry = (Entry) it.next();
-			IMetadataRepository repository = (IMetadataRepository) entry.getValue();
-			repository.query(InstallableUnitQuery.ANY, allRepos, null).iterator();
+	/*
+	 * Return all of the IUs available in all of our repos. This usually includes the dropins and plugins folders
+	 * as well as any sites specified in the platform.xml file.
+	 */
+	private IQueryResult<IInstallableUnit> getAllIUsFromRepos() {
+		// TODO: Should consider using a sequenced iterator here instead of collecting
+		Collector<IInstallableUnit> allRepos = new Collector<IInstallableUnit>();
+		for (IMetadataRepository repository : repositoryMap.values()) {
+			allRepos.addAll(repository.query(QueryUtil.createIUAnyQuery(), null));
 		}
 		return allRepos;
 	}
 
-	private ProvisioningPlan createProvisioningPlan(ProfileChangeRequest request, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
-		BundleContext context = Activator.getContext();
-		ServiceReference reference = context.getServiceReference(IPlanner.class.getName());
-		IPlanner planner = (IPlanner) context.getService(reference);
-
-		try {
-			return planner.getProvisioningPlan(request, provisioningContext, monitor);
-		} finally {
-			context.ungetService(reference);
-		}
+	/*
+	 * Create and return a provisioning plan for the given change request.
+	 */
+	private IProvisioningPlan createProvisioningPlan(ProfileChangeRequest request, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
+		IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+		return planner.getProvisioningPlan(request, provisioningContext, monitor);
 	}
 
-	private IStatus executeOperands(Operand[] operands, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
-		BundleContext context = Activator.getContext();
-		ServiceReference reference = context.getServiceReference(IEngine.class.getName());
-		IEngine engine = (IEngine) context.getService(reference);
-		try {
-			PhaseSet phaseSet = DefaultPhaseSet.createDefaultPhaseSet(DefaultPhaseSet.PHASE_COLLECT | DefaultPhaseSet.PHASE_CHECK_TRUST);
-			return engine.perform(profile, phaseSet, operands, provisioningContext, monitor);
-		} finally {
-			context.ungetService(reference);
-		}
+	/*
+	 * Call the engine to set the given property on the profile.
+	 */
+	private IStatus setProperty(String key, String value, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		IProvisioningPlan plan = engine.createPlan(profile, provisioningContext);
+		plan.setProfileProperty(key, value);
+		IPhaseSet phaseSet = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_PROPERTY});
+		return engine.perform(plan, phaseSet, monitor);
 	}
 
-	private IStatus executePlan(ProvisioningPlan plan, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
-		BundleContext context = Activator.getContext();
-		ServiceReference reference = context.getServiceReference(IEngine.class.getName());
-		IEngine engine = (IEngine) context.getService(reference);
-		try {
-			PhaseSet phaseSet = DefaultPhaseSet.createDefaultPhaseSet(DefaultPhaseSet.PHASE_COLLECT | DefaultPhaseSet.PHASE_CHECK_TRUST);
+	/*
+	 * Execute the given plan.
+	 */
+	private IStatus executePlan(IProvisioningPlan plan, ProvisioningContext provisioningContext, IProgressMonitor monitor) {
+		// the plan verifier has been given the opportunity to veto the plan. check to see if that was the case.
+		// warnings are ignored
+		if (plan.getStatus().getSeverity() == IStatus.ERROR)
+			return plan.getStatus();
 
-			if (plan.getInstallerPlan() != null) {
-				IStatus installerPlanStatus = engine.perform(profile, phaseSet, plan.getInstallerPlan().getOperands(), provisioningContext, monitor);
-				if (!installerPlanStatus.isOK())
-					return installerPlanStatus;
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_COLLECT, PhaseSetFactory.PHASE_CHECK_TRUST});
 
-				applyConfiguration(true);
-			}
-			return engine.perform(profile, phaseSet, plan.getOperands(), provisioningContext, monitor);
-		} finally {
-			context.ungetService(reference);
+		if (plan.getInstallerPlan() != null) {
+			IStatus installerPlanStatus = engine.perform(plan.getInstallerPlan(), phaseSet, monitor);
+			if (!installerPlanStatus.isOK())
+				return installerPlanStatus;
+
+			applyConfiguration(true);
 		}
+		return engine.perform(plan, phaseSet, monitor);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties
index c8b618c..148b27a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#		Sonatype Inc. - Ongoing development
 ###############################################################################
 artifact_repo_manager_not_registered=ArtifactRepositoryManager not registered.
 errorLoadingRepository=Error occurred while loading repository at {0}.
@@ -14,4 +15,5 @@ errorProcessingConfg=Exception while processing configuration.
 metadata_repo_manager_not_registered=MetadataRepositoryManager not registered.
 error_reading_link = Error occurred while reading link file at {0}.
 error_resolving_link = Error occurred while resolving linked folder {0} from {1}.
- 
\ No newline at end of file
+remove_root = The installable unit {0} version {1} has been uninstalled during the reconciliation.
+remove_all_roots = The reconciliation has been aborted because the changes made to the installation are causing the loss of all roots.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.classpath
index 75116d7..834ea83 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" output="bin_ant" path="src_ant"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch
index c4246c1..5bfe0d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch	
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.externalToolBuilders/Build Repository Tools JARs.launch	
@@ -2,12 +2,12 @@
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1255396956625_26" label="working set" name="working set">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.equinox.p2.repository.tools" type="4"/>
</launchConfigurationWorkingSet>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.repository.tools"/>
+<listEntry value="/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml"/>
 </listAttribute>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
+<listEntry value="1"/>
 </listAttribute>
 <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs
index 323ecbc..b07f195 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Feb 27 09:31:49 EST 2009
+#Mon Dec 28 06:58:36 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,17 +7,17 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -26,13 +26,13 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
@@ -50,6 +50,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -88,7 +89,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -160,7 +161,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
index 063c16c..ba0b5d4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/META-INF/MANIFEST.MF
@@ -2,37 +2,45 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.p2.repository.tools;singleton:=true
-Bundle-Version: 1.0.2.qualifier
+Bundle-Version: 2.0.1.qualifier
 Bundle-Activator: org.eclipse.equinox.p2.internal.repository.tools.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.p2.internal.repository.comparator;x-internal:=true,
+ org.eclipse.equinox.p2.internal.repository.mirroring;x-internal:=true,
+ org.eclipse.equinox.p2.internal.repository.tools;x-friends:="org.eclipse.pde.build",
+ org.eclipse.equinox.p2.internal.repository.tools.analyzer;x-internal:=true,
+ org.eclipse.equinox.p2.repository.tools.analyzer;version="2.0.0",
+ org.eclipse.equinox.p2.repository.tools.comparator;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0", org.eclipse.equinox.registry
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
 Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
 Import-Package: org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.artifact.mirror,
  org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.artifact.repository.ant,
  org.eclipse.equinox.internal.p2.artifact.repository.simple,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.director,
  org.eclipse.equinox.internal.p2.engine,
+ org.eclipse.equinox.internal.p2.engine.phases,
+ org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.p2.metadata.repository,
+ org.eclipse.equinox.internal.p2.persistence,
+ org.eclipse.equinox.internal.p2.publisher.eclipse,
  org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.engine.phases,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.internal.provisional.equinox.p2.jarprocessor,
+ org.eclipse.equinox.internal.provisional.p2.director,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.publisher.eclipse,
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.5.0",
- org.osgi.service.packageadmin;version="1.2.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
-Export-Package: org.eclipse.equinox.p2.internal.repository.tools;x-internal:=true,
- org.eclipse.equinox.p2.internal.repository.tools.tasks;x-internal:=true
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
+ org.osgi.framework;version="1.4.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/build.properties
index a1a8324..bea6eba 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/build.properties
@@ -21,6 +21,7 @@ jars.compile.order = ., lib/repository-tools-ant.jar
 source.lib/repository-tools-ant.jar = src_ant/
 output.lib/repository-tools-ant.jar = bin_ant/
 jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,\
-                     platform:/plugin/org.eclipse.equinox.p2.jarprocessor/lib/jarprocessor-ant.jar,\
-                    	 platform:/plugin/org.eclipse.equinox.p2.artifact.repository/ant_tasks/artifactRepository-ant.jar
+                     platform:/plugin/org.eclipse.equinox.p2.jarprocessor/lib/jarprocessor-ant.jar
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/plugin.xml
index ec94e97..f48caf2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/plugin.xml
@@ -2,32 +2,112 @@
 <?eclipse version="3.4"?>
 <plugin>
 
-  <extension
-         point="org.eclipse.ant.core.antTasks">
-     <antTask
-            class="org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableTask"
-            library="lib/repository-tools-ant.jar"
-            name="p2.repo2runnable">
-      </antTask>
-
-     <antTask
-            class="org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorTask"
-            library="lib/repository-tools-ant.jar"
-            name="p2.mirror">
-      </antTask>
+ <extension
+         point="org.eclipse.equinox.p2.repository.tools.verifier">
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.IUCounting"
+            name="IU Counting Tool">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.CopyrightAnalyzer"
+            name="Copyright Analyzer">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.LicenseAnalyzer"
+            name="License Analyzer">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.HostCheckAnalyzer"
+            name="Fragment Host Analyzer">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.UniqueIUAnalyzer"
+            name="Unique IU Analyzer">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.UnzipFeatureJarAnalyzer"
+            name="Unzip Feature Jar Analyzer">
+      </IUAnalysis>
+      <IUAnalysis
+            class="org.eclipse.equinox.p2.internal.repository.tools.analyzer.VersionAnalyzer"
+            name="Version Analyzer">
+      </IUAnalysis>
+   </extension>
+  <extension-point id="org.eclipse.equinox.p2.repository.tools.verifier" name="Metadata Verifier" schema="schema/org.eclipse.equinox.p2.repository.tools.verifier.exsd"/> 
 
-     <antTask
-            class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CompositeRepositoryTask"
-            library="lib/repository-tools-ant.jar"
-            name="p2.composite.repository">
-      </antTask>
-      
-      <antTask
+	<extension point="org.eclipse.ant.core.antTasks">
+		<antTask
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableTask"
+			library="lib/repository-tools-ant.jar"
+			name="p2.repo2runnable">
+		</antTask>
+	
+		<antTask
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorTask"
+			library="lib/repository-tools-ant.jar"
+			name="p2.mirror">
+		</antTask>
+	
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.artifact.mirror"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorArtifactsTask">
+		</antTask>
+		
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.metadata.mirror"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.MirrorMetadataTask">
+		</antTask>
+			
+		<antTask
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CompositeRepositoryTask"
+			library="lib/repository-tools-ant.jar"
+			name="p2.composite.repository">
+		</antTask>
+		  
+		<antTask
 			library="lib/repository-tools-ant.jar"
 			name="p2.process.artifacts"
 			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.ProcessRepoTask" >
-	  </antTask>
-  </extension>
+		</antTask>
+		  
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.remove.iu"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.RemoveIUTask" >
+		</antTask>
+		  
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.composite.artifact.repository.validate"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.ValidateTask">
+		</antTask>
+		
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.validate.artifacts"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.ValidateTask">
+		</antTask>
+		
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.composite.artifact.repository.add"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CompositeRepositoryTask">
+		</antTask>
+		
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.composite.artifact.repository.create"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CreateCompositeArtifactRepositoryTask">
+		</antTask>
+		
+		<antTask
+			library="lib/repository-tools-ant.jar"
+			name="p2.composite.artifact.repository.remove"
+			class="org.eclipse.equinox.p2.internal.repository.tools.tasks.CompositeRepositoryTask">
+		</antTask>	
+	</extension>
   
   <extension
          id="org.eclipse.equinox.p2.repository.repo2runnable"
@@ -37,12 +117,47 @@
       </application>
    </extension>
 
-	<extension
-    	point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">
+	<extension point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">		
+		<artifactComparator 
+			class="org.eclipse.equinox.p2.internal.repository.comparator.MD5ArtifactComparator"
+			id="org.eclipse.equinox.artifact.md5.comparator">
+		</artifactComparator>
+	</extension>
+	<extension point="org.eclipse.equinox.p2.artifact.repository.artifactComparators">
 		<artifactComparator
 			class="org.eclipse.equinox.p2.internal.repository.comparator.JarComparator"
 			id="org.eclipse.equinox.p2.repository.tools.jar.comparator">
 		</artifactComparator>
 	</extension>
+	
+	<extension id="org.eclipse.equinox.p2.repository.metadataverifier" point="org.eclipse.core.runtime.applications">
+		<application cardinality="singleton-global" visible="true">
+			<run class="org.eclipse.equinox.p2.internal.repository.tools.RepositoryAnalyzerApplication" />
+		</application>
+	</extension> 
+	
+	<extension id="org.eclipse.equinox.p2.artifact.repository.mirrorApplication"  point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="main" visible="true">
+			<run class="org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication" >
+				<parameter name="metadataOrArtifacts" value="artifacts" />
+			</run>
+		</application>
+	</extension>
+	
+	<extension id="org.eclipse.equinox.p2.metadata.repository.mirrorApplication" point="org.eclipse.core.runtime.applications">
+		<application cardinality="1" thread="main" visible="true">
+			<run class="org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication">
+				<parameter name="metadataOrArtifacts" value="metadata" />
+			</run>
+      </application>
+   </extension>
+ <extension
+       point="org.eclipse.ant.core.antTypes">
+    <antType
+          class="org.eclipse.equinox.p2.internal.repository.tools.tasks.ArtifactDescription"
+          library="lib/repository-tools-ant.jar"
+          name="artifact">
+    </antType>
+ </extension>
 
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/pom.xml
new file mode 100644
index 0000000..cbea1ab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.repository.tools</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/schema/org.eclipse.equinox.p2.repository.tools.verifier.exsd b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/schema/org.eclipse.equinox.p2.repository.tools.verifier.exsd
new file mode 100644
index 0000000..ba2d23b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/schema/org.eclipse.equinox.p2.repository.tools.verifier.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.equinox.p2.repository.tools" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.eclipse.equinox.p2.repository.tools" id="org.eclipse.equinox.p2.repository.tools.verifier" name="Metadata Verifier"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="0" maxOccurs="unbounded">
+            <element ref="IUAnalysis"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="IUAnalysis">
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.equinox.p2.metadata.analyzer.IIUAnalysis"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml
index 86fe836..fdc58c7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/scripts/buildAntJARs.xml
@@ -4,5 +4,7 @@
 		<mkdir dir="lib" />
 		<delete file="lib/repository-tools-ant.jar" failonerror="false"/>
 		<jar destfile="lib/repository-tools-ant.jar" basedir="bin_ant"/>
+		<eclipse.convertPath fileSystemPath="${basedir}/lib" property="resourcePath"/>
+		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
 	</target>
 </project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java
deleted file mode 100644
index 2771ea6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Annotation.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class Annotation extends ClassFileStruct {
-
-	private static final AnnotationComponent[] NO_ENTRIES = new AnnotationComponent[0];
-
-	private int typeIndex;
-	private char[] typeName;
-	private int componentsNumber;
-	private AnnotationComponent[] components;
-	private int readOffset;
-
-	/**
-	 * Constructor for Annotation.
-	 *
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public Annotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-
-		final int index = u2At(classFileBytes, 0, offset);
-		this.typeIndex = index;
-		if (index != 0) {
-			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.typeName = constantPoolEntry.getUtf8Value();
-		} else {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		final int length = u2At(classFileBytes, 2, offset);
-		this.componentsNumber = length;
-		this.readOffset = 4;
-		if (length != 0) {
-			this.components = new AnnotationComponent[length];
-			for (int i = 0; i < length; i++) {
-				AnnotationComponent component = new AnnotationComponent(classFileBytes, constantPool, offset + this.readOffset);
-				this.components[i] = component;
-				this.readOffset += component.sizeInBytes();
-			}
-		} else {
-			this.components = NO_ENTRIES;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeIndex()
-	 */
-	public int getTypeIndex() {
-		return this.typeIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponentsNumber()
-	 */
-	public int getComponentsNumber() {
-		return this.componentsNumber;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponents()
-	 */
-	public AnnotationComponent[] getComponents() {
-		return this.components;
-	}
-
-	int sizeInBytes() {
-		return this.readOffset;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeName()
-	 */
-	public char[] getTypeName() {
-		return this.typeName;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java
deleted file mode 100644
index ac83743..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponent.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class AnnotationComponent extends ClassFileStruct {
-
-	private int componentNameIndex;
-	private char[] componentName;
-	private AnnotationComponentValue componentValue;
-	private int readOffset;
-
-	public AnnotationComponent(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		final int nameIndex = u2At(classFileBytes, 0, offset);
-		this.componentNameIndex = nameIndex;
-		if (nameIndex != 0) {
-			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(nameIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.componentName = constantPoolEntry.getUtf8Value();
-		}
-		this.readOffset = 2;
-		AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
-		this.componentValue = value;
-		this.readOffset += value.sizeInBytes();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentNameIndex()
-	 */
-	public int getComponentNameIndex() {
-		return this.componentNameIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentName()
-	 */
-	public char[] getComponentName() {
-		return this.componentName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentValue()
-	 */
-	public AnnotationComponentValue getComponentValue() {
-		return this.componentValue;
-	}
-
-	int sizeInBytes() {
-		return this.readOffset;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java
deleted file mode 100644
index 3866439..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationComponentValue.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class AnnotationComponentValue extends ClassFileStruct {
-	/**
-	 * Tag value for a constant of type <code>byte</code>
-	 * @since 3.1
-	 */
-	public static final int BYTE_TAG = 'B';
-	/**
-	 * Tag value for a constant of type <code>char</code>
-	 * @since 3.1
-	 */
-	public static final int CHAR_TAG = 'C';
-	/**
-	 * Tag value for a constant of type <code>double</code>
-	 * @since 3.1
-	 */
-	public static final int DOUBLE_TAG = 'D';
-	/**
-	 * Tag value for a constant of type <code>float</code>
-	 * @since 3.1
-	 */
-	public static final int FLOAT_TAG = 'F';
-	/**
-	 * Tag value for a constant of type <code>int</code>
-	 * @since 3.1
-	 */
-	public static final int INTEGER_TAG = 'I';
-	/**
-	 * Tag value for a constant of type <code>long</code>
-	 * @since 3.1
-	 */
-	public static final int LONG_TAG = 'J';
-	/**
-	 * Tag value for a constant of type <code>short</code>
-	 * @since 3.1
-	 */
-	public static final int SHORT_TAG = 'S';
-	/**
-	 * Tag value for a constant of type <code>boolean</code>
-	 * @since 3.1
-	 */
-	public static final int BOOLEAN_TAG = 'Z';
-	/**
-	 * Tag value for a constant of type <code>java.lang.String</code>
-	 * @since 3.1
-	 */
-	public static final int STRING_TAG = 's';
-	/**
-	 * Tag value for a value that represents an enum constant
-	 * @since 3.1
-	 */
-	public static final int ENUM_TAG = 'e';
-	/**
-	 * Tag value for a value that represents a class
-	 * @since 3.1
-	 */
-	public static final int CLASS_TAG = 'c';
-	/**
-	 * Tag value for a value that represents an annotation
-	 * @since 3.1
-	 */
-	public static final int ANNOTATION_TAG = '@';
-	/**
-	 * Tag value for a value that represents an array
-	 * @since 3.1
-	 */
-	public static final int ARRAY_TAG = '[';
-
-	private static final AnnotationComponentValue[] NO_VALUES = new AnnotationComponentValue[0];
-
-	private AnnotationComponentValue[] annotationComponentValues;
-	private Annotation annotationValue;
-	private ConstantPoolEntry classInfo;
-	private int classFileInfoIndex;
-	private ConstantPoolEntry constantValue;
-	private int constantValueIndex;
-	private int enumConstantTypeNameIndex;
-	private int enumConstantNameIndex;
-	private char[] enumConstantTypeName;
-	private char[] enumConstantName;
-
-	private int readOffset;
-	private int tag;
-	private int valuesNumber;
-
-	public AnnotationComponentValue(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		this.classFileInfoIndex = -1;
-		this.constantValueIndex = -1;
-		this.enumConstantTypeNameIndex = -1;
-		this.enumConstantNameIndex = -1;
-		final int t = u1At(classFileBytes, 0, offset);
-		this.tag = t;
-		this.readOffset = 1;
-		switch (t) {
-			case 'B' :
-			case 'C' :
-			case 'D' :
-			case 'F' :
-			case 'I' :
-			case 'J' :
-			case 'S' :
-			case 'Z' :
-			case 's' :
-				final int constantIndex = u2At(classFileBytes, this.readOffset, offset);
-				this.constantValueIndex = constantIndex;
-				if (constantIndex != 0) {
-					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(constantIndex);
-					switch (constantPoolEntry.getKind()) {
-						case ConstantPoolConstant.CONSTANT_Long :
-						case ConstantPoolConstant.CONSTANT_Float :
-						case ConstantPoolConstant.CONSTANT_Double :
-						case ConstantPoolConstant.CONSTANT_Integer :
-						case ConstantPoolConstant.CONSTANT_Utf8 :
-							break;
-						default :
-							throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					this.constantValue = constantPoolEntry;
-				}
-				this.readOffset += 2;
-				break;
-			case 'e' :
-				int index = u2At(classFileBytes, this.readOffset, offset);
-				this.enumConstantTypeNameIndex = index;
-				if (index != 0) {
-					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					this.enumConstantTypeName = constantPoolEntry.getUtf8Value();
-				}
-				this.readOffset += 2;
-				index = u2At(classFileBytes, this.readOffset, offset);
-				this.enumConstantNameIndex = index;
-				if (index != 0) {
-					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					this.enumConstantName = constantPoolEntry.getUtf8Value();
-				}
-				this.readOffset += 2;
-				break;
-			case 'c' :
-				final int classFileIndex = u2At(classFileBytes, this.readOffset, offset);
-				this.classFileInfoIndex = classFileIndex;
-				if (classFileIndex != 0) {
-					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(classFileIndex);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					this.classInfo = constantPoolEntry;
-				}
-				this.readOffset += 2;
-				break;
-			case '@' :
-				Annotation annotation = new Annotation(classFileBytes, constantPool, this.readOffset + offset);
-				this.annotationValue = annotation;
-				this.readOffset += annotation.sizeInBytes();
-				break;
-			case '[' :
-				final int numberOfValues = u2At(classFileBytes, this.readOffset, offset);
-				this.valuesNumber = numberOfValues;
-				this.readOffset += 2;
-				if (numberOfValues != 0) {
-					this.annotationComponentValues = new AnnotationComponentValue[numberOfValues];
-					for (int i = 0; i < numberOfValues; i++) {
-						AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
-						this.annotationComponentValues[i] = value;
-						this.readOffset += value.sizeInBytes();
-					}
-				} else {
-					this.annotationComponentValues = NO_VALUES;
-				}
-				break;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationComponentValues()
-	 */
-	public AnnotationComponentValue[] getAnnotationComponentValues() {
-		return this.annotationComponentValues;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationValue()
-	 */
-	public Annotation getAnnotationValue() {
-		return this.annotationValue;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfo()
-	 */
-	public ConstantPoolEntry getClassInfo() {
-		return this.classInfo;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfoIndex()
-	 */
-	public int getClassInfoIndex() {
-		return this.classFileInfoIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValue()
-	 */
-	public ConstantPoolEntry getConstantValue() {
-		return this.constantValue;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValueIndex()
-	 */
-	public int getConstantValueIndex() {
-		return this.constantValueIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantName()
-	 */
-	public char[] getEnumConstantName() {
-		return this.enumConstantName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantNameIndex()
-	 */
-	public int getEnumConstantNameIndex() {
-		return this.enumConstantNameIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeName()
-	 */
-	public char[] getEnumConstantTypeName() {
-		return this.enumConstantTypeName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeNameIndex()
-	 */
-	public int getEnumConstantTypeNameIndex() {
-		return this.enumConstantTypeNameIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getTag()
-	 */
-	public int getTag() {
-		return this.tag;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getValuesNumber()
-	 */
-	public int getValuesNumber() {
-		return this.valuesNumber;
-	}
-
-	int sizeInBytes() {
-		return this.readOffset;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java
deleted file mode 100644
index a52692c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AnnotationDefaultAttribute.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class AnnotationDefaultAttribute extends ClassFileAttribute {
-
-	private AnnotationComponentValue memberValue;
-
-	/**
-	 * Constructor for AnnotationDefaultAttribute.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public AnnotationDefaultAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.memberValue = new AnnotationComponentValue(classFileBytes, constantPool, offset + 6);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IAnnotationDefaultAttribute#getMemberValue()
-	 */
-	public AnnotationComponentValue getMemberValue() {
-		return this.memberValue;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java
deleted file mode 100644
index 3f55bfc..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/AttributeNamesConstants.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public interface AttributeNamesConstants {
-	/*
-	 * "Synthetic" attribute.
-	 * <p>Note that prior to JDK 1.5, synthetic elements were always marked
-	 * using an attribute; with 1.5, synthetic elements can also be marked
-	 * using the {@link IModifierConstants#ACC_SYNTHETIC} flag.
-	 * </p>
-	 * @since 2.0
-	 */
-	char[] SYNTHETIC = "Synthetic".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "ConstantValue" attribute.
-	 * @since 2.0
-	 */
-	char[] CONSTANT_VALUE = "ConstantValue".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "LineNumberTable" attribute.
-	 * @since 2.0
-	 */
-	char[] LINE_NUMBER = "LineNumberTable".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "LocalVariableTable" attribute.
-	 * @since 2.0
-	 */
-	char[] LOCAL_VARIABLE = "LocalVariableTable".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "InnerClasses" attribute.
-	 * @since 2.0
-	 */
-	char[] INNER_CLASSES = "InnerClasses".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "Code" attribute.
-	 * @since 2.0
-	 */
-	char[] CODE = "Code".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "Exceptions" attribute.
-	 * @since 2.0
-	 */
-	char[] EXCEPTIONS = "Exceptions".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "SourceFile" attribute.
-	 * @since 2.0
-	 */
-	char[] SOURCE = "SourceFile".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "Deprecated" attribute.
-	 * @since 2.0
-	 */
-	char[] DEPRECATED = "Deprecated".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "Signature" attribute (added in J2SE 1.5).
-	 * Class file readers which support J2SE 1.5 return
-	 * attributes with this name represented by objects
-	 * implementing {@link ISignatureAttribute}.
-	 * @since 3.0
-	 */
-	char[] SIGNATURE = "Signature".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "EnclosingMethod" attribute (added in J2SE 1.5).
-	 * Class file readers which support J2SE 1.5 return
-	 * attributes with this name represented by objects
-	 * implementing {@link IEnclosingMethodAttribute}.
-	 * @since 3.0
-	 */
-	char[] ENCLOSING_METHOD = "EnclosingMethod".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "LocalVariableTypeTable" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] LOCAL_VARIABLE_TYPE_TABLE = "LocalVariableTypeTable".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "RuntimeVisibleAnnotations" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] RUNTIME_VISIBLE_ANNOTATIONS = "RuntimeVisibleAnnotations".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "RuntimeInvisibleAnnotations" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] RUNTIME_INVISIBLE_ANNOTATIONS = "RuntimeInvisibleAnnotations".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "RuntimeVisibleParameterAnnotations" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = "RuntimeVisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "RuntimeInvisibleParameterAnnotations" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = "RuntimeInvisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "AnnotationDefault" attribute (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	char[] ANNOTATION_DEFAULT = "AnnotationDefault".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "StackMapTable" attribute (added in J2SE 1.6).
-	 * @since 3.2
-	 */
-	char[] STACK_MAP_TABLE = "StackMapTable".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "StackMap" attribute (added in cldc1.0).
-	 * @since 3.2
-	 */
-	char[] STACK_MAP = "StackMap".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * "Varargs" attribute (unspecified).
-	 */
-	char[] VAR_ARGS = "Varargs".toCharArray(); //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java
deleted file mode 100644
index 2f1ae4d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CharOperation.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public final class CharOperation {
-	public static final char[] This = "this".toCharArray(); //$NON-NLS-1$
-
-	public static final char[] JAVA_LANG_ANNOTATION_DOCUMENTED = "Ljava/lang/annotation/Documented;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_ANNOTATION_ELEMENTTYPE = "Ljava/lang/annotation/ElementType;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_ANNOTATION_RETENTION = "Ljava/lang/annotation/Retention;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = "Ljava/lang/annotation/RetentionPolicy;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_ANNOTATION_TARGET = "Ljava/lang/annotation/Target;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_DEPRECATED = "Ljava/lang/Deprecated;".toCharArray(); //$NON-NLS-1$
-	public static final char[] JAVA_LANG_ANNOTATION_INHERITED = "Ljava/lang/annotation/Inherited;".toCharArray(); //$NON-NLS-1$
-	/**
-	 * Constant for an empty char array
-	 */
-	public static final char[] NO_CHAR = new char[0];
-
-	/**
-	 * Constant for an empty char array with two dimensions.
-	 */
-	public static final char[][] NO_CHAR_CHAR = new char[0][];
-
-	/**
-	 * Answers a hashcode for the array
-	 *
-	 * @param array the array for which a hashcode is required
-	 * @return the hashcode
-	 * @throws NullPointerException if array is null
-	 */
-	public static final int hashCode(char[] array) {
-		int length = array.length;
-		int hash = length == 0 ? 31 : array[0];
-		if (length < 8) {
-			for (int i = length; --i > 0;)
-				hash = (hash * 31) + array[i];
-		} else {
-			// 8 characters is enough to compute a decent hash code, don't waste time examining every character
-			for (int i = length - 1, last = i > 16 ? i - 16 : 0; i > last; i -= 2)
-				hash = (hash * 31) + array[i];
-		}
-		return hash & 0x7FFFFFFF;
-	}
-
-	/**
-	 * Answers the last index in the array for which the corresponding character is
-	 * equal to toBeFound starting from the end of the array.
-	 * Answers -1 if no occurrence of this character is found.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    toBeFound = 'c'
-	 *    array = { ' a', 'b', 'c', 'd' , 'c', 'e' }
-	 *    result => 4
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    toBeFound = 'e'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    result => -1
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param toBeFound the character to search
-	 * @param array the array to be searched
-	 * @return the last index in the array for which the corresponding character is
-	 * equal to toBeFound starting from the end of the array, -1 otherwise
-	 * @throws NullPointerException if array is null
-	 */
-	public static final int lastIndexOf(char toBeFound, char[] array) {
-		for (int i = array.length; --i >= 0;)
-			if (toBeFound == array[i])
-				return i;
-		return -1;
-	}
-
-	/**
-	 * Return a new array which is the split of the given array using the given divider.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    divider = 'b'
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    result => { { 'a' }, {  }, { 'a' }, { 'a' } }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    divider = 'c'
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    divider = 'c'
-	 *    array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' }
-	 *    result => { { ' ', 'a', 'b', 'b', 'a', 'b', 'a', ' ' } }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param divider the given divider
-	 * @param array the given array
-	 * @return a new array which is the split of the given array using the given divider
-	 */
-	public static final char[][] splitOn(char divider, char[] array) {
-		int length = array == null ? 0 : array.length;
-		if (length == 0)
-			return NO_CHAR_CHAR;
-
-		int wordCount = 1;
-		for (int i = 0; i < length; i++)
-			if (array[i] == divider)
-				wordCount++;
-		char[][] split = new char[wordCount][];
-		int last = 0, currentWord = 0;
-		for (int i = 0; i < length; i++) {
-			if (array[i] == divider) {
-				split[currentWord] = new char[i - last];
-				System.arraycopy(array, last, split[currentWord++], 0, i - last);
-				last = i + 1;
-			}
-		}
-		split[currentWord] = new char[length - last];
-		System.arraycopy(array, last, split[currentWord], 0, length - last);
-		return split;
-	}
-
-	/**
-	 * Answers the first index in the array for which the corresponding character is
-	 * equal to toBeFound starting the search at index start.
-	 * Answers -1 if no occurrence of this character is found.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    toBeFound = 'c'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    start = 2
-	 *    result => 2
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    toBeFound = 'c'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    start = 3
-	 *    result => -1
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    toBeFound = 'e'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    start = 1
-	 *    result => -1
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param toBeFound the character to search
-	 * @param array the array to be searched
-	 * @param start the starting index
-	 * @return the first index in the array for which the corresponding character is
-	 * equal to toBeFound, -1 otherwise
-	 * @throws NullPointerException if array is null
-	 * @throws ArrayIndexOutOfBoundsException if  start is lower than 0
-	 */
-	public static final int indexOf(char toBeFound, char[] array, int start) {
-		for (int i = start; i < array.length; i++)
-			if (toBeFound == array[i])
-				return i;
-		return -1;
-	}
-
-	/**
-	 * Answers a new array with prepending the prefix character and appending the suffix
-	 * character at the end of the array. If array is null, it answers a new array containing the
-	 * prefix and the suffix characters.
-	 * <br>
-	 * <br>
-	 * For example:<br>
-	 * <ol>
-	 * <li><pre>
-	 *    prefix = 'a'
-	 *    array = { 'b' }
-	 *    suffix = 'c'
-	 *    => result = { 'a', 'b' , 'c' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    prefix = 'a'
-	 *    array = null
-	 *    suffix = 'c'
-	 *    => result = { 'a', 'c' }
-	 * </pre></li>
-	 * </ol>
-	 *
-	 * @param prefix the prefix character
-	 * @param array the array that is concatenated with the prefix and suffix characters
-	 * @param suffix the suffix character
-	 * @return the new array
-	 */
-	public static final char[] concat(char prefix, char[] array, char suffix) {
-		if (array == null)
-			return new char[] {prefix, suffix};
-
-		int length = array.length;
-		char[] result = new char[length + 2];
-		result[0] = prefix;
-		System.arraycopy(array, 0, result, 1, length);
-		result[length + 1] = suffix;
-		return result;
-	}
-
-	/**
-	 * Answers the concatenation of the three arrays. It answers null if the three arrays are null.
-	 * If first is null, it answers the concatenation of second and third.
-	 * If second is null, it answers the concatenation of first and third.
-	 * If third is null, it answers the concatenation of first and second.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    first = null
-	 *    second = { 'a' }
-	 *    third = { 'b' }
-	 *    => result = { ' a', 'b' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = { 'a' }
-	 *    second = null
-	 *    third = { 'b' }
-	 *    => result = { ' a', 'b' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = { 'a' }
-	 *    second = { 'b' }
-	 *    third = null
-	 *    => result = { ' a', 'b' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = null
-	 *    second = null
-	 *    third = null
-	 *    => result = null
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = { 'a' }
-	 *    second = { 'b' }
-	 *    third = { 'c' }
-	 *    => result = { 'a', 'b', 'c' }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param first the first array to concatenate
-	 * @param second the second array to concatenate
-	 * @param third the third array to concatenate
-	 *
-	 * @return the concatenation of the three arrays, or null if the three arrays are null.
-	 */
-	public static final char[] concat(char[] first, char[] second, char[] third) {
-		if (first == null)
-			return concat(second, third);
-		if (second == null)
-			return concat(first, third);
-		if (third == null)
-			return concat(first, second);
-
-		int length1 = first.length;
-		int length2 = second.length;
-		int length3 = third.length;
-		char[] result = new char[length1 + length2 + length3];
-		System.arraycopy(first, 0, result, 0, length1);
-		System.arraycopy(second, 0, result, length1, length2);
-		System.arraycopy(third, 0, result, length1 + length2, length3);
-		return result;
-	}
-
-	/**
-	 * Answers the concatenation of the two arrays. It answers null if the two arrays are null.
-	 * If the first array is null, then the second array is returned.
-	 * If the second array is null, then the first array is returned.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    first = null
-	 *    second = { 'a' }
-	 *    => result = { ' a' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = { ' a' }
-	 *    second = null
-	 *    => result = { ' a' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    first = { ' a' }
-	 *    second = { ' b' }
-	 *    => result = { ' a' , ' b' }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param first the first array to concatenate
-	 * @param second the second array to concatenate
-	 * @return the concatenation of the two arrays, or null if the two arrays are null.
-	 */
-	public static final char[] concat(char[] first, char[] second) {
-		if (first == null)
-			return second;
-		if (second == null)
-			return first;
-
-		int length1 = first.length;
-		int length2 = second.length;
-		char[] result = new char[length1 + length2];
-		System.arraycopy(first, 0, result, 0, length1);
-		System.arraycopy(second, 0, result, length1, length2);
-		return result;
-	}
-
-	/**
-	 * Replace all occurrence of the character to be replaced with the replacement character in the
-	 * given array.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    toBeReplaced = 'b'
-	 *    replacementChar = 'a'
-	 *    result => No returned value, but array is now equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    toBeReplaced = 'c'
-	 *    replacementChar = 'a'
-	 *    result => No returned value, but array is now equals to { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param array the given array
-	 * @param toBeReplaced the character to be replaced
-	 * @param replacementChar the replacement character
-	 * @throws NullPointerException if the given array is null
-	 */
-	public static final void replace(char[] array, char toBeReplaced, char replacementChar) {
-		if (toBeReplaced != replacementChar) {
-			for (int i = 0, max = array.length; i < max; i++) {
-				if (array[i] == toBeReplaced)
-					array[i] = replacementChar;
-			}
-		}
-	}
-
-	/**
-	 * Replace all occurrence of the character to be replaced with the replacement character
-	 * in a copy of the given array. Returns the given array if no occurrences of the character
-	 * to be replaced are found.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    toBeReplaced = 'b'
-	 *    replacementChar = 'a'
-	 *    result => A new array that is equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    toBeReplaced = 'c'
-	 *    replacementChar = 'a'
-	 *    result => The original array that remains unchanged.
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param array the given array
-	 * @param toBeReplaced the character to be replaced
-	 * @param replacementChar the replacement character
-	 * @throws NullPointerException if the given array is null
-	 * @since 3.1
-	 */
-	public static final char[] replaceOnCopy(char[] array, char toBeReplaced, char replacementChar) {
-
-		char[] result = null;
-		for (int i = 0, length = array.length; i < length; i++) {
-			char c = array[i];
-			if (c == toBeReplaced) {
-				if (result == null) {
-					result = new char[length];
-					System.arraycopy(array, 0, result, 0, i);
-				}
-				result[i] = replacementChar;
-			} else if (result != null) {
-				result[i] = c;
-			}
-		}
-		if (result == null)
-			return array;
-		return result;
-	}
-
-	/**
-	 * Answers the first index in the array for which the corresponding character is
-	 * equal to toBeFound. Answers -1 if no occurrence of this character is found.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    toBeFound = 'c'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    result => 2
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    toBeFound = 'e'
-	 *    array = { ' a', 'b', 'c', 'd' }
-	 *    result => -1
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param toBeFound the character to search
-	 * @param array the array to be searched
-	 * @return the first index in the array for which the corresponding character is
-	 * equal to toBeFound, -1 otherwise
-	 * @throws NullPointerException if array is null
-	 */
-	public static final int indexOf(char toBeFound, char[] array) {
-		return indexOf(toBeFound, array, 0);
-	}
-
-	/**
-	 * Answers a new array which is a copy of the given array starting at the given start and
-	 * ending at the given end. The given start is inclusive and the given end is exclusive.
-	 * Answers null if start is greater than end, if start is lower than 0 or if end is greater
-	 * than the length of the given array. If end  equals -1, it is converted to the array length.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    array = { 'a' , 'b' }
-	 *    start = 0
-	 *    end = 1
-	 *    result => { 'a' }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    array = { 'a', 'b' }
-	 *    start = 0
-	 *    end = -1
-	 *    result => { 'a' , 'b' }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param array the given array
-	 * @param start the given starting index
-	 * @param end the given ending index
-	 * @return a new array which is a copy of the given array starting at the given start and
-	 * ending at the given end
-	 * @throws NullPointerException if the given array is null
-	 */
-	public static final char[] subarray(char[] array, int start, int end) {
-		if (end == -1)
-			end = array.length;
-		if (start > end)
-			return null;
-		if (start < 0)
-			return null;
-		if (end > array.length)
-			return null;
-
-		char[] result = new char[end - start];
-		System.arraycopy(array, start, result, 0, end - start);
-		return result;
-	}
-
-	/**
-	 * Answers a new array which is a copy of the given array starting at the given start and
-	 * ending at the given end. The given start is inclusive and the given end is exclusive.
-	 * Answers null if start is greater than end, if start is lower than 0 or if end is greater
-	 * than the length of the given array. If end  equals -1, it is converted to the array length.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    array = { { 'a' } , { 'b' } }
-	 *    start = 0
-	 *    end = 1
-	 *    result => { { 'a' } }
-	 * </pre>
-	 * </li>
-	 * <li><pre>
-	 *    array = { { 'a' } , { 'b' } }
-	 *    start = 0
-	 *    end = -1
-	 *    result => { { 'a' }, { 'b' } }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param array the given array
-	 * @param start the given starting index
-	 * @param end the given ending index
-	 * @return a new array which is a copy of the given array starting at the given start and
-	 * ending at the given end
-	 * @throws NullPointerException if the given array is null
-	 */
-	public static final char[][] subarray(char[][] array, int start, int end) {
-		if (end == -1)
-			end = array.length;
-		if (start > end)
-			return null;
-		if (start < 0)
-			return null;
-		if (end > array.length)
-			return null;
-
-		char[][] result = new char[end - start][];
-		System.arraycopy(array, start, result, 0, end - start);
-		return result;
-	}
-
-	/**
-	 * Return a new array which is the split of the given array using the given divider. The given end
-	 * is exclusive and the given start is inclusive.
-	 * <br>
-	 * <br>
-	 * For example:
-	 * <ol>
-	 * <li><pre>
-	 *    divider = 'b'
-	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
-	 *    start = 2
-	 *    end = 5
-	 *    result => { {  }, { 'a' }, {  } }
-	 * </pre>
-	 * </li>
-	 * </ol>
-	 *
-	 * @param divider the given divider
-	 * @param array the given array
-	 * @param start the given starting index
-	 * @param end the given ending index
-	 * @return a new array which is the split of the given array using the given divider
-	 * @throws ArrayIndexOutOfBoundsException if start is lower than 0 or end is greater than the array length
-	 */
-	public static final char[][] splitOn(char divider, char[] array, int start, int end) {
-		int length = array == null ? 0 : array.length;
-		if (length == 0 || start > end)
-			return NO_CHAR_CHAR;
-
-		int wordCount = 1;
-		for (int i = start; i < end; i++)
-			if (array[i] == divider)
-				wordCount++;
-		char[][] split = new char[wordCount][];
-		int last = start, currentWord = 0;
-		for (int i = start; i < end; i++) {
-			if (array[i] == divider) {
-				split[currentWord] = new char[i - last];
-				System.arraycopy(array, last, split[currentWord++], 0, i - last);
-				last = i + 1;
-			}
-		}
-		split[currentWord] = new char[end - last];
-		System.arraycopy(array, last, split[currentWord], 0, end - last);
-		return split;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java
deleted file mode 100644
index 0522580..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileAttribute.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ClassFileAttribute extends ClassFileStruct {
-	public static final ClassFileAttribute[] NO_ATTRIBUTES = new ClassFileAttribute[0];
-	private long attributeLength;
-	private int attributeNameIndex;
-	private char[] attributeName;
-
-	public ClassFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		this.attributeNameIndex = u2At(classFileBytes, 0, offset);
-		this.attributeLength = u4At(classFileBytes, 2, offset);
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.attributeNameIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.attributeName = constantPoolEntry.getUtf8Value();
-	}
-
-	public int getAttributeNameIndex() {
-		return this.attributeNameIndex;
-	}
-
-	/*
-	 * @see IClassFileAttribute#getAttributeName()
-	 */
-	public char[] getAttributeName() {
-		return this.attributeName;
-	}
-
-	/*
-	 * @see IClassFileAttribute#getAttributeLength()
-	 */
-	public long getAttributeLength() {
-		return this.attributeLength;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java
deleted file mode 100644
index 61765ef..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileReader.java
+++ /dev/null
@@ -1,468 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class ClassFileReader extends ClassFileStruct {
-	/*
-	 * This value should be used to read completely each part of a .class file.
-	 */
-	public static final int ALL = 0xFFFF;
-
-	/*
-	 * This value should be used to read only the constant pool entries of a .class file.
-	 */
-	public static final int CONSTANT_POOL = 0x0001;
-
-	/*
-	 * This value should be used to read the constant pool entries and
-	 * the method infos of a .class file.
-	 */
-	public static final int METHOD_INFOS = 0x0002 + CONSTANT_POOL;
-
-	/*
-	 * This value should be used to read the constant pool entries and
-	 * the field infos of a .class file.
-	 */
-	public static final int FIELD_INFOS = 0x0004 + CONSTANT_POOL;
-
-	/*
-	 * This value should be used to read the constant pool entries and
-	 * the super interface names of a .class file.
-	 */
-	public static final int SUPER_INTERFACES = 0x0008 + CONSTANT_POOL;
-
-	/*
-	 * This value should be used to read the constant pool entries and
-	 * the attributes of a .class file.
-	 */
-	public static final int CLASSFILE_ATTRIBUTES = 0x0010 + CONSTANT_POOL;
-
-	/*
-	 * This value should be used to read the method bodies.
-	 * It has to be used with METHOD_INFOS.
-	 */
-	public static final int METHOD_BODIES = 0x0020;
-
-	/*
-	 * This value should be used to read the whole contents of the .class file except the
-	 * method bodies.
-	 */
-	public static final int ALL_BUT_METHOD_BODIES = ALL & ~METHOD_BODIES;
-
-	private static final FieldInfo[] NO_FIELD_INFOS = new FieldInfo[0];
-	private static final char[][] NO_INTERFACES_NAMES = CharOperation.NO_CHAR_CHAR;
-	private static final MethodInfo[] NO_METHOD_INFOS = new MethodInfo[0];
-	private int accessFlags;
-	private ClassFileAttribute[] attributes;
-	private int attributesCount;
-	private char[] className;
-	private int classNameIndex;
-
-	private ConstantPool constantPool;
-	private FieldInfo[] fields;
-	private int fieldsCount;
-	private InnerClassesAttribute innerClassesAttribute;
-	private int[] interfaceIndexes;
-	private char[][] interfaceNames;
-	private int interfacesCount;
-	private int magicNumber;
-	private int majorVersion;
-	private MethodInfo[] methods;
-	private int methodsCount;
-	private int minorVersion;
-	private SourceFileAttribute sourceFileAttribute;
-	private char[] superclassName;
-	private int superclassNameIndex;
-
-	/*
-	 * Constructor for ClassFileReader.
-	 *
-	 * @param classFileBytes the raw bytes of the .class file
-	 * @param decodingFlags the decoding flags
-	 *
-	 * @see IClassFileReader#ALL
-	 * @see IClassFileReader#CLASSFILE_ATTRIBUTES
-	 * @see IClassFileReader#CONSTANT_POOL
-	 * @see IClassFileReader#FIELD_INFOS
-	 */
-	public ClassFileReader(byte[] classFileBytes, int decodingFlags) throws ClassFormatException {
-
-		// This method looks ugly but is actually quite simple, the constantPool is constructed
-		// in 3 passes.  All non-primitive constant pool members that usually refer to other members
-		// by index are tweaked to have their value in inst vars, this minor cost at read-time makes
-		// all subsequent uses of the constant pool element faster.
-		int constantPoolCount;
-		int[] constantPoolOffsets;
-		try {
-			this.magicNumber = (int) u4At(classFileBytes, 0, 0);
-			if (this.magicNumber != 0xCAFEBABE) {
-				throw new ClassFormatException(ClassFormatException.INVALID_MAGIC_NUMBER);
-			}
-
-			int readOffset = 10;
-			this.minorVersion = u2At(classFileBytes, 4, 0);
-			this.majorVersion = u2At(classFileBytes, 6, 0);
-
-			if ((decodingFlags & CONSTANT_POOL) == 0) {
-				// no need to go further
-				return;
-			}
-
-			constantPoolCount = u2At(classFileBytes, 8, 0);
-			// Pass #1 - Fill in all primitive constants
-			constantPoolOffsets = new int[constantPoolCount];
-			for (int i = 1; i < constantPoolCount; i++) {
-				int tag = u1At(classFileBytes, readOffset, 0);
-				switch (tag) {
-					case ConstantPoolConstant.CONSTANT_Utf8 :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += u2At(classFileBytes, readOffset + 1, 0);
-						readOffset += ConstantPoolConstant.CONSTANT_Utf8_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_Integer :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Integer_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_Float :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Float_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_Long :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Long_SIZE;
-						i++;
-						break;
-					case ConstantPoolConstant.CONSTANT_Double :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Double_SIZE;
-						i++;
-						break;
-					case ConstantPoolConstant.CONSTANT_Class :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Class_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_String :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_String_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_Fieldref :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Fieldref_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_Methodref :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_Methodref_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_InterfaceMethodref_SIZE;
-						break;
-					case ConstantPoolConstant.CONSTANT_NameAndType :
-						constantPoolOffsets[i] = readOffset;
-						readOffset += ConstantPoolConstant.CONSTANT_NameAndType_SIZE;
-						break;
-					default :
-						throw new ClassFormatException(ClassFormatException.INVALID_TAG_CONSTANT);
-				}
-			}
-
-			this.constantPool = new ConstantPool(classFileBytes, constantPoolOffsets);
-			// Read and validate access flags
-			this.accessFlags = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-
-			// Read the classname, use exception handlers to catch bad format
-			this.classNameIndex = u2At(classFileBytes, readOffset, 0);
-			this.className = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.classNameIndex);
-			readOffset += 2;
-
-			// Read the superclass name, can be zero for java.lang.Object
-			this.superclassNameIndex = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-			// if superclassNameIndex is equals to 0 there is no need to set a value for the
-			// field this.superclassName. null is fine.
-			if (this.superclassNameIndex != 0) {
-				this.superclassName = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.superclassNameIndex);
-			}
-
-			// Read the interfaces, use exception handlers to catch bad format
-			this.interfacesCount = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-			this.interfaceNames = NO_INTERFACES_NAMES;
-			this.interfaceIndexes = Utility.EMPTY_INT_ARRAY;
-			if (this.interfacesCount != 0) {
-				if ((decodingFlags & SUPER_INTERFACES) != CONSTANT_POOL) {
-					this.interfaceNames = new char[this.interfacesCount][];
-					this.interfaceIndexes = new int[this.interfacesCount];
-					for (int i = 0; i < this.interfacesCount; i++) {
-						this.interfaceIndexes[i] = u2At(classFileBytes, readOffset, 0);
-						this.interfaceNames[i] = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.interfaceIndexes[i]);
-						readOffset += 2;
-					}
-				} else {
-					readOffset += (2 * this.interfacesCount);
-				}
-			}
-			// Read the this.fields, use exception handlers to catch bad format
-			this.fieldsCount = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-			this.fields = NO_FIELD_INFOS;
-			if (this.fieldsCount != 0) {
-				if ((decodingFlags & FIELD_INFOS) != CONSTANT_POOL) {
-					FieldInfo field;
-					this.fields = new FieldInfo[this.fieldsCount];
-					for (int i = 0; i < this.fieldsCount; i++) {
-						field = new FieldInfo(classFileBytes, this.constantPool, readOffset);
-						this.fields[i] = field;
-						readOffset += field.sizeInBytes();
-					}
-				} else {
-					for (int i = 0; i < this.fieldsCount; i++) {
-						int attributeCountForField = u2At(classFileBytes, 6, readOffset);
-						readOffset += 8;
-						if (attributeCountForField != 0) {
-							for (int j = 0; j < attributeCountForField; j++) {
-								int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
-								readOffset += (6 + attributeLength);
-							}
-						}
-					}
-				}
-			}
-			// Read the this.methods
-			this.methodsCount = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-			this.methods = NO_METHOD_INFOS;
-			if (this.methodsCount != 0) {
-				if ((decodingFlags & METHOD_INFOS) != CONSTANT_POOL) {
-					this.methods = new MethodInfo[this.methodsCount];
-					MethodInfo method;
-					for (int i = 0; i < this.methodsCount; i++) {
-						method = new MethodInfo(classFileBytes, this.constantPool, readOffset, decodingFlags);
-						this.methods[i] = method;
-						readOffset += method.sizeInBytes();
-					}
-				} else {
-					for (int i = 0; i < this.methodsCount; i++) {
-						int attributeCountForMethod = u2At(classFileBytes, 6, readOffset);
-						readOffset += 8;
-						if (attributeCountForMethod != 0) {
-							for (int j = 0; j < attributeCountForMethod; j++) {
-								int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
-								readOffset += (6 + attributeLength);
-							}
-						}
-					}
-				}
-			}
-
-			// Read the attributes
-			this.attributesCount = u2At(classFileBytes, readOffset, 0);
-			readOffset += 2;
-
-			int attributesIndex = 0;
-			this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
-			if (this.attributesCount != 0) {
-				if ((decodingFlags & CLASSFILE_ATTRIBUTES) != CONSTANT_POOL) {
-					this.attributes = new ClassFileAttribute[this.attributesCount];
-					for (int i = 0; i < this.attributesCount; i++) {
-						int utf8Offset = constantPoolOffsets[u2At(classFileBytes, readOffset, 0)];
-						char[] attributeName = utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
-						if (Arrays.equals(attributeName, AttributeNamesConstants.INNER_CLASSES)) {
-							this.innerClassesAttribute = new InnerClassesAttribute(classFileBytes, this.constantPool, readOffset);
-							this.attributes[attributesIndex++] = this.innerClassesAttribute;
-						} else if (Arrays.equals(attributeName, AttributeNamesConstants.SOURCE)) {
-							this.sourceFileAttribute = new SourceFileAttribute(classFileBytes, this.constantPool, readOffset);
-							this.attributes[attributesIndex++] = this.sourceFileAttribute;
-						} else if (Arrays.equals(attributeName, AttributeNamesConstants.ENCLOSING_METHOD)) {
-							this.attributes[attributesIndex++] = new EnclosingMethodAttribute(classFileBytes, this.constantPool, readOffset);
-						} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
-							this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, this.constantPool, readOffset);
-						} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
-							this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
-						} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
-							this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
-						} else {
-							this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, this.constantPool, readOffset);
-						}
-						readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
-					}
-				} else {
-					for (int i = 0; i < this.attributesCount; i++) {
-						readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
-					}
-				}
-			}
-			if (readOffset != classFileBytes.length) {
-				throw new ClassFormatException(ClassFormatException.TOO_MANY_BYTES);
-			}
-		} catch (ClassFormatException e) {
-			throw e;
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new ClassFormatException(ClassFormatException.ERROR_TRUNCATED_INPUT);
-		}
-	}
-
-	/*
-	 * @see IClassFileReader#getAccessFlags()
-	 */
-	public int getAccessFlags() {
-		return this.accessFlags;
-	}
-
-	/*
-	 * @see IClassFileReader#getAttributeCount()
-	 */
-	public int getAttributeCount() {
-		return this.attributesCount;
-	}
-
-	/*
-	 * @see IClassFileReader#getAttributes()
-	 */
-	public ClassFileAttribute[] getAttributes() {
-		return this.attributes;
-	}
-
-	/*
-	 * @see IClassFileReader#getClassIndex()
-	 */
-	public int getClassIndex() {
-		return this.classNameIndex;
-	}
-
-	/*
-	 * @see IClassFileReader#getClassName()
-	 */
-	public char[] getClassName() {
-		return this.className;
-	}
-
-	private char[] getConstantClassNameAt(byte[] classFileBytes, int[] constantPoolOffsets, int constantPoolIndex) {
-		int utf8Offset = constantPoolOffsets[u2At(classFileBytes, constantPoolOffsets[constantPoolIndex] + 1, 0)];
-		return utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
-	}
-
-	/*
-	 * @see IClassFileReader#getConstantPool()
-	 */
-	public ConstantPool getConstantPool() {
-		return this.constantPool;
-	}
-
-	/*
-	 * @see IClassFileReader#getFieldInfos()
-	 */
-	public FieldInfo[] getFieldInfos() {
-		return this.fields;
-	}
-
-	/*
-	 * @see IClassFileReader#getFieldsCount()
-	 */
-	public int getFieldsCount() {
-		return this.fieldsCount;
-	}
-
-	/*
-	 * @see IClassFileReader#getInnerClassesAttribute()
-	 */
-	public InnerClassesAttribute getInnerClassesAttribute() {
-		return this.innerClassesAttribute;
-	}
-
-	/*
-	 * @see IClassFileReader#getInterfaceIndexes()
-	 */
-	public int[] getInterfaceIndexes() {
-		return this.interfaceIndexes;
-	}
-
-	/*
-	 * @see IClassFileReader#getInterfaceNames()
-	 */
-	public char[][] getInterfaceNames() {
-		return this.interfaceNames;
-	}
-
-	/*
-	 * @see IClassFileReader#getMagic()
-	 */
-	public int getMagic() {
-		return this.magicNumber;
-	}
-
-	/*
-	 * @see IClassFileReader#getMajorVersion()
-	 */
-	public int getMajorVersion() {
-		return this.majorVersion;
-	}
-
-	/*
-	 * @see IClassFileReader#getMethodInfos()
-	 */
-	public MethodInfo[] getMethodInfos() {
-		return this.methods;
-	}
-
-	/*
-	 * @see IClassFileReader#getMethodsCount()
-	 */
-	public int getMethodsCount() {
-		return this.methodsCount;
-	}
-
-	/*
-	 * @see IClassFileReader#getMinorVersion()
-	 */
-	public int getMinorVersion() {
-		return this.minorVersion;
-	}
-
-	/*
-	 * @see IClassFileReader#getSourceFileAttribute()
-	 */
-	public SourceFileAttribute getSourceFileAttribute() {
-		return this.sourceFileAttribute;
-	}
-
-	/*
-	 * @see IClassFileReader#getSuperclassIndex()
-	 */
-	public int getSuperclassIndex() {
-		return this.superclassNameIndex;
-	}
-
-	/*
-	 * @see IClassFileReader#getSuperclassName()
-	 */
-	public char[] getSuperclassName() {
-		return this.superclassName;
-	}
-
-	/*
-	 * @see IClassFileReader#isClass()
-	 */
-	public boolean isClass() {
-		return !isInterface();
-	}
-
-	/*
-	 * @see IClassFileReader#isInterface()
-	 */
-	public boolean isInterface() {
-		return (getAccessFlags() & IModifierConstants.ACC_INTERFACE) != 0;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java
deleted file mode 100644
index a8c6038..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFileStruct.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public abstract class ClassFileStruct {
-
-	protected double doubleAt(byte[] reference, int relativeOffset, int structOffset) {
-		return (Double.longBitsToDouble(i8At(reference, relativeOffset, structOffset)));
-	}
-
-	protected float floatAt(byte[] reference, int relativeOffset, int structOffset) {
-		return (Float.intBitsToFloat(i4At(reference, relativeOffset, structOffset)));
-	}
-
-	protected int i1At(byte[] reference, int relativeOffset, int structOffset) {
-		return reference[relativeOffset + structOffset];
-	}
-
-	protected int i2At(byte[] reference, int relativeOffset, int structOffset) {
-		int position = relativeOffset + structOffset;
-		return (reference[position++] << 8) + (reference[position] & 0xFF);
-	}
-
-	protected int i4At(byte[] reference, int relativeOffset, int structOffset) {
-		int position = relativeOffset + structOffset;
-		return ((reference[position++] & 0xFF) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
-	}
-
-	protected long i8At(byte[] reference, int relativeOffset, int structOffset) {
-		int position = relativeOffset + structOffset;
-		return (((long) (reference[position++] & 0xFF)) << 56) + (((long) (reference[position++] & 0xFF)) << 48) + (((long) (reference[position++] & 0xFF)) << 40) + (((long) (reference[position++] & 0xFF)) << 32) + (((long) (reference[position++] & 0xFF)) << 24) + (((long) (reference[position++] & 0xFF)) << 16) + (((long) (reference[position++] & 0xFF)) << 8) + (reference[position++] & 0xFF);
-	}
-
-	protected int u1At(byte[] reference, int relativeOffset, int structOffset) {
-		return (reference[relativeOffset + structOffset] & 0xFF);
-	}
-
-	protected int u2At(byte[] reference, int relativeOffset, int structOffset) {
-		int position = relativeOffset + structOffset;
-		return ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
-	}
-
-	protected long u4At(byte[] reference, int relativeOffset, int structOffset) {
-		int position = relativeOffset + structOffset;
-		return (((reference[position++] & 0xFFL) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF));
-	}
-
-	protected char[] utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable) {
-		int length = bytesAvailable;
-		char outputBuf[] = new char[bytesAvailable];
-		int outputPos = 0;
-		int readOffset = structOffset + relativeOffset;
-
-		while (length != 0) {
-			int x = reference[readOffset++] & 0xFF;
-			length--;
-			if ((0x80 & x) != 0) {
-				if ((x & 0x20) != 0) {
-					length -= 2;
-					x = ((x & 0xF) << 12) + ((reference[readOffset++] & 0x3F) << 6) + (reference[readOffset++] & 0x3F);
-				} else {
-					length--;
-					x = ((x & 0x1F) << 6) + (reference[readOffset++] & 0x3F);
-				}
-			}
-			outputBuf[outputPos++] = (char) x;
-		}
-
-		if (outputPos != bytesAvailable) {
-			System.arraycopy(outputBuf, 0, (outputBuf = new char[outputPos]), 0, outputPos);
-		}
-		return outputBuf;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java
deleted file mode 100644
index acff39c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ClassFormatException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ClassFormatException extends Exception {
-
-	public static final int ERROR_MALFORMED_UTF8 = 1;
-	public static final int ERROR_TRUNCATED_INPUT = 2;
-	public static final int INVALID_CONSTANT_POOL_ENTRY = 3;
-	public static final int TOO_MANY_BYTES = 4;
-	public static final int INVALID_ARGUMENTS_FOR_INVOKEINTERFACE = 5;
-	public static final int INVALID_BYTECODE = 6;
-
-	/**
-	 * @since 3.0
-	 */
-	public static final int INVALID_TAG_CONSTANT = 7;
-
-	/**
-	 * @since 3.0
-	 */
-	public static final int INVALID_MAGIC_NUMBER = 8;
-
-	private static final long serialVersionUID = 6582900558320612988L; // backward compatible
-
-	/**
-	 * Constructor for ClassFormatException.
-	 * @param errorID the given error ID
-	 */
-	public ClassFormatException(int errorID) {
-		// TODO (olivier) what is the errorID?
-	}
-
-	/**
-	 * Constructor for ClassFormatException.
-	 * @param message the message for the exception
-	 */
-	public ClassFormatException(String message) {
-		super(message);
-	}
-
-	/**
-	 * Constructor for ClassFormatException.
-	 * @param message the message for the exception
-	 * @param  cause  the cause of the exception
-	 * @since 3.5
-	 */
-	public ClassFormatException(String message, Throwable cause) {
-		super(message, cause);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java
deleted file mode 100644
index 9788468..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/CodeAttribute.java
+++ /dev/null
@@ -1,1114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class CodeAttribute extends ClassFileAttribute {
-	private static final ExceptionTableEntry[] NO_EXCEPTION_TABLE = new ExceptionTableEntry[0];
-	private ClassFileAttribute[] attributes;
-	private int attributesCount;
-	private byte[] bytecodes;
-	private byte[] classFileBytes;
-	private long codeLength;
-	private int codeOffset;
-	private ConstantPool constantPool;
-	private ExceptionTableEntry[] exceptionTableEntries;
-	private int exceptionTableLength;
-	private int maxLocals;
-	private int maxStack;
-
-	CodeAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.classFileBytes = classFileBytes;
-		this.constantPool = constantPool;
-		this.maxStack = u2At(classFileBytes, 6, offset);
-		this.maxLocals = u2At(classFileBytes, 8, offset);
-		this.codeLength = u4At(classFileBytes, 10, offset);
-		this.codeOffset = offset + 14;
-		int readOffset = (int) (14 + this.codeLength);
-		this.exceptionTableLength = u2At(classFileBytes, readOffset, offset);
-		readOffset += 2;
-		this.exceptionTableEntries = NO_EXCEPTION_TABLE;
-		if (this.exceptionTableLength != 0) {
-			this.exceptionTableEntries = new ExceptionTableEntry[this.exceptionTableLength];
-			for (int i = 0; i < this.exceptionTableLength; i++) {
-				this.exceptionTableEntries[i] = new ExceptionTableEntry(classFileBytes, constantPool, offset + readOffset);
-				readOffset += 8;
-			}
-		}
-		this.attributesCount = u2At(classFileBytes, readOffset, offset);
-		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
-		if (this.attributesCount != 0) {
-			this.attributes = new ClassFileAttribute[this.attributesCount];
-		}
-		readOffset += 2;
-		for (int i = 0; i < this.attributesCount; i++) {
-			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
-		}
-	}
-
-	/*
-	 * @see ICodeAttribute#getAttributes()
-	 */
-	public ClassFileAttribute[] getAttributes() {
-		return this.attributes;
-	}
-
-	/*
-	 * @see ICodeAttribute#getAttributesCount()
-	 */
-	public int getAttributesCount() {
-		return this.attributesCount;
-	}
-
-	/*
-	 * @see ICodeAttribute#getBytecodes()
-	 */
-	public byte[] getBytecodes() {
-		if (this.bytecodes == null) {
-			System.arraycopy(this.classFileBytes, this.codeOffset, (this.bytecodes = new byte[(int) this.codeLength]), 0, (int) this.codeLength);
-		}
-		return this.bytecodes;
-	}
-
-	/*
-	 * @see ICodeAttribute#getCodeLength()
-	 */
-	public long getCodeLength() {
-		return this.codeLength;
-	}
-
-	/*
-	 * @see ICodeAttribute#getExceptionTable()
-	 */
-	public ExceptionTableEntry[] getExceptionTable() {
-		return this.exceptionTableEntries;
-	}
-
-	/*
-	 * @see ICodeAttribute#getExceptionTableLength()
-	 */
-	public int getExceptionTableLength() {
-		return this.exceptionTableLength;
-	}
-
-	/*
-	 * @see ICodeAttribute#getMaxLocals()
-	 */
-	public int getMaxLocals() {
-		return this.maxLocals;
-	}
-
-	/*
-	 * @see ICodeAttribute#getMaxStack()
-	 */
-	public int getMaxStack() {
-		return this.maxStack;
-	}
-
-	/*
-	 * @see ICodeAttribute#traverse(IBytecodeVisitor visitor)
-	 */
-	public void traverse(DefaultBytecodeVisitor visitor) throws ClassFormatException {
-		int pc = this.codeOffset;
-		int opcode, index, _const, branchOffset;
-		ConstantPoolEntry constantPoolEntry;
-		while (true) {
-			opcode = u1At(this.classFileBytes, 0, pc);
-			switch (opcode) {
-				case IOpcodeMnemonics.NOP :
-					visitor._nop(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ACONST_NULL :
-					visitor._aconst_null(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_M1 :
-					visitor._iconst_m1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_0 :
-					visitor._iconst_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_1 :
-					visitor._iconst_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_2 :
-					visitor._iconst_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_3 :
-					visitor._iconst_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_4 :
-					visitor._iconst_4(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ICONST_5 :
-					visitor._iconst_5(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LCONST_0 :
-					visitor._lconst_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LCONST_1 :
-					visitor._lconst_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FCONST_0 :
-					visitor._fconst_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FCONST_1 :
-					visitor._fconst_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FCONST_2 :
-					visitor._fconst_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DCONST_0 :
-					visitor._dconst_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DCONST_1 :
-					visitor._dconst_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.BIPUSH :
-					visitor._bipush(pc - this.codeOffset, (byte) i1At(this.classFileBytes, 1, pc));
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.SIPUSH :
-					visitor._sipush(pc - this.codeOffset, (short) i2At(this.classFileBytes, 1, pc));
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.LDC :
-					index = u1At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._ldc(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.LDC_W :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._ldc_w(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.LDC2_W :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Double && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Long) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._ldc2_w(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.ILOAD :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._iload(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.LLOAD :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._lload(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.FLOAD :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._fload(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.DLOAD :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._dload(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.ALOAD :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._aload(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.ILOAD_0 :
-					visitor._iload_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ILOAD_1 :
-					visitor._iload_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ILOAD_2 :
-					visitor._iload_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ILOAD_3 :
-					visitor._iload_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LLOAD_0 :
-					visitor._lload_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LLOAD_1 :
-					visitor._lload_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LLOAD_2 :
-					visitor._lload_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LLOAD_3 :
-					visitor._lload_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FLOAD_0 :
-					visitor._fload_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FLOAD_1 :
-					visitor._fload_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FLOAD_2 :
-					visitor._fload_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FLOAD_3 :
-					visitor._fload_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DLOAD_0 :
-					visitor._dload_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DLOAD_1 :
-					visitor._dload_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DLOAD_2 :
-					visitor._dload_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DLOAD_3 :
-					visitor._dload_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ALOAD_0 :
-					visitor._aload_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ALOAD_1 :
-					visitor._aload_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ALOAD_2 :
-					visitor._aload_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ALOAD_3 :
-					visitor._aload_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IALOAD :
-					visitor._iaload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LALOAD :
-					visitor._laload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FALOAD :
-					visitor._faload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DALOAD :
-					visitor._daload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.AALOAD :
-					visitor._aaload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.BALOAD :
-					visitor._baload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.CALOAD :
-					visitor._caload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.SALOAD :
-					visitor._saload(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISTORE :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._istore(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.LSTORE :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._lstore(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.FSTORE :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._fstore(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.DSTORE :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._dstore(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.ASTORE :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._astore(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.ISTORE_0 :
-					visitor._istore_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISTORE_1 :
-					visitor._istore_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISTORE_2 :
-					visitor._istore_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISTORE_3 :
-					visitor._istore_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSTORE_0 :
-					visitor._lstore_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSTORE_1 :
-					visitor._lstore_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSTORE_2 :
-					visitor._lstore_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSTORE_3 :
-					visitor._lstore_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FSTORE_0 :
-					visitor._fstore_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FSTORE_1 :
-					visitor._fstore_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FSTORE_2 :
-					visitor._fstore_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FSTORE_3 :
-					visitor._fstore_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DSTORE_0 :
-					visitor._dstore_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DSTORE_1 :
-					visitor._dstore_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DSTORE_2 :
-					visitor._dstore_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DSTORE_3 :
-					visitor._dstore_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ASTORE_0 :
-					visitor._astore_0(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ASTORE_1 :
-					visitor._astore_1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ASTORE_2 :
-					visitor._astore_2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ASTORE_3 :
-					visitor._astore_3(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IASTORE :
-					visitor._iastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LASTORE :
-					visitor._lastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FASTORE :
-					visitor._fastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DASTORE :
-					visitor._dastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.AASTORE :
-					visitor._aastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.BASTORE :
-					visitor._bastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.CASTORE :
-					visitor._castore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.SASTORE :
-					visitor._sastore(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.POP :
-					visitor._pop(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.POP2 :
-					visitor._pop2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP :
-					visitor._dup(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP_X1 :
-					visitor._dup_x1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP_X2 :
-					visitor._dup_x2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP2 :
-					visitor._dup2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP2_X1 :
-					visitor._dup2_x1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DUP2_X2 :
-					visitor._dup2_x2(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.SWAP :
-					visitor._swap(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IADD :
-					visitor._iadd(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LADD :
-					visitor._ladd(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FADD :
-					visitor._fadd(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DADD :
-					visitor._dadd(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISUB :
-					visitor._isub(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSUB :
-					visitor._lsub(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FSUB :
-					visitor._fsub(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DSUB :
-					visitor._dsub(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IMUL :
-					visitor._imul(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LMUL :
-					visitor._lmul(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FMUL :
-					visitor._fmul(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DMUL :
-					visitor._dmul(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IDIV :
-					visitor._idiv(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LDIV :
-					visitor._ldiv(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FDIV :
-					visitor._fdiv(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DDIV :
-					visitor._ddiv(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IREM :
-					visitor._irem(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LREM :
-					visitor._lrem(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FREM :
-					visitor._frem(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DREM :
-					visitor._drem(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.INEG :
-					visitor._ineg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LNEG :
-					visitor._lneg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FNEG :
-					visitor._fneg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DNEG :
-					visitor._dneg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISHL :
-					visitor._ishl(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSHL :
-					visitor._lshl(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ISHR :
-					visitor._ishr(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LSHR :
-					visitor._lshr(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IUSHR :
-					visitor._iushr(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LUSHR :
-					visitor._lushr(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IAND :
-					visitor._iand(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LAND :
-					visitor._land(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IOR :
-					visitor._ior(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LOR :
-					visitor._lor(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IXOR :
-					visitor._ixor(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LXOR :
-					visitor._lxor(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IINC :
-					index = u1At(this.classFileBytes, 1, pc);
-					_const = i1At(this.classFileBytes, 2, pc);
-					visitor._iinc(pc - this.codeOffset, index, _const);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.I2L :
-					visitor._i2l(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.I2F :
-					visitor._i2f(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.I2D :
-					visitor._i2d(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.L2I :
-					visitor._l2i(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.L2F :
-					visitor._l2f(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.L2D :
-					visitor._l2d(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.F2I :
-					visitor._f2i(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.F2L :
-					visitor._f2l(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.F2D :
-					visitor._f2d(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.D2I :
-					visitor._d2i(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.D2L :
-					visitor._d2l(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.D2F :
-					visitor._d2f(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.I2B :
-					visitor._i2b(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.I2C :
-					visitor._i2c(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.I2S :
-					visitor._i2s(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LCMP :
-					visitor._lcmp(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FCMPL :
-					visitor._fcmpl(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FCMPG :
-					visitor._fcmpg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DCMPL :
-					visitor._dcmpl(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DCMPG :
-					visitor._dcmpg(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IFEQ :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifeq(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFNE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifne(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFLT :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._iflt(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFGE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifge(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFGT :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifgt(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFLE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifle(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPEQ :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmpeq(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPNE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmpne(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPLT :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmplt(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPGE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmpge(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPGT :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmpgt(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ICMPLE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_icmple(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ACMPEQ :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_acmpeq(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IF_ACMPNE :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._if_acmpne(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.GOTO :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._goto(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.JSR :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._jsr(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.RET :
-					index = u1At(this.classFileBytes, 1, pc);
-					visitor._ret(pc - this.codeOffset, index);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.TABLESWITCH :
-					int startpc = pc;
-					pc++;
-					while (((pc - this.codeOffset) & 0x03) != 0) { // faster than % 4
-						pc++;
-					}
-					int defaultOffset = i4At(this.classFileBytes, 0, pc);
-					pc += 4;
-					int low = i4At(this.classFileBytes, 0, pc);
-					pc += 4;
-					int high = i4At(this.classFileBytes, 0, pc);
-					pc += 4;
-					int length = high - low + 1;
-					int[] jumpOffsets = new int[length];
-					for (int i = 0; i < length; i++) {
-						jumpOffsets[i] = i4At(this.classFileBytes, 0, pc);
-						pc += 4;
-					}
-					visitor._tableswitch(startpc - this.codeOffset, defaultOffset, low, high, jumpOffsets);
-					break;
-				case IOpcodeMnemonics.LOOKUPSWITCH :
-					startpc = pc;
-					pc++;
-					while (((pc - this.codeOffset) & 0x03) != 0) {
-						pc++;
-					}
-					defaultOffset = i4At(this.classFileBytes, 0, pc);
-					pc += 4;
-					int npairs = (int) u4At(this.classFileBytes, 0, pc);
-					int[][] offset_pairs = new int[npairs][2];
-					pc += 4;
-					for (int i = 0; i < npairs; i++) {
-						offset_pairs[i][0] = i4At(this.classFileBytes, 0, pc);
-						pc += 4;
-						offset_pairs[i][1] = i4At(this.classFileBytes, 0, pc);
-						pc += 4;
-					}
-					visitor._lookupswitch(startpc - this.codeOffset, defaultOffset, npairs, offset_pairs);
-					break;
-				case IOpcodeMnemonics.IRETURN :
-					visitor._ireturn(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.LRETURN :
-					visitor._lreturn(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.FRETURN :
-					visitor._freturn(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.DRETURN :
-					visitor._dreturn(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ARETURN :
-					visitor._areturn(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.RETURN :
-					visitor._return(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.GETSTATIC :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._getstatic(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.PUTSTATIC :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._putstatic(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.GETFIELD :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._getfield(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.PUTFIELD :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._putfield(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.INVOKEVIRTUAL :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._invokevirtual(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.INVOKESPECIAL :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._invokespecial(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.INVOKESTATIC :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._invokestatic(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.INVOKEINTERFACE :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_InterfaceMethodref) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					byte count = (byte) u1At(this.classFileBytes, 3, pc);
-					int extraArgs = u1At(this.classFileBytes, 4, pc);
-					if (extraArgs != 0) {
-						throw new ClassFormatException(ClassFormatException.INVALID_ARGUMENTS_FOR_INVOKEINTERFACE);
-					}
-					visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
-					pc += 5;
-					break;
-				case IOpcodeMnemonics.NEW :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._new(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.NEWARRAY :
-					int atype = u1At(this.classFileBytes, 1, pc);
-					visitor._newarray(pc - this.codeOffset, atype);
-					pc += 2;
-					break;
-				case IOpcodeMnemonics.ANEWARRAY :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._anewarray(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.ARRAYLENGTH :
-					visitor._arraylength(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.ATHROW :
-					visitor._athrow(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.CHECKCAST :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._checkcast(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.INSTANCEOF :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					visitor._instanceof(pc - this.codeOffset, index, constantPoolEntry);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.MONITORENTER :
-					visitor._monitorenter(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.MONITOREXIT :
-					visitor._monitorexit(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.WIDE :
-					opcode = u1At(this.classFileBytes, 1, pc);
-					if (opcode == IOpcodeMnemonics.IINC) {
-						index = u2At(this.classFileBytes, 2, pc);
-						_const = i2At(this.classFileBytes, 4, pc);
-						visitor._wide(pc - this.codeOffset, opcode, index, _const);
-						pc += 6;
-					} else {
-						index = u2At(this.classFileBytes, 2, pc);
-						visitor._wide(pc - this.codeOffset, opcode, index);
-						pc += 4;
-					}
-					break;
-				case IOpcodeMnemonics.MULTIANEWARRAY :
-					index = u2At(this.classFileBytes, 1, pc);
-					constantPoolEntry = this.constantPool.decodeEntry(index);
-					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-					}
-					int dimensions = u1At(this.classFileBytes, 3, pc);
-					visitor._multianewarray(pc - this.codeOffset, index, dimensions, constantPoolEntry);
-					pc += 4;
-					break;
-				case IOpcodeMnemonics.IFNULL :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifnull(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.IFNONNULL :
-					branchOffset = i2At(this.classFileBytes, 1, pc);
-					visitor._ifnonnull(pc - this.codeOffset, branchOffset);
-					pc += 3;
-					break;
-				case IOpcodeMnemonics.GOTO_W :
-					branchOffset = i4At(this.classFileBytes, 1, pc);
-					visitor._goto_w(pc - this.codeOffset, branchOffset);
-					pc += 5;
-					break;
-				case IOpcodeMnemonics.JSR_W :
-					branchOffset = i4At(this.classFileBytes, 1, pc);
-					visitor._jsr_w(pc - this.codeOffset, branchOffset);
-					pc += 5;
-					break;
-				case IOpcodeMnemonics.BREAKPOINT :
-					visitor._breakpoint(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IMPDEP1 :
-					visitor._impdep1(pc - this.codeOffset);
-					pc++;
-					break;
-				case IOpcodeMnemonics.IMPDEP2 :
-					visitor._impdep2(pc - this.codeOffset);
-					pc++;
-					break;
-				default :
-					throw new ClassFormatException(ClassFormatException.INVALID_BYTECODE);
-			}
-			if (pc >= (this.codeLength + this.codeOffset)) {
-				break;
-			}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java
deleted file mode 100644
index 3801086..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPool.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ConstantPool extends ClassFileStruct {
-
-	private int constantPoolCount;
-	private int[] constantPoolOffset;
-	private byte[] classFileBytes;
-
-	ConstantPool(byte[] reference, int[] constantPoolOffset) {
-		this.constantPoolCount = constantPoolOffset.length;
-		this.constantPoolOffset = constantPoolOffset;
-		this.classFileBytes = reference;
-	}
-
-	/*
-	 * @see IConstantPool#decodeEntry(int)
-	 */
-	public ConstantPoolEntry decodeEntry(int index) {
-		ConstantPoolEntry constantPoolEntry = new ConstantPoolEntry();
-		constantPoolEntry.reset();
-		int kind = getEntryKind(index);
-		constantPoolEntry.setKind(kind);
-		switch (kind) {
-			case ConstantPoolConstant.CONSTANT_Class :
-				constantPoolEntry.setClassInfoNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				constantPoolEntry.setClassInfoName(getUtf8ValueAt(constantPoolEntry.getClassInfoNameIndex()));
-				break;
-			case ConstantPoolConstant.CONSTANT_Double :
-				constantPoolEntry.setDoubleValue(doubleAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				break;
-			case ConstantPoolConstant.CONSTANT_Fieldref :
-				constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				int declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
-				constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
-				constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
-				int fieldNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
-				int fieldDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
-				constantPoolEntry.setFieldName(getUtf8ValueAt(fieldNameIndex));
-				constantPoolEntry.setFieldDescriptor(getUtf8ValueAt(fieldDescriptorIndex));
-				break;
-			case ConstantPoolConstant.CONSTANT_Methodref :
-			case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
-				constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
-				constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
-				constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
-				int methodNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
-				int methodDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
-				constantPoolEntry.setMethodName(getUtf8ValueAt(methodNameIndex));
-				constantPoolEntry.setMethodDescriptor(getUtf8ValueAt(methodDescriptorIndex));
-				break;
-			case ConstantPoolConstant.CONSTANT_Float :
-				constantPoolEntry.setFloatValue(floatAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				break;
-			case ConstantPoolConstant.CONSTANT_Integer :
-				constantPoolEntry.setIntegerValue(i4At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				break;
-			case ConstantPoolConstant.CONSTANT_Long :
-				constantPoolEntry.setLongValue(i8At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				break;
-			case ConstantPoolConstant.CONSTANT_NameAndType :
-				constantPoolEntry.setNameAndTypeNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				constantPoolEntry.setNameAndTypeDescriptorIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
-				break;
-			case ConstantPoolConstant.CONSTANT_String :
-				constantPoolEntry.setStringIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				constantPoolEntry.setStringValue(getUtf8ValueAt(constantPoolEntry.getStringIndex()));
-				break;
-			case ConstantPoolConstant.CONSTANT_Utf8 :
-				constantPoolEntry.setUtf8Length(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
-				constantPoolEntry.setUtf8Value(getUtf8ValueAt(index));
-		}
-		return constantPoolEntry;
-	}
-
-	/*
-	 * @see IConstantPool#getConstantPoolCount()
-	 */
-	public int getConstantPoolCount() {
-		return this.constantPoolCount;
-	}
-
-	/*
-	 * @see IConstantPool#getEntryKind(int)
-	 */
-	public int getEntryKind(int index) {
-		return u1At(this.classFileBytes, 0, this.constantPoolOffset[index]);
-	}
-
-	private char[] getUtf8ValueAt(int utf8Index) {
-		int utf8Offset = this.constantPoolOffset[utf8Index];
-		return utf8At(this.classFileBytes, 0, utf8Offset + 3, u2At(this.classFileBytes, 0, utf8Offset + 1));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java
deleted file mode 100644
index 7cebf66..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolConstant.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public interface ConstantPoolConstant {
-
-	int CONSTANT_Class = 7;
-	int CONSTANT_Fieldref = 9;
-	int CONSTANT_Methodref = 10;
-	int CONSTANT_InterfaceMethodref = 11;
-	int CONSTANT_String = 8;
-	int CONSTANT_Integer = 3;
-	int CONSTANT_Float = 4;
-	int CONSTANT_Long = 5;
-	int CONSTANT_Double = 6;
-	int CONSTANT_NameAndType = 12;
-	int CONSTANT_Utf8 = 1;
-
-	int CONSTANT_Methodref_SIZE = 5;
-	int CONSTANT_Class_SIZE = 3;
-	int CONSTANT_Double_SIZE = 9;
-	int CONSTANT_Fieldref_SIZE = 5;
-	int CONSTANT_Float_SIZE = 5;
-	int CONSTANT_Integer_SIZE = 5;
-	int CONSTANT_InterfaceMethodref_SIZE = 5;
-	int CONSTANT_Long_SIZE = 9;
-	int CONSTANT_String_SIZE = 3;
-	int CONSTANT_Utf8_SIZE = 3;
-	int CONSTANT_NameAndType_SIZE = 5;
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java
deleted file mode 100644
index cdee2fd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantPoolEntry.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ConstantPoolEntry {
-
-	private int kind;
-	private int classInfoNameIndex;
-	private int classIndex;
-	private int nameAndTypeIndex;
-	private int stringIndex;
-	private char[] stringValue;
-	private int integerValue;
-	private float floatValue;
-	private double doubleValue;
-	private long longValue;
-	private int nameAndTypeDescriptorIndex;
-	private int nameAndTypeNameIndex;
-	private char[] className;
-	private char[] fieldName;
-	private char[] methodName;
-	private char[] fieldDescriptor;
-	private char[] methodDescriptor;
-	private char[] utf8Value;
-	private int utf8Length;
-	private char[] classInfoName;
-
-	public ConstantPoolEntry() {
-		this.classInfoNameIndex = -1;
-		this.classIndex = -1;
-		this.nameAndTypeIndex = -1;
-		this.stringIndex = -1;
-		this.stringValue = null;
-		this.integerValue = -1;
-		this.floatValue = -0.0f;
-		this.doubleValue = -0 - 0;
-		this.longValue = -1;
-		this.nameAndTypeDescriptorIndex = -1;
-		this.nameAndTypeNameIndex = -1;
-		this.className = null;
-		this.fieldName = null;
-		this.methodName = null;
-		this.fieldDescriptor = null;
-		this.methodDescriptor = null;
-		this.utf8Value = null;
-		this.utf8Length = -1;
-		this.classInfoName = null;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getKind()
-	 */
-	public int getKind() {
-		return this.kind;
-	}
-
-	/*
-	 * Sets the kind.
-	 * @param kind The kind to set
-	 */
-	public void setKind(int kind) {
-		this.kind = kind;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getClassInfoNameIndex()
-	 */
-	public int getClassInfoNameIndex() {
-		return this.classInfoNameIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getClassIndex()
-	 */
-	public int getClassIndex() {
-		return this.classIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getNameAndTypeIndex()
-	 */
-	public int getNameAndTypeIndex() {
-		return this.nameAndTypeIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getStringIndex()
-	 */
-	public int getStringIndex() {
-		return this.stringIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getStringValue()
-	 */
-	public String getStringValue() {
-		return new String(this.stringValue);
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getIntegerValue()
-	 */
-	public int getIntegerValue() {
-		return this.integerValue;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getFloatValue()
-	 */
-	public float getFloatValue() {
-		return this.floatValue;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getDoubleValue()
-	 */
-	public double getDoubleValue() {
-		return this.doubleValue;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getLongValue()
-	 */
-	public long getLongValue() {
-		return this.longValue;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getNameAndTypeInfoDescriptorIndex()
-	 */
-	public int getNameAndTypeInfoDescriptorIndex() {
-		return this.nameAndTypeDescriptorIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getNameAndTypeInfoNameIndex()
-	 */
-	public int getNameAndTypeInfoNameIndex() {
-		return this.nameAndTypeNameIndex;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getClassName()
-	 */
-	public char[] getClassName() {
-		return this.className;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getFieldName()
-	 */
-	public char[] getFieldName() {
-		return this.fieldName;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getMethodName()
-	 */
-	public char[] getMethodName() {
-		return this.methodName;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getFieldDescriptor()
-	 */
-	public char[] getFieldDescriptor() {
-		return this.fieldDescriptor;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getMethodDescriptor()
-	 */
-	public char[] getMethodDescriptor() {
-		return this.methodDescriptor;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getUtf8Value()
-	 */
-	public char[] getUtf8Value() {
-		return this.utf8Value;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getClassInfoName()
-	 */
-	public char[] getClassInfoName() {
-		return this.classInfoName;
-	}
-
-	/*
-	 * Sets the classInfoNameIndex.
-	 * @param classInfoNameIndex The classInfoNameIndex to set
-	 */
-	public void setClassInfoNameIndex(int classInfoNameIndex) {
-		this.classInfoNameIndex = classInfoNameIndex;
-	}
-
-	/*
-	 * Sets the classIndex.
-	 * @param classIndex The classIndex to set
-	 */
-	public void setClassIndex(int classIndex) {
-		this.classIndex = classIndex;
-	}
-
-	/*
-	 * Sets the nameAndTypeIndex.
-	 * @param nameAndTypeIndex The nameAndTypeIndex to set
-	 */
-	public void setNameAndTypeIndex(int nameAndTypeIndex) {
-		this.nameAndTypeIndex = nameAndTypeIndex;
-	}
-
-	/*
-	 * Sets the stringIndex.
-	 * @param stringIndex The stringIndex to set
-	 */
-	public void setStringIndex(int stringIndex) {
-		this.stringIndex = stringIndex;
-	}
-
-	/*
-	 * Sets the stringValue.
-	 * @param stringValue The stringValue to set
-	 */
-	public void setStringValue(char[] stringValue) {
-		this.stringValue = stringValue;
-	}
-
-	/*
-	 * Sets the integerValue.
-	 * @param integerValue The integerValue to set
-	 */
-	public void setIntegerValue(int integerValue) {
-		this.integerValue = integerValue;
-	}
-
-	/*
-	 * Sets the floatValue.
-	 * @param floatValue The floatValue to set
-	 */
-	public void setFloatValue(float floatValue) {
-		this.floatValue = floatValue;
-	}
-
-	/*
-	 * Sets the doubleValue.
-	 * @param doubleValue The doubleValue to set
-	 */
-	public void setDoubleValue(double doubleValue) {
-		this.doubleValue = doubleValue;
-	}
-
-	/*
-	 * Sets the longValue.
-	 * @param longValue The longValue to set
-	 */
-	public void setLongValue(long longValue) {
-		this.longValue = longValue;
-	}
-
-	/*
-	 * Gets the nameAndTypeDescriptorIndex.
-	 * @return Returns a int
-	 */
-	public int getNameAndTypeDescriptorIndex() {
-		return this.nameAndTypeDescriptorIndex;
-	}
-
-	/*
-	 * Sets the nameAndTypeDescriptorIndex.
-	 * @param nameAndTypeDescriptorIndex The nameAndTypeDescriptorIndex to set
-	 */
-	public void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex) {
-		this.nameAndTypeDescriptorIndex = nameAndTypeDescriptorIndex;
-	}
-
-	/*
-	 * Gets the nameAndTypeNameIndex.
-	 * @return Returns a int
-	 */
-	public int getNameAndTypeNameIndex() {
-		return this.nameAndTypeNameIndex;
-	}
-
-	/*
-	 * Sets the nameAndTypeNameIndex.
-	 * @param nameAndTypeNameIndex The nameAndTypeNameIndex to set
-	 */
-	public void setNameAndTypeNameIndex(int nameAndTypeNameIndex) {
-		this.nameAndTypeNameIndex = nameAndTypeNameIndex;
-	}
-
-	/*
-	 * Sets the className.
-	 * @param className The className to set
-	 */
-	public void setClassName(char[] className) {
-		this.className = className;
-	}
-
-	/*
-	 * Sets the fieldName.
-	 * @param fieldName The fieldName to set
-	 */
-	public void setFieldName(char[] fieldName) {
-		this.fieldName = fieldName;
-	}
-
-	/*
-	 * Sets the methodName.
-	 * @param methodName The methodName to set
-	 */
-	public void setMethodName(char[] methodName) {
-		this.methodName = methodName;
-	}
-
-	/*
-	 * Sets the fieldDescriptor.
-	 * @param fieldDescriptor The fieldDescriptor to set
-	 */
-	public void setFieldDescriptor(char[] fieldDescriptor) {
-		this.fieldDescriptor = fieldDescriptor;
-	}
-
-	/*
-	 * Sets the methodDescriptor.
-	 * @param methodDescriptor The methodDescriptor to set
-	 */
-	public void setMethodDescriptor(char[] methodDescriptor) {
-		this.methodDescriptor = methodDescriptor;
-	}
-
-	/*
-	 * Sets the utf8Value.
-	 * @param utf8Value The utf8Value to set
-	 */
-	public void setUtf8Value(char[] utf8Value) {
-		this.utf8Value = utf8Value;
-	}
-
-	/*
-	 * Sets the classInfoName.
-	 * @param classInfoName The classInfoName to set
-	 */
-	public void setClassInfoName(char[] classInfoName) {
-		this.classInfoName = classInfoName;
-	}
-
-	/*
-	 * @see IConstantPoolEntry#getUtf8Length()
-	 */
-	public int getUtf8Length() {
-		return this.utf8Length;
-	}
-
-	/*
-	 * Sets the utf8Length.
-	 * @param utf8Length The utf8Length to set
-	 */
-	public void setUtf8Length(int utf8Length) {
-		this.utf8Length = utf8Length;
-	}
-
-	public void reset() {
-		this.kind = 0;
-		this.classInfoNameIndex = 0;
-		this.classIndex = 0;
-		this.nameAndTypeIndex = 0;
-		this.stringIndex = 0;
-		this.stringValue = null;
-		this.integerValue = 0;
-		this.floatValue = 0.0f;
-		this.doubleValue = 0.0;
-		this.longValue = 0L;
-		this.nameAndTypeDescriptorIndex = 0;
-		this.nameAndTypeNameIndex = 0;
-		this.className = null;
-		this.fieldName = null;
-		this.methodName = null;
-		this.fieldDescriptor = null;
-		this.methodDescriptor = null;
-		this.utf8Value = null;
-		this.utf8Length = 0;
-		this.classInfoName = null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java
deleted file mode 100644
index 75e961e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ConstantValueAttribute.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ConstantValueAttribute extends ClassFileAttribute {
-
-	private int constantValueIndex;
-	private ConstantPoolEntry constantPoolEntry;
-
-	ConstantValueAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.constantValueIndex = u2At(classFileBytes, 6, offset);
-		this.constantPoolEntry = constantPool.decodeEntry(this.constantValueIndex);
-	}
-
-	/*
-	 * @see IConstantValueAttribute#getConstantValue()
-	 */
-	public ConstantPoolEntry getConstantValue() {
-		return this.constantPoolEntry;
-	}
-
-	/*
-	 * @see IConstantValueAttribute#getConstantValueIndex()
-	 */
-	public int getConstantValueIndex() {
-		return this.constantValueIndex;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java
deleted file mode 100644
index aaeaf26..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/DefaultBytecodeVisitor.java
+++ /dev/null
@@ -1,2071 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class DefaultBytecodeVisitor {
-	private static final String EMPTY_CLASS_NAME = "\"\""; //$NON-NLS-1$
-	private static final String EMPTY_LOCAL_NAME = ""; //$NON-NLS-1$
-	private static final int T_BOOLEAN = 4;
-	private static final int T_CHAR = 5;
-	private static final int T_FLOAT = 6;
-	private static final int T_DOUBLE = 7;
-	private static final int T_BYTE = 8;
-	private static final int T_SHORT = 9;
-	private static final int T_INT = 10;
-	private static final int T_LONG = 11;
-
-	private StringBuffer buffer;
-	private String lineSeparator;
-	private int tabNumber;
-	private int digitNumberForPC;
-	private int mode;
-
-	public DefaultBytecodeVisitor(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		this.buffer = buffer;
-		this.lineSeparator = lineSeparator;
-		this.tabNumber = tabNumber + 1;
-		long codeLength = codeAttribute.getCodeLength();
-		this.digitNumberForPC = Long.toString(codeLength).length();
-		this.mode = mode;
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aaload(int)
-	 */
-	public void _aaload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AALOAD]);
-		writeNewLine();
-	}
-
-	private void dumpPcNumber(int pc) {
-		writeTabs();
-		int digitForPC = 1;
-		if (pc != 0) {
-			digitForPC = Integer.toString(pc).length();
-		}
-		for (int i = 0, max = this.digitNumberForPC - digitForPC; i < max; i++) {
-			this.buffer.append(' ');
-		}
-		this.buffer.append(pc);
-		this.buffer.append(Messages.disassembler_indentation);
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aastore(int)
-	 */
-	public void _aastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aconst_null(int)
-	 */
-	public void _aconst_null(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ACONST_NULL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aload_0(int)
-	 */
-	public void _aload_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aload_1(int)
-	 */
-	public void _aload_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aload_2(int)
-	 */
-	public void _aload_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aload_3(int)
-	 */
-	public void _aload_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_aload(int, int)
-	 */
-	public void _aload(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_anewarray(int, int, ConstantPoolEntry)
-	 */
-	public void _anewarray(int pc, int index, ConstantPoolEntry constantClass) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_anewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ANEWARRAY], returnConstantClassName(constantClass)}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_areturn(int)
-	 */
-	public void _areturn(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_arraylength(int)
-	 */
-	public void _arraylength(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARRAYLENGTH]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_astore_0(int)
-	 */
-	public void _astore_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_astore_1(int)
-	 */
-	public void _astore_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_astore_2(int)
-	 */
-	public void _astore_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_astore_3(int)
-	 */
-	public void _astore_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_astore(int, int)
-	 */
-	public void _astore(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_athrow(int)
-	 */
-	public void _athrow(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ATHROW]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_baload(int)
-	 */
-	public void _baload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_bastore(int)
-	 */
-	public void _bastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_bipush(int, byte)
-	 */
-	public void _bipush(int pc, byte _byte) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BIPUSH]).append(Messages.disassembler_space).append(_byte);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_caload(int)
-	 */
-	public void _caload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_castore(int)
-	 */
-	public void _castore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_checkcast(int, int, ConstantPoolEntry)
-	 */
-	public void _checkcast(int pc, int index, ConstantPoolEntry constantClass) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_checkcast, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CHECKCAST], returnConstantClassName(constantClass)}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_d2f(int)
-	 */
-	public void _d2f(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2F]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_d2i(int)
-	 */
-	public void _d2i(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2I]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_d2l(int)
-	 */
-	public void _d2l(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2L]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dadd(int)
-	 */
-	public void _dadd(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DADD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_daload(int)
-	 */
-	public void _daload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dastore(int)
-	 */
-	public void _dastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dcmpg(int)
-	 */
-	public void _dcmpg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dcmpl(int)
-	 */
-	public void _dcmpl(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dconst_0(int)
-	 */
-	public void _dconst_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_0]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dconst_1(int)
-	 */
-	public void _dconst_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ddiv(int)
-	 */
-	public void _ddiv(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DDIV]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dload_0(int)
-	 */
-	public void _dload_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dload_1(int)
-	 */
-	public void _dload_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dload_2(int)
-	 */
-	public void _dload_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dload_3(int)
-	 */
-	public void _dload_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dload(int, int)
-	 */
-	public void _dload(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dmul(int)
-	 */
-	public void _dmul(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DMUL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dneg(int)
-	 */
-	public void _dneg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DNEG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_drem(int)
-	 */
-	public void _drem(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DREM]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dreturn(int)
-	 */
-	public void _dreturn(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DRETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dstore_0(int)
-	 */
-	public void _dstore_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dstore_1(int)
-	 */
-	public void _dstore_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dstore_2(int)
-	 */
-	public void _dstore_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dstore_3(int)
-	 */
-	public void _dstore_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dstore(int,int)
-	 */
-	public void _dstore(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dsub(int)
-	 */
-	public void _dsub(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSUB]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup_x1(int)
-	 */
-	public void _dup_x1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup_x2(int)
-	 */
-	public void _dup_x2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup(int)
-	 */
-	public void _dup(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup2_x1(int)
-	 */
-	public void _dup2_x1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup2_x2(int)
-	 */
-	public void _dup2_x2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_dup2(int)
-	 */
-	public void _dup2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_f2d(int)
-	 */
-	public void _f2d(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2D]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_f2i(int)
-	 */
-	public void _f2i(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2I]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_f2l(int)
-	 */
-	public void _f2l(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2L]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fadd(int)
-	 */
-	public void _fadd(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FADD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_faload(int)
-	 */
-	public void _faload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fastore(int)
-	 */
-	public void _fastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fcmpg(int)
-	 */
-	public void _fcmpg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fcmpl(int)
-	 */
-	public void _fcmpl(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fconst_0(int)
-	 */
-	public void _fconst_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_0]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fconst_1(int)
-	 */
-	public void _fconst_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fconst_2(int)
-	 */
-	public void _fconst_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fdiv(int)
-	 */
-	public void _fdiv(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FDIV]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fload_0(int)
-	 */
-	public void _fload_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fload_1(int)
-	 */
-	public void _fload_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fload_2(int)
-	 */
-	public void _fload_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fload_3(int)
-	 */
-	public void _fload_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fload(int, int)
-	 */
-	public void _fload(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fmul(int)
-	 */
-	public void _fmul(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FMUL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fneg(int)
-	 */
-	public void _fneg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FNEG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_frem(int)
-	 */
-	public void _frem(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FREM]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_freturn(int)
-	 */
-	public void _freturn(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FRETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fstore_0(int)
-	 */
-	public void _fstore_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fstore_1(int)
-	 */
-	public void _fstore_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fstore_2(int)
-	 */
-	public void _fstore_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fstore_3(int)
-	 */
-	public void _fstore_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fstore(int, int)
-	 */
-	public void _fstore(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_fsub(int)
-	 */
-	public void _fsub(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSUB]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_getfield(int, int, ConstantPoolEntry)
-	 */
-	public void _getfield(int pc, int index, ConstantPoolEntry constantFieldref) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_getfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_getstatic(int, int, ConstantPoolEntry)
-	 */
-	public void _getstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_getstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_goto_w(int, int)
-	 */
-	public void _goto_w(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO_W]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_goto(int, int)
-	 */
-	public void _goto(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2b(int)
-	 */
-	public void _i2b(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2B]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2c(int)
-	 */
-	public void _i2c(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2C]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2d(int)
-	 */
-	public void _i2d(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2D]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2f(int)
-	 */
-	public void _i2f(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2F]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2l(int)
-	 */
-	public void _i2l(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2L]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_i2s(int)
-	 */
-	public void _i2s(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2S]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iadd(int)
-	 */
-	public void _iadd(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IADD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iaload(int)
-	 */
-	public void _iaload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iand(int)
-	 */
-	public void _iand(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IAND]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iastore(int)
-	 */
-	public void _iastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_acmpeq(int, int)
-	 */
-	public void _if_acmpeq(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_acmpne(int, int)
-	 */
-	public void _if_acmpne(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmpeq(int, int)
-	 */
-	public void _if_icmpeq(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmpge(int, int)
-	 */
-	public void _if_icmpge(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmpgt(int, int)
-	 */
-	public void _if_icmpgt(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGT]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmple(int, int)
-	 */
-	public void _if_icmple(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmplt(int, int)
-	 */
-	public void _if_icmplt(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLT]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_if_icmpne(int, int)
-	 */
-	public void _if_icmpne(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_0(int)
-	 */
-	public void _iconst_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_0]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_1(int)
-	 */
-	public void _iconst_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_2(int)
-	 */
-	public void _iconst_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_3(int)
-	 */
-	public void _iconst_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_3]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_4(int)
-	 */
-	public void _iconst_4(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_4]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_5(int)
-	 */
-	public void _iconst_5(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_5]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iconst_m1(int)
-	 */
-	public void _iconst_m1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_M1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_idiv(int)
-	 */
-	public void _idiv(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IDIV]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifeq(int, int)
-	 */
-	public void _ifeq(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifge(int, int)
-	 */
-	public void _ifge(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifgt(int, int)
-	 */
-	public void _ifgt(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGT]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifle(int, int)
-	 */
-	public void _ifle(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iflt(int, int)
-	 */
-	public void _iflt(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLT]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifne(int, int)
-	 */
-	public void _ifne(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNE]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifnonnull(int, int)
-	 */
-	public void _ifnonnull(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNONNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ifnull(int, int)
-	 */
-	public void _ifnull(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iinc(int, int, int)
-	 */
-	public void _iinc(int pc, int index, int _const) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_iinc, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IINC], Integer.toString(index), Integer.toString(_const), EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iload_0(int)
-	 */
-	public void _iload_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iload_1(int)
-	 */
-	public void _iload_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iload_2(int)
-	 */
-	public void _iload_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iload_3(int)
-	 */
-	public void _iload_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iload(int, int)
-	 */
-	public void _iload(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_imul(int)
-	 */
-	public void _imul(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMUL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ineg(int)
-	 */
-	public void _ineg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INEG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_instanceof(int, int, ConstantPoolEntry)
-	 */
-	public void _instanceof(int pc, int index, ConstantPoolEntry constantClass) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_instanceof, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INSTANCEOF], returnConstantClassName(constantClass)}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, ConstantPoolEntry)
-	 */
-	public void _invokeinterface(int pc, int index, byte nargs, ConstantPoolEntry constantInterfaceMethodref) {
-
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_invokeinterface, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEINTERFACE], Integer.toString(nargs), Utility.toString(constantInterfaceMethodref.getClassName(), constantInterfaceMethodref.getMethodName(), constantInterfaceMethodref.getMethodDescriptor(), true, isCompact())}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_invokespecial(int, int, ConstantPoolEntry)
-	 */
-	public void _invokespecial(int pc, int index, ConstantPoolEntry constantMethodref) {
-		dumpPcNumber(pc);
-		final String signature = returnMethodSignature(constantMethodref);
-		this.buffer.append(NLS.bind(Messages.classformat_invokespecial, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESPECIAL], signature}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_invokestatic(int, int, ConstantPoolEntry)
-	 */
-	public void _invokestatic(int pc, int index, ConstantPoolEntry constantMethodref) {
-		dumpPcNumber(pc);
-		final String signature = returnMethodSignature(constantMethodref);
-		this.buffer.append(NLS.bind(Messages.classformat_invokestatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESTATIC], signature}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_invokevirtual(int, int, ConstantPoolEntry)
-	 */
-	public void _invokevirtual(int pc, int index, ConstantPoolEntry constantMethodref) {
-		dumpPcNumber(pc);
-		final String signature = returnMethodSignature(constantMethodref);
-		this.buffer.append(NLS.bind(Messages.classformat_invokevirtual, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEVIRTUAL], signature}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ior(int)
-	 */
-	public void _ior(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IOR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_irem(int)
-	 */
-	public void _irem(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IREM]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ireturn(int)
-	 */
-	public void _ireturn(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IRETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ishl(int)
-	 */
-	public void _ishl(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ishr(int)
-	 */
-	public void _ishr(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_istore_0(int)
-	 */
-	public void _istore_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_istore_1(int)
-	 */
-	public void _istore_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_istore_2(int)
-	 */
-	public void _istore_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_istore_3(int)
-	 */
-	public void _istore_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_istore(int, int)
-	 */
-	public void _istore(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_isub(int)
-	 */
-	public void _isub(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISUB]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_iushr(int)
-	 */
-	public void _iushr(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IUSHR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ixor(int)
-	 */
-	public void _ixor(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IXOR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_jsr_w(int, int)
-	 */
-	public void _jsr_w(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR_W]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_jsr(int, int)
-	 */
-	public void _jsr(int pc, int branchOffset) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR]).append(Messages.disassembler_space).append(branchOffset + pc);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_l2d(int)
-	 */
-	public void _l2d(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2D]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_l2f(int)
-	 */
-	public void _l2f(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2F]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_l2i(int)
-	 */
-	public void _l2i(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2I]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ladd(int)
-	 */
-	public void _ladd(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LADD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_laload(int)
-	 */
-	public void _laload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_land(int)
-	 */
-	public void _land(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LAND]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lastore(int)
-	 */
-	public void _lastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lcmp(int)
-	 */
-	public void _lcmp(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCMP]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lconst_0(int)
-	 */
-	public void _lconst_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_0]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lconst_1(int)
-	 */
-	public void _lconst_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ldc_w(int, int, ConstantPoolEntry)
-	 */
-	public void _ldc_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
-		dumpPcNumber(pc);
-		switch (constantPoolEntry.getKind()) {
-			case ConstantPoolConstant.CONSTANT_Float :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Float.toString(constantPoolEntry.getFloatValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_Integer :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Integer.toString(constantPoolEntry.getIntegerValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_String :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_Class :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], returnConstantClassName(constantPoolEntry)}));
-		}
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ldc(int, int, ConstantPoolEntry)
-	 */
-	public void _ldc(int pc, int index, ConstantPoolEntry constantPoolEntry) {
-		dumpPcNumber(pc);
-		switch (constantPoolEntry.getKind()) {
-			case ConstantPoolConstant.CONSTANT_Float :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Float.toString(constantPoolEntry.getFloatValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_Integer :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Integer.toString(constantPoolEntry.getIntegerValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_String :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_Class :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], returnConstantClassName(constantPoolEntry)}));
-		}
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ldc2_w(int, int, ConstantPoolEntry)
-	 */
-	public void _ldc2_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
-		dumpPcNumber(pc);
-		switch (constantPoolEntry.getKind()) {
-			case ConstantPoolConstant.CONSTANT_Long :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Long.toString(constantPoolEntry.getLongValue())}));
-				break;
-			case ConstantPoolConstant.CONSTANT_Double :
-				this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Double.toString(constantPoolEntry.getDoubleValue())}));
-		}
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ldiv(int)
-	 */
-	public void _ldiv(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDIV]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lload_0(int)
-	 */
-	public void _lload_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lload_1(int)
-	 */
-	public void _lload_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lload_2(int)
-	 */
-	public void _lload_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lload_3(int)
-	 */
-	public void _lload_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lload(int, int)
-	 */
-	public void _lload(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lmul(int)
-	 */
-	public void _lmul(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LMUL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lneg(int)
-	 */
-	public void _lneg(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LNEG]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lookupswitch(int, int, int, int[][])
-	 */
-	public void _lookupswitch(int pc, int defaultoffset, int npairs, int[][] offset_pairs) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOOKUPSWITCH]).append(" default: ") //$NON-NLS-1$
-				.append(defaultoffset + pc);
-		writeNewLine();
-		for (int i = 0; i < npairs; i++) {
-			writeExtraTabs(3);
-			this.buffer.append("case ") //$NON-NLS-1$
-					.append(offset_pairs[i][0]).append(": ") //$NON-NLS-1$
-					.append(offset_pairs[i][1] + pc);
-			writeNewLine();
-		}
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lor(int)
-	 */
-	public void _lor(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lrem(int)
-	 */
-	public void _lrem(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LREM]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lreturn(int)
-	 */
-	public void _lreturn(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LRETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lshl(int)
-	 */
-	public void _lshl(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHL]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lshr(int)
-	 */
-	public void _lshr(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lstore_0(int)
-	 */
-	public void _lstore_0(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_0], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lstore_1(int)
-	 */
-	public void _lstore_1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_1], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lstore_2(int)
-	 */
-	public void _lstore_2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_2], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lstore_3(int)
-	 */
-	public void _lstore_3(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_3], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lstore(int, int)
-	 */
-	public void _lstore(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE], EMPTY_LOCAL_NAME}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lsub(int)
-	 */
-	public void _lsub(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSUB]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lushr(int)
-	 */
-	public void _lushr(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LUSHR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_lxor(int)
-	 */
-	public void _lxor(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LXOR]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_monitorenter(int)
-	 */
-	public void _monitorenter(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITORENTER]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_monitorexit(int)
-	 */
-	public void _monitorexit(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITOREXIT]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_multianewarray(int, int, int, ConstantPoolEntry)
-	 */
-	public void _multianewarray(int pc, int index, int dimensions, ConstantPoolEntry constantClass) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_multianewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MULTIANEWARRAY], returnConstantClassName(constantClass)}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_new(int, int, ConstantPoolEntry)
-	 */
-	public void _new(int pc, int index, ConstantPoolEntry constantClass) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_new, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEW], returnConstantClassName(constantClass)}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_newarray(int, int)
-	 */
-	public void _newarray(int pc, int atype) {
-		dumpPcNumber(pc);
-		switch (atype) {
-			case T_BOOLEAN :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_boolean, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_CHAR :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_char, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_FLOAT :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_DOUBLE :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_BYTE :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_byte, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_SHORT :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_short, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_INT :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_int, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-				break;
-			case T_LONG :
-				this.buffer.append(NLS.bind(Messages.classformat_newarray_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
-		}
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_nop(int)
-	 */
-	public void _nop(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NOP]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_pop(int)
-	 */
-	public void _pop(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_pop2(int)
-	 */
-	public void _pop2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP2]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_putfield(int, int, ConstantPoolEntry)
-	 */
-	public void _putfield(int pc, int index, ConstantPoolEntry constantFieldref) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_putfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_putstatic(int, int, ConstantPoolEntry)
-	 */
-	public void _putstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
-		dumpPcNumber(pc);
-		this.buffer.append(NLS.bind(Messages.classformat_putstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_ret(int, int)
-	 */
-	public void _ret(int pc, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RET]).append(Messages.disassembler_space).append(index);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_return(int)
-	 */
-	public void _return(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RETURN]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_saload(int)
-	 */
-	public void _saload(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SALOAD]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_sastore(int)
-	 */
-	public void _sastore(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SASTORE]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_sipush(int, short)
-	 */
-	public void _sipush(int pc, short value) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SIPUSH]).append(Messages.disassembler_space).append(value);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_swap(int)
-	 */
-	public void _swap(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SWAP]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_tableswitch(int, int, int, int, int[])
-	 */
-	public void _tableswitch(int pc, int defaultoffset, int low, int high, int[] jump_offsets) {
-
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.TABLESWITCH]).append(" default: ") //$NON-NLS-1$
-				.append(defaultoffset + pc);
-		writeNewLine();
-		for (int i = low; i < high + 1; i++) {
-			writeExtraTabs(3);
-			this.buffer.append("case ") //$NON-NLS-1$
-					.append(i).append(": ") //$NON-NLS-1$
-					.append(jump_offsets[i - low] + pc);
-			writeNewLine();
-		}
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_wide(int, int, int)
-	 */
-	public void _wide(int pc, int iincopcode, int index, int _const) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
-		writeNewLine();
-		_iinc(pc + 1, index, _const);
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_wide(int, int, int)
-	 */
-	public void _wide(int pc, int opcode, int index) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
-		writeNewLine();
-		switch (opcode) {
-			case IOpcodeMnemonics.ILOAD :
-				_iload(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.FLOAD :
-				_fload(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.ALOAD :
-				_aload(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.LLOAD :
-				_lload(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.DLOAD :
-				_dload(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.ISTORE :
-				_istore(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.FSTORE :
-				_fstore(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.ASTORE :
-				_astore(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.LSTORE :
-				_lstore(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.DSTORE :
-				_dstore(pc + 1, index);
-				break;
-			case IOpcodeMnemonics.RET :
-				_ret(pc + 1, index);
-		}
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_breakpoint(int)
-	 */
-	public void _breakpoint(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BREAKPOINT]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_impdep1(int)
-	 */
-	public void _impdep1(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP1]);
-		writeNewLine();
-	}
-
-	/*
-	 * @see IBytecodeVisitor#_impdep2(int)
-	 */
-	public void _impdep2(int pc) {
-		dumpPcNumber(pc);
-		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP2]);
-		writeNewLine();
-	}
-
-	private boolean isCompact() {
-		return (this.mode & Disassembler.COMPACT) != 0;
-	}
-
-	private String returnConstantClassName(ConstantPoolEntry constantClass) {
-		char[] className = constantClass.getClassInfoName();
-		if (className.length == 0) {
-			return EMPTY_CLASS_NAME;
-		}
-		switch (className[0]) {
-			case '[' :
-				StringBuffer classNameBuffer = new StringBuffer();
-				Utility.appendTypeSignature(className, 0, classNameBuffer, isCompact());
-				return classNameBuffer.toString();
-			default :
-				return returnClassName(className);
-		}
-	}
-
-	private String returnClassName(char[] classInfoName) {
-		if (classInfoName.length == 0) {
-			return EMPTY_CLASS_NAME;
-		} else if (isCompact()) {
-			int lastIndexOfSlash = CharOperation.lastIndexOf('/', classInfoName);
-			if (lastIndexOfSlash != -1) {
-				return new String(classInfoName, lastIndexOfSlash + 1, classInfoName.length - lastIndexOfSlash - 1);
-			}
-		}
-		CharOperation.replace(classInfoName, '/', '.');
-		return new String(classInfoName);
-	}
-
-	private String returnDeclaringClassName(ConstantPoolEntry constantRef) {
-		final char[] className = constantRef.getClassName();
-		return returnClassName(className);
-	}
-
-	private String returnMethodSignature(ConstantPoolEntry constantMethodref) {
-		final char[] methodDescriptor = constantMethodref.getMethodDescriptor();
-		CharOperation.replace(methodDescriptor, '$', '#');
-		final char[] signature = Utility.toString(constantMethodref.getClassName(), constantMethodref.getMethodName(), methodDescriptor, true, isCompact()).toCharArray();
-		CharOperation.replace(signature, '#', '$');
-		return String.valueOf(signature);
-	}
-
-	private void writeNewLine() {
-		this.buffer.append(this.lineSeparator);
-	}
-
-	private void writeTabs() {
-		for (int i = 0, max = this.tabNumber; i < max; i++) {
-			this.buffer.append(Messages.disassembler_indentation);
-		}
-	}
-
-	private void writeExtraTabs(int extraTabs) {
-		for (int i = 0, max = this.tabNumber + extraTabs; i < max; i++) {
-			this.buffer.append(Messages.disassembler_indentation);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java
deleted file mode 100644
index f96d488..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Disassembler.java
+++ /dev/null
@@ -1,1149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Disassembler of .class files. It generates an output in the Writer that looks close to
- * the javap output.
- */
-public class Disassembler {
-	/**
-	 * The mode is the detailed mode to disassemble ClassFileReader. It returns the magic
-	 * numbers, the version numbers and field and method descriptors.
-	 */
-	public final static int DETAILED = 1;
-
-	/**
-	 * This mode is used to compact the class name to a simple name instead of a qualified name.
-	 * @since 3.1
-	 */
-	public final static int COMPACT = 8;
-
-	private static final char[] ANY_EXCEPTION = Messages.classfileformat_anyexceptionhandler.toCharArray();
-	private static final String VERSION_UNKNOWN = Messages.classfileformat_versionUnknown;
-
-	private boolean appendModifier(StringBuffer buffer, int accessFlags, int modifierConstant, String modifier, boolean firstModifier) {
-		if ((accessFlags & modifierConstant) != 0) {
-			if (!firstModifier) {
-				buffer.append(Messages.disassembler_space);
-			}
-			if (firstModifier) {
-				firstModifier = false;
-			}
-			buffer.append(modifier);
-		}
-		return firstModifier;
-	}
-
-	private void decodeModifiers(StringBuffer buffer, int accessFlags, int[] checkBits) {
-		decodeModifiers(buffer, accessFlags, false, false, checkBits);
-	}
-
-	private void decodeModifiers(StringBuffer buffer, int accessFlags, boolean printDefault, boolean asBridge, int[] checkBits) {
-		if (checkBits == null)
-			return;
-		boolean firstModifier = true;
-		for (int i = 0, max = checkBits.length; i < max; i++) {
-			switch (checkBits[i]) {
-				case IModifierConstants.ACC_PUBLIC :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PUBLIC, "public", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_PROTECTED :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PROTECTED, "protected", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_PRIVATE :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PRIVATE, "private", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_ABSTRACT :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ABSTRACT, "abstract", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_STATIC :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STATIC, "static", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_FINAL :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_FINAL, "final", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_SYNCHRONIZED :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_SYNCHRONIZED, "synchronized", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_NATIVE :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_NATIVE, "native", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_STRICT :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STRICT, "strictfp", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_TRANSIENT :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_TRANSIENT, "transient", firstModifier); //$NON-NLS-1$
-					break;
-				case IModifierConstants.ACC_VOLATILE :
-					// case IModifierConstants.ACC_BRIDGE :
-					if (asBridge) {
-						firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_BRIDGE, "bridge", firstModifier); //$NON-NLS-1$
-					} else {
-						firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_VOLATILE, "volatile", firstModifier); //$NON-NLS-1$
-					}
-					break;
-				case IModifierConstants.ACC_ENUM :
-					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ENUM, "enum", firstModifier); //$NON-NLS-1$
-					break;
-			}
-		}
-		if (!firstModifier) {
-			if (!printDefault)
-				buffer.append(Messages.disassembler_space);
-		} else if (printDefault) {
-			// no modifier: package default visibility
-			buffer.append("default"); //$NON-NLS-1$
-		}
-	}
-
-	private void decodeModifiersForField(StringBuffer buffer, int accessFlags) {
-		decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_TRANSIENT, IModifierConstants.ACC_VOLATILE, IModifierConstants.ACC_ENUM});
-	}
-
-	private final void decodeModifiersForInnerClasses(StringBuffer buffer, int accessFlags, boolean printDefault) {
-		decodeModifiers(buffer, accessFlags, printDefault, false, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL,});
-	}
-
-	private final void decodeModifiersForMethod(StringBuffer buffer, int accessFlags) {
-		decodeModifiers(buffer, accessFlags, false, true, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_SYNCHRONIZED, IModifierConstants.ACC_NATIVE, IModifierConstants.ACC_STRICT, IModifierConstants.ACC_BRIDGE,});
-	}
-
-	private final void decodeModifiersForType(StringBuffer buffer, int accessFlags) {
-		decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_FINAL,});
-	}
-
-	public static String escapeString(String s) {
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0, max = s.length(); i < max; i++) {
-			char c = s.charAt(i);
-			switch (c) {
-				case '\b' :
-					buffer.append("\\b"); //$NON-NLS-1$
-					break;
-				case '\t' :
-					buffer.append("\\t"); //$NON-NLS-1$
-					break;
-				case '\n' :
-					buffer.append("\\n"); //$NON-NLS-1$
-					break;
-				case '\f' :
-					buffer.append("\\f"); //$NON-NLS-1$
-					break;
-				case '\r' :
-					buffer.append("\\r"); //$NON-NLS-1$
-					break;
-				case '\0' :
-					buffer.append("\\0"); //$NON-NLS-1$
-					break;
-				case '\1' :
-					buffer.append("\\1"); //$NON-NLS-1$
-					break;
-				case '\2' :
-					buffer.append("\\2"); //$NON-NLS-1$
-					break;
-				case '\3' :
-					buffer.append("\\3"); //$NON-NLS-1$
-					break;
-				case '\4' :
-					buffer.append("\\4"); //$NON-NLS-1$
-					break;
-				case '\5' :
-					buffer.append("\\5"); //$NON-NLS-1$
-					break;
-				case '\6' :
-					buffer.append("\\6"); //$NON-NLS-1$
-					break;
-				case '\7' :
-					buffer.append("\\7"); //$NON-NLS-1$
-					break;
-				default :
-					buffer.append(c);
-			}
-		}
-		return buffer.toString();
-	}
-
-	static String decodeStringValue(char[] chars) {
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0, max = chars.length; i < max; i++) {
-			char c = chars[i];
-			switch (c) {
-				case '\b' :
-					buffer.append("\\b"); //$NON-NLS-1$
-					break;
-				case '\t' :
-					buffer.append("\\t"); //$NON-NLS-1$
-					break;
-				case '\n' :
-					buffer.append("\\n"); //$NON-NLS-1$
-					break;
-				case '\f' :
-					buffer.append("\\f"); //$NON-NLS-1$
-					break;
-				case '\r' :
-					buffer.append("\\r"); //$NON-NLS-1$
-					break;
-				case '\0' :
-					buffer.append("\\0"); //$NON-NLS-1$
-					break;
-				case '\1' :
-					buffer.append("\\1"); //$NON-NLS-1$
-					break;
-				case '\2' :
-					buffer.append("\\2"); //$NON-NLS-1$
-					break;
-				case '\3' :
-					buffer.append("\\3"); //$NON-NLS-1$
-					break;
-				case '\4' :
-					buffer.append("\\4"); //$NON-NLS-1$
-					break;
-				case '\5' :
-					buffer.append("\\5"); //$NON-NLS-1$
-					break;
-				case '\6' :
-					buffer.append("\\6"); //$NON-NLS-1$
-					break;
-				case '\7' :
-					buffer.append("\\7"); //$NON-NLS-1$
-					break;
-				default :
-					buffer.append(c);
-			}
-		}
-		return buffer.toString();
-	}
-
-	static String decodeStringValue(String s) {
-		return decodeStringValue(s.toCharArray());
-	}
-
-	/*
-	 * @see org.eclipse.jdt.core.util.ClassFileBytesDisassembler#disassemble(byte[], java.lang.String, int)
-	 */
-	public String disassemble(byte[] classFileBytes, String lineSeparator, int mode) throws ClassFormatException {
-		try {
-			return disassemble(new ClassFileReader(classFileBytes, ClassFileReader.ALL), lineSeparator, mode);
-		} catch (ArrayIndexOutOfBoundsException e) {
-			throw new ClassFormatException(e.getMessage(), e);
-		}
-	}
-
-	private void disassemble(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
-		buffer.append(NLS.bind(Messages.disassembler_annotationentrystart, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode))}));
-		final AnnotationComponent[] components = annotation.getComponents();
-		for (int i = 0, max = components.length; i < max; i++) {
-			disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_annotationentryend);
-	}
-
-	private void disassemble(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(NLS.bind(Messages.disassembler_annotationcomponent, new String[] {new String(annotationComponent.getComponentName())}));
-		disassemble(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
-	}
-
-	private void disassemble(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		switch (annotationComponentValue.getTag()) {
-			case AnnotationComponentValue.BYTE_TAG :
-			case AnnotationComponentValue.CHAR_TAG :
-			case AnnotationComponentValue.DOUBLE_TAG :
-			case AnnotationComponentValue.FLOAT_TAG :
-			case AnnotationComponentValue.INTEGER_TAG :
-			case AnnotationComponentValue.LONG_TAG :
-			case AnnotationComponentValue.SHORT_TAG :
-			case AnnotationComponentValue.BOOLEAN_TAG :
-			case AnnotationComponentValue.STRING_TAG :
-				ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
-				String value = null;
-				switch (constantPoolEntry.getKind()) {
-					case ConstantPoolConstant.CONSTANT_Long :
-						value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
-						break;
-					case ConstantPoolConstant.CONSTANT_Float :
-						value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
-						break;
-					case ConstantPoolConstant.CONSTANT_Double :
-						value = Double.toString(constantPoolEntry.getDoubleValue());
-						break;
-					case ConstantPoolConstant.CONSTANT_Integer :
-						switch (annotationComponentValue.getTag()) {
-							case AnnotationComponentValue.CHAR_TAG :
-								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
-								break;
-							case AnnotationComponentValue.BOOLEAN_TAG :
-								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
-								break;
-							case AnnotationComponentValue.BYTE_TAG :
-								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-								break;
-							case AnnotationComponentValue.SHORT_TAG :
-								value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-								break;
-							case AnnotationComponentValue.INTEGER_TAG :
-								value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-						}
-						break;
-					case ConstantPoolConstant.CONSTANT_Utf8 :
-						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
-				}
-				buffer.append(NLS.bind(Messages.disassembler_annotationdefaultvalue, value));
-				break;
-			case AnnotationComponentValue.ENUM_TAG :
-				final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
-				final char[] constantName = annotationComponentValue.getEnumConstantName();
-				buffer.append(NLS.bind(Messages.disassembler_annotationenumvalue, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode)), new String(constantName)}));
-				break;
-			case AnnotationComponentValue.CLASS_TAG :
-				constantPoolEntry = annotationComponentValue.getClassInfo();
-				final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
-				buffer.append(NLS.bind(Messages.disassembler_annotationclassvalue, new String[] {new String(returnClassName(Signature.toCharArray(className), '.', mode))}));
-				break;
-			case AnnotationComponentValue.ANNOTATION_TAG :
-				buffer.append(Messages.disassembler_annotationannotationvalue);
-				Annotation annotation = annotationComponentValue.getAnnotationValue();
-				disassemble(annotation, buffer, lineSeparator, tabNumber + 1, mode);
-				break;
-			case AnnotationComponentValue.ARRAY_TAG :
-				buffer.append(Messages.disassembler_annotationarrayvaluestart);
-				final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
-				for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
-					writeNewLine(buffer, lineSeparator, tabNumber + 1);
-					disassemble(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
-				}
-				writeNewLine(buffer, lineSeparator, tabNumber + 1);
-				buffer.append(Messages.disassembler_annotationarrayvalueend);
-		}
-	}
-
-	private void disassemble(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_annotationdefaultheader);
-		AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
-		writeNewLine(buffer, lineSeparator, tabNumber + 2);
-		disassemble(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
-	}
-
-	/**
-	 * Disassemble a method info header
-	 */
-	private void disassemble(ClassFileReader classFileReader, char[] className, MethodInfo methodInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber);
-		final CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
-		final char[] methodDescriptor = methodInfo.getDescriptor();
-		final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(methodInfo, AttributeNamesConstants.SIGNATURE);
-		final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
-		final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
-		final ClassFileAttribute runtimeVisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS);
-		final ClassFileAttribute runtimeInvisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS);
-		final ClassFileAttribute annotationDefaultAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.ANNOTATION_DEFAULT);
-		if (checkMode(mode, DETAILED)) {
-			buffer.append(NLS.bind(Messages.classfileformat_methoddescriptor, new String[] {new String(methodDescriptor)}));
-			if (methodInfo.isDeprecated()) {
-				buffer.append(Messages.disassembler_deprecated);
-			}
-			writeNewLine(buffer, lineSeparator, tabNumber);
-			if (signatureAttribute != null) {
-				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-			if (codeAttribute != null) {
-				buffer.append(NLS.bind(Messages.classfileformat_stacksAndLocals, new String[] {Integer.toString(codeAttribute.getMaxStack()), Integer.toString(codeAttribute.getMaxLocals())}));
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-			// disassemble compact version of annotations
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-		}
-		final int accessFlags = methodInfo.getAccessFlags();
-		decodeModifiersForMethod(buffer, accessFlags);
-		if (methodInfo.isSynthetic()) {
-			buffer.append("synthetic"); //$NON-NLS-1$
-			buffer.append(Messages.disassembler_space);
-		}
-		CharOperation.replace(methodDescriptor, '/', '.');
-		final boolean isVarArgs = isVarArgs(methodInfo);
-		char[] methodHeader = null;
-		if (methodInfo.isConstructor()) {
-			methodHeader = Signature.toCharArray(methodDescriptor, returnClassName(className, '.', COMPACT), null, !checkMode(mode, COMPACT), false, isVarArgs);
-		} else if (methodInfo.isClinit()) {
-			methodHeader = Messages.classfileformat_clinitname.toCharArray();
-		} else {
-			methodHeader = Signature.toCharArray(methodDescriptor, methodInfo.getName(), null, !checkMode(mode, COMPACT), true, isVarArgs);
-		}
-		if (checkMode(mode, DETAILED) && (runtimeInvisibleParameterAnnotationsAttribute != null || runtimeVisibleParameterAnnotationsAttribute != null)) {
-			ParameterAnnotation[] invisibleParameterAnnotations = null;
-			ParameterAnnotation[] visibleParameterAnnotations = null;
-			int length = -1;
-			if (runtimeInvisibleParameterAnnotationsAttribute != null) {
-				RuntimeInvisibleParameterAnnotationsAttribute attribute = (RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute;
-				invisibleParameterAnnotations = attribute.getParameterAnnotations();
-				length = invisibleParameterAnnotations.length;
-			}
-			if (runtimeVisibleParameterAnnotationsAttribute != null) {
-				RuntimeVisibleParameterAnnotationsAttribute attribute = (RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute;
-				visibleParameterAnnotations = attribute.getParameterAnnotations();
-				length = visibleParameterAnnotations.length;
-			}
-			int insertionPosition = CharOperation.indexOf('(', methodHeader) + 1;
-			int start = 0;
-			StringBuffer stringBuffer = new StringBuffer();
-			stringBuffer.append(methodHeader, 0, insertionPosition);
-			for (int i = 0; i < length; i++) {
-				if (i > 0) {
-					stringBuffer.append(' ');
-				}
-				int stringBufferSize = stringBuffer.length();
-				if (runtimeVisibleParameterAnnotationsAttribute != null) {
-					disassembleAsModifier((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
-				}
-				if (runtimeInvisibleParameterAnnotationsAttribute != null) {
-					if (stringBuffer.length() != stringBufferSize) {
-						stringBuffer.append(' ');
-						stringBufferSize = stringBuffer.length();
-					}
-					disassembleAsModifier((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
-				}
-				if (i == 0 && stringBuffer.length() != stringBufferSize) {
-					stringBuffer.append(' ');
-				}
-				start = insertionPosition;
-				insertionPosition = CharOperation.indexOf(',', methodHeader, start + 1) + 1;
-				if (insertionPosition == 0) {
-					stringBuffer.append(methodHeader, start, methodHeader.length - start);
-				} else {
-					stringBuffer.append(methodHeader, start, insertionPosition - start);
-				}
-			}
-			buffer.append(stringBuffer);
-		} else {
-			buffer.append(methodHeader);
-		}
-		ExceptionAttribute exceptionAttribute = methodInfo.getExceptionAttribute();
-		if (exceptionAttribute != null) {
-			buffer.append(" throws "); //$NON-NLS-1$
-			char[][] exceptionNames = exceptionAttribute.getExceptionNames();
-			int length = exceptionNames.length;
-			for (int i = 0; i < length; i++) {
-				if (i != 0) {
-					buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
-				}
-				char[] exceptionName = exceptionNames[i];
-				CharOperation.replace(exceptionName, '/', '.');
-				buffer.append(returnClassName(exceptionName, '.', mode));
-			}
-		}
-		if (checkMode(mode, DETAILED)) {
-			if (annotationDefaultAttribute != null) {
-				buffer.append(" default "); //$NON-NLS-1$
-				disassembleAsModifier((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-		}
-		buffer.append(Messages.disassembler_endofmethodheader);
-
-		if (checkMode(mode, DETAILED)) {
-			if (codeAttribute != null) {
-				disassemble(codeAttribute, methodDescriptor, (accessFlags & IModifierConstants.ACC_STATIC) != 0, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (annotationDefaultAttribute != null) {
-				disassemble((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (runtimeVisibleParameterAnnotationsAttribute != null) {
-				disassemble((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (runtimeInvisibleParameterAnnotationsAttribute != null) {
-				disassemble((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-		}
-	}
-
-	/**
-	 * Answers back the disassembled string of the ClassFileReader according to the
-	 * mode.
-	 * This is an output quite similar to the javap tool.
-	 *
-	 * @param classFileReader The classFileReader to be disassembled
-	 * @param lineSeparator the line separator to use.
-	 * @param mode the mode used to disassemble the ClassFileReader
-	 *
-	 * @return the disassembled string of the ClassFileReader according to the mode
-	 */
-	private String disassemble(ClassFileReader classFileReader, String lineSeparator, int mode) {
-		if (classFileReader == null)
-			return Utility.EMPTY_STRING;
-		char[] className = classFileReader.getClassName();
-		if (className == null) {
-			// incomplete initialization. We cannot go further.
-			return Utility.EMPTY_STRING;
-		}
-		className = CharOperation.replaceOnCopy(className, '/', '.');
-		final int accessFlags = classFileReader.getAccessFlags();
-		final boolean isEnum = (accessFlags & IModifierConstants.ACC_ENUM) != 0;
-
-		StringBuffer buffer = new StringBuffer();
-		SourceFileAttribute sourceAttribute = classFileReader.getSourceFileAttribute();
-		ClassFileAttribute classFileAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.SIGNATURE);
-		SignatureAttribute signatureAttribute = (SignatureAttribute) classFileAttribute;
-		if (checkMode(mode, DETAILED)) {
-			int minorVersion = classFileReader.getMinorVersion();
-			int majorVersion = classFileReader.getMajorVersion();
-			buffer.append(Messages.disassembler_begincommentline);
-			if (sourceAttribute != null) {
-				buffer.append(Messages.disassembler_sourceattributeheader);
-				buffer.append(sourceAttribute.getSourceFileName());
-			}
-			String versionNumber = VERSION_UNKNOWN;
-			if (minorVersion == 3 && majorVersion == 45) {
-				versionNumber = IModifierConstants.VERSION_1_1;
-			} else if (minorVersion == 0 && majorVersion == 46) {
-				versionNumber = IModifierConstants.VERSION_1_2;
-			} else if (minorVersion == 0 && majorVersion == 47) {
-				versionNumber = IModifierConstants.VERSION_1_3;
-			} else if (minorVersion == 0 && majorVersion == 48) {
-				versionNumber = IModifierConstants.VERSION_1_4;
-			} else if (minorVersion == 0 && majorVersion == 49) {
-				versionNumber = IModifierConstants.VERSION_1_5;
-			} else if (minorVersion == 0 && majorVersion == 50) {
-				versionNumber = IModifierConstants.VERSION_1_6;
-			} else if (minorVersion == 0 && majorVersion == 51) {
-				versionNumber = IModifierConstants.VERSION_1_7;
-			}
-			buffer.append(NLS.bind(Messages.classfileformat_versiondetails, new String[] {versionNumber, Integer.toString(majorVersion), Integer.toString(minorVersion), ((accessFlags & IModifierConstants.ACC_SUPER) != 0 ? Messages.classfileformat_superflagisset : Messages.classfileformat_superflagisnotset) + (isDeprecated(classFileReader) ? ", deprecated" : Utility.EMPTY_STRING)//$NON-NLS-1$
-			}));
-			writeNewLine(buffer, lineSeparator, 0);
-			if (signatureAttribute != null) {
-				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
-				writeNewLine(buffer, lineSeparator, 0);
-			}
-		}
-
-		InnerClassesAttribute innerClassesAttribute = classFileReader.getInnerClassesAttribute();
-		ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
-		ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
-
-		if (checkMode(mode, DETAILED)) {
-			// disassemble compact version of annotations
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
-				writeNewLine(buffer, lineSeparator, 0);
-			}
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
-				writeNewLine(buffer, lineSeparator, 0);
-			}
-		}
-		boolean decoded = false;
-		if (innerClassesAttribute != null) {
-			// search the right entry
-			InnerClassesAttributeEntry[] entries = innerClassesAttribute.getInnerClassAttributesEntries();
-			for (int i = 0, max = entries.length; i < max; i++) {
-				InnerClassesAttributeEntry entry = entries[i];
-				char[] innerClassName = entry.getInnerClassName();
-				if (innerClassName != null) {
-					if (Arrays.equals(classFileReader.getClassName(), innerClassName)) {
-						decodeModifiersForInnerClasses(buffer, entry.getAccessFlags(), false);
-						decoded = true;
-					}
-				}
-			}
-		}
-		if (!decoded) {
-			decodeModifiersForType(buffer, accessFlags);
-			if (isSynthetic(classFileReader)) {
-				buffer.append("synthetic"); //$NON-NLS-1$
-				buffer.append(Messages.disassembler_space);
-			}
-		}
-
-		final boolean isAnnotation = (accessFlags & IModifierConstants.ACC_ANNOTATION) != 0;
-		boolean isInterface = false;
-		if (isEnum) {
-			buffer.append("enum "); //$NON-NLS-1$
-		} else if (classFileReader.isClass()) {
-			buffer.append("class "); //$NON-NLS-1$
-		} else {
-			if (isAnnotation) {
-				buffer.append("@"); //$NON-NLS-1$
-			}
-			buffer.append("interface "); //$NON-NLS-1$
-			isInterface = true;
-		}
-
-		buffer.append(className);
-
-		char[] superclassName = classFileReader.getSuperclassName();
-		if (superclassName != null) {
-			CharOperation.replace(superclassName, '/', '.');
-			if (!isJavaLangObject(superclassName) && !isEnum) {
-				buffer.append(" extends "); //$NON-NLS-1$
-				buffer.append(returnClassName(superclassName, '.', mode));
-			}
-		}
-		if (!isAnnotation) {
-			char[][] superclassInterfaces = classFileReader.getInterfaceNames();
-			int length = superclassInterfaces.length;
-			if (length != 0) {
-				if (isInterface) {
-					buffer.append(" extends "); //$NON-NLS-1$
-				} else {
-					buffer.append(" implements "); //$NON-NLS-1$
-				}
-				for (int i = 0; i < length; i++) {
-					if (i != 0) {
-						buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
-					}
-					char[] superinterface = superclassInterfaces[i];
-					CharOperation.replace(superinterface, '/', '.');
-					buffer.append(returnClassName(superinterface, '.', mode));
-				}
-			}
-		}
-		buffer.append(Messages.disassembler_opentypedeclaration);
-		disassembleTypeMembers(classFileReader, className, buffer, lineSeparator, 1, mode, isEnum);
-		if (checkMode(mode, DETAILED)) {
-			ClassFileAttribute[] attributes = classFileReader.getAttributes();
-			int length = attributes.length;
-			EnclosingMethodAttribute enclosingMethodAttribute = getEnclosingMethodAttribute(classFileReader);
-			int remainingAttributesLength = length;
-			if (innerClassesAttribute != null) {
-				remainingAttributesLength--;
-			}
-			if (enclosingMethodAttribute != null) {
-				remainingAttributesLength--;
-			}
-			if (sourceAttribute != null) {
-				remainingAttributesLength--;
-			}
-			if (signatureAttribute != null) {
-				remainingAttributesLength--;
-			}
-			if (innerClassesAttribute != null || enclosingMethodAttribute != null || remainingAttributesLength != 0) {
-				writeNewLine(buffer, lineSeparator, 0);
-			}
-			if (innerClassesAttribute != null) {
-				disassemble(innerClassesAttribute, buffer, lineSeparator, 1);
-			}
-			if (enclosingMethodAttribute != null) {
-				disassemble(enclosingMethodAttribute, buffer, lineSeparator, 0);
-			}
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
-			}
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
-			}
-		}
-		writeNewLine(buffer, lineSeparator, 0);
-		buffer.append(Messages.disassembler_closetypedeclaration);
-		return buffer.toString();
-	}
-
-	private boolean isJavaLangObject(final char[] className) {
-		return Arrays.equals(TypeConstants.JAVA_LANG_OBJECT, CharOperation.splitOn('.', className));
-	}
-
-	private boolean isVarArgs(MethodInfo methodInfo) {
-		int accessFlags = methodInfo.getAccessFlags();
-		if ((accessFlags & IModifierConstants.ACC_VARARGS) != 0)
-			return true;
-		// check the presence of the unspecified Varargs attribute
-		return Utility.getAttribute(methodInfo, AttributeNamesConstants.VAR_ARGS) != null;
-	}
-
-	private void disassemble(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber - 1);
-		DefaultBytecodeVisitor visitor = new DefaultBytecodeVisitor(codeAttribute, methodDescriptor, isStatic, buffer, lineSeparator, tabNumber, mode);
-		try {
-			codeAttribute.traverse(visitor);
-		} catch (ClassFormatException e) {
-			dumpTab(tabNumber + 2, buffer);
-			buffer.append(Messages.classformat_classformatexception);
-			writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		}
-		final int exceptionTableLength = codeAttribute.getExceptionTableLength();
-		if (exceptionTableLength != 0) {
-			final int tabNumberForExceptionAttribute = tabNumber + 2;
-			dumpTab(tabNumberForExceptionAttribute, buffer);
-			final ExceptionTableEntry[] exceptionTableEntries = codeAttribute.getExceptionTable();
-			buffer.append(Messages.disassembler_exceptiontableheader);
-			writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
-			for (int i = 0; i < exceptionTableLength; i++) {
-				if (i != 0) {
-					writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
-				}
-				ExceptionTableEntry exceptionTableEntry = exceptionTableEntries[i];
-				char[] catchType;
-				if (exceptionTableEntry.getCatchTypeIndex() != 0) {
-					catchType = exceptionTableEntry.getCatchType();
-					CharOperation.replace(catchType, '/', '.');
-					catchType = returnClassName(catchType, '.', mode);
-				} else {
-					catchType = ANY_EXCEPTION;
-				}
-				buffer.append(NLS.bind(Messages.classfileformat_exceptiontableentry, new String[] {Integer.toString(exceptionTableEntry.getStartPC()), Integer.toString(exceptionTableEntry.getEndPC()), Integer.toString(exceptionTableEntry.getHandlerPC()), new String(catchType),}));
-			}
-		}
-	}
-
-	private void disassemble(EnclosingMethodAttribute enclosingMethodAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_enclosingmethodheader);
-		buffer.append(" ")//$NON-NLS-1$
-				.append(enclosingMethodAttribute.getEnclosingClass());
-		if (enclosingMethodAttribute.getMethodNameAndTypeIndex() != 0) {
-			buffer.append(".")//$NON-NLS-1$
-					.append(enclosingMethodAttribute.getMethodName()).append(enclosingMethodAttribute.getMethodDescriptor());
-		}
-	}
-
-	/**
-	 * Disassemble a field info
-	 */
-	private void disassemble(FieldInfo fieldInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber);
-		final char[] fieldDescriptor = fieldInfo.getDescriptor();
-		final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(fieldInfo, AttributeNamesConstants.SIGNATURE);
-		if (checkMode(mode, DETAILED)) {
-			buffer.append(NLS.bind(Messages.classfileformat_fieldddescriptor, new String[] {new String(fieldDescriptor)}));
-			if (fieldInfo.isDeprecated()) {
-				buffer.append(Messages.disassembler_deprecated);
-			}
-			writeNewLine(buffer, lineSeparator, tabNumber);
-			if (signatureAttribute != null) {
-				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-		}
-		final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
-		final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
-		if (checkMode(mode, DETAILED)) {
-			// disassemble compact version of annotations
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-		}
-		decodeModifiersForField(buffer, fieldInfo.getAccessFlags());
-		if (fieldInfo.isSynthetic()) {
-			buffer.append("synthetic"); //$NON-NLS-1$
-			buffer.append(Messages.disassembler_space);
-		}
-		buffer.append(returnClassName(getSignatureForField(fieldDescriptor), '.', mode));
-		buffer.append(' ');
-		buffer.append(new String(fieldInfo.getName()));
-		ConstantValueAttribute constantValueAttribute = fieldInfo.getConstantValueAttribute();
-		if (constantValueAttribute != null) {
-			buffer.append(Messages.disassembler_fieldhasconstant);
-			ConstantPoolEntry constantPoolEntry = constantValueAttribute.getConstantValue();
-			switch (constantPoolEntry.getKind()) {
-				case ConstantPoolConstant.CONSTANT_Long :
-					buffer.append(constantPoolEntry.getLongValue() + "L"); //$NON-NLS-1$
-					break;
-				case ConstantPoolConstant.CONSTANT_Float :
-					buffer.append(constantPoolEntry.getFloatValue() + "f"); //$NON-NLS-1$
-					break;
-				case ConstantPoolConstant.CONSTANT_Double :
-					buffer.append(constantPoolEntry.getDoubleValue());
-					break;
-				case ConstantPoolConstant.CONSTANT_Integer :
-					switch (fieldDescriptor[0]) {
-						case 'C' :
-							buffer.append("'" + (char) constantPoolEntry.getIntegerValue() + "'"); //$NON-NLS-1$//$NON-NLS-2$
-							break;
-						case 'Z' :
-							buffer.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
-							break;
-						case 'B' :
-							buffer.append(constantPoolEntry.getIntegerValue());
-							break;
-						case 'S' :
-							buffer.append(constantPoolEntry.getIntegerValue());
-							break;
-						case 'I' :
-							buffer.append(constantPoolEntry.getIntegerValue());
-					}
-					break;
-				case ConstantPoolConstant.CONSTANT_String :
-					buffer.append("\"" + decodeStringValue(constantPoolEntry.getStringValue()) + "\"");//$NON-NLS-1$//$NON-NLS-2$
-			}
-		}
-		buffer.append(Messages.disassembler_endoffieldheader);
-		if (checkMode(mode, DETAILED)) {
-			if (runtimeVisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-			if (runtimeInvisibleAnnotationsAttribute != null) {
-				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
-			}
-		}
-	}
-
-	private void disassemble(InnerClassesAttribute innerClassesAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
-		writeNewLine(buffer, lineSeparator, tabNumber);
-		buffer.append(Messages.disassembler_innerattributesheader);
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		InnerClassesAttributeEntry[] innerClassesAttributeEntries = innerClassesAttribute.getInnerClassAttributesEntries();
-		int length = innerClassesAttributeEntries.length;
-		int innerClassNameIndex, outerClassNameIndex, innerNameIndex, accessFlags;
-		InnerClassesAttributeEntry innerClassesAttributeEntry;
-		for (int i = 0; i < length; i++) {
-			if (i != 0) {
-				buffer.append(Messages.disassembler_comma);
-				writeNewLine(buffer, lineSeparator, tabNumber + 1);
-			}
-			innerClassesAttributeEntry = innerClassesAttributeEntries[i];
-			innerClassNameIndex = innerClassesAttributeEntry.getInnerClassNameIndex();
-			outerClassNameIndex = innerClassesAttributeEntry.getOuterClassNameIndex();
-			innerNameIndex = innerClassesAttributeEntry.getInnerNameIndex();
-			accessFlags = innerClassesAttributeEntry.getAccessFlags();
-			buffer.append(Messages.disassembler_openinnerclassentry).append(Messages.disassembler_inner_class_info_name);
-			if (innerClassNameIndex != 0) {
-				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerClassName());
-			}
-			buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_outer_class_info_name);
-			if (outerClassNameIndex != 0) {
-				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getOuterClassName());
-			}
-			writeNewLine(buffer, lineSeparator, tabNumber);
-			dumpTab(tabNumber, buffer);
-			buffer.append(Messages.disassembler_space);
-			buffer.append(Messages.disassembler_inner_name);
-			if (innerNameIndex != 0) {
-				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerName());
-			}
-			buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_inner_accessflags).append(accessFlags).append(Messages.disassembler_space);
-			decodeModifiersForInnerClasses(buffer, accessFlags, true);
-			buffer.append(Messages.disassembler_closeinnerclassentry);
-		}
-	}
-
-	private void disassemble(int index, ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		Annotation[] annotations = parameterAnnotation.getAnnotations();
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(NLS.bind(Messages.disassembler_parameterannotationentrystart, new String[] {Integer.toString(index), Integer.toString(annotations.length)}));
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassemble(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_runtimeinvisibleannotationsattributeheader);
-		Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassemble(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_runtimeinvisibleparameterannotationsattributeheader);
-		ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
-		for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
-			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassemble(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_runtimevisibleannotationsattributeheader);
-		Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassemble(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		writeNewLine(buffer, lineSeparator, tabNumber + 1);
-		buffer.append(Messages.disassembler_runtimevisibleparameterannotationsattributeheader);
-		ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
-		for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
-			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleAsModifier(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
-		buffer.append('@').append(returnClassName(Signature.toCharArray(typeName), '.', mode));
-		final AnnotationComponent[] components = annotation.getComponents();
-		final int length = components.length;
-		if (length != 0) {
-			buffer.append('(');
-			for (int i = 0; i < length; i++) {
-				if (i > 0) {
-					buffer.append(',');
-					writeNewLine(buffer, lineSeparator, tabNumber);
-				}
-				disassembleAsModifier(components[i], buffer, lineSeparator, tabNumber + 1, mode);
-			}
-			buffer.append(')');
-		}
-	}
-
-	private void disassembleAsModifier(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		buffer.append(annotationComponent.getComponentName()).append('=');
-		disassembleAsModifier(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
-	}
-
-	private void disassembleAsModifier(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		switch (annotationComponentValue.getTag()) {
-			case AnnotationComponentValue.BYTE_TAG :
-			case AnnotationComponentValue.CHAR_TAG :
-			case AnnotationComponentValue.DOUBLE_TAG :
-			case AnnotationComponentValue.FLOAT_TAG :
-			case AnnotationComponentValue.INTEGER_TAG :
-			case AnnotationComponentValue.LONG_TAG :
-			case AnnotationComponentValue.SHORT_TAG :
-			case AnnotationComponentValue.BOOLEAN_TAG :
-			case AnnotationComponentValue.STRING_TAG :
-				ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
-				String value = null;
-				switch (constantPoolEntry.getKind()) {
-					case ConstantPoolConstant.CONSTANT_Long :
-						value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
-						break;
-					case ConstantPoolConstant.CONSTANT_Float :
-						value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
-						break;
-					case ConstantPoolConstant.CONSTANT_Double :
-						value = Double.toString(constantPoolEntry.getDoubleValue());
-						break;
-					case ConstantPoolConstant.CONSTANT_Integer :
-						switch (annotationComponentValue.getTag()) {
-							case AnnotationComponentValue.CHAR_TAG :
-								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
-								break;
-							case AnnotationComponentValue.BOOLEAN_TAG :
-								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
-								break;
-							case AnnotationComponentValue.BYTE_TAG :
-								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-								break;
-							case AnnotationComponentValue.SHORT_TAG :
-								value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-								break;
-							case AnnotationComponentValue.INTEGER_TAG :
-								value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
-						}
-						break;
-					case ConstantPoolConstant.CONSTANT_Utf8 :
-						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
-				}
-				buffer.append(value);
-				break;
-			case AnnotationComponentValue.ENUM_TAG :
-				final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
-				final char[] constantName = annotationComponentValue.getEnumConstantName();
-				buffer.append(returnClassName(Signature.toCharArray(typeName), '.', mode)).append('.').append(constantName);
-				break;
-			case AnnotationComponentValue.CLASS_TAG :
-				constantPoolEntry = annotationComponentValue.getClassInfo();
-				final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
-				buffer.append(returnClassName(Signature.toCharArray(className), '.', mode));
-				break;
-			case AnnotationComponentValue.ANNOTATION_TAG :
-				Annotation annotation = annotationComponentValue.getAnnotationValue();
-				disassembleAsModifier(annotation, buffer, lineSeparator, tabNumber + 1, mode);
-				break;
-			case AnnotationComponentValue.ARRAY_TAG :
-				final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
-				buffer.append('{');
-				for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
-					if (i > 0) {
-						buffer.append(',');
-					}
-					disassembleAsModifier(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
-				}
-				buffer.append('}');
-		}
-	}
-
-	private void disassembleAsModifier(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
-		disassembleAsModifier(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
-	}
-
-	private void disassembleAsModifier(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleAsModifier(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
-		ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
-		if (parameterAnnotations.length > index) {
-			disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleAsModifier(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
-		ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
-		if (parameterAnnotations.length > index) {
-			disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleAsModifier(ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		Annotation[] annotations = parameterAnnotation.getAnnotations();
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			if (i > 0) {
-				buffer.append(' ');
-			}
-			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleAsModifier(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
-		Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
-		for (int i = 0, max = annotations.length; i < max; i++) {
-			if (i > 0) {
-				writeNewLine(buffer, lineSeparator, tabNumber);
-			}
-			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
-		}
-	}
-
-	private void disassembleTypeMembers(ClassFileReader classFileReader, char[] className, StringBuffer buffer, String lineSeparator, int tabNumber, int mode, boolean isEnum) {
-		FieldInfo[] fields = classFileReader.getFieldInfos();
-		// sort fields
-		Arrays.sort(fields, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				FieldInfo fieldInfo1 = (FieldInfo) o1;
-				FieldInfo fieldInfo2 = (FieldInfo) o2;
-				int compare = new String(fieldInfo1.getName()).compareTo(new String(fieldInfo2.getName()));
-				if (compare == 0) {
-					return new String(fieldInfo1.getDescriptor()).compareTo(new String(fieldInfo2.getDescriptor()));
-				}
-				return compare;
-			}
-		});
-		for (int i = 0, max = fields.length; i < max; i++) {
-			writeNewLine(buffer, lineSeparator, tabNumber);
-			disassemble(fields[i], buffer, lineSeparator, tabNumber, mode);
-		}
-		MethodInfo[] methods = classFileReader.getMethodInfos();
-		// sort methods
-		Arrays.sort(methods, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				MethodInfo methodInfo1 = (MethodInfo) o1;
-				MethodInfo methodInfo2 = (MethodInfo) o2;
-				int compare = new String(methodInfo1.getName()).compareTo(new String(methodInfo2.getName()));
-				if (compare == 0) {
-					return new String(methodInfo1.getDescriptor()).compareTo(new String(methodInfo2.getDescriptor()));
-				}
-				return compare;
-			}
-		});
-		for (int i = 0, max = methods.length; i < max; i++) {
-			writeNewLine(buffer, lineSeparator, tabNumber);
-			disassemble(classFileReader, className, methods[i], buffer, lineSeparator, tabNumber, mode);
-		}
-	}
-
-	private final void dumpTab(int tabNumber, StringBuffer buffer) {
-		for (int i = 0; i < tabNumber; i++) {
-			buffer.append(Messages.disassembler_indentation);
-		}
-	}
-
-	private EnclosingMethodAttribute getEnclosingMethodAttribute(ClassFileReader classFileReader) {
-		ClassFileAttribute[] attributes = classFileReader.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.ENCLOSING_METHOD)) {
-				return (EnclosingMethodAttribute) attributes[i];
-			}
-		}
-		return null;
-	}
-
-	private char[] getSignatureForField(char[] fieldDescriptor) {
-		char[] newFieldDescriptor = CharOperation.replaceOnCopy(fieldDescriptor, '/', '.');
-		newFieldDescriptor = CharOperation.replaceOnCopy(newFieldDescriptor, '$', '%');
-		char[] fieldDescriptorSignature = Signature.toCharArray(newFieldDescriptor);
-		CharOperation.replace(fieldDescriptorSignature, '%', '$');
-		return fieldDescriptorSignature;
-	}
-
-	private boolean isDeprecated(ClassFileReader classFileReader) {
-		ClassFileAttribute[] attributes = classFileReader.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.DEPRECATED)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	private boolean isSynthetic(ClassFileReader classFileReader) {
-		int flags = classFileReader.getAccessFlags();
-		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
-			return true;
-		}
-		ClassFileAttribute[] attributes = classFileReader.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.SYNTHETIC)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	private boolean checkMode(int mode, int flag) {
-		return (mode & flag) != 0;
-	}
-
-	private boolean isCompact(int mode) {
-		return (mode & Disassembler.COMPACT) != 0;
-	}
-
-	private char[] returnClassName(char[] classInfoName, char separator, int mode) {
-		if (classInfoName.length == 0) {
-			return CharOperation.NO_CHAR;
-		} else if (isCompact(mode)) {
-			int lastIndexOfSlash = CharOperation.lastIndexOf(separator, classInfoName);
-			if (lastIndexOfSlash != -1) {
-				return CharOperation.subarray(classInfoName, lastIndexOfSlash + 1, classInfoName.length);
-			}
-		}
-		return classInfoName;
-	}
-
-	private void writeNewLine(StringBuffer buffer, String lineSeparator, int tabNumber) {
-		buffer.append(lineSeparator);
-		dumpTab(tabNumber, buffer);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java
deleted file mode 100644
index f764778..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/EnclosingMethodAttribute.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class EnclosingMethodAttribute extends ClassFileAttribute {
-
-	private int enclosingClassIndex;
-	private char[] enclosingClassName;
-	private int methodDescriptorIndex;
-	private char[] methodDescriptor;
-	private int methodNameIndex;
-	private char[] methodName;
-	private int methodNameAndTypeIndex;
-
-	EnclosingMethodAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		int index = u2At(classFileBytes, 6, offset);
-		this.enclosingClassIndex = index;
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.enclosingClassName = constantPoolEntry.getClassInfoName();
-		this.methodNameAndTypeIndex = u2At(classFileBytes, 8, offset);
-		if (this.methodNameAndTypeIndex != 0) {
-			constantPoolEntry = constantPool.decodeEntry(this.methodNameAndTypeIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_NameAndType) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.methodDescriptorIndex = constantPoolEntry.getNameAndTypeInfoDescriptorIndex();
-			this.methodNameIndex = constantPoolEntry.getNameAndTypeInfoNameIndex();
-			constantPoolEntry = constantPool.decodeEntry(this.methodDescriptorIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.methodDescriptor = constantPoolEntry.getUtf8Value();
-			constantPoolEntry = constantPool.decodeEntry(this.methodNameIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.methodName = constantPoolEntry.getUtf8Value();
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getEnclosingClass()
-	 */
-	public char[] getEnclosingClass() {
-		return this.enclosingClassName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDeclaringClassDescriptorIndex()
-	 */
-	public int getEnclosingClassIndex() {
-		return this.enclosingClassIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptor()
-	 */
-	public char[] getMethodDescriptor() {
-		return this.methodDescriptor;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptorIndex()
-	 */
-	public int getMethodDescriptorIndex() {
-		return this.methodDescriptorIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodName()
-	 */
-	public char[] getMethodName() {
-		return this.methodName;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameIndex()
-	 */
-	public int getMethodNameIndex() {
-		return this.methodNameIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameAndTypeIndex()
-	 */
-	public int getMethodNameAndTypeIndex() {
-		return this.methodNameAndTypeIndex;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java
deleted file mode 100644
index 336aae0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionAttribute.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ExceptionAttribute extends ClassFileAttribute {
-	private int exceptionsNumber;
-	private char[][] exceptionNames;
-	private int[] exceptionIndexes;
-
-	ExceptionAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.exceptionsNumber = u2At(classFileBytes, 6, offset);
-		int exceptionLength = this.exceptionsNumber;
-		this.exceptionNames = CharOperation.NO_CHAR_CHAR;
-		this.exceptionIndexes = Utility.EMPTY_INT_ARRAY;
-		if (exceptionLength != 0) {
-			this.exceptionNames = new char[exceptionLength][];
-			this.exceptionIndexes = new int[exceptionLength];
-		}
-		int readOffset = 8;
-		ConstantPoolEntry constantPoolEntry;
-		for (int i = 0; i < exceptionLength; i++) {
-			this.exceptionIndexes[i] = u2At(classFileBytes, readOffset, offset);
-			constantPoolEntry = constantPool.decodeEntry(this.exceptionIndexes[i]);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.exceptionNames[i] = constantPoolEntry.getClassInfoName();
-			readOffset += 2;
-		}
-	}
-
-	/*
-	 * @see IExceptionAttribute#getExceptionIndexes()
-	 */
-	public int[] getExceptionIndexes() {
-		return this.exceptionIndexes;
-	}
-
-	/*
-	 * @see IExceptionAttribute#getExceptionNames()
-	 */
-	public char[][] getExceptionNames() {
-		return this.exceptionNames;
-	}
-
-	/*
-	 * @see IExceptionAttribute#getExceptionsNumber()
-	 */
-	public int getExceptionsNumber() {
-		return this.exceptionsNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java
deleted file mode 100644
index 6d889cd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ExceptionTableEntry.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ExceptionTableEntry extends ClassFileStruct {
-
-	private int startPC;
-	private int endPC;
-	private int handlerPC;
-	private int catchTypeIndex;
-	private char[] catchType;
-
-	ExceptionTableEntry(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		this.startPC = u2At(classFileBytes, 0, offset);
-		this.endPC = u2At(classFileBytes, 2, offset);
-		this.handlerPC = u2At(classFileBytes, 4, offset);
-		this.catchTypeIndex = u2At(classFileBytes, 6, offset);
-		if (this.catchTypeIndex != 0) {
-			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.catchTypeIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.catchType = constantPoolEntry.getClassInfoName();
-		}
-	}
-
-	/*
-	 * @see IExceptionTableEntry#getStartPC()
-	 */
-	public int getStartPC() {
-		return this.startPC;
-	}
-
-	/*
-	 * @see IExceptionTableEntry#getEndPC()
-	 */
-	public int getEndPC() {
-		return this.endPC;
-	}
-
-	/*
-	 * @see IExceptionTableEntry#getHandlerPC()
-	 */
-	public int getHandlerPC() {
-		return this.handlerPC;
-	}
-
-	/*
-	 * @see IExceptionTableEntry#getCatchTypeIndex()
-	 */
-	public int getCatchTypeIndex() {
-		return this.catchTypeIndex;
-	}
-
-	/*
-	 * @see IExceptionTableEntry#getCatchType()
-	 */
-	public char[] getCatchType() {
-		return this.catchType;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java
deleted file mode 100644
index 9ebd6a8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/FieldInfo.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class FieldInfo extends ClassFileStruct {
-	private int accessFlags;
-	private int attributeBytes;
-	private ClassFileAttribute[] attributes;
-	private int attributesCount;
-	private ConstantValueAttribute constantValueAttribute;
-	private char[] descriptor;
-	private int descriptorIndex;
-	private boolean isDeprecated;
-	private boolean isSynthetic;
-	private char[] name;
-	private int nameIndex;
-
-	/*
-	 * @param classFileBytes byte[]
-	 * @param constantPool IConstantPool
-	 * @param offset int
-	 */
-	public FieldInfo(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
-		final int flags = u2At(classFileBytes, 0, offset);
-		this.accessFlags = flags;
-		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
-			this.isSynthetic = true;
-		}
-		this.nameIndex = u2At(classFileBytes, 2, offset);
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.name = constantPoolEntry.getUtf8Value();
-
-		this.descriptorIndex = u2At(classFileBytes, 4, offset);
-		constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.descriptor = constantPoolEntry.getUtf8Value();
-
-		this.attributesCount = u2At(classFileBytes, 6, offset);
-		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
-		int readOffset = 8;
-		if (this.attributesCount != 0) {
-			this.attributes = new ClassFileAttribute[this.attributesCount];
-		}
-		int attributesIndex = 0;
-		for (int i = 0; i < this.attributesCount; i++) {
-			constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			char[] attributeName = constantPoolEntry.getUtf8Value();
-			if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
-				this.isDeprecated = true;
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
-				this.isSynthetic = true;
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.CONSTANT_VALUE)) {
-				this.constantValueAttribute = new ConstantValueAttribute(classFileBytes, constantPool, offset + readOffset);
-				this.attributes[attributesIndex++] = this.constantValueAttribute;
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
-				this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else {
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			}
-			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
-		}
-
-		this.attributeBytes = readOffset;
-	}
-
-	/*
-	 * @see IFieldInfo#getAccessFlags()
-	 */
-	public int getAccessFlags() {
-		return this.accessFlags;
-	}
-
-	/*
-	 * @see IFieldInfo#getAttributeCount()
-	 */
-	public int getAttributeCount() {
-		return this.attributesCount;
-	}
-
-	/*
-	 * @see IFieldInfo#getAttributes()
-	 */
-	public ClassFileAttribute[] getAttributes() {
-		return this.attributes;
-	}
-
-	/*
-	 * @see IFieldInfo#getConstantValueAttribute()
-	 */
-	public ConstantValueAttribute getConstantValueAttribute() {
-		return this.constantValueAttribute;
-	}
-
-	/*
-	 * @see IFieldInfo#getDescriptor()
-	 */
-	public char[] getDescriptor() {
-		return this.descriptor;
-	}
-
-	/*
-	 * @see IFieldInfo#getDescriptorIndex()
-	 */
-	public int getDescriptorIndex() {
-		return this.descriptorIndex;
-	}
-
-	/*
-	 * @see IFieldInfo#getName()
-	 */
-	public char[] getName() {
-		return this.name;
-	}
-
-	/*
-	 * @see IFieldInfo#getNameIndex()
-	 */
-	public int getNameIndex() {
-		return this.nameIndex;
-	}
-
-	/*
-	 * @see IFieldInfo#hasConstantValueAttribute()
-	 */
-	public boolean hasConstantValueAttribute() {
-		return this.constantValueAttribute != null;
-	}
-
-	/*
-	 * @see IFieldInfo#isDeprecated()
-	 */
-	public boolean isDeprecated() {
-		return this.isDeprecated;
-	}
-
-	/*
-	 * @see IFieldInfo#isSynthetic()
-	 */
-	public boolean isSynthetic() {
-		return this.isSynthetic;
-	}
-
-	int sizeInBytes() {
-		return this.attributeBytes;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java
deleted file mode 100644
index 17607b1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IModifierConstants.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public interface IModifierConstants {
-
-	int ACC_PUBLIC = 0x0001;
-	int ACC_PRIVATE = 0x0002;
-	int ACC_PROTECTED = 0x0004;
-	int ACC_STATIC = 0x0008;
-	int ACC_FINAL = 0x0010;
-	int ACC_SUPER = 0x0020;
-	int ACC_SYNCHRONIZED = 0x0020;
-	int ACC_VOLATILE = 0x0040;
-
-	/**
-	 * Indicates a bridge method (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	int ACC_BRIDGE = 0x0040;
-	int ACC_TRANSIENT = 0x0080;
-
-	/**
-	 * Indicates a variable arity method (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	int ACC_VARARGS = 0x0080;
-	int ACC_NATIVE = 0x0100;
-	int ACC_INTERFACE = 0x0200;
-	int ACC_ABSTRACT = 0x0400;
-	int ACC_STRICT = 0x0800;
-	/**
-	 * Indicates a synthetic member.
-	 * @since 3.0
-	 */
-	int ACC_SYNTHETIC = 0x1000;
-
-	/**
-	 * Indicates an annotation (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	int ACC_ANNOTATION = 0x2000;
-
-	/**
-	 * Indicates an enum (added in J2SE 1.5).
-	 * @since 3.0
-	 */
-	int ACC_ENUM = 0x4000;
-
-	/**
-	 * Configurable option value: {@value}.
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 2.0
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_3 = "1.3"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 2.0
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_4 = "1.4"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 3.0
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_5 = "1.5"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 3.2
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_6 = "1.6"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 3.3
-	 * @category OptionValue
-	 */
-	public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$
-	/**
-	 * Configurable option value: {@value}.
-	 * @since 3.4
-	 * @category OptionValue
-	 */
-	public static final String VERSION_CLDC_1_1 = "cldc1.1"; //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java
deleted file mode 100644
index 720591e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/IOpcodeMnemonics.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public interface IOpcodeMnemonics {
-
-	int NOP = 0x00;
-	int ACONST_NULL = 0x01;
-	int ICONST_M1 = 0x02;
-	int ICONST_0 = 0x03;
-	int ICONST_1 = 0x04;
-	int ICONST_2 = 0x05;
-	int ICONST_3 = 0x06;
-	int ICONST_4 = 0x07;
-	int ICONST_5 = 0x08;
-	int LCONST_0 = 0x09;
-	int LCONST_1 = 0x0A;
-	int FCONST_0 = 0x0B;
-	int FCONST_1 = 0x0C;
-	int FCONST_2 = 0x0D;
-	int DCONST_0 = 0x0E;
-	int DCONST_1 = 0x0F;
-	int BIPUSH = 0x10;
-	int SIPUSH = 0x11;
-	int LDC = 0x12;
-	int LDC_W = 0x13;
-	int LDC2_W = 0x14;
-	int ILOAD = 0x15;
-	int LLOAD = 0x16;
-	int FLOAD = 0x17;
-	int DLOAD = 0x18;
-	int ALOAD = 0x19;
-	int ILOAD_0 = 0x1A;
-	int ILOAD_1 = 0x1B;
-	int ILOAD_2 = 0x1C;
-	int ILOAD_3 = 0x1D;
-	int LLOAD_0 = 0x1E;
-	int LLOAD_1 = 0x1F;
-	int LLOAD_2 = 0x20;
-	int LLOAD_3 = 0x21;
-	int FLOAD_0 = 0x22;
-	int FLOAD_1 = 0x23;
-	int FLOAD_2 = 0x24;
-	int FLOAD_3 = 0x25;
-	int DLOAD_0 = 0x26;
-	int DLOAD_1 = 0x27;
-	int DLOAD_2 = 0x28;
-	int DLOAD_3 = 0x29;
-	int ALOAD_0 = 0x2A;
-	int ALOAD_1 = 0x2B;
-	int ALOAD_2 = 0x2C;
-	int ALOAD_3 = 0x2D;
-	int IALOAD = 0x2E;
-	int LALOAD = 0x2F;
-	int FALOAD = 0x30;
-	int DALOAD = 0x31;
-	int AALOAD = 0x32;
-	int BALOAD = 0x33;
-	int CALOAD = 0x34;
-	int SALOAD = 0x35;
-	int ISTORE = 0x36;
-	int LSTORE = 0x37;
-	int FSTORE = 0x38;
-	int DSTORE = 0x39;
-	int ASTORE = 0x3A;
-	int ISTORE_0 = 0x3B;
-	int ISTORE_1 = 0x3C;
-	int ISTORE_2 = 0x3D;
-	int ISTORE_3 = 0x3E;
-	int LSTORE_0 = 0x3F;
-	int LSTORE_1 = 0x40;
-	int LSTORE_2 = 0x41;
-	int LSTORE_3 = 0x42;
-	int FSTORE_0 = 0x43;
-	int FSTORE_1 = 0x44;
-	int FSTORE_2 = 0x45;
-	int FSTORE_3 = 0x46;
-	int DSTORE_0 = 0x47;
-	int DSTORE_1 = 0x48;
-	int DSTORE_2 = 0x49;
-	int DSTORE_3 = 0x4A;
-	int ASTORE_0 = 0x4B;
-	int ASTORE_1 = 0x4C;
-	int ASTORE_2 = 0x4D;
-	int ASTORE_3 = 0x4E;
-	int IASTORE = 0x4F;
-	int LASTORE = 0x50;
-	int FASTORE = 0x51;
-	int DASTORE = 0x52;
-	int AASTORE = 0x53;
-	int BASTORE = 0x54;
-	int CASTORE = 0x55;
-	int SASTORE = 0x56;
-	int POP = 0x57;
-	int POP2 = 0x58;
-	int DUP = 0x59;
-	int DUP_X1 = 0x5A;
-	int DUP_X2 = 0x5B;
-	int DUP2 = 0x5C;
-	int DUP2_X1 = 0x5D;
-	int DUP2_X2 = 0x5E;
-	int SWAP = 0x5F;
-	int IADD = 0x60;
-	int LADD = 0x61;
-	int FADD = 0x62;
-	int DADD = 0x63;
-	int ISUB = 0x64;
-	int LSUB = 0x65;
-	int FSUB = 0x66;
-	int DSUB = 0x67;
-	int IMUL = 0x68;
-	int LMUL = 0x69;
-	int FMUL = 0x6A;
-	int DMUL = 0x6B;
-	int IDIV = 0x6C;
-	int LDIV = 0x6D;
-	int FDIV = 0x6E;
-	int DDIV = 0x6F;
-	int IREM = 0x70;
-	int LREM = 0x71;
-	int FREM = 0x72;
-	int DREM = 0x73;
-	int INEG = 0x74;
-	int LNEG = 0x75;
-	int FNEG = 0x76;
-	int DNEG = 0x77;
-	int ISHL = 0x78;
-	int LSHL = 0x79;
-	int ISHR = 0x7A;
-	int LSHR = 0x7B;
-	int IUSHR = 0x7C;
-	int LUSHR = 0x7D;
-	int IAND = 0x7E;
-	int LAND = 0x7F;
-	int IOR = 0x80;
-	int LOR = 0x81;
-	int IXOR = 0x82;
-	int LXOR = 0x83;
-	int IINC = 0x84;
-	int I2L = 0x85;
-	int I2F = 0x86;
-	int I2D = 0x87;
-	int L2I = 0x88;
-	int L2F = 0x89;
-	int L2D = 0x8A;
-	int F2I = 0x8B;
-	int F2L = 0x8C;
-	int F2D = 0x8D;
-	int D2I = 0x8E;
-	int D2L = 0x8F;
-	int D2F = 0x90;
-	int I2B = 0x91;
-	int I2C = 0x92;
-	int I2S = 0x93;
-	int LCMP = 0x94;
-	int FCMPL = 0x95;
-	int FCMPG = 0x96;
-	int DCMPL = 0x97;
-	int DCMPG = 0x98;
-	int IFEQ = 0x99;
-	int IFNE = 0x9A;
-	int IFLT = 0x9B;
-	int IFGE = 0x9C;
-	int IFGT = 0x9D;
-	int IFLE = 0x9E;
-	int IF_ICMPEQ = 0x9F;
-	int IF_ICMPNE = 0xA0;
-	int IF_ICMPLT = 0xA1;
-	int IF_ICMPGE = 0xA2;
-	int IF_ICMPGT = 0xA3;
-	int IF_ICMPLE = 0xA4;
-	int IF_ACMPEQ = 0xA5;
-	int IF_ACMPNE = 0xA6;
-	int GOTO = 0xA7;
-	int JSR = 0xA8;
-	int RET = 0xA9;
-	int TABLESWITCH = 0xAA;
-	int LOOKUPSWITCH = 0xAB;
-	int IRETURN = 0xAC;
-	int LRETURN = 0xAD;
-	int FRETURN = 0xAE;
-	int DRETURN = 0xAF;
-	int ARETURN = 0xB0;
-	int RETURN = 0xB1;
-	int GETSTATIC = 0xB2;
-	int PUTSTATIC = 0xB3;
-	int GETFIELD = 0xB4;
-	int PUTFIELD = 0xB5;
-	int INVOKEVIRTUAL = 0xB6;
-	int INVOKESPECIAL = 0xB7;
-	int INVOKESTATIC = 0xB8;
-	int INVOKEINTERFACE = 0xB9;
-	int NEW = 0xBB;
-	int NEWARRAY = 0xBC;
-	int ANEWARRAY = 0xBD;
-	int ARRAYLENGTH = 0xBE;
-	int ATHROW = 0xBF;
-	int CHECKCAST = 0xC0;
-	int INSTANCEOF = 0xC1;
-	int MONITORENTER = 0xC2;
-	int MONITOREXIT = 0xC3;
-	int WIDE = 0xC4;
-	int MULTIANEWARRAY = 0xC5;
-	int IFNULL = 0xC6;
-	int IFNONNULL = 0xC7;
-	int GOTO_W = 0xC8;
-	int JSR_W = 0xC9;
-
-	int BREAKPOINT = 0xCA;
-	int IMPDEP1 = 0xFE;
-	int IMPDEP2 = 0xFF;
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java
deleted file mode 100644
index 4a31609..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class InnerClassesAttribute extends ClassFileAttribute {
-	private static final InnerClassesAttributeEntry[] NO_ENTRIES = new InnerClassesAttributeEntry[0];
-
-	private int numberOfClasses;
-	private InnerClassesAttributeEntry[] entries;
-
-	/**
-	 * Constructor for InnerClassesAttribute.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public InnerClassesAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.numberOfClasses = u2At(classFileBytes, 6, offset);
-		final int length = this.numberOfClasses;
-		if (length != 0) {
-			int readOffset = 8;
-			this.entries = new InnerClassesAttributeEntry[length];
-			for (int i = 0; i < length; i++) {
-				this.entries[i] = new InnerClassesAttributeEntry(classFileBytes, constantPool, offset + readOffset);
-				readOffset += 8;
-			}
-		} else {
-			this.entries = NO_ENTRIES;
-		}
-	}
-
-	/*
-	 * @see IInnerClassesAttribute#getInnerClassAttributesEntries()
-	 */
-	public InnerClassesAttributeEntry[] getInnerClassAttributesEntries() {
-		return this.entries;
-	}
-
-	/*
-	 * @see IInnerClassesAttribute#getNumberOfClasses()
-	 */
-	public int getNumberOfClasses() {
-		return this.numberOfClasses;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java
deleted file mode 100644
index 34b267f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/InnerClassesAttributeEntry.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class InnerClassesAttributeEntry extends ClassFileStruct {
-
-	private int innerClassNameIndex;
-	private int outerClassNameIndex;
-	private int innerNameIndex;
-	private char[] innerClassName;
-	private char[] outerClassName;
-	private char[] innerName;
-	private int accessFlags;
-
-	public InnerClassesAttributeEntry(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
-		this.innerClassNameIndex = u2At(classFileBytes, 0, offset);
-		this.outerClassNameIndex = u2At(classFileBytes, 2, offset);
-		this.innerNameIndex = u2At(classFileBytes, 4, offset);
-		this.accessFlags = u2At(classFileBytes, 6, offset);
-		ConstantPoolEntry constantPoolEntry;
-		if (this.innerClassNameIndex != 0) {
-			constantPoolEntry = constantPool.decodeEntry(this.innerClassNameIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.innerClassName = constantPoolEntry.getClassInfoName();
-		}
-		if (this.outerClassNameIndex != 0) {
-			constantPoolEntry = constantPool.decodeEntry(this.outerClassNameIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.outerClassName = constantPoolEntry.getClassInfoName();
-		}
-		if (this.innerNameIndex != 0) {
-			constantPoolEntry = constantPool.decodeEntry(this.innerNameIndex);
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			this.innerName = constantPoolEntry.getUtf8Value();
-		}
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getAccessFlags()
-	 */
-	public int getAccessFlags() {
-		return this.accessFlags;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getInnerClassName()
-	 */
-	public char[] getInnerClassName() {
-		return this.innerClassName;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getInnerClassNameIndex()
-	 */
-	public int getInnerClassNameIndex() {
-		return this.innerClassNameIndex;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getInnerName()
-	 */
-	public char[] getInnerName() {
-		return this.innerName;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getInnerNameIndex()
-	 */
-	public int getInnerNameIndex() {
-		return this.innerNameIndex;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getOuterClassName()
-	 */
-	public char[] getOuterClassName() {
-		return this.outerClassName;
-	}
-
-	/*
-	 * @see IInnerClassesAttributeEntry#getOuterClassNameIndex()
-	 */
-	public int getOuterClassNameIndex() {
-		return this.outerClassNameIndex;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java
index 5dbb891..8ee9b8e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/JarComparator.java
@@ -12,11 +12,18 @@ package org.eclipse.equinox.p2.internal.repository.comparator;
 
 import java.io.*;
 import java.util.*;
+import java.util.Map.Entry;
 import java.util.jar.*;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
+import org.eclipse.equinox.p2.internal.repository.comparator.java.*;
+import org.eclipse.equinox.p2.publisher.eclipse.Feature;
+import org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.tools.comparator.IArtifactComparator;
 import org.eclipse.osgi.util.NLS;
 
 public class JarComparator implements IArtifactComparator {
@@ -25,11 +32,13 @@ public class JarComparator implements IArtifactComparator {
 	private static final String CLASS_EXTENSION = ".class"; //$NON-NLS-1$
 	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
 	private static final String PROPERTIES_EXTENSION = ".properties"; //$NON-NLS-1$
+	private static final String MAPPINGS_EXTENSION = ".mappings"; //$NON-NLS-1$
 	private static final String PLUGIN_ID = "org.eclipse.equinox.p2.repository.tools"; //$NON-NLS-1$
 	private static final String DESTINATION_ARTIFACT_PREFIX = "destinationartifact"; //$NON-NLS-1$
 	private static final String SUFFIX_JAR = ".jar"; //$NON-NLS-1$
 	private static final String SOURCE_ARTIFACT_PREFIX = "sourceartifact"; //$NON-NLS-1$
 	private static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
+	private static final String FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
 
 	private static final String META_INF = "meta-inf/"; //$NON-NLS-1$
 	private static final String DSA_EXT = ".dsa"; //$NON-NLS-1$
@@ -44,12 +53,9 @@ public class JarComparator implements IArtifactComparator {
 		destinationLocation = URIUtil.toUnencodedString(destinationDescriptor.getRepository().getLocation());
 		descriptorString = sourceDescriptor.toString();
 
-		String classifier = sourceDescriptor.getArtifactKey().getClassifier();
-		if (!OSGI_BUNDLE_CLASSIFIER.equals(classifier)) {
-			return Status.OK_STATUS;
-		}
-		classifier = destinationDescriptor.getArtifactKey().getClassifier();
-		if (!OSGI_BUNDLE_CLASSIFIER.equals(classifier)) {
+		String classifier1 = sourceDescriptor.getArtifactKey().getClassifier();
+		String classifier2 = destinationDescriptor.getArtifactKey().getClassifier();
+		if (!classifier1.equals(classifier2) || (!OSGI_BUNDLE_CLASSIFIER.equals(classifier1) && !FEATURE_CLASSIFIER.equals(classifier1))) {
 			return Status.OK_STATUS;
 		}
 
@@ -58,7 +64,10 @@ public class JarComparator implements IArtifactComparator {
 		try {
 			firstTempFile = getLocalJarFile(source, sourceDescriptor, SOURCE_ARTIFACT_PREFIX);
 			secondTempFile = getLocalJarFile(destination, destinationDescriptor, DESTINATION_ARTIFACT_PREFIX);
-			return compare(firstTempFile, secondTempFile);
+			if (classifier1.equals(OSGI_BUNDLE_CLASSIFIER))
+				return compare(firstTempFile, secondTempFile);
+			else if (classifier1.equals(FEATURE_CLASSIFIER))
+				return compareFeatures(firstTempFile, secondTempFile);
 		} catch (CoreException e) {
 			return e.getStatus();
 		} finally {
@@ -67,6 +76,47 @@ public class JarComparator implements IArtifactComparator {
 			if (secondTempFile != null)
 				secondTempFile.delete();
 		}
+		return Status.OK_STATUS;
+	}
+
+	public IStatus compareFeatures(File sourceFile, File destinationFile) {
+		FeatureParser parser = new FeatureParser();
+		Feature feature1 = parser.parse(sourceFile);
+		Feature feature2 = parser.parse(destinationFile);
+
+		MultiStatus parent = new MultiStatus(PLUGIN_ID, 0, NLS.bind(Messages.differentEntry, new String[] {descriptorString, sourceLocation, destinationLocation}), null);
+
+		if (!feature1.getId().equals(feature2.getId()))
+			parent.add(newErrorStatus(NLS.bind(Messages.featureIdsDontMatch, feature1.getId(), feature2.getId())));
+		if (!feature1.getVersion().equals(feature2.getVersion()))
+			parent.add(newErrorStatus(NLS.bind(Messages.featureVersionsDontMatch, feature1.getVersion(), feature2.getVersion())));
+
+		Map<FeatureEntry, FeatureEntry> entryMap = new HashMap<FeatureEntry, FeatureEntry>();
+		FeatureEntry[] entries = feature1.getEntries();
+		for (int i = 0; i < entries.length; i++)
+			entryMap.put(entries[i], entries[i]);
+
+		entries = feature2.getEntries();
+		if (entries.length != entryMap.size())
+			parent.add(newErrorStatus(Messages.featureSize));
+
+		for (int i = 0; i < entries.length; i++) {
+			FeatureEntry firstEntry = entryMap.get(entries[i]);
+			if (firstEntry == null)
+				parent.add(newErrorStatus(NLS.bind(Messages.featureEntry, entries[i])));
+			else {
+				if (firstEntry.isOptional() != entries[i].isOptional())
+					parent.add(newErrorStatus(NLS.bind(Messages.featureEntryOptional, entries[i])));
+				if (firstEntry.isUnpack() != entries[i].isUnpack())
+					parent.add(newErrorStatus(NLS.bind(Messages.featureEntryUnpack, entries[i])));
+				if (firstEntry.isRequires() && firstEntry.getMatch() != null && !firstEntry.getMatch().equals(entries[i].getMatch()))
+					parent.add(newErrorStatus(NLS.bind(Messages.featureEntryMatch, entries[i])));
+				if (firstEntry.getFilter() != null && !firstEntry.getFilter().equals(entries[i].getFilter()))
+					parent.add(newErrorStatus(NLS.bind(Messages.featureEntryFilter, entries[i])));
+			}
+		}
+
+		return parent.getChildren().length == 0 ? Status.OK_STATUS : parent;
 	}
 
 	public IStatus compare(File sourceFile, File destinationFile) {
@@ -77,13 +127,17 @@ public class JarComparator implements IArtifactComparator {
 			secondFile = new ZipFile(destinationFile);
 			final int firstFileSize = firstFile.size();
 			final int secondFileSize = secondFile.size();
+			MultiStatus parent = new MultiStatus(PLUGIN_ID, 0, NLS.bind(Messages.differentEntry, new String[] {descriptorString, sourceLocation, destinationLocation}), null);
+
 			if (firstFileSize != secondFileSize) {
-				return newErrorStatus(NLS.bind(Messages.differentNumberOfEntries, new String[] {descriptorString, sourceLocation, Integer.toString(firstFileSize), destinationLocation, Integer.toString(secondFileSize)}));
+				parent.add(newErrorStatus(NLS.bind(Messages.differentNumberOfEntries, new String[] {descriptorString, sourceLocation, Integer.toString(firstFileSize), destinationLocation, Integer.toString(secondFileSize)})));
+				return parent;
 			}
-			for (Enumeration enumeration = firstFile.entries(); enumeration.hasMoreElements();) {
-				ZipEntry entry = (ZipEntry) enumeration.nextElement();
+			for (Enumeration<? extends ZipEntry> enumeration = firstFile.entries(); enumeration.hasMoreElements();) {
+				ZipEntry entry = enumeration.nextElement();
 				String entryName = entry.getName();
 				final ZipEntry entry2 = secondFile.getEntry(entryName);
+				IStatus result = null;
 				if (!entry.isDirectory() && entry2 != null) {
 					String lowerCase = entryName.toLowerCase();
 					if (isSigningEntry(lowerCase)) {
@@ -95,35 +149,40 @@ public class JarComparator implements IArtifactComparator {
 					try {
 						firstStream = new BufferedInputStream(firstFile.getInputStream(entry));
 						secondStream = new BufferedInputStream(secondFile.getInputStream(entry2));
-						boolean result = false;
 						if (lowerCase.endsWith(CLASS_EXTENSION)) {
 							try {
-								result = compareClasses(firstStream, entry.getSize(), secondStream, entry2.getSize());
+								result = compareClasses(entryName, firstStream, entry.getSize(), secondStream, entry2.getSize());
 							} catch (ClassFormatException e) {
-								return newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}), e);
+								result = newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}), e);
 							}
 						} else if (lowerCase.endsWith(JAR_EXTENSION)) {
 							result = compareNestedJars(firstStream, entry.getSize(), secondStream, entry2.getSize(), entryName);
-						} else if (lowerCase.endsWith(PROPERTIES_EXTENSION)) {
-							result = compareProperties(firstStream, secondStream);
+						} else if (lowerCase.endsWith(PROPERTIES_EXTENSION) || lowerCase.endsWith(MAPPINGS_EXTENSION)) {
+							result = compareProperties(entryName, firstStream, secondStream);
 						} else if (entryName.equalsIgnoreCase(JarFile.MANIFEST_NAME)) {
 							result = compareManifest(firstStream, secondStream); //MANIFEST.MF file
 						} else {
-							result = compareBytes(firstStream, entry.getSize(), secondStream, entry2.getSize());
+							long size1 = entry.getSize();
+							long size2 = entry2.getSize();
+							if (size1 != size2)
+								result = newErrorStatus(NLS.bind(Messages.binaryDifferentLength, new String[] {entryName, String.valueOf(Math.abs(size1 - size2))}));
+							else
+								result = compareBytes(entryName, firstStream, entry.getSize(), secondStream, entry2.getSize());
 						}
-						if (!result)
-							return newErrorStatus(NLS.bind(Messages.differentEntry, new String[] {entryName, descriptorString, sourceLocation}));
 					} finally {
 						Utility.close(firstStream);
 						Utility.close(secondStream);
 					}
 				} else if (!entry.isDirectory()) {
 					// missing entry, entry2 == null
-					return newErrorStatus(NLS.bind(Messages.missingEntry, new String[] {entryName, descriptorString, sourceLocation}));
+					result = newErrorStatus(NLS.bind(Messages.missingEntry, new String[] {entryName, descriptorString, sourceLocation}));
+				}
+
+				if (result != null && !result.isOK()) {
+					parent.add(result);
+					return parent;
 				}
 			}
-		} catch (CoreException e) {
-			return e.getStatus();
 		} catch (IOException e) {
 			// missing entry
 			return newErrorStatus(NLS.bind(Messages.ioexception, new String[] {sourceFile.getAbsolutePath(), destinationFile.getAbsolutePath()}), e);
@@ -134,79 +193,84 @@ public class JarComparator implements IArtifactComparator {
 		return Status.OK_STATUS;
 	}
 
-	private boolean compareManifest(InputStream firstStream, InputStream secondStream) throws IOException {
+	private IStatus compareManifest(InputStream firstStream, InputStream secondStream) throws IOException {
 		Manifest manifest = new Manifest(firstStream);
 		Manifest manifest2 = new Manifest(secondStream);
 
 		if (manifest == null || manifest2 == null)
-			return true;
+			return Status.OK_STATUS;
 
 		Attributes attributes = manifest.getMainAttributes();
 		Attributes attributes2 = manifest2.getMainAttributes();
 		if (attributes.size() != attributes2.size())
-			return false;
-		for (Iterator iterator = attributes.entrySet().iterator(); iterator.hasNext();) {
-			Map.Entry entry = (Map.Entry) iterator.next();
+			return newErrorStatus(NLS.bind(Messages.manifestDifferentSize, String.valueOf(Math.abs(attributes.size() - attributes2.size()))));
+		for (Entry<Object, Object> entry : attributes.entrySet()) {
 			Object value2 = attributes2.get(entry.getKey());
 			if (value2 == null) {
-				return false;
+				return newErrorStatus(NLS.bind(Messages.manifestMissingEntry, entry.getKey()));
 			}
 			if (!value2.equals(entry.getValue())) {
-				return false;
+				return newErrorStatus(NLS.bind(Messages.manifestDifferentValue, entry.getKey()));
 			}
 		}
-		return true;
+		return Status.OK_STATUS;
 	}
 
-	private boolean compareClasses(InputStream stream1, long size1, InputStream stream2, long size2) throws ClassFormatException, IOException {
+	private IStatus compareClasses(String entryName, InputStream stream1, long size1, InputStream stream2, long size2) throws ClassFormatException, IOException {
 		Disassembler disassembler = new Disassembler();
 		byte[] firstEntryClassFileBytes = Utility.getInputStreamAsByteArray(stream1, (int) size1);
 		byte[] secondEntryClassFileBytes = Utility.getInputStreamAsByteArray(stream2, (int) size2);
 
 		String contentsFile1 = disassembler.disassemble(firstEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
 		String contentsFile2 = disassembler.disassemble(secondEntryClassFileBytes, LINE_SEPARATOR, Disassembler.DETAILED | Disassembler.COMPACT);
-		return contentsFile1.equals(contentsFile2);
+		if (!contentsFile1.equals(contentsFile2))
+			return newErrorStatus(NLS.bind(Messages.classesDifferent, entryName));
+		return Status.OK_STATUS;
 	}
 
-	private boolean compareNestedJars(InputStream stream1, long size1, InputStream stream2, long size2, String entry) throws CoreException, IOException {
+	private IStatus compareNestedJars(InputStream stream1, long size1, InputStream stream2, long size2, String entry) throws IOException {
 		File firstTempFile = getLocalJarFile(stream1, entry, size1);
 		File secondTempFile = getLocalJarFile(stream2, entry, size2);
 
 		try {
-			IStatus status = compare(firstTempFile, secondTempFile);
-			if (!status.isOK())
-				throw new CoreException(status);
+			return compare(firstTempFile, secondTempFile);
 		} finally {
 			if (firstTempFile != null)
 				firstTempFile.delete();
 			if (secondTempFile != null)
 				secondTempFile.delete();
 		}
-		return true;
 	}
 
-	private boolean compareProperties(InputStream stream1, InputStream stream2) {
+	private IStatus compareProperties(String entryName, InputStream stream1, InputStream stream2) {
 		Properties props1 = loadProperties(stream1);
 		Properties props2 = loadProperties(stream2);
 		if (props1.size() != props2.size())
-			return false;
+			return newErrorStatus(NLS.bind(Messages.propertiesSizesDifferent, entryName, String.valueOf(Math.abs(props1.size() - props2.size()))));
 
 		props1.keys();
-		for (Iterator iterator = props1.keySet().iterator(); iterator.hasNext();) {
+		for (Iterator<Object> iterator = props1.keySet().iterator(); iterator.hasNext();) {
 			String key = (String) iterator.next();
 			if (!props2.containsKey(key))
-				return false;
-			if (!props1.getProperty(key).equals(props2.getProperty(key)))
-				return false;
+				return newErrorStatus(NLS.bind(Messages.missingProperty, key, entryName));
+			String prop1 = props1.getProperty(key);
+			String prop2 = props2.getProperty(key);
+			if (!prop1.equals(prop2)) {
+				if (prop1.length() < 10 && prop2.length() < 10)
+					return newErrorStatus(NLS.bind(Messages.differentPropertyValueFull, new String[] {entryName, key, prop1, prop2}));
+				return newErrorStatus(NLS.bind(Messages.differentPropertyValueFull, entryName, key));
+			}
 
 		}
-		return true;
+		return Status.OK_STATUS;
 	}
 
-	private boolean compareBytes(InputStream firstStream, long size1, InputStream secondStream, long size2) throws IOException {
+	private IStatus compareBytes(String entryName, InputStream firstStream, long size1, InputStream secondStream, long size2) throws IOException {
 		byte[] firstBytes = Utility.getInputStreamAsByteArray(firstStream, (int) size1);
 		byte[] secondBytes = Utility.getInputStreamAsByteArray(secondStream, (int) size2);
-		return Arrays.equals(firstBytes, secondBytes);
+		if (!Arrays.equals(firstBytes, secondBytes))
+			return newErrorStatus(NLS.bind(Messages.binaryFilesDifferent, entryName));
+		return Status.OK_STATUS;
 	}
 
 	private Properties loadProperties(InputStream input) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MD5ArtifactComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MD5ArtifactComparator.java
new file mode 100644
index 0000000..754aeb2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MD5ArtifactComparator.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.internal.repository.comparator;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
+import org.eclipse.equinox.p2.internal.repository.tools.Messages;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.tools.comparator.IArtifactComparator;
+import org.eclipse.osgi.util.NLS;
+
+public class MD5ArtifactComparator implements IArtifactComparator {
+
+	public static String MD5_COMPARATOR_ID = "org.eclipse.equinox.artifact.md5.comparator"; //$NON-NLS-1$
+
+	public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor) {
+		String sourceMD5 = sourceDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
+		String destMD5 = destDescriptor.getProperty(IArtifactDescriptor.DOWNLOAD_MD5);
+
+		if (sourceMD5 == null && destMD5 == null)
+			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5Infomation, sourceDescriptor));
+
+		if (sourceMD5 == null)
+			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, source, sourceDescriptor));
+
+		if (destMD5 == null)
+			return new Status(IStatus.INFO, Activator.ID, NLS.bind(Messages.info_noMD5InRepository, destination, destDescriptor));
+
+		if (sourceMD5.equals(destMD5))
+			return Status.OK_STATUS;
+
+		return new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.warning_differentMD5, new Object[] {URIUtil.toUnencodedString(sourceDescriptor.getRepository().getLocation()), URIUtil.toUnencodedString(destDescriptor.getRepository().getLocation()), sourceDescriptor}));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java
deleted file mode 100644
index 3edd78f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Messages.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.internal.repository.comparator.messages"; //$NON-NLS-1$
-	public static String differentNumberOfEntries;
-	public static String differentEntry;
-	public static String missingEntry;
-	public static String ioexception;
-	public static String disassembler_opentypedeclaration;
-	public static String disassembler_closetypedeclaration;
-	public static String disassembler_endofmethodheader;
-	public static String disassembler_begincommentline;
-	public static String disassembler_fieldhasconstant;
-	public static String disassembler_endoffieldheader;
-	public static String disassembler_sourceattributeheader;
-	public static String disassembler_enclosingmethodheader;
-	public static String disassembler_exceptiontableheader;
-	public static String disassembler_innerattributesheader;
-	public static String disassembler_inner_class_info_name;
-	public static String disassembler_outer_class_info_name;
-	public static String disassembler_inner_name;
-	public static String disassembler_inner_accessflags;
-	public static String disassembler_signatureattributeheader;
-	public static String disassembler_indentation;
-	public static String disassembler_space;
-	public static String disassembler_comma;
-	public static String disassembler_openinnerclassentry;
-	public static String disassembler_closeinnerclassentry;
-	public static String disassembler_deprecated;
-	public static String disassembler_annotationdefaultheader;
-	public static String disassembler_annotationdefaultvalue;
-	public static String disassembler_annotationenumvalue;
-	public static String disassembler_annotationclassvalue;
-	public static String disassembler_annotationannotationvalue;
-	public static String disassembler_annotationarrayvaluestart;
-	public static String disassembler_annotationarrayvalueend;
-	public static String disassembler_annotationentrystart;
-	public static String disassembler_annotationentryend;
-	public static String disassembler_annotationcomponent;
-	public static String disassembler_runtimevisibleannotationsattributeheader;
-	public static String disassembler_runtimeinvisibleannotationsattributeheader;
-	public static String disassembler_runtimevisibleparameterannotationsattributeheader;
-	public static String disassembler_runtimeinvisibleparameterannotationsattributeheader;
-	public static String disassembler_parameterannotationentrystart;
-	public static String classfileformat_versiondetails;
-	public static String classfileformat_methoddescriptor;
-	public static String classfileformat_fieldddescriptor;
-	public static String classfileformat_stacksAndLocals;
-	public static String classfileformat_superflagisnotset;
-	public static String classfileformat_superflagisset;
-	public static String classfileformat_clinitname;
-	public static String classformat_classformatexception;
-	public static String classformat_anewarray;
-	public static String classformat_checkcast;
-	public static String classformat_instanceof;
-	public static String classformat_ldc_w_class;
-	public static String classformat_ldc_w_float;
-	public static String classformat_ldc_w_integer;
-	public static String classformat_ldc_w_string;
-	public static String classformat_ldc2_w_long;
-	public static String classformat_ldc2_w_double;
-	public static String classformat_multianewarray;
-	public static String classformat_new;
-	public static String classformat_iinc;
-	public static String classformat_invokespecial;
-	public static String classformat_invokeinterface;
-	public static String classformat_invokestatic;
-	public static String classformat_invokevirtual;
-	public static String classformat_getfield;
-	public static String classformat_getstatic;
-	public static String classformat_putstatic;
-	public static String classformat_putfield;
-	public static String classformat_newarray_boolean;
-	public static String classformat_newarray_char;
-	public static String classformat_newarray_float;
-	public static String classformat_newarray_double;
-	public static String classformat_newarray_byte;
-	public static String classformat_newarray_short;
-	public static String classformat_newarray_int;
-	public static String classformat_newarray_long;
-	public static String classformat_store;
-	public static String classformat_load;
-	public static String classfileformat_anyexceptionhandler;
-	public static String classfileformat_exceptiontableentry;
-	public static String classfileformat_versionUnknown;
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// prevent instantiation
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java
deleted file mode 100644
index c778947..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/MethodInfo.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.util.Arrays;
-
-public class MethodInfo extends ClassFileStruct {
-	private int accessFlags;
-	private int attributeBytes;
-	private ClassFileAttribute[] attributes;
-	private int attributesCount;
-	private CodeAttribute codeAttribute;
-	private char[] descriptor;
-	private int descriptorIndex;
-	private ExceptionAttribute exceptionAttribute;
-	private boolean isDeprecated;
-	private boolean isSynthetic;
-	private char[] name;
-	private int nameIndex;
-
-	/*
-	 * @param classFileBytes byte[]
-	 * @param constantPool IConstantPool
-	 * @param offset int
-	 * @param decodingFlags int
-	 */
-	public MethodInfo(byte classFileBytes[], ConstantPool constantPool, int offset, int decodingFlags) throws ClassFormatException {
-
-		boolean no_code_attribute = (decodingFlags & ClassFileReader.METHOD_BODIES) == 0;
-		final int flags = u2At(classFileBytes, 0, offset);
-		this.accessFlags = flags;
-		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
-			this.isSynthetic = true;
-		}
-
-		this.nameIndex = u2At(classFileBytes, 2, offset);
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.name = constantPoolEntry.getUtf8Value();
-
-		this.descriptorIndex = u2At(classFileBytes, 4, offset);
-		constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.descriptor = constantPoolEntry.getUtf8Value();
-
-		this.attributesCount = u2At(classFileBytes, 6, offset);
-		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
-		if (this.attributesCount != 0) {
-			if (no_code_attribute && !isAbstract() && !isNative()) {
-				if (this.attributesCount != 1) {
-					this.attributes = new ClassFileAttribute[this.attributesCount - 1];
-				}
-			} else {
-				this.attributes = new ClassFileAttribute[this.attributesCount];
-			}
-		}
-		int attributesIndex = 0;
-		int readOffset = 8;
-		for (int i = 0; i < this.attributesCount; i++) {
-			constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
-			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-			}
-			char[] attributeName = constantPoolEntry.getUtf8Value();
-			if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
-				this.isDeprecated = true;
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
-				this.isSynthetic = true;
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.CODE)) {
-				if (!no_code_attribute) {
-					this.codeAttribute = new CodeAttribute(classFileBytes, constantPool, offset + readOffset);
-					this.attributes[attributesIndex++] = this.codeAttribute;
-				}
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.EXCEPTIONS)) {
-				this.exceptionAttribute = new ExceptionAttribute(classFileBytes, constantPool, offset + readOffset);
-				this.attributes[attributesIndex++] = this.exceptionAttribute;
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
-				this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeVisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS)) {
-				this.attributes[attributesIndex++] = new RuntimeInvisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else if (Arrays.equals(attributeName, AttributeNamesConstants.ANNOTATION_DEFAULT)) {
-				this.attributes[attributesIndex++] = new AnnotationDefaultAttribute(classFileBytes, constantPool, offset + readOffset);
-			} else {
-				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
-			}
-			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
-		}
-		this.attributeBytes = readOffset;
-	}
-
-	/*
-	 * @see IMethodInfo#getAccessFlags()
-	 */
-	public int getAccessFlags() {
-		return this.accessFlags;
-	}
-
-	/*
-	 * @see IMethodInfo#getAttributeCount()
-	 */
-	public int getAttributeCount() {
-		return this.attributesCount;
-	}
-
-	/*
-	 * @see IMethodInfo#getAttributes()
-	 */
-	public ClassFileAttribute[] getAttributes() {
-		return this.attributes;
-	}
-
-	/*
-	 * @see IMethodInfo#getCodeAttribute()
-	 */
-	public CodeAttribute getCodeAttribute() {
-		return this.codeAttribute;
-	}
-
-	/*
-	 * @see IMethodInfo#getDescriptor()
-	 */
-	public char[] getDescriptor() {
-		return this.descriptor;
-	}
-
-	/*
-	 * @see IMethodInfo#getDescriptorIndex()
-	 */
-	public int getDescriptorIndex() {
-		return this.descriptorIndex;
-	}
-
-	/*
-	 * @see IMethodInfo#getExceptionAttribute()
-	 */
-	public ExceptionAttribute getExceptionAttribute() {
-		return this.exceptionAttribute;
-	}
-
-	/*
-	 * @see IMethodInfo#getName()
-	 */
-	public char[] getName() {
-		return this.name;
-	}
-
-	/*
-	 * @see IMethodInfo#getNameIndex()
-	 */
-	public int getNameIndex() {
-		return this.nameIndex;
-	}
-
-	private boolean isAbstract() {
-		return (this.accessFlags & IModifierConstants.ACC_ABSTRACT) != 0;
-	}
-
-	/*
-	 * @see IMethodInfo#isClinit()
-	 */
-	public boolean isClinit() {
-		return this.name[0] == '<' && this.name.length == 8; // Can only match <clinit>
-	}
-
-	/*
-	 * @see IMethodInfo#isConstructor()
-	 */
-	public boolean isConstructor() {
-		return this.name[0] == '<' && this.name.length == 6; // Can only match <init>
-	}
-
-	/*
-	 * @see IMethodInfo#isDeprecated()
-	 */
-	public boolean isDeprecated() {
-		return this.isDeprecated;
-	}
-
-	private boolean isNative() {
-		return (this.accessFlags & IModifierConstants.ACC_NATIVE) != 0;
-	}
-
-	/*
-	 * @see IMethodInfo#isSynthetic()
-	 */
-	public boolean isSynthetic() {
-		return this.isSynthetic;
-	}
-
-	int sizeInBytes() {
-		return this.attributeBytes;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java
deleted file mode 100644
index 76f80e9..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/OpcodeStringValues.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class OpcodeStringValues implements IOpcodeMnemonics {
-
-	public static final String[] BYTECODE_NAMES = new String[256];
-	static {
-		BYTECODE_NAMES[NOP] = "nop"; //$NON-NLS-1$
-		BYTECODE_NAMES[ACONST_NULL] = "aconst_null"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_M1] = "iconst_m1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_0] = "iconst_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_1] = "iconst_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_2] = "iconst_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_3] = "iconst_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_4] = "iconst_4"; //$NON-NLS-1$
-		BYTECODE_NAMES[ICONST_5] = "iconst_5"; //$NON-NLS-1$
-		BYTECODE_NAMES[LCONST_0] = "lconst_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[LCONST_1] = "lconst_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[FCONST_0] = "fconst_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[FCONST_1] = "fconst_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[FCONST_2] = "fconst_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DCONST_0] = "dconst_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[DCONST_1] = "dconst_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[BIPUSH] = "bipush"; //$NON-NLS-1$
-		BYTECODE_NAMES[SIPUSH] = "sipush"; //$NON-NLS-1$
-		BYTECODE_NAMES[LDC] = "ldc"; //$NON-NLS-1$
-		BYTECODE_NAMES[LDC_W] = "ldc_w"; //$NON-NLS-1$
-		BYTECODE_NAMES[LDC2_W] = "ldc2_w"; //$NON-NLS-1$
-		BYTECODE_NAMES[ILOAD] = "iload"; //$NON-NLS-1$
-		BYTECODE_NAMES[LLOAD] = "lload"; //$NON-NLS-1$
-		BYTECODE_NAMES[FLOAD] = "fload"; //$NON-NLS-1$
-		BYTECODE_NAMES[DLOAD] = "dload"; //$NON-NLS-1$
-		BYTECODE_NAMES[ALOAD] = "aload"; //$NON-NLS-1$
-		BYTECODE_NAMES[ILOAD_0] = "iload_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[ILOAD_1] = "iload_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ILOAD_2] = "iload_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[ILOAD_3] = "iload_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[LLOAD_0] = "lload_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[LLOAD_1] = "lload_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[LLOAD_2] = "lload_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[LLOAD_3] = "lload_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[FLOAD_0] = "fload_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[FLOAD_1] = "fload_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[FLOAD_2] = "fload_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[FLOAD_3] = "fload_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[DLOAD_0] = "dload_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[DLOAD_1] = "dload_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[DLOAD_2] = "dload_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DLOAD_3] = "dload_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[ALOAD_0] = "aload_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[ALOAD_1] = "aload_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ALOAD_2] = "aload_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[ALOAD_3] = "aload_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[IALOAD] = "iaload"; //$NON-NLS-1$
-		BYTECODE_NAMES[LALOAD] = "laload"; //$NON-NLS-1$
-		BYTECODE_NAMES[FALOAD] = "faload"; //$NON-NLS-1$
-		BYTECODE_NAMES[DALOAD] = "daload"; //$NON-NLS-1$
-		BYTECODE_NAMES[AALOAD] = "aaload"; //$NON-NLS-1$
-		BYTECODE_NAMES[BALOAD] = "baload"; //$NON-NLS-1$
-		BYTECODE_NAMES[CALOAD] = "caload"; //$NON-NLS-1$
-		BYTECODE_NAMES[SALOAD] = "saload"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISTORE] = "istore"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSTORE] = "lstore"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSTORE] = "fstore"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSTORE] = "dstore"; //$NON-NLS-1$
-		BYTECODE_NAMES[ASTORE] = "astore"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISTORE_0] = "istore_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISTORE_1] = "istore_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISTORE_2] = "istore_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISTORE_3] = "istore_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSTORE_0] = "lstore_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSTORE_1] = "lstore_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSTORE_2] = "lstore_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSTORE_3] = "lstore_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSTORE_0] = "fstore_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSTORE_1] = "fstore_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSTORE_2] = "fstore_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSTORE_3] = "fstore_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSTORE_0] = "dstore_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSTORE_1] = "dstore_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSTORE_2] = "dstore_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSTORE_3] = "dstore_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[ASTORE_0] = "astore_0"; //$NON-NLS-1$
-		BYTECODE_NAMES[ASTORE_1] = "astore_1"; //$NON-NLS-1$
-		BYTECODE_NAMES[ASTORE_2] = "astore_2"; //$NON-NLS-1$
-		BYTECODE_NAMES[ASTORE_3] = "astore_3"; //$NON-NLS-1$
-		BYTECODE_NAMES[IASTORE] = "iastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[LASTORE] = "lastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[FASTORE] = "fastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[DASTORE] = "dastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[AASTORE] = "aastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[BASTORE] = "bastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[CASTORE] = "castore"; //$NON-NLS-1$
-		BYTECODE_NAMES[SASTORE] = "sastore"; //$NON-NLS-1$
-		BYTECODE_NAMES[POP] = "pop"; //$NON-NLS-1$
-		BYTECODE_NAMES[POP2] = "pop2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP] = "dup"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP_X1] = "dup_x1"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP_X2] = "dup_x2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP2] = "dup2"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP2_X1] = "dup2_x1"; //$NON-NLS-1$
-		BYTECODE_NAMES[DUP2_X2] = "dup2_x2"; //$NON-NLS-1$
-		BYTECODE_NAMES[SWAP] = "swap"; //$NON-NLS-1$
-		BYTECODE_NAMES[IADD] = "iadd"; //$NON-NLS-1$
-		BYTECODE_NAMES[LADD] = "ladd"; //$NON-NLS-1$
-		BYTECODE_NAMES[FADD] = "fadd"; //$NON-NLS-1$
-		BYTECODE_NAMES[DADD] = "dadd"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISUB] = "isub"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSUB] = "lsub"; //$NON-NLS-1$
-		BYTECODE_NAMES[FSUB] = "fsub"; //$NON-NLS-1$
-		BYTECODE_NAMES[DSUB] = "dsub"; //$NON-NLS-1$
-		BYTECODE_NAMES[IMUL] = "imul"; //$NON-NLS-1$
-		BYTECODE_NAMES[LMUL] = "lmul"; //$NON-NLS-1$
-		BYTECODE_NAMES[FMUL] = "fmul"; //$NON-NLS-1$
-		BYTECODE_NAMES[DMUL] = "dmul"; //$NON-NLS-1$
-		BYTECODE_NAMES[IDIV] = "idiv"; //$NON-NLS-1$
-		BYTECODE_NAMES[LDIV] = "ldiv"; //$NON-NLS-1$
-		BYTECODE_NAMES[FDIV] = "fdiv"; //$NON-NLS-1$
-		BYTECODE_NAMES[DDIV] = "ddiv"; //$NON-NLS-1$
-		BYTECODE_NAMES[IREM] = "irem"; //$NON-NLS-1$
-		BYTECODE_NAMES[LREM] = "lrem"; //$NON-NLS-1$
-		BYTECODE_NAMES[FREM] = "frem"; //$NON-NLS-1$
-		BYTECODE_NAMES[DREM] = "drem"; //$NON-NLS-1$
-		BYTECODE_NAMES[INEG] = "ineg"; //$NON-NLS-1$
-		BYTECODE_NAMES[LNEG] = "lneg"; //$NON-NLS-1$
-		BYTECODE_NAMES[FNEG] = "fneg"; //$NON-NLS-1$
-		BYTECODE_NAMES[DNEG] = "dneg"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISHL] = "ishl"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSHL] = "lshl"; //$NON-NLS-1$
-		BYTECODE_NAMES[ISHR] = "ishr"; //$NON-NLS-1$
-		BYTECODE_NAMES[LSHR] = "lshr"; //$NON-NLS-1$
-		BYTECODE_NAMES[IUSHR] = "iushr"; //$NON-NLS-1$
-		BYTECODE_NAMES[LUSHR] = "lushr"; //$NON-NLS-1$
-		BYTECODE_NAMES[IAND] = "iand"; //$NON-NLS-1$
-		BYTECODE_NAMES[LAND] = "land"; //$NON-NLS-1$
-		BYTECODE_NAMES[IOR] = "ior"; //$NON-NLS-1$
-		BYTECODE_NAMES[LOR] = "lor"; //$NON-NLS-1$
-		BYTECODE_NAMES[IXOR] = "ixor"; //$NON-NLS-1$
-		BYTECODE_NAMES[LXOR] = "lxor"; //$NON-NLS-1$
-		BYTECODE_NAMES[IINC] = "iinc"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2L] = "i2l"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2F] = "i2f"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2D] = "i2d"; //$NON-NLS-1$
-		BYTECODE_NAMES[L2I] = "l2i"; //$NON-NLS-1$
-		BYTECODE_NAMES[L2F] = "l2f"; //$NON-NLS-1$
-		BYTECODE_NAMES[L2D] = "l2d"; //$NON-NLS-1$
-		BYTECODE_NAMES[F2I] = "f2i"; //$NON-NLS-1$
-		BYTECODE_NAMES[F2L] = "f2l"; //$NON-NLS-1$
-		BYTECODE_NAMES[F2D] = "f2d"; //$NON-NLS-1$
-		BYTECODE_NAMES[D2I] = "d2i"; //$NON-NLS-1$
-		BYTECODE_NAMES[D2L] = "d2l"; //$NON-NLS-1$
-		BYTECODE_NAMES[D2F] = "d2f"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2B] = "i2b"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2C] = "i2c"; //$NON-NLS-1$
-		BYTECODE_NAMES[I2S] = "i2s"; //$NON-NLS-1$
-		BYTECODE_NAMES[LCMP] = "lcmp"; //$NON-NLS-1$
-		BYTECODE_NAMES[FCMPL] = "fcmpl"; //$NON-NLS-1$
-		BYTECODE_NAMES[FCMPG] = "fcmpg"; //$NON-NLS-1$
-		BYTECODE_NAMES[DCMPL] = "dcmpl"; //$NON-NLS-1$
-		BYTECODE_NAMES[DCMPG] = "dcmpg"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFEQ] = "ifeq"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFNE] = "ifne"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFLT] = "iflt"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFGE] = "ifge"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFGT] = "ifgt"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFLE] = "ifle"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPEQ] = "if_icmpeq"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPNE] = "if_icmpne"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPLT] = "if_icmplt"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPGE] = "if_icmpge"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPGT] = "if_icmpgt"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ICMPLE] = "if_icmple"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ACMPEQ] = "if_acmpeq"; //$NON-NLS-1$
-		BYTECODE_NAMES[IF_ACMPNE] = "if_acmpne"; //$NON-NLS-1$
-		BYTECODE_NAMES[GOTO] = "goto"; //$NON-NLS-1$
-		BYTECODE_NAMES[JSR] = "jsr"; //$NON-NLS-1$
-		BYTECODE_NAMES[RET] = "ret"; //$NON-NLS-1$
-		BYTECODE_NAMES[TABLESWITCH] = "tableswitch"; //$NON-NLS-1$
-		BYTECODE_NAMES[LOOKUPSWITCH] = "lookupswitch"; //$NON-NLS-1$
-		BYTECODE_NAMES[IRETURN] = "ireturn"; //$NON-NLS-1$
-		BYTECODE_NAMES[LRETURN] = "lreturn"; //$NON-NLS-1$
-		BYTECODE_NAMES[FRETURN] = "freturn"; //$NON-NLS-1$
-		BYTECODE_NAMES[DRETURN] = "dreturn"; //$NON-NLS-1$
-		BYTECODE_NAMES[ARETURN] = "areturn"; //$NON-NLS-1$
-		BYTECODE_NAMES[RETURN] = "return"; //$NON-NLS-1$
-		BYTECODE_NAMES[GETSTATIC] = "getstatic"; //$NON-NLS-1$
-		BYTECODE_NAMES[PUTSTATIC] = "putstatic"; //$NON-NLS-1$
-		BYTECODE_NAMES[GETFIELD] = "getfield"; //$NON-NLS-1$
-		BYTECODE_NAMES[PUTFIELD] = "putfield"; //$NON-NLS-1$
-		BYTECODE_NAMES[INVOKEVIRTUAL] = "invokevirtual"; //$NON-NLS-1$
-		BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
-		BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
-		BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
-		BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
-		BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
-		BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
-		BYTECODE_NAMES[ARRAYLENGTH] = "arraylength"; //$NON-NLS-1$
-		BYTECODE_NAMES[ATHROW] = "athrow"; //$NON-NLS-1$
-		BYTECODE_NAMES[CHECKCAST] = "checkcast"; //$NON-NLS-1$
-		BYTECODE_NAMES[INSTANCEOF] = "instanceof"; //$NON-NLS-1$
-		BYTECODE_NAMES[MONITORENTER] = "monitorenter"; //$NON-NLS-1$
-		BYTECODE_NAMES[MONITOREXIT] = "monitorexit"; //$NON-NLS-1$
-		BYTECODE_NAMES[WIDE] = "wide"; //$NON-NLS-1$
-		BYTECODE_NAMES[MULTIANEWARRAY] = "multianewarray"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFNULL] = "ifnull"; //$NON-NLS-1$
-		BYTECODE_NAMES[IFNONNULL] = "ifnonnull"; //$NON-NLS-1$
-		BYTECODE_NAMES[GOTO_W] = "goto_w"; //$NON-NLS-1$
-		BYTECODE_NAMES[JSR_W] = "jsr_w"; //$NON-NLS-1$
-		BYTECODE_NAMES[BREAKPOINT] = "breakpoint"; //$NON-NLS-1$
-		BYTECODE_NAMES[IMPDEP1] = "impdep1"; //$NON-NLS-1$
-		BYTECODE_NAMES[IMPDEP2] = "impdep2"; //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java
deleted file mode 100644
index ad7c6dc..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/ParameterAnnotation.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class ParameterAnnotation extends ClassFileStruct {
-
-	private static final Annotation[] NO_ENTRIES = new Annotation[0];
-
-	private int annotationsNumber;
-	private Annotation[] annotations;
-	private int readOffset;
-
-	/**
-	 * Constructor for Annotation.
-	 *
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public ParameterAnnotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-
-		final int length = u2At(classFileBytes, 0, offset);
-		this.readOffset = 2;
-		this.annotationsNumber = length;
-		if (length != 0) {
-			this.annotations = new Annotation[length];
-			for (int i = 0; i < length; i++) {
-				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + this.readOffset);
-				this.annotations[i] = annotation;
-				this.readOffset += annotation.sizeInBytes();
-			}
-		} else {
-			this.annotations = NO_ENTRIES;
-		}
-	}
-
-	int sizeInBytes() {
-		return this.readOffset;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotations()
-	 */
-	public Annotation[] getAnnotations() {
-		return this.annotations;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotationsNumber()
-	 */
-	public int getAnnotationsNumber() {
-		return this.annotationsNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java
deleted file mode 100644
index f2e164c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class RuntimeInvisibleAnnotationsAttribute extends ClassFileAttribute {
-
-	private static final Annotation[] NO_ENTRIES = new Annotation[0];
-	private int annotationsNumber;
-	private Annotation[] annotations;
-
-	/**
-	 * Constructor for RuntimeInvisibleAnnotations.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public RuntimeInvisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		final int length = u2At(classFileBytes, 6, offset);
-		this.annotationsNumber = length;
-		if (length != 0) {
-			int readOffset = 8;
-			this.annotations = new Annotation[length];
-			for (int i = 0; i < length; i++) {
-				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
-				this.annotations[i] = annotation;
-				readOffset += annotation.sizeInBytes();
-			}
-		} else {
-			this.annotations = NO_ENTRIES;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotations()
-	 */
-	public Annotation[] getAnnotations() {
-		return this.annotations;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotationsNumber()
-	 */
-	public int getAnnotationsNumber() {
-		return this.annotationsNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index 3c724dd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeInvisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class RuntimeInvisibleParameterAnnotationsAttribute extends ClassFileAttribute {
-
-	private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
-	private ParameterAnnotation[] parameterAnnotations;
-	private int parametersNumber;
-
-	/**
-	 * Constructor for RuntimeVisibleParameterAnnotations.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public RuntimeInvisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		final int length = u1At(classFileBytes, 6, offset);
-		this.parametersNumber = length;
-		if (length != 0) {
-			int readOffset = 7;
-			this.parameterAnnotations = new ParameterAnnotation[length];
-			for (int i = 0; i < length; i++) {
-				ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
-				this.parameterAnnotations[i] = parameterAnnotation;
-				readOffset += parameterAnnotation.sizeInBytes();
-			}
-		} else {
-			this.parameterAnnotations = NO_ENTRIES;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getAnnotations()
-	 */
-	public ParameterAnnotation[] getParameterAnnotations() {
-		return this.parameterAnnotations;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getParametersNumber()
-	 */
-	public int getParametersNumber() {
-		return this.parametersNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java
deleted file mode 100644
index ff738fa..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class RuntimeVisibleAnnotationsAttribute extends ClassFileAttribute {
-
-	private static final Annotation[] NO_ENTRIES = new Annotation[0];
-	private int annotationsNumber;
-	private Annotation[] annotations;
-
-	/**
-	 * Constructor for RuntimeVisibleAnnotations.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public RuntimeVisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		final int length = u2At(classFileBytes, 6, offset);
-		this.annotationsNumber = length;
-		if (length != 0) {
-			int readOffset = 8;
-			this.annotations = new Annotation[length];
-			for (int i = 0; i < length; i++) {
-				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
-				this.annotations[i] = annotation;
-				readOffset += annotation.sizeInBytes();
-			}
-		} else {
-			this.annotations = NO_ENTRIES;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotations()
-	 */
-	public Annotation[] getAnnotations() {
-		return this.annotations;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotationsNumber()
-	 */
-	public int getAnnotationsNumber() {
-		return this.annotationsNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index 71700e2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/RuntimeVisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class RuntimeVisibleParameterAnnotationsAttribute extends ClassFileAttribute {
-
-	private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
-	private int parametersNumber;
-	private ParameterAnnotation[] parameterAnnotations;
-
-	/**
-	 * Constructor for RuntimeVisibleParameterAnnotations.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public RuntimeVisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		final int length = u1At(classFileBytes, 6, offset);
-		this.parametersNumber = length;
-		if (length != 0) {
-			int readOffset = 7;
-			this.parameterAnnotations = new ParameterAnnotation[length];
-			for (int i = 0; i < length; i++) {
-				ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
-				this.parameterAnnotations[i] = parameterAnnotation;
-				readOffset += parameterAnnotation.sizeInBytes();
-			}
-		} else {
-			this.parameterAnnotations = NO_ENTRIES;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getAnnotations()
-	 */
-	public ParameterAnnotation[] getParameterAnnotations() {
-		return this.parameterAnnotations;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getParametersNumber()
-	 */
-	public int getParametersNumber() {
-		return this.parametersNumber;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java
deleted file mode 100644
index e530f1e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Signature.java
+++ /dev/null
@@ -1,1163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.util.ArrayList;
-
-/*
- * Provides methods for encoding and decoding type and method signature strings.
- * <p>
- * Signatures obtained from parsing source files (i.e. files with one of the
- * {@link JavaCore#getJavaLikeExtensions() Java-like extensions}) differ subtly
- * from ones obtained from pre-compiled binary (".class") files in class names are
- * usually left unresolved in the former. For example, the normal resolved form
- * of the type "String" embeds the class's package name ("Ljava.lang.String;"
- * or "Ljava/lang/String;"), whereas the unresolved form contains only what is
- * written "QString;".
- * </p>
- * <p>
- * Generic types introduce to the Java language in J2SE 1.5 add three new
- * facets to signatures: type variables, parameterized types with type arguments,
- * and formal type parameters. <i>Rich</i> signatures containing these facets
- * only occur when dealing with code that makes overt use of the new language
- * features. All other code, and certainly all Java code written or compiled
- * with J2SE 1.4 or earlier, involved only <i>simple</i> signatures.
- * </p>
- * <p>
- * Note that the "Q" and "!" formats are specific to Eclipse; the remainder
- * are specified in the JVM spec.
- * </p>
- * <p>
- * The syntax for a type signature is:
- * <pre>
- * TypeSignature ::=
- *     "B"  // byte
- *   | "C"  // char
- *   | "D"  // double
- *   | "F"  // float
- *   | "I"  // int
- *   | "J"  // long
- *   | "S"  // short
- *   | "V"  // void
- *   | "Z"  // boolean
- *   | "T" + Identifier + ";" // type variable
- *   | "[" + TypeSignature  // array X[]
- *   | "!" + TypeSignature  // capture-of ?
- *   | ResolvedClassTypeSignature
- *   | UnresolvedClassTypeSignature
- *
- * ResolvedClassTypeSignature ::= // resolved named type (in compiled code)
- *     "L" + Identifier + OptionalTypeArguments
- *           ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
- *     | OptionalTypeParameters + "L" + Identifier +
- *           ( ( "." | "/" ) + Identifier )* + ";"
- *
- * UnresolvedClassTypeSignature ::= // unresolved named type (in source code)
- *     "Q" + Identifier + OptionalTypeArguments
- *           ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
- *     | OptionalTypeParameters "Q" + Identifier +
- *           ( ( "." | "/" ) + Identifier )* + ";"
- *
- * OptionalTypeArguments ::=
- *     "<" + TypeArgument+ + ">"
- *   |
- *
- * TypeArgument ::=
- *   | TypeSignature
- *   | "*" // wildcard ?
- *   | "+" TypeSignature // wildcard ? extends X
- *   | "-" TypeSignature // wildcard ? super X
- *
- * OptionalTypeParameters ::=
- *     "<" + FormalTypeParameterSignature+ + ">"
- *   |
- * </pre>
- * </p>
- * <p>
- * Examples:
- * <ul>
- *   <li><code>"[[I"</code> denotes <code>int[][]</code></li>
- *   <li><code>"Ljava.lang.String;"</code> denotes <code>java.lang.String</code> in compiled code</li>
- *   <li><code>"QString;"</code> denotes <code>String</code> in source code</li>
- *   <li><code>"Qjava.lang.String;"</code> denotes <code>java.lang.String</code> in source code</li>
- *   <li><code>"[QString;"</code> denotes <code>String[]</code> in source code</li>
- *   <li><code>"QMap<QString;*>;"</code> denotes <code>Map<String,?></code> in source code</li>
- *   <li><code>"Qjava.util.List<TV;>;"</code> denotes <code>java.util.List<V></code> in source code</li>
- *   <li><code>"<E;>Ljava.util.List;"</code> denotes <code><E>java.util.List</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * The syntax for a method signature is:
- * <pre>
- * MethodSignature ::= OptionalTypeParameters + "(" + ParamTypeSignature* + ")" + ReturnTypeSignature
- * ParamTypeSignature ::= TypeSignature
- * ReturnTypeSignature ::= TypeSignature
- * </pre>
- * <p>
- * Examples:
- * <ul>
- *   <li><code>"()I"</code> denotes <code>int foo()</code></li>
- *   <li><code>"([Ljava.lang.String;)V"</code> denotes <code>void foo(java.lang.String[])</code> in compiled code</li>
- *   <li><code>"(QString;)QObject;"</code> denotes <code>Object foo(String)</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * The syntax for a formal type parameter signature is:
- * <pre>
- * FormalTypeParameterSignature ::=
- *     TypeVariableName + OptionalClassBound + InterfaceBound*
- * TypeVariableName ::= Identifier
- * OptionalClassBound ::=
- *     ":"
- *   | ":" + TypeSignature
- * InterfaceBound ::=
- *     ":" + TypeSignature
- * </pre>
- * <p>
- * Examples:
- * <ul>
- *   <li><code>"X:"</code> denotes <code>X</code></li>
- *   <li><code>"X:QReader;"</code> denotes <code>X extends Reader</code> in source code</li>
- *   <li><code>"X:QReader;:QSerializable;"</code> denotes <code>X extends Reader & Serializable</code> in source code</li>
- * </ul>
- * </p>
- * <p>
- * This class provides static methods and constants only.
- * </p>
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public final class Signature {
-	/*
-	 * Character constant indicating the primitive type boolean in a signature.
-	 * Value is <code>'Z'</code>.
-	 */
-	public static final char C_BOOLEAN = 'Z';
-
-	/*
-	 * Character constant indicating the primitive type byte in a signature.
-	 * Value is <code>'B'</code>.
-	 */
-	public static final char C_BYTE = 'B';
-
-	/*
-	 * Character constant indicating the primitive type char in a signature.
-	 * Value is <code>'C'</code>.
-	 */
-	public static final char C_CHAR = 'C';
-
-	/*
-	 * Character constant indicating the primitive type double in a signature.
-	 * Value is <code>'D'</code>.
-	 */
-	public static final char C_DOUBLE = 'D';
-
-	/*
-	 * Character constant indicating the primitive type float in a signature.
-	 * Value is <code>'F'</code>.
-	 */
-	public static final char C_FLOAT = 'F';
-
-	/*
-	 * Character constant indicating the primitive type int in a signature.
-	 * Value is <code>'I'</code>.
-	 */
-	public static final char C_INT = 'I';
-
-	/*
-	 * Character constant indicating the semicolon in a signature.
-	 * Value is <code>';'</code>.
-	 */
-	public static final char C_SEMICOLON = ';';
-
-	/*
-	 * Character constant indicating the colon in a signature.
-	 * Value is <code>':'</code>.
-	 * @since 3.0
-	 */
-	public static final char C_COLON = ':';
-
-	/*
-	 * Character constant indicating the primitive type long in a signature.
-	 * Value is <code>'J'</code>.
-	 */
-	public static final char C_LONG = 'J';
-
-	/*
-	 * Character constant indicating the primitive type short in a signature.
-	 * Value is <code>'S'</code>.
-	 */
-	public static final char C_SHORT = 'S';
-
-	/*
-	 * Character constant indicating result type void in a signature.
-	 * Value is <code>'V'</code>.
-	 */
-	public static final char C_VOID = 'V';
-
-	/*
-	 * Character constant indicating the start of a resolved type variable in a
-	 * signature. Value is <code>'T'</code>.
-	 * @since 3.0
-	 */
-	public static final char C_TYPE_VARIABLE = 'T';
-
-	/*
-	 * Character constant indicating an unbound wildcard type argument
-	 * in a signature.
-	 * Value is <code>'*'</code>.
-	 * @since 3.0
-	 */
-	public static final char C_STAR = '*';
-
-	/*
-	 * Character constant indicating an exception in a signature.
-	 * Value is <code>'^'</code>.
-	 * @since 3.1
-	 */
-	public static final char C_EXCEPTION_START = '^';
-
-	/*
-	 * Character constant indicating a bound wildcard type argument
-	 * in a signature with extends clause.
-	 * Value is <code>'+'</code>.
-	 * @since 3.1
-	 */
-	public static final char C_EXTENDS = '+';
-
-	/*
-	 * Character constant indicating a bound wildcard type argument
-	 * in a signature with super clause.
-	 * Value is <code>'-'</code>.
-	 * @since 3.1
-	 */
-	public static final char C_SUPER = '-';
-
-	/*
-	 * Character constant indicating the dot in a signature.
-	 * Value is <code>'.'</code>.
-	 */
-	public static final char C_DOT = '.';
-
-	/*
-	 * Character constant indicating the dollar in a signature.
-	 * Value is <code>'$'</code>.
-	 */
-	public static final char C_DOLLAR = '$';
-
-	/*
-	 * Character constant indicating an array type in a signature.
-	 * Value is <code>'['</code>.
-	 */
-	public static final char C_ARRAY = '[';
-
-	/*
-	 * Character constant indicating the start of a resolved, named type in a
-	 * signature. Value is <code>'L'</code>.
-	 */
-	public static final char C_RESOLVED = 'L';
-
-	/*
-	 * Character constant indicating the start of an unresolved, named type in a
-	 * signature. Value is <code>'Q'</code>.
-	 */
-	public static final char C_UNRESOLVED = 'Q';
-
-	/*
-	 * Character constant indicating the end of a named type in a signature.
-	 * Value is <code>';'</code>.
-	 */
-	public static final char C_NAME_END = ';';
-
-	/*
-	 * Character constant indicating the start of a parameter type list in a
-	 * signature. Value is <code>'('</code>.
-	 */
-	public static final char C_PARAM_START = '(';
-
-	/*
-	 * Character constant indicating the end of a parameter type list in a
-	 * signature. Value is <code>')'</code>.
-	 */
-	public static final char C_PARAM_END = ')';
-
-	/*
-	 * Character constant indicating the start of a formal type parameter
-	 * (or type argument) list in a signature. Value is <code>'<'</code>.
-	 * @since 3.0
-	 */
-	public static final char C_GENERIC_START = '<';
-
-	/*
-	 * Character constant indicating the end of a generic type list in a
-	 * signature. Value is <code>'>'</code>.
-	 * @since 3.0
-	 */
-	public static final char C_GENERIC_END = '>';
-
-	/*
-	 * Character constant indicating a capture of a wildcard type in a
-	 * signature. Value is <code>'!'</code>.
-	 * @since 3.1
-	 */
-	public static final char C_CAPTURE = '!';
-
-	/*
-	 * String constant for the signature of the primitive type boolean.
-	 * Value is <code>"Z"</code>.
-	 */
-	public static final String SIG_BOOLEAN = "Z"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type byte.
-	 * Value is <code>"B"</code>.
-	 */
-	public static final String SIG_BYTE = "B"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type char.
-	 * Value is <code>"C"</code>.
-	 */
-	public static final String SIG_CHAR = "C"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type double.
-	 * Value is <code>"D"</code>.
-	 */
-	public static final String SIG_DOUBLE = "D"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type float.
-	 * Value is <code>"F"</code>.
-	 */
-	public static final String SIG_FLOAT = "F"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type int.
-	 * Value is <code>"I"</code>.
-	 */
-	public static final String SIG_INT = "I"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type long.
-	 * Value is <code>"J"</code>.
-	 */
-	public static final String SIG_LONG = "J"; //$NON-NLS-1$
-
-	/*
-	 * String constant for the signature of the primitive type short.
-	 * Value is <code>"S"</code>.
-	 */
-	public static final String SIG_SHORT = "S"; //$NON-NLS-1$
-
-	/* String constant for the signature of result type void.
-	 * Value is <code>"V"</code>.
-	 */
-	public static final String SIG_VOID = "V"; //$NON-NLS-1$
-
-	/*
-	 * Kind constant for a class type signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.0
-	 */
-	public static final int CLASS_TYPE_SIGNATURE = 1;
-
-	/*
-	 * Kind constant for a base (primitive or void) type signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.0
-	 */
-	public static final int BASE_TYPE_SIGNATURE = 2;
-
-	/*
-	 * Kind constant for a type variable signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.0
-	 */
-	public static final int TYPE_VARIABLE_SIGNATURE = 3;
-
-	/*
-	 * Kind constant for an array type signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.0
-	 */
-	public static final int ARRAY_TYPE_SIGNATURE = 4;
-
-	/*
-	 * Kind constant for a wildcard type signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.1
-	 */
-	public static final int WILDCARD_TYPE_SIGNATURE = 5;
-
-	/*
-	 * Kind constant for the capture of a wildcard type signature.
-	 * @see #getTypeSignatureKind(String)
-	 * @since 3.1
-	 */
-	public static final int CAPTURE_TYPE_SIGNATURE = 6;
-
-	private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
-	private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
-	private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
-	private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
-	private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
-	private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
-	private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
-	private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
-	private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
-	//	private static final char[] EXTENDS = "extends".toCharArray(); //$NON-NLS-1$
-	//	private static final char[] SUPER = "super".toCharArray(); //$NON-NLS-1$
-	private static final char[] CAPTURE = "capture-of".toCharArray(); //$NON-NLS-1$
-
-	/*
-	 * Returns the number of parameter types in the given method signature.
-	 *
-	 * @param methodSignature the method signature
-	 * @return the number of parameters
-	 * @exception IllegalArgumentException if the signature is not syntactically
-	 *   correct
-	 * @since 2.0
-	 */
-	public static int getParameterCount(char[] methodSignature) throws IllegalArgumentException {
-		try {
-			int count = 0;
-			int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
-			if (i < 0) {
-				throw new IllegalArgumentException();
-			}
-			i++;
-			for (;;) {
-				if (methodSignature[i] == C_PARAM_END) {
-					return count;
-				}
-				int e = Utility.scanTypeSignature(methodSignature, i);
-				if (e < 0) {
-					throw new IllegalArgumentException();
-				}
-				i = e + 1;
-				count++;
-			}
-		} catch (ArrayIndexOutOfBoundsException e) {
-			throw new IllegalArgumentException();
-		}
-	}
-
-	/*
-	 * Extracts the parameter type signatures from the given method signature.
-	 * The method signature is expected to be dot-based.
-	 *
-	 * @param methodSignature the method signature
-	 * @return the list of parameter type signatures
-	 * @exception IllegalArgumentException if the signature is syntactically
-	 *   incorrect
-	 *
-	 * @since 2.0
-	 */
-	public static char[][] getParameterTypes(char[] methodSignature) throws IllegalArgumentException {
-		try {
-			int count = getParameterCount(methodSignature);
-			char[][] result = new char[count][];
-			if (count == 0) {
-				return result;
-			}
-			int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
-			if (i < 0) {
-				throw new IllegalArgumentException();
-			}
-			i++;
-			int t = 0;
-			for (;;) {
-				if (methodSignature[i] == C_PARAM_END) {
-					return result;
-				}
-				int e = Utility.scanTypeSignature(methodSignature, i);
-				if (e < 0) {
-					throw new IllegalArgumentException();
-				}
-				result[t] = CharOperation.subarray(methodSignature, i, e + 1);
-				t++;
-				i = e + 1;
-			}
-		} catch (ArrayIndexOutOfBoundsException e) {
-			throw new IllegalArgumentException();
-		}
-	}
-
-	/*
-	 * Extracts the return type from the given method signature. The method signature is
-	 * expected to be dot-based.
-	 *
-	 * @param methodSignature the method signature
-	 * @return the type signature of the return type
-	 * @exception IllegalArgumentException if the signature is syntactically
-	 *   incorrect
-	 *
-	 * @since 2.0
-	 */
-	public static char[] getReturnType(char[] methodSignature) throws IllegalArgumentException {
-		// skip type parameters
-		int paren = CharOperation.lastIndexOf(C_PARAM_END, methodSignature);
-		if (paren == -1) {
-			throw new IllegalArgumentException();
-		}
-		// there could be thrown exceptions behind, thus scan one type exactly
-		int last = Utility.scanTypeSignature(methodSignature, paren + 1);
-		return CharOperation.subarray(methodSignature, paren + 1, last + 1);
-	}
-
-	/*
-	 * Extracts the class and interface bounds from the given formal type
-	 * parameter signature. The class bound, if present, is listed before
-	 * the interface bounds. The signature is expected to be dot-based.
-	 *
-	 * @param formalTypeParameterSignature the formal type parameter signature
-	 * @return the (possibly empty) list of type signatures for the bounds
-	 * @exception IllegalArgumentException if the signature is syntactically
-	 *   incorrect
-	 * @since 3.0
-	 */
-	public static char[][] getTypeParameterBounds(char[] formalTypeParameterSignature) throws IllegalArgumentException {
-		int p1 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature);
-		if (p1 < 0) {
-			// no ":" means can't be a formal type parameter signature
-			throw new IllegalArgumentException();
-		}
-		if (p1 == formalTypeParameterSignature.length - 1) {
-			// no class or interface bounds
-			return CharOperation.NO_CHAR_CHAR;
-		}
-		int p2 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature, p1 + 1);
-		char[] classBound;
-		if (p2 < 0) {
-			// no interface bounds
-			classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, formalTypeParameterSignature.length);
-			return new char[][] {classBound};
-		}
-		if (p2 == p1 + 1) {
-			// no class bound, but 1 or more interface bounds
-			classBound = null;
-		} else {
-			classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, p2);
-		}
-		char[][] interfaceBounds = CharOperation.splitOn(C_COLON, formalTypeParameterSignature, p2 + 1, formalTypeParameterSignature.length);
-		if (classBound == null) {
-			return interfaceBounds;
-		}
-		int resultLength = interfaceBounds.length + 1;
-		char[][] result = new char[resultLength][];
-		result[0] = classBound;
-		System.arraycopy(interfaceBounds, 0, result, 1, interfaceBounds.length);
-		return result;
-	}
-
-	/*
-	 * Extracts the type parameter signatures from the given method or type signature.
-	 * The method or type signature is expected to be dot-based.
-	 *
-	 * @param methodOrTypeSignature the method or type signature
-	 * @return the list of type parameter signatures
-	 * @exception IllegalArgumentException if the signature is syntactically
-	 *   incorrect
-	 *
-	 * @since 3.1
-	 */
-	public static char[][] getTypeParameters(char[] methodOrTypeSignature) throws IllegalArgumentException {
-		try {
-			int length = methodOrTypeSignature.length;
-			if (length == 0)
-				return CharOperation.NO_CHAR_CHAR;
-			if (methodOrTypeSignature[0] != C_GENERIC_START)
-				return CharOperation.NO_CHAR_CHAR;
-
-			ArrayList paramList = new ArrayList(1);
-			int paramStart = 1, i = 1; // start after leading '<'
-			while (i < length) {
-				if (methodOrTypeSignature[i] == C_GENERIC_END) {
-					int size = paramList.size();
-					if (size == 0)
-						throw new IllegalArgumentException();
-					char[][] result;
-					paramList.toArray(result = new char[size][]);
-					return result;
-				}
-				i = CharOperation.indexOf(C_COLON, methodOrTypeSignature, i);
-				if (i < 0 || i >= length)
-					throw new IllegalArgumentException();
-				// iterate over bounds
-				while (methodOrTypeSignature[i] == ':') {
-					i++; // skip colon
-					switch (methodOrTypeSignature[i]) {
-						case ':' :
-							// no class bound
-							break;
-						case C_GENERIC_END :
-							break;
-						case C_RESOLVED :
-							try {
-								i = Utility.scanClassTypeSignature(methodOrTypeSignature, i);
-								i++; // position at start of next param if any
-							} catch (IllegalArgumentException e) {
-								// not a class type signature -> it is a new type parameter
-							}
-							break;
-						case C_ARRAY :
-							try {
-								i = Utility.scanArrayTypeSignature(methodOrTypeSignature, i);
-								i++; // position at start of next param if any
-							} catch (IllegalArgumentException e) {
-								// not an array type signature -> it is a new type parameter
-							}
-							break;
-						case C_TYPE_VARIABLE :
-							try {
-								i = Utility.scanTypeVariableSignature(methodOrTypeSignature, i);
-								i++; // position at start of next param if any
-							} catch (IllegalArgumentException e) {
-								// not a type variable signature -> it is a new type parameter
-							}
-							break;
-						// default: another type parameter is starting
-					}
-				}
-				paramList.add(CharOperation.subarray(methodOrTypeSignature, paramStart, i));
-				paramStart = i; // next param start from here
-			}
-		} catch (ArrayIndexOutOfBoundsException e) {
-			// invalid signature, fall through
-		}
-		throw new IllegalArgumentException();
-	}
-
-	/*
-	 * Converts the given type signature to a readable string. The signature is expected to
-	 * be dot-based.
-	 *
-	 * <p>
-	 * For example:
-	 * <pre>
-	 * <code>
-	 * toString({'[', 'L', 'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', ';'}) -> {'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', '[', ']'}
-	 * toString({'I'}) -> {'i', 'n', 't'}
-	 * toString({'+', 'L', 'O', 'b', 'j', 'e', 'c', 't', ';'}) -> {'?', ' ', 'e', 'x', 't', 'e', 'n', 'd', 's', ' ', 'O', 'b', 'j', 'e', 'c', 't'}
-	 * </code>
-	 * </pre>
-	 * </p>
-	 * <p>
-	 * Note: This method assumes that a type signature containing a <code>'$'</code>
-	 * is an inner type signature. While this is correct in most cases, someone could
-	 * define a non-inner type name containing a <code>'$'</code>. Handling this
-	 * correctly in all cases would have required resolving the signature, which
-	 * generally not feasible.
-	 * </p>
-	 *
-	 * @param signature the type signature
-	 * @return the string representation of the type
-	 * @exception IllegalArgumentException if the signature is not syntactically
-	 *   correct
-	 *
-	 * @since 2.0
-	 */
-	public static char[] toCharArray(char[] signature) throws IllegalArgumentException {
-		int sigLength = signature.length;
-		if (sigLength == 0 || signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) {
-			return toCharArray(signature, CharOperation.NO_CHAR, null, true, true);
-		}
-
-		StringBuffer buffer = new StringBuffer(signature.length + 10);
-		appendTypeSignature(signature, 0, true, buffer);
-		char[] result = new char[buffer.length()];
-		buffer.getChars(0, buffer.length(), result, 0);
-		return result;
-	}
-
-	/*
-	 * Converts the given method signature to a readable form. The method signature is expected to
-	 * be dot-based.
-	 * <p>
-	 * For example:
-	 * <pre>
-	 * <code>
-	 * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
-	 * </code>
-	 * </pre>
-	 * </p>
-	 *
-	 * @param methodSignature the method signature to convert
-	 * @param methodName the name of the method to insert in the result, or
-	 *   <code>null</code> if no method name is to be included
-	 * @param parameterNames the parameter names to insert in the result, or
-	 *   <code>null</code> if no parameter names are to be included; if supplied,
-	 *   the number of parameter names must match that of the method signature
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param includeReturnType <code>true</code> if the return type is to be
-	 *   included
-	 * @param isVargArgs <code>true</code> if the last argument should be displayed as a
-	 * variable argument,  <code>false</code> otherwise.
-	 * @return the char array representation of the method signature
-	 *
-	 * @since 3.1
-	 */
-	public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType, boolean isVargArgs) {
-		int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature);
-		if (firstParen == -1) {
-			throw new IllegalArgumentException();
-		}
-
-		StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
-
-		// return type
-		if (includeReturnType) {
-			char[] rts = getReturnType(methodSignature);
-			appendTypeSignature(rts, 0, fullyQualifyTypeNames, buffer);
-			buffer.append(' ');
-		}
-
-		// selector
-		if (methodName != null) {
-			buffer.append(methodName);
-		}
-
-		// parameters
-		buffer.append('(');
-		char[][] pts = getParameterTypes(methodSignature);
-		for (int i = 0, max = pts.length; i < max; i++) {
-			if (i == max - 1) {
-				appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer, isVargArgs);
-			} else {
-				appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer);
-			}
-			if (parameterNames != null) {
-				buffer.append(' ');
-				buffer.append(parameterNames[i]);
-			}
-			if (i != pts.length - 1) {
-				buffer.append(',');
-				buffer.append(' ');
-			}
-		}
-		buffer.append(')');
-		char[] result = new char[buffer.length()];
-		buffer.getChars(0, buffer.length(), result, 0);
-		return result;
-	}
-
-	/*
-	 * Scans the given string for a type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param buffer the string buffer to append to
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type signature
-	 * @see Utility#scanTypeSignature(char[], int)
-	 */
-	private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
-	}
-
-	/*
-	 * Scans the given string for a type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param buffer the string buffer to append to
-	 * @param isVarArgs <code>true</code> if the type must be displayed as a
-	 * variable argument, <code>false</code> otherwise. In this case, the type must be an array type
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type signature, or if isVarArgs is <code>true</code>,
-	 * and the type is not an array type signature.
-	 * @see Utility#scanTypeSignature(char[], int)
-	 */
-	private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (isVarArgs) {
-			switch (c) {
-				case C_ARRAY :
-					return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, true);
-				case C_RESOLVED :
-				case C_UNRESOLVED :
-				case C_TYPE_VARIABLE :
-				case C_BOOLEAN :
-				case C_BYTE :
-				case C_CHAR :
-				case C_DOUBLE :
-				case C_FLOAT :
-				case C_INT :
-				case C_LONG :
-				case C_SHORT :
-				case C_VOID :
-				case C_STAR :
-				case C_EXTENDS :
-				case C_SUPER :
-				case C_CAPTURE :
-				default :
-					throw new IllegalArgumentException(); // a var args is an array type
-			}
-		}
-		switch (c) {
-			case C_ARRAY :
-				return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer);
-			case C_RESOLVED :
-			case C_UNRESOLVED :
-				return appendClassTypeSignature(string, start, fullyQualifyTypeNames, buffer);
-			case C_TYPE_VARIABLE :
-				int e = Utility.scanTypeVariableSignature(string, start);
-				buffer.append(string, start + 1, e - start - 1);
-				return e;
-			case C_BOOLEAN :
-				buffer.append(BOOLEAN);
-				return start;
-			case C_BYTE :
-				buffer.append(BYTE);
-				return start;
-			case C_CHAR :
-				buffer.append(CHAR);
-				return start;
-			case C_DOUBLE :
-				buffer.append(DOUBLE);
-				return start;
-			case C_FLOAT :
-				buffer.append(FLOAT);
-				return start;
-			case C_INT :
-				buffer.append(INT);
-				return start;
-			case C_LONG :
-				buffer.append(LONG);
-				return start;
-			case C_SHORT :
-				buffer.append(SHORT);
-				return start;
-			case C_VOID :
-				buffer.append(VOID);
-				return start;
-			case C_CAPTURE :
-				return appendCaptureTypeSignature(string, start, fullyQualifyTypeNames, buffer);
-			case C_STAR :
-			case C_EXTENDS :
-			case C_SUPER :
-				return appendTypeArgumentSignature(string, start, fullyQualifyTypeNames, buffer);
-			default :
-				throw new IllegalArgumentException();
-		}
-	}
-
-	/*
-	 * Scans the given string for an array type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not an array type signature
-	 * @see Utility#scanArrayTypeSignature(char[], int)
-	 */
-	private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
-	}
-
-	/*
-	 * Scans the given string for an array type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not an array type signature
-	 * @see Utility#scanArrayTypeSignature(char[], int)
-	 */
-	private static int appendCaptureTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		// need a minimum 2 char
-		if (start >= string.length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != C_CAPTURE) {
-			throw new IllegalArgumentException();
-		}
-		buffer.append(CAPTURE).append(' ');
-		return appendTypeArgumentSignature(string, start + 1, fullyQualifyTypeNames, buffer);
-	}
-
-	/*
-	 * Scans the given string for an array type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param isVarArgs <code>true</code> if the array type must be displayed as a
-	 * variable argument, <code>false</code> otherwise
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not an array type signature
-	 * @see Utility#scanArrayTypeSignature(char[], int)
-	 */
-	private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
-		int length = string.length;
-		// need a minimum 2 char
-		if (start >= length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != C_ARRAY) {
-			throw new IllegalArgumentException();
-		}
-
-		int index = start;
-		c = string[++index];
-		while (c == C_ARRAY) {
-			// need a minimum 2 char
-			if (index >= length - 1) {
-				throw new IllegalArgumentException();
-			}
-			c = string[++index];
-		}
-
-		int e = appendTypeSignature(string, index, fullyQualifyTypeNames, buffer);
-
-		for (int i = 1, dims = index - start; i < dims; i++) {
-			buffer.append('[').append(']');
-		}
-
-		if (isVarArgs) {
-			buffer.append('.').append('.').append('.');
-		} else {
-			buffer.append('[').append(']');
-		}
-		return e;
-	}
-
-	/*
-	 * Scans the given string for a class type signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param buffer the string buffer to append to
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a class type signature
-	 * @see Utility#scanClassTypeSignature(char[], int)
-	 */
-	private static int appendClassTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		// need a minimum 3 chars "Lx;"
-		if (start >= string.length - 2) {
-			throw new IllegalArgumentException();
-		}
-		// must start in "L" or "Q"
-		char c = string[start];
-		if (c != C_RESOLVED && c != C_UNRESOLVED) {
-			throw new IllegalArgumentException();
-		}
-		boolean resolved = (c == C_RESOLVED);
-		boolean removePackageQualifiers = !fullyQualifyTypeNames;
-		if (!resolved) {
-			// keep everything in an unresolved name
-			removePackageQualifiers = false;
-		}
-		int p = start + 1;
-		int checkpoint = buffer.length();
-		int innerTypeStart = -1;
-		boolean inAnonymousType = false;
-		while (true) {
-			if (p >= string.length) {
-				throw new IllegalArgumentException();
-			}
-			c = string[p];
-			switch (c) {
-				case C_SEMICOLON :
-					// all done
-					return p;
-				case C_GENERIC_START :
-					int e = appendTypeArgumentSignatures(string, p, fullyQualifyTypeNames, buffer);
-					// once we hit type arguments there are no more package prefixes
-					removePackageQualifiers = false;
-					p = e;
-					break;
-				case C_DOT :
-					if (removePackageQualifiers) {
-						// erase package prefix
-						buffer.setLength(checkpoint);
-					} else {
-						buffer.append('.');
-					}
-					break;
-				case '/' :
-					if (removePackageQualifiers) {
-						// erase package prefix
-						buffer.setLength(checkpoint);
-					} else {
-						buffer.append('/');
-					}
-					break;
-				case C_DOLLAR :
-					innerTypeStart = buffer.length();
-					inAnonymousType = false;
-					if (resolved) {
-						// once we hit "$" there are no more package prefixes
-						removePackageQualifiers = false;
-						/*
-						 * Convert '$' in resolved type signatures into '.'.
-						 * NOTE: This assumes that the type signature is an inner type
-						 * signature. This is true in most cases, but someone can define a
-						 * non-inner type name containing a '$'.
-						 */
-						buffer.append('.');
-					}
-					break;
-				default :
-					if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
-						inAnonymousType = true;
-						buffer.setLength(innerTypeStart); // remove '.'
-						buffer.insert(checkpoint, "new "); //$NON-NLS-1$
-						buffer.append("(){}"); //$NON-NLS-1$
-					}
-					if (!inAnonymousType)
-						buffer.append(c);
-					innerTypeStart = -1;
-			}
-			p++;
-		}
-	}
-
-	/*
-	 * Scans the given string for a list of type arguments signature starting at the
-	 * given index and appends it to the given buffer, and returns the index of the
-	 * last character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param buffer the string buffer to append to
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a list of type argument
-	 * signatures
-	 * @see Utility#scanTypeArgumentSignatures(char[], int)
-	 */
-	private static int appendTypeArgumentSignatures(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		// need a minimum 2 char "<>"
-		if (start >= string.length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != C_GENERIC_START) {
-			throw new IllegalArgumentException();
-		}
-		buffer.append('<');
-		int p = start + 1;
-		int count = 0;
-		while (true) {
-			if (p >= string.length) {
-				throw new IllegalArgumentException();
-			}
-			c = string[p];
-			if (c == C_GENERIC_END) {
-				buffer.append('>');
-				return p;
-			}
-			if (count != 0) {
-				buffer.append(',');
-			}
-			int e = appendTypeArgumentSignature(string, p, fullyQualifyTypeNames, buffer);
-			count++;
-			p = e + 1;
-		}
-	}
-
-	/*
-	 * Scans the given string for a type argument signature starting at the given
-	 * index and appends it to the given buffer, and returns the index of the last
-	 * character.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param buffer the string buffer to append to
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type argument signature
-	 * @see Utility#scanTypeArgumentSignature(char[], int)
-	 */
-	private static int appendTypeArgumentSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		switch (c) {
-			case C_STAR :
-				buffer.append('?');
-				return start;
-			case C_EXTENDS :
-				buffer.append("? extends "); //$NON-NLS-1$
-				return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
-			case C_SUPER :
-				buffer.append("? super "); //$NON-NLS-1$
-				return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
-			default :
-				return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer);
-		}
-	}
-
-	/*
-	 * Converts the given method signature to a readable form. The method signature is expected to
-	 * be dot-based.
-	 * <p>
-	 * For example:
-	 * <pre>
-	 * <code>
-	 * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
-	 * </code>
-	 * </pre>
-	 * </p>
-	 *
-	 * @param methodSignature the method signature to convert
-	 * @param methodName the name of the method to insert in the result, or
-	 *   <code>null</code> if no method name is to be included
-	 * @param parameterNames the parameter names to insert in the result, or
-	 *   <code>null</code> if no parameter names are to be included; if supplied,
-	 *   the number of parameter names must match that of the method signature
-	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
-	 *   qualified, and <code>false</code> to use only simple names
-	 * @param includeReturnType <code>true</code> if the return type is to be
-	 *   included
-	 * @return the char array representation of the method signature
-	 *
-	 * @since 2.0
-	 */
-	public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) {
-		return toCharArray(methodSignature, methodName, parameterNames, fullyQualifyTypeNames, includeReturnType, false);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java
deleted file mode 100644
index e602410..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SignatureAttribute.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class SignatureAttribute extends ClassFileAttribute {
-
-	private int signatureIndex;
-	private char[] signature;
-
-	SignatureAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		final int index = u2At(classFileBytes, 6, offset);
-		this.signatureIndex = index;
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.signature = constantPoolEntry.getUtf8Value();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignatureIndex()
-	 */
-	public int getSignatureIndex() {
-		return this.signatureIndex;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignature()
-	 */
-	public char[] getSignature() {
-		return this.signature;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java
deleted file mode 100644
index f468e84..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/SourceFileAttribute.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public class SourceFileAttribute extends ClassFileAttribute {
-
-	private int sourceFileIndex;
-	private char[] sourceFileName;
-
-	/**
-	 * Constructor for SourceFileAttribute.
-	 * @param classFileBytes
-	 * @param constantPool
-	 * @param offset
-	 * @throws ClassFormatException
-	 */
-	public SourceFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
-		super(classFileBytes, constantPool, offset);
-		this.sourceFileIndex = u2At(classFileBytes, 6, offset);
-		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.sourceFileIndex);
-		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
-			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
-		}
-		this.sourceFileName = constantPoolEntry.getUtf8Value();
-	}
-
-	/*
-	 * @see ISourceAttribute#getSourceFileIndex()
-	 */
-	public int getSourceFileIndex() {
-		return this.sourceFileIndex;
-	}
-
-	/*
-	 * @see ISourceAttribute#getSourceFileName()
-	 */
-	public char[] getSourceFileName() {
-		return this.sourceFileName;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java
deleted file mode 100644
index 1e000fb..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/TypeConstants.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-public interface TypeConstants {
-
-	char[] JAVA = "java".toCharArray(); //$NON-NLS-1$
-	char[] LANG = "lang".toCharArray(); //$NON-NLS-1$
-	char[] IO = "io".toCharArray(); //$NON-NLS-1$
-	char[] UTIL = "util".toCharArray(); //$NON-NLS-1$
-	char[] ANNOTATION = "annotation".toCharArray(); //$NON-NLS-1$
-	char[] REFLECT = "reflect".toCharArray(); //$NON-NLS-1$
-	char[] LENGTH = "length".toCharArray(); //$NON-NLS-1$
-	char[] CLONE = "clone".toCharArray(); //$NON-NLS-1$
-	char[] EQUALS = "equals".toCharArray(); //$NON-NLS-1$
-	char[] GETCLASS = "getClass".toCharArray(); //$NON-NLS-1$
-	char[] HASHCODE = "hashCode".toCharArray(); //$NON-NLS-1$
-	char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
-	char[] MAIN = "main".toCharArray(); //$NON-NLS-1$
-	char[] SERIALVERSIONUID = "serialVersionUID".toCharArray(); //$NON-NLS-1$
-	char[] SERIALPERSISTENTFIELDS = "serialPersistentFields".toCharArray(); //$NON-NLS-1$
-	char[] READRESOLVE = "readResolve".toCharArray(); //$NON-NLS-1$
-	char[] WRITEREPLACE = "writeReplace".toCharArray(); //$NON-NLS-1$
-	char[] READOBJECT = "readObject".toCharArray(); //$NON-NLS-1$
-	char[] WRITEOBJECT = "writeObject".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_LANG_OBJECT = "java.lang.Object".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_LANG_ENUM = "java.lang.Enum".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_LANG_ANNOTATION_ANNOTATION = "java.lang.annotation.Annotation".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_IO_OBJECTINPUTSTREAM = "java.io.ObjectInputStream".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_IO_OBJECTOUTPUTSTREAM = "java.io.ObjectOutputStream".toCharArray(); //$NON-NLS-1$
-	char[] CharArray_JAVA_IO_OBJECTSTREAMFIELD = "java.io.ObjectStreamField".toCharArray(); //$NON-NLS-1$
-	char[] ANONYM_PREFIX = "new ".toCharArray(); //$NON-NLS-1$
-	char[] ANONYM_SUFFIX = "(){}".toCharArray(); //$NON-NLS-1$
-	char[] WILDCARD_NAME = {'?'};
-	char[] WILDCARD_SUPER = " super ".toCharArray(); //$NON-NLS-1$
-	char[] WILDCARD_EXTENDS = " extends ".toCharArray(); //$NON-NLS-1$
-	char[] WILDCARD_MINUS = {'-'};
-	char[] WILDCARD_STAR = {'*'};
-	char[] WILDCARD_PLUS = {'+'};
-	char[] WILDCARD_CAPTURE_NAME_PREFIX = "capture#".toCharArray(); //$NON-NLS-1$
-	char[] WILDCARD_CAPTURE_NAME_SUFFIX = "-of ".toCharArray(); //$NON-NLS-1$
-	char[] WILDCARD_CAPTURE = {'!'};
-	char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
-	char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
-	char[] INT = "int".toCharArray(); //$NON-NLS-1$
-	char[] LONG = "long".toCharArray(); //$NON-NLS-1$
-	char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
-	char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
-	char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
-	char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
-	char[] NULL = "null".toCharArray(); //$NON-NLS-1$
-	char[] VOID = "void".toCharArray(); //$NON-NLS-1$
-	char[] VALUE = "value".toCharArray(); //$NON-NLS-1$
-	char[] VALUES = "values".toCharArray(); //$NON-NLS-1$
-	char[] VALUEOF = "valueOf".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_SOURCE = "SOURCE".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_CLASS = "CLASS".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_RUNTIME = "RUNTIME".toCharArray(); //$NON-NLS-1$
-	char[] ANNOTATION_PREFIX = "@".toCharArray(); //$NON-NLS-1$
-	char[] ANNOTATION_SUFFIX = "()".toCharArray(); //$NON-NLS-1$
-	char[] TYPE = "TYPE".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_FIELD = "FIELD".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_METHOD = "METHOD".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_PARAMETER = "PARAMETER".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_CONSTRUCTOR = "CONSTRUCTOR".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_LOCAL_VARIABLE = "LOCAL_VARIABLE".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_ANNOTATION_TYPE = "ANNOTATION_TYPE".toCharArray(); //$NON-NLS-1$
-	char[] UPPER_PACKAGE = "PACKAGE".toCharArray(); //$NON-NLS-1$
-
-	// Constant compound names
-	char[][] JAVA_LANG = {JAVA, LANG};
-	char[][] JAVA_IO = {JAVA, IO};
-	char[][] JAVA_LANG_ANNOTATION_ANNOTATION = {JAVA, LANG, ANNOTATION, "Annotation".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ASSERTIONERROR = {JAVA, LANG, "AssertionError".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_CLASS = {JAVA, LANG, "Class".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_CLASSNOTFOUNDEXCEPTION = {JAVA, LANG, "ClassNotFoundException".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_CLONEABLE = {JAVA, LANG, "Cloneable".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ENUM = {JAVA, LANG, "Enum".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_EXCEPTION = {JAVA, LANG, "Exception".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ERROR = {JAVA, LANG, "Error".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ILLEGALARGUMENTEXCEPTION = {JAVA, LANG, "IllegalArgumentException".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ITERABLE = {JAVA, LANG, "Iterable".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_NOCLASSDEFERROR = {JAVA, LANG, "NoClassDefError".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_OBJECT = {JAVA, LANG, OBJECT};
-	char[][] JAVA_LANG_STRING = {JAVA, LANG, "String".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_STRINGBUFFER = {JAVA, LANG, "StringBuffer".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_STRINGBUILDER = {JAVA, LANG, "StringBuilder".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_SYSTEM = {JAVA, LANG, "System".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_RUNTIMEEXCEPTION = {JAVA, LANG, "RuntimeException".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_THROWABLE = {JAVA, LANG, "Throwable".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_REFLECT_CONSTRUCTOR = {JAVA, LANG, REFLECT, "Constructor".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_IO_PRINTSTREAM = {JAVA, IO, "PrintStream".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_IO_SERIALIZABLE = {JAVA, IO, "Serializable".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_BYTE = {JAVA, LANG, "Byte".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_SHORT = {JAVA, LANG, "Short".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_CHARACTER = {JAVA, LANG, "Character".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_INTEGER = {JAVA, LANG, "Integer".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_LONG = {JAVA, LANG, "Long".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_FLOAT = {JAVA, LANG, "Float".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_DOUBLE = {JAVA, LANG, "Double".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_BOOLEAN = {JAVA, LANG, "Boolean".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_VOID = {JAVA, LANG, "Void".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_UTIL_COLLECTION = {JAVA, UTIL, "Collection".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_UTIL_ITERATOR = {JAVA, UTIL, "Iterator".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_DEPRECATED = {JAVA, LANG, "Deprecated".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_DOCUMENTED = {JAVA, LANG, ANNOTATION, "Documented".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_INHERITED = {JAVA, LANG, ANNOTATION, "Inherited".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_OVERRIDE = {JAVA, LANG, "Override".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_RETENTION = {JAVA, LANG, ANNOTATION, "Retention".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_SUPPRESSWARNINGS = {JAVA, LANG, "SuppressWarnings".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_TARGET = {JAVA, LANG, ANNOTATION, "Target".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = {JAVA, LANG, ANNOTATION, "RetentionPolicy".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_ANNOTATION_ELEMENTTYPE = {JAVA, LANG, ANNOTATION, "ElementType".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_REFLECT_FIELD = new char[][] {JAVA, LANG, REFLECT, "Field".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_LANG_REFLECT_METHOD = new char[][] {JAVA, LANG, REFLECT, "Method".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_IO_OBJECTSTREAMEXCEPTION = new char[][] {JAVA, IO, "ObjectStreamException".toCharArray()};//$NON-NLS-1$
-	char[][] JAVA_IO_EXTERNALIZABLE = {JAVA, IO, "Externalizable".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_IO_IOEXCEPTION = new char[][] {JAVA, IO, "IOException".toCharArray()};//$NON-NLS-1$
-	char[][] JAVA_IO_OBJECTOUTPUTSTREAM = new char[][] {JAVA, IO, "ObjectOutputStream".toCharArray()}; //$NON-NLS-1$
-	char[][] JAVA_IO_OBJECTINPUTSTREAM = new char[][] {JAVA, IO, "ObjectInputStream".toCharArray()}; //$NON-NLS-1$
-
-	// Constraints for generic type argument inference
-	int CONSTRAINT_EQUAL = 0; // Actual = Formal
-	int CONSTRAINT_EXTENDS = 1; // Actual << Formal
-	int CONSTRAINT_SUPER = 2; // Actual >> Formal
-
-	// Constants used to perform bound checks
-	int OK = 0;
-	int UNCHECKED = 1;
-	int MISMATCH = 2;
-
-	// Synthetics
-	char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
-	char[] CLINIT = "<clinit>".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_SWITCH_ENUM_TABLE = "$SWITCH_TABLE$".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_ENUM_VALUES = "ENUM$VALUES".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_ASSERT_DISABLED = "$assertionsDisabled".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_CLASS = "class$".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_OUTER_LOCAL_PREFIX = "val$".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_ENCLOSING_INSTANCE_PREFIX = "this$".toCharArray(); //$NON-NLS-1$
-	char[] SYNTHETIC_ACCESS_METHOD_PREFIX = "access$".toCharArray(); //$NON-NLS-1$
-
-	// synthetic package-info name
-	public static final char[] PACKAGE_INFO_NAME = "package-info".toCharArray(); //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java
deleted file mode 100644
index 888ce16..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/Utility.java
+++ /dev/null
@@ -1,689 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.internal.repository.comparator;
-
-import java.io.*;
-import java.util.Arrays;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-public class Utility {
-	public static final int[] EMPTY_INT_ARRAY = new int[0];
-	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private static final int DEFAULT_READING_SIZE = 8192;
-	private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
-	private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
-	private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
-	private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
-	private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
-	private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
-	private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
-	private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
-	private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
-	private static final char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
-
-	/**
-	 * Returns the contents of the given zip entry as a byte array.
-	 * @throws IOException if a problem occured reading the zip entry.
-	 */
-	public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip) throws IOException {
-
-		InputStream stream = null;
-		try {
-			stream = zip.getInputStream(ze);
-			if (stream == null)
-				throw new IOException("Invalid zip entry name : " + ze.getName()); //$NON-NLS-1$
-			return getInputStreamAsByteArray(stream, (int) ze.getSize());
-		} finally {
-			close(stream);
-		}
-	}
-
-	public static void close(Object object) {
-		if (object == null)
-			return;
-		try {
-			if (object instanceof InputStream)
-				((InputStream) object).close();
-			else if (object instanceof OutputStream)
-				((OutputStream) object).close();
-			else if (object instanceof ZipFile)
-				((ZipFile) object).close();
-		} catch (IOException e) {
-			//ignore
-		}
-	}
-
-	/**
-	 * Returns the given input stream's contents as a byte array.
-	 * If a length is specified (ie. if length != -1), only length bytes
-	 * are returned. Otherwise all bytes in the stream are returned.
-	 * Note this doesn't close the stream.
-	 * @throws IOException if a problem occured reading the stream.
-	 */
-	public static byte[] getInputStreamAsByteArray(InputStream stream, int length) throws IOException {
-		byte[] contents;
-		if (length == -1) {
-			contents = new byte[0];
-			int contentsLength = 0;
-			int amountRead = -1;
-			do {
-				int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
-
-				// resize contents if needed
-				if (contentsLength + amountRequested > contents.length) {
-					System.arraycopy(contents, 0, contents = new byte[contentsLength + amountRequested], 0, contentsLength);
-				}
-
-				// read as many bytes as possible
-				amountRead = stream.read(contents, contentsLength, amountRequested);
-
-				if (amountRead > 0) {
-					// remember length of contents
-					contentsLength += amountRead;
-				}
-			} while (amountRead != -1);
-
-			// resize contents if necessary
-			if (contentsLength < contents.length) {
-				System.arraycopy(contents, 0, contents = new byte[contentsLength], 0, contentsLength);
-			}
-		} else {
-			contents = new byte[length];
-			int len = 0;
-			int readSize = 0;
-			while ((readSize != -1) && (len != length)) {
-				// See PR 1FMS89U
-				// We record first the read size. In this case len is the actual read size.
-				len += readSize;
-				readSize = stream.read(contents, len, length - len);
-			}
-		}
-
-		return contents;
-	}
-
-	public static ClassFileAttribute getAttribute(MethodInfo methodInfo, char[] attributeName) {
-		ClassFileAttribute[] attributes = methodInfo.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
-				return attributes[i];
-			}
-		}
-		return null;
-	}
-
-	public static ClassFileAttribute getAttribute(FieldInfo fieldInfo, char[] attributeName) {
-		ClassFileAttribute[] attributes = fieldInfo.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
-				return attributes[i];
-			}
-		}
-		return null;
-	}
-
-	public static ClassFileAttribute getAttribute(ClassFileReader classFileReader, char[] attributeName) {
-		ClassFileAttribute[] attributes = classFileReader.getAttributes();
-		for (int i = 0, max = attributes.length; i < max; i++) {
-			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
-				return attributes[i];
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Scans the given string for a type signature starting at the given index
-	 * and returns the index of the last character.
-	 * <pre>
-	 * TypeSignature:
-	 *  |  BaseTypeSignature
-	 *  |  ArrayTypeSignature
-	 *  |  ClassTypeSignature
-	 *  |  TypeVariableSignature
-	 * </pre>
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type signature
-	 */
-	public static int scanTypeSignature(char[] string, int start) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		switch (c) {
-			case Signature.C_ARRAY :
-				return scanArrayTypeSignature(string, start);
-			case Signature.C_RESOLVED :
-			case Signature.C_UNRESOLVED :
-				return scanClassTypeSignature(string, start);
-			case Signature.C_TYPE_VARIABLE :
-				return scanTypeVariableSignature(string, start);
-			case Signature.C_BOOLEAN :
-			case Signature.C_BYTE :
-			case Signature.C_CHAR :
-			case Signature.C_DOUBLE :
-			case Signature.C_FLOAT :
-			case Signature.C_INT :
-			case Signature.C_LONG :
-			case Signature.C_SHORT :
-			case Signature.C_VOID :
-				return scanBaseTypeSignature(string, start);
-			case Signature.C_CAPTURE :
-				return scanCaptureTypeSignature(string, start);
-			case Signature.C_EXTENDS :
-			case Signature.C_SUPER :
-			case Signature.C_STAR :
-				return scanTypeBoundSignature(string, start);
-			default :
-				throw new IllegalArgumentException();
-		}
-	}
-
-	/**
-	 * Scans the given string for a base type signature starting at the given index
-	 * and returns the index of the last character.
-	 * <pre>
-	 * BaseTypeSignature:
-	 *     <b>B</b> | <b>C</b> | <b>D</b> | <b>F</b> | <b>I</b>
-	 *   | <b>J</b> | <b>S</b> | <b>V</b> | <b>Z</b>
-	 * </pre>
-	 * Note that although the base type "V" is only allowed in method return types,
-	 * there is no syntactic ambiguity. This method will accept them anywhere
-	 * without complaint.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a base type signature
-	 */
-	public static int scanBaseTypeSignature(char[] string, int start) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if ("BCDFIJSVZ".indexOf(c) >= 0) { //$NON-NLS-1$
-			return start;
-		}
-		throw new IllegalArgumentException();
-	}
-
-	/**
-	 * Scans the given string for an array type signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * ArrayTypeSignature:
-	 *     <b>[</b> TypeSignature
-	 * </pre>
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not an array type signature
-	 */
-	public static int scanArrayTypeSignature(char[] string, int start) {
-		int length = string.length;
-		// need a minimum 2 char
-		if (start >= length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != Signature.C_ARRAY) {
-			throw new IllegalArgumentException();
-		}
-
-		c = string[++start];
-		while (c == Signature.C_ARRAY) {
-			// need a minimum 2 char
-			if (start >= length - 1) {
-				throw new IllegalArgumentException();
-			}
-			c = string[++start];
-		}
-		return scanTypeSignature(string, start);
-	}
-
-	/**
-	 * Scans the given string for a capture of a wildcard type signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * CaptureTypeSignature:
-	 *     <b>!</b> TypeBoundSignature
-	 * </pre>
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a capture type signature
-	 */
-	public static int scanCaptureTypeSignature(char[] string, int start) {
-		// need a minimum 2 char
-		if (start >= string.length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != Signature.C_CAPTURE) {
-			throw new IllegalArgumentException();
-		}
-		return scanTypeBoundSignature(string, start + 1);
-	}
-
-	/**
-	 * Scans the given string for a type variable signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * TypeVariableSignature:
-	 *     <b>T</b> Identifier <b>;</b>
-	 * </pre>
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type variable signature
-	 */
-	public static int scanTypeVariableSignature(char[] string, int start) {
-		// need a minimum 3 chars "Tx;"
-		if (start >= string.length - 2) {
-			throw new IllegalArgumentException();
-		}
-		// must start in "T"
-		char c = string[start];
-		if (c != Signature.C_TYPE_VARIABLE) {
-			throw new IllegalArgumentException();
-		}
-		int id = scanIdentifier(string, start + 1);
-		c = string[id + 1];
-		if (c == Signature.C_SEMICOLON) {
-			return id + 1;
-		}
-		throw new IllegalArgumentException();
-	}
-
-	/**
-	 * Scans the given string for an identifier starting at the given
-	 * index and returns the index of the last character.
-	 * Stop characters are: ";", ":", "<", ">", "/", ".".
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not an identifier
-	 */
-	public static int scanIdentifier(char[] string, int start) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		int p = start;
-		while (true) {
-			char c = string[p];
-			if (c == '<' || c == '>' || c == ':' || c == ';' || c == '.' || c == '/') {
-				return p - 1;
-			}
-			p++;
-			if (p == string.length) {
-				return p - 1;
-			}
-		}
-	}
-
-	/**
-	 * Scans the given string for a class type signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * ClassTypeSignature:
-	 *     { <b>L</b> | <b>Q</b> } Identifier
-	 *           { { <b>/</b> | <b>.</b> Identifier [ <b><</b> TypeArgumentSignature* <b>></b> ] }
-	 *           <b>;</b>
-	 * </pre>
-	 * Note that although all "/"-identifiers most come before "."-identifiers,
-	 * there is no syntactic ambiguity. This method will accept them without
-	 * complaint.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a class type signature
-	 */
-	public static int scanClassTypeSignature(char[] string, int start) {
-		// need a minimum 3 chars "Lx;"
-		if (start >= string.length - 2) {
-			throw new IllegalArgumentException();
-		}
-		// must start in "L" or "Q"
-		char c = string[start];
-		if (c != Signature.C_RESOLVED && c != Signature.C_UNRESOLVED) {
-			return -1;
-		}
-		int p = start + 1;
-		while (true) {
-			if (p >= string.length) {
-				throw new IllegalArgumentException();
-			}
-			c = string[p];
-			if (c == Signature.C_SEMICOLON) {
-				// all done
-				return p;
-			} else if (c == Signature.C_GENERIC_START) {
-				int e = scanTypeArgumentSignatures(string, p);
-				p = e;
-			} else if (c == Signature.C_DOT || c == '/') {
-				int id = scanIdentifier(string, p + 1);
-				p = id;
-			}
-			p++;
-		}
-	}
-
-	/**
-	 * Scans the given string for a type bound signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * TypeBoundSignature:
-	 *     <b>[-+]</b> TypeSignature <b>;</b>
-	 *     <b>*</b></b>
-	 * </pre>
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type variable signature
-	 */
-	public static int scanTypeBoundSignature(char[] string, int start) {
-		// need a minimum 1 char for wildcard
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		switch (c) {
-			case Signature.C_STAR :
-				return start;
-			case Signature.C_SUPER :
-			case Signature.C_EXTENDS :
-				// need a minimum 3 chars "+[I"
-				if (start >= string.length - 2) {
-					throw new IllegalArgumentException();
-				}
-				break;
-			default :
-				// must start in "+/-"
-				throw new IllegalArgumentException();
-
-		}
-		c = string[++start];
-		switch (c) {
-			case Signature.C_CAPTURE :
-				return scanCaptureTypeSignature(string, start);
-			case Signature.C_SUPER :
-			case Signature.C_EXTENDS :
-				return scanTypeBoundSignature(string, start);
-			case Signature.C_RESOLVED :
-			case Signature.C_UNRESOLVED :
-				return scanClassTypeSignature(string, start);
-			case Signature.C_TYPE_VARIABLE :
-				return scanTypeVariableSignature(string, start);
-			case Signature.C_ARRAY :
-				return scanArrayTypeSignature(string, start);
-			case Signature.C_STAR :
-				return start;
-			default :
-				throw new IllegalArgumentException();
-		}
-	}
-
-	/**
-	 * Scans the given string for a list of type argument signatures starting at
-	 * the given index and returns the index of the last character.
-	 * <pre>
-	 * TypeArgumentSignatures:
-	 *     <b><</b> TypeArgumentSignature* <b>></b>
-	 * </pre>
-	 * Note that although there is supposed to be at least one type argument, there
-	 * is no syntactic ambiguity if there are none. This method will accept zero
-	 * type argument signatures without complaint.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a list of type arguments
-	 * signatures
-	 */
-	public static int scanTypeArgumentSignatures(char[] string, int start) {
-		// need a minimum 2 char "<>"
-		if (start >= string.length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != Signature.C_GENERIC_START) {
-			throw new IllegalArgumentException();
-		}
-		int p = start + 1;
-		while (true) {
-			if (p >= string.length) {
-				throw new IllegalArgumentException();
-			}
-			c = string[p];
-			if (c == Signature.C_GENERIC_END) {
-				return p;
-			}
-			int e = scanTypeArgumentSignature(string, p);
-			p = e + 1;
-		}
-	}
-
-	/**
-	 * Scans the given string for a type argument signature starting at the given
-	 * index and returns the index of the last character.
-	 * <pre>
-	 * TypeArgumentSignature:
-	 *     <b>*</b>
-	 *  |  <b>+</b> TypeSignature
-	 *  |  <b>-</b> TypeSignature
-	 *  |  TypeSignature
-	 * </pre>
-	 * Note that although base types are not allowed in type arguments, there is
-	 * no syntactic ambiguity. This method will accept them without complaint.
-	 *
-	 * @param string the signature string
-	 * @param start the 0-based character index of the first character
-	 * @return the 0-based character index of the last character
-	 * @exception IllegalArgumentException if this is not a type argument signature
-	 */
-	public static int scanTypeArgumentSignature(char[] string, int start) {
-		// need a minimum 1 char
-		if (start >= string.length) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		switch (c) {
-			case Signature.C_STAR :
-				return start;
-			case Signature.C_EXTENDS :
-			case Signature.C_SUPER :
-				return scanTypeBoundSignature(string, start);
-			default :
-				return scanTypeSignature(string, start);
-		}
-	}
-
-	static void appendTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
-		char c = string[start];
-		switch (c) {
-			case Signature.C_ARRAY :
-				appendArrayTypeSignature(string, start, buffer, compact);
-				break;
-			case Signature.C_RESOLVED :
-				appendClassTypeSignature(string, start, buffer, compact);
-				break;
-			case Signature.C_TYPE_VARIABLE :
-				int e = scanTypeVariableSignature(string, start);
-				buffer.append(string, start + 1, e - start - 1);
-				break;
-			case Signature.C_BOOLEAN :
-				buffer.append(BOOLEAN);
-				break;
-			case Signature.C_BYTE :
-				buffer.append(BYTE);
-				break;
-			case Signature.C_CHAR :
-				buffer.append(CHAR);
-				break;
-			case Signature.C_DOUBLE :
-				buffer.append(DOUBLE);
-				break;
-			case Signature.C_FLOAT :
-				buffer.append(FLOAT);
-				break;
-			case Signature.C_INT :
-				buffer.append(INT);
-				break;
-			case Signature.C_LONG :
-				buffer.append(LONG);
-				break;
-			case Signature.C_SHORT :
-				buffer.append(SHORT);
-				break;
-			case Signature.C_VOID :
-				buffer.append(VOID);
-				break;
-		}
-	}
-
-	private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
-		int length = string.length;
-		// need a minimum 2 char
-		if (start >= length - 1) {
-			throw new IllegalArgumentException();
-		}
-		char c = string[start];
-		if (c != Signature.C_ARRAY) {
-			throw new IllegalArgumentException();
-		}
-
-		int index = start;
-		c = string[++index];
-		while (c == Signature.C_ARRAY) {
-			// need a minimum 2 char
-			if (index >= length - 1) {
-				throw new IllegalArgumentException();
-			}
-			c = string[++index];
-		}
-
-		appendTypeSignature(string, index, buffer, compact);
-
-		for (int i = 0, dims = index - start; i < dims; i++) {
-			buffer.append('[').append(']');
-		}
-	}
-
-	private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
-		char c = string[start];
-		if (c != Signature.C_RESOLVED) {
-			return;
-		}
-		int p = start + 1;
-		int checkpoint = buffer.length();
-		while (true) {
-			c = string[p];
-			switch (c) {
-				case Signature.C_SEMICOLON :
-					// all done
-					return;
-				case Signature.C_DOT :
-				case '/' :
-					// erase package prefix
-					if (compact) {
-						buffer.setLength(checkpoint);
-					} else {
-						buffer.append('.');
-					}
-					break;
-				case Signature.C_DOLLAR :
-					/**
-					 * Convert '$' in resolved type signatures into '.'.
-					 * NOTE: This assumes that the type signature is an inner type
-					 * signature. This is true in most cases, but someone can define a
-					 * non-inner type name containing a '$'.
-					 */
-					buffer.append('.');
-					break;
-				default :
-					buffer.append(c);
-			}
-			p++;
-		}
-	}
-
-	public static String toString(char[] declaringClass, char[] methodName, char[] methodSignature, boolean includeReturnType, boolean compact) {
-		final boolean isConstructor = Arrays.equals(methodName, INIT);
-		int firstParen = CharOperation.indexOf(Signature.C_PARAM_START, methodSignature);
-		if (firstParen == -1) {
-			return ""; //$NON-NLS-1$
-		}
-
-		StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
-
-		// decode declaring class name
-		// it can be either an array signature or a type signature
-		if (declaringClass.length > 0) {
-			char[] declaringClassSignature = null;
-			if (declaringClass[0] == Signature.C_ARRAY) {
-				CharOperation.replace(declaringClass, '/', '.');
-				declaringClassSignature = Signature.toCharArray(declaringClass);
-			} else {
-				CharOperation.replace(declaringClass, '/', '.');
-				declaringClassSignature = declaringClass;
-			}
-			int lastIndexOfSlash = CharOperation.lastIndexOf('.', declaringClassSignature);
-			if (compact && lastIndexOfSlash != -1) {
-				buffer.append(declaringClassSignature, lastIndexOfSlash + 1, declaringClassSignature.length - lastIndexOfSlash - 1);
-			} else {
-				buffer.append(declaringClassSignature);
-			}
-		}
-
-		// selector
-		if (!isConstructor) {
-			buffer.append('.');
-			if (methodName != null) {
-				buffer.append(methodName);
-			}
-		}
-
-		// parameters
-		buffer.append('(');
-		char[][] pts = Signature.getParameterTypes(methodSignature);
-		for (int i = 0, max = pts.length; i < max; i++) {
-			appendTypeSignature(pts[i], 0, buffer, compact);
-			if (i != pts.length - 1) {
-				buffer.append(',');
-				buffer.append(' ');
-			}
-		}
-		buffer.append(')');
-
-		if (!isConstructor) {
-			buffer.append(" : "); //$NON-NLS-1$
-			// return type
-			if (includeReturnType) {
-				char[] rts = Signature.getReturnType(methodSignature);
-				appendTypeSignature(rts, 0, buffer, compact);
-			}
-		}
-		return String.valueOf(buffer);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Annotation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Annotation.java
new file mode 100644
index 0000000..db3fea4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Annotation.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class Annotation extends ClassFileStruct {
+
+	private static final AnnotationComponent[] NO_ENTRIES = new AnnotationComponent[0];
+
+	private int typeIndex;
+	private char[] typeName;
+	private int componentsNumber;
+	private AnnotationComponent[] components;
+	private int readOffset;
+
+	/**
+	 * Constructor for Annotation.
+	 *
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public Annotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+
+		final int index = u2At(classFileBytes, 0, offset);
+		this.typeIndex = index;
+		if (index != 0) {
+			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.typeName = constantPoolEntry.getUtf8Value();
+		} else {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		final int length = u2At(classFileBytes, 2, offset);
+		this.componentsNumber = length;
+		this.readOffset = 4;
+		if (length != 0) {
+			this.components = new AnnotationComponent[length];
+			for (int i = 0; i < length; i++) {
+				AnnotationComponent component = new AnnotationComponent(classFileBytes, constantPool, offset + this.readOffset);
+				this.components[i] = component;
+				this.readOffset += component.sizeInBytes();
+			}
+		} else {
+			this.components = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeIndex()
+	 */
+	public int getTypeIndex() {
+		return this.typeIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponentsNumber()
+	 */
+	public int getComponentsNumber() {
+		return this.componentsNumber;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponents()
+	 */
+	public AnnotationComponent[] getComponents() {
+		return this.components;
+	}
+
+	int sizeInBytes() {
+		return this.readOffset;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeName()
+	 */
+	public char[] getTypeName() {
+		return this.typeName;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponent.java
new file mode 100644
index 0000000..7a1922d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponent.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class AnnotationComponent extends ClassFileStruct {
+
+	private int componentNameIndex;
+	private char[] componentName;
+	private AnnotationComponentValue componentValue;
+	private int readOffset;
+
+	public AnnotationComponent(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		final int nameIndex = u2At(classFileBytes, 0, offset);
+		this.componentNameIndex = nameIndex;
+		if (nameIndex != 0) {
+			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(nameIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.componentName = constantPoolEntry.getUtf8Value();
+		}
+		this.readOffset = 2;
+		AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
+		this.componentValue = value;
+		this.readOffset += value.sizeInBytes();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentNameIndex()
+	 */
+	public int getComponentNameIndex() {
+		return this.componentNameIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentName()
+	 */
+	public char[] getComponentName() {
+		return this.componentName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponent#getComponentValue()
+	 */
+	public AnnotationComponentValue getComponentValue() {
+		return this.componentValue;
+	}
+
+	int sizeInBytes() {
+		return this.readOffset;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponentValue.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponentValue.java
new file mode 100644
index 0000000..74a2644
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationComponentValue.java
@@ -0,0 +1,277 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class AnnotationComponentValue extends ClassFileStruct {
+	/**
+	 * Tag value for a constant of type <code>byte</code>
+	 * @since 3.1
+	 */
+	public static final int BYTE_TAG = 'B';
+	/**
+	 * Tag value for a constant of type <code>char</code>
+	 * @since 3.1
+	 */
+	public static final int CHAR_TAG = 'C';
+	/**
+	 * Tag value for a constant of type <code>double</code>
+	 * @since 3.1
+	 */
+	public static final int DOUBLE_TAG = 'D';
+	/**
+	 * Tag value for a constant of type <code>float</code>
+	 * @since 3.1
+	 */
+	public static final int FLOAT_TAG = 'F';
+	/**
+	 * Tag value for a constant of type <code>int</code>
+	 * @since 3.1
+	 */
+	public static final int INTEGER_TAG = 'I';
+	/**
+	 * Tag value for a constant of type <code>long</code>
+	 * @since 3.1
+	 */
+	public static final int LONG_TAG = 'J';
+	/**
+	 * Tag value for a constant of type <code>short</code>
+	 * @since 3.1
+	 */
+	public static final int SHORT_TAG = 'S';
+	/**
+	 * Tag value for a constant of type <code>boolean</code>
+	 * @since 3.1
+	 */
+	public static final int BOOLEAN_TAG = 'Z';
+	/**
+	 * Tag value for a constant of type <code>java.lang.String</code>
+	 * @since 3.1
+	 */
+	public static final int STRING_TAG = 's';
+	/**
+	 * Tag value for a value that represents an enum constant
+	 * @since 3.1
+	 */
+	public static final int ENUM_TAG = 'e';
+	/**
+	 * Tag value for a value that represents a class
+	 * @since 3.1
+	 */
+	public static final int CLASS_TAG = 'c';
+	/**
+	 * Tag value for a value that represents an annotation
+	 * @since 3.1
+	 */
+	public static final int ANNOTATION_TAG = '@';
+	/**
+	 * Tag value for a value that represents an array
+	 * @since 3.1
+	 */
+	public static final int ARRAY_TAG = '[';
+
+	private static final AnnotationComponentValue[] NO_VALUES = new AnnotationComponentValue[0];
+
+	private AnnotationComponentValue[] annotationComponentValues;
+	private Annotation annotationValue;
+	private ConstantPoolEntry classInfo;
+	private int classFileInfoIndex;
+	private ConstantPoolEntry constantValue;
+	private int constantValueIndex;
+	private int enumConstantTypeNameIndex;
+	private int enumConstantNameIndex;
+	private char[] enumConstantTypeName;
+	private char[] enumConstantName;
+
+	private int readOffset;
+	private int tag;
+	private int valuesNumber;
+
+	public AnnotationComponentValue(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		this.classFileInfoIndex = -1;
+		this.constantValueIndex = -1;
+		this.enumConstantTypeNameIndex = -1;
+		this.enumConstantNameIndex = -1;
+		final int t = u1At(classFileBytes, 0, offset);
+		this.tag = t;
+		this.readOffset = 1;
+		switch (t) {
+			case 'B' :
+			case 'C' :
+			case 'D' :
+			case 'F' :
+			case 'I' :
+			case 'J' :
+			case 'S' :
+			case 'Z' :
+			case 's' :
+				final int constantIndex = u2At(classFileBytes, this.readOffset, offset);
+				this.constantValueIndex = constantIndex;
+				if (constantIndex != 0) {
+					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(constantIndex);
+					switch (constantPoolEntry.getKind()) {
+						case ConstantPoolConstant.CONSTANT_Long :
+						case ConstantPoolConstant.CONSTANT_Float :
+						case ConstantPoolConstant.CONSTANT_Double :
+						case ConstantPoolConstant.CONSTANT_Integer :
+						case ConstantPoolConstant.CONSTANT_Utf8 :
+							break;
+						default :
+							throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					this.constantValue = constantPoolEntry;
+				}
+				this.readOffset += 2;
+				break;
+			case 'e' :
+				int index = u2At(classFileBytes, this.readOffset, offset);
+				this.enumConstantTypeNameIndex = index;
+				if (index != 0) {
+					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					this.enumConstantTypeName = constantPoolEntry.getUtf8Value();
+				}
+				this.readOffset += 2;
+				index = u2At(classFileBytes, this.readOffset, offset);
+				this.enumConstantNameIndex = index;
+				if (index != 0) {
+					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					this.enumConstantName = constantPoolEntry.getUtf8Value();
+				}
+				this.readOffset += 2;
+				break;
+			case 'c' :
+				final int classFileIndex = u2At(classFileBytes, this.readOffset, offset);
+				this.classFileInfoIndex = classFileIndex;
+				if (classFileIndex != 0) {
+					ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(classFileIndex);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					this.classInfo = constantPoolEntry;
+				}
+				this.readOffset += 2;
+				break;
+			case '@' :
+				Annotation annotation = new Annotation(classFileBytes, constantPool, this.readOffset + offset);
+				this.annotationValue = annotation;
+				this.readOffset += annotation.sizeInBytes();
+				break;
+			case '[' :
+				final int numberOfValues = u2At(classFileBytes, this.readOffset, offset);
+				this.valuesNumber = numberOfValues;
+				this.readOffset += 2;
+				if (numberOfValues != 0) {
+					this.annotationComponentValues = new AnnotationComponentValue[numberOfValues];
+					for (int i = 0; i < numberOfValues; i++) {
+						AnnotationComponentValue value = new AnnotationComponentValue(classFileBytes, constantPool, offset + this.readOffset);
+						this.annotationComponentValues[i] = value;
+						this.readOffset += value.sizeInBytes();
+					}
+				} else {
+					this.annotationComponentValues = NO_VALUES;
+				}
+				break;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationComponentValues()
+	 */
+	public AnnotationComponentValue[] getAnnotationComponentValues() {
+		return this.annotationComponentValues;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getAnnotationValue()
+	 */
+	public Annotation getAnnotationValue() {
+		return this.annotationValue;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfo()
+	 */
+	public ConstantPoolEntry getClassInfo() {
+		return this.classInfo;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getClassInfoIndex()
+	 */
+	public int getClassInfoIndex() {
+		return this.classFileInfoIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValue()
+	 */
+	public ConstantPoolEntry getConstantValue() {
+		return this.constantValue;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getConstantValueIndex()
+	 */
+	public int getConstantValueIndex() {
+		return this.constantValueIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantName()
+	 */
+	public char[] getEnumConstantName() {
+		return this.enumConstantName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantNameIndex()
+	 */
+	public int getEnumConstantNameIndex() {
+		return this.enumConstantNameIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeName()
+	 */
+	public char[] getEnumConstantTypeName() {
+		return this.enumConstantTypeName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getEnumConstantTypeNameIndex()
+	 */
+	public int getEnumConstantTypeNameIndex() {
+		return this.enumConstantTypeNameIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getTag()
+	 */
+	public int getTag() {
+		return this.tag;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationComponentValue#getValuesNumber()
+	 */
+	public int getValuesNumber() {
+		return this.valuesNumber;
+	}
+
+	int sizeInBytes() {
+		return this.readOffset;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationDefaultAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationDefaultAttribute.java
new file mode 100644
index 0000000..638adb1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AnnotationDefaultAttribute.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class AnnotationDefaultAttribute extends ClassFileAttribute {
+
+	private AnnotationComponentValue memberValue;
+
+	/**
+	 * Constructor for AnnotationDefaultAttribute.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public AnnotationDefaultAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.memberValue = new AnnotationComponentValue(classFileBytes, constantPool, offset + 6);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotationDefaultAttribute#getMemberValue()
+	 */
+	public AnnotationComponentValue getMemberValue() {
+		return this.memberValue;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AttributeNamesConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AttributeNamesConstants.java
new file mode 100644
index 0000000..f4d03fc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/AttributeNamesConstants.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public interface AttributeNamesConstants {
+	/*
+	 * "Synthetic" attribute.
+	 * <p>Note that prior to JDK 1.5, synthetic elements were always marked
+	 * using an attribute; with 1.5, synthetic elements can also be marked
+	 * using the {@link IModifierConstants#ACC_SYNTHETIC} flag.
+	 * </p>
+	 * @since 2.0
+	 */
+	char[] SYNTHETIC = "Synthetic".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "ConstantValue" attribute.
+	 * @since 2.0
+	 */
+	char[] CONSTANT_VALUE = "ConstantValue".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "LineNumberTable" attribute.
+	 * @since 2.0
+	 */
+	char[] LINE_NUMBER = "LineNumberTable".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "LocalVariableTable" attribute.
+	 * @since 2.0
+	 */
+	char[] LOCAL_VARIABLE = "LocalVariableTable".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "InnerClasses" attribute.
+	 * @since 2.0
+	 */
+	char[] INNER_CLASSES = "InnerClasses".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "Code" attribute.
+	 * @since 2.0
+	 */
+	char[] CODE = "Code".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "Exceptions" attribute.
+	 * @since 2.0
+	 */
+	char[] EXCEPTIONS = "Exceptions".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "SourceFile" attribute.
+	 * @since 2.0
+	 */
+	char[] SOURCE = "SourceFile".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "Deprecated" attribute.
+	 * @since 2.0
+	 */
+	char[] DEPRECATED = "Deprecated".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "Signature" attribute (added in J2SE 1.5).
+	 * Class file readers which support J2SE 1.5 return
+	 * attributes with this name represented by objects
+	 * implementing {@link ISignatureAttribute}.
+	 * @since 3.0
+	 */
+	char[] SIGNATURE = "Signature".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "EnclosingMethod" attribute (added in J2SE 1.5).
+	 * Class file readers which support J2SE 1.5 return
+	 * attributes with this name represented by objects
+	 * implementing {@link IEnclosingMethodAttribute}.
+	 * @since 3.0
+	 */
+	char[] ENCLOSING_METHOD = "EnclosingMethod".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "LocalVariableTypeTable" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] LOCAL_VARIABLE_TYPE_TABLE = "LocalVariableTypeTable".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "RuntimeVisibleAnnotations" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] RUNTIME_VISIBLE_ANNOTATIONS = "RuntimeVisibleAnnotations".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "RuntimeInvisibleAnnotations" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] RUNTIME_INVISIBLE_ANNOTATIONS = "RuntimeInvisibleAnnotations".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "RuntimeVisibleParameterAnnotations" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = "RuntimeVisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "RuntimeInvisibleParameterAnnotations" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = "RuntimeInvisibleParameterAnnotations".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "AnnotationDefault" attribute (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	char[] ANNOTATION_DEFAULT = "AnnotationDefault".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "StackMapTable" attribute (added in J2SE 1.6).
+	 * @since 3.2
+	 */
+	char[] STACK_MAP_TABLE = "StackMapTable".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "StackMap" attribute (added in cldc1.0).
+	 * @since 3.2
+	 */
+	char[] STACK_MAP = "StackMap".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * "Varargs" attribute (unspecified).
+	 */
+	char[] VAR_ARGS = "Varargs".toCharArray(); //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CharOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CharOperation.java
new file mode 100644
index 0000000..246c66d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CharOperation.java
@@ -0,0 +1,602 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public final class CharOperation {
+	public static final char[] This = "this".toCharArray(); //$NON-NLS-1$
+
+	public static final char[] JAVA_LANG_ANNOTATION_DOCUMENTED = "Ljava/lang/annotation/Documented;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_ANNOTATION_ELEMENTTYPE = "Ljava/lang/annotation/ElementType;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_ANNOTATION_RETENTION = "Ljava/lang/annotation/Retention;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = "Ljava/lang/annotation/RetentionPolicy;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_ANNOTATION_TARGET = "Ljava/lang/annotation/Target;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_DEPRECATED = "Ljava/lang/Deprecated;".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_ANNOTATION_INHERITED = "Ljava/lang/annotation/Inherited;".toCharArray(); //$NON-NLS-1$
+	/**
+	 * Constant for an empty char array
+	 */
+	public static final char[] NO_CHAR = new char[0];
+
+	/**
+	 * Constant for an empty char array with two dimensions.
+	 */
+	public static final char[][] NO_CHAR_CHAR = new char[0][];
+
+	/**
+	 * Answers a hashcode for the array
+	 *
+	 * @param array the array for which a hashcode is required
+	 * @return the hashcode
+	 * @throws NullPointerException if array is null
+	 */
+	public static final int hashCode(char[] array) {
+		int length = array.length;
+		int hash = length == 0 ? 31 : array[0];
+		if (length < 8) {
+			for (int i = length; --i > 0;)
+				hash = (hash * 31) + array[i];
+		} else {
+			// 8 characters is enough to compute a decent hash code, don't waste time examining every character
+			for (int i = length - 1, last = i > 16 ? i - 16 : 0; i > last; i -= 2)
+				hash = (hash * 31) + array[i];
+		}
+		return hash & 0x7FFFFFFF;
+	}
+
+	/**
+	 * Answers the last index in the array for which the corresponding character is
+	 * equal to toBeFound starting from the end of the array.
+	 * Answers -1 if no occurrence of this character is found.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    toBeFound = 'c'
+	 *    array = { ' a', 'b', 'c', 'd' , 'c', 'e' }
+	 *    result => 4
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    toBeFound = 'e'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    result => -1
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param toBeFound the character to search
+	 * @param array the array to be searched
+	 * @return the last index in the array for which the corresponding character is
+	 * equal to toBeFound starting from the end of the array, -1 otherwise
+	 * @throws NullPointerException if array is null
+	 */
+	public static final int lastIndexOf(char toBeFound, char[] array) {
+		for (int i = array.length; --i >= 0;)
+			if (toBeFound == array[i])
+				return i;
+		return -1;
+	}
+
+	/**
+	 * Return a new array which is the split of the given array using the given divider.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    divider = 'b'
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    result => { { 'a' }, {  }, { 'a' }, { 'a' } }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    divider = 'c'
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    result => { { 'a', 'b', 'b', 'a', 'b', 'a' } }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    divider = 'c'
+	 *    array = { ' ', ' ', 'a' , 'b', 'b', 'a', 'b', 'a', ' ' }
+	 *    result => { { ' ', 'a', 'b', 'b', 'a', 'b', 'a', ' ' } }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param divider the given divider
+	 * @param array the given array
+	 * @return a new array which is the split of the given array using the given divider
+	 */
+	public static final char[][] splitOn(char divider, char[] array) {
+		int length = array == null ? 0 : array.length;
+		if (length == 0)
+			return NO_CHAR_CHAR;
+
+		int wordCount = 1;
+		for (int i = 0; i < length; i++)
+			if (array[i] == divider)
+				wordCount++;
+		char[][] split = new char[wordCount][];
+		int last = 0, currentWord = 0;
+		for (int i = 0; i < length; i++) {
+			if (array[i] == divider) {
+				split[currentWord] = new char[i - last];
+				System.arraycopy(array, last, split[currentWord++], 0, i - last);
+				last = i + 1;
+			}
+		}
+		split[currentWord] = new char[length - last];
+		System.arraycopy(array, last, split[currentWord], 0, length - last);
+		return split;
+	}
+
+	/**
+	 * Answers the first index in the array for which the corresponding character is
+	 * equal to toBeFound starting the search at index start.
+	 * Answers -1 if no occurrence of this character is found.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    toBeFound = 'c'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    start = 2
+	 *    result => 2
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    toBeFound = 'c'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    start = 3
+	 *    result => -1
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    toBeFound = 'e'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    start = 1
+	 *    result => -1
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param toBeFound the character to search
+	 * @param array the array to be searched
+	 * @param start the starting index
+	 * @return the first index in the array for which the corresponding character is
+	 * equal to toBeFound, -1 otherwise
+	 * @throws NullPointerException if array is null
+	 * @throws ArrayIndexOutOfBoundsException if  start is lower than 0
+	 */
+	public static final int indexOf(char toBeFound, char[] array, int start) {
+		for (int i = start; i < array.length; i++)
+			if (toBeFound == array[i])
+				return i;
+		return -1;
+	}
+
+	/**
+	 * Answers a new array with prepending the prefix character and appending the suffix
+	 * character at the end of the array. If array is null, it answers a new array containing the
+	 * prefix and the suffix characters.
+	 * <br>
+	 * <br>
+	 * For example:<br>
+	 * <ol>
+	 * <li><pre>
+	 *    prefix = 'a'
+	 *    array = { 'b' }
+	 *    suffix = 'c'
+	 *    => result = { 'a', 'b' , 'c' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    prefix = 'a'
+	 *    array = null
+	 *    suffix = 'c'
+	 *    => result = { 'a', 'c' }
+	 * </pre></li>
+	 * </ol>
+	 *
+	 * @param prefix the prefix character
+	 * @param array the array that is concatenated with the prefix and suffix characters
+	 * @param suffix the suffix character
+	 * @return the new array
+	 */
+	public static final char[] concat(char prefix, char[] array, char suffix) {
+		if (array == null)
+			return new char[] {prefix, suffix};
+
+		int length = array.length;
+		char[] result = new char[length + 2];
+		result[0] = prefix;
+		System.arraycopy(array, 0, result, 1, length);
+		result[length + 1] = suffix;
+		return result;
+	}
+
+	/**
+	 * Answers the concatenation of the three arrays. It answers null if the three arrays are null.
+	 * If first is null, it answers the concatenation of second and third.
+	 * If second is null, it answers the concatenation of first and third.
+	 * If third is null, it answers the concatenation of first and second.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    first = null
+	 *    second = { 'a' }
+	 *    third = { 'b' }
+	 *    => result = { ' a', 'b' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = { 'a' }
+	 *    second = null
+	 *    third = { 'b' }
+	 *    => result = { ' a', 'b' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = { 'a' }
+	 *    second = { 'b' }
+	 *    third = null
+	 *    => result = { ' a', 'b' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = null
+	 *    second = null
+	 *    third = null
+	 *    => result = null
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = { 'a' }
+	 *    second = { 'b' }
+	 *    third = { 'c' }
+	 *    => result = { 'a', 'b', 'c' }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param first the first array to concatenate
+	 * @param second the second array to concatenate
+	 * @param third the third array to concatenate
+	 *
+	 * @return the concatenation of the three arrays, or null if the three arrays are null.
+	 */
+	public static final char[] concat(char[] first, char[] second, char[] third) {
+		if (first == null)
+			return concat(second, third);
+		if (second == null)
+			return concat(first, third);
+		if (third == null)
+			return concat(first, second);
+
+		int length1 = first.length;
+		int length2 = second.length;
+		int length3 = third.length;
+		char[] result = new char[length1 + length2 + length3];
+		System.arraycopy(first, 0, result, 0, length1);
+		System.arraycopy(second, 0, result, length1, length2);
+		System.arraycopy(third, 0, result, length1 + length2, length3);
+		return result;
+	}
+
+	/**
+	 * Answers the concatenation of the two arrays. It answers null if the two arrays are null.
+	 * If the first array is null, then the second array is returned.
+	 * If the second array is null, then the first array is returned.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    first = null
+	 *    second = { 'a' }
+	 *    => result = { ' a' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = { ' a' }
+	 *    second = null
+	 *    => result = { ' a' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    first = { ' a' }
+	 *    second = { ' b' }
+	 *    => result = { ' a' , ' b' }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param first the first array to concatenate
+	 * @param second the second array to concatenate
+	 * @return the concatenation of the two arrays, or null if the two arrays are null.
+	 */
+	public static final char[] concat(char[] first, char[] second) {
+		if (first == null)
+			return second;
+		if (second == null)
+			return first;
+
+		int length1 = first.length;
+		int length2 = second.length;
+		char[] result = new char[length1 + length2];
+		System.arraycopy(first, 0, result, 0, length1);
+		System.arraycopy(second, 0, result, length1, length2);
+		return result;
+	}
+
+	/**
+	 * Replace all occurrence of the character to be replaced with the replacement character in the
+	 * given array.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    toBeReplaced = 'b'
+	 *    replacementChar = 'a'
+	 *    result => No returned value, but array is now equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    toBeReplaced = 'c'
+	 *    replacementChar = 'a'
+	 *    result => No returned value, but array is now equals to { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param array the given array
+	 * @param toBeReplaced the character to be replaced
+	 * @param replacementChar the replacement character
+	 * @throws NullPointerException if the given array is null
+	 */
+	public static final void replace(char[] array, char toBeReplaced, char replacementChar) {
+		if (toBeReplaced != replacementChar) {
+			for (int i = 0, max = array.length; i < max; i++) {
+				if (array[i] == toBeReplaced)
+					array[i] = replacementChar;
+			}
+		}
+	}
+
+	/**
+	 * Replace all occurrence of the character to be replaced with the replacement character
+	 * in a copy of the given array. Returns the given array if no occurrences of the character
+	 * to be replaced are found.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    toBeReplaced = 'b'
+	 *    replacementChar = 'a'
+	 *    result => A new array that is equals to { 'a' , 'a', 'a', 'a', 'a', 'a' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    toBeReplaced = 'c'
+	 *    replacementChar = 'a'
+	 *    result => The original array that remains unchanged.
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param array the given array
+	 * @param toBeReplaced the character to be replaced
+	 * @param replacementChar the replacement character
+	 * @throws NullPointerException if the given array is null
+	 * @since 3.1
+	 */
+	public static final char[] replaceOnCopy(char[] array, char toBeReplaced, char replacementChar) {
+
+		char[] result = null;
+		for (int i = 0, length = array.length; i < length; i++) {
+			char c = array[i];
+			if (c == toBeReplaced) {
+				if (result == null) {
+					result = new char[length];
+					System.arraycopy(array, 0, result, 0, i);
+				}
+				result[i] = replacementChar;
+			} else if (result != null) {
+				result[i] = c;
+			}
+		}
+		if (result == null)
+			return array;
+		return result;
+	}
+
+	/**
+	 * Answers the first index in the array for which the corresponding character is
+	 * equal to toBeFound. Answers -1 if no occurrence of this character is found.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    toBeFound = 'c'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    result => 2
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    toBeFound = 'e'
+	 *    array = { ' a', 'b', 'c', 'd' }
+	 *    result => -1
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param toBeFound the character to search
+	 * @param array the array to be searched
+	 * @return the first index in the array for which the corresponding character is
+	 * equal to toBeFound, -1 otherwise
+	 * @throws NullPointerException if array is null
+	 */
+	public static final int indexOf(char toBeFound, char[] array) {
+		return indexOf(toBeFound, array, 0);
+	}
+
+	/**
+	 * Answers a new array which is a copy of the given array starting at the given start and
+	 * ending at the given end. The given start is inclusive and the given end is exclusive.
+	 * Answers null if start is greater than end, if start is lower than 0 or if end is greater
+	 * than the length of the given array. If end  equals -1, it is converted to the array length.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    array = { 'a' , 'b' }
+	 *    start = 0
+	 *    end = 1
+	 *    result => { 'a' }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    array = { 'a', 'b' }
+	 *    start = 0
+	 *    end = -1
+	 *    result => { 'a' , 'b' }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param array the given array
+	 * @param start the given starting index
+	 * @param end the given ending index
+	 * @return a new array which is a copy of the given array starting at the given start and
+	 * ending at the given end
+	 * @throws NullPointerException if the given array is null
+	 */
+	public static final char[] subarray(char[] array, int start, int end) {
+		if (end == -1)
+			end = array.length;
+		if (start > end)
+			return null;
+		if (start < 0)
+			return null;
+		if (end > array.length)
+			return null;
+
+		char[] result = new char[end - start];
+		System.arraycopy(array, start, result, 0, end - start);
+		return result;
+	}
+
+	/**
+	 * Answers a new array which is a copy of the given array starting at the given start and
+	 * ending at the given end. The given start is inclusive and the given end is exclusive.
+	 * Answers null if start is greater than end, if start is lower than 0 or if end is greater
+	 * than the length of the given array. If end  equals -1, it is converted to the array length.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    array = { { 'a' } , { 'b' } }
+	 *    start = 0
+	 *    end = 1
+	 *    result => { { 'a' } }
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    array = { { 'a' } , { 'b' } }
+	 *    start = 0
+	 *    end = -1
+	 *    result => { { 'a' }, { 'b' } }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param array the given array
+	 * @param start the given starting index
+	 * @param end the given ending index
+	 * @return a new array which is a copy of the given array starting at the given start and
+	 * ending at the given end
+	 * @throws NullPointerException if the given array is null
+	 */
+	public static final char[][] subarray(char[][] array, int start, int end) {
+		if (end == -1)
+			end = array.length;
+		if (start > end)
+			return null;
+		if (start < 0)
+			return null;
+		if (end > array.length)
+			return null;
+
+		char[][] result = new char[end - start][];
+		System.arraycopy(array, start, result, 0, end - start);
+		return result;
+	}
+
+	/**
+	 * Return a new array which is the split of the given array using the given divider. The given end
+	 * is exclusive and the given start is inclusive.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    divider = 'b'
+	 *    array = { 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    start = 2
+	 *    end = 5
+	 *    result => { {  }, { 'a' }, {  } }
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param divider the given divider
+	 * @param array the given array
+	 * @param start the given starting index
+	 * @param end the given ending index
+	 * @return a new array which is the split of the given array using the given divider
+	 * @throws ArrayIndexOutOfBoundsException if start is lower than 0 or end is greater than the array length
+	 */
+	public static final char[][] splitOn(char divider, char[] array, int start, int end) {
+		int length = array == null ? 0 : array.length;
+		if (length == 0 || start > end)
+			return NO_CHAR_CHAR;
+
+		int wordCount = 1;
+		for (int i = start; i < end; i++)
+			if (array[i] == divider)
+				wordCount++;
+		char[][] split = new char[wordCount][];
+		int last = start, currentWord = 0;
+		for (int i = start; i < end; i++) {
+			if (array[i] == divider) {
+				split[currentWord] = new char[i - last];
+				System.arraycopy(array, last, split[currentWord++], 0, i - last);
+				last = i + 1;
+			}
+		}
+		split[currentWord] = new char[end - last];
+		System.arraycopy(array, last, split[currentWord], 0, end - last);
+		return split;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileAttribute.java
new file mode 100644
index 0000000..bcc92e7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileAttribute.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ClassFileAttribute extends ClassFileStruct {
+	public static final ClassFileAttribute[] NO_ATTRIBUTES = new ClassFileAttribute[0];
+	private long attributeLength;
+	private int attributeNameIndex;
+	private char[] attributeName;
+
+	public ClassFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		this.attributeNameIndex = u2At(classFileBytes, 0, offset);
+		this.attributeLength = u4At(classFileBytes, 2, offset);
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.attributeNameIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.attributeName = constantPoolEntry.getUtf8Value();
+	}
+
+	public int getAttributeNameIndex() {
+		return this.attributeNameIndex;
+	}
+
+	/*
+	 * @see IClassFileAttribute#getAttributeName()
+	 */
+	public char[] getAttributeName() {
+		return this.attributeName;
+	}
+
+	/*
+	 * @see IClassFileAttribute#getAttributeLength()
+	 */
+	public long getAttributeLength() {
+		return this.attributeLength;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java
new file mode 100644
index 0000000..dea13cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileReader.java
@@ -0,0 +1,468 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.util.Arrays;
+
+public class ClassFileReader extends ClassFileStruct {
+	/*
+	 * This value should be used to read completely each part of a .class file.
+	 */
+	public static final int ALL = 0xFFFF;
+
+	/*
+	 * This value should be used to read only the constant pool entries of a .class file.
+	 */
+	public static final int CONSTANT_POOL = 0x0001;
+
+	/*
+	 * This value should be used to read the constant pool entries and
+	 * the method infos of a .class file.
+	 */
+	public static final int METHOD_INFOS = 0x0002 + CONSTANT_POOL;
+
+	/*
+	 * This value should be used to read the constant pool entries and
+	 * the field infos of a .class file.
+	 */
+	public static final int FIELD_INFOS = 0x0004 + CONSTANT_POOL;
+
+	/*
+	 * This value should be used to read the constant pool entries and
+	 * the super interface names of a .class file.
+	 */
+	public static final int SUPER_INTERFACES = 0x0008 + CONSTANT_POOL;
+
+	/*
+	 * This value should be used to read the constant pool entries and
+	 * the attributes of a .class file.
+	 */
+	public static final int CLASSFILE_ATTRIBUTES = 0x0010 + CONSTANT_POOL;
+
+	/*
+	 * This value should be used to read the method bodies.
+	 * It has to be used with METHOD_INFOS.
+	 */
+	public static final int METHOD_BODIES = 0x0020;
+
+	/*
+	 * This value should be used to read the whole contents of the .class file except the
+	 * method bodies.
+	 */
+	public static final int ALL_BUT_METHOD_BODIES = ALL & ~METHOD_BODIES;
+
+	private static final FieldInfo[] NO_FIELD_INFOS = new FieldInfo[0];
+	private static final char[][] NO_INTERFACES_NAMES = CharOperation.NO_CHAR_CHAR;
+	private static final MethodInfo[] NO_METHOD_INFOS = new MethodInfo[0];
+	private int accessFlags;
+	private ClassFileAttribute[] attributes;
+	private int attributesCount;
+	private char[] className;
+	private int classNameIndex;
+
+	private ConstantPool constantPool;
+	private FieldInfo[] fields;
+	private int fieldsCount;
+	private InnerClassesAttribute innerClassesAttribute;
+	private int[] interfaceIndexes;
+	private char[][] interfaceNames;
+	private int interfacesCount;
+	private int magicNumber;
+	private int majorVersion;
+	private MethodInfo[] methods;
+	private int methodsCount;
+	private int minorVersion;
+	private SourceFileAttribute sourceFileAttribute;
+	private char[] superclassName;
+	private int superclassNameIndex;
+
+	/*
+	 * Constructor for ClassFileReader.
+	 *
+	 * @param classFileBytes the raw bytes of the .class file
+	 * @param decodingFlags the decoding flags
+	 *
+	 * @see IClassFileReader#ALL
+	 * @see IClassFileReader#CLASSFILE_ATTRIBUTES
+	 * @see IClassFileReader#CONSTANT_POOL
+	 * @see IClassFileReader#FIELD_INFOS
+	 */
+	public ClassFileReader(byte[] classFileBytes, int decodingFlags) throws ClassFormatException {
+
+		// This method looks ugly but is actually quite simple, the constantPool is constructed
+		// in 3 passes.  All non-primitive constant pool members that usually refer to other members
+		// by index are tweaked to have their value in inst vars, this minor cost at read-time makes
+		// all subsequent uses of the constant pool element faster.
+		int constantPoolCount;
+		int[] constantPoolOffsets;
+		try {
+			this.magicNumber = (int) u4At(classFileBytes, 0, 0);
+			if (this.magicNumber != 0xCAFEBABE) {
+				throw new ClassFormatException(ClassFormatException.INVALID_MAGIC_NUMBER);
+			}
+
+			int readOffset = 10;
+			this.minorVersion = u2At(classFileBytes, 4, 0);
+			this.majorVersion = u2At(classFileBytes, 6, 0);
+
+			if ((decodingFlags & CONSTANT_POOL) == 0) {
+				// no need to go further
+				return;
+			}
+
+			constantPoolCount = u2At(classFileBytes, 8, 0);
+			// Pass #1 - Fill in all primitive constants
+			constantPoolOffsets = new int[constantPoolCount];
+			for (int i = 1; i < constantPoolCount; i++) {
+				int tag = u1At(classFileBytes, readOffset, 0);
+				switch (tag) {
+					case ConstantPoolConstant.CONSTANT_Utf8 :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += u2At(classFileBytes, readOffset + 1, 0);
+						readOffset += ConstantPoolConstant.CONSTANT_Utf8_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_Integer :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Integer_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_Float :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Float_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_Long :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Long_SIZE;
+						i++;
+						break;
+					case ConstantPoolConstant.CONSTANT_Double :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Double_SIZE;
+						i++;
+						break;
+					case ConstantPoolConstant.CONSTANT_Class :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Class_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_String :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_String_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_Fieldref :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Fieldref_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_Methodref :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_Methodref_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_InterfaceMethodref_SIZE;
+						break;
+					case ConstantPoolConstant.CONSTANT_NameAndType :
+						constantPoolOffsets[i] = readOffset;
+						readOffset += ConstantPoolConstant.CONSTANT_NameAndType_SIZE;
+						break;
+					default :
+						throw new ClassFormatException(ClassFormatException.INVALID_TAG_CONSTANT);
+				}
+			}
+
+			this.constantPool = new ConstantPool(classFileBytes, constantPoolOffsets);
+			// Read and validate access flags
+			this.accessFlags = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+
+			// Read the classname, use exception handlers to catch bad format
+			this.classNameIndex = u2At(classFileBytes, readOffset, 0);
+			this.className = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.classNameIndex);
+			readOffset += 2;
+
+			// Read the superclass name, can be zero for java.lang.Object
+			this.superclassNameIndex = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+			// if superclassNameIndex is equals to 0 there is no need to set a value for the
+			// field this.superclassName. null is fine.
+			if (this.superclassNameIndex != 0) {
+				this.superclassName = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.superclassNameIndex);
+			}
+
+			// Read the interfaces, use exception handlers to catch bad format
+			this.interfacesCount = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+			this.interfaceNames = NO_INTERFACES_NAMES;
+			this.interfaceIndexes = Utility.EMPTY_INT_ARRAY;
+			if (this.interfacesCount != 0) {
+				if ((decodingFlags & SUPER_INTERFACES) != CONSTANT_POOL) {
+					this.interfaceNames = new char[this.interfacesCount][];
+					this.interfaceIndexes = new int[this.interfacesCount];
+					for (int i = 0; i < this.interfacesCount; i++) {
+						this.interfaceIndexes[i] = u2At(classFileBytes, readOffset, 0);
+						this.interfaceNames[i] = getConstantClassNameAt(classFileBytes, constantPoolOffsets, this.interfaceIndexes[i]);
+						readOffset += 2;
+					}
+				} else {
+					readOffset += (2 * this.interfacesCount);
+				}
+			}
+			// Read the this.fields, use exception handlers to catch bad format
+			this.fieldsCount = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+			this.fields = NO_FIELD_INFOS;
+			if (this.fieldsCount != 0) {
+				if ((decodingFlags & FIELD_INFOS) != CONSTANT_POOL) {
+					FieldInfo field;
+					this.fields = new FieldInfo[this.fieldsCount];
+					for (int i = 0; i < this.fieldsCount; i++) {
+						field = new FieldInfo(classFileBytes, this.constantPool, readOffset);
+						this.fields[i] = field;
+						readOffset += field.sizeInBytes();
+					}
+				} else {
+					for (int i = 0; i < this.fieldsCount; i++) {
+						int attributeCountForField = u2At(classFileBytes, 6, readOffset);
+						readOffset += 8;
+						if (attributeCountForField != 0) {
+							for (int j = 0; j < attributeCountForField; j++) {
+								int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
+								readOffset += (6 + attributeLength);
+							}
+						}
+					}
+				}
+			}
+			// Read the this.methods
+			this.methodsCount = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+			this.methods = NO_METHOD_INFOS;
+			if (this.methodsCount != 0) {
+				if ((decodingFlags & METHOD_INFOS) != CONSTANT_POOL) {
+					this.methods = new MethodInfo[this.methodsCount];
+					MethodInfo method;
+					for (int i = 0; i < this.methodsCount; i++) {
+						method = new MethodInfo(classFileBytes, this.constantPool, readOffset, decodingFlags);
+						this.methods[i] = method;
+						readOffset += method.sizeInBytes();
+					}
+				} else {
+					for (int i = 0; i < this.methodsCount; i++) {
+						int attributeCountForMethod = u2At(classFileBytes, 6, readOffset);
+						readOffset += 8;
+						if (attributeCountForMethod != 0) {
+							for (int j = 0; j < attributeCountForMethod; j++) {
+								int attributeLength = (int) u4At(classFileBytes, 2, readOffset);
+								readOffset += (6 + attributeLength);
+							}
+						}
+					}
+				}
+			}
+
+			// Read the attributes
+			this.attributesCount = u2At(classFileBytes, readOffset, 0);
+			readOffset += 2;
+
+			int attributesIndex = 0;
+			this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
+			if (this.attributesCount != 0) {
+				if ((decodingFlags & CLASSFILE_ATTRIBUTES) != CONSTANT_POOL) {
+					this.attributes = new ClassFileAttribute[this.attributesCount];
+					for (int i = 0; i < this.attributesCount; i++) {
+						int utf8Offset = constantPoolOffsets[u2At(classFileBytes, readOffset, 0)];
+						char[] attributeName = utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
+						if (Arrays.equals(attributeName, AttributeNamesConstants.INNER_CLASSES)) {
+							this.innerClassesAttribute = new InnerClassesAttribute(classFileBytes, this.constantPool, readOffset);
+							this.attributes[attributesIndex++] = this.innerClassesAttribute;
+						} else if (Arrays.equals(attributeName, AttributeNamesConstants.SOURCE)) {
+							this.sourceFileAttribute = new SourceFileAttribute(classFileBytes, this.constantPool, readOffset);
+							this.attributes[attributesIndex++] = this.sourceFileAttribute;
+						} else if (Arrays.equals(attributeName, AttributeNamesConstants.ENCLOSING_METHOD)) {
+							this.attributes[attributesIndex++] = new EnclosingMethodAttribute(classFileBytes, this.constantPool, readOffset);
+						} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
+							this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, this.constantPool, readOffset);
+						} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
+							this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
+						} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
+							this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
+						} else {
+							this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, this.constantPool, readOffset);
+						}
+						readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
+					}
+				} else {
+					for (int i = 0; i < this.attributesCount; i++) {
+						readOffset += (6 + u4At(classFileBytes, readOffset + 2, 0));
+					}
+				}
+			}
+			if (readOffset != classFileBytes.length) {
+				throw new ClassFormatException(ClassFormatException.TOO_MANY_BYTES);
+			}
+		} catch (ClassFormatException e) {
+			throw e;
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new ClassFormatException(ClassFormatException.ERROR_TRUNCATED_INPUT);
+		}
+	}
+
+	/*
+	 * @see IClassFileReader#getAccessFlags()
+	 */
+	public int getAccessFlags() {
+		return this.accessFlags;
+	}
+
+	/*
+	 * @see IClassFileReader#getAttributeCount()
+	 */
+	public int getAttributeCount() {
+		return this.attributesCount;
+	}
+
+	/*
+	 * @see IClassFileReader#getAttributes()
+	 */
+	public ClassFileAttribute[] getAttributes() {
+		return this.attributes;
+	}
+
+	/*
+	 * @see IClassFileReader#getClassIndex()
+	 */
+	public int getClassIndex() {
+		return this.classNameIndex;
+	}
+
+	/*
+	 * @see IClassFileReader#getClassName()
+	 */
+	public char[] getClassName() {
+		return this.className;
+	}
+
+	private char[] getConstantClassNameAt(byte[] classFileBytes, int[] constantPoolOffsets, int constantPoolIndex) {
+		int utf8Offset = constantPoolOffsets[u2At(classFileBytes, constantPoolOffsets[constantPoolIndex] + 1, 0)];
+		return utf8At(classFileBytes, utf8Offset + 3, 0, u2At(classFileBytes, utf8Offset + 1, 0));
+	}
+
+	/*
+	 * @see IClassFileReader#getConstantPool()
+	 */
+	public ConstantPool getConstantPool() {
+		return this.constantPool;
+	}
+
+	/*
+	 * @see IClassFileReader#getFieldInfos()
+	 */
+	public FieldInfo[] getFieldInfos() {
+		return this.fields;
+	}
+
+	/*
+	 * @see IClassFileReader#getFieldsCount()
+	 */
+	public int getFieldsCount() {
+		return this.fieldsCount;
+	}
+
+	/*
+	 * @see IClassFileReader#getInnerClassesAttribute()
+	 */
+	public InnerClassesAttribute getInnerClassesAttribute() {
+		return this.innerClassesAttribute;
+	}
+
+	/*
+	 * @see IClassFileReader#getInterfaceIndexes()
+	 */
+	public int[] getInterfaceIndexes() {
+		return this.interfaceIndexes;
+	}
+
+	/*
+	 * @see IClassFileReader#getInterfaceNames()
+	 */
+	public char[][] getInterfaceNames() {
+		return this.interfaceNames;
+	}
+
+	/*
+	 * @see IClassFileReader#getMagic()
+	 */
+	public int getMagic() {
+		return this.magicNumber;
+	}
+
+	/*
+	 * @see IClassFileReader#getMajorVersion()
+	 */
+	public int getMajorVersion() {
+		return this.majorVersion;
+	}
+
+	/*
+	 * @see IClassFileReader#getMethodInfos()
+	 */
+	public MethodInfo[] getMethodInfos() {
+		return this.methods;
+	}
+
+	/*
+	 * @see IClassFileReader#getMethodsCount()
+	 */
+	public int getMethodsCount() {
+		return this.methodsCount;
+	}
+
+	/*
+	 * @see IClassFileReader#getMinorVersion()
+	 */
+	public int getMinorVersion() {
+		return this.minorVersion;
+	}
+
+	/*
+	 * @see IClassFileReader#getSourceFileAttribute()
+	 */
+	public SourceFileAttribute getSourceFileAttribute() {
+		return this.sourceFileAttribute;
+	}
+
+	/*
+	 * @see IClassFileReader#getSuperclassIndex()
+	 */
+	public int getSuperclassIndex() {
+		return this.superclassNameIndex;
+	}
+
+	/*
+	 * @see IClassFileReader#getSuperclassName()
+	 */
+	public char[] getSuperclassName() {
+		return this.superclassName;
+	}
+
+	/*
+	 * @see IClassFileReader#isClass()
+	 */
+	public boolean isClass() {
+		return !isInterface();
+	}
+
+	/*
+	 * @see IClassFileReader#isInterface()
+	 */
+	public boolean isInterface() {
+		return (getAccessFlags() & IModifierConstants.ACC_INTERFACE) != 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileStruct.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileStruct.java
new file mode 100644
index 0000000..24e4f64
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFileStruct.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public abstract class ClassFileStruct {
+
+	protected double doubleAt(byte[] reference, int relativeOffset, int structOffset) {
+		return (Double.longBitsToDouble(i8At(reference, relativeOffset, structOffset)));
+	}
+
+	protected float floatAt(byte[] reference, int relativeOffset, int structOffset) {
+		return (Float.intBitsToFloat(i4At(reference, relativeOffset, structOffset)));
+	}
+
+	protected int i1At(byte[] reference, int relativeOffset, int structOffset) {
+		return reference[relativeOffset + structOffset];
+	}
+
+	protected int i2At(byte[] reference, int relativeOffset, int structOffset) {
+		int position = relativeOffset + structOffset;
+		return (reference[position++] << 8) + (reference[position] & 0xFF);
+	}
+
+	protected int i4At(byte[] reference, int relativeOffset, int structOffset) {
+		int position = relativeOffset + structOffset;
+		return ((reference[position++] & 0xFF) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
+	}
+
+	protected long i8At(byte[] reference, int relativeOffset, int structOffset) {
+		int position = relativeOffset + structOffset;
+		return (((long) (reference[position++] & 0xFF)) << 56) + (((long) (reference[position++] & 0xFF)) << 48) + (((long) (reference[position++] & 0xFF)) << 40) + (((long) (reference[position++] & 0xFF)) << 32) + (((long) (reference[position++] & 0xFF)) << 24) + (((long) (reference[position++] & 0xFF)) << 16) + (((long) (reference[position++] & 0xFF)) << 8) + (reference[position++] & 0xFF);
+	}
+
+	protected int u1At(byte[] reference, int relativeOffset, int structOffset) {
+		return (reference[relativeOffset + structOffset] & 0xFF);
+	}
+
+	protected int u2At(byte[] reference, int relativeOffset, int structOffset) {
+		int position = relativeOffset + structOffset;
+		return ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF);
+	}
+
+	protected long u4At(byte[] reference, int relativeOffset, int structOffset) {
+		int position = relativeOffset + structOffset;
+		return (((reference[position++] & 0xFFL) << 24) + ((reference[position++] & 0xFF) << 16) + ((reference[position++] & 0xFF) << 8) + (reference[position] & 0xFF));
+	}
+
+	protected char[] utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable) {
+		int length = bytesAvailable;
+		char outputBuf[] = new char[bytesAvailable];
+		int outputPos = 0;
+		int readOffset = structOffset + relativeOffset;
+
+		while (length != 0) {
+			int x = reference[readOffset++] & 0xFF;
+			length--;
+			if ((0x80 & x) != 0) {
+				if ((x & 0x20) != 0) {
+					length -= 2;
+					x = ((x & 0xF) << 12) + ((reference[readOffset++] & 0x3F) << 6) + (reference[readOffset++] & 0x3F);
+				} else {
+					length--;
+					x = ((x & 0x1F) << 6) + (reference[readOffset++] & 0x3F);
+				}
+			}
+			outputBuf[outputPos++] = (char) x;
+		}
+
+		if (outputPos != bytesAvailable) {
+			System.arraycopy(outputBuf, 0, (outputBuf = new char[outputPos]), 0, outputPos);
+		}
+		return outputBuf;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFormatException.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFormatException.java
new file mode 100644
index 0000000..32d0542
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ClassFormatException.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ClassFormatException extends Exception {
+
+	public static final int ERROR_MALFORMED_UTF8 = 1;
+	public static final int ERROR_TRUNCATED_INPUT = 2;
+	public static final int INVALID_CONSTANT_POOL_ENTRY = 3;
+	public static final int TOO_MANY_BYTES = 4;
+	public static final int INVALID_ARGUMENTS_FOR_INVOKEINTERFACE = 5;
+	public static final int INVALID_BYTECODE = 6;
+
+	/**
+	 * @since 3.0
+	 */
+	public static final int INVALID_TAG_CONSTANT = 7;
+
+	/**
+	 * @since 3.0
+	 */
+	public static final int INVALID_MAGIC_NUMBER = 8;
+
+	private static final long serialVersionUID = 6582900558320612988L; // backward compatible
+
+	/**
+	 * Constructor for ClassFormatException.
+	 * @param errorID the given error ID
+	 */
+	public ClassFormatException(int errorID) {
+		// TODO (olivier) what is the errorID?
+	}
+
+	/**
+	 * Constructor for ClassFormatException.
+	 * @param message the message for the exception
+	 */
+	public ClassFormatException(String message) {
+		super(message);
+	}
+
+	/**
+	 * Constructor for ClassFormatException.
+	 * @param message the message for the exception
+	 * @param  cause  the cause of the exception
+	 * @since 3.5
+	 */
+	public ClassFormatException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CodeAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CodeAttribute.java
new file mode 100644
index 0000000..70f5f3d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/CodeAttribute.java
@@ -0,0 +1,1114 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class CodeAttribute extends ClassFileAttribute {
+	private static final ExceptionTableEntry[] NO_EXCEPTION_TABLE = new ExceptionTableEntry[0];
+	private ClassFileAttribute[] attributes;
+	private int attributesCount;
+	private byte[] bytecodes;
+	private byte[] classFileBytes;
+	private long codeLength;
+	private int codeOffset;
+	private ConstantPool constantPool;
+	private ExceptionTableEntry[] exceptionTableEntries;
+	private int exceptionTableLength;
+	private int maxLocals;
+	private int maxStack;
+
+	CodeAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.classFileBytes = classFileBytes;
+		this.constantPool = constantPool;
+		this.maxStack = u2At(classFileBytes, 6, offset);
+		this.maxLocals = u2At(classFileBytes, 8, offset);
+		this.codeLength = u4At(classFileBytes, 10, offset);
+		this.codeOffset = offset + 14;
+		int readOffset = (int) (14 + this.codeLength);
+		this.exceptionTableLength = u2At(classFileBytes, readOffset, offset);
+		readOffset += 2;
+		this.exceptionTableEntries = NO_EXCEPTION_TABLE;
+		if (this.exceptionTableLength != 0) {
+			this.exceptionTableEntries = new ExceptionTableEntry[this.exceptionTableLength];
+			for (int i = 0; i < this.exceptionTableLength; i++) {
+				this.exceptionTableEntries[i] = new ExceptionTableEntry(classFileBytes, constantPool, offset + readOffset);
+				readOffset += 8;
+			}
+		}
+		this.attributesCount = u2At(classFileBytes, readOffset, offset);
+		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
+		if (this.attributesCount != 0) {
+			this.attributes = new ClassFileAttribute[this.attributesCount];
+		}
+		readOffset += 2;
+		for (int i = 0; i < this.attributesCount; i++) {
+			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
+		}
+	}
+
+	/*
+	 * @see ICodeAttribute#getAttributes()
+	 */
+	public ClassFileAttribute[] getAttributes() {
+		return this.attributes;
+	}
+
+	/*
+	 * @see ICodeAttribute#getAttributesCount()
+	 */
+	public int getAttributesCount() {
+		return this.attributesCount;
+	}
+
+	/*
+	 * @see ICodeAttribute#getBytecodes()
+	 */
+	public byte[] getBytecodes() {
+		if (this.bytecodes == null) {
+			System.arraycopy(this.classFileBytes, this.codeOffset, (this.bytecodes = new byte[(int) this.codeLength]), 0, (int) this.codeLength);
+		}
+		return this.bytecodes;
+	}
+
+	/*
+	 * @see ICodeAttribute#getCodeLength()
+	 */
+	public long getCodeLength() {
+		return this.codeLength;
+	}
+
+	/*
+	 * @see ICodeAttribute#getExceptionTable()
+	 */
+	public ExceptionTableEntry[] getExceptionTable() {
+		return this.exceptionTableEntries;
+	}
+
+	/*
+	 * @see ICodeAttribute#getExceptionTableLength()
+	 */
+	public int getExceptionTableLength() {
+		return this.exceptionTableLength;
+	}
+
+	/*
+	 * @see ICodeAttribute#getMaxLocals()
+	 */
+	public int getMaxLocals() {
+		return this.maxLocals;
+	}
+
+	/*
+	 * @see ICodeAttribute#getMaxStack()
+	 */
+	public int getMaxStack() {
+		return this.maxStack;
+	}
+
+	/*
+	 * @see ICodeAttribute#traverse(IBytecodeVisitor visitor)
+	 */
+	public void traverse(DefaultBytecodeVisitor visitor) throws ClassFormatException {
+		int pc = this.codeOffset;
+		int opcode, index, _const, branchOffset;
+		ConstantPoolEntry constantPoolEntry;
+		while (true) {
+			opcode = u1At(this.classFileBytes, 0, pc);
+			switch (opcode) {
+				case IOpcodeMnemonics.NOP :
+					visitor._nop(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ACONST_NULL :
+					visitor._aconst_null(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_M1 :
+					visitor._iconst_m1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_0 :
+					visitor._iconst_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_1 :
+					visitor._iconst_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_2 :
+					visitor._iconst_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_3 :
+					visitor._iconst_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_4 :
+					visitor._iconst_4(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ICONST_5 :
+					visitor._iconst_5(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LCONST_0 :
+					visitor._lconst_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LCONST_1 :
+					visitor._lconst_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FCONST_0 :
+					visitor._fconst_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FCONST_1 :
+					visitor._fconst_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FCONST_2 :
+					visitor._fconst_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DCONST_0 :
+					visitor._dconst_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DCONST_1 :
+					visitor._dconst_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.BIPUSH :
+					visitor._bipush(pc - this.codeOffset, (byte) i1At(this.classFileBytes, 1, pc));
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.SIPUSH :
+					visitor._sipush(pc - this.codeOffset, (short) i2At(this.classFileBytes, 1, pc));
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.LDC :
+					index = u1At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._ldc(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.LDC_W :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Float && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Integer && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_String && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._ldc_w(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.LDC2_W :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Double && constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Long) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._ldc2_w(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.ILOAD :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._iload(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.LLOAD :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._lload(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.FLOAD :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._fload(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.DLOAD :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._dload(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.ALOAD :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._aload(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.ILOAD_0 :
+					visitor._iload_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ILOAD_1 :
+					visitor._iload_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ILOAD_2 :
+					visitor._iload_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ILOAD_3 :
+					visitor._iload_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LLOAD_0 :
+					visitor._lload_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LLOAD_1 :
+					visitor._lload_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LLOAD_2 :
+					visitor._lload_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LLOAD_3 :
+					visitor._lload_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FLOAD_0 :
+					visitor._fload_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FLOAD_1 :
+					visitor._fload_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FLOAD_2 :
+					visitor._fload_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FLOAD_3 :
+					visitor._fload_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DLOAD_0 :
+					visitor._dload_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DLOAD_1 :
+					visitor._dload_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DLOAD_2 :
+					visitor._dload_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DLOAD_3 :
+					visitor._dload_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ALOAD_0 :
+					visitor._aload_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ALOAD_1 :
+					visitor._aload_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ALOAD_2 :
+					visitor._aload_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ALOAD_3 :
+					visitor._aload_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IALOAD :
+					visitor._iaload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LALOAD :
+					visitor._laload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FALOAD :
+					visitor._faload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DALOAD :
+					visitor._daload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.AALOAD :
+					visitor._aaload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.BALOAD :
+					visitor._baload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.CALOAD :
+					visitor._caload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.SALOAD :
+					visitor._saload(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISTORE :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._istore(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.LSTORE :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._lstore(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.FSTORE :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._fstore(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.DSTORE :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._dstore(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.ASTORE :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._astore(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.ISTORE_0 :
+					visitor._istore_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISTORE_1 :
+					visitor._istore_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISTORE_2 :
+					visitor._istore_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISTORE_3 :
+					visitor._istore_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSTORE_0 :
+					visitor._lstore_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSTORE_1 :
+					visitor._lstore_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSTORE_2 :
+					visitor._lstore_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSTORE_3 :
+					visitor._lstore_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FSTORE_0 :
+					visitor._fstore_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FSTORE_1 :
+					visitor._fstore_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FSTORE_2 :
+					visitor._fstore_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FSTORE_3 :
+					visitor._fstore_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DSTORE_0 :
+					visitor._dstore_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DSTORE_1 :
+					visitor._dstore_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DSTORE_2 :
+					visitor._dstore_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DSTORE_3 :
+					visitor._dstore_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ASTORE_0 :
+					visitor._astore_0(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ASTORE_1 :
+					visitor._astore_1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ASTORE_2 :
+					visitor._astore_2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ASTORE_3 :
+					visitor._astore_3(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IASTORE :
+					visitor._iastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LASTORE :
+					visitor._lastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FASTORE :
+					visitor._fastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DASTORE :
+					visitor._dastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.AASTORE :
+					visitor._aastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.BASTORE :
+					visitor._bastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.CASTORE :
+					visitor._castore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.SASTORE :
+					visitor._sastore(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.POP :
+					visitor._pop(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.POP2 :
+					visitor._pop2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP :
+					visitor._dup(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP_X1 :
+					visitor._dup_x1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP_X2 :
+					visitor._dup_x2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP2 :
+					visitor._dup2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP2_X1 :
+					visitor._dup2_x1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DUP2_X2 :
+					visitor._dup2_x2(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.SWAP :
+					visitor._swap(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IADD :
+					visitor._iadd(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LADD :
+					visitor._ladd(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FADD :
+					visitor._fadd(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DADD :
+					visitor._dadd(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISUB :
+					visitor._isub(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSUB :
+					visitor._lsub(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FSUB :
+					visitor._fsub(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DSUB :
+					visitor._dsub(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IMUL :
+					visitor._imul(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LMUL :
+					visitor._lmul(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FMUL :
+					visitor._fmul(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DMUL :
+					visitor._dmul(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IDIV :
+					visitor._idiv(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LDIV :
+					visitor._ldiv(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FDIV :
+					visitor._fdiv(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DDIV :
+					visitor._ddiv(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IREM :
+					visitor._irem(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LREM :
+					visitor._lrem(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FREM :
+					visitor._frem(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DREM :
+					visitor._drem(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.INEG :
+					visitor._ineg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LNEG :
+					visitor._lneg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FNEG :
+					visitor._fneg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DNEG :
+					visitor._dneg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISHL :
+					visitor._ishl(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSHL :
+					visitor._lshl(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ISHR :
+					visitor._ishr(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LSHR :
+					visitor._lshr(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IUSHR :
+					visitor._iushr(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LUSHR :
+					visitor._lushr(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IAND :
+					visitor._iand(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LAND :
+					visitor._land(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IOR :
+					visitor._ior(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LOR :
+					visitor._lor(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IXOR :
+					visitor._ixor(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LXOR :
+					visitor._lxor(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IINC :
+					index = u1At(this.classFileBytes, 1, pc);
+					_const = i1At(this.classFileBytes, 2, pc);
+					visitor._iinc(pc - this.codeOffset, index, _const);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.I2L :
+					visitor._i2l(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.I2F :
+					visitor._i2f(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.I2D :
+					visitor._i2d(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.L2I :
+					visitor._l2i(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.L2F :
+					visitor._l2f(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.L2D :
+					visitor._l2d(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.F2I :
+					visitor._f2i(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.F2L :
+					visitor._f2l(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.F2D :
+					visitor._f2d(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.D2I :
+					visitor._d2i(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.D2L :
+					visitor._d2l(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.D2F :
+					visitor._d2f(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.I2B :
+					visitor._i2b(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.I2C :
+					visitor._i2c(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.I2S :
+					visitor._i2s(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LCMP :
+					visitor._lcmp(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FCMPL :
+					visitor._fcmpl(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FCMPG :
+					visitor._fcmpg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DCMPL :
+					visitor._dcmpl(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DCMPG :
+					visitor._dcmpg(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IFEQ :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifeq(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFNE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifne(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFLT :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._iflt(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFGE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifge(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFGT :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifgt(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFLE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifle(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPEQ :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmpeq(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPNE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmpne(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPLT :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmplt(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPGE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmpge(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPGT :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmpgt(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ICMPLE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_icmple(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ACMPEQ :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_acmpeq(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IF_ACMPNE :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._if_acmpne(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.GOTO :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._goto(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.JSR :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._jsr(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.RET :
+					index = u1At(this.classFileBytes, 1, pc);
+					visitor._ret(pc - this.codeOffset, index);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.TABLESWITCH :
+					int startpc = pc;
+					pc++;
+					while (((pc - this.codeOffset) & 0x03) != 0) { // faster than % 4
+						pc++;
+					}
+					int defaultOffset = i4At(this.classFileBytes, 0, pc);
+					pc += 4;
+					int low = i4At(this.classFileBytes, 0, pc);
+					pc += 4;
+					int high = i4At(this.classFileBytes, 0, pc);
+					pc += 4;
+					int length = high - low + 1;
+					int[] jumpOffsets = new int[length];
+					for (int i = 0; i < length; i++) {
+						jumpOffsets[i] = i4At(this.classFileBytes, 0, pc);
+						pc += 4;
+					}
+					visitor._tableswitch(startpc - this.codeOffset, defaultOffset, low, high, jumpOffsets);
+					break;
+				case IOpcodeMnemonics.LOOKUPSWITCH :
+					startpc = pc;
+					pc++;
+					while (((pc - this.codeOffset) & 0x03) != 0) {
+						pc++;
+					}
+					defaultOffset = i4At(this.classFileBytes, 0, pc);
+					pc += 4;
+					int npairs = (int) u4At(this.classFileBytes, 0, pc);
+					int[][] offset_pairs = new int[npairs][2];
+					pc += 4;
+					for (int i = 0; i < npairs; i++) {
+						offset_pairs[i][0] = i4At(this.classFileBytes, 0, pc);
+						pc += 4;
+						offset_pairs[i][1] = i4At(this.classFileBytes, 0, pc);
+						pc += 4;
+					}
+					visitor._lookupswitch(startpc - this.codeOffset, defaultOffset, npairs, offset_pairs);
+					break;
+				case IOpcodeMnemonics.IRETURN :
+					visitor._ireturn(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.LRETURN :
+					visitor._lreturn(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.FRETURN :
+					visitor._freturn(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.DRETURN :
+					visitor._dreturn(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ARETURN :
+					visitor._areturn(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.RETURN :
+					visitor._return(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.GETSTATIC :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._getstatic(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.PUTSTATIC :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._putstatic(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.GETFIELD :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._getfield(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.PUTFIELD :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Fieldref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._putfield(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.INVOKEVIRTUAL :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._invokevirtual(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.INVOKESPECIAL :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._invokespecial(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.INVOKESTATIC :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Methodref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._invokestatic(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.INVOKEINTERFACE :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_InterfaceMethodref) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					byte count = (byte) u1At(this.classFileBytes, 3, pc);
+					int extraArgs = u1At(this.classFileBytes, 4, pc);
+					if (extraArgs != 0) {
+						throw new ClassFormatException(ClassFormatException.INVALID_ARGUMENTS_FOR_INVOKEINTERFACE);
+					}
+					visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
+					pc += 5;
+					break;
+				case IOpcodeMnemonics.NEW :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._new(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.NEWARRAY :
+					int atype = u1At(this.classFileBytes, 1, pc);
+					visitor._newarray(pc - this.codeOffset, atype);
+					pc += 2;
+					break;
+				case IOpcodeMnemonics.ANEWARRAY :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._anewarray(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.ARRAYLENGTH :
+					visitor._arraylength(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.ATHROW :
+					visitor._athrow(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.CHECKCAST :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._checkcast(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.INSTANCEOF :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._instanceof(pc - this.codeOffset, index, constantPoolEntry);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.MONITORENTER :
+					visitor._monitorenter(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.MONITOREXIT :
+					visitor._monitorexit(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.WIDE :
+					opcode = u1At(this.classFileBytes, 1, pc);
+					if (opcode == IOpcodeMnemonics.IINC) {
+						index = u2At(this.classFileBytes, 2, pc);
+						_const = i2At(this.classFileBytes, 4, pc);
+						visitor._wide(pc - this.codeOffset, opcode, index, _const);
+						pc += 6;
+					} else {
+						index = u2At(this.classFileBytes, 2, pc);
+						visitor._wide(pc - this.codeOffset, opcode, index);
+						pc += 4;
+					}
+					break;
+				case IOpcodeMnemonics.MULTIANEWARRAY :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					int dimensions = u1At(this.classFileBytes, 3, pc);
+					visitor._multianewarray(pc - this.codeOffset, index, dimensions, constantPoolEntry);
+					pc += 4;
+					break;
+				case IOpcodeMnemonics.IFNULL :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifnull(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.IFNONNULL :
+					branchOffset = i2At(this.classFileBytes, 1, pc);
+					visitor._ifnonnull(pc - this.codeOffset, branchOffset);
+					pc += 3;
+					break;
+				case IOpcodeMnemonics.GOTO_W :
+					branchOffset = i4At(this.classFileBytes, 1, pc);
+					visitor._goto_w(pc - this.codeOffset, branchOffset);
+					pc += 5;
+					break;
+				case IOpcodeMnemonics.JSR_W :
+					branchOffset = i4At(this.classFileBytes, 1, pc);
+					visitor._jsr_w(pc - this.codeOffset, branchOffset);
+					pc += 5;
+					break;
+				case IOpcodeMnemonics.BREAKPOINT :
+					visitor._breakpoint(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IMPDEP1 :
+					visitor._impdep1(pc - this.codeOffset);
+					pc++;
+					break;
+				case IOpcodeMnemonics.IMPDEP2 :
+					visitor._impdep2(pc - this.codeOffset);
+					pc++;
+					break;
+				default :
+					throw new ClassFormatException(ClassFormatException.INVALID_BYTECODE);
+			}
+			if (pc >= (this.codeLength + this.codeOffset)) {
+				break;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPool.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPool.java
new file mode 100644
index 0000000..a6c585a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPool.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ConstantPool extends ClassFileStruct {
+
+	private int constantPoolCount;
+	private int[] constantPoolOffset;
+	private byte[] classFileBytes;
+
+	ConstantPool(byte[] reference, int[] constantPoolOffset) {
+		this.constantPoolCount = constantPoolOffset.length;
+		this.constantPoolOffset = constantPoolOffset;
+		this.classFileBytes = reference;
+	}
+
+	/*
+	 * @see IConstantPool#decodeEntry(int)
+	 */
+	public ConstantPoolEntry decodeEntry(int index) {
+		ConstantPoolEntry constantPoolEntry = new ConstantPoolEntry();
+		constantPoolEntry.reset();
+		int kind = getEntryKind(index);
+		constantPoolEntry.setKind(kind);
+		switch (kind) {
+			case ConstantPoolConstant.CONSTANT_Class :
+				constantPoolEntry.setClassInfoNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				constantPoolEntry.setClassInfoName(getUtf8ValueAt(constantPoolEntry.getClassInfoNameIndex()));
+				break;
+			case ConstantPoolConstant.CONSTANT_Double :
+				constantPoolEntry.setDoubleValue(doubleAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				break;
+			case ConstantPoolConstant.CONSTANT_Fieldref :
+				constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				int declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
+				constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
+				constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
+				int fieldNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
+				int fieldDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
+				constantPoolEntry.setFieldName(getUtf8ValueAt(fieldNameIndex));
+				constantPoolEntry.setFieldDescriptor(getUtf8ValueAt(fieldDescriptorIndex));
+				break;
+			case ConstantPoolConstant.CONSTANT_Methodref :
+			case ConstantPoolConstant.CONSTANT_InterfaceMethodref :
+				constantPoolEntry.setClassIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				declaringClassIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getClassIndex()]);
+				constantPoolEntry.setClassName(getUtf8ValueAt(declaringClassIndex));
+				constantPoolEntry.setNameAndTypeIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
+				int methodNameIndex = u2At(this.classFileBytes, 1, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
+				int methodDescriptorIndex = u2At(this.classFileBytes, 3, this.constantPoolOffset[constantPoolEntry.getNameAndTypeIndex()]);
+				constantPoolEntry.setMethodName(getUtf8ValueAt(methodNameIndex));
+				constantPoolEntry.setMethodDescriptor(getUtf8ValueAt(methodDescriptorIndex));
+				break;
+			case ConstantPoolConstant.CONSTANT_Float :
+				constantPoolEntry.setFloatValue(floatAt(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				break;
+			case ConstantPoolConstant.CONSTANT_Integer :
+				constantPoolEntry.setIntegerValue(i4At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				break;
+			case ConstantPoolConstant.CONSTANT_Long :
+				constantPoolEntry.setLongValue(i8At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				break;
+			case ConstantPoolConstant.CONSTANT_NameAndType :
+				constantPoolEntry.setNameAndTypeNameIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				constantPoolEntry.setNameAndTypeDescriptorIndex(u2At(this.classFileBytes, 3, this.constantPoolOffset[index]));
+				break;
+			case ConstantPoolConstant.CONSTANT_String :
+				constantPoolEntry.setStringIndex(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				constantPoolEntry.setStringValue(getUtf8ValueAt(constantPoolEntry.getStringIndex()));
+				break;
+			case ConstantPoolConstant.CONSTANT_Utf8 :
+				constantPoolEntry.setUtf8Length(u2At(this.classFileBytes, 1, this.constantPoolOffset[index]));
+				constantPoolEntry.setUtf8Value(getUtf8ValueAt(index));
+		}
+		return constantPoolEntry;
+	}
+
+	/*
+	 * @see IConstantPool#getConstantPoolCount()
+	 */
+	public int getConstantPoolCount() {
+		return this.constantPoolCount;
+	}
+
+	/*
+	 * @see IConstantPool#getEntryKind(int)
+	 */
+	public int getEntryKind(int index) {
+		return u1At(this.classFileBytes, 0, this.constantPoolOffset[index]);
+	}
+
+	private char[] getUtf8ValueAt(int utf8Index) {
+		int utf8Offset = this.constantPoolOffset[utf8Index];
+		return utf8At(this.classFileBytes, 0, utf8Offset + 3, u2At(this.classFileBytes, 0, utf8Offset + 1));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolConstant.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolConstant.java
new file mode 100644
index 0000000..abc13b2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolConstant.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public interface ConstantPoolConstant {
+
+	int CONSTANT_Class = 7;
+	int CONSTANT_Fieldref = 9;
+	int CONSTANT_Methodref = 10;
+	int CONSTANT_InterfaceMethodref = 11;
+	int CONSTANT_String = 8;
+	int CONSTANT_Integer = 3;
+	int CONSTANT_Float = 4;
+	int CONSTANT_Long = 5;
+	int CONSTANT_Double = 6;
+	int CONSTANT_NameAndType = 12;
+	int CONSTANT_Utf8 = 1;
+
+	int CONSTANT_Methodref_SIZE = 5;
+	int CONSTANT_Class_SIZE = 3;
+	int CONSTANT_Double_SIZE = 9;
+	int CONSTANT_Fieldref_SIZE = 5;
+	int CONSTANT_Float_SIZE = 5;
+	int CONSTANT_Integer_SIZE = 5;
+	int CONSTANT_InterfaceMethodref_SIZE = 5;
+	int CONSTANT_Long_SIZE = 9;
+	int CONSTANT_String_SIZE = 3;
+	int CONSTANT_Utf8_SIZE = 3;
+	int CONSTANT_NameAndType_SIZE = 5;
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolEntry.java
new file mode 100644
index 0000000..881356f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantPoolEntry.java
@@ -0,0 +1,396 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ConstantPoolEntry {
+
+	private int kind;
+	private int classInfoNameIndex;
+	private int classIndex;
+	private int nameAndTypeIndex;
+	private int stringIndex;
+	private char[] stringValue;
+	private int integerValue;
+	private float floatValue;
+	private double doubleValue;
+	private long longValue;
+	private int nameAndTypeDescriptorIndex;
+	private int nameAndTypeNameIndex;
+	private char[] className;
+	private char[] fieldName;
+	private char[] methodName;
+	private char[] fieldDescriptor;
+	private char[] methodDescriptor;
+	private char[] utf8Value;
+	private int utf8Length;
+	private char[] classInfoName;
+
+	public ConstantPoolEntry() {
+		this.classInfoNameIndex = -1;
+		this.classIndex = -1;
+		this.nameAndTypeIndex = -1;
+		this.stringIndex = -1;
+		this.stringValue = null;
+		this.integerValue = -1;
+		this.floatValue = -0.0f;
+		this.doubleValue = -0 - 0;
+		this.longValue = -1;
+		this.nameAndTypeDescriptorIndex = -1;
+		this.nameAndTypeNameIndex = -1;
+		this.className = null;
+		this.fieldName = null;
+		this.methodName = null;
+		this.fieldDescriptor = null;
+		this.methodDescriptor = null;
+		this.utf8Value = null;
+		this.utf8Length = -1;
+		this.classInfoName = null;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getKind()
+	 */
+	public int getKind() {
+		return this.kind;
+	}
+
+	/*
+	 * Sets the kind.
+	 * @param kind The kind to set
+	 */
+	public void setKind(int kind) {
+		this.kind = kind;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getClassInfoNameIndex()
+	 */
+	public int getClassInfoNameIndex() {
+		return this.classInfoNameIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getClassIndex()
+	 */
+	public int getClassIndex() {
+		return this.classIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getNameAndTypeIndex()
+	 */
+	public int getNameAndTypeIndex() {
+		return this.nameAndTypeIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getStringIndex()
+	 */
+	public int getStringIndex() {
+		return this.stringIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getStringValue()
+	 */
+	public String getStringValue() {
+		return new String(this.stringValue);
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getIntegerValue()
+	 */
+	public int getIntegerValue() {
+		return this.integerValue;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getFloatValue()
+	 */
+	public float getFloatValue() {
+		return this.floatValue;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getDoubleValue()
+	 */
+	public double getDoubleValue() {
+		return this.doubleValue;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getLongValue()
+	 */
+	public long getLongValue() {
+		return this.longValue;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getNameAndTypeInfoDescriptorIndex()
+	 */
+	public int getNameAndTypeInfoDescriptorIndex() {
+		return this.nameAndTypeDescriptorIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getNameAndTypeInfoNameIndex()
+	 */
+	public int getNameAndTypeInfoNameIndex() {
+		return this.nameAndTypeNameIndex;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getClassName()
+	 */
+	public char[] getClassName() {
+		return this.className;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getFieldName()
+	 */
+	public char[] getFieldName() {
+		return this.fieldName;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getMethodName()
+	 */
+	public char[] getMethodName() {
+		return this.methodName;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getFieldDescriptor()
+	 */
+	public char[] getFieldDescriptor() {
+		return this.fieldDescriptor;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getMethodDescriptor()
+	 */
+	public char[] getMethodDescriptor() {
+		return this.methodDescriptor;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getUtf8Value()
+	 */
+	public char[] getUtf8Value() {
+		return this.utf8Value;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getClassInfoName()
+	 */
+	public char[] getClassInfoName() {
+		return this.classInfoName;
+	}
+
+	/*
+	 * Sets the classInfoNameIndex.
+	 * @param classInfoNameIndex The classInfoNameIndex to set
+	 */
+	public void setClassInfoNameIndex(int classInfoNameIndex) {
+		this.classInfoNameIndex = classInfoNameIndex;
+	}
+
+	/*
+	 * Sets the classIndex.
+	 * @param classIndex The classIndex to set
+	 */
+	public void setClassIndex(int classIndex) {
+		this.classIndex = classIndex;
+	}
+
+	/*
+	 * Sets the nameAndTypeIndex.
+	 * @param nameAndTypeIndex The nameAndTypeIndex to set
+	 */
+	public void setNameAndTypeIndex(int nameAndTypeIndex) {
+		this.nameAndTypeIndex = nameAndTypeIndex;
+	}
+
+	/*
+	 * Sets the stringIndex.
+	 * @param stringIndex The stringIndex to set
+	 */
+	public void setStringIndex(int stringIndex) {
+		this.stringIndex = stringIndex;
+	}
+
+	/*
+	 * Sets the stringValue.
+	 * @param stringValue The stringValue to set
+	 */
+	public void setStringValue(char[] stringValue) {
+		this.stringValue = stringValue;
+	}
+
+	/*
+	 * Sets the integerValue.
+	 * @param integerValue The integerValue to set
+	 */
+	public void setIntegerValue(int integerValue) {
+		this.integerValue = integerValue;
+	}
+
+	/*
+	 * Sets the floatValue.
+	 * @param floatValue The floatValue to set
+	 */
+	public void setFloatValue(float floatValue) {
+		this.floatValue = floatValue;
+	}
+
+	/*
+	 * Sets the doubleValue.
+	 * @param doubleValue The doubleValue to set
+	 */
+	public void setDoubleValue(double doubleValue) {
+		this.doubleValue = doubleValue;
+	}
+
+	/*
+	 * Sets the longValue.
+	 * @param longValue The longValue to set
+	 */
+	public void setLongValue(long longValue) {
+		this.longValue = longValue;
+	}
+
+	/*
+	 * Gets the nameAndTypeDescriptorIndex.
+	 * @return Returns a int
+	 */
+	public int getNameAndTypeDescriptorIndex() {
+		return this.nameAndTypeDescriptorIndex;
+	}
+
+	/*
+	 * Sets the nameAndTypeDescriptorIndex.
+	 * @param nameAndTypeDescriptorIndex The nameAndTypeDescriptorIndex to set
+	 */
+	public void setNameAndTypeDescriptorIndex(int nameAndTypeDescriptorIndex) {
+		this.nameAndTypeDescriptorIndex = nameAndTypeDescriptorIndex;
+	}
+
+	/*
+	 * Gets the nameAndTypeNameIndex.
+	 * @return Returns a int
+	 */
+	public int getNameAndTypeNameIndex() {
+		return this.nameAndTypeNameIndex;
+	}
+
+	/*
+	 * Sets the nameAndTypeNameIndex.
+	 * @param nameAndTypeNameIndex The nameAndTypeNameIndex to set
+	 */
+	public void setNameAndTypeNameIndex(int nameAndTypeNameIndex) {
+		this.nameAndTypeNameIndex = nameAndTypeNameIndex;
+	}
+
+	/*
+	 * Sets the className.
+	 * @param className The className to set
+	 */
+	public void setClassName(char[] className) {
+		this.className = className;
+	}
+
+	/*
+	 * Sets the fieldName.
+	 * @param fieldName The fieldName to set
+	 */
+	public void setFieldName(char[] fieldName) {
+		this.fieldName = fieldName;
+	}
+
+	/*
+	 * Sets the methodName.
+	 * @param methodName The methodName to set
+	 */
+	public void setMethodName(char[] methodName) {
+		this.methodName = methodName;
+	}
+
+	/*
+	 * Sets the fieldDescriptor.
+	 * @param fieldDescriptor The fieldDescriptor to set
+	 */
+	public void setFieldDescriptor(char[] fieldDescriptor) {
+		this.fieldDescriptor = fieldDescriptor;
+	}
+
+	/*
+	 * Sets the methodDescriptor.
+	 * @param methodDescriptor The methodDescriptor to set
+	 */
+	public void setMethodDescriptor(char[] methodDescriptor) {
+		this.methodDescriptor = methodDescriptor;
+	}
+
+	/*
+	 * Sets the utf8Value.
+	 * @param utf8Value The utf8Value to set
+	 */
+	public void setUtf8Value(char[] utf8Value) {
+		this.utf8Value = utf8Value;
+	}
+
+	/*
+	 * Sets the classInfoName.
+	 * @param classInfoName The classInfoName to set
+	 */
+	public void setClassInfoName(char[] classInfoName) {
+		this.classInfoName = classInfoName;
+	}
+
+	/*
+	 * @see IConstantPoolEntry#getUtf8Length()
+	 */
+	public int getUtf8Length() {
+		return this.utf8Length;
+	}
+
+	/*
+	 * Sets the utf8Length.
+	 * @param utf8Length The utf8Length to set
+	 */
+	public void setUtf8Length(int utf8Length) {
+		this.utf8Length = utf8Length;
+	}
+
+	public void reset() {
+		this.kind = 0;
+		this.classInfoNameIndex = 0;
+		this.classIndex = 0;
+		this.nameAndTypeIndex = 0;
+		this.stringIndex = 0;
+		this.stringValue = null;
+		this.integerValue = 0;
+		this.floatValue = 0.0f;
+		this.doubleValue = 0.0;
+		this.longValue = 0L;
+		this.nameAndTypeDescriptorIndex = 0;
+		this.nameAndTypeNameIndex = 0;
+		this.className = null;
+		this.fieldName = null;
+		this.methodName = null;
+		this.fieldDescriptor = null;
+		this.methodDescriptor = null;
+		this.utf8Value = null;
+		this.utf8Length = 0;
+		this.classInfoName = null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantValueAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantValueAttribute.java
new file mode 100644
index 0000000..cfc20ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ConstantValueAttribute.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ConstantValueAttribute extends ClassFileAttribute {
+
+	private int constantValueIndex;
+	private ConstantPoolEntry constantPoolEntry;
+
+	ConstantValueAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.constantValueIndex = u2At(classFileBytes, 6, offset);
+		this.constantPoolEntry = constantPool.decodeEntry(this.constantValueIndex);
+	}
+
+	/*
+	 * @see IConstantValueAttribute#getConstantValue()
+	 */
+	public ConstantPoolEntry getConstantValue() {
+		return this.constantPoolEntry;
+	}
+
+	/*
+	 * @see IConstantValueAttribute#getConstantValueIndex()
+	 */
+	public int getConstantValueIndex() {
+		return this.constantValueIndex;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/DefaultBytecodeVisitor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/DefaultBytecodeVisitor.java
new file mode 100644
index 0000000..90b8599
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/DefaultBytecodeVisitor.java
@@ -0,0 +1,2071 @@
+/******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import org.eclipse.osgi.util.NLS;
+
+public class DefaultBytecodeVisitor {
+	private static final String EMPTY_CLASS_NAME = "\"\""; //$NON-NLS-1$
+	private static final String EMPTY_LOCAL_NAME = ""; //$NON-NLS-1$
+	private static final int T_BOOLEAN = 4;
+	private static final int T_CHAR = 5;
+	private static final int T_FLOAT = 6;
+	private static final int T_DOUBLE = 7;
+	private static final int T_BYTE = 8;
+	private static final int T_SHORT = 9;
+	private static final int T_INT = 10;
+	private static final int T_LONG = 11;
+
+	private StringBuffer buffer;
+	private String lineSeparator;
+	private int tabNumber;
+	private int digitNumberForPC;
+	private int mode;
+
+	public DefaultBytecodeVisitor(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		this.buffer = buffer;
+		this.lineSeparator = lineSeparator;
+		this.tabNumber = tabNumber + 1;
+		long codeLength = codeAttribute.getCodeLength();
+		this.digitNumberForPC = Long.toString(codeLength).length();
+		this.mode = mode;
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aaload(int)
+	 */
+	public void _aaload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AALOAD]);
+		writeNewLine();
+	}
+
+	private void dumpPcNumber(int pc) {
+		writeTabs();
+		int digitForPC = 1;
+		if (pc != 0) {
+			digitForPC = Integer.toString(pc).length();
+		}
+		for (int i = 0, max = this.digitNumberForPC - digitForPC; i < max; i++) {
+			this.buffer.append(' ');
+		}
+		this.buffer.append(pc);
+		this.buffer.append(Messages.disassembler_indentation);
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aastore(int)
+	 */
+	public void _aastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.AASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aconst_null(int)
+	 */
+	public void _aconst_null(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ACONST_NULL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aload_0(int)
+	 */
+	public void _aload_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aload_1(int)
+	 */
+	public void _aload_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aload_2(int)
+	 */
+	public void _aload_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aload_3(int)
+	 */
+	public void _aload_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_aload(int, int)
+	 */
+	public void _aload(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ALOAD], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_anewarray(int, int, ConstantPoolEntry)
+	 */
+	public void _anewarray(int pc, int index, ConstantPoolEntry constantClass) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_anewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ANEWARRAY], returnConstantClassName(constantClass)}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_areturn(int)
+	 */
+	public void _areturn(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_arraylength(int)
+	 */
+	public void _arraylength(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ARRAYLENGTH]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_astore_0(int)
+	 */
+	public void _astore_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_astore_1(int)
+	 */
+	public void _astore_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_astore_2(int)
+	 */
+	public void _astore_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_astore_3(int)
+	 */
+	public void _astore_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_astore(int, int)
+	 */
+	public void _astore(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ASTORE], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_athrow(int)
+	 */
+	public void _athrow(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ATHROW]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_baload(int)
+	 */
+	public void _baload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_bastore(int)
+	 */
+	public void _bastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_bipush(int, byte)
+	 */
+	public void _bipush(int pc, byte _byte) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BIPUSH]).append(Messages.disassembler_space).append(_byte);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_caload(int)
+	 */
+	public void _caload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_castore(int)
+	 */
+	public void _castore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_checkcast(int, int, ConstantPoolEntry)
+	 */
+	public void _checkcast(int pc, int index, ConstantPoolEntry constantClass) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_checkcast, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.CHECKCAST], returnConstantClassName(constantClass)}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_d2f(int)
+	 */
+	public void _d2f(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2F]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_d2i(int)
+	 */
+	public void _d2i(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2I]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_d2l(int)
+	 */
+	public void _d2l(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.D2L]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dadd(int)
+	 */
+	public void _dadd(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DADD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_daload(int)
+	 */
+	public void _daload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dastore(int)
+	 */
+	public void _dastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dcmpg(int)
+	 */
+	public void _dcmpg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dcmpl(int)
+	 */
+	public void _dcmpl(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCMPL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dconst_0(int)
+	 */
+	public void _dconst_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_0]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dconst_1(int)
+	 */
+	public void _dconst_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DCONST_1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ddiv(int)
+	 */
+	public void _ddiv(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DDIV]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dload_0(int)
+	 */
+	public void _dload_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dload_1(int)
+	 */
+	public void _dload_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dload_2(int)
+	 */
+	public void _dload_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dload_3(int)
+	 */
+	public void _dload_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dload(int, int)
+	 */
+	public void _dload(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DLOAD], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dmul(int)
+	 */
+	public void _dmul(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DMUL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dneg(int)
+	 */
+	public void _dneg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DNEG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_drem(int)
+	 */
+	public void _drem(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DREM]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dreturn(int)
+	 */
+	public void _dreturn(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DRETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dstore_0(int)
+	 */
+	public void _dstore_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dstore_1(int)
+	 */
+	public void _dstore_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dstore_2(int)
+	 */
+	public void _dstore_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dstore_3(int)
+	 */
+	public void _dstore_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dstore(int,int)
+	 */
+	public void _dstore(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSTORE], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dsub(int)
+	 */
+	public void _dsub(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DSUB]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup_x1(int)
+	 */
+	public void _dup_x1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup_x2(int)
+	 */
+	public void _dup_x2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP_X2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup(int)
+	 */
+	public void _dup(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup2_x1(int)
+	 */
+	public void _dup2_x1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup2_x2(int)
+	 */
+	public void _dup2_x2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2_X2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_dup2(int)
+	 */
+	public void _dup2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.DUP2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_f2d(int)
+	 */
+	public void _f2d(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2D]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_f2i(int)
+	 */
+	public void _f2i(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2I]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_f2l(int)
+	 */
+	public void _f2l(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.F2L]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fadd(int)
+	 */
+	public void _fadd(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FADD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_faload(int)
+	 */
+	public void _faload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fastore(int)
+	 */
+	public void _fastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fcmpg(int)
+	 */
+	public void _fcmpg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fcmpl(int)
+	 */
+	public void _fcmpl(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCMPL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fconst_0(int)
+	 */
+	public void _fconst_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_0]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fconst_1(int)
+	 */
+	public void _fconst_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fconst_2(int)
+	 */
+	public void _fconst_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FCONST_2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fdiv(int)
+	 */
+	public void _fdiv(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FDIV]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fload_0(int)
+	 */
+	public void _fload_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fload_1(int)
+	 */
+	public void _fload_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fload_2(int)
+	 */
+	public void _fload_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fload_3(int)
+	 */
+	public void _fload_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fload(int, int)
+	 */
+	public void _fload(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FLOAD], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fmul(int)
+	 */
+	public void _fmul(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FMUL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fneg(int)
+	 */
+	public void _fneg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FNEG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_frem(int)
+	 */
+	public void _frem(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FREM]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_freturn(int)
+	 */
+	public void _freturn(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FRETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fstore_0(int)
+	 */
+	public void _fstore_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fstore_1(int)
+	 */
+	public void _fstore_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fstore_2(int)
+	 */
+	public void _fstore_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fstore_3(int)
+	 */
+	public void _fstore_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fstore(int, int)
+	 */
+	public void _fstore(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSTORE], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_fsub(int)
+	 */
+	public void _fsub(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.FSUB]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_getfield(int, int, ConstantPoolEntry)
+	 */
+	public void _getfield(int pc, int index, ConstantPoolEntry constantFieldref) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_getfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_getstatic(int, int, ConstantPoolEntry)
+	 */
+	public void _getstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_getstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GETSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_goto_w(int, int)
+	 */
+	public void _goto_w(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO_W]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_goto(int, int)
+	 */
+	public void _goto(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.GOTO]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2b(int)
+	 */
+	public void _i2b(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2B]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2c(int)
+	 */
+	public void _i2c(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2C]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2d(int)
+	 */
+	public void _i2d(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2D]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2f(int)
+	 */
+	public void _i2f(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2F]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2l(int)
+	 */
+	public void _i2l(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2L]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_i2s(int)
+	 */
+	public void _i2s(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.I2S]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iadd(int)
+	 */
+	public void _iadd(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IADD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iaload(int)
+	 */
+	public void _iaload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iand(int)
+	 */
+	public void _iand(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IAND]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iastore(int)
+	 */
+	public void _iastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_acmpeq(int, int)
+	 */
+	public void _if_acmpeq(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_acmpne(int, int)
+	 */
+	public void _if_acmpne(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ACMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmpeq(int, int)
+	 */
+	public void _if_icmpeq(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmpge(int, int)
+	 */
+	public void _if_icmpge(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmpgt(int, int)
+	 */
+	public void _if_icmpgt(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPGT]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmple(int, int)
+	 */
+	public void _if_icmple(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmplt(int, int)
+	 */
+	public void _if_icmplt(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPLT]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_if_icmpne(int, int)
+	 */
+	public void _if_icmpne(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IF_ICMPNE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_0(int)
+	 */
+	public void _iconst_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_0]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_1(int)
+	 */
+	public void _iconst_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_2(int)
+	 */
+	public void _iconst_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_3(int)
+	 */
+	public void _iconst_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_3]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_4(int)
+	 */
+	public void _iconst_4(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_4]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_5(int)
+	 */
+	public void _iconst_5(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_5]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iconst_m1(int)
+	 */
+	public void _iconst_m1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ICONST_M1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_idiv(int)
+	 */
+	public void _idiv(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IDIV]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifeq(int, int)
+	 */
+	public void _ifeq(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFEQ]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifge(int, int)
+	 */
+	public void _ifge(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifgt(int, int)
+	 */
+	public void _ifgt(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFGT]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifle(int, int)
+	 */
+	public void _ifle(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iflt(int, int)
+	 */
+	public void _iflt(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFLT]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifne(int, int)
+	 */
+	public void _ifne(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNE]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifnonnull(int, int)
+	 */
+	public void _ifnonnull(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNONNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ifnull(int, int)
+	 */
+	public void _ifnull(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IFNULL]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iinc(int, int, int)
+	 */
+	public void _iinc(int pc, int index, int _const) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_iinc, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IINC], Integer.toString(index), Integer.toString(_const), EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iload_0(int)
+	 */
+	public void _iload_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iload_1(int)
+	 */
+	public void _iload_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iload_2(int)
+	 */
+	public void _iload_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iload_3(int)
+	 */
+	public void _iload_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iload(int, int)
+	 */
+	public void _iload(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ILOAD], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_imul(int)
+	 */
+	public void _imul(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMUL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ineg(int)
+	 */
+	public void _ineg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INEG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_instanceof(int, int, ConstantPoolEntry)
+	 */
+	public void _instanceof(int pc, int index, ConstantPoolEntry constantClass) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_instanceof, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INSTANCEOF], returnConstantClassName(constantClass)}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, ConstantPoolEntry)
+	 */
+	public void _invokeinterface(int pc, int index, byte nargs, ConstantPoolEntry constantInterfaceMethodref) {
+
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_invokeinterface, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEINTERFACE], Integer.toString(nargs), Utility.toString(constantInterfaceMethodref.getClassName(), constantInterfaceMethodref.getMethodName(), constantInterfaceMethodref.getMethodDescriptor(), true, isCompact())}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_invokespecial(int, int, ConstantPoolEntry)
+	 */
+	public void _invokespecial(int pc, int index, ConstantPoolEntry constantMethodref) {
+		dumpPcNumber(pc);
+		final String signature = returnMethodSignature(constantMethodref);
+		this.buffer.append(NLS.bind(Messages.classformat_invokespecial, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESPECIAL], signature}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_invokestatic(int, int, ConstantPoolEntry)
+	 */
+	public void _invokestatic(int pc, int index, ConstantPoolEntry constantMethodref) {
+		dumpPcNumber(pc);
+		final String signature = returnMethodSignature(constantMethodref);
+		this.buffer.append(NLS.bind(Messages.classformat_invokestatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKESTATIC], signature}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_invokevirtual(int, int, ConstantPoolEntry)
+	 */
+	public void _invokevirtual(int pc, int index, ConstantPoolEntry constantMethodref) {
+		dumpPcNumber(pc);
+		final String signature = returnMethodSignature(constantMethodref);
+		this.buffer.append(NLS.bind(Messages.classformat_invokevirtual, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEVIRTUAL], signature}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ior(int)
+	 */
+	public void _ior(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IOR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_irem(int)
+	 */
+	public void _irem(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IREM]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ireturn(int)
+	 */
+	public void _ireturn(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IRETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ishl(int)
+	 */
+	public void _ishl(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ishr(int)
+	 */
+	public void _ishr(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISHR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_istore_0(int)
+	 */
+	public void _istore_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_istore_1(int)
+	 */
+	public void _istore_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_istore_2(int)
+	 */
+	public void _istore_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_istore_3(int)
+	 */
+	public void _istore_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_istore(int, int)
+	 */
+	public void _istore(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISTORE], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_isub(int)
+	 */
+	public void _isub(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.ISUB]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_iushr(int)
+	 */
+	public void _iushr(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IUSHR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ixor(int)
+	 */
+	public void _ixor(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IXOR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_jsr_w(int, int)
+	 */
+	public void _jsr_w(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR_W]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_jsr(int, int)
+	 */
+	public void _jsr(int pc, int branchOffset) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.JSR]).append(Messages.disassembler_space).append(branchOffset + pc);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_l2d(int)
+	 */
+	public void _l2d(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2D]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_l2f(int)
+	 */
+	public void _l2f(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2F]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_l2i(int)
+	 */
+	public void _l2i(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.L2I]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ladd(int)
+	 */
+	public void _ladd(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LADD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_laload(int)
+	 */
+	public void _laload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_land(int)
+	 */
+	public void _land(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LAND]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lastore(int)
+	 */
+	public void _lastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lcmp(int)
+	 */
+	public void _lcmp(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCMP]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lconst_0(int)
+	 */
+	public void _lconst_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_0]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lconst_1(int)
+	 */
+	public void _lconst_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LCONST_1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ldc_w(int, int, ConstantPoolEntry)
+	 */
+	public void _ldc_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
+		dumpPcNumber(pc);
+		switch (constantPoolEntry.getKind()) {
+			case ConstantPoolConstant.CONSTANT_Float :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Float.toString(constantPoolEntry.getFloatValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_Integer :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Integer.toString(constantPoolEntry.getIntegerValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_String :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_Class :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC_W], returnConstantClassName(constantPoolEntry)}));
+		}
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ldc(int, int, ConstantPoolEntry)
+	 */
+	public void _ldc(int pc, int index, ConstantPoolEntry constantPoolEntry) {
+		dumpPcNumber(pc);
+		switch (constantPoolEntry.getKind()) {
+			case ConstantPoolConstant.CONSTANT_Float :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Float.toString(constantPoolEntry.getFloatValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_Integer :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_integer, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Integer.toString(constantPoolEntry.getIntegerValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_String :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_string, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], Disassembler.escapeString(constantPoolEntry.getStringValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_Class :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc_w_class, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC], returnConstantClassName(constantPoolEntry)}));
+		}
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ldc2_w(int, int, ConstantPoolEntry)
+	 */
+	public void _ldc2_w(int pc, int index, ConstantPoolEntry constantPoolEntry) {
+		dumpPcNumber(pc);
+		switch (constantPoolEntry.getKind()) {
+			case ConstantPoolConstant.CONSTANT_Long :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Long.toString(constantPoolEntry.getLongValue())}));
+				break;
+			case ConstantPoolConstant.CONSTANT_Double :
+				this.buffer.append(NLS.bind(Messages.classformat_ldc2_w_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDC2_W], Double.toString(constantPoolEntry.getDoubleValue())}));
+		}
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ldiv(int)
+	 */
+	public void _ldiv(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LDIV]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lload_0(int)
+	 */
+	public void _lload_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lload_1(int)
+	 */
+	public void _lload_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lload_2(int)
+	 */
+	public void _lload_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lload_3(int)
+	 */
+	public void _lload_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lload(int, int)
+	 */
+	public void _lload(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_load, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LLOAD], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lmul(int)
+	 */
+	public void _lmul(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LMUL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lneg(int)
+	 */
+	public void _lneg(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LNEG]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lookupswitch(int, int, int, int[][])
+	 */
+	public void _lookupswitch(int pc, int defaultoffset, int npairs, int[][] offset_pairs) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOOKUPSWITCH]).append(" default: ") //$NON-NLS-1$
+				.append(defaultoffset + pc);
+		writeNewLine();
+		for (int i = 0; i < npairs; i++) {
+			writeExtraTabs(3);
+			this.buffer.append("case ") //$NON-NLS-1$
+					.append(offset_pairs[i][0]).append(": ") //$NON-NLS-1$
+					.append(offset_pairs[i][1] + pc);
+			writeNewLine();
+		}
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lor(int)
+	 */
+	public void _lor(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LOR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lrem(int)
+	 */
+	public void _lrem(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LREM]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lreturn(int)
+	 */
+	public void _lreturn(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LRETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lshl(int)
+	 */
+	public void _lshl(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHL]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lshr(int)
+	 */
+	public void _lshr(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSHR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lstore_0(int)
+	 */
+	public void _lstore_0(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_0], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lstore_1(int)
+	 */
+	public void _lstore_1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_1], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lstore_2(int)
+	 */
+	public void _lstore_2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_2], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lstore_3(int)
+	 */
+	public void _lstore_3(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE_3], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lstore(int, int)
+	 */
+	public void _lstore(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_store, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSTORE], EMPTY_LOCAL_NAME}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lsub(int)
+	 */
+	public void _lsub(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LSUB]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lushr(int)
+	 */
+	public void _lushr(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LUSHR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_lxor(int)
+	 */
+	public void _lxor(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.LXOR]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_monitorenter(int)
+	 */
+	public void _monitorenter(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITORENTER]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_monitorexit(int)
+	 */
+	public void _monitorexit(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MONITOREXIT]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_multianewarray(int, int, int, ConstantPoolEntry)
+	 */
+	public void _multianewarray(int pc, int index, int dimensions, ConstantPoolEntry constantClass) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_multianewarray, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.MULTIANEWARRAY], returnConstantClassName(constantClass)}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_new(int, int, ConstantPoolEntry)
+	 */
+	public void _new(int pc, int index, ConstantPoolEntry constantClass) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_new, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEW], returnConstantClassName(constantClass)}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_newarray(int, int)
+	 */
+	public void _newarray(int pc, int atype) {
+		dumpPcNumber(pc);
+		switch (atype) {
+			case T_BOOLEAN :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_boolean, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_CHAR :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_char, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_FLOAT :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_float, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_DOUBLE :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_double, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_BYTE :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_byte, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_SHORT :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_short, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_INT :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_int, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+				break;
+			case T_LONG :
+				this.buffer.append(NLS.bind(Messages.classformat_newarray_long, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NEWARRAY], Integer.toString(atype)}));
+		}
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_nop(int)
+	 */
+	public void _nop(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.NOP]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_pop(int)
+	 */
+	public void _pop(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_pop2(int)
+	 */
+	public void _pop2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.POP2]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_putfield(int, int, ConstantPoolEntry)
+	 */
+	public void _putfield(int pc, int index, ConstantPoolEntry constantFieldref) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_putfield, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTFIELD], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_putstatic(int, int, ConstantPoolEntry)
+	 */
+	public void _putstatic(int pc, int index, ConstantPoolEntry constantFieldref) {
+		dumpPcNumber(pc);
+		this.buffer.append(NLS.bind(Messages.classformat_putstatic, new String[] {OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.PUTSTATIC], returnDeclaringClassName(constantFieldref), new String(constantFieldref.getFieldName()), returnClassName(Signature.toCharArray(constantFieldref.getFieldDescriptor()))}));
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_ret(int, int)
+	 */
+	public void _ret(int pc, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RET]).append(Messages.disassembler_space).append(index);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_return(int)
+	 */
+	public void _return(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.RETURN]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_saload(int)
+	 */
+	public void _saload(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SALOAD]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_sastore(int)
+	 */
+	public void _sastore(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SASTORE]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_sipush(int, short)
+	 */
+	public void _sipush(int pc, short value) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SIPUSH]).append(Messages.disassembler_space).append(value);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_swap(int)
+	 */
+	public void _swap(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.SWAP]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_tableswitch(int, int, int, int, int[])
+	 */
+	public void _tableswitch(int pc, int defaultoffset, int low, int high, int[] jump_offsets) {
+
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.TABLESWITCH]).append(" default: ") //$NON-NLS-1$
+				.append(defaultoffset + pc);
+		writeNewLine();
+		for (int i = low; i < high + 1; i++) {
+			writeExtraTabs(3);
+			this.buffer.append("case ") //$NON-NLS-1$
+					.append(i).append(": ") //$NON-NLS-1$
+					.append(jump_offsets[i - low] + pc);
+			writeNewLine();
+		}
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_wide(int, int, int)
+	 */
+	public void _wide(int pc, int iincopcode, int index, int _const) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
+		writeNewLine();
+		_iinc(pc + 1, index, _const);
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_wide(int, int, int)
+	 */
+	public void _wide(int pc, int opcode, int index) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.WIDE]);
+		writeNewLine();
+		switch (opcode) {
+			case IOpcodeMnemonics.ILOAD :
+				_iload(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.FLOAD :
+				_fload(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.ALOAD :
+				_aload(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.LLOAD :
+				_lload(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.DLOAD :
+				_dload(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.ISTORE :
+				_istore(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.FSTORE :
+				_fstore(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.ASTORE :
+				_astore(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.LSTORE :
+				_lstore(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.DSTORE :
+				_dstore(pc + 1, index);
+				break;
+			case IOpcodeMnemonics.RET :
+				_ret(pc + 1, index);
+		}
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_breakpoint(int)
+	 */
+	public void _breakpoint(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.BREAKPOINT]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_impdep1(int)
+	 */
+	public void _impdep1(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP1]);
+		writeNewLine();
+	}
+
+	/*
+	 * @see IBytecodeVisitor#_impdep2(int)
+	 */
+	public void _impdep2(int pc) {
+		dumpPcNumber(pc);
+		this.buffer.append(OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.IMPDEP2]);
+		writeNewLine();
+	}
+
+	private boolean isCompact() {
+		return (this.mode & Disassembler.COMPACT) != 0;
+	}
+
+	private String returnConstantClassName(ConstantPoolEntry constantClass) {
+		char[] className = constantClass.getClassInfoName();
+		if (className.length == 0) {
+			return EMPTY_CLASS_NAME;
+		}
+		switch (className[0]) {
+			case '[' :
+				StringBuffer classNameBuffer = new StringBuffer();
+				Utility.appendTypeSignature(className, 0, classNameBuffer, isCompact());
+				return classNameBuffer.toString();
+			default :
+				return returnClassName(className);
+		}
+	}
+
+	private String returnClassName(char[] classInfoName) {
+		if (classInfoName.length == 0) {
+			return EMPTY_CLASS_NAME;
+		} else if (isCompact()) {
+			int lastIndexOfSlash = CharOperation.lastIndexOf('/', classInfoName);
+			if (lastIndexOfSlash != -1) {
+				return new String(classInfoName, lastIndexOfSlash + 1, classInfoName.length - lastIndexOfSlash - 1);
+			}
+		}
+		CharOperation.replace(classInfoName, '/', '.');
+		return new String(classInfoName);
+	}
+
+	private String returnDeclaringClassName(ConstantPoolEntry constantRef) {
+		final char[] className = constantRef.getClassName();
+		return returnClassName(className);
+	}
+
+	private String returnMethodSignature(ConstantPoolEntry constantMethodref) {
+		final char[] methodDescriptor = constantMethodref.getMethodDescriptor();
+		CharOperation.replace(methodDescriptor, '$', '#');
+		final char[] signature = Utility.toString(constantMethodref.getClassName(), constantMethodref.getMethodName(), methodDescriptor, true, isCompact()).toCharArray();
+		CharOperation.replace(signature, '#', '$');
+		return String.valueOf(signature);
+	}
+
+	private void writeNewLine() {
+		this.buffer.append(this.lineSeparator);
+	}
+
+	private void writeTabs() {
+		for (int i = 0, max = this.tabNumber; i < max; i++) {
+			this.buffer.append(Messages.disassembler_indentation);
+		}
+	}
+
+	private void writeExtraTabs(int extraTabs) {
+		for (int i = 0, max = this.tabNumber + extraTabs; i < max; i++) {
+			this.buffer.append(Messages.disassembler_indentation);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
new file mode 100644
index 0000000..0572230
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Disassembler.java
@@ -0,0 +1,1167 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Disassembler of .class files. It generates an output in the Writer that looks close to
+ * the javap output.
+ */
+public class Disassembler {
+	/**
+	 * The mode is the detailed mode to disassemble ClassFileReader. It returns the magic
+	 * numbers, the version numbers and field and method descriptors.
+	 */
+	public final static int DETAILED = 1;
+
+	/**
+	 * This mode is used to compact the class name to a simple name instead of a qualified name.
+	 * @since 3.1
+	 */
+	public final static int COMPACT = 8;
+
+	private static final char[] ANY_EXCEPTION = Messages.classfileformat_anyexceptionhandler.toCharArray();
+	private static final String VERSION_UNKNOWN = Messages.classfileformat_versionUnknown;
+
+	private boolean appendModifier(StringBuffer buffer, int accessFlags, int modifierConstant, String modifier, boolean firstModifier) {
+		if ((accessFlags & modifierConstant) != 0) {
+			if (!firstModifier) {
+				buffer.append(Messages.disassembler_space);
+			}
+			if (firstModifier) {
+				firstModifier = false;
+			}
+			buffer.append(modifier);
+		}
+		return firstModifier;
+	}
+
+	private void decodeModifiers(StringBuffer buffer, int accessFlags, int[] checkBits) {
+		decodeModifiers(buffer, accessFlags, false, false, checkBits);
+	}
+
+	private void decodeModifiers(StringBuffer buffer, int accessFlags, boolean printDefault, boolean asBridge, int[] checkBits) {
+		if (checkBits == null)
+			return;
+		boolean firstModifier = true;
+		for (int i = 0, max = checkBits.length; i < max; i++) {
+			switch (checkBits[i]) {
+				case IModifierConstants.ACC_PUBLIC :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PUBLIC, "public", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_PROTECTED :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PROTECTED, "protected", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_PRIVATE :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_PRIVATE, "private", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_ABSTRACT :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ABSTRACT, "abstract", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_STATIC :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STATIC, "static", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_FINAL :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_FINAL, "final", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_SYNCHRONIZED :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_SYNCHRONIZED, "synchronized", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_NATIVE :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_NATIVE, "native", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_STRICT :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_STRICT, "strictfp", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_TRANSIENT :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_TRANSIENT, "transient", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_VOLATILE :
+					// case IModifierConstants.ACC_BRIDGE :
+					if (asBridge) {
+						firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_BRIDGE, "bridge", firstModifier); //$NON-NLS-1$
+					} else {
+						firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_VOLATILE, "volatile", firstModifier); //$NON-NLS-1$
+					}
+					break;
+				case IModifierConstants.ACC_ENUM :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ENUM, "enum", firstModifier); //$NON-NLS-1$
+					break;
+			}
+		}
+		if (!firstModifier) {
+			if (!printDefault)
+				buffer.append(Messages.disassembler_space);
+		} else if (printDefault) {
+			// no modifier: package default visibility
+			buffer.append("default"); //$NON-NLS-1$
+		}
+	}
+
+	private void decodeModifiersForField(StringBuffer buffer, int accessFlags) {
+		decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_TRANSIENT, IModifierConstants.ACC_VOLATILE, IModifierConstants.ACC_ENUM});
+	}
+
+	private final void decodeModifiersForInnerClasses(StringBuffer buffer, int accessFlags, boolean printDefault) {
+		decodeModifiers(buffer, accessFlags, printDefault, false, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL,});
+	}
+
+	private final void decodeModifiersForMethod(StringBuffer buffer, int accessFlags) {
+		decodeModifiers(buffer, accessFlags, false, true, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_PROTECTED, IModifierConstants.ACC_PRIVATE, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_STATIC, IModifierConstants.ACC_FINAL, IModifierConstants.ACC_SYNCHRONIZED, IModifierConstants.ACC_NATIVE, IModifierConstants.ACC_STRICT, IModifierConstants.ACC_BRIDGE,});
+	}
+
+	private final void decodeModifiersForType(StringBuffer buffer, int accessFlags) {
+		decodeModifiers(buffer, accessFlags, new int[] {IModifierConstants.ACC_PUBLIC, IModifierConstants.ACC_ABSTRACT, IModifierConstants.ACC_FINAL,});
+	}
+
+	public static String escapeString(String s) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0, max = s.length(); i < max; i++) {
+			char c = s.charAt(i);
+			switch (c) {
+				case '\b' :
+					buffer.append("\\b"); //$NON-NLS-1$
+					break;
+				case '\t' :
+					buffer.append("\\t"); //$NON-NLS-1$
+					break;
+				case '\n' :
+					buffer.append("\\n"); //$NON-NLS-1$
+					break;
+				case '\f' :
+					buffer.append("\\f"); //$NON-NLS-1$
+					break;
+				case '\r' :
+					buffer.append("\\r"); //$NON-NLS-1$
+					break;
+				case '\0' :
+					buffer.append("\\0"); //$NON-NLS-1$
+					break;
+				case '\1' :
+					buffer.append("\\1"); //$NON-NLS-1$
+					break;
+				case '\2' :
+					buffer.append("\\2"); //$NON-NLS-1$
+					break;
+				case '\3' :
+					buffer.append("\\3"); //$NON-NLS-1$
+					break;
+				case '\4' :
+					buffer.append("\\4"); //$NON-NLS-1$
+					break;
+				case '\5' :
+					buffer.append("\\5"); //$NON-NLS-1$
+					break;
+				case '\6' :
+					buffer.append("\\6"); //$NON-NLS-1$
+					break;
+				case '\7' :
+					buffer.append("\\7"); //$NON-NLS-1$
+					break;
+				default :
+					buffer.append(c);
+			}
+		}
+		return buffer.toString();
+	}
+
+	static String decodeStringValue(char[] chars) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0, max = chars.length; i < max; i++) {
+			char c = chars[i];
+			switch (c) {
+				case '\b' :
+					buffer.append("\\b"); //$NON-NLS-1$
+					break;
+				case '\t' :
+					buffer.append("\\t"); //$NON-NLS-1$
+					break;
+				case '\n' :
+					buffer.append("\\n"); //$NON-NLS-1$
+					break;
+				case '\f' :
+					buffer.append("\\f"); //$NON-NLS-1$
+					break;
+				case '\r' :
+					buffer.append("\\r"); //$NON-NLS-1$
+					break;
+				case '\0' :
+					buffer.append("\\0"); //$NON-NLS-1$
+					break;
+				case '\1' :
+					buffer.append("\\1"); //$NON-NLS-1$
+					break;
+				case '\2' :
+					buffer.append("\\2"); //$NON-NLS-1$
+					break;
+				case '\3' :
+					buffer.append("\\3"); //$NON-NLS-1$
+					break;
+				case '\4' :
+					buffer.append("\\4"); //$NON-NLS-1$
+					break;
+				case '\5' :
+					buffer.append("\\5"); //$NON-NLS-1$
+					break;
+				case '\6' :
+					buffer.append("\\6"); //$NON-NLS-1$
+					break;
+				case '\7' :
+					buffer.append("\\7"); //$NON-NLS-1$
+					break;
+				default :
+					buffer.append(c);
+			}
+		}
+		return buffer.toString();
+	}
+
+	static String decodeStringValue(String s) {
+		return decodeStringValue(s.toCharArray());
+	}
+
+	/*
+	 * @see org.eclipse.jdt.core.util.ClassFileBytesDisassembler#disassemble(byte[], java.lang.String, int)
+	 */
+	public String disassemble(byte[] classFileBytes, String lineSeparator, int mode) throws ClassFormatException {
+		try {
+			return disassemble(new ClassFileReader(classFileBytes, ClassFileReader.ALL), lineSeparator, mode);
+		} catch (ArrayIndexOutOfBoundsException e) {
+			throw new ClassFormatException(e.getMessage(), e);
+		}
+	}
+
+	private void disassemble(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
+		buffer.append(NLS.bind(Messages.disassembler_annotationentrystart, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode))}));
+		final AnnotationComponent[] components = annotation.getComponents();
+		for (int i = 0, max = components.length; i < max; i++) {
+			disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_annotationentryend);
+	}
+
+	private void disassemble(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(NLS.bind(Messages.disassembler_annotationcomponent, new String[] {new String(annotationComponent.getComponentName())}));
+		disassemble(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
+	}
+
+	private void disassemble(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		switch (annotationComponentValue.getTag()) {
+			case AnnotationComponentValue.BYTE_TAG :
+			case AnnotationComponentValue.CHAR_TAG :
+			case AnnotationComponentValue.DOUBLE_TAG :
+			case AnnotationComponentValue.FLOAT_TAG :
+			case AnnotationComponentValue.INTEGER_TAG :
+			case AnnotationComponentValue.LONG_TAG :
+			case AnnotationComponentValue.SHORT_TAG :
+			case AnnotationComponentValue.BOOLEAN_TAG :
+			case AnnotationComponentValue.STRING_TAG :
+				ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
+				String value = null;
+				switch (constantPoolEntry.getKind()) {
+					case ConstantPoolConstant.CONSTANT_Long :
+						value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
+						break;
+					case ConstantPoolConstant.CONSTANT_Float :
+						value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
+						break;
+					case ConstantPoolConstant.CONSTANT_Double :
+						value = Double.toString(constantPoolEntry.getDoubleValue());
+						break;
+					case ConstantPoolConstant.CONSTANT_Integer :
+						switch (annotationComponentValue.getTag()) {
+							case AnnotationComponentValue.CHAR_TAG :
+								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
+								break;
+							case AnnotationComponentValue.BOOLEAN_TAG :
+								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
+								break;
+							case AnnotationComponentValue.BYTE_TAG :
+								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								break;
+							case AnnotationComponentValue.SHORT_TAG :
+								value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								break;
+							case AnnotationComponentValue.INTEGER_TAG :
+								value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+						}
+						break;
+					case ConstantPoolConstant.CONSTANT_Utf8 :
+						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
+				}
+				buffer.append(NLS.bind(Messages.disassembler_annotationdefaultvalue, value));
+				break;
+			case AnnotationComponentValue.ENUM_TAG :
+				final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
+				final char[] constantName = annotationComponentValue.getEnumConstantName();
+				buffer.append(NLS.bind(Messages.disassembler_annotationenumvalue, new String[] {new String(returnClassName(Signature.toCharArray(typeName), '.', mode)), new String(constantName)}));
+				break;
+			case AnnotationComponentValue.CLASS_TAG :
+				constantPoolEntry = annotationComponentValue.getClassInfo();
+				final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
+				buffer.append(NLS.bind(Messages.disassembler_annotationclassvalue, new String[] {new String(returnClassName(Signature.toCharArray(className), '.', mode))}));
+				break;
+			case AnnotationComponentValue.ANNOTATION_TAG :
+				buffer.append(Messages.disassembler_annotationannotationvalue);
+				Annotation annotation = annotationComponentValue.getAnnotationValue();
+				disassemble(annotation, buffer, lineSeparator, tabNumber + 1, mode);
+				break;
+			case AnnotationComponentValue.ARRAY_TAG :
+				buffer.append(Messages.disassembler_annotationarrayvaluestart);
+				final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
+				for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
+					writeNewLine(buffer, lineSeparator, tabNumber + 1);
+					disassemble(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
+				}
+				writeNewLine(buffer, lineSeparator, tabNumber + 1);
+				buffer.append(Messages.disassembler_annotationarrayvalueend);
+		}
+	}
+
+	private void disassemble(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_annotationdefaultheader);
+		AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
+		writeNewLine(buffer, lineSeparator, tabNumber + 2);
+		disassemble(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
+	}
+
+	/**
+	 * Disassemble a method info header
+	 */
+	private void disassemble(ClassFileReader classFileReader, char[] className, MethodInfo methodInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber);
+		final CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
+		final char[] methodDescriptor = methodInfo.getDescriptor();
+		final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(methodInfo, AttributeNamesConstants.SIGNATURE);
+		final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
+		final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
+		final ClassFileAttribute runtimeVisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS);
+		final ClassFileAttribute runtimeInvisibleParameterAnnotationsAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS);
+		final ClassFileAttribute annotationDefaultAttribute = Utility.getAttribute(methodInfo, AttributeNamesConstants.ANNOTATION_DEFAULT);
+		if (checkMode(mode, DETAILED)) {
+			buffer.append(NLS.bind(Messages.classfileformat_methoddescriptor, new String[] {new String(methodDescriptor)}));
+			if (methodInfo.isDeprecated()) {
+				buffer.append(Messages.disassembler_deprecated);
+			}
+			writeNewLine(buffer, lineSeparator, tabNumber);
+			if (signatureAttribute != null) {
+				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+			if (codeAttribute != null) {
+				buffer.append(NLS.bind(Messages.classfileformat_stacksAndLocals, new String[] {Integer.toString(codeAttribute.getMaxStack()), Integer.toString(codeAttribute.getMaxLocals())}));
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+			// disassemble compact version of annotations
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+		}
+		final int accessFlags = methodInfo.getAccessFlags();
+		decodeModifiersForMethod(buffer, accessFlags);
+		if (methodInfo.isSynthetic()) {
+			buffer.append("synthetic"); //$NON-NLS-1$
+			buffer.append(Messages.disassembler_space);
+		}
+		CharOperation.replace(methodDescriptor, '/', '.');
+		final boolean isVarArgs = isVarArgs(methodInfo);
+		char[] methodHeader = null;
+		if (methodInfo.isConstructor()) {
+			methodHeader = Signature.toCharArray(methodDescriptor, returnClassName(className, '.', COMPACT), null, !checkMode(mode, COMPACT), false, isVarArgs);
+		} else if (methodInfo.isClinit()) {
+			methodHeader = Messages.classfileformat_clinitname.toCharArray();
+		} else {
+			methodHeader = Signature.toCharArray(methodDescriptor, methodInfo.getName(), null, !checkMode(mode, COMPACT), true, isVarArgs);
+		}
+		if (checkMode(mode, DETAILED) && (runtimeInvisibleParameterAnnotationsAttribute != null || runtimeVisibleParameterAnnotationsAttribute != null)) {
+			ParameterAnnotation[] invisibleParameterAnnotations = null;
+			ParameterAnnotation[] visibleParameterAnnotations = null;
+			int length = -1;
+			if (runtimeInvisibleParameterAnnotationsAttribute != null) {
+				RuntimeInvisibleParameterAnnotationsAttribute attribute = (RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute;
+				invisibleParameterAnnotations = attribute.getParameterAnnotations();
+				length = invisibleParameterAnnotations.length;
+			}
+			if (runtimeVisibleParameterAnnotationsAttribute != null) {
+				RuntimeVisibleParameterAnnotationsAttribute attribute = (RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute;
+				visibleParameterAnnotations = attribute.getParameterAnnotations();
+				length = visibleParameterAnnotations.length;
+			}
+			int insertionPosition = CharOperation.indexOf('(', methodHeader) + 1;
+			int start = 0;
+			StringBuffer stringBuffer = new StringBuffer();
+			stringBuffer.append(methodHeader, 0, insertionPosition);
+			for (int i = 0; i < length; i++) {
+				if (i > 0) {
+					stringBuffer.append(' ');
+				}
+				int stringBufferSize = stringBuffer.length();
+				if (runtimeVisibleParameterAnnotationsAttribute != null) {
+					disassembleAsModifier((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
+				}
+				if (runtimeInvisibleParameterAnnotationsAttribute != null) {
+					if (stringBuffer.length() != stringBufferSize) {
+						stringBuffer.append(' ');
+						stringBufferSize = stringBuffer.length();
+					}
+					disassembleAsModifier((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, stringBuffer, i, lineSeparator, tabNumber, mode);
+				}
+				if (i == 0 && stringBuffer.length() != stringBufferSize) {
+					stringBuffer.append(' ');
+				}
+				start = insertionPosition;
+				insertionPosition = CharOperation.indexOf(',', methodHeader, start + 1) + 1;
+				if (insertionPosition == 0) {
+					stringBuffer.append(methodHeader, start, methodHeader.length - start);
+				} else {
+					stringBuffer.append(methodHeader, start, insertionPosition - start);
+				}
+			}
+			buffer.append(stringBuffer);
+		} else {
+			buffer.append(methodHeader);
+		}
+		ExceptionAttribute exceptionAttribute = methodInfo.getExceptionAttribute();
+		if (exceptionAttribute != null) {
+			buffer.append(" throws "); //$NON-NLS-1$
+			char[][] exceptionNames = exceptionAttribute.getExceptionNames();
+			int length = exceptionNames.length;
+			for (int i = 0; i < length; i++) {
+				if (i != 0) {
+					buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
+				}
+				char[] exceptionName = exceptionNames[i];
+				CharOperation.replace(exceptionName, '/', '.');
+				buffer.append(returnClassName(exceptionName, '.', mode));
+			}
+		}
+		if (checkMode(mode, DETAILED)) {
+			if (annotationDefaultAttribute != null) {
+				buffer.append(" default "); //$NON-NLS-1$
+				disassembleAsModifier((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+		}
+		buffer.append(Messages.disassembler_endofmethodheader);
+
+		if (checkMode(mode, DETAILED)) {
+			if (codeAttribute != null) {
+				disassemble(codeAttribute, methodDescriptor, (accessFlags & IModifierConstants.ACC_STATIC) != 0, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (annotationDefaultAttribute != null) {
+				disassemble((AnnotationDefaultAttribute) annotationDefaultAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeVisibleParameterAnnotationsAttribute != null) {
+				disassemble((RuntimeVisibleParameterAnnotationsAttribute) runtimeVisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeInvisibleParameterAnnotationsAttribute != null) {
+				disassemble((RuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+		}
+	}
+
+	/**
+	 * Answers back the disassembled string of the ClassFileReader according to the
+	 * mode.
+	 * This is an output quite similar to the javap tool.
+	 *
+	 * @param classFileReader The classFileReader to be disassembled
+	 * @param lineSeparator the line separator to use.
+	 * @param mode the mode used to disassemble the ClassFileReader
+	 *
+	 * @return the disassembled string of the ClassFileReader according to the mode
+	 */
+	private String disassemble(ClassFileReader classFileReader, String lineSeparator, int mode) {
+		if (classFileReader == null)
+			return Utility.EMPTY_STRING;
+		char[] className = classFileReader.getClassName();
+		if (className == null) {
+			// incomplete initialization. We cannot go further.
+			return Utility.EMPTY_STRING;
+		}
+		className = CharOperation.replaceOnCopy(className, '/', '.');
+		final int accessFlags = classFileReader.getAccessFlags();
+		final boolean isEnum = (accessFlags & IModifierConstants.ACC_ENUM) != 0;
+
+		StringBuffer buffer = new StringBuffer();
+		SourceFileAttribute sourceAttribute = classFileReader.getSourceFileAttribute();
+		ClassFileAttribute classFileAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.SIGNATURE);
+		SignatureAttribute signatureAttribute = (SignatureAttribute) classFileAttribute;
+		if (checkMode(mode, DETAILED)) {
+			int minorVersion = classFileReader.getMinorVersion();
+			int majorVersion = classFileReader.getMajorVersion();
+			buffer.append(Messages.disassembler_begincommentline);
+			if (sourceAttribute != null) {
+				buffer.append(Messages.disassembler_sourceattributeheader);
+				buffer.append(sourceAttribute.getSourceFileName());
+			}
+			String versionNumber = VERSION_UNKNOWN;
+			if (minorVersion == 3 && majorVersion == 45) {
+				versionNumber = IModifierConstants.VERSION_1_1;
+			} else if (minorVersion == 0 && majorVersion == 46) {
+				versionNumber = IModifierConstants.VERSION_1_2;
+			} else if (minorVersion == 0 && majorVersion == 47) {
+				versionNumber = IModifierConstants.VERSION_1_3;
+			} else if (minorVersion == 0 && majorVersion == 48) {
+				versionNumber = IModifierConstants.VERSION_1_4;
+			} else if (minorVersion == 0 && majorVersion == 49) {
+				versionNumber = IModifierConstants.VERSION_1_5;
+			} else if (minorVersion == 0 && majorVersion == 50) {
+				versionNumber = IModifierConstants.VERSION_1_6;
+			} else if (minorVersion == 0 && majorVersion == 51) {
+				versionNumber = IModifierConstants.VERSION_1_7;
+			}
+			buffer.append(NLS.bind(Messages.classfileformat_versiondetails, new String[] {versionNumber, Integer.toString(majorVersion), Integer.toString(minorVersion), ((accessFlags & IModifierConstants.ACC_SUPER) != 0 ? Messages.classfileformat_superflagisset : Messages.classfileformat_superflagisnotset) + (isDeprecated(classFileReader) ? ", deprecated" : Utility.EMPTY_STRING)//$NON-NLS-1$
+			}));
+			writeNewLine(buffer, lineSeparator, 0);
+			if (signatureAttribute != null) {
+				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
+				writeNewLine(buffer, lineSeparator, 0);
+			}
+		}
+
+		InnerClassesAttribute innerClassesAttribute = classFileReader.getInnerClassesAttribute();
+		ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
+		ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(classFileReader, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
+
+		if (checkMode(mode, DETAILED)) {
+			// disassemble compact version of annotations
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+				writeNewLine(buffer, lineSeparator, 0);
+			}
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+				writeNewLine(buffer, lineSeparator, 0);
+			}
+		}
+		boolean decoded = false;
+		if (innerClassesAttribute != null) {
+			// search the right entry
+			InnerClassesAttributeEntry[] entries = innerClassesAttribute.getInnerClassAttributesEntries();
+			for (int i = 0, max = entries.length; i < max; i++) {
+				InnerClassesAttributeEntry entry = entries[i];
+				char[] innerClassName = entry.getInnerClassName();
+				if (innerClassName != null) {
+					if (Arrays.equals(classFileReader.getClassName(), innerClassName)) {
+						decodeModifiersForInnerClasses(buffer, entry.getAccessFlags(), false);
+						decoded = true;
+					}
+				}
+			}
+		}
+		if (!decoded) {
+			decodeModifiersForType(buffer, accessFlags);
+			if (isSynthetic(classFileReader)) {
+				buffer.append("synthetic"); //$NON-NLS-1$
+				buffer.append(Messages.disassembler_space);
+			}
+		}
+
+		final boolean isAnnotation = (accessFlags & IModifierConstants.ACC_ANNOTATION) != 0;
+		boolean isInterface = false;
+		if (isEnum) {
+			buffer.append("enum "); //$NON-NLS-1$
+		} else if (classFileReader.isClass()) {
+			buffer.append("class "); //$NON-NLS-1$
+		} else {
+			if (isAnnotation) {
+				buffer.append("@"); //$NON-NLS-1$
+			}
+			buffer.append("interface "); //$NON-NLS-1$
+			isInterface = true;
+		}
+
+		buffer.append(className);
+
+		char[] superclassName = classFileReader.getSuperclassName();
+		if (superclassName != null) {
+			CharOperation.replace(superclassName, '/', '.');
+			if (!isJavaLangObject(superclassName) && !isEnum) {
+				buffer.append(" extends "); //$NON-NLS-1$
+				buffer.append(returnClassName(superclassName, '.', mode));
+			}
+		}
+		if (!isAnnotation) {
+			char[][] superclassInterfaces = classFileReader.getInterfaceNames();
+			int length = superclassInterfaces.length;
+			if (length != 0) {
+				if (isInterface) {
+					buffer.append(" extends "); //$NON-NLS-1$
+				} else {
+					buffer.append(" implements "); //$NON-NLS-1$
+				}
+				for (int i = 0; i < length; i++) {
+					if (i != 0) {
+						buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space);
+					}
+					char[] superinterface = superclassInterfaces[i];
+					CharOperation.replace(superinterface, '/', '.');
+					buffer.append(returnClassName(superinterface, '.', mode));
+				}
+			}
+		}
+		buffer.append(Messages.disassembler_opentypedeclaration);
+		disassembleTypeMembers(classFileReader, className, buffer, lineSeparator, 1, mode, isEnum);
+		if (checkMode(mode, DETAILED)) {
+			ClassFileAttribute[] attributes = classFileReader.getAttributes();
+			int length = attributes.length;
+			EnclosingMethodAttribute enclosingMethodAttribute = getEnclosingMethodAttribute(classFileReader);
+			int remainingAttributesLength = length;
+			if (innerClassesAttribute != null) {
+				remainingAttributesLength--;
+			}
+			if (enclosingMethodAttribute != null) {
+				remainingAttributesLength--;
+			}
+			if (sourceAttribute != null) {
+				remainingAttributesLength--;
+			}
+			if (signatureAttribute != null) {
+				remainingAttributesLength--;
+			}
+			if (innerClassesAttribute != null || enclosingMethodAttribute != null || remainingAttributesLength != 0) {
+				writeNewLine(buffer, lineSeparator, 0);
+			}
+			if (innerClassesAttribute != null) {
+				disassemble(innerClassesAttribute, buffer, lineSeparator, 1);
+			}
+			if (enclosingMethodAttribute != null) {
+				disassemble(enclosingMethodAttribute, buffer, lineSeparator, 0);
+			}
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+			}
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+			}
+		}
+		writeNewLine(buffer, lineSeparator, 0);
+		buffer.append(Messages.disassembler_closetypedeclaration);
+		return buffer.toString();
+	}
+
+	private boolean isJavaLangObject(final char[] className) {
+		return Arrays.equals(TypeConstants.JAVA_LANG_OBJECT, CharOperation.splitOn('.', className));
+	}
+
+	private boolean isVarArgs(MethodInfo methodInfo) {
+		int accessFlags = methodInfo.getAccessFlags();
+		if ((accessFlags & IModifierConstants.ACC_VARARGS) != 0)
+			return true;
+		// check the presence of the unspecified Varargs attribute
+		return Utility.getAttribute(methodInfo, AttributeNamesConstants.VAR_ARGS) != null;
+	}
+
+	private void disassemble(CodeAttribute codeAttribute, char[] methodDescriptor, boolean isStatic, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber - 1);
+		DefaultBytecodeVisitor visitor = new DefaultBytecodeVisitor(codeAttribute, methodDescriptor, isStatic, buffer, lineSeparator, tabNumber, mode);
+		try {
+			codeAttribute.traverse(visitor);
+		} catch (ClassFormatException e) {
+			dumpTab(tabNumber + 2, buffer);
+			buffer.append(Messages.classformat_classformatexception);
+			writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		}
+		final int exceptionTableLength = codeAttribute.getExceptionTableLength();
+		if (exceptionTableLength != 0) {
+			final int tabNumberForExceptionAttribute = tabNumber + 2;
+			dumpTab(tabNumberForExceptionAttribute, buffer);
+			final ExceptionTableEntry[] exceptionTableEntries = codeAttribute.getExceptionTable();
+			buffer.append(Messages.disassembler_exceptiontableheader);
+			writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
+			for (int i = 0; i < exceptionTableLength; i++) {
+				if (i != 0) {
+					writeNewLine(buffer, lineSeparator, tabNumberForExceptionAttribute + 1);
+				}
+				ExceptionTableEntry exceptionTableEntry = exceptionTableEntries[i];
+				char[] catchType;
+				if (exceptionTableEntry.getCatchTypeIndex() != 0) {
+					catchType = exceptionTableEntry.getCatchType();
+					CharOperation.replace(catchType, '/', '.');
+					catchType = returnClassName(catchType, '.', mode);
+				} else {
+					catchType = ANY_EXCEPTION;
+				}
+				buffer.append(NLS.bind(Messages.classfileformat_exceptiontableentry, new String[] {Integer.toString(exceptionTableEntry.getStartPC()), Integer.toString(exceptionTableEntry.getEndPC()), Integer.toString(exceptionTableEntry.getHandlerPC()), new String(catchType),}));
+			}
+		}
+	}
+
+	private void disassemble(EnclosingMethodAttribute enclosingMethodAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_enclosingmethodheader);
+		buffer.append(" ")//$NON-NLS-1$
+				.append(enclosingMethodAttribute.getEnclosingClass());
+		if (enclosingMethodAttribute.getMethodNameAndTypeIndex() != 0) {
+			buffer.append(".")//$NON-NLS-1$
+					.append(enclosingMethodAttribute.getMethodName()).append(enclosingMethodAttribute.getMethodDescriptor());
+		}
+	}
+
+	/**
+	 * Disassemble a field info
+	 */
+	private void disassemble(FieldInfo fieldInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber);
+		final char[] fieldDescriptor = fieldInfo.getDescriptor();
+		final SignatureAttribute signatureAttribute = (SignatureAttribute) Utility.getAttribute(fieldInfo, AttributeNamesConstants.SIGNATURE);
+		if (checkMode(mode, DETAILED)) {
+			buffer.append(NLS.bind(Messages.classfileformat_fieldddescriptor, new String[] {new String(fieldDescriptor)}));
+			if (fieldInfo.isDeprecated()) {
+				buffer.append(Messages.disassembler_deprecated);
+			}
+			writeNewLine(buffer, lineSeparator, tabNumber);
+			if (signatureAttribute != null) {
+				buffer.append(NLS.bind(Messages.disassembler_signatureattributeheader, new String(signatureAttribute.getSignature())));
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+		}
+		final ClassFileAttribute runtimeVisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
+		final ClassFileAttribute runtimeInvisibleAnnotationsAttribute = Utility.getAttribute(fieldInfo, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
+		if (checkMode(mode, DETAILED)) {
+			// disassemble compact version of annotations
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassembleAsModifier((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+		}
+		decodeModifiersForField(buffer, fieldInfo.getAccessFlags());
+		if (fieldInfo.isSynthetic()) {
+			buffer.append("synthetic"); //$NON-NLS-1$
+			buffer.append(Messages.disassembler_space);
+		}
+		buffer.append(returnClassName(getSignatureForField(fieldDescriptor), '.', mode));
+		buffer.append(' ');
+		buffer.append(new String(fieldInfo.getName()));
+		ConstantValueAttribute constantValueAttribute = fieldInfo.getConstantValueAttribute();
+		if (constantValueAttribute != null) {
+			buffer.append(Messages.disassembler_fieldhasconstant);
+			ConstantPoolEntry constantPoolEntry = constantValueAttribute.getConstantValue();
+			switch (constantPoolEntry.getKind()) {
+				case ConstantPoolConstant.CONSTANT_Long :
+					buffer.append(constantPoolEntry.getLongValue() + "L"); //$NON-NLS-1$
+					break;
+				case ConstantPoolConstant.CONSTANT_Float :
+					buffer.append(constantPoolEntry.getFloatValue() + "f"); //$NON-NLS-1$
+					break;
+				case ConstantPoolConstant.CONSTANT_Double :
+					buffer.append(constantPoolEntry.getDoubleValue());
+					break;
+				case ConstantPoolConstant.CONSTANT_Integer :
+					switch (fieldDescriptor[0]) {
+						case 'C' :
+							buffer.append("'" + (char) constantPoolEntry.getIntegerValue() + "'"); //$NON-NLS-1$//$NON-NLS-2$
+							break;
+						case 'Z' :
+							buffer.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
+							break;
+						case 'B' :
+							buffer.append(constantPoolEntry.getIntegerValue());
+							break;
+						case 'S' :
+							buffer.append(constantPoolEntry.getIntegerValue());
+							break;
+						case 'I' :
+							buffer.append(constantPoolEntry.getIntegerValue());
+					}
+					break;
+				case ConstantPoolConstant.CONSTANT_String :
+					buffer.append("\"" + decodeStringValue(constantPoolEntry.getStringValue()) + "\"");//$NON-NLS-1$//$NON-NLS-2$
+			}
+		}
+		buffer.append(Messages.disassembler_endoffieldheader);
+		if (checkMode(mode, DETAILED)) {
+			if (runtimeVisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeVisibleAnnotationsAttribute) runtimeVisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeInvisibleAnnotationsAttribute != null) {
+				disassemble((RuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+		}
+	}
+
+	private void disassemble(InnerClassesAttribute innerClassesAttribute, StringBuffer buffer, String lineSeparator, int tabNumber) {
+		writeNewLine(buffer, lineSeparator, tabNumber);
+		buffer.append(Messages.disassembler_innerattributesheader);
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		InnerClassesAttributeEntry[] innerClassesAttributeEntries = innerClassesAttribute.getInnerClassAttributesEntries();
+		int length = innerClassesAttributeEntries.length;
+		int innerClassNameIndex, outerClassNameIndex, innerNameIndex, accessFlags;
+		InnerClassesAttributeEntry innerClassesAttributeEntry;
+		if (length > 1) {
+			final char[] EMPTY_CHAR_ARRAY = Utility.EMPTY_STRING.toCharArray();
+			Arrays.sort(innerClassesAttributeEntries, new Comparator<InnerClassesAttributeEntry>() {
+				public int compare(InnerClassesAttributeEntry o1, InnerClassesAttributeEntry o2) {
+					final char[] innerClassName1 = o1.getInnerClassName();
+					final char[] innerClassName2 = o2.getInnerClassName();
+					final char[] innerName1 = o1.getInnerName();
+					final char[] innerName2 = o2.getInnerName();
+					final char[] outerClassName1 = o1.getOuterClassName();
+					final char[] outerClassName2 = o2.getOuterClassName();
+					StringBuffer buffer1 = new StringBuffer();
+					buffer1.append(innerClassName1 == null ? EMPTY_CHAR_ARRAY : innerClassName1);
+					buffer1.append(innerName1 == null ? EMPTY_CHAR_ARRAY : innerName1);
+					buffer1.append(outerClassName1 == null ? EMPTY_CHAR_ARRAY : outerClassName1);
+					StringBuffer buffer2 = new StringBuffer();
+					buffer2.append(innerClassName2 == null ? EMPTY_CHAR_ARRAY : innerClassName2);
+					buffer2.append(innerName2 == null ? EMPTY_CHAR_ARRAY : innerName2);
+					buffer2.append(outerClassName2 == null ? EMPTY_CHAR_ARRAY : outerClassName2);
+					return buffer1.toString().compareTo(buffer2.toString());
+				}
+			});
+		}
+		for (int i = 0; i < length; i++) {
+			if (i != 0) {
+				buffer.append(Messages.disassembler_comma);
+				writeNewLine(buffer, lineSeparator, tabNumber + 1);
+			}
+			innerClassesAttributeEntry = innerClassesAttributeEntries[i];
+			innerClassNameIndex = innerClassesAttributeEntry.getInnerClassNameIndex();
+			outerClassNameIndex = innerClassesAttributeEntry.getOuterClassNameIndex();
+			innerNameIndex = innerClassesAttributeEntry.getInnerNameIndex();
+			accessFlags = innerClassesAttributeEntry.getAccessFlags();
+			buffer.append(Messages.disassembler_openinnerclassentry).append(Messages.disassembler_inner_class_info_name);
+			if (innerClassNameIndex != 0) {
+				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerClassName());
+			}
+			buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_outer_class_info_name);
+			if (outerClassNameIndex != 0) {
+				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getOuterClassName());
+			}
+			writeNewLine(buffer, lineSeparator, tabNumber);
+			dumpTab(tabNumber, buffer);
+			buffer.append(Messages.disassembler_space);
+			buffer.append(Messages.disassembler_inner_name);
+			if (innerNameIndex != 0) {
+				buffer.append(Messages.disassembler_space).append(innerClassesAttributeEntry.getInnerName());
+			}
+			buffer.append(Messages.disassembler_comma).append(Messages.disassembler_space).append(Messages.disassembler_inner_accessflags).append(accessFlags).append(Messages.disassembler_space);
+			decodeModifiersForInnerClasses(buffer, accessFlags, true);
+			buffer.append(Messages.disassembler_closeinnerclassentry);
+		}
+	}
+
+	private void disassemble(int index, ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		Annotation[] annotations = parameterAnnotation.getAnnotations();
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(NLS.bind(Messages.disassembler_parameterannotationentrystart, new String[] {Integer.toString(index), Integer.toString(annotations.length)}));
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassemble(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimeinvisibleannotationsattributeheader);
+		Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassemble(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimeinvisibleparameterannotationsattributeheader);
+		ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
+		for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
+			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassemble(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimevisibleannotationsattributeheader);
+		Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			disassemble(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassemble(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimevisibleparameterannotationsattributeheader);
+		ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
+		for (int i = 0, max = parameterAnnotations.length; i < max; i++) {
+			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleAsModifier(Annotation annotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		final char[] typeName = CharOperation.replaceOnCopy(annotation.getTypeName(), '/', '.');
+		buffer.append('@').append(returnClassName(Signature.toCharArray(typeName), '.', mode));
+		final AnnotationComponent[] components = annotation.getComponents();
+		final int length = components.length;
+		if (length != 0) {
+			buffer.append('(');
+			for (int i = 0; i < length; i++) {
+				if (i > 0) {
+					buffer.append(',');
+					writeNewLine(buffer, lineSeparator, tabNumber);
+				}
+				disassembleAsModifier(components[i], buffer, lineSeparator, tabNumber + 1, mode);
+			}
+			buffer.append(')');
+		}
+	}
+
+	private void disassembleAsModifier(AnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		buffer.append(annotationComponent.getComponentName()).append('=');
+		disassembleAsModifier(annotationComponent.getComponentValue(), buffer, lineSeparator, tabNumber + 1, mode);
+	}
+
+	private void disassembleAsModifier(AnnotationComponentValue annotationComponentValue, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		switch (annotationComponentValue.getTag()) {
+			case AnnotationComponentValue.BYTE_TAG :
+			case AnnotationComponentValue.CHAR_TAG :
+			case AnnotationComponentValue.DOUBLE_TAG :
+			case AnnotationComponentValue.FLOAT_TAG :
+			case AnnotationComponentValue.INTEGER_TAG :
+			case AnnotationComponentValue.LONG_TAG :
+			case AnnotationComponentValue.SHORT_TAG :
+			case AnnotationComponentValue.BOOLEAN_TAG :
+			case AnnotationComponentValue.STRING_TAG :
+				ConstantPoolEntry constantPoolEntry = annotationComponentValue.getConstantValue();
+				String value = null;
+				switch (constantPoolEntry.getKind()) {
+					case ConstantPoolConstant.CONSTANT_Long :
+						value = constantPoolEntry.getLongValue() + "L"; //$NON-NLS-1$
+						break;
+					case ConstantPoolConstant.CONSTANT_Float :
+						value = constantPoolEntry.getFloatValue() + "f"; //$NON-NLS-1$
+						break;
+					case ConstantPoolConstant.CONSTANT_Double :
+						value = Double.toString(constantPoolEntry.getDoubleValue());
+						break;
+					case ConstantPoolConstant.CONSTANT_Integer :
+						switch (annotationComponentValue.getTag()) {
+							case AnnotationComponentValue.CHAR_TAG :
+								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
+								break;
+							case AnnotationComponentValue.BOOLEAN_TAG :
+								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
+								break;
+							case AnnotationComponentValue.BYTE_TAG :
+								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								break;
+							case AnnotationComponentValue.SHORT_TAG :
+								value = "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								break;
+							case AnnotationComponentValue.INTEGER_TAG :
+								value = "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+						}
+						break;
+					case ConstantPoolConstant.CONSTANT_Utf8 :
+						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
+				}
+				buffer.append(value);
+				break;
+			case AnnotationComponentValue.ENUM_TAG :
+				final char[] typeName = CharOperation.replaceOnCopy(annotationComponentValue.getEnumConstantTypeName(), '/', '.');
+				final char[] constantName = annotationComponentValue.getEnumConstantName();
+				buffer.append(returnClassName(Signature.toCharArray(typeName), '.', mode)).append('.').append(constantName);
+				break;
+			case AnnotationComponentValue.CLASS_TAG :
+				constantPoolEntry = annotationComponentValue.getClassInfo();
+				final char[] className = CharOperation.replaceOnCopy(constantPoolEntry.getUtf8Value(), '/', '.');
+				buffer.append(returnClassName(Signature.toCharArray(className), '.', mode));
+				break;
+			case AnnotationComponentValue.ANNOTATION_TAG :
+				Annotation annotation = annotationComponentValue.getAnnotationValue();
+				disassembleAsModifier(annotation, buffer, lineSeparator, tabNumber + 1, mode);
+				break;
+			case AnnotationComponentValue.ARRAY_TAG :
+				final AnnotationComponentValue[] annotationComponentValues = annotationComponentValue.getAnnotationComponentValues();
+				buffer.append('{');
+				for (int i = 0, max = annotationComponentValues.length; i < max; i++) {
+					if (i > 0) {
+						buffer.append(',');
+					}
+					disassembleAsModifier(annotationComponentValues[i], buffer, lineSeparator, tabNumber + 1, mode);
+				}
+				buffer.append('}');
+		}
+	}
+
+	private void disassembleAsModifier(AnnotationDefaultAttribute annotationDefaultAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		AnnotationComponentValue componentValue = annotationDefaultAttribute.getMemberValue();
+		disassembleAsModifier(componentValue, buffer, lineSeparator, tabNumber + 1, mode);
+	}
+
+	private void disassembleAsModifier(RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		Annotation[] annotations = runtimeInvisibleAnnotationsAttribute.getAnnotations();
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleAsModifier(RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
+		ParameterAnnotation[] parameterAnnotations = runtimeInvisibleParameterAnnotationsAttribute.getParameterAnnotations();
+		if (parameterAnnotations.length > index) {
+			disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleAsModifier(RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute, StringBuffer buffer, int index, String lineSeparator, int tabNumber, int mode) {
+		ParameterAnnotation[] parameterAnnotations = runtimeVisibleParameterAnnotationsAttribute.getParameterAnnotations();
+		if (parameterAnnotations.length > index) {
+			disassembleAsModifier(parameterAnnotations[index], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleAsModifier(ParameterAnnotation parameterAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		Annotation[] annotations = parameterAnnotation.getAnnotations();
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			if (i > 0) {
+				buffer.append(' ');
+			}
+			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleAsModifier(RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		Annotation[] annotations = runtimeVisibleAnnotationsAttribute.getAnnotations();
+		for (int i = 0, max = annotations.length; i < max; i++) {
+			if (i > 0) {
+				writeNewLine(buffer, lineSeparator, tabNumber);
+			}
+			disassembleAsModifier(annotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+
+	private void disassembleTypeMembers(ClassFileReader classFileReader, char[] className, StringBuffer buffer, String lineSeparator, int tabNumber, int mode, boolean isEnum) {
+		FieldInfo[] fields = classFileReader.getFieldInfos();
+		// sort fields
+		Arrays.sort(fields, new Comparator<FieldInfo>() {
+			public int compare(FieldInfo fieldInfo1, FieldInfo fieldInfo2) {
+				int compare = new String(fieldInfo1.getName()).compareTo(new String(fieldInfo2.getName()));
+				if (compare == 0) {
+					return new String(fieldInfo1.getDescriptor()).compareTo(new String(fieldInfo2.getDescriptor()));
+				}
+				return compare;
+			}
+		});
+		for (int i = 0, max = fields.length; i < max; i++) {
+			writeNewLine(buffer, lineSeparator, tabNumber);
+			disassemble(fields[i], buffer, lineSeparator, tabNumber, mode);
+		}
+		MethodInfo[] methods = classFileReader.getMethodInfos();
+		// sort methods
+		Arrays.sort(methods, new Comparator<MethodInfo>() {
+			public int compare(MethodInfo methodInfo1, MethodInfo methodInfo2) {
+				int compare = new String(methodInfo1.getName()).compareTo(new String(methodInfo2.getName()));
+				if (compare == 0) {
+					return new String(methodInfo1.getDescriptor()).compareTo(new String(methodInfo2.getDescriptor()));
+				}
+				return compare;
+			}
+		});
+		for (int i = 0, max = methods.length; i < max; i++) {
+			writeNewLine(buffer, lineSeparator, tabNumber);
+			disassemble(classFileReader, className, methods[i], buffer, lineSeparator, tabNumber, mode);
+		}
+	}
+
+	private final void dumpTab(int tabNumber, StringBuffer buffer) {
+		for (int i = 0; i < tabNumber; i++) {
+			buffer.append(Messages.disassembler_indentation);
+		}
+	}
+
+	private EnclosingMethodAttribute getEnclosingMethodAttribute(ClassFileReader classFileReader) {
+		ClassFileAttribute[] attributes = classFileReader.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.ENCLOSING_METHOD)) {
+				return (EnclosingMethodAttribute) attributes[i];
+			}
+		}
+		return null;
+	}
+
+	private char[] getSignatureForField(char[] fieldDescriptor) {
+		char[] newFieldDescriptor = CharOperation.replaceOnCopy(fieldDescriptor, '/', '.');
+		newFieldDescriptor = CharOperation.replaceOnCopy(newFieldDescriptor, '$', '%');
+		char[] fieldDescriptorSignature = Signature.toCharArray(newFieldDescriptor);
+		CharOperation.replace(fieldDescriptorSignature, '%', '$');
+		return fieldDescriptorSignature;
+	}
+
+	private boolean isDeprecated(ClassFileReader classFileReader) {
+		ClassFileAttribute[] attributes = classFileReader.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.DEPRECATED)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private boolean isSynthetic(ClassFileReader classFileReader) {
+		int flags = classFileReader.getAccessFlags();
+		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
+			return true;
+		}
+		ClassFileAttribute[] attributes = classFileReader.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), AttributeNamesConstants.SYNTHETIC)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private boolean checkMode(int mode, int flag) {
+		return (mode & flag) != 0;
+	}
+
+	private boolean isCompact(int mode) {
+		return (mode & Disassembler.COMPACT) != 0;
+	}
+
+	private char[] returnClassName(char[] classInfoName, char separator, int mode) {
+		if (classInfoName.length == 0) {
+			return CharOperation.NO_CHAR;
+		} else if (isCompact(mode)) {
+			int lastIndexOfSlash = CharOperation.lastIndexOf(separator, classInfoName);
+			if (lastIndexOfSlash != -1) {
+				return CharOperation.subarray(classInfoName, lastIndexOfSlash + 1, classInfoName.length);
+			}
+		}
+		return classInfoName;
+	}
+
+	private void writeNewLine(StringBuffer buffer, String lineSeparator, int tabNumber) {
+		buffer.append(lineSeparator);
+		dumpTab(tabNumber, buffer);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/EnclosingMethodAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/EnclosingMethodAttribute.java
new file mode 100644
index 0000000..a7daac7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/EnclosingMethodAttribute.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class EnclosingMethodAttribute extends ClassFileAttribute {
+
+	private int enclosingClassIndex;
+	private char[] enclosingClassName;
+	private int methodDescriptorIndex;
+	private char[] methodDescriptor;
+	private int methodNameIndex;
+	private char[] methodName;
+	private int methodNameAndTypeIndex;
+
+	EnclosingMethodAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		int index = u2At(classFileBytes, 6, offset);
+		this.enclosingClassIndex = index;
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.enclosingClassName = constantPoolEntry.getClassInfoName();
+		this.methodNameAndTypeIndex = u2At(classFileBytes, 8, offset);
+		if (this.methodNameAndTypeIndex != 0) {
+			constantPoolEntry = constantPool.decodeEntry(this.methodNameAndTypeIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_NameAndType) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.methodDescriptorIndex = constantPoolEntry.getNameAndTypeInfoDescriptorIndex();
+			this.methodNameIndex = constantPoolEntry.getNameAndTypeInfoNameIndex();
+			constantPoolEntry = constantPool.decodeEntry(this.methodDescriptorIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.methodDescriptor = constantPoolEntry.getUtf8Value();
+			constantPoolEntry = constantPool.decodeEntry(this.methodNameIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.methodName = constantPoolEntry.getUtf8Value();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getEnclosingClass()
+	 */
+	public char[] getEnclosingClass() {
+		return this.enclosingClassName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDeclaringClassDescriptorIndex()
+	 */
+	public int getEnclosingClassIndex() {
+		return this.enclosingClassIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptor()
+	 */
+	public char[] getMethodDescriptor() {
+		return this.methodDescriptor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodDescriptorIndex()
+	 */
+	public int getMethodDescriptorIndex() {
+		return this.methodDescriptorIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodName()
+	 */
+	public char[] getMethodName() {
+		return this.methodName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameIndex()
+	 */
+	public int getMethodNameIndex() {
+		return this.methodNameIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IEnclosingMethodAttribute#getMethodNameAndTypeIndex()
+	 */
+	public int getMethodNameAndTypeIndex() {
+		return this.methodNameAndTypeIndex;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionAttribute.java
new file mode 100644
index 0000000..7883c09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionAttribute.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ExceptionAttribute extends ClassFileAttribute {
+	private int exceptionsNumber;
+	private char[][] exceptionNames;
+	private int[] exceptionIndexes;
+
+	ExceptionAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.exceptionsNumber = u2At(classFileBytes, 6, offset);
+		int exceptionLength = this.exceptionsNumber;
+		this.exceptionNames = CharOperation.NO_CHAR_CHAR;
+		this.exceptionIndexes = Utility.EMPTY_INT_ARRAY;
+		if (exceptionLength != 0) {
+			this.exceptionNames = new char[exceptionLength][];
+			this.exceptionIndexes = new int[exceptionLength];
+		}
+		int readOffset = 8;
+		ConstantPoolEntry constantPoolEntry;
+		for (int i = 0; i < exceptionLength; i++) {
+			this.exceptionIndexes[i] = u2At(classFileBytes, readOffset, offset);
+			constantPoolEntry = constantPool.decodeEntry(this.exceptionIndexes[i]);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.exceptionNames[i] = constantPoolEntry.getClassInfoName();
+			readOffset += 2;
+		}
+	}
+
+	/*
+	 * @see IExceptionAttribute#getExceptionIndexes()
+	 */
+	public int[] getExceptionIndexes() {
+		return this.exceptionIndexes;
+	}
+
+	/*
+	 * @see IExceptionAttribute#getExceptionNames()
+	 */
+	public char[][] getExceptionNames() {
+		return this.exceptionNames;
+	}
+
+	/*
+	 * @see IExceptionAttribute#getExceptionsNumber()
+	 */
+	public int getExceptionsNumber() {
+		return this.exceptionsNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionTableEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionTableEntry.java
new file mode 100644
index 0000000..0598acf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ExceptionTableEntry.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ExceptionTableEntry extends ClassFileStruct {
+
+	private int startPC;
+	private int endPC;
+	private int handlerPC;
+	private int catchTypeIndex;
+	private char[] catchType;
+
+	ExceptionTableEntry(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		this.startPC = u2At(classFileBytes, 0, offset);
+		this.endPC = u2At(classFileBytes, 2, offset);
+		this.handlerPC = u2At(classFileBytes, 4, offset);
+		this.catchTypeIndex = u2At(classFileBytes, 6, offset);
+		if (this.catchTypeIndex != 0) {
+			ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.catchTypeIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.catchType = constantPoolEntry.getClassInfoName();
+		}
+	}
+
+	/*
+	 * @see IExceptionTableEntry#getStartPC()
+	 */
+	public int getStartPC() {
+		return this.startPC;
+	}
+
+	/*
+	 * @see IExceptionTableEntry#getEndPC()
+	 */
+	public int getEndPC() {
+		return this.endPC;
+	}
+
+	/*
+	 * @see IExceptionTableEntry#getHandlerPC()
+	 */
+	public int getHandlerPC() {
+		return this.handlerPC;
+	}
+
+	/*
+	 * @see IExceptionTableEntry#getCatchTypeIndex()
+	 */
+	public int getCatchTypeIndex() {
+		return this.catchTypeIndex;
+	}
+
+	/*
+	 * @see IExceptionTableEntry#getCatchType()
+	 */
+	public char[] getCatchType() {
+		return this.catchType;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/FieldInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/FieldInfo.java
new file mode 100644
index 0000000..46b79c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/FieldInfo.java
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.util.Arrays;
+
+public class FieldInfo extends ClassFileStruct {
+	private int accessFlags;
+	private int attributeBytes;
+	private ClassFileAttribute[] attributes;
+	private int attributesCount;
+	private ConstantValueAttribute constantValueAttribute;
+	private char[] descriptor;
+	private int descriptorIndex;
+	private boolean isDeprecated;
+	private boolean isSynthetic;
+	private char[] name;
+	private int nameIndex;
+
+	/*
+	 * @param classFileBytes byte[]
+	 * @param constantPool IConstantPool
+	 * @param offset int
+	 */
+	public FieldInfo(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
+		final int flags = u2At(classFileBytes, 0, offset);
+		this.accessFlags = flags;
+		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
+			this.isSynthetic = true;
+		}
+		this.nameIndex = u2At(classFileBytes, 2, offset);
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.name = constantPoolEntry.getUtf8Value();
+
+		this.descriptorIndex = u2At(classFileBytes, 4, offset);
+		constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.descriptor = constantPoolEntry.getUtf8Value();
+
+		this.attributesCount = u2At(classFileBytes, 6, offset);
+		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
+		int readOffset = 8;
+		if (this.attributesCount != 0) {
+			this.attributes = new ClassFileAttribute[this.attributesCount];
+		}
+		int attributesIndex = 0;
+		for (int i = 0; i < this.attributesCount; i++) {
+			constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			char[] attributeName = constantPoolEntry.getUtf8Value();
+			if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
+				this.isDeprecated = true;
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
+				this.isSynthetic = true;
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.CONSTANT_VALUE)) {
+				this.constantValueAttribute = new ConstantValueAttribute(classFileBytes, constantPool, offset + readOffset);
+				this.attributes[attributesIndex++] = this.constantValueAttribute;
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
+				this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else {
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			}
+			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
+		}
+
+		this.attributeBytes = readOffset;
+	}
+
+	/*
+	 * @see IFieldInfo#getAccessFlags()
+	 */
+	public int getAccessFlags() {
+		return this.accessFlags;
+	}
+
+	/*
+	 * @see IFieldInfo#getAttributeCount()
+	 */
+	public int getAttributeCount() {
+		return this.attributesCount;
+	}
+
+	/*
+	 * @see IFieldInfo#getAttributes()
+	 */
+	public ClassFileAttribute[] getAttributes() {
+		return this.attributes;
+	}
+
+	/*
+	 * @see IFieldInfo#getConstantValueAttribute()
+	 */
+	public ConstantValueAttribute getConstantValueAttribute() {
+		return this.constantValueAttribute;
+	}
+
+	/*
+	 * @see IFieldInfo#getDescriptor()
+	 */
+	public char[] getDescriptor() {
+		return this.descriptor;
+	}
+
+	/*
+	 * @see IFieldInfo#getDescriptorIndex()
+	 */
+	public int getDescriptorIndex() {
+		return this.descriptorIndex;
+	}
+
+	/*
+	 * @see IFieldInfo#getName()
+	 */
+	public char[] getName() {
+		return this.name;
+	}
+
+	/*
+	 * @see IFieldInfo#getNameIndex()
+	 */
+	public int getNameIndex() {
+		return this.nameIndex;
+	}
+
+	/*
+	 * @see IFieldInfo#hasConstantValueAttribute()
+	 */
+	public boolean hasConstantValueAttribute() {
+		return this.constantValueAttribute != null;
+	}
+
+	/*
+	 * @see IFieldInfo#isDeprecated()
+	 */
+	public boolean isDeprecated() {
+		return this.isDeprecated;
+	}
+
+	/*
+	 * @see IFieldInfo#isSynthetic()
+	 */
+	public boolean isSynthetic() {
+		return this.isSynthetic;
+	}
+
+	int sizeInBytes() {
+		return this.attributeBytes;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IModifierConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IModifierConstants.java
new file mode 100644
index 0000000..b869fdb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IModifierConstants.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public interface IModifierConstants {
+
+	int ACC_PUBLIC = 0x0001;
+	int ACC_PRIVATE = 0x0002;
+	int ACC_PROTECTED = 0x0004;
+	int ACC_STATIC = 0x0008;
+	int ACC_FINAL = 0x0010;
+	int ACC_SUPER = 0x0020;
+	int ACC_SYNCHRONIZED = 0x0020;
+	int ACC_VOLATILE = 0x0040;
+
+	/**
+	 * Indicates a bridge method (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	int ACC_BRIDGE = 0x0040;
+	int ACC_TRANSIENT = 0x0080;
+
+	/**
+	 * Indicates a variable arity method (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	int ACC_VARARGS = 0x0080;
+	int ACC_NATIVE = 0x0100;
+	int ACC_INTERFACE = 0x0200;
+	int ACC_ABSTRACT = 0x0400;
+	int ACC_STRICT = 0x0800;
+	/**
+	 * Indicates a synthetic member.
+	 * @since 3.0
+	 */
+	int ACC_SYNTHETIC = 0x1000;
+
+	/**
+	 * Indicates an annotation (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	int ACC_ANNOTATION = 0x2000;
+
+	/**
+	 * Indicates an enum (added in J2SE 1.5).
+	 * @since 3.0
+	 */
+	int ACC_ENUM = 0x4000;
+
+	/**
+	 * Configurable option value: {@value}.
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_1 = "1.1"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_2 = "1.2"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 2.0
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_3 = "1.3"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 2.0
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_4 = "1.4"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 3.0
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_5 = "1.5"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 3.2
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_6 = "1.6"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 3.3
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
+	 * @since 3.4
+	 * @category OptionValue
+	 */
+	public static final String VERSION_CLDC_1_1 = "cldc1.1"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IOpcodeMnemonics.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IOpcodeMnemonics.java
new file mode 100644
index 0000000..a6de65d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/IOpcodeMnemonics.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public interface IOpcodeMnemonics {
+
+	int NOP = 0x00;
+	int ACONST_NULL = 0x01;
+	int ICONST_M1 = 0x02;
+	int ICONST_0 = 0x03;
+	int ICONST_1 = 0x04;
+	int ICONST_2 = 0x05;
+	int ICONST_3 = 0x06;
+	int ICONST_4 = 0x07;
+	int ICONST_5 = 0x08;
+	int LCONST_0 = 0x09;
+	int LCONST_1 = 0x0A;
+	int FCONST_0 = 0x0B;
+	int FCONST_1 = 0x0C;
+	int FCONST_2 = 0x0D;
+	int DCONST_0 = 0x0E;
+	int DCONST_1 = 0x0F;
+	int BIPUSH = 0x10;
+	int SIPUSH = 0x11;
+	int LDC = 0x12;
+	int LDC_W = 0x13;
+	int LDC2_W = 0x14;
+	int ILOAD = 0x15;
+	int LLOAD = 0x16;
+	int FLOAD = 0x17;
+	int DLOAD = 0x18;
+	int ALOAD = 0x19;
+	int ILOAD_0 = 0x1A;
+	int ILOAD_1 = 0x1B;
+	int ILOAD_2 = 0x1C;
+	int ILOAD_3 = 0x1D;
+	int LLOAD_0 = 0x1E;
+	int LLOAD_1 = 0x1F;
+	int LLOAD_2 = 0x20;
+	int LLOAD_3 = 0x21;
+	int FLOAD_0 = 0x22;
+	int FLOAD_1 = 0x23;
+	int FLOAD_2 = 0x24;
+	int FLOAD_3 = 0x25;
+	int DLOAD_0 = 0x26;
+	int DLOAD_1 = 0x27;
+	int DLOAD_2 = 0x28;
+	int DLOAD_3 = 0x29;
+	int ALOAD_0 = 0x2A;
+	int ALOAD_1 = 0x2B;
+	int ALOAD_2 = 0x2C;
+	int ALOAD_3 = 0x2D;
+	int IALOAD = 0x2E;
+	int LALOAD = 0x2F;
+	int FALOAD = 0x30;
+	int DALOAD = 0x31;
+	int AALOAD = 0x32;
+	int BALOAD = 0x33;
+	int CALOAD = 0x34;
+	int SALOAD = 0x35;
+	int ISTORE = 0x36;
+	int LSTORE = 0x37;
+	int FSTORE = 0x38;
+	int DSTORE = 0x39;
+	int ASTORE = 0x3A;
+	int ISTORE_0 = 0x3B;
+	int ISTORE_1 = 0x3C;
+	int ISTORE_2 = 0x3D;
+	int ISTORE_3 = 0x3E;
+	int LSTORE_0 = 0x3F;
+	int LSTORE_1 = 0x40;
+	int LSTORE_2 = 0x41;
+	int LSTORE_3 = 0x42;
+	int FSTORE_0 = 0x43;
+	int FSTORE_1 = 0x44;
+	int FSTORE_2 = 0x45;
+	int FSTORE_3 = 0x46;
+	int DSTORE_0 = 0x47;
+	int DSTORE_1 = 0x48;
+	int DSTORE_2 = 0x49;
+	int DSTORE_3 = 0x4A;
+	int ASTORE_0 = 0x4B;
+	int ASTORE_1 = 0x4C;
+	int ASTORE_2 = 0x4D;
+	int ASTORE_3 = 0x4E;
+	int IASTORE = 0x4F;
+	int LASTORE = 0x50;
+	int FASTORE = 0x51;
+	int DASTORE = 0x52;
+	int AASTORE = 0x53;
+	int BASTORE = 0x54;
+	int CASTORE = 0x55;
+	int SASTORE = 0x56;
+	int POP = 0x57;
+	int POP2 = 0x58;
+	int DUP = 0x59;
+	int DUP_X1 = 0x5A;
+	int DUP_X2 = 0x5B;
+	int DUP2 = 0x5C;
+	int DUP2_X1 = 0x5D;
+	int DUP2_X2 = 0x5E;
+	int SWAP = 0x5F;
+	int IADD = 0x60;
+	int LADD = 0x61;
+	int FADD = 0x62;
+	int DADD = 0x63;
+	int ISUB = 0x64;
+	int LSUB = 0x65;
+	int FSUB = 0x66;
+	int DSUB = 0x67;
+	int IMUL = 0x68;
+	int LMUL = 0x69;
+	int FMUL = 0x6A;
+	int DMUL = 0x6B;
+	int IDIV = 0x6C;
+	int LDIV = 0x6D;
+	int FDIV = 0x6E;
+	int DDIV = 0x6F;
+	int IREM = 0x70;
+	int LREM = 0x71;
+	int FREM = 0x72;
+	int DREM = 0x73;
+	int INEG = 0x74;
+	int LNEG = 0x75;
+	int FNEG = 0x76;
+	int DNEG = 0x77;
+	int ISHL = 0x78;
+	int LSHL = 0x79;
+	int ISHR = 0x7A;
+	int LSHR = 0x7B;
+	int IUSHR = 0x7C;
+	int LUSHR = 0x7D;
+	int IAND = 0x7E;
+	int LAND = 0x7F;
+	int IOR = 0x80;
+	int LOR = 0x81;
+	int IXOR = 0x82;
+	int LXOR = 0x83;
+	int IINC = 0x84;
+	int I2L = 0x85;
+	int I2F = 0x86;
+	int I2D = 0x87;
+	int L2I = 0x88;
+	int L2F = 0x89;
+	int L2D = 0x8A;
+	int F2I = 0x8B;
+	int F2L = 0x8C;
+	int F2D = 0x8D;
+	int D2I = 0x8E;
+	int D2L = 0x8F;
+	int D2F = 0x90;
+	int I2B = 0x91;
+	int I2C = 0x92;
+	int I2S = 0x93;
+	int LCMP = 0x94;
+	int FCMPL = 0x95;
+	int FCMPG = 0x96;
+	int DCMPL = 0x97;
+	int DCMPG = 0x98;
+	int IFEQ = 0x99;
+	int IFNE = 0x9A;
+	int IFLT = 0x9B;
+	int IFGE = 0x9C;
+	int IFGT = 0x9D;
+	int IFLE = 0x9E;
+	int IF_ICMPEQ = 0x9F;
+	int IF_ICMPNE = 0xA0;
+	int IF_ICMPLT = 0xA1;
+	int IF_ICMPGE = 0xA2;
+	int IF_ICMPGT = 0xA3;
+	int IF_ICMPLE = 0xA4;
+	int IF_ACMPEQ = 0xA5;
+	int IF_ACMPNE = 0xA6;
+	int GOTO = 0xA7;
+	int JSR = 0xA8;
+	int RET = 0xA9;
+	int TABLESWITCH = 0xAA;
+	int LOOKUPSWITCH = 0xAB;
+	int IRETURN = 0xAC;
+	int LRETURN = 0xAD;
+	int FRETURN = 0xAE;
+	int DRETURN = 0xAF;
+	int ARETURN = 0xB0;
+	int RETURN = 0xB1;
+	int GETSTATIC = 0xB2;
+	int PUTSTATIC = 0xB3;
+	int GETFIELD = 0xB4;
+	int PUTFIELD = 0xB5;
+	int INVOKEVIRTUAL = 0xB6;
+	int INVOKESPECIAL = 0xB7;
+	int INVOKESTATIC = 0xB8;
+	int INVOKEINTERFACE = 0xB9;
+	int NEW = 0xBB;
+	int NEWARRAY = 0xBC;
+	int ANEWARRAY = 0xBD;
+	int ARRAYLENGTH = 0xBE;
+	int ATHROW = 0xBF;
+	int CHECKCAST = 0xC0;
+	int INSTANCEOF = 0xC1;
+	int MONITORENTER = 0xC2;
+	int MONITOREXIT = 0xC3;
+	int WIDE = 0xC4;
+	int MULTIANEWARRAY = 0xC5;
+	int IFNULL = 0xC6;
+	int IFNONNULL = 0xC7;
+	int GOTO_W = 0xC8;
+	int JSR_W = 0xC9;
+
+	int BREAKPOINT = 0xCA;
+	int IMPDEP1 = 0xFE;
+	int IMPDEP2 = 0xFF;
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttribute.java
new file mode 100644
index 0000000..a9202fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class InnerClassesAttribute extends ClassFileAttribute {
+	private static final InnerClassesAttributeEntry[] NO_ENTRIES = new InnerClassesAttributeEntry[0];
+
+	private int numberOfClasses;
+	private InnerClassesAttributeEntry[] entries;
+
+	/**
+	 * Constructor for InnerClassesAttribute.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public InnerClassesAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.numberOfClasses = u2At(classFileBytes, 6, offset);
+		final int length = this.numberOfClasses;
+		if (length != 0) {
+			int readOffset = 8;
+			this.entries = new InnerClassesAttributeEntry[length];
+			for (int i = 0; i < length; i++) {
+				this.entries[i] = new InnerClassesAttributeEntry(classFileBytes, constantPool, offset + readOffset);
+				readOffset += 8;
+			}
+		} else {
+			this.entries = NO_ENTRIES;
+		}
+	}
+
+	/*
+	 * @see IInnerClassesAttribute#getInnerClassAttributesEntries()
+	 */
+	public InnerClassesAttributeEntry[] getInnerClassAttributesEntries() {
+		return this.entries;
+	}
+
+	/*
+	 * @see IInnerClassesAttribute#getNumberOfClasses()
+	 */
+	public int getNumberOfClasses() {
+		return this.numberOfClasses;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttributeEntry.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttributeEntry.java
new file mode 100644
index 0000000..2c63c8a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/InnerClassesAttributeEntry.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class InnerClassesAttributeEntry extends ClassFileStruct {
+
+	private int innerClassNameIndex;
+	private int outerClassNameIndex;
+	private int innerNameIndex;
+	private char[] innerClassName;
+	private char[] outerClassName;
+	private char[] innerName;
+	private int accessFlags;
+
+	public InnerClassesAttributeEntry(byte classFileBytes[], ConstantPool constantPool, int offset) throws ClassFormatException {
+		this.innerClassNameIndex = u2At(classFileBytes, 0, offset);
+		this.outerClassNameIndex = u2At(classFileBytes, 2, offset);
+		this.innerNameIndex = u2At(classFileBytes, 4, offset);
+		this.accessFlags = u2At(classFileBytes, 6, offset);
+		ConstantPoolEntry constantPoolEntry;
+		if (this.innerClassNameIndex != 0) {
+			constantPoolEntry = constantPool.decodeEntry(this.innerClassNameIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.innerClassName = constantPoolEntry.getClassInfoName();
+		}
+		if (this.outerClassNameIndex != 0) {
+			constantPoolEntry = constantPool.decodeEntry(this.outerClassNameIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Class) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.outerClassName = constantPoolEntry.getClassInfoName();
+		}
+		if (this.innerNameIndex != 0) {
+			constantPoolEntry = constantPool.decodeEntry(this.innerNameIndex);
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.innerName = constantPoolEntry.getUtf8Value();
+		}
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getAccessFlags()
+	 */
+	public int getAccessFlags() {
+		return this.accessFlags;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getInnerClassName()
+	 */
+	public char[] getInnerClassName() {
+		return this.innerClassName;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getInnerClassNameIndex()
+	 */
+	public int getInnerClassNameIndex() {
+		return this.innerClassNameIndex;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getInnerName()
+	 */
+	public char[] getInnerName() {
+		return this.innerName;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getInnerNameIndex()
+	 */
+	public int getInnerNameIndex() {
+		return this.innerNameIndex;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getOuterClassName()
+	 */
+	public char[] getOuterClassName() {
+		return this.outerClassName;
+	}
+
+	/*
+	 * @see IInnerClassesAttributeEntry#getOuterClassNameIndex()
+	 */
+	public int getOuterClassNameIndex() {
+		return this.outerClassNameIndex;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Messages.java
new file mode 100644
index 0000000..c190e0b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Messages.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.internal.repository.comparator.java.messages"; //$NON-NLS-1$
+	public static String differentNumberOfEntries;
+	public static String binaryDifferentLength;
+	public static String classesDifferent;
+	public static String propertiesSizesDifferent;
+	public static String differentPropertyValueFull;
+	public static String missingProperty;
+	public static String manifestDifferentSize;
+	public static String manifestMissingEntry;
+	public static String manifestDifferentValue;
+	public static String binaryFilesDifferent;
+	public static String differentEntry;
+	public static String missingEntry;
+	public static String ioexception;
+
+	public static String featureSize;
+	public static String featureIdsDontMatch;
+	public static String featureVersionsDontMatch;
+	public static String featureEntry;
+	public static String featureEntryOptional;
+	public static String featureEntryUnpack;
+	public static String featureEntryMatch;
+	public static String featureEntryFilter;
+
+	public static String disassembler_opentypedeclaration;
+	public static String disassembler_closetypedeclaration;
+	public static String disassembler_endofmethodheader;
+	public static String disassembler_begincommentline;
+	public static String disassembler_fieldhasconstant;
+	public static String disassembler_endoffieldheader;
+	public static String disassembler_sourceattributeheader;
+	public static String disassembler_enclosingmethodheader;
+	public static String disassembler_exceptiontableheader;
+	public static String disassembler_innerattributesheader;
+	public static String disassembler_inner_class_info_name;
+	public static String disassembler_outer_class_info_name;
+	public static String disassembler_inner_name;
+	public static String disassembler_inner_accessflags;
+	public static String disassembler_signatureattributeheader;
+	public static String disassembler_indentation;
+	public static String disassembler_space;
+	public static String disassembler_comma;
+	public static String disassembler_openinnerclassentry;
+	public static String disassembler_closeinnerclassentry;
+	public static String disassembler_deprecated;
+	public static String disassembler_annotationdefaultheader;
+	public static String disassembler_annotationdefaultvalue;
+	public static String disassembler_annotationenumvalue;
+	public static String disassembler_annotationclassvalue;
+	public static String disassembler_annotationannotationvalue;
+	public static String disassembler_annotationarrayvaluestart;
+	public static String disassembler_annotationarrayvalueend;
+	public static String disassembler_annotationentrystart;
+	public static String disassembler_annotationentryend;
+	public static String disassembler_annotationcomponent;
+	public static String disassembler_runtimevisibleannotationsattributeheader;
+	public static String disassembler_runtimeinvisibleannotationsattributeheader;
+	public static String disassembler_runtimevisibleparameterannotationsattributeheader;
+	public static String disassembler_runtimeinvisibleparameterannotationsattributeheader;
+	public static String disassembler_parameterannotationentrystart;
+	public static String classfileformat_versiondetails;
+	public static String classfileformat_methoddescriptor;
+	public static String classfileformat_fieldddescriptor;
+	public static String classfileformat_stacksAndLocals;
+	public static String classfileformat_superflagisnotset;
+	public static String classfileformat_superflagisset;
+	public static String classfileformat_clinitname;
+	public static String classformat_classformatexception;
+	public static String classformat_anewarray;
+	public static String classformat_checkcast;
+	public static String classformat_instanceof;
+	public static String classformat_ldc_w_class;
+	public static String classformat_ldc_w_float;
+	public static String classformat_ldc_w_integer;
+	public static String classformat_ldc_w_string;
+	public static String classformat_ldc2_w_long;
+	public static String classformat_ldc2_w_double;
+	public static String classformat_multianewarray;
+	public static String classformat_new;
+	public static String classformat_iinc;
+	public static String classformat_invokespecial;
+	public static String classformat_invokeinterface;
+	public static String classformat_invokestatic;
+	public static String classformat_invokevirtual;
+	public static String classformat_getfield;
+	public static String classformat_getstatic;
+	public static String classformat_putstatic;
+	public static String classformat_putfield;
+	public static String classformat_newarray_boolean;
+	public static String classformat_newarray_char;
+	public static String classformat_newarray_float;
+	public static String classformat_newarray_double;
+	public static String classformat_newarray_byte;
+	public static String classformat_newarray_short;
+	public static String classformat_newarray_int;
+	public static String classformat_newarray_long;
+	public static String classformat_store;
+	public static String classformat_load;
+	public static String classfileformat_anyexceptionhandler;
+	public static String classfileformat_exceptiontableentry;
+	public static String classfileformat_versionUnknown;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		// prevent instantiation
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/MethodInfo.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/MethodInfo.java
new file mode 100644
index 0000000..14d57c2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/MethodInfo.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.util.Arrays;
+
+public class MethodInfo extends ClassFileStruct {
+	private int accessFlags;
+	private int attributeBytes;
+	private ClassFileAttribute[] attributes;
+	private int attributesCount;
+	private CodeAttribute codeAttribute;
+	private char[] descriptor;
+	private int descriptorIndex;
+	private ExceptionAttribute exceptionAttribute;
+	private boolean isDeprecated;
+	private boolean isSynthetic;
+	private char[] name;
+	private int nameIndex;
+
+	/*
+	 * @param classFileBytes byte[]
+	 * @param constantPool IConstantPool
+	 * @param offset int
+	 * @param decodingFlags int
+	 */
+	public MethodInfo(byte classFileBytes[], ConstantPool constantPool, int offset, int decodingFlags) throws ClassFormatException {
+
+		boolean no_code_attribute = (decodingFlags & ClassFileReader.METHOD_BODIES) == 0;
+		final int flags = u2At(classFileBytes, 0, offset);
+		this.accessFlags = flags;
+		if ((flags & IModifierConstants.ACC_SYNTHETIC) != 0) {
+			this.isSynthetic = true;
+		}
+
+		this.nameIndex = u2At(classFileBytes, 2, offset);
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.nameIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.name = constantPoolEntry.getUtf8Value();
+
+		this.descriptorIndex = u2At(classFileBytes, 4, offset);
+		constantPoolEntry = constantPool.decodeEntry(this.descriptorIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.descriptor = constantPoolEntry.getUtf8Value();
+
+		this.attributesCount = u2At(classFileBytes, 6, offset);
+		this.attributes = ClassFileAttribute.NO_ATTRIBUTES;
+		if (this.attributesCount != 0) {
+			if (no_code_attribute && !isAbstract() && !isNative()) {
+				if (this.attributesCount != 1) {
+					this.attributes = new ClassFileAttribute[this.attributesCount - 1];
+				}
+			} else {
+				this.attributes = new ClassFileAttribute[this.attributesCount];
+			}
+		}
+		int attributesIndex = 0;
+		int readOffset = 8;
+		for (int i = 0; i < this.attributesCount; i++) {
+			constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset));
+			if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			char[] attributeName = constantPoolEntry.getUtf8Value();
+			if (Arrays.equals(attributeName, AttributeNamesConstants.DEPRECATED)) {
+				this.isDeprecated = true;
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SYNTHETIC)) {
+				this.isSynthetic = true;
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.CODE)) {
+				if (!no_code_attribute) {
+					this.codeAttribute = new CodeAttribute(classFileBytes, constantPool, offset + readOffset);
+					this.attributes[attributesIndex++] = this.codeAttribute;
+				}
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.EXCEPTIONS)) {
+				this.exceptionAttribute = new ExceptionAttribute(classFileBytes, constantPool, offset + readOffset);
+				this.attributes[attributesIndex++] = this.exceptionAttribute;
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.SIGNATURE)) {
+				this.attributes[attributesIndex++] = new SignatureAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (Arrays.equals(attributeName, AttributeNamesConstants.ANNOTATION_DEFAULT)) {
+				this.attributes[attributesIndex++] = new AnnotationDefaultAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else {
+				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
+			}
+			readOffset += (6 + u4At(classFileBytes, readOffset + 2, offset));
+		}
+		this.attributeBytes = readOffset;
+	}
+
+	/*
+	 * @see IMethodInfo#getAccessFlags()
+	 */
+	public int getAccessFlags() {
+		return this.accessFlags;
+	}
+
+	/*
+	 * @see IMethodInfo#getAttributeCount()
+	 */
+	public int getAttributeCount() {
+		return this.attributesCount;
+	}
+
+	/*
+	 * @see IMethodInfo#getAttributes()
+	 */
+	public ClassFileAttribute[] getAttributes() {
+		return this.attributes;
+	}
+
+	/*
+	 * @see IMethodInfo#getCodeAttribute()
+	 */
+	public CodeAttribute getCodeAttribute() {
+		return this.codeAttribute;
+	}
+
+	/*
+	 * @see IMethodInfo#getDescriptor()
+	 */
+	public char[] getDescriptor() {
+		return this.descriptor;
+	}
+
+	/*
+	 * @see IMethodInfo#getDescriptorIndex()
+	 */
+	public int getDescriptorIndex() {
+		return this.descriptorIndex;
+	}
+
+	/*
+	 * @see IMethodInfo#getExceptionAttribute()
+	 */
+	public ExceptionAttribute getExceptionAttribute() {
+		return this.exceptionAttribute;
+	}
+
+	/*
+	 * @see IMethodInfo#getName()
+	 */
+	public char[] getName() {
+		return this.name;
+	}
+
+	/*
+	 * @see IMethodInfo#getNameIndex()
+	 */
+	public int getNameIndex() {
+		return this.nameIndex;
+	}
+
+	private boolean isAbstract() {
+		return (this.accessFlags & IModifierConstants.ACC_ABSTRACT) != 0;
+	}
+
+	/*
+	 * @see IMethodInfo#isClinit()
+	 */
+	public boolean isClinit() {
+		return this.name[0] == '<' && this.name.length == 8; // Can only match <clinit>
+	}
+
+	/*
+	 * @see IMethodInfo#isConstructor()
+	 */
+	public boolean isConstructor() {
+		return this.name[0] == '<' && this.name.length == 6; // Can only match <init>
+	}
+
+	/*
+	 * @see IMethodInfo#isDeprecated()
+	 */
+	public boolean isDeprecated() {
+		return this.isDeprecated;
+	}
+
+	private boolean isNative() {
+		return (this.accessFlags & IModifierConstants.ACC_NATIVE) != 0;
+	}
+
+	/*
+	 * @see IMethodInfo#isSynthetic()
+	 */
+	public boolean isSynthetic() {
+		return this.isSynthetic;
+	}
+
+	int sizeInBytes() {
+		return this.attributeBytes;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/OpcodeStringValues.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/OpcodeStringValues.java
new file mode 100644
index 0000000..dbc879e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/OpcodeStringValues.java
@@ -0,0 +1,222 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class OpcodeStringValues implements IOpcodeMnemonics {
+
+	public static final String[] BYTECODE_NAMES = new String[256];
+	static {
+		BYTECODE_NAMES[NOP] = "nop"; //$NON-NLS-1$
+		BYTECODE_NAMES[ACONST_NULL] = "aconst_null"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_M1] = "iconst_m1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_0] = "iconst_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_1] = "iconst_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_2] = "iconst_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_3] = "iconst_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_4] = "iconst_4"; //$NON-NLS-1$
+		BYTECODE_NAMES[ICONST_5] = "iconst_5"; //$NON-NLS-1$
+		BYTECODE_NAMES[LCONST_0] = "lconst_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[LCONST_1] = "lconst_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[FCONST_0] = "fconst_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[FCONST_1] = "fconst_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[FCONST_2] = "fconst_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DCONST_0] = "dconst_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[DCONST_1] = "dconst_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[BIPUSH] = "bipush"; //$NON-NLS-1$
+		BYTECODE_NAMES[SIPUSH] = "sipush"; //$NON-NLS-1$
+		BYTECODE_NAMES[LDC] = "ldc"; //$NON-NLS-1$
+		BYTECODE_NAMES[LDC_W] = "ldc_w"; //$NON-NLS-1$
+		BYTECODE_NAMES[LDC2_W] = "ldc2_w"; //$NON-NLS-1$
+		BYTECODE_NAMES[ILOAD] = "iload"; //$NON-NLS-1$
+		BYTECODE_NAMES[LLOAD] = "lload"; //$NON-NLS-1$
+		BYTECODE_NAMES[FLOAD] = "fload"; //$NON-NLS-1$
+		BYTECODE_NAMES[DLOAD] = "dload"; //$NON-NLS-1$
+		BYTECODE_NAMES[ALOAD] = "aload"; //$NON-NLS-1$
+		BYTECODE_NAMES[ILOAD_0] = "iload_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[ILOAD_1] = "iload_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ILOAD_2] = "iload_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[ILOAD_3] = "iload_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[LLOAD_0] = "lload_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[LLOAD_1] = "lload_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[LLOAD_2] = "lload_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[LLOAD_3] = "lload_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[FLOAD_0] = "fload_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[FLOAD_1] = "fload_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[FLOAD_2] = "fload_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[FLOAD_3] = "fload_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[DLOAD_0] = "dload_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[DLOAD_1] = "dload_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[DLOAD_2] = "dload_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DLOAD_3] = "dload_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[ALOAD_0] = "aload_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[ALOAD_1] = "aload_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ALOAD_2] = "aload_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[ALOAD_3] = "aload_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[IALOAD] = "iaload"; //$NON-NLS-1$
+		BYTECODE_NAMES[LALOAD] = "laload"; //$NON-NLS-1$
+		BYTECODE_NAMES[FALOAD] = "faload"; //$NON-NLS-1$
+		BYTECODE_NAMES[DALOAD] = "daload"; //$NON-NLS-1$
+		BYTECODE_NAMES[AALOAD] = "aaload"; //$NON-NLS-1$
+		BYTECODE_NAMES[BALOAD] = "baload"; //$NON-NLS-1$
+		BYTECODE_NAMES[CALOAD] = "caload"; //$NON-NLS-1$
+		BYTECODE_NAMES[SALOAD] = "saload"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISTORE] = "istore"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSTORE] = "lstore"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSTORE] = "fstore"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSTORE] = "dstore"; //$NON-NLS-1$
+		BYTECODE_NAMES[ASTORE] = "astore"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISTORE_0] = "istore_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISTORE_1] = "istore_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISTORE_2] = "istore_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISTORE_3] = "istore_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSTORE_0] = "lstore_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSTORE_1] = "lstore_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSTORE_2] = "lstore_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSTORE_3] = "lstore_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSTORE_0] = "fstore_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSTORE_1] = "fstore_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSTORE_2] = "fstore_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSTORE_3] = "fstore_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSTORE_0] = "dstore_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSTORE_1] = "dstore_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSTORE_2] = "dstore_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSTORE_3] = "dstore_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[ASTORE_0] = "astore_0"; //$NON-NLS-1$
+		BYTECODE_NAMES[ASTORE_1] = "astore_1"; //$NON-NLS-1$
+		BYTECODE_NAMES[ASTORE_2] = "astore_2"; //$NON-NLS-1$
+		BYTECODE_NAMES[ASTORE_3] = "astore_3"; //$NON-NLS-1$
+		BYTECODE_NAMES[IASTORE] = "iastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[LASTORE] = "lastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[FASTORE] = "fastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[DASTORE] = "dastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[AASTORE] = "aastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[BASTORE] = "bastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[CASTORE] = "castore"; //$NON-NLS-1$
+		BYTECODE_NAMES[SASTORE] = "sastore"; //$NON-NLS-1$
+		BYTECODE_NAMES[POP] = "pop"; //$NON-NLS-1$
+		BYTECODE_NAMES[POP2] = "pop2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP] = "dup"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP_X1] = "dup_x1"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP_X2] = "dup_x2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP2] = "dup2"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP2_X1] = "dup2_x1"; //$NON-NLS-1$
+		BYTECODE_NAMES[DUP2_X2] = "dup2_x2"; //$NON-NLS-1$
+		BYTECODE_NAMES[SWAP] = "swap"; //$NON-NLS-1$
+		BYTECODE_NAMES[IADD] = "iadd"; //$NON-NLS-1$
+		BYTECODE_NAMES[LADD] = "ladd"; //$NON-NLS-1$
+		BYTECODE_NAMES[FADD] = "fadd"; //$NON-NLS-1$
+		BYTECODE_NAMES[DADD] = "dadd"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISUB] = "isub"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSUB] = "lsub"; //$NON-NLS-1$
+		BYTECODE_NAMES[FSUB] = "fsub"; //$NON-NLS-1$
+		BYTECODE_NAMES[DSUB] = "dsub"; //$NON-NLS-1$
+		BYTECODE_NAMES[IMUL] = "imul"; //$NON-NLS-1$
+		BYTECODE_NAMES[LMUL] = "lmul"; //$NON-NLS-1$
+		BYTECODE_NAMES[FMUL] = "fmul"; //$NON-NLS-1$
+		BYTECODE_NAMES[DMUL] = "dmul"; //$NON-NLS-1$
+		BYTECODE_NAMES[IDIV] = "idiv"; //$NON-NLS-1$
+		BYTECODE_NAMES[LDIV] = "ldiv"; //$NON-NLS-1$
+		BYTECODE_NAMES[FDIV] = "fdiv"; //$NON-NLS-1$
+		BYTECODE_NAMES[DDIV] = "ddiv"; //$NON-NLS-1$
+		BYTECODE_NAMES[IREM] = "irem"; //$NON-NLS-1$
+		BYTECODE_NAMES[LREM] = "lrem"; //$NON-NLS-1$
+		BYTECODE_NAMES[FREM] = "frem"; //$NON-NLS-1$
+		BYTECODE_NAMES[DREM] = "drem"; //$NON-NLS-1$
+		BYTECODE_NAMES[INEG] = "ineg"; //$NON-NLS-1$
+		BYTECODE_NAMES[LNEG] = "lneg"; //$NON-NLS-1$
+		BYTECODE_NAMES[FNEG] = "fneg"; //$NON-NLS-1$
+		BYTECODE_NAMES[DNEG] = "dneg"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISHL] = "ishl"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSHL] = "lshl"; //$NON-NLS-1$
+		BYTECODE_NAMES[ISHR] = "ishr"; //$NON-NLS-1$
+		BYTECODE_NAMES[LSHR] = "lshr"; //$NON-NLS-1$
+		BYTECODE_NAMES[IUSHR] = "iushr"; //$NON-NLS-1$
+		BYTECODE_NAMES[LUSHR] = "lushr"; //$NON-NLS-1$
+		BYTECODE_NAMES[IAND] = "iand"; //$NON-NLS-1$
+		BYTECODE_NAMES[LAND] = "land"; //$NON-NLS-1$
+		BYTECODE_NAMES[IOR] = "ior"; //$NON-NLS-1$
+		BYTECODE_NAMES[LOR] = "lor"; //$NON-NLS-1$
+		BYTECODE_NAMES[IXOR] = "ixor"; //$NON-NLS-1$
+		BYTECODE_NAMES[LXOR] = "lxor"; //$NON-NLS-1$
+		BYTECODE_NAMES[IINC] = "iinc"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2L] = "i2l"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2F] = "i2f"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2D] = "i2d"; //$NON-NLS-1$
+		BYTECODE_NAMES[L2I] = "l2i"; //$NON-NLS-1$
+		BYTECODE_NAMES[L2F] = "l2f"; //$NON-NLS-1$
+		BYTECODE_NAMES[L2D] = "l2d"; //$NON-NLS-1$
+		BYTECODE_NAMES[F2I] = "f2i"; //$NON-NLS-1$
+		BYTECODE_NAMES[F2L] = "f2l"; //$NON-NLS-1$
+		BYTECODE_NAMES[F2D] = "f2d"; //$NON-NLS-1$
+		BYTECODE_NAMES[D2I] = "d2i"; //$NON-NLS-1$
+		BYTECODE_NAMES[D2L] = "d2l"; //$NON-NLS-1$
+		BYTECODE_NAMES[D2F] = "d2f"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2B] = "i2b"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2C] = "i2c"; //$NON-NLS-1$
+		BYTECODE_NAMES[I2S] = "i2s"; //$NON-NLS-1$
+		BYTECODE_NAMES[LCMP] = "lcmp"; //$NON-NLS-1$
+		BYTECODE_NAMES[FCMPL] = "fcmpl"; //$NON-NLS-1$
+		BYTECODE_NAMES[FCMPG] = "fcmpg"; //$NON-NLS-1$
+		BYTECODE_NAMES[DCMPL] = "dcmpl"; //$NON-NLS-1$
+		BYTECODE_NAMES[DCMPG] = "dcmpg"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFEQ] = "ifeq"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFNE] = "ifne"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFLT] = "iflt"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFGE] = "ifge"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFGT] = "ifgt"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFLE] = "ifle"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPEQ] = "if_icmpeq"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPNE] = "if_icmpne"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPLT] = "if_icmplt"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPGE] = "if_icmpge"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPGT] = "if_icmpgt"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ICMPLE] = "if_icmple"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ACMPEQ] = "if_acmpeq"; //$NON-NLS-1$
+		BYTECODE_NAMES[IF_ACMPNE] = "if_acmpne"; //$NON-NLS-1$
+		BYTECODE_NAMES[GOTO] = "goto"; //$NON-NLS-1$
+		BYTECODE_NAMES[JSR] = "jsr"; //$NON-NLS-1$
+		BYTECODE_NAMES[RET] = "ret"; //$NON-NLS-1$
+		BYTECODE_NAMES[TABLESWITCH] = "tableswitch"; //$NON-NLS-1$
+		BYTECODE_NAMES[LOOKUPSWITCH] = "lookupswitch"; //$NON-NLS-1$
+		BYTECODE_NAMES[IRETURN] = "ireturn"; //$NON-NLS-1$
+		BYTECODE_NAMES[LRETURN] = "lreturn"; //$NON-NLS-1$
+		BYTECODE_NAMES[FRETURN] = "freturn"; //$NON-NLS-1$
+		BYTECODE_NAMES[DRETURN] = "dreturn"; //$NON-NLS-1$
+		BYTECODE_NAMES[ARETURN] = "areturn"; //$NON-NLS-1$
+		BYTECODE_NAMES[RETURN] = "return"; //$NON-NLS-1$
+		BYTECODE_NAMES[GETSTATIC] = "getstatic"; //$NON-NLS-1$
+		BYTECODE_NAMES[PUTSTATIC] = "putstatic"; //$NON-NLS-1$
+		BYTECODE_NAMES[GETFIELD] = "getfield"; //$NON-NLS-1$
+		BYTECODE_NAMES[PUTFIELD] = "putfield"; //$NON-NLS-1$
+		BYTECODE_NAMES[INVOKEVIRTUAL] = "invokevirtual"; //$NON-NLS-1$
+		BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
+		BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
+		BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
+		BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
+		BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
+		BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
+		BYTECODE_NAMES[ARRAYLENGTH] = "arraylength"; //$NON-NLS-1$
+		BYTECODE_NAMES[ATHROW] = "athrow"; //$NON-NLS-1$
+		BYTECODE_NAMES[CHECKCAST] = "checkcast"; //$NON-NLS-1$
+		BYTECODE_NAMES[INSTANCEOF] = "instanceof"; //$NON-NLS-1$
+		BYTECODE_NAMES[MONITORENTER] = "monitorenter"; //$NON-NLS-1$
+		BYTECODE_NAMES[MONITOREXIT] = "monitorexit"; //$NON-NLS-1$
+		BYTECODE_NAMES[WIDE] = "wide"; //$NON-NLS-1$
+		BYTECODE_NAMES[MULTIANEWARRAY] = "multianewarray"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFNULL] = "ifnull"; //$NON-NLS-1$
+		BYTECODE_NAMES[IFNONNULL] = "ifnonnull"; //$NON-NLS-1$
+		BYTECODE_NAMES[GOTO_W] = "goto_w"; //$NON-NLS-1$
+		BYTECODE_NAMES[JSR_W] = "jsr_w"; //$NON-NLS-1$
+		BYTECODE_NAMES[BREAKPOINT] = "breakpoint"; //$NON-NLS-1$
+		BYTECODE_NAMES[IMPDEP1] = "impdep1"; //$NON-NLS-1$
+		BYTECODE_NAMES[IMPDEP2] = "impdep2"; //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ParameterAnnotation.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ParameterAnnotation.java
new file mode 100644
index 0000000..8f08991
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/ParameterAnnotation.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class ParameterAnnotation extends ClassFileStruct {
+
+	private static final Annotation[] NO_ENTRIES = new Annotation[0];
+
+	private int annotationsNumber;
+	private Annotation[] annotations;
+	private int readOffset;
+
+	/**
+	 * Constructor for Annotation.
+	 *
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public ParameterAnnotation(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+
+		final int length = u2At(classFileBytes, 0, offset);
+		this.readOffset = 2;
+		this.annotationsNumber = length;
+		if (length != 0) {
+			this.annotations = new Annotation[length];
+			for (int i = 0; i < length; i++) {
+				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + this.readOffset);
+				this.annotations[i] = annotation;
+				this.readOffset += annotation.sizeInBytes();
+			}
+		} else {
+			this.annotations = NO_ENTRIES;
+		}
+	}
+
+	int sizeInBytes() {
+		return this.readOffset;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotations()
+	 */
+	public Annotation[] getAnnotations() {
+		return this.annotations;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IParameterAnnotation#getAnnotationsNumber()
+	 */
+	public int getAnnotationsNumber() {
+		return this.annotationsNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleAnnotationsAttribute.java
new file mode 100644
index 0000000..ef3244b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleAnnotationsAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class RuntimeInvisibleAnnotationsAttribute extends ClassFileAttribute {
+
+	private static final Annotation[] NO_ENTRIES = new Annotation[0];
+	private int annotationsNumber;
+	private Annotation[] annotations;
+
+	/**
+	 * Constructor for RuntimeInvisibleAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeInvisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int length = u2At(classFileBytes, 6, offset);
+		this.annotationsNumber = length;
+		if (length != 0) {
+			int readOffset = 8;
+			this.annotations = new Annotation[length];
+			for (int i = 0; i < length; i++) {
+				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
+				this.annotations[i] = annotation;
+				readOffset += annotation.sizeInBytes();
+			}
+		} else {
+			this.annotations = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotations()
+	 */
+	public Annotation[] getAnnotations() {
+		return this.annotations;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleAnnotations#getAnnotationsNumber()
+	 */
+	public int getAnnotationsNumber() {
+		return this.annotationsNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleParameterAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleParameterAnnotationsAttribute.java
new file mode 100644
index 0000000..b9f4891
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeInvisibleParameterAnnotationsAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class RuntimeInvisibleParameterAnnotationsAttribute extends ClassFileAttribute {
+
+	private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
+	private ParameterAnnotation[] parameterAnnotations;
+	private int parametersNumber;
+
+	/**
+	 * Constructor for RuntimeVisibleParameterAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeInvisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int length = u1At(classFileBytes, 6, offset);
+		this.parametersNumber = length;
+		if (length != 0) {
+			int readOffset = 7;
+			this.parameterAnnotations = new ParameterAnnotation[length];
+			for (int i = 0; i < length; i++) {
+				ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
+				this.parameterAnnotations[i] = parameterAnnotation;
+				readOffset += parameterAnnotation.sizeInBytes();
+			}
+		} else {
+			this.parameterAnnotations = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getAnnotations()
+	 */
+	public ParameterAnnotation[] getParameterAnnotations() {
+		return this.parameterAnnotations;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleParameterAnnotations#getParametersNumber()
+	 */
+	public int getParametersNumber() {
+		return this.parametersNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleAnnotationsAttribute.java
new file mode 100644
index 0000000..00306e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleAnnotationsAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class RuntimeVisibleAnnotationsAttribute extends ClassFileAttribute {
+
+	private static final Annotation[] NO_ENTRIES = new Annotation[0];
+	private int annotationsNumber;
+	private Annotation[] annotations;
+
+	/**
+	 * Constructor for RuntimeVisibleAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeVisibleAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int length = u2At(classFileBytes, 6, offset);
+		this.annotationsNumber = length;
+		if (length != 0) {
+			int readOffset = 8;
+			this.annotations = new Annotation[length];
+			for (int i = 0; i < length; i++) {
+				Annotation annotation = new Annotation(classFileBytes, constantPool, offset + readOffset);
+				this.annotations[i] = annotation;
+				readOffset += annotation.sizeInBytes();
+			}
+		} else {
+			this.annotations = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotations()
+	 */
+	public Annotation[] getAnnotations() {
+		return this.annotations;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleAnnotations#getAnnotationsNumber()
+	 */
+	public int getAnnotationsNumber() {
+		return this.annotationsNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleParameterAnnotationsAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleParameterAnnotationsAttribute.java
new file mode 100644
index 0000000..1f2b840
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/RuntimeVisibleParameterAnnotationsAttribute.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class RuntimeVisibleParameterAnnotationsAttribute extends ClassFileAttribute {
+
+	private static final ParameterAnnotation[] NO_ENTRIES = new ParameterAnnotation[0];
+	private int parametersNumber;
+	private ParameterAnnotation[] parameterAnnotations;
+
+	/**
+	 * Constructor for RuntimeVisibleParameterAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeVisibleParameterAnnotationsAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int length = u1At(classFileBytes, 6, offset);
+		this.parametersNumber = length;
+		if (length != 0) {
+			int readOffset = 7;
+			this.parameterAnnotations = new ParameterAnnotation[length];
+			for (int i = 0; i < length; i++) {
+				ParameterAnnotation parameterAnnotation = new ParameterAnnotation(classFileBytes, constantPool, offset + readOffset);
+				this.parameterAnnotations[i] = parameterAnnotation;
+				readOffset += parameterAnnotation.sizeInBytes();
+			}
+		} else {
+			this.parameterAnnotations = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getAnnotations()
+	 */
+	public ParameterAnnotation[] getParameterAnnotations() {
+		return this.parameterAnnotations;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleParameterAnnotations#getParametersNumber()
+	 */
+	public int getParametersNumber() {
+		return this.parametersNumber;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java
new file mode 100644
index 0000000..7b855bb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Signature.java
@@ -0,0 +1,1163 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.util.ArrayList;
+
+/*
+ * Provides methods for encoding and decoding type and method signature strings.
+ * <p>
+ * Signatures obtained from parsing source files (i.e. files with one of the
+ * {@link JavaCore#getJavaLikeExtensions() Java-like extensions}) differ subtly
+ * from ones obtained from pre-compiled binary (".class") files in class names are
+ * usually left unresolved in the former. For example, the normal resolved form
+ * of the type "String" embeds the class's package name ("Ljava.lang.String;"
+ * or "Ljava/lang/String;"), whereas the unresolved form contains only what is
+ * written "QString;".
+ * </p>
+ * <p>
+ * Generic types introduce to the Java language in J2SE 1.5 add three new
+ * facets to signatures: type variables, parameterized types with type arguments,
+ * and formal type parameters. <i>Rich</i> signatures containing these facets
+ * only occur when dealing with code that makes overt use of the new language
+ * features. All other code, and certainly all Java code written or compiled
+ * with J2SE 1.4 or earlier, involved only <i>simple</i> signatures.
+ * </p>
+ * <p>
+ * Note that the "Q" and "!" formats are specific to Eclipse; the remainder
+ * are specified in the JVM spec.
+ * </p>
+ * <p>
+ * The syntax for a type signature is:
+ * <pre>
+ * TypeSignature ::=
+ *     "B"  // byte
+ *   | "C"  // char
+ *   | "D"  // double
+ *   | "F"  // float
+ *   | "I"  // int
+ *   | "J"  // long
+ *   | "S"  // short
+ *   | "V"  // void
+ *   | "Z"  // boolean
+ *   | "T" + Identifier + ";" // type variable
+ *   | "[" + TypeSignature  // array X[]
+ *   | "!" + TypeSignature  // capture-of ?
+ *   | ResolvedClassTypeSignature
+ *   | UnresolvedClassTypeSignature
+ *
+ * ResolvedClassTypeSignature ::= // resolved named type (in compiled code)
+ *     "L" + Identifier + OptionalTypeArguments
+ *           ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
+ *     | OptionalTypeParameters + "L" + Identifier +
+ *           ( ( "." | "/" ) + Identifier )* + ";"
+ *
+ * UnresolvedClassTypeSignature ::= // unresolved named type (in source code)
+ *     "Q" + Identifier + OptionalTypeArguments
+ *           ( ( "." | "/" ) + Identifier + OptionalTypeArguments )* + ";"
+ *     | OptionalTypeParameters "Q" + Identifier +
+ *           ( ( "." | "/" ) + Identifier )* + ";"
+ *
+ * OptionalTypeArguments ::=
+ *     "<" + TypeArgument+ + ">"
+ *   |
+ *
+ * TypeArgument ::=
+ *   | TypeSignature
+ *   | "*" // wildcard ?
+ *   | "+" TypeSignature // wildcard ? extends X
+ *   | "-" TypeSignature // wildcard ? super X
+ *
+ * OptionalTypeParameters ::=
+ *     "<" + FormalTypeParameterSignature+ + ">"
+ *   |
+ * </pre>
+ * </p>
+ * <p>
+ * Examples:
+ * <ul>
+ *   <li><code>"[[I"</code> denotes <code>int[][]</code></li>
+ *   <li><code>"Ljava.lang.String;"</code> denotes <code>java.lang.String</code> in compiled code</li>
+ *   <li><code>"QString;"</code> denotes <code>String</code> in source code</li>
+ *   <li><code>"Qjava.lang.String;"</code> denotes <code>java.lang.String</code> in source code</li>
+ *   <li><code>"[QString;"</code> denotes <code>String[]</code> in source code</li>
+ *   <li><code>"QMap<QString;*>;"</code> denotes <code>Map<String,?></code> in source code</li>
+ *   <li><code>"Qjava.util.List<TV;>;"</code> denotes <code>java.util.List<V></code> in source code</li>
+ *   <li><code>"<E;>Ljava.util.List;"</code> denotes <code><E>java.util.List</code> in source code</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The syntax for a method signature is:
+ * <pre>
+ * MethodSignature ::= OptionalTypeParameters + "(" + ParamTypeSignature* + ")" + ReturnTypeSignature
+ * ParamTypeSignature ::= TypeSignature
+ * ReturnTypeSignature ::= TypeSignature
+ * </pre>
+ * <p>
+ * Examples:
+ * <ul>
+ *   <li><code>"()I"</code> denotes <code>int foo()</code></li>
+ *   <li><code>"([Ljava.lang.String;)V"</code> denotes <code>void foo(java.lang.String[])</code> in compiled code</li>
+ *   <li><code>"(QString;)QObject;"</code> denotes <code>Object foo(String)</code> in source code</li>
+ * </ul>
+ * </p>
+ * <p>
+ * The syntax for a formal type parameter signature is:
+ * <pre>
+ * FormalTypeParameterSignature ::=
+ *     TypeVariableName + OptionalClassBound + InterfaceBound*
+ * TypeVariableName ::= Identifier
+ * OptionalClassBound ::=
+ *     ":"
+ *   | ":" + TypeSignature
+ * InterfaceBound ::=
+ *     ":" + TypeSignature
+ * </pre>
+ * <p>
+ * Examples:
+ * <ul>
+ *   <li><code>"X:"</code> denotes <code>X</code></li>
+ *   <li><code>"X:QReader;"</code> denotes <code>X extends Reader</code> in source code</li>
+ *   <li><code>"X:QReader;:QSerializable;"</code> denotes <code>X extends Reader & Serializable</code> in source code</li>
+ * </ul>
+ * </p>
+ * <p>
+ * This class provides static methods and constants only.
+ * </p>
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public final class Signature {
+	/*
+	 * Character constant indicating the primitive type boolean in a signature.
+	 * Value is <code>'Z'</code>.
+	 */
+	public static final char C_BOOLEAN = 'Z';
+
+	/*
+	 * Character constant indicating the primitive type byte in a signature.
+	 * Value is <code>'B'</code>.
+	 */
+	public static final char C_BYTE = 'B';
+
+	/*
+	 * Character constant indicating the primitive type char in a signature.
+	 * Value is <code>'C'</code>.
+	 */
+	public static final char C_CHAR = 'C';
+
+	/*
+	 * Character constant indicating the primitive type double in a signature.
+	 * Value is <code>'D'</code>.
+	 */
+	public static final char C_DOUBLE = 'D';
+
+	/*
+	 * Character constant indicating the primitive type float in a signature.
+	 * Value is <code>'F'</code>.
+	 */
+	public static final char C_FLOAT = 'F';
+
+	/*
+	 * Character constant indicating the primitive type int in a signature.
+	 * Value is <code>'I'</code>.
+	 */
+	public static final char C_INT = 'I';
+
+	/*
+	 * Character constant indicating the semicolon in a signature.
+	 * Value is <code>';'</code>.
+	 */
+	public static final char C_SEMICOLON = ';';
+
+	/*
+	 * Character constant indicating the colon in a signature.
+	 * Value is <code>':'</code>.
+	 * @since 3.0
+	 */
+	public static final char C_COLON = ':';
+
+	/*
+	 * Character constant indicating the primitive type long in a signature.
+	 * Value is <code>'J'</code>.
+	 */
+	public static final char C_LONG = 'J';
+
+	/*
+	 * Character constant indicating the primitive type short in a signature.
+	 * Value is <code>'S'</code>.
+	 */
+	public static final char C_SHORT = 'S';
+
+	/*
+	 * Character constant indicating result type void in a signature.
+	 * Value is <code>'V'</code>.
+	 */
+	public static final char C_VOID = 'V';
+
+	/*
+	 * Character constant indicating the start of a resolved type variable in a
+	 * signature. Value is <code>'T'</code>.
+	 * @since 3.0
+	 */
+	public static final char C_TYPE_VARIABLE = 'T';
+
+	/*
+	 * Character constant indicating an unbound wildcard type argument
+	 * in a signature.
+	 * Value is <code>'*'</code>.
+	 * @since 3.0
+	 */
+	public static final char C_STAR = '*';
+
+	/*
+	 * Character constant indicating an exception in a signature.
+	 * Value is <code>'^'</code>.
+	 * @since 3.1
+	 */
+	public static final char C_EXCEPTION_START = '^';
+
+	/*
+	 * Character constant indicating a bound wildcard type argument
+	 * in a signature with extends clause.
+	 * Value is <code>'+'</code>.
+	 * @since 3.1
+	 */
+	public static final char C_EXTENDS = '+';
+
+	/*
+	 * Character constant indicating a bound wildcard type argument
+	 * in a signature with super clause.
+	 * Value is <code>'-'</code>.
+	 * @since 3.1
+	 */
+	public static final char C_SUPER = '-';
+
+	/*
+	 * Character constant indicating the dot in a signature.
+	 * Value is <code>'.'</code>.
+	 */
+	public static final char C_DOT = '.';
+
+	/*
+	 * Character constant indicating the dollar in a signature.
+	 * Value is <code>'$'</code>.
+	 */
+	public static final char C_DOLLAR = '$';
+
+	/*
+	 * Character constant indicating an array type in a signature.
+	 * Value is <code>'['</code>.
+	 */
+	public static final char C_ARRAY = '[';
+
+	/*
+	 * Character constant indicating the start of a resolved, named type in a
+	 * signature. Value is <code>'L'</code>.
+	 */
+	public static final char C_RESOLVED = 'L';
+
+	/*
+	 * Character constant indicating the start of an unresolved, named type in a
+	 * signature. Value is <code>'Q'</code>.
+	 */
+	public static final char C_UNRESOLVED = 'Q';
+
+	/*
+	 * Character constant indicating the end of a named type in a signature.
+	 * Value is <code>';'</code>.
+	 */
+	public static final char C_NAME_END = ';';
+
+	/*
+	 * Character constant indicating the start of a parameter type list in a
+	 * signature. Value is <code>'('</code>.
+	 */
+	public static final char C_PARAM_START = '(';
+
+	/*
+	 * Character constant indicating the end of a parameter type list in a
+	 * signature. Value is <code>')'</code>.
+	 */
+	public static final char C_PARAM_END = ')';
+
+	/*
+	 * Character constant indicating the start of a formal type parameter
+	 * (or type argument) list in a signature. Value is <code>'<'</code>.
+	 * @since 3.0
+	 */
+	public static final char C_GENERIC_START = '<';
+
+	/*
+	 * Character constant indicating the end of a generic type list in a
+	 * signature. Value is <code>'>'</code>.
+	 * @since 3.0
+	 */
+	public static final char C_GENERIC_END = '>';
+
+	/*
+	 * Character constant indicating a capture of a wildcard type in a
+	 * signature. Value is <code>'!'</code>.
+	 * @since 3.1
+	 */
+	public static final char C_CAPTURE = '!';
+
+	/*
+	 * String constant for the signature of the primitive type boolean.
+	 * Value is <code>"Z"</code>.
+	 */
+	public static final String SIG_BOOLEAN = "Z"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type byte.
+	 * Value is <code>"B"</code>.
+	 */
+	public static final String SIG_BYTE = "B"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type char.
+	 * Value is <code>"C"</code>.
+	 */
+	public static final String SIG_CHAR = "C"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type double.
+	 * Value is <code>"D"</code>.
+	 */
+	public static final String SIG_DOUBLE = "D"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type float.
+	 * Value is <code>"F"</code>.
+	 */
+	public static final String SIG_FLOAT = "F"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type int.
+	 * Value is <code>"I"</code>.
+	 */
+	public static final String SIG_INT = "I"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type long.
+	 * Value is <code>"J"</code>.
+	 */
+	public static final String SIG_LONG = "J"; //$NON-NLS-1$
+
+	/*
+	 * String constant for the signature of the primitive type short.
+	 * Value is <code>"S"</code>.
+	 */
+	public static final String SIG_SHORT = "S"; //$NON-NLS-1$
+
+	/* String constant for the signature of result type void.
+	 * Value is <code>"V"</code>.
+	 */
+	public static final String SIG_VOID = "V"; //$NON-NLS-1$
+
+	/*
+	 * Kind constant for a class type signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.0
+	 */
+	public static final int CLASS_TYPE_SIGNATURE = 1;
+
+	/*
+	 * Kind constant for a base (primitive or void) type signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.0
+	 */
+	public static final int BASE_TYPE_SIGNATURE = 2;
+
+	/*
+	 * Kind constant for a type variable signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.0
+	 */
+	public static final int TYPE_VARIABLE_SIGNATURE = 3;
+
+	/*
+	 * Kind constant for an array type signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.0
+	 */
+	public static final int ARRAY_TYPE_SIGNATURE = 4;
+
+	/*
+	 * Kind constant for a wildcard type signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.1
+	 */
+	public static final int WILDCARD_TYPE_SIGNATURE = 5;
+
+	/*
+	 * Kind constant for the capture of a wildcard type signature.
+	 * @see #getTypeSignatureKind(String)
+	 * @since 3.1
+	 */
+	public static final int CAPTURE_TYPE_SIGNATURE = 6;
+
+	private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
+	private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
+	private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
+	private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
+	private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
+	private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
+	private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
+	private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
+	private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
+	//	private static final char[] EXTENDS = "extends".toCharArray(); //$NON-NLS-1$
+	//	private static final char[] SUPER = "super".toCharArray(); //$NON-NLS-1$
+	private static final char[] CAPTURE = "capture-of".toCharArray(); //$NON-NLS-1$
+
+	/*
+	 * Returns the number of parameter types in the given method signature.
+	 *
+	 * @param methodSignature the method signature
+	 * @return the number of parameters
+	 * @exception IllegalArgumentException if the signature is not syntactically
+	 *   correct
+	 * @since 2.0
+	 */
+	public static int getParameterCount(char[] methodSignature) throws IllegalArgumentException {
+		try {
+			int count = 0;
+			int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
+			if (i < 0) {
+				throw new IllegalArgumentException();
+			}
+			i++;
+			for (;;) {
+				if (methodSignature[i] == C_PARAM_END) {
+					return count;
+				}
+				int e = Utility.scanTypeSignature(methodSignature, i);
+				if (e < 0) {
+					throw new IllegalArgumentException();
+				}
+				i = e + 1;
+				count++;
+			}
+		} catch (ArrayIndexOutOfBoundsException e) {
+			throw new IllegalArgumentException();
+		}
+	}
+
+	/*
+	 * Extracts the parameter type signatures from the given method signature.
+	 * The method signature is expected to be dot-based.
+	 *
+	 * @param methodSignature the method signature
+	 * @return the list of parameter type signatures
+	 * @exception IllegalArgumentException if the signature is syntactically
+	 *   incorrect
+	 *
+	 * @since 2.0
+	 */
+	public static char[][] getParameterTypes(char[] methodSignature) throws IllegalArgumentException {
+		try {
+			int count = getParameterCount(methodSignature);
+			char[][] result = new char[count][];
+			if (count == 0) {
+				return result;
+			}
+			int i = CharOperation.indexOf(C_PARAM_START, methodSignature);
+			if (i < 0) {
+				throw new IllegalArgumentException();
+			}
+			i++;
+			int t = 0;
+			for (;;) {
+				if (methodSignature[i] == C_PARAM_END) {
+					return result;
+				}
+				int e = Utility.scanTypeSignature(methodSignature, i);
+				if (e < 0) {
+					throw new IllegalArgumentException();
+				}
+				result[t] = CharOperation.subarray(methodSignature, i, e + 1);
+				t++;
+				i = e + 1;
+			}
+		} catch (ArrayIndexOutOfBoundsException e) {
+			throw new IllegalArgumentException();
+		}
+	}
+
+	/*
+	 * Extracts the return type from the given method signature. The method signature is
+	 * expected to be dot-based.
+	 *
+	 * @param methodSignature the method signature
+	 * @return the type signature of the return type
+	 * @exception IllegalArgumentException if the signature is syntactically
+	 *   incorrect
+	 *
+	 * @since 2.0
+	 */
+	public static char[] getReturnType(char[] methodSignature) throws IllegalArgumentException {
+		// skip type parameters
+		int paren = CharOperation.lastIndexOf(C_PARAM_END, methodSignature);
+		if (paren == -1) {
+			throw new IllegalArgumentException();
+		}
+		// there could be thrown exceptions behind, thus scan one type exactly
+		int last = Utility.scanTypeSignature(methodSignature, paren + 1);
+		return CharOperation.subarray(methodSignature, paren + 1, last + 1);
+	}
+
+	/*
+	 * Extracts the class and interface bounds from the given formal type
+	 * parameter signature. The class bound, if present, is listed before
+	 * the interface bounds. The signature is expected to be dot-based.
+	 *
+	 * @param formalTypeParameterSignature the formal type parameter signature
+	 * @return the (possibly empty) list of type signatures for the bounds
+	 * @exception IllegalArgumentException if the signature is syntactically
+	 *   incorrect
+	 * @since 3.0
+	 */
+	public static char[][] getTypeParameterBounds(char[] formalTypeParameterSignature) throws IllegalArgumentException {
+		int p1 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature);
+		if (p1 < 0) {
+			// no ":" means can't be a formal type parameter signature
+			throw new IllegalArgumentException();
+		}
+		if (p1 == formalTypeParameterSignature.length - 1) {
+			// no class or interface bounds
+			return CharOperation.NO_CHAR_CHAR;
+		}
+		int p2 = CharOperation.indexOf(C_COLON, formalTypeParameterSignature, p1 + 1);
+		char[] classBound;
+		if (p2 < 0) {
+			// no interface bounds
+			classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, formalTypeParameterSignature.length);
+			return new char[][] {classBound};
+		}
+		if (p2 == p1 + 1) {
+			// no class bound, but 1 or more interface bounds
+			classBound = null;
+		} else {
+			classBound = CharOperation.subarray(formalTypeParameterSignature, p1 + 1, p2);
+		}
+		char[][] interfaceBounds = CharOperation.splitOn(C_COLON, formalTypeParameterSignature, p2 + 1, formalTypeParameterSignature.length);
+		if (classBound == null) {
+			return interfaceBounds;
+		}
+		int resultLength = interfaceBounds.length + 1;
+		char[][] result = new char[resultLength][];
+		result[0] = classBound;
+		System.arraycopy(interfaceBounds, 0, result, 1, interfaceBounds.length);
+		return result;
+	}
+
+	/*
+	 * Extracts the type parameter signatures from the given method or type signature.
+	 * The method or type signature is expected to be dot-based.
+	 *
+	 * @param methodOrTypeSignature the method or type signature
+	 * @return the list of type parameter signatures
+	 * @exception IllegalArgumentException if the signature is syntactically
+	 *   incorrect
+	 *
+	 * @since 3.1
+	 */
+	public static char[][] getTypeParameters(char[] methodOrTypeSignature) throws IllegalArgumentException {
+		try {
+			int length = methodOrTypeSignature.length;
+			if (length == 0)
+				return CharOperation.NO_CHAR_CHAR;
+			if (methodOrTypeSignature[0] != C_GENERIC_START)
+				return CharOperation.NO_CHAR_CHAR;
+
+			ArrayList<char[]> paramList = new ArrayList<char[]>(1);
+			int paramStart = 1, i = 1; // start after leading '<'
+			while (i < length) {
+				if (methodOrTypeSignature[i] == C_GENERIC_END) {
+					int size = paramList.size();
+					if (size == 0)
+						throw new IllegalArgumentException();
+					char[][] result;
+					paramList.toArray(result = new char[size][]);
+					return result;
+				}
+				i = CharOperation.indexOf(C_COLON, methodOrTypeSignature, i);
+				if (i < 0 || i >= length)
+					throw new IllegalArgumentException();
+				// iterate over bounds
+				while (methodOrTypeSignature[i] == ':') {
+					i++; // skip colon
+					switch (methodOrTypeSignature[i]) {
+						case ':' :
+							// no class bound
+							break;
+						case C_GENERIC_END :
+							break;
+						case C_RESOLVED :
+							try {
+								i = Utility.scanClassTypeSignature(methodOrTypeSignature, i);
+								i++; // position at start of next param if any
+							} catch (IllegalArgumentException e) {
+								// not a class type signature -> it is a new type parameter
+							}
+							break;
+						case C_ARRAY :
+							try {
+								i = Utility.scanArrayTypeSignature(methodOrTypeSignature, i);
+								i++; // position at start of next param if any
+							} catch (IllegalArgumentException e) {
+								// not an array type signature -> it is a new type parameter
+							}
+							break;
+						case C_TYPE_VARIABLE :
+							try {
+								i = Utility.scanTypeVariableSignature(methodOrTypeSignature, i);
+								i++; // position at start of next param if any
+							} catch (IllegalArgumentException e) {
+								// not a type variable signature -> it is a new type parameter
+							}
+							break;
+						// default: another type parameter is starting
+					}
+				}
+				paramList.add(CharOperation.subarray(methodOrTypeSignature, paramStart, i));
+				paramStart = i; // next param start from here
+			}
+		} catch (ArrayIndexOutOfBoundsException e) {
+			// invalid signature, fall through
+		}
+		throw new IllegalArgumentException();
+	}
+
+	/*
+	 * Converts the given type signature to a readable string. The signature is expected to
+	 * be dot-based.
+	 *
+	 * <p>
+	 * For example:
+	 * <pre>
+	 * <code>
+	 * toString({'[', 'L', 'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', ';'}) -> {'j', 'a', 'v', 'a', '.', 'l', 'a', 'n', 'g', '.', 'S', 't', 'r', 'i', 'n', 'g', '[', ']'}
+	 * toString({'I'}) -> {'i', 'n', 't'}
+	 * toString({'+', 'L', 'O', 'b', 'j', 'e', 'c', 't', ';'}) -> {'?', ' ', 'e', 'x', 't', 'e', 'n', 'd', 's', ' ', 'O', 'b', 'j', 'e', 'c', 't'}
+	 * </code>
+	 * </pre>
+	 * </p>
+	 * <p>
+	 * Note: This method assumes that a type signature containing a <code>'$'</code>
+	 * is an inner type signature. While this is correct in most cases, someone could
+	 * define a non-inner type name containing a <code>'$'</code>. Handling this
+	 * correctly in all cases would have required resolving the signature, which
+	 * generally not feasible.
+	 * </p>
+	 *
+	 * @param signature the type signature
+	 * @return the string representation of the type
+	 * @exception IllegalArgumentException if the signature is not syntactically
+	 *   correct
+	 *
+	 * @since 2.0
+	 */
+	public static char[] toCharArray(char[] signature) throws IllegalArgumentException {
+		int sigLength = signature.length;
+		if (sigLength == 0 || signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) {
+			return toCharArray(signature, CharOperation.NO_CHAR, null, true, true);
+		}
+
+		StringBuffer buffer = new StringBuffer(signature.length + 10);
+		appendTypeSignature(signature, 0, true, buffer);
+		char[] result = new char[buffer.length()];
+		buffer.getChars(0, buffer.length(), result, 0);
+		return result;
+	}
+
+	/*
+	 * Converts the given method signature to a readable form. The method signature is expected to
+	 * be dot-based.
+	 * <p>
+	 * For example:
+	 * <pre>
+	 * <code>
+	 * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
+	 * </code>
+	 * </pre>
+	 * </p>
+	 *
+	 * @param methodSignature the method signature to convert
+	 * @param methodName the name of the method to insert in the result, or
+	 *   <code>null</code> if no method name is to be included
+	 * @param parameterNames the parameter names to insert in the result, or
+	 *   <code>null</code> if no parameter names are to be included; if supplied,
+	 *   the number of parameter names must match that of the method signature
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param includeReturnType <code>true</code> if the return type is to be
+	 *   included
+	 * @param isVargArgs <code>true</code> if the last argument should be displayed as a
+	 * variable argument,  <code>false</code> otherwise.
+	 * @return the char array representation of the method signature
+	 *
+	 * @since 3.1
+	 */
+	public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType, boolean isVargArgs) {
+		int firstParen = CharOperation.indexOf(C_PARAM_START, methodSignature);
+		if (firstParen == -1) {
+			throw new IllegalArgumentException();
+		}
+
+		StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
+
+		// return type
+		if (includeReturnType) {
+			char[] rts = getReturnType(methodSignature);
+			appendTypeSignature(rts, 0, fullyQualifyTypeNames, buffer);
+			buffer.append(' ');
+		}
+
+		// selector
+		if (methodName != null) {
+			buffer.append(methodName);
+		}
+
+		// parameters
+		buffer.append('(');
+		char[][] pts = getParameterTypes(methodSignature);
+		for (int i = 0, max = pts.length; i < max; i++) {
+			if (i == max - 1) {
+				appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer, isVargArgs);
+			} else {
+				appendTypeSignature(pts[i], 0, fullyQualifyTypeNames, buffer);
+			}
+			if (parameterNames != null) {
+				buffer.append(' ');
+				buffer.append(parameterNames[i]);
+			}
+			if (i != pts.length - 1) {
+				buffer.append(',');
+				buffer.append(' ');
+			}
+		}
+		buffer.append(')');
+		char[] result = new char[buffer.length()];
+		buffer.getChars(0, buffer.length(), result, 0);
+		return result;
+	}
+
+	/*
+	 * Scans the given string for a type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param buffer the string buffer to append to
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type signature
+	 * @see Utility#scanTypeSignature(char[], int)
+	 */
+	private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
+	}
+
+	/*
+	 * Scans the given string for a type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param buffer the string buffer to append to
+	 * @param isVarArgs <code>true</code> if the type must be displayed as a
+	 * variable argument, <code>false</code> otherwise. In this case, the type must be an array type
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type signature, or if isVarArgs is <code>true</code>,
+	 * and the type is not an array type signature.
+	 * @see Utility#scanTypeSignature(char[], int)
+	 */
+	private static int appendTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (isVarArgs) {
+			switch (c) {
+				case C_ARRAY :
+					return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, true);
+				case C_RESOLVED :
+				case C_UNRESOLVED :
+				case C_TYPE_VARIABLE :
+				case C_BOOLEAN :
+				case C_BYTE :
+				case C_CHAR :
+				case C_DOUBLE :
+				case C_FLOAT :
+				case C_INT :
+				case C_LONG :
+				case C_SHORT :
+				case C_VOID :
+				case C_STAR :
+				case C_EXTENDS :
+				case C_SUPER :
+				case C_CAPTURE :
+				default :
+					throw new IllegalArgumentException(); // a var args is an array type
+			}
+		}
+		switch (c) {
+			case C_ARRAY :
+				return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer);
+			case C_RESOLVED :
+			case C_UNRESOLVED :
+				return appendClassTypeSignature(string, start, fullyQualifyTypeNames, buffer);
+			case C_TYPE_VARIABLE :
+				int e = Utility.scanTypeVariableSignature(string, start);
+				buffer.append(string, start + 1, e - start - 1);
+				return e;
+			case C_BOOLEAN :
+				buffer.append(BOOLEAN);
+				return start;
+			case C_BYTE :
+				buffer.append(BYTE);
+				return start;
+			case C_CHAR :
+				buffer.append(CHAR);
+				return start;
+			case C_DOUBLE :
+				buffer.append(DOUBLE);
+				return start;
+			case C_FLOAT :
+				buffer.append(FLOAT);
+				return start;
+			case C_INT :
+				buffer.append(INT);
+				return start;
+			case C_LONG :
+				buffer.append(LONG);
+				return start;
+			case C_SHORT :
+				buffer.append(SHORT);
+				return start;
+			case C_VOID :
+				buffer.append(VOID);
+				return start;
+			case C_CAPTURE :
+				return appendCaptureTypeSignature(string, start, fullyQualifyTypeNames, buffer);
+			case C_STAR :
+			case C_EXTENDS :
+			case C_SUPER :
+				return appendTypeArgumentSignature(string, start, fullyQualifyTypeNames, buffer);
+			default :
+				throw new IllegalArgumentException();
+		}
+	}
+
+	/*
+	 * Scans the given string for an array type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not an array type signature
+	 * @see Utility#scanArrayTypeSignature(char[], int)
+	 */
+	private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		return appendArrayTypeSignature(string, start, fullyQualifyTypeNames, buffer, false);
+	}
+
+	/*
+	 * Scans the given string for an array type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not an array type signature
+	 * @see Utility#scanArrayTypeSignature(char[], int)
+	 */
+	private static int appendCaptureTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		// need a minimum 2 char
+		if (start >= string.length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != C_CAPTURE) {
+			throw new IllegalArgumentException();
+		}
+		buffer.append(CAPTURE).append(' ');
+		return appendTypeArgumentSignature(string, start + 1, fullyQualifyTypeNames, buffer);
+	}
+
+	/*
+	 * Scans the given string for an array type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param isVarArgs <code>true</code> if the array type must be displayed as a
+	 * variable argument, <code>false</code> otherwise
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not an array type signature
+	 * @see Utility#scanArrayTypeSignature(char[], int)
+	 */
+	private static int appendArrayTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer, boolean isVarArgs) {
+		int length = string.length;
+		// need a minimum 2 char
+		if (start >= length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != C_ARRAY) {
+			throw new IllegalArgumentException();
+		}
+
+		int index = start;
+		c = string[++index];
+		while (c == C_ARRAY) {
+			// need a minimum 2 char
+			if (index >= length - 1) {
+				throw new IllegalArgumentException();
+			}
+			c = string[++index];
+		}
+
+		int e = appendTypeSignature(string, index, fullyQualifyTypeNames, buffer);
+
+		for (int i = 1, dims = index - start; i < dims; i++) {
+			buffer.append('[').append(']');
+		}
+
+		if (isVarArgs) {
+			buffer.append('.').append('.').append('.');
+		} else {
+			buffer.append('[').append(']');
+		}
+		return e;
+	}
+
+	/*
+	 * Scans the given string for a class type signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param buffer the string buffer to append to
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a class type signature
+	 * @see Utility#scanClassTypeSignature(char[], int)
+	 */
+	private static int appendClassTypeSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		// need a minimum 3 chars "Lx;"
+		if (start >= string.length - 2) {
+			throw new IllegalArgumentException();
+		}
+		// must start in "L" or "Q"
+		char c = string[start];
+		if (c != C_RESOLVED && c != C_UNRESOLVED) {
+			throw new IllegalArgumentException();
+		}
+		boolean resolved = (c == C_RESOLVED);
+		boolean removePackageQualifiers = !fullyQualifyTypeNames;
+		if (!resolved) {
+			// keep everything in an unresolved name
+			removePackageQualifiers = false;
+		}
+		int p = start + 1;
+		int checkpoint = buffer.length();
+		int innerTypeStart = -1;
+		boolean inAnonymousType = false;
+		while (true) {
+			if (p >= string.length) {
+				throw new IllegalArgumentException();
+			}
+			c = string[p];
+			switch (c) {
+				case C_SEMICOLON :
+					// all done
+					return p;
+				case C_GENERIC_START :
+					int e = appendTypeArgumentSignatures(string, p, fullyQualifyTypeNames, buffer);
+					// once we hit type arguments there are no more package prefixes
+					removePackageQualifiers = false;
+					p = e;
+					break;
+				case C_DOT :
+					if (removePackageQualifiers) {
+						// erase package prefix
+						buffer.setLength(checkpoint);
+					} else {
+						buffer.append('.');
+					}
+					break;
+				case '/' :
+					if (removePackageQualifiers) {
+						// erase package prefix
+						buffer.setLength(checkpoint);
+					} else {
+						buffer.append('/');
+					}
+					break;
+				case C_DOLLAR :
+					innerTypeStart = buffer.length();
+					inAnonymousType = false;
+					if (resolved) {
+						// once we hit "$" there are no more package prefixes
+						removePackageQualifiers = false;
+						/*
+						 * Convert '$' in resolved type signatures into '.'.
+						 * NOTE: This assumes that the type signature is an inner type
+						 * signature. This is true in most cases, but someone can define a
+						 * non-inner type name containing a '$'.
+						 */
+						buffer.append('.');
+					}
+					break;
+				default :
+					if (innerTypeStart != -1 && !inAnonymousType && Character.isDigit(c)) {
+						inAnonymousType = true;
+						buffer.setLength(innerTypeStart); // remove '.'
+						buffer.insert(checkpoint, "new "); //$NON-NLS-1$
+						buffer.append("(){}"); //$NON-NLS-1$
+					}
+					if (!inAnonymousType)
+						buffer.append(c);
+					innerTypeStart = -1;
+			}
+			p++;
+		}
+	}
+
+	/*
+	 * Scans the given string for a list of type arguments signature starting at the
+	 * given index and appends it to the given buffer, and returns the index of the
+	 * last character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param buffer the string buffer to append to
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a list of type argument
+	 * signatures
+	 * @see Utility#scanTypeArgumentSignatures(char[], int)
+	 */
+	private static int appendTypeArgumentSignatures(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		// need a minimum 2 char "<>"
+		if (start >= string.length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != C_GENERIC_START) {
+			throw new IllegalArgumentException();
+		}
+		buffer.append('<');
+		int p = start + 1;
+		int count = 0;
+		while (true) {
+			if (p >= string.length) {
+				throw new IllegalArgumentException();
+			}
+			c = string[p];
+			if (c == C_GENERIC_END) {
+				buffer.append('>');
+				return p;
+			}
+			if (count != 0) {
+				buffer.append(',');
+			}
+			int e = appendTypeArgumentSignature(string, p, fullyQualifyTypeNames, buffer);
+			count++;
+			p = e + 1;
+		}
+	}
+
+	/*
+	 * Scans the given string for a type argument signature starting at the given
+	 * index and appends it to the given buffer, and returns the index of the last
+	 * character.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param buffer the string buffer to append to
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type argument signature
+	 * @see Utility#scanTypeArgumentSignature(char[], int)
+	 */
+	private static int appendTypeArgumentSignature(char[] string, int start, boolean fullyQualifyTypeNames, StringBuffer buffer) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		switch (c) {
+			case C_STAR :
+				buffer.append('?');
+				return start;
+			case C_EXTENDS :
+				buffer.append("? extends "); //$NON-NLS-1$
+				return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
+			case C_SUPER :
+				buffer.append("? super "); //$NON-NLS-1$
+				return appendTypeSignature(string, start + 1, fullyQualifyTypeNames, buffer);
+			default :
+				return appendTypeSignature(string, start, fullyQualifyTypeNames, buffer);
+		}
+	}
+
+	/*
+	 * Converts the given method signature to a readable form. The method signature is expected to
+	 * be dot-based.
+	 * <p>
+	 * For example:
+	 * <pre>
+	 * <code>
+	 * toString("([Ljava.lang.String;)V", "main", new String[] {"args"}, false, true) -> "void main(String[] args)"
+	 * </code>
+	 * </pre>
+	 * </p>
+	 *
+	 * @param methodSignature the method signature to convert
+	 * @param methodName the name of the method to insert in the result, or
+	 *   <code>null</code> if no method name is to be included
+	 * @param parameterNames the parameter names to insert in the result, or
+	 *   <code>null</code> if no parameter names are to be included; if supplied,
+	 *   the number of parameter names must match that of the method signature
+	 * @param fullyQualifyTypeNames <code>true</code> if type names should be fully
+	 *   qualified, and <code>false</code> to use only simple names
+	 * @param includeReturnType <code>true</code> if the return type is to be
+	 *   included
+	 * @return the char array representation of the method signature
+	 *
+	 * @since 2.0
+	 */
+	public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) {
+		return toCharArray(methodSignature, methodName, parameterNames, fullyQualifyTypeNames, includeReturnType, false);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SignatureAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SignatureAttribute.java
new file mode 100644
index 0000000..f186ca6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SignatureAttribute.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class SignatureAttribute extends ClassFileAttribute {
+
+	private int signatureIndex;
+	private char[] signature;
+
+	SignatureAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int index = u2At(classFileBytes, 6, offset);
+		this.signatureIndex = index;
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.signature = constantPoolEntry.getUtf8Value();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignatureIndex()
+	 */
+	public int getSignatureIndex() {
+		return this.signatureIndex;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.ISignatureAttribute#getSignature()
+	 */
+	public char[] getSignature() {
+		return this.signature;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SourceFileAttribute.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SourceFileAttribute.java
new file mode 100644
index 0000000..1d51be9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/SourceFileAttribute.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public class SourceFileAttribute extends ClassFileAttribute {
+
+	private int sourceFileIndex;
+	private char[] sourceFileName;
+
+	/**
+	 * Constructor for SourceFileAttribute.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public SourceFileAttribute(byte[] classFileBytes, ConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		this.sourceFileIndex = u2At(classFileBytes, 6, offset);
+		ConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(this.sourceFileIndex);
+		if (constantPoolEntry.getKind() != ConstantPoolConstant.CONSTANT_Utf8) {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		this.sourceFileName = constantPoolEntry.getUtf8Value();
+	}
+
+	/*
+	 * @see ISourceAttribute#getSourceFileIndex()
+	 */
+	public int getSourceFileIndex() {
+		return this.sourceFileIndex;
+	}
+
+	/*
+	 * @see ISourceAttribute#getSourceFileName()
+	 */
+	public char[] getSourceFileName() {
+		return this.sourceFileName;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/TypeConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/TypeConstants.java
new file mode 100644
index 0000000..99e3e78
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/TypeConstants.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+public interface TypeConstants {
+
+	char[] JAVA = "java".toCharArray(); //$NON-NLS-1$
+	char[] LANG = "lang".toCharArray(); //$NON-NLS-1$
+	char[] IO = "io".toCharArray(); //$NON-NLS-1$
+	char[] UTIL = "util".toCharArray(); //$NON-NLS-1$
+	char[] ANNOTATION = "annotation".toCharArray(); //$NON-NLS-1$
+	char[] REFLECT = "reflect".toCharArray(); //$NON-NLS-1$
+	char[] LENGTH = "length".toCharArray(); //$NON-NLS-1$
+	char[] CLONE = "clone".toCharArray(); //$NON-NLS-1$
+	char[] EQUALS = "equals".toCharArray(); //$NON-NLS-1$
+	char[] GETCLASS = "getClass".toCharArray(); //$NON-NLS-1$
+	char[] HASHCODE = "hashCode".toCharArray(); //$NON-NLS-1$
+	char[] OBJECT = "Object".toCharArray(); //$NON-NLS-1$
+	char[] MAIN = "main".toCharArray(); //$NON-NLS-1$
+	char[] SERIALVERSIONUID = "serialVersionUID".toCharArray(); //$NON-NLS-1$
+	char[] SERIALPERSISTENTFIELDS = "serialPersistentFields".toCharArray(); //$NON-NLS-1$
+	char[] READRESOLVE = "readResolve".toCharArray(); //$NON-NLS-1$
+	char[] WRITEREPLACE = "writeReplace".toCharArray(); //$NON-NLS-1$
+	char[] READOBJECT = "readObject".toCharArray(); //$NON-NLS-1$
+	char[] WRITEOBJECT = "writeObject".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_LANG_OBJECT = "java.lang.Object".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_LANG_ENUM = "java.lang.Enum".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_LANG_ANNOTATION_ANNOTATION = "java.lang.annotation.Annotation".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_IO_OBJECTINPUTSTREAM = "java.io.ObjectInputStream".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_IO_OBJECTOUTPUTSTREAM = "java.io.ObjectOutputStream".toCharArray(); //$NON-NLS-1$
+	char[] CharArray_JAVA_IO_OBJECTSTREAMFIELD = "java.io.ObjectStreamField".toCharArray(); //$NON-NLS-1$
+	char[] ANONYM_PREFIX = "new ".toCharArray(); //$NON-NLS-1$
+	char[] ANONYM_SUFFIX = "(){}".toCharArray(); //$NON-NLS-1$
+	char[] WILDCARD_NAME = {'?'};
+	char[] WILDCARD_SUPER = " super ".toCharArray(); //$NON-NLS-1$
+	char[] WILDCARD_EXTENDS = " extends ".toCharArray(); //$NON-NLS-1$
+	char[] WILDCARD_MINUS = {'-'};
+	char[] WILDCARD_STAR = {'*'};
+	char[] WILDCARD_PLUS = {'+'};
+	char[] WILDCARD_CAPTURE_NAME_PREFIX = "capture#".toCharArray(); //$NON-NLS-1$
+	char[] WILDCARD_CAPTURE_NAME_SUFFIX = "-of ".toCharArray(); //$NON-NLS-1$
+	char[] WILDCARD_CAPTURE = {'!'};
+	char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
+	char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
+	char[] INT = "int".toCharArray(); //$NON-NLS-1$
+	char[] LONG = "long".toCharArray(); //$NON-NLS-1$
+	char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
+	char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
+	char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
+	char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
+	char[] NULL = "null".toCharArray(); //$NON-NLS-1$
+	char[] VOID = "void".toCharArray(); //$NON-NLS-1$
+	char[] VALUE = "value".toCharArray(); //$NON-NLS-1$
+	char[] VALUES = "values".toCharArray(); //$NON-NLS-1$
+	char[] VALUEOF = "valueOf".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_SOURCE = "SOURCE".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_CLASS = "CLASS".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_RUNTIME = "RUNTIME".toCharArray(); //$NON-NLS-1$
+	char[] ANNOTATION_PREFIX = "@".toCharArray(); //$NON-NLS-1$
+	char[] ANNOTATION_SUFFIX = "()".toCharArray(); //$NON-NLS-1$
+	char[] TYPE = "TYPE".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_FIELD = "FIELD".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_METHOD = "METHOD".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_PARAMETER = "PARAMETER".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_CONSTRUCTOR = "CONSTRUCTOR".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_LOCAL_VARIABLE = "LOCAL_VARIABLE".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_ANNOTATION_TYPE = "ANNOTATION_TYPE".toCharArray(); //$NON-NLS-1$
+	char[] UPPER_PACKAGE = "PACKAGE".toCharArray(); //$NON-NLS-1$
+
+	// Constant compound names
+	char[][] JAVA_LANG = {JAVA, LANG};
+	char[][] JAVA_IO = {JAVA, IO};
+	char[][] JAVA_LANG_ANNOTATION_ANNOTATION = {JAVA, LANG, ANNOTATION, "Annotation".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ASSERTIONERROR = {JAVA, LANG, "AssertionError".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_CLASS = {JAVA, LANG, "Class".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_CLASSNOTFOUNDEXCEPTION = {JAVA, LANG, "ClassNotFoundException".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_CLONEABLE = {JAVA, LANG, "Cloneable".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ENUM = {JAVA, LANG, "Enum".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_EXCEPTION = {JAVA, LANG, "Exception".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ERROR = {JAVA, LANG, "Error".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ILLEGALARGUMENTEXCEPTION = {JAVA, LANG, "IllegalArgumentException".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ITERABLE = {JAVA, LANG, "Iterable".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_NOCLASSDEFERROR = {JAVA, LANG, "NoClassDefError".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_OBJECT = {JAVA, LANG, OBJECT};
+	char[][] JAVA_LANG_STRING = {JAVA, LANG, "String".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_STRINGBUFFER = {JAVA, LANG, "StringBuffer".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_STRINGBUILDER = {JAVA, LANG, "StringBuilder".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_SYSTEM = {JAVA, LANG, "System".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_RUNTIMEEXCEPTION = {JAVA, LANG, "RuntimeException".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_THROWABLE = {JAVA, LANG, "Throwable".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_REFLECT_CONSTRUCTOR = {JAVA, LANG, REFLECT, "Constructor".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_IO_PRINTSTREAM = {JAVA, IO, "PrintStream".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_IO_SERIALIZABLE = {JAVA, IO, "Serializable".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_BYTE = {JAVA, LANG, "Byte".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_SHORT = {JAVA, LANG, "Short".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_CHARACTER = {JAVA, LANG, "Character".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_INTEGER = {JAVA, LANG, "Integer".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_LONG = {JAVA, LANG, "Long".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_FLOAT = {JAVA, LANG, "Float".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_DOUBLE = {JAVA, LANG, "Double".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_BOOLEAN = {JAVA, LANG, "Boolean".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_VOID = {JAVA, LANG, "Void".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_UTIL_COLLECTION = {JAVA, UTIL, "Collection".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_UTIL_ITERATOR = {JAVA, UTIL, "Iterator".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_DEPRECATED = {JAVA, LANG, "Deprecated".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_DOCUMENTED = {JAVA, LANG, ANNOTATION, "Documented".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_INHERITED = {JAVA, LANG, ANNOTATION, "Inherited".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_OVERRIDE = {JAVA, LANG, "Override".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_RETENTION = {JAVA, LANG, ANNOTATION, "Retention".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_SUPPRESSWARNINGS = {JAVA, LANG, "SuppressWarnings".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_TARGET = {JAVA, LANG, ANNOTATION, "Target".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_RETENTIONPOLICY = {JAVA, LANG, ANNOTATION, "RetentionPolicy".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_ELEMENTTYPE = {JAVA, LANG, ANNOTATION, "ElementType".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_REFLECT_FIELD = new char[][] {JAVA, LANG, REFLECT, "Field".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_REFLECT_METHOD = new char[][] {JAVA, LANG, REFLECT, "Method".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_IO_OBJECTSTREAMEXCEPTION = new char[][] {JAVA, IO, "ObjectStreamException".toCharArray()};//$NON-NLS-1$
+	char[][] JAVA_IO_EXTERNALIZABLE = {JAVA, IO, "Externalizable".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_IO_IOEXCEPTION = new char[][] {JAVA, IO, "IOException".toCharArray()};//$NON-NLS-1$
+	char[][] JAVA_IO_OBJECTOUTPUTSTREAM = new char[][] {JAVA, IO, "ObjectOutputStream".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_IO_OBJECTINPUTSTREAM = new char[][] {JAVA, IO, "ObjectInputStream".toCharArray()}; //$NON-NLS-1$
+
+	// Constraints for generic type argument inference
+	int CONSTRAINT_EQUAL = 0; // Actual = Formal
+	int CONSTRAINT_EXTENDS = 1; // Actual << Formal
+	int CONSTRAINT_SUPER = 2; // Actual >> Formal
+
+	// Constants used to perform bound checks
+	int OK = 0;
+	int UNCHECKED = 1;
+	int MISMATCH = 2;
+
+	// Synthetics
+	char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
+	char[] CLINIT = "<clinit>".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_SWITCH_ENUM_TABLE = "$SWITCH_TABLE$".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_ENUM_VALUES = "ENUM$VALUES".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_ASSERT_DISABLED = "$assertionsDisabled".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_CLASS = "class$".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_OUTER_LOCAL_PREFIX = "val$".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_ENCLOSING_INSTANCE_PREFIX = "this$".toCharArray(); //$NON-NLS-1$
+	char[] SYNTHETIC_ACCESS_METHOD_PREFIX = "access$".toCharArray(); //$NON-NLS-1$
+
+	// synthetic package-info name
+	public static final char[] PACKAGE_INFO_NAME = "package-info".toCharArray(); //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Utility.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Utility.java
new file mode 100644
index 0000000..4a982de
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/Utility.java
@@ -0,0 +1,689 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.comparator.java;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+public class Utility {
+	public static final int[] EMPTY_INT_ARRAY = new int[0];
+	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+	private static final int DEFAULT_READING_SIZE = 8192;
+	private static final char[] BOOLEAN = "boolean".toCharArray(); //$NON-NLS-1$
+	private static final char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$
+	private static final char[] CHAR = "char".toCharArray(); //$NON-NLS-1$
+	private static final char[] DOUBLE = "double".toCharArray(); //$NON-NLS-1$
+	private static final char[] FLOAT = "float".toCharArray(); //$NON-NLS-1$
+	private static final char[] INT = "int".toCharArray(); //$NON-NLS-1$
+	private static final char[] LONG = "long".toCharArray(); //$NON-NLS-1$
+	private static final char[] SHORT = "short".toCharArray(); //$NON-NLS-1$
+	private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
+	private static final char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
+
+	/**
+	 * Returns the contents of the given zip entry as a byte array.
+	 * @throws IOException if a problem occured reading the zip entry.
+	 */
+	public static byte[] getZipEntryByteContent(ZipEntry ze, ZipFile zip) throws IOException {
+
+		InputStream stream = null;
+		try {
+			stream = zip.getInputStream(ze);
+			if (stream == null)
+				throw new IOException("Invalid zip entry name : " + ze.getName()); //$NON-NLS-1$
+			return getInputStreamAsByteArray(stream, (int) ze.getSize());
+		} finally {
+			close(stream);
+		}
+	}
+
+	public static void close(Object object) {
+		if (object == null)
+			return;
+		try {
+			if (object instanceof InputStream)
+				((InputStream) object).close();
+			else if (object instanceof OutputStream)
+				((OutputStream) object).close();
+			else if (object instanceof ZipFile)
+				((ZipFile) object).close();
+		} catch (IOException e) {
+			//ignore
+		}
+	}
+
+	/**
+	 * Returns the given input stream's contents as a byte array.
+	 * If a length is specified (ie. if length != -1), only length bytes
+	 * are returned. Otherwise all bytes in the stream are returned.
+	 * Note this doesn't close the stream.
+	 * @throws IOException if a problem occured reading the stream.
+	 */
+	public static byte[] getInputStreamAsByteArray(InputStream stream, int length) throws IOException {
+		byte[] contents;
+		if (length == -1) {
+			contents = new byte[0];
+			int contentsLength = 0;
+			int amountRead = -1;
+			do {
+				int amountRequested = Math.max(stream.available(), DEFAULT_READING_SIZE); // read at least 8K
+
+				// resize contents if needed
+				if (contentsLength + amountRequested > contents.length) {
+					System.arraycopy(contents, 0, contents = new byte[contentsLength + amountRequested], 0, contentsLength);
+				}
+
+				// read as many bytes as possible
+				amountRead = stream.read(contents, contentsLength, amountRequested);
+
+				if (amountRead > 0) {
+					// remember length of contents
+					contentsLength += amountRead;
+				}
+			} while (amountRead != -1);
+
+			// resize contents if necessary
+			if (contentsLength < contents.length) {
+				System.arraycopy(contents, 0, contents = new byte[contentsLength], 0, contentsLength);
+			}
+		} else {
+			contents = new byte[length];
+			int len = 0;
+			int readSize = 0;
+			while ((readSize != -1) && (len != length)) {
+				// See PR 1FMS89U
+				// We record first the read size. In this case len is the actual read size.
+				len += readSize;
+				readSize = stream.read(contents, len, length - len);
+			}
+		}
+
+		return contents;
+	}
+
+	public static ClassFileAttribute getAttribute(MethodInfo methodInfo, char[] attributeName) {
+		ClassFileAttribute[] attributes = methodInfo.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
+				return attributes[i];
+			}
+		}
+		return null;
+	}
+
+	public static ClassFileAttribute getAttribute(FieldInfo fieldInfo, char[] attributeName) {
+		ClassFileAttribute[] attributes = fieldInfo.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
+				return attributes[i];
+			}
+		}
+		return null;
+	}
+
+	public static ClassFileAttribute getAttribute(ClassFileReader classFileReader, char[] attributeName) {
+		ClassFileAttribute[] attributes = classFileReader.getAttributes();
+		for (int i = 0, max = attributes.length; i < max; i++) {
+			if (Arrays.equals(attributes[i].getAttributeName(), attributeName)) {
+				return attributes[i];
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Scans the given string for a type signature starting at the given index
+	 * and returns the index of the last character.
+	 * <pre>
+	 * TypeSignature:
+	 *  |  BaseTypeSignature
+	 *  |  ArrayTypeSignature
+	 *  |  ClassTypeSignature
+	 *  |  TypeVariableSignature
+	 * </pre>
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type signature
+	 */
+	public static int scanTypeSignature(char[] string, int start) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		switch (c) {
+			case Signature.C_ARRAY :
+				return scanArrayTypeSignature(string, start);
+			case Signature.C_RESOLVED :
+			case Signature.C_UNRESOLVED :
+				return scanClassTypeSignature(string, start);
+			case Signature.C_TYPE_VARIABLE :
+				return scanTypeVariableSignature(string, start);
+			case Signature.C_BOOLEAN :
+			case Signature.C_BYTE :
+			case Signature.C_CHAR :
+			case Signature.C_DOUBLE :
+			case Signature.C_FLOAT :
+			case Signature.C_INT :
+			case Signature.C_LONG :
+			case Signature.C_SHORT :
+			case Signature.C_VOID :
+				return scanBaseTypeSignature(string, start);
+			case Signature.C_CAPTURE :
+				return scanCaptureTypeSignature(string, start);
+			case Signature.C_EXTENDS :
+			case Signature.C_SUPER :
+			case Signature.C_STAR :
+				return scanTypeBoundSignature(string, start);
+			default :
+				throw new IllegalArgumentException();
+		}
+	}
+
+	/**
+	 * Scans the given string for a base type signature starting at the given index
+	 * and returns the index of the last character.
+	 * <pre>
+	 * BaseTypeSignature:
+	 *     <b>B</b> | <b>C</b> | <b>D</b> | <b>F</b> | <b>I</b>
+	 *   | <b>J</b> | <b>S</b> | <b>V</b> | <b>Z</b>
+	 * </pre>
+	 * Note that although the base type "V" is only allowed in method return types,
+	 * there is no syntactic ambiguity. This method will accept them anywhere
+	 * without complaint.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a base type signature
+	 */
+	public static int scanBaseTypeSignature(char[] string, int start) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if ("BCDFIJSVZ".indexOf(c) >= 0) { //$NON-NLS-1$
+			return start;
+		}
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Scans the given string for an array type signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * ArrayTypeSignature:
+	 *     <b>[</b> TypeSignature
+	 * </pre>
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not an array type signature
+	 */
+	public static int scanArrayTypeSignature(char[] string, int start) {
+		int length = string.length;
+		// need a minimum 2 char
+		if (start >= length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != Signature.C_ARRAY) {
+			throw new IllegalArgumentException();
+		}
+
+		c = string[++start];
+		while (c == Signature.C_ARRAY) {
+			// need a minimum 2 char
+			if (start >= length - 1) {
+				throw new IllegalArgumentException();
+			}
+			c = string[++start];
+		}
+		return scanTypeSignature(string, start);
+	}
+
+	/**
+	 * Scans the given string for a capture of a wildcard type signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * CaptureTypeSignature:
+	 *     <b>!</b> TypeBoundSignature
+	 * </pre>
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a capture type signature
+	 */
+	public static int scanCaptureTypeSignature(char[] string, int start) {
+		// need a minimum 2 char
+		if (start >= string.length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != Signature.C_CAPTURE) {
+			throw new IllegalArgumentException();
+		}
+		return scanTypeBoundSignature(string, start + 1);
+	}
+
+	/**
+	 * Scans the given string for a type variable signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * TypeVariableSignature:
+	 *     <b>T</b> Identifier <b>;</b>
+	 * </pre>
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type variable signature
+	 */
+	public static int scanTypeVariableSignature(char[] string, int start) {
+		// need a minimum 3 chars "Tx;"
+		if (start >= string.length - 2) {
+			throw new IllegalArgumentException();
+		}
+		// must start in "T"
+		char c = string[start];
+		if (c != Signature.C_TYPE_VARIABLE) {
+			throw new IllegalArgumentException();
+		}
+		int id = scanIdentifier(string, start + 1);
+		c = string[id + 1];
+		if (c == Signature.C_SEMICOLON) {
+			return id + 1;
+		}
+		throw new IllegalArgumentException();
+	}
+
+	/**
+	 * Scans the given string for an identifier starting at the given
+	 * index and returns the index of the last character.
+	 * Stop characters are: ";", ":", "<", ">", "/", ".".
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not an identifier
+	 */
+	public static int scanIdentifier(char[] string, int start) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		int p = start;
+		while (true) {
+			char c = string[p];
+			if (c == '<' || c == '>' || c == ':' || c == ';' || c == '.' || c == '/') {
+				return p - 1;
+			}
+			p++;
+			if (p == string.length) {
+				return p - 1;
+			}
+		}
+	}
+
+	/**
+	 * Scans the given string for a class type signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * ClassTypeSignature:
+	 *     { <b>L</b> | <b>Q</b> } Identifier
+	 *           { { <b>/</b> | <b>.</b> Identifier [ <b><</b> TypeArgumentSignature* <b>></b> ] }
+	 *           <b>;</b>
+	 * </pre>
+	 * Note that although all "/"-identifiers most come before "."-identifiers,
+	 * there is no syntactic ambiguity. This method will accept them without
+	 * complaint.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a class type signature
+	 */
+	public static int scanClassTypeSignature(char[] string, int start) {
+		// need a minimum 3 chars "Lx;"
+		if (start >= string.length - 2) {
+			throw new IllegalArgumentException();
+		}
+		// must start in "L" or "Q"
+		char c = string[start];
+		if (c != Signature.C_RESOLVED && c != Signature.C_UNRESOLVED) {
+			return -1;
+		}
+		int p = start + 1;
+		while (true) {
+			if (p >= string.length) {
+				throw new IllegalArgumentException();
+			}
+			c = string[p];
+			if (c == Signature.C_SEMICOLON) {
+				// all done
+				return p;
+			} else if (c == Signature.C_GENERIC_START) {
+				int e = scanTypeArgumentSignatures(string, p);
+				p = e;
+			} else if (c == Signature.C_DOT || c == '/') {
+				int id = scanIdentifier(string, p + 1);
+				p = id;
+			}
+			p++;
+		}
+	}
+
+	/**
+	 * Scans the given string for a type bound signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * TypeBoundSignature:
+	 *     <b>[-+]</b> TypeSignature <b>;</b>
+	 *     <b>*</b></b>
+	 * </pre>
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type variable signature
+	 */
+	public static int scanTypeBoundSignature(char[] string, int start) {
+		// need a minimum 1 char for wildcard
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		switch (c) {
+			case Signature.C_STAR :
+				return start;
+			case Signature.C_SUPER :
+			case Signature.C_EXTENDS :
+				// need a minimum 3 chars "+[I"
+				if (start >= string.length - 2) {
+					throw new IllegalArgumentException();
+				}
+				break;
+			default :
+				// must start in "+/-"
+				throw new IllegalArgumentException();
+
+		}
+		c = string[++start];
+		switch (c) {
+			case Signature.C_CAPTURE :
+				return scanCaptureTypeSignature(string, start);
+			case Signature.C_SUPER :
+			case Signature.C_EXTENDS :
+				return scanTypeBoundSignature(string, start);
+			case Signature.C_RESOLVED :
+			case Signature.C_UNRESOLVED :
+				return scanClassTypeSignature(string, start);
+			case Signature.C_TYPE_VARIABLE :
+				return scanTypeVariableSignature(string, start);
+			case Signature.C_ARRAY :
+				return scanArrayTypeSignature(string, start);
+			case Signature.C_STAR :
+				return start;
+			default :
+				throw new IllegalArgumentException();
+		}
+	}
+
+	/**
+	 * Scans the given string for a list of type argument signatures starting at
+	 * the given index and returns the index of the last character.
+	 * <pre>
+	 * TypeArgumentSignatures:
+	 *     <b><</b> TypeArgumentSignature* <b>></b>
+	 * </pre>
+	 * Note that although there is supposed to be at least one type argument, there
+	 * is no syntactic ambiguity if there are none. This method will accept zero
+	 * type argument signatures without complaint.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a list of type arguments
+	 * signatures
+	 */
+	public static int scanTypeArgumentSignatures(char[] string, int start) {
+		// need a minimum 2 char "<>"
+		if (start >= string.length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != Signature.C_GENERIC_START) {
+			throw new IllegalArgumentException();
+		}
+		int p = start + 1;
+		while (true) {
+			if (p >= string.length) {
+				throw new IllegalArgumentException();
+			}
+			c = string[p];
+			if (c == Signature.C_GENERIC_END) {
+				return p;
+			}
+			int e = scanTypeArgumentSignature(string, p);
+			p = e + 1;
+		}
+	}
+
+	/**
+	 * Scans the given string for a type argument signature starting at the given
+	 * index and returns the index of the last character.
+	 * <pre>
+	 * TypeArgumentSignature:
+	 *     <b>*</b>
+	 *  |  <b>+</b> TypeSignature
+	 *  |  <b>-</b> TypeSignature
+	 *  |  TypeSignature
+	 * </pre>
+	 * Note that although base types are not allowed in type arguments, there is
+	 * no syntactic ambiguity. This method will accept them without complaint.
+	 *
+	 * @param string the signature string
+	 * @param start the 0-based character index of the first character
+	 * @return the 0-based character index of the last character
+	 * @exception IllegalArgumentException if this is not a type argument signature
+	 */
+	public static int scanTypeArgumentSignature(char[] string, int start) {
+		// need a minimum 1 char
+		if (start >= string.length) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		switch (c) {
+			case Signature.C_STAR :
+				return start;
+			case Signature.C_EXTENDS :
+			case Signature.C_SUPER :
+				return scanTypeBoundSignature(string, start);
+			default :
+				return scanTypeSignature(string, start);
+		}
+	}
+
+	static void appendTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
+		char c = string[start];
+		switch (c) {
+			case Signature.C_ARRAY :
+				appendArrayTypeSignature(string, start, buffer, compact);
+				break;
+			case Signature.C_RESOLVED :
+				appendClassTypeSignature(string, start, buffer, compact);
+				break;
+			case Signature.C_TYPE_VARIABLE :
+				int e = scanTypeVariableSignature(string, start);
+				buffer.append(string, start + 1, e - start - 1);
+				break;
+			case Signature.C_BOOLEAN :
+				buffer.append(BOOLEAN);
+				break;
+			case Signature.C_BYTE :
+				buffer.append(BYTE);
+				break;
+			case Signature.C_CHAR :
+				buffer.append(CHAR);
+				break;
+			case Signature.C_DOUBLE :
+				buffer.append(DOUBLE);
+				break;
+			case Signature.C_FLOAT :
+				buffer.append(FLOAT);
+				break;
+			case Signature.C_INT :
+				buffer.append(INT);
+				break;
+			case Signature.C_LONG :
+				buffer.append(LONG);
+				break;
+			case Signature.C_SHORT :
+				buffer.append(SHORT);
+				break;
+			case Signature.C_VOID :
+				buffer.append(VOID);
+				break;
+		}
+	}
+
+	private static void appendArrayTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
+		int length = string.length;
+		// need a minimum 2 char
+		if (start >= length - 1) {
+			throw new IllegalArgumentException();
+		}
+		char c = string[start];
+		if (c != Signature.C_ARRAY) {
+			throw new IllegalArgumentException();
+		}
+
+		int index = start;
+		c = string[++index];
+		while (c == Signature.C_ARRAY) {
+			// need a minimum 2 char
+			if (index >= length - 1) {
+				throw new IllegalArgumentException();
+			}
+			c = string[++index];
+		}
+
+		appendTypeSignature(string, index, buffer, compact);
+
+		for (int i = 0, dims = index - start; i < dims; i++) {
+			buffer.append('[').append(']');
+		}
+	}
+
+	private static void appendClassTypeSignature(char[] string, int start, StringBuffer buffer, boolean compact) {
+		char c = string[start];
+		if (c != Signature.C_RESOLVED) {
+			return;
+		}
+		int p = start + 1;
+		int checkpoint = buffer.length();
+		while (true) {
+			c = string[p];
+			switch (c) {
+				case Signature.C_SEMICOLON :
+					// all done
+					return;
+				case Signature.C_DOT :
+				case '/' :
+					// erase package prefix
+					if (compact) {
+						buffer.setLength(checkpoint);
+					} else {
+						buffer.append('.');
+					}
+					break;
+				case Signature.C_DOLLAR :
+					/**
+					 * Convert '$' in resolved type signatures into '.'.
+					 * NOTE: This assumes that the type signature is an inner type
+					 * signature. This is true in most cases, but someone can define a
+					 * non-inner type name containing a '$'.
+					 */
+					buffer.append('.');
+					break;
+				default :
+					buffer.append(c);
+			}
+			p++;
+		}
+	}
+
+	public static String toString(char[] declaringClass, char[] methodName, char[] methodSignature, boolean includeReturnType, boolean compact) {
+		final boolean isConstructor = Arrays.equals(methodName, INIT);
+		int firstParen = CharOperation.indexOf(Signature.C_PARAM_START, methodSignature);
+		if (firstParen == -1) {
+			return ""; //$NON-NLS-1$
+		}
+
+		StringBuffer buffer = new StringBuffer(methodSignature.length + 10);
+
+		// decode declaring class name
+		// it can be either an array signature or a type signature
+		if (declaringClass.length > 0) {
+			char[] declaringClassSignature = null;
+			if (declaringClass[0] == Signature.C_ARRAY) {
+				CharOperation.replace(declaringClass, '/', '.');
+				declaringClassSignature = Signature.toCharArray(declaringClass);
+			} else {
+				CharOperation.replace(declaringClass, '/', '.');
+				declaringClassSignature = declaringClass;
+			}
+			int lastIndexOfSlash = CharOperation.lastIndexOf('.', declaringClassSignature);
+			if (compact && lastIndexOfSlash != -1) {
+				buffer.append(declaringClassSignature, lastIndexOfSlash + 1, declaringClassSignature.length - lastIndexOfSlash - 1);
+			} else {
+				buffer.append(declaringClassSignature);
+			}
+		}
+
+		// selector
+		if (!isConstructor) {
+			buffer.append('.');
+			if (methodName != null) {
+				buffer.append(methodName);
+			}
+		}
+
+		// parameters
+		buffer.append('(');
+		char[][] pts = Signature.getParameterTypes(methodSignature);
+		for (int i = 0, max = pts.length; i < max; i++) {
+			appendTypeSignature(pts[i], 0, buffer, compact);
+			if (i != pts.length - 1) {
+				buffer.append(',');
+				buffer.append(' ');
+			}
+		}
+		buffer.append(')');
+
+		if (!isConstructor) {
+			buffer.append(" : "); //$NON-NLS-1$
+			// return type
+			if (includeReturnType) {
+				char[] rts = Signature.getReturnType(methodSignature);
+				appendTypeSignature(rts, 0, buffer, compact);
+			}
+		}
+		return String.valueOf(buffer);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/messages.properties
new file mode 100644
index 0000000..09a283e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/java/messages.properties
@@ -0,0 +1,116 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+differentNumberOfEntries=Difference in [{0}]: {1} contains {2} files and {3} contains {4} files
+differentEntry=Difference found for {0} between {1} and {2}
+missingEntry=Missing {0} within [{1}] from {2}
+ioexception=IOException comparing {0} and {1} 
+binaryDifferentLength= Binary file {0}: sizes differ by {1} bytes.
+classesDifferent= The class {0} is different.
+propertiesSizesDifferent=The properties file {0} has a different number ({0}) of properties. 
+differentPropertyValueFull= In {0}, the property \"{1}\" has different values: \"{2}\" and \"{3}\".
+missingProperty= The property \"{0}\" is not present in both properties files ({2}).
+manifestDifferentSize=The Manifest file sizes differ by {0} elements.
+manifestMissingEntry= The header \"{0}\" is not present in both Manifest files.
+manifestDifferentValue=The manifest header \"{0}\" has different values.
+binaryFilesDifferent=Binary file \"{0}\" is different.
+
+featureSize=The feature has a different number of entries/
+featureIdsDontMatch=Feature ids are not equal: \"{0}\" and \"{1}\"
+featureVersionsDontMatch=Feature versions are not equal: \"{0}\" and \"{1}\"
+featureEntry=The entry \"{0}\" is not present in both features.
+featureEntryOptional=The entry \"{0}\" is not optional in both features.
+featureEntryUnpack=The entry \"{0}\" has different unpack attribute values.
+featureEntryMatch=The entry \"{0}\" has different match rules.
+featureEntryFilter=The entry \"{0}\" has different filters.  
+
+### Disassembler messages
+
+### disassembler
+disassembler_opentypedeclaration =\ '{'
+disassembler_closetypedeclaration = }
+disassembler_endofmethodheader = ;
+disassembler_begincommentline = //\ 
+disassembler_fieldhasconstant =\ =\ 
+disassembler_endoffieldheader = ;
+disassembler_sourceattributeheader = Compiled from\ 
+disassembler_enclosingmethodheader = Enclosing Method:
+disassembler_exceptiontableheader = Exception Table:
+disassembler_innerattributesheader = Inner classes:
+disassembler_inner_class_info_name = inner class info:
+disassembler_outer_class_info_name = outer class info:
+disassembler_inner_name = inner name:
+disassembler_inner_accessflags = accessflags:\ 
+disassembler_signatureattributeheader = // Signature: {0}
+disassembler_indentation = \  
+disassembler_space = \ 
+disassembler_comma = ,
+disassembler_openinnerclassentry = [
+disassembler_closeinnerclassentry = ]
+disassembler_deprecated =\ (deprecated)
+disassembler_annotationdefaultheader = Annotation Default:\ 
+disassembler_annotationdefaultvalue= {0} (constant type)
+disassembler_annotationenumvalue = {0}.{1}(enum type)
+disassembler_annotationclassvalue = {0} (class type)
+disassembler_annotationannotationvalue = annotation value =
+disassembler_annotationarrayvaluestart = [
+disassembler_annotationarrayvalueend = ]
+disassembler_annotationentrystart = @{0}(
+disassembler_annotationentryend = )
+disassembler_annotationcomponent = {0}=
+disassembler_runtimevisibleannotationsattributeheader= RuntimeVisibleAnnotations:\ 
+disassembler_runtimeinvisibleannotationsattributeheader= RuntimeInvisibleAnnotations:\ 
+disassembler_runtimevisibleparameterannotationsattributeheader= RuntimeVisibleParameterAnnotations:\ 
+disassembler_runtimeinvisibleparameterannotationsattributeheader= RuntimeInvisibleParameterAnnotations:\ 
+disassembler_parameterannotationentrystart=Number of annotations for parameter {0}: {1}
+### classfileformat decoding
+classfileformat_versiondetails =\ (version {0} : {1}.{2}, {3})
+classfileformat_methoddescriptor = // Method descriptor {0}
+classfileformat_fieldddescriptor = // Field descriptor {0}
+classfileformat_stacksAndLocals= // Stack: {0}, Locals: {1}
+classfileformat_superflagisnotset = no super bit
+classfileformat_superflagisset = super bit
+classfileformat_clinitname = '{'}
+classformat_classformatexception = Class Format Exception
+classfileformat_versionUnknown = unknown
+
+### string displayed for each opcode
+classformat_anewarray = {0} {1}
+classformat_checkcast = {0} {1}
+classformat_instanceof = {0} {1}
+classformat_ldc_w_class = {0} <Class {1}>
+classformat_ldc_w_float = {0} <Float {1}>
+classformat_ldc_w_integer = {0} <Integer {1}>
+classformat_ldc_w_string = {0} <String "{1}">
+classformat_ldc2_w_long = {0} <Long {1}>
+classformat_ldc2_w_double = {0} <Double {1}>
+classformat_multianewarray = {0} {1}
+classformat_new = {0} {1}
+classformat_iinc = {0} {1} {2}{3}
+classformat_invokespecial ={0} {1}
+classformat_invokeinterface ={0} {2} [nargs: {1}]
+classformat_invokestatic ={0} {1}
+classformat_invokevirtual ={0} {1}
+classformat_getfield ={0} {1}.{2} : {3}
+classformat_getstatic ={0} {1}.{2} : {3}
+classformat_putstatic ={0} {1}.{2} : {3}
+classformat_putfield ={0} {1}.{2} : {3}
+classformat_newarray_boolean = {0} boolean
+classformat_newarray_char = {0} char
+classformat_newarray_float = {0} float
+classformat_newarray_double = {0} double
+classformat_newarray_byte = {0} byte
+classformat_newarray_short = {0} short
+classformat_newarray_int = {0} int
+classformat_newarray_long = {0} long
+classformat_store = {0}{1}
+classformat_load = {0}{1}
+classfileformat_anyexceptionhandler=any
+classfileformat_exceptiontableentry = [pc: {0}, pc: {1}] -> {2} when : {3}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties
deleted file mode 100644
index e8c3956..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/comparator/messages.properties
+++ /dev/null
@@ -1,98 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-differentNumberOfEntries=Difference in [{0}]: {1} contains {2} files and {3} contains {4} files
-differentEntry=Difference found for {0} within [{1}] from {2}
-missingEntry=Missing {0} within [{1}] from {2}
-ioexception=IOException comparing {0} and {1} 
-
-### Disassembler messages
-
-### disassembler
-disassembler_opentypedeclaration =\ '{'
-disassembler_closetypedeclaration = }
-disassembler_endofmethodheader = ;
-disassembler_begincommentline = //\ 
-disassembler_fieldhasconstant =\ =\ 
-disassembler_endoffieldheader = ;
-disassembler_sourceattributeheader = Compiled from\ 
-disassembler_enclosingmethodheader = Enclosing Method:
-disassembler_exceptiontableheader = Exception Table:
-disassembler_innerattributesheader = Inner classes:
-disassembler_inner_class_info_name = inner class info:
-disassembler_outer_class_info_name = outer class info:
-disassembler_inner_name = inner name:
-disassembler_inner_accessflags = accessflags:\ 
-disassembler_signatureattributeheader = // Signature: {0}
-disassembler_indentation = \  
-disassembler_space = \ 
-disassembler_comma = ,
-disassembler_openinnerclassentry = [
-disassembler_closeinnerclassentry = ]
-disassembler_deprecated =\ (deprecated)
-disassembler_annotationdefaultheader = Annotation Default:\ 
-disassembler_annotationdefaultvalue= {0} (constant type)
-disassembler_annotationenumvalue = {0}.{1}(enum type)
-disassembler_annotationclassvalue = {0} (class type)
-disassembler_annotationannotationvalue = annotation value =
-disassembler_annotationarrayvaluestart = [
-disassembler_annotationarrayvalueend = ]
-disassembler_annotationentrystart = @{0}(
-disassembler_annotationentryend = )
-disassembler_annotationcomponent = {0}=
-disassembler_runtimevisibleannotationsattributeheader= RuntimeVisibleAnnotations:\ 
-disassembler_runtimeinvisibleannotationsattributeheader= RuntimeInvisibleAnnotations:\ 
-disassembler_runtimevisibleparameterannotationsattributeheader= RuntimeVisibleParameterAnnotations:\ 
-disassembler_runtimeinvisibleparameterannotationsattributeheader= RuntimeInvisibleParameterAnnotations:\ 
-disassembler_parameterannotationentrystart=Number of annotations for parameter {0}: {1}
-### classfileformat decoding
-classfileformat_versiondetails =\ (version {0} : {1}.{2}, {3})
-classfileformat_methoddescriptor = // Method descriptor {0}
-classfileformat_fieldddescriptor = // Field descriptor {0}
-classfileformat_stacksAndLocals= // Stack: {0}, Locals: {1}
-classfileformat_superflagisnotset = no super bit
-classfileformat_superflagisset = super bit
-classfileformat_clinitname = '{'}
-classformat_classformatexception = Class Format Exception
-classfileformat_versionUnknown = unknown
-
-### string displayed for each opcode
-classformat_anewarray = {0} {1}
-classformat_checkcast = {0} {1}
-classformat_instanceof = {0} {1}
-classformat_ldc_w_class = {0} <Class {1}>
-classformat_ldc_w_float = {0} <Float {1}>
-classformat_ldc_w_integer = {0} <Integer {1}>
-classformat_ldc_w_string = {0} <String "{1}">
-classformat_ldc2_w_long = {0} <Long {1}>
-classformat_ldc2_w_double = {0} <Double {1}>
-classformat_multianewarray = {0} {1}
-classformat_new = {0} {1}
-classformat_iinc = {0} {1} {2}{3}
-classformat_invokespecial ={0} {1}
-classformat_invokeinterface ={0} {2} [nargs: {1}]
-classformat_invokestatic ={0} {1}
-classformat_invokevirtual ={0} {1}
-classformat_getfield ={0} {1}.{2} : {3}
-classformat_getstatic ={0} {1}.{2} : {3}
-classformat_putstatic ={0} {1}.{2} : {3}
-classformat_putfield ={0} {1}.{2} : {3}
-classformat_newarray_boolean = {0} boolean
-classformat_newarray_char = {0} char
-classformat_newarray_float = {0} float
-classformat_newarray_double = {0} double
-classformat_newarray_byte = {0} byte
-classformat_newarray_short = {0} short
-classformat_newarray_int = {0} int
-classformat_newarray_long = {0} long
-classformat_store = {0}{1}
-classformat_load = {0}{1}
-classfileformat_anyexceptionhandler=any
-classfileformat_exceptiontableentry = [pc: {0}, pc: {1}] -> {2} when : {3}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/FileMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/FileMirrorLog.java
new file mode 100644
index 0000000..8ea5bfa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/FileMirrorLog.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.mirroring;
+
+import java.io.*;
+import java.util.Date;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+
+public class FileMirrorLog implements IArtifactMirrorLog {
+
+	private static final String INDENT = "\t"; //$NON-NLS-1$
+	private static final String SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+	private BufferedWriter out;
+	private boolean consoleMessage = false;
+	private int minSeverity = IStatus.OK;
+	private boolean hasRoot = false;
+
+	public FileMirrorLog(String location, int minSeverity, String root) {
+		this.minSeverity = minSeverity;
+		try {
+			File log = new File(location);
+			if (log.getParentFile().exists() || log.getParentFile().mkdirs()) {
+				out = new BufferedWriter(new FileWriter(log, true));
+				if (root != null) {
+					log(root + " - " + new Date()); //$NON-NLS-1$
+					hasRoot = true;
+				}
+			} else
+				throw new IOException(Messages.exception_unableToCreateParentDir);
+		} catch (IOException e) {
+			exceptionOccurred(null, e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
+	 */
+	public void log(IArtifactDescriptor descriptor, IStatus status) {
+		if (status.getSeverity() >= minSeverity) {
+			log(descriptor.toString());
+			log(status, INDENT);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
+	 */
+	public void log(IStatus status) {
+		log(status, ""); //$NON-NLS-1$
+	}
+
+	/*
+	 * Write a status to the log, indenting it based on status depth.
+	 * @param status the status to log
+	 * @param depth the depth of the status
+	 */
+	private void log(IStatus status, String prefix) {
+		if (status.getSeverity() >= minSeverity) {
+			// Write status to log
+			log(prefix + status.getMessage());
+
+			// Write exception to log if applicable
+			String exceptionMessage = status.getException() != null ? status.getException().getMessage() : null;
+			if (exceptionMessage != null)
+				log(prefix + exceptionMessage);
+
+			// Write the children of the status to the log
+			IStatus[] nestedStatus = status.getChildren();
+			if (nestedStatus != null)
+				for (int i = 0; i < nestedStatus.length; i++)
+					log(nestedStatus[i], prefix + INDENT);
+		}
+	}
+
+	/*
+	 * Write a message to the log
+	 * @param message the message to write
+	 */
+	private void log(String message) {
+		try {
+			out.write((hasRoot ? INDENT : "") + message + SEPARATOR); //$NON-NLS-1$
+		} catch (IOException e) {
+			exceptionOccurred((hasRoot ? INDENT : "") + message, e); //$NON-NLS-1$
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
+	 */
+	public void close() {
+		try {
+			if (out != null)
+				out.close();
+		} catch (IOException e) {
+			exceptionOccurred(null, e);
+		}
+	}
+
+	/*
+	 * Show an error message if this the first time, and print status messages.
+	 */
+	private void exceptionOccurred(String message, Exception e) {
+		if (!consoleMessage) {
+			System.err.println(Messages.MirrorLog_Exception_Occurred);
+			e.printStackTrace(System.err);
+			System.err.println(Messages.MirrorLog_Console_Log);
+			consoleMessage = true;
+		}
+		if (message != null)
+			System.out.println(message);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/IArtifactMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/IArtifactMirrorLog.java
new file mode 100644
index 0000000..727929d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/IArtifactMirrorLog.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.mirroring;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+
+public interface IArtifactMirrorLog {
+
+	// Log a status associated with a descriptor 
+	public void log(IArtifactDescriptor descriptor, IStatus status);
+
+	// Log a status
+	public void log(IStatus status);
+
+	// Notify that logging is completed & cleanup resources 
+	public void close();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
new file mode 100644
index 0000000..a6a0dc5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/Mirroring.java
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *  	Compeople AG (Stefan Liebig) - various ongoing maintenance
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.mirroring;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.RawMirrorRequest;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.internal.repository.tools.Activator;
+import org.eclipse.equinox.p2.internal.repository.tools.Messages;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.tools.comparator.ArtifactComparatorFactory;
+import org.eclipse.equinox.p2.repository.tools.comparator.IArtifactComparator;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * A utility class that performs mirroring of artifacts between repositories.
+ */
+public class Mirroring {
+	private IArtifactRepository source;
+	private IArtifactRepository destination;
+	private IArtifactRepository baseline;
+	private boolean raw;
+	private boolean compare = false;
+	private boolean validate = false;
+	private IArtifactComparator comparator;
+	private IQuery<IArtifactDescriptor> compareExclusionQuery = null;
+	private Set<IArtifactDescriptor> compareExclusions = CollectionUtils.<IArtifactDescriptor> emptySet();
+	private String comparatorID;
+	private List<IArtifactKey> keysToMirror;
+	private IArtifactMirrorLog comparatorLog;
+
+	private IArtifactComparator getComparator() {
+		if (comparator == null)
+			comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorID);
+		return comparator;
+	}
+
+	public Mirroring(IArtifactRepository source, IArtifactRepository destination, boolean raw) {
+		this.source = source;
+		this.destination = destination;
+		this.raw = raw;
+	}
+
+	public void setCompare(boolean compare) {
+		this.compare = compare;
+	}
+
+	public void setComparatorId(String id) {
+		this.comparatorID = id;
+	}
+
+	public void setComparatorLog(IArtifactMirrorLog comparatorLog) {
+		this.comparatorLog = comparatorLog;
+	}
+
+	public void setBaseline(IArtifactRepository baseline) {
+		this.baseline = baseline;
+	}
+
+	public void setValidate(boolean validate) {
+		this.validate = validate;
+	}
+
+	public MultiStatus run(boolean failOnError, boolean verbose) {
+		if (!destination.isModifiable())
+			throw new IllegalStateException(NLS.bind(Messages.exception_destinationNotModifiable, destination.getLocation()));
+		if (compare)
+			getComparator(); //initialize the comparator. Only needed if we're comparing. Used to force error if comparatorID is invalid.
+		MultiStatus multiStatus = new MultiStatus(Activator.ID, IStatus.OK, Messages.message_mirroringStatus, null);
+		Iterator<IArtifactKey> keys = null;
+		if (keysToMirror != null)
+			keys = keysToMirror.iterator();
+		else {
+			IQueryResult<IArtifactKey> result = source.query(ArtifactKeyQuery.ALL_KEYS, null);
+			keys = result.iterator();
+		}
+
+		if (compareExclusionQuery != null) {
+			IQueryResult<IArtifactDescriptor> exclusions = source.descriptorQueryable().query(compareExclusionQuery, null);
+			compareExclusions = exclusions.toUnmodifiableSet();
+		}
+
+		while (keys.hasNext()) {
+			IArtifactKey key = keys.next();
+			IArtifactDescriptor[] descriptors = source.getArtifactDescriptors(key);
+			for (int j = 0; j < descriptors.length; j++) {
+				IStatus result = mirror(descriptors[j], verbose);
+				//Only log INFO and WARNING if we want verbose logging. Always log ERRORs
+				if (!result.isOK() && (verbose || result.getSeverity() == IStatus.ERROR))
+					multiStatus.add(result);
+				//stop mirroring as soon as we have an error
+				if (failOnError && multiStatus.getSeverity() == IStatus.ERROR)
+					return multiStatus;
+			}
+		}
+		if (validate) {
+			// Simple validation of the mirror
+			IStatus validation = validateMirror(verbose);
+			if (!validation.isOK() && (verbose || validation.getSeverity() == IStatus.ERROR))
+				multiStatus.add(validation);
+		}
+		return multiStatus;
+	}
+
+	private IStatus mirror(IArtifactDescriptor sourceDescriptor, boolean verbose) {
+		IArtifactDescriptor targetDescriptor = raw ? sourceDescriptor : new ArtifactDescriptor(sourceDescriptor);
+		IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(sourceDescriptor);
+
+		if (verbose)
+			System.out.println("Mirroring: " + sourceDescriptor.getArtifactKey() + " (Descriptor: " + sourceDescriptor + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+		MultiStatus compareStatus = new MultiStatus(Activator.ID, IStatus.OK, null, null);
+		boolean comparing = compare && !compareExclusions.contains(sourceDescriptor);
+		if (comparing) {
+			if (baselineDescriptor != null) {
+				//compare source & baseline
+				compareStatus.add(compare(baseline, baselineDescriptor, source, sourceDescriptor));
+				//compare baseline & destination
+				if (destination.contains(baselineDescriptor)) {
+					compareStatus.add(compareToDestination(baselineDescriptor));
+					return compareStatus;
+				}
+			} else if (destination.contains(targetDescriptor)) {
+				compareStatus.add(compareToDestination(sourceDescriptor));
+				return compareStatus;
+			}
+		}
+
+		//from source or baseline
+		IArtifactRepository sourceRepository = baselineDescriptor != null ? baseline : source;
+		sourceDescriptor = baselineDescriptor != null ? baselineDescriptor : sourceDescriptor;
+		targetDescriptor = baselineDescriptor != null ? baselineDescriptor : targetDescriptor;
+		IStatus status = null;
+		if (!destination.contains(targetDescriptor))
+			//actual download
+			status = downloadArtifact(sourceRepository, targetDescriptor, sourceDescriptor);
+		else {
+			String message = NLS.bind(Messages.mirror_alreadyExists, sourceDescriptor, destination);
+			status = new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, message, null);
+		}
+
+		if (comparing) {
+			compareStatus.add(status);
+			return compareStatus;
+		}
+		return status;
+	}
+
+	/**
+	 * Takes an IArtifactDescriptor descriptor and the ProvisionException that was thrown when destination.getOutputStream(descriptor)
+	 * and compares descriptor to the duplicate descriptor in the destination.
+	 * 
+	 * Callers should verify the ProvisionException was thrown due to the artifact existing in the destination before invoking this method.
+	 * @param descriptor
+	 * @return the status of the compare
+	 */
+	private IStatus compareToDestination(IArtifactDescriptor descriptor) {
+		IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(descriptor.getArtifactKey());
+		IArtifactDescriptor destDescriptor = null;
+		for (int i = 0; destDescriptor == null && i < destDescriptors.length; i++) {
+			if (destDescriptors[i].equals(descriptor))
+				destDescriptor = destDescriptors[i];
+		}
+		if (destDescriptor == null)
+			return new Status(IStatus.INFO, Activator.ID, ProvisionException.ARTIFACT_EXISTS, Messages.Mirroring_noMatchingDescriptor, null);
+		return compare(source, descriptor, destination, destDescriptor);
+	}
+
+	private IStatus compare(IArtifactRepository sourceRepository, IArtifactDescriptor sourceDescriptor, IArtifactRepository destRepository, IArtifactDescriptor destDescriptor) {
+		IStatus comparison = getComparator().compare(sourceRepository, sourceDescriptor, destRepository, destDescriptor);
+		if (comparatorLog != null && !comparison.isOK())
+			comparatorLog.log(sourceDescriptor, comparison);
+		return comparison;
+	}
+
+	/*
+	 * Create, and execute a MirrorRequest for a given descriptor.
+	 */
+	private IStatus downloadArtifact(IArtifactRepository sourceRepo, IArtifactDescriptor destDescriptor, IArtifactDescriptor srcDescriptor) {
+		RawMirrorRequest request = new RawMirrorRequest(srcDescriptor, destDescriptor, destination);
+		request.perform(sourceRepo, new NullProgressMonitor());
+
+		return request.getResult();
+	}
+
+	public void setArtifactKeys(IArtifactKey[] keys) {
+		this.keysToMirror = Arrays.asList(keys);
+	}
+
+	/*
+	 *  Get the equivalent descriptor from the baseline repository
+	 */
+	private IArtifactDescriptor getBaselineDescriptor(IArtifactDescriptor descriptor) {
+		if (baseline == null || !baseline.contains(descriptor))
+			return null;
+
+		IArtifactDescriptor[] baselineDescriptors = baseline.getArtifactDescriptors(descriptor.getArtifactKey());
+		for (int i = 0; i < baselineDescriptors.length; i++) {
+			if (baselineDescriptors[i].equals(descriptor))
+				return baselineDescriptors[i];
+		}
+		return null;
+	}
+
+	/* 
+	 * Simple validation of a mirror to see if all source descriptors are present in the destination
+	 */
+	private IStatus validateMirror(boolean verbose) {
+		MultiStatus status = new MultiStatus(Activator.ID, 0, Messages.Mirroring_ValidationError, null);
+
+		// The keys that were mirrored in this session
+		Iterator<IArtifactKey> keys = null;
+		if (keysToMirror != null) {
+			keys = keysToMirror.iterator();
+		} else {
+			IQueryResult<IArtifactKey> result = source.query(ArtifactKeyQuery.ALL_KEYS, null);
+			keys = result.iterator();
+		}
+		while (keys.hasNext()) {
+			IArtifactKey artifactKey = keys.next();
+			IArtifactDescriptor[] srcDescriptors = source.getArtifactDescriptors(artifactKey);
+			IArtifactDescriptor[] destDescriptors = destination.getArtifactDescriptors(artifactKey);
+
+			Arrays.sort(srcDescriptors, new ArtifactDescriptorComparator());
+			Arrays.sort(destDescriptors, new ArtifactDescriptorComparator());
+
+			int src = 0;
+			int dest = 0;
+			while (src < srcDescriptors.length && dest < destDescriptors.length) {
+				if (!destDescriptors[dest].equals(srcDescriptors[src])) {
+					if (destDescriptors[dest].toString().compareTo((srcDescriptors[src].toString())) > 0) {
+						// Missing an artifact
+						if (verbose)
+							System.out.println(NLS.bind(Messages.Mirroring_missingDescriptor, srcDescriptors[src]));
+						status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_missingDescriptor, srcDescriptors[src++])));
+					} else {
+						// Its okay if there are extra descriptors in the destination
+						dest++;
+					}
+				} else {
+					// check properties for differences
+					Map<String, String> destMap = destDescriptors[dest].getProperties();
+					Map<String, String> srcProperties = null;
+					if (baseline != null) {
+						IArtifactDescriptor baselineDescriptor = getBaselineDescriptor(destDescriptors[dest]);
+						if (baselineDescriptor != null)
+							srcProperties = baselineDescriptor.getProperties();
+					}
+					// Baseline not set, or could not find descriptor so we'll use the source descriptor
+					if (srcProperties == null)
+						srcProperties = srcDescriptors[src].getProperties();
+
+					// Cycle through properties of the originating descriptor & compare
+					for (String key : srcProperties.keySet()) {
+						if (!srcProperties.get(key).equals(destMap.get(key))) {
+							if (verbose)
+								System.out.println(NLS.bind(Messages.Mirroring_differentDescriptorProperty, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)}));
+							status.add(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.Mirroring_differentDescriptorProperty, new Object[] {destDescriptors[dest], key, srcProperties.get(key), destMap.get(key)})));
+						}
+					}
+					src++;
+					dest++;
+				}
+			}
+
+			// If there are still source descriptors they're missing from the destination repository 
+			while (src < srcDescriptors.length) {
+				if (verbose)
+					System.out.println(NLS.bind(Messages.Mirroring_missingDescriptor, srcDescriptors[src]));
+				status.add(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Mirroring_missingDescriptor, srcDescriptors[src++])));
+			}
+		}
+
+		return status;
+	}
+
+	// Simple comparator for ArtifactDescriptors
+	protected class ArtifactDescriptorComparator implements Comparator<IArtifactDescriptor> {
+
+		public int compare(IArtifactDescriptor arg0, IArtifactDescriptor arg1) {
+			if (arg0 != null && arg1 != null)
+				return arg0.toString().compareTo(arg1.toString());
+			else if (arg1 == null && arg0 == null)
+				return 0;
+			else if (arg1 == null)
+				return 1;
+			return -1;
+		}
+	}
+
+	public void setCompareExclusions(IQuery<IArtifactDescriptor> excludedKeys) {
+		compareExclusionQuery = excludedKeys;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/XMLMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/XMLMirrorLog.java
new file mode 100644
index 0000000..0b488f7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/mirroring/XMLMirrorLog.java
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.mirroring;
+
+import java.io.*;
+import java.util.Date;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+
+public class XMLMirrorLog implements IArtifactMirrorLog {
+	private static final String DEFAULT_FORMAT = "canonical"; //$NON-NLS-1$
+	// Constants used in XML tags
+	private static final String LOG = "log"; //$NON-NLS-1$
+	private static final String TIME_ATTRIBUTE = "time"; //$NON-NLS-1$
+	private static final String DESCRIPTOR_ELEMENT = "descriptor"; //$NON-NLS-1$
+	private static final String DESCRIPTOR_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
+	private static final String DESCRIPTOR_FORMAT_ATTRIBUTE = "format"; //$NON-NLS-1$
+	private static final String DESCRIPTOR_ID_ATTRIBUTE = "id"; //$NON-NLS-1$
+	private static final String DESCRIPTOR_VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
+	private static final String STATUS_ELEMENT = "status"; //$NON-NLS-1$
+	private static final String STATUS_SEVERITY_ATTRIBUTE = "severity"; //$NON-NLS-1$
+	private static final String STATUS_MESSAGE_ATTRIBUTE = "message"; //$NON-NLS-1$
+
+	private int minStatus = IStatus.OK;
+	private XMLWriter writer;
+	private OutputStream outputStream;
+	private boolean consoleMessage = false;
+
+	public XMLMirrorLog(String location, int minStatus, String root) {
+		this.minStatus = minStatus;
+
+		try {
+			outputStream = new FileOutputStream(location);
+			writer = new XMLWriter(outputStream, null);
+			if (root != null)
+				writer.start(root.toLowerCase());
+			else
+				writer.start(LOG);
+			writer.attribute(TIME_ATTRIBUTE, new Date());
+		} catch (UnsupportedEncodingException e) {
+			exceptionOccurred(e);
+		} catch (FileNotFoundException e) {
+			exceptionOccurred(e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor, org.eclipse.core.runtime.IStatus)
+	 */
+	public void log(IArtifactDescriptor descriptor, IStatus status) {
+		if (status.getSeverity() < minStatus)
+			return;
+		// Start descriptor tag
+		if (writer != null) {
+			writer.start(DESCRIPTOR_ELEMENT);
+			writer.attribute(DESCRIPTOR_ID_ATTRIBUTE, descriptor.getArtifactKey().getId());
+			writer.attribute(DESCRIPTOR_CLASSIFIER_ATTRIBUTE, descriptor.getArtifactKey().getClassifier());
+			writer.attribute(DESCRIPTOR_VERSION_ATTRIBUTE, descriptor.getArtifactKey().getVersion());
+			if (descriptor.getProperties().get(IArtifactDescriptor.FORMAT) != null)
+				writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, descriptor.getProperties().get(IArtifactDescriptor.FORMAT));
+			else
+				writer.attribute(DESCRIPTOR_FORMAT_ATTRIBUTE, DEFAULT_FORMAT);
+		} else
+			// Creation of the XML writer failed, dump results to the console
+			System.out.println(descriptor);
+
+		log(status);
+
+		// Close descriptor tag
+		if (writer != null)
+			writer.end();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#log(org.eclipse.core.runtime.IStatus)
+	 */
+	public void log(IStatus status) {
+		if (status.getSeverity() < minStatus)
+			return;
+
+		if (writer != null) {
+			// Start status tag
+			writer.start(STATUS_ELEMENT);
+			// Set severity attribute
+			switch (status.getSeverity()) {
+				case IStatus.OK :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "OK"); //$NON-NLS-1$
+					break;
+				case IStatus.INFO :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "INFO"); //$NON-NLS-1$
+					break;
+				case IStatus.WARNING :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "WARNING"); //$NON-NLS-1$
+					break;
+				case IStatus.ERROR :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "ERROR"); //$NON-NLS-1$
+					break;
+				case IStatus.CANCEL :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, "CANCEL"); //$NON-NLS-1$
+					break;
+				default :
+					writer.attribute(STATUS_SEVERITY_ATTRIBUTE, status.getSeverity());
+			}
+			// Set  message attribute
+			writer.attribute(STATUS_MESSAGE_ATTRIBUTE, status.getMessage());
+		} else
+			// Creation of the XML writer failed, dump results to the console
+			System.out.println(status);
+
+		// Log children statuses
+		IStatus[] nestedStatus = status.getChildren();
+		if (nestedStatus != null)
+			for (int i = 0; i < nestedStatus.length; i++)
+				log(nestedStatus[i]);
+
+		// Close status tag
+		if (writer != null)
+			writer.end();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.artifact.mirror.IArtifactMirrorLog#close()
+	 */
+	public void close() {
+		try {
+			if (writer != null) {
+				// Close opening tag & flush results
+				writer.end();
+				writer.flush();
+			}
+		} finally {
+			if (outputStream != null)
+				try {
+					// Close output stream
+					outputStream.close();
+				} catch (IOException e) {
+					exceptionOccurred(e);
+				}
+		}
+	}
+
+	/*
+	 * Show an error message if this the first time
+	 */
+	private void exceptionOccurred(Exception e) {
+		if (!consoleMessage) {
+			System.err.println(Messages.MirrorLog_Exception_Occurred);
+			e.printStackTrace(System.err);
+			System.err.println(Messages.MirrorLog_Console_Log);
+			consoleMessage = true;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java
index c2ae771..6f4db17 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/AbstractApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,29 +10,33 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools;
 
-import java.net.*;
+import java.net.MalformedURLException;
+import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
 import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.ServiceReference;
 
 public abstract class AbstractApplication {
 	protected boolean removeAddedRepositories = true;
 
-	protected List sourceRepositories = new ArrayList(); //List of repository descriptors
-	protected List artifactReposToRemove = new ArrayList();
-	protected List metadataReposToRemove = new ArrayList();
-	protected List sourceIUs = new ArrayList();
-	private List destinationRepos = new ArrayList();
+	protected List<RepositoryDescriptor> sourceRepositories = new ArrayList<RepositoryDescriptor>(); //List of repository descriptors
+	protected List<URI> artifactReposToRemove = new ArrayList<URI>();
+	protected List<URI> metadataReposToRemove = new ArrayList<URI>();
+	protected List<IInstallableUnit> sourceIUs = new ArrayList<IInstallableUnit>();
+	private List<RepositoryDescriptor> destinationRepos = new ArrayList<RepositoryDescriptor>();
 
 	protected IArtifactRepository destinationArtifactRepository = null;
 	protected IMetadataRepository destinationMetadataRepository = null;
@@ -40,18 +44,50 @@ public abstract class AbstractApplication {
 	private CompositeMetadataRepository compositeMetadataRepository = null;
 	private CompositeArtifactRepository compositeArtifactRepository = null;
 
-	public void setSourceIUs(List ius) {
+	protected IProvisioningAgent agent;
+
+	public AbstractApplication() {
+		super();
+		try {
+			setupAgent();
+		} catch (ProvisionException e) {
+			LogHelper.log(e);
+		}
+	}
+
+	private void setupAgent() throws ProvisionException {
+		//note if we ever wanted these applications to act on a different agent than
+		//the currently running system we would need to set it here
+		ServiceReference agentRef = Activator.getBundleContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
+		if (agentRef != null) {
+			agent = (IProvisioningAgent) Activator.getBundleContext().getService(agentRef);
+			if (agent != null)
+				return;
+		}
+		//there is no agent around so we need to create one
+		ServiceReference providerRef = Activator.getBundleContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+		if (providerRef == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getBundleContext().getService(providerRef);
+		if (provider == null)
+			throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
+		//obtain agent for currently running system
+		agent = provider.createAgent(null);
+		Activator.getBundleContext().ungetService(providerRef);
+	}
+
+	public void setSourceIUs(List<IInstallableUnit> ius) {
 		sourceIUs = ius;
 	}
 
-	protected void finalizeRepositories() throws ProvisionException {
+	protected void finalizeRepositories() {
 		if (removeAddedRepositories) {
-			IArtifactRepositoryManager artifactRepositoryManager = Activator.getArtifactRepositoryManager();
-			for (Iterator iter = artifactReposToRemove.iterator(); iter.hasNext();)
-				artifactRepositoryManager.removeRepository((URI) iter.next());
-			IMetadataRepositoryManager metadataRepositoryManager = Activator.getMetadataRepositoryManager();
-			for (Iterator iter = metadataReposToRemove.iterator(); iter.hasNext();)
-				metadataRepositoryManager.removeRepository((URI) iter.next());
+			IArtifactRepositoryManager artifactRepositoryManager = getArtifactRepositoryManager();
+			for (URI uri : artifactReposToRemove)
+				artifactRepositoryManager.removeRepository(uri);
+			IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
+			for (URI uri : metadataReposToRemove)
+				metadataRepositoryManager.removeRepository(uri);
 		}
 		metadataReposToRemove = null;
 		artifactReposToRemove = null;
@@ -61,13 +97,20 @@ public abstract class AbstractApplication {
 		destinationMetadataRepository = null;
 	}
 
+	protected IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+	}
+
+	protected IArtifactRepositoryManager getArtifactRepositoryManager() {
+		return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+	}
+
 	public void initializeRepos(IProgressMonitor progress) throws ProvisionException {
-		IArtifactRepositoryManager artifactRepositoryManager = Activator.getArtifactRepositoryManager();
-		IMetadataRepositoryManager metadataRepositoryManager = Activator.getMetadataRepositoryManager();
+		IArtifactRepositoryManager artifactRepositoryManager = getArtifactRepositoryManager();
+		IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
 		URI curLocation = null;
-		try {
-			for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
-				RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
+		for (RepositoryDescriptor repo : sourceRepositories) {
+			try {
 				curLocation = repo.getRepoLocation();
 				if (repo.isBoth()) {
 					addRepository(artifactRepositoryManager, curLocation, 0, progress);
@@ -78,12 +121,14 @@ public abstract class AbstractApplication {
 					addRepository(metadataRepositoryManager, curLocation, 0, progress);
 				else
 					throw new ProvisionException(NLS.bind(Messages.unknown_repository_type, repo.getRepoLocation()));
+			} catch (ProvisionException e) {
+				if (e.getCause() instanceof MalformedURLException) {
+					throw new ProvisionException(NLS.bind(Messages.exception_invalidSource, curLocation), e);
+				} else if (e.getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND && repo.isOptional()) {
+					continue;
+				}
+				throw e;
 			}
-		} catch (ProvisionException e) {
-			if (e.getCause() instanceof MalformedURLException) {
-				throw new ProvisionException(NLS.bind(Messages.exception_invalidSource, curLocation), e);
-			}
-			throw e;
 		}
 		processDestinationRepos(artifactRepositoryManager, metadataRepositoryManager);
 	}
@@ -106,9 +151,9 @@ public abstract class AbstractApplication {
 		RepositoryDescriptor artifactRepoDescriptor = null;
 		RepositoryDescriptor metadataRepoDescriptor = null;
 
-		Iterator iter = destinationRepos.iterator();
+		Iterator<RepositoryDescriptor> iter = destinationRepos.iterator();
 		while (iter.hasNext() && (artifactRepoDescriptor == null || metadataRepoDescriptor == null)) {
-			RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
+			RepositoryDescriptor repo = iter.next();
 			if (repo.isArtifact() && artifactRepoDescriptor == null)
 				artifactRepoDescriptor = repo;
 			if (repo.isMetadata() && metadataRepoDescriptor == null)
@@ -124,6 +169,14 @@ public abstract class AbstractApplication {
 			throw new ProvisionException(Messages.AbstractApplication_no_valid_destinations);
 	}
 
+	public IMetadataRepository getDestinationMetadataRepository() {
+		return destinationMetadataRepository;
+	}
+
+	public IArtifactRepository getDestinationArtifactRepository() {
+		return destinationArtifactRepository;
+	}
+
 	protected IMetadataRepository initializeDestination(RepositoryDescriptor toInit, IMetadataRepositoryManager mgr) throws ProvisionException {
 		try {
 			IMetadataRepository repository = addRepository(mgr, toInit.getRepoLocation(), IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, null);
@@ -180,12 +233,12 @@ public abstract class AbstractApplication {
 		}
 	}
 
-	protected boolean initDestinationRepository(IRepository repository, RepositoryDescriptor descriptor) {
+	protected boolean initDestinationRepository(IRepository<?> repository, RepositoryDescriptor descriptor) {
 		if (repository != null && repository.isModifiable()) {
 			if (descriptor.getName() != null)
-				repository.setName(descriptor.getName());
-			if (repository instanceof ICompositeRepository && !descriptor.isAppend())
-				((ICompositeRepository) repository).removeAllChildren();
+				repository.setProperty(IRepository.PROP_NAME, descriptor.getName());
+			if (repository instanceof ICompositeRepository<?> && !descriptor.isAppend())
+				((ICompositeRepository<?>) repository).removeAllChildren();
 			else if (repository instanceof IMetadataRepository && !descriptor.isAppend())
 				((IMetadataRepository) repository).removeAll();
 			else if (repository instanceof IArtifactRepository && !descriptor.isAppend())
@@ -197,13 +250,8 @@ public abstract class AbstractApplication {
 
 	public IMetadataRepository getCompositeMetadataRepository() {
 		if (compositeMetadataRepository == null) {
-			try {
-				compositeMetadataRepository = new CompositeMetadataRepository(new URI("memory:/composite"), "parent metadata repo", null);//$NON-NLS-1$ //$NON-NLS-2$
-			} catch (URISyntaxException e) {
-				//Can't happen
-			}
-			for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
-				RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
+			compositeMetadataRepository = CompositeMetadataRepository.createMemoryComposite(agent);
+			for (RepositoryDescriptor repo : sourceRepositories) {
 				if (repo.isMetadata())
 					compositeMetadataRepository.addChild(repo.getRepoLocation());
 			}
@@ -213,13 +261,8 @@ public abstract class AbstractApplication {
 
 	public IArtifactRepository getCompositeArtifactRepository() {
 		if (compositeArtifactRepository == null) {
-			try {
-				compositeArtifactRepository = new CompositeArtifactRepository(new URI("memory:/composite"), "parent artifact repo", null);//$NON-NLS-1$ //$NON-NLS-2$
-			} catch (URISyntaxException e) {
-				//Can't happen
-			}
-			for (Iterator iter = sourceRepositories.iterator(); iter.hasNext();) {
-				RepositoryDescriptor repo = (RepositoryDescriptor) iter.next();
+			compositeArtifactRepository = CompositeArtifactRepository.createMemoryComposite(agent);
+			for (RepositoryDescriptor repo : sourceRepositories) {
 				if (repo.isArtifact())
 					compositeArtifactRepository.addChild(repo.getRepoLocation());
 			}
@@ -228,11 +271,11 @@ public abstract class AbstractApplication {
 	}
 
 	public boolean hasArtifactSources() {
-		return ((ICompositeRepository) getCompositeArtifactRepository()).getChildren().size() > 0;
+		return ((ICompositeRepository<?>) getCompositeArtifactRepository()).getChildren().size() > 0;
 	}
 
 	public boolean hasMetadataSources() {
-		return ((ICompositeRepository) getCompositeMetadataRepository()).getChildren().size() > 0;
+		return ((ICompositeRepository<?>) getCompositeMetadataRepository()).getChildren().size() > 0;
 	}
 
 	public abstract IStatus run(IProgressMonitor monitor) throws ProvisionException;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
index 5c101ea..7d0c203 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Activator.java
@@ -15,13 +15,14 @@ import java.net.URISyntaxException;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
 
 public class Activator implements BundleActivator {
 
@@ -40,12 +41,6 @@ public class Activator implements BundleActivator {
 	 */
 	public void start(BundleContext context) throws Exception {
 		bundleContext = context;
-
-		// TODO needed to do this to ensure the profile registry was registered
-		Bundle bundle = getBundle("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
-		if (bundle == null)
-			throw new ProvisionException(Messages.unable_to_start_exemplarysetup);
-		bundle.start(Bundle.START_TRANSIENT);
 	}
 
 	/* (non-Javadoc)
@@ -71,10 +66,20 @@ public class Activator implements BundleActivator {
 	}
 
 	/*
+	 * Return the provisioning agent. Throw an exception if it cannot be obtained.
+	 */
+	public static IProvisioningAgent getAgent() throws ProvisionException {
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getBundleContext(), IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new ProvisionException(Messages.no_provisioning_agent);
+		return agent;
+	}
+
+	/*
 	 * Return the artifact repository manager. Throw an exception if it cannot be obtained.
 	 */
 	public static IArtifactRepositoryManager getArtifactRepositoryManager() throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(getBundleContext(), IArtifactRepositoryManager.class.getName());
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new ProvisionException(Messages.no_artifactRepo_manager);
 		return manager;
@@ -84,35 +89,17 @@ public class Activator implements BundleActivator {
 	 * Return the profile registry. Throw an exception if it cannot be found.
 	 */
 	static IProfileRegistry getProfileRegistry() throws ProvisionException {
-		IProfileRegistry registry = (IProfileRegistry) ServiceHelper.getService(getBundleContext(), IProfileRegistry.class.getName());
+		IProfileRegistry registry = (IProfileRegistry) getAgent().getService(IProfileRegistry.SERVICE_NAME);
 		if (registry == null)
 			throw new ProvisionException(Messages.no_profile_registry);
 		return registry;
 	}
 
 	/*
-	 * Return the bundle with the given symbolic name, or null if it cannot be found.
-	 */
-	public static synchronized Bundle getBundle(String symbolicName) throws ProvisionException {
-		PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(getBundleContext(), PackageAdmin.class.getName());
-		if (packageAdmin == null)
-			throw new ProvisionException(Messages.no_package_admin);
-		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
-			return null;
-		//Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0)
-				return bundles[i];
-		}
-		return null;
-	}
-
-	/*
 	 * Return the metadata repository manager. Throw an exception if it cannot be obtained.
 	 */
 	public static IMetadataRepositoryManager getMetadataRepositoryManager() throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(getBundleContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null)
 			throw new ProvisionException(Messages.no_metadataRepo_manager);
 		return manager;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/ArtifactRepositoryValidator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/ArtifactRepositoryValidator.java
new file mode 100644
index 0000000..3748fc1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/ArtifactRepositoryValidator.java
@@ -0,0 +1,85 @@
+package org.eclipse.equinox.p2.internal.repository.tools;
+
+import org.eclipse.equinox.p2.repository.tools.comparator.ArtifactComparatorFactory;
+import org.eclipse.equinox.p2.repository.tools.comparator.IArtifactComparator;
+
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.*;
+
+public class ArtifactRepositoryValidator {
+
+	private IArtifactComparator comparator;
+
+	public ArtifactRepositoryValidator(String comparatorId) throws ProvisionException {
+		comparator = ArtifactComparatorFactory.getArtifactComparator(comparatorId);
+		if (comparatorId == null)
+			throw new ProvisionException(Messages.invalidComparatorId);
+
+	}
+
+	public IStatus validateRepository(IArtifactRepository repository) {
+		if (repository instanceof CompositeArtifactRepository)
+			return validateComposite((CompositeArtifactRepository) repository);
+
+		IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, new NullProgressMonitor());
+		for (Iterator<IArtifactKey> iterator = queryResult.iterator(); iterator.hasNext();) {
+			IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(iterator.next());
+			for (int i = 0; i < descriptors.length - 2; i++) {
+				IStatus compareResult = comparator.compare(repository, descriptors[i], repository, descriptors[i + 1]);
+				if (!compareResult.isOK()) {
+					return compareResult;
+				}
+			}
+		}
+		return Status.OK_STATUS;
+	}
+
+	public IStatus validateComposite(CompositeArtifactRepository repository) {
+		List<IArtifactRepository> repos = repository.getLoadedChildren();
+		IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, new NullProgressMonitor());
+		for (Iterator<IArtifactKey> iterator = queryResult.iterator(); iterator.hasNext();) {
+			IArtifactKey key = iterator.next();
+			IArtifactRepository firstRepo = null;
+			for (IArtifactRepository child : repos) {
+				if (child.contains(key)) {
+					if (firstRepo == null) {
+						firstRepo = child;
+						continue;
+					}
+
+					IArtifactDescriptor[] d1 = firstRepo.getArtifactDescriptors(key);
+					IArtifactDescriptor[] d2 = child.getArtifactDescriptors(key);
+					//If we assume each repo is internally consistant, we only need to compare one descriptor from each repo
+					IStatus compareResult = comparator.compare(firstRepo, d1[0], child, d2[0]);
+					if (!compareResult.isOK()) {
+						//LogHelper.log(compareResult);
+						return compareResult;
+					}
+				}
+			}
+		}
+		return Status.OK_STATUS;
+	}
+
+	public IStatus validateComposite(CompositeArtifactRepository composite, IArtifactRepository repository) {
+		IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, new NullProgressMonitor());
+		for (Iterator<IArtifactKey> iterator = queryResult.iterator(); iterator.hasNext();) {
+			IArtifactKey key = iterator.next();
+			if (composite.contains(key)) {
+				IArtifactDescriptor[] d1 = composite.getArtifactDescriptors(key);
+				IArtifactDescriptor[] d2 = repository.getArtifactDescriptors(key);
+				//If we assume each repo is internally consistant, we only need to compare one descriptor from each repo
+				IStatus compareResult = comparator.compare(composite, d1[0], repository, d2[0]);
+				if (!compareResult.isOK())
+					return compareResult;
+			}
+		}
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java
index 11f73de..6945445 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/CompositeRepositoryApplication.java
@@ -11,53 +11,63 @@
 package org.eclipse.equinox.p2.internal.repository.tools;
 
 import java.net.MalformedURLException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
 import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.ICompositeRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.ICompositeRepository;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
 
 public class CompositeRepositoryApplication extends AbstractApplication {
-	private List childrenToAdd = new ArrayList();
-	private List childrenToRemove = new ArrayList();
+	private List<RepositoryDescriptor> childrenToAdd = new ArrayList<RepositoryDescriptor>();
+	private List<RepositoryDescriptor> childrenToRemove = new ArrayList<RepositoryDescriptor>();
+	private boolean removeAllChildren = false;
 	private boolean failOnExists = false;
 	private String comparatorID = null;
 
+	@SuppressWarnings("unchecked")
 	public IStatus run(IProgressMonitor monitor) throws ProvisionException {
 		try {
 			initializeRepos(new NullProgressMonitor());
 			// load repository
-			ICompositeRepository metadataRepo = (ICompositeRepository) destinationMetadataRepository;
+			ICompositeRepository<IInstallableUnit> metadataRepo = (ICompositeRepository<IInstallableUnit>) destinationMetadataRepository;
 			CompositeArtifactRepository artifactRepo = (CompositeArtifactRepository) destinationArtifactRepository;
 
-			// Remove children from the Composite Repositories
-			for (Iterator iterator = childrenToRemove.iterator(); iterator.hasNext();) {
-				RepositoryDescriptor child = (RepositoryDescriptor) iterator.next();
-				if (child.isArtifact() && artifactRepo != null)
-					artifactRepo.removeChild(child.getOriginalRepoLocation());
-				if (child.isMetadata() && metadataRepo != null)
-					metadataRepo.removeChild(child.getOriginalRepoLocation());
+			if (removeAllChildren) {
+				if (artifactRepo != null)
+					artifactRepo.removeAllChildren();
+				if (metadataRepo != null)
+					metadataRepo.removeAllChildren();
+			} else {
+				// Remove children from the Composite Repositories
+				for (RepositoryDescriptor child : childrenToRemove) {
+					if (child.isArtifact() && artifactRepo != null)
+						artifactRepo.removeChild(child.getOriginalRepoLocation());
+					if (child.isMetadata() && metadataRepo != null)
+						metadataRepo.removeChild(child.getOriginalRepoLocation());
+				}
 			}
 
 			// Add children to the Composite Repositories
-			for (Iterator iterator = childrenToAdd.iterator(); iterator.hasNext();) {
-				RepositoryDescriptor child = (RepositoryDescriptor) iterator.next();
+			for (RepositoryDescriptor child : childrenToAdd) {
 				if (child.isArtifact() && artifactRepo != null)
 					artifactRepo.addChild(child.getOriginalRepoLocation());
 				if (child.isMetadata() && metadataRepo != null)
 					metadataRepo.addChild(child.getOriginalRepoLocation());
 			}
 
-			if (comparatorID != null)
-				if (!artifactRepo.validate(comparatorID))
-					return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.CompositeRepositoryApplication_failedComparator, comparatorID));
+			if (comparatorID != null) {
+				ArtifactRepositoryValidator validator = new ArtifactRepositoryValidator(comparatorID);
+				return validator.validateComposite(artifactRepo);
+			}
 			return Status.OK_STATUS;
 		} finally {
 			finalizeRepositories();
@@ -72,6 +82,10 @@ public class CompositeRepositoryApplication extends AbstractApplication {
 		childrenToRemove.add(child);
 	}
 
+	public void setRemoveAll(boolean all) {
+		removeAllChildren = all;
+	}
+
 	public void setFailOnExists(boolean value) {
 		failOnExists = value;
 	}
@@ -155,8 +169,8 @@ public class CompositeRepositoryApplication extends AbstractApplication {
 	/*
 	 * Determine if the repository is valid for this operation
 	 */
-	private boolean validRepositoryLocation(IRepository repository) throws ProvisionException {
-		if (repository instanceof ICompositeRepository) {
+	private boolean validRepositoryLocation(IRepository<?> repository) throws ProvisionException {
+		if (repository instanceof ICompositeRepository<?>) {
 			// if we have an already existing repository at that location, then throw an error
 			// if the user told us to
 			if (failOnExists)
@@ -171,7 +185,7 @@ public class CompositeRepositoryApplication extends AbstractApplication {
 	/*
 	 * Initialize a new repository
 	 */
-	private void initRepository(IRepository repository, RepositoryDescriptor desc) {
+	private void initRepository(IRepository<?> repository, RepositoryDescriptor desc) {
 		RepositoryHelper.validDestinationRepository(repository);
 		if (desc.isCompressed() && !repository.getProperties().containsKey(IRepository.PROP_COMPRESSED))
 			repository.setProperty(IRepository.PROP_COMPRESSED, String.valueOf(true));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
index 1ec043a..d3c0aaf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Messages.java
@@ -18,9 +18,11 @@ public class Messages extends NLS {
 	public static String exception_unableToRemoveRepo;
 	public static String exception_notLocalFileRepo;
 	public static String exception_noEngineService;
+	public static String exception_noPlannerService;
 	public static String exception_needIUsOrNonEmptyRepo;
 	public static String exception_needDestinationRepo;
 	public static String exception_onlyOneComparator;
+	public static String exception_loadingRepository;
 
 	public static String AbstractApplication_no_valid_destinations;
 
@@ -32,19 +34,15 @@ public class Messages extends NLS {
 
 	public static String no_artifactRepo_manager;
 	public static String no_metadataRepo_manager;
-	public static String no_package_admin;
 	public static String no_profile_registry;
+	public static String no_provisioning_agent;
 	public static String unable_to_process_uri;
-	public static String unable_to_start_exemplarysetup;
 	public static String unknown_repository_type;
 
 	public static String MirrorApplication_artifactDestinationNoSource;
 	public static String MirrorApplication_metadataDestinationNoSource;
-	public static String MirrorApplication_missingIU;
-	public static String MirrorApplication_missingSourceForIUs;
 	public static String MirrorApplication_no_IUs;
 	public static String MirrorApplication_set_source_repositories;
-	public static String MirrorApplication_validateAndMirrorProblems;
 
 	public static String ProcessRepo_location_not_url;
 	public static String ProcessRepo_must_be_local;
@@ -52,10 +50,23 @@ public class Messages extends NLS {
 	public static String SlicingOption_invalid_platform;
 	public static String exception_invalidDestination;
 	public static String exception_invalidSource;
-	public static String CompositeRepositoryApplication_failedComparator;
 	public static String Repo2RunnableTask_errorTransforming;
 	public static String SlicingOption_invalidFilterFormat;
 
+	public static String skippingInvalidFilter;
+
+	public static String message_mirroringStatus;
+	public static String mirror_alreadyExists;
+	public static String Mirroring_noMatchingDescriptor;
+	public static String Mirroring_ValidationError;
+	public static String Mirroring_missingDescriptor;
+	public static String Mirroring_differentDescriptorProperty;
+
+	public static String invalidComparatorId;
+	public static String info_noMD5Infomation;
+	public static String info_noMD5InRepository;
+	public static String warning_differentMD5;
+
 	static {
 		// initialize resource bundles
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
index d02cda7..30fca24 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,46 +12,166 @@ package org.eclipse.equinox.p2.internal.repository.tools;
 
 import java.io.File;
 import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.net.URISyntaxException;
+import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.mirror.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.director.PermissiveSlicer;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-
-public class MirrorApplication extends AbstractApplication {
+import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.internal.repository.mirroring.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.osgi.util.NLS;
+
+public class MirrorApplication extends AbstractApplication implements IApplication, IExecutableExtension {
 	private static final String LOG_ROOT = "p2.mirror"; //$NON-NLS-1$
+	private static final String MIRROR_MODE = "metadataOrArtifacts"; //$NON-NLS-1$
 
 	protected SlicingOptions slicingOptions = new SlicingOptions();
 
 	private URI baseline;
 	private String comparatorID;
+	private IQuery<IArtifactDescriptor> compareExclusions = null;
 	private boolean compare = false;
 	private boolean failOnError = true;
 	private boolean raw = true;
 	private boolean verbose = false;
 	private boolean validate = false;
+	private boolean mirrorReferences = false;
+	private String metadataOrArtifacts = null;
+	private String[] rootIUs = null;
 
 	private File mirrorLogFile; // file to log mirror output to (optional)
 	private File comparatorLogFile; // file to comparator output to (optional)
 	private IArtifactMirrorLog mirrorLog;
 	private IArtifactMirrorLog comparatorLog;
 
+	/**
+	 * Convert a list of tokens into an array. The list separator has to be
+	 * specified.
+	 */
+	public static String[] getArrayArgsFromString(String list, String separator) {
+		if (list == null || list.trim().equals("")) //$NON-NLS-1$
+			return new String[0];
+		List<String> result = new ArrayList<String>();
+		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
+			String token = tokens.nextToken().trim();
+			if (!token.equals("")) { //$NON-NLS-1$
+				if ((token.indexOf('[') >= 0 || token.indexOf('(') >= 0) && tokens.hasMoreTokens())
+					result.add(token + separator + tokens.nextToken());
+				else
+					result.add(token);
+			}
+		}
+		return result.toArray(new String[result.size()]);
+	}
+
 	public Object start(IApplicationContext context) throws Exception {
+		Map<?, ?> args = context.getArguments();
+		initializeFromArguments((String[]) args.get(IApplicationContext.APPLICATION_ARGS));
 		run(null);
 		return IApplication.EXIT_OK;
 	}
 
+	public void stop() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * The old "org.eclipse.equinox.p2.artifact.repository.mirrorApplication" application only does artifacts
+	 * Similary, "org.eclipse.equinox.p2.metadata.repository.mirrorApplication" only does metadata
+	 */
+	public void setInitializationData(IConfigurationElement config, String propertyName, Object data) {
+		if (data instanceof Map<?, ?> && ((Map<?, ?>) data).containsKey(MIRROR_MODE)) {
+			metadataOrArtifacts = (String) ((Map<?, ?>) data).get(MIRROR_MODE);
+		}
+	}
+
+	public void initializeFromArguments(String[] args) throws Exception {
+		if (args == null)
+			return;
+
+		File comparatorLogLocation = null;
+		File mirrorLogLocation = null;
+
+		RepositoryDescriptor destination = new RepositoryDescriptor();
+		RepositoryDescriptor sourceRepo = new RepositoryDescriptor();
+		if (metadataOrArtifacts != null) {
+			destination.setKind(metadataOrArtifacts);
+			sourceRepo.setKind(metadataOrArtifacts);
+		}
+
+		addDestination(destination);
+		addSource(sourceRepo);
+
+		for (int i = 0; i < args.length; i++) {
+			// check for args without parameters (i.e., a flag arg)
+			if (args[i].equalsIgnoreCase("-raw")) //$NON-NLS-1$
+				raw = true;
+			else if (args[i].equalsIgnoreCase("-ignoreErrors")) //$NON-NLS-1$
+				failOnError = false;
+			else if (args[i].equalsIgnoreCase("-verbose")) //$NON-NLS-1$
+				verbose = true;
+			else if (args[i].equalsIgnoreCase("-compare")) //$NON-NLS-1$
+				compare = true;
+			else if (args[i].equalsIgnoreCase("-validate")) //$NON-NLS-1$
+				validate = true;
+			else if (args[i].equalsIgnoreCase("-references")) //$NON-NLS-1$
+				mirrorReferences = true;
+
+			// check for args with parameters. If we are at the last argument or 
+			// if the next one has a '-' as the first character, then we can't have 
+			// an arg with a param so continue.
+			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
+				continue;
+
+			String arg = args[++i];
+
+			if (args[i - 1].equalsIgnoreCase("-comparator")) //$NON-NLS-1$
+				comparatorID = arg;
+			else if (args[i - 1].equalsIgnoreCase("-comparatorLog")) //$NON-NLS-1$
+				comparatorLogLocation = new File(arg);
+			else if (args[i - 1].equalsIgnoreCase("-destinationName")) //$NON-NLS-1$	
+				destination.setName(arg);
+			else if (args[i - 1].equalsIgnoreCase("-writeMode")) { //$NON-NLS-1$
+				if (args[i].equalsIgnoreCase("clean")) //$NON-NLS-1$
+					destination.setAppend(false);
+			} else if (args[i - 1].equalsIgnoreCase("-log")) { //$NON-NLS-1$
+				mirrorLogLocation = new File(arg);
+			} else if (args[i - 1].equalsIgnoreCase("-roots")) { //$NON-NLS-1$
+				rootIUs = getArrayArgsFromString(arg, ","); //$NON-NLS-1$
+			} else {
+				try {
+					if (args[i - 1].equalsIgnoreCase("-source")) { //$NON-NLS-1$
+						URI uri = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
+						sourceRepo.setLocation(uri);
+						destination.setFormat(uri);
+					} else if (args[i - 1].equalsIgnoreCase("-destination")) //$NON-NLS-1$
+						destination.setLocation(RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg)));
+					else if (args[i - 1].equalsIgnoreCase("-compareAgainst")) { //$NON-NLS-1$
+						baseline = RepositoryHelper.localRepoURIHelper(URIUtil.fromString(arg));
+						compare = true;
+					}
+				} catch (URISyntaxException e) {
+					throw new IllegalArgumentException(NLS.bind(Messages.ProcessRepo_location_not_url, arg));
+				}
+			}
+		}
+
+		// Create logs
+		if (mirrorLogLocation != null)
+			mirrorLog = getLog(mirrorLogLocation, "p2.artifact.mirror"); //$NON-NLS-1$
+		if (comparatorLogLocation != null && comparatorID != null)
+			comparatorLog = getLog(comparatorLogLocation, comparatorID);
+	}
+
 	public IStatus run(IProgressMonitor monitor) throws ProvisionException {
 		IStatus mirrorStatus = Status.OK_STATUS;
 		try {
@@ -59,10 +179,10 @@ public class MirrorApplication extends AbstractApplication {
 			initializeLogs();
 			validate();
 			initializeIUs();
-			IQueryable slice = slice(new NullProgressMonitor());
+			IQueryable<IInstallableUnit> slice = slice(new NullProgressMonitor());
 			if (destinationArtifactRepository != null) {
 				mirrorStatus = mirrorArtifacts(slice, new NullProgressMonitor());
-				if (mirrorStatus.getSeverity() == IStatus.ERROR)
+				if (failOnError && mirrorStatus.getSeverity() == IStatus.ERROR)
 					return mirrorStatus;
 			}
 			if (destinationMetadataRepository != null)
@@ -76,27 +196,25 @@ public class MirrorApplication extends AbstractApplication {
 		return mirrorStatus;
 	}
 
-	private IStatus mirrorArtifacts(IQueryable slice, IProgressMonitor monitor) throws ProvisionException {
+	private IStatus mirrorArtifacts(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) {
 		// Obtain ArtifactKeys from IUs
-		Collector ius = slice.query(InstallableUnitQuery.ANY, new Collector(), monitor);
-		ArrayList keys = new ArrayList(ius.size());
-		for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
-			IArtifactKey[] iuKeys = iu.getArtifacts();
-			for (int i = 0; i < iuKeys.length; i++) {
-				keys.add(iuKeys[i]);
-			}
+		IQueryResult<IInstallableUnit> ius = slice.query(QueryUtil.createIUAnyQuery(), monitor);
+		ArrayList<IArtifactKey> keys = new ArrayList<IArtifactKey>();
+		for (Iterator<IInstallableUnit> iterator = ius.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			keys.addAll(iu.getArtifacts());
 		}
-		Mirroring mirror = new Mirroring(getCompositeArtifactRepository(), destinationArtifactRepository, raw);
 
+		Mirroring mirror = new Mirroring(getCompositeArtifactRepository(), destinationArtifactRepository, raw);
 		mirror.setCompare(compare);
 		mirror.setComparatorId(comparatorID);
 		mirror.setBaseline(initializeBaseline());
 		mirror.setValidate(validate);
+		mirror.setCompareExclusions(compareExclusions);
 
 		// If IUs have been specified then only they should be mirrored, otherwise mirror everything.
 		if (keys.size() > 0)
-			mirror.setArtifactKeys((IArtifactKey[]) keys.toArray(new IArtifactKey[keys.size()]));
+			mirror.setArtifactKeys(keys.toArray(new IArtifactKey[keys.size()]));
 
 		if (comparatorLog != null)
 			mirror.setComparatorLog(comparatorLog);
@@ -110,15 +228,23 @@ public class MirrorApplication extends AbstractApplication {
 		return result;
 	}
 
-	private IArtifactRepository initializeBaseline() throws ProvisionException {
+	private IArtifactRepository initializeBaseline() {
 		if (baseline == null)
 			return null;
-		return addRepository(Activator.getArtifactRepositoryManager(), baseline, 0, null);
+		try {
+			return addRepository(getArtifactRepositoryManager(), baseline, 0, null);
+		} catch (ProvisionException e) {
+			if (mirrorLog != null && e.getStatus() != null)
+				mirrorLog.log(e.getStatus());
+			return null;
+		}
 	}
 
-	private void mirrorMetadata(IQueryable slice, IProgressMonitor monitor) {
-		Collector allIUs = slice.query(InstallableUnitQuery.ANY, new Collector(), monitor);
-		destinationMetadataRepository.addInstallableUnits((IInstallableUnit[]) allIUs.toArray(IInstallableUnit.class));
+	private void mirrorMetadata(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) {
+		IQueryResult<IInstallableUnit> allIUs = slice.query(QueryUtil.createIUAnyQuery(), monitor);
+		destinationMetadataRepository.addInstallableUnits(allIUs.toUnmodifiableSet());
+		if (mirrorReferences)
+			destinationMetadataRepository.addReferences(getCompositeMetadataRepository().getReferences());
 	}
 
 	/*
@@ -140,17 +266,24 @@ public class MirrorApplication extends AbstractApplication {
 	 * If no IUs have been specified we want to mirror them all
 	 */
 	private void initializeIUs() throws ProvisionException {
-		if (sourceIUs == null || sourceIUs.isEmpty()) {
-			sourceIUs = new ArrayList();
-			IMetadataRepository metadataRepo = getCompositeMetadataRepository();
-			Collector collector = metadataRepo.query(InstallableUnitQuery.ANY, new Collector(), null);
-
-			for (Iterator iter = collector.iterator(); iter.hasNext();) {
-				IInstallableUnit iu = (IInstallableUnit) iter.next();
-				sourceIUs.add(iu);
+		IMetadataRepository metadataRepo = getCompositeMetadataRepository();
+
+		if (rootIUs != null) {
+			sourceIUs = new ArrayList<IInstallableUnit>();
+			for (int i = 0; i < rootIUs.length; i++) {
+				String[] segments = getArrayArgsFromString(rootIUs[i], "/"); //$NON-NLS-1$
+				VersionRange range = segments.length > 1 ? new VersionRange(segments[1]) : null;
+				Iterator<IInstallableUnit> queryResult = metadataRepo.query(QueryUtil.createIUQuery(segments[0], range), null).iterator();
+				while (queryResult.hasNext())
+					sourceIUs.add(queryResult.next());
 			}
-
-			if (collector.size() == 0 && destinationMetadataRepository != null)
+		} else if (sourceIUs == null || sourceIUs.isEmpty()) {
+			sourceIUs = new ArrayList<IInstallableUnit>();
+			Iterator<IInstallableUnit> queryResult = metadataRepo.query(QueryUtil.createIUAnyQuery(), null).iterator();
+			while (queryResult.hasNext())
+				sourceIUs.add(queryResult.next());
+			/* old metadata mirroring app did not throw an exception here */
+			if (sourceIUs.size() == 0 && destinationMetadataRepository != null && metadataOrArtifacts == null)
 				throw new ProvisionException(Messages.MirrorApplication_no_IUs);
 		}
 	}
@@ -185,11 +318,16 @@ public class MirrorApplication extends AbstractApplication {
 		return new FileMirrorLog(absolutePath, 0, root);
 	}
 
-	private IQueryable slice(IProgressMonitor monitor) throws ProvisionException {
+	private IQueryable<IInstallableUnit> slice(IProgressMonitor monitor) throws ProvisionException {
 		if (slicingOptions == null)
 			slicingOptions = new SlicingOptions();
 		PermissiveSlicer slicer = new PermissiveSlicer(getCompositeMetadataRepository(), slicingOptions.getFilter(), slicingOptions.includeOptionalDependencies(), slicingOptions.isEverythingGreedy(), slicingOptions.forceFilterTo(), slicingOptions.considerStrictDependencyOnly(), slicingOptions.followOnlyFilteredRequirements());
-		IQueryable slice = slicer.slice((IInstallableUnit[]) sourceIUs.toArray(new IInstallableUnit[sourceIUs.size()]), monitor);
+		IQueryable<IInstallableUnit> slice = slicer.slice(sourceIUs.toArray(new IInstallableUnit[sourceIUs.size()]), monitor);
+
+		if (slice != null && slicingOptions.latestVersionOnly()) {
+			IQueryResult<IInstallableUnit> queryResult = slice.query(QueryUtil.createLatestIUQuery(), monitor);
+			slice = queryResult;
+		}
 		if (slicer.getStatus().getSeverity() != IStatus.OK && mirrorLog != null) {
 			mirrorLog.log(slicer.getStatus());
 		}
@@ -274,4 +412,15 @@ public class MirrorApplication extends AbstractApplication {
 	public void setValidate(boolean value) {
 		validate = value;
 	}
+
+	/*
+	 * Set if references should be mirrored
+	 */
+	public void setReferences(boolean flag) {
+		mirrorReferences = flag;
+	}
+
+	public void setComparatorExclusions(IQuery<IArtifactDescriptor> exclusions) {
+		compareExclusions = exclusions;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
index 852f96c..bd2a2b8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RecreateRepositoryApplication.java
@@ -7,41 +7,42 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype Inc - ongoing development
  *******************************************************************************/
 
 package org.eclipse.equinox.p2.internal.repository.tools;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
 import org.eclipse.osgi.util.NLS;
 
-public class RecreateRepositoryApplication {
+public class RecreateRepositoryApplication extends AbstractApplication {
 	static final private String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
 	private RepositoryDescriptor descriptor;
 	private String repoName = null;
 	boolean removeArtifactRepo = true;
-	private Map repoProperties = null;
-	private Map repoMap = null;
-
-	public IStatus run(IProgressMonitor monitor) throws ProvisionException, IOException {
+	private Map<String, String> repoProperties = null;
+	private Map<IArtifactKey, IArtifactDescriptor[]> repoMap = null;
 
+	public IStatus run(IProgressMonitor monitor) throws ProvisionException {
 		try {
 			IArtifactRepository repository = initialize(monitor);
 			removeRepository(repository, monitor);
 			recreateRepository(monitor);
 		} finally {
 			if (removeArtifactRepo) {
-				IArtifactRepositoryManager repositoryManager = Activator.getArtifactRepositoryManager();
+				IArtifactRepositoryManager repositoryManager = getArtifactRepositoryManager();
 				repositoryManager.removeRepository(descriptor.getRepoLocation());
 			}
 		}
@@ -54,7 +55,7 @@ public class RecreateRepositoryApplication {
 	}
 
 	private IArtifactRepository initialize(IProgressMonitor monitor) throws ProvisionException {
-		IArtifactRepositoryManager repositoryManager = Activator.getArtifactRepositoryManager();
+		IArtifactRepositoryManager repositoryManager = getArtifactRepositoryManager();
 		removeArtifactRepo = !repositoryManager.contains(descriptor.getRepoLocation());
 
 		IArtifactRepository repository = repositoryManager.loadRepository(descriptor.getRepoLocation(), IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, monitor);
@@ -67,46 +68,45 @@ public class RecreateRepositoryApplication {
 		repoName = repository.getName();
 		repoProperties = repository.getProperties();
 
-		repoMap = new HashMap();
-		IArtifactKey[] keys = repository.getArtifactKeys();
-		for (int i = 0; i < keys.length; i++) {
-			IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(keys[i]);
-			repoMap.put(keys[i], descriptors);
+		repoMap = new HashMap<IArtifactKey, IArtifactDescriptor[]>();
+		IQueryResult<IArtifactKey> keys = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
+		for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
+			IArtifactKey key = iterator.next();
+			IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
+			repoMap.put(key, descriptors);
 		}
 
 		return repository;
 	}
 
-	private void removeRepository(IArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException, IOException {
-		IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
+	private void removeRepository(IArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
+		IArtifactRepositoryManager manager = getArtifactRepositoryManager();
 		manager.removeRepository(repository.getLocation());
 
-		boolean compressed = Boolean.valueOf((String) repoProperties.get(IRepository.PROP_COMPRESSED)).booleanValue();
+		boolean compressed = Boolean.valueOf(repoProperties.get(IRepository.PROP_COMPRESSED)).booleanValue();
 		URI realLocation = SimpleArtifactRepository.getActualLocation(repository.getLocation(), compressed);
 		File realFile = URIUtil.toFile(realLocation);
-
 		if (!realFile.exists() || !realFile.delete())
 			throw new ProvisionException(NLS.bind(Messages.exception_unableToRemoveRepo, realFile.toString()));
 	}
 
 	private void recreateRepository(IProgressMonitor monitor) throws ProvisionException {
-		IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
+		IArtifactRepositoryManager manager = getArtifactRepositoryManager();
 
 		//add pack200 mappings, the existing repoProperties is not modifiable 
-		Map newProperties = new HashMap(repoProperties);
+		Map<String, String> newProperties = new HashMap<String, String>(repoProperties);
 		newProperties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
 		IArtifactRepository repository = manager.createRepository(descriptor.getRepoLocation(), repoName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, newProperties);
 		if (!(repository instanceof IFileArtifactRepository))
 			throw new ProvisionException(NLS.bind(Messages.exception_notLocalFileRepo, repository.getLocation()));
 
 		IFileArtifactRepository simple = (IFileArtifactRepository) repository;
-		for (Iterator iterator = repoMap.keySet().iterator(); iterator.hasNext();) {
-			IArtifactKey key = (IArtifactKey) iterator.next();
-			IArtifactDescriptor[] descriptors = (IArtifactDescriptor[]) repoMap.get(key);
+		for (IArtifactKey key : repoMap.keySet()) {
+			IArtifactDescriptor[] descriptors = repoMap.get(key);
 
 			String unpackedSize = null;
 			File packFile = null;
-			Set files = new HashSet();
+			Set<File> files = new HashSet<File>();
 			for (int i = 0; i < descriptors.length; i++) {
 				File artifactFile = simple.getArtifactFile(descriptors[i]);
 				files.add(artifactFile);
@@ -116,9 +116,10 @@ public class RecreateRepositoryApplication {
 				ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptors[i]);
 				newDescriptor.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, size);
 				newDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, size);
-				//only set an MD5 if there was one to start with
-				if (newDescriptor.getProperties().containsKey(IArtifactDescriptor.DOWNLOAD_MD5))
-					newDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, RepositoryUtilities.computeMD5(artifactFile));
+
+				String md5 = RepositoryUtilities.computeMD5(artifactFile);
+				if (md5 != null)
+					newDescriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
 
 				File temp = new File(artifactFile.getParentFile(), artifactFile.getName() + ".pack.gz"); //$NON-NLS-1$
 				if (temp.exists()) {
@@ -128,7 +129,7 @@ public class RecreateRepositoryApplication {
 
 				repository.addDescriptor(newDescriptor);
 			}
-			if (packFile != null && !files.contains(packFile)) {
+			if (packFile != null && !files.contains(packFile) && packFile.length() > 0) {
 				ArtifactDescriptor packDescriptor = createPack200ArtifactDescriptor(key, packFile, unpackedSize);
 				repository.addDescriptor(packDescriptor);
 			}
@@ -136,15 +137,14 @@ public class RecreateRepositoryApplication {
 	}
 
 	private ArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File packFile, String installSize) {
-		final String PACKED_FORMAT = "packed"; //$NON-NLS-1$
 
 		if (packFile != null && packFile.exists()) {
 			ArtifactDescriptor result = new ArtifactDescriptor(key);
 			result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
 			result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(packFile.length()));
-			ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+			IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
 			result.setProcessingSteps(steps);
-			result.setProperty(IArtifactDescriptor.FORMAT, PACKED_FORMAT);
+			result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
 			return result;
 		}
 		return null;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 3a2f3d1..57818e5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,26 +7,29 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools;
 
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.DownloadManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.phases.Collect;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 /**
  * The transformer takes an existing p2 repository (local or remote), iterates over 
@@ -42,31 +45,26 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 	private static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
 
 	protected class CollectNativesAction extends ProvisioningAction {
-		public IStatus execute(Map parameters) {
+		public IStatus execute(Map<String, Object> parameters) {
 			InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
 			IInstallableUnit installableUnit = operand.second();
 
-			IArtifactRepositoryManager manager = null;
-			try {
-				manager = Activator.getArtifactRepositoryManager();
-			} catch (ProvisionException e) {
-				return e.getStatus();
-			}
-
-			IArtifactKey[] toDownload = installableUnit.getArtifacts();
+			IArtifactRepositoryManager manager = getArtifactRepositoryManager();
+			Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
 			if (toDownload == null)
 				return Status.OK_STATUS;
 
-			List artifactRequests = (List) parameters.get(NATIVE_ARTIFACTS);
+			@SuppressWarnings("unchecked")
+			List<IArtifactRequest> artifactRequests = (List<IArtifactRequest>) parameters.get(NATIVE_ARTIFACTS);
 
-			for (int i = 0; i < toDownload.length; i++) {
-				IArtifactRequest request = manager.createMirrorRequest(toDownload[i], destinationArtifactRepository, null, null);
+			for (IArtifactKey keyToDownload : toDownload) {
+				IArtifactRequest request = manager.createMirrorRequest(keyToDownload, destinationArtifactRepository, null, null);
 				artifactRequests.add(request);
 			}
 			return Status.OK_STATUS;
 		}
 
-		public IStatus undo(Map parameters) {
+		public IStatus undo(Map<String, Object> parameters) {
 			// nothing to do for now
 			return Status.OK_STATUS;
 		}
@@ -77,26 +75,27 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 			super(NATIVE_ARTIFACTS, weight);
 		}
 
-		protected ProvisioningAction[] getActions(InstallableUnitOperand operand) {
+		protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
 			IInstallableUnit unit = operand.second();
 			if (unit.getTouchpointType().getId().equals(NATIVE_TYPE)) {
-				return new ProvisioningAction[] {new CollectNativesAction()};
+				return Collections.<ProvisioningAction> singletonList(new CollectNativesAction());
 			}
 			return null;
 		}
 
-		protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-			parameters.put(NATIVE_ARTIFACTS, new ArrayList());
+		protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+			parameters.put(NATIVE_ARTIFACTS, new ArrayList<Object>());
 			return null;
 		}
 
-		protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map parameters) {
-			List artifactRequests = (List) parameters.get(NATIVE_ARTIFACTS);
+		protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
+			@SuppressWarnings("unchecked")
+			List<IArtifactRequest> artifactRequests = (List<IArtifactRequest>) parameters.get(NATIVE_ARTIFACTS);
 			ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
-
-			DownloadManager dm = new DownloadManager(context);
-			for (Iterator it = artifactRequests.iterator(); it.hasNext();) {
-				dm.add((IArtifactRequest) it.next());
+			IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
+			DownloadManager dm = new DownloadManager(context, agent);
+			for (IArtifactRequest request : artifactRequests) {
+				dm.add(request);
 			}
 			return dm.start(monitor);
 		}
@@ -104,13 +103,13 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 
 	// the list of IUs that we actually transformed... could have come from the repo 
 	// or have been user-specified.
-	private Collection processedIUs = new ArrayList();
+	private Collection<IInstallableUnit> processedIUs = new ArrayList<IInstallableUnit>();
 
 	/*
 	 * Perform the transformation.
 	 */
 	public IStatus run(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor progress = SubMonitor.convert(monitor, 4);
+		SubMonitor progress = SubMonitor.convert(monitor, 5);
 
 		initializeRepos(progress);
 
@@ -120,23 +119,23 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 		// figure out which IUs we need to process
 		collectIUs(progress.newChild(1));
 
-		// create the operands from the list of IUs
-		InstallableUnitOperand[] operands = new InstallableUnitOperand[processedIUs.size()];
-		int i = 0;
-		for (Iterator iter = processedIUs.iterator(); iter.hasNext();)
-			operands[i++] = new InstallableUnitOperand(null, (IInstallableUnit) iter.next());
-
 		// call the engine with only the "collect" phase so all we do is download
 		IProfile profile = createProfile();
 		try {
-			ProvisioningContext context = new ProvisioningContext();
-			PhaseSet phaseSet = getPhaseSet();
-			Engine engine = (Engine) ServiceHelper.getService(Activator.getBundleContext(), IEngine.SERVICE_NAME);
+			IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
 			if (engine == null)
 				throw new ProvisionException(Messages.exception_noEngineService);
-			IStatus result = engine.perform(profile, phaseSet, operands, context, progress.newChild(1));
-			if (result.matches(IStatus.ERROR))
-				return result;
+			ProvisioningContext context = new ProvisioningContext(agent);
+			context.setMetadataRepositories(getRepositories(true));
+			context.setArtifactRepositories(getRepositories(false));
+			IProvisioningPlan plan = engine.createPlan(profile, context);
+			for (Iterator<IInstallableUnit> iterator = processedIUs.iterator(); iterator.hasNext();) {
+				plan.addInstallableUnit(iterator.next());
+			}
+			IStatus result = engine.perform(plan, getPhaseSet(), progress.newChild(1));
+			PhaseSet nativeSet = getNativePhase();
+			if (nativeSet != null)
+				engine.perform(plan, nativeSet, progress.newChild(1));
 
 			// publish the metadata to a destination - if requested
 			publishMetadata(progress.newChild(1));
@@ -150,8 +149,21 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 		}
 	}
 
+	protected URI[] getRepositories(boolean metadata) {
+		List<URI> repos = new ArrayList<URI>();
+		for (RepositoryDescriptor repo : sourceRepositories) {
+			if (metadata ? repo.isMetadata() : repo.isArtifact())
+				repos.add(repo.getRepoLocation());
+		}
+		return repos.toArray(new URI[repos.size()]);
+	}
+
 	protected PhaseSet getPhaseSet() {
-		return new PhaseSet(new Phase[] {new Collect(100), new CollectNativesPhase(100)}) { /* nothing to override */};
+		return new PhaseSet(new Phase[] {new Collect(100)}) { /* nothing to override */};
+	}
+
+	protected PhaseSet getNativePhase() {
+		return new PhaseSet(new Phase[] {new CollectNativesPhase(100)}) { /*nothing to override */};
 	}
 
 	/*
@@ -167,7 +179,9 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 		if (!hasMetadataSources())
 			throw new ProvisionException(Messages.exception_needIUsOrNonEmptyRepo);
 
-		processedIUs.addAll(getAllIUs(getCompositeMetadataRepository(), monitor).toCollection());
+		Iterator<IInstallableUnit> itor = getAllIUs(getCompositeMetadataRepository(), monitor).iterator();
+		while (itor.hasNext())
+			processedIUs.add(itor.next());
 
 		if (processedIUs.isEmpty())
 			throw new ProvisionException(Messages.exception_needIUsOrNonEmptyRepo);
@@ -181,16 +195,16 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 		// publishing the metadata is optional
 		if (destinationMetadataRepository == null)
 			return;
-		destinationMetadataRepository.addInstallableUnits((IInstallableUnit[]) processedIUs.toArray(new IInstallableUnit[processedIUs.size()]));
+		destinationMetadataRepository.addInstallableUnits(processedIUs);
 	}
 
 	/*
 	 * Return a collector over all the IUs contained in the given repository.
 	 */
-	private Collector getAllIUs(IMetadataRepository repository, IProgressMonitor monitor) {
+	private IQueryResult<IInstallableUnit> getAllIUs(IMetadataRepository repository, IProgressMonitor monitor) {
 		SubMonitor progress = SubMonitor.convert(monitor, 2);
 		try {
-			return repository.query(InstallableUnitQuery.ANY, new Collector(), progress.newChild(1));
+			return repository.query(QueryUtil.createIUAnyQuery(), progress.newChild(1));
 		} finally {
 			progress.done();
 		}
@@ -208,7 +222,7 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
 	 * Create and return a new profile.
 	 */
 	private IProfile createProfile() throws ProvisionException {
-		Map properties = new Properties();
+		Map<String, String> properties = new HashMap<String, String>();
 		properties.put(IProfile.PROP_CACHE, URIUtil.toFile(destinationArtifactRepository.getLocation()).getAbsolutePath());
 		properties.put(IProfile.PROP_INSTALL_FOLDER, URIUtil.toFile(destinationArtifactRepository.getLocation()).getAbsolutePath());
 		IProfileRegistry registry = Activator.getProfileRegistry();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzer.java
new file mode 100644
index 0000000..3186b47
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzer.java
@@ -0,0 +1,75 @@
+/******************************************************************************* 
+* Copyright (c) 2009,2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools;
+
+import org.eclipse.equinox.p2.repository.tools.analyzer.IIUAnalyzer;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+import java.util.Iterator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+
+/**
+ * @since 2.0
+ *
+ */
+public class RepositoryAnalyzer {
+
+	private final IMetadataRepository[] repositories;
+
+	public RepositoryAnalyzer(IMetadataRepository[] repositories) {
+		this.repositories = repositories;
+	}
+
+	public IStatus analyze(IProgressMonitor monitor) {
+		MultiStatus result = new MultiStatus(Activator.ID, IStatus.OK, null, null);
+
+		SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 2);
+		IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor(IIUAnalyzer.ID);
+
+		for (int i = 0; i < repositories.length; i++) {
+			IQueryResult<IInstallableUnit> queryResult = repositories[i].query(QueryUtil.createIUAnyQuery(), sub);
+
+			SubMonitor repositoryMonitor = SubMonitor.convert(sub, IProgressMonitor.UNKNOWN);
+			for (int j = 0; j < config.length; j++) {
+				try {
+					IIUAnalyzer verifier = (IIUAnalyzer) config[j].createExecutableExtension("class"); //$NON-NLS-1$
+					String analyizerName = config[j].getAttribute("name"); //$NON-NLS-1$
+					if (verifier instanceof IUAnalyzer) {
+						((IUAnalyzer) verifier).setName(analyizerName);
+					}
+					verifier.preAnalysis(repositories[i]);
+					Iterator<IInstallableUnit> iter = queryResult.iterator();
+					while (iter.hasNext()) {
+						IInstallableUnit iu = iter.next();
+						verifier.analyzeIU(iu);
+					}
+					IStatus postAnalysisResult = verifier.postAnalysis();
+					if (postAnalysisResult == null)
+						postAnalysisResult = new Status(IStatus.OK, Activator.ID, analyizerName);
+					if (postAnalysisResult.isOK() && !postAnalysisResult.isMultiStatus())
+						postAnalysisResult = new Status(IStatus.OK, Activator.ID, analyizerName);
+					result.add(postAnalysisResult);
+				} catch (CoreException e) {
+					if (e.getCause() instanceof ClassNotFoundException) {
+						result.add(new Status(IStatus.ERROR, Activator.ID, "Cannot find: " + config[j].getAttribute("class")));
+					} else
+						e.printStackTrace();
+				}
+			}
+			repositoryMonitor.done();
+		}
+		sub.done();
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzerApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzerApplication.java
new file mode 100644
index 0000000..c7bd1cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryAnalyzerApplication.java
@@ -0,0 +1,86 @@
+/******************************************************************************* 
+* Copyright (c) 2009-2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+
+/**
+ *
+ */
+public class RepositoryAnalyzerApplication implements IApplication {
+
+	private URI uri = null;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
+	 */
+	public Object start(IApplicationContext context) throws Exception {
+
+		long start = System.currentTimeMillis();
+		processArguments((String[]) context.getArguments().get("application.args"));
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getBundleContext(), IProvisioningAgent.SERVICE_NAME);
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		IMetadataRepository repository = manager.loadRepository(uri, new NullProgressMonitor());
+		RepositoryAnalyzer repositoryAnalyzer = new RepositoryAnalyzer(new IMetadataRepository[] {repository});
+		IStatus status = repositoryAnalyzer.analyze(new NullProgressMonitor());
+		IStatus[] children = status.getChildren();
+		long time = (System.currentTimeMillis()) - start;
+		if (status.isOK())
+			System.out.println("Repository Analyzer Finished succesfuly in " + time + " ms.");
+		else
+			System.out.println("Repository Analyzer Finished in " + time + " ms with status with errors.");
+		for (int i = 0; i < children.length; i++) {
+			if (children[i].isOK())
+				System.out.print("[OK] ");
+			else
+				System.out.print("[Error] ");
+			System.out.println(children[i].getMessage());
+			if (children[i].isMultiStatus() && children[i].getChildren() != null && children[i].getChildren().length > 0) {
+				IStatus[] subChildren = children[i].getChildren();
+				for (int j = 0; j < subChildren.length; j++) {
+					System.out.println("   " + subChildren[j].getMessage());
+				}
+			}
+		}
+		return IApplication.EXIT_OK;
+	}
+
+	private void processArguments(String[] args) throws CoreException, URISyntaxException {
+		for (int i = 0; i < args.length; i++) {
+			if ("-m".equals(args[i]) || "-metadataRepository".equals(args[i])) { //$NON-NLS-1$ //$NON-NLS-2$
+				if (i + 1 < args.length)
+					uri = new URI(args[i + 1]);
+			}
+		}
+		validateLaunch();
+	}
+
+	private void validateLaunch() throws CoreException {
+		if (uri == null)
+			throw new CoreException(new Status(IStatus.ERROR, Activator.ID, "-metadataRepository <metadataURI> must be specified"));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.app.IApplication#stop()
+	 */
+	public void stop() {
+		// TODO Auto-generated method stub
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java
index 478f7fe..01dd76f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/RepositoryDescriptor.java
@@ -12,7 +12,7 @@ package org.eclipse.equinox.p2.internal.repository.tools;
 
 import java.net.URI;
 import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.eclipse.osgi.util.NLS;
 
 public class RepositoryDescriptor {
@@ -28,6 +28,7 @@ public class RepositoryDescriptor {
 	private URI format = null;
 	private int kind = TYPE_BOTH;
 	private URI originalLocation = null;
+	private boolean optional = false;
 
 	public void setCompressed(boolean compress) {
 		compressed = compress;
@@ -37,6 +38,14 @@ public class RepositoryDescriptor {
 		name = repoName;
 	}
 
+	public void setOptional(boolean optional) {
+		this.optional = optional;
+	}
+
+	public boolean isOptional() {
+		return optional;
+	}
+
 	public void setLocation(URI repoLocation) {
 		originalLocation = repoLocation;
 		location = RepositoryHelper.localRepoURIHelper(repoLocation);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java
index a016e26..4909ca8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/SlicingOptions.java
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools;
 
-import java.util.Dictionary;
-import java.util.Properties;
+import java.util.Hashtable;
+import java.util.Map;
 
 public class SlicingOptions {
 	private boolean includeOptionalDependencies = true;
@@ -19,7 +19,8 @@ public class SlicingOptions {
 	private boolean forceFilterTo = true;
 	private boolean considerStrictDependencyOnly = false;
 	private boolean followOnlyFilteredRequirements = false;
-	private Dictionary filter = null;
+	private boolean latestVersion = false;
+	private Map<String, String> filter = null;
 
 	public boolean includeOptionalDependencies() {
 		return includeOptionalDependencies;
@@ -53,13 +54,13 @@ public class SlicingOptions {
 		this.considerStrictDependencyOnly = strict;
 	}
 
-	public Dictionary getFilter() {
+	public Map<String, String> getFilter() {
 		if (filter == null)
-			filter = new Properties();
+			filter = new Hashtable<String, String>();
 		return filter;
 	}
 
-	public void setFilter(Dictionary filter) {
+	public void setFilter(Map<String, String> filter) {
 		this.filter = filter;
 	}
 
@@ -70,4 +71,12 @@ public class SlicingOptions {
 	public boolean followOnlyFilteredRequirements() {
 		return followOnlyFilteredRequirements;
 	}
+
+	public boolean latestVersionOnly() {
+		return latestVersion;
+	}
+
+	public void latestVersionOnly(boolean latest) {
+		this.latestVersion = latest;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java
new file mode 100644
index 0000000..beeb8fd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/CopyrightAnalyzer.java
@@ -0,0 +1,44 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that all Group IUs have a copyright.
+ */
+public class CopyrightAnalyzer extends IUAnalyzer {
+
+	public void analyzeIU(IInstallableUnit iu) {
+		if (Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP)).booleanValue()) {
+			if (iu.getCopyright() == null || iu.getCopyright().getBody().length() == 0) {
+				// If there is no copyright at all, this is an error
+				error(iu, "[ERROR] " + iu.getId() + " has no copyright");
+				return;
+			}
+			if (iu.getCopyright() != null && iu.getCopyright().getBody().startsWith("%")) {
+				// If there is a copyright, but it starts with %, then check the default
+				// language for a copyright
+				String copyrightProperty = iu.getCopyright().getBody().substring(1);
+				if (iu.getProperty("df_LT." + copyrightProperty) == null)
+					error(iu, "[ERROR] " + iu.getId() + " has no copyright");
+			}
+		}
+	}
+
+	public void preAnalysis(IMetadataRepository repository) {
+		// do nothing
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/HostCheckAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/HostCheckAnalyzer.java
new file mode 100644
index 0000000..4930df9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/HostCheckAnalyzer.java
@@ -0,0 +1,55 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that for each fragment the host can be resolved.
+ * Currently this service only checks requirements with the namespace "osgi.bundle"
+ */
+public class HostCheckAnalyzer extends IUAnalyzer {
+
+	private IMetadataRepository repository;
+
+	public void analyzeIU(IInstallableUnit iu) {
+		if (iu instanceof IInstallableUnitFragment) {
+			IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
+			Collection<IRequirement> hosts = fragment.getHost();
+			for (IRequirement req : hosts) {
+				IMatchExpression<IInstallableUnit> hostMatch = req.getMatches();
+				String namespace = RequiredCapability.extractNamespace(hostMatch);
+				if ("osgi.bundle".equals(namespace)) {
+					String name = RequiredCapability.extractName(hostMatch);
+					VersionRange range = RequiredCapability.extractRange(hostMatch);
+					IQueryResult<IInstallableUnit> results = repository.query(QueryUtil.createIUQuery(name, range), new NullProgressMonitor());
+					if (results.isEmpty()) {
+						error(iu, "IU Fragment: " + iu.getId() + " cannot find host" + name + " : " + range);
+						return;
+					}
+				}
+			}
+		}
+
+	}
+
+	public void preAnalysis(IMetadataRepository repository) {
+		this.repository = repository;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java
new file mode 100644
index 0000000..79d53cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/IUCounting.java
@@ -0,0 +1,58 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IIUAnalyzer;
+
+/**
+ * This service just counts the total number of IUs
+ */
+public class IUCounting implements IIUAnalyzer {
+
+	int totalIUs = 0;
+	int totalGroups = 0;
+	int totalFragments = 0;
+	int totalCategories = 0;
+
+	private boolean hasProperty(IInstallableUnit iu, String property) {
+		return Boolean.valueOf(iu.getProperty(property)).booleanValue();
+	}
+
+	public void analyzeIU(IInstallableUnit iu) {
+		totalIUs++;
+		if (hasProperty(iu, InstallableUnitDescription.PROP_TYPE_FRAGMENT))
+			totalFragments++;
+		if (hasProperty(iu, InstallableUnitDescription.PROP_TYPE_GROUP))
+			totalGroups++;
+		if (hasProperty(iu, InstallableUnitDescription.PROP_TYPE_CATEGORY))
+			totalCategories++;
+	}
+
+	public IStatus postAnalysis() {
+		System.out.println("Total IUs: " + totalIUs);
+		System.out.println("  Total Groups: " + totalGroups);
+		System.out.println("  Total Fragments: " + totalFragments);
+		System.out.println("  Total Categories: " + totalCategories);
+		return null;
+	}
+
+	public void preAnalysis(IMetadataRepository repo) {
+		totalIUs = 0;
+		totalGroups = 0;
+		totalFragments = 0;
+		totalCategories = 0;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java
new file mode 100644
index 0000000..9931553
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/LicenseAnalyzer.java
@@ -0,0 +1,52 @@
+/******************************************************************************* 
+ * Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+ * program and the accompanying materials are made available under the terms of
+ * the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   EclipseSource - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import org.eclipse.equinox.p2.metadata.ILicense;
+
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that each IU has a license.
+ */
+public class LicenseAnalyzer extends IUAnalyzer {
+
+	public void analyzeIU(IInstallableUnit iu) {
+		if (Boolean.valueOf(iu.getProperty(InstallableUnitDescription.PROP_TYPE_GROUP)).booleanValue()) {
+			Collection<ILicense> licenses = iu.getLicenses();
+			if (iu.getLicenses() == null || licenses.size() == 0) {
+				// If there is no license then this is an error
+				error(iu, "[ERROR] " + iu.getId() + " has no license");
+				return;
+			} else if (licenses.iterator().next().getBody().length() == 0) {
+				error(iu, "[ERROR] " + iu.getId() + " has no license");
+				return;
+			}
+			for (ILicense license : licenses) {
+				if (license.getBody().startsWith("%")) {
+					String licenseProperty = license.getBody().substring(1);
+					if (iu.getProperty("df_LT." + licenseProperty) == null) {
+						error(iu, "[ERROR] " + iu.getId() + " has no license");
+					}
+				}
+			}
+		}
+	}
+
+	public void preAnalysis(IMetadataRepository repository) {
+		// Do nothing
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UniqueIUAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UniqueIUAnalyzer.java
new file mode 100644
index 0000000..8e589bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UniqueIUAnalyzer.java
@@ -0,0 +1,38 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that each IU is unique in a given repository.
+ */
+public class UniqueIUAnalyzer extends IUAnalyzer {
+
+	Set<String> versionedNames = null;
+
+	public void analyzeIU(IInstallableUnit iu) {
+		// Create a unique name / version pair and cache it
+		String uniqueID = iu.getId() + ":" + iu.getVersion().toString();
+		if (versionedNames.contains(uniqueID)) {
+			error(iu, "[ERROR]" + iu.getId() + " with version: " + iu.getVersion() + " already exists in the repository");
+			return;
+		}
+		versionedNames.add(uniqueID);
+	}
+
+	public void preAnalysis(IMetadataRepository repo) {
+		versionedNames = new HashSet<String>();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UnzipFeatureJarAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UnzipFeatureJarAnalyzer.java
new file mode 100644
index 0000000..07b44f2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/UnzipFeatureJarAnalyzer.java
@@ -0,0 +1,46 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that each Feature Jar IU has the unzip touchpoint
+ */
+public class UnzipFeatureJarAnalyzer extends IUAnalyzer {
+
+	public void analyzeIU(IInstallableUnit iu) {
+		if (iu.getId().indexOf("feature.jar") > -1) {
+			Collection<ITouchpointData> touchpointData = iu.getTouchpointData();
+			if (touchpointData.size() == 0) {
+				error(iu, "[ERROR] No unzip touchpoint for: " + iu.getId());
+			} else {
+				boolean found = false;
+				for (ITouchpointData td : touchpointData) {
+					ITouchpointInstruction instruction = td.getInstruction("zipped");
+					if (instruction.getBody().equals("true"))
+						found = true;
+				}
+				if (!found) {
+					error(iu, "[ERROR] No unzip touchpoint for: " + iu.getId());
+				}
+			}
+		}
+
+	}
+
+	public void preAnalysis(IMetadataRepository repository) {
+		// Do nothing
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/VersionAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/VersionAnalyzer.java
new file mode 100644
index 0000000..a43a106
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/analyzer/VersionAnalyzer.java
@@ -0,0 +1,53 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.analyzer;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.tools.analyzer.IUAnalyzer;
+
+/**
+ * This service checks that each IU has a proper version number
+ *  1. No 0.0.0
+ *  2. No x.y.z.qualifier (each qualifier has been replaced)
+ */
+public class VersionAnalyzer extends IUAnalyzer {
+
+	public void analyzeIU(IInstallableUnit iu) {
+		if (iu.getVersion().equals(Version.emptyVersion)) {
+			error(iu, "[ERROR] IU: " + iu.getId() + " has not replaced its qualifiier");
+			return;
+		}
+		if (iu.getVersion().isOSGiCompatible()) {
+			String qualifier = toOSGiVersion(iu.getVersion()).getQualifier();
+			if (qualifier != null && qualifier.equals("qualifier")) {
+				error(iu, "[ERROR] IU: " + iu.getId() + " has not replaced its qualifiier");
+				return;
+			}
+		}
+	}
+
+	private static org.osgi.framework.Version toOSGiVersion(Version version) {
+		if (version == null)
+			return null;
+		if (version == Version.emptyVersion)
+			return org.osgi.framework.Version.emptyVersion;
+		if (version == Version.MAX_VERSION)
+			return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+
+		return new org.osgi.framework.Version(version.toString());
+	}
+
+	public void preAnalysis(IMetadataRepository repo) {
+		// Do nothing
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
index 0363e9c..49f3791 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/messages.properties
@@ -14,26 +14,27 @@ AbstractRepositoryTask_unableToFind=Unable to find: {0}
 CompositeRepository_composite_repository_exists=Composite repository already exists at location: {0}
 CompositeRepository_default_artifactRepo_name=Composite Artifact Repository
 CompositeRepository_default_metadataRepo_name=Composite Artifact Repository
-CompositeRepositoryApplication_failedComparator=Artifact repository failed test with comparator: {0}
+
+info_noMD5Infomation=No MD5 information available for the artifact [{0}].
+info_noMD5InRepository=The repository {0} does not contain MD5 information for artifact [{1}].
+warning_differentMD5=The repositories {0} and {1} have different MD5 sums for the artifact [{2}].
 
 no_artifactRepo_manager=Unable to acquire artifact repository manager service.
 no_metadataRepo_manager=Unable to acquire metadata repository manager service.
-no_package_admin=Unable to acquire package admin service.
 no_profile_registry=Unable to acquire profile registry service.
+no_provisioning_agent=Unable to acquire provisioning agent service.
 unable_to_process_uri=Unable to process as URI: {0}
-unable_to_start_exemplarysetup=Unable to start exemplarysetup bundle.
 unknown_repository_type=Repository is of an unknown type: {0}
+skippingInvalidFilter=Invalid filter format, skipping {0}.
 
 MirrorApplication_artifactDestinationNoSource=Destination artifact repository specified without a corresponding source artifact repository.
 MirrorApplication_metadataDestinationNoSource=Destination metadata repository specified without a corresponding source metadata repository.
-MirrorApplication_missingIU=Missing: {0}
-MirrorApplication_missingSourceForIUs=Unable to locate source repository for IUs
 MirrorApplication_no_IUs=No IUs specified and no IUs obtained from metadata repositories.
 MirrorApplication_set_source_repositories=Need to set the source repository location(s).
-MirrorApplication_validateAndMirrorProblems=Problems occurred during validation and mirroring
-ProcessRepo_location_not_url=Repository location {0} must be a URL.
+ProcessRepo_location_not_url=Repository location {0} must be a URI.
 ProcessRepo_must_be_local=Repository must be local: {0}
 
+
 SlicingOption_invalid_platform=Invalid platform filter format: {0}.
 SlicingOption_invalidFilterFormat=Invalid filter format: {0}
 exception_destinationNotModifiable = The destination repository must be modifiable: {0}.
@@ -42,7 +43,18 @@ exception_invalidSource=Invalid source repository location: {0}.
 exception_unableToRemoveRepo=Unable to remove artifact repository file: {0}.
 exception_notLocalFileRepo= {0} is not a local file based repository.
 exception_noEngineService=Unable to acquire engine service.
+exception_noPlannerService=Unable to acquire planner service.
+exception_loadingRepository=Exception while loading repository.
 exception_needIUsOrNonEmptyRepo=Need to specify either a non-empty source metadata repository or a valid list of IUs.
 exception_needDestinationRepo=Need to set the destination artifact repository location.
 exception_onlyOneComparator=Only one comparator should be defined.
-Repo2RunnableTask_errorTransforming=Error occurred while transforming repository.
\ No newline at end of file
+Repo2RunnableTask_errorTransforming=Error occurred while transforming repository: {0}.
+
+message_mirroringStatus = Messages while mirroring artifact descriptors.
+mirror_alreadyExists=Artifact: {0} already exists in repository: {1}.
+Mirroring_noMatchingDescriptor=Could not match descriptor for compare
+Mirroring_ValidationError=Error occurred while validating mirror.
+Mirroring_missingDescriptor=Missing descriptor: {0}.
+Mirroring_differentDescriptorProperty=Descriptor {0} has different properties for {1}, source: {2}, destination: {3}.
+
+invalidComparatorId={0} is not a valid comparator id.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IIUAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IIUAnalyzer.java
new file mode 100644
index 0000000..2e5ddc4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IIUAnalyzer.java
@@ -0,0 +1,38 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.repository.tools.analyzer;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+
+/**
+ * The IUAnalaysis Interface.  
+ * 
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * 
+ * Clients are encouraged to extend {@link IUAnalyzer}, an abstract class that implements
+ * this interface.
+ * 
+ * @since 2.0
+ * 
+ */
+public interface IIUAnalyzer {
+
+	public static final String ID = "org.eclipse.equinox.p2.repository.tools.verifier"; //$NON-NLS-1$
+
+	public void preAnalysis(IMetadataRepository repository);
+
+	public IStatus postAnalysis();
+
+	public void analyzeIU(IInstallableUnit iu);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IUAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IUAnalyzer.java
new file mode 100644
index 0000000..3da91b5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/analyzer/IUAnalyzer.java
@@ -0,0 +1,47 @@
+/******************************************************************************* 
+* Copyright (c) 2009,2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.repository.tools.analyzer;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.internal.repository.tools.Activator;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * An abstract base class for the Analyzer.  Clients are encouraged to extends this 
+ * class when defining IU Analysis extension points.
+ * @since 2.0
+ * 
+ */
+public abstract class IUAnalyzer implements IIUAnalyzer {
+
+	private List<IStatus> errors = null;
+	private String analyzerName;
+
+	public void setName(String name) {
+		this.analyzerName = name;
+	}
+
+	protected void error(IInstallableUnit iu, String error) {
+		if (errors == null)
+			errors = new ArrayList<IStatus>();
+		errors.add(new Status(IStatus.ERROR, Activator.ID, error));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.tools.verifier.IIUAnalysis#postAnalysis()
+	 */
+	public IStatus postAnalysis() {
+		if (errors == null || errors.size() == 0)
+			return Status.OK_STATUS;
+		return new MultiStatus(Activator.ID, IStatus.ERROR, errors.toArray(new IStatus[errors.size()]), analyzerName, null);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/ArtifactComparatorFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/ArtifactComparatorFactory.java
new file mode 100644
index 0000000..3faad2f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/ArtifactComparatorFactory.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *		Compeople AG (Stefan Liebig) - various ongoing maintenance
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.tools.comparator;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 2.0
+ */
+public class ArtifactComparatorFactory {
+	private static final String comparatorPoint = "org.eclipse.equinox.p2.artifact.repository.artifactComparators"; //$NON-NLS-1$
+	private static final String ATTR_ID = "id"; //$NON-NLS-1$
+	private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
+
+	public static IArtifactComparator getArtifactComparator(String comparatorID) {
+		IConfigurationElement[] extensions = RegistryFactory.getRegistry().getConfigurationElementsFor(comparatorPoint);
+
+		IConfigurationElement element = null;
+		if (comparatorID == null && extensions.length > 0) {
+			element = extensions[0]; //just take the first one
+		} else {
+			for (int i = 0; i < extensions.length; i++) {
+				if (extensions[i].getAttribute(ATTR_ID).equals(comparatorID)) {
+					element = extensions[i];
+					break;
+				}
+			}
+		}
+		if (element != null) {
+			try {
+				Object execExt = element.createExecutableExtension(ATTR_CLASS);
+				if (execExt instanceof IArtifactComparator)
+					return (IArtifactComparator) execExt;
+			} catch (Exception e) {
+				//fall through
+			}
+		}
+
+		if (comparatorID != null)
+			throw new IllegalArgumentException(NLS.bind(Messages.exception_comparatorNotFound, comparatorID));
+		throw new IllegalArgumentException(Messages.exception_noComparators);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/IArtifactComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/IArtifactComparator.java
new file mode 100644
index 0000000..f800917
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/repository/tools/comparator/IArtifactComparator.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.repository.tools.comparator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+
+/**
+ * @since 2.0
+ */
+public interface IArtifactComparator {
+
+	/**
+	 * Compare 2 equivalent IArtifactDescriptors from different repositories.
+	 * 
+	 * IArtifactDescriptors with the same id and version should represent the same 
+	 * set of bytes.  The comparator should ensure this is true and return an error
+	 * or warning otherwise.
+	 *
+	 * @param source - The source IArtifactRepository
+	 * @param sourceDescriptor - The IArtifactDescriptor from the source repository
+	 * @param destination - The target IArtifactRepository
+	 * @param destDescriptor - The IArtifactDescriptor from the target repository
+	 *
+	 * @return IStatus
+	 */
+	public IStatus compare(IArtifactRepository source, IArtifactDescriptor sourceDescriptor, IArtifactRepository destination, IArtifactDescriptor destDescriptor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java
index 59f8a2f..bd9d057 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AbstractRepositoryTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,31 +18,35 @@ import org.apache.tools.ant.*;
 import org.apache.tools.ant.types.FileSet;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.artifact.repository.ant.AntMirrorLog;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
 import org.eclipse.equinox.p2.internal.repository.tools.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 import org.eclipse.osgi.util.NLS;
 
 public abstract class AbstractRepositoryTask extends Task {
 	protected static final String ANT_PREFIX = "${"; //$NON-NLS-1$
 	protected AbstractApplication application;
-	protected List iuTasks = new ArrayList();
-	protected List sourceRepos = new ArrayList();
-	protected List destinations = new ArrayList();
+	protected List<IUDescription> iuTasks = new ArrayList<IUDescription>();
+	protected List<FileSet> sourceRepos = new ArrayList<FileSet>();
+	protected List<DestinationRepository> destinations = new ArrayList<DestinationRepository>();
 
-	protected void addMetadataSourceRepository(URI repoLocation) {
+	protected void addMetadataSourceRepository(URI repoLocation, boolean optional) {
 		RepositoryDescriptor source = new RepositoryDescriptor();
 		source.setLocation(repoLocation);
 		source.setKind(RepositoryDescriptor.KIND_METADATA);
+		source.setOptional(optional);
 		application.addSource(source);
 	}
 
-	protected void addArtifactSourceRepository(URI repoLocation) {
+	protected void addArtifactSourceRepository(URI repoLocation, boolean optional) {
 		RepositoryDescriptor source = new RepositoryDescriptor();
 		source.setLocation(repoLocation);
 		source.setKind(RepositoryDescriptor.KIND_ARTIFACT);
+		source.setOptional(optional);
 		application.addSource(source);
 	}
 
@@ -100,16 +104,24 @@ public abstract class AbstractRepositoryTask extends Task {
 	}
 
 	/*
+	 * Return the provisioning agent. Throw an exception if it cannot be obtained.
+	 */
+	public static IProvisioningAgent getAgent() throws BuildException {
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new BuildException(Messages.no_provisioning_agent);
+		return agent;
+	}
+
+	/*
 	 * Add source repositories to mirror from
 	 */
 	public void addConfiguredSource(RepositoryList sourceList) {
-		for (Iterator iter = sourceList.getRepositoryList().iterator(); iter.hasNext();) {
-			DestinationRepository repo = (DestinationRepository) iter.next();
+		for (DestinationRepository repo : sourceList.getRepositoryList()) {
 			application.addSource(repo.getDescriptor());
 		}
 
-		for (Iterator iter = sourceList.getFileSetList().iterator(); iter.hasNext();) {
-			FileSet fileSet = (FileSet) iter.next();
+		for (FileSet fileSet : sourceList.getFileSetList()) {
 			sourceRepos.add(fileSet);
 			// Added to the application later through prepareSourceRepos
 		}
@@ -122,14 +134,15 @@ public abstract class AbstractRepositoryTask extends Task {
 	protected void prepareSourceRepos() {
 		if (sourceRepos == null || sourceRepos.isEmpty())
 			return;
-		for (Iterator iter = sourceRepos.iterator(); iter.hasNext();) {
+		for (Iterator<FileSet> iter = sourceRepos.iterator(); iter.hasNext();) {
 			RepositoryFileSet fileset = (RepositoryFileSet) iter.next();
 
 			if (fileset.getRepoLocation() != null) {
-				//TODO depreciate
 				if (!fileset.getRepoLocation().startsWith(ANT_PREFIX)) {
-					addArtifactSourceRepository(fileset.getRepoLocationURI());
-					addMetadataSourceRepository(fileset.getRepoLocationURI());
+					if (fileset.isArtifact())
+						addArtifactSourceRepository(fileset.getRepoLocationURI(), fileset.isOptional());
+					if (fileset.isMetadata())
+						addMetadataSourceRepository(fileset.getRepoLocationURI(), fileset.isOptional());
 				}
 			} else if (fileset.getDir() != null) {
 				DirectoryScanner scanner = fileset.getDirectoryScanner(getProject());
@@ -143,12 +156,12 @@ public abstract class AbstractRepositoryTask extends Task {
 							uri = URIUtil.toJarURI(uri, null);
 						}
 						if (fileset.isBoth()) {
-							addArtifactSourceRepository(uri);
-							addMetadataSourceRepository(uri);
+							addArtifactSourceRepository(uri, fileset.isOptional());
+							addMetadataSourceRepository(uri, fileset.isOptional());
 						} else if (fileset.isArtifact())
-							addArtifactSourceRepository(uri);
+							addArtifactSourceRepository(uri, fileset.isOptional());
 						else if (fileset.isMetadata())
-							addMetadataSourceRepository(uri);
+							addMetadataSourceRepository(uri, fileset.isOptional());
 						else
 							throw new BuildException(NLS.bind(Messages.unknown_repository_type, uri));
 					}
@@ -158,22 +171,21 @@ public abstract class AbstractRepositoryTask extends Task {
 		sourceRepos.clear();
 	}
 
-	protected List prepareIUs() {
+	protected List<IInstallableUnit> prepareIUs() {
 		if (iuTasks == null || iuTasks.isEmpty())
 			return null;
 
 		IMetadataRepository repository = application.getCompositeMetadataRepository();
-		List result = new ArrayList();
-		for (Iterator iter = iuTasks.iterator(); iter.hasNext();) {
-			IUDescription iu = (IUDescription) iter.next();
-			Query iuQuery = iu.createQuery();
-			Collector collector = new Collector();
+		List<IInstallableUnit> result = new ArrayList<IInstallableUnit>();
+		for (IUDescription iu : iuTasks) {
+			IQuery<IInstallableUnit> iuQuery = iu.createQuery();
 
-			repository.query(iuQuery, collector, null);
+			Iterator<IInstallableUnit> queryResult = repository.query(iuQuery, null).iterator();
 
-			if (iu.isRequired() && collector.isEmpty())
+			if (iu.isRequired() && !queryResult.hasNext())
 				throw new BuildException(NLS.bind(Messages.AbstractRepositoryTask_unableToFind, iu.toString()));
-			result.addAll(collector.toCollection());
+			while (queryResult.hasNext())
+				result.add(queryResult.next());
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java
new file mode 100644
index 0000000..5c7d04d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/AntMirrorLog.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import org.eclipse.equinox.p2.internal.repository.mirroring.IArtifactMirrorLog;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+
+public class AntMirrorLog implements IArtifactMirrorLog {
+
+	private boolean consoleMessage = false;
+	private Method log;
+	private Object task;
+
+	public AntMirrorLog(Object task) throws NoSuchMethodException {
+		this.task = task;
+		try {
+			log = task.getClass().getMethod("log", new Class[] {String.class, int.class}); //$NON-NLS-1$
+		} catch (SecurityException e) {
+			exceptionOccurred(null, e);
+		}
+	}
+
+	public void log(IArtifactDescriptor descriptor, IStatus status) {
+		log(descriptor.toString(), status.getSeverity());
+		log(status);
+	}
+
+	public void log(IStatus status) {
+		int severity = status.getSeverity();
+		// Log the status message
+		log(status.getMessage(), severity);
+		// Log the exception if applicable
+		if (status.getException() != null)
+			log(status.getException().getMessage(), severity);
+
+		// Log any children of this status
+		IStatus[] nestedStatus = status.getChildren();
+		if (nestedStatus != null)
+			for (int i = 0; i < nestedStatus.length; i++)
+				log(nestedStatus[i]);
+	}
+
+	public void close() {
+		// nothing to do here
+	}
+
+	/*
+	 * Log a message to the Ant Task
+	 */
+	private void log(String message, int statusSeverity) {
+		try {
+			log.invoke(task, new Object[] {message, new Integer(mapLogLevels(statusSeverity))});
+		} catch (IllegalArgumentException e) {
+			exceptionOccurred(message, e);
+		} catch (IllegalAccessException e) {
+			exceptionOccurred(message, e);
+		} catch (InvocationTargetException e) {
+			exceptionOccurred(message, e);
+		}
+	}
+
+	/*
+	 * Show an error message if this the first time, and print status messages.
+	 */
+	private void exceptionOccurred(String message, Exception e) {
+		if (!consoleMessage) {
+			System.err.println(Messages.MirrorLog_Exception_Occurred);
+			e.printStackTrace(System.err);
+			System.err.println(Messages.MirrorLog_Console_Log);
+			consoleMessage = true;
+		}
+		if (message != null)
+			System.out.println(message);
+	}
+
+	/**
+	 * Copied from AntLogAdapter in pde build.
+	 */
+	private int mapLogLevels(int iStatusLevel) {
+		switch (iStatusLevel) {
+			case IStatus.ERROR :
+				return 0;
+			case IStatus.OK :
+				return 2;
+			case IStatus.INFO :
+				return 2;
+			case IStatus.WARNING :
+				return 1;
+			default :
+				return 1;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ArtifactDescription.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ArtifactDescription.java
new file mode 100644
index 0000000..ed43072
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ArtifactDescription.java
@@ -0,0 +1,75 @@
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.tools.ant.types.DataType;
+import org.apache.tools.ant.types.Parameter;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.repository.artifact.*;
+
+public class ArtifactDescription extends DataType {
+
+	private String classifier = null;
+	private String id = null;
+	private String version = null;
+	private String range = null;
+	private Map<String, String> properties = null;
+
+	public void setClassifier(String classifier) {
+		this.classifier = classifier;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public void setRange(String range) {
+		this.range = range;
+	}
+
+	public void addConfiguredProperty(Parameter property) {
+		if (properties == null)
+			properties = new HashMap<String, String>();
+
+		properties.put(property.getName(), property.getValue());
+	}
+
+	public String getClassifier() {
+		return classifier;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public IQuery<IArtifactKey> createKeyQuery() {
+		VersionRange keyRange = null;
+		if (range != null)
+			keyRange = new VersionRange(range);
+		else if (version != null) {
+			Version keyVersion = Version.parseVersion(version);
+			keyRange = new VersionRange(keyVersion, true, keyVersion, true);
+		}
+		return new ArtifactKeyQuery(classifier, id, keyRange);
+	}
+
+	public IQuery<IArtifactDescriptor> createDescriptorQuery() {
+		VersionRange keyRange = null;
+		if (range != null)
+			keyRange = new VersionRange(range);
+		else if (version != null) {
+			Version keyVersion = Version.parseVersion(version);
+			keyRange = new VersionRange(keyVersion, true, keyVersion, true);
+		}
+		return new ArtifactDescriptorQuery(id, keyRange, null, properties);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java
index 9ec3fc3..437a6dd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ComparatorDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2009 IBM Corporation and others.
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,13 +11,15 @@
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
 import java.io.File;
+import java.util.List;
 import org.apache.tools.ant.types.DataType;
 
 public class ComparatorDescription extends DataType {
 
-	DestinationRepository baseline;
-	String comparatorId;
-	File comparatorLog;
+	private DestinationRepository baseline;
+	private String comparatorId;
+	private File comparatorLog;
+	private List<ArtifactDescription> excludedArtifacts = null;
 
 	/*
 	 * Set the baseline repository to compare to
@@ -26,6 +28,10 @@ public class ComparatorDescription extends DataType {
 		this.baseline = value;
 	}
 
+	public void addConfiguredExclude(ElementList<ArtifactDescription> excludeList) {
+		excludedArtifacts = excludeList.getElements();
+	}
+
 	/*
 	 * Set the comparator to use
 	 */
@@ -51,4 +57,8 @@ public class ComparatorDescription extends DataType {
 	public File getComparatorLog() {
 		return comparatorLog;
 	}
+
+	public List<ArtifactDescription> getExcluded() {
+		return excludedArtifacts;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
index f1e8e9e..023ce05 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CompositeRepositoryTask.java
@@ -10,13 +10,18 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
-import java.util.Iterator;
+import java.net.URI;
+import java.net.URISyntaxException;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.internal.repository.tools.CompositeRepositoryApplication;
+import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
 
 public class CompositeRepositoryTask extends AbstractRepositoryTask {
+	private static String COMPOSITE_REMOVE = "p2.composite.artifact.repository.remove"; //$NON-NLS-1$
+	private static String COMPOSITE_ADD = "p2.composite.artifact.repository.add"; //$NON-NLS-1$
 
 	public CompositeRepositoryTask() {
 		application = new CompositeRepositoryApplication();
@@ -29,7 +34,7 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
 		try {
 			IStatus result = application.run(null);
 			if (result.matches(IStatus.ERROR)) {
-				throw new BuildException(TaskHelper.statusToString(result, null).toString());
+				throw new BuildException(TaskHelper.statusToString(result, IStatus.ERROR, null).toString());
 			}
 		} catch (ProvisionException e) {
 			throw new BuildException(e);
@@ -40,8 +45,7 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
 	 * Add the listed repositories to the composite repository
 	 */
 	public void addConfiguredAdd(RepositoryList list) {
-		for (Iterator iter = list.getRepositoryList().iterator(); iter.hasNext();) {
-			DestinationRepository repo = (DestinationRepository) iter.next();
+		for (DestinationRepository repo : list.getRepositoryList()) {
 			((CompositeRepositoryApplication) application).addChild(repo.getDescriptor());
 		}
 	}
@@ -50,8 +54,7 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
 	 * Remove the listed repositories from the composite repository
 	 */
 	public void addConfiguredRemove(RepositoryList list) {
-		for (Iterator iter = list.getRepositoryList().iterator(); iter.hasNext();) {
-			DestinationRepository repo = (DestinationRepository) iter.next();
+		for (DestinationRepository repo : list.getRepositoryList()) {
 			((CompositeRepositoryApplication) application).removeChild(repo.getDescriptor());
 		}
 	}
@@ -66,4 +69,35 @@ public class CompositeRepositoryTask extends AbstractRepositoryTask {
 	public void setValidate(String value) {
 		((CompositeRepositoryApplication) application).setComparator(value);
 	}
+
+	/*  p2.composite.artifact.repository.add
+	 *  p2.composite.artifact.repository.remove*/
+	public void setLocation(String value) {
+		super.setDestination(value);
+	}
+
+	/*  p2.composite.artifact.repository.add
+	 *  p2.composite.artifact.repository.remove*/
+	public void setChild(String value) throws URISyntaxException {
+		URI childURI = URIUtil.fromString(value);
+		RepositoryDescriptor repo = new RepositoryDescriptor();
+		repo.setLocation(childURI);
+
+		if (getTaskName().equals(COMPOSITE_ADD))
+			((CompositeRepositoryApplication) application).addChild(repo);
+		else if (getTaskName().equals(COMPOSITE_REMOVE))
+			((CompositeRepositoryApplication) application).removeChild(repo);
+	}
+
+	/*  p2.composite.artifact.repository.add */
+	public void setComparatorID(String value) {
+		if (value != null && !value.startsWith(ANT_PREFIX))
+			((CompositeRepositoryApplication) application).setComparator(value);
+	}
+
+	/*  p2.composite.artifact.repository.remove */
+	public void setAllChildren(String value) {
+		if (value != null && !value.startsWith(ANT_PREFIX))
+			((CompositeRepositoryApplication) application).setRemoveAll(Boolean.valueOf(value).booleanValue());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java
new file mode 100644
index 0000000..cac2fd1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/CreateCompositeArtifactRepositoryTask.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+
+/**
+ * Ant task for creating a new composite artifact repository.
+ */
+public class CreateCompositeArtifactRepositoryTask extends Task {
+
+	URI location; // desired location of the composite repository
+	String name = "Composite Artifact Repository";
+	boolean compressed = true;
+	boolean failOnExists = false; // should we fail if a repo already exists?
+	Map<String, String> properties = new HashMap<String, String>();
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() {
+		validate();
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) AbstractRepositoryTask.getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+		if (manager == null)
+			throw new BuildException("Unable to aquire artifact repository manager service.");
+
+		// remove the repo first.
+		manager.removeRepository(location);
+
+		// first try and load to see if one already exists at that location.
+		// if we have an already existing repository at that location, then throw an error
+		// if the user told us to
+		try {
+			IArtifactRepository repository = manager.loadRepository(location, null);
+			if (repository instanceof CompositeArtifactRepository) {
+				if (failOnExists)
+					throw new BuildException("Composite repository already exists at location: " + location);
+				return;
+			} else {
+				// we have a non-composite repo at this location. that is ok because we can co-exist.
+			}
+		} catch (ProvisionException e) {
+			// re-throw the exception if we got anything other than "repo not found"
+			if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
+				throw new BuildException("Exception while trying to read repository at: " + location, e);
+		}
+
+		// set the properties
+		if (compressed)
+			properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
+
+		// create the repository
+		try {
+			manager.createRepository(location, name, IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY, properties);
+		} catch (ProvisionException e) {
+			throw new BuildException("Error occurred while creating composite artifact repository.", e);
+		}
+	}
+
+	/*
+	 * Perform basic sanity checking of some of the parameters.
+	 */
+	private void validate() {
+		if (location == null)
+			throw new BuildException("Must specify repository location.");
+		if (name == null)
+			throw new BuildException("Must specify a repository name.");
+	}
+
+	/*
+	 * Set the name of the composite repository.
+	 */
+	public void setName(String value) {
+		name = value;
+	}
+
+	/*
+	 * Set the location of the repository.
+	 */
+	public void setLocation(String value) throws URISyntaxException {
+		location = URIUtil.fromString(value);
+	}
+
+	/*
+	 * Set a value indicating whether or not the repository should be compressed.
+	 */
+	public void setCompressed(boolean value) {
+		compressed = value;
+	}
+
+	/*
+	 * Set whether or not we should fail the operation if a repository
+	 * already exists at the location.
+	 */
+	public void setFailOnExists(boolean value) {
+		failOnExists = value;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ElementList.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ElementList.java
new file mode 100644
index 0000000..6968e42
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ElementList.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.tools.ant.types.DataType;
+
+public class ElementList<T> extends DataType {
+
+	private List<T> elements = new ArrayList<T>();
+
+	public void addConfigured(T element) {
+		elements.add(element);
+	}
+
+	public List<T> getElements() {
+		return elements;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
index 8be3de9..dc5ffe5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/IUDescription.java
@@ -12,10 +12,14 @@ package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
 import java.util.*;
 import org.apache.tools.ant.types.DataType;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.*;
-import org.eclipse.equinox.internal.provisional.p2.query.CompositeQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.internal.repository.tools.Activator;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
 
 /**
  * @since 1.0
@@ -29,6 +33,7 @@ public class IUDescription extends DataType {
 	private String version;
 	private String queryString;
 	private boolean required = true;
+	private String artifactFilter = null;
 
 	public IUDescription() {
 		super();
@@ -49,6 +54,17 @@ public class IUDescription extends DataType {
 			this.queryString = query;
 	}
 
+	public void setArtifacts(String filter) {
+		if (filter != null && !filter.startsWith(ANT_PREFIX))
+			this.artifactFilter = filter;
+	}
+
+	public Filter getArtifactFilter() throws InvalidSyntaxException {
+		if (artifactFilter != null)
+			return Activator.getBundleContext().createFilter(artifactFilter);
+		return null;
+	}
+
 	public void setRequired(boolean required) {
 		this.required = required;
 	}
@@ -87,29 +103,30 @@ public class IUDescription extends DataType {
 		return buffer.toString();
 	}
 
-	public Query createQuery() {
-		List queries = new ArrayList();
+	public IQuery<IInstallableUnit> createQuery() {
+		List<IQuery<IInstallableUnit>> queries = new ArrayList<IQuery<IInstallableUnit>>();
 		if (id != null) {
 			if (version == null || version.length() == 0) {
 				// Get the latest version of the iu
-				queries.add(new InstallableUnitQuery(id));
-				queries.add(new LatestIUVersionQuery());
+				queries.add(QueryUtil.createLatestQuery(QueryUtil.createIUQuery(id)));
 			} else {
 				Version iuVersion = Version.parseVersion(version);
-				queries.add(new InstallableUnitQuery(id, iuVersion));
+				queries.add(QueryUtil.createIUQuery(id, iuVersion));
 			}
 		}
 
-		Query iuQuery = processQueryString();
+		IQuery<IInstallableUnit> iuQuery = processQueryString();
 		if (iuQuery != null)
 			queries.add(iuQuery);
 
 		if (queries.size() == 1)
-			return (Query) queries.get(0);
-		return new CompositeQuery((Query[]) queries.toArray(new Query[queries.size()]));
+			return queries.get(0);
+
+		IQuery<IInstallableUnit> query = QueryUtil.createPipeQuery(queries);
+		return query;
 	}
 
-	private Query processQueryString() {
+	private IQuery<IInstallableUnit> processQueryString() {
 		if (queryString == null)
 			return null;
 		int startIdx = queryString.indexOf('[');
@@ -117,23 +134,25 @@ public class IUDescription extends DataType {
 		if (startIdx == -1 || endIdx == -1 || endIdx < startIdx)
 			return null;
 		String element = queryString.substring(0, startIdx);
-		Map attributes = processQueryAttributes(queryString.substring(startIdx + 1, endIdx));
+		Map<String, String> attributes = processQueryAttributes(queryString.substring(startIdx + 1, endIdx));
 		if (element.equals(QUERY_PROPERTY)) {
-			String name = (String) attributes.get(QUERY_NAME);
-			String value = (String) attributes.get(QUERY_VALUE);
+			String name = attributes.get(QUERY_NAME);
+			String value = attributes.get(QUERY_VALUE);
 			if (name == null)
 				return null;
-			return new IUPropertyQuery(name, value);
+			if (value == null)
+				value = QueryUtil.ANY;
+			return QueryUtil.createIUPropertyQuery(name, value);
 		}
 
 		return null;
 	}
 
-	private Map processQueryAttributes(String attributes) {
+	private Map<String, String> processQueryAttributes(String attributes) {
 		if (attributes == null || attributes.length() == 0)
-			return Collections.EMPTY_MAP;
+			return CollectionUtils.emptyMap();
 
-		Map result = new HashMap();
+		Map<String, String> result = new HashMap<String, String>();
 		int start = 0;
 		int idx = 0;
 		while ((idx = attributes.indexOf('@', start)) > -1) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java
new file mode 100644
index 0000000..d9ccbfc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorArtifactsTask.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
+import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
+
+/**
+ * Ant task for running the artifact repository mirroring application.
+ */
+public class MirrorArtifactsTask extends Task {
+	URI source;
+	URI destination;
+	String destinationName;
+	URI baseline; // location of known good repository for compare against (optional)
+	File mirrorLog; // file to log mirror output to (optional)
+	File comparatorLog; // file to comparator output to (optional)
+	String comparatorID; // specifies a comparator (optional)
+	String writeMode;
+	boolean compare = false;
+	boolean ignoreErrors = false;
+	boolean raw = false; // use raw artifact descriptors?
+	boolean verbose = false;
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() {
+		// Compare against if baseline specified
+		RepositoryDescriptor destinationRepo = new RepositoryDescriptor();
+		destinationRepo.setName(destinationName);
+		destinationRepo.setLocation(destination);
+		destinationRepo.setKind(RepositoryDescriptor.KIND_ARTIFACT);
+		destinationRepo.setFormat(source);
+		if (writeMode != null && writeMode.equals("clean")) //$NON-NLS-1$
+			destinationRepo.setAppend(false);
+
+		RepositoryDescriptor sourceRepo = new RepositoryDescriptor();
+		sourceRepo.setLocation(source);
+		sourceRepo.setKind(RepositoryDescriptor.KIND_ARTIFACT);
+
+		MirrorApplication app = new MirrorApplication();
+		app.addDestination(destinationRepo);
+		app.addSource(sourceRepo);
+		app.setRaw(raw);
+		app.setIgnoreErrors(ignoreErrors);
+		app.setVerbose(verbose);
+		app.setCompare(compare);
+		app.setComparatorID(comparatorID);
+		app.setBaseline(baseline);
+		if (comparatorLog != null)
+			app.setComparatorLog(comparatorLog);
+		if (mirrorLog != null)
+			app.setLog(mirrorLog);
+		else {
+			try {
+				app.setLog(new AntMirrorLog(this));
+			} catch (NoSuchMethodException e) {
+				//shouldn't happen
+			}
+		}
+
+		try {
+			app.run(null);
+		} catch (Exception e) {
+			throw new BuildException("Exception while running mirror application.", e);
+		}
+	}
+
+	/*
+	 * Set the location of the source.
+	 */
+	public void setSource(String value) {
+		try {
+			source = URIUtil.fromString(value);
+		} catch (URISyntaxException e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/*
+	 * Set the location of the destination.
+	 */
+	public void setDestination(String value) {
+		try {
+			destination = URIUtil.fromString(value);
+		} catch (URISyntaxException e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/*
+	 * Set the name of the destination repository.
+	 */
+	public void setDestinationName(String value) {
+		destinationName = value;
+	}
+
+	/*
+	 * Set the location of the baseline repository. (used in comparison)
+	 */
+	public void setBaseline(String value) {
+		try {
+			baseline = URIUtil.fromString(value);
+		} catch (URISyntaxException e) {
+			throw new BuildException(e);
+		}
+		compare = true;
+	}
+
+	/*
+	 * Set the identifier of the comparator to use.
+	 */
+	public void setComparatorID(String value) {
+		comparatorID = value;
+		compare = true;
+	}
+
+	/*
+	 * Set the location of the comparator log
+	 */
+	public void setComparatorLog(String value) {
+		comparatorLog = new File(value);
+	}
+
+	/*
+	 * Set the write mode. (e.g. clean or append)
+	 */
+	public void setWriteMode(String value) {
+		writeMode = value;
+	}
+
+	/*
+	 * Set the log location if applicable
+	 */
+	public void setLog(String value) {
+		mirrorLog = new File(value);
+	}
+
+	/*
+	 * Set whether or not the application should be calling a comparator when mirroring.
+	 */
+	public void setCompare(boolean value) {
+		compare = value;
+	}
+
+	/*
+	 * Set whether or not we should ignore errors when running the mirror application.
+	 */
+	public void setIgnoreErrors(boolean value) {
+		ignoreErrors = value;
+	}
+
+	/*
+	 * Set whether or not the the artifacts are raw.
+	 */
+	public void setRaw(boolean value) {
+		raw = value;
+	}
+
+	/*
+	 * Set whether or not the mirror application should be run in verbose mode.
+	 */
+	public void setVerbose(boolean value) {
+		verbose = value;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java
new file mode 100644
index 0000000..07f1bcb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorMetadataTask.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
+import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
+
+/**
+ * Ant task for running the metadata mirror application.
+ */
+public class MirrorMetadataTask extends Task {
+	URI source;
+	URI destination;
+	String destinationName;
+	String writeMode;
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() {
+		RepositoryDescriptor destinationRepo = new RepositoryDescriptor();
+		destinationRepo.setName(destinationName);
+		destinationRepo.setLocation(destination);
+		destinationRepo.setKind(RepositoryDescriptor.KIND_METADATA);
+		destinationRepo.setFormat(source);
+		if (writeMode != null && writeMode.equals("clean")) //$NON-NLS-1$
+			destinationRepo.setAppend(false);
+
+		RepositoryDescriptor sourceRepo = new RepositoryDescriptor();
+		sourceRepo.setLocation(source);
+		sourceRepo.setKind(RepositoryDescriptor.KIND_METADATA);
+
+		MirrorApplication app = new MirrorApplication();
+		app.addDestination(destinationRepo);
+		app.addSource(sourceRepo);
+		try {
+			IStatus result = app.run(null);
+			if (result.getSeverity() != IStatus.OK)
+				log(result.getMessage());
+		} catch (ProvisionException e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/*
+	 * Set the source location.
+	 */
+	public void setSource(String value) {
+		try {
+			source = URIUtil.fromString(value);
+		} catch (URISyntaxException e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/*
+	 * Set the destination location.
+	 */
+	public void setDestination(String value) {
+		try {
+			destination = URIUtil.fromString(value);
+		} catch (URISyntaxException e) {
+			throw new BuildException(e);
+		}
+	}
+
+	/*
+	 * Set the destination name.
+	 */
+	public void setDestinationName(String value) {
+		destinationName = value;
+	}
+
+	/*
+	 * Set the write mode for the application. (e.g. clean or append)
+	 */
+	public void setWriteMode(String value) {
+		writeMode = value;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
index fceaaf3..8221b13 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
@@ -11,18 +11,23 @@
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.List;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.artifact.repository.ant.AntMirrorLog;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.internal.repository.tools.Messages;
 import org.eclipse.equinox.p2.internal.repository.tools.MirrorApplication;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
 
 public class MirrorTask extends AbstractRepositoryTask {
 
 	private File mirrorLog; // file to log mirror output to (optional)
 	private ComparatorDescription comparator;
+	private boolean ignoreErrors = false;
 
 	public MirrorTask() {
 		application = new MirrorApplication();
@@ -47,15 +52,16 @@ public class MirrorTask extends AbstractRepositoryTask {
 				// Set comparator log
 				if (comparator.getComparatorLog() != null)
 					((MirrorApplication) application).setComparatorLog(comparator.getComparatorLog());
+				((MirrorApplication) application).setComparatorExclusions(createCompareExclusions());
 			}
 
 			prepareSourceRepos();
 			application.initializeRepos(null);
-			List ius = prepareIUs();
+			List<IInstallableUnit> ius = prepareIUs();
 			application.setSourceIUs(ius);
 			IStatus result = application.run(null);
-			if (result.matches(IStatus.ERROR))
-				throw new BuildException(TaskHelper.statusToString(result, null).toString());
+			if (!ignoreErrors && result.matches(IStatus.ERROR))
+				throw new BuildException(TaskHelper.statusToString(result, IStatus.ERROR, null).toString());
 		} catch (ProvisionException e) {
 			throw new BuildException(e);
 		} catch (NoSuchMethodException e) {
@@ -64,6 +70,21 @@ public class MirrorTask extends AbstractRepositoryTask {
 		}
 	}
 
+	private IQuery<IArtifactDescriptor> createCompareExclusions() {
+		if (comparator == null || comparator.getExcluded() == null)
+			return null;
+
+		List<ArtifactDescription> artifacts = comparator.getExcluded();
+		List<IQuery<IArtifactDescriptor>> queries = new ArrayList<IQuery<IArtifactDescriptor>>();
+		for (ArtifactDescription artifactDescription : artifacts)
+			queries.add(artifactDescription.createDescriptorQuery());
+
+		if (queries.size() == 1)
+			return queries.get(0);
+
+		return QueryUtil.<IArtifactDescriptor> createCompoundQuery(queries, false);
+	}
+
 	public SlicingOption createSlicingOptions() {
 		SlicingOption options = new SlicingOption();
 		((MirrorApplication) application).setSlicingOptions(options.getOptions());
@@ -91,6 +112,7 @@ public class MirrorTask extends AbstractRepositoryTask {
 	 * Set whether or not we should ignore errors when running the mirror application.
 	 */
 	public void setIgnoreErrors(boolean value) {
+		ignoreErrors = value;
 		((MirrorApplication) application).setIgnoreErrors(value);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
index 9e89473..aa069e1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ProcessRepoTask.java
@@ -12,7 +12,6 @@
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
 import java.io.File;
-import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.apache.tools.ant.BuildException;
@@ -20,7 +19,7 @@ import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.internal.repository.tools.*;
 import org.eclipse.osgi.util.NLS;
 
@@ -64,7 +63,8 @@ public class ProcessRepoTask extends Task {
 	public void execute() throws BuildException {
 		File file = URIUtil.toFile(repository);
 		if (file == null || !file.exists()) {
-			throw new BuildException(NLS.bind(Messages.ProcessRepo_must_be_local, repository.toString()));
+			throw new BuildException(NLS.bind(
+					Messages.ProcessRepo_must_be_local, repository.toString()));
 		}
 		if (pack | repack | signing != null) {
 			if (jarProcessor == null)
@@ -76,7 +76,8 @@ public class ProcessRepoTask extends Task {
 				jarProcessor.setStorepass(signing.storepass);
 				jarProcessor.setUnsign(signing.unsign);
 
-				if (signing.alias != null && signing.alias.length() > 0 && !signing.alias.startsWith("${")) //$NON-NLS-1$
+				if (signing.alias != null && signing.alias.length() > 0
+						&& !signing.alias.startsWith("${")) //$NON-NLS-1$
 					jarProcessor.setSign(true);
 			}
 			jarProcessor.setPack(pack);
@@ -103,9 +104,6 @@ public class ProcessRepoTask extends Task {
 		} catch (ProvisionException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
 		}
 	}
 
@@ -113,7 +111,8 @@ public class ProcessRepoTask extends Task {
 		try {
 			this.repository = URIUtil.fromString(repository);
 		} catch (URISyntaxException e) {
-			throw new IllegalArgumentException(NLS.bind(Messages.ProcessRepo_location_not_url, repository));
+			throw new IllegalArgumentException(NLS.bind(
+					Messages.ProcessRepo_location_not_url, repository));
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
new file mode 100644
index 0000000..447f605
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.util.*;
+import org.apache.tools.ant.BuildException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication;
+import org.eclipse.equinox.p2.internal.repository.tools.Messages;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Filter;
+import org.osgi.framework.InvalidSyntaxException;
+
+public class RemoveIUTask extends AbstractRepositoryTask {
+	private static final String CLASSIFIER = "classifier"; //$NON-NLS-1$
+	private static final String ID = "id"; //$NON-NLS-1$
+	private static final String VERSION = "version"; //$NON-NLS-1$
+
+	protected static class RemoveIUApplication extends AbstractApplication {
+		//Only need the application to reuse super's repo management.
+		public IStatus run(IProgressMonitor monitor) {
+			return null;
+		}
+
+		public void finalizeRepos() throws ProvisionException {
+			super.finalizeRepositories();
+		}
+	}
+
+	public RemoveIUTask() {
+		this.application = new RemoveIUApplication();
+	}
+
+	public void execute() throws BuildException {
+		try {
+			if (iuTasks == null || iuTasks.isEmpty())
+				return; //nothing to do
+
+			application.initializeRepos(null);
+			if (application.getCompositeMetadataRepository() == null)
+				throw new BuildException(Messages.AbstractApplication_no_valid_destinations); //need a repo
+
+			IMetadataRepository repository = application.getDestinationMetadataRepository();
+			IArtifactRepository artifacts = application.getDestinationArtifactRepository();
+
+			final Set<IInstallableUnit> toRemove = new HashSet<IInstallableUnit>();
+			for (IUDescription iu : iuTasks) {
+				IQuery<IInstallableUnit> iuQuery = iu.createQuery();
+
+				IQueryResult<IInstallableUnit> queryResult = repository.query(iuQuery, null);
+
+				if (queryResult.isEmpty())
+					getProject().log(NLS.bind(Messages.AbstractRepositoryTask_unableToFind, iu.toString()));
+				else {
+					for (Iterator<IInstallableUnit> iterator = queryResult.iterator(); iterator.hasNext();) {
+						IInstallableUnit unit = iterator.next();
+						Collection<IArtifactKey> keys = unit.getArtifacts();
+						Filter filter = null;
+						try {
+							filter = iu.getArtifactFilter();
+						} catch (InvalidSyntaxException e) {
+							getProject().log(NLS.bind(Messages.skippingInvalidFilter, iu.toString()));
+							continue;
+						}
+
+						//we will only remove the metadata if all artifacts were removed
+						boolean removeMetadata = (filter != null ? keys.size() > 0 : true);
+						for (IArtifactKey key : keys) {
+							if (filter == null) {
+								artifacts.removeDescriptor(key);
+							} else {
+								IArtifactDescriptor[] descriptors = artifacts.getArtifactDescriptors(key);
+								for (int j = 0; j < descriptors.length; j++) {
+									if (filter.match(createDictionary(descriptors[j]))) {
+										artifacts.removeDescriptor(descriptors[j]);
+									} else {
+										removeMetadata = false;
+									}
+								}
+							}
+						}
+						if (removeMetadata)
+							toRemove.add(unit);
+					}
+				}
+			}
+
+			if (toRemove.size() > 0) {
+				repository.removeInstallableUnits(toRemove);
+			}
+		} catch (ProvisionException e) {
+			throw new BuildException(e);
+		} finally {
+			try {
+				((RemoveIUApplication) application).finalizeRepos();
+			} catch (ProvisionException e) {
+				throw new BuildException(e);
+			}
+		}
+	}
+
+	private Dictionary<String, Object> createDictionary(IArtifactDescriptor descriptor) {
+		Hashtable<String, Object> result = new Hashtable<String, Object>(5);
+		result.putAll(descriptor.getProperties());
+		IArtifactKey key = descriptor.getArtifactKey();
+		result.put(CLASSIFIER, key.getClassifier());
+		result.put(ID, key.getId());
+		result.put(VERSION, key.getVersion());
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
index 5d03cb4..f0af711 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/Repo2RunnableTask.java
@@ -10,12 +10,16 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.util.List;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.internal.repository.tools.Messages;
 import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
 
 /**
  * Ant task which calls the "repo to runnable" application. This application takes an
@@ -28,6 +32,8 @@ import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable;
  */
 public class Repo2RunnableTask extends AbstractRepositoryTask {
 
+	private boolean failOnError = true;
+
 	/*
 	 * Constructor for the class. Create a new instance of the application
 	 * so we can populate it with attributes.
@@ -44,15 +50,23 @@ public class Repo2RunnableTask extends AbstractRepositoryTask {
 		try {
 			prepareSourceRepos();
 			application.initializeRepos(null);
-			List ius = prepareIUs();
+			List<IInstallableUnit> ius = prepareIUs();
 			if ((ius == null || ius.size() == 0) && !(application.hasArtifactSources() || application.hasMetadataSources()))
 				throw new BuildException(Messages.exception_needIUsOrNonEmptyRepo);
 			application.setSourceIUs(ius);
 			IStatus result = application.run(null);
-			if (result.matches(IStatus.ERROR))
+			if (failOnError && result.matches(IStatus.ERROR))
 				throw new ProvisionException(result);
 		} catch (ProvisionException e) {
-			throw new BuildException(Messages.Repo2RunnableTask_errorTransforming, e);
+			if (failOnError)
+				throw new BuildException(NLS.bind(Messages.Repo2RunnableTask_errorTransforming, null != e.getMessage() ? e.getMessage() : e.toString()), e);
+			/* else */
+			getProject().log(NLS.bind(Messages.Repo2RunnableTask_errorTransforming, null != e.getMessage() ? e.getMessage() : e.toString()), Project.MSG_WARN);
+			getProject().log(e.getMessage(), Project.MSG_WARN);
 		}
 	}
+
+	public void setFailOnError(boolean fail) {
+		this.failOnError = fail;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java
index c7e88dd..2abccae 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryFileSet.java
@@ -16,14 +16,15 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.types.FileSet;
 import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
 import org.eclipse.equinox.p2.internal.repository.tools.RepositoryDescriptor;
+import org.eclipse.equinox.p2.repository.IRepository;
 
 public class RepositoryFileSet extends FileSet {
 	public final static int TYPE_ARTIFACT = IRepository.TYPE_ARTIFACT;
 	public final static int TYPE_METADATA = IRepository.TYPE_METADATA;
 
 	private int kind = RepositoryDescriptor.TYPE_BOTH;
+	private boolean optional = false;
 	protected String myLocation = null;
 
 	public void setKind(String repoKind) {
@@ -34,6 +35,14 @@ public class RepositoryFileSet extends FileSet {
 		return kind;
 	}
 
+	public void setOptional(boolean optional) {
+		this.optional = optional;
+	}
+
+	public boolean isOptional() {
+		return optional;
+	}
+
 	public boolean isBoth() {
 		return kind == RepositoryDescriptor.TYPE_BOTH;
 	}
@@ -47,17 +56,14 @@ public class RepositoryFileSet extends FileSet {
 	}
 
 	public void setLocation(String value) {
-		// TODO depreciate 
 		myLocation = value;
 	}
 
 	public String getRepoLocation() {
-		// TODO depreciate 
 		return myLocation;
 	}
 
 	public URI getRepoLocationURI() {
-		// TODO depreciate 
 		try {
 			return RepositoryHelper.localRepoURIHelper(URIUtil.fromString(getRepoLocation()));
 		} catch (URISyntaxException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java
index a76d321..8f31ce3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RepositoryList.java
@@ -12,11 +12,12 @@ package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
 import java.util.ArrayList;
 import java.util.List;
+import org.apache.tools.ant.types.FileSet;
 
 public class RepositoryList extends RepositoryFileSet {
 	// TODO this class should extend DataType, currently RepoFileSet to support <source location="xxx" /> 
-	List repositories = new ArrayList();
-	List sourceFileSets = new ArrayList();
+	List<DestinationRepository> repositories = new ArrayList<DestinationRepository>();
+	List<FileSet> sourceFileSets = new ArrayList<FileSet>();
 
 	public DestinationRepository createRepository() {
 		DestinationRepository repo = new DestinationRepository();
@@ -30,11 +31,11 @@ public class RepositoryList extends RepositoryFileSet {
 		return fileSet;
 	}
 
-	public List getRepositoryList() {
+	public List<DestinationRepository> getRepositoryList() {
 		return repositories;
 	}
 
-	public List getFileSetList() {
+	public List<FileSet> getFileSetList() {
 		//TODO this should eventually be removed
 		sourceFileSets.add(this);
 		return sourceFileSets;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java
index 79b79ae..fe94b51 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/SlicingOption.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.p2.internal.repository.tools.tasks;
 
-import java.util.Dictionary;
+import java.util.Map;
 import java.util.StringTokenizer;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
@@ -56,7 +56,7 @@ public class SlicingOption extends Task {
 		StringTokenizer tok = new StringTokenizer(platformFilter, ","); //$NON-NLS-1$
 		if (tok.countTokens() != 3)
 			throw new BuildException(NLS.bind(Messages.SlicingOption_invalid_platform, platformFilter));
-		Dictionary filter = options.getFilter();
+		Map<String, String> filter = options.getFilter();
 		filter.put("osgi.os", tok.nextToken().trim()); //$NON-NLS-1$
 		filter.put("osgi.ws", tok.nextToken().trim()); //$NON-NLS-1$
 		filter.put("osgi.arch", tok.nextToken().trim()); //$NON-NLS-1$
@@ -68,7 +68,7 @@ public class SlicingOption extends Task {
 	}
 
 	public void setIncludeFeatures(boolean includeFeatures) {
-		Dictionary filter = options.getFilter();
+		Map<String, String> filter = options.getFilter();
 		filter.put("org.eclipse.update.install.features", String.valueOf(includeFeatures)); //$NON-NLS-1$
 		options.setFilter(filter);
 	}
@@ -76,7 +76,7 @@ public class SlicingOption extends Task {
 	public void setFilter(String filterString) {
 		if (filterString == null || filterString.trim().equals("")) //$NON-NLS-1$
 			return;
-		Dictionary filter = options.getFilter();
+		Map<String, String> filter = options.getFilter();
 		StringTokenizer tok = new StringTokenizer(filterString, ","); //$NON-NLS-1$
 		while (tok.hasMoreTokens()) {
 			String rule = tok.nextToken().trim();
@@ -100,6 +100,10 @@ public class SlicingOption extends Task {
 		options.followOnlyFilteredRequirements(onlyFiltered);
 	}
 
+	public void setLatestVersionOnly(boolean latest) {
+		options.latestVersionOnly(latest);
+	}
+
 	public SlicingOptions getOptions() {
 		return options;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java
index 8eeab46..72d051e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/TaskHelper.java
@@ -14,13 +14,20 @@ import org.eclipse.core.runtime.IStatus;
 
 public class TaskHelper {
 	public static StringBuffer statusToString(IStatus status, StringBuffer b) {
+		return statusToString(status, -1, b);
+	}
+
+	public static StringBuffer statusToString(IStatus status, int severities, StringBuffer b) {
 		IStatus[] nestedStatus = status.getChildren();
 		if (b == null)
 			b = new StringBuffer();
-		b.append(status.getMessage());
+		if (severities == -1 || (status.getSeverity() & severities) != 0) {
+			if (b.length() > 0)
+				b.append('\n');
+			b.append(status.getMessage());
+		}
 		for (int i = 0; i < nestedStatus.length; i++) {
-			b.append('\n');
-			b.append(statusToString(nestedStatus[i], b));
+			statusToString(nestedStatus[i], severities, b);
 		}
 		return b;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ValidateTask.java b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ValidateTask.java
new file mode 100644
index 0000000..21407c5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/ValidateTask.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.internal.repository.tools.tasks;
+
+import java.net.URI;
+import org.apache.tools.ant.BuildException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.internal.repository.tools.ArtifactRepositoryValidator;
+import org.eclipse.equinox.p2.internal.repository.tools.Messages;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+
+/**
+ * Ant task for validating the contents of a composite artifact repository.
+ */
+public class ValidateTask extends AbstractRepositoryTask {
+
+	private String comparatorID; // specifies the comparator we want to use.
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() {
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+		if (manager == null)
+			throw new BuildException(Messages.no_artifactRepo_manager);
+
+		ArtifactRepositoryValidator validator;
+		try {
+			validator = new ArtifactRepositoryValidator(comparatorID);
+		} catch (ProvisionException e) {
+			throw new BuildException(Messages.invalidComparatorId, e);
+		}
+
+		IArtifactRepository artifactRepository = null;
+		for (DestinationRepository repo : destinations) {
+			URI repoLocation = repo.getDescriptor().getRepoLocation();
+			try {
+				artifactRepository = manager.loadRepository(repoLocation, null);
+				IStatus result = validator.validateRepository(artifactRepository);
+				if (!result.isOK())
+					throw new BuildException(result.getMessage());
+			} catch (ProvisionException e) {
+				throw new BuildException(Messages.exception_loadingRepository, e);
+			}
+		}
+	}
+
+	/*
+	 * Set the repository location.
+	 */
+	public void setLocation(String value) {
+		super.setDestination(value);
+	}
+
+	/*
+	 * Set the ID of the comparator.
+	 */
+	public void setComparatorID(String value) {
+		comparatorID = value;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.repository/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/.project b/eclipse/plugins/org.eclipse.equinox.p2.repository/.project
index 120c042..ee1e670 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs
index fe9a0e7..ff91d95 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon May 04 16:59:04 EDT 2009
+#Tue Dec 22 19:20:12 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,17 +7,17 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -26,7 +26,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -88,7 +88,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 979e4e8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
index 973bfa1..2212b0d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
@@ -1,45 +1,58 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 2.0.2.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.persistence;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.metadata.repository",
+ org.eclipse.equinox.internal.p2.repository;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.internal.p2.repository.helpers;
+  x-friends:="org.eclipse.equinox.p2.artifact.repository,
+   org.eclipse.equinox.p2.exemplarysetup,
+   org.eclipse.equinox.p2.metadata.generator,
+   org.eclipse.equinox.p2.metadata.repository,
+   org.eclipse.equinox.p2.operations,
+   org.eclipse.equinox.p2.repository.tools,
+   org.eclipse.equinox.p2.ui,
+   org.eclipse.equinox.p2.updatesite",
+ org.eclipse.equinox.internal.provisional.p2.repository,
+ org.eclipse.equinox.p2.repository;version="2.0.0",
+ org.eclipse.equinox.p2.repository.artifact;version="2.0.0",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="2.0.0",
+ org.eclipse.equinox.p2.repository.metadata;version="2.0.0",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="2.0.0",
+ org.eclipse.equinox.p2.repository.spi;version="2.0.0"
 Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
+ org.eclipse.ecf.filetransfer,
  org.eclipse.ecf,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.registry;bundle-version="3.4.100",
+ org.eclipse.equinox.registry;bundle-version="3.3.0",
  org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
-Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
 Import-Package: javax.xml.parsers,
  org.eclipse.core.runtime.jobs,
  org.eclipse.core.runtime.preferences;version="3.2.0",
+ org.eclipse.equinox.internal.p2.core,
+ org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core,
+ org.eclipse.equinox.internal.provisional.p2.core.eventbus,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.security.storage,
+ org.eclipse.osgi.service.debug,
  org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.5.0",
+ org.osgi.framework;version="1.3.0",
  org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.service.prefs;version="1.1.1",
- org.osgi.util.tracker;version="1.4.2",
- org.w3c.dom,
+ org.osgi.service.prefs;version="1.0.0",
+ org.osgi.util.tracker;version="1.3.0",
  org.xml.sax,
  org.xml.sax.helpers
-Export-Package: org.eclipse.equinox.internal.p2.persistence;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.metadata.repository",
- org.eclipse.equinox.internal.p2.repository;
-  x-friends:="org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.repository.helpers;
-  x-friends:="org.eclipse.equinox.p2.artifact.repository,
-   org.eclipse.equinox.p2.exemplarysetup,
-   org.eclipse.equinox.p2.metadata.repository,
-   org.eclipse.equinox.p2.updatesite,
-   org.eclipse.equinox.p2.repository.tools,
-   org.eclipse.equinox.p2.ui",
- org.eclipse.equinox.internal.provisional.p2.repository;uses:="org.osgi.framework,org.eclipse.core.runtime",
- org.eclipse.equinox.internal.provisional.spi.p2.repository
+Service-Component: OSGI-INF/cacheManager.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml b/eclipse/plugins/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
new file mode 100644
index 0000000..d04c8df
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/OSGI-INF/cacheManager.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.repository">
+   <implementation class="org.eclipse.equinox.internal.p2.repository.CacheManagerComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.p2.repository.CacheManager"/>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository/build.properties
index 42c5dd3..82222b8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/build.properties
@@ -1,17 +1,10 @@
-###############################################################################
-#  Copyright (c) 2005, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#      IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               OSGI-INF/cacheManager.xml
 src.includes = about.html
+javacSource = 1.5
+javacTarget = jsr14
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.repository/pom.xml
new file mode 100644
index 0000000..3e15abe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.repository</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
index 0d654e3..c3d91c1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
@@ -10,13 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.persistence;
 
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+
 import java.io.*;
 import java.net.URI;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.parsers.ParserConfigurationException;
 import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 import org.xml.sax.*;
@@ -26,30 +28,24 @@ import org.xml.sax.*;
  */
 public class CompositeParser extends XMLParser implements XMLConstants {
 
-	private static final Version CURRENT_VERSION = new Version(1, 0, 0);
-	static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, new Version(2, 0, 0), false);
+	private static final Version CURRENT_VERSION = Version.createOSGi(1, 0, 0);
+	static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, Version.createOSGi(2, 0, 0), false);
 	private static final String REQUIRED_CAPABILITY_ELEMENT = "required"; //$NON-NLS-1$
 	private static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
 	String repositoryType;
 	private CompositeRepositoryState theState;
 
 	protected class ChildrenHandler extends AbstractHandler {
-		private ArrayList children;
+		private ArrayList<URI> children;
 
 		public ChildrenHandler(AbstractHandler parentHandler, Attributes attributes) {
 			super(parentHandler, CHILDREN_ELEMENT);
 			String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
-			children = (size != null ? new ArrayList(new Integer(size).intValue()) : new ArrayList(4));
+			children = (size != null ? new ArrayList<URI>(new Integer(size).intValue()) : new ArrayList<URI>(4));
 		}
 
 		public URI[] getChildren() {
-			int size = children.size();
-			URI[] result = new URI[size];
-			int i = 0;
-			for (Iterator it = children.iterator(); it.hasNext(); i++) {
-				result[i] = (URI) it.next();
-			}
-			return result;
+			return children.toArray(new URI[children.size()]);
 		}
 
 		public void startElement(String name, Attributes attributes) {
@@ -67,9 +63,9 @@ public class CompositeParser extends XMLParser implements XMLConstants {
 
 		URI currentRepo = null;
 
-		private List repos;
+		private List<URI> repos;
 
-		public ChildHandler(AbstractHandler parentHandler, Attributes attributes, List repos) {
+		public ChildHandler(AbstractHandler parentHandler, Attributes attributes, List<URI> repos) {
 			super(parentHandler, CHILD_ELEMENT);
 			String[] values = parseAttributes(attributes, required, optional);
 			this.repos = repos;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java
index 02319fb..2a5b167 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryIO.java
@@ -10,12 +10,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.persistence;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.io.*;
 import java.net.URL;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.Activator;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java
index 83f7795..8a5fe98 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeRepositoryState.java
@@ -24,7 +24,7 @@ public class CompositeRepositoryState {
 	private String provider;
 	private String description;
 	private URI location;
-	private Map properties;
+	private Map<String, String> properties;
 	private URI[] children;
 
 	public void setName(String value) {
@@ -75,11 +75,11 @@ public class CompositeRepositoryState {
 		return location;
 	}
 
-	public void setProperties(Map value) {
+	public void setProperties(Map<String, String> value) {
 		properties = value;
 	}
 
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		return properties;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java
index 26dd670..81d064f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeWriter.java
@@ -10,11 +10,12 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.persistence;
 
+import org.eclipse.equinox.p2.metadata.Version;
+
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
 
 /*
  * Class used to persist a composite repository.
@@ -22,7 +23,7 @@ import org.eclipse.equinox.internal.provisional.p2.core.Version;
 public class CompositeWriter extends XMLWriter implements XMLConstants {
 
 	private static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
-	private static final Version CURRENT_VERSION = new Version(1, 0, 0);
+	private static final Version CURRENT_VERSION = Version.createOSGi(1, 0, 0);
 
 	public CompositeWriter(OutputStream output, String type) throws UnsupportedEncodingException {
 		super(output, new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(type, CURRENT_VERSION)});
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java
index b742715..c0849e3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLConstants.java
@@ -39,6 +39,10 @@ public interface XMLConstants {
 	public static final String VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
 	public static final String VERSION_RANGE_ATTRIBUTE = "range"; //$NON-NLS-1$
 	public static final String NAMESPACE_ATTRIBUTE = "namespace"; //$NON-NLS-1$
+	public static final String MATCH_ATTRIBUTE = "match"; //$NON-NLS-1$
+	public static final String MATCH_PARAMETERS_ATTRIBUTE = "matchParameters"; //$NON-NLS-1$
+	public static final String MIN_ATTRIBUTE = "min"; //$NON-NLS-1$
+	public static final String MAX_ATTRIBUTE = "max"; //$NON-NLS-1$
 	public static final String CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
 	public static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
 	public static final String PROVIDER_ATTRIBUTE = "provider"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
index 11fc7fe..f34da70 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2011 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,11 +16,10 @@ import java.util.StringTokenizer;
 import javax.xml.parsers.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.internal.p2.core.StringPool;
 import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleContext;
 import org.osgi.util.tracker.ServiceTracker;
@@ -44,7 +43,6 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 	protected MultiStatus status = null; // accumulation of non-fatal errors
 	protected Locator locator = null; // document locator, if supported by the parser
 
-	protected StringPool stringPool = new StringPool();//used to eliminate string duplication
 	private IProgressMonitor monitor;
 
 	private static ServiceTracker xmlTracker = null;
@@ -62,14 +60,6 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 		return (status != null ? status : Status.OK_STATUS);
 	}
 
-	/**
-	 * Returns the canonical form of a string. Used to eliminate duplicate equal 
-	 * strings.
-	 */
-	protected String canonicalize(String string) {
-		return stringPool == null ? string : stringPool.add(string);
-	}
-
 	public boolean isValidXML() {
 		return (status == null || !status.matches(IStatus.ERROR | IStatus.CANCEL));
 	}
@@ -320,7 +310,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 			String[] result = new String[required.length + optional.length];
 			for (int i = 0; i < attributes.getLength(); i += 1) {
 				String name = attributes.getLocalName(i);
-				String value = canonicalize(attributes.getValue(i).trim());
+				String value = attributes.getValue(i).trim().intern();
 				int j;
 				if ((j = indexOf(required, name)) >= 0) {
 					result[j] = value;
@@ -454,7 +444,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 			parseAttributes(attributes, noAttributes, noAttributes);
 		}
 
-		public TextHandler(AbstractHandler parent, String elementName, Attributes attributes, List texts) {
+		public TextHandler(AbstractHandler parent, String elementName, Attributes attributes, List<String> texts) {
 			super(parent, elementName);
 			parseAttributes(attributes, noAttributes, noAttributes);
 		}
@@ -468,7 +458,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 		}
 
 		protected void processCharacters(String data) {
-			this.text = canonicalize(data);
+			this.text = data == null ? null : data.intern();
 		}
 
 	}
@@ -682,7 +672,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants {
 
 	public VersionRange checkVersionRange(String element, String attribute, String value) {
 		try {
-			if (value != null && !value.equals("0.0.0")) //$NON-NLS-1$
+			if (value != null)
 				return new VersionRange(value);
 		} catch (IllegalArgumentException iae) {
 			invalidAttributeValue(element, attribute, value);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
index 8df1dd8..af517d1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java
@@ -10,9 +10,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.persistence;
 
+import org.eclipse.equinox.p2.metadata.Version;
+
 import java.io.*;
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import java.util.Map.Entry;
 
 public class XMLWriter implements XMLConstants {
 
@@ -51,7 +53,7 @@ public class XMLWriter implements XMLConstants {
 		}
 	}
 
-	private Stack elements; // XML elements that have not yet been closed
+	private Stack<String> elements; // XML elements that have not yet been closed
 	private boolean open; // Can attributes be added to the current element?
 	private String indent; // used for each level of indentation
 
@@ -60,7 +62,7 @@ public class XMLWriter implements XMLConstants {
 	public XMLWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException {
 		this.pw = new PrintWriter(new OutputStreamWriter(output, "UTF8"), false); //$NON-NLS-1$
 		println(ProcessingInstruction.XML_UTF8);
-		this.elements = new Stack();
+		this.elements = new Stack<String>();
 		this.open = false;
 		this.indent = "  "; //$NON-NLS-1$
 		if (piElements != null) {
@@ -101,7 +103,7 @@ public class XMLWriter implements XMLConstants {
 		if (this.elements.empty()) {
 			throw new EndWithoutStartError();
 		}
-		String name = (String) this.elements.pop();
+		String name = this.elements.pop();
 		if (this.open) {
 			println("/>"); //$NON-NLS-1$
 		} else {
@@ -217,17 +219,16 @@ public class XMLWriter implements XMLConstants {
 		this.pw.flush();
 	}
 
-	public void writeProperties(Map properties) {
+	public void writeProperties(Map<String, String> properties) {
 		writeProperties(PROPERTIES_ELEMENT, properties);
 	}
 
-	public void writeProperties(String propertiesElement, Map properties) {
+	public void writeProperties(String propertiesElement, Map<String, String> properties) {
 		if (properties != null && properties.size() > 0) {
 			start(propertiesElement);
 			attribute(COLLECTION_SIZE_ATTRIBUTE, properties.size());
-			for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
-				String name = (String) iter.next();
-				writeProperty(name, (String) properties.get(name));
+			for (Entry<String, String> entry : properties.entrySet()) {
+				writeProperty(entry.getKey(), entry.getValue());
 			}
 			end(propertiesElement);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
index f71201d..695e287 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the copyright holder
- * listed above, as the Initial Contributor under such license. The text of
- * such license is available at www.eclipse.org.
+ * Copyright (c) 2009 Cloudsmith Inc and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ * 	Cloudsmith Inc - initial API and implementation
+ * 	IBM Corporation - ongoing development
+ * 	Genuitec - Bug 291926
  ******************************************************************************/
-
 package org.eclipse.equinox.internal.p2.repository;
 
 import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
@@ -149,8 +153,9 @@ public class Activator implements BundleActivator {
 		if (bundles != null && bundles.length > 0) {
 			for (int i = 0; i < bundles.length; i++) {
 				try {
-					if ((bundles[0].getState() & Bundle.INSTALLED) == 0) {
-						bundles[0].start();
+					if ((bundles[i].getState() & Bundle.INSTALLED) == 0) {
+						bundles[i].start(Bundle.START_ACTIVATION_POLICY);
+						bundles[i].start(Bundle.START_TRANSIENT);
 						return true;
 					}
 				} catch (BundleException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
new file mode 100644
index 0000000..a772bee
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
@@ -0,0 +1,359 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc - additional implementation
+ *     Sonatype Inc - additional implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository;
+
+import java.io.*;
+import java.net.URI;
+import java.util.EventObject;
+import java.util.HashSet;
+import org.eclipse.core.runtime.*;
+import org.eclipse.ecf.filetransfer.UserCancelledException;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
+import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * A class to manage metadata cache files. Creating the cache files will place
+ * the file in the AgentData location in a cache directory.
+ * 
+ * Using the bus listeners will allow the manager to listen for repository
+ * events. When a repository is removed, it will remove the cache file if one
+ * was created for the repository.
+ */
+public class CacheManager {
+	/**
+	 * Service name for the internal cache manager service.
+	 */
+	public static final String SERVICE_NAME = CacheManager.class.getName();
+
+	private final IAgentLocation agentLocation;
+
+	/**
+	 * IStateful implementation of BufferedOutputStream. Class is used to get the status from
+	 * a download operation.
+	 */
+	private static class StatefulStream extends BufferedOutputStream implements IStateful {
+		private IStatus status;
+
+		public StatefulStream(OutputStream stream) {
+			super(stream);
+		}
+
+		public IStatus getStatus() {
+
+			return status;
+		}
+
+		public void setStatus(IStatus aStatus) {
+			status = aStatus;
+		}
+
+	}
+
+	public CacheManager(IAgentLocation agentLocation) {
+		this.agentLocation = agentLocation;
+	}
+
+	private static SynchronousProvisioningListener busListener;
+	private static final String DOWNLOADING = "downloading"; //$NON-NLS-1$
+	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
+	private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
+
+	private final HashSet<String> knownPrefixes = new HashSet<String>(5);
+
+	/**
+	 * Returns a hash of the repository location.
+	 */
+	private int computeHash(URI repositoryLocation) {
+		return repositoryLocation.hashCode();
+	}
+
+	/**
+	 * Returns a local cache file with the contents of the given remote location,
+	 * or <code>null</code> if a local cache could not be created.
+	 * 
+	 * @param repositoryLocation The remote location to be cached
+	 * @param prefix The prefix to use when creating the cache file
+	 * @param monitor a progress monitor
+	 * @return A {@link File} object pointing to the cache file or <code>null</code>
+	 * if the location is not a repository.
+	 * @throws FileNotFoundException if neither jar nor xml index file exists at given location 
+	 * @throws AuthenticationFailedException if jar not available and xml causes authentication fail
+	 * @throws IOException on general IO errors
+	 * @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
+	 * @throws OperationCanceledException - if user canceled
+	 */
+	public File createCache(URI repositoryLocation, String prefix, IProgressMonitor monitor) throws IOException, ProvisionException {
+
+		SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
+		try {
+			knownPrefixes.add(prefix);
+			File cacheFile = getCache(repositoryLocation, prefix);
+			URI jarLocation = URIUtil.append(repositoryLocation, prefix + JAR_EXTENSION);
+			URI xmlLocation = URIUtil.append(repositoryLocation, prefix + XML_EXTENSION);
+			int hashCode = computeHash(repositoryLocation);
+
+			// Knowing if cache is stale is complicated by the fact that a jar could have been 
+			// produced after an xml index (and vice versa), and by the need to capture any
+			// errors, as these needs to be reported to the user as something meaningful - instead of
+			// just a general "can't read repository".
+			// (Previous impl of stale checking ignored errors, and caused multiple round-trips)
+			boolean stale = true;
+			long lastModified = 0L;
+			String name = null;
+			String useExtension = JAR_EXTENSION;
+			URI remoteFile = jarLocation;
+
+			if (cacheFile != null) {
+				lastModified = cacheFile.lastModified();
+				name = cacheFile.getName();
+			}
+			// get last modified on jar
+			long lastModifiedRemote = 0L;
+			// bug 269588 - server may return 0 when file exists, so extra flag is needed
+			boolean useJar = true;
+			try {
+				lastModifiedRemote = getTransport().getLastModified(jarLocation, submonitor.newChild(1));
+				if (lastModifiedRemote <= 0)
+					LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + jarLocation)); //$NON-NLS-1$
+			} catch (AuthenticationFailedException e) {
+				// it is not meaningful to continue - the credentials are for the server
+				// do not pass the exception - it gives no additional meaningful user information
+				throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
+			} catch (CoreException e) {
+				useJar = false;
+				// give up on a timeout - if we did not get a 404 on the jar, we will just prolong the pain
+				// by (almost certainly) also timing out on the xml.
+				if (e.getStatus() != null && e.getStatus().getException() != null) {
+					Throwable ex = e.getStatus().getException();
+					if (ex.getClass() == java.net.SocketTimeoutException.class)
+						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), ex));
+				}
+			} catch (OperationCanceledException e) {
+				// must pass this on
+				throw e;
+			} catch (Exception e) {
+				// not ideal, just skip the jar on error, and try the xml instead - report errors for
+				// the xml.
+				useJar = false;
+			}
+			if (submonitor.isCanceled())
+				throw new OperationCanceledException();
+
+			if (useJar) {
+				// There is a jar, and it should be used - cache is stale if it is xml based or
+				// if older (irrespective of jar or xml).
+				// Bug 269588 - also stale if remote reports 0
+				stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(XML_EXTENSION) || lastModifiedRemote <= 0);
+			} else {
+				// Also need to check remote XML file, and handle cancel, and errors
+				// (Status is reported based on finding the XML file as giving up on certain errors
+				// when checking for the jar may not be correct).
+				try {
+					lastModifiedRemote = getTransport().getLastModified(xmlLocation, submonitor.newChild(1));
+					// if lastModifiedRemote is 0 - something is wrong in the communication stack, as 
+					// a FileNotFound exception should have been thrown.
+					// bug 269588 - server may return 0 when file exists - site is not correctly configured
+					if (lastModifiedRemote <= 0)
+						LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Server returned lastModified <= 0 for " + xmlLocation)); //$NON-NLS-1$
+
+				} catch (UserCancelledException e) {
+					throw new OperationCanceledException();
+				} catch (FileNotFoundException e) {
+					throw new FileNotFoundException(NLS.bind(Messages.CacheManager_Neither_0_nor_1_found, jarLocation, xmlLocation));
+				} catch (AuthenticationFailedException e) {
+					// do not pass the exception, it provides no additional meaningful user information
+					throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.CacheManager_AuthenticationFaileFor_0, repositoryLocation), null));
+				} catch (CoreException e) {
+					IStatus status = e.getStatus();
+					if (status == null)
+						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_FailedCommunicationWithRepo_0, repositoryLocation), e));
+					else if (status.getException() instanceof FileNotFoundException)
+						throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, status.getMessage(), null));
+					throw new ProvisionException(status);
+
+				}
+				// There is an xml, and it should be used - cache is stale if it is jar based or
+				// if older (irrespective of jar or xml).
+				// bug 269588 - server may return 0 when file exists - assume it is stale
+				stale = lastModifiedRemote > lastModified || (name != null && name.endsWith(JAR_EXTENSION) || lastModifiedRemote <= 0);
+				useExtension = XML_EXTENSION;
+				remoteFile = xmlLocation;
+			}
+
+			if (!stale)
+				return cacheFile;
+
+			// The cache is stale or missing, so we need to update it from the remote location
+			cacheFile = new File(getCacheDirectory(), prefix + hashCode + useExtension);
+			updateCache(cacheFile, remoteFile, lastModifiedRemote, submonitor);
+			return cacheFile;
+		} finally {
+			submonitor.done();
+		}
+	}
+
+	/**
+	 * Deletes the local cache file(s) for the given repository
+	 * @param repositoryLocation
+	 */
+	void deleteCache(URI repositoryLocation) {
+		for (String prefix : knownPrefixes) {
+			File[] cacheFiles = getCacheFiles(repositoryLocation, prefix);
+			for (int i = 0; i < cacheFiles.length; i++) {
+				// delete the cache file if it exists
+				safeDelete(cacheFiles[i]);
+				// delete a resumable download if it exists
+				safeDelete(new File(new File(cacheFiles[i].getParentFile(), DOWNLOADING), cacheFiles[i].getName()));
+			}
+		}
+	}
+
+	/**
+	 * Determines the local file path of the repository's cache file.
+	 * @param repositoryLocation The location to compute the cache for
+	 * @param prefix The prefix to use for this location
+	 * @return A {@link File} pointing to the cache file or <code>null</code> if
+	 * the cache file does not exist.
+	 */
+	protected File getCache(URI repositoryLocation, String prefix) {
+		File[] files = getCacheFiles(repositoryLocation, prefix);
+		if (files[0].exists())
+			return files[0];
+		return files[1].exists() ? files[1] : null;
+	}
+
+	/**
+	 * Returns the file corresponding to the data area to be used by the cache manager.
+	 */
+	protected File getCacheDirectory() {
+		return URIUtil.toFile(agentLocation.getDataArea(Activator.ID + "/cache/")); //$NON-NLS-1$
+	}
+
+	/**
+	 * Determines the local file paths of the repository's potential cache files.
+	 * @param repositoryLocation The location to compute the cache for
+	 * @param prefix The prefix to use for this location
+	 * @return A {@link File} array with the cache files for JAR and XML extensions.
+	 */
+	private File[] getCacheFiles(URI repositoryLocation, String prefix) {
+		File[] files = new File[2];
+		File dataAreaFile = getCacheDirectory();
+		int hashCode = computeHash(repositoryLocation);
+		files[0] = new File(dataAreaFile, prefix + hashCode + JAR_EXTENSION);
+		files[1] = new File(dataAreaFile, prefix + hashCode + XML_EXTENSION);
+		return files;
+	}
+
+	private RepositoryTransport getTransport() {
+		return RepositoryTransport.getInstance();
+	}
+
+	/**
+	 * Adds a {@link SynchronousProvisioningListener} to the event bus for
+	 * deleting cache files when the corresponding repository is deleted.
+	 */
+	private void registerRepoEventListener(IProvisioningEventBus eventBus) {
+		if (busListener == null) {
+			busListener = new SynchronousProvisioningListener() {
+				public void notify(EventObject o) {
+					if (o instanceof RepositoryEvent) {
+						RepositoryEvent event = (RepositoryEvent) o;
+						if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) {
+							deleteCache(event.getRepositoryLocation());
+						}
+					}
+				}
+			};
+		}
+		// the bus could have disappeared and is now back again - so do this every time
+		eventBus.addListener(busListener);
+	}
+
+	private boolean safeDelete(File file) {
+		if (file.exists()) {
+			if (!file.delete()) {
+				file.deleteOnExit();
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public void setEventBus(IProvisioningEventBus newBus) {
+		registerRepoEventListener(newBus);
+	}
+
+	public void unsetEventBus(IProvisioningEventBus oldBus) {
+		unregisterRepoEventListener(oldBus);
+	}
+
+	/**
+	 * Removes the {@link SynchronousProvisioningListener} that cleans up the
+	 * cache file from the event bus.
+	 */
+	private void unregisterRepoEventListener(IProvisioningEventBus bus) {
+		if (bus != null && busListener != null)
+			bus.removeListener(busListener);
+	}
+
+	protected void updateCache(File cacheFile, URI remoteFile, long lastModifiedRemote, SubMonitor submonitor) throws FileNotFoundException, IOException, ProvisionException {
+		cacheFile.getParentFile().mkdirs();
+		File downloadDir = new File(cacheFile.getParentFile(), DOWNLOADING);
+		if (!downloadDir.exists())
+			downloadDir.mkdir();
+		File tempFile = new File(downloadDir, cacheFile.getName());
+		// Ensure that the file from a previous download attempt is removed 
+		if (tempFile.exists())
+			safeDelete(tempFile);
+
+		tempFile.createNewFile();
+
+		StatefulStream stream = null;
+		try {
+			stream = new StatefulStream(new FileOutputStream(tempFile));
+		} catch (Exception e) {
+			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+		}
+		IStatus result = null;
+		try {
+			submonitor.setWorkRemaining(1000);
+			result = getTransport().download(remoteFile, stream, submonitor.newChild(1000));
+		} catch (OperationCanceledException e) {
+			// need to pick up the status - a new operation canceled exception is thrown at the end
+			// as status will be CANCEL.
+			result = stream.getStatus();
+		} finally {
+			stream.close();
+			// If there was any problem fetching the file, delete the temp file
+			if (result == null || !result.isOK())
+				safeDelete(tempFile);
+		}
+		if (result.isOK()) {
+			if (cacheFile.exists())
+				safeDelete(cacheFile);
+			if (tempFile.renameTo(cacheFile))
+				return;
+		}
+
+		if (result.getSeverity() == IStatus.CANCEL || submonitor.isCanceled())
+			throw new OperationCanceledException();
+		throw new ProvisionException(result);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
new file mode 100644
index 0000000..26d5851
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 Sonatype, Inc and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository;
+
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+public class CacheManagerComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+		CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME));
+		cache.setEventBus(eventBus);
+		return cache;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
index 7fcceb6..0a9bb7e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Credentials.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, IBM Corporation and others.
+ * Copyright (c) 2009,2010 IBM Corporation and others.
  * The code, documentation and other materials contained herein have been
  * licensed under the Eclipse Public License - v 1.0 by the copyright holder
  * listed above, as the Initial Contributor under such license. The text of
@@ -7,6 +7,7 @@
  * Contributors:
  * 	IBM Corporation - Initial API and implementation
  *  Cloudsmith Inc - Implementation
+ *  Sonatype Inc - Ongoing development
  ******************************************************************************/
 
 package org.eclipse.equinox.internal.p2.repository;
@@ -19,9 +20,10 @@ import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.ecf.filetransfer.UserCancelledException;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.internal.p2.repository.helpers.DebugHelper;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.UIServices;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.eclipse.equinox.security.storage.*;
 
 /**
@@ -35,7 +37,21 @@ public class Credentials {
 
 	}
 
-	private static final Map savedAuthInfo = Collections.synchronizedMap(new HashMap());
+	/** 
+	 * Cache of auth information that is not persisted, and modified auth info.
+	 */
+	private static final Map<String, UIServices.AuthenticationInfo> savedAuthInfo = Collections.synchronizedMap(new HashMap<String, UIServices.AuthenticationInfo>());
+
+	/**
+	 * Information about retry counts, and prompts canceled by user. The SoftReference is
+	 * a Map if not null. The keys are also used as serialization per host.
+	 */
+	private static Map<String, HostEntry> remembered;
+
+	/** 
+	 * Serializes pop up of login/password prompt 
+	 */
+	private static final Object promptLock = new Object();
 
 	/**
 	 * Returns the AuthenticationInfo for the given URI. This may prompt the
@@ -53,7 +69,7 @@ public class Credentials {
 	 * @throws CoreException if the password cannot be read or saved
 	 * @return The authentication info.
 	 */
-	public static AuthenticationInfo forLocation(URI location, boolean prompt) throws LoginCanceledException, CoreException {
+	public static UIServices.AuthenticationInfo forLocation(URI location, boolean prompt) throws LoginCanceledException, CoreException {
 		return forLocation(location, prompt, null);
 	}
 
@@ -75,24 +91,8 @@ public class Credentials {
 	 * @throws UserCancelledException - user canceled the prompt for name/password
 	 * @throws CoreException if there is an error
 	 */
-	public static AuthenticationInfo forLocation(URI location, boolean prompt, AuthenticationInfo lastUsed) throws LoginCanceledException, CoreException {
-		ISecurePreferences securePreferences = SecurePreferencesFactory.getDefault();
-
-		// if URI is not opaque, just getting the host may be enough
-		String host = location.getHost();
-		if (host == null) {
-			String scheme = location.getScheme();
-			if (URIUtil.isFileURI(location) || scheme == null)
-				// If the URI references a file, a password could possibly be needed for the directory
-				// (it could be a protected zip file representing a compressed directory) - in this
-				// case the key is the path without the last segment.
-				// Using "Path" this way may result in an empty string - which later will result in
-				// an invalid key.
-				host = new Path(location.toString()).removeLastSegments(1).toString();
-			else
-				// it is an opaque URI - details are unknown - can only use entire string.
-				host = location.toString();
-		}
+	public static UIServices.AuthenticationInfo forLocation(URI location, boolean prompt, UIServices.AuthenticationInfo lastUsed) throws LoginCanceledException, CoreException {
+		String host = uriToHost(location);
 		String nodeKey;
 		try {
 			nodeKey = URLEncoder.encode(host, "UTF-8"); //$NON-NLS-1$
@@ -109,82 +109,376 @@ public class Credentials {
 				throw RepositoryStatusHelper.internalError(e);
 			}
 		}
-		String nodeName = IRepository.PREFERENCE_NODE + '/' + nodeKey;
-		ISecurePreferences prefNode = null;
-		try {
-			if (securePreferences.nodeExists(nodeName))
-				prefNode = securePreferences.node(nodeName);
-		} catch (IllegalArgumentException e) {
-			// if the node name is illegal/malformed (should not happen).
-			throw RepositoryStatusHelper.internalError(e);
-		} catch (IllegalStateException e) {
-			// thrown if preference store has been tampered with
-			throw RepositoryStatusHelper.internalError(e);
+		if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+			DebugHelper.debug("Credentials", "forLocation:ENTER", // //$NON-NLS-1$ //$NON-NLS-2$
+					new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
 		}
-		if (!prompt) {
-			try {
-				if (prefNode != null) {
-					String username = prefNode.get(IRepository.PROP_USERNAME, null);
-					String password = prefNode.get(IRepository.PROP_PASSWORD, null);
-					// if we don't have stored connection data just return a null auth info
-					if (username != null && password != null)
-						return new IServiceUI.AuthenticationInfo(username, password, true);
-				}
-				return restoreFromMemory(nodeName);
-			} catch (StorageException e) {
-				throw RepositoryStatusHelper.internalError(e);
+
+		// Must serialize getting stored permissions per host as the location may
+		// be prompted right now
+		// Start by getting a key to lock on
+		HostEntry hostLock = null;
+		synchronized (Credentials.class) {
+			Map<String, HostEntry> r = getRemembered();
+			hostLock = r.get(host);
+			if (hostLock == null) {
+				hostLock = new HostEntry(0);
+				r.put(host, hostLock);
 			}
 		}
-		//need to prompt user for user name and password
-		IServiceUI adminUIService = (IServiceUI) ServiceHelper.getService(Activator.getContext(), IServiceUI.class.getName());
-		AuthenticationInfo loginDetails = null;
-		if (adminUIService != null)
-			loginDetails = lastUsed != null ? adminUIService.getUsernamePassword(host, lastUsed) : adminUIService.getUsernamePassword(host);
-		//null result means user canceled password dialog
-		if (loginDetails == null)
-			throw new LoginCanceledException();
-		//save user name and password if requested by user
-		if (loginDetails.saveResult()) {
-			if (prefNode == null)
-				prefNode = securePreferences.node(nodeName);
+		UIServices.AuthenticationInfo loginDetails = null;
+		ISecurePreferences securePreferences = null;
+		// synchronize getting secure store with prompting user, as it may prompt.
+		synchronized (promptLock) {
+			securePreferences = SecurePreferencesFactory.getDefault();
+		}
+
+		// serialize the prompting per host
+		synchronized (hostLock) {
 			try {
-				prefNode.put(IRepository.PROP_USERNAME, loginDetails.getUserName(), true);
-				prefNode.put(IRepository.PROP_PASSWORD, loginDetails.getPassword(), true);
-				prefNode.flush();
-			} catch (StorageException e1) {
-				throw RepositoryStatusHelper.internalError(e1);
-			} catch (IOException e) {
-				throw RepositoryStatusHelper.internalError(e);
-			}
-		} else {
-			// if persisted earlier - the preference should be removed
-			if (securePreferences.nodeExists(nodeName)) {
-				prefNode = securePreferences.node(nodeName);
-				prefNode.removeNode();
+				if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+					DebugHelper.debug("Credentials", "forLocation:HOSTLOCK OBTAINED", // //$NON-NLS-1$ //$NON-NLS-2$
+							new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+
+				String nodeName = IRepository.PREFERENCE_NODE + '/' + nodeKey;
+				ISecurePreferences prefNode = null;
 				try {
-					prefNode.flush();
-				} catch (IOException e) {
+					if (securePreferences.nodeExists(nodeName))
+						prefNode = securePreferences.node(nodeName);
+				} catch (IllegalArgumentException e) {
+					// if the node name is illegal/malformed (should not happen).
+					throw RepositoryStatusHelper.internalError(e);
+				} catch (IllegalStateException e) {
+					// thrown if preference store has been tampered with
 					throw RepositoryStatusHelper.internalError(e);
 				}
+				if (!prompt) {
+					try {
+						if (prefNode != null) {
+							String username = prefNode.get(IRepository.PROP_USERNAME, null);
+							String password = prefNode.get(IRepository.PROP_PASSWORD, null);
+							if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+								if (username != null && password != null) {
+									DebugHelper.debug("Credentials", "forLocation:PREFNODE FOUND - USING STORED INFO", // //$NON-NLS-1$ //$NON-NLS-2$
+											new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
+								}
+							}
+
+							// if we don't have stored connection data just return a null auth info
+							if (username != null && password != null)
+								return new UIServices.AuthenticationInfo(username, password, true);
+						}
+						if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+							DebugHelper.debug("Credentials", "forLocation:PREFNODE NOT FOUND - RETURN FROM MEMORY", // //$NON-NLS-1$ //$NON-NLS-2$
+									new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						return restoreFromMemory(nodeName);
+					} catch (StorageException e) {
+						throw RepositoryStatusHelper.internalError(e);
+					}
+				}
+				// need to prompt user for user name and password
+				// first check (throw exception) if having a remembered cancel
+				checkRememberedCancel(host);
+
+				// check if another thread has modified the credentials since last attempt
+				// made by current thread - if so, try with latest without prompting
+				if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+					UIServices.AuthenticationInfo latest = restoreFromMemory(nodeName);
+					boolean useLatest = false;
+					if (latest != null && lastUsed != null)
+						if (!(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
+							useLatest = true;
+					if (useLatest)
+						DebugHelper.debug("Credentials", "forLocation:LATER INFO AVAILABLE - RETURNING IT", // //$NON-NLS-1$ //$NON-NLS-2$
+								new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+
+				UIServices.AuthenticationInfo latest = restoreFromMemory(nodeName);
+				if (latest != null)
+					if (lastUsed == null || !(latest.getUserName().equals(lastUsed.getUserName()) && latest.getPassword().equals(lastUsed.getPassword())))
+						return latest;
+
+				// check if number of prompts have been exceeded for the host - if so
+				// do a synthetic Login canceled by user
+				// (The alternative is to return "latest" until retry login gives up with
+				// authentication failed - but that would waste time).
+				if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+					if (getPromptCount(host) >= RepositoryPreferences.getLoginRetryCount()) {
+						if (lastUsed == null && latest == null)
+							DebugHelper.debug("Credentials", "forLocation:NO INFO - SYNTHETIC CANCEL", // //$NON-NLS-1$ //$NON-NLS-2$
+									new Object[] {"host", location}); //$NON-NLS-1$ 
+						return latest == null ? lastUsed : latest; // keep client failing on the latest known
+					}
+					DebugHelper.debug("Credentials", "forLocation:LATER INFO AVAILABLE - RETURNING IT", // //$NON-NLS-1$ //$NON-NLS-2$
+							new Object[] {"host", location, "prompt", Boolean.toString(prompt)}); //$NON-NLS-1$ //$NON-NLS-2$
+
+				}
+				if (getPromptCount(host) >= RepositoryPreferences.getLoginRetryCount()) {
+					if (lastUsed == null && latest == null)
+						throw new LoginCanceledException();
+					return latest == null ? lastUsed : latest; // keep client failing on the latest known
+				}
+				IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
+				UIServices adminUIService = (UIServices) agent.getService(UIServices.SERVICE_NAME);
+
+				if (adminUIService != null)
+					synchronized (promptLock) {
+						try {
+							if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+								DebugHelper.debug("Credentials", "forLocation:PROMPTLOCK OBTAINED", // //$NON-NLS-1$ //$NON-NLS-2$
+										new Object[] {"host", location}); //$NON-NLS-1$ 					
+							}
+
+							// serialize the popping of the dialog itself
+							loginDetails = lastUsed != null ? adminUIService.getUsernamePassword(host, lastUsed) : adminUIService.getUsernamePassword(host);
+							//null result means user canceled password dialog
+							if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+								if (loginDetails == null)
+									DebugHelper.debug("Credentials", "forLocation:PROMPTED - USER CANCELED (PROMPT LOCK RELEASED)", // //$NON-NLS-1$ //$NON-NLS-2$
+											new Object[] {"host", location}); //$NON-NLS-1$					
+							}
+							if (loginDetails == null) {
+								rememberCancel(host);
+								throw new LoginCanceledException();
+							}
+							//save user name and password if requested by user
+							if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+								if (loginDetails.saveResult())
+									DebugHelper.debug("Credentials", "forLocation:SAVING RESULT", // //$NON-NLS-1$ //$NON-NLS-2$
+											new Object[] {"host", location}); //$NON-NLS-1$					
+							}
+
+							if (loginDetails.saveResult()) {
+								if (prefNode == null)
+									prefNode = securePreferences.node(nodeName);
+								try {
+									prefNode.put(IRepository.PROP_USERNAME, loginDetails.getUserName(), true);
+									prefNode.put(IRepository.PROP_PASSWORD, loginDetails.getPassword(), true);
+									prefNode.flush();
+								} catch (StorageException e1) {
+									throw RepositoryStatusHelper.internalError(e1);
+								} catch (IOException e) {
+									throw RepositoryStatusHelper.internalError(e);
+								}
+							} else {
+								// if persisted earlier - the preference should be removed
+								if (securePreferences.nodeExists(nodeName)) {
+									if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+										DebugHelper.debug("Credentials", "forLocation:REMOVING PREVIOUSLY SAVED INFO", // //$NON-NLS-1$ //$NON-NLS-2$
+												new Object[] {"host", location}); //$NON-NLS-1$					
+									}
+
+									prefNode = securePreferences.node(nodeName);
+									prefNode.removeNode();
+									try {
+										prefNode.flush();
+									} catch (IOException e) {
+										throw RepositoryStatusHelper.internalError(e);
+									}
+								}
+							}
+							saveInMemory(nodeName, loginDetails);
+						} finally {
+							if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+								DebugHelper.debug("Credentials", "forLocation:PROMPTLOCK RELEASED", // //$NON-NLS-1$ //$NON-NLS-2$
+										new Object[] {"host", location}); //$NON-NLS-1$					
+							}
+						}
+					}
+				incrementPromptCount(host);
+			} finally {
+				if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+					DebugHelper.debug("Credentials", "forLocation:HOSTLOCK RELEASED", // //$NON-NLS-1$ //$NON-NLS-2$
+							new Object[] {"host", location}); //$NON-NLS-1$					
+				}
 			}
-			saveInMemory(nodeName, loginDetails);
+
 		}
+
 		return loginDetails;
 	}
 
+	private static String uriToHost(URI location) {
+		// if URI is not opaque, just getting the host may be enough
+		String host = location.getHost();
+		if (host == null) {
+			String scheme = location.getScheme();
+			if (URIUtil.isFileURI(location) || scheme == null)
+				// If the URI references a file, a password could possibly be needed for the directory
+				// (it could be a protected zip file representing a compressed directory) - in this
+				// case the key is the path without the last segment.
+				// Using "Path" this way may result in an empty string - which later will result in
+				// an invalid key.
+				host = new Path(location.toString()).removeLastSegments(1).toString();
+			else
+				// it is an opaque URI - details are unknown - can only use entire string.
+				host = location.toString();
+		}
+		return host;
+	}
+
 	/**
 	 * Returns authentication details stored in memory for the given node name,
 	 * or <code>null</code> if no information is stored.
 	 */
-	private static AuthenticationInfo restoreFromMemory(String nodeName) {
-		return (AuthenticationInfo) savedAuthInfo.get(nodeName);
+	private static UIServices.AuthenticationInfo restoreFromMemory(String nodeName) {
+		return savedAuthInfo.get(nodeName);
 	}
 
 	/**
-	 * Saves authentication details in memory so user is only prompted once per session
+	 * Saves authentication details in memory so user is only prompted once per (SDK) session
 	 */
-	private static void saveInMemory(String nodeName, AuthenticationInfo loginDetails) {
+	private static void saveInMemory(String nodeName, UIServices.AuthenticationInfo loginDetails) {
 		savedAuthInfo.put(nodeName, loginDetails);
 	}
 
+	/**
+	 * Remember the fact that the host was canceled.
+	 * @param host
+	 */
+	private static void rememberCancel(String host) {
+		Map<String, HostEntry> r = getRemembered();
+		if (r != null)
+			r.put(host, new HostEntry(-1));
+	}
+
+	/**
+	 * Throws LoginCancledException if the host was previously canceled, and the information
+	 * is not stale.
+	 * @param host
+	 * @throws LoginCanceledException
+	 */
+	private static void checkRememberedCancel(String host) throws LoginCanceledException {
+		Map<String, HostEntry> r = getRemembered();
+		if (r != null) {
+			Object x = r.get(host);
+			if (x != null && x instanceof HostEntry)
+				if (((HostEntry) x).isCanceled()) {
+					if (DebugHelper.DEBUG_REPOSITORY_CREDENTIALS) {
+						DebugHelper.debug("Credentials", "checkRememberCancel:PREVIOUSLY CANCELED", // //$NON-NLS-1$ //$NON-NLS-2$
+								new Object[] {"host", host}); //$NON-NLS-1$ 
+					}
+
+					throw new LoginCanceledException();
+				}
+		}
+
+	}
+
+	/**
+	 * Increments the prompt count for host. If information is stale, the count is restarted
+	 * at 1.
+	 * @param host
+	 */
+	private static void incrementPromptCount(String host) {
+		Map<String, HostEntry> r = getRemembered();
+		if (r != null) {
+			HostEntry value = r.get(host);
+			if (value == null)
+				r.put(host, value = new HostEntry(1));
+			else {
+				if (value.isStale())
+					value.reset();
+				value.increment();
+			}
+		}
+	}
+
+	/**
+	 * Returns prompt count for host, except if information is stale in which case 0 is returned.
+	 * @param host
+	 * @return number of time prompt has been performed for a host (or 0 if information is stale)
+	 */
+	private static int getPromptCount(String host) {
+		Map<String, HostEntry> r = getRemembered();
+		if (r != null) {
+			HostEntry value = r.get(host);
+			if (value != null && !value.isStale())
+				return value.getCount();
+		}
+		return 0;
+
+	}
+
+	/**
+	 * Clears the cached information about prompts for all login/password and
+	 * canceled logins.
+	 */
+	public static synchronized void clearPromptCache() {
+		if (remembered == null)
+			return;
+		Map<String, HostEntry> r = remembered;
+		if (r == null || r.isEmpty())
+			return;
+		// reset entries rather than creating a new empty map since the entries
+		// are also used as locks
+		for (HostEntry entry : r.values())
+			entry.reset();
+	}
+
+	/**
+	 * Clears the cached information for location about prompts for login/password and
+	 * canceled logins.
+	 * @param location the repository location
+	 */
+	public static synchronized void clearPromptCache(URI location) {
+		clearPromptCache(uriToHost(location));
+	}
+
+	/**
+	 * Clears the cached information for host about prompts for login/password and
+	 * canceled logins. 
+	 * @param host a host as returned from uriToHost for a location
+	 */
+	public static synchronized void clearPromptCache(String host) {
+		if (remembered == null)
+			return;
+		Map<String, HostEntry> r = remembered;
+		if (r == null)
+			return;
+		HostEntry value = r.get(host);
+		if (value != null)
+			value.reset();
+	}
+
+	private static synchronized Map<String, HostEntry> getRemembered() {
+		if (remembered == null)
+			remembered = Collections.synchronizedMap(new HashMap<String, HostEntry>());
+		return remembered;
+	}
+
+	private static class HostEntry {
+		long timestamp;
+		int count;
+
+		public HostEntry(int count) {
+			this.count = count;
+			this.timestamp = System.currentTimeMillis();
+		}
+
+		public boolean isCanceled() {
+			return count == -1 && !isStale();
+		}
+
+		public boolean isStale() {
+			// a record is stale if older than 3 minutes
+			return System.currentTimeMillis() - timestamp > 1000 * 60 * 3;
+		}
+
+		public int getCount() {
+			return count;
+		}
+
+		public void increment() {
+			if (count != -1)
+				count++;
+		}
+
+		public void reset() {
+			count = 0;
+			timestamp = System.currentTimeMillis();
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
index 5f3394b..fcc92c2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 Cloudsmith Inc.
+ * Copyright (c) 2006, 2010 Cloudsmith Inc.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  *  Contributors:
  * 	Cloudsmith Inc - initial API and implementation
  * 	IBM Corporation - ongoing development
+ *  Sonatype Inc - ongoing development
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.repository;
 
@@ -29,6 +30,25 @@ import org.eclipse.osgi.util.NLS;
  * FileReader is an ECF FileTransferJob implementation.
  */
 public final class FileReader extends FileTransferJob implements IFileTransferListener {
+	/**
+	 * Class used to suppress warnings about a job being blocked by another job.
+	 * Since we are running a job that will always be blocked by another job that
+	 * is actually performing the transfer, these messages are unnecessary and ugly.
+	 */
+	static class SuppressBlockedMonitor extends SubProgressMonitor {
+		public SuppressBlockedMonitor(IProgressMonitor monitor, int ticks) {
+			super(monitor, ticks);
+		}
+
+		public void setBlocked(IStatus reason) {
+			//do nothing
+		}
+
+		public void clearBlocked() {
+			//do nothing
+		}
+	}
+
 	private static IFileReaderProbe testProbe;
 	private boolean closeStreamWhenFinished = false;
 	private Exception exception;
@@ -238,6 +258,11 @@ public final class FileReader extends FileTransferJob implements IFileTransferLi
 				if (t instanceof IOException)
 					e = (IOException) t;
 				else {
+					if (t instanceof UserCancelledException) {
+						Throwable cause = t;
+						t = new OperationCanceledException(t.getMessage());
+						t.initCause(cause);
+					}
 					e = new IOException(t.getMessage());
 					e.initCause(t);
 				}
@@ -261,7 +286,7 @@ public final class FileReader extends FileTransferJob implements IFileTransferLi
 			monitor = new NullProgressMonitor();
 		try {
 			sendRetrieveRequest(uri, anOutputStream, (startPos != -1 ? new DownloadRange(startPos) : null), false, monitor);
-			Job.getJobManager().join(this, new SubProgressMonitor(monitor, 0));
+			Job.getJobManager().join(this, new SuppressBlockedMonitor(monitor, 0));
 			if (monitor.isCanceled() && connectEvent != null)
 				connectEvent.cancel();
 			// check and throw exception if received in callback
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java
index d27510b..b6474e3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/JREHttpClientRequiredException.java
@@ -1,12 +1,9 @@
 /*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     Cloudsmith - initial API and implementation
+ * Copyright (c) 2009, Cloudsmith Inc.
+ * The code, documentation and other materials contained herein have been
+ * licensed under the Eclipse Public License - v 1.0 by the copyright holder
+ * listed above, as the Initial Contributor under such license. The text of
+ * such license is available at www.eclipse.org.
  ******************************************************************************/
 
 package org.eclipse.equinox.internal.p2.repository;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
index 2ed09a9..ccdee42 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2011 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *     Cloudsmith Inc - additional messages
+ *     Sonatype Inc - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.repository;
 
@@ -16,6 +17,10 @@ import org.eclipse.osgi.util.NLS;
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.repository.messages"; //$NON-NLS-1$
 
+	public static String CacheManager_AuthenticationFaileFor_0;
+	public static String CacheManager_FailedCommunicationWithRepo_0;
+	public static String CacheManager_Neither_0_nor_1_found;
+
 	public static String artifact_not_found;
 	public static String io_failedRead;
 	public static String ecf_configuration_error;
@@ -74,6 +79,9 @@ public class Messages extends NLS {
 
 	public static String UnableToRead_0_TooManyAttempts;
 	public static String UnableToRead_0_UserCanceled;
+
+	public static String RepositoryTransport_failedReadRepo;
+
 	static {
 		// initialize resource bundles
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
index ec9d298..6b740e4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java
@@ -1,16 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2006-2009, Cloudsmith Inc.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the copyright holder
- * listed above, as the Initial Contributor under such license. The text or
- * such license is available at www.eclipse.org.
+ * Copyright (c) 2006, 2009 Cloudsmith Inc.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ * 	Cloudsmith Inc - initial API and implementation
+ * 	IBM Corporation - ongoing development
+ * 	Genuitec - Bug 291926
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.repository;
 
 import java.net.URI;
 import java.text.NumberFormat;
-import java.util.*;
-import java.util.Map.Entry;
+import java.util.SortedMap;
+import java.util.TreeMap;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -49,7 +54,7 @@ public class ProgressStatistics {
 
 	private int m_reportInterval;
 
-	private SortedMap m_recentSpeedMap;
+	private SortedMap<Long, Long> m_recentSpeedMap;
 
 	private long m_recentSpeedMapKey;
 
@@ -64,17 +69,15 @@ public class ProgressStatistics {
 		m_current = 0;
 		m_lastReportTime = 0;
 		m_reportInterval = DEFAULT_REPORT_INTERVAL;
-		m_recentSpeedMap = new TreeMap();
+		m_recentSpeedMap = new TreeMap<Long, Long>();
 		m_recentSpeedMapKey = 0L;
 		m_uri = uri;
 	}
 
 	public long getAverageSpeed() {
 		long dur = getDuration();
-
-		if (dur >= 1000)
-			return m_current / (dur / 1000);
-
+		if (dur > 0)
+			return (int) (m_current / (dur / 1000.0));
 		return 0L;
 	}
 
@@ -93,13 +96,11 @@ public class ProgressStatistics {
 		removeObsoleteRecentSpeedData(getDuration() / SPEED_RESOLUTION);
 		long dur = 0L;
 		long amount = 0L;
-		SortedMap relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey));
+		SortedMap<Long, Long> relevantData = m_recentSpeedMap.headMap(new Long(m_recentSpeedMapKey));
 
-		Iterator itor = relevantData.entrySet().iterator();
-		while (itor.hasNext()) {
-			Entry entry = (Entry) itor.next();
+		for (Long rl : relevantData.values()) {
 			dur += SPEED_RESOLUTION;
-			amount += ((Long) entry.getValue()).longValue();
+			amount += rl.longValue();
 		}
 
 		if (dur >= 1000)
@@ -144,7 +145,7 @@ public class ProgressStatistics {
 
 	synchronized private void registerRecentSpeed(long key, long inc) {
 		Long keyL = new Long(key);
-		Long currentValueL = (Long) m_recentSpeedMap.get(keyL);
+		Long currentValueL = m_recentSpeedMap.get(keyL);
 		long currentValue = 0L;
 		if (currentValueL != null)
 			currentValue = currentValueL.longValue();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
index 67fbb9c..aae393d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
@@ -11,13 +11,14 @@
 
 package org.eclipse.equinox.internal.p2.repository;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.io.FileNotFoundException;
 import java.net.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.ecf.core.identity.IDCreateException;
 import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
 import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
index 601a2da..ac3d66b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
@@ -10,13 +10,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.repository;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.io.*;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
 import org.eclipse.core.runtime.*;
 import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
 import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -122,7 +123,7 @@ public abstract class RepositoryStatusHelper {
 
 	public static Throwable unwind(Throwable t) {
 		for (;;) {
-			Class tc = t.getClass();
+			Class<? extends Throwable> tc = t.getClass();
 
 			// We don't use instanceof operator since we want
 			// the explicit class, not subclasses.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
index 02d7027..e2a825a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006-2009, IBM Corporation and other.
+ * Copyright (c) 2006, 2011 IBM Corporation and other.
  * The code, documentation and other materials contained herein have been
  * licensed under the Eclipse Public License - v 1.0 by the copyright holder
  * listed above, as the Initial Contributor under such license. The text of
@@ -19,9 +19,9 @@ import org.eclipse.ecf.core.security.ConnectContextFactory;
 import org.eclipse.ecf.core.security.IConnectContext;
 import org.eclipse.ecf.filetransfer.UserCancelledException;
 import org.eclipse.equinox.internal.p2.repository.Credentials.LoginCanceledException;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
 import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -72,6 +72,11 @@ public class RepositoryTransport extends Transport {
 
 				// check that job ended ok - throw exceptions otherwise
 				IStatus result = reader.getResult();
+				if (result == null) {
+					String msg = NLS.bind(Messages.RepositoryTransport_failedReadRepo, toDownload);
+					DownloadStatus ds = new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, null);
+					return statusOn(target, ds, reader);
+				}
 				if (result.getSeverity() == IStatus.CANCEL)
 					throw new UserCancelledException();
 				if (!result.isOK())
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
index 0568be5..4eeed0b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,20 +7,27 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wind River - fix for bug 299227
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.repository.helpers;
 
+import java.io.*;
 import java.lang.ref.SoftReference;
 import java.net.*;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.equinox.internal.p2.core.Activator;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.p2.repository.*;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.core.spi.IAgentService;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.security.storage.EncodingUtils;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
@@ -28,15 +35,15 @@ import org.osgi.service.prefs.Preferences;
 /**
  * Common code shared between artifact and metadata repository managers.
  */
-public abstract class AbstractRepositoryManager implements IRepositoryManager, ProvisioningListener {
-	protected static class RepositoryInfo {
+public abstract class AbstractRepositoryManager<T> implements IRepositoryManager<T>, IAgentService, ProvisioningListener {
+	protected static class RepositoryInfo<R> {
 		public String description;
 		public boolean isEnabled = true;
 		public boolean isSystem = false;
 		public URI location;
 		public String name;
 		public String nickname;
-		public SoftReference repository;
+		public SoftReference<IRepository<R>> repository;
 		public String suffix;
 
 		public RepositoryInfo() {
@@ -60,12 +67,13 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	public static final String KEY_VERSION = "version"; //$NON-NLS-1$
 
 	public static final String NODE_REPOSITORIES = "repositories"; //$NON-NLS-1$
+	private static final String INDEX_FILE = "p2.index"; //$NON-NLS-1$
 
 	/**
 	 * Map of String->RepositoryInfo, where String is the repository key
 	 * obtained via getKey(URI).
 	 */
-	protected Map repositories = null;
+	protected Map<String, RepositoryInfo<T>> repositories = null;
 
 	//lock object to be held when referring to the repositories field
 	protected final Object repositoryLock = new Object();
@@ -74,17 +82,22 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * Cache List of repositories that are not reachable. Maintain cache
 	 * for short duration because repository may become available at any time.
 	 */
-	protected SoftReference unavailableRepositories;
+	protected SoftReference<List<URI>> unavailableRepositories;
 
 	/**
 	 * Set used to manage exclusive load locks on repository locations.
 	 */
-	private Map loadLocks = new HashMap();
-
-	protected AbstractRepositoryManager() {
-		IProvisioningEventBus bus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
-		if (bus != null)
-			bus.addListener(this);
+	private final Map<URI, Thread> loadLocks = new HashMap<URI, Thread>();
+	private final IAgentLocation agentLocation;
+	protected final IProvisioningEventBus eventBus;
+	protected final IProvisioningAgent agent;
+
+	protected AbstractRepositoryManager(IProvisioningAgent agent) {
+		super();
+		this.agent = agent;
+		agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
+		eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
+		eventBus.addListener(this);
 	}
 
 	/**
@@ -93,23 +106,23 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * @param signalAdd whether a repository change event should be fired
 	 * @param suffix the suffix used to load the repository, or <code>null</code> if unknown
 	 */
-	protected void addRepository(IRepository repository, boolean signalAdd, String suffix) {
+	protected void addRepository(IRepository<T> repository, boolean signalAdd, String suffix) {
 		boolean added = false;
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
 			String key = getKey(repository.getLocation());
-			RepositoryInfo info = (RepositoryInfo) repositories.get(key);
+			RepositoryInfo<T> info = repositories.get(key);
 			if (info == null) {
-				info = new RepositoryInfo();
+				info = new RepositoryInfo<T>();
 				added = true;
 				repositories.put(key, info);
 			}
-			info.repository = new SoftReference(repository);
+			info.repository = new SoftReference<IRepository<T>>(repository);
 			info.name = repository.getName();
 			info.description = repository.getDescription();
 			info.location = repository.getLocation();
-			String value = (String) repository.getProperties().get(IRepository.PROP_SYSTEM);
+			String value = repository.getProperties().get(IRepository.PROP_SYSTEM);
 			if (value != null)
 				info.isSystem = Boolean.valueOf(value).booleanValue();
 			info.suffix = suffix;
@@ -117,7 +130,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		// save the given repository in the preferences.
 		remember(repository, suffix);
 		if (added && signalAdd)
-			broadcastChangeEvent(repository.getLocation(), IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true);
+			broadcastChangeEvent(repository.getLocation(), getRepositoryType(), RepositoryEvent.ADDED, true);
 	}
 
 	/* (non-Javadoc)
@@ -139,7 +152,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * <code>false</code> otherwise.
 	 */
 	private boolean addRepository(URI location, boolean isEnabled, boolean signalAdd) {
-		RepositoryInfo info = new RepositoryInfo();
+		RepositoryInfo<T> info = new RepositoryInfo<T>();
 		info.location = location;
 		info.isEnabled = isEnabled;
 		boolean added = true;
@@ -157,23 +170,23 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		return added;
 	}
 
-	protected IRepository basicGetRepository(URI location) {
+	protected IRepository<T> basicGetRepository(URI location) {
 		checkValidLocation(location);
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
+			RepositoryInfo<T> info = repositories.get(getKey(location));
 			if (info == null || info.repository == null)
 				return null;
-			IRepository repo = (IRepository) info.repository.get();
+			IRepository<T> repo = info.repository.get();
 			//update our repository info because the repository may have changed
 			if (repo != null)
-				addRepository(repo, false, null);
+				addRepository(repo, false, info.suffix);
 			return repo;
 		}
 	}
 
-	public IRepository basicRefreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
+	public IRepository<T> basicRefreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
 		checkValidLocation(location);
 		clearNotFound(location);
 		boolean wasEnabled = isEnabled(location);
@@ -183,7 +196,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 			fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
 		boolean loaded = false;
 		try {
-			IRepository result = loadRepository(location, monitor, null, 0);
+			IRepository<T> result = loadRepository(location, monitor, null, 0);
 			loaded = true;
 			setEnabled(location, wasEnabled);
 			return result;
@@ -197,9 +210,8 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	}
 
 	private void broadcastChangeEvent(URI location, int repositoryType, int kind, boolean isEnabled) {
-		IProvisioningEventBus bus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.class.getName());
-		if (bus != null)
-			bus.publishEvent(new RepositoryEvent(location, repositoryType, kind, isEnabled));
+		if (eventBus != null)
+			eventBus.publishEvent(new RepositoryEvent(location, repositoryType, kind, isEnabled));
 	}
 
 	/**
@@ -210,7 +222,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	private boolean checkNotFound(URI location) {
 		if (unavailableRepositories == null)
 			return false;
-		List badRepos = (List) unavailableRepositories.get();
+		List<URI> badRepos = unavailableRepositories.get();
 		if (badRepos == null)
 			return false;
 		return badRepos.contains(location);
@@ -220,9 +232,9 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * Clear the fact that we tried to load a repository at this location and did not find anything.
 	 */
 	private void clearNotFound(URI location) {
-		List badRepos;
+		List<URI> badRepos;
 		if (unavailableRepositories != null) {
-			badRepos = (List) unavailableRepositories.get();
+			badRepos = unavailableRepositories.get();
 			if (badRepos != null) {
 				badRepos.remove(location);
 				return;
@@ -245,11 +257,11 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager#createRepository(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
 	 */
-	protected IRepository doCreateRepository(URI location, String name, String type, Map properties) throws ProvisionException {
+	protected IRepository<T> doCreateRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
 		checkValidLocation(location);
 		Assert.isNotNull(name);
 		Assert.isNotNull(type);
-		IRepository result = null;
+		IRepository<T> result = null;
 		try {
 			enterLoad(location, new NullProgressMonitor());
 			boolean loaded = false;
@@ -288,13 +300,12 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 */
 	protected Object createExecutableExtension(IExtension extension, String element) {
 		IConfigurationElement[] elements = extension.getConfigurationElements();
-		CoreException failure = null;
 		for (int i = 0; i < elements.length; i++) {
 			if (elements[i].getName().equals(element)) {
 				try {
 					return elements[i].createExecutableExtension("class"); //$NON-NLS-1$
 				} catch (CoreException e) {
-					log("Error loading repository extension: " + extension.getUniqueIdentifier(), failure); //$NON-NLS-1$
+					log("Error loading repository extension: " + extension.getUniqueIdentifier(), e); //$NON-NLS-1$
 					return null;
 				}
 			}
@@ -317,7 +328,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		Thread current = Thread.currentThread();
 		synchronized (loadLocks) {
 			while (true) {
-				Thread owner = (Thread) loadLocks.get(location);
+				Thread owner = loadLocks.get(location);
 				if (owner == null || current.equals(owner))
 					break;
 				if (monitor.isCanceled())
@@ -348,13 +359,13 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * Creates and returns a repository using the given repository factory extension. Returns
 	 * null if no factory could be found associated with that extension.
 	 */
-	protected abstract IRepository factoryCreate(URI location, String name, String type, Map properties, IExtension extension) throws ProvisionException;
+	protected abstract IRepository<T> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException;
 
 	/**
 	 * Loads and returns a repository using the given repository factory extension. Returns
 	 * null if no factory could be found associated with that extension.
 	 */
-	protected abstract IRepository factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException;
+	protected abstract IRepository<T> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException;
 
 	private void fail(URI location, int code) throws ProvisionException {
 		String msg = null;
@@ -409,8 +420,13 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	}
 
 	protected String[] getAllSuffixes() {
-		IConfigurationElement[] elements = RegistryFactory.getRegistry().getConfigurationElementsFor(getRepositoryProviderExtensionPointId());
-		ArrayList result = new ArrayList(elements.length);
+		final IExtensionRegistry registry = RegistryFactory.getRegistry();
+		if (registry == null) {
+			log("Extension registry not found", new RuntimeException()); //$NON-NLS-1$
+			return new String[0];
+		}
+		IConfigurationElement[] elements = registry.getConfigurationElementsFor(getRepositoryProviderExtensionPointId());
+		ArrayList<String> result = new ArrayList<String>(elements.length);
 		result.add(getDefaultSuffix());
 		for (int i = 0; i < elements.length; i++) {
 			if (elements[i].getName().equals(EL_FILTER)) {
@@ -419,7 +435,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 					result.add(suffix);
 			}
 		}
-		return (String[]) result.toArray(new String[result.size()]);
+		return result.toArray(new String[result.size()]);
 	}
 
 	/**
@@ -447,6 +463,10 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		return key;
 	}
 
+	public IProvisioningAgent getAgent() {
+		return agent;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getKnownRepositories(int)
 	 */
@@ -454,25 +474,29 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			ArrayList result = new ArrayList();
-			int i = 0;
-			for (Iterator it = repositories.values().iterator(); it.hasNext(); i++) {
-				RepositoryInfo info = (RepositoryInfo) it.next();
+			ArrayList<URI> result = new ArrayList<URI>();
+			for (RepositoryInfo<T> info : repositories.values()) {
 				if (matchesFlags(info, flags))
 					result.add(info.location);
 			}
-			return (URI[]) result.toArray(new URI[result.size()]);
+			return result.toArray(new URI[result.size()]);
 		}
 	}
 
 	/**
 	 * Return the preference node which is the root for where we store the repository information.
+	 * Returns <code>null</code> if no preferences are available
 	 */
 	Preferences getPreferences() {
+		if (agentLocation == null)
+			return null;
 		IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName());
-
+		if (prefService == null)
+			return null;
 		try {
-			return prefService.getRootNode().node("/profile/_SELF_/" + getBundleId() + "/" + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$
+			//see ProfileScope for preference path format
+			String locationString = EncodingUtils.encodeSlashes(agentLocation.getRootLocation().toString());
+			return prefService.getRootNode().node("/profile/" + locationString + "/_SELF_/" + getBundleId() + '/' + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$
 		} catch (IllegalArgumentException e) {
 			return null;
 		}
@@ -519,7 +543,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
+			RepositoryInfo<T> info = repositories.get(getKey(location));
 			if (info == null)
 				return null;// Repository not found
 			if (IRepository.PROP_DESCRIPTION.equals(key))
@@ -543,7 +567,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
+			RepositoryInfo<T> info = repositories.get(getKey(location));
 			if (info == null)
 				return;// Repository not found
 			if (IRepository.PROP_DESCRIPTION.equals(key))
@@ -575,6 +599,11 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 */
 	protected abstract int getRepositoryType();
 
+	/**
+	 * Returns the preferred search order for this location
+	 */
+	protected abstract String[] getPreferredRepositorySearchOrder(LocationProperties properties);
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#isEnabled(java.net.URI)
 	 */
@@ -582,7 +611,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
+			RepositoryInfo<T> info = repositories.get(getKey(location));
 			if (info != null)
 				return info.isEnabled;
 			// Repository not found, return false
@@ -590,12 +619,12 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		}
 	}
 
-	protected IRepository loadRepository(URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
+	protected IRepository<T> loadRepository(URI location, IProgressMonitor monitor, String type, int flags) throws ProvisionException {
 		checkValidLocation(location);
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
 		boolean added = false;
-		IRepository result = null;
+		IRepository<T> result = null;
 
 		try {
 			enterLoad(location, monitor);
@@ -606,7 +635,12 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 				fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
 			//add the repository first so that it will be enabled, but don't send add event until after the load
 			added = addRepository(location, true, false);
-			String[] suffixes = sortSuffixes(getAllSuffixes(), location);
+
+			LocationProperties indexFile = loadIndexFile(location, monitor);
+
+			String[] preferredOrder = getPreferredRepositorySearchOrder(indexFile);
+			String[] suffixes = sortSuffixes(getAllSuffixes(), location, preferredOrder);
+
 			SubMonitor sub = SubMonitor.convert(monitor, NLS.bind(Messages.repoMan_adding, location), suffixes.length * 100);
 			ProvisionException failure = null;
 			try {
@@ -634,7 +668,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 				//eagerly cleanup missing system repositories
 				if (Boolean.valueOf(getRepositoryProperty(location, IRepository.PROP_SYSTEM)).booleanValue())
 					removeRepository(location);
-				else if (failure == null || failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_AUTHENTICATION)
+				else if (failure == null || (failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_AUTHENTICATION && failure.getStatus().getCode() != ProvisionException.REPOSITORY_FAILED_READ))
 					rememberNotFound(location);
 				if (failure != null)
 					throw failure;
@@ -645,11 +679,54 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		}
 		//broadcast the add event after releasing lock
 		if (added)
-			broadcastChangeEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true);
+			broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ADDED, true);
 		return result;
 	}
 
 	/**
+	 * Fetches the p2.index file from the server. If the file could not be fetched
+	 * a NullSafe version is returned.
+	 */
+	private LocationProperties loadIndexFile(URI location, IProgressMonitor monitor) {
+		LocationProperties locationProperties = LocationProperties.createEmptyIndexFile();
+		//Handle the case of local repos
+		if ("file".equals(location.getScheme())) { //$NON-NLS-1$ 
+			InputStream localStream = null;
+			try {
+				try {
+					File indexFile = URIUtil.toFile(getIndexFileURI(location));
+					if (indexFile != null && indexFile.exists() && indexFile.canRead()) {
+						localStream = new FileInputStream(indexFile);
+						locationProperties = LocationProperties.create(localStream);
+					}
+				} catch (URISyntaxException e) {
+					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+				} finally {
+					if (localStream != null)
+						localStream.close();
+				}
+			} catch (IOException e) {
+				//do nothing.
+			}
+			return locationProperties;
+		}
+
+		//Handle non local repos (i.e. not file:)
+		ByteArrayOutputStream index = new ByteArrayOutputStream();
+		IStatus indexFileStatus = null;
+		try {
+			indexFileStatus = getTransport().download(getIndexFileURI(location), index, monitor);
+		} catch (URISyntaxException uriSyntaxException) {
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, uriSyntaxException.getMessage(), uriSyntaxException));
+			indexFileStatus = null;
+		}
+		if (indexFileStatus != null && indexFileStatus.isOK())
+			locationProperties = LocationProperties.create(new ByteArrayInputStream(index.toByteArray()));
+
+		return locationProperties;
+	}
+
+	/**
 	 * Basic sanity checking on location argument
 	 */
 	private URI checkValidLocation(URI location) {
@@ -660,13 +737,13 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		return location;
 	}
 
-	private IRepository loadRepository(URI location, String suffix, String type, int flags, SubMonitor monitor) throws ProvisionException {
+	private IRepository<T> loadRepository(URI location, String suffix, String type, int flags, SubMonitor monitor) throws ProvisionException {
 		IExtension[] providers = findMatchingRepositoryExtensions(suffix, type);
 		// Loop over the candidates and return the first one that successfully loads
-		monitor.beginTask("", providers.length * 10); //$NON-NLS-1$
+		monitor.beginTask(null, providers.length * 10);
 		for (int i = 0; i < providers.length; i++)
 			try {
-				IRepository repo = factoryLoad(location, providers[i], flags, monitor);
+				IRepository<T> repo = factoryLoad(location, providers[i], flags, monitor);
 				if (repo != null)
 					return repo;
 			} catch (ProvisionException e) {
@@ -689,7 +766,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		LogHelper.log(new Status(IStatus.ERROR, getBundleId(), message, t));
 	}
 
-	private boolean matchesFlags(RepositoryInfo info, int flags) {
+	private boolean matchesFlags(RepositoryInfo<T> info, int flags) {
 		if ((flags & REPOSITORIES_SYSTEM) == REPOSITORIES_SYSTEM)
 			if (!info.isSystem)
 				return false;
@@ -706,6 +783,8 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		}
 		if ((flags & REPOSITORIES_LOCAL) == REPOSITORIES_LOCAL)
 			return "file".equals(info.location.getScheme()) || info.location.toString().startsWith("jar:file"); //$NON-NLS-1$ //$NON-NLS-2$
+		if ((flags & REPOSITORIES_NON_LOCAL) == REPOSITORIES_NON_LOCAL)
+			return !("file".equals(info.location.getScheme()) || info.location.toString().startsWith("jar:file")); //$NON-NLS-1$ //$NON-NLS-2$
 		return true;
 	}
 
@@ -738,7 +817,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	/*
 	 * Add the given repository object to the preferences and save.
 	 */
-	private void remember(IRepository repository, String suffix) {
+	private void remember(IRepository<T> repository, String suffix) {
 		boolean changed = false;
 		Preferences node = getPreferences();
 		// Ensure we retrieved preferences
@@ -755,7 +834,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 			changed |= putValue(node, KEY_TYPE, repository.getType());
 			changed |= putValue(node, KEY_VERSION, repository.getVersion());
 			//allow repository manager to define system property if it is undefined in the repository itself
-			String value = (String) repository.getProperties().get(IRepository.PROP_SYSTEM);
+			String value = repository.getProperties().get(IRepository.PROP_SYSTEM);
 			if (value != null)
 				changed |= putValue(node, KEY_SYSTEM, value);
 			changed |= putValue(node, KEY_SUFFIX, suffix);
@@ -773,7 +852,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * @param flush <code>true</code> if the preference node should be flushed to
 	 * disk, and <code>false</code> otherwise
 	 */
-	private boolean remember(RepositoryInfo info, boolean flush) {
+	private boolean remember(RepositoryInfo<T> info, boolean flush) {
 		boolean changed = false;
 		Preferences node = getPreferences();
 		// Ensure we retrieved preferences
@@ -802,17 +881,17 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 * Cache the fact that we tried to load a repository at this location and did not find anything.
 	 */
 	private void rememberNotFound(URI location) {
-		List badRepos;
+		List<URI> badRepos;
 		if (unavailableRepositories != null) {
-			badRepos = (List) unavailableRepositories.get();
+			badRepos = unavailableRepositories.get();
 			if (badRepos != null) {
 				badRepos.add(location);
 				return;
 			}
 		}
-		badRepos = new ArrayList();
+		badRepos = new ArrayList<URI>();
 		badRepos.add(location);
-		unavailableRepositories = new SoftReference(badRepos);
+		unavailableRepositories = new SoftReference<List<URI>>(badRepos);
 	}
 
 	public boolean removeRepository(URI toRemove) {
@@ -837,7 +916,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 			}
 			Preferences node = getPreferences();
 			if (node != null) {
-				getPreferences().node(repoKey).removeNode();
+				node.node(repoKey).removeNode();
 				saveToPreferences();
 			}
 			clearNotFound(toRemove);
@@ -876,7 +955,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 					log("Error removing invalid repository", e); //$NON-NLS-1$
 				}
 			}
-			RepositoryInfo info = new RepositoryInfo();
+			RepositoryInfo<T> info = new RepositoryInfo<T>();
 			info.location = location;
 			info.name = child.get(KEY_NAME, null);
 			info.nickname = child.get(KEY_NICKNAME, null);
@@ -909,7 +988,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	 */
 	private void restoreRepositories() {
 		synchronized (repositoryLock) {
-			repositories = new HashMap();
+			repositories = new HashMap<String, RepositoryInfo<T>>();
 			restoreSpecialRepositories();
 			restoreFromSystemProperty();
 			restoreFromPreferences();
@@ -944,7 +1023,7 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
+			RepositoryInfo<T> info = repositories.get(getKey(location));
 			if (info == null || info.isEnabled == enablement)
 				return;
 			info.isEnabled = enablement;
@@ -953,19 +1032,23 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 		broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ENABLEMENT, enablement);
 	}
 
-	/**
-	 * Shuts down the repository manager.
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
 	 */
-	public void shutdown() {
-		IProvisioningEventBus bus = (IProvisioningEventBus) ServiceHelper.getService(Activator.getContext(), IProvisioningEventBus.SERVICE_NAME);
-		if (bus != null)
-			bus.removeListener(this);
+	public void start() {
+		//nothing to do
+	}
+
+	/*(non-Javadoc)
+	 * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
+	 */
+	public void stop() {
+		eventBus.removeListener(this);
 		//ensure all repository state in memory is written to disk
 		boolean changed = false;
 		synchronized (repositoryLock) {
 			if (repositories != null) {
-				for (Iterator it = repositories.values().iterator(); it.hasNext();) {
-					RepositoryInfo info = (RepositoryInfo) it.next();
+				for (RepositoryInfo<T> info : repositories.values()) {
 					changed |= remember(info, false);
 				}
 			}
@@ -982,25 +1065,108 @@ public abstract class AbstractRepositoryManager implements IRepositoryManager, P
 	/**
 	 * Optimize the order in which repository suffixes are searched by trying 
 	 * the last successfully loaded suffix first.
+	 * @nooverride This method is not intended to be re-implemented or extended by clients.
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
-	private String[] sortSuffixes(String[] suffixes, URI location) {
+	protected String[] sortSuffixes(String[] suffixes, URI location, String[] preferredOrder) {
+		String[] result = new String[suffixes.length];
+		System.arraycopy(suffixes, 0, result, 0, suffixes.length);
+
 		synchronized (repositoryLock) {
 			if (repositories == null)
 				restoreRepositories();
-			RepositoryInfo info = (RepositoryInfo) repositories.get(getKey(location));
-			if (info == null || info.suffix == null)
-				return suffixes;
-			//move lastSuffix to the front of the list but preserve order of remaining entries
-			String lastSuffix = info.suffix;
-			for (int i = 0; i < suffixes.length; i++) {
-				if (lastSuffix.equals(suffixes[i])) {
-					System.arraycopy(suffixes, 0, suffixes, 1, i);
-					suffixes[0] = lastSuffix;
-					return suffixes;
+			RepositoryInfo<T> info = repositories.get(getKey(location));
+			if (info != null && info.suffix != null) {
+				//move lastSuffix to the front of the list but preserve order of remaining entries
+				String lastSuffix = info.suffix;
+				for (int i = 0; i < result.length; i++) {
+					if (lastSuffix.equals(result[i])) {
+						System.arraycopy(result, 0, result, 1, i);
+						result[0] = lastSuffix;
+						break;
+					}
 				}
 			}
+			// Now make sure that anything in the "preferredOrder" is at the top
+			if (preferredOrder != null) {
+				int priority = 0;
+				for (int i = 0; i < preferredOrder.length; i++) {
+					String currentSuffix = preferredOrder[i];
+					if (LocationProperties.END.equals(currentSuffix.trim())) {
+						// All suffixes from here on should be ignored
+						String[] tmp = new String[priority];
+						System.arraycopy(result, 0, tmp, 0, priority);
+						return tmp;
+					}
+					for (int j = priority; j < result.length; j++) {
+						if (result[j].equalsIgnoreCase(currentSuffix.trim())) {
+							String tmp = result[j];
+							System.arraycopy(result, priority, result, priority + 1, j - priority);
+							result[priority] = tmp;
+							priority++;
+							break;
+						}
+					}
+				}
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Performs a query against the contents of each known 
+	 * repository, accumulating any objects that satisfy the query in the 
+	 * provided collector.
+	 * <p>
+	 * Note that using this method can be quite expensive, as every known
+	 * repository will be loaded in order to query each one.  If a
+	 * client wishes to query only certain repositories, it is better to use
+	 * {@link #getKnownRepositories(int)} to filter the list of repositories
+	 * loaded and then query each of the returned repositories.
+	 * <p>
+	 * This method is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * 
+	 * @param query The query to perform against each element in each known repository
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return A collector containing the results of the query
+	 */
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		URI[] locations = getKnownRepositories(REPOSITORIES_ALL);
+		List<IRepository<T>> queryables = new ArrayList<IRepository<T>>(locations.length); // use a list since we don't know exactly how many will load
+		SubMonitor sub = SubMonitor.convert(monitor, locations.length * 10);
+		for (int i = 0; i < locations.length; i++) {
+			try {
+				if (sub.isCanceled())
+					throw new OperationCanceledException();
+				queryables.add(loadRepository(locations[i], sub.newChild(9), null, 0));
+			} catch (ProvisionException e) {
+				//ignore this repository for this query
+			}
+		}
+		try {
+			IQueryable<T> compoundQueryable = QueryUtil.compoundQueryable(queryables);
+			return compoundQueryable.query(query, sub.newChild(locations.length * 1));
+		} finally {
+			sub.done();
 		}
-		return suffixes;
 	}
 
+	private static URI getIndexFileURI(URI base) throws URISyntaxException {
+		final String name = INDEX_FILE;
+		String spec = base.toString();
+		if (spec.endsWith(name))
+			return base;
+		if (spec.endsWith("/")) //$NON-NLS-1$
+			spec += name;
+		else
+			spec += "/" + name; //$NON-NLS-1$
+		return new URI(spec);
+	}
+
+	private Transport getTransport() {
+		return RepositoryTransport.getInstance();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
new file mode 100644
index 0000000..b2f599b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/DebugHelper.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository.helpers;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.osgi.service.debug.DebugOptions;
+
+public class DebugHelper {
+	public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+
+	public static final boolean DEBUG_REPOSITORY_CREDENTIALS;
+	public static final boolean DEBUG_REPOSITORY_TRANSPORT;
+
+	static {
+		DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.getContext(), DebugOptions.class.getName());
+		if (options != null) {
+			DEBUG_REPOSITORY_CREDENTIALS = options.getBooleanOption(Activator.ID + "/credentials/debug", false); //$NON-NLS-1$
+			DEBUG_REPOSITORY_TRANSPORT = options.getBooleanOption(Activator.ID + "/transport/debug", false); //$NON-NLS-1$
+		} else {
+			DEBUG_REPOSITORY_CREDENTIALS = false;
+			DEBUG_REPOSITORY_TRANSPORT = false;
+		}
+	}
+
+	public static void debug(String name, String message) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("["); //$NON-NLS-1$
+		buffer.append(Activator.ID + "-" + name); //$NON-NLS-1$
+		buffer.append("] "); //$NON-NLS-1$
+		buffer.append(new Date(System.currentTimeMillis()));
+		buffer.append(" - ["); //$NON-NLS-1$
+		buffer.append(Thread.currentThread().getName());
+		buffer.append("] " + LINE_SEPARATOR); //$NON-NLS-1$
+		buffer.append(message);
+		System.out.println(buffer.toString());
+	}
+
+	public static void debug(String name, String message, Object[] keyValueArray) {
+		if (keyValueArray == null || keyValueArray.length == 0)
+			debug(name, message);
+		else {
+			Map<Object, Object> params = new LinkedHashMap<Object, Object>(keyValueArray.length / 2);
+			for (int i = 0; i < keyValueArray.length; i += 2)
+				params.put(keyValueArray[i], keyValueArray[i + 1]);
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(message);
+			buffer.append(formatMap(params, true, true));
+			debug(name, buffer.toString());
+		}
+
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("["); //$NON-NLS-1$
+		buffer.append(Activator.ID + "-" + name); //$NON-NLS-1$
+		buffer.append("] "); //$NON-NLS-1$
+		buffer.append(new Date(System.currentTimeMillis()));
+		buffer.append(" - ["); //$NON-NLS-1$
+		buffer.append(Thread.currentThread().getName());
+		buffer.append("] " + LINE_SEPARATOR); //$NON-NLS-1$
+		buffer.append(message);
+		System.out.println(buffer.toString());
+	}
+
+	public static String formatArray(Object[] array, boolean toString, boolean newLines) {
+		if (array == null || array.length == 0)
+			return "[]"; //$NON-NLS-1$
+
+		StringBuffer buffer = new StringBuffer();
+		buffer.append('[');
+		int i = 0;
+		for (;;) {
+			if (toString)
+				buffer.append(array[i].toString());
+			else
+				buffer.append(array[i].getClass().getName());
+			i++;
+			if (i == array.length)
+				break;
+			buffer.append(',');
+			if (newLines)
+				buffer.append(DebugHelper.LINE_SEPARATOR);
+			else
+				buffer.append(' ');
+		}
+		buffer.append(']');
+		return buffer.toString();
+	}
+
+	public static String formatMap(Map<?, ?> map, boolean toString, boolean newLines) {
+		if (map == null || map.size() == 0)
+			return "[]"; //$NON-NLS-1$
+
+		StringBuffer buffer = new StringBuffer();
+		buffer.append('[');
+		for (Entry<?, ?> e : map.entrySet()) {
+			buffer.append(e.getKey());
+			buffer.append('=');
+			if (toString)
+				buffer.append(e.getValue().toString());
+			else
+				buffer.append(e.getValue().getClass().getName());
+
+			buffer.append(',');
+			if (newLines) {
+				buffer.append(DebugHelper.LINE_SEPARATOR);
+				buffer.append("    "); //$NON-NLS-1$
+			} else
+				buffer.append(' ');
+		}
+		buffer.append(']');
+		return buffer.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java
new file mode 100644
index 0000000..1b39fd4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/LocationProperties.java
@@ -0,0 +1,210 @@
+/******************************************************************************* 
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.internal.p2.repository.helpers;
+
+import java.io.InputStream;
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * A representation of Location Properties.  Location properties are specified at a repository
+ * location in an index.p2 file as a series of properties.  To create this object, use the
+ * {@link LocationProperties#create(InputStream)} method. This method is guaranteed never to
+ * return null, however, if the location properties file does not exist, or it cannot be read,
+ * or it is improperly formated, isValid will return {@link LocationProperties#exists()} will 
+ * return false.
+ * 
+ * Version 1 specifies the following 2 properties
+ * version=1                                 <-- Required
+ * metadata.repository.factory.order =       <-- Optional
+ * artifact.repository.factory.order =       <-- Optional
+ * md5.hash.<factoryID> =                    <-- Optional
+ * 
+ * Where repository.factory.order is a comma separated list of strings 
+ * representing repository suffix filters.
+ * 
+ */
+public class LocationProperties {
+
+	public static final String END = "!"; //$NON-NLS-1$
+
+	private static final String VERSION = "version"; //$NON-NLS-1$
+	private static final String METADATA_REPOSITORY_FACTORY_ORDER = "metadata.repository.factory.order"; //$NON-NLS-1$
+	private static final String ARTIFACT_REPOSITORY_FACTORY_ORDER = "artifact.repository.factory.order"; //$NON-NLS-1$
+	private static final String MD5_HASH = "md5.hash."; //$NON-NLS-1$
+
+	private boolean isValid = false;
+	private Version version = Version.createOSGi(0, 0, 0); // Version 1
+	private String[] metadataSearchOrder = new String[0]; // Version 1
+	private String[] artifactSearchOrder = new String[0]; // Version 1
+	private Map<String, Boolean> md5Hashes = null; // Version 1
+
+	public static LocationProperties createEmptyIndexFile() {
+		return new LocationProperties();
+	}
+
+	/**
+	 * Creates a LocationProperties Object from an input stream. If the LocationProperties
+	 * could be created, it is returned.  If it could not be created, an empty LocationProperties
+	 * object is returned.  To check if the location properties file exists, call {@link LocationProperties#exists()};
+	 * 
+	 * @param stream The input stream from which to read the properties from
+	 * @return LocationPropreties if the stream represents a valid set of Location Properties
+	 */
+	public static LocationProperties create(InputStream stream) {
+		if (stream == null) {
+			return new LocationProperties();
+		}
+
+		Properties properties = new Properties();
+		try {
+			properties.load(stream);
+		} catch (Throwable e) {
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
+			return new LocationProperties();
+		}
+
+		if (properties.getProperty(VERSION) == null || properties.getProperty(VERSION).length() == 0)
+			return new LocationProperties();
+
+		try {
+			Version version = Version.parseVersion(properties.getProperty(VERSION));
+			if (version.compareTo(Version.createOSGi(1, 0, 0)) < 0)
+				return new LocationProperties();
+
+			LocationProperties locationProperties = new LocationProperties();
+			if (version.compareTo(Version.createOSGi(1, 0, 0)) == 0) {
+				if (locationProperties.initVersion1(properties))
+					return locationProperties;
+			}
+		} catch (Throwable t) {
+			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, t.getMessage(), t));
+		}
+		return new LocationProperties();
+	}
+
+	private LocationProperties() {
+		// empty constructor
+	}
+
+	/**
+	 * Returns true if the location properties exist, could be read, and conforms to a proper version.  
+	 * Returns false otherwise.
+	 */
+	public boolean exists() {
+		return isValid;
+	}
+
+	/**
+	 * Returns the Version of the location properties file.  This method is guaranteed 
+	 * to return a value for all location property files >= to Version 1.0
+	 * 
+	 * @return The Version of this set of location properties
+	 */
+	public Version getVersion() {
+		return this.version;
+	}
+
+	/**
+	 * Returns the metadata FactoryID search order of location properties file.  This method is
+	 * guaranteed to return a value for all location property files >= to Version 1.0
+	 * For all other Versions, this method will return an empty string array
+	 * 
+	 * If END (!) is specified, then all other repositories should be ignored.
+	 * 
+	 * @return The Metadata FactoryID Search Order
+	 */
+	public String[] getMetadataFactorySearchOrder() {
+		return this.metadataSearchOrder;
+	}
+
+	/**
+	 * Returns the artifact FactoryID search order of location properties file.  This method is
+	 * guaranteed to return a value for all location property files >= to Version 1.0
+	 * For all other Versions, this method will return an empty string array
+	 * 
+	 * If END (!) is specified, then all other repositories should be ignored.
+	 * 
+	 * @return The Metadata FactoryID Search Order
+	 */
+	public String[] getArtifactFactorySearchOrder() {
+		return this.artifactSearchOrder;
+	}
+
+	/**
+	 * Returns true if an MD5 has exists for the specified factoryID.  If the specified
+	 * factoryID was not specified in the LocatoinProperty file, this method
+	 * will return false.
+	 * 
+	 * @param factoryID
+	 */
+	public boolean hasMD5Hash(String factoryID) {
+		Boolean result = md5Hashes.get("md5." + factoryID); //$NON-NLS-1$
+		if (result == null)
+			return false;
+		return result.booleanValue();
+	}
+
+	/*
+	 * Sets up a set of location properties using the Version 1 format.
+	 */
+	private boolean initVersion1(Properties properties) {
+		if (properties.get(VERSION) == null)
+			return false;
+
+		Set<Entry<Object, Object>> entrySet = properties.entrySet();
+		for (Entry<Object, Object> entry : entrySet) {
+			if (VERSION.equals(entry.getKey())) {
+				this.version = Version.parseVersion((String) entry.getValue());
+			} else if (METADATA_REPOSITORY_FACTORY_ORDER.equals(entry.getKey())) {
+				initMetadataRepositoryFactoryOrder((String) entry.getValue());
+			} else if (ARTIFACT_REPOSITORY_FACTORY_ORDER.equals(entry.getKey())) {
+				initArtifactRepositoryFactoryOrder((String) entry.getValue());
+			} else if (((String) entry.getKey()).startsWith(MD5_HASH)) {
+				initHashMD5Hash((String) entry.getKey(), (String) entry.getValue());
+			}
+		}
+		this.isValid = true;
+		return true;
+	}
+
+	/**
+	 * @param key 
+	 * @param value
+	 */
+	private void initHashMD5Hash(String key, String value) {
+		// Empty for now
+	}
+
+	private void initArtifactRepositoryFactoryOrder(String repositoryFactoryOrder) {
+		repositoryFactoryOrder = repositoryFactoryOrder == null ? "" : repositoryFactoryOrder; //$NON-NLS-1$
+		StringTokenizer tokenizer = new StringTokenizer(repositoryFactoryOrder, ","); //$NON-NLS-1$
+		List<String> searchOrder = new ArrayList<String>();
+		while (tokenizer.hasMoreTokens()) {
+			searchOrder.add(tokenizer.nextToken().trim());
+		}
+		this.artifactSearchOrder = searchOrder.toArray(new String[searchOrder.size()]);
+	}
+
+	private void initMetadataRepositoryFactoryOrder(String repositoryFactoryOrder) {
+		repositoryFactoryOrder = repositoryFactoryOrder == null ? "" : repositoryFactoryOrder; //$NON-NLS-1$
+		StringTokenizer tokenizer = new StringTokenizer(repositoryFactoryOrder, ","); //$NON-NLS-1$
+		List<String> searchOrder = new ArrayList<String>();
+		while (tokenizer.hasMoreTokens()) {
+			searchOrder.add(tokenizer.nextToken().trim());
+		}
+		this.metadataSearchOrder = searchOrder.toArray(new String[searchOrder.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java
index 6932315..050693f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/RepositoryHelper.java
@@ -15,7 +15,7 @@ import java.io.File;
 import java.net.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.eclipse.osgi.util.NLS;
 
 public class RepositoryHelper {
@@ -53,7 +53,7 @@ public class RepositoryHelper {
 	 * @param repository the repository to test
 	 * @return the repository
 	 */
-	public static IRepository validDestinationRepository(IRepository repository) {
+	public static <T> IRepository<T> validDestinationRepository(IRepository<T> repository) {
 		if (!repository.isModifiable())
 			throw new IllegalStateException(NLS.bind(Messages.DestinationNotModifiable, repository.getLocation()));
 		return repository;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
index 15728fe..092c168 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2007, 2009 IBM Corporation and others.
+#  Copyright (c) 2007, 2011 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
 #  Contributors:
 #     IBM Corporation - initial API and implementation
 #     Cloudsmith Inc - additional messages
+#     Sonatype Inc - ongoing implementation
 ###############################################################################
 artifact_not_found=Artifact not found: {0}.
 
@@ -18,9 +19,9 @@ ecf_configuration_error=Transport initialization error.
 repoMan_internalError=Internal error.
 repo_loading = Loading the repository {0}
 
-
-
-
+CacheManager_Neither_0_nor_1_found=Neither {0} nor {1} found.
+CacheManager_AuthenticationFaileFor_0=Authentication failed for {0}.
+CacheManager_FailedCommunicationWithRepo_0=Communication with repository at {0} failed.
 
 exception_malformedRepoURI = The repository location ({0}) must be a URI.
 
@@ -71,3 +72,4 @@ FileTransport_cancelCheck=File Transport Cancel Handler
 connection_to_0_failed_on_1_retry_attempt_2=Connection to {0} failed on {1}. Retry attempt {2} started
 UnableToRead_0_TooManyAttempts=Unable to read repository at: {0}. Too many failed login attempts.
 UnableToRead_0_UserCanceled=Unable to read repository at: {0}. Login canceled by user.
+RepositoryTransport_failedReadRepo=Error while reading from repository: {0}.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java
deleted file mode 100644
index c180605..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/ICompositeRepository.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.repository;
-
-import java.net.URI;
-import java.util.List;
-
-public interface ICompositeRepository extends IRepository {
-	/**
-	 * 
-	 * @return a list of URIs containing the locations of the children repositories
-	 */
-	public abstract List getChildren();
-
-	/**
-	 * Removes all child repositories
-	 */
-	public abstract void removeAllChildren();
-
-	/**
-	 * Removes specified URI from list of child repositories.
-	 * Does nothing if specified URI is not a child repository
-	 * @param child
-	 */
-	public abstract void removeChild(URI child);
-
-	/**
-	 * Adds a specified URI to list of child repositories.
-	 * Does nothing if URI is a duplicate of an existing child repository.
-	 * @param child
-	 */
-	public abstract void addChild(URI child);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java
deleted file mode 100644
index c472b66..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepository.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IAdaptable;
-
-/**
- * Base interface that defines common properties that may be provided by 
- * various kinds of repositories.
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepository extends IAdaptable {
-	/** 
-	 * The key for a boolean property indicating that the repository
-	 * is a system repository.  System repositories are implementation details
-	 * that are not subject to general access, hidden from the typical user, etc.
-	 */
-	public static final String PROP_SYSTEM = "p2.system"; //$NON-NLS-1$
-
-	/**
-	 * The key for a boolean property indicating that repository metadata is
-	 * stored in compressed form.  A compressed repository will have lower
-	 * bandwidth cost to read when remote, but higher processing cost to
-	 * uncompress when reading.
-	 */
-	public static final String PROP_COMPRESSED = "p2.compressed"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing a human-readable name for the repository.
-	 */
-	public static final String PROP_NAME = "name"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing a user-defined name for the repository.
-	 * This property is never stored in the repository itself, but is instead tracked and managed
-	 * by an {@link IRepositoryManager}.
-	 */
-	public static final String PROP_NICKNAME = "p2.nickname"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing a human-readable description for the repository.
-	 */
-	public static final String PROP_DESCRIPTION = "description"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing the common base URL that should
-	 * be replaced with the mirror URL.
-	 */
-	public static final String PROP_MIRRORS_BASE_URL = "p2.mirrorsBaseURL"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing a URL that can return mirrors of this
-	 * repository.
-	 */
-	public static final String PROP_MIRRORS_URL = "p2.mirrorsURL"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property containing the time when the repository was last modified.
-	 */
-	public static final String PROP_TIMESTAMP = "p2.timestamp"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing the user name to an authenticated
-	 * URL.  This key is used in the secure preference store for repository data.
-	 * @see #PREFERENCE_NODE
-	 */
-	public static final String PROP_USERNAME = "username"; //$NON-NLS-1$
-
-	/**
-	 * The key for a string property providing the password to an authenticated
-	 * URL.  This key is used in the secure preference store for repository data.
-	 * @see #PREFERENCE_NODE
-	 */
-	public static final String PROP_PASSWORD = "password"; //$NON-NLS-1$
-
-	/**
-	 * The node identifier for repository secure preference store.
-	 */
-	public static final String PREFERENCE_NODE = "org.eclipse.equinox.p2.repository"; //$NON-NLS-1$
-
-	/**
-	 * A repository type constant (value 0) representing a metadata repository.
-	 */
-	public static final int TYPE_METADATA = 0;
-
-	/**
-	 * A repository type constant (value 1) representing an artifact repository.
-	 */
-	public static final int TYPE_ARTIFACT = 1;
-
-	/** 
-	 * General purpose zero-valued bit mask constant. Useful whenever you need to
-	 * supply a bit mask with no bits set.
-	 */
-	public static final int NONE = 0;
-
-	/**
-	 * An option flag constant (value 1) indicating an enabled repository.
-	 */
-	public static final int ENABLED = 1;
-
-	/**
-	 * Returns the URL of the repository.
-	 * TODO: Should we use URL or URI? URL requires a protocol handler
-	 * to be installed in Java.  Can the URL have any protocol?
-	 * @return the URL of the repository.
-	 */
-	public URI getLocation();
-
-	/**
-	 * Returns the name of the repository.
-	 * @return the name of the repository.
-	 */
-	public String getName();
-
-	/**
-	 * Returns a string representing the type of the repository.
-	 * @return the type of the repository.
-	 */
-	public String getType();
-
-	/**
-	 * Returns a string representing the version for the repository type.
-	 * @return the version of the type of the repository.
-	 */
-	public String getVersion();
-
-	/**
-	 * Returns a brief description of the repository.
-	 * @return the description of the repository.
-	 */
-	public String getDescription();
-
-	/**
-	 * Returns the name of the provider of the repository.
-	 * @return the provider of this repository.
-	 */
-	public String getProvider();
-
-	/**
-	 * Returns a read-only collection of the properties of the repository.
-	 * @return the properties of this repository.
-	 */
-	public Map getProperties();
-
-	/**
-	 * Returns <code>true</code> if this repository can be modified.
-	 * @return whether or not this repository can be modified
-	 */
-	public boolean isModifiable();
-
-	/**
-	 * Set the name of the repository.
-	 */
-	public void setName(String name);
-
-	/**
-	 * Sets the description of the repository.
-	 */
-	public void setDescription(String description);
-
-	/**
-	 * Sets the value of the property with the given key. Returns the old property
-	 * associated with that key, if any.  Setting a value of <code>null</code> will
-	 * remove the corresponding key from the properties of this repository.
-	 * 
-	 * @param key The property key
-	 * @param value The new property value, or <code>null</code> to remove the key
-	 * @return The old property value, or <code>null</code> if there was no old value
-	 */
-	public String setProperty(String key, String value);
-
-	/**
-	 * Sets the name of the provider of the repository.
-	 */
-	public void setProvider(String provider);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java
deleted file mode 100644
index 6506ded..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/IRepositoryManager.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.repository;
-
-import java.net.URI;
-
-/**
- * The common base class for metadata and artifact repository managers.
- * <p>
- * A repository manager keeps track of a set of known repositories, and provides 
- * caching of these known repositories to avoid unnecessary loading of repositories 
- * from the disk or network.  The manager fires {@link RepositoryEvent}s when the 
- * set of known repositories changes.
- * </p>
- * <p>
- * All {@link URI} instances provided to a repository manager must be absolute.
- * </p>
- * 
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IRepositoryManager {
-	/**
-	 * Constant used to indicate that all enabled repositories are of interest.
-	 */
-	public static final int REPOSITORIES_ALL = 0;
-
-	/**
-	 * Constant used to indicate that disabled repositories are of interest.
-	 * @see #getKnownRepositories(int)
-	 */
-	public static final int REPOSITORIES_DISABLED = 1 << 3;
-
-	/**
-	 * Constant used to indicate that local repositories are of interest.
-	 * @see #getKnownRepositories(int)
-	 */
-	public static final int REPOSITORIES_LOCAL = 1 << 2;
-
-	/**
-	 * Constant used to indicate that non-system repositories are of interest.
-	 * @see IRepository#PROP_SYSTEM
-	 * @see #getKnownRepositories(int)
-	 */
-	public static final int REPOSITORIES_NON_SYSTEM = 1 << 1;
-
-	/**
-	 * Constant used to indicate that system repositories are of interest.
-	 * @see IRepository#PROP_SYSTEM
-	 * @see #getKnownRepositories(int)
-	 */
-	public static final int REPOSITORIES_SYSTEM = 1 << 0;
-
-	/**
-	 * Constant used to indicate that a repository manager should only load the
-	 * repository if the repository is modifiable.
-	 * @see IRepository#isModifiable()
-	 */
-	public static final int REPOSITORY_HINT_MODIFIABLE = 1 << 0;
-
-	/**
-	 * Adds the repository at the given location to the list of repositories tracked by 
-	 * this repository manager.
-	 * <p>
-	 * If there is a known disabled repository at the given location, it will become
-	 * enabled as a result of this method. Thus the caller can be guaranteed that
-	 * there is a known, enabled repository at the given location when this method returns.
-	 * 
-	 * @param location The absolute location of the repository to add
-	 * @see #isEnabled(URI)
-	 */
-	public void addRepository(URI location);
-
-	/**
-	 * Returns whether a repository at the given location is in the list of repositories
-	 * tracked by this repository manager.
-	 * 
-	 * @param location The absolute location of the repository to look for
-	 * @return <code>true</code> if the repository is known to this manager,
-	 * and <code>false</code> otherwise
-	 */
-	public boolean contains(URI location);
-
-	/**
-	 * Returns the artifact repository locations known to the repository manager.
-	 * <p>
-	 * Note that the repository manager does not guarantee that a valid repository
-	 * exists at any of the returned locations at any particular moment in time.
-	 * A subsequent attempt to load a repository at any of the given locations may
-	 * or may not succeed.
-	 * 
-	 * @param flags an integer bit-mask indicating which repositories should be
-	 * returned.  <code>REPOSITORIES_ALL</code> can be used as the mask when
-	 * all enabled repositories should be returned.
-	 * @return the locations of the repositories managed by this repository manager.
-	 * 
-	 * @see #REPOSITORIES_ALL
-	 * @see #REPOSITORIES_SYSTEM
-	 * @see #REPOSITORIES_NON_SYSTEM
-	 * @see #REPOSITORIES_LOCAL
-	 * @see #REPOSITORIES_DISABLED
-	 */
-	public URI[] getKnownRepositories(int flags);
-
-	/**
-	 * Returns the property associated with the repository at the given URI, 
-	 * without loading the repository.
-	 * <p>
-	 * Note that some properties for a repository can only be
-	 * determined when that repository is loaded.  This method will return <code>null</code>
-	 * for such properties.  Only values for the properties that are already
-	 * known by a repository manager will be returned. 
-	 * <p>
-	 * If a client wishes to retrieve a property value from a repository 
-	 * regardless of the cost of retrieving it, the client should load the 
-	 * repository and then retrieve the property from the repository itself.
-	 * 
-	 * @param location the absolute URI of the repository in question
-	 * @param key the String key of the property desired
-	 * @return the value of the property, or <code>null</code> if the repository
-	 * does not exist, the value does not exist, or the property value 
-	 * could not be determined without loading the repository.
-	 * 
-	 * @see IRepository#getProperties()
-	 * @see #setRepositoryProperty(URI, String, String)
-	 */
-	public String getRepositoryProperty(URI location, String key);
-
-	/**
-	 * Sets the property associated with the repository at the given URI, 
-	 * without loading the repository.
-	 * <p>
-	 * This method stores properties in a cache in the repository manager and does
-	 * not write the property to the backing repository. This is useful for making
-	 * repository properties available without incurring the cost of loading the repository.
-	 * When the repository is loaded, it will overwrite any conflicting properties that
-	 * have been set using this method.
-	 * </p>
-	 * <p>
-	 * To persistently set a property on a repository, clients must load
-	 * the repository and call {@link IRepository#setProperty(String, String)}.
-	 * </p>
-	 * 
-	 * @param location the absolute URI of the repository in question
-	 * @param key the String key of the property desired
-	 * @param value the value to set the property to
-	 * @see #getRepositoryProperty(URI, String)
-	 * @see IRepository#setProperty(String, String)
-	 */
-	public void setRepositoryProperty(URI location, String key, String value);
-
-	/**
-	 * Returns the enablement value of a repository.  Disabled repositories are known
-	 * to the repository manager, but are never used in the context of provisioning
-	 * operations. Disabled repositories are useful as a form of bookmark to indicate that a 
-	 * repository location is of interest, but not currently used.
-	 * <p>
-	 * Note that enablement is a property of the repository manager and not a property
-	 * of the affected repository. The enablement of the repository is discarded when 
-	 * a repository is removed from the repository manager.
-	 * 
-	 * @param location The absolute location of the repository whose enablement is requested
-	 * @return <code>true</code> if the repository is enabled, and
-	 * <code>false</code> if it is not enabled, or if the repository location 
-	 * is not known to the repository manager.
-	 * @see #REPOSITORIES_DISABLED
-	 * @see #setEnabled(URI, boolean)
-	 */
-	public boolean isEnabled(URI location);
-
-	/**
-	 * Removes the repository at the given location from the list of
-	 * repositories known to this repository manager.  The underlying
-	 * repository is not deleted. This method has no effect if the given
-	 * repository is not already known to this repository manager.
-	 * 
-	 * @param location The absolute location of the repository to remove
-	 * @return <code>true</code> if a repository was removed, and 
-	 * <code>false</code> otherwise.
-	 */
-	public boolean removeRepository(URI location);
-
-	/**
-	 * Sets the enablement of a repository. Disabled repositories are known
-	 * to the repository manager, but are never used in the context of provisioning
-	 * operation. Disabled repositories are useful as a form of bookmark to indicate that a 
-	 * repository location is of interest, but not currently used.
-	 * <p>
-	 * Note that enablement is a property of the repository manager and not a property
-	 * of the affected repository. The enablement of the repository is discarded when 
-	 * a repository is removed from the repository manager.
-	 * <p>
-	 * This method has no effect if the given repository location is not known to the
-	 * repository manager.
-	 * 
-	 * @param location The absolute location of the repository to enable or disable
-	 * @param enablement <code>true</code>to enable the repository, and
-	 * <code>false</code> to disable the repository
-	 * @see #REPOSITORIES_DISABLED
-	 * @see #isEnabled(URI)
-	 */
-	public void setEnabled(URI location, boolean enablement);
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java
deleted file mode 100644
index 0a6899a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryCreationException.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.repository;
-
-public class RepositoryCreationException extends Exception {
-
-	private static final long serialVersionUID = -5648382121963317100L;
-
-	public RepositoryCreationException(Throwable e) {
-		super(e);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
index 1768f9c..9342c6f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,11 +12,14 @@ package org.eclipse.equinox.internal.provisional.p2.repository;
 
 import java.net.URI;
 import java.util.EventObject;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.repository.IRepository;
 
 /**
  * An event indicating a repository was added, removed, changed,
  * or discovered.
  * 
+ * @see IProvisioningEventBus
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class RepositoryEvent extends EventObject {
@@ -146,4 +149,40 @@ public class RepositoryEvent extends EventObject {
 		return isEnabled;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * @see java.util.EventObject#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("RepositoryEvent["); //$NON-NLS-1$
+		switch (kind) {
+			case ADDED :
+				buffer.append("ADDED "); //$NON-NLS-1$
+				break;
+			case CHANGED :
+				buffer.append("CHANGED "); //$NON-NLS-1$
+				break;
+			case DISCOVERED :
+				buffer.append("DISCOVERED "); //$NON-NLS-1$
+				break;
+			case ENABLEMENT :
+				buffer.append("ENABLED "); //$NON-NLS-1$
+				break;
+			case REMOVED :
+				buffer.append("REMOVED "); //$NON-NLS-1$
+				break;
+		}
+		if (type == IRepository.TYPE_ARTIFACT)
+			buffer.append("Artifact "); //$NON-NLS-1$
+		else
+			buffer.append("Metadata "); //$NON-NLS-1$
+		// uri
+		buffer.append(getSource().toString());
+		if (nickname != null)
+			buffer.append("Nickname: " + nickname); //$NON-NLS-1$
+		buffer.append(" Enabled: " + Boolean.toString(isEnabled)); //$NON-NLS-1$
+		buffer.append("] "); //$NON-NLS-1$
+		return buffer.toString();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java
deleted file mode 100644
index dac525c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/spi/p2/repository/AbstractRepository.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.spi.p2.repository;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-
-/**
-* AbstractRepository defines common properties that may be provided by various kinds
-* of repositories.
-* <p>
-* Clients may extend this class.
-* </p>
-*/
-public abstract class AbstractRepository extends PlatformObject implements IRepository {
-	protected String description;
-	protected transient URI location;
-	protected String name;
-	protected Map properties = new OrderedProperties();
-	protected String provider;
-	protected String type;
-	protected String version;
-
-	protected AbstractRepository(String name, String type, String version, URI location, String description, String provider, Map properties) {
-		this.name = name;
-		this.type = type;
-		this.version = version;
-		this.location = location;
-		this.description = description == null ? "" : description; //$NON-NLS-1$
-		this.provider = provider == null ? "" : provider; //$NON-NLS-1$
-		if (properties != null)
-			this.properties.putAll(properties);
-	}
-
-	/**
-	 * Asserts that this repository is modifiable, throwing a runtime exception if
-	 * it is not. This is suitable for use by subclasses when an attempt is made
-	 * to write to a repository.
-	 */
-	protected void assertModifiable() {
-		if (!isModifiable())
-			throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns a brief description of the repository.
-	 * @return the description of the repository.
-	 */
-	public synchronized String getDescription() {
-		return description;
-	}
-
-	/**
-	 * Returns the location of this repository.
-	 * TODO: Should we use URL or URI? URL requires a protocol handler
-	 * to be installed in Java.  Can the URL have any protocol?
-	 * @return the URL of the repository.
-	 */
-	public synchronized URI getLocation() {
-		return location;
-	}
-
-	/**
-	 * Returns the name of the repository.
-	 * @return the name of the repository.
-	 */
-	public synchronized String getName() {
-		return name;
-	}
-
-	/**
-	 * Returns a read-only collection of the properties of the repository.
-	 * @return the properties of this repository.
-	 */
-	public synchronized Map getProperties() {
-		return OrderedProperties.unmodifiableProperties(properties);
-	}
-
-	/**
-	 * Returns the name of the provider of the repository.
-	 * @return the provider of this repository.
-	 */
-	public synchronized String getProvider() {
-		return provider;
-	}
-
-	/**
-	 * Returns a string representing the type of the repository.
-	 * @return the type of the repository.
-	 */
-	public synchronized String getType() {
-		return type;
-	}
-
-	/**
-	 * Returns a string representing the version for the repository type.
-	 * @return the version of the type of the repository.
-	 */
-	public synchronized String getVersion() {
-		return version;
-	}
-
-	public boolean isModifiable() {
-		return false;
-	}
-
-	public synchronized void setDescription(String description) {
-		this.description = description;
-	}
-
-	public synchronized void setName(String value) {
-		this.name = value;
-	}
-
-	public synchronized String setProperty(String key, String value) {
-		assertModifiable();
-		return (String) (value == null ? properties.remove(key) : properties.put(key, value));
-	}
-
-	public synchronized void setProvider(String provider) {
-		this.provider = provider;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/ICompositeRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/ICompositeRepository.java
new file mode 100644
index 0000000..44e6999
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/ICompositeRepository.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository;
+
+import java.net.URI;
+import java.util.List;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * A composite repository doesn't directly contain any contents, but rather contains
+ * only a list of child repositories. The composite repository aggregates content
+ * from the children and acts as a single repository containing the union of all
+ * child contents. When a composite repository is queried programmatically,
+ * it will appear to contain all elements that currently exist in one or more
+ * of its children. 
+ * @param <T> The type of repository content. Typically this is either {@link IInstallableUnit}
+ * or {@link IArtifactKey}.
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface ICompositeRepository<T> extends IRepository<T> {
+	/**
+	 * Adds a specified URI to list of child repositories.
+	 * Does nothing if URI is a duplicate of an existing child repository.
+	 * @param child
+	 */
+	public void addChild(URI child);
+
+	/**
+	 * Returns a list of URIs containing the locations of the children repositories
+	 * 
+	 * @return a list of URIs containing the locations of the children repositories
+	 */
+	public List<URI> getChildren();
+
+	/**
+	 * Removes all child repositories
+	 */
+	public void removeAllChildren();
+
+	/**
+	 * Removes the specified URI from the list of child repositories.
+	 * This method has no effect if the specified URI is not a child repository
+	 * @param child The child to remove
+	 */
+	public void removeChild(URI child);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java
new file mode 100644
index 0000000..35a722a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepository.java
@@ -0,0 +1,207 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.query.IQueryable;
+
+/**
+ * A p2 repository contains either metadata or artifacts related to software
+ * provisioning. This base interface defines properties common to all types
+ * of repositories.
+ * @param <T> The type of contents contained in this repository
+ * 
+ * @noimplement This interface is not intended to be implemented by clients. Instead the abstract classes implementing this interface should be used.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IRepository<T> extends IAdaptable, IQueryable<T> {
+	/** 
+	 * The key for a boolean property indicating that the repository
+	 * is a system repository.  System repositories are implementation details
+	 * that are not subject to general access, hidden from the typical user, etc.
+	 * This property is never stored in the repository itself, but is instead tracked and 
+	 * managed by an {@link IRepositoryManager}.
+	 * @see IRepositoryManager#getRepositoryProperty(URI, String)
+	 */
+	public static final String PROP_SYSTEM = "p2.system"; //$NON-NLS-1$
+
+	/**
+	 * The key for a boolean property indicating that repository metadata is
+	 * stored in compressed form.  A compressed repository will have lower
+	 * bandwidth cost to read when remote, but higher processing cost to
+	 * uncompress when reading.
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_COMPRESSED = "p2.compressed"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing a human-readable name for the repository.
+	 * @see IRepositoryManager#getRepositoryProperty(URI, String)
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_NAME = "name"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing a user-defined name for the repository.
+	 * This property is never stored in the repository itself, but is instead tracked and 
+	 * managed by an {@link IRepositoryManager}.
+	 * @see IRepositoryManager#getRepositoryProperty(URI, String)
+	 */
+	public static final String PROP_NICKNAME = "p2.nickname"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing a human-readable description for the repository.
+	 * @see IRepositoryManager#getRepositoryProperty(URI, String)
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_DESCRIPTION = "description"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing the common base URL that should
+	 * be replaced with the mirror URL.
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_MIRRORS_BASE_URL = "p2.mirrorsBaseURL"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing a URL that can return mirrors of this
+	 * repository.
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_MIRRORS_URL = "p2.mirrorsURL"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property containing the time when the repository was last modified.
+	 * @see IRepository#getProperties()
+	 */
+	public static final String PROP_TIMESTAMP = "p2.timestamp"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing the user name to an authenticated
+	 * URL.  This key is used in the secure preference store for repository data.
+	 * @see #PREFERENCE_NODE
+	 */
+	public static final String PROP_USERNAME = "username"; //$NON-NLS-1$
+
+	/**
+	 * The key for a string property providing the password to an authenticated
+	 * URL.  This key is used in the secure preference store for repository data.
+	 * @see #PREFERENCE_NODE
+	 */
+	public static final String PROP_PASSWORD = "password"; //$NON-NLS-1$
+
+	/**
+	 * The node identifier for repository secure preference store.
+	 */
+	public static final String PREFERENCE_NODE = "org.eclipse.equinox.p2.repository"; //$NON-NLS-1$
+
+	/**
+	 * A repository type constant (value 0) representing a metadata repository.
+	 */
+	public static final int TYPE_METADATA = 0;
+
+	/**
+	 * A repository type constant (value 1) representing an artifact repository.
+	 */
+	public static final int TYPE_ARTIFACT = 1;
+
+	/** 
+	 * General purpose zero-valued bit mask constant. Useful whenever you need to
+	 * supply a bit mask with no bits set.
+	 */
+	public static final int NONE = 0;
+
+	/**
+	 * An option flag constant (value 1) indicating an enabled repository.
+	 */
+	public static final int ENABLED = 1;
+
+	/**
+	 * Returns the location of this repository.
+	 * @return the URI representing the repository location.
+	 */
+	public URI getLocation();
+
+	/**
+	 * Returns the name of the repository.
+	 * @return the name of the repository.
+	 */
+	public String getName();
+
+	/**
+	 * Returns a string representing the type of the repository. Note this method
+	 * does not indicate the type of repository contents (metadata or artifacts),
+	 * but instead the unique fully qualified id representing the repository implementation.
+	 * @return the type of the repository.
+	 */
+	public String getType();
+
+	/**
+	 * Returns a string representing the version for the repository type.
+	 * @return the version of the type of the repository.
+	 */
+	public String getVersion();
+
+	/**
+	 * Returns a brief description of the repository.
+	 * @return the description of the repository.
+	 */
+	public String getDescription();
+
+	/**
+	 * Returns the name of the provider of the repository.
+	 * @return the provider of this repository.
+	 */
+	public String getProvider();
+
+	/**
+	 * Returns a read-only collection of the properties of the repository.
+	 * @return the properties of this repository.
+	 */
+	public Map<String, String> getProperties();
+
+	/**
+	 * Returns the repository property with the given key, or <code>null</code>
+	 * if no such property is defined
+	 * @param key the property key
+	 * @return the property value, or <code>null</code>
+	 */
+	public String getProperty(String key);
+
+	/**
+	 * Returns the provisioning agent that manages this repository
+	 * @return A provisioning agent.
+	 */
+	public IProvisioningAgent getProvisioningAgent();
+
+	/**
+	 * Returns <code>true</code> if this repository can be modified, and
+	 * <code>false</code> otherwise. Attempts to change the contents of
+	 * an unmodifiable repository will fail.
+	 * @return whether or not this repository can be modified
+	 */
+	public boolean isModifiable();
+
+	/**
+	 * Sets the value of the property with the given key. Returns the old property
+	 * associated with that key, if any.  Setting a value of <code>null</code> will
+	 * remove the corresponding key from the properties of this repository.
+	 * 
+	 * @param key The property key
+	 * @param value The new property value, or <code>null</code> to remove the key
+	 * @return The old property value, or <code>null</code> if there was no old value
+	 */
+	public String setProperty(String key, String value);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java
new file mode 100644
index 0000000..2cb3d22
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryManager.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository;
+
+import java.net.URI;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.query.IQueryable;
+
+/**
+ * The common base class for metadata and artifact repository managers.
+ * <p>
+ * A repository manager keeps track of a set of known repositories, and provides 
+ * caching of these known repositories to avoid unnecessary loading of repositories 
+ * from the disk or network.
+ * </p>
+ * <p>
+ * All {@link URI} instances provided to a repository manager must be absolute.
+ * </p>
+ * @param <T> the type of contents in the repositories controlled by this manager
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IRepositoryManager<T> extends IQueryable<T> {
+	/**
+	 * Constant used to indicate that all enabled repositories are of interest.
+	 */
+	public static final int REPOSITORIES_ALL = 0;
+
+	/**
+	 * Constant used to indicate that only system repositories are of interest.
+	 * @see IRepository#PROP_SYSTEM
+	 * @see #getKnownRepositories(int)
+	 */
+	public static final int REPOSITORIES_SYSTEM = 1 << 0;
+
+	/**
+	 * Constant used to indicate that only non-system repositories are of interest.
+	 * @see IRepository#PROP_SYSTEM
+	 * @see #getKnownRepositories(int)
+	 */
+	public static final int REPOSITORIES_NON_SYSTEM = 1 << 1;
+
+	/**
+	 * Constant used to indicate that only local repositories are of interest. Any
+	 * repository that requires network communication will be omitted when
+	 * this flag is used.
+	 * @see #getKnownRepositories(int)
+	 */
+	public static final int REPOSITORIES_LOCAL = 1 << 2;
+
+	/**
+	 * Constant used to indicate that only remote repositories are of interest. Any
+	 * repository that doesn't require network communication will be omitted when
+	 * this flag is used.
+	 * @see #getKnownRepositories(int)
+	 */
+	public static final int REPOSITORIES_NON_LOCAL = 1 << 4;
+
+	/**
+	 * Constant used to indicate that only disabled repositories are of interest.
+	 * When this flag is used, all enabled repositories will be ignored and
+	 * all disabled repositories that match the remaining filters will be returned.
+	 * @see #getKnownRepositories(int)
+	 */
+	public static final int REPOSITORIES_DISABLED = 1 << 3;
+
+	/**
+	 * Constant used to indicate that a repository manager should only load the
+	 * repository if the repository is modifiable.
+	 * @see IRepository#isModifiable()
+	 */
+	public static final int REPOSITORY_HINT_MODIFIABLE = 1 << 0;
+
+	/**
+	 * Adds the repository at the given location to the list of repositories tracked by 
+	 * this repository manager. This method does not attempt to contact or load
+	 * the repository, and makes no attempt to determine whether there is a valid
+	 * repository at the provided location.
+	 * <p>
+	 * If there is a known disabled repository at the given location, it will become
+	 * enabled as a result of this method. Thus the caller can be guaranteed that
+	 * there is a known, enabled repository at the given location when this method returns.
+	 * 
+	 * @param location The absolute location of the repository to add
+	 * @see #isEnabled(URI)
+	 */
+	public void addRepository(URI location);
+
+	/**
+	 * Returns whether a repository at the given location is in the list of repositories
+	 * tracked by this repository manager.
+	 * 
+	 * @param location The absolute location of the repository to look for
+	 * @return <code>true</code> if the repository is known to this manager,
+	 * and <code>false</code> otherwise
+	 */
+	public boolean contains(URI location);
+
+	/**
+	 * Returns the provisioning agent in charge of this repository manager
+	 * @return The provisioning agent.
+	 */
+	public IProvisioningAgent getAgent();
+
+	/**
+	 * Returns the artifact repository locations known to the repository manager.
+	 * <p>
+	 * Note that the repository manager does not guarantee that a valid repository
+	 * exists at any of the returned locations at any particular moment in time.
+	 * A subsequent attempt to load a repository at any of the given locations may
+	 * or may not succeed.
+	 * 
+	 * @param flags an integer bit-mask indicating which repositories should be
+	 * returned.  <code>REPOSITORIES_ALL</code> can be used as the mask when
+	 * all enabled repositories should be returned. Disabled repositories are automatically
+	 * excluded unless the {@link #REPOSITORIES_DISABLED} flag is set.
+	 * @return the locations of the repositories managed by this repository manager.
+	 * 
+	 * @see #REPOSITORIES_ALL
+	 * @see #REPOSITORIES_SYSTEM
+	 * @see #REPOSITORIES_NON_SYSTEM
+	 * @see #REPOSITORIES_LOCAL
+	 * @see #REPOSITORIES_DISABLED
+	 */
+	public URI[] getKnownRepositories(int flags);
+
+	/**
+	 * Returns the property associated with the repository at the given URI, 
+	 * without loading the repository.
+	 * <p>
+	 * Note that only the repository properties referenced below are tracked by the 
+	 * repository manager itself. For all other properties, this method will return <code>null</code>.
+	 * Only values for the properties that are already known by a repository manager will be returned. 
+	 * </p>
+	 * <p>
+	 * If a client wishes to retrieve a property value from a repository 
+	 * regardless of the cost of retrieving it, the client should load the 
+	 * repository and then retrieve the property from the repository itself.
+	 * </p>
+	 * 
+	 * @param location the absolute URI of the repository in question
+	 * @param key the String key of the property desired
+	 * @return the value of the property, or <code>null</code> if the repository
+	 * does not exist, the value does not exist, or the property value 
+	 * could not be determined without loading the repository.
+	 * 
+	 * @see IRepository#getProperties()
+	 * @see #setRepositoryProperty(URI, String, String)
+	 * @see IRepository#PROP_NAME
+	 * @see IRepository#PROP_NICKNAME
+	 * @see IRepository#PROP_DESCRIPTION
+	 * @see IRepository#PROP_SYSTEM
+	 */
+	public String getRepositoryProperty(URI location, String key);
+
+	/**
+	 * Sets the property associated with the repository at the given URI, 
+	 * without loading the repository.
+	 * <p>
+	 * This method stores properties in a cache in the repository manager and does
+	 * not write the property to the backing repository. This is useful for making
+	 * repository properties available without incurring the cost of loading the repository.
+	 * When the repository is loaded, it will overwrite any conflicting properties that
+	 * have been set using this method. Only the repository properties referenced
+	 * below can be stored by the repository manager; attempts to set other
+	 * repository properties will be ignored.
+	 * </p>
+	 * <p>
+	 * To persistently set a property on a repository, clients must load
+	 * the repository and call {@link IRepository#setProperty(String, String)}.
+	 * </p>
+	 * 
+	 * @param location the absolute URI of the repository in question
+	 * @param key the String key of the property desired
+	 * @param value the value to set the property to
+	 * @see #getRepositoryProperty(URI, String)
+	 * @see IRepository#setProperty(String, String)
+	 * @see IRepository#PROP_NAME
+	 * @see IRepository#PROP_NICKNAME
+	 * @see IRepository#PROP_DESCRIPTION
+	 * @see IRepository#PROP_SYSTEM
+	 */
+	public void setRepositoryProperty(URI location, String key, String value);
+
+	/**
+	 * Returns the enablement value of a repository.  Disabled repositories are known
+	 * to the repository manager, but are never used in the context of provisioning
+	 * operations. Disabled repositories are useful as a form of bookmark to indicate that a 
+	 * repository location is of interest, but not currently used.
+	 * <p>
+	 * Note that enablement is a property of the repository manager and not a property
+	 * of the affected repository. The enablement of the repository is discarded when 
+	 * a repository is removed from the repository manager.
+	 * 
+	 * @param location The absolute location of the repository whose enablement is requested
+	 * @return <code>true</code> if the repository is enabled, and
+	 * <code>false</code> if it is not enabled, or if the repository location 
+	 * is not known to the repository manager.
+	 * @see #REPOSITORIES_DISABLED
+	 * @see #setEnabled(URI, boolean)
+	 */
+	public boolean isEnabled(URI location);
+
+	/**
+	 * Removes the repository at the given location from the list of
+	 * repositories known to this repository manager.  The underlying
+	 * repository is not deleted. This method has no effect if the given
+	 * repository is not already known to this repository manager.
+	 * 
+	 * @param location The absolute location of the repository to remove
+	 * @return <code>true</code> if a repository was removed, and 
+	 * <code>false</code> otherwise.
+	 */
+	public boolean removeRepository(URI location);
+
+	/**
+	 * Sets the enablement of a repository. Disabled repositories are known
+	 * to the repository manager, but are never used in the context of provisioning
+	 * operation. Disabled repositories are useful as a form of bookmark to indicate that a 
+	 * repository location is of interest, but not currently used.
+	 * <p>
+	 * Note that enablement is a property of the repository manager and not a property
+	 * of the affected repository. The enablement of the repository is discarded when 
+	 * a repository is removed from the repository manager.
+	 * <p>
+	 * This method has no effect if the given repository location is not known to the
+	 * repository manager.
+	 * 
+	 * @param location The absolute location of the repository to enable or disable
+	 * @param enablement <code>true</code>to enable the repository, and
+	 * <code>false</code> to disable the repository
+	 * @see #REPOSITORIES_DISABLED
+	 * @see #isEnabled(URI)
+	 */
+	public void setEnabled(URI location, boolean enablement);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryReference.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryReference.java
new file mode 100644
index 0000000..346cf49
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRepositoryReference.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ *  Copyright (c) 2008 - 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc - public API
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository;
+
+import java.net.URI;
+
+/**
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients. Instead clients should use one of the class implementing this interface.
+ * @since 2.0
+ */
+public interface IRepositoryReference {
+	/**
+	 * Returns the location of the referenced repository
+	 * @return the location
+	 */
+	URI getLocation();
+
+	/**
+	 * Returns the type of the referenced repository (currently either {@link IRepository#TYPE_METADATA}
+	 * or {@link IRepository#TYPE_ARTIFACT})
+	 * @return the repository type
+	 */
+	int getType();
+
+	/**
+	 * Returns bit-wise or of option constants (currently either 
+	 * {@link IRepository#ENABLED} or {@link IRepository#NONE}).
+	 * @return bit-wise or of option constants
+	 */
+	int getOptions();
+
+	/**
+	 * Returns the optional nickname of the referenced repository
+	 * @return The nickname or <code>null</code>
+	 */
+	String getNickname();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRunnableWithProgress.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRunnableWithProgress.java
new file mode 100644
index 0000000..b4b7344
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/IRunnableWithProgress.java
@@ -0,0 +1,32 @@
+package org.eclipse.equinox.p2.repository;
+
+import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+
+/**
+ * The <code>IRunnableWithProgress</code> interface should be implemented by any
+ * class whose instances are intended to be executed as a long-running operation.
+ * Long-running operations are typically presented at the UI via a modal dialog
+ * showing a progress indicator and a Cancel button.
+ * The class must define a <code>run</code> method that takes a progress monitor.
+ * 
+ * @since 2.0
+ */
+public interface IRunnableWithProgress {
+
+	/**
+	 * Runs this operation.  Progress should be reported to the given progress monitor.
+	 * This method is usually invoked by an <code>IRunnableContext</code>'s <code>run</code> method,
+	 * which supplies the progress monitor.
+	 * A request to cancel the operation should be honored and acknowledged 
+	 * by throwing <code>InterruptedException</code>.
+	 *
+	 * @param monitor the progress monitor to use to display progress and receive
+	 *   requests for cancelation
+	 * @exception OperationCanceledException if the operation detects a request to cancel, 
+	 *  using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing 
+	 *  <code>OperationCanceledException</code>
+	 */
+	public void run(IProgressMonitor monitor) throws InvocationTargetException, OperationCanceledException;
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java
new file mode 100644
index 0000000..778e9f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactDescriptorQuery.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.repository.artifact;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+/**
+ * A general purpose query for matching {@link IArtifactDescriptor} instances
+ * that satisfy various criteria.
+ * 
+ * @since 2.0
+ */
+public final class ArtifactDescriptorQuery extends ExpressionMatchQuery<IArtifactDescriptor> {
+
+	private static final IExpression descriptorMatch = ExpressionUtil.parse(//
+			"artifactKey.id == $0 && artifactKey.version ~= $1 && ($2.empty || $2.all(x | properties[x.key] == x.value))"); //$NON-NLS-1$
+
+	private static IMatchExpression<IArtifactDescriptor> createExpression(String id, VersionRange range, String format, Map<String, String> properties) {
+		if (range == null)
+			range = VersionRange.emptyRange;
+		if (format != null) {
+			if (properties == null || properties.isEmpty())
+				properties = Collections.singletonMap(IArtifactDescriptor.FORMAT, format);
+			else {
+				properties = new HashMap<String, String>(properties);
+				properties.put(IArtifactDescriptor.FORMAT, format);
+			}
+		} else if (properties == null)
+			properties = CollectionUtils.emptyMap();
+
+		IExpressionFactory factory = ExpressionUtil.getFactory();
+		return factory.<IArtifactDescriptor> matchExpression(descriptorMatch, id, range, properties);
+	}
+
+	/**
+	 * A singleton query that will match all instances of {@link IArtifactDescriptor}.
+	 */
+	public static final ArtifactDescriptorQuery ALL_DESCRIPTORS = new ArtifactDescriptorQuery();
+
+	/**
+	 * Clients must use {@link #ALL_DESCRIPTORS}.
+	 */
+	private ArtifactDescriptorQuery() {
+		//matches everything
+		super(IArtifactDescriptor.class, ExpressionUtil.TRUE_EXPRESSION);
+	}
+
+	/**
+	 * The query will match descriptors with the given <code>id</code>, <code>versionRange</code>
+	 * and <code>format</code>
+	 * @param id the descriptor id to match. Can not be <code>null</code>
+	 * @param versionRange the descriptor version range to match or <code>null</code> to match
+	 * any version range
+	 * @param format the descriptor {@link IArtifactDescriptor#FORMAT} value to match, or <code>null</code> to
+	 * match any descriptor format
+	 */
+	public ArtifactDescriptorQuery(String id, VersionRange versionRange, String format) {
+		super(IArtifactDescriptor.class, createExpression(id, versionRange, format, null));
+	}
+
+	/**
+	 * The query will match descriptors whose <code>id</code> and <code>versionRange</code>
+	 * match the supplied key
+	 * @param key the artifact key to match.  Cannot be <code>null</code>.
+	 */
+	public ArtifactDescriptorQuery(IArtifactKey key) {
+		super(IArtifactDescriptor.class, createExpression(key.getId(), new VersionRange(key.getVersion(), true, key.getVersion(), true), null, null));
+	}
+
+	/**
+	 * The query will match descriptors with the given <code>id</code>, <code>versionRange</code>,
+	 * <code>format</code>, and <code>properties</code>.
+	 * @param id the descriptor id to match. Can not be <code>null</code>
+	 * @param versionRange the descriptor version range to match or <code>null</code> to match
+	 * any version range
+	 * @param format the descriptor {@link IArtifactDescriptor#FORMAT} value to match, or <code>null</code> to
+	 * match any descriptor format
+	 * @param properties The properties to query for
+	 */
+	public ArtifactDescriptorQuery(String id, VersionRange versionRange, String format, Map<String, String> properties) {
+		super(IArtifactDescriptor.class, createExpression(id, versionRange, format, properties));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java
new file mode 100644
index 0000000..1e8f0ad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.repository.artifact;
+
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+import org.eclipse.equinox.p2.query.IQueryable;
+
+/**
+ * A general purpose query for matching {@link IArtifactKey} instances
+ * that satisfy various criteria.
+ * 
+ * @since 2.0
+ */
+public final class ArtifactKeyQuery extends ExpressionMatchQuery<IArtifactKey> {
+	private static final IExpression matchKey = ExpressionUtil.parse("this == $0"); //$NON-NLS-1$
+	private static final IExpression matchID = ExpressionUtil.parse("id == $0"); //$NON-NLS-1$
+	private static final IExpression matchIDClassifierRange = ExpressionUtil.parse("id == $0 && version ~= $2 && (null == $1 || classifier == $1)"); //$NON-NLS-1$
+
+	private static IExpression createMatchExpression(IArtifactKey key) {
+		if (key == null)
+			return ExpressionUtil.TRUE_EXPRESSION;
+		return ExpressionUtil.getFactory().<IArtifactKey> matchExpression(matchKey, key);
+	}
+
+	private static IExpression createMatchExpression(String classifier, String id, VersionRange range) {
+		if (range == null) {
+			if (classifier == null) {
+				if (id == null)
+					return ExpressionUtil.TRUE_EXPRESSION;
+				return ExpressionUtil.getFactory().<IArtifactKey> matchExpression(matchID, id);
+			}
+			range = VersionRange.emptyRange;
+		}
+		return ExpressionUtil.getFactory().<IArtifactKey> matchExpression(matchIDClassifierRange, id, classifier, range);
+	}
+
+	/**
+	 * A singleton artifact key query that will always match every artifact key in
+	 * the given {@link IQueryable}.
+	 */
+	public static final ArtifactKeyQuery ALL_KEYS = new ArtifactKeyQuery();
+
+	/**
+	 * Pass the id and/or version range to match IArtifactKeys against.
+	 * Passing null results in matching any id/version
+	 * @param classifier The artifact key classifier, or <code>null</code>
+	 * @param id The artifact key id, or <code>null</code>
+	 * @param range A version range, or <code>null</code>
+	 */
+	public ArtifactKeyQuery(String classifier, String id, VersionRange range) {
+		super(IArtifactKey.class, createMatchExpression(classifier, id, range));
+	}
+
+	private ArtifactKeyQuery() {
+		super(IArtifactKey.class, ExpressionUtil.TRUE_EXPRESSION);
+	}
+
+	/**
+	 * Creates an artifact key query that will match any key equal to the
+	 * provided key
+	 * @param key the input key to test for equality in the query
+	 */
+	public ArtifactKeyQuery(IArtifactKey key) {
+		super(IArtifactKey.class, createMatchExpression(key));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
new file mode 100644
index 0000000..db3c2eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactDescriptor.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import java.util.Map;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+
+/**
+ * An artifact descriptor describes an artifact stored in some artifact repository. The
+ * descriptor defines the artifact it contains, as well as any processing steps that
+ * must be performed when the artifact is transferred out of the repository (such
+ * as decompression, error checking, etc).
+ * 
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients. Instead subclass the {@link ArtifactDescriptor} class
+ * @since 2.0
+ */
+public interface IArtifactDescriptor {
+
+	/**
+	 * An artifact descriptor property (value "download.size") indicating the number
+	 * of bytes that will be transferred when this artifact is transferred out of the repository.
+	 */
+	public static final String DOWNLOAD_SIZE = "download.size"; //$NON-NLS-1$
+	/**
+	 * An artifact descriptor property (value "artifact.size") indicating the size in
+	 * bytes of the artifact in its native format (after processing steps have been applied).
+	 */
+	public static final String ARTIFACT_SIZE = "artifact.size"; //$NON-NLS-1$
+	/**
+	 * An artifact descriptor property (value "download.md5") indicating the MD5
+	 * checksum of the artifact bytes that are transferred.
+	 */
+	public static final String DOWNLOAD_MD5 = "download.md5"; //$NON-NLS-1$
+	/**
+	 * An artifact descriptor property (value "download.contentType") indicating the 
+	 * content type of the artifact bytes that are transferred.
+	 */
+	public static final String DOWNLOAD_CONTENTTYPE = "download.contentType"; //$NON-NLS-1$
+	/**
+	 * An content type (value "application/zip") indicating the content is a zip file.
+	 */
+	public static final String TYPE_ZIP = "application/zip"; //$NON-NLS-1$
+	/**
+	 * An artifact descriptor property (value "artifact.md5") indicating the MD5
+	 * checksum of the artifact bytes in its native format (after processing steps have
+	 * been applied).
+	 */
+	public static final String ARTIFACT_MD5 = "artifact.md5"; //$NON-NLS-1$
+
+	/**
+	 * An artifact descriptor property (value "format") indicating the storage format
+	 * of the artifact in the repository.
+	 * @see #FORMAT_PACKED
+	 */
+	public static final String FORMAT = "format"; //$NON-NLS-1$
+
+	/**
+	 * A property value for the {@link #FORMAT} artifact descriptor property (value "packed")
+	 * indicating the storage format is using pack200 compression.
+	 * @see #FORMAT
+	 */
+	public static final String FORMAT_PACKED = "packed"; //$NON-NLS-1$
+
+	/**
+	 * Return the key for the artifact described by this descriptor.
+	 * @return the key associated with this descriptor
+	 */
+	public abstract IArtifactKey getArtifactKey();
+
+	/**
+	 * Return the value of the given property in this descriptor  <code>null</code> 
+	 * is returned if no such property exists
+	 * @param key the property key to look for
+	 * @return the value of the given property or <code>null</code>
+	 */
+	public abstract String getProperty(String key);
+
+	/**
+	 * Returns a read-only collection of the properties of the artifact descriptor.
+	 * @return the properties of this artifact descriptor.
+	 */
+	public Map<String, String> getProperties();
+
+	/** 
+	 * Return the list of processing steps associated with this descriptor.
+	 * An empty set of steps implies that this descriptor describes a complete
+	 * copy of the artifact in its native form. If one or more steps are present,
+	 * they may be performed when the artifact is transferred from the repository
+	 * that contains it.
+	 * 
+	 * @return the list of processing steps for this descriptor
+	 */
+	public abstract IProcessingStepDescriptor[] getProcessingSteps();
+
+	/**
+	 * Return the artifact repository that holds the artifact described by this descriptor.
+	 * <code>null</code> is returned if this descriptor is not held in a repository.
+	 * 
+	 * @return the repository holding this artifact or <code>null</code> if none.
+	 */
+	public abstract IArtifactRepository getRepository();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
new file mode 100644
index 0000000..ae46654
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
@@ -0,0 +1,183 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import java.io.OutputStream;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
+
+/**
+ * A repository containing artifacts.
+ * <p>
+ * This interface is not intended to be implemented by clients.  Artifact repository
+ * implementations must subclass {@link AbstractArtifactRepository} rather than 
+ * implementing this interface directly.
+ * </p>
+ * @noimplement This interface is not intended to be implemented by clients. Instead subclass {@link AbstractArtifactRepository}.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IArtifactRepository extends IRepository<IArtifactKey> {
+
+	/** 
+	 * The return code to use when a client could/should retry a failed getArtifact() operation.
+	 * For example, the repository may have additional mirrors that could be consulted.
+	 */
+	public static int CODE_RETRY = 13;
+
+	/**
+	 * Create an instance of {@link IArtifactDescriptor} based on the given key
+	 * @param key {@link IArtifactKey}
+	 * @return a new instanceof of IArtifactDescriptor
+	 */
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key);
+
+	/**
+	 * Create an instance of {@link IArtifactKey}
+	 * @param classifier
+	 * @param id
+	 * @param version
+	 * @return a new IArtifactKey
+	 */
+	public IArtifactKey createArtifactKey(String classifier, String id, Version version);
+
+	/**
+	 * Add the given descriptor to the set of descriptors in this repository.  This is 
+	 * a relatively low-level operation that should be used only when the actual related 
+	 * content is in this repository and the given descriptor accurately describes 
+	 * that content.
+	 * @param descriptor the descriptor to add.
+	 */
+	public void addDescriptor(IArtifactDescriptor descriptor);
+
+	/**
+	 * Add the given artifact descriptors to this repository
+	 * @param descriptors the artifact descriptors to add
+	 */
+	public void addDescriptors(IArtifactDescriptor[] descriptors);
+
+	/** 
+	 * Returns true if this repository contains the given descriptor.
+	 * @param descriptor the descriptor to query
+	 * @return true if the given descriptor is already in this repository
+	 */
+	public boolean contains(IArtifactDescriptor descriptor);
+
+	/** 
+	 * Returns true if this repository contains the given artifact key.
+	 * @param key the key to query
+	 * @return true if the given key is already in this repository
+	 */
+	public boolean contains(IArtifactKey key);
+
+	/**
+	 * Writes to the given output stream the bytes represented by the artifact descriptor.
+	 * Any processing steps defined by the descriptor will be applied to the artifact bytes
+	 * before they are sent to the provided output stream.
+	 * 
+	 * @param descriptor the descriptor to transfer
+	 * @param destination the stream to write the final artifact output to
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting and cancellation are not desired
+	 *  @return the result of the artifact transfer
+	 */
+	public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
+
+	/**
+	 * Writes to the given output stream the bytes represented by the artifact descriptor.
+	 * Any processing steps defined by the descriptor will <b>not</b> be applied to the artifact bytes.
+	 * 
+	 * @param descriptor the descriptor to transfer
+	 * @param destination the stream to write the final artifact output to
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting and cancellation are not desired
+	 *  @return the result of the artifact transfer
+	 */
+	public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
+
+	/**
+	 * Return the set of artifact descriptors describing the ways that this repository
+	 * can supply the artifact associated with the given artifact key
+	 * @param key the artifact key to lookup
+	 * @return the descriptors associated with the given key
+	 */
+	public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
+
+	/**
+	 * Executes the given artifact requests on this byte server.
+	 * @param requests The artifact requests
+	 * @param monitor
+	 * @return a status object that is <code>OK</code> if requests were
+	 * processed successfully. Otherwise, a status indicating information,
+	 * warnings, or errors that occurred while executing the artifact requests
+	 */
+	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
+
+	/**
+	 * Open an output stream to which a client can write the data for the given 
+	 * artifact descriptor.
+	 * @param descriptor the descriptor describing the artifact data to be written to the 
+	 * resultant stream
+	 * @return the stream to which the artifact content can be written. The returned output
+	 *  stream may implement <code>IStateful</code>.
+	 * @throws ProvisionException if the output stream could not be created.  Reasons include:
+	 * <ul>
+	 * <li>An I/O exception occurred (@link {@link ProvisionException#REPOSITORY_FAILED_WRITE}) .</li>
+	 * <li>An artifact already exists at that location ({@link ProvisionException#ARTIFACT_EXISTS}).</li>
+	 * </ul>
+	 */
+	public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
+
+	/**
+	 * Returns a queryable that can be queried for artifact descriptors contained in this repository
+	 * @return The queryable of artifact descriptors
+	 */
+	public IQueryable<IArtifactDescriptor> descriptorQueryable();
+
+	/**
+	 * Remove the all keys, descriptors, and contents from this repository.
+	 */
+	public void removeAll();
+
+	/**
+	 * Remove the given descriptor and its corresponding content in this repository.  
+	 * @param descriptor the descriptor to remove.
+	 */
+	public void removeDescriptor(IArtifactDescriptor descriptor);
+
+	/**
+	 * Remove the given key and all related content and descriptors from this repository.  
+	 * @param key the key to remove.
+	 */
+	public void removeDescriptor(IArtifactKey key);
+
+	/**
+	 * Executes a runnable against this repository. It is up to the repository
+	 * implementor to determine what "batch process" means, for example, it may mean
+	 * that the repository index is not stored until after the runnable completes.
+	 * 
+	 * The runnable should not execute anything in a separate thread.
+	 *  
+	 * @param runnable The runnable to execute
+	 * @param monitor A progress monitor that will be passed to the runnable
+	 * @return The result of running the runnable. Any exceptions thrown during
+	 * the execution will be returned in the status.
+	 */
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java
new file mode 100644
index 0000000..45d2a54
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+
+/**
+ * A metadata repository manager is used to create, access, and manipulate
+ * {@link IArtifactRepository} instances. See {@link IRepositoryManager}
+ * for a general description of the characteristics of repository managers.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IArtifactRepositoryManager extends IRepositoryManager<IArtifactKey> {
+	/**
+	 * The name used for obtaining a reference to the metadata repository manager service
+	 */
+	public static final String SERVICE_NAME = IArtifactRepositoryManager.class.getName();
+
+	/**
+	 * A convenience constant representing an empty set of artifact requests.
+	 */
+	public static final IArtifactRequest[] NO_ARTIFACT_REQUEST = new IArtifactRequest[0];
+
+	/**
+	 * Repository type for a simple repository based on a URL or local file system location.
+	 */
+	public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.simpleRepository"; //$NON-NLS-1$
+
+	/**
+	 * Repository type for a composite repository based on a URL or local file system location.
+	 */
+	public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.compositeRepository"; //$NON-NLS-1$
+
+	/**
+	 * Return a new request to mirror the given artifact into the destination repository.
+	 * @param key the artifact to mirror
+	 * @param destination the destination where the artifact will be mirrored
+	 * @param destinationDescriptorProperties additional properties for use in creating the repository's ArtifactDescriptor, 
+	 * or <code>null</code> to indicate no additional properties are needed
+	 * @param destinationRepositoryProperties additional repository specific properties for use in creating the repositor's ArtifactDescriptor,
+	 * , or <code>null</code> to indicate no additional properties are needed
+	 * @return the newly created request object
+	 */
+	public IArtifactRequest createMirrorRequest(IArtifactKey key, IArtifactRepository destination, Map<String, String> destinationDescriptorProperties, Map<String, String> destinationRepositoryProperties);
+
+	/**
+	 * Creates and returns a new empty artifact repository of the given type at 
+	 * the given location.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * 
+	 * @param location the absolute location for the new repository
+	 * @param name the name of the new repository
+	 * @param type the kind of repository to create
+	 * @param properties the properties to set on the repository
+	 * @return the newly created repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>The repository type is unknown.</li>
+	 * <li>There was an error writing to the given repository location.</li>
+	 * <li>A repository already exists at that location.</li>
+	 * </ul>
+	 */
+	public IArtifactRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException;
+
+	/**
+	 * Loads the repository at the given location.  The location is expected to contain 
+	 * data that describes a valid artifact repository of a known type.  If this manager
+	 * already knows a repository at the given location then that repository is returned.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * 
+	 * @param location the absolute location in which to look for a repository description
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return a repository object for the given location
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
+
+	/**
+	 * Loads the repository at the given location.  The location is expected to contain 
+	 * data that describes a valid artifact repository of a known type.  If this manager
+	 * already knows a repository at the given location then that repository is returned.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * <p>
+	 * The flags passed in should be taken as a hint for the type of repository to load.  If
+	 * the manager cannot load a repository that satisfies these hints, it can fail fast.
+	 * </p>
+	 * @param location the absolute location in which to look for a repository description
+	 * @param flags - bit-wise or of flags to consider when loading the repository
+	 *  (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return a repository object for the given location
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
+	 */
+	public IArtifactRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
+
+	/**
+	 * Refreshes the repository corresponding to the given URL. This method discards
+	 * any cached state held by the repository manager and reloads the repository
+	 * contents. The provided repository location must already be known to the repository
+	 * manager.
+	 * 
+	 * @param location The absolute location of the repository to refresh
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The refreshed metadata repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>The location is not known to the repository manager.</li>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public IArtifactRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException;
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRequest.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRequest.java
new file mode 100644
index 0000000..c1518cf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRequest.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * Represents a request to transfer an artifact from an artifact repository. When the
+ * request is executed against a repository, it will be executed and the result
+ * of the execution will become available.
+ * 
+ * @see IArtifactRepositoryManager#createMirrorRequest(IArtifactKey, IArtifactRepository, java.util.Map, java.util.Map)
+ * @see IArtifactRepository#getArtifacts(IArtifactRequest[], IProgressMonitor)
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IArtifactRequest {
+
+	/**
+	 * Returns the key for the artifact that is being requested
+	 * 
+	 * @return The requested artifact key
+	 */
+	public IArtifactKey getArtifactKey();
+
+	/**
+	 * Performs the artifact request, and sets the result status.
+	 * 
+	 * @param sourceRepository the repository to download the artifact from 
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 */
+	public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor);
+
+	/**
+	 * Returns the result of the executed artifact request, or <code>null</code> if
+	 * the request has never been executed. Artifact requests are executed by invoking
+	 * {@link IArtifactRepository#getArtifacts(IArtifactRequest[], IProgressMonitor)}.
+	 * 
+	 * @return The result of the previous perform call, or <code>null</code>
+	 */
+	public IStatus getResult();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java
new file mode 100644
index 0000000..032d101
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import java.io.File;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+
+/**
+ * An artifact repository whose artifacts are available in the local file system.
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IFileArtifactRepository extends IArtifactRepository {
+	/**
+	 * Return the location of the full local file corresponding to the given 
+	 * artifact key to the given key, or <code>null</code> if not available.
+	 * 
+	 * @param key the artifact key for the file to be returned
+	 * @return the location of the requested artifact or<code>null</code> if not available
+	 */
+	public File getArtifactFile(IArtifactKey key);
+
+	/**
+	 * Return the location of the local file corresponding to the given 
+	 * artifact descriptor, or <code>null</code> if not available.
+	 * 
+	 * @param descriptor the artifact descriptor for the file to be returned
+	 * @return the location of the requested descriptor or<code>null</code> if not available
+	 */
+	public File getArtifactFile(IArtifactDescriptor descriptor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
new file mode 100644
index 0000000..53b2fc1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
@@ -0,0 +1,54 @@
+/******************************************************************************* 
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact;
+
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
+
+/**
+ * Describes a processing step. Processing steps are pieces of code that participate
+ * in the the transfer of an artifact between artifact repositories. A step may alter
+ * the shape of the artifact from its storage format in the repository (such as performing
+ * compression), or it may perform additional checks on the transferred bytes such as 
+ * checksums or signature verification.
+ * 
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients. Instead subclass the {@link ProcessingStepDescriptor}.
+ * @see IArtifactDescriptor#getProcessingSteps()
+ * @since 2.0
+ */
+public interface IProcessingStepDescriptor {
+
+	/**
+	 * Returns the fully qualified id of the processing step extension.
+	 * 
+	 * @return The fully qualified processing step extension id
+	 */
+	public abstract String getProcessorId();
+
+	/**
+	 * An argument that is passed to the processing step instance. The structure
+	 * and content of the data is specific to the particular processing step being used.
+	 * @return the processing step data
+	 */
+	public abstract String getData();
+
+	/**
+	 * Returns whether the successful execution of this processing step is
+	 * required for the transfer to be successful. If the processing step extension
+	 * is not installed, or fails to execute, then the artifact transfer will fail if the
+	 * step is required. Failure of optional steps will result in warnings but not prevent
+	 * the transfer from succeeding.
+	 * 
+	 * @return <code>true</code> if the transfer will fail if this step does not succeed,
+	 * and <code>false</code> otherwise
+	 */
+	public abstract boolean isRequired();
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/package.html
new file mode 100644
index 0000000..b2edf0f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines artifact repository.
+<h2>
+Package Specification</h2>
+<p>
+This package defines the concept of artifact repository. An artifact repository stores artifacts.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java
new file mode 100644
index 0000000..692c66f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact.spi;
+
+import java.io.OutputStream;
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.spi.AbstractRepository;
+
+/**
+ * The common base class for all artifact repository implementations. Clients must
+ * subclass this class to create their own repository implementations.
+ * <p>
+ * This base class provides default implementations of all methods that modify the repository.
+ * These default methods throw an exception if {@link #isModifiable()} returns <code>false</code>.
+ * Therefore a client can implement a read-only repository by overriding only the abstract methods.
+ * @since 2.0
+ */
+public abstract class AbstractArtifactRepository extends AbstractRepository<IArtifactKey> implements IArtifactRepository {
+
+	protected AbstractArtifactRepository(IProvisioningAgent agent, String name, String type, String version, URI location, String description, String provider, Map<String, String> properties) {
+		super(agent, name, type, version, location, description, provider, properties);
+	}
+
+	public abstract boolean contains(IArtifactDescriptor descriptor);
+
+	public abstract boolean contains(IArtifactKey key);
+
+	public abstract IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
+
+	public abstract IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key);
+
+	public abstract IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor);
+
+	public abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException;
+
+	public void addDescriptor(IArtifactDescriptor descriptor) {
+		assertModifiable();
+	}
+
+	public void addDescriptors(IArtifactDescriptor[] descriptors) {
+		assertModifiable();
+	}
+
+	public void removeDescriptor(IArtifactDescriptor descriptor) {
+		assertModifiable();
+	}
+
+	public void removeDescriptor(IArtifactKey key) {
+		assertModifiable();
+	}
+
+	public void removeAll() {
+		assertModifiable();
+	}
+
+	public boolean equals(Object o) {
+		if (this == o) {
+			return true;
+		}
+		if (!(o instanceof AbstractArtifactRepository)) {
+			return false;
+		}
+		if (URIUtil.sameURI(getLocation(), ((AbstractArtifactRepository) o).getLocation()))
+			return true;
+		return false;
+	}
+
+	public int hashCode() {
+		return (this.getLocation().toString().hashCode()) * 87;
+	}
+
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
+		return new ArtifactDescriptor(key);
+	}
+
+	public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
+		return new ArtifactKey(classifier, id, version);
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		try {
+			runnable.run(monitor);
+		} catch (OperationCanceledException oce) {
+			return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+		} catch (Exception e) {
+			return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+		}
+		return Status.OK_STATUS;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
new file mode 100644
index 0000000..350e17b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - IMemberProvider access.
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact.spi;
+
+import java.util.Arrays;
+import java.util.Map;
+import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
+import org.eclipse.equinox.p2.repository.artifact.*;
+
+/**
+ * This represents information about a given artifact stored on a particular byte server.
+ * @since 2.0
+ */
+public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider {
+	public static final String MEMBER_ARTIFACT_KEY = "artifactKey"; //$NON-NLS-1$
+	public static final String MEMBER_PROCESSING_STEPS = "processingSteps"; //$NON-NLS-1$
+	public static final String MEMBER_PROPERTIES = "properties"; //$NON-NLS-1$
+	public static final String MEMBER_REPOSITORY = "repository"; //$NON-NLS-1$
+
+	private static final IProcessingStepDescriptor[] EMPTY_STEPS = new ProcessingStepDescriptor[0];
+
+	protected IArtifactKey key; // The key associated with this artifact
+
+	// The list of post processing steps that must be applied one the artifact once it 
+	// has been downloaded (e.g, unpack, then md5 checksum, then...)
+	protected IProcessingStepDescriptor[] processingSteps = EMPTY_STEPS;
+
+	protected Map<String, String> properties = new OrderedProperties();
+
+	private transient IArtifactRepository repository;
+
+	/**
+	 * Creates a new artifact descriptor with the same key, properties, repository,
+	 * and processing steps as the provided base descriptor.
+	 * 
+	 * @param base the descriptor to use as a template for this new descriptor
+	 */
+	public ArtifactDescriptor(IArtifactDescriptor base) {
+		super();
+		key = base.getArtifactKey();
+		processingSteps = base.getProcessingSteps();
+		properties.putAll(base.getProperties());
+		repository = base.getRepository();
+	}
+
+	/**
+	 * Returns a new artifact descriptor that uses the provided artifact key
+	 * 
+	 * @param key The artifact key corresponding to this descriptor
+	 */
+	public ArtifactDescriptor(IArtifactKey key) {
+		super();
+		this.key = key;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor#getArtifactKey()
+	 */
+	public IArtifactKey getArtifactKey() {
+		return key;
+	}
+
+	public String getProperty(String propertyKey) {
+		return properties.get(propertyKey);
+	}
+
+	public void setProperty(String key, String value) {
+		if (value == null)
+			properties.remove(key);
+		else
+			properties.put(key, value);
+	}
+
+	public void addProperties(Map<String, String> additionalProperties) {
+		properties.putAll(additionalProperties);
+	}
+
+	/**
+	 * Returns a read-only collection of the properties of the artifact descriptor.
+	 * @return the properties of this artifact descriptor.
+	 */
+	public Map<String, String> getProperties() {
+		return OrderedProperties.unmodifiableProperties(properties);
+	}
+
+	public IProcessingStepDescriptor[] getProcessingSteps() {
+		return processingSteps;
+	}
+
+	public void setProcessingSteps(IProcessingStepDescriptor[] value) {
+		processingSteps = value == null ? EMPTY_STEPS : value;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+
+		// Other implementations of IArtifactDescriptor must not be considered equal
+		if (!(obj.getClass().equals(getClass())))
+			return false;
+
+		ArtifactDescriptor other = (ArtifactDescriptor) obj;
+		if (key == null) {
+			if (other.getArtifactKey() != null)
+				return false;
+		} else if (!key.equals(other.getArtifactKey()))
+			return false;
+
+		if (!Arrays.equals(processingSteps, other.getProcessingSteps()))
+			return false;
+
+		String format = getProperty(FORMAT);
+		String otherFormat = other.getProperty(FORMAT);
+		if (format != null ? !format.equals(otherFormat) : otherFormat != null)
+			return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		String format = getProperty(FORMAT);
+
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((key == null) ? 0 : key.hashCode());
+		result = prime * result + Arrays.asList(processingSteps).hashCode();
+		result = prime * result + (format != null ? format.hashCode() : 0);
+		return result;
+	}
+
+	public IArtifactRepository getRepository() {
+		return repository;
+	}
+
+	public void setRepository(IArtifactRepository value) {
+		repository = value;
+	}
+
+	public String toString() {
+		String format = getProperty(IArtifactDescriptor.FORMAT);
+		if (format == null)
+			return "canonical: " + key.toString(); //$NON-NLS-1$
+		return format + ": " + key.toString(); //$NON-NLS-1$
+	}
+
+	public Object getMember(String memberName) {
+		if (memberName == MEMBER_ARTIFACT_KEY)
+			return key;
+
+		if (memberName == MEMBER_PROPERTIES)
+			return properties;
+
+		if (memberName == MEMBER_PROCESSING_STEPS)
+			return processingSteps;
+
+		if (memberName == MEMBER_REPOSITORY)
+			return repository;
+
+		throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactRepositoryFactory.java
new file mode 100644
index 0000000..ead8d66
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactRepositoryFactory.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact.spi;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+
+/**
+ * An artifact repository factory is responsible for creating and loading instances
+ * of a particular type of artifact repository. Factories are provided via the 
+ * <tt>org.eclipse.equinox.p2.artifact.repository.artifactRepositories</tt> extension point.
+ * @since 2.0
+ */
+public abstract class ArtifactRepositoryFactory {
+
+	private IProvisioningAgent agent;
+
+	/**
+	 * Creates and returns a new empty artifact repository of the given type at 
+	 * the given location.
+	 * 
+	 * @param location the location for the new repository
+	 * @param name the name of the new repository
+	 * @param type the kind of repository to create
+	 * @param properties the properties to set on the repository
+	 * @return the newly created repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>The repository type is unknown.</li>
+	 * <li>There was an error writing to the given repository location.</li>
+	 * <li>A repository already exists at that location.</li>
+	 * </ul>
+	 */
+	public abstract IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException;
+
+	/**
+	 * Returns the provisioning agent associated with this factory, or <code>null</code>
+	 * if this factory is not associated with an agent.
+	 * @return The provisioning agent, or <code>null</code>
+	 */
+	protected IProvisioningAgent getAgent() {
+		return agent;
+	}
+
+	/**
+	 * Loads and returns the repository of this factory's type at the given location. 
+	 * <p>
+	 * The error code returned in the case of failure is significant. In particular an
+	 * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
+	 * that the location definitely identifies a repository of this type, but an error occurred
+	 * while loading the repository. The repository manager will not attempt to load
+	 * a repository from that location using any other factory.  An error code of
+	 * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
+	 * repository of this type at the given location, and the repository manager is free
+	 * to try again with a different repository factory.
+	 * </p>
+	 * <p>
+	 * The flags passed in should be taken as a hint for the type of repository to load.  If
+	 * the factory knows it will not load a repository that satisfies these hints, it can fail
+	 * fast and return null.
+	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
+	 * </p>
+	 * @param location the location in which to look for a repository description
+	 * @param flags to consider while loading the repository
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return a repository object for the given location
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public abstract IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
+
+	/**
+	 * Sets the provisioning agent associated with this repository factory. This method
+	 * is called by the provisioning agent to provide access to the agent instance. This
+	 * method is not intended to be called by clients.
+	 * 
+	 * @param agent The provisioning agent
+	 */
+	public void setAgent(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
new file mode 100644
index 0000000..3587ec6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+* Copyright (c) 2007, 2009 compeople AG and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* 	compeople AG (Stefan Liebig) - initial API and implementation
+*******************************************************************************/
+package org.eclipse.equinox.p2.repository.artifact.spi;
+
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+
+/**
+ * @since 2.0
+ */
+public class ProcessingStepDescriptor implements IProcessingStepDescriptor {
+
+	private final String processorId; //the operation to be applied (e.g: unpack, md5, signature verification, etc.)
+	private final String data; //data requested for the processing (eg. expected checksum)
+	private final boolean required; //whether the step is optional or not
+
+	/**
+	 * Create a processing step description.
+	 * 
+	 * @param processorId
+	 * @param data
+	 * @param required
+	 */
+	public ProcessingStepDescriptor(String processorId, String data, boolean required) {
+		super();
+		this.processorId = processorId;
+		this.data = data;
+		this.required = required;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getProcessorId() {
+		return processorId;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getData() {
+		return data;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean isRequired() {
+		return required;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((data == null) ? 0 : data.hashCode());
+		result = prime * result + ((processorId == null) ? 0 : processorId.hashCode());
+		result = prime * result + (required ? 1231 : 1237);
+		return result;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof IProcessingStepDescriptor))
+			return false;
+		final IProcessingStepDescriptor other = (IProcessingStepDescriptor) obj;
+		if (data == null) {
+			if (other.getData() != null)
+				return false;
+		} else if (!data.equals(other.getData()))
+			return false;
+		if (processorId == null) {
+			if (other.getProcessorId() != null)
+				return false;
+		} else if (!processorId.equals(other.getProcessorId()))
+			return false;
+		if (required != other.isRequired())
+			return false;
+		return true;
+	}
+
+	/**
+	 * Returns a string representation of this descriptor for debugging purposes only.
+	 * @return a string representation ofthe processing step descriptor
+	 */
+	public String toString() {
+		return "Processor: " + processorId + (required ? "(req)" : "(notReq)") + " ,data: " + data; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/package.html
new file mode 100644
index 0000000..d344e46
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines  SPI for registering new implementations of artifact repositories.
+<h2>
+Package Specification</h2>
+<p>
+This package defines SPI for registering new implementations of artifact repositories.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java
new file mode 100644
index 0000000..e6633c3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.metadata;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.*;
+import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
+
+/**
+ * A metadata repository stores information about a set of installable units
+ * <p>
+ * This interface is not intended to be implemented by clients.  Metadata repository
+ * implementations must subclass {@link AbstractMetadataRepository} rather than 
+ * implementing this interface directly.
+ * </p>
+ * @noimplement This interface is not intended to be implemented by clients. Instead subclass {@link AbstractMetadataRepository}
+ * @since 2.0
+ */
+public interface IMetadataRepository extends IRepository<IInstallableUnit> {
+
+	/** 
+	 * Add the given installable units to this repository.
+	 * 
+	 * @param installableUnits the installable units to add
+	 */
+	public void addInstallableUnits(Collection<IInstallableUnit> installableUnits);
+
+	/**
+	 * <p>Adds references to another repository to this repository. When a repository
+	 * is loaded by {@link IMetadataRepositoryManager}, its references
+	 * are automatically added to the repository manager's set of known repositories.</p>
+	 * <p>Note that this method does not add the <b>contents</b> of the given
+	 * repositories to this repository, but merely adds the location of other
+	 * repositories to the metadata of this repository.</p>
+	 * 
+	 * @param references The references to add
+	 */
+	void addReferences(Collection<? extends IRepositoryReference> references);
+
+	/**
+	 * Returns the repositories that this repository is referencing.
+	 * @return An immutable collection of repository references, possibly empty but never <code>null</code>.
+	 */
+	Collection<IRepositoryReference> getReferences();
+
+	/**
+	 * Removes all installable units in the given collection from this repository.
+	 * 
+	 * @param installableUnits the installable units to remove
+	 * @return <code>true</code> if any units were actually removed, and
+	 * <code>false</code> otherwise
+	 */
+	public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits);
+
+	/**
+	 * Remove all installable units from this repository.  
+	 */
+	public void removeAll();
+
+	/**
+	 * Executes a runnable against this repository. It is up to the repository
+	 * implementor to determine what "batch process" means, for example, it may mean
+	 * that the repository index is not stored until after the runnable completes.
+	 * 
+	 * The runnable should not execute anything in a separate thread.
+	 *  
+	 * @param runnable The runnable to execute
+	 * @param monitor A progress monitor that will be passed to the runnable
+	 * @return The result of running the runnable. Any exceptions thrown during
+	 * the execution will be returned in the status.
+	 */
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepositoryManager.java
new file mode 100644
index 0000000..7e76515
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/IMetadataRepositoryManager.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.metadata;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+
+/**
+ * A metadata repository manager is used to create, access, and manipulate
+ * {@link IMetadataRepository} instances. See {@link IRepositoryManager}
+ * for a general description of the characteristics of repository managers.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ * @since 2.0
+ */
+public interface IMetadataRepositoryManager extends IRepositoryManager<IInstallableUnit> {
+	/**
+	 * The name used for obtaining a reference to the metadata repository manager service
+	 */
+	public static final String SERVICE_NAME = IMetadataRepositoryManager.class.getName();
+
+	/**
+	 * Repository type for a simple repository based on a URL or local file system location.
+	 */
+	public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.simpleRepository"; //$NON-NLS-1$
+
+	/**
+	 * Repository type for a composite repository based on a URL or local file system location.
+	 */
+	public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository.compositeRepository"; //$NON-NLS-1$
+
+	/**
+	 * Creates and returns a new empty metadata repository of the given type at 
+	 * the given location.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * 
+	 * @param location the absolute location for the new repository
+	 * @param name the name of the new repository
+	 * @param type the kind of repository to create
+	 * @param properties the properties to set on the repository
+	 * @return the newly created repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>The repository type is unknown.</li>
+	 * <li>There was an error writing to the given repository location.</li>
+	 * <li>A repository already exists at that location.</li>
+	 * </ul>
+	 * @throws OperationCanceledException if this operation has been canceled
+	 */
+	public IMetadataRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException, OperationCanceledException;
+
+	/**
+	 * Loads a repository corresponding to the given URL.  If a repository has
+	 * previously been loaded at the given location, the same cached repository
+	 * may be returned.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * 
+	 * @param location The absolute location of the repository to load
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The loaded metadata repository
+	 * @throws OperationCanceledException if this operation has been canceled
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException, OperationCanceledException;
+
+	/**
+	 * Loads a repository corresponding to the given URL.  If a repository has
+	 * previously been loaded at the given location, the same cached repository
+	 * may be returned.
+	 * <p>
+	 * The resulting repository is added to the list of repositories tracked by
+	 * the repository manager. Clients must make a subsequent call to {@link #removeRepository(URI)}
+	 * if they do not want the repository manager to remember the repository for subsequent
+	 * load attempts.
+	 * </p>
+	 * <p>
+	 * The flags passed in should be taken as a hint for the type of repository to load.  If
+	 * the manager cannot load a repository that satisfies these hints, it can fail fast.
+	 * </p>
+	 * @param location The absolute location of the repository to load
+	 * @param flags - bit-wise or of flags to consider when loading the repository
+	 *  (currently only {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE} is supported)
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The loaded metadata repository
+	 * @throws OperationCanceledException if this operation has been canceled
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 * @see IRepositoryManager#REPOSITORY_HINT_MODIFIABLE
+	 */
+	public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException, OperationCanceledException;
+
+	/**
+	 * Refreshes the repository corresponding to the given URL. This method discards
+	 * any cached state held by the repository manager and reloads the repository
+	 * contents. The provided repository location must already be known to the repository
+	 * manager.
+	 * 
+	 * @param location The absolute location of the repository to refresh
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The refreshed metadata repository
+	 * @throws OperationCanceledException if this operation has been canceled
+	 * @throws ProvisionException if the repository could not be refreshed.  Reasons include:
+	 * <ul>
+	 * <li>The location is not known to the repository manager.</li>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException, OperationCanceledException;
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/package.html
new file mode 100644
index 0000000..a79a5ff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines metadata repository.
+<h2>
+Package Specification</h2>
+<p>
+This package defines the concept of metadata repository. A metadata repository stores p2 metadata.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java
new file mode 100644
index 0000000..b526bb8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java
@@ -0,0 +1,154 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.metadata.spi;
+
+import java.net.URI;
+import java.util.Collection;
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.repository.Activator;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.spi.AbstractRepository;
+
+/**
+ * The common base class for all metadata repositories.
+ * <p>
+ * Clients may subclass this class.
+ * <p>
+ * @since 2.0
+ */
+public abstract class AbstractMetadataRepository extends AbstractRepository<IInstallableUnit> implements IMetadataRepository {
+
+	/**
+	 * A class that encapsulates the persisted state of a repository. This is used as a convenience
+	 * when loading and storing repositories.
+	 * @see AbstractMetadataRepository#initialize(RepositoryState)
+	 */
+	public static class RepositoryState {
+		/**
+		 * The persisted name of the repository.
+		 */
+		public String Name;
+		/**
+		 * The persisted type of the repository.
+		 */
+		public String Type;
+		/**
+		 * The persisted version of the repository.
+		 */
+		public Version Version;
+		/**
+		 * The persisted provider of the repository.
+		 */
+		public String Provider;
+		/**
+		 * The persisted description of the repository.
+		 */
+		public String Description;
+		/**
+		 * The persisted location of the repository.
+		 */
+		public URI Location;
+		/**
+		 * The persisted properties of the repository.
+		 */
+		public Map<String, String> Properties;
+		/**
+		 * The persisted set of installable units of the repository.
+		 */
+		public IInstallableUnit[] Units;
+		/**
+		 * The persisted array of repository references
+		 */
+		public IRepositoryReference[] Repositories;
+	}
+
+	/**
+	 * Creates a new metadata repository that uses the provided agent.
+	 * 
+	 * @param agent the provisioning agent to be used by this repository
+	 */
+	public AbstractMetadataRepository(IProvisioningAgent agent) {
+		super(agent, "noName", "noType", "noVersion", null, null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+
+	/**
+	 * Initializes this class based on the provided previously persisted state
+	 * 
+	 * @param state the persisted repository state
+	 */
+	public abstract void initialize(RepositoryState state);
+
+	/**
+	 * Creates a new metadata repository with the provided repository information
+	 * 
+	 * @param agent the provisioning agent to be used by this repository
+	 * @param name the repository name
+	 * @param type the repository type
+	 * @param version the repository version
+	 * @param location the repository location
+	 * @param description the repository description
+	 * @param provider the repository provider
+	 * @param properties the repository properties
+	 */
+	protected AbstractMetadataRepository(IProvisioningAgent agent, String name, String type, String version, URI location, String description, String provider, Map<String, String> properties) {
+		super(agent, name, type, version, location, description, provider, properties);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
+		assertModifiable();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void addReferences(Collection<? extends IRepositoryReference> references) {
+		assertModifiable();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public void removeAll() {
+		assertModifiable();
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
+		assertModifiable();
+		return false;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		try {
+			runnable.run(monitor);
+		} catch (OperationCanceledException oce) {
+			return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
+		} catch (Exception e) {
+			return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
+		}
+		return Status.OK_STATUS;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/MetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/MetadataRepositoryFactory.java
new file mode 100644
index 0000000..0518b80
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/MetadataRepositoryFactory.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.metadata.spi;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+
+/**
+ * A metadata repository factory is responsible for creating and loading instances
+ * of a particular type of metadata repository. Factories are provided via the 
+ * <tt>org.eclipse.equinox.p2.metadata.repository.metadataRepositories</tt> extension point.
+ * @since 2.0
+ */
+public abstract class MetadataRepositoryFactory {
+	private IProvisioningAgent agent;
+
+	/**
+	 * Creates and returns a new empty metadata repository of the given type at 
+	 * the given location.
+	 * 
+	 * @param location the location for the new repository
+	 * @param name the name of the new repository
+	 * @param type the kind of repository to create
+	 * @param properties the properties to set on the repository
+	 * @return the newly created repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>The repository type is not supported by this factory.</li>
+	 * <li>There was an error writing to the given repository location.</li>
+	 * </ul>
+	 */
+	public abstract IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException;
+
+	/**
+	 * Returns the provisioning agent associated with this factory, or <code>null</code>
+	 * if this factory is not associated with an agent.
+	 * @return The provisioning agent, or <code>null</code>
+	 */
+	protected IProvisioningAgent getAgent() {
+		return agent;
+	}
+
+	/**
+	 * Loads a repository corresponding to the given URL.
+	 * <p>
+	 * The error code returned in the case of failure is significant. In particular an
+	 * error code of {@link ProvisionException#REPOSITORY_FAILED_READ} indicates
+	 * that the location definitely identifies a repository of this type, but an error occurred
+	 * while loading the repository. The repository manager will not attempt to load
+	 * a repository from that location using any other factory.  An error code of
+	 * {@link ProvisionException#REPOSITORY_NOT_FOUND} indicates there is no
+	 * repository of this type at the given location, and the repository manager is free
+	 * to try again with a different repository factory.
+	 * </p>
+	 * <p>
+	 * The flags passed in should be taken as a hint for the type of repository to load.  If
+	 * the factory knows it will not load a repository that satisfies these hints, it can fail
+	 * fast and return null.<br>
+	 * See {@link IRepositoryManager#REPOSITORY_HINT_MODIFIABLE}
+	 * </p>
+	 * @param location The location of the repository to load
+	 * @param flags to consider while loading the repository
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The loaded metadata repository
+	 * @throws ProvisionException if the repository could not be created.  Reasons include:
+	 * <ul>
+	 * <li>There is no existing repository at that location.</li>
+	 * <li>The repository at that location could not be read.</li>
+	 * </ul>
+	 */
+	public abstract IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException;
+
+	/**
+	 * Sets the provisioning agent associated with this repository factory.
+	 * @param agent The provisioning agent
+	 */
+	public void setAgent(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/package.html
new file mode 100644
index 0000000..f9ff751
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines  SPI for registering new implementations of metadata repositories.
+<h2>
+Package Specification</h2>
+<p>
+This package defines SPI for registering new implementations of metadata repositories.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/package.html
new file mode 100644
index 0000000..918e273
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/package.html
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines common API for querying and modifying provisioning repositories.
+<h2>
+Package Specification</h2>
+<p>
+This package defines API common to both metadata and artifact repositories.
+This API includes base interfaces for interacting with generic repositories, and repository manager
+API for querying and manipulating the set of repositories known to a given provisioning
+agent.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java
new file mode 100644
index 0000000..e833c1c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.spi;
+
+import java.net.URI;
+import java.util.Map;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.repository.IRepository;
+
+/**
+* AbstractRepository defines common properties that may be provided by various kinds
+* of repositories.
+* <p>
+* Clients may extend this class.
+* </p>
+* @param <T> the type of object that can be queried for in this repository
+ * @since 2.0
+*/
+public abstract class AbstractRepository<T> extends PlatformObject implements IRepository<T> {
+	private final IProvisioningAgent agent;
+	private String description;
+	private transient URI location;
+	private String name;
+	private Map<String, String> properties = new OrderedProperties();
+	private String provider;
+	private String type;
+	private String version;
+
+	/**
+	 * Creates a new repository with the given attributes.
+	 * 
+	 * @param agent the provisioning agent to be used by this repository
+	 * @param name the repository name
+	 * @param type the repository type
+	 * @param version the repository version
+	 * @param location the repository location
+	 * @param description the repository description
+	 * @param provider the repository provider
+	 * @param properties the repository properties
+	 */
+	protected AbstractRepository(IProvisioningAgent agent, String name, String type, String version, URI location, String description, String provider, Map<String, String> properties) {
+		this.agent = agent;
+		this.name = name;
+		this.type = type;
+		this.version = version;
+		this.location = location;
+		this.description = description == null ? "" : description; //$NON-NLS-1$
+		this.provider = provider == null ? "" : provider; //$NON-NLS-1$
+		if (properties != null)
+			this.properties.putAll(properties);
+	}
+
+	/**
+	 * Asserts that this repository is modifiable, throwing a runtime exception if
+	 * it is not. This is suitable for use by subclasses when an attempt is made
+	 * to write to a repository.
+	 */
+	protected void assertModifiable() {
+		if (!isModifiable())
+			throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a brief description of the repository.
+	 * @return the description of the repository.
+	 */
+	public synchronized String getDescription() {
+		return description;
+	}
+
+	/**
+	 * Returns the location of this repository.
+	 * TODO: Should we use URL or URI? URL requires a protocol handler
+	 * to be installed in Java.  Can the URL have any protocol?
+	 * @return the URL of the repository.
+	 */
+	public synchronized URI getLocation() {
+		return location;
+	}
+
+	/**
+	 * Returns the name of the repository.
+	 * @return the name of the repository.
+	 */
+	public synchronized String getName() {
+		return name;
+	}
+
+	/**
+	 * Returns a read-only collection of the properties of the repository.
+	 * @return the properties of this repository.
+	 */
+	public synchronized Map<String, String> getProperties() {
+		return OrderedProperties.unmodifiableProperties(properties);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getProperty(String key) {
+		return properties.get(key);
+	}
+
+	/**
+	 * Returns the name of the provider of the repository.
+	 * @return the provider of this repository.
+	 */
+	public synchronized String getProvider() {
+		return provider;
+	}
+
+	/**
+	 * Returns the provisioning agent used by this repository
+	 * 
+	 * @return the provisioning agent
+	 */
+	public IProvisioningAgent getProvisioningAgent() {
+		return agent;
+	}
+
+	/**
+	 * Returns a string representing the type of the repository.
+	 * @return the type of the repository.
+	 */
+	public synchronized String getType() {
+		return type;
+	}
+
+	/**
+	 * Returns a string representing the version for the repository type.
+	 * @return the version of the type of the repository.
+	 */
+	public synchronized String getVersion() {
+		return version;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean isModifiable() {
+		return false;
+	}
+
+	/**
+	 * Sets the description of this repository
+	 * 
+	 * @param description the repository description
+	 */
+	public synchronized void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * Sets the name of this repository
+	 * 
+	 * @param value the repository name
+	 */
+	public synchronized void setName(String value) {
+		this.name = value;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public synchronized String setProperty(String key, String value) {
+		assertModifiable();
+		if (key.equals(IRepository.PROP_NAME)) {
+			String oldName = getName();
+			setName(value);
+			return oldName;
+		}
+		return (value == null ? properties.remove(key) : properties.put(key, value));
+	}
+
+	/**
+	 * Sets the provider of this repository
+	 * 
+	 * @param provider the repository provider
+	 */
+	public synchronized void setProvider(String provider) {
+		this.provider = provider;
+	}
+
+	/**
+	 * Sets the type of this repository
+	 * 
+	 * @param type the repository type
+	 */
+	protected synchronized void setType(String type) {
+		this.type = type;
+	}
+
+	/**
+	 * Sets the location of this repository
+	 * 
+	 * @param location the repository location
+	 */
+	protected synchronized void setLocation(URI location) {
+		this.location = location;
+	}
+
+	/**
+	 * Sets the version of this repository
+	 * 
+	 * @param version the repository version
+	 */
+	protected synchronized void setVersion(String version) {
+		this.version = version;
+	}
+
+	/**
+	 * Sets the properties of this repository
+	 * 
+	 * @param properties the repository provider
+	 */
+	protected synchronized void setProperties(Map<String, String> properties) {
+		this.properties = properties;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java
new file mode 100644
index 0000000..e2022f0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc - public API
+ *******************************************************************************/
+package org.eclipse.equinox.p2.repository.spi;
+
+import java.net.URI;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+
+/**
+ * Concrete implementation of a repository reference. This class can be used
+ * by clients to define new repository references.
+ * @see IMetadataRepository#addReferences(java.util.Collection)
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class RepositoryReference implements IRepositoryReference {
+	private final URI location;
+	private final int type;
+	private final int options;
+	private final String nickname;
+
+	/**
+	 * Creates a reference to another repository.
+	 *
+	 * The {@link IRepository#ENABLED} option flag controls whether the 
+	 * referenced repository should be marked as enabled when added to the repository
+	 * manager. If this flag is set, the repository will be marked as enabled when
+	 * added to the repository manager. If this flag is missing, the repository will
+	 * be marked as disabled.
+	 * 
+	 * @param location the location of the repository to add
+	 * @param nickname The nickname of the repository, or <code>null</code>
+	 * @param type the repository type (currently either {@link IRepository#TYPE_METADATA}
+	 * or {@link IRepository#TYPE_ARTIFACT}).
+	 * @param options bit-wise or of option constants (currently either 
+	 * {@link IRepository#ENABLED} or {@link IRepository#NONE}).
+	 * @see IMetadataRepositoryManager#setEnabled(URI, boolean)
+	 */
+	public RepositoryReference(URI location, String nickname, int type, int options) {
+		this.location = location;
+		this.type = type;
+		this.options = options;
+		this.nickname = nickname;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (!(obj instanceof IRepositoryReference))
+			return false;
+		IRepositoryReference other = (IRepositoryReference) obj;
+		if (location == null) {
+			if (other.getLocation() != null)
+				return false;
+		} else if (!location.equals(other.getLocation()))
+			return false;
+		if (type != other.getType())
+			return false;
+		return true;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public URI getLocation() {
+		return location;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public int getType() {
+		return type;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public int getOptions() {
+		return options;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getNickname() {
+		return nickname;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((location == null) ? 0 : location.hashCode());
+		result = prime * result + type;
+		return result;
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/package.html b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/package.html
new file mode 100644
index 0000000..ad41c84
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Defines common types for handling repositories.
+<h2>
+Package Specification</h2>
+<p>
+This package defines the common types to handle metadata and artifact repositories.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/.project b/eclipse/plugins/org.eclipse.equinox.p2.tools/.project
deleted file mode 100644
index a0af601..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.equinox.p2.tools</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 46aa817..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Fri Feb 22 11:11:17 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8d299d8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:57 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7dc0477..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jul 30 14:52:29 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF
deleted file mode 100644
index 684bfaa..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,37 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.tools;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.0.qualifier
-Import-Package: javax.servlet;version="2.4.0",
- javax.servlet.http;version="2.4.0",
- org.eclipse.core.runtime;version="3.4.0",
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.console,
- org.eclipse.equinox.internal.p2.core,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.p2.updatechecker,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.osgi.service.resolver,
- org.osgi.framework;version="1.4.0",
- org.osgi.service.http;version="1.2.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.tools;x-internal:=true
-Bundle-Activator: org.eclipse.equinox.internal.p2.tools.Activator
-Eclipse-LazyStart: true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.tools/build.properties
deleted file mode 100644
index 4bbd9bd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.xml,\
-               about.html,\
-               plugin.properties
-src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch b/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch
deleted file mode 100644
index eb179db..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - compare metadata.launch	
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2 tools - compare metadata"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.tools.metadataCompareApplication
-source http://download.eclipse.org/eclipse/updates/3.4milestones/
-target file:/users/bensonwong/tmp/eclipse.3.4.mirror/
-compare"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="true"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.common at default:default,org.eclipse.equinox.security at default:default,org.eclipse.equinox.app at default:true,org.eclipse.osgi@:,org.eclipse.equinox.registry at default:default,org.eclipse.core.jobs at default:default,org.eclipse.equinox.launcher at default:default,org.eclipse.core.runtime at default:default,org.eclipse.core.contenttype at default:default,javax.servlet at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.osgi.services at default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.console at default:default,org.eclipse.ecf at default:default,org.eclipse.equinox.p2.tools at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.updatechecker at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.ecf.filetransfer at default:default,org.sat4j.core at default:default,org.sat4j.pb at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.artifact.repository at default:default"/>
-</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - file server.launch b/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - file server.launch
deleted file mode 100644
index 27ecbf1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - file server.launch	
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="c:\prov\p2\ProvAdminUI"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<stringAttribute key="execEnvironment" value="J2SE-1.5"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.tools.fileserverApplication
-resource /artifact file:c:/prov/p2/servers"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.p2.data.area=c:/prov/p2/agentData/
-Dosgi.noShutdown=true"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="target_bundles" value="javax.servlet at default:default,org.apache.commons.logging at default:default,org.eclipse.core.jobs at default:default,org.eclipse.equinox.app at default:default,org.eclipse.equinox.common at default:default,org.eclipse.equinox.http.jetty at default:true,org.eclipse.equinox.http.registry at default:true,org.eclipse.equinox.http.servlet at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.osgi@:,org.eclipse.osgi.services at default:default,org.mortbay.jetty at default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useNamedJRE" value="false"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.ecf at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.frameworkadmin at default:default,org.eclipse.equinox.frameworkadmin.equinox at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.console at default:true,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.equinox.p2.download at default:default,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.exemplarysetup at default:true,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.tools at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.simpleconfigurator.manipulator at default:default"/>
-</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch b/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch
deleted file mode 100644
index eced27a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/p2 tools - mirror.launch	
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2 tools - mirror"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JAVA_COMMAND" value="java"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.tools.MirrorApplication
-source file:z:/tmp/cdt/
-destination file:/tmp/cdt.mirror.win/
-ius all
-artifacts all"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.osgi.services at default:default,org.eclipse.equinox.launcher at default:default,org.eclipse.equinox.common at default:default,org.eclipse.osgi@:,org.eclipse.core.jobs at default:default,org.eclipse.core.contenttype at default:default,org.sat4j.core at default:default,javax.servlet at default:default,org.eclipse.core.runtime at default:default,org.eclipse.equinox.security at default:default,org.eclipse.equinox.app at default:true,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.registry at default:default,org.sat4j.pb at default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.p2.tools at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.console at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.ecf at default:default,org.eclipse.equinox.simpleconfigurator at default:true,org.eclipse.equinox.p2.updatechecker at default:default"/>
-</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.properties
deleted file mode 100644
index 872e0f2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-#  Copyright (c) 2007, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Equinox p2 Tools (Incubation)
-providerName = Eclipse.org - Equinox
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.xml
deleted file mode 100644
index e3dd040..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<plugin>
-   <extension id="fileserverApplication"  point="org.eclipse.core.runtime.applications">
-      <application cardinality="1" thread="main" visible="true">
-         <run class="org.eclipse.equinox.internal.p2.tools.FileServerApplication"/>
-      </application>
-   </extension>
-	<extension id="application" point="org.eclipse.core.runtime.applications"> 
-      <application> 
-         <run class="org.eclipse.equinox.internal.p2.tools.UpdateCheckerApplication"/> 
-      </application> 
-   </extension>
-	<extension id="metadataCompareApplication" point="org.eclipse.core.runtime.applications"> 
-      <application> 
-         <run class="org.eclipse.equinox.internal.p2.tools.MetadataCompareApplication"/> 
-      </application> 
-   </extension>
-	<extension id="MirrorApplication" point="org.eclipse.core.runtime.applications"> 
-      <application> 
-         <run class="org.eclipse.equinox.internal.p2.tools.mirror.MirrorApplication"/> 
-      </application> 
-   </extension>
-</plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java
deleted file mode 100644
index 5423e68..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/Activator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
-	private static BundleContext bundleContext;
-
-	public static BundleContext getContext() {
-		return bundleContext;
-	}
-
-	public void start(BundleContext context) throws Exception {
-		bundleContext = context;
-	}
-
-	public void stop(BundleContext context) throws Exception {
-		bundleContext = null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java
deleted file mode 100644
index 264727f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/FileServerApplication.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.osgi.service.http.*;
-
-public class FileServerApplication implements IApplication {
-	private Map resources = new HashMap(10);
-
-	private static class FileSystemContext implements HttpContext {
-		private String base;
-
-		public FileSystemContext(String base) {
-			this.base = base;
-		}
-
-		public String getMimeType(String name) {
-			return null;
-		}
-
-		public URL getResource(String name) {
-			try {
-				return new URL(base + name);
-			} catch (MalformedURLException e) {
-				return null;
-			}
-		}
-
-		public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {
-			return true;
-		}
-	}
-
-	public Object start(IApplicationContext context) throws Exception {
-		Map args = context.getArguments();
-		initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
-		registerResources(resources);
-		return null;
-	}
-
-	private void registerResources(Map list) {
-		HttpService http = (HttpService) ServiceHelper.getService(Activator.getContext(), HttpService.class.getName());
-		for (Iterator i = resources.keySet().iterator(); i.hasNext();) {
-			String key = (String) i.next();
-			String value = (String) resources.get(key);
-			try {
-				http.registerResources(key, "/", new FileSystemContext(value)); //$NON-NLS-1$
-			} catch (NamespaceException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-	}
-
-	public void stop() {
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-		for (int i = 0; i < args.length; i++) {
-			// check for args without parameters (i.e., a flag arg)
-			//			if (args[i].equals("-raw"))
-			//				raw = true;
-
-			// check for args with parameters. If we are at the last argument or 
-			// if the next one has a '-' as the first character, then we can't have 
-			// an arg with a param so continue.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-			String arg = args[++i];
-
-			if (args[i - 1].equalsIgnoreCase("-resource")) //$NON-NLS-1$
-				resources.put(arg, args[++i]);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java
deleted file mode 100644
index 0d003ee..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/MetadataCompareApplication.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-public class MetadataCompareApplication implements IApplication {
-
-	private MetadataRepositoryManager repoManager = new MetadataRepositoryManager();
-	private IMetadataRepository sourceRepo = null;
-	private IMetadataRepository targetRepo = null;
-
-	private static Comparator iuIdComparator = new Comparator() {
-		public int compare(Object source, Object target) {
-			IInstallableUnit sourceIU = (IInstallableUnit) source;
-			IInstallableUnit targetIU = (IInstallableUnit) target;
-			int id = sourceIU.getId().compareTo(targetIU.getId());
-			if (id != 0)
-				return id;
-			return sourceIU.getVersion().compareTo(targetIU.getVersion());
-		}
-	};
-
-	private URI sourceLocation;
-	private URI targetLocation;
-	private boolean compare = false;
-	private boolean list = false;
-
-	public Object start(IApplicationContext context) throws Exception {
-		initializeFromArguments((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
-		initRepositories();
-
-		if (compare) {
-			compareMetadataRepositories();
-		} else if (list) {
-			list(sourceLocation);
-			list(targetLocation);
-		}
-		return IApplication.EXIT_OK;
-	}
-
-	private void list(URI location) throws ProvisionException {
-		if (location == null)
-			return;
-		IMetadataRepository locationRepo = repoManager.getRepository(location);
-		if (locationRepo == null)
-			return;
-		Collector sourceRoots = locationRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
-		IInstallableUnit[] sourceIUs = (IInstallableUnit[]) sourceRoots.toArray(IInstallableUnit.class);
-
-		sourceIUs = sort(sourceIUs, true);
-		for (int i = 0; i < sourceIUs.length; i++) {
-			System.out.print(sourceIUs[i]);
-			System.out.println(sourceIUs[i].isFragment() ? " (fragment)" : ""); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		System.out.println("Total: " + sourceIUs.length); //$NON-NLS-1$
-	}
-
-	private void compareMetadataRepositories() throws ProvisionException {
-		System.out.println("\n" + sourceLocation + " -> " + targetLocation); //$NON-NLS-1$ //$NON-NLS-2$
-		compare(sourceRepo, targetRepo);
-	}
-
-	private void initRepositories() throws ProvisionException {
-		if (targetLocation == null || sourceLocation == null)
-			throw new IllegalStateException("Must specify a source and target"); //$NON-NLS-1$
-		sourceRepo = repoManager.loadRepository(sourceLocation, null);
-		targetRepo = initializeTarget();
-	}
-
-	private IMetadataRepository initializeTarget() throws ProvisionException {
-		try {
-			IMetadataRepository repository = repoManager.loadRepository(targetLocation, null);
-			if (!repository.isModifiable())
-				throw new IllegalArgumentException("Metadata repository not modifiable: " + targetLocation); //$NON-NLS-1$
-			return repository;
-		} catch (ProvisionException e) {
-			//fall through and create repo
-		}
-		String repositoryName = targetLocation + " - metadata"; //$NON-NLS-1$
-		return repoManager.createRepository(targetLocation, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
-	}
-
-	private void compare(IMetadataRepository sourceRepo, IMetadataRepository targetRepo) {
-		Collector sourceRoots = sourceRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
-		Collector targetRoots = targetRepo.query(InstallableUnitQuery.ANY, new Collector(), new NullProgressMonitor());
-		IInstallableUnit[] sourceIUs = (IInstallableUnit[]) sourceRoots.toArray(IInstallableUnit.class);
-		sourceIUs = sort(sourceIUs, true);
-		IInstallableUnit[] targetIUs = (IInstallableUnit[]) targetRoots.toArray(IInstallableUnit.class);
-		targetIUs = sort(targetIUs, true);
-
-		int targetIndex = 0;
-		for (int i = 0; i < sourceIUs.length; i++)
-			targetIndex = compareUsingTargets(sourceIUs[i], targetIUs, targetIndex);
-	}
-
-	private int compareUsingTargets(IInstallableUnit sourceIU, IInstallableUnit[] targetIUs, int targetIndex) {
-		while (targetIndex < targetIUs.length) {
-			int difference = iuIdComparator.compare(sourceIU, targetIUs[targetIndex]);
-			if (difference < 0) {
-				System.out.println(sourceIU + " is not found in target repository"); //$NON-NLS-1$
-				return targetIndex;
-			} else if (difference == 0) {
-				String comparison = compare(sourceIU, targetIUs[targetIndex]);
-				if (comparison.length() > 0)
-					System.out.println(sourceIU + comparison);
-				return targetIndex + 1;
-			} else {
-				System.out.println(targetIUs[targetIndex++] + " is not found in source repository"); //$NON-NLS-1$
-			}
-		}
-		System.out.println(sourceIU + " is not found in target repository"); //$NON-NLS-1$
-		return targetIndex;
-	}
-
-	private boolean compare(Object a, Object b) {
-		if (a == null)
-			return b == null;
-		return a.equals(b);
-	}
-
-	private boolean compare(Object[] a, Object b[]) {
-		if (a == null)
-			return b == null;
-		return Arrays.equals(a, b);
-	}
-
-	private String compare(IInstallableUnit iu, IInstallableUnit next) {
-		if (next == null)
-			return " iu artifactLocators providedCapabilities requiredCapabilities touchpointType"; //$NON-NLS-1$
-		String result = ""; //$NON-NLS-1$
-		if (!iu.equals(next))
-			result += " iu"; //$NON-NLS-1$
-		//		if (!compare(iu.getApplicabilityFilter(), next.getApplicabilityFilter()))
-		//			result += " applicabilityFilter";
-		if (!compare(iu.getArtifacts(), next.getArtifacts()))
-			result += " artifactLocators"; //$NON-NLS-1$
-		if (!compare(iu.getProvidedCapabilities(), next.getProvidedCapabilities()))
-			result += " providedCapabilities"; //$NON-NLS-1$
-		if (!compareRequires(iu.getRequiredCapabilities(), next.getRequiredCapabilities()))
-			result += " requiredCapabilities"; //$NON-NLS-1$
-		if (!compare(iu.getTouchpointType(), next.getTouchpointType()))
-			result += " touchpointType"; //$NON-NLS-1$
-
-		if (iu.isFragment()) {
-			//			if (((InstallableUnitFragment) iu).getHost() == null || ((InstallableUnitFragment) iu).getVersion() == null)
-			//				return result;
-			//			if (!((InstallableUnitFragment) iu).getHost().equals(((InstallableUnitFragment) next).getHost()))
-			//				result += " hostid";
-			//			if (!((InstallableUnitFragment) iu).getVersion().equals(((InstallableUnitFragment) next).getVersion()))
-			//				result += " hostversionRange";
-		}
-		return result;
-	}
-
-	private boolean compareRequires(IRequiredCapability[] a, IRequiredCapability[] b) {
-		if (a == null)
-			return b == null;
-		if (a.length != b.length)
-			return false;
-		if (a == b)
-			return true;
-		for (int i = 0; i < a.length; i++)
-			if (findCapability(a[i], b) == null)
-				return false;
-		return true;
-	}
-
-	private IRequiredCapability findCapability(IRequiredCapability target, IRequiredCapability[] b) {
-		for (int i = 0; i < b.length; i++) {
-			IRequiredCapability capability = b[i];
-			if (target.equals(capability))
-				return capability;
-		}
-		return null;
-	}
-
-	private IInstallableUnit[] sort(IInstallableUnit[] ius, boolean clone) {
-		IInstallableUnit[] result = ius;
-		if (clone) {
-			result = new InstallableUnit[ius.length];
-			System.arraycopy(ius, 0, result, 0, ius.length);
-		}
-		Arrays.sort(result, iuIdComparator);
-		return result;
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-		for (int i = 0; i < args.length; i++) {
-			if (args[i].equalsIgnoreCase("-compare")) //$NON-NLS-1$
-				compare = true;
-			if (args[i].equalsIgnoreCase("-list")) //$NON-NLS-1$
-				list = true;
-
-			// check for args with parameters. If we are at the last argument or
-			// if the next one
-			// has a '-' as the first character, then we can't have an arg with
-			// a parm so continue.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-
-			String arg = args[++i];
-
-			if (args[i - 1].equalsIgnoreCase("-source")) //$NON-NLS-1$
-				sourceLocation = new URI(arg);
-			if (args[i - 1].equalsIgnoreCase("-target")) //$NON-NLS-1$
-				targetLocation = new URI(arg);
-		}
-	}
-
-	public void stop() {
-		//do nothing
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java
deleted file mode 100644
index 17fa88c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/UpdateCheckerApplication.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools;
-
-import java.util.Map;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.updatechecker.UpdateChecker;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-
-/**
- * A little app that demonstrates how to register for automatic update checks on
- * a profile.
- * 
- *  -profile profileID (specifies the profile id to check for updates)
- *  -delay long (specifies a long which is the initial delay before beginning polling)
- *  -poll long (specifies a long which is the frequency of the update poll)
- *  -debug, -trace can be used to show you what's going on.
- *  
- *   This checker simply writes to system.out when updates are available and lists the
- *   IU's that have updates available.
- */
-public class UpdateCheckerApplication implements IApplication {
-
-	private static String ARG_PROFILE = "-profile"; //$NON-NLS-1$
-	private static String ARG_POLL = "-poll"; //$NON-NLS-1$
-	private static String ARG_DELAY = "-delay"; //$NON-NLS-1$
-	private static String ARG_DEBUG = "-debug"; //$NON-NLS-1$
-	private static String ARG_TRACE = "-trace"; //$NON-NLS-1$
-	String profileId;
-	long delay = IUpdateChecker.ONE_TIME_CHECK;
-	long poll = IUpdateChecker.ONE_TIME_CHECK;
-	IUpdateChecker checker;
-	IUpdateListener listener = new IUpdateListener() {
-
-		public void updatesAvailable(UpdateEvent event) {
-			System.out.println("Updates available for " + profileId); //$NON-NLS-1$
-			IInstallableUnit[] ius = event.getIUs();
-			for (int i = 0; i < ius.length; i++)
-				System.out.println(ius[i].toString());
-		}
-
-	};
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
-	 */
-	public Object start(IApplicationContext context) throws Exception {
-		checker = (IUpdateChecker) ServiceHelper.getService(Activator.getContext(), IUpdateChecker.SERVICE_NAME);
-		if (checker == null)
-			throw new RuntimeException("Update checker could not be loaded."); //$NON-NLS-1$
-
-		Map args = context.getArguments();
-		initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
-		if (profileId == null) {
-			System.out.println("Must specify a profile id using -profile arg"); //$NON-NLS-1$
-		} else {
-			checker.addUpdateCheck(profileId, InstallableUnitQuery.ANY, delay, poll, listener);
-		}
-
-		return null;
-	}
-
-	public void stop() {
-		checker.removeUpdateCheck(listener);
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-		for (int i = 0; i < args.length; i++) {
-			if (args[i].equals(ARG_DEBUG))
-				UpdateChecker.DEBUG = true;
-			else if (args[i].equals(ARG_TRACE))
-				UpdateChecker.TRACE = true;
-
-			// The remaining args have parameters.  If we are at the
-			// last argument, or if the next one starts with a '-',
-			// then there won't be a parm, so skip this one.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-
-			String arg = args[++i];
-
-			if (args[i - 1].equalsIgnoreCase(ARG_PROFILE))
-				profileId = arg;
-			else if (args[i - 1].equalsIgnoreCase(ARG_POLL))
-				poll = getLong(ARG_POLL, arg, IUpdateChecker.ONE_TIME_CHECK);
-			else if (args[i - 1].equalsIgnoreCase(ARG_DELAY))
-				delay = getLong(ARG_DELAY, arg, IUpdateChecker.ONE_TIME_CHECK);
-
-		}
-	}
-
-	long getLong(String argName, String value, long defaultValue) {
-		if (value != null)
-			try {
-				return Long.parseLong(value);
-			} catch (Exception e) {
-				System.out.println("The value for " + argName + "(" + value + ") is not a long."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			}
-		return defaultValue;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java
deleted file mode 100644
index 184c11d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/MirrorApplication.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- * 	    IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools.mirror;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-/**
- * An application that performs mirroring of artifacts between repositories.
- */
-public class MirrorApplication implements IApplication {
-
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private static final String COMMA_SEPARATOR = ","; //$NON-NLS-1$
-	private String[] iuSpecs;
-	private String[] artifactSpecs;
-	private URI metadataSourceLocation;
-	private URI metadataDestinationLocation;
-	private URI artifactSourceLocation;
-	private URI artifactDestinationLocation;
-	private boolean referencedIUs = false;
-	private boolean raw = false;
-	private boolean overwrite = false;
-	private boolean verbose = false;
-	private boolean compressed = false;
-
-	/**
-	 * Convert a list of tokens into an array. The list separator has to be
-	 * specified.
-	 */
-	public static String[] getArrayArgsFromString(String list, String separator) {
-		if (list == null || list.trim().equals(EMPTY_STRING))
-			return new String[0];
-		List result = new ArrayList();
-		for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
-			String token = tokens.nextToken().trim();
-			if (!token.equals(EMPTY_STRING)) {
-				if ((token.indexOf('[') >= 0 || token.indexOf('(') >= 0) && tokens.hasMoreTokens())
-					result.add(token + separator + tokens.nextToken());
-				else
-					result.add(token);
-			}
-		}
-		return (String[]) result.toArray(new String[result.size()]);
-	}
-
-	private static String[] getArrayArgsFromString(String list, String delimiterStart, String delimiterEnd, String separator) {
-		if (list == null || list.trim().equals(EMPTY_STRING))
-			return new String[0];
-		List result = new ArrayList();
-		for (StringTokenizer tokens = new StringTokenizer(list, delimiterStart); tokens.hasMoreTokens();) {
-			String token = tokens.nextToken().trim();
-			if (token.endsWith(delimiterEnd))
-				token = token.substring(0, token.length() - delimiterEnd.length());
-			if (token.endsWith(delimiterEnd + separator))
-				token = token.substring(0, token.length() - delimiterEnd.length() - separator.length());
-			if (!token.equals(EMPTY_STRING))
-				result.add(token);
-		}
-		return (String[]) result.toArray(new String[result.size()]);
-	}
-
-	public Object start(IApplicationContext context) throws Exception {
-		long time = -System.currentTimeMillis();
-		initializeFromArguments((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
-		RepositoryMirroring operation = new RepositoryMirroring(metadataSourceLocation, metadataDestinationLocation, artifactSourceLocation, artifactDestinationLocation, overwrite, compressed);
-		operation.setReferencedIUs(referencedIUs);
-		operation.setRaw(raw);
-		operation.setVerbose(verbose);
-		operation.mirror(iuSpecs, artifactSpecs);
-		time += System.currentTimeMillis();
-		if (verbose)
-			System.out.println("Operation completed in " + new Long(time) + " ms."); //$NON-NLS-1$//$NON-NLS-2$
-		return IApplication.EXIT_OK;
-	}
-
-	public void stop() {
-		//do nothing
-	}
-
-	public void initializeFromArguments(String[] args) throws Exception {
-		if (args == null)
-			return;
-		for (int i = 0; i < args.length; i++) {
-			// check for args without parameters (i.e., a flag arg)
-			if (args[i].equalsIgnoreCase("-referencedIUs")) //$NON-NLS-1$
-				referencedIUs = true;
-			if (args[i].equalsIgnoreCase("-raw")) //$NON-NLS-1$
-				raw = true;
-			if (args[i].equalsIgnoreCase("-overwrite")) //$NON-NLS-1$
-				overwrite = true;
-			if (args[i].equalsIgnoreCase("-verbose")) //$NON-NLS-1$
-				verbose = true;
-			if (args[i].equalsIgnoreCase("-compressed")) //$NON-NLS-1$
-				compressed = true;
-
-			// check for args with parameters. If we are at the last argument or 
-			// if the next one has a '-' as the first character, then we can't have 
-			// an arg with a param so continue.
-			if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
-				continue;
-			String arg = args[++i];
-
-			try {
-				if (args[i - 1].equalsIgnoreCase("-source")) { //$NON-NLS-1$
-					metadataSourceLocation = URIUtil.fromString(arg);
-					artifactSourceLocation = URIUtil.fromString(arg);
-				}
-				if (args[i - 1].equalsIgnoreCase("-destination")) { //$NON-NLS-1$
-					metadataDestinationLocation = URIUtil.fromString(arg);
-					artifactDestinationLocation = URIUtil.fromString(arg);
-				}
-				if (args[i - 1].equalsIgnoreCase("-metadatadestination")) //$NON-NLS-1$
-					metadataDestinationLocation = URIUtil.fromString(arg);
-				if (args[i - 1].equalsIgnoreCase("-metadatasource")) //$NON-NLS-1$
-					metadataSourceLocation = URIUtil.fromString(arg);
-				if (args[i - 1].equalsIgnoreCase("-artifactdestination")) //$NON-NLS-1$
-					artifactDestinationLocation = URIUtil.fromString(arg);
-				if (args[i - 1].equalsIgnoreCase("-artifactsource")) //$NON-NLS-1$
-					artifactSourceLocation = URIUtil.fromString(arg);
-			} catch (URISyntaxException e) {
-				throw new IllegalArgumentException("Repository location (" + arg + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-
-			if (args[i - 1].equalsIgnoreCase("-ius")) //$NON-NLS-1$
-				if (arg.equalsIgnoreCase("all")) //$NON-NLS-1$ 
-					iuSpecs = new String[0];
-				else
-					iuSpecs = getArrayArgsFromString(arg, COMMA_SEPARATOR);
-			if (args[i - 1].equalsIgnoreCase("-artifacts")) //$NON-NLS-1$
-				if (arg.equalsIgnoreCase("all")) //$NON-NLS-1$ 
-					artifactSpecs = new String[0];
-				else
-					artifactSpecs = getArrayArgsFromString(arg, "{", "}", COMMA_SEPARATOR); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java
deleted file mode 100644
index 9b0ff86..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RangeQuery.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A convenience query that will match any {@link IInstallableUnit}
- * it encounters.
- */
-public class RangeQuery extends MatchQuery {
-	private VersionRangedName[] targets;
-
-	/**
-	 * Creates a query that will match any {@link IInstallableUnit} with the given
-	 * VerionRangedName.
-	 * 
-	 * @param targets The installable unit names with versions to match, or <code>null</code> to match any id
-	 */
-	public RangeQuery(VersionRangedName[] targets) {
-		this.targets = targets;
-	}
-
-	/**
-	 * Returns true if the <code>IInstallableUnit</code> object is contained in the <code>VerionRangedName</code>'s or targets is null.
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		if (targets == null)
-			return true;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		for (int i = 0; i < targets.length; i++) {
-			VersionRangedName entry = targets[i];
-			if (entry.getId().equalsIgnoreCase(candidate.getId()) && entry.getVersionRange().isIncluded(candidate.getVersion()))
-				return true;
-		}
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java
deleted file mode 100644
index 4f673f8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/RepositoryMirroring.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- * 	    IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-
-/**
- * A utility class that performs mirroring of metadata and artifacts between repositories.
- */
-public class RepositoryMirroring {
-
-	private IMetadataRepository metadataSourceRepository;
-	private IMetadataRepository metadataDestinationRepository;
-	private IArtifactRepository artifactSourceRepository;
-	private IArtifactRepository artifactDestinationRepository;
-	private boolean referencedIUs = false;
-	private boolean validArtifactRepos = false;
-	private boolean validMetadataRepos = false;
-	private boolean mirrorArtifactsWithMetadata = false;
-	private boolean raw = false;
-	private boolean overwrite = false;
-	private boolean verbose = false;
-	private boolean compressed = false;
-
-	public RepositoryMirroring(URI metadataSourceLocation, URI metadataDestinationLocation, URI artifactSourceLocation, URI artifactDestinationLocation, boolean overwrite, boolean compressed) throws ProvisionException {
-		this.overwrite = overwrite;
-		this.compressed = compressed;
-		if (metadataSourceLocation != null && metadataDestinationLocation != null) {
-			MetadataRepositoryManager metadataRepoManager = new MetadataRepositoryManager();
-			metadataSourceRepository = metadataRepoManager.loadRepository(metadataSourceLocation, null);
-			metadataRepoManager.removeRepository(metadataSourceLocation);
-			metadataDestinationRepository = initializeMetadataDestination(metadataRepoManager, metadataDestinationLocation);
-			validMetadataRepos = validateMetadataRepositories();
-		}
-		if (artifactSourceLocation != null && artifactDestinationLocation != null) {
-			ArtifactRepositoryManager artifactRepoManager = new ArtifactRepositoryManager();
-			artifactSourceRepository = artifactRepoManager.loadRepository(artifactSourceLocation, null);
-			artifactRepoManager.removeRepository(artifactSourceLocation);
-			artifactDestinationRepository = initializeArtifactDestination(artifactRepoManager, artifactDestinationLocation);
-			validArtifactRepos = validateArtifactRepositories();
-		}
-	}
-
-	public void mirror(String[] iuSpecs, String[] artifactSpecs) throws ProvisionException {
-		mirrorArtifactsWithMetadata = validArtifactRepos && artifactSpecs != null && artifactSpecs.length == 0 && iuSpecs != null;
-		if (validMetadataRepos && iuSpecs != null)
-			mirrorMetadata(iuSpecs);
-		if (validArtifactRepos && !mirrorArtifactsWithMetadata && artifactSpecs != null)
-			mirrorArtifacts(artifactSpecs, raw);
-	}
-
-	public void mirrorMetadata(String[] iuSpecs) throws ProvisionException {
-		if (iuSpecs.length == 0)
-			mirrorMetadata(InstallableUnitQuery.ANY);
-		else {
-			VersionRangedName[] iuRanges = new VersionRangedName[iuSpecs.length];
-			for (int i = 0; i < iuSpecs.length; i++)
-				iuRanges[i] = VersionRangedName.parse(iuSpecs[i]);
-			mirrorMetadata(new RangeQuery(iuRanges));
-		}
-	}
-
-	public void mirrorMetadata(Query query) throws ProvisionException {
-		Collector result = metadataSourceRepository.query(query, new Collector(), null);
-		mirrorMetadata((IInstallableUnit[]) result.toArray(IInstallableUnit.class));
-	}
-
-	private void mirrorMetadata(IInstallableUnit[] ius) throws ProvisionException {
-		if (referencedIUs)
-			ius = addTransitiveIUs(metadataSourceRepository, ius);
-		for (int i = 0; i < ius.length; i++) {
-			IInstallableUnit iu = ius[i];
-			if (verbose)
-				System.out.println("Mirroring IU: " + iu);
-			if (mirrorArtifactsWithMetadata)
-				mirrorArtifacts(iu.getArtifacts(), raw);
-		}
-		metadataDestinationRepository.addInstallableUnits(ius);
-	}
-
-	private void mirrorArtifact(IArtifactDescriptor descriptor) throws ProvisionException {
-		IArtifactDescriptor newDescriptor = raw ? descriptor : new ArtifactDescriptor(descriptor);
-		if (artifactDestinationRepository.contains(descriptor))
-			return;
-		OutputStream repositoryStream = null;
-		try {
-			repositoryStream = artifactDestinationRepository.getOutputStream(newDescriptor);
-			if (repositoryStream == null)
-				return;
-			if (verbose)
-				System.out.println("Mirroring artifact: " + descriptor);
-			// TODO Is that ok to ignore the result?
-			artifactSourceRepository.getRawArtifact(descriptor, repositoryStream, new NullProgressMonitor());
-		} finally {
-			if (repositoryStream != null)
-				try {
-					repositoryStream.close();
-				} catch (IOException e) {
-					// TODO Is that ok to ignore the exception
-					e.printStackTrace();
-				}
-		}
-	}
-
-	private void mirrorArtifacts(IArtifactKey[] keys, boolean raw) throws ProvisionException {
-		for (int i = 0; i < keys.length; i++) {
-			IArtifactKey key = keys[i];
-			IArtifactDescriptor[] descriptors = artifactSourceRepository.getArtifactDescriptors(key);
-			for (int j = 0; j < descriptors.length; j++)
-				mirrorArtifact(descriptors[j]);
-		}
-	}
-
-	private void mirrorArtifacts(String[] artifactSpecs, boolean raw) throws ProvisionException {
-		IArtifactKey[] keys;
-		if (artifactSpecs == null)
-			return;
-		if (artifactSpecs.length == 0)
-			keys = artifactSourceRepository.getArtifactKeys();
-		else {
-			keys = new ArtifactKey[artifactSpecs.length];
-			for (int i = 0; i < artifactSpecs.length; i++) {
-				keys[i] = ArtifactKey.parse(artifactSpecs[i]);
-			}
-		}
-		mirrorArtifacts(keys, raw);
-	}
-
-	protected IInstallableUnit[] addTransitiveIUs(IMetadataRepository source, IInstallableUnit[] ius) {
-		// TODO Here we should create a profile from the source repo and discover all the 
-		// IUs that are needed to support the given ius.  For now just assume that the 
-		// given ius are enough.
-		return ius;
-	}
-
-	private boolean validateMetadataRepositories() {
-		if (metadataSourceRepository == null)
-			throw new IllegalStateException("Source metadata repository is null."); //$NON-NLS-1$
-		if (metadataDestinationRepository == null)
-			throw new IllegalStateException("Destination metadata repository is null."); //$NON-NLS-1$
-		if (!metadataDestinationRepository.isModifiable())
-			throw new IllegalStateException("Destination metadata repository must be modifiable: " + metadataDestinationRepository.getLocation()); //$NON-NLS-1$
-		return true;
-	}
-
-	private boolean validateArtifactRepositories() {
-		if (artifactSourceRepository == null)
-			throw new IllegalStateException("Source artifact repository is null."); //$NON-NLS-1$
-		if (artifactDestinationRepository == null)
-			throw new IllegalStateException("Destination artifact repository is null."); //$NON-NLS-1$
-		if (!artifactDestinationRepository.isModifiable())
-			throw new IllegalStateException("Destination artifact repository must be modifiable: " + artifactDestinationRepository.getLocation()); //$NON-NLS-1$
-		return true;
-	}
-
-	private IMetadataRepository initializeMetadataDestination(MetadataRepositoryManager manager, URI destinationLocation) throws ProvisionException {
-		IMetadataRepository repository;
-		try {
-			String repositoryName = destinationLocation + " - metadata"; //$NON-NLS-1$
-			Map properties = null;
-			if (compressed) {
-				properties = new HashMap(1);
-				properties.put(IRepository.PROP_COMPRESSED, String.valueOf(compressed));
-			}
-			repository = manager.createRepository(destinationLocation, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
-			manager.removeRepository(destinationLocation);
-			if (!repository.isModifiable())
-				throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
-			return repository;
-		} catch (ProvisionException e) {
-			//fall through and create repo
-		}
-		repository = manager.loadRepository(destinationLocation, null);
-		if (repository != null)
-			manager.removeRepository(destinationLocation);
-		if (!repository.isModifiable())
-			throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
-		return repository;
-	}
-
-	private IArtifactRepository initializeArtifactDestination(ArtifactRepositoryManager repoManager, URI destinationLocation) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
-		IArtifactRepository repository;
-		try {
-			String repositoryName = destinationLocation + " - artifacts"; //$NON-NLS-1$
-			Map properties = null;
-			if (compressed) {
-				properties = new HashMap(1);
-				properties.put(IRepository.PROP_COMPRESSED, String.valueOf(compressed));
-			}
-			repository = manager.createRepository(destinationLocation, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
-			if (repository != null)
-				manager.removeRepository(destinationLocation);
-
-			if (!repository.isModifiable())
-				throw new IllegalArgumentException("Artifact repository not modifiable: " + destinationLocation); //$NON-NLS-1$
-			if (overwrite)
-				repository.removeAll();
-			return repository;
-		} catch (ProvisionException e) {
-			//fall through and create a new repository below
-		}
-		// 	the given repo location is not an existing repo so we have to create something
-		repository = manager.loadRepository(destinationLocation, null);
-		manager.removeRepository(destinationLocation);
-		return repository;
-	}
-
-	public void setVerbose(boolean value) {
-		verbose = value;
-	}
-
-	public void setReferencedIUs(boolean value) {
-		referencedIUs = value;
-	}
-
-	public void setRaw(boolean value) {
-		raw = value;
-	}
-
-	public void setCompressed(boolean value) {
-		compressed = value;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java b/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java
deleted file mode 100644
index c1c7951..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/src/org/eclipse/equinox/internal/p2/tools/mirror/VersionRangedName.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Code 9 - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tools.mirror;
-
-import org.eclipse.equinox.internal.provisional.p2.core.VersionRange;
-
-public class VersionRangedName {
-	private String id;
-	private VersionRange range;
-
-	/**
-	 * Creates and returns a new version ranged id from the given spec.  The spec should be
-	 * id/version range.
-	 * @param spec the spec for the version ranged id to create
-	 * @return the parsed versioned id
-	 */
-	public static VersionRangedName parse(String spec) {
-		String[] segments = MirrorApplication.getArrayArgsFromString(spec, "/"); //$NON-NLS-1$
-		return new VersionRangedName(segments[0], segments.length == 1 ? null : segments[1]);
-	}
-
-	public VersionRangedName(String id, String rangeSpec) {
-		this.id = id;
-		this.range = new VersionRange(rangeSpec);
-	}
-
-	public VersionRangedName(String id, VersionRange range) {
-		this.id = id;
-		this.range = range;
-	}
-
-	public String getId() {
-		return id;
-	}
-
-	public VersionRange getVersionRange() {
-		return range;
-	}
-
-	public String toString() {
-		return id + "/" + (range == null ? "0.0.0" : range.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/updatechecker app.launch b/eclipse/plugins/org.eclipse.equinox.p2.tools/updatechecker app.launch
deleted file mode 100644
index 5058fea..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.tools/updatechecker app.launch	
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/updatechecker app"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.updatechecker.app.application
-metadataRepository file:c:/prov/p2/servers/metadataRepository/ 
-artifactRepository file:c:/prov/p2/servers/artifactRepository/ 
-profile Test
-delay 5000
-poll 10000
-trace"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.p2.data.area=c:/prov/p2/agentData"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.contenttype at default:default,org.eclipse.core.jobs at default:default,org.eclipse.core.runtime at default:default,org.eclipse.core.runtime.compatibility.registry at default:default,org.eclipse.equinox.app at default:true,org.eclipse.equinox.common at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.osgi@:,org.eclipse.osgi.services at default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="vminstall" value="jre1.5.0_11"/>
-<stringAttribute key="workspace_bundles" value="com.thoughtworks.xstream at default:default,org.eclipse.ecf at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.frameworkadmin at default:default,org.eclipse.equinox.frameworkadmin.equinox at default:true,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.console at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.equinox.p2.director.app at default:default,org.eclipse.equinox.p2.download at default:default,org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.exemplarysetup at default:true,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.p2.updatechecker at 5:true,org.eclipse.equinox.p2.updatechecker.app at default:default,org.eclipse.equinox.simpleconfigurator at default:default,org.eclipse.equinox.simpleconfigurator.manipulator at default:true"/>
-</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
index 2daa5df..1c4f100 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Feb 22 11:24:21 EST 2008
+#Tue Dec 22 18:23:28 CET 2009
 eclipse.preferences.version=1
 instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
@@ -8,24 +8,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -72,7 +72,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
index 7859cc4..62fcbed 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
@@ -1,45 +1,50 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
+Bundle-Version: 2.0.3.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
+Export-Package: org.eclipse.equinox.internal.p2.touchpoint.eclipse;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation",
+ org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;version="2.0.0";x-internal:=true,
+ org.eclipse.equinox.internal.p2.update;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher",
+ org.eclipse.equinox.p2.touchpoint.eclipse.query;version="2.0.0"
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
 Import-Package: javax.xml.parsers,
- org.eclipse.core.runtime.preferences;version="3.2.0",
+ org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.engine,
  org.eclipse.equinox.internal.p2.garbagecollector,
+ org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.core.location,
  org.eclipse.equinox.internal.provisional.p2.director;resolution:=optional,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
  org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
  org.eclipse.equinox.internal.simpleconfigurator.manipulator,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.publisher;resolution:=optional,
  org.eclipse.equinox.p2.publisher.eclipse;resolution:=optional,
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.datalocation;version="1.0.0",
  org.eclipse.osgi.service.environment;version="1.0.0",
  org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.prefs;version="1.1.1",
- org.osgi.util.tracker;version="1.3.2",
+ org.osgi.util.tracker;version="1.3.0",
  org.w3c.dom,
  org.xml.sax
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.eclipse;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;x-internal:=true,
- org.eclipse.equinox.internal.p2.update;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
index 4bbd9bd..0328daa 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
@@ -16,3 +16,5 @@ bin.includes = META-INF/,\
                about.html,\
                plugin.properties
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
index 0194025..ab256c1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.5"?>
 <plugin>
 	<extension point="org.eclipse.equinox.p2.engine.touchpoints" id="eclipse" name="Eclipse Touchpoint">
 		<touchpoint 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
new file mode 100644
index 0000000..7c7fef2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
+  <version>2.0.2.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
index bdcd73e..b268d65 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
@@ -15,23 +15,24 @@ import java.io.OutputStream;
 import java.util.*;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.AbstractArtifactRepository;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
 
 public class AggregatedBundleRepository extends AbstractArtifactRepository implements IFileArtifactRepository {
 
 	private static final String REPOSITORY_TYPE = AggregatedBundleRepository.class.getName();
-	private final Collection bundleRepositories;
+	private final Collection<IFileArtifactRepository> bundleRepositories;
 
-	public AggregatedBundleRepository(Collection bundleRepositories) {
-		super(REPOSITORY_TYPE, REPOSITORY_TYPE, "1.0", null, null, null, null); //$NON-NLS-1$
+	public AggregatedBundleRepository(IProvisioningAgent agent, Collection<IFileArtifactRepository> bundleRepositories) {
+		super(agent, REPOSITORY_TYPE, REPOSITORY_TYPE, "1.0", null, null, null, null); //$NON-NLS-1$
 		this.bundleRepositories = bundleRepositories;
 	}
 
 	public File getArtifactFile(IArtifactKey key) {
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
+		for (IFileArtifactRepository repository : bundleRepositories) {
 			File artifactFile = repository.getArtifactFile(key);
 			if (artifactFile != null)
 				return artifactFile;
@@ -40,8 +41,7 @@ public class AggregatedBundleRepository extends AbstractArtifactRepository imple
 	}
 
 	public File getArtifactFile(IArtifactDescriptor descriptor) {
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
+		for (IFileArtifactRepository repository : bundleRepositories) {
 			File artifactFile = repository.getArtifactFile(descriptor);
 			if (artifactFile != null)
 				return artifactFile;
@@ -50,8 +50,7 @@ public class AggregatedBundleRepository extends AbstractArtifactRepository imple
 	}
 
 	public boolean contains(IArtifactDescriptor descriptor) {
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
+		for (IFileArtifactRepository repository : bundleRepositories) {
 			if (repository.contains(descriptor))
 				return true;
 		}
@@ -59,8 +58,7 @@ public class AggregatedBundleRepository extends AbstractArtifactRepository imple
 	}
 
 	public boolean contains(IArtifactKey key) {
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
+		for (IFileArtifactRepository repository : bundleRepositories) {
 			if (repository.contains(key))
 				return true;
 		}
@@ -68,25 +66,13 @@ public class AggregatedBundleRepository extends AbstractArtifactRepository imple
 	}
 
 	public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
-		Set artifactDescriptors = new HashSet();
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
+		Set<IArtifactDescriptor> artifactDescriptors = new HashSet<IArtifactDescriptor>();
+		for (IFileArtifactRepository repository : bundleRepositories) {
 			IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
 			if (descriptors != null)
 				artifactDescriptors.addAll(Arrays.asList(descriptors));
 		}
-		return (IArtifactDescriptor[]) artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
-	}
-
-	public IArtifactKey[] getArtifactKeys() {
-		Set artifactKeys = new HashSet();
-		for (Iterator it = bundleRepositories.iterator(); it.hasNext();) {
-			IFileArtifactRepository repository = (IFileArtifactRepository) it.next();
-			IArtifactKey[] keys = repository.getArtifactKeys();
-			if (keys != null)
-				artifactKeys.addAll(Arrays.asList(keys));
-		}
-		return (IArtifactKey[]) artifactKeys.toArray(new IArtifactKey[artifactKeys.size()]);
+		return artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
 	}
 
 	public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
@@ -109,7 +95,21 @@ public class AggregatedBundleRepository extends AbstractArtifactRepository imple
 	 * Exposed for testing and debugging purposes.
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
-	public Collection testGetBundleRepositories() {
+	public Collection<IFileArtifactRepository> testGetBundleRepositories() {
 		return bundleRepositories;
 	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		// Query all the all the repositories
+		IQueryable<IArtifactKey> queryable = QueryUtil.compoundQueryable(bundleRepositories);
+		return queryable.query(query, monitor);
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		List<IQueryable<IArtifactDescriptor>> descQueryables = new ArrayList<IQueryable<IArtifactDescriptor>>(bundleRepositories.size());
+		for (IFileArtifactRepository repository : bundleRepositories)
+			descQueryables.add(repository.descriptorQueryable());
+
+		return QueryUtil.compoundQueryable(descQueryables);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
index 1f280e5..42c022e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2009 IBM Corporation and others.
+ *  Copyright (c) 2009-2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,23 +7,24 @@
  * 
  *  Contributors:
  *      IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
 import java.net.URI;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.planner.IPlanner;
 
 public class DirectorUtil {
 
 	public static IStatus validateProfile(IProfile profile) {
 		ProfileChangeRequest pcr = new ProfileChangeRequest(profile);
-		ProvisioningContext ctx = new ProvisioningContext(new URI[0]);
-		IPlanner planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
+		ProvisioningContext ctx = new ProvisioningContext(profile.getProvisioningAgent());
+		ctx.setMetadataRepositories(new URI[0]);
+		IPlanner planner = (IPlanner) profile.getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
 		return planner.getProvisioningPlan(pcr, ctx, null).getStatus();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
index f30126e..faf6c66 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,20 +12,20 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
 import java.io.File;
 import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.garbagecollector.MarkSet;
 import org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider;
 import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.osgi.framework.ServiceReference;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 
 /**
  * MarkSetProvider implementation for the Eclipse touchpoint.
@@ -34,28 +34,27 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
 	private static final String ARTIFACT_CLASSIFIER_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
 	private static final String ARTIFACT_CLASSIFIER_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
 
-	private Collection artifactKeyList = null;
+	private Collection<IArtifactKey> artifactKeyList = null;
 
-	public MarkSet[] getMarkSets(IProfile inProfile) {
-		artifactKeyList = new HashSet();
-		IArtifactRepository repositoryToGC = Util.getBundlePoolRepository(inProfile);
+	public MarkSet[] getMarkSets(IProvisioningAgent agent, IProfile inProfile) {
+		artifactKeyList = new HashSet<IArtifactKey>();
+		IArtifactRepository repositoryToGC = Util.getBundlePoolRepository(agent, inProfile);
 		if (repositoryToGC == null)
 			return new MarkSet[0];
 		addArtifactKeys(inProfile);
-		IProfile currentProfile = getCurrentProfile();
+		IProfile currentProfile = getCurrentProfile(agent);
 		if (currentProfile != null && inProfile.getProfileId().equals(currentProfile.getProfileId())) {
 			addRunningBundles(repositoryToGC);
 			addRunningFeatures(inProfile, repositoryToGC);
 		}
-		return new MarkSet[] {new MarkSet((IArtifactKey[]) artifactKeyList.toArray(new IArtifactKey[0]), repositoryToGC)};
+		return new MarkSet[] {new MarkSet(artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]), repositoryToGC)};
 	}
 
 	private void addRunningFeatures(IProfile profile, IArtifactRepository repositoryToGC) {
 		try {
-			List allFeatures = getAllFeatures(Configuration.load(new File(Util.getConfigurationFolder(profile), "org.eclipse.update/platform.xml"), null)); //$NON-NLS-1$
-			for (Iterator iterator = allFeatures.iterator(); iterator.hasNext();) {
-				Feature f = (Feature) iterator.next();
-				IArtifactKey match = searchArtifact(f.getId(), new Version(f.getVersion()), ARTIFACT_CLASSIFIER_FEATURE, repositoryToGC);
+			List<Feature> allFeatures = getAllFeatures(Configuration.load(new File(Util.getConfigurationFolder(profile), "org.eclipse.update/platform.xml"), null)); //$NON-NLS-1$
+			for (Feature f : allFeatures) {
+				IArtifactKey match = searchArtifact(f.getId(), Version.create(f.getVersion()), ARTIFACT_CLASSIFIER_FEATURE, repositoryToGC);
 				if (match != null)
 					artifactKeyList.add(match);
 			}
@@ -64,13 +63,12 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
 		}
 	}
 
-	private List getAllFeatures(Configuration cfg) {
+	private List<Feature> getAllFeatures(Configuration cfg) {
 		if (cfg == null)
-			return Collections.EMPTY_LIST;
-		List sites = cfg.getSites();
-		ArrayList result = new ArrayList();
-		for (Iterator iterator = sites.iterator(); iterator.hasNext();) {
-			Site object = (Site) iterator.next();
+			return CollectionUtils.emptyList();
+		List<Site> sites = cfg.getSites();
+		ArrayList<Feature> result = new ArrayList<Feature>();
+		for (Site object : sites) {
 			Feature[] features = object.getFeatures();
 			for (int i = 0; i < features.length; i++) {
 				result.add(features[i]);
@@ -79,31 +77,25 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
 		return result;
 	}
 
-	private IProfile getCurrentProfile() {
-		ServiceReference sr = Activator.getContext().getServiceReference(IProfileRegistry.class.getName());
-		if (sr == null)
-			return null;
-		IProfileRegistry pr = (IProfileRegistry) Activator.getContext().getService(sr);
+	private IProfile getCurrentProfile(IProvisioningAgent agent) {
+		IProfileRegistry pr = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 		if (pr == null)
 			return null;
-		Activator.getContext().ungetService(sr);
 		return pr.getProfile(IProfileRegistry.SELF);
 	}
 
 	private void addArtifactKeys(IProfile aProfile) {
-		Iterator installableUnits = aProfile.query(InstallableUnitQuery.ANY, new Collector(), null).iterator();
+		Iterator<IInstallableUnit> installableUnits = aProfile.query(QueryUtil.createIUAnyQuery(), null).iterator();
 		while (installableUnits.hasNext()) {
-			IArtifactKey[] keys = ((IInstallableUnit) installableUnits.next()).getArtifacts();
+			Collection<IArtifactKey> keys = installableUnits.next().getArtifacts();
 			if (keys == null)
 				continue;
-			for (int i = 0; i < keys.length; i++) {
-				artifactKeyList.add(keys[i]);
-			}
+			artifactKeyList.addAll(keys);
 		}
 	}
 
-	public IArtifactRepository getRepository(IProfile aProfile) {
-		return Util.getBundlePoolRepository(aProfile);
+	public IArtifactRepository getRepository(IProvisioningAgent agent, IProfile aProfile) {
+		return Util.getBundlePoolRepository(agent, aProfile);
 	}
 
 	private void addRunningBundles(IArtifactRepository repo) {
@@ -112,23 +104,22 @@ public class EclipseMarkSetProvider extends MarkSetProvider {
 
 	private IArtifactKey searchArtifact(String searchedId, Version searchedVersion, String classifier, IArtifactRepository repo) {
 		//This is somewhat cheating since normally we should get the artifact key from the IUs that were representing the running system (e.g. we could get that info from the rollback repo)
-		IArtifactKey[] keys = repo.getArtifactKeys();
-		for (int i = 0; i < keys.length; i++) {
-			if (keys[i].getClassifier().equals(classifier)) {
-				String id = keys[i].getId();
-				Version v = keys[i].getVersion();
-				if (id != null && id.equals(searchedId) && v != null && v.equals(searchedVersion))
-					return keys[i];
-			}
-		}
+		VersionRange range = searchedVersion != null ? new VersionRange(searchedVersion, true, searchedVersion, true) : null;
+		ArtifactKeyQuery query = new ArtifactKeyQuery(classifier, searchedId, range);
+		//TODO short-circuit the query when we find one?
+		IQueryResult<IArtifactKey> keys = repo.query(query, null);
+		if (!keys.isEmpty())
+			return keys.iterator().next();
 		return null;
 	}
 
 	//Find for each bundle info a corresponding artifact in repo 
-	private ArrayList findCorrespondinArtifacts(BundleInfo[] bis, IArtifactRepository repo) {
-		ArrayList toRetain = new ArrayList();
+	private List<IArtifactKey> findCorrespondinArtifacts(BundleInfo[] bis, IArtifactRepository repo) {
+		ArrayList<IArtifactKey> toRetain = new ArrayList<IArtifactKey>();
 		for (int i = 0; i < bis.length; i++) {
-			IArtifactKey match = searchArtifact(bis[i].getSymbolicName(), new Version(bis[i].getVersion()), ARTIFACT_CLASSIFIER_OSGI_BUNDLE, repo);
+			// if version is "0.0.0", we will use null to find all versions, see bug 305710
+			Version version = BundleInfo.EMPTY_VERSION.equals(bis[i].getVersion()) ? null : Version.create(bis[i].getVersion());
+			IArtifactKey match = searchArtifact(bis[i].getSymbolicName(), version, ARTIFACT_CLASSIFIER_OSGI_BUNDLE, repo);
 			if (match != null)
 				toRetain.add(match);
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
index d4ffb8f..cfa60c0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
@@ -19,10 +19,12 @@ import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class EclipseTouchpoint extends Touchpoint {
@@ -31,36 +33,39 @@ public class EclipseTouchpoint extends Touchpoint {
 	public static final String PARM_PLATFORM_CONFIGURATION = "platformConfiguration"; //$NON-NLS-1$
 	public static final String PARM_SOURCE_BUNDLES = "sourceBundles"; //$NON-NLS-1$
 	public static final String PARM_IU = "iu"; //$NON-NLS-1$
+	public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
+	public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
+	private static final Object PARM_AGENT = "agent"; //$NON-NLS-1$
 
 	private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
-	private static List NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+	private static List<String> NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$
 	private static final String VALIDATE_PROFILE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.validateProfile"; //$NON-NLS-1$
 
-	private static Map manipulators = new WeakHashMap();
-	private static Map wrappers = new WeakHashMap();
-	private static Map sourceManipulators = new WeakHashMap();
-	private static Map preparedIUs = new WeakHashMap();
+	private static Map<IProfile, LazyManipulator> manipulators = new WeakHashMap<IProfile, LazyManipulator>();
+	private static Map<IProfile, PlatformConfigurationWrapper> wrappers = new WeakHashMap<IProfile, PlatformConfigurationWrapper>();
+	private static Map<IProfile, SourceManipulator> sourceManipulators = new WeakHashMap<IProfile, SourceManipulator>();
+	private static Map<IProfile, Map<IInstallableUnit, IInstallableUnit>> preparedIUs = new WeakHashMap<IProfile, Map<IInstallableUnit, IInstallableUnit>>();
 
-	private static synchronized LazyManipulator getManipulator(IProfile profile) {
-		LazyManipulator manipulator = (LazyManipulator) manipulators.get(profile);
+	private static synchronized LazyManipulator getManipulator(IProvisioningAgent agent, IProfile profile) {
+		LazyManipulator manipulator = manipulators.get(profile);
 		if (manipulator == null) {
-			manipulator = new LazyManipulator(profile);
+			manipulator = new LazyManipulator(agent, profile);
 			manipulators.put(profile, manipulator);
 		}
 		return manipulator;
 	}
 
 	private static synchronized void saveManipulator(IProfile profile) throws FrameworkAdminRuntimeException, IOException {
-		LazyManipulator manipulator = (LazyManipulator) manipulators.remove(profile);
+		LazyManipulator manipulator = manipulators.remove(profile);
 		if (manipulator != null)
 			manipulator.save(false);
 	}
 
-	private static synchronized PlatformConfigurationWrapper getPlatformConfigurationWrapper(IProfile profile, LazyManipulator manipulator) {
-		PlatformConfigurationWrapper wrapper = (PlatformConfigurationWrapper) wrappers.get(profile);
+	private static synchronized PlatformConfigurationWrapper getPlatformConfigurationWrapper(IProvisioningAgent agent, IProfile profile, LazyManipulator manipulator) {
+		PlatformConfigurationWrapper wrapper = wrappers.get(profile);
 		if (wrapper == null) {
 			File configLocation = Util.getConfigurationFolder(profile);
-			URI poolURI = Util.getBundlePoolLocation(profile);
+			URI poolURI = Util.getBundlePoolLocation(agent, profile);
 			wrapper = new PlatformConfigurationWrapper(configLocation, poolURI, manipulator);
 			wrappers.put(profile, wrapper);
 		}
@@ -68,13 +73,13 @@ public class EclipseTouchpoint extends Touchpoint {
 	}
 
 	private static synchronized void savePlatformConfigurationWrapper(IProfile profile) throws ProvisionException {
-		PlatformConfigurationWrapper wrapper = (PlatformConfigurationWrapper) wrappers.remove(profile);
+		PlatformConfigurationWrapper wrapper = wrappers.remove(profile);
 		if (wrapper != null)
 			wrapper.save();
 	}
 
 	private static synchronized SourceManipulator getSourceManipulator(IProfile profile) {
-		SourceManipulator sourceManipulator = (SourceManipulator) sourceManipulators.get(profile);
+		SourceManipulator sourceManipulator = sourceManipulators.get(profile);
 		if (sourceManipulator == null) {
 			sourceManipulator = new SourceManipulator(profile);
 			sourceManipulators.put(profile, sourceManipulator);
@@ -83,23 +88,23 @@ public class EclipseTouchpoint extends Touchpoint {
 	}
 
 	private static synchronized void saveSourceManipulator(IProfile profile) throws IOException {
-		SourceManipulator sourceManipulator = (SourceManipulator) sourceManipulators.remove(profile);
+		SourceManipulator sourceManipulator = sourceManipulators.remove(profile);
 		if (sourceManipulator != null)
 			sourceManipulator.save();
 	}
 
 	private static synchronized IInstallableUnit getPreparedIU(IProfile profile, IInstallableUnit iu) {
-		Map preparedProfileIUs = (Map) preparedIUs.get(profile);
+		Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
 		if (preparedProfileIUs == null)
 			return null;
 
-		return (IInstallableUnit) preparedProfileIUs.get(iu);
+		return preparedProfileIUs.get(iu);
 	}
 
 	private static synchronized void savePreparedIU(IProfile profile, IInstallableUnit iu) {
-		Map preparedProfileIUs = (Map) preparedIUs.get(profile);
+		Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
 		if (preparedProfileIUs == null) {
-			preparedProfileIUs = new HashMap();
+			preparedProfileIUs = new HashMap<IInstallableUnit, IInstallableUnit>();
 			preparedIUs.put(profile, preparedProfileIUs);
 		}
 		preparedProfileIUs.put(iu, iu);
@@ -163,32 +168,41 @@ public class EclipseTouchpoint extends Touchpoint {
 		return touchpointQualifier + "." + actionId; //$NON-NLS-1$
 	}
 
-	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
-		LazyManipulator manipulator = getManipulator(profile);
+	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) touchpointParameters.get(PARM_AGENT);
+		LazyManipulator manipulator = getManipulator(agent, profile);
 		touchpointParameters.put(PARM_MANIPULATOR, manipulator);
 		touchpointParameters.put(PARM_SOURCE_BUNDLES, getSourceManipulator(profile));
-		touchpointParameters.put(PARM_PLATFORM_CONFIGURATION, getPlatformConfigurationWrapper(profile, manipulator));
+		touchpointParameters.put(PARM_PLATFORM_CONFIGURATION, getPlatformConfigurationWrapper(agent, profile, manipulator));
 		return null;
 	}
 
-	public IStatus initializeOperand(IProfile profile, Operand operand, Map parameters) {
+	public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
+		IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
 		if (iu != null && Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue()) {
-			IInstallableUnit preparedIU = prepareIU(iu, profile);
+			IInstallableUnit preparedIU = prepareIU(agent, profile, iu, artifactKey);
 			if (preparedIU == null)
 				return Util.createError(NLS.bind(Messages.failed_prepareIU, iu));
 
 			parameters.put(PARM_IU, preparedIU);
 		}
+
+		if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
+			File fileLocation = Util.getArtifactFile(agent, artifactKey, profile);
+			if (fileLocation != null && fileLocation.exists())
+				parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
+		}
 		return Status.OK_STATUS;
 	}
 
-	public IInstallableUnit prepareIU(IInstallableUnit iu, IProfile profile) {
+	public IInstallableUnit prepareIU(IProvisioningAgent agent, IProfile profile, IInstallableUnit iu, IArtifactKey artifactKey) {
 		IInstallableUnit preparedIU = getPreparedIU(profile, iu);
 		if (preparedIU != null)
 			return preparedIU;
 
-		Class c = null;
+		Class<?> c = null;
 		try {
 			c = Class.forName("org.eclipse.equinox.p2.publisher.eclipse.BundlesAction"); //$NON-NLS-1$
 			if (c != null)
@@ -199,15 +213,10 @@ public class EclipseTouchpoint extends Touchpoint {
 		}
 
 		if (c != null) {
-			IArtifactKey[] artifacts = iu.getArtifacts();
-			if (artifacts == null || artifacts.length == 0)
-				return iu;
-
-			IArtifactKey artifactKey = artifacts[0];
 			if (artifactKey == null)
 				return iu;
 
-			File bundleFile = Util.getArtifactFile(artifactKey, profile);
+			File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 			if (bundleFile == null) {
 				LogHelper.log(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey.toString())));
 				return null;
@@ -230,9 +239,9 @@ public class EclipseTouchpoint extends Touchpoint {
 		if (Boolean.FALSE.toString().equals(profile.getProperty(VALIDATE_PROFILE)))
 			return Status.OK_STATUS;
 
-		Class c = null;
+		Class<?> c = null;
 		try {
-			c = Class.forName("org.eclipse.equinox.internal.provisional.p2.director.IPlanner"); //$NON-NLS-1$
+			c = Class.forName("org.eclipse.equinox.p2.planner.IPlanner"); //$NON-NLS-1$
 		} catch (ClassNotFoundException e) {
 			//ignore and proceed without validation
 			return null;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
index 0ea73c2..4303c60 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
@@ -11,11 +11,11 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
 import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
 import org.osgi.framework.*;
 import org.osgi.util.tracker.ServiceTracker;
 
@@ -28,9 +28,11 @@ public class LazyManipulator implements Manipulator {
 
 	private Manipulator manipulator;
 	private final IProfile profile;
+	private final IProvisioningAgent agent;
 
-	public LazyManipulator(IProfile profile) {
+	public LazyManipulator(IProvisioningAgent agent, IProfile profile) {
 		this.profile = profile;
+		this.agent = agent;
 	}
 
 	private void loadDelegate() {
@@ -45,6 +47,8 @@ public class LazyManipulator implements Manipulator {
 		launcherData.setFwConfigLocation(Util.getConfigurationFolder(profile));
 		launcherData.setLauncher(Util.getLauncherPath(profile));
 		launcherData.setLauncherConfigLocation(Util.getLauncherConfigLocation(profile));
+		launcherData.setOS(Util.getOSFromProfile(profile));
+		launcherData.setHome(Util.getInstallFolder(profile));
 
 		try {
 			manipulator.load();
@@ -60,12 +64,7 @@ public class LazyManipulator implements Manipulator {
 		}
 		//TODO These values should be inserted by a configuration unit (bug 204124)
 		manipulator.getConfigData().setProperty("eclipse.p2.profile", profile.getProfileId()); //$NON-NLS-1$
-		try {
-			manipulator.getConfigData().setProperty("eclipse.p2.data.area", URIUtil.toURI(Util.getAgentLocation().getURL()).toString()); //$NON-NLS-1$
-		} catch (URISyntaxException e) {
-			LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
-			throw new IllegalStateException(Messages.error_loading_manipulator);
-		}
+		manipulator.getConfigData().setProperty("eclipse.p2.data.area", Util.getAgentLocation(agent).getRootLocation().toString()); //$NON-NLS-1$
 	}
 
 	public static FrameworkAdmin getFrameworkAdmin() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
index 686719b..22f91b5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
@@ -24,6 +24,7 @@ public class Messages extends NLS {
 	public static String error_parsing_configuration;
 	public static String publisher_not_available;
 	public static String artifact_write_unsupported;
+	public static String iu_contains_no_arifacts;
 	public static String artifact_file_not_found;
 	public static String artifact_retrieval_unsupported;
 	public static String bundle_pool_not_writeable;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
index 4078816..bb0a87c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,12 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
 import java.io.File;
 import java.net.*;
-import java.util.Iterator;
 import java.util.List;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 
 /**	
@@ -104,8 +102,7 @@ public class PlatformConfigurationWrapper {
 	 * Otherwise the default is USER-EXCLUDE.
 	 */
 	private String getDefaultPolicy() {
-		for (Iterator iter = configuration.getSites().iterator(); iter.hasNext();) {
-			Site site = (Site) iter.next();
+		for (Site site : configuration.getSites()) {
 			if (Site.POLICY_MANAGED_ONLY.equals(site.getPolicy()))
 				return Site.POLICY_MANAGED_ONLY;
 		}
@@ -117,12 +114,7 @@ public class PlatformConfigurationWrapper {
 	 */
 	private Site createSite(URI location, String policy) {
 		Site result = new Site();
-		try {
-			result.setUrl(URIUtil.toURL(location).toExternalForm());
-		} catch (MalformedURLException e) {
-			// TODO
-			result.setUrl(location.toString());
-		}
+		result.setUrl(location.toString());
 		result.setPolicy(policy);
 		result.setEnabled(true);
 		return result;
@@ -133,17 +125,16 @@ public class PlatformConfigurationWrapper {
 	 * the given URL. Return null if there is no match.
 	 */
 	private Site getSite(URI url) {
-		List sites = configuration.getSites();
+		List<Site> sites = configuration.getSites();
 		File file = URIUtil.toFile(url);
-		for (Iterator iter = sites.iterator(); iter.hasNext();) {
-			Site nextSite = (Site) iter.next();
+		for (Site nextSite : sites) {
 			try {
-				File nextFile = URLUtil.toFile(new URL(nextSite.getUrl()));
+				File nextFile = URIUtil.toFile(new URI(nextSite.getUrl()));
 				if (nextFile == null)
 					continue;
 				if (nextFile.equals(file))
 					return nextSite;
-			} catch (MalformedURLException e) {
+			} catch (URISyntaxException e) {
 				//ignore incorrectly formed site
 			}
 		}
@@ -155,9 +146,8 @@ public class PlatformConfigurationWrapper {
 	 * with the given identifier and version. Return null if there is none.
 	 */
 	private Site getSite(String id, String version) {
-		List sites = configuration.getSites();
-		for (Iterator iter = sites.iterator(); iter.hasNext();) {
-			Site site = (Site) iter.next();
+		List<Site> sites = configuration.getSites();
+		for (Site site : sites) {
 			Feature[] features = site.getFeatures();
 			for (int i = 0; i < features.length; i++) {
 				if (id.equals(features[i].getId()) && version.equals(features[i].getVersion()))
@@ -234,7 +224,7 @@ public class PlatformConfigurationWrapper {
 		if (site == null)
 			return false;
 
-		return (site.getFeature(featureId, featureVersion) != null);
+		return site.getFeature(featureId, featureVersion) != null;
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
index 9211095..1f6151b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
@@ -13,9 +13,7 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
 import java.io.File;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.PublisherInfo;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
@@ -31,7 +29,7 @@ public class PublisherUtil {
 		if (bundleDescription == null)
 			return null;
 		PublisherInfo info = new PublisherInfo();
-		Version version = new Version(bundleDescription.getVersion().toString());
+		Version version = Version.create(bundleDescription.getVersion().toString());
 		AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), version, new Path(bundleFile.getAbsolutePath()), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
 		if (advice.containsAdvice())
 			info.addAdvice(advice);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
index ec86ad2..54fe1fc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -8,18 +8,18 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.net.MalformedURLException;
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 
 //This class deals with source bundles and how their addition to the source.info
 public class SourceManipulator {
-	private List sourceBundles;
+	private List<BundleInfo> sourceBundles;
 	private IProfile profile;
 	boolean changed = false;
 	private SimpleConfiguratorManipulatorImpl manipulator;
@@ -32,7 +32,7 @@ public class SourceManipulator {
 	public BundleInfo[] getBundles() throws IOException {
 		if (sourceBundles == null)
 			load();
-		return (BundleInfo[]) sourceBundles.toArray(new BundleInfo[sourceBundles.size()]);
+		return sourceBundles.toArray(new BundleInfo[sourceBundles.size()]);
 	}
 
 	public void addBundle(File bundleFile, String bundleId, Version bundleVersion) throws IOException {
@@ -58,18 +58,19 @@ public class SourceManipulator {
 
 	public void save() throws IOException {
 		if (sourceBundles != null)
-			manipulator.saveConfiguration((BundleInfo[]) sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation());
+			manipulator.saveConfiguration(sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation().toURI());
 	}
 
 	private void load() throws MalformedURLException, IOException {
 		if (getFileLocation().exists())
-			sourceBundles = new ArrayList(Arrays.asList(manipulator.loadConfiguration(getFileLocation().toURL(), getLauncherLocation())));
+			//input stream is bufferd and closed for us
+			sourceBundles = new ArrayList<BundleInfo>(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(getFileLocation()), getLauncherLocation().toURI())));
 		else
-			sourceBundles = new ArrayList();
+			sourceBundles = new ArrayList<BundleInfo>();
 	}
 
 	private File getFileLocation() {
-		return new File(Util.getConfigurationFolder(profile), "org.eclipse.equinox.source/source.info"); //$NON-NLS-1$
+		return new File(Util.getConfigurationFolder(profile), SimpleConfiguratorManipulator.SOURCE_INFO_PATH);
 	}
 
 	private File getLauncherLocation() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
index c1248c3..982e90f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,25 +12,22 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
-import java.io.*;
+import java.io.File;
+import java.io.IOException;
 import java.net.*;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
 
 public class Util {
 
@@ -54,35 +51,29 @@ public class Util {
 	 */
 	public static final int AGGREGATE_CACHE_EXTENSIONS = 0x04;
 
-	public static AgentLocation getAgentLocation() {
-		return (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
+	public static IAgentLocation getAgentLocation(IProvisioningAgent agent) {
+		return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 	}
 
-	public static IArtifactRepositoryManager getArtifactRepositoryManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
+		return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 	}
 
-	public static URI getBundlePoolLocation(IProfile profile) {
+	public static URI getBundlePoolLocation(IProvisioningAgent agent, IProfile profile) {
 		String path = profile.getProperty(IProfile.PROP_CACHE);
 		if (path != null)
 			return new File(path).toURI();
-		AgentLocation location = getAgentLocation();
+		IAgentLocation location = getAgentLocation(agent);
 		if (location == null)
 			return null;
-		try {
-			return URIUtil.toURI(location.getDataArea(Activator.ID));
-		} catch (URISyntaxException e) {
-			// unexpected, URLs should be pre-checked
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
-			throw new RuntimeException(e);
-		}
+		return location.getDataArea(Activator.ID);
 	}
 
-	public static synchronized IFileArtifactRepository getBundlePoolRepository(IProfile profile) {
-		URI location = getBundlePoolLocation(profile);
+	public static synchronized IFileArtifactRepository getBundlePoolRepository(IProvisioningAgent agent, IProfile profile) {
+		URI location = getBundlePoolLocation(agent, profile);
 		if (location == null)
 			return null;
-		IArtifactRepositoryManager manager = getArtifactRepositoryManager();
+		IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
 		try {
 			return (IFileArtifactRepository) manager.loadRepository(location, null);
 		} catch (ProvisionException e) {
@@ -90,7 +81,7 @@ public class Util {
 		}
 		try {
 			String repositoryName = Messages.BundlePool;
-			Map properties = new HashMap(1);
+			Map<String, String> properties = new HashMap<String, String>(1);
 			properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
 			return (IFileArtifactRepository) manager.createRepository(location, repositoryName, REPOSITORY_TYPE, properties);
 		} catch (ProvisionException e) {
@@ -99,15 +90,15 @@ public class Util {
 		}
 	}
 
-	public static IFileArtifactRepository getAggregatedBundleRepository(IProfile profile) {
-		return getAggregatedBundleRepository(profile, AGGREGATE_CACHE | AGGREGATE_SHARED_CACHE | AGGREGATE_CACHE_EXTENSIONS);
+	public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile) {
+		return getAggregatedBundleRepository(agent, profile, AGGREGATE_CACHE | AGGREGATE_SHARED_CACHE | AGGREGATE_CACHE_EXTENSIONS);
 	}
 
-	public static IFileArtifactRepository getAggregatedBundleRepository(IProfile profile, int repoFilter) {
-		List bundleRepositories = new ArrayList();
+	public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile, int repoFilter) {
+		List<IFileArtifactRepository> bundleRepositories = new ArrayList<IFileArtifactRepository>();
 
 		// we check for a shared bundle pool first as it should be preferred over the user bundle pool in a shared install
-		IArtifactRepositoryManager manager = getArtifactRepositoryManager();
+		IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
 		if ((repoFilter & AGGREGATE_SHARED_CACHE) != 0) {
 			String sharedCache = profile.getProperty(IProfile.PROP_SHARED_CACHE);
 			if (sharedCache != null) {
@@ -115,7 +106,7 @@ public class Util {
 					URI repoLocation = new File(sharedCache).toURI();
 					IArtifactRepository repository = manager.loadRepository(repoLocation, null);
 					if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
-						bundleRepositories.add(repository);
+						bundleRepositories.add((IFileArtifactRepository) repository);
 				} catch (ProvisionException e) {
 					//skip repository if it could not be read
 				}
@@ -123,16 +114,15 @@ public class Util {
 		}
 
 		if ((repoFilter & AGGREGATE_CACHE) != 0) {
-			IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(profile);
+			IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
 			if (bundlePool != null)
 				bundleRepositories.add(bundlePool);
 		}
 
 		if ((repoFilter & AGGREGATE_CACHE_EXTENSIONS) != 0) {
-			List repos = getListProfileProperty(profile, CACHE_EXTENSIONS);
-			for (Iterator iterator = repos.iterator(); iterator.hasNext();) {
+			List<String> repos = getListProfileProperty(profile, CACHE_EXTENSIONS);
+			for (String repo : repos) {
 				try {
-					String repo = (String) iterator.next();
 					URI repoLocation;
 					try {
 						repoLocation = new URI(repo);
@@ -142,7 +132,7 @@ public class Util {
 					}
 					IArtifactRepository repository = manager.loadRepository(repoLocation, null);
 					if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
-						bundleRepositories.add(repository);
+						bundleRepositories.add((IFileArtifactRepository) repository);
 				} catch (ProvisionException e) {
 					//skip repositories that could not be read
 				} catch (URISyntaxException e) {
@@ -151,11 +141,11 @@ public class Util {
 				}
 			}
 		}
-		return new AggregatedBundleRepository(bundleRepositories);
+		return new AggregatedBundleRepository(agent, bundleRepositories);
 	}
 
-	private static List getListProfileProperty(IProfile profile, String key) {
-		List listProperty = new ArrayList();
+	private static List<String> getListProfileProperty(IProfile profile, String key) {
+		List<String> listProperty = new ArrayList<String>();
 		String dropinRepositories = profile.getProperty(key);
 		if (dropinRepositories != null) {
 			StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
@@ -166,44 +156,50 @@ public class Util {
 		return listProperty;
 	}
 
-	public static BundleInfo createBundleInfo(File bundleFile, String manifest) {
+	public static BundleInfo createBundleInfo(File bundleFile, IInstallableUnit unit) {
 		BundleInfo bundleInfo = new BundleInfo();
 		if (bundleFile != null)
 			bundleInfo.setLocation(bundleFile.toURI());
 
-		bundleInfo.setManifest(manifest);
-		try {
-			Map headers = ManifestElement.parseBundleManifest(new ByteArrayInputStream(manifest.getBytes("UTF-8")), new HashMap()); //$NON-NLS-1$
-			ManifestElement[] element = ManifestElement.parseHeader("bsn", (String) headers.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
-			if (element == null || element.length == 0)
-				return null;
-			bundleInfo.setSymbolicName(element[0].getValue());
-
-			String version = (String) headers.get(Constants.BUNDLE_VERSION);
-			if (version == null)
-				return null;
-			// convert to a Version object first to ensure we are consistent with our version number w.r.t.
-			// padding zeros at the end
-			bundleInfo.setVersion(new Version(version).toString());
-
-			String fragmentHost = (String) headers.get(Constants.FRAGMENT_HOST);
-			if (fragmentHost != null)
-				bundleInfo.setFragmentHost(fragmentHost.trim());
-
-		} catch (BundleException e) {
-			// unexpected
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
-			return null;
-		} catch (IOException e) {
-			// unexpected
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
-			return null;
+		Collection<IProvidedCapability> capabilities = unit.getProvidedCapabilities();
+		for (IProvidedCapability capability : capabilities) {
+			String nameSpace = capability.getNamespace();
+			if (nameSpace.equals("osgi.bundle")) { //$NON-NLS-1$
+				bundleInfo.setSymbolicName(capability.getName());
+				bundleInfo.setVersion(capability.getVersion().toString());
+			} else if (nameSpace.equals("osgi.fragment")) { //$NON-NLS-1$
+				String fragmentName = capability.getName();
+				String fragmentHost = getFragmentHost(unit, fragmentName);
+				// shouldn't happen as long as the metadata is well-formed
+				if (fragmentHost == null)
+					LogHelper.log(createError("Unable to find fragment host for IU: " + unit)); //$NON-NLS-1$
+				else
+					bundleInfo.setFragmentHost(fragmentHost);
+				bundleInfo.setVersion(capability.getVersion().toString());
+			}
 		}
 		return bundleInfo;
 	}
 
-	public static File getArtifactFile(IArtifactKey artifactKey, IProfile profile) {
-		IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(profile);
+	private static String getFragmentHost(IInstallableUnit unit, String fragmentName) {
+		Collection<IRequirement> requires = unit.getRequirements();
+		for (IRequirement iRequirement : requires) {
+			if (iRequirement instanceof IRequiredCapability) {
+				IRequiredCapability requiredCapability = (IRequiredCapability) iRequirement;
+				if (fragmentName.equals(requiredCapability.getName())) {
+					String fragmentHost = requiredCapability.getName();
+					if (!requiredCapability.getRange().toString().equals("0.0.0")) { //$NON-NLS-1$
+						fragmentHost += ";bundle-version=\"" + requiredCapability.getRange() + '"'; //$NON-NLS-1$
+					}
+					return fragmentHost;
+				}
+			}
+		}
+		return null;
+	}
+
+	public static File getArtifactFile(IProvisioningAgent agent, IArtifactKey artifactKey, IProfile profile) {
+		IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(agent, profile);
 		File bundleJar = aggregatedView.getArtifactFile(artifactKey);
 		return bundleJar;
 	}
@@ -254,17 +250,19 @@ public class Util {
 		String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
 		if (name == null || name.length() == 0)
 			name = "eclipse"; //$NON-NLS-1$
-		return new File(getInstallFolder(profile), getLauncherName(name, getOSFromProfile(profile)));
+		String launcherName = getLauncherName(name, getOSFromProfile(profile), getInstallFolder(profile));
+		return launcherName == null ? null : new File(getInstallFolder(profile), launcherName);
 	}
 
 	/**
 	 * Returns the name of the Eclipse application launcher.
 	 */
-	private static String getLauncherName(String name, String os) {
+	private static String getLauncherName(String name, String os, File installFolder) {
 		if (os == null) {
 			EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
-			if (info != null)
-				os = info.getOS();
+			if (info == null)
+				return null;
+			os = info.getOS();
 		}
 
 		if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) {
@@ -275,19 +273,37 @@ public class Util {
 		}
 		if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_MACOSX)) {
 			IPath path = new Path(name);
-			if ("app".equals(path.getFileExtension())) //$NON-NLS-1$
+			if (path.segment(0).endsWith(".app")) //$NON-NLS-1$
 				return name;
+
+			String appName = null;
+			if (installFolder != null) {
+				File appFolder = new File(installFolder, name + ".app"); //$NON-NLS-1$
+				if (appFolder.exists()) {
+					try {
+						appName = appFolder.getCanonicalFile().getName();
+					} catch (IOException e) {
+						appName = appFolder.getName();
+					}
+				}
+			}
+
 			StringBuffer buffer = new StringBuffer();
-			buffer.append(name.substring(0, 1).toUpperCase());
-			buffer.append(name.substring(1));
-			buffer.append(".app/Contents/MacOS/"); //$NON-NLS-1$
-			buffer.append(name.toLowerCase());
+			if (appName != null) {
+				buffer.append(appName);
+			} else {
+				buffer.append(name.substring(0, 1).toUpperCase());
+				buffer.append(name.substring(1));
+				buffer.append(".app"); //$NON-NLS-1$
+			}
+			buffer.append("/Contents/MacOS/"); //$NON-NLS-1$
+			buffer.append(name);
 			return buffer.toString();
 		}
 		return name;
 	}
 
-	private static String getOSFromProfile(IProfile profile) {
+	public static String getOSFromProfile(IProfile profile) {
 		String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
 		if (environments == null)
 			return null;
@@ -302,18 +318,6 @@ public class Util {
 		return null;
 	}
 
-	public static String getManifest(ITouchpointData[] data) {
-		for (int i = 0; i < data.length; i++) {
-			ITouchpointInstruction manifestInstruction = data[i].getInstruction("manifest"); //$NON-NLS-1$
-			if (manifestInstruction == null)
-				return null;
-			String manifest = manifestInstruction.getBody();
-			if (manifest != null && manifest.length() > 0)
-				return manifest;
-		}
-		return null;
-	}
-
 	public static IStatus createError(String message) {
 		return createError(message, null);
 	}
@@ -326,4 +330,18 @@ public class Util {
 		String launcherConfig = profile.getProperty(IProfile.PROP_LAUNCHER_CONFIGURATION);
 		return launcherConfig == null ? null : new File(launcherConfig);
 	}
+
+	public static String resolveArtifactParam(Map<String, Object> parameters) throws CoreException {
+		String artifactLocation = (String) parameters.get(EclipseTouchpoint.PARM_ARTIFACT_LOCATION);
+		if (artifactLocation != null)
+			return artifactLocation;
+
+		IArtifactKey artifactKey = (IArtifactKey) parameters.get(EclipseTouchpoint.PARM_ARTIFACT);
+		if (artifactKey == null) {
+			IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
+			throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
+		}
+
+		throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
index 1b9aa8e..28ea863 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
@@ -8,7 +8,9 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
 
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
 
 public class WhatIsRunning {
 	public BundleInfo[] getBundlesBeingRun() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
index ab9e869..f0201a7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
@@ -10,7 +10,8 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 public class ActionConstants {
 
-	public static final String PARM_ARTIFACT = "@artifact"; //$NON-NLS-1$
+	public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
+	public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
 	public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
 	public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
 	public static final String PARM_BUNDLE = "bundle"; //$NON-NLS-1$
@@ -18,8 +19,8 @@ public class ActionConstants {
 	public static final String PARM_FEATURE_ID = "featureId"; //$NON-NLS-1$
 	public static final String PARM_FEATURE_VERSION = "featureVersion"; //$NON-NLS-1$
 	public static final String PARM_IGNORE = "@ignore"; //$NON-NLS-1$
+	public static final String PARM_IU = "iu"; //$NON-NLS-1$
 	public static final String PARM_JVM_ARG = "jvmArg"; //$NON-NLS-1$
-	public static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
 	public static final String PARM_PREVIOUS_START_LEVEL = "previousStartLevel"; //$NON-NLS-1$
 	public static final String PARM_PREVIOUS_STARTED = "previousStarted"; //$NON-NLS-1$
 	public static final String PARM_PREVIOUS_VALUE = "previousValue"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
index 1729291..9268549 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class AddJVMArgumentAction extends ProvisioningAction {
@@ -27,14 +27,14 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 	protected static final String XX_MAX_PERM_SIZE = "-XX:MaxPermSize="; //$NON-NLS-1$
 	protected static final String PREFIX_USER_VALUE = "eclipse.userDefined:"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
 		if (jvmArg == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
 		return addArg(jvmArg, parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
 		if (jvmArg == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
@@ -45,7 +45,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 		return storedValues.getProperty(PREFIX_USER_VALUE + flag);
 	}
 
-	protected static IStatus addArg(String arg, Map parameters) {
+	protected static IStatus addArg(String arg, Map<String, Object> parameters) {
 		LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
 		File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
 		try {
@@ -94,7 +94,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 		if (currentValue == null)
 			// User has removed value from file
 			setUserArg(storedValues, flag, null);
-		else if ((maxValue == null) || (!maxValue.equals(currentValue.substring(flag.length()))))
+		else if (maxValue == null || !maxValue.equals(currentValue.substring(flag.length())))
 			// User has set an initial value, or modified the file 
 			setUserArg(storedValues, flag, currentValue.substring(flag.length()));
 	}
@@ -114,7 +114,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 		String maxStored = getMaxValue(getArgs(storedValues, flag));
 		String userDefined = AddJVMArgumentAction.getUserArg(storedValues, flag);
 
-		if ((maxStored != null) || (userDefined != null)) {
+		if (maxStored != null || userDefined != null) {
 			// Replacement is available either stored, or user defined
 			if (maxStored == null)
 				launcherData.addJvmArg(flag + userDefined);
@@ -145,9 +145,9 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 			bPower += 10;
 		}
 
-		if ((aPower > bPower) && (aVal != 0))
+		if (aPower > bPower && aVal != 0)
 			return 1;
-		else if ((aPower < bPower) && (bVal != 0))
+		else if (aPower < bPower && bVal != 0)
 			return -1;
 		// Both have same power, so direct comparison 
 		else if (aVal > bVal)
@@ -190,7 +190,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 	// Get the current used argument if there is one 
 	protected static String getCurrentArg(String flag, String[] jvmArgs) {
 		for (int i = 0; i < jvmArgs.length; i++)
-			if ((jvmArgs[i] != null) && (jvmArgs[i].startsWith(flag)))
+			if (jvmArgs[i] != null && jvmArgs[i].startsWith(flag))
 				return jvmArgs[i];
 		return null;
 	}
@@ -215,7 +215,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 		if (argString == null || argString.length() == 0)
 			return new String[0];
 
-		List list = new ArrayList();
+		List<String> list = new ArrayList<String>();
 		int i = 0;
 		String arg = ""; //$NON-NLS-1$
 
@@ -230,10 +230,7 @@ public class AddJVMArgumentAction extends ProvisioningAction {
 		}
 
 		list.add(arg);
-		String[] argList = new String[list.size()];
-		list.toArray(argList);
-
-		return argList;
+		return list.toArray(new String[list.size()]);
 	}
 
 	// Store a single user argument, null removes stored values
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
index efaa3b3..b44806f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
@@ -10,22 +10,18 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
-import java.io.File;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class AddProgramArgumentAction extends ProvisioningAction {
 	public static final String ID = "addProgramArg"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
 		if (programArg == null)
@@ -35,9 +31,9 @@ public class AddProgramArgumentAction extends ProvisioningAction {
 		if (ActionConstants.PARM_IGNORE.equals(programArgValue))
 			return Status.OK_STATUS;
 
-		if (programArg.equals(ActionConstants.PARM_ARTIFACT)) {
+		if (programArg.equals(ActionConstants.PARM_AT_ARTIFACT)) {
 			try {
-				programArg = resolveArtifactParam(parameters);
+				programArg = Util.resolveArtifactParam(parameters);
 			} catch (CoreException e) {
 				return e.getStatus();
 			}
@@ -45,9 +41,9 @@ public class AddProgramArgumentAction extends ProvisioningAction {
 		manipulator.getLauncherData().addProgramArg(programArg);
 
 		if (programArgValue != null) {
-			if (programArgValue.equals(ActionConstants.PARM_ARTIFACT)) {
+			if (programArgValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
 				try {
-					programArgValue = resolveArtifactParam(parameters);
+					programArgValue = Util.resolveArtifactParam(parameters);
 				} catch (CoreException e) {
 					return e.getStatus();
 				}
@@ -58,7 +54,7 @@ public class AddProgramArgumentAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
 		if (programArg == null)
@@ -72,19 +68,4 @@ public class AddProgramArgumentAction extends ProvisioningAction {
 			manipulator.getLauncherData().removeProgramArg(programArg);
 		return Status.OK_STATUS;
 	}
-
-	private static String resolveArtifactParam(Map parameters) throws CoreException {
-		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
-			throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
-		IArtifactKey artifactKey = artifacts[0];
-
-		File fileLocation = Util.getArtifactFile(artifactKey, profile);
-		if (fileLocation == null || !fileLocation.exists())
-			throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
-		return fileLocation.getAbsolutePath();
-	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
index b5313dd..03d624d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,11 +10,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
 
 /**
  * An action that adds a repository to the list of known repositories.
@@ -22,15 +24,18 @@ import org.eclipse.equinox.internal.p2.engine.Profile;
 public class AddRepositoryAction extends RepositoryAction {
 	public static final String ID = "addRepository"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		try {
+			IProvisioningAgent agent = getAgent(parameters);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 			final RepositoryEvent event = createEvent(parameters);
-			Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+			IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 			if (profile != null)
-				addRepositoryToProfile(profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
+				addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
 			//if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
-			if (isSelfProfile(profile))
-				addToSelf(event);
+			if (isSelfProfile(registry, profile))
+				addToSelf(agent, agentLocation, event);
 			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			return e.getStatus();
@@ -41,15 +46,18 @@ public class AddRepositoryAction extends RepositoryAction {
 		return ID;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		try {
+			IProvisioningAgent agent = getAgent(parameters);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 			final RepositoryEvent event = createEvent(parameters);
-			Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+			IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 			if (profile != null)
-				removeRepositoryFromProfile(profile, event.getRepositoryLocation(), event.getRepositoryType());
+				removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
 			//if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
-			if (isSelfProfile(profile))
-				removeFromSelf(event);
+			if (isSelfProfile(registry, profile))
+				removeFromSelf(agent, agentLocation, event);
 			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			return e.getStatus();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
index 2f90c6a..640132e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
@@ -10,28 +10,31 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class AddSourceBundleAction extends ProvisioningAction {
 	public static final String ID = "addSourceBundle"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return AddSourceBundleAction.addSourceBundle(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return RemoveSourceBundleAction.removeSourceBundle(parameters);
 	}
 
-	public static IStatus addSourceBundle(Map parameters) {
+	public static IStatus addSourceBundle(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
@@ -39,21 +42,21 @@ public class AddSourceBundleAction extends ProvisioningAction {
 		if (bundleId == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.size() == 0)
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(bundleId)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(bundleId)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
 		if (artifactKey == null)
 			throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
 
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 		if (bundleFile == null || !bundleFile.exists())
 			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
index 14baeae..7139777 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
+import org.eclipse.equinox.p2.query.QueryUtil;
+
 import java.io.File;
 import java.util.Collection;
 import java.util.Map;
@@ -17,12 +19,11 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 
 /**
  * This action collects the set of bundle files on which the signature trust check
@@ -35,20 +36,22 @@ public class CheckTrustAction extends ProvisioningAction {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#execute(java.util.Map)
 	 */
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		if (iu == null)
 			return null;
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		//if the IU is already in the profile there is nothing to do
-		if (!profile.available(new InstallableUnitQuery(iu.getId(), iu.getVersion()), new Collector(), null).isEmpty())
+		if (!profile.available(QueryUtil.createIUQuery(iu), null).isEmpty())
 			return null;
-		Collection bundleFiles = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
-		IArtifactKey[] artifacts = iu.getArtifacts();
+		@SuppressWarnings("unchecked")
+		Collection<File> bundleFiles = (Collection<File>) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
 		if (artifacts == null)
 			return null;
-		for (int i = 0; i < artifacts.length; i++) {
-			File bundleFile = Util.getArtifactFile(artifacts[i], profile);
+		for (IArtifactKey key : artifacts) {
+			File bundleFile = Util.getArtifactFile(agent, key, profile);
 			if (!bundleFiles.contains(bundleFile))
 				bundleFiles.add(bundleFile);
 		}
@@ -58,7 +61,7 @@ public class CheckTrustAction extends ProvisioningAction {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#undo(java.util.Map)
 	 */
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return Status.OK_STATUS;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
index f5557b5..6b49224 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
@@ -16,26 +16,23 @@ import java.io.*;
 import java.util.ArrayList;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 // This basically a copy of the chmod action in the native touchpoint only it provides @artifact support.
 // We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
 public class ChmodAction extends ProvisioningAction {
 	private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
+	private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
 		if (targetDir == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
-		if (targetDir.equals(ActionConstants.PARM_ARTIFACT)) {
+		if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
 			try {
-				targetDir = resolveArtifactParam(parameters);
+				targetDir = Util.resolveArtifactParam(parameters);
 			} catch (CoreException e) {
 				return e.getStatus();
 			}
@@ -61,7 +58,7 @@ public class ChmodAction extends ProvisioningAction {
 
 		String options[] = null;
 		if (optionsString != null) {
-			ArrayList collect = new ArrayList();
+			ArrayList<String> collect = new ArrayList<String>();
 			String r = optionsString.trim();
 			while (r.length() > 0) {
 				int spaceIdx = r.indexOf(' ');
@@ -75,8 +72,7 @@ public class ChmodAction extends ProvisioningAction {
 				}
 			}
 			if (collect.size() > 0) {
-				options = new String[collect.size()];
-				collect.toArray(options);
+				options = collect.toArray(new String[collect.size()]);
 			}
 		}
 
@@ -84,12 +80,14 @@ public class ChmodAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		//TODO: implement undo ??
 		return Status.OK_STATUS;
 	}
 
 	public void chmod(String targetDir, String targetFile, String perms, String[] options) {
+		if (WINDOWS)
+			return;
 		Runtime r = Runtime.getRuntime();
 		try {
 			// Note: 3 is from chmod, permissions, and target
@@ -132,19 +130,4 @@ public class ChmodAction extends ProvisioningAction {
 			}
 		}
 	}
-
-	private static String resolveArtifactParam(Map parameters) throws CoreException {
-		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
-			throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
-		IArtifactKey artifactKey = artifacts[0];
-
-		File fileLocation = Util.getArtifactFile(artifactKey, profile);
-		if (fileLocation == null || !fileLocation.exists())
-			throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
-		return fileLocation.getAbsolutePath();
-	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
index f1932a5..fac3590 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
@@ -12,79 +12,82 @@ import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.artifact.*;
 import org.eclipse.osgi.util.NLS;
 
 public class CollectAction extends ProvisioningAction {
 	public static final String ID = "collect"; //$NON-NLS-1$
 	public static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
+		IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
 		IArtifactRequest[] requests;
 		try {
-			requests = CollectAction.collect(operand.second(), profile);
+			requests = CollectAction.collect(agent, profile, iu);
 		} catch (ProvisionException e) {
 			return e.getStatus();
 		}
 
-		Collection artifactRequests = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
+		@SuppressWarnings("unchecked")
+		Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
 		artifactRequests.add(requests);
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		// nothing to do for now
 		return Status.OK_STATUS;
 	}
 
-	public static boolean isZipped(ITouchpointData[] data) {
-		if (data == null || data.length == 0)
+	public static boolean isZipped(Collection<ITouchpointData> data) {
+		if (data == null || data.size() == 0)
 			return false;
-		for (int i = 0; i < data.length; i++) {
-			if (data[i].getInstruction("zipped") != null) //$NON-NLS-1$
+		for (ITouchpointData td : data) {
+			if (td.getInstruction("zipped") != null) //$NON-NLS-1$
 				return true;
 		}
 		return false;
 	}
 
-	public static Properties createArtifactDescriptorProperties(IInstallableUnit installableUnit) {
-		Properties descriptorProperties = null;
+	public static Map<String, String> createArtifactDescriptorProperties(IInstallableUnit installableUnit) {
+		Map<String, String> descriptorProperties = null;
 		if (CollectAction.isZipped(installableUnit.getTouchpointData())) {
-			descriptorProperties = new Properties();
-			descriptorProperties.setProperty(CollectAction.ARTIFACT_FOLDER, Boolean.TRUE.toString());
+			descriptorProperties = new HashMap<String, String>();
+			descriptorProperties.put(CollectAction.ARTIFACT_FOLDER, Boolean.TRUE.toString());
 		}
 		return descriptorProperties;
 	}
 
 	// TODO: Here we may want to consult multiple caches
-	public static IArtifactRequest[] collect(IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
-		IArtifactKey[] toDownload = installableUnit.getArtifacts();
-		if (toDownload == null || toDownload.length == 0)
+	static IArtifactRequest[] collect(IProvisioningAgent agent, IProfile profile, IInstallableUnit installableUnit) throws ProvisionException {
+		Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
+		if (toDownload == null || toDownload.size() == 0)
 			return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
 
-		IArtifactRepository aggregatedRepositoryView = Util.getAggregatedBundleRepository(profile);
-		IArtifactRepository bundlePool = Util.getBundlePoolRepository(profile);
+		IArtifactRepository aggregatedRepositoryView = Util.getAggregatedBundleRepository(agent, profile);
+		IArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
 		if (bundlePool == null)
 			throw new ProvisionException(Util.createError(NLS.bind(Messages.no_bundle_pool, profile.getProfileId())));
 
-		List requests = new ArrayList();
-		for (int i = 0; i < toDownload.length; i++) {
-			IArtifactKey key = toDownload[i];
+		List<IArtifactRequest> requests = new ArrayList<IArtifactRequest>();
+		for (IArtifactKey key : toDownload) {
 			if (!aggregatedRepositoryView.contains(key)) {
-				Properties repositoryProperties = CollectAction.createArtifactDescriptorProperties(installableUnit);
-				requests.add(Util.getArtifactRepositoryManager().createMirrorRequest(key, bundlePool, null, repositoryProperties));
+				Map<String, String> repositoryProperties = CollectAction.createArtifactDescriptorProperties(installableUnit);
+				requests.add(Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, bundlePool, null, repositoryProperties));
 			}
 		}
 
 		if (requests.isEmpty())
 			return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
 
-		IArtifactRequest[] result = (IArtifactRequest[]) requests.toArray(new IArtifactRequest[requests.size()]);
+		IArtifactRequest[] result = requests.toArray(new IArtifactRequest[requests.size()]);
 		return result;
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
index ebfc124..4a2ecfe 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -9,31 +9,35 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
 import org.eclipse.osgi.util.NLS;
 
 public class InstallBundleAction extends ProvisioningAction {
 	public static final String ID = "installBundle"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return InstallBundleAction.installBundle(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return UninstallBundleAction.uninstallBundle(parameters);
 	}
 
-	public static IStatus installBundle(Map parameters) {
+	public static IStatus installBundle(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
@@ -42,35 +46,30 @@ public class InstallBundleAction extends ProvisioningAction {
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
 
 		//TODO: eventually remove this. What is a fragment doing here??
-		if (iu.isFragment()) {
+		if (QueryUtil.isFragment(iu)) {
 			System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
 			return Status.OK_STATUS;
 		}
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(bundleId)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(bundleId)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
 		if (artifactKey == null)
 			throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
 
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 		if (bundleFile == null || !bundleFile.exists())
 			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
 
-		//By now we always have the manifest in the touchpoint data
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 		manipulator.getConfigData().addBundle(bundleInfo);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
index f0575eb..b9d55ba 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
@@ -9,14 +9,16 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
 import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class InstallFeatureAction extends ProvisioningAction {
@@ -25,29 +27,29 @@ public class InstallFeatureAction extends ProvisioningAction {
 	private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
 	private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return InstallFeatureAction.installFeature(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return UninstallFeatureAction.uninstallFeature(parameters);
 	}
 
-	public static IStatus installFeature(Map parameters) {
+	public static IStatus installFeature(Map<String, Object> parameters) {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
 		String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
 		String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
 		String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(feature)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(feature)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
@@ -64,8 +66,9 @@ public class InstallFeatureAction extends ProvisioningAction {
 			featureVersion = artifactKey.getVersion().toString();
 		}
 
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		File file = Util.getArtifactFile(artifactKey, profile);
+		File file = Util.getArtifactFile(agent, artifactKey, profile);
 		if (file == null || !file.exists()) {
 			return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
index e18ef9b..fa8825e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
@@ -13,27 +13,24 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 import java.io.*;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 //This is basically a copy of the ln action in the native touchpoint only it provides @artifact support and does not support the backup store.
 //We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
 public class LinkAction extends ProvisioningAction {
 	public static final String ID = "ln"; //$NON-NLS-1$
+	private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
 		if (targetDir == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ID));
 
-		if (targetDir.equals(ActionConstants.PARM_ARTIFACT)) {
+		if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
 			try {
-				targetDir = resolveArtifactParam(parameters);
+				targetDir = Util.resolveArtifactParam(parameters);
 			} catch (CoreException e) {
 				return e.getStatus();
 			}
@@ -57,7 +54,7 @@ public class LinkAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return null;
 	}
 
@@ -71,6 +68,8 @@ public class LinkAction extends ProvisioningAction {
 	 * @param force if overwrite of existing file should be performed.
 	 */
 	private void ln(String targetDir, String linkTarget, String linkName, boolean force) {
+		if (WINDOWS)
+			return;
 
 		Runtime r = Runtime.getRuntime();
 		try {
@@ -104,19 +103,4 @@ public class LinkAction extends ProvisioningAction {
 			}
 		}
 	}
-
-	private static String resolveArtifactParam(Map parameters) throws CoreException {
-		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
-			throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
-		IArtifactKey artifactKey = artifacts[0];
-
-		File fileLocation = Util.getArtifactFile(artifactKey, profile);
-		if (fileLocation == null || !fileLocation.exists())
-			throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
-		return fileLocation.getAbsolutePath();
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
index 744b266..832c147 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,23 +11,26 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class MarkStartedAction extends ProvisioningAction {
 	public static final String ID = "markStarted"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
@@ -35,20 +38,16 @@ public class MarkStartedAction extends ProvisioningAction {
 		if (started == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_STARTED, ID));
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
-		IArtifactKey artifactKey = artifacts[0];
+		IArtifactKey artifactKey = artifacts.iterator().next();
 
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 
@@ -66,7 +65,8 @@ public class MarkStartedAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		Boolean previousStarted = (Boolean) getMemento().get(ActionConstants.PARM_PREVIOUS_STARTED);
 		if (previousStarted == null)
 			return Status.OK_STATUS;
@@ -75,19 +75,15 @@ public class MarkStartedAction extends ProvisioningAction {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
-		IArtifactKey artifactKey = artifacts[0];
+		IArtifactKey artifactKey = artifacts.iterator().next();
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
index 3560e8a..10d00d6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
@@ -17,13 +17,13 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class RemoveJVMArgumentAction extends ProvisioningAction {
 	public static final String ID = "removeJvmArg"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
 		if (jvmArg == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
@@ -31,7 +31,7 @@ public class RemoveJVMArgumentAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
 		if (jvmArg == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
@@ -39,7 +39,7 @@ public class RemoveJVMArgumentAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public static IStatus removeArg(String arg, Map parameters) {
+	public static IStatus removeArg(String arg, Map<String, Object> parameters) {
 		LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
 		File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
index 5cc2277..e61c386 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
@@ -16,21 +16,21 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class RemoveProgramArgumentAction extends ProvisioningAction {
 	public static final String ID = "removeProgramArg"; //$NON-NLS-1$
 	public static final String EMPTY_ARGUMENT = ""; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
 		if (programArg == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
 
 		if (programArg.startsWith("-")) {//$NON-NLS-1$
-			List programArgs = Arrays.asList(manipulator.getLauncherData().getProgramArgs());
+			List<String> programArgs = Arrays.asList(manipulator.getLauncherData().getProgramArgs());
 
 			int index = programArgs.indexOf(programArg);
 			if (index == -1)
@@ -38,7 +38,7 @@ public class RemoveProgramArgumentAction extends ProvisioningAction {
 
 			index++; // move index to potential programArgValue
 			if (programArgs.size() > index) {
-				String programArgValue = (String) programArgs.get(index);
+				String programArgValue = programArgs.get(index);
 				if (!programArgValue.startsWith("-")) //$NON-NLS-1$
 					getMemento().put(ActionConstants.PARM_PROGRAM_ARG_VALUE, programArgValue);
 			}
@@ -48,7 +48,7 @@ public class RemoveProgramArgumentAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
 		if (programArg == null)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
index 753eb0c..0d63482 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,11 +10,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
 
 /**
  * An action that adds a repository to the list of known repositories.
@@ -22,30 +24,36 @@ import org.eclipse.equinox.internal.p2.engine.Profile;
 public class RemoveRepositoryAction extends RepositoryAction {
 	public static final String ID = "removeRepository"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		try {
+			IProvisioningAgent agent = getAgent(parameters);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 			RepositoryEvent event = createEvent(parameters);
-			Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+			IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 			if (profile != null)
-				removeRepositoryFromProfile(profile, event.getRepositoryLocation(), event.getRepositoryType());
+				removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
 			//if we are provisioning into the self profile, update the current set of repositories in this configuration
-			if (isSelfProfile(profile))
-				removeFromSelf(event);
+			if (isSelfProfile(registry, profile))
+				removeFromSelf(agent, agentLocation, event);
 		} catch (CoreException e) {
 			return e.getStatus();
 		}
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		try {
+			IProvisioningAgent agent = getAgent(parameters);
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 			RepositoryEvent event = createEvent(parameters);
-			Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+			IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 			if (profile != null)
-				addRepositoryToProfile(profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
+				addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
 			//if we are provisioning into the self profile, update the current set of repositories in this configuration
-			if (isSelfProfile(profile))
-				addToSelf(event);
+			if (isSelfProfile(registry, profile))
+				addToSelf(agent, agentLocation, event);
 			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			return e.getStatus();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
index 21b1a14..c944904 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
@@ -10,28 +10,31 @@ package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class RemoveSourceBundleAction extends ProvisioningAction {
 	public static final String ID = "removeSourceBundle"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return RemoveSourceBundleAction.removeSourceBundle(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return AddSourceBundleAction.addSourceBundle(parameters);
 	}
 
-	public static IStatus removeSourceBundle(Map parameters) {
+	public static IStatus removeSourceBundle(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
@@ -39,14 +42,14 @@ public class RemoveSourceBundleAction extends ProvisioningAction {
 		if (bundleId == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(bundleId)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(bundleId)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
@@ -54,7 +57,7 @@ public class RemoveSourceBundleAction extends ProvisioningAction {
 			throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
 
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
 		try {
 			manipulator.removeBundle(bundleFile, artifactKey.getId(), artifactKey.getVersion());
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
index cf51718..2ded7cf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,15 +14,16 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Map;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
@@ -49,11 +50,11 @@ abstract class RepositoryAction extends ProvisioningAction {
 	 * Returns the repository manager of the given type, or <code>null</code>
 	 * if not available.
 	 */
-	private static IRepositoryManager getRepositoryManager(int type) {
+	private static IRepositoryManager<?> getRepositoryManager(IProvisioningAgent agent, int type) {
 		if (type == IRepository.TYPE_METADATA) {
-			return (IRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.SERVICE_NAME);
+			return (IRepositoryManager<?>) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		} else if (type == IRepository.TYPE_ARTIFACT) {
-			return (IRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.SERVICE_NAME);
+			return (IRepositoryManager<?>) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 		}
 		return null;
 	}
@@ -62,8 +63,8 @@ abstract class RepositoryAction extends ProvisioningAction {
 	 * Associates the repository described by the given event with the given profile.
 	 * Has no effect if the repository is already associated with this profile.
 	 */
-	protected void addRepositoryToProfile(Profile profile, URI location, String nickname, int type, boolean enabled) {
-		Preferences node = getRepositoryPreferenceNode(profile, location, type);
+	protected void addRepositoryToProfile(IAgentLocation agentLocation, IProfile profile, URI location, String nickname, int type, boolean enabled) {
+		Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
 		int count = 0;
 
 		if (repositoryExists(node)) {
@@ -88,10 +89,10 @@ abstract class RepositoryAction extends ProvisioningAction {
 	/**
 	 * Adds the repository corresponding to the given event to the currently running instance.
 	 */
-	protected void addToSelf(RepositoryEvent event) {
-		IRepositoryManager manager = getRepositoryManager(event.getRepositoryType());
+	protected void addToSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
+		IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
 		final URI location = event.getRepositoryLocation();
-		Preferences node = getRepositoryPreferenceNode(null, location, event.getRepositoryType());
+		Preferences node = getRepositoryPreferenceNode(agentLocation, null, location, event.getRepositoryType());
 
 		int count = getRepositoryCount(node);
 		if (manager.contains(location)) {
@@ -113,7 +114,7 @@ abstract class RepositoryAction extends ProvisioningAction {
 			manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
 	}
 
-	protected RepositoryEvent createEvent(Map parameters) throws CoreException {
+	protected RepositoryEvent createEvent(Map<String, Object> parameters) throws CoreException {
 		String parm = (String) parameters.get(ActionConstants.PARM_REPOSITORY_LOCATION);
 		if (parm == null)
 			throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_LOCATION, getId())));
@@ -148,11 +149,10 @@ abstract class RepositoryAction extends ProvisioningAction {
 	 * Return <code>true</code> if the given profile is the currently running profile,
 	 * and <code>false</code> otherwise.
 	 */
-	protected boolean isSelfProfile(Profile profile) {
+	protected boolean isSelfProfile(IProfileRegistry registry, IProfile profile) {
 		//if we can't determine the current profile, assume we are running on self
 		if (profile == null)
 			return true;
-		IProfileRegistry registry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
 		if (registry == null)
 			return false;
 		final IProfile selfProfile = registry.getProfile(IProfileRegistry.SELF);
@@ -165,11 +165,11 @@ abstract class RepositoryAction extends ProvisioningAction {
 	/**
 	 * Removes the repository corresponding to the given event from the currently running instance.
 	 */
-	protected void removeFromSelf(RepositoryEvent event) {
-		IRepositoryManager manager = getRepositoryManager(event.getRepositoryType());
-		Preferences node = getRepositoryPreferenceNode(null, event.getRepositoryLocation(), event.getRepositoryType());
+	protected void removeFromSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
+		IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
+		Preferences node = getRepositoryPreferenceNode(agentLocation, null, event.getRepositoryLocation(), event.getRepositoryType());
 		int count = getRepositoryCount(node);
-		if ((--count < 1) && (manager != null))
+		if (--count < 1 && manager != null)
 			manager.removeRepository(event.getRepositoryLocation());
 		setRepositoryCount(node, count);
 	}
@@ -179,8 +179,8 @@ abstract class RepositoryAction extends ProvisioningAction {
 	 * and the given profile. Has no effect if the location is not already associated with
 	 * this profile.
 	 */
-	protected void removeRepositoryFromProfile(Profile profile, URI location, int type) {
-		Preferences node = getRepositoryPreferenceNode(profile, location, type);
+	protected void removeRepositoryFromProfile(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
+		Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
 
 		int count = getRepositoryCount(node);
 		if (--count < 1) {
@@ -233,13 +233,10 @@ abstract class RepositoryAction extends ProvisioningAction {
 	/*
 	 * Get the preference node associated with profile & location 
 	 */
-	protected Preferences getRepositoryPreferenceNode(Profile profile, URI location, int type) {
+	protected Preferences getRepositoryPreferenceNode(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
 		String key = type == IRepository.TYPE_METADATA ? METADATA_REPOSITORY : ARTIFACT_REPOSITORY;
-		IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName());
-
-		if (profile != null)
-			return prefService.getRootNode().node("/profile/" + profile.getProfileId() + "/" + key + "/" + NODE_REPOSITORIES + "/" + getKey(location)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
-		return prefService.getRootNode().node("/profile/_SELF_/" + key + "/" + NODE_REPOSITORIES + "/" + getKey(location)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+		String profileId = profile == null ? IProfileRegistry.SELF : profile.getProfileId();
+		return new ProfileScope(agentLocation, profileId).getNode(key + '/' + NODE_REPOSITORIES + '/' + getKey(location));
 	}
 
 	/*
@@ -252,4 +249,12 @@ abstract class RepositoryAction extends ProvisioningAction {
 			key = key.substring(0, key.length() - 1);
 		return key;
 	}
+
+	protected IProvisioningAgent getAgent(Map<String, Object> parameters) throws CoreException {
+		//We shouldn't really know about the session parameter
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get("agent"); //$NON-NLS-1$
+		if (agent == null)
+			throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, "agent", getId()))); //$NON-NLS-1$
+		return agent;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
index 040c44d..c9101fe 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
@@ -16,32 +16,36 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 
 public class SetLauncherNameAction extends ProvisioningAction {
 	public static final String ID = "setLauncherName"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
-		Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME));
 		String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME);
 		setLauncher(manipulator, profile, launcherName);
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
-		Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
+		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		String previousLauncherName = (String) getMemento().get(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
 		setLauncher(manipulator, profile, previousLauncherName);
 		return Status.OK_STATUS;
 	}
 
-	private static void setLauncher(Manipulator manipulator, Profile profile, String launcherName) {
+	private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) {
 		//Get the launcherData before changing the name so we don't lose anything from the old launcher.ini
 		LauncherData launcherData = manipulator.getLauncherData();
-		profile.setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
+		if (launcherName != null)
+			((Profile) profile).setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
+		else
+			((Profile) profile).removeProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
 		launcherData.setLauncher(Util.getLauncherPath(profile));
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
index cdc72ce..e334402 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
@@ -10,30 +10,26 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
-import java.io.File;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class SetProgramPropertyAction extends ProvisioningAction {
 	public static final String ID = "setProgramProperty"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
 		if (propName == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
 		String propValue = (String) parameters.get(ActionConstants.PARM_PROP_VALUE);
-		if (propValue != null && propValue.equals(ActionConstants.PARM_ARTIFACT)) {
+		if (propValue != null && propValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
 			try {
-				propValue = resolveArtifactParam(parameters);
+				propValue = Util.resolveArtifactParam(parameters);
 			} catch (CoreException e) {
 				return e.getStatus();
 			}
@@ -44,7 +40,7 @@ public class SetProgramPropertyAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
 		if (propName == null)
@@ -53,19 +49,4 @@ public class SetProgramPropertyAction extends ProvisioningAction {
 		manipulator.getConfigData().setProperty(propName, previousValue);
 		return Status.OK_STATUS;
 	}
-
-	private static String resolveArtifactParam(Map parameters) throws CoreException {
-		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
-			throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
-
-		IArtifactKey artifactKey = artifacts[0];
-
-		File fileLocation = Util.getArtifactFile(artifactKey, profile);
-		if (fileLocation == null || !fileLocation.exists())
-			throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
-		return fileLocation.getAbsolutePath();
-	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
index 55c7314..9452c71 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,23 +11,26 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class SetStartLevelAction extends ProvisioningAction {
 	public static final String ID = "setStartLevel"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
@@ -35,19 +38,15 @@ public class SetStartLevelAction extends ProvisioningAction {
 		if (startLevel == null)
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_START_LEVEL, ID));
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
-		IArtifactKey artifactKey = artifacts[0];
+		IArtifactKey artifactKey = artifacts.iterator().next();
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 
@@ -69,7 +68,8 @@ public class SetStartLevelAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		Integer previousStartLevel = (Integer) getMemento().get(ActionConstants.PARM_PREVIOUS_START_LEVEL);
 		if (previousStartLevel == null)
 			return Status.OK_STATUS;
@@ -78,19 +78,15 @@ public class SetStartLevelAction extends ProvisioningAction {
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
-		IArtifactKey artifactKey = artifacts[0];
+		IArtifactKey artifactKey = artifacts.iterator().next();
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
-
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
index daf1ec9..a20aae9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -9,31 +9,35 @@
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
 import java.io.File;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.QueryUtil;
 import org.eclipse.osgi.util.NLS;
 
 public class UninstallBundleAction extends ProvisioningAction {
 	public static final String ID = "uninstallBundle"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return UninstallBundleAction.uninstallBundle(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return InstallBundleAction.installBundle(parameters);
 	}
 
-	public static IStatus uninstallBundle(Map parameters) {
+	public static IStatus uninstallBundle(Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
@@ -42,19 +46,19 @@ public class UninstallBundleAction extends ProvisioningAction {
 			return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
 
 		//TODO: eventually remove this. What is a fragment doing here??
-		if (iu.isFragment()) {
+		if (QueryUtil.isFragment(iu)) {
 			System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
 			return Status.OK_STATUS;
 		}
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(bundleId)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(bundleId)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
@@ -62,13 +66,9 @@ public class UninstallBundleAction extends ProvisioningAction {
 			throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
 
 		// the bundleFile might be null here, that's OK.
-		File bundleFile = Util.getArtifactFile(artifactKey, profile);
+		File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
 
-		String manifest = Util.getManifest(iu.getTouchpointData());
-		if (manifest == null)
-			return Util.createError(NLS.bind(Messages.missing_manifest, iu));
-
-		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, manifest);
+		BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
 		if (bundleInfo == null)
 			return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
 		manipulator.getConfigData().removeBundle(bundleInfo);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
index 95ea30f..33bee8e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
@@ -8,40 +8,41 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
 
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class UninstallFeatureAction extends ProvisioningAction {
 	public static final String ID = "uninstallFeature"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return UninstallFeatureAction.uninstallFeature(parameters);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return InstallFeatureAction.installFeature(parameters);
 	}
 
-	public static IStatus uninstallFeature(Map parameters) {
+	public static IStatus uninstallFeature(Map<String, Object> parameters) {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
 		PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
 		String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
 		String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
 		String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
 
-		IArtifactKey[] artifacts = iu.getArtifacts();
-		if (artifacts == null || artifacts.length == 0)
+		Collection<IArtifactKey> artifacts = iu.getArtifacts();
+		if (artifacts == null || artifacts.isEmpty())
 			return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
 
 		IArtifactKey artifactKey = null;
-		for (int i = 0; i < artifacts.length; i++) {
-			if (artifacts[i].toString().equals(feature)) {
-				artifactKey = artifacts[i];
+		for (IArtifactKey candidate : artifacts) {
+			if (candidate.toString().equals(feature)) {
+				artifactKey = candidate;
 				break;
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
index 36436a3..81f1ab0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
@@ -27,3 +27,4 @@ parent_dir_features=Parent directory should be "features": {0}.
 platform_config_unavailable=Platform configuration not available.
 unexpected_prepareiu_error=Unexpected state: prepareIU
 error_validating_profile=Error validating profile {0}.
+iu_contains_no_arifacts=Installable unit contains no artifacts: {0}.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
index c3285ce..588a5c7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
@@ -21,21 +21,21 @@ import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 
 /**
  * @since 1.0
  */
 public class Configuration {
 
-	private List sites = new ArrayList();
+	private List<Site> sites = new ArrayList<Site>();
 	String date;
 	boolean transientProperty;
 	String version;
 	String shared_ur;
 
 	public static Configuration load(File location, URL osgiInstallArea) throws ProvisionException {
-		return ConfigurationParser.parse(location, osgiInstallArea);
+		return ConfigurationIO.read(location, osgiInstallArea);
 	}
 
 	public Configuration() {
@@ -43,7 +43,7 @@ public class Configuration {
 	}
 
 	public void save(File location, URL osgiInstallArea) throws ProvisionException {
-		ConfigurationWriter.save(this, location, osgiInstallArea);
+		ConfigurationIO.write(location, this, osgiInstallArea);
 	}
 
 	public String getSharedUR() {
@@ -54,17 +54,17 @@ public class Configuration {
 		shared_ur = value;
 	}
 
-	public List getSites() {
+	public List<Site> getSites() {
 		return internalGetSites(true);
 	}
 
-	List internalGetSites(boolean includeParent) {
+	List<Site> internalGetSites(boolean includeParent) {
 		if (!includeParent)
 			return sites;
 		String shared = getSharedUR();
 		if (shared == null)
 			return sites;
-		List result = new ArrayList(sites);
+		List<Site> result = new ArrayList<Site>(sites);
 		try {
 			URL url = new URL(shared);
 			File location = URLUtil.toFile(url);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
new file mode 100644
index 0000000..53c5c65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.update;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * TODO ensure thread safety
+ *
+ */
+public class ConfigurationCache {
+	private static Map<String, CacheEntry> cache = new HashMap<String, CacheEntry>();
+
+	// class used to represent cache values
+	static class CacheEntry {
+		long timestamp;
+		Configuration config;
+	}
+
+	// helper method to convert the file to a cache key. convert to an absolute
+	// path to ensure equality between relative and absolute comparisons
+	private static String toKey(File file) {
+		try {
+			return file.getCanonicalPath();
+		} catch (IOException e) {
+			// ignore and return the absolute value instead
+		}
+		return file.getAbsolutePath();
+	}
+
+	/*
+	 * Return the configuration object in the cache which is represented
+	 * by the given file. Do a check on disk to see if the cache is up-to-date.
+	 * If not, then treat it as a cache miss.
+	 */
+	public static Configuration get(File file) {
+		String key = toKey(file);
+		CacheEntry entry = cache.get(key);
+		if (entry == null)
+			return null;
+		return file.lastModified() == entry.timestamp ? entry.config : null;
+	}
+
+	/*
+	 * Store the given configuration in the cache.
+	 */
+	public static void put(File file, Configuration config) {
+		String key = toKey(file);
+		if (config == null) {
+			cache.remove(key);
+			return;
+		}
+		CacheEntry entry = new CacheEntry();
+		entry.config = config;
+		entry.timestamp = file.lastModified();
+		cache.put(key, entry);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
new file mode 100644
index 0000000..44dfae1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.update;
+
+import java.io.File;
+import java.net.URL;
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+/*
+ * Class which controls the reading and writing of Configuration (platform.xml) objects.
+ * We keep a local cached copy to avoid multiple reads. When we install new features we
+ * seem to only write out the platform.xml in the "commit" phase so we don't need to 
+ * batch the writes.
+ */
+public class ConfigurationIO {
+	private static CacheEntry cache = null;
+
+	// class used to represent cache values
+	static class CacheEntry {
+		Configuration config;
+		URL osgiInstallArea;
+		File location;
+		long timestamp;
+	}
+
+	/*
+	 * Return the configuration object which is represented by the given file. 
+	 */
+	static Configuration read(File file, URL osgiInstallArea) throws ProvisionException {
+		// check the cached copy first
+		if (cache != null && file.lastModified() == cache.timestamp)
+			return cache.config;
+
+		// cache miss or file is out of date, read from disk
+		Configuration config = ConfigurationParser.parse(file, osgiInstallArea);
+		if (config == null)
+			return null;
+
+		// successful read, store in the cache before we return
+		cache(file, config, osgiInstallArea);
+		return config;
+	}
+
+	/*
+	 * Store the given configuration file in the local cache.
+	 */
+	private static void cache(File location, Configuration config, URL osgiInstallArea) {
+		CacheEntry entry = new CacheEntry();
+		entry.config = config;
+		entry.osgiInstallArea = osgiInstallArea;
+		entry.location = location;
+		entry.timestamp = location.lastModified();
+		cache = entry;
+	}
+
+	/*
+	 * Save the given configuration to the file-system.
+	 */
+	static void write(File location, Configuration config, URL osgiInstallArea) throws ProvisionException {
+		// write it to disk 
+		ConfigurationWriter.save(config, location, osgiInstallArea);
+		// save a copy in the cache
+		cache(location, config, osgiInstallArea);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
index c2e5d7d..ae3e2c3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,12 @@
 package org.eclipse.equinox.internal.p2.update;
 
 import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.*;
 import java.util.ArrayList;
 import java.util.StringTokenizer;
 import javax.xml.parsers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 import org.w3c.dom.*;
 import org.xml.sax.SAXException;
@@ -34,7 +34,7 @@ public class ConfigurationParser implements ConfigurationConstants {
 	 * Parse the given file handle which points to a platform.xml file and a configuration object.
 	 * Returns null if the file doesn't exist.
 	 */
-	public static Configuration parse(File file, URL osgiInstallArea) throws ProvisionException {
+	static Configuration parse(File file, URL osgiInstallArea) throws ProvisionException {
 		return new ConfigurationParser(osgiInstallArea).internalParse(file);
 	}
 
@@ -79,7 +79,7 @@ public class ConfigurationParser implements ConfigurationConstants {
 		String locations = getAttribute(node, ATTRIBUTE_ROOT);
 		if (locations != null) {
 			StringTokenizer tokenizer = new StringTokenizer(locations, ","); //$NON-NLS-1$
-			ArrayList rootList = new ArrayList();
+			ArrayList<URL> rootList = new ArrayList<URL>();
 			while (tokenizer.hasMoreTokens()) {
 				try {
 					URL rootEntry = new URL(tokenizer.nextToken().trim());
@@ -88,7 +88,7 @@ public class ConfigurationParser implements ConfigurationConstants {
 					// skip bad entries ...
 				}
 			}
-			URL[] roots = (URL[]) rootList.toArray(new URL[rootList.size()]);
+			URL[] roots = rootList.toArray(new URL[rootList.size()]);
 			result.setRoots(roots);
 		}
 
@@ -128,8 +128,16 @@ public class ConfigurationParser implements ConfigurationConstants {
 		if (updateable != null)
 			result.setUpdateable(Boolean.valueOf(updateable).booleanValue());
 		String url = getAttribute(node, ATTRIBUTE_URL);
-		if (url != null)
-			result.setUrl(getLocation(url));
+		if (url != null) {
+			try {
+				// do this to ensure the location is an encoded URI
+				URI uri = URIUtil.fromString(url);
+				URI osgiURI = osgiInstallArea != null ? URIUtil.toURI(osgiInstallArea) : null;
+				result.setUrl(getLocation(uri, osgiURI).toString());
+			} catch (URISyntaxException e) {
+				result.setUrl(url);
+			}
+		}
 		String linkFile = getAttribute(node, ATTRIBUTE_LINKFILE);
 		if (linkFile != null)
 			result.setLinkFile(linkFile);
@@ -146,12 +154,12 @@ public class ConfigurationParser implements ConfigurationConstants {
 	 * platform:/base/ then return a string which represents the osgi
 	 * install area.
 	 */
-	private String getLocation(String urlString) {
-		if (osgiInstallArea == null)
-			return urlString;
-		if (PLATFORM_BASE.equals(urlString))
-			return osgiInstallArea.toExternalForm();
-		return PathUtil.makeAbsolute(urlString, osgiInstallArea);
+	private URI getLocation(URI location, URI osgiArea) {
+		if (osgiArea == null)
+			return location;
+		if (PLATFORM_BASE.equals(location.toString()))
+			return osgiArea;
+		return URIUtil.makeAbsolute(location, osgiArea);
 	}
 
 	/*
@@ -189,12 +197,22 @@ public class ConfigurationParser implements ConfigurationConstants {
 	 * Returns null if the file doesn't exist.
 	 */
 	private Configuration internalParse(File file) throws ProvisionException {
-		if (!file.exists())
+		if (!file.exists()) {
+			// remove from cache since it doesn't exist anymore on disk
+			ConfigurationCache.put(file, null);
 			return null;
+		}
+		// have we read this before?
+		Configuration result = ConfigurationCache.get(file);
+		if (result != null)
+			return result;
 		try {
 			InputStream input = new BufferedInputStream(new FileInputStream(file));
 			Document document = load(input);
-			return process(document);
+			result = process(document);
+			// save for future use
+			ConfigurationCache.put(file, result);
+			return result;
 		} catch (IOException e) {
 			throw new ProvisionException(NLS.bind(Messages.error_reading_config, file), e);
 		} catch (ParserConfigurationException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
index 98d0890..be55efd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,15 +11,13 @@
 package org.eclipse.equinox.internal.p2.update;
 
 import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.*;
 import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
 import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -30,18 +28,17 @@ public class ConfigurationWriter implements ConfigurationConstants {
 	/*
 	 * Save the given configuration to the specified location.
 	 */
-	public static void save(Configuration configuration, File location, URL osgiInstallArea) throws ProvisionException {
+	static void save(Configuration configuration, File location, URL osgiInstallArea) throws ProvisionException {
 		XMLWriter writer = null;
 		try {
 			OutputStream output = new BufferedOutputStream(new FileOutputStream(location));
 			writer = new XMLWriter(output);
-			Map args = new HashMap();
+			Map<String, String> args = new HashMap<String, String>();
 
-			String value = configuration.getDate();
-			if (value != null)
-				args.put(ATTRIBUTE_DATE, value);
+			// always write out an up-to-date timestamp
+			args.put(ATTRIBUTE_DATE, Long.toString(new Date().getTime()));
 
-			value = configuration.getSharedUR();
+			String value = configuration.getSharedUR();
 			if (value != null)
 				args.put(ATTRIBUTE_SHARED_UR, value);
 
@@ -53,8 +50,7 @@ public class ConfigurationWriter implements ConfigurationConstants {
 
 			writer.startTag(ELEMENT_CONFIG, args);
 
-			for (Iterator iter = configuration.internalGetSites(false).iterator(); iter.hasNext();) {
-				Site site = (Site) iter.next();
+			for (Site site : configuration.internalGetSites(false)) {
 				write(writer, site, osgiInstallArea);
 			}
 
@@ -69,13 +65,15 @@ public class ConfigurationWriter implements ConfigurationConstants {
 				writer.close();
 			}
 		}
+		// put the config in the cache in case someone in the same session wants to read it
+		ConfigurationCache.put(location, configuration);
 	}
 
 	/*
 	 * Write out the given site.
 	 */
 	private static void write(XMLWriter writer, Site site, URL osgiInstallArea) {
-		Map args = new HashMap();
+		Map<String, String> args = new HashMap<String, String>();
 
 		String value = site.getLinkFile();
 		if (value != null)
@@ -86,8 +84,14 @@ public class ConfigurationWriter implements ConfigurationConstants {
 			args.put(ATTRIBUTE_POLICY, value);
 
 		value = site.getUrl();
-		if (value != null)
+		if (value != null) {
+			try {
+				value = URIUtil.toUnencodedString(new URI(value));
+			} catch (URISyntaxException e) {
+				// ignore this error and just use the value straight as-is
+			}
 			args.put(ATTRIBUTE_URL, getLocation(value, osgiInstallArea));
+		}
 
 		value = toString(site.getList());
 		if (value != null)
@@ -144,7 +148,7 @@ public class ConfigurationWriter implements ConfigurationConstants {
 			return;
 		for (int i = 0; i < features.length; i++) {
 			Feature feature = features[i];
-			Map args = new HashMap();
+			Map<String, String> args = new HashMap<String, String>();
 			String value = feature.getId();
 			if (value != null)
 				args.put(ATTRIBUTE_ID, value);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
index 63300b4..ece1efc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,12 @@ package org.eclipse.equinox.internal.p2.update;
 
 import java.io.File;
 import java.net.URL;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.*;
 
 /**
- * 
+ * Note the methods on this class have inconsistent and unintuitive behaviour. However
+ * they are unchanged for backwards compatibility. Clients should really use
+ * {@link URIUtil} instead.
  * @since 1.0
  */
 public class PathUtil {
@@ -64,20 +65,23 @@ public class PathUtil {
 	/*
 	 * Make the given path relative to the specified root, if applicable. If not, then
 	 * return the path as-is.
-	 * 
-	 * Method similar to one from SimpleConfigurationManipulatorImpl.
 	 */
 	private static String makeRelative(IPath toRel, IPath base) {
+		//can't make relative if devices are not equal
+		final String device = toRel.getDevice();
+		if (device != base.getDevice() && (device == null || !device.equalsIgnoreCase(base.getDevice())))
+			return toRel.toOSString();
 		int i = base.matchingFirstSegments(toRel);
 		if (i == 0) {
 			return toRel.toOSString();
 		}
 		String result = ""; //$NON-NLS-1$
-		for (int j = 0; j < (base.segmentCount() - i); j++) {
+		for (int j = 0; j < base.segmentCount() - i; j++) {
 			result += ".." + IPath.SEPARATOR; //$NON-NLS-1$
 		}
 		if (i == toRel.segmentCount())
 			return "."; //$NON-NLS-1$
+		//TODO This will return mixed path with some / and some \ on windows!!
 		result += toRel.setDevice(null).removeFirstSegments(i).toOSString();
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
index c4404f1..10411b2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ public class Site {
 	private boolean updateable = true;
 	private String url;
 	private String linkFile;
-	private Collection features = new HashSet();
-	private List list = new ArrayList();
+	private Collection<Feature> features = new HashSet<Feature>();
+	private List<String> list = new ArrayList<String>();
 
 	public void addFeature(Feature feature) {
 		this.features.add(feature);
@@ -39,7 +39,7 @@ public class Site {
 	}
 
 	public Feature[] getFeatures() {
-		return (Feature[]) features.toArray(new Feature[features.size()]);
+		return features.toArray(new Feature[features.size()]);
 	}
 
 	/*
@@ -50,8 +50,7 @@ public class Site {
 	public Feature getFeature(String id, String version) {
 		if (id == null)
 			return null;
-		for (Iterator iter = features.iterator(); iter.hasNext();) {
-			Feature feature = (Feature) iter.next();
+		for (Feature feature : features) {
 			if (id.equals(feature.getId())) {
 				if (version == null || version.equals(feature.getVersion()))
 					return feature;
@@ -61,8 +60,7 @@ public class Site {
 	}
 
 	public Feature removeFeature(String featureURL) {
-		for (Iterator iter = features.iterator(); iter.hasNext();) {
-			Feature feature = (Feature) iter.next();
+		for (Feature feature : features) {
 			String nextURL = feature.getUrl();
 			if (nextURL != null && nextURL.equals(featureURL))
 				return features.remove(feature) ? feature : null;
@@ -75,13 +73,16 @@ public class Site {
 	}
 
 	public String[] getList() {
-		return (String[]) list.toArray(new String[list.size()]);
+		return list.toArray(new String[list.size()]);
 	}
 
 	public String getPolicy() {
 		return policy;
 	}
 
+	/**
+	 * Note the string that we are returning is an <em>ENCODED</em> URI string.
+	 */
 	public String getUrl() {
 		return url;
 	}
@@ -110,6 +111,9 @@ public class Site {
 		this.updateable = updateable;
 	}
 
+	/**
+	 * Note that the string should be an <em>ENCODED</em> URI string.
+	 */
 	public void setUrl(String url) {
 		this.url = url;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
index 9b86646..192f1d7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
@@ -11,7 +11,6 @@
 package org.eclipse.equinox.internal.p2.update;
 
 import java.io.*;
-import java.util.Iterator;
 import java.util.Map;
 
 /**
@@ -49,18 +48,17 @@ public class XMLWriter extends PrintWriter {
 			super.print('\t');
 	}
 
-	public void printTag(String name, Map parameters) {
+	public void printTag(String name, Map<String, String> parameters) {
 		printTag(name, parameters, true, true);
 	}
 
-	public void printTag(String name, Map parameters, boolean shouldTab, boolean newLine) {
+	public void printTag(String name, Map<String, String> parameters, boolean shouldTab, boolean newLine) {
 		StringBuffer sb = new StringBuffer();
 		sb.append("<"); //$NON-NLS-1$
 		sb.append(name);
 		if (parameters != null)
-			for (Iterator it = parameters.keySet().iterator(); it.hasNext();) {
+			for (String key : parameters.keySet()) {
 				sb.append(" "); //$NON-NLS-1$
-				String key = (String) it.next();
 				sb.append(key);
 				sb.append("=\""); //$NON-NLS-1$
 				sb.append(getEscaped(String.valueOf(parameters.get(key))));
@@ -75,11 +73,11 @@ public class XMLWriter extends PrintWriter {
 			print(sb.toString());
 	}
 
-	public void startTag(String name, Map parameters) {
+	public void startTag(String name, Map<String, String> parameters) {
 		startTag(name, parameters, true);
 	}
 
-	public void startTag(String name, Map parameters, boolean newLine) {
+	public void startTag(String name, Map<String, String> parameters, boolean newLine) {
 		printTag(name, parameters, true, newLine);
 		tab++;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
new file mode 100644
index 0000000..35f14fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+package org.eclipse.equinox.p2.touchpoint.eclipse.query;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+/**
+ * A query matching every {@link IInstallableUnit} that describes an OSGi bundle. 
+ * @since 2.0
+ */
+public final class OSGiBundleQuery extends ExpressionMatchQuery<IInstallableUnit> {
+
+	private static final IMatchExpression<IInstallableUnit> bundleTest = ExpressionUtil.getFactory().matchExpression(ExpressionUtil.parse("providedCapabilities.exists(p | p.namespace == 'osgi.bundle')")); //$NON-NLS-1$
+
+	public OSGiBundleQuery() {
+		super(IInstallableUnit.class, bundleTest);
+	}
+
+	/**
+	 * Test if the {@link IInstallableUnit} describes an OSGi bundle. 
+	 * @param iu the element being tested.
+	 * @return <tt>true</tt> if the parameter describes an OSGi bundle.
+	 */
+	public static boolean isOSGiBundle(IInstallableUnit iu) {
+		return bundleTest.isMatch(iu);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
new file mode 100644
index 0000000..1af2a84
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides query utilities specific to provisioning of OSGi bundles
+<h2>
+Package Specification</h2>
+<p>
+This package specifies API for querying and manipulating provisioning metadata that
+is specific to OSGi bundles or Eclipse-specific constructs such as features.
+<p>
+ at since 2.0
+<p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.classpath
index 7cdeb73..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
index 78523cd..c98f1d5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Aug 16 11:00:59 EDT 2007
+#Tue Dec 22 23:15:07 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -62,7 +62,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -72,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -144,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
index e4a2ea8..98ee2c4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
@@ -1,26 +1,25 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
+Bundle-Version: 1.0.201.qualifier
+Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
+Export-Package: org.eclipse.equinox.internal.p2.touchpoint.natives;x-internal:=true,
+ org.eclipse.equinox.internal.p2.touchpoint.natives.actions;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.location,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.osgi.service.datalocation;version="1.0.0",
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.3.3"
-Eclipse-LazyStart: true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.natives;x-internal:=true,
- org.eclipse.equinox.internal.p2.touchpoint.natives.actions;x-internal:=true
+ org.osgi.framework;version="1.3.0"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/build.properties
index 4bbd9bd..0328daa 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/build.properties
@@ -16,3 +16,5 @@ bin.includes = META-INF/,\
                about.html,\
                plugin.properties
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
index 690324f..2565253 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.5"?>
 <plugin>
 	<extension point="org.eclipse.equinox.p2.engine.touchpoints" id="native" name="Native Touchpoint">
 		<touchpoint 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
new file mode 100644
index 0000000..1d86bdb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
index fab9da9..82a3503 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
@@ -224,7 +224,7 @@ public class BackupStore implements IBackupStore {
 			throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
 		if (file.isDirectory())
 			return backupDirectory(file);
-
+		file = makeParentCanonical(file);
 		File buRoot = backupRoot;
 		// File buRoot = findBackupRoot(file);
 		File buDir = new File(buRoot, backupName);
@@ -269,6 +269,7 @@ public class BackupStore implements IBackupStore {
 	public void backupAll(File file) throws IOException {
 		if (!file.exists())
 			return;
+		file = makeParentCanonical(file);
 		if (file.isDirectory()) {
 			File[] files = file.listFiles();
 			if (files != null)
@@ -287,6 +288,7 @@ public class BackupStore implements IBackupStore {
 	public void backupCopyAll(File file) throws IOException {
 		if (!file.exists())
 			return;
+		file = makeParentCanonical(file);
 		if (file.isDirectory()) {
 			File[] files = file.listFiles();
 			if (files != null)
@@ -331,7 +333,7 @@ public class BackupStore implements IBackupStore {
 			throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
 		if (file.isDirectory())
 			throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_can_not_copy_directory, file.getAbsolutePath()));
-
+		file = makeParentCanonical(file);
 		//File buRoot = backupRoot;
 		// File buRoot = findBackupRoot(file);
 		File buDir = new File(backupRoot, backupName);
@@ -346,7 +348,7 @@ public class BackupStore implements IBackupStore {
 			return false;
 
 		// make sure all of the directories exist / gets created
-		buFile.getParentFile().mkdirs();
+		buFile.getParentFile().getCanonicalFile().mkdirs();
 		if (buFile.getParentFile().exists() && !buFile.getParentFile().isDirectory())
 			throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_file_directory_mismatch, buFile.getParentFile().getAbsolutePath()));
 
@@ -371,6 +373,7 @@ public class BackupStore implements IBackupStore {
 	public boolean backupDirectory(File file) throws IOException {
 		if (!file.isDirectory())
 			throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_not_a_directory, file.getAbsolutePath()));
+		file = makeParentCanonical(file);
 		if (file.list().length != 0)
 			throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_not_empty, file.getAbsolutePath()));
 		// the easiest is to create a dummy file and back that up (the dummy is simply ignored when restoring).
@@ -403,7 +406,7 @@ public class BackupStore implements IBackupStore {
 			throw new ClosedBackupStoreException(Messages.BackupStore_restore_closed_store);
 		// put back all files 
 		// collect things that could not be restored (so final status can be reported)
-		Set unrestorable = new HashSet();
+		Set<File> unrestorable = new HashSet<File>();
 		boolean restored = true;
 		if (!backupRoot.exists()) {
 			logError(NLS.bind(Messages.BackupStore_missing_backup_directory, backupRoot.getAbsolutePath()));
@@ -418,12 +421,12 @@ public class BackupStore implements IBackupStore {
 		closed = true;
 	}
 
-	private void logUnrestorables(Set unrestorable) {
+	private void logUnrestorables(Set<File> unrestorable) {
 		// if there are unrestorable units log them
 		//
 		if (unrestorable != null && unrestorable.size() > 0) {
-			for (Iterator itor = unrestorable.iterator(); itor.hasNext();)
-				logError(NLS.bind(Messages.BackupStore_manual_restore_needed, ((File) itor.next()).getAbsolutePath()));
+			for (File file : unrestorable)
+				logError(NLS.bind(Messages.BackupStore_manual_restore_needed, file.getAbsolutePath()));
 		}
 	}
 
@@ -506,7 +509,7 @@ public class BackupStore implements IBackupStore {
 		return file.delete();
 	}
 
-	private void restore(File root, File buRoot, Set unrestorable) {
+	private void restore(File root, File buRoot, Set<File> unrestorable) {
 		File[] children = buRoot.listFiles();
 		if (children == null) { // error - can't read the backup directory
 			unrestorable.add(buRoot);
@@ -573,7 +576,7 @@ public class BackupStore implements IBackupStore {
 	 * @param buRoot
 	 * @param unrestorable
 	 */
-	private void restoreRoots(File buRoot, Set unrestorable) {
+	private void restoreRoots(File buRoot, Set<File> unrestorable) {
 		File[] children = buRoot.listFiles();
 		if (children == null) { // error - can't read the backup directory
 			unrestorable.add(buRoot);
@@ -705,7 +708,15 @@ public class BackupStore implements IBackupStore {
 		if (idx < 1)
 			throw new InternalError("File is neither absolute nor has a drive name: " + path); //$NON-NLS-1$
 		path = path.substring(0, idx) + path.substring(idx + 1);
+
 		return new File(path);
 	}
 
+	/** 
+	 * The parent path may include ".." as a directory name - this must be made canonical. But if the file itself is
+	 * a symbolic link, it should not be resolved. 
+	 */
+	private File makeParentCanonical(File file) throws IOException {
+		return new File(file.getParentFile().getCanonicalFile(), file.getName());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
index 33db8ff..cd8eef4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
@@ -10,23 +10,49 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.natives;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+import java.io.File;
 import java.io.IOException;
 import java.util.Map;
 import java.util.WeakHashMap;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint;
+import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.Touchpoint;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
 import org.eclipse.osgi.util.NLS;
 
 public class NativeTouchpoint extends Touchpoint {
 
 	public static final String PARM_BACKUP = "backup"; //$NON-NLS-1$
 
-	private static Map backups = new WeakHashMap();
+	public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
 
-	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map touchpointParameters) {
-		touchpointParameters.put(PARM_BACKUP, getBackupStore(profile));
+	public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
+
+	private static Map<IProfile, IBackupStore> backups = new WeakHashMap<IProfile, IBackupStore>();
 
+	public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
+		IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
+		if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
+			try {
+				IFileArtifactRepository downloadCache = Util.getDownloadCacheRepo(agent);
+				File fileLocation = downloadCache.getArtifactFile(artifactKey);
+				if (fileLocation != null && fileLocation.exists())
+					parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
+			} catch (ProvisionException e) {
+				return e.getStatus();
+			}
+		}
+		return Status.OK_STATUS;
+	}
+
+	public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
+		touchpointParameters.put(PARM_BACKUP, getBackupStore(profile));
 		return null;
 	}
 
@@ -103,7 +129,7 @@ public class NativeTouchpoint extends Touchpoint {
 	 * @return a lazily initialized backup store
 	 */
 	private static synchronized IBackupStore getBackupStore(IProfile profile) {
-		IBackupStore store = (IBackupStore) backups.get(profile);
+		IBackupStore store = backups.get(profile);
 		if (store == null) {
 			store = new LazyBackupStore(escape(profile.getProfileId()));
 			backups.put(profile, store);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
index b9f7972..60c1c0a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
@@ -17,12 +17,10 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.location.AgentLocation;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.*;
 import org.eclipse.osgi.util.NLS;
 
 public class Util {
@@ -39,19 +37,19 @@ public class Util {
 		return profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
 	}
 
-	private static AgentLocation getAgentLocation() {
-		return (AgentLocation) ServiceHelper.getService(Activator.getContext(), AgentLocation.class.getName());
+	private static IAgentLocation getAgentLocation(IProvisioningAgent agent) {
+		return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
 	}
 
-	public static IArtifactRepositoryManager getArtifactRepositoryManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(Activator.getContext(), IArtifactRepositoryManager.class.getName());
+	public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
+		return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
 	}
 
-	public static IFileArtifactRepository getDownloadCacheRepo() throws ProvisionException {
-		URI location = getDownloadCacheLocation();
+	public static IFileArtifactRepository getDownloadCacheRepo(IProvisioningAgent agent) throws ProvisionException {
+		URI location = getDownloadCacheLocation(agent);
 		if (location == null)
 			throw new IllegalStateException(Messages.could_not_obtain_download_cache);
-		IArtifactRepositoryManager manager = getArtifactRepositoryManager();
+		IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
 		if (manager == null)
 			throw new IllegalStateException(Messages.artifact_repo_not_found);
 		IArtifactRepository repository;
@@ -60,7 +58,7 @@ public class Util {
 		} catch (ProvisionException e) {
 			// the download cache doesn't exist or couldn't be read. Create new cache.
 			String repositoryName = location + " - Agent download cache"; //$NON-NLS-1$
-			Map properties = new HashMap(1);
+			Map<String, String> properties = new HashMap<String, String>(1);
 			properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
 			repository = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
 		}
@@ -71,9 +69,11 @@ public class Util {
 		return downloadCache;
 	}
 
-	static private URI getDownloadCacheLocation() {
-		AgentLocation location = getAgentLocation();
-		return (location != null ? location.getArtifactRepositoryURI() : null);
+	static private URI getDownloadCacheLocation(IProvisioningAgent agent) {
+		IAgentLocation location = getAgentLocation(agent);
+		if (location == null)
+			return null;
+		return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 	/**
@@ -106,7 +106,7 @@ public class Util {
 			in.close();
 			throw new IOException(Messages.Util_Invalid_Zip_File_Format);
 		}
-		ArrayList unzippedFiles = new ArrayList();
+		ArrayList<File> unzippedFiles = new ArrayList<File>();
 		do {
 			File outFile = new File(outputDir, ze.getName());
 			unzippedFiles.add(outFile);
@@ -133,7 +133,7 @@ public class Util {
 		} while ((ze = in.getNextEntry()) != null);
 		in.close();
 
-		return (File[]) unzippedFiles.toArray(new File[unzippedFiles.size()]);
+		return unzippedFiles.toArray(new File[unzippedFiles.size()]);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
index 146aa6e..a3357eb 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
@@ -12,6 +12,7 @@ package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
 
 public class ActionConstants {
 
+	public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
 	public static final String PARM_PATH = "path"; //$NON-NLS-1$
 	public static final String PARM_TARGET_FILE = "targetFile"; //$NON-NLS-1$
 	public static final String PARM_PERMISSIONS = "permissions"; //$NON-NLS-1$
@@ -20,9 +21,8 @@ public class ActionConstants {
 	public static final String PARM_SOURCE = "source"; //$NON-NLS-1$
 	public static final String PARM_IU = "iu"; //$NON-NLS-1$
 	public static final String PIPE = "|"; //$NON-NLS-1$
-	public static final String PARM_ARTIFACT = "@artifact"; //$NON-NLS-1$
+	public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
 	public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
-	public static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
 	public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
 	public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
 	public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
index c08a761..5de59d2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
@@ -18,13 +18,14 @@ import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class ChmodAction extends ProvisioningAction {
 	private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
+	private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
 		if (targetDir == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
@@ -43,7 +44,7 @@ public class ChmodAction extends ProvisioningAction {
 
 		String options[] = null;
 		if (optionsString != null) {
-			ArrayList collect = new ArrayList();
+			ArrayList<String> collect = new ArrayList<String>();
 			String r = optionsString.trim();
 			while (r.length() > 0) {
 				int spaceIdx = r.indexOf(' ');
@@ -66,12 +67,14 @@ public class ChmodAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		//TODO: implement undo ??
 		return Status.OK_STATUS;
 	}
 
 	public void chmod(String targetDir, String targetFile, String perms, String[] options) {
+		if (WINDOWS)
+			return;
 		Runtime r = Runtime.getRuntime();
 		try {
 			// Note: 3 is from chmod, permissions, and target
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
index 862c529..b394f0a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
@@ -16,20 +16,20 @@ import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class CleanupcopyAction extends ProvisioningAction {
 
 	public static final String ACTION_CLEANUPCOPY = "cleanupcopy"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return cleanupcopy(parameters, true);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return CopyAction.copy(parameters, false);
 	}
 
@@ -39,7 +39,7 @@ public class CleanupcopyAction extends ProvisioningAction {
 	 * @param restoreable flag indicating if the operation should be backed up
 	 * @return status
 	 */
-	public static IStatus cleanupcopy(Map parameters, boolean restoreable) {
+	public static IStatus cleanupcopy(Map<String, Object> parameters, boolean restoreable) {
 		String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
 		if (source == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPCOPY));
@@ -57,7 +57,7 @@ public class CleanupcopyAction extends ProvisioningAction {
 			return Status.OK_STATUS;
 
 		StringTokenizer tokenizer = new StringTokenizer(copied, ActionConstants.PIPE);
-		List directories = new ArrayList();
+		List<File> directories = new ArrayList<File>();
 		while (tokenizer.hasMoreTokens()) {
 			String fileName = tokenizer.nextToken();
 			File file = new File(fileName);
@@ -80,8 +80,7 @@ public class CleanupcopyAction extends ProvisioningAction {
 			}
 		}
 
-		for (Iterator it = directories.iterator(); it.hasNext();) {
-			File directory = (File) it.next();
+		for (File directory : directories) {
 			File[] children = directory.listFiles();
 			if (children == null)
 				return Util.createError(NLS.bind(Messages.Error_list_children_0, directory));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
index c5938e7..7ef7d54 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
@@ -17,8 +17,8 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.engine.Profile;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class CleanupzipAction extends ProvisioningAction {
@@ -26,15 +26,15 @@ public class CleanupzipAction extends ProvisioningAction {
 	private static final String UNZIPPED = "unzipped"; //$NON-NLS-1$
 	public static final String ACTION_CLEANUPZIP = "cleanupzip"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return cleanupzip(parameters, true);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return UnzipAction.unzip(parameters, false);
 	}
 
-	public static IStatus cleanupzip(Map parameters, boolean restoreable) {
+	public static IStatus cleanupzip(Map<String, Object> parameters, boolean restoreable) {
 		String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
 		if (source == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPZIP));
@@ -51,15 +51,14 @@ public class CleanupzipAction extends ProvisioningAction {
 		if (unzipped == null) {
 			// best effort
 			// we try to substitute the current target with what was written.
-			Map iuProperties = profile.getInstallableUnitProperties(iu);
+			Map<String, String> iuProperties = profile.getInstallableUnitProperties(iu);
 			String sourcePrefix = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE;
-			for (Iterator iterator = iuProperties.keySet().iterator(); iterator.hasNext();) {
-				String key = (String) iterator.next();
+			for (String key : iuProperties.keySet()) {
 				if (key.startsWith(sourcePrefix)) {
 					if (unzipped == null) {
 						iuPropertyKey = key;
 						String storedTarget = key.substring(sourcePrefix.length());
-						unzipped = substituteTarget(storedTarget, target, (String) iuProperties.get(key));
+						unzipped = substituteTarget(storedTarget, target, iuProperties.get(key));
 					} else
 						return Status.OK_STATUS; // possible two unzips of this source - give up on best effort
 				}
@@ -71,7 +70,7 @@ public class CleanupzipAction extends ProvisioningAction {
 
 		IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
 		StringTokenizer tokenizer = new StringTokenizer(unzipped, ActionConstants.PIPE);
-		List directories = new ArrayList();
+		List<File> directories = new ArrayList<File>();
 		while (tokenizer.hasMoreTokens()) {
 			String fileName = tokenizer.nextToken();
 			File file = new File(fileName);
@@ -91,15 +90,30 @@ public class CleanupzipAction extends ProvisioningAction {
 					file.delete();
 			}
 		}
-		// TODO: this will most likely leave garbage behind as directories must
-		// be empty to be deleted - there is not guarantee that this structure has
-		// the leafs first in the list of directories.
-		// Since backup will deny backup of non empty directory a check must be made
-		// 
-		for (Iterator it = directories.iterator(); it.hasNext();) {
-			File directory = (File) it.next();
+		// sort directories by path length longest path is in top
+		// this will make sure that a sub folder will be removed before its parent
+		Collections.sort(directories, new Comparator<File>() {
+
+			public int compare(File f1, File f2) {
+				if (f1 == f2)
+					return 0;
+				if (f1 != null && f2 == null)
+					return -1;
+				if (f1 == null)
+					return 1;
+				try {
+					return Integer.valueOf(f2.getCanonicalPath().length()).compareTo(f1.getCanonicalPath().length());
+				} catch (IOException e) {
+					// did our best. try an absolute path compare
+					return Integer.valueOf(f2.getAbsolutePath().length()).compareTo(f1.getAbsolutePath().length());
+				}
+			}
+
+		});
+		for (File directory : directories) {
 			if (store != null) {
 				File[] children = directory.listFiles();
+				// Since backup will deny backup of non empty directory a check must be made
 				if (children == null || children.length == 0)
 					try {
 						store.backupDirectory(directory);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
index 6fbf20b..21c3cf1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
@@ -15,23 +15,27 @@ import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRequest;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
 
 public class CollectAction extends ProvisioningAction {
 
 	public static final String ACTION_COLLECT = "collect"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-		InstallableUnitOperand operand = (InstallableUnitOperand) parameters.get(ActionConstants.PARM_OPERAND);
+		IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
+		IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
 		try {
-			IArtifactRequest[] requests = collect(operand.second(), profile);
-			Collection artifactRequests = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
+			IArtifactRequest[] requests = collect(agent, iu, profile);
+			@SuppressWarnings("unchecked")
+			Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
 			artifactRequests.add(requests);
 		} catch (ProvisionException e) {
 			return e.getStatus();
@@ -39,21 +43,21 @@ public class CollectAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		// nothing to do for now
 		return Status.OK_STATUS;
 	}
 
-	IArtifactRequest[] collect(IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
-		IArtifactKey[] toDownload = installableUnit.getArtifacts();
+	IArtifactRequest[] collect(IProvisioningAgent agent, IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
+		Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
 		if (toDownload == null)
 			return new IArtifactRequest[0];
-		IArtifactRepository destination = Util.getDownloadCacheRepo();
-		IArtifactRequest[] requests = new IArtifactRequest[toDownload.length];
+		IArtifactRepository destination = Util.getDownloadCacheRepo(agent);
+		IArtifactRequest[] requests = new IArtifactRequest[toDownload.size()];
 		int count = 0;
-		for (int i = 0; i < toDownload.length; i++) {
+		for (IArtifactKey key : toDownload) {
 			//TODO Here there are cases where the download is not necessary again because what needs to be done is just a configuration step
-			requests[count++] = Util.getArtifactRepositoryManager().createMirrorRequest(toDownload[i], destination, null, null);
+			requests[count++] = Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, destination, null, null);
 		}
 
 		if (requests.length == count)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
index c94c668..d9dab3c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
 
+import java.io.File;
+
 import java.io.*;
 import java.util.ArrayList;
 import java.util.Map;
@@ -17,11 +19,9 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.engine.Profile;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -35,7 +35,7 @@ import org.eclipse.osgi.util.NLS;
 public class CopyAction extends ProvisioningAction {
 	public static final String ID = "cp"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return copy(parameters, true);
 	}
 
@@ -45,7 +45,7 @@ public class CopyAction extends ProvisioningAction {
 	 * @param restoreable  flag indicating if the operation should be backed up
 	 * @return status
 	 */
-	public static IStatus copy(Map parameters, boolean restoreable) {
+	public static IStatus copy(Map<String, Object> parameters, boolean restoreable) {
 		String target = (String) parameters.get(ActionConstants.PARM_COPY_TARGET);
 		IBackupStore backupStore = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
 
@@ -61,23 +61,13 @@ public class CopyAction extends ProvisioningAction {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
 
 		String originalSource = source;
-		if (source.equals(ActionConstants.PARM_ARTIFACT)) {
-			//TODO: fix wherever this occurs -- investigate as this is probably not desired
-			if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
-				return Status.OK_STATUS;
-
-			IArtifactKey artifactKey = iu.getArtifacts()[0];
-
-			IFileArtifactRepository downloadCache;
-			try {
-				downloadCache = Util.getDownloadCacheRepo();
-			} catch (ProvisionException e) {
-				return e.getStatus();
-			}
-			File fileLocation = downloadCache.getArtifactFile(artifactKey);
-			if ((fileLocation == null) || !fileLocation.exists())
+		if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
+			String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
+			if (artifactLocation == null) {
+				IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
 				return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
-			source = fileLocation.getAbsolutePath();
+			}
+			source = artifactLocation;
 		}
 
 		File sourceFile = new File(source);
@@ -98,7 +88,7 @@ public class CopyAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return CleanupcopyAction.cleanupcopy(parameters, false);
 	}
 
@@ -110,9 +100,9 @@ public class CopyAction extends ProvisioningAction {
 	 * @throws IOException
 	 */
 	private static File[] mergeCopy(File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
-		ArrayList copiedFiles = new ArrayList();
+		ArrayList<File> copiedFiles = new ArrayList<File>();
 		xcopy(copiedFiles, source, target, overwrite, backupStore);
-		return (File[]) copiedFiles.toArray(new File[copiedFiles.size()]);
+		return copiedFiles.toArray(new File[copiedFiles.size()]);
 	}
 
 	/**
@@ -123,7 +113,7 @@ public class CopyAction extends ProvisioningAction {
 	 * @param overwrite
 	 * @throws IOException
 	 */
-	private static void xcopy(ArrayList copiedFiles, File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
+	private static void xcopy(ArrayList<File> copiedFiles, File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
 		if (!source.exists())
 			throw new IOException("Source: " + source + "does not exists"); //$NON-NLS-1$//$NON-NLS-2$
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
index b34903c..a27777c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
@@ -14,13 +14,14 @@ import java.io.*;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class LinkAction extends ProvisioningAction {
 	public static final String ID = "ln"; //$NON-NLS-1$
+	private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
 		if (targetDir == null)
 			return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ID), null);
@@ -45,7 +46,9 @@ public class LinkAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
+		if (WINDOWS)
+			return Status.OK_STATUS;
 		String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
 		String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
 
@@ -68,6 +71,8 @@ public class LinkAction extends ProvisioningAction {
 	 * @throws IOException if backup of existing file fails
 	 */
 	private void ln(String targetDir, String linkTarget, String linkName, boolean force, IBackupStore store) throws IOException {
+		if (WINDOWS)
+			return;
 		// backup a file that would be overwritten using "force == true"
 		if (force && store != null) {
 			File xFile = new File(targetDir, linkName);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
index ce60b52..bea5668 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
@@ -16,13 +16,13 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class MkdirAction extends ProvisioningAction {
 	public static final String ID = "mkdir"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String path = (String) parameters.get(ActionConstants.PARM_PATH);
 		if (path == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
@@ -35,7 +35,7 @@ public class MkdirAction extends ProvisioningAction {
 		return Util.createError(NLS.bind(Messages.mkdir_failed, path, ID));
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		String path = (String) parameters.get(ActionConstants.PARM_PATH);
 		if (path == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
index ab442c4..c820a9b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
@@ -10,21 +10,19 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
 
-import org.eclipse.equinox.internal.p2.touchpoint.natives.IBackupStore;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class RemoveAction extends ProvisioningAction {
 	public static final String ID = "remove"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String path = (String) parameters.get(ActionConstants.PARM_PATH);
 		if (path == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
@@ -43,7 +41,7 @@ public class RemoveAction extends ProvisioningAction {
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		// Does not have to do anything as the backup will restore what was deleted
 		return Status.OK_STATUS;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
index 26ea046..d333b6e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2011 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,13 +16,13 @@ import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
 import org.eclipse.osgi.util.NLS;
 
 public class RmdirAction extends ProvisioningAction {
 	public static final String ID = "rmdir"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		String path = (String) parameters.get(ActionConstants.PARM_PATH);
 		if (path == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
@@ -36,20 +36,18 @@ public class RmdirAction extends ProvisioningAction {
 			try {
 				store.backupDirectory(dir);
 			} catch (IOException e) {
-				return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, path, ID), e);
+				// Only return a warning here, not an error. See Bug 331609 for more detail.
+				return new Status(IStatus.WARNING, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, path, ID), e);
 			} catch (IllegalArgumentException e) {
 				// Ignore the delete/backup if the directory was not empty as this preserves the
-				// the original semantics.
-				// See Bug 272312 for more detail.
-				// return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, ActionConstants.PARM_PATH, ID), e);
-				//
+				// the original semantics. See Bug 272312 for more detail.
 			}
 		else
 			dir.delete();
 		return Status.OK_STATUS;
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		String path = (String) parameters.get(ActionConstants.PARM_PATH);
 		IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
 		if (path == null)
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
index f255bf4..1081616 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
@@ -16,22 +16,20 @@ import java.util.Map;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.engine.Profile;
 import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.util.NLS;
 
 public class UnzipAction extends ProvisioningAction {
 
 	public static final String ACTION_UNZIP = "unzip"; //$NON-NLS-1$
 
-	public IStatus execute(Map parameters) {
+	public IStatus execute(Map<String, Object> parameters) {
 		return unzip(parameters, true);
 	}
 
-	public IStatus undo(Map parameters) {
+	public IStatus undo(Map<String, Object> parameters) {
 		return CleanupzipAction.cleanupzip(parameters, false);
 	}
 
@@ -42,7 +40,7 @@ public class UnzipAction extends ProvisioningAction {
 	 * @param restoreable - if the unzip should be backed up
 	 * @return status
 	 */
-	public static IStatus unzip(Map parameters, boolean restoreable) {
+	public static IStatus unzip(Map<String, Object> parameters, boolean restoreable) {
 		String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
 		if (source == null)
 			return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_UNZIP));
@@ -55,23 +53,13 @@ public class UnzipAction extends ProvisioningAction {
 		IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
 		Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
 
-		if (source.equals(ActionConstants.PARM_ARTIFACT)) {
-			//TODO: fix wherever this occurs -- investigate as this is probably not desired
-			if (iu.getArtifacts() == null || iu.getArtifacts().length == 0)
-				return Status.OK_STATUS;
-
-			IArtifactKey artifactKey = iu.getArtifacts()[0];
-
-			IFileArtifactRepository downloadCache;
-			try {
-				downloadCache = Util.getDownloadCacheRepo();
-			} catch (ProvisionException e) {
-				return e.getStatus();
-			}
-			File fileLocation = downloadCache.getArtifactFile(artifactKey);
-			if ((fileLocation == null) || !fileLocation.exists())
+		if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
+			String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
+			if (artifactLocation == null) {
+				IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
 				return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
-			source = fileLocation.getAbsolutePath();
+			}
+			source = artifactLocation;
 		}
 		IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
 		File[] unzippedFiles = unzip(source, target, store);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
index 6ea0cd7..4474697 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/META-INF/MANIFEST.MF
@@ -4,11 +4,11 @@ Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin.rcp; singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.101.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.rcp.Activator
 Bundle-RequiredExecutionEnvironment: J2SE-1.4,
  CDC-1.1/Foundation-1.1
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.equinox.internal.p2.ui.admin.rcp;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
index e334798..20af335 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/ProvAdminUI.launch
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
 <booleanAttribute key="append.args" value="true"/>
 <booleanAttribute key="automaticAdd" value="false"/>
@@ -14,293 +14,294 @@
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consolelog -product org.eclipse.equinox.p2.ui.admin.rcp.product"/>
 <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.p2.profile=SDKProfile -Declipse.p2.data.area=file:/Applications/eclipse/p2/"/>
 <stringAttribute key="pde.version" value="3.3"/>
 <booleanAttribute key="restart" value="false"/>
 <stringAttribute key="selectedPlugin" value="org.eclipse.equinox.p2.core"/>
 <booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.ant.core at default:default,org.eclipse.help at default:default,org.eclipse.osgi.services at default:default,org.eclipse.core.jobs at default:default,org.eclipse.core.net at default:default,com.ibm.icu at default:default,org.eclipse.ui.cocoa at default:false,org.eclipse.equinox.security at default:default,org.eclipse.core.databinding.property at default:default,org.eclipse.ui.workbench at default:default,org.eclipse.core.runtime at default:true,org.eclipse.swt.cocoa.macosx at default:false,org.eclipse.core.contenttype at default:default,org.eclipse.jface at default:default,org.eclipse.core.variables at default:default,org.eclipse.equinox.common at 2:true,org.eclipse.osgi@:,org.eclipse.swt at default:default,org.eclipse.core.databinding at default:default,org.eclipse.equinox.security.macosx at default:false,org.eclipse.jface.databinding at default:default,org.eclipse.equinox.app at default:default,org.eclipse.equinox.security.ui at default:default,org.eclipse.core.databinding.observable at default:default,org.eclipse.ui at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.core.runtime.compatibility.registry at default:false,org.eclipse.core.expressions at default:default,org.eclipse.equinox.preferences at default:default,org.eclipse.core.commands at default:default"/>
+<stringAttribute key="target_bundles" value="org.eclipse.equinox.ds at 1:true,org.eclipse.core.jobs at default:default,org.eclipse.ecf.filetransfer at default:default,org.eclipse.core.filesystem.macosx at default:false,org.eclipse.equinox.preferences at default:default,org.eclipse.equinox.registry at default:default,org.eclipse.core.runtime at default:true,org.eclipse.core.filesystem at default:default,org.eclipse.compare.core at default:default,org.eclipse.core.runtime.compatibility.registry at default:false,org.eclipse.ui.views at default:default,org.eclipse.ui.forms at default:default,org.eclipse.text at default:default,org.eclipse.jface.databinding at default:default,org.eclipse.core.databinding at default:default,org.sat4j.pb at default:default,org.eclipse.swt at default:default,org.eclipse.core.resources at default:default,org.eclipse.ui.cocoa at default:false,org.eclipse.ant.core at default:default,org.eclipse.ui.editors at default:default,org.eclipse.ui.workbench at default:default,org.eclipse.equinox.common at 2:true,org.eclipse.ui at default:default,org.eclipse.help at default:default,org.eclipse.equinox.security.ui at default:default,org.eclipse.core.commands at default:default,org.eclipse.core.contenttype at default:default,org.sat4j.core at default:default,org.eclipse.equinox.security.macosx at default:false,org.eclipse.ecf at default:default,org.eclipse.equinox.security at default:default,org.eclipse.core.databinding.observable at default:default,org.eclipse.equinox.util at default:default,org.apache.commons.logging at default:default,org.eclipse.osgi.services at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.ui.workbench.texteditor at default:default,org.eclipse.core.variables at default:default,org.eclipse.swt.cocoa.macosx.x86_64 at default:false,com.ibm.icu at default:default,org.eclipse.osgi at -1:true,org.eclipse.jface at default:default,org.eclipse.compare at default:default,org.eclipse.core.databinding.property at default:default,org.eclipse.jface.text at default:default,org.eclipse.ecf.ssl at default:false,org.eclipse.ecf.provider.filetransfer.ssl at default:false,org.eclipse.equinox.app at default:default,org.eclipse.core.expressions at default:default,org.eclipse.core.filebuffers at default:default,org.eclipse.core.net at default:default,org.eclipse.ui.ide at default:default,org.eclipse.ecf.provider.filetransfer at default:default,org.apache.commons.codec at default:default,org.apache.commons.httpclient at default:default"/>
 <booleanAttribute key="tracing" value="true"/>
 <mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
-<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug" value="true"/>
 <mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/core/parseproblems" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.ecf/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
-<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
-<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
-<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
 <mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/checkConditions" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
-<mapEntry key="org.eclipse.ecf/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
+<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
 <mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
-<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/filter" value="*"/>
-<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
+<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
+<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
+<mapEntry key="org.eclipse.ui/debug" value="false"/>
 <mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
 <mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
-<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
-<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
-<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
+<mapEntry key="org.eclipse.team.core/threading" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
+<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
 <mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
-<mapEntry key="org.eclipse.help/debug/context" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
-<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
-<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
-<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFileMaps" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
+<mapEntry key="org.eclipse.ecf.identity/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
+<mapEntry key="org.eclipse.ecf.identity/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
 <mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/metadata/parsing" value="true"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
 <mapEntry key="org.eclipse.pde.build/debug" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
-<mapEntry key="org.eclipse.help.base/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/artifacts/mirrors" value="true"/>
-<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/throwing" value="false"/>
 <mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
-<mapEntry key="org.eclipse.ui/trace/sources" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
-<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
-<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
-<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/completion" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/indexmanager" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
-<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
-<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
 <mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
-<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
+<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
+<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
+<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
 <mapEntry key="org.eclipse.jdt.ui/debug/ASTProvider" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
-<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
-<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
-<mapEntry key="org.eclipse.help/debug/search" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
+<mapEntry key="org.eclipse.osgi/debug" value="false"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
+<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
+<mapEntry key="org.eclipse.ecf/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.help.base/debug" value="true"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
 <mapEntry key="org.eclipse.ecf.identity/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
-<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
-<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
-<mapEntry key="org.eclipse.team.core/streams" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
+<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPartReference" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/job.stale" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
+<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
+<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
+<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
 <mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
-<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
+<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug/flag" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
 <mapEntry key="org.eclipse.jdt.apt.core/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.garbagecollector/debug" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug/flag" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
 <mapEntry key="org.eclipse.jdt.core/debug/javamodel/cache" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/reconcile" value="1000"/>
-<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/workingSets" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug/filter" value="*"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/logfilename" value=""/>
 <mapEntry key="org.eclipse.team.core/backgroundevents" value="false"/>
-<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
-<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/exceptions/throwing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPageListener" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/engine/installregistry" value="true"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/artifacts/mirrors" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/part.activate" value="200"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug" value="true"/>
 <mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/generator/parsing" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
-<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/timing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
+<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
+<mapEntry key="org.eclipse.core.resources/history" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
+<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
 <mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
-<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
-<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
-<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
-<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
+<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
 <mapEntry key="org.eclipse.osgi/debug/bundleTime" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
-<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
-<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/flag" value="true"/>
-<mapEntry key="org.eclipse.ui/debug/swtdebugglobal" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.equinox.p2.core/debug" value="true"/>
-<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
-<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/methods/entering" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.ecf.identity/debug" value="true"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/uses" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/workbench.start" value="45000"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
+<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
 <mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
+<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/markers" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.garbagecollector/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/generator/parsing" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
 <mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
-<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
+<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
+<mapEntry key="org.eclipse.ui.intro/flags/noBrowser" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.init" value="800"/>
 <mapEntry key="org.eclipse.core.contenttype/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/imports" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logPerformance" value="false"/>
+<mapEntry key="org.eclipse.help/debug/context" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
 <mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/generatedFiles" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/swtdebug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
+<mapEntry key="org.eclipse.team.core/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
+<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
+<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
+<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/engine/installregistry" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/model" value="false"/>
+<mapEntry key="org.eclipse.equinox.registry/debug" value="false"/>
+<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
+<mapEntry key="org.eclipse.ecf.identity/debug/exceptions/catching" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
+<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
+<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.ui/debug/TypeConstraints" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/messageBundles" value="false"/>
 <mapEntry key="org.eclipse.core.resources/build/invoking" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/operations" value="false"/>
-<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta/verbose" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/contributions" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
+<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/metadata/parsing" value="true"/>
+<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
+<mapEntry key="org.eclipse.help/debug/search" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
+<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
+<mapEntry key="org.eclipse.team.core/streams" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
 <mapEntry key="org.eclipse.jdt.ui/perf/explorer/RefactorActionGroup" value="150"/>
-<mapEntry key="org.eclipse.core.resources/history" value="false"/>
-<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text/debug/AbstractInformationControlManager" value="false"/>
-<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
-<mapEntry key="org.eclipse.help/debug" value="true"/>
-<mapEntry key="org.eclipse.jface.text.source/debug/RevisionRulerColumn" value="false"/>
-<mapEntry key="org.eclipse.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
 <mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
-<mapEntry key="org.eclipse.ecf.filetransfer/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ecf/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.core/debug/compilationEnv" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
+<mapEntry key="org.eclipse.ecf.identity/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/contentProvider" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/services" value="false"/>
+<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
+<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
+<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
 <mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
+<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
+<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
+<mapEntry key="org.eclipse.help/debug" value="true"/>
+<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
+<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
+<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
+<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
+<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
+<mapEntry key="org.eclipse.jdt.apt.pluggable.core/debug" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
+<mapEntry key="org.eclipse.ecf.filetransfer/debug/filter" value="*"/>
+<mapEntry key="org.eclipse.osgi/monitor/resources" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.control" value="800"/>
+<mapEntry key="org.eclipse.ui/perf/uijob" value="200"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener2" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/delta" value="false"/>
+<mapEntry key="org.eclipse.equinox.p2.core/core/parseproblems" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/interrupt" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/preferences/plugin" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
+<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
 <mapEntry key="org.eclipse.help.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
-<mapEntry key="org.eclipse.ecf/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
-<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
+<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
+<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
 </mapAttribute>
 <booleanAttribute key="useDefaultConfigArea" value="true"/>
 <booleanAttribute key="useNamedJRE" value="false"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator at 3:true,org.eclipse.equinox.p2.publisher at default:default,org.eclipse.equinox.p2.garbagecollector at default:default,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl at default:false,org.eclipse.ecf.provider.filetransfer at default:default,org.eclipse.equinox.p2.ui at default:default,org.eclipse.ecf at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.simpleconfigurator at 1:true,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.frameworkadmin.equinox at 2:default,org.eclipse.ecf.provider.filetransfer.ssl at default:false,org.apache.commons.logging at default:default,org.eclipse.equinox.p2.ui.admin.rcp at default:default,org.eclipse.equinox.p2.updatechecker at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.p2.metadata.generator at default:default,org.eclipse.equinox.p2.updatesite at default:default,org.eclipse.equinox.frameworkadmin at 2:true,org.eclipse.ecf.filetransfer at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.equinox.p2.exemplarysetup at default:default,org.eclipse.equinox.p2.ui.admin at default:default,org.eclipse.ecf.ssl at default:false,org.apache.commons.httpclient at default:default,org.sat4j.pb at default:default,org.eclipse.ecf.provider.filetransfer.httpclient at default:default,org.apache.commons.codec at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.ecf.identity at default:default,org.eclipse.equinox.p2.engine at default:default,org.sat4j.core at default:default"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.engine at default:default,org.eclipse.equinox.p2.metadata.repository at default:default,org.eclipse.equinox.p2.touchpoint.natives at default:default,org.eclipse.equinox.p2.artifact.optimizers at default:default,org.eclipse.equinox.p2.garbagecollector at default:default,ie.wombat.jbdiff at default:default,org.eclipse.equinox.p2.ql at default:default,org.eclipse.equinox.p2.artifact.repository at default:default,org.eclipse.equinox.p2.metadata.generator at default:default,org.eclipse.equinox.p2.director at default:default,org.eclipse.equinox.p2.touchpoint.eclipse at default:default,org.eclipse.equinox.p2.updatechecker at default:default,org.eclipse.equinox.simpleconfigurator at 1:true,org.eclipse.equinox.p2.ui.admin at default:default,org.eclipse.equinox.frameworkadmin.equinox at 2:default,org.eclipse.equinox.p2.repository at default:default,org.eclipse.equinox.simpleconfigurator.manipulator at 3:true,org.eclipse.equinox.p2.jarprocessor at default:default,org.eclipse.equinox.p2.artifact.processors at default:default,org.eclipse.equinox.p2.publisher at default:default,org.eclipse.equinox.p2.core at default:default,org.eclipse.equinox.p2.ui.admin.rcp at default:default,org.eclipse.equinox.p2.sar at default:default,org.eclipse.equinox.p2.updatesite at default:default,org.eclipse.equinox.p2.operations at default:default,org.eclipse.equinox.frameworkadmin at 2:true,org.eclipse.equinox.p2.metadata at default:default,org.eclipse.equinox.p2.ui at default:default"/>
 </launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/config.ini b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
index a709baf..7126f90 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/config.ini
@@ -24,7 +24,6 @@ osgi.bundles=\
 	org.eclipse.equinox.p2.director,\
 	org.eclipse.equinox.p2.download,\
 	org.eclipse.equinox.p2.engine,\
-	org.eclipse.equinox.p2.exemplarysetup at start,\
 	org.eclipse.equinox.p2.metadata,\
 	org.eclipse.equinox.p2.metadata.repository,\
 	org.eclipse.equinox.p2.touchpoint.eclipse,\
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties
index c02f327..f90be3c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/plugin.properties
@@ -18,4 +18,4 @@ appName=Eclipse Provisioning Admin UI
 perspectiveName=Eclipse Provisioning
 Views.Progress=Progress View
 aboutText= Eclipse Provisioning Admin UI \n\n\
-(c) Copyright Eclipse contributors and others 2007-2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2007-2009.  All rights reserved.\n
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
new file mode 100644
index 0000000..a2ffba8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui.admin.rcp</artifactId>
+  <version>1.0.100.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
index 0b3fdfb..4bea2a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/rcp.product
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="%productName" id="org.eclipse.equinox.p2.ui.admin.rcp.product" application="org.eclipse.equinox.p2.ui.admin.rcp.application" version="1.0.1. at qualifier@" useFeatures="false" includeLaunchers="true">
+<product name="%productName" id="org.eclipse.equinox.p2.ui.admin.rcp.product" application="org.eclipse.equinox.p2.ui.admin.rcp.application" version="1.1.0. at qualifier@" useFeatures="false" includeLaunchers="true">
 
    <aboutInfo>
       <text>
@@ -9,13 +9,6 @@
       </text>
    </aboutInfo>
 
-   <configIni use="default">
-      <linux>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</linux>
-      <macosx>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</macosx>
-      <solaris>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</solaris>
-      <win32>/org.eclipse.equinox.p2.ui.admin.rcp/config.ini</win32>
-   </configIni>
-
    <launcherArgs>
       <vmArgs>-Xms40m
 -Xmx256m</vmArgs>
@@ -138,13 +131,25 @@ Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in t
 
    <plugins>
       <plugin id="com.ibm.icu"/>
+      <plugin id="org.apache.commons.codec"/>
       <plugin id="org.apache.commons.httpclient"/>
+      <plugin id="org.apache.commons.logging"/>
+      <plugin id="org.eclipse.compare"/>
+      <plugin id="org.eclipse.compare.core"/>
       <plugin id="org.eclipse.core.commands"/>
       <plugin id="org.eclipse.core.contenttype"/>
       <plugin id="org.eclipse.core.databinding"/>
+      <plugin id="org.eclipse.core.databinding.observable"/>
+      <plugin id="org.eclipse.core.databinding.property"/>
       <plugin id="org.eclipse.core.expressions"/>
+      <plugin id="org.eclipse.core.filebuffers"/>
+      <plugin id="org.eclipse.core.filesystem"/>
+      <plugin id="org.eclipse.core.filesystem.linux.x86" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
+      <plugin id="org.eclipse.core.filesystem.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.core.jobs"/>
       <plugin id="org.eclipse.core.net"/>
+      <plugin id="org.eclipse.core.resources"/>
       <plugin id="org.eclipse.core.runtime"/>
       <plugin id="org.eclipse.ecf"/>
       <plugin id="org.eclipse.ecf.filetransfer"/>
@@ -156,6 +161,7 @@ Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in t
       <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
       <plugin id="org.eclipse.equinox.app"/>
       <plugin id="org.eclipse.equinox.common"/>
+      <plugin id="org.eclipse.equinox.ds"/>
       <plugin id="org.eclipse.equinox.frameworkadmin"/>
       <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
       <plugin id="org.eclipse.equinox.launcher"/>
@@ -166,35 +172,61 @@ Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in t
       <plugin id="org.eclipse.equinox.p2.console"/>
       <plugin id="org.eclipse.equinox.p2.core"/>
       <plugin id="org.eclipse.equinox.p2.director"/>
+      <plugin id="org.eclipse.equinox.p2.director.app"/>
       <plugin id="org.eclipse.equinox.p2.engine"/>
-      <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
+      <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
       <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
       <plugin id="org.eclipse.equinox.p2.metadata"/>
       <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
+      <plugin id="org.eclipse.equinox.p2.operations"/>
+      <plugin id="org.eclipse.equinox.p2.publisher"/>
+      <plugin id="org.eclipse.equinox.p2.ql"/>
+      <plugin id="org.eclipse.equinox.p2.repository"/>
+      <plugin id="org.eclipse.equinox.p2.repository.tools"/>
       <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
       <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
       <plugin id="org.eclipse.equinox.p2.ui"/>
-      <plugin id="org.eclipse.equinox.p2.ui.admin" fragment=""/>
+      <plugin id="org.eclipse.equinox.p2.ui.admin"/>
       <plugin id="org.eclipse.equinox.p2.ui.admin.rcp"/>
+      <plugin id="org.eclipse.equinox.p2.updatechecker"/>
       <plugin id="org.eclipse.equinox.preferences"/>
       <plugin id="org.eclipse.equinox.registry"/>
+      <plugin id="org.eclipse.equinox.security"/>
+      <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
+      <plugin id="org.eclipse.equinox.security.ui"/>
+      <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
       <plugin id="org.eclipse.equinox.simpleconfigurator"/>
       <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
+      <plugin id="org.eclipse.equinox.util"/>
       <plugin id="org.eclipse.help"/>
       <plugin id="org.eclipse.jface"/>
       <plugin id="org.eclipse.jface.databinding"/>
+      <plugin id="org.eclipse.jface.text"/>
       <plugin id="org.eclipse.osgi"/>
       <plugin id="org.eclipse.osgi.services"/>
       <plugin id="org.eclipse.swt"/>
       <plugin id="org.eclipse.swt.cocoa.macosx" fragment="true"/>
       <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
       <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
+      <plugin id="org.eclipse.text"/>
       <plugin id="org.eclipse.ui"/>
+      <plugin id="org.eclipse.ui.editors"/>
+      <plugin id="org.eclipse.ui.forms"/>
+      <plugin id="org.eclipse.ui.ide"/>
       <plugin id="org.eclipse.ui.net"/>
+      <plugin id="org.eclipse.ui.views"/>
       <plugin id="org.eclipse.ui.workbench"/>
+      <plugin id="org.eclipse.ui.workbench.texteditor"/>
       <plugin id="org.sat4j.core"/>
       <plugin id="org.sat4j.pb"/>
    </plugins>
 
+   <configurations>
+      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4" />
+      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
+      <plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
+      <plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />
+   </configurations>
 
 </product>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
index 5955baa..dc31db1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin.rcp/src/org/eclipse/equinox/internal/p2/ui/admin/rcp/ApplicationWorkbenchAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,4 +21,8 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 	public String getInitialWindowPerspectiveId() {
 		return "org.eclipse.equinox.p2.ui.admin.rcp.ProvisioningRCPPerspective"; //$NON-NLS-1$
 	}
+
+	public void initialize(IWorkbenchConfigurer configurer) {
+		configurer.setSaveAndRestore(true);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.classpath
index ce73933..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
index 78523cd..eba723b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Aug 16 11:00:59 EDT 2007
+#Tue Dec 22 23:48:18 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -62,7 +62,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -72,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -144,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
index 2062e4b..5b61245 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
@@ -1,40 +1,41 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-friends:="org.eclipse.equinox.internal.p2.ui.analysis",
+ org.eclipse.equinox.internal.p2.ui.admin.dialogs;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.admin.preferences;x-internal:=true
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.ui,
+ org.eclipse.equinox.internal.p2.ui.actions,
+ org.eclipse.equinox.internal.p2.ui.dialogs,
  org.eclipse.equinox.internal.p2.ui.model,
  org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
+ org.eclipse.equinox.internal.p2.ui.viewers,
  org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.ui,
- org.eclipse.equinox.internal.provisional.p2.ui.actions,
- org.eclipse.equinox.internal.provisional.p2.ui.dialogs,
- org.eclipse.equinox.internal.provisional.p2.ui.model,
- org.eclipse.equinox.internal.provisional.p2.ui.operations,
- org.eclipse.equinox.internal.provisional.p2.ui.policy,
- org.eclipse.equinox.internal.provisional.p2.ui.viewers,
+ org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.updatechecker,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.environment;version="1.0.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.admin.dialogs;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.admin.preferences;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui
-Eclipse-LazyStart: true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/build.properties
index 3501186..b7d66df 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/build.properties
@@ -16,6 +16,5 @@ bin.includes = plugin.properties,\
                META-INF/
 src.includes = about.html
 source.. = src/
-
-               
-
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/plugin.xml
index d866395..6aa8508 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/plugin.xml
@@ -66,7 +66,7 @@
             class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage"
             id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage">
             <enabledWhen>
-             <adapt type="org.eclipse.equinox.internal.provisional.p2.engine.IProfile"/>
+             <adapt type="org.eclipse.equinox.p2.engine.IProfile"/>
           </enabledWhen>
       </page>
       <page
@@ -74,7 +74,7 @@
             class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage"
             id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage">
             <enabledWhen>
-             <adapt type="org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit"/>
+             <adapt type="org.eclipse.equinox.p2.metadata.IInstallableUnit"/>
            </enabledWhen>
       </page>
             <page
@@ -83,7 +83,7 @@
             id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.InstalledIUPropertyPage">
             <enabledWhen>
              <instanceof
-                  value="org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement">
+                  value="org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement">
              </instanceof>
           </enabledWhen>
       </page>
@@ -92,7 +92,7 @@
             class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage"
             id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage">
             <enabledWhen>
-             <adapt type="org.eclipse.equinox.internal.provisional.p2.repository.IRepository"/>
+             <adapt type="org.eclipse.equinox.p2.repository.IRepository"/>
            </enabledWhen>
       </page>
       
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/pom.xml
new file mode 100644
index 0000000..c329656
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui.admin</artifactId>
+  <version>1.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java
deleted file mode 100644
index 7882bf6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddArtifactRepositoryOperation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-
-/**
- * Operation which adds an artifact repository given its URI.
- * 
- * @since 3.4
- */
-public class AddArtifactRepositoryOperation extends AddRepositoryOperation {
-
-	public AddArtifactRepositoryOperation(String label, URI location) {
-		super(label, new URI[] {location});
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length);
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.addArtifactRepository(locations[i], notify);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-
-	protected void setNickname(URI location, String nickname) throws ProvisionException {
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.setArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java
deleted file mode 100644
index 4d1baa1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddMetadataRepositoryOperation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-
-/**
- * Operation that adds a metadata repository given its URL.
- * 
- * @since 3.4
- */
-public class AddMetadataRepositoryOperation extends AddRepositoryOperation {
-
-	public AddMetadataRepositoryOperation(String label, URI location) {
-		super(label, new URI[] {location});
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length);
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.addMetadataRepository(locations[i], notify);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-
-	protected void setNickname(URI location, String nickname) throws ProvisionException {
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
new file mode 100644
index 0000000..ecc86f0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.admin;
+
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+
+/**
+ * Operation that adds the given profile to the profile registry.
+ * 
+ * @since 3.6
+ */
+public class AddProfileJob extends ProvisioningJob {
+	private String profileId;
+	private Map<String, String> profileProperties;
+
+	public AddProfileJob(String label, ProvisioningSession session, String profileId, Map<String, String> profileProperties) {
+		super(label, session);
+		this.profileId = profileId;
+		this.profileProperties = profileProperties;
+	}
+
+	public IStatus runModal(IProgressMonitor monitor) {
+		IStatus status = Status.OK_STATUS;
+		try {
+			ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
+		} catch (ProvisionException e) {
+			status = getErrorStatus(null, e);
+		}
+		return status;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
index 376bad1..a2bdc4e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
@@ -10,16 +10,12 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin;
 
-import java.net.URI;
-import java.util.ArrayList;
+import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.QueryableArtifactRepositoryManager;
 import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddArtifactRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ArtifactRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.model.ArtifactRepositories;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * This view allows users to interact with artifact repositories
@@ -28,6 +24,8 @@ import org.eclipse.ui.statushandlers.StatusManager;
  */
 public class ArtifactRepositoriesView extends RepositoriesView {
 
+	private RepositoryTracker tracker;
+
 	/**
 	 * 
 	 */
@@ -36,7 +34,7 @@ public class ArtifactRepositoriesView extends RepositoriesView {
 	}
 
 	protected Object getInput() {
-		return new ArtifactRepositories(ProvAdminUIActivator.getDefault().getPolicy());
+		return new ArtifactRepositories(getProvisioningUI(), new QueryableArtifactRepositoryManager(getProvisioningUI(), false));
 	}
 
 	protected String getAddCommandLabel() {
@@ -52,16 +50,7 @@ public class ArtifactRepositoriesView extends RepositoriesView {
 	}
 
 	protected int openAddRepositoryDialog(Shell shell) {
-		return new AddArtifactRepositoryDialog(shell, ProvAdminUIActivator.getDefault().getPolicy()).open();
-	}
-
-	protected RemoveRepositoryOperation getRemoveOperation(Object[] elements) {
-		ArrayList locations = new ArrayList();
-		for (int i = 0; i < elements.length; i++) {
-			if (elements[i] instanceof IRepositoryElement)
-				locations.add(((IRepositoryElement) elements[i]).getLocation());
-		}
-		return new RemoveArtifactRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, (URI[]) locations.toArray(new URI[locations.size()]));
+		return new AddArtifactRepositoryDialog(shell, getProvisioningUI()).open();
 	}
 
 	/*
@@ -69,15 +58,16 @@ public class ArtifactRepositoriesView extends RepositoriesView {
 	 * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
 	 */
 	protected int getListenerEventTypes() {
-		return StructuredViewerProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
+		return ProvUIProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.admin.ProvView#refreshUnderlyingModel()
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
 	 */
-	protected void refreshUnderlyingModel() {
-		ProvisioningOperationRunner.schedule(new RefreshArtifactRepositoriesOperation(ProvAdminUIMessages.ProvView_RefreshCommandLabel, ProvAdminUIActivator.getDefault().getPolicy().getQueryContext().getArtifactRepositoryFlags()), StatusManager.SHOW | StatusManager.LOG);
+	protected RepositoryTracker getRepositoryTracker() {
+		if (tracker == null)
+			tracker = new ArtifactRepositoryTracker(getProvisioningUI());
+		return tracker;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
new file mode 100644
index 0000000..ba8ce8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.admin;
+
+import java.net.URI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+public class ArtifactRepositoryTracker extends RepositoryTracker {
+
+	ProvisioningUI ui;
+
+	public ArtifactRepositoryTracker(ProvisioningUI ui) {
+		this.ui = ui;
+	}
+
+	public URI[] getKnownRepositories(ProvisioningSession session) {
+		return getArtifactRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
+	}
+
+	public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			getArtifactRepositoryManager().addRepository(repoLocation);
+			if (nickname != null)
+				getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
+		} finally {
+			ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED, true), true);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
+	 */
+	public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			for (int i = 0; i < repoLocations.length; i++) {
+				getArtifactRepositoryManager().removeRepository(repoLocations[i]);
+			}
+		} finally {
+			ui.signalRepositoryOperationComplete(null, true);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
+		ui.signalRepositoryOperationStart();
+		SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
+		for (int i = 0; i < locations.length; i++) {
+			try {
+				getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
+			} catch (ProvisionException e) {
+				//ignore problematic repositories when refreshing
+			}
+		}
+		// We have no idea how many repos may have been added/removed as a result of 
+		// refreshing these, this one, so we do not use a specific repository event to represent it.
+		ui.signalRepositoryOperationComplete(null, true);
+	}
+
+	IArtifactRepositoryManager getArtifactRepositoryManager() {
+		return ProvUI.getArtifactRepositoryManager(ui.getSession());
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
index 172726c..d4092e1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
@@ -11,27 +11,24 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import java.net.URI;
-import java.util.ArrayList;
 import java.util.List;
+import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
+import org.eclipse.equinox.internal.p2.ui.actions.InstallAction;
 import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddMetadataRepositoryDialog;
 import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUDragAdapter;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositories;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUDragAdapter;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.ui.Policy;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.dnd.*;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.part.PluginTransfer;
-import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * This view allows users to interact with metadata repositories
@@ -41,6 +38,8 @@ import org.eclipse.ui.statushandlers.StatusManager;
 public class MetadataRepositoriesView extends RepositoriesView {
 
 	private InstallAction installAction;
+	private RepositoryTracker tracker;
+	MetadataRepositories input;
 
 	/**
 	 * The constructor.
@@ -50,7 +49,18 @@ public class MetadataRepositoriesView extends RepositoriesView {
 	}
 
 	protected Object getInput() {
-		return new MetadataRepositories(ProvAdminUIActivator.getDefault().getPolicy());
+		if (input == null) {
+			// view by repo
+			IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
+			Policy policy = ProvAdminUIActivator.getDefault().getPolicy();
+			context.setShowLatestVersionsOnly(policy.getShowLatestVersionsOnly());
+			context.setShowInstallChildren(policy.getShowDrilldownRequirements());
+			context.setShowProvisioningPlanChildren(policy.getShowDrilldownRequirements());
+			context.setUseCategories(policy.getGroupByCategory());
+
+			input = new MetadataRepositories(context, getProvisioningUI(), new QueryableMetadataRepositoryManager(getProvisioningUI(), false));
+		}
+		return input;
 	}
 
 	protected String getAddCommandLabel() {
@@ -66,21 +76,12 @@ public class MetadataRepositoriesView extends RepositoriesView {
 	}
 
 	protected int openAddRepositoryDialog(Shell shell) {
-		return new AddMetadataRepositoryDialog(shell, ProvAdminUIActivator.getDefault().getPolicy()).open();
-	}
-
-	protected RemoveRepositoryOperation getRemoveOperation(Object[] elements) {
-		ArrayList locations = new ArrayList();
-		for (int i = 0; i < elements.length; i++) {
-			if (elements[i] instanceof IRepositoryElement)
-				locations.add(((IRepositoryElement) elements[i]).getLocation());
-		}
-		return new RemoveMetadataRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, (URI[]) locations.toArray(new URI[locations.size()]));
+		return new AddMetadataRepositoryDialog(shell, getProvisioningUI()).open();
 	}
 
 	protected void makeActions() {
 		super.makeActions();
-		installAction = new InstallAction(ProvAdminUIActivator.getDefault().getPolicy(), viewer, null);
+		installAction = new InstallAction(getProvisioningUI(), viewer, null);
 	}
 
 	protected void fillContextMenu(IMenuManager manager) {
@@ -109,21 +110,27 @@ public class MetadataRepositoriesView extends RepositoriesView {
 	 * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
 	 */
 	protected int getListenerEventTypes() {
-		return StructuredViewerProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
+		return ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.admin.ProvView#refreshUnderlyingModel()
-	 */
-	protected void refreshUnderlyingModel() {
-		ProvisioningOperationRunner.schedule(new RefreshMetadataRepositoriesOperation(ProvAdminUIMessages.ProvView_RefreshCommandLabel, getRepoFlags()), StatusManager.SHOW | StatusManager.LOG);
-	}
-
-	protected List getVisualProperties() {
-		List list = super.getVisualProperties();
+	protected List<String> getVisualProperties() {
+		List<String> list = super.getVisualProperties();
 		list.add(PreferenceConstants.PREF_USE_CATEGORIES);
 		list.add(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS);
 		return list;
 	}
+
+	protected void updateCachesForPreferences() {
+		// We want to reconstruct the input's query context based on the latest preferences
+		input = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
+	 */
+	protected RepositoryTracker getRepositoryTracker() {
+		if (tracker == null)
+			tracker = new MetadataRepositoryTracker(getProvisioningUI());
+		return tracker;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
new file mode 100644
index 0000000..107a531
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.admin;
+
+import java.net.URI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+public class MetadataRepositoryTracker extends RepositoryTracker {
+
+	ProvisioningUI ui;
+
+	public MetadataRepositoryTracker(ProvisioningUI ui) {
+		this.ui = ui;
+	}
+
+	public URI[] getKnownRepositories(ProvisioningSession session) {
+		return getMetadataRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
+	}
+
+	public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			getMetadataRepositoryManager().addRepository(repoLocation);
+			if (nickname != null)
+				getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
+
+		} finally {
+			ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
+	 */
+	public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			for (int i = 0; i < repoLocations.length; i++) {
+				getMetadataRepositoryManager().removeRepository(repoLocations[i]);
+			}
+		} finally {
+			ui.signalRepositoryOperationComplete(null, true);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
+		ui.signalRepositoryOperationStart();
+		SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
+		for (int i = 0; i < locations.length; i++) {
+			try {
+				getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
+			} catch (ProvisionException e) {
+				//ignore problematic repositories when refreshing
+			}
+		}
+		// We have no idea how many repos may have been added/removed as a result of 
+		// refreshing these, this one, so we do not use a specific repository event to represent it.
+		ui.signalRepositoryOperationComplete(null, true);
+	}
+
+	IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return ProvUI.getMetadataRepositoryManager(ui.getSession());
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
new file mode 100644
index 0000000..831213f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.admin;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.osgi.service.environment.EnvironmentInfo;
+
+/**
+ * Factory class that can create a new profile with the correct
+ * default values.
+ * 
+ * @since 3.4
+ *
+ */
+public class ProfileFactory {
+
+	static private String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
+	static private String EMPTY = ""; //$NON-NLS-1$
+	static private EnvironmentInfo info;
+
+	public static IProfile makeProfile(String profileId) {
+		Map<String, String> profileProperties = new HashMap<String, String>();
+		profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
+		profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
+		profileProperties.put(IProfile.PROP_NL, getDefaultNL());
+
+		try {
+			return ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
+		} catch (ProvisionException e) {
+			// log
+		}
+		return null;
+	}
+
+	public static String getDefaultLocation() {
+		return Platform.getUserLocation().getURL().getPath();
+	}
+
+	public static String getDefaultFlavor() {
+		return FLAVOR_DEFAULT;
+	}
+
+	private static EnvironmentInfo getEnvironmentInfo() {
+		if (info == null) {
+			info = (EnvironmentInfo) ServiceHelper.getService(ProvUIActivator.getContext(), EnvironmentInfo.class.getName());
+		}
+		return info;
+	}
+
+	public static String getDefaultNL() {
+		if (getEnvironmentInfo() != null) {
+			return info.getNL();
+		}
+		return EMPTY;
+	}
+
+	public static String getDefaultEnvironments() {
+		if (getEnvironmentInfo() != null) {
+			return "osgi.os=" //$NON-NLS-1$
+					+ info.getOS() + ",osgi.ws=" + info.getWS() //$NON-NLS-1$
+					+ ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$
+		}
+		return EMPTY;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
index 43cb8b3..7272c67 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
@@ -13,28 +13,23 @@ package org.eclipse.equinox.internal.p2.ui.admin;
 
 import java.util.ArrayList;
 import java.util.List;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.actions.UninstallAction;
+import org.eclipse.equinox.internal.p2.ui.actions.UpdateAction;
 import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddProfileDialog;
 import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UninstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveProfilesOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IProfileChooser;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * This view allows users to interact with installed profiles.
@@ -42,7 +37,7 @@ import org.eclipse.ui.statushandlers.StatusManager;
  * @since 3.4
  */
 public class ProfilesView extends ProvView {
-	private Action addProfileAction, removeProfileAction, uninstallAction;
+	protected Action addProfileAction, removeProfileAction, uninstallAction;
 	UpdateAction updateAction;
 	private PropertyDialogAction propertiesAction;
 	private StructuredViewerProvisioningListener listener;
@@ -58,13 +53,13 @@ public class ProfilesView extends ProvView {
 
 		public void run() {
 			Object[] selections = getSelection().toArray();
-			List profilesOnly = new ArrayList();
+			List<String> profilesOnly = new ArrayList<String>();
 			for (int i = 0; i < selections.length; i++) {
 				if (selections[i] instanceof ProfileElement)
 					profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
 			}
-			RemoveProfilesOperation op = new RemoveProfilesOperation(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, (String[]) profilesOnly.toArray(new String[profilesOnly.size()]));
-			ProvisioningOperationRunner.run(op, StatusManager.SHOW | StatusManager.LOG);
+			RemoveProfilesJob op = new RemoveProfilesJob(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, getProvisioningUI().getSession(), profilesOnly.toArray(new String[profilesOnly.size()]));
+			ProfilesView.this.run(op);
 		}
 	}
 
@@ -86,7 +81,7 @@ public class ProfilesView extends ProvView {
 
 	protected void addListeners() {
 		super.addListeners();
-		listener = new StructuredViewerProvisioningListener(viewer, StructuredViewerProvisioningListener.PROV_EVENT_IU | StructuredViewerProvisioningListener.PROV_EVENT_PROFILE);
+		listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE);
 		ProvUI.addProvisioningListener(listener);
 	}
 
@@ -97,7 +92,7 @@ public class ProfilesView extends ProvView {
 
 	protected void configureViewer(TreeViewer treeViewer) {
 		super.configureViewer(treeViewer);
-		InstallIUDropAdapter adapter = new InstallIUDropAdapter(ProvAdminUIActivator.getDefault().getPolicy(), treeViewer);
+		InstallIUDropAdapter adapter = new InstallIUDropAdapter(getProvisioningUI(), treeViewer);
 		adapter.setFeedbackEnabled(false);
 		Transfer[] transfers = new Transfer[] {org.eclipse.jface.util.LocalSelectionTransfer.getTransfer()};
 		treeViewer.addDropSupport(DND.DROP_COPY, transfers, adapter);
@@ -137,9 +132,9 @@ public class ProfilesView extends ProvView {
 		super.makeActions();
 		addProfileAction = new AddProfileAction();
 		removeProfileAction = new RemoveProfileAction();
-		uninstallAction = new UninstallAction(ProvAdminUIActivator.getDefault().getPolicy(), viewer, null);
+		uninstallAction = new UninstallAction(getProvisioningUI(), viewer, null);
 		propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
-		updateAction = new UpdateAction(ProvAdminUIActivator.getDefault().getPolicy(), viewer, null, true);
+		updateAction = new UpdateAction(getProvisioningUI(), viewer, null, true);
 		updateAction.setSkipSelectionPage(true);
 
 		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
@@ -165,7 +160,7 @@ public class ProfilesView extends ProvView {
 		if (selectionArray.length > 0) {
 			removeProfileAction.setEnabled(true);
 			for (int i = 0; i < selectionArray.length; i++) {
-				IProfile profile = (IProfile) ProvUI.getAdapter(selectionArray[i], IProfile.class);
+				IProfile profile = ProvUI.getAdapter(selectionArray[i], IProfile.class);
 				if (profile == null) {
 					removeProfileAction.setEnabled(false);
 					break;
@@ -183,41 +178,38 @@ public class ProfilesView extends ProvView {
 	}
 
 	protected Object getInput() {
-		return new Profiles(ProvAdminUIActivator.getDefault().getPolicy());
+		return new Profiles(getProvisioningUI());
 	}
 
-	IProfileChooser getProfileChooser() {
-		return new IProfileChooser() {
-			public String getProfileId(Shell shell) {
-				Object firstElement = getSelection().getFirstElement();
-				if (firstElement instanceof InstalledIUElement) {
-					return ((InstalledIUElement) firstElement).getProfileId();
-				}
-				IProfile profile = (IProfile) ProvUI.getAdapter(firstElement, IProfile.class);
-				if (profile != null)
-					return profile.getProfileId();
-				return null;
-			}
-		};
+	protected String getProfileId() {
+		Object firstElement = getSelection().getFirstElement();
+		if (firstElement instanceof InstalledIUElement) {
+			return ((InstalledIUElement) firstElement).getProfileId();
+		}
+		IProfile profile = ProvUI.getAdapter(firstElement, IProfile.class);
+		if (profile != null)
+			return profile.getProfileId();
+		return null;
 	}
 
-	protected List getVisualProperties() {
-		List list = super.getVisualProperties();
+	protected List<String> getVisualProperties() {
+		List<String> list = super.getVisualProperties();
 		list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
 		return list;
 	}
 
 	String[] getKnownProfileIds() {
-		try {
-			IProfile[] allProfiles = ProvisioningUtil.getProfiles();
-			String[] ids = new String[allProfiles.length];
-			for (int i = 0; i < allProfiles.length; i++)
-				ids[i] = allProfiles[i].getProfileId();
-			return ids;
-		} catch (ProvisionException e) {
-			ProvUI.handleException(e, ProvAdminUIMessages.ProfilesView_ErrorRetrievingProfiles, StatusManager.LOG);
-			return new String[0];
-		}
-
+		IProfile[] allProfiles = ProvAdminUIActivator.getDefault().getProfileRegistry().getProfiles();
+		String[] ids = new String[allProfiles.length];
+		for (int i = 0; i < allProfiles.length; i++)
+			ids[i] = allProfiles[i].getProfileId();
+		return ids;
+	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
+		if (ui != null)
+			return ui;
+		return super.getProvisioningUI();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
index 04daad3..0b93343 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
@@ -10,26 +10,20 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddProfileDialog;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
 import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ValidationDialogServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Profiles;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementLabelProvider;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ListDialog;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
@@ -89,7 +83,6 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
 		plugin = this;
 		ProvAdminUIActivator.context = bundleContext;
 		initializePolicy();
-		certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new ValidationDialogServiceUI(), null);
 		getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
 	}
 
@@ -105,79 +98,57 @@ public class ProvAdminUIActivator extends AbstractUIPlugin {
 		if (preferenceListener == null) {
 			preferenceListener = new IPropertyChangeListener() {
 				public void propertyChange(PropertyChangeEvent event) {
-					updateForPreferences(getPolicy().getQueryContext());
+					updateForPreferences();
 				}
 			};
 		}
 		return preferenceListener;
 	}
 
-	void updateForPreferences(IUViewQueryContext queryContext) {
+	void updateForPreferences() {
+
 		if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_GROUPS_ONLY))
-			queryContext.setVisibleAvailableIUProperty(IInstallableUnit.PROP_TYPE_GROUP);
+			policy.setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
 		else
-			queryContext.setVisibleAvailableIUProperty(null);
+			policy.setVisibleAvailableIUQuery(QueryUtil.createIUAnyQuery());
 		if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY))
-			queryContext.setVisibleInstalledIUProperty(IInstallableUnit.PROP_PROFILE_ROOT_IU);
+			policy.setVisibleInstalledIUQuery(new UserVisibleRootQuery());
 		else
-			queryContext.setVisibleInstalledIUProperty(null);
+			policy.setVisibleInstalledIUQuery(QueryUtil.createIUAnyQuery());
 
+		RepositoryTracker tracker = getRepositoryTracker();
 		if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS)) {
-			queryContext.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
-			queryContext.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+			tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+			tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
 		} else {
-			queryContext.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
-			queryContext.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
+			tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
+			tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
 		}
-		queryContext.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS));
-		queryContext.setUseCategories(getPreferenceStore().getBoolean(PreferenceConstants.PREF_USE_CATEGORIES));
+		// store in ui prefs
+		policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS));
+		policy.setGroupByCategory(getPreferenceStore().getBoolean(PreferenceConstants.PREF_USE_CATEGORIES));
+	}
+
+	private RepositoryTracker getRepositoryTracker() {
+		return (RepositoryTracker) ServiceHelper.getService(ProvUIActivator.getContext(), RepositoryTracker.class.getName());
 	}
 
 	void initializePolicy() {
 		policy = new Policy();
 		// Manipulate the default query context according to our preferences
-		IUViewQueryContext queryContext = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
-		policy.setQueryContext(queryContext);
-		updateForPreferences(queryContext);
-		policy.setPlanValidator(new PlanValidator() {
-			public boolean continueWorkingWithPlan(ProvisioningPlan plan, Shell shell) {
-				if (plan == null)
-					return false;
-				return true;
-			}
-		});
-		policy.setProfileChooser(new IProfileChooser() {
-			public String getProfileId(Shell shell) {
-				// TODO would be nice if the profile chooser dialog let you
-				// create a new profile
-				ProvElementContentProvider provider = new ProvElementContentProvider();
-				if (provider.getElements(new Profiles(getPolicy())).length == 0) {
-					AddProfileDialog dialog = new AddProfileDialog(shell, new String[0]);
-					if (dialog.open() == Window.OK) {
-						return dialog.getAddedProfileId();
-					}
-					return null;
-				}
-
-				ListDialog dialog = new ListDialog(shell);
-				dialog.setTitle(ProvAdminUIMessages.MetadataRepositoriesView_ChooseProfileDialogTitle);
-				dialog.setLabelProvider(new ProvElementLabelProvider());
-				dialog.setInput(new Profiles(getPolicy()));
-				dialog.setContentProvider(provider);
-				dialog.open();
-				Object[] result = dialog.getResult();
-				if (result != null && result.length > 0) {
-					IProfile profile = (IProfile) ProvUI.getAdapter(result[0], IProfile.class);
-					if (profile != null)
-						return profile.getProfileId();
-				}
-				return null;
-			}
-		});
-		policy.setRepositoryManipulator(new ColocatedRepositoryManipulator(policy, null));
+		updateForPreferences();
 	}
 
 	public Policy getPolicy() {
 		return policy;
 	}
+
+	public IProfileRegistry getProfileRegistry() {
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME);
+		return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+	}
+
+	public ProvisioningUI getProvisioningUI(String profileId) {
+		return new ProvisioningUI(ProvisioningUI.getDefaultUI().getSession(), profileId, policy);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
index 750c738..b915027 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
@@ -24,20 +24,13 @@ public class ProvAdminUIMessages extends NLS {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, ProvAdminUIMessages.class);
 	}
-	public static String AddArtifactRepositoryDialog_DuplicateURL;
-	public static String AddArtifactRepositoryDialog_ManipulateRepositoryInstruction;
-	public static String AddArtifactRepositoryDialog_OperationLabel;
 	public static String AddProfileDialog_Title;
-	public static String AddMetadataRepositoryDialog_OperationLabel;
 	public static String MetadataRepositoriesView_AddRepositoryTooltip;
 	public static String MetadataRepositoriesView_AddRepositoryLabel;
-	public static String MetadataRepositoriesView_ChooseProfileDialogTitle;
 	public static String MetadataRepositoriesView_RemoveRepositoryTooltip;
 	public static String ArtifactRepositoriesView_AddRepositoryTooltip;
 	public static String ArtifactRepositoriesView_AddRepositoryLabel;
 	public static String ArtifactRepositoriesView_RemoveRepositoryTooltip;
-	public static String ArtifactRepositoriesView_RemoveRepositoryOperationLabel;
-	public static String ProfilesView_ErrorRetrievingProfiles;
 	public static String ProfilesView_AddProfileTooltip;
 	public static String ProfilesView_AddProfileLabel;
 	public static String ProfilesView_RemoveProfileLabel;
@@ -53,7 +46,6 @@ public class ProvAdminUIMessages extends NLS {
 	public static String Ops_RemoveProfileOperationLabel;
 	public static String AddProfileDialog_OperationLabel;
 	public static String AddProfileDialog_DuplicateProfileID;
-	public static String ProvView_RefreshCommandLabel;
 	public static String ProvView_RefreshCommandTooltip;
 
 	public static String ProfileRootPropertyName;
@@ -75,7 +67,6 @@ public class ProvAdminUIMessages extends NLS {
 	public static String IUGroup_TouchpointData;
 	public static String IUGroup_TouchpointType;
 	public static String IUGroup_Version;
-	public static String IUProfilePropertiesGroup_InvalidProfileID;
 
 	public static String IUPropertiesGroup_DescriptionPropertyLabel;
 	public static String IUPropertiesGroup_NamePropertyLabel;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
index fb68eba..63a30fd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
@@ -12,9 +12,15 @@ package org.eclipse.equinox.internal.p2.ui.admin;
 
 import java.util.ArrayList;
 import java.util.List;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
+import org.eclipse.equinox.internal.p2.ui.actions.RefreshAction;
 import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.RefreshAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -25,6 +31,7 @@ import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 
 /**
  * This class supports the common characteristics for views that manipulate
@@ -33,10 +40,11 @@ import org.eclipse.ui.part.ViewPart;
  * @since 3.4
  */
 abstract class ProvView extends ViewPart {
-	TreeViewer viewer;
+	protected TreeViewer viewer;
 	RefreshAction refreshAction;
 	private IPropertyChangeListener preferenceListener;
 	protected Display display;
+	private ProvisioningUI ui;
 
 	/**
 	 * The constructor.
@@ -118,7 +126,7 @@ abstract class ProvView extends ViewPart {
 	protected abstract IAction getDoubleClickAction();
 
 	protected void makeActions() {
-		refreshAction = new RefreshAction(viewer, viewer.getControl()) {
+		refreshAction = new RefreshAction(ProvisioningUI.getDefaultUI(), viewer, viewer.getControl()) {
 			protected void refresh() {
 				refreshAll(true);
 			}
@@ -148,7 +156,7 @@ abstract class ProvView extends ViewPart {
 		preferenceListener = new IPropertyChangeListener() {
 			public void propertyChange(PropertyChangeEvent event) {
 				if (getVisualProperties().contains(event.getProperty())) {
-					ProvAdminUIActivator.getDefault().initializePolicy();
+					updateCachesForPreferences();
 					ProvView.this.refreshAll(false);
 				}
 			}
@@ -157,6 +165,10 @@ abstract class ProvView extends ViewPart {
 		store.addPropertyChangeListener(preferenceListener);
 	}
 
+	protected void updateCachesForPreferences() {
+		// default is to do nothing
+	}
+
 	protected void removeListeners() {
 		if (preferenceListener != null) {
 			IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
@@ -172,10 +184,18 @@ abstract class ProvView extends ViewPart {
 		return viewer.getControl();
 	}
 
-	IStructuredSelection getSelection() {
+	protected IStructuredSelection getSelection() {
 		return (IStructuredSelection) viewer.getSelection();
 	}
 
+	protected void run(ProvisioningJob job) {
+		IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
+		if (service != null)
+			service.schedule(job);
+		else
+			job.runModal(new NullProgressMonitor());
+	}
+
 	protected void configureViewer(final TreeViewer treeViewer) {
 		viewer.setComparator(new IUComparator(IUComparator.IU_ID));
 		viewer.setComparer(new ProvElementComparer());
@@ -206,11 +226,11 @@ abstract class ProvView extends ViewPart {
 	}
 
 	protected void refreshUnderlyingModel() {
-		// Default is to do nothing
+		// do nothing by default
 	}
 
-	protected List getVisualProperties() {
-		ArrayList list = new ArrayList(1);
+	protected List<String> getVisualProperties() {
+		ArrayList<String> list = new ArrayList<String>(1);
 		list.add(PreferenceConstants.PREF_SHOW_GROUPS_ONLY);
 		return list;
 	}
@@ -224,4 +244,16 @@ abstract class ProvView extends ViewPart {
 		// will get queried again.
 		viewer.setInput(getInput());
 	}
+
+	protected String getProfileId() {
+		return IProfileRegistry.SELF;
+	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		if (ui == null) {
+			ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
+			ProvUI.setQueryProvider(new QueryProvider(ui));
+		}
+		return ui;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshArtifactRepositoriesOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshArtifactRepositoriesOperation.java
deleted file mode 100644
index a7754a9..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshArtifactRepositoriesOperation.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RepositoryOperation;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- *
- */
-public class RefreshArtifactRepositoriesOperation extends RepositoryOperation {
-
-	/**
-	 * @param label
-	 * @param locations
-	 */
-	public RefreshArtifactRepositoriesOperation(String label, URI[] locations) {
-		super(label, locations);
-	}
-
-	public RefreshArtifactRepositoriesOperation(String label, int flags) {
-		super(label, new URI[0]);
-		try {
-			this.locations = ProvisioningUtil.getArtifactRepositories(flags);
-		} catch (ProvisionException e) {
-			ProvUI.handleException(e, null, StatusManager.LOG);
-		}
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		ProvisioningUtil.refreshArtifactRepositories(locations, monitor);
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java
deleted file mode 100644
index 44b086d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RefreshMetadataRepositoriesOperation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RepositoryOperation;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- *
- */
-public class RefreshMetadataRepositoriesOperation extends RepositoryOperation {
-
-	/**
-	 * @param label
-	 * @param locations
-	 */
-	public RefreshMetadataRepositoriesOperation(String label, URI[] locations) {
-		super(label, locations);
-	}
-
-	public RefreshMetadataRepositoriesOperation(String label, int flags) {
-		super(label, new URI[0]);
-		try {
-			this.locations = ProvisioningUtil.getMetadataRepositories(flags);
-		} catch (ProvisionException e) {
-			ProvUI.handleException(e, null, StatusManager.LOG);
-		}
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		// Clear the not found cache so that repos not found are reported again.
-		ProvUI.clearRepositoriesNotFound();
-		ProvisioningUtil.refreshMetadataRepositories(locations, monitor);
-		return Status.OK_STATUS;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java
deleted file mode 100644
index c5dda16..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveArtifactRepositoryOperation.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-
-/**
- * Operation which removes the artifact repository with the given URL.
- * 
- * @since 3.4
- */
-public class RemoveArtifactRepositoryOperation extends RemoveRepositoryOperation {
-
-	public RemoveArtifactRepositoryOperation(String label, URI[] repoLocations) {
-		super(label, repoLocations);
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length);
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.removeArtifactRepository(locations[i]);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java
deleted file mode 100644
index 7f99b5d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveMetadataRepositoryOperation.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-
-/**
- * Operation that removes the metadata repository with the given location.
- * 
- * @since 3.4
- */
-public class RemoveMetadataRepositoryOperation extends RemoveRepositoryOperation {
-
-	public RemoveMetadataRepositoryOperation(String label, URI[] repoLocations) {
-		super(label, repoLocations);
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length);
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.removeMetadataRepository(locations[i]);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
new file mode 100644
index 0000000..b43a74c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.admin;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+
+/**
+ * Job that removes one or more profiles.
+ * 
+ * @since 3.6
+ */
+public class RemoveProfilesJob extends ProvisioningJob {
+	String[] profileIds;
+
+	public RemoveProfilesJob(String label, ProvisioningSession session, String[] profileIds) {
+		super(label, session);
+		this.profileIds = profileIds;
+	}
+
+	public IStatus runModal(IProgressMonitor monitor) {
+		for (int i = 0; i < profileIds.length; i++) {
+			ProvAdminUIActivator.getDefault().getProfileRegistry().removeProfile(profileIds[i]);
+		}
+		return Status.OK_STATUS;
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
index fecff8b..08af6d0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
@@ -10,22 +10,29 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin;
 
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
 import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.RepositoryContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
+import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryContentProvider;
+import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningListener;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
 import org.eclipse.jface.action.*;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.dialogs.PropertyDialogAction;
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -46,7 +53,14 @@ abstract class RepositoriesView extends ProvView {
 		}
 
 		public void run() {
-			ProvisioningOperationRunner.run(getRemoveOperation(getSelection().toArray()), StatusManager.SHOW | StatusManager.LOG);
+			RepositoryTracker tracker = RepositoriesView.this.getRepositoryTracker();
+			Object[] elements = getSelection().toArray();
+			ArrayList<URI> uris = new ArrayList<URI>(elements.length);
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof IRepositoryElement<?>)
+					uris.add(((IRepositoryElement<?>) elements[i]).getLocation());
+			}
+			tracker.removeRepositories(uris.toArray(new URI[uris.size()]), RepositoriesView.this.getProvisioningUI().getSession());
 		}
 	}
 
@@ -60,10 +74,10 @@ abstract class RepositoriesView extends ProvView {
 
 		public void run() {
 			Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(getInput());
-			ArrayList urls = new ArrayList();
+			ArrayList<URI> urls = new ArrayList<URI>();
 			for (int i = 0; i < elements.length; i++)
-				if (elements[i] instanceof IRepositoryElement)
-					urls.add(((IRepositoryElement) elements[i]).getLocation());
+				if (elements[i] instanceof IRepositoryElement<?>)
+					urls.add(((IRepositoryElement<?>) elements[i]).getLocation());
 			openAddRepositoryDialog(getShell());
 		}
 	}
@@ -82,7 +96,7 @@ abstract class RepositoriesView extends ProvView {
 
 	protected void addListeners() {
 		super.addListeners();
-		listener = new StructuredViewerProvisioningListener(viewer, getListenerEventTypes()) {
+		listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, getListenerEventTypes()) {
 			protected void refreshViewer() {
 				RepositoriesView.this.refreshAll(false);
 			}
@@ -164,9 +178,9 @@ abstract class RepositoriesView extends ProvView {
 
 	}
 
-	protected abstract int openAddRepositoryDialog(Shell shell);
+	protected abstract RepositoryTracker getRepositoryTracker();
 
-	protected abstract RemoveRepositoryOperation getRemoveOperation(Object[] elements);
+	protected abstract int openAddRepositoryDialog(Shell shell);
 
 	protected abstract String getAddCommandLabel();
 
@@ -179,14 +193,32 @@ abstract class RepositoriesView extends ProvView {
 	protected abstract String getRemoveCommandTooltip();
 
 	protected boolean isRepository(Object element) {
-		return element instanceof IRepositoryElement;
+		return element instanceof IRepositoryElement<?>;
 	}
 
 	protected abstract int getListenerEventTypes();
 
-	protected List getVisualProperties() {
-		List list = super.getVisualProperties();
+	protected List<String> getVisualProperties() {
+		List<String> list = super.getVisualProperties();
 		list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
 		return list;
 	}
+
+	protected void refreshUnderlyingModel() {
+		IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getAdapter(IWorkbenchSiteProgressService.class);
+		if (service != null) {
+			try {
+				service.run(true, false, new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor);
+					}
+				});
+			} catch (InvocationTargetException e) {
+				ProvUI.handleException(e, null, StatusManager.SHOW);
+			} catch (InterruptedException e) {
+				// ignore
+			}
+		} else
+			getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), new NullProgressMonitor());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
index 8d4f265..e94be5a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
@@ -10,13 +10,10 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
+import org.eclipse.equinox.internal.p2.ui.admin.ArtifactRepositoryTracker;
+import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.swt.widgets.Shell;
 
 /**
@@ -27,101 +24,17 @@ import org.eclipse.swt.widgets.Shell;
  */
 public class AddArtifactRepositoryDialog extends AddRepositoryDialog {
 
-	class ArtifactRepositoryManipulator extends RepositoryManipulator {
-		RepositoryLocationValidator validator;
+	RepositoryTracker tracker;
 
-		public AddRepositoryOperation getAddOperation(URI location) {
-			return new AddArtifactRepositoryOperation(ProvAdminUIMessages.AddArtifactRepositoryDialog_OperationLabel, location);
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getAddOperationLabel()
-		 */
-		public String getAddOperationLabel() {
-			return ProvAdminUIMessages.AddArtifactRepositoryDialog_OperationLabel;
-		}
-
-		public String getManipulatorButtonLabel() {
-			// Not used in this dialog
-			return null;
-		}
-
-		public String getManipulatorLinkLabel() {
-			// Not used in this dialog
-			return null;
-		}
-
-		public RemoveRepositoryOperation getRemoveOperation(URI[] repoLocations) {
-			return new RemoveArtifactRepositoryOperation(ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel, repoLocations);
-		}
-
-		public String getRemoveOperationLabel() {
-			return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryOperationLabel;
-		}
-
-		public RepositoryLocationValidator getRepositoryLocationValidator(Shell shell) {
-			if (validator == null) {
-				validator = new RepositoryLocationValidator() {
-					public IStatus validateRepositoryLocation(URI location, boolean contactRepositories, IProgressMonitor monitor) {
-						IStatus duplicateStatus = Status.OK_STATUS;
-						URI[] knownRepositories = getKnownRepositories();
-						for (int i = 0; i < knownRepositories.length; i++) {
-							if (knownRepositories[i].equals(location)) {
-								duplicateStatus = new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, LOCAL_VALIDATION_ERROR, ProvAdminUIMessages.AddArtifactRepositoryDialog_DuplicateURL, null);
-								break;
-							}
-						}
-						return duplicateStatus;
-					}
-				};
-			}
-			return validator;
-		}
-
-		public boolean manipulateRepositories(Shell shell) {
-			// Not used in this dialog
-			return false;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
-		 */
-		public URI[] getKnownRepositories() {
-			try {
-				return ProvisioningUtil.getArtifactRepositories(ProvAdminUIActivator.getDefault().getPolicy().getQueryContext().getArtifactRepositoryFlags());
-			} catch (ProvisionException e) {
-				return new URI[0];
-			}
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getManipulatorInstructionString()
-		 */
-		public String getManipulatorInstructionString() {
-			// We don't have a manipulator
-			return null;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getSiteNotFoundCorrectionString()
-		 */
-		public String getRepositoryNotFoundInstructionString() {
-			return ProvAdminUIMessages.AddArtifactRepositoryDialog_ManipulateRepositoryInstruction;
-		}
-
-	}
-
-	RepositoryManipulator manipulator;
-
-	public AddArtifactRepositoryDialog(Shell parentShell, Policy policy) {
-		super(parentShell, policy);
+	public AddArtifactRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
+		super(parentShell, ui);
 	}
 
-	protected RepositoryManipulator getRepositoryManipulator() {
-		if (manipulator == null) {
-			manipulator = new ArtifactRepositoryManipulator();
+	protected RepositoryTracker getRepositoryTracker() {
+		if (tracker == null) {
+			tracker = new ArtifactRepositoryTracker(getProvisioningUI());
 		}
-		return manipulator;
+		return tracker;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
index bbf0d8b..8281f22 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
@@ -10,12 +10,10 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.admin.AddMetadataRepositoryOperation;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.admin.MetadataRepositoryTracker;
+import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.swt.widgets.Shell;
 
 /**
@@ -26,11 +24,16 @@ import org.eclipse.swt.widgets.Shell;
  */
 public class AddMetadataRepositoryDialog extends AddRepositoryDialog {
 
-	public AddMetadataRepositoryDialog(Shell parentShell, Policy policy) {
-		super(parentShell, policy);
+	RepositoryTracker tracker;
+
+	public AddMetadataRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
+		super(parentShell, ui);
 	}
 
-	protected AddRepositoryOperation getOperation(URI location) {
-		return new AddMetadataRepositoryOperation(ProvAdminUIMessages.AddMetadataRepositoryDialog_OperationLabel, location);
+	protected RepositoryTracker getRepositoryTracker() {
+		if (tracker == null) {
+			tracker = new MetadataRepositoryTracker(getProvisioningUI());
+		}
+		return tracker;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
index 5b215de..7d5d88c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
@@ -11,19 +11,15 @@
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
 import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddProfileOperation;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.admin.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * Dialog that allows a profile to be defined and added.
@@ -77,8 +73,9 @@ public class AddProfileDialog extends StatusDialog {
 			return;
 		}
 		addedProfileId = profileGroup.getProfileId();
-		Map profileProperties = profileGroup.getProfileProperties();
-		ProvisioningOperationRunner.run(new AddProfileOperation(ProvAdminUIMessages.AddProfileDialog_OperationLabel, addedProfileId, profileProperties), StatusManager.SHOW | StatusManager.LOG);
+		Map<String, String> profileProperties = profileGroup.getProfileProperties();
+		AddProfileJob job = new AddProfileJob(ProvAdminUIMessages.AddProfileDialog_OperationLabel, ProvisioningUI.getDefaultUI().getSession(), addedProfileId, profileProperties);
+		job.runModal(new NullProgressMonitor());
 	}
 
 	void verifyComplete() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
index 61d1254..e372987 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.widgets.Composite;
 
@@ -38,7 +38,7 @@ public abstract class IUGroup {
 	}
 
 	public IInstallableUnit getIU() {
-		return (IInstallableUnit) ProvUI.getAdapter(iuElement, IInstallableUnit.class);
+		return ProvUI.getAdapter(iuElement, IInstallableUnit.class);
 	}
 
 	public void updateIU() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
index 4d2ab6d..7f971df 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
@@ -10,13 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import java.util.Collection;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
@@ -153,23 +155,26 @@ public class IUImplementationGroup extends IUGroup {
 		if (type != null) {
 			touchpointType.setText(type.getId());
 		}
-		ITouchpointData[] data = iu.getTouchpointData();
-		String[] items = new String[data.length];
-		for (int i = 0; i < data.length; i++) {
-			items[i] = data[i].toString();
+		Collection<ITouchpointData> data = iu.getTouchpointData();
+		String[] items = new String[data.size()];
+		int i = 0;
+		for (ITouchpointData td : data) {
+			items[i++] = td.toString();
 		}
 		touchpointData.setItems(items);
 
-		IRequiredCapability[] req = iu.getRequiredCapabilities();
-		items = new String[req.length];
-		for (int i = 0; i < req.length; i++) {
-			items[i] = req[i].toString();
+		Collection<IRequirement> reqs = iu.getRequirements();
+		items = new String[reqs.size()];
+		i = 0;
+		for (IRequirement req : reqs) {
+			items[i++] = req.toString();
 		}
 		requiredCapabilities.setItems(items);
-		IProvidedCapability[] prov = iu.getProvidedCapabilities();
-		items = new String[prov.length];
-		for (int i = 0; i < prov.length; i++) {
-			items[i] = prov[i].toString();
+		Collection<IProvidedCapability> prov = iu.getProvidedCapabilities();
+		items = new String[prov.size()];
+		i = 0;
+		for (IProvidedCapability capability : prov) {
+			items[i++] = capability.toString();
 		}
 		providedCapabilities.setItems(items);
 	}
@@ -179,10 +184,10 @@ public class IUImplementationGroup extends IUGroup {
 		if (iuElement == null || iuElement instanceof IInstallableUnit) {
 			InstallableUnitDescription unit = new InstallableUnitDescription();
 			unit.setId(id.getText().trim());
-			unit.setVersion(new Version(version.getText().trim()));
+			unit.setVersion(Version.create(version.getText().trim()));
 			unit.setProperty(IInstallableUnit.NAMESPACE_IU_ID, namespace.getText().trim());
 			// TODO this is bogus because we don't let user provide a touchpoint type version
-			unit.setTouchpointType(MetadataFactory.createTouchpointType(touchpointType.getText().trim(), new Version("1.0.0"))); //$NON-NLS-1$
+			unit.setTouchpointType(MetadataFactory.createTouchpointType(touchpointType.getText().trim(), Version.create("1.0.0"))); //$NON-NLS-1$
 			iuElement = MetadataFactory.createInstallableUnit(unit);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
index 8a679d4..04a751e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -31,7 +31,7 @@ public class IUImplementationPropertyPage extends PropertyPage {
 	private IUImplementationGroup iuGroup;
 
 	protected Control createContents(Composite parent) {
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(getElement(), IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
 		if (iu == null) {
 			Label label = new Label(parent, SWT.DEFAULT);
 			label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
index e71fd36..db4f4c6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
@@ -10,20 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
+import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
+import org.eclipse.equinox.p2.engine.IProfile;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * An IUPropertiesGroup is a reusable UI component that displays and edits the 
@@ -68,7 +63,7 @@ public class IUProfilePropertiesGroup extends IUGroup {
 		if (iuElement == null || !(iuElement instanceof InstalledIUElement)) {
 			return;
 		}
-		String[] propNames = new String[] {IInstallableUnit.PROP_PROFILE_ROOT_IU};
+		String[] propNames = new String[] {IProfile.PROP_PROFILE_ROOT_IU};
 		String[] userPropNames = new String[] {ProvAdminUIMessages.ProfileRootPropertyName};
 		for (int i = 0; i < propNames.length; i++) {
 			TableItem item = new TableItem(propertiesTable, SWT.NULL);
@@ -80,11 +75,6 @@ public class IUProfilePropertiesGroup extends IUGroup {
 	}
 
 	private IProfile getProfile(InstalledIUElement element) {
-		try {
-			return ProvisioningUtil.getProfile(element.getProfileId());
-		} catch (ProvisionException e) {
-			ProvUI.handleException(e, NLS.bind(ProvAdminUIMessages.IUProfilePropertiesGroup_InvalidProfileID, element.getProfileId()), StatusManager.LOG);
-			return null;
-		}
+		return ProvAdminUIActivator.getDefault().getProfileRegistry().getProfile(element.getProfileId());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
index 6c76644..ac7b808 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
@@ -12,8 +12,7 @@
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
@@ -67,7 +66,7 @@ public class IUPropertiesGroup extends IUGroup {
 		String[] userPropNames = new String[] {ProvAdminUIMessages.IUPropertiesGroup_NamePropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_DescriptionPropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_ProviderPropertyLabel};
 		for (int i = 0; i < propNames.length; i++) {
 			TableItem item = new TableItem(propertiesTable, SWT.NULL);
-			String value = IUPropertyUtils.getIUProperty(getIU(), propNames[i]);
+			String value = getIU().getProperty(propNames[i], null);
 			if (value != null)
 				item.setText(new String[] {userPropNames[i], value});
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
index f9aa001..7694a01 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
@@ -11,7 +11,7 @@
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
+import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
index b67f72f..07f5460 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
@@ -16,10 +16,8 @@ import java.util.HashMap;
 import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProfileFactory;
+import org.eclipse.equinox.internal.p2.ui.admin.*;
+import org.eclipse.equinox.p2.engine.IProfile;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridData;
@@ -42,7 +40,6 @@ public class ProfileGroup {
 	Text cache;
 	Text name;
 	Text description;
-	Text flavor;
 	Text environments;
 	Text nl;
 	IProfile profile;
@@ -122,9 +119,6 @@ public class ProfileGroup {
 
 		label = new Label(composite, SWT.NONE);
 		label.setText(ProvAdminUIMessages.ProfileGroup_Flavor);
-		flavor = new Text(composite, SWT.BORDER);
-		flavor.setLayoutData(gd);
-		setEditable(flavor, profile == null, listener);
 
 		label = new Label(composite, SWT.NONE);
 		label.setText(ProvAdminUIMessages.ProfileGroup_Environments);
@@ -146,7 +140,6 @@ public class ProfileGroup {
 			location.setText(ProfileFactory.getDefaultLocation());
 			environments.setText(ProfileFactory.getDefaultEnvironments());
 			nl.setText(ProfileFactory.getDefaultNL());
-			flavor.setText(ProfileFactory.getDefaultFlavor());
 		} else {
 			String value = profile.getProfileId();
 			// Should not happen, profiles must have an id, but just in case.
@@ -172,8 +165,6 @@ public class ProfileGroup {
 			if (value != null) {
 				description.setText(value);
 			}
-			value = profile.getProperty(IProfile.PROP_FLAVOR);
-			flavor.setText(value != null ? value : ProfileFactory.getDefaultFlavor());
 
 			value = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
 			if (value != null) {
@@ -186,9 +177,9 @@ public class ProfileGroup {
 		}
 	}
 
-	public Map getProfileProperties() {
+	public Map<String, String> getProfileProperties() {
 		if (profile == null) {
-			Map profileProperties = new HashMap();
+			Map<String, String> profileProperties = new HashMap<String, String>();
 
 			String value = location.getText().trim();
 			if (value.length() > 0) {
@@ -207,10 +198,6 @@ public class ProfileGroup {
 			if (value.length() > 0) {
 				profileProperties.put(IProfile.PROP_DESCRIPTION, value);
 			}
-			value = flavor.getText().trim();
-			if (value.length() > 0) {
-				profileProperties.put(IProfile.PROP_FLAVOR, value);
-			}
 			value = environments.getText().trim();
 			if (value.length() > 0) {
 				profileProperties.put(IProfile.PROP_ENVIRONMENTS, value);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
index 374a7f0..cea15ad 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.engine.IProfile;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.*;
@@ -28,7 +28,7 @@ public class ProfilePropertyPage extends PropertyPage {
 	private ProfileGroup profileGroup;
 
 	protected Control createContents(Composite parent) {
-		IProfile profile = (IProfile) ProvUI.getAdapter(getElement(), IProfile.class);
+		IProfile profile = ProvUI.getAdapter(getElement(), IProfile.class);
 		if (profile == null) {
 			Label label = new Label(parent, SWT.DEFAULT);
 			label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
index 8cd83d6..7c28fc1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
@@ -10,12 +10,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.util.Map;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
+import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
+import org.eclipse.equinox.p2.repository.IRepository;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -28,7 +27,7 @@ import org.eclipse.ui.dialogs.PropertyPage;
  * @since 3.4
  */
 public class RepositoryImplementationPropertyPage extends PropertyPage {
-	private IRepositoryElement repositoryElement;
+	private IRepositoryElement<?> repositoryElement;
 	private Composite composite;
 	private Text name;
 	private Text location;
@@ -106,9 +105,9 @@ public class RepositoryImplementationPropertyPage extends PropertyPage {
 	}
 
 	private void initializeFields() {
-		IRepositoryElement element = getRepositoryElement();
+		IRepositoryElement<?> element = getRepositoryElement();
 		if (element != null) {
-			IRepository repo = getRepositoryElement().getRepository(null);
+			IRepository<?> repo = getRepositoryElement().getRepository(null);
 			location.setText(repo.getLocation().toString());
 			String value = repo.getName();
 			if (value != null)
@@ -127,9 +126,9 @@ public class RepositoryImplementationPropertyPage extends PropertyPage {
 
 	private void initializeTable() {
 		if (getRepositoryElement() != null) {
-			Map repoProperties = getRepositoryElement().getRepository(null).getProperties();
+			Map<String, String> repoProperties = getRepositoryElement().getRepository(null).getProperties();
 			if (repoProperties != null) {
-				String[] propNames = (String[]) repoProperties.keySet().toArray(new String[repoProperties.size()]);
+				String[] propNames = repoProperties.keySet().toArray(new String[repoProperties.size()]);
 				for (int i = 0; i < propNames.length; i++) {
 					TableItem item = new TableItem(propertiesTable, SWT.NULL);
 					item.setText(new String[] {propNames[i], repoProperties.get(propNames[i]).toString()});
@@ -138,9 +137,9 @@ public class RepositoryImplementationPropertyPage extends PropertyPage {
 		}
 	}
 
-	private IRepositoryElement getRepositoryElement() {
+	private IRepositoryElement<?> getRepositoryElement() {
 		if (repositoryElement == null) {
-			repositoryElement = (IRepositoryElement) ProvUI.getAdapter(getElement(), IRepositoryElement.class);
+			repositoryElement = ProvUI.getAdapter(getElement(), IRepositoryElement.class);
 		}
 		return repositoryElement;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
index b5f9682..a818c8b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
@@ -17,24 +17,16 @@ ProvisioningPrefPage_UseCategories=Show IUs by &category in repository views
 InstalledIUPropertyPage_NoInfoAvailable=No profile-specific properties are available.
 AddProfileDialog_Title=Add Profile
 AddProfileDialog_OperationLabel=Add Profile
-AddMetadataRepositoryDialog_OperationLabel=Add Metadata Repository
-AddArtifactRepositoryDialog_DuplicateURL=Duplicate URL
-AddArtifactRepositoryDialog_ManipulateRepositoryInstruction=You can add and remove artifact repositories in the Artifact Repositories view.
-AddArtifactRepositoryDialog_OperationLabel=Add Artifact Repository
 MetadataRepositoriesView_AddRepositoryLabel=Add repository...
 MetadataRepositoriesView_AddRepositoryTooltip=Add a new metadata repository
 RepositoriesView_RemoveCommandLabel=Remove
 MetadataRepositoriesView_RemoveRepositoryTooltip=Remove the selected metadata repositories
-MetadataRepositoriesView_ChooseProfileDialogTitle=Choose Profile
-ArtifactRepositoriesView_RemoveRepositoryOperationLabel=Remove Artifact Repositories
 ArtifactRepositoriesView_AddRepositoryLabel=Add repository...
 ArtifactRepositoriesView_AddRepositoryTooltip=Add a new artifact repository
 ArtifactRepositoriesView_RemoveRepositoryTooltip=Remove the selected artifact repositories
-ProfilesView_ErrorRetrievingProfiles=Error retrieving profiles
 ProfilesView_AddProfileTooltip=Add a new profile
 ProvView_RefreshCommandTooltip=Refresh the items in the view.
 ProfilesView_AddProfileLabel=Add profile...
-ProvView_RefreshCommandLabel=Refresh
 ProfilesView_RemoveProfileLabel=Remove
 ProfilesView_RemoveProfileTooltip=Remove the selected profiles
 AddProfileDialog_DuplicateProfileID=The profile ID is already in use.
@@ -57,7 +49,6 @@ IUGroup_TouchpointData=Touchpoint &data:
 IUGroup_RequiredCapabilities=&Required capabilities:
 IUGroup_ProvidedCapabilities=&Provided capabilities:
 IUGroup_IU_ID_Required=Must set an IU ID
-IUProfilePropertiesGroup_InvalidProfileID=Profile id {0} not valid.
 IUPropertiesGroup_DescriptionPropertyLabel=Description
 IUPropertiesGroup_NamePropertyLabel=Name
 IUPropertiesGroup_ProviderPropertyLabel=Provider
diff --git a/eclipse/plugins/org.eclipse.equinox.log/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.log/.classpath
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.gitignore b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.gitignore
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.project b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.project
new file mode 100644
index 0000000..185488d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.p2.ui.discovery</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..c65423d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,349 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..8f3db4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,57 @@
+#Wed Feb 17 14:07:15 PST 2010
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_core
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.staticondemandthreshold=3
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.format_source_code=true
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000..d8c6d26
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000..1f24713
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,3 @@
+#Tue Feb 16 15:43:06 PST 2010
+commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..5937a85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,24 @@
+#Tue May 20 17:39:22 PDT 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=2
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..286ffc3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF
@@ -0,0 +1,27 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.equinox.p2.ui.discovery;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.equinox.p2.discovery;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.ui.browser,
+ org.eclipse.equinox.p2.discovery.compatibility;bundle-version="[1.0.0,1.1.0)";resolution:=optional,
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)"
+Export-Package: org.eclipse.equinox.internal.p2.ui.discovery;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.discovery.commands;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.discovery.operations;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.discovery.repository;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.discovery.util;x-internal:=true,
+ org.eclipse.equinox.internal.p2.ui.discovery.wizards;x-internal:=true
+Bundle-ClassPath: .
+Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/about.html b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/about.html
new file mode 100644
index 0000000..bc6e2b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>July 3, 2008</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/build.properties
new file mode 100644
index 0000000..2aa561f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     Tasktop Technologies - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               about.html,\
+               icons/,\
+               plugin.properties
+src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png
new file mode 100644
index 0000000..611189d
Binary files /dev/null and b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png differ
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif
diff --git a/eclipse/plugins/org.eclipse.jface/icons/full/message_info.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jface/icons/full/message_info.gif
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif
diff --git a/eclipse/plugins/org.eclipse.jface/icons/full/message_warning.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jface/icons/full/message_warning.gif
copy to eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png
new file mode 100644
index 0000000..cc4b2cf
Binary files /dev/null and b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png differ
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.properties
new file mode 100644
index 0000000..6868258
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+Bundle-Vendor = Eclipse.org - Equinox
+Bundle-Name = Equinox Provisioning Discovery UI
+
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.xml
new file mode 100644
index 0000000..0622068
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/plugin.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<!--
+    Copyright (c) 2009 Tasktop Technologies and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+         Tasktop Technologies - initial API and implementation
+ -->
+<plugin>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog"
+            name="Show Bundle Catalog">
+         <commandParameter
+               id="org.eclipse.equinox.p2.ui.discovery.commands.DirectoryParameter"
+               name="Directory URL"
+               optional="true">
+         </commandParameter>
+         <commandParameter
+               id="org.eclipse.equinox.p2.ui.discovery.commands.TagsParameter"
+               name="Tags"
+               optional="true">
+         </commandParameter>
+      </command>
+      <command
+            id="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog"
+            name="Show Repository Catalog">
+         <commandParameter
+               id="org.eclipse.equinox.p2.ui.discovery.commands.RepositoryParameter"
+               name="P2 Repository URI"
+               optional="true">
+         </commandParameter>
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.equinox.internal.p2.ui.discovery.commands.ShowBundleCatalogCommandHandler"
+            commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog">
+      </handler>
+      <handler
+            class="org.eclipse.equinox.internal.p2.ui.discovery.commands.ShowRepositoryCatalogCommandHandler"
+            commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog">
+      </handler>
+   </extension>
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/pom.xml
new file mode 100644
index 0000000..3038025
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui.discovery</artifactId>
+  <version>1.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java
new file mode 100644
index 0000000..cb9cbd0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class DiscoveryImages {
+
+	private static final String T_OVR_32 = "ovr32"; //$NON-NLS-1$
+
+	private static final String T_OBJ_16 = "obj16"; //$NON-NLS-1$
+
+	private static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
+
+	private static final String T_TOOL = "etool16"; //$NON-NLS-1$
+
+	private static final URL baseURL = Platform.getBundle(DiscoveryUi.ID_PLUGIN).getEntry("/icons/"); //$NON-NLS-1$
+
+	/**
+	 * image descriptor for a warning overlay suitable for use with 32x32 images.
+	 */
+	public static final ImageDescriptor OVERLAY_WARNING_32 = create(T_OVR_32, "message_warning.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor BANNER_DISOVERY = create(T_WIZBAN, "banner-discovery.png"); //$NON-NLS-1$
+
+	public static final ImageDescriptor IU_AVAILABLE = create(T_OBJ_16, "iu_disabled_obj.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor IU_INSTALLED = create(T_OBJ_16, "iu_obj.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor IU_UPDATABLE = create(T_OBJ_16, "iu_update_obj.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor MESSAGE_INFO = create(T_OBJ_16, "message_info.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor FIND_CLEAR = create(T_TOOL, "find-clear.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor FIND_CLEAR_DISABLED = create(T_TOOL, "find-clear-disabled.gif"); //$NON-NLS-1$
+
+	private static ImageRegistry imageRegistry;
+
+	private static ImageDescriptor create(String prefix, String name) {
+		try {
+			return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
+		} catch (MalformedURLException e) {
+			return ImageDescriptor.getMissingImageDescriptor();
+		}
+	}
+
+	private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
+		if (baseURL == null) {
+			throw new MalformedURLException();
+		}
+
+		StringBuilder buffer = new StringBuilder(prefix);
+		buffer.append('/');
+		buffer.append(name);
+		return new URL(baseURL, buffer.toString());
+	}
+
+	/**
+	 * Lazily initializes image map.
+	 * 
+	 * @param imageDescriptor
+	 * @return Image
+	 */
+	public static Image getImage(ImageDescriptor imageDescriptor) {
+		ImageRegistry imageRegistry = getImageRegistry();
+		Image image = imageRegistry.get("" + imageDescriptor.hashCode()); //$NON-NLS-1$
+		if (image == null) {
+			image = imageDescriptor.createImage(true);
+			imageRegistry.put("" + imageDescriptor.hashCode(), image); //$NON-NLS-1$
+		}
+		return image;
+	}
+
+	private static ImageRegistry getImageRegistry() {
+		if (imageRegistry == null) {
+			imageRegistry = new ImageRegistry();
+		}
+		return imageRegistry;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java
new file mode 100644
index 0000000..e6edb58
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.operations.DiscoveryInstallOperation;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.CommonColors;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * @author David Green
+ */
+public abstract class DiscoveryUi {
+
+	public static final String ID_PLUGIN = "org.eclipse.equinox.p2.ui.discovery"; //$NON-NLS-1$
+
+	private static CommonColors commonColors;
+
+	private DiscoveryUi() {
+		// don't allow clients to instantiate
+	}
+
+	public static boolean install(List<CatalogItem> descriptors, IRunnableContext context) {
+		try {
+			IRunnableWithProgress runner = new DiscoveryInstallOperation(descriptors);
+			context.run(true, true, runner);
+		} catch (InvocationTargetException e) {
+			IStatus status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.ConnectorDiscoveryWizard_installProblems, new Object[] {e.getCause().getMessage()}), e.getCause());
+			StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
+			return false;
+		} catch (InterruptedException e) {
+			// canceled
+			return false;
+		}
+		return true;
+	}
+
+	public static CommonColors getCommonsColors() {
+		if (commonColors == null) {
+			commonColors = new CommonColors(Display.getDefault(), JFaceResources.getResources());
+		}
+		return commonColors;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java
new file mode 100644
index 0000000..e8b663a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.commands;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.commands.messages"; //$NON-NLS-1$
+
+	public static String ShowRepositoryCatalogCommandHandler_Location_not_valid_Error;
+
+	public static String ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		// constructor
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java
new file mode 100644
index 0000000..570bf29
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.commands;
+
+import java.util.*;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.Tag;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+
+/**
+ * A command that causes the {@link DiscoveryWizard} to appear in a dialog.
+ * 
+ * @author David Green
+ */
+public class ShowBundleCatalogCommandHandler extends AbstractHandler {
+
+	private static final String ID_PARAMETER_DIRECTORY = "org.eclipse.equinox.p2.ui.discovery.commands.DirectoryParameter"; //$NON-NLS-1$
+
+	private static final String ID_PARAMETER_TAGS = "org.eclipse.equinox.p2.ui.discovery.commands.TagsParameter"; //$NON-NLS-1$
+
+	public Object execute(ExecutionEvent event) {
+		Set<Tag> tags = new LinkedHashSet<Tag>();
+		String tagString = event.getParameter(ID_PARAMETER_TAGS);
+		if (tagString != null) {
+			String[] tagIds = tagString.split("\\s*,\\s*"); //$NON-NLS-1$
+			for (String id : tagIds) {
+				String[] text = id.split("=", 2); //$NON-NLS-1$
+				Tag tag;
+				if (text.length > 1) {
+					tag = new Tag(text[0], text[1]);
+				} else {
+					tag = new Tag(id, id);
+				}
+				tags.add(tag);
+			}
+		}
+
+		Catalog catalog = new Catalog();
+
+		// look for descriptors from installed bundles
+		catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
+
+		// look for remote descriptor
+		String directoryUrl = event.getParameter(ID_PARAMETER_DIRECTORY);
+		if (directoryUrl != null && directoryUrl.length() > 0) {
+			RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
+			remoteDiscoveryStrategy.setDirectoryUrl(directoryUrl);
+			catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
+		}
+
+		catalog.setEnvironment(DiscoveryCore.createEnvironment());
+		catalog.setVerifyUpdateSiteAvailability(true);
+		catalog.setTags(new ArrayList<Tag>(tags));
+
+		CatalogConfiguration configuration = new CatalogConfiguration();
+		configuration.setShowTagFilter(tags.size() > 0);
+		configuration.setSelectedTags(tags);
+
+		DiscoveryWizard wizard = new DiscoveryWizard(catalog, configuration);
+		WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard);
+		dialog.open();
+
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java
new file mode 100644
index 0000000..f4789b4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.commands;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.eclipse.core.commands.*;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.ui.discovery.repository.RepositoryDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * A command that causes the {@link DiscoveryWizard} to appear in a dialog.
+ * 
+ * @author Steffen Pingel
+ */
+public class ShowRepositoryCatalogCommandHandler extends AbstractHandler {
+
+	private static final String ID_PARAMETER_REPOSITORY = "org.eclipse.equinox.p2.ui.discovery.commands.RepositoryParameter"; //$NON-NLS-1$
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		String location = event.getParameter(ID_PARAMETER_REPOSITORY);
+		if (location == null) {
+			throw new ExecutionException(NLS.bind(Messages.ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error, ID_PARAMETER_REPOSITORY));
+		}
+		URI uri;
+		try {
+			uri = new URI(location);
+		} catch (URISyntaxException e) {
+			throw new ExecutionException(Messages.ShowRepositoryCatalogCommandHandler_Location_not_valid_Error, e);
+		}
+
+		Catalog catalog = new Catalog();
+
+		RepositoryDiscoveryStrategy strategy = new RepositoryDiscoveryStrategy();
+		strategy.addLocation(uri);
+		catalog.getDiscoveryStrategies().add(strategy);
+
+		catalog.setEnvironment(DiscoveryCore.createEnvironment());
+		catalog.setVerifyUpdateSiteAvailability(false);
+
+		CatalogConfiguration configuration = new CatalogConfiguration();
+		configuration.setShowTagFilter(false);
+
+		DiscoveryWizard wizard = new DiscoveryWizard(catalog, configuration);
+		WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard);
+		dialog.open();
+
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties
new file mode 100644
index 0000000..ec058da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties
@@ -0,0 +1,2 @@
+ShowRepositoryCatalogCommandHandler_Location_not_valid_Error=Repository location is not a valid URI
+ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error=Required parameter {0} not specified.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
new file mode 100644
index 0000000..0013101
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
@@ -0,0 +1,295 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     David Dubrow - fix for bug 313412 
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.operations;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.*;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A job that configures a p2 install action for installing one or more {@link CatalogItem
+ * connectors}. The bulk of the installation work is done by p2; this class just sets up the p2 repository meta-data and
+ * selects the appropriate features to install. After running the job the install action
+ * must be run to perform the installation.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class DiscoveryInstallOperation implements IRunnableWithProgress {
+
+	private final List<CatalogItem> installableConnectors;
+
+	private final ProvisioningUI provisioningUI;
+
+	private Set<URI> repositoryLocations;
+
+	public DiscoveryInstallOperation(List<CatalogItem> installableConnectors) {
+		if (installableConnectors == null || installableConnectors.isEmpty()) {
+			throw new IllegalArgumentException();
+		}
+		this.installableConnectors = new ArrayList<CatalogItem>(installableConnectors);
+		this.provisioningUI = ProvisioningUI.getDefaultUI();
+	}
+
+	public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
+		try {
+			SubMonitor monitor = SubMonitor.convert(progressMonitor, Messages.InstallConnectorsJob_task_configuring, 100);
+			try {
+				final IInstallableUnit[] ius = computeInstallableUnits(monitor.newChild(50));
+
+				checkCancelled(monitor);
+
+				final InstallOperation installOperation = resolve(monitor.newChild(50), ius, repositoryLocations.toArray(new URI[0]));
+
+				checkCancelled(monitor);
+
+				Display.getDefault().asyncExec(new Runnable() {
+					public void run() {
+						provisioningUI.openInstallWizard(Arrays.asList(ius), installOperation, null);
+					}
+				});
+			} finally {
+				monitor.done();
+			}
+		} catch (OperationCanceledException e) {
+			throw new InterruptedException();
+		} catch (Exception e) {
+			throw new InvocationTargetException(e);
+		}
+	}
+
+	private void checkCancelled(IProgressMonitor monitor) {
+		if (monitor.isCanceled()) {
+			throw new OperationCanceledException();
+		}
+	}
+
+	private InstallOperation resolve(IProgressMonitor monitor, final IInstallableUnit[] ius, URI[] repositories) throws CoreException {
+		final InstallOperation installOperation = provisioningUI.getInstallOperation(Arrays.asList(ius), repositories);
+		IStatus operationStatus = installOperation.resolveModal(new SubProgressMonitor(monitor, installableConnectors.size()));
+		if (operationStatus.getSeverity() > IStatus.WARNING) {
+			throw new CoreException(operationStatus);
+		}
+		return installOperation;
+	}
+
+	public IInstallableUnit[] computeInstallableUnits(SubMonitor monitor) throws CoreException {
+		try {
+			monitor.setWorkRemaining(100);
+			// add repository urls and load meta data
+			List<IMetadataRepository> repositories = addRepositories(monitor.newChild(50));
+			final List<IInstallableUnit> installableUnits = queryInstallableUnits(monitor.newChild(50), repositories);
+			removeOldVersions(installableUnits);
+			checkForUnavailable(installableUnits);
+			return installableUnits.toArray(new IInstallableUnit[installableUnits.size()]);
+
+			//			MultiStatus status = new MultiStatus(DiscoveryUi.ID_PLUGIN, 0, Messages.PrepareInstallProfileJob_ok, null);
+			//			ius = installableUnits.toArray(new IInstallableUnit[installableUnits.size()]);
+			//			ProfileChangeRequest profileChangeRequest = InstallAction.computeProfileChangeRequest(ius, profileId,
+			//					status, new SubProgressMonitor(monitor, installableConnectors.size()));
+			//			if (status.getSeverity() > IStatus.WARNING) {
+			//				throw new CoreException(status);
+			//			}
+			//			if (profileChangeRequest == null) {
+			//				// failed but no indication as to why
+			//				throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN,
+			//						Messages.PrepareInstallProfileJob_computeProfileChangeRequestFailed, null));
+			//			}
+			//			PlannerResolutionOperation operation = new PlannerResolutionOperation(
+			//					Messages.PrepareInstallProfileJob_calculatingRequirements, profileId, profileChangeRequest, null,
+			//					status, true);
+			//			IStatus operationStatus = operation.execute(new SubProgressMonitor(monitor, installableConnectors.size()));
+			//			if (operationStatus.getSeverity() > IStatus.WARNING) {
+			//				throw new CoreException(operationStatus);
+			//			}
+			//
+			//			plannerResolutionOperation = operation;
+
+		} catch (URISyntaxException e) {
+			// should never happen, since we already validated URLs.
+			throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.InstallConnectorsJob_unexpectedError_url, e));
+		} catch (MalformedURLException e) {
+			// should never happen, since we already validated URLs.
+			throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.InstallConnectorsJob_unexpectedError_url, e));
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/**
+	 * Verifies that we found what we were looking for: it's possible that we have connector descriptors that are no
+	 * longer available on their respective sites. In that case we must inform the user. Unfortunately this is the
+	 * earliest point at which we can know.
+	 */
+	private void checkForUnavailable(final List<IInstallableUnit> installableUnits) throws CoreException {
+		// at least one selected connector could not be found in a repository
+		Set<String> foundIds = new HashSet<String>();
+		for (IInstallableUnit unit : installableUnits) {
+			foundIds.add(unit.getId());
+		}
+
+		String message = ""; //$NON-NLS-1$
+		String detailedMessage = ""; //$NON-NLS-1$
+		for (CatalogItem descriptor : installableConnectors) {
+			StringBuilder unavailableIds = null;
+			for (String id : descriptor.getInstallableUnits()) {
+				if (!foundIds.contains(id)) {
+					if (unavailableIds == null) {
+						unavailableIds = new StringBuilder();
+					} else {
+						unavailableIds.append(Messages.InstallConnectorsJob_commaSeparator);
+					}
+					unavailableIds.append(id);
+				}
+			}
+			if (unavailableIds != null) {
+				if (message.length() > 0) {
+					message += Messages.InstallConnectorsJob_commaSeparator;
+				}
+				message += descriptor.getName();
+
+				if (detailedMessage.length() > 0) {
+					detailedMessage += Messages.InstallConnectorsJob_commaSeparator;
+				}
+				detailedMessage += NLS.bind(Messages.PrepareInstallProfileJob_notFoundDescriptorDetail, new Object[] {descriptor.getName(), unavailableIds.toString(), descriptor.getSiteUrl()});
+			}
+		}
+
+		if (message.length() > 0) {
+			// instead of aborting here we ask the user if they wish to proceed anyways
+			final boolean[] okayToProceed = new boolean[1];
+			final String finalMessage = message;
+			Display.getDefault().syncExec(new Runnable() {
+				public void run() {
+					okayToProceed[0] = MessageDialog.openQuestion(WorkbenchUtil.getShell(), Messages.InstallConnectorsJob_questionProceed, NLS.bind(Messages.InstallConnectorsJob_questionProceed_long, new Object[] {finalMessage}));
+				}
+			});
+			if (!okayToProceed[0]) {
+				throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.InstallConnectorsJob_connectorsNotAvailable, detailedMessage), null));
+			}
+		}
+	}
+
+	/**
+	 * Filters those installable units that have a duplicate in the list with a higher version number. it's possible
+	 * that some repositories will host multiple versions of a particular feature. we assume that the user wants the
+	 * highest version.
+	 */
+	private void removeOldVersions(final List<IInstallableUnit> installableUnits) {
+		Map<String, Version> symbolicNameToVersion = new HashMap<String, Version>();
+		for (IInstallableUnit unit : installableUnits) {
+			Version version = symbolicNameToVersion.get(unit.getId());
+			if (version == null || version.compareTo(unit.getVersion()) < 0) {
+				symbolicNameToVersion.put(unit.getId(), unit.getVersion());
+			}
+		}
+		if (symbolicNameToVersion.size() != installableUnits.size()) {
+			for (IInstallableUnit unit : new ArrayList<IInstallableUnit>(installableUnits)) {
+				Version version = symbolicNameToVersion.get(unit.getId());
+				if (!version.equals(unit.getVersion())) {
+					installableUnits.remove(unit);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Perform a query to get the installable units. This causes p2 to determine what features are available in each
+	 * repository. We select installable units by matching both the feature id and the repository; it is possible though
+	 * unlikely that the same feature id is available from more than one of the selected repositories, and we must
+	 * ensure that the user gets the one that they asked for.
+	 */
+	private List<IInstallableUnit> queryInstallableUnits(SubMonitor monitor, List<IMetadataRepository> repositories) throws URISyntaxException {
+		final List<IInstallableUnit> installableUnits = new ArrayList<IInstallableUnit>();
+
+		monitor.setWorkRemaining(repositories.size());
+		for (final IMetadataRepository repository : repositories) {
+			checkCancelled(monitor);
+			final Set<String> installableUnitIdsThisRepository = getDescriptorIds(repository);
+			IQueryResult<IInstallableUnit> result = repository.query(createInstalledIUsQuery(), monitor.newChild(1));
+			for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();) {
+				IInstallableUnit iu = iter.next();
+				String id = iu.getId();
+				if (installableUnitIdsThisRepository.contains(id))
+					installableUnits.add(iu);
+			}
+		}
+		return installableUnits;
+	}
+
+	protected IQuery<IInstallableUnit> createInstalledIUsQuery() {
+		return QueryUtil.createIUGroupQuery();
+	}
+
+	private List<IMetadataRepository> addRepositories(SubMonitor monitor) throws MalformedURLException, URISyntaxException, ProvisionException {
+		// tell p2 that it's okay to use these repositories
+		ProvisioningSession session = ProvisioningUI.getDefaultUI().getSession();
+		RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
+		repositoryLocations = new HashSet<URI>();
+		monitor.setWorkRemaining(installableConnectors.size() * 5);
+		for (CatalogItem descriptor : installableConnectors) {
+			URI uri = new URL(descriptor.getSiteUrl()).toURI();
+			if (repositoryLocations.add(uri)) {
+				checkCancelled(monitor);
+				repositoryTracker.addRepository(uri, null, session);
+				//					ProvisioningUtil.addMetaDataRepository(url.toURI(), true);
+				//					ProvisioningUtil.addArtifactRepository(url.toURI(), true);
+				//					ProvisioningUtil.setColocatedRepositoryEnablement(url.toURI(), true);
+			}
+			monitor.worked(1);
+		}
+
+		// fetch meta-data for these repositories
+		ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
+		monitor.setWorkRemaining(repositories.size());
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+		for (URI uri : repositoryLocations) {
+			checkCancelled(monitor);
+			IMetadataRepository repository = manager.loadRepository(uri, monitor.newChild(1));
+			repositories.add(repository);
+		}
+		return repositories;
+	}
+
+	private Set<String> getDescriptorIds(final IMetadataRepository repository) throws URISyntaxException {
+		final Set<String> installableUnitIdsThisRepository = new HashSet<String>();
+		// determine all installable units for this repository
+		for (CatalogItem descriptor : installableConnectors) {
+			try {
+				if (repository.getLocation().equals(new URL(descriptor.getSiteUrl()).toURI())) {
+					installableUnitIdsThisRepository.addAll(descriptor.getInstallableUnits());
+				}
+			} catch (MalformedURLException e) {
+				// will never happen, ignore
+			}
+		}
+		return installableUnitIdsThisRepository;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java
new file mode 100644
index 0000000..9976ba0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java
@@ -0,0 +1,205 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.repository;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * @author Steffen Pingel
+ */
+public class RepositoryDiscoveryStrategy extends AbstractDiscoveryStrategy {
+
+	private static final String IU_PROPERTY_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
+
+	private static final String PLUGIN_ID = "org.eclipse.equinox.p2.discovery.repository"; //$NON-NLS-1$
+
+	private final List<URI> locations;
+
+	private final Map<IMetadataRepository, RepositorySource> sourceByRepository;
+
+	private final Map<String, CatalogCategory> categoryById;
+
+	private final Map<String, CatalogItem> catalogItemById;
+
+	public RepositoryDiscoveryStrategy() {
+		this.locations = new ArrayList<URI>();
+		this.sourceByRepository = new HashMap<IMetadataRepository, RepositorySource>();
+		this.categoryById = new HashMap<String, CatalogCategory>();
+		this.catalogItemById = new HashMap<String, CatalogItem>();
+	}
+
+	public void addLocation(URI location) {
+		locations.add(location);
+	}
+
+	public void removeLocation(URI location) {
+		locations.remove(location);
+	}
+
+	@Override
+	public void performDiscovery(IProgressMonitor progressMonitor) throws CoreException {
+		// ignore
+		SubMonitor monitor = SubMonitor.convert(progressMonitor);
+		monitor.setWorkRemaining(100);
+		try {
+			List<IMetadataRepository> repositories = addRepositories(monitor.newChild(50));
+			queryInstallableUnits(monitor.newChild(50), repositories);
+			connectCategories();
+		} catch (ProvisionException e) {
+			throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, "Failed to process repository contents", e)); //$NON-NLS-1$
+		}
+	}
+
+	@SuppressWarnings("restriction")
+	private void connectCategories() {
+		for (CatalogCategory category : categories) {
+			if (category.getData() instanceof IInstallableUnit) {
+				IInstallableUnit categoryIU = (IInstallableUnit) category.getData();
+				Collection<IRequirement> required = categoryIU.getRequirements();
+				for (IRequirement requirement : required) {
+					if (requirement instanceof IRequiredCapability) {
+						IRequiredCapability capability = (IRequiredCapability) requirement;
+						CatalogItem item = catalogItemById.get(capability.getName());
+						if (item != null) {
+							item.setCategoryId(category.getId());
+						}
+					}
+				}
+			}
+		}
+	}
+
+	private List<IMetadataRepository> addRepositories(SubMonitor monitor) throws ProvisionException {
+		ProvisioningSession session = ProvisioningUI.getDefaultUI().getSession();
+
+		monitor.setWorkRemaining(locations.size());
+
+		RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
+		for (URI location : locations) {
+			repositoryTracker.addRepository(location, null, session);
+			monitor.worked(1);
+		}
+
+		// fetch meta-data for these repositories
+		ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+		for (URI uri : locations) {
+			IMetadataRepository repository = manager.loadRepository(uri, monitor.newChild(1));
+			repositories.add(repository);
+		}
+		return repositories;
+	}
+
+	private void checkCancelled(IProgressMonitor monitor) {
+		if (monitor.isCanceled()) {
+			throw new OperationCanceledException();
+		}
+	}
+
+	private void queryInstallableUnits(SubMonitor monitor, List<IMetadataRepository> repositories) {
+		monitor.setWorkRemaining(repositories.size());
+		for (final IMetadataRepository repository : repositories) {
+			checkCancelled(monitor);
+			IQuery<IInstallableUnit> query = QueryUtil.createMatchQuery(//
+					"id ~= /*.feature.group/ " + // //$NON-NLS-1$
+							"? providedCapabilities.exists(p | p.namespace == 'org.eclipse.equinox.p2.iu' && p.name ~= /*.feature.group/) " + // //$NON-NLS-1$
+							": properties['org.eclipse.equinox.p2.type.category'] == true"); //$NON-NLS-1$
+			IQueryResult<IInstallableUnit> result = repository.query(query, monitor.newChild(1));
+			for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();) {
+				process(repository, iter.next());
+			}
+		}
+	}
+
+	protected void process(IMetadataRepository repository, IInstallableUnit candidate) {
+		if (isCategory(candidate)) {
+			processCategory(repository, candidate);
+		} else {
+			processCatalogItem(repository, candidate);
+		}
+	}
+
+	private CatalogItem processCatalogItem(IMetadataRepository repository, IInstallableUnit candidate) {
+		CatalogItem item = catalogItemById.get(candidate.getId());
+		if (item != null) {
+			return item;
+		}
+
+		item = new CatalogItem();
+		item.setId(candidate.getId());
+		item.setDescription(getProperty(candidate, IInstallableUnit.PROP_DESCRIPTION));
+		item.setName(getProperty(candidate, IInstallableUnit.PROP_NAME));
+		item.setProvider(getProperty(candidate, IInstallableUnit.PROP_PROVIDER));
+		item.setSource(getSource(repository));
+		item.setData(candidate);
+		item.setSiteUrl(repository.getLocation().toString());
+		item.getInstallableUnits().add(item.getId());
+
+		catalogItemById.put(item.getId(), item);
+		items.add(item);
+		return item;
+	}
+
+	public String getProperty(IInstallableUnit candidate, String key) {
+		String value = TranslationSupport.getInstance().getIUProperty(candidate, key);
+		return (value != null) ? value : "";
+	}
+
+	private AbstractCatalogSource getSource(IMetadataRepository repository) {
+		RepositorySource source = sourceByRepository.get(repository);
+		if (source == null) {
+			source = new RepositorySource(repository);
+			sourceByRepository.put(repository, source);
+		}
+		return source;
+	}
+
+	private CatalogCategory processCategory(IMetadataRepository repository, IInstallableUnit candidate) {
+		CatalogCategory category = categoryById.get(candidate.getId());
+		if (category != null) {
+			return category;
+		}
+
+		category = new CatalogCategory();
+		category.setId(candidate.getId());
+		category.setDescription(getProperty(candidate, IInstallableUnit.PROP_DESCRIPTION));
+		category.setName(getProperty(candidate, IInstallableUnit.PROP_NAME));
+		category.setSource(getSource(repository));
+		category.setData(candidate);
+
+		categoryById.put(category.getId(), category);
+		categories.add(category);
+		return category;
+	}
+
+	private Boolean isCategory(IInstallableUnit candidate) {
+		return Boolean.valueOf(candidate.getProperty(IU_PROPERTY_CATEGORY));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java
new file mode 100644
index 0000000..7d2382f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.repository;
+
+import java.net.URL;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+
+/**
+ * @author Steffen Pingel
+ */
+public class RepositorySource extends AbstractCatalogSource {
+
+	private final IMetadataRepository repository;
+
+	public RepositorySource(IMetadataRepository repository) {
+		this.repository = repository;
+	}
+
+	@Override
+	public Object getId() {
+		return repository.getLocation();
+	}
+
+	@Override
+	public URL getResource(String resourceName) {
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java
new file mode 100644
index 0000000..65abd87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Benjamin Pasero - initial contribution from RSSOwl, bug 177974
+ *     Tasktop Technologies - improvements
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.jface.resource.DeviceResourceException;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Based on {org.eclipse.ui.forms.FormColors}.
+ * 
+ * @author Benjamin Pasero
+ * @author Mik Kersten
+ */
+public class CommonColors {
+
+	private final Display display;
+
+	private Color titleText;
+
+	private Color gradientBegin;
+
+	private Color gradientEnd;
+
+	private Color border;
+
+	private final ResourceManager resourceManager;
+
+	public CommonColors(Display display, ResourceManager resourceManager) {
+		this.display = display;
+		this.resourceManager = resourceManager;
+
+		createColors();
+	}
+
+	private void createColors() {
+		createBorderColor();
+		createGradientColors();
+		// previously used SWT.COLOR_TITLE_INACTIVE_FOREGROUND, but too light on Windows XP
+		titleText = getColor(resourceManager, getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
+	}
+
+	public Color getGradientBegin() {
+		return gradientBegin;
+	}
+
+	public Color getGradientEnd() {
+		return gradientEnd;
+	}
+
+	public Color getBorder() {
+		return border;
+	}
+
+	public Color getTitleText() {
+		return titleText;
+	}
+
+	private void createBorderColor() {
+		RGB tbBorder = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
+		RGB bg = getImpliedBackground().getRGB();
+
+		// Group 1
+		// Rule: If at least 2 of the RGB values are equal to or between 180 and
+		// 255, then apply specified opacity for Group 1
+		// Examples: Vista, XP Silver, Wn High Con #2
+		// Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
+		if (testTwoPrimaryColors(tbBorder, 179, 256)) {
+			tbBorder = blend(tbBorder, bg, 70);
+		} else if (testTwoPrimaryColors(tbBorder, 120, 180)) {
+			tbBorder = blend(tbBorder, bg, 50);
+		} else {
+			tbBorder = blend(tbBorder, bg, 30);
+		}
+
+		border = getColor(resourceManager, tbBorder);
+	}
+
+	private void createGradientColors() {
+		RGB titleBg = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
+		Color bgColor = getImpliedBackground();
+		RGB bg = bgColor.getRGB();
+		RGB bottom, top;
+
+		// Group 1
+		// Rule: If at least 2 of the RGB values are equal to or between 180 and
+		// 255, then apply specified opacity for Group 1
+		// Examples: Vista, XP Silver, Wn High Con #2
+		// Gradient Bottom = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
+		// Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+		if (testTwoPrimaryColors(titleBg, 179, 256)) {
+			bottom = blend(titleBg, bg, 30);
+			top = bg;
+		}
+
+		// Group 2
+		// Rule: If at least 2 of the RGB values are equal to or between 121 and
+		// 179, then apply specified opacity for Group 2
+		// Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
+		// Gradient Bottom = TITLE_BACKGROUND @ 20% Opacity over LIST_BACKGROUND
+		// Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+		else if (testTwoPrimaryColors(titleBg, 120, 180)) {
+			bottom = blend(titleBg, bg, 20);
+			top = bg;
+		}
+
+		// Group 3
+		// Rule: If at least 2 of the RGB values are equal to or between 0 and
+		// 120, then apply specified opacity for Group 3
+		// Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
+		// Aqua, Wn High Con White, Wn High Con #1
+		// Gradient Bottom = TITLE_BACKGROUND @ 10% Opacity over LIST_BACKGROUND
+		// Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
+		else {
+			bottom = blend(titleBg, bg, 10);
+			top = bg;
+		}
+
+		gradientBegin = getColor(resourceManager, top);
+		gradientEnd = getColor(resourceManager, bottom);
+	}
+
+	private RGB blend(RGB c1, RGB c2, int ratio) {
+		int r = blend(c1.red, c2.red, ratio);
+		int g = blend(c1.green, c2.green, ratio);
+		int b = blend(c1.blue, c2.blue, ratio);
+		return new RGB(r, g, b);
+	}
+
+	private int blend(int v1, int v2, int ratio) {
+		int b = (ratio * v1 + (100 - ratio) * v2) / 100;
+		return Math.min(255, b);
+	}
+
+	private boolean testTwoPrimaryColors(RGB rgb, int from, int to) {
+		int total = 0;
+		if (testPrimaryColor(rgb.red, from, to)) {
+			total++;
+		}
+		if (testPrimaryColor(rgb.green, from, to)) {
+			total++;
+		}
+		if (testPrimaryColor(rgb.blue, from, to)) {
+			total++;
+		}
+		return total >= 2;
+	}
+
+	private boolean testPrimaryColor(int value, int from, int to) {
+		return value > from && value < to;
+	}
+
+	private RGB getSystemColor(int code) {
+		return getDisplay().getSystemColor(code).getRGB();
+	}
+
+	private Color getImpliedBackground() {
+		return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+	}
+
+	private Display getDisplay() {
+		return display;
+	}
+
+	private Color getColor(ResourceManager manager, RGB rgb) {
+		try {
+			return manager.createColor(rgb);
+		} catch (DeviceResourceException e) {
+			return manager.getDevice().getSystemColor(SWT.COLOR_BLACK);
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java
new file mode 100644
index 0000000..c66e167
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - generalized ProgressInfoItem for reuse
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Based on {@link org.eclipse.ui.internal.progress.ProgressInfoItem}.
+ * 
+ * @author Steffen Pingel
+ */
+public abstract class ControlListItem<T> extends Composite {
+
+	static String DARK_COLOR_KEY = "org.eclipse.mylyn.commons.ui.ControlListItem.DARK_COLOR"; //$NON-NLS-1$
+
+	interface IndexListener {
+
+		/**
+		 * Select the item previous to the receiver.
+		 */
+		public void selectPrevious();
+
+		/**
+		 * Select the next previous to the receiver.
+		 */
+		public void selectNext();
+
+		/**
+		 * Select the receiver.
+		 */
+		public void select();
+
+		public void open();
+
+	}
+
+	IndexListener indexListener;
+
+	private int currentIndex;
+
+	private boolean selected;
+
+	private final MouseAdapter mouseListener;
+
+	private boolean isShowing = true;
+
+	private final MouseTrackAdapter mouseTrackListener;
+
+	private boolean hot;
+
+	static {
+		// Mac has different Gamma value
+		int shift = "carbon".equals(SWT.getPlatform()) ? -25 : -10;//$NON-NLS-1$ 
+
+		Color lightColor = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+
+		// Determine a dark color by shifting the list color
+		RGB darkRGB = new RGB(Math.max(0, lightColor.getRed() + shift), Math.max(0, lightColor.getGreen() + shift), Math.max(0, lightColor.getBlue() + shift));
+		JFaceResources.getColorRegistry().put(DARK_COLOR_KEY, darkRGB);
+	}
+
+	/**
+	 * Create a new instance of the receiver with the specified parent, style and info object/
+	 * 
+	 * @param parent
+	 * @param style
+	 * @param element
+	 */
+	public ControlListItem(Composite parent, int style, T element) {
+		super(parent, style | SWT.NO_FOCUS);
+		Assert.isNotNull(element);
+		super.setData(element);
+		setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
+		mouseListener = doCreateMouseListener();
+		mouseTrackListener = doCreateMouseTrackListener();
+		registerChild(this);
+		//		Control[] children = getChildren();
+		//		for (Control child : children) {
+		//			registerChild(child);
+		//		}
+		setHot(false);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public T getData() {
+		return (T) super.getData();
+	}
+
+	@Override
+	public void setData(Object data) {
+		throw new IllegalArgumentException();
+	}
+
+	private MouseTrackAdapter doCreateMouseTrackListener() {
+		return new MouseTrackAdapter() {
+			private int enterCount;
+
+			@Override
+			public void mouseEnter(MouseEvent e) {
+				enterCount++;
+				updateHotState();
+			}
+
+			@Override
+			public void mouseExit(MouseEvent e) {
+				enterCount--;
+				getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						if (!isDisposed()) {
+							updateHotState();
+						}
+					}
+				});
+			}
+
+			private void updateHotState() {
+				if (enterCount == 0) {
+					if (isHot()) {
+						setHot(false);
+					}
+				} else {
+					if (!isHot()) {
+						setHot(true);
+					}
+				}
+			}
+		};
+	}
+
+	private MouseAdapter doCreateMouseListener() {
+		return new MouseAdapter() {
+			@Override
+			public void mouseDown(MouseEvent e) {
+				if (indexListener != null) {
+					if (e.count == 2) {
+						indexListener.open();
+					} else {
+						indexListener.select();
+					}
+				}
+			}
+		};
+	}
+
+	public boolean isHot() {
+		return hot;
+	}
+
+	public void setHot(boolean hot) {
+		this.hot = hot;
+	}
+
+	protected void registerChild(Control child) {
+		child.addMouseListener(mouseListener);
+		child.addMouseTrackListener(mouseTrackListener);
+
+	}
+
+	/**
+	 * Refresh the contents of the receiver.
+	 */
+	protected abstract void refresh();
+
+	/**
+	 * Set the color base on the index
+	 * 
+	 * @param index
+	 */
+	public void updateColors(int index) {
+		currentIndex = index;
+
+		if (selected) {
+			setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION));
+			setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
+		} else {
+			if (index % 2 == 0) {
+				setBackground(JFaceResources.getColorRegistry().get(DARK_COLOR_KEY));
+			} else {
+				setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+			}
+			setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
+		}
+	}
+
+	@Override
+	public void setForeground(Color color) {
+		super.setForeground(color);
+		Control[] children = getChildren();
+		for (Control child : children) {
+			child.setForeground(color);
+		}
+	}
+
+	@Override
+	public void setBackground(Color color) {
+		super.setBackground(color);
+		Control[] children = getChildren();
+		for (Control child : children) {
+			child.setBackground(color);
+		}
+	}
+
+	/**
+	 * Set the selection colors.
+	 * 
+	 * @param select
+	 *            boolean that indicates whether or not to show selection.
+	 */
+	public void setSelected(boolean select) {
+		selected = select;
+		updateColors(currentIndex);
+	}
+
+	/**
+	 * Set the listener for index changes.
+	 * 
+	 * @param indexListener
+	 */
+	void setIndexListener(IndexListener indexListener) {
+		this.indexListener = indexListener;
+	}
+
+	/**
+	 * Return whether or not the receiver is selected.
+	 * 
+	 * @return boolean
+	 */
+	public boolean isSelected() {
+		return selected;
+	}
+
+	/**
+	 * Set whether or not the receiver is being displayed based on the top and bottom of the currently visible area.
+	 * 
+	 * @param top
+	 * @param bottom
+	 */
+	void setDisplayed(int top, int bottom) {
+		int itemTop = getLocation().y;
+		int itemBottom = itemTop + getBounds().height;
+		setDisplayed(itemTop <= bottom && itemBottom > top);
+
+	}
+
+	/**
+	 * Set whether or not the receiver is being displayed
+	 * 
+	 * @param displayed
+	 */
+	private void setDisplayed(boolean displayed) {
+		// See if this element has been turned off
+		boolean refresh = !isShowing && displayed;
+		isShowing = displayed;
+		if (refresh) {
+			refresh();
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
new file mode 100644
index 0000000..fc5a6ea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
@@ -0,0 +1,499 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import java.util.*;
+import java.util.List;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Based on {@link org.eclipse.ui.internal.progress.DetailedProgressViewer}.
+ * 
+ * @author Steffen Pingel
+ */
+ at SuppressWarnings("restriction")
+public abstract class ControlListViewer extends StructuredViewer {
+
+	Composite control;
+
+	private final ScrolledComposite scrolled;
+
+	private final Composite noEntryArea;
+
+	protected boolean hasFocus;
+
+	/**
+	 * Create a new instance of the receiver with a control that is a child of parent with style style.
+	 * 
+	 * @param parent
+	 * @param style
+	 */
+	public ControlListViewer(Composite parent, int style) {
+		scrolled = new ScrolledComposite(parent, style | SWT.VERTICAL);
+		int height = JFaceResources.getDefaultFont().getFontData()[0].getHeight();
+		scrolled.getVerticalBar().setIncrement(height * 2);
+		scrolled.setExpandHorizontal(true);
+		scrolled.setExpandVertical(true);
+		// bug 311276: can cause unintended scrolling of viewer
+		//scrolled.setShowFocusedControl(true);
+
+		control = new Composite(scrolled, SWT.NONE) {
+//			@Override
+//			public boolean setFocus() {
+//				forceFocus();
+//				return true;
+//			}
+
+			@Override
+			public void setVisible(boolean visible) {
+				super.setVisible(visible);
+				if (visible) {
+					updateSize(control);
+				}
+			}
+		};
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		layout.horizontalSpacing = 0;
+		layout.verticalSpacing = 0;
+		control.setLayout(layout);
+		control.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+		control.setBackgroundMode(SWT.INHERIT_FORCE);
+		control.addControlListener(new ControlListener() {
+			public void controlMoved(ControlEvent e) {
+				updateVisibleItems();
+			}
+
+			public void controlResized(ControlEvent e) {
+				updateVisibleItems();
+			}
+		});
+
+		scrolled.setContent(control);
+		hookControl(control);
+
+		noEntryArea = new Composite(scrolled, SWT.NONE);
+		doCreateNoEntryArea(noEntryArea);
+
+		scrolled.setExpandHorizontal(true);
+		scrolled.setExpandVertical(true);
+		scrolled.addControlListener(new ControlAdapter() {
+			@Override
+			public void controlResized(ControlEvent e) {
+				updateSize(scrolled.getContent());
+			}
+		});
+		control.addTraverseListener(new TraverseListener() {
+			private boolean handleEvent = true;
+
+			public void keyTraversed(TraverseEvent event) {
+				if (!handleEvent) {
+					return;
+				}
+				switch (event.detail) {
+					case SWT.TRAVERSE_ARROW_PREVIOUS : {
+						Control[] children = control.getChildren();
+						if (children.length > 0) {
+							boolean selected = false;
+							for (int i = 0; i < children.length; i++) {
+								ControlListItem item = (ControlListItem) children[i];
+								if (item.isSelected()) {
+									selected = true;
+									if (i > 0) {
+										setSelection(new StructuredSelection(children[i - 1].getData()), true);
+									}
+									break;
+								}
+							}
+							if (!selected) {
+								setSelection(new StructuredSelection(children[children.length - 1].getData()), true);
+							}
+						}
+						break;
+					}
+					case SWT.TRAVERSE_ARROW_NEXT : {
+						Control[] children = control.getChildren();
+						if (children.length > 0) {
+							boolean selected = false;
+							for (int i = 0; i < children.length; i++) {
+								ControlListItem item = (ControlListItem) children[i];
+								if (item.isSelected()) {
+									selected = true;
+									if (i < children.length - 1) {
+										setSelection(new StructuredSelection(children[i + 1].getData()), true);
+									}
+									break;
+								}
+							}
+							if (!selected) {
+								setSelection(new StructuredSelection(children[0].getData()), true);
+							}
+						}
+						break;
+					}
+					default :
+						handleEvent = false;
+						event.doit = true;
+						Control control = ControlListViewer.this.control;
+						Shell shell = control.getShell();
+						while (control != null) {
+							if (control.traverse(event.detail)) {
+								break;
+							}
+							if (!event.doit || control == shell) {
+								break;
+							}
+							control = control.getParent();
+						}
+						handleEvent = true;
+						break;
+				}
+			}
+		});
+	}
+
+	protected void doCreateNoEntryArea(Composite parent) {
+	}
+
+	public void add(Object[] elements) {
+		ViewerComparator sorter = getComparator();
+
+		// Use a Set in case we are getting something added that exists
+		Set<Object> newItems = new HashSet<Object>(elements.length);
+
+		Control[] existingChildren = control.getChildren();
+		for (Control element : existingChildren) {
+			if (element.getData() != null) {
+				newItems.add(element.getData());
+			}
+		}
+
+		for (Object element : elements) {
+			if (element != null) {
+				newItems.add(element);
+			}
+		}
+
+		Object[] infos = new Object[newItems.size()];
+		newItems.toArray(infos);
+
+		if (sorter != null) {
+			sorter.sort(this, infos);
+		}
+
+		// Update with the new elements to prevent flash
+		for (Control element : existingChildren) {
+			((ControlListItem) element).dispose();
+		}
+
+		for (int i = 0; i < infos.length; i++) {
+			ControlListItem item = createNewItem(infos[i]);
+			item.updateColors(i);
+		}
+
+		control.layout(true);
+		doUpdateContent();
+	}
+
+	private void updateSize(Control control) {
+		if (control == null) {
+			return;
+		}
+		// XXX need a small offset in case the list has a scroll bar
+		Point size = control.computeSize(scrolled.getClientArea().width - 20, SWT.DEFAULT, true);
+		control.setSize(size);
+		scrolled.setMinSize(size);
+	}
+
+	protected void doUpdateContent() {
+		if (control.getChildren().length > 0) {
+			updateSize(control);
+			scrolled.setContent(control);
+		} else {
+			updateSize(noEntryArea);
+			scrolled.setContent(noEntryArea);
+		}
+	}
+
+	/**
+	 * Create a new item for info.
+	 * 
+	 * @param element
+	 * @return ControlListItem
+	 */
+	private ControlListItem createNewItem(Object element) {
+		final ControlListItem item = doCreateItem(control, element);
+		//		item.getChildren()[0].addPaintListener(new PaintListener() {
+		//			public void paintControl(PaintEvent e) {
+		//				if (hasFocus && item.isSelected()) {
+		//					Point size = item.getSize();
+		//					e.gc.setForeground(e.gc.getDevice().getSystemColor(SWT.COLOR_DARK_GRAY));
+		//					e.gc.setLineDash(new int[] { 1, 2 });
+		//					e.gc.drawRoundRectangle(0, 0, size.x - 1, size.y - 1, 5, 5);
+		//				}
+		//			}
+		//		});
+		item.setIndexListener(new ControlListItem.IndexListener() {
+			public void selectNext() {
+				Control[] children = control.getChildren();
+				for (int i = 0; i < children.length; i++) {
+					if (item == children[i]) {
+						if (i < children.length - 1) {
+							setSelection(new StructuredSelection(children[i + 1].getData()));
+						}
+						break;
+					}
+				}
+			}
+
+			public void selectPrevious() {
+				Control[] children = control.getChildren();
+				for (int i = 0; i < children.length; i++) {
+					if (item == children[i]) {
+						if (i > 0) {
+							setSelection(new StructuredSelection(children[i - 1].getData()));
+						}
+						break;
+					}
+				}
+			}
+
+			public void select() {
+				setSelection(new StructuredSelection(item.getData()));
+				setFocus();
+			}
+
+			public void open() {
+				handleOpen();
+			}
+		});
+		GridDataFactory.fillDefaults().grab(true, false).applyTo(item);
+		// Refresh to populate with the current tasks
+		item.refresh();
+		return item;
+	}
+
+	protected abstract ControlListItem doCreateItem(Composite parent, Object element);
+
+	@Override
+	protected ControlListItem doFindInputItem(Object element) {
+		return null;
+	}
+
+	@Override
+	protected ControlListItem doFindItem(Object element) {
+		Control[] children = control.getChildren();
+		for (Control child : children) {
+			if (child.isDisposed() || child.getData() == null) {
+				continue;
+			}
+			if (child.getData().equals(element)) {
+				return (ControlListItem) child;
+			}
+		}
+		return null;
+	}
+
+	@Override
+	protected void doUpdateItem(Widget item, Object element, boolean fullMap) {
+		if (usingElementMap()) {
+			unmapElement(item);
+		}
+		item.dispose();
+		add(new Object[] {element});
+	}
+
+	@Override
+	public ScrolledComposite getControl() {
+		return scrolled;
+	}
+
+	@Override
+	protected List<?> getSelectionFromWidget() {
+		Control[] children = control.getChildren();
+		ArrayList<Object> selection = new ArrayList<Object>(children.length);
+		for (Control child : children) {
+			ControlListItem item = (ControlListItem) child;
+			if (item.isSelected() && item.getData() != null) {
+				selection.add(item.getData());
+			}
+		}
+		return selection;
+	}
+
+	protected void handleOpen() {
+		Control control = getControl();
+		if (control != null && !control.isDisposed()) {
+			ISelection selection = getSelection();
+			fireOpen(new OpenEvent(this, selection));
+		}
+	}
+
+	@Override
+	protected void inputChanged(Object input, Object oldInput) {
+		super.inputChanged(input, oldInput);
+		refreshAll();
+		doUpdateContent();
+	}
+
+	@Override
+	protected void internalRefresh(Object element) {
+		if (element == null) {
+			return;
+		}
+
+		if (element.equals(getRoot())) {
+			refreshAll();
+			return;
+		}
+		Widget widget = findItem(element);
+		if (widget == null) {
+			add(new Object[] {element});
+			return;
+		}
+		((ControlListItem) widget).refresh();
+
+		updateSize(control);
+	}
+
+	public void remove(Object[] elements) {
+		for (Object element : elements) {
+			Widget item = doFindItem(element);
+			if (item != null) {
+				unmapElement(element);
+				item.dispose();
+			}
+		}
+
+		Control[] existingChildren = control.getChildren();
+		for (int i = 0; i < existingChildren.length; i++) {
+			ControlListItem item = (ControlListItem) existingChildren[i];
+			item.updateColors(i);
+		}
+		control.layout(true);
+		doUpdateContent();
+	}
+
+	@Override
+	public void reveal(Object element) {
+		Control control = doFindItem(element);
+		if (control != null) {
+			revealControl(control);
+		}
+	}
+
+	private void revealControl(Control control) {
+		Rectangle clientArea = scrolled.getClientArea();
+		Point origin = scrolled.getOrigin();
+		Point location = control.getLocation();
+		Point size = control.getSize();
+		if (location.y + size.y > origin.y + clientArea.height) {
+			scrolled.setOrigin(origin.x, location.y + size.y - clientArea.height);
+		}
+		if (location.y < origin.y) {
+			scrolled.setOrigin(origin.x, location.y);
+		}
+	}
+
+	@SuppressWarnings({"unchecked", "rawtypes"})
+	@Override
+	protected void setSelectionToWidget(List list, boolean reveal) {
+		if (list != null) {
+			HashSet<Object> elements = new HashSet<Object>(list);
+			Control[] children = control.getChildren();
+			for (Control control : children) {
+				ControlListItem child = (ControlListItem) control;
+				boolean selected = elements.contains(child.getData());
+				if (selected != child.isSelected()) {
+					child.setSelected(selected);
+				}
+				if (reveal && selected) {
+					revealControl(child);
+					reveal = false;
+				}
+			}
+		} else {
+			Control[] children = control.getChildren();
+			for (Control control : children) {
+				ControlListItem child = (ControlListItem) control;
+				if (child.isSelected()) {
+					child.setSelected(false);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Set focus on the current selection.
+	 */
+	public void setFocus() {
+		Control[] children = control.getChildren();
+		if (children.length > 0) {
+			// causes the item's tool bar to get focus when clicked which is undesirable 
+			//			for (Control element : children) {
+			//				ControlListItem item = (ControlListItem) element;
+			//				if (item.isSelected()) {
+			//					if (item.setFocus()) {
+			//						return;
+			//					}
+			//				}
+			//			}
+			control.forceFocus();
+		} else {
+			noEntryArea.setFocus();
+		}
+	}
+
+	/**
+	 * Refresh everything as the root is being refreshed.
+	 */
+	private void refreshAll() {
+		Object[] infos = getSortedChildren(getRoot());
+		Control[] existingChildren = control.getChildren();
+
+		for (Control element : existingChildren) {
+			element.dispose();
+		}
+
+		for (int i = 0; i < infos.length; i++) {
+			ControlListItem item = createNewItem(infos[i]);
+			item.updateColors(i);
+		}
+
+		control.layout(true);
+		doUpdateContent();
+	}
+
+	/**
+	 * Set the virtual items to be visible or not depending on the displayed area.
+	 */
+	private void updateVisibleItems() {
+		Control[] children = control.getChildren();
+		int top = scrolled.getOrigin().y;
+		int bottom = top + scrolled.getParent().getBounds().height;
+		for (Control element : children) {
+			ControlListItem item = (ControlListItem) element;
+			item.setDisplayed(top, bottom);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java
new file mode 100644
index 0000000..6b78e39
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala - bug 187762
+ *     Mohamed Tarief - tarief at eg.ibm.com - IBM - Bug 174481
+ *     Tasktop Technologies - generalized filter code for structured viewers
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.progress.WorkbenchJob;
+
+/**
+ * Based on {@link org.eclipse.ui.dialogs.FilteredTree}.
+ * 
+ * @author Steffen Pingel
+ */
+public abstract class FilteredViewer {
+
+	private boolean automaticFind;
+
+	private Label clearFilterTextControl;
+
+	private Composite container;
+
+	TextSearchControl filterText;
+
+	private int minimumHeight;
+
+	String previousFilterText = ""; //$NON-NLS-1$
+
+	WorkbenchJob refreshJob;
+
+	private long refreshJobDelay = 200L;
+
+	private PatternFilter searchFilter;
+
+	protected StructuredViewer viewer;
+
+	private Composite header;
+
+	public FilteredViewer() {
+		setAutomaticFind(true);
+	}
+
+	void clearFilterText() {
+		filterText.getTextControl().setText(""); //$NON-NLS-1$
+		filterTextChanged();
+	}
+
+	public void createControl(Composite parent) {
+		container = new Composite(parent, SWT.NONE);
+		GridLayoutFactory.fillDefaults().margins(0, 0).applyTo(container);
+		container.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				if (refreshJob != null) {
+					refreshJob.cancel();
+				}
+			}
+		});
+
+		doCreateHeader();
+
+		viewer = doCreateViewer(container);
+		searchFilter = doCreateFilter();
+		viewer.addFilter(searchFilter);
+		GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, minimumHeight).applyTo(viewer.getControl());
+	}
+
+	protected PatternFilter doCreateFilter() {
+		return new PatternFilter() {
+			@Override
+			protected boolean isParentMatch(Viewer viewer, Object element) {
+				return false;
+			}
+		};
+	}
+
+	private void doCreateFindControl(Composite parent) {
+		Label label = new Label(parent, SWT.NONE);
+		label.setText(Messages.ConnectorDiscoveryWizardMainPage_filterLabel);
+		GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(label);
+
+		filterText = new TextSearchControl(parent, automaticFind);
+		if (automaticFind) {
+			filterText.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					filterTextChanged();
+				}
+			});
+		} else {
+			filterText.getTextControl().addTraverseListener(new TraverseListener() {
+				public void keyTraversed(TraverseEvent e) {
+					if (e.detail == SWT.TRAVERSE_RETURN) {
+						e.doit = false;
+						filterTextChanged();
+					}
+				}
+			});
+		}
+		filterText.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				if (e.detail == SWT.ICON_CANCEL) {
+					clearFilterText();
+				} else {
+					// search icon and enter
+					filterTextChanged();
+				}
+			}
+		});
+		GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(filterText);
+	}
+
+	private void doCreateHeader() {
+		header = new Composite(container, SWT.NONE);
+		GridLayoutFactory.fillDefaults().applyTo(header);
+		GridDataFactory.fillDefaults().grab(true, false).applyTo(header);
+
+		doCreateFindControl(header);
+		doCreateHeaderControls(header);
+
+		// arrange all header controls horizontally
+		GridLayoutFactory.fillDefaults().numColumns(header.getChildren().length).applyTo(header);
+	}
+
+	protected void doCreateHeaderControls(Composite parent) {
+		// ignore
+	}
+
+	public void setHeaderVisible(boolean visible) {
+		if (header != null && visible != header.getVisible()) {
+			header.setVisible(visible);
+			GridData headerLayout = (GridData) header.getLayoutData();
+			headerLayout.exclude = !visible;
+			container.layout(true, true);
+		}
+	}
+
+	public boolean isHeaderVisible() {
+		return header != null && header.getVisible();
+	}
+
+	protected WorkbenchJob doCreateRefreshJob() {
+		return new WorkbenchJob("filter") { //$NON-NLS-1$
+			@Override
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				if (filterText.isDisposed()) {
+					return Status.CANCEL_STATUS;
+				}
+				String text = filterText.getTextControl().getText();
+				text = text.trim();
+
+				if (!previousFilterText.equals(text)) {
+					previousFilterText = text;
+					doFind(text);
+				}
+				return Status.OK_STATUS;
+			}
+		};
+	}
+
+	protected abstract StructuredViewer doCreateViewer(Composite parent);
+
+	protected void doFind(String text) {
+		searchFilter.setPattern(text);
+		if (clearFilterTextControl != null) {
+			clearFilterTextControl.setVisible(text != null && text.length() != 0);
+		}
+		viewer.refresh(true);
+	}
+
+	/**
+	 * Invoked whenever the filter text is changed or the user otherwise causes the filter text to change.
+	 */
+	protected void filterTextChanged() {
+		if (refreshJob == null) {
+			refreshJob = doCreateRefreshJob();
+		} else {
+			refreshJob.cancel();
+		}
+		refreshJob.schedule(refreshJobDelay);
+	}
+
+	/**
+	 * Provides the text string of the search widget.
+	 */
+	protected String getFilterText() {
+		return filterText == null ? null : filterText.getTextControl().getText();
+	}
+
+	public Control getControl() {
+		return container;
+	}
+
+	public int getMinimumHeight() {
+		return minimumHeight;
+	}
+
+	protected long getRefreshJobDelay() {
+		return refreshJobDelay;
+	}
+
+	public StructuredViewer getViewer() {
+		return viewer;
+	}
+
+	public void setMinimumHeight(int minimumHeight) {
+		this.minimumHeight = minimumHeight;
+		if (viewer != null) {
+			GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, minimumHeight).applyTo(viewer.getControl());
+		}
+	}
+
+	protected void setRefreshJobDelay(long refreshJobDelay) {
+		this.refreshJobDelay = refreshJobDelay;
+	}
+
+	public final void setAutomaticFind(boolean automaticFind) {
+		if (filterText != null) {
+			throw new IllegalStateException("setAutomaticFind() needs be invoked before controls are created"); //$NON-NLS-1$
+		}
+		this.automaticFind = automaticFind;
+	}
+
+	public final boolean isAutomaticFind() {
+		return automaticFind;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java
new file mode 100644
index 0000000..2f47eb2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java
@@ -0,0 +1,334 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - extracted FormHeading implementation for Mylyn
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import java.util.Hashtable;
+import java.util.Map;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Based on org.eclipse.ui.internal.forms.widgets.FormHeading.
+ */
+public class GradientCanvas extends Canvas {
+
+	private static final int SEPARATOR = 1 << 1;
+
+	private static final int BOTTOM_SEPARATOR = 1 << 2;
+
+	private static final int BACKGROUND_IMAGE_TILED = 1 << 3;
+
+	public static final String COLOR_BASE_BG = "baseBg"; //$NON-NLS-1$
+
+	static String PREFIX = "org.eclipse.ui.forms."; //$NON-NLS-1$
+
+	static String H_PREFIX = PREFIX + "H_"; //$NON-NLS-1$
+
+	public static String H_BOTTOM_KEYLINE1 = H_PREFIX + "BOTTOM_KEYLINE1"; //$NON-NLS-1$
+
+	/**
+	 * Key for the form header bottom keyline 2 color.
+	 */
+	public static String H_BOTTOM_KEYLINE2 = H_PREFIX + "BOTTOM_KEYLINE2"; //$NON-NLS-1$
+
+	private Image backgroundImage;
+
+	private Image gradientImage;
+
+	Map<String, Color> colors = new Hashtable<String, Color>();
+
+	private int flags;
+
+	private GradientInfo gradientInfo;
+
+	private class GradientInfo {
+		Color[] gradientColors;
+
+		int[] percents;
+
+		boolean vertical;
+	}
+
+	@Override
+	public boolean forceFocus() {
+		return false;
+	}
+
+	/**
+	 * Creates the form content control as a child of the provided parent.
+	 * 
+	 * @param parent
+	 *            the parent widget
+	 */
+	public GradientCanvas(Composite parent, int style) {
+		super(parent, style);
+		setBackgroundMode(SWT.INHERIT_DEFAULT);
+		setSeparatorAlignment(SWT.BOTTOM);
+		addListener(SWT.Paint, new Listener() {
+			public void handleEvent(Event e) {
+				onPaint(e.gc);
+			}
+		});
+		addListener(SWT.Dispose, new Listener() {
+			public void handleEvent(Event e) {
+				if (gradientImage != null) {
+					// TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+					gradientImage.dispose();
+					gradientImage = null;
+				}
+			}
+		});
+		addListener(SWT.Resize, new Listener() {
+			public void handleEvent(Event e) {
+				if (gradientInfo != null || (backgroundImage != null && !isBackgroundImageTiled())) {
+					updateGradientImage();
+				}
+			}
+		});
+	}
+
+	@Override
+	public void setBackground(Color bg) {
+		super.setBackground(bg);
+		internalSetBackground(bg);
+	}
+
+	private void internalSetBackground(Color bg) {
+		putColor(COLOR_BASE_BG, bg);
+	}
+
+	public void setBackgroundGradient(Color[] gradientColors, int[] percents, boolean vertical) {
+		if (gradientColors != null) {
+			gradientInfo = new GradientInfo();
+			gradientInfo.gradientColors = gradientColors;
+			gradientInfo.percents = percents;
+			gradientInfo.vertical = vertical;
+			setBackground(null);
+			updateGradientImage();
+		} else {
+			// reset
+			gradientInfo = null;
+			if (gradientImage != null) {
+				// TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+				gradientImage.dispose();
+				gradientImage = null;
+				setBackgroundImage(null);
+			}
+		}
+	}
+
+	public void setHeadingBackgroundImage(Image image) {
+		this.backgroundImage = image;
+		if (image != null) {
+			setBackground(null);
+		}
+		if (isBackgroundImageTiled()) {
+			setBackgroundImage(image);
+		} else {
+			updateGradientImage();
+		}
+	}
+
+	public Image getHeadingBackgroundImage() {
+		return backgroundImage;
+	}
+
+	public void setBackgroundImageTiled(boolean tiled) {
+		if (tiled) {
+			flags |= BACKGROUND_IMAGE_TILED;
+		} else {
+			flags &= ~BACKGROUND_IMAGE_TILED;
+		}
+		setHeadingBackgroundImage(this.backgroundImage);
+	}
+
+	public boolean isBackgroundImageTiled() {
+		return (flags & BACKGROUND_IMAGE_TILED) != 0;
+	}
+
+	@Override
+	public void setBackgroundImage(Image image) {
+		super.setBackgroundImage(image);
+		if (image != null) {
+			internalSetBackground(null);
+		}
+	}
+
+	private void onPaint(GC gc) {
+		if (!isSeparatorVisible() && getBackgroundImage() == null) {
+			return;
+		}
+		Rectangle carea = getClientArea();
+		Image buffer = new Image(getDisplay(), carea.width, carea.height);
+		buffer.setBackground(getBackground());
+		GC igc = new GC(buffer);
+		igc.setBackground(getBackground());
+		igc.fillRectangle(0, 0, carea.width, carea.height);
+		if (getBackgroundImage() != null) {
+			if (gradientInfo != null) {
+				drawBackground(igc, carea.x, carea.y, carea.width, carea.height);
+			} else {
+				Image bgImage = getBackgroundImage();
+				Rectangle ibounds = bgImage.getBounds();
+				drawBackground(igc, carea.x, carea.y, ibounds.width, ibounds.height);
+			}
+		}
+
+		if (isSeparatorVisible()) {
+			drawSeparator(carea, igc);
+		}
+		igc.dispose();
+		gc.drawImage(buffer, carea.x, carea.y);
+		buffer.dispose();
+	}
+
+	private void drawSeparator(Rectangle carea, GC igc) {
+		// bg separator
+		if (hasColor(H_BOTTOM_KEYLINE1)) {
+			igc.setForeground(getColor(H_BOTTOM_KEYLINE1));
+		} else {
+			igc.setForeground(getBackground());
+		}
+		if (getSeparatorAlignment() == SWT.BOTTOM) {
+			igc.drawLine(carea.x, carea.height - 2, carea.x + carea.width - 1, carea.height - 2);
+		} else {
+			igc.drawLine(carea.x, 1, carea.x + carea.width - 1, 1);
+		}
+		if (hasColor(H_BOTTOM_KEYLINE2)) {
+			igc.setForeground(getColor(H_BOTTOM_KEYLINE2));
+		} else {
+			igc.setForeground(getForeground());
+		}
+		if (getSeparatorAlignment() == SWT.BOTTOM) {
+			igc.drawLine(carea.x, carea.height - 1, carea.x + carea.width - 1, carea.height - 1);
+		} else {
+			igc.drawLine(carea.x, 0, carea.x + carea.width - 1, 0);
+		}
+	}
+
+	private void updateGradientImage() {
+		Rectangle rect = getBounds();
+		if (gradientImage != null) {
+			// TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
+			gradientImage.dispose();
+			gradientImage = null;
+		}
+		if (gradientInfo != null) {
+			// TODO e3.4 use FormImages
+			//			gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents,
+			//					gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG));
+			boolean vertical = gradientInfo.vertical;
+			int width = vertical ? 1 : rect.width;
+			int height = vertical ? rect.height : 1;
+			gradientImage = new Image(getDisplay(), Math.max(width, 1), Math.max(height, 1));
+			GC gc = new GC(gradientImage);
+			drawTextGradient(gc, width, height);
+			gc.dispose();
+		} else if (backgroundImage != null && !isBackgroundImageTiled()) {
+			gradientImage = new Image(getDisplay(), Math.max(rect.width, 1), Math.max(rect.height, 1));
+			gradientImage.setBackground(getBackground());
+			GC gc = new GC(gradientImage);
+			gc.drawImage(backgroundImage, 0, 0);
+			gc.dispose();
+		}
+		setBackgroundImage(gradientImage);
+	}
+
+	private void drawTextGradient(GC gc, int width, int height) {
+		final Color oldBackground = gc.getBackground();
+		if (gradientInfo.gradientColors.length == 1) {
+			if (gradientInfo.gradientColors[0] != null) {
+				gc.setBackground(gradientInfo.gradientColors[0]);
+			}
+			gc.fillRectangle(0, 0, width, height);
+		} else {
+			final Color oldForeground = gc.getForeground();
+			Color lastColor = gradientInfo.gradientColors[0];
+			if (lastColor == null) {
+				lastColor = oldBackground;
+			}
+			int pos = 0;
+			for (int i = 0; i < gradientInfo.percents.length; ++i) {
+				gc.setForeground(lastColor);
+				lastColor = gradientInfo.gradientColors[i + 1];
+				if (lastColor == null) {
+					lastColor = oldBackground;
+				}
+				gc.setBackground(lastColor);
+				if (gradientInfo.vertical) {
+					final int gradientHeight = (gradientInfo.percents[i] * height / 100) - pos;
+					gc.fillGradientRectangle(0, pos, width, gradientHeight, true);
+					pos += gradientHeight;
+				} else {
+					final int gradientWidth = (gradientInfo.percents[i] * width / 100) - pos;
+					gc.fillGradientRectangle(pos, 0, gradientWidth, height, false);
+					pos += gradientWidth;
+				}
+			}
+			if (gradientInfo.vertical && pos < height) {
+				gc.setBackground(getColor(COLOR_BASE_BG));
+				gc.fillRectangle(0, pos, width, height - pos);
+			}
+			if (!gradientInfo.vertical && pos < width) {
+				gc.setBackground(getColor(COLOR_BASE_BG));
+				gc.fillRectangle(pos, 0, width - pos, height);
+			}
+
+			if (isSeparatorVisible()) {
+				drawSeparator(getClientArea(), gc);
+			}
+			gc.setForeground(oldForeground);
+		}
+	}
+
+	public boolean isSeparatorVisible() {
+		return (flags & SEPARATOR) != 0;
+	}
+
+	public void setSeparatorVisible(boolean addSeparator) {
+		if (addSeparator) {
+			flags |= SEPARATOR;
+		} else {
+			flags &= ~SEPARATOR;
+		}
+	}
+
+	public void setSeparatorAlignment(int alignment) {
+		if (alignment == SWT.BOTTOM) {
+			flags |= BOTTOM_SEPARATOR;
+		} else {
+			flags &= ~BOTTOM_SEPARATOR;
+		}
+	}
+
+	public int getSeparatorAlignment() {
+		return (flags & BOTTOM_SEPARATOR) != 0 ? SWT.BOTTOM : SWT.TOP;
+	}
+
+	public void putColor(String key, Color color) {
+		if (color == null) {
+			colors.remove(key);
+		} else {
+			colors.put(key, color);
+		}
+	}
+
+	public Color getColor(String key) {
+		return colors.get(key);
+	}
+
+	public boolean hasColor(String key) {
+		return colors.containsKey(key);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java
new file mode 100644
index 0000000..4f97659
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * A custom {@link ToolTip} that applies a gradient to the contents.
+ * 
+ * @author Shawn Minto
+ */
+public abstract class GradientToolTip extends ToolTip {
+
+	private CommonColors colors;
+
+	public GradientToolTip(Control control, int style, boolean manualActivation) {
+		super(control, style, manualActivation);
+		initResources(control);
+	}
+
+	public GradientToolTip(Control control) {
+		super(control);
+		initResources(control);
+	}
+
+	private void initResources(Control control) {
+		colors = DiscoveryUi.getCommonsColors();
+	}
+
+	@Override
+	protected final Composite createToolTipContentArea(Event event, final Composite parent) {
+		GradientCanvas gradient = new GradientCanvas(parent, SWT.NONE);
+		gradient.setSeparatorVisible(false);
+		GridLayout headLayout = new GridLayout();
+		headLayout.marginHeight = 0;
+		headLayout.marginWidth = 0;
+		headLayout.horizontalSpacing = 0;
+		headLayout.verticalSpacing = 0;
+		headLayout.numColumns = 1;
+		gradient.setLayout(headLayout);
+
+		gradient.setBackgroundGradient(new Color[] {colors.getGradientBegin(), colors.getGradientEnd()}, new int[] {100}, true);
+
+		createToolTipArea(event, gradient);
+
+		// force a null background so that the gradient shines through
+		for (Control c : gradient.getChildren()) {
+			setNullBackground(c);
+		}
+
+		return gradient;
+	}
+
+	private void setNullBackground(final Control outerCircle) {
+		outerCircle.setBackground(null);
+		if (outerCircle instanceof Composite) {
+			((Composite) outerCircle).setBackgroundMode(SWT.INHERIT_FORCE);
+			for (Control c : ((Composite) outerCircle).getChildren()) {
+				setNullBackground(c);
+			}
+		}
+	}
+
+	protected abstract Composite createToolTipArea(Event event, Composite parent);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java
new file mode 100644
index 0000000..94b3574
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+public class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.util.messages"; //$NON-NLS-1$
+
+	static {
+		// load message values from bundle file
+		reloadMessages();
+	}
+
+	public static void reloadMessages() {
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	public static String WorkbenchUtil_Browser_Initialization_Failed;
+
+	public static String WorkbenchUtil_Invalid_URL_Error;
+
+	public static String WorkbenchUtil_No_URL_Error;
+
+	public static String WorkbenchUtil_Open_Location_Title;
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
new file mode 100644
index 0000000..8c20dab
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - generalization for structured viewers
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import com.ibm.icu.text.BreakIterator;
+import java.util.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.ui.internal.misc.StringMatcher;
+
+/**
+ * A filter used in conjunction with <code>FilteredTree</code>. In order to determine if a node should be filtered it
+ * uses the content and label provider of the tree to do pattern matching on its children. This causes the entire tree
+ * structure to be realized. Note that the label provider must implement ILabelProvider.
+ * 
+ * @see org.eclipse.ui.dialogs.FilteredTree
+ * @since 3.2
+ */
+public class PatternFilter extends ViewerFilter {
+	/*
+	 * Cache of filtered elements in the tree
+	 */
+	private final Map cache = new HashMap();
+
+	/*
+	 * Maps parent elements to TRUE or FALSE
+	 */
+	private final Map foundAnyCache = new HashMap();
+
+	private boolean useCache = false;
+
+	/**
+	 * Whether to include a leading wildcard for all provided patterns. A trailing wildcard is always included.
+	 */
+	private boolean includeLeadingWildcard = false;
+
+	/**
+	 * The string pattern matcher used for this pattern filter.
+	 */
+	private StringMatcher matcher;
+
+	private boolean useEarlyReturnIfMatcherIsNull = true;
+
+	private static Object[] EMPTY = new Object[0];
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerFilter#filter(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object[])
+	 */
+	@Override
+	public final Object[] filter(Viewer viewer, Object parent, Object[] elements) {
+		// we don't want to optimize if we've extended the filter ... this
+		// needs to be addressed in 3.4
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
+		if (matcher == null && useEarlyReturnIfMatcherIsNull) {
+			return elements;
+		}
+
+		if (!useCache) {
+			return super.filter(viewer, parent, elements);
+		}
+
+		Object[] filtered = (Object[]) cache.get(parent);
+		if (filtered == null) {
+			Boolean foundAny = (Boolean) foundAnyCache.get(parent);
+			if (foundAny != null && !foundAny.booleanValue()) {
+				filtered = EMPTY;
+			} else {
+				filtered = super.filter(viewer, parent, elements);
+			}
+			cache.put(parent, filtered);
+		}
+		return filtered;
+	}
+
+	/**
+	 * Returns true if any of the elements makes it through the filter. This method uses caching if enabled; the
+	 * computation is done in computeAnyVisible.
+	 * 
+	 * @param viewer
+	 * @param parent
+	 * @param elements
+	 *            the elements (must not be an empty array)
+	 * @return true if any of the elements makes it through the filter.
+	 */
+	private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
+		if (matcher == null) {
+			return true;
+		}
+
+		if (!useCache) {
+			return computeAnyVisible(viewer, elements);
+		}
+
+		Object[] filtered = (Object[]) cache.get(parent);
+		if (filtered != null) {
+			return filtered.length > 0;
+		}
+		Boolean foundAny = (Boolean) foundAnyCache.get(parent);
+		if (foundAny == null) {
+			foundAny = computeAnyVisible(viewer, elements) ? Boolean.TRUE : Boolean.FALSE;
+			foundAnyCache.put(parent, foundAny);
+		}
+		return foundAny.booleanValue();
+	}
+
+	/**
+	 * Returns true if any of the elements makes it through the filter.
+	 * 
+	 * @param viewer
+	 *            the viewer
+	 * @param elements
+	 *            the elements to test
+	 * @return <code>true</code> if any of the elements makes it through the filter
+	 */
+	private boolean computeAnyVisible(Viewer viewer, Object[] elements) {
+		boolean elementFound = false;
+		for (int i = 0; i < elements.length && !elementFound; i++) {
+			Object element = elements[i];
+			elementFound = isElementVisible(viewer, element);
+		}
+		return elementFound;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	@Override
+	public final boolean select(Viewer viewer, Object parentElement, Object element) {
+		return isElementVisible(viewer, element);
+	}
+
+	/**
+	 * Sets whether a leading wildcard should be attached to each pattern string.
+	 * 
+	 * @param includeLeadingWildcard
+	 *            Whether a leading wildcard should be added.
+	 */
+	public final void setIncludeLeadingWildcard(final boolean includeLeadingWildcard) {
+		this.includeLeadingWildcard = includeLeadingWildcard;
+	}
+
+	/**
+	 * The pattern string for which this filter should select elements in the viewer.
+	 * 
+	 * @param patternString
+	 */
+	public void setPattern(String patternString) {
+		// these 2 strings allow the PatternFilter to be extended in
+		// 3.3 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
+		if ("org.eclipse.ui.keys.optimization.true".equals(patternString)) { //$NON-NLS-1$
+			useEarlyReturnIfMatcherIsNull = true;
+			return;
+		} else if ("org.eclipse.ui.keys.optimization.false".equals(patternString)) { //$NON-NLS-1$
+			useEarlyReturnIfMatcherIsNull = false;
+			return;
+		}
+		clearCaches();
+		if (patternString == null || patternString.equals("")) { //$NON-NLS-1$
+			matcher = null;
+		} else {
+			String pattern = patternString + "*"; //$NON-NLS-1$
+			if (includeLeadingWildcard) {
+				pattern = "*" + pattern; //$NON-NLS-1$
+			}
+			matcher = new StringMatcher(pattern, true, false);
+		}
+	}
+
+	/**
+	 * Clears the caches used for optimizing this filter. Needs to be called whenever the tree content changes.
+	 */
+	/* package */void clearCaches() {
+		cache.clear();
+		foundAnyCache.clear();
+	}
+
+	/**
+	 * Answers whether the given String matches the pattern.
+	 * 
+	 * @param string
+	 *            the String to test
+	 * @return whether the string matches the pattern
+	 */
+	private boolean match(String string) {
+		if (matcher == null) {
+			return true;
+		}
+		return matcher.match(string);
+	}
+
+	/**
+	 * Answers whether the given element is a valid selection in the filtered tree. For example, if a tree has items
+	 * that are categorized, the category itself may not be a valid selection since it is used merely to organize the
+	 * elements.
+	 * 
+	 * @param element
+	 * @return true if this element is eligible for automatic selection
+	 */
+	public boolean isElementSelectable(Object element) {
+		return element != null;
+	}
+
+	/**
+	 * Answers whether the given element in the given viewer matches the filter pattern. This is a default
+	 * implementation that will show a leaf element in the tree based on whether the provided filter text matches the
+	 * text of the given element's text, or that of it's children (if the element has any). Subclasses may override this
+	 * method.
+	 * 
+	 * @param viewer
+	 *            the tree viewer in which the element resides
+	 * @param element
+	 *            the element in the tree to check for a match
+	 * @return true if the element matches the filter pattern
+	 */
+	public boolean isElementVisible(Viewer viewer, Object element) {
+		return isParentMatch(viewer, element) || isLeafMatch(viewer, element);
+	}
+
+	/**
+	 * Check if the parent (category) is a match to the filter text. The default behavior returns true if the element
+	 * has at least one child element that is a match with the filter text. Subclasses may override this method.
+	 * 
+	 * @param viewer
+	 *            the viewer that contains the element
+	 * @param element
+	 *            the tree element to check
+	 * @return true if the given element has children that matches the filter text
+	 */
+	protected boolean isParentMatch(Viewer viewer, Object element) {
+		Object[] children = getChildren(element);
+
+		if ((children != null) && (children.length > 0)) {
+			return isAnyVisible(viewer, element, children);
+		}
+		return false;
+	}
+
+	protected Object[] getChildren(Object element) {
+		return null;
+	}
+
+	/**
+	 * Check if the current (leaf) element is a match with the filter text. The default behavior checks that the label
+	 * of the element is a match. Subclasses should override this method.
+	 * 
+	 * @param viewer
+	 *            the viewer that contains the element
+	 * @param element
+	 *            the tree element to check
+	 * @return true if the given element's label matches the filter text
+	 */
+	protected boolean isLeafMatch(Viewer viewer, Object element) {
+		String labelText = ((ILabelProvider) ((StructuredViewer) viewer).getLabelProvider()).getText(element);
+
+		if (labelText == null) {
+			return false;
+		}
+		return wordMatches(labelText);
+	}
+
+	/**
+	 * Take the given filter text and break it down into words using a BreakIterator.
+	 * 
+	 * @param text
+	 * @return an array of words
+	 */
+	private String[] getWords(String text) {
+		List words = new ArrayList();
+		// Break the text up into words, separating based on whitespace and
+		// common punctuation.
+		// Previously used String.split(..., "\\W"), where "\W" is a regular
+		// expression (see the Javadoc for class Pattern).
+		// Need to avoid both String.split and regular expressions, in order to
+		// compile against JCL Foundation (bug 80053).
+		// Also need to do this in an NL-sensitive way. The use of BreakIterator
+		// was suggested in bug 90579.
+		BreakIterator iter = BreakIterator.getWordInstance();
+		iter.setText(text);
+		int i = iter.first();
+		while (i != java.text.BreakIterator.DONE && i < text.length()) {
+			int j = iter.following(i);
+			if (j == java.text.BreakIterator.DONE) {
+				j = text.length();
+			}
+			// match the word
+			if (Character.isLetterOrDigit(text.charAt(i))) {
+				String word = text.substring(i, j);
+				words.add(word);
+			}
+			i = j;
+		}
+		return (String[]) words.toArray(new String[words.size()]);
+	}
+
+	/**
+	 * Return whether or not if any of the words in text satisfy the match critera.
+	 * 
+	 * @param text
+	 *            the text to match
+	 * @return boolean <code>true</code> if one of the words in text satisifes the match criteria.
+	 */
+	protected boolean wordMatches(String text) {
+		if (text == null) {
+			return false;
+		}
+
+		//If the whole text matches we are all set
+		if (match(text)) {
+			return true;
+		}
+
+		// Otherwise check if any of the words of the text matches
+		String[] words = getWords(text);
+		for (String word : words) {
+			if (match(word)) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Can be called by the filtered tree to turn on caching.
+	 * 
+	 * @param useCache
+	 *            The useCache to set.
+	 */
+	void setUseCache(boolean useCache) {
+		this.useCache = useCache;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java
new file mode 100644
index 0000000..e77d259
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import org.eclipse.core.commands.common.EventManager;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.*;
+
+/**
+ * Provides an simple implementation of {@link ISelectionProvider} that propagates selection events to registered
+ * listeners.
+ * 
+ * @author Steffen Pingel
+ */
+public class SelectionProviderAdapter extends EventManager implements ISelectionProvider, ISelectionChangedListener {
+
+	private ISelection selection;
+
+	/**
+	 * Constructs a <code>SelectionProviderAdapter</code> and initializes the selection to <code>selection</code>.
+	 * 
+	 * @param selection
+	 *            the initial selection
+	 * @see #setSelection(ISelection)
+	 */
+	public SelectionProviderAdapter(ISelection selection) {
+		setSelection(selection);
+	}
+
+	/**
+	 * Constructs a <code>SelectionProviderAdapter</code> with a <code>null</code> selection.
+	 */
+	public SelectionProviderAdapter() {
+	}
+
+	public void addSelectionChangedListener(ISelectionChangedListener listener) {
+		addListenerObject(listener);
+	}
+
+	public ISelection getSelection() {
+		return selection;
+	}
+
+	public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+		removeListenerObject(listener);
+	}
+
+	public void selectionChanged(final SelectionChangedEvent event) {
+		this.selection = event.getSelection();
+		Object[] listeners = getListeners();
+		for (int i = 0; i < listeners.length; ++i) {
+			final ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
+			SafeRunner.run(new SafeRunnable() {
+				public void run() {
+					listener.selectionChanged(event);
+				}
+			});
+		}
+	}
+
+	public void setSelection(ISelection selection) {
+		selectionChanged(new SelectionChangedEvent(this, selection));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
new file mode 100644
index 0000000..340744f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
@@ -0,0 +1,416 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import java.util.*;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * @author Shawn Minto
+ */
+public class TextSearchControl extends Composite {
+
+	private static final String FIND_TEXT_MEMENTO_ELEMENT = "text"; //$NON-NLS-1$
+
+	private static final String FIND_MEMENTO_ELEMENT = "historyItem"; //$NON-NLS-1$
+
+	private static final String FIND_MEMENTO_TYPE = "filteredTreeFindHistory"; //$NON-NLS-1$
+
+	private static final int MAX_HISTORY_ITEMS = 50;
+
+	/**
+	 * Image descriptor for enabled clear button.
+	 */
+	private static final String CLEAR_ICON = "org.eclipse.ui.internal.dialogs.CLEAR_ICON"; //$NON-NLS-1$
+
+	/**
+	 * Image descriptor for enabled clear button.
+	 */
+	private static final String FIND_ICON = "org.eclipse.ui.internal.dialogs.FIND_ICON"; //$NON-NLS-1$
+
+	/* SWT STYLE BIT AVAILABLE ON 3.5 AND HIGHER */
+	public static final int ICON_SEARCH = 1 << 9;
+
+	/* SWT STYLE BIT AVAILABLE ON 3.5 AND HIGHER */
+	public static final int ICON_CANCEL = 1 << 8;
+
+	/**
+	 * Get image descriptors for the clear button.
+	 */
+	static {
+		ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.gif"); //$NON-NLS-1$
+		if (descriptor != null) {
+			JFaceResources.getImageRegistry().put(CLEAR_ICON, descriptor);
+		}
+
+		descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(DiscoveryUi.ID_PLUGIN, "$nl$/icons/etool16/find.png"); //$NON-NLS-1$
+		if (descriptor != null) {
+			JFaceResources.getImageRegistry().put(FIND_ICON, descriptor);
+		}
+	}
+
+	private final Text textControl;
+
+	private Control clearControl;
+
+	private Control findControl;
+
+	private final boolean automaticFind;
+
+	private final Set<SelectionListener> selectionListeners = new HashSet<SelectionListener>();
+
+	private Collection<String> searchHistory = new LinkedHashSet<String>();
+
+	private boolean hasHistorySupport;
+
+	private static Boolean useNativeSearchField;
+
+	@SuppressWarnings("restriction")
+	public TextSearchControl(Composite parent, boolean automaticFind) {
+		super(parent, getCompositeStyle(automaticFind, parent));
+		this.automaticFind = automaticFind;
+
+		int textStyle = SWT.SINGLE;
+		int numColumns = 1;
+		if (useNativeSearchField(automaticFind, parent)) {
+			if (automaticFind) {
+				textStyle |= SWT.SEARCH | ICON_CANCEL;
+			} else {
+				textStyle |= SWT.SEARCH | ICON_SEARCH | ICON_CANCEL;
+			}
+		} else {
+			super.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+			super.setFont(parent.getFont());
+			numColumns = 2;
+			if (!automaticFind) {
+				numColumns += 1;
+			}
+		}
+		GridLayoutFactory.swtDefaults().margins(0, 0).extendedMargins(0, 0, 0, 0).spacing(0, 1).numColumns(numColumns).applyTo(this);
+
+		textControl = new Text(this, textStyle);
+
+		GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		textControl.setLayoutData(gridData);
+
+		if (useNativeSearchField == null || !useNativeSearchField) {
+			findControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(FIND_ICON), "Find", "Find", ICON_SEARCH);
+			clearControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(CLEAR_ICON), WorkbenchMessages.FilteredTree_ClearToolTip,//FilteredTree_AccessibleListenerClearButton,
+					WorkbenchMessages.FilteredTree_ClearToolTip, ICON_CANCEL);
+			addModifyListener(new ModifyListener() {
+
+				public void modifyText(ModifyEvent e) {
+					updateButtonVisibilityAndEnablement();
+
+				}
+			});
+			updateButtonVisibilityAndEnablement();
+		}
+
+		registerListeners();
+	}
+
+	public boolean hasHistorySupport() {
+		return hasHistorySupport;
+	}
+
+	private void registerListeners() {
+		addSelectionListener(new SelectionAdapter() {
+
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) {
+				if (textControl != null && !textControl.isDisposed()) {
+					addToSearchHistory(textControl.getText());
+				}
+
+			}
+		});
+		textControl.addFocusListener(new FocusAdapter() {
+
+			@Override
+			public void focusLost(FocusEvent e) {
+				if (textControl != null && !textControl.isDisposed()) {
+					addToSearchHistory(textControl.getText());
+				}
+			}
+		});
+	}
+
+	private static int getCompositeStyle(boolean automaticFind, Composite parent) {
+		if (useNativeSearchField(automaticFind, parent)) {
+			return SWT.NONE;
+		}
+		return SWT.BORDER;
+	}
+
+	private static boolean useNativeSearchField(boolean automaticFind, Composite parent) {
+		if (parent != null) {
+			if (useNativeSearchField == null) {
+				useNativeSearchField = Boolean.FALSE;
+				Text testText = null;
+				try {
+					int style = SWT.SEARCH | ICON_CANCEL;
+					if (automaticFind) {
+						style |= ICON_SEARCH;
+					}
+					testText = new Text(parent, style);
+					useNativeSearchField = new Boolean((testText.getStyle() & ICON_CANCEL) != 0 && (!automaticFind || (testText.getStyle() & ICON_SEARCH) != 0));
+				} finally {
+					if (testText != null) {
+						testText.dispose();
+					}
+				}
+
+			}
+		} else {
+			useNativeSearchField = Boolean.FALSE;
+		}
+		return useNativeSearchField.booleanValue();
+	}
+
+	private Control createLabelButtonControl(Composite parent, final Text textControl, ImageDescriptor activeImageDescriptor, final String accessibilityText, String toolTipText, final int detail) {
+
+		final Image nativeImage = parent.getDisplay().getSystemImage(detail);
+
+		final Image activeImage = nativeImage != null ? nativeImage : activeImageDescriptor.createImage();
+		final Image inactiveImage = new Image(parent.getDisplay(), activeImage, SWT.IMAGE_GRAY);
+		final Image pressedImage = inactiveImage;
+
+		final Label labelButton = new Label(parent, SWT.NONE);
+		labelButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
+		labelButton.setImage(inactiveImage);
+		labelButton.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+		labelButton.setToolTipText(toolTipText);
+		labelButton.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				if (nativeImage == null && activeImage != null && !activeImage.isDisposed()) {
+					activeImage.dispose();
+				}
+				if (inactiveImage != null && !inactiveImage.isDisposed()) {
+					inactiveImage.dispose();
+				}
+				if (pressedImage != null && !pressedImage.isDisposed()) {
+					pressedImage.dispose();
+				}
+			}
+		});
+		labelButton.addMouseListener(new MouseAdapter() {
+			private MouseMoveListener fMoveListener;
+
+			@Override
+			public void mouseDown(MouseEvent e) {
+				labelButton.setImage(pressedImage);
+				fMoveListener = new MouseMoveListener() {
+					private boolean fMouseInButton = true;
+
+					public void mouseMove(MouseEvent e) {
+						boolean mouseInButton = isMouseInButton(e);
+						if (mouseInButton != fMouseInButton) {
+							fMouseInButton = mouseInButton;
+							labelButton.setImage(mouseInButton ? pressedImage : inactiveImage);
+						}
+					}
+				};
+				labelButton.addMouseMoveListener(fMoveListener);
+			}
+
+			@Override
+			public void mouseUp(MouseEvent e) {
+				if (fMoveListener != null) {
+					labelButton.removeMouseMoveListener(fMoveListener);
+					fMoveListener = null;
+					boolean mouseInButton = isMouseInButton(e);
+					labelButton.setImage(mouseInButton ? activeImage : inactiveImage);
+					if (mouseInButton) {
+						if (textControl.isEnabled() && textControl.getText().length() > 0) {
+							notifySelectionChanged(detail);
+						}
+					}
+				}
+			}
+
+			private boolean isMouseInButton(MouseEvent e) {
+				Point buttonSize = labelButton.getSize();
+				return 0 <= e.x && e.x < buttonSize.x && 0 <= e.y && e.y < buttonSize.y;
+			}
+		});
+
+		labelButton.addMouseTrackListener(new MouseTrackListener() {
+			public void mouseEnter(MouseEvent e) {
+				if (labelButton.getImage() != activeImage) {
+					labelButton.setImage(activeImage);
+				}
+			}
+
+			public void mouseExit(MouseEvent e) {
+				if (labelButton.getImage() != inactiveImage) {
+					labelButton.setImage(inactiveImage);
+				}
+			}
+
+			public void mouseHover(MouseEvent e) {
+			}
+		});
+
+		labelButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			@Override
+			public void getName(AccessibleEvent e) {
+				e.result = accessibilityText;
+			}
+		});
+		labelButton.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+			@Override
+			public void getRole(AccessibleControlEvent e) {
+				e.detail = ACC.ROLE_PUSHBUTTON;
+			}
+		});
+		return labelButton;
+	}
+
+	public void addSelectionListener(SelectionListener listener) {
+		textControl.addSelectionListener(listener);
+		selectionListeners.add(listener);
+	}
+
+	public void removeSelectionListener(SelectionListener listener) {
+		textControl.removeSelectionListener(listener);
+		selectionListeners.remove(listener);
+	}
+
+	public void addModifyListener(ModifyListener listener) {
+		textControl.addModifyListener(listener);
+	}
+
+	public void removeModifyListener(ModifyListener listener) {
+		textControl.removeModifyListener(listener);
+	}
+
+	private void notifySelectionChanged(int detail) {
+		if (useNativeSearchField != null && useNativeSearchField) {
+			// notification should happen via the widgets selection listener
+			return;
+		}
+		Event event = new Event();
+		event.detail = detail;
+		event.widget = textControl;
+		event.display = textControl.getDisplay();
+
+		SelectionEvent e = new SelectionEvent(event);
+		for (Object element : selectionListeners) {
+			((SelectionListener) element).widgetDefaultSelected(e);
+		}
+	}
+
+	private void updateButtonVisibilityAndEnablement() {
+		if (textControl != null && !textControl.isDisposed()) {
+			boolean hasText = textControl.getText().length() > 0;
+
+			setFindButtonVisibility(!(hasText && automaticFind));
+			setClearButtonVisibility(hasText);
+		}
+	}
+
+	private void setFindButtonVisibility(boolean visible) {
+		if (findControl != null && !findControl.isDisposed()) {
+			findControl.setVisible(visible);
+			if (findControl.getLayoutData() instanceof GridData) {
+				((GridData) findControl.getLayoutData()).exclude = !visible;
+				findControl.getParent().layout();
+			}
+		}
+	}
+
+	private void setClearButtonVisibility(boolean visible) {
+		if (clearControl != null && !clearControl.isDisposed()) {
+			clearControl.setVisible(visible);
+			if (clearControl.getLayoutData() instanceof GridData) {
+				((GridData) clearControl.getLayoutData()).exclude = !visible;
+				clearControl.getParent().layout();
+			}
+		}
+	}
+
+	public Text getTextControl() {
+		return textControl;
+	}
+
+	@Override
+	public void setBackground(Color color) {
+		if (useNativeSearchField != null && useNativeSearchField) {
+			super.setBackground(color);
+		}
+	}
+
+	public Collection<String> getSearchHistory() {
+		return Collections.unmodifiableCollection(searchHistory);
+	}
+
+	void addToSearchHistory(String searchString) {
+		if (searchString != null && searchString.trim().length() > 0) {
+			searchHistory.remove(searchString);
+			searchHistory.add(searchString);
+		}
+	}
+
+	public void saveState(IMemento memento) {
+		if (memento == null) {
+			return;
+		}
+
+		IMemento rootMemento = memento.createChild(FIND_MEMENTO_TYPE);
+		int i = 0;
+		for (String text : searchHistory) {
+			IMemento child = rootMemento.createChild(FIND_MEMENTO_ELEMENT);
+			child.putString(FIND_TEXT_MEMENTO_ELEMENT, text);
+			i++;
+			if (i > MAX_HISTORY_ITEMS) {
+				break;
+			}
+		}
+	}
+
+	public void restoreState(IMemento memento) {
+		if (memento == null) {
+			return;
+		}
+		List<String> history = new ArrayList<String>();
+
+		IMemento rootMemento = memento.getChild(FIND_MEMENTO_TYPE);
+		if (rootMemento != null) {
+			IMemento[] children = rootMemento.getChildren(FIND_MEMENTO_ELEMENT);
+			if (children != null && children.length > 0) {
+				for (IMemento child : children) {
+					String historyItem = child.getString(FIND_TEXT_MEMENTO_ELEMENT);
+					// add to the end of the list
+					history.add(history.size(), historyItem);
+				}
+			}
+		}
+		if (history != null) {
+			searchHistory = history;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java
new file mode 100644
index 0000000..abb2a69
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     IBM Corporation - helper methods from 
+ *       org.eclipse.wst.common.frameworks.internal.ui.WTPActivityHelper 
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.util;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Calendar;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.*;
+import org.eclipse.ui.activities.IIdentifier;
+import org.eclipse.ui.activities.IWorkbenchActivitySupport;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.ui.internal.browser.WebBrowserPreference;
+import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
+
+/**
+ * @author Mik Kersten
+ * @author Steffen Pingel
+ */
+public class WorkbenchUtil {
+
+	/**
+	 * Return the modal shell that is currently open. If there isn't one then return null.
+	 * <p>
+	 * <b>Note: Applied from patch on bug 99472.</b>
+	 * 
+	 * @param shell
+	 *            A shell to exclude from the search. May be <code>null</code>.
+	 * @return Shell or <code>null</code>.
+	 */
+	private static Shell getModalShellExcluding(Shell shell) {
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		Shell[] shells = workbench.getDisplay().getShells();
+		int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
+		for (Shell shell2 : shells) {
+			if (shell2.equals(shell)) {
+				break;
+			}
+			// Do not worry about shells that will not block the user.
+			if (shell2.isVisible()) {
+				int style = shell2.getStyle();
+				if ((style & modal) != 0) {
+					return shell2;
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Utility method to get the best parenting possible for a dialog. If there is a modal shell create it so as to
+	 * avoid two modal dialogs. If not then return the shell of the active workbench window. If neither can be found
+	 * return null.
+	 * <p>
+	 * <b>Note: Applied from patch on bug 99472.</b>
+	 * 
+	 * @return Shell or <code>null</code>
+	 */
+	public static Shell getShell() {
+		if (!PlatformUI.isWorkbenchRunning() || PlatformUI.getWorkbench().isClosing()) {
+			return null;
+		}
+		Shell modal = getModalShellExcluding(null);
+		if (modal != null) {
+			return modal;
+		}
+		return getNonModalShell();
+	}
+
+	/**
+	 * Get the active non modal shell. If there isn't one return null.
+	 * <p>
+	 * <b>Note: Applied from patch on bug 99472.</b>
+	 * 
+	 * @return Shell
+	 */
+	private static Shell getNonModalShell() {
+		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (window == null) {
+			IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+			if (windows.length > 0) {
+				return windows[0].getShell();
+			}
+		} else {
+			return window.getShell();
+		}
+
+		return null;
+	}
+
+	/**
+	 * @return whether the UI is set up to filter contributions (has defined activity categories).
+	 */
+	public static final boolean isFiltering() {
+		return !PlatformUI.getWorkbench().getActivitySupport().getActivityManager().getDefinedActivityIds().isEmpty();
+	}
+
+	public static boolean allowUseOf(Object object) {
+		if (!isFiltering()) {
+			return true;
+		}
+		if (object instanceof IPluginContribution) {
+			IPluginContribution contribution = (IPluginContribution) object;
+			if (contribution.getPluginId() != null) {
+				IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
+				IIdentifier identifier = workbenchActivitySupport.getActivityManager().getIdentifier(createUnifiedId(contribution));
+				return identifier.isEnabled();
+			}
+		}
+		if (object instanceof String) {
+			IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
+			IIdentifier identifier = workbenchActivitySupport.getActivityManager().getIdentifier((String) object);
+			return identifier.isEnabled();
+		}
+		return true;
+	}
+
+	private static final String createUnifiedId(IPluginContribution contribution) {
+		if (contribution.getPluginId() != null) {
+			return contribution.getPluginId() + '/' + contribution.getLocalId();
+		}
+		return contribution.getLocalId();
+	}
+
+	/**
+	 * Opens <code>location</code> in a web-browser according to the Eclipse workbench preferences.
+	 * 
+	 * @param location
+	 *            the url to open
+	 * @see #openUrl(String, int)
+	 */
+	public static void openUrl(String location) {
+		openUrl(location, SWT.NONE);
+	}
+
+	/**
+	 * Opens <code>location</code> in a web-browser according to the Eclipse workbench preferences.
+	 * 
+	 * @param location
+	 *            the url to open
+	 * @param customFlags
+	 *            additional flags that are passed to {@link IWorkbenchBrowserSupport}, pass
+	 *            {@link IWorkbenchBrowserSupport#AS_EXTERNAL} to force opening external browser
+	 */
+	public static void openUrl(String location, int customFlags) {
+		try {
+			URL url = null;
+			if (location != null) {
+				url = new URL(location);
+			}
+			if (WebBrowserPreference.getBrowserChoice() == WebBrowserPreference.EXTERNAL || (customFlags & IWorkbenchBrowserSupport.AS_EXTERNAL) != 0) {
+				try {
+					IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
+					support.getExternalBrowser().openURL(url);
+				} catch (PartInitException e) {
+					Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_Browser_Initialization_Failed);
+					MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
+				}
+			} else {
+				IWebBrowser browser = null;
+				int flags = customFlags;
+				if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) {
+					flags |= IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR;
+				} else {
+					flags |= IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR;
+				}
+
+				String generatedId = "org.eclipse.mylyn.web.browser-" + Calendar.getInstance().getTimeInMillis(); //$NON-NLS-1$
+				browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, generatedId, null, null);
+				browser.openURL(url);
+			}
+		} catch (PartInitException e) {
+			Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_Browser_Initialization_Failed, e);
+			LogHelper.log(status);
+			MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
+		} catch (MalformedURLException e) {
+			if (location != null && location.trim().equals("")) { //$NON-NLS-1$
+				Status status = new Status(IStatus.WARNING, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_No_URL_Error, e);
+				MessageDialog.openWarning(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
+			} else {
+				Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.WorkbenchUtil_Invalid_URL_Error, location), e);
+				MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
+			}
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties
new file mode 100644
index 0000000..565b48d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+WorkbenchUtil_Browser_Initialization_Failed=Browser initialization failed.
+WorkbenchUtil_Invalid_URL_Error=Invalid URL specified: ''{0}''.
+WorkbenchUtil_No_URL_Error=No URL specified when opening browser.
+WorkbenchUtil_Open_Location_Title=Open Location
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java
new file mode 100644
index 0000000..3237d0c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.internal.p2.discovery.model.Overview;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * @author Steffen Pingel
+ */
+public abstract class AbstractDiscoveryItem<T> extends ControlListItem<T> {
+
+	protected final DiscoveryResources resources;
+
+	public AbstractDiscoveryItem(Composite parent, int style, DiscoveryResources resources, T element) {
+		super(parent, style, element);
+		this.resources = resources;
+	}
+
+	private void hookRecursively(Control control, Listener listener) {
+		control.addListener(SWT.Dispose, listener);
+		control.addListener(SWT.MouseHover, listener);
+		control.addListener(SWT.MouseMove, listener);
+		control.addListener(SWT.MouseExit, listener);
+		control.addListener(SWT.MouseDown, listener);
+		control.addListener(SWT.MouseWheel, listener);
+		if (control instanceof Composite) {
+			for (Control child : ((Composite) control).getChildren()) {
+				hookRecursively(child, listener);
+			}
+		}
+	}
+
+	protected void hookTooltip(final Control parent, final Widget tipActivator, final Control exitControl, final Control titleControl, AbstractCatalogSource source, Overview overview, Image image) {
+		final OverviewToolTip toolTip = new OverviewToolTip(parent, source, overview, image);
+		Listener listener = new Listener() {
+			public void handleEvent(Event event) {
+				switch (event.type) {
+					case SWT.MouseHover :
+						toolTip.show(titleControl);
+						break;
+					case SWT.Dispose :
+					case SWT.MouseWheel :
+						toolTip.hide();
+						break;
+				}
+
+			}
+		};
+		tipActivator.addListener(SWT.Dispose, listener);
+		tipActivator.addListener(SWT.MouseWheel, listener);
+		if (image != null) {
+			tipActivator.addListener(SWT.MouseHover, listener);
+		}
+		Listener selectionListener = new Listener() {
+			public void handleEvent(Event event) {
+				toolTip.show(titleControl);
+			}
+		};
+		tipActivator.addListener(SWT.Selection, selectionListener);
+		Listener exitListener = new Listener() {
+			public void handleEvent(Event event) {
+				switch (event.type) {
+					case SWT.MouseWheel :
+						toolTip.hide();
+						break;
+					case SWT.MouseExit :
+						/*
+						 * Check if the mouse exit happened because we move over the
+						 * tooltip
+						 */
+						Rectangle containerBounds = exitControl.getBounds();
+						Point displayLocation = exitControl.getParent().toDisplay(containerBounds.x, containerBounds.y);
+						containerBounds.x = displayLocation.x;
+						containerBounds.y = displayLocation.y;
+						if (containerBounds.contains(Display.getCurrent().getCursorLocation())) {
+							break;
+						}
+						toolTip.hide();
+						break;
+				}
+			}
+		};
+		hookRecursively(exitControl, exitListener);
+	}
+
+	@Override
+	public void updateColors(int index) {
+		// ignore
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java
new file mode 100644
index 0000000..33ea6e8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.discovery.model.Tag;
+
+/**
+ * A configuration for the discovery wizard that affects its presentation and behavior.
+ * 
+ * @author David Green
+ */
+public class CatalogConfiguration {
+
+	private final List<CatalogFilter> filters = new ArrayList<CatalogFilter>();
+
+	private boolean showCategories = true;
+
+	private boolean showInstalled = false;
+
+	private boolean showInstalledFilter = true;
+
+	private boolean showTagFilter = true;
+
+	private boolean showTextFilter = true;
+
+	private boolean verifyUpdateSiteAvailability = true;
+
+	private Set<Tag> selectedTags;
+
+	public List<CatalogFilter> getFilters() {
+		return filters;
+	}
+
+	public Set<Tag> getSelectedTags() {
+		return selectedTags;
+	}
+
+	public boolean isShowCategories() {
+		return showCategories;
+	}
+
+	public boolean isShowInstalled() {
+		return showInstalled;
+	}
+
+	public boolean isShowInstalledFilter() {
+		return showInstalledFilter;
+	}
+
+	public boolean isShowTagFilter() {
+		return showTagFilter;
+	}
+
+	/**
+	 * indicate if a text field should be provided to allow the user to filter connector descriptors
+	 */
+	public boolean isShowTextFilter() {
+		return showTextFilter;
+	}
+
+	public boolean isVerifyUpdateSiteAvailability() {
+		return verifyUpdateSiteAvailability;
+	}
+
+	public void setShowCategories(boolean showCategories) {
+		this.showCategories = showCategories;
+	}
+
+	public void setShowInstalled(boolean showInstalled) {
+		this.showInstalled = showInstalled;
+	}
+
+	public void setShowInstalledFilter(boolean showInstalledFilter) {
+		this.showInstalledFilter = showInstalledFilter;
+	}
+
+	public void setShowTagFilter(boolean showTagFilter) {
+		this.showTagFilter = showTagFilter;
+	}
+
+	/**
+	 * indicate if a text field should be provided to allow the user to filter connector descriptors
+	 */
+	public void setShowTextFilter(boolean showTextFilter) {
+		this.showTextFilter = showTextFilter;
+	}
+
+	public void setVerifyUpdateSiteAvailability(boolean verifyUpdateSiteAvailability) {
+		this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
+	}
+
+	public void setSelectedTags(Collection<Tag> selectedTags) {
+		if (selectedTags != null) {
+			this.selectedTags = new HashSet<Tag>(selectedTags);
+		} else {
+			this.selectedTags = null;
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java
new file mode 100644
index 0000000..36c652e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+
+/**
+ * @author David Green
+ */
+public abstract class CatalogFilter {
+
+	public abstract boolean select(CatalogItem item);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java
new file mode 100644
index 0000000..d1d31b3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *     David Green
+ *     Shawn Minto bug 275513
+ * 	   Steffen Pingel bug 276012 code review, bug 277191 gradient canvas
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.util.List;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * A wizard page that allows users to select connectors that they wish to install.
+ * 
+ * @see DiscoveryWizard
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class CatalogPage extends WizardPage implements IShellProvider {
+
+	protected static final int MINIMUM_HEIGHT = 480;
+
+	private final Catalog catalog;
+
+	private boolean updated;
+
+	private CatalogViewer viewer;
+
+	public CatalogPage(Catalog catalog) {
+		super(CatalogPage.class.getSimpleName());
+		this.catalog = catalog;
+		setPageComplete(false);
+		setTitle(Messages.ConnectorDiscoveryWizardMainPage_connectorDiscovery);
+		setDescription(Messages.ConnectorDiscoveryWizardMainPage_pageDescription);
+	}
+
+	public void createControl(Composite parent) {
+		viewer = doCreateViewer(parent);
+		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				setPageComplete(!viewer.getCheckedItems().isEmpty());
+			}
+		});
+		setControl(viewer.getControl());
+	}
+
+	protected CatalogViewer doCreateViewer(Composite parent) {
+		CatalogViewer viewer = new CatalogViewer(getCatalog(), this, getContainer(), getWizard().getConfiguration());
+		viewer.setMinimumHeight(MINIMUM_HEIGHT);
+		viewer.createControl(parent);
+		return viewer;
+	}
+
+	protected CatalogViewer getViewer() {
+		return viewer;
+	}
+
+	protected void doUpdateCatalog() {
+		if (!updated) {
+			updated = true;
+			Display.getCurrent().asyncExec(new Runnable() {
+				public void run() {
+					if (!getControl().isDisposed() && isCurrentPage()) {
+						viewer.updateCatalog();
+					}
+				}
+			});
+		}
+	}
+
+	public Catalog getCatalog() {
+		return catalog;
+	}
+
+	public List<CatalogItem> getInstallableConnectors() {
+		return viewer.getCheckedItems();
+	}
+
+	@Override
+	public DiscoveryWizard getWizard() {
+		return (DiscoveryWizard) super.getWizard();
+	}
+
+	@Override
+	public void setVisible(boolean visible) {
+		super.setVisible(visible);
+		if (visible) {
+			doUpdateCatalog();
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
new file mode 100644
index 0000000..6f7d1b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
@@ -0,0 +1,621 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+import java.util.List;
+import java.util.regex.Pattern;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.SiteVerifier;
+import org.eclipse.equinox.internal.p2.discovery.model.*;
+import org.eclipse.equinox.internal.p2.discovery.util.CatalogCategoryComparator;
+import org.eclipse.equinox.internal.p2.discovery.util.CatalogItemComparator;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * The main wizard page that allows users to select connectors that they wish to install.
+ * 
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class CatalogViewer extends FilteredViewer {
+
+	protected static class CatalogContentProvider implements ITreeContentProvider {
+
+		private Catalog catalog;
+
+		private boolean hasCategories;
+
+		public boolean hasCategories() {
+			return hasCategories;
+		}
+
+		public void setHasCategories(boolean hasCategories) {
+			this.hasCategories = hasCategories;
+		}
+
+		public void dispose() {
+			catalog = null;
+		}
+
+		public Catalog getCatalog() {
+			return catalog;
+		}
+
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement instanceof CatalogCategory) {
+				return ((CatalogCategory) parentElement).getItems().toArray();
+			}
+			return null;
+		}
+
+		public Object[] getElements(Object inputElement) {
+			if (catalog != null) {
+				List<Object> elements = new ArrayList<Object>();
+				if (hasCategories()) {
+					elements.addAll(catalog.getCategories());
+				}
+				elements.addAll(catalog.getItems());
+				return elements.toArray(new Object[0]);
+			}
+			return new Object[0];
+		}
+
+		public Object getParent(Object element) {
+			if (element instanceof CatalogCategory) {
+				return catalog;
+			}
+			if (element instanceof CatalogItem) {
+				return ((CatalogItem) element).getCategory();
+			}
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			if (element instanceof CatalogCategory) {
+				return ((CatalogCategory) element).getItems().size() > 0;
+			}
+			return false;
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+			this.catalog = (Catalog) newInput;
+		}
+
+	}
+
+	private class Filter extends ViewerFilter {
+
+		public Filter() {
+			// constructor
+		}
+
+		@Override
+		public boolean select(Viewer filteredViewer, Object parentElement, Object element) {
+			if (element instanceof CatalogItem) {
+				return doFilter((CatalogItem) element);
+			} else if (element instanceof CatalogCategory) {
+				// only show categories if at least one child is visible
+				CatalogCategory category = (CatalogCategory) element;
+				for (CatalogItem item : category.getItems()) {
+					if (doFilter(item)) {
+						return true;
+					}
+				}
+				return false;
+			}
+			return true;
+		}
+
+	}
+
+	private class FindFilter extends PatternFilter {
+
+		public FindFilter() {
+			// constructor
+		}
+
+		private boolean filterMatches(String text) {
+			return text != null && wordMatches(text);
+		}
+
+		@Override
+		protected Object[] getChildren(Object element) {
+			if (element instanceof CatalogCategory) {
+				return ((CatalogCategory) element).getItems().toArray();
+			}
+			return super.getChildren(element);
+		}
+
+		@Override
+		protected boolean isLeafMatch(Viewer filteredViewer, Object element) {
+			if (element instanceof CatalogItem) {
+				CatalogItem descriptor = (CatalogItem) element;
+				if (!(filterMatches(descriptor.getName()) || filterMatches(descriptor.getDescription()) || filterMatches(descriptor.getProvider()) || filterMatches(descriptor.getLicense()))) {
+					return false;
+				}
+				return true;
+			}
+			return false;
+		}
+
+	}
+
+	//	private class ConnectorBorderPaintListener implements PaintListener {
+	//		public void paintControl(PaintEvent e) {
+	//			Composite composite = (Composite) e.widget;
+	//			Rectangle bounds = composite.getBounds();
+	//			GC gc = e.gc;
+	//			gc.setLineStyle(SWT.LINE_DOT);
+	//			gc.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y);
+	//		}
+	//	}
+
+	private static final int DEFAULT_HEIGHT = 250;
+
+	final Catalog catalog;
+
+	private final List<CatalogItem> checkedItems = new ArrayList<CatalogItem>();
+
+	private boolean complete;
+
+	private final CatalogConfiguration configuration;
+
+	protected final IRunnableContext context;
+
+	boolean ignoreUpdates;
+
+	Set<String> installedFeatures;
+
+	DiscoveryResources resources;
+
+	private final SelectionProviderAdapter selectionProvider;
+
+	protected final IShellProvider shellProvider;
+
+	boolean showInstalled;
+
+	Button showInstalledCheckbox;
+
+	Set<Tag> visibleTags;
+
+	private boolean showCategories;
+
+	private CatalogContentProvider contentProvider;
+
+	public CatalogViewer(Catalog catalog, IShellProvider shellProvider, IRunnableContext context, CatalogConfiguration configuration) {
+		Assert.isNotNull(catalog);
+		Assert.isNotNull(shellProvider);
+		Assert.isNotNull(context);
+		Assert.isNotNull(configuration);
+		this.catalog = catalog;
+		this.shellProvider = shellProvider;
+		this.context = context;
+		this.configuration = configuration;
+		this.selectionProvider = new SelectionProviderAdapter();
+		this.showInstalled = configuration.isShowInstalled();
+		this.showCategories = configuration.isShowCategories();
+		if (configuration.getSelectedTags() != null) {
+			this.visibleTags = new HashSet<Tag>(configuration.getSelectedTags());
+		} else {
+			this.visibleTags = new HashSet<Tag>();
+		}
+		setMinimumHeight(DEFAULT_HEIGHT);
+		setComplete(false);
+	}
+
+	public void addSelectionChangedListener(ISelectionChangedListener listener) {
+		selectionProvider.addSelectionChangedListener(listener);
+	}
+
+	protected void catalogUpdated(boolean wasCancelled, boolean wasError) {
+		if (catalog != null && !wasCancelled && !wasError) {
+			doCheckCatalog();
+		}
+		viewer.setInput(catalog);
+		selectionProvider.setSelection(StructuredSelection.EMPTY);
+	}
+
+	protected void doCheckCatalog() {
+		int categoryWithConnectorCount = 0;
+		for (CatalogCategory category : catalog.getCategories()) {
+			categoryWithConnectorCount += category.getItems().size();
+		}
+		if (categoryWithConnectorCount == 0) {
+			// nothing was discovered: notify the user
+			MessageDialog.openWarning(getShell(), Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound, Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound_description);
+		}
+	}
+
+	protected IStatus computeStatus(InvocationTargetException e, String message) {
+		Throwable cause = e.getCause();
+		if (cause.getMessage() != null) {
+			message = NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_message_with_cause, message, cause.getMessage());
+		}
+		return new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, message, e);
+	}
+
+	protected Pattern createPattern(String filterText) {
+		if (filterText == null || filterText.length() == 0) {
+			return null;
+		}
+		String regex = filterText;
+		regex.replace("\\", "\\\\").replace("?", ".").replace("*", ".*?"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+		return Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
+	}
+
+	@Override
+	protected PatternFilter doCreateFilter() {
+		return new FindFilter();
+	}
+
+	@Override
+	protected void doCreateHeaderControls(Composite parent) {
+		if (configuration.isShowInstalledFilter()) {
+			showInstalledCheckbox = new Button(parent, SWT.CHECK);
+			showInstalledCheckbox.setSelection(showInstalled);
+			showInstalledCheckbox.setText(Messages.DiscoveryViewer_Show_Installed);
+			showInstalledCheckbox.addSelectionListener(new SelectionListener() {
+
+				public void widgetDefaultSelected(SelectionEvent e) {
+					widgetSelected(e);
+				}
+
+				public void widgetSelected(SelectionEvent e) {
+					if (ignoreUpdates) {
+						return;
+					}
+
+					ignoreUpdates = true;
+					setShowInstalled(showInstalledCheckbox.getSelection());
+					ignoreUpdates = false;
+				}
+			});
+		}
+		if (configuration.isShowTagFilter()) {
+			for (final Tag tag : catalog.getTags()) {
+				final Button checkbox = new Button(parent, SWT.CHECK);
+				checkbox.setSelection(visibleTags.contains(tag));
+				checkbox.setText(tag.getLabel());
+				checkbox.addSelectionListener(new SelectionListener() {
+					public void widgetDefaultSelected(SelectionEvent e) {
+						widgetSelected(e);
+					}
+
+					public void widgetSelected(SelectionEvent e) {
+						boolean selection = checkbox.getSelection();
+						if (selection) {
+							visibleTags.add(tag);
+						} else {
+							visibleTags.remove(tag);
+						}
+						refresh();
+					}
+				});
+			}
+		}
+	}
+
+	@Override
+	protected StructuredViewer doCreateViewer(Composite container) {
+		@SuppressWarnings("hiding")
+		StructuredViewer viewer = new ControlListViewer(container, SWT.BORDER) {
+			@Override
+			protected ControlListItem<?> doCreateItem(Composite parent, Object element) {
+				return doCreateViewerItem(parent, element);
+			}
+		};
+		contentProvider = doCreateContentProvider();
+		contentProvider.setHasCategories(isShowCategories());
+		viewer.setContentProvider(contentProvider);
+		viewer.setSorter(new ViewerSorter() {
+			CatalogCategoryComparator categoryComparator = new CatalogCategoryComparator();
+
+			CatalogItemComparator itemComparator = new CatalogItemComparator();
+
+			@Override
+			public int compare(@SuppressWarnings("hiding") Viewer viewer, Object o1, Object o2) {
+				CatalogCategory cat1 = getCategory(o1);
+				CatalogCategory cat2 = getCategory(o2);
+
+				// FIXME filter uncategorized items?
+				if (cat1 == null) {
+					return (cat2 != null) ? 1 : 0;
+				} else if (cat2 == null) {
+					return 1;
+				}
+
+				int i = categoryComparator.compare(cat1, cat2);
+				if (i == 0) {
+					if (o1 instanceof CatalogCategory) {
+						return -1;
+					}
+					if (o2 instanceof CatalogCategory) {
+						return 1;
+					}
+					if (cat1 == cat2 && o1 instanceof CatalogItem && o2 instanceof CatalogItem) {
+						return itemComparator.compare((CatalogItem) o1, (CatalogItem) o2);
+					}
+					return super.compare(viewer, o1, o2);
+				}
+				return i;
+			}
+
+			//					private int compare(Comparator<Object> comparator, Object key1, Object key2) {
+			//						if (key1 == null) {
+			//							return (key2 != null) ? 1 : 0;
+			//						} else if (key2 == null) {
+			//							return -1;
+			//						}
+			//						return comparator.compare(key1, key2);
+			//					}
+			private CatalogCategory getCategory(Object o) {
+				if (o instanceof CatalogCategory) {
+					return (CatalogCategory) o;
+				}
+				if (o instanceof CatalogItem) {
+					return ((CatalogItem) o).getCategory();
+				}
+				return null;
+			}
+		});
+
+		resources = new DiscoveryResources(container.getDisplay());
+		viewer.getControl().addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				resources.dispose();
+				if (catalog != null)
+					catalog.dispose();
+			}
+		});
+		viewer.addFilter(new Filter());
+		return viewer;
+	}
+
+	protected CatalogContentProvider doCreateContentProvider() {
+		return new CatalogContentProvider();
+	}
+
+	@SuppressWarnings({"rawtypes", "unchecked"})
+	protected ControlListItem<?> doCreateViewerItem(Composite parent, Object element) {
+		if (element instanceof CatalogItem) {
+			return new DiscoveryItem(parent, SWT.NONE, resources, shellProvider, (CatalogItem) element, this);
+		} else if (element instanceof CatalogCategory) {
+			return new CategoryItem(parent, SWT.NONE, resources, (CatalogCategory) element);
+		}
+		return null;
+	}
+
+	protected boolean doFilter(CatalogItem item) {
+		if (!showInstalled && item.isInstalled()) {
+			return false;
+		}
+
+		if (!isTagVisible(item)) {
+			return false;
+		}
+
+		for (CatalogFilter filter : configuration.getFilters()) {
+			if (!filter.select(item)) {
+				return false;
+			}
+		}
+
+		return true;
+	}
+
+	public Catalog getCatalog() {
+		return catalog;
+	}
+
+	public List<CatalogItem> getCheckedItems() {
+		return new ArrayList<CatalogItem>(checkedItems);
+	}
+
+	public CatalogConfiguration getConfiguration() {
+		return configuration;
+	}
+
+	protected Set<String> getInstalledFeatures(IProgressMonitor monitor) {
+		Set<String> features = new HashSet<String>();
+		IProfile profile = ProvUI.getProfileRegistry(ProvisioningUI.getDefaultUI().getSession()).getProfile(ProvisioningUI.getDefaultUI().getProfileId());
+		if (profile != null) {
+			IQueryResult<IInstallableUnit> result = profile.available(QueryUtil.createIUGroupQuery(), monitor);
+			for (Iterator<IInstallableUnit> it = result.iterator(); it.hasNext();) {
+				IInstallableUnit unit = it.next();
+				features.add(unit.getId());
+			}
+		}
+		return features;
+	}
+
+	protected DiscoveryResources getResources() {
+		return resources;
+	}
+
+	public IStructuredSelection getSelection() {
+		return (IStructuredSelection) selectionProvider.getSelection();
+	}
+
+	private Shell getShell() {
+		return shellProvider.getShell();
+	}
+
+	public boolean isComplete() {
+		return complete;
+	}
+
+	public boolean isShowCategories() {
+		return showCategories;
+	}
+
+	public boolean isShowInstalled() {
+		return showInstalled;
+	}
+
+	private boolean isTagVisible(CatalogItem item) {
+		if (!configuration.isShowTagFilter()) {
+			return true;
+		}
+		for (Tag selectedTag : visibleTags) {
+			for (Tag tag : item.getTags()) {
+				if (tag.equals(selectedTag)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	protected void modifySelection(final CatalogItem connector, boolean selected) {
+		modifySelectionInternal(connector, selected);
+		updateState();
+	}
+
+	private void modifySelectionInternal(final CatalogItem connector, boolean selected) {
+		connector.setSelected(selected);
+		if (selected) {
+			checkedItems.add(connector);
+		} else {
+			checkedItems.remove(connector);
+		}
+	}
+
+	protected void postDiscovery() {
+		for (CatalogItem connector : catalog.getItems()) {
+			connector.setInstalled(installedFeatures != null && installedFeatures.containsAll(connector.getInstallableUnits()));
+		}
+	}
+
+	public void refresh() {
+		if (viewer != null && !viewer.getControl().isDisposed()) {
+			viewer.refresh();
+		}
+	}
+
+	public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+		selectionProvider.removeSelectionChangedListener(listener);
+	}
+
+	public void setComplete(boolean complete) {
+		this.complete = complete;
+	}
+
+	public void setSelection(IStructuredSelection selection) {
+		Set<CatalogItem> selected = new HashSet<CatalogItem>();
+		for (Object descriptor : selection.toArray()) {
+			if (descriptor instanceof CatalogItem) {
+				selected.add((CatalogItem) descriptor);
+			}
+		}
+		for (CatalogItem connector : catalog.getItems()) {
+			modifySelectionInternal(connector, selected.contains(connector));
+		}
+		updateState();
+	}
+
+	public void setShowInstalled(boolean showInstalled) {
+		this.showInstalled = showInstalled;
+		showInstalledCheckbox.setSelection(showInstalled);
+		refresh();
+	}
+
+	public void setShowCategories(boolean showCategories) {
+		this.showCategories = showCategories;
+		if (contentProvider != null) {
+			contentProvider.setHasCategories(showCategories);
+			refresh();
+		}
+	}
+
+	public void updateCatalog() {
+		boolean wasCancelled = false;
+		boolean wasError = false;
+		try {
+			final IStatus[] result = new IStatus[1];
+			context.run(true, true, new IRunnableWithProgress() {
+				public void run(IProgressMonitor monitor) throws InterruptedException {
+					if (installedFeatures == null) {
+						installedFeatures = getInstalledFeatures(monitor);
+					}
+
+					result[0] = catalog.performDiscovery(monitor);
+					if (monitor.isCanceled()) {
+						throw new InterruptedException();
+					}
+
+					postDiscovery();
+				}
+			});
+
+			if (result[0] != null && !result[0].isOK()) {
+				StatusManager.getManager().handle(result[0], StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
+				wasError = true;
+			}
+		} catch (InvocationTargetException e) {
+			IStatus status = computeStatus(e, Messages.ConnectorDiscoveryWizardMainPage_unexpectedException);
+			StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
+			wasError = true;
+		} catch (InterruptedException e) {
+			// cancelled by user so nothing to do here.
+			wasCancelled = true;
+		}
+		if (catalog != null) {
+			catalogUpdated(wasCancelled, wasError);
+			verifyUpdateSiteAvailability();
+		}
+		// help UI tests
+		viewer.setData("discoveryComplete", "true"); //$NON-NLS-1$//$NON-NLS-2$
+	}
+
+	protected void verifyUpdateSiteAvailability() {
+		if (configuration.isVerifyUpdateSiteAvailability() && !catalog.getItems().isEmpty()) {
+			try {
+				context.run(true, true, new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						SiteVerifier verifier = new SiteVerifier(catalog);
+						verifier.verifySiteAvailability(monitor);
+					}
+				});
+			} catch (InvocationTargetException e) {
+				IStatus status = computeStatus(e, Messages.ConnectorDiscoveryWizardMainPage_unexpectedException);
+				StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
+			} catch (InterruptedException e) {
+				// cancelled by user so nothing to do here.
+			}
+		}
+	}
+
+	private void updateState() {
+		setComplete(!checkedItems.isEmpty());
+		selectionProvider.setSelection(new StructuredSelection(getCheckedItems()));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java
new file mode 100644
index 0000000..1731819
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.GradientCanvas;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * @author Steffen Pingel
+ */
+public class CategoryItem<T extends CatalogCategory> extends AbstractDiscoveryItem<T> {
+
+	public CategoryItem(Composite parent, int style, DiscoveryResources resources, T category) {
+		super(parent, style, resources, category);
+		createContent(category);
+	}
+
+	protected boolean hasTooltip(final CatalogCategory category) {
+		return category.getOverview() != null && category.getOverview().getSummary() != null && category.getOverview().getSummary().length() > 0;
+	}
+
+	private void createContent(T category) {
+		setLayout(new FillLayout());
+
+		final GradientCanvas categoryHeaderContainer = new GradientCanvas(this, SWT.NONE);
+		categoryHeaderContainer.setSeparatorVisible(true);
+		categoryHeaderContainer.setSeparatorAlignment(SWT.TOP);
+		categoryHeaderContainer.setBackgroundGradient(new Color[] {resources.getGradientBeginColor(), resources.getGradientEndColor()}, new int[] {100}, true);
+		categoryHeaderContainer.putColor(GradientCanvas.H_BOTTOM_KEYLINE1, resources.getGradientBeginColor());
+		categoryHeaderContainer.putColor(GradientCanvas.H_BOTTOM_KEYLINE2, resources.getGradientEndColor());
+
+		//GridDataFactory.fillDefaults().span(2, 1).applyTo(categoryHeaderContainer);
+		GridLayoutFactory.fillDefaults().numColumns(3).margins(5, 5).equalWidth(false).applyTo(categoryHeaderContainer);
+
+		Label iconLabel = new Label(categoryHeaderContainer, SWT.NULL);
+		if (category.getIcon() != null) {
+			iconLabel.setImage(resources.getIconImage(category.getSource(), category.getIcon(), 48, true));
+		}
+		iconLabel.setBackground(null);
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(iconLabel);
+
+		Label nameLabel = new Label(categoryHeaderContainer, SWT.NULL);
+		nameLabel.setFont(resources.getHeaderFont());
+		nameLabel.setText(category.getName());
+		nameLabel.setBackground(null);
+
+		GridDataFactory.fillDefaults().grab(true, false).applyTo(nameLabel);
+		if (hasTooltip(category)) {
+			ToolBar toolBar = new ToolBar(categoryHeaderContainer, SWT.FLAT);
+			toolBar.setBackground(null);
+			ToolItem infoButton = new ToolItem(toolBar, SWT.PUSH);
+			infoButton.setImage(resources.getInfoImage());
+			infoButton.setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
+			hookTooltip(toolBar, infoButton, categoryHeaderContainer, nameLabel, category.getSource(), category.getOverview(), null);
+			GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
+		} else {
+			new Label(categoryHeaderContainer, SWT.NULL).setText(" "); //$NON-NLS-1$
+		}
+		if (category.getDescription() != null) {
+			Label description = new Label(categoryHeaderContainer, SWT.WRAP);
+			GridDataFactory.fillDefaults().grab(true, false).span(2, 1).hint(100, SWT.DEFAULT).applyTo(description);
+			description.setBackground(null);
+			description.setText(category.getDescription());
+		}
+	}
+
+	@Override
+	protected void refresh() {
+		// ignore
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java
new file mode 100644
index 0000000..e0d3b3f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java
@@ -0,0 +1,246 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.discovery.model.Overview;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+/**
+ * @author Steffen Pingel
+ */
+public class DiscoveryItem<T extends CatalogItem> extends AbstractDiscoveryItem<T> implements PropertyChangeListener {
+
+	Button checkbox;
+
+	private Composite checkboxContainer;
+
+	private final CatalogItem item;
+
+	private Label description;
+
+	private Label iconLabel;
+
+	private ToolItem infoButton;
+
+	private Label nameLabel;
+
+	private Link providerLabel;
+
+	private final IShellProvider shellProvider;
+
+	private final CatalogViewer viewer;
+
+	public DiscoveryItem(Composite parent, int style, DiscoveryResources resources, IShellProvider shellProvider, final T item, CatalogViewer viewer) {
+		super(parent, style, resources, item);
+		this.shellProvider = shellProvider;
+		this.item = item;
+		this.viewer = viewer;
+		item.addPropertyChangeListener(this);
+		this.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				item.removePropertyChangeListener(DiscoveryItem.this);
+			}
+		});
+		createContent();
+		initializeListeners();
+	}
+
+	private void createContent() {
+		GridLayout layout = new GridLayout(3, false);
+		layout.marginLeft = 7;
+		layout.marginTop = 2;
+		layout.marginBottom = 2;
+		setLayout(layout);
+
+		checkboxContainer = new Composite(this, SWT.INHERIT_NONE);
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(checkboxContainer);
+		GridLayoutFactory.fillDefaults().spacing(1, 1).numColumns(2).applyTo(checkboxContainer);
+
+		checkbox = new Button(checkboxContainer, SWT.CHECK | SWT.INHERIT_FORCE);
+		checkbox.setSelection(item.isSelected());
+		checkbox.setText(" "); //$NON-NLS-1$
+		// help UI tests
+		checkbox.setData("connectorId", item.getId()); //$NON-NLS-1$
+		// FIXME
+		//		checkbox.addFocusListener(new FocusAdapter() {
+		//			@Override
+		//			public void focusGained(FocusEvent e) {
+		//				bodyScrolledComposite.showControl(this);
+		//			}
+		//		});
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(checkbox);
+
+		iconLabel = new Label(checkboxContainer, SWT.NONE);
+		GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(iconLabel);
+		if (item.getIcon() != null) {
+			iconLabel.setImage(resources.getIconImage(item.getSource(), item.getIcon(), 32, false));
+		}
+
+		nameLabel = new Label(this, SWT.NONE);
+		GridDataFactory.fillDefaults().grab(true, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(nameLabel);
+		nameLabel.setFont(resources.getSmallHeaderFont());
+		if (item.isInstalled()) {
+			nameLabel.setText(NLS.bind(Messages.DiscoveryItem_Extension_installed, item.getName()));
+		} else {
+			nameLabel.setText(item.getName());
+		}
+
+		if (hasTooltip()) {
+			ToolBar toolBar = new ToolBar(this, SWT.FLAT);
+			GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
+
+			infoButton = new ToolItem(toolBar, SWT.PUSH);
+			infoButton.setImage(resources.getInfoImage());
+			infoButton.setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
+			hookTooltip(toolBar, infoButton, this, nameLabel, item.getSource(), item.getOverview(), null);
+		} else {
+			Label label = new Label(this, SWT.NULL);
+			label.setText(" "); //$NON-NLS-1$
+		}
+
+		description = new Label(this, SWT.NULL | SWT.WRAP);
+		GridDataFactory.fillDefaults().grab(true, false).span(3, 1).hint(100, SWT.DEFAULT).applyTo(description);
+		String descriptionText = item.getDescription();
+		int maxDescriptionLength = 162;
+		if (descriptionText == null) {
+			descriptionText = ""; //$NON-NLS-1$
+		}
+		if (descriptionText.length() > maxDescriptionLength) {
+			descriptionText = descriptionText.substring(0, maxDescriptionLength);
+		}
+		description.setText(descriptionText.replaceAll("(\\r\\n)|\\n|\\r", " ")); //$NON-NLS-1$ //$NON-NLS-2$
+
+		createProviderLabel();
+	}
+
+	public void createProviderLabel() {
+		providerLabel = new Link(this, SWT.RIGHT);
+		GridDataFactory.fillDefaults().span(3, 1).align(SWT.BEGINNING, SWT.CENTER).applyTo(providerLabel);
+		// always disabled color to make it less prominent
+		providerLabel.setForeground(resources.getColorDisabled());
+		if (item.getCertification() != null) {
+			providerLabel.setText(NLS.bind(Messages.DiscoveryViewer_Certification_Label0, new String[] {item.getProvider(), item.getLicense(), item.getCertification().getName()}));
+			if (item.getCertification().getUrl() != null) {
+				providerLabel.addSelectionListener(new SelectionAdapter() {
+					@Override
+					public void widgetSelected(SelectionEvent e) {
+						WorkbenchUtil.openUrl(item.getCertification().getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
+					}
+				});
+			}
+			Overview overview = new Overview();
+			overview.setSummary(item.getCertification().getDescription());
+			overview.setUrl(item.getCertification().getUrl());
+			Image image = resources.getIconImage(item.getSource(), item.getCertification().getIcon(), 48, true);
+			hookTooltip(providerLabel, providerLabel, this, providerLabel, item.getSource(), overview, image);
+		} else if (item.getLicense() != null) {
+			providerLabel.setText(NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_provider_and_license, item.getProvider(), item.getLicense()));
+		} else {
+			providerLabel.setText(item.getProvider());
+		}
+	}
+
+	protected boolean hasTooltip() {
+		return item.getOverview() != null && item.getOverview().getSummary() != null && item.getOverview().getSummary().length() > 0;
+	}
+
+	public void initializeListeners() {
+		checkbox.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				widgetSelected(e);
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				boolean selected = checkbox.getSelection();
+				maybeModifySelection(selected);
+			}
+		});
+		MouseListener connectorItemMouseListener = new MouseAdapter() {
+			@Override
+			public void mouseUp(MouseEvent e) {
+				boolean selected = !checkbox.getSelection();
+				if (maybeModifySelection(selected)) {
+					checkbox.setSelection(selected);
+				}
+			}
+		};
+		checkboxContainer.addMouseListener(connectorItemMouseListener);
+		this.addMouseListener(connectorItemMouseListener);
+		iconLabel.addMouseListener(connectorItemMouseListener);
+		nameLabel.addMouseListener(connectorItemMouseListener);
+		// the provider has clickable links
+		//providerLabel.addMouseListener(connectorItemMouseListener);
+		description.addMouseListener(connectorItemMouseListener);
+	}
+
+	protected boolean maybeModifySelection(boolean selected) {
+		if (selected) {
+			if (item.isInstalled()) {
+				MessageDialog.openWarning(shellProvider.getShell(), Messages.DiscoveryItem_Connector_already_installed_Error_Title, NLS.bind(Messages.DiscoveryItem_Connector_already_installed_Error_Message, item.getName()));
+				return false;
+			}
+			if (item.getAvailable() != null && !item.getAvailable()) {
+				MessageDialog.openWarning(shellProvider.getShell(), Messages.ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable, NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable, item.getName()));
+				return false;
+			}
+		}
+		viewer.modifySelection(item, selected);
+		return true;
+	}
+
+	public void propertyChange(PropertyChangeEvent evt) {
+		if (!isDisposed()) {
+			getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					if (!isDisposed()) {
+						refresh();
+					}
+				}
+			});
+		}
+	}
+
+	@Override
+	protected void refresh() {
+		boolean enabled = !item.isInstalled() && (item.getAvailable() == null || item.getAvailable());
+
+		checkbox.setEnabled(enabled);
+		nameLabel.setEnabled(enabled);
+		providerLabel.setEnabled(enabled);
+		description.setEnabled(enabled);
+
+		Color foreground;
+		if (enabled) {
+			foreground = getForeground();
+		} else {
+			foreground = resources.getColorDisabled();
+		}
+		nameLabel.setForeground(foreground);
+		description.setForeground(foreground);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java
new file mode 100644
index 0000000..88918d3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.net.URL;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.internal.p2.discovery.model.Icon;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryImages;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.jface.resource.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * @author Steffen Pingel
+ */
+public class DiscoveryResources {
+
+	private final ResourceManager resourceManager;
+
+	private final FontDescriptor h1FontDescriptor;
+
+	private final Display display;
+
+	private final FontDescriptor h2FontDescriptor;
+
+	private final RGB disabledColorDescriptor;
+
+	public DiscoveryResources(Display display) {
+		this.display = display;
+		this.resourceManager = new LocalResourceManager(JFaceResources.getResources(display));
+		this.h1FontDescriptor = createFontDescriptor(SWT.BOLD, 1.35f);
+		this.h2FontDescriptor = createFontDescriptor(SWT.BOLD, 1.25f);
+		this.disabledColorDescriptor = new RGB(0x69, 0x69, 0x69);
+	}
+
+	public Cursor getHandCursor() {
+		return display.getSystemCursor(SWT.CURSOR_HAND);
+	}
+
+	private FontDescriptor createFontDescriptor(int style, float heightMultiplier) {
+		Font baseFont = JFaceResources.getDialogFont();
+		FontData[] fontData = baseFont.getFontData();
+		FontData[] newFontData = new FontData[fontData.length];
+		for (int i = 0; i < newFontData.length; i++) {
+			newFontData[i] = new FontData(fontData[i].getName(), (int) (fontData[i].getHeight() * heightMultiplier), fontData[i].getStyle() | style);
+		}
+		return FontDescriptor.createFrom(newFontData);
+	}
+
+	public void dispose() {
+		resourceManager.dispose();
+	}
+
+	public Font getHeaderFont() {
+		return resourceManager.createFont(h1FontDescriptor);
+	}
+
+	public Font getSmallHeaderFont() {
+		return resourceManager.createFont(h2FontDescriptor);
+	}
+
+	public Image getInfoImage() {
+		return resourceManager.createImage(DiscoveryImages.MESSAGE_INFO);
+	}
+
+	public Image getIconImage(AbstractCatalogSource discoverySource, Icon icon, int dimension, boolean fallback) {
+		String imagePath;
+		switch (dimension) {
+			case 64 :
+				imagePath = icon.getImage64();
+				if (imagePath != null || !fallback) {
+					break;
+				}
+			case 48 :
+				imagePath = icon.getImage48();
+				if (imagePath != null || !fallback) {
+					break;
+				}
+			case 32 :
+				imagePath = icon.getImage32();
+				break;
+			default :
+				throw new IllegalArgumentException();
+		}
+		if (imagePath != null && imagePath.length() > 0) {
+			URL resource = discoverySource.getResource(imagePath);
+			if (resource != null) {
+				ImageDescriptor descriptor = ImageDescriptor.createFromURL(resource);
+				return resourceManager.createImage(descriptor);
+			}
+		}
+		return null;
+	}
+
+	public Color getGradientBeginColor() {
+		return DiscoveryUi.getCommonsColors().getGradientBegin();
+	}
+
+	public Color getGradientEndColor() {
+		return DiscoveryUi.getCommonsColors().getGradientEnd();
+	}
+
+	public Color getColorDisabled() {
+		return resourceManager.createColor(disabledColorDescriptor);
+	}
+
+	public Image getUpdateImage() {
+		return resourceManager.createImage(DiscoveryImages.IU_UPDATABLE);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java
new file mode 100644
index 0000000..708f786
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryImages;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.operations.DiscoveryInstallOperation;
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * A wizard for performing discovery and selecting items from a catalog to install. When finish is pressed, selected
+ * items are downloaded and installed.
+ * 
+ * @see DiscoveryInstallOperation
+ * @see CatalogPage
+ * @author David Green
+ * @author Steffen Pingel
+ */
+public class DiscoveryWizard extends Wizard {
+
+	private final Catalog catalog;
+
+	private CatalogPage catalogPage;
+
+	private final CatalogConfiguration configuration;
+
+	public DiscoveryWizard(Catalog catalog, CatalogConfiguration configuration) {
+		Assert.isNotNull(catalog);
+		Assert.isNotNull(configuration);
+		this.catalog = catalog;
+		this.configuration = configuration;
+		setWindowTitle(Messages.DiscoveryWizard_Install_Window_Title);
+		setNeedsProgressMonitor(true);
+		setDefaultPageImageDescriptor(DiscoveryImages.BANNER_DISOVERY);
+	}
+
+	@Override
+	public void addPages() {
+		addPage(getCatalogPage());
+	}
+
+	protected CatalogPage doCreateCatalogPage() {
+		return new CatalogPage(getCatalog());
+	}
+
+	public Catalog getCatalog() {
+		return catalog;
+	}
+
+	public CatalogPage getCatalogPage() {
+		if (catalogPage == null) {
+			catalogPage = doCreateCatalogPage();
+		}
+		return catalogPage;
+	}
+
+	public CatalogConfiguration getConfiguration() {
+		return configuration;
+	}
+
+	@Override
+	public boolean performFinish() {
+		return DiscoveryUi.install(catalogPage.getInstallableConnectors(), getContainer());
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java
new file mode 100644
index 0000000..91a02be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+public class Messages extends NLS {
+
+	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.wizards.messages"; //$NON-NLS-1$
+
+	public static String ConnectorDescriptorToolTip_detailsLink;
+
+	public static String ConnectorDescriptorToolTip_detailsLink_tooltip;
+
+	public static String ConnectorDiscoveryWizard_installProblems;
+
+	public static String InstallConnectorsJob_commaSeparator;
+
+	public static String InstallConnectorsJob_connectorsNotAvailable;
+
+	public static String InstallConnectorsJob_questionProceed;
+
+	public static String InstallConnectorsJob_questionProceed_long;
+
+	public static String InstallConnectorsJob_task_configuring;
+
+	public static String InstallConnectorsJob_unexpectedError_url;
+
+	public static String ConnectorDiscoveryWizardMainPage_connectorDiscovery;
+
+	public static String ConnectorDiscoveryWizardMainPage_filterLabel;
+
+	public static String ConnectorDiscoveryWizardMainPage_message_with_cause;
+
+	public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound;
+
+	public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound_description;
+
+	public static String ConnectorDiscoveryWizardMainPage_pageDescription;
+
+	public static String ConnectorDiscoveryWizardMainPage_provider_and_license;
+
+	public static String ConnectorDiscoveryWizardMainPage_tooltip_showOverview;
+
+	public static String ConnectorDiscoveryWizardMainPage_unexpectedException;
+
+	public static String ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable;
+
+	public static String ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable;
+
+	public static String DiscoveryItem_Connector_already_installed_Error_Message;
+
+	public static String DiscoveryItem_Connector_already_installed_Error_Title;
+
+	public static String DiscoveryItem_Extension_installed;
+
+	public static String DiscoveryViewer_Certification_Label0;
+
+	public static String DiscoveryViewer_Show_Installed;
+
+	public static String DiscoveryWizard_Install_Window_Title;
+
+	public static String PrepareInstallProfileJob_notFoundDescriptorDetail;
+
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+		// constructor
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java
new file mode 100644
index 0000000..c0c17f6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
+
+import java.net.URL;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
+import org.eclipse.equinox.internal.p2.discovery.model.Overview;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.GradientToolTip;
+import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+/**
+ * @author David Green
+ */
+class OverviewToolTip extends GradientToolTip {
+
+	private final Overview overview;
+
+	private final AbstractCatalogSource source;
+
+	private final Control parent;
+
+	private final Image leftImage;
+
+	public OverviewToolTip(Control control, AbstractCatalogSource source, Overview overview, Image leftImage) {
+		super(control, ToolTip.RECREATE, true);
+		Assert.isNotNull(source);
+		Assert.isNotNull(overview);
+		this.parent = control;
+		this.source = source;
+		this.overview = overview;
+		this.leftImage = leftImage;
+		setHideOnMouseDown(false); // required for links to work
+	}
+
+	@Override
+	protected Composite createToolTipArea(Event event, final Composite parent) {
+		GridLayoutFactory.fillDefaults().applyTo(parent);
+
+		Composite container = new Composite(parent, SWT.NULL);
+		container.setBackground(null);
+
+		Image image = null;
+		if (overview.getScreenshot() != null) {
+			image = computeImage(source, overview.getScreenshot());
+			if (image != null) {
+				final Image fimage = image;
+				container.addDisposeListener(new DisposeListener() {
+					public void widgetDisposed(DisposeEvent e) {
+						fimage.dispose();
+					}
+				});
+			}
+		}
+		final boolean hasLearnMoreLink = overview.getUrl() != null && overview.getUrl().length() > 0;
+
+		final int borderWidth = 1;
+		final int fixedImageHeight = 240;
+		final int fixedImageWidth = 320;
+		final int heightHint = fixedImageHeight + (borderWidth * 2);
+		final int widthHint = fixedImageWidth;
+
+		final int containerWidthHintWithImage = 650;
+		final int containerWidthHintWithoutImage = 500;
+
+		GridDataFactory.fillDefaults().grab(true, true).hint(image == null ? containerWidthHintWithoutImage : containerWidthHintWithImage, SWT.DEFAULT).applyTo(container);
+
+		GridLayoutFactory.fillDefaults().numColumns((leftImage != null) ? 3 : 2).margins(5, 5).spacing(3, 0).applyTo(container);
+
+		if (leftImage != null) {
+			Label imageLabel = new Label(container, SWT.NONE);
+			imageLabel.setImage(leftImage);
+			int imageWidthHint = leftImage.getBounds().width + 5;
+			GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.BEGINNING).hint(imageWidthHint, SWT.DEFAULT).applyTo(imageLabel);
+		}
+
+		String summary = overview.getSummary();
+
+		Composite summaryContainer = new Composite(container, SWT.NULL);
+		summaryContainer.setBackground(null);
+		GridLayoutFactory.fillDefaults().applyTo(summaryContainer);
+
+		GridDataFactory gridDataFactory = GridDataFactory.fillDefaults().grab(true, true).span(image == null ? 2 : 1, 1);
+		if (image != null) {
+			gridDataFactory.hint(widthHint, heightHint);
+		}
+		gridDataFactory.applyTo(summaryContainer);
+
+		StyledText summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS);
+		summaryLabel.setText(summary);
+		Point size = summaryLabel.computeSize(widthHint, SWT.DEFAULT);
+		if (size.y > heightHint - 20) {
+			summaryLabel.dispose();
+			summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS | SWT.V_SCROLL);
+			summaryLabel.setText(summary);
+		}
+		summaryLabel.setBackground(null);
+
+		GridDataFactory.fillDefaults().grab(true, true).align(SWT.BEGINNING, SWT.BEGINNING).applyTo(summaryLabel);
+
+		if (image != null) {
+			final Composite imageContainer = new Composite(container, SWT.BORDER);
+			GridLayoutFactory.fillDefaults().applyTo(imageContainer);
+
+			GridDataFactory.fillDefaults().grab(false, false).align(SWT.CENTER, SWT.BEGINNING).hint(widthHint + (borderWidth * 2), heightHint).applyTo(imageContainer);
+
+			Label imageLabel = new Label(imageContainer, SWT.NULL);
+			GridDataFactory.fillDefaults().hint(widthHint, fixedImageHeight).indent(borderWidth, borderWidth).applyTo(imageLabel);
+			imageLabel.setImage(image);
+			imageLabel.setBackground(null);
+			imageLabel.setSize(widthHint, fixedImageHeight);
+
+			// creates a border
+			imageContainer.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
+		}
+		if (hasLearnMoreLink) {
+			Link link = new Link(summaryContainer, SWT.NULL);
+			GridDataFactory.fillDefaults().grab(false, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(link);
+			link.setText(Messages.ConnectorDescriptorToolTip_detailsLink);
+			link.setBackground(null);
+			link.setToolTipText(NLS.bind(Messages.ConnectorDescriptorToolTip_detailsLink_tooltip, overview.getUrl()));
+			link.addSelectionListener(new SelectionListener() {
+				public void widgetSelected(SelectionEvent e) {
+					WorkbenchUtil.openUrl(overview.getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
+				}
+
+				public void widgetDefaultSelected(SelectionEvent e) {
+					widgetSelected(e);
+				}
+			});
+		}
+		if (image == null) {
+			// prevent overviews with no image from providing unlimited text.
+			Point optimalSize = summaryContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+			if (optimalSize.y > (heightHint + 10)) {
+				((GridData) summaryContainer.getLayoutData()).heightHint = heightHint;
+				container.layout(true);
+			}
+		}
+		// hack: cause the tooltip to gain focus so that we can capture the escape key
+		//       this must be done async since the tooltip is not yet visible.
+		Display.getCurrent().asyncExec(new Runnable() {
+			public void run() {
+				if (!parent.isDisposed()) {
+					parent.setFocus();
+				}
+			}
+		});
+		return container;
+	}
+
+	private Image computeImage(AbstractCatalogSource discoverySource, String imagePath) {
+		URL resource = discoverySource.getResource(imagePath);
+		if (resource != null) {
+			ImageDescriptor descriptor = ImageDescriptor.createFromURL(resource);
+			Image image = descriptor.createImage();
+			return image;
+		}
+		return null;
+	}
+
+	public void show(Control titleControl) {
+		Point titleAbsLocation = titleControl.getParent().toDisplay(titleControl.getLocation());
+		Point containerAbsLocation = parent.getParent().toDisplay(parent.getLocation());
+		Rectangle bounds = titleControl.getBounds();
+		int relativeX = titleAbsLocation.x - containerAbsLocation.x;
+		int relativeY = titleAbsLocation.y - containerAbsLocation.y;
+
+		relativeY += bounds.height + 3;
+		show(new Point(relativeX, relativeY));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties
new file mode 100644
index 0000000..6eb5285
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties
@@ -0,0 +1,39 @@
+###############################################################################
+# Copyright (c) 2009 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#      Tasktop Technologies - initial API and implementation
+###############################################################################
+ConnectorDescriptorToolTip_detailsLink=<a>Learn more</a>
+ConnectorDescriptorToolTip_detailsLink_tooltip=Open {0} in an external browser
+ConnectorDiscoveryWizard_installProblems=Problems occurred while performing installation: {0}
+ConnectorDiscoveryWizardMainPage_connectorDiscovery=Install Extensions
+ConnectorDiscoveryWizardMainPage_filterLabel=F&ind:
+ConnectorDiscoveryWizardMainPage_message_with_cause={0}: {1}
+ConnectorDiscoveryWizardMainPage_noConnectorsFound=No Extensions Found
+ConnectorDiscoveryWizardMainPage_noConnectorsFound_description=Discovery completed without finding any extensions.  Please check your network connection and try again.
+ConnectorDiscoveryWizardMainPage_pageDescription=\
+	Select extensions to install. Press Finish to proceed with installation.\n\
+	Press the information button to see a detailed overview and a link to more information.
+ConnectorDiscoveryWizardMainPage_provider_and_license=by {0}, {1}
+ConnectorDiscoveryWizardMainPage_tooltip_showOverview=Show Overview
+ConnectorDiscoveryWizardMainPage_unexpectedException=Unexpected exception
+ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable=Sorry, {0} is unavailable.  Please try again later.
+ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable=Extension Unavailable
+DiscoveryItem_Connector_already_installed_Error_Message={0} is already installed.
+DiscoveryItem_Connector_already_installed_Error_Title=Install Extension
+DiscoveryItem_Extension_installed={0} (installed)
+DiscoveryViewer_Certification_Label0=by {0}, {1}, <a>Certified</a>
+DiscoveryViewer_Show_Installed=Show &Installed
+DiscoveryWizard_Install_Window_Title=Install
+InstallConnectorsJob_commaSeparator=, 
+InstallConnectorsJob_connectorsNotAvailable=The following extensions are not available: {0}
+InstallConnectorsJob_questionProceed=Proceed With Installation?
+InstallConnectorsJob_questionProceed_long=The following extensions are not available: {0}\nProceed with the installation anyways?
+InstallConnectorsJob_task_configuring=Configuring installation selection
+InstallConnectorsJob_unexpectedError_url=Unexpected error handling repository URL
+PrepareInstallProfileJob_notFoundDescriptorDetail={0} (id={1}, site={2})
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
index ce73933..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
index a4650cd..f14e3bf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Sep 18 21:25:49 EDT 2007
+#Tue Mar 16 19:07:09 EDT 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -143,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
index 8c6d379..db8df9b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
@@ -1,37 +1,39 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk.scheduler;singleton:=true
 Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.ui.sdk.scheduler;x-internal:=true
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.equinox.p2.updatechecker,
+ org.eclipse.equinox.p2.ui
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: com.ibm.icu.util;version="4.0.1",
+ org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.engine,
+ org.eclipse.equinox.internal.p2.engine.phases,
+ org.eclipse.equinox.internal.p2.metadata.query,
+ org.eclipse.equinox.internal.p2.ui.actions,
  org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.core,
  org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.ui,
- org.eclipse.equinox.internal.provisional.p2.ui.actions,
- org.eclipse.equinox.internal.provisional.p2.ui.model,
- org.eclipse.equinox.internal.provisional.p2.ui.operations,
- org.eclipse.equinox.internal.provisional.p2.ui.policy,
+ org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.updatechecker,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.service.resolver;version="1.1.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.packageadmin;version="1.2.0"
-Export-Package: org.eclipse.equinox.internal.p2.ui.sdk.scheduler;x-internal:=true
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.ui
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
index 84a2da1..2d22063 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
@@ -9,9 +9,12 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 bin.includes = plugin.properties,\
+               icons/,\
                .,\
                about.html,\
                META-INF/,\
                plugin.xml
 src.includes = about.html
 source.. = src/
+javacTarget=jsr14
+javacSource=1.5
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/close.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/close.gif
rename to eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/close_hot.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/close_hot.gif
rename to eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/update.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/update.gif
rename to eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/update_problems.gif b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.ui/icons/tool/update_problems.gif
rename to eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
new file mode 100644
index 0000000..5689df8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui.sdk.scheduler</artifactId>
+  <version>1.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java
deleted file mode 100644
index 82e31f7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateAction.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.PlanValidator;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Overridden to hide the resolution from the user and optionally suppress 
- * the wizard if we are resolving for reasons other than user request.
- * 
- * @since 3.5
- * 
- */
-final class AutomaticUpdateAction extends UpdateAction {
-
-	/**
-	 * 
-	 */
-	final AutomaticUpdater automaticUpdater;
-	private boolean suppressWizard = false;
-	private PlannerResolutionOperation resolvedOperation;
-	private ProvUIProvisioningListener profileListener;
-	private boolean alreadyOpen = false;
-
-	AutomaticUpdateAction(AutomaticUpdater automaticUpdater,
-			ISelectionProvider selectionProvider, String profileId,
-			PlannerResolutionOperation op, IUElementListRoot root,
-			ArrayList initialSelections) {
-		super(new Policy(), selectionProvider, profileId, false);
-		ProvUI.addProvisioningListener(createProfileListener());
-		this.resolvedOperation = op;
-		this.automaticUpdater = automaticUpdater;
-		this.root = root;
-		this.initialSelections = initialSelections;
-	}
-
-	private ProvUIProvisioningListener createProfileListener() {
-		profileListener = new ProvUIProvisioningListener(
-				ProvUIProvisioningListener.PROV_EVENT_PROFILE) {
-			protected void profileChanged(final String profileId) {
-				String id = getProfileId(false);
-				if (id == IProfileRegistry.SELF) {
-					try {
-						IProfile profile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
-						id = profile.getProfileId();
-					} catch (ProvisionException e) {
-						id = null;
-					}
-				}
-				if (profileId.equals(id)) {
-					resolvedOperation = null;
-					automaticUpdater.validateUpdates();
-				}
-			}
-		};
-		return profileListener;
-	}
-
-	protected void run(final IInstallableUnit[] ius, final String id) {
-		// Do we have a plan??
-		if (resolvedOperation != null
-				&& resolvedOperation.getProvisioningPlan() != null) {
-			if (PlatformUI.isWorkbenchRunning()) {
-				PlatformUI.getWorkbench().getDisplay().asyncExec(
-						new Runnable() {
-							public void run() {
-								if (validatePlan(resolvedOperation
-										.getProvisioningPlan())) {
-									performAction(ius, id, resolvedOperation);
-								}
-							}
-						});
-			}
-		} else
-			super.run(ius, id);
-	}
-
-	void suppressWizard(boolean suppress) {
-		suppressWizard = suppress;
-	}
-
-	protected int performAction(IInstallableUnit[] ius, String targetProfileId,
-			PlannerResolutionOperation resolution) {
-		if (suppressWizard) {
-			automaticUpdater.setUpdateAffordanceState(resolution != null
-					&& resolution.getResolutionResult().getSummaryStatus()
-							.isOK());
-			return Window.OK;
-		}
-		if (alreadyOpen)
-			return Window.CANCEL;
-		alreadyOpen = true;
-		int retCode = super.performAction(ius, targetProfileId, resolution);
-		alreadyOpen = false;
-		return retCode;
-	}
-
-	protected PlanValidator getPlanValidator() {
-		return new PlanValidator() {
-			public boolean continueWorkingWithPlan(ProvisioningPlan plan,
-					Shell shell) {
-				if (automaticUpdater.alreadyValidated)
-					return true;
-				// In all other cases we return false, because clicking the
-				// popup will actually run the action.
-				// We are just determining whether to show the popup or not.
-				if (plan != null) {
-					// If the user cancelled the operation, don't continue
-					if (plan.getStatus().getSeverity() == IStatus.CANCEL)
-						return false;
-					boolean noError = plan.getStatus().getSeverity() != IStatus.ERROR;
-					// Show the affordance regardless of the status since
-					// updates were found.
-					if (automaticUpdater.updateAffordance == null)
-						automaticUpdater.createUpdateAffordance();
-					automaticUpdater.setUpdateAffordanceState(noError);
-					if (noError && automaticUpdater.popup == null)
-						automaticUpdater.createUpdatePopup();
-				}
-				return false;
-			}
-		};
-	}
-
-	public void dispose() {
-		if (profileListener != null)
-			ProvUI.removeProvisioningListener(profileListener);
-		profileListener = null;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
index 34a9496..17be7f3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,8 +68,6 @@ public class AutomaticUpdateMessages extends NLS {
 	public static String AutomaticUpdater_AutomaticDownloadOperationName;
 	public static String AutomaticUpdater_ClickToReviewUpdates;
 	public static String AutomaticUpdater_ClickToReviewUpdatesWithProblems;
-	public static String AutomaticUpdater_ErrorCheckingUpdates;
-	public static String AutomaticUpdater_ResolutionOperationLabel;
 	public static String AutomaticUpdatesPreferencePage_UpdateSchedule;
 	public static String AutomaticUpdatesPreferencePage_findOnStart;
 	public static String AutomaticUpdatesPreferencePage_findOnSchedule;
@@ -77,6 +75,7 @@ public class AutomaticUpdateMessages extends NLS {
 	public static String AutomaticUpdatesPreferencePage_searchAndNotify;
 	public static String AutomaticUpdatesPreferencePage_downloadAndNotify;
 	public static String AutomaticUpdatesPreferencePage_at;
+	public static String AutomaticUpdatesPreferencePage_GenericProductName;
 	public static String AutomaticUpdatesPreferencePage_RemindGroup;
 	public static String AutomaticUpdatesPreferencePage_RemindSchedule;
 	public static String AutomaticUpdatesPreferencePage_RemindOnce;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
index 96b2874..8b5a97e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,52 +11,53 @@
 package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
 import java.io.IOException;
+import java.net.URL;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileScope;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProfileScope;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.preferences.ScopedPreferenceStore;
 import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 
 /**
  * Activator class for the automatic updates plugin
  */
 public class AutomaticUpdatePlugin extends AbstractUIPlugin {
 
+	// bundle-relative icon path
+	public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
+
+	// tool icons
+	public final static String IMG_TOOL_UPDATE = "tool/update.gif"; //$NON-NLS-1$
+	public final static String IMG_TOOL_UPDATE_PROBLEMS = "tool/update_problems.gif"; //$NON-NLS-1$
+	public final static String IMG_TOOL_CLOSE = "tool/close.gif"; //$NON-NLS-1$
+	public final static String IMG_TOOL_CLOSE_HOT = "tool/close_hot.gif"; //$NON-NLS-1$
+
 	private static AutomaticUpdatePlugin plugin;
 	private static BundleContext context;
-	private static PackageAdmin packageAdmin = null;
-	private static ServiceReference packageAdminRef = null;
 
 	private AutomaticUpdateScheduler scheduler;
 	private AutomaticUpdater updater;
 	private ScopedPreferenceStore preferenceStore;
 
+	private ProvisioningSession session;
+
 	public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk.scheduler"; //$NON-NLS-1$
 
 	public static BundleContext getContext() {
 		return context;
 	}
 
-	public static Bundle getBundle(String symbolicName) {
-		if (packageAdmin == null)
-			return null;
-		Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
-			return null;
-		// Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
-				return bundles[i];
-			}
-		}
-		return null;
-	}
-
 	/**
 	 * Returns the singleton plugin instance
 	 * 
@@ -81,29 +82,12 @@ public class AutomaticUpdatePlugin extends AbstractUIPlugin {
 		super.start(bundleContext);
 		plugin = this;
 		context = bundleContext;
-		packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
-		packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
-
-		// TODO for now we need to manually start up the provisioning
-		// infrastructure and the update checker, because the Eclipse
-		// Application launch config won't let me specify bundles to start.
-		// TODO how should we react if we are unable to start one of these bundles?
-		startEarly("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
-		startEarly("org.eclipse.equinox.frameworkadmin.equinox"); //$NON-NLS-1$
-		startEarly("org.eclipse.equinox.simpleconfigurator.manipulator"); //$NON-NLS-1$
-		startEarly("org.eclipse.equinox.p2.updatechecker"); //$NON-NLS-1$
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
+		session = new ProvisioningSession(agent);
 
 		PreferenceInitializer.migratePreferences();
 	}
 
-	private boolean startEarly(String bundleName) throws BundleException {
-		Bundle bundle = getBundle(bundleName);
-		if (bundle == null)
-			return false;
-		bundle.start(Bundle.START_TRANSIENT);
-		return true;
-	}
-
 	public void stop(BundleContext bundleContext) throws Exception {
 		if (scheduler != null) {
 			scheduler.shutdown();
@@ -113,8 +97,6 @@ public class AutomaticUpdatePlugin extends AbstractUIPlugin {
 			updater.shutdown();
 			updater = null;
 		}
-		packageAdmin = null;
-		packageAdminRef = null;
 		plugin = null;
 		super.stop(bundleContext);
 		context = null;
@@ -152,17 +134,49 @@ public class AutomaticUpdatePlugin extends AbstractUIPlugin {
 	public IPreferenceStore getPreferenceStore() {
 		// Create the preference store lazily.
 		if (preferenceStore == null) {
-			preferenceStore = new ScopedPreferenceStore(new ProfileScope(IProfileRegistry.SELF), PLUGIN_ID);
+			final IAgentLocation agentLocation = getAgentLocation();
+			if (agentLocation == null)
+				return super.getPreferenceStore();
+			preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
 		}
 		return preferenceStore;
 	}
 
+	public IAgentLocation getAgentLocation() {
+		ServiceReference ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
+		if (ref == null)
+			return null;
+		IAgentLocation location = (IAgentLocation) getContext().getService(ref);
+		getContext().ungetService(ref);
+		return location;
+	}
+
 	public void savePreferences() {
 		if (preferenceStore != null)
 			try {
 				preferenceStore.save();
 			} catch (IOException e) {
-				ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences, StatusManager.LOG | StatusManager.SHOW);
+				StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, AutomaticUpdateMessages.ErrorSavingPreferences, e), StatusManager.LOG | StatusManager.SHOW);
 			}
 	}
+
+	protected void initializeImageRegistry(ImageRegistry reg) {
+		createImageDescriptor(IMG_TOOL_UPDATE, reg);
+		createImageDescriptor(IMG_TOOL_UPDATE_PROBLEMS, reg);
+		createImageDescriptor(IMG_TOOL_CLOSE, reg);
+		createImageDescriptor(IMG_TOOL_CLOSE_HOT, reg);
+	}
+
+	/**
+	 * Creates the specified image descriptor and registers it
+	 */
+	private void createImageDescriptor(String id, ImageRegistry reg) {
+		URL url = FileLocator.find(getBundle(), new Path(ICON_PATH).append(id), null);
+		ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+		reg.put(id, desc);
+	}
+
+	public ProvisioningSession getSession() {
+		return session;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
index 755b085..cfb42f3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,19 +10,17 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
-import java.util.Calendar;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import com.ibm.icu.util.Calendar;
+import com.ibm.icu.util.ULocale;
+import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
+import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.IStartup;
 import org.eclipse.ui.statushandlers.StatusManager;
@@ -38,7 +36,7 @@ public class AutomaticUpdateScheduler implements IStartup {
 
 	public static final String P_HOUR = "hour"; //$NON-NLS-1$
 
-	public static final String[] DAYS = {AutomaticUpdateMessages.SchedulerStartup_day, AutomaticUpdateMessages.SchedulerStartup_Monday, AutomaticUpdateMessages.SchedulerStartup_Tuesday, AutomaticUpdateMessages.SchedulerStartup_Wednesday, AutomaticUpdateMessages.SchedulerStartup_Thursday, AutomaticUpdateMessages.SchedulerStartup_Friday, AutomaticUpdateMessages.SchedulerStartup_Saturday, AutomaticUpdateMessages.SchedulerStartup_Sunday};
+	public static final String[] DAYS;
 
 	public static final String[] HOURS = {AutomaticUpdateMessages.SchedulerStartup_1AM, AutomaticUpdateMessages.SchedulerStartup_2AM, AutomaticUpdateMessages.SchedulerStartup_3AM, AutomaticUpdateMessages.SchedulerStartup_4AM, AutomaticUpdateMessages.SchedulerStartup_5AM, AutomaticUpdateMessages.SchedulerStartup_6AM, AutomaticUpdateMessages.SchedulerStartup_7AM, AutomaticUpdateMessages.SchedulerStartup_8AM, AutomaticUpdateMessages.SchedulerStartup_9AM, AutomaticUpdateMessages.SchedulerStartup_10AM, AutomaticUpdateMessages.SchedulerStartup_11AM, AutomaticUpdateMessages.SchedulerStartup_12PM, AutomaticUpdateMessages.SchedulerStartup_1PM, AutomaticUpdateMessages.SchedulerStartup_2PM, AutomaticUpdateMessages.SchedulerStartup_3PM, AutomaticUpdateMessages.SchedulerStartup_4PM,
 			AutomaticUpdateMessages.SchedulerStartup_5PM, AutomaticUpdateMessages.SchedulerStartup_6PM, AutomaticUpdateMessages.SchedulerStartup_7PM, AutomaticUpdateMessages.SchedulerStartup_8PM, AutomaticUpdateMessages.SchedulerStartup_9PM, AutomaticUpdateMessages.SchedulerStartup_10PM, AutomaticUpdateMessages.SchedulerStartup_11PM, AutomaticUpdateMessages.SchedulerStartup_12AM,};
@@ -47,44 +45,18 @@ public class AutomaticUpdateScheduler implements IStartup {
 	private IUpdateChecker checker = null;
 	String profileId;
 
-	/**
-	 * A query that searches for {@link IInstallableUnit} instances that have
-	 * a property associated with the specified profile, whose value matches the provided value.
-	 * Uses the profile id instead of the profile to reference the profile.
-	 * The profile instance is cached only during the duration of the query.
-	 * This query is used instead of IUProfilePropertyQuery because we pass
-	 * this query to the automatic update checker and it will be referenced during
-	 * the life of the platform.  
-	 */
-	private class IUProfilePropertyByIdQuery extends IUPropertyQuery {
-		private IProfile cachedProfile;
-
-		/**
-		 * Creates a new query on the given property name and value.
-		 */
-		public IUProfilePropertyByIdQuery(String propertyName, String propertyValue) {
-			super(propertyName, propertyValue);
+	static {
+		Calendar calendar = Calendar.getInstance(new ULocale(Platform.getNL()));
+		String[] daysAsStrings = {AutomaticUpdateMessages.SchedulerStartup_day, AutomaticUpdateMessages.SchedulerStartup_Sunday, AutomaticUpdateMessages.SchedulerStartup_Monday, AutomaticUpdateMessages.SchedulerStartup_Tuesday, AutomaticUpdateMessages.SchedulerStartup_Wednesday, AutomaticUpdateMessages.SchedulerStartup_Thursday, AutomaticUpdateMessages.SchedulerStartup_Friday, AutomaticUpdateMessages.SchedulerStartup_Saturday};
+		int firstDay = calendar.getFirstDayOfWeek();
+		DAYS = new String[8];
+		DAYS[0] = daysAsStrings[0];
+		int countDays = 0;
+		for (int i = firstDay; i <= 7; i++) {
+			DAYS[++countDays] = daysAsStrings[i];
 		}
-
-		protected String getProperty(IInstallableUnit iu, String name) {
-			IProfile profile = getProfile();
-			if (profile == null)
-				return null;
-			return profile.getInstallableUnitProperty(iu, name);
-		}
-
-		private IProfile getProfile() {
-			if (cachedProfile == null) {
-				IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProfileRegistry.class.getName());
-				if (profileRegistry != null)
-					cachedProfile = profileRegistry.getProfile(profileId);
-			}
-			return cachedProfile;
-		}
-
-		// overridden to release profile cache
-		public void postPerform() {
-			cachedProfile = null;
+		for (int i = 1; i < firstDay; i++) {
+			DAYS[++countDays] = daysAsStrings[i];
 		}
 	}
 
@@ -93,7 +65,8 @@ public class AutomaticUpdateScheduler implements IStartup {
 	 */
 	public AutomaticUpdateScheduler() {
 		AutomaticUpdatePlugin.getDefault().setScheduler(this);
-		checker = (IUpdateChecker) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IUpdateChecker.SERVICE_NAME);
+		IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProvisioningAgent.SERVICE_NAME);
+		checker = (IUpdateChecker) agent.getService(IUpdateChecker.SERVICE_NAME);
 		if (checker == null) {
 			// Something did not initialize properly
 			IStatus status = new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, AutomaticUpdateMessages.AutomaticUpdateScheduler_UpdateNotInitialized);
@@ -147,16 +120,16 @@ public class AutomaticUpdateScheduler implements IStartup {
 			public void updatesAvailable(UpdateEvent event) {
 				AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().updatesAvailable(event);
 			}
-			
+
 		};
 		checker.addUpdateCheck(profileId, getProfileQuery(), delay, poll, listener);
 
 	}
 
-	private Query getProfileQuery() {
-		// We specifically avoid going through the default policy's query provider or
-		// through the sdk ui bundle, so that we don't load all the p2 UI classes in doing so.  
-		return new IUProfilePropertyByIdQuery(IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
+	private IQuery<IInstallableUnit> getProfileQuery() {
+		// We specifically avoid using the default policy's root property so that we don't load all the
+		// p2 UI classes in doing so.  
+		return new IUProfilePropertyQuery(IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
 	}
 
 	private int getDay(IPreferenceStore pref) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
index 72f167b..d6adf26 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,55 +7,32 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.DownloadPhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
 import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
 import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.IStatusLineManager;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -64,16 +41,43 @@ import org.eclipse.ui.statushandlers.StatusManager;
 public class AutomaticUpdater implements IUpdateListener {
 
 	StatusLineCLabelContribution updateAffordance;
-	AutomaticUpdateAction updateAction;
 	IStatusLineManager statusLineManager;
-	IInstallableUnit[] iusWithUpdates;
+	Collection<IInstallableUnit> iusWithUpdates;
 	String profileId;
+	ProvisioningListener profileListener;
 	AutomaticUpdatesPopup popup;
-	IJobChangeListener provisioningJobListener;
-	boolean alreadyValidated = false;
 	boolean alreadyDownloaded = false;
+	UpdateOperation operation;
 	private static final String AUTO_UPDATE_STATUS_ITEM = "AutoUpdatesStatus"; //$NON-NLS-1$
 
+	public AutomaticUpdater() {
+		createProfileListener();
+	}
+
+	private void createProfileListener() {
+		profileListener = new ProvisioningListener() {
+			public void notify(EventObject o) {
+				if (o instanceof IProfileEvent) {
+					IProfileEvent event = (IProfileEvent) o;
+					if (event.getReason() == IProfileEvent.CHANGED && sameProfile(event.getProfileId())) {
+						triggerNewUpdateNotification();
+					}
+				}
+			}
+		};
+		getProvisioningEventBus().addListener(profileListener);
+	}
+
+	private boolean sameProfile(String another) {
+		if (another.equals(IProfileRegistry.SELF)) {
+			another = getProfileRegistry().getProfile(another).getProfileId();
+		}
+		if (profileId.equals(IProfileRegistry.SELF)) {
+			profileId = getProfileRegistry().getProfile(profileId).getProfileId();
+		}
+		return profileId.equals(another);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -83,156 +87,118 @@ public class AutomaticUpdater implements IUpdateListener {
 	 * updatesAvailable(org.eclipse.equinox.internal.provisional.p2.updatechecker
 	 * .UpdateEvent)
 	 */
-	public void updatesAvailable(final UpdateEvent event) {
-		final boolean download = getPreferenceStore().getBoolean(
-				PreferenceConstants.PREF_DOWNLOAD_ONLY);
+	public void updatesAvailable(UpdateEvent event) {
+		updatesAvailable(event, true);
+	}
+
+	void updatesAvailable(final UpdateEvent event, final boolean notifyWithPopup) {
+		final boolean download = getPreferenceStore().getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY);
 		profileId = event.getProfileId();
 		iusWithUpdates = event.getIUs();
-		validateUpdates(null, true);
+		validateIusToUpdate();
 		alreadyDownloaded = false;
 
-		if (iusWithUpdates.length <= 0) {
-			clearUpdatesAvailable();
+		// Create an update operation to reflect the new updates that are available.
+		operation = new UpdateOperation(getSession(), iusWithUpdates);
+		operation.setProfileId(event.getProfileId());
+		IStatus status = operation.resolveModal(new NullProgressMonitor());
+
+		if (!status.isOK() || operation.getPossibleUpdates() == null || operation.getPossibleUpdates().length == 0) {
+			if (PlatformUI.isWorkbenchRunning()) {
+				PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						clearUpdateAffordances();
+					}
+				});
+			}
 			return;
 		}
-		registerProvisioningJobListener();
-
-		// Always get a profile change request and provisioning plan.
-		// A side-effect of making the change request is producing the model
-		// elements necessary for a wizard, so initialize the data structures
-		// for getting these.
-		final ArrayList initialSelections = new ArrayList();
-		final IUElementListRoot root = new IUElementListRoot();
-		try {
-			ProfileChangeRequest request = UpdateWizard
-					.createProfileChangeRequest(event.getIUs(), event
-							.getProfileId(), root, initialSelections, null);
-			if (request == null) {
-				clearUpdatesAvailable();
-				return;
-			}
-			final PlannerResolutionOperation operation = new PlannerResolutionOperation(
-					AutomaticUpdateMessages.AutomaticUpdater_ResolutionOperationLabel,
-					event.getProfileId(), request, null, new MultiStatus(
-							AutomaticUpdatePlugin.PLUGIN_ID, 0, null, null),
-					false);
-			if ((operation.execute(new NullProgressMonitor())).isOK()) {
-				// Download the items before notifying user if the
-				// preference dictates.
-
-				if (download) {
-					Job job = ProvisioningOperationRunner
-							.schedule(
-									new ProfileModificationOperation(
-											AutomaticUpdateMessages.AutomaticUpdater_AutomaticDownloadOperationName,
-											event.getProfileId(), operation
-													.getProvisioningPlan(),
-											new ProvisioningContext(),
-											new DownloadPhaseSet(), false),
-									StatusManager.LOG);
-					job.addJobChangeListener(new JobChangeAdapter() {
-						public void done(IJobChangeEvent jobEvent) {
-							alreadyDownloaded = true;
-							IStatus status = jobEvent.getResult();
-							if (status.isOK()) {
-								createUpdateAction(operation, root,
-										initialSelections);
-								PlatformUI.getWorkbench().getDisplay()
-										.asyncExec(new Runnable() {
-											public void run() {
-												updateAction
-														.suppressWizard(true);
-												updateAction.run();
-											}
-										});
-							} else if (status.getSeverity() != IStatus.CANCEL) {
-								ProvUI.reportStatus(status, StatusManager.LOG);
+		// Download the items before notifying user if the
+		// preference dictates.
+
+		if (download) {
+			ProfileModificationJob job = new ProfileModificationJob(AutomaticUpdateMessages.AutomaticUpdater_AutomaticDownloadOperationName, getSession(), event.getProfileId(), operation.getProvisioningPlan(), new ProvisioningContext(getSession().getProvisioningAgent()));
+			job.setPhaseSet(PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT}));
+			job.setUser(false);
+			job.setSystem(true);
+			job.addJobChangeListener(new JobChangeAdapter() {
+				public void done(IJobChangeEvent jobEvent) {
+					IStatus jobStatus = jobEvent.getResult();
+					if (jobStatus.isOK()) {
+						alreadyDownloaded = true;
+						PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+							public void run() {
+								notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
 							}
-						}
-					});
-				} else {
-					createUpdateAction(operation, root, initialSelections);
-					PlatformUI.getWorkbench().getDisplay().asyncExec(
-							new Runnable() {
-								public void run() {
-									updateAction.suppressWizard(true);
-									updateAction.run();
-								}
-							});
+						});
+					} else if (jobStatus.getSeverity() != IStatus.CANCEL) {
+						StatusManager.getManager().handle(jobStatus, StatusManager.LOG);
+					}
 				}
-			}
-		} catch (ProvisionException e) {
-			ProvUI
-					.handleException(
-							e,
-							AutomaticUpdateMessages.AutomaticUpdater_ErrorCheckingUpdates,
-							StatusManager.LOG);
+			});
+			job.schedule();
+		} else {
+			PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
+				}
+			});
 		}
 
 	}
 
+	ProvisioningSession getSession() {
+		return AutomaticUpdatePlugin.getDefault().getSession();
+	}
+
 	/*
-	 * Validate that iusToBeUpdated is valid, and reset the cache. If
-	 * isKnownToBeAvailable is false, then recheck that the update is available.
-	 * isKnownToBeAvailable should be false when the update list might be stale
-	 * (Reminding the user of updates may happen long after the update check.
-	 * This reduces the risk of notifying the user of updates and then not
-	 * finding them .)
+	 * Use with caution, as this still start the whole UI bundle.  Shouldn't be used
+	 * in any of the update checking code, only the code that presents updates when notified.
 	 */
+	ProvisioningUI getProvisioningUI() {
+		return ProvisioningUI.getDefaultUI();
+	}
 
-	void validateUpdates(IProgressMonitor monitor, boolean isKnownToBeAvailable) {
-		ArrayList list = new ArrayList();
-		for (int i = 0; i < iusWithUpdates.length; i++) {
+	/*
+	 * Filter out the ius that aren't visible to the user or are
+	 * locked for updating.
+	 */
+
+	void validateIusToUpdate() {
+		ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(iusWithUpdates.size());
+		IProfile profile = getProfileRegistry().getProfile(profileId);
+
+		for (IInstallableUnit iuWithUpdate : iusWithUpdates) {
 			try {
-				if (isKnownToBeAvailable
-						|| ProvisioningUtil.getPlanner().updatesFor(
-								iusWithUpdates[i], new ProvisioningContext(),
-								monitor).length > 0) {
-					if (validToUpdate(iusWithUpdates[i]))
-						list.add(iusWithUpdates[i]);
-				}
-			} catch (ProvisionException e) {
-				ProvUI
-						.handleException(
-								e,
-								AutomaticUpdateMessages.AutomaticUpdater_ErrorCheckingUpdates,
-								StatusManager.LOG);
-				continue;
+				if (validToUpdate(profile, iuWithUpdate))
+					list.add(iuWithUpdate);
 			} catch (OperationCanceledException e) {
 				// Nothing to report
 			}
 		}
-		iusWithUpdates = (IInstallableUnit[]) list
-				.toArray(new IInstallableUnit[list.size()]);
+		iusWithUpdates = list;
 	}
 
 	// A proposed update is valid if it is still visible to the user as an
 	// installed item (it is a root)
 	// and if it is not locked for updating.
-	private boolean validToUpdate(IInstallableUnit iu) {
-		int lock = IInstallableUnit.LOCK_NONE;
+	private boolean validToUpdate(IProfile profile, IInstallableUnit iu) {
+		int lock = IProfile.LOCK_NONE;
 		boolean isRoot = false;
 		try {
-			IProfile profile = ProvisioningUtil.getProfile(profileId);
-			String value = profile.getInstallableUnitProperty(iu,
-					IInstallableUnit.PROP_PROFILE_LOCKED_IU);
+			String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
 			if (value != null)
 				lock = Integer.parseInt(value);
-			value = profile.getInstallableUnitProperty(iu,
-					IInstallableUnit.PROP_PROFILE_ROOT_IU);
-			isRoot = value == null ? false : Boolean.valueOf(value)
-					.booleanValue();
-		} catch (ProvisionException e) {
-			// ignore
+			value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
+			isRoot = value == null ? false : Boolean.valueOf(value).booleanValue();
 		} catch (NumberFormatException e) {
 			// ignore and assume no lock
 		}
-		return isRoot && (lock & IInstallableUnit.LOCK_UPDATE) == 0;
+		return isRoot && (lock & IProfile.LOCK_UPDATE) == 0;
 	}
 
 	Shell getWorkbenchWindowShell() {
-		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench()
-				.getActiveWorkbenchWindow();
+		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 		return activeWindow != null ? activeWindow.getShell() : null;
 
 	}
@@ -240,16 +206,14 @@ public class AutomaticUpdater implements IUpdateListener {
 	IStatusLineManager getStatusLineManager() {
 		if (statusLineManager != null)
 			return statusLineManager;
-		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench()
-				.getActiveWorkbenchWindow();
+		IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 		if (activeWindow == null)
 			return null;
 		// YUCK! YUCK! YUCK!
 		// IWorkbenchWindow does not define getStatusLineManager(), yet
 		// WorkbenchWindow does
 		try {
-			Method method = activeWindow.getClass().getDeclaredMethod(
-					"getStatusLineManager", new Class[0]); //$NON-NLS-1$
+			Method method = activeWindow.getClass().getDeclaredMethod("getStatusLineManager", new Class[0]); //$NON-NLS-1$
 			try {
 				Object statusLine = method.invoke(activeWindow, new Object[0]);
 				if (statusLine instanceof IStatusLineManager) {
@@ -265,14 +229,11 @@ public class AutomaticUpdater implements IUpdateListener {
 			// can't blame us for trying.
 		}
 
-		IWorkbenchPartSite site = activeWindow.getActivePage().getActivePart()
-				.getSite();
+		IWorkbenchPartSite site = activeWindow.getActivePage().getActivePart().getSite();
 		if (site instanceof IViewSite) {
-			statusLineManager = ((IViewSite) site).getActionBars()
-					.getStatusLineManager();
+			statusLineManager = ((IViewSite) site).getActionBars().getStatusLineManager();
 		} else if (site instanceof IEditorSite) {
-			statusLineManager = ((IEditorSite) site).getActionBars()
-					.getStatusLineManager();
+			statusLineManager = ((IEditorSite) site).getActionBars().getStatusLineManager();
 		}
 		return statusLineManager;
 	}
@@ -284,8 +245,7 @@ public class AutomaticUpdater implements IUpdateListener {
 	}
 
 	void createUpdateAffordance() {
-		updateAffordance = new StatusLineCLabelContribution(
-				AUTO_UPDATE_STATUS_ITEM, 5);
+		updateAffordance = new StatusLineCLabelContribution(AUTO_UPDATE_STATUS_ITEM, 5);
 		updateAffordance.addListener(SWT.MouseDown, new Listener() {
 			public void handleEvent(Event event) {
 				launchUpdate();
@@ -298,19 +258,17 @@ public class AutomaticUpdater implements IUpdateListener {
 		}
 	}
 
-	void setUpdateAffordanceState(boolean isValid) {
+	void notifyUserOfUpdates(boolean isValid, boolean showPopup) {
 		if (updateAffordance == null)
-			return;
+			createUpdateAffordance();
 		if (isValid) {
-			updateAffordance
-					.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
-			updateAffordance.setImage(ProvUIImages
-					.getImage(ProvUIImages.IMG_TOOL_UPDATE));
+			if (showPopup)
+				openUpdatePopup();
+			updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
+			updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE)));
 		} else {
-			updateAffordance
-					.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdatesWithProblems);
-			updateAffordance.setImage(ProvUIImages
-					.getImage(ProvUIImages.IMG_TOOL_UPDATE_PROBLEMS));
+			updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdatesWithProblems);
+			updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE_PROBLEMS)));
 		}
 		IStatusLineManager manager = getStatusLineManager();
 		if (manager != null) {
@@ -323,8 +281,7 @@ public class AutomaticUpdater implements IUpdateListener {
 		// so we hide it if it should not be enabled.
 		if (updateAffordance == null)
 			return;
-		boolean shouldBeVisible = !ProvisioningOperationRunner
-				.hasScheduledOperations();
+		boolean shouldBeVisible = getProvisioningUI().hasScheduledOperations();
 		if (updateAffordance.isVisible() != shouldBeVisible) {
 			IStatusLineManager manager = getStatusLineManager();
 			if (manager != null) {
@@ -334,23 +291,14 @@ public class AutomaticUpdater implements IUpdateListener {
 		}
 	}
 
-	void createUpdatePopup() {
-		popup = new AutomaticUpdatesPopup(getWorkbenchWindowShell(),
-				alreadyDownloaded, getPreferenceStore());
+	void openUpdatePopup() {
+		if (popup == null)
+			popup = new AutomaticUpdatesPopup(getWorkbenchWindowShell(), alreadyDownloaded, getPreferenceStore());
 		popup.open();
 
 	}
 
-	void createUpdateAction(PlannerResolutionOperation operation,
-			IUElementListRoot root, ArrayList initialSelections) {
-		if (updateAction != null) {
-			updateAction.dispose();
-		}
-		updateAction = new AutomaticUpdateAction(this, getSelectionProvider(),
-				profileId, operation, root, initialSelections);
-	}
-
-	void clearUpdatesAvailable() {
+	void clearUpdateAffordances() {
 		if (updateAffordance != null) {
 			IStatusLineManager manager = getStatusLineManager();
 			if (manager != null) {
@@ -364,97 +312,10 @@ public class AutomaticUpdater implements IUpdateListener {
 			popup.close(false);
 			popup = null;
 		}
-		alreadyValidated = false;
-	}
-
-	ISelectionProvider getSelectionProvider() {
-		return new ISelectionProvider() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.jface.viewers.ISelectionProvider#
-			 * addSelectionChangedListener
-			 * (org.eclipse.jface.viewers.ISelectionChangedListener)
-			 */
-			public void addSelectionChangedListener(
-					ISelectionChangedListener listener) {
-				// Ignore because the selection won't change
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
-			 */
-			public ISelection getSelection() {
-				return new StructuredSelection(iusWithUpdates);
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @seeorg.eclipse.jface.viewers.ISelectionProvider#
-			 * removeSelectionChangedListener
-			 * (org.eclipse.jface.viewers.ISelectionChangedListener)
-			 */
-			public void removeSelectionChangedListener(
-					ISelectionChangedListener listener) {
-				// ignore because the selection is static
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ISelectionProvider#setSelection(org
-			 * .eclipse.jface.viewers.ISelection)
-			 */
-			public void setSelection(ISelection sel) {
-				throw new UnsupportedOperationException(
-						"This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
-			}
-		};
 	}
 
 	public void launchUpdate() {
-		alreadyValidated = true;
-		updateAction.suppressWizard(false);
-		updateAction.run();
-	}
-
-	private void registerProvisioningJobListener() {
-		if (provisioningJobListener == null) {
-			provisioningJobListener = new JobChangeAdapter() {
-				public void done(IJobChangeEvent event) {
-					IWorkbench workbench = PlatformUI.getWorkbench();
-					if (workbench == null || workbench.isClosing())
-						return;
-					if (workbench.getDisplay() == null)
-						return;
-					workbench.getDisplay().asyncExec(new Runnable() {
-						public void run() {
-							checkUpdateAffordanceEnablement();
-						}
-					});
-				}
-
-				public void scheduled(final IJobChangeEvent event) {
-					IWorkbench workbench = PlatformUI.getWorkbench();
-					if (workbench == null || workbench.isClosing())
-						return;
-					if (workbench.getDisplay() == null)
-						return;
-					workbench.getDisplay().asyncExec(new Runnable() {
-						public void run() {
-							checkUpdateAffordanceEnablement();
-						}
-					});
-				}
-			};
-			ProvisioningOperationRunner
-					.addJobChangeListener(provisioningJobListener);
-		}
+		getProvisioningUI().openUpdateWizard(false, operation, null);
 	}
 
 	/*
@@ -462,45 +323,57 @@ public class AutomaticUpdater implements IUpdateListener {
 	 * if there is nothing to update, get rid of the update popup and
 	 * affordance.
 	 */
-	void validateUpdates() {
-		Job validateJob = new Job("Update validate job") { //$NON-NLS-1$
+	void triggerNewUpdateNotification() {
+		Job notifyJob = new Job("Update validate job") { //$NON-NLS-1$
 			public IStatus run(IProgressMonitor monitor) {
 				if (monitor.isCanceled())
 					return Status.CANCEL_STATUS;
-				validateUpdates(monitor, false);
-				// If there are no more updates, clear the indicators
-				if (iusWithUpdates.length == 0) {
-					if (PlatformUI.isWorkbenchRunning())
-						PlatformUI.getWorkbench().getDisplay().asyncExec(
-								new Runnable() {
-									public void run() {
-										clearUpdatesAvailable();
-									}
-								});
-				} else {
-					// Run through the same update notification logic as before,
-					// which will cause a new plan to be created against the
-					// changed profile.
-					updatesAvailable(new UpdateEvent(profileId, iusWithUpdates));
-				}
+				// notify that updates are available for all roots.  We don't know for sure that
+				// there are any, but this will cause everything to be rechecked. Don't trigger
+				// a popup, just update the affordance and internal state.
+				updatesAvailable(new UpdateEvent(profileId, getInstalledIUs()));
 				return Status.OK_STATUS;
 			}
 		};
-		validateJob.setSystem(true);
-		validateJob.setPriority(Job.LONG);
-		validateJob.schedule();
+		notifyJob.setSystem(true);
+		notifyJob.setUser(false);
+		notifyJob.setPriority(Job.LONG);
+		notifyJob.schedule();
+	}
+
+	/*
+	 * Get the IInstallable units for the specified profile
+	 * 
+	 * @param profileId the profile in question
+	 * @param all <code>true</code> if all IInstallableUnits in the profile should
+	 * be returned, <code>false</code> only those IInstallableUnits marked as (user visible) roots
+	 * should be returned.
+	 * 
+	 * @return an array of IInstallableUnits installed in the profile.
+	 */
+	public Collection<IInstallableUnit> getInstalledIUs() {
+		IProfile profile = getProfileRegistry().getProfile(profileId);
+		if (profile == null)
+			return CollectionUtils.emptyList();
+		IQuery<IInstallableUnit> query = new UserVisibleRootQuery();
+		IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
+		return queryResult.toUnmodifiableSet();
 	}
 
 	public void shutdown() {
-		if (updateAction != null)
-			updateAction.dispose();
-		if (provisioningJobListener != null) {
-			ProvisioningOperationRunner
-					.removeJobChangeListener(provisioningJobListener);
-			provisioningJobListener = null;
-		}
 		statusLineManager = null;
-		updateAction = null;
+		if (profileListener != null) {
+			getProvisioningEventBus().removeListener(profileListener);
+			profileListener = null;
+		}
+	}
+
+	IProfileRegistry getProfileRegistry() {
+		return (IProfileRegistry) getSession().getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
+	}
+
+	IProvisioningEventBus getProvisioningEventBus() {
+		return (IProvisioningEventBus) getSession().getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
 	}
 
 	IPreferenceStore getPreferenceStore() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
index b288264..af7b276 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.PopupDialog;
 import org.eclipse.jface.layout.GridDataFactory;
@@ -262,8 +261,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
 		ToolItem closeButton = new ToolItem(toolBar, SWT.PUSH, 0);
 
 		GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
-		closeButton.setImage(ProvUIImages.getImage(ProvUIImages.IMG_TOOL_CLOSE));
-		closeButton.setHotImage(ProvUIImages.getImage(ProvUIImages.IMG_TOOL_CLOSE_HOT));
+		closeButton.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
+		closeButton.setHotImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
 		closeButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				close();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
index c7febd3..6fd1078 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,23 +10,19 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
+import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
 
 /**
  * Preference page for automated updates.
@@ -34,8 +30,7 @@ import org.eclipse.ui.PlatformUI;
  * @since 3.4
  * 
  */
-public class AutomaticUpdatesPreferencePage extends PreferencePage implements
-		IWorkbenchPreferencePage {
+public class AutomaticUpdatesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
 	private Button enabledCheck;
 	private Button onStartupRadio, onScheduleRadio;
@@ -52,12 +47,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 	}
 
 	protected Control createContents(Composite parent) {
-		PlatformUI
-				.getWorkbench()
-				.getHelpSystem()
-				.setHelp(
-						parent,
-						IAutomaticUpdaterHelpContextIds.AUTOMATIC_UPDATES_PREFERENCE_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IAutomaticUpdaterHelpContextIds.AUTOMATIC_UPDATES_PREFERENCE_PAGE);
 
 		Composite container = new Composite(parent, SWT.NULL);
 		GridLayout layout = new GridLayout();
@@ -65,14 +55,12 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		container.setLayout(layout);
 
 		enabledCheck = new Button(container, SWT.CHECK);
-		enabledCheck
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findUpdates);
+		enabledCheck.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findUpdates);
 
 		createSpacer(container, 1);
 
 		updateScheduleGroup = new Group(container, SWT.NONE);
-		updateScheduleGroup
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_UpdateSchedule);
+		updateScheduleGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_UpdateSchedule);
 		layout = new GridLayout();
 		layout.numColumns = 3;
 		updateScheduleGroup.setLayout(layout);
@@ -80,8 +68,9 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		updateScheduleGroup.setLayoutData(gd);
 
 		onStartupRadio = new Button(updateScheduleGroup, SWT.RADIO);
-		onStartupRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnStart);
+		IProduct product = Platform.getProduct();
+		String productName = product != null && product.getName() != null ? product.getName() : AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_GenericProductName;
+		onStartupRadio.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnStart, productName));
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		onStartupRadio.setLayoutData(gd);
@@ -92,8 +81,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		});
 
 		onScheduleRadio = new Button(updateScheduleGroup, SWT.RADIO);
-		onScheduleRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnSchedule);
+		onScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnSchedule);
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		onScheduleRadio.setLayoutData(gd);
@@ -111,8 +99,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		dayCombo.setLayoutData(gd);
 
 		atLabel = new Label(updateScheduleGroup, SWT.NULL);
-		atLabel
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_at);
+		atLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_at);
 
 		hourCombo = new Combo(updateScheduleGroup, SWT.READ_ONLY);
 		hourCombo.setItems(AutomaticUpdateScheduler.HOURS);
@@ -122,8 +109,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		createSpacer(container, 1);
 
 		downloadGroup = new Group(container, SWT.NONE);
-		downloadGroup
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadOptions);
+		downloadGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadOptions);
 		layout = new GridLayout();
 		layout.numColumns = 3;
 		downloadGroup.setLayout(layout);
@@ -131,8 +117,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		downloadGroup.setLayoutData(gd);
 
 		searchOnlyRadio = new Button(downloadGroup, SWT.RADIO);
-		searchOnlyRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_searchAndNotify);
+		searchOnlyRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_searchAndNotify);
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		searchOnlyRadio.setLayoutData(gd);
@@ -143,8 +128,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		});
 
 		searchAndDownloadRadio = new Button(downloadGroup, SWT.RADIO);
-		searchAndDownloadRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadAndNotify);
+		searchAndDownloadRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadAndNotify);
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		searchAndDownloadRadio.setLayoutData(gd);
@@ -157,8 +141,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		createSpacer(container, 1);
 
 		remindGroup = new Group(container, SWT.NONE);
-		remindGroup
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindGroup);
+		remindGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindGroup);
 		layout = new GridLayout();
 		layout.numColumns = 3;
 		remindGroup.setLayout(layout);
@@ -166,8 +149,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		remindGroup.setLayoutData(gd);
 
 		remindOnceRadio = new Button(remindGroup, SWT.RADIO);
-		remindOnceRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindOnce);
+		remindOnceRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindOnce);
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		remindOnceRadio.setLayoutData(gd);
@@ -178,8 +160,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		});
 
 		remindScheduleRadio = new Button(remindGroup, SWT.RADIO);
-		remindScheduleRadio
-				.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindSchedule);
+		remindScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindSchedule);
 		gd = new GridData();
 		gd.horizontalSpan = 3;
 		remindScheduleRadio.setLayoutData(gd);
@@ -217,26 +198,18 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 	}
 
 	private void initialize() {
-		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault()
-				.getPreferenceStore();
-		enabledCheck.setSelection(pref
-				.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
-		setSchedule(pref
-				.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
+		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
+		enabledCheck.setSelection(pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+		setSchedule(pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
 
 		dayCombo.setText(AutomaticUpdateScheduler.DAYS[getDay(pref, false)]);
 		hourCombo.setText(AutomaticUpdateScheduler.HOURS[getHour(pref, false)]);
 
-		remindScheduleRadio.setSelection(pref
-				.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
-		remindOnceRadio.setSelection(!pref
-				.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
-		remindElapseCombo.setText(pref
-				.getString(PreferenceConstants.PREF_REMIND_ELAPSED));
-		searchOnlyRadio.setSelection(!pref
-				.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
-		searchAndDownloadRadio.setSelection(pref
-				.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+		remindScheduleRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
+		remindOnceRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
+		remindElapseCombo.setText(pref.getString(PreferenceConstants.PREF_REMIND_ELAPSED));
+		searchOnlyRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+		searchAndDownloadRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
 
 		pageChanged();
 	}
@@ -262,38 +235,26 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		remindGroup.setEnabled(master);
 		remindScheduleRadio.setEnabled(master);
 		remindOnceRadio.setEnabled(master);
-		remindElapseCombo.setEnabled(master
-				&& remindScheduleRadio.getSelection());
+		remindElapseCombo.setEnabled(master && remindScheduleRadio.getSelection());
 	}
 
 	protected void performDefaults() {
 		super.performDefaults();
-		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault()
-				.getPreferenceStore();
-		enabledCheck
-				.setSelection(pref
-						.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
-
-		setSchedule(pref
-				.getDefaultString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
-		onScheduleRadio
-				.setSelection(pref
-						.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
+		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
+		enabledCheck.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
+
+		setSchedule(pref.getDefaultString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
+		onScheduleRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
 
 		dayCombo.setText(AutomaticUpdateScheduler.DAYS[getDay(pref, true)]);
 		hourCombo.setText(AutomaticUpdateScheduler.HOURS[getHour(pref, true)]);
 
-		remindOnceRadio.setSelection(!pref
-				.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
-		remindScheduleRadio.setSelection(pref
-				.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
-		remindElapseCombo.setText(pref
-				.getDefaultString(PreferenceConstants.PREF_REMIND_ELAPSED));
-
-		searchOnlyRadio.setSelection(!pref
-				.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
-		searchAndDownloadRadio.setSelection(pref
-				.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+		remindOnceRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
+		remindScheduleRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
+		remindElapseCombo.setText(pref.getDefaultString(PreferenceConstants.PREF_REMIND_ELAPSED));
+
+		searchOnlyRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
+		searchAndDownloadRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
 		pageChanged();
 	}
 
@@ -301,21 +262,16 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 	 * Method declared on IPreferencePage. Subclasses should override
 	 */
 	public boolean performOk() {
-		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault()
-				.getPreferenceStore();
-		pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED,
-				enabledCheck.getSelection());
+		IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
+		pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, enabledCheck.getSelection());
 		if (onStartupRadio.getSelection())
-			pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE,
-					PreferenceConstants.PREF_UPDATE_ON_STARTUP);
+			pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_STARTUP);
 		else
-			pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE,
-					PreferenceConstants.PREF_UPDATE_ON_SCHEDULE);
+			pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_SCHEDULE);
 
 		if (remindScheduleRadio.getSelection()) {
 			pref.setValue(PreferenceConstants.PREF_REMIND_SCHEDULE, true);
-			pref.setValue(PreferenceConstants.PREF_REMIND_ELAPSED,
-					remindElapseCombo.getText());
+			pref.setValue(PreferenceConstants.PREF_REMIND_ELAPSED, remindElapseCombo.getText());
 		} else {
 			pref.setValue(PreferenceConstants.PREF_REMIND_SCHEDULE, false);
 		}
@@ -323,8 +279,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 		pref.setValue(AutomaticUpdateScheduler.P_DAY, dayCombo.getText());
 		pref.setValue(AutomaticUpdateScheduler.P_HOUR, hourCombo.getText());
 
-		pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY,
-				searchAndDownloadRadio.getSelection());
+		pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY, searchAndDownloadRadio.getSelection());
 
 		AutomaticUpdatePlugin.getDefault().savePreferences();
 		AutomaticUpdatePlugin.getDefault().getScheduler().rescheduleUpdate();
@@ -332,9 +287,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 	}
 
 	private int getDay(IPreferenceStore pref, boolean useDefault) {
-		String day = useDefault ? pref
-				.getDefaultString(AutomaticUpdateScheduler.P_DAY) : pref
-				.getString(AutomaticUpdateScheduler.P_DAY);
+		String day = useDefault ? pref.getDefaultString(AutomaticUpdateScheduler.P_DAY) : pref.getString(AutomaticUpdateScheduler.P_DAY);
 		for (int i = 0; i < AutomaticUpdateScheduler.DAYS.length; i++)
 			if (AutomaticUpdateScheduler.DAYS[i].equals(day))
 				return i;
@@ -342,9 +295,7 @@ public class AutomaticUpdatesPreferencePage extends PreferencePage implements
 	}
 
 	private int getHour(IPreferenceStore pref, boolean useDefault) {
-		String hour = useDefault ? pref
-				.getDefaultString(AutomaticUpdateScheduler.P_HOUR) : pref
-				.getString(AutomaticUpdateScheduler.P_HOUR);
+		String hour = useDefault ? pref.getDefaultString(AutomaticUpdateScheduler.P_HOUR) : pref.getString(AutomaticUpdateScheduler.P_HOUR);
 		for (int i = 0; i < AutomaticUpdateScheduler.HOURS.length; i++)
 			if (AutomaticUpdateScheduler.HOURS[i].equals(hour))
 				return i;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
index 1cdbb9d..6bb840b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
@@ -10,11 +10,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
 
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileScope;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProfileScope;
 import org.eclipse.ui.statushandlers.StatusManager;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
@@ -31,7 +31,10 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		// scope (final 3.5 format)
 		// 2) if applicable, migrate from 3.4 prefs kept in a different bundle
 		// 3) if applicable, migrate from 3.3 prefs known by Update Manager
-		Preferences pref = new ProfileScope(IProfileRegistry.SELF).getNode(AutomaticUpdatePlugin.PLUGIN_ID);
+		final IAgentLocation agentLocation = AutomaticUpdatePlugin.getDefault().getAgentLocation();
+		if (agentLocation == null)
+			return;
+		Preferences pref = new ProfileScope(agentLocation, IProfileRegistry.SELF).getNode(AutomaticUpdatePlugin.PLUGIN_ID);
 		try {
 			if (pref.keys().length == 0) {
 				// migrate preferences from instance scope to profile scope
@@ -44,7 +47,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 					pref.flush();
 			}
 		} catch (BackingStoreException e) {
-			ProvUI.handleException(e, AutomaticUpdateMessages.ErrorLoadingPreferenceKeys, StatusManager.LOG);
+			handleException(e, AutomaticUpdateMessages.ErrorLoadingPreferenceKeys);
 		}
 
 		// Have we migrated from 3.4 pref values?
@@ -66,21 +69,20 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 				// there. We don't migrate if the value was never set.
 				// We use string literals rather than pref constants because we want to
 				// ensure we match the 3.4 values.
-				if (node34.get("enabled", null) == null) { //$NON-NLS-1$
+				if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null && node34.get("enabled", null) != null) { //$NON-NLS-1$
 					pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, node34.getBoolean("enabled", false)); //$NON-NLS-1$
 				}
-				if (node34.get("schedule", null) == null) { //$NON-NLS-1$
+				if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, null) == null && node34.get("schedule", null) != null) { //$NON-NLS-1$
 					pref.put(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, node34.get("schedule", //$NON-NLS-1$
 							PreferenceConstants.PREF_UPDATE_ON_STARTUP));
 				}
-				if (node34.get("download", null) == null) { //$NON-NLS-1$
+				if (pref.get(PreferenceConstants.PREF_DOWNLOAD_ONLY, null) == null && node34.get("download", null) != null) { //$NON-NLS-1$
 					pref.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, node34.getBoolean("download", false)); //$NON-NLS-1$
 				}
-				if (node34.get("remindOnSchedule", null) == null) { //$NON-NLS-1$
+				if (pref.get(PreferenceConstants.PREF_REMIND_SCHEDULE, null) == null && node34.get("remindOnSchedule", null) != null) { //$NON-NLS-1$
 					pref.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, node34.getBoolean("remindOnSchedule", false)); //$NON-NLS-1$
 				}
-				if (node34.get("remindElapsedTime", null) == null) { //$NON-NLS-1$
-
+				if (pref.get(PreferenceConstants.PREF_REMIND_ELAPSED, null) == null && node34.get("remindElapsedTime", null) != null) { //$NON-NLS-1$
 					pref.put(PreferenceConstants.PREF_REMIND_ELAPSED, node34.get("remindElapsedTime", //$NON-NLS-1$
 							AutomaticUpdateMessages.AutomaticUpdateScheduler_30Minutes));
 				}
@@ -90,7 +92,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 			try {
 				pref.flush();
 			} catch (BackingStoreException e) {
-				ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences, StatusManager.LOG);
+				handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences);
 			}
 		}
 		// pref used to track 3.3 migration
@@ -110,7 +112,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 				boolean enableUpdate = prefUM.getBoolean(P_ENABLED, false);
 				// set p2 automatic update preference to match UM preference,
 				// only if we haven't already set a value.
-				if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null) {
+				if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null && updateNodeExists) {
 					pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, enableUpdate);
 				}
 				// turn off UM automatic update preference if it exists
@@ -122,11 +124,15 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 				pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_INIT, true);
 				pref.flush();
 			} catch (BackingStoreException e) {
-				ProvUI.handleException(e, AutomaticUpdateMessages.ErrorSavingClassicPreferences, StatusManager.LOG);
+				handleException(e, AutomaticUpdateMessages.ErrorSavingClassicPreferences);
 			}
 		}
 	}
 
+	private static void handleException(Exception e, String message) {
+		StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, message, e), StatusManager.LOG);
+	}
+
 	public void initializeDefaultPreferences() {
 		// initialize the default scope
 		Preferences node = new DefaultScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
index ebec0c2..497a0e6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -54,10 +54,8 @@ AutomaticUpdatesPopup_UpdatesAvailableTitle=Updates Available
 AutomaticUpdater_AutomaticDownloadOperationName=Automatic updates download
 AutomaticUpdater_ClickToReviewUpdates=Updates are available.  Click here to review and install them.
 AutomaticUpdater_ClickToReviewUpdatesWithProblems=Updates are available, but there may be some compatibility problems.  Click here to review them.
-AutomaticUpdater_ErrorCheckingUpdates=Unexpected error while checking the validity of updates.
-AutomaticUpdater_ResolutionOperationLabel=Computing Automatic Updates
 AutomaticUpdatesPreferencePage_UpdateSchedule=&Update schedule
-AutomaticUpdatesPreferencePage_findOnStart=Look for updates each time &platform is started
+AutomaticUpdatesPreferencePage_findOnStart=Look for u&pdates each time {0} is started
 AutomaticUpdatesPreferencePage_findOnSchedule=Look for updates on the following &schedule:
 AutomaticUpdatesPreferencePage_downloadOptions=&Download options
 AutomaticUpdatesPreferencePage_searchAndNotify=Search for updates and &notify me when they are available
@@ -65,6 +63,7 @@ AutomaticUpdatesPreferencePage_downloadAndNotify=Down&load new updates automatic
 AutomaticUpdatesPopup_ClickToReviewDownloaded=Software updates have been downloaded.\nClick to review and install updates.
 AutomaticUpdatesPopup_ClickToReviewNotDownloaded=Updates are available for your software.\nClick to review and install updates.
 AutomaticUpdatesPreferencePage_at=at
+AutomaticUpdatesPreferencePage_GenericProductName=the application
 AutomaticUpdatesPreferencePage_RemindGroup=&When updates are found
 AutomaticUpdatesPreferencePage_RemindSchedule=&Remind me about updates every:
 AutomaticUpdatesPreferencePage_RemindOnce=Notify me &once about updates
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.classpath
index ce73933..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
new file mode 100644
index 0000000..69033c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.equinox.p2.ui.sdk" version="2">
+    <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java" type="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler">
+        <filter id="571519004">
+            <message_arguments>
+                <message_argument value="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler.doExecuteAndLoad()"/>
+                <message_argument value="LoadMetadataRepositoryJob"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java" type="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare">
+        <filter id="571473929">
+            <message_arguments>
+                <message_argument value="RevertProfilePage"/>
+                <message_argument value="RevertProfilePageWithCompare"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
index a4650cd..19b78b9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Sep 18 21:25:49 EDT 2007
+#Tue Dec 22 23:22:15 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -143,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
index 2ee161f..dbe72f1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Sun Sep 23 11:59:31 EDT 2007
+#Sun Sep 23 11:59:14 EDT 2007
 eclipse.preferences.version=1
 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
 formatter_profile=_core
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
index b43cd13..4f5e0f9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
@@ -1,40 +1,30 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk;singleton:=true
 Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.ui,
- org.eclipse.equinox.internal.provisional.p2.ui.actions,
- org.eclipse.equinox.internal.provisional.p2.ui.dialogs,
- org.eclipse.equinox.internal.provisional.p2.ui.model,
- org.eclipse.equinox.internal.provisional.p2.ui.operations,
- org.eclipse.equinox.internal.provisional.p2.ui.policy,
- org.eclipse.equinox.internal.provisional.p2.ui.viewers,
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
 Export-Package: org.eclipse.equinox.internal.p2.ui.sdk;x-internal:=true,
  org.eclipse.equinox.internal.p2.ui.sdk.prefs;x-internal:=true
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
  org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+ org.eclipse.equinox.p2.ui,
+ org.eclipse.compare
+Import-Package: javax.xml.parsers,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.osgi.util;version="1.1.0",
+ org.osgi.framework;version="1.3.0",
+ org.w3c.dom,
+ org.xml.sax
+Service-Component: OSGI-INF/policy_component.xml, OSGI-INF/licenseManager_component.xml
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
-Service-Component: OSGI-INF/policy_component.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
new file mode 100644
index 0000000..bdaeb06
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk.licenseManager">
+   <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SimpleLicenseManager"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.ui.LicenseManager"/>
+   </service>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
index 4186945..c025007 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
@@ -2,6 +2,6 @@
 <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk">
    <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SDKPolicy"/>
    <service>
-      <provide interface="org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy"/>
+      <provide interface="org.eclipse.equinox.p2.ui.Policy"/>
    </service>
 </scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/build.properties
index 94674cb..8be3e84 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/build.properties
@@ -16,3 +16,5 @@ bin.includes = plugin.properties,\
                OSGI-INF/
 src.includes = about.html
 source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.properties
index 7cc9729..c25e1e6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.properties
@@ -13,9 +13,6 @@
 #
 providerName = Eclipse.org - Equinox
 bundleName=Equinox Provisioning Platform Update Support
-IU.general=General Information
-IU.license=License Agreement
-IU.copyright=Copyright
 Update.command=Check for Updates
 Update.command.mnemonic=U
 Install.command=Install New Software...
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.xml
index be40b4e..8722ca9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/plugin.xml
@@ -5,40 +5,7 @@
    		id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
 		<initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
 	</extension>
-  <extension
-         point="org.eclipse.ui.propertyPages">
-      <page
-            name="%IU.copyright"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.IUCopyrightPropertyPage"
-            id="org.eclipse.equinox.p2.ui.sdk.IUCopyrightPropertyPage">
-            <enabledWhen>
-            <adapt
-                  type="org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit">
-             </adapt>
-          </enabledWhen>
-      </page>
-           <page
-            name="%IU.general"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.IUGeneralInfoPropertyPage"
-            id="org.eclipse.equinox.p2.ui.sdk.IUGeneralInfoPropertyPage">
-            <enabledWhen>
-            <adapt
-                  type="org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit">
-             </adapt>
-          </enabledWhen>
-      </page>
-      <page
-            name="%IU.license"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.IULicensePropertyPage"
-            id="org.eclipse.equinox.p2.ui.sdk.IULicensePropertyPage">
-            <enabledWhen>
-            <adapt
-                  type="org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit">
-             </adapt>
-          </enabledWhen>
-      </page>    
-      </extension>
-       <extension
+    <extension
          point="org.eclipse.ui.preferencePages">
               <page
             name="%provisioningPrefPage"
@@ -50,7 +17,7 @@
        <page
             name="%sitesPrefPage"
             category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RepositoryManipulationPage"
+            class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
             id="org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage">
             <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
       </page>
@@ -143,12 +110,12 @@
          point="org.eclipse.ui.installationPages">
           <page
             name="%installedSoftwarePage"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstalledSoftwarePage"
+            class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
             id="10.org.eclipse.equinox.internal.p2.ui.sdk.InstalledSoftwarePage">
           </page>
           <page
             name="%installHistoryPage"
-            class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RevertProfilePage"
+            class="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare"
             id="11.org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePage">
           </page>
           
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/pom.xml
new file mode 100644
index 0000000..b57ed50
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui.sdk</artifactId>
+  <version>1.0.100.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
index 28c1729..5c6da40 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,12 +11,7 @@
 package org.eclipse.equinox.internal.p2.ui.sdk;
 
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstallWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
 
 /**
  * InstallNewSoftwareHandler invokes the install wizard
@@ -32,29 +27,30 @@ public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
 		super();
 	}
 
-	protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
-		InstallWizard wizard = new InstallWizard(Policy.getDefault(), profileId, null, null, manager);
-		WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
-		dialog.create();
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
-
-		dialog.open();
+	protected void doExecute(LoadMetadataRepositoryJob job) {
+		getProvisioningUI().openInstallWizard(null, null, job);
 	}
 
 	protected boolean waitForPreload() {
-		// If there is no way for the user to manipulate repositories,
-		// then we may as well wait for existing repos to load so that
-		// content is available.  If the user can manipulate the
-		// repositories, then we don't wait, because we don't know which
-		// ones they want to work with.
-		return Policy.getDefault().getRepositoryManipulator() == null;
+		// If the user cannot see repositories, then we may as well wait
+		// for existing repos to load so that content is available.  
+		// If the user can manipulate the repositories, then we don't wait, 
+		// because we don't know which ones they want to work with.
+		return !getProvisioningUI().getPolicy().getRepositoriesVisible();
 	}
 
 	protected void setLoadJobProperties(Job loadJob) {
+		super.setLoadJobProperties(loadJob);
 		// If we are doing a background load, we do not wish to authenticate, as the
 		// user is unaware that loading was needed
 		if (!waitForPreload()) {
-			loadJob.setProperty(ValidationDialogServiceUI.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
+			loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
+			loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
 		}
 	}
+
+	@Override
+	protected String getProgressTaskName() {
+		return ProvSDKMessages.InstallNewSoftwareHandler_ProgressTaskName;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
index 5852078..e1f89a9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,11 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Shell;
@@ -32,8 +33,6 @@ import org.eclipse.ui.statushandlers.StatusManager;
  */
 abstract class PreloadingRepositoryHandler extends AbstractHandler {
 
-	Object LOAD_FAMILY = new Object();
-
 	/**
 	 * The constructor.
 	 */
@@ -45,37 +44,51 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
 	 * Execute the command.
 	 */
 	public Object execute(ExecutionEvent event) {
-		try {
-			final String profileId = ProvSDKUIActivator.getSelfProfileId();
+		// Look for a profile.  We may not immediately need it in the
+		// handler, but if we don't have one, whatever we are trying to do
+		// will ultimately fail in a more subtle/low-level way.  So determine
+		// up front if the system is configured properly.
+		String profileId = getProvisioningUI().getProfileId();
+		IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
+		IProfile profile = null;
+		if (agent != null) {
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			if (registry != null) {
+				profile = registry.getProfile(profileId);
+			}
+		}
+		if (profile == null) {
+			// Inform the user nicely
+			MessageDialog.openInformation(null, ProvSDKMessages.Handler_SDKUpdateUIMessageTitle, ProvSDKMessages.Handler_CannotLaunchUI);
+			// Log the detailed message
+			StatusManager.getManager().handle(ProvSDKUIActivator.getNoSelfProfileStatus());
+		} else {
 			BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
 				public void run() {
-					doExecuteAndLoad(profileId, preloadRepositories());
+					doExecuteAndLoad();
 				}
 			});
-
-		} catch (ProvisionException e) {
-			MessageDialog.openInformation(null, ProvSDKMessages.Handler_SDKUpdateUIMessageTitle, ProvSDKMessages.Handler_CannotLaunchUI);
-			ProvUI.handleException(e, null, StatusManager.LOG);
 		}
 		return null;
 	}
 
-	void doExecuteAndLoad(final String profileId, boolean preloadRepositories) {
-		//cancel any load that is already running
-		Job.getJobManager().cancel(LOAD_FAMILY);
-		final QueryableMetadataRepositoryManager queryableManager = new QueryableMetadataRepositoryManager(Policy.getDefault().getQueryContext(), false);
-		if (preloadRepositories) {
-			Job loadJob = new Job(ProvSDKMessages.InstallNewSoftwareHandler_LoadRepositoryJobLabel) {
-
-				protected IStatus run(IProgressMonitor monitor) {
-					queryableManager.loadAll(monitor);
-					return Status.OK_STATUS;
-				}
-
-				public boolean belongsTo(Object family) {
-					return family == LOAD_FAMILY;
+	void doExecuteAndLoad() {
+		if (preloadRepositories()) {
+			//cancel any load that is already running
+			Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
+			final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI()) {
+				public IStatus runModal(IProgressMonitor monitor) {
+					SubMonitor sub = SubMonitor.convert(monitor, getProgressTaskName(), 1000);
+					IStatus status = super.runModal(sub.newChild(500));
+					if (status.getSeverity() == IStatus.CANCEL)
+						return status;
+					try {
+						doPostLoadBackgroundWork(sub.newChild(500));
+					} catch (OperationCanceledException e) {
+						return Status.CANCEL_STATUS;
+					}
+					return status;
 				}
-
 			};
 			setLoadJobProperties(loadJob);
 			if (waitForPreload()) {
@@ -85,7 +98,7 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
 							if (event.getResult().isOK()) {
 								PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
 									public void run() {
-										doExecute(profileId, queryableManager);
+										doExecute(loadJob);
 									}
 								});
 							}
@@ -98,25 +111,35 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
 				loadJob.setSystem(true);
 				loadJob.setUser(false);
 				loadJob.schedule();
-				doExecute(profileId, queryableManager);
+				doExecute(null);
 			}
 		} else {
-			doExecute(profileId, queryableManager);
+			doExecute(null);
 		}
 	}
 
-	protected abstract void doExecute(String profileId, QueryableMetadataRepositoryManager manager);
+	protected abstract String getProgressTaskName();
+
+	protected abstract void doExecute(LoadMetadataRepositoryJob job);
 
 	protected boolean preloadRepositories() {
 		return true;
 	}
 
+	protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
+		// default is to do nothing more.
+	}
+
 	protected boolean waitForPreload() {
 		return true;
 	}
 
 	protected void setLoadJobProperties(Job loadJob) {
-		// nothing to do by default
+		loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
+	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		return ProvisioningUI.getDefaultUI();
 	}
 
 	/**
@@ -124,6 +147,6 @@ abstract class PreloadingRepositoryHandler extends AbstractHandler {
 	 * @return a Shell
 	 */
 	protected Shell getShell() {
-		return ProvUI.getDefaultParentShell();
+		return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
index cab15b6..022c13c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public class ProvSDKMessages extends NLS {
 	}
 	public static String Handler_CannotLaunchUI;
 	public static String Handler_SDKUpdateUIMessageTitle;
-	public static String InstallNewSoftwareHandler_LoadRepositoryJobLabel;
+	public static String InstallNewSoftwareHandler_ProgressTaskName;
 	public static String PreferenceInitializer_Error;
 	public static String ProvisioningPreferencePage_AlwaysOpenWizard;
 	public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
@@ -36,12 +36,11 @@ public class ProvSDKMessages extends NLS {
 	public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
 	public static String ProvisioningPreferencePage_PromptToOpenWizard;
 	public static String ProvSDKUIActivator_ErrorSavingPrefs;
-	public static String ProvSDKUIActivator_ErrorWritingLicenseRegistry;
-	public static String ProvSDKUIActivator_LicenseManagerReadError;
 	public static String ProvSDKUIActivator_NoSelfProfile;
 	public static String ProvSDKUIActivator_OpenWizardAnyway;
 	public static String ProvSDKUIActivator_Question;
-	public static String ProvSDKUIActivator_SitePrefLink;
+	public static String SDKPolicy_PrefPageName;
 	public static String UpdateHandler_NoSitesMessage;
 	public static String UpdateHandler_NoSitesTitle;
+	public static String UpdateHandler_ProgressTaskName;
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
index 78aadf7..1fd23f0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,20 +10,17 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk;
 
-import java.io.*;
-import org.eclipse.core.runtime.*;
+import java.io.IOException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
 import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProfileScope;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.util.IPropertyChangeListener;
@@ -31,19 +28,16 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.preferences.ScopedPreferenceStore;
 import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 
 /**
  * Activator class for the p2 UI.
  */
 public class ProvSDKUIActivator extends AbstractUIPlugin {
 
-	public static final boolean ANY_PROFILE = false;
-	private static final String DEFAULT_PROFILE_ID = "DefaultProfile"; //$NON-NLS-1$
-	private static final String LICENSE_STORAGE = "licenses.xml"; //$NON-NLS-1$
 	private static ProvSDKUIActivator plugin;
 	private static BundleContext context;
-	private ServiceRegistration certificateUIRegistration;
 	private ScopedPreferenceStore preferenceStore;
 
 	private IPropertyChangeListener preferenceListener;
@@ -88,9 +82,7 @@ public class ProvSDKUIActivator extends AbstractUIPlugin {
 		super.start(bundleContext);
 		plugin = this;
 		ProvSDKUIActivator.context = bundleContext;
-		readLicenseRegistry();
 		PreferenceInitializer.migratePreferences();
-		certificateUIRegistration = context.registerService(IServiceUI.class.getName(), new ValidationDialogServiceUI(), null);
 		getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
 	}
 
@@ -98,91 +90,37 @@ public class ProvSDKUIActivator extends AbstractUIPlugin {
 		if (preferenceListener == null) {
 			preferenceListener = new IPropertyChangeListener() {
 				public void propertyChange(PropertyChangeEvent event) {
-					updateWithPreferences(Policy.getDefault().getQueryContext());
+					updateWithPreferences(getPolicy());
 				}
 			};
 		}
 		return preferenceListener;
 	}
 
-	private void readLicenseRegistry() {
-		IPath location = getStateLocation().append(LICENSE_STORAGE);
-		File f = location.toFile();
-		BufferedInputStream stream = null;
-		if (f.exists()) {
-			try {
-				stream = new BufferedInputStream(new FileInputStream(f));
-				Policy.getDefault().getLicenseManager().read(stream);
-				stream.close();
-			} catch (IOException e) {
-				ProvUI.reportStatus(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_LicenseManagerReadError, e), StatusManager.LOG);
-			}
-		}
+	public ProvisioningUI getProvisioningUI() {
+		return ProvisioningUI.getDefaultUI();
 	}
 
-	private void writeLicenseRegistry() {
-		if (!Policy.getDefault().getLicenseManager().hasAcceptedLicenses())
-			return;
-		IPath location = getStateLocation().append(LICENSE_STORAGE);
-		File f = location.toFile();
-		BufferedOutputStream stream = null;
-		try {
-			stream = new BufferedOutputStream(new FileOutputStream(f, false));
-			Policy.getDefault().getLicenseManager().write(stream);
-			stream.close();
-		} catch (IOException e) {
-			ProvUI.reportStatus(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_ErrorWritingLicenseRegistry, e), StatusManager.LOG);
-		}
+	private Policy getPolicy() {
+		return getProvisioningUI().getPolicy();
+	}
+
+	public IProvisioningAgent getProvisioningAgent() {
+		return getProvisioningUI().getSession().getProvisioningAgent();
 	}
 
 	public void stop(BundleContext bundleContext) throws Exception {
-		writeLicenseRegistry();
 		plugin = null;
-		certificateUIRegistration.unregister();
 		getPreferenceStore().removePropertyChangeListener(preferenceListener);
 		super.stop(bundleContext);
 	}
 
-	public IProvisioningEventBus getProvisioningEventBus() {
-		ServiceReference busReference = context.getServiceReference(IProvisioningEventBus.SERVICE_NAME);
-		if (busReference == null)
-			return null;
-		return (IProvisioningEventBus) context.getService(busReference);
-	}
-
-	/**
-	 * Get the id of the profile for the running system.  Throw a ProvisionException
-	 * if no self profile is available, unless configured to answer any
-	 * profile.  Getting any profile allows testing of the
-	 * UI even when the system is not self hosting.  
-	 */
-	public static String getSelfProfileId() throws ProvisionException {
-		// Get the profile of the running system.
-		IProfile profile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
-		if (profile == null) {
-			if (ANY_PROFILE) {
-				ProvUI.reportStatus(getNoSelfProfileStatus(), StatusManager.LOG);
-				IProfile[] profiles = ProvisioningUtil.getProfiles();
-				if (profiles.length > 0)
-					return profiles[0].getProfileId();
-				return ProfileFactory.makeProfile(DEFAULT_PROFILE_ID).getProfileId();
-			}
-			throw new ProvisionException(getNoSelfProfileStatus());
-		}
-		return profile.getProfileId();
-	}
-
 	static IStatus getNoSelfProfileStatus() {
 		return new Status(IStatus.WARNING, PLUGIN_ID, ProvSDKMessages.ProvSDKUIActivator_NoSelfProfile);
 	}
 
-	void updateWithPreferences(IUViewQueryContext queryContext) {
-		queryContext.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
-		queryContext.setVisibleAvailableIUProperty(IInstallableUnit.PROP_TYPE_GROUP);
-		// If this ever changes, we must change AutomaticUpdateSchedule.getProfileQuery()
-		queryContext.setVisibleInstalledIUProperty(IInstallableUnit.PROP_PROFILE_ROOT_IU);
-		queryContext.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
-		queryContext.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+	void updateWithPreferences(Policy policy) {
+		policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
 	}
 
 	/*
@@ -193,17 +131,29 @@ public class ProvSDKUIActivator extends AbstractUIPlugin {
 	public IPreferenceStore getPreferenceStore() {
 		// Create the preference store lazily.
 		if (preferenceStore == null) {
-			preferenceStore = new ScopedPreferenceStore(new ProfileScope(IProfileRegistry.SELF), PLUGIN_ID);
+			final IAgentLocation agentLocation = getAgentLocation();
+			if (agentLocation == null)
+				return super.getPreferenceStore();
+			preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
 		}
 		return preferenceStore;
 	}
 
+	private IAgentLocation getAgentLocation() {
+		ServiceReference ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
+		if (ref == null)
+			return null;
+		IAgentLocation location = (IAgentLocation) getContext().getService(ref);
+		getContext().ungetService(ref);
+		return location;
+	}
+
 	public void savePreferences() {
 		if (preferenceStore != null)
 			try {
 				preferenceStore.save();
 			} catch (IOException e) {
-				ProvUI.handleException(e, ProvSDKMessages.ProvSDKUIActivator_ErrorSavingPrefs, StatusManager.LOG | StatusManager.SHOW);
+				StatusManager.getManager().handle(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_ErrorSavingPrefs, e), StatusManager.LOG | StatusManager.SHOW);
 			}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
new file mode 100644
index 0000000..9a1f777
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
@@ -0,0 +1,230 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.sdk;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.compare.*;
+import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.equinox.p2.ui.RevertProfilePage;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Same as {@link RevertProfilePage} but adds a compare button to compare profiles.
+ * 
+ * @see RevertProfilePage
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 2.0
+ */
+public class RevertProfilePageWithCompare extends RevertProfilePage {
+
+	private static final int COMPARE_ID = IDialogConstants.CLIENT_ID + 2;
+	Button compareButton;
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPageButtons(Composite parent) {
+		if (ProvisioningUI.getDefaultUI().getProfileId() == null)
+			return;
+		compareButton = createButton(parent, COMPARE_ID, ProvUIMessages.RevertProfilePage_CompareLabel);
+		compareButton.setToolTipText(ProvUIMessages.RevertProfilePage_CompareTooltip);
+		compareButton.setEnabled(computeCompareEnablement(getSelection()));
+		super.createPageButtons(parent);
+	}
+
+	protected void buttonPressed(int buttonId) {
+		switch (buttonId) {
+			case COMPARE_ID :
+				compare();
+				break;
+			default :
+				super.buttonPressed(buttonId);
+				break;
+		}
+	}
+
+	boolean computeCompareEnablement(IStructuredSelection structuredSelection) {
+		// compare is enabled if there are two elements selected
+		Object[] selection = structuredSelection.toArray();
+		if (selection.length == 2) {
+			for (int i = 0; i < selection.length; i++) {
+				if (!(selection[i] instanceof RollbackProfileElement))
+					return false;
+			}
+			return true;
+		}
+		return false;
+	}
+
+	protected void handleSelectionChanged(IStructuredSelection selection) {
+		super.handleSelectionChanged(selection);
+		if (!selection.isEmpty()) {
+			if (selection.size() == 1) {
+				if (compareButton != null)
+					compareButton.setEnabled(false);
+			} else {
+				// multiple selections, we can compare
+				if (compareButton != null)
+					compareButton.setEnabled(computeCompareEnablement(selection));
+			}
+		} else {
+			// Nothing is selected
+			if (compareButton != null)
+				compareButton.setEnabled(false);
+		}
+	}
+
+	private RollbackProfileElement[] getRollbackProfileElementsToCompare() {
+		// expecting two items selected
+		RollbackProfileElement[] result = new RollbackProfileElement[2];
+		IStructuredSelection selection = getSelection();
+		int i = 0;
+		for (Object selected : selection.toList()) {
+			if (selected != null && selected instanceof RollbackProfileElement) {
+				result[i++] = (RollbackProfileElement) selected;
+			}
+			if (i == 2)
+				break;
+		}
+		return result;
+	}
+
+	void compare() {
+		final RollbackProfileElement[] rpe = getRollbackProfileElementsToCompare();
+		CompareUI.openCompareDialog(new ProfileCompareEditorInput(rpe));
+	}
+
+	private class ProfileCompareEditorInput extends CompareEditorInput {
+		private Object root;
+		private ProvElementNode l;
+		private ProvElementNode r;
+
+		public ProfileCompareEditorInput(RollbackProfileElement[] rpe) {
+			super(new CompareConfiguration());
+			Assert.isTrue(rpe.length == 2);
+			l = new ProvElementNode(rpe[0]);
+			r = new ProvElementNode(rpe[1]);
+		}
+
+		protected Object prepareInput(IProgressMonitor monitor) {
+			initLabels();
+			Differencer d = new Differencer();
+			root = d.findDifferences(false, monitor, null, null, l, r);
+			return root;
+		}
+
+		private void initLabels() {
+			CompareConfiguration cc = getCompareConfiguration();
+			cc.setLeftEditable(false);
+			cc.setRightEditable(false);
+			cc.setLeftLabel(l.getName());
+			cc.setLeftImage(l.getImage());
+			cc.setRightLabel(r.getName());
+			cc.setRightImage(r.getImage());
+		}
+
+		public String getOKButtonLabel() {
+			return IDialogConstants.OK_LABEL;
+		}
+	}
+
+	private class ProvElementNode implements IStructureComparator, ITypedElement, IStreamContentAccessor {
+		private ProvElement pe;
+		private IInstallableUnit iu;
+		final static String BLANK = ""; //$NON-NLS-1$
+		private String id = BLANK;
+
+		public ProvElementNode(Object input) {
+			pe = (ProvElement) input;
+			iu = ProvUI.getAdapter(pe, IInstallableUnit.class);
+			if (iu != null) {
+				id = iu.getId();
+			}
+		}
+
+		public Object[] getChildren() {
+			Set<ProvElementNode> children = new HashSet<ProvElementNode>();
+			if (pe instanceof RollbackProfileElement) {
+				Object[] c = ((RollbackProfileElement) pe).getChildren(null);
+				for (int i = 0; i < c.length; i++) {
+					children.add(new ProvElementNode(c[i]));
+				}
+			} else if (pe instanceof InstalledIUElement) {
+				Object[] c = ((InstalledIUElement) pe).getChildren(null);
+				for (int i = 0; i < c.length; i++) {
+					children.add(new ProvElementNode(c[i]));
+				}
+			}
+			return children.toArray();
+		}
+
+		/**
+		 * Implementation based on <code>id</code>.
+		 * @param other the object to compare this <code>ProvElementNode</code> against.
+		 * @return <code>true</code> if the <code>ProvElementNodes</code>are equal; <code>false</code> otherwise.
+		 */
+		public boolean equals(Object other) {
+			if (other instanceof ProvElementNode)
+				return id.equals(((ProvElementNode) other).id);
+			return super.equals(other);
+		}
+
+		/**
+		 * Implementation based on <code>id</code>.
+		 * @return a hash code for this object.
+		 */
+		public int hashCode() {
+			return id.hashCode();
+		}
+
+		public Image getImage() {
+			return pe.getImage(null);
+		}
+
+		public String getName() {
+			if (iu != null) {
+				return iu.getProperty(IInstallableUnit.PROP_NAME, null);
+			}
+			return pe.getLabel(null);
+		}
+
+		public String getType() {
+			return ITypedElement.UNKNOWN_TYPE;
+		}
+
+		public InputStream getContents() {
+			String contents = BLANK;
+			if (iu != null) {
+				contents = iu.getVersion().toString();
+			}
+			return new ByteArrayInputStream(contents.getBytes());
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
index 9a1a02d..c6149bc 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,11 @@ package org.eclipse.equinox.internal.p2.ui.sdk;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.ui.IStatusCodes;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.ui.Policy;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -28,67 +28,49 @@ import org.eclipse.ui.statushandlers.StatusManager;
  * p2 UI.  The policy is declared as an OSGi service in
  * the policy_component.xml file.
  * 
- * @since 3.5
+ * @since 3.6
  */
 public class SDKPolicy extends Policy {
+
 	public SDKPolicy() {
-		setProfileChooser(new IProfileChooser() {
-			public String getProfileId(Shell shell) {
-				try {
-					return ProvSDKUIActivator.getSelfProfileId();
-				} catch (ProvisionException e) {
-					ProvUI.handleException(e, e.getStatus().getMessage(), StatusManager.LOG);
-					return null;
-				}
-			}
-		});
-		setRepositoryManipulator(new ColocatedRepositoryManipulator(this, PreferenceConstants.PREF_PAGE_SITES) {
-			public String getManipulatorLinkLabel() {
-				return ProvSDKMessages.ProvSDKUIActivator_SitePrefLink;
-			}
-		});
-		setPlanValidator(new PlanValidator() {
-			public boolean continueWorkingWithPlan(ProvisioningPlan plan, Shell shell) {
-				if (plan == null)
-					return false;
-				if (plan.getStatus().getSeverity() == IStatus.CANCEL)
-					return false;
+		// initialize for our values
+		setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
+		// If this ever changes, we must change AutomaticUpdateSchedule.getProfileQuery()
+		setVisibleInstalledIUQuery(new UserVisibleRootQuery());
+		setRepositoryPreferencePageId("org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"); //$NON-NLS-1$
+		setRepositoryPreferencePageName(ProvSDKMessages.SDKPolicy_PrefPageName);
+		ProvSDKUIActivator.getDefault().updateWithPreferences(this);
+	}
 
-				// Special case those statuses where we would never want to open a wizard
-				if (plan.getStatus().getCode() == IStatusCodes.NOTHING_TO_UPDATE) {
-					ProvUI.reportStatus(plan.getStatus(), StatusManager.BLOCK);
-					return false;
-				}
+	public IStatus getNoProfileChosenStatus() {
+		return ProvSDKUIActivator.getNoSelfProfileStatus();
+	}
 
-				// Allow the wizard to open if there is no error
-				if (plan.getStatus().getSeverity() != IStatus.ERROR)
-					return true;
+	public boolean continueWorkingOperation(ProfileChangeOperation operation, Shell shell) {
+		// don't continue if superclass has already identified problem scenarios
+		boolean ok = super.continueWorkingWithOperation(operation, shell);
+		if (!ok)
+			return false;
 
-				// There is an error.  Check the preference to see whether to continue.
-				IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore();
-				String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
-				if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
-					return true;
-				}
-				if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
-					ProvUI.reportStatus(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
-					return false;
-				}
-				MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
+		IProvisioningPlan plan = operation.getProvisioningPlan();
+		if (plan == null)
+			return false;
 
-				// Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
-				if (dialog.getReturnCode() == IDialogConstants.NO_ID)
-					ProvUI.reportStatus(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
-				return dialog.getReturnCode() == IDialogConstants.YES_ID;
-			}
-		});
-		// Start with the default query context and configure some settings
-		IUViewQueryContext queryContext = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY);
-		setQueryContext(queryContext);
-		ProvSDKUIActivator.getDefault().updateWithPreferences(queryContext);
-	}
+		// Check the preference to see whether to continue.
+		IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore();
+		String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
+		if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
+			return true;
+		}
+		if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
+			StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
+			return false;
+		}
+		MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
 
-	public IStatus getNoProfileChosenStatus() {
-		return ProvSDKUIActivator.getNoSelfProfileStatus();
+		// Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
+		if (dialog.getReturnCode() == IDialogConstants.NO_ID)
+			StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
+		return dialog.getReturnCode() == IDialogConstants.YES_ID;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
new file mode 100644
index 0000000..166b2ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Genuitec, LLC - added license support
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.sdk;
+
+import java.util.HashSet;
+import java.util.StringTokenizer;
+import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProfileScope;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.ui.LicenseManager;
+import org.osgi.service.prefs.Preferences;
+
+/**
+ * SimpleLicenseManager is a license manager that keeps track of 
+ * IInstallableUnit licenses using their UUID.  The licenses ids
+ * are stored in the profile's preferences.
+ * 
+ * @since 3.6
+ */
+public class SimpleLicenseManager extends LicenseManager {
+	java.util.Set<String> accepted = new HashSet<String>();
+	String profileId;
+
+	public SimpleLicenseManager(String profileId) {
+		super();
+		this.profileId = profileId;
+		initializeFromPreferences();
+	}
+
+	public SimpleLicenseManager() {
+		this(IProfileRegistry.SELF);
+	}
+
+	public boolean accept(ILicense license) {
+		accepted.add(license.getUUID());
+		updatePreferences();
+		return true;
+	}
+
+	public boolean reject(ILicense license) {
+		accepted.remove(license.getUUID());
+		updatePreferences();
+		return true;
+	}
+
+	public boolean isAccepted(ILicense license) {
+		return accepted.contains(license.getUUID());
+	}
+
+	public boolean hasAcceptedLicenses() {
+		return !accepted.isEmpty();
+	}
+
+	private Preferences getPreferences() {
+		IAgentLocation location = (IAgentLocation) ProvSDKUIActivator.getDefault().getProvisioningAgent().getService(IAgentLocation.SERVICE_NAME);
+		return new ProfileScope(location, profileId).getNode(ProvSDKUIActivator.PLUGIN_ID);
+	}
+
+	private void initializeFromPreferences() {
+		Preferences pref = getPreferences();
+		if (pref != null) {
+			String digestList = pref.get(PreferenceConstants.PREF_LICENSE_DIGESTS, ""); //$NON-NLS-1$
+			StringTokenizer tokenizer = new StringTokenizer(digestList, ","); //$NON-NLS-1$
+			while (tokenizer.hasMoreTokens()) {
+				accepted.add(tokenizer.nextToken().trim());
+			}
+		}
+	}
+
+	private void updatePreferences() {
+		Preferences pref = getPreferences();
+		StringBuffer result = new StringBuffer();
+		Object[] indexedList = accepted.toArray();
+		for (int i = 0; i < indexedList.length; i++) {
+			if (i != 0)
+				result.append(","); //$NON-NLS-1$
+			result.append((String) indexedList[i]);
+		}
+		pref.put(PreferenceConstants.PREF_LICENSE_DIGESTS, result.toString());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
index 924632b..f2ce43a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk;
 
-import java.util.Collection;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.*;
 
 /**
  * UpdateHandler invokes the check for updates UI
@@ -29,63 +24,45 @@ import org.eclipse.jface.viewers.*;
 public class UpdateHandler extends PreloadingRepositoryHandler {
 
 	boolean hasNoRepos = false;
+	UpdateOperation operation;
 
-	/**
-	 * The constructor.
-	 */
-	public UpdateHandler() {
-		// constructor
-	}
-
-	protected void doExecute(String profileId, QueryableMetadataRepositoryManager manager) {
+	protected void doExecute(LoadMetadataRepositoryJob job) {
 		if (hasNoRepos) {
-			boolean goToSites = MessageDialog.openQuestion(getShell(), ProvSDKMessages.UpdateHandler_NoSitesTitle, ProvSDKMessages.UpdateHandler_NoSitesMessage);
-			if (goToSites) {
-				Policy.getDefault().getRepositoryManipulator().manipulateRepositories(getShell());
+			if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
+				boolean goToSites = MessageDialog.openQuestion(getShell(), ProvSDKMessages.UpdateHandler_NoSitesTitle, ProvSDKMessages.UpdateHandler_NoSitesMessage);
+				if (goToSites) {
+					getProvisioningUI().manipulateRepositories(getShell());
+				}
 			}
 			return;
 		}
-		// get the profile roots
-		ElementQueryDescriptor queryDescriptor = Policy.getDefault().getQueryProvider().getQueryDescriptor(new ProfileElement(null, profileId));
-		Collection collection = queryDescriptor.performQuery(null);
-		final IInstallableUnit[] roots = new IInstallableUnit[collection.size()];
-		Iterator iter = collection.iterator();
-		int i = 0;
-		while (iter.hasNext()) {
-			roots[i] = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
-			i++;
+		// Report any missing repositories.
+		job.reportAccumulatedStatus();
+		if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
+			getProvisioningUI().openUpdateWizard(false, operation, job);
 		}
-		// now create an update action whose selection is all the roots
-		UpdateAction action = new UpdateAction(Policy.getDefault(), new ISelectionProvider() {
-
-			public void addSelectionChangedListener(ISelectionChangedListener listener) {
-				// not dynamic
-			}
-
-			public ISelection getSelection() {
-				return new StructuredSelection(roots);
-			}
-
-			public void removeSelectionChangedListener(ISelectionChangedListener listener) {
-				// not dynamic
-			}
-
-			public void setSelection(ISelection selection) {
-				// not mutable
+	}
 
-			}
-		}, profileId, false);
-		action.setRepositoryManager(manager);
-		action.run();
+	protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
+		operation = getProvisioningUI().getUpdateOperation(null, null);
+		// check for updates
+		IStatus resolveStatus = operation.resolveModal(monitor);
+		if (resolveStatus.getSeverity() == IStatus.CANCEL)
+			throw new OperationCanceledException();
 	}
 
 	protected boolean preloadRepositories() {
 		hasNoRepos = false;
-		RepositoryManipulator repoMan = Policy.getDefault().getRepositoryManipulator();
-		if (repoMan != null && repoMan.getKnownRepositories().length == 0) {
+		RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
+		if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
 			hasNoRepos = true;
 			return false;
 		}
 		return super.preloadRepositories();
 	}
+
+	@Override
+	protected String getProgressTaskName() {
+		return ProvSDKMessages.UpdateHandler_ProgressTaskName;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
index 3ad993d..03d9528 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,18 +9,14 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-
-Handler_CannotLaunchUI=Cannot complete the request.  This installation has not been configured properly for Software Updates.
+Handler_CannotLaunchUI=Cannot complete the request.  This installation has not been configured properly for Software Updates.  See the error log for details.
 Handler_SDKUpdateUIMessageTitle=Software Updates
-InstallNewSoftwareHandler_LoadRepositoryJobLabel=Contacting Software Sites
+InstallNewSoftwareHandler_ProgressTaskName=Searching for available software...
 PreferenceInitializer_Error=Error accessing preferences.
 ProvSDKUIActivator_ErrorSavingPrefs=Error saving update preferences
-ProvSDKUIActivator_ErrorWritingLicenseRegistry=Error writing license registry.  Accepted licenses will not be remembered.
-ProvSDKUIActivator_LicenseManagerReadError=Error reading license registry.  Accepted licenses will not be remembered.
 ProvSDKUIActivator_NoSelfProfile=Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application's config.ini file.
 ProvSDKUIActivator_OpenWizardAnyway=The software items you selected may not be valid with your current installation.  Do you want to open the wizard anyway to review the selections?
 ProvSDKUIActivator_Question=Question
-ProvSDKUIActivator_SitePrefLink=Find more software by working with the <a>'Available Software Sites'</a> preferences.
 ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
 ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
 ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
@@ -28,5 +24,7 @@ ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available softw
 ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
 ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
 ProvisioningPreferencePage_PromptToOpenWizard=As&k me what to do when it happens
+SDKPolicy_PrefPageName=Available Software Sites
 UpdateHandler_NoSitesMessage=There are no update sites to search.  Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
\ No newline at end of file
+UpdateHandler_NoSitesTitle=No Updates Found
+UpdateHandler_ProgressTaskName=Checking for updates...
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
index 8885ed9..144ac50 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -18,4 +18,5 @@ public class PreferenceConstants {
 	public static final String PREF_PAGE_SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"; //$NON-NLS-1$
 	public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
 	public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
+	public static final String PREF_LICENSE_DIGESTS = "licenseDigestList"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
index bf829f3..3c63cf0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,14 +10,17 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
 
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.preferences.*;
 import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKMessages;
 import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileScope;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProfileScope;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.ui.statushandlers.StatusManager;
+import org.osgi.framework.ServiceReference;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
 
@@ -27,7 +30,7 @@ import org.osgi.service.prefs.Preferences;
 public class PreferenceInitializer extends AbstractPreferenceInitializer {
 
 	public static void migratePreferences() {
-		Preferences pref = new ProfileScope(IProfileRegistry.SELF).getNode(ProvSDKUIActivator.PLUGIN_ID);
+		Preferences pref = new ProfileScope(getDefaultAgentLocation(), IProfileRegistry.SELF).getNode(ProvSDKUIActivator.PLUGIN_ID);
 		try {
 			if (pref.keys().length == 0) {
 				// migrate preferences from instance scope to profile scope
@@ -39,7 +42,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 				pref.flush();
 			}
 		} catch (BackingStoreException e) {
-			ProvUI.handleException(e, ProvSDKMessages.PreferenceInitializer_Error, StatusManager.LOG);
+			StatusManager.getManager().handle(new Status(IStatus.ERROR, ProvSDKUIActivator.PLUGIN_ID, 0, ProvSDKMessages.PreferenceInitializer_Error, e), StatusManager.LOG);
 		}
 	}
 
@@ -52,4 +55,13 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
 		node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
 	}
+
+	private static IAgentLocation getDefaultAgentLocation() {
+		ServiceReference reference = ProvSDKUIActivator.getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
+		if (reference == null)
+			return null;
+		IAgentLocation result = (IAgentLocation) ProvSDKUIActivator.getContext().getService(reference);
+		ProvSDKUIActivator.getContext().ungetService(reference);
+		return result;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.ui/.classpath
index ce73933..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/.project b/eclipse/plugins/org.eclipse.equinox.p2.ui/.project
index 06b02bb..1b62af1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs
index a6b401a..19b78b9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Sep 18 21:22:20 EDT 2007
+#Tue Dec 22 23:22:15 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -7,24 +7,24 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -71,7 +71,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=en
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
@@ -143,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
index d23f68f..938ba4b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
@@ -1,85 +1,56 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
 Bundle-SymbolicName: org.eclipse.equinox.p2.ui;singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 2.0.0.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.ui.ProvUIActivator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.ui;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.pde.ui,org.eclipse.equinox.p2.ui.sdk",
+ org.eclipse.equinox.internal.p2.ui.actions;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler",
+ org.eclipse.equinox.internal.p2.ui.dialogs;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.pde.ui",
+ org.eclipse.equinox.internal.p2.ui.model;
+  x-friends:="org.eclipse.equinox.internal.p2.ui.analysis,
+   org.eclipse.equinox.p2.ui.admin,
+   org.eclipse.equinox.p2.ui.sdk.scheduler,
+   org.eclipse.equinox.p2.ui.sdk",
+ org.eclipse.equinox.internal.p2.ui.query;x-friends:="org.eclipse.equinox.internal.p2.ui.analysis,org.eclipse.equinox.p2.ui.admin",
+ org.eclipse.equinox.internal.p2.ui.viewers;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler",
+ org.eclipse.equinox.p2.ui;version="2.0.0"
+Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.expressions,
+ org.eclipse.equinox.security.ui;bundle-version="[1.0.0,2.0.0)"
 Import-Package: com.ibm.icu.text,
+ javax.xml.parsers,
+ org.eclipse.equinox.internal.p2.artifact.repository,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.p2.metadata.repository,
  org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.p2.rollback,
  org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.core,
  org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
  org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.engine.phases,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
- org.eclipse.osgi.service.resolver;version="1.1.0",
+ org.eclipse.equinox.internal.provisional.p2.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
  org.osgi.service.packageadmin;version="1.2.0",
- javax.xml.parsers,
  org.w3c.dom,
  org.xml.sax
-Export-Package: org.eclipse.equinox.internal.p2.ui;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.dialogs;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.model;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.query;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.viewers;x-internal:=true,
- org.eclipse.equinox.internal.provisional.p2.ui;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.pde.ui",
- org.eclipse.equinox.internal.provisional.p2.ui.actions;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.pde.ui",
- org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.pde.ui",
- org.eclipse.equinox.internal.provisional.p2.ui.model;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-    org.eclipse.equinox.p2.ui.admin.rcp,
-    org.eclipse.equinox.p2.ui.sdk,
-    org.eclipse.equinox.p2.ui.sdk.scheduler",
- org.eclipse.equinox.internal.provisional.p2.ui.operations;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.pde.ui",
- org.eclipse.equinox.internal.provisional.p2.ui.policy;
-  x-friends:="org.eclipse.equinox.p2.ui.admin,
-   org.eclipse.equinox.p2.ui.admin.rcp,
-   org.eclipse.equinox.p2.ui.sdk,
-   org.eclipse.equinox.p2.ui.sdk.scheduler,
-   org.eclipse.pde.ui",
- org.eclipse.equinox.internal.provisional.p2.ui.viewers;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.ui.sdk"
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.expressions, 
- org.eclipse.equinox.simpleconfigurator.manipulator,
- org.eclipse.equinox.p2.exemplarysetup,
- org.eclipse.equinox.security.ui;bundle-version="[1.0.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+Service-Component: OSGI-INF/repositoryTracker_component.xml, OSGI-INF/serviceui.xml
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
  CDC-1.1/Foundation-1.1
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml
new file mode 100644
index 0000000..f4c2c73
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.repositoryTracker">
+   <implementation class="org.eclipse.equinox.internal.p2.ui.ColocatedRepositoryTracker"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.operations.RepositoryTracker"/>
+   </service>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml
new file mode 100644
index 0000000..c3f94d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.serviceuifactory">
+   <implementation class="org.eclipse.equinox.internal.p2.ui.ServiceUIComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.core.UIServices"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui/build.properties
index 1377767..fb8111b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/build.properties
@@ -13,6 +13,9 @@ bin.includes = plugin.properties,\
                .,\
                about.html,\
                META-INF/,\
-               plugin.xml
+               plugin.xml,\
+               OSGI-INF/
 src.includes = about.html
 source.. = src/
+javacTarget=jsr14
+javacSource=1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.properties
index 599ea27..f8416d6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.properties
@@ -13,3 +13,7 @@
 #
 providerName = Eclipse.org - Equinox
 bundleName=Equinox Provisioning UI Support
+IU.general=General Information
+IU.license=License Agreement
+IU.copyright=Copyright
+
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.xml
index f2d8200..6f6031e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/plugin.xml
@@ -6,12 +6,45 @@
       <factory
             adaptableType="org.eclipse.equinox.internal.p2.ui.model.ProvElement"
             class="org.eclipse.equinox.internal.p2.ui.ProvUIAdapterFactory">
-         <adapter type="org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit"/>
-         <adapter type="org.eclipse.equinox.internal.provisional.p2.engine.IProfile"/>
-         <adapter type="org.eclipse.equinox.internal.provisional.p2.repository.IRepository"/>
-         <adapter type="org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository"/>
-         <adapter type="org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository"/>
+         <adapter type="org.eclipse.equinox.p2.metadata.IInstallableUnit"/>
+         <adapter type="org.eclipse.equinox.p2.engine.IProfile"/>
+         <adapter type="org.eclipse.equinox.p2.repository.IRepository"/>
+         <adapter type="org.eclipse.equinox.p2.repository.metadata.IMetadataRepository"/>
+         <adapter type="org.eclipse.equinox.p2.repository.artifact.IArtifactRepository"/>
       </factory>
-
    </extension>
-</plugin>
+   
+     <extension
+         point="org.eclipse.ui.propertyPages">
+      <page
+            name="%IU.copyright"
+            class="org.eclipse.equinox.internal.p2.ui.dialogs.IUCopyrightPropertyPage"
+            id="org.eclipse.equinox.p2.ui.IUCopyrightPropertyPage">
+            <enabledWhen>
+            <adapt
+                  type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
+             </adapt>
+          </enabledWhen>
+      </page>
+           <page
+            name="%IU.general"
+            class="org.eclipse.equinox.internal.p2.ui.dialogs.IUGeneralInfoPropertyPage"
+            id="org.eclipse.equinox.p2.ui.IUGeneralInfoPropertyPage">
+            <enabledWhen>
+            <adapt
+                  type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
+             </adapt>
+          </enabledWhen>
+      </page>
+      <page
+            name="%IU.license"
+            class="org.eclipse.equinox.internal.p2.ui.dialogs.IULicensePropertyPage"
+            id="org.eclipse.equinox.p2.ui.IULicensePropertyPage">
+            <enabledWhen>
+            <adapt
+                  type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
+             </adapt>
+          </enabledWhen>
+      </page>    
+      </extension>
+ </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.ui/pom.xml
new file mode 100644
index 0000000..f0b782e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.ui</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeBeginningEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeBeginningEvent.java
deleted file mode 100644
index 012f9af..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeBeginningEvent.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.EventObject;
-
-/**
- *
- * Event used to signify that a batch change is about
- * to begin.  We should ignore listeners until it is
- * done.
- * 
- * @since 3.4
- */
-public class BatchChangeBeginningEvent extends EventObject {
-
-	private static final long serialVersionUID = -7529156836242774280L;
-
-	/**
-	 * Construct a new instance of this event.
-	 * @param source the source of the event
-	 */
-	public BatchChangeBeginningEvent(Object source) {
-		super(source);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeCompleteEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeCompleteEvent.java
deleted file mode 100644
index 33b7438..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/BatchChangeCompleteEvent.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.EventObject;
-
-/**
- * Internal UI event used to signify that a batch change in which
- * we were ignoring listeners is done.
- * 
- * @since 3.4
- */
-public class BatchChangeCompleteEvent extends EventObject {
-
-	private static final long serialVersionUID = -4513769756968621852L;
-
-	/**
-	 * When the batch event is received, do we treat it as notification
-	 * or ignore it?
-	 */
-	public boolean notify;
-
-	/**
-	 * Construct a new instance of this event.
-	 * @param source the source of the event
-	 */
-	public BatchChangeCompleteEvent(Object source, boolean notify) {
-		super(source);
-		this.notify = notify;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
new file mode 100644
index 0000000..81e40fd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
@@ -0,0 +1,232 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.net.URI;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.RepositoryNameAndLocationDialog;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * Provides a repository tracker that interprets URLs as colocated
+ * artifact and metadata repositories.  
+ * 
+ * @since 2.0
+ */
+
+public class ColocatedRepositoryTracker extends RepositoryTracker {
+
+	ProvisioningUI ui;
+	String parsedNickname;
+	URI parsedLocation;
+
+	public ColocatedRepositoryTracker() {
+		this(ProvisioningUI.getDefaultUI());
+	}
+
+	public ColocatedRepositoryTracker(ProvisioningUI ui) {
+		this.ui = ui;
+		setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+		setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
+	 */
+	public URI[] getKnownRepositories(ProvisioningSession session) {
+		return getMetadataRepositoryManager().getKnownRepositories(getMetadataRepositoryFlags());
+	}
+
+	public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			getMetadataRepositoryManager().addRepository(repoLocation);
+			getArtifactRepositoryManager().addRepository(repoLocation);
+			if (nickname != null) {
+				getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
+				getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
+
+			}
+		} finally {
+			// We know that the UI only responds to metadata repo events so we cheat...
+			ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
+	 */
+	public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
+		ui.signalRepositoryOperationStart();
+		try {
+			for (int i = 0; i < repoLocations.length; i++) {
+				getMetadataRepositoryManager().removeRepository(repoLocations[i]);
+				getArtifactRepositoryManager().removeRepository(repoLocations[i]);
+			}
+		} finally {
+			ui.signalRepositoryOperationComplete(null, true);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
+		ui.signalRepositoryOperationStart();
+		SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
+		for (int i = 0; i < locations.length; i++) {
+			try {
+				getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
+				getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
+			} catch (ProvisionException e) {
+				//ignore problematic repositories when refreshing
+			}
+		}
+		// We have no idea how many repos may have been added/removed as a result of 
+		// refreshing these, this one, so we do not use a specific repository event to represent it.
+		ui.signalRepositoryOperationComplete(null, true);
+	}
+
+	public void reportLoadFailure(final URI location, ProvisionException e) {
+		int code = e.getStatus().getCode();
+		// If the user doesn't have a way to manage repositories, then don't report failures.
+		if (!ui.getPolicy().getRepositoriesVisible()) {
+			super.reportLoadFailure(location, e);
+			return;
+		}
+
+		// Special handling when the location is bad (not found, etc.) vs. a failure
+		// associated with a known repo.
+		if (code == ProvisionException.REPOSITORY_NOT_FOUND || code == ProvisionException.REPOSITORY_INVALID_LOCATION) {
+			if (!hasNotFoundStatusBeenReported(location)) {
+				addNotFound(location);
+				PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						IWorkbench workbench = PlatformUI.getWorkbench();
+						if (workbench.isClosing())
+							return;
+						Shell shell = ProvUI.getDefaultParentShell();
+						if (MessageDialog.openQuestion(shell, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFoundTitle, NLS.bind(ProvUIMessages.ColocatedRepositoryTracker_PromptForSiteLocationEdit, URIUtil.toUnencodedString(location)))) {
+							RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(shell, ui) {
+								protected String getInitialLocationText() {
+									return URIUtil.toUnencodedString(location);
+								}
+
+								protected String getInitialNameText() {
+									String nickname = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+									return nickname == null ? "" : nickname; //$NON-NLS-1$
+								}
+							};
+							int ret = dialog.open();
+							if (ret == Window.OK) {
+								URI correctedLocation = dialog.getLocation();
+								if (correctedLocation != null) {
+									ui.signalRepositoryOperationStart();
+									try {
+										removeRepositories(new URI[] {location}, ui.getSession());
+										addRepository(correctedLocation, dialog.getName(), ui.getSession());
+									} finally {
+										ui.signalRepositoryOperationComplete(null, true);
+									}
+								}
+							}
+						}
+					}
+				});
+			}
+		} else {
+			ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
+		}
+	}
+
+	IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return ProvUI.getMetadataRepositoryManager(ui.getSession());
+	}
+
+	IArtifactRepositoryManager getArtifactRepositoryManager() {
+		return ProvUI.getArtifactRepositoryManager(ui.getSession());
+	}
+
+	/*
+	 * Overridden to support "Name - Location" parsing
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#locationFromString(java.lang.String)
+	 */
+	public URI locationFromString(String locationString) {
+		URI uri = super.locationFromString(locationString);
+		if (uri != null)
+			return uri;
+		// Look for the "Name - Location" pattern
+		// There could be a hyphen in the name or URI, so we have to visit all combinations
+		int start = 0;
+		int index = 0;
+		String locationSubset;
+		String pattern = ProvUIMessages.RepositorySelectionGroup_NameAndLocationSeparator;
+		while (index >= 0) {
+			index = locationString.indexOf(pattern, start);
+			if (index >= 0) {
+				start = index + pattern.length();
+				locationSubset = locationString.substring(start);
+				uri = super.locationFromString(locationSubset);
+				if (uri != null) {
+					parsedLocation = uri;
+					parsedNickname = locationString.substring(0, index);
+					return uri;
+				}
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * Used by the UI to get a name that might have been supplied when the
+	 * location was originally parsed.
+	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
+	 */
+	public String getParsedNickname(URI location) {
+		if (parsedNickname == null || parsedLocation == null)
+			return null;
+		if (location.toString().equals(parsedLocation.toString()))
+			return parsedNickname;
+		return null;
+	}
+
+	/*
+	 * Overridden to do a better job of finding duplicates
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.RepositoryTracker#validateRepositoryLocation(org.eclipse.equinox.p2.operations.ProvisioningSession, java.net.URI, boolean, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
+		IStatus status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=268580
+		if (status.isOK() && getMetadataRepositoryManager().contains(location))
+			return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, STATUS_INVALID_REPOSITORY_LOCATION, ProvUIMessages.RepositoryTracker_DuplicateLocation, null);
+		return status;
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultMetadataURLValidator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultMetadataURLValidator.java
deleted file mode 100644
index d56c696..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultMetadataURLValidator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.io.File;
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryLocationValidator;
-
-/**
- * @since 3.4
- *
- */
-public class DefaultMetadataURLValidator extends RepositoryLocationValidator {
-
-	protected int repoFlag;
-
-	public DefaultMetadataURLValidator() {
-		repoFlag = IRepositoryManager.REPOSITORIES_ALL;
-	}
-
-	public void setKnownRepositoriesFlag(int flag) {
-		repoFlag = flag;
-	}
-
-	protected URI[] getKnownLocations() {
-		URI[] knownRepositories;
-		try {
-			knownRepositories = ProvisioningUtil.getMetadataRepositories(repoFlag);
-		} catch (ProvisionException e) {
-			knownRepositories = new URI[0];
-		}
-		return knownRepositories;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLValidator#validateRepositoryURL(boolean)
-	 */
-	public IStatus validateRepositoryLocation(URI location, boolean contactRepositories, IProgressMonitor monitor) {
-
-		// First validate syntax issues
-		IStatus localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
-		if (!localValidationStatus.isOK()) {
-			// bad syntax, but it could just be non-absolute.
-			// In this case, use the helper
-			String locationString = URIUtil.toUnencodedString(location);
-			if (locationString.length() > 0 && (locationString.charAt(0) == '/' || locationString.charAt(0) == File.separatorChar)) {
-				location = RepositoryHelper.localRepoURIHelper(location);
-				localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
-			}
-		}
-
-		if (!localValidationStatus.isOK())
-			return localValidationStatus;
-
-		// Syntax was ok, now look for duplicates
-		URI[] knownRepositories = getKnownLocations();
-		for (int i = 0; i < knownRepositories.length; i++) {
-			if (knownRepositories[i].equals(location)) {
-				localValidationStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, LOCAL_VALIDATION_ERROR, ProvUIMessages.AddRepositoryDialog_DuplicateURL, null);
-				break;
-			}
-		}
-		if (!localValidationStatus.isOK())
-			return localValidationStatus;
-
-		if (contactRepositories)
-			return ProvisioningUtil.validateMetadataRepositoryLocation(location, monitor);
-
-		return localValidationStatus;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultQueryProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultQueryProvider.java
deleted file mode 100644
index f84f9c1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/DefaultQueryProvider.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.query.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IUProfilePropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Updates;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Provides a default set of queries to drive the provisioning UI.
- * 
- * @since 3.5
- */
-
-public class DefaultQueryProvider extends QueryProvider {
-
-	private Policy policy;
-
-	private Query allQuery = new MatchQuery() {
-		public boolean isMatch(Object candidate) {
-			return true;
-		}
-	};
-
-	public DefaultQueryProvider(Policy policy) {
-		this.policy = policy;
-	}
-
-	public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
-		// Initialize queryable, queryContext, and queryType from the element.
-		// In some cases we override this.
-		IQueryable queryable = element.getQueryable();
-		int queryType = element.getQueryType();
-		IUViewQueryContext context = element.getQueryContext();
-		if (context == null) {
-			context = policy.getQueryContext();
-		}
-		switch (queryType) {
-			case QueryProvider.ARTIFACT_REPOS :
-				queryable = new QueryableArtifactRepositoryManager(context, false);
-				return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector() {
-					public boolean accept(Object object) {
-						if (object instanceof URI)
-							return super.accept(new ArtifactRepositoryElement(element, (URI) object));
-						return true;
-					}
-				});
-
-			case QueryProvider.AVAILABLE_IUS :
-				// Things get more complicated if the user wants to filter out installed items. 
-				// This involves setting up a secondary query for installed content that the various
-				// collectors will use to reject content.  We can't use a compound query because the
-				// queryables are different (profile for installed content, repo for available content)
-				AvailableIUWrapper availableIUWrapper;
-				boolean showLatest = context.getShowLatestVersionsOnly();
-				boolean hideInstalled = context.getHideAlreadyInstalled();
-				IProfile targetProfile = null;
-				String profileId = context.getInstalledProfileId();
-				if (profileId != null) {
-					try {
-						targetProfile = ProvisioningUtil.getProfile(profileId);
-					} catch (ProvisionException e) {
-						// just bail out, we won't try to query the installed
-					}
-				}
-
-				Query topLevelQuery = new IUPropertyQuery(context.getVisibleAvailableIUProperty(), Boolean.TRUE.toString());
-				Query categoryQuery = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.toString(true));
-
-				// Showing child IU's of a group of repositories, or of a single repository
-				if (element instanceof MetadataRepositories || element instanceof MetadataRepositoryElement) {
-					if (context.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_FLAT || !context.getUseCategories()) {
-						AvailableIUWrapper wrapper = new AvailableIUWrapper(queryable, element, false, context.getShowAvailableChildren());
-						if (showLatest)
-							topLevelQuery = new CompositeQuery(new Query[] {topLevelQuery, new LatestIUVersionQuery()});
-						if (targetProfile != null)
-							wrapper.markInstalledIUs(targetProfile, hideInstalled);
-						return new ElementQueryDescriptor(queryable, topLevelQuery, new Collector(), wrapper);
-					}
-					// Installed content not a concern for collecting categories
-					return new ElementQueryDescriptor(queryable, categoryQuery, new Collector(), new CategoryElementWrapper(queryable, element));
-				}
-
-				// If it's a category or some other IUElement to drill down in, we get the requirements and show all requirements
-				// that are also visible in the available list.  
-				if (element instanceof CategoryElement || (element instanceof IIUElement && ((IIUElement) element).shouldShowChildren())) {
-					// children of a category should drill down according to the context.  If we aren't in a category, we are already drilling down and
-					// continue to do so.
-					boolean drillDown = element instanceof CategoryElement ? context.getShowAvailableChildren() : true;
-					Query meetsAnyRequirementQuery = new AnyRequiredCapabilityQuery(((IIUElement) element).getRequirements());
-					availableIUWrapper = new AvailableIUWrapper(queryable, element, true, drillDown);
-					if (targetProfile != null)
-						availableIUWrapper.markInstalledIUs(targetProfile, hideInstalled);
-					// if it's a category, the metadata was specifically set up so that the requirements are the IU's that should
-					// be visible in the category.
-					if (element instanceof CategoryElement) {
-						if (showLatest)
-							meetsAnyRequirementQuery = new CompositeQuery(new Query[] {meetsAnyRequirementQuery, new LatestIUVersionQuery()});
-						return new ElementQueryDescriptor(queryable, meetsAnyRequirementQuery, new Collector(), availableIUWrapper);
-					}
-					Query query = CompoundQuery.createCompoundQuery(new Query[] {topLevelQuery, meetsAnyRequirementQuery}, true);
-					if (showLatest)
-						query = new CompositeQuery(new Query[] {query, new LatestIUVersionQuery()});
-					// If it's not a category, these are generic requirements and should be filtered by the visibility property (topLevelQuery)
-					return new ElementQueryDescriptor(queryable, query, new Collector(), availableIUWrapper);
-				}
-				return null;
-
-			case QueryProvider.AVAILABLE_UPDATES :
-				// This query can be used by the automatic updater in headless cases (checking for updates).  
-				// We traffic in IU's rather than wrapped elements
-				IProfile profile;
-				IInstallableUnit[] toUpdate = null;
-				if (element instanceof Updates) {
-					try {
-						profile = ProvisioningUtil.getProfile(((Updates) element).getProfileId());
-					} catch (ProvisionException e) {
-						ProvUI.handleException(e, NLS.bind(ProvUIMessages.DefaultQueryProvider_ErrorRetrievingProfile, ((Updates) element).getProfileId()), StatusManager.LOG);
-						return null;
-					}
-					toUpdate = ((Updates) element).getIUs();
-				} else {
-					profile = (IProfile) ProvUI.getAdapter(element, IProfile.class);
-				}
-				if (profile == null)
-					return null;
-				if (toUpdate == null) {
-					Collector collector = profile.query(new IUProfilePropertyQuery(profile, context.getVisibleInstalledIUProperty(), Boolean.toString(true)), new Collector(), null);
-					toUpdate = (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);
-				}
-				QueryableUpdates updateQueryable = new QueryableUpdates(toUpdate);
-				return new ElementQueryDescriptor(updateQueryable, context.getShowLatestVersionsOnly() ? new LatestIUVersionQuery() : allQuery, new Collector());
-
-			case QueryProvider.INSTALLED_IUS :
-				// Querying of IU's.  We are drilling down into the requirements.
-				if (element instanceof IIUElement && context.getShowInstallChildren()) {
-					Query meetsAnyRequirementQuery = new AnyRequiredCapabilityQuery(((IIUElement) element).getRequirements());
-					Query visibleAsAvailableQuery = new IUPropertyQuery(context.getVisibleAvailableIUProperty(), Boolean.TRUE.toString());
-					return new ElementQueryDescriptor(queryable, CompoundQuery.createCompoundQuery(new Query[] {visibleAsAvailableQuery, meetsAnyRequirementQuery}, true), new Collector(), new InstalledIUElementWrapper(queryable, element));
-				}
-				profile = (IProfile) ProvUI.getAdapter(element, IProfile.class);
-				if (profile == null)
-					return null;
-				return new ElementQueryDescriptor(profile, new IUProfilePropertyQuery(profile, context.getVisibleInstalledIUProperty(), Boolean.toString(true)), new Collector(), new InstalledIUElementWrapper(profile, element));
-
-			case QueryProvider.METADATA_REPOS :
-				if (element instanceof MetadataRepositories) {
-					if (queryable == null) {
-						queryable = new QueryableMetadataRepositoryManager(context, ((MetadataRepositories) element).getIncludeDisabledRepositories());
-						element.setQueryable(queryable);
-					}
-					return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector(), new MetadataRepositoryElementWrapper(element.getQueryable(), element));
-				}
-				return null;
-
-			case QueryProvider.PROFILES :
-				queryable = new QueryableProfileRegistry();
-				return new ElementQueryDescriptor(queryable, new MatchQuery() {
-					public boolean isMatch(Object candidate) {
-						return ProvUI.getAdapter(candidate, IProfile.class) != null;
-					}
-				}, new Collector(), new ProfileElementWrapper(null, element));
-
-			default :
-				return null;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java
new file mode 100644
index 0000000..986578d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.query.*;
+
+/**
+ * ElementQueryDescriptor represents everything needed to run a query, including
+ * the object to be queried, the query to use, and the query result.  It can optionally
+ * wrap the query results in a UI element.
+ * 
+ * @since 3.4
+ */
+public class ElementQueryDescriptor {
+
+	private IQuery<Object> query;
+	private Collector<Object> collector;
+	private IQueryable<Object> queryable;
+	private ElementWrapper wrapper;
+
+	/**
+	 * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
+	 * on which it will run.
+	 */
+	public ElementQueryDescriptor(IQueryable<?> queryable, IQuery<?> query, Collector<?> collector) {
+		this(queryable, query, collector, null);
+	}
+
+	/**
+	 * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
+	 * on which it will run, and the transformer used to transform the results.
+	 */
+	@SuppressWarnings("unchecked")
+	public ElementQueryDescriptor(IQueryable<?> queryable, IQuery<?> query, Collector<?> collector, ElementWrapper wrapper) {
+		this.query = (IQuery<Object>) query;
+		this.collector = (Collector<Object>) collector;
+		this.queryable = (IQueryable<Object>) queryable;
+		this.wrapper = wrapper;
+	}
+
+	/**
+	 * Performs the query returning a collection of results.
+	 * @param monitor
+	 */
+	public Collection<?> performQuery(IProgressMonitor monitor) {
+		Collector<Object> results = this.collector;
+		// If the query is completely described, perform it
+		if (query != null && collector != null && queryable != null)
+			results.addAll(this.queryable.query(this.query, monitor));
+		else if (results == null)
+			results = new Collector<Object>();
+		// Let the wrapper analyze the results, even if we didn't perform the query.
+		// This allows the wrapper to modify the results with explanations.
+		if (wrapper != null)
+			return wrapper.getElements(results);
+		return results.toUnmodifiableSet();
+	}
+
+	public boolean hasCollector() {
+		return this.collector != null;
+	}
+
+	public boolean hasQueryable() {
+		return this.queryable != null;
+	}
+
+	public boolean hasQuery() {
+		return this.query != null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java
new file mode 100644
index 0000000..df4ebf7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java
@@ -0,0 +1,58 @@
+/******************************************************************************* 
+* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+*   IBM Corporation - ongoing development
+******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.p2.query.Collector;
+
+/**
+ * Wraps query results inside corresponding UI elements
+ */
+public abstract class ElementWrapper {
+
+	private Collection<Object> collection = null;
+
+	/**
+	 * Transforms a collector returned by a query to a collection
+	 * of UI elements
+	 */
+	public Collection<?> getElements(Collector<?> collector) {
+		collection = new ArrayList<Object>(collector.size());
+		Iterator<?> iter = collector.iterator();
+		while (iter.hasNext()) {
+			Object o = iter.next();
+			if (shouldWrap(o))
+				collection.add(wrap(o));
+		}
+		return getCollection();
+	}
+
+	/**
+	 * Gets the collection where the elements are being stored.
+	 */
+	protected Collection<?> getCollection() {
+		return collection == null ? CollectionUtils.emptyList() : collection;
+	}
+
+	/**
+	 * Determines if this object should be accepted and wrapped
+	 * by a UI element.  
+	 */
+	protected boolean shouldWrap(Object o) {
+		return true;
+	}
+
+	/**
+	 * Wraps a single element of the query result inside a UI element.
+	 */
+	protected abstract Object wrap(Object item);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java
new file mode 100644
index 0000000..4a11ad1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+
+/**
+ * Help context ids for the P2 UI
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented
+ * or extended.
+ * </p>
+ * @since 3.4
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+
+public interface IProvHelpContextIds {
+	public static final String PREFIX = ProvUIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
+
+	public static final String REVERT_CONFIGURATION_WIZARD = PREFIX + "revert_configuration_wizard_context"; //$NON-NLS-1$ 
+
+	public static final String UNINSTALL_WIZARD = PREFIX + "uinstall_wizard_context"; //$NON-NLS-1$ 
+
+	public static final String UPDATE_WIZARD = PREFIX + "update_wizard_context"; //$NON-NLS-1$ 
+
+	public static final String ADD_REPOSITORY_DIALOG = PREFIX + "add_repository_dialog_context"; //$NON-NLS-1$ 
+
+	public static final String INSTALL_WIZARD = PREFIX + "install_wizard_context"; //$NON-NLS-1$ 
+
+	public static final String REPOSITORY_MANIPULATION_DIALOG = PREFIX + "repository_manipulation_dialog_context"; //$NON-NLS-1$
+
+	public static final String INSTALLED_SOFTWARE = PREFIX + "installed_software_context"; //$NON-NLS-1$
+
+	public static final String AVAILABLE_SOFTWARE = PREFIX + "available_software_context"; //$NON-NLS-1$
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/PlanAnalyzer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/PlanAnalyzer.java
deleted file mode 100644
index a4fed80..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/PlanAnalyzer.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.Iterator;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class analyzes a profile change request and the resultant provisioning plan,
- * and reports problems in a way that can be communicated to a user.
- * 
- * @since 3.5
- */
-public class PlanAnalyzer {
-
-	public static IStatus getStatus(int statusCode, IInstallableUnit affectedIU) {
-		switch (statusCode) {
-			case IStatusCodes.PROFILE_CHANGE_ALTERED :
-				return new MultiStatus(ProvUIActivator.PLUGIN_ID, statusCode, ProvUIMessages.PlanStatusHelper_RequestAltered, null);
-			case IStatusCodes.ALTERED_IMPLIED_UPDATE :
-				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_ImpliedUpdate, getIUString(affectedIU)), null);
-			case IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE :
-				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanAnalyzer_LockedImpliedUpdate0, getIUString(affectedIU)), null);
-			case IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE :
-				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_IgnoringImpliedDowngrade, getIUString(affectedIU)), null);
-			case IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED :
-				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_AlreadyInstalled, getIUString(affectedIU)), null);
-			case IStatusCodes.ALTERED_PARTIAL_INSTALL :
-				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanAnalyzer_PartialInstall, getIUString(affectedIU)), null);
-			case IStatusCodes.ALTERED_PARTIAL_UNINSTALL :
-				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanAnalyzer_PartialUninstall, getIUString(affectedIU)), null);
-			case IStatusCodes.UNEXPECTED_NOTHING_TO_DO :
-				return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_NothingToDo, getIUString(affectedIU)), null);
-			case IStatusCodes.NOTHING_TO_UPDATE :
-				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, ProvUIMessages.UpdateOperation_NothingToUpdate, null);
-			case IStatusCodes.OPERATION_ALREADY_IN_PROGRESS :
-				return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, statusCode, ProvUIMessages.PlanStatusHelper_AnotherOperationInProgress, null);
-			default :
-				return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_UnexpectedError, new Integer(statusCode), getIUString(affectedIU)), null);
-		}
-	}
-
-	public static MultiStatus getProfileChangeAlteredStatus() {
-		return (MultiStatus) getStatus(IStatusCodes.PROFILE_CHANGE_ALTERED, null);
-	}
-
-	public static ResolutionResult computeResolutionResult(ProfileChangeRequest originalRequest, ProvisioningPlan plan, MultiStatus originalStatus) {
-		Assert.isNotNull(originalRequest);
-		Assert.isNotNull(plan);
-		Assert.isNotNull(originalStatus);
-
-		ResolutionResult report = new ResolutionResult();
-
-		// If the plan was canceled, no further analysis is needed
-		if (plan.getStatus().getSeverity() == IStatus.CANCEL) {
-			report.addSummaryStatus(plan.getStatus());
-			return report;
-		}
-
-		// If the plan requires install handler support, we want to open the old update UI and
-		// cancel this operation
-		if (UpdateManagerCompatibility.requiresInstallHandlerSupport(plan)) {
-			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					Shell shell = ProvUI.getDefaultParentShell();
-					MessageDialog dialog = new MessageDialog(shell, ProvUIMessages.PlanStatusHelper_UpdateManagerPromptTitle, null, ProvUIMessages.PlanStatusHelper_PromptForUpdateManagerUI, MessageDialog.WARNING, new String[] {ProvUIMessages.PlanStatusHelper_Launch, IDialogConstants.CANCEL_LABEL}, 0);
-					if (dialog.open() == 0)
-						BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
-							public void run() {
-								UpdateManagerCompatibility.openInstaller();
-							}
-						});
-				}
-			});
-			report.addSummaryStatus(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.PlanStatusHelper_RequiresUpdateManager));
-		}
-
-		if (nothingToDo(originalRequest)) {
-			report.addSummaryStatus(getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null));
-			IStatus[] details = originalStatus.getChildren();
-			for (int i = 0; i < details.length; i++)
-				report.addSummaryStatus(details[i]);
-			return report;
-		}
-
-		// If there was already some status supplied before resolution, this should get included
-		// with the report.  For example, this might contain information about the profile request
-		// being altered before resolution began.
-		if (originalStatus != null && originalStatus.getChildren().length > 0) {
-			report.addSummaryStatus(originalStatus);
-		}
-
-		// If the overall plan had a non-OK status, capture that in the report.
-		if (!plan.getStatus().isOK())
-			report.addSummaryStatus(plan.getStatus());
-
-		// Now we compare what was requested with what is going to happen.
-		// In the long run, when a RequestStatus can provide actual explanation/status
-		// about failures, we might want to add this information to the overall status.
-		// As it stands now, if the provisioning plan is in error, that info is more detailed
-		// than the request status.  So we will only add request status info to the overall
-		// status when the overall status is not in error.
-		if (plan.getStatus().getSeverity() != IStatus.ERROR) {
-			IInstallableUnit[] iusAdded = originalRequest.getAddedInstallableUnits();
-			for (int i = 0; i < iusAdded.length; i++) {
-				RequestStatus rs = plan.getRequestStatus(iusAdded[i]);
-				if (rs.getSeverity() == IStatus.ERROR) {
-					// This is a serious error so it must also appear in the overall status
-					IStatus fail = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, IStatusCodes.ALTERED_IGNORED_INSTALL_REQUEST, NLS.bind(ProvUIMessages.PlanAnalyzer_IgnoringInstall, getIUString(iusAdded[i])), null);
-					report.addStatus(iusAdded[i], fail);
-					report.addSummaryStatus(fail);
-				}
-			}
-			IInstallableUnit[] iusRemoved = originalRequest.getRemovedInstallableUnits();
-			for (int i = 0; i < iusRemoved.length; i++) {
-				RequestStatus rs = plan.getRequestStatus(iusRemoved[i]);
-				if (rs.getSeverity() == IStatus.ERROR) {
-					// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
-					// We are making assumptions here about why the planner chose to ignore an uninstall.
-					// Assume it could not be uninstalled because of some other dependency, yet the planner did not view
-					// this as an error.  So we inform the user that we can only uninstall parts of it.  The root property will be
-					// removed per the original change request.
-					IStatus fail = new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, IStatusCodes.ALTERED_PARTIAL_UNINSTALL, NLS.bind(ProvUIMessages.PlanAnalyzer_PartialUninstall, getIUString(iusRemoved[i])), null);
-					report.addStatus(iusRemoved[i], fail);
-					report.addSummaryStatus(fail);
-				}
-			}
-		}
-
-		// Now process the side effects
-		Map sideEffects = plan.getSideEffectChanges();
-		Iterator iusWithSideEffects = sideEffects.keySet().iterator();
-		while (iusWithSideEffects.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) iusWithSideEffects.next();
-			RequestStatus rs = (RequestStatus) sideEffects.get(iu);
-			if (rs.getInitialRequestType() == RequestStatus.ADDED) {
-				report.addStatus(iu, new Status(rs.getSeverity(), ProvUIActivator.PLUGIN_ID, IStatusCodes.ALTERED_SIDE_EFFECT_INSTALL, NLS.bind(ProvUIMessages.PlanAnalyzer_SideEffectInstall, getIUString(iu)), null));
-			} else {
-				report.addStatus(iu, new Status(rs.getSeverity(), ProvUIActivator.PLUGIN_ID, IStatusCodes.ALTERED_SIDE_EFFECT_REMOVE, NLS.bind(ProvUIMessages.PlanAnalyzer_SideEffectUninstall, getIUString(iu)), null));
-			}
-		}
-
-		return report;
-
-	}
-
-	private static String getIUString(IInstallableUnit iu) {
-		if (iu == null)
-			return ProvUIMessages.PlanStatusHelper_Items;
-		// Get the iu name in the default locale
-		String name = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
-		if (name != null)
-			return name;
-		return iu.getId();
-	}
-
-	private static boolean nothingToDo(ProfileChangeRequest request) {
-		return request.getAddedInstallableUnits().length == 0 && request.getRemovedInstallableUnits().length == 0 && request.getInstallableUnitProfilePropertiesToAdd().size() == 0 && request.getInstallableUnitProfilePropertiesToRemove().size() == 0;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
new file mode 100644
index 0000000..edbfb0b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
@@ -0,0 +1,303 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import org.eclipse.core.commands.*;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * Generic provisioning UI utility and policy methods.
+ * 
+ * @since 3.4
+ */
+public class ProvUI {
+
+	// Public constants for common command and tooltip names
+	public static final String INSTALL_COMMAND_LABEL = ProvUIMessages.InstallIUCommandLabel;
+	public static final String INSTALL_COMMAND_TOOLTIP = ProvUIMessages.InstallIUCommandTooltip;
+	public static final String UNINSTALL_COMMAND_LABEL = ProvUIMessages.UninstallIUCommandLabel;
+	public static final String UNINSTALL_COMMAND_TOOLTIP = ProvUIMessages.UninstallIUCommandTooltip;
+	public static final String UPDATE_COMMAND_LABEL = ProvUIMessages.UpdateIUCommandLabel;
+	public static final String UPDATE_COMMAND_TOOLTIP = ProvUIMessages.UpdateIUCommandTooltip;
+	public static final String REVERT_COMMAND_LABEL = ProvUIMessages.RevertIUCommandLabel;
+	public static final String REVERT_COMMAND_TOOLTIP = ProvUIMessages.RevertIUCommandTooltip;
+
+	/**
+	 * A constant indicating that there was nothing to size (there
+	 * was no valid plan that could be used to compute
+	 * size).
+	 */
+	public static final long SIZE_NOTAPPLICABLE = -3L;
+	/**
+	 * Indicates that the size is unavailable (an
+	 * attempt was made to compute size but it failed)
+	 */
+	public static final long SIZE_UNAVAILABLE = -2L;
+	/**
+	 * Indicates that the size is currently unknown
+	 */
+	public static final long SIZE_UNKNOWN = -1L;
+
+	private static IUColumnConfig[] columnConfig;
+	private static QueryProvider queryProvider;
+
+	// These values rely on the command markup in org.eclipse.ui.ide that defines the update commands
+	private static final String UPDATE_MANAGER_FIND_AND_INSTALL = "org.eclipse.ui.update.findAndInstallUpdates"; //$NON-NLS-1$
+	private static final String UPDATE_MANAGER_MANAGE_CONFIGURATION = "org.eclipse.ui.update.manageConfiguration"; //$NON-NLS-1$
+	// This value relies on the command markup in org.eclipse.ui 
+	private static final String INSTALLATION_DIALOG = "org.eclipse.ui.help.installationDialog"; //$NON-NLS-1$
+
+	public static IStatus handleException(Throwable t, String message, int style) {
+		if (message == null && t != null) {
+			message = t.getMessage();
+		}
+		IStatus status = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, t);
+		StatusManager.getManager().handle(status, style);
+		return status;
+	}
+
+	public static void reportStatus(IStatus status, int style) {
+		// workaround for
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=211933
+		// Note we'd rather have a proper looking dialog than get the 
+		// blocking right.
+		if ((style & StatusManager.BLOCK) == StatusManager.BLOCK || (style & StatusManager.SHOW) == StatusManager.SHOW) {
+			if (status.getSeverity() == IStatus.INFO) {
+				MessageDialog.openInformation(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_InformationTitle, status.getMessage());
+				// unset the dialog bits
+				style = style & ~StatusManager.BLOCK;
+				style = style & ~StatusManager.SHOW;
+				// unset logging for statuses that should never be logged.
+				// Ideally the caller would do this but this bug keeps coming back.
+				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274074
+				if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE)
+					style = 0;
+			} else if (status.getSeverity() == IStatus.WARNING) {
+				MessageDialog.openWarning(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_WarningTitle, status.getMessage());
+				// unset the dialog bits
+				style = style & ~StatusManager.BLOCK;
+				style = style & ~StatusManager.SHOW;
+			}
+		}
+		if (style != 0)
+			StatusManager.getManager().handle(status, style);
+	}
+
+	public static IUColumnConfig[] getIUColumnConfig() {
+		if (columnConfig == null)
+			columnConfig = new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH)};
+		return columnConfig;
+
+	}
+
+	public static IUViewQueryContext getQueryContext(Policy policy) {
+		IUViewQueryContext queryContext = new IUViewQueryContext(policy.getGroupByCategory() ? IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY : IUViewQueryContext.AVAILABLE_VIEW_FLAT);
+		queryContext.setShowLatestVersionsOnly(policy.getShowLatestVersionsOnly());
+		queryContext.setShowInstallChildren(policy.getShowDrilldownRequirements());
+		queryContext.setShowProvisioningPlanChildren(policy.getShowDrilldownRequirements());
+		queryContext.setUseCategories(policy.getGroupByCategory());
+		return queryContext;
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> T getAdapter(Object object, Class<T> adapterType) {
+		if (object == null)
+			return null;
+		if (adapterType.isInstance(object))
+			// Ideally, we would use Class.cast here but it was introduced in Java 1.5
+			return (T) object;
+		if (object instanceof IAdaptable)
+			// Ideally, we would use Class.cast here but it was introduced in Java 1.5
+			return (T) ((IAdaptable) object).getAdapter(adapterType);
+		return null;
+	}
+
+	/**
+	 * Returns a shell that is appropriate to use as the parent
+	 * for a modal dialog. 
+	 */
+	public static Shell getDefaultParentShell() {
+		return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
+	}
+
+	public static void addProvisioningListener(ProvUIProvisioningListener listener) {
+		ProvUIActivator.getDefault().addProvisioningListener(listener);
+	}
+
+	public static void removeProvisioningListener(ProvUIProvisioningListener listener) {
+		ProvUIActivator.getDefault().removeProvisioningListener(listener);
+	}
+
+	public static void openUpdateManagerInstaller(Event event) {
+		runCommand(UPDATE_MANAGER_FIND_AND_INSTALL, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenFindAndInstall, event);
+	}
+
+	public static void openUpdateManagerConfigurationManager(Event event) {
+		runCommand(UPDATE_MANAGER_MANAGE_CONFIGURATION, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenManageConfiguration, event);
+	}
+
+	public static void openInstallationDialog(Event event) {
+		runCommand(INSTALLATION_DIALOG, ProvUIMessages.ProvUI_InstallDialogError, event);
+	}
+
+	public static boolean isUpdateManagerInstallerPresent() {
+		ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+		Command command = commandService.getCommand(UPDATE_MANAGER_FIND_AND_INSTALL);
+		return command.isDefined();
+	}
+
+	public static QueryProvider getQueryProvider() {
+		if (queryProvider == null)
+			queryProvider = new QueryProvider(ProvUIActivator.getDefault().getProvisioningUI());
+		return queryProvider;
+	}
+
+	private static void runCommand(String commandId, String errorMessage, Event event) {
+		ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+		Command command = commandService.getCommand(commandId);
+		if (!command.isDefined()) {
+			return;
+		}
+		IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+		try {
+			handlerService.executeCommand(commandId, event);
+		} catch (ExecutionException e) {
+			reportFail(errorMessage, e);
+		} catch (NotDefinedException e) {
+			reportFail(errorMessage, e);
+		} catch (NotEnabledException e) {
+			reportFail(errorMessage, e);
+		} catch (NotHandledException e) {
+			reportFail(errorMessage, e);
+		}
+	}
+
+	public static boolean isCategory(IInstallableUnit iu) {
+		return QueryUtil.isCategory(iu);
+	}
+
+	private static void reportFail(String message, Throwable t) {
+		Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, t);
+		reportStatus(failStatus, StatusManager.BLOCK | StatusManager.LOG);
+	}
+
+	/**
+	 * For testing only
+	 * @noreference
+	 * @param provider
+	 */
+	public static void setQueryProvider(QueryProvider provider) {
+		queryProvider = provider;
+	}
+
+	/**
+	 * Get sizing information about the specified plan.
+	 * 
+	 * @param engine the engine 
+	 * @param plan the provisioning plan
+	 * @param context the provisioning context to be used for the sizing
+	 * @param monitor the progress monitor
+	 * 
+	 * @return a long integer describing the disk size required for the provisioning plan.
+	 * 
+	 * @see #SIZE_UNKNOWN
+	 * @see #SIZE_UNAVAILABLE
+	 * @see #SIZE_NOTAPPLICABLE
+	 */
+	public static long getSize(IEngine engine, IProvisioningPlan plan, ProvisioningContext context, IProgressMonitor monitor) {
+		// If there is nothing to size, return 0
+		if (plan == null)
+			return SIZE_NOTAPPLICABLE;
+		if (countPlanElements(plan) == 0)
+			return 0;
+		long installPlanSize = 0;
+		SubMonitor mon = SubMonitor.convert(monitor, 300);
+		if (plan.getInstallerPlan() != null) {
+			ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet();
+			IStatus status = engine.perform(plan.getInstallerPlan(), sizingPhaseSet, mon.newChild(100));
+			if (status.isOK())
+				installPlanSize = sizingPhaseSet.getDiskSize();
+		} else {
+			mon.worked(100);
+		}
+		ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet();
+		IStatus status = engine.perform(plan, sizingPhaseSet, mon.newChild(200));
+		if (status.isOK())
+			return installPlanSize + sizingPhaseSet.getDiskSize();
+		return SIZE_UNAVAILABLE;
+	}
+
+	private static int countPlanElements(IProvisioningPlan plan) {
+		return QueryUtil.compoundQueryable(plan.getAdditions(), plan.getRemovals()).query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet().size();
+	}
+
+	/**
+	 * Return the artifact repository manager for the given session
+	 * @return the repository manager
+	 */
+	public static IArtifactRepositoryManager getArtifactRepositoryManager(ProvisioningSession session) {
+		return (IArtifactRepositoryManager) session.getProvisioningAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the metadata repository manager for the given session
+	 * @return the repository manager
+	 */
+	public static IMetadataRepositoryManager getMetadataRepositoryManager(ProvisioningSession session) {
+		return (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the profile registry for the given session
+	 * @return the profile registry
+	 */
+	public static IProfileRegistry getProfileRegistry(ProvisioningSession session) {
+		return (IProfileRegistry) session.getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the provisioning engine for the given session
+	 * @return the provisioning engine
+	 */
+	public static IEngine getEngine(ProvisioningSession session) {
+		return (IEngine) session.getProvisioningAgent().getService(IEngine.SERVICE_NAME);
+	}
+
+	/**
+	 * Return the provisioning event bus used for dispatching events.
+	 * @return the event bus
+	 */
+	public static IProvisioningEventBus getProvisioningEventBus(ProvisioningSession session) {
+		return (IProvisioningEventBus) session.getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
index 04a5498..9075aa4 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
@@ -11,18 +11,17 @@
 package org.eclipse.equinox.internal.p2.ui;
 
 import java.net.URL;
-import java.util.EventObject;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.ui.*;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.statushandlers.StatusManager;
 import org.osgi.framework.*;
 import org.osgi.service.packageadmin.PackageAdmin;
 
@@ -36,10 +35,11 @@ public class ProvUIActivator extends AbstractUIPlugin {
 	private static PackageAdmin packageAdmin = null;
 	private static ServiceReference packageAdminRef = null;
 	private static ProvUIActivator plugin;
-	private ProvisioningListener profileChangeListener;
-
 	public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui"; //$NON-NLS-1$
 
+	private ProvisioningSession session;
+	private ProvisioningUI ui;
+
 	public static BundleContext getContext() {
 		return context;
 	}
@@ -84,77 +84,30 @@ public class ProvUIActivator extends AbstractUIPlugin {
 		ProvUIActivator.context = bundleContext;
 		packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
 		packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
-
-		// TODO for now we need to manually start up the provisioning infrastructure
-		// because the Eclipse Application launch config won't let me specify bundles to start.
-		getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-		getBundle("org.eclipse.equinox.frameworkadmin.equinox").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-		getBundle("org.eclipse.equinox.simpleconfigurator.manipulator").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
-
-		addProfileChangeListener();
 	}
 
 	public void stop(BundleContext bundleContext) throws Exception {
 		try {
-			removeProfileChangeListener();
+			// cancel any repository load jobs started in the UI
+			Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
+			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305163
+			// join the jobs so that this bundle does not stop until the jobs are
+			// actually cancelled.  
+			Job.getJobManager().join(LoadMetadataRepositoryJob.LOAD_FAMILY, new NullProgressMonitor());
 			plugin = null;
 			ProvUIActivator.context = null;
+			ui = null;
 		} finally {
 			super.stop(bundleContext);
 		}
 	}
 
-	private void addProfileChangeListener() {
-		if (profileChangeListener == null) {
-			profileChangeListener = new SynchronousProvisioningListener() {
-				public void notify(EventObject o) {
-					if (o instanceof ProfileEvent) {
-						ProfileEvent event = (ProfileEvent) o;
-						try {
-							IProfile selfProfile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
-							if (selfProfile != null && (selfProfile.getProfileId().equals(event.getProfileId()))) {
-								if (event.getReason() == ProfileEvent.CHANGED)
-									ProvisioningOperationRunner.requestRestart(false);
-
-							}
-						} catch (ProvisionException e) {
-							ProvUI.handleException(e, ProvUIMessages.ProvUIActivator_ExceptionDuringProfileChange, StatusManager.LOG);
-
-						}
-					}
-				}
-			};
-		}
-		IProvisioningEventBus bus = getProvisioningEventBus();
-		if (bus != null)
-			bus.addListener(profileChangeListener);
-	}
-
-	private void removeProfileChangeListener() {
-		if (profileChangeListener != null) {
-			IProvisioningEventBus bus = getProvisioningEventBus();
-			if (bus != null)
-				bus.removeListener(profileChangeListener);
-		}
-	}
-
 	public void addProvisioningListener(ProvUIProvisioningListener listener) {
 		getProvisioningEventBus().addListener(listener);
 	}
 
-	public void signalBatchOperationStart() {
-		getProvisioningEventBus().publishEvent(new BatchChangeBeginningEvent(this));
-	}
-
-	public void signalBatchOperationComplete(boolean notify) {
-		getProvisioningEventBus().publishEvent(new BatchChangeCompleteEvent(this, notify));
-	}
-
 	public IProvisioningEventBus getProvisioningEventBus() {
-		ServiceReference busReference = context.getServiceReference(IProvisioningEventBus.SERVICE_NAME);
-		if (busReference == null)
-			return null;
-		return (IProvisioningEventBus) context.getService(busReference);
+		return ProvUI.getProvisioningEventBus(getSession());
 	}
 
 	public void removeProvisioningListener(ProvUIProvisioningListener listener) {
@@ -169,10 +122,6 @@ public class ProvUIActivator extends AbstractUIPlugin {
 		createImageDescriptor(ProvUIImages.IMG_UPDATED_IU, reg);
 		createImageDescriptor(ProvUIImages.IMG_CATEGORY, reg);
 		createImageDescriptor(ProvUIImages.IMG_PROFILE, reg);
-		createImageDescriptor(ProvUIImages.IMG_TOOL_UPDATE, reg);
-		createImageDescriptor(ProvUIImages.IMG_TOOL_UPDATE_PROBLEMS, reg);
-		createImageDescriptor(ProvUIImages.IMG_TOOL_CLOSE, reg);
-		createImageDescriptor(ProvUIImages.IMG_TOOL_CLOSE_HOT, reg);
 		createImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL, reg);
 		createImageDescriptor(ProvUIImages.WIZARD_BANNER_REVERT, reg);
 		createImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL, reg);
@@ -187,4 +136,20 @@ public class ProvUIActivator extends AbstractUIPlugin {
 		ImageDescriptor desc = ImageDescriptor.createFromURL(url);
 		reg.put(id, desc);
 	}
+
+	public ProvisioningUI getProvisioningUI() {
+		if (ui == null) {
+			IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
+			session = new ProvisioningSession(agent);
+			Policy policy = (Policy) ServiceHelper.getService(ProvUIActivator.getContext(), Policy.class.getName());
+			if (policy == null)
+				policy = new Policy();
+			ui = new ProvisioningUI(session, IProfileRegistry.SELF, policy);
+		}
+		return ui;
+	}
+
+	public ProvisioningSession getSession() {
+		return session;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
index 15af08d..922e739 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
@@ -10,14 +10,12 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 /**
  * Adapter factory for provisioning elements
@@ -27,13 +25,14 @@ import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
  */
 
 public class ProvUIAdapterFactory implements IAdapterFactory {
-	private static final Class[] CLASSES = new Class[] {IInstallableUnit.class, IProfile.class, IRepository.class, IMetadataRepository.class, IArtifactRepository.class};
+	private static final Class<?>[] CLASSES = new Class[] {IInstallableUnit.class, IProfile.class, IRepository.class, IMetadataRepository.class, IArtifactRepository.class};
 
+	@SuppressWarnings({"rawtypes", "unchecked"})
 	public Object getAdapter(Object adaptableObject, Class adapterType) {
 		return ProvUI.getAdapter(adaptableObject, adapterType);
 	}
 
-	public Class[] getAdapterList() {
+	public Class<?>[] getAdapterList() {
 		return CLASSES;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java
new file mode 100644
index 0000000..40ab3fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * ProvUIImages provides convenience methods for accessing shared images
+ * provided by the <i>org.eclipse.equinox.internal.provisional.p2.ui</i> plug-in.
+ * <p>
+ * This class provides <code>ImageDescriptor</code>s for each named image in
+ * {@link ProvUIImages}. All <code>Image</code> objects created from the
+ * provided descriptors are managed the caller and must be disposed
+ * appropriately.
+ * </p>
+ * <p>
+ * This class is not intended to be subclassed or instantiated by clients
+ * 
+ * @since 3.4
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class ProvUIImages {
+
+	// bundle-relative icon path
+	public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
+	//objects
+	public final static String IMG_ARTIFACT_REPOSITORY = "obj/artifact_repo_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_METADATA_REPOSITORY = "obj/metadata_repo_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_IU = "obj/iu_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_DISABLED_IU = "obj/iu_disabled_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_UPDATED_IU = "obj/iu_update_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_PROFILE = "obj/profile_obj.gif"; //$NON-NLS-1$
+	public final static String IMG_CATEGORY = "obj/category_obj.gif"; //$NON-NLS-1$
+
+	// wizard graphics
+	public final static String WIZARD_BANNER_INSTALL = "wizban/install_wiz.gif"; //$NON-NLS-1$
+	public final static String WIZARD_BANNER_UNINSTALL = "wizban/uninstall_wiz.gif"; //$NON-NLS-1$
+	public final static String WIZARD_BANNER_UPDATE = "wizban/update_wiz.gif"; //$NON-NLS-1$
+	public final static String WIZARD_BANNER_REVERT = "wizban/revert_wiz.gif"; //$NON-NLS-1$
+
+	/**
+	 * Returns the image descriptor for the given image ID. Returns
+	 * <code>null</code> if there is no such image.
+	 * 
+	 * @param id
+	 *            the identifier for the image to retrieve
+	 * @return the image descriptor associated with the given ID
+	 */
+	public static ImageDescriptor getImageDescriptor(String id) {
+		return ProvUIActivator.getDefault().getImageRegistry().getDescriptor(id);
+	}
+
+	/**
+	 * Returns the image for the given image ID. Returns <code>null</code> if
+	 * there is no such image.
+	 * 
+	 * @param id
+	 *            the identifier for the image to retrieve
+	 * @return the image associated with the given ID. This image is managed in
+	 *         an image registry and should not be freed by the client.
+	 */
+	public static Image getImage(String id) {
+		return ProvUIActivator.getDefault().getImageRegistry().get(id);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
index cf4e4e4..8a0fb51 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
@@ -34,16 +34,26 @@ public class ProvUIMessages extends NLS {
 	public static String AcceptLicensesWizardPage_RejectSingle;
 	public static String AcceptLicensesWizardPage_ReviewExtraLicensesDescription;
 	public static String AcceptLicensesWizardPage_ReviewLicensesDescription;
+	public static String AcceptLicensesWizardPage_SingleLicenseTextLabel;
 	public static String AcceptLicensesWizardPage_Title;
 	public static String ApplicationInRestartDialog;
 	public static String ApplyProfileChangesDialog_ApplyChanges;
+	public static String ApplyProfileChangesDialog_Restart;
+	public static String ApplyProfileChangesDialog_NotYet;
 	public static String ColocatedRepositoryManipulator_AddSiteOperationLabel;
-	public static String ColocatedRepositoryManipulator_GotoPrefs;
-	public static String ColocatedRepositoryManipulator_ManageSites;
-	public static String ColocatedRepositoryManipulator_RemoveSiteOperationLabel;
+	public static String ColocatedRepositoryTracker_PromptForSiteLocationEdit;
+	public static String ColocatedRepositoryTracker_SiteNotFoundTitle;
+	public static String RevertProfilePage_ConfirmDeleteMultipleConfigs;
+	public static String RevertProfilePage_ConfirmDeleteSingleConfig;
+	public static String RevertProfilePage_Delete;
+	public static String RevertProfilePage_DeleteMultipleConfigurationsTitle;
+	public static String RevertProfilePage_DeleteSingleConfigurationTitle;
+	public static String RevertProfilePage_DeleteTooltip;
 	public static String RevertProfilePage_NoProfile;
 	public static String RevertProfilePage_RevertLabel;
 	public static String RevertProfilePage_RevertTooltip;
+	public static String RevertProfilePage_CompareLabel;
+	public static String RevertProfilePage_CompareTooltip;
 	public static String IUCopyrightPropertyPage_NoCopyright;
 	public static String IUCopyrightPropertyPage_ViewLinkLabel;
 	public static String IUDetailsLabelProvider_KB;
@@ -60,57 +70,44 @@ public class ProvUIMessages extends NLS {
 	public static String IUGeneralInfoPropertyPage_VersionLabel;
 	public static String IULicensePropertyPage_NoLicense;
 	public static String IULicensePropertyPage_ViewLicenseLabel;
-	public static String ProfileChangeRequestBuildingRequest;
-	public static String ProfileElement_InvalidProfile;
 	public static String ProfileModificationAction_InvalidSelections;
-	public static String ProfileModificationAction_NoChangeRequestProvided;
-	public static String ProfileModificationAction_NoExplanationProvided;
-	public static String ProfileModificationAction_ResolutionOperationLabel;
 	public static String ProfileModificationWizardPage_DetailsLabel;
-	public static String ProfileModificationWizardPage_ResolutionOperationLabel;
-	public static String ProfileModificationWizardPage_UnexpectedError;
 	public static String ProfileSnapshots_Label;
-	public static String ProvisioningUtil_InstallPlanConfigurationError;
-	// utility error messages
-	public static String ProvisioningUtil_NoRepositoryManager;
-	public static String ProvisioningUtil_LoadRepositoryFailure;
-	public static String ProvisioningUtil_NoProfileRegistryFound;
-	public static String ProvisioningUtil_NoPlannerFound;
-	public static String ProvisioningUtil_NoDirectorFound;
-	public static String ProvisioningUtil_NoEngineFound;
 
 	// viewer support
 	public static String ProvDropAdapter_InvalidDropTarget;
 	public static String ProvDropAdapter_NoIUsToDrop;
 	public static String ProvDropAdapter_UnsupportedDropOperation;
+	public static String ProvElementContentProvider_FetchJobTitle;
 
 	// Provisioning operations
 	public static String ProvisioningOperationRunner_CannotApplyChanges;
-	public static String ProvisioningOperationRunner_ErrorExecutingOperation;
+	public static String ProvisioningOperationWizard_UnexpectedFailureToResolve;
 	public static String InstalledSoftwarePage_NoProfile;
 	public static String InstallIUOperationLabel;
+	public static String InstallIUOperationTask;
 	public static String InstallIUCommandLabel;
 	public static String InstallIUCommandTooltip;
-	public static String InstallIUProgress;
 	public static String InstallWizardPage_NoCheckboxDescription;
 	public static String InstallWizardPage_Title;
 	public static String PreselectedIUInstallWizard_Title;
 	public static String PreselectedIUInstallWizard_Description;
 	public static String UninstallDialog_UninstallMessage;
 	public static String UninstallIUOperationLabel;
+	public static String UninstallIUOperationTask;
 	public static String UninstallIUCommandLabel;
 	public static String UninstallIUCommandTooltip;
 	public static String UninstallIUProgress;
 	public static String UninstallWizardPage_Description;
 	public static String UninstallWizardPage_Title;
 	public static String UpdateIUOperationLabel;
+	public static String UpdateIUOperationTask;
 	public static String UpdateIUCommandLabel;
 	public static String UpdateIUCommandTooltip;
 	public static String UpdateIUProgress;
 	public static String RefreshAction_Label;
 	public static String RefreshAction_Tooltip;
 	public static String RemoveColocatedRepositoryAction_Label;
-	public static String RemoveColocatedRepositoryAction_OperationLabel;
 	public static String RemoveColocatedRepositoryAction_Tooltip;
 	public static String RevertIUCommandLabel;
 	public static String RevertIUCommandTooltip;
@@ -151,19 +148,20 @@ public class ProvUIMessages extends NLS {
 	public static String RepositoryManipulatorDropTarget_DragSourceNotValid;
 	public static String RepositoryNameAndLocationDialog_Title;
 
-	public static String ResolutionReport_SummaryStatus;
+	public static String RepositorySelectionGroup_GenericSiteLinkTitle;
+	public static String RepositorySelectionGroup_NameAndLocationSeparator;
+	public static String RepositorySelectionGroup_PrefPageLink;
+	public static String RepositorySelectionGroup_PrefPageName;
 	public static String ResolutionWizardPage_Canceled;
 	public static String ResolutionWizardPage_ErrorStatus;
 	public static String ResolutionWizardPage_NoSelections;
 	public static String ResolutionWizardPage_WarningInfoStatus;
 
 	// Dialogs
-	public static String AddRepositoryDialog_DuplicateURL;
 	public static String AddRepositoryDialog_InvalidURL;
 	public static String AddRepositoryDialog_LocationLabel;
 	public static String AddRepositoryDialog_NameLabel;
 	public static String AddRepositoryDialog_Title;
-	public static String AvailableIUElement_ProfileNotFound;
 	public static String AvailableIUGroup_LoadingRepository;
 	public static String AvailableIUGroup_NoSitesConfiguredDescription;
 	public static String AvailableIUGroup_NoSitesConfiguredExplanation;
@@ -177,6 +175,7 @@ public class ProvUIMessages extends NLS {
 	public static String AvailableIUsPage_GroupByCategory;
 	public static String AvailableIUsPage_HideInstalledItems;
 	public static String AvailableIUsPage_LocalSites;
+	public static String AvailableIUsPage_MultipleSelectionCount;
 	public static String AvailableIUsPage_NameWithLocation;
 	public static String AvailableIUsPage_NoSites;
 	public static String AvailableIUsPage_RepoFilterInstructions;
@@ -184,50 +183,31 @@ public class ProvUIMessages extends NLS {
 	public static String AvailableIUsPage_ResolveAllCheckbox;
 	public static String AvailableIUsPage_SelectASite;
 	public static String AvailableIUsPage_ShowLatestVersions;
+	public static String AvailableIUsPage_SingleSelectionCount;
 	public static String AvailableIUsPage_Title;
 	public static String AvailableIUWrapper_AllAreInstalled;
 	public static String IUViewQueryContext_AllAreInstalledDescription;
-	public static String DefaultQueryProvider_ErrorRetrievingProfile;
-	public static String DeferredFetchFilteredTree_RetrievingList;
-	public static String ElementUtils_UpdateJobTitle;
 	public static String Label_Profiles;
 	public static String Label_Repositories;
-	public static String MetadataRepositoryElement_NotFound;
+	public static String LaunchUpdateManagerButton;
+	public static String LoadMetadataRepositoryJob_ContactSitesProgress;
+	public static String LoadMetadataRepositoryJob_SitesMissingError;
+	public static String RepositoryElement_NotFound;
+	public static String RepositoryTracker_DuplicateLocation;
 	public static String MetadataRepositoryElement_RepositoryLoadError;
 	public static String UpdateAction_UpdatesAvailableMessage;
 	public static String UpdateAction_UpdatesAvailableTitle;
-	public static String PlanAnalyzer_IgnoringInstall;
-	public static String PlanAnalyzer_LockedImpliedUpdate0;
-	public static String PlanAnalyzer_PartialInstall;
-	public static String PlanAnalyzer_PartialUninstall;
-	public static String PlanAnalyzer_SideEffectInstall;
-	public static String PlanAnalyzer_SideEffectUninstall;
-	public static String PlannerResolutionOperation_UnexpectedError;
-	public static String PlanStatusHelper_IgnoringImpliedDowngrade;
-	public static String PlanStatusHelper_ImpliedUpdate;
-	public static String PlanStatusHelper_Items;
-	public static String PlanStatusHelper_NothingToDo;
-	public static String PlanStatusHelper_AlreadyInstalled;
-	public static String PlanStatusHelper_AnotherOperationInProgress;
-	public static String PlanStatusHelper_Launch;
-	public static String PlanStatusHelper_RequestAltered;
-	public static String PlanStatusHelper_RequiresUpdateManager;
-	public static String PlanStatusHelper_UnexpectedError;
-	public static String PlanStatusHelper_UpdateManagerPromptTitle;
-	public static String PlanStatusHelper_PromptForUpdateManagerUI;
 	public static String PlatformUpdateTitle;
 	public static String PlatformRestartMessage;
+	public static String Policy_RequiresUpdateManagerMessage;
+	public static String Policy_RequiresUpdateManagerTitle;
 	public static String ProvUI_ErrorDuringApplyConfig;
 	public static String ProvUI_InformationTitle;
 	public static String ProvUI_InstallDialogError;
 	public static String ProvUI_NameColumnTitle;
 	public static String ProvUI_IdColumnTitle;
-	public static String ProvUI_LoadErrorTitle;
-	public static String ProvUI_PromptForSiteEdit;
 	public static String ProvUI_VersionColumnTitle;
 	public static String ProvUI_WarningTitle;
-	public static String ProvUIActivator_ExceptionDuringProfileChange;
-	public static String ProvUILicenseManager_ParsingError;
 	public static String ProvUIMessages_NotAccepted_EnterFor_0;
 	public static String ProvUIMessages_SavedNotAccepted_EnterFor_0;
 	public static String OptionalPlatformRestartMessage;
@@ -235,43 +215,36 @@ public class ProvUIMessages extends NLS {
 	public static String QueriedElementWrapper_NoCategorizedItemsExplanation;
 	public static String QueriedElementWrapper_NoItemsExplanation;
 	public static String QueriedElementWrapper_SiteNotFound;
-	public static String ColocatedRepositoryManipulator_SiteNotFoundDescription;
 	public static String QueryableMetadataRepositoryManager_LoadRepositoryProgress;
-	public static String QueryableMetadataRepositoryManager_MultipleRepositoriesNotFound;
 	public static String QueryableProfileRegistry_QueryProfileProgress;
 	public static String QueryableUpdates_UpdateListProgress;
 	public static String SizeComputingWizardPage_SizeJobTitle;
-	public static String SizingPhaseSet_PhaseSetName;
 	public static String RevertDialog_ConfigContentsLabel;
 	public static String RevertDialog_ConfigsLabel;
 	public static String RevertDialog_ConfirmRestartMessage;
 	public static String RevertDialog_RevertOperationLabel;
 	public static String RevertDialog_Title;
 	public static String RollbackProfileElement_CurrentInstallation;
-	public static String RollbackProfileElement_InvalidSnapshot;
 	public static String SelectableIUsPage_Select_All;
 	public static String SelectableIUsPage_Deselect_All;
 
 	public static String TrustCertificateDialog_Details;
 	public static String TrustCertificateDialog_Title;
 	// Operations
-	public static String URLValidator_UnrecognizedURL;
 	public static String UpdateManagerCompatibility_ExportSitesTitle;
 	public static String UpdateManagerCompatibility_ImportSitesTitle;
 	public static String UpdateManagerCompatibility_InvalidSiteFileMessage;
 	public static String UpdateManagerCompatibility_InvalidSitesTitle;
+	public static String UpdateManagerCompatibility_ItemRequiresUpdateManager;
 	public static String UpdateManagerCompatibility_UnableToOpenFindAndInstall;
 	public static String UpdateManagerCompatibility_UnableToOpenManageConfiguration;
-	public static String UpdateOperation_NothingToUpdate;
-	public static String ServiceUI_Cancel;
 	public static String ServiceUI_LoginDetails;
 	public static String ServiceUI_LoginRequired;
-	public static String ServiceUI_OK;
 	public static String ServiceUI_unsigned_message;
-	public static String ServiceUI_unsigned_title;
 	public static String ServiceUI_warning_title;
 	public static String UpdateOrInstallWizardPage_Size;
 	public static String Updates_Label;
+	public static String UpdateSingleIUPage_SingleUpdateDescription;
 	public static String UpdateWizardPage_Description;
 	public static String UpdateWizardPage_Title;
 	public static String UserValidationDialog_PasswordLabel;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
new file mode 100644
index 0000000..05972f6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.util.EventObject;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.engine.IProfileEvent;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * ProvisioningListener which handles event batching and other
+ * extensions to the provisioning event framework that are used by
+ * the UI.
+ * 
+ * @since 3.5
+ */
+public abstract class ProvUIProvisioningListener implements SynchronousProvisioningListener {
+
+	public static final int PROV_EVENT_METADATA_REPOSITORY = 0x0001;
+	public static final int PROV_EVENT_IU = 0x0002;
+	public static final int PROV_EVENT_PROFILE = 0x0004;
+	public static final int PROV_EVENT_ARTIFACT_REPOSITORY = 0x0008;
+
+	int eventTypes = 0;
+	String name;
+
+	public ProvUIProvisioningListener(String name, int eventTypes) {
+		this.name = name;
+		this.eventTypes = eventTypes;
+	}
+
+	public void notify(EventObject o) {
+		if (o instanceof RepositoryOperationBeginningEvent) {
+			if (Tracing.DEBUG_EVENTS_CLIENT)
+				Tracing.debug("Batch Eventing:  Ignore Following Events. " + getReceiverString()); //$NON-NLS-1$
+		} else if (o instanceof RepositoryOperationEndingEvent) {
+			RepositoryOperationEndingEvent event = (RepositoryOperationEndingEvent) o;
+
+			if (Tracing.DEBUG_EVENTS_CLIENT)
+				Tracing.debug("Batch Eventing:  Batch Ended. " + getReceiverString()); //$NON-NLS-1$
+			// A batch operation completed.  Refresh.
+			if (ProvisioningUI.getDefaultUI().getOperationRunner().eventBatchCount <= 0) {
+				if (Tracing.DEBUG_EVENTS_CLIENT)
+					Tracing.debug("Batch Eventing Complete." + getReceiverString()); //$NON-NLS-1$
+				if (event.getEvent() == null && event.update()) {
+					if (Tracing.DEBUG_EVENTS_CLIENT) {
+						Tracing.debug("Refreshing After Batch." + getReceiverString()); //$NON-NLS-1$
+					}
+					refreshAll();
+				} else if (event.update()) {
+					if (Tracing.DEBUG_EVENTS_CLIENT)
+						Tracing.debug("Dispatching Last Event in Batch." + getReceiverString()); //$NON-NLS-1$
+					notify(event.getEvent());
+				} else if (Tracing.DEBUG_EVENTS_CLIENT) {
+					Tracing.debug("No Refresh on Batch Complete."); //$NON-NLS-1$
+				}
+			} else {
+				// We are still in the middle of a batch operation, but we've been notified
+				// about a nested batch that ended.  See if it ended with a specific event.  
+				// If it did, this means there was a user action involving a repository 
+				// (rather than side-effect events).  For example, the user might add a repo while a full 
+				// background load is running.  We want to honor that
+				// event.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305478
+				RepositoryEvent innerEvent = event.getEvent();
+				if (innerEvent != null) {
+					handleRepositoryEvent(innerEvent);
+				}
+			}
+		} else if (ProvisioningUI.getDefaultUI().getOperationRunner().eventBatchCount > 0) {
+			// ignore raw events during a batch
+			if (Tracing.DEBUG_EVENTS_CLIENT)
+				Tracing.debug(name + " Ignoring: " + o.toString()); //$NON-NLS-1$
+			return;
+		} else if (o instanceof IProfileEvent && (((eventTypes & PROV_EVENT_IU) == PROV_EVENT_IU) || ((eventTypes & PROV_EVENT_PROFILE) == PROV_EVENT_PROFILE))) {
+			if (Tracing.DEBUG_EVENTS_CLIENT)
+				Tracing.debug(o.toString() + getReceiverString());
+			IProfileEvent event = (IProfileEvent) o;
+			if (event.getReason() == IProfileEvent.CHANGED) {
+				profileChanged(event.getProfileId());
+			} else if (event.getReason() == IProfileEvent.ADDED) {
+				profileAdded(event.getProfileId());
+			} else if (event.getReason() == IProfileEvent.REMOVED) {
+				profileRemoved(event.getProfileId());
+			}
+		} else if (o instanceof RepositoryEvent) {
+			if (Tracing.DEBUG_EVENTS_CLIENT)
+				Tracing.debug(o.toString() + getReceiverString());
+			handleRepositoryEvent((RepositoryEvent) o);
+		}
+	}
+
+	private String getReceiverString() {
+		return " --  <" + name + "> "; //$NON-NLS-1$//$NON-NLS-2$
+	}
+
+	private void handleRepositoryEvent(RepositoryEvent event) {
+		// Do not handle unless this is the type of repo that we are interested in
+		if ((event.getRepositoryType() == IRepository.TYPE_METADATA && (eventTypes & PROV_EVENT_METADATA_REPOSITORY) == PROV_EVENT_METADATA_REPOSITORY) || (event.getRepositoryType() == IRepository.TYPE_ARTIFACT && (eventTypes & PROV_EVENT_ARTIFACT_REPOSITORY) == PROV_EVENT_ARTIFACT_REPOSITORY)) {
+			if (event.getKind() == RepositoryEvent.ADDED && event.isRepositoryEnabled()) {
+				repositoryAdded(event);
+			} else if (event.getKind() == RepositoryEvent.REMOVED && event.isRepositoryEnabled()) {
+				repositoryRemoved(event);
+			} else if (event.getKind() == RepositoryEvent.DISCOVERED) {
+				repositoryDiscovered(event);
+			} else if (event.getKind() == RepositoryEvent.CHANGED) {
+				repositoryChanged(event);
+			} else if (event.getKind() == RepositoryEvent.ENABLEMENT) {
+				repositoryEnablement(event);
+			}
+		}
+	}
+
+	/**
+	 * A repository has been added.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryAdded(RepositoryEvent event) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in repository events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * A repository has been removed.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryRemoved(RepositoryEvent event) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in repository events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * A repository has been discovered.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryDiscovered(RepositoryEvent event) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in repository events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * A repository has changed.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryChanged(RepositoryEvent event) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in repository events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * A repository's enablement state has changed.  This is treated
+	 * as repository addition or removal by default.  Subclasses may
+	 * override.  May be called from a non-UI thread.
+	 * @param event
+	 */
+	protected void repositoryEnablement(RepositoryEvent event) {
+		// We treat enablement of a repository as if one were added.
+		if (event.isRepositoryEnabled())
+			repositoryAdded(event);
+		else
+			repositoryRemoved(event);
+	}
+
+	/**
+	 * The specified profile has changed.   Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that changed.
+	 */
+	protected void profileChanged(final String profileId) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in profile events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * The specified profile has been added.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that has been added.
+	 */
+	protected void profileAdded(final String profileId) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in profile events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * The specified profile has been removed.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that has been removed.
+	 */
+	protected void profileRemoved(final String profileId) {
+		// Do nothing.  This method is not abstract because subclasses
+		// may not be interested in profile events at all and should
+		// not have to implement it.
+	}
+
+	/**
+	 * An event requiring a complete refresh of the listener's state has
+	 * been received.  This is used, for example, when a batch change has
+	 * completed.  Subclasses may override.  May be called from a non-UI
+	 * thread.
+	 */
+	protected void refreshAll() {
+		// Do nothing by default.
+	}
+
+	public int getEventTypes() {
+		return eventTypes;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
new file mode 100644
index 0000000..0abe634
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.io.IOException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ApplyProfileChangesDialog;
+import org.eclipse.equinox.internal.provisional.configurator.Configurator;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.progress.IProgressConstants2;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * Utility methods for running provisioning operations.   Operations can either
+ * be run synchronously or in a job.  When scheduled as a job, the operation
+ * determines whether the job is run in
+ * the background or in the UI.
+ * 
+ * @since 3.4
+ */
+public class ProvisioningOperationRunner {
+
+	boolean suppressRestart = false;
+	ProvisioningUI ui;
+	public int eventBatchCount = 0;
+
+	public ProvisioningOperationRunner(ProvisioningUI ui) {
+		this.ui = ui;
+	}
+
+	/**
+	 * Schedule a job to execute the supplied ProvisioningOperation.
+	 * 
+	 * @param job The operation to execute
+	 * @param errorStyle the flags passed to the StatusManager for error reporting
+	 */
+	public void schedule(final ProvisioningJob job, final int errorStyle) {
+		final boolean noPrompt = (errorStyle & (StatusManager.BLOCK | StatusManager.SHOW)) == 0;
+		if (noPrompt) {
+			job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
+			job.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
+		}
+		job.setProperty(IProgressConstants.ICON_PROPERTY, ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
+		job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
+		manageJob(job, job.getRestartPolicy());
+		job.schedule();
+	}
+
+	/**
+	 * Request a restart of the platform according to the specified
+	 * restart policy.  
+	 * 
+	 * @param restartPolicy
+	 */
+	private void requestRestart(final int restartPolicy) {
+		// Global override of restart (used in test cases).
+		if (suppressRestart)
+			return;
+		if (restartPolicy == Policy.RESTART_POLICY_FORCE) {
+			PlatformUI.getWorkbench().restart();
+			return;
+		}
+		if (restartPolicy == Policy.RESTART_POLICY_FORCE_APPLY) {
+			applyProfileChanges();
+			return;
+		}
+
+		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				if (PlatformUI.getWorkbench().isClosing())
+					return;
+				int retCode = ApplyProfileChangesDialog.promptForRestart(ProvUI.getDefaultParentShell(), restartPolicy == Policy.RESTART_POLICY_PROMPT);
+				if (retCode == ApplyProfileChangesDialog.PROFILE_APPLYCHANGES) {
+					applyProfileChanges();
+				} else if (retCode == ApplyProfileChangesDialog.PROFILE_RESTART) {
+					PlatformUI.getWorkbench().restart();
+				}
+			}
+		});
+	}
+
+	void applyProfileChanges() {
+		Configurator configurator = (Configurator) ServiceHelper.getService(ProvUIActivator.getContext(), Configurator.class.getName());
+		try {
+			configurator.applyConfiguration();
+		} catch (IOException e) {
+			ProvUI.handleException(e, ProvUIMessages.ProvUI_ErrorDuringApplyConfig, StatusManager.LOG | StatusManager.BLOCK);
+		} catch (IllegalStateException e) {
+			IStatus illegalApplyStatus = new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ProvisioningOperationRunner_CannotApplyChanges, e);
+			ProvUI.reportStatus(illegalApplyStatus, StatusManager.LOG | StatusManager.BLOCK);
+		}
+	}
+
+	public void manageJob(Job job, final int jobRestartPolicy) {
+		ui.getSession().rememberJob(job);
+		job.addJobChangeListener(new JobChangeAdapter() {
+			public void done(IJobChangeEvent event) {
+				int severity = event.getResult().getSeverity();
+				// If the job finished without error, see if restart is needed
+				if (severity != IStatus.CANCEL && severity != IStatus.ERROR) {
+					if (jobRestartPolicy == ProvisioningJob.RESTART_NONE) {
+						return;
+					}
+					int globalRestartPolicy = ui.getPolicy().getRestartPolicy();
+					// If the global policy allows apply changes, check the job policy to see if it supports it.
+					if (globalRestartPolicy == Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY) {
+						if (jobRestartPolicy == ProvisioningJob.RESTART_OR_APPLY)
+							requestRestart(Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY);
+						else
+							requestRestart(Policy.RESTART_POLICY_PROMPT);
+					} else
+						requestRestart(globalRestartPolicy);
+				}
+			}
+		});
+	}
+
+	/**
+	 * This method is provided for use in automated test case.  It should
+	 * no longer be needed to be used by clients.
+	 * 
+	 * @param suppress <code>true</code> to suppress all restarts and <code>false</code>
+	 * to stop suppressing restarts.
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void suppressRestart(boolean suppress) {
+		suppressRestart = suppress;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
new file mode 100644
index 0000000..8223eb2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
@@ -0,0 +1,192 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.net.URI;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.query.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.expression.*;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * Provides a default set of queries to drive the provisioning UI.
+ * 
+ * @since 3.5
+ */
+
+public class QueryProvider {
+
+	private ProvisioningUI ui;
+
+	public static final int METADATA_REPOS = 1;
+	public static final int ARTIFACT_REPOS = 2;
+	public static final int PROFILES = 3;
+	public static final int AVAILABLE_IUS = 4;
+	public static final int AVAILABLE_UPDATES = 5;
+	public static final int INSTALLED_IUS = 6;
+	public static final int AVAILABLE_ARTIFACTS = 7;
+
+	public QueryProvider(ProvisioningUI ui) {
+		this.ui = ui;
+	}
+
+	public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
+		// Initialize queryable, queryContext, and queryType from the element.
+		// In some cases we override this.
+		Policy policy = ui.getPolicy();
+		IQueryable<?> queryable = element.getQueryable();
+		int queryType = element.getQueryType();
+		IUViewQueryContext context = element.getQueryContext();
+		if (context == null) {
+			context = ProvUI.getQueryContext(policy);
+		}
+		switch (queryType) {
+			case ARTIFACT_REPOS :
+				queryable = new QueryableArtifactRepositoryManager(ui, false).locationsQueriable();
+				return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<URI>(), new ArtifactRepositoryElementWrapper(null, element));
+
+			case AVAILABLE_IUS :
+				// Things get more complicated if the user wants to filter out installed items. 
+				// This involves setting up a secondary query for installed content that the various
+				// collectors will use to reject content.  We can't use a compound query because the
+				// queryables are different (profile for installed content, repo for available content)
+				AvailableIUWrapper availableIUWrapper;
+				boolean showLatest = context.getShowLatestVersionsOnly();
+				boolean hideInstalled = context.getHideAlreadyInstalled();
+				IProfile targetProfile = null;
+				String profileId = context.getInstalledProfileId();
+				if (profileId != null) {
+					targetProfile = ProvUI.getProfileRegistry(ui.getSession()).getProfile(profileId);
+				}
+
+				IQuery<IInstallableUnit> topLevelQuery = policy.getVisibleAvailableIUQuery();
+				IQuery<IInstallableUnit> categoryQuery = QueryUtil.createIUCategoryQuery();
+
+				// Showing child IU's of a group of repositories, or of a single repository
+				if (element instanceof MetadataRepositories || element instanceof MetadataRepositoryElement) {
+					if (context.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_FLAT || !context.getUseCategories()) {
+						AvailableIUWrapper wrapper = new AvailableIUWrapper(queryable, element, false, context.getShowAvailableChildren());
+						if (showLatest)
+							topLevelQuery = QueryUtil.createLatestQuery(topLevelQuery);
+						if (targetProfile != null)
+							wrapper.markInstalledIUs(targetProfile, hideInstalled);
+						return new ElementQueryDescriptor(queryable, topLevelQuery, new Collector<Object>(), wrapper);
+					}
+					// Installed content not a concern for collecting categories
+					return new ElementQueryDescriptor(queryable, categoryQuery, new Collector<Object>(), new CategoryElementWrapper(queryable, element));
+				}
+
+				// If it's a category or some other IUElement to drill down in, we get the requirements and show all requirements
+				// that are also visible in the available list.  
+				if (element instanceof CategoryElement || (element instanceof IIUElement && ((IIUElement) element).shouldShowChildren())) {
+					// children of a category should drill down according to the context.  If we aren't in a category, we are already drilling down and
+					// continue to do so.
+					boolean drillDownTheChildren = element instanceof CategoryElement ? context.getShowAvailableChildren() : true;
+					IQuery<IInstallableUnit> memberOfCategoryQuery;
+					if (element instanceof CategoryElement) {
+						// We need an expression that uses the requirements of the element's requirements, which could be merged
+						// from multiple category IUs shown as one in the UI.
+						IExpression matchesRequirementsExpression = ExpressionUtil.parse("$0.exists(r | this ~= r)"); //$NON-NLS-1$
+						memberOfCategoryQuery = QueryUtil.createMatchQuery(matchesRequirementsExpression, ((CategoryElement) element).getRequirements());
+					} else {
+						memberOfCategoryQuery = QueryUtil.createIUCategoryMemberQuery(((IIUElement) element).getIU());
+					}
+					availableIUWrapper = new AvailableIUWrapper(queryable, element, true, drillDownTheChildren);
+					if (targetProfile != null)
+						availableIUWrapper.markInstalledIUs(targetProfile, hideInstalled);
+					// if it's a category, there is a special query.
+					if (element instanceof CategoryElement) {
+						if (showLatest)
+							memberOfCategoryQuery = QueryUtil.createLatestQuery(memberOfCategoryQuery);
+						return new ElementQueryDescriptor(queryable, memberOfCategoryQuery, new Collector<Object>(), availableIUWrapper);
+					}
+					// It is not a category, we want to traverse the requirements that are groups.
+					IQuery<IInstallableUnit> query = QueryUtil.createCompoundQuery(topLevelQuery, new RequiredIUsQuery(((IIUElement) element).getIU()), true);
+					if (showLatest)
+						query = QueryUtil.createLatestQuery(query);
+					// If it's not a category, these are generic requirements and should be filtered by the visibility property (topLevelQuery)
+					return new ElementQueryDescriptor(queryable, query, new Collector<Object>(), availableIUWrapper);
+				}
+				return null;
+
+			case AVAILABLE_UPDATES :
+				// This query can be used by the automatic updater in headless cases (checking for updates).  
+				// We traffic in IU's rather than wrapped elements
+				IProfile profile;
+				IInstallableUnit[] toUpdate = null;
+				if (element instanceof Updates) {
+					profile = ProvUI.getProfileRegistry(ui.getSession()).getProfile(((Updates) element).getProfileId());
+					toUpdate = ((Updates) element).getIUs();
+				} else {
+					profile = ProvUI.getAdapter(element, IProfile.class);
+				}
+				if (profile == null)
+					return null;
+				if (toUpdate == null) {
+					IQueryResult<IInstallableUnit> queryResult = profile.query(policy.getVisibleInstalledIUQuery(), null);
+					toUpdate = queryResult.toArray(IInstallableUnit.class);
+				}
+				QueryableUpdates updateQueryable = new QueryableUpdates(ui, toUpdate);
+				return new ElementQueryDescriptor(updateQueryable, context.getShowLatestVersionsOnly() ? QueryUtil.createLatestIUQuery() : QueryUtil.createIUAnyQuery(), new Collector<Object>());
+
+			case INSTALLED_IUS :
+				// Querying of IU's.  We are drilling down into the requirements.
+				if (element instanceof IIUElement && context.getShowInstallChildren()) {
+					Collection<IRequirement> reqs = ((IIUElement) element).getRequirements();
+					IExpression[] requirementExpressions = new IExpression[reqs.size()];
+					int i = 0;
+					for (IRequirement req : reqs) {
+						requirementExpressions[i++] = req.getMatches();
+					}
+					IExpressionFactory factory = ExpressionUtil.getFactory();
+					IQuery<IInstallableUnit> meetsAnyRequirementQuery = QueryUtil.createMatchQuery(factory.or(requirementExpressions));
+					IQuery<IInstallableUnit> visibleAsAvailableQuery = policy.getVisibleAvailableIUQuery();
+					IQuery<IInstallableUnit> createCompoundQuery = QueryUtil.createCompoundQuery(visibleAsAvailableQuery, meetsAnyRequirementQuery, true);
+					return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(queryable, element));
+				}
+				profile = ProvUI.getAdapter(element, IProfile.class);
+				if (profile == null)
+					return null;
+				return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(profile, element));
+
+			case METADATA_REPOS :
+				if (element instanceof MetadataRepositories) {
+					if (queryable == null) {
+						queryable = new QueryableMetadataRepositoryManager(ui, ((MetadataRepositories) element).getIncludeDisabledRepositories()).locationsQueriable();
+						element.setQueryable(queryable);
+					}
+					return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<URI>(), new MetadataRepositoryElementWrapper(null, element));
+				}
+				return null;
+
+			case PROFILES :
+				queryable = new QueryableProfileRegistry(ui);
+				return new ElementQueryDescriptor(queryable, QueryUtil.createMatchQuery(IProfile.class, ExpressionUtil.TRUE_EXPRESSION), new Collector<Object>(), new ProfileElementWrapper(null, element));
+
+			case AVAILABLE_ARTIFACTS :
+				if (!(queryable instanceof IArtifactRepository))
+					return null;
+				return new ElementQueryDescriptor(queryable, ArtifactKeyQuery.ALL_KEYS, new Collector<Object>(), new ArtifactKeyWrapper((IArtifactRepository) queryable, element));
+
+			default :
+				return null;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
new file mode 100644
index 0000000..a2e5087
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.net.URI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * An object that queries a particular set of artifact repositories.
+ */
+public class QueryableArtifactRepositoryManager extends QueryableRepositoryManager<IArtifactKey> {
+
+	public QueryableArtifactRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
+		super(ui, includeDisabledRepos);
+	}
+
+	protected IArtifactRepositoryManager getRepositoryManager() {
+		return ProvUI.getArtifactRepositoryManager(getSession());
+	}
+
+	protected IArtifactRepository doLoadRepository(IRepositoryManager<IArtifactKey> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
+		return ui.loadArtifactRepository(location, false, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
+	 */
+	protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
+		return repositoryManipulator.getArtifactRepositoryFlags();
+	}
+
+	protected IArtifactRepository getRepository(IRepositoryManager<IArtifactKey> manager, URI location) {
+		// note the use of ArtifactRepositoryManager (the concrete implementation).
+		if (manager instanceof ArtifactRepositoryManager) {
+			return ((ArtifactRepositoryManager) manager).getRepository(location);
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
new file mode 100644
index 0000000..bdfef68
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.net.URI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * An object that queries a particular set of metadata repositories.
+ */
+public class QueryableMetadataRepositoryManager extends QueryableRepositoryManager<IInstallableUnit> {
+
+	public QueryableMetadataRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
+		super(ui, includeDisabledRepos);
+	}
+
+	protected IMetadataRepository getRepository(IRepositoryManager<IInstallableUnit> manager, URI location) {
+		// note the use of MetadataRepositoryManager (the concrete implementation).
+		if (manager instanceof MetadataRepositoryManager) {
+			return ((MetadataRepositoryManager) manager).getRepository(location);
+		}
+		return null;
+	}
+
+	protected IMetadataRepositoryManager getRepositoryManager() {
+		return ProvUI.getMetadataRepositoryManager(getSession());
+	}
+
+	protected IMetadataRepository doLoadRepository(IRepositoryManager<IInstallableUnit> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
+		return ui.loadMetadataRepository(location, false, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
+	 */
+	protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
+		return repositoryManipulator.getMetadataRepositoryFlags();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
new file mode 100644
index 0000000..5b1d675
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
@@ -0,0 +1,177 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * An object that provides query support for a specified
+ * set of repositories.  The repository tracker flags determine which repositories
+ * are included in the query.  Callers interested in only the resulting repository URIs
+ * should specify a {@link RepositoryLocationQuery}, in which case the 
+ * query is performed over the URI's.  Otherwise the repositories are loaded and
+ * the query is performed over the repositories themselves.
+ */
+public abstract class QueryableRepositoryManager<T> implements IQueryable<T> {
+	private ProvisioningSession session;
+	protected boolean includeDisabledRepos;
+	protected RepositoryTracker tracker;
+	protected int repositoryFlags;
+	protected ProvisioningUI ui;
+
+	public QueryableRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
+		this.includeDisabledRepos = includeDisabledRepos;
+		this.ui = ui;
+		this.tracker = ui.getRepositoryTracker();
+		this.session = ui.getSession();
+		repositoryFlags = getRepositoryFlags(tracker);
+	}
+
+	protected ProvisioningSession getSession() {
+		return session;
+	}
+
+	/**
+	 * Iterates over the repositories configured in this queryable.
+	 * For most queries, the query is run on each repository, passing any objects that satisfy the
+	 * query.
+	 * <p>
+	 * This method is long-running; progress and cancellation are provided
+	 * by the given progress monitor. 
+	 * </p>
+	 * 
+	 * @param query The query to perform..
+	 * @param monitor a progress monitor, or <code>null</code> if progress
+	 *    reporting is not desired
+	 * @return The QueryResult argument
+	 */
+	public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
+		IRepositoryManager<T> manager = getRepositoryManager();
+		if (monitor == null)
+			monitor = new NullProgressMonitor();
+		return query(getRepoLocations(manager), query, monitor);
+	}
+
+	public IQueryable<URI> locationsQueriable() {
+		return new IQueryable<URI>() {
+
+			public IQueryResult<URI> query(IQuery<URI> query, IProgressMonitor monitor) {
+				return query.perform(getRepoLocations(getRepositoryManager()).iterator());
+			}
+		};
+	}
+
+	protected Collection<URI> getRepoLocations(IRepositoryManager<T> manager) {
+		Set<URI> locations = new HashSet<URI>();
+		locations.addAll(Arrays.asList(manager.getKnownRepositories(repositoryFlags)));
+		if (includeDisabledRepos) {
+			locations.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | repositoryFlags)));
+		}
+		return locations;
+	}
+
+	/**
+	 * Return a boolean indicating whether all the repositories that
+	 * can be queried by the receiver are already loaded.  If a repository
+	 * is not loaded because it was not found, this will not return false,
+	 * because this repository cannot be queried.
+	 * 
+	 * @return <code>true</code> if all repositories to be queried by the
+	 * receiver are loaded, <code>false</code> if they
+	 * are not.
+	 */
+	public boolean areRepositoriesLoaded() {
+		IRepositoryManager<T> mgr = getRepositoryManager();
+		if (mgr == null)
+			return false;
+		for (URI repoURI : getRepoLocations(mgr)) {
+			IRepository<T> repo = getRepository(mgr, repoURI);
+			// A not-loaded repo doesn't count if it's considered missing (not found)
+			if (repo == null && !tracker.hasNotFoundStatusBeenReported(repoURI))
+				return false;
+		}
+		return true;
+	}
+
+	protected abstract IRepository<T> getRepository(IRepositoryManager<T> manager, URI location);
+
+	protected IRepository<T> loadRepository(IRepositoryManager<T> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
+		monitor.setTaskName(NLS.bind(ProvUIMessages.QueryableMetadataRepositoryManager_LoadRepositoryProgress, URIUtil.toUnencodedString(location)));
+		IRepository<T> repo = doLoadRepository(manager, location, monitor);
+		return repo;
+	}
+
+	/**
+	 * Return the appropriate repository manager, or <code>null</code> if none could be found.
+	 * @return the repository manager
+	 */
+	protected abstract IRepositoryManager<T> getRepositoryManager();
+
+	/**
+	 * Return the flags that should be used to access repositories given the
+	 * manipulator.
+	 */
+	protected abstract int getRepositoryFlags(RepositoryTracker repositoryManipulator);
+
+	/**
+	 * Load the repository located at the specified location.
+	 * 
+	 * @param manager the manager
+	 * @param location the repository location
+	 * @param monitor the progress monitor
+	 * @return the repository that was loaded, or <code>null</code> if no repository could
+	 * be found at that location.
+	 */
+	protected abstract IRepository<T> doLoadRepository(IRepositoryManager<T> manager, URI location, IProgressMonitor monitor) throws ProvisionException;
+
+	@SuppressWarnings("unchecked")
+	protected IQueryResult<T> query(Collection<URI> uris, IQuery<T> query, IProgressMonitor monitor) {
+		if (query instanceof RepositoryLocationQuery) {
+			return (IQueryResult<T>) locationsQueriable().query((IQuery<URI>) query, monitor);
+		}
+		SubMonitor sub = SubMonitor.convert(monitor, (uris.size() + 1) * 100);
+		ArrayList<IRepository<T>> loadedRepos = new ArrayList<IRepository<T>>(uris.size());
+		for (URI uri : uris) {
+			IRepository<T> repo = null;
+			try {
+				repo = loadRepository(getRepositoryManager(), uri, sub.newChild(100));
+			} catch (ProvisionException e) {
+				tracker.reportLoadFailure(uri, e);
+			} catch (OperationCanceledException e) {
+				// user has canceled
+				repo = null;
+			}
+			if (repo != null)
+				loadedRepos.add(repo);
+		}
+		if (loadedRepos.size() > 0) {
+			return QueryUtil.compoundQueryable(loadedRepos).query(query, sub.newChild(100));
+		}
+		return Collector.emptyCollector();
+	}
+
+	public void setRespositoryFlags(int flags) {
+		this.repositoryFlags = flags;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java
new file mode 100644
index 0000000..43f016b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+import java.net.URI;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+
+/**
+ * RepositoryLocationQuery yields true for all URI elements.  
+ * 
+ * @since 3.5
+ */
+public class RepositoryLocationQuery extends ExpressionMatchQuery<URI> {
+
+	public RepositoryLocationQuery() {
+		super(URI.class, ExpressionUtil.TRUE_EXPRESSION);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java
new file mode 100644
index 0000000..66aca16
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.util.EventObject;
+
+/**
+ * Event used to signal that a repository operation is about
+ * to begin.  This event can be used to ignore lower-level repository events
+ * until the operation is complete.
+ *  
+ * @since 2.0
+ */
+public class RepositoryOperationBeginningEvent extends EventObject {
+
+	private static final long serialVersionUID = -7529156836242774280L;
+
+	/**
+	 * Construct a new instance of this event.
+	 * @param source the source of the event
+	 */
+	public RepositoryOperationBeginningEvent(Object source) {
+		super(source);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java
new file mode 100644
index 0000000..ec3b13a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.util.EventObject;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+
+/**
+ * Event used to signal that a repository operation has completed.  
+ * 
+ * @since 2.0
+ */
+public class RepositoryOperationEndingEvent extends EventObject {
+
+	private static final long serialVersionUID = -4513769756968621852L;
+
+	/**
+	 * A repository event describing the nature of the operation.  
+	 */
+	private RepositoryEvent event;
+
+	/**
+	 * A boolean indicating whether the UI should be updated in response
+	 * to this event.
+	 */
+	private boolean update;
+
+	/**
+	 * Construct a new instance of this event.
+	 * 
+	 * @param source the source of the event
+	 * @param update a boolean indicating whether the UI should be updated in response
+	 * to this event.
+	 * @param event a {@link RepositoryEvent} describing the underlying event, or <code>null</code>
+	 * if no single event can describe the operation. This event may be used by clients to determine
+	 * what should be updated after an operation completes.
+	 */
+	public RepositoryOperationEndingEvent(Object source, boolean update, RepositoryEvent event) {
+		super(source);
+		this.update = update;
+		this.event = event;
+	}
+
+	/**
+	 * Return a {@link RepositoryEvent} that reflects the operation that
+	 * occurred.  A <code>null</code> return value indicates that there
+	 * was not a single underlying repository operation.
+	 * 
+	 * @return the {@link RepositoryEvent} that was involved in the operation.  May be
+	 * <code>null</code>.  This event may be used by clients to determine
+	 * what should be updated after an operation completes.
+
+	 */
+	public RepositoryEvent getEvent() {
+		return event;
+	}
+
+	/**
+	 * Return a boolean that indicates whether the client should update the UI in response
+	 * to this event.
+	 * event.
+	 * 
+	 * @return <code>true</code> if clients should update to reflect to this event, <code>false</code>
+	 * if the client should ignore the entire operation.
+	 */
+	public boolean update() {
+		return update;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
new file mode 100644
index 0000000..4bc5cdc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import org.eclipse.equinox.p2.core.UIServices;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * Component that provides a factory that can create and initialize
+ * {@link UIServices} instances.
+ */
+public class ServiceUIComponent implements IAgentServiceFactory {
+
+	public Object createService(IProvisioningAgent agent) {
+		return new ValidationDialogServiceUI();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/SimpleLicenseManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/SimpleLicenseManager.java
deleted file mode 100644
index b92674a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/SimpleLicenseManager.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.io.*;
-import java.math.BigInteger;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.LicenseManager;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * SimpleLicenseManager is a license manager that keeps track of 
- * IInstallableUnit licenses by using the digests of the IU's licenses.
- * It can read and write its accepted list to a stream.
- * 
- * @since 3.4
- */
-public class SimpleLicenseManager extends LicenseManager {
-	java.util.Set accepted = new HashSet();
-
-	public boolean accept(IInstallableUnit iu) {
-		ILicense license = IUPropertyUtils.getLicense(iu);
-		if (license != null)
-			accepted.add(license.getDigest());
-		return true;
-	}
-
-	public boolean reject(IInstallableUnit iu) {
-		ILicense license = IUPropertyUtils.getLicense(iu);
-		if (license != null)
-			accepted.remove(license.getDigest());
-		return true;
-	}
-
-	public boolean isAccepted(IInstallableUnit iu) {
-		ILicense license = IUPropertyUtils.getLicense(iu);
-		if (license == null)
-			return true;
-		return accepted.contains(license.getDigest());
-	}
-
-	public boolean hasAcceptedLicenses() {
-		return !accepted.isEmpty();
-	}
-
-	public void read(InputStream stream) throws IOException {
-		try {
-			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			factory.setNamespaceAware(true);
-			DocumentBuilder parser = factory.newDocumentBuilder();
-			Document doc = parser.parse(stream);
-			Node root = doc.getDocumentElement();
-			processRoot(root, accepted);
-		} catch (ParserConfigurationException e) {
-			ProvUI.handleException(e, ProvUIMessages.ProvUILicenseManager_ParsingError, StatusManager.LOG);
-		} catch (SAXException e) {
-			ProvUI.handleException(e, ProvUIMessages.ProvUILicenseManager_ParsingError, StatusManager.LOG);
-		}
-	}
-
-	public void write(OutputStream stream) throws IOException {
-		OutputStreamWriter osw = null;
-		PrintWriter writer = null;
-		try {
-			osw = new OutputStreamWriter(stream, "UTF8"); //$NON-NLS-1$
-			writer = new PrintWriter(osw);
-			writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
-			writer.println("<licenses>"); //$NON-NLS-1$
-			for (Iterator i = accepted.iterator(); i.hasNext();) {
-				BigInteger digest = (BigInteger) i.next();
-				writer.print("    " + "<license digest=\"" + digest.toString(16) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-			}
-		} finally {
-			writer.println("</licenses>"); //$NON-NLS-1$
-			writer.flush();
-			writer.close();
-			if (osw != null)
-				osw.close();
-		}
-	}
-
-	private void processRoot(Node root, Set licenses) {
-		if (root.getNodeName().equals("licenses")) { //$NON-NLS-1$
-			NodeList children = root.getChildNodes();
-			processChildren(children, licenses);
-		}
-	}
-
-	private void processChildren(NodeList children, Set licenses) {
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("license")) { //$NON-NLS-1$
-					NamedNodeMap atts = child.getAttributes();
-					Node digestAtt = atts.getNamedItem("digest"); //$NON-NLS-1$
-					if (digestAtt != null) {
-						BigInteger digest = new BigInteger(digestAtt.getNodeValue(), 16);
-						licenses.add(digest);
-					}
-				}
-			}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UIRepositoryEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UIRepositoryEvent.java
deleted file mode 100644
index 3834d91..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UIRepositoryEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-import java.net.URI;
-
-/**
- * UIMetadataRepositoryEvent is used to distinguish those metadata repository
- * events of concern to the end user from those that are internal.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236485
- * 
- * @since 3.5
- *
- */
-public class UIRepositoryEvent extends RepositoryEvent {
-
-	private static final long serialVersionUID = 820293103398960019L;
-
-	/**
-	 * @param location
-	 */
-	public UIRepositoryEvent(URI location, int type, int kind) {
-		super(location, type, kind, true);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
new file mode 100644
index 0000000..1effbe3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Iterator;
+import java.util.Vector;
+import javax.xml.parsers.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.w3c.dom.*;
+import org.xml.sax.SAXException;
+
+/**
+ * Utility methods involving compatibility with the Eclipse Update Manager.
+ * 
+ * @since 3.4
+ *
+ */
+public class UpdateManagerCompatibility {
+
+	// This value was copied from MetadataGeneratorHelper.  Must be the same.
+	private static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
+	private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+
+	private static void parse(String fileName, Vector<MetadataRepositoryElement> bookmarks) {
+		File file = new File(fileName);
+		if (!file.exists())
+			return;
+
+		try {
+			documentBuilderFactory.setNamespaceAware(true);
+			DocumentBuilder parser = documentBuilderFactory.newDocumentBuilder();
+			Document doc = parser.parse(file);
+			Node root = doc.getDocumentElement();
+			processRoot(root, bookmarks);
+		} catch (ParserConfigurationException e) {
+			logFail(e);
+		} catch (SAXException e) {
+			logFail(e);
+		} catch (IOException e) {
+			logFail(e);
+		}
+	}
+
+	private static MetadataRepositoryElement[] getSites(Vector<MetadataRepositoryElement> bookmarks) {
+		return bookmarks.toArray(new MetadataRepositoryElement[bookmarks.size()]);
+	}
+
+	private static void processRoot(Node root, Vector<MetadataRepositoryElement> bookmarks) {
+		if (root.getNodeName().equals("bookmarks")) { //$NON-NLS-1$
+			NodeList children = root.getChildNodes();
+			processChildren(children, bookmarks);
+		}
+	}
+
+	private static void processChildren(NodeList children, Vector<MetadataRepositoryElement> bookmarks) {
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("site")) { //$NON-NLS-1$
+					createSite(child, bookmarks);
+				} else if (child.getNodeName().equals("folder")) { //$NON-NLS-1$
+					createFolder(child, bookmarks);
+				}
+			}
+		}
+	}
+
+	private static void createSite(Node child, Vector<MetadataRepositoryElement> bookmarks) {
+		URI uri = null;
+		try {
+			uri = URIUtil.fromString((getAttribute(child, "url"))); //$NON-NLS-1$
+		} catch (URISyntaxException e) {
+			logFail(e);
+			return;
+		}
+
+		String sel = getAttribute(child, "selected"); //$NON-NLS-1$
+		boolean selected = (sel != null && sel.equals("true")); //$NON-NLS-1$
+
+		MetadataRepositoryElement element = new MetadataRepositoryElement(null, uri, selected);
+		String nickname = getAttribute(child, "name"); //$NON-NLS-1$
+		if (nickname != null && nickname.length() > 0)
+			element.setNickname(nickname);
+		bookmarks.add(element);
+	}
+
+	private static void createFolder(Node child, Vector<MetadataRepositoryElement> bookmarks) {
+		if (child.hasChildNodes())
+			processChildren(child.getChildNodes(), bookmarks);
+	}
+
+	private static String getAttribute(Node node, String name) {
+		NamedNodeMap atts = node.getAttributes();
+		Node att = atts.getNamedItem(name);
+		if (att != null) {
+			return att.getNodeValue();
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	private static void store(String fileName, Vector<MetadataRepositoryElement> bookmarks) {
+		FileOutputStream fos = null;
+		OutputStreamWriter osw = null;
+		PrintWriter writer = null;
+		try {
+			fos = new FileOutputStream(fileName);
+			osw = new OutputStreamWriter(fos, "UTF8"); //$NON-NLS-1$
+			writer = new PrintWriter(osw);
+			writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
+			writer.println("<bookmarks>"); //$NON-NLS-1$
+			for (int i = 0; i < bookmarks.size(); i++) {
+				Object obj = bookmarks.get(i);
+				writeObject("   ", obj, writer); //$NON-NLS-1$
+			}
+		} catch (IOException e) {
+			logFail(e);
+		} finally {
+			if (writer != null) {
+				writer.println("</bookmarks>"); //$NON-NLS-1$
+				writer.flush();
+				writer.close();
+			}
+			try {
+				if (osw != null)
+					osw.close();
+			} catch (IOException e1) {
+				logFail(e1);
+			}
+			try {
+				if (fos != null)
+					fos.close();
+			} catch (IOException e2) {
+				logFail(e2);
+			}
+		}
+	}
+
+	private static void writeObject(String indent, Object obj, PrintWriter writer) {
+		if (obj instanceof MetadataRepositoryElement) {
+			MetadataRepositoryElement element = (MetadataRepositoryElement) obj;
+			String sel = element.isEnabled() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
+			String name = element.getName();
+			writer.print(indent + "<site url=\"" + URIUtil.toUnencodedString(element.getLocation()) + "\" selected=\"" + sel + "\" name=\"" + getWritableXMLString(name) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
+			writer.println("/>"); //$NON-NLS-1$
+		}
+	}
+
+	public static IStatus getInstallHandlerStatus(IProvisioningPlan plan) {
+		IQueryResult<IInstallableUnit> result = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null);
+		for (Iterator<IInstallableUnit> iterator = result.iterator(); iterator.hasNext();) {
+			IInstallableUnit iu = iterator.next();
+			if (iu != null && iu.getProperty(ECLIPSE_INSTALL_HANDLER_PROP) != null)
+				return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.UpdateManagerCompatibility_ItemRequiresUpdateManager, iu.getId()));
+		}
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * Prompt the user for a file and import the sites specified in that
+	 * file.  Return the collection of repo elements in the import.
+	 * @param shell the shell used to parent any dialogs used.
+	 */
+	public static MetadataRepositoryElement[] importSites(Shell shell) {
+		FileDialog dialog = new FileDialog(shell);
+		dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ImportSitesTitle);
+		dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
+
+		MetadataRepositoryElement[] sites = null;
+
+		String bookmarksFile = dialog.open();
+		while (bookmarksFile != null && sites == null) {
+			File file = new File(bookmarksFile);
+			sites = readBookmarkFile(file);
+			if (sites == null || sites.length == 0) {
+				MessageDialog.openInformation(shell, ProvUIMessages.UpdateManagerCompatibility_InvalidSitesTitle, ProvUIMessages.UpdateManagerCompatibility_InvalidSiteFileMessage);
+				bookmarksFile = dialog.open();
+			}
+		}
+		return sites == null ? new MetadataRepositoryElement[0] : sites;
+	}
+
+	public static MetadataRepositoryElement[] readBookmarkFile(File file) {
+		Vector<MetadataRepositoryElement> bookmarks = new Vector<MetadataRepositoryElement>();
+		parse(file.getAbsolutePath(), bookmarks);
+		return getSites(bookmarks);
+	}
+
+	public static void writeBookmarkFile(String filename, MetadataRepositoryElement[] sites) {
+		Vector<MetadataRepositoryElement> bookmarks = new Vector<MetadataRepositoryElement>(sites.length);
+		for (int i = 0; i < sites.length; i++)
+			bookmarks.add(sites[i]);
+		store(filename, bookmarks);
+
+	}
+
+	/**
+	 * Export the specified list of sites to a bookmarks file that
+	 * can be read later.
+	 * 
+	 * @param shell the shell used to parent the export dialog
+	 * @param sites the sites to export
+	 */
+
+	public static void exportSites(Shell shell, MetadataRepositoryElement[] sites) {
+		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
+		dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ExportSitesTitle);
+		dialog.setFileName("bookmarks.xml"); //$NON-NLS-1$
+		dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
+		dialog.setOverwrite(true);
+
+		String bookmarksFile = dialog.open();
+		if (bookmarksFile == null)
+			return;
+
+		writeBookmarkFile(bookmarksFile, sites);
+	}
+
+	/**
+	 * Open the old UpdateManager installer UI using the specified shell. 
+	 * We do not call the UpdateManagerUI class directly because we want to be able to be configured 
+	 * without requiring those plug-ins.  Instead, we invoke a known command.
+	 */
+	public static void openInstaller() {
+		ProvUI.openUpdateManagerInstaller(null);
+	}
+
+	/**
+	 * Open the old UpdateManager configuration manager UI using the specified shell. 
+	 * We do not call the UpdateManagerUI class directly because we want to be able to be configured 
+	 * without requiring those plug-ins.  Instead, we invoke a known command.
+	 */
+	public static void openConfigurationManager() {
+		ProvUI.openUpdateManagerConfigurationManager(null);
+	}
+
+	private static void logFail(Throwable t) {
+		Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, t.getLocalizedMessage(), t);
+		ProvUI.reportStatus(failStatus, StatusManager.LOG);
+	}
+
+	private static String getWritableXMLString(String value) {
+		StringBuffer buf = new StringBuffer();
+		if (value == null)
+			return buf.toString();
+		for (int i = 0; i < value.length(); i++) {
+			char c = value.charAt(i);
+			switch (c) {
+				case '&' :
+					buf.append("&"); //$NON-NLS-1$
+					break;
+				case '<' :
+					buf.append("<"); //$NON-NLS-1$
+					break;
+				case '>' :
+					buf.append(">"); //$NON-NLS-1$
+					break;
+				case '\'' :
+					buf.append("'"); //$NON-NLS-1$
+					break;
+				case '\"' :
+					buf.append("""); //$NON-NLS-1$
+					break;
+				default :
+					buf.append(c);
+					break;
+			}
+		}
+		return buf.toString();
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
new file mode 100644
index 0000000..fe2d060
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui;
+
+import java.security.cert.Certificate;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.ui.dialogs.TrustCertificateDialog;
+import org.eclipse.equinox.internal.p2.ui.dialogs.UserValidationDialog;
+import org.eclipse.equinox.internal.p2.ui.viewers.CertificateLabelProvider;
+import org.eclipse.equinox.p2.core.UIServices;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The default GUI-based implementation of {@link UIServices}.
+ * The service declaration is made in the serviceui_component.xml file.
+
+ */
+public class ValidationDialogServiceUI extends UIServices {
+	/**
+	 * Subclassed to add a cancel button to the error dialog.
+	 */
+	static class OkCancelErrorDialog extends ErrorDialog {
+
+		public OkCancelErrorDialog(Shell parentShell, String dialogTitle, String message, IStatus status, int displayMask) {
+			super(parentShell, dialogTitle, message, status, displayMask);
+		}
+
+		protected void createButtonsForButtonBar(Composite parent) {
+			// create OK and Details buttons
+			createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+			createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
+			createDetailsButton(parent);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#getUsernamePassword(java.lang.String)
+	 */
+	public AuthenticationInfo getUsernamePassword(final String location) {
+
+		final AuthenticationInfo[] result = new AuthenticationInfo[1];
+		if (!suppressAuthentication() && !isHeadless()) {
+			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+				public void run() {
+					Shell shell = ProvUI.getDefaultParentShell();
+					String message = NLS.bind(ProvUIMessages.ServiceUI_LoginDetails, location);
+					UserValidationDialog dialog = new UserValidationDialog(shell, ProvUIMessages.ServiceUI_LoginRequired, null, message);
+					if (dialog.open() == Window.OK) {
+						result[0] = dialog.getResult();
+					}
+				}
+
+			});
+		}
+		return result[0];
+	}
+
+	private boolean suppressAuthentication() {
+		Job job = Job.getJobManager().currentJob();
+		if (job != null) {
+			return job.getProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER) != null;
+		}
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#showCertificates(java.lang.Object)
+	 */
+	public TrustInfo getTrustInfo(Certificate[][] untrustedChains, final String[] unsignedDetail) {
+		boolean trustUnsigned = true;
+		boolean persistTrust = false;
+		Certificate[] trusted = new Certificate[0];
+		// Some day we may summarize all of this in one UI, or perhaps we'll have a preference to honor regarding
+		// unsigned content.  For now we prompt separately first as to whether unsigned detail should be trusted
+		if (!isHeadless() && unsignedDetail != null && unsignedDetail.length > 0) {
+			final boolean[] result = new boolean[] {false};
+			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+				public void run() {
+					Shell shell = ProvUI.getDefaultParentShell();
+					OkCancelErrorDialog dialog = new OkCancelErrorDialog(shell, ProvUIMessages.ServiceUI_warning_title, null, createStatus(), IStatus.WARNING);
+					result[0] = dialog.open() == IDialogConstants.OK_ID;
+				}
+
+				private IStatus createStatus() {
+					MultiStatus parent = new MultiStatus(ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ServiceUI_unsigned_message, null);
+					for (int i = 0; i < unsignedDetail.length; i++) {
+						parent.add(new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, unsignedDetail[i]));
+					}
+					return parent;
+				}
+			});
+			trustUnsigned = result[0];
+		}
+		// For now, there is no need to show certificates if there was unsigned content and we don't trust it.
+		if (!trustUnsigned)
+			return new TrustInfo(trusted, persistTrust, trustUnsigned);
+
+		// We've established trust for unsigned content, now examine the untrusted chains
+		if (!isHeadless() && untrustedChains != null && untrustedChains.length > 0) {
+
+			final Object[] result = new Object[1];
+			final TreeNode[] input = createTreeNodes(untrustedChains);
+
+			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+				public void run() {
+					Shell shell = ProvUI.getDefaultParentShell();
+					ILabelProvider labelProvider = new CertificateLabelProvider();
+					TreeNodeContentProvider contentProvider = new TreeNodeContentProvider();
+					TrustCertificateDialog trustCertificateDialog = new TrustCertificateDialog(shell, input, labelProvider, contentProvider);
+					trustCertificateDialog.open();
+					Certificate[] values = new Certificate[trustCertificateDialog.getResult() == null ? 0 : trustCertificateDialog.getResult().length];
+					for (int i = 0; i < values.length; i++) {
+						values[i] = (Certificate) ((TreeNode) trustCertificateDialog.getResult()[i]).getValue();
+					}
+					result[0] = values;
+				}
+			});
+			persistTrust = true;
+			trusted = (Certificate[]) result[0];
+		}
+		return new TrustInfo(trusted, persistTrust, trustUnsigned);
+	}
+
+	private TreeNode[] createTreeNodes(Certificate[][] certificates) {
+		TreeNode[] children = new TreeNode[certificates.length];
+		for (int i = 0; i < certificates.length; i++) {
+			TreeNode head = new TreeNode(certificates[i][0]);
+			TreeNode parent = head;
+			children[i] = head;
+			for (int j = 0; j < certificates[i].length; j++) {
+				TreeNode node = new TreeNode(certificates[i][j]);
+				node.setParent(parent);
+				parent.setChildren(new TreeNode[] {node});
+				parent = node;
+			}
+		}
+		return children;
+	}
+
+	public AuthenticationInfo getUsernamePassword(final String location, final AuthenticationInfo previousInfo) {
+
+		final AuthenticationInfo[] result = new AuthenticationInfo[1];
+		if (!suppressAuthentication() && !isHeadless()) {
+			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+				public void run() {
+					Shell shell = ProvUI.getDefaultParentShell();
+					String message = null;
+					if (previousInfo.saveResult())
+						message = NLS.bind(ProvUIMessages.ProvUIMessages_SavedNotAccepted_EnterFor_0, location);
+					else
+						message = NLS.bind(ProvUIMessages.ProvUIMessages_NotAccepted_EnterFor_0, location);
+
+					UserValidationDialog dialog = new UserValidationDialog(previousInfo, shell, ProvUIMessages.ServiceUI_LoginRequired, null, message);
+					if (dialog.open() == Window.OK) {
+						result[0] = dialog.getResult();
+					}
+				}
+
+			});
+		}
+		return result[0];
+	}
+
+	private boolean isHeadless() {
+		// If there is no UI available and we are still the IServiceUI, 
+		// assume that the operation should proceed.  See
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=291049
+		return !PlatformUI.isWorkbenchRunning();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
new file mode 100644
index 0000000..2bbcacc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+public abstract class ColocatedRepositoryAction extends ProvisioningAction {
+
+	public ColocatedRepositoryAction(ProvisioningUI ui, String label, String tooltipText, ISelectionProvider selectionProvider) {
+		super(ui, label, selectionProvider);
+		setToolTipText(tooltipText);
+		init();
+	}
+
+	protected URI[] getSelectedLocations(Object[] selectionArray) {
+		List<URI> urls = new ArrayList<URI>();
+		for (int i = 0; i < selectionArray.length; i++) {
+			if (selectionArray[i] instanceof MetadataRepositoryElement)
+				urls.add(((MetadataRepositoryElement) selectionArray[i]).getLocation());
+		}
+		return urls.toArray(new URI[urls.size()]);
+	}
+
+	protected void checkEnablement(Object[] selectionArray) {
+		setEnabled(getSelectedLocations(selectionArray).length > 0);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
new file mode 100644
index 0000000..2fd5970
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import org.eclipse.equinox.p2.query.QueryUtil;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
+import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+/**
+ * 
+ * Abstract class that implements the enablement rules for actions that
+ * affect IU's already in a profile.  The action only enables when all of the
+ * IU's involved are top level IU's from the same profile.
+ * 
+ * @since 3.5
+ *
+ */
+public abstract class ExistingIUInProfileAction extends ProfileModificationAction {
+
+	public ExistingIUInProfileAction(ProvisioningUI ui, String label, ISelectionProvider selectionProvider, String profileId) {
+		super(ui, label, selectionProvider, profileId);
+	}
+
+	protected boolean isEnabledFor(Object[] selectionArray) {
+		Object parent = null;
+		// We don't want to prompt for a profile during validation,
+		// so we only consider the profile id that was set, or the profile
+		// referred to by the element itself..
+		IProfile profile = getProfile();
+		if (selectionArray.length > 0) {
+			for (int i = 0; i < selectionArray.length; i++) {
+				if (selectionArray[i] instanceof InstalledIUElement) {
+					InstalledIUElement element = (InstalledIUElement) selectionArray[i];
+					// If the parents are different, then they are either from 
+					// different profiles or are nested in different parts of the tree.
+					// Either way, this makes the selection invalid.
+					if (parent == null) {
+						parent = element.getParent(element);
+					} else if (parent != element.getParent(element)) {
+						return false;
+					}
+					// Now consider the validity of the element on its own
+					if (!isSelectable(element.getIU(), profile))
+						return false;
+				} else {
+					IInstallableUnit iu = ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
+					if (iu == null || !isSelectable(iu))
+						return false;
+				}
+			}
+			return true;
+		}
+		return false;
+	}
+
+	protected boolean isSelectable(IIUElement element) {
+		if (!super.isSelectable(element))
+			return false;
+		Object parent = element.getParent(element);
+		if (parent != null) {
+			IProfile profile = ProvUI.getAdapter(parent, IProfile.class);
+			if (profile != null)
+				return isSelectable(element.getIU(), profile);
+		}
+		return false;
+	}
+
+	protected boolean isSelectable(IInstallableUnit iu) {
+		if (!super.isSelectable(iu))
+			return false;
+		return isSelectable(iu, getProfile());
+	}
+
+	private boolean isSelectable(IInstallableUnit iu, IProfile profile) {
+		int lock = getLock(profile, iu);
+		if ((lock & getLockConstant()) == getLockConstant())
+			return false;
+		return !profile.query(QueryUtil.createPipeQuery(QueryUtil.createIUQuery(iu), getPolicy().getVisibleInstalledIUQuery()), null).isEmpty();
+	}
+
+	protected abstract int getLockConstant();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
new file mode 100644
index 0000000..8d91332
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/InstallAction.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+public class InstallAction extends ProfileModificationAction {
+
+	public InstallAction(ProvisioningUI ui, ISelectionProvider selectionProvider, String profileId) {
+		super(ui, ProvUI.INSTALL_COMMAND_LABEL, selectionProvider, profileId);
+		setToolTipText(ProvUI.INSTALL_COMMAND_TOOLTIP);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[])
+	 */
+	protected boolean isEnabledFor(Object[] selectionArray) {
+		if (selectionArray.length == 0)
+			return false;
+		// We allow non-IU's to be selected at this point, but there
+		// must be at least one installable unit selected that is
+		// selectable
+		for (int i = 0; i < selectionArray.length; i++) {
+			if (selectionArray[i] instanceof InstalledIUElement && isSelectable((IIUElement) selectionArray[i]))
+				return true;
+			IInstallableUnit iu = ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
+			if (iu != null && isSelectable(iu))
+				return true;
+		}
+		return false;
+	}
+
+	/*
+	 * Overridden to reject categories and nested IU's (parent is a non-category IU)
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isSelectable(org.eclipse.equinox.internal.p2.ui.model.IUElement)
+	 */
+	protected boolean isSelectable(IIUElement element) {
+		return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
+	}
+
+	protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
+		return getProvisioningUI().openInstallWizard(ius, (InstallOperation) operation, null);
+	}
+
+	protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
+		InstallOperation op = new InstallOperation(getSession(), ius);
+		op.setProfileId(profileId);
+		//		op.setRootMarkerKey(getPolicy().getQueryContext().getVisibleInstalledIUProperty());
+		return op;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
new file mode 100644
index 0000000..8231c4b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import java.util.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
+import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.ui.LicenseManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public abstract class ProfileModificationAction extends ProvisioningAction {
+	public static final int ACTION_NOT_RUN = -1;
+	String profileId;
+	String userChosenProfileId;
+	int result = ACTION_NOT_RUN;
+
+	protected ProfileModificationAction(ProvisioningUI ui, String text, ISelectionProvider selectionProvider, String profileId) {
+		super(ui, text, selectionProvider);
+		this.ui = ui;
+		this.profileId = profileId;
+		init();
+	}
+
+	public void run() {
+		Collection<IInstallableUnit> ius = getSelectedIUs();
+		// No ius or no profile?
+		if (profileId == null || ius.size() == 0) {
+			ProvUI.reportStatus(getNoProfileOrSelectionStatus(profileId, ius), StatusManager.BLOCK);
+			runCanceled();
+			return;
+		}
+		run(ius, profileId);
+	}
+
+	public IProfile getProfile() {
+		String id = profileId == null ? ui.getProfileId() : profileId;
+		return ProvUI.getProfileRegistry(ui.getSession()).getProfile(id);
+	}
+
+	protected IStatus getNoProfileOrSelectionStatus(String id, Collection<IInstallableUnit> ius) {
+		return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.size())));
+	}
+
+	protected abstract ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius);
+
+	protected void run(final Collection<IInstallableUnit> ius, final String id) {
+		final ProfileChangeOperation operation = getProfileChangeOperation(ius);
+		ProvisioningJob job = operation.getResolveJob(null);
+		if (job == null) {
+			ProvUI.reportStatus(operation.getResolutionResult(), StatusManager.SHOW);
+		} else {
+			job.addJobChangeListener(new JobChangeAdapter() {
+				public void done(IJobChangeEvent event) {
+
+					if (PlatformUI.isWorkbenchRunning()) {
+						PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+							public void run() {
+								if (validateOperation(operation))
+									performAction(operation, ius);
+								userChosenProfileId = null;
+							}
+						});
+					}
+
+				}
+
+			});
+			getProvisioningUI().schedule(job, StatusManager.SHOW | StatusManager.LOG);
+		}
+		// Since we are resolving asynchronously, our job is done.  Setting this allows
+		// callers to decide to close the launching window.
+		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
+		result = Window.OK;
+	}
+
+	/**
+	 * Get the integer return code returned by any wizards launched by this
+	 * action.  If the action has not been run, return ACTION_NOT_RUN.  If the
+	 * action does not open a wizard, return Window.OK if the operation was performed,
+	 * and Window.CANCEL if it was canceled.
+	 * 
+	 * @return integer return code
+	 */
+	public int getReturnCode() {
+		return result;
+	}
+
+	/**
+	 * Validate the operation and return true if the operation should
+	 * be performed with plan.  Report any errors to the user before returning false.
+	 * @param operation
+	 * @return a boolean indicating whether the operation should be used in a
+	 * provisioning operation.
+	 */
+	protected boolean validateOperation(ProfileChangeOperation operation) {
+		if (operation != null) {
+			return getPolicy().continueWorkingWithOperation(operation, getShell());
+		}
+		return false;
+	}
+
+	protected abstract int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius);
+
+	protected IInstallableUnit getIU(Object element) {
+		return ProvUI.getAdapter(element, IInstallableUnit.class);
+
+	}
+
+	/**
+	 * Return an array of the selected and valid installable units.
+	 * The number of IInstallableUnits in the array may be different than
+	 * the actual number of selections in the action's selection provider.
+	 * That is, if the action is disabled due to invalid selections,
+	 * this method will return those selections that were valid.
+	 * 
+	 * @return an array of selected IInstallableUnit that meet the
+	 * enablement criteria for the action.  
+	 */
+	protected List<IInstallableUnit> getSelectedIUs() {
+		List<?> elements = getStructuredSelection().toList();
+		List<IInstallableUnit> iusList = new ArrayList<IInstallableUnit>(elements.size());
+
+		for (int i = 0; i < elements.size(); i++) {
+			if (elements.get(i) instanceof IIUElement) {
+				IIUElement element = (IIUElement) elements.get(i);
+				if (isSelectable(element))
+					iusList.add(getIU(element));
+			} else {
+				IInstallableUnit iu = ProvUI.getAdapter(elements.get(i), IInstallableUnit.class);
+				if (iu != null && isSelectable(iu))
+					iusList.add(iu);
+			}
+		}
+		return iusList;
+	}
+
+	protected boolean isSelectable(IIUElement element) {
+		return !(element instanceof CategoryElement);
+	}
+
+	protected boolean isSelectable(IInstallableUnit iu) {
+		return !ProvUI.isCategory(iu);
+	}
+
+	protected LicenseManager getLicenseManager() {
+		return getProvisioningUI().getLicenseManager();
+	}
+
+	protected QueryProvider getQueryProvider() {
+		return ProvUI.getQueryProvider();
+	}
+
+	protected final void checkEnablement(Object[] selections) {
+		if (isEnabledFor(selections)) {
+			setEnabled(!getProvisioningUI().hasScheduledOperations());
+		} else
+			setEnabled(false);
+	}
+
+	protected abstract boolean isEnabledFor(Object[] selections);
+
+	protected int getLock(IProfile profile, IInstallableUnit iu) {
+		if (profile == null)
+			return IProfile.LOCK_NONE;
+		try {
+			String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
+			if (value != null)
+				return Integer.parseInt(value);
+		} catch (NumberFormatException e) {
+			// ignore and assume no lock
+		}
+		return IProfile.LOCK_NONE;
+	}
+
+	protected String getProfileProperty(IProfile profile, IInstallableUnit iu, String propertyName) {
+		if (profile == null || iu == null)
+			return null;
+		return profile.getInstallableUnitProperty(iu, propertyName);
+	}
+
+	private void runCanceled() {
+		// The action was canceled, do any cleanup needed before
+		// it is run again.
+		userChosenProfileId = null;
+		result = Window.CANCEL;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java
new file mode 100644
index 0000000..b521e17
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.IShellProvider;
+
+/**
+ * PropertyDialogAction which sets its enablement on construction.
+ * 
+ * @since 3.4
+ *
+ */
+
+public class PropertyDialogAction extends org.eclipse.ui.dialogs.PropertyDialogAction {
+	public PropertyDialogAction(IShellProvider shell, ISelectionProvider provider) {
+		super(shell, provider);
+		// prime the selection validation
+		ISelection selection = provider.getSelection();
+		if (selection instanceof IStructuredSelection) {
+			selectionChanged((IStructuredSelection) selection);
+		} else {
+			selectionChanged(selection);
+		}
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
new file mode 100644
index 0000000..00a40e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2008 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.actions.SelectionProviderAction;
+
+public abstract class ProvisioningAction extends SelectionProviderAction {
+	ProvisioningUI ui;
+
+	protected ProvisioningAction(ProvisioningUI ui, String text, ISelectionProvider selectionProvider) {
+		super(selectionProvider, text);
+		this.ui = ui;
+	}
+
+	/*
+	 * perform initialization that should be done after creation.
+	 */
+	protected void init() {
+		// prime the selection validation
+		ISelection selection = getSelection();
+		if (selection instanceof IStructuredSelection) {
+			selectionChanged((IStructuredSelection) selection);
+		} else {
+			selectionChanged(selection);
+		}
+	}
+
+	protected Shell getShell() {
+		return ProvUI.getDefaultParentShell();
+	}
+
+	/*
+	 * Overridden to use the selection from the selection provider, not the one
+	 * from the triggering event.  Some selection providers reinterpret the raw selections
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public final void selectionChanged(IStructuredSelection selection) {
+		ISelection providerSelection = getSelectionProvider().getSelection();
+		if (providerSelection instanceof IStructuredSelection) {
+			checkEnablement(((IStructuredSelection) providerSelection).toArray());
+		} else {
+			// shouldn't really happen, but a provider could decide to de-structure the selection
+			selectionChanged(providerSelection);
+		}
+	}
+
+	protected void checkEnablement(Object[] selections) {
+		// Default is to nothing
+	}
+
+	/**
+	 * Recheck the enablement.  Called by clients when some condition outside of
+	 * the action that may effect its enablement should be changed.
+	 */
+	public final void checkEnablement() {
+		ISelection selection = getSelection();
+		if (selection instanceof IStructuredSelection) {
+			checkEnablement(((IStructuredSelection) selection).toArray());
+		} else {
+			selectionChanged(selection);
+		}
+	}
+
+	protected ProvisioningSession getSession() {
+		return ui.getSession();
+	}
+
+	protected Policy getPolicy() {
+		return ui.getPolicy();
+	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		return ui;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
new file mode 100644
index 0000000..d3061ac
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @since 3.4
+ *
+ */
+public abstract class RefreshAction extends ProvisioningAction {
+
+	/**
+	 */
+	public RefreshAction(ProvisioningUI ui, ISelectionProvider selectionProvider, Control control) {
+		super(ui, ProvUIMessages.RefreshAction_Label, selectionProvider);
+		setToolTipText(ProvUIMessages.RefreshAction_Tooltip);
+		hookKeyListener(control);
+		init();
+	}
+
+	private void hookKeyListener(Control control) {
+		control.addKeyListener(new KeyAdapter() {
+			public void keyReleased(KeyEvent e) {
+				handleKeyReleased(e);
+			}
+		});
+	}
+
+	public void run() {
+		refresh();
+	}
+
+	protected abstract void refresh();
+
+	/**
+	 * Handle a key released event.  Used internally and also
+	 * made available so that clients can watch key events from
+	 * any other controls and dispatch to this action.
+	 * 
+	 * @param event the key event
+	 */
+	public void handleKeyReleased(KeyEvent event) {
+		if (event.keyCode == SWT.F5 && event.stateMask == 0) {
+			refresh();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
new file mode 100644
index 0000000..f794bb9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+public class RemoveColocatedRepositoryAction extends ColocatedRepositoryAction {
+
+	public RemoveColocatedRepositoryAction(ProvisioningUI ui, ISelectionProvider selectionProvider) {
+		super(ui, ProvUIMessages.RemoveColocatedRepositoryAction_Label, ProvUIMessages.RemoveColocatedRepositoryAction_Tooltip, selectionProvider);
+
+	}
+
+	public void run() {
+		ui.getRepositoryTracker().removeRepositories(getSelectedLocations(getStructuredSelection().toArray()), ui.getSession());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
new file mode 100644
index 0000000..5bb281f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.UninstallOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+public class UninstallAction extends ExistingIUInProfileAction {
+
+	public UninstallAction(ProvisioningUI ui, ISelectionProvider selectionProvider, String profileId) {
+		super(ui, ProvUI.UNINSTALL_COMMAND_LABEL, selectionProvider, profileId);
+		setToolTipText(ProvUI.UNINSTALL_COMMAND_TOOLTIP);
+	}
+
+	protected String getTaskName() {
+		return ProvUIMessages.UninstallIUProgress;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
+	 */
+	protected int getLockConstant() {
+		return IProfile.LOCK_UNINSTALL;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
+		return ui.getUninstallOperation(ius, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
+	 */
+	protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
+		return ui.openUninstallWizard(ius, (UninstallOperation) operation, null);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
new file mode 100644
index 0000000..289c523
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.actions;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.ISelectionProvider;
+
+public class UpdateAction extends ExistingIUInProfileAction {
+
+	protected IUElementListRoot root; // root that will be used to seed the wizard
+	protected ArrayList<?> initialSelections; // the elements that should be selected in the wizard
+	boolean resolveIsVisible = true;
+	boolean skipSelectionPage = false;
+
+	public UpdateAction(ProvisioningUI ui, ISelectionProvider selectionProvider, String profileId, boolean resolveIsVisible) {
+		super(ui, ProvUI.UPDATE_COMMAND_LABEL, selectionProvider, profileId);
+		setToolTipText(ProvUI.UPDATE_COMMAND_TOOLTIP);
+		this.resolveIsVisible = resolveIsVisible;
+	}
+
+	public void setSkipSelectionPage(boolean skipSelectionPage) {
+		this.skipSelectionPage = skipSelectionPage;
+	}
+
+	protected String getTaskName() {
+		return ProvUIMessages.UpdateIUProgress;
+	}
+
+	protected boolean isResolveUserVisible() {
+		return resolveIsVisible;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
+	 */
+	protected int getLockConstant() {
+		return IProfile.LOCK_UPDATE;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
+		return ui.getUpdateOperation(ius, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#performAction(org.eclipse.equinox.p2.operations.ProfileChangeOperation, org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
+	 */
+	protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
+		return ui.openUpdateWizard(skipSelectionPage, (UpdateOperation) operation, null);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
new file mode 100644
index 0000000..4f3fc87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
+import org.eclipse.equinox.internal.p2.ui.IProvHelpContextIds;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Abstract dialog class for adding repositories of different types. This class
+ * assumes the user view of a repository is a name and URI. Individual subclasses 
+ * will dictate what kind of repository and how it's created.
+ * 
+ * @since 3.4
+ * 
+ */
+public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialog {
+
+	URI addedLocation;
+	static final String[] ARCHIVE_EXTENSIONS = new String[] {"*.jar;*.zip"}; //$NON-NLS-1$ 
+	static String lastLocalLocation = null;
+	static String lastArchiveLocation = null;
+	Policy policy;
+
+	public AddRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
+		super(parentShell, ui);
+		setTitle(ProvUIMessages.AddRepositoryDialog_Title);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parentShell, IProvHelpContextIds.ADD_REPOSITORY_DIALOG);
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		Composite comp = new Composite(parent, SWT.NONE);
+		initializeDialogUnits(comp);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 3;
+		layout.marginTop = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+
+		comp.setLayout(layout);
+		GridData data = new GridData();
+		comp.setLayoutData(data);
+
+		// Name: []
+		nickname = createNameField(comp);
+
+		Button localButton = new Button(comp, SWT.PUSH);
+		localButton.setText(ProvUIMessages.RepositoryGroup_LocalRepoBrowseButton);
+		localButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.APPLICATION_MODAL);
+				dialog.setMessage(ProvUIMessages.RepositoryGroup_SelectRepositoryDirectory);
+				dialog.setFilterPath(lastLocalLocation);
+				String path = dialog.open();
+				if (path != null) {
+					lastLocalLocation = path;
+					url.setText(makeLocalURIString(path));
+					validateRepositoryURL(false);
+				}
+			}
+		});
+		setButtonLayoutData(localButton);
+
+		// Location: []
+		url = createLocationField(comp);
+
+		Button archiveButton = new Button(comp, SWT.PUSH);
+		archiveButton.setText(ProvUIMessages.RepositoryGroup_ArchivedRepoBrowseButton);
+		archiveButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				FileDialog dialog = new FileDialog(getShell(), SWT.APPLICATION_MODAL);
+				dialog.setText(ProvUIMessages.RepositoryGroup_RepositoryFile);
+				dialog.setFilterExtensions(ARCHIVE_EXTENSIONS);
+				dialog.setFileName(lastArchiveLocation);
+				String path = dialog.open();
+				if (path != null) {
+					lastArchiveLocation = path;
+					url.setText(makeLocalURIString(path));
+					validateRepositoryURL(false);
+				}
+			}
+		});
+		setButtonLayoutData(archiveButton);
+		comp.setTabList(new Control[] {nickname, url, localButton, archiveButton});
+		Dialog.applyDialogFont(comp);
+		return comp;
+	}
+
+	String makeLocalURIString(String path) {
+		try {
+			URI localURI = URIUtil.fromString(path);
+			return URIUtil.toUnencodedString(RepositoryHelper.localRepoURIHelper(localURI));
+		} catch (URISyntaxException e) {
+			return path;
+		}
+	}
+
+	protected boolean handleOk() {
+		IStatus status = addRepository();
+		return status.isOK();
+	}
+
+	/**
+	 * Get the location of the repository that was added by this dialog.  Return <code>null</code>
+	 * if the dialog has not yet added a repository location.
+	 * 
+	 * @return the location of the repository that has been added by this dialog, or <code>null</code>
+	 * if no repository has been added.
+	 */
+	public URI getAddedLocation() {
+		return addedLocation;
+	}
+
+	protected IStatus addRepository() {
+		IStatus status = validateRepositoryURL(false);
+		if (status.isOK()) {
+			addedLocation = getUserLocation();
+			String nick = nickname.getText().trim();
+			if (nick.length() == 0)
+				nick = null;
+			getRepositoryTracker().addRepository(addedLocation, nick, getProvisioningUI().getSession());
+		}
+		return status;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
index 9e8eb84..57cd024 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
@@ -29,7 +29,7 @@ public class ApplyProfileChangesDialog extends MessageDialog {
 	public static final int PROFILE_APPLYCHANGES = 1;
 	public static final int PROFILE_RESTART = 2;
 	private final static String[] yesNo = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL};
-	private final static String[] yesNoApply = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, ProvUIMessages.ApplyProfileChangesDialog_ApplyChanges};
+	private final static String[] yesNoApply = new String[] {ProvUIMessages.ApplyProfileChangesDialog_Restart, ProvUIMessages.ApplyProfileChangesDialog_NotYet, ProvUIMessages.ApplyProfileChangesDialog_ApplyChanges};
 
 	private int returnCode = PROFILE_IGNORE;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
new file mode 100644
index 0000000..aab30eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
@@ -0,0 +1,515 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.URI;
+import java.util.ArrayList;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * An AvailableIUGroup is a reusable UI component that displays the
+ * IU's available for installation.  By default, content from all available
+ * repositories is shown.
+ * 
+ * @since 3.4
+ */
+public class AvailableIUGroup extends StructuredIUGroup {
+
+	/**
+	 * Show contents from all repositories
+	 */
+	public static final int AVAILABLE_ALL = 1;
+
+	/**
+	 * Don't show any repository content
+	 */
+	public static final int AVAILABLE_NONE = 2;
+
+	/**
+	 * Show local repository content
+	 */
+	public static final int AVAILABLE_LOCAL = 3;
+
+	/**
+	 * Show content for a specific repository
+	 */
+	public static final int AVAILABLE_SPECIFIED = 4;
+
+	IUViewQueryContext queryContext;
+	int filterConstant = AVAILABLE_ALL;
+	URI repositoryFilter;
+	QueryableMetadataRepositoryManager queryableManager;
+	// We restrict the type of the filter used because PatternFilter does
+	// unnecessary accesses of children that cause problems with the deferred
+	// tree.
+	AvailableIUPatternFilter filter;
+	private boolean useBold = false;
+	private IUDetailsLabelProvider labelProvider;
+	private int repoFlags;
+	Display display;
+	DelayedFilterCheckboxTree filteredTree;
+	Job lastRequestedLoadJob;
+
+	/**
+	 * Create a group that represents the available IU's from all available
+	 * repositories.  The default policy controls the visibility flags for
+	 * repositories and IU's.
+	 * 
+	 * @param parent the parent composite for the group
+	 */
+	public AvailableIUGroup(ProvisioningUI ui, final Composite parent) {
+		this(ui, parent, parent.getFont(), null, getDefaultColumnConfig(), AVAILABLE_ALL);
+	}
+
+	private static IUColumnConfig[] getDefaultColumnConfig() {
+		// increase primary column width because we might be nesting names under categories and require more space than a flat list
+		IUColumnConfig nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH + 15);
+		IUColumnConfig versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
+		return new IUColumnConfig[] {nameColumn, versionColumn};
+	}
+
+	/**
+	 * Create a group that represents the available IU's.
+	 * 
+	 * @param ui the policy to use for deciding what should be shown
+	 * @param parent the parent composite for the group
+	 * @param font The font to use for calculating pixel sizes.  This font is
+	 * not managed by the receiver.
+	 * @param queryContext the IUViewQueryContext that determines additional
+	 * information about what is shown, such as the visible repositories
+	 * @param columnConfig the description of the columns that should be shown.  If <code>null</code>, a default
+	 * will be used.
+	 * @param filterConstant a constant specifying which repositories are used when showing content
+	 */
+	public AvailableIUGroup(ProvisioningUI ui, final Composite parent, Font font, IUViewQueryContext queryContext, IUColumnConfig[] columnConfig, int filterConstant) {
+		super(ui, parent, font, columnConfig);
+		this.display = parent.getDisplay();
+		if (queryContext == null)
+			this.queryContext = ProvUI.getQueryContext(getPolicy());
+		else
+			this.queryContext = queryContext;
+		repoFlags = ui.getRepositoryTracker().getMetadataRepositoryFlags();
+		this.queryableManager = new QueryableMetadataRepositoryManager(ui, false);
+		this.filterConstant = filterConstant;
+		this.filter = new AvailableIUPatternFilter(getColumnConfig());
+		this.filter.setIncludeLeadingWildcard(true);
+		createGroupComposite(parent);
+	}
+
+	protected StructuredViewer createViewer(Composite parent) {
+		// Table of available IU's
+		filteredTree = new DelayedFilterCheckboxTree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filter, getPreFilterJobProvider());
+		final TreeViewer availableIUViewer = filteredTree.getViewer();
+
+		// If the user expanded or collapsed anything while we were loading a repo
+		// in the background, we would not want to disrupt their work by making
+		// a newly loaded visible and expanding it.  Setting the load job to null 
+		// will take care of this.
+		availableIUViewer.getTree().addTreeListener(new TreeListener() {
+			public void treeCollapsed(TreeEvent e) {
+				lastRequestedLoadJob = null;
+			}
+
+			public void treeExpanded(TreeEvent e) {
+				lastRequestedLoadJob = null;
+			}
+		});
+
+		labelProvider = new IUDetailsLabelProvider(filteredTree, getColumnConfig(), getShell());
+		labelProvider.setUseBoldFontForFilteredItems(useBold);
+		labelProvider.setToolTipProperty(IInstallableUnit.PROP_DESCRIPTION);
+
+		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
+		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
+		comparator.useColumnConfig(getColumnConfig());
+		availableIUViewer.setComparator(comparator);
+		availableIUViewer.setComparer(new ProvElementComparer());
+
+		// Now the content provider.
+		DeferredQueryContentProvider contentProvider = new DeferredQueryContentProvider();
+		availableIUViewer.setContentProvider(contentProvider);
+
+		// Now the presentation, columns before label provider.
+		setTreeColumns(availableIUViewer.getTree());
+		availableIUViewer.setLabelProvider(labelProvider);
+
+		// Notify the filtered tree so that it can hook listeners on the
+		// content provider.  This is needed so that filtering is only allowed
+		// after content has been retrieved.
+		filteredTree.contentProviderSet(contentProvider);
+
+		final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), availableIUViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
+			protected void repositoryAdded(final RepositoryEvent event) {
+				makeRepositoryVisible(event.getRepositoryLocation());
+			}
+
+			protected void refreshViewer() {
+				final TreeViewer treeViewer = filteredTree.getViewer();
+				final Tree tree = treeViewer.getTree();
+				IWorkbench workbench = PlatformUI.getWorkbench();
+				if (workbench.isClosing())
+					return;
+				if (tree != null && !tree.isDisposed()) {
+					updateAvailableViewState();
+				}
+
+			}
+		};
+		ProvUIActivator.getDefault().addProvisioningListener(listener);
+
+		availableIUViewer.getControl().addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				ProvUIActivator.getDefault().removeProvisioningListener(listener);
+			}
+		});
+		updateAvailableViewState();
+		return availableIUViewer;
+	}
+
+	private void setTreeColumns(Tree tree) {
+		tree.setHeaderVisible(true);
+
+		IUColumnConfig[] cols = getColumnConfig();
+		for (int i = 0; i < cols.length; i++) {
+			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
+			tc.setResizable(true);
+			tc.setText(cols[i].getColumnTitle());
+			tc.setWidth(cols[i].getWidthInPixels(tree));
+		}
+	}
+
+	Object getNewInput() {
+		if (repositoryFilter != null) {
+			return new MetadataRepositoryElement(queryContext, getProvisioningUI(), repositoryFilter, true);
+		} else if (filterConstant == AVAILABLE_NONE) {
+			// Dummy object that explains empty site list
+			return new ProvElement(null) {
+				public Object[] getChildren(Object o) {
+					String description;
+					String name;
+					int severity;
+					if (!getPolicy().getRepositoriesVisible()) {
+						// shouldn't get here ideally.  No sites and no way to add any.
+						severity = IStatus.ERROR;
+						name = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredExplanation;
+						description = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredDescription;
+					} else {
+						severity = IStatus.INFO;
+						name = ProvUIMessages.AvailableIUGroup_NoSitesExplanation;
+						description = ProvUIMessages.ColocatedRepositoryManipulator_NoContentExplanation;
+					}
+					return new Object[] {new EmptyElementExplanation(null, severity, name, description)};
+				}
+
+				public String getLabel(Object o) {
+					// Label not needed for input
+					return null;
+				}
+			};
+		} else {
+			queryableManager.setRespositoryFlags(repoFlags);
+			return new MetadataRepositories(queryContext, getProvisioningUI(), queryableManager);
+		}
+	}
+
+	/**
+	 * Set a boolean indicating whether a bold font should be used when
+	 * showing filtered items.  This method does not refresh the tree or 
+	 * labels, so that must be done explicitly by the caller.
+	 * @param useBoldFont
+	 */
+	public void setUseBoldFontForFilteredItems(boolean useBoldFont) {
+		if (labelProvider != null)
+			labelProvider.setUseBoldFontForFilteredItems(useBoldFont);
+	}
+
+	/**
+	 * Return the composite that contains the controls in this group.
+	 * @return the composite
+	 */
+	public Composite getComposite() {
+		return super.getComposite();
+	}
+
+	/**
+	 * Get the viewer used to represent the available IU's
+	 * @return the viewer
+	 */
+	public StructuredViewer getStructuredViewer() {
+		return super.getStructuredViewer();
+	}
+
+	/**
+	 * Get the selected IU's
+	 * @return the array of selected IU's
+	 */
+	// overridden for visibility in the public package
+	public java.util.List<IInstallableUnit> getSelectedIUs() {
+		return super.getSelectedIUs();
+	}
+
+	// overridden to weed out non-IU elements, such as repositories or empty explanations
+	public Object[] getSelectedIUElements() {
+		Object[] elements = ((IStructuredSelection) viewer.getSelection()).toArray();
+		ArrayList<Object> list = new ArrayList<Object>(elements.length);
+		for (int i = 0; i < elements.length; i++)
+			if (ElementUtils.getIU(elements[i]) != null)
+				list.add(elements[i]);
+		return list.toArray();
+	}
+
+	public CheckboxTreeViewer getCheckboxTreeViewer() {
+		return filteredTree.getCheckboxTreeViewer();
+	}
+
+	/**
+	 * Get the selected IU's
+	 * @return the array of checked IU's
+	 */
+	public IInstallableUnit[] getCheckedLeafIUs() {
+		Object[] selections = filteredTree.getCheckboxTreeViewer().getCheckedElements();
+		if (selections.length == 0)
+			return new IInstallableUnit[0];
+		ArrayList<IInstallableUnit> leaves = new ArrayList<IInstallableUnit>(selections.length);
+		for (int i = 0; i < selections.length; i++) {
+			if (!getCheckboxTreeViewer().getGrayed(selections[i])) {
+				IInstallableUnit iu = ProvUI.getAdapter(selections[i], IInstallableUnit.class);
+				if (iu != null && !ProvUI.isCategory(iu) && !leaves.contains(iu))
+					leaves.add(iu);
+			}
+		}
+		return leaves.toArray(new IInstallableUnit[leaves.size()]);
+	}
+
+	public Tree getTree() {
+		if (viewer == null)
+			return null;
+		return ((TreeViewer) viewer).getTree();
+	}
+
+	/*
+	 * Make the repository with the specified location visible in the viewer.
+	 */
+	void makeRepositoryVisible(final URI location) {
+		// If we are viewing by anything other than site, there is no specific way
+		// to make a repo visible. 
+		if (!(queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO)) {
+			if (Display.getCurrent() == null)
+				display.asyncExec(new Runnable() {
+					public void run() {
+						updateAvailableViewState();
+					}
+				});
+			else
+				updateAvailableViewState();
+			return;
+		}
+		// First reset the input so that the new repo shows up
+		Runnable runnable = new Runnable() {
+			public void run() {
+				final TreeViewer treeViewer = filteredTree.getViewer();
+				final Tree tree = treeViewer.getTree();
+				IWorkbench workbench = PlatformUI.getWorkbench();
+				if (workbench.isClosing())
+					return;
+				if (tree != null && !tree.isDisposed()) {
+					updateAvailableViewState();
+				}
+			}
+		};
+		if (Display.getCurrent() == null)
+			display.asyncExec(runnable);
+		else
+			runnable.run();
+		// We don't know if loading will be a fast or slow operation.
+		// We do it in a job to be safe, and when it's done, we update
+		// the UI.
+		Job job = new Job(NLS.bind(ProvUIMessages.AvailableIUGroup_LoadingRepository, URIUtil.toUnencodedString(location))) {
+			protected IStatus run(IProgressMonitor monitor) {
+				try {
+					getProvisioningUI().loadMetadataRepository(location, true, monitor);
+					return Status.OK_STATUS;
+				} catch (ProvisionException e) {
+					return e.getStatus();
+				} catch (OperationCanceledException e) {
+					return Status.CANCEL_STATUS;
+				}
+			}
+		};
+		job.setPriority(Job.LONG);
+		job.setSystem(true);
+		job.setUser(false);
+		job.addJobChangeListener(new JobChangeAdapter() {
+			public void done(final IJobChangeEvent event) {
+				if (event.getResult().isOK())
+					display.asyncExec(new Runnable() {
+						@SuppressWarnings("rawtypes")
+						public void run() {
+							final TreeViewer treeViewer = filteredTree.getViewer();
+							IWorkbench workbench = PlatformUI.getWorkbench();
+							if (workbench.isClosing())
+								return;
+							// Expand only if there have been no other jobs started for other repos.
+							if (event.getJob() == lastRequestedLoadJob) {
+								final Tree tree = treeViewer.getTree();
+								if (tree != null && !tree.isDisposed()) {
+									TreeItem[] items = tree.getItems();
+									for (int i = 0; i < items.length; i++) {
+										if (items[i].getData() instanceof IRepositoryElement) {
+											URI url = ((IRepositoryElement) items[i].getData()).getLocation();
+											if (url.equals(location)) {
+												treeViewer.expandToLevel(items[i].getData(), AbstractTreeViewer.ALL_LEVELS);
+												tree.select(items[i]);
+												return;
+											}
+										}
+									}
+								}
+							}
+						}
+					});
+			}
+		});
+		lastRequestedLoadJob = job;
+		job.schedule();
+	}
+
+	public void updateAvailableViewState() {
+		if (getTree() == null || getTree().isDisposed())
+			return;
+		final Composite parent = getComposite().getParent();
+		setUseBoldFontForFilteredItems(queryContext.getViewType() != IUViewQueryContext.AVAILABLE_VIEW_FLAT);
+
+		BusyIndicator.showWhile(display, new Runnable() {
+			public void run() {
+				parent.setRedraw(false);
+				getCheckboxTreeViewer().setInput(getNewInput());
+				parent.layout(true);
+				parent.setRedraw(true);
+			}
+		});
+	}
+
+	public Control getDefaultFocusControl() {
+		if (filteredTree != null)
+			return filteredTree.getFilterControl();
+		return null;
+	}
+
+	protected GridData getViewerGridData() {
+		GridData data = super.getViewerGridData();
+		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		return data;
+	}
+
+	/**
+	 * Set the checked elements to the specified selections.  This method
+	 * does not force visibility/expansion of the checked elements.  If they are not
+	 * visible, they will not be checked.
+	 * @param selections
+	 */
+	public void setChecked(Object[] selections) {
+		filteredTree.getCheckboxTreeViewer().setCheckedElements(selections);
+		// TODO HACK ALERT!
+		// Since We don't have API for setAllChecked(boolean), clients have to use this method.
+		// We need to signal DelayedFilterCheckboxTree when everything needs to be deselected since
+		// we aren't firing an event for each item.
+		Object element = selections.length == 0 ? DelayedFilterCheckboxTree.ALL_ITEMS_HACK : selections[0];
+		filteredTree.getCheckboxTreeViewer().fireCheckStateChanged(element, selections.length > 0);
+	}
+
+	public void setRepositoryFilter(int filterFlag, URI repoLocation) {
+		// If there has been no change, don't do anything.  We will be
+		// clearing out selection caches in this method and should not do
+		// so if there's really no change.
+		if (filterConstant == filterFlag) {
+			if (filterConstant != AVAILABLE_SPECIFIED)
+				return;
+			if (repoLocation != null && repoLocation.equals(repositoryFilter))
+				return;
+		}
+		filterConstant = filterFlag;
+
+		switch (filterFlag) {
+			case AVAILABLE_ALL :
+			case AVAILABLE_NONE :
+				repositoryFilter = null;
+				repoFlags &= ~IRepositoryManager.REPOSITORIES_LOCAL;
+				break;
+			case AVAILABLE_LOCAL :
+				repositoryFilter = null;
+				repoFlags |= IRepositoryManager.REPOSITORIES_LOCAL;
+				break;
+			default :
+				repositoryFilter = repoLocation;
+				break;
+		}
+		updateAvailableViewState();
+		filteredTree.clearCheckStateCache();
+	}
+
+	private IPreFilterJobProvider getPreFilterJobProvider() {
+		return new IPreFilterJobProvider() {
+
+			public Job getPreFilterJob() {
+				switch (filterConstant) {
+					case AVAILABLE_ALL :
+						Job preFilterJob = new LoadMetadataRepositoryJob(getProvisioningUI());
+						preFilterJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
+						return preFilterJob;
+					case AVAILABLE_NONE :
+					case AVAILABLE_LOCAL :
+						return null;
+					default :
+						if (repositoryFilter == null)
+							return null;
+						Job job = new Job("Repository Load Job") { //$NON-NLS-1$
+							@Override
+							protected IStatus run(IProgressMonitor monitor) {
+								try {
+									getProvisioningUI().loadMetadataRepository(repositoryFilter, false, monitor);
+									return Status.OK_STATUS;
+								} catch (ProvisionException e) {
+									return e.getStatus();
+								}
+							}
+
+						};
+						job.setPriority(Job.SHORT);
+						return job;
+				}
+			}
+
+		};
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
index 4d46c43..502f86a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
@@ -12,9 +12,8 @@ package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
 import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.ui.dialogs.PatternFilter;
 
@@ -36,7 +35,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
 	public AvailableIUPatternFilter(IUColumnConfig[] columnConfig) {
 		super();
 		for (int i = 0; i < columnConfig.length; i++) {
-			int field = columnConfig[i].columnField;
+			int field = columnConfig[i].getColumnType();
 			if (field == IUColumnConfig.COLUMN_ID)
 				checkId = true;
 			else if (field == IUColumnConfig.COLUMN_NAME)
@@ -91,7 +90,7 @@ public class AvailableIUPatternFilter extends PatternFilter {
 			IInstallableUnit iu = ((IIUElement) element).getIU();
 			if (checkName) {
 				// Get the iu name in the default locale
-				text = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
+				text = iu.getProperty(IInstallableUnit.PROP_NAME, null);
 				if (text != null && wordMatches(text))
 					return true;
 			}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
index 76286b9..a2fa766 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,28 +8,25 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.*;
 import org.eclipse.equinox.internal.p2.ui.model.EmptyElementExplanation;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.StructuredViewerProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.*;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.dnd.*;
@@ -50,10 +47,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 	private static final String DETAILS_WEIGHT = "AvailableDetailsSashWeight"; //$NON-NLS-1$
 	private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
 
-	String profileId;
-	Policy policy;
 	Object[] initialSelections;
-	QueryableMetadataRepositoryManager manager;
 	IUViewQueryContext queryContext;
 	AvailableIUGroup availableIUGroup;
 	Composite availableIUButtonBar;
@@ -66,12 +60,10 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 	int batchCount = 0;
 	RepositorySelectionGroup repoSelector;
 	IUDetailsGroup iuDetailsGroup;
+	Label selectionCount;
 
-	public AvailableIUsPage(Policy policy, String profileId, QueryableMetadataRepositoryManager manager) {
-		super("AvailableSoftwarePage"); //$NON-NLS-1$
-		this.policy = policy;
-		this.profileId = profileId;
-		this.manager = manager;
+	public AvailableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+		super("AvailableSoftwarePage", ui, wizard); //$NON-NLS-1$
 		makeQueryContext();
 		setTitle(ProvUIMessages.AvailableIUsPage_Title);
 		setDescription(ProvUIMessages.AvailableIUsPage_Description);
@@ -102,16 +94,22 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		GridData data = new GridData(GridData.FILL_BOTH);
 		sashForm.setLayoutData(data);
 
+		Composite aboveSash = new Composite(sashForm, SWT.NONE);
+		GridLayout grid = new GridLayout();
+		grid.marginWidth = 0;
+		grid.marginHeight = 0;
+		aboveSash.setLayout(grid);
+
 		// Now the available group 
-		// If we have a repository manipulator, we want to default to showing no repos.  Otherwise all.
+		// If repositories are visible, we want to default to showing no repos.  Otherwise all.
 		int filterConstant = AvailableIUGroup.AVAILABLE_NONE;
-		if (policy.getRepositoryManipulator() == null)
+		if (!getPolicy().getRepositoriesVisible())
 			filterConstant = AvailableIUGroup.AVAILABLE_ALL;
-		nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
-		versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
+		nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH + 15);
+		versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
 
 		getColumnWidthsFromSettings();
-		availableIUGroup = new AvailableIUGroup(policy, sashForm, JFaceResources.getDialogFont(), manager, queryContext, new IUColumnConfig[] {nameColumn, versionColumn}, filterConstant);
+		availableIUGroup = new AvailableIUGroup(getProvisioningUI(), aboveSash, JFaceResources.getDialogFont(), queryContext, new IUColumnConfig[] {nameColumn, versionColumn}, filterConstant);
 
 		// Selection listeners must be registered on both the normal selection
 		// events and the check mark events.  Must be done after buttons 
@@ -125,7 +123,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 
 		availableIUGroup.getCheckboxTreeViewer().addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
-				validateNextButton();
+				updateSelection();
 			}
 		});
 
@@ -135,6 +133,9 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		setDropTarget(availableIUGroup.getStructuredViewer().getControl());
 		activateCopy(availableIUGroup.getStructuredViewer().getControl());
 
+		// select buttons
+		createSelectButtons(aboveSash);
+
 		// Details area
 		iuDetailsGroup = new IUDetailsGroup(sashForm, availableIUGroup.getStructuredViewer(), SWT.DEFAULT, true);
 
@@ -162,6 +163,66 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 			}
 
 		});
+		Dialog.applyDialogFont(composite);
+	}
+
+	private void createSelectButtons(Composite parent) {
+		Composite buttonParent = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.numColumns = 3;
+		gridLayout.marginWidth = 0;
+		gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		buttonParent.setLayout(gridLayout);
+
+		GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+		buttonParent.setLayoutData(data);
+
+		Button selectAll = new Button(buttonParent, SWT.PUSH);
+		selectAll.setText(ProvUIMessages.SelectableIUsPage_Select_All);
+		setButtonLayoutData(selectAll);
+		selectAll.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				setAllChecked(true);
+			}
+		});
+
+		Button deselectAll = new Button(buttonParent, SWT.PUSH);
+		deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
+		setButtonLayoutData(deselectAll);
+		deselectAll.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				setAllChecked(false);
+			}
+		});
+
+		// dummy to take extra space
+		selectionCount = new Label(buttonParent, SWT.NONE);
+		data = new GridData(SWT.FILL, SWT.CENTER, true, true);
+		data.horizontalIndent = 20; // breathing room
+		selectionCount.setLayoutData(data);
+
+		// separator underneath
+		Label sep = new Label(buttonParent, SWT.HORIZONTAL | SWT.SEPARATOR);
+		data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+		data.horizontalSpan = 3;
+		sep.setLayoutData(data);
+	}
+
+	// The viewer method is deprecated because it only applies to visible items,
+	// but this is exactly the behavior we want.
+	@SuppressWarnings("deprecation")
+	void setAllChecked(boolean checked) {
+		if (checked) {
+			// TODO ideally there should be API on AvailableIUGroup to do this.
+			// This is reachy and too knowledgeable of the group's implementation.
+			availableIUGroup.getCheckboxTreeViewer().setAllChecked(checked);
+			// to ensure that the listeners get processed.
+			availableIUGroup.setChecked(availableIUGroup.getCheckboxTreeViewer().getCheckedElements());
+
+		} else {
+			availableIUGroup.setChecked(new Object[0]);
+		}
+		updateSelection();
 	}
 
 	private void createViewControlsArea(Composite parent) {
@@ -216,7 +277,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		}, ProvUIMessages.AvailableIUsPage_GotoInstallInfo);
 		installLink.setLayoutData(gd);
 
-		if (policy.getRepositoryManipulator() != null) {
+		if (getPolicy().getRepositoriesVisible()) {
 			// Checkbox
 			resolveAllCheckbox = new Button(parent, SWT.CHECK);
 			resolveAllCheckbox.setText(ProvUIMessages.AvailableIUsPage_ResolveAllCheckbox);
@@ -229,13 +290,28 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 	private void createRepoArea(Composite parent) {
 		// Site controls are only available if a repository manipulator
 		// is specified.
-		if (policy.getRepositoryManipulator() != null) {
-			repoSelector = new RepositorySelectionGroup(getContainer(), parent, policy, queryContext);
+		if (getPolicy().getRepositoriesVisible()) {
+			repoSelector = new RepositorySelectionGroup(getProvisioningUI(), getContainer(), parent, queryContext);
 			repoSelector.addRepositorySelectionListener(new IRepositorySelectionListener() {
 				public void repositorySelectionChanged(int repoChoice, URI repoLocation) {
 					repoComboSelectionChanged(repoChoice, repoLocation);
 				}
 			});
+			// The ProvisioningOperationWizard signals the start of a repository operation as a way
+			// to keep side-effect events from changing the selections or state of the wizard.
+			// This is the one case where we want to respond to repo events, because we are
+			// launching the repo manipulation page from the wizard.  So we signal the wizard's
+			// operation as complete and then resignal the start when done.
+			// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277265#c38
+			repoSelector.setRepositoryManipulationHook(new IRepositoryManipulationHook() {
+				public void preManipulateRepositories() {
+					getProvisioningUI().signalRepositoryOperationComplete(null, false);
+				}
+
+				public void postManipulateRepositories() {
+					getProvisioningUI().signalRepositoryOperationStart();
+				}
+			});
 		}
 	}
 
@@ -246,20 +322,28 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 			setDescription(ProvUIMessages.AvailableIUsPage_Description);
 		}
 		availableIUGroup.setRepositoryFilter(repoChoice, repoLocation);
-		validateNextButton();
+		updateSelection();
 	}
 
-	void validateNextButton() {
-		setPageComplete(availableIUGroup.getCheckedLeafIUs().length > 0);
+	void updateSelection() {
+		int count = availableIUGroup.getCheckedLeafIUs().length;
+		setPageComplete(count > 0);
+		if (count == 0)
+			selectionCount.setText(""); //$NON-NLS-1$
+		else {
+			String message = count == 1 ? ProvUIMessages.AvailableIUsPage_SingleSelectionCount : ProvUIMessages.AvailableIUsPage_MultipleSelectionCount;
+			selectionCount.setText(NLS.bind(message, Integer.toString(count)));
+		}
+		getProvisioningWizard().operationSelectionsChanged(this);
 	}
 
 	void updateQueryContext() {
 		queryContext.setShowLatestVersionsOnly(showLatestVersionsCheckbox.getSelection());
 		if (hideInstalledCheckbox.getSelection())
-			queryContext.hideAlreadyInstalled(profileId);
+			queryContext.hideAlreadyInstalled(getProfileId());
 		else {
 			queryContext.showAlreadyInstalled();
-			queryContext.setInstalledProfileId(profileId);
+			queryContext.setInstalledProfileId(getProfileId());
 		}
 		if (useCategoriesCheckbox.getSelection())
 			queryContext.setViewType(IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY);
@@ -293,10 +377,10 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 	}
 
 	private void setDropTarget(Control control) {
-		if (policy.getRepositoryManipulator() != null) {
+		if (getPolicy().getRepositoriesVisible()) {
 			DropTarget target = new DropTarget(control, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
 			target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
-			target.addDropListener(new RepositoryManipulatorDropTarget(policy.getRepositoryManipulator(), control));
+			target.addDropListener(new RepositoryManipulatorDropTarget(getProvisioningUI(), control));
 		}
 	}
 
@@ -319,7 +403,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 			focusControl.setFocus();
 		updateDetails();
 		iuDetailsGroup.enablePropertyLink(availableIUGroup.getSelectedIUElements().length == 1);
-		validateNextButton();
+		updateSelection();
 
 		if (repoSelector != null) {
 			repoSelector.setRepositorySelection(AvailableIUGroup.AVAILABLE_NONE, null);
@@ -342,18 +426,14 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 
 	private void makeQueryContext() {
 		// Make a local query context that is based on the default.
-		IUViewQueryContext defaultQueryContext = policy.getQueryContext();
+		IUViewQueryContext defaultQueryContext = ProvUI.getQueryContext(getPolicy());
 		queryContext = new IUViewQueryContext(defaultQueryContext.getViewType());
-		queryContext.setArtifactRepositoryFlags(defaultQueryContext.getArtifactRepositoryFlags());
-		queryContext.setMetadataRepositoryFlags(defaultQueryContext.getMetadataRepositoryFlags());
 		if (defaultQueryContext.getHideAlreadyInstalled()) {
-			queryContext.hideAlreadyInstalled(profileId);
+			queryContext.hideAlreadyInstalled(getProfileId());
 		} else {
-			queryContext.setInstalledProfileId(profileId);
+			queryContext.setInstalledProfileId(getProfileId());
 		}
 		queryContext.setShowLatestVersionsOnly(defaultQueryContext.getShowLatestVersionsOnly());
-		queryContext.setVisibleAvailableIUProperty(defaultQueryContext.getVisibleAvailableIUProperty());
-		queryContext.setVisibleInstalledIUProperty(defaultQueryContext.getVisibleInstalledIUProperty());
 		// Now check for saved away dialog settings
 		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
 		IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
@@ -377,9 +457,9 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 			// Hide installed content
 			boolean hideContent = section.getBoolean(HIDE_INSTALLED_IUS);
 			if (hideContent)
-				queryContext.hideAlreadyInstalled(profileId);
+				queryContext.hideAlreadyInstalled(getProfileId());
 			else {
-				queryContext.setInstalledProfileId(profileId);
+				queryContext.setInstalledProfileId(getProfileId());
 				queryContext.showAlreadyInstalled();
 			}
 		}
@@ -391,9 +471,9 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		if (section != null) {
 			try {
 				if (section.get(NAME_COLUMN_WIDTH) != null)
-					nameColumn.columnWidth = section.getInt(NAME_COLUMN_WIDTH);
+					nameColumn.setWidthInPixels(section.getInt(NAME_COLUMN_WIDTH));
 				if (section.get(VERSION_COLUMN_WIDTH) != null)
-					versionColumn.columnWidth = section.getInt(VERSION_COLUMN_WIDTH);
+					versionColumn.setWidthInPixels(section.getInt(VERSION_COLUMN_WIDTH));
 			} catch (NumberFormatException e) {
 				// Ignore if there actually was a value that didn't parse.  
 			}
@@ -456,20 +536,20 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		}
 
 		// Now look for IU's
-		IInstallableUnit[] selected = getSelectedIUs();
-		if (selected.length == 1) {
+		java.util.List<IInstallableUnit> selected = getSelectedIUs();
+		if (selected.size() == 1) {
 			StringBuffer result = new StringBuffer();
-			String description = IUPropertyUtils.getIUProperty(selected[0], IInstallableUnit.PROP_DESCRIPTION);
+			String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
 			if (description != null) {
 				result.append(description);
 			} else {
-				String name = IUPropertyUtils.getIUProperty(selected[0], IInstallableUnit.PROP_NAME);
+				String name = selected.get(0).getProperty(IInstallableUnit.PROP_NAME, null);
 				if (name != null)
 					result.append(name);
 				else
-					result.append(selected[0].getId());
+					result.append(selected.get(0).getId());
 				result.append(" "); //$NON-NLS-1$
-				result.append(selected[0].getVersion().toString());
+				result.append(selected.get(0).getVersion().toString());
 			}
 
 			iuDetailsGroup.setDetailText(result.toString());
@@ -478,7 +558,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		iuDetailsGroup.setDetailText(""); //$NON-NLS-1$
 	}
 
-	public IInstallableUnit[] getSelectedIUs() {
+	public java.util.List<IInstallableUnit> getSelectedIUs() {
 		return availableIUGroup.getSelectedIUs();
 	}
 
@@ -537,7 +617,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 		// We might need to adjust the content of the available IU group's viewer
 		// according to installation changes.  We want to be very selective about refreshing,
 		// because the viewer has its own listeners installed.
-		profileListener = new StructuredViewerProvisioningListener(availableIUGroup.getStructuredViewer(), ProvUIProvisioningListener.PROV_EVENT_PROFILE) {
+		profileListener = new StructuredViewerProvisioningListener(getClass().getName(), availableIUGroup.getStructuredViewer(), ProvUIProvisioningListener.PROV_EVENT_PROFILE) {
 			protected void profileAdded(String id) {
 				// do nothing
 			}
@@ -547,8 +627,8 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 			}
 
 			protected void profileChanged(String id) {
-				if (id.equals(profileId)) {
-					asyncRefresh();
+				if (id.equals(getProfileId())) {
+					safeRefresh();
 				}
 			}
 		};
@@ -572,13 +652,13 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
 
 	public ProvisioningContext getProvisioningContext() {
 		// If the user can't manipulate repos, always resolve against everything
-		if (policy.getRepositoryManipulator() == null || repoSelector == null) {
-			return new ProvisioningContext();
+		if (!getPolicy().getRepositoriesVisible() || repoSelector == null) {
+			return new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
 		}
 		// Consult the checkbox to see if we should resolve against everything,
 		// or use the combo to determine what to do.
 		if (resolveAllCheckbox.getSelection())
-			return new ProvisioningContext();
+			return new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
 		// Use the contents of the combo to determine the context
 		return repoSelector.getProvisioningContext();
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
index 34cb29a..62d1124 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
@@ -54,7 +54,7 @@ public class ComboAutoCompleteField {
 				if (contents.length() == 0 || items.length == 0)
 					return new IContentProposal[0];
 				StringMatcher matcher = new StringMatcher("*" + contents + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
-				ArrayList matches = new ArrayList();
+				ArrayList<String> matches = new ArrayList<String>();
 				for (int i = 0; i < items.length; i++)
 					if (matcher.match(items[i]))
 						matches.add(items[i]);
@@ -63,7 +63,7 @@ public class ComboAutoCompleteField {
 				// what is in the combo.  This prevents the popup from
 				// opening when the user is merely scrolling through the combo values or
 				// has accepted a combo value.
-				if (matches.size() == 1 && ((String) matches.get(0)).equals(combo.getText()))
+				if (matches.size() == 1 && matches.get(0).equals(combo.getText()))
 					return new IContentProposal[0];
 
 				if (matches.isEmpty())
@@ -72,7 +72,7 @@ public class ComboAutoCompleteField {
 				// Make the proposals
 				IContentProposal[] proposals = new IContentProposal[matches.size()];
 				for (int i = 0; i < matches.size(); i++) {
-					final String proposal = (String) matches.get(i);
+					final String proposal = matches.get(i);
 					proposals[i] = new IContentProposal() {
 
 						public String getContent() {
@@ -367,7 +367,7 @@ public class ComboAutoCompleteField {
 				}
 			}
 
-			Vector temp = new Vector();
+			Vector<String> temp = new Vector<String>();
 
 			int pos = 0;
 			StringBuffer buf = new StringBuffer();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
index b130cf4..fef8274 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
@@ -52,7 +52,7 @@ import org.eclipse.swt.widgets.*;
 public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
 
 	private boolean rippleCheckMarks = true;
-	private ArrayList savedCheckState;
+	private ArrayList<Object> savedCheckState;
 
 	/**
 	 * Constructor for ContainerCheckedTreeViewer.
@@ -219,7 +219,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
 	public Object[] getCheckedElements() {
 		Object[] checked = super.getCheckedElements();
 		// add all items that are children of a checked node but not created yet
-		ArrayList result = new ArrayList();
+		ArrayList<Object> result = new ArrayList<Object>();
 		for (int i = 0; i < checked.length; i++) {
 			Object curr = checked[i];
 			result.add(curr);
@@ -241,7 +241,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
 	 * @param element
 	 * @param result
 	 */
-	private void collectChildren(Object element, ArrayList result) {
+	private void collectChildren(Object element, ArrayList<Object> result) {
 		Object[] filteredChildren = getFilteredChildren(element);
 		for (int i = 0; i < filteredChildren.length; i++) {
 			Object curr = filteredChildren[i];
@@ -276,7 +276,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
 	// problem.
 	private void saveCheckedState() {
 		Object[] checked = getCheckedElements();
-		savedCheckState = new ArrayList(checked.length);
+		savedCheckState = new ArrayList<Object>(checked.length);
 		for (int i = 0; i < checked.length; i++)
 			if (!isExpandable(checked[i]) && !getGrayed(checked[i]))
 				savedCheckState.add(checked[i]);
@@ -288,7 +288,7 @@ public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
 		setGrayedElements(new Object[0]);
 		Object element = null;
 		// We are assuming that once a leaf, always a leaf.
-		Iterator iter = savedCheckState.iterator();
+		Iterator<Object> iter = savedCheckState.iterator();
 		while (iter.hasNext()) {
 			element = iter.next();
 			setChecked(element, true);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
index 1337a8d..6502568 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
@@ -13,6 +13,7 @@ package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.equinox.p2.ui.ICopyable;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.ISources;
 import org.eclipse.ui.handlers.HandlerUtil;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
index 98cf824..daa80f7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
@@ -11,6 +11,7 @@
 
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
+import org.eclipse.equinox.p2.ui.ICopyable;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
index b34874a..d3e03e5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
@@ -14,6 +14,7 @@ package org.eclipse.equinox.internal.p2.ui.dialogs;
 import org.eclipse.core.expressions.*;
 import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
 import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
+import org.eclipse.equinox.p2.ui.ICopyable;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.widgets.Control;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
index 56de63a..296faa0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
@@ -11,14 +11,9 @@
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import java.util.*;
-import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
 import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
 import org.eclipse.equinox.internal.p2.ui.viewers.IInputChangeListener;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -39,23 +34,25 @@ import org.eclipse.ui.progress.WorkbenchJob;
  */
 public class DelayedFilterCheckboxTree extends FilteredTree {
 
-	private static final String LOAD_JOB_NAME = ProvUIMessages.DeferredFetchFilteredTree_RetrievingList;
 	private static final long FILTER_DELAY = 400;
 
+	public static final Object ALL_ITEMS_HACK = new Object();
+
 	ToolBar toolBar;
 	Display display;
 	PatternFilter patternFilter;
+	IPreFilterJobProvider jobProvider;
 	DeferredQueryContentProvider contentProvider;
 	String savedFilterText;
-	Job loadJob;
+	Job preFilterJob;
 	WorkbenchJob filterJob;
 	boolean ignoreFiltering = true;
 	Object viewerInput;
-	ArrayList checkState = new ArrayList();
-	Set expanded = new HashSet();
+	ArrayList<Object> checkState = new ArrayList<Object>();
+	Set<Object> expanded = new HashSet<Object>();
 	ContainerCheckedTreeViewer checkboxViewer;
 
-	public DelayedFilterCheckboxTree(Composite parent, int treeStyle, PatternFilter filter) {
+	public DelayedFilterCheckboxTree(Composite parent, int treeStyle, PatternFilter filter, IPreFilterJobProvider jobProvider) {
 		super(parent, true);
 		this.display = parent.getDisplay();
 		this.patternFilter = filter;
@@ -69,18 +66,39 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 				// We use an additive check state cache so we need to remove
 				// previously checked items if the user unchecked them.
 				if (!event.getChecked() && checkState != null) {
-					Iterator iter = checkState.iterator();
-					ArrayList toRemove = new ArrayList(1);
-					while (iter.hasNext()) {
-						Object element = iter.next();
-						if (checkboxViewer.getComparer().equals(element, event.getElement())) {
-							toRemove.add(element);
-							// Do not break out of the loop.  We may have duplicate equal
-							// elements in the cache.  Since the cache is additive, we want
-							// to be sure we've gotten everything.
+					if (event.getElement() == ALL_ITEMS_HACK)
+						clearCheckStateCache();
+					else {
+						ArrayList<Object> toRemove = new ArrayList<Object>(1);
+						// See bug 258117.  Ideally we would get check state changes 
+						// for children when the parent state changed, but we aren't, so
+						// we need to remove all children from the additive check state
+						// cache.
+						if (contentProvider.hasChildren(event.getElement())) {
+							Set<Object> unchecked = new HashSet<Object>();
+							Object[] children = contentProvider.getChildren(event.getElement());
+							for (int i = 0; i < children.length; i++) {
+								unchecked.add(children[i]);
+							}
+							Iterator<Object> iter = checkState.iterator();
+							while (iter.hasNext()) {
+								Object current = iter.next();
+								if (current != null && unchecked.contains(current)) {
+									toRemove.add(current);
+								}
+							}
+						} else {
+							for (Object element : checkState) {
+								if (checkboxViewer.getComparer().equals(element, event.getElement())) {
+									toRemove.add(element);
+									// Do not break out of the loop.  We may have duplicate equal
+									// elements in the cache.  Since the cache is additive, we want
+									// to be sure we've gotten everything.
+								}
+							}
 						}
+						checkState.removeAll(toRemove);
 					}
-					checkState.removeAll(toRemove);
 				} else if (event.getChecked()) {
 					rememberLeafCheckState();
 				}
@@ -93,7 +111,7 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 		super.createFilterControls(filterParent);
 		filterParent.addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
-				cancelLoadJob();
+				cancelPreFilterJob();
 			}
 		});
 		return filterParent;
@@ -103,14 +121,15 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 		this.contentProvider = deferredProvider;
 		deferredProvider.addListener(new IInputChangeListener() {
 			public void inputChanged(Viewer v, Object oldInput, Object newInput) {
-				if (newInput == null)
+				if (newInput == null) {
 					return;
+				}
 				// Store the input because it's not reset in the viewer until
 				// after this listener is run.
 				viewerInput = newInput;
 
 				// If we were loading repos, we want to cancel because there may be more.
-				cancelLoadJob();
+				cancelPreFilterJob();
 				// Cancel any filtering
 				cancelAndResetFilterJob();
 				contentProvider.setSynchronous(false);
@@ -122,6 +141,8 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 				checkboxViewer.getTree().setRedraw(false);
 				display.asyncExec(new Runnable() {
 					public void run() {
+						if (checkboxViewer.getTree().isDisposed())
+							return;
 						rememberExpansions();
 						restoreLeafCheckState();
 						rememberExpansions();
@@ -150,35 +171,34 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 				// If we know we've already filtered and loaded repos, nothing more to do
 				if (!ignoreFiltering)
 					return;
-				final boolean[] shouldLoad = new boolean[1];
-				shouldLoad[0] = false;
+				final boolean[] shouldPreFilter = new boolean[1];
+				shouldPreFilter[0] = false;
 				display.syncExec(new Runnable() {
 					public void run() {
 						if (filterText != null && !filterText.isDisposed()) {
 							String text = getFilterString();
 							// If we are about to filter and there is
-							// actually filtering to do, force a load
-							// of the input and set the content
-							// provider to synchronous mode.  We want the
-							// load job to complete before continuing with filtering.
+							// actually filtering to do, check for a prefilter
+							// job and the content  provider to synchronous mode.
+							// We want the prefilter job to complete before continuing with filtering.
 							if (text == null || (initialText != null && initialText.equals(text)))
 								return;
-							if (!contentProvider.getSynchronous() && loadJob == null) {
+							if (!contentProvider.getSynchronous() && preFilterJob == null) {
 								if (filterText != null && !filterText.isDisposed()) {
-									shouldLoad[0] = true;
+									shouldPreFilter[0] = true;
 								}
 							}
 						}
 					}
 				});
-				if (shouldLoad[0]) {
+				if (shouldPreFilter[0]) {
 					event.getJob().sleep();
-					scheduleLoadJob();
+					schedulePreFilterJob();
 				} else if (ignoreFiltering) {
 					event.getJob().sleep();
 				} else {
-					// shouldn't get here unless the load job finished and ignoreFiltering became false 
-					// since we entered this listener.
+					// shouldn't get here unless the prefilter job finished 
+					// and ignoreFiltering became false since we entered this listener.
 					rememberLeafCheckState();
 				}
 			}
@@ -195,6 +215,9 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 				if (event.getResult().isOK()) {
 					display.asyncExec(new Runnable() {
 						public void run() {
+							if (checkboxViewer.getTree().isDisposed())
+								return;
+
 							checkboxViewer.getTree().setRedraw(false);
 							// remember things expanded by the filter
 							rememberExpansions();
@@ -211,48 +234,35 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 		return filterJob;
 	}
 
-	void scheduleLoadJob() {
-		if (loadJob != null)
+	void schedulePreFilterJob() {
+		// cancel any existing jobs
+		cancelPreFilterJob();
+		ignoreFiltering = false;
+		preFilterJob = jobProvider == null ? null : jobProvider.getPreFilterJob();
+		if (preFilterJob == null) {
+			if (filterJob != null)
+				filterJob.wakeUp();
 			return;
-		loadJob = new Job(LOAD_JOB_NAME) {
-			protected IStatus run(IProgressMonitor monitor) {
-				QueryableMetadataRepositoryManager q = null;
-				if (viewerInput instanceof QueryableMetadataRepositoryManager)
-					q = (QueryableMetadataRepositoryManager) viewerInput;
-				else if (viewerInput instanceof QueriedElement && ((QueriedElement) viewerInput).getQueryable() instanceof QueryableMetadataRepositoryManager)
-					q = (QueryableMetadataRepositoryManager) ((QueriedElement) viewerInput).getQueryable();
-				if (q != null) {
-					q.loadAll(monitor);
-					q.reportAccumulatedStatus();
-				}
-				if (monitor.isCanceled())
-					return Status.CANCEL_STATUS;
-				return Status.OK_STATUS;
-			}
-		};
-		loadJob.addJobChangeListener(new JobChangeAdapter() {
+		}
+		ignoreFiltering = true;
+		preFilterJob.addJobChangeListener(new JobChangeAdapter() {
 			public void done(IJobChangeEvent event) {
-				if (event.getResult().isOK()) {
-					contentProvider.setSynchronous(true);
-					ignoreFiltering = false;
-					if (filterJob != null)
-						filterJob.wakeUp();
-				}
-				loadJob = null;
+				ignoreFiltering = false;
+				contentProvider.setSynchronous(true);
+				if (filterJob != null)
+					filterJob.wakeUp();
+				preFilterJob = null;
 			}
 		});
-		loadJob.setSystem(true);
-		loadJob.setUser(false);
-		// Telling the operation runner about it ensures that listeners know we are running
-		// a provisioning-related job.
-		ProvisioningOperationRunner.manageJob(loadJob);
-		loadJob.schedule();
+		preFilterJob.setSystem(true);
+		preFilterJob.setUser(false);
+		preFilterJob.schedule();
 	}
 
-	void cancelLoadJob() {
-		if (loadJob != null) {
-			loadJob.cancel();
-			loadJob = null;
+	void cancelPreFilterJob() {
+		if (preFilterJob != null) {
+			preFilterJob.cancel();
+			preFilterJob = null;
 		}
 	}
 
@@ -260,14 +270,13 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 		if (filterJob != null) {
 			filterJob.cancel();
 		}
-		ignoreFiltering = true;
 	}
 
 	void rememberLeafCheckState() {
 		ContainerCheckedTreeViewer v = (ContainerCheckedTreeViewer) getViewer();
 		Object[] checked = v.getCheckedElements();
 		if (checkState == null)
-			checkState = new ArrayList(checked.length);
+			checkState = new ArrayList<Object>(checked.length);
 		for (int i = 0; i < checked.length; i++)
 			if (!v.getGrayed(checked[i]) && contentProvider.getChildren(checked[i]).length == 0)
 				if (!checkState.contains(checked[i]))
@@ -284,7 +293,7 @@ public class DelayedFilterCheckboxTree extends FilteredTree {
 		checkboxViewer.setGrayedElements(new Object[0]);
 		// Now we are only going to set the check state of the leaf nodes
 		// and rely on our container checked code to update the parents properly.
-		Iterator iter = checkState.iterator();
+		Iterator<Object> iter = checkState.iterator();
 		Object element = null;
 		if (iter.hasNext())
 			checkboxViewer.expandAll();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ICopyable.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ICopyable.java
deleted file mode 100644
index aec0065..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ICopyable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.swt.widgets.Control;
-
-/**
- * ICopyable defines an interface for UI elements that provide
- * copy support.
- * 
- * @since 3.5
- */
-public interface ICopyable {
-	public void copyToClipboard(Control activeControl);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java
index b547b45..7867624 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java
@@ -17,14 +17,17 @@ package org.eclipse.equinox.internal.p2.ui.dialogs;
  * 
  * This interface is not intended to be implemented
  * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
  * @since 3.5
  */
 public interface ILayoutConstants {
 	public static final int DEFAULT_DESCRIPTION_HEIGHT = 4;
 	public static final int MINIMUM_DESCRIPTION_HEIGHT = 1;
 	public static final int DEFAULT_SITEDETAILS_HEIGHT = 2;
+	public static final int DEFAULT_PRIMARY_COLUMN_WIDTH = 60;
 	public static final int DEFAULT_COLUMN_WIDTH = 40;
-	public static final int DEFAULT_SMALL_COLUMN_WIDTH = 10;
+	public static final int DEFAULT_SMALL_COLUMN_WIDTH = 20;
 	public static final int DEFAULT_TABLE_HEIGHT = 10;
 	public static final int DEFAULT_TABLE_WIDTH = 80;
 	public static final int[] IUS_TO_DETAILS_WEIGHTS = new int[] {80, 20};
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
new file mode 100644
index 0000000..b4e72b8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * IPreFilterJobProvider provides an optional job that must be run before
+ * filtering can be allowed to occur in a filtered tree.  The client is assumed
+ * to have set the expected job priority.
+ * 
+ */
+public interface IPreFilterJobProvider {
+	public Job getPreFilterJob();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
new file mode 100644
index 0000000..fe9e167
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+
+/**
+ * IRepositoryManipulationHood defines callbacks that are called when the
+ * UI is manipulating repositories.
+ */
+public interface IRepositoryManipulationHook {
+	public void preManipulateRepositories();
+
+	public void postManipulateRepositories();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java
new file mode 100644
index 0000000..fdbdd19
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.URI;
+
+/**
+ * Listener for the repository selection combo.  Whenever the selected repository changes (menu selection, 
+ * text modified, new repo added) this listener will be notified.
+ * 
+ * @since 3.5
+ */
+public interface IRepositorySelectionListener {
+	/**
+	 * Called whenever the selected repository in the combo changes.
+	 * 
+	 * @param repoChoice one of AvailableIUGroup.AVAILABLE_NONE, AvailableIUGroup.AVAILABLE_ALL, AvailableIUGroup.AVAILABLE_LOCAL, AvailableIUGroup.AVAILABLE_SPECIFIED  
+	 * @param repoLocation if the repoChoice is set to AvailableIUGroup.AVAILABLE_SPECIFIED, this field will contain the URI of the selected repo, otherwise <code>null</code>
+	 */
+	public void repositorySelectionChanged(int repoChoice, URI repoLocation);
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
index 1646cea..9b62a6c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
@@ -11,9 +11,8 @@
 
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
 
 /**
  * 
@@ -24,5 +23,5 @@ import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResoluti
  *
  */
 public interface IResolutionErrorReportingPage extends ISelectableIUsPage {
-	public void updateStatus(IUElementListRoot root, PlannerResolutionOperation resolvedOperation);
+	public void updateStatus(IUElementListRoot root, ProfileChangeOperation operation);
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
new file mode 100644
index 0000000..6eebf3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.MalformedURLException;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.metadata.ICopyright;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * PropertyPage that shows an IU's copyright
+ * 
+ * @since 3.4
+ */
+public class IUCopyrightPropertyPage extends IUPropertyPage {
+
+	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
+		// Get the copyright in the current locale
+		final ICopyright copyright = iu.getCopyright(null);
+		if (copyright != null && copyright.getBody().length() > 0) {
+			Composite composite = new Composite(parent, SWT.NONE);
+			GridLayout layout = new GridLayout();
+			layout.marginWidth = 0;
+			layout.marginHeight = 0;
+			composite.setLayout(layout);
+
+			Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, false, true);
+			gd.widthHint = computeWidthLimit(text, 80);
+			gd.grabExcessVerticalSpace = true;
+			text.setLayoutData(gd);
+			text.setText(copyright.getBody());
+			text.setEditable(false);
+
+			// If an URL was specified, provide a link to it
+			String filename = (copyright.getLocation() != null) ? copyright.getLocation().getPath() : null;
+			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
+				Label label = new Label(composite, SWT.NONE);
+				label.setText(ProvUIMessages.IUCopyrightPropertyPage_ViewLinkLabel);
+				// Create a link to the copyright URL
+				Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
+				link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(copyright.getLocation()))); //$NON-NLS-1$
+				gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
+				gd.widthHint = computeWidthLimit(link, 80);
+				link.setLayoutData(gd);
+				link.addSelectionListener(new SelectionAdapter() {
+					public void widgetSelected(SelectionEvent e) {
+						try {
+							showURL(copyright.getLocation().toURL());
+						} catch (MalformedURLException e1) {
+							//cannot show this URL
+						}
+					}
+				});
+			}
+
+			return composite;
+		}
+		Label label = new Label(parent, SWT.NULL);
+		label.setText(ProvUIMessages.IUCopyrightPropertyPage_NoCopyright);
+		return label;
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
index 733c36c..8ae5ffe 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
@@ -11,7 +11,7 @@
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.PropertyDialogAction;
+import org.eclipse.equinox.internal.p2.ui.actions.PropertyDialogAction;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
new file mode 100644
index 0000000..cca8915
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * PropertyPage that shows an IU's properties
+ * 
+ * @since 3.4
+ */
+public class IUGeneralInfoPropertyPage extends IUPropertyPage {
+
+	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+
+		createGeneralSection(composite, iu);
+		createDescriptionSection(composite, iu);
+		createDocumentationSection(composite, iu);
+
+		return composite;
+	}
+
+	private void createGeneralSection(Composite parent, IInstallableUnit iu) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		// Get general info in the default locale
+		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_NameLabel, iu.getProperty(IInstallableUnit.PROP_NAME, null));
+		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_IdentifierLabel, iu.getId());
+		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_VersionLabel, iu.getVersion().toString());
+		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ProviderLabel, iu.getProperty(IInstallableUnit.PROP_PROVIDER, null));
+		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ContactLabel, iu.getProperty(IInstallableUnit.PROP_CONTACT, null));
+
+	}
+
+	private void createDescriptionSection(Composite parent, IInstallableUnit iu) {
+		// Get the iu description in the default locale
+		String description = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+		if (description != null && description.length() > 0) {
+			Group group = new Group(parent, SWT.NONE);
+			group.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DescriptionLabel);
+			group.setLayout(new GridLayout());
+			group.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+			Text text = new Text(group, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+			gd.widthHint = computeWidthLimit(text, 80);
+			gd.heightHint = 200;
+			text.setEditable(false);
+			text.setText(description);
+			text.setLayoutData(gd);
+		}
+
+	}
+
+	private void createDocumentationSection(Composite parent, IInstallableUnit iu) {
+		String docURL = iu.getProperty(IInstallableUnit.PROP_DOC_URL);
+		if (docURL != null && docURL.length() > 0) {
+			final URL url;
+			try {
+				url = new URL(docURL);
+			} catch (MalformedURLException e) {
+				return;
+			}
+			String filename = (url != null) ? url.getFile() : null;
+			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
+				// create some space
+				new Label(parent, SWT.NONE);
+				// Now create a link to the documentation
+				Label label = new Label(parent, SWT.NONE);
+				label.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DocumentationLink);
+				Link link = new Link(parent, SWT.LEFT | SWT.WRAP);
+				link.setText(NLS.bind("<a>{0}</a>", url.toExternalForm())); //$NON-NLS-1$
+				GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
+				gd.widthHint = computeWidthLimit(link, 80);
+				link.setLayoutData(gd);
+				link.addSelectionListener(new SelectionAdapter() {
+					public void widgetSelected(SelectionEvent e) {
+						showURL(url);
+					}
+				});
+			}
+		}
+	}
+
+	private void addField(Composite parent, String property, String value) {
+
+		if (value != null && value.length() > 0) {
+			Label label = new Label(parent, SWT.NONE);
+			label.setText(property);
+
+			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
+			text.setText(getEscapedString(value));
+			// Needed to get the right color on the Mac.
+			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258112
+			text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+			text.setLayoutData(gd);
+		}
+	}
+
+	private String getEscapedString(String value) {
+		StringBuffer result = new StringBuffer(value.length() + 10);
+		for (int i = 0; i < value.length(); ++i) {
+			char c = value.charAt(i);
+			if ('&' == c) {
+				result.append("&&"); //$NON-NLS-1$
+			} else {
+				result.append(c);
+			}
+		}
+		return result.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
new file mode 100644
index 0000000..2f773c7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.util.Iterator;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * PropertyPage that shows an IU's license
+ * 
+ * @since 3.4
+ */
+public class IULicensePropertyPage extends IUPropertyPage {
+
+	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
+		// Get the license in the default locale
+		Iterator<ILicense> licenses = iu.getLicenses(null).iterator();
+		final ILicense license = licenses.hasNext() ? licenses.next() : null;
+		//FIXME
+		if (license != null && license.getBody().length() > 0) {
+			Composite composite = new Composite(parent, SWT.NONE);
+			GridLayout layout = new GridLayout();
+			layout.marginWidth = 0;
+			layout.marginHeight = 0;
+			composite.setLayout(layout);
+
+			Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+			gd.widthHint = computeWidthLimit(text, 80);
+			gd.heightHint = computeHeightLimit(text, 20);
+			text.setLayoutData(gd);
+			text.setText(license.getBody());
+			text.setEditable(false);
+
+			// If an URL was specified, provide a link to it
+			String filename = (license.getLocation() != null) ? license.getLocation().getPath() : null;
+			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
+				Label label = new Label(composite, SWT.NONE);
+				label.setText(ProvUIMessages.IULicensePropertyPage_ViewLicenseLabel);
+				// Create a link to the license URL
+				Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
+				link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(license.getLocation()))); //$NON-NLS-1$
+				gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
+				gd.widthHint = computeWidthLimit(link, 80);
+				link.setLayoutData(gd);
+				link.addSelectionListener(new SelectionAdapter() {
+					public void widgetSelected(SelectionEvent e) {
+						try {
+							showURL(license.getLocation().toURL());
+						} catch (Exception e1) {
+							//can't browse invalid location
+						}
+					}
+				});
+			}
+
+			return composite;
+		}
+		Label label = new Label(parent, SWT.NULL);
+		label.setText(ProvUIMessages.IULicensePropertyPage_NoLicense);
+		return label;
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
index 4c1a33c..5109868 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
@@ -11,9 +11,9 @@
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import java.net.URL;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.FontMetrics;
@@ -35,7 +35,7 @@ public abstract class IUPropertyPage extends PropertyPage {
 
 	protected Control createContents(Composite parent) {
 		noDefaultAndApplyButton();
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(getElement(), IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
 		Control control;
 		if (iu == null) {
 			Label label = new Label(parent, SWT.DEFAULT);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
new file mode 100644
index 0000000..142b788
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * An install wizard that allows the users to browse all of the repositories
+ * and search/select for items to install.
+ * 
+ * @since 3.6
+ */
+public class InstallWizard extends WizardWithLicenses {
+
+	SelectableIUsPage errorReportingPage;
+	boolean ignoreSelectionChanges = false;
+	IStatus installHandlerStatus;
+
+	public InstallWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
+		super(ui, operation, initialSelections == null ? null : initialSelections.toArray(), preloadJob);
+		setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
+		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
+	}
+
+	protected ResolutionResultsWizardPage createResolutionPage() {
+		return new InstallWizardPage(ui, this, root, (InstallOperation) operation);
+	}
+
+	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
+		mainPage = new AvailableIUsPage(ui, this);
+		if (selections != null && selections.length > 0)
+			mainPage.setCheckedElements(selections);
+		return mainPage;
+
+	}
+
+	protected void initializeResolutionModelElements(Object[] selectedElements) {
+		if (selectedElements == null)
+			return;
+		root = new IUElementListRoot();
+		ArrayList<AvailableIUElement> list = new ArrayList<AvailableIUElement>(selectedElements.length);
+		ArrayList<AvailableIUElement> selections = new ArrayList<AvailableIUElement>(selectedElements.length);
+		for (int i = 0; i < selectedElements.length; i++) {
+			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
+			if (iu != null) {
+				AvailableIUElement element = new AvailableIUElement(root, iu, getProfileId(), shouldShowProvisioningPlanChildren());
+				list.add(element);
+				selections.add(element);
+			}
+		}
+		root.setChildren(list.toArray());
+		planSelections = selections.toArray();
+	}
+
+	/*
+	 * Overridden to dynamically determine which page to get
+	 * selections from.  (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getOperationSelections()
+	 */
+	protected Object[] getOperationSelections() {
+		return getOperationSelectionsPage().getCheckedIUElements();
+	}
+
+	/*
+	 * Get the page that is driving operation selections.  This is
+	 * usually the main page, but it could be error page if there
+	 * was a resolution error and the user decides to change selections
+	 * and try again without going back.
+	 */
+	protected ISelectableIUsPage getOperationSelectionsPage() {
+		IWizardPage page = getContainer().getCurrentPage();
+		if (page instanceof ISelectableIUsPage)
+			return (ISelectableIUsPage) page;
+		// return the main page if we weren't on main or error page
+		return mainPage;
+	}
+
+	protected ProvisioningContext getProvisioningContext() {
+		return ((AvailableIUsPage) mainPage).getProvisioningContext();
+	}
+
+	protected IResolutionErrorReportingPage createErrorReportingPage() {
+		if (root == null)
+			errorReportingPage = new SelectableIUsPage(ui, this, null, null);
+		else
+			errorReportingPage = new SelectableIUsPage(ui, this, root, root.getChildren(root));
+		errorReportingPage.setTitle(ProvUIMessages.InstallWizardPage_Title);
+		errorReportingPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
+		errorReportingPage.updateStatus(root, operation);
+		return errorReportingPage;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
+		InstallOperation op = new InstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
+		op.setProfileId(getProfileId());
+		//		op.setRootMarkerKey(getRootMarkerKey());
+		return op;
+	}
+
+	protected boolean shouldUpdateErrorPageModelOnPlanChange() {
+		// We don't want the root of the error page to change unless we are on the
+		// main page.  For example, if we are on the error page, change checkmarks, and
+		// resolve again with an error, we wouldn't want the root items to change in the
+		// error page.
+		return getContainer().getCurrentPage() == mainPage && super.shouldUpdateErrorPageModelOnPlanChange();
+	}
+
+	protected void planChanged() {
+		super.planChanged();
+		synchSelections(getOperationSelectionsPage());
+	}
+
+	/*
+	 * overridden to ensure that the main page selections stay in synch
+	 * with changes to the error page.
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#operationSelectionsChanged(org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage)
+	 */
+	public void operationSelectionsChanged(ISelectableIUsPage page) {
+		if (ignoreSelectionChanges)
+			return;
+		super.operationSelectionsChanged(page);
+		// If we are on the error page, resolution has failed.
+		// Our ability to move on depends on whether the selections have changed.
+		// If they are the same selections, then we are not complete until selections are changed.
+		if (getOperationSelectionsPage() == errorPage)
+			((WizardPage) errorPage).setPageComplete(pageSelectionsHaveChanged(errorPage) && errorPage.getCheckedIUElements().length > 0);
+		synchSelections(page);
+	}
+
+	private void synchSelections(ISelectableIUsPage triggeringPage) {
+		// We don't want our programmatic changes to cause all this to happen again
+		ignoreSelectionChanges = true;
+		try {
+			if (triggeringPage == errorReportingPage) {
+				mainPage.setCheckedElements(triggeringPage.getCheckedIUElements());
+			} else if (triggeringPage == mainPage) {
+				errorReportingPage.setCheckedElements(triggeringPage.getCheckedIUElements());
+			}
+		} finally {
+			ignoreSelectionChanges = false;
+		}
+	}
+
+	/*
+	 * Overridden to check whether there are UpdateManager install handlers in the item
+	 * to be installed.  Operations don't know about this compatibility issue.
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getCurrentStatus()
+	 */
+	public IStatus getCurrentStatus() {
+		IStatus originalStatus = super.getCurrentStatus();
+		int sev = originalStatus.getSeverity();
+		// Use the previously computed status if the user cancelled or if we were already in error.
+		// If we don't have an operation or a plan, we can't check this condition either, so just
+		// use the normal status.
+		if (sev == IStatus.CANCEL || sev == IStatus.ERROR || operation == null || operation.getProvisioningPlan() == null) {
+			return originalStatus;
+		}
+		// Does the plan require install handler support?
+		installHandlerStatus = UpdateManagerCompatibility.getInstallHandlerStatus(operation.getProvisioningPlan());
+		if (!installHandlerStatus.isOK()) {
+			// Set the status into the wizard.  This ensures future calls to this method won't
+			// repeat the work (and prompting).
+			couldNotResolveStatus = installHandlerStatus;
+
+			// Is the update manager installer present?  If so, offer to open it.
+			// In either case, the failure will be reported in this wizard.
+			if (ProvUI.isUpdateManagerInstallerPresent()) {
+				PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						Shell shell = ProvUI.getDefaultParentShell();
+						MessageDialog dialog = new MessageDialog(shell, ProvUIMessages.Policy_RequiresUpdateManagerTitle, null, ProvUIMessages.Policy_RequiresUpdateManagerMessage, MessageDialog.WARNING, new String[] {ProvUIMessages.LaunchUpdateManagerButton, IDialogConstants.CANCEL_LABEL}, 0);
+						if (dialog.open() == 0)
+							BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
+								public void run() {
+									UpdateManagerCompatibility.openInstaller();
+								}
+							});
+					}
+				});
+			}
+			return installHandlerStatus;
+		}
+		return originalStatus;
+	}
+
+	/*
+	 * When we've found an install handler, that status trumps anything that the operation might have
+	 * determined.  We are relying here on the knowledge that the wizard's couldNotResolveStatus is 
+	 * reset on every new resolution, so that status only holds the installHandler status when it is 
+	 * the current status.  The installHandlerStatus must be non-OK for it to matter at all.
+	 * 
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#statusOverridesOperation()
+	 */
+	public boolean statusOverridesOperation() {
+		return installHandlerStatus != null && !installHandlerStatus.isOK() && couldNotResolveStatus == installHandlerStatus;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
index 9e45f62..8c26069 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
@@ -10,16 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 public class InstallWizardPage extends SizeComputingWizardPage {
 
-	public InstallWizardPage(Policy policy, String profileId, IUElementListRoot root, PlannerResolutionOperation initialResolution) {
-		super(policy, root, profileId, initialResolution);
+	public InstallWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, InstallOperation operation) {
+		super(ui, wizard, root, operation);
 		setTitle(ProvUIMessages.InstallWizardPage_Title);
 		setDescription(ProvUIMessages.InstallWizardPage_NoCheckboxDescription);
 	}
@@ -27,4 +26,9 @@ public class InstallWizardPage extends SizeComputingWizardPage {
 	protected String getOperationLabel() {
 		return ProvUIMessages.InstallIUOperationLabel;
 	}
+
+	protected String getOperationTaskName() {
+		return ProvUIMessages.InstallIUOperationTask;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
new file mode 100644
index 0000000..d944f93
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * An InstalledIUGroup is a reusable UI component that displays the
+ * IU's in a given profile.
+ * 
+ * @since 3.4
+ */
+public class InstalledIUGroup extends StructuredIUGroup {
+
+	private String profileId;
+
+	/**
+	 * Create a group that represents the installed IU's.
+	 * 
+	 * @param parent the parent composite for the group
+	 * @param font The font to use for calculating pixel sizes.  This font is
+	 * not managed by the receiver.
+	 * @param profileId the id of the profile whose content is being shown.
+	 * @param columnConfig the columns to be shown
+	 */
+	public InstalledIUGroup(ProvisioningUI ui, final Composite parent, Font font, String profileId, IUColumnConfig[] columnConfig) {
+		super(ui, parent, font, columnConfig);
+		if (profileId == null)
+			this.profileId = ProvisioningUI.getDefaultUI().getProfileId();
+		else
+			this.profileId = profileId;
+		createGroupComposite(parent);
+	}
+
+	protected StructuredViewer createViewer(Composite parent) {
+		// Table of installed IU's
+		TreeViewer installedIUViewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+
+		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
+		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
+		comparator.useColumnConfig(getColumnConfig());
+		installedIUViewer.setComparator(comparator);
+		installedIUViewer.setComparer(new ProvElementComparer());
+
+		// Now the content.
+		installedIUViewer.setContentProvider(new DeferredQueryContentProvider());
+
+		// Now the visuals, columns before labels.
+		setTreeColumns(installedIUViewer.getTree());
+		installedIUViewer.setLabelProvider(new IUDetailsLabelProvider(null, getColumnConfig(), null));
+
+		// Input last.
+		installedIUViewer.setInput(getInput());
+
+		final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), installedIUViewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE);
+		ProvUIActivator.getDefault().addProvisioningListener(listener);
+		installedIUViewer.getControl().addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				ProvUIActivator.getDefault().removeProvisioningListener(listener);
+			}
+		});
+		return installedIUViewer;
+	}
+
+	private void setTreeColumns(Tree tree) {
+		IUColumnConfig[] columns = getColumnConfig();
+		tree.setHeaderVisible(true);
+
+		for (int i = 0; i < columns.length; i++) {
+			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
+			tc.setResizable(true);
+			tc.setText(columns[i].getColumnTitle());
+			tc.setWidth(columns[i].getWidthInPixels(tree));
+		}
+	}
+
+	Object getInput() {
+		ProfileElement element = new ProfileElement(null, profileId);
+		return element;
+	}
+
+	/**
+	 * Get the viewer used to represent the installed IU's
+	 */
+	public StructuredViewer getStructuredViewer() {
+		return super.getStructuredViewer();
+	}
+
+	public Control getDefaultFocusControl() {
+		return super.getDefaultFocusControl();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
new file mode 100644
index 0000000..e178986
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * An Install wizard that is invoked when the user has already selected which
+ * IUs should be installed and does not need to browse the available software.
+ * 
+ * @since 3.5
+ */
+public class PreselectedIUInstallWizard extends WizardWithLicenses {
+
+	QueryableMetadataRepositoryManager manager;
+
+	public PreselectedIUInstallWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
+		super(ui, operation, initialSelections.toArray(), job);
+		setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
+		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
+	}
+
+	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
+		mainPage = new SelectableIUsPage(ui, this, input, selections);
+		mainPage.setTitle(ProvUIMessages.PreselectedIUInstallWizard_Title);
+		mainPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
+		((SelectableIUsPage) mainPage).updateStatus(input, operation);
+		return mainPage;
+	}
+
+	protected ResolutionResultsWizardPage createResolutionPage() {
+		return new InstallWizardPage(ui, this, root, (InstallOperation) operation);
+	}
+
+	protected void initializeResolutionModelElements(Object[] selectedElements) {
+		root = new IUElementListRoot();
+		ArrayList<AvailableIUElement> list = new ArrayList<AvailableIUElement>(selectedElements.length);
+		ArrayList<AvailableIUElement> selected = new ArrayList<AvailableIUElement>(selectedElements.length);
+		for (int i = 0; i < selectedElements.length; i++) {
+			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
+			if (iu != null) {
+				AvailableIUElement element = new AvailableIUElement(root, iu, getProfileId(), shouldShowProvisioningPlanChildren());
+				list.add(element);
+				selected.add(element);
+			}
+		}
+		root.setChildren(list.toArray());
+		planSelections = selected.toArray();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
+	 */
+	protected IResolutionErrorReportingPage createErrorReportingPage() {
+		return (IResolutionErrorReportingPage) mainPage;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
+		InstallOperation op = new InstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
+		op.setProfileId(getProfileId());
+		//		op.setRootMarkerKey(getRootMarkerKey());
+		op.setProvisioningContext(getProvisioningContext());
+		return op;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
index cf39d0c..3175aa5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
@@ -7,26 +7,26 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
 import java.util.HashSet;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.*;
 import org.eclipse.equinox.internal.p2.ui.*;
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.*;
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -39,30 +39,25 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 
 	private static final String WIZARD_SETTINGS_SECTION = "WizardSettings"; //$NON-NLS-1$
 
-	protected Policy policy;
-	protected String profileId;
-	protected IUElementListRoot root, originalRoot;
-	protected PlannerResolutionOperation resolutionOperation;
-	private Object[] planSelections;
+	protected ProvisioningUI ui;
+	protected IUElementListRoot root;
+	protected ProfileChangeOperation operation;
+	protected Object[] planSelections;
 	protected ISelectableIUsPage mainPage;
 	protected IResolutionErrorReportingPage errorPage;
 	protected ResolutionResultsWizardPage resolutionPage;
 	private ProvisioningContext provisioningContext;
-	boolean couldNotResolve;
+	protected LoadMetadataRepositoryJob repoPreloadJob;
+	IStatus couldNotResolveStatus = Status.OK_STATUS; // we haven't tried and failed
 
 	boolean waitingForOtherJobs = false;
 
-	public ProvisioningOperationWizard(Policy policy, String profileId, IUElementListRoot root, Object[] initialSelections, PlannerResolutionOperation initialResolution) {
+	public ProvisioningOperationWizard(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
 		super();
-		this.policy = policy;
-		this.profileId = profileId;
-		this.root = root;
-		this.originalRoot = root;
-		this.resolutionOperation = initialResolution;
-		if (initialSelections == null)
-			planSelections = new Object[0];
-		else
-			planSelections = initialSelections;
+		this.ui = ui;
+		initializeResolutionModelElements(initialSelections);
+		this.operation = operation;
+		this.repoPreloadJob = job;
 		setForcePreviousAndNextButtons(true);
 		setNeedsProgressMonitor(true);
 	}
@@ -74,9 +69,14 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 	public void addPages() {
 		mainPage = createMainPage(root, planSelections);
 		addPage(mainPage);
+		errorPage = createErrorReportingPage();
+		if (errorPage != mainPage)
+			addPage(errorPage);
+		resolutionPage = createResolutionPage();
+		addPage(resolutionPage);
 	}
 
-	protected abstract IResolutionErrorReportingPage getErrorReportingPage();
+	protected abstract IResolutionErrorReportingPage createErrorReportingPage();
 
 	protected abstract ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections);
 
@@ -86,23 +86,8 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 		return resolutionPage.performFinish();
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.wizard.Wizard#canFinish()
-	 */
-	public boolean canFinish() {
-		if (resolutionPage == null)
-			return false;
-		if (!super.canFinish())
-			return false;
-		// Special case.  The error reporting page has to be complete in
-		// order to press next and perform a resolution.  But that doesn't
-		// mean the wizard can finish.
-		if (resolutionOperation != null) {
-			int severity = resolutionOperation.getResolutionResult().getSummaryStatus().getSeverity();
-			return severity != IStatus.ERROR && severity != IStatus.CANCEL;
-		}
-		return false;
+	protected LoadMetadataRepositoryJob getRepositoryPreloadJob() {
+		return repoPreloadJob;
 	}
 
 	/*
@@ -110,76 +95,65 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 	 * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
 	 */
 	public IWizardPage getNextPage(IWizardPage page) {
+		// If we are moving from the main page or error page, we may need to resolve before
+		// advancing.
 		if (page == mainPage || page == errorPage) {
 			ISelectableIUsPage currentPage = (ISelectableIUsPage) page;
 			// Do we need to resolve?
-			boolean weResolved = false;
-			if (resolutionOperation == null || (resolutionOperation != null && shouldRecomputePlan(currentPage))) {
-				resolutionOperation = null;
-				provisioningContext = getProvisioningContext();
-				planSelections = currentPage.getCheckedIUElements();
-				root = makeResolutionElementRoot(planSelections);
+			if (operation == null || (operation != null && shouldRecomputePlan(currentPage))) {
 				recomputePlan(getContainer());
-				planChanged();
-				weResolved = true;
 			} else {
-				planSelections = currentPage.getCheckedIUElements();
-				root = makeResolutionElementRoot(planSelections);
-			}
-			return selectNextPage(page, getCurrentStatus(), weResolved);
-		}
-		return super.getNextPage(page);
-	}
-
-	protected IWizardPage selectNextPage(IWizardPage currentPage, IStatus status, boolean hasResolved) {
-		// We have already established before calling this method that the
-		// current page is either the main page or the error page.  
-		if (status.getSeverity() == IStatus.CANCEL)
-			return currentPage;
-		else if (status.getSeverity() == IStatus.ERROR) {
-			if (errorPage == null)
-				errorPage = getErrorReportingPage();
-			if (currentPage == errorPage) {
-				updateErrorPageStatus(errorPage);
-				return null;
+				// the selections have not changed from an IU point of view, but we want
+				// to reinitialize the resolution model elements to ensure they are up to
+				// date.
+				initializeResolutionModelElements(planSelections);
 			}
-			showingErrorPage();
-			return errorPage;
-		} else {
-			if (resolutionPage == null) {
-				resolutionPage = createResolutionPage();
-				addPage(resolutionPage);
+			IStatus status = operation.getResolutionResult();
+			if (status == null || status.getSeverity() == IStatus.ERROR) {
+				return errorPage;
+			} else if (status.getSeverity() == IStatus.CANCEL) {
+				return page;
+			} else {
+				return resolutionPage;
 			}
-			// need to clear any previous error status reported so that traversing
-			// back to the error page will not show the error
-			if (currentPage instanceof IResolutionErrorReportingPage)
-				updateErrorPageStatus((IResolutionErrorReportingPage) currentPage);
-			return resolutionPage;
 		}
+		return super.getNextPage(page);
 	}
 
 	/**
-	 * The error page is being shown for the first time given the
-	 * current plan.  Update any information needed before showing
-	 * the page.
+	 * The selections that drive the provisioning operation have changed.  We might need to
+	 * change the completion state of the resolution page.
 	 */
-	protected void showingErrorPage() {
-		// default is to do nothing
+	public void operationSelectionsChanged(ISelectableIUsPage page) {
+		if (resolutionPage != null) {
+			// If the page selections are different than what we may have resolved
+			// against, then this page is not complete.
+			boolean old = resolutionPage.isPageComplete();
+			if (pageSelectionsHaveChanged(page))
+				resolutionPage.setPageComplete(false);
+			// If the state has truly changed, update the buttons.  
+			if (old != resolutionPage.isPageComplete()) {
+				IWizardContainer container = getContainer();
+				if (container != null && container.getCurrentPage() != null)
+					getContainer().updateButtons();
+			}
+		}
 	}
 
 	private boolean shouldRecomputePlan(ISelectableIUsPage page) {
 		boolean previouslyWaiting = waitingForOtherJobs;
 		boolean previouslyCanceled = getCurrentStatus().getSeverity() == IStatus.CANCEL;
-		waitingForOtherJobs = ProvisioningOperationRunner.hasScheduledOperationsFor(profileId);
+		waitingForOtherJobs = ui.hasScheduledOperations();
 		return waitingForOtherJobs || previouslyWaiting || previouslyCanceled || pageSelectionsHaveChanged(page) || provisioningContextChanged();
 	}
 
-	private boolean pageSelectionsHaveChanged(ISelectableIUsPage page) {
-		HashSet selectedIUs = new HashSet();
+	protected boolean pageSelectionsHaveChanged(ISelectableIUsPage page) {
+		HashSet<IInstallableUnit> selectedIUs = new HashSet<IInstallableUnit>();
 		Object[] currentSelections = page.getCheckedIUElements();
-		selectedIUs.addAll(Arrays.asList(ElementUtils.elementsToIUs(currentSelections)));
-		HashSet lastIUSelections = new HashSet();
-		lastIUSelections.addAll(Arrays.asList(ElementUtils.elementsToIUs(planSelections)));
+		selectedIUs.addAll(ElementUtils.elementsToIUs(currentSelections));
+		HashSet<IInstallableUnit> lastIUSelections = new HashSet<IInstallableUnit>();
+		if (planSelections != null)
+			lastIUSelections.addAll(ElementUtils.elementsToIUs(planSelections));
 		return !(selectedIUs.equals(lastIUSelections));
 	}
 
@@ -188,29 +162,27 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 		if (currentProvisioningContext == null && provisioningContext == null)
 			return false;
 		if (currentProvisioningContext != null && provisioningContext != null)
-			return !Arrays.equals(provisioningContext.getMetadataRepositories(), currentProvisioningContext.getMetadataRepositories());
+			return !currentProvisioningContext.equals(provisioningContext);
 		// One is null and the other is not
 		return true;
 	}
 
 	protected void planChanged() {
-		if (resolutionOperation != null) {
-			IStatus status = resolutionOperation.getResolutionResult().getSummaryStatus();
-			if (status.getSeverity() != IStatus.ERROR && status.getSeverity() != IStatus.CANCEL) {
-				if (resolutionPage != null)
-					resolutionPage.updateStatus(root, resolutionOperation);
-				else {
-					resolutionPage = createResolutionPage();
-					addPage(resolutionPage);
-				}
-			}
+		resolutionPage.updateStatus(root, operation);
+		if (errorPage != resolutionPage) {
+			IUElementListRoot newRoot = shouldUpdateErrorPageModelOnPlanChange() ? root : null;
+			errorPage.updateStatus(newRoot, operation);
 		}
 	}
 
-	protected abstract IUElementListRoot makeResolutionElementRoot(Object[] selectedElements);
+	protected boolean shouldUpdateErrorPageModelOnPlanChange() {
+		return errorPage != mainPage;
+	}
+
+	protected abstract void initializeResolutionModelElements(Object[] selectedElements);
 
 	protected ProvisioningContext getProvisioningContext() {
-		return null;
+		return new ProvisioningContext(ui.getSession().getProvisioningAgent());
 	}
 
 	/**
@@ -220,57 +192,56 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 	 * @param runnableContext
 	 */
 	public void recomputePlan(IRunnableContext runnableContext) {
-		final Object[] elements = root.getChildren(root);
-		couldNotResolve = false;
-		try {
-			if (elements.length == 0) {
-				couldNotResolve(ProvUIMessages.ResolutionWizardPage_NoSelections);
-			} else
+		couldNotResolveStatus = Status.OK_STATUS;
+		provisioningContext = getProvisioningContext();
+		initializeResolutionModelElements(getOperationSelections());
+		if (planSelections.length == 0) {
+			operation = null;
+			couldNotResolve(ProvUIMessages.ResolutionWizardPage_NoSelections);
+		} else {
+			operation = getProfileChangeOperation(planSelections);
+			operation.setProvisioningContext(provisioningContext);
+			try {
 				runnableContext.run(true, true, new IRunnableWithProgress() {
 					public void run(IProgressMonitor monitor) {
-						resolutionOperation = null;
-						MultiStatus status = PlanAnalyzer.getProfileChangeAlteredStatus();
-						ProfileChangeRequest request = computeProfileChangeRequest(elements, status, monitor);
-						if (request != null) {
-							resolutionOperation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationWizardPage_ResolutionOperationLabel, profileId, request, provisioningContext, status, false);
-							try {
-								resolutionOperation.execute(monitor);
-							} catch (ProvisionException e) {
-								ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
-								couldNotResolve(null);
-							}
-						}
+						operation.resolveModal(monitor);
 					}
 				});
-		} catch (InterruptedException e) {
-			// Nothing to report if thread was interrupted
-		} catch (InvocationTargetException e) {
-			ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-			couldNotResolve(null);
+
+			} catch (InterruptedException e) {
+				// Nothing to report if thread was interrupted
+			} catch (InvocationTargetException e) {
+				ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
+				couldNotResolve(null);
+			}
 		}
-		if (errorPage == null)
-			errorPage = getErrorReportingPage();
-		updateErrorPageStatus(errorPage);
+		planChanged();
 	}
 
-	void updateErrorPageStatus(IResolutionErrorReportingPage page) {
-		page.updateStatus(originalRoot, resolutionOperation);
+	/*
+	 * Get the selections that drive the provisioning operation.
+	 */
+	protected Object[] getOperationSelections() {
+		return mainPage.getCheckedIUElements();
 	}
 
+	protected abstract ProfileChangeOperation getProfileChangeOperation(Object[] elements);
+
 	void couldNotResolve(String message) {
-		resolutionOperation = null;
-		couldNotResolve = true;
 		if (message != null) {
-			IStatus status = new MultiStatus(ProvUIActivator.PLUGIN_ID, IStatusCodes.UNEXPECTED_NOTHING_TO_DO, message, null);
-			StatusManager.getManager().handle(status, StatusManager.LOG);
+			couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, null);
+		} else {
+			couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningOperationWizard_UnexpectedFailureToResolve, null);
 		}
+		StatusManager.getManager().handle(couldNotResolveStatus, StatusManager.LOG);
 	}
 
 	public IStatus getCurrentStatus() {
-		if (couldNotResolve || resolutionOperation == null) {
-			return PlanAnalyzer.getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null);
-		}
-		return resolutionOperation.getResolutionResult().getSummaryStatus();
+		if (statusOverridesOperation())
+			return couldNotResolveStatus;
+		if (operation != null && operation.getResolutionResult() != null)
+			return operation.getResolutionResult();
+		return couldNotResolveStatus;
 	}
 
 	public String getDialogSettingsSectionName() {
@@ -285,6 +256,92 @@ public abstract class ProvisioningOperationWizard extends Wizard {
 		}
 	}
 
-	protected abstract ProfileChangeRequest computeProfileChangeRequest(Object[] checkedElements, MultiStatus additionalStatus, IProgressMonitor monitor);
+	protected Policy getPolicy() {
+		return ui.getPolicy();
+	}
 
+	protected String getProfileId() {
+		return ui.getProfileId();
+	}
+
+	protected boolean shouldShowProvisioningPlanChildren() {
+		return ProvUI.getQueryContext(getPolicy()).getShowProvisioningPlanChildren();
+	}
+
+	/*
+	 * Overridden to start the preload job after page control creation.
+	 * This allows any listeners on repo events to be set up before a
+	 * batch load occurs.  The job creator uses a property to indicate if
+	 * the job needs scheduling (the client may have already completed the job
+	 * before the UI was opened).
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPageControls(Composite pageContainer) {
+		// We call this so that wizards ignore all repository eventing that occurs while the wizard is
+		// open.  Otherwise, we can get an add event when a repository loads its references that we
+		// don't want to respond to.  Since repo discovery events can be received asynchronously by the
+		// manager, the subsequent add events generated by the manager aren't guaranteed to be synchronous,
+		// even if our listener is synchronous.  Thus, we can't fine-tune
+		// the "ignore" window to a specific operation.
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277265#c38
+		ui.signalRepositoryOperationStart();
+		super.createPageControls(pageContainer);
+		if (repoPreloadJob != null) {
+			if (repoPreloadJob.getProperty(LoadMetadataRepositoryJob.WIZARD_CLIENT_SHOULD_SCHEDULE) != null) {
+				// job has not been scheduled.  Set a listener so we can report accumulated errors and
+				// schedule it.
+				repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
+					public void done(IJobChangeEvent e) {
+						asyncReportLoadFailures();
+					}
+				});
+				repoPreloadJob.schedule();
+			} else {
+				// job has been scheduled, might already be done.
+				if (repoPreloadJob.getState() == Job.NONE) {
+					// job is done, report failures found so far
+					// do it asynchronously since we are in the middle of creation
+					asyncReportLoadFailures();
+				} else {
+					// job is waiting, sleeping, running, report failures when
+					// it's done
+					repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
+						public void done(IJobChangeEvent e) {
+							asyncReportLoadFailures();
+						}
+					});
+				}
+
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#dispose()
+	 */
+	public void dispose() {
+		ui.signalRepositoryOperationComplete(null, false);
+		super.dispose();
+	}
+
+	void asyncReportLoadFailures() {
+		if (repoPreloadJob != null && getShell() != null && !getShell().isDisposed()) {
+			getShell().getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					if (PlatformUI.isWorkbenchRunning() && getShell() != null && !getShell().isDisposed())
+						repoPreloadJob.reportAccumulatedStatus();
+				}
+			});
+		}
+	}
+
+	/*
+	 * Return a boolean indicating whether the wizard's current status should override any detail
+	 * reported by the operation.
+	 */
+	public boolean statusOverridesOperation() {
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
new file mode 100644
index 0000000..4f650b6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Subclass of WizardDialog that provides bounds saving behavior.
+ * @since 3.5
+ *
+ */
+public class ProvisioningWizardDialog extends WizardDialog {
+	private ProvisioningOperationWizard wizard;
+
+	public ProvisioningWizardDialog(Shell parent, ProvisioningOperationWizard wizard) {
+		super(parent, wizard);
+		this.wizard = wizard;
+		setShellStyle(getShellStyle() | SWT.RESIZE);
+	}
+
+	protected IDialogSettings getDialogBoundsSettings() {
+		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
+		IDialogSettings section = settings.getSection(wizard.getDialogSettingsSectionName());
+		if (section == null) {
+			section = settings.addNewSection(wizard.getDialogSettingsSectionName());
+		}
+		return section;
+	}
+
+	/**
+	 * @see org.eclipse.jface.window.Window#close()
+	 */
+	public boolean close() {
+		if (getShell() != null && !getShell().isDisposed()) {
+			wizard.saveBoundsRelatedSettings();
+		}
+		return super.close();
+	}
+
+	/**
+	 * This method is provided only for automated testing.
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public Button testGetButton(int id) {
+		return getButton(id);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
index 085056b..4418a01 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
+import org.eclipse.equinox.p2.ui.*;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.dnd.*;
 import org.eclipse.swt.widgets.Control;
@@ -17,8 +18,13 @@ import org.eclipse.ui.PlatformUI;
 
 abstract class ProvisioningWizardPage extends WizardPage implements ICopyable {
 
-	protected ProvisioningWizardPage(String pageName) {
+	private ProvisioningUI ui;
+	private ProvisioningOperationWizard wizard;
+
+	protected ProvisioningWizardPage(String pageName, ProvisioningUI ui, ProvisioningOperationWizard wizard) {
 		super(pageName);
+		this.wizard = wizard;
+		this.ui = ui;
 	}
 
 	protected void activateCopy(Control control) {
@@ -26,6 +32,10 @@ abstract class ProvisioningWizardPage extends WizardPage implements ICopyable {
 
 	}
 
+	protected ProvisioningOperationWizard getProvisioningWizard() {
+		return wizard;
+	}
+
 	public void copyToClipboard(Control activeControl) {
 		String text = getClipboardText(activeControl);
 		if (text.length() == 0)
@@ -44,4 +54,16 @@ abstract class ProvisioningWizardPage extends WizardPage implements ICopyable {
 	public void saveBoundsRelatedSettings() {
 		// Default is to do nothing
 	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		return ui;
+	}
+
+	protected Policy getPolicy() {
+		return ui.getPolicy();
+	}
+
+	String getProfileId() {
+		return ui.getProfileId();
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
index cb258f8..a44ee11 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
@@ -14,13 +14,9 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryLocationValidator;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTargetEvent;
@@ -38,13 +34,15 @@ import org.eclipse.ui.statushandlers.StatusManager;
  *
  */
 public class RepositoryManipulatorDropTarget extends URLDropAdapter {
-	RepositoryManipulator manipulator;
+	ProvisioningUI ui;
+	RepositoryTracker tracker;
 	Control control;
 
-	public RepositoryManipulatorDropTarget(RepositoryManipulator manipulator, Control control) {
+	public RepositoryManipulatorDropTarget(ProvisioningUI ui, Control control) {
 		super(true); // convert file drops to URL
-		Assert.isNotNull(manipulator);
-		this.manipulator = manipulator;
+		Assert.isNotNull(ui);
+		this.ui = ui;
+		this.tracker = ui.getRepositoryTracker();
 		this.control = control;
 	}
 
@@ -54,7 +52,7 @@ public class RepositoryManipulatorDropTarget extends URLDropAdapter {
 		try {
 			location[0] = URIUtil.fromString(urlText);
 		} catch (URISyntaxException e) {
-			ProvUI.reportStatus(RepositoryLocationValidator.getInvalidLocationStatus(urlText), StatusManager.SHOW | StatusManager.LOG);
+			ProvUI.reportStatus(tracker.getInvalidLocationStatus(urlText), StatusManager.SHOW | StatusManager.LOG);
 			return;
 		}
 		if (location[0] == null)
@@ -63,13 +61,10 @@ public class RepositoryManipulatorDropTarget extends URLDropAdapter {
 		Job job = new WorkbenchJob(ProvUIMessages.RepositoryManipulatorDropTarget_DragAndDropJobLabel) {
 
 			public IStatus runInUIThread(IProgressMonitor monitor) {
-				IStatus status = manipulator.getRepositoryLocationValidator(control.getShell()).validateRepositoryLocation(location[0], false, monitor);
+				IStatus status = tracker.validateRepositoryLocation(ui.getSession(), location[0], false, monitor);
 				if (status.isOK()) {
-					ProvisioningOperation addOperation = manipulator.getAddOperation(location[0]);
-					ProvisioningOperationRunner.schedule(addOperation, StatusManager.SHOW | StatusManager.LOG);
+					tracker.addRepository(location[0], null, ui.getSession());
 					event.detail = DND.DROP_LINK;
-				} else if (status.getCode() == RepositoryLocationValidator.ALTERNATE_ACTION_TAKEN) {
-					event.detail = DND.DROP_COPY;
 				} else if (status.getSeverity() == IStatus.CANCEL) {
 					event.detail = DND.DROP_NONE;
 				} else {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
index ddb9883..d1f31d6 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
@@ -15,7 +15,8 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.swt.SWT;
@@ -37,13 +38,13 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 
 	Button okButton;
 	Text url, nickname;
-	Policy policy;
+	ProvisioningUI ui;
 	URI location;
 	String name;
 
-	public RepositoryNameAndLocationDialog(Shell parentShell, Policy policy) {
+	public RepositoryNameAndLocationDialog(Shell parentShell, ProvisioningUI ui) {
 		super(parentShell);
-		this.policy = policy;
+		this.ui = ui;
 		setTitle(ProvUIMessages.RepositoryNameAndLocationDialog_Title);
 	}
 
@@ -71,25 +72,13 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 	}
 
 	/**
-	 * Return a location validator appropriate for this dialog.  The
-	 * default is to retrieve it from the repository manipulator.
-	 * Subclasses may override.
-	 * 
-	 * @return the validator
-	 */
-	protected RepositoryLocationValidator getRepositoryLocationValidator() {
-		return getRepositoryManipulator().getRepositoryLocationValidator(getShell());
-	}
-
-	/**
-	 * Return a RepositoryManipulator appropriate for validating and adding the
+	 * Return a RepositoryTracker appropriate for validating and adding the
 	 * repository.
 	 * 
-	 * The default manipulator is described by the policy.  Subclasses may override.
-	 * @return the repository manipulator
+	 * @return the Repository Tracker
 	 */
-	protected RepositoryManipulator getRepositoryManipulator() {
-		return policy.getRepositoryManipulator();
+	protected RepositoryTracker getRepositoryTracker() {
+		return ui.getRepositoryTracker();
 	}
 
 	protected void okPressed() {
@@ -111,7 +100,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 	 * @return the URL currently typed in by the user.
 	 */
 	protected URI getUserLocation() {
-		return RepositoryLocationValidator.locationFromString(url.getText().trim());
+		return getRepositoryTracker().locationFromString(url.getText().trim());
 	}
 
 	/**
@@ -144,16 +133,16 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 		if (url == null || url.isDisposed())
 			return Status.OK_STATUS;
 		final IStatus[] status = new IStatus[1];
-		status[0] = RepositoryLocationValidator.getInvalidLocationStatus(url.getText().trim());
+		status[0] = getRepositoryTracker().getInvalidLocationStatus(url.getText().trim());
 		final URI userLocation = getUserLocation();
 		if (url.getText().length() == 0)
-			status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryLocationValidator.LOCAL_VALIDATION_ERROR, ProvUIMessages.RepositoryGroup_URLRequired, null);
+			status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryTracker.STATUS_INVALID_REPOSITORY_LOCATION, ProvUIMessages.RepositoryGroup_URLRequired, null);
 		else if (userLocation == null)
-			status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryLocationValidator.LOCAL_VALIDATION_ERROR, ProvUIMessages.AddRepositoryDialog_InvalidURL, null);
+			status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryTracker.STATUS_INVALID_REPOSITORY_LOCATION, ProvUIMessages.AddRepositoryDialog_InvalidURL, null);
 		else {
 			BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
 				public void run() {
-					status[0] = getRepositoryLocationValidator().validateRepositoryLocation(userLocation, contactRepositories, null);
+					status[0] = getRepositoryTracker().validateRepositoryLocation(ui.getSession(), userLocation, contactRepositories, null);
 				}
 			});
 		}
@@ -173,7 +162,7 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 		setOkEnablement(!status.matches(IStatus.ERROR));
 	}
 
-	private void setOkEnablement(boolean enable) {
+	protected void setOkEnablement(boolean enable) {
 		if (okButton != null && !okButton.isDisposed())
 			okButton.setEnabled(enable);
 	}
@@ -219,4 +208,8 @@ public class RepositoryNameAndLocationDialog extends StatusDialog {
 		url.setSelection(0, url.getText().length());
 		return url;
 	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		return ui;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
new file mode 100644
index 0000000..80616b1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
@@ -0,0 +1,654 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Yury Chernikov <Yury.Chernikov at borland.com> - Bug 271447 [ui] Bad layout in 'Install available software' dialog
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import com.ibm.icu.text.Collator;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * A RepositorySelectionGroup is a reusable UI component that displays 
+ * available repositories and allows the user to select them.  
+ * 
+ * @since 3.5
+ */
+public class RepositorySelectionGroup {
+
+	private static final String SITE_NONE = ProvUIMessages.AvailableIUsPage_NoSites;
+	private static final String SITE_ALL = ProvUIMessages.AvailableIUsPage_AllSites;
+	private static final String SITE_LOCAL = ProvUIMessages.AvailableIUsPage_LocalSites;
+	private static final int INDEX_SITE_NONE = 0;
+	private static final int INDEX_SITE_ALL = 1;
+	private static final int DEC_MARGIN_WIDTH = 2;
+	private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
+
+	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=245569
+	private static final int COUNT_VISIBLE_ITEMS = 20;
+	IWizardContainer container;
+	ProvisioningUI ui;
+	IUViewQueryContext queryContext;
+
+	ListenerList listeners = new ListenerList();
+
+	Combo repoCombo;
+	Link repoManipulatorLink;
+	ControlDecoration repoDec;
+	ComboAutoCompleteField repoAutoComplete;
+	ProvUIProvisioningListener comboRepoListener;
+	IRepositoryManipulationHook repositoryManipulationHook;
+
+	Image info, warning, error;
+	URI[] comboRepos; // the URIs shown in the combo, kept in sync with combo items
+	HashMap<String, URI> disabledRepoProposals = new HashMap<String, URI>(); // proposal string -> disabled URI 
+
+	public RepositorySelectionGroup(ProvisioningUI ui, IWizardContainer container, Composite parent, IUViewQueryContext queryContext) {
+		this.container = container;
+		this.queryContext = queryContext;
+		this.ui = ui;
+		createControl(parent);
+	}
+
+	public Control getDefaultFocusControl() {
+		return repoCombo;
+	}
+
+	public void addRepositorySelectionListener(IRepositorySelectionListener listener) {
+		listeners.add(listener);
+	}
+
+	protected void createControl(Composite parent) {
+		final RepositoryTracker tracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
+		// Get the possible field error indicators
+		info = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage();
+		warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage();
+		error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
+
+		// Combo that filters sites
+		Composite comboComposite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginTop = 0;
+		layout.marginBottom = IDialogConstants.VERTICAL_SPACING;
+		layout.numColumns = 3;
+		comboComposite.setLayout(layout);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		comboComposite.setLayoutData(gd);
+
+		Label label = new Label(comboComposite, SWT.NONE);
+		label.setText(ProvUIMessages.AvailableIUsPage_RepoFilterLabel);
+
+		repoCombo = new Combo(comboComposite, SWT.DROP_DOWN);
+		repoCombo.addSelectionListener(new SelectionListener() {
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+				repoComboSelectionChanged();
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				repoComboSelectionChanged();
+			}
+
+		});
+		// Auto complete - install before our own key listeners, so that auto complete gets first shot.
+		repoAutoComplete = new ComboAutoCompleteField(repoCombo);
+		repoCombo.setVisibleItemCount(COUNT_VISIBLE_ITEMS);
+		repoCombo.addKeyListener(new KeyAdapter() {
+
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR)
+					addRepository(false);
+			}
+		});
+
+		// We don't ever want this to be interpreted as a default
+		// button event
+		repoCombo.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent e) {
+				if (e.detail == SWT.TRAVERSE_RETURN) {
+					e.doit = false;
+				}
+			}
+		});
+
+		gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		// breathing room for info dec
+		gd.horizontalIndent = DEC_MARGIN_WIDTH * 2;
+		repoCombo.setLayoutData(gd);
+		repoCombo.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent event) {
+				URI location = null;
+				IStatus status = null;
+				String text = repoCombo.getText().trim();
+				int index = getComboIndex(text);
+				// only validate text that doesn't match existing text in combo
+				if (index < 0) {
+					location = tracker.locationFromString(repoCombo.getText());
+					if (location == null) {
+						status = tracker.getInvalidLocationStatus(repoCombo.getText());
+					} else {
+						status = tracker.validateRepositoryLocation(ui.getSession(), location, false, new NullProgressMonitor());
+					}
+				} else {
+					// user typed or pasted an existing location.  Select it.
+					repoComboSelectionChanged();
+				}
+				setRepoComboDecoration(status);
+			}
+		});
+
+		repoDec = new ControlDecoration(repoCombo, SWT.LEFT | SWT.TOP);
+		repoDec.setMarginWidth(DEC_MARGIN_WIDTH);
+
+		DropTarget target = new DropTarget(repoCombo, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
+		target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
+		target.addDropListener(new URLDropAdapter(true) {
+			/* (non-Javadoc)
+			 * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
+			 */
+			protected void handleDrop(String urlText, DropTargetEvent event) {
+				repoCombo.setText(urlText);
+				event.detail = DND.DROP_LINK;
+				addRepository(false);
+			}
+		});
+
+		Button button = new Button(comboComposite, SWT.PUSH);
+		button.setText(ProvUIMessages.AvailableIUsPage_AddButton);
+		button.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				addRepository(true);
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				addRepository(true);
+			}
+		});
+		setButtonLayoutData(button);
+
+		// Link to repository manipulator
+		repoManipulatorLink = createLink(comboComposite, new Action() {
+			public void runWithEvent(Event event) {
+				if (repositoryManipulationHook != null)
+					repositoryManipulationHook.preManipulateRepositories();
+				ui.manipulateRepositories(repoCombo.getShell());
+				if (repositoryManipulationHook != null)
+					repositoryManipulationHook.postManipulateRepositories();
+			}
+		}, getLinkLabel());
+		gd = new GridData(SWT.END, SWT.FILL, true, false);
+		gd.horizontalSpan = 3;
+		repoManipulatorLink.setLayoutData(gd);
+
+		addComboProvisioningListeners();
+		parent.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				removeProvisioningListeners();
+			}
+
+		});
+	}
+
+	private String getLinkLabel() {
+		if (ui.getPolicy().getRepositoryPreferencePageId() != null) {
+			String pageName = ui.getPolicy().getRepositoryPreferencePageName();
+			if (pageName == null)
+				pageName = ProvUIMessages.RepositorySelectionGroup_PrefPageName;
+			return NLS.bind(ProvUIMessages.RepositorySelectionGroup_PrefPageLink, pageName);
+		}
+		return ProvUIMessages.RepositorySelectionGroup_GenericSiteLinkTitle;
+	}
+
+	private void setButtonLayoutData(Button button) {
+		GridData data = new GridData(SWT.FILL, SWT.CENTER, false, false);
+		GC gc = new GC(button);
+		gc.setFont(JFaceResources.getDialogFont());
+		FontMetrics fm = gc.getFontMetrics();
+		gc.dispose();
+		int widthHint = Dialog.convertHorizontalDLUsToPixels(fm, IDialogConstants.BUTTON_WIDTH);
+		Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+		data.widthHint = Math.max(widthHint, minSize.x);
+		button.setLayoutData(data);
+	}
+
+	public void setRepositorySelection(int scope, URI location) {
+		switch (scope) {
+			case AvailableIUGroup.AVAILABLE_ALL :
+				fillRepoCombo(SITE_ALL);
+				break;
+			case AvailableIUGroup.AVAILABLE_LOCAL :
+				fillRepoCombo(SITE_LOCAL);
+				break;
+			case AvailableIUGroup.AVAILABLE_SPECIFIED :
+				fillRepoCombo(getSiteString(location));
+				break;
+			default :
+				fillRepoCombo(SITE_NONE);
+		}
+		setRepoComboDecoration(null);
+	}
+
+	public void setRepositoryManipulationHook(IRepositoryManipulationHook hook) {
+		this.repositoryManipulationHook = hook;
+	}
+
+	protected void setRepoComboDecoration(final IStatus status) {
+		if (status == null || status.isOK() || status.getSeverity() == IStatus.CANCEL) {
+			repoDec.setShowOnlyOnFocus(true);
+			repoDec.setDescriptionText(ProvUIMessages.AvailableIUsPage_RepoFilterInstructions);
+			repoDec.setImage(info);
+			// We may have been previously showing an error or warning
+			// hover.  We will need to dismiss it, but if there is no text
+			// typed, don't do this, so that the user gets the info cue
+			if (repoCombo.getText().length() > 0)
+				repoDec.showHoverText(null);
+			return;
+		}
+		Image image;
+		if (status.getSeverity() == IStatus.WARNING)
+			image = warning;
+		else if (status.getSeverity() == IStatus.ERROR)
+			image = error;
+		else
+			image = info;
+		repoDec.setImage(image);
+		repoDec.setDescriptionText(status.getMessage());
+		repoDec.setShowOnlyOnFocus(false);
+		// use a delay to show the validation method because the very next
+		// selection or keystroke might fix it
+		repoCombo.getDisplay().timerExec(500, new Runnable() {
+			public void run() {
+				if (repoDec != null && repoDec.getImage() != info)
+					repoDec.showHoverText(status.getMessage());
+			}
+		});
+
+	}
+
+	/*
+	 * Fill the repo combo and use the specified string
+	 * as the selection.  If the selection is null, then the
+	 * current selection should be preserved if applicable.
+	 */
+	void fillRepoCombo(final String selection) {
+		RepositoryTracker tracker = ui.getRepositoryTracker();
+		URI[] sites = tracker.getKnownRepositories(ui.getSession());
+		boolean hasLocalSites = getLocalSites().length > 0;
+		final String[] items;
+		if (hasLocalSites) {
+			// None, All, repo1, repo2....repo n, Local
+			comboRepos = new URI[sites.length + 3];
+			items = new String[sites.length + 3];
+		} else {
+			// None, All, repo1, repo2....repo n
+			comboRepos = new URI[sites.length + 2];
+			items = new String[sites.length + 2];
+		}
+		items[INDEX_SITE_NONE] = SITE_NONE;
+		items[INDEX_SITE_ALL] = SITE_ALL;
+		for (int i = 0; i < sites.length; i++) {
+			items[i + 2] = getSiteString(sites[i]);
+			comboRepos[i + 2] = sites[i];
+		}
+		if (hasLocalSites)
+			items[items.length - 1] = SITE_LOCAL;
+		if (sites.length > 0)
+			sortRepoItems(items, comboRepos, hasLocalSites);
+		Runnable runnable = new Runnable() {
+			public void run() {
+				if (repoCombo == null || repoCombo.isDisposed())
+					return;
+				String repoToSelect = selection;
+				if (repoToSelect == null) {
+					// If the combo is open and something is selected, use that index if we
+					// weren't given a string to select.
+					int selIndex = repoCombo.getSelectionIndex();
+					if (selIndex >= 0)
+						repoToSelect = repoCombo.getItem(selIndex);
+					else
+						repoToSelect = repoCombo.getText();
+				}
+				repoCombo.setItems(items);
+				repoAutoComplete.setProposalStrings(getComboProposals());
+				boolean selected = false;
+				for (int i = 0; i < items.length; i++)
+					if (items[i].equals(repoToSelect)) {
+						selected = true;
+						if (repoCombo.getListVisible())
+							repoCombo.select(i);
+						repoCombo.setText(repoToSelect);
+						break;
+					}
+				if (!selected) {
+					if (repoCombo.getListVisible())
+						repoCombo.select(INDEX_SITE_NONE);
+					repoCombo.setText(SITE_NONE);
+				}
+				repoComboSelectionChanged();
+			}
+		};
+		if (Display.getCurrent() == null)
+			repoCombo.getDisplay().asyncExec(runnable);
+		else
+			runnable.run();
+	}
+
+	String getSiteString(URI uri) {
+		String nickname = getMetadataRepositoryManager().getRepositoryProperty(uri, IRepository.PROP_NICKNAME);
+		if (nickname != null && nickname.length() > 0)
+			return NLS.bind(ProvUIMessages.AvailableIUsPage_NameWithLocation, new Object[] {nickname, ProvUIMessages.RepositorySelectionGroup_NameAndLocationSeparator, URIUtil.toUnencodedString(uri)});
+		return URIUtil.toUnencodedString(uri);
+	}
+
+	private Link createLink(Composite parent, IAction action, String text) {
+		Link link = new Link(parent, SWT.PUSH);
+		link.setText(text);
+
+		link.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				IAction linkAction = getLinkAction(event.widget);
+				if (linkAction != null) {
+					linkAction.runWithEvent(event);
+				}
+			}
+		});
+		link.setToolTipText(action.getToolTipText());
+		link.setData(LINKACTION, action);
+		return link;
+	}
+
+	IAction getLinkAction(Widget widget) {
+		Object data = widget.getData(LINKACTION);
+		if (data == null || !(data instanceof IAction)) {
+			return null;
+		}
+		return (IAction) data;
+	}
+
+	private void sortRepoItems(String[] strings, URI[] locations, boolean hasLocalSites) {
+		int sortStart = 2;
+		int sortEnd = hasLocalSites ? strings.length - 2 : strings.length - 1;
+		if (sortStart >= sortEnd)
+			return;
+		final HashMap<URI, String> uriToString = new HashMap<URI, String>();
+		for (int i = sortStart; i <= sortEnd; i++) {
+			uriToString.put(locations[i], strings[i]);
+		}
+		final Collator collator = Collator.getInstance(Locale.getDefault());
+		Comparator<String> stringComparator = new Comparator<String>() {
+			public int compare(String a, String b) {
+				return collator.compare(a, b);
+			}
+		};
+		Comparator<URI> uriComparator = new Comparator<URI>() {
+			public int compare(URI a, URI b) {
+				return collator.compare(uriToString.get(a), uriToString.get(b));
+			}
+		};
+
+		Arrays.sort(strings, sortStart, sortEnd, stringComparator);
+		Arrays.sort(locations, sortStart, sortEnd, uriComparator);
+	}
+
+	private URI[] getLocalSites() {
+		// use our current visibility flags plus the local filter
+		int flags = ui.getRepositoryTracker().getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_LOCAL;
+		return getMetadataRepositoryManager().getKnownRepositories(flags);
+	}
+
+	String[] getComboProposals() {
+		int flags = ui.getRepositoryTracker().getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_DISABLED;
+		String[] items = repoCombo.getItems();
+		// Clear any previously remembered disabled repos
+		disabledRepoProposals = new HashMap<String, URI>();
+		URI[] disabled = getMetadataRepositoryManager().getKnownRepositories(flags);
+		String[] disabledItems = new String[disabled.length];
+		for (int i = 0; i < disabledItems.length; i++) {
+			disabledItems[i] = getSiteString(disabled[i]);
+			disabledRepoProposals.put(disabledItems[i], disabled[i]);
+		}
+		String[] both = new String[items.length + disabledItems.length];
+		System.arraycopy(items, 0, both, 0, items.length);
+		System.arraycopy(disabledItems, 0, both, items.length, disabledItems.length);
+		return both;
+	}
+
+	int getComboIndex(String repoText) {
+		// Callers have typically done this already, but just in case
+		repoText = repoText.trim();
+		// First look for exact match to the combo string.
+		// This includes the name, etc.
+		if (repoText.length() > 0) {
+			String[] items = repoCombo.getItems();
+			for (int i = 0; i < items.length; i++)
+				if (repoText.equals(items[i])) {
+					return i;
+				}
+		}
+		// Look for URI match - the user may have pasted or dragged 
+		// in a location that matches one we already know about, even
+		// if the text does not match completely.  (slashes, no name, etc.)
+		try {
+			URI location = URIUtil.fromString(repoText);
+			for (int i = 0; i < comboRepos.length; i++)
+				if (URIUtil.sameURI(location, comboRepos[i])) {
+					return i;
+				}
+		} catch (URISyntaxException e) {
+			// never mind
+		}
+
+		// Special case.  The user has typed a URI with a trailing slash.
+		// Make a URI without the trailing slash and see if it matches
+		// a location we know about.
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=268580
+		int length = repoText.length();
+		if (length > 0 && repoText.charAt(length - 1) == '/') {
+			return getComboIndex(repoText.substring(0, length - 1));
+		}
+		return -1;
+	}
+
+	void addComboProvisioningListeners() {
+		// We need to monitor repository events so that we can adjust the repo combo.
+		comboRepoListener = new ProvUIProvisioningListener(getClass().getName(), ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
+			protected void repositoryAdded(RepositoryEvent e) {
+				fillRepoCombo(getSiteString(e.getRepositoryLocation()));
+			}
+
+			protected void repositoryRemoved(RepositoryEvent e) {
+				fillRepoCombo(null);
+			}
+
+			protected void refreshAll() {
+				fillRepoCombo(null);
+			}
+		};
+		ProvUI.addProvisioningListener(comboRepoListener);
+	}
+
+	void removeProvisioningListeners() {
+		if (comboRepoListener != null) {
+			ProvUI.removeProvisioningListener(comboRepoListener);
+			comboRepoListener = null;
+		}
+
+	}
+
+	/*
+	 *  Add a repository using the text in the combo or launch a dialog if the text
+	 *  represents an already known repo.  
+	 */
+	void addRepository(boolean alwaysPrompt) {
+		final RepositoryTracker manipulator = ui.getRepositoryTracker();
+		final String selectedRepo = repoCombo.getText().trim();
+		int selectionIndex = getComboIndex(selectedRepo);
+		final boolean isNewText = selectionIndex < 0;
+		// If we are adding something already in the combo, just
+		// select that item.
+		if (!alwaysPrompt && !isNewText && selectionIndex != repoCombo.getSelectionIndex()) {
+			repoComboSelectionChanged();
+		} else if (alwaysPrompt) {
+			AddRepositoryDialog dialog = new AddRepositoryDialog(repoCombo.getShell(), ui) {
+
+				protected String getInitialLocationText() {
+					if (isNewText) {
+						// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
+						// we need to ensure any embedded nickname is stripped out
+						URI loc = manipulator.locationFromString(selectedRepo);
+						return loc.toString();
+					}
+					return super.getInitialLocationText();
+				}
+
+				@Override
+				protected String getInitialNameText() {
+					if (isNewText) {
+						URI loc = manipulator.locationFromString(selectedRepo);
+						// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
+						if (loc != null && manipulator instanceof ColocatedRepositoryTracker) {
+							String parsedNickname = ((ColocatedRepositoryTracker) manipulator).getParsedNickname(loc);
+							if (parsedNickname != null)
+								return parsedNickname;
+						}
+					}
+					return super.getInitialNameText();
+				}
+
+			};
+			dialog.setTitle(ProvUIMessages.AddRepositoryDialog_Title);
+			dialog.open();
+			URI location = dialog.getAddedLocation();
+			if (location != null)
+				fillRepoCombo(getSiteString(location));
+		} else if (isNewText) {
+			try {
+				container.run(false, false, new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						URI location;
+						IStatus status;
+						// This might be a disabled repo.  If so, no need to validate further.
+						if (disabledRepoProposals.containsKey(selectedRepo)) {
+							location = disabledRepoProposals.get(selectedRepo);
+							status = Status.OK_STATUS;
+						} else {
+							location = manipulator.locationFromString(selectedRepo);
+							if (location == null)
+								status = manipulator.getInvalidLocationStatus(selectedRepo);
+							else {
+								status = manipulator.validateRepositoryLocation(ui.getSession(), location, false, monitor);
+							}
+						}
+						if (status.isOK() && location != null) {
+							String nick = null;
+							if (manipulator instanceof ColocatedRepositoryTracker)
+								nick = ((ColocatedRepositoryTracker) manipulator).getParsedNickname(location);
+							manipulator.addRepository(location, nick, ui.getSession());
+							fillRepoCombo(getSiteString(location));
+						}
+						setRepoComboDecoration(status);
+					}
+				});
+			} catch (InvocationTargetException e) {
+				// ignore
+			} catch (InterruptedException e) {
+				// ignore
+			}
+		}
+	}
+
+	public ProvisioningContext getProvisioningContext() {
+		int siteSel = getComboIndex(repoCombo.getText().trim());
+		if (siteSel < 0 || siteSel == INDEX_SITE_ALL || siteSel == INDEX_SITE_NONE)
+			return new ProvisioningContext(ui.getSession().getProvisioningAgent());
+		URI[] locals = getLocalSites();
+		// If there are local sites, the last item in the combo is "Local Sites Only"
+		// Use all local sites in this case
+		// We have to set metadata repositories and artifact repositories in the
+		// provisioning context because the artifact repositories are used for
+		// sizing.
+		if (locals.length > 0 && siteSel == repoCombo.getItemCount() - 1) {
+			ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
+			context.setMetadataRepositories(locals);
+			context.setArtifactRepositories(locals);
+			return context;
+		}
+		// A single site is selected.
+		ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
+		context.setMetadataRepositories(new URI[] {comboRepos[siteSel]});
+		context.setArtifactRepositories(new URI[] {comboRepos[siteSel]});
+		return context;
+	}
+
+	void repoComboSelectionChanged() {
+		int repoChoice = -1;
+		URI repoLocation = null;
+
+		int selection = -1;
+		if (repoCombo.getListVisible()) {
+			selection = repoCombo.getSelectionIndex();
+		} else {
+			selection = getComboIndex(repoCombo.getText().trim());
+		}
+		int localIndex = getLocalSites().length == 0 ? repoCombo.getItemCount() : repoCombo.getItemCount() - 1;
+		if (comboRepos == null || selection < 0) {
+			selection = INDEX_SITE_NONE;
+		}
+
+		if (selection == INDEX_SITE_NONE) {
+			repoChoice = AvailableIUGroup.AVAILABLE_NONE;
+		} else if (selection == INDEX_SITE_ALL) {
+			repoChoice = AvailableIUGroup.AVAILABLE_ALL;
+		} else if (selection >= localIndex) {
+			repoChoice = AvailableIUGroup.AVAILABLE_LOCAL;
+		} else {
+			repoChoice = AvailableIUGroup.AVAILABLE_SPECIFIED;
+			repoLocation = comboRepos[selection];
+		}
+
+		Object[] selectionListeners = listeners.getListeners();
+		for (int i = 0; i < selectionListeners.length; i++) {
+			((IRepositorySelectionListener) selectionListeners[i]).repositorySelectionChanged(repoChoice, repoLocation);
+		}
+	}
+
+	IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return ProvUI.getMetadataRepositoryManager(ui.getSession());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
index ee285d5..ffbb09b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
@@ -8,23 +8,20 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.core.runtime.Assert;
+import java.util.Collection;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.SWT;
@@ -45,8 +42,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 	private static final String DIALOG_SETTINGS_SECTION = "ResolutionResultsPage"; //$NON-NLS-1$
 
 	protected IUElementListRoot input;
-	PlannerResolutionOperation resolvedOperation;
-	protected Policy policy;
+	ProfileChangeOperation resolvedOperation;
 	TreeViewer treeViewer;
 	ProvElementContentProvider contentProvider;
 	IUDetailsLabelProvider labelProvider;
@@ -54,15 +50,18 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 	private IUDetailsGroup iuDetailsGroup;
 	SashForm sashForm;
 
-	protected ResolutionResultsWizardPage(Policy policy, IUElementListRoot input, String profileID, PlannerResolutionOperation resolvedOperation) {
-		super("ResolutionPage", profileID); //$NON-NLS-1$
-		this.policy = policy;
-		Assert.isNotNull(resolvedOperation);
-		this.resolvedOperation = resolvedOperation;
+	protected ResolutionResultsWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot input, ProfileChangeOperation operation) {
+		super("ResolutionPage", ui, wizard); //$NON-NLS-1$
+		// We can exist as an empty page, but if there is an operation, we need to know that it's resolved.
+		if (operation != null && !operation.hasResolved()) {
+			operation.resolveModal(null);
+		}
+		this.resolvedOperation = operation;
 		if (input == null)
 			this.input = new IUElementListRoot();
 		else
 			this.input = input;
+		updateStatus(input, resolvedOperation);
 	}
 
 	/*
@@ -96,8 +95,8 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 		for (int i = 0; i < columns.length; i++) {
 			TreeColumn tc = new TreeColumn(tree, SWT.LEFT, i);
 			tc.setResizable(true);
-			tc.setText(columns[i].columnTitle);
-			tc.setWidth(columns[i].getWidth());
+			tc.setText(columns[i].getColumnTitle());
+			tc.setWidth(columns[i].getWidthInPixels(tree));
 		}
 
 		treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -117,7 +116,7 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 		labelProvider = new IUDetailsLabelProvider(null, getColumnConfig(), getShell());
 		treeViewer.setLabelProvider(labelProvider);
 
-		setDrilldownElements(input, resolvedOperation.getProvisioningPlan());
+		setDrilldownElements(input, resolvedOperation);
 		treeViewer.setInput(input);
 
 		// Optional area to show the size
@@ -137,9 +136,8 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 	}
 
 	public boolean performFinish() {
-		if (resolvedOperation.getResolutionResult().getSummaryStatus().getSeverity() != IStatus.ERROR) {
-			ProfileModificationOperation op = createProfileModificationOperation(resolvedOperation);
-			ProvisioningOperationRunner.schedule(op, StatusManager.SHOW | StatusManager.LOG);
+		if (resolvedOperation.getResolutionResult().getSeverity() != IStatus.ERROR) {
+			getProvisioningUI().schedule(resolvedOperation.getProvisioningJob(null), StatusManager.SHOW | StatusManager.LOG);
 			return true;
 		}
 		return false;
@@ -149,8 +147,10 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 		return treeViewer;
 	}
 
-	public ProvisioningPlan getCurrentPlan() {
-		return resolvedOperation.getProvisioningPlan();
+	public IProvisioningPlan getCurrentPlan() {
+		if (resolvedOperation != null)
+			return resolvedOperation.getProvisioningPlan();
+		return null;
 	}
 
 	protected Object[] getSelectedElements() {
@@ -158,42 +158,61 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 	}
 
 	protected IInstallableUnit getSelectedIU() {
-		IInstallableUnit[] units = ElementUtils.elementsToIUs(getSelectedElements());
-		if (units.length == 0)
+		java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+		if (units.size() == 0)
 			return null;
-		return units[0];
+		return units.get(0);
 	}
 
-	protected String getProfileId() {
-		return profileId;
+	protected boolean shouldCompleteOnCancel() {
+		return false;
 	}
 
-	protected IInstallableUnit[] getIUs() {
+	protected Collection<IInstallableUnit> getIUs() {
 		return ElementUtils.elementsToIUs(input.getChildren(input));
 	}
 
-	void setDrilldownElements(IUElementListRoot root, ProvisioningPlan plan) {
-		if (plan == null)
+	void setDrilldownElements(IUElementListRoot root, ProfileChangeOperation operation) {
+		if (operation == null || operation.getProvisioningPlan() == null)
 			return;
 		Object[] elements = root.getChildren(root);
 		for (int i = 0; i < elements.length; i++) {
 			if (elements[i] instanceof QueriedElement) {
-				((QueriedElement) elements[i]).setQueryable(getQueryable(plan));
+				((QueriedElement) elements[i]).setQueryable(getQueryable(operation.getProvisioningPlan()));
 			}
 		}
 	}
 
-	private ProfileModificationOperation createProfileModificationOperation(PlannerResolutionOperation op) {
-		return new ProfileModificationOperation(getOperationLabel(), profileId, op.getProvisioningPlan(), op.getProvisioningContext());
+	protected abstract String getOperationLabel();
+
+	/**
+	 * Returns the restart policy for this operation.
+	 * 
+	 * @return an integer constant describing whether the running profile
+	 * needs to be restarted. 
+	 * 
+	 * @see ProvisioningJob#RESTART_NONE
+	 * @see ProvisioningJob#RESTART_ONLY
+	 * @see ProvisioningJob#RESTART_OR_APPLY
+	 *
+	 */
+	protected int getRestartPolicy() {
+		return ProvisioningJob.RESTART_OR_APPLY;
 	}
 
-	protected abstract String getOperationLabel();
+	/**
+	 * Returns the task name for this operation, or <code>null</code> to display
+	 * a generic task name.
+	 */
+	protected String getOperationTaskName() {
+		return null;
+	}
 
 	protected TreeViewer createTreeViewer(Composite parent) {
 		return new TreeViewer(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
 	}
 
-	protected abstract IQueryable getQueryable(ProvisioningPlan plan);
+	protected abstract IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan);
 
 	protected String getClipboardText(Control control) {
 		return CopyUtils.getIndentedClipboardText(getSelectedElements(), labelProvider);
@@ -207,16 +226,18 @@ public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
 		return treeViewer != null;
 	}
 
-	protected void updateCaches(IUElementListRoot newRoot, PlannerResolutionOperation op) {
+	protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
 		resolvedOperation = op;
-		setDrilldownElements(newRoot, resolvedOperation.getProvisioningPlan());
-		if (treeViewer != null) {
-			if (input != newRoot)
-				treeViewer.setInput(newRoot);
-			else
-				treeViewer.refresh();
+		if (newRoot != null) {
+			setDrilldownElements(newRoot, resolvedOperation);
+			if (treeViewer != null) {
+				if (input != newRoot)
+					treeViewer.setInput(newRoot);
+				else
+					treeViewer.refresh();
+			}
+			input = newRoot;
 		}
-		input = newRoot;
 	}
 
 	protected String getDialogSettingsName() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
index f96d3d9..f1af3f8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
@@ -11,16 +11,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.swt.custom.SashForm;
@@ -42,17 +39,20 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 	private static final String VERSION_COLUMN_WIDTH = "VersionColumnWidth"; //$NON-NLS-1$
 	private static final String ID_COLUMN_WIDTH = "IDColumnWidth"; //$NON-NLS-1$
 	private IUColumnConfig nameColumn, versionColumn, idColumn;
-	protected String profileId;
 
 	/**
 	 * @param pageName
 	 */
-	protected ResolutionStatusPage(String pageName, String profileId) {
-		super(pageName);
-		this.profileId = profileId;
+	protected ResolutionStatusPage(String pageName, ProvisioningUI ui, ProvisioningOperationWizard wizard) {
+		super(pageName, ui, wizard);
 	}
 
-	protected abstract void updateCaches(IUElementListRoot root, PlannerResolutionOperation resolvedOperation);
+	/**
+	 * Update the caches associated with this page.
+	 * @param root the new root, or <code>null</code> if the root should not be updated.
+	 * @param resolvedOperation the new operation
+	 */
+	protected abstract void updateCaches(IUElementListRoot root, ProfileChangeOperation resolvedOperation);
 
 	protected abstract boolean isCreated();
 
@@ -63,18 +63,17 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 	/**
 	 * Update the status area of the wizard to report the results of the operation.
 	 * 
-	 * @param newRoot the root that describes the root IUs involved in creating the plan
-	 * @param op the PlannerResolutionOperation that describes the plan that was created.  
-	 * Should not be <code>null</code>, but subclasses can be more forgiving.
+	 * @param newRoot the root that describes the root IUs involved in creating the plan.
+	 * 		This can be <code>null</code> if the root should not be updated.
+	 * 
+	 * @param op the ProfileChangeOperation that describes the operation
 	 */
-	public void updateStatus(IUElementListRoot newRoot, PlannerResolutionOperation op) {
-		Assert.isNotNull(op);
+	public void updateStatus(IUElementListRoot newRoot, ProfileChangeOperation op) {
+		IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
 		updateCaches(newRoot, op);
 
-		IStatus currentStatus;
 		int messageType = IMessageProvider.NONE;
-		boolean pageComplete = true;
-		currentStatus = op.getResolutionResult().getSummaryStatus();
+		boolean pageComplete = op != null;
 		if (currentStatus != null && !currentStatus.isOK()) {
 			messageType = IMessageProvider.INFORMATION;
 			int severity = currentStatus.getSeverity();
@@ -87,6 +86,8 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 				messageType = IMessageProvider.WARNING;
 				// Log warnings for later support
 				ProvUI.reportStatus(currentStatus, StatusManager.LOG);
+			} else if (severity == IStatus.CANCEL) {
+				pageComplete = shouldCompleteOnCancel();
 			}
 		}
 		setPageComplete(pageComplete);
@@ -97,9 +98,13 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 		setDetailText(op);
 	}
 
+	protected boolean shouldCompleteOnCancel() {
+		return true;
+	}
+
 	protected String getIUDescription(IInstallableUnit iu) {
 		// Get the iu description in the default locale
-		String description = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION);
+		String description = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
 		if (description == null)
 			description = ""; //$NON-NLS-1$
 		return description;
@@ -115,15 +120,20 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 		return ProvUIMessages.ResolutionWizardPage_WarningInfoStatus;
 	}
 
-	void setDetailText(PlannerResolutionOperation resolvedOperation) {
+	void setDetailText(ProfileChangeOperation resolvedOperation) {
 		String detail = null;
 		IInstallableUnit selectedIU = getSelectedIU();
 		IUDetailsGroup detailsGroup = getDetailsGroup();
+
 		// We either haven't resolved, or we failed to resolve and reported some error
-		// while doing so.  Since the specific error was already reported, the description
-		// text can be used for the selected IU.
-		if (resolvedOperation == null) {
-			if (selectedIU != null) {
+		// while doing so.  
+		if (resolvedOperation == null || !resolvedOperation.hasResolved() || getProvisioningWizard().statusOverridesOperation()) {
+			// See if the wizard status knows something more about it.
+			IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
+			if (!currentStatus.isOK()) {
+				detail = currentStatus.getMessage();
+				detailsGroup.enablePropertyLink(false);
+			} else if (selectedIU != null) {
 				detail = getIUDescription(selectedIU);
 				detailsGroup.enablePropertyLink(true);
 			} else {
@@ -136,28 +146,31 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 
 		// An IU is selected and we have resolved.  Look for information about the specific IU.
 		if (selectedIU != null) {
-			detail = resolvedOperation.getResolutionResult().getDetailedReport(new IInstallableUnit[] {selectedIU});
+			detail = resolvedOperation.getResolutionDetails(selectedIU);
 			if (detail != null) {
 				detailsGroup.enablePropertyLink(false);
 				detailsGroup.setDetailText(detail);
 				return;
 			}
 			// No specific error about this IU.  Show the overall error if it is in error.
-			if (resolvedOperation.getResolutionResult().getSummaryStatus().getSeverity() == IStatus.ERROR) {
-				detail = resolvedOperation.getResolutionResult().getSummaryReport();
-				detailsGroup.enablePropertyLink(false);
-				detailsGroup.setDetailText(detail);
-				return;
+			if (resolvedOperation.getResolutionResult().getSeverity() == IStatus.ERROR) {
+				detail = resolvedOperation.getResolutionDetails();
+				if (detail != null) {
+					detailsGroup.enablePropertyLink(false);
+					detailsGroup.setDetailText(detail);
+					return;
+				}
 			}
 
-			// The overall status is not an error, so we may as well just show info about this iu rather than everything.
+			// The overall status is not an error, or else there was no explanatory text for an error.
+			// We may as well just show info about this iu.
 			detailsGroup.enablePropertyLink(true);
 			detailsGroup.setDetailText(getIUDescription(selectedIU));
 			return;
 		}
 
 		//No IU is selected, give the overall report
-		detail = resolvedOperation.getResolutionResult().getSummaryReport();
+		detail = resolvedOperation.getResolutionDetails();
 		detailsGroup.enablePropertyLink(false);
 		if (detail == null)
 			detail = ""; //$NON-NLS-1$
@@ -220,11 +233,11 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 		if (section != null) {
 			try {
 				if (section.get(NAME_COLUMN_WIDTH) != null)
-					getNameColumn().columnWidth = section.getInt(NAME_COLUMN_WIDTH);
+					getNameColumn().setWidthInPixels(section.getInt(NAME_COLUMN_WIDTH));
 				if (section.get(VERSION_COLUMN_WIDTH) != null)
-					getVersionColumn().columnWidth = section.getInt(VERSION_COLUMN_WIDTH);
+					getVersionColumn().setWidthInPixels(section.getInt(VERSION_COLUMN_WIDTH));
 				if (section.get(ID_COLUMN_WIDTH) != null)
-					getIdColumn().columnWidth = section.getInt(ID_COLUMN_WIDTH);
+					getIdColumn().setWidthInPixels(section.getInt(ID_COLUMN_WIDTH));
 			} catch (NumberFormatException e) {
 				// Ignore if there actually was a value that didn't parse.  
 			}
@@ -250,9 +263,9 @@ public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
 	protected IUColumnConfig[] getColumnConfig() {
 		// We intentionally use the IU's id as one of the columns, because
 		// resolution errors are reported by ID.
-		nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
-		versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH));
-		idColumn = new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
+		nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH);
+		versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH);
+		idColumn = new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
 		getColumnWidthsFromSettings();
 		return new IUColumnConfig[] {nameColumn, versionColumn, idColumn};
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
index 0d34798..6817c76 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
@@ -8,22 +8,21 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.swt.SWT;
@@ -46,7 +45,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 
 	IUElementListRoot root;
 	Object[] initialSelections;
-	PlannerResolutionOperation resolvedOperation;
+	ProfileChangeOperation resolvedOperation;
 	CheckboxTableViewer tableViewer;
 	IUDetailsGroup iuDetailsGroup;
 	ProvElementContentProvider contentProvider;
@@ -55,12 +54,16 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 	protected Policy policy;
 	SashForm sashForm;
 
-	public SelectableIUsPage(Policy policy, IUElementListRoot root, Object[] initialSelections, String profileId) {
-		super("IUSelectionPage", profileId); //$NON-NLS-1$
+	public SelectableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, Object[] initialSelections) {
+		super("IUSelectionPage", ui, wizard); //$NON-NLS-1$
 		this.root = root;
-		this.policy = policy;
-		this.initialSelections = initialSelections;
-		this.profileId = profileId;
+		if (root == null)
+			root = new IUElementListRoot();
+		if (initialSelections == null)
+			this.initialSelections = new IInstallableUnit[0];
+		else
+			this.initialSelections = initialSelections;
+
 	}
 
 	/*
@@ -94,8 +97,8 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 		for (int i = 0; i < columns.length; i++) {
 			TableColumn tc = new TableColumn(table, SWT.LEFT, i);
 			tc.setResizable(true);
-			tc.setText(columns[i].columnTitle);
-			tc.setWidth(columns[i].getWidth());
+			tc.setText(columns[i].getColumnTitle());
+			tc.setWidth(columns[i].getWidthInPixels(table));
 		}
 
 		tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -106,7 +109,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 
 		tableViewer.addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
-				setPageComplete(tableViewer.getCheckedElements().length > 0);
+				updateSelection();
 			}
 		});
 
@@ -118,9 +121,9 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 
 		contentProvider = new ProvElementContentProvider();
 		tableViewer.setContentProvider(contentProvider);
-		tableViewer.setInput(root);
 		labelProvider = new IUDetailsLabelProvider(null, ProvUI.getIUColumnConfig(), getShell());
 		tableViewer.setLabelProvider(labelProvider);
+		tableViewer.setInput(root);
 		setInitialCheckState();
 
 		// Select and Deselect All buttons
@@ -151,7 +154,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 		selectAll.addListener(SWT.Selection, new Listener() {
 			public void handleEvent(Event event) {
 				tableViewer.setAllChecked(true);
-				setPageComplete(tableViewer.getCheckedElements().length > 0);
+				updateSelection();
 			}
 		});
 
@@ -161,7 +164,7 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 		deselectAll.addListener(SWT.Selection, new Listener() {
 			public void handleEvent(Event event) {
 				tableViewer.setAllChecked(false);
-				setPageComplete(tableViewer.getCheckedElements().length > 0);
+				updateSelection();
 			}
 		});
 
@@ -201,13 +204,14 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 	protected IInstallableUnit[] elementsToIUs(Object[] elements) {
 		IInstallableUnit[] theIUs = new IInstallableUnit[elements.length];
 		for (int i = 0; i < elements.length; i++) {
-			theIUs[i] = (IInstallableUnit) ProvUI.getAdapter(elements[i], IInstallableUnit.class);
+			theIUs[i] = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
 		}
 		return theIUs;
 	}
 
 	protected void setInitialCheckState() {
-		tableViewer.setCheckedElements(initialSelections);
+		if (initialSelections != null)
+			tableViewer.setCheckedElements(initialSelections);
 	}
 
 	/*
@@ -246,35 +250,10 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 	}
 
 	protected IInstallableUnit getSelectedIU() {
-		IInstallableUnit[] units = ElementUtils.elementsToIUs(getSelectedElements());
-		if (units.length == 0)
+		java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
+		if (units.size() == 0)
 			return null;
-		return units[0];
-	}
-
-	/*
-	 * Overridden to handle conditions where continuing with the operation should not be allowed.
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage#updateStatus(org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot, org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation)
-	 */
-	public void updateStatus(IUElementListRoot newRoot, PlannerResolutionOperation op) {
-		IStatus specialStatus = null;
-		if (ProvisioningOperationRunner.hasScheduledOperationsFor(profileId)) {
-			specialStatus = PlanAnalyzer.getStatus(IStatusCodes.OPERATION_ALREADY_IN_PROGRESS, null);
-		} else if (op == null) {
-			specialStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ProfileModificationWizardPage_UnexpectedError, null);
-		}
-		if (specialStatus == null) {
-			super.updateStatus(newRoot, op);
-		} else {
-			updateCaches(newRoot, op);
-			setPageComplete(false);
-			if (!isCreated())
-				return;
-			getDetailsGroup().setDetailText(specialStatus.getMessage());
-			setMessage(getMessageText(specialStatus), IMessageProvider.ERROR);
-
-		}
+		return units.get(0);
 	}
 
 	protected IUDetailsGroup getDetailsGroup() {
@@ -285,11 +264,18 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 		return tableViewer != null;
 	}
 
-	protected void updateCaches(IUElementListRoot newRoot, PlannerResolutionOperation op) {
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage#updateCaches(org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot, org.eclipse.equinox.p2.operations.ProfileChangeOperation)
+	 */
+	protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
 		resolvedOperation = op;
-		if (root != newRoot && tableViewer != null)
-			tableViewer.setInput(newRoot);
-		root = newRoot;
+		if (newRoot != null && root != newRoot) {
+			root = newRoot;
+			if (tableViewer != null)
+				tableViewer.setInput(newRoot);
+		}
+
 	}
 
 	/* (non-Javadoc)
@@ -313,4 +299,9 @@ public class SelectableIUsPage extends ResolutionStatusPage implements IResoluti
 	protected int getColumnWidth(int index) {
 		return tableViewer.getTable().getColumn(index).getWidth();
 	}
+
+	void updateSelection() {
+		setPageComplete(tableViewer.getCheckedElements().length > 0);
+		getProvisioningWizard().operationSelectionsChanged(this);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
index 1dd4d6f..cffaa32 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
@@ -12,18 +12,17 @@ package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import java.text.NumberFormat;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ValidationDialogServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -38,34 +37,30 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
 	protected Label sizeInfo;
 	protected long size;
 	Job sizingJob;
-	private ProvisioningPlan lastComputedPlan = null;
+	private IProvisioningPlan lastComputedPlan = null;
 
-	protected SizeComputingWizardPage(Policy policy, IUElementListRoot root, String profileID, PlannerResolutionOperation initialResolution) {
-		super(policy, root, profileID, initialResolution);
+	protected SizeComputingWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, ProfileChangeOperation initialResolution) {
+		super(ui, wizard, root, initialResolution);
 		// Compute size immediately if a plan is available.  This may or may not finish before
 		// the widgetry is created.
-		if (initialResolution != null)
-			computeSizing(initialResolution.getProvisioningPlan(), profileID, initialResolution.getProvisioningContext());
+		if (initialResolution != null && initialResolution.hasResolved())
+			computeSizing(initialResolution.getProvisioningPlan(), initialResolution.getProvisioningContext());
 		else
 			// Set the size to indicate there is no size yet.
-			size = IIUElement.SIZE_NOTAPPLICABLE;
+			size = ProvUI.SIZE_NOTAPPLICABLE;
 	}
 
-	protected void computeSizing(final ProvisioningPlan plan, final String id, final ProvisioningContext provisioningContext) {
+	protected void computeSizing(final IProvisioningPlan plan, final ProvisioningContext provisioningContext) {
 		if (plan == lastComputedPlan)
 			return;
 		lastComputedPlan = plan;
-		size = IIUElement.SIZE_UNKNOWN;
+		size = ProvUI.SIZE_UNKNOWN;
 		updateSizingInfo();
 		if (sizingJob != null)
 			sizingJob.cancel();
 		sizingJob = new Job(ProvUIMessages.SizeComputingWizardPage_SizeJobTitle) {
 			protected IStatus run(IProgressMonitor monitor) {
-				try {
-					size = ProvisioningUtil.getSize(plan, id, provisioningContext, monitor);
-				} catch (ProvisionException e) {
-					return e.getStatus();
-				}
+				size = ProvUI.getSize(ProvUI.getEngine(getProvisioningUI().getSession()), plan, provisioningContext, monitor);
 				if (monitor.isCanceled())
 					return Status.CANCEL_STATUS;
 				if (display != null) {
@@ -81,13 +76,8 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
 		};
 		sizingJob.setUser(false);
 		sizingJob.setSystem(true);
-		sizingJob.setProperty(ValidationDialogServiceUI.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
+		sizingJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
 		sizingJob.schedule();
-		sizingJob.addJobChangeListener(new JobChangeAdapter() {
-			public void done(IJobChangeEvent event) {
-				sizingJob = null;
-			}
-		});
 	}
 
 	protected void createSizingInfo(Composite parent) {
@@ -99,7 +89,7 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
 
 	protected void updateSizingInfo() {
 		if (sizeInfo != null && !sizeInfo.isDisposed()) {
-			if (size == IIUElement.SIZE_NOTAPPLICABLE)
+			if (size == ProvUI.SIZE_NOTAPPLICABLE)
 				sizeInfo.setVisible(false);
 			else {
 				sizeInfo.setText(NLS.bind(ProvUIMessages.UpdateOrInstallWizardPage_Size, getFormattedSize()));
@@ -109,7 +99,7 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
 	}
 
 	protected String getFormattedSize() {
-		if (size == IIUElement.SIZE_UNKNOWN || size == IIUElement.SIZE_UNAVAILABLE)
+		if (size == ProvUI.SIZE_UNKNOWN || size == ProvUI.SIZE_UNAVAILABLE)
 			return ProvUIMessages.IUDetailsLabelProvider_Unknown;
 		if (size > 1000L) {
 			long kb = size / 1000L;
@@ -125,13 +115,13 @@ public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPag
 		}
 	}
 
-	public void updateStatus(IUElementListRoot root, PlannerResolutionOperation op) {
+	public void updateStatus(IUElementListRoot root, ProfileChangeOperation op) {
 		super.updateStatus(root, op);
-		if (op.getProvisioningPlan() != null)
-			computeSizing(op.getProvisioningPlan(), getProfileId(), op.getProvisioningContext());
+		if (op != null && op.getProvisioningPlan() != null)
+			computeSizing(op.getProvisioningPlan(), op.getProvisioningContext());
 	}
 
-	protected IQueryable getQueryable(ProvisioningPlan plan) {
+	protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
 		return plan.getAdditions();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
index 5564df7..c298a72 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
@@ -7,15 +7,19 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
+import java.util.List;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
@@ -36,21 +40,22 @@ public abstract class StructuredIUGroup {
 	private FontMetrics fm;
 	protected StructuredViewer viewer;
 	private Composite composite;
-	private Policy policy;
+	private ProvisioningUI ui;
 	private IUColumnConfig[] columnConfig;
+	private QueryProvider queryProvider;
 
 	/**
 	 * Create a group that represents the available IU's.
 	 * 
-	 * @param policy The application policy to use in the group
+	 * @param ui The application policy to use in the group
 	 * @param parent the parent composite for the group
 	 * to retrieve elements in the viewer.
 	 * @param font The font to use for calculating pixel sizes.  This font is
 	 * not managed by the receiver.
 	 * @param columnConfig the columns to be shown
 	 */
-	protected StructuredIUGroup(Policy policy, Composite parent, Font font, IUColumnConfig[] columnConfig) {
-		this.policy = policy;
+	protected StructuredIUGroup(ProvisioningUI ui, Composite parent, Font font, IUColumnConfig[] columnConfig) {
+		this.ui = ui;
 		if (columnConfig == null)
 			this.columnConfig = ProvUI.getIUColumnConfig();
 		else
@@ -102,7 +107,7 @@ public abstract class StructuredIUGroup {
 		return columnConfig;
 	}
 
-	public IInstallableUnit[] getSelectedIUs() {
+	public List<IInstallableUnit> getSelectedIUs() {
 		return ElementUtils.elementsToIUs(getSelectedIUElements());
 	}
 
@@ -127,11 +132,21 @@ public abstract class StructuredIUGroup {
 	}
 
 	protected QueryProvider getQueryProvider() {
-		return policy.getQueryProvider();
+		if (queryProvider == null)
+			queryProvider = new QueryProvider(ui);
+		return queryProvider;
 	}
 
 	protected Policy getPolicy() {
-		return policy;
+		return ui.getPolicy();
+	}
+
+	protected ProvisioningSession getSession() {
+		return ui.getSession();
+	}
+
+	protected ProvisioningUI getProvisioningUI() {
+		return ui;
 	}
 
 	protected Control getDefaultFocusControl() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
new file mode 100644
index 0000000..f5afea5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.UninstallOperation;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.wizard.IWizardPage;
+
+/**
+ * @since 3.4
+ */
+public class UninstallWizard extends ProvisioningOperationWizard {
+
+	public UninstallWizard(ProvisioningUI ui, UninstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob job) {
+		super(ui, operation, initialSelections.toArray(), job);
+		setWindowTitle(ProvUIMessages.UninstallIUOperationLabel);
+		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL));
+	}
+
+	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
+		mainPage = new SelectableIUsPage(ui, this, input, selections);
+		mainPage.setTitle(ProvUIMessages.UninstallIUOperationLabel);
+		mainPage.setDescription(ProvUIMessages.UninstallDialog_UninstallMessage);
+		((SelectableIUsPage) mainPage).updateStatus(input, operation);
+		return mainPage;
+	}
+
+	protected ResolutionResultsWizardPage createResolutionPage() {
+		return new UninstallWizardPage(ui, this, root, (UninstallOperation) operation);
+	}
+
+	protected void initializeResolutionModelElements(Object[] selectedElements) {
+		root = new IUElementListRoot();
+		ArrayList<InstalledIUElement> list = new ArrayList<InstalledIUElement>(selectedElements.length);
+		ArrayList<InstalledIUElement> selections = new ArrayList<InstalledIUElement>(selectedElements.length);
+		for (int i = 0; i < selectedElements.length; i++) {
+			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
+			if (iu != null) {
+				InstalledIUElement element = new InstalledIUElement(root, getProfileId(), iu);
+				list.add(element);
+				selections.add(element);
+			}
+		}
+		root.setChildren(list.toArray());
+		planSelections = selections.toArray();
+	}
+
+	protected IResolutionErrorReportingPage createErrorReportingPage() {
+		return (SelectableIUsPage) mainPage;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#getStartingPage()
+	 */
+	public IWizardPage getStartingPage() {
+		if (getCurrentStatus().isOK()) {
+			((SelectableIUsPage) mainPage).setPageComplete(true);
+			return resolutionPage;
+		}
+		return super.getStartingPage();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
+		UninstallOperation op = new UninstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
+		op.setProfileId(getProfileId());
+		//		op.setRootMarkerKey(getRootMarkerKey());
+		op.setProvisioningContext(getProvisioningContext());
+		return op;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
index c6ebc3b..376bbed 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
@@ -10,18 +10,18 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.UninstallOperation;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 public class UninstallWizardPage extends ResolutionResultsWizardPage {
 
-	public UninstallWizardPage(Policy policy, IUElementListRoot root, String profileId, PlannerResolutionOperation initialResolution) {
-		super(policy, root, profileId, initialResolution);
+	public UninstallWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, UninstallOperation initialResolution) {
+		super(ui, wizard, root, initialResolution);
 		setTitle(ProvUIMessages.UninstallWizardPage_Title);
 		setDescription(ProvUIMessages.UninstallWizardPage_Description);
 	}
@@ -30,7 +30,11 @@ public class UninstallWizardPage extends ResolutionResultsWizardPage {
 		return ProvUIMessages.UninstallIUOperationLabel;
 	}
 
-	protected IQueryable getQueryable(ProvisioningPlan plan) {
+	protected String getOperationTaskName() {
+		return ProvUIMessages.UninstallIUOperationTask;
+	}
+
+	protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
 		return plan.getRemovals();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
new file mode 100644
index 0000000..26f230c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
@@ -0,0 +1,97 @@
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.net.MalformedURLException;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.Update;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+public class UpdateSingleIUPage extends ProvisioningWizardPage {
+
+	UpdateOperation operation;
+
+	protected UpdateSingleIUPage(UpdateOperation operation, ProvisioningUI ui) {
+		super("UpdateSingleIUPage", ui, null); //$NON-NLS-1$
+		setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
+		IProduct product = Platform.getProduct();
+		String productName = product != null && product.getName() != null ? product.getName() : ProvUIMessages.ApplicationInRestartDialog;
+		setDescription(NLS.bind(ProvUIMessages.UpdateSingleIUPage_SingleUpdateDescription, productName));
+		Assert.isNotNull(operation);
+		Assert.isTrue(operation.hasResolved());
+		Assert.isTrue(operation.getSelectedUpdates().length == 1);
+		Assert.isTrue(operation.getResolutionResult().isOK());
+		this.operation = operation;
+	}
+
+	public void createControl(Composite parent) {
+		IInstallableUnit updateIU = getUpdate().replacement;
+		String url = null;
+		if (updateIU.getUpdateDescriptor().getLocation() != null)
+			try {
+				url = URIUtil.toURL(updateIU.getUpdateDescriptor().getLocation()).toExternalForm();
+			} catch (MalformedURLException e) {
+				// ignore and null URL will be ignored below
+			}
+		if (url != null) {
+			Browser browser = null;
+			try {
+				browser = new Browser(parent, SWT.NONE);
+				browser.setUrl(url);
+				browser.setBackground(parent.getBackground());
+				setControl(browser);
+				return;
+			} catch (SWTError e) {
+				// Fall through to backup plan.
+			}
+		}
+		// Create a text description of the update.
+		Text text = new Text(parent, SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY);
+		text.setBackground(parent.getBackground());
+		text.setText(getUpdateText(updateIU));
+		setControl(text);
+	}
+
+	private String getUpdateText(IInstallableUnit iu) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(new IUDetailsLabelProvider().getClipboardText(getUpdate().replacement, CopyUtils.DELIMITER));
+		buffer.append(CopyUtils.NEWLINE);
+		buffer.append(CopyUtils.NEWLINE);
+		String text = iu.getUpdateDescriptor().getDescription();
+		if (text != null)
+			buffer.append(text);
+		else {
+			text = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION);
+			if (text != null)
+				buffer.append(text);
+		}
+		return buffer.toString();
+
+	}
+
+	public boolean performFinish() {
+		if (operation.getResolutionResult().getSeverity() != IStatus.ERROR) {
+			getProvisioningUI().schedule(operation.getProvisioningJob(null), StatusManager.SHOW | StatusManager.LOG);
+			return true;
+		}
+		return false;
+	}
+
+	@Override
+	protected String getClipboardText(Control control) {
+		return getUpdate().toString();
+	}
+
+	private Update getUpdate() {
+		return operation.getSelectedUpdates()[0];
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
new file mode 100644
index 0000000..dd4dd2e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.AcceptLicensesWizardPage;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.wizard.Wizard;
+
+/**
+ * An update wizard that is invoked when there is only one thing to update, only
+ * one update to choose, and the resolution is known to be successful.
+ * 
+ * @since 3.6
+ */
+public class UpdateSingleIUWizard extends Wizard {
+
+	UpdateSingleIUPage mainPage;
+	ProvisioningUI ui;
+	UpdateOperation operation;
+
+	public static boolean validFor(UpdateOperation operation) {
+		return operation.hasResolved() && operation.getResolutionResult().isOK() && operation.getSelectedUpdates().length == 1;
+	}
+
+	public UpdateSingleIUWizard(ProvisioningUI ui, UpdateOperation operation) {
+		super();
+		this.ui = ui;
+		this.operation = operation;
+		setWindowTitle(ProvUIMessages.UpdateIUOperationLabel);
+		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE));
+	}
+
+	protected UpdateSingleIUPage createMainPage() {
+		mainPage = new UpdateSingleIUPage(operation, ui);
+		return mainPage;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#addPages()
+	 */
+	public void addPages() {
+		mainPage = createMainPage();
+		addPage(mainPage);
+		AcceptLicensesWizardPage page = createLicensesPage();
+		page.update(null, operation);
+		if (page.hasLicensesToAccept())
+			addPage(page);
+	}
+
+	protected AcceptLicensesWizardPage createLicensesPage() {
+		return new AcceptLicensesWizardPage(ui.getLicenseManager(), null, operation);
+	}
+
+	@Override
+	public boolean performFinish() {
+		return mainPage.performFinish();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
new file mode 100644
index 0000000..ee3c10e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Genuitec, LLC - added license support
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.dialogs;
+
+import java.util.*;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.model.AvailableUpdateElement;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.wizard.IWizardPage;
+
+/**
+ * @since 3.4
+ */
+public class UpdateWizard extends WizardWithLicenses {
+	IInstallableUnit[] iusToReplace;
+	boolean skipSelectionsPage = false;
+	IUElementListRoot firstPageRoot;
+
+	public static Collection<IInstallableUnit> getIUsToReplace(Object[] elements) {
+		Set<IInstallableUnit> iusToReplace = new HashSet<IInstallableUnit>();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i] instanceof AvailableUpdateElement) {
+				iusToReplace.add(((AvailableUpdateElement) elements[i]).getIUToBeUpdated());
+			}
+		}
+		return iusToReplace;
+	}
+
+	public static IInstallableUnit[] getReplacementIUs(Object[] elements) {
+		Set<IInstallableUnit> replacements = new HashSet<IInstallableUnit>();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i] instanceof AvailableUpdateElement) {
+				replacements.add(((AvailableUpdateElement) elements[i]).getIU());
+			}
+		}
+		return replacements.toArray(new IInstallableUnit[replacements.size()]);
+	}
+
+	public static Update[] makeUpdatesFromElements(Object[] elements) {
+		Set<Update> updates = new HashSet<Update>();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i] instanceof AvailableUpdateElement) {
+				updates.add(((AvailableUpdateElement) elements[i]).getUpdate());
+			}
+		}
+		return updates.toArray(new Update[updates.size()]);
+	}
+
+	/**
+	 * Open an update wizard.  For update wizards, the operation must have been resolved in advanced.
+	 * This prevents searching for updates in the UI thread.
+	 * 
+	 * @param ui the provisioning UI
+	 * @param operation the update operation.  Must already be resolved!
+	 * @param initialSelections initial selections for the wizard (can be null)
+	 * @param preloadJob a job that has been used to preload metadata repositories (can be null)
+	 */
+	public UpdateWizard(ProvisioningUI ui, UpdateOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob preloadJob) {
+		super(ui, operation, initialSelections, preloadJob);
+		Assert.isLegal(operation.hasResolved(), "Cannot create an update wizard on an unresolved operation"); //$NON-NLS-1$
+		setWindowTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
+		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE));
+	}
+
+	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
+		mainPage = new SelectableIUsPage(ui, this, getAllPossibleUpdatesRoot(), selections);
+		mainPage.setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
+		mainPage.setDescription(ProvUIMessages.UpdateAction_UpdatesAvailableMessage);
+		((SelectableIUsPage) mainPage).updateStatus(getAllPossibleUpdatesRoot(), operation);
+		return mainPage;
+	}
+
+	protected ResolutionResultsWizardPage createResolutionPage() {
+		return new UpdateWizardPage(ui, this, root, (UpdateOperation) operation);
+	}
+
+	protected void initializeResolutionModelElements(Object[] selectedElements) {
+		root = new IUElementListRoot();
+		ArrayList<AvailableUpdateElement> list = new ArrayList<AvailableUpdateElement>(selectedElements.length);
+		ArrayList<AvailableUpdateElement> selected = new ArrayList<AvailableUpdateElement>(selectedElements.length);
+		for (int i = 0; i < selectedElements.length; i++) {
+			if (selectedElements[i] instanceof AvailableUpdateElement) {
+				AvailableUpdateElement element = (AvailableUpdateElement) selectedElements[i];
+				AvailableUpdateElement newElement = new AvailableUpdateElement(root, element.getIU(), element.getIUToBeUpdated(), getProfileId(), shouldShowProvisioningPlanChildren());
+				list.add(newElement);
+				selected.add(newElement);
+			} else if (selectedElements[i] instanceof Update) {
+				Update update = (Update) selectedElements[i];
+				AvailableUpdateElement newElement = new AvailableUpdateElement(root, update.replacement, update.toUpdate, getProfileId(), shouldShowProvisioningPlanChildren());
+				list.add(newElement);
+				selected.add(newElement);
+			}
+		}
+		root.setChildren(list.toArray());
+		planSelections = selected.toArray();
+	}
+
+	protected IResolutionErrorReportingPage createErrorReportingPage() {
+		return (SelectableIUsPage) mainPage;
+	}
+
+	public void setSkipSelectionsPage(boolean skipSelectionsPage) {
+		this.skipSelectionsPage = skipSelectionsPage;
+	}
+
+	public IWizardPage getStartingPage() {
+		if (skipSelectionsPage) {
+			// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276963
+			IWizardPage page = getNextPage(mainPage);
+			if (page != null)
+				return page;
+		}
+		return mainPage;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
+	 */
+	protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
+		if (operation == null) {
+			operation = new UpdateOperation(ui.getSession(), getIUsToReplace(elements));
+			operation.setProfileId(getProfileId());
+			//			operation.setRootMarkerKey(getRootMarkerKey());
+			operation.setProvisioningContext(getProvisioningContext());
+
+		} else {
+			((UpdateOperation) operation).setSelectedUpdates(makeUpdatesFromElements(elements));
+		}
+		return operation;
+	}
+
+	private IUElementListRoot getAllPossibleUpdatesRoot() {
+		if (firstPageRoot == null) {
+			firstPageRoot = new IUElementListRoot();
+			if (operation != null && operation instanceof UpdateOperation) {
+				Update[] updates;
+				if (getPolicy().getShowLatestVersionsOnly()) {
+					updates = ((UpdateOperation) operation).getSelectedUpdates();
+				} else {
+					updates = ((UpdateOperation) operation).getPossibleUpdates();
+				}
+				ArrayList<AvailableUpdateElement> allPossible = new ArrayList<AvailableUpdateElement>(updates.length);
+				for (int i = 0; i < updates.length; i++) {
+					AvailableUpdateElement newElement = new AvailableUpdateElement(firstPageRoot, updates[i].replacement, updates[i].toUpdate, getProfileId(), shouldShowProvisioningPlanChildren());
+					allPossible.add(newElement);
+				}
+				firstPageRoot.setChildren(allPossible.toArray());
+			}
+		}
+		return firstPageRoot;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
index ecd3fdf..c8bf6dd 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
@@ -10,18 +10,18 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
 
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 public class UpdateWizardPage extends SizeComputingWizardPage {
 
-	public UpdateWizardPage(Policy policy, IUElementListRoot root, String profileId, PlannerResolutionOperation initialResolution) {
-		super(policy, root, profileId, initialResolution);
+	public UpdateWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, UpdateOperation operation) {
+		super(ui, wizard, root, operation);
 		setTitle(ProvUIMessages.UpdateWizardPage_Title);
 		setDescription(ProvUIMessages.UpdateWizardPage_Description);
 	}
@@ -38,4 +38,8 @@ public class UpdateWizardPage extends SizeComputingWizardPage {
 	protected String getOperationLabel() {
 		return ProvUIMessages.UpdateIUOperationLabel;
 	}
+
+	protected String getOperationTaskName() {
+		return ProvUIMessages.UpdateIUOperationTask;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
index 19f46c6..9f2045c 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
@@ -10,10 +10,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
+import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
+
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI.AuthenticationInfo;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
@@ -23,7 +24,7 @@ import org.eclipse.swt.widgets.*;
 /**
  * A dialog to prompt the user for login information such as user name and password.
  */
-public class UserValidationDialog extends MessageDialog {
+public class UserValidationDialog extends Dialog {
 
 	private Text username;
 	private Text password;
@@ -31,18 +32,80 @@ public class UserValidationDialog extends MessageDialog {
 
 	private Button saveButton;
 
-	public UserValidationDialog(Shell parentShell, String titleMessage, Image titleImage, String message, String[] buttonLabels) {
-		super(parentShell, titleMessage, titleImage, message, MessageDialog.QUESTION, buttonLabels, 0);
+	private String titleMessage;
+	private Image titleImage;
+
+	private String message;
+
+	private int dialogImageType;
+
+	/**
+	 * Creates a new validation dialog that prompts the user for login credentials.
+	 * 
+	 * @param parentShell the parent shell of this dialog
+	 * @param titleMessage the message to be displayed by this dialog's window
+	 * @param titleImage the image of this shell, may be <code>null</code>
+	 * @param message the message to prompt to the user
+	 */
+	public UserValidationDialog(Shell parentShell, String titleMessage, Image titleImage, String message) {
+		this(null, parentShell, titleMessage, titleImage, message, SWT.ICON_QUESTION);
 	}
 
-	public UserValidationDialog(AuthenticationInfo lastUsed, Shell parentShell, String titleMessage, Image titleImage, String message, String[] buttonLabels) {
-		super(parentShell, titleMessage, titleImage, message, MessageDialog.WARNING, buttonLabels, 0);
+	/**
+	 * Creates a new validation dialog that prompts the user for login credentials.
+	 * 
+	 * @param lastUsed the authentication information that was originally as an attempt to login
+	 * @param parentShell the parent shell of this dialog
+	 * @param titleMessage the message to be displayed by this dialog's window
+	 * @param titleImage the image of this shell, may be <code>null</code>
+	 * @param message the message to prompt to the user
+	 */
+	public UserValidationDialog(AuthenticationInfo lastUsed, Shell parentShell, String titleMessage, Image titleImage, String message) {
+		this(lastUsed, parentShell, titleMessage, titleImage, message, SWT.ICON_WARNING);
+	}
+
+	private UserValidationDialog(AuthenticationInfo lastUsed, Shell parentShell, String titleMessage, Image titleImage, String message, int dialogImageType) {
+		super(parentShell);
 		result = lastUsed;
+
+		this.titleMessage = titleMessage;
+		this.titleImage = titleImage;
+		this.message = message;
+		this.dialogImageType = dialogImageType;
+	}
+
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		newShell.setText(titleMessage);
+		newShell.setImage(titleImage);
 	}
 
 	protected Control createDialogArea(Composite parent) {
 		Composite composite = (Composite) super.createDialogArea(parent);
 
+		Composite container = new Composite(composite, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		container.setLayout(layout);
+		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+		createImageSection(container);
+		createFieldsSection(container);
+
+		Dialog.applyDialogFont(composite);
+
+		return composite;
+	}
+
+	private void createImageSection(Composite composite) {
+		Image image = composite.getDisplay().getSystemImage(dialogImageType);
+		if (image != null) {
+			Label label = new Label(composite, SWT.NONE);
+			label.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+			label.setImage(image);
+		}
+	}
+
+	private void createFieldsSection(Composite composite) {
 		Composite fieldContainer = new Composite(composite, SWT.NONE);
 		GridLayout layout = new GridLayout();
 		layout.numColumns = 2;
@@ -50,43 +113,35 @@ public class UserValidationDialog extends MessageDialog {
 		GridData layoutData = new GridData();
 		fieldContainer.setLayoutData(layoutData);
 
-		Label label = new Label(fieldContainer, SWT.NONE);
+		Label label = new Label(fieldContainer, SWT.WRAP | SWT.LEAD);
+		GridData data = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1);
+		data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+		label.setLayoutData(data);
+		label.setText(message);
+
+		label = new Label(fieldContainer, SWT.NONE);
 		label.setText(ProvUIMessages.UserValidationDialog_UsernameLabel);
 		username = new Text(fieldContainer, SWT.BORDER);
-		layoutData = new GridData(GridData.FILL_HORIZONTAL);
-		layoutData.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
-		layoutData.horizontalAlignment = SWT.END;
+		layoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
 		username.setLayoutData(layoutData);
 		username.setText(getUserName());
 
 		label = new Label(fieldContainer, SWT.NONE);
 		label.setText(ProvUIMessages.UserValidationDialog_PasswordLabel);
 		password = new Text(fieldContainer, SWT.PASSWORD | SWT.BORDER);
-		layoutData = new GridData(GridData.FILL_HORIZONTAL);
-		layoutData.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
-		layoutData.horizontalAlignment = SWT.END;
+		layoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
 		password.setLayoutData(layoutData);
 		password.setText(getPassword());
 
-		Composite checkboxContainer = new Composite(composite, SWT.NONE);
-		layout = new GridLayout();
-		checkboxContainer.setLayout(layout);
-		layoutData = new GridData();
-		layoutData.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
-		checkboxContainer.setLayoutData(layoutData);
-		saveButton = new Button(checkboxContainer, SWT.CHECK);
+		saveButton = new Button(fieldContainer, SWT.CHECK);
+		saveButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
 		saveButton.setText(ProvUIMessages.UserValidationDialog_SavePasswordButton);
 		saveButton.setSelection(saveResult());
-
-		username.setFocus();
-
-		return composite;
 	}
 
-	protected void buttonPressed(int buttonId) {
-		if (buttonId == getDefaultButtonIndex())
-			this.result = new AuthenticationInfo(username.getText(), password.getText(), saveButton.getSelection());
-		super.buttonPressed(buttonId);
+	protected void okPressed() {
+		this.result = new AuthenticationInfo(username.getText(), password.getText(), saveButton.getSelection());
+		super.okPressed();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
index 2217862..8f5765b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
@@ -8,19 +8,15 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *     David Dubrow <david.dubrow at nokia.com> - Bug 276356 [ui] check the wizard and page completion logic for AcceptLicensesWizardPage
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.dialogs;
 
 import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.AcceptLicensesWizardPage;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.ui.*;
 import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.widgets.Display;
 
 /**
  * Common superclass for wizards that need to show licenses.
@@ -30,62 +26,52 @@ public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
 
 	AcceptLicensesWizardPage licensePage;
 
-	public WizardWithLicenses(Policy policy, String profileId, IUElementListRoot root, Object[] initialSelections, PlannerResolutionOperation initialResolution) {
-		super(policy, profileId, root, initialSelections, initialResolution);
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#addPages()
+	 */
+	public void addPages() {
+		super.addPages();
+		licensePage = createLicensesPage();
+		addPage(licensePage);
 	}
 
-	protected AcceptLicensesWizardPage createLicensesPage(IInstallableUnit[] ius, ProvisioningPlan plan) {
-		return new AcceptLicensesWizardPage(policy, ius, plan);
+	public WizardWithLicenses(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
+		super(ui, operation, initialSelections, job);
 	}
 
-	public void addPages() {
-		super.addPages();
+	protected AcceptLicensesWizardPage createLicensesPage() {
+		IInstallableUnit[] ius = new IInstallableUnit[0];
+		if (planSelections != null)
+			ius = ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]);
+		return new AcceptLicensesWizardPage(ui.getLicenseManager(), ius, operation);
 	}
 
+	/*
+	 * Overridden to determine whether the license page should be shown.
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
+	 */
 	public IWizardPage getNextPage(IWizardPage page) {
-		if (page == resolutionPage) {
-			if (licensePage == null) {
-				licensePage = createLicensesPage(ElementUtils.elementsToIUs(mainPage.getCheckedIUElements()), resolutionPage.getCurrentPlan());
-				addPage(licensePage);
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						IWizardContainer container = getContainer();
-						if (container != null)
-							container.updateButtons();
-					}
-				});
-
-			}
-			if (licensePage.hasLicensesToAccept()) {
-				return licensePage;
-			}
-			return null;
-		} else if (page == licensePage) {
-			// we are done.  We explicitly code this because it's possible
-			// that the license page is added to the wizard before a dynamic page that
-			// gets added afterward, but should appear before.  
+		// If the license page is supposed to be the next page,
+		// ensure there are actually licenses that need acceptance.
+		IWizardPage proposedPage = super.getNextPage(page);
+		if (proposedPage != licensePage)
+			return proposedPage;
+		if (!licensePage.hasLicensesToAccept())
 			return null;
-		}
-		return super.getNextPage(page);
+		return licensePage;
 	}
 
 	protected void planChanged() {
 		super.planChanged();
-		if (resolutionOperation == null)
-			return;
-		if (licensePage == null) {
-			licensePage = createLicensesPage(ElementUtils.elementsToIUs(mainPage.getCheckedIUElements()), resolutionOperation.getProvisioningPlan());
-			addPage(licensePage);
-		} else
-			licensePage.update(ElementUtils.elementsToIUs(mainPage.getCheckedIUElements()), resolutionOperation.getProvisioningPlan());
-		// Status of license page could change status of wizard next button
-		// If no current page has been set yet (ie, we are still being created)
-		// then the updateButtons() method will NPE.  This check is needed in
-		// order to run the automated test cases.
-		if (getContainer().getCurrentPage() != null)
-			getContainer().updateButtons();
+		licensePage.update(ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]), operation);
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#performFinish()
+	 */
 	public boolean performFinish() {
 		licensePage.performFinish();
 		return super.performFinish();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
index 2370191..7a35c6f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
@@ -9,59 +9,44 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-ProfileChangeRequestBuildingRequest=Processing request
-ProfileElement_InvalidProfile=Invalid profile ID {0}
 ProfileModificationAction_InvalidSelections=Problem determining user request.  Profile id: {0}, Selection count: {1}
-ProfileModificationAction_NoChangeRequestProvided=Could not interpret the request
-ProfileModificationAction_NoExplanationProvided=Unexpected error while processing the request.
-ProfileModificationAction_ResolutionOperationLabel=Calculating Requirements
 ProfileModificationWizardPage_DetailsLabel=Details
-ProfileModificationWizardPage_ResolutionOperationLabel=Calculating Requirements
-ProfileModificationWizardPage_UnexpectedError=An unexpected error occurred.  This wizard is no longer valid with the current selections.
 ProfileSnapshots_Label=Installation History
-ProvisioningUtil_InstallPlanConfigurationError=A problem was encountered while preparing the system for the installation
-ProvisioningUtil_NoRepositoryManager=No repository manager was found
-ProvisioningUtil_LoadRepositoryFailure=Unable to load the repository {0}
-ProvisioningUtil_NoProfileRegistryFound=No profile registry was found
-ProvisioningUtil_NoPlannerFound=No provisioning planner was found
-ProvisioningUtil_NoDirectorFound=No provisioning director was found
-ProvisioningUtil_NoEngineFound=No provisioning engine was found
 
 ProvisioningOperationRunner_CannotApplyChanges=The changes could not be applied while the application is running.  You must restart the application for the changes to take effect.
-ProvisioningOperationRunner_ErrorExecutingOperation=Unexpected error while trying to run {0}
+ProvisioningOperationWizard_UnexpectedFailureToResolve=Unexpected error
 InstalledSoftwarePage_NoProfile=This installation has not been configured for showing the installed software.  See the error log for details.
 InstallIUOperationLabel=Install
+InstallIUOperationTask=Software installation in progress...
 InstallIUCommandLabel=&Install...
 InstallIUCommandTooltip=Install the selected items
-InstallIUProgress=Installing...
 UninstallDialog_UninstallMessage=Check the items that you wish to uninstall.
 UninstallIUOperationLabel=Uninstall
+UninstallIUOperationTask=Uninstall is in progress...
 UninstallIUCommandLabel=&Uninstall...
 UninstallIUCommandTooltip=Uninstall the selected items
 UninstallIUProgress=Uninstalling...
 UninstallWizardPage_Description=Review and confirm the items to be uninstalled.
 UninstallWizardPage_Title=Uninstall Details
-ServiceUI_Cancel=Cancel
 ServiceUI_LoginDetails=Please provide login details for {0}
 ServiceUI_LoginRequired=Login required
-ServiceUI_OK=OK
 ServiceUI_unsigned_message=Warning: You are installing software that contains unsigned content. The authenticity or validity of this software cannot be established. Do you want to continue with the installation?
-ServiceUI_unsigned_title=Installing unsigned content
 ServiceUI_warning_title=Security Warning
 UpdateIUOperationLabel=Update
+UpdateIUOperationTask=Software update is in progress...
 UpdateIUCommandLabel=Up&date...
 UpdateIUCommandTooltip=See if updates are available for the selected items
 UpdateIUProgress=Updating...
 RefreshAction_Label=Refres&h
 RefreshAction_Tooltip=Refresh
 RemoveColocatedRepositoryAction_Label=&Remove Sites...
-RemoveColocatedRepositoryAction_OperationLabel=Remove
 RemoveColocatedRepositoryAction_Tooltip=Remove selected sites from the available software site list
 RevertIUCommandLabel=&Revert...
 RevertIUCommandTooltip=Revert to a previously installed configuration
 ProvDropAdapter_NoIUsToDrop=No items were available to be dropped
 ProvDropAdapter_InvalidDropTarget=Invalid drop target
 ProvDropAdapter_UnsupportedDropOperation=Unsupported drop operation
+ProvElementContentProvider_FetchJobTitle=Fetching Elements
 
 IUCopyrightPropertyPage_NoCopyright=No copyright information has been provided.
 IUCopyrightPropertyPage_ViewLinkLabel=View full copyright:
@@ -101,7 +86,7 @@ RepositoryManipulationPage_LocationColumnTitle=Location
 RepositoryManipulationPage_NameColumnTitle=Name
 RepositoryManipulationPage_RefreshOperationCanceled=Operation canceled.
 RepositoryManipulationPage_Edit=&Edit
-RepositoryManipulationPage_RefreshConnection=Test &Connection
+RepositoryManipulationPage_RefreshConnection=Re&load
 RepositoryManipulationPage_Remove=&Remove
 RepositoryManipulationPage_RemoveConfirmMessage=Are you sure you want to remove the selected items?
 RepositoryManipulationPage_RemoveConfirmSingleMessage=Are you sure you want to remove {0}?
@@ -112,7 +97,11 @@ RepositoryManipulationPage_Title=Available Software Sites
 RepositoryManipulatorDropTarget_DragAndDropJobLabel=Drag and Drop Operation
 RepositoryManipulatorDropTarget_DragSourceNotValid={0} was not accepted as a valid software site location.  Check the details.
 RepositoryNameAndLocationDialog_Title=Edit Site
-ResolutionReport_SummaryStatus=Operation details
+RepositorySelectionGroup_GenericSiteLinkTitle=<a>Work with the list of software sites</a>
+# Separator used between a site's name and URL when they are shown together, such as "http://update.example.com - Example Site"
+RepositorySelectionGroup_NameAndLocationSeparator=\ - 
+RepositorySelectionGroup_PrefPageLink=Find more software by working with the <a>"{0}"</a> preferences.
+RepositorySelectionGroup_PrefPageName=Software Sites
 ResolutionWizardPage_Canceled=The operation was cancelled.
 ResolutionWizardPage_ErrorStatus=The operation cannot be completed.  See the details.
 ResolutionWizardPage_NoSelections=There were no installable units selected when the plan was computed.
@@ -120,94 +109,83 @@ ResolutionWizardPage_WarningInfoStatus=Your original request has been modified.
 
 AcceptLicensesWizardPage_AcceptMultiple=I &accept the terms of the license agreements
 AcceptLicensesWizardPage_AcceptSingle=I &accept the terms of the license agreement
-AcceptLicensesWizardPage_ItemsLabel=&Items with licenses:
-AcceptLicensesWizardPage_LicenseTextLabel=&License text:
+AcceptLicensesWizardPage_ItemsLabel=&Licenses:
+AcceptLicensesWizardPage_LicenseTextLabel=License &text:
 AcceptLicensesWizardPage_NoLicensesDescription=There are no licenses to review.  Either the software does not specify a license, or the license has already been reviewed and approved.
 AcceptLicensesWizardPage_RejectMultiple=I &do not accept the terms of the license agreements
 AcceptLicensesWizardPage_RejectSingle=I &do not accept the terms of the license agreement
 AcceptLicensesWizardPage_ReviewExtraLicensesDescription=Licenses must be reviewed before the software can be installed.  This includes licenses for software required to complete the install.
 AcceptLicensesWizardPage_ReviewLicensesDescription=Licenses must be reviewed and accepted before the software can be installed.
+AcceptLicensesWizardPage_SingleLicenseTextLabel=License &text (for {0}):
 AcceptLicensesWizardPage_Title=Review Licenses
 AddRepositoryDialog_Title=Add Repository
-AddRepositoryDialog_DuplicateURL=Duplicate location
 AddRepositoryDialog_InvalidURL=The provided location is not valid
 AddRepositoryDialog_LocationLabel=&Location:
 AddRepositoryDialog_NameLabel=&Name:
 
 UpdateAction_UpdatesAvailableMessage=Check the updates that you wish to install.
 UpdateAction_UpdatesAvailableTitle=Available Updates
-UpdateOperation_NothingToUpdate=There is nothing to update.
 UpdateOrInstallWizardPage_Size=Size: {0}
-URLValidator_UnrecognizedURL=The location {0} is not a valid software site location.
 UpdateManagerCompatibility_ExportSitesTitle=Export Sites
 UpdateManagerCompatibility_ImportSitesTitle=Import Sites
 UpdateManagerCompatibility_InvalidSiteFileMessage=The selected file does not contain any updates sites.  Please select another file.
 UpdateManagerCompatibility_InvalidSitesTitle=Invalid Sites File
+UpdateManagerCompatibility_ItemRequiresUpdateManager=The items selected for install include software ({0}) that requires install procedures from the older Eclipse Update Manager.  The installation cannot continue.
 UpdateManagerCompatibility_UnableToOpenFindAndInstall=Unable to open the Classic Update Manager 'Find and Install' wizard.
 UpdateManagerCompatibility_UnableToOpenManageConfiguration=Unable to open the Classic Update Manager 'Manage Configuration' dialog.
 Updates_Label=Updates Available
+UpdateSingleIUPage_SingleUpdateDescription=A new update has been found for {0}.
 UpdateWizardPage_Description=Review and confirm the updates.
 UpdateWizardPage_Title=Update Details
-UserValidationDialog_PasswordLabel=Password:
-UserValidationDialog_SavePasswordButton=Save password
-UserValidationDialog_UsernameLabel=Username:
+UserValidationDialog_PasswordLabel=&Password:
+UserValidationDialog_SavePasswordButton=&Save password
+UserValidationDialog_UsernameLabel=&Username:
 ColocatedRepositoryManipulator_AddSiteOperationLabel=Add Site
-ColocatedRepositoryManipulator_GotoPrefs=Go to the <a>Available Software Sites</a> preferences
-ColocatedRepositoryManipulator_ManageSites=&Manage Sites...
-ColocatedRepositoryManipulator_RemoveSiteOperationLabel=Remove Site
+RevertProfilePage_ConfirmDeleteMultipleConfigs=Deleting the selected configurations from the installation history will free up the disk space used to store the configurations.  However, you will no longer be able to revert your installation to these configurations.  Are you sure you want to delete the configurations?
+RevertProfilePage_ConfirmDeleteSingleConfig=Deleting the configuration from the installation history will free up the disk space used to store it.  However, you will no longer be able to revert your installation to this configuration.  Are you sure you want to delete it?
+RevertProfilePage_Delete=&Delete
+RevertProfilePage_DeleteMultipleConfigurationsTitle=Delete Configurations
+RevertProfilePage_DeleteSingleConfigurationTitle=Delete Configuration
+RevertProfilePage_DeleteTooltip=Delete the selected install configurations.
 RevertProfilePage_NoProfile=This installation has not been configured properly for accessing the installation history.  See the error log for details.
 RevertProfilePage_RevertLabel=Re&vert
 RevertProfilePage_RevertTooltip=Revert to the selected install configuration.
+RevertProfilePage_CompareLabel=Co&mpare
+RevertProfilePage_CompareTooltip=Compare selected install configurations.
 InstallWizardPage_NoCheckboxDescription=Review the items to be installed.
 InstallWizardPage_Title=Install Details
 PreselectedIUInstallWizard_Title=Install
 PreselectedIUInstallWizard_Description=Check the items that you wish to install.
-
-PlanAnalyzer_IgnoringInstall="{0}" is not applicable to the current configuration and will not be installed.
-PlanAnalyzer_LockedImpliedUpdate0={0} will be ignored because it is already installed, and updates are not permitted.
-PlanAnalyzer_PartialInstall="{0}" is already present because other installed software requires it.  It will be added to the installed software list.
-PlanAnalyzer_PartialUninstall= "{0}" cannot be fully uninstalled because other installed software requires it.  The parts that are not required will be uninstalled.
-PlanAnalyzer_SideEffectInstall="{0}" will also be installed in order to complete this operation.
-PlanAnalyzer_SideEffectUninstall="{0}" must be uninstalled in order to complete this operation.
-PlannerResolutionOperation_UnexpectedError=Unexpected error.  Unable to calculate requirements and dependencies.
-PlanStatusHelper_IgnoringImpliedDowngrade="{0}" will be ignored because a newer version is already installed. 
-PlanStatusHelper_ImpliedUpdate="{0}" is already installed, so an update will be performed instead.
-PlanStatusHelper_Items=Items
-PlanStatusHelper_NothingToDo=Cannot complete the request.  See the error log for details.
-PlanStatusHelper_AlreadyInstalled="{0}" will be ignored because it is already installed.
-PlanStatusHelper_AnotherOperationInProgress=Cannot continue the operation.  There is another install operation in progress.
-PlanStatusHelper_Launch=Launch...
-PlanStatusHelper_RequestAltered=Your original request has been modified.
-PlanStatusHelper_RequiresUpdateManager=Cannot continue the operation.  One or more items requires support from the old Update Manager.
-PlanStatusHelper_UnexpectedError=Unexpected error code {0} encountered for {1}.
-PlanStatusHelper_UpdateManagerPromptTitle=Unsupported Install
 PlatformUpdateTitle = Software Updates
 PlatformRestartMessage = You will need to restart {0} for the changes to take effect. \
 Would you like to restart now?
+Policy_RequiresUpdateManagerMessage=A feature that you have selected uses install procedures that are not compatible with the current installation support.  This feature can only be installed by the older Update Manager.  \
+\
+Do you want to launch the older Update Manager?
+Policy_RequiresUpdateManagerTitle=Unsupported Install
 ApplicationInRestartDialog = the application
 ProvUI_ErrorDuringApplyConfig=Error while attempting to apply changes.  You must restart the application for changes to take effect.
 ProvUI_InformationTitle=Information
 ProvUI_InstallDialogError=Unable to open the Installation Information.
 ProvUI_NameColumnTitle=Name
 ProvUI_IdColumnTitle=Id
-ProvUI_LoadErrorTitle=Error Contacting Site
-ProvUI_PromptForSiteEdit=No software site found at {0}.  Do you wish to edit the location?
 ProvUI_VersionColumnTitle=Version
 ProvUI_WarningTitle=Warning
-ProvUIActivator_ExceptionDuringProfileChange=Exception while handling profile change event.
-ProvUILicenseManager_ParsingError=Error parsing the accepted license registry
 ProvUIMessages_NotAccepted_EnterFor_0=Login details were not accepted. Please provide login details for {0}
 ProvUIMessages_SavedNotAccepted_EnterFor_0=Saved login details were not accepted. Please provide login details for {0}
 
-OptionalPlatformRestartMessage = It is strongly recommended you restart {0} for the changes to take effect. \
-For some add-ons, it may be possible to apply the changes you have made without restarting. \
-Would you like to restart now?
-ApplyProfileChangesDialog_ApplyChanges=Apply Changes
-AvailableIUElement_ProfileNotFound=Could not find profile to use for size computation.
+OptionalPlatformRestartMessage = You will need to restart {0} for the installation changes to take effect. \
+\
+You may try to apply the changes without restarting, but this may cause errors.
+ApplyProfileChangesDialog_Restart=&Restart Now
+ApplyProfileChangesDialog_NotYet=&Not Now
+ApplyProfileChangesDialog_ApplyChanges=&Apply Changes Now
 AvailableIUGroup_LoadingRepository=Loading {0}
 AvailableIUGroup_NoSitesConfiguredDescription=This product was not configured with any software sites.  Contact your systems administrator.
 AvailableIUGroup_NoSitesConfiguredExplanation=There are no software sites available.
 ColocatedRepositoryManipulator_NoContentExplanation=You may select a site in the combo box at the top.  You may also type or paste a site name into the combo box and press Enter.  You may also drag a site URL into the combo box or software list.
+ColocatedRepositoryTracker_PromptForSiteLocationEdit=No software site found at {0}.  Do you wish to edit the location?
+ColocatedRepositoryTracker_SiteNotFoundTitle=Error Contacting Site
 AvailableIUGroup_NoSitesExplanation=There is no site selected.
 AvailableIUsPage_AddButton=&Add...
 AvailableIUsPage_AllSites=--All Available Sites--
@@ -217,37 +195,36 @@ AvailableIUsPage_GotoProperties=<a>More...</a>
 AvailableIUsPage_GroupByCategory=&Group items by category
 AvailableIUsPage_HideInstalledItems=&Hide items that are already installed
 AvailableIUsPage_LocalSites=--Only Local Sites--
-# Usage is when a site's name is shown adjacent to its URL, such as "http://update.example.com - Example Site"
-AvailableIUsPage_NameWithLocation={0} - {1}
+AvailableIUsPage_MultipleSelectionCount={0} items selected
+AvailableIUsPage_NameWithLocation={0}{1}{2}
 AvailableIUsPage_NoSites=type or select a site
 AvailableIUsPage_RepoFilterInstructions=You can type a new site location and press 'Enter' to view software from that site.
 AvailableIUsPage_RepoFilterLabel=&Work with:
 AvailableIUsPage_ResolveAllCheckbox=&Contact all update sites during install to find required software
 AvailableIUsPage_SelectASite=Select a site or enter the location of a site.
 AvailableIUsPage_ShowLatestVersions=Show only the &latest versions of available software
+AvailableIUsPage_SingleSelectionCount={0} item selected
 AvailableIUsPage_Title=Available Software
 AvailableIUWrapper_AllAreInstalled=All items are installed
 IUViewQueryContext_AllAreInstalledDescription=You can uncheck the 'Hide items that are already installed' check box to see all items.
-DefaultQueryProvider_ErrorRetrievingProfile=Error retrieving profile {0}
-DeferredFetchFilteredTree_RetrievingList=Retrieving List
-ElementUtils_UpdateJobTitle=Updating Repository Information
 Label_Profiles=All Software Profiles
 Label_Repositories=Known Repositories
-MetadataRepositoryElement_NotFound=This repository is currently not available.
+LaunchUpdateManagerButton=Launch...
+LoadMetadataRepositoryJob_ContactSitesProgress=Contacting Software Sites
+LoadMetadataRepositoryJob_SitesMissingError=Some sites could not be found.  See the error log for more detail.
+RepositoryElement_NotFound=This repository is currently not available.
+RepositoryTracker_DuplicateLocation=Duplicate location
 MetadataRepositoryElement_RepositoryLoadError=Error loading repository {0}
 IUViewQueryContext_NoCategorizedItemsDescription=You can uncheck the 'Group items by category' check box to see items without categories.
 QueriedElementWrapper_NoCategorizedItemsExplanation=There are no categorized items
 QueriedElementWrapper_NoItemsExplanation=There are no items available
 QueriedElementWrapper_SiteNotFound=Could not find {0}
-ColocatedRepositoryManipulator_SiteNotFoundDescription=The site's location may be entered incorrectly, or the site might be offline.  You can correct the location in the 'Available Software Sites' preferences by removing the site and adding it with the proper location.  If the site name appears to be correct, you can test the connection in the 'Available Software Sites' preferences.  The site may be unreachable, or you may have a problem with your network connection.
 QueryableMetadataRepositoryManager_LoadRepositoryProgress=Contacting {0}
-QueryableMetadataRepositoryManager_MultipleRepositoriesNotFound=Some sites could not be found.  See the error log for more detail.
 QueryableProfileRegistry_QueryProfileProgress=Getting profiles
 QueryableUpdates_UpdateListProgress=Assembling list of updates
-SelectableIUsPage_Select_All=Select &All
+SelectableIUsPage_Select_All=&Select All
 SelectableIUsPage_Deselect_All=&Deselect All
 SizeComputingWizardPage_SizeJobTitle=Computing size
-SizingPhaseSet_PhaseSetName=Compute sizes
 
 RevertDialog_ConfigContentsLabel=Con&figuration contents:
 RevertDialog_ConfigsLabel=&Previous configurations:
@@ -256,10 +233,6 @@ RevertDialog_RevertOperationLabel=Revert configuration
 RevertDialog_Title=Revert Software Configuration
 
 RollbackProfileElement_CurrentInstallation=Current Installation
-RollbackProfileElement_InvalidSnapshot=The configuration snapshot is no longer valid.
 TrustCertificateDialog_Details=Details
 TrustCertificateDialog_Title=Do you trust these certificates?
 
-PlanStatusHelper_PromptForUpdateManagerUI=A feature that you have selected uses install procedures that are not compatible with the current installation support.  This feature can only be installed by the older Update Manager.  \
-\
-Do you want to launch the older Update Manager?
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
index dfbca54..9ba9f4a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
 
 /**
  * Element wrapper class for an artifact key and its repository
@@ -46,6 +46,7 @@ public class ArtifactElement extends ProvElement {
 		return repo.getArtifactDescriptors(key);
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IArtifactRepository.class)
 			return getArtifactRepository();
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
new file mode 100644
index 0000000..4b12392
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * Element class that represents the root of an artifact
+ * repository viewer.  Its children are the artifact repositories
+ * obtained using the query installed in the content provider.
+ * 
+ * @since 3.4
+ *
+ */
+public class ArtifactRepositories extends RootElement {
+
+	public ArtifactRepositories(ProvisioningUI ui, QueryableArtifactRepositoryManager queryable) {
+		super(ui);
+		this.queryable = queryable;
+	}
+
+	protected int getDefaultQueryType() {
+		return QueryProvider.ARTIFACT_REPOS;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+	 */
+	public String getLabel(Object o) {
+		return ProvUIMessages.Label_Repositories;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
index ae515f7..0466578 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
@@ -10,21 +10,16 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
 import java.net.URI;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * Element wrapper class for a artifact repository that gets its
@@ -32,11 +27,12 @@ import org.eclipse.ui.progress.IElementCollector;
  * 
  * @since 3.4
  */
-public class ArtifactRepositoryElement extends ProvElement implements IDeferredWorkbenchAdapter, IRepositoryElement {
+public class ArtifactRepositoryElement extends RemoteQueriedElement implements IRepositoryElement<IArtifactKey> {
 
 	URI location;
 	IArtifactRepository repo;
 	boolean isEnabled;
+	ProvisioningUI ui;
 
 	public ArtifactRepositoryElement(Object parent, URI location) {
 		this(parent, location, true);
@@ -46,8 +42,10 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 		super(parent);
 		this.location = location;
 		this.isEnabled = isEnabled;
+		ui = ProvUIActivator.getDefault().getProvisioningUI();
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IArtifactRepository.class)
 			return getRepository(null);
@@ -60,18 +58,6 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 		return ProvUIImages.IMG_ARTIFACT_REPOSITORY;
 	}
 
-	protected Object[] fetchChildren(Object o, IProgressMonitor monitor) {
-		IArtifactRepository repository = (IArtifactRepository) getRepository(monitor);
-		if (repository == null)
-			return new ArtifactElement[0];
-		IArtifactKey[] keys = repository.getArtifactKeys();
-		ArtifactElement[] elements = new ArtifactElement[keys.length];
-		for (int i = 0; i < keys.length; i++) {
-			elements[i] = new ArtifactElement(this, keys[i], repo);
-		}
-		return elements;
-	}
-
 	public String getLabel(Object o) {
 		String name = getName();
 		if (name != null && name.length() > 0) {
@@ -80,34 +66,18 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 		return URIUtil.toUnencodedString(getLocation());
 	}
 
-	public IRepository getRepository(IProgressMonitor monitor) {
+	public IArtifactRepository getRepository(IProgressMonitor monitor) {
 		if (repo == null)
 			try {
-				repo = ProvisioningUtil.loadArtifactRepository(location, monitor);
+				repo = getArtifactRepositoryManager().loadRepository(location, monitor);
 			} catch (ProvisionException e) {
-				handleException(e, NLS.bind(ProvUIMessages.MetadataRepositoryElement_RepositoryLoadError, location));
+				ui.getRepositoryTracker().reportLoadFailure(location, e);
 			} catch (OperationCanceledException e) {
-				// Nothing to report
+				// nothing to report
 			}
 		return repo;
 	}
 
-	public ISchedulingRule getRule(Object object) {
-		return null;
-	}
-
-	public boolean isContainer() {
-		return true;
-	}
-
-	public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
-		collector.add(fetchChildren(o, monitor), monitor);
-	}
-
-	public Object[] getChildren(Object o) {
-		return fetchChildren(o, null);
-	}
-
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
 	 */
@@ -120,16 +90,12 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
 	 */
 	public String getName() {
-		try {
-			String name = ProvisioningUtil.getArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME);
-			if (name == null)
-				name = ProvisioningUtil.getArtifactRepositoryProperty(location, IRepository.PROP_NAME);
-			if (name == null)
-				name = ""; //$NON-NLS-1$
-			return name;
-		} catch (ProvisionException e) {
-			return ""; //$NON-NLS-1$
-		}
+		String name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+		if (name == null)
+			name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NAME);
+		if (name == null)
+			name = ""; //$NON-NLS-1$
+		return name;
 	}
 
 	/*
@@ -137,14 +103,12 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
 	 */
 	public String getDescription() {
-		try {
-			String description = ProvisioningUtil.getArtifactRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
-			if (description == null)
-				return ""; //$NON-NLS-1$
-			return description;
-		} catch (ProvisionException e) {
+		if (ui.getRepositoryTracker().hasNotFoundStatusBeenReported(location))
+			return ProvUIMessages.RepositoryElement_NotFound;
+		String description = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
+		if (description == null)
 			return ""; //$NON-NLS-1$
-		}
+		return description;
 	}
 
 	/* (non-Javadoc)
@@ -160,4 +124,26 @@ public class ArtifactRepositoryElement extends ProvElement implements IDeferredW
 	public void setEnabled(boolean enabled) {
 		isEnabled = enabled;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
+	 */
+	protected int getDefaultQueryType() {
+		return QueryProvider.AVAILABLE_ARTIFACTS;
+	}
+
+	/*
+	 * overridden to lazily fetch repository
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
+	 */
+	public IQueryable<?> getQueryable() {
+		if (queryable == null)
+			queryable = getRepository(new NullProgressMonitor());
+		return queryable;
+	}
+
+	IArtifactRepositoryManager getArtifactRepositoryManager() {
+		return ProvUI.getArtifactRepositoryManager(ui.getSession());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
index 8780575..097d40e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
@@ -7,25 +7,21 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
 import java.net.URI;
+import java.util.Collection;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.p2.ui.*;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.repository.IRepository;
 
 /**
  * Element wrapper class for IU's that are available for installation.
@@ -37,7 +33,7 @@ import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
 public class AvailableIUElement extends QueriedElement implements IIUElement {
 
 	IInstallableUnit iu;
-	boolean shouldShowChildren = Policy.getDefault().getQueryContext().getShowAvailableChildren();
+	boolean shouldShowChildren;
 	boolean isInstalled = false;
 	boolean isUpdate = false;
 
@@ -47,7 +43,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
 	// probably refer to some preference or policy to decide what to do.
 	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=221087
 	private static boolean shouldShowSize = false;
-	long size = IIUElement.SIZE_UNKNOWN;
+	long size = ProvUI.SIZE_UNKNOWN;
 	String profileID;
 
 	public AvailableIUElement(Object parent, IInstallableUnit iu, String profileID, boolean showChildren) {
@@ -74,6 +70,7 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
 		return iu.getId();
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IInstallableUnit.class)
 			return iu;
@@ -87,24 +84,31 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
 	public void computeSize(IProgressMonitor monitor) {
 		if (profileID == null)
 			return;
-		try {
-			SubMonitor mon = SubMonitor.convert(monitor, 100);
-			ProvisioningPlan plan = getSizingPlan(mon.newChild(50));
-			size = ProvisioningUtil.getSize(plan, profileID, getProvisioningContext(), mon.newChild(50));
-		} catch (ProvisionException e) {
-			handleException(e, ProvUIMessages.AvailableIUElement_ProfileNotFound);
-			size = IIUElement.SIZE_UNAVAILABLE;
-		}
+		SubMonitor mon = SubMonitor.convert(monitor, 100);
+		IProvisioningPlan plan = getSizingPlan(mon.newChild(50));
+		size = ProvUI.getSize(getEngine(), plan, getProvisioningContext(), mon.newChild(50));
+	}
+
+	protected IProfile getProfile() {
+		return getProfileRegistry().getProfile(profileID);
+	}
+
+	protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
+		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
+		request.add(getIU());
+		return getPlanner().getProvisioningPlan(request, getProvisioningContext(), monitor);
+	}
+
+	IEngine getEngine() {
+		return ProvUI.getEngine(getProvisioningUI().getSession());
 	}
 
-	protected IProfile getProfile() throws ProvisionException {
-		return ProvisioningUtil.getProfile(profileID);
+	IPlanner getPlanner() {
+		return (IPlanner) getProvisioningUI().getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
 	}
 
-	protected ProvisioningPlan getSizingPlan(IProgressMonitor monitor) throws ProvisionException {
-		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileID);
-		request.addInstallableUnits(new IInstallableUnit[] {getIU()});
-		return ProvisioningUtil.getProvisioningPlan(request, getProvisioningContext(), monitor);
+	IProfileRegistry getProfileRegistry() {
+		return ProvUI.getProfileRegistry(getProvisioningUI().getSession());
 	}
 
 	public IInstallableUnit getIU() {
@@ -129,8 +133,8 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
 	 */
-	public IRequiredCapability[] getRequirements() {
-		return iu.getRequiredCapabilities();
+	public Collection<IRequirement> getRequirements() {
+		return iu.getRequirements();
 	}
 
 	/* (non-Javadoc)
@@ -181,8 +185,10 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
 	}
 
 	private ProvisioningContext getProvisioningContext() {
-		if (hasQueryable() && getQueryable() instanceof IRepository)
-			return new ProvisioningContext(new URI[] {((IRepository) getQueryable()).getLocation()});
-		return new ProvisioningContext();
+		ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
+		if (hasQueryable() && getQueryable() instanceof IRepository<?>) {
+			context.setMetadataRepositories(new URI[] {((IRepository<?>) getQueryable()).getLocation()});
+		}
+		return context;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
index d6c946e..cf3db66 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
@@ -7,16 +7,16 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.Update;
 
 /**
  * Element wrapper class for IU's that are available for installation.
@@ -39,12 +39,12 @@ public class AvailableUpdateElement extends AvailableIUElement {
 		return iuToBeUpdated;
 	}
 
-	protected ProvisioningPlan getSizingPlan(IProgressMonitor monitor) throws ProvisionException {
-		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileID);
+	protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
+		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
 		if (iuToBeUpdated.getId().equals(getIU().getId()))
-			request.removeInstallableUnits(new IInstallableUnit[] {iuToBeUpdated});
-		request.addInstallableUnits(new IInstallableUnit[] {getIU()});
-		return ProvisioningUtil.getProvisioningPlan(request, new ProvisioningContext(), monitor);
+			request.remove(iuToBeUpdated);
+		request.add(getIU());
+		return getPlanner().getProvisioningPlan(request, new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()), monitor);
 	}
 
 	public boolean equals(Object obj) {
@@ -69,4 +69,8 @@ public class AvailableUpdateElement extends AvailableIUElement {
 		result = prime * result + ((iuToBeUpdated == null) ? 0 : iuToBeUpdated.hashCode());
 		return result;
 	}
+
+	public Update getUpdate() {
+		return new Update(iuToBeUpdated, getIU());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
index 680567d..f343af3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
@@ -10,12 +10,13 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
 
 /**
  * Element wrapper class for IU's that represent categories of
@@ -25,8 +26,8 @@ import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
  */
 public class CategoryElement extends RemoteQueriedElement implements IIUElement {
 
-	private ArrayList ius = new ArrayList(1);
-	private IRequiredCapability[] requirements;
+	private ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>(1);
+	private Collection<IRequirement> requirements;
 
 	public CategoryElement(Object parent, IInstallableUnit iu) {
 		super(parent);
@@ -49,6 +50,7 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
 		return null;
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IInstallableUnit.class)
 			return getIU();
@@ -62,11 +64,11 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
 	public IInstallableUnit getIU() {
 		if (ius == null || ius.isEmpty())
 			return null;
-		return (IInstallableUnit) ius.get(0);
+		return ius.get(0);
 	}
 
 	public long getSize() {
-		return SIZE_UNKNOWN;
+		return ProvUI.SIZE_UNKNOWN;
 	}
 
 	public boolean shouldShowSize() {
@@ -93,27 +95,25 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
 	}
 
 	private String getMergeKey(IInstallableUnit iu) {
-		String mergeKey = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
+		String mergeKey = iu.getProperty(IInstallableUnit.PROP_NAME, null);
 		if (mergeKey == null || mergeKey.length() == 0) {
 			mergeKey = iu.getId();
 		}
 		return mergeKey;
 	}
 
-	public IRequiredCapability[] getRequirements() {
+	public Collection<IRequirement> getRequirements() {
 		if (ius == null || ius.isEmpty())
-			return new IRequiredCapability[0];
+			return CollectionUtils.emptyList();
 		if (requirements == null) {
 			if (ius.size() == 1)
-				requirements = getIU().getRequiredCapabilities();
+				requirements = getIU().getRequirements();
 			else {
-				ArrayList capabilities = new ArrayList();
-				Iterator iter = ius.iterator();
-				while (iter.hasNext()) {
-					IInstallableUnit iu = (IInstallableUnit) iter.next();
-					capabilities.addAll(Arrays.asList(iu.getRequiredCapabilities()));
+				ArrayList<IRequirement> capabilities = new ArrayList<IRequirement>();
+				for (IInstallableUnit iu : ius) {
+					capabilities.addAll(iu.getRequirements());
 				}
-				requirements = (IRequiredCapability[]) capabilities.toArray(new IRequiredCapability[capabilities.size()]);
+				requirements = capabilities;
 			}
 		}
 		return requirements;
@@ -160,19 +160,4 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
 		result.append(")"); //$NON-NLS-1$
 		return result.toString();
 	}
-
-	/*
-	 * Overridden to ensure that we check whether we are using a
-	 * QueryableMetadataRepositoryManager.  If so, we must find out
-	 * if it is up to date with the real manager.  
-	 * 
-	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=275235
-	 * 
-	 */
-	public boolean hasQueryable() {
-		if (queryable instanceof QueryableMetadataRepositoryManager)
-			return ((QueryableMetadataRepositoryManager) queryable).areRepositoriesLoaded();
-		return super.hasQueryable();
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
index 8096456..f6a5ab2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
@@ -7,22 +7,22 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  ******************************************************************************/
 
 package org.eclipse.equinox.internal.p2.ui.model;
 
 import java.net.URI;
 import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.swt.widgets.Shell;
 
 /**
@@ -34,67 +34,67 @@ import org.eclipse.swt.widgets.Shell;
 public class ElementUtils {
 
 	public static void updateRepositoryUsingElements(final MetadataRepositoryElement[] elements, final Shell shell) {
-		Job job = new Job(ProvUIMessages.ElementUtils_UpdateJobTitle) {
-			public IStatus run(IProgressMonitor monitor) {
-				ProvUI.startBatchOperation();
-				try {
-					int visibilityFlags = Policy.getDefault().getQueryContext().getMetadataRepositoryFlags();
-					URI[] currentlyEnabled = ProvisioningUtil.getMetadataRepositories(visibilityFlags);
-					URI[] currentlyDisabled = ProvisioningUtil.getMetadataRepositories(IRepositoryManager.REPOSITORIES_DISABLED | visibilityFlags);
-					for (int i = 0; i < elements.length; i++) {
-						URI location = elements[i].getLocation();
-						if (elements[i].isEnabled()) {
-							if (containsURI(currentlyDisabled, location))
-								// It should be enabled and is not currently
-								ProvisioningUtil.setColocatedRepositoryEnablement(location, true);
-							else if (!containsURI(currentlyEnabled, location)) {
-								// It is not known as enabled or disabled.  Add it.
-								ProvisioningUtil.addMetadataRepository(location, false);
-								ProvisioningUtil.addArtifactRepository(location, false);
-							}
-						} else {
-							if (containsURI(currentlyEnabled, location))
-								// It should be disabled, and is currently enabled
-								ProvisioningUtil.setColocatedRepositoryEnablement(location, false);
-							else if (!containsURI(currentlyDisabled, location)) {
-								// It is not known as enabled or disabled.  Add it and then disable it.
-								ProvisioningUtil.addMetadataRepository(location, false);
-								ProvisioningUtil.addArtifactRepository(location, false);
-								ProvisioningUtil.setColocatedRepositoryEnablement(location, false);
-							}
-						}
-						String name = elements[i].getName();
-						if (name != null && name.length() > 0) {
-							ProvisioningUtil.setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
-							ProvisioningUtil.setArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
-						}
+		final ProvisioningUI ui = ProvUIActivator.getDefault().getProvisioningUI();
+		ui.signalRepositoryOperationStart();
+		IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ui.getSession());
+		IArtifactRepositoryManager artManager = ProvUI.getArtifactRepositoryManager(ui.getSession());
+		try {
+			int visibilityFlags = ui.getRepositoryTracker().getMetadataRepositoryFlags();
+			URI[] currentlyEnabled = metaManager.getKnownRepositories(visibilityFlags);
+			URI[] currentlyDisabled = metaManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | visibilityFlags);
+			for (int i = 0; i < elements.length; i++) {
+				URI location = elements[i].getLocation();
+				if (elements[i].isEnabled()) {
+					if (containsURI(currentlyDisabled, location))
+						// It should be enabled and is not currently
+						setColocatedRepositoryEnablement(ui, location, true);
+					else if (!containsURI(currentlyEnabled, location)) {
+						// It is not known as enabled or disabled.  Add it.
+						metaManager.addRepository(location);
+						artManager.addRepository(location);
 					}
-					// Are there any elements that need to be deleted?  Go over the original state
-					// and remove any elements that weren't in the elements we were given
-					Set nowKnown = new HashSet();
-					for (int i = 0; i < elements.length; i++)
-						nowKnown.add(URIUtil.toUnencodedString(elements[i].getLocation()));
-					for (int i = 0; i < currentlyEnabled.length; i++) {
-						if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyEnabled[i]))) {
-							ProvisioningUtil.removeMetadataRepository(currentlyEnabled[i]);
-							ProvisioningUtil.removeArtifactRepository(currentlyEnabled[i]);
-						}
+				} else {
+					if (containsURI(currentlyEnabled, location))
+						// It should be disabled, and is currently enabled
+						setColocatedRepositoryEnablement(ui, location, false);
+					else if (!containsURI(currentlyDisabled, location)) {
+						// It is not known as enabled or disabled.  Add it and then disable it.
+						metaManager.addRepository(location);
+						artManager.addRepository(location);
+						setColocatedRepositoryEnablement(ui, location, false);
 					}
-					for (int i = 0; i < currentlyDisabled.length; i++) {
-						if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyDisabled[i]))) {
-							ProvisioningUtil.removeMetadataRepository(currentlyDisabled[i]);
-							ProvisioningUtil.removeArtifactRepository(currentlyDisabled[i]);
-						}
-					}
-				} catch (ProvisionException e) {
-					return e.getStatus();
-				} finally {
-					ProvUI.endBatchOperation(true);
 				}
-				return Status.OK_STATUS;
+				String name = elements[i].getName();
+				if (name != null && name.length() > 0) {
+					metaManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
+					artManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
+				}
 			}
-		};
-		job.schedule();
+			// Are there any elements that need to be deleted?  Go over the original state
+			// and remove any elements that weren't in the elements we were given
+			Set<String> nowKnown = new HashSet<String>();
+			for (int i = 0; i < elements.length; i++)
+				nowKnown.add(URIUtil.toUnencodedString(elements[i].getLocation()));
+			for (int i = 0; i < currentlyEnabled.length; i++) {
+				if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyEnabled[i]))) {
+					metaManager.removeRepository(currentlyEnabled[i]);
+					artManager.removeRepository(currentlyEnabled[i]);
+				}
+			}
+			for (int i = 0; i < currentlyDisabled.length; i++) {
+				if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyDisabled[i]))) {
+					metaManager.removeRepository(currentlyDisabled[i]);
+					artManager.removeRepository(currentlyDisabled[i]);
+				}
+			}
+		} finally {
+			ui.signalRepositoryOperationComplete(null, true);
+		}
+	}
+
+	private static void setColocatedRepositoryEnablement(ProvisioningUI ui, URI location, boolean enable) {
+		ProvUI.getArtifactRepositoryManager(ProvUIActivator.getDefault().getSession()).setEnabled(location, enable);
+		ProvUI.getMetadataRepositoryManager(ProvUIActivator.getDefault().getSession()).setEnabled(location, enable);
 	}
 
 	public static IInstallableUnit getIU(Object element) {
@@ -102,17 +102,17 @@ public class ElementUtils {
 			return (IInstallableUnit) element;
 		if (element instanceof IIUElement)
 			return ((IIUElement) element).getIU();
-		return (IInstallableUnit) ProvUI.getAdapter(element, IInstallableUnit.class);
+		return ProvUI.getAdapter(element, IInstallableUnit.class);
 	}
 
-	public static IInstallableUnit[] elementsToIUs(Object[] elements) {
-		ArrayList theIUs = new ArrayList(elements.length);
+	public static List<IInstallableUnit> elementsToIUs(Object[] elements) {
+		ArrayList<IInstallableUnit> theIUs = new ArrayList<IInstallableUnit>(elements.length);
 		for (int i = 0; i < elements.length; i++) {
-			IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(elements[i], IInstallableUnit.class);
+			IInstallableUnit iu = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
 			if (iu != null)
 				theIUs.add(iu);
 		}
-		return (IInstallableUnit[]) theIUs.toArray(new IInstallableUnit[theIUs.size()]);
+		return theIUs;
 	}
 
 	static boolean containsURI(URI[] locations, URI url) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java
index 7429ff4..06f419b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java
@@ -10,9 +10,10 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
+import java.util.Collection;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
 
 /**
  * Interface for elements that represent IU's.
@@ -21,24 +22,6 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
  */
 public interface IIUElement {
 
-	/**
-	 * Indicates that the size is currently unknown
-	 */
-	public static final long SIZE_UNKNOWN = -1L;
-
-	/**
-	 * Indicates that the size is unavailable (an
-	 * attempt was made to compute size but it failed)
-	 */
-	public static final long SIZE_UNAVAILABLE = -2L;
-
-	/**
-	 * Indicates that there was nothing to size (there
-	 * was no valid plan that could be used to compute
-	 * size).
-	 */
-	public static final long SIZE_NOTAPPLICABLE = -3L;
-
 	public IInstallableUnit getIU();
 
 	public boolean shouldShowSize();
@@ -49,7 +32,7 @@ public interface IIUElement {
 
 	public void computeSize(IProgressMonitor monitor);
 
-	public IRequiredCapability[] getRequirements();
+	public Collection<IRequirement> getRequirements();
 
 	public Object getParent(Object obj);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java
new file mode 100644
index 0000000..f2890b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import java.net.URI;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.repository.IRepository;
+
+/**
+ * Interface for elements that represent repositories.
+ * 
+ * @since 3.4
+ */
+public interface IRepositoryElement<T> {
+
+	public URI getLocation();
+
+	public String getName();
+
+	public String getDescription();
+
+	public boolean isEnabled();
+
+	public void setEnabled(boolean enabled);
+
+	public IRepository<T> getRepository(IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
new file mode 100644
index 0000000..5689bee
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+
+
+/**
+ * Element class representing a fixed set of IU's.  This element should
+ * never appear in a list, but can be used as a parent in a list.
+ * 
+ * @since 3.5
+ */
+public class IUElementListRoot extends ProvElement {
+
+	Object[] children;
+
+	public IUElementListRoot(Object[] children) {
+		super(null);
+		this.children = children;
+	}
+
+	public IUElementListRoot() {
+		this(new Object[0]);
+	}
+
+	public void setChildren(Object[] children) {
+		this.children = children;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
+	 */
+	protected String getImageId(Object obj) {
+		return null;
+	}
+
+	public String getLabel(Object o) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
+	 */
+	public Object[] getChildren(Object o) {
+		return children;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
new file mode 100644
index 0000000..d4e5072
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import java.util.Collection;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+
+/**
+ * Element wrapper class for installed IU's. Used instead of the plain IU when
+ * there should be a parent profile available for operations.
+ * 
+ * @since 3.4
+ */
+public class InstalledIUElement extends QueriedElement implements IIUElement {
+
+	String profileId;
+	IInstallableUnit iu;
+
+	public InstalledIUElement(Object parent, String profileId, IInstallableUnit iu) {
+		super(parent);
+		this.profileId = profileId;
+		this.iu = iu;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
+	 */
+	protected String getImageId(Object obj) {
+		return ProvUIImages.IMG_IU;
+	}
+
+	public String getLabel(Object o) {
+		return iu.getId();
+	}
+
+	@SuppressWarnings("rawtypes")
+	public Object getAdapter(Class adapter) {
+		if (adapter == IInstallableUnit.class)
+			return iu;
+		return super.getAdapter(adapter);
+	}
+
+	public String getProfileId() {
+		return profileId;
+	}
+
+	public IInstallableUnit getIU() {
+		return iu;
+	}
+
+	// TODO Later we might consider showing this in the installed views,
+	// but it is less important than before install.
+	public long getSize() {
+		return ProvUI.SIZE_UNKNOWN;
+	}
+
+	public boolean shouldShowSize() {
+		return false;
+	}
+
+	public void computeSize(IProgressMonitor monitor) {
+		// Should never be called, as long as shouldShowSize() returns false
+	}
+
+	public boolean shouldShowVersion() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
+	 */
+	public Collection<IRequirement> getRequirements() {
+		return iu.getRequirements();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
+	 */
+	protected int getDefaultQueryType() {
+		return QueryProvider.INSTALLED_IUS;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
+	 */
+	public boolean shouldShowChildren() {
+		return true;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof InstalledIUElement))
+			return false;
+		if (iu == null)
+			return false;
+		return iu.equals(((InstalledIUElement) obj).getIU());
+	}
+
+	public int hashCode() {
+		if (iu == null)
+			return 0;
+		return iu.hashCode();
+	}
+
+	public String toString() {
+		if (iu == null)
+			return "NULL"; //$NON-NLS-1$
+		return iu.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
new file mode 100644
index 0000000..df87eea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * Element class that represents some collection of metadata repositories.
+ * It can be configured so that it retrieves its children in different ways.
+ * The default query type will return the metadata repositories specified in
+ * this element.  Other query types can be used to query each repository and
+ * aggregate the children.
+ * 
+ * @since 3.4
+ *
+ */
+public class MetadataRepositories extends RootElement {
+
+	private boolean includeDisabled = false;
+
+	public MetadataRepositories(ProvisioningUI ui) {
+		this(ProvUI.getQueryContext(ui.getPolicy()), ui, null);
+	}
+
+	public MetadataRepositories(IUViewQueryContext queryContext, ProvisioningUI ui, QueryableMetadataRepositoryManager queryable) {
+		super(queryContext, ui);
+		this.queryable = queryable;
+	}
+
+	/**
+	 * Get whether disabled repositories should be included in queries when no repositories
+	 * have been specified.  This boolean is used because the flags specified when getting
+	 * repositories from a repository manager are treated as an AND, and we want to permit
+	 * aggregating disabled repositories along with other flags.
+	 * 
+	 * @return includeDisabled <code>true</code> if disabled repositories should be included and
+	 * <code>false</code> if they should not be included.  
+	 */
+	public boolean getIncludeDisabledRepositories() {
+		return includeDisabled;
+	}
+
+	/**
+	 * Set whether disabled repositories should be included in queries when no repositories
+	 * have been specified.  This boolean is used because the flags specified when getting
+	 * repositories from a repository manager are treated as an AND, and we want to permit
+	 * aggregating disabled repositories along with other flags.
+	 * 
+	 * @param includeDisabled <code>true</code> if disabled repositories should be included and
+	 * <code>false</code> if they should not be included.  
+	 */
+	public void setIncludeDisabledRepositories(boolean includeDisabled) {
+		this.includeDisabled = includeDisabled;
+	}
+
+	/*
+	 * Overridden to check the query context.  We might
+	 * be showing repositories, or we might be flattening the 
+	 * view to some other element
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryType()
+	 */
+	public int getQueryType() {
+		if (getQueryContext() == null)
+			return getDefaultQueryType();
+		return getQueryContext().getQueryType();
+	}
+
+	protected int getDefaultQueryType() {
+		return QueryProvider.METADATA_REPOS;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+	 */
+	public String getLabel(Object o) {
+		return ProvUIMessages.Label_Repositories;
+	}
+
+	/*
+	 * Overridden because we might be iterating sites 
+	 * (type = METADATA_REPOSITORIES) rather than loading repos.  If this
+	 * is the case, we only care whether we have a queryable or not.
+	 */
+	public boolean hasQueryable() {
+		if (getQueryType() == QueryProvider.METADATA_REPOS)
+			return queryable != null;
+		return super.hasQueryable();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
index 81437c4..0892b28 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
@@ -12,21 +12,17 @@ package org.eclipse.equinox.internal.p2.ui.model;
 
 import java.net.URI;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
 import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * Element wrapper class for a metadata repository that gets its
@@ -36,28 +32,27 @@ import org.eclipse.ui.statushandlers.StatusManager;
  * 
  * @since 3.4
  */
-public class MetadataRepositoryElement extends RootElement implements IRepositoryElement {
+public class MetadataRepositoryElement extends RootElement implements IRepositoryElement<IInstallableUnit> {
 
 	URI location;
 	boolean isEnabled;
 	String name;
 
 	public MetadataRepositoryElement(Object parent, URI location, boolean isEnabled) {
-		this(parent, null, null, location, isEnabled);
+		this(parent, null, ProvisioningUI.getDefaultUI(), location, isEnabled);
 	}
 
-	public MetadataRepositoryElement(IUViewQueryContext queryContext, Policy policy, URI location, boolean isEnabled) {
-		super(null, queryContext, policy);
-		this.location = location;
-		this.isEnabled = isEnabled;
+	public MetadataRepositoryElement(IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
+		this(null, queryContext, ui, location, isEnabled);
 	}
 
-	private MetadataRepositoryElement(Object parent, IUViewQueryContext queryContext, Policy policy, URI location, boolean isEnabled) {
-		super(parent, queryContext, policy);
+	private MetadataRepositoryElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
+		super(parent, queryContext, ui);
 		this.location = location;
 		this.isEnabled = isEnabled;
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IMetadataRepository.class)
 			return getQueryable();
@@ -76,7 +71,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 			//only invoke super if we successfully loaded the repository
 			return super.fetchChildren(o, sub.newChild(100));
 		} catch (ProvisionException e) {
-			ProvUI.reportLoadFailure(location, e.getStatus(), StatusManager.SHOW, getPolicy().getRepositoryManipulator());
+			getProvisioningUI().getRepositoryTracker().reportLoadFailure(location, e);
 			// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276784
 			return new Object[] {new EmptyElementExplanation(this, IStatus.ERROR, e.getLocalizedMessage(), "")}; //$NON-NLS-1$
 		}
@@ -103,24 +98,27 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 	 * (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
 	 */
-	public IQueryable getQueryable() {
+	public IQueryable<?> getQueryable() {
 		if (queryable == null)
-			return (IQueryable) getRepository(new NullProgressMonitor());
+			queryable = getRepository(new NullProgressMonitor());
 		return queryable;
 	}
 
-	public IRepository getRepository(IProgressMonitor monitor) {
+	public IMetadataRepository getRepository(IProgressMonitor monitor) {
 		try {
 			return getMetadataRepository(monitor);
 		} catch (ProvisionException e) {
-			ProvUI.reportLoadFailure(location, e.getStatus(), StatusManager.SHOW, getPolicy().getRepositoryManipulator());
+			getProvisioningUI().getRepositoryTracker().reportLoadFailure(location, e);
+		} catch (OperationCanceledException e) {
+			// nothing to report
 		}
 		return null;
 	}
 
 	private IMetadataRepository getMetadataRepository(IProgressMonitor monitor) throws ProvisionException {
-		if (queryable == null)
-			queryable = ProvisioningUtil.loadMetadataRepository(location, monitor);
+		if (queryable == null) {
+			queryable = getProvisioningUI().loadMetadataRepository(location, false, monitor);
+		}
 		return (IMetadataRepository) queryable;
 
 	}
@@ -148,15 +146,11 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 	 */
 	public String getName() {
 		if (name == null) {
-			try {
-				name = ProvisioningUtil.getMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME);
-				if (name == null)
-					name = ProvisioningUtil.getMetadataRepositoryProperty(location, IRepository.PROP_NAME);
-				if (name == null)
-					name = ""; //$NON-NLS-1$
-			} catch (ProvisionException e) {
+			name = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+			if (name == null)
+				name = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NAME);
+			if (name == null)
 				name = ""; //$NON-NLS-1$
-			}
 		}
 		return name;
 	}
@@ -175,16 +169,12 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
 	 */
 	public String getDescription() {
-		if (ProvUI.hasNotFoundStatusBeenReported(location))
-			return ProvUIMessages.MetadataRepositoryElement_NotFound;
-		try {
-			String description = ProvisioningUtil.getMetadataRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
-			if (description == null)
-				return ""; //$NON-NLS-1$
-			return description;
-		} catch (ProvisionException e) {
+		if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
+			return ProvUIMessages.RepositoryElement_NotFound;
+		String description = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
+		if (description == null)
 			return ""; //$NON-NLS-1$
-		}
+		return description;
 	}
 
 	/* (non-Javadoc)
@@ -216,7 +206,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 			return true;
 		if (location == null)
 			return false;
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager manager = getMetadataRepositoryManager();
 		if (manager == null || !(manager instanceof MetadataRepositoryManager))
 			return false;
 		IMetadataRepository repo = ((MetadataRepositoryManager) manager).getRepository(location);
@@ -232,7 +222,7 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 			return super.getPolicy();
 		if (parent instanceof QueriedElement)
 			return ((QueriedElement) parent).getPolicy();
-		return Policy.getDefault();
+		return ProvisioningUI.getDefaultUI().getPolicy();
 	}
 
 	public String toString() {
@@ -245,4 +235,8 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
 			result.append(" (not loaded)"); //$NON-NLS-1$
 		return result.toString();
 	}
+
+	IMetadataRepositoryManager getMetadataRepositoryManager() {
+		return ProvUI.getMetadataRepositoryManager(getProvisioningUI().getSession());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
new file mode 100644
index 0000000..35a17d3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.query.IQueryable;
+
+/**
+ * Element wrapper class for a profile that uses the query
+ * mechanism to obtain its contents.
+ * 
+ * @since 3.4
+ */
+public class ProfileElement extends RemoteQueriedElement {
+	String profileId;
+
+	public ProfileElement(Object parent, String profileId) {
+		super(parent);
+		this.profileId = profileId;
+	}
+
+	@SuppressWarnings("rawtypes")
+	public Object getAdapter(Class adapter) {
+		if (adapter == IProfile.class)
+			return getQueryable();
+		return super.getAdapter(adapter);
+	}
+
+	protected String getImageId(Object obj) {
+		return ProvUIImages.IMG_PROFILE;
+	}
+
+	public String getLabel(Object o) {
+		return profileId;
+	}
+
+	public String getProfileId() {
+		return profileId;
+	}
+
+	protected int getDefaultQueryType() {
+		return QueryProvider.INSTALLED_IUS;
+	}
+
+	public IQueryable<?> getQueryable() {
+		return ProvUI.getProfileRegistry(getProvisioningUI().getSession()).getProfile(profileId);
+	}
+
+	/*
+	 * Overridden to check whether we know the profile id rather
+	 * than fetch the profile from the registry using getQueryable()
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
+	 */
+	public boolean knowsQueryable() {
+		return profileId != null;
+	}
+
+	/*
+	 * Overridden to check the children so that profiles
+	 * showing in profile views accurately reflect if they
+	 * are empty.  We do not cache the children because often
+	 * this element is the input of a view and when the view
+	 * is refreshed we want to refetch the children.
+	 * 
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement#isContainer()
+	 */
+	public boolean isContainer() {
+		return super.getChildren(this).length > 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
index 0c17ddf..12a24b5 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
@@ -10,16 +10,18 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
+import org.eclipse.ui.progress.IElementCollector;
 
 /**
  * Element class for profile snapshots
  * 
  * @since 3.5
  */
-public class ProfileSnapshots extends ProvElement {
+public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchAdapter {
 
 	String profileId;
 
@@ -36,31 +38,27 @@ public class ProfileSnapshots extends ProvElement {
 	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
 	 */
 	public Object[] getChildren(Object o) {
-		try {
-			long[] timestamps = ProvisioningUtil.getProfileTimestamps(profileId);
-			RollbackProfileElement[] elements = new RollbackProfileElement[timestamps.length];
-			boolean skipFirst = false;
-			for (int i = 0; i < timestamps.length; i++) {
-				elements[i] = new RollbackProfileElement(this, profileId, timestamps[i]);
-				// Eliminate the first in the list (earliest) if there was no content at all.
-				// This doesn't always happen, but can, and we don't want to offer the user an empty profile to
-				// revert to.
-				if (i == 0) {
-					skipFirst = elements[0].getChildren(elements[0]).length == 0;
-				} else if (i == timestamps.length - 1) {
-					elements[i].setIsCurrentProfile(true);
-				}
+		long[] timestamps = ProvUI.getProfileRegistry(ProvUIActivator.getDefault().getSession()).listProfileTimestamps(profileId);
+		RollbackProfileElement[] elements = new RollbackProfileElement[timestamps.length];
+		boolean skipFirst = false;
+		for (int i = 0; i < timestamps.length; i++) {
+			elements[i] = new RollbackProfileElement(this, profileId, timestamps[i]);
+			// Eliminate the first in the list (earliest) if there was no content at all.
+			// This doesn't always happen, but can, and we don't want to offer the user an empty profile to
+			// revert to.
+			if (i == 0) {
+				skipFirst = elements[0].getChildren(elements[0]).length == 0;
 			}
-			if (skipFirst) {
-				RollbackProfileElement[] elementsWithoutFirst = new RollbackProfileElement[elements.length - 1];
-				System.arraycopy(elements, 1, elementsWithoutFirst, 0, elements.length - 1);
-				return elementsWithoutFirst;
+			if (i == timestamps.length - 1) {
+				elements[i].setIsCurrentProfile(true);
 			}
-			return elements;
-		} catch (ProvisionException e) {
-			handleException(e, null);
 		}
-		return null;
+		if (skipFirst) {
+			RollbackProfileElement[] elementsWithoutFirst = new RollbackProfileElement[elements.length - 1];
+			System.arraycopy(elements, 1, elementsWithoutFirst, 0, elements.length - 1);
+			return elementsWithoutFirst;
+		}
+		return elements;
 	}
 
 	/* (non-Javadoc)
@@ -69,4 +67,26 @@ public class ProfileSnapshots extends ProvElement {
 	public String getLabel(Object o) {
 		return ProvUIMessages.ProfileSnapshots_Label;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
+		Object[] children = getChildren(object);
+		collector.add(children, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#getRule(java.lang.Object)
+	 */
+	public ISchedulingRule getRule(Object object) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
+	 */
+	public boolean isContainer() {
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
new file mode 100644
index 0000000..3af9eb4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * Element class that represents the root of a profile
+ * viewer.  Its children are the profiles that match the
+ * specified query for profiles.
+ * 
+ * @since 3.4
+ *
+ */
+public class Profiles extends RootElement {
+
+	public Profiles(ProvisioningUI ui) {
+		super(ui);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+	 */
+	public String getLabel(Object o) {
+		return ProvUIMessages.Label_Profiles;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
+	 */
+	protected int getDefaultQueryType() {
+		return QueryProvider.PROFILES;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
index 3758769..047bd70 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
@@ -11,9 +11,7 @@
 package org.eclipse.equinox.internal.p2.ui.model;
 
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
+import org.eclipse.equinox.internal.p2.ui.*;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.graphics.Image;
@@ -36,6 +34,7 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
 		this.parent = parent;
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IWorkbenchAdapter.class)
 			return this;
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
index 0555b80..f4bb6a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
@@ -10,14 +10,15 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-
 import java.util.*;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ElementQueryDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * Element class that represents an element that gets its children
@@ -28,11 +29,11 @@ import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
  */
 public abstract class QueriedElement extends ProvElement {
 
-	protected IQueryable queryable;
+	protected IQueryable<?> queryable;
 	// This cache is used internally to facilitate child elements
 	// that want to eliminate duplicates from the parent hierarchy.
 	// This cache is *not* used as a general purpose child cache.
-	private Collection cachedChildren;
+	private Collection<?> cachedChildren;
 
 	protected QueriedElement(Object parent) {
 		super(parent);
@@ -42,11 +43,15 @@ public abstract class QueriedElement extends ProvElement {
 		Object parent = getParent(this);
 		if (parent instanceof QueriedElement)
 			return ((QueriedElement) parent).getPolicy();
-		return Policy.getDefault();
+		return ProvUIActivator.getDefault().getProvisioningUI().getPolicy();
 	}
 
-	public QueryProvider getQueryProvider() {
-		return getPolicy().getQueryProvider();
+	public ProvisioningUI getProvisioningUI() {
+		Object parent = getParent(this);
+		if (parent instanceof QueriedElement)
+			return ((QueriedElement) parent).getProvisioningUI();
+		return ProvUIActivator.getDefault().getProvisioningUI();
+
 	}
 
 	public IUViewQueryContext getQueryContext() {
@@ -60,6 +65,10 @@ public abstract class QueriedElement extends ProvElement {
 		return fetchChildren(o, new NullProgressMonitor());
 	}
 
+	public QueryProvider getQueryProvider() {
+		return ProvUI.getQueryProvider();
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
@@ -87,16 +96,16 @@ public abstract class QueriedElement extends ProvElement {
 	}
 
 	protected Object[] fetchChildren(Object o, IProgressMonitor monitor) {
-		cachedChildren = Collections.EMPTY_LIST;
+		cachedChildren = CollectionUtils.emptyList();
 		if (getQueryProvider() == null)
 			return new Object[0];
 		ElementQueryDescriptor queryDescriptor = getQueryProvider().getQueryDescriptor(this);
 		if (queryDescriptor == null)
 			return new Object[0];
-		Collection results = queryDescriptor.performQuery(monitor);
+		Collection<?> results = queryDescriptor.performQuery(monitor);
 		cachedChildren = Collections.unmodifiableCollection(results);
 		if (results.size() > 0) {
-			Collection returnedChildren = new HashSet();
+			Collection<Object> returnedChildren = new HashSet<Object>();
 			returnedChildren.addAll(results);
 			Object[] siblings = getSiblings();
 			for (int i = 0; i < siblings.length; i++) {
@@ -107,11 +116,11 @@ public abstract class QueriedElement extends ProvElement {
 		return new Object[0];
 	}
 
-	public void setQueryable(IQueryable queryable) {
+	public void setQueryable(IQueryable<?> queryable) {
 		this.queryable = queryable;
 	}
 
-	public IQueryable getQueryable() {
+	public IQueryable<?> getQueryable() {
 		return queryable;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
index c26f283..e5085ab 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
@@ -14,14 +14,12 @@ package org.eclipse.equinox.internal.p2.ui.model;
 import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ElementWrapper;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.query.Collector;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -33,13 +31,13 @@ import org.eclipse.osgi.util.NLS;
  */
 public abstract class QueriedElementWrapper extends ElementWrapper {
 
-	protected IQueryable queryable;
+	protected IQueryable<?> queryable;
 	protected Object parent;
 	protected String emptyExplanationString;
 	protected int emptyExplanationSeverity;
 	protected String emptyExplanationDescription;
 
-	public QueriedElementWrapper(IQueryable queryable, Object parent) {
+	public QueriedElementWrapper(IQueryable<?> queryable, Object parent) {
 		this.queryable = queryable;
 		this.parent = parent;
 	}
@@ -57,7 +55,7 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
 		return item;
 	}
 
-	public Collection getElements(Collector collector) {
+	public Collection<?> getElements(Collector<?> collector) {
 		// Any previously stored explanations are not valid.
 		emptyExplanationString = null;
 		emptyExplanationSeverity = IStatus.INFO;
@@ -68,19 +66,17 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
 			// is empty and the parent is an IU, then being empty is not a big deal, it means
 			// we are in drilldown.
 			if (parent instanceof MetadataRepositoryElement) {
+				RepositoryTracker manipulator = ProvisioningUI.getDefaultUI().getRepositoryTracker();
 				MetadataRepositoryElement repo = (MetadataRepositoryElement) parent;
-				if (ProvUI.hasNotFoundStatusBeenReported(repo.getLocation())) {
-					String description = null;
-					if (Policy.getDefault().getRepositoryManipulator() != null)
-						description = Policy.getDefault().getRepositoryManipulator().getRepositoryNotFoundInstructionString();
-					return emptyExplanation(IStatus.ERROR, NLS.bind(ProvUIMessages.QueriedElementWrapper_SiteNotFound, URIUtil.toUnencodedString(repo.getLocation())), description);
+				if (manipulator.hasNotFoundStatusBeenReported(repo.getLocation())) {
+					return emptyExplanation(IStatus.ERROR, NLS.bind(ProvUIMessages.QueriedElementWrapper_SiteNotFound, URIUtil.toUnencodedString(repo.getLocation())), ""); //$NON-NLS-1$
 				}
 			}
 			if (parent instanceof QueriedElement) {
 				QueriedElement element = (QueriedElement) parent;
 				IUViewQueryContext context = element.getQueryContext();
 				if (context == null)
-					context = element.getPolicy().getQueryContext();
+					context = ProvUI.getQueryContext(element.getPolicy());
 				if (parent instanceof MetadataRepositoryElement || parent instanceof MetadataRepositories) {
 					if (context != null && context.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY && context.getUseCategories()) {
 						return emptyExplanation(IStatus.INFO, ProvUIMessages.QueriedElementWrapper_NoCategorizedItemsExplanation, context.getUsingCategoriesDescription());
@@ -91,7 +87,7 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
 			// It is empty, but the parent is an IU, so this could be a drilldown.
 			return Collections.EMPTY_LIST;
 		}
-		Collection elements = super.getElements(collector);
+		Collection<?> elements = super.getElements(collector);
 		// We had elements but now they have been filtered out.  Hopefully
 		// we can explain this.
 		if (elements.isEmpty()) {
@@ -104,8 +100,8 @@ public abstract class QueriedElementWrapper extends ElementWrapper {
 		return elements;
 	}
 
-	Collection emptyExplanation(int severity, String explanationString, String explanationDescription) {
-		ArrayList collection = new ArrayList(1);
+	Collection<?> emptyExplanation(int severity, String explanationString, String explanationDescription) {
+		ArrayList<Object> collection = new ArrayList<Object>(1);
 		collection.add(new EmptyElementExplanation(parent, severity, explanationString, explanationDescription));
 		return collection;
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
index c581c98..b84c78b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
@@ -13,6 +13,7 @@ package org.eclipse.equinox.internal.p2.ui.model;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
 import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
 import org.eclipse.ui.progress.IElementCollector;
 
@@ -50,4 +51,25 @@ public abstract class RemoteQueriedElement extends QueriedElement implements IDe
 		return true;
 	}
 
+	/*
+	 * Overridden to ensure that we check whether we are using a
+	 * QueryableMetadataRepositoryManager as our queryable.  If so, 
+	 * we must find out if it is up to date with the real manager.  
+	 *
+	 * This is necessary to prevent background loading of already loaded repositories
+	 * by the DeferredTreeContentManager, which will add redundant children to the
+	 * viewer.  
+	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
+	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
+	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=275235
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
+	 */
+
+	public boolean hasQueryable() {
+		if (queryable instanceof QueryableMetadataRepositoryManager)
+			return ((QueryableMetadataRepositoryManager) queryable).areRepositoriesLoaded();
+		return super.hasQueryable();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
index 142c5ad..d474a73 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
@@ -14,13 +14,9 @@ import com.ibm.icu.text.DateFormat;
 import java.util.Date;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.query.IQueryable;
 
 /**
  * Element class for a profile snapshot
@@ -55,19 +51,16 @@ public class RollbackProfileElement extends RemoteQueriedElement {
 		return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(timestamp));
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		if (adapter == IProfile.class)
-			try {
-				return getProfileSnapshot(new NullProgressMonitor());
-			} catch (ProvisionException e) {
-				handleException(e, ProvUIMessages.RollbackProfileElement_InvalidSnapshot);
-			}
+			return getProfileSnapshot(new NullProgressMonitor());
 		return super.getAdapter(adapter);
 	}
 
-	public IProfile getProfileSnapshot(IProgressMonitor monitor) throws ProvisionException {
+	public IProfile getProfileSnapshot(IProgressMonitor monitor) {
 		if (snapshot == null) {
-			snapshot = ProvisioningUtil.getProfile(profileId, timestamp);
+			snapshot = ProvUI.getProfileRegistry(getProvisioningUI().getSession()).getProfile(profileId, timestamp);
 			setQueryable(snapshot);
 		}
 		return snapshot;
@@ -97,12 +90,7 @@ public class RollbackProfileElement extends RemoteQueriedElement {
 	 * (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getQueryable()
 	 */
-	public IQueryable getQueryable() {
-		try {
-			return getProfileSnapshot(new NullProgressMonitor());
-		} catch (ProvisionException e) {
-			handleException(e, null);
-			return null;
-		}
+	public IQueryable<?> getQueryable() {
+		return getProfileSnapshot(new NullProgressMonitor());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
index ada55a5..a9574e8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
@@ -10,12 +10,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.model;
 
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * Element class that represents the root of a viewer.  It can be configured
- * with its own policy and query context.
+ * with its own ui and query context.
  * 
  * @since 3.5
  *
@@ -23,23 +25,23 @@ import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
 public abstract class RootElement extends RemoteQueriedElement {
 
 	private IUViewQueryContext queryContext;
-	private Policy policy;
+	private ProvisioningUI ui;
 
-	public RootElement(Policy policy) {
-		this(null, policy.getQueryContext(), policy);
+	public RootElement(ProvisioningUI ui) {
+		this(null, ProvUI.getQueryContext(ui.getPolicy()), ui);
 	}
 
-	public RootElement(IUViewQueryContext queryContext, Policy policy) {
-		this(null, queryContext, policy);
+	public RootElement(IUViewQueryContext queryContext, ProvisioningUI ui) {
+		this(null, queryContext, ui);
 	}
 
 	/*
 	 * Special method for subclasses that can sometimes be a root, and sometimes not.
 	 */
-	protected RootElement(Object parent, IUViewQueryContext queryContext, Policy policy) {
+	protected RootElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui) {
 		super(parent);
 		this.queryContext = queryContext;
-		this.policy = policy;
+		this.ui = ui;
 	}
 
 	/**
@@ -56,6 +58,10 @@ public abstract class RootElement extends RemoteQueriedElement {
 	}
 
 	public Policy getPolicy() {
-		return policy;
+		return ui.getPolicy();
+	}
+
+	public ProvisioningUI getProvisioningUI() {
+		return ui;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
new file mode 100644
index 0000000..3f227d0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.model;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
+/**
+ * Element class that represents available updates.
+ * 
+ * @since 3.4
+ *
+ */
+public class Updates extends QueriedElement {
+
+	private String profileId;
+	private IInstallableUnit[] iusToBeUpdated;
+
+	public Updates(String profileId) {
+		this(profileId, null);
+	}
+
+	public Updates(String profileId, IInstallableUnit[] iusToBeUpdated) {
+		super(null);
+		this.profileId = profileId;
+		this.iusToBeUpdated = iusToBeUpdated;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
+	 */
+	public String getLabel(Object o) {
+		return ProvUIMessages.Updates_Label;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
+	 */
+	protected int getDefaultQueryType() {
+		return QueryProvider.AVAILABLE_UPDATES;
+	}
+
+	public String getProfileId() {
+		return profileId;
+	}
+
+	public IInstallableUnit[] getIUs() {
+		return iusToBeUpdated;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AnyRequiredCapabilityQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AnyRequiredCapabilityQuery.java
deleted file mode 100644
index 10b837d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AnyRequiredCapabilityQuery.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-
-/**
- * A query that searches a repository for all {@link IInstallableUnit} instances that 
- * meet any one of the given capabilities.  
- */
-public class AnyRequiredCapabilityQuery extends MatchQuery {
-	private IRequiredCapability[] requirements;
-
-	/**
-	 * Creates a new query for the capabilities of the given IU.
-	 */
-	public AnyRequiredCapabilityQuery(IRequiredCapability[] requirements) {
-		this.requirements = requirements;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.p2.query2.Query#isMatch(java.lang.Object)
-	 */
-	public boolean isMatch(Object object) {
-		if (!(object instanceof IInstallableUnit))
-			return false;
-		IInstallableUnit candidate = (IInstallableUnit) object;
-		for (int i = 0; i < requirements.length; i++)
-			if (candidate.satisfies(requirements[i]))
-				return true;
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
new file mode 100644
index 0000000..27a4304
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.query;
+
+import org.eclipse.equinox.internal.p2.ui.model.ArtifactElement;
+import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+
+/**
+ * Wrapper that accepts artifact keys and wraps them in an ArtifactKeyElement.
+ * 
+ * @since 3.6
+ */
+public class ArtifactKeyWrapper extends QueriedElementWrapper {
+
+	IArtifactRepository repo;
+
+	public ArtifactKeyWrapper(IArtifactRepository repo, Object parent) {
+		super(repo, parent);
+		this.repo = repo;
+	}
+
+	protected boolean shouldWrap(Object match) {
+		if ((match instanceof IArtifactKey))
+			return true;
+		return false;
+	}
+
+	/**
+	 * Transforms the item to a UI element
+	 */
+	protected Object wrap(Object item) {
+		return super.wrap(new ArtifactElement(parent, (IArtifactKey) item, repo));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
new file mode 100644
index 0000000..a81b6bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource - ongoing development
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.query;
+
+import java.net.URI;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.model.ArtifactRepositoryElement;
+import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+
+/**
+ * ElementWrapper that wraps a URI with an ArtifactRepositoryElement.
+ * 
+ * @since 3.4
+ */
+public class ArtifactRepositoryElementWrapper extends QueriedElementWrapper {
+
+	public ArtifactRepositoryElementWrapper(IQueryable<URI> queryable, Object parent) {
+		super(queryable, parent);
+	}
+
+	/**
+	 * Accepts a result that matches the query criteria.
+	 * 
+	 * @param match an object matching the query
+	 * @return <code>true</code> if the query should continue,
+	 * or <code>false</code> to indicate the query should stop.
+	 */
+	protected boolean shouldWrap(Object match) {
+		if ((match instanceof URI))
+			return true;
+		return false;
+	}
+
+	/**
+	 * Transforms the item to a UI element
+	 */
+	protected Object wrap(Object item) {
+		return super.wrap(new ArtifactRepositoryElement(parent, (URI) item, ProvUI.getArtifactRepositoryManager(ProvisioningUI.getDefaultUI().getSession()).isEnabled((URI) item)));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
index 30489f6..3c6ec29 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
@@ -11,17 +11,14 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.query;
 
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-
 import java.util.Iterator;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
 import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.*;
 
 /**
  * A wrapper that examines available IU's and wraps them in an
@@ -36,7 +33,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
 	private boolean hideInstalledIUs = false;
 	private boolean drillDownChild = false;
 
-	public AvailableIUWrapper(IQueryable queryable, Object parent, boolean makeCategories, boolean makeDrillDownChild) {
+	public AvailableIUWrapper(IQueryable<?> queryable, Object parent, boolean makeCategories, boolean makeDrillDownChild) {
 		super(queryable, parent);
 		this.makeCategories = makeCategories;
 		this.drillDownChild = makeDrillDownChild;
@@ -62,7 +59,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
 	InformationCache cache = null;
 
 	protected boolean shouldWrap(Object match) {
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(match, IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(match, IInstallableUnit.class);
 		cache = computeIUInformation(iu); // Cache the result
 
 		// if we are hiding, hide anything that is the same iu or older
@@ -83,11 +80,11 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
 		boolean isUpdate = false;
 		boolean isInstalled = false;
 		if (profile != null && iu != null) {
-			Collector collector = profile.query(new InstallableUnitQuery(iu.getId()), new Collector(), null);
-			Iterator iter = collector.iterator();
+			IQueryResult<IInstallableUnit> queryResult = profile.query(QueryUtil.createIUQuery(iu.getId()), null);
+			Iterator<IInstallableUnit> iter = queryResult.iterator();
 			// We are typically iterating over only one IU unless it's a non-singleton.
 			while (iter.hasNext()) {
-				IInstallableUnit installed = (IInstallableUnit) iter.next();
+				IInstallableUnit installed = iter.next();
 				if (installed.getVersion().compareTo(iu.getVersion()) < 0)
 					isUpdate = true;
 				else {
@@ -101,7 +98,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
 	}
 
 	protected Object wrap(Object item) {
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(item, IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(item, IInstallableUnit.class);
 		boolean isUpdate = false;
 		boolean isInstalled = false;
 		if (cache != null && cache.item == item) {
@@ -144,8 +141,7 @@ public class AvailableIUWrapper extends QueriedElementWrapper {
 	}
 
 	protected boolean isCategory(IInstallableUnit iu) {
-		String isCategory = iu.getProperty(IInstallableUnit.PROP_TYPE_CATEGORY);
-		return isCategory != null && Boolean.valueOf(isCategory).booleanValue();
+		return QueryUtil.isCategory(iu);
 	}
 
 	protected boolean makeCategory() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
index 9f742b3..e66e85b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
@@ -12,12 +12,13 @@
 package org.eclipse.equinox.internal.p2.ui.query;
 
 import java.util.*;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
 import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
 import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.query.Collector;
+import org.eclipse.equinox.p2.query.IQueryable;
 
 /**
  * A collector that converts IU's to category elements as it accepts them.
@@ -28,23 +29,25 @@ import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
 public class CategoryElementWrapper extends QueriedElementWrapper {
 
 	// Used to track nested categories
-	private Set referredIUs = new HashSet();
+	private Set<String> referredIUs = new HashSet<String>();
 
-	public CategoryElementWrapper(IQueryable queryable, Object parent) {
+	public CategoryElementWrapper(IQueryable<?> queryable, Object parent) {
 		super(queryable, parent);
 	}
 
 	protected boolean shouldWrap(Object match) {
 		if (match instanceof IInstallableUnit) {
 			IInstallableUnit iu = (IInstallableUnit) match;
-			IRequiredCapability[] requirements = iu.getRequiredCapabilities();
-			for (int i = 0; i < requirements.length; i++) {
-				if (requirements[i].getNamespace().equals(IInstallableUnit.NAMESPACE_IU_ID)) {
-					referredIUs.add(requirements[i].getName());
+			Collection<IRequirement> requirements = iu.getRequirements();
+			for (IRequirement requirement : requirements) {
+				if (requirement instanceof IRequiredCapability) {
+					if (((IRequiredCapability) requirement).getNamespace().equals(IInstallableUnit.NAMESPACE_IU_ID)) {
+						referredIUs.add(((IRequiredCapability) requirement).getName());
+					}
 				}
 			}
 
-			Iterator iter = super.getCollection().iterator();
+			Iterator<?> iter = super.getCollection().iterator();
 			// Don't add the same category IU twice.  
 			while (iter.hasNext()) {
 				CategoryElement element = (CategoryElement) iter.next();
@@ -59,10 +62,10 @@ public class CategoryElementWrapper extends QueriedElementWrapper {
 		return false;
 	}
 
-	public Collection getElements(Collector collector) {
+	public Collection<?> getElements(Collector<?> collector) {
 		if (collector.isEmpty())
 			return super.getElements(collector);
-		Collection results = super.getElements(collector);
+		Collection<?> results = super.getElements(collector);
 		cleanList();
 		return results;
 	}
@@ -77,7 +80,7 @@ public class CategoryElementWrapper extends QueriedElementWrapper {
 	}
 
 	private void removeNestedCategories() {
-		CategoryElement[] categoryIUs = (CategoryElement[]) getCollection().toArray(new CategoryElement[getCollection().size()]);
+		CategoryElement[] categoryIUs = getCollection().toArray(new CategoryElement[getCollection().size()]);
 		// If any other element refers to a category element, remove it from the list
 		for (int i = 0; i < categoryIUs.length; i++) {
 			if (referredIUs.contains(categoryIUs[i].getIU().getId())) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
new file mode 100644
index 0000000..0aa3daf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.query;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.QueryProvider;
+
+/**
+ * IUViewQueryContext defines the different ways 
+ * IUs can be viewed.  Clients can use this context to 
+ * control how the various IU views are represented and traversed.
+ * 
+ * @since 2.0
+ */
+public class IUViewQueryContext {
+	public static final int AVAILABLE_VIEW_BY_CATEGORY = 1;
+	public static final int AVAILABLE_VIEW_BY_REPO = 2;
+	public static final int AVAILABLE_VIEW_FLAT = 3;
+
+	// Available view settings
+	// Default available view to repo as this provides the fastest information
+	private int view = AVAILABLE_VIEW_BY_REPO;
+	// Whether to show latest versions only, defaults to
+	// true.  Clients typically use a pref setting or dialog
+	// setting to initialize
+	private boolean showLatestVersionsOnly = true;
+	// Whether to hide things that are already installed
+	// Defaults to false since we wouldn't know what profile to use
+	private boolean hideAlreadyInstalled = false;
+	// Whether to group items in repos by category.  Note this only makes sense when the
+	// view type is AVAILABLE_VIEW_BY_REPO
+	private boolean useCategories = true;
+	// Whether to drill down into installed items
+	private boolean showInstallChildren = true;
+	// Whether to drill down into available items
+	private boolean showAvailableChildren = false;
+	// Whether to drill down into items in a provisioning plan
+	private boolean showProvisioningPlanChildren = true;
+
+	private String profileId = null;
+
+	private String hidingInstalledDescription = ProvUIMessages.IUViewQueryContext_AllAreInstalledDescription;
+	private String groupingCategoriesDescription = ProvUIMessages.IUViewQueryContext_NoCategorizedItemsDescription;
+
+	public IUViewQueryContext(int viewType) {
+		this.view = viewType;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueryContext#getQueryType()
+	 */
+	public int getQueryType() {
+		if (view == AVAILABLE_VIEW_BY_REPO)
+			return QueryProvider.METADATA_REPOS;
+		return QueryProvider.AVAILABLE_IUS;
+	}
+
+	public int getViewType() {
+		return view;
+	}
+
+	public void setViewType(int viewType) {
+		view = viewType;
+	}
+
+	public boolean getShowLatestVersionsOnly() {
+		return showLatestVersionsOnly;
+	}
+
+	public void setShowLatestVersionsOnly(boolean showLatest) {
+		showLatestVersionsOnly = showLatest;
+	}
+
+	public void hideAlreadyInstalled(String installedProfileId) {
+		profileId = installedProfileId;
+		hideAlreadyInstalled = true;
+	}
+
+	public void showAlreadyInstalled() {
+		hideAlreadyInstalled = false;
+	}
+
+	public boolean getHideAlreadyInstalled() {
+		return hideAlreadyInstalled;
+	}
+
+	public String getInstalledProfileId() {
+		return profileId;
+	}
+
+	public void setInstalledProfileId(String profileId) {
+		this.profileId = profileId;
+	}
+
+	/**
+	 * Set a boolean that indicates whether categories should be used when
+	 * viewing by repository.
+	 * 
+	 * useCategories <code>true</code> if a site in a sites view should expand into categories,
+	 * <code>false</code> if it should expand into IU's.
+	 */
+
+	public void setUseCategories(boolean useCategories) {
+		this.useCategories = useCategories;
+	}
+
+	/**
+	 * Return a boolean that indicates whether categories should be used when
+	 * viewing by repository.
+	 * 
+	 * @return <code>true</code> if a site in a sites view should expand into categories,
+	 * <code>false</code> if it should expand into IU's.
+	 */
+	public boolean getUseCategories() {
+		return useCategories;
+	}
+
+	public boolean getShowInstallChildren() {
+		return showInstallChildren;
+	}
+
+	public void setShowInstallChildren(boolean showChildren) {
+		showInstallChildren = showChildren;
+	}
+
+	public boolean getShowAvailableChildren() {
+		return showAvailableChildren;
+	}
+
+	public void setShowAvailableChildren(boolean showChildren) {
+		showAvailableChildren = showChildren;
+	}
+
+	public boolean getShowProvisioningPlanChildren() {
+		return showProvisioningPlanChildren;
+	}
+
+	public void setShowProvisioningPlanChildren(boolean showChildren) {
+		showProvisioningPlanChildren = showChildren;
+	}
+
+	public String getHidingInstalledDescription() {
+		return hidingInstalledDescription;
+	}
+
+	public void setHidingInstalledDescription(String description) {
+		hidingInstalledDescription = description;
+	}
+
+	public String getUsingCategoriesDescription() {
+		return groupingCategoriesDescription;
+	}
+
+	public void setUsingCategoriesDescription(String description) {
+		groupingCategoriesDescription = description;
+	}
+
+	public boolean shouldGroupByCategories() {
+		return view == AVAILABLE_VIEW_BY_CATEGORY || (view == AVAILABLE_VIEW_BY_REPO && useCategories);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
index 365fd4b..9e465a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
@@ -11,11 +11,11 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.query;
 
+import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
 import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryable;
 
 /**
  * ElementWrapper that accepts the matched IU's and
@@ -25,7 +25,7 @@ import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
  */
 public class InstalledIUElementWrapper extends QueriedElementWrapper {
 
-	public InstalledIUElementWrapper(IQueryable queryable, Object parent) {
+	public InstalledIUElementWrapper(IQueryable<?> queryable, Object parent) {
 		super(queryable, parent);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
index 1392fcc..3718ba1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
@@ -12,10 +12,11 @@
 package org.eclipse.equinox.internal.p2.ui.query;
 
 import java.net.URI;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
 import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * ElementWrapper that accepts the matched repo URLs and
@@ -25,7 +26,7 @@ import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUti
  */
 public class MetadataRepositoryElementWrapper extends QueriedElementWrapper {
 
-	public MetadataRepositoryElementWrapper(IQueryable queryable, Object parent) {
+	public MetadataRepositoryElementWrapper(IQueryable<URI> queryable, Object parent) {
 		super(queryable, parent);
 	}
 
@@ -46,6 +47,6 @@ public class MetadataRepositoryElementWrapper extends QueriedElementWrapper {
 	 * Transforms the item to a UI element
 	 */
 	protected Object wrap(Object item) {
-		return super.wrap(new MetadataRepositoryElement(parent, (URI) item, ProvisioningUtil.getMetadataRepositoryEnablement((URI) item)));
+		return super.wrap(new MetadataRepositoryElement(parent, (URI) item, ProvUI.getMetadataRepositoryManager(ProvisioningUI.getDefaultUI().getSession()).isEnabled((URI) item)));
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
index 060ac32..d102baf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
@@ -11,9 +11,9 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.query;
 
+import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
 import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
+import org.eclipse.equinox.p2.engine.IProfile;
 
 /**
  * Collector that accepts the matched Profiles and
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
index 5e6f832..4d787c0 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
@@ -12,34 +12,32 @@
 package org.eclipse.equinox.internal.p2.ui.query;
 
 import java.util.Arrays;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * An object that adds queryable support to the profile registry.
  */
-public class QueryableProfileRegistry implements IQueryable {
+public class QueryableProfileRegistry implements IQueryable<IProfile> {
 
-	public Collector query(Query query, Collector result, IProgressMonitor monitor) {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			ProvUI.reportStatus(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound), StatusManager.SHOW | StatusManager.LOG);
-			return result;
-		}
-		IProfile[] profiles = profileRegistry.getProfiles();
+	private ProvisioningUI ui;
+
+	public QueryableProfileRegistry(ProvisioningUI ui) {
+		this.ui = ui;
+	}
+
+	public IQueryResult<IProfile> query(IQuery<IProfile> query, IProgressMonitor monitor) {
+		IProfile[] profiles = ProvUI.getProfileRegistry(ui.getSession()).getProfiles();
 		SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.QueryableProfileRegistry_QueryProfileProgress, profiles.length);
 		try {
-			query.perform(Arrays.asList(profiles).iterator(), result);
+			return query.perform(Arrays.asList(profiles).iterator());
 		} finally {
 			sub.done();
 		}
-		return result;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
index 6633eed..82c8d4f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
@@ -8,57 +8,53 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     EclipseSource - ongoing development
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.ui.query;
 
-import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 
 /**
  * An object that implements a query for available updates
  */
-public class QueryableUpdates implements IQueryable {
+public class QueryableUpdates implements IQueryable<IInstallableUnit> {
 
 	private IInstallableUnit[] iusToUpdate;
+	ProvisioningUI ui;
 
-	public QueryableUpdates(IInstallableUnit[] iusToUpdate) {
+	public QueryableUpdates(ProvisioningUI ui, IInstallableUnit[] iusToUpdate) {
+		this.ui = ui;
 		this.iusToUpdate = iusToUpdate;
 	}
 
-	public Collector query(Query query, Collector result, IProgressMonitor monitor) {
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
 		int totalWork = 2000;
 		monitor.beginTask(ProvUIMessages.QueryableUpdates_UpdateListProgress, totalWork);
-		IPlanner planner = (IPlanner) ServiceHelper.getService(ProvUIActivator.getContext(), IPlanner.class.getName());
-		if (planner == null) {
-			ProvUI.reportStatus(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_NoPlannerFound), StatusManager.SHOW | StatusManager.LOG);
-			return result;
-		}
+		IPlanner planner = (IPlanner) ui.getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
 		try {
-			ArrayList allUpdates = new ArrayList();
+			Set<IInstallableUnit> allUpdates = new HashSet<IInstallableUnit>();
 			for (int i = 0; i < iusToUpdate.length; i++) {
 				if (monitor.isCanceled())
-					return result;
-				IInstallableUnit[] updates = planner.updatesFor(iusToUpdate[i], new ProvisioningContext(), new SubProgressMonitor(monitor, totalWork / 2 / iusToUpdate.length));
-				for (int j = 0; j < updates.length; j++)
-					allUpdates.add(updates[j]);
+					return Collector.emptyCollector();
+				IQueryResult<IInstallableUnit> updates = planner.updatesFor(iusToUpdate[i], new ProvisioningContext(ui.getSession().getProvisioningAgent()), new SubProgressMonitor(monitor, totalWork / 2 / iusToUpdate.length));
+				allUpdates.addAll(updates.toUnmodifiableSet());
 			}
-			query.perform(allUpdates.iterator(), result);
+			return query.perform(allUpdates.iterator());
 		} catch (OperationCanceledException e) {
 			// Nothing more to do, return result
+			return Collector.emptyCollector();
 		} finally {
 			monitor.done();
 		}
-		return result;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java
new file mode 100644
index 0000000..61333bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Cloudsmith Inc. - converted into expression based query
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.query;
+
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
+
+/**
+/**
+ * A query matching every {@link IInstallableUnit} that is meets
+ * any requirement of the specified IU.  This query is used when
+ * drilling down to show the children of an available IU.  For example,
+ * when installing an IU, we want to show all the IU's that are in the provisioning
+ * plan that are required by this IU.  This is usually used in combination with
+ * other queries (such as show all Required IUs which also are visible to
+ * the user as available).
+ * 
+ * @since 2.0 
+ */
+public class RequiredIUsQuery extends ExpressionMatchQuery<IInstallableUnit> {
+
+	private static final IExpression expression = ExpressionUtil.parse("$0.exists(rc | this ~= rc)"); //$NON-NLS-1$
+
+	/**
+	 * Creates a new query that will return any IU that meets any
+	 * one of the requirements of the specified IU. 
+	 * 
+	 * @param iu The IU whose requirements are to be checked
+	 */
+	public RequiredIUsQuery(IInstallableUnit iu) {
+		super(IInstallableUnit.class, expression, iu.getRequirements());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
index 163271e..338acc2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
@@ -16,7 +16,6 @@ import java.util.HashSet;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
 import org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementContentProvider;
 import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.Viewer;
 
@@ -32,8 +31,8 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
 
 	DeferredQueryTreeContentManager manager;
 	Object currentInput;
-	HashMap alreadyQueried = new HashMap();
-	HashSet queryCompleted = new HashSet();
+	HashMap<Object, Object> alreadyQueried = new HashMap<Object, Object>();
+	HashSet<Object> queryCompleted = new HashSet<Object>();
 	AbstractTreeViewer viewer = null;
 	ListenerList listeners = new ListenerList();
 	boolean synchronous = false;
@@ -73,8 +72,8 @@ public class DeferredQueryContentProvider extends ProvElementContentProvider {
 			});
 		} else
 			viewer = null;
-		alreadyQueried = new HashMap();
-		queryCompleted = new HashSet();
+		alreadyQueried = new HashMap<Object, Object>();
+		queryCompleted = new HashSet<Object>();
 		currentInput = newInput;
 		Object[] inputListeners = listeners.getListeners();
 		for (int i = 0; i < inputListeners.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java
new file mode 100644
index 0000000..c5d8be5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * An IUColumnConfig describes a column in a viewer that is showing 
+ * information about an IIInstallableUnit.  
+ * 
+ * @since 3.4
+ */
+public class IUColumnConfig {
+	/**
+	 * Constant indicating that the column represents an IInstallableUnit's id
+	 */
+	public final static int COLUMN_ID = 0;
+
+	/**
+	 * Constant indicating that the column represents an IInstallableUnit's name
+	 */
+	public final static int COLUMN_NAME = 1;
+
+	/**
+	 * Constant indicating that the column represents an IInstallableUnit's version
+	 */
+	public final static int COLUMN_VERSION = 2;
+
+	/**
+	 * Constant indicating that the column represents an IInstallableUnit's size
+	 */
+	public final static int COLUMN_SIZE = 3;
+
+	private String columnTitle;
+	private int columnType;
+	private int columnWidth;
+	private int columnWidthInPixels;
+
+	/**
+	 * Create an IUColumnConfig describing a column with the specified title, type, and
+	 * default width.
+	 * 
+	 * @param title the title that should appear for the column
+	 * @param columnType the type of column represented.  The type may be used to determine
+	 * appropriate size or formatting of the column's content.
+	 * @param columnWidthInChars the width (in characters) that should be used for the column if no 
+	 * other width is specified by the client.
+	 */
+
+	public IUColumnConfig(String title, int columnType, int columnWidthInChars) {
+		this.columnTitle = title;
+		this.columnType = columnType;
+		this.columnWidth = columnWidthInChars;
+		this.columnWidthInPixels = -1;
+	}
+
+	/**
+	 * Return the title of the column.
+	 * @return the title that should be used for the column.
+	 * 
+	 * @since 3.6
+	 */
+	public String getColumnTitle() {
+		return columnTitle;
+	}
+
+	/**
+	 * Set the title of the column
+	 * @param title the String that should be used when the column's title is shown
+	 * 
+	 * @since 3.6
+	 */
+	public void setColumnTitle(String title) {
+		this.columnTitle = title;
+	}
+
+	/**
+	 * Return the width of the column in character width units
+	 * @return the width (in characters) of the column
+	 * 
+	 * @since 3.6
+	 */
+	public int getWidthInChars() {
+		return columnWidth;
+	}
+
+	/**
+	 * Set the width of the column in character width units
+	 * @param columnWidth the width (in characters) of the column
+	 * 
+	 * @since 3.6
+	 */
+	public void setWidthInChars(int columnWidth) {
+		this.columnWidth = columnWidth;
+	}
+
+	/**
+	 * Get the width in pixels of this column when displayed in the specified
+	 * control.  If a specific width in pixels has already been specified by a client,
+	 * that width is used.  Otherwise, the value is computed based on the character
+	 * width specified for the column.
+	 * @param control
+	 * @return the width in pixels that should be used for the column
+	 * 
+	 * @since 3.6
+	 * 
+	 * @see #setWidthInPixels(int)
+	 */
+	public int getWidthInPixels(Control control) {
+		if (columnWidthInPixels >= 0)
+			return columnWidthInPixels;
+
+		GC gc = new GC(control);
+		FontMetrics fm = gc.getFontMetrics();
+		columnWidthInPixels = Dialog.convertWidthInCharsToPixels(fm, columnWidth);
+		gc.dispose();
+		return columnWidthInPixels;
+	}
+
+	/**
+	 * Set the width in pixels that should be used for this column.  This width overrides
+	 * any character width that has been specified.  This method is useful when the column width
+	 * is determined by user action.
+	 * 
+	 * @param width
+	 * 
+	 * @since 3.6
+	 */
+	public void setWidthInPixels(int width) {
+		this.columnWidthInPixels = width;
+	}
+
+	/**
+	 * Return the type of column.
+	 * @return an Integer constant specifying the type of data being shown in the column.
+	 * 
+	 * @since 3.6
+	 * @see #COLUMN_ID
+	 * @see #COLUMN_NAME
+	 * @see #COLUMN_SIZE
+	 * @see #COLUMN_VERSION
+	 */
+	public int getColumnType() {
+		return columnType;
+	}
+
+	/**
+	 * Set the type of column.
+	 * @param type an Integer constant specifying the type of data being shown in the column.
+	 * 
+	 * @since 3.6
+	 * 
+	 * @see #COLUMN_ID
+	 * @see #COLUMN_NAME
+	 * @see #COLUMN_SIZE
+	 * @see #COLUMN_VERSION
+	 */
+	public void setColumnType(int type) {
+		this.columnType = type;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
new file mode 100644
index 0000000..e742aec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+
+public class IUComparator extends ViewerComparator {
+	public static final int IU_NAME = 0;
+	public static final int IU_ID = 1;
+	private int key;
+	private boolean showingId = false;
+
+	public IUComparator(int sortKey) {
+		this.key = sortKey;
+		showingId = sortKey == IU_ID;
+	}
+
+	/**
+	 * Use the specified column config to determine
+	 * whether the id should be used in lieu of an empty name
+	 * when sorting.
+	 * 
+	 * @param columnConfig
+	 */
+	public void useColumnConfig(IUColumnConfig[] columnConfig) {
+		for (int i = 0; i < columnConfig.length; i++)
+			if (columnConfig[i].getColumnType() == IUColumnConfig.COLUMN_ID) {
+				showingId = true;
+				break;
+			}
+	}
+
+	public int compare(Viewer viewer, Object obj1, Object obj2) {
+		IInstallableUnit iu1 = ProvUI.getAdapter(obj1, IInstallableUnit.class);
+		IInstallableUnit iu2 = ProvUI.getAdapter(obj2, IInstallableUnit.class);
+		if (iu1 == null || iu2 == null)
+			// If these are not iu's use the super class comparator.
+			return super.compare(viewer, obj1, obj2);
+
+		String key1, key2;
+		if (key == IU_NAME) {
+			// Compare the iu names in the default locale.
+			// If a name is not defined, we use blank if we know the id is shown in another
+			// column.  If the id is not shown elsewhere, then we are displaying it, so use
+			// the id instead.
+			key1 = iu1.getProperty(IInstallableUnit.PROP_NAME, null);
+			if (key1 == null)
+				if (showingId)
+					key1 = ""; //$NON-NLS-1$
+				else
+					key1 = iu1.getId();
+			key2 = iu2.getProperty(IInstallableUnit.PROP_NAME, null);
+			if (key2 == null)
+				if (showingId)
+					key2 = ""; //$NON-NLS-1$
+				else
+					key2 = iu2.getId();
+		} else {
+			key1 = iu1.getId();
+			key2 = iu2.getId();
+		}
+
+		int result = 0;
+		result = key1.compareToIgnoreCase(key2);
+		if (result == 0) {
+			// We want to show later versions first so compare backwards.
+			result = iu2.getVersion().compareTo(iu1.getVersion());
+		}
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
index 8de9534..3903e0d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
@@ -13,15 +13,12 @@ package org.eclipse.equinox.internal.p2.ui.viewers;
 
 import java.text.NumberFormat;
 import java.util.HashMap;
-import java.util.Iterator;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.*;
 import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
 import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Font;
@@ -45,7 +42,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 
 	private IUColumnConfig[] columnConfig;
 	Shell shell;
-	HashMap jobs = new HashMap();
+	HashMap<IIUElement, Job> jobs = new HashMap<IIUElement, Job>();
 
 	public IUDetailsLabelProvider() {
 		this(null, null, null);
@@ -58,7 +55,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 		else
 			this.columnConfig = columnConfig;
 		for (int i = 0; i < this.columnConfig.length; i++)
-			if (this.columnConfig[i].columnField == IUColumnConfig.COLUMN_ID) {
+			if (this.columnConfig[i].getColumnType() == IUColumnConfig.COLUMN_ID) {
 				showingId = true;
 				break;
 			}
@@ -76,10 +73,10 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 	public String getColumnText(Object element, int columnIndex) {
 		int columnContent = IUColumnConfig.COLUMN_ID;
 		if (columnIndex < columnConfig.length) {
-			columnContent = columnConfig[columnIndex].columnField;
+			columnContent = columnConfig[columnIndex].getColumnType();
 		}
 
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(element, IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
 		if (iu == null) {
 			if (columnIndex == 0) {
 				if (element instanceof ProvElement)
@@ -94,7 +91,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 				return iu.getId();
 			case IUColumnConfig.COLUMN_NAME :
 				// Get the iu name in the current locale
-				String name = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
+				String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
 				if (name != null)
 					return name;
 				// If the iu name is not available, we return blank if we know know we are
@@ -135,7 +132,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 		long size = element.getSize();
 		// If size is already known, or we already tried
 		// to get it, don't try again
-		if (size != IIUElement.SIZE_UNKNOWN)
+		if (size != ProvUI.SIZE_UNKNOWN)
 			return getFormattedSize(size);
 		if (!jobs.containsKey(element)) {
 			Job resolveJob = new Job(element.getIU().getId()) {
@@ -153,7 +150,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 						return Status.CANCEL_STATUS;
 
 					// If we still could not compute size, give up
-					if (element.getSize() == IIUElement.SIZE_UNKNOWN)
+					if (element.getSize() == ProvUI.SIZE_UNKNOWN)
 						return Status.OK_STATUS;
 
 					if (shell == null || shell.isDisposed())
@@ -183,7 +180,7 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 	}
 
 	private String getFormattedSize(long size) {
-		if (size == IIUElement.SIZE_UNKNOWN || size == IIUElement.SIZE_UNAVAILABLE)
+		if (size == ProvUI.SIZE_UNKNOWN || size == ProvUI.SIZE_UNAVAILABLE)
 			return ProvUIMessages.IUDetailsLabelProvider_Unknown;
 		if (size > 1000L) {
 			long kb = size / 1000L;
@@ -211,10 +208,10 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 	}
 
 	public String getToolTipText(Object element) {
-		IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(element, IInstallableUnit.class);
+		IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
 		if (iu == null || toolTipProperty == null)
 			return null;
-		return IUPropertyUtils.getIUProperty(iu, toolTipProperty);
+		return iu.getProperty(toolTipProperty, null);
 	}
 
 	/* (non-Javadoc)
@@ -229,11 +226,8 @@ public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITabl
 
 	public void dispose() {
 		super.dispose();
-		Iterator iter = jobs.values().iterator();
-		while (iter.hasNext()) {
-			Job job = (Job) iter.next();
+		for (Job job : jobs.values())
 			job.cancel();
-		}
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
new file mode 100644
index 0000000..57e1630
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import java.util.*;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Implements drag behaviour when IU items are dragged from a repository view.
+ * 
+ * @since 3.4
+ */
+public class IUDragAdapter extends DragSourceAdapter {
+
+	ISelectionProvider selectionProvider;
+
+	/**
+	 * Constructs a new drag adapter.
+	 * 
+	 * @param provider
+	 *            The selection provider
+	 */
+	public IUDragAdapter(ISelectionProvider provider) {
+		selectionProvider = provider;
+	}
+
+	/**
+	 * Set the drag data to represent the local selection of IU's if possible.
+	 * Fallback to using a text description of each IU.
+	 */
+	public void dragSetData(DragSourceEvent event) {
+		IInstallableUnit[] ius = getSelectedIUs();
+
+		if (ius == null || ius.length == 0) {
+			return;
+		}
+
+		// use local selection transfer if possible
+		if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
+			event.data = LocalSelectionTransfer.getTransfer().getSelection();
+			return;
+		}
+		// resort to a text transfer
+		if (!TextTransfer.getInstance().isSupportedType(event.dataType)) {
+			return;
+		}
+
+		// Get a text description of each IU and set as the drag data
+		final StringBuffer buffer = new StringBuffer();
+
+		for (int i = 0; i < ius.length; i++) {
+			buffer.append(ius[i].toString());
+			buffer.append('\n');
+		}
+		event.data = buffer.toString();
+	}
+
+	/**
+	 * Start the drag only if the selection contains IUs.
+	 */
+	public void dragStart(DragSourceEvent event) {
+
+		// Focus workaround copied from navigator drag adapter
+		DragSource dragSource = (DragSource) event.widget;
+		Control control = dragSource.getControl();
+		if (control != control.getDisplay().getFocusControl()) {
+			event.doit = false;
+			return;
+		}
+
+		// Check the selection
+		IStructuredSelection selection = (IStructuredSelection) selectionProvider.getSelection();
+		// No drag if nothing is selected
+		if (selection.isEmpty()) {
+			event.doit = false;
+			return;
+		}
+		if (!areOnlyIUsSelected(selection)) {
+			event.doit = false;
+			return;
+		}
+		LocalSelectionTransfer.getTransfer().setSelection(selection);
+		event.doit = true;
+	}
+
+	private IInstallableUnit[] getSelectedIUs() {
+		List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+
+		ISelection selection = selectionProvider.getSelection();
+		if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
+			return null;
+		}
+		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+
+		Iterator<?> iter = structuredSelection.iterator();
+		while (iter.hasNext()) {
+			IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
+			if (iu != null) {
+				ius.add(iu);
+			}
+		}
+		return ius.toArray(new IInstallableUnit[ius.size()]);
+	}
+
+	private boolean areOnlyIUsSelected(IStructuredSelection selection) {
+		Iterator<?> iter = selection.iterator();
+		while (iter.hasNext()) {
+			IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
+			if (iu == null) {
+				return false;
+			}
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/InstallIUDropAdapter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/InstallIUDropAdapter.java
new file mode 100644
index 0000000..bb09719
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/InstallIUDropAdapter.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import java.util.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.actions.InstallAction;
+import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.util.LocalSelectionTransfer;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.dnd.*;
+
+/**
+ * Defines drop behavior for selected IUs to mean install the IU on the target
+ * profile.
+ * 
+ * @since 3.4
+ * 
+ */
+public class InstallIUDropAdapter extends ViewerDropAdapter {
+
+	static boolean DEBUG = false;
+	ProvisioningUI ui;
+
+	/**
+	 * Constructs a new drop adapter.
+	 * 
+	 * @param viewer
+	 *            the navigator's viewer
+	 */
+	public InstallIUDropAdapter(ProvisioningUI ui, StructuredViewer viewer) {
+		super(viewer);
+		this.ui = ui;
+	}
+
+	/**
+	 * Returns an error status with the given info.
+	 */
+	IStatus error(String message) {
+		return error(message, null);
+	}
+
+	/**
+	 * Returns an error status with the given info.
+	 */
+	IStatus error(String message, Throwable exception) {
+		return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, exception);
+	}
+
+	/**
+	 * Returns the target profile id for the drop. If the drop is positioned on an
+	 * IU, return its parent profile id.
+	 */
+	private String getProfileTarget(Object mouseTarget) {
+		IProfile profile = ProvUI.getAdapter(mouseTarget, IProfile.class);
+		if (profile != null) {
+			return profile.getProfileId();
+		}
+
+		if (mouseTarget instanceof InstalledIUElement) {
+			return ((InstalledIUElement) mouseTarget).getProfileId();
+		}
+		return null;
+	}
+
+	/**
+	 * Returns an status indicating success.
+	 */
+	private IStatus ok() {
+		return new Status(IStatus.OK, ProvUIActivator.PLUGIN_ID, 0, null, null);
+	}
+
+	/**
+	 * Perform the drop.
+	 * 
+	 * @see org.eclipse.swt.dnd.DropTargetListener#drop(org.eclipse.swt.dnd.DropTargetEvent)
+	 */
+	public boolean performDrop(final Object data) {
+		if (DEBUG) {
+			System.out.println("Perform drop on target: " + getCurrentTarget() + " with data: " + data); //$NON-NLS-1$//$NON-NLS-2$
+		}
+		if (getCurrentTarget() == null || data == null)
+			return false;
+
+		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+		if (!(selection instanceof IStructuredSelection) || selection.isEmpty())
+			return false;
+
+		String profileId = getProfileTarget(getCurrentTarget());
+		if (getCurrentOperation() == DND.DROP_COPY && profileId != null) {
+			final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+			ISelectionProvider selectionProvider = new ISelectionProvider() {
+
+				/* (non-Javadoc)
+				 * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+				 */
+				public void addSelectionChangedListener(ISelectionChangedListener listener) {
+					// Ignore because the selection won't change 
+				}
+
+				/* (non-Javadoc)
+				 * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
+				 */
+				public ISelection getSelection() {
+					if (DEBUG) {
+						System.out.println("Selection was queried by action"); //$NON-NLS-1$
+						System.out.println(structuredSelection.toString());
+					}
+					return structuredSelection;
+				}
+
+				/* (non-Javadoc)
+				 * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+				 */
+				public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+					// ignore because the selection is static
+				}
+
+				/* (non-Javadoc)
+				 * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
+				 */
+				public void setSelection(ISelection sel) {
+					throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
+				}
+			};
+			InstallAction action = new InstallAction(ui, selectionProvider, profileId);
+			if (DEBUG)
+				System.out.println("Running install action"); //$NON-NLS-1$
+			action.run();
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Validate whether the drop is valid for the target
+	 */
+	public boolean validateDrop(Object target, int dragOperation, TransferData transferType) {
+
+		if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
+			IStatus status = validateTarget(target, transferType);
+			if (DEBUG) {
+				System.out.println("Validate target: " + status); //$NON-NLS-1$
+			}
+			return status.isOK();
+		}
+		return false;
+	}
+
+	/*
+	 * Overridden to force a copy when the drag is valid.
+	 * 
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
+	 */
+	public void dragEnter(DropTargetEvent event) {
+		event.detail = DND.DROP_COPY;
+		super.dragEnter(event);
+	}
+
+	/**
+	 * Ensures that the drop target meets certain criteria
+	 */
+	private IStatus validateTarget(Object target, TransferData transferType) {
+		if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
+			IInstallableUnit[] ius = getSelectedIUs();
+
+			if (ius.length == 0) {
+				return error(ProvUIMessages.ProvDropAdapter_NoIUsToDrop);
+			}
+			if (getProfileTarget(target) != null) {
+				return ok();
+			}
+			return error(ProvUIMessages.ProvDropAdapter_InvalidDropTarget);
+		}
+		return error(ProvUIMessages.ProvDropAdapter_UnsupportedDropOperation);
+	}
+
+	/**
+	 * Returns the resource selection from the LocalSelectionTransfer.
+	 * 
+	 * @return the resource selection from the LocalSelectionTransfer
+	 */
+	private IInstallableUnit[] getSelectedIUs() {
+		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
+		List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
+
+		if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
+			return null;
+		}
+		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+
+		Iterator<?> iter = structuredSelection.iterator();
+		while (iter.hasNext()) {
+			IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
+			if (iu != null) {
+				ius.add(iu);
+			}
+		}
+		return ius.toArray(new IInstallableUnit[ius.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
new file mode 100644
index 0000000..7eddb3b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import java.net.URI;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.viewers.IElementComparer;
+
+public class ProvElementComparer implements IElementComparer {
+
+	public boolean equals(Object a, Object b) {
+		// We treat category elements specially because this
+		// is one case where resolving down to an IU will lose identity
+		// differences.  (category IU's with the same name and version number cannot be treated the same).
+		if (a instanceof CategoryElement || b instanceof CategoryElement)
+			return a.equals(b);
+		IInstallableUnit iu1 = getIU(a);
+		IInstallableUnit iu2 = getIU(b);
+		if (iu1 != null && iu2 != null)
+			return iu1.equals(iu2);
+		String p1 = getProfileId(a);
+		String p2 = getProfileId(b);
+		if (p1 != null && p2 != null)
+			return p1.equals(p2);
+		URI r1 = getRepositoryLocation(a);
+		URI r2 = getRepositoryLocation(b);
+		if (r1 != null && r2 != null)
+			return r1.equals(r2);
+		return a.equals(b);
+	}
+
+	public int hashCode(Object element) {
+		if (element instanceof CategoryElement)
+			return element.hashCode();
+		IInstallableUnit iu = getIU(element);
+		if (iu != null)
+			return iu.hashCode();
+		String profileId = getProfileId(element);
+		if (profileId != null)
+			return profileId.hashCode();
+		URI location = getRepositoryLocation(element);
+		if (location != null)
+			return location.hashCode();
+		return element.hashCode();
+	}
+
+	private IInstallableUnit getIU(Object obj) {
+		return ProvUI.getAdapter(obj, IInstallableUnit.class);
+	}
+
+	private String getProfileId(Object obj) {
+		if (obj instanceof ProfileElement)
+			return ((ProfileElement) obj).getLabel(obj);
+		IProfile profile = ProvUI.getAdapter(obj, IProfile.class);
+		if (profile == null)
+			return null;
+		return profile.getProfileId();
+	}
+
+	private URI getRepositoryLocation(Object obj) {
+		if (obj instanceof IRepositoryElement<?>)
+			return ((IRepositoryElement<?>) obj).getLocation();
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
new file mode 100644
index 0000000..533fba2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.*;
+
+/**
+ * Content provider that retrieves children of a ProvElement.
+ * 
+ * @since 3.5
+ * 
+ */
+public class ProvElementContentProvider implements ITreeContentProvider {
+
+	private boolean fetchInBackground = false;
+	private Viewer viewer;
+	private Job fetchJob;
+	// family is used by test cases
+	Object fetchFamily = new Object();
+
+	/**
+	 * 
+	 */
+	public ProvElementContentProvider() {
+		// Default constructor
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	public Object[] getElements(final Object input) {
+		// Simple deferred fetch handling for table viewers
+		if (fetchInBackground && input instanceof IDeferredWorkbenchAdapter && viewer instanceof AbstractTableViewer) {
+			final Display display = viewer.getControl().getDisplay();
+			final Object pending = new PendingUpdateAdapter();
+			if (fetchJob != null)
+				fetchJob.cancel();
+			fetchJob = new Job(ProvUIMessages.ProvElementContentProvider_FetchJobTitle) {
+				protected IStatus run(final IProgressMonitor monitor) {
+					IDeferredWorkbenchAdapter parent = (IDeferredWorkbenchAdapter) input;
+					final ArrayList<Object> children = new ArrayList<Object>();
+					parent.fetchDeferredChildren(parent, new IElementCollector() {
+						public void add(Object element, IProgressMonitor mon) {
+							if (mon.isCanceled())
+								return;
+							children.add(element);
+						}
+
+						public void add(Object[] elements, IProgressMonitor mon) {
+							if (mon.isCanceled())
+								return;
+							children.addAll(Arrays.asList(elements));
+						}
+
+						public void done() {
+							// nothing special to do
+						}
+
+					}, monitor);
+					if (!monitor.isCanceled()) {
+						display.asyncExec(new Runnable() {
+							public void run() {
+								AbstractTableViewer tableViewer = (AbstractTableViewer) viewer;
+								if (monitor.isCanceled() || tableViewer == null || tableViewer.getControl().isDisposed())
+									return;
+								tableViewer.getControl().setRedraw(false);
+								tableViewer.remove(pending);
+								tableViewer.add(children.toArray());
+								finishedFetchingElements(input);
+								tableViewer.getControl().setRedraw(true);
+							}
+						});
+					}
+					return Status.OK_STATUS;
+				}
+
+				public boolean belongsTo(Object family) {
+					return family == fetchFamily;
+				}
+
+			};
+			fetchJob.schedule();
+			return new Object[] {pending};
+		}
+		Object[] elements = getChildren(input);
+		finishedFetchingElements(input);
+		return elements;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+	 */
+	public Object getParent(Object child) {
+		if (child instanceof ProvElement) {
+			return ((ProvElement) child).getParent(child);
+		}
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+	 */
+	public boolean hasChildren(Object element) {
+		if (element instanceof ProvElement)
+			return ((ProvElement) element).hasChildren(element);
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+	 */
+	public Object[] getChildren(final Object parent) {
+		if (parent instanceof ProvElement) {
+			return ((ProvElement) parent).getChildren(parent);
+		}
+		return new Object[0];
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+		viewer = null;
+		if (fetchJob != null) {
+			fetchJob.cancel();
+			fetchJob = null;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		this.viewer = viewer;
+		if (fetchJob != null) {
+			fetchJob.cancel();
+			fetchJob = null;
+		}
+	}
+
+	protected void finishedFetchingElements(Object parent) {
+		// do nothing
+	}
+
+	public void setFetchInBackground(boolean fetchInBackground) {
+		this.fetchInBackground = fetchInBackground;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
new file mode 100644
index 0000000..e82f5f8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Label provider for provisioning elements. Some provisioning objects are
+ * wrapped by ProvElements and some are not.  This is the most generic of the
+ * provisioning label providers.  A two-column format for elements is 
+ * supported, with the content of the columns dependent on the type of object.
+ * 
+ * @since 3.4
+ */
+public class ProvElementLabelProvider extends LabelProvider implements ITableLabelProvider {
+
+	public String getText(Object obj) {
+		if (obj instanceof ProvElement) {
+			return ((ProvElement) obj).getLabel(obj);
+		}
+		if (obj instanceof IProfile) {
+			return ((IProfile) obj).getProfileId();
+		}
+		if (obj instanceof IInstallableUnit) {
+			IInstallableUnit iu = (IInstallableUnit) obj;
+			return iu.getId();
+		}
+		if (obj instanceof IRepository<?>) {
+			String name = ((IRepository<?>) obj).getName();
+			if (name != null && name.length() > 0) {
+				return name;
+			}
+			return URIUtil.toUnencodedString(((IRepository<?>) obj).getLocation());
+		}
+		if (obj instanceof IRepositoryElement<?>) {
+			String name = ((IRepositoryElement<?>) obj).getName();
+			if (name != null && name.length() > 0) {
+				return name;
+			}
+			return URIUtil.toUnencodedString(((IRepositoryElement<?>) obj).getLocation());
+		}
+		if (obj instanceof IArtifactKey) {
+			IArtifactKey key = (IArtifactKey) obj;
+			return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
+		}
+		if (obj instanceof IProcessingStepDescriptor) {
+			IProcessingStepDescriptor descriptor = (IProcessingStepDescriptor) obj;
+			return descriptor.getProcessorId();
+		}
+		if (obj instanceof IRequiredCapability) {
+			return ((IRequiredCapability) obj).getName();
+		}
+		return obj.toString();
+	}
+
+	public Image getImage(Object obj) {
+		if (obj instanceof ProvElement) {
+			return ((ProvElement) obj).getImage(obj);
+		}
+		if (obj instanceof IProfile) {
+			return ProvUIImages.getImage(ProvUIImages.IMG_PROFILE);
+		}
+		if (obj instanceof IInstallableUnit) {
+			return ProvUIImages.getImage(ProvUIImages.IMG_IU);
+		}
+		if (obj instanceof IArtifactRepository) {
+			return ProvUIImages.getImage(ProvUIImages.IMG_ARTIFACT_REPOSITORY);
+		}
+		if (obj instanceof IMetadataRepository) {
+			return ProvUIImages.getImage(ProvUIImages.IMG_METADATA_REPOSITORY);
+		}
+		if (obj instanceof IArtifactKey) {
+			return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
+		}
+		if (obj instanceof IRequirement) {
+			return ProvUIImages.getImage(ProvUIImages.IMG_IU);
+		}
+		return null;
+	}
+
+	public Image getColumnImage(Object element, int index) {
+		if (index == 0) {
+			return getImage(element);
+		}
+		return null;
+	}
+
+	public String getColumnText(Object element, int columnIndex) {
+
+		switch (columnIndex) {
+			case 0 :
+				return getText(element);
+			case 1 :
+				if (element instanceof IProfile) {
+					return ((IProfile) element).getProperty(IProfile.PROP_NAME);
+				}
+				if (element instanceof IIUElement) {
+					if (((IIUElement) element).shouldShowVersion())
+						return ((IIUElement) element).getIU().getVersion().toString();
+				}
+				IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
+				if (iu != null) {
+					return iu.getVersion().toString();
+				}
+				if (element instanceof IRepository<?>) {
+					return URIUtil.toUnencodedString(((IRepository<?>) element).getLocation());
+				}
+				if (element instanceof IRepositoryElement<?>) {
+					return URIUtil.toUnencodedString(((IRepositoryElement<?>) element).getLocation());
+				}
+				if (element instanceof IArtifactKey) {
+					IArtifactKey key = (IArtifactKey) element;
+					return key.getVersion().toString();
+				}
+				if (element instanceof IRequiredCapability) {
+					return ((IRequiredCapability) element).getRange().getMaximum().toString();
+				}
+
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
new file mode 100644
index 0000000..1aa1088
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+
+/**
+ * Content provider for provisioning repositories. The repositories are the
+ * elements and the repository children are retrieved asynchronously
+ * using the IDeferredWorkbenchAdapter mechanism.
+ * 
+ * @since 3.4
+ * 
+ */
+public class RepositoryContentProvider extends DeferredQueryContentProvider {
+
+	public Object[] getChildren(final Object parent) {
+		Object[] children = super.getChildren(parent);
+		if (children != null)
+			return children;
+		if (parent instanceof IArtifactDescriptor) {
+			return ((IArtifactDescriptor) parent).getProcessingSteps();
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
index d2f7409..6247d7d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
@@ -12,14 +12,12 @@
 package org.eclipse.equinox.internal.p2.ui.viewers;
 
 import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
 import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.osgi.util.TextProcessor;
@@ -60,17 +58,25 @@ public class RepositoryDetailsLabelProvider extends LabelProvider implements ITa
 
 		switch (columnIndex) {
 			case COL_NAME :
-				String name = ((IRepositoryElement) element).getName();
-				if (name != null) {
-					return name;
+				if (element instanceof IRepositoryElement<?>) {
+					String name = ((IRepositoryElement<?>) element).getName();
+					if (name != null) {
+						return name;
+					}
+				}
+				if (element instanceof IRepository<?>) {
+					String name = ((IRepository<?>) element).getName();
+					if (name != null) {
+						return name;
+					}
 				}
 				return ""; //$NON-NLS-1$
 			case COL_LOCATION :
-				if (element instanceof IRepository) {
-					return TextProcessor.process(URIUtil.toUnencodedString(((IRepository) element).getLocation()));
+				if (element instanceof IRepository<?>) {
+					return TextProcessor.process(URIUtil.toUnencodedString(((IRepository<?>) element).getLocation()));
 				}
-				if (element instanceof IRepositoryElement) {
-					return TextProcessor.process(URIUtil.toUnencodedString(((IRepositoryElement) element).getLocation()));
+				if (element instanceof IRepositoryElement<?>) {
+					return TextProcessor.process(URIUtil.toUnencodedString(((IRepositoryElement<?>) element).getLocation()));
 				}
 				break;
 			case COL_ENABLEMENT :
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
new file mode 100644
index 0000000..733fd9e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.ui.viewers;
+
+import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
+import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * ProvisioningListener which updates a structured viewer based on
+ * provisioning changes.  Provides default behavior which refreshes particular
+ * model elements or the entire viewer based on the nature of the change and the
+ * changes that the client is interested in.  Subclasses typically only need
+ * override when there is additional, specialized behavior required.
+ * 
+ * @since 3.4
+ */
+public class StructuredViewerProvisioningListener extends ProvUIProvisioningListener {
+
+	StructuredViewer viewer;
+	Display display;
+
+	public StructuredViewerProvisioningListener(String name, StructuredViewer viewer, int eventTypes) {
+		super(name, eventTypes);
+		this.viewer = viewer;
+		this.display = viewer.getControl().getDisplay();
+	}
+
+	/**
+	 * A repository has been added.  The default behavior is to
+	 * refresh the viewer.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryAdded(RepositoryEvent event) {
+		safeRefresh();
+	}
+
+	/**
+	 * A repository has been removed.  The default behavior is to
+	 * refresh the viewer.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryRemoved(RepositoryEvent event) {
+		safeRefresh();
+	}
+
+	/**
+	 * A repository has been discovered.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryDiscovered(RepositoryEvent event) {
+		// Do nothing for now
+	}
+
+	/**
+	 * A repository has changed.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param event the RepositoryEvent describing the details
+	 */
+	protected void repositoryChanged(RepositoryEvent event) {
+		// Do nothing for now.  When this event is actually used in
+		// the core, we may want to refresh particular elements the way
+		// we currently refresh a profile element.
+	}
+
+	/**
+	 * The specified profile has changed.  The default behavior is to refresh the viewer
+	 * with a profile element of the matching id.  Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that changed.
+	 */
+	protected void profileChanged(final String profileId) {
+		display.asyncExec(new Runnable() {
+			public void run() {
+				if (isClosing())
+					return;
+				// We want to refresh the affected profile, so we
+				// construct a profile element on this profile.
+				ProfileElement element = new ProfileElement(null, profileId);
+				viewer.refresh(element);
+			}
+		});
+	}
+
+	/**
+	 * The specified profile has been added.  The default behavior is to fully
+	 * refresh the associated viewer. Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that has been added.
+	 */
+	protected void profileAdded(final String profileId) {
+		safeRefresh();
+	}
+
+	/**
+	 * The specified profile has been removed.  The default behavior is to fully
+	 * refresh the associated viewer. Subclasses may override.  May be called
+	 * from a non-UI thread.
+	 * 
+	 * @param profileId the id of the profile that has been removed.
+	 */
+	protected void profileRemoved(final String profileId) {
+		safeRefresh();
+	}
+
+	protected void safeRefresh() {
+		if (Display.getCurrent() != null) {
+			refreshViewer();
+			return;
+		}
+
+		display.asyncExec(new Runnable() {
+			public void run() {
+				if (isClosing())
+					return;
+				refreshViewer();
+			}
+		});
+	}
+
+	protected void refreshAll() {
+		safeRefresh();
+	}
+
+	/**
+	 * Refresh the entire structure of the viewer.  Subclasses may
+	 * override to ensure that any caching done in content providers or
+	 * model elements is refreshed before the viewer is refreshed.  This will 
+	 * always be called from the UI thread.
+	 */
+	protected void refreshViewer() {
+		viewer.refresh();
+	}
+
+	/**
+	 * Return whether the viewer is closing or shutting down.
+	 * This method should be used in async execs to ensure that
+	 * the viewer is still alive.
+	 * @return a boolean indicating whether the viewer is closing
+	 */
+	protected boolean isClosing() {
+		IWorkbench workbench = PlatformUI.getWorkbench();
+		if (workbench.isClosing())
+			return true;
+
+		if (viewer.getControl().isDisposed())
+			return true;
+
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementQueryDescriptor.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementQueryDescriptor.java
deleted file mode 100644
index 2a2f390..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementQueryDescriptor.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-
-/**
- * ElementQueryDescriptor represents everything needed to run a query, including
- * the object to be queried, the query to use, and the query result.  It can optionally
- * wrap the query results in a UI element.
- * 
- * @since 3.4
- */
-public class ElementQueryDescriptor {
-
-	private Query query;
-	private Collector collector;
-	private IQueryable queryable;
-	private ElementWrapper wrapper;
-
-	/**
-	 * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
-	 * on which it will run.
-	 */
-	public ElementQueryDescriptor(IQueryable queryable, Query query, Collector collector) {
-		this(queryable, query, collector, null);
-	}
-
-	/**
-	 * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
-	 * on which it will run, and the transformer used to transform the results.
-	 */
-	public ElementQueryDescriptor(IQueryable queryable, Query query, Collector collector, ElementWrapper wrapper) {
-		this.query = query;
-		this.collector = collector;
-		this.queryable = queryable;
-		this.wrapper = wrapper;
-	}
-
-	/**
-	 * Performs the query returning a collection of results.
-	 * @param monitor
-	 */
-	public Collection performQuery(IProgressMonitor monitor) {
-		Collector results = this.collector;
-		// If the query is completely described, perform it
-		if (query != null && collector != null && queryable != null)
-			results = this.queryable.query(this.query, this.collector, monitor);
-		else if (results == null)
-			results = new Collector();
-		// Let the wrapper analyze the results, even if we didn't perform the query.
-		// This allows the wrapper to modify the results with explanations.
-		if (wrapper != null)
-			return wrapper.getElements(results);
-		return results.toCollection();
-	}
-
-	public boolean hasCollector() {
-		return this.collector != null;
-	}
-
-	public boolean hasQueryable() {
-		return this.queryable != null;
-	}
-
-	public boolean hasQuery() {
-		return this.query != null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementWrapper.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementWrapper.java
deleted file mode 100644
index 194148a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ElementWrapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/******************************************************************************* 
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*   EclipseSource - initial API and implementation
-*   IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-/**
- * Wraps query results inside corresponding UI elements
- */
-public abstract class ElementWrapper {
-
-	private Collection collection = null;
-
-	/**
-	 * Transforms a collector returned by a query to a collection
-	 * of UI elements
-	 */
-	public Collection getElements(Collector collector) {
-		collection = new ArrayList(collector.size());
-		Iterator iter = collector.iterator();
-		while (iter.hasNext()) {
-			Object o = iter.next();
-			if (shouldWrap(o))
-				collection.add(wrap(o));
-		}
-		return getCollection();
-	}
-
-	/**
-	 * Gets the collection where the elements are being stored.
-	 */
-	protected Collection getCollection() {
-		return collection == null ? Collections.EMPTY_LIST : collection;
-	}
-
-	/**
-	 * Determines if this object should be accepted and wrapped
-	 * by a UI element.  
-	 */
-	protected boolean shouldWrap(Object o) {
-		return true;
-	}
-
-	/**
-	 * Wraps a single element of the query result inside a UI element.
-	 */
-	protected abstract Object wrap(Object item);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IProvHelpContextIds.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IProvHelpContextIds.java
deleted file mode 100644
index 3e138d4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IProvHelpContextIds.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-
-/**
- * Help context ids for the P2 UI
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-
-public interface IProvHelpContextIds {
-	public static final String PREFIX = ProvUIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
-
-	public static final String REVERT_CONFIGURATION_WIZARD = PREFIX + "revert_configuration_wizard_context"; //$NON-NLS-1$ 
-
-	public static final String UNINSTALL_WIZARD = PREFIX + "uinstall_wizard_context"; //$NON-NLS-1$ 
-
-	public static final String UPDATE_WIZARD = PREFIX + "update_wizard_context"; //$NON-NLS-1$ 
-
-	public static final String ADD_REPOSITORY_DIALOG = PREFIX + "add_repository_dialog_context"; //$NON-NLS-1$ 
-
-	public static final String INSTALL_WIZARD = PREFIX + "install_wizard_context"; //$NON-NLS-1$ 
-
-	public static final String REPOSITORY_MANIPULATION_DIALOG = PREFIX + "repository_manipulation_dialog_context"; //$NON-NLS-1$
-
-	public static final String INSTALLED_SOFTWARE = PREFIX + "installed_software_context"; //$NON-NLS-1$
-
-	public static final String AVAILABLE_SOFTWARE = PREFIX + "available_software_context"; //$NON-NLS-1$
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IStatusCodes.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IStatusCodes.java
deleted file mode 100644
index d31aaf0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IStatusCodes.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-/**
- * IStatusCodes defines codes for common status conditions in the
- * p2 UI.
- * 
- * This interface is not intended to be implemented
- * 
- * @since 3.4
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IStatusCodes {
-
-	//UI status codes [10000-10999] - note these cannot conflict with the core codes
-	//in ProvisionException or we'll see strange results.
-
-	public static final int NOTHING_TO_UPDATE = 10000;
-
-	// Status codes associated with profile change request or plans being altered from the original intent
-	public static final int PROFILE_CHANGE_ALTERED = 10001;
-	public static final int IU_REQUEST_ALTERED = 10002;
-	public static final int ALTERED_IMPLIED_UPDATE = 10003;
-	public static final int ALTERED_IGNORED_IMPLIED_DOWNGRADE = 10004;
-	public static final int ALTERED_IGNORED_ALREADY_INSTALLED = 10005;
-	public static final int ALTERED_PARTIAL_INSTALL = 10006;
-	public static final int ALTERED_PARTIAL_UNINSTALL = 10007;
-	public static final int ALTERED_SIDE_EFFECT_UPDATE = 10008;
-	public static final int ALTERED_SIDE_EFFECT_REMOVE = 10009;
-	public static final int ALTERED_SIDE_EFFECT_INSTALL = 10010;
-	public static final int ALTERED_IGNORED_INSTALL_REQUEST = 10011;
-	public static final int ALTERED_IGNORED_UNINSTALL_REQUEST = 10012;
-	public static final int ALTERED_IGNORED_IMPLIED_UPDATE = 10013;
-
-	// Status codes associated with inability to perform an operation
-	public static final int UNEXPECTED_NOTHING_TO_DO = 10050;
-	public static final int EXPECTED_NOTHING_TO_DO = 10051;
-	public static final int OPERATION_ALREADY_IN_PROGRESS = 10052;
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IUPropertyUtils.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IUPropertyUtils.java
deleted file mode 100644
index 8fd2a33..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/IUPropertyUtils.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.lang.ref.SoftReference;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-
-public class IUPropertyUtils {
-
-	// TODO: these constants should come from API, eg. IInstallableUnit or ???
-	static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
-	static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
-
-	// Cache the IU fragments that provide localizations for a given locale.
-	//    map: locale => soft reference to a collector
-	private static Map LocaleCollectorCache = new HashMap(2);
-
-	// Get the license in the default locale.
-	public static ILicense getLicense(IInstallableUnit iu) {
-		return getLicense(iu, getCurrentLocale());
-	}
-
-	// Get the copyright in the default locale.
-	public static ICopyright getCopyright(IInstallableUnit iu) {
-		return getCopyright(iu, getCurrentLocale());
-	}
-
-	// Get a property in the default locale
-	public static String getIUProperty(IInstallableUnit iu, String propertyKey) {
-		return getIUProperty(iu, propertyKey, getCurrentLocale());
-	}
-
-	public static ILicense getLicense(IInstallableUnit iu, Locale locale) {
-		ILicense license = iu.getLicense();
-		String body = (license != null ? license.getBody() : null);
-		if (body == null || body.length() <= 1 || body.charAt(0) != '%')
-			return license;
-		final String actualKey = body.substring(1); // Strip off the %
-		body = getLocalizedIUProperty(iu, actualKey, locale);
-		return MetadataFactory.createLicense(license.getLocation(), body);
-	}
-
-	public static ICopyright getCopyright(IInstallableUnit iu, Locale locale) {
-		ICopyright copyright = iu.getCopyright();
-		String body = (copyright != null ? copyright.getBody() : null);
-		if (body == null || body.length() <= 1 || body.charAt(0) != '%')
-			return copyright;
-		final String actualKey = body.substring(1); // Strip off the %
-		body = getLocalizedIUProperty(iu, actualKey, locale);
-		return MetadataFactory.createCopyright(copyright.getLocation(), body);
-	}
-
-	public static String getIUProperty(IInstallableUnit iu, String propertyKey, Locale locale) {
-		String value = iu.getProperty(propertyKey);
-		if (value == null || value.length() <= 1 || value.charAt(0) != '%')
-			return value;
-		// else have a localizable property
-		final String actualKey = value.substring(1); // Strip off the %
-		return getLocalizedIUProperty(iu, actualKey, locale);
-	}
-
-	private static String getLocalizedIUProperty(IInstallableUnit iu, String actualKey, Locale locale) {
-		String localizedKey = makeLocalizedKey(actualKey, locale.toString());
-		String localizedValue = null;
-
-		//first check for a cached localized value
-		if (iu instanceof InstallableUnit)
-			localizedValue = ((InstallableUnit) iu).getLocalizedProperty(localizedKey);
-		//next check if the localized value is stored in the same IU (common case)
-		if (localizedValue == null)
-			localizedValue = iu.getProperty(localizedKey);
-		if (localizedValue != null)
-			return localizedValue;
-
-		final List locales = buildLocaleVariants(locale);
-		final IInstallableUnit theUnit = iu;
-
-		Collector localizationFragments = getLocalizationFragments(locale, locales);
-
-		Collector hostLocalizationCollector = new Collector() {
-			public boolean accept(Object object) {
-				boolean haveHost = false;
-				if (object instanceof IInstallableUnitFragment) {
-					IInstallableUnitFragment fragment = (IInstallableUnitFragment) object;
-					IRequiredCapability[] hosts = fragment.getHost();
-					for (int i = 0; i < hosts.length; i++) {
-						IRequiredCapability nextHost = hosts[i];
-						if (IInstallableUnit.NAMESPACE_IU_ID.equals(nextHost.getNamespace()) && //
-								theUnit.getId().equals(nextHost.getName()) && //
-								nextHost.getRange() != null && //
-								nextHost.getRange().isIncluded(theUnit.getVersion())) {
-							haveHost = true;
-							break;
-						}
-					}
-				}
-				return (haveHost ? super.accept(object) : true);
-			}
-		};
-
-		IUPropertyQuery iuQuery = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_FRAGMENT, "true"); //$NON-NLS-1$
-		Collector collected = iuQuery.perform(localizationFragments.iterator(), hostLocalizationCollector);
-
-		if (!collected.isEmpty()) {
-			String translation = null;
-			for (Iterator iter = collected.iterator(); iter.hasNext() && translation == null;) {
-				IInstallableUnit localizationIU = (IInstallableUnit) iter.next();
-				for (Iterator jter = locales.iterator(); jter.hasNext();) {
-					String localeKey = makeLocalizedKey(actualKey, (String) jter.next());
-					translation = localizationIU.getProperty(localeKey);
-					if (translation != null)
-						return cacheResult(iu, localizedKey, translation);
-				}
-			}
-		}
-
-		for (Iterator iter = locales.iterator(); iter.hasNext();) {
-			String nextLocale = (String) iter.next();
-			String localeKey = makeLocalizedKey(actualKey, nextLocale);
-			String nextValue = iu.getProperty(localeKey);
-			if (nextValue != null)
-				return cacheResult(iu, localizedKey, nextValue);
-		}
-
-		return cacheResult(iu, localizedKey, actualKey);
-	}
-
-	/**
-	 * Cache the translated property value to optimize future retrieval of the same value.
-	 * Currently we just cache on the installable unit object in memory. In future
-	 * we should push support for localized property retrieval into IInstallableUnit
-	 * so we aren't required to reach around the API here.
-	 */
-	private static String cacheResult(IInstallableUnit iu, String localizedKey, String localizedValue) {
-		if (iu instanceof InstallableUnit)
-			((InstallableUnit) iu).setLocalizedProperty(localizedKey, localizedValue);
-		return localizedValue;
-	}
-
-	/**
-	 * Collects the installable unit fragments that contain locale data for the given locales.
-	 */
-	private static synchronized Collector getLocalizationFragments(Locale locale, List localeVariants) {
-		SoftReference collectorRef = (SoftReference) LocaleCollectorCache.get(locale);
-		if (collectorRef != null) {
-			Collector cached = (Collector) collectorRef.get();
-			if (cached != null)
-				return cached;
-		}
-
-		final List locales = localeVariants;
-
-		Collector localeFragmentCollector = new Collector() {
-			public boolean accept(Object object) {
-				boolean haveLocale = false;
-				if (object instanceof IInstallableUnitFragment) {
-					IInstallableUnitFragment fragment = (IInstallableUnitFragment) object;
-					IProvidedCapability[] provides = fragment.getProvidedCapabilities();
-					for (int j = 0; j < provides.length && !haveLocale; j++) {
-						IProvidedCapability nextProvide = provides[j];
-						if (NAMESPACE_IU_LOCALIZATION.equals(nextProvide.getNamespace())) {
-							String providedLocale = nextProvide.getName();
-							if (providedLocale != null) {
-								for (Iterator iter = locales.iterator(); iter.hasNext();) {
-									if (providedLocale.equals(iter.next())) {
-										haveLocale = true;
-										break;
-									}
-								}
-							}
-						}
-					}
-				}
-				return (haveLocale ? super.accept(object) : true);
-			}
-		};
-
-		//Due to performance problems we restrict locale lookup to the current profile (see bug 233958)
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			LogHelper.log(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, "Profile registry unavailable. Default language will be used.", new RuntimeException())); //$NON-NLS-1$
-			return new Collector();
-		}
-		IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
-		if (profile == null) {
-			LogHelper.log(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, "Profile unavailable. Default language will be used.", new RuntimeException())); //$NON-NLS-1$
-			return new Collector();
-		}
-		IUPropertyQuery iuQuery = new IUPropertyQuery(IInstallableUnit.PROP_TYPE_FRAGMENT, "true"); //$NON-NLS-1$
-		Collector collected = profile.query(iuQuery, localeFragmentCollector, null);
-		LocaleCollectorCache.put(locale, new SoftReference(collected));
-		return collected;
-	}
-
-	/**
-	 */
-	private static List buildLocaleVariants(Locale locale) {
-		String nl = locale.toString();
-		ArrayList result = new ArrayList(4);
-		int lastSeparator;
-		while (true) {
-			result.add(nl);
-			lastSeparator = nl.lastIndexOf('_');
-			if (lastSeparator == -1)
-				break;
-			nl = nl.substring(0, lastSeparator);
-		}
-		// Add the default locale (most general)
-		result.add(DEFAULT_LOCALE.toString());
-		return result;
-	}
-
-	private static String makeLocalizedKey(String actualKey, String localeImage) {
-		return localeImage + '.' + actualKey;
-	}
-
-	private static Locale getCurrentLocale() {
-		return Locale.getDefault();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProfileFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProfileFactory.java
deleted file mode 100644
index c39585a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProfileFactory.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-/**
- * Factory class that can create a new profile with the correct
- * default values.
- * 
- * @since 3.4
- *
- */
-public class ProfileFactory {
-
-	static private String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
-	static private String EMPTY = ""; //$NON-NLS-1$
-	static private EnvironmentInfo info;
-
-	public static IProfile makeProfile(String profileId) {
-		Map profileProperties = new HashMap();
-		profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
-		profileProperties.put(IProfile.PROP_FLAVOR, getDefaultFlavor());
-		profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
-		profileProperties.put(IProfile.PROP_NL, getDefaultNL());
-
-		try {
-			return ProvisioningUtil.addProfile(profileId, profileProperties, null);
-		} catch (ProvisionException e) {
-			// log
-		}
-		return null;
-	}
-
-	public static String getDefaultLocation() {
-		return Platform.getUserLocation().getURL().getPath();
-	}
-
-	public static String getDefaultFlavor() {
-		return FLAVOR_DEFAULT;
-	}
-
-	private static EnvironmentInfo getEnvironmentInfo() {
-		if (info == null) {
-			info = (EnvironmentInfo) ServiceHelper.getService(ProvUIActivator.getContext(), EnvironmentInfo.class.getName());
-		}
-		return info;
-	}
-
-	public static String getDefaultNL() {
-		if (getEnvironmentInfo() != null) {
-			return info.getNL();
-		}
-		return EMPTY;
-	}
-
-	public static String getDefaultEnvironments() {
-		if (getEnvironmentInfo() != null) {
-			return "osgi.os=" //$NON-NLS-1$
-					+ info.getOS() + ",osgi.ws=" + info.getWS() //$NON-NLS-1$
-					+ ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$
-		}
-		return EMPTY;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUI.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUI.java
deleted file mode 100644
index c7502af..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUI.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.commands.*;
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.commands.operations.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.RepositoryNameAndLocationDialog;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Generic provisioning UI utility and policy methods.
- * 
- * @since 3.4
- */
-public class ProvUI {
-
-	// Public constants for common command and tooltip names
-	public static final String INSTALL_COMMAND_LABEL = ProvUIMessages.InstallIUCommandLabel;
-	public static final String INSTALL_COMMAND_TOOLTIP = ProvUIMessages.InstallIUCommandTooltip;
-	public static final String UNINSTALL_COMMAND_LABEL = ProvUIMessages.UninstallIUCommandLabel;
-	public static final String UNINSTALL_COMMAND_TOOLTIP = ProvUIMessages.UninstallIUCommandTooltip;
-	public static final String UPDATE_COMMAND_LABEL = ProvUIMessages.UpdateIUCommandLabel;
-	public static final String UPDATE_COMMAND_TOOLTIP = ProvUIMessages.UpdateIUCommandTooltip;
-	public static final String REVERT_COMMAND_LABEL = ProvUIMessages.RevertIUCommandLabel;
-	public static final String REVERT_COMMAND_TOOLTIP = ProvUIMessages.RevertIUCommandTooltip;
-
-	static ObjectUndoContext provisioningUndoContext;
-	private static final int DEFAULT_COLUMN_WIDTH = 200;
-	private static IUColumnConfig[] iuColumnConfig = new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, DEFAULT_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, DEFAULT_COLUMN_WIDTH)};
-
-	/**
-	 * List<URI> of repositories that have already been reported to the user as not found.
-	 */
-	private static final List reposNotFound = Collections.synchronizedList(new ArrayList());
-
-	// These values rely on the command markup in org.eclipse.ui.ide that defines the update commands
-	private static final String UPDATE_MANAGER_FIND_AND_INSTALL = "org.eclipse.ui.update.findAndInstallUpdates"; //$NON-NLS-1$
-	private static final String UPDATE_MANAGER_MANAGE_CONFIGURATION = "org.eclipse.ui.update.manageConfiguration"; //$NON-NLS-1$
-	// This value relies on the command markup in org.eclipse.ui 
-	private static final String INSTALLATION_DIALOG = "org.eclipse.ui.help.installationDialog"; //$NON-NLS-1$
-
-	public static IStatus handleException(Throwable t, String message, int style) {
-		if (message == null && t != null) {
-			message = t.getMessage();
-		}
-		IStatus status = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, t);
-		StatusManager.getManager().handle(status, style);
-		return status;
-	}
-
-	public static void reportLoadFailure(final URI location, IStatus status, int style, final RepositoryManipulator repoManipulator) {
-		int code = status.getCode();
-		// Special handling when the location is bad (not found, etc.) vs. a failure
-		// associated with a known repo.
-		if (code == ProvisionException.REPOSITORY_NOT_FOUND || code == ProvisionException.REPOSITORY_INVALID_LOCATION) {
-			if (!hasNotFoundStatusBeenReported(location)) {
-				PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-					public void run() {
-						IWorkbench workbench = PlatformUI.getWorkbench();
-						if (workbench.isClosing())
-							return;
-						Shell shell = ProvUI.getDefaultParentShell();
-						if (MessageDialog.openQuestion(shell, ProvUIMessages.ProvUI_LoadErrorTitle, NLS.bind(ProvUIMessages.ProvUI_PromptForSiteEdit, URIUtil.toUnencodedString(location)))) {
-							RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(shell, Policy.getDefault()) {
-								protected String getInitialLocationText() {
-									return URIUtil.toUnencodedString(location);
-								}
-
-								protected String getInitialNameText() {
-									String nickname = null;
-									try {
-										nickname = ProvisioningUtil.getMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME);
-									} catch (ProvisionException e) {
-										// nickname remains null
-									}
-									return nickname == null ? "" : nickname; //$NON-NLS-1$
-								}
-							};
-							int ret = dialog.open();
-							if (ret == Window.OK) {
-								URI correctedLocation = dialog.getLocation();
-								if (correctedLocation != null) {
-									ProvUI.startBatchOperation();
-									try {
-										RepositoryManipulator repoMan = repoManipulator;
-										if (repoManipulator == null)
-											repoMan = Policy.getDefault().getRepositoryManipulator();
-										ProvisioningOperation op = repoMan.getRemoveOperation(new URI[] {location});
-										op.execute(null);
-										ProvUI.endBatchOperation(false);
-										op = repoMan.getAddOperation(correctedLocation);
-										op.execute(null);
-										String nickname = dialog.getName();
-										if (nickname != null && nickname.length() > 0)
-											ProvisioningUtil.setMetadataRepositoryProperty(correctedLocation, IRepository.PROP_NICKNAME, nickname);
-									} catch (ProvisionException e) {
-										ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
-										ProvUI.endBatchOperation(true);
-									}
-								}
-							}
-						}
-					}
-				});
-				reposNotFound.add(location);
-			}
-		} else {
-			reportStatus(status, style);
-		}
-	}
-
-	// This assumes that callers already checked whether it *should*
-	// be reported so that we don't need to loop through the list
-	// when the caller just has done so in order to know whether to report.
-	public static void notFoundStatusReported(URI location) {
-		reposNotFound.add(location);
-	}
-
-	// We don't check for things like case variants or end slash variants
-	// because we know that the repository managers already did this.
-	public static boolean hasNotFoundStatusBeenReported(URI location) {
-		return reposNotFound.contains(location);
-	}
-
-	public static void clearRepositoriesNotFound() {
-		reposNotFound.clear();
-	}
-
-	public static void clearRepositoryNotFound(URI location) {
-		reposNotFound.remove(location);
-	}
-
-	public static void reportStatus(IStatus status, int style) {
-		// workaround for
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=211933
-		// Note we'd rather have a proper looking dialog than get the 
-		// blocking right.
-		if ((style & StatusManager.BLOCK) == StatusManager.BLOCK || (style & StatusManager.SHOW) == StatusManager.SHOW) {
-			if (status.getSeverity() == IStatus.INFO) {
-				MessageDialog.openInformation(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_InformationTitle, status.getMessage());
-				// unset the dialog bits
-				style = style & ~StatusManager.BLOCK;
-				style = style & ~StatusManager.SHOW;
-				// unset logging for statuses that should never be logged.
-				// Ideally the caller would do this but this bug keeps coming back.
-				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274074
-				if (status.getCode() == IStatusCodes.NOTHING_TO_UPDATE)
-					style = 0;
-			} else if (status.getSeverity() == IStatus.WARNING) {
-				MessageDialog.openWarning(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_WarningTitle, status.getMessage());
-				// unset the dialog bits
-				style = style & ~StatusManager.BLOCK;
-				style = style & ~StatusManager.SHOW;
-			}
-		}
-		if (style != 0)
-			StatusManager.getManager().handle(status, style);
-	}
-
-	public static IUColumnConfig[] getIUColumnConfig() {
-		return iuColumnConfig;
-	}
-
-	public static void setIUColumnConfig(IUColumnConfig[] columnConfig) {
-		iuColumnConfig = columnConfig;
-	}
-
-	public static Object getAdapter(Object object, Class adapterType) {
-		if (object == null)
-			return null;
-		if (adapterType.isInstance(object))
-			return object;
-		if (object instanceof IAdaptable)
-			return ((IAdaptable) object).getAdapter(adapterType);
-		return null;
-	}
-
-	/**
-	 * Returns a shell that is appropriate to use as the parent
-	 * for a modal dialog. This returns the existing modal dialog, if any,
-	 * or a workbench window if no modal dialogs open. Returns <code>null</code>
-	 * if there is no appropriate default parent.
-	 * 
-	 * This method is copied from ProgressManagerUtil#getDefaultParent()
-	 */
-	public static Shell getDefaultParentShell() {
-		IWorkbench workbench = PlatformUI.getWorkbench();
-
-		//look first for the topmost modal shell
-		Shell shell = getDefaultParentShell(workbench.getDisplay().getShells());
-
-		if (shell != null) {
-			return shell;
-		}
-
-		//try the active workbench window
-		IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-		if (window != null)
-			return window.getShell();
-		IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
-		if (windows.length > 0)
-			return windows[0].getShell();
-		//there is no modal shell and no active window, so just return a null parent shell
-		return null;
-	}
-
-	/**
-	 * Return the modal shell that is currently open. If there isn't one then
-	 * return null.
-	 * 
-	 * @param shells shells to search for modal children
-	 * @return the most specific modal child, or null if none
-	 *
-	 * This method is copied from ProgressManagerUtil#getDefaultParent()
-	 */
-
-	private static Shell getDefaultParentShell(Shell[] shells) {
-		//first look for a modal shell
-		for (int i = shells.length - 1; i >= 0; i--) {
-			Shell shell = shells[i];
-
-			// Check if this shell has a modal child
-			Shell modalChild = getDefaultParentShell(shell.getShells());
-			if (modalChild != null) {
-				return modalChild;
-			}
-
-			// Do not worry about shells that will not block the user.
-			if (shell.isVisible()) {
-				int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
-				if ((shell.getStyle() & modal) != 0) {
-					return shell;
-				}
-			}
-		}
-		return null;
-	}
-
-	static IOperationApprover getOperationApprover() {
-		return new IOperationApprover() {
-			public IStatus proceedUndoing(final IUndoableOperation operation, IOperationHistory history, IAdaptable info) {
-				final IStatus[] status = new IStatus[1];
-				status[0] = Status.OK_STATUS;
-				if (operation.hasContext(provisioningUndoContext) && operation instanceof IAdvancedUndoableOperation) {
-					final IRunnableWithProgress runnable = new IRunnableWithProgress() {
-						public void run(IProgressMonitor monitor) {
-							try {
-								status[0] = ((IAdvancedUndoableOperation) operation).computeUndoableStatus(monitor);
-								if (!status[0].isOK()) {
-									ProvUI.reportStatus(status[0], StatusManager.SHOW | StatusManager.LOG);
-								}
-							} catch (ExecutionException e) {
-								status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e);
-								ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-							}
-						}
-					};
-					PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-						public void run() {
-							try {
-								new ProgressMonitorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()).run(true, true, runnable);
-							} catch (InterruptedException e) {
-								// don't report thread interruption
-							} catch (InvocationTargetException e) {
-								status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e);
-								ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-							}
-						}
-					});
-
-				}
-				return status[0];
-			}
-
-			public IStatus proceedRedoing(final IUndoableOperation operation, IOperationHistory history, IAdaptable info) {
-				final IStatus[] status = new IStatus[1];
-				status[0] = Status.OK_STATUS;
-				if (operation.hasContext(provisioningUndoContext) && operation instanceof IAdvancedUndoableOperation) {
-					final IRunnableWithProgress runnable = new IRunnableWithProgress() {
-						public void run(IProgressMonitor monitor) {
-							try {
-								status[0] = ((IAdvancedUndoableOperation) operation).computeRedoableStatus(monitor);
-								if (!status[0].isOK()) {
-									ProvUI.reportStatus(status[0], StatusManager.SHOW);
-								}
-							} catch (ExecutionException e) {
-								status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e);
-								ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-							}
-						}
-					};
-					PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-						public void run() {
-							try {
-								new ProgressMonitorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()).run(true, true, runnable);
-							} catch (InterruptedException e) {
-								// don't report thread interruption
-							} catch (InvocationTargetException e) {
-								status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getMessage(), e);
-								ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-							}
-						}
-					});
-
-				}
-				return status[0];
-			}
-
-		};
-
-	}
-
-	public static void addProvisioningListener(ProvUIProvisioningListener listener) {
-		ProvUIActivator.getDefault().addProvisioningListener(listener);
-	}
-
-	public static void removeProvisioningListener(ProvUIProvisioningListener listener) {
-		ProvUIActivator.getDefault().removeProvisioningListener(listener);
-	}
-
-	public static void startBatchOperation() {
-		ProvUIActivator.getDefault().signalBatchOperationStart();
-	}
-
-	public static void endBatchOperation(boolean notify) {
-		ProvUIActivator.getDefault().signalBatchOperationComplete(notify);
-	}
-
-	public static void openUpdateManagerInstaller(Event event) {
-		runCommand(UPDATE_MANAGER_FIND_AND_INSTALL, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenFindAndInstall, event);
-	}
-
-	public static void openUpdateManagerConfigurationManager(Event event) {
-		runCommand(UPDATE_MANAGER_MANAGE_CONFIGURATION, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenManageConfiguration, event);
-	}
-
-	public static void openInstallationDialog(Event event) {
-		runCommand(INSTALLATION_DIALOG, ProvUIMessages.ProvUI_InstallDialogError, event);
-	}
-
-	private static void runCommand(String commandId, String errorMessage, Event event) {
-		ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
-		Command command = commandService.getCommand(commandId);
-		if (!command.isDefined()) {
-			return;
-		}
-		IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
-		try {
-			handlerService.executeCommand(commandId, event);
-		} catch (ExecutionException e) {
-			reportFail(errorMessage, e);
-		} catch (NotDefinedException e) {
-			reportFail(errorMessage, e);
-		} catch (NotEnabledException e) {
-			reportFail(errorMessage, e);
-		} catch (NotHandledException e) {
-			reportFail(errorMessage, e);
-		}
-	}
-
-	private static void reportFail(String message, Throwable t) {
-		Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, t);
-		reportStatus(failStatus, StatusManager.BLOCK | StatusManager.LOG);
-
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIImages.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIImages.java
deleted file mode 100644
index 587d708..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIImages.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * ProvUIImages provides convenience methods for accessing shared images
- * provided by the <i>org.eclipse.equinox.internal.provisional.p2.ui</i> plug-in.
- * <p>
- * This class provides <code>ImageDescriptor</code>s for each named image in
- * {@link ProvUIImages}. All <code>Image</code> objects created from the
- * provided descriptors are managed the caller and must be disposed
- * appropriately.
- * </p>
- * <p>
- * This class is not intended to be subclassed or instantiated by clients
- * 
- * @since 3.4
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class ProvUIImages {
-
-	// bundle-relative icon path
-	public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
-	//objects
-	public final static String IMG_ARTIFACT_REPOSITORY = "obj/artifact_repo_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_METADATA_REPOSITORY = "obj/metadata_repo_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_IU = "obj/iu_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_DISABLED_IU = "obj/iu_disabled_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_UPDATED_IU = "obj/iu_update_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_PROFILE = "obj/profile_obj.gif"; //$NON-NLS-1$
-	public final static String IMG_CATEGORY = "obj/category_obj.gif"; //$NON-NLS-1$
-	// tools
-	public final static String IMG_TOOL_UPDATE = "tool/update.gif"; //$NON-NLS-1$
-	public final static String IMG_TOOL_UPDATE_PROBLEMS = "tool/update_problems.gif"; //$NON-NLS-1$
-	public final static String IMG_TOOL_CLOSE = "tool/close.gif"; //$NON-NLS-1$
-	public final static String IMG_TOOL_CLOSE_HOT = "tool/close_hot.gif"; //$NON-NLS-1$
-
-	// wizard graphics
-	public final static String WIZARD_BANNER_INSTALL = "wizban/install_wiz.gif"; //$NON-NLS-1$
-	public final static String WIZARD_BANNER_UNINSTALL = "wizban/uninstall_wiz.gif"; //$NON-NLS-1$
-	public final static String WIZARD_BANNER_UPDATE = "wizban/update_wiz.gif"; //$NON-NLS-1$
-	public final static String WIZARD_BANNER_REVERT = "wizban/revert_wiz.gif"; //$NON-NLS-1$
-
-	/**
-	 * Returns the image descriptor for the given image ID. Returns
-	 * <code>null</code> if there is no such image.
-	 * 
-	 * @param id
-	 *            the identifier for the image to retrieve
-	 * @return the image descriptor associated with the given ID
-	 */
-	public static ImageDescriptor getImageDescriptor(String id) {
-		return ProvUIActivator.getDefault().getImageRegistry().getDescriptor(id);
-	}
-
-	/**
-	 * Returns the image for the given image ID. Returns <code>null</code> if
-	 * there is no such image.
-	 * 
-	 * @param id
-	 *            the identifier for the image to retrieve
-	 * @return the image associated with the given ID. This image is managed in
-	 *         an image registry and should not be freed by the client.
-	 */
-	public static Image getImage(String id) {
-		return ProvUIActivator.getDefault().getImageRegistry().get(id);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIProvisioningListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIProvisioningListener.java
deleted file mode 100644
index 397fbfa..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvUIProvisioningListener.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.util.EventObject;
-import org.eclipse.equinox.internal.p2.ui.BatchChangeBeginningEvent;
-import org.eclipse.equinox.internal.p2.ui.BatchChangeCompleteEvent;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProfileEvent;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-/**
- * ProvisioningListener which handles event batching and other
- * extensions to the provisioning event framework that are used by
- * the UI.
- * 
- * @since 3.5
- */
-public abstract class ProvUIProvisioningListener implements ProvisioningListener {
-
-	public static final int PROV_EVENT_METADATA_REPOSITORY = 0x0001;
-	public static final int PROV_EVENT_IU = 0x0002;
-	public static final int PROV_EVENT_PROFILE = 0x0004;
-	public static final int PROV_EVENT_ARTIFACT_REPOSITORY = 0x0008;
-
-	int eventTypes = 0;
-	int batchCount = 0;
-
-	public ProvUIProvisioningListener(int eventTypes) {
-		this.eventTypes = eventTypes;
-	}
-
-	public void notify(EventObject o) {
-		if (o instanceof BatchChangeBeginningEvent) {
-			batchCount++;
-		} else if (o instanceof BatchChangeCompleteEvent) {
-			batchCount--;
-			// A batch operation completed.  Refresh if we are
-			// to honor it.
-			if (batchCount <= 0 && ((BatchChangeCompleteEvent) o).notify)
-				refreshAll();
-		} else if (batchCount > 0) {
-			// We are in the middle of a batch operation
-			return;
-		} else if (o instanceof ProfileEvent && (((eventTypes & PROV_EVENT_IU) == PROV_EVENT_IU) || ((eventTypes & PROV_EVENT_PROFILE) == PROV_EVENT_PROFILE))) {
-			ProfileEvent event = (ProfileEvent) o;
-			if (event.getReason() == ProfileEvent.CHANGED) {
-				profileChanged(event.getProfileId());
-			} else if (event.getReason() == ProfileEvent.ADDED) {
-				profileAdded(event.getProfileId());
-			} else if (event.getReason() == ProfileEvent.REMOVED) {
-				profileRemoved(event.getProfileId());
-			}
-		} else if (o instanceof RepositoryEvent) {
-			RepositoryEvent event = (RepositoryEvent) o;
-			// Do not handle unless this is the type of repo that we are interested in
-			if ((event.getRepositoryType() == IRepository.TYPE_METADATA && (eventTypes & PROV_EVENT_METADATA_REPOSITORY) == PROV_EVENT_METADATA_REPOSITORY) || (event.getRepositoryType() == IRepository.TYPE_ARTIFACT && (eventTypes & PROV_EVENT_ARTIFACT_REPOSITORY) == PROV_EVENT_ARTIFACT_REPOSITORY)) {
-				if (event.getKind() == RepositoryEvent.ADDED) {
-					repositoryAdded(event);
-				} else if (event.getKind() == RepositoryEvent.REMOVED) {
-					repositoryRemoved(event);
-				} else if (event.getKind() == RepositoryEvent.DISCOVERED) {
-					repositoryDiscovered(event);
-				} else if (event.getKind() == RepositoryEvent.CHANGED) {
-					repositoryChanged(event);
-				} else if (event.getKind() == RepositoryEvent.ENABLEMENT) {
-					repositoryEnablement(event);
-				}
-			}
-		}
-	}
-
-	/**
-	 * A repository has been added.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryAdded(RepositoryEvent event) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in repository events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * A repository has been removed.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryRemoved(RepositoryEvent event) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in repository events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * A repository has been discovered.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryDiscovered(RepositoryEvent event) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in repository events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * A repository has changed.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryChanged(RepositoryEvent event) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in repository events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * A repository's enablement state has changed.  This is treated
-	 * as repository addition or removal by default.  Subclasses may
-	 * override.  May be called from a non-UI thread.
-	 * @param event
-	 */
-	protected void repositoryEnablement(RepositoryEvent event) {
-		// We treat enablement of a repository as if one were added.
-		if (event.isRepositoryEnabled())
-			repositoryAdded(event);
-		else
-			repositoryRemoved(event);
-	}
-
-	/**
-	 * The specified profile has changed.   Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that changed.
-	 */
-	protected void profileChanged(final String profileId) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in profile events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * The specified profile has been added.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that has been added.
-	 */
-	protected void profileAdded(final String profileId) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in profile events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * The specified profile has been removed.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that has been removed.
-	 */
-	protected void profileRemoved(final String profileId) {
-		// Do nothing.  This method is not abstract because subclasses
-		// may not be interested in profile events at all and should
-		// not have to implement it.
-	}
-
-	/**
-	 * An event requiring a complete refresh of the listener's state has
-	 * been received.  This is used, for example, when a batch change has
-	 * completed.  Subclasses may override.  May be called from a non-UI
-	 * thread.
-	 */
-	protected void refreshAll() {
-		// Do nothing by default.
-	}
-
-	public int getEventTypes() {
-		return eventTypes;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java
deleted file mode 100644
index 6728283..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ProvisioningOperationRunner.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.io.IOException;
-import java.util.HashSet;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ApplyProfileChangesDialog;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.progress.WorkbenchJob;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Utility methods for running provisioning operations.   Operations can either
- * be run synchronously or in a job.  When scheduled as a job, the operation
- * determines whether the job is run in
- * the background or in the UI.
- * 
- * @since 3.4
- */
-public class ProvisioningOperationRunner {
-
-	private static final String PROPERTY_PREFIX = "org.eclipse.equinox.p2.ui"; //$NON-NLS-1$
-	private static final QualifiedName OPERATION_KEY = new QualifiedName(PROPERTY_PREFIX, "operationKey"); //$NON-NLS-1$
-	static HashSet scheduledJobs = new HashSet();
-	static boolean restartRequested = false;
-	static boolean restartRequired = false;
-	static boolean subsequentRestartsRequested = false;
-	// used during automated testing to prevent a restart dialog from interrupting tests
-	static boolean suppressRestart = false;
-	static ListenerList jobListeners = new ListenerList();
-
-	/**
-	 * This method is temporary and will not appear in the final API.
-	 * 
-	 * @param suppress
-	 * 
-	 * @deprecated see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274876
-	 */
-	public static void suppressRestart(boolean suppress) {
-		suppressRestart = suppress;
-	}
-
-	/**
-	 * Run the provisioning operation synchronously
-	 * @param op The operation to execute
-	 * @param errorStyle the flags passed to the StatusManager for error reporting
-	 */
-	public static void run(ProvisioningOperation op, int errorStyle) {
-		try {
-			op.execute(new NullProgressMonitor());
-		} catch (OperationCanceledException e) {
-			// nothing to do
-		} catch (ProvisionException e) {
-			ProvUI.handleException(e, null, errorStyle);
-		}
-
-	}
-
-	/**
-	 * Schedule a job to execute the supplied ProvisioningOperation.
-	 * 
-	 * @param op The operation to execute
-	 * @param errorStyle the flags passed to the StatusManager for error reporting
-	 */
-	public static Job schedule(final ProvisioningOperation op, final int errorStyle) {
-		Job job;
-		final boolean noPrompt = (errorStyle & (StatusManager.BLOCK | StatusManager.SHOW)) == 0;
-
-		if (op.runInBackground()) {
-			job = new Job(op.getLabel()) {
-				protected IStatus run(IProgressMonitor monitor) {
-					final Job thisJob = this;
-					try {
-						IStatus status = op.execute(monitor);
-						if (!status.isOK() && noPrompt) {
-							this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
-							this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
-						}
-						return status;
-					} catch (OperationCanceledException e) {
-						return Status.CANCEL_STATUS;
-					} catch (final ProvisionException e) {
-						if (noPrompt) {
-							thisJob.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
-							thisJob.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
-						}
-						String message = e.getLocalizedMessage();
-						if (message == null)
-							message = NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel());
-						return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, e);
-					}
-				}
-			};
-			job.setPriority(Job.LONG);
-		} else {
-			job = new WorkbenchJob(op.getLabel()) {
-				public IStatus runInUIThread(IProgressMonitor monitor) {
-					try {
-						IStatus status = op.execute(monitor);
-						if (!status.isOK() && noPrompt) {
-							this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
-							this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
-						}
-						return status;
-					} catch (OperationCanceledException e) {
-						return Status.CANCEL_STATUS;
-					} catch (ProvisionException e) {
-						if (noPrompt) {
-							this.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
-							this.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
-						}
-						return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, NLS.bind(ProvUIMessages.ProvisioningOperationRunner_ErrorExecutingOperation, op.getLabel()), e);
-					}
-				}
-			};
-			job.setPriority(Job.SHORT);
-		}
-		job.setUser(op.isUser());
-		job.setProperty(OPERATION_KEY, op);
-		job.setProperty(IProgressConstants.ICON_PROPERTY, ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
-		manageJob(job);
-		job.schedule();
-		return job;
-	}
-
-	/**
-	 * This method is temporary and is not intended for the API.
-	 * 
-	 * @deprecated see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274876
-	 */
-	public static void clearRestartRequests() {
-		restartRequired = false;
-		restartRequested = false;
-		subsequentRestartsRequested = false;
-	}
-
-	/**
-	 * This method will not appear in the final API.
-	 * 
-	 * @param force
-	 * @deprecated see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274876
-
-	 */
-	public static void requestRestart(boolean force) {
-		if (suppressRestart || hasScheduledOperations()) {
-			restartRequested = true;
-			subsequentRestartsRequested = true;
-			restartRequired = restartRequired || force;
-			return;
-		}
-		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-			public void run() {
-				if (PlatformUI.getWorkbench().isClosing())
-					return;
-				int retCode = ApplyProfileChangesDialog.promptForRestart(ProvUI.getDefaultParentShell(), restartRequired);
-				// Now that we have asked, regardless of answer, we won't need to
-				// ask again until the next profile changing operation.  Don't reset
-				// the restart required flag so that the next time we ask, if it
-				// was required before, it will still be required.
-				restartRequested = false;
-				if (retCode == ApplyProfileChangesDialog.PROFILE_APPLYCHANGES) {
-					Configurator configurator = (Configurator) ServiceHelper.getService(ProvUIActivator.getContext(), Configurator.class.getName());
-					try {
-						configurator.applyConfiguration();
-					} catch (IOException e) {
-						ProvUI.handleException(e, ProvUIMessages.ProvUI_ErrorDuringApplyConfig, StatusManager.LOG | StatusManager.BLOCK);
-					} catch (IllegalStateException e) {
-						IStatus illegalApplyStatus = new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ProvisioningOperationRunner_CannotApplyChanges, e);
-						ProvUI.reportStatus(illegalApplyStatus, StatusManager.LOG | StatusManager.BLOCK);
-					}
-				} else if (retCode == ApplyProfileChangesDialog.PROFILE_RESTART) {
-					PlatformUI.getWorkbench().restart();
-				}
-			}
-		});
-	}
-
-	public static boolean hasScheduledOperations() {
-		return !scheduledJobs.isEmpty();
-	}
-
-	public static boolean hasScheduledOperationsFor(String profileId) {
-		Job[] jobs = getScheduledJobs();
-		for (int i = 0; i < jobs.length; i++) {
-			Object op = jobs[i].getProperty(OPERATION_KEY);
-			if (op instanceof ProfileModificationOperation) {
-				String id = ((ProfileModificationOperation) op).getProfileId();
-				if (profileId.equals(id))
-					return true;
-			}
-		}
-		return false;
-	}
-
-	public static void addJobChangeListener(IJobChangeListener listener) {
-		jobListeners.add(listener);
-		Job[] jobs = getScheduledJobs();
-		for (int i = 0; i < jobs.length; i++)
-			jobs[i].addJobChangeListener(listener);
-	}
-
-	public static void removeJobChangeListener(IJobChangeListener listener) {
-		jobListeners.remove(listener);
-		Job[] jobs = getScheduledJobs();
-		for (int i = 0; i < jobs.length; i++)
-			jobs[i].removeJobChangeListener(listener);
-	}
-
-	private static Job[] getScheduledJobs() {
-		return (Job[]) scheduledJobs.toArray(new Job[scheduledJobs.size()]);
-	}
-
-	public static void manageJob(Job job) {
-		scheduledJobs.add(job);
-		subsequentRestartsRequested = false;
-		job.addJobChangeListener(new JobChangeAdapter() {
-			public void done(IJobChangeEvent event) {
-				scheduledJobs.remove(event.getJob());
-				int severity = event.getResult().getSeverity();
-				if (severity != IStatus.CANCEL && severity != IStatus.ERROR && restartRequested) {
-					requestRestart(restartRequired);
-				} else {
-					restartRequested = subsequentRestartsRequested;
-				}
-			}
-		});
-		Object[] listeners = jobListeners.getListeners();
-		for (int i = 0; i < listeners.length; i++)
-			job.addJobChangeListener((IJobChangeListener) listeners[i]);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableArtifactRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableArtifactRepositoryManager.java
deleted file mode 100644
index f07d4a7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableArtifactRepositoryManager.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-
-/**
- * An object that adds provides queryable support 
- * for an artifact repository manager.  The query context determines which 
- * repositories are included in the query.  Since artifact repositories
- * do not support queries, the query will be performed over the repository
- * locations.
- */
-public class QueryableArtifactRepositoryManager extends QueryableRepositoryManager {
-
-	public QueryableArtifactRepositoryManager(IUViewQueryContext queryContext, boolean includeDisabledRepos) {
-		super(queryContext, includeDisabledRepos);
-	}
-
-	protected URI[] getRepoLocations(IRepositoryManager manager) {
-		Set locations = new HashSet();
-		int flags = queryContext.getArtifactRepositoryFlags();
-		locations.addAll(Arrays.asList(manager.getKnownRepositories(flags)));
-		if (includeDisabledRepos) {
-			locations.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | flags)));
-		}
-		return (URI[]) locations.toArray(new URI[locations.size()]);
-	}
-
-	protected IRepositoryManager getRepositoryManager() {
-		return (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-	}
-
-	protected IRepository doLoadRepository(IRepositoryManager manager, URI location, IProgressMonitor monitor) throws ProvisionException {
-		if (manager instanceof IArtifactRepositoryManager) {
-			((IArtifactRepositoryManager) manager).loadRepository(location, monitor);
-		}
-		return null;
-	}
-
-	protected Collector query(URI[] uris, Query query, Collector collector, IProgressMonitor monitor) {
-		SubMonitor sub = SubMonitor.convert(monitor, uris.length * 100);
-
-		if (sub.isCanceled())
-			return collector;
-		// artifact repositories do not support querying, so we always use the location.
-		query.perform(Arrays.asList(uris).iterator(), collector);
-
-		return collector;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableMetadataRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableMetadataRepositoryManager.java
deleted file mode 100644
index 53e23ed..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableMetadataRepositoryManager.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-
-/**
- * An object that adds provides specialized/optimized queryable support 
- * for a metadata repository.  The query context determines which repositories 
- * are included in the query.  Callers interested in only the resulting repository URIs
- * should specify a {@link RepositoryLocationQuery}, in which case the 
- * query is performed over the URI's.  Otherwise the query is performed over
- * the repositories themselves.
- */
-public class QueryableMetadataRepositoryManager extends QueryableRepositoryManager {
-
-	public QueryableMetadataRepositoryManager(IUViewQueryContext queryContext, boolean includeDisabledRepos) {
-		super(queryContext, includeDisabledRepos);
-	}
-
-	protected IRepository getRepository(IRepositoryManager manager, URI location) {
-		// note the use of MetadataRepositoryManager (the concrete implementation).
-		if (manager instanceof MetadataRepositoryManager) {
-			return ((MetadataRepositoryManager) manager).getRepository(location);
-		}
-		return super.getRepository(manager, location);
-	}
-
-	protected IRepositoryManager getRepositoryManager() {
-		return (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-	}
-
-	protected IRepository doLoadRepository(IRepositoryManager manager, URI location, IProgressMonitor monitor) throws ProvisionException {
-		if (manager instanceof IMetadataRepositoryManager) {
-			return ProvisioningUtil.loadMetadataRepository(location, monitor);
-		}
-		return null;
-	}
-
-	protected Collector query(URI uris[], Query query, Collector collector, IProgressMonitor monitor) {
-		if (query instanceof RepositoryLocationQuery) {
-			query.perform(Arrays.asList(uris).iterator(), collector);
-			monitor.done();
-		} else {
-			SubMonitor sub = SubMonitor.convert(monitor, (uris.length + 1) * 100);
-			ArrayList loadedRepos = new ArrayList(uris.length);
-			for (int i = 0; i < uris.length; i++) {
-				IRepository repo = null;
-				try {
-					repo = loadRepository(getRepositoryManager(), uris[i], sub.newChild(100));
-				} catch (ProvisionException e) {
-					handleLoadFailure(e, uris[i]);
-				} catch (OperationCanceledException e) {
-					// user has canceled
-					repo = null;
-				}
-				if (repo != null)
-					loadedRepos.add(repo);
-			}
-			if (loadedRepos.size() > 0) {
-				IQueryable[] queryables = (IQueryable[]) loadedRepos.toArray(new IQueryable[loadedRepos.size()]);
-				collector = new CompoundQueryable(queryables).query(query, collector, sub.newChild(100));
-			}
-		}
-		return collector;
-	}
-
-	protected URI[] getRepoLocations(IRepositoryManager manager) {
-		Set locations = new HashSet();
-		int flags = queryContext.getMetadataRepositoryFlags();
-		locations.addAll(Arrays.asList(manager.getKnownRepositories(flags)));
-		if (includeDisabledRepos) {
-			locations.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | flags)));
-		}
-		return (URI[]) locations.toArray(new URI[locations.size()]);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableRepositoryManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableRepositoryManager.java
deleted file mode 100644
index b480e29..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/QueryableRepositoryManager.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * An object that provides specialized repository query support in place of
- * a repository manager and its repositories.  The repositories to be included 
- * can be specified using the repository flags defined in the UI policy.  The query
- * itself is run on the the repositories themselves, if supported by the particular
- * kind of repository.  If the repository doesn't support queryies, or the query is
- * a {@link RepositoryLocationQuery}, the query is run over
- * the repository locations instead.  
- */
-public abstract class QueryableRepositoryManager implements IQueryable {
-	/**
-	 * List<URI> of locations of repositories that were not found
-	 */
-	private ArrayList notFound = new ArrayList();
-
-	/**
-	 * Map<URI,IRepository> of loaded repositories.
-	 */
-	private HashMap loaded = new HashMap();
-
-	private MultiStatus accumulatedNotFound = null;
-	protected boolean includeDisabledRepos;
-	protected IUViewQueryContext queryContext;
-
-	public QueryableRepositoryManager(IUViewQueryContext queryContext, boolean includeDisabledRepos) {
-		this.includeDisabledRepos = includeDisabledRepos;
-		Assert.isNotNull(queryContext);
-		this.queryContext = queryContext;
-	}
-
-	/**
-	 * Iterates over the repositories configured in this queryable.
-	 * For most queries, the query is run on each repository, passing any objects that satisfy the
-	 * query to the provided collector.  If the query is a {@link RepositoryLocationQuery}, the query
-	 * is run on the repository locations instead.
-	 * <p>
-	 * This method is long-running; progress and cancellation are provided
-	 * by the given progress monitor. 
-	 * </p>
-	 * 
-	 * @param query The query to perform..
-	 * @param result Collects the results of the query, run on either the repository URIs, or on
-	 *    the repositories themselves.
-	 * @param monitor a progress monitor, or <code>null</code> if progress
-	 *    reporting is not desired
-	 * @return The collector argument
-	 */
-	public Collector query(Query query, Collector result, IProgressMonitor monitor) {
-		IRepositoryManager manager = getRepositoryManager();
-		if (manager == null) {
-			ProvUI.reportStatus(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_NoRepositoryManager), StatusManager.SHOW | StatusManager.LOG);
-			return result;
-		}
-		if (monitor == null)
-			monitor = new NullProgressMonitor();
-		query(getRepoLocations(manager), query, result, monitor);
-		reportAccumulatedStatus();
-		return result;
-	}
-
-	/**
-	 * Load all of the repositories referenced by this queryable.  This is an expensive operation.
-	 * The status of any not found repositories is accumulated and must be reported manually
-	 * using reportAccumulatedStatus()
-	 * 
-	 * @param monitor the progress monitor that should be used
-	 */
-	public void loadAll(IProgressMonitor monitor) {
-		IRepositoryManager manager = getRepositoryManager();
-		if (manager == null) {
-			ProvUI.reportStatus(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_NoRepositoryManager), StatusManager.SHOW | StatusManager.LOG);
-			return;
-		}
-		URI[] repoLocations = getRepoLocations(manager);
-		SubMonitor sub = SubMonitor.convert(monitor, repoLocations.length * 100);
-		if (sub.isCanceled())
-			return;
-		for (int i = 0; i < repoLocations.length; i++) {
-			if (sub.isCanceled())
-				return;
-			try {
-				loadRepository(manager, repoLocations[i], sub.newChild(100));
-			} catch (ProvisionException e) {
-				handleLoadFailure(e, repoLocations[i]);
-			}
-		}
-	}
-
-	/**
-	 * Returns an array of repository locations.
-	 */
-	protected abstract URI[] getRepoLocations(IRepositoryManager manager);
-
-	protected void handleLoadFailure(ProvisionException e, URI problemRepo) {
-		int code = e.getStatus().getCode();
-		// special handling when the repo is bad.  We don't want to continually report it
-		if (code == ProvisionException.REPOSITORY_NOT_FOUND || code == ProvisionException.REPOSITORY_INVALID_LOCATION) {
-			// If we thought we had loaded it, get rid of the reference
-			loaded.remove(problemRepo);
-			// If we've already reported a URL is not found, don't report again.
-			if (notFound.contains(problemRepo))
-				return;
-			// If someone else reported a URL is not found, don't report again.
-			if (ProvUI.hasNotFoundStatusBeenReported(problemRepo)) {
-				notFound.add(problemRepo);
-				return;
-			}
-			notFound.add(problemRepo);
-			ProvUI.notFoundStatusReported(problemRepo);
-		}
-
-		// Some ProvisionExceptions include an empty multi status with a message.  
-		// Since empty multi statuses have a severity OK, The platform status handler doesn't handle
-		// this well.  We correct this by recreating a status with error severity
-		// so that the platform status handler does the right thing.
-		IStatus status = e.getStatus();
-		if (status instanceof MultiStatus && ((MultiStatus) status).getChildren().length == 0)
-			status = new Status(IStatus.ERROR, status.getPlugin(), status.getCode(), status.getMessage(), status.getException());
-		if (accumulatedNotFound == null) {
-			accumulatedNotFound = new MultiStatus(ProvUIActivator.PLUGIN_ID, ProvisionException.REPOSITORY_NOT_FOUND, new IStatus[] {status}, ProvUIMessages.QueryableMetadataRepositoryManager_MultipleRepositoriesNotFound, null);
-		} else {
-			accumulatedNotFound.add(status);
-		}
-		// Always log the complete exception so the detailed stack trace is in the log.  
-		ProvUI.handleException(e, NLS.bind(ProvUIMessages.ProvisioningUtil_LoadRepositoryFailure, problemRepo), StatusManager.LOG);
-
-	}
-
-	public void reportAccumulatedStatus() {
-		// If we've discovered not found repos we didn't know about, report them
-		if (accumulatedNotFound != null) {
-			// If there is only missing repo to report, use the specific message rather than the generic.
-			if (accumulatedNotFound.getChildren().length == 1) {
-				ProvUI.reportStatus(accumulatedNotFound.getChildren()[0], StatusManager.SHOW);
-			} else {
-				ProvUI.reportStatus(accumulatedNotFound, StatusManager.SHOW);
-			}
-		}
-		// Reset the accumulated status so that next time we only report the newly not found repos.
-		accumulatedNotFound = null;
-	}
-
-	/**
-	 * Return a boolean indicating whether all the repositories that
-	 * can be queried by the receiver are already loaded.  If a repository
-	 * is not loaded because it was not found, this will not return false,
-	 * because this repository cannot be queried.
-	 * 
-	 * @return <code>true</code> if all repositories to be queried by the
-	 * receiver are loaded, <code>false</code> if they
-	 * are not.
-	 */
-	public boolean areRepositoriesLoaded() {
-		IRepositoryManager mgr = getRepositoryManager();
-		if (mgr == null)
-			return false;
-		URI[] repoURIs = getRepoLocations(mgr);
-		for (int i = 0; i < repoURIs.length; i++) {
-			IRepository repo = getRepository(mgr, repoURIs[i]);
-			// A not-loaded repo doesn't count if it's considered missing (not found)
-			if (repo == null && !ProvUI.hasNotFoundStatusBeenReported(repoURIs[i]))
-				return false;
-		}
-		return true;
-	}
-
-	protected IRepository loadRepository(IRepositoryManager manager, URI location, IProgressMonitor monitor) throws ProvisionException {
-		monitor.setTaskName(NLS.bind(ProvUIMessages.QueryableMetadataRepositoryManager_LoadRepositoryProgress, URIUtil.toUnencodedString(location)));
-		IRepository repo = doLoadRepository(manager, location, monitor);
-		if (repo != null)
-			loaded.put(location, repo);
-		return repo;
-	}
-
-	/**
-	 * Return the appropriate repository manager, or <code>null</code> if none could be found.
-	 * @return the repository manager
-	 */
-	protected abstract IRepositoryManager getRepositoryManager();
-
-	/**
-	 * Get an already-loaded repository at the specified location.
-	 * 
-	 * @param manager the manager
-	 * @param location the repository location
-	 * @return the repository at that location, or <code>null</code> if no repository is
-	 * yet located at that location.
-	 */
-	protected IRepository getRepository(IRepositoryManager manager, URI location) {
-		// This is only used by the artifact mgr subclass.
-		// MetadataRepositoryManager has a method for getting its cached repo instance
-		return (IRepository) loaded.get(location);
-	}
-
-	/**
-	 * Load the repository located at the specified location.
-	 * 
-	 * @param manager the manager
-	 * @param location the repository location
-	 * @param monitor the progress monitor
-	 * @return the repository that was loaded, or <code>null</code> if no repository could
-	 * be found at that location.
-	 */
-	protected abstract IRepository doLoadRepository(IRepositoryManager manager, URI location, IProgressMonitor monitor) throws ProvisionException;
-
-	protected abstract Collector query(URI[] uris, Query query, Collector collector, IProgressMonitor monitor);
-
-	public void setQueryContext(IUViewQueryContext queryContext) {
-		this.queryContext = queryContext;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/RepositoryLocationQuery.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/RepositoryLocationQuery.java
deleted file mode 100644
index a332e70..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/RepositoryLocationQuery.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.net.URI;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.QueryHelpers;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-/**
- * RepositoryLocationQuery is a query that gathers repository
- * locations rather than repositories.  It is used when composing
- * queries against a QueryableRepositoryManager to indicate that the
- * repository need not be loaded to run the query.  
- * 
- * @since 3.5
- */
-public class RepositoryLocationQuery implements Query {
-
-	/**
-	 * Gets the ID for this Query. 
-	 */
-	public String getId() {
-		return QueryHelpers.getId(this);
-	}
-
-	/**
-	 * Gets a particular property of the query.
-	 * @param property The property to retrieve 
-	 */
-	public Object getProperty(String property) {
-		return QueryHelpers.getProperty(this, property);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.query.Query#perform(java.util.Iterator, org.eclipse.equinox.internal.provisional.p2.query.Collector)
-	 */
-	public Collector perform(Iterator iterator, Collector result) {
-		while (iterator.hasNext()) {
-			Object candidate = iterator.next();
-			URI location = getLocation(candidate);
-			if (location != null)
-				if (!result.accept(location))
-					break;
-		}
-		return result;
-	}
-
-	private URI getLocation(Object o) {
-		if (o instanceof URI)
-			return (URI) o;
-		if (o instanceof IRepository)
-			return ((IRepository) o).getLocation();
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ResolutionResult.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ResolutionResult.java
deleted file mode 100644
index 1e2e43d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ResolutionResult.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.util.HashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-/**
- * ResolutionResult describes problems in a provisioning plan in a structured
- * way that can be presented to a user.
- * 
- * @since 3.5
- */
-public class ResolutionResult {
-	private static final String NESTING_INDENT = "  "; //$NON-NLS-1$
-
-	private HashMap iuToStatusMap = new HashMap();
-	private MultiStatus summaryStatus;
-
-	public IStatus getSummaryStatus() {
-		if (summaryStatus != null)
-			return summaryStatus;
-		return Status.OK_STATUS;
-	}
-
-	public void addSummaryStatus(IStatus status) {
-		if (summaryStatus == null) {
-			summaryStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ResolutionReport_SummaryStatus, null);
-		}
-		summaryStatus.add(status);
-	}
-
-	public IStatus statusOf(IInstallableUnit iu) {
-		return (IStatus) iuToStatusMap.get(iu);
-	}
-
-	public void addStatus(IInstallableUnit iu, IStatus status) {
-		MultiStatus iuSummaryStatus = (MultiStatus) iuToStatusMap.get(iu);
-		if (iuSummaryStatus == null) {
-			iuSummaryStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, IStatusCodes.IU_REQUEST_ALTERED, new IStatus[] {status}, getIUString(iu), null);
-		} else
-			iuSummaryStatus.add(status);
-	}
-
-	private String getIUString(IInstallableUnit iu) {
-		if (iu == null)
-			return ProvUIMessages.PlanStatusHelper_Items;
-		// Get the iu name in the default locale
-		String name = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
-		if (name != null)
-			return name;
-		return iu.getId();
-	}
-
-	public String getSummaryReport() {
-		if (summaryStatus != null) {
-			StringBuffer buffer = new StringBuffer();
-			appendDetailText(summaryStatus, buffer, -1, false);
-			return buffer.toString();
-		}
-		return ""; //$NON-NLS-1$
-	}
-
-	// Answers null if there is nothing to say about the ius
-	public String getDetailedReport(IInstallableUnit[] ius) {
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0; i < ius.length; i++) {
-			MultiStatus iuStatus = (MultiStatus) iuToStatusMap.get(ius[i]);
-			if (iuStatus != null)
-				appendDetailText(iuStatus, buffer, 0, true);
-		}
-		String report = buffer.toString();
-		if (report.length() == 0)
-			return null;
-		return report;
-	}
-
-	void appendDetailText(IStatus status, StringBuffer buffer, int indent, boolean includeTopLevelMessage) {
-		if (includeTopLevelMessage) {
-			for (int i = 0; i < indent; i++)
-				buffer.append(NESTING_INDENT);
-			if (status.getMessage() != null)
-				buffer.append(status.getMessage());
-		}
-		Throwable t = status.getException();
-		if (t != null) {
-			// A provision (or core) exception occurred.  Get its status message or if none, its top level message.
-			// Indent by one more level (note the <=)
-			buffer.append('\n');
-			for (int i = 0; i <= indent; i++)
-				buffer.append(NESTING_INDENT);
-			if (t instanceof CoreException) {
-				IStatus exceptionStatus = ((CoreException) t).getStatus();
-				if (exceptionStatus != null && exceptionStatus.getMessage() != null)
-					buffer.append(exceptionStatus.getMessage());
-				else {
-					String details = t.getLocalizedMessage();
-					if (details != null)
-						buffer.append(details);
-				}
-			} else {
-				String details = t.getLocalizedMessage();
-				if (details != null)
-					buffer.append(details);
-			}
-		}
-		// Now print the children status info (if there are children)
-		IStatus[] children = status.getChildren();
-		for (int i = 0; i < children.length; i++) {
-			if (buffer.length() > 0)
-				buffer.append('\n');
-			appendDetailText(children[i], buffer, indent + 1, true);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/UpdateManagerCompatibility.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/UpdateManagerCompatibility.java
deleted file mode 100644
index 802842f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/UpdateManagerCompatibility.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Vector;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.InstallableUnitOperand;
-import org.eclipse.equinox.internal.provisional.p2.engine.Operand;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * Utility methods involving compatibility with the Eclipse Update Manager.
- * 
- * @since 3.4
- *
- */
-public class UpdateManagerCompatibility {
-
-	// This value was copied from MetadataGeneratorHelper.  Must be the same.
-	private static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
-	private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
-
-	private static void parse(String fileName, Vector bookmarks) {
-		File file = new File(fileName);
-		if (!file.exists())
-			return;
-
-		try {
-			documentBuilderFactory.setNamespaceAware(true);
-			DocumentBuilder parser = documentBuilderFactory.newDocumentBuilder();
-			Document doc = parser.parse(file);
-			Node root = doc.getDocumentElement();
-			processRoot(root, bookmarks);
-		} catch (ParserConfigurationException e) {
-			logFail(e);
-		} catch (SAXException e) {
-			logFail(e);
-		} catch (IOException e) {
-			logFail(e);
-		}
-	}
-
-	private static MetadataRepositoryElement[] getSites(Vector bookmarks) {
-		ArrayList result = new ArrayList();
-		for (int i = 0; i < bookmarks.size(); i++) {
-			if (bookmarks.get(i) instanceof MetadataRepositoryElement)
-				result.add(bookmarks.get(i));
-		}
-		return (MetadataRepositoryElement[]) result.toArray(new MetadataRepositoryElement[result.size()]);
-	}
-
-	private static void processRoot(Node root, Vector bookmarks) {
-		if (root.getNodeName().equals("bookmarks")) { //$NON-NLS-1$
-			NodeList children = root.getChildNodes();
-			processChildren(children, bookmarks);
-		}
-	}
-
-	private static void processChildren(NodeList children, Vector bookmarks) {
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("site")) { //$NON-NLS-1$
-					createSite(child, bookmarks);
-				} else if (child.getNodeName().equals("folder")) { //$NON-NLS-1$
-					createFolder(child, bookmarks);
-				}
-			}
-		}
-	}
-
-	private static void createSite(Node child, Vector bookmarks) {
-		URI uri = null;
-		try {
-			uri = URIUtil.fromString((getAttribute(child, "url"))); //$NON-NLS-1$
-		} catch (URISyntaxException e) {
-			logFail(e);
-			return;
-		}
-
-		String sel = getAttribute(child, "selected"); //$NON-NLS-1$
-		boolean selected = (sel != null && sel.equals("true")); //$NON-NLS-1$
-
-		MetadataRepositoryElement element = new MetadataRepositoryElement(null, uri, selected);
-		String nickname = getAttribute(child, "name"); //$NON-NLS-1$
-		if (nickname != null && nickname.length() > 0)
-			element.setNickname(nickname);
-		bookmarks.add(element);
-	}
-
-	private static void createFolder(Node child, Vector bookmarks) {
-		if (child.hasChildNodes())
-			processChildren(child.getChildNodes(), bookmarks);
-	}
-
-	private static String getAttribute(Node node, String name) {
-		NamedNodeMap atts = node.getAttributes();
-		Node att = atts.getNamedItem(name);
-		if (att != null) {
-			return att.getNodeValue();
-		}
-		return ""; //$NON-NLS-1$
-	}
-
-	private static void store(String fileName, Vector bookmarks) {
-		FileOutputStream fos = null;
-		OutputStreamWriter osw = null;
-		PrintWriter writer = null;
-		try {
-			fos = new FileOutputStream(fileName);
-			osw = new OutputStreamWriter(fos, "UTF8"); //$NON-NLS-1$
-			writer = new PrintWriter(osw);
-			writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
-			writer.println("<bookmarks>"); //$NON-NLS-1$
-			for (int i = 0; i < bookmarks.size(); i++) {
-				Object obj = bookmarks.get(i);
-				writeObject("   ", obj, writer); //$NON-NLS-1$
-			}
-		} catch (IOException e) {
-			logFail(e);
-		} finally {
-			writer.println("</bookmarks>"); //$NON-NLS-1$
-			writer.flush();
-			writer.close();
-			try {
-				if (osw != null)
-					osw.close();
-			} catch (IOException e1) {
-				logFail(e1);
-			}
-			try {
-				if (fos != null)
-					fos.close();
-			} catch (IOException e2) {
-				logFail(e2);
-			}
-		}
-	}
-
-	private static void writeObject(String indent, Object obj, PrintWriter writer) {
-		if (obj instanceof MetadataRepositoryElement) {
-			MetadataRepositoryElement element = (MetadataRepositoryElement) obj;
-			String sel = element.isEnabled() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
-			String name = element.getName();
-			writer.print(indent + "<site url=\"" + URIUtil.toUnencodedString(element.getLocation()) + "\" selected=\"" + sel + "\" name=\"" + getWritableXMLString(name) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ 
-			writer.println("/>"); //$NON-NLS-1$
-		}
-	}
-
-	public static boolean requiresInstallHandlerSupport(ProvisioningPlan plan) {
-		Operand[] operands = plan.getOperands();
-		for (int i = 0; i < operands.length; i++) {
-			if (operands[i] instanceof InstallableUnitOperand) {
-				IInstallableUnit iu = ((InstallableUnitOperand) operands[i]).second();
-				if (iu != null && iu.getProperty(ECLIPSE_INSTALL_HANDLER_PROP) != null)
-					return true;
-			}
-		}
-		return false;
-
-	}
-
-	/**
-	 * Prompt the user for a file and import the sites specified in that
-	 * file.  Return the collection of repo elements in the import.
-	 * @param shell the shell used to parent any dialogs used.
-	 */
-	public static MetadataRepositoryElement[] importSites(Shell shell) {
-		FileDialog dialog = new FileDialog(shell);
-		dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ImportSitesTitle);
-		dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
-
-		MetadataRepositoryElement[] sites = null;
-
-		String bookmarksFile = dialog.open();
-		while (bookmarksFile != null && sites == null) {
-			File file = new File(bookmarksFile);
-			sites = readBookmarkFile(file);
-			if (sites == null || sites.length == 0) {
-				MessageDialog.openInformation(shell, ProvUIMessages.UpdateManagerCompatibility_InvalidSitesTitle, ProvUIMessages.UpdateManagerCompatibility_InvalidSiteFileMessage);
-				bookmarksFile = dialog.open();
-			}
-		}
-		return sites == null ? new MetadataRepositoryElement[0] : sites;
-	}
-
-	public static MetadataRepositoryElement[] readBookmarkFile(File file) {
-		Vector bookmarks = new Vector();
-		parse(file.getAbsolutePath(), bookmarks);
-		return getSites(bookmarks);
-	}
-
-	public static void writeBookmarkFile(String filename, MetadataRepositoryElement[] sites) {
-		Vector bookmarks = new Vector(sites.length);
-		for (int i = 0; i < sites.length; i++)
-			bookmarks.add(sites[i]);
-		store(filename, bookmarks);
-
-	}
-
-	/**
-	 * Export the specified list of sites to a bookmarks file that
-	 * can be read later.
-	 * 
-	 * @param shell the shell used to parent the export dialog
-	 * @param sites the sites to export
-	 */
-
-	public static void exportSites(Shell shell, MetadataRepositoryElement[] sites) {
-		FileDialog dialog = new FileDialog(shell, SWT.SAVE);
-		dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ExportSitesTitle);
-		dialog.setFileName("bookmarks.xml"); //$NON-NLS-1$
-		dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
-
-		String bookmarksFile = dialog.open();
-		if (bookmarksFile == null)
-			return;
-
-		writeBookmarkFile(bookmarksFile, sites);
-	}
-
-	/**
-	 * Open the old UpdateManager installer UI using the specified shell. 
-	 * We do not call the UpdateManagerUI class directly because we want to be able to be configured 
-	 * without requiring those plug-ins.  Instead, we invoke a known command.
-	 */
-	public static void openInstaller() {
-		ProvUI.openUpdateManagerInstaller(null);
-	}
-
-	/**
-	 * Open the old UpdateManager configuration manager UI using the specified shell. 
-	 * We do not call the UpdateManagerUI class directly because we want to be able to be configured 
-	 * without requiring those plug-ins.  Instead, we invoke a known command.
-	 */
-	public static void openConfigurationManager() {
-		ProvUI.openUpdateManagerConfigurationManager(null);
-	}
-
-	private static void logFail(Throwable t) {
-		Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, t.getLocalizedMessage(), t);
-		ProvUI.reportStatus(failStatus, StatusManager.LOG);
-	}
-
-	private static String getWritableXMLString(String value) {
-		StringBuffer buf = new StringBuffer();
-		if (value == null)
-			return buf.toString();
-		for (int i = 0; i < value.length(); i++) {
-			char c = value.charAt(i);
-			switch (c) {
-				case '&' :
-					buf.append("&"); //$NON-NLS-1$
-					break;
-				case '<' :
-					buf.append("<"); //$NON-NLS-1$
-					break;
-				case '>' :
-					buf.append(">"); //$NON-NLS-1$
-					break;
-				case '\'' :
-					buf.append("'"); //$NON-NLS-1$
-					break;
-				case '\"' :
-					buf.append("""); //$NON-NLS-1$
-					break;
-				default :
-					buf.append(c);
-					break;
-			}
-		}
-		return buf.toString();
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ValidationDialogServiceUI.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ValidationDialogServiceUI.java
deleted file mode 100644
index 78078b2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/ValidationDialogServiceUI.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui;
-
-import java.security.cert.Certificate;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.TrustCertificateDialog;
-import org.eclipse.equinox.internal.p2.ui.dialogs.UserValidationDialog;
-import org.eclipse.equinox.internal.p2.ui.viewers.CertificateLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUI;
-import org.eclipse.equinox.internal.provisional.p2.core.IServiceUICheckUnsigned;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The default GUI-based implementation of {@link IServiceUI}.
- */
-public class ValidationDialogServiceUI implements IServiceUI, IServiceUICheckUnsigned {
-	/**
-	 * Subclassed to add a cancel button to the error dialog.
-	 */
-	static class OkCancelErrorDialog extends ErrorDialog {
-
-		public OkCancelErrorDialog(Shell parentShell, String dialogTitle, String message, IStatus status, int displayMask) {
-			super(parentShell, dialogTitle, message, status, displayMask);
-		}
-
-		protected void createButtonsForButtonBar(Composite parent) {
-			// create OK and Details buttons
-			createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-			createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
-			createDetailsButton(parent);
-		}
-	}
-
-	public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#getUsernamePassword(java.lang.String)
-	 */
-	public AuthenticationInfo getUsernamePassword(final String location) {
-
-		final AuthenticationInfo[] result = new AuthenticationInfo[1];
-		if (!suppressAuthentication()) {
-			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					Shell shell = ProvUI.getDefaultParentShell();
-					String[] buttonLabels = new String[] {ProvUIMessages.ServiceUI_OK, ProvUIMessages.ServiceUI_Cancel};
-					String message = NLS.bind(ProvUIMessages.ServiceUI_LoginDetails, location);
-					UserValidationDialog dialog = new UserValidationDialog(shell, ProvUIMessages.ServiceUI_LoginRequired, null, message, buttonLabels);
-					if (dialog.open() == Window.OK) {
-						result[0] = dialog.getResult();
-					}
-				}
-
-			});
-		}
-		return result[0];
-	}
-
-	private boolean suppressAuthentication() {
-		Job job = Job.getJobManager().currentJob();
-		if (job != null) {
-			return job.getProperty(SUPPRESS_AUTHENTICATION_JOB_MARKER) != null;
-		}
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#showCertificates(java.lang.Object)
-	 */
-	public Certificate[] showCertificates(final Certificate[][] certificates) {
-		final Object[] result = new Object[1];
-		final TreeNode[] input = createTreeNodes(certificates);
-		PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-			public void run() {
-				Shell shell = ProvUI.getDefaultParentShell();
-				ILabelProvider labelProvider = new CertificateLabelProvider();
-				TreeNodeContentProvider contentProvider = new TreeNodeContentProvider();
-				TrustCertificateDialog trustCertificateDialog = new TrustCertificateDialog(shell, input, labelProvider, contentProvider);
-				trustCertificateDialog.open();
-				Certificate[] values = new Certificate[trustCertificateDialog.getResult() == null ? 0 : trustCertificateDialog.getResult().length];
-				for (int i = 0; i < values.length; i++) {
-					values[i] = (Certificate) ((TreeNode) trustCertificateDialog.getResult()[i]).getValue();
-				}
-				result[0] = values;
-			}
-		});
-		return (Certificate[]) result[0];
-	}
-
-	private TreeNode[] createTreeNodes(Certificate[][] certificates) {
-		TreeNode[] children = new TreeNode[certificates.length];
-		for (int i = 0; i < certificates.length; i++) {
-			TreeNode head = new TreeNode(certificates[i][0]);
-			TreeNode parent = head;
-			children[i] = head;
-			for (int j = 0; j < certificates[i].length; j++) {
-				TreeNode node = new TreeNode(certificates[i][j]);
-				node.setParent(parent);
-				parent.setChildren(new TreeNode[] {node});
-				parent = node;
-			}
-		}
-		return children;
-	}
-
-	public AuthenticationInfo getUsernamePassword(final String location, final AuthenticationInfo previousInfo) {
-
-		final AuthenticationInfo[] result = new AuthenticationInfo[1];
-		if (!suppressAuthentication()) {
-			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					Shell shell = ProvUI.getDefaultParentShell();
-					String[] buttonLabels = new String[] {ProvUIMessages.ServiceUI_OK, ProvUIMessages.ServiceUI_Cancel};
-					String message = null;
-					if (previousInfo.saveResult())
-						message = NLS.bind(ProvUIMessages.ProvUIMessages_SavedNotAccepted_EnterFor_0, location);
-					else
-						message = NLS.bind(ProvUIMessages.ProvUIMessages_NotAccepted_EnterFor_0, location);
-
-					UserValidationDialog dialog = new UserValidationDialog(previousInfo, shell, ProvUIMessages.ServiceUI_LoginRequired, null, message, buttonLabels);
-					if (dialog.open() == Window.OK) {
-						result[0] = dialog.getResult();
-					}
-				}
-
-			});
-		}
-		return result[0];
-	}
-
-	public boolean promptForUnsignedContent(final String[] details) {
-		final boolean[] result = new boolean[] {false};
-		PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-			public void run() {
-				Shell shell = ProvUI.getDefaultParentShell();
-				OkCancelErrorDialog dialog = new OkCancelErrorDialog(shell, ProvUIMessages.ServiceUI_warning_title, null, createStatus(), IStatus.WARNING);
-				result[0] = dialog.open() == IDialogConstants.OK_ID;
-			}
-
-			private IStatus createStatus() {
-				MultiStatus parent = new MultiStatus(ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ServiceUI_unsigned_message, null);
-				for (int i = 0; i < details.length; i++) {
-					parent.add(new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, details[i]));
-				}
-				return parent;
-			}
-		});
-		return result[0];
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ColocatedRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ColocatedRepositoryAction.java
deleted file mode 100644
index 2dd1e6b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ColocatedRepositoryAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-public abstract class ColocatedRepositoryAction extends ProvisioningAction {
-
-	public ColocatedRepositoryAction(String label, String tooltipText, ISelectionProvider selectionProvider) {
-		super(label, selectionProvider);
-		setToolTipText(tooltipText);
-		init();
-	}
-
-	public void run() {
-		ProvisioningOperationRunner.schedule(getOperation(), StatusManager.SHOW | StatusManager.LOG);
-	}
-
-	protected abstract ProvisioningOperation getOperation();
-
-	protected URI[] getSelectedLocations(Object[] selectionArray) {
-		List urls = new ArrayList();
-		for (int i = 0; i < selectionArray.length; i++) {
-			if (selectionArray[i] instanceof MetadataRepositoryElement)
-				urls.add(((MetadataRepositoryElement) selectionArray[i]).getLocation());
-		}
-		return (URI[]) urls.toArray(new URI[urls.size()]);
-	}
-
-	protected void checkEnablement(Object[] selectionArray) {
-		setEnabled(getSelectedLocations(selectionArray).length > 0);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ExistingIUInProfileAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ExistingIUInProfileAction.java
deleted file mode 100644
index eeb9f1c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ExistingIUInProfileAction.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-/**
- * 
- * Abstract class that implements the enablement rules for actions that
- * affect IU's already in a profile.  The action only enables when all of the
- * IU's involved are top level IU's from the same profile.
- * 
- * @since 3.5
- *
- */
-public abstract class ExistingIUInProfileAction extends ProfileModificationAction {
-
-	private String lastValidatedProfileId;
-
-	public ExistingIUInProfileAction(String label, Policy policy, ISelectionProvider selectionProvider, String profileId) {
-		super(policy, label, selectionProvider, profileId);
-	}
-
-	protected boolean isEnabledFor(Object[] selectionArray) {
-		Object parent = null;
-		lastValidatedProfileId = null;
-		// We don't want to prompt for a profile during validation,
-		// so we only consider the profile id that was set, or the profile
-		// referred to by the element itself..
-		IProfile profile = getProfile(false);
-		if (selectionArray.length > 0) {
-			for (int i = 0; i < selectionArray.length; i++) {
-				if (selectionArray[i] instanceof InstalledIUElement) {
-					InstalledIUElement element = (InstalledIUElement) selectionArray[i];
-					// If we couldn't find a profile in the action itself, check the element's queryable
-					if (profile == null) {
-						IQueryable queryable = element.getQueryable();
-						if (queryable instanceof IProfile) {
-							profile = (IProfile) queryable;
-							lastValidatedProfileId = profile.getProfileId();
-						} else
-							return false;
-					}
-					// If the parents are different, then they are either from 
-					// different profiles or are nested in different parts of the tree.
-					// Either way, this makes the selection invalid.
-					if (parent == null) {
-						parent = element.getParent(element);
-					} else if (parent != element.getParent(element)) {
-						lastValidatedProfileId = null;
-						return false;
-					}
-					// Now consider the validity of the element on its own
-					if (!isSelectable(element.getIU(), profile))
-						return false;
-				} else {
-					IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
-					if (iu == null || !isSelectable(iu))
-						return false;
-				}
-			}
-			return true;
-		}
-		return false;
-	}
-
-	protected boolean isSelectable(IIUElement element) {
-		if (!super.isSelectable(element))
-			return false;
-		Object parent = element.getParent(element);
-		if (parent != null) {
-			IProfile profile = (IProfile) ProvUI.getAdapter(parent, IProfile.class);
-			if (profile != null)
-				return isSelectable(element.getIU(), profile);
-		}
-		return false;
-	}
-
-	protected boolean isSelectable(IInstallableUnit iu) {
-		if (!super.isSelectable(iu))
-			return false;
-		IProfile profile = getProfile(false);
-		if (profile != null) {
-			return isSelectable(iu, profile);
-		}
-		return false;
-	}
-
-	private boolean isSelectable(IInstallableUnit iu, IProfile profile) {
-		int lock = getLock(profile, iu);
-		if ((lock & getLockConstant()) == getLockConstant())
-			return false;
-		String propName = getPolicy().getQueryContext().getVisibleInstalledIUProperty();
-		if (propName != null && getProfileProperty(profile, iu, propName) == null) {
-			return false;
-		}
-		return true;
-	}
-
-	/*
-	 * Overridden to consider the profile parent of the elements
-	 * if one was not specified in the actions.
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#getProfileId(boolean)
-	 */
-	protected String getProfileId(boolean chooseProfile) {
-		if (profileId == null && lastValidatedProfileId != null)
-			return lastValidatedProfileId;
-		return super.getProfileId(chooseProfile);
-	}
-
-	protected abstract int getLockConstant();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/InstallAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/InstallAction.java
deleted file mode 100644
index e991ac3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/InstallAction.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.PreselectedIUInstallWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-
-public class InstallAction extends ProfileModificationAction {
-
-	public static ProfileChangeRequest computeProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor) {
-		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(targetProfileId);
-		IProfile profile;
-		// Now check each individual IU for special cases
-		try {
-			profile = ProvisioningUtil.getProfile(targetProfileId);
-		} catch (ProvisionException e) {
-			status.add(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, e.getLocalizedMessage(), e));
-			return null;
-		}
-		SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProfileChangeRequestBuildingRequest, ius.length);
-		for (int i = 0; i < ius.length; i++) {
-			// If the user is installing a patch, we mark it optional.  This allows
-			// the patched IU to be updated later by removing the patch.
-			if (Boolean.toString(true).equals(ius[i].getProperty(IInstallableUnit.PROP_TYPE_PATCH)))
-				request.setInstallableUnitInclusionRules(ius[i], PlannerHelper.createOptionalInclusionRule(ius[i]));
-
-			// Check to see if it is already installed.  This may alter the request.
-			Collector alreadyInstalled = profile.query(new InstallableUnitQuery(ius[i].getId()), new Collector(), null);
-			// TODO ideally we should only do this check if the iu is a singleton, but in practice many iu's that should
-			// be singletons are not, so we don't check this (yet)
-			// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=230878
-			if (alreadyInstalled.size() > 0) { //  && installedIU.isSingleton()
-				IInstallableUnit installedIU = (IInstallableUnit) alreadyInstalled.iterator().next();
-				int compareTo = ius[i].getVersion().compareTo(installedIU.getVersion());
-				// If the iu is a newer version of something already installed, consider this an
-				// update request
-				if (compareTo > 0) {
-					boolean lockedForUpdate = false;
-					String value = profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_LOCKED_IU);
-					if (value != null)
-						lockedForUpdate = (Integer.parseInt(value) & IInstallableUnit.LOCK_UPDATE) == IInstallableUnit.LOCK_UPDATE;
-					if (lockedForUpdate) {
-						// Add a status telling the user that this implies an update, but the
-						// iu should not be updated
-						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, ius[i]));
-					} else {
-						request.addInstallableUnits(new IInstallableUnit[] {ius[i]});
-						request.removeInstallableUnits(new IInstallableUnit[] {installedIU});
-						// Add a status informing the user that the update has been inferred
-						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, ius[i]));
-						// Mark it as a root if it hasn't been already
-						if (!Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU)))
-							request.setInstallableUnitProfileProperty(ius[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
-					}
-				} else if (compareTo < 0) {
-					// An implied downgrade.  We will not put this in the plan, add a status informing the user
-					status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, ius[i]));
-				} else {
-					if (Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU)))
-						// It is already a root, nothing to do. We tell the user it was already installed
-						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED, ius[i]));
-					else {
-						// It was already installed but not as a root.  Tell the user that parts of it are already installed and mark
-						// it as a root. 
-						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_PARTIAL_INSTALL, ius[i]));
-						request.setInstallableUnitProfileProperty(ius[i], Policy.getDefault().getQueryContext().getVisibleInstalledIUProperty(), Boolean.toString(true));
-					}
-				}
-			} else {
-				// Install it and mark as a root
-				request.addInstallableUnits(new IInstallableUnit[] {ius[i]});
-				request.setInstallableUnitProfileProperty(ius[i], Policy.getDefault().getQueryContext().getVisibleInstalledIUProperty(), Boolean.toString(true));
-			}
-			sub.worked(1);
-		}
-		sub.done();
-		return request;
-	}
-
-	public InstallAction(Policy policy, ISelectionProvider selectionProvider, String profileId) {
-		super(policy, ProvUI.INSTALL_COMMAND_LABEL, selectionProvider, profileId);
-		setToolTipText(ProvUI.INSTALL_COMMAND_TOOLTIP);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[])
-	 */
-	protected boolean isEnabledFor(Object[] selectionArray) {
-		if (selectionArray.length == 0)
-			return false;
-		// We allow non-IU's to be selected at this point, but there
-		// must be at least one installable unit selected that is
-		// selectable
-		for (int i = 0; i < selectionArray.length; i++) {
-			if (selectionArray[i] instanceof InstalledIUElement && isSelectable((IIUElement) selectionArray[i]))
-				return true;
-			IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
-			if (iu != null && isSelectable(iu))
-				return true;
-		}
-		return false;
-	}
-
-	/*
-	 * Overridden to reject categories and nested IU's (parent is a non-category IU)
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isSelectable(org.eclipse.equinox.internal.p2.ui.model.IUElement)
-	 */
-	protected boolean isSelectable(IIUElement element) {
-		return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
-	}
-
-	protected String getTaskName() {
-		return ProvUIMessages.InstallIUProgress;
-	}
-
-	protected int performAction(IInstallableUnit[] ius, String targetProfileId, PlannerResolutionOperation resolution) {
-		PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getPolicy(), targetProfileId, ius, resolution, new QueryableMetadataRepositoryManager(getPolicy().getQueryContext(), false));
-		WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
-		dialog.create();
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
-
-		return dialog.open();
-	}
-
-	protected ProfileChangeRequest getProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor) {
-		return computeProfileChangeRequest(ius, targetProfileId, status, monitor);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java
deleted file mode 100644
index fe5d8f3..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProfileModificationAction.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-public abstract class ProfileModificationAction extends ProvisioningAction {
-	public static final int ACTION_NOT_RUN = -1;
-	String profileId;
-	String userChosenProfileId;
-	Policy policy;
-	int result = ACTION_NOT_RUN;
-
-	protected ProfileModificationAction(Policy policy, String text, ISelectionProvider selectionProvider, String profileId) {
-		super(text, selectionProvider);
-		this.policy = policy;
-		this.profileId = profileId;
-		init();
-	}
-
-	public void run() {
-		// Determine which IUs and which profile are involved
-		IInstallableUnit[] ius = getSelectedIUs();
-		String id = getProfileId(true);
-		// We could not figure out a profile to operate on, so return
-		if (id == null || ius.length == 0) {
-			ProvUI.reportStatus(getNoProfileOrSelectionStatus(profileId, ius), StatusManager.BLOCK);
-			runCanceled();
-			return;
-		}
-		run(ius, id);
-	}
-
-	protected IStatus getNoProfileOrSelectionStatus(String id, IInstallableUnit[] ius) {
-		return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.ProfileModificationAction_InvalidSelections, id, new Integer(ius.length)));
-	}
-
-	protected void run(final IInstallableUnit[] ius, final String id) {
-		// Get a profile change request.  Supply a multi-status so that information
-		// about the request can be provided along the way.
-		final MultiStatus additionalStatus = getProfileChangeAlteredStatus();
-		final ProfileChangeRequest[] request = new ProfileChangeRequest[1];
-		// TODO even getting a profile change request can be expensive
-		// when updating, because we are looking for updates.  For now, most
-		// clients work around this by preloading repositories in a job.
-		// Consider something different here.  We'll pass a fake progress monitor
-		// into the profile change request method so that later we can do
-		// something better here.
-		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
-			public void run() {
-				request[0] = getProfileChangeRequest(ius, id, additionalStatus, new NullProgressMonitor());
-			}
-		});
-		// If we couldn't build a request, then report an error and bail.
-		// Hopefully the provider of the request gave an explanation in the status.
-		if (request[0] == null) {
-			IStatus failureStatus;
-			if (additionalStatus.getChildren().length > 0) {
-				if (additionalStatus.getChildren().length == 1)
-					failureStatus = additionalStatus.getChildren()[0];
-				else {
-					MultiStatus nullRequestStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, IStatusCodes.UNEXPECTED_NOTHING_TO_DO, additionalStatus.getChildren(), ProvUIMessages.ProfileModificationAction_NoChangeRequestProvided, null);
-					nullRequestStatus.addAll(additionalStatus);
-					failureStatus = nullRequestStatus;
-				}
-			} else {
-				// No explanation for failure was provided.  It shouldn't happen, but...
-				failureStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProfileModificationAction_NoExplanationProvided);
-			}
-			ProvUI.reportStatus(failureStatus, StatusManager.SHOW | StatusManager.LOG);
-			runCanceled();
-			return;
-		}
-		// We have a profile change request, let's get a plan for it.  This could take awhile.
-		final PlannerResolutionOperation operation = new PlannerResolutionOperation(ProvUIMessages.ProfileModificationAction_ResolutionOperationLabel, id, request[0], null, additionalStatus, isResolveUserVisible());
-		// Since we are resolving asynchronously, our job is done.  Setting this allows
-		// callers to decide to close the launching window.
-		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
-		result = Window.OK;
-		Job job = ProvisioningOperationRunner.schedule(operation, StatusManager.SHOW);
-		job.addJobChangeListener(new JobChangeAdapter() {
-			public void done(IJobChangeEvent event) {
-				// Do we have a plan??
-				final ProvisioningPlan plan = operation.getProvisioningPlan();
-				if (plan != null) {
-					if (PlatformUI.isWorkbenchRunning()) {
-						PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
-							public void run() {
-								if (validatePlan(plan))
-									performAction(ius, getProfileId(true), operation);
-								userChosenProfileId = null;
-							}
-						});
-					}
-				}
-			}
-		});
-	}
-
-	/**
-	 * Get the integer return code returned by any wizards launched by this
-	 * action.  If the action has not been run, return ACTION_NOT_RUN.  If the
-	 * action does not open a wizard, return Window.OK if the operation was performed,
-	 * and Window.CANCEL if it was canceled.
-	 * 
-	 * @return integer return code
-	 */
-	public int getReturnCode() {
-		return result;
-	}
-
-	/**
-	 * Validate the plan and return true if the operation should
-	 * be performed with plan.  Report any errors to the user before returning false.
-	 * @param plan
-	 * @return a boolean indicating whether the plan should be used in a
-	 * provisioning operation.
-	 */
-	protected boolean validatePlan(ProvisioningPlan plan) {
-		if (plan != null) {
-			// Don't validate the plan if the user cancelled
-			if (plan.getStatus().getSeverity() == IStatus.CANCEL)
-				return false;
-			if (getPlanValidator() != null)
-				return getPlanValidator().continueWorkingWithPlan(plan, getShell());
-			if (plan.getStatus().isOK())
-				return true;
-			ProvUI.reportStatus(plan.getStatus(), StatusManager.BLOCK | StatusManager.LOG);
-			return false;
-		}
-		return false;
-	}
-
-	/*
-	 * Get a provisioning plan for this action.
-	 */
-	protected abstract ProfileChangeRequest getProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor);
-
-	protected abstract int performAction(IInstallableUnit[] ius, String targetProfileId, PlannerResolutionOperation resolution);
-
-	protected abstract String getTaskName();
-
-	protected IInstallableUnit getIU(Object element) {
-		return (IInstallableUnit) ProvUI.getAdapter(element, IInstallableUnit.class);
-
-	}
-
-	/**
-	 * Return an array of the selected and valid installable units.
-	 * The number of IInstallableUnits in the array may be different than
-	 * the actual number of selections in the action's selection provider.
-	 * That is, if the action is disabled due to invalid selections,
-	 * this method will return those selections that were valid.
-	 * 
-	 * @return an array of selected IInstallableUnit that meet the
-	 * enablement criteria for the action.  
-	 */
-	protected IInstallableUnit[] getSelectedIUs() {
-		List elements = getStructuredSelection().toList();
-		List iusList = new ArrayList(elements.size());
-
-		for (int i = 0; i < elements.size(); i++) {
-			if (elements.get(i) instanceof IIUElement) {
-				IIUElement element = (IIUElement) elements.get(i);
-				if (isSelectable(element))
-					iusList.add(getIU(element));
-			} else {
-				IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(elements.get(i), IInstallableUnit.class);
-				if (iu != null && isSelectable(iu))
-					iusList.add(iu);
-			}
-		}
-		return (IInstallableUnit[]) iusList.toArray(new IInstallableUnit[iusList.size()]);
-	}
-
-	protected boolean isSelectable(IIUElement element) {
-		return !(element instanceof CategoryElement);
-	}
-
-	protected boolean isSelectable(IInstallableUnit iu) {
-		return !ProvisioningUtil.isCategory(iu);
-	}
-
-	protected LicenseManager getLicenseManager() {
-		return policy.getLicenseManager();
-	}
-
-	protected QueryProvider getQueryProvider() {
-		return policy.getQueryProvider();
-	}
-
-	protected PlanValidator getPlanValidator() {
-		return policy.getPlanValidator();
-	}
-
-	protected IProfileChooser getProfileChooser() {
-		return policy.getProfileChooser();
-	}
-
-	protected Policy getPolicy() {
-		return policy;
-	}
-
-	protected final void checkEnablement(Object[] selections) {
-		if (isEnabledFor(selections)) {
-			String id = getProfileId(false);
-			if (id == null)
-				setEnabled(true);
-			else
-				setEnabled(!ProvisioningOperationRunner.hasScheduledOperationsFor(id));
-		} else
-			setEnabled(false);
-	}
-
-	protected abstract boolean isEnabledFor(Object[] selections);
-
-	protected int getLock(IProfile profile, IInstallableUnit iu) {
-		if (profile == null)
-			return IInstallableUnit.LOCK_NONE;
-		try {
-			String value = profile.getInstallableUnitProperty(iu, IInstallableUnit.PROP_PROFILE_LOCKED_IU);
-			if (value != null)
-				return Integer.parseInt(value);
-		} catch (NumberFormatException e) {
-			// ignore and assume no lock
-		}
-		return IInstallableUnit.LOCK_NONE;
-	}
-
-	protected String getProfileProperty(IProfile profile, IInstallableUnit iu, String propertyName) {
-		if (profile == null || iu == null)
-			return null;
-		return profile.getInstallableUnitProperty(iu, propertyName);
-	}
-
-	protected IProfile getProfile(boolean chooseProfile) {
-		try {
-			String id = getProfileId(chooseProfile);
-			if (id == null)
-				return null;
-			return ProvisioningUtil.getProfile(id);
-		} catch (ProvisionException e) {
-			// ignore, we have bigger problems to report elsewhere
-		}
-		return null;
-	}
-
-	protected String getProfileId(boolean chooseProfile) {
-		if (profileId != null)
-			return profileId;
-		if (userChosenProfileId != null)
-			return userChosenProfileId;
-		if (chooseProfile && getProfileChooser() != null) {
-			userChosenProfileId = getProfileChooser().getProfileId(getShell());
-			return userChosenProfileId;
-		}
-		return null;
-	}
-
-	private void runCanceled() {
-		// The action was canceled, do any cleanup needed before
-		// it is run again.
-		userChosenProfileId = null;
-		result = Window.CANCEL;
-	}
-
-	protected MultiStatus getProfileChangeAlteredStatus() {
-		return PlanAnalyzer.getProfileChangeAlteredStatus();
-	}
-
-	protected boolean isResolveUserVisible() {
-		return true;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/PropertyDialogAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/PropertyDialogAction.java
deleted file mode 100644
index 917fd02..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/PropertyDialogAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.IShellProvider;
-
-/**
- * PropertyDialogAction which sets its enablement on construction.
- * 
- * @since 3.4
- *
- */
-
-public class PropertyDialogAction extends org.eclipse.ui.dialogs.PropertyDialogAction {
-	public PropertyDialogAction(IShellProvider shell, ISelectionProvider provider) {
-		super(shell, provider);
-		// prime the selection validation
-		ISelection selection = provider.getSelection();
-		if (selection instanceof IStructuredSelection) {
-			selectionChanged((IStructuredSelection) selection);
-		} else {
-			selectionChanged(selection);
-		}
-
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProvisioningAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProvisioningAction.java
deleted file mode 100644
index 3151164..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/ProvisioningAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.SelectionProviderAction;
-
-public abstract class ProvisioningAction extends SelectionProviderAction {
-
-	protected ProvisioningAction(String text, ISelectionProvider selectionProvider) {
-		super(selectionProvider, text);
-	}
-
-	/*
-	 * perform initialization that should be done after creation.
-	 */
-	protected void init() {
-		// prime the selection validation
-		ISelection selection = getSelection();
-		if (selection instanceof IStructuredSelection) {
-			selectionChanged((IStructuredSelection) selection);
-		} else {
-			selectionChanged(selection);
-		}
-	}
-
-	protected Shell getShell() {
-		return ProvUI.getDefaultParentShell();
-	}
-
-	/*
-	 * Overridden to use the selection from the selection provider, not the one
-	 * from the triggering event.  Some selection providers reinterpret the raw selections
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
-	 */
-	public final void selectionChanged(IStructuredSelection selection) {
-		ISelection providerSelection = getSelectionProvider().getSelection();
-		if (providerSelection instanceof IStructuredSelection) {
-			checkEnablement(((IStructuredSelection) providerSelection).toArray());
-		} else {
-			// shouldn't really happen, but a provider could decide to de-structure the selection
-			selectionChanged(providerSelection);
-		}
-	}
-
-	protected void checkEnablement(Object[] selections) {
-		// Default is to nothing
-	}
-
-	/**
-	 * Recheck the enablement.  Called by clients when some condition outside of
-	 * the action that may effect its enablement should be changed.
-	 */
-	public final void checkEnablement() {
-		ISelection selection = getSelection();
-		if (selection instanceof IStructuredSelection) {
-			checkEnablement(((IStructuredSelection) selection).toArray());
-		} else {
-			selectionChanged(selection);
-		}
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RefreshAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RefreshAction.java
deleted file mode 100644
index 95d5227..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RefreshAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @since 3.4
- *
- */
-public abstract class RefreshAction extends ProvisioningAction {
-
-	/**
-	 */
-	public RefreshAction(ISelectionProvider selectionProvider, Control control) {
-		super(ProvUIMessages.RefreshAction_Label, selectionProvider);
-		setToolTipText(ProvUIMessages.RefreshAction_Tooltip);
-		hookKeyListener(control);
-		init();
-	}
-
-	private void hookKeyListener(Control control) {
-		control.addKeyListener(new KeyAdapter() {
-			public void keyReleased(KeyEvent e) {
-				handleKeyReleased(e);
-			}
-		});
-	}
-
-	public void run() {
-		refresh();
-	}
-
-	protected abstract void refresh();
-
-	/**
-	 * Handle a key released event.  Used internally and also
-	 * made available so that clients can watch key events from
-	 * any other controls and dispatch to this action.
-	 * 
-	 * @param event the key event
-	 */
-	public void handleKeyReleased(KeyEvent event) {
-		if (event.keyCode == SWT.F5 && event.stateMask == 0) {
-			refresh();
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RemoveColocatedRepositoryAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RemoveColocatedRepositoryAction.java
deleted file mode 100644
index 00e008c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/RemoveColocatedRepositoryAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveColocatedRepositoryOperation;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-public class RemoveColocatedRepositoryAction extends ColocatedRepositoryAction {
-
-	public RemoveColocatedRepositoryAction(ISelectionProvider selectionProvider) {
-		super(ProvUIMessages.RemoveColocatedRepositoryAction_Label, ProvUIMessages.RemoveColocatedRepositoryAction_Tooltip, selectionProvider);
-
-	}
-
-	protected ProvisioningOperation getOperation() {
-		return new RemoveColocatedRepositoryOperation(ProvUIMessages.RemoveColocatedRepositoryAction_OperationLabel, getSelectedLocations(getStructuredSelection().toArray()));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UninstallAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UninstallAction.java
deleted file mode 100644
index cc0e6dd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UninstallAction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UninstallWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-
-public class UninstallAction extends ExistingIUInProfileAction {
-
-	public UninstallAction(Policy policy, ISelectionProvider selectionProvider, String profileId) {
-		super(ProvUI.UNINSTALL_COMMAND_LABEL, policy, selectionProvider, profileId);
-		setToolTipText(ProvUI.UNINSTALL_COMMAND_TOOLTIP);
-	}
-
-	protected String getTaskName() {
-		return ProvUIMessages.UninstallIUProgress;
-	}
-
-	protected int performAction(IInstallableUnit[] ius, String targetProfileId, PlannerResolutionOperation resolution) {
-		UninstallWizard wizard = new UninstallWizard(getPolicy(), targetProfileId, ius, resolution);
-		WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
-		dialog.create();
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UNINSTALL_WIZARD);
-
-		return dialog.open();
-	}
-
-	protected ProfileChangeRequest getProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor) {
-		SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProfileChangeRequestBuildingRequest, 1);
-		ProfileChangeRequest request = null;
-		try {
-			request = ProfileChangeRequest.createByProfileId(targetProfileId);
-			request.removeInstallableUnits(ius);
-			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=255984
-			// We ask to remove the the profile root property in addition to removing the IU.  In theory this
-			// should be redundant, but there are cases where the planner decides not to uninstall something because
-			// it is needed by others.  We still want to remove the root in this case.
-			String key = getPolicy().getQueryContext().getVisibleInstalledIUProperty();
-			for (int i = 0; i < ius.length; i++)
-				request.removeInstallableUnitProfileProperty(ius[i], key);
-		} finally {
-			sub.done();
-		}
-		return request;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
-	 */
-	protected int getLockConstant() {
-		return IInstallableUnit.LOCK_UNINSTALL;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java
deleted file mode 100644
index 8a7a6f5..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/actions/UpdateAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.actions;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.PlanAnalyzer;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.UpdateWizard;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.PlatformUI;
-
-public class UpdateAction extends ExistingIUInProfileAction {
-
-	protected IUElementListRoot root; // root that will be used to seed the wizard
-	protected ArrayList initialSelections; // the elements that should be selected in the wizard
-	boolean resolveIsVisible = true;
-	QueryableMetadataRepositoryManager manager;
-	boolean skipSelectionPage = false;
-
-	public UpdateAction(Policy policy, ISelectionProvider selectionProvider, String profileId, boolean resolveIsVisible) {
-		super(ProvUI.UPDATE_COMMAND_LABEL, policy, selectionProvider, profileId);
-		setToolTipText(ProvUI.UPDATE_COMMAND_TOOLTIP);
-		this.resolveIsVisible = resolveIsVisible;
-	}
-
-	public void setRepositoryManager(QueryableMetadataRepositoryManager manager) {
-		this.manager = manager;
-	}
-
-	public void setSkipSelectionPage(boolean skipSelectionPage) {
-		this.skipSelectionPage = skipSelectionPage;
-	}
-
-	protected int performAction(IInstallableUnit[] ius, String targetProfileId, PlannerResolutionOperation resolution) {
-		// Caches should have been created while formulating the plan
-		Assert.isNotNull(initialSelections);
-		Assert.isNotNull(root);
-		Assert.isNotNull(resolution);
-
-		UpdateWizard wizard = new UpdateWizard(getPolicy(), targetProfileId, root, initialSelections.toArray(), resolution, manager);
-		wizard.setSkipSelectionsPage(skipSelectionPage);
-		WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
-		dialog.create();
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UPDATE_WIZARD);
-
-		return dialog.open();
-	}
-
-	protected ProfileChangeRequest getProfileChangeRequest(IInstallableUnit[] ius, String targetProfileId, MultiStatus status, IProgressMonitor monitor) {
-		initialSelections = new ArrayList();
-		root = new IUElementListRoot();
-		ProfileChangeRequest request = UpdateWizard.createProfileChangeRequest(ius, targetProfileId, root, initialSelections, monitor);
-		if (request == null) {
-			status.add(PlanAnalyzer.getStatus(IStatusCodes.NOTHING_TO_UPDATE, null));
-			return null;
-		}
-
-		return request;
-	}
-
-	protected String getTaskName() {
-		return ProvUIMessages.UpdateIUProgress;
-	}
-
-	protected boolean isResolveUserVisible() {
-		return resolveIsVisible;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
-	 */
-	protected int getLockConstant() {
-		return IInstallableUnit.LOCK_UPDATE;
-	}
-
-	protected IStatus getNoProfileOrSelectionStatus(String id, IInstallableUnit[] ius) {
-		if (ius.length == 0)
-			return PlanAnalyzer.getStatus(IStatusCodes.NOTHING_TO_UPDATE, null);
-		return super.getNoProfileOrSelectionStatus(id, ius);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java
deleted file mode 100644
index b914a54..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AcceptLicensesWizardPage.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.util.*;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.InstallableUnitOperand;
-import org.eclipse.equinox.internal.provisional.p2.engine.Operand;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * AcceptLicensesWizardPage shows a list of the IU's that have
- * licenses that have not been approved by the user.
- * 
- * @since 3.4
- */
-public class AcceptLicensesWizardPage extends WizardPage {
-	private static final String DIALOG_SETTINGS_SECTION = "LicensessPage"; //$NON-NLS-1$
-	private static final String LIST_WEIGHT = "ListSashWeight"; //$NON-NLS-1$
-	private static final String LICENSE_WEIGHT = "LicenseSashWeight"; //$NON-NLS-1$
-	private static final String NAME_COLUMN_WIDTH = "NameColumnWidth"; //$NON-NLS-1$
-	private static final String VERSION_COLUMN_WIDTH = "VersionColumnWidth"; //$NON-NLS-1$
-
-	TableViewer iuViewer;
-	Text licenseTextBox;
-	Button acceptButton;
-	Button declineButton;
-	SashForm sashForm;
-	private IInstallableUnit[] originalIUs;
-	private IInstallableUnit[] iusWithUnacceptedLicenses;
-	private Policy policy;
-	IUColumnConfig nameColumn;
-	IUColumnConfig versionColumn;
-
-	public AcceptLicensesWizardPage(Policy policy, IInstallableUnit[] ius, ProvisioningPlan plan) {
-		super("AcceptLicenses"); //$NON-NLS-1$
-		setTitle(ProvUIMessages.AcceptLicensesWizardPage_Title);
-		this.policy = policy;
-		update(ius, plan);
-	}
-
-	public void createControl(Composite parent) {
-		initializeDialogUnits(parent);
-		if (iusWithUnacceptedLicenses.length == 0) {
-			Label label = new Label(parent, SWT.NONE);
-			setControl(label);
-		} else if (iusWithUnacceptedLicenses.length == 1) {
-			createLicenseSection(parent, true);
-		} else {
-			sashForm = new SashForm(parent, SWT.HORIZONTAL);
-			sashForm.setLayout(new GridLayout());
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-			sashForm.setLayoutData(gd);
-
-			createIUSection(sashForm);
-			createLicenseSection(sashForm, false);
-			sashForm.setWeights(getSashWeights());
-			setControl(sashForm);
-
-			Object element = iuViewer.getElementAt(0);
-			if (element != null)
-				iuViewer.setSelection(new StructuredSelection(element));
-		}
-		Dialog.applyDialogFont(getControl());
-	}
-
-	private void createIUSection(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		composite.setLayoutData(gd);
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(ProvUIMessages.AcceptLicensesWizardPage_ItemsLabel);
-		iuViewer = new TableViewer(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-		setTableColumns(iuViewer.getTable());
-		iuViewer.setContentProvider(new ProvElementContentProvider());
-		iuViewer.setLabelProvider(new IUDetailsLabelProvider());
-		iuViewer.setComparator(new ViewerComparator());
-		iuViewer.setInput(new IUElementListRoot(iusWithUnacceptedLicenses));
-
-		iuViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				handleSelectionChanged((IStructuredSelection) event.getSelection());
-			}
-
-		});
-		gd = new GridData(GridData.FILL_BOTH);
-		gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH + ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH);
-		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
-		iuViewer.getControl().setLayoutData(gd);
-	}
-
-	private void createLicenseAcceptSection(Composite parent, boolean multiple) {
-		// Buttons for accepting licenses
-		Composite buttonContainer = new Composite(parent, SWT.NULL);
-		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		buttonContainer.setLayout(new GridLayout());
-		buttonContainer.setLayoutData(gd);
-
-		acceptButton = new Button(buttonContainer, SWT.RADIO);
-		if (multiple)
-			acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptMultiple);
-		else
-			acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptSingle);
-
-		acceptButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				setPageComplete(acceptButton.getSelection());
-			}
-		});
-		declineButton = new Button(buttonContainer, SWT.RADIO);
-		if (multiple)
-			declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectMultiple);
-		else
-			declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectSingle);
-		declineButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				setPageComplete(acceptButton.getSelection());
-			}
-		});
-
-		acceptButton.setSelection(false);
-		declineButton.setSelection(true);
-	}
-
-	private void createLicenseSection(Composite parent, boolean singleLicense) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		composite.setLayoutData(gd);
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(ProvUIMessages.AcceptLicensesWizardPage_LicenseTextLabel);
-		licenseTextBox = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
-		licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-		initializeDialogUnits(licenseTextBox);
-		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
-		gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH);
-		licenseTextBox.setLayoutData(gd);
-
-		createLicenseAcceptSection(composite, !singleLicense);
-
-		if (singleLicense) {
-			licenseTextBox.setText(getLicenseBody(iusWithUnacceptedLicenses[0]));
-			setControl(composite);
-		}
-	}
-
-	void handleSelectionChanged(IStructuredSelection selection) {
-		if (!selection.isEmpty()) {
-			Object selected = selection.getFirstElement();
-			if (selected instanceof IInstallableUnit)
-				licenseTextBox.setText(getLicenseBody((IInstallableUnit) selected));
-		}
-	}
-
-	private void setTableColumns(Table table) {
-		table.setHeaderVisible(true);
-		nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
-		versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
-		initializeDialogUnits(table);
-		getColumnWidthsFromSettings();
-		TableColumn tc = new TableColumn(table, SWT.NONE, 0);
-		tc.setResizable(true);
-		tc.setText(nameColumn.columnTitle);
-		tc.setWidth(nameColumn.getWidth());
-		tc = new TableColumn(table, SWT.NONE, 1);
-		tc.setResizable(true);
-		tc.setText(versionColumn.columnTitle);
-		tc.setWidth(versionColumn.getWidth());
-	}
-
-	public boolean performFinish() {
-		rememberAcceptedLicenses();
-		return true;
-	}
-
-	public boolean hasLicensesToAccept() {
-		return iusWithUnacceptedLicenses.length > 0;
-	}
-
-	public void update(IInstallableUnit[] theIUs, ProvisioningPlan currentPlan) {
-		this.originalIUs = theIUs;
-		if (theIUs == null)
-			this.iusWithUnacceptedLicenses = new IInstallableUnit[0];
-		else
-			this.iusWithUnacceptedLicenses = iusWithUnacceptedLicenses(theIUs, currentPlan);
-		setDescription();
-		setPageComplete(iusWithUnacceptedLicenses.length == 0);
-		if (getControl() != null) {
-			Composite parent = getControl().getParent();
-			getControl().dispose();
-			createControl(parent);
-			parent.layout(true);
-		}
-	}
-
-	private String getLicenseBody(IInstallableUnit iu) {
-		ILicense license = IUPropertyUtils.getLicense(iu);
-		if (license != null && license.getBody() != null)
-			return license.getBody();
-		// shouldn't happen because we already reduced the list to those
-		// that have licenses and bodies are required.
-		return ""; //$NON-NLS-1$
-	}
-
-	private IInstallableUnit[] iusWithUnacceptedLicenses(IInstallableUnit[] selectedIUs, ProvisioningPlan currentPlan) {
-		IInstallableUnit[] iusToCheck;
-		if (currentPlan == null)
-			iusToCheck = selectedIUs;
-		else {
-			List allIUs = new ArrayList();
-			Operand[] operands = currentPlan.getOperands();
-			for (int i = 0; i < operands.length; i++)
-				if (operands[i] instanceof InstallableUnitOperand) {
-					IInstallableUnit addedIU = ((InstallableUnitOperand) operands[i]).second();
-					if (addedIU != null)
-						allIUs.add(addedIU);
-				}
-			iusToCheck = (IInstallableUnit[]) allIUs.toArray(new IInstallableUnit[allIUs.size()]);
-		}
-
-		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218532
-		// Current metadata generation can result with a feature group IU and the feature jar IU
-		// having the same name and license.  We will weed out duplicates if the license and name are both
-		// the same.  
-		// Note this algorithm is not generalized...we only save the first iu of any name found and this
-		// algorithm would allow duplicates if subsequent licenses found for an iu name did not match the
-		// first license yet still duplicated each other. Since this is not likely to happen we keep it
-		// simple.  The UI for licenses will soon be reworked.
-		HashMap licensesByIUName = new HashMap();//map of String(iu name)->License
-		List unaccepted = new ArrayList();
-		// We can't be sure that the viewer is created or the right label provider has been installed, so make another one.
-		IUDetailsLabelProvider labelProvider = new IUDetailsLabelProvider();
-		for (int i = 0; i < iusToCheck.length; i++) {
-			IInstallableUnit iu = iusToCheck[i];
-			String name = labelProvider.getText(iu);
-			ILicense license = IUPropertyUtils.getLicense(iu);
-			// It has a license, is it already accepted?
-			if (license != null) {
-				if (!policy.getLicenseManager().isAccepted(iu)) {
-					// Have we already found a license with this IU name?
-					ILicense potentialDuplicate = (ILicense) licensesByIUName.get(name);
-					// If we have no duplicate or the duplicate license doesn't match, add it
-					if (potentialDuplicate == null || !potentialDuplicate.equals(license))
-						unaccepted.add(iu);
-					// We didn't have a duplicate, need to record this one
-					if (potentialDuplicate == null)
-						licensesByIUName.put(name, license);
-				}
-			}
-		}
-		// Wasn't that fun?
-		return (IInstallableUnit[]) unaccepted.toArray(new IInstallableUnit[unaccepted.size()]);
-	}
-
-	private void rememberAcceptedLicenses() {
-		for (int i = 0; i < iusWithUnacceptedLicenses.length; i++) {
-			policy.getLicenseManager().accept(iusWithUnacceptedLicenses[i]);
-		}
-	}
-
-	private void setDescription() {
-		// No licenses but the page is open.  Shouldn't happen, but just in case...
-		if (iusWithUnacceptedLicenses.length == 0)
-			setDescription(ProvUIMessages.AcceptLicensesWizardPage_NoLicensesDescription);
-		// We have licenses.  Use a generic message if we think we aren't showing
-		// licenses from required IU's.  This check is not entirely accurate, for example
-		// one root IU could have no license and the next one has two different
-		// IU's with different licenses.  But this cheaply catches the common cases.
-		else if (iusWithUnacceptedLicenses.length <= originalIUs.length)
-			setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewLicensesDescription);
-		else {
-			// Without a doubt we know we are showing extra licenses.
-			setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewExtraLicensesDescription);
-		}
-	}
-
-	private String getDialogSettingsName() {
-		return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
-	}
-
-	public void saveBoundsRelatedSettings() {
-		if (iuViewer == null || iuViewer.getTable().isDisposed())
-			return;
-		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
-		IDialogSettings section = settings.getSection(getDialogSettingsName());
-		if (section == null) {
-			section = settings.addNewSection(getDialogSettingsName());
-		}
-		section.put(NAME_COLUMN_WIDTH, iuViewer.getTable().getColumn(0).getWidth());
-		section.put(VERSION_COLUMN_WIDTH, iuViewer.getTable().getColumn(1).getWidth());
-
-		if (sashForm == null || sashForm.isDisposed())
-			return;
-		int[] weights = sashForm.getWeights();
-		section.put(LIST_WEIGHT, weights[0]);
-		section.put(LICENSE_WEIGHT, weights[1]);
-	}
-
-	private void getColumnWidthsFromSettings() {
-		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
-		IDialogSettings section = settings.getSection(getDialogSettingsName());
-		if (section != null) {
-			try {
-				if (section.get(NAME_COLUMN_WIDTH) != null)
-					nameColumn.columnWidth = section.getInt(NAME_COLUMN_WIDTH);
-				if (section.get(VERSION_COLUMN_WIDTH) != null)
-					versionColumn.columnWidth = section.getInt(VERSION_COLUMN_WIDTH);
-			} catch (NumberFormatException e) {
-				// Ignore if there actually was a value that didn't parse.  
-			}
-		}
-	}
-
-	private int[] getSashWeights() {
-		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
-		IDialogSettings section = settings.getSection(getDialogSettingsName());
-		if (section != null) {
-			try {
-				int[] weights = new int[2];
-				if (section.get(LIST_WEIGHT) != null) {
-					weights[0] = section.getInt(LIST_WEIGHT);
-					if (section.get(LICENSE_WEIGHT) != null) {
-						weights[1] = section.getInt(LICENSE_WEIGHT);
-						return weights;
-					}
-				}
-			} catch (NumberFormatException e) {
-				// Ignore if there actually was a value that didn't parse.  
-			}
-		}
-		return new int[] {55, 45};
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AddRepositoryDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AddRepositoryDialog.java
deleted file mode 100644
index a659f74..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AddRepositoryDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.RepositoryNameAndLocationDialog;
-import org.eclipse.equinox.internal.provisional.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Abstract dialog class for adding repositories of different types. This class
- * assumes the user view of a repository is a name and URI. Individual subclasses 
- * will dictate what kind of repository and how it's created.
- * 
- * @since 3.4
- * 
- */
-public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialog {
-
-	Button okButton;
-	Text url, nickname;
-	URI addedLocation;
-	static final String[] ARCHIVE_EXTENSIONS = new String[] {"*.jar;*.zip"}; //$NON-NLS-1$ 
-	static String lastLocalLocation = null;
-	static String lastArchiveLocation = null;
-	Policy policy;
-
-	public AddRepositoryDialog(Shell parentShell, Policy policy) {
-		super(parentShell, policy);
-		setTitle(ProvUIMessages.AddRepositoryDialog_Title);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(parentShell, IProvHelpContextIds.ADD_REPOSITORY_DIALOG);
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite comp = new Composite(parent, SWT.NONE);
-		initializeDialogUnits(comp);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 3;
-		layout.marginTop = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
-		comp.setLayout(layout);
-		GridData data = new GridData();
-		comp.setLayoutData(data);
-
-		// Name: []
-		nickname = createNameField(comp);
-
-		Button localButton = new Button(comp, SWT.PUSH);
-		localButton.setText(ProvUIMessages.RepositoryGroup_LocalRepoBrowseButton);
-		localButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent event) {
-				DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.APPLICATION_MODAL);
-				dialog.setMessage(ProvUIMessages.RepositoryGroup_SelectRepositoryDirectory);
-				dialog.setFilterPath(lastLocalLocation);
-				String path = dialog.open();
-				if (path != null) {
-					lastLocalLocation = path;
-					url.setText(makeLocalURIString(path));
-					validateRepositoryURL(false);
-				}
-			}
-		});
-		setButtonLayoutData(localButton);
-
-		// Location: []
-		url = createLocationField(comp);
-
-		Button archiveButton = new Button(comp, SWT.PUSH);
-		archiveButton.setText(ProvUIMessages.RepositoryGroup_ArchivedRepoBrowseButton);
-		archiveButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent event) {
-				FileDialog dialog = new FileDialog(getShell(), SWT.APPLICATION_MODAL);
-				dialog.setText(ProvUIMessages.RepositoryGroup_RepositoryFile);
-				dialog.setFilterExtensions(ARCHIVE_EXTENSIONS);
-				dialog.setFileName(lastArchiveLocation);
-				String path = dialog.open();
-				if (path != null) {
-					lastArchiveLocation = path;
-					url.setText(makeLocalURIString(path));
-					validateRepositoryURL(false);
-				}
-			}
-		});
-		setButtonLayoutData(archiveButton);
-		comp.setTabList(new Control[] {nickname, url, localButton, archiveButton});
-		Dialog.applyDialogFont(comp);
-		return comp;
-	}
-
-	String makeLocalURIString(String path) {
-		try {
-			URI localURI = URIUtil.fromString(path);
-			return URIUtil.toUnencodedString(RepositoryHelper.localRepoURIHelper(localURI));
-		} catch (URISyntaxException e) {
-			return path;
-		}
-	}
-
-	protected boolean handleOk() {
-		IStatus status = addRepository();
-		return status.isOK();
-	}
-
-	/**
-	 * Get the location of the repository that was added by this dialog.  Return <code>null</code>
-	 * if the dialog has not yet added a repository location.
-	 * 
-	 * @return the location of the repository that has been added by this dialog, or <code>null</code>
-	 * if no repository has been added.
-	 */
-	public URI getAddedLocation() {
-		return addedLocation;
-	}
-
-	protected IStatus addRepository() {
-		IStatus status = validateRepositoryURL(false);
-		if (status.isOK()) {
-			addedLocation = getUserLocation();
-			AddRepositoryOperation op = getOperation(addedLocation);
-			String nick = nickname.getText().trim();
-			if (nick.length() > 0)
-				op.setNicknames(new String[] {nick});
-			ProvisioningOperationRunner.schedule(op, StatusManager.SHOW | StatusManager.LOG);
-		}
-		return status;
-	}
-
-	/**
-	 * Get an add operation appropriate for this dialog.  The default behavior
-	 * is to retrieve it from the policy, but subclasses may override.
-	 * 
-	 * @param repositoryLocation to be added
-	 * @return the add operation
-	 */
-	protected AddRepositoryOperation getOperation(URI repositoryLocation) {
-		return getRepositoryManipulator().getAddOperation(repositoryLocation);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java
deleted file mode 100644
index 8b65ee2..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/AvailableIUGroup.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.net.URI;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An AvailableIUGroup is a reusable UI component that displays the
- * IU's available for installation.  By default, content from all available
- * repositories is shown.
- * 
- * @since 3.4
- */
-public class AvailableIUGroup extends StructuredIUGroup {
-
-	/**
-	 * Show contents from all repositories
-	 */
-	public static final int AVAILABLE_ALL = 1;
-
-	/**
-	 * Don't show any repository content
-	 */
-	public static final int AVAILABLE_NONE = 2;
-
-	/**
-	 * Show local repository content
-	 */
-	public static final int AVAILABLE_LOCAL = 3;
-
-	/**
-	 * Show content for a specific repository
-	 */
-	public static final int AVAILABLE_SPECIFIED = 4;
-
-	QueryableMetadataRepositoryManager queryableManager;
-
-	IUViewQueryContext queryContext;
-	int filterConstant = AVAILABLE_ALL;
-	URI repositoryFilter;
-	// We restrict the type of the filter used because PatternFilter does
-	// unnecessary accesses of children that cause problems with the deferred
-	// tree.
-	AvailableIUPatternFilter filter;
-	private boolean useBold = false;
-	private IUDetailsLabelProvider labelProvider;
-	Display display;
-	DelayedFilterCheckboxTree filteredTree;
-	Job lastRequestedLoadJob;
-
-	/**
-	 * Create a group that represents the available IU's from all available
-	 * repositories.  The default policy controls the visibility flags for
-	 * repositories and IU's.
-	 * 
-	 * @param parent the parent composite for the group
-	 */
-	public AvailableIUGroup(final Composite parent) {
-		this(Policy.getDefault(), parent, parent.getFont(), null, null, ProvUI.getIUColumnConfig(), AVAILABLE_ALL);
-	}
-
-	/**
-	 * Create a group that represents the available IU's.
-	 * 
-	 * @param policy the policy to use for deciding what should be shown
-	 * @param parent the parent composite for the group
-	 * @param font The font to use for calculating pixel sizes.  This font is
-	 * not managed by the receiver.
-	 * @param queryable the queryable repository manager that should be used.  Used
-	 * by clients who want to preload repositories.
-	 * @param queryContext the IUViewQueryContext that determines additional
-	 * information about what is shown, such as the visible repositories
-	 * @param columnConfig the description of the columns that should be shown.  If <code>null</code>, a default
-	 * will be used.
-	 * @param filterConstant a constant specifying which repositories are used when showing content
-	 */
-	public AvailableIUGroup(Policy policy, final Composite parent, Font font, QueryableMetadataRepositoryManager queryable, IUViewQueryContext queryContext, IUColumnConfig[] columnConfig, int filterConstant) {
-		super(policy, parent, font, columnConfig);
-		this.display = parent.getDisplay();
-		if (queryContext == null)
-			this.queryContext = policy.getQueryContext();
-		else
-			this.queryContext = queryContext;
-		if (queryable == null)
-			this.queryableManager = new QueryableMetadataRepositoryManager(this.queryContext, false);
-		else
-			this.queryableManager = queryable;
-		this.filterConstant = filterConstant;
-		this.filter = new AvailableIUPatternFilter(getColumnConfig());
-		createGroupComposite(parent);
-	}
-
-	protected StructuredViewer createViewer(Composite parent) {
-		// Table of available IU's
-		filteredTree = new DelayedFilterCheckboxTree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filter);
-		final TreeViewer availableIUViewer = filteredTree.getViewer();
-
-		// If the user expanded or collapsed anything while we were loading a repo
-		// in the background, we would not want to disrupt their work by making
-		// a newly loaded visible and expanding it.  Setting the load job to null 
-		// will take care of this.
-		availableIUViewer.getTree().addTreeListener(new TreeListener() {
-			public void treeCollapsed(TreeEvent e) {
-				lastRequestedLoadJob = null;
-			}
-
-			public void treeExpanded(TreeEvent e) {
-				lastRequestedLoadJob = null;
-			}
-		});
-
-		labelProvider = new IUDetailsLabelProvider(filteredTree, getColumnConfig(), getShell());
-		labelProvider.setUseBoldFontForFilteredItems(useBold);
-		labelProvider.setToolTipProperty(IInstallableUnit.PROP_DESCRIPTION);
-
-		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
-		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
-		comparator.useColumnConfig(getColumnConfig());
-		availableIUViewer.setComparator(comparator);
-		availableIUViewer.setComparer(new ProvElementComparer());
-
-		// Now the content provider.
-		DeferredQueryContentProvider contentProvider = new DeferredQueryContentProvider();
-		availableIUViewer.setContentProvider(contentProvider);
-
-		// Now the presentation, columns before label provider.
-		setTreeColumns(availableIUViewer.getTree());
-		availableIUViewer.setLabelProvider(labelProvider);
-
-		// Notify the filtered tree so that it can hook listeners on the
-		// content provider.  This is needed so that filtering is only allowed
-		// after content has been retrieved.
-		filteredTree.contentProviderSet(contentProvider);
-
-		final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(availableIUViewer, StructuredViewerProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
-			protected void repositoryAdded(final RepositoryEvent event) {
-				// Only make the repo visible if the UI triggered this event.
-				// This allows us to ignore the addition of system repositories, as
-				// well as recognize specifically a user-add that resulted in
-				// the enablement of a repository.  
-				// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=248989
-				if (!(event instanceof UIRepositoryEvent)) {
-					return;
-				}
-				makeRepositoryVisible(event.getRepositoryLocation());
-			}
-
-			protected void refreshViewer() {
-				final TreeViewer treeViewer = filteredTree.getViewer();
-				final Tree tree = treeViewer.getTree();
-				IWorkbench workbench = PlatformUI.getWorkbench();
-				if (workbench.isClosing())
-					return;
-				if (tree != null && !tree.isDisposed()) {
-					updateAvailableViewState();
-				}
-
-			}
-		};
-		ProvUIActivator.getDefault().addProvisioningListener(listener);
-
-		availableIUViewer.getControl().addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-				ProvUIActivator.getDefault().removeProvisioningListener(listener);
-			}
-		});
-		updateAvailableViewState();
-		return availableIUViewer;
-	}
-
-	private void setTreeColumns(Tree tree) {
-		tree.setHeaderVisible(true);
-
-		IUColumnConfig[] cols = getColumnConfig();
-		for (int i = 0; i < cols.length; i++) {
-			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
-			tc.setResizable(true);
-			tc.setText(cols[i].columnTitle);
-			tc.setWidth(cols[i].getWidth());
-		}
-	}
-
-	Object getNewInput() {
-		if (repositoryFilter != null) {
-			return new MetadataRepositoryElement(queryContext, getPolicy(), repositoryFilter, true);
-		} else if (filterConstant == AVAILABLE_NONE) {
-			// Dummy object that explains empty site list
-			return new ProvElement(null) {
-				public Object[] getChildren(Object o) {
-					String description;
-					String name;
-					int severity;
-					if (getPolicy().getRepositoryManipulator() == null) {
-						// shouldn't get here ideally.  No sites and no way to add.
-						severity = IStatus.ERROR;
-						name = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredExplanation;
-						description = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredDescription;
-					} else {
-						severity = IStatus.INFO;
-						name = ProvUIMessages.AvailableIUGroup_NoSitesExplanation;
-						description = ProvUIMessages.ColocatedRepositoryManipulator_NoContentExplanation;
-					}
-					return new Object[] {new EmptyElementExplanation(null, severity, name, description)};
-				}
-
-				public String getLabel(Object o) {
-					// Label not needed for input
-					return null;
-				}
-			};
-		} else {
-			queryableManager.setQueryContext(queryContext);
-			return new MetadataRepositories(queryContext, getPolicy(), queryableManager);
-		}
-	}
-
-	/**
-	 * Set a boolean indicating whether a bold font should be used when
-	 * showing filtered items.  This method does not refresh the tree or 
-	 * labels, so that must be done explicitly by the caller.
-	 * @param useBoldFont
-	 */
-	public void setUseBoldFontForFilteredItems(boolean useBoldFont) {
-		if (labelProvider != null)
-			labelProvider.setUseBoldFontForFilteredItems(useBoldFont);
-	}
-
-	/**
-	 * Return the composite that contains the controls in this group.
-	 * @return the composite
-	 */
-	public Composite getComposite() {
-		return super.getComposite();
-	}
-
-	/**
-	 * Get the viewer used to represent the available IU's
-	 * @return the viewer
-	 */
-	public StructuredViewer getStructuredViewer() {
-		return super.getStructuredViewer();
-	}
-
-	/**
-	 * Get the selected IU's
-	 * @return the array of selected IU's
-	 */
-	// overridden for visibility in the public package
-	public IInstallableUnit[] getSelectedIUs() {
-		return super.getSelectedIUs();
-	}
-
-	// overridden to weed out non-IU elements, such as repositories or empty explanations
-	public Object[] getSelectedIUElements() {
-		Object[] elements = ((IStructuredSelection) viewer.getSelection()).toArray();
-		ArrayList list = new ArrayList(elements.length);
-		for (int i = 0; i < elements.length; i++)
-			if (ElementUtils.getIU(elements[i]) != null)
-				list.add(elements[i]);
-		return list.toArray();
-	}
-
-	public CheckboxTreeViewer getCheckboxTreeViewer() {
-		return filteredTree.getCheckboxTreeViewer();
-	}
-
-	/**
-	 * Get the selected IU's
-	 * @return the array of checked IU's
-	 */
-	public IInstallableUnit[] getCheckedLeafIUs() {
-		Object[] selections = filteredTree.getCheckboxTreeViewer().getCheckedElements();
-		if (selections.length == 0)
-			return new IInstallableUnit[0];
-		ArrayList leaves = new ArrayList(selections.length);
-		for (int i = 0; i < selections.length; i++) {
-			if (!getCheckboxTreeViewer().getGrayed(selections[i])) {
-				IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(selections[i], IInstallableUnit.class);
-				if (iu != null && !ProvisioningUtil.isCategory(iu) && !leaves.contains(iu))
-					leaves.add(iu);
-			}
-		}
-		return (IInstallableUnit[]) leaves.toArray(new IInstallableUnit[leaves.size()]);
-	}
-
-	public Tree getTree() {
-		if (viewer == null)
-			return null;
-		return ((TreeViewer) viewer).getTree();
-	}
-
-	/*
-	 * Make the repository with the specified location visible in the viewer.
-	 */
-	void makeRepositoryVisible(final URI location) {
-		// If we are viewing by anything other than site, there is no specific way
-		// to make a repo visible. 
-		if (!(queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO))
-			return;
-		// First reset the input so that the new repo shows up
-		display.asyncExec(new Runnable() {
-			public void run() {
-				final TreeViewer treeViewer = filteredTree.getViewer();
-				final Tree tree = treeViewer.getTree();
-				IWorkbench workbench = PlatformUI.getWorkbench();
-				if (workbench.isClosing())
-					return;
-				if (tree != null && !tree.isDisposed()) {
-					updateAvailableViewState();
-				}
-			}
-		});
-
-		// We don't know if loading will be a fast or slow operation.
-		// We do it in a job to be safe, and when it's done, we update
-		// the UI.
-		Job job = new Job(NLS.bind(ProvUIMessages.AvailableIUGroup_LoadingRepository, URIUtil.toUnencodedString(location))) {
-			protected IStatus run(IProgressMonitor monitor) {
-				try {
-					ProvisioningUtil.loadMetadataRepository(location, monitor);
-					return Status.OK_STATUS;
-				} catch (ProvisionException e) {
-					return e.getStatus();
-				} catch (OperationCanceledException e) {
-					return Status.CANCEL_STATUS;
-				}
-			}
-		};
-		job.setPriority(Job.LONG);
-		job.setSystem(true);
-		job.setUser(false);
-		job.addJobChangeListener(new JobChangeAdapter() {
-			public void done(final IJobChangeEvent event) {
-				if (event.getResult().isOK())
-					display.asyncExec(new Runnable() {
-						public void run() {
-							final TreeViewer treeViewer = filteredTree.getViewer();
-							IWorkbench workbench = PlatformUI.getWorkbench();
-							if (workbench.isClosing())
-								return;
-							// Expand only if there have been no other jobs started for other repos.
-							if (event.getJob() == lastRequestedLoadJob) {
-								final Tree tree = treeViewer.getTree();
-								if (tree != null && !tree.isDisposed()) {
-									TreeItem[] items = tree.getItems();
-									for (int i = 0; i < items.length; i++) {
-										if (items[i].getData() instanceof IRepositoryElement) {
-											URI url = ((IRepositoryElement) items[i].getData()).getLocation();
-											if (url.equals(location)) {
-												treeViewer.expandToLevel(items[i].getData(), AbstractTreeViewer.ALL_LEVELS);
-												tree.select(items[i]);
-												return;
-											}
-										}
-									}
-								}
-							}
-						}
-					});
-			}
-		});
-		lastRequestedLoadJob = job;
-		job.schedule();
-	}
-
-	public void updateAvailableViewState() {
-		if (getTree() == null || getTree().isDisposed())
-			return;
-		final Composite parent = getComposite().getParent();
-		setUseBoldFontForFilteredItems(queryContext.getViewType() != IUViewQueryContext.AVAILABLE_VIEW_FLAT);
-
-		BusyIndicator.showWhile(display, new Runnable() {
-			public void run() {
-				parent.setRedraw(false);
-				getCheckboxTreeViewer().setInput(getNewInput());
-				parent.layout(true);
-				parent.setRedraw(true);
-			}
-		});
-	}
-
-	public Control getDefaultFocusControl() {
-		if (filteredTree != null)
-			return filteredTree.getFilterControl();
-		return null;
-	}
-
-	protected GridData getViewerGridData() {
-		GridData data = super.getViewerGridData();
-		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
-		return data;
-	}
-
-	/**
-	 * Set the checked elements to the specified selections.  This method
-	 * does not force visibility/expansion of the checked elements.  If they are not
-	 * visible, they will not be checked.
-	 * @param selections
-	 */
-	public void setChecked(Object[] selections) {
-		filteredTree.getCheckboxTreeViewer().setCheckedElements(selections);
-		// Relying on knowledge that DelayedFilterCheckbox doesn't care which element is in the listener
-		Object element = selections.length > 0 ? selections[0] : new Object();
-		filteredTree.getCheckboxTreeViewer().fireCheckStateChanged(element, true);
-	}
-
-	public void setRepositoryFilter(int filterFlag, URI repoLocation) {
-		// If there has been no change, don't do anything.  We will be
-		// clearing out selection caches in this method and should not do
-		// so if there's really no change.
-		if (filterConstant == filterFlag) {
-			if (filterConstant != AVAILABLE_SPECIFIED)
-				return;
-			if (repoLocation != null && repoLocation.equals(repositoryFilter))
-				return;
-		}
-		filterConstant = filterFlag;
-
-		switch (filterFlag) {
-			case AVAILABLE_ALL :
-			case AVAILABLE_NONE :
-				repositoryFilter = null;
-				queryContext.setMetadataRepositoryFlags(queryContext.getMetadataRepositoryFlags() & ~IRepositoryManager.REPOSITORIES_LOCAL);
-				break;
-			case AVAILABLE_LOCAL :
-				repositoryFilter = null;
-				queryContext.setMetadataRepositoryFlags(queryContext.getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_LOCAL);
-				break;
-			default :
-				repositoryFilter = repoLocation;
-				break;
-		}
-		updateAvailableViewState();
-		filteredTree.clearCheckStateCache();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IRepositorySelectionListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IRepositorySelectionListener.java
deleted file mode 100644
index acbcdfa..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IRepositorySelectionListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.net.URI;
-
-/**
- * Listener for the repository selection combo.  Whenever the selected repository changes (menu selection, 
- * text modified, new repo added) this listener will be notified.
- * 
- * @since 3.5
- */
-public interface IRepositorySelectionListener {
-	/**
-	 * Called whenever the selected repository in the combo changes.
-	 * 
-	 * @param repoChoice one of AvailableIUGroup.AVAILABLE_NONE, AvailableIUGroup.AVAILABLE_ALL, AvailableIUGroup.AVAILABLE_LOCAL, AvailableIUGroup.AVAILABLE_SPECIFIED  
-	 * @param repoLocation if the repoChoice is set to AvailableIUGroup.AVAILABLE_SPECIFIED, this field will contain the URI of the selected repo, otherwise <code>null</code>
-	 */
-	public void repositorySelectionChanged(int repoChoice, URI repoLocation);
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java
deleted file mode 100644
index e53b5cf..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUCopyrightPropertyPage.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.net.MalformedURLException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.IUPropertyPage;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ICopyright;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's copyright
- * 
- * @since 3.4
- */
-public class IUCopyrightPropertyPage extends IUPropertyPage {
-
-	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
-		// Get the copyright in the current locale
-		final ICopyright copyright = IUPropertyUtils.getCopyright(iu);
-		if (copyright != null && copyright.getBody().length() > 0) {
-			Composite composite = new Composite(parent, SWT.NONE);
-			GridLayout layout = new GridLayout();
-			layout.marginWidth = 0;
-			layout.marginHeight = 0;
-			composite.setLayout(layout);
-
-			Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, false, true);
-			gd.widthHint = computeWidthLimit(text, 80);
-			gd.grabExcessVerticalSpace = true;
-			text.setLayoutData(gd);
-			text.setText(copyright.getBody());
-			text.setEditable(false);
-
-			// If an URL was specified, provide a link to it
-			String filename = (copyright.getLocation() != null) ? copyright.getLocation().getPath() : null;
-			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
-				Label label = new Label(composite, SWT.NONE);
-				label.setText(ProvUIMessages.IUCopyrightPropertyPage_ViewLinkLabel);
-				// Create a link to the copyright URL
-				Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
-				link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(copyright.getLocation()))); //$NON-NLS-1$
-				gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
-				gd.widthHint = computeWidthLimit(link, 80);
-				link.setLayoutData(gd);
-				link.addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						try {
-							showURL(copyright.getLocation().toURL());
-						} catch (MalformedURLException e1) {
-							//cannot show this URL
-						}
-					}
-				});
-			}
-
-			return composite;
-		}
-		Label label = new Label(parent, SWT.NULL);
-		label.setText(ProvUIMessages.IUCopyrightPropertyPage_NoCopyright);
-		return label;
-
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUGeneralInfoPropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
deleted file mode 100644
index adafc76..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.IUPropertyPage;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's properties
- * 
- * @since 3.4
- */
-public class IUGeneralInfoPropertyPage extends IUPropertyPage {
-
-	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-
-		createGeneralSection(composite, iu);
-		createDescriptionSection(composite, iu);
-		createDocumentationSection(composite, iu);
-
-		return composite;
-	}
-
-	private void createGeneralSection(Composite parent, IInstallableUnit iu) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		// Get general info in the default locale
-		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_NameLabel, IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME));
-		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_IdentifierLabel, iu.getId());
-		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_VersionLabel, iu.getVersion().toString());
-		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ProviderLabel, IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER));
-		addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ContactLabel, IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_CONTACT));
-
-	}
-
-	private void createDescriptionSection(Composite parent, IInstallableUnit iu) {
-		// Get the iu description in the default locale
-		String description = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION);
-		if (description != null && description.length() > 0) {
-			Group group = new Group(parent, SWT.NONE);
-			group.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DescriptionLabel);
-			group.setLayout(new GridLayout());
-			group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
-			Text text = new Text(group, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-			gd.widthHint = computeWidthLimit(text, 80);
-			gd.heightHint = 200;
-			text.setEditable(false);
-			text.setText(description);
-			text.setLayoutData(gd);
-		}
-
-	}
-
-	private void createDocumentationSection(Composite parent, IInstallableUnit iu) {
-		String docURL = iu.getProperty(IInstallableUnit.PROP_DOC_URL);
-		if (docURL != null && docURL.length() > 0) {
-			final URL url;
-			try {
-				url = new URL(docURL);
-			} catch (MalformedURLException e) {
-				return;
-			}
-			String filename = (url != null) ? url.getFile() : null;
-			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
-				// create some space
-				new Label(parent, SWT.NONE);
-				// Now create a link to the documentation
-				Label label = new Label(parent, SWT.NONE);
-				label.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DocumentationLink);
-				Link link = new Link(parent, SWT.LEFT | SWT.WRAP);
-				link.setText(NLS.bind("<a>{0}</a>", url.toExternalForm())); //$NON-NLS-1$
-				GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
-				gd.widthHint = computeWidthLimit(link, 80);
-				link.setLayoutData(gd);
-				link.addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						showURL(url);
-					}
-				});
-			}
-		}
-	}
-
-	private void addField(Composite parent, String property, String value) {
-
-		if (value != null && value.length() > 0) {
-			Label label = new Label(parent, SWT.NONE);
-			label.setText(property);
-
-			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
-			text.setText(getEscapedString(value));
-			// Needed to get the right color on the Mac.
-			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258112
-			text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-			text.setLayoutData(gd);
-		}
-	}
-
-	private String getEscapedString(String value) {
-		StringBuffer result = new StringBuffer(value.length() + 10);
-		for (int i = 0; i < value.length(); ++i) {
-			char c = value.charAt(i);
-			if ('&' == c) {
-				result.append("&&"); //$NON-NLS-1$
-			} else {
-				result.append(c);
-			}
-		}
-		return result.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java
deleted file mode 100644
index 01d0646..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/IULicensePropertyPage.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.IUPropertyPage;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.ILicense;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's license
- * 
- * @since 3.4
- */
-public class IULicensePropertyPage extends IUPropertyPage {
-
-	protected Control createIUPage(Composite parent, IInstallableUnit iu) {
-		// Get the license in the default locale
-		final ILicense license = IUPropertyUtils.getLicense(iu);
-		if (license != null && license.getBody().length() > 0) {
-			Composite composite = new Composite(parent, SWT.NONE);
-			GridLayout layout = new GridLayout();
-			layout.marginWidth = 0;
-			layout.marginHeight = 0;
-			composite.setLayout(layout);
-
-			Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-			gd.widthHint = computeWidthLimit(text, 80);
-			gd.heightHint = computeHeightLimit(text, 20);
-			text.setLayoutData(gd);
-			text.setText(license.getBody());
-			text.setEditable(false);
-
-			// If an URL was specified, provide a link to it
-			String filename = (license.getLocation() != null) ? license.getLocation().getPath() : null;
-			if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
-				Label label = new Label(composite, SWT.NONE);
-				label.setText(ProvUIMessages.IULicensePropertyPage_ViewLicenseLabel);
-				// Create a link to the license URL
-				Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
-				link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(license.getLocation()))); //$NON-NLS-1$
-				gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
-				gd.widthHint = computeWidthLimit(link, 80);
-				link.setLayoutData(gd);
-				link.addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						try {
-							showURL(license.getLocation().toURL());
-						} catch (Exception e1) {
-							//can't browse invalid location
-						}
-					}
-				});
-			}
-
-			return composite;
-		}
-		Label label = new Label(parent, SWT.NULL);
-		label.setText(ProvUIMessages.IULicensePropertyPage_NoLicense);
-		return label;
-
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java
deleted file mode 100644
index c9df0ee..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstallWizard.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * An install wizard that allows the users to browse all of the repositories
- * and search/select for items to install.
- * 
- * @since 3.4
- */
-public class InstallWizard extends WizardWithLicenses {
-
-	QueryableMetadataRepositoryManager manager;
-	AvailableIUsPage mainPage;
-	SelectableIUsPage errorReportingPage;
-
-	public InstallWizard(Policy policy, String profileId, IInstallableUnit[] initialSelections, PlannerResolutionOperation initialResolution, QueryableMetadataRepositoryManager manager) {
-		super(policy, profileId, null, initialSelections, initialResolution);
-		this.manager = manager;
-		setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
-		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
-	}
-
-	public InstallWizard(Policy policy, String profileId) {
-		this(policy, profileId, null, null, new QueryableMetadataRepositoryManager(policy.getQueryContext(), false));
-	}
-
-	protected ResolutionResultsWizardPage createResolutionPage() {
-		return new InstallWizardPage(policy, profileId, root, resolutionOperation);
-	}
-
-	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
-		mainPage = new AvailableIUsPage(policy, profileId, manager);
-		if (selections != null && selections.length > 0)
-			mainPage.setCheckedElements(selections);
-		return mainPage;
-
-	}
-
-	protected IUElementListRoot makeResolutionElementRoot(Object[] selectedElements) {
-		IUElementListRoot elementRoot = new IUElementListRoot();
-		ArrayList list = new ArrayList(selectedElements.length);
-		for (int i = 0; i < selectedElements.length; i++) {
-			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
-			if (iu != null)
-				list.add(new AvailableIUElement(elementRoot, iu, profileId, policy.getQueryContext().getShowProvisioningPlanChildren()));
-		}
-		elementRoot.setChildren(list.toArray());
-		return elementRoot;
-	}
-
-	public void createPageControls(Composite pageContainer) {
-		super.createPageControls(pageContainer);
-		if (manager != null)
-			// async exec since we are in the middle of opening
-			pageContainer.getDisplay().asyncExec(new Runnable() {
-				public void run() {
-					manager.reportAccumulatedStatus();
-				}
-			});
-	}
-
-	protected ProvisioningContext getProvisioningContext() {
-		return mainPage.getProvisioningContext();
-	}
-
-	protected ProfileChangeRequest computeProfileChangeRequest(Object[] selectedElements, MultiStatus additionalStatus, IProgressMonitor monitor) {
-		IInstallableUnit[] selected = ElementUtils.elementsToIUs(selectedElements);
-		return InstallAction.computeProfileChangeRequest(selected, profileId, additionalStatus, monitor);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
-	 */
-	protected IResolutionErrorReportingPage getErrorReportingPage() {
-		if (errorReportingPage == null) {
-			originalRoot = root;
-			errorReportingPage = new SelectableIUsPage(policy, root, root.getChildren(root), profileId);
-			errorReportingPage.setTitle(ProvUIMessages.InstallWizardPage_Title);
-			errorReportingPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
-			errorReportingPage.updateStatus(root, resolutionOperation);
-			errorReportingPage.setCheckedElements(root.getChildren(root));
-			addPage(errorReportingPage);
-		}
-		return errorReportingPage;
-	}
-
-	protected void showingErrorPage() {
-		// If we did a new resolution and are showing the error page,
-		// update the root.  We don't do this when the page is not the main
-		// page, or we might be updating the root of the showing page.
-		if (getContainer().getCurrentPage() == mainPage) {
-			originalRoot = root;
-			errorReportingPage.updateStatus(originalRoot, resolutionOperation);
-			errorReportingPage.setCheckedElements(root.getChildren(root));
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.wizard.Wizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
-	 */
-	public IWizardPage getPreviousPage(IWizardPage page) {
-		if (page == errorReportingPage) {
-			mainPage.setCheckedElements(errorReportingPage.getCheckedIUElements());
-			return mainPage;
-		}
-		return super.getPreviousPage(page);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledIUGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledIUGroup.java
deleted file mode 100644
index 4ffe332..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledIUGroup.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.dialogs.StructuredIUGroup;
-import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An InstalledIUGroup is a reusable UI component that displays the
- * IU's in a given profile.
- * 
- * @since 3.4
- */
-public class InstalledIUGroup extends StructuredIUGroup {
-
-	private String profileId;
-
-	/**
-	 * Create a group that represents the installed IU's.
-	 * 
-	 * @param parent the parent composite for the group
-	 * @param font The font to use for calculating pixel sizes.  This font is
-	 * not managed by the receiver.
-	 * @param profileId the id of the profile whose content is being shown.
-	 * @param columnConfig the columns to be shown
-	 */
-	public InstalledIUGroup(Policy policy, final Composite parent, Font font, String profileId, IUColumnConfig[] columnConfig) {
-		super(policy, parent, font, columnConfig);
-		if (profileId == null)
-			this.profileId = policy.getProfileChooser().getProfileId(ProvUI.getDefaultParentShell());
-		else
-			this.profileId = profileId;
-		createGroupComposite(parent);
-	}
-
-	protected StructuredViewer createViewer(Composite parent) {
-		// Table of installed IU's
-		TreeViewer installedIUViewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
-		// Filters and sorters before establishing content, so we don't refresh unnecessarily.
-		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
-		comparator.useColumnConfig(getColumnConfig());
-		installedIUViewer.setComparator(comparator);
-		installedIUViewer.setComparer(new ProvElementComparer());
-
-		// Now the content.
-		installedIUViewer.setContentProvider(new DeferredQueryContentProvider());
-
-		// Now the visuals, columns before labels.
-		setTreeColumns(installedIUViewer.getTree());
-		installedIUViewer.setLabelProvider(new IUDetailsLabelProvider(null, getColumnConfig(), null));
-
-		// Input last.
-		installedIUViewer.setInput(getInput());
-
-		final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(installedIUViewer, StructuredViewerProvisioningListener.PROV_EVENT_IU | StructuredViewerProvisioningListener.PROV_EVENT_PROFILE);
-		ProvUIActivator.getDefault().addProvisioningListener(listener);
-		installedIUViewer.getControl().addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-				ProvUIActivator.getDefault().removeProvisioningListener(listener);
-			}
-		});
-		return installedIUViewer;
-	}
-
-	private void setTreeColumns(Tree tree) {
-		IUColumnConfig[] columns = getColumnConfig();
-		tree.setHeaderVisible(true);
-
-		for (int i = 0; i < columns.length; i++) {
-			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
-			tc.setResizable(true);
-			tc.setText(columns[i].columnTitle);
-			tc.setWidth(convertHorizontalDLUsToPixels(columns[i].defaultColumnWidth));
-		}
-	}
-
-	Object getInput() {
-		ProfileElement element = new ProfileElement(null, profileId);
-		return element;
-	}
-
-	/**
-	 * Get the viewer used to represent the installed IU's
-	 */
-	public StructuredViewer getStructuredViewer() {
-		return super.getStructuredViewer();
-	}
-
-	public Control getDefaultFocusControl() {
-		return super.getDefaultFocusControl();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledSoftwarePage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledSoftwarePage.java
deleted file mode 100644
index cffd86e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/InstalledSoftwarePage.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.about.InstallationPage;
-import org.eclipse.ui.menus.AbstractContributionFactory;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- *
- */
-public class InstalledSoftwarePage extends InstallationPage implements ICopyable {
-
-	private static final int DEFAULT_WIDTH = 300;
-	private static final int DEFAULT_COLUMN_WIDTH = 150;
-	private static final int UPDATE_ID = IDialogConstants.CLIENT_ID;
-	private static final int UNINSTALL_ID = IDialogConstants.CLIENT_ID + 1;
-	private static final int PROPERTIES_ID = IDialogConstants.CLIENT_ID + 2;
-	private static final String BUTTON_ACTION = "org.eclipse.equinox.p2.ui.buttonAction"; //$NON-NLS-1$
-
-	AbstractContributionFactory factory;
-	Text detailsArea;
-	InstalledIUGroup installedIUGroup;
-	String profileId;
-	Button updateButton, uninstallButton, propertiesButton;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
-	 */
-	public void createControl(Composite parent) {
-		initializeDialogUnits(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.INSTALLED_SOFTWARE);
-
-		profileId = Policy.getDefault().getProfileChooser().getProfileId(ProvUI.getDefaultParentShell());
-		if (profileId == null) {
-			IStatus status = Policy.getDefault().getNoProfileChosenStatus();
-			if (status != null)
-				ProvUI.reportStatus(status, StatusManager.LOG);
-			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
-			text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-			text.setText(ProvUIMessages.InstalledSoftwarePage_NoProfile);
-			setControl(text);
-			return;
-		}
-
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-		gd.widthHint = convertHorizontalDLUsToPixels(DEFAULT_WIDTH);
-		composite.setLayoutData(gd);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-
-		// Table of installed IU's
-		installedIUGroup = new InstalledIUGroup(Policy.getDefault(), composite, JFaceResources.getDialogFont(), profileId, getColumnConfig());
-		// we hook selection listeners on the viewer in createPageButtons because we
-		// rely on the actions we create there getting selection events before we use
-		// them to update button enablement.
-
-		CopyUtils.activateCopy(this, installedIUGroup.getStructuredViewer().getControl());
-
-		gd = new GridData(SWT.FILL, SWT.FILL, true, false);
-		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_DESCRIPTION_HEIGHT);
-		gd.widthHint = convertHorizontalDLUsToPixels(DEFAULT_WIDTH);
-
-		detailsArea = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY | SWT.WRAP);
-		detailsArea.setBackground(detailsArea.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
-		detailsArea.setLayoutData(gd);
-
-		setControl(composite);
-	}
-
-	public void createPageButtons(Composite parent) {
-		if (profileId == null)
-			return;
-		// For the update action, we create a custom selection provider that will interpret no
-		// selection as checking for updates to everything.
-		// We also override the run method to close the containing dialog
-		// if we successfully try to resolve.  This is done to ensure that progress
-		// is shown properly.
-		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
-		UpdateAction updateAction = new UpdateAction(Policy.getDefault(), new ISelectionProvider() {
-			public void addSelectionChangedListener(ISelectionChangedListener listener) {
-				installedIUGroup.getStructuredViewer().addSelectionChangedListener(listener);
-			}
-
-			public ISelection getSelection() {
-				StructuredViewer viewer = installedIUGroup.getStructuredViewer();
-				ISelection selection = viewer.getSelection();
-				if (selection.isEmpty()) {
-					final Object[] all = ((IStructuredContentProvider) viewer.getContentProvider()).getElements(viewer.getInput());
-					return new StructuredSelection(all);
-				}
-				return selection;
-			}
-
-			public void removeSelectionChangedListener(ISelectionChangedListener listener) {
-				installedIUGroup.getStructuredViewer().removeSelectionChangedListener(listener);
-			}
-
-			public void setSelection(ISelection selection) {
-				installedIUGroup.getStructuredViewer().setSelection(selection);
-			}
-		}, profileId, true) {
-			public void run() {
-				super.run();
-				if (getReturnCode() == Window.OK)
-					getPageContainer().closeModalContainers();
-			}
-		};
-		updateAction.setSkipSelectionPage(true);
-		updateButton = createButton(parent, UPDATE_ID, updateAction.getText());
-		updateButton.setData(BUTTON_ACTION, updateAction);
-		// Uninstall action
-		Action uninstallAction = new UninstallAction(Policy.getDefault(), installedIUGroup.getStructuredViewer(), profileId) {
-			public void run() {
-				super.run();
-				if (getReturnCode() == Window.OK)
-					getPageContainer().closeModalContainers();
-			}
-		};
-		uninstallButton = createButton(parent, UNINSTALL_ID, uninstallAction.getText());
-		uninstallButton.setData(BUTTON_ACTION, uninstallAction);
-
-		// Properties action
-		PropertyDialogAction action = new PropertyDialogAction(new SameShellProvider(getShell()), installedIUGroup.getStructuredViewer());
-		propertiesButton = createButton(parent, PROPERTIES_ID, action.getText());
-		propertiesButton.setData(BUTTON_ACTION, action);
-
-		// We rely on the actions getting selection events before we do, because
-		// we rely on the enablement state of the action.  So we don't hook
-		// the selection listener on our table until after actions are created.
-		installedIUGroup.getStructuredViewer().addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				updateDetailsArea();
-				updateEnablement();
-			}
-
-		});
-
-		updateEnablement();
-	}
-
-	void updateDetailsArea() {
-		IInstallableUnit[] selected = installedIUGroup.getSelectedIUs();
-		if (selected.length == 1) {
-			String description = IUPropertyUtils.getIUProperty(selected[0], IInstallableUnit.PROP_DESCRIPTION);
-			if (description != null) {
-				detailsArea.setText(description);
-				return;
-			}
-		}
-		detailsArea.setText(""); //$NON-NLS-1$
-	}
-
-	void updateEnablement() {
-		if (updateButton == null || updateButton.isDisposed())
-			return;
-		Button[] buttons = {updateButton, uninstallButton, propertiesButton};
-		for (int i = 0; i < buttons.length; i++) {
-			Action action = (Action) buttons[i].getData(BUTTON_ACTION);
-			if (action == null || !action.isEnabled())
-				buttons[i].setEnabled(false);
-			else
-				buttons[i].setEnabled(true);
-		}
-	}
-
-	private IUColumnConfig[] getColumnConfig() {
-		int pixels = convertHorizontalDLUsToPixels(DEFAULT_COLUMN_WIDTH);
-		return new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, pixels), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, pixels / 3), new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, pixels * 2 / 3)};
-
-	}
-
-	public void copyToClipboard(Control activeControl) {
-		Object[] elements = installedIUGroup.getSelectedIUElements();
-		if (elements.length == 0)
-			return;
-		String text = CopyUtils.getIndentedClipboardText(elements, new IUDetailsLabelProvider(null, getColumnConfig(), null));
-		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
-		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
-		clipboard.dispose();
-	}
-
-	protected void buttonPressed(int buttonId) {
-		switch (buttonId) {
-			case UPDATE_ID :
-				((Action) updateButton.getData(BUTTON_ACTION)).run();
-				break;
-			case UNINSTALL_ID :
-				((Action) uninstallButton.getData(BUTTON_ACTION)).run();
-				break;
-			case PROPERTIES_ID :
-				((Action) propertiesButton.getData(BUTTON_ACTION)).run();
-				break;
-			default :
-				super.buttonPressed(buttonId);
-				break;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java
deleted file mode 100644
index d9db111..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/PreselectedIUInstallWizard.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-
-/**
- * An Install wizard that is invoked when the user has already selected which
- * IUs should be installed and does not need to browse the available software.
- * 
- * @since 3.5
- */
-public class PreselectedIUInstallWizard extends WizardWithLicenses {
-
-	SelectableIUsPage mainPage;
-	QueryableMetadataRepositoryManager manager;
-
-	static IUElementListRoot makeElementRoot(IInstallableUnit[] ius, String profileId) {
-		IUElementListRoot elementRoot = new IUElementListRoot();
-		Object[] elements = new Object[ius.length];
-		for (int i = 0; i < ius.length; i++) {
-			if (ius[i] != null)
-				elements[i] = new AvailableIUElement(elementRoot, ius[i], profileId, false);
-		}
-		elementRoot.setChildren(elements);
-		return elementRoot;
-	}
-
-	public PreselectedIUInstallWizard(Policy policy, String profileId, IInstallableUnit[] initialSelections, PlannerResolutionOperation initialResolution, QueryableMetadataRepositoryManager manager) {
-		super(policy, profileId, makeElementRoot(initialSelections, profileId), initialSelections, initialResolution);
-		this.manager = manager;
-		setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
-		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
-	}
-
-	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
-		mainPage = new SelectableIUsPage(policy, input, selections, profileId);
-		mainPage.setTitle(ProvUIMessages.PreselectedIUInstallWizard_Title);
-		mainPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
-		mainPage.updateStatus(input, resolutionOperation);
-		return mainPage;
-	}
-
-	protected ResolutionResultsWizardPage createResolutionPage() {
-		return new InstallWizardPage(policy, profileId, root, resolutionOperation);
-	}
-
-	protected IUElementListRoot makeResolutionElementRoot(Object[] selectedElements) {
-		IUElementListRoot elementRoot = new IUElementListRoot();
-		ArrayList list = new ArrayList(selectedElements.length);
-		for (int i = 0; i < selectedElements.length; i++) {
-			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
-			if (iu != null)
-				list.add(new AvailableIUElement(elementRoot, iu, profileId, policy.getQueryContext().getShowProvisioningPlanChildren()));
-		}
-		elementRoot.setChildren(list.toArray());
-		return elementRoot;
-	}
-
-	protected ProfileChangeRequest computeProfileChangeRequest(Object[] selectedElements, MultiStatus additionalStatus, IProgressMonitor monitor) {
-		IInstallableUnit[] selected = ElementUtils.elementsToIUs(selectedElements);
-		return InstallAction.computeProfileChangeRequest(selected, profileId, additionalStatus, monitor);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
-	 */
-	protected IResolutionErrorReportingPage getErrorReportingPage() {
-		return mainPage;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/ProvisioningWizardDialog.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/ProvisioningWizardDialog.java
deleted file mode 100644
index e5282c0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/ProvisioningWizardDialog.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Subclass of WizardDialog that provides bounds saving behavior.
- * @since 3.5
- *
- */
-public class ProvisioningWizardDialog extends WizardDialog {
-	private ProvisioningOperationWizard wizard;
-
-	public ProvisioningWizardDialog(Shell parent, ProvisioningOperationWizard wizard) {
-		super(parent, wizard);
-		this.wizard = wizard;
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-	}
-
-	protected IDialogSettings getDialogBoundsSettings() {
-		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
-		IDialogSettings section = settings.getSection(wizard.getDialogSettingsSectionName());
-		if (section == null) {
-			section = settings.addNewSection(wizard.getDialogSettingsSectionName());
-		}
-		return section;
-	}
-
-	/**
-	 * @see org.eclipse.jface.window.Window#close()
-	 */
-	public boolean close() {
-		if (getShell() != null && !getShell().isDisposed()) {
-			wizard.saveBoundsRelatedSettings();
-		}
-		return super.close();
-	}
-
-	/**
-	 * This method is provided only for automated testing.
-	 * 
-	 * @noreference This method is not intended to be referenced by clients.
-	 */
-	public Button testGetButton(int id) {
-		return getButton(id);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java
deleted file mode 100644
index e35a851..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositoryManipulationPage.java
+++ /dev/null
@@ -1,907 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.MetadataRepositoryElementComparator;
-import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.progress.WorkbenchJob;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Page that allows users to update, add, remove, import, and
- * export repositories.  This page can be hosted inside a preference
- * dialog or inside its own dialog.  When hosting this page inside
- * a non-preference dialog, some of the dialog methods will likely 
- * have to call page methods.  The following snippet shows how to host
- * this page inside a TitleAreaDialog.
- * <pre>
- *		TitleAreaDialog dialog = new TitleAreaDialog(shell) {
- *
- *			RepositoryManipulationPage page;
- *
- *			protected Control createDialogArea(Composite parent) {
- *				page = new RepositoryManipulationPage(policy);
- *				page.createControl(parent);
- *				this.setTitle("Software Sites");
- *				this.setMessage("The enabled sites will be searched for software.  Disabled sites are ignored.);
- *				return page.getControl();
- *			}
- *
- *			protected void okPressed() {
- *				if (page.performOk())
-*					super.okPressed();
- *			}
- *
- *			protected void cancelPressed() {
- *				if (page.performCancel())
- *					super.cancelPressed();
- *			}
- *		};
- *		dialog.open();
- * </pre>
- * 
- * @since 3.5
- */
-public class RepositoryManipulationPage extends PreferencePage implements IWorkbenchPreferencePage, ICopyable {
-	final static String DEFAULT_FILTER_TEXT = ProvUIMessages.RepositoryManipulationPage_DefaultFilterString;
-	private final static int FILTER_DELAY = 200;
-
-	StructuredViewerProvisioningListener listener;
-	TableViewer repositoryViewer;
-	Table table;
-	Policy policy;
-	Display display;
-	boolean changed = false;
-	MetadataRepositoryElementComparator comparator;
-	RepositoryDetailsLabelProvider labelProvider;
-	RepositoryManipulator manipulator;
-	RepositoryManipulator localCacheRepoManipulator;
-	CachedMetadataRepositories input;
-	Text pattern, details;
-	PatternFilter filter;
-	WorkbenchJob filterJob;
-	Button addButton, removeButton, editButton, refreshButton, disableButton, exportButton;
-
-	class CachedMetadataRepositories extends MetadataRepositories {
-		Hashtable cachedElements;
-
-		CachedMetadataRepositories() {
-			super(policy);
-			setIncludeDisabledRepositories(manipulator != null);
-		}
-
-		public int getQueryType() {
-			return QueryProvider.METADATA_REPOS;
-		}
-
-		public Object[] getChildren(Object o) {
-			if (cachedElements == null) {
-				Object[] children = super.getChildren(o);
-				cachedElements = new Hashtable(children.length);
-				for (int i = 0; i < children.length; i++) {
-					if (children[i] instanceof MetadataRepositoryElement)
-						cachedElements.put(URIUtil.toUnencodedString(((MetadataRepositoryElement) children[i]).getLocation()), children[i]);
-				}
-			}
-			return cachedElements.values().toArray();
-		}
-
-	}
-
-	class MetadataRepositoryPatternFilter extends PatternFilter {
-		MetadataRepositoryPatternFilter() {
-			setIncludeLeadingWildcard(true);
-		}
-
-		public boolean isElementVisible(Viewer viewer, Object element) {
-			if (element instanceof MetadataRepositoryElement) {
-				return wordMatches(labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_NAME) + " " + labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_LOCATION)); //$NON-NLS-1$
-			}
-			return false;
-		}
-	}
-
-	/**
-	 * This method must be called before the contents are created.
-	 * @param policy
-	 */
-	public void setPolicy(Policy policy) {
-		this.policy = policy;
-		manipulator = policy.getRepositoryManipulator();
-	}
-
-	protected Control createContents(Composite parent) {
-		display = parent.getDisplay();
-		// The help refers to the full-blown dialog.  No help if it's read only.
-		if (manipulator != null)
-			PlatformUI.getWorkbench().getHelpSystem().setHelp(parent.getShell(), IProvHelpContextIds.REPOSITORY_MANIPULATION_DIALOG);
-
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-		composite.setLayoutData(gd);
-
-		GridLayout layout = new GridLayout();
-		layout.numColumns = manipulator == null ? 1 : 2;
-		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
-		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-		composite.setLayout(layout);
-
-		// Filter box
-		pattern = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.CANCEL);
-		pattern.getAccessible().addAccessibleListener(new AccessibleAdapter() {
-			public void getName(AccessibleEvent e) {
-				e.result = DEFAULT_FILTER_TEXT;
-			}
-		});
-		pattern.setText(DEFAULT_FILTER_TEXT);
-		pattern.selectAll();
-		pattern.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				applyFilter();
-			}
-		});
-
-		pattern.addKeyListener(new KeyAdapter() {
-			public void keyPressed(KeyEvent e) {
-				if (e.keyCode == SWT.ARROW_DOWN) {
-					if (table.getItemCount() > 0) {
-						table.setFocus();
-					} else if (e.character == SWT.CR) {
-						return;
-					}
-				}
-			}
-		});
-
-		pattern.addFocusListener(new FocusAdapter() {
-			public void focusGained(FocusEvent e) {
-				display.asyncExec(new Runnable() {
-					public void run() {
-						if (!pattern.isDisposed()) {
-							if (DEFAULT_FILTER_TEXT.equals(pattern.getText().trim())) {
-								pattern.selectAll();
-							}
-						}
-					}
-				});
-			}
-		});
-		gd = new GridData(SWT.FILL, SWT.FILL, true, false);
-		pattern.setLayoutData(gd);
-
-		// spacer to fill other column
-		if (manipulator != null)
-			new Label(composite, SWT.NONE);
-
-		// Table of available repositories
-		repositoryViewer = new TableViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-		table = repositoryViewer.getTable();
-
-		// Key listener for delete
-		table.addKeyListener(new KeyAdapter() {
-			public void keyPressed(KeyEvent e) {
-				if (e.keyCode == SWT.DEL) {
-					removeRepositories();
-				}
-			}
-		});
-		setTableColumns();
-		CopyUtils.activateCopy(this, table);
-
-		repositoryViewer.setComparer(new ProvElementComparer());
-		comparator = new MetadataRepositoryElementComparator(RepositoryDetailsLabelProvider.COL_NAME);
-		repositoryViewer.setComparator(comparator);
-		filter = new MetadataRepositoryPatternFilter();
-		repositoryViewer.setFilters(new ViewerFilter[] {filter});
-		// We don't need a deferred content provider because we are caching local results before
-		// actually querying
-		repositoryViewer.setContentProvider(new ProvElementContentProvider());
-		labelProvider = new RepositoryDetailsLabelProvider();
-		repositoryViewer.setLabelProvider(labelProvider);
-
-		// Edit the nickname
-		repositoryViewer.setCellModifier(new ICellModifier() {
-			public boolean canModify(Object element, String property) {
-				return true;
-			}
-
-			public Object getValue(Object element, String property) {
-				return ((MetadataRepositoryElement) element).getName();
-			}
-
-			public void modify(Object element, String property, Object value) {
-				if (value != null && value.toString().length() >= 0) {
-					MetadataRepositoryElement repo;
-					if (element instanceof Item) {
-						repo = (MetadataRepositoryElement) ((Item) element).getData();
-					} else if (element instanceof MetadataRepositoryElement) {
-						repo = (MetadataRepositoryElement) element;
-					} else {
-						return;
-					}
-					changed = true;
-					repo.setNickname(value.toString());
-					if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_NAME)
-						repositoryViewer.refresh(true);
-					else
-						repositoryViewer.update(repo, null);
-				}
-			}
-
-		});
-		repositoryViewer.setColumnProperties(new String[] {"nickname"}); //$NON-NLS-1$
-		repositoryViewer.setCellEditors(new CellEditor[] {new TextCellEditor(repositoryViewer.getTable())});
-
-		repositoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				if (manipulator != null)
-					validateButtons();
-				setDetails();
-			}
-		});
-
-		// Input last
-		repositoryViewer.setInput(getInput());
-
-		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
-		data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
-		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
-		table.setLayoutData(data);
-
-		// Drop targets and vertical buttons only if repository manipulation is provided.
-		if (manipulator != null) {
-			DropTarget target = new DropTarget(table, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
-			target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
-			target.addDropListener(new RepositoryManipulatorDropTarget(getRepositoryManipulator(), table));
-
-			// Vertical buttons
-			Composite verticalButtonBar = createVerticalButtonBar(composite);
-			data = new GridData(SWT.FILL, SWT.FILL, false, false);
-			data.verticalAlignment = SWT.TOP;
-			data.verticalIndent = 0;
-			verticalButtonBar.setLayoutData(data);
-			listener = getViewerProvisioningListener();
-
-			ProvUI.addProvisioningListener(listener);
-			composite.addDisposeListener(new DisposeListener() {
-				public void widgetDisposed(DisposeEvent event) {
-					ProvUI.removeProvisioningListener(listener);
-				}
-			});
-
-			validateButtons();
-		}
-
-		// Details area
-		details = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
-		data = new GridData(SWT.FILL, SWT.FILL, true, false);
-		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_SITEDETAILS_HEIGHT);
-
-		details.setLayoutData(data);
-
-		Dialog.applyDialogFont(composite);
-		return composite;
-	}
-
-	private Button createVerticalButton(Composite parent, String label, boolean defaultButton) {
-		Button button = new Button(parent, SWT.PUSH);
-		button.setText(label);
-
-		GridData data = setVerticalButtonLayoutData(button);
-		data.horizontalAlignment = GridData.FILL;
-
-		button.setToolTipText(label);
-		if (defaultButton) {
-			Shell shell = parent.getShell();
-			if (shell != null) {
-				shell.setDefaultButton(button);
-			}
-		}
-		return button;
-	}
-
-	private GridData setVerticalButtonLayoutData(Button button) {
-		GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
-		Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
-		data.widthHint = Math.max(widthHint, minSize.x);
-		button.setLayoutData(data);
-		return data;
-	}
-
-	private void setTableColumns() {
-		table.setHeaderVisible(true);
-		String[] columnHeaders;
-		if (manipulator != null)
-			columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle, ProvUIMessages.RepositoryManipulationPage_EnabledColumnTitle};
-		else
-			columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle};
-		for (int i = 0; i < columnHeaders.length; i++) {
-			TableColumn tc = new TableColumn(table, SWT.NONE, i);
-			tc.setResizable(true);
-			tc.setText(columnHeaders[i]);
-			if (i == RepositoryDetailsLabelProvider.COL_ENABLEMENT) {
-				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH));
-				tc.setAlignment(SWT.CENTER);
-			} else if (i == RepositoryDetailsLabelProvider.COL_NAME) {
-				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH) * 2 / 3);
-			} else {
-				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
-			}
-			tc.addSelectionListener(new SelectionListener() {
-				public void widgetDefaultSelected(SelectionEvent e) {
-					columnSelected((TableColumn) e.widget);
-				}
-
-				public void widgetSelected(SelectionEvent e) {
-					columnSelected((TableColumn) e.widget);
-				}
-
-			});
-			// First column only
-			if (i == 0) {
-				table.setSortColumn(tc);
-				table.setSortDirection(SWT.UP);
-			}
-		}
-	}
-
-	private Composite createVerticalButtonBar(Composite parent) {
-		// Create composite.
-		Composite composite = new Composite(parent, SWT.NONE);
-		initializeDialogUnits(composite);
-
-		// create a layout with spacing and margins appropriate for the font
-		// size.
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		layout.marginWidth = 5;
-		layout.marginHeight = 0;
-		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-		composite.setLayout(layout);
-
-		createVerticalButtons(composite);
-		return composite;
-	}
-
-	private void createVerticalButtons(Composite parent) {
-		addButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Add, false);
-		addButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				addRepository();
-			}
-		});
-
-		editButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Edit, false);
-		editButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				changeRepositoryProperties();
-			}
-		});
-
-		removeButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Remove, false);
-		removeButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				removeRepositories();
-			}
-		});
-
-		refreshButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_RefreshConnection, false);
-		refreshButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				refreshRepository();
-			}
-		});
-
-		disableButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_DisableButton, false);
-		disableButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				toggleRepositoryEnablement();
-			}
-		});
-
-		Button button = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Import, false);
-		button.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				importRepositories();
-			}
-		});
-
-		exportButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Export, false);
-		exportButton.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				exportRepositories();
-			}
-		});
-	}
-
-	CachedMetadataRepositories getInput() {
-		if (input == null)
-			input = new CachedMetadataRepositories();
-		return input;
-	}
-
-	public boolean performOk() {
-		if (changed)
-			ElementUtils.updateRepositoryUsingElements(getElements(), getShell());
-		return super.performOk();
-	}
-
-	private StructuredViewerProvisioningListener getViewerProvisioningListener() {
-		return new StructuredViewerProvisioningListener(repositoryViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
-			protected void repositoryDiscovered(RepositoryEvent e) {
-				RepositoryManipulationPage.this.asyncRefresh(null);
-			}
-
-			protected void repositoryChanged(RepositoryEvent e) {
-				RepositoryManipulationPage.this.asyncRefresh(null);
-			}
-		};
-	}
-
-	MetadataRepositoryElement[] getElements() {
-		return (MetadataRepositoryElement[]) getInput().cachedElements.values().toArray(new MetadataRepositoryElement[getInput().cachedElements.size()]);
-	}
-
-	MetadataRepositoryElement[] getSelectedElements() {
-		Object[] items = ((IStructuredSelection) repositoryViewer.getSelection()).toArray();
-		ArrayList list = new ArrayList(items.length);
-		for (int i = 0; i < items.length; i++) {
-			if (items[i] instanceof MetadataRepositoryElement)
-				list.add(items[i]);
-		}
-		return (MetadataRepositoryElement[]) list.toArray(new MetadataRepositoryElement[list.size()]);
-	}
-
-	void validateButtons() {
-		MetadataRepositoryElement[] elements = getSelectedElements();
-		exportButton.setEnabled(elements.length > 0);
-		removeButton.setEnabled(elements.length > 0);
-		editButton.setEnabled(elements.length == 1);
-		refreshButton.setEnabled(elements.length == 1);
-		if (elements.length >= 1) {
-			if (toggleMeansDisable(elements))
-				disableButton.setText(ProvUIMessages.RepositoryManipulationPage_DisableButton);
-			else
-				disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
-			disableButton.setEnabled(true);
-		} else {
-			disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
-			disableButton.setEnabled(false);
-		}
-	}
-
-	void addRepository() {
-		AddRepositoryDialog dialog = new AddRepositoryDialog(getShell(), policy) {
-			protected RepositoryManipulator getRepositoryManipulator() {
-				return RepositoryManipulationPage.this.getRepositoryManipulator();
-			}
-		};
-		dialog.setTitle(manipulator.getAddOperationLabel());
-		dialog.open();
-	}
-
-	void refreshRepository() {
-		final MetadataRepositoryElement[] selected = getSelectedElements();
-		final ProvisionException[] fail = new ProvisionException[1];
-		final boolean[] remove = new boolean[1];
-		remove[0] = false;
-		if (selected.length != 1)
-			return;
-		final URI location = selected[0].getLocation();
-		ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
-		try {
-			dialog.run(true, true, new IRunnableWithProgress() {
-				public void run(IProgressMonitor monitor) {
-					SubMonitor mon = SubMonitor.convert(monitor, NLS.bind(ProvUIMessages.RepositoryManipulationPage_ContactingSiteMessage, location), 300);
-					try {
-						ProvUI.clearRepositoryNotFound(location);
-						// If the manager doesn't know this repo, refreshing it will not work.
-						// We temporarily add it, but we must remove it in case the user cancels out of this page.
-						if (!includesRepo(manipulator.getKnownRepositories(), location)) {
-							// Start a batch operation so we can swallow events
-							ProvUI.startBatchOperation();
-							AddRepositoryOperation op = manipulator.getAddOperation(location);
-							op.setNotify(false);
-							op.execute(mon.newChild(100));
-							remove[0] = true;
-						}
-						ProvisioningUtil.refreshArtifactRepositories(new URI[] {location}, mon.newChild(100));
-						ProvisioningUtil.refreshMetadataRepositories(new URI[] {location}, mon.newChild(100));
-					} catch (ProvisionException e) {
-						// Need to report after dialog is closed or the error dialog will disappear when progress
-						// disappears
-						fail[0] = e;
-					} catch (OperationCanceledException e) {
-						// Catch canceled login attempts
-						fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled, e));
-					} finally {
-						// Check if the monitor was canceled
-						if (fail[0] == null && mon.isCanceled())
-							fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled));
-						// If we temporarily added a repo so we could read it, remove it.
-						if (remove[0]) {
-							RemoveRepositoryOperation op = manipulator.getRemoveOperation(new URI[] {location});
-							op.setNotify(false);
-							try {
-								op.execute(new NullProgressMonitor());
-							} catch (ProvisionException e) {
-								// Don't report
-							}
-							// stop swallowing events
-							ProvUI.endBatchOperation(false);
-						}
-					}
-				}
-			});
-		} catch (InvocationTargetException e) {
-			// nothing to report
-		} catch (InterruptedException e) {
-			// nothing to report
-		}
-		if (fail[0] != null) {
-			// If the repo was not found, tell ProvUI that we will be reporting it.
-			// We are going to report problems directly to the status manager because we
-			// do not want the automatic repo location editing to kick in.
-			if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) {
-				ProvUI.notFoundStatusReported(location);
-			}
-			if (!fail[0].getStatus().matches(IStatus.CANCEL)) {
-				// An error is only shown if the dialog was not canceled
-				ProvUI.handleException(fail[0], null, StatusManager.SHOW);
-			}
-		} else {
-			// Confirm that it was successful
-			MessageDialog.openInformation(getShell(), ProvUIMessages.RepositoryManipulationPage_TestConnectionTitle, NLS.bind(ProvUIMessages.RepositoryManipulationPage_TestConnectionSuccess, URIUtil.toUnencodedString(location)));
-		}
-		repositoryViewer.update(selected[0], null);
-		setDetails();
-	}
-
-	boolean includesRepo(URI[] repos, URI repo) {
-		for (int i = 0; i < repos.length; i++)
-			if (repos[i].equals(repo))
-				return true;
-		return false;
-	}
-
-	void toggleRepositoryEnablement() {
-		MetadataRepositoryElement[] selected = getSelectedElements();
-		if (selected.length >= 1) {
-			boolean enableSites = !toggleMeansDisable(selected);
-			for (int i = 0; i < selected.length; i++)
-				selected[i].setEnabled(enableSites);
-			if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_ENABLEMENT)
-				repositoryViewer.refresh(true);
-			else
-				for (int i = 0; i < selected.length; i++)
-					repositoryViewer.update(selected[i], null);
-			changed = true;
-		}
-		validateButtons();
-	}
-
-	void importRepositories() {
-		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
-			public void run() {
-				MetadataRepositoryElement[] imported = UpdateManagerCompatibility.importSites(getShell());
-				if (imported.length > 0) {
-					Hashtable repos = getInput().cachedElements;
-					changed = true;
-					for (int i = 0; i < imported.length; i++)
-						repos.put(URIUtil.toUnencodedString(imported[i].getLocation()), imported[i]);
-					asyncRefresh(null);
-				}
-			}
-		});
-	}
-
-	void exportRepositories() {
-		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
-			public void run() {
-				MetadataRepositoryElement[] elements = getSelectedElements();
-				if (elements.length == 0)
-					elements = getElements();
-				UpdateManagerCompatibility.exportSites(getShell(), elements);
-			}
-		});
-	}
-
-	void changeRepositoryProperties() {
-		final MetadataRepositoryElement[] selected = getSelectedElements();
-		if (selected.length != 1)
-			return;
-		RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(getShell(), policy) {
-			protected String getInitialLocationText() {
-				return URIUtil.toUnencodedString(selected[0].getLocation());
-			}
-
-			protected String getInitialNameText() {
-				return selected[0].getName();
-			}
-
-			protected RepositoryLocationValidator getRepositoryLocationValidator() {
-				return new RepositoryLocationValidator() {
-					public IStatus validateRepositoryLocation(URI uri, boolean contactRepositories, IProgressMonitor monitor) {
-						if (URIUtil.sameURI(uri, selected[0].getLocation()))
-							return Status.OK_STATUS;
-						return RepositoryManipulationPage.this.getRepositoryManipulator().getRepositoryLocationValidator(getShell()).validateRepositoryLocation(uri, contactRepositories, monitor);
-					}
-				};
-			}
-
-		};
-		int retCode = dialog.open();
-		if (retCode == Window.OK) {
-			selected[0].setNickname(dialog.getName());
-			selected[0].setLocation(dialog.getLocation());
-			changed = true;
-			repositoryViewer.update(selected[0], null);
-			setDetails();
-		}
-	}
-
-	void columnSelected(TableColumn tc) {
-		TableColumn[] cols = table.getColumns();
-		for (int i = 0; i < cols.length; i++) {
-			if (cols[i] == tc) {
-				if (i != comparator.getSortKey()) {
-					comparator.setSortKey(i);
-					table.setSortColumn(tc);
-					comparator.sortAscending();
-					table.setSortDirection(SWT.UP);
-				} else {
-					if (comparator.isAscending()) {
-						table.setSortDirection(SWT.DOWN);
-						comparator.sortDescending();
-					} else {
-						table.setSortDirection(SWT.UP);
-						comparator.sortAscending();
-					}
-				}
-				repositoryViewer.refresh();
-				break;
-			}
-		}
-	}
-
-	void asyncRefresh(final MetadataRepositoryElement elementToSelect) {
-		display.asyncExec(new Runnable() {
-			public void run() {
-				repositoryViewer.refresh();
-				if (elementToSelect != null)
-					repositoryViewer.setSelection(new StructuredSelection(elementToSelect), true);
-			}
-		});
-	}
-
-	void applyFilter() {
-		String text = pattern.getText();
-		if (text == DEFAULT_FILTER_TEXT)
-			text = ""; //$NON-NLS-1$
-		if (text.length() == 0)
-			filter.setPattern(null);
-		else
-			filter.setPattern(text);
-		if (filterJob != null)
-			filterJob.cancel();
-		filterJob = new WorkbenchJob("filter job") { //$NON-NLS-1$
-			public IStatus runInUIThread(IProgressMonitor monitor) {
-				if (monitor.isCanceled())
-					return Status.CANCEL_STATUS;
-				if (!repositoryViewer.getTable().isDisposed())
-					repositoryViewer.refresh();
-				return Status.OK_STATUS;
-			}
-
-		};
-		filterJob.setSystem(true);
-		filterJob.schedule(FILTER_DELAY);
-	}
-
-	void setDetails() {
-		MetadataRepositoryElement[] selections = getSelectedElements();
-		if (selections.length == 1) {
-			details.setText(selections[0].getDescription());
-		} else {
-			details.setText(""); //$NON-NLS-1$
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
-	 */
-	public void init(IWorkbench workbench) {
-		noDefaultAndApplyButton();
-		if (policy == null)
-			setPolicy(Policy.getDefault());
-	}
-
-	void removeRepositories() {
-		MetadataRepositoryElement[] selections = getSelectedElements();
-		if (selections.length > 0) {
-			String message = ProvUIMessages.RepositoryManipulationPage_RemoveConfirmMessage;
-			if (selections.length == 1)
-				message = NLS.bind(ProvUIMessages.RepositoryManipulationPage_RemoveConfirmSingleMessage, URIUtil.toUnencodedString(selections[0].getLocation()));
-			if (MessageDialog.openQuestion(getShell(), ProvUIMessages.RepositoryManipulationPage_RemoveConfirmTitle, message)) {
-
-				changed = true;
-				for (int i = 0; i < selections.length; i++) {
-					getInput().cachedElements.remove(URIUtil.toUnencodedString(selections[i].getLocation()));
-				}
-				asyncRefresh(null);
-			}
-		}
-	}
-
-	// Return a repo manipulator that only operates on the local cache.
-	// Labels and other presentation info are used from the original manipulator.
-	RepositoryManipulator getRepositoryManipulator() {
-		if (localCacheRepoManipulator == null)
-			localCacheRepoManipulator = new RepositoryManipulator() {
-				public AddRepositoryOperation getAddOperation(URI location) {
-					return new AddRepositoryOperation("Cached add repo operation", new URI[] {location}) { //$NON-NLS-1$
-						protected IStatus doExecute(IProgressMonitor monitor) {
-							MetadataRepositoryElement element = null;
-							for (int i = 0; i < locations.length; i++) {
-								element = new MetadataRepositoryElement(getInput(), locations[i], true);
-								if (nicknames != null)
-									element.setNickname(nicknames[i]);
-								getInput().cachedElements.put(URIUtil.toUnencodedString(locations[i]), element);
-							}
-							changed = true;
-							asyncRefresh(element);
-							return Status.OK_STATUS;
-						}
-
-						protected IStatus doBatchedExecute(IProgressMonitor monitor) {
-							// Not called due to override of doExecute
-							return null;
-						}
-
-						protected void setNickname(URI loc, String nickname) {
-							// Not called due to override of doExecute
-						}
-					};
-				}
-
-				public String getAddOperationLabel() {
-					return manipulator.getAddOperationLabel();
-				}
-
-				public URI[] getKnownRepositories() {
-					return RepositoryManipulationPage.this.getKnownRepositories();
-				}
-
-				public String getManipulatorButtonLabel() {
-					return manipulator.getManipulatorButtonLabel();
-				}
-
-				public String getManipulatorLinkLabel() {
-					return manipulator.getManipulatorLinkLabel();
-				}
-
-				public RemoveRepositoryOperation getRemoveOperation(URI[] repoLocations) {
-					return new RemoveRepositoryOperation("Cached remove repo operation", repoLocations) { //$NON-NLS-1$
-						protected IStatus doBatchedExecute(IProgressMonitor monitor) {
-							removeRepositories();
-							return Status.OK_STATUS;
-						}
-					};
-				}
-
-				public String getRemoveOperationLabel() {
-					return manipulator.getRemoveOperationLabel();
-				}
-
-				public RepositoryLocationValidator getRepositoryLocationValidator(Shell shell) {
-					return new DefaultMetadataURLValidator() {
-						protected URI[] getKnownLocations() {
-							return getKnownRepositories();
-						}
-					};
-				}
-
-				public boolean manipulateRepositories(Shell shell) {
-					// we are the manipulator
-					return true;
-				}
-
-				public String getManipulatorInstructionString() {
-					// we are the manipulator
-					return null;
-				}
-
-				public String getRepositoryNotFoundInstructionString() {
-					// we are in the manipulator, no further instructions
-					return null;
-				}
-
-			};
-		return localCacheRepoManipulator;
-	}
-
-	public void copyToClipboard(Control activeControl) {
-		MetadataRepositoryElement[] elements = getSelectedElements();
-		if (elements.length == 0)
-			elements = getElements();
-		String text = ""; //$NON-NLS-1$
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0; i < elements.length; i++) {
-			buffer.append(labelProvider.getClipboardText(elements[i], CopyUtils.DELIMITER));
-			if (i > 0)
-				buffer.append(CopyUtils.NEWLINE);
-		}
-		text = buffer.toString();
-
-		if (text.length() == 0)
-			return;
-		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
-		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
-		clipboard.dispose();
-	}
-
-	// If more than half of the selected repos are enabled, toggle means disable.
-	// Otherwise it means enable.
-	private boolean toggleMeansDisable(MetadataRepositoryElement[] elements) {
-		double count = 0;
-		for (int i = 0; i < elements.length; i++)
-			if (elements[i].isEnabled())
-				count++;
-		return (count / elements.length) > 0.5;
-	}
-
-	URI[] getKnownRepositories() {
-		MetadataRepositoryElement[] elements = getElements();
-		URI[] locations = new URI[elements.length];
-		for (int i = 0; i < elements.length; i++)
-			locations[i] = elements[i].getLocation();
-		return locations;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositorySelectionGroup.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositorySelectionGroup.java
deleted file mode 100644
index 2d1ca39..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RepositorySelectionGroup.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Yury Chernikov <Yury.Chernikov at borland.com> - Bug 271447 [ui] Bad layout in 'Install available software' dialog
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import com.ibm.icu.text.Collator;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.UIRepositoryEvent;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ComboAutoCompleteField;
-import org.eclipse.equinox.internal.p2.ui.dialogs.URLDropAdapter;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * A RepositorySelectionGroup is a reusable UI component that displays 
- * available repositories and allows the user to select them.  
- * 
- * @since 3.5
- */
-public class RepositorySelectionGroup {
-
-	private static final String SITE_NONE = ProvUIMessages.AvailableIUsPage_NoSites;
-	private static final String SITE_ALL = ProvUIMessages.AvailableIUsPage_AllSites;
-	private static final String SITE_LOCAL = ProvUIMessages.AvailableIUsPage_LocalSites;
-	private static final int INDEX_SITE_NONE = 0;
-	private static final int INDEX_SITE_ALL = 1;
-	private static final int DEC_MARGIN_WIDTH = 2;
-	private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
-
-	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=245569
-	private static final int COUNT_VISIBLE_ITEMS = 20;
-	IWizardContainer container;
-	Policy policy;
-	IUViewQueryContext queryContext;
-
-	ListenerList listeners = new ListenerList();
-
-	Combo repoCombo;
-	Link repoManipulatorLink;
-	ControlDecoration repoDec;
-	ComboAutoCompleteField repoAutoComplete;
-	ProvUIProvisioningListener comboRepoListener;
-
-	Image info, warning, error;
-	URI[] comboRepos; // the URIs shown in the combo, kept in sync with combo items
-	HashMap disabledRepoProposals = new HashMap(); // proposal string -> disabled URI 
-
-	public RepositorySelectionGroup(IWizardContainer container, Composite parent, Policy policy, IUViewQueryContext queryContext) {
-		this.container = container;
-		this.queryContext = queryContext;
-		this.policy = policy;
-		createControl(parent);
-	}
-
-	public Control getDefaultFocusControl() {
-		return repoCombo;
-	}
-
-	public void addRepositorySelectionListener(IRepositorySelectionListener listener) {
-		listeners.add(listener);
-	}
-
-	protected void createControl(Composite parent) {
-		// Get the possible field error indicators
-		info = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage();
-		warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage();
-		error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
-
-		// Combo that filters sites
-		Composite comboComposite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginTop = 0;
-		layout.marginBottom = IDialogConstants.VERTICAL_SPACING;
-		layout.numColumns = 3;
-		comboComposite.setLayout(layout);
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
-		comboComposite.setLayoutData(gd);
-
-		Label label = new Label(comboComposite, SWT.NONE);
-		label.setText(ProvUIMessages.AvailableIUsPage_RepoFilterLabel);
-
-		repoCombo = new Combo(comboComposite, SWT.DROP_DOWN);
-		repoCombo.addSelectionListener(new SelectionListener() {
-
-			public void widgetDefaultSelected(SelectionEvent e) {
-				repoComboSelectionChanged();
-			}
-
-			public void widgetSelected(SelectionEvent e) {
-				repoComboSelectionChanged();
-			}
-
-		});
-		// Auto complete - install before our own key listeners, so that auto complete gets first shot.
-		repoAutoComplete = new ComboAutoCompleteField(repoCombo);
-		repoCombo.setVisibleItemCount(COUNT_VISIBLE_ITEMS);
-		repoCombo.addKeyListener(new KeyAdapter() {
-
-			public void keyPressed(KeyEvent e) {
-				if (e.keyCode == SWT.CR)
-					addRepository(false);
-			}
-		});
-
-		// We don't ever want this to be interpreted as a default
-		// button event
-		repoCombo.addTraverseListener(new TraverseListener() {
-			public void keyTraversed(TraverseEvent e) {
-				if (e.detail == SWT.TRAVERSE_RETURN) {
-					e.doit = false;
-				}
-			}
-		});
-
-		gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
-		// breathing room for info dec
-		gd.horizontalIndent = DEC_MARGIN_WIDTH * 2;
-		repoCombo.setLayoutData(gd);
-		repoCombo.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent event) {
-				URI location = null;
-				IStatus status = null;
-				String text = repoCombo.getText().trim();
-				int index = getComboIndex(text);
-				// only validate text that doesn't match existing text in combo
-				if (index < 0) {
-					location = RepositoryLocationValidator.locationFromString(repoCombo.getText());
-					if (location == null) {
-						status = RepositoryLocationValidator.getInvalidLocationStatus(repoCombo.getText());
-					} else {
-						RepositoryLocationValidator validator = policy.getRepositoryManipulator().getRepositoryLocationValidator(repoCombo.getShell());
-						status = validator.validateRepositoryLocation(location, false, new NullProgressMonitor());
-					}
-				} else {
-					// user typed or pasted an existing location.  Select it.
-					repoComboSelectionChanged();
-				}
-				setRepoComboDecoration(status);
-			}
-		});
-
-		repoDec = new ControlDecoration(repoCombo, SWT.LEFT | SWT.TOP);
-		repoDec.setMarginWidth(DEC_MARGIN_WIDTH);
-
-		DropTarget target = new DropTarget(repoCombo, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
-		target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
-		target.addDropListener(new URLDropAdapter(true) {
-			/* (non-Javadoc)
-			 * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
-			 */
-			protected void handleDrop(String urlText, DropTargetEvent event) {
-				repoCombo.setText(urlText);
-				event.detail = DND.DROP_LINK;
-				addRepository(false);
-			}
-		});
-
-		Button button = new Button(comboComposite, SWT.PUSH);
-		button.setText(ProvUIMessages.AvailableIUsPage_AddButton);
-		button.addSelectionListener(new SelectionListener() {
-			public void widgetDefaultSelected(SelectionEvent e) {
-				addRepository(true);
-			}
-
-			public void widgetSelected(SelectionEvent e) {
-				addRepository(true);
-			}
-		});
-		setButtonLayoutData(button);
-
-		// Link to repository manipulator
-		repoManipulatorLink = createLink(comboComposite, new Action() {
-			public void runWithEvent(Event event) {
-				policy.getRepositoryManipulator().manipulateRepositories(repoCombo.getShell());
-			}
-		}, policy.getRepositoryManipulator().getManipulatorLinkLabel());
-		gd = new GridData(SWT.END, SWT.FILL, true, false);
-		gd.horizontalSpan = 3;
-		repoManipulatorLink.setLayoutData(gd);
-
-		addComboProvisioningListeners();
-		parent.addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-				removeProvisioningListeners();
-			}
-
-		});
-	}
-
-	private void setButtonLayoutData(Button button) {
-		GridData data = new GridData(SWT.FILL, SWT.CENTER, false, false);
-		GC gc = new GC(button);
-		gc.setFont(JFaceResources.getDialogFont());
-		FontMetrics fm = gc.getFontMetrics();
-		gc.dispose();
-		int widthHint = Dialog.convertHorizontalDLUsToPixels(fm, IDialogConstants.BUTTON_WIDTH);
-		Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
-		data.widthHint = Math.max(widthHint, minSize.x);
-		button.setLayoutData(data);
-	}
-
-	public void setRepositorySelection(int scope, URI location) {
-		switch (scope) {
-			case AvailableIUGroup.AVAILABLE_ALL :
-				fillRepoCombo(SITE_ALL);
-				break;
-			case AvailableIUGroup.AVAILABLE_LOCAL :
-				fillRepoCombo(SITE_LOCAL);
-				break;
-			case AvailableIUGroup.AVAILABLE_SPECIFIED :
-				fillRepoCombo(getSiteString(location));
-				break;
-			default :
-				fillRepoCombo(SITE_NONE);
-		}
-		setRepoComboDecoration(null);
-	}
-
-	protected void setRepoComboDecoration(final IStatus status) {
-		if (status == null || status.isOK() || status.getSeverity() == IStatus.CANCEL) {
-			repoDec.setShowOnlyOnFocus(true);
-			repoDec.setDescriptionText(ProvUIMessages.AvailableIUsPage_RepoFilterInstructions);
-			repoDec.setImage(info);
-			// We may have been previously showing an error or warning
-			// hover.  We will need to dismiss it, but if there is no text
-			// typed, don't do this, so that the user gets the info cue
-			if (repoCombo.getText().length() > 0)
-				repoDec.showHoverText(null);
-			return;
-		}
-		Image image;
-		if (status.getSeverity() == IStatus.WARNING)
-			image = warning;
-		else if (status.getSeverity() == IStatus.ERROR)
-			image = error;
-		else
-			image = info;
-		repoDec.setImage(image);
-		repoDec.setDescriptionText(status.getMessage());
-		repoDec.setShowOnlyOnFocus(false);
-		// use a delay to show the validation method because the very next
-		// selection or keystroke might fix it
-		repoCombo.getDisplay().timerExec(500, new Runnable() {
-			public void run() {
-				if (repoDec != null && repoDec.getImage() != info)
-					repoDec.showHoverText(status.getMessage());
-			}
-		});
-
-	}
-
-	/*
-	 * Fill the repo combo and use the specified string
-	 * as the selection.  If the selection is null, then the
-	 * current selection should be preserved if applicable.
-	 */
-	void fillRepoCombo(final String selection) {
-		URI[] sites = policy.getRepositoryManipulator().getKnownRepositories();
-		boolean hasLocalSites = getLocalSites().length > 0;
-		final String[] items;
-		if (hasLocalSites) {
-			// None, All, repo1, repo2....repo n, Local
-			comboRepos = new URI[sites.length + 3];
-			items = new String[sites.length + 3];
-		} else {
-			// None, All, repo1, repo2....repo n
-			comboRepos = new URI[sites.length + 2];
-			items = new String[sites.length + 2];
-		}
-		items[INDEX_SITE_NONE] = SITE_NONE;
-		items[INDEX_SITE_ALL] = SITE_ALL;
-		for (int i = 0; i < sites.length; i++) {
-			items[i + 2] = getSiteString(sites[i]);
-			comboRepos[i + 2] = sites[i];
-		}
-		if (hasLocalSites)
-			items[items.length - 1] = SITE_LOCAL;
-		if (sites.length > 0)
-			sortRepoItems(items, comboRepos, hasLocalSites);
-		Runnable runnable = new Runnable() {
-			public void run() {
-				if (repoCombo == null || repoCombo.isDisposed())
-					return;
-				String repoToSelect = selection;
-				if (repoToSelect == null) {
-					// If the combo is open and something is selected, use that index if we
-					// weren't given a string to select.
-					int selIndex = repoCombo.getSelectionIndex();
-					if (selIndex >= 0)
-						repoToSelect = repoCombo.getItem(selIndex);
-					else
-						repoToSelect = repoCombo.getText();
-				}
-				repoCombo.setItems(items);
-				repoAutoComplete.setProposalStrings(getComboProposals());
-				boolean selected = false;
-				for (int i = 0; i < items.length; i++)
-					if (items[i].equals(repoToSelect)) {
-						selected = true;
-						if (repoCombo.getListVisible())
-							repoCombo.select(i);
-						repoCombo.setText(repoToSelect);
-						break;
-					}
-				if (!selected) {
-					if (repoCombo.getListVisible())
-						repoCombo.select(INDEX_SITE_NONE);
-					repoCombo.setText(SITE_NONE);
-				}
-				repoComboSelectionChanged();
-			}
-		};
-		// Only run the UI code async if we have to.  If we always async the code,
-		// the automated tests (which are in the UI thread) can get out of sync
-		if (Display.getCurrent() == null)
-			repoCombo.getDisplay().asyncExec(runnable);
-		else
-			runnable.run();
-	}
-
-	String getSiteString(URI uri) {
-		try {
-			String nickname = ProvisioningUtil.getMetadataRepositoryProperty(uri, IRepository.PROP_NICKNAME);
-			if (nickname != null && nickname.length() > 0)
-				return NLS.bind(ProvUIMessages.AvailableIUsPage_NameWithLocation, nickname, URIUtil.toUnencodedString(uri));
-		} catch (ProvisionException e) {
-			// No error, just use the location string
-		}
-		return URIUtil.toUnencodedString(uri);
-	}
-
-	private Link createLink(Composite parent, IAction action, String text) {
-		Link link = new Link(parent, SWT.PUSH);
-		link.setText(text);
-
-		link.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				IAction linkAction = getLinkAction(event.widget);
-				if (linkAction != null) {
-					linkAction.runWithEvent(event);
-				}
-			}
-		});
-		link.setToolTipText(action.getToolTipText());
-		link.setData(LINKACTION, action);
-		return link;
-	}
-
-	IAction getLinkAction(Widget widget) {
-		Object data = widget.getData(LINKACTION);
-		if (data == null || !(data instanceof IAction)) {
-			return null;
-		}
-		return (IAction) data;
-	}
-
-	private void sortRepoItems(String[] strings, URI[] locations, boolean hasLocalSites) {
-		int sortStart = 2;
-		int sortEnd = hasLocalSites ? strings.length - 2 : strings.length - 1;
-		if (sortStart >= sortEnd)
-			return;
-		final HashMap uriToString = new HashMap();
-		for (int i = sortStart; i <= sortEnd; i++) {
-			uriToString.put(locations[i], strings[i]);
-		}
-		final Collator collator = Collator.getInstance(Locale.getDefault());
-		Comparator stringComparator = new Comparator() {
-			public int compare(Object a, Object b) {
-				return collator.compare(a, b);
-			}
-		};
-		Comparator uriComparator = new Comparator() {
-			public int compare(Object a, Object b) {
-				return collator.compare(uriToString.get(a), uriToString.get(b));
-			}
-		};
-
-		Arrays.sort(strings, sortStart, sortEnd, stringComparator);
-		Arrays.sort(locations, sortStart, sortEnd, uriComparator);
-	}
-
-	private URI[] getLocalSites() {
-		// use our current visibility flags plus the local filter
-		int flags = queryContext.getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_LOCAL;
-		try {
-			return ProvisioningUtil.getMetadataRepositories(flags);
-		} catch (ProvisionException e) {
-			return null;
-		}
-	}
-
-	String[] getComboProposals() {
-		// Include all the combo items plus disabled sites
-		try {
-			int flags = queryContext.getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_DISABLED;
-			String[] items = repoCombo.getItems();
-			// Clear any previously remembered disabled repos
-			disabledRepoProposals = new HashMap();
-			URI[] disabled = ProvisioningUtil.getMetadataRepositories(flags);
-			String[] disabledItems = new String[disabled.length];
-			for (int i = 0; i < disabledItems.length; i++) {
-				disabledItems[i] = getSiteString(disabled[i]);
-				disabledRepoProposals.put(disabledItems[i], disabled[i]);
-			}
-			String[] both = new String[items.length + disabledItems.length];
-			System.arraycopy(items, 0, both, 0, items.length);
-			System.arraycopy(disabledItems, 0, both, items.length, disabledItems.length);
-			return both;
-		} catch (ProvisionException e) {
-			return new String[0];
-		}
-	}
-
-	int getComboIndex(String repoText) {
-		// Callers have typically done this already, but just in case
-		repoText = repoText.trim();
-		// First look for exact match to the combo string.
-		// This includes the name, etc.
-		if (repoText.length() > 0) {
-			String[] items = repoCombo.getItems();
-			for (int i = 0; i < items.length; i++)
-				if (repoText.equals(items[i])) {
-					return i;
-				}
-		}
-		// Look for URI match - the user may have pasted or dragged 
-		// in a location that matches one we already know about, even
-		// if the text does not match completely.  (slashes, no name, etc.)
-		try {
-			URI location = URIUtil.fromString(repoText);
-			for (int i = 0; i < comboRepos.length; i++)
-				if (URIUtil.sameURI(location, comboRepos[i])) {
-					return i;
-				}
-		} catch (URISyntaxException e) {
-			// never mind
-		}
-		return -1;
-	}
-
-	void addComboProvisioningListeners() {
-		// We need to monitor repository events so that we can adjust the repo combo.
-		comboRepoListener = new ProvUIProvisioningListener(ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
-			protected void repositoryAdded(RepositoryEvent e) {
-				if (e instanceof UIRepositoryEvent) {
-					fillRepoCombo(getSiteString(e.getRepositoryLocation()));
-				}
-			}
-
-			protected void repositoryRemoved(RepositoryEvent e) {
-				fillRepoCombo(null);
-			}
-
-			protected void refreshAll() {
-				fillRepoCombo(null);
-			}
-		};
-		ProvUI.addProvisioningListener(comboRepoListener);
-	}
-
-	void removeProvisioningListeners() {
-		if (comboRepoListener != null) {
-			ProvUI.removeProvisioningListener(comboRepoListener);
-			comboRepoListener = null;
-		}
-
-	}
-
-	/*
-	 *  Add a repository using the text in the combo or launch a dialog if the text
-	 *  represents an already known repo.  For any add operation spawned by this
-	 *  method, we do not want to notify the UI with a special listener.  This is to
-	 *  prevent a multiple update flash because we intend to reset the available IU
-	 *  filter as soon as the new repo is added.
-	 */
-	void addRepository(boolean alwaysPrompt) {
-		final RepositoryManipulator manipulator = policy.getRepositoryManipulator();
-		final String selectedRepo = repoCombo.getText().trim();
-		int selectionIndex = getComboIndex(selectedRepo);
-		final boolean isNewText = selectionIndex < 0;
-		// If we are adding something already in the combo, just
-		// select that item.
-		if (!alwaysPrompt && !isNewText && selectionIndex != repoCombo.getSelectionIndex()) {
-			repoComboSelectionChanged();
-		} else if (alwaysPrompt) {
-			AddRepositoryDialog dialog = new AddRepositoryDialog(repoCombo.getShell(), policy) {
-				protected AddRepositoryOperation getOperation(URI repositoryLocation) {
-					AddRepositoryOperation op = manipulator.getAddOperation(repositoryLocation);
-					op.setNotify(false);
-					return op;
-				}
-
-				protected String getInitialLocationText() {
-					if (isNewText)
-						return selectedRepo;
-					return super.getInitialLocationText();
-				}
-
-			};
-			dialog.setTitle(manipulator.getAddOperationLabel());
-			dialog.open();
-			URI location = dialog.getAddedLocation();
-			if (location != null)
-				fillRepoCombo(getSiteString(location));
-		} else if (isNewText) {
-			try {
-				container.run(false, false, new IRunnableWithProgress() {
-					public void run(IProgressMonitor monitor) {
-						URI location;
-						IStatus status;
-						// This might be a disabled repo.  If so, no need to validate further.
-						if (disabledRepoProposals.containsKey(selectedRepo)) {
-							location = (URI) disabledRepoProposals.get(selectedRepo);
-							status = Status.OK_STATUS;
-						} else {
-							location = RepositoryLocationValidator.locationFromString(selectedRepo);
-							if (location == null)
-								status = RepositoryLocationValidator.getInvalidLocationStatus(selectedRepo);
-							else {
-								RepositoryLocationValidator validator = manipulator.getRepositoryLocationValidator(repoCombo.getShell());
-								status = validator.validateRepositoryLocation(location, false, monitor);
-							}
-						}
-						if (status.isOK() && location != null) {
-							try {
-								RepositoryOperation op = manipulator.getAddOperation(location);
-								op.setNotify(false);
-								op.execute(monitor);
-								fillRepoCombo(getSiteString(location));
-							} catch (ProvisionException e) {
-								// TODO Auto-generated catch block
-								ProvUI.handleException(e, null, StatusManager.SHOW);
-							}
-						}
-						setRepoComboDecoration(status);
-					}
-				});
-			} catch (InvocationTargetException e) {
-				// ignore
-			} catch (InterruptedException e) {
-				// ignore
-			}
-		}
-	}
-
-	public ProvisioningContext getProvisioningContext() {
-		int siteSel = getComboIndex(repoCombo.getText().trim());
-		if (siteSel < 0 || siteSel == INDEX_SITE_ALL || siteSel == INDEX_SITE_NONE)
-			return new ProvisioningContext();
-		URI[] locals = getLocalSites();
-		// If there are local sites, the last item in the combo is "Local Sites Only"
-		// Use all local sites in this case
-		// We have to set metadata repositories and artifact repositories in the
-		// provisioning context because the artifact repositories are used for
-		// sizing.
-		if (locals.length > 0 && siteSel == repoCombo.getItemCount() - 1) {
-			ProvisioningContext context = new ProvisioningContext(locals);
-			context.setArtifactRepositories(locals);
-			return context;
-		}
-		// A single site is selected.
-		ProvisioningContext context = new ProvisioningContext(new URI[] {comboRepos[siteSel]});
-		context.setArtifactRepositories(new URI[] {comboRepos[siteSel]});
-		return context;
-	}
-
-	void repoComboSelectionChanged() {
-		int repoChoice = -1;
-		URI repoLocation = null;
-
-		int selection = -1;
-		if (repoCombo.getListVisible()) {
-			selection = repoCombo.getSelectionIndex();
-		} else {
-			selection = getComboIndex(repoCombo.getText().trim());
-		}
-		int localIndex = getLocalSites().length == 0 ? repoCombo.getItemCount() : repoCombo.getItemCount() - 1;
-		if (comboRepos == null || selection < 0) {
-			selection = INDEX_SITE_NONE;
-		}
-
-		if (selection == INDEX_SITE_NONE) {
-			repoChoice = AvailableIUGroup.AVAILABLE_NONE;
-		} else if (selection == INDEX_SITE_ALL) {
-			repoChoice = AvailableIUGroup.AVAILABLE_ALL;
-		} else if (selection >= localIndex) {
-			repoChoice = AvailableIUGroup.AVAILABLE_LOCAL;
-		} else {
-			repoChoice = AvailableIUGroup.AVAILABLE_SPECIFIED;
-			repoLocation = comboRepos[selection];
-		}
-
-		Object[] selectionListeners = listeners.getListeners();
-		for (int i = 0; i < selectionListeners.length; i++) {
-			((IRepositorySelectionListener) selectionListeners[i]).repositorySelectionChanged(repoChoice, repoLocation);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RevertProfilePage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RevertProfilePage.java
deleted file mode 100644
index 998ba1e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/RevertProfilePage.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.CopyUtils;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ICopyable;
-import org.eclipse.equinox.internal.p2.ui.model.ProfileSnapshots;
-import org.eclipse.equinox.internal.p2.ui.model.RollbackProfileElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.viewers.*;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.about.InstallationPage;
-import org.eclipse.ui.menus.AbstractContributionFactory;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.4
- */
-public class RevertProfilePage extends InstallationPage implements ICopyable {
-
-	private static final int REVERT_ID = IDialogConstants.CLIENT_ID;
-	private static final int DEFAULT_COLUMN_WIDTH = 150;
-	TableViewer configsViewer;
-	TreeViewer configContentsViewer;
-	IUDetailsLabelProvider labelProvider;
-	IAction revertAction;
-	Button revertButton;
-	String profileId;
-	AbstractContributionFactory factory;
-	Text detailsArea;
-	InstalledIUGroup installedIUGroup;
-
-	public void createPageButtons(Composite parent) {
-		if (profileId == null)
-			return;
-		revertButton = createButton(parent, REVERT_ID, revertAction.getText());
-		revertButton.setEnabled(revertAction.isEnabled());
-	}
-
-	public void createControl(Composite parent) {
-		profileId = Policy.getDefault().getProfileChooser().getProfileId(ProvUI.getDefaultParentShell());
-		if (profileId == null) {
-			IStatus status = Policy.getDefault().getNoProfileChosenStatus();
-			if (status != null)
-				ProvUI.reportStatus(status, StatusManager.LOG);
-			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
-			text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-			text.setText(ProvUIMessages.RevertProfilePage_NoProfile);
-			setControl(text);
-			return;
-		}
-
-		initializeDialogUnits(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.REVERT_CONFIGURATION_WIZARD);
-
-		SashForm sashForm = new SashForm(parent, SWT.VERTICAL);
-		sashForm.setLayout(new GridLayout());
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-		sashForm.setLayoutData(gd);
-
-		createConfigurationsSection(sashForm);
-		createContentsSection(sashForm);
-		setControl(sashForm);
-
-		// prime the selection.  The selection accesses the
-		// revert action, so create it also.
-		createRevertAction();
-		Object element = configsViewer.getElementAt(0);
-		if (element != null)
-			configsViewer.setSelection(new StructuredSelection(element));
-	}
-
-	private void createConfigurationsSection(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		composite.setLayoutData(gd);
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(ProvUIMessages.RevertDialog_ConfigsLabel);
-		configsViewer = new TableViewer(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-		configsViewer.setContentProvider(new RepositoryContentProvider());
-		configsViewer.setLabelProvider(new ProvElementLabelProvider());
-		configsViewer.setComparator(new ViewerComparator() {
-			// We override the ViewerComparator so that we don't get the labels of the elements
-			// for comparison, but rather get the timestamps and compare them.
-			// Reverse sorting is used so that newest is first.
-			public int compare(Viewer viewer, Object o1, Object o2) {
-				if (o1 instanceof RollbackProfileElement && o2 instanceof RollbackProfileElement) {
-					long timestamp1 = ((RollbackProfileElement) o1).getTimestamp();
-					long timestamp2 = ((RollbackProfileElement) o2).getTimestamp();
-					if (timestamp1 > timestamp2)
-						return -1;
-					return 1;
-				}
-				// this is naive (doesn't consult the label provider), but shouldn't happen
-				return o2.toString().compareTo(o1.toString());
-			}
-		});
-		configsViewer.setInput(getInput());
-
-		configsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				handleSelectionChanged((IStructuredSelection) event.getSelection());
-			}
-
-		});
-		CopyUtils.activateCopy(this, configsViewer.getControl());
-		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-		configsViewer.getControl().setLayoutData(gd);
-	}
-
-	private void createContentsSection(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = 0;
-		layout.marginHeight = 0;
-		composite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_BOTH);
-		composite.setLayoutData(gd);
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(ProvUIMessages.RevertDialog_ConfigContentsLabel);
-		configContentsViewer = new TreeViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
-		comparator.useColumnConfig(ProvUI.getIUColumnConfig());
-		configContentsViewer.setComparator(comparator);
-		configContentsViewer.setComparer(new ProvElementComparer());
-		configContentsViewer.setContentProvider(new DeferredQueryContentProvider());
-
-		// columns before labels or you get a blank table
-		setTreeColumns(configContentsViewer.getTree());
-		labelProvider = new IUDetailsLabelProvider();
-		configContentsViewer.setLabelProvider(labelProvider);
-
-		gd = new GridData(GridData.FILL_BOTH);
-		configContentsViewer.getControl().setLayoutData(gd);
-		CopyUtils.activateCopy(this, configContentsViewer.getControl());
-	}
-
-	private void createRevertAction() {
-		revertAction = new Action() {
-			public void run() {
-				boolean result = MessageDialog.openQuestion(getShell(), ProvUIMessages.RevertDialog_Title, ProvUIMessages.RevertDialog_ConfirmRestartMessage);
-				if (!result)
-					return;
-				boolean finish = revert();
-				if (finish) {
-					getPageContainer().closeModalContainers();
-				}
-			}
-		};
-		revertAction.setText(ProvUIMessages.RevertProfilePage_RevertLabel);
-		revertAction.setToolTipText(ProvUIMessages.RevertProfilePage_RevertTooltip);
-	}
-
-	private Object getInput() {
-		ProfileSnapshots element = new ProfileSnapshots(profileId);
-		return element;
-	}
-
-	protected void buttonPressed(int buttonId) {
-		switch (buttonId) {
-			case REVERT_ID :
-				revertAction.run();
-				break;
-		}
-	}
-
-	void handleSelectionChanged(IStructuredSelection selection) {
-		if (!selection.isEmpty()) {
-			final Object selected = selection.getFirstElement();
-			if (selected instanceof RollbackProfileElement) {
-				Object[] elements = configContentsViewer.getExpandedElements();
-				configContentsViewer.getTree().setRedraw(false);
-				configContentsViewer.setInput(selected);
-				configContentsViewer.setExpandedElements(elements);
-				configContentsViewer.getTree().setRedraw(true);
-				revertAction.setEnabled(!((RollbackProfileElement) selected).isCurrentProfile());
-				if (revertButton != null)
-					revertButton.setEnabled(revertAction.isEnabled());
-				return;
-			}
-		}
-		configContentsViewer.setInput(null);
-		revertAction.setEnabled(false);
-		if (revertButton != null)
-			revertButton.setEnabled(false);
-	}
-
-	private void setTreeColumns(Tree tree) {
-		IUColumnConfig[] columns = ProvUI.getIUColumnConfig();
-		tree.setHeaderVisible(true);
-
-		for (int i = 0; i < columns.length; i++) {
-			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
-			tc.setResizable(true);
-			tc.setText(columns[i].columnTitle);
-			tc.setWidth(convertHorizontalDLUsToPixels(DEFAULT_COLUMN_WIDTH));
-		}
-	}
-
-	private IProfile getSelectedSnapshot() {
-		Object selected = ((IStructuredSelection) configsViewer.getSelection()).getFirstElement();
-		if (selected != null && selected instanceof RollbackProfileElement)
-			try {
-				return ((RollbackProfileElement) selected).getProfileSnapshot(new NullProgressMonitor());
-			} catch (ProvisionException e) {
-				ProvUI.handleException(e, null, StatusManager.LOG);
-			}
-		return null;
-	}
-
-	boolean revert() {
-		final IProfile snapshot = getSelectedSnapshot();
-		if (snapshot == null)
-			return false;
-		final ProvisioningPlan[] plan = new ProvisioningPlan[1];
-		IRunnableWithProgress runnable = new IRunnableWithProgress() {
-			public void run(IProgressMonitor monitor) {
-				IProfile currentProfile;
-				try {
-					currentProfile = ProvisioningUtil.getProfile(profileId);
-					plan[0] = ProvisioningUtil.getRevertPlan(currentProfile, snapshot, monitor);
-				} catch (ProvisionException e) {
-					ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
-				}
-			}
-		};
-		ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
-		try {
-			dialog.run(true, true, runnable);
-		} catch (InvocationTargetException e) {
-			ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
-		} catch (InterruptedException e) {
-			// nothing to report
-		}
-		// the dialog does not throw OperationCanceledException so we have to
-		// check the monitor
-		if (dialog.getProgressMonitor().isCanceled())
-			return false;
-
-		boolean reverted = false;
-		if (plan[0] != null) {
-			if (plan[0].getStatus().isOK()) {
-				// We use a default provisioning context (all repos) because we have no other
-				// way currently to figure out which sites the user wants to contact
-				ProvisioningOperation op = new ProfileModificationOperation(ProvUIMessages.RevertDialog_RevertOperationLabel, profileId, plan[0], new ProvisioningContext(), new DefaultPhaseSet(), true);
-				ProvisioningOperationRunner.schedule(op, StatusManager.SHOW | StatusManager.LOG);
-				ProvisioningOperationRunner.requestRestart(true);
-				reverted = true;
-			} else if (plan[0].getStatus().getSeverity() != IStatus.CANCEL) {
-				ProvUI.reportStatus(plan[0].getStatus(), StatusManager.LOG | StatusManager.SHOW);
-				// This message has no effect in an installation dialog
-				// setMessage(ProvUIMessages.ProfileModificationWizardPage_UnexpectedError, IMessageProvider.ERROR);
-			}
-		}
-		return reverted;
-	}
-
-	public void copyToClipboard(Control activeControl) {
-		String text = ""; //$NON-NLS-1$
-		if (activeControl == configContentsViewer.getControl()) {
-			text = CopyUtils.getIndentedClipboardText(((IStructuredSelection) configContentsViewer.getSelection()).toArray(), labelProvider);
-		} else if (activeControl == configsViewer.getControl()) {
-			Object[] elements = ((IStructuredSelection) configsViewer.getSelection()).toArray();
-			StringBuffer buffer = new StringBuffer();
-			for (int i = 0; i < elements.length; i++) {
-				if (elements[i] instanceof RollbackProfileElement) {
-					if (i > 0)
-						buffer.append(CopyUtils.NEWLINE);
-					buffer.append(((RollbackProfileElement) elements[i]).getLabel(elements[i]));
-				}
-			}
-			text = buffer.toString();
-		} else
-			return;
-		if (text.length() == 0)
-			return;
-		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
-		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
-		clipboard.dispose();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java
deleted file mode 100644
index 18762c6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UninstallWizard.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- * @since 3.4
- */
-public class UninstallWizard extends ProvisioningOperationWizard {
-
-	SelectableIUsPage mainPage;
-
-	static IUElementListRoot makeElementRoot(Object[] selectedElements, String profileId) {
-		IUElementListRoot elementRoot = new IUElementListRoot();
-		ArrayList list = new ArrayList(selectedElements.length);
-		for (int i = 0; i < selectedElements.length; i++) {
-			IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
-			if (iu != null)
-				list.add(new InstalledIUElement(elementRoot, profileId, iu));
-		}
-		elementRoot.setChildren(list.toArray());
-		return elementRoot;
-	}
-
-	public UninstallWizard(Policy policy, String profileId, IInstallableUnit[] ius, PlannerResolutionOperation initialResolution) {
-		super(policy, profileId, makeElementRoot(ius, profileId), ius, initialResolution);
-		setWindowTitle(ProvUIMessages.UninstallIUOperationLabel);
-		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL));
-	}
-
-	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
-		mainPage = new SelectableIUsPage(policy, input, selections, profileId);
-		mainPage.setTitle(ProvUIMessages.UninstallIUOperationLabel);
-		mainPage.setDescription(ProvUIMessages.UninstallDialog_UninstallMessage);
-		mainPage.updateStatus(input, resolutionOperation);
-		return mainPage;
-	}
-
-	protected ResolutionResultsWizardPage createResolutionPage() {
-		return new UninstallWizardPage(policy, root, profileId, resolutionOperation);
-	}
-
-	protected IUElementListRoot makeResolutionElementRoot(Object[] selectedElements) {
-		return makeElementRoot(selectedElements, profileId);
-	}
-
-	protected ProfileChangeRequest computeProfileChangeRequest(Object[] selectedElements, MultiStatus additionalStatus, IProgressMonitor monitor) {
-		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileId);
-		request.removeInstallableUnits(ElementUtils.elementsToIUs(selectedElements));
-		return request;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
-	 */
-	protected IResolutionErrorReportingPage getErrorReportingPage() {
-		return mainPage;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.wizard.Wizard#getStartingPage()
-	 */
-	public IWizardPage getStartingPage() {
-		if (getCurrentStatus().isOK()) {
-			if (resolutionPage == null) {
-				resolutionPage = createResolutionPage();
-				addPage(resolutionPage);
-			}
-			mainPage.setPageComplete(true);
-			return resolutionPage;
-		}
-		return super.getStartingPage();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java
deleted file mode 100644
index 687a31f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/dialogs/UpdateWizard.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.dialogs;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableUpdateElement;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.PlannerHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.Updates;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.PlannerResolutionOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @since 3.4
- */
-public class UpdateWizard extends WizardWithLicenses {
-	IInstallableUnit[] iusToReplace;
-	QueryableMetadataRepositoryManager manager;
-	SelectableIUsPage mainPage;
-	boolean skipSelectionsPage = false;
-
-	public static IInstallableUnit[] getIUsToReplace(Object[] replacementElements) {
-		Set iusToReplace = new HashSet();
-		for (int i = 0; i < replacementElements.length; i++) {
-			if (replacementElements[i] instanceof AvailableUpdateElement) {
-				iusToReplace.add(((AvailableUpdateElement) replacementElements[i]).getIUToBeUpdated());
-			}
-		}
-		return (IInstallableUnit[]) iusToReplace.toArray(new IInstallableUnit[iusToReplace.size()]);
-	}
-
-	public static IInstallableUnit[] getReplacementIUs(Object[] replacementElements) {
-		Set replacements = new HashSet();
-		for (int i = 0; i < replacementElements.length; i++) {
-			if (replacementElements[i] instanceof AvailableUpdateElement) {
-				replacements.add(((AvailableUpdateElement) replacementElements[i]).getIU());
-			}
-		}
-		return (IInstallableUnit[]) replacements.toArray(new IInstallableUnit[replacements.size()]);
-	}
-
-	/**
-	 * Create a profile change request that represents an update of the specified IUs to their latest versions,
-	 * unless otherwise specified by the initial selections.  If an element root and selection container are provided, 
-	 * update those elements so that a wizard could be opened on them to reflect the profile change request.
-	 * 
-	 * @param iusToUpdate
-	 * @param profileId
-	 * @param root
-	 * @param initialSelections
-	 * @param monitor
-	 * @return the profile change request describing an update, or null if there is nothing to update.
-	 */
-	public static ProfileChangeRequest createProfileChangeRequest(IInstallableUnit[] iusToUpdate, String profileId, IUElementListRoot root, Collection initialSelections, IProgressMonitor monitor) {
-		// Here we create a profile change request by finding the latest version available for any replacement, unless
-		// otherwise specified in the selections.
-		// We have to consider the scenario where the only updates available are patches, in which case the original
-		// IU should not be removed as part of the update.
-		Set toBeUpdated = new HashSet();
-		HashSet elementsToPlan = new HashSet();
-		ArrayList allReplacements = new ArrayList();
-		IProfile profile;
-		try {
-			profile = ProvisioningUtil.getProfile(profileId);
-			if (profile == null)
-				return null;
-		} catch (ProvisionException e) {
-			return null;
-		}
-		SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.ProfileChangeRequestBuildingRequest, 100 * iusToUpdate.length);
-		for (int i = 0; i < iusToUpdate.length; i++) {
-			boolean selectionSpecified = false;
-			ElementQueryDescriptor descriptor = Policy.getDefault().getQueryProvider().getQueryDescriptor(new Updates(profileId, new IInstallableUnit[] {iusToUpdate[i]}));
-			Iterator iter = descriptor.performQuery(sub).iterator();
-			ArrayList currentReplacements = new ArrayList();
-			while (iter.hasNext()) {
-				IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
-				// If there is already a selected element representing an update for this iu, then we won't need
-				// to look for the latest.
-				if (iu != null) {
-					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=273967
-					// In the case of patches, it's possible that a patch is returned as an available update
-					// even though it is already installed, because we are querying each IU for updates individually.
-					// For now, we ignore any proposed update that is already installed.
-					Collector alreadyInstalled = profile.query(new InstallableUnitQuery(iu.getId(), iu.getVersion()), new Collector(), null);
-					if (alreadyInstalled.isEmpty()) {
-						toBeUpdated.add(iusToUpdate[i]);
-						AvailableUpdateElement element = new AvailableUpdateElement(root, iu, iusToUpdate[i], profileId, true);
-						currentReplacements.add(element);
-						allReplacements.add(element);
-						if (initialSelections != null && initialSelections.contains(element)) {
-							elementsToPlan.add(element);
-							selectionSpecified = true;
-						}
-					}
-				}
-			}
-			if (!selectionSpecified) {
-				// If no selection was specified, we must figure out the latest version to apply.
-				// The rules are that a true update will always win over a patch, but if only
-				// patches are available, they should all be selected.
-				// We first gather the latest versions of everything proposed.
-				// Patches are keyed by their id because they are unique and should not be compared to
-				// each other.  Updates are keyed by the IU they are updating so we can compare the
-				// versions and select the latest one
-				HashMap latestVersions = new HashMap();
-				boolean foundUpdate = false;
-				boolean foundPatch = false;
-				for (int j = 0; j < currentReplacements.size(); j++) {
-					AvailableUpdateElement replacementElement = (AvailableUpdateElement) currentReplacements.get(j);
-					String key;
-					if (Boolean.toString(true).equals(replacementElement.getIU().getProperty(IInstallableUnit.PROP_TYPE_PATCH))) {
-						foundPatch = true;
-						key = replacementElement.getIU().getId();
-					} else {
-						foundUpdate = true;
-						key = replacementElement.getIUToBeUpdated().getId();
-					}
-					AvailableUpdateElement latestElement = (AvailableUpdateElement) latestVersions.get(key);
-					IInstallableUnit latestIU = latestElement == null ? null : latestElement.getIU();
-					if (latestIU == null || replacementElement.getIU().getVersion().compareTo(latestIU.getVersion()) > 0)
-						latestVersions.put(key, replacementElement);
-				}
-				// If there is a true update available, ignore any patches found
-				// Patches are keyed by their own id
-				if (foundPatch && foundUpdate) {
-					Set keys = new HashSet();
-					keys.addAll(latestVersions.keySet());
-					Iterator keyIter = keys.iterator();
-					while (keyIter.hasNext()) {
-						String id = (String) keyIter.next();
-						// Get rid of things keyed by a different id.  We've already made sure
-						// that updates with a different id are keyed under the original id
-						if (!id.equals(iusToUpdate[i].getId())) {
-							latestVersions.remove(id);
-						}
-					}
-				}
-				elementsToPlan.addAll(latestVersions.values());
-			}
-			sub.worked(100);
-		}
-		if (root != null)
-			root.setChildren(allReplacements.toArray());
-
-		if (toBeUpdated.size() <= 0 || elementsToPlan.isEmpty()) {
-			sub.done();
-			return null;
-		}
-
-		ProfileChangeRequest request = ProfileChangeRequest.createByProfileId(profileId);
-		Iterator iter = elementsToPlan.iterator();
-		while (iter.hasNext()) {
-			AvailableUpdateElement element = (AvailableUpdateElement) iter.next();
-			IInstallableUnit theUpdate = element.getIU();
-			if (initialSelections != null) {
-				if (!initialSelections.contains(element))
-					initialSelections.add(element);
-			}
-			request.addInstallableUnits(new IInstallableUnit[] {theUpdate});
-			request.setInstallableUnitProfileProperty(theUpdate, IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
-			if (Boolean.toString(true).equals(theUpdate.getProperty(IInstallableUnit.PROP_TYPE_PATCH))) {
-				request.setInstallableUnitInclusionRules(theUpdate, PlannerHelper.createOptionalInclusionRule(theUpdate));
-			} else {
-				request.removeInstallableUnits(new IInstallableUnit[] {element.getIUToBeUpdated()});
-			}
-
-		}
-		sub.done();
-		return request;
-	}
-
-	public UpdateWizard(Policy policy, String profileId, IUElementListRoot root, Object[] initialSelections, PlannerResolutionOperation initialResolution, QueryableMetadataRepositoryManager manager) {
-		super(policy, profileId, root, initialSelections, initialResolution);
-		setWindowTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
-		setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE));
-		this.manager = manager;
-	}
-
-	protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
-		mainPage = new SelectableIUsPage(policy, input, selections, profileId);
-		mainPage.setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
-		mainPage.setDescription(ProvUIMessages.UpdateAction_UpdatesAvailableMessage);
-		mainPage.updateStatus(input, resolutionOperation);
-		return mainPage;
-	}
-
-	protected ResolutionResultsWizardPage createResolutionPage() {
-		return new UpdateWizardPage(policy, root, profileId, resolutionOperation);
-	}
-
-	protected IUElementListRoot makeResolutionElementRoot(Object[] selectedElements) {
-		IUElementListRoot elementRoot = new IUElementListRoot();
-		ArrayList list = new ArrayList(selectedElements.length);
-		for (int i = 0; i < selectedElements.length; i++) {
-			if (selectedElements[i] instanceof AvailableUpdateElement) {
-				AvailableUpdateElement element = (AvailableUpdateElement) selectedElements[i];
-				AvailableUpdateElement newElement = new AvailableUpdateElement(elementRoot, element.getIU(), element.getIUToBeUpdated(), profileId, policy.getQueryContext().getShowProvisioningPlanChildren());
-				list.add(newElement);
-			}
-		}
-		elementRoot.setChildren(list.toArray());
-		return elementRoot;
-	}
-
-	public void createPageControls(Composite pageContainer) {
-		super.createPageControls(pageContainer);
-		if (manager != null)
-			// async exec since we are in the middle of opening
-			pageContainer.getDisplay().asyncExec(new Runnable() {
-				public void run() {
-					manager.reportAccumulatedStatus();
-				}
-			});
-	}
-
-	protected ProfileChangeRequest computeProfileChangeRequest(Object[] selectedElements, MultiStatus additionalStatus, IProgressMonitor monitor) {
-		ArrayList initialSelections = new ArrayList();
-		initialSelections.addAll(Arrays.asList(selectedElements));
-		return createProfileChangeRequest(getIUsToReplace(selectedElements), profileId, null, initialSelections, monitor);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
-	 */
-	protected IResolutionErrorReportingPage getErrorReportingPage() {
-		return mainPage;
-	}
-
-	public void setSkipSelectionsPage(boolean skipSelectionsPage) {
-		this.skipSelectionsPage = skipSelectionsPage;
-	}
-
-	public IWizardPage getStartingPage() {
-		if (skipSelectionsPage) {
-			// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276963
-			IWizardPage page = getNextPage(mainPage);
-			if (page != null)
-				return page;
-		}
-		return mainPage;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ArtifactRepositories.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ArtifactRepositories.java
deleted file mode 100644
index be7ebe8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ArtifactRepositories.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.RootElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-
-/**
- * Element class that represents the root of an artifact
- * repository viewer.  Its children are the artifact repositories
- * obtained using the query installed in the content provider.
- * 
- * @since 3.4
- *
- */
-public class ArtifactRepositories extends RootElement {
-
-	public ArtifactRepositories(Policy policy) {
-		super(policy);
-	}
-
-	protected int getDefaultQueryType() {
-		return QueryProvider.ARTIFACT_REPOS;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-	 */
-	public String getLabel(Object o) {
-		return ProvUIMessages.Label_Repositories;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IRepositoryElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IRepositoryElement.java
deleted file mode 100644
index 665a941..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IRepositoryElement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * Interface for elements that represent repositories.
- * 
- * @since 3.4
- */
-public interface IRepositoryElement {
-
-	public URI getLocation();
-
-	public String getName();
-
-	public String getDescription();
-
-	public boolean isEnabled();
-
-	public void setEnabled(boolean enabled);
-
-	public IRepository getRepository(IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java
deleted file mode 100644
index 0c43cf1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/IUElementListRoot.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-
-
-/**
- * Element class representing a fixed set of IU's.  This element should
- * never appear in a list, but can be used as a parent in a list.
- * 
- * @since 3.5
- */
-public class IUElementListRoot extends ProvElement {
-
-	Object[] children;
-
-	public IUElementListRoot(Object[] children) {
-		super(null);
-		this.children = children;
-	}
-
-	public IUElementListRoot() {
-		this(new Object[0]);
-	}
-
-	public void setChildren(Object[] children) {
-		this.children = children;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
-	 */
-	protected String getImageId(Object obj) {
-		return null;
-	}
-
-	public String getLabel(Object o) {
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
-	 */
-	public Object[] getChildren(Object o) {
-		return children;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/InstalledIUElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/InstalledIUElement.java
deleted file mode 100644
index 107be0e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/InstalledIUElement.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-
-/**
- * Element wrapper class for installed IU's. Used instead of the plain IU when
- * there should be a parent profile available for operations.
- * 
- * @since 3.4
- */
-public class InstalledIUElement extends QueriedElement implements IIUElement {
-
-	String profileId;
-	IInstallableUnit iu;
-
-	public InstalledIUElement(Object parent, String profileId, IInstallableUnit iu) {
-		super(parent);
-		this.profileId = profileId;
-		this.iu = iu;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
-	 */
-	protected String getImageId(Object obj) {
-		return ProvUIImages.IMG_IU;
-	}
-
-	public String getLabel(Object o) {
-		return iu.getId();
-	}
-
-	public Object getAdapter(Class adapter) {
-		if (adapter == IInstallableUnit.class)
-			return iu;
-		return super.getAdapter(adapter);
-	}
-
-	public String getProfileId() {
-		return profileId;
-	}
-
-	public IInstallableUnit getIU() {
-		return iu;
-	}
-
-	// TODO Later we might consider showing this in the installed views,
-	// but it is less important than before install.
-	public long getSize() {
-		return SIZE_UNKNOWN;
-	}
-
-	public boolean shouldShowSize() {
-		return false;
-	}
-
-	public void computeSize(IProgressMonitor monitor) {
-		// Should never be called, as long as shouldShowSize() returns false
-	}
-
-	public boolean shouldShowVersion() {
-		return true;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
-	 */
-	public IRequiredCapability[] getRequirements() {
-		return iu.getRequiredCapabilities();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
-	 */
-	protected int getDefaultQueryType() {
-		return QueryProvider.INSTALLED_IUS;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
-	 */
-	public boolean shouldShowChildren() {
-		return true;
-	}
-
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof InstalledIUElement))
-			return false;
-		if (iu == null)
-			return false;
-		return iu.equals(((InstalledIUElement) obj).getIU());
-	}
-
-	public int hashCode() {
-		if (iu == null)
-			return 0;
-		return iu.hashCode();
-	}
-
-	public String toString() {
-		if (iu == null)
-			return "NULL"; //$NON-NLS-1$
-		return iu.toString();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/MetadataRepositories.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/MetadataRepositories.java
deleted file mode 100644
index 3ee1260..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/MetadataRepositories.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.RootElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
-
-/**
- * Element class that represents some collection of metadata repositories.
- * It can be configured so that it retrieves its children in different ways.
- * The default query type will return the metadata repositories specified in
- * this element.  Other query types can be used to query each repository and
- * aggregate the children.
- * 
- * @since 3.4
- *
- */
-public class MetadataRepositories extends RootElement {
-
-	private boolean includeDisabled = false;
-
-	public MetadataRepositories(Policy policy) {
-		this(policy.getQueryContext(), policy, null);
-	}
-
-	public MetadataRepositories(IUViewQueryContext queryContext, Policy policy, QueryableMetadataRepositoryManager queryable) {
-		super(queryContext, policy);
-		this.queryable = queryable;
-	}
-
-	/**
-	 * Get whether disabled repositories should be included in queries when no repositories
-	 * have been specified.  This boolean is used because the flags specified when getting
-	 * repositories from a repository manager are treated as an AND, and we want to permit
-	 * aggregating disabled repositories along with other flags.
-	 * 
-	 * @return includeDisabled <code>true</code> if disabled repositories should be included and
-	 * <code>false</code> if they should not be included.  
-	 */
-	public boolean getIncludeDisabledRepositories() {
-		return includeDisabled;
-	}
-
-	/**
-	 * Set whether disabled repositories should be included in queries when no repositories
-	 * have been specified.  This boolean is used because the flags specified when getting
-	 * repositories from a repository manager are treated as an AND, and we want to permit
-	 * aggregating disabled repositories along with other flags.
-	 * 
-	 * @param includeDisabled <code>true</code> if disabled repositories should be included and
-	 * <code>false</code> if they should not be included.  
-	 */
-	public void setIncludeDisabledRepositories(boolean includeDisabled) {
-		this.includeDisabled = includeDisabled;
-	}
-
-	/*
-	 * Overridden to check the query context.  We might
-	 * be showing repositories, or we might be flattening the 
-	 * view to some other element
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryType()
-	 */
-	public int getQueryType() {
-		if (getQueryContext() == null)
-			return getDefaultQueryType();
-		return getQueryContext().getQueryType();
-	}
-
-	protected int getDefaultQueryType() {
-		return QueryProvider.METADATA_REPOS;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-	 */
-	public String getLabel(Object o) {
-		return ProvUIMessages.Label_Repositories;
-	}
-
-	/*
-	 * Overridden to check whether the queryable repository manager
-	 * has loaded all repositories or not.
-	 * This is necessary to prevent background loading of already loaded repositories
-	 * by the DeferredTreeContentManager, which will add redundant children to the
-	 * viewer.  
-	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
-	 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
-	 */
-	public boolean hasQueryable() {
-		// We use the superclass implementation if we don't have a queryable or
-		// don't recognize it.  Also, if we are merely iterating sites 
-		// (type = METADATA_REPOSITORIES) rather than loading repos
-		// to obtain further results, use the superclass
-		if (queryable == null || !(queryable instanceof QueryableMetadataRepositoryManager) || getQueryType() == QueryProvider.METADATA_REPOS)
-			return super.hasQueryable();
-		return ((QueryableMetadataRepositoryManager) queryable).areRepositoriesLoaded();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ProfileElement.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ProfileElement.java
deleted file mode 100644
index 7c1cb10..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/ProfileElement.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.query.IQueryable;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Element wrapper class for a profile that uses the query
- * mechanism to obtain its contents.
- * 
- * @since 3.4
- */
-public class ProfileElement extends RemoteQueriedElement {
-	String profileId;
-
-	public ProfileElement(Object parent, String profileId) {
-		super(parent);
-		this.profileId = profileId;
-	}
-
-	public Object getAdapter(Class adapter) {
-		if (adapter == IProfile.class)
-			return getQueryable();
-		return super.getAdapter(adapter);
-	}
-
-	protected String getImageId(Object obj) {
-		return ProvUIImages.IMG_PROFILE;
-	}
-
-	public String getLabel(Object o) {
-		return profileId;
-	}
-
-	public String getProfileId() {
-		return profileId;
-	}
-
-	protected int getDefaultQueryType() {
-		return QueryProvider.INSTALLED_IUS;
-	}
-
-	public IQueryable getQueryable() {
-		try {
-			return ProvisioningUtil.getProfile(profileId);
-		} catch (ProvisionException e) {
-			handleException(e, NLS.bind(ProvUIMessages.ProfileElement_InvalidProfile, profileId));
-			return null;
-		}
-	}
-
-	/*
-	 * Overridden to check whether we know the profile id rather
-	 * than fetch the profile from the registry using getQueryable()
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
-	 */
-	public boolean knowsQueryable() {
-		return profileId != null;
-	}
-
-	/*
-	 * Overridden to check the children so that profiles
-	 * showing in profile views accurately reflect if they
-	 * are empty.  We do not cache the children because often
-	 * this element is the input of a view and when the view
-	 * is refreshed we want to refetch the children.
-	 * 
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement#isContainer()
-	 */
-	public boolean isContainer() {
-		return super.getChildren(this).length > 0;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Profiles.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Profiles.java
deleted file mode 100644
index dc93702..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Profiles.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.RootElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-
-/**
- * Element class that represents the root of a profile
- * viewer.  Its children are the profiles that match the
- * specified query for profiles.
- * 
- * @since 3.4
- *
- */
-public class Profiles extends RootElement {
-
-	public Profiles(Policy policy) {
-		super(policy);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-	 */
-	public String getLabel(Object o) {
-		return ProvUIMessages.Label_Profiles;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
-	 */
-	protected int getDefaultQueryType() {
-		return QueryProvider.PROFILES;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Updates.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Updates.java
deleted file mode 100644
index cbb93eb..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/model/Updates.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.QueryProvider;
-
-/**
- * Element class that represents available updates.
- * 
- * @since 3.4
- *
- */
-public class Updates extends QueriedElement {
-
-	private String profileId;
-	private IInstallableUnit[] iusToBeUpdated;
-
-	public Updates(String profileId) {
-		this(profileId, null);
-	}
-
-	public Updates(String profileId, IInstallableUnit[] iusToBeUpdated) {
-		super(null);
-		this.profileId = profileId;
-		this.iusToBeUpdated = iusToBeUpdated;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
-	 */
-	public String getLabel(Object o) {
-		return ProvUIMessages.Updates_Label;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
-	 */
-	protected int getDefaultQueryType() {
-		return QueryProvider.AVAILABLE_UPDATES;
-	}
-
-	public String getProfileId() {
-		return profileId;
-	}
-
-	public IInstallableUnit[] getIUs() {
-		return iusToBeUpdated;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddColocatedRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddColocatedRepositoryOperation.java
deleted file mode 100644
index 2e09c1e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddColocatedRepositoryOperation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Operation that adds colocated artifact and metadata repositories
- * given a URL.
- * 
- * @since 3.4
- */
-public class AddColocatedRepositoryOperation extends AddRepositoryOperation {
-	public AddColocatedRepositoryOperation(String label, URI url) {
-		super(label, new URI[] {url});
-	}
-
-	public AddColocatedRepositoryOperation(String label, URI[] urls) {
-		super(label, urls);
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length * 2);
-
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.addMetadataRepository(locations[i], notify);
-			mon.worked(1);
-			ProvisioningUtil.addArtifactRepository(locations[i], notify);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-
-	protected void setNickname(URI location, String nickname) throws ProvisionException {
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
-			ProvisioningUtil.setArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME, nickname);
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddProfileOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddProfileOperation.java
deleted file mode 100644
index f2bf719..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddProfileOperation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Operation that adds the given profile to the profile registry.
- * 
- * @since 3.4
- */
-public class AddProfileOperation extends ProvisioningOperation {
-	private String profileId;
-	private Map profileProperties;
-
-	public AddProfileOperation(String label, String profileId, Map profileProperties) {
-		super(label);
-		this.profileId = profileId;
-		this.profileProperties = profileProperties;
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		ProvisioningUtil.addProfile(profileId, profileProperties, monitor);
-		return okStatus();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddRepositoryOperation.java
deleted file mode 100644
index ebcd683..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/AddRepositoryOperation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-
-/**
- * Abstract class representing an operation that adds repositories,
- * using an optional nickname.
- * 
- * @since 3.5
- */
-public abstract class AddRepositoryOperation extends RepositoryOperation {
-
-	protected String[] nicknames;
-
-	public AddRepositoryOperation(String label, URI[] locations) {
-		super(label, locations);
-	}
-
-	public void setNicknames(String[] nicknames) {
-		Assert.isLegal(nicknames != null && nicknames.length == locations.length);
-		this.nicknames = nicknames;
-	}
-
-	public boolean runInBackground() {
-		return true;
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		boolean batched = false;
-		if (locations != null && locations.length > 1) {
-			ProvUI.startBatchOperation();
-			batched = true;
-		}
-		IStatus status = doBatchedExecute(monitor);
-		if (nicknames != null) {
-			for (int i = 0; i < nicknames.length; i++) {
-				setNickname(locations[i], nicknames[i]);
-			}
-		}
-		if (batched)
-			ProvUI.endBatchOperation(notify);
-		return status;
-	}
-
-	protected abstract void setNickname(URI location, String nickname) throws ProvisionException;
-
-	protected abstract IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException;
-
-	public void setNotify(boolean notify) {
-		this.notify = notify;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/DownloadPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/DownloadPhaseSet.java
deleted file mode 100644
index 2132765..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/DownloadPhaseSet.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-/**
- * 
- */
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.equinox.internal.provisional.p2.engine.Phase;
-import org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect;
-
-public class DownloadPhaseSet extends PhaseSet {
-	public DownloadPhaseSet() {
-		super(new Phase[] {new Collect(10)});
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java
deleted file mode 100644
index 8674fa6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/PlannerResolutionOperation.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.internal.provisional.p2.ui.IStatusCodes;
-import org.eclipse.equinox.internal.provisional.p2.ui.ResolutionResult;
-
-/**
- * Class representing a provisioning profile plan
- *
- * @since 3.4
- */
-public class PlannerResolutionOperation extends ProvisioningOperation {
-
-	ProfileChangeRequest request;
-	String profileId;
-	boolean isUser = true;
-	ProvisioningPlan plan;
-	MultiStatus additionalStatus;
-	ResolutionResult report;
-	ProvisioningContext provisioningContext;
-
-	public PlannerResolutionOperation(String label, String profileId, ProfileChangeRequest request, ProvisioningContext provisioningContext, MultiStatus additionalStatus, boolean isUser) {
-		super(label);
-		this.request = request;
-		this.profileId = profileId;
-		this.isUser = isUser;
-		if (provisioningContext == null)
-			this.provisioningContext = new ProvisioningContext();
-		else
-			this.provisioningContext = provisioningContext;
-		Assert.isNotNull(additionalStatus);
-		this.additionalStatus = additionalStatus;
-	}
-
-	public ProvisioningPlan getProvisioningPlan() {
-		return plan;
-	}
-
-	public ProfileChangeRequest getProfileChangeRequest() {
-		return request;
-	}
-
-	public ProvisioningContext getProvisioningContext() {
-		return provisioningContext;
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		plan = ProvisioningUtil.getProvisioningPlan(request, provisioningContext, monitor);
-		if (plan == null)
-			return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, IStatusCodes.UNEXPECTED_NOTHING_TO_DO, ProvUIMessages.PlannerResolutionOperation_UnexpectedError, null);
-		// We are reporting on our ability to get a plan, not on the status of the plan itself.
-		// Callers will interpret and report the status as needed.
-		return Status.OK_STATUS;
-	}
-
-	public ResolutionResult getResolutionResult() {
-		if (report == null) {
-			report = PlanAnalyzer.computeResolutionResult(request, plan, additionalStatus);
-		}
-		return report;
-	}
-
-	public boolean runInBackground() {
-		return true;
-	}
-
-	public boolean isUser() {
-		return isUser;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProfileModificationOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProfileModificationOperation.java
deleted file mode 100644
index c230242..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProfileModificationOperation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-
-/**
- * Class representing a provisioning profile plan
- * 
- * @since 3.4
- */
-public class ProfileModificationOperation extends ProvisioningOperation {
-
-	ProvisioningPlan plan;
-	String profileId;
-	PhaseSet phaseSet;
-	boolean isUser = true;
-	ProvisioningContext provisioningContext;
-
-	public ProfileModificationOperation(String label, String profileId, ProvisioningPlan plan, ProvisioningContext context) {
-		this(label, profileId, plan, context, null, true);
-	}
-
-	public ProfileModificationOperation(String label, String profileId, ProvisioningPlan plan, ProvisioningContext context, PhaseSet set, boolean isUser) {
-		super(label);
-		this.plan = plan;
-		this.profileId = profileId;
-		this.provisioningContext = context;
-		this.isUser = isUser;
-		if (set == null)
-			phaseSet = new DefaultPhaseSet();
-		else
-			phaseSet = set;
-	}
-
-	public String getProfileId() {
-		return profileId;
-	}
-
-	protected IProfile getProfile() {
-		try {
-			return ProvisioningUtil.getProfile(profileId);
-		} catch (ProvisionException e) {
-			return null;
-		}
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		return ProvisioningUtil.performProvisioningPlan(plan, phaseSet, provisioningContext, monitor);
-	}
-
-	public boolean runInBackground() {
-		return true;
-	}
-
-	public boolean isUser() {
-		return isUser;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningOperation.java
deleted file mode 100644
index c523df4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningOperation.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Abstract class representing provisioning operations.  ProvisioningOperations
- * can be run in the foreground or in the background as a job.
- * 
- * @since 3.4
- */
-
-public abstract class ProvisioningOperation {
-
-	private String label;
-
-	public ProvisioningOperation(String label) {
-		this.label = label;
-	}
-
-	/**
-	 * 
-	 */
-	public IStatus execute(IProgressMonitor monitor) throws ProvisionException {
-		IStatus status;
-		try {
-			status = doExecute(monitor);
-		} catch (OperationCanceledException e) {
-			return Status.CANCEL_STATUS;
-		}
-		return status;
-	}
-
-	/**
-	 * Perform the specific work involved in executing this operation.
-	 * 
-	 * @param monitor
-	 *            the progress monitor to use for the operation
-	 * @throws ProvisionException
-	 *             propagates any ProvisionException thrown
-	 * 
-	 */
-	protected abstract IStatus doExecute(IProgressMonitor monitor) throws ProvisionException;
-
-	protected IStatus okStatus() {
-		return Status.OK_STATUS;
-	}
-
-	public String getLabel() {
-		return label;
-	}
-
-	/**
-	 * Return a boolean indicating whether the operation can be run in the
-	 * background. 
-	 * 
-	 * @return <code>true</code> if the operation can be run in the background, and
-	 * <code>false</code> if it should be run in the UI.
-	 */
-	public boolean runInBackground() {
-		return false;
-	}
-
-	/**
-	 * Return a boolean indicating whether this operation was triggered by the
-	 * user.  This value is used to determine whether any job running this operation
-	 * should be considered a user job.  This can affect the way progress is shown to the user.
-	 * 
-	 * @return <code>true</code> if the operation was initiated by the user, 
-	 * <code>false</code> if it was not.
-	 */
-	public boolean isUser() {
-		return true;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningUtil.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningUtil.java
deleted file mode 100644
index a0f2a92..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningUtil.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Utility methods for clients using the provisioning UI
- * 
- * @since 3.4
- */
-public class ProvisioningUtil {
-
-	public static void addMetadataRepository(URI location, boolean notify) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		manager.addRepository(location);
-		if (notify) {
-			IProvisioningEventBus bus = ProvUIActivator.getDefault().getProvisioningEventBus();
-			if (bus != null) {
-				bus.publishEvent(new UIRepositoryEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.ADDED));
-			}
-		}
-	}
-
-	public static String getMetadataRepositoryProperty(URI location, String key) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		return manager.getRepositoryProperty(location, key);
-	}
-
-	public static void setMetadataRepositoryProperty(URI location, String key, String value) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		manager.setRepositoryProperty(location, key, value);
-	}
-
-	public static boolean getMetadataRepositoryEnablement(URI location) {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			return false;
-		return manager.isEnabled(location);
-	}
-
-	public static boolean getArtifactRepositoryEnablement(URI location) {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			return false;
-		return manager.isEnabled(location);
-	}
-
-	public static IMetadataRepository loadMetadataRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		IMetadataRepository repo = manager.loadRepository(location, monitor);
-		// If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
-		// This will keep the name in the manager even when the repo is not loaded
-		String name = getMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME);
-		if (name == null || name.length() == 0) {
-			name = repo.getName();
-			if (name != null && name.length() > 0)
-				setMetadataRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
-		}
-		return repo;
-	}
-
-	public static IStatus validateMetadataRepositoryLocation(URI location, IProgressMonitor monitor) {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		return manager.validateRepositoryLocation(location, monitor);
-	}
-
-	public static void removeMetadataRepository(URI location) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		manager.removeRepository(location);
-		IProvisioningEventBus bus = ProvUIActivator.getDefault().getProvisioningEventBus();
-		if (bus != null) {
-			bus.publishEvent(new UIRepositoryEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.REMOVED));
-		}
-	}
-
-	public static void addArtifactRepository(URI location, boolean notify) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		manager.addRepository(location);
-		if (notify) {
-			IProvisioningEventBus bus = ProvUIActivator.getDefault().getProvisioningEventBus();
-			if (bus != null) {
-				bus.publishEvent(new UIRepositoryEvent(location, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED));
-			}
-		}
-	}
-
-	public static String getArtifactRepositoryProperty(URI location, String key) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		return manager.getRepositoryProperty(location, key);
-	}
-
-	public static void setArtifactRepositoryProperty(URI location, String key, String value) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		manager.setRepositoryProperty(location, key, value);
-	}
-
-	public static IArtifactRepository loadArtifactRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		IArtifactRepository repo = manager.loadRepository(location, monitor);
-		if (repo == null) {
-			throw new ProvisionException(NLS.bind(ProvUIMessages.ProvisioningUtil_LoadRepositoryFailure, location));
-		}
-		// If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
-		// This will keep the name in the manager even when the repo is not loaded
-		String name = getArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME);
-		if (name == null) {
-			name = getArtifactRepositoryProperty(location, IRepository.PROP_NAME);
-			if (name != null)
-				setArtifactRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
-		}
-		return repo;
-	}
-
-	public static void removeArtifactRepository(URI location) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		manager.removeRepository(location);
-		IProvisioningEventBus bus = ProvUIActivator.getDefault().getProvisioningEventBus();
-		if (bus != null) {
-			bus.publishEvent(new UIRepositoryEvent(location, IRepository.TYPE_ARTIFACT, RepositoryEvent.REMOVED));
-		}
-	}
-
-	public static IProfile addProfile(String profileId, Map properties, IProgressMonitor monitor) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		return profileRegistry.addProfile(profileId, properties);
-	}
-
-	public static void removeProfile(String profileId, IProgressMonitor monitor) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		profileRegistry.removeProfile(profileId);
-	}
-
-	public static IProfile[] getProfiles() throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		return profileRegistry.getProfiles();
-	}
-
-	public static long[] getProfileTimestamps(String id) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		return profileRegistry.listProfileTimestamps(id);
-
-	}
-
-	public static IProfile getProfile(String id) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		return profileRegistry.getProfile(id);
-	}
-
-	public static IProfile getProfile(String id, long timestamp) throws ProvisionException {
-		IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(ProvUIActivator.getContext(), IProfileRegistry.class.getName());
-		if (profileRegistry == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoProfileRegistryFound);
-		}
-		return profileRegistry.getProfile(id, timestamp);
-	}
-
-	public static URI[] getMetadataRepositories(int flags) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		return manager.getKnownRepositories(flags);
-	}
-
-	public static void refreshMetadataRepositories(URI[] urls, IProgressMonitor monitor) throws ProvisionException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		SubMonitor mon = SubMonitor.convert(monitor, urls.length * 100);
-		for (int i = 0; i < urls.length; i++) {
-			try {
-				manager.refreshRepository(urls[i], mon.newChild(100));
-			} catch (ProvisionException e) {
-				//ignore problematic repositories when refreshing
-			}
-		}
-	}
-
-	public static URI[] getArtifactRepositories(int flags) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		return manager.getKnownRepositories(flags);
-	}
-
-	public static void refreshArtifactRepositories(URI[] urls, IProgressMonitor monitor) throws ProvisionException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (manager == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoRepositoryManager);
-		}
-		SubMonitor mon = SubMonitor.convert(monitor, urls.length * 100);
-		for (int i = 0; i < urls.length; i++) {
-			manager.refreshRepository(urls[i], mon.newChild(100));
-		}
-	}
-
-	/*
-	 * Get the plan for the specified install operation
-	 */
-	public static ProvisioningPlan getProvisioningPlan(ProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) throws ProvisionException {
-		try {
-			return getPlanner().getProvisioningPlan(request, context, monitor);
-		} catch (OperationCanceledException e) {
-			return null;
-		}
-	}
-
-	/*
-	 * Get a plan for reverting to a specified profile snapshot
-	 */
-	public static ProvisioningPlan getRevertPlan(IProfile currentProfile, IProfile snapshot, IProgressMonitor monitor) throws ProvisionException {
-		Assert.isNotNull(currentProfile);
-		Assert.isNotNull(snapshot);
-		return getPlanner().getDiffPlan(currentProfile, snapshot, monitor);
-	}
-
-	/*
-	 * Get sizing info for the specified plan
-	 */
-	public static long getSize(ProvisioningPlan plan, String profileId, ProvisioningContext context, IProgressMonitor monitor) throws ProvisionException {
-		// If there is nothing to size, return 0
-		if (plan == null)
-			return IIUElement.SIZE_NOTAPPLICABLE;
-		if (plan.getOperands().length == 0)
-			return 0;
-		long installPlanSize = 0;
-		SubMonitor mon = SubMonitor.convert(monitor, 300);
-		if (plan.getInstallerPlan() != null) {
-			SizingPhaseSet set = new SizingPhaseSet();
-			IStatus status = getEngine().perform(getProfile(profileId), set, plan.getInstallerPlan().getOperands(), context, mon.newChild(100));
-			if (status.isOK())
-				installPlanSize = set.getSizing().getDiskSize();
-		} else {
-			mon.worked(100);
-		}
-		SizingPhaseSet set = new SizingPhaseSet();
-		IStatus status = getEngine().perform(getProfile(profileId), set, plan.getOperands(), context, mon.newChild(200));
-		if (status.isOK())
-			return installPlanSize + set.getSizing().getDiskSize();
-		return IIUElement.SIZE_UNAVAILABLE;
-	}
-
-	/**
-	 * Perform the specified provisioning plan.
-	 * 
-	 * @param plan the plan to perform
-	 * @param phaseSet the phase set to use
-	 * @param profile the profile to be changed.  This parameter is now ignored.
-	 * @param context the provisioning context to be used
-	 * @param monitor the progress monitor 
-	 * @return a status indicating the success of the plan
-	 * @throws ProvisionException
-	 * 
-	 * @deprecated clients should use {@linkplain #performProvisioningPlan(ProvisioningPlan, PhaseSet, ProvisioningContext, IProgressMonitor)} 
-	 * because the profile argument is now ignored.
-	 */
-	public static IStatus performProvisioningPlan(ProvisioningPlan plan, PhaseSet phaseSet, IProfile profile, ProvisioningContext context, IProgressMonitor monitor) throws ProvisionException {
-		// ignore the profile, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=272355
-		return performProvisioningPlan(plan, phaseSet, context, monitor);
-	}
-
-	public static IStatus performProvisioningPlan(ProvisioningPlan plan, PhaseSet phaseSet, ProvisioningContext context, IProgressMonitor monitor) throws ProvisionException {
-		PhaseSet set;
-		if (phaseSet == null)
-			set = new DefaultPhaseSet();
-		else
-			set = phaseSet;
-
-		// 300 ticks for download, 100 to install handlers, 100 to install the rest
-		SubMonitor mon = SubMonitor.convert(monitor, 500);
-		int ticksUsed = 0;
-
-		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=272355
-		// The exact profile instance used in the profile change request and passed to the engine must be used for all
-		// of these operations, otherwise we can get profile out of synch errors.	
-		IProfile profile = plan.getProfileChangeRequest().getProfile();
-
-		if (plan.getInstallerPlan() != null) {
-			if (set instanceof DefaultPhaseSet) {
-				// If the phase set calls for download and install, then we want to download everything atomically before 
-				// applying the install plan.  This way, we can be sure to install the install handler only if we know 
-				// we will be able to get everything else.
-				List allOperands = new ArrayList();
-				allOperands.addAll(Arrays.asList(plan.getOperands()));
-				allOperands.addAll(Arrays.asList(plan.getInstallerPlan().getOperands()));
-				PhaseSet download = new DownloadPhaseSet();
-				IStatus downloadStatus = getEngine().perform(profile, download, (Operand[]) allOperands.toArray(new Operand[allOperands.size()]), context, mon.newChild(300));
-				if (!downloadStatus.isOK()) {
-					mon.done();
-					return downloadStatus;
-				}
-				ticksUsed = 300;
-			}
-			// we pre-downloaded if necessary.  Now perform the plan against the original phase set.
-			IStatus installerPlanStatus = getEngine().perform(profile, set, plan.getInstallerPlan().getOperands(), context, mon.newChild(100));
-			if (!installerPlanStatus.isOK()) {
-				mon.done();
-				return installerPlanStatus;
-			}
-			ticksUsed += 100;
-			// Apply the configuration
-			Configurator configChanger = (Configurator) ServiceHelper.getService(ProvUIActivator.getContext(), Configurator.class.getName());
-			try {
-				// TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274876
-				ProvisioningOperationRunner.suppressRestart(true);
-				configChanger.applyConfiguration();
-				// We just applied the configuration so restart is no longer required.
-				ProvisioningOperationRunner.clearRestartRequests();
-			} catch (IOException e) {
-				mon.done();
-				return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningUtil_InstallPlanConfigurationError, e);
-			} finally {
-				ProvisioningOperationRunner.suppressRestart(false);
-			}
-		}
-		return getEngine().perform(profile, set, plan.getOperands(), context, mon.newChild(500 - ticksUsed));
-	}
-
-	private static IEngine getEngine() throws ProvisionException {
-		IEngine engine = (IEngine) ServiceHelper.getService(ProvUIActivator.getContext(), IEngine.SERVICE_NAME);
-		if (engine == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoEngineFound);
-		}
-		return engine;
-	}
-
-	public static IPlanner getPlanner() throws ProvisionException {
-		IPlanner planner = (IPlanner) ServiceHelper.getService(ProvUIActivator.getContext(), IPlanner.class.getName());
-		if (planner == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoPlannerFound);
-		}
-		return planner;
-	}
-
-	public static IDirector getDirector() throws ProvisionException {
-		IDirector director = (IDirector) ServiceHelper.getService(ProvUIActivator.getContext(), IDirector.class.getName());
-		if (director == null) {
-			throw new ProvisionException(ProvUIMessages.ProvisioningUtil_NoDirectorFound);
-		}
-		return director;
-	}
-
-	public static void setColocatedRepositoryEnablement(URI location, boolean enabled) {
-		IMetadataRepositoryManager metaManager = (IMetadataRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IMetadataRepositoryManager.class.getName());
-		if (metaManager != null)
-			metaManager.setEnabled(location, enabled);
-		IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) ServiceHelper.getService(ProvUIActivator.getContext(), IArtifactRepositoryManager.class.getName());
-		if (artifactManager != null)
-			artifactManager.setEnabled(location, enabled);
-	}
-
-	public static boolean isCategory(IInstallableUnit iu) {
-		String isCategory = iu.getProperty(IInstallableUnit.PROP_TYPE_CATEGORY);
-		return isCategory != null && Boolean.valueOf(isCategory).booleanValue();
-	}
-
-	/**
-	 * Perform the provisioning plan using a default context that contacts all repositories.
-	 * @param plan the plan to perform
-	 * @param phaseSet the phase set to use
-	 * @param profile the profile to be changed
-	 * @param monitor the progress monitor 
-	 * @return a status indicating the success of the plan
-	 * @throws ProvisionException
-	 * 
-	 * @deprecated clients should use {@linkplain #performProvisioningPlan(ProvisioningPlan, PhaseSet, IProfile, ProvisioningContext, IProgressMonitor)} 
-	 * to explicitly establish a provisioning context.  Otherwise all repositories will be contacted
-	 */
-	public static IStatus performProvisioningPlan(ProvisioningPlan plan, PhaseSet phaseSet, IProfile profile, IProgressMonitor monitor) throws ProvisionException {
-		PhaseSet set;
-		if (phaseSet == null)
-			set = new DefaultPhaseSet();
-		else
-			set = phaseSet;
-		return getEngine().perform(profile, set, plan.getOperands(), new ProvisioningContext(), monitor);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveColocatedRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveColocatedRepositoryOperation.java
deleted file mode 100644
index 6faf3b0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveColocatedRepositoryOperation.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Operation that removes the colocated repositories with the given locations. *
- * 
- * @since 3.4
- */
-public class RemoveColocatedRepositoryOperation extends RemoveRepositoryOperation {
-
-	public RemoveColocatedRepositoryOperation(String label, URI[] repoLocations) {
-		super(label, repoLocations);
-	}
-
-	protected IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException {
-		SubMonitor mon = SubMonitor.convert(monitor, locations.length * 2);
-
-		for (int i = 0; i < locations.length; i++) {
-			ProvisioningUtil.removeMetadataRepository(locations[i]);
-			mon.worked(1);
-			ProvisioningUtil.removeArtifactRepository(locations[i]);
-			mon.worked(1);
-		}
-		return okStatus();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveProfilesOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveProfilesOperation.java
deleted file mode 100644
index db1fa29..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveProfilesOperation.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-
-/**
- * Operation that removes a profile
- * 
- * @since 3.4
- */
-public class RemoveProfilesOperation extends ProvisioningOperation {
-	String[] profileIds;
-
-	public RemoveProfilesOperation(String label, String[] profileIds) {
-		super(label);
-		this.profileIds = profileIds;
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		for (int i = 0; i < profileIds.length; i++) {
-			ProvisioningUtil.removeProfile(profileIds[i], monitor);
-		}
-		// assume the best if no exception
-		return okStatus();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveRepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveRepositoryOperation.java
deleted file mode 100644
index b50015e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RemoveRepositoryOperation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.net.URI;
-
-/**
- * Abstract class representing an operation that removes repositories.
- * 
- * @since 3.5
- */
-public abstract class RemoveRepositoryOperation extends RepositoryOperation {
-
-	public RemoveRepositoryOperation(String label, URI[] locations) {
-		super(label, locations);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RepositoryOperation.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RepositoryOperation.java
deleted file mode 100644
index 8fa9cb0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/RepositoryOperation.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-
-/**
- * Abstract class representing provisioning repository operations
- * 
- * @since 3.4
- */
-public abstract class RepositoryOperation extends ProvisioningOperation {
-
-	protected URI[] locations;
-	protected boolean notify = true;
-
-	public RepositoryOperation(String label, URI[] urls) {
-		super(label);
-		this.locations = urls;
-	}
-
-	public boolean runInBackground() {
-		return true;
-	}
-
-	protected IStatus doExecute(IProgressMonitor monitor) throws ProvisionException {
-		boolean batched = false;
-		if (locations != null && locations.length > 1) {
-			ProvUI.startBatchOperation();
-			batched = true;
-		}
-		IStatus status = doBatchedExecute(monitor);
-		if (batched && notify)
-			ProvUI.endBatchOperation(notify);
-		return status;
-	}
-
-	protected abstract IStatus doBatchedExecute(IProgressMonitor monitor) throws ProvisionException;
-
-	public void setNotify(boolean notify) {
-		this.notify = notify;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/SizingPhaseSet.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/SizingPhaseSet.java
deleted file mode 100644
index be655bd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/operations/SizingPhaseSet.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-/**
- * 
- */
-package org.eclipse.equinox.internal.provisional.p2.ui.operations;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.Phase;
-import org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Sizing;
-
-public class SizingPhaseSet extends PhaseSet {
-	private static Sizing sizing;
-
-	SizingPhaseSet() {
-		super(new Phase[] {sizing = new Sizing(100, ProvUIMessages.SizingPhaseSet_PhaseSetName)});
-	}
-
-	Sizing getSizing() {
-		return sizing;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/ColocatedRepositoryManipulator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/ColocatedRepositoryManipulator.java
deleted file mode 100644
index b8d4d3e..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/ColocatedRepositoryManipulator.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.DefaultMetadataURLValidator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RepositoryManipulationPage;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.*;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Provides a repository manipulator that interprets URLs as colocated
- * artifact and metadata repositories.  If a preference id has been
- * set, the manipulator will open a pref page to manipulate sites.  If it has
- * not been set, then a dialog will be opened.
- * 
- * @since 3.5
- */
-
-public class ColocatedRepositoryManipulator extends RepositoryManipulator {
-
-	Policy policy;
-	String prefPageId = null;
-
-	public ColocatedRepositoryManipulator(Policy policy, String prefPageId) {
-		this.policy = policy;
-		this.prefPageId = prefPageId;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getManipulatorButtonLabel()
-	 */
-	public String getManipulatorButtonLabel() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_ManageSites;
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#manipulateRepositories(org.eclipse.swt.widgets.Shell)
-	 */
-	public boolean manipulateRepositories(Shell shell) {
-		if (prefPageId != null) {
-			PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell, prefPageId, null, null);
-			dialog.open();
-		} else {
-			TitleAreaDialog dialog = new TitleAreaDialog(shell) {
-				RepositoryManipulationPage page;
-
-				protected Control createDialogArea(Composite parent) {
-					page = new RepositoryManipulationPage();
-					page.setPolicy(policy);
-					page.init(PlatformUI.getWorkbench());
-					page.createControl(parent);
-					this.setTitle(ProvUIMessages.RepositoryManipulationPage_Title);
-					this.setMessage(ProvUIMessages.RepositoryManipulationPage_Description);
-					return page.getControl();
-				}
-
-				protected void okPressed() {
-					if (page.performOk())
-						super.okPressed();
-				}
-
-				protected void cancelPressed() {
-					if (page.performCancel())
-						super.cancelPressed();
-				}
-			};
-			dialog.open();
-		}
-		return true;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getAddOperation(java.net.URI)
-	 */
-	public AddRepositoryOperation getAddOperation(URI repoLocation) {
-		return new AddColocatedRepositoryOperation(getAddOperationLabel(), repoLocation);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getAddOperationLabel()
-	 */
-	public String getAddOperationLabel() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_AddSiteOperationLabel;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
-	 */
-	public URI[] getKnownRepositories() {
-		try {
-			return ProvisioningUtil.getMetadataRepositories(policy.getQueryContext().getMetadataRepositoryFlags());
-		} catch (ProvisionException e) {
-			return new URI[0];
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getRemoveOperation(java.net.URI[])
-	 */
-	public RemoveRepositoryOperation getRemoveOperation(URI[] reposToRemove) {
-		return new RemoveColocatedRepositoryOperation(getRemoveOperationLabel(), reposToRemove);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getRemoveOperationLabel()
-	 */
-	public String getRemoveOperationLabel() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_RemoveSiteOperationLabel;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getURLValidator(org.eclipse.swt.widgets.Shell)
-	 */
-	public RepositoryLocationValidator getRepositoryLocationValidator(Shell shell) {
-		DefaultMetadataURLValidator validator = new DefaultMetadataURLValidator();
-		validator.setKnownRepositoriesFlag(policy.getQueryContext().getMetadataRepositoryFlags());
-		return validator;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getManipulatorLinkLabel()
-	 */
-	public String getManipulatorLinkLabel() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_GotoPrefs;
-
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getSiteNotFoundCorrectionString()
-	 */
-	public String getRepositoryNotFoundInstructionString() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_SiteNotFoundDescription;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getManipulatorInstructionString()
-	 */
-	public String getManipulatorInstructionString() {
-		return ProvUIMessages.ColocatedRepositoryManipulator_NoContentExplanation;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IProfileChooser.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IProfileChooser.java
deleted file mode 100644
index 9bf0036..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IProfileChooser.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Interface for a mechanism that chooses a profile from the profile registry.
- * the mechanism may or may not involve the user.
- * 
- * @since 3.4
- * 
- */
-
-public interface IProfileChooser {
-	/**
-	 * Return a chosen profile id, or <code>null</code> if there is no profile
-	 * chosen.
-	 */
-	public String getProfileId(Shell shell);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IUViewQueryContext.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IUViewQueryContext.java
deleted file mode 100644
index 7f5c5a4..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/IUViewQueryContext.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-
-/**
- * IUViewQueryContext defines the different ways 
- * IUs can be viewed.  Clients can use this context to 
- * control how the various IU views are represented and traversed.
- * 
- * @since 3.4
- */
-public class IUViewQueryContext {
-	public static final int AVAILABLE_VIEW_BY_CATEGORY = 1;
-	public static final int AVAILABLE_VIEW_BY_REPO = 2;
-	public static final int AVAILABLE_VIEW_FLAT = 3;
-
-	// Available view settings
-	// Default available view to repo as this provides the fastest information
-	private int view = AVAILABLE_VIEW_BY_REPO;
-	// What property to use for choosing visible IUs
-	private String visibleAvailableIUProperty = IInstallableUnit.PROP_TYPE_GROUP;
-	// Whether to show latest versions only, defaults to
-	// true.  Clients typically use a pref setting or dialog
-	// setting to initialize
-	private boolean showLatestVersionsOnly = true;
-	// Whether to hide things that are already installed
-	// Defaults to false since we wouldn't know what profile to use
-	private boolean hideAlreadyInstalled = false;
-	// Whether to group items in repos by category.  Note this only makes sense when the
-	// view type is AVAILABLE_VIEW_BY_REPO
-	private boolean useCategories = true;
-	// Whether to drill down into installed items
-	private boolean showInstallChildren = true;
-	// Whether to drill down into available items
-	private boolean showAvailableChildren = false;
-	// Whether to drill down into items in a provisioning plan
-	private boolean showProvisioningPlanChildren = true;
-
-	private String profileId = null;
-	// What repositories to show
-	private int artifactRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
-	private int metadataRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
-
-	// Installed view settings
-	private String visibleInstalledIUProperty = IInstallableUnit.PROP_PROFILE_ROOT_IU;
-
-	private String hidingInstalledDescription = ProvUIMessages.IUViewQueryContext_AllAreInstalledDescription;
-	private String groupingCategoriesDescription = ProvUIMessages.IUViewQueryContext_NoCategorizedItemsDescription;
-
-	public IUViewQueryContext(int viewType) {
-		this.view = viewType;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueryContext#getQueryType()
-	 */
-	public int getQueryType() {
-		if (view == AVAILABLE_VIEW_BY_REPO)
-			return QueryProvider.METADATA_REPOS;
-		return QueryProvider.AVAILABLE_IUS;
-	}
-
-	public int getViewType() {
-		return view;
-	}
-
-	public void setViewType(int viewType) {
-		view = viewType;
-	}
-
-	public boolean getShowLatestVersionsOnly() {
-		return showLatestVersionsOnly;
-	}
-
-	public void setShowLatestVersionsOnly(boolean showLatest) {
-		showLatestVersionsOnly = showLatest;
-	}
-
-	public void hideAlreadyInstalled(String installedProfileId) {
-		profileId = installedProfileId;
-		hideAlreadyInstalled = true;
-	}
-
-	public void showAlreadyInstalled() {
-		hideAlreadyInstalled = false;
-	}
-
-	public boolean getHideAlreadyInstalled() {
-		return hideAlreadyInstalled;
-	}
-
-	public String getInstalledProfileId() {
-		return profileId;
-	}
-
-	public void setInstalledProfileId(String profileId) {
-		this.profileId = profileId;
-	}
-
-	public int getArtifactRepositoryFlags() {
-		return artifactRepositoryFlags;
-	}
-
-	public void setArtifactRepositoryFlags(int flags) {
-		artifactRepositoryFlags = flags;
-	}
-
-	public int getMetadataRepositoryFlags() {
-		return metadataRepositoryFlags;
-	}
-
-	public void setMetadataRepositoryFlags(int flags) {
-		metadataRepositoryFlags = flags;
-	}
-
-	public String getVisibleAvailableIUProperty() {
-		return visibleAvailableIUProperty;
-	}
-
-	public void setVisibleAvailableIUProperty(String propertyName) {
-		visibleAvailableIUProperty = propertyName;
-	}
-
-	public String getVisibleInstalledIUProperty() {
-		return visibleInstalledIUProperty;
-	}
-
-	public void setVisibleInstalledIUProperty(String propertyName) {
-		visibleInstalledIUProperty = propertyName;
-	}
-
-	/**
-	 * Set a boolean that indicates whether categories should be used when
-	 * viewing by repository.
-	 * 
-	 * useCategories <code>true</code> if a site in a sites view should expand into categories,
-	 * <code>false</code> if it should expand into IU's.
-	 */
-
-	public void setUseCategories(boolean useCategories) {
-		this.useCategories = useCategories;
-	}
-
-	/**
-	 * Return a boolean that indicates whether categories should be used when
-	 * viewing by repository.
-	 * 
-	 * @return <code>true</code> if a site in a sites view should expand into categories,
-	 * <code>false</code> if it should expand into IU's.
-	 */
-	public boolean getUseCategories() {
-		return useCategories;
-	}
-
-	public boolean getShowInstallChildren() {
-		return showInstallChildren;
-	}
-
-	public void setShowInstallChildren(boolean showChildren) {
-		showInstallChildren = showChildren;
-	}
-
-	public boolean getShowAvailableChildren() {
-		return showAvailableChildren;
-	}
-
-	public void setShowAvailableChildren(boolean showChildren) {
-		showAvailableChildren = showChildren;
-	}
-
-	public boolean getShowProvisioningPlanChildren() {
-		return showProvisioningPlanChildren;
-	}
-
-	public void setShowProvisioningPlanChildren(boolean showChildren) {
-		showProvisioningPlanChildren = showChildren;
-	}
-
-	public String getHidingInstalledDescription() {
-		return hidingInstalledDescription;
-	}
-
-	public void setHidingInstalledDescription(String description) {
-		hidingInstalledDescription = description;
-	}
-
-	public String getUsingCategoriesDescription() {
-		return groupingCategoriesDescription;
-	}
-
-	public void setUsingCategoriesDescription(String description) {
-		groupingCategoriesDescription = description;
-	}
-
-	public boolean shouldGroupByCategories() {
-		return view == AVAILABLE_VIEW_BY_CATEGORY || (view == AVAILABLE_VIEW_BY_REPO && useCategories);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/LicenseManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/LicenseManager.java
deleted file mode 100644
index a9838f1..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/LicenseManager.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import java.io.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-
-/**
- * Abstract class for a manager which tracks which licenses have been accepted.
- * 
- * @since 3.4
- */
-public abstract class LicenseManager {
-
-	public abstract boolean accept(IInstallableUnit iu);
-
-	public abstract boolean reject(IInstallableUnit iu);
-
-	public abstract boolean isAccepted(IInstallableUnit iu);
-
-	public abstract boolean hasAcceptedLicenses();
-
-	/**
-	 * 
-	 * @param stream
-	 * @throws IOException 
-	 * @since 3.5
-	 */
-	public abstract void write(OutputStream stream) throws IOException;
-
-	/**
-	 * 
-	 * @param stream
-	 * @throws IOException 
-	 * @since 3.5
-	 */
-	public abstract void read(InputStream stream) throws IOException;
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/PlanValidator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/PlanValidator.java
deleted file mode 100644
index e324ddc..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/PlanValidator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Abstract class for a mechanism that checks a provisioning plan to see
- * if a user should be allowed to perform a provisioning action on it.
- * 
- * @since 3.4
- * 
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction
- * 
- */
-
-public abstract class PlanValidator {
-	/**
-	 * Return a boolean indicating whether the caller should continue working
-	 * with the provisioning plan.  This method is used to give implementors a chance
-	 * to validate or check a plan before continuing.  The work that the caller intends
-	 * to do depends on the context in which this validator is used.  When the validator is used
-	 * for an action, it may mean opening a wizard on the plan.  When the validator is used
-	 * inside a wizard, it may mean attempting to perform the plan. It is up to the implementor of
-	 * this method to report any errors to user or otherwise inform the user if the 
-	 * outcome is <code>false</code>.
-	 * 
-	 * @param plan a ProvisioningPlan that the caller wishes to work with.  Never <code>null</code>.
-	 * @param shell the Shell that may be used to report any errors or prompt the user.  May be <code>null</code>.
-	 * @return <code>true</code> if the caller should continue working with the plan, or
-	 * <code>false</code> if the caller should stop. If <code>false</code> it is expected that
-	 * any error reporting has already been completed.
-	 */
-	public abstract boolean continueWorkingWithPlan(ProvisioningPlan plan, Shell shell);
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/Policy.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/Policy.java
deleted file mode 100644
index d39442c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/Policy.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.ui.IStatusCodes;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * The Policy class is used to locate application specific policies that
- * should be used in the standard p2 UI class libraries.   The default policy
- * is acquired using the OSGi service model.
- * 
- * Policy allows clients to specify things such as how repositories 
- * are manipulated in the standard wizards and dialogs, and how the repositories
- * or the installation itself should be traversed when displaying content.
- * 
- * In some cases, the Policy is used only to define a default value that can
- * be overridden by user choice and subsequently stored in dialog settings.
- * 
- * Client applications should ensure that their Policy is registered before
- * any of the p2 UI objects access the default Policy.  
- * 
- * @since 3.5
- */
-
-public class Policy {
-
-	private static Policy defaultInstance;
-
-	private QueryProvider queryProvider;
-	private LicenseManager licenseManager;
-	private PlanValidator planValidator;
-	private IProfileChooser profileChooser;
-	private IUViewQueryContext queryContext;
-	private RepositoryManipulator repositoryManipulator;
-
-	/**
-	 * Get the default policy that should be used for determining the behavior of the UI.
-	 * The default policy is acquired using OSGi services.  The highest ranking implementation
-	 * of the Policy service will be used, or a default policy if no policy was registered.
-	 * 
-	 * @return the Policy that should be used
-	 */
-	public static Policy getDefault() {
-		if (defaultInstance == null) {
-			defaultInstance = (Policy) ServiceHelper.getService(ProvUIActivator.getContext(), Policy.class.getName());
-			if (defaultInstance == null)
-				defaultInstance = new Policy();
-		}
-		return defaultInstance;
-	}
-
-	/**
-	 * Returns the query provider used to query for the UI elements shown
-	 * in the various UI components.
-	 * 
-	 * @return the queryProvider
-	 */
-	public QueryProvider getQueryProvider() {
-		if (queryProvider == null) {
-			queryProvider = getDefaultQueryProvider();
-		}
-		return queryProvider;
-	}
-
-	/**
-	 * Set the query provider used to query for the UI elements shown in 
-	 * the various UI components.
-	 * 
-	 * @param provider
-	 * the provider to use, or <code>null</code> to use the default
-	 *            provider
-	 */
-	public void setQueryProvider(QueryProvider provider) {
-		queryProvider = provider;
-	}
-
-	/**
-	 * Returns the license manager used to remember accepted licenses
-	 * 
-	 * @return the licenseManager
-	 */
-	public LicenseManager getLicenseManager() {
-		if (licenseManager == null) {
-			licenseManager = getDefaultLicenseManager();
-		}
-		return licenseManager;
-	}
-
-	/**
-	 * Set the license manager used to remember accepted licenses.
-	 * 
-	 * @param manager the manager to use, or <code>null</code> to use 
-	 * the default manager
-	 */
-	public void setLicenseManager(LicenseManager manager) {
-		licenseManager = manager;
-	}
-
-	/**
-	 * Returns the plan validator used to validate a proposed provisioning
-	 * plan
-	 * 
-	 * @return the plan validator
-	 */
-	public PlanValidator getPlanValidator() {
-		if (planValidator == null) {
-			planValidator = getDefaultPlanValidator();
-		}
-		return planValidator;
-	}
-
-	/**
-	 * Set the plan validator used to validate a proposed provisioning
-	 * plan
-	 * 
-	 * @param validator the validator to use, or <code>null</code> to use 
-	 * the default validator
-	 */
-	public void setPlanValidator(PlanValidator validator) {
-		planValidator = validator;
-	}
-
-	/**
-	 * Get the profile chooser used to provide a profile id when performing
-	 * operations on a profile and the profile id is not otherwise specified.
-	 * 
-	 * @return the profile chooser
-	 */
-	public IProfileChooser getProfileChooser() {
-		if (profileChooser == null) {
-			profileChooser = getDefaultProfileChooser();
-		}
-		return profileChooser;
-	}
-
-	/**
-	 * Set the profile chooser used to provide a profile id when performing
-	 * operations on a profile and the profile id is not otherwise specified.
-	 * 
-	 * @param chooser the chooser to use, or <code>null</code> to use 
-	 * the default chooser
-	 */
-	public void setProfileChooser(IProfileChooser chooser) {
-		profileChooser = chooser;
-	}
-
-	/**
-	 * Get the query context that is used to drive the filtering and 
-	 * traversal of any IU views
-	 * 
-	 * @return the queryContext
-	 */
-	public IUViewQueryContext getQueryContext() {
-		if (queryContext == null) {
-			queryContext = getDefaultQueryContext();
-		}
-		return queryContext;
-	}
-
-	/**
-	 * Set the query context that is used to drive the filtering and
-	 * traversal of any IU views
-	 * 
-	 * @param context the context to use, or <code>null</code> to use 
-	 * the default context
-	 */
-	public void setQueryContext(IUViewQueryContext context) {
-		queryContext = context;
-	}
-
-	/**
-	 * Get the repository manipulator that is used to perform repository
-	 * operations given a URL.
-	 * 
-	 * @return the repository manipulator
-	 */
-	public RepositoryManipulator getRepositoryManipulator() {
-		return repositoryManipulator;
-	}
-
-	/**
-	 * Set the repository manipulator that is used to perform repository
-	 * operations given a URL.
-	 * 
-	 * @param manipulator the manipulator to use, or <code>null</code> to use 
-	 * the default manipulator
-	 */
-	public void setRepositoryManipulator(RepositoryManipulator manipulator) {
-		repositoryManipulator = manipulator;
-	}
-
-	/**
-	 * Reset all of the policies to their default values
-	 */
-	public void reset() {
-		licenseManager = null;
-		planValidator = null;
-		profileChooser = null;
-		queryContext = null;
-		queryProvider = null;
-		repositoryManipulator = null;
-	}
-
-	/*
-	 * Returns the plan validator to use if none has been set.  This
-	 * validator approves every plan.
-	 */
-	private PlanValidator getDefaultPlanValidator() {
-		return new PlanValidator() {
-			public boolean continueWorkingWithPlan(ProvisioningPlan plan, Shell shell) {
-				if (plan == null)
-					return false;
-				if (plan.getStatus().getSeverity() == IStatus.CANCEL)
-					return false;
-
-				// Special case those statuses where we would never want to open a wizard
-				if (plan.getStatus().getCode() == IStatusCodes.NOTHING_TO_UPDATE) {
-					ProvUI.reportStatus(plan.getStatus(), StatusManager.BLOCK);
-					return false;
-				}
-				// Allow the wizard to open otherwise.
-				return true;
-			}
-		};
-	}
-
-	/*
-	 * Returns the license manager to use if none has been set.
-	 */
-	private LicenseManager getDefaultLicenseManager() {
-		return new SimpleLicenseManager();
-	}
-
-	/*
-	 * Returns the profile chooser to use if none has been set.
-	 * This profile chooser uses the profile id of the running
-	 * application.
-	 */
-	private IProfileChooser getDefaultProfileChooser() {
-		return new IProfileChooser() {
-			public String getProfileId(Shell shell) {
-				return IProfileRegistry.SELF;
-			}
-		};
-	}
-
-	/*
-	 * Returns the query provider used to provide a descriptor for
-	 * the various queries that are used to show the UI elements of a
-	 * particular installation.  The default returns
-	 * a null query descriptor.
-	 */
-	private QueryProvider getDefaultQueryProvider() {
-		return new DefaultQueryProvider(this);
-	}
-
-	/*
-	 * Returns an IUViewQueryContext with default values
-	 */
-	private IUViewQueryContext getDefaultQueryContext() {
-		return new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
-	}
-
-	/**
-	 * Return a status that can be used to describe the failure to
-	 * retrieve a profile.
-	 * @return a status describing a failure to retrieve a profile,
-	 * or <code>null</code> if there is no such status.
-	 */
-	public IStatus getNoProfileChosenStatus() {
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/QueryProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/QueryProvider.java
deleted file mode 100644
index af01181..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/QueryProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.ElementQueryDescriptor;
-
-/**
- * An abstract class for an object that provides element queries
- * 
- * @since 3.5
- */
-public abstract class QueryProvider {
-
-	public static final int METADATA_REPOS = 1;
-	public static final int ARTIFACT_REPOS = 2;
-	public static final int PROFILES = 3;
-	public static final int AVAILABLE_IUS = 4;
-	public static final int AVAILABLE_UPDATES = 5;
-	public static final int INSTALLED_IUS = 6;
-
-	public abstract ElementQueryDescriptor getQueryDescriptor(QueriedElement element);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryLocationValidator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryLocationValidator.java
deleted file mode 100644
index 4f8e34b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryLocationValidator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * 
- * RepositoryLocationValidator can be used to validate a repository URL.  Validation may
- * involve rules known by the validator itself or contact with a repository
- * manager.
- * 
- * @since 3.4
- *
- */
-public abstract class RepositoryLocationValidator {
-
-	public static final int LOCAL_VALIDATION_ERROR = 3000;
-	public static final int ALTERNATE_ACTION_TAKEN = 3001;
-
-	public static IStatus getInvalidLocationStatus(String urlText) {
-		return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, LOCAL_VALIDATION_ERROR, NLS.bind(ProvUIMessages.URLValidator_UnrecognizedURL, urlText), null);
-	}
-
-	public static URI locationFromString(String locationString) {
-		URI userLocation;
-		try {
-			userLocation = URIUtil.fromString(locationString);
-		} catch (URISyntaxException e) {
-			return null;
-		}
-		// If a path separator char was used, interpret as a local file URI
-		String uriString = URIUtil.toUnencodedString(userLocation);
-		if (uriString.length() > 0 && (uriString.charAt(0) == '/' || uriString.charAt(0) == File.separatorChar))
-			return RepositoryHelper.localRepoURIHelper(userLocation);
-		return userLocation;
-	}
-
-	public abstract IStatus validateRepositoryLocation(URI url, boolean contactRepositories, IProgressMonitor monitor);
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryManipulator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryManipulator.java
deleted file mode 100644
index 6f7d9f7..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/policy/RepositoryManipulator.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.policy;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.AddRepositoryOperation;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.RemoveRepositoryOperation;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Abstract class for a mechanism that allows the user to manipulate which repositories
- * are in the system.
- * 
- * @since 3.4
- * 
- */
-
-public abstract class RepositoryManipulator {
-	/**
-	 * Invoke whatever mechanism is used to manipulate repositories.
-	 * Return a boolean indicating whether the repositories were
-	 * actually manipulated in any way.
-	 */
-	public abstract boolean manipulateRepositories(Shell shell);
-
-	/**
-	 * Return a short String that could be used to label this manager in a button.
-	 * This string should include any necessary ellipsis or mnemonics.
-	 */
-	public abstract String getManipulatorButtonLabel();
-
-	/**
-	 * Return a long String that could be used to label this manager in a link.
-	 * This string does not need mnemonics.
-	 */
-	public abstract String getManipulatorLinkLabel();
-
-	/**
-	 * Return an array of URLs containing the repositories already known.
-	 */
-	public abstract URI[] getKnownRepositories();
-
-	/**
-	 * Return an operation that could be used to add the specified URL as
-	 * a repository.
-	 */
-	public abstract AddRepositoryOperation getAddOperation(URI repoLocation);
-
-	/**
-	 * Return a String describing a possible add operation.  This is used 
-	 * when prompting or reporting errors involving a possible add operation.
-	 */
-	public abstract String getAddOperationLabel();
-
-	/**
-	 * Return an operation that could be used to remove the specified URL as
-	 * a repositories.
-	 */
-	public abstract RemoveRepositoryOperation getRemoveOperation(URI[] repoLocations);
-
-	/**
-	 * Return a String describing a possible remove operation.  This is used 
-	 * when prompting or reporting errors involving a possible remove operation.
-	 */
-	public abstract String getRemoveOperationLabel();
-
-	/**
-	 * Get a URL validator that could be used to validate URLs supplied
-	 * by the user.
-	 * 
-	 * @param shell the shell used by the validator to report any problems.
-	 * @return the validator to be used.
-	 */
-
-	public abstract RepositoryLocationValidator getRepositoryLocationValidator(Shell shell);
-
-	/**
-	 * Return a string giving the user further instruction when a site was found.  This
-	 * is a textual description that can tell the user why a site might be empty, or
-	 * telling the user to use the manipulator (ie, go to the preferences page).
-	 */
-	public abstract String getRepositoryNotFoundInstructionString();
-
-	/**
-	 * Return a string giving the user further instruction about how to manipulate
-	 * repositories.  The {@link #getManipulatorLinkLabel()} and {@link #getManipulatorButtonLabel()}
-	 * are used to label the link and/or button used to launch the UI for adding and removing
-	 * repositories.  This string is a textual description (without a link) suggesting ways
-	 * that a user might manipulate repositories.
-	 */
-	public abstract String getManipulatorInstructionString();
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUColumnConfig.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUColumnConfig.java
deleted file mode 100644
index fe30b15..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUColumnConfig.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-/**
- * Data structure describing a column to be shown in an IU view.  
- * 
- * @since 3.4
- */
-public class IUColumnConfig {
-	public final static int COLUMN_ID = 0;
-	public final static int COLUMN_NAME = 1;
-	public final static int COLUMN_VERSION = 2;
-	public final static int COLUMN_SIZE = 3;
-
-	public String columnTitle;
-	public int columnField;
-	public int defaultColumnWidth;
-	public int columnWidth;
-
-	public IUColumnConfig(String title, int columnField, int defaultColumnWidth) {
-		this.columnTitle = title;
-		this.columnField = columnField;
-		this.defaultColumnWidth = defaultColumnWidth;
-		this.columnWidth = -1;
-	}
-
-	public int getWidth() {
-		if (columnWidth >= 0)
-			return columnWidth;
-		return defaultColumnWidth;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUComparator.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUComparator.java
deleted file mode 100644
index 4546fc6..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUComparator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-public class IUComparator extends ViewerComparator {
-	public static final int IU_NAME = 0;
-	public static final int IU_ID = 1;
-	private int key;
-	private boolean showingId = false;
-
-	public IUComparator(int sortKey) {
-		this.key = sortKey;
-		showingId = sortKey == IU_ID;
-	}
-
-	/**
-	 * Use the specified column config to determine
-	 * whether the id should be used in lieu of an empty name
-	 * when sorting.
-	 * 
-	 * @param columnConfig
-	 */
-	public void useColumnConfig(IUColumnConfig[] columnConfig) {
-		for (int i = 0; i < columnConfig.length; i++)
-			if (columnConfig[i].columnField == IUColumnConfig.COLUMN_ID) {
-				showingId = true;
-				break;
-			}
-	}
-
-	public int compare(Viewer viewer, Object obj1, Object obj2) {
-		IInstallableUnit iu1 = (IInstallableUnit) ProvUI.getAdapter(obj1, IInstallableUnit.class);
-		IInstallableUnit iu2 = (IInstallableUnit) ProvUI.getAdapter(obj2, IInstallableUnit.class);
-		if (iu1 == null || iu2 == null)
-			// If these are not iu's use the super class comparator.
-			return super.compare(viewer, obj1, obj2);
-
-		String key1, key2;
-		if (key == IU_NAME) {
-			// Compare the iu names in the default locale.
-			// If a name is not defined, we use blank if we know the id is shown in another
-			// column.  If the id is not shown elsewhere, then we are displaying it, so use
-			// the id instead.
-			key1 = IUPropertyUtils.getIUProperty(iu1, IInstallableUnit.PROP_NAME);
-			if (key1 == null)
-				if (showingId)
-					key1 = ""; //$NON-NLS-1$
-				else
-					key1 = iu1.getId();
-			key2 = IUPropertyUtils.getIUProperty(iu2, IInstallableUnit.PROP_NAME);
-			if (key2 == null)
-				if (showingId)
-					key2 = ""; //$NON-NLS-1$
-				else
-					key2 = iu2.getId();
-		} else {
-			key1 = iu1.getId();
-			key2 = iu2.getId();
-		}
-
-		int result = 0;
-		result = key1.compareToIgnoreCase(key2);
-		if (result == 0) {
-			// We want to show later versions first so compare backwards.
-			result = iu2.getVersion().compareTo(iu1.getVersion());
-		}
-		return result;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUDragAdapter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUDragAdapter.java
deleted file mode 100644
index e6fddb8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/IUDragAdapter.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Implements drag behaviour when IU items are dragged from a repository view.
- * 
- * @since 3.4
- */
-public class IUDragAdapter extends DragSourceAdapter {
-
-	ISelectionProvider selectionProvider;
-
-	/**
-	 * Constructs a new drag adapter.
-	 * 
-	 * @param provider
-	 *            The selection provider
-	 */
-	public IUDragAdapter(ISelectionProvider provider) {
-		selectionProvider = provider;
-	}
-
-	/**
-	 * Set the drag data to represent the local selection of IU's if possible.
-	 * Fallback to using a text description of each IU.
-	 */
-	public void dragSetData(DragSourceEvent event) {
-		IInstallableUnit[] ius = getSelectedIUs();
-
-		if (ius == null || ius.length == 0) {
-			return;
-		}
-
-		// use local selection transfer if possible
-		if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
-			event.data = LocalSelectionTransfer.getTransfer().getSelection();
-			return;
-		}
-		// resort to a text transfer
-		if (!TextTransfer.getInstance().isSupportedType(event.dataType)) {
-			return;
-		}
-
-		// Get a text description of each IU and set as the drag data
-		final StringBuffer buffer = new StringBuffer();
-
-		for (int i = 0; i < ius.length; i++) {
-			buffer.append(ius[i].toString());
-			buffer.append('\n');
-		}
-		event.data = buffer.toString();
-	}
-
-	/**
-	 * Start the drag only if the selection contains IUs.
-	 */
-	public void dragStart(DragSourceEvent event) {
-
-		// Focus workaround copied from navigator drag adapter
-		DragSource dragSource = (DragSource) event.widget;
-		Control control = dragSource.getControl();
-		if (control != control.getDisplay().getFocusControl()) {
-			event.doit = false;
-			return;
-		}
-
-		// Check the selection
-		IStructuredSelection selection = (IStructuredSelection) selectionProvider.getSelection();
-		// No drag if nothing is selected
-		if (selection.isEmpty()) {
-			event.doit = false;
-			return;
-		}
-		if (!areOnlyIUsSelected(selection)) {
-			event.doit = false;
-			return;
-		}
-		LocalSelectionTransfer.getTransfer().setSelection(selection);
-		event.doit = true;
-	}
-
-	private IInstallableUnit[] getSelectedIUs() {
-		List ius = new ArrayList();
-
-		ISelection selection = selectionProvider.getSelection();
-		if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
-			return null;
-		}
-		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
-		Iterator iter = structuredSelection.iterator();
-		while (iter.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
-			if (iu != null) {
-				ius.add(iu);
-			}
-		}
-		return (IInstallableUnit[]) ius.toArray(new IInstallableUnit[ius.size()]);
-	}
-
-	private boolean areOnlyIUsSelected(IStructuredSelection selection) {
-		Iterator iter = selection.iterator();
-		while (iter.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
-			if (iu == null) {
-				return false;
-			}
-		}
-		return true;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/InstallIUDropAdapter.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/InstallIUDropAdapter.java
deleted file mode 100644
index 74f5030..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/InstallIUDropAdapter.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.*;
-
-/**
- * Defines drop behavior for selected IUs to mean install the IU on the target
- * profile.
- * 
- * @since 3.4
- * 
- */
-public class InstallIUDropAdapter extends ViewerDropAdapter {
-
-	static boolean DEBUG = false;
-	Policy policy;
-
-	/**
-	 * Constructs a new drop adapter.
-	 * 
-	 * @param viewer
-	 *            the navigator's viewer
-	 */
-	public InstallIUDropAdapter(Policy policy, StructuredViewer viewer) {
-		super(viewer);
-		this.policy = policy;
-	}
-
-	/**
-	 * Returns an error status with the given info.
-	 */
-	IStatus error(String message) {
-		return error(message, null);
-	}
-
-	/**
-	 * Returns an error status with the given info.
-	 */
-	IStatus error(String message, Throwable exception) {
-		return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, exception);
-	}
-
-	/**
-	 * Returns the target profile id for the drop. If the drop is positioned on an
-	 * IU, return its parent profile id.
-	 */
-	private String getProfileTarget(Object mouseTarget) {
-		IProfile profile = (IProfile) ProvUI.getAdapter(mouseTarget, IProfile.class);
-		if (profile != null) {
-			return profile.getProfileId();
-		}
-
-		if (mouseTarget instanceof InstalledIUElement) {
-			return ((InstalledIUElement) mouseTarget).getProfileId();
-		}
-		return null;
-	}
-
-	/**
-	 * Returns an status indicating success.
-	 */
-	private IStatus ok() {
-		return new Status(IStatus.OK, ProvUIActivator.PLUGIN_ID, 0, null, null);
-	}
-
-	/**
-	 * Perform the drop.
-	 * 
-	 * @see org.eclipse.swt.dnd.DropTargetListener#drop(org.eclipse.swt.dnd.DropTargetEvent)
-	 */
-	public boolean performDrop(final Object data) {
-		if (DEBUG) {
-			System.out.println("Perform drop on target: " + getCurrentTarget() + " with data: " + data); //$NON-NLS-1$//$NON-NLS-2$
-		}
-		if (getCurrentTarget() == null || data == null)
-			return false;
-
-		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
-		if (!(selection instanceof IStructuredSelection) || selection.isEmpty())
-			return false;
-
-		String profileId = getProfileTarget(getCurrentTarget());
-		if (getCurrentOperation() == DND.DROP_COPY && profileId != null) {
-			final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-			ISelectionProvider selectionProvider = new ISelectionProvider() {
-
-				/* (non-Javadoc)
-				 * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
-				 */
-				public void addSelectionChangedListener(ISelectionChangedListener listener) {
-					// Ignore because the selection won't change 
-				}
-
-				/* (non-Javadoc)
-				 * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
-				 */
-				public ISelection getSelection() {
-					if (DEBUG) {
-						System.out.println("Selection was queried by action"); //$NON-NLS-1$
-						System.out.println(structuredSelection.toString());
-					}
-					return structuredSelection;
-				}
-
-				/* (non-Javadoc)
-				 * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
-				 */
-				public void removeSelectionChangedListener(ISelectionChangedListener listener) {
-					// ignore because the selection is static
-				}
-
-				/* (non-Javadoc)
-				 * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
-				 */
-				public void setSelection(ISelection sel) {
-					throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
-				}
-			};
-			InstallAction action = new InstallAction(policy, selectionProvider, profileId);
-			if (DEBUG)
-				System.out.println("Running install action"); //$NON-NLS-1$
-			action.run();
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Validate whether the drop is valid for the target
-	 */
-	public boolean validateDrop(Object target, int dragOperation, TransferData transferType) {
-
-		if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
-			IStatus status = validateTarget(target, transferType);
-			if (DEBUG) {
-				System.out.println("Validate target: " + status); //$NON-NLS-1$
-			}
-			return status.isOK();
-		}
-		return false;
-	}
-
-	/*
-	 * Overridden to force a copy when the drag is valid.
-	 * 
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
-	 */
-	public void dragEnter(DropTargetEvent event) {
-		event.detail = DND.DROP_COPY;
-		super.dragEnter(event);
-	}
-
-	/**
-	 * Ensures that the drop target meets certain criteria
-	 */
-	private IStatus validateTarget(Object target, TransferData transferType) {
-		if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
-			IInstallableUnit[] ius = getSelectedIUs();
-
-			if (ius.length == 0) {
-				return error(ProvUIMessages.ProvDropAdapter_NoIUsToDrop);
-			}
-			if (getProfileTarget(target) != null) {
-				return ok();
-			}
-			return error(ProvUIMessages.ProvDropAdapter_InvalidDropTarget);
-		}
-		return error(ProvUIMessages.ProvDropAdapter_UnsupportedDropOperation);
-	}
-
-	/**
-	 * Returns the resource selection from the LocalSelectionTransfer.
-	 * 
-	 * @return the resource selection from the LocalSelectionTransfer
-	 */
-	private IInstallableUnit[] getSelectedIUs() {
-		ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
-		List ius = new ArrayList();
-
-		if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
-			return null;
-		}
-		IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
-		Iterator iter = structuredSelection.iterator();
-		while (iter.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
-			if (iu != null) {
-				ius.add(iu);
-			}
-		}
-		return (IInstallableUnit[]) ius.toArray(new IInstallableUnit[ius.size()]);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementComparer.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementComparer.java
deleted file mode 100644
index 3f4c11c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementComparer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.jface.viewers.IElementComparer;
-
-public class ProvElementComparer implements IElementComparer {
-
-	public boolean equals(Object a, Object b) {
-		// We treat category elements specially because this
-		// is one case where resolving down to an IU will lose identity
-		// differences.  (category IU's with the same name and version number cannot be treated the same).
-		if (a instanceof CategoryElement || b instanceof CategoryElement)
-			return a.equals(b);
-		IInstallableUnit iu1 = getIU(a);
-		IInstallableUnit iu2 = getIU(b);
-		if (iu1 != null && iu2 != null)
-			return iu1.equals(iu2);
-		String p1 = getProfileId(a);
-		String p2 = getProfileId(b);
-		if (p1 != null && p2 != null)
-			return p1.equals(p2);
-		URI r1 = getRepositoryLocation(a);
-		URI r2 = getRepositoryLocation(b);
-		if (r1 != null && r2 != null)
-			return r1.equals(r2);
-		return a.equals(b);
-	}
-
-	public int hashCode(Object element) {
-		if (element instanceof CategoryElement)
-			return element.hashCode();
-		IInstallableUnit iu = getIU(element);
-		if (iu != null)
-			return iu.hashCode();
-		String profileId = getProfileId(element);
-		if (profileId != null)
-			return profileId.hashCode();
-		URI location = getRepositoryLocation(element);
-		if (location != null)
-			return location.hashCode();
-		return element.hashCode();
-	}
-
-	private IInstallableUnit getIU(Object obj) {
-		return (IInstallableUnit) ProvUI.getAdapter(obj, IInstallableUnit.class);
-	}
-
-	private String getProfileId(Object obj) {
-		if (obj instanceof ProfileElement)
-			return ((ProfileElement) obj).getLabel(obj);
-		IProfile profile = (IProfile) ProvUI.getAdapter(obj, IProfile.class);
-		if (profile == null)
-			return null;
-		return profile.getProfileId();
-	}
-
-	private URI getRepositoryLocation(Object obj) {
-		if (obj instanceof IRepositoryElement)
-			return ((IRepositoryElement) obj).getLocation();
-		return null;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementContentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementContentProvider.java
deleted file mode 100644
index fe039dd..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementContentProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Content provider that retrieves children of a ProvElement.
- * 
- * @since 3.5
- * 
- */
-public class ProvElementContentProvider implements ITreeContentProvider {
-
-	/**
-	 * 
-	 */
-	public ProvElementContentProvider() {
-		// Default constructor
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-	 */
-	public Object[] getElements(Object input) {
-		if (input instanceof ProvElement) {
-			return getChildren(input);
-		}
-		return new Object[0];
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
-	 */
-	public Object getParent(Object child) {
-		if (child instanceof ProvElement) {
-			return ((ProvElement) child).getParent(child);
-		}
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
-	 */
-	public boolean hasChildren(Object element) {
-		if (element instanceof ProvElement)
-			return ((ProvElement) element).hasChildren(element);
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
-	 */
-	public Object[] getChildren(final Object parent) {
-		if (parent instanceof ProvElement) {
-			return ((ProvElement) parent).getChildren(parent);
-		}
-		return new Object[0];
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-	 */
-	public void dispose() {
-		// Nothing to do
-
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
-	 */
-	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		// Nothing to do
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementLabelProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementLabelProvider.java
deleted file mode 100644
index ed4e091..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/ProvElementLabelProvider.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Label provider for provisioning elements. Some provisioning objects are
- * wrapped by ProvElements and some are not.  This is the most generic of the
- * provisioning label providers.  A two-column format for elements is 
- * supported, with the content of the columns dependent on the type of object.
- * 
- * @since 3.4
- */
-public class ProvElementLabelProvider extends LabelProvider implements ITableLabelProvider {
-
-	public String getText(Object obj) {
-		if (obj instanceof ProvElement) {
-			return ((ProvElement) obj).getLabel(obj);
-		}
-		if (obj instanceof IProfile) {
-			return ((IProfile) obj).getProfileId();
-		}
-		if (obj instanceof IInstallableUnit) {
-			IInstallableUnit iu = (IInstallableUnit) obj;
-			return iu.getId();
-		}
-		if (obj instanceof IRepository) {
-			String name = ((IRepository) obj).getName();
-			if (name != null && name.length() > 0) {
-				return name;
-			}
-			return URIUtil.toUnencodedString(((IRepository) obj).getLocation());
-		}
-		if (obj instanceof IRepositoryElement) {
-			String name = ((IRepositoryElement) obj).getName();
-			if (name != null && name.length() > 0) {
-				return name;
-			}
-			return URIUtil.toUnencodedString(((IRepositoryElement) obj).getLocation());
-		}
-		if (obj instanceof IArtifactKey) {
-			IArtifactKey key = (IArtifactKey) obj;
-			return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
-		}
-		if (obj instanceof ProcessingStepDescriptor) {
-			ProcessingStepDescriptor descriptor = (ProcessingStepDescriptor) obj;
-			return descriptor.getProcessorId();
-		}
-		if (obj instanceof IRequiredCapability) {
-			return ((IRequiredCapability) obj).getName();
-		}
-		return obj.toString();
-	}
-
-	public Image getImage(Object obj) {
-		if (obj instanceof ProvElement) {
-			return ((ProvElement) obj).getImage(obj);
-		}
-		if (obj instanceof IProfile) {
-			return ProvUIImages.getImage(ProvUIImages.IMG_PROFILE);
-		}
-		if (obj instanceof IInstallableUnit) {
-			return ProvUIImages.getImage(ProvUIImages.IMG_IU);
-		}
-		if (obj instanceof IArtifactRepository) {
-			return ProvUIImages.getImage(ProvUIImages.IMG_ARTIFACT_REPOSITORY);
-		}
-		if (obj instanceof IMetadataRepository) {
-			return ProvUIImages.getImage(ProvUIImages.IMG_METADATA_REPOSITORY);
-		}
-		if (obj instanceof IArtifactKey) {
-			return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
-		}
-		if (obj instanceof IRequiredCapability) {
-			return ProvUIImages.getImage(ProvUIImages.IMG_IU);
-		}
-		return null;
-	}
-
-	public Image getColumnImage(Object element, int index) {
-		if (index == 0) {
-			return getImage(element);
-		}
-		return null;
-	}
-
-	public String getColumnText(Object element, int columnIndex) {
-
-		switch (columnIndex) {
-			case 0 :
-				return getText(element);
-			case 1 :
-				if (element instanceof IProfile) {
-					return ((IProfile) element).getProperty(IProfile.PROP_NAME);
-				}
-				if (element instanceof IIUElement) {
-					if (((IIUElement) element).shouldShowVersion())
-						return ((IIUElement) element).getIU().getVersion().toString();
-				}
-				IInstallableUnit iu = (IInstallableUnit) ProvUI.getAdapter(element, IInstallableUnit.class);
-				if (iu != null) {
-					return iu.getVersion().toString();
-				}
-				if (element instanceof IRepository) {
-					return URIUtil.toUnencodedString(((IRepository) element).getLocation());
-				}
-				if (element instanceof IRepositoryElement) {
-					return URIUtil.toUnencodedString(((IRepositoryElement) element).getLocation());
-				}
-				if (element instanceof IArtifactKey) {
-					IArtifactKey key = (IArtifactKey) element;
-					return key.getVersion().toString();
-				}
-				if (element instanceof IRequiredCapability) {
-					return ((IRequiredCapability) element).getRange().getMaximum().toString();
-				}
-
-		}
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/RepositoryContentProvider.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/RepositoryContentProvider.java
deleted file mode 100644
index 06d1f9c..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/RepositoryContentProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-
-/**
- * Content provider for provisioning repositories. The repositories are the
- * elements and the repository children are retrieved asynchronously
- * using the IDeferredWorkbenchAdapter mechanism.
- * 
- * @since 3.4
- * 
- */
-public class RepositoryContentProvider extends DeferredQueryContentProvider {
-
-	public Object[] getChildren(final Object parent) {
-		Object[] children = super.getChildren(parent);
-		if (children != null)
-			return children;
-		if (parent instanceof IArtifactDescriptor) {
-			return ((IArtifactDescriptor) parent).getProcessingSteps();
-		}
-		return null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/StructuredViewerProvisioningListener.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/StructuredViewerProvisioningListener.java
deleted file mode 100644
index 056660a..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/provisional/p2/ui/viewers/StructuredViewerProvisioningListener.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.internal.provisional.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.ui.model.ProfileElement;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * ProvisioningListener which updates a structured viewer based on
- * provisioning changes.  Provides default behavior which refreshes particular
- * model elements or the entire viewer based on the nature of the change and the
- * changes that the client is interested in.  Subclasses typically only need
- * override when there is additional, specialized behavior required.
- * 
- * @since 3.4
- */
-public class StructuredViewerProvisioningListener extends ProvUIProvisioningListener {
-
-	StructuredViewer viewer;
-	Display display;
-
-	public StructuredViewerProvisioningListener(StructuredViewer viewer, int eventTypes) {
-		super(eventTypes);
-		this.viewer = viewer;
-		this.display = viewer.getControl().getDisplay();
-	}
-
-	/**
-	 * A repository has been added.  The default behavior is to
-	 * refresh the viewer.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryAdded(RepositoryEvent event) {
-		asyncRefresh();
-	}
-
-	/**
-	 * A repository has been removed.  The default behavior is to
-	 * refresh the viewer.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryRemoved(RepositoryEvent event) {
-		asyncRefresh();
-	}
-
-	/**
-	 * A repository has been discovered.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryDiscovered(RepositoryEvent event) {
-		// Do nothing for now
-	}
-
-	/**
-	 * A repository has changed.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param event the RepositoryEvent describing the details
-	 */
-	protected void repositoryChanged(RepositoryEvent event) {
-		// Do nothing for now.  When this event is actually used in
-		// the core, we may want to refresh particular elements the way
-		// we currently refresh a profile element.
-	}
-
-	/**
-	 * The specified profile has changed.  The default behavior is to refresh the viewer
-	 * with a profile element of the matching id.  Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that changed.
-	 */
-	protected void profileChanged(final String profileId) {
-		display.asyncExec(new Runnable() {
-			public void run() {
-				if (isClosing())
-					return;
-				// We want to refresh the affected profile, so we
-				// construct a profile element on this profile.
-				ProfileElement element = new ProfileElement(null, profileId);
-				viewer.refresh(element);
-			}
-		});
-	}
-
-	/**
-	 * The specified profile has been added.  The default behavior is to fully
-	 * refresh the associated viewer. Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that has been added.
-	 */
-	protected void profileAdded(final String profileId) {
-		asyncRefresh();
-	}
-
-	/**
-	 * The specified profile has been removed.  The default behavior is to fully
-	 * refresh the associated viewer. Subclasses may override.  May be called
-	 * from a non-UI thread.
-	 * 
-	 * @param profileId the id of the profile that has been removed.
-	 */
-	protected void profileRemoved(final String profileId) {
-		asyncRefresh();
-	}
-
-	protected void asyncRefresh() {
-		display.asyncExec(new Runnable() {
-			public void run() {
-				if (isClosing())
-					return;
-				refreshViewer();
-			}
-		});
-	}
-
-	protected void refreshAll() {
-		asyncRefresh();
-	}
-
-	/**
-	 * Refresh the entire structure of the viewer.  Subclasses may
-	 * override to ensure that any caching done in content providers or
-	 * model elements is refreshed before the viewer is refreshed.  This will 
-	 * always be called from the UI thread.
-	 */
-	protected void refreshViewer() {
-		viewer.refresh();
-	}
-
-	/**
-	 * Return whether the viewer is closing or shutting down.
-	 * This method should be used in async execs to ensure that
-	 * the viewer is still alive.
-	 * @return a boolean indicating whether the viewer is closing
-	 */
-	protected boolean isClosing() {
-		IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench.isClosing())
-			return true;
-
-		if (viewer.getControl().isDisposed())
-			return true;
-
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
new file mode 100644
index 0000000..6bba705
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
@@ -0,0 +1,488 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import java.util.*;
+import java.util.List;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.metadata.License;
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
+import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.ILicense;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * AcceptLicensesWizardPage shows a list of the IU's that have
+ * licenses that have not been approved by the user, and allows the
+ * user to approve them.
+ * 
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class AcceptLicensesWizardPage extends WizardPage {
+	private static final String DIALOG_SETTINGS_SECTION = "LicensessPage"; //$NON-NLS-1$
+	private static final String LIST_WEIGHT = "ListSashWeight"; //$NON-NLS-1$
+	private static final String LICENSE_WEIGHT = "LicenseSashWeight"; //$NON-NLS-1$
+	private static final String NAME_COLUMN_WIDTH = "NameColumnWidth"; //$NON-NLS-1$
+	private static final String VERSION_COLUMN_WIDTH = "VersionColumnWidth"; //$NON-NLS-1$
+
+	class IUWithLicenseParent {
+		IInstallableUnit iu;
+		ILicense license;
+
+		IUWithLicenseParent(ILicense license, IInstallableUnit iu) {
+			this.license = license;
+			this.iu = iu;
+		}
+	}
+
+	class LicenseContentProvider implements ITreeContentProvider {
+		public Object[] getChildren(Object parentElement) {
+			if (!(parentElement instanceof ILicense))
+				return new Object[0];
+
+			if (licensesToIUs.containsKey(parentElement)) {
+				List<IInstallableUnit> iusWithLicense = licensesToIUs.get(parentElement);
+				IInstallableUnit[] ius = iusWithLicense.toArray(new IInstallableUnit[iusWithLicense.size()]);
+				IUWithLicenseParent[] children = new IUWithLicenseParent[ius.length];
+				for (int i = 0; i < ius.length; i++) {
+					children[i] = new IUWithLicenseParent((ILicense) parentElement, ius[i]);
+				}
+				return children;
+			}
+			return null;
+		}
+
+		public Object getParent(Object element) {
+			if (element instanceof IUWithLicenseParent) {
+				return ((IUWithLicenseParent) element).license;
+			}
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			return licensesToIUs.containsKey(element);
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return licensesToIUs.keySet().toArray();
+		}
+
+		public void dispose() {
+			// Nothing to do
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+			// Nothing to do
+		}
+	}
+
+	class LicenseLabelProvider extends LabelProvider {
+		public Image getImage(Object element) {
+			return null;
+		}
+
+		public String getText(Object element) {
+			if (element instanceof License) {
+				return getFirstLine(((License) element).getBody());
+			} else if (element instanceof IUWithLicenseParent) {
+				return getIUName(((IUWithLicenseParent) element).iu);
+			} else if (element instanceof IInstallableUnit) {
+				return getIUName((IInstallableUnit) element);
+			}
+			return ""; //$NON-NLS-1$
+		}
+
+		private String getFirstLine(String body) {
+			int i = body.indexOf('\n');
+			int j = body.indexOf('\r');
+			if (i > 0) {
+				if (j > 0)
+					return body.substring(0, i < j ? i : j);
+				return body.substring(0, i);
+			} else if (j > 0) {
+				return body.substring(0, j);
+			}
+			return body;
+		}
+	}
+
+	TreeViewer iuViewer;
+	Text licenseTextBox;
+	Button acceptButton;
+	Button declineButton;
+	SashForm sashForm;
+	private IInstallableUnit[] originalIUs;
+	HashMap<ILicense, List<IInstallableUnit>> licensesToIUs; // License -> IU Name
+	private LicenseManager manager;
+	IUColumnConfig nameColumn;
+	IUColumnConfig versionColumn;
+
+	static String getIUName(IInstallableUnit iu) {
+		StringBuffer buf = new StringBuffer();
+		String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+		if (name != null)
+			buf.append(name);
+		else
+			buf.append(iu.getId());
+		buf.append(" "); //$NON-NLS-1$
+		buf.append(iu.getVersion().toString());
+		return buf.toString();
+	}
+
+	/**
+	 * Create a license acceptance page for showing licenses to the user.
+	 * 
+	 * @param manager the license manager that should be used to check for already accepted licenses.  May be <code>null</code>.
+	 * @param ius the IInstallableUnits for which licenses should be checked
+	 * @param operation the provisioning operation describing what changes are to take place on the profile
+	 */
+	public AcceptLicensesWizardPage(LicenseManager manager, IInstallableUnit[] ius, ProfileChangeOperation operation) {
+		super("AcceptLicenses"); //$NON-NLS-1$
+		setTitle(ProvUIMessages.AcceptLicensesWizardPage_Title);
+		this.manager = manager;
+		update(ius, operation);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		initializeDialogUnits(parent);
+		List<IInstallableUnit> ius;
+		if (licensesToIUs == null || licensesToIUs.size() == 0) {
+			Label label = new Label(parent, SWT.NONE);
+			setControl(label);
+		} else if (licensesToIUs.size() == 1 && (ius = licensesToIUs.values().iterator().next()).size() == 1) {
+			createLicenseContentSection(parent, ius.get(0));
+		} else {
+			sashForm = new SashForm(parent, SWT.HORIZONTAL);
+			sashForm.setLayout(new GridLayout());
+			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+			sashForm.setLayoutData(gd);
+
+			createLicenseListSection(sashForm);
+			createLicenseContentSection(sashForm, null);
+			sashForm.setWeights(getSashWeights());
+			setControl(sashForm);
+		}
+		Dialog.applyDialogFont(getControl());
+	}
+
+	private void createLicenseListSection(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(gd);
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(ProvUIMessages.AcceptLicensesWizardPage_ItemsLabel);
+		iuViewer = new TreeViewer(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		iuViewer.setContentProvider(new LicenseContentProvider());
+		iuViewer.setLabelProvider(new LicenseLabelProvider());
+		iuViewer.setComparator(new ViewerComparator());
+		iuViewer.setInput(licensesToIUs);
+
+		iuViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				handleSelectionChanged((IStructuredSelection) event.getSelection());
+			}
+
+		});
+		gd = new GridData(GridData.FILL_BOTH);
+		gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH);
+		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		iuViewer.getControl().setLayoutData(gd);
+	}
+
+	private void createLicenseAcceptSection(Composite parent, boolean multiple) {
+		// Buttons for accepting licenses
+		Composite buttonContainer = new Composite(parent, SWT.NULL);
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		buttonContainer.setLayout(new GridLayout());
+		buttonContainer.setLayoutData(gd);
+
+		acceptButton = new Button(buttonContainer, SWT.RADIO);
+		if (multiple)
+			acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptMultiple);
+		else
+			acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptSingle);
+
+		acceptButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setPageComplete(acceptButton.getSelection());
+			}
+		});
+		declineButton = new Button(buttonContainer, SWT.RADIO);
+		if (multiple)
+			declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectMultiple);
+		else
+			declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectSingle);
+		declineButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setPageComplete(!declineButton.getSelection());
+			}
+		});
+
+		acceptButton.setSelection(false);
+		declineButton.setSelection(true);
+	}
+
+	private void createLicenseContentSection(Composite parent, IInstallableUnit singleIU) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(gd);
+
+		Label label = new Label(composite, SWT.NONE);
+		if (singleIU == null)
+			label.setText(ProvUIMessages.AcceptLicensesWizardPage_LicenseTextLabel);
+		else
+			label.setText(NLS.bind(ProvUIMessages.AcceptLicensesWizardPage_SingleLicenseTextLabel, getIUName(singleIU)));
+		licenseTextBox = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
+		licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+		initializeDialogUnits(licenseTextBox);
+		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH);
+		licenseTextBox.setLayoutData(gd);
+
+		createLicenseAcceptSection(composite, licensesToIUs.size() > 1);
+
+		if (singleIU != null) {
+			String licenseBody = ""; //$NON-NLS-1$
+			// We've already established before calling this method that it's a single IU with a single license
+			Iterator<ILicense> licenses = singleIU.getLicenses(null).iterator();
+			ILicense license = licenses.hasNext() ? licenses.next() : null;
+			if (license != null && license.getBody() != null) {
+				licenseBody = license.getBody();
+			}
+			licenseTextBox.setText(licenseBody);
+		}
+		setControl(composite);
+	}
+
+	void handleSelectionChanged(IStructuredSelection selection) {
+		if (!selection.isEmpty()) {
+			Object selected = selection.getFirstElement();
+			if (selected instanceof License)
+				licenseTextBox.setText(((License) selected).getBody());
+			else if (selected instanceof IUWithLicenseParent)
+				licenseTextBox.setText(((IUWithLicenseParent) selected).license.getBody());
+		}
+	}
+
+	/**
+	 * The wizard is finishing.  Perform any necessary processing.
+	 * 
+	 * @return <code>true</code> if the finish can proceed, 
+	 * <code>false</code> if it should not.
+	 */
+	public boolean performFinish() {
+		rememberAcceptedLicenses();
+		return true;
+	}
+
+	/**
+	 * Return a boolean indicating whether there are licenses that must be accepted
+	 * by the user.
+	 * 
+	 * @return <code>true</code> if there are licenses that must be accepted, and
+	 * <code>false</code> if there are no licenses that must be accepted.
+	 */
+	public boolean hasLicensesToAccept() {
+		return licensesToIUs != null && licensesToIUs.size() > 0;
+	}
+
+	/**
+	 * Update the current page to show the licenses that must be approved for the
+	 * selected IUs and the provisioning plan.  
+	 * 
+	 * Clients using this page in conjunction with a {@link ProfileChangeOperation} should
+	 * instead use {@link #update(IInstallableUnit[], ProfileChangeOperation)}.   This 
+	 * method is intended for clients who are working with a low-level provisioning plan
+	 * rather than an {@link InstallOperation} or {@link UpdateOperation}.
+	 * 
+	 * @param theIUs the installable units to be installed for which licenses must be checked
+	 * @param plan the provisioning plan that describes a resolved install operation
+	 * 
+	 * @see #update(IInstallableUnit[], ProfileChangeOperation)
+	 */
+
+	public void updateForPlan(IInstallableUnit[] theIUs, IProvisioningPlan plan) {
+		updateLicenses(theIUs, plan);
+	}
+
+	private void updateLicenses(IInstallableUnit[] theIUs, IProvisioningPlan plan) {
+		this.originalIUs = theIUs;
+		if (theIUs == null)
+			licensesToIUs = new HashMap<ILicense, List<IInstallableUnit>>();
+		else
+			findUnacceptedLicenses(theIUs, plan);
+		setDescription();
+		setPageComplete(licensesToIUs.size() == 0);
+		if (getControl() != null) {
+			Composite parent = getControl().getParent();
+			getControl().dispose();
+			createControl(parent);
+			parent.layout(true);
+		}
+	}
+
+	/**
+	 * Update the page for the specified IInstallableUnits and operation.
+	 * 
+	 * @param theIUs the IInstallableUnits for which licenses should be checked
+	 * @param operation the operation describing the pending profile change
+	 */
+	public void update(IInstallableUnit[] theIUs, ProfileChangeOperation operation) {
+		if (operation != null && operation.hasResolved()) {
+			int sev = operation.getResolutionResult().getSeverity();
+			if (sev != IStatus.ERROR && sev != IStatus.CANCEL) {
+				updateLicenses(theIUs, operation.getProvisioningPlan());
+			} else {
+				updateLicenses(new IInstallableUnit[0], null);
+			}
+		}
+	}
+
+	private void findUnacceptedLicenses(IInstallableUnit[] selectedIUs, IProvisioningPlan plan) {
+		IInstallableUnit[] iusToCheck = selectedIUs;
+		if (plan != null) {
+			iusToCheck = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class);
+		}
+
+		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218532
+		// Current metadata generation can result with a feature group IU and the feature jar IU
+		// having the same name and license.  We will weed out duplicates if the license and name are both
+		// the same.  
+		licensesToIUs = new HashMap<ILicense, List<IInstallableUnit>>();//map of License->ArrayList of IUs with that license
+		HashMap<ILicense, HashSet<String>> namesSeen = new HashMap<ILicense, HashSet<String>>(); // map of License->HashSet of names with that license
+		for (int i = 0; i < iusToCheck.length; i++) {
+			IInstallableUnit iu = iusToCheck[i];
+			for (ILicense license : iu.getLicenses(null)) {
+				if (manager != null && !manager.isAccepted(license)) {
+					String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+					if (name == null)
+						name = iu.getId();
+					// Have we already found this license?  
+					if (licensesToIUs.containsKey(license)) {
+						HashSet<String> names = namesSeen.get(license);
+						if (!names.contains(name)) {
+							names.add(name);
+							((ArrayList<IInstallableUnit>) licensesToIUs.get(license)).add(iu);
+						}
+					} else {
+						ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(1);
+						list.add(iu);
+						licensesToIUs.put(license, list);
+						HashSet<String> names = new HashSet<String>(1);
+						names.add(name);
+						namesSeen.put(license, names);
+					}
+				}
+			}
+		}
+	}
+
+	private void rememberAcceptedLicenses() {
+		if (licensesToIUs == null || manager == null)
+			return;
+		for (ILicense license : licensesToIUs.keySet())
+			manager.accept(license);
+	}
+
+	private void setDescription() {
+		// No licenses but the page is open.  Shouldn't happen, but just in case...
+		if (licensesToIUs == null || licensesToIUs.size() == 0)
+			setDescription(ProvUIMessages.AcceptLicensesWizardPage_NoLicensesDescription);
+		// We have licenses.  Use a generic message if we think we aren't showing extra
+		// licenses from required IU's.  This check is not entirely accurate, for example
+		// one root IU could have no license and the next one has two different
+		// IU's with different licenses.  But this cheaply catches the common cases.
+		else if (licensesToIUs.size() <= originalIUs.length)
+			setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewLicensesDescription);
+		else {
+			// Without a doubt we know we are showing extra licenses.
+			setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewExtraLicensesDescription);
+		}
+	}
+
+	private String getDialogSettingsName() {
+		return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
+	}
+
+	/**
+	 * Save any settings related to the current size and location of the wizard page.
+	 */
+	public void saveBoundsRelatedSettings() {
+		if (iuViewer == null || iuViewer.getTree().isDisposed())
+			return;
+		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
+		IDialogSettings section = settings.getSection(getDialogSettingsName());
+		if (section == null) {
+			section = settings.addNewSection(getDialogSettingsName());
+		}
+		section.put(NAME_COLUMN_WIDTH, iuViewer.getTree().getColumn(0).getWidth());
+		section.put(VERSION_COLUMN_WIDTH, iuViewer.getTree().getColumn(1).getWidth());
+
+		if (sashForm == null || sashForm.isDisposed())
+			return;
+		int[] weights = sashForm.getWeights();
+		section.put(LIST_WEIGHT, weights[0]);
+		section.put(LICENSE_WEIGHT, weights[1]);
+	}
+
+	private int[] getSashWeights() {
+		IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
+		IDialogSettings section = settings.getSection(getDialogSettingsName());
+		if (section != null) {
+			try {
+				int[] weights = new int[2];
+				if (section.get(LIST_WEIGHT) != null) {
+					weights[0] = section.getInt(LIST_WEIGHT);
+					if (section.get(LICENSE_WEIGHT) != null) {
+						weights[1] = section.getInt(LICENSE_WEIGHT);
+						return weights;
+					}
+				}
+			} catch (NumberFormatException e) {
+				// Ignore if there actually was a value that didn't parse.  
+			}
+		}
+		return new int[] {55, 45};
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java
new file mode 100644
index 0000000..70f2d10
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * ICopyable defines an interface for elements that provide
+ * copy support in a UI.  The active control in the UI determines
+ * what should be copied.
+ * 
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ICopyable {
+	/**
+	 * Copy text related to the active control to the clipboard.
+	 * 
+	 * @param activeControl the active control
+	 */
+	public void copyToClipboard(Control activeControl);
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
new file mode 100644
index 0000000..906213e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ *******************************************************************************/
+
+package org.eclipse.equinox.p2.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.actions.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
+import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.SameShellProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.about.InstallationPage;
+import org.eclipse.ui.menus.AbstractContributionFactory;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * InstalledSoftwarePage displays a profile's IInstallableUnits in
+ * an Installation Page.  Clients can use this class as the implementation
+ * class for an installationPages extension.
+ * 
+ * @see InstallationPage
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 2.0
+ *
+ */
+public class InstalledSoftwarePage extends InstallationPage implements ICopyable {
+
+	private static final int UPDATE_ID = IDialogConstants.CLIENT_ID;
+	private static final int UNINSTALL_ID = IDialogConstants.CLIENT_ID + 1;
+	private static final int PROPERTIES_ID = IDialogConstants.CLIENT_ID + 2;
+	private static final String BUTTON_ACTION = "org.eclipse.equinox.p2.ui.buttonAction"; //$NON-NLS-1$
+
+	AbstractContributionFactory factory;
+	Text detailsArea;
+	InstalledIUGroup installedIUGroup;
+	String profileId;
+	Button updateButton, uninstallButton, propertiesButton;
+	ProvisioningUI ui;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		initializeDialogUnits(parent);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.INSTALLED_SOFTWARE);
+
+		ui = ProvisioningUI.getDefaultUI();
+		profileId = ui.getProfileId();
+		if (profileId == null) {
+			IStatus status = ui.getPolicy().getNoProfileChosenStatus();
+			if (status != null)
+				ProvUI.reportStatus(status, StatusManager.LOG);
+			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
+			text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+			text.setText(ProvUIMessages.InstalledSoftwarePage_NoProfile);
+			setControl(text);
+			return;
+		}
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		int width = getDefaultWidth(composite);
+		gd.widthHint = width;
+		composite.setLayoutData(gd);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+
+		// Table of installed IU's
+		installedIUGroup = new InstalledIUGroup(ui, composite, JFaceResources.getDialogFont(), profileId, getColumnConfig());
+		// we hook selection listeners on the viewer in createPageButtons because we
+		// rely on the actions we create there getting selection events before we use
+		// them to update button enablement.
+
+		CopyUtils.activateCopy(this, installedIUGroup.getStructuredViewer().getControl());
+
+		gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_DESCRIPTION_HEIGHT);
+		gd.widthHint = width;
+
+		detailsArea = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY | SWT.WRAP);
+		detailsArea.setBackground(detailsArea.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
+		detailsArea.setLayoutData(gd);
+
+		setControl(composite);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPageButtons(Composite parent) {
+		if (profileId == null)
+			return;
+		// For the update action, we create a custom selection provider that will interpret no
+		// selection as checking for updates to everything.
+		// We also override the run method to close the containing dialog
+		// if we successfully try to resolve.  This is done to ensure that progress
+		// is shown properly.
+		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
+		UpdateAction updateAction = new UpdateAction(ui, new ISelectionProvider() {
+			public void addSelectionChangedListener(ISelectionChangedListener listener) {
+				installedIUGroup.getStructuredViewer().addSelectionChangedListener(listener);
+			}
+
+			public ISelection getSelection() {
+				StructuredViewer viewer = installedIUGroup.getStructuredViewer();
+				ISelection selection = viewer.getSelection();
+				if (selection.isEmpty()) {
+					final Object[] all = ((IStructuredContentProvider) viewer.getContentProvider()).getElements(viewer.getInput());
+					return new StructuredSelection(all);
+				}
+				return selection;
+			}
+
+			public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+				installedIUGroup.getStructuredViewer().removeSelectionChangedListener(listener);
+			}
+
+			public void setSelection(ISelection selection) {
+				installedIUGroup.getStructuredViewer().setSelection(selection);
+			}
+		}, profileId, true) {
+			public void run() {
+				super.run();
+				if (getReturnCode() == Window.OK)
+					getPageContainer().closeModalContainers();
+			}
+		};
+		updateAction.setSkipSelectionPage(true);
+		updateButton = createButton(parent, UPDATE_ID, updateAction.getText());
+		updateButton.setData(BUTTON_ACTION, updateAction);
+		// Uninstall action
+		Action uninstallAction = new UninstallAction(ui, installedIUGroup.getStructuredViewer(), profileId) {
+			public void run() {
+				super.run();
+				if (getReturnCode() == Window.OK)
+					getPageContainer().closeModalContainers();
+			}
+		};
+		uninstallButton = createButton(parent, UNINSTALL_ID, uninstallAction.getText());
+		uninstallButton.setData(BUTTON_ACTION, uninstallAction);
+
+		// Properties action
+		PropertyDialogAction action = new PropertyDialogAction(new SameShellProvider(getShell()), installedIUGroup.getStructuredViewer());
+		propertiesButton = createButton(parent, PROPERTIES_ID, action.getText());
+		propertiesButton.setData(BUTTON_ACTION, action);
+
+		// We rely on the actions getting selection events before we do, because
+		// we rely on the enablement state of the action.  So we don't hook
+		// the selection listener on our table until after actions are created.
+		installedIUGroup.getStructuredViewer().addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				updateDetailsArea();
+				updateEnablement();
+			}
+
+		});
+
+		updateEnablement();
+	}
+
+	void updateDetailsArea() {
+		java.util.List<IInstallableUnit> selected = installedIUGroup.getSelectedIUs();
+		if (selected.size() == 1) {
+			String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+			if (description != null) {
+				detailsArea.setText(description);
+				return;
+			}
+		}
+		detailsArea.setText(""); //$NON-NLS-1$
+	}
+
+	void updateEnablement() {
+		if (updateButton == null || updateButton.isDisposed())
+			return;
+		Button[] buttons = {updateButton, uninstallButton, propertiesButton};
+		for (int i = 0; i < buttons.length; i++) {
+			Action action = (Action) buttons[i].getData(BUTTON_ACTION);
+			if (action == null || !action.isEnabled())
+				buttons[i].setEnabled(false);
+			else
+				buttons[i].setEnabled(true);
+		}
+	}
+
+	private IUColumnConfig[] getColumnConfig() {
+		return new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, ILayoutConstants.DEFAULT_COLUMN_WIDTH)};
+	}
+
+	private int getDefaultWidth(Control control) {
+		IUColumnConfig[] columns = getColumnConfig();
+		int totalWidth = 0;
+		for (int i = 0; i < columns.length; i++) {
+			totalWidth += columns[i].getWidthInPixels(control);
+		}
+		return totalWidth + 20; // buffer for surrounding composites
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
+	 */
+	public void copyToClipboard(Control activeControl) {
+		Object[] elements = installedIUGroup.getSelectedIUElements();
+		if (elements.length == 0)
+			return;
+		String text = CopyUtils.getIndentedClipboardText(elements, new IUDetailsLabelProvider(null, getColumnConfig(), null));
+		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
+		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
+		clipboard.dispose();
+	}
+
+	protected void buttonPressed(int buttonId) {
+		switch (buttonId) {
+			case UPDATE_ID :
+				((Action) updateButton.getData(BUTTON_ACTION)).run();
+				break;
+			case UNINSTALL_ID :
+				((Action) uninstallButton.getData(BUTTON_ACTION)).run();
+				break;
+			case PROPERTIES_ID :
+				((Action) propertiesButton.getData(BUTTON_ACTION)).run();
+				break;
+			default :
+				super.buttonPressed(buttonId);
+				break;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java
new file mode 100644
index 0000000..792297f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import org.eclipse.equinox.p2.metadata.ILicense;
+
+/**
+ * LicenseManager defines a service which records the licenses that have been
+ * accepted in the course of installing or updating software. It can be used to determine
+ * whether a particular license should be presented to a user for acceptance, and
+ * to record the user's decision.
+ * 
+ * @since 2.0
+ */
+public abstract class LicenseManager {
+
+	/**
+	 * Record the acceptance of the specified license.
+	 * 
+	 * @param license the license to be accepted
+	 * 
+	 * @return <code>true</code> if the license was recorded as accepted, <code>false</code> if
+	 * it was not.
+	 * 
+	 */
+	public abstract boolean accept(ILicense license);
+
+	/**
+	 * Record the rejection of the specified license.
+	 * 
+	 * @param license the license to be rejected
+	 * 
+	 * @return <code>true</code> if the license was recorded as rejected, <code>false</code> if
+	 * it was not.
+	 * 
+	 */
+	public abstract boolean reject(ILicense license);
+
+	/**
+	 * Return a boolean indicating whether a particular license has previously
+	 * been accepted.
+	 * 
+	 * @param license the license in question
+	 * 
+	 * @return <code>true</code> if the license has previously been accepted,
+	 * <code>false</code> if it has not been accepted before.
+	 * 
+	 */
+	public abstract boolean isAccepted(ILicense license);
+
+	/**
+	 * Return a boolean indicating whether any licenses have been
+	 * accepted.
+	 * 
+	 * @return <code>true</code> if accepted licenses have been recorded,
+	 * <code>false</code> if there have been no licenses accepted.
+
+	 */
+	public abstract boolean hasAcceptedLicenses();
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
new file mode 100644
index 0000000..8d67bdb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
@@ -0,0 +1,184 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.ui;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * A job that loads a set of metadata repositories and caches the loaded repositories.
+ * This job can be used when repositories are loaded by a client who wishes to 
+ * maintain (and pass along) the in-memory references to the repositories.  For example,
+ * repositories can be loaded in the background and then passed to another
+ * component, thus ensuring that the repositories remain loaded in memory.
+ * 
+ * @since 2.0
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class LoadMetadataRepositoryJob extends ProvisioningJob {
+
+	/**
+	 * An object representing the family of jobs that load repositories.
+	 */
+	public static final Object LOAD_FAMILY = new Object();
+
+	/**
+	 * The key that should be used to set a property on a repository load job to indicate
+	 * that authentication should be suppressed when loading the repositories. 
+	 */
+	public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$
+
+	/**
+	 * The key that should be used to set a property on a repository load job to indicate
+	 * that repository events triggered by this job should be suppressed so that clients
+	 * will ignore all events related to the load.
+	 */
+	public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPRESS_REPOSITORY_EVENTS"); //$NON-NLS-1$
+
+	/**
+	 * The key that should be used to set a property on a repository load job to indicate
+	 * that a wizard receiving this job needs to schedule it.  In some cases, a load job
+	 * is finished before invoking a wizard.  In other cases, the job has not yet been
+	 * scheduled so that listeners can be set up first.
+	 */
+	public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE = new QualifiedName(ProvUIActivator.PLUGIN_ID, "WIZARD_CLIENT_SHOULD_SCHEDULE"); //$NON-NLS-1$
+
+	/**
+	 * The key that should be used to set a property on a repository load job to indicate
+	 * that load errors should be accumulated into a single status rather than reported
+	 * as they occur.
+	 */
+	public static final QualifiedName ACCUMULATE_LOAD_ERRORS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "ACCUMULATE_LOAD_ERRORS"); //$NON-NLS-1$
+
+	private List<IMetadataRepository> repoCache = new ArrayList<IMetadataRepository>();
+	private RepositoryTracker tracker;
+	private MultiStatus accumulatedStatus;
+	private URI[] locations;
+	private ProvisioningUI ui;
+
+	/**
+	 * Create a job that loads the metadata repositories known by the specified RepositoryTracker.
+	 * @param ui the ProvisioningUI providing the necessary services
+	 */
+	public LoadMetadataRepositoryJob(ProvisioningUI ui) {
+		super(ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress, ui.getSession());
+		this.ui = ui;
+		this.tracker = ui.getRepositoryTracker();
+		this.locations = tracker.getKnownRepositories(ui.getSession());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IStatus runModal(IProgressMonitor monitor) {
+		if (locations == null || locations.length == 0)
+			return Status.OK_STATUS;
+
+		// We batch all the time as a way of distinguishing client-initiated repository 
+		// jobs from low level repository manipulation.
+		ui.signalRepositoryOperationStart();
+		try {
+			doLoad(monitor);
+		} finally {
+			ui.signalRepositoryOperationComplete(null, getProperty(SUPPRESS_REPOSITORY_EVENTS) == null);
+		}
+		return Status.OK_STATUS;
+	}
+
+	private IStatus doLoad(IProgressMonitor monitor) {
+		SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress, locations.length * 100);
+		if (sub.isCanceled())
+			return Status.CANCEL_STATUS;
+		for (int i = 0; i < locations.length; i++) {
+			if (sub.isCanceled())
+				return Status.CANCEL_STATUS;
+			try {
+				repoCache.add(ProvUI.getMetadataRepositoryManager(ui.getSession()).loadRepository(locations[i], sub.newChild(100)));
+			} catch (ProvisionException e) {
+				handleLoadFailure(e, locations[i]);
+			}
+		}
+		return getCurrentStatus();
+	}
+
+	private void handleLoadFailure(ProvisionException e, URI location) {
+		if (shouldAccumulateFailures()) {
+			// Some ProvisionExceptions include an empty multi status with a message.  
+			// Since empty multi statuses have a severity OK, The platform status handler doesn't handle
+			// this well.  We correct this by recreating a status with error severity
+			// so that the platform status handler does the right thing.
+			IStatus status = e.getStatus();
+			if (status instanceof MultiStatus && ((MultiStatus) status).getChildren().length == 0)
+				status = new Status(IStatus.ERROR, status.getPlugin(), status.getCode(), status.getMessage(), status.getException());
+			if (accumulatedStatus == null) {
+				accumulatedStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, ProvisionException.REPOSITORY_NOT_FOUND, new IStatus[] {status}, ProvUIMessages.LoadMetadataRepositoryJob_SitesMissingError, null);
+			} else {
+				accumulatedStatus.add(status);
+			}
+			ui.getRepositoryTracker().addNotFound(location);
+			// Always log the complete exception so the detailed stack trace is in the log.  
+			LogHelper.log(e);
+		} else {
+			tracker.reportLoadFailure(location, e);
+		}
+	}
+
+	private boolean shouldAccumulateFailures() {
+		return getProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS) != null;
+	}
+
+	/**
+	 * Report the accumulated status for repository load failures.  If there has been
+	 * no status accumulated, or if the job has been cancelled, do not report
+	 * anything.  Detailed errors have already been logged.
+	 */
+	public void reportAccumulatedStatus() {
+		IStatus status = getCurrentStatus();
+		if (status.isOK() || status.getSeverity() == IStatus.CANCEL)
+			return;
+
+		// If user is unaware of individual sites, nothing to report here.
+		if (!ui.getPolicy().getRepositoriesVisible())
+			return;
+		StatusManager.getManager().handle(status, StatusManager.SHOW);
+		// Reset the accumulated status so that next time we only report the newly not found repos.
+		accumulatedStatus = null;
+	}
+
+	private IStatus getCurrentStatus() {
+		if (accumulatedStatus != null) {
+			// If there is only missing repo to report, use the specific message rather than the generic.
+			if (accumulatedStatus.getChildren().length == 1)
+				return accumulatedStatus.getChildren()[0];
+			return accumulatedStatus;
+		}
+		return Status.OK_STATUS;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+	 */
+	public boolean belongsTo(Object family) {
+		return family == LOAD_FAMILY;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java
new file mode 100644
index 0000000..71e68ea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java
@@ -0,0 +1,333 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
+import org.eclipse.equinox.p2.operations.UpdateOperation;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * The Policy class is used to specify application specific policies that
+ * should be used in the standard p2 UI class libraries.   The default policy
+ * is acquired using the OSGi service model.
+ * 
+ * Policy allows clients to specify things such as how repositories 
+ * are manipulated in the standard wizards and dialogs, and how the repositories
+ * or the installation itself should be traversed when displaying content.
+ * 
+ * In some cases, the Policy is used only to define a default value that can
+ * be overridden by user choice and subsequently stored in dialog settings.
+ * 
+ * Client applications should ensure that their Policy is registered before
+ * any of the p2 UI objects access the default Policy.  
+ * 
+ * @since 2.0
+ */
+
+public class Policy {
+
+	/**
+	 * A constant indicating that restart should be forced (without
+	 * confirmation) immediately after completion of a provisioning operation.
+	 * 
+	*/
+	public static final int RESTART_POLICY_FORCE = 1;
+
+	/**
+	 * A constant indicating that the changes should be applied dynamically
+	 * to the profile (without confirmation) immediately after completion of 
+	 * a provisioning operation.
+	 */
+	public static final int RESTART_POLICY_FORCE_APPLY = 2;
+
+	/**
+	 * A constant indicating that the user should be prompted to
+	 * restart after completion of a provisioning operation.
+	 */
+	public static final int RESTART_POLICY_PROMPT = 3;
+
+	/**
+	 * A constant indicating that, where possible, the user should 
+	 * be given the option to restart or dynamically apply the changes
+	 * after completion of a provisioning operation.
+	 */
+	public static final int RESTART_POLICY_PROMPT_RESTART_OR_APPLY = 4;
+
+	private IQuery<IInstallableUnit> visibleAvailableIUQuery = QueryUtil.createIUGroupQuery();
+	private IQuery<IInstallableUnit> visibleInstalledIUQuery = new UserVisibleRootQuery();
+	private boolean groupByCategory = true;
+	private boolean allowDrilldown = true;
+	private boolean repositoriesVisible = true;
+	private boolean showLatestVersionsOnly = true;
+	private int restartPolicy = RESTART_POLICY_PROMPT_RESTART_OR_APPLY;
+	private String repoPrefPageId;
+	private String repoPrefPageName;
+
+	/**
+	 * Answer a boolean indicating whether the caller should continue to work with the
+	 * specified operation.  This method is used when an operation has been resolved, but
+	 * the UI may have further restrictions on continuing with it.
+	 * 
+	 * @param operation the operation in question.  It must already be resolved.
+	 * @param shell the shell to use for any interaction with the user
+	 * @return <code>true</code> if processing of the operation should continue, <code>false</code> if
+	 * not.  It is up to the implementor to report any errors to the user when answering <code>false</code>.
+	 */
+	public boolean continueWorkingWithOperation(ProfileChangeOperation operation, Shell shell) {
+		Assert.isTrue(operation.getResolutionResult() != null);
+		IStatus status = operation.getResolutionResult();
+		// user cancelled
+		if (status.getSeverity() == IStatus.CANCEL)
+			return false;
+
+		// Special case those statuses where we would never want to open a wizard
+		if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
+			ProvUI.reportStatus(status, StatusManager.BLOCK);
+			return false;
+		}
+
+		// there is no plan, so we can't continue.  Report any reason found
+		if (operation.getProvisioningPlan() == null && !status.isOK()) {
+			StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
+			return false;
+		}
+
+		// Allow the wizard to open otherwise.
+		return true;
+	}
+
+	/**
+	 * Return a status that can be used to describe the failure to
+	 * retrieve a profile.
+	 * @return a status describing a failure to retrieve a profile,
+	 * or <code>null</code> if there is no such status.
+	 */
+	public IStatus getNoProfileChosenStatus() {
+		return null;
+	}
+
+	/**
+	 * Return a query that can be used to obtain the IInstallableUnits that
+	 * should be presented to the user from the software repositories.
+	 * 
+	 * @return the query used to retrieve user visible available IUs
+	 */
+	public IQuery<IInstallableUnit> getVisibleAvailableIUQuery() {
+		return visibleAvailableIUQuery;
+	}
+
+	/**
+	 * Set the query that can be used to obtain the IInstallableUnits that
+	 * should be presented to the user.
+	 * 
+	 * @param query the query used to retrieve user visible available IUs
+	 */
+	public void setVisibleAvailableIUQuery(IQuery<IInstallableUnit> query) {
+		visibleAvailableIUQuery = query;
+	}
+
+	/**
+	 * Return a query that can be used to obtain the IInstallableUnits in
+	 * the profile that should be presented to the user.
+	 * 
+	 * @return the query used to retrieve user visible installed IUs
+	 */
+	public IQuery<IInstallableUnit> getVisibleInstalledIUQuery() {
+		return visibleInstalledIUQuery;
+	}
+
+	/**
+	 * Set the query that can be used to obtain the IInstallableUnits in
+	 * the profile that should be presented to the user.
+	 * 
+	 * @param query the query used to retrieve user visible installed IUs
+	 */
+	public void setVisibleInstalledIUQuery(IQuery<IInstallableUnit> query) {
+		visibleInstalledIUQuery = query;
+	}
+
+	/**
+	 * Get the restart policy that should be used when the provisioning UI
+	 * determines that a restart is required.
+	 * 
+	 * @return an integer constant describing the restart policy
+	 * 
+	 * @see #RESTART_POLICY_FORCE
+	 * @see #RESTART_POLICY_FORCE_APPLY
+	 * @see #RESTART_POLICY_PROMPT
+	 * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY
+	 */
+	public int getRestartPolicy() {
+		return restartPolicy;
+	}
+
+	/**
+	 * Set the restart policy that should be used when the provisioning UI
+	 * determines that a restart is required.
+	 * 
+	 * @param restartPolicy an integer constant describing the restart policy
+	 * 
+	 * @see #RESTART_POLICY_FORCE
+	 * @see #RESTART_POLICY_FORCE_APPLY
+	 * @see #RESTART_POLICY_PROMPT
+	 * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY
+	 */
+	public void setRestartPolicy(int restartPolicy) {
+		this.restartPolicy = restartPolicy;
+	}
+
+	/**
+	 * Return a boolean indicating whether the repositories should
+	 * be visible to the user, such that the user can add, remove, and
+	 * otherwise manipulate the software site list.
+	 * 
+	 * @return <code>true</code> if repositories are visible to the end
+	 * user, <code>false</code> if they are not.
+	 */
+	public boolean getRepositoriesVisible() {
+		return repositoriesVisible;
+	}
+
+	/**
+	 * Set a boolean indicating whether the repositories should
+	 * be visible to the user, such that the user can add, remove, and
+	 * otherwise manipulate the software site list.
+	 * 
+	 * @param visible <code>true</code> if repositories are visible to the end
+	 * user, <code>false</code> if they are not.
+	 */
+	public void setRepositoriesVisible(boolean visible) {
+		this.repositoriesVisible = visible;
+	}
+
+	/**
+	 * Return a boolean indicating whether only the latest versions of
+	 * updates and available software should be shown to the user.
+	 * 
+	 * @return <code>true</code> if only the latest versions are shown,
+	 * <code>false</code> if all versions should be shown.
+	 */
+	public boolean getShowLatestVersionsOnly() {
+		return showLatestVersionsOnly;
+	}
+
+	/**
+	 * Set a boolean indicating whether only the latest versions of
+	 * updates and available software should be shown to the user.
+	 * 
+	 * @param showLatest <code>true</code> if only the latest versions are shown,
+	 * <code>false</code> if all versions should be shown.
+	 */
+	public void setShowLatestVersionsOnly(boolean showLatest) {
+		this.showLatestVersionsOnly = showLatest;
+	}
+
+	/**
+	 * Return a boolean indicating whether the user should be allowed drill
+	 * down from a visible update or installed item into the requirements.
+	 * 
+	 * @return <code>true</code> if drilldown is allowed,
+	 * <code>false</code> if it is not.
+	 */
+	public boolean getShowDrilldownRequirements() {
+		return allowDrilldown;
+	}
+
+	/**
+	 * Set a boolean indicating whether the user should be allowed drill
+	 * down from a visible update or installed item into the requirements.
+	 * 
+	 * @param drilldown <code>true</code> if drilldown is allowed,
+	 * <code>false</code> if it is not.
+	 */
+	public void setShowDrilldownRequirements(boolean drilldown) {
+		this.allowDrilldown = drilldown;
+	}
+
+	/**
+	 * Return a boolean indicating whether available software should be
+	 * grouped by category.
+	 * 
+	 * @return <code>true</code> if items should be grouped by category,
+	 * <code>false</code> if categories should not be shown.
+	 */
+	public boolean getGroupByCategory() {
+		return groupByCategory;
+	}
+
+	/**
+	 * Set a boolean indicating whether available software should be
+	 * grouped by category.
+	 * 
+	 * @param group <code>true</code> if items should be grouped by category,
+	 * <code>false</code> if categories should not be shown.
+	 */
+	public void setGroupByCategory(boolean group) {
+		this.groupByCategory = group;
+	}
+
+	/**
+	 * Get the id of the preference page that should be used to link to the
+	 * software sites page.
+	 * 
+	 * @return the preference page id, or <code>null</code> if there is no
+	 * preference page id showing the software sites.
+	 */
+	public String getRepositoryPreferencePageId() {
+		return repoPrefPageId;
+	}
+
+	/**
+	 * Set the id of the preference page that should be used to link to the
+	 * software sites page.
+	 * 
+	 * @param id the preference page id, or <code>null</code> if there is no
+	 * preference page id showing the software sites.
+	 */
+
+	public void setRepositoryPreferencePageId(String id) {
+		this.repoPrefPageId = id;
+	}
+
+	/**
+	 * Get the localized name of the preference page that should be displayed in
+	 * links to the software sites page.
+	 * 
+	 * @return the preference page name, or <code>null</code> if there is no
+	 * preference page.
+	 */
+	public String getRepositoryPreferencePageName() {
+		return repoPrefPageName;
+	}
+
+	/**
+	 * Set the localized name of the preference page that should be displayed in
+	 * links to the software sites page.  This name is ignored if no id is specified
+	 * for the preference page.
+	 * 
+	 * @param name the preference page name, or <code>null</code> if there is no
+	 * preference page.
+	 * 
+	 * @see Policy#setRepositoryPreferencePageId(String)
+	 */
+
+	public void setRepositoryPreferencePageName(String name) {
+		this.repoPrefPageName = name;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
new file mode 100644
index 0000000..d918a69
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
@@ -0,0 +1,438 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
+ ******************************************************************************/
+
+package org.eclipse.equinox.p2.ui;
+
+import java.net.URI;
+import java.util.Collection;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * ProvisioningUI defines the provisioning session, UI policy, and related services for a
+ * provisioning UI.  
+ * 
+ * @since 2.0
+ *
+ */
+public class ProvisioningUI {
+
+	/**
+	 * Return the default ProvisioningUI.  
+	 * 
+	 * @return the default Provisioning UI.
+	 */
+	public static ProvisioningUI getDefaultUI() {
+		return ProvUIActivator.getDefault().getProvisioningUI();
+	}
+
+	private Policy policy;
+	private ProvisioningSession session;
+	private String profileId;
+	private ProvisioningOperationRunner runner;
+
+	/**
+	 * Creates a new instance of the provisioning user interface.
+	 * 
+	 * @param session The current provisioning session
+	 * @param profileId The profile that this user interface is operating on
+	 * @param policy The user interface policy settings to use
+	 */
+	public ProvisioningUI(ProvisioningSession session, String profileId, Policy policy) {
+		this.policy = policy;
+		this.profileId = profileId;
+		if (profileId == null)
+			this.profileId = IProfileRegistry.SELF;
+		this.session = session;
+		this.runner = new ProvisioningOperationRunner(this);
+	}
+
+	/**
+	 * Return the UI policy used for this instance of the UI.
+	 * 
+	 * @return the UI policy, must not be <code>null</code>
+	 */
+	public Policy getPolicy() {
+		return policy;
+	}
+
+	/**
+	 * Return the provisioning session that should be used to obtain
+	 * provisioning services.
+	 * 
+	 * @return the provisioning session, must not be <code>null</code>
+	 */
+	public ProvisioningSession getSession() {
+		return session;
+	}
+
+	/**
+	 * Return the license manager that should be used to remember
+	 * accepted user licenses.
+	 * @return  the license manager.  May be <code>null</code> if licenses are not
+	 * to be remembered.
+	 */
+	public LicenseManager getLicenseManager() {
+		return (LicenseManager) ServiceHelper.getService(ProvUIActivator.getContext(), LicenseManager.class.getName());
+	}
+
+	/**
+	 * Return the repository tracker that should be used to add, remove, and track the
+	 * statuses of known repositories.
+	 * 
+	 * @return the repository tracker, must not be <code>null</code>
+	 */
+	public RepositoryTracker getRepositoryTracker() {
+		return (RepositoryTracker) ServiceHelper.getService(ProvUIActivator.getContext(), RepositoryTracker.class.getName());
+	}
+
+	/**
+	 * Return the profile id that should be assumed for this ProvisioningUI if no other
+	 * id is otherwise specified.  Some UI classes are assigned a profile id, while others 
+	 * are not.  For those classes that are not assigned a current profile id, this id can
+	 * be used to obtain one.
+	 * 
+	 * @return a profile id
+	 */
+	public String getProfileId() {
+		return profileId;
+	}
+
+	/**
+	 * Return an install operation that describes installing the specified IInstallableUnits from the
+	 * provided list of repositories.
+	 * 
+	 * @param iusToInstall the IInstallableUnits to be installed
+	 * @param repositories the repositories to use for the operation
+	 * @return the install operation
+	 */
+	public InstallOperation getInstallOperation(Collection<IInstallableUnit> iusToInstall, URI[] repositories) {
+		InstallOperation op = new InstallOperation(getSession(), iusToInstall);
+		op.setProfileId(getProfileId());
+		op.setProvisioningContext(makeProvisioningContext(repositories));
+		return op;
+	}
+
+	/**
+	 * Return an update operation that describes updating the specified IInstallableUnits from the
+	 * provided list of repositories.
+	 * 
+	 * @param iusToUpdate the IInstallableUnits to be updated
+	 * @param repositories the repositories to use for the operation
+	 * @return the update operation
+	 */
+	public UpdateOperation getUpdateOperation(Collection<IInstallableUnit> iusToUpdate, URI[] repositories) {
+		UpdateOperation op = new UpdateOperation(getSession(), iusToUpdate);
+		op.setProfileId(getProfileId());
+		op.setProvisioningContext(makeProvisioningContext(repositories));
+		return op;
+	}
+
+	/**
+	 * Return an uninstall operation that describes uninstalling the specified IInstallableUnits, using
+	 * the supplied repositories to replace any metadata that must be retrieved for the uninstall.
+	 * 
+	 * @param iusToUninstall the IInstallableUnits to be installed
+	 * @param repositories the repositories to use for the operation
+	 * @return the uninstall operation
+	 */
+	public UninstallOperation getUninstallOperation(Collection<IInstallableUnit> iusToUninstall, URI[] repositories) {
+		UninstallOperation op = new UninstallOperation(getSession(), iusToUninstall);
+		op.setProfileId(getProfileId());
+		op.setProvisioningContext(makeProvisioningContext(repositories));
+		return op;
+	}
+
+	private ProvisioningContext makeProvisioningContext(URI[] repos) {
+		if (repos != null) {
+			ProvisioningContext context = new ProvisioningContext(getSession().getProvisioningAgent());
+			context.setMetadataRepositories(repos);
+			context.setArtifactRepositories(repos);
+			return context;
+		}
+		// look everywhere
+		return new ProvisioningContext(getSession().getProvisioningAgent());
+	}
+
+	/**
+	 * Open an install wizard for installing the specified IInstallableUnits
+	 * 
+	 * @param initialSelections the IInstallableUnits that should be selected when the wizard opens.  May be <code>null</code>.
+	 * @param operation the operation describing the proposed install.  If this operation is not <code>null</code>, then a wizard showing
+	 * only the IInstallableUnits described in the operation will be shown.  If the operation is <code>null</code>, then a
+	 * wizard allowing the user to browse the repositories will be opened.
+	 * @param job a repository load job that is loading or has already loaded the repositories.  Can be used to pass along
+	 * an in-memory repository reference to the wizard.
+	 * 
+	 * @return the wizard return code
+	 */
+	public int openInstallWizard(Collection<IInstallableUnit> initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
+		if (operation == null) {
+			InstallWizard wizard = new InstallWizard(this, operation, initialSelections, job);
+			WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+			dialog.create();
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
+			return dialog.open();
+		}
+		PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(this, operation, initialSelections, job);
+		WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+		dialog.create();
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
+		return dialog.open();
+	}
+
+	/**
+	 * Open an update wizard for the specified update operation.
+	 * 
+	 * @param skipSelectionsPage <code>true</code> if the selection page should be skipped so that the user is 
+	 * viewing the resolution results.  <code>false</code> if the update selection page should be shown first.
+	 * @param operation the operation describing the proposed update.  Must not be <code>null</code>.
+	 * @param job a repository load job that is loading or has already loaded the repositories.  Can be used to pass along
+	 * an in-memory repository reference to the wizard.
+	 * 
+	 * @return the wizard return code
+	 */
+	public int openUpdateWizard(boolean skipSelectionsPage, UpdateOperation operation, LoadMetadataRepositoryJob job) {
+		UpdateWizard wizard = new UpdateWizard(this, operation, operation.getSelectedUpdates(), job);
+		wizard.setSkipSelectionsPage(skipSelectionsPage);
+		WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+		dialog.create();
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UPDATE_WIZARD);
+		return dialog.open();
+	}
+
+	/**
+	 * Open an uninstall wizard for the specified uninstall operation.
+	 * 
+	 * @param initialSelections the IInstallableUnits that should be selected when the wizard opens.  May be <code>null</code>.
+	 * @param operation the operation describing the proposed uninstall.  Must not be <code>null</code>.
+	 * @param job a repository load job that is loading or has already loaded the repositories.  Can be used to pass along
+	 * an in-memory repository reference to the wizard.
+	 * 
+	 * @return the wizard return code
+	 */
+	public int openUninstallWizard(Collection<IInstallableUnit> initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
+		UninstallWizard wizard = new UninstallWizard(this, operation, initialSelections, job);
+		WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+		dialog.create();
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UNINSTALL_WIZARD);
+		return dialog.open();
+	}
+
+	/**
+	 * Open a UI that allows the user to manipulate the repositories.
+	 * @param shell the shell that should parent the UI
+	 */
+	public void manipulateRepositories(Shell shell) {
+		if (policy.getRepositoryPreferencePageId() != null) {
+			PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell, policy.getRepositoryPreferencePageId(), null, null);
+			dialog.open();
+		} else {
+			TitleAreaDialog dialog = new TitleAreaDialog(shell) {
+				RepositoryManipulationPage page;
+
+				protected Control createDialogArea(Composite parent) {
+					page = new RepositoryManipulationPage();
+					page.setProvisioningUI(ProvisioningUI.this);
+					page.init(PlatformUI.getWorkbench());
+					page.createControl(parent);
+					this.setTitle(ProvUIMessages.RepositoryManipulationPage_Title);
+					this.setMessage(ProvUIMessages.RepositoryManipulationPage_Description);
+
+					Control control = page.getControl();
+					control.setLayoutData(new GridData(GridData.FILL_BOTH));
+					return page.getControl();
+				}
+
+				protected boolean isResizable() {
+					return true;
+				}
+
+				protected void okPressed() {
+					if (page.performOk())
+						super.okPressed();
+				}
+
+				protected void cancelPressed() {
+					if (page.performCancel())
+						super.cancelPressed();
+				}
+			};
+			dialog.open();
+		}
+	}
+
+	/**
+	 * Schedule a job to execute the supplied ProvisioningOperation.
+	 * 
+	 * @param job The operation to execute
+	 * @param errorStyle the flags passed to the StatusManager for error reporting
+	 */
+	public void schedule(final ProvisioningJob job, final int errorStyle) {
+		job.setUser(true);
+		runner.schedule(job, errorStyle);
+	}
+
+	/**
+	 * Manage the supplied job as a provisioning operation.  This will allow
+	 * the ProvisioningUI to be aware that a provisioning job is running, as well
+	 * as manage the restart behavior for the job.
+	 * 
+	 * @param job the job to be managed
+	 * @param jobRestartPolicy an integer constant specifying whether the
+	 * supplied job should cause a restart of the system.  The UI Policy's
+	 * restart policy is used in conjunction with this constant to determine
+	 * what actually occurs when a job completes.
+	 * 
+	 * @see ProvisioningJob#RESTART_NONE
+	 * @see ProvisioningJob#RESTART_ONLY
+	 * @see ProvisioningJob#RESTART_OR_APPLY
+	 */
+	public void manageJob(Job job, final int jobRestartPolicy) {
+		runner.manageJob(job, jobRestartPolicy);
+	}
+
+	/**
+	 * Return a boolean indicating whether the receiver has scheduled any operations
+	 * for the profile under management.
+	 * 
+	 * @return <code>true</code> if other provisioning operations have been scheduled,
+	 * <code>false</code> if there are no operations scheduled.
+	 */
+	public boolean hasScheduledOperations() {
+		return getSession().hasScheduledOperationsFor(profileId);
+	}
+
+	/**
+	 * This method is for automated testing only.
+	 * @return the provisioning operation that can suppress restart for automated testing.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public ProvisioningOperationRunner getOperationRunner() {
+		return runner;
+	}
+
+	/**
+	 * Signal that a repository operation is about to begin.  This allows clients to ignore intermediate
+	 * events until the operation is completed.  Callers are responsible for ensuring that
+	 * a corresponding operation ending event is signaled.
+	 */
+	public void signalRepositoryOperationStart() {
+		runner.eventBatchCount++;
+		if (Tracing.DEBUG_EVENTS_CLIENT)
+			Tracing.debug("Batch Count Incremented to:  " + Integer.toString(runner.eventBatchCount)); //$NON-NLS-1$
+		ProvUI.getProvisioningEventBus(getSession()).publishEvent(new RepositoryOperationBeginningEvent(this));
+	}
+
+	/**
+	 * Signal that a repository operation has completed.
+	 * 
+	 * @param event a {@link RepositoryEvent} that describes the overall operation.  May be <code>null</code>, which
+	 * indicates that there was no single event that can describe the operation.  
+	 * @param update <code>true</code> if the event should be reflected in the UI, false if it should be ignored.
+	 */
+	public void signalRepositoryOperationComplete(RepositoryEvent event, boolean update) {
+		runner.eventBatchCount--;
+		if (Tracing.DEBUG_EVENTS_CLIENT)
+			Tracing.debug("Batch Count Decremented to:  " + Integer.toString(runner.eventBatchCount)); //$NON-NLS-1$
+		ProvUI.getProvisioningEventBus(getSession()).publishEvent(new RepositoryOperationEndingEvent(this, update, event));
+	}
+
+	/**
+	 * Load the specified metadata repository, signaling a repository operation start event
+	 * before loading, and a repository operation complete event after loading.
+	 * 
+	 * @param location the location of the repository
+	 * @param notify <code>true</code> if the UI should be updated as a result of the load, <code>false</code> if it should not
+	 * @param monitor the progress monitor to be used
+	 * @return the repository
+	 * @throws ProvisionException if the repository could not be loaded
+	 */
+
+	public IMetadataRepository loadMetadataRepository(URI location, boolean notify, IProgressMonitor monitor) throws ProvisionException {
+		IMetadataRepository repo = null;
+		try {
+			signalRepositoryOperationStart();
+			IMetadataRepositoryManager manager = ProvUI.getMetadataRepositoryManager(getSession());
+			repo = manager.loadRepository(location, monitor);
+			// If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
+			// This will keep the name in the manager even when the repo is not loaded
+			String name = manager.getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+			if (name == null || name.length() == 0) {
+				name = repo.getName();
+				if (name != null && name.length() > 0)
+					manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
+			}
+		} catch (ProvisionException e) {
+			getRepositoryTracker().reportLoadFailure(location, e);
+		} finally {
+			// We have no idea how many repos may have been touched as a result of loading this one.
+			signalRepositoryOperationComplete(null, notify);
+		}
+		return repo;
+	}
+
+	/**
+	 * Load the specified artifact repository, signaling a repository operation start event
+	 * before loading, and a repository operation complete event after loading.
+	 * 
+	 * @param location the location of the repository
+	 * @param update <code>true</code> if the UI should be updated as a result of the load, <code>false</code> if it should not
+	 * @param monitor the progress monitor to be used
+	 * @return the repository
+	 * @throws ProvisionException if the repository could not be loaded
+	 */
+	public IArtifactRepository loadArtifactRepository(URI location, boolean update, IProgressMonitor monitor) throws ProvisionException {
+		IArtifactRepository repo;
+		signalRepositoryOperationStart();
+		try {
+			IArtifactRepositoryManager manager = ProvUI.getArtifactRepositoryManager(getSession());
+			repo = manager.loadRepository(location, monitor);
+
+			// If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
+			// This will keep the name in the manager even when the repo is not loaded
+			String name = manager.getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+			if (name == null) {
+				name = manager.getRepositoryProperty(location, IRepository.PROP_NAME);
+				if (name != null)
+					manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
+			}
+		} finally {
+			// We have no idea how many repos may have been touched as a result of loading this one,
+			// so we do not use a specific repository event to represent it.
+			signalRepositoryOperationComplete(null, update);
+		}
+		return repo;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
new file mode 100644
index 0000000..e1f2935
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
@@ -0,0 +1,954 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.*;
+import org.eclipse.equinox.internal.p2.ui.model.*;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.operations.RepositoryTracker;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.progress.WorkbenchJob;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * Page that allows users to update, add, remove, import, and
+ * export repositories.  This page can be hosted inside a preference
+ * dialog or inside its own dialog.  
+ * 
+ * When hosting this page inside a non-preference dialog, some of the 
+ * dialog methods will likely have to call page methods.  The following 
+ * snippet shows how to host this page inside a TitleAreaDialog.
+ * <pre>
+ *		TitleAreaDialog dialog = new TitleAreaDialog(shell) {
+ *
+ *			RepositoryManipulationPage page;
+ *
+ *			protected Control createDialogArea(Composite parent) {
+ *				page = new RepositoryManipulationPage();
+ *              page.setProvisioningUI(ProvisioningUI.getDefaultUI());
+ *				page.createControl(parent);
+ *				this.setTitle("Software Sites");
+ *				this.setMessage("The enabled sites will be searched for software.  Disabled sites are ignored.");
+ *				return page.getControl();
+ *			}
+ *
+ *			protected void okPressed() {
+ *				if (page.performOk())
+ *					super.okPressed();
+ *			}
+ *
+ *			protected void cancelPressed() {
+ *				if (page.performCancel())
+ *					super.cancelPressed();
+ *			}
+ *		};
+ *		dialog.open();
+ * </pre>
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * 
+ * @since 2.0
+ */
+public class RepositoryManipulationPage extends PreferencePage implements IWorkbenchPreferencePage, ICopyable {
+	final static String DEFAULT_FILTER_TEXT = ProvUIMessages.RepositoryManipulationPage_DefaultFilterString;
+	private final static int FILTER_DELAY = 200;
+
+	StructuredViewerProvisioningListener listener;
+	CheckboxTableViewer repositoryViewer;
+	Table table;
+	ProvisioningUI ui;
+	Policy policy;
+	Display display;
+	boolean changed = false;
+	MetadataRepositoryElementComparator comparator;
+	RepositoryDetailsLabelProvider labelProvider;
+	RepositoryTracker tracker;
+	RepositoryTracker localCacheRepoManipulator;
+	/**
+	 * The input field is initialized lazily and should only be accessed via the {@link #getInput()} method.
+	 */
+	CachedMetadataRepositories input;
+	Text pattern, details;
+	PatternFilter filter;
+	WorkbenchJob filterJob;
+	Button addButton, removeButton, editButton, refreshButton, disableButton, exportButton;
+
+	class CachedMetadataRepositories extends MetadataRepositories {
+		private Hashtable<String, MetadataRepositoryElement> cachedElements;
+
+		CachedMetadataRepositories() {
+			super(ui);
+			setIncludeDisabledRepositories(getPolicy().getRepositoriesVisible());
+		}
+
+		public int getQueryType() {
+			return QueryProvider.METADATA_REPOS;
+		}
+
+		public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
+			if (cachedElements == null) {
+				Object[] children = super.fetchChildren(o, monitor);
+				cachedElements = new Hashtable<String, MetadataRepositoryElement>(children.length);
+				for (int i = 0; i < children.length; i++) {
+					if (children[i] instanceof MetadataRepositoryElement) {
+						put((MetadataRepositoryElement) children[i]);
+					}
+				}
+			}
+			return cachedElements.values().toArray();
+		}
+
+		MetadataRepositoryElement[] getElements() {
+			return cachedElements.values().toArray(new MetadataRepositoryElement[cachedElements.size()]);
+		}
+
+		void remove(MetadataRepositoryElement element) {
+			cachedElements.remove(getKey(element.getLocation()));
+		}
+
+		void put(MetadataRepositoryElement element) {
+			cachedElements.put(getKey(element.getLocation()), element);
+		}
+
+		MetadataRepositoryElement get(URI location) {
+			return cachedElements.get(getKey(location));
+		}
+
+		String getKey(URI location) {
+			String key = URIUtil.toUnencodedString(location);
+			int length = key.length();
+			if (length > 0 && key.charAt(length - 1) == '/') {
+				key = key.substring(0, length - 1);
+			}
+			return key;
+		}
+
+	}
+
+	class MetadataRepositoryPatternFilter extends PatternFilter {
+		MetadataRepositoryPatternFilter() {
+			setIncludeLeadingWildcard(true);
+		}
+
+		public boolean isElementVisible(Viewer viewer, Object element) {
+			if (element instanceof MetadataRepositoryElement) {
+				return wordMatches(labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_NAME) + " " + labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_LOCATION)); //$NON-NLS-1$
+			}
+			return false;
+		}
+	}
+
+	/**
+	 * Create a repository manipulation page that will display the repositories
+	 * available to the user.
+	 */
+	public RepositoryManipulationPage() {
+		this.setProvisioningUI(ProvisioningUI.getDefaultUI());
+	}
+
+	/**
+	 * Set the provisioning UI that provides the session, policy, and other
+	 * services for the UI.  This method must be called before the contents are 
+	 * created or it will have no effect.
+	 * 
+	 * @param ui the provisioning UI to use for this page.
+	 */
+	public void setProvisioningUI(ProvisioningUI ui) {
+		this.ui = ui;
+		this.policy = ui.getPolicy();
+		tracker = ui.getRepositoryTracker();
+	}
+
+	protected Control createContents(Composite parent) {
+		display = parent.getDisplay();
+		// The help refers to the full-blown dialog.  No help if it's read only.
+		if (policy.getRepositoriesVisible())
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(parent.getShell(), IProvHelpContextIds.REPOSITORY_MANIPULATION_DIALOG);
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		composite.setLayoutData(gd);
+
+		GridLayout layout = new GridLayout();
+		layout.numColumns = policy.getRepositoriesVisible() ? 2 : 1;
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		composite.setLayout(layout);
+
+		// Filter box
+		pattern = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.CANCEL);
+		pattern.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result = DEFAULT_FILTER_TEXT;
+			}
+		});
+		pattern.setText(DEFAULT_FILTER_TEXT);
+		pattern.selectAll();
+		pattern.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				applyFilter();
+			}
+		});
+
+		pattern.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.ARROW_DOWN) {
+					if (table.getItemCount() > 0) {
+						table.setFocus();
+					} else if (e.character == SWT.CR) {
+						return;
+					}
+				}
+			}
+		});
+
+		pattern.addFocusListener(new FocusAdapter() {
+			public void focusGained(FocusEvent e) {
+				display.asyncExec(new Runnable() {
+					public void run() {
+						if (!pattern.isDisposed()) {
+							if (DEFAULT_FILTER_TEXT.equals(pattern.getText().trim())) {
+								pattern.selectAll();
+							}
+						}
+					}
+				});
+			}
+		});
+		gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		pattern.setLayoutData(gd);
+
+		// spacer to fill other column
+		if (policy.getRepositoriesVisible())
+			new Label(composite, SWT.NONE);
+
+		// Table of available repositories
+		table = new Table(composite, SWT.CHECK | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		repositoryViewer = new CheckboxTableViewer(table);
+
+		// Key listener for delete
+		table.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					removeRepositories();
+				}
+			}
+		});
+		setTableColumns();
+		CopyUtils.activateCopy(this, table);
+
+		repositoryViewer.setComparer(new ProvElementComparer());
+		comparator = new MetadataRepositoryElementComparator(RepositoryDetailsLabelProvider.COL_NAME);
+		repositoryViewer.setComparator(comparator);
+		filter = new MetadataRepositoryPatternFilter();
+		repositoryViewer.setFilters(new ViewerFilter[] {filter});
+		// We don't need a deferred content provider because we are caching local results before
+		// actually querying
+		repositoryViewer.setContentProvider(new ProvElementContentProvider());
+		labelProvider = new RepositoryDetailsLabelProvider();
+		repositoryViewer.setLabelProvider(labelProvider);
+
+		// Edit the nickname
+		repositoryViewer.setCellModifier(new ICellModifier() {
+			public boolean canModify(Object element, String property) {
+				return element instanceof MetadataRepositoryElement;
+			}
+
+			public Object getValue(Object element, String property) {
+				return ((MetadataRepositoryElement) element).getName();
+			}
+
+			public void modify(Object element, String property, Object value) {
+				if (value != null && value.toString().length() >= 0) {
+					MetadataRepositoryElement repo;
+					if (element instanceof Item) {
+						repo = (MetadataRepositoryElement) ((Item) element).getData();
+					} else if (element instanceof MetadataRepositoryElement) {
+						repo = (MetadataRepositoryElement) element;
+					} else {
+						return;
+					}
+					if (!value.toString().equals(repo.getName())) {
+						changed = true;
+						repo.setNickname(value.toString());
+						if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_NAME)
+							repositoryViewer.refresh(true);
+						else
+							repositoryViewer.update(repo, null);
+					}
+				}
+			}
+
+		});
+		repositoryViewer.setColumnProperties(new String[] {"nickname"}); //$NON-NLS-1$
+		repositoryViewer.setCellEditors(new CellEditor[] {new TextCellEditor(repositoryViewer.getTable())});
+
+		repositoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				if (policy.getRepositoriesVisible())
+					validateButtons();
+				setDetails();
+			}
+		});
+
+		repositoryViewer.setCheckStateProvider(new ICheckStateProvider() {
+			public boolean isChecked(Object element) {
+				return ((MetadataRepositoryElement) element).isEnabled();
+			}
+
+			public boolean isGrayed(Object element) {
+				return false;
+			}
+		});
+
+		repositoryViewer.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				MetadataRepositoryElement element = (MetadataRepositoryElement) event.getElement();
+				element.setEnabled(event.getChecked());
+				// paranoid that an equal but not identical element was passed in as the selection.
+				// update the cache map just in case.
+				getInput().put(element);
+				// update the viewer to show the change
+				updateForEnablementChange(new MetadataRepositoryElement[] {element});
+			}
+		});
+
+		// Input last
+		repositoryViewer.setInput(getInput());
+
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
+		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
+		table.setLayoutData(data);
+
+		// Drop targets and vertical buttons only if repository manipulation is provided.
+		if (policy.getRepositoriesVisible()) {
+			DropTarget target = new DropTarget(table, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
+			target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
+			target.addDropListener(new RepositoryManipulatorDropTarget(ui, table));
+
+			// Vertical buttons
+			Composite verticalButtonBar = createVerticalButtonBar(composite);
+			data = new GridData(SWT.FILL, SWT.FILL, false, false);
+			data.verticalAlignment = SWT.TOP;
+			data.verticalIndent = 0;
+			verticalButtonBar.setLayoutData(data);
+			listener = getViewerProvisioningListener();
+
+			ProvUI.addProvisioningListener(listener);
+			composite.addDisposeListener(new DisposeListener() {
+				public void widgetDisposed(DisposeEvent event) {
+					ProvUI.removeProvisioningListener(listener);
+				}
+			});
+
+			validateButtons();
+		}
+
+		// Details area
+		details = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
+		data = new GridData(SWT.FILL, SWT.FILL, true, false);
+		data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_SITEDETAILS_HEIGHT);
+
+		details.setLayoutData(data);
+
+		Dialog.applyDialogFont(composite);
+		return composite;
+	}
+
+	private Button createVerticalButton(Composite parent, String label, boolean defaultButton) {
+		Button button = new Button(parent, SWT.PUSH);
+		button.setText(label);
+
+		GridData data = setVerticalButtonLayoutData(button);
+		data.horizontalAlignment = GridData.FILL;
+
+		button.setToolTipText(label);
+		if (defaultButton) {
+			Shell shell = parent.getShell();
+			if (shell != null) {
+				shell.setDefaultButton(button);
+			}
+		}
+		return button;
+	}
+
+	private GridData setVerticalButtonLayoutData(Button button) {
+		GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+		Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+		data.widthHint = Math.max(widthHint, minSize.x);
+		button.setLayoutData(data);
+		return data;
+	}
+
+	private void setTableColumns() {
+		table.setHeaderVisible(true);
+		String[] columnHeaders;
+		if (policy.getRepositoriesVisible())
+			columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle, ProvUIMessages.RepositoryManipulationPage_EnabledColumnTitle};
+		else
+			columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle};
+		for (int i = 0; i < columnHeaders.length; i++) {
+			TableColumn tc = new TableColumn(table, SWT.NONE, i);
+			tc.setResizable(true);
+			tc.setText(columnHeaders[i]);
+			if (i == RepositoryDetailsLabelProvider.COL_ENABLEMENT) {
+				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH));
+				tc.setAlignment(SWT.CENTER);
+			} else if (i == RepositoryDetailsLabelProvider.COL_NAME) {
+				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
+			} else {
+				tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH));
+			}
+			tc.addSelectionListener(new SelectionListener() {
+				public void widgetDefaultSelected(SelectionEvent e) {
+					columnSelected((TableColumn) e.widget);
+				}
+
+				public void widgetSelected(SelectionEvent e) {
+					columnSelected((TableColumn) e.widget);
+				}
+
+			});
+			// First column only
+			if (i == 0) {
+				table.setSortColumn(tc);
+				table.setSortDirection(SWT.UP);
+			}
+		}
+	}
+
+	private Composite createVerticalButtonBar(Composite parent) {
+		// Create composite.
+		Composite composite = new Composite(parent, SWT.NONE);
+		initializeDialogUnits(composite);
+
+		// create a layout with spacing and margins appropriate for the font
+		// size.
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginWidth = 5;
+		layout.marginHeight = 0;
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		composite.setLayout(layout);
+
+		createVerticalButtons(composite);
+		return composite;
+	}
+
+	private void createVerticalButtons(Composite parent) {
+		addButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Add, false);
+		addButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				addRepository();
+			}
+		});
+
+		editButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Edit, false);
+		editButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				changeRepositoryProperties();
+			}
+		});
+
+		removeButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Remove, false);
+		removeButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				removeRepositories();
+			}
+		});
+
+		refreshButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_RefreshConnection, false);
+		refreshButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				refreshRepository();
+			}
+		});
+
+		disableButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_DisableButton, false);
+		disableButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				toggleRepositoryEnablement();
+			}
+		});
+
+		Button button = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Import, false);
+		button.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				importRepositories();
+			}
+		});
+
+		exportButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Export, false);
+		exportButton.addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				exportRepositories();
+			}
+		});
+	}
+
+	CachedMetadataRepositories getInput() {
+		if (input == null)
+			input = new CachedMetadataRepositories();
+		return input;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
+	 */
+	public boolean performOk() {
+		if (changed)
+			ElementUtils.updateRepositoryUsingElements(getElements(), getShell());
+		return super.performOk();
+	}
+
+	private StructuredViewerProvisioningListener getViewerProvisioningListener() {
+		return new StructuredViewerProvisioningListener(RepositoryManipulationPage.this.getClass().getName(), repositoryViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
+			protected void repositoryDiscovered(RepositoryEvent e) {
+				RepositoryManipulationPage.this.safeRefresh(null);
+			}
+
+			protected void repositoryChanged(RepositoryEvent e) {
+				RepositoryManipulationPage.this.safeRefresh(null);
+			}
+		};
+	}
+
+	MetadataRepositoryElement[] getElements() {
+		return getInput().getElements();
+	}
+
+	MetadataRepositoryElement[] getSelectedElements() {
+		Object[] items = ((IStructuredSelection) repositoryViewer.getSelection()).toArray();
+		ArrayList<Object> list = new ArrayList<Object>(items.length);
+		for (int i = 0; i < items.length; i++) {
+			if (items[i] instanceof MetadataRepositoryElement)
+				list.add(items[i]);
+		}
+		return list.toArray(new MetadataRepositoryElement[list.size()]);
+	}
+
+	void validateButtons() {
+		MetadataRepositoryElement[] elements = getSelectedElements();
+		exportButton.setEnabled(elements.length > 0);
+		removeButton.setEnabled(elements.length > 0);
+		editButton.setEnabled(elements.length == 1);
+		refreshButton.setEnabled(elements.length == 1);
+		if (elements.length >= 1) {
+			if (toggleMeansDisable(elements))
+				disableButton.setText(ProvUIMessages.RepositoryManipulationPage_DisableButton);
+			else
+				disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
+			disableButton.setEnabled(true);
+		} else {
+			disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
+			disableButton.setEnabled(false);
+		}
+	}
+
+	void addRepository() {
+		AddRepositoryDialog dialog = new AddRepositoryDialog(getShell(), ui) {
+			protected RepositoryTracker getRepositoryTracker() {
+				return RepositoryManipulationPage.this.getLocalCacheRepoTracker();
+			}
+		};
+		dialog.setTitle(ProvUIMessages.ColocatedRepositoryManipulator_AddSiteOperationLabel);
+		dialog.open();
+	}
+
+	void refreshRepository() {
+		final MetadataRepositoryElement[] selected = getSelectedElements();
+		final ProvisionException[] fail = new ProvisionException[1];
+		final boolean[] remove = new boolean[1];
+		remove[0] = false;
+		if (selected.length != 1)
+			return;
+		final URI location = selected[0].getLocation();
+		ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
+		try {
+			dialog.run(true, true, new IRunnableWithProgress() {
+				public void run(IProgressMonitor monitor) {
+					monitor.beginTask(NLS.bind(ProvUIMessages.RepositoryManipulationPage_ContactingSiteMessage, location), 100);
+					try {
+						// Batch the events for this operation so that any events on reload (discovery, etc.) will be ignored
+						// in the UI as they happen.
+						ui.signalRepositoryOperationStart();
+						tracker.clearRepositoryNotFound(location);
+						// If the managers don't know this repo, refreshing it will not work.
+						// We temporarily add it, but we must remove it in case the user cancels out of this page.
+						if (!includesRepo(tracker.getKnownRepositories(ui.getSession()), location)) {
+							remove[0] = true;
+							// We don't want to use the tracker here because it ensures that additions are
+							// reported as user events to be responded to.  We don't want, for example, the
+							// install wizard to change combo selections based on what is done here.
+							ProvUI.getMetadataRepositoryManager(ui.getSession()).addRepository(location);
+							ProvUI.getArtifactRepositoryManager(ui.getSession()).addRepository(location);
+						}
+						// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=312332
+						// We assume repository colocation here.  Ideally we should not do this, but the
+						// RepositoryTracker API is swallowing the refresh errors.
+						SubMonitor sub = SubMonitor.convert(monitor, 200);
+						try {
+							ProvUI.getMetadataRepositoryManager(ui.getSession()).refreshRepository(location, sub.newChild(100));
+						} catch (ProvisionException e) {
+							fail[0] = e;
+						}
+						try {
+							ProvUI.getArtifactRepositoryManager(ui.getSession()).refreshRepository(location, sub.newChild(100));
+						} catch (ProvisionException e) {
+							// Failure in the artifact repository.  We will not report this because the user has no separate visibility
+							// of the artifact repository.  We should log the error.  If this repository fails during a download, the error
+							// will be reported at that time to the user, when it matters.  This also prevents false error reporting when
+							// a metadata repository didn't actually have a colocated artifact repository.
+							LogHelper.log(e);
+						}
+					} catch (OperationCanceledException e) {
+						// Catch canceled login attempts
+						fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled, e));
+					} finally {
+						// Check if the monitor was canceled
+						if (fail[0] == null && monitor.isCanceled())
+							fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled));
+						// If we temporarily added a repo so we could read it, remove it.
+						if (remove[0]) {
+							ProvUI.getMetadataRepositoryManager(ui.getSession()).removeRepository(location);
+							ProvUI.getArtifactRepositoryManager(ui.getSession()).removeRepository(location);
+						}
+						ui.signalRepositoryOperationComplete(null, false);
+					}
+				}
+			});
+		} catch (InvocationTargetException e) {
+			// nothing to report
+		} catch (InterruptedException e) {
+			// nothing to report
+		}
+		if (fail[0] != null) {
+			// If the repo was not found, tell ProvUI that we will be reporting it.
+			// We are going to report problems directly to the status manager because we
+			// do not want the automatic repo location editing to kick in.
+			if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) {
+				tracker.addNotFound(location);
+			}
+			if (!fail[0].getStatus().matches(IStatus.CANCEL)) {
+				// An error is only shown if the dialog was not canceled
+				ProvUI.handleException(fail[0], null, StatusManager.SHOW);
+			}
+		} else {
+			// Confirm that it was successful
+			MessageDialog.openInformation(getShell(), ProvUIMessages.RepositoryManipulationPage_TestConnectionTitle, NLS.bind(ProvUIMessages.RepositoryManipulationPage_TestConnectionSuccess, URIUtil.toUnencodedString(location)));
+		}
+		repositoryViewer.update(selected[0], null);
+		setDetails();
+	}
+
+	boolean includesRepo(URI[] repos, URI repo) {
+		for (int i = 0; i < repos.length; i++)
+			if (repos[i].equals(repo))
+				return true;
+		return false;
+	}
+
+	void toggleRepositoryEnablement() {
+		MetadataRepositoryElement[] selected = getSelectedElements();
+		if (selected.length >= 1) {
+			boolean enableSites = !toggleMeansDisable(selected);
+			for (int i = 0; i < selected.length; i++) {
+				selected[i].setEnabled(enableSites);
+				getInput().put(selected[i]);
+			}
+			updateForEnablementChange(selected);
+		}
+		validateButtons();
+	}
+
+	void updateForEnablementChange(MetadataRepositoryElement[] updated) {
+		if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_ENABLEMENT)
+			repositoryViewer.refresh(true);
+		else
+			for (int i = 0; i < updated.length; i++)
+				repositoryViewer.update(updated[i], null);
+		changed = true;
+	}
+
+	void importRepositories() {
+		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
+			public void run() {
+				MetadataRepositoryElement[] imported = UpdateManagerCompatibility.importSites(getShell());
+				if (imported.length > 0) {
+					changed = true;
+					for (int i = 0; i < imported.length; i++)
+						getInput().put(imported[i]);
+					safeRefresh(null);
+				}
+			}
+		});
+	}
+
+	void exportRepositories() {
+		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
+			public void run() {
+				MetadataRepositoryElement[] elements = getSelectedElements();
+				if (elements.length == 0)
+					elements = getElements();
+				UpdateManagerCompatibility.exportSites(getShell(), elements);
+			}
+		});
+	}
+
+	void changeRepositoryProperties() {
+		final MetadataRepositoryElement[] selected = getSelectedElements();
+		if (selected.length != 1)
+			return;
+		RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(getShell(), ui) {
+			protected String getInitialLocationText() {
+				return URIUtil.toUnencodedString(selected[0].getLocation());
+			}
+
+			protected String getInitialNameText() {
+				return selected[0].getName();
+			}
+
+		};
+		int retCode = dialog.open();
+		if (retCode == Window.OK) {
+			selected[0].setNickname(dialog.getName());
+			selected[0].setLocation(dialog.getLocation());
+			changed = true;
+			repositoryViewer.update(selected[0], null);
+			setDetails();
+		}
+	}
+
+	void columnSelected(TableColumn tc) {
+		TableColumn[] cols = table.getColumns();
+		for (int i = 0; i < cols.length; i++) {
+			if (cols[i] == tc) {
+				if (i != comparator.getSortKey()) {
+					comparator.setSortKey(i);
+					table.setSortColumn(tc);
+					comparator.sortAscending();
+					table.setSortDirection(SWT.UP);
+				} else {
+					if (comparator.isAscending()) {
+						table.setSortDirection(SWT.DOWN);
+						comparator.sortDescending();
+					} else {
+						table.setSortDirection(SWT.UP);
+						comparator.sortAscending();
+					}
+				}
+				repositoryViewer.refresh();
+				break;
+			}
+		}
+	}
+
+	void safeRefresh(final MetadataRepositoryElement elementToSelect) {
+		Runnable runnable = new Runnable() {
+			public void run() {
+				repositoryViewer.refresh();
+				if (elementToSelect != null)
+					repositoryViewer.setSelection(new StructuredSelection(elementToSelect), true);
+			}
+		};
+		if (Display.getCurrent() == null)
+			display.asyncExec(runnable);
+		else
+			runnable.run();
+	}
+
+	void applyFilter() {
+		String text = pattern.getText();
+		if (text == DEFAULT_FILTER_TEXT)
+			text = ""; //$NON-NLS-1$
+		if (text.length() == 0)
+			filter.setPattern(null);
+		else
+			filter.setPattern(text);
+		if (filterJob != null)
+			filterJob.cancel();
+		filterJob = new WorkbenchJob("filter job") { //$NON-NLS-1$
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				if (monitor.isCanceled())
+					return Status.CANCEL_STATUS;
+				if (!repositoryViewer.getTable().isDisposed())
+					repositoryViewer.refresh();
+				return Status.OK_STATUS;
+			}
+
+		};
+		filterJob.setSystem(true);
+		filterJob.schedule(FILTER_DELAY);
+	}
+
+	void setDetails() {
+		MetadataRepositoryElement[] selections = getSelectedElements();
+		if (selections.length == 1) {
+			details.setText(selections[0].getDescription());
+		} else {
+			details.setText(""); //$NON-NLS-1$
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	public void init(IWorkbench workbench) {
+		noDefaultAndApplyButton();
+		if (ui == null) {
+			setProvisioningUI(ProvisioningUI.getDefaultUI());
+		}
+	}
+
+	void removeRepositories() {
+		MetadataRepositoryElement[] selections = getSelectedElements();
+		if (selections.length > 0) {
+			String message = ProvUIMessages.RepositoryManipulationPage_RemoveConfirmMessage;
+			if (selections.length == 1)
+				message = NLS.bind(ProvUIMessages.RepositoryManipulationPage_RemoveConfirmSingleMessage, URIUtil.toUnencodedString(selections[0].getLocation()));
+			if (MessageDialog.openQuestion(getShell(), ProvUIMessages.RepositoryManipulationPage_RemoveConfirmTitle, message)) {
+
+				changed = true;
+				for (int i = 0; i < selections.length; i++) {
+					getInput().remove(selections[i]);
+				}
+				safeRefresh(null);
+			}
+		}
+	}
+
+	// Return a repo manipulator that only operates on the local cache.
+	// Labels and other presentation info are used from the original manipulator.
+	RepositoryTracker getLocalCacheRepoTracker() {
+		if (localCacheRepoManipulator == null)
+			localCacheRepoManipulator = new RepositoryTracker() {
+				public void addRepository(URI location, String nickname, ProvisioningSession session) {
+					MetadataRepositoryElement element = getInput().get(location);
+					if (element == null) {
+						element = new MetadataRepositoryElement(getInput(), location, true);
+						getInput().put(element);
+					}
+					if (nickname != null)
+						element.setNickname(nickname);
+					changed = true;
+					safeRefresh(element);
+				}
+
+				public URI[] getKnownRepositories(ProvisioningSession session) {
+					return RepositoryManipulationPage.this.getKnownRepositories();
+				}
+
+				public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
+					RepositoryManipulationPage.this.removeRepositories();
+				}
+
+				public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
+					// Nothing to refresh in the local cache
+				}
+
+				public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
+					IStatus status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
+					if (status.isOK()) {
+						String repoString = URIUtil.toUnencodedString(location);
+						int length = repoString.length();
+						if (length > 0 && repoString.charAt(length - 1) == '/') {
+							try {
+								location = URIUtil.fromString(repoString.substring(0, length - 1));
+							} catch (URISyntaxException e) {
+								return status;
+							}
+							status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
+						}
+					}
+					return status;
+
+				}
+			};
+		return localCacheRepoManipulator;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
+	 */
+	public void copyToClipboard(Control activeControl) {
+		MetadataRepositoryElement[] elements = getSelectedElements();
+		if (elements.length == 0)
+			elements = getElements();
+		String text = ""; //$NON-NLS-1$
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < elements.length; i++) {
+			buffer.append(labelProvider.getClipboardText(elements[i], CopyUtils.DELIMITER));
+			if (i > 0)
+				buffer.append(CopyUtils.NEWLINE);
+		}
+		text = buffer.toString();
+
+		if (text.length() == 0)
+			return;
+		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
+		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
+		clipboard.dispose();
+	}
+
+	// If more than half of the selected repos are enabled, toggle means disable.
+	// Otherwise it means enable.
+	private boolean toggleMeansDisable(MetadataRepositoryElement[] elements) {
+		double count = 0;
+		for (int i = 0; i < elements.length; i++)
+			if (elements[i].isEnabled())
+				count++;
+		return (count / elements.length) > 0.5;
+	}
+
+	URI[] getKnownRepositories() {
+		MetadataRepositoryElement[] elements = getElements();
+		URI[] locations = new URI[elements.length];
+		for (int i = 0; i < elements.length; i++)
+			locations[i] = elements[i].getLocation();
+		return locations;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
new file mode 100644
index 0000000..8d95e0f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
@@ -0,0 +1,416 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.p2.ui;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Iterator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.ui.*;
+import org.eclipse.equinox.internal.p2.ui.dialogs.CopyUtils;
+import org.eclipse.equinox.internal.p2.ui.dialogs.InstalledIUGroup;
+import org.eclipse.equinox.internal.p2.ui.model.ProfileSnapshots;
+import org.eclipse.equinox.internal.p2.ui.model.RollbackProfileElement;
+import org.eclipse.equinox.internal.p2.ui.viewers.*;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.about.InstallationPage;
+import org.eclipse.ui.menus.AbstractContributionFactory;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * RevertProfilePage displays a profile's configuration history in
+ * an Installation Page.  Clients can use this class as the implementation
+ * class for an installationPages extension.
+ * 
+ * @see InstallationPage
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 2.0
+ *
+ */
+public class RevertProfilePage extends InstallationPage implements ICopyable {
+
+	private static final int REVERT_ID = IDialogConstants.CLIENT_ID;
+	private static final int DELETE_ID = IDialogConstants.CLIENT_ID + 1;
+	TableViewer configsViewer;
+	TreeViewer configContentsViewer;
+	IUDetailsLabelProvider labelProvider;
+	IAction revertAction;
+	Button revertButton, deleteButton;
+	String profileId;
+	AbstractContributionFactory factory;
+	Text detailsArea;
+	InstalledIUGroup installedIUGroup;
+	ProvisioningUI ui;
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPageButtons(Composite parent) {
+		if (profileId == null)
+			return;
+		deleteButton = createButton(parent, DELETE_ID, ProvUIMessages.RevertProfilePage_Delete);
+		deleteButton.setToolTipText(ProvUIMessages.RevertProfilePage_DeleteTooltip);
+		deleteButton.setEnabled(computeDeleteEnablement());
+		revertButton = createButton(parent, REVERT_ID, revertAction.getText());
+		revertButton.setToolTipText(revertAction.getToolTipText());
+		revertButton.setEnabled(revertAction.isEnabled());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		ui = ProvisioningUI.getDefaultUI();
+		profileId = ui.getProfileId();
+		if (profileId == null) {
+			IStatus status = ui.getPolicy().getNoProfileChosenStatus();
+			if (status != null)
+				ProvUI.reportStatus(status, StatusManager.LOG);
+			Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
+			text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+			text.setText(ProvUIMessages.RevertProfilePage_NoProfile);
+			setControl(text);
+			return;
+		}
+
+		initializeDialogUnits(parent);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.REVERT_CONFIGURATION_WIZARD);
+
+		SashForm sashForm = new SashForm(parent, SWT.VERTICAL);
+		sashForm.setLayout(new GridLayout());
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		sashForm.setLayoutData(gd);
+
+		createConfigurationsSection(sashForm);
+		createContentsSection(sashForm);
+		setControl(sashForm);
+
+		// prime the selection.  The selection accesses the
+		// revert action, so create it also.
+		createRevertAction();
+	}
+
+	private void createConfigurationsSection(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(gd);
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(ProvUIMessages.RevertDialog_ConfigsLabel);
+		configsViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		ProvElementContentProvider provider = new ProvElementContentProvider() {
+			protected void finishedFetchingElements(Object o) {
+				Object element = configsViewer.getElementAt(0);
+				if (element != null)
+					configsViewer.setSelection(new StructuredSelection(element));
+			}
+		};
+		// Use deferred fetch because getting snapshots is expensive.
+		provider.setFetchInBackground(true);
+		configsViewer.setContentProvider(provider);
+		configsViewer.setLabelProvider(new ProvElementLabelProvider());
+		configsViewer.setComparator(new ViewerComparator() {
+			// We override the ViewerComparator so that we don't get the labels of the elements
+			// for comparison, but rather get the timestamps and compare them.
+			// Reverse sorting is used so that newest is first.
+			public int compare(Viewer viewer, Object o1, Object o2) {
+				if (o1 instanceof RollbackProfileElement && o2 instanceof RollbackProfileElement) {
+					long timestamp1 = ((RollbackProfileElement) o1).getTimestamp();
+					long timestamp2 = ((RollbackProfileElement) o2).getTimestamp();
+					if (timestamp1 > timestamp2)
+						return -1;
+					return 1;
+				}
+				// this is naive (doesn't consult the label provider), but shouldn't happen
+				return o2.toString().compareTo(o1.toString());
+			}
+		});
+		configsViewer.setInput(getInput());
+
+		configsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				handleSelectionChanged((IStructuredSelection) event.getSelection());
+			}
+
+		});
+		CopyUtils.activateCopy(this, configsViewer.getControl());
+		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		configsViewer.getControl().setLayoutData(gd);
+	}
+
+	private void createContentsSection(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		composite.setLayoutData(gd);
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(ProvUIMessages.RevertDialog_ConfigContentsLabel);
+		configContentsViewer = new TreeViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
+		comparator.useColumnConfig(ProvUI.getIUColumnConfig());
+		configContentsViewer.setComparator(comparator);
+		configContentsViewer.setComparer(new ProvElementComparer());
+		configContentsViewer.setContentProvider(new DeferredQueryContentProvider());
+
+		// columns before labels or you get a blank table
+		setTreeColumns(configContentsViewer.getTree());
+		labelProvider = new IUDetailsLabelProvider();
+		configContentsViewer.setLabelProvider(labelProvider);
+
+		gd = new GridData(GridData.FILL_BOTH);
+		configContentsViewer.getControl().setLayoutData(gd);
+		CopyUtils.activateCopy(this, configContentsViewer.getControl());
+	}
+
+	private void createRevertAction() {
+		revertAction = new Action() {
+			public void run() {
+				boolean result = MessageDialog.openQuestion(getShell(), ProvUIMessages.RevertDialog_Title, ProvUIMessages.RevertDialog_ConfirmRestartMessage);
+				if (!result)
+					return;
+				boolean finish = revert();
+				if (finish) {
+					getPageContainer().closeModalContainers();
+				}
+			}
+		};
+		revertAction.setText(ProvUIMessages.RevertProfilePage_RevertLabel);
+		revertAction.setToolTipText(ProvUIMessages.RevertProfilePage_RevertTooltip);
+	}
+
+	private Object getInput() {
+		ProfileSnapshots element = new ProfileSnapshots(profileId);
+		return element;
+	}
+
+	protected void buttonPressed(int buttonId) {
+		switch (buttonId) {
+			case REVERT_ID :
+				revertAction.run();
+				break;
+			case DELETE_ID :
+				deleteSelectedSnapshots();
+				break;
+		}
+	}
+
+	protected void handleSelectionChanged(IStructuredSelection selection) {
+		if (!selection.isEmpty()) {
+			if (selection.size() == 1) {
+				final Object selected = selection.getFirstElement();
+				if (selected instanceof RollbackProfileElement) {
+					Object[] elements = configContentsViewer.getExpandedElements();
+					configContentsViewer.getTree().setRedraw(false);
+					configContentsViewer.setInput(selected);
+					configContentsViewer.setExpandedElements(elements);
+					configContentsViewer.getTree().setRedraw(true);
+					boolean isNotCurrentProfile = !((RollbackProfileElement) selected).isCurrentProfile();
+					revertAction.setEnabled(isNotCurrentProfile);
+					if (revertButton != null)
+						revertButton.setEnabled(isNotCurrentProfile);
+					if (deleteButton != null)
+						deleteButton.setEnabled(isNotCurrentProfile);
+					return;
+				}
+			} else {
+				// multiple selections, can't revert or look at details
+				revertAction.setEnabled(false);
+				if (revertButton != null) {
+					revertButton.setEnabled(false);
+				}
+				configContentsViewer.setInput(null);
+				deleteButton.setEnabled(computeDeleteEnablement());
+				return;
+			}
+		}
+		// Nothing is selected
+		configContentsViewer.setInput(null);
+		revertAction.setEnabled(false);
+		if (revertButton != null)
+			revertButton.setEnabled(false);
+		if (deleteButton != null)
+			deleteButton.setEnabled(computeDeleteEnablement());
+	}
+
+	boolean computeDeleteEnablement() {
+		// delete is permitted if none of the selected elements are the current profile
+		boolean okToDelete = true;
+		Iterator<?> iter = ((IStructuredSelection) configsViewer.getSelection()).iterator();
+		while (iter.hasNext()) {
+			Object selected = iter.next();
+			// If it's not a recognized element or if it is the current profile, we can't delete.  Stop iterating.
+			if (!(selected instanceof RollbackProfileElement) || ((RollbackProfileElement) selected).isCurrentProfile()) {
+				okToDelete = false;
+				break;
+			}
+		}
+		return okToDelete;
+	}
+
+	private void setTreeColumns(Tree tree) {
+		IUColumnConfig[] columns = ProvUI.getIUColumnConfig();
+		tree.setHeaderVisible(true);
+
+		for (int i = 0; i < columns.length; i++) {
+			TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
+			tc.setResizable(true);
+			tc.setText(columns[i].getColumnTitle());
+			tc.setWidth(columns[i].getWidthInPixels(tree));
+		}
+	}
+
+	private IProfile getSelectedSnapshot() {
+		Object selected = ((IStructuredSelection) configsViewer.getSelection()).getFirstElement();
+		if (selected != null && selected instanceof RollbackProfileElement)
+			return ((RollbackProfileElement) selected).getProfileSnapshot(new NullProgressMonitor());
+		return null;
+	}
+
+	boolean revert() {
+		final IProfile snapshot = getSelectedSnapshot();
+		if (snapshot == null)
+			return false;
+		final IProvisioningPlan[] plan = new IProvisioningPlan[1];
+		IRunnableWithProgress runnable = new IRunnableWithProgress() {
+			public void run(IProgressMonitor monitor) {
+				IProfile currentProfile;
+				IProfileRegistry registry = ProvUI.getProfileRegistry(getSession());
+				IPlanner planner = (IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
+				currentProfile = registry.getProfile(profileId);
+				plan[0] = planner.getDiffPlan(currentProfile, snapshot, monitor);
+			}
+		};
+		ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
+		try {
+			dialog.run(true, true, runnable);
+		} catch (InvocationTargetException e) {
+			ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
+		} catch (InterruptedException e) {
+			// nothing to report
+		}
+		// the dialog does not throw OperationCanceledException so we have to
+		// check the monitor
+		if (dialog.getProgressMonitor().isCanceled())
+			return false;
+
+		boolean reverted = false;
+		if (plan[0] != null) {
+			if (plan[0].getStatus().isOK()) {
+				// We use a default provisioning context (all repos) because we have no other
+				// way currently to figure out which sites the user wants to contact
+				ProfileModificationJob op = new ProfileModificationJob(ProvUIMessages.RevertDialog_RevertOperationLabel, getSession(), profileId, plan[0], new ProvisioningContext(getSession().getProvisioningAgent()));
+				// we want to force a restart (not allow apply changes)
+				op.setRestartPolicy(ProvisioningJob.RESTART_ONLY);
+				ui.schedule(op, StatusManager.SHOW | StatusManager.LOG);
+				reverted = true;
+			} else if (plan[0].getStatus().getSeverity() != IStatus.CANCEL) {
+				ProvUI.reportStatus(plan[0].getStatus(), StatusManager.LOG | StatusManager.SHOW);
+				// This message has no effect in an installation dialog
+				// setMessage(ProvUIMessages.ProfileModificationWizardPage_UnexpectedError, IMessageProvider.ERROR);
+			}
+		}
+		return reverted;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
+	 */
+	public void copyToClipboard(Control activeControl) {
+		String text = ""; //$NON-NLS-1$
+		if (activeControl == configContentsViewer.getControl()) {
+			text = CopyUtils.getIndentedClipboardText(((IStructuredSelection) configContentsViewer.getSelection()).toArray(), labelProvider);
+		} else if (activeControl == configsViewer.getControl()) {
+			Object[] elements = ((IStructuredSelection) configsViewer.getSelection()).toArray();
+			StringBuffer buffer = new StringBuffer();
+			for (int i = 0; i < elements.length; i++) {
+				if (elements[i] instanceof RollbackProfileElement) {
+					if (i > 0)
+						buffer.append(CopyUtils.NEWLINE);
+					buffer.append(((RollbackProfileElement) elements[i]).getLabel(elements[i]));
+				}
+			}
+			text = buffer.toString();
+		} else
+			return;
+		if (text.length() == 0)
+			return;
+		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
+		clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
+		clipboard.dispose();
+	}
+
+	void deleteSelectedSnapshots() {
+		IStructuredSelection selection = (IStructuredSelection) configsViewer.getSelection();
+		if (selection.isEmpty())
+			return;
+		String title = selection.size() == 1 ? ProvUIMessages.RevertProfilePage_DeleteSingleConfigurationTitle : ProvUIMessages.RevertProfilePage_DeleteMultipleConfigurationsTitle;
+		String confirmMessage = selection.size() == 1 ? ProvUIMessages.RevertProfilePage_ConfirmDeleteSingleConfig : ProvUIMessages.RevertProfilePage_ConfirmDeleteMultipleConfigs;
+		if (MessageDialog.openConfirm(configsViewer.getControl().getShell(), title, confirmMessage)) {
+			Iterator<?> iter = selection.iterator();
+			while (iter.hasNext()) {
+				Object selected = iter.next();
+				// If it is a recognized element and it is not the current profile, then it can be deleted.
+				if (selected instanceof RollbackProfileElement && !((RollbackProfileElement) selected).isCurrentProfile()) {
+					RollbackProfileElement snapshot = (RollbackProfileElement) selected;
+					IProfileRegistry registry = ProvUI.getProfileRegistry(getSession());
+					if (registry != null) {
+						try {
+							registry.removeProfile(profileId, snapshot.getTimestamp());
+							configsViewer.refresh();
+						} catch (ProvisionException e) {
+							ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	ProvisioningSession getSession() {
+		return getProvisioningUI().getSession();
+	}
+
+	ProvisioningUI getProvisioningUI() {
+		return ProvisioningUI.getDefaultUI();
+	}
+
+	protected IStructuredSelection getSelection() {
+		return (IStructuredSelection) configsViewer.getSelection();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html
new file mode 100644
index 0000000..8dced36
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html
@@ -0,0 +1,39 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides provisioning user interface classes that can be used for assembling
+a provisioning UI.
+<h2>
+Package Specification</h2>
+<p>
+This package consists of several kinds of classes:
+<ul>
+<li><b>ProvisioningUI</b> is the hub of the UI.  It is used to access the underlying
+provisioning session and its services, as well as all services registered by the UI.
+It also provides utility methods that allow clients to create provisioning operations
+or launch provisioning wizards.
+</li>
+<li><b>Policy</b> defines those aspects of the provisioning UI that can be configured
+by clients.
+</li>
+<li><b>LicenseManager</b> describes a service which accepts or rejects
+licenses and remembers the accepted licenses.  Clients should register
+an implementation of LicenseManager in order to remember the
+licenses.
+</li>
+<li>Various <b>pages</b> define reusable pages that can be hosted inside wizards
+and dialogs.  In general, the pages are meant to be contributed by extension point.
+In some cases, direct instantiation of the pages is permitted.  See the individual page
+javadoc for usage.
+</li>
+</ul>
+<p>
+ at since 2.0
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.classpath
index 6f3b481..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.project b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.project
index 2ad31f0..c615143 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.project
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
index 5247d61..e515fdb 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
@@ -1,329 +1,329 @@
-#Thu Oct 09 08:15:31 EDT 2008
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+#Wed Dec 30 07:21:17 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
 org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
 org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_header=false
 org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
 org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
 org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.tabulation.char=tab
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
index 6f888e8..3f610cf 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
@@ -1,24 +1,24 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.updatechecker;singleton:=true
 Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.equinox.p2.updatechecker;singleton:=true
+Bundle-Version: 1.1.101.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Bundle-Version: 1.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.updatechecker.Activator
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.osgi.framework;version="1.4.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
 Export-Package: org.eclipse.equinox.internal.p2.updatechecker;x-internal:=true,
  org.eclipse.equinox.internal.provisional.p2.updatechecker;x-friends:="org.eclipse.equinox.p2.ui.sdk.scheduler"
 Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
+Service-Component: OSGI-INF/updatechecker.xml
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)"
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml
new file mode 100644
index 0000000..97a3e78
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.updatechecker">
+   <implementation class="org.eclipse.equinox.internal.p2.updatechecker.UpdateCheckerComponent"/>
+   <service>
+      <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
+   </service>
+   <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker"/>
+</scr:component>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/build.properties
index dc77b9c..c15f3da 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/build.properties
@@ -1,17 +1,10 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
+               plugin.properties,\
+               OSGI-INF/
 src.includes = about.html
+javacSource = 1.5
+javacTarget = jsr14
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/pom.xml
new file mode 100644
index 0000000..fe21958
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.updatechecker</artifactId>
+  <version>1.1.100.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
deleted file mode 100644
index d6a6e1f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/Activator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatechecker;
-
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker;
-import org.osgi.framework.*;
-
-/**
- * Activator class that registers the update checker service.
- */
-public class Activator implements BundleActivator {
-	public static final String ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
-	private static BundleContext context;
-	private ServiceRegistration registrationChecker;
-
-	public static BundleContext getContext() {
-		return context;
-	}
-
-	public void start(BundleContext bundleContext) throws Exception {
-		Activator.context = bundleContext;
-		registrationChecker = context.registerService(IUpdateChecker.SERVICE_NAME, new UpdateChecker(), null);
-	}
-
-	public void stop(BundleContext bundleContext) throws Exception {
-		registrationChecker.unregister();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
index e152841..f3b4b2a 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.p2.updatechecker;
 
@@ -16,16 +17,15 @@ import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.director.IPlanner;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
 import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 
 /**
  * Default implementation of {@link IUpdateChecker}.
@@ -40,8 +40,9 @@ public class UpdateChecker implements IUpdateChecker {
 	/**
 	 * Map of IUpdateListener->UpdateCheckThread.
 	 */
-	private HashMap checkers = new HashMap();
+	private HashMap<IUpdateListener, UpdateCheckThread> checkers = new HashMap<IUpdateListener, UpdateCheckThread>();
 
+	private final IProvisioningAgent agent;
 	IProfileRegistry profileRegistry;
 	IPlanner planner;
 
@@ -50,9 +51,9 @@ public class UpdateChecker implements IUpdateChecker {
 		long poll, delay;
 		IUpdateListener listener;
 		String profileId;
-		Query query;
+		IQuery<IInstallableUnit> query;
 
-		UpdateCheckThread(String profileId, Query query, long delay, long poll, IUpdateListener listener) {
+		UpdateCheckThread(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
 			this.poll = poll;
 			this.delay = delay;
 			this.profileId = profileId;
@@ -68,8 +69,8 @@ public class UpdateChecker implements IUpdateChecker {
 				while (!done) {
 
 					trace("Checking for updates for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
-					IInstallableUnit[] iusWithUpdates = checkForUpdates(profileId, query);
-					if (iusWithUpdates.length > 0) {
+					Collection<IInstallableUnit> iusWithUpdates = checkForUpdates(profileId, query);
+					if (iusWithUpdates.size() > 0) {
 						trace("Notifying listener of available updates"); //$NON-NLS-1$
 						UpdateEvent event = new UpdateEvent(profileId, iusWithUpdates);
 						if (!done)
@@ -86,15 +87,19 @@ public class UpdateChecker implements IUpdateChecker {
 			} catch (InterruptedException e) {
 				// nothing
 			} catch (Exception e) {
-				LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Exception in update check thread", e)); //$NON-NLS-1$
+				LogHelper.log(new Status(IStatus.ERROR, UpdateCheckerComponent.BUNDLE_ID, "Exception in update check thread", e)); //$NON-NLS-1$
 			}
 		}
 	}
 
+	public UpdateChecker(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker#addUpdateCheck(java.lang.String, long, long, org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener)
 	 */
-	public void addUpdateCheck(String profileId, Query query, long delay, long poll, IUpdateListener listener) {
+	public void addUpdateCheck(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
 		if (checkers.containsKey(listener))
 			return;
 		trace("Adding update checker for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
@@ -114,31 +119,32 @@ public class UpdateChecker implements IUpdateChecker {
 	 * Return the array of ius in the profile that have updates
 	 * available.
 	 */
-	IInstallableUnit[] checkForUpdates(String profileId, Query query) {
+	Collection<IInstallableUnit> checkForUpdates(String profileId, IQuery<IInstallableUnit> query) {
 		IProfile profile = getProfileRegistry().getProfile(profileId);
-		ArrayList iusWithUpdates = new ArrayList();
+		ArrayList<IInstallableUnit> iusWithUpdates = new ArrayList<IInstallableUnit>();
 		if (profile == null)
-			return new IInstallableUnit[0];
-		ProvisioningContext context = new ProvisioningContext(getAvailableRepositories());
+			return CollectionUtils.emptyList();
+		ProvisioningContext context = new ProvisioningContext(agent);
+		context.setMetadataRepositories(getAvailableRepositories());
 		if (query == null)
-			query = InstallableUnitQuery.ANY;
-		Iterator iter = profile.query(query, new Collector(), null).iterator();
+			query = QueryUtil.createIUAnyQuery();
+		Iterator<IInstallableUnit> iter = profile.query(query, null).iterator();
 		while (iter.hasNext()) {
-			IInstallableUnit iu = (IInstallableUnit) iter.next();
-			IInstallableUnit[] replacements = getPlanner().updatesFor(iu, context, null);
-			if (replacements.length > 0)
+			IInstallableUnit iu = iter.next();
+			IQueryResult<IInstallableUnit> replacements = getPlanner().updatesFor(iu, context, null);
+			if (!replacements.isEmpty())
 				iusWithUpdates.add(iu);
 		}
-		return (IInstallableUnit[]) iusWithUpdates.toArray(new IInstallableUnit[iusWithUpdates.size()]);
+		return iusWithUpdates;
 	}
 
 	/**
 	 * Returns the list of metadata repositories that are currently available.
 	 */
 	private URI[] getAvailableRepositories() {
-		IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) ServiceHelper.getService(Activator.getContext(), IMetadataRepositoryManager.class.getName());
+		IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
-		ArrayList available = new ArrayList();
+		ArrayList<URI> available = new ArrayList<URI>();
 		for (int i = 0; i < repositories.length; i++) {
 			try {
 				repoMgr.loadRepository(repositories[i], null);
@@ -147,7 +153,7 @@ public class UpdateChecker implements IUpdateChecker {
 				LogHelper.log(e.getStatus());
 			}
 		}
-		return (URI[]) available.toArray(new URI[available.size()]);
+		return available.toArray(new URI[available.size()]);
 	}
 
 	void trace(String message) {
@@ -163,7 +169,7 @@ public class UpdateChecker implements IUpdateChecker {
 
 	IPlanner getPlanner() {
 		if (planner == null) {
-			planner = (IPlanner) ServiceHelper.getService(Activator.getContext(), IPlanner.class.getName());
+			planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
 			if (planner == null) {
 				throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
 			}
@@ -173,7 +179,7 @@ public class UpdateChecker implements IUpdateChecker {
 
 	IProfileRegistry getProfileRegistry() {
 		if (profileRegistry == null) {
-			profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
+			profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 			if (profileRegistry == null) {
 				throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
 			}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
new file mode 100644
index 0000000..e5c4e4d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.internal.p2.updatechecker;
+
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
+
+/**
+ * Component for instantiating update checker service instances.
+ */
+public class UpdateCheckerComponent implements IAgentServiceFactory {
+	public static final String BUNDLE_ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
+
+	public Object createService(IProvisioningAgent agent) {
+		return new UpdateChecker(agent);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
index 98bf64c..31c6e56 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
@@ -10,7 +10,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.updatechecker;
 
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
 
 /**
  * An update checker periodically polls for updates to specified profiles and
@@ -41,7 +42,7 @@ public interface IUpdateChecker {
 	 * @param listener The listener to be notified of updates
 	 * @see #removeUpdateCheck(IUpdateListener)
 	 */
-	public abstract void addUpdateCheck(String profileId, Query iusToCheckQuery, long delay, long poll, IUpdateListener listener);
+	public abstract void addUpdateCheck(String profileId, IQuery<IInstallableUnit> iusToCheckQuery, long delay, long poll, IUpdateListener listener);
 
 	/**
 	 * Removes an update listener from the set of listeners registered with this update
@@ -50,7 +51,7 @@ public interface IUpdateChecker {
 	 * no effect.
 	 * 
 	 * @param listener The listener to remove
-	 * @see #addUpdateCheck(String, Query, long, long, IUpdateListener)
+	 * @see #addUpdateCheck(String, IQuery, long, long, IUpdateListener)
 	 */
 	public abstract void removeUpdateCheck(IUpdateListener listener);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
index 187b32c..7c4a388 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
@@ -7,10 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.equinox.internal.provisional.p2.updatechecker;
 
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import java.util.Collection;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 
 /**
  * An UpdateEvent describes what IU's have updates for a given profile.
@@ -18,14 +20,14 @@ import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
 public class UpdateEvent {
 
 	String profileId;
-	IInstallableUnit[] iusWithUpdates;
+	Collection<IInstallableUnit> iusWithUpdates;
 
-	public UpdateEvent(String profileId, IInstallableUnit[] iusWithUpdates) {
+	public UpdateEvent(String profileId, Collection<IInstallableUnit> iusWithUpdates) {
 		this.profileId = profileId;
 		this.iusWithUpdates = iusWithUpdates;
 	}
 
-	public IInstallableUnit[] getIUs() {
+	public Collection<IInstallableUnit> getIUs() {
 		return iusWithUpdates;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.classpath b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.classpath
index 2fbb7a2..64c5e31 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.classpath
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
index f9e4942..cd0a1d3 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Mar 31 14:49:21 EDT 2009
+#Tue Feb 09 13:00:00 EST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -8,26 +8,26 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
 org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.5
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -55,6 +55,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -82,10 +83,11 @@ org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
@@ -93,7 +95,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enab
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.source=1.5
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..ff827d5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Sun Dec 06 23:05:15 EST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
index d99f154..d1ca6b1 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
@@ -1,51 +1,44 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.p2.updatesite;singleton:=true
-Bundle-Localization: plugin
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.201.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.p2.updatesite.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.equinox.internal.p2.updatesite;x-friends:="org.eclipse.pde.build",
+ org.eclipse.equinox.internal.p2.updatesite.artifact;x-internal:=true,
+ org.eclipse.equinox.internal.p2.updatesite.metadata;x-internal:=true
+Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.equinox.p2.metadata.repository;bundle-version="0.1.0",
+ org.eclipse.equinox.p2.artifact.repository;bundle-version="0.1.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,
+ J2SE-1.4,
+ CDC-1.1/Foundation-1.1
 Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
 Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
+ org.eclipse.equinox.app;version="1.1.0",
+ org.eclipse.equinox.internal.p2.artifact.repository.simple,
  org.eclipse.equinox.internal.p2.core.helpers,
  org.eclipse.equinox.internal.p2.publisher.eclipse,
  org.eclipse.equinox.internal.p2.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.spi.p2.repository,
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.publisher,
  org.eclipse.equinox.p2.publisher.actions,
  org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.security.storage,
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.spi.p2.publisher,
  org.eclipse.osgi.service.resolver;version="1.2.0",
- org.eclipse.osgi.signedcontent;version="1.0.0",
  org.eclipse.osgi.util;version="1.1.0",
  org.osgi.framework;version="1.3.0",
- org.osgi.util.tracker;version="1.3.0",
+ org.w3c.dom,
  org.xml.sax,
- org.xml.sax.helpers,
- org.w3c.dom
-Require-Bundle: org.eclipse.ecf.filetransfer,
- org.eclipse.ecf,
- org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="0.1.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="0.1.0",
- org.eclipse.core.jobs;bundle-version="[3.2.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Export-Package: org.eclipse.equinox.internal.p2.updatesite;x-friends:="org.eclipse.pde.build",
- org.eclipse.equinox.internal.p2.updatesite.artifact;x-internal:=true,
- org.eclipse.equinox.internal.p2.updatesite.metadata;x-internal:=true
+ org.xml.sax.helpers
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/build.properties b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/build.properties
index f6b01e5..a449d85 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,3 +16,6 @@ bin.includes = META-INF/,\
                plugin.properties,\
                about.html
 src.includes = about.html
+javacTarget=jsr14
+javacSource=1.5
+javacWarnings..=+unusedAllocation,unusedImport,unusedLocal,unusedPrivate
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/pom.xml b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/pom.xml
new file mode 100644
index 0000000..7bf1c8a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.p2.updatesite</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
new file mode 100644
index 0000000..9bd569a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryParser.java
@@ -0,0 +1,773 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.updatesite;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.*;
+import javax.xml.parsers.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
+import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
+import org.eclipse.osgi.util.NLS;
+import org.xml.sax.*;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Parses a category.xml file.
+ * This class was initially copied from org.eclipse.update.core.model.DefaultSiteParser.
+ */
+public class CategoryParser extends DefaultHandler {
+	private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
+	private static final String PLUGIN_ID = Activator.ID;
+
+	private static final String ARCHIVE = "archive"; //$NON-NLS-1$
+	private static final String CATEGORY = "category"; //$NON-NLS-1$
+	private static final String CATEGORY_DEF = "category-def"; //$NON-NLS-1$
+	private static final String DESCRIPTION = "description"; //$NON-NLS-1$
+	private static final String FEATURE = "feature"; //$NON-NLS-1$
+	private static final String SITE = "site"; //$NON-NLS-1$
+	private static final String IU = "iu"; //$NON-NLS-1$
+	private static final String QUERY = "query"; //$NON-NLS-1$
+	private static final String EXPRESSION = "expression"; //$NON-NLS-1$
+	private static final String PARAM = "param"; //$NON-NLS-1$
+
+	private static final int STATE_ARCHIVE = 3;
+	private static final int STATE_CATEGORY = 4;
+	private static final int STATE_CATEGORY_DEF = 5;
+	private static final int STATE_DESCRIPTION_CATEGORY_DEF = 7;
+	private static final int STATE_DESCRIPTION_SITE = 6;
+	private static final int STATE_FEATURE = 2;
+	private static final int STATE_IGNORED_ELEMENT = -1;
+	private static final int STATE_INITIAL = 0;
+	private static final int STATE_IU = 8;
+	private static final int STATE_EXPRESSION = 9;
+	private static final int STATE_PARAM = 10;
+	private static final int STATE_QUERY = 11;
+	private static final int STATE_SITE = 1;
+
+	private boolean DESCRIPTION_SITE_ALREADY_SEEN = false;
+	// Current object stack (used to hold the current object we are
+	// populating in this plugin descriptor
+	Stack<Object> objectStack = new Stack<Object>();
+
+	private SAXParser parser;
+
+	// Current State Information
+	Stack<Integer> stateStack = new Stack<Integer>();
+
+	// List of string keys for translated strings
+	private final List<String> messageKeys = new ArrayList<String>(4);
+
+	private MultiStatus status;
+
+	/*
+	 * 
+	 */
+	private static void debug(String s) {
+		Tracing.debug("CategoryParser: " + s); //$NON-NLS-1$
+	}
+
+	static void log(Exception e) {
+		LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Internal Error", e)); //$NON-NLS-1$
+	}
+
+	static void log(String message) {
+		LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, null));
+	}
+
+	static void log(String message, Exception e) {
+		LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, e));
+	}
+
+	/**
+	 * Constructs a site parser.
+	 */
+	public CategoryParser(URI siteLocation) {
+		super();
+		stateStack = new Stack<Integer>();
+		objectStack = new Stack<Object>();
+		status = null;
+		DESCRIPTION_SITE_ALREADY_SEEN = false;
+		try {
+			parserFactory.setNamespaceAware(true);
+			this.parser = parserFactory.newSAXParser();
+		} catch (ParserConfigurationException e) {
+			log(e);
+		} catch (SAXException e) {
+			log(e);
+		}
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("Created"); //$NON-NLS-1$
+	}
+
+	public int currentState() {
+		Integer state = stateStack.peek();
+		if (state != null)
+			return state.intValue();
+		return STATE_IGNORED_ELEMENT;
+	}
+
+	/**
+	 * Handle character text
+	 * @see DefaultHandler#characters(char[], int, int)
+	 * @since 2.0
+	 */
+	public void characters(char[] ch, int start, int length) {
+		String text = new String(ch, start, length);
+		//only push if description
+		int state = currentState();
+		switch (state) {
+			case STATE_DESCRIPTION_SITE :
+			case STATE_DESCRIPTION_CATEGORY_DEF :
+				objectStack.push(text);
+				break;
+
+			case STATE_EXPRESSION :
+			case STATE_PARAM :
+				text = text.trim();
+				String existing = null;
+				if (objectStack.peek() instanceof String)
+					existing = (String) objectStack.pop();
+				if (existing != null)
+					text = existing + text;
+				objectStack.push(text);
+				break;
+			default :
+				break; // nothing
+		}
+	}
+
+	/**
+	 * Handle end of element tags
+	 * @see DefaultHandler#endElement(String, String, String)
+	 * @since 2.0
+	 */
+	public void endElement(String uri, String localName, String qName) {
+
+		String text = null;
+		URLEntry info = null;
+
+		int state = currentState();
+		switch (state) {
+			case STATE_IGNORED_ELEMENT :
+			case STATE_ARCHIVE :
+			case STATE_CATEGORY :
+			case STATE_QUERY :
+				stateStack.pop();
+				break;
+
+			case STATE_INITIAL :
+				internalError(Messages.DefaultSiteParser_ParsingStackBackToInitialState);
+				break;
+
+			case STATE_SITE :
+				stateStack.pop();
+				if (objectStack.peek() instanceof String) {
+					text = (String) objectStack.pop();
+					SiteModel site = (SiteModel) objectStack.peek();
+					site.getDescription().setAnnotation(text);
+				}
+				//do not pop the object
+				break;
+
+			case STATE_FEATURE :
+				stateStack.pop();
+				objectStack.pop();
+				break;
+
+			case STATE_IU :
+				stateStack.pop();
+				SiteIU completeIU = (SiteIU) objectStack.pop();
+				String id = completeIU.getID();
+				String expression = completeIU.getQueryExpression();
+				if (id == null && expression == null)
+					internalError("The IU must specify an id or an expression to match against."); //$NON-NLS-1$
+				break;
+
+			case STATE_EXPRESSION :
+				stateStack.pop();
+				if (objectStack.peek() instanceof String) {
+					text = (String) objectStack.pop();
+					SiteIU iu = (SiteIU) objectStack.peek();
+					iu.setQueryExpression(text);
+					if (Tracing.DEBUG_GENERATOR_PARSING)
+						debug("Found Expression: " + text); //$NON-NLS-1$
+				}
+				break;
+			case STATE_PARAM :
+				stateStack.pop();
+				if (objectStack.peek() instanceof String) {
+					text = (String) objectStack.pop();
+					SiteIU iu = (SiteIU) objectStack.peek();
+					iu.addQueryParams(text);
+					if (Tracing.DEBUG_GENERATOR_PARSING)
+						debug("Found Param: " + text); //$NON-NLS-1$
+				}
+				break;
+
+			case STATE_CATEGORY_DEF :
+				stateStack.pop();
+				if (objectStack.peek() instanceof String) {
+					text = (String) objectStack.pop();
+					SiteCategory category = (SiteCategory) objectStack.peek();
+					category.setDescription(text);
+				}
+				objectStack.pop();
+				break;
+
+			case STATE_DESCRIPTION_SITE :
+				stateStack.pop();
+				text = ""; //$NON-NLS-1$
+				while (objectStack.peek() instanceof String) {
+					// add text, preserving at most one space between text fragments
+					String newText = (String) objectStack.pop();
+					if (trailingSpace(newText) && !leadingSpace(text)) {
+						text = " " + text; //$NON-NLS-1$
+					}
+					text = newText.trim() + text;
+					if (leadingSpace(newText) && !leadingSpace(text)) {
+						text = " " + text; //$NON-NLS-1$
+					}
+				}
+				text = text.trim();
+
+				info = (URLEntry) objectStack.pop();
+				if (text != null)
+					info.setAnnotation(text);
+
+				SiteModel siteModel = (SiteModel) objectStack.peek();
+				// override description.
+				// do not raise error as previous description may be default one
+				// when parsing site tag
+				if (DESCRIPTION_SITE_ALREADY_SEEN)
+					debug(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state)})));
+				siteModel.setDescription(info);
+				DESCRIPTION_SITE_ALREADY_SEEN = true;
+				break;
+
+			case STATE_DESCRIPTION_CATEGORY_DEF :
+				stateStack.pop();
+				text = ""; //$NON-NLS-1$
+				while (objectStack.peek() instanceof String) {
+					// add text, preserving at most one space between text fragments
+					String newText = (String) objectStack.pop();
+					if (trailingSpace(newText) && !leadingSpace(text)) {
+						text = " " + text; //$NON-NLS-1$
+					}
+					text = newText.trim() + text;
+					if (leadingSpace(newText) && !leadingSpace(text)) {
+						text = " " + text; //$NON-NLS-1$
+					}
+				}
+				text = text.trim();
+
+				info = (URLEntry) objectStack.pop();
+				if (text != null)
+					info.setAnnotation(text);
+
+				SiteCategory category = (SiteCategory) objectStack.peek();
+				if (category.getDescription() != null)
+					internalError(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state), category.getLabel()})));
+				else {
+					checkTranslated(info.getAnnotation());
+					category.setDescription(info.getAnnotation());
+				}
+				break;
+
+			default :
+				internalError(NLS.bind(Messages.DefaultSiteParser_UnknownEndState, (new String[] {getState(state)})));
+				break;
+		}
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End Element:" + uri + ":" + localName + ":" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+
+	/*
+	 * Handles an error state specified by the status.  The collection of all logged status
+	 * objects can be accessed using <code>getStatus()</code>.
+	 *
+	 * @param error a status detailing the error condition
+	 */
+	private void error(IStatus error) {
+
+		if (status == null) {
+			status = new MultiStatus(PLUGIN_ID, 0, Messages.DefaultSiteParser_ErrorParsingSite, null);
+		}
+
+		status.add(error);
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			LogHelper.log(error);
+	}
+
+	/**
+	 * Handle errors
+	 * @see DefaultHandler#error(SAXParseException)
+	 * @since 2.0
+	 */
+	public void error(SAXParseException ex) {
+		logStatus(ex);
+	}
+
+	/**
+	 * Handle fatal errors
+	 * @see DefaultHandler#fatalError(SAXParseException)
+	 * @exception SAXException
+	 * @since 2.0
+	 */
+	public void fatalError(SAXParseException ex) throws SAXException {
+		logStatus(ex);
+		throw ex;
+	}
+
+	/*
+	 * return the state as String
+	 */
+	private String getState(int state) {
+
+		switch (state) {
+			case STATE_IGNORED_ELEMENT :
+				return "Ignored"; //$NON-NLS-1$
+
+			case STATE_INITIAL :
+				return "Initial"; //$NON-NLS-1$
+
+			case STATE_SITE :
+				return "Site"; //$NON-NLS-1$
+
+			case STATE_FEATURE :
+				return "Feature"; //$NON-NLS-1$
+
+			case STATE_IU :
+				return "IU"; //$NON-NLS-1$
+
+			case STATE_ARCHIVE :
+				return "Archive"; //$NON-NLS-1$
+
+			case STATE_CATEGORY :
+				return "Category"; //$NON-NLS-1$
+
+			case STATE_CATEGORY_DEF :
+				return "Category Def"; //$NON-NLS-1$
+
+			case STATE_DESCRIPTION_CATEGORY_DEF :
+				return "Description / Category Def"; //$NON-NLS-1$
+
+			case STATE_DESCRIPTION_SITE :
+				return "Description / Site"; //$NON-NLS-1$
+
+			default :
+				return Messages.DefaultSiteParser_UnknownState;
+		}
+	}
+
+	/**
+	 * Returns all status objects accumulated by the parser.
+	 *
+	 * @return multi-status containing accumulated status, or <code>null</code>.
+	 * @since 2.0
+	 */
+	public MultiStatus getStatus() {
+		return status;
+	}
+
+	private void handleCategoryDefState(String elementName, Attributes attributes) {
+		if (elementName.equals(DESCRIPTION)) {
+			stateStack.push(new Integer(STATE_DESCRIPTION_CATEGORY_DEF));
+			processInfo(attributes);
+		} else
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleCategoryState(String elementName, Attributes attributes) {
+		internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleFeatureState(String elementName, Attributes attributes) {
+		if (elementName.equals(CATEGORY)) {
+			stateStack.push(new Integer(STATE_CATEGORY));
+			processCategory(attributes);
+		} else
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleInitialState(String elementName, Attributes attributes) throws SAXException {
+		if (elementName.equals(SITE)) {
+			stateStack.push(new Integer(STATE_SITE));
+			processSite(attributes);
+		} else {
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+			// what we received was not a site.xml, no need to continue
+			throw new SAXException(Messages.DefaultSiteParser_InvalidXMLStream);
+		}
+
+	}
+
+	private void handleSiteState(String elementName, Attributes attributes) {
+		if (elementName.equals(DESCRIPTION)) {
+			stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
+			processInfo(attributes);
+		} else if (elementName.equals(FEATURE)) {
+			stateStack.push(new Integer(STATE_FEATURE));
+			processFeature(attributes);
+		} else if (elementName.equals(IU)) {
+			stateStack.push(new Integer(STATE_IU));
+			processIU(attributes);
+		} else if (elementName.equals(ARCHIVE)) {
+			stateStack.push(new Integer(STATE_ARCHIVE));
+			processArchive(attributes);
+		} else if (elementName.equals(CATEGORY_DEF)) {
+			stateStack.push(new Integer(STATE_CATEGORY_DEF));
+			processCategoryDef(attributes);
+		} else
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleIUState(String elementName, Attributes attributes) {
+		if (elementName.equals(QUERY)) {
+			stateStack.push(new Integer(STATE_QUERY));
+			processQuery(attributes);
+		} else if (elementName.equals(CATEGORY)) {
+			stateStack.push(new Integer(STATE_CATEGORY));
+			processCategory(attributes);
+		} else
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleQueryState(String elementName, Attributes attributes) {
+		if (elementName.equals(EXPRESSION)) {
+			stateStack.push(new Integer(STATE_EXPRESSION));
+			processExpression(attributes);
+		} else if (elementName.equals(PARAM)) {
+			stateStack.push(new Integer(STATE_PARAM));
+			processParam(attributes);
+		} else
+			internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleExpression(String elementName, Attributes attributes) {
+		internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	private void handleParamState(String elementName, Attributes attributes) {
+		internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState())})));
+	}
+
+	/*
+	 * 
+	 */
+	private void internalError(String message) {
+		error(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, null));
+	}
+
+	/*
+	 * 
+	 */
+	private void internalErrorUnknownTag(String msg) {
+		stateStack.push(new Integer(STATE_IGNORED_ELEMENT));
+		internalError(msg);
+	}
+
+	private boolean leadingSpace(String str) {
+		if (str.length() <= 0) {
+			return false;
+		}
+		return Character.isWhitespace(str.charAt(0));
+	}
+
+	/*
+	 * 
+	 */
+	private void logStatus(SAXParseException ex) {
+		String name = ex.getSystemId();
+		if (name == null)
+			name = ""; //$NON-NLS-1$
+		else
+			name = name.substring(1 + name.lastIndexOf("/")); //$NON-NLS-1$
+
+		String msg;
+		if (name.equals("")) //$NON-NLS-1$
+			msg = NLS.bind(Messages.DefaultSiteParser_ErrorParsing, (new String[] {ex.getMessage()}));
+		else {
+			String[] values = new String[] {name, Integer.toString(ex.getLineNumber()), Integer.toString(ex.getColumnNumber()), ex.getMessage()};
+			msg = NLS.bind(Messages.DefaultSiteParser_ErrorlineColumnMessage, values);
+		}
+		error(new Status(IStatus.ERROR, PLUGIN_ID, msg, ex));
+	}
+
+	/**
+	 * Parses the specified input steam and constructs a site model.
+	 * The input stream is not closed as part of this operation.
+	 * 
+	 * @param in input stream
+	 * @return site model
+	 * @exception SAXException
+	 * @exception IOException
+	 * @since 2.0
+	 */
+	public SiteModel parse(InputStream in) throws SAXException, IOException {
+		stateStack.push(new Integer(STATE_INITIAL));
+		parser.parse(new InputSource(in), this);
+		if (objectStack.isEmpty())
+			throw new SAXException(Messages.DefaultSiteParser_NoSiteTag);
+		if (objectStack.peek() instanceof SiteModel) {
+			SiteModel site = (SiteModel) objectStack.pop();
+			site.setMessageKeys(messageKeys);
+			return site;
+		}
+		String stack = ""; //$NON-NLS-1$
+		Iterator<Object> iter = objectStack.iterator();
+		while (iter.hasNext()) {
+			stack = stack + iter.next().toString() + "\r\n"; //$NON-NLS-1$
+		}
+		throw new SAXException(NLS.bind(Messages.DefaultSiteParser_WrongParsingStack, (new String[] {stack})));
+	}
+
+	/* 
+	 * process archive info
+	 */
+	private void processArchive(Attributes attributes) {
+		// don't care about archives in category xml
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing Archive"); //$NON-NLS-1$
+	}
+
+	/* 
+	 * process the Category  info
+	 */
+	private void processCategory(Attributes attributes) {
+		String category = attributes.getValue("name"); //$NON-NLS-1$
+		Object obj = objectStack.peek();
+		// TODO could create common class/interface for adding categories
+		if (obj instanceof SiteFeature)
+			((SiteFeature) obj).addCategoryName(category);
+		else if (obj instanceof SiteIU)
+			((SiteIU) obj).addCategoryName(category);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing Category: name:" + category); //$NON-NLS-1$
+	}
+
+	/* 
+	 * process category def info
+	 */
+	private void processCategoryDef(Attributes attributes) {
+		SiteCategory category = new SiteCategory();
+		String name = attributes.getValue("name"); //$NON-NLS-1$
+		String label = attributes.getValue("label"); //$NON-NLS-1$
+		checkTranslated(label);
+		category.setName(name);
+		category.setLabel(label);
+
+		SiteModel site = (SiteModel) objectStack.peek();
+		site.addCategory(category);
+		objectStack.push(category);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing CategoryDef: name:" + name + " label:" + label); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/* 
+	 * process feature info
+	 */
+	private void processFeature(Attributes attributes) {
+		SiteFeature feature = new SiteFeature();
+
+		// identifier and version
+		String id = attributes.getValue("id"); //$NON-NLS-1$
+		String ver = attributes.getValue("version"); //$NON-NLS-1$
+
+		boolean noId = (id == null || id.trim().equals("")); //$NON-NLS-1$
+
+		// We need to have id and version, or the url, or both.
+		if (noId)
+			internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"url", getState(currentState())}))); //$NON-NLS-1$
+
+		feature.setFeatureIdentifier(id);
+		feature.setFeatureVersion(ver);
+
+		SiteModel site = (SiteModel) objectStack.peek();
+		site.addFeature(feature);
+		feature.setSiteModel(site);
+
+		objectStack.push(feature);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End Processing Feature Tag: id:" + id + " version:" + ver); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/* 
+	 * process IU info
+	 */
+	private void processIU(Attributes attributes) {
+		SiteIU iu = new SiteIU();
+		SiteModel site = (SiteModel) objectStack.peek();
+
+		// identifier and version
+		String id = attributes.getValue("id"); //$NON-NLS-1$
+		String range = attributes.getValue("range"); //$NON-NLS-1$
+		id = id == null ? null : id.trim();
+		range = range == null ? null : range.trim();
+
+		iu.setID(id);
+		iu.setRange(range);
+
+		site.addIU(iu);
+		objectStack.push(iu);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing iu."); //$NON-NLS-1$
+	}
+
+	/* 
+	 * process expression info
+	 */
+	private void processExpression(Attributes attributes) {
+		SiteIU iu = (SiteIU) objectStack.peek();
+		iu.setQueryType(attributes.getValue("type")); //$NON-NLS-1$
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing Expression: " + iu.getQueryType()); //$NON-NLS-1$ 
+	}
+
+	/* 
+	 * process query info
+	 */
+	private void processQuery(Attributes attributes) {
+		// TODO may have simple attriutes for id and range
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing Query."); //$NON-NLS-1$
+	}
+
+	/* 
+	 * process param info
+	 */
+	private void processParam(Attributes attributes) {
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End processing Param."); //$NON-NLS-1$
+	}
+
+	/* 
+	 * process URL info with element text
+	 */
+	private void processInfo(Attributes attributes) {
+		URLEntry inf = new URLEntry();
+		String infoURL = attributes.getValue("url"); //$NON-NLS-1$
+		inf.setURL(infoURL);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("Processed Info: url:" + infoURL); //$NON-NLS-1$
+
+		objectStack.push(inf);
+	}
+
+	/* 
+	 * process site info
+	 */
+	private void processSite(Attributes attributes) {
+		// create site map
+		SiteModel site = new SiteModel();
+		objectStack.push(site);
+
+		if (Tracing.DEBUG_GENERATOR_PARSING)
+			debug("End process Site tag."); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Handle start of element tags
+	 * @see DefaultHandler#startElement(String, String, String, Attributes)
+	 * @since 2.0
+	 */
+	public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+
+		if (Tracing.DEBUG_GENERATOR_PARSING) {
+			debug("State: " + currentState()); //$NON-NLS-1$
+			debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+
+		switch (currentState()) {
+			case STATE_IGNORED_ELEMENT :
+				internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {localName, getState(currentState())})));
+				break;
+			case STATE_INITIAL :
+				handleInitialState(localName, attributes);
+				break;
+
+			case STATE_SITE :
+				handleSiteState(localName, attributes);
+				break;
+
+			case STATE_FEATURE :
+				handleFeatureState(localName, attributes);
+				break;
+
+			case STATE_IU :
+				handleIUState(localName, attributes);
+				break;
+
+			case STATE_EXPRESSION :
+				handleExpression(localName, attributes);
+				break;
+
+			case STATE_QUERY :
+				handleQueryState(localName, attributes);
+				break;
+
+			case STATE_PARAM :
+				handleParamState(localName, attributes);
+				break;
+
+			case STATE_ARCHIVE :
+				handleSiteState(localName, attributes);
+				break;
+
+			case STATE_CATEGORY :
+				handleCategoryState(localName, attributes);
+				break;
+
+			case STATE_CATEGORY_DEF :
+				handleCategoryDefState(localName, attributes);
+				break;
+
+			case STATE_DESCRIPTION_SITE :
+				handleSiteState(localName, attributes);
+				break;
+
+			case STATE_DESCRIPTION_CATEGORY_DEF :
+				handleSiteState(localName, attributes);
+				break;
+
+			default :
+				internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownStartState, (new String[] {getState(currentState())})));
+				break;
+		}
+
+	}
+
+	private boolean trailingSpace(String str) {
+		if (str.length() <= 0) {
+			return false;
+		}
+		return Character.isWhitespace(str.charAt(str.length() - 1));
+	}
+
+	// Add translatable strings from the site.xml
+	// to the list of message keys.
+	private void checkTranslated(String value) {
+		if (value != null && value.length() > 1 && value.startsWith("%")) //$NON-NLS-1$
+			messageKeys.add(value.substring(1));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
index bac1772..4f5346e 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryPublisherApplication.java
@@ -12,7 +12,10 @@ package org.eclipse.equinox.internal.p2.updatesite;
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 /**
  * <p>
@@ -29,6 +32,31 @@ public class CategoryPublisherApplication extends AbstractPublisherApplication {
 		// nothing todo
 	}
 
+	/*
+	 * Check to see if an existing repository already has the "compressed" flag set
+	 */
+	protected void initializeRepositories(PublisherInfo publisherInfo) throws ProvisionException {
+		try {
+			if (metadataLocation != null) {
+				// Try to load the metadata repository. If it loads, check the "compressed" flag, and cache it.
+				// If there are any errors loading it (i.e. it doesn't exist), just skip this step
+				// If there are serious problems with the repository, the superclass initializeRepositories method
+				// will handle it.
+				IMetadataRepository result = Publisher.loadMetadataRepository(agent, metadataLocation, true, true);
+				if (result != null) {
+					Object property = result.getProperties().get(IRepository.PROP_COMPRESSED);
+					if (property != null) {
+						boolean compressProperty = Boolean.valueOf((String) property);
+						this.compress = compressProperty || compress;
+					}
+				}
+			}
+		} catch (ProvisionException e) {
+			//do nothing
+		}
+		super.initializeRepositories(publisherInfo);
+	}
+
 	protected void processParameter(String arg, String parameter, PublisherInfo pinfo) throws URISyntaxException {
 		super.processParameter(arg, parameter, pinfo);
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java
index 5321d13..8a48a09 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/CategoryXMLAction.java
@@ -9,9 +9,10 @@
 ******************************************************************************/
 package org.eclipse.equinox.internal.p2.updatesite;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.net.URI;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.IPublisherInfo;
 import org.eclipse.equinox.p2.publisher.IPublisherResult;
 
@@ -25,14 +26,14 @@ public class CategoryXMLAction extends SiteXMLAction {
 		super(location, categoryQualifier);
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		try {
 			updateSite = UpdateSite.loadCategoryFile(location, monitor);
 		} catch (ProvisionException e) {
-			return new Status(IStatus.ERROR, Activator.ID, "Error generating category xml action.", e);
+			return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_category, e);
 		}
 		if (updateSite == null)
-			return new Status(IStatus.ERROR, Activator.ID, "Error generating category xml action.");
-		return super.perform(info, results, monitor);
+			return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_category);
+		return super.perform(publisherInfo, results, monitor);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
index ac5e456..cdc70b7 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DefaultSiteParser.java
@@ -58,15 +58,15 @@ public class DefaultSiteParser extends DefaultHandler {
 	private boolean DESCRIPTION_SITE_ALREADY_SEEN = false;
 	// Current object stack (used to hold the current object we are
 	// populating in this plugin descriptor
-	Stack objectStack = new Stack();
+	Stack<Object> objectStack = new Stack<Object>();
 
 	private SAXParser parser;
 
 	// Current State Information
-	Stack stateStack = new Stack();
+	Stack<Integer> stateStack = new Stack<Integer>();
 
 	// List of string keys for translated strings
-	private final List messageKeys = new ArrayList(4);
+	private final List<String> messageKeys = new ArrayList<String>(4);
 
 	private MultiStatus status;
 	private final URI siteLocation;
@@ -130,8 +130,8 @@ public class DefaultSiteParser extends DefaultHandler {
 	public DefaultSiteParser(URI siteLocation) {
 		super();
 		this.siteLocation = siteLocation;
-		stateStack = new Stack();
-		objectStack = new Stack();
+		stateStack = new Stack<Integer>();
+		objectStack = new Stack<Object>();
 		status = null;
 		DESCRIPTION_SITE_ALREADY_SEEN = false;
 		try {
@@ -155,7 +155,7 @@ public class DefaultSiteParser extends DefaultHandler {
 	public void characters(char[] ch, int start, int length) {
 		String text = new String(ch, start, length);
 		//only push if description
-		int state = ((Integer) stateStack.peek()).intValue();
+		int state = stateStack.peek().intValue();
 		if (state == STATE_DESCRIPTION_SITE || state == STATE_DESCRIPTION_CATEGORY_DEF)
 			objectStack.push(text);
 
@@ -171,7 +171,7 @@ public class DefaultSiteParser extends DefaultHandler {
 		String text = null;
 		URLEntry info = null;
 
-		int state = ((Integer) stateStack.peek()).intValue();
+		int state = stateStack.peek().intValue();
 		switch (state) {
 			case STATE_IGNORED_ELEMENT :
 			case STATE_ARCHIVE :
@@ -501,7 +501,7 @@ public class DefaultSiteParser extends DefaultHandler {
 	 */
 	public SiteModel parse(InputStream in) throws SAXException, IOException {
 		stateStack.push(new Integer(STATE_INITIAL));
-		currentState = ((Integer) stateStack.peek()).intValue();
+		currentState = stateStack.peek().intValue();
 		parser.parse(new InputSource(in), this);
 		if (objectStack.isEmpty())
 			throw new SAXException(Messages.DefaultSiteParser_NoSiteTag);
@@ -511,7 +511,7 @@ public class DefaultSiteParser extends DefaultHandler {
 			return site;
 		}
 		String stack = ""; //$NON-NLS-1$
-		Iterator iter = objectStack.iterator();
+		Iterator<Object> iter = objectStack.iterator();
 		while (iter.hasNext()) {
 			stack = stack + iter.next().toString() + "\r\n"; //$NON-NLS-1$
 		}
@@ -797,7 +797,7 @@ public class DefaultSiteParser extends DefaultHandler {
 				internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownStartState, (new String[] {getState(currentState)})));
 				break;
 		}
-		int newState = ((Integer) stateStack.peek()).intValue();
+		int newState = stateStack.peek().intValue();
 		if (newState != STATE_IGNORED_ELEMENT)
 			currentState = newState;
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java
index af0e3ba..9a08094 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/DigestParser.java
@@ -36,7 +36,7 @@ public class DigestParser extends DefaultHandler {
 
 	private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
 	private SAXParser parser;
-	private final List features = new ArrayList();
+	private final List<Feature> features = new ArrayList<Feature>();
 	private final FeatureManifestParser featureHandler = new FeatureManifestParser(false);
 
 	public DigestParser() {
@@ -82,7 +82,7 @@ public class DigestParser extends DefaultHandler {
 				return null;
 			is = new BufferedInputStream(jar.getInputStream(entry));
 			parser.parse(new InputSource(is), this);
-			return (Feature[]) features.toArray(new Feature[features.size()]);
+			return features.toArray(new Feature[features.size()]);
 		} catch (IOException e) {
 			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.ErrorReadingDigest, location), e));
 		} catch (SAXException e) {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
index 6fd9d0e..6f4545f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/LocalUpdateSiteAction.java
@@ -27,6 +27,7 @@ public class LocalUpdateSiteAction implements IPublisherAction {
 	protected String source;
 	private UpdateSite updateSite;
 	private String categoryQualifier;
+	private String categoryVersion;
 
 	protected LocalUpdateSiteAction() {
 		// empty
@@ -56,6 +57,10 @@ public class LocalUpdateSiteAction implements IPublisherAction {
 		this.categoryQualifier = categoryQualifier;
 	}
 
+	public void setCategoryVersion(String version) {
+		categoryVersion = version;
+	}
+
 	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
 		IPublisherAction[] actions = createActions();
 		MultiStatus finalStatus = new MultiStatus(LocalUpdateSiteAction.class.getName(), 0, NLS.bind(Messages.Error_Generation, source != null ? source : (updateSite != null ? updateSite.getLocation().toString() : "Unknown")), null); //$NON-NLS-1$
@@ -71,22 +76,24 @@ public class LocalUpdateSiteAction implements IPublisherAction {
 
 	protected IPublisherAction[] createActions() {
 		createAdvice();
-		ArrayList result = new ArrayList();
+		ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
 		// create an action that just publishes the raw bundles and features
 		IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_NON_ROOT);
 		result.add(action);
 		result.add(createSiteXMLAction());
-		return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
+		return result.toArray(new IPublisherAction[result.size()]);
 	}
 
 	private IPublisherAction createSiteXMLAction() {
+		SiteXMLAction action = null;
 		if (updateSite != null)
-			return new SiteXMLAction(updateSite, categoryQualifier);
-		if (source != null) {
-			SiteXMLAction siteXmlAction = new SiteXMLAction(new File(source, "site.xml").toURI(), categoryQualifier); //$NON-NLS-1$
-			return siteXmlAction;
+			action = new SiteXMLAction(updateSite, categoryQualifier);
+		else if (source != null) {
+			action = new SiteXMLAction(new File(source, "site.xml").toURI(), categoryQualifier); //$NON-NLS-1$
 		}
-		return null;
+		if (action != null && categoryVersion != null)
+			action.setCategoryVersion(categoryVersion);
+		return action;
 	}
 
 	private void createAdvice() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java
index 8b54170..8fb8851 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/Messages.java
@@ -22,6 +22,8 @@ public class Messages extends NLS {
 	public static String ErrorReadingDigest;
 	public static String ErrorReadingFeature;
 	public static String ErrorReadingSite;
+	public static String Error_generating_category;
+	public static String Error_generating_siteXML;
 	public static String Error_Generation;
 
 	public static String DefaultFeatureParser_IdOrVersionInvalid;
@@ -40,6 +42,8 @@ public class Messages extends NLS {
 	public static String DefaultSiteParser_InvalidXMLStream;
 	public static String DefaultSiteParser_mirrors;
 
+	public static String Unexpected_exception;
+
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
index 64e568e..26434ef 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteFeaturesAction.java
@@ -10,11 +10,12 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.updatesite;
 
+import org.eclipse.equinox.p2.core.ProvisionException;
+
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
@@ -48,7 +49,7 @@ public class RemoteFeaturesAction extends FeaturesAction {
 	}
 
 	protected void generateFeatureIUs(Feature[] featureList, IPublisherResult result) {
-		Properties extraProperties = new Properties();
+		Map<String, String> extraProperties = new HashMap<String, String>();
 		extraProperties.put(IInstallableUnit.PROP_PARTIAL_IU, Boolean.TRUE.toString());
 		for (int i = 0; i < featureList.length; i++) {
 			Feature feature = featureList[i];
@@ -56,7 +57,7 @@ public class RemoteFeaturesAction extends FeaturesAction {
 			for (int j = 0; j < featureEntries.length; j++) {
 				FeatureEntry entry = featureEntries[j];
 				if (entry.isPlugin() && !entry.isRequires()) {
-					Dictionary mockManifest = new Properties();
+					Dictionary<String, String> mockManifest = new Hashtable<String, String>();
 					mockManifest.put("Manifest-Version", "1.0"); //$NON-NLS-1$ //$NON-NLS-2$
 					mockManifest.put("Bundle-ManifestVersion", "2"); //$NON-NLS-1$ //$NON-NLS-2$
 					mockManifest.put("Bundle-SymbolicName", entry.getId()); //$NON-NLS-1$
@@ -69,7 +70,7 @@ public class RemoteFeaturesAction extends FeaturesAction {
 				}
 			}
 			IInstallableUnit featureIU = createFeatureJarIU(feature, new PublisherInfo());
-			List childIUs = new ArrayList();
+			List<IInstallableUnit> childIUs = new ArrayList<IInstallableUnit>();
 			childIUs.add(featureIU);
 			IInstallableUnit groupIU = createGroupIU(feature, childIUs, new PublisherInfo());
 			result.addIU(featureIU, IPublisherResult.ROOT);
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
index 428c061..f7278e2 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/RemoteUpdateSiteAction.java
@@ -10,6 +10,8 @@
  ******************************************************************************/
 package org.eclipse.equinox.internal.p2.updatesite;
 
+import org.eclipse.equinox.p2.publisher.IPublisherAction;
+
 import java.util.ArrayList;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
@@ -55,10 +57,10 @@ public class RemoteUpdateSiteAction implements IPublisherAction {
 	}
 
 	protected IPublisherAction[] createActions() {
-		ArrayList result = new ArrayList();
+		ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
 		result.add(new RemoteFeaturesAction(updateSite));
 		result.add(createSiteXMLAction());
-		return (IPublisherAction[]) result.toArray(new IPublisherAction[result.size()]);
+		return result.toArray(new IPublisherAction[result.size()]);
 	}
 
 	private IPublisherAction createSiteXMLAction() {
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
index 131016e..06ed2a9 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteCategory.java
@@ -12,8 +12,7 @@ package org.eclipse.equinox.internal.p2.updatesite;
 
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.Comparator;
-import java.util.Map;
+import java.util.*;
 
 /**
  * A category in an update site.
@@ -22,11 +21,11 @@ import java.util.Map;
  */
 public class SiteCategory {
 
-	private static Comparator comp;
+	private static Comparator<SiteCategory> comp;
 	private String description;
 	private String label;
 	private String name;
-	private Map localizations;
+	private Map<Locale, Map<String, String>> localizations;
 
 	/**
 	 * Returns a comparator for category models.
@@ -34,19 +33,16 @@ public class SiteCategory {
 	 * @return comparator
 	 * @since 2.0
 	 */
-	public static Comparator getComparator() {
+	public static Comparator<SiteCategory> getComparator() {
 		if (comp == null) {
-			comp = new Comparator() {
+			comp = new Comparator<SiteCategory>() {
 				/*
 				 * @see Comparator#compare(Object,Object)
 				 * Returns 0 if versions are equal.
 				 * Returns -1 if object1 is after than object2.
 				 * Returns +1 if object1 is before than object2.
 				 */
-				public int compare(Object o1, Object o2) {
-
-					SiteCategory cat1 = (SiteCategory) o1;
-					SiteCategory cat2 = (SiteCategory) o2;
+				public int compare(SiteCategory cat1, SiteCategory cat2) {
 
 					if (cat1.equals(cat2))
 						return 0;
@@ -108,7 +104,7 @@ public class SiteCategory {
 	 * @return a map from locale to property set
 	 * @since 3.4
 	 */
-	public Map getLocalizations() {
+	public Map<Locale, Map<String, String>> getLocalizations() {
 		return this.localizations;
 	}
 
@@ -181,7 +177,7 @@ public class SiteCategory {
 	 * @param localizations as a map from locale to property set
 	 * @since 3.4
 	 */
-	public void setLocalizations(Map localizations) {
+	public void setLocalizations(Map<Locale, Map<String, String>> localizations) {
 		this.localizations = localizations;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
index 3ad5104..0a70eba 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
@@ -26,7 +26,7 @@ public class SiteFeature {
 	private String arch;
 	// performance
 	private URL base;
-	private List /* of String*/categoryNames;
+	private List<String> categoryNames;
 	private String featureId;
 	private String featureVersion;
 	private String label;
@@ -99,7 +99,7 @@ public class SiteFeature {
 	 */
 	public void addCategoryName(String categoryName) {
 		if (this.categoryNames == null)
-			this.categoryNames = new ArrayList();
+			this.categoryNames = new ArrayList<String>();
 		if (!this.categoryNames.contains(categoryName))
 			this.categoryNames.add(categoryName);
 	}
@@ -180,7 +180,7 @@ public class SiteFeature {
 		if (categoryNames == null)
 			return new String[0];
 
-		return (String[]) categoryNames.toArray(new String[0]);
+		return categoryNames.toArray(new String[0]);
 	}
 
 	/**
@@ -337,7 +337,7 @@ public class SiteFeature {
 		if (categoryNames == null)
 			this.categoryNames = null;
 		else
-			this.categoryNames = new ArrayList(Arrays.asList(categoryNames));
+			this.categoryNames = new ArrayList<String>(Arrays.asList(categoryNames));
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteIU.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteIU.java
new file mode 100644
index 0000000..bacf48a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteIU.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.updatesite;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SiteIU {
+
+	public static final String QUERY_TYPE_CONTEXT = "context"; //$NON-NLS-1$
+	public static final String QUERY_TYPE_MATCH = "match"; //$NON-NLS-1$
+
+	private String id = null;
+	private String range = null;
+	private String queryExpression = null;
+	private String queryType = null;
+	private List<String> queryParams = null;
+	private List<String> categoryNames = null;
+
+	/**
+	 * Returns the id of the IU
+	 * @return the id of the IU
+	 */
+	public String getID() {
+		return id;
+	}
+
+	/**
+	 * Returns the range of the IU
+	 * @return the range of the IU
+	 */
+	public String getRange() {
+		return range;
+	}
+
+	/**
+	 * Returns the query expression for the IU.
+	 * 
+	 * @return query expression
+	 */
+	public String getQueryExpression() {
+		return queryExpression;
+	}
+
+	/**
+	 * Returns the query type for the IU.
+	 * 
+	 * @return the query type
+	 */
+	public String getQueryType() {
+		return queryType;
+	}
+
+	/**
+	 * Returns the params for the query expression for the IU
+	 * 
+	 * @return an array of query params.
+	 */
+	public String[] getQueryParams() {
+		if (queryParams == null)
+			return new String[0];
+
+		return queryParams.toArray(new String[0]);
+	}
+
+	/**
+	 * Returns the names of categories the referenced IU belongs to.
+	 * 
+	 * @return an array of names, or an empty array.
+	 */
+	public String[] getCategoryNames() {
+		if (categoryNames == null)
+			return new String[0];
+
+		return categoryNames.toArray(new String[0]);
+	}
+
+	/**
+	 * Sets the id for the IU.
+	 * @param id the id
+	 */
+	public void setID(String id) {
+		this.id = id;
+	}
+
+	/**
+	 * Sets the range for the IU.
+	 * @param range the range
+	 */
+	public void setRange(String range) {
+		this.range = range;
+	}
+
+	/**
+	 * Sets the query expression for the IU.
+	 * 
+	 * @param queryExpression query expression
+	 */
+	public void setQueryExpression(String queryExpression) {
+		this.queryExpression = queryExpression;
+	}
+
+	/**
+	 * Sets the query type for the IU.
+	 * 
+	 * @param queryType the query type
+	 */
+	public void setQueryType(String queryType) {
+		this.queryType = queryType;
+	}
+
+	/**
+	 * Adds the name of a category this IU belongs to.
+	 * 
+	 * @param categoryName category name
+	 */
+	public void addCategoryName(String categoryName) {
+		if (this.categoryNames == null)
+			this.categoryNames = new ArrayList<String>();
+		if (!this.categoryNames.contains(categoryName))
+			this.categoryNames.add(categoryName);
+	}
+
+	/**
+	 * Adds a param for the query expression for this IU.
+	 * 
+	 * @param queryParam a query param.
+	 */
+	public void addQueryParams(String queryParam) {
+		if (this.queryParams == null)
+			this.queryParams = new ArrayList<String>();
+		// don't do contains check, order matters and there may be duplicates
+		this.queryParams.add(queryParam);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
index d0bd694..9beaa9f 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteModel.java
@@ -22,16 +22,17 @@ import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
  */
 public class SiteModel {
 
-	private List /*of ArchiveReferenceModel*/archiveReferences;
+	private List<URLEntry> archiveReferences;
 	/**
 	 * Map of String (category id) -> SiteCategory
 	 */
-	private Map categories;
+	private Map<String, SiteCategory> categories;
 	private URLEntry description;
 	/**
 	 * Map of String (feature id) -> SiteFeature
 	 */
-	private List features;
+	private List<SiteFeature> features;
+	private List<SiteIU> ius;
 	private URI locationURI;
 	private String locationURIString;
 	private String mirrorsURIString;
@@ -39,8 +40,8 @@ public class SiteModel {
 	private String type;
 	private URLEntry[] associateSites;
 	private String digestURIString;
-	private List messageKeys;
-	private Map localizations;
+	private List<String> messageKeys;
+	private Map<Locale, Map<String, String>> localizations;
 
 	/**
 	 * Creates an uninitialized site model object.
@@ -60,7 +61,7 @@ public class SiteModel {
 	 */
 	public void addArchive(URLEntry archiveReference) {
 		if (this.archiveReferences == null)
-			this.archiveReferences = new ArrayList();
+			this.archiveReferences = new ArrayList<URLEntry>();
 		if (!this.archiveReferences.contains(archiveReference))
 			this.archiveReferences.add(archiveReference);
 	}
@@ -72,7 +73,7 @@ public class SiteModel {
 	 */
 	public void addCategory(SiteCategory category) {
 		if (categories == null)
-			categories = new HashMap();
+			categories = new HashMap<String, SiteCategory>();
 		if (!categories.containsKey(category.getName())) {
 			categories.put(category.getName(), category);
 			if (localizations != null && !localizations.isEmpty())
@@ -87,11 +88,22 @@ public class SiteModel {
 	 */
 	public void addFeature(SiteFeature featureReference) {
 		if (this.features == null)
-			this.features = new ArrayList();
+			this.features = new ArrayList<SiteFeature>();
 		this.features.add(featureReference);
 	}
 
 	/**
+	 * Adds a iu model to site.
+	 * 
+	 * @param iu iu model
+	 */
+	public void addIU(SiteIU iu) {
+		if (this.ius == null)
+			this.ius = new ArrayList<SiteIU>();
+		this.ius.add(iu);
+	}
+
+	/**
 	 * Returns an array of plug-in and non-plug-in archive reference models
 	 * on this site
 	 * 
@@ -103,7 +115,7 @@ public class SiteModel {
 		if (archiveReferences == null || archiveReferences.size() == 0)
 			return new URLEntry[0];
 
-		return (URLEntry[]) archiveReferences.toArray(new URLEntry[0]);
+		return archiveReferences.toArray(new URLEntry[0]);
 	}
 
 	public URLEntry[] getAssociatedSites() {
@@ -119,7 +131,7 @@ public class SiteModel {
 	public SiteCategory[] getCategories() {
 		if (categories == null || categories.size() == 0)
 			return new SiteCategory[0];
-		return (SiteCategory[]) categories.values().toArray(new SiteCategory[0]);
+		return categories.values().toArray(new SiteCategory[0]);
 	}
 
 	/**
@@ -127,7 +139,7 @@ public class SiteModel {
 	 * @return the category with the given name, or <code>null</code>
 	 */
 	public SiteCategory getCategory(String name) {
-		return (SiteCategory) (categories == null ? null : categories.get(name));
+		return (categories == null ? null : categories.get(name));
 	}
 
 	/**
@@ -147,7 +159,18 @@ public class SiteModel {
 	public SiteFeature[] getFeatures() {
 		if (features == null || features.size() == 0)
 			return new SiteFeature[0];
-		return (SiteFeature[]) features.toArray(new SiteFeature[0]);
+		return features.toArray(new SiteFeature[0]);
+	}
+
+	/**
+	 * Returns an array of IU models on this site.
+	 * 
+	 * @return an array of IU models, or an empty array.
+	 */
+	public SiteIU[] getIUs() {
+		if (ius == null || ius.size() == 0)
+			return new SiteIU[0];
+		return ius.toArray(new SiteIU[0]);
 	}
 
 	/**
@@ -157,7 +180,7 @@ public class SiteModel {
 	 * @return a map from locale to property set
 	 * @since 3.4
 	 */
-	public Map getLocalizations() {
+	public Map<Locale, Map<String, String>> getLocalizations() {
 		return this.localizations;
 	}
 
@@ -192,7 +215,7 @@ public class SiteModel {
 	 * @return the list of keys for translatable strings; may be null
 	 * @since 3.4
 	 */
-	public List getMessageKeys() {
+	public List<String> getMessageKeys() {
 		return messageKeys;
 	}
 
@@ -236,13 +259,11 @@ public class SiteModel {
 	 * @param localizations as a map from locale to property set
 	 * @since 3.4
 	 */
-	public void setLocalizations(Map localizations) {
+	public void setLocalizations(Map<Locale, Map<String, String>> localizations) {
 		this.localizations = localizations;
 		if (localizations != null && !localizations.isEmpty() && //
 				categories != null && !categories.isEmpty()) {
-			for (Iterator catIter = categories.entrySet().iterator(); catIter.hasNext();) {
-				Map.Entry entry = (Map.Entry) catIter.next();
-				SiteCategory category = (SiteCategory) entry.getValue();
+			for (SiteCategory category : categories.values()) {
 				category.setLocalizations(localizations);
 			}
 		}
@@ -264,7 +285,7 @@ public class SiteModel {
 	 * @param keys for translatable strings
 	 * @since 3.4
 	 */
-	public void setMessageKeys(List keys) {
+	public void setMessageKeys(List<String> keys) {
 		this.messageKeys = keys;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
index d80f02b..4d5bd40 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
@@ -14,18 +14,21 @@ import java.io.File;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.LatestIUVersionQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
+import org.eclipse.equinox.p2.metadata.expression.IExpression;
 import org.eclipse.equinox.p2.publisher.*;
 import org.eclipse.equinox.p2.publisher.eclipse.URLEntry;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
 import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 
@@ -35,11 +38,13 @@ import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
  */
 public class SiteXMLAction extends AbstractPublisherAction {
 	static final private String QUALIFIER = "qualifier"; //$NON-NLS-1$
+	private static final VersionSuffixGenerator versionSuffixGenerator = new VersionSuffixGenerator();
 	protected UpdateSite updateSite;
 	private SiteCategory defaultCategory;
-	private HashSet defaultCategorySet;
+	private HashSet<SiteCategory> defaultCategorySet;
 	protected URI location;
 	private String categoryQualifier = null;
+	private Version categoryVersion = null;
 
 	/**
 	 * Creates a SiteXMLAction from a Location (URI) with an optional qualifier to use for category names
@@ -65,6 +70,10 @@ public class SiteXMLAction extends AbstractPublisherAction {
 		this.categoryQualifier = categoryQualifier;
 	}
 
+	public void setCategoryVersion(String version) {
+		categoryVersion = Version.parseVersion(version);
+	}
+
 	private void initialize() {
 		if (defaultCategory != null)
 			return;
@@ -72,104 +81,176 @@ public class SiteXMLAction extends AbstractPublisherAction {
 		defaultCategory.setDescription("Default category for otherwise uncategorized features"); //$NON-NLS-1$
 		defaultCategory.setLabel("Uncategorized"); //$NON-NLS-1$
 		defaultCategory.setName("Default"); //$NON-NLS-1$
-		defaultCategorySet = new HashSet(1);
+		defaultCategorySet = new HashSet<SiteCategory>(1);
 		defaultCategorySet.add(defaultCategory);
 	}
 
-	public IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
 		if (updateSite == null) {
 			try {
 				updateSite = UpdateSite.load(location, monitor);
 			} catch (ProvisionException e) {
-				return new Status(IStatus.ERROR, Activator.ID, "Error generating site xml action.", e);
+				return new Status(IStatus.ERROR, Activator.ID, Messages.Error_generating_siteXML, e);
 			} catch (OperationCanceledException e) {
 				return Status.CANCEL_STATUS;
 			}
 		}
 		initialize();
-		return generateCategories(info, results, monitor);
+		return generateCategories(publisherInfo, results, monitor);
 	}
 
-	private IStatus generateCategories(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor) {
-		Map categoriesToFeatureIUs = new HashMap();
-		Map featuresToCategories = getFeatureToCategoryMappings(info);
-		for (Iterator i = featuresToCategories.keySet().iterator(); i.hasNext();) {
+	private IStatus generateCategories(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		Map<SiteCategory, Set<IInstallableUnit>> categoriesToIUs = new HashMap<SiteCategory, Set<IInstallableUnit>>();
+		Map<SiteFeature, Set<SiteCategory>> featuresToCategories = getFeatureToCategoryMappings(publisherInfo);
+		for (SiteFeature feature : featuresToCategories.keySet()) {
 			if (monitor.isCanceled())
 				return Status.CANCEL_STATUS;
-			SiteFeature feature = (SiteFeature) i.next();
-			IInstallableUnit iu = getFeatureIU(feature, info, results);
-			if (iu == null)
+			Collection<IInstallableUnit> ius = getFeatureIU(feature, publisherInfo, results);
+			if (ius == null)
 				continue;
-			Set categories = (Set) featuresToCategories.get(feature);
+			Set<SiteCategory> categories = featuresToCategories.get(feature);
 			// if there are no categories for this feature then add it to the default category.
 			if (categories == null || categories.isEmpty())
 				categories = defaultCategorySet;
-			for (Iterator it = categories.iterator(); it.hasNext();) {
-				SiteCategory category = (SiteCategory) it.next();
-				Set featureIUs = (Set) categoriesToFeatureIUs.get(category);
+			for (SiteCategory category : categories) {
+				Set<IInstallableUnit> featureIUs = categoriesToIUs.get(category);
 				if (featureIUs == null) {
-					featureIUs = new HashSet();
-					categoriesToFeatureIUs.put(category, featureIUs);
+					featureIUs = new HashSet<IInstallableUnit>();
+					categoriesToIUs.put(category, featureIUs);
 				}
-				featureIUs.add(iu);
+				featureIUs.addAll(ius);
 			}
 		}
-		generateCategoryIUs(categoriesToFeatureIUs, results);
+		addSiteIUsToCategories(categoriesToIUs, publisherInfo, results);
+		generateCategoryIUs(categoriesToIUs, results);
 		return Status.OK_STATUS;
 	}
 
-	private IInstallableUnit getFeatureIU(SiteFeature feature, IPublisherInfo publisherInfo, IPublisherResult results) {
+	private void addSiteIUsToCategories(Map<SiteCategory, Set<IInstallableUnit>> categoriesToIUs, IPublisherInfo publisherInfo, IPublisherResult results) {
+		if (updateSite == null)
+			return;
+		SiteModel site = updateSite.getSite();
+		if (site == null)
+			return;
+		SiteIU[] siteIUs = site.getIUs();
+		for (SiteIU siteIU : siteIUs) {
+			String[] categoryNames = siteIU.getCategoryNames();
+			if (categoryNames.length == 0)
+				continue;
+			Collection<IInstallableUnit> ius = getIUs(siteIU, publisherInfo, results);
+			if (ius.size() == 0)
+				continue;
+			for (String categoryName : categoryNames) {
+				SiteCategory category = site.getCategory(categoryName);
+				if (category == null)
+					continue;
+				Set<IInstallableUnit> categoryIUs = categoriesToIUs.get(category);
+				if (categoryIUs == null) {
+					categoryIUs = new HashSet<IInstallableUnit>();
+					categoriesToIUs.put(category, categoryIUs);
+				}
+				categoryIUs.addAll(ius);
+			}
+		}
+	}
+
+	private Collection<IInstallableUnit> getIUs(SiteIU siteIU, IPublisherInfo publisherInfo, IPublisherResult results) {
+		String id = siteIU.getID();
+		String range = siteIU.getRange();
+		String type = siteIU.getQueryType();
+		String expression = siteIU.getQueryExpression();
+		Object[] params = siteIU.getQueryParams();
+		if (id == null && (type == null || expression == null))
+			return CollectionUtils.emptyList();
+		IQuery<IInstallableUnit> query = null;
+		if (id != null) {
+			VersionRange vRange = new VersionRange(range);
+			query = QueryUtil.createIUQuery(id, vRange);
+		} else if (type.equals("context")) { //$NON-NLS-1$
+			query = QueryUtil.createQuery(expression, params);
+		} else if (type.equals("match")) //$NON-NLS-1$
+			query = QueryUtil.createMatchQuery(expression, params);
+		if (query == null)
+			return CollectionUtils.emptyList();
+		IQueryResult<IInstallableUnit> queryResult = results.query(query, null);
+		if (queryResult.isEmpty())
+			queryResult = publisherInfo.getMetadataRepository().query(query, null);
+		if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
+			queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
+
+		return queryResult.toUnmodifiableSet();
+	}
+
+	private static final IExpression qualifierMatchExpr = ExpressionUtil.parse("id == $0 && version ~= $1"); //$NON-NLS-1$
+
+	private Collection<IInstallableUnit> getFeatureIU(SiteFeature feature, IPublisherInfo publisherInfo, IPublisherResult results) {
 		String id = feature.getFeatureIdentifier() + ".feature.group"; //$NON-NLS-1$
 		String versionString = feature.getFeatureVersion();
-		Version version = versionString != null && versionString.length() > 0 ? new Version(versionString) : Version.emptyVersion;
-		Query query = null;
-		Collector collector = null;
+		Version version = versionString != null && versionString.length() > 0 ? Version.create(versionString) : Version.emptyVersion;
+		IQuery<IInstallableUnit> query = null;
 		if (version.equals(Version.emptyVersion)) {
-			query = new CompositeQuery(new Query[] {new InstallableUnitQuery(id), new LatestIUVersionQuery()});
-			collector = new Collector();
-		} else if (version.getQualifier() != null && version.getQualifier().endsWith(QUALIFIER)) {
-			final String v = versionString.substring(0, versionString.indexOf(QUALIFIER));
-			Query qualifierQuery = new InstallableUnitQuery(id) {
-				private String qualifierVersion = v.endsWith(".") ? v.substring(0, v.length() - 1) : v; //$NON-NLS-1$
-
-				public boolean isMatch(Object object) {
-					if (super.isMatch(object)) {
-						IInstallableUnit candidate = (IInstallableUnit) object;
-						return candidate.getVersion().toString().startsWith(qualifierVersion);
-					}
-					return false;
-				}
-			};
-			query = new CompositeQuery(new Query[] {qualifierQuery, new LatestIUVersionQuery()});
-			collector = new Collector();
+			query = QueryUtil.createIUQuery(id);
 		} else {
-			query = new InstallableUnitQuery(id, version);
-			collector = new Collector() {
-				public boolean accept(Object object) {
-					super.accept(object);
-					return false; //stop searching once we've found one
-				}
-			};
+			String qualifier;
+			try {
+				qualifier = PublisherHelper.toOSGiVersion(version).getQualifier();
+			} catch (UnsupportedOperationException e) {
+				qualifier = null;
+			}
+			if (qualifier != null && qualifier.endsWith(QUALIFIER)) {
+				VersionRange range = createVersionRange(version.toString());
+				IQuery<IInstallableUnit> qualifierQuery = QueryUtil.createMatchQuery(qualifierMatchExpr, id, range);
+				query = qualifierQuery;
+			} else {
+				query = QueryUtil.createLimitQuery(QueryUtil.createIUQuery(id, version), 1);
+			}
 		}
 
-		collector = results.query(query, collector, null);
-		if (collector.size() == 0)
-			collector = publisherInfo.getMetadataRepository().query(query, collector, null);
-		if (collector.size() == 0 && publisherInfo.getContextMetadataRepository() != null)
-			collector = publisherInfo.getContextMetadataRepository().query(query, collector, null);
+		IQueryResult<IInstallableUnit> queryResult = results.query(query, null);
+		if (queryResult.isEmpty())
+			queryResult = publisherInfo.getMetadataRepository().query(query, null);
+		if (queryResult.isEmpty() && publisherInfo.getContextMetadataRepository() != null)
+			queryResult = publisherInfo.getContextMetadataRepository().query(query, null);
 
-		if (collector.size() == 1)
-			return (IInstallableUnit) collector.iterator().next();
+		if (!queryResult.isEmpty())
+			return queryResult.toUnmodifiableSet();
 		return null;
 	}
 
+	protected VersionRange createVersionRange(String versionId) {
+		VersionRange range = null;
+		if (versionId == null || "0.0.0".equals(versionId)) //$NON-NLS-1$
+			range = VersionRange.emptyRange;
+		else {
+			int qualifierIdx = versionId.indexOf(QUALIFIER);
+			if (qualifierIdx != -1) {
+				String newVersion = versionId.substring(0, qualifierIdx);
+				if (newVersion.endsWith(".")) //$NON-NLS-1$
+					newVersion = newVersion.substring(0, newVersion.length() - 1);
+
+				Version lower = Version.parseVersion(newVersion);
+				Version upper = null;
+				String newQualifier = VersionSuffixGenerator.incrementQualifier(PublisherHelper.toOSGiVersion(lower).getQualifier());
+				org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(lower);
+				if (newQualifier == null)
+					upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro() + 1);
+				else
+					upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro(), newQualifier);
+				range = new VersionRange(lower, true, upper, false);
+			} else {
+				range = new VersionRange(Version.parseVersion(versionId), true, Version.parseVersion(versionId), true);
+			}
+		}
+		return range;
+	}
+
 	/**
 	 * Computes the mapping of features to categories as defined in the site.xml,
 	 * if available. Returns an empty map if there is not site.xml, or no categories.
 	 * @return A map of SiteFeature -> Set<SiteCategory>.
 	 */
-	protected Map getFeatureToCategoryMappings(IPublisherInfo info) {
-		HashMap mappings = new HashMap();
+	protected Map<SiteFeature, Set<SiteCategory>> getFeatureToCategoryMappings(IPublisherInfo publisherInfo) {
+		HashMap<SiteFeature, Set<SiteCategory>> mappings = new HashMap<SiteFeature, Set<SiteCategory>>();
 		if (updateSite == null)
 			return mappings;
 		SiteModel site = updateSite.getSite();
@@ -183,27 +264,41 @@ public class SiteXMLAction extends AbstractPublisherAction {
 			int index = mirrors.indexOf("site.xml"); //$NON-NLS-1$
 			if (index != -1)
 				mirrors = mirrors.substring(0, index) + mirrors.substring(index + "site.xml".length()); //$NON-NLS-1$
-			info.getMetadataRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
+			publisherInfo.getMetadataRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
 			// there does not really need to be an artifact repo but if there is, setup its mirrors.
-			if (info.getArtifactRepository() != null)
-				info.getArtifactRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
+			if (publisherInfo.getArtifactRepository() != null)
+				publisherInfo.getArtifactRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
 		}
 
 		//publish associate sites as repository references
 		URLEntry[] associatedSites = site.getAssociatedSites();
-		if (associatedSites != null)
-			for (int i = 0; i < associatedSites.length; i++)
-				generateSiteReference(associatedSites[i].getURL(), associatedSites[i].getAnnotation(), null, info.getMetadataRepository());
+		if (associatedSites != null) {
+			ArrayList<IRepositoryReference> refs = new ArrayList<IRepositoryReference>(associatedSites.length * 2);
+			for (int i = 0; i < associatedSites.length; i++) {
+				URLEntry associatedSite = associatedSites[i];
+				String siteLocation = associatedSite.getURL();
+				try {
+					URI associateLocation = new URI(siteLocation);
+					String label = associatedSite.getAnnotation();
+					refs.add(new RepositoryReference(associateLocation, label, IRepository.TYPE_METADATA, IRepository.ENABLED));
+					refs.add(new RepositoryReference(associateLocation, label, IRepository.TYPE_ARTIFACT, IRepository.ENABLED));
+				} catch (URISyntaxException e) {
+					String message = "Invalid site reference: " + siteLocation; //$NON-NLS-1$
+					LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
+				}
+			}
+			publisherInfo.getMetadataRepository().addReferences(refs);
+		}
 
 		File siteFile = URIUtil.toFile(updateSite.getLocation());
 		if (siteFile != null && siteFile.exists()) {
 			File siteParent = siteFile.getParentFile();
-			List messageKeys = site.getMessageKeys();
+			List<String> messageKeys = site.getMessageKeys();
 			if (siteParent.isDirectory()) {
-				String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
+				String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
 				site.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
 			} else if (siteFile.getName().endsWith(".jar")) { //$NON-NLS-1$
-				String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
+				String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
 				site.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
 			}
 		}
@@ -212,7 +307,7 @@ public class SiteXMLAction extends AbstractPublisherAction {
 		for (int i = 0; i < features.length; i++) {
 			//add a mapping for each category this feature belongs to
 			String[] categoryNames = features[i].getCategoryNames();
-			Set categories = new HashSet();
+			Set<SiteCategory> categories = new HashSet<SiteCategory>();
 			mappings.put(features[i], categories);
 			for (int j = 0; j < categoryNames.length; j++) {
 				SiteCategory category = site.getCategory(categoryNames[j]);
@@ -224,36 +319,13 @@ public class SiteXMLAction extends AbstractPublisherAction {
 	}
 
 	/**
-	 * Generates and publishes a reference to an update site location
-	 * @param location The update site location
-	 * @param label The update site label
-	 * @param featureId the identifier of the feature where the error occurred, or null
-	 * @param metadataRepo The repository into which the references are added
-	 */
-	private void generateSiteReference(String location, String label, String featureId, IMetadataRepository metadataRepo) {
-		if (metadataRepo == null)
-			return;
-		try {
-			URI associateLocation = new URI(location);
-			metadataRepo.addReference(associateLocation, label, IRepository.TYPE_METADATA, IRepository.ENABLED);
-			metadataRepo.addReference(associateLocation, label, IRepository.TYPE_ARTIFACT, IRepository.ENABLED);
-		} catch (URISyntaxException e) {
-			String message = "Invalid site reference: " + location; //$NON-NLS-1$
-			if (featureId != null)
-				message = message + " in feature: " + featureId; //$NON-NLS-1$
-			LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
-		}
-	}
-
-	/**
 	 * Generates IUs corresponding to update site categories.
 	 * @param categoriesToFeatures Map of SiteCategory ->Set (Feature IUs in that category).
 	 * @param result The generator result being built
 	 */
-	protected void generateCategoryIUs(Map categoriesToFeatures, IPublisherResult result) {
-		for (Iterator it = categoriesToFeatures.keySet().iterator(); it.hasNext();) {
-			SiteCategory category = (SiteCategory) it.next();
-			result.addIU(createCategoryIU(category, (Set) categoriesToFeatures.get(category), null), IPublisherResult.NON_ROOT);
+	protected void generateCategoryIUs(Map<SiteCategory, Set<IInstallableUnit>> categoriesToFeatures, IPublisherResult result) {
+		for (SiteCategory category : categoriesToFeatures.keySet()) {
+			result.addIU(createCategoryIU(category, categoriesToFeatures.get(category), null), IPublisherResult.NON_ROOT);
 		}
 	}
 
@@ -264,51 +336,61 @@ public class SiteXMLAction extends AbstractPublisherAction {
 	 * @param parentCategory The parent category, or <code>null</code>
 	 * @return an IU representing the category
 	 */
-	public IInstallableUnit createCategoryIU(SiteCategory category, Set featureIUs, IInstallableUnit parentCategory) {
+	public IInstallableUnit createCategoryIU(SiteCategory category, Set<IInstallableUnit> featureIUs, IInstallableUnit parentCategory) {
 		InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
 		cat.setSingleton(true);
 		String categoryId = buildCategoryId(category.getName());
 		cat.setId(categoryId);
+		if (categoryVersion == null)
+			cat.setVersion(Version.createOSGi(1, 0, 0, versionSuffixGenerator.generateSuffix(featureIUs, CollectionUtils.<IVersionedId> emptyList())));
+		else {
+			if (categoryVersion.isOSGiCompatible()) {
+				org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(categoryVersion);
+				String qualifier = osgiVersion.getQualifier();
+				if (qualifier.endsWith(QUALIFIER)) {
+					String suffix = versionSuffixGenerator.generateSuffix(featureIUs, CollectionUtils.<IVersionedId> emptyList());
+					qualifier = qualifier.substring(0, qualifier.length() - 9) + suffix;
+					categoryVersion = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor(), osgiVersion.getMicro(), qualifier);
+				}
+			}
+			cat.setVersion(categoryVersion);
+		}
 
-		cat.setVersion(Version.createOSGi(0, 0, 0, getDateQualifier()));
 		String label = category.getLabel();
 		cat.setProperty(IInstallableUnit.PROP_NAME, label != null ? label : category.getName());
 		cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, category.getDescription());
 
-		ArrayList reqsConfigurationUnits = new ArrayList(featureIUs.size());
-		for (Iterator iterator = featureIUs.iterator(); iterator.hasNext();) {
-			IInstallableUnit iu = (IInstallableUnit) iterator.next();
+		ArrayList<IRequirement> reqsConfigurationUnits = new ArrayList<IRequirement>(featureIUs.size());
+		for (IInstallableUnit iu : featureIUs) {
 			VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
-			reqsConfigurationUnits.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
+			reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
 		}
 		//note that update sites don't currently support nested categories, but it may be useful to add in the future
 		if (parentCategory != null) {
-			reqsConfigurationUnits.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
+			reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter(), false, false));
 		}
-		cat.setRequiredCapabilities((IRequiredCapability[]) reqsConfigurationUnits.toArray(new IRequiredCapability[reqsConfigurationUnits.size()]));
+		cat.setRequirements(reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
 
 		// Create set of provided capabilities
-		ArrayList providedCapabilities = new ArrayList();
+		ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
 		providedCapabilities.add(PublisherHelper.createSelfCapability(categoryId, cat.getVersion()));
 
-		Map localizations = category.getLocalizations();
+		Map<Locale, Map<String, String>> localizations = category.getLocalizations();
 		if (localizations != null) {
-			for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
-				Locale locale = (Locale) iter.next();
-				Properties translatedStrings = (Properties) localizations.get(locale);
-				Enumeration propertyKeys = translatedStrings.propertyNames();
-				while (propertyKeys.hasMoreElements()) {
-					String nextKey = (String) propertyKeys.nextElement();
-					cat.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
+			for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
+				Locale locale = locEntry.getKey();
+				Map<String, String> translatedStrings = locEntry.getValue();
+				for (Entry<String, String> e : translatedStrings.entrySet()) {
+					cat.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
 				}
 				providedCapabilities.add(PublisherHelper.makeTranslationCapability(categoryId, locale));
 			}
 		}
 
-		cat.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		cat.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
 
 		cat.setArtifacts(new IArtifactKey[0]);
-		cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
+		cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
 		return MetadataFactory.createInstallableUnit(cat);
 	}
 
@@ -326,32 +408,4 @@ public class SiteXMLAction extends AbstractPublisherAction {
 			return URIUtil.toUnencodedString(updateSite.getLocation()) + "." + categoryName; //$NON-NLS-1$
 		return categoryName;
 	}
-
-	/*
-	 * Returns the current date/time as a string to be used as a qualifier
-	 * replacement.  This is the default qualifier replacement.  Will
-	 * be of the form YYYYMMDDHHMM.
-	 * @return current date/time as a qualifier replacement 
-	 */
-	private static String getDateQualifier() {
-		final String empty = ""; //$NON-NLS-1$
-		Calendar calendar = Calendar.getInstance();
-		int monthNbr = calendar.get(Calendar.MONTH) + 1;
-		String month = (monthNbr < 10 ? "0" : empty) + monthNbr; //$NON-NLS-1$
-
-		int dayNbr = calendar.get(Calendar.DAY_OF_MONTH);
-		String day = (dayNbr < 10 ? "0" : empty) + dayNbr; //$NON-NLS-1$
-
-		int hourNbr = calendar.get(Calendar.HOUR_OF_DAY);
-		String hour = (hourNbr < 10 ? "0" : empty) + hourNbr; //$NON-NLS-1$
-
-		int minuteNbr = calendar.get(Calendar.MINUTE);
-		String minute = (minuteNbr < 10 ? "0" : empty) + minuteNbr; //$NON-NLS-1$
-
-		int secondNbr = calendar.get(Calendar.SECOND);
-		String second = (secondNbr < 10 ? "0" : empty) + secondNbr; //$NON-NLS-1$
-
-		return empty + calendar.get(Calendar.YEAR) + month + day + hour + minute + second;
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
index 461d38c..6c09b54 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSite.java
@@ -11,17 +11,16 @@
 package org.eclipse.equinox.internal.p2.updatesite;
 
 import java.io.*;
+import java.lang.ref.SoftReference;
 import java.net.*;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.zip.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
 import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
 import org.eclipse.equinox.internal.p2.repository.RepositoryTransport;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
 import org.eclipse.osgi.util.NLS;
 import org.xml.sax.SAXException;
@@ -50,9 +49,11 @@ public class UpdateSite {
 	 * Some variables for caching.
 	 */
 	// map of String (URI.toString()) to UpdateSite
-	private static Map siteCache = new HashMap();
+	private static Map<String, SoftReference<UpdateSite>> siteCache = new HashMap<String, SoftReference<UpdateSite>>();
+	// map of String (URI.toString()) to UpdateSite (for category xmls)
+	private static Map<String, SoftReference<UpdateSite>> categoryCache = new HashMap<String, SoftReference<UpdateSite>>();
 	// map of String (featureID_featureVersion) to Feature
-	private Map featureCache = new HashMap();
+	private Map<String, Feature> featureCache = new HashMap<String, Feature>();
 
 	/*
 	 * Return a URI based on the given URI, which points to a site.xml file.
@@ -81,19 +82,26 @@ public class UpdateSite {
 	public static synchronized UpdateSite loadCategoryFile(URI location, IProgressMonitor monitor) throws ProvisionException {
 		if (location == null)
 			return null;
-		UpdateSite result = (UpdateSite) siteCache.get(location.toString());
-		if (result != null)
-			return result;
+		UpdateSite result = null;
+		if (!PROTOCOL_FILE.equals(location.getScheme()) && categoryCache.containsKey(location.toString())) {
+			result = categoryCache.get(location.toString()).get();
+			if (result != null)
+				return result;
+			//else soft reference has been cleared, take it out of the cache
+			categoryCache.remove(location.toString());
+		}
+
 		InputStream input = null;
 		File siteFile = loadActualSiteFile(location, location, monitor);
 		try {
-			DefaultSiteParser siteParser = new DefaultSiteParser(location);
+			CategoryParser siteParser = new CategoryParser(location);
 			Checksum checksum = new CRC32();
 			input = new CheckedInputStream(new BufferedInputStream(new FileInputStream(siteFile)), checksum);
 			SiteModel siteModel = siteParser.parse(input);
 			String checksumString = Long.toString(checksum.getValue());
 			result = new UpdateSite(siteModel, location, checksumString);
-			siteCache.put(location.toString(), result);
+			if (!PROTOCOL_FILE.equals(location.getScheme()))
+				categoryCache.put(location.toString(), new SoftReference<UpdateSite>(result));
 			return result;
 		} catch (SAXException e) {
 			String msg = NLS.bind(Messages.ErrorReadingSite, location);
@@ -119,9 +127,17 @@ public class UpdateSite {
 	public static synchronized UpdateSite load(URI location, IProgressMonitor monitor) throws ProvisionException {
 		if (location == null)
 			return null;
-		UpdateSite result = (UpdateSite) siteCache.get(location.toString());
-		if (result != null)
-			return result;
+
+		UpdateSite result = null;
+		//only caching remote sites
+		if (!PROTOCOL_FILE.equals(location.getScheme()) && siteCache.containsKey(location.toString())) {
+			result = siteCache.get(location.toString()).get();
+			if (result != null)
+				return result;
+			//else soft reference has been cleared, take it out of the cache
+			siteCache.remove(location.toString());
+		}
+
 		InputStream input = null;
 		File siteFile = loadSiteFile(location, monitor);
 		try {
@@ -131,7 +147,8 @@ public class UpdateSite {
 			SiteModel siteModel = siteParser.parse(input);
 			String checksumString = Long.toString(checksum.getValue());
 			result = new UpdateSite(siteModel, getSiteURI(location), checksumString);
-			siteCache.put(location.toString(), result);
+			if (!PROTOCOL_FILE.equals(location.getScheme()))
+				siteCache.put(location.toString(), new SoftReference<UpdateSite>(result));
 			return result;
 		} catch (SAXException e) {
 			String msg = NLS.bind(Messages.ErrorReadingSite, location);
@@ -274,25 +291,6 @@ public class UpdateSite {
 		return null;
 	}
 
-	/**
-	 * Throw an exception if the site pointed to by the given URI is not valid.
-	 * @param url the site file to check
-	 * @param monitor a monitor
-	 * @throws UserCancelledException if user canceled during authentication
-	 * @throws AuthenticationFailedException if too many attempts made to login
-	 * @throws FileNotFoundException if the remote file does not exist
-	 * @throws CoreException on errors in communication (unknown host, connection refused, etc.)
-	 */
-	public static void validate(URI url, IProgressMonitor monitor) throws UserCancelledException, AuthenticationFailedException, FileNotFoundException, CoreException {
-		URI siteURI = getSiteURI(url);
-		long lastModified = getTransport().getLastModified(siteURI, monitor);
-		if (lastModified == 0) {
-			throw new FileNotFoundException(url.toString());
-			//			String msg = NLS.bind(Messages.ErrorReadingSite, url);
-			//			throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, null));
-		}
-	}
-
 	/*
 	 * Constructor for the class.
 	 */
@@ -436,7 +434,7 @@ public class UpdateSite {
 	 */
 	public synchronized Feature[] loadFeatures(IProgressMonitor monitor) throws ProvisionException {
 		if (!featureCache.isEmpty())
-			return (Feature[]) featureCache.values().toArray(new Feature[featureCache.size()]);
+			return featureCache.values().toArray(new Feature[featureCache.size()]);
 		Feature[] result = loadFeaturesFromDigest(monitor);
 		return result == null ? loadFeaturesFromSite(monitor) : result;
 	}
@@ -477,7 +475,7 @@ public class UpdateSite {
 			Feature[] features = new DigestParser().parse(digestFile, digestURI);
 			if (features == null)
 				return null;
-			Map tmpFeatureCache = new HashMap(features.length);
+			Map<String, Feature> tmpFeatureCache = new HashMap<String, Feature>(features.length);
 			for (int i = 0; i < features.length; i++) {
 				String key = features[i].getId() + VERSION_SEPARATOR + features[i].getVersion();
 				tmpFeatureCache.put(key, features[i]);
@@ -518,7 +516,7 @@ public class UpdateSite {
 	private Feature[] loadFeaturesFromSite(IProgressMonitor monitor) throws ProvisionException {
 		SiteFeature[] siteFeatures = site.getFeatures();
 		FeatureParser featureParser = new FeatureParser();
-		Map tmpFeatureCache = new HashMap(siteFeatures.length);
+		Map<String, Feature> tmpFeatureCache = new HashMap<String, Feature>(siteFeatures.length);
 
 		for (int i = 0; i < siteFeatures.length; i++) {
 			if (monitor.isCanceled()) {
@@ -546,13 +544,13 @@ public class UpdateSite {
 			}
 		}
 		featureCache = tmpFeatureCache;
-		return (Feature[]) featureCache.values().toArray(new Feature[featureCache.size()]);
+		return featureCache.values().toArray(new Feature[featureCache.size()]);
 	}
 
 	/*
 	 * Load the features that are included by the given feature.
 	 */
-	private void loadIncludedFeatures(Feature feature, FeatureParser featureParser, Map features, IProgressMonitor monitor) throws ProvisionException {
+	private void loadIncludedFeatures(Feature feature, FeatureParser featureParser, Map<String, Feature> features, IProgressMonitor monitor) throws ProvisionException {
 		FeatureEntry[] featureEntries = feature.getEntries();
 		for (int i = 0; i < featureEntries.length; i++) {
 			if (monitor.isCanceled())
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java
index 49d2010..6997734 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/UpdateSitePublisherApplication.java
@@ -11,6 +11,7 @@ package org.eclipse.equinox.internal.p2.updatesite;
 
 import java.net.URISyntaxException;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.JREAction;
 
 /**
  * <p>
@@ -21,6 +22,7 @@ import org.eclipse.equinox.p2.publisher.*;
 public class UpdateSitePublisherApplication extends AbstractPublisherApplication {
 
 	private String categoryQualifier = null;
+	private String categoryVersion = null;
 
 	public UpdateSitePublisherApplication() {
 		// nothing todo
@@ -32,9 +34,31 @@ public class UpdateSitePublisherApplication extends AbstractPublisherApplication
 		if (arg.equalsIgnoreCase("-categoryQualifier")) //$NON-NLS-1$
 			categoryQualifier = parameter;
 
+		if (arg.equalsIgnoreCase("-categoryVersion")) //$NON-NLS-1$
+			categoryVersion = parameter;
 	}
 
 	protected IPublisherAction[] createActions() {
-		return new IPublisherAction[] {new LocalUpdateSiteAction(source, categoryQualifier)};
+		LocalUpdateSiteAction action = new LocalUpdateSiteAction(source, categoryQualifier);
+		action.setCategoryVersion(categoryVersion);
+		if (addJRE) {
+			return new IPublisherAction[] {action, new JREAction((String) null)};
+		}
+		return new IPublisherAction[] {action};
 	}
+
+	/** by default don't generate the JRE IU */
+	private boolean addJRE = false;
+
+	/**
+	 * Detect the flag -addJREIU to turn on the generation of the JREIU.
+	 */
+	protected void processFlag(String flag, PublisherInfo publisherInfo) {
+		super.processFlag(flag, publisherInfo);
+		if (flag.equalsIgnoreCase("-addJREIU"))//$NON-NLS-1$
+		{
+			addJRE = true;
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
new file mode 100644
index 0000000..788701d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/VersionSuffixGenerator.java
@@ -0,0 +1,296 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM - Initial API and implementation
+ *     G&H Softwareentwicklung GmbH - internationalization implementation (bug 150933)
+ *     Cloudsmith Inc. Refactored for more general use with VersionedId
+ ******************************************************************************/
+package org.eclipse.equinox.internal.p2.updatesite;
+
+import java.util.*;
+import org.eclipse.equinox.p2.metadata.IVersionedId;
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * Refactored from org.eclipse.pde.internal.build.builder.BuildDirector
+ */
+public class VersionSuffixGenerator {
+	public static final String VERSION_QUALIFIER = "qualifier"; //$NON-NLS-1$
+
+	private static final int QUALIFIER_SUFFIX_VERSION = 1;
+
+	// The 64 characters that are legal in a version qualifier, in lexicographical order.
+	public static final String BASE_64_ENCODING = "-0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; //$NON-NLS-1$
+
+	public static String incrementQualifier(String qualifier) {
+		int idx = qualifier.length() - 1;
+
+		for (; idx >= 0; idx--) {
+			//finding last non-'z' character
+			if (qualifier.charAt(idx) != 'z')
+				break;
+		}
+
+		if (idx >= 0) {
+			// charAt(idx) is < 'z', so don't need to check bounds
+			int c = BASE_64_ENCODING.indexOf(qualifier.charAt(idx)) + 1;
+			String newQualifier = qualifier.substring(0, idx);
+			newQualifier += BASE_64_ENCODING.charAt(c);
+			return newQualifier;
+		}
+
+		return null;
+	}
+
+	private static void appendEncodedCharacter(StringBuffer buffer, int c) {
+		while (c > 62) {
+			buffer.append('z');
+			c -= 63;
+		}
+		buffer.append(base64Character(c));
+	}
+
+	// Integer to character conversion in our base-64 encoding scheme. If the
+	// input is out of range, an illegal character will be returned.
+	//
+	private static char base64Character(int number) {
+		return (number < 0 || number > 63) ? ' ' : BASE_64_ENCODING.charAt(number);
+	}
+
+	private static int charValue(char c) {
+		int index = BASE_64_ENCODING.indexOf(c);
+		// The "+ 1" is very intentional. For a blank (or anything else that
+		// is not a legal character), we want to return 0. For legal
+		// characters, we want to return one greater than their position, so
+		// that a blank is correctly distinguished from '-'.
+		return index + 1;
+	}
+
+	private static int computeNameSum(String name) {
+		int sum = 0;
+		int top = name.length();
+		int lshift = 20;
+		for (int idx = 0; idx < top; ++idx) {
+			int c = name.charAt(idx) & 0xffff;
+			if (c == '.' && lshift > 0)
+				lshift -= 4;
+			else
+				sum += c << lshift;
+		}
+		return sum;
+	}
+
+	private static int getIntSegment(Version v, int segment) {
+		int segCount = v.getSegmentCount();
+		if (segCount <= segment)
+			return 0;
+		Object seg = v.getSegment(segment);
+		return seg instanceof Integer ? ((Integer) seg).intValue() : 0;
+	}
+
+	private static int getMajor(Version v) {
+		return getIntSegment(v, 0);
+	}
+
+	private static int getMicro(Version v) {
+		return getIntSegment(v, 2);
+	}
+
+	private static int getMinor(Version v) {
+		return getIntSegment(v, 1);
+	}
+
+	private static String getQualifier(Version v) {
+		int segCount = v.getSegmentCount();
+		if (segCount == 0)
+			return null;
+		Object seg = v.getSegment(segCount - 1);
+		return seg instanceof String ? (String) seg : null;
+	}
+
+	// Encode a non-negative number as a variable length string, with the
+	// property that if X > Y then the encoding of X is lexicographically
+	// greater than the enocding of Y. This is accomplished by encoding the
+	// length of the string at the beginning of the string. The string is a
+	// series of base 64 (6-bit) characters. The first three bits of the first
+	// character indicate the number of additional characters in the string.
+	// The last three bits of the first character and all of the rest of the
+	// characters encode the actual value of the number. Examples:
+	// 0 --> 000 000 --> "-"
+	// 7 --> 000 111 --> "6"
+	// 8 --> 001 000 001000 --> "77"
+	// 63 --> 001 000 111111 --> "7z"
+	// 64 --> 001 001 000000 --> "8-"
+	// 511 --> 001 111 111111 --> "Dz"
+	// 512 --> 010 000 001000 000000 --> "E7-"
+	// 2^32 - 1 --> 101 011 111111 ... 111111 --> "fzzzzz"
+	// 2^45 - 1 --> 111 111 111111 ... 111111 --> "zzzzzzzz"
+	// (There are some wasted values in this encoding. For example,
+	// "7-" through "76" and "E--" through "E6z" are not legal encodings of
+	// any number. But the benefit of filling in those wasted ranges would not
+	// be worth the added complexity.)
+	private static String lengthPrefixBase64(long number) {
+		int length = 7;
+		for (int i = 0; i < 7; ++i) {
+			if (number < (1L << ((i * 6) + 3))) {
+				length = i;
+				break;
+			}
+		}
+		StringBuffer result = new StringBuffer(length + 1);
+		result.append(base64Character((length << 3) + (int) ((number >> (6 * length)) & 0x7)));
+		while (--length >= 0) {
+			result.append(base64Character((int) ((number >> (6 * length)) & 0x3f)));
+		}
+		return result.toString();
+	}
+
+	private final int maxVersionSuffixLength;
+
+	private final int significantDigits;
+
+	public VersionSuffixGenerator() {
+		this(-1, -1);
+	}
+
+	public VersionSuffixGenerator(int maxVersionSuffixLenght, int significantDigits) {
+		this.maxVersionSuffixLength = maxVersionSuffixLenght < 0 ? 45 : maxVersionSuffixLenght;
+		this.significantDigits = significantDigits < 0 ? Integer.MAX_VALUE : significantDigits;
+	}
+
+	/**
+	 * Version suffix generation.
+	 * @param features A collection of @{link IVersionedId} instances representing the features to include
+	 * @param others A list of @{link IVersionedId} instances representing other IUs to include
+	 * @return The generated suffix or <code>null</code>
+	 */
+	public String generateSuffix(Collection<? extends IVersionedId> features, Collection<? extends IVersionedId> others) {
+		if (maxVersionSuffixLength <= 0 || (features.isEmpty() && others.isEmpty()))
+			return null; // do nothing
+
+		long majorSum = 0L;
+		long minorSum = 0L;
+		long serviceSum = 0L;
+		long nameCharsSum = 0L;
+
+		// Include the version of this algorithm as part of the suffix, so that
+		// we have a way to make sure all suffixes increase when the algorithm
+		// changes.
+		//
+		majorSum += QUALIFIER_SUFFIX_VERSION;
+		ArrayList<String> qualifiers = new ArrayList<String>();
+
+		// Loop through the included features, adding the version number parts
+		// to the running totals and storing the qualifier suffixes.
+		//
+		Iterator<? extends IVersionedId> itor = features.iterator();
+		while (itor.hasNext()) {
+			IVersionedId refFeature = itor.next();
+			Version version = refFeature.getVersion();
+			majorSum += getMajor(version);
+			minorSum += getMinor(version);
+			serviceSum += getMicro(version);
+			qualifiers.add(getQualifier(version));
+			nameCharsSum = computeNameSum(refFeature.getId());
+		}
+
+		// Loop through the included plug-ins and fragments, adding the version
+		// number parts to the running totals and storing the qualifiers.
+		//
+		itor = features.iterator();
+		while (itor.hasNext()) {
+			IVersionedId refOther = itor.next();
+			Version version = refOther.getVersion();
+			majorSum += getMajor(version);
+			minorSum += getMinor(version);
+			serviceSum += getMicro(version);
+
+			String qualifier = getQualifier(version);
+			if (qualifier != null && qualifier.endsWith(VERSION_QUALIFIER)) {
+				int resultingLength = qualifier.length() - VERSION_QUALIFIER.length();
+				if (resultingLength > 0) {
+					if (qualifier.charAt(resultingLength - 1) == '.')
+						resultingLength--;
+					qualifier = resultingLength > 0 ? qualifier.substring(0, resultingLength) : null;
+				} else
+					qualifier = null;
+			}
+			qualifiers.add(qualifier);
+		}
+
+		// Limit the qualifiers to the specified number of significant digits,
+		// and figure out what the longest qualifier is.
+		//
+		int longestQualifier = 0;
+		int idx = qualifiers.size();
+		while (--idx >= 0) {
+			String qualifier = qualifiers.get(idx);
+			if (qualifier == null)
+				continue;
+
+			if (qualifier.length() > significantDigits) {
+				qualifier = qualifier.substring(0, significantDigits);
+				qualifiers.set(idx, qualifier);
+			}
+			if (qualifier.length() > longestQualifier)
+				longestQualifier = qualifier.length();
+		}
+
+		StringBuffer result = new StringBuffer();
+
+		// Encode the sums of the first three parts of the version numbers.
+		result.append(lengthPrefixBase64(majorSum));
+		result.append(lengthPrefixBase64(minorSum));
+		result.append(lengthPrefixBase64(serviceSum));
+		result.append(lengthPrefixBase64(nameCharsSum));
+
+		if (longestQualifier > 0) {
+			// Calculate the sum at each position of the qualifiers.
+			int[] qualifierSums = new int[longestQualifier];
+			int top = qualifiers.size();
+			for (idx = 0; idx < top; ++idx) {
+				String qualifier = qualifiers.get(idx);
+				if (qualifier == null)
+					continue;
+
+				int qlen = qualifier.length();
+				for (int j = 0; j < qlen; ++j)
+					qualifierSums[j] += charValue(qualifier.charAt(j));
+			}
+
+			// Normalize the sums to be base 65.
+			int carry = 0;
+			for (int k = longestQualifier - 1; k >= 1; --k) {
+				qualifierSums[k] += carry;
+				carry = qualifierSums[k] / 65;
+				qualifierSums[k] = qualifierSums[k] % 65;
+			}
+			qualifierSums[0] += carry;
+
+			// Always use one character for overflow. This will be handled
+			// correctly even when the overflow character itself overflows.
+			result.append(lengthPrefixBase64(qualifierSums[0]));
+			for (int m = 1; m < longestQualifier; ++m)
+				appendEncodedCharacter(result, qualifierSums[m]);
+		}
+
+		// If the resulting suffix is too long, shorten it to the designed length.
+		//
+		if (result.length() > maxVersionSuffixLength)
+			result.setLength(maxVersionSuffixLength);
+
+		// It is safe to strip any '-' characters from the end of the suffix.
+		// (This won't happen very often, but it will save us a character or
+		// two when it does.)
+		//
+		int len = result.length();
+		while (len > 0 && result.charAt(len - 1) == '-')
+			result.setLength(--len);
+		return result.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
index 517816b..414c284 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
@@ -15,9 +15,13 @@ import java.net.URI;
 import java.util.Map;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.artifact.*;
 
 public class UpdateSiteArtifactRepository implements IArtifactRepository {
 
@@ -56,10 +60,6 @@ public class UpdateSiteArtifactRepository implements IArtifactRepository {
 		return delegate.getArtifactDescriptors(key);
 	}
 
-	public IArtifactKey[] getArtifactKeys() {
-		return delegate.getArtifactKeys();
-	}
-
 	public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
 		return delegate.getArtifacts(requests, monitor);
 	}
@@ -97,14 +97,22 @@ public class UpdateSiteArtifactRepository implements IArtifactRepository {
 		return delegate.getName();
 	}
 
-	public Map getProperties() {
+	public Map<String, String> getProperties() {
 		return delegate.getProperties();
 	}
 
+	public String getProperty(String key) {
+		return delegate.getProperty(key);
+	}
+
 	public String getProvider() {
 		return delegate.getProvider();
 	}
 
+	public IProvisioningAgent getProvisioningAgent() {
+		return delegate.getProvisioningAgent();
+	}
+
 	public String getType() {
 		return TYPE;
 	}
@@ -133,7 +141,28 @@ public class UpdateSiteArtifactRepository implements IArtifactRepository {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		return delegate.getAdapter(adapter);
 	}
+
+	public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
+		return delegate.createArtifactDescriptor(key);
+	}
+
+	public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
+		return delegate.createArtifactKey(classifier, id, version);
+	}
+
+	public IQueryable<IArtifactDescriptor> descriptorQueryable() {
+		return delegate.descriptorQueryable();
+	}
+
+	public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
+		return delegate.query(query, monitor);
+	}
+
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		return delegate.executeBatch(runnable, monitor);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
index 1a1f2b2..8a65d2d 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepositoryFactory.java
@@ -14,19 +14,18 @@ package org.eclipse.equinox.internal.p2.updatesite.artifact;
 import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.updatesite.Activator;
-import org.eclipse.equinox.internal.p2.updatesite.UpdateSite;
-import org.eclipse.equinox.internal.p2.updatesite.metadata.Messages;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.updatesite.*;
 import org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.SimpleArtifactRepositoryFactory;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
+import org.eclipse.equinox.p2.repository.IRepository;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.*;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
+import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
 import org.eclipse.osgi.util.NLS;
 
 public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFactory {
@@ -34,13 +33,12 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
 	 */
-	public IArtifactRepository create(URI location, String name, String type, Map properties) {
+	public IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) {
 		return null;
 	}
 
 	private static final String PROP_ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
 	private static final String PROP_FORCE_THREADING = "eclipse.p2.force.threading"; //$NON-NLS-1$
-	private static final String PROP_FORMAT_PACKED = "packed"; //$NON-NLS-1$
 	private static final String PROP_SITE_CHECKSUM = "site.checksum"; //$NON-NLS-1$
 	private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
 
@@ -74,6 +72,7 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 	public IArtifactRepository loadRepository(URI location, IProgressMonitor monitor) {
 		URI localRepositoryURL = UpdateSiteMetadataRepositoryFactory.getLocalRepositoryLocation(location);
 		SimpleArtifactRepositoryFactory factory = new SimpleArtifactRepositoryFactory();
+		factory.setAgent(getAgent());
 		try {
 			return factory.load(localRepositoryURL, 0, monitor);
 		} catch (ProvisionException e) {
@@ -85,7 +84,7 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 
 	public void initializeRepository(IArtifactRepository repository, URI location, IProgressMonitor monitor) throws ProvisionException {
 		UpdateSite updateSite = UpdateSite.load(location, monitor);
-		String savedChecksum = (String) repository.getProperties().get(PROP_SITE_CHECKSUM);
+		String savedChecksum = repository.getProperties().get(PROP_SITE_CHECKSUM);
 		if (savedChecksum != null && savedChecksum.equals(updateSite.getChecksum()))
 			return;
 
@@ -101,24 +100,24 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 	private void generateArtifactDescriptors(UpdateSite updateSite, IArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
 		final String PACK_EXT = ".pack.gz"; //$NON-NLS-1$
 		Feature[] features = updateSite.loadFeatures(monitor);
-		Set allSiteArtifacts = new HashSet();
+		Set<IArtifactDescriptor> allSiteArtifacts = new HashSet<IArtifactDescriptor>();
 		boolean packSupported = updateSite.getSite().isPack200Supported();
 		for (int i = 0; i < features.length; i++) {
 			Feature feature = features[i];
 			IArtifactKey featureKey = FeaturesAction.createFeatureArtifactKey(feature.getId(), feature.getVersion());
-			ArtifactDescriptor featureArtifactDescriptor = new ArtifactDescriptor(featureKey);
+			SimpleArtifactDescriptor featureArtifactDescriptor = new SimpleArtifactDescriptor(featureKey);
 			URI featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
 			featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString());
 			allSiteArtifacts.add(featureArtifactDescriptor);
 
 			if (packSupported) {
 				// Update site supports pack200, create a packed descriptor
-				featureArtifactDescriptor = new ArtifactDescriptor(featureKey);
+				featureArtifactDescriptor = new SimpleArtifactDescriptor(featureKey);
 				featureURL = updateSite.getFeatureURI(feature.getId(), feature.getVersion());
 				featureArtifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, featureURL.toString() + PACK_EXT);
-				ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+				IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
 				featureArtifactDescriptor.setProcessingSteps(steps);
-				featureArtifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, PROP_FORMAT_PACKED);
+				featureArtifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
 				allSiteArtifacts.add(featureArtifactDescriptor);
 			}
 
@@ -127,7 +126,7 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 				FeatureEntry entry = featureEntries[j];
 				if (entry.isPlugin() && !entry.isRequires()) {
 					IArtifactKey key = BundlesAction.createBundleArtifactKey(entry.getId(), entry.getVersion());
-					ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(key);
+					SimpleArtifactDescriptor artifactDescriptor = new SimpleArtifactDescriptor(key);
 					URI pluginURL = updateSite.getPluginURI(entry);
 					artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString());
 					allSiteArtifacts.add(artifactDescriptor);
@@ -135,19 +134,19 @@ public class UpdateSiteArtifactRepositoryFactory extends ArtifactRepositoryFacto
 					if (packSupported) {
 						// Update site supports pack200, create a packed descriptor
 						key = BundlesAction.createBundleArtifactKey(entry.getId(), entry.getVersion());
-						artifactDescriptor = new ArtifactDescriptor(key);
+						artifactDescriptor = new SimpleArtifactDescriptor(key);
 						pluginURL = updateSite.getPluginURI(entry);
 						artifactDescriptor.setRepositoryProperty(PROP_ARTIFACT_REFERENCE, pluginURL.toString() + PACK_EXT);
-						ProcessingStepDescriptor[] steps = new ProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
+						IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
 						artifactDescriptor.setProcessingSteps(steps);
-						artifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, PROP_FORMAT_PACKED);
+						artifactDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
 						allSiteArtifacts.add(artifactDescriptor);
 					}
 				}
 			}
 		}
 
-		IArtifactDescriptor[] descriptors = (IArtifactDescriptor[]) allSiteArtifacts.toArray(new IArtifactDescriptor[allSiteArtifacts.size()]);
+		IArtifactDescriptor[] descriptors = allSiteArtifacts.toArray(new IArtifactDescriptor[allSiteArtifacts.size()]);
 		repository.addDescriptors(descriptors);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
index de4677d..3f4b29b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/messages.properties
@@ -11,6 +11,8 @@
 ErrorReadingDigest=Error reading site digest {0}.
 ErrorReadingFeature=Error reading feature {0}.
 ErrorReadingSite=Error reading update site {0}.
+Error_generating_category=Error generating category xml action.
+Error_generating_siteXML=Error generating site xml action.
 Error_Generation=Problems generating update site metadata {0}.
 DefaultFeatureParser_IdOrVersionInvalid= Error parsing feature stream. The unique identifier or the version is null or empty for the State: \"{2}\": unique identifier=\"{0}\" version=\"{1}\".
 DefaultSiteParser_NoSiteTag= Error parsing site stream. Unable to find root element \"site\" in the stream.
@@ -26,4 +28,5 @@ DefaultSiteParser_ErrorlineColumnMessage= Error Parsing site stream. Element \"{
 DefaultSiteParser_ErrorParsingSite= Error Parsing site stream.
 DefaultSiteParser_UnknownState= Unknown State \"{0}\".
 DefaultSiteParser_InvalidXMLStream= The XML stream is not a valid default \"site.xml\" file. The root tag is not site.
-DefaultSiteParser_mirrors = Error processing update site mirror.
\ No newline at end of file
+DefaultSiteParser_mirrors = Error processing update site mirror.
+Unexpected_exception=Unexpected exception while loading {0}.
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java
deleted file mode 100644
index f23132d..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/Messages.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatesite.metadata;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.updatesite.metadata.messages"; //$NON-NLS-1$
-
-	public static String Unexpected_exception;
-	public static String AuthenticationFailedFor_0;
-	public static String RepositoryNotFound_0;
-
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-	}
-
-	private Messages() {
-		// prevent instantiation
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
index 8d09680..3dcdc6b 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,12 +11,17 @@
 package org.eclipse.equinox.internal.p2.updatesite.metadata;
 
 import java.net.URI;
+import java.util.Collection;
 import java.util.Map;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.Query;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.IRepositoryReference;
+import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
 
 public class UpdateSiteMetadataRepository implements IMetadataRepository {
 
@@ -31,75 +36,162 @@ public class UpdateSiteMetadataRepository implements IMetadataRepository {
 		this.delegate = repository;
 	}
 
+	// TODO remove
 	public void addInstallableUnits(IInstallableUnit[] installableUnits) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
-	public void addReference(URI location, String nickname, int type, int options) {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addInstallableUnits(java.util.Collection)
+	 */
+	public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addReferences(java.util.Collection)
+	 */
+	public void addReferences(Collection<? extends IRepositoryReference> references) {
+		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
+	 */
+	public Collection<IRepositoryReference> getReferences() {
+		return delegate.getReferences();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeAll()
+	 */
 	public void removeAll() {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
-	public boolean removeInstallableUnits(Query query, IProgressMonitor monitor) {
+	// TODO remove
+	public boolean removeInstallableUnits(IInstallableUnit[] installableUnits, IProgressMonitor monitor) {
+		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeInstallableUnits(java.util.Collection)
+	 */
+	public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getDescription()
+	 */
 	public String getDescription() {
 		return delegate.getDescription();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getLocation()
+	 */
 	public URI getLocation() {
 		return location;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getName()
+	 */
 	public String getName() {
 		return delegate.getName();
 	}
 
-	public Map getProperties() {
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getProperties()
+	 */
+	public Map<String, String> getProperties() {
 		return delegate.getProperties();
 	}
 
+	public String getProperty(String key) {
+		return delegate.getProperty(key);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getProvider()
+	 */
 	public String getProvider() {
 		return delegate.getProvider();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getProvisioningAgent()
+	 */
+	public IProvisioningAgent getProvisioningAgent() {
+		return delegate.getProvisioningAgent();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getType()
+	 */
 	public String getType() {
 		return TYPE;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#getVersion()
+	 */
 	public String getVersion() {
 		return VERSION;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#isModifiable()
+	 */
 	public boolean isModifiable() {
 		return false;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#setDescription(java.lang.String)
+	 */
 	public void setDescription(String description) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#setName(java.lang.String)
+	 */
 	public void setName(String name) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#setProperty(java.lang.String, java.lang.String)
+	 */
 	public String setProperty(String key, String value) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.repository.IRepository#setProvider(java.lang.String)
+	 */
 	public void setProvider(String provider) {
 		throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
 	}
 
+	@SuppressWarnings("rawtypes")
 	public Object getAdapter(Class adapter) {
 		return delegate.getAdapter(adapter);
 	}
 
-	public Collector query(Query query, Collector collector, IProgressMonitor monitor) {
-		return delegate.query(query, collector, monitor);
+	/* (non-Javadoc)
+	 * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
+		return delegate.query(query, monitor);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
+		return delegate.executeBatch(runnable, monitor);
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java
index 5287395..7a91126 100644
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepositoryFactory.java
@@ -13,20 +13,17 @@
 package org.eclipse.equinox.internal.p2.updatesite.metadata;
 
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.net.URI;
 import java.util.Map;
 import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
 import org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository;
-import org.eclipse.equinox.internal.p2.repository.AuthenticationFailedException;
+import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory;
 import org.eclipse.equinox.internal.p2.updatesite.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.SimpleMetadataRepositoryFactory;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
 import org.eclipse.osgi.util.NLS;
 
 public class UpdateSiteMetadataRepositoryFactory extends MetadataRepositoryFactory {
@@ -40,29 +37,12 @@ public class UpdateSiteMetadataRepositoryFactory extends MetadataRepositoryFacto
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
+	 * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
 	 */
-	public IMetadataRepository create(URI location, String name, String type, Map properties) {
+	public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
 		return null;
 	}
 
-	public IStatus validate(URI location, IProgressMonitor monitor) {
-		try {
-			UpdateSite.validate(location, monitor);
-		} catch (ProvisionException e) {
-			return e.getStatus();
-		} catch (UserCancelledException e) {
-			return Status.CANCEL_STATUS;
-		} catch (AuthenticationFailedException e) {
-			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, NLS.bind(Messages.AuthenticationFailedFor_0, location.toString()), e);
-		} catch (FileNotFoundException e) {
-			return new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.RepositoryNotFound_0, location.toString()), e);
-		} catch (CoreException e) {
-			return e.getStatus();
-		}
-		return Status.OK_STATUS;
-	}
-
 	public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
 		//return null if the caller wanted a modifiable repo
 		if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
@@ -91,6 +71,7 @@ public class UpdateSiteMetadataRepositoryFactory extends MetadataRepositoryFacto
 	public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) {
 		URI localRepositoryURL = getLocalRepositoryLocation(location);
 		SimpleMetadataRepositoryFactory factory = new SimpleMetadataRepositoryFactory();
+		factory.setAgent(getAgent());
 		try {
 			return factory.load(localRepositoryURL, 0, monitor);
 		} catch (ProvisionException e) {
@@ -102,7 +83,7 @@ public class UpdateSiteMetadataRepositoryFactory extends MetadataRepositoryFacto
 
 	public void initializeRepository(IMetadataRepository repository, URI location, IProgressMonitor monitor) throws ProvisionException {
 		UpdateSite updateSite = UpdateSite.load(location, monitor);
-		String savedChecksum = (String) repository.getProperties().get(PROP_SITE_CHECKSUM);
+		String savedChecksum = repository.getProperties().get(PROP_SITE_CHECKSUM);
 		if (savedChecksum != null && savedChecksum.equals(updateSite.getChecksum()))
 			return;
 		repository.setProperty(PROP_SITE_CHECKSUM, updateSite.getChecksum());
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties b/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties
deleted file mode 100644
index 45a312f..0000000
--- a/eclipse/plugins/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-UpdateSiteMetadataRepositoryFactory.Unexpected_exception=Unexpected exception while loading {0}.
-UpdateSiteMetadataRepositoryFactory.AuthenticationFailedFor_0=Authentication failed {0}.
-UpdateSiteMetadataRepositoryFactory.RepositoryNotFound_0=Repository not found {0}.
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
index cf9bdfa..df5f555 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.preferences; singleton:=true
-Bundle-Version: 3.2.301.qualifier
+Bundle-Version: 3.3.0.qualifier
 Bundle-Activator: org.eclipse.core.internal.preferences.Activator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.equinox.registry;bundle-version="[3.2.0,4.0.0)";resolution:=optional
 Export-Package: org.eclipse.core.internal.preferences;x-friends:="org.eclipse.core.resources,org.eclipse.core.runtime,org.eclipse.equinox.p2.engine",
  org.eclipse.core.internal.preferences.exchange;x-friends:="org.eclipse.core.runtime",
- org.eclipse.core.runtime.preferences;version="3.2.0",
+ org.eclipse.core.runtime.preferences;version="3.3.0",
  org.osgi.service.prefs;version="1.1.1"
 Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are specified for compatibility with 3.2
 Eclipse-LazyStart: true; exceptions="org.eclipse.core.internal.preferences.exchange"
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java
new file mode 100644
index 0000000..acbf2cd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/BundleDefaultPreferences.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.preferences;
+
+import java.util.*;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.preferences.*;
+
+/**
+ * This class represents a preference node in the "bundle_defaults" scope. This scope is
+ * used to represent default values which are set by the bundle in either its preference
+ * initializer or in a file included with the bundle. 
+ * 
+ * This differs from the regular default scope because it does not contain values set
+ * by the product preference customization or the command-line.
+ * 
+ * @since 3.3
+ */
+public class BundleDefaultPreferences extends EclipsePreferences {
+
+	private static Set loadedNodes = Collections.synchronizedSet(new HashSet());
+	private String qualifier;
+	private int segmentCount;
+	private IEclipsePreferences loadLevel;
+
+	/*
+	 * Default constructor.
+	 */
+	public BundleDefaultPreferences() {
+		this(null, null);
+	}
+
+	private BundleDefaultPreferences(EclipsePreferences parent, String name) {
+		super(parent, name);
+		// cache the segment count
+		IPath path = new Path(absolutePath());
+		segmentCount = path.segmentCount();
+		if (segmentCount < 2)
+			return;
+
+		// cache the qualifier
+		String scope = path.segment(0);
+		if (BundleDefaultsScope.SCOPE.equals(scope))
+			qualifier = path.segment(1);
+
+		// cache the location
+		if (qualifier == null)
+			return;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#getLoadLevel()
+	 */
+	protected IEclipsePreferences getLoadLevel() {
+		if (loadLevel == null) {
+			if (qualifier == null)
+				return null;
+			// Make it relative to this node rather than navigating to it from the root.
+			// Walk backwards up the tree starting at this node.
+			// This is important to avoid a chicken/egg thing on startup.
+			IEclipsePreferences node = this;
+			for (int i = 2; i < segmentCount; i++)
+				node = (IEclipsePreferences) node.parent();
+			loadLevel = node;
+		}
+		return loadLevel;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#isAlreadyLoaded(org.eclipse.core.runtime.preferences.IEclipsePreferences)
+	 */
+	protected boolean isAlreadyLoaded(IEclipsePreferences node) {
+		return loadedNodes.contains(node.name());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#loaded()
+	 */
+	protected void loaded() {
+		loadedNodes.add(name());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#load()
+	 */
+	protected void load() {
+		// ensure that the same node in the "default" scope is loaded so this one is 
+		// initialized properly
+		String relativePath = DefaultPreferences.getScopeRelativePath(absolutePath());
+		if (relativePath != null) {
+			// touch the node to force a load
+			PreferencesService.getDefault().getRootNode().node(DefaultScope.SCOPE).node(relativePath);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#internalCreate(org.eclipse.core.internal.preferences.EclipsePreferences, java.lang.String, java.lang.Object)
+	 */
+	protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
+		return new BundleDefaultPreferences(nodeParent, nodeName);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
index c42f904..d96f1ab 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,10 +18,12 @@ import java.util.*;
 import org.eclipse.core.internal.preferences.exchange.IProductPreferencesService;
 import org.eclipse.core.internal.runtime.RuntimeLog;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.BundleDefaultsScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.prefs.Preferences;
 import org.osgi.util.tracker.ServiceTracker;
 
 /**
@@ -39,6 +41,7 @@ public class DefaultPreferences extends EclipsePreferences {
 	private static Properties productTranslation;
 	private static Properties commandLineCustomization;
 	private EclipsePreferences loadLevel;
+	private Thread initializingThread;
 
 	// cached values
 	private String qualifier;
@@ -229,16 +232,90 @@ public class DefaultPreferences extends EclipsePreferences {
 	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#load()
 	 */
 	protected void load() {
-		loadDefaults();
-	}
-
-	private void loadDefaults() {
-		applyRuntimeDefaults();
-		applyBundleDefaults();
+		setInitializingBundleDefaults();
+		try {
+			applyRuntimeDefaults();
+			applyBundleDefaults();
+		} finally {
+			clearInitializingBundleDefaults();
+		}
 		applyProductDefaults();
 		applyCommandLineDefaults();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.internal.preferences.EclipsePreferences#internalPut(java.lang.String, java.lang.String)
+	 */
+	protected String internalPut(String key, String newValue) {
+		// set the value in this node
+		String result = super.internalPut(key, newValue);
+
+		// if we are setting the bundle defaults, then set the corresponding value in
+		// the bundle_defaults scope
+		if (isInitializingBundleDefaults()) {
+			String relativePath = getScopeRelativePath(absolutePath());
+			if (relativePath != null) {
+				Preferences node = PreferencesService.getDefault().getRootNode().node(BundleDefaultsScope.SCOPE).node(relativePath);
+				node.put(key, newValue);
+			}
+		}
+		return result;
+	}
+
+	/*
+	 * Set that we are in the middle of initializing the bundle defaults.
+	 * This is stored on the load level so we know where to look when
+	 * we are setting values on sub-nodes.
+	 */
+	private void setInitializingBundleDefaults() {
+		IEclipsePreferences node = getLoadLevel();
+		if (node instanceof DefaultPreferences) {
+			DefaultPreferences loader = (DefaultPreferences) node;
+			loader.initializingThread = Thread.currentThread();
+		}
+	}
+
+	/*
+	 * Clear the bit saying we are in the middle of initializing the bundle defaults.
+	 * This is stored on the load level so we know where to look when
+	 * we are setting values on sub-nodes.
+	 */
+	private void clearInitializingBundleDefaults() {
+		IEclipsePreferences node = getLoadLevel();
+		if (node instanceof DefaultPreferences) {
+			DefaultPreferences loader = (DefaultPreferences) node;
+			loader.initializingThread = null;
+		}
+	}
+
+	/*
+	 * Are we in the middle of initializing defaults from the bundle 
+	 * initializer or found in the bundle itself? Look on the load level in
+	 * case we are in a sub-node.
+	 */
+	private boolean isInitializingBundleDefaults() {
+		IEclipsePreferences node = getLoadLevel();
+		if (node instanceof DefaultPreferences) {
+			DefaultPreferences loader = (DefaultPreferences) node;
+			return loader.initializingThread == Thread.currentThread();
+		}
+		return false;
+	}
+
+	/*
+	 * Return a path which is relative to the scope of this node. 
+	 * e.g. com.example.foo for /instance/com.example.foo
+	 */
+	protected static String getScopeRelativePath(String absolutePath) {
+		// shouldn't happen but handle empty or root
+		if (absolutePath.length() < 2)
+			return null;
+		int index = absolutePath.indexOf('/', 1);
+		if (index == -1 || index + 1 >= absolutePath.length())
+			return null;
+		return absolutePath.substring(index + 1);
+	}
+
 	private Properties loadProperties(URL url) {
 		Properties result = new Properties();
 		if (url == null)
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
index b3a4ac5..01bceb6 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferenceServiceRegistryHelper.java
@@ -71,7 +71,7 @@ public class PreferenceServiceRegistryHelper implements IRegistryChangeListener
 		initializeScopes();
 		registry.addRegistryChangeListener(this);
 	}
-	
+
 	void stop() {
 		registry.removeRegistryChangeListener(this);
 	}
@@ -270,10 +270,18 @@ public class PreferenceServiceRegistryHelper implements IRegistryChangeListener
 	 * Run the preference initializer as specified by the given configuration element.
 	 */
 	private void runInitializer(IConfigurationElement element) {
-		AbstractPreferenceInitializer initializer = null;
 		try {
-			initializer = (AbstractPreferenceInitializer) element.createExecutableExtension(ATTRIBUTE_CLASS);
-			initializer.initializeDefaultPreferences();
+			final AbstractPreferenceInitializer initializer = (AbstractPreferenceInitializer) element.createExecutableExtension(ATTRIBUTE_CLASS);
+			ISafeRunnable job = new ISafeRunnable() {
+				public void handleException(Throwable exception) {
+					// already logged in Platform#run()
+				}
+
+				public void run() throws Exception {
+					initializer.initializeDefaultPreferences();
+				}
+			};
+			SafeRunner.run(job);
 		} catch (ClassCastException e) {
 			IStatus status = new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, IStatus.ERROR, PrefsMessages.preferences_invalidExtensionSuperclass, e);
 			log(status);
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
index e2fa17d..56b773c 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/PreferencesService.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 208564     
  *******************************************************************************/
 package org.eclipse.core.internal.preferences;
 
@@ -31,6 +32,7 @@ public class PreferencesService implements IPreferencesService {
 	 * strings.
 	 */
 	private static final long STRING_SHARING_INTERVAL = 300000;
+	private static final String MATCH_TYPE_PREFIX = "prefix"; //$NON-NLS-1$
 
 	// cheat here and add "project" even though we really shouldn't know about it
 	// because of plug-in dependencies and it being defined in the resources plug-in
@@ -368,6 +370,8 @@ public class PreferencesService implements IPreferencesService {
 	}
 
 	private void initializeDefaultScopes() {
+		defaultScopes.put(BundleDefaultsScope.SCOPE, new BundleDefaultPreferences());
+		root.addChild(BundleDefaultsScope.SCOPE, null);
 		defaultScopes.put(DefaultScope.SCOPE, new DefaultPreferences());
 		root.addChild(DefaultScope.SCOPE, null);
 		defaultScopes.put(InstanceScope.SCOPE, new InstancePreferences());
@@ -510,7 +514,7 @@ public class PreferencesService implements IPreferencesService {
 	 */
 	public byte[] getByteArray(String qualifier, String key, byte[] defaultValue, IScopeContext[] scopes) {
 		String result = get(EclipsePreferences.decodePath(key)[1], null, getNodes(qualifier, key, scopes));
-		return result == null ? defaultValue : result.getBytes();
+		return result == null ? defaultValue : Base64.decode(result.getBytes());
 	}
 
 	/*
@@ -774,7 +778,12 @@ public class PreferencesService implements IPreferencesService {
 					} else {
 						// otherwise check to see if we have any applicable keys
 						for (int j = 0; j < entries.length; j++) {
-							if (entries[j] != null && child.get(entries[j].getKey(), null) != null)
+							if (entries[j] == null)
+								continue;
+							if (entries[j].getMatchType() == null) {
+								if (child.get(entries[j].getKey(), null) != null)
+									return true;
+							} else if (internalMatchesWithMatchType(entries[j], child.keys()))
 								return true;
 						}
 					}
@@ -796,6 +805,23 @@ public class PreferencesService implements IPreferencesService {
 	}
 
 	/*
+	 * Internal method that check the matching preferences for entry with specific match type.
+	 */
+	private boolean internalMatchesWithMatchType(PreferenceFilterEntry entry, String[] keys) {
+		if (keys == null || keys.length == 0)
+			return false;
+		String key = entry.getKey();
+		String matchType = entry.getMatchType();
+		if (!matchType.equalsIgnoreCase(MATCH_TYPE_PREFIX))
+			return false;
+		for (int i = 0; i < keys.length; i++) {
+			if (keys[i].startsWith(key))
+				return true;
+		}
+		return false;
+	}
+
+	/*
 	 * Returns a boolean value indicating whether or not the given Properties
 	 * object is the result of a preference export previous to Eclipse 3.0.
 	 * 
@@ -961,6 +987,7 @@ public class PreferencesService implements IPreferencesService {
 				String childPath = nodeFullPath.substring(treePath.length());
 				childPath = EclipsePreferences.makeRelative(childPath);
 				if (tree.nodeExists(childPath)) {
+					Preferences child = tree.node(childPath);
 					PreferenceFilterEntry[] entries;
 					// protect against wrong classes since this is passed in by the user
 					try {
@@ -974,7 +1001,7 @@ public class PreferencesService implements IPreferencesService {
 						ArrayList list = new ArrayList();
 						for (int j = 0; j < entries.length; j++) {
 							if (entries[j] != null)
-								list.add(entries[j].getKey());
+								addMatchedKeys(list, entries[j], child.keys());
 						}
 						keys = (String[]) list.toArray(new String[list.size()]);
 					}
@@ -986,6 +1013,24 @@ public class PreferencesService implements IPreferencesService {
 		return result;
 	}
 
+	/*
+	 * Internal method that adds to the given list the matching preferences for entry with or without specific match type.
+	 */
+	private void addMatchedKeys(ArrayList list, PreferenceFilterEntry entry, String[] keys) {
+		String matchType = entry.getMatchType();
+		if (matchType == null) {
+			list.add(entry.getKey());
+			return;
+		}
+		if (keys == null)
+			return;
+		String key = entry.getKey();
+		for (int i = 0; i < keys.length; i++) {
+			if (matchType.equals(MATCH_TYPE_PREFIX) && keys[i].startsWith(key))
+				list.add(keys[i]);
+		}
+	}
+
 	/**
 	 * Compares two plugin version identifiers to see if their preferences
 	 * are compatible.  If they are not compatible, a warning message is 
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java
new file mode 100644
index 0000000..73d3eb4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/BundleDefaultsScope.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.runtime.preferences;
+
+import org.eclipse.core.internal.preferences.AbstractScope;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Object representing the bundle defaults scope in the Eclipse preferences
+ * hierarchy. Can be used as a context for searching for preference
+ * values (in the IPreferencesService APIs) or for determining the 
+ * correct preference node to set values in the store.
+ * <p>
+ * The bundle defaults are the defaults are default values which have
+ * been set either by the bundle's preference initializer or by a customization
+ * file supplied with the bundle.
+ * <p>
+ * Bundle default preferences are not persisted to disk.
+ * </p>
+ * <p>
+ * The path for preferences defined in the bundle defaults scope hierarchy
+ * is as follows: <code>/bundle_defaults/<qualifier></code>
+ * </p>
+ * <p>
+ * This class is not intended to be subclassed. This class may be instantiated.
+ * </p>
+ * @since 3.3
+ */
+public final class BundleDefaultsScope extends AbstractScope {
+
+	/**
+	 * String constant (value of <code>"default"</code>) used for the 
+	 * scope name for the default preference scope.
+	 */
+	public static final String SCOPE = "bundle_defaults"; //$NON-NLS-1$
+
+	/**
+	 * Create and return a new default scope instance.
+	 */
+	public BundleDefaultsScope() {
+		super();
+	}
+
+	/*
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
+	 */
+	public String getName() {
+		return SCOPE;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
+	 */
+	public IEclipsePreferences getNode(String qualifier) {
+		return super.getNode(qualifier);
+	}
+
+	/*
+	 * @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
+	 */
+	public IPath getLocation() {
+		// We don't persist defaults so return null.
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
index a573600..2c964d3 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/ConfigurationScope.java
@@ -38,9 +38,8 @@ import org.eclipse.osgi.service.datalocation.Location;
  * </p>
  * @see Location#CONFIGURATION_FILTER
  * @since 3.0
- * @noextend This class is not intended to be subclassed by clients.
  */
-public final class ConfigurationScope extends AbstractScope implements IScopeContext {
+public final class ConfigurationScope extends AbstractScope {
 
 	/**
 	 * String constant (value of <code>"configuration"</code>) used for the 
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
index b5d5548..9506d00 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/DefaultScope.java
@@ -37,9 +37,8 @@ import org.eclipse.core.runtime.IPath;
  * This class is not intended to be subclassed. This class may be instantiated.
  * </p>
  * @since 3.0
- * @noextend This class is not intended to be subclassed by clients.
  */
-public final class DefaultScope extends AbstractScope implements IScopeContext {
+public final class DefaultScope extends AbstractScope {
 
 	/**
 	 * String constant (value of <code>"default"</code>) used for the 
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java
index f66e968..86649a2 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/IPreferencesService.java
@@ -79,6 +79,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -129,6 +134,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -179,6 +189,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -229,6 +244,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -279,6 +299,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -329,6 +354,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -379,6 +409,11 @@ public interface IPreferencesService {
 	 * <li>"/a/b//c//d" - look in the child node "a/b" for the property "c//d"
 	 * </ul>
 	 * </p><p>
+	 * The scope look-up order is determined by the preference service default 
+	 * lookup order, not by the order of the scope contexts that are being passed in.
+	 * The context objects are only consulted to help determine which nodes to 
+	 * look in, not the order of the nodes.
+	 * </p><p>
 	 * Callers may specify an array of scope context objects to aid in the 
 	 * determination of the correct nodes. For each entry in the lookup 
 	 * order, the array of contexts is consulted and if one matching the 
@@ -461,9 +496,12 @@ public interface IPreferencesService {
 	/**
 	 * Take the given preference tree and apply it to the Eclipse
 	 * global preference hierarchy. If a node is an export root, then 
-	 * remove it from the global tree before adding any preferences
-	 * contained in it or its children. The given preferences object
-	 * must not be <code>null</code>.
+	 * treat the operation for that node as an overwrite rather than a merge. 
+	 * That is, remove the node from the global tree before adding any preferences
+	 * contained in it or its children.    
+	 * <p> 
+	 * The given preferences object must not be <code>null</code>.
+	 * </p>
 	 * <p>
 	 * Before the tree is applied to the global preference tree,
 	 * the registered <code>PreferenceModifyListener</code> objects
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
index 39ae19f..109f5dd 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/InstanceScope.java
@@ -32,9 +32,8 @@ import org.eclipse.osgi.service.datalocation.Location;
  * </p>
  * @see Location#INSTANCE_FILTER
  * @since 3.0
- * @noextend This class is not intended to be subclassed by clients.
  */
-public final class InstanceScope extends AbstractScope implements IScopeContext {
+public final class InstanceScope extends AbstractScope {
 
 	/**
 	 * String constant (value of <code>"instance"</code>) used for the 
diff --git a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/PreferenceFilterEntry.java b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/PreferenceFilterEntry.java
index 9c6d035..08b5e95 100644
--- a/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/PreferenceFilterEntry.java
+++ b/eclipse/plugins/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/PreferenceFilterEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 208564
  *******************************************************************************/
 package org.eclipse.core.runtime.preferences;
 
@@ -16,11 +17,11 @@ package org.eclipse.core.runtime.preferences;
  * 
  * @since 3.1
  * @see org.eclipse.core.runtime.preferences.IPreferenceFilter
- * @noextend This class is not intended to be subclassed by clients.
  */
 public final class PreferenceFilterEntry {
 
 	private String key;
+	private String matchType;
 
 	/**
 	 * Constructor for the class. Create a new preference filter entry with the given 
@@ -36,6 +37,24 @@ public final class PreferenceFilterEntry {
 	}
 
 	/**
+	 * Constructor for the class. Create a new preference filter entry with the given 
+	 * key and match type. The key must <em>not</em> be <code>null</code> or empty.
+	 * <p>
+	 * Setting matchType to "prefix" treats the key as if it were a regular expression
+	 * with an asterisk at the end. If matchType is <code>null</code>, the key must be 
+	 * an exact match.
+	 * </p> 
+	 * @param key the name of the preference key
+	 * @param matchType specifies key match type, may be <code>null</null> to indicate
+	 * that exact match is required      
+	 * @since 3.3       
+	 */
+	public PreferenceFilterEntry(String key, String matchType) {
+		this(key);
+		this.matchType = matchType;
+	}
+
+	/**
 	 * Return the name of the preference key for this filter entry.
 	 * It will <em>not</em> return <code>null</code> or the
 	 * empty string.
@@ -45,4 +64,15 @@ public final class PreferenceFilterEntry {
 	public String getKey() {
 		return key;
 	}
+
+	/**
+	 * Return the match type specified for this filter. May return <code>null</code>
+	 * to indicate that exact match is used.
+	 * @return matchType the match type, might be <code>null</code> indicating that
+	 * exact match is used
+	 * @since 3.3
+	 */
+	public String getMatchType() {
+		return matchType;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.registry/META-INF/MANIFEST.MF
index 60564b1..b9d0c9c 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.registry/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.registry;singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Localization: plugin
 Export-Package: org.eclipse.core.internal.adapter;x-internal:=true,
  org.eclipse.core.internal.registry;x-friends:="org.eclipse.core.runtime",
@@ -20,6 +20,7 @@ Import-Package: javax.xml.parsers,
  org.eclipse.osgi.service.datalocation,
  org.eclipse.osgi.service.debug,
  org.eclipse.osgi.service.environment;resolution:=optional,
+ org.eclipse.osgi.service.localization;version="1.1.0",
  org.eclipse.osgi.service.resolver;resolution:=optional,
  org.eclipse.osgi.storagemanager,
  org.eclipse.osgi.util,
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionHandle.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionHandle.java
index 1dda8b6..c6034a4 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionHandle.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,7 @@ public class BaseExtensionHandle extends Handle implements IExtension {
 	public IContributor getContributor() {
 		return getExtension().getContributor();
 	}
-	
+
 	String getContributorId() {
 		return getExtension().getContributorId();
 	}
@@ -59,6 +59,14 @@ public class BaseExtensionHandle extends Handle implements IExtension {
 		return getExtension().getLabel();
 	}
 
+	public String getLabelAsIs() {
+		return getExtension().getLabelAsIs();
+	}
+
+	public String getLabel(String locale) {
+		return getExtension().getLabel(locale);
+	}
+
 	public String getSimpleIdentifier() {
 		return getExtension().getSimpleIdentifier();
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionPointHandle.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionPointHandle.java
index b6ad27b..c4bfcd4 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionPointHandle.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/BaseExtensionPointHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,11 +36,11 @@ public class BaseExtensionPointHandle extends Handle implements IExtensionPoint
 	public String getNamespace() {
 		return getContributor().getName();
 	}
-	
+
 	public String getNamespaceIdentifier() {
 		return getExtensionPoint().getNamespace();
 	}
-	
+
 	public IContributor getContributor() {
 		return getExtensionPoint().getContributor();
 	}
@@ -74,10 +74,18 @@ public class BaseExtensionPointHandle extends Handle implements IExtensionPoint
 		return (IConfigurationElement[]) result.toArray(new IConfigurationElement[result.size()]);
 	}
 
+	public String getLabelAsIs() {
+		return getExtensionPoint().getLabelAsIs();
+	}
+
 	public String getLabel() {
 		return getExtensionPoint().getLabel();
 	}
 
+	public String getLabel(String locale) {
+		return getExtensionPoint().getLabel(locale);
+	}
+
 	public String getSchemaReference() {
 		return getExtensionPoint().getSchemaReference();
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElement.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElement.java
index 9f973b9..a76a4b3 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class ConfigurationElement extends RegistryObject {
 	//	[p1, v1, p2, v2, configurationElementValue]
 	//If the array size is even, there is no "configurationElementValue (ie getValue returns null)".
 	//The properties and their values are alternated (v1 is the value of p1). 
-	private String[] propertiesAndValue;
+	protected String[] propertiesAndValue;
 
 	//The name of the configuration element
 	private String name;
@@ -239,7 +239,7 @@ public class ConfigurationElement extends RegistryObject {
 		}
 
 		// create a new instance
-		RegistryContributor defaultContributor = registry.getObjectManager().getContributor(contributorId); 
+		RegistryContributor defaultContributor = registry.getObjectManager().getContributor(contributorId);
 		Object result = registry.createExecutableExtension(defaultContributor, className, contributorName);
 
 		// Check if we have extension adapter and initialize;
@@ -264,4 +264,13 @@ public class ConfigurationElement extends RegistryObject {
 		return result;
 	}
 
+	String getAttribute(String attrName, String locale) {
+		registry.logMultiLangError();
+		return getAttribute(attrName);
+	}
+
+	String getValue(String locale) {
+		registry.logMultiLangError();
+		return getValue();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
index 0469d83..ca99648 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,10 @@ public class ConfigurationElementHandle extends Handle implements IConfiguration
 		return getConfigurationElement().getAttribute(propertyName);
 	}
 
+	public String getAttribute(String attrName, String locale) {
+		return getConfigurationElement().getAttribute(attrName, locale);
+	}
+
 	public String[] getAttributeNames() {
 		return getConfigurationElement().getAttributeNames();
 	}
@@ -104,6 +108,10 @@ public class ConfigurationElementHandle extends Handle implements IConfiguration
 		return getConfigurationElement().getValue();
 	}
 
+	public String getValue(String locale) {
+		return getConfigurationElement().getValue(locale);
+	}
+
 	public String getValueAsIs() {
 		return getConfigurationElement().getValueAsIs();
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementMulti.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementMulti.java
new file mode 100644
index 0000000..84fd558
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ConfigurationElementMulti.java
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+/**
+ * An object which represents the user-defined contents of an extension
+ * in a plug-in manifest.
+ */
+public class ConfigurationElementMulti extends ConfigurationElement {
+
+	/**
+	 * Translated values for the locale
+	 */
+	private DirectMap translatedProperties = new DirectMap(10, 0.5f);
+
+	protected ConfigurationElementMulti(ExtensionRegistry registry, boolean persist) {
+		super(registry, persist);
+	}
+
+	protected ConfigurationElementMulti(int self, String contributorId, String name, String[] propertiesAndValue, int[] children, int extraDataOffset, int parent, byte parentType, ExtensionRegistry registry, boolean persist) {
+		super(self, contributorId, name, propertiesAndValue, children, extraDataOffset, parent, parentType, registry, persist);
+	}
+
+	String getAttribute(String attrName, String locale) {
+		if (propertiesAndValue.length <= 1)
+			return null;
+		//round down to an even size
+		int size = propertiesAndValue.length - (propertiesAndValue.length % 2);
+		int index = -1;
+		for (int i = 0, j = 0; i < size; i += 2, j++) {
+			if (!(propertiesAndValue[i].equals(attrName)))
+				continue;
+			index = j;
+			break;
+		}
+		if (index == -1)
+			return null;
+
+		String result = getTranslatedAtIndex(index, locale);
+		if (result != null)
+			return result;
+		return propertiesAndValue[index * 2 + 1]; // return non-translated value
+	}
+
+	String getValue(String locale) {
+		if (propertiesAndValue.length == 0 || propertiesAndValue.length % 2 == 0)
+			return null;
+		int index = propertiesAndValue.length - 1;
+		return getTranslatedAtIndex(index, locale);
+	}
+
+	private String getTranslatedAtIndex(int index, String locale) {
+		String[] translated = null;
+		if (!translatedProperties.containsKey(locale)) {
+			String[] propertiesNonTranslated = getNonTranslated();
+			translated = registry.translate(propertiesNonTranslated, getContributor(), locale);
+			translatedProperties.put(locale, translated);
+			registry.getObjectManager().markDirty();
+		} else
+			translated = translatedProperties.get(locale);
+
+		if (translated != null)
+			return translated[index];
+		return null;
+	}
+
+	private String[] getNonTranslated() {
+		int size = propertiesAndValue.length / 2;
+		boolean hasValue = ((propertiesAndValue.length % 2) == 1);
+		if (hasValue)
+			size++;
+		String[] propertiesNonTranslated = new String[size];
+		int pos = 0;
+		for (int i = 1; i < propertiesAndValue.length; i += 2) {
+			propertiesNonTranslated[pos] = propertiesAndValue[i];
+			pos++;
+		}
+		if (hasValue)
+			propertiesNonTranslated[pos] = propertiesAndValue[propertiesAndValue.length - 1];
+		return propertiesNonTranslated;
+	}
+
+	int getNumCachedLocales() {
+		return translatedProperties.getSzie();
+	}
+
+	String[] getCachedLocales() {
+		return translatedProperties.getKeys();
+	}
+
+	String[][] getCachedTranslations() {
+		return translatedProperties.getValues();
+	}
+
+	void setTranslatedProperties(DirectMap translated) {
+		translatedProperties = translated;
+	}
+
+	///////////////////////////////////////////////////////////////////////////////////
+	// "Default" locale
+
+	public String getAttribute(String attrName) {
+		return getAttribute(attrName, getLocale());
+	}
+
+	public String getValue() {
+		return getValue(getLocale());
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/DirectMap.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/DirectMap.java
new file mode 100644
index 0000000..d4976ca
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/DirectMap.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+/**
+ * Essentially a map String -> String[] for small number of keys. 
+ * 
+ * For Maps containing a small number of objects hashing often reduces performance. 
+ * This implementation uses two parallel arrays, one for keys, one for
+ * values, and grows them as necessary.
+ */
+public class DirectMap {
+
+	final private float growthFactor;
+
+	private String[] keyArray;
+	private String[][] valueArray;
+	private int size;
+
+	public DirectMap(int initialSize, float growthFactor) {
+		if (initialSize < 1)
+			throw new IllegalArgumentException();
+		if (growthFactor <= 0)
+			throw new IllegalArgumentException();
+		this.growthFactor = growthFactor;
+		keyArray = new String[initialSize];
+		valueArray = new String[initialSize][];
+		size = 0;
+	}
+
+	public synchronized void put(String key, String[] value) {
+		if (key == null)
+			throw new IllegalArgumentException();
+		int id = findKey(key);
+		if (id != -1)
+			throw new IllegalArgumentException();
+
+		if (size >= keyArray.length) { // need to resize
+			int newSize = recalcSize(keyArray.length);
+			if (newSize <= size)
+				newSize = size + 1;
+
+			String[] newKeyArray = new String[newSize];
+			System.arraycopy(keyArray, 0, newKeyArray, 0, keyArray.length);
+			keyArray = newKeyArray;
+
+			String[][] newValueArray = new String[newSize][];
+			System.arraycopy(valueArray, 0, newValueArray, 0, valueArray.length);
+			valueArray = newValueArray;
+		}
+		keyArray[size] = key;
+		valueArray[size] = value;
+		size++;
+	}
+
+	public synchronized boolean containsKey(String key) {
+		if (key == null)
+			throw new IllegalArgumentException();
+		return (findKey(key) != -1);
+	}
+
+	public synchronized String[] get(String key) {
+		if (key == null)
+			throw new IllegalArgumentException();
+		int id = findKey(key);
+		if (id == -1)
+			return null;
+		return valueArray[id];
+	}
+
+	/* package */String[] getKeys() {
+		return keyArray;
+	}
+
+	/* package */String[][] getValues() {
+		return valueArray;
+	}
+
+	/* package */int getSzie() {
+		return size;
+	}
+
+	private int recalcSize(int currentSize) {
+		return (int) (currentSize * (1.0f + growthFactor));
+	}
+
+	private int findKey(String key) {
+		for (int i = 0; i < keyArray.length; i++) {
+			if (keyArray[i] == null)
+				continue;
+			if (keyArray[i].equals(key))
+				return i;
+		}
+		return -1;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Extension.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Extension.java
index f281406..a17e801 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Extension.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/Extension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -135,4 +135,17 @@ public class Extension extends RegistryObject {
 			extraInformation = new String[EXTRA_SIZE];
 		}
 	}
+
+	String getLabelAsIs() {
+		String s = getExtraData()[LABEL];
+		if (s == null)
+			return ""; //$NON-NLS-1$
+		return s;
+	}
+
+	String getLabel(String locale) {
+		registry.logMultiLangError();
+		return getLabel();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionMulti.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionMulti.java
new file mode 100644
index 0000000..7e090c1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionMulti.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+/**
+ * A multi-language version of the ExtensionPoint 
+ */
+public class ExtensionMulti extends Extension {
+
+	protected ExtensionMulti(ExtensionRegistry registry, boolean persist) {
+		super(registry, persist);
+	}
+
+	protected ExtensionMulti(int self, String simpleId, String namespace, int[] children, int extraData, ExtensionRegistry registry, boolean persist) {
+		super(self, simpleId, namespace, children, extraData, registry, persist);
+	}
+
+	protected String getLabel(String locale) {
+		// this method call should be fairly rare, so no caching to save on memory
+		String[] translated = registry.translate(new String[] {getLabelAsIs()}, getContributor(), locale);
+		return translated[0];
+	}
+
+	protected String getLabel() {
+		return getLabel(getLocale());
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPoint.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPoint.java
index fe96df5..3dd569e 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPoint.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPoint.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -132,4 +132,14 @@ public class ExtensionPoint extends RegistryObject {
 		return getUniqueIdentifier();
 	}
 
+	protected String getLabelAsIs() {
+		String[] result = getExtraData();
+		return result[0] == null ? "" : result[LABEL]; //$NON-NLS-1$
+	}
+
+	protected String getLabel(String locale) {
+		registry.logMultiLangError();
+		return getLabel();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPointMulti.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPointMulti.java
new file mode 100644
index 0000000..940904d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionPointMulti.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+/**
+ * A multi-language version of the ExtensionPoint 
+ */
+public class ExtensionPointMulti extends ExtensionPoint {
+
+	protected ExtensionPointMulti(ExtensionRegistry registry, boolean persist) {
+		super(registry, persist);
+	}
+
+	protected ExtensionPointMulti(int self, int[] children, int dataOffset, ExtensionRegistry registry, boolean persist) {
+		super(self, children, dataOffset, registry, persist);
+	}
+
+	protected String getLabel(String locale) {
+		// this method call should be fairly rare, so no caching to save on memory
+		String[] translated = registry.translate(new String[] {getLabelAsIs()}, getContributor(), locale);
+		return translated[0];
+	}
+
+	protected String getLabel() {
+		return getLabel(getLocale());
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
index 36384f0..f538a9b 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,6 +82,12 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 	// marks a new extended delta. The namespace that normally would not exists is used for this purpose
 	private final static String notNamespace = ""; //$NON-NLS-1$
 
+	// does this instance of the extension registry has multiple language support enabled?
+	private final boolean isMultiLanguage;
+
+	// have we already logged a error on usage of an unsupported multi-language method?
+	private boolean mlErrorLogged = false;
+
 	public RegistryObjectManager getObjectManager() {
 		return registryObjects;
 	}
@@ -332,7 +338,13 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 			return null;
 		String namespace = extensionId.substring(0, lastdot);
 
-		ExtensionHandle[] extensions = registryObjects.getExtensionsFromNamespace(namespace);
+		ExtensionHandle[] extensions;
+		access.enterRead();
+		try {
+			extensions = registryObjects.getExtensionsFromNamespace(namespace);
+		} finally {
+			access.exitRead();
+		}
 		for (int i = 0; i < extensions.length; i++) {
 			ExtensionHandle suspect = extensions[i];
 			if (extensionId.equals(suspect.getUniqueIdentifier()))
@@ -370,7 +382,12 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 	 * @see org.eclipse.core.runtime.IExtensionRegistry#getExtensionPoint(java.lang.String)
 	 */
 	public IExtensionPoint getExtensionPoint(String xptUniqueId) {
-		return registryObjects.getExtensionPointHandle(xptUniqueId);
+		access.enterRead();
+		try {
+			return registryObjects.getExtensionPointHandle(xptUniqueId);
+		} finally {
+			access.exitRead();
+		}
 	}
 
 	/*
@@ -633,6 +650,8 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 	}
 
 	public ExtensionRegistry(RegistryStrategy registryStrategy, Object masterToken, Object userToken) {
+		isMultiLanguage = "true".equals(RegistryProperties.getProperty(IRegistryConstants.PROP_MULTI_LANGUAGE)); //$NON-NLS-1$
+
 		if (registryStrategy != null)
 			strategy = registryStrategy;
 		else
@@ -810,7 +829,10 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 
 	// Override to provide domain-specific elements to be stored in the extension registry
 	protected void setElementFactory() {
-		theRegistryObjectFactory = new RegistryObjectFactory(this);
+		if (isMultiLanguage)
+			theRegistryObjectFactory = new RegistryObjectFactoryMulti(this);
+		else
+			theRegistryObjectFactory = new RegistryObjectFactory(this);
 	}
 
 	// Lazy initialization.
@@ -828,7 +850,15 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 		strategy.log(status);
 	}
 
+	/**
+	 * With multi-locale support enabled this method returns the non-translated
+	 * key so that they can be cached and translated later into desired languages.
+	 * In the absence of the multi-locale support the key gets translated immediately
+	 * and only translated values is cached.
+	 */
 	public String translate(String key, ResourceBundle resources) {
+		if (isMultiLanguage)
+			return key;
 		return strategy.translate(key, resources);
 	}
 
@@ -1322,8 +1352,13 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 	}
 
 	public IContributor[] getAllContributors() {
-		Collection contributors = registryObjects.getContributors().values();
-		return (IContributor[]) contributors.toArray(new IContributor[contributors.size()]);
+		access.enterRead();
+		try {
+			Collection contributors = registryObjects.getContributors().values();
+			return (IContributor[]) contributors.toArray(new IContributor[contributors.size()]);
+		} finally {
+			access.exitRead();
+		}
 	}
 
 	/**
@@ -1335,4 +1370,22 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR
 		return userToken;
 	}
 
+	public boolean isMultiLanguage() {
+		return isMultiLanguage;
+	}
+
+	public String[] translate(String[] nonTranslated, IContributor contributor, String locale) {
+		return strategy.translate(nonTranslated, contributor, locale);
+	}
+
+	public String getLocale() {
+		return strategy.getLocale();
+	}
+
+	public void logMultiLangError() {
+		if (mlErrorLogged) // only log this error ones
+			return;
+		log(new Status(IStatus.ERROR, RegistryMessages.OWNER_NAME, 0, RegistryMessages.registry_non_multi_lang, new IllegalArgumentException()));
+		mlErrorLogged = true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
index 840a52d..c684525 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionsParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -465,7 +465,7 @@ public class ExtensionsParser extends DefaultHandler {
 					targetName = attrValue;
 				currentExtension.setExtensionPointIdentifier(targetName);
 			} else
-				unknownAttribute(EXTENSION, attrName);
+				unknownAttribute(attrName, EXTENSION);
 		}
 		if (currentExtension.getExtensionPointIdentifier() == null) {
 			missingAttribute(EXTENSION_TARGET, EXTENSION);
@@ -554,7 +554,7 @@ public class ExtensionsParser extends DefaultHandler {
 			} else if (attrName.equals(EXTENSION_POINT_SCHEMA))
 				currentExtPoint.setSchema(attrValue);
 			else
-				unknownAttribute(EXTENSION_POINT, attrName);
+				unknownAttribute(attrName, EXTENSION_POINT);
 		}
 		if (currentExtPoint.getSimpleIdentifier() == null || currentExtPoint.getLabel() == null) {
 			String attribute = currentExtPoint.getSimpleIdentifier() == null ? EXTENSION_POINT_ID : EXTENSION_POINT_NAME;
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/HashtableOfInt.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/HashtableOfInt.java
deleted file mode 100644
index 877611b..0000000
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/HashtableOfInt.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.core.internal.registry;
-
-import java.io.*;
-
-/**
- *	Hashtable for non-zero int keys.
- */
-
-public final class HashtableOfInt {
-	private int[] keyTable;
-	private int[] valueTable;
-	private static final float GROWTH_FACTOR = 1.33f;
-
-	private int elementSize; // number of elements in the table
-	private int threshold;
-
-	public HashtableOfInt() {
-		this(13);
-	}
-
-	public HashtableOfInt(int size) {
-		this.elementSize = 0;
-		this.threshold = size; // size represents the expected number of elements
-		int extraRoom = (int) (size * 1.33f);
-		if (this.threshold == extraRoom)
-			extraRoom++;
-		this.keyTable = new int[extraRoom];
-		this.valueTable = new int[extraRoom];
-	}
-
-	public boolean containsKey(int key) {
-		int index = key % valueTable.length;
-		int currentKey;
-		while ((currentKey = keyTable[index]) != 0) {
-			if (currentKey == key)
-				return true;
-			index = (index + 1) % keyTable.length;
-		}
-		return false;
-	}
-
-	public int get(int key) {
-		int index = key % valueTable.length;
-		int currentKey;
-		while ((currentKey = keyTable[index]) != 0) {
-			if (currentKey == key)
-				return valueTable[index];
-			index = (index + 1) % keyTable.length;
-		}
-		return Integer.MIN_VALUE;
-	}
-
-	public int removeKey(int key) {
-		int index = key % valueTable.length;
-		int currentKey;
-		while ((currentKey = keyTable[index]) != 0) {
-			if (currentKey == key) {
-				return valueTable[index];
-			}
-			index = (index + 1) % keyTable.length;
-		}
-		return Integer.MIN_VALUE;
-	}
-
-	public int put(int key, int value) {
-		int index = key % valueTable.length;
-		int currentKey;
-		while ((currentKey = keyTable[index]) != 0) {
-			if (currentKey == key)
-				return valueTable[index] = value;
-			index = (index + 1) % keyTable.length;
-		}
-		keyTable[index] = key;
-		valueTable[index] = value;
-
-		// assumes the threshold is never equal to the size of the table
-		if (++elementSize > threshold)
-			rehash();
-		return value;
-	}
-
-	private void rehash() {
-		HashtableOfInt newHashtable = new HashtableOfInt((int) (elementSize * GROWTH_FACTOR)); // double the number of expected elements
-		int currentKey;
-		for (int i = keyTable.length; --i >= 0;)
-			if ((currentKey = keyTable[i]) != 0)
-				newHashtable.put(currentKey, valueTable[i]);
-
-		this.keyTable = newHashtable.keyTable;
-		this.valueTable = newHashtable.valueTable;
-		this.threshold = newHashtable.threshold;
-	}
-
-	public int size() {
-		return elementSize;
-	}
-
-	public String toString() {
-		String s = ""; //$NON-NLS-1$
-		int object;
-		for (int i = 0, length = valueTable.length; i < length; i++)
-			if ((object = valueTable[i]) != Integer.MIN_VALUE)
-				s += keyTable[i] + " -> " + object + "\n"; //$NON-NLS-2$ //$NON-NLS-1$
-		return s;
-	}
-
-	public void save(DataOutputStream out) throws IOException {
-		out.writeInt(elementSize);
-		int tableSize = keyTable.length;
-		out.writeInt(tableSize);
-		out.writeInt(threshold);
-		for (int i = 0; i < tableSize; i++) {
-			out.writeInt(keyTable[i]);
-			out.writeInt(valueTable[i]);
-		}
-	}
-
-	public void load(DataInputStream in) throws IOException {
-		elementSize = in.readInt();
-		int tableSize = in.readInt();
-		threshold = in.readInt();
-		boolean fastMode = true;
-		if (((double) tableSize / elementSize) < GROWTH_FACTOR) {
-			keyTable = new int[(int) (elementSize * GROWTH_FACTOR)];
-			valueTable = new int[(int) (elementSize * GROWTH_FACTOR)];
-			elementSize = 0;
-			fastMode = false;
-		} else {
-			keyTable = new int[tableSize];
-			valueTable = new int[tableSize];
-		}
-		for (int i = 0; i < tableSize; i++) {
-			int key = in.readInt();
-			int value = in.readInt();
-			if (fastMode) {
-				keyTable[i] = key;
-				valueTable[i] = value;
-			} else {
-				put(key, value);
-			}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/IRegistryConstants.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/IRegistryConstants.java
index a8d2004..c225a9e 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/IRegistryConstants.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/IRegistryConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ public interface IRegistryConstants {
 	// command line options
 	public static final String NO_REGISTRY_CACHE = "-noregistrycache"; //$NON-NLS-1$	
 	public static final String NO_LAZY_REGISTRY_CACHE_LOADING = "-noLazyRegistryCacheLoading"; //$NON-NLS-1$		
+	public static final String MULTI_LANGUAGE = "-registryMultiLanguage"; //$NON-NLS-1$		
 
 	// System options
 	public static final String PROP_NO_LAZY_CACHE_LOADING = "eclipse.noLazyRegistryCacheLoading"; //$NON-NLS-1$
@@ -28,6 +29,7 @@ public interface IRegistryConstants {
 	public static final String PROP_NO_REGISTRY_CACHE = "eclipse.noRegistryCache"; //$NON-NLS-1$
 	public static final String PROP_DEFAULT_REGISTRY = "eclipse.createRegistry"; //$NON-NLS-1$
 	public static final String PROP_REGISTRY_NULL_USER_TOKEN = "eclipse.registry.nulltoken"; //$NON-NLS-1$
+	public static final String PROP_MULTI_LANGUAGE = "eclipse.registry.MultiLanguage"; //$NON-NLS-1$
 
 	// OSGI system properties
 	public static final String PROP_NL = "osgi.nl"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/OffsetTable.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/OffsetTable.java
new file mode 100644
index 0000000..59a95f6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/OffsetTable.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+import java.io.*;
+
+/**
+ * This table stores file offsets for cached registry objects.
+ * Entries are never added when this table resides in memory. Entries could be removed.
+ */
+public final class OffsetTable {
+
+	private static final float GROWTH_FACTOR = 1.33f;
+
+	private int[] valueTable;
+
+	public OffsetTable(int size) {
+		this.valueTable = new int[size];
+	}
+
+	public int get(int key) {
+		if (key < valueTable.length)
+			return valueTable[key];
+		return Integer.MIN_VALUE; // should not happen; will be converted to exception higher in the call stack
+	}
+
+	public void removeKey(int key) {
+		if (key < valueTable.length) // registry elements added in the running session will have IDs outside of the valid offset range
+			valueTable[key] = Integer.MIN_VALUE;
+	}
+
+	public void put(int key, int value) {
+		if (key >= valueTable.length) { // this should not happen in the expected use cases as we know the max size in advance
+			int[] newTable = new int[(int) (key * GROWTH_FACTOR)];
+			System.arraycopy(valueTable, 0, newTable, 0, valueTable.length);
+			valueTable = newTable;
+		}
+		valueTable[key] = value;
+	}
+
+	public void save(DataOutputStream out) throws IOException {
+		int tableSize = valueTable.length;
+		out.writeInt(tableSize);
+		for (int i = 0; i < tableSize; i++) {
+			out.writeInt(valueTable[i]);
+		}
+	}
+
+	static public OffsetTable load(DataInputStream in) throws IOException {
+		int tableSize = in.readInt();
+		OffsetTable result = new OffsetTable(tableSize);
+		result.valueTable = new int[tableSize];
+		for (int i = 0; i < tableSize; i++)
+			result.valueTable[i] = in.readInt();
+		return result;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java
index 8379cde..10af06c 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryMessages.java
@@ -34,6 +34,7 @@ public class RegistryMessages extends NLS {
 	public static String registry_no_default;
 	public static String registry_default_exists;
 	public static String registry_bad_cache;
+	public static String registry_non_multi_lang;
 
 	// parsing/resolve
 	public static String parse_error;
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
index c6e5157..89865c8 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -95,15 +95,19 @@ public abstract class RegistryObject implements KeyedElement {
 	// Accept -1 as "no extra data" on input
 	protected void setExtraDataOffset(int offset) {
 		if (offset == -1) {
-			extraDataOffset &=~OFFSET_MASK; // clear all offset bits
+			extraDataOffset &= ~OFFSET_MASK; // clear all offset bits
 			extraDataOffset |= EMPTY_MASK;
 			return;
 		}
-		
+
 		if ((offset & OFFSET_MASK) != offset)
 			throw new IllegalArgumentException("Registry object: extra data offset is out of range"); //$NON-NLS-1$
-		
-		extraDataOffset &=~(OFFSET_MASK | EMPTY_MASK) ; // clear all offset bits; mark as non-empty
+
+		extraDataOffset &= ~(OFFSET_MASK | EMPTY_MASK); // clear all offset bits; mark as non-empty
 		extraDataOffset |= (offset & OFFSET_MASK); // set all offset bits
 	}
+
+	protected String getLocale() {
+		return registry.getLocale();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectFactoryMulti.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectFactoryMulti.java
new file mode 100644
index 0000000..3c6d51d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectFactoryMulti.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.core.internal.registry;
+
+/**
+ * A factory method for the creation of the registry objects for 
+ * registries supporting multiple languages.
+ */
+public class RegistryObjectFactoryMulti extends RegistryObjectFactory {
+
+	public RegistryObjectFactoryMulti(ExtensionRegistry registry) {
+		super(registry);
+	}
+
+	public ExtensionPoint createExtensionPoint(boolean persist) {
+		return new ExtensionPointMulti(registry, persist);
+	}
+
+	public ExtensionPoint createExtensionPoint(int self, int[] children, int dataOffset, boolean persist) {
+		return new ExtensionPointMulti(self, children, dataOffset, registry, persist);
+	}
+
+	public Extension createExtension(boolean persist) {
+		return new ExtensionMulti(registry, persist);
+	}
+
+	public Extension createExtension(int self, String simpleId, String namespace, int[] children, int extraData, boolean persist) {
+		return new ExtensionMulti(self, simpleId, namespace, children, extraData, registry, persist);
+	}
+
+	public ConfigurationElement createConfigurationElement(boolean persist) {
+		return new ConfigurationElementMulti(registry, persist);
+	}
+
+	public ConfigurationElement createConfigurationElement(int self, String contributorId, String name, String[] propertiesAndValue, int[] children, int extraDataOffset, int parent, byte parentType, boolean persist) {
+		return new ConfigurationElementMulti(self, contributorId, name, propertiesAndValue, children, extraDataOffset, parent, parentType, registry, persist);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
index 7aa46f3..c88fba6 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/RegistryObjectManager.java
@@ -42,7 +42,7 @@ public class RegistryObjectManager implements IObjectManager {
 	// key: object id, value: an object
 	private ReferenceMap cache; //Entries are added by getter. The structure is not thread safe.
 	//key: int, value: int
-	private HashtableOfInt fileOffsets; //This is read once on startup when loading from the cache. Entries are never added here. They are only removed to prevent "removed" objects to be reloaded.
+	private OffsetTable fileOffsets = null; //This is read once on startup when loading from the cache. Entries are never added here. They are only removed to prevent "removed" objects to be reloaded.
 
 	private int nextId = 1; //This is only used to get the next number available.
 
@@ -80,7 +80,6 @@ public class RegistryObjectManager implements IObjectManager {
 			cache = new ReferenceMap(ReferenceMap.SOFT, CACHE_INITIAL_SIZE, DEFAULT_LOADFACTOR);
 		}
 		newContributions = new KeyedHashSet();
-		fileOffsets = new HashtableOfInt();
 
 		this.registry = registry;
 	}
@@ -94,7 +93,7 @@ public class RegistryObjectManager implements IObjectManager {
 		if (results == null) {
 			return false;
 		}
-		fileOffsets = (HashtableOfInt) results[0];
+		fileOffsets = (OffsetTable) results[0];
 		extensionPoints = (HashtableOfStringAndInt) results[1];
 		nextId = ((Integer) results[2]).intValue();
 		fromCache = true;
@@ -402,6 +401,8 @@ public class RegistryObjectManager implements IObjectManager {
 
 	private Object load(int id, byte type) {
 		TableReader reader = registry.getTableReader();
+		if (fileOffsets == null)
+			return null;
 		int offset = fileOffsets.get(id);
 		if (offset == Integer.MIN_VALUE)
 			return null;
@@ -450,6 +451,10 @@ public class RegistryObjectManager implements IObjectManager {
 		return isDirty;
 	}
 
+	public void markDirty() {
+		isDirty = true;
+	}
+
 	synchronized void removeContribution(Object contributorId) {
 		boolean removed = newContributions.removeByKey(contributorId);
 		if (removed == false) {
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
index 8572f57..c2dbf89 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableReader.java
@@ -23,11 +23,13 @@ public class TableReader {
 	static final int OBJECT = 1;
 
 	//The version of the cache
-	static final int CACHE_VERSION = 5;
+	static final int CACHE_VERSION = 7;
 	// Version 1 -> 2: the contributor Ids changed from "long" to "String"
 	// Version 2 -> 3: added namespace index and the table of contributors
 	// Version 3 -> 4: offset table saved in a binary form (performance)
 	// Version 4 -> 5: remove support added in version 4 to save offset table in a binary form (performance)
+	// Version 5 -> 6: replace HashtableOfInt with OffsetTable (memory usage optimization)
+	// Version 6 -> 7: added option for multi-language support
 
 	//Informations representing the MAIN file
 	static final String MAIN = ".mainData"; //$NON-NLS-1$
@@ -103,7 +105,6 @@ public class TableReader {
 
 	// Don't need to synchronize - called only from a synchronized method
 	public Object[] loadTables(long expectedTimestamp) {
-		HashtableOfInt offsets;
 		HashtableOfStringAndInt extensionPoints;
 
 		DataInputStream tableInput = null;
@@ -113,8 +114,7 @@ public class TableReader {
 				return null;
 
 			Integer nextId = new Integer(tableInput.readInt());
-			offsets = new HashtableOfInt();
-			offsets.load(tableInput);
+			OffsetTable offsets = OffsetTable.load(tableInput);
 			extensionPoints = new HashtableOfStringAndInt();
 			extensionPoints.load(tableInput);
 			return new Object[] {offsets, extensionPoints, nextId};
@@ -151,14 +151,16 @@ public class TableReader {
 			String osStamp = in.readUTF();
 			String windowsStamp = in.readUTF();
 			String localeStamp = in.readUTF();
+			boolean multiLanguage = in.readBoolean();
 
 			boolean validTime = (expectedTimestamp == 0 || expectedTimestamp == registryStamp);
 			boolean validInstall = (installStamp == registry.computeState());
 			boolean validOS = (osStamp.equals(RegistryProperties.getProperty(IRegistryConstants.PROP_OS, RegistryProperties.empty)));
 			boolean validWS = (windowsStamp.equals(RegistryProperties.getProperty(IRegistryConstants.PROP_WS, RegistryProperties.empty)));
 			boolean validNL = (localeStamp.equals(RegistryProperties.getProperty(IRegistryConstants.PROP_NL, RegistryProperties.empty)));
+			boolean validMultiLang = (registry.isMultiLanguage() == multiLanguage);
 
-			if (!validTime || !validInstall || !validOS || !validWS || !validNL)
+			if (!validTime || !validInstall || !validOS || !validWS || !validNL || !validMultiLang)
 				return false;
 
 			boolean validMain = (mainDataFileSize == mainDataFile.length());
@@ -201,7 +203,34 @@ public class TableReader {
 		int[] children = readArray(is);
 		if (actualContributorId == null)
 			actualContributorId = contributorId;
-		return getObjectFactory().createConfigurationElement(self, actualContributorId, name, propertiesAndValue, children, misc, parentId, parentType, true);
+		ConfigurationElement result = getObjectFactory().createConfigurationElement(self, actualContributorId, name, propertiesAndValue, children, misc, parentId, parentType, true);
+		if (registry.isMultiLanguage()) { // cache is multi-language too or it would have failed validation
+			int numberOfLocales = is.readInt();
+			DirectMap translated = null;
+			if (numberOfLocales != 0) {
+				translated = new DirectMap(numberOfLocales, 0.5f);
+				String[] NLs = readStringArray(is);
+				for (int i = 0; i < numberOfLocales; i++) {
+					String[] translatedProperties = readStringArray(is);
+					translated.put(NLs[i], translatedProperties);
+				}
+			}
+			ConfigurationElementMulti multiCE = (ConfigurationElementMulti) result;
+			if (translated != null)
+				multiCE.setTranslatedProperties(translated);
+		}
+		return result;
+	}
+
+	private String[] readStringArray(DataInputStream is) throws IOException {
+		int size = is.readInt();
+		if (size == 0)
+			return null;
+		String[] result = new String[size];
+		for (int i = 0; i < size; i++) {
+			result[i] = readStringOrNull(is);
+		}
+		return result;
 	}
 
 	public Object loadThirdLevelConfigurationElements(int offset, RegistryObjectManager objectManager) {
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableWriter.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableWriter.java
index 96c3b40..87085e2 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableWriter.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/TableWriter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,7 +59,7 @@ public class TableWriter {
 	FileOutputStream mainFileOutput = null;
 	FileOutputStream extraFileOutput = null;
 
-	private HashtableOfInt offsets;
+	private OffsetTable offsets;
 
 	private ExtensionRegistry registry;
 	private RegistryObjectManager objectManager;
@@ -138,7 +138,7 @@ public class TableWriter {
 
 	private void saveExtensionRegistry(long timestamp) throws IOException {
 		ExtensionPointHandle[] points = objectManager.getExtensionPointsHandles();
-		offsets = new HashtableOfInt(objectManager.getNextId());
+		offsets = new OffsetTable(objectManager.getNextId());
 		for (int i = 0; i < points.length; i++) {
 			saveExtensionPoint(points[i]);
 		}
@@ -275,6 +275,7 @@ public class TableWriter {
 		output.writeUTF(RegistryProperties.getProperty(IRegistryConstants.PROP_OS, RegistryProperties.empty));
 		output.writeUTF(RegistryProperties.getProperty(IRegistryConstants.PROP_WS, RegistryProperties.empty));
 		output.writeUTF(RegistryProperties.getProperty(IRegistryConstants.PROP_NL, RegistryProperties.empty));
+		output.writeBoolean(registry.isMultiLanguage());
 	}
 
 	private void saveArray(int[] array, DataOutputStream out) throws IOException {
@@ -321,6 +322,15 @@ public class TableWriter {
 		}
 	}
 
+	private void writeStringArray(String[] array, int size, DataOutputStream outputStream) throws IOException {
+		outputStream.writeInt(array == null ? 0 : size);
+		if (array == null)
+			return;
+		for (int i = 0; i < size; i++) {
+			writeStringOrNull(array[i], outputStream);
+		}
+	}
+
 	//Save Configuration elements depth first
 	private void saveConfigurationElement(ConfigurationElementHandle element, DataOutputStream outputStream, DataOutputStream extraOutputStream, int depth) throws IOException {
 		if (!element.shouldPersist())
@@ -343,6 +353,19 @@ public class TableWriter {
 		//save the children
 		saveArray(filter(actualCe.getRawChildren()), currentOutput);
 
+		if (actualCe instanceof ConfigurationElementMulti) {
+			ConfigurationElementMulti multiCE = (ConfigurationElementMulti) actualCe;
+			int NLs = multiCE.getNumCachedLocales();
+			currentOutput.writeInt(NLs);
+			if (NLs != 0) {
+				writeStringArray(multiCE.getCachedLocales(), NLs, currentOutput);
+				String[][] translated = multiCE.getCachedTranslations();
+				for (int i = 0; i < NLs; i++) {
+					writeStringArray(translated[i], currentOutput);
+				}
+			}
+		}
+
 		ConfigurationElementHandle[] childrenCEs = (ConfigurationElementHandle[]) element.getChildren();
 		for (int i = 0; i < childrenCEs.length; i++) {
 			saveConfigurationElement(childrenCEs[i], outputStream, extraOutputStream, depth + 1);
@@ -377,7 +400,7 @@ public class TableWriter {
 	}
 
 	private void saveExtensionPointData(ExtensionPointHandle xpt) throws IOException {
-		writeStringOrNull(xpt.getLabel(), extraOutput);
+		writeStringOrNull(xpt.getLabelAsIs(), extraOutput);
 		writeStringOrNull(xpt.getSchemaReference(), extraOutput);
 		writeStringOrNull(xpt.getUniqueIdentifier(), extraOutput);
 		writeStringOrNull(xpt.getNamespaceIdentifier(), extraOutput);
@@ -385,7 +408,7 @@ public class TableWriter {
 	}
 
 	private void saveExtensionData(ExtensionHandle extension) throws IOException {
-		writeStringOrNull(extension.getLabel(), extraOutput);
+		writeStringOrNull(extension.getLabelAsIs(), extraOutput);
 		writeStringOrNull(extension.getExtensionPointUniqueIdentifier(), extraOutput);
 		writeStringOrNull(extension.getContributorId(), extraOutput);
 	}
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties
index 059d6ae..783b279 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/messages.properties
@@ -23,6 +23,7 @@ meta_unableToReadCache = Unable to create input stream for registry cache.
 registry_no_default = Extension tracker was unable to obtain Eclipse extension registry.
 registry_default_exists = Extension registry provider is already set.
 registry_bad_cache = Unable to use cached extension registry. It will be rebuilt from XML files.
+registry_non_multi_lang = The requested multi-language operation is not enabled. See runtime option "-registryMultiLanguage".  
 
 ### parsing/resolve
 parse_error = Parsing error: \"{0}\".
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java
index 620b63d..ae4b055 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -90,6 +90,8 @@ public class Activator implements BundleActivator {
 				RegistryProperties.setProperty(IRegistryConstants.PROP_NO_REGISTRY_CACHE, "true"); //$NON-NLS-1$
 			else if (args[i].equalsIgnoreCase(IRegistryConstants.NO_LAZY_REGISTRY_CACHE_LOADING))
 				RegistryProperties.setProperty(IRegistryConstants.PROP_NO_LAZY_CACHE_LOADING, "true"); //$NON-NLS-1$
+			else if (args[i].equalsIgnoreCase(IRegistryConstants.MULTI_LANGUAGE))
+				RegistryProperties.setProperty(IRegistryConstants.PROP_MULTI_LANGUAGE, "true"); //$NON-NLS-1$
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java
index 2ca53ea..6dfae41 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@ package org.eclipse.core.internal.registry.osgi;
 import java.io.File;
 import java.io.IOException;
 import java.net.URL;
+import java.util.Locale;
 import java.util.ResourceBundle;
 import javax.xml.parsers.SAXParserFactory;
 import org.eclipse.core.internal.registry.*;
 import org.eclipse.core.internal.runtime.ResourceTranslator;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.spi.*;
+import org.eclipse.osgi.service.localization.LocaleProvider;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -60,6 +62,11 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 	private ServiceTracker xmlTracker = null;
 
 	/**
+	 * Tracker for the LocaleProvider service
+	 */
+	private ServiceTracker localeTracker = null;
+
+	/**
 	 * Value of the query "should we track contributions timestamps" is cached
 	 * in this variable
 	 */
@@ -92,6 +99,13 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 		return ResourceTranslator.getResourceString(null, key, resources);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.spi.RegistryStrategy#translate(java.lang.String[], org.eclipse.core.runtime.IContributor, java.lang.String)
+	 */
+	public String[] translate(String[] nonTranslated, IContributor contributor, String locale) {
+		return ResourceTranslator.getResourceString(ContributorFactoryOSGi.resolve(contributor), nonTranslated, locale);
+	}
+
 	////////////////////////////////////////////////////////////////////////////////////////
 	// Use OSGi bundles for namespace resolution (contributors: plugins and fragments)
 
@@ -193,7 +207,7 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 	 */
 	public void onStart(IExtensionRegistry registry, boolean loadedFromCache) {
 		super.onStart(registry, loadedFromCache);
-		
+
 		if (!(registry instanceof ExtensionRegistry))
 			return;
 		// register a listener to catch new bundle installations/resolutions.
@@ -220,6 +234,10 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 			xmlTracker.close();
 			xmlTracker = null;
 		}
+		if (localeTracker != null) {
+			localeTracker.close();
+			localeTracker = null;
+		}
 		super.onStop(registry);
 	}
 
@@ -267,7 +285,7 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 		if (pluginManifest == null)
 			return 0;
 		try {
-			 return pluginManifest.openConnection().getLastModified() + bundle.getBundleId();
+			return pluginManifest.openConnection().getLastModified() + bundle.getBundleId();
 		} catch (IOException e) {
 			if (debug()) {
 				System.out.println("Unable to obtain timestamp for the bundle " + bundle.getSymbolicName()); //$NON-NLS-1$
@@ -287,4 +305,21 @@ public class RegistryStrategyOSGI extends RegistryStrategy {
 		}
 		return (SAXParserFactory) xmlTracker.getService();
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.spi.RegistryStrategy#getLocale()
+	 */
+	public String getLocale() {
+		if (localeTracker == null) {
+			localeTracker = new ServiceTracker(Activator.getContext(), LocaleProvider.class.getName(), null);
+			localeTracker.open();
+		}
+		LocaleProvider localeProvider = (LocaleProvider) localeTracker.getService();
+		if (localeProvider != null) {
+			Locale currentLocale = localeProvider.getLocale();
+			if (currentLocale != null)
+				return currentLocale.toString();
+		}
+		return super.getLocale();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/spi/ConfigurationElementAttribute.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/spi/ConfigurationElementAttribute.java
index fd9b2a1..9b7b069 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/spi/ConfigurationElementAttribute.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/spi/ConfigurationElementAttribute.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
  * It is expected that both attribute name and attribute value are not null.
  * </p>
  * <p>
- * This class can be instantited.
+ * This class can be instantiated.
  * </p>
  * <p>
  * This class is not intended to be subclassed.
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
index dffd5c9..e9c6c2b 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IConfigurationElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.core.runtime;
 
-
 /**
  * A configuration element, with its attributes and children, 
  * directly reflects the content and structure of the extension section
@@ -106,6 +105,27 @@ public interface IConfigurationElement {
 	public String getAttribute(String name) throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns the named attribute of this 
+	 * configuration element in the specified locale, or <code>null</code> if none. 
+	 * <p>
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getAttribute(String)}.
+	 * </p>
+	 * @param attrName the name of the attribute
+	 * @param locale the requested locale
+	 * @return attribute value, or <code>null</code> if none
+	 * @throws InvalidRegistryObjectException if this configuration element is no longer valid
+	 * @see #getAttribute(String)
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since org.eclipse.equinox.registry 3.5
+	 */
+	public String getAttribute(String attrName, String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns the named attribute of this configuration element, or
 	 * <code>null</code> if none. 
 	 * <p>
@@ -245,6 +265,27 @@ public interface IConfigurationElement {
 	public String getValue() throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns the text value of this 
+	 * configuration element in the specified locale, or <code>null</code> if none.
+	 * <p> 
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getValue()}.
+	 * </p>
+	 * @param locale the requested locale
+	 * @return the text value of this configuration element in the specified locale,
+	 * or <code>null</code>
+	 * @throws InvalidRegistryObjectException if this configuration element is no longer valid
+	 * @see #getValue(String)
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since org.eclipse.equinox.registry 3.5
+	 */
+	public String getValue(String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns the untranslated text value of this configuration element.
 	 * For example, the configuration markup 
 	 * <pre>
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
index 6a4ff25..67d746f 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -139,6 +139,27 @@ public interface IExtension {
 	public String getLabel() throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns a displayable label for this 
+	 * extension in the specified locale. Returns the empty string if no label for this extension
+	 * is specified in the plug-in manifest file.
+	 * <p> 
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getLabel()}.
+	 * </p>
+	 * @param locale the requested locale
+	 * @return a displayable string label for this extension,
+	 *    possibly the empty string
+	 * @throws InvalidRegistryObjectException if this extension is no longer valid
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since 3.5
+	 */
+	public String getLabel(String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns the simple identifier of this extension, or <code>null</code>
 	 * if this extension does not have an identifier.
 	 * This identifier is specified in the plug-in manifest (<code>plugin.xml</code>) 
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
index 5084995..d34e6e6 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionPoint.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -153,6 +153,28 @@ public interface IExtensionPoint {
 	public String getLabel() throws InvalidRegistryObjectException;
 
 	/**
+	 * When multi-language support is enabled, this method returns a displayable label 
+	 * for this extension point in the specified locale.
+	 * Returns the empty string if no label for this extension point
+	 * is specified in the plug-in manifest file.
+	 * <p> 
+	 * The locale matching tries to find the best match between available translations and 
+	 * the requested locale, falling back to a more generic locale ("en") when the specific 
+	 * locale ("en_US") is not available. 
+	 * </p><p>
+	 * If multi-language support is not enabled, this method is equivalent to the method 
+	 * {@link #getLabel()}.
+	 * </p>
+	 * @param locale the requested locale
+	 * @return a displayable string label for this extension point,
+	 *    possibly the empty string
+	 * @throws InvalidRegistryObjectException if this extension point is no longer valid
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since 3.5
+	 */
+	public String getLabel(String locale) throws InvalidRegistryObjectException;
+
+	/**
 	 * Returns reference to the extension point schema. The schema 
 	 * reference is returned as a URL path relative to the plug-in 
 	 * installation URL. 
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionRegistry.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionRegistry.java
index 65f7887..6437228 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionRegistry.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/IExtensionRegistry.java
@@ -384,7 +384,7 @@ public interface IExtensionRegistry {
 	 * Adds the given listener for registry change events. Listener will be notified
 	 * on changes to all extension points and underlying extensions.
 	 * <p>
-	 * Depending on activity, listners of this type might receive a large number 
+	 * Depending on activity, listeners of this type might receive a large number 
 	 * of modifications and negatively impact overall system performance. Whenever
 	 * possible, consider registering listener specific to an extension point rather
 	 * than a "global" listener.
@@ -396,7 +396,7 @@ public interface IExtensionRegistry {
 	 * This method has no effect if the listener is already registered. 
 	 * </p>
 	 * @param listener the listener
-	 * @since 3.4 
+	 * @since org.eclipse.equinox.registry 3.4 
 	 */
 	public void addListener(IRegistryEventListener listener);
 
@@ -413,7 +413,7 @@ public interface IExtensionRegistry {
 	 * @param listener the listener
 	 * @param extensionPointId the unique identifier of extension point
 	 * @see IExtensionPoint#getUniqueIdentifier()
-	 * @since 3.4 
+	 * @since org.eclipse.equinox.registry 3.4 
 	 */
 	public void addListener(IRegistryEventListener listener, String extensionPointId);
 
@@ -425,8 +425,19 @@ public interface IExtensionRegistry {
 	 * @param listener the listener
 	 * @see #addListener(IRegistryEventListener)
 	 * @see #addListener(IRegistryEventListener, String)
-	 * @since 3.4 
+	 * @since org.eclipse.equinox.registry 3.4 
 	 */
 	public void removeListener(IRegistryEventListener listener);
 
+	/**
+	 * Call this method to determine if this extension registry supports multiple languages.
+	 * <p>
+	 * See the runtime option "-registryMultiLanguage" for enabling multi-language
+	 * support.
+	 * </p>
+	 * @return <code>true</code> if multiple languages are supported by this 
+	 * instance of the extension registry; <code>false</code> otherwise.
+	 * @since org.eclipse.equinox.registry 3.5
+	 */
+	public boolean isMultiLanguage();
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/RegistryFactory.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/RegistryFactory.java
index ceaaf7e..ff83482 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/RegistryFactory.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/RegistryFactory.java
@@ -30,7 +30,6 @@ import org.eclipse.core.runtime.spi.RegistryStrategy;
  * </p>
  * @since org.eclipse.equinox.registry 3.2
  * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
  */
 public final class RegistryFactory {
 
diff --git a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/spi/RegistryStrategy.java b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/spi/RegistryStrategy.java
index 5611f4b..1c5bd0f 100644
--- a/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/spi/RegistryStrategy.java
+++ b/eclipse/plugins/org.eclipse.equinox.registry/src/org/eclipse/core/runtime/spi/RegistryStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,7 @@
 package org.eclipse.core.runtime.spi;
 
 import java.io.File;
-import java.util.Map;
-import java.util.ResourceBundle;
+import java.util.*;
 import javax.xml.parsers.SAXParserFactory;
 import org.eclipse.core.internal.registry.*;
 import org.eclipse.core.runtime.*;
@@ -33,12 +32,6 @@ import org.eclipse.osgi.util.NLS;
  * This class can be used without OSGi running.
  * </p><p>
  * This class can be overridden and/or instantiated by clients. 
- * </p><p>
- * <b>Note:</b> This class/interface is part of an interim API that is still under 
- * development and expected to change significantly before reaching stability. 
- * It is being made available at this early stage to solicit feedback from pioneering 
- * adopters on the understanding that any code that uses this API will almost certainly 
- * be broken (repeatedly) as the API evolves.
  * </p>
  * @since org.eclipse.equinox.registry 3.2
  */
@@ -55,7 +48,7 @@ public class RegistryStrategy {
 	 * Specifies if the registry file cache is read only; might be <code>null</code>
 	 */
 	private final boolean[] cacheReadOnly;
-	
+
 	/**
 	 * Constructor for this default registry strategy. 
 	 * <p>
@@ -168,7 +161,7 @@ public class RegistryStrategy {
 	public void onStart(IExtensionRegistry registry) {
 		// The default implementation
 	}
-	
+
 	/**
 	 * Override this method to provide additional processing performed 
 	 * when the registry is created and started. Overrides should call
@@ -370,7 +363,7 @@ public class RegistryStrategy {
 	 * </p><p>
 	 * This method may return 0 to indicate that no time stamp verification is required. 
 	 * </p>
-	 * @return a value corresponding to the last mofification time of contributions contained
+	 * @return a value corresponding to the last modification time of contributions contained
 	 * in the registry 
 	 */
 	public long getContributionsTimestamp() {
@@ -389,4 +382,48 @@ public class RegistryStrategy {
 			theXMLParserFactory = SAXParserFactory.newInstance();
 		return theXMLParserFactory;
 	}
+
+	/**
+	 * Translates array of keys supplied by the contributor to the requested locale.
+	 * <p>
+	 * This method is intended to be overridden by specialized registry strategies 
+	 * that know translation conventions for the contributors, for instance, 
+	 * the agreed upon locations of the translated keys for bundle contributors.
+	 * The base implementation simply returns the array of non-translated keys. 
+	 * </p><p>
+	 * This method is only used if multi-language support is enabled.
+	 * </p>
+	 * @param nonTranslated message keys to be translated
+	 * @param contributor the contributor of the keys to be translated
+	 * @param locale the requested locale for the keys
+	 * @return the arrays of translated strings
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @since org.eclipse.equinox.registry 3.5
+	 */
+	public String[] translate(String[] nonTranslated, IContributor contributor, String locale) {
+		return nonTranslated;
+	}
+
+	/**
+	 * Returns the current locale for the extension registry with enabled 
+	 * multi-language support.
+	 * <p>
+	 * The default implementation assumes that there is a single system wide 
+	 * locale, equivalent to {@link Locale#getDefault()}.
+	 * </p><p>
+	 * The result of this method should not be retained or passed to other threads.  
+	 * The current locale can change any time and may be different for each thread.
+	 * </p><p>
+	 * This method can be overridden by subclasses that wish to provide a way 
+	 * to change the default locale. 
+	 * </p><p>
+	 * This method is only used if multi-language support is enabled.
+	 * </p>
+	 * @see IExtensionRegistry#isMultiLanguage()
+	 * @return the default locale
+	 * @since org.eclipse.equinox.registry 3.5
+	 */
+	public String getLocale() {
+		return Locale.getDefault().toString();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.security.macosx/.project b/eclipse/plugins/org.eclipse.equinox.security.macosx/.project
index 0353de1..7a9d788 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.macosx/.project
+++ b/eclipse/plugins/org.eclipse.equinox.security.macosx/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.security.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.security.macosx/META-INF/MANIFEST.MF
index b79f945..404e477 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.security.macosx/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.equinox.security.macosx;singleton:=true
-Bundle-Version: 1.100.0.qualifier
+Bundle-Version: 1.100.100.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
index 52fb16e..287b112 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.security.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.security.ui;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Import-Package: javax.crypto.spec,
diff --git a/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.properties b/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.properties
index bad8c2e..929b9de 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.properties
@@ -21,3 +21,6 @@ storage = Secure Storage
 uiPasswordProviderName = UI Prompt
 providerDescription = The provider brings up a secure storage login dialog for the user to input the \'master\' password. This provider does not persist the \'master\' password in any way but relies on the user to input it.
 systemSummaryTitle = Security Configuration
+keywordPassword = password
+keywordUsername = username
+keywordLogin = login
diff --git a/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.xml b/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.xml
index b450fa7..7f9233e 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.equinox.security.ui/plugin.xml
@@ -28,6 +28,15 @@
          class="org.eclipse.equinox.internal.security.ui.storage.StoragePreferencePage"
          id="org.eclipse.equinox.security.ui.storage"
          category="org.eclipse.equinox.security.ui.category">
+         <keywordReference
+               id="org.eclipse.equinox.security.ui.keywordPassword">
+         </keywordReference>
+         <keywordReference
+               id="org.eclipse.equinox.security.ui.keywordUsername">
+         </keywordReference>
+         <keywordReference
+               id="org.eclipse.equinox.security.ui.keywordLogin">
+         </keywordReference>
       </page>
    </extension>
 
@@ -76,5 +85,20 @@
             sectionTitle="%systemSummaryTitle">
       </section>
    </extension>
-   
+   <extension
+         point="org.eclipse.ui.keywords">
+      <keyword
+            id="org.eclipse.equinox.security.ui.keywordPassword"
+            label="%keywordPassword">
+      </keyword>
+      <keyword
+            id="org.eclipse.equinox.security.ui.keywordUsername"
+            label="%keywordUsername">
+      </keyword>
+      <keyword
+            id="org.eclipse.equinox.security.ui.keywordLogin"
+            label="%keywordLogin">
+      </keyword>
+   </extension>
+    
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.equinox.security.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.security.win32.x86/META-INF/MANIFEST.MF
index d4b3027..2a011c8 100644
--- a/eclipse/plugins/org.eclipse.equinox.security.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.security.win32.x86/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.equinox.security.win32.x86;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.equinox.security;bundle-version="[1.0.0,2.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.equinox.security/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.security/META-INF/MANIFEST.MF
index 92c9a72..c19ccd0 100644
--- a/eclipse/plugins/org.eclipse.equinox.security/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.security/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.security;singleton:=true
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-Activator: org.eclipse.equinox.internal.security.auth.AuthPlugin
diff --git a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
index d978f1a..7e3e397 100644
--- a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
+++ b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
@@ -29,6 +29,7 @@ public class SecAuthMessages extends NLS {
 	public static String startFirst;
 	public static String stopFirst;
 	public static String unsupoprtedCharEncoding;
+	public static String badStorageURL;
 
 	// Configuration provider
 	public static String unexpectedConfigElement;
diff --git a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
index f877743..b4603e1 100644
--- a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
@@ -22,6 +22,7 @@ loginFailure = Failed to log in.
 startFirst = Secure platform is not running. Make sure that secure platform is started.
 stopFirst = Secure platform is already running. Make sure that secure platform is stopped first.
 unsupoprtedCharEncoding = Default secure storage encoding \"{0}\" is not supported by the Java virtual machine.
+badStorageURL = Unable to resolve secure storage location \"{0}\".
 
 ## Configuration provider
 invalidConfigURL = Invalid URL \"{0}\" specified by \"{1}\" for Configuration provider.
diff --git a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
index c682219..aa777a8 100644
--- a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
+++ b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
@@ -68,7 +68,7 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage
 
 	static private ILock lock = Job.getJobManager().newLock();
 
-	final private URL location;
+	private URL location;
 
 	private long timestamp = 0;
 
@@ -112,6 +112,11 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage
 				properties.load(is);
 				timestamp = getLastModified();
 			}
+		} catch (IllegalArgumentException e) {
+			String msg = NLS.bind(SecAuthMessages.badStorageURL, location.toString());
+			AuthPlugin.getDefault().logError(msg, e);
+			location = null; // don't attempt to use it 
+			return;
 		} finally {
 			if (is != null)
 				is.close();
@@ -357,6 +362,13 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage
 		SecurePreferences node = node(PASSWORD_VERIFICATION_NODE);
 		node.internalPut(key, encryptedValue.toString());
 		markModified();
+		try {
+			flush();
+		} catch (IOException e) {
+			String msg = NLS.bind(SecAuthMessages.encryptingError, key, PASSWORD_VERIFICATION_NODE);
+			AuthPlugin.getDefault().logError(msg, e);
+			return false;
+		}
 
 		// store password in the memory cache
 		cachePassword(key, passwordExt);
diff --git a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SlashEncode.java b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SlashEncode.java
index 623d8c8..564bab0 100644
--- a/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SlashEncode.java
+++ b/eclipse/plugins/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SlashEncode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,8 +33,6 @@ final public class SlashEncode {
 	static public String decode(String str) {
 		if (str == null)
 			return null;
-		if (str == null)
-			return null;
 		int size = str.length();
 		if (size == 0)
 			return str;
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.classpath b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.classpath
new file mode 100644
index 0000000..acad1c2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.project b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.project
new file mode 100644
index 0000000..34079a6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.servletbridge.extensionbundle</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..29f9a83
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,25 @@
+#Tue Oct 06 22:52:35 EDT 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8257196
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Servletbridge Extension bundle
+Bundle-SymbolicName: org.eclipse.equinox.servletbridge.extensionbundle
+Bundle-Version: 1.2.0.qualifier
+Fragment-Host: system.bundle; extension:=framework
+X-Deploy-Export-Package: javax.servlet;version="2.5",
+ javax.servlet.http;version ="2.5",
+ javax.servlet.resources;version="2.5",
+ org.eclipse.equinox.servletbridge;version="1.1"
+
+
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/p2.inf b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/p2.inf
new file mode 100644
index 0000000..c82a8c2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/META-INF/p2.inf
@@ -0,0 +1,12 @@
+provides.0.namespace = java.package
+provides.0.name = javax.servlet
+provides.0.version = 2.5
+provides.1.namespace = java.package
+provides.1.name = javax.servlet.http
+provides.1.version = 2.5
+provides.2.namespace = java.package
+provides.2.name = javax.servlet.resources
+provides.2.version = 2.5
+provides.3.namespace = java.package
+provides.3.name = org.eclipse.equinox.servletbridge
+provides.3.version = 1.1
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/about.html b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/about.html
new file mode 100644
index 0000000..ac6552e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>January 12, 2010</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/build.properties b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/build.properties
new file mode 100644
index 0000000..2c5a690
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge.extensionbundle/build.properties
@@ -0,0 +1,3 @@
+bin.includes = META-INF/,\
+               about.html
+src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
index 03e3677..dc797cf 100644
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge/META-INF/MANIFEST.MF
@@ -1,13 +1,12 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
-Bundle-Vendor: %bundleProvider
+Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.servletbridge;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Localization: plugin
 Import-Package: javax.servlet;version="2.3.0",
  javax.servlet.http;version="2.3.0"
 Export-Package: org.eclipse.equinox.servletbridge;version="1.1.0"
-Bundle-ClassPath: servletbridge.jar
 Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
  J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/build.properties b/eclipse/plugins/org.eclipse.equinox.servletbridge/build.properties
index b9d52a5..215a3ac 100644
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge/build.properties
@@ -9,12 +9,9 @@
 #      IBM Corporation - initial API and implementation
 ###############################################################################
 bin.includes = META-INF/,\
-               servletbridge.jar,\
-               scripts/,\
-               templates/,\
                about.html,\
-               plugin.properties
-source.servletbridge.jar = src/
-output.servletbridge.jar = bin/
-jars.compile.order = servletbridge.jar
+               plugin.properties,\
+               .
+source.. = src/
+output.. = bin/
 src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/scripts/webappBuilder.xml b/eclipse/plugins/org.eclipse.equinox.servletbridge/scripts/webappBuilder.xml
deleted file mode 100644
index e0601b8..0000000
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/scripts/webappBuilder.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0"?>
-<project name="project" default="default">	
-	<description>
-            Webapp Builder
-    </description>
-
-	<!-- ================================= 
-          target: default              
-         ================================= -->
-	<target name="init">
-    	<property name="proj.dir" value="${basedir}/.."/>
-		<!-- 
-		On windows be cautious about long file names for ${build.dir}
-		These long path problems were resolved in JRE 1.5.0_08
-		-->
-    	<property name="build.dir" value="${proj.dir}/build"/>
-    	<property name="templates.dir" value="${proj.dir}/templates"/>
-		<property name="webapp.name" value="bridge"/>
-		<!-- 
-		the servletbridge feature can be found in the eclipse depot 
-		Repository Path: /cvsroot/eclipse
-		Module: equinox-incubator/org.eclipse.equinox.servletbridge.feature
-		--> 
-		<property name="features" value="org.eclipse.equinox.servletbridge.feature"/>
-		<available file="${proj.dir}/servletbridge.jar" property="servletbridge.jar-present"/>
-		<!--
-		If you are using this script in a head-less build define the following properties:
-		"ignore.pdeExportFeatures" (available only in the IDE - do the feature export with PDE Build)
-		"ignore.servletbridge.jar" (if you're compiling or extracting the jar yourself)
-		-->
-	</target>
-
-	<!-- ================================= 
-          target: prepare              
-         ================================= -->	
-	<target name="prepare" depends="init">
-		<delete dir="${build.dir}/${webapp.name}"/>
-		<mkdir dir="${build.dir}/${webapp.name}/WEB-INF/lib"/>
-	</target>
-	<!-- ================================= 
-          target: default              
-         ================================= -->
-	<target name="default" depends="copyResources, servletbridge.jar, pdeExportFeatures"/>
-	
-	<!-- ================================= 
-          target: copyResources              
-         ================================= -->	
-	<target name="copyResources" depends="prepare">
-		<copy todir="${build.dir}/${webapp.name}">
-			<fileset dir="${templates.dir}"/>
-		</copy>
-	</target>
-	
-	<!-- ================================= 
-          target: servletbridge.jar              
-         ================================= -->	
-	<target name="servletbridge.jar" depends="prepare" unless="ignore.servletbridge.jar">
-		<antcall target="jar-servletbridge.jar" />
-		<antcall target="copy-servletbridge.jar"/>
-	</target>
-
-	<!-- ================================= 
-          target: copy-servletbridge.jar              
-         ================================= -->	
-	<target name="copy-servletbridge.jar" if="servletbridge.jar-present">
-		<copy todir="${build.dir}/${webapp.name}/WEB-INF/lib">
-			<fileset file="${proj.dir}/servletbridge.jar"/>
-		</copy>
-	</target>
-	
-	<!-- ================================= 
-          target: jar-servletbridge.jar              
-         ================================= -->	
-	<target name="jar-servletbridge.jar" unless="servletbridge.jar-present">
-		<jar destfile="${build.dir}/${webapp.name}/WEB-INF/lib/servletbridge.jar">
-			<fileset dir="${proj.dir}/bin">
-				<include name="**/*.class"/>
-			</fileset>
-		</jar>
-	</target>
-	
-	<!-- ================================= 
-          target: pdeExportFeatures              
-         ================================= -->		
-	<target name="pdeExportFeatures" depends="prepare" unless="ignore.pdeExportFeatures">
-		<!-- 
-		Features get built asynchronously but this approach is sometimes convenient.
-		So that the pde.exportFeatures task is available in the IDE select 
-		"Run in the same JRE as the workspace" from the JRE tab from "Run Ant.."
-		--> 
-		<pde.exportFeatures
-			features="${features}"
-			destination="${build.dir}/${webapp.name}/WEB-INF/eclipse"
-			exportType="directory" 
-			useJARFormat="false"
-			exportSource="false"
-		/>
-	</target>
-</project>
-
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java b/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
index a1022e2..a86b091 100644
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/BridgeServlet.java
@@ -138,8 +138,8 @@ public class BridgeServlet extends HttpServlet {
 
 	/**
 	 * serviceFrameworkControls currently supports the following commands (identified by the request's pathinfo)
-	 * sp_deploy - Copies the contents of /platform to the install area 
-	 * sp_undeploy - Removes the copy of Eclipse from the install area
+	 * sp_deploy - Copies the contents of the Equinox application to the install area 
+	 * sp_undeploy - Removes the copy of the Equinox application from the install area
 	 * sp_redeploy - Resets the platform (e.g. stops, undeploys, deploys, starts)
 	 * sp_start - Starts a deployed platform
 	 * sp_stop - Stops the platform 
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
index ffdd512..598efda 100644
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
+++ b/eclipse/plugins/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
@@ -38,6 +38,9 @@ import javax.servlet.ServletContext;
  */
 public class FrameworkLauncher {
 
+	private static final String REFERENCE_SCHEME = "reference:"; //$NON-NLS-1$
+	private static final String CONFIG_INI = "config.ini"; //$NON-NLS-1$
+	private static final String DOT_JAR = ".jar"; //$NON-NLS-1$
 	private static final String WS_DELIM = " \t\n\r\f"; //$NON-NLS-1$
 	protected static final String FILE_SCHEME = "file:"; //$NON-NLS-1$
 	protected static final String FRAMEWORK_BUNDLE_NAME = "org.eclipse.osgi"; //$NON-NLS-1$
@@ -45,6 +48,7 @@ public class FrameworkLauncher {
 	protected static final String FRAMEWORKPROPERTIES = "org.eclipse.osgi.framework.internal.core.FrameworkProperties"; //$NON-NLS-1$
 	protected static final String NULL_IDENTIFIER = "@null"; //$NON-NLS-1$
 	protected static final String OSGI_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
+	protected static final String OSGI_FRAMEWORK_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$
 	protected static final String OSGI_INSTANCE_AREA = "osgi.instance.area"; //$NON-NLS-1$
 	protected static final String OSGI_CONFIGURATION_AREA = "osgi.configuration.area"; //$NON-NLS-1$
 	protected static final String OSGI_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
@@ -53,6 +57,8 @@ public class FrameworkLauncher {
 	protected static final String ECLIPSE = "eclipse/"; //$NON-NLS-1$
 	protected static final String LAUNCH_INI = "launch.ini"; //$NON-NLS-1$
 
+	private static final String EXTENSIONBUNDLE_DEFAULT_BSN = "org.eclipse.equinox.servletbridge.extensionbundle"; //$NON-NLS-1$
+	private static final String EXTENSIONBUNDLE_DEFAULT_VERSION = "1.2.0"; //$NON-NLS-1$
 	private static final String MANIFEST_VERSION = "Manifest-Version"; //$NON-NLS-1$
 	private static final String BUNDLE_MANIFEST_VERSION = "Bundle-ManifestVersion"; //$NON-NLS-1$
 	private static final String BUNDLE_NAME = "Bundle-Name"; //$NON-NLS-1$
@@ -186,25 +192,67 @@ public class FrameworkLauncher {
 	 * Additional exports can be added by using the "extendedFrameworkExports" initial-param in the ServletConfig
 	 */
 	private void deployExtensionBundle(File plugins) {
-		File extensionBundle = new File(plugins, "org.eclipse.equinox.servletbridge.extensionbundle_1.0.0.jar"); //$NON-NLS-1$
-		File extensionBundleDir = new File(plugins, "org.eclipse.equinox.servletbridge.extensionbundle_1.0.0"); //$NON-NLS-1$
-		if (Boolean.valueOf(config.getInitParameter(CONFIG_OVERRIDE_AND_REPLACE_EXTENSION_BUNDLE)).booleanValue()) {
-			extensionBundle.delete();
-			deleteDirectory(extensionBundleDir);
-		} else if (extensionBundle.exists() || extensionBundleDir.isDirectory())
-			return;
+		// we might want to parameterize the extension bundle BSN in the future
+		final String extensionBundleBSN = EXTENSIONBUNDLE_DEFAULT_BSN;
+		File extensionBundleFile = findExtensionBundleFile(plugins, extensionBundleBSN);
+
+		if (extensionBundleFile == null)
+			generateExtensionBundle(plugins, extensionBundleBSN, EXTENSIONBUNDLE_DEFAULT_VERSION);
+		else if (Boolean.valueOf(config.getInitParameter(CONFIG_OVERRIDE_AND_REPLACE_EXTENSION_BUNDLE)).booleanValue()) {
+			String extensionBundleVersion = findExtensionBundleVersion(extensionBundleFile, extensionBundleBSN);
+			if (extensionBundleFile.isDirectory()) {
+				deleteDirectory(extensionBundleFile);
+			} else {
+				extensionBundleFile.delete();
+			}
+			generateExtensionBundle(plugins, extensionBundleBSN, extensionBundleVersion);
+		} else {
+			processExtensionBundle(extensionBundleFile);
+		}
+	}
+
+	private File findExtensionBundleFile(File plugins, final String extensionBundleBSN) {
+		FileFilter extensionBundleFilter = new FileFilter() {
+			public boolean accept(File candidate) {
+				return candidate.getName().startsWith(extensionBundleBSN + "_"); //$NON-NLS-1$
+			}
+		};
+		File[] extensionBundles = plugins.listFiles(extensionBundleFilter);
+		if (extensionBundles.length == 0)
+			return null;
 
+		if (extensionBundles.length > 1) {
+			for (int i = 1; i < extensionBundles.length; i++) {
+				if (extensionBundles[i].isDirectory()) {
+					deleteDirectory(extensionBundles[i]);
+				} else {
+					extensionBundles[i].delete();
+				}
+			}
+		}
+		return extensionBundles[0];
+	}
+
+	private String findExtensionBundleVersion(File extensionBundleFile, String extensionBundleBSN) {
+		String fileName = extensionBundleFile.getName();
+		if (fileName.endsWith(DOT_JAR)) {
+			return fileName.substring(extensionBundleBSN.length() + 1, fileName.length() - DOT_JAR.length());
+		}
+		return fileName.substring(extensionBundleBSN.length() + 1);
+	}
+
+	private void generateExtensionBundle(File plugins, String extensionBundleBSN, String extensionBundleVersion) {
 		Manifest mf = new Manifest();
 		Attributes attribs = mf.getMainAttributes();
 		attribs.putValue(MANIFEST_VERSION, "1.0"); //$NON-NLS-1$
 		attribs.putValue(BUNDLE_MANIFEST_VERSION, "2"); //$NON-NLS-1$
 		attribs.putValue(BUNDLE_NAME, "Servletbridge Extension Bundle"); //$NON-NLS-1$
-		attribs.putValue(BUNDLE_SYMBOLIC_NAME, "org.eclipse.equinox.servletbridge.extensionbundle"); //$NON-NLS-1$
-		attribs.putValue(BUNDLE_VERSION, "1.0.0"); //$NON-NLS-1$
+		attribs.putValue(BUNDLE_SYMBOLIC_NAME, extensionBundleBSN);
+		attribs.putValue(BUNDLE_VERSION, extensionBundleVersion);
 		attribs.putValue(FRAGMENT_HOST, "system.bundle; extension:=framework"); //$NON-NLS-1$
 
 		String servletVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$
-		String packageExports = "org.eclipse.equinox.servletbridge; version=1.0" + //$NON-NLS-1$
+		String packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$
 				", javax.servlet; version=" + servletVersion + //$NON-NLS-1$
 				", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$
 				", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$
@@ -214,21 +262,55 @@ public class FrameworkLauncher {
 			packageExports += ", " + extendedExports; //$NON-NLS-1$
 
 		attribs.putValue(EXPORT_PACKAGE, packageExports);
+		writeJarFile(new File(plugins, extensionBundleBSN + "_" + extensionBundleVersion + DOT_JAR), mf); //$NON-NLS-1$
+	}
 
+	private void processExtensionBundle(File extensionBundleFile) {
+		String fileName = extensionBundleFile.getName();
+		if (fileName.endsWith(DOT_JAR)) {
+			Manifest mf = readJarFile(extensionBundleFile);
+			if (mf == null)
+				return;
+			Attributes attributes = mf.getMainAttributes();
+			String exportPackage = (String) attributes.remove(new Attributes.Name("X-Deploy-Export-Package")); //$NON-NLS-1$
+			if (exportPackage != null) {
+				attributes.putValue("Export-Package", exportPackage); //$NON-NLS-1$
+				writeJarFile(extensionBundleFile, mf);
+			}
+		}
+	}
+
+	private void writeJarFile(File jarFile, Manifest mf) {
 		try {
 			JarOutputStream jos = null;
 			try {
-				jos = new JarOutputStream(new FileOutputStream(extensionBundle), mf);
+				jos = new JarOutputStream(new FileOutputStream(jarFile), mf);
 				jos.finish();
 			} finally {
 				if (jos != null)
 					jos.close();
 			}
 		} catch (IOException e) {
-			context.log("Error generating extension bundle", e); //$NON-NLS-1$
+			context.log("Error writing extension bundle", e); //$NON-NLS-1$
 		}
 	}
 
+	private Manifest readJarFile(File jarFile) {
+		try {
+			JarInputStream jis = null;
+			try {
+				jis = new JarInputStream(new FileInputStream(jarFile));
+				return jis.getManifest();
+			} finally {
+				if (jis != null)
+					jis.close();
+			}
+		} catch (IOException e) {
+			context.log("Error reading extension bundle", e); //$NON-NLS-1$
+		}
+		return null;
+	}
+
 	/** undeploy is the reverse operation of deploy and removes the OSGi framework libraries from their
 	 * execution location. Typically this method will only be called if a manual undeploy is requested in the 
 	 * ServletBridge.
@@ -268,19 +350,36 @@ public class FrameworkLauncher {
 			return;
 		}
 
-		Map initalPropertyMap = buildInitialPropertyMap();
+		Map initialPropertyMap = buildInitialPropertyMap();
 		String[] args = buildCommandLineArguments();
 
+		// Handle commandline -D properties
+		for (int i = 0; i < args.length; i++) {
+			String arg = args[i];
+			if (arg.startsWith("-D")) { //$NON-NLS-1$
+				int equalsIndex = arg.indexOf('=');
+				if (equalsIndex == -1) {
+					initialPropertyMap.put(arg.substring(2), ""); //$NON-NLS-1$
+				} else {
+					String key = arg.substring(2, equalsIndex);
+					String value = arg.substring(equalsIndex + 1);
+					if (value.startsWith("\"") && value.endsWith("\"")) //$NON-NLS-1$//$NON-NLS-2$
+						value = value.substring(1, value.length() - 1);
+					setInitialProperty(initialPropertyMap, key, value);
+				}
+			}
+		}
+
 		ClassLoader original = Thread.currentThread().getContextClassLoader();
 		try {
 			System.setProperty("osgi.framework.useSystemProperties", "false"); //$NON-NLS-1$ //$NON-NLS-2$
 
-			URL[] osgiURLArray = {new URL((String) initalPropertyMap.get(OSGI_FRAMEWORK))};
-			frameworkClassLoader = new ChildFirstURLClassLoader(osgiURLArray, this.getClass().getClassLoader());
+			URL[] frameworkURLs = findFrameworkURLs(initialPropertyMap);
+			frameworkClassLoader = new ChildFirstURLClassLoader(frameworkURLs, this.getClass().getClassLoader());
 			Class clazz = frameworkClassLoader.loadClass(STARTER);
 
 			Method setInitialProperties = clazz.getMethod("setInitialProperties", new Class[] {Map.class}); //$NON-NLS-1$
-			setInitialProperties.invoke(null, new Object[] {initalPropertyMap});
+			setInitialProperties.invoke(null, new Object[] {initialPropertyMap});
 
 			registerRestartHandler(clazz);
 
@@ -302,6 +401,85 @@ public class FrameworkLauncher {
 		}
 	}
 
+	private URL[] findFrameworkURLs(Map initialPropertyMap) {
+		List frameworkURLs = new ArrayList();
+		String installArea = (String) initialPropertyMap.get(OSGI_INSTALL_AREA);
+		if (installArea.startsWith(FILE_SCHEME)) {
+			installArea = installArea.substring(FILE_SCHEME.length());
+		}
+		File installBase = new File(installArea);
+
+		// OSGi framework
+		String osgiFramework = (String) initialPropertyMap.get(OSGI_FRAMEWORK);
+		File osgiFrameworkFile = null;
+		if (osgiFramework == null) {
+			// search for osgi.framework in osgi.install.area
+			String path = new File(installBase, "plugins").toString(); //$NON-NLS-1$
+			path = searchFor(FRAMEWORK_BUNDLE_NAME, path);
+			if (path == null)
+				throw new RuntimeException("Could not find framework"); //$NON-NLS-1$
+
+			osgiFrameworkFile = new File(path);
+		} else {
+			if (osgiFramework.startsWith(FILE_SCHEME)) {
+				osgiFramework = osgiFramework.substring(FILE_SCHEME.length());
+			}
+			osgiFrameworkFile = new File(osgiFramework);
+			if (!osgiFrameworkFile.isAbsolute())
+				osgiFrameworkFile = new File(installBase, osgiFramework);
+		}
+
+		try {
+			URL frameworkURL = osgiFrameworkFile.toURL();
+			frameworkURLs.add(frameworkURL);
+			// ensure the framework URL is absolute
+			initialPropertyMap.put(OSGI_FRAMEWORK, frameworkURL.toExternalForm());
+		} catch (MalformedURLException e) {
+			throw new RuntimeException("Could not find framework -- " + e.getMessage()); //$NON-NLS-1$
+		}
+
+		// OSGi framework extensions
+		String osgiFrameworkExtensions = (String) initialPropertyMap.get(OSGI_FRAMEWORK_EXTENSIONS);
+		if (osgiFrameworkExtensions != null) {
+			StringTokenizer tokenizer = new StringTokenizer(osgiFrameworkExtensions, ",");
+			while (tokenizer.hasMoreTokens()) {
+				String extension = tokenizer.nextToken().trim();
+				if (extension.length() == 0)
+					continue;
+
+				URL extensionURL = findExtensionURL(extension, osgiFrameworkFile);
+				if (extensionURL != null) {
+					frameworkURLs.add(extensionURL);
+				}
+			}
+		}
+		return (URL[]) frameworkURLs.toArray(new URL[frameworkURLs.size()]);
+	}
+
+	private URL findExtensionURL(String extension, File osgiFrameworkFile) {
+		File extensionFile = null;
+		if (extension.startsWith(REFERENCE_SCHEME)) {
+			extension = extension.substring(REFERENCE_SCHEME.length());
+			if (!extension.startsWith(FILE_SCHEME))
+				throw new RuntimeException("Non-file scheme for framework extension URL -- " + extension); //$NON-NLS-1$
+			extension = extension.substring(FILE_SCHEME.length());
+			extensionFile = new File(extension);
+			if (!extensionFile.isAbsolute())
+				extensionFile = new File(osgiFrameworkFile.getParentFile(), extension);
+		} else {
+			String fullExtensionPath = searchFor(extension, osgiFrameworkFile.getParent());
+			if (fullExtensionPath == null)
+				return null;
+			extensionFile = new File(fullExtensionPath);
+		}
+
+		try {
+			return extensionFile.toURL();
+		} catch (MalformedURLException e) {
+			throw new RuntimeException("Could not find framework extension -- " + extensionFile.getAbsolutePath() + " : " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
 	private void registerRestartHandler(Class starterClazz) throws NoSuchMethodException, ClassNotFoundException, IllegalAccessException, InvocationTargetException {
 		Method registerFrameworkShutdownHandler = null;
 		try {
@@ -353,14 +531,7 @@ public class FrameworkLauncher {
 			Map.Entry entry = (Map.Entry) it.next();
 			String key = (String) entry.getKey();
 			String value = (String) entry.getValue();
-			if (key.endsWith("*")) { //$NON-NLS-1$
-				if (value.equals(NULL_IDENTIFIER)) {
-					clearPrefixedSystemProperties(key.substring(0, key.length() - 1), initialPropertyMap);
-				}
-			} else if (value.equals(NULL_IDENTIFIER))
-				initialPropertyMap.put(key, null);
-			else
-				initialPropertyMap.put(entry.getKey(), entry.getValue());
+			setInitialProperty(initialPropertyMap, key, value);
 		}
 
 		try {
@@ -386,22 +557,23 @@ public class FrameworkLauncher {
 				initialPropertyMap.put(OSGI_INSTANCE_AREA, workspaceDirectory.toURL().toExternalForm());
 			}
 
+			// read values from config.ini
+			Properties configurationProperties = loadConfigurationFile(initialPropertyMap);
+
 			// osgi.framework if not specified
 			if (initialPropertyMap.get(OSGI_FRAMEWORK) == null) {
-				// search for osgi.framework in osgi.install.area
-				String installArea = (String) initialPropertyMap.get(OSGI_INSTALL_AREA);
-
-				// only support file type URLs for install area
-				if (installArea.startsWith(FILE_SCHEME))
-					installArea = installArea.substring(FILE_SCHEME.length());
-
-				String path = new File(installArea, "plugins").toString(); //$NON-NLS-1$
-				path = searchFor(FRAMEWORK_BUNDLE_NAME, path);
-				if (path == null)
-					throw new RuntimeException("Could not find framework"); //$NON-NLS-1$
+				String osgiFramework = configurationProperties.getProperty(OSGI_FRAMEWORK);
+				if (osgiFramework != null)
+					initialPropertyMap.put(OSGI_FRAMEWORK, osgiFramework);
+			}
 
-				initialPropertyMap.put(OSGI_FRAMEWORK, new File(path).toURL().toExternalForm());
+			// osgi.framework.extensions if not specified
+			if (initialPropertyMap.get(OSGI_FRAMEWORK_EXTENSIONS) == null) {
+				String osgiFrameworkExtensions = configurationProperties.getProperty(OSGI_FRAMEWORK_EXTENSIONS);
+				if (osgiFrameworkExtensions != null)
+					initialPropertyMap.put(OSGI_FRAMEWORK_EXTENSIONS, osgiFrameworkExtensions);
 			}
+
 		} catch (MalformedURLException e) {
 			throw new RuntimeException("Error establishing location"); //$NON-NLS-1$
 		}
@@ -409,6 +581,56 @@ public class FrameworkLauncher {
 		return initialPropertyMap;
 	}
 
+	private void setInitialProperty(Map initialPropertyMap, String key, String value) {
+		if (key.endsWith("*")) { //$NON-NLS-1$
+			if (value.equals(NULL_IDENTIFIER)) {
+				clearPrefixedSystemProperties(key.substring(0, key.length() - 1), initialPropertyMap);
+			}
+		} else if (value.equals(NULL_IDENTIFIER))
+			initialPropertyMap.put(key, null);
+		else
+			initialPropertyMap.put(key, value);
+	}
+
+	private Properties loadConfigurationFile(Map initialPropertyMap) {
+		InputStream is = null;
+		try {
+			String installArea = (String) initialPropertyMap.get(OSGI_INSTALL_AREA);
+			if (installArea.startsWith(FILE_SCHEME)) {
+				installArea = installArea.substring(FILE_SCHEME.length());
+			}
+			File installBase = new File(installArea);
+
+			String configurationArea = (String) initialPropertyMap.get(OSGI_CONFIGURATION_AREA);
+			if (configurationArea.startsWith(FILE_SCHEME)) {
+				configurationArea = configurationArea.substring(FILE_SCHEME.length());
+			}
+			File configurationBase = new File(configurationArea);
+			if (!configurationBase.isAbsolute())
+				configurationBase = new File(installBase, configurationArea);
+
+			File configurationFile = new File(configurationBase, CONFIG_INI);
+			if (!configurationFile.exists())
+				return null;
+
+			Properties configProperties = new Properties();
+			is = new BufferedInputStream(new FileInputStream(configurationFile));
+			configProperties.load(is);
+			return configProperties;
+		} catch (Throwable t) {
+			context.log("Error reading configuration file -- " + t.toString()); //$NON-NLS-1$
+			return null;
+		} finally {
+			if (is != null)
+				try {
+					is.close();
+				} catch (IOException e) {
+					// unexpected
+					e.printStackTrace();
+				}
+		}
+	}
+
 	/**
 	 * clearPrefixedSystemProperties clears System Properties by writing null properties in the targetPropertyMap that match a prefix
 	 */
@@ -457,6 +679,15 @@ public class FrameworkLauncher {
 						// skip to next whitespace separated token
 						tokenizer.nextToken(WS_DELIM);
 					}
+				} else if (arg.startsWith("-D")) { //$NON-NLS-1$
+					int matchIndex = arg.indexOf("=\""); //$NON-NLS-1$
+					if (matchIndex != -1) {
+						if (!arg.substring(matchIndex + 2).endsWith("\"") && tokenizer.hasMoreTokens()) { //$NON-NLS-1$
+							arg += tokenizer.nextToken("\"") + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+							// skip to next whitespace separated token
+							tokenizer.nextToken(WS_DELIM);
+						}
+					}
 				}
 				args.add(arg);
 			}
@@ -715,7 +946,7 @@ public class FrameworkLauncher {
 	 * qualifier). Note, that returning anything else will cause exceptions in the caller.
 	 */
 	private Object[] getVersionElements(String version) {
-		if (version.endsWith(".jar")) //$NON-NLS-1$
+		if (version.endsWith(DOT_JAR))
 			version = version.substring(0, version.length() - 4);
 		Object[] result = {new Integer(0), new Integer(0), new Integer(0), ""}; //$NON-NLS-1$
 		StringTokenizer t = new StringTokenizer(version, "."); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/.eclipseproduct b/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/.eclipseproduct
deleted file mode 100644
index e69de29..0000000
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/configuration/config.ini b/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/configuration/config.ini
deleted file mode 100644
index e7061ba..0000000
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/configuration/config.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-#Eclipse Runtime Configuration File
-osgi.bundles=org.eclipse.equinox.common at 2:start, org.eclipse.update.configurator at start, org.eclipse.equinox.http.servletbridge at start, org.eclipse.equinox.http.registry at start
-osgi.bundles.defaultStartLevel=4
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/web.xml b/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/web.xml
deleted file mode 100644
index 5d21aa0..0000000
--- a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/web.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
-<web-app id="WebApp">
-	<servlet id="bridge">
-		<servlet-name>equinoxbridgeservlet</servlet-name>
-		<display-name>Equinox Bridge Servlet</display-name>
-		<description>Equinox Bridge Servlet</description>
-		<servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
-		<init-param>
-			<param-name>commandline</param-name>
-			<param-value>-console</param-value>			
-		</init-param>		
-		<init-param>
-			<param-name>enableFrameworkControls</param-name>
-			<param-value>true</param-value>			
-		</init-param>
-		<!--
-		  org.eclipse.equinox.servletbridge and the Servlet API are exported automatically to the underlying OSGi framework.
-		  The extendedFrameworkExports parameter allows the specification of additional java package exports.
-		  The format is a comma separated list of exports as specified by the "Export-Package" bundle manifest header.
-		  For example: com.mycompany.exports; version=1.0.0, com.mycompany.otherexports; version=1.0.0
-		  -->
-		<init-param>
-			<param-name>extendedFrameworkExports</param-name>
-			<param-value></param-value>			
-		</init-param>
-
-		<!-- 
-		  You can specify your own framework launcher here.
-		  The default is: org.eclipse.equinox.servletbridge.FrameworkLauncher
-		<init-param>
-			<param-name>frameworkLauncherClass</param-name>
-			<param-value>org.eclipse.equinox.servletbridge.FrameworkLauncher</param-value>
-		</init-param>	
-		-->		
-		<!-- 
-		  When the framework is deployed, an extension bundle must be present to allow the Servlet API to 
-		  be exported by the container.  Typically, this extension bundle is created at deploy time by the
-		  FrameworkLauncher.  If, however, an extension bundle (with id 'org.eclipse.equinox.servletbridge.extensionbundle') is
-		  already present in the 'plugins' area, then preference is given to the existing bundle.
-		  If this param is set to 'true', then the existing extension bundle with be *overridden* and
-		  the one created by the FrameworkLauncher will replace any existing one.  The default is 'false' 
-		  (giving preference to the existing extension bundle if present).
-		  
-		  default: false
-		  
-		<init-param>
-			<param-name>overrideAndReplaceExtensionBundle</param-name>
-			<param-value>true</param-value>
-		</init-param>	
-		-->		
-		<load-on-startup>1</load-on-startup>
-	</servlet>
-	<servlet-mapping>
-		<servlet-name>equinoxbridgeservlet</servlet-name>
-		<url-pattern>/*</url-pattern>
-	</servlet-mapping>
-	<!--
-	  This is required if your application bundles expose JSPs. 
-	-->	
-	<servlet-mapping>
-		<servlet-name>equinoxbridgeservlet</servlet-name>
-		<url-pattern>*.jsp</url-pattern>
-	</servlet-mapping>	
-</web-app>
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.project b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.project
index bbddddc..4de3c83 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.project
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.project
@@ -25,6 +25,11 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ds.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
index c143032..a40cecb 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
@@ -1,265 +1,343 @@
-#Fri Nov 14 17:13:48 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+#Thu Mar 04 09:59:51 EST 2010
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.formatter.comment.format_header=true
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
 org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
index d11d039..c4d585c 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
@@ -2,22 +2,22 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 2.0.0.qualifier
 Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.manipulator.Activator
-Eclipse-LazyStart: true
-Import-Package: org.eclipse.equinox.internal.frameworkadmin.equinox,
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.internal.frameworkadmin.equinox,
  org.eclipse.equinox.internal.frameworkadmin.utils,
  org.eclipse.equinox.internal.provisional.configuratormanipulator,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
+ org.eclipse.equinox.internal.simpleconfigurator,
  org.eclipse.equinox.internal.simpleconfigurator.utils,
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker
+ org.eclipse.osgi.service.datalocation,
+ org.osgi.framework;version="1.3.0"
 Bundle-Vendor: %providerName
-Export-Package: org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator;x-friends:="org.eclipse.pde.core",
- org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse"
+Export-Package: org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse",
+ org.eclipse.equinox.simpleconfigurator.manipulator;version="2.0.0"
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
  J2SE-1.4
 Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
+Service-Component: OSGI-INF/configurator.xml
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
new file mode 100644
index 0000000..0887bd3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.simpleconfigurator.manipulator">
+   <implementation class="org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl"/>
+   <property name="org.eclipse.equinox.configurator.BundleSymbolicName" type="String" value="org.eclipse.equinox.simpleconfigurator"/>
+   <property name="service.vendor" type="String" value="Eclipse.org"/>
+   <service>
+      <provide interface="org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator"/>
+      <provide interface="org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator"/>
+   </service>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
index ac72e5e..3d8dfe4 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
@@ -1,18 +1,9 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
                .,\
                about.html,\
-               plugin.properties
-qualifier=context
+               plugin.properties,\
+               OSGI-INF/
 src.includes = about.html
+qualifier = context
+source.. = src/
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
new file mode 100644
index 0000000..b52d1de
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.simpleconfigurator.manipulator</artifactId>
+  <version>2.0.0.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
deleted file mode 100644
index 2a990d9..0000000
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/provisional/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-
-public interface SimpleConfiguratorManipulator extends ConfiguratorManipulator {
-	/**
-	 * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator 
-	 * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
-	 * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
-	 */
-	public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator";
-
-	/**
-	 * 
-	 * @param url
-	 * @param launcherLocation
-	 * @return
-	 * @throws IOException
-	 */
-	public BundleInfo[] loadConfiguration(URL url, File launcherLocation) throws IOException;
-
-	/**
-	 * 
-	 * @param bundleConfiguration
-	 * @param outputFile
-	 * @param base
-	 * @throws IOException
-	 */
-	public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException;
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java
deleted file mode 100644
index e8bcfa9..0000000
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/Activator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.*;
-
-public class Activator implements BundleActivator {
-	final static boolean DEBUG = true;
-	private static volatile BundleContext context;
-	private ServiceRegistration registration;
-
-	static BundleContext getContext() {
-		return context;
-	}
-
-	private void registerConfiguratorManipulator() {
-		Dictionary props = new Hashtable();
-		props.put(ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME, SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME);
-		props.put(Constants.SERVICE_VENDOR, "Eclipse.org"); //$NON-NLS-1$
-		SimpleConfiguratorManipulatorImpl manipulator = new SimpleConfiguratorManipulatorImpl();
-		String[] clazzes = new String[] {ConfiguratorManipulator.class.getName(), SimpleConfiguratorManipulator.class.getName()};
-		registration = context.registerService(clazzes, manipulator, props);
-	}
-
-	public void start(BundleContext bundleContext) throws Exception {
-		Activator.context = bundleContext;
-		registerConfiguratorManipulator();
-	}
-
-	public void stop(BundleContext bundleContext) throws Exception {
-		if (registration != null)
-			registration.unregister();
-		Activator.context = null;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index 4396b07..66de400 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -1,32 +1,35 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  * 
- *  Contributors:
- *      IBM Corporation - initial API and implementation
+ * Contributors: IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.net.URI;
 import java.net.URL;
 import java.util.*;
 import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
 import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
+import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl;
+import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
 import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 
 /**
  * 
  */
-public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator {
+public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator, ConfiguratorManipulator {
 	class LocationInfo {
 		URI[] prerequisiteLocations = null;
 		URI systemBundleLocation = null;
@@ -204,7 +207,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 		return true;
 	}
 
-	private boolean divideBundleInfos(Manipulator manipulator, List setToInitialConfig, List setToSimpleConfig, final int initialBSL) throws IOException {
+	private boolean divideBundleInfos(Manipulator manipulator, List setToInitialConfig, List setToSimpleConfig, final int initialBSL) {
 		BundlesState state = manipulator.getBundlesState();
 		BundleInfo[] targetBundleInfos = null;
 		if (state.isFullySupported()) {
@@ -283,7 +286,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 	private void printoutUnsatisfiedConstraints(BundleInfo bInfo, BundlesState state) {
 		if (DEBUG) {
 			StringBuffer sb = new StringBuffer();
-			sb.append("Missing constraints:\n");
+			sb.append("Missing constraints:\n"); //$NON-NLS-1$
 			String[] missings = state.getUnsatisfiedConstraints(bInfo);
 			for (int i = 0; i < missings.length; i++)
 				sb.append(" " + missings[i] + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -291,11 +294,57 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 		}
 	}
 
-	public BundleInfo[] loadConfiguration(URL url, File base) throws IOException {
-		if (url == null)
+	public BundleInfo[] loadConfiguration(BundleContext context, String infoPath) throws IOException {
+		URI installArea = EquinoxUtils.getInstallLocationURI(context);
+
+		URL configURL = null;
+		InputStream stream = null;
+
+		if (infoPath == null) {
+			SimpleConfiguratorImpl simpleImpl = new SimpleConfiguratorImpl(context, null);
+			configURL = simpleImpl.getConfigurationURL();
+		} else {
+			// == (not .equals) use the default source info, currently SOURCE_INFO_PATH
+			boolean defaultSource = (infoPath == SOURCE_INFO);
+			if (defaultSource)
+				infoPath = SOURCE_INFO_PATH;
+
+			Location configLocation = EquinoxUtils.getConfigLocation(context);
+			configURL = configLocation.getDataArea(infoPath);
+			try {
+				stream = configURL.openStream();
+			} catch (FileNotFoundException e) {
+				if (defaultSource && configLocation.getParentLocation() != null) {
+					configURL = configLocation.getParentLocation().getDataArea(infoPath);
+				} else {
+					return new BundleInfo[0];
+				}
+			}
+		}
+		if (configURL == null)
+			return new BundleInfo[0];
+		else if (stream == null) {
+			try {
+				stream = configURL.openStream();
+			} catch (FileNotFoundException e) {
+				return new BundleInfo[0];
+			}
+		}
+
+		//stream will be closed
+		return loadConfiguration(stream, installArea);
+	}
+
+	/*
+	 * InputStream must be closed
+	 * (non-Javadoc)
+	 * @see org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator#loadConfiguration(java.io.InputStream, java.net.URI)
+	 */
+	public BundleInfo[] loadConfiguration(InputStream stream, URI installArea) throws IOException {
+		if (stream == null)
 			return NULL_BUNDLEINFOS;
 
-		List simpleBundles = SimpleConfiguratorUtils.readConfiguration(url, base.toURI());
+		List simpleBundles = SimpleConfiguratorUtils.readConfiguration(stream, installArea);
 
 		// convert to FrameworkAdmin BundleInfo Type
 		BundleInfo[] result = new BundleInfo[simpleBundles.size()];
@@ -307,16 +356,22 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 				location = URIUtil.makeAbsolute(location, simpleInfo.getBaseLocation());
 
 			BundleInfo bundleInfo = new BundleInfo(simpleInfo.getSymbolicName(), simpleInfo.getVersion(), location, simpleInfo.getStartLevel(), simpleInfo.isMarkedAsStarted());
+			bundleInfo.setBaseLocation(simpleInfo.getBaseLocation());
 			result[i++] = bundleInfo;
 		}
 		return result;
 	}
 
-	public void saveConfiguration(BundleInfo[] configuration, File outputFile, File base) throws IOException {
-		saveConfiguration(configuration, outputFile, base, false);
+	public void saveConfiguration(BundleInfo[] configuration, OutputStream stream, URI installArea) throws IOException {
+		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
+		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, stream);
+	}
+
+	public void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea) throws IOException {
+		saveConfiguration(configuration, outputFile, installArea, false);
 	}
 
-	private void saveConfiguration(BundleInfo[] configuration, File outputFile, File base, boolean backup) throws IOException {
+	private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup) throws IOException {
 		if (backup && outputFile.exists()) {
 			File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
 			if (!outputFile.renameTo(backupFile)) {
@@ -324,18 +379,37 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 			}
 		}
 
+		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
+
+		// if empty remove the configuration file
+		if (simpleInfos == null || simpleInfos.length == 0) {
+			if (outputFile.exists()) {
+				outputFile.delete();
+			}
+			File parentDir = outputFile.getParentFile();
+			if (parentDir.exists()) {
+				parentDir.delete();
+			}
+			return;
+		}
+		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
+	}
+
+	private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(BundleInfo[] configuration, URI installArea) {
 		// convert to SimpleConfigurator BundleInfo Type
 		org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
 		for (int i = 0; i < configuration.length; i++) {
 			BundleInfo bundleInfo = configuration[i];
-			String symbolicName = bundleInfo.getSymbolicName();
-			String bundleVersion = bundleInfo.getVersion();
-			URI location = base != null ? URIUtil.makeRelative(bundleInfo.getLocation(), base.toURI()) : bundleInfo.getLocation();
-			if (symbolicName == null || bundleVersion == null || location == null)
+			URI location = bundleInfo.getLocation();
+			if (bundleInfo.getSymbolicName() == null || bundleInfo.getVersion() == null || location == null)
 				throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
-			simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(symbolicName, bundleVersion, location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
+			//only need to make a new BundleInfo if we are changing it.
+			if (installArea != null)
+				location = URIUtil.makeRelative(location, installArea);
+			simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
+			simpleInfos[i].setBaseLocation(bundleInfo.getBaseLocation());
 		}
-		SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
+		return simpleInfos;
 	}
 
 	public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException {
@@ -347,7 +421,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 			return configData.getBundles();
 
 		File outputFile = getConfigFile(manipulator);
-		saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()), backup);
+		URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
+		saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup);
 		configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
 		return orderingInitialConfig(setToInitialConfig);
 	}
@@ -416,7 +491,15 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
 		boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
 		File configFile = getConfigFile(manipulator);
 
-		BundleInfo[] toInstall = loadConfiguration(configFile.toURL(), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()));
+		File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
+		BundleInfo[] toInstall = null;
+		try {
+			//input stream will be closed for us
+			toInstall = loadConfiguration(new FileInputStream(configFile), installArea.toURI());
+		} catch (FileNotFoundException e) {
+			//no file, just return an empty list
+			toInstall = new BundleInfo[0];
+		}
 
 		List toUninstall = new LinkedList();
 		if (exclusiveInstallation)
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
index 17fa8ee..84c8c7b 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
@@ -12,9 +12,11 @@ import java.io.*;
 import java.net.URI;
 import java.util.Arrays;
 import java.util.Comparator;
+import org.eclipse.equinox.internal.frameworkadmin.equinox.Messages;
 import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
+import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 import org.osgi.framework.Version;
 
 public class SimpleConfiguratorManipulatorUtils {
@@ -22,21 +24,41 @@ public class SimpleConfiguratorManipulatorUtils {
 	private static final String VERSION_PREFIX = "#version="; //$NON-NLS-1$
 	private static final String VERSION_1 = "1"; //$NON-NLS-1$
 	private static final Version OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION = new Version("1.0.100.v20081206"); //$NON-NLS-1$
+	private static final Version DEFAULT_ENCODING_CONFIGURATOR_VERSION = new Version("2.0.0.v20100329"); //$NON-NLS-1$
 
 	public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
+		if (!Utils.createParentDir(outputFile)) {
+			throw new IllegalStateException(Messages.exception_failedToCreateDir);
+		}
 
-		// if empty remove the configuration file
-		if (simpleInfos == null || simpleInfos.length == 0) {
-			if (outputFile.exists()) {
-				outputFile.delete();
-			}
-			File parentDir = outputFile.getParentFile();
-			if (parentDir.exists()) {
-				parentDir.delete();
+		IOException caughtException = null;
+		OutputStream stream = null;
+		try {
+			stream = new FileOutputStream(outputFile);
+			writeConfiguration(simpleInfos, stream);
+		} catch (IOException e) {
+			caughtException = e;
+		} finally {
+			try {
+				if (stream != null)
+					stream.close();
+			} catch (IOException e) {
+				// we want to avoid over-writing the original exception
+				if (caughtException != null)
+					caughtException = e;
 			}
-			return;
 		}
+		if (caughtException != null)
+			throw caughtException;
+	}
 
+	/**
+	 * The output stream is left open
+	 * @param simpleInfos
+	 * @param stream
+	 * @throws IOException
+	 */
+	public static void writeConfiguration(BundleInfo[] simpleInfos, OutputStream stream) throws IOException {
 		// sort by symbolic name
 		Arrays.sort(simpleInfos, new Comparator() {
 			public int compare(Object o1, Object o2) {
@@ -47,45 +69,37 @@ public class SimpleConfiguratorManipulatorUtils {
 			}
 		});
 
-		Utils.createParentDir(outputFile);
 		BufferedWriter writer = null;
-		IOException caughtException = null;
 		boolean oldStyle = false;
+		boolean utf8 = true;
 		for (int i = 0; i < simpleInfos.length; i++) {
 			if (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(simpleInfos[i].getSymbolicName())) {
 				Version version = new Version(simpleInfos[i].getVersion());
 				if (version.compareTo(OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION) < 0)
 					oldStyle = true;
+				if (version.compareTo(DEFAULT_ENCODING_CONFIGURATOR_VERSION) <= 0)
+					utf8 = false;
 				break;
 			}
 		}
 
-		try {
-			writer = new BufferedWriter(new FileWriter(outputFile));
-			// version line
-			writer.write(createVersionLine());
+		if (utf8) {
+			writer = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8")); //$NON-NLS-1$
+			//encoding is expected to be the first line
+			writer.write(SimpleConfiguratorUtils.ENCODING_UTF8);
 			writer.newLine();
+		} else {
+			writer = new BufferedWriter(new OutputStreamWriter(stream));
+		}
+		writer.write(createVersionLine());
+		writer.newLine();
 
-			// bundle info lines
-			for (int i = 0; i < simpleInfos.length; i++) {
-				writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
-				writer.newLine();
-			}
-		} catch (IOException e) {
-			caughtException = e;
-		} finally {
-			if (writer != null) {
-				try {
-					writer.close();
-				} catch (IOException e) {
-					// we want to avoid over-writing the original exception
-					if (caughtException != null)
-						caughtException = e;
-				}
-			}
+		// bundle info lines
+		for (int i = 0; i < simpleInfos.length; i++) {
+			writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
+			writer.newLine();
 		}
-		if (caughtException != null)
-			throw caughtException;
+		writer.flush();
 	}
 
 	public static String createVersionLine() {
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
new file mode 100644
index 0000000..fbd55c1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.simpleconfigurator.manipulator;
+
+import java.io.*;
+import java.net.URI;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A ConfiguratorManipulator Service used to read and write bundles.info configuration files
+ * @since 2.0
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface SimpleConfiguratorManipulator {
+	/**
+	 * A common location to find the bundle configuration file
+	 */
+	public static final String BUNDLES_INFO_PATH = "org.eclipse.equinox.simpleconfigurator/bundles.info"; //$NON-NLS-1$
+
+	/**
+	 * A common location to find the source configuration file
+	 */
+	public static final String SOURCE_INFO_PATH = "org.eclipse.equinox.source/source.info"; //$NON-NLS-1$
+
+	/**
+	 * Pass this to {@link #loadConfiguration(BundleContext, String)} to read the default source configuration file
+	 */
+	public static final String SOURCE_INFO = new String("source.info"); //$NON-NLS-1$
+
+	/**
+	 * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator 
+	 * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
+	 * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
+	 */
+	public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
+
+	/**
+	 * Load the configuration file for the currently running system.
+	 * <p>
+	 * Pass null for bundleInfoPath to read the bundle configuration file for the running system as 
+	 * specified by the "org.eclipse.equinox.simpleconfigurator.configUrl" system property.
+	 * </p>
+	 * <p>If bundleInfoPath == {@link #SOURCE_INFO} the default source configuration file for the running
+	 * system will be loaded.
+	 * </p>
+	 * @param context - the BundleContext for the running system
+	 * @param bundleInfoPath - pass null or a path to the bundle info file to read, relative to the configuration location.  Pass {@link #SOURCE_INFO}
+	 * to load the default source configuration.  Common locations are {@link #BUNDLES_INFO_PATH} and {@link #SOURCE_INFO_PATH}.
+	 * @return The loaded configuration.  Bundles will have at least symbolic name, version and location information.
+	 * @throws IOException
+	 */
+	public BundleInfo[] loadConfiguration(BundleContext context, String bundleInfoPath) throws IOException;
+
+	/**
+	 *	Load the configuration from the given input stream
+	 *  The supplied input stream is consumed by this method and will be closed.
+	 *  
+	 * @param configuration - the input stream to read the configuration from.  The stream will be closed even if an exception is thrown
+	 * @param installArea - Relative URIs from the configuration file will be resolved relative to here
+	 * @return The loaded configuration.   Bundles will have at least symbolic name, version and location information.
+	 * @throws IOException
+	 */
+	public BundleInfo[] loadConfiguration(InputStream configuration, URI installArea) throws IOException;
+
+	/**
+	 * Save the configuration to the given output stream
+	 * The output stream is flushed and left open.
+	 * To be persisted, bundles are required to have at least a symbolic name, version and location.
+	 * 
+	 * @param configuration - bundle information to save
+	 * @param outputStream - the output stream to write to.  Stream is not closed
+	 * @param installArea - bundle locations are written as relative to this URI
+	 * @throws IOException
+	 */
+	public void saveConfiguration(BundleInfo[] configuration, OutputStream outputStream, URI installArea) throws IOException;
+
+	/**
+	 * Save the configuration to the specified file
+	 * To be persisted, bundles are required to have at least a symbolic name, version and location.
+	 * 
+	 * @param configuration - bundle information to save
+	 * @param configurationFile - file to save the configuration in
+	 * @param installArea - bundle locations are written as relative to this URI
+	 * 
+	 * @throws IOException
+	 */
+	public void saveConfiguration(BundleInfo[] configuration, File configurationFile, URI installArea) throws IOException;
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
index 34a383a..ec72a23 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
@@ -1,270 +1,283 @@
-#Wed Jan 07 13:39:09 EST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+#Thu Mar 04 09:52:05 EST 2010
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
 org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.lineSplit=800
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.comment.format_header=false
 org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
 org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
 org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
index 7fd1803..2360a0e 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
@@ -1,12 +1,12 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator;singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.Activator
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
 Import-Package: org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
  org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
@@ -17,9 +17,10 @@ Import-Package: org.eclipse.osgi.framework.console;version="1.0.0";resolution:=o
 Export-Package: org.eclipse.equinox.internal.provisional.configurator;
   x-friends:="org.eclipse.equinox.p2.reconciler.dropins,
    org.eclipse.equinox.p2.console,
+   org.eclipse.equinox.p2.operations,
    org.eclipse.equinox.p2.ui,
    org.eclipse.equinox.p2.director",
- org.eclipse.equinox.internal.simpleconfigurator;x-internal:=true,
+ org.eclipse.equinox.internal.simpleconfigurator;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator",
  org.eclipse.equinox.internal.simpleconfigurator.console;x-internal:=true,
  org.eclipse.equinox.internal.simpleconfigurator.utils;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator"
 Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/pom.xml b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/pom.xml
new file mode 100644
index 0000000..bef764a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>org.eclipse.equinox.p2-parent</artifactId>
+    <groupId>org.eclipse</groupId>
+    <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
+  </parent>
+  <groupId>org.eclipse</groupId>
+  <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
+  <version>1.0.200.qualifier</version>
+  <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
index 2291eb6..b288327 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
@@ -36,7 +36,7 @@ import java.net.URL;
  * 
  * At its stopping, the service registered will be unregistered.
  * 
- * @see ConfiguratorManipulator
+ * see org.eclipse.equinox.internal.provisional.configuratormanipulato.ConfiguratorManipulator
  *
  */
 public interface Configurator {
@@ -62,7 +62,7 @@ public interface Configurator {
 	 * Return the url in use.
 	 * If it is never used, return null.
 	 * 
-	 * @return
+	 * @return URL
 	 */
 	URL getUrlInUse();
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
index 7cbc420..6c6f70e 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
@@ -47,7 +47,7 @@ public class SimpleConfiguratorImpl implements Configurator {
 		this.bundle = bundle;
 	}
 
-	private URL getConfigurationURL() throws IOException {
+	public URL getConfigurationURL() throws IOException {
 		String specifiedURL = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_CONFIGURL);
 		if (specifiedURL == null)
 			specifiedURL = "file:" + SimpleConfiguratorConstants.CONFIGURATOR_FOLDER + "/" + SimpleConfiguratorConstants.CONFIG_LIST;
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
index da5f020..b4bb8b0 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.internal.simpleconfigurator.console;
 
 import java.io.IOException;
 import java.net.URL;
-
 import org.eclipse.equinox.internal.provisional.configurator.Configurator;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
 import org.osgi.framework.BundleContext;
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
index 99b1440..99a667e 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
@@ -41,7 +41,7 @@ public class ConfiguratorCommandProvider implements CommandProvider {
 
 	/**
 	 * Apply the current configuration
-	 * @param configuration URL (optional)
+	 * @param interpreter 
 	 */
 	public void _confapply(CommandInterpreter interpreter) {
 		String parameter = interpreter.nextArgument();
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
index d0ae2cc..66454c0 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -18,6 +18,24 @@ import org.osgi.util.tracker.ServiceTracker;
 public class EquinoxUtils {
 
 	public static URL[] getConfigAreaURL(BundleContext context) {
+		Location configLocation = getConfigLocation(context);
+		if (configLocation == null)
+			return null;
+
+		URL baseURL = configLocation.getURL();
+		if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
+			if (baseURL == null)
+				return new URL[] {configLocation.getParentLocation().getURL()};
+			else
+				return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
+		}
+		if (baseURL != null)
+			return new URL[] {baseURL};
+
+		return null;
+	}
+
+	public static Location getConfigLocation(BundleContext context) {
 		Filter filter = null;
 		try {
 			filter = context.createFilter(Location.CONFIGURATION_FILTER);
@@ -27,21 +45,7 @@ public class EquinoxUtils {
 		ServiceTracker configLocationTracker = new ServiceTracker(context, filter, null);
 		configLocationTracker.open();
 		try {
-			Location configLocation = (Location) configLocationTracker.getService();
-			if (configLocation == null)
-				return null;
-
-			URL baseURL = configLocation.getURL();
-			if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
-				if (baseURL == null)
-					return new URL[] {configLocation.getParentLocation().getURL()};
-				else
-					return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
-			}
-			if (baseURL != null)
-				return new URL[] {baseURL};
-
-			return null;
+			return (Location) configLocationTracker.getService();
 		} finally {
 			configLocationTracker.close();
 		}
diff --git a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
index c355703..0ab0582 100644
--- a/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
+++ b/eclipse/plugins/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -18,6 +18,7 @@ public class SimpleConfiguratorUtils {
 
 	private static final String UNC_PREFIX = "//";
 	private static final String VERSION_PREFIX = "#version=";
+	public static final String ENCODING_UTF8 = "#encoding=UTF-8";
 	public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
 	public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
 
@@ -28,19 +29,40 @@ public class SimpleConfiguratorUtils {
 	private static final String ENCODED_COMMA = "%2C";
 
 	public static List readConfiguration(URL url, URI base) throws IOException {
-		List bundles = new ArrayList();
-
-		BufferedReader r = null;
+		InputStream stream = null;
 		try {
-			r = new BufferedReader(new InputStreamReader(url.openStream()));
+			stream = url.openStream();
 		} catch (IOException e) {
 			// if the exception is a FNF we return an empty bundle list
 			if (e instanceof FileNotFoundException)
-				return bundles;
+				return Collections.EMPTY_LIST;
 			throw e;
 		}
+
+		try {
+			return readConfiguration(stream, base);
+		} finally {
+			stream.close();
+		}
+	}
+
+	/**
+	 * Read the configuration from the given InputStream
+	 * 
+	 * @param stream - the stream is always closed 
+	 * @param base
+	 * @return List of {@link BundleInfo}
+	 * @throws IOException
+	 */
+	public static List readConfiguration(InputStream stream, URI base) throws IOException {
+		List bundles = new ArrayList();
+
+		BufferedInputStream bufferedStream = new BufferedInputStream(stream);
+		String encoding = determineEncoding(bufferedStream);
+		BufferedReader r = new BufferedReader(encoding == null ? new InputStreamReader(bufferedStream) : new InputStreamReader(bufferedStream, encoding));
+
+		String line;
 		try {
-			String line;
 			while ((line = r.readLine()) != null) {
 				line = line.trim();
 				//ignore any comment or empty lines
@@ -66,6 +88,36 @@ public class SimpleConfiguratorUtils {
 		return bundles;
 	}
 
+	/*
+	 * We expect the first line of the bundles.info to be 
+	 *    #encoding=UTF-8
+	 * if it isn't, then it is an older bundles.info and should be 
+	 * read with the default encoding
+	 */
+	private static String determineEncoding(BufferedInputStream stream) {
+		byte[] utfBytes = ENCODING_UTF8.getBytes();
+		byte[] buffer = new byte[utfBytes.length];
+
+		int bytesRead = -1;
+		stream.mark(utfBytes.length + 1);
+		try {
+			bytesRead = stream.read(buffer);
+		} catch (IOException e) {
+			//do nothing
+		}
+
+		if (bytesRead == utfBytes.length && Arrays.equals(utfBytes, buffer))
+			return "UTF-8";
+
+		//if the first bytes weren't the encoding, need to reset
+		try {
+			stream.reset();
+		} catch (IOException e) {
+			// nothing
+		}
+		return null;
+	}
+
 	public static void parseCommentLine(String line) {
 		// version
 		if (line.startsWith(VERSION_PREFIX)) {
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/.project b/eclipse/plugins/org.eclipse.equinox.supplement/.project
index 7b841ae..64f3ba8 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/.project
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.supplement/META-INF/MANIFEST.MF
index b7b924d..0a72e47 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.supplement
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.osgi.framework.log;version="1.0",
- org.eclipse.osgi.service.datalocation;version="1.2",
- org.eclipse.osgi.service.debug;version="1.0",
- org.eclipse.osgi.service.environment;version="1.2",
- org.eclipse.osgi.service.localization;version="1.0",
+ org.eclipse.osgi.service.datalocation;version="1.3",
+ org.eclipse.osgi.service.debug;version="1.1",
+ org.eclipse.osgi.service.environment;version="1.3",
+ org.eclipse.osgi.service.localization;version="1.1",
  org.eclipse.osgi.service.runnable;version="1.1",
  org.eclipse.osgi.service.urlconversion;version="1.0",
  org.eclipse.osgi.storagemanager;version="1.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
index 7dba75f..d73ef47 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,7 @@ public class BasicLocation implements Location {
 	private Location parent;
 	final private URL defaultValue;
 	final private String property;
+	final private String dataAreaPrefix;
 
 	// locking related fields
 	private File lockFile;
@@ -84,11 +85,12 @@ public class BasicLocation implements Location {
 
 	}
 
-	public BasicLocation(String property, URL defaultValue, boolean isReadOnly) {
+	public BasicLocation(String property, URL defaultValue, boolean isReadOnly, String dataAreaPrefix) {
 		super();
 		this.property = property;
 		this.defaultValue = defaultValue;
 		this.isReadOnly = isReadOnly;
+		this.dataAreaPrefix = dataAreaPrefix == null ? "" : dataAreaPrefix; //$NON-NLS-1$
 	}
 
 	public boolean allowsDefault() {
@@ -238,8 +240,21 @@ public class BasicLocation implements Location {
 	}
 
 	public Location createLocation(Location parentLocation, URL defaultLocation, boolean readonly) {
-		BasicLocation result = new BasicLocation(null, defaultLocation, readonly);
+		BasicLocation result = new BasicLocation(null, defaultLocation, readonly, dataAreaPrefix);
 		result.setParent(parentLocation);
 		return result;
 	}
+
+	public URL getDataArea(String filename) throws IOException {
+		URL base = getURL();
+		if (base == null)
+			throw new IOException(EclipseAdaptorMsg.location_notSet);
+		String prefix = base.toExternalForm();
+		if (prefix.length() > 0 && prefix.charAt(prefix.length() - 1) != '/')
+			prefix += '/';
+		filename = filename.replace('\\', '/');
+		if (filename.length() > 0 && filename.charAt(0) == '/')
+			filename.substring(1);
+		return new URL(prefix + dataAreaPrefix + filename);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
index 50577ee..ecb3dba 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
@@ -65,6 +65,8 @@ ECLIPSE_CONSOLE_DISABLED_BUNDLE_REASON2=\t\t{0} (policy={1})
 ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE=Missing optionally required bundle {0}.
 ECLIPSE_MISSING_REQUIRED_BUNDLE=Missing required bundle {0}.
 ECLIPSE_MISSING_IMPORTED_PACKAGE=Missing imported package {0}.
+ECLIPSE_MISSING_OPTIONAL_IMPORTED_PACKAGE=Missing optionally imported package {0}.
+ECLIPSE_MISSING_DYNAMIC_IMPORTED_PACKAGE=Missing dynamically imported package {0}.
 ECLIPSE_MISSING_HOST=Missing host {0}.
 
 #Conversion messages
@@ -106,7 +108,7 @@ fileManager_illegalInReadOnlyMode = Cannot perform operation while in read-only
 fileManager_notOpen = Manager is not opened.
 
 #Location messages
-location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing {2} as a VM argument.
+location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking by passing {2} as a VM argument.
 location_cannotLock = An error occurred while locking file \"{0}\".
 location_folderReadOnly = The folder \"{0}\" is read-only.
 location_notSet = The location has not been set.
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
index c741274..a89a25a 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
@@ -16,6 +16,8 @@ public class EclipseAdaptorMsg extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMessages"; //$NON-NLS-1$
 
 	public static String ECLIPSE_MISSING_IMPORTED_PACKAGE;
+	public static String ECLIPSE_MISSING_OPTIONAL_IMPORTED_PACKAGE;
+	public static String ECLIPSE_MISSING_DYNAMIC_IMPORTED_PACKAGE;
 	public static String ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE;
 	public static String ECLIPSE_MISSING_REQUIRED_BUNDLE;
 	public static String ECLIPSE_MISSING_HOST;
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
index e069c68..3009b12 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,8 @@
 package org.eclipse.core.runtime.internal.adaptor;
 
 import java.io.*;
-import java.nio.channels.*;
+import java.nio.channels.FileLock;
+import java.nio.channels.OverlappingFileLockException;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -85,7 +86,15 @@ public class Locker_JavaNio implements Locker {
 				 * fix for bug http://bugs.sun.com/view_bug.do?bug_id=6628575 and
 				 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44735#c17
 				 */
-				tempLock = temp.getChannel().tryLock(0, 1, false);
+				try {
+					tempLock = temp.getChannel().tryLock(0, 1, false);
+				} catch (IOException ioe) {
+					if (BasicLocation.DEBUG)
+						System.out.println(NLS.bind(EclipseAdaptorMsg.location_cannotLock, lockFile));
+					// produce a more specific message for clients
+					String specificMessage = NLS.bind(EclipseAdaptorMsg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$
+					throw new IOException(specificMessage);
+				}
 				if (tempLock != null) {
 					tempLock.release(); // allow IOException to propagate because that would mean it is still locked
 					return false;
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
index 8a93649..b1f89c9 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,90 +12,90 @@ package org.eclipse.osgi.framework.debug;
 
 import java.io.*;
 import java.security.AccessController;
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import org.eclipse.osgi.framework.util.SecureAction;
-import org.eclipse.osgi.service.debug.DebugOptions;
 import org.eclipse.osgi.service.debug.DebugTrace;
 
 /**
  * The DebugTrace implementation for Eclipse.
- * <p>
- * Clients may extend this class.
- * </p>
- * @since 3.5
  */
-public class EclipseDebugTrace implements DebugTrace {
+class EclipseDebugTrace implements DebugTrace {
 
 	/** The system property used to specify size a trace file can grow before it is rotated */
-	public static final String PROP_TRACE_SIZE_MAX = "eclipse.trace.size.max"; //$NON-NLS-1$
+	private static final String PROP_TRACE_SIZE_MAX = "eclipse.trace.size.max"; //$NON-NLS-1$
 	/** The system property used to specify the maximum number of backup trace files to use */
-	public static final String PROP_TRACE_FILE_MAX = "eclipse.trace.backup.max"; //$NON-NLS-1$
+	private static final String PROP_TRACE_FILE_MAX = "eclipse.trace.backup.max"; //$NON-NLS-1$
 	/** The trace message for a thread stack dump */
-	protected final static String MESSAGE_THREAD_DUMP = "Thread Stack dump: "; //$NON-NLS-1$
+	private final static String MESSAGE_THREAD_DUMP = "Thread Stack dump: "; //$NON-NLS-1$
 	/** The trace message for a method completing with a return value */
-	protected final static String MESSAGE_EXIT_METHOD_WITH_RESULTS = "Exiting method with result: "; //$NON-NLS-1$
+	private final static String MESSAGE_EXIT_METHOD_WITH_RESULTS = "Exiting method {0}with result: "; //$NON-NLS-1$
 	/** The trace message for a method completing with no return value */
-	protected final static String MESSAGE_EXIT_METHOD_NO_RESULTS = "Exiting method with a void return"; //$NON-NLS-1$
+	private final static String MESSAGE_EXIT_METHOD_NO_RESULTS = "Exiting method {0}with a void return"; //$NON-NLS-1$
 	/** The trace message for a method starting with a set of arguments */
-	protected final static String MESSAGE_ENTER_METHOD_WITH_PARAMS = "Entering method with parameters: ("; //$NON-NLS-1$
+	private final static String MESSAGE_ENTER_METHOD_WITH_PARAMS = "Entering method {0}with parameters: ("; //$NON-NLS-1$
 	/** The trace message for a method starting with no arguments */
-	protected final static String MESSAGE_ENTER_METHOD_NO_PARAMS = "Entering method with no parameters"; //$NON-NLS-1$
-	/** The version attribute written to the header of the trace file */
-	protected final static String TRACE_FILE_VERSION_COMMENT = "version: "; //$NON-NLS-1$
-	/** The version value written to the header of the trace file */
-	protected final static String TRACE_FILE_VERSION = "1.0"; //$NON-NLS-1$
+	private final static String MESSAGE_ENTER_METHOD_NO_PARAMS = "Entering method {0}with no parameters"; //$NON-NLS-1$
+	/** The version attribute written in the header of a new session */
+	private final static String TRACE_FILE_VERSION_COMMENT = "version: "; //$NON-NLS-1$
+	/** The verbose attribute written in the header of a new session */
+	private final static String TRACE_FILE_VERBOSE_COMMENT = "verbose: "; //$NON-NLS-1$
+	/** The version value written in the header of a new session */
+	private final static String TRACE_FILE_VERSION = "1.1"; //$NON-NLS-1$
 	/** The new session identifier to be written whenever a new session starts */
-	protected final static String TRACE_NEW_SESSION = "!SESSION "; //$NON-NLS-1$
+	private final static String TRACE_NEW_SESSION = "!SESSION "; //$NON-NLS-1$
 	/** The date attribute written to the header of the trace file to show when this file was created */
-	protected final static String TRACE_FILE_DATE = "Time of creation: "; //$NON-NLS-1$
+	private final static String TRACE_FILE_DATE = "Time of creation: "; //$NON-NLS-1$
 	/** Trace date formatter using the pattern: yyyy-MM-dd HH:mm:ss.SSS  */
-	protected final static SimpleDateFormat TRACE_FILE_DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
+	private final static SimpleDateFormat TRACE_FILE_DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
 	/** The comment character used by the trace file */
-	protected final static String TRACE_COMMENT = "#"; //$NON-NLS-1$
+	private final static String TRACE_COMMENT = "#"; //$NON-NLS-1$
 	/** The delimiter used to separate trace elements such as the time stamp, message, etc */
-	protected final static String TRACE_ELEMENT_DELIMITER = "|"; //$NON-NLS-1$
+	private final static String TRACE_ELEMENT_DELIMITER = "|"; //$NON-NLS-1$
+	/** The string written in place of the {@link EclipseDebugTrace#TRACE_TRACE_ELEMENT_DELIMITER} in entries */
+	private final static String TRACE_ELEMENT_DELIMITER_ENCODED = "|"; //$NON-NLS-1$
 	/** OS-specific line separator */
-	protected static final String LINE_SEPARATOR;
+	private static final String LINE_SEPARATOR;
 	static {
 		String s = System.getProperty("line.separator"); //$NON-NLS-1$
 		LINE_SEPARATOR = s == null ? "\n" : s; //$NON-NLS-1$
 	}
 	/** The value written to the trace file if a null object is being traced */
-	public final static String NULL_VALUE = "<null>"; //$NON-NLS-1$
+	private final static String NULL_VALUE = "<null>"; //$NON-NLS-1$
 	/**  */
 	private final static SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
 	/** A lock object used to synchronize access to the trace file */
-	protected final static Object writeLock = new Object();
+	private final static Object writeLock = new Object();
 
 	/******************* Tracing file attributes **************************/
 	/** The default size a trace file can grow before it is rotated */
-	public static final int DEFAULT_TRACE_FILE_SIZE = 1000; // The value is in KB.
+	private static final int DEFAULT_TRACE_FILE_SIZE = 1000; // The value is in KB.
 	/** The default number of backup trace files */
-	public static final int DEFAULT_TRACE_FILES = 10;
+	private static final int DEFAULT_TRACE_FILES = 10;
 	/** The minimum size limit for trace file rotation */
-	public static final int DEFAULT_TRACE_FILE_MIN_SIZE = 10;
+	private static final int DEFAULT_TRACE_FILE_MIN_SIZE = 10;
 	/** The extension used for log files */
-	public static final String TRACE_FILE_EXTENSION = ".trace"; //$NON-NLS-1$
+	private static final String TRACE_FILE_EXTENSION = ".trace"; //$NON-NLS-1$
 	/** The extension markup to use for backup log files*/
-	public static final String BACKUP_MARK = ".bak_"; //$NON-NLS-1$
+	private static final String BACKUP_MARK = ".bak_"; //$NON-NLS-1$
 	/** The maximum size that a trace file should grow (0 = unlimited) */
-	protected int maxTraceFileSize = DEFAULT_TRACE_FILE_SIZE; // The value is in KB.
+	private int maxTraceFileSize = DEFAULT_TRACE_FILE_SIZE; // The value is in KB.
 	/** The maximum number of trace files that should be saved */
-	protected int maxTraceFiles = DEFAULT_TRACE_FILES;
+	private int maxTraceFiles = DEFAULT_TRACE_FILES;
 	/** The index of the currently backed-up trace file */
-	protected int backupTraceFileIndex = 0;
+	private int backupTraceFileIndex = 0;
 
 	/** An optional argument to specify the name of the class used by clients to trace messages.  If no trace class is specified
 	 * then the class calling this API is assumed to be the class being traced.
 	*/
-	protected Class traceClass = null;
+	private String traceClass = null;
 	/** The symbolic name of the bundle being traced */
-	protected String bundleSymbolicName = null;
+	private String bundleSymbolicName = null;
 	/** A flag to determine if the message being written is done to a new file (i.e. should the header information be written) */
-	protected static boolean newSession = true;
+	static boolean newSession = true;
 	/** DebugOptions are used to determine if the specified bundle symbolic name + option-path has debugging enabled */
-	protected DebugOptions debugOptions = null;
+	private FrameworkDebugOptions debugOptions = null;
 
 	/**
 	 * Construct a new EclipseDebugTrace for the specified bundle symbolic name and write messages to the specified
@@ -104,7 +104,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param bundleSymbolicName The symbolic name of the bundle being traced
 	 * @param debugOptions Used to determine if the specified bundle symbolic name + option-path has tracing enabled
 	 */
-	public EclipseDebugTrace(final String bundleSymbolicName, final DebugOptions debugOptions) {
+	EclipseDebugTrace(final String bundleSymbolicName, final FrameworkDebugOptions debugOptions) {
 
 		this(bundleSymbolicName, debugOptions, null);
 	}
@@ -117,9 +117,9 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param debugOptions Used to determine if the specified bundle symbolic name + option-path has tracing enabled
 	 * @param traceClass The class that the client is using to perform trace API calls
 	 */
-	public EclipseDebugTrace(final String bundleSymbolicName, final DebugOptions debugOptions, final Class traceClass) {
+	EclipseDebugTrace(final String bundleSymbolicName, final FrameworkDebugOptions debugOptions, final Class traceClass) {
 
-		this.traceClass = traceClass;
+		this.traceClass = traceClass != null ? traceClass.getName() : null;
 		this.debugOptions = debugOptions;
 		this.bundleSymbolicName = bundleSymbolicName;
 		readLogProperties();
@@ -131,7 +131,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param optionPath The <i>option-path</i>
 	 * @return Returns true if debugging is enabled for the specified option-path on this bundle; Otherwise false.
 	 */
-	protected final boolean isDebuggingEnabled(final String optionPath) {
+	private final boolean isDebuggingEnabled(final String optionPath) {
 		if (optionPath == null)
 			return true;
 		boolean debugEnabled = false;
@@ -173,7 +173,8 @@ public class EclipseDebugTrace implements DebugTrace {
 	public void traceEntry(final String optionPath) {
 
 		if (isDebuggingEnabled(optionPath)) {
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, EclipseDebugTrace.MESSAGE_ENTER_METHOD_NO_PARAMS, traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, EclipseDebugTrace.MESSAGE_ENTER_METHOD_NO_PARAMS);
 			writeRecord(record);
 		}
 	}
@@ -205,12 +206,15 @@ public class EclipseDebugTrace implements DebugTrace {
 					} else {
 						messageBuffer.append(EclipseDebugTrace.NULL_VALUE);
 					}
-					messageBuffer.append(" "); //$NON-NLS-1$
 					i++;
+					if (i < methodArguments.length) {
+						messageBuffer.append(" "); //$NON-NLS-1$
+					}
 				}
 				messageBuffer.append(")"); //$NON-NLS-1$
 			}
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, messageBuffer.toString(), traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, messageBuffer.toString());
 			writeRecord(record);
 		}
 	}
@@ -222,7 +226,8 @@ public class EclipseDebugTrace implements DebugTrace {
 	public void traceExit(final String optionPath) {
 
 		if (isDebuggingEnabled(optionPath)) {
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, EclipseDebugTrace.MESSAGE_EXIT_METHOD_NO_RESULTS, traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, EclipseDebugTrace.MESSAGE_EXIT_METHOD_NO_RESULTS);
 			writeRecord(record);
 		}
 	}
@@ -240,7 +245,8 @@ public class EclipseDebugTrace implements DebugTrace {
 			} else {
 				messageBuffer.append(result.toString());
 			}
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, messageBuffer.toString(), traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, messageBuffer.toString());
 			writeRecord(record);
 		}
 	}
@@ -273,13 +279,36 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
+	 * Set the trace message for the specified record to include class and method information
+	 * if verbose debugging is disabled.
+	 *  
+	 * @param record The {@link FrameworkDebugTraceEntry} containing the information to persist to the trace file.
+	 * @param originalMessage The original tracing message
+	 */
+	private final void setMessage(final FrameworkDebugTraceEntry record, final String originalMessage) {
+
+		String argument = null;
+		if (!debugOptions.isVerbose()) {
+			final StringBuffer classMethodName = new StringBuffer(record.getClassName());
+			classMethodName.append("#"); //$NON-NLS-1$
+			classMethodName.append(record.getMethodName());
+			classMethodName.append(" "); //$NON-NLS-1$
+			argument = classMethodName.toString();
+		} else {
+			argument = ""; //$NON-NLS-1$
+		}
+		String newMessage = MessageFormat.format(originalMessage, new Object[] {argument});
+		record.setMessage(newMessage);
+	}
+
+	/**
 	 * Utility method to convert an array of StackTraceElement objects to form a String representation of a stack dump
 	 * 
 	 * @param elements
 	 *            The array of StackTraceElement objects
 	 * @return A String of the stack dump produced by the list of elements
 	 */
-	protected final String convertStackTraceElementsToString(final StackTraceElement[] elements) {
+	private final String convertStackTraceElementsToString(final StackTraceElement[] elements) {
 
 		final StringBuffer buffer = new StringBuffer();
 		if (elements != null) {
@@ -303,7 +332,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * 
 	 * @param entry The FrameworkTraceEntry to write to the log file.
 	 */
-	protected void writeRecord(final FrameworkDebugTraceEntry entry) {
+	private void writeRecord(final FrameworkDebugTraceEntry entry) {
 
 		if (entry != null) {
 			synchronized (EclipseDebugTrace.writeLock) {
@@ -311,11 +340,11 @@ public class EclipseDebugTrace implements DebugTrace {
 				Writer traceWriter = null;
 				try {
 					// check to see if the file should be rotated
-					checkTraceFileSize(tracingFile);
+					checkTraceFileSize(tracingFile, entry.getTimestamp());
 					// open the trace file
 					traceWriter = openWriter(tracingFile);
 					if (EclipseDebugTrace.newSession) {
-						writeSession(traceWriter);
+						writeSession(traceWriter, entry.getTimestamp());
 						EclipseDebugTrace.newSession = false;
 					}
 					writeMessage(traceWriter, entry);
@@ -338,7 +367,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	/**
 	 * Reads the PROP_TRACE_SIZE_MAX and PROP_TRACE_FILE_MAX properties.
 	 */
-	protected void readLogProperties() {
+	private void readLogProperties() {
 
 		String newMaxTraceFileSize = secureAction.getProperty(PROP_TRACE_SIZE_MAX);
 		if (newMaxTraceFileSize != null) {
@@ -364,9 +393,10 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * Checks the trace file size.  If the file size reaches the limit then the trace file is rotated. 
 	 * 
 	 * @param traceFile The tracing file
+	 * @param timestamp the timestamp for the session; this is the same timestamp as the first entry
 	 * @return false if an error occurred trying to rotate the trace file
 	 */
-	protected boolean checkTraceFileSize(final File traceFile) {
+	private boolean checkTraceFileSize(final File traceFile, long timestamp) {
 
 		// 0 file size means there is no size limit
 		boolean isBackupOK = true;
@@ -410,7 +440,9 @@ public class EclipseDebugTrace implements DebugTrace {
 					try {
 						traceWriter = openWriter(traceFile);
 						writeComment(traceWriter, "This is a continuation of trace file " + backupFile.getAbsolutePath()); //$NON-NLS-1$
-						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_DATE + EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(System.currentTimeMillis())));
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERSION_COMMENT + EclipseDebugTrace.TRACE_FILE_VERSION);
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERBOSE_COMMENT + debugOptions.isVerbose());
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_DATE + getFormattedDate(timestamp));
 						traceWriter.flush();
 					} catch (IOException ioEx) {
 						ioEx.printStackTrace();
@@ -433,7 +465,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param comment the comment to be written to the trace file
 	 * @throws IOException If an error occurs while writing the comment
 	 */
-	protected void writeComment(final Writer traceWriter, final String comment) throws IOException {
+	private void writeComment(final Writer traceWriter, final String comment) throws IOException {
 
 		StringBuffer commentText = new StringBuffer(EclipseDebugTrace.TRACE_COMMENT);
 		commentText.append(" "); //$NON-NLS-1$
@@ -443,35 +475,53 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
-	 * Accessor to retrieve the current date and time in a formatted manner.
+	 * Accessor to retrieve the time stamp in a formatted manner.
 	 * 
 	 * @return A formatted time stamp based on the {@link EclipseDebugTrace#TRACE_FILE_DATE_FORMATTER} formatter
 	 */
-	protected final String getFormattedDate() {
+	private final String getFormattedDate(long timestamp) {
 
-		return this.getFormattedDate(System.currentTimeMillis());
+		return EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(timestamp));
 	}
 
 	/**
-	 * Accessor to retrieve the time stamp in a formatted manner.
+	 * Accessor to retrieve the text of a {@link Throwable} in a formatted manner so that it can be written to the
+	 * trace file. 
 	 * 
-	 * @return A formatted time stamp based on the {@link EclipseDebugTrace#TRACE_FILE_DATE_FORMATTER} formatter
+	 * @param error The {@lnk Throwable} to format
+	 * @return The complete text of a {@link Throwable} as a {@link String} or null if the input error is null.
 	 */
-	protected final String getFormattedDate(long timestamp) {
+	private final String getFormattedThrowable(Throwable error) {
 
-		return EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(timestamp));
+		String result = null;
+		if (error != null) {
+			PrintStream throwableStream = null;
+			try {
+				ByteArrayOutputStream throwableByteOutputStream = new ByteArrayOutputStream();
+				throwableStream = new PrintStream(throwableByteOutputStream, false);
+				error.printStackTrace(throwableStream);
+				result = encodeText(throwableByteOutputStream.toString());
+			} finally {
+				if (throwableStream != null) {
+					throwableStream.close();
+				}
+			}
+		}
+		return result;
 	}
 
 	/**
 	 * Writes header information to a new trace file
 	 * 
 	 * @param traceWriter the trace writer
+	 * @param timestamp the timestamp for the session; this is the same timestamp as the first entry
 	 * @throws IOException If an error occurs while writing this session information 
 	 */
-	protected void writeSession(final Writer traceWriter) throws IOException {
+	private void writeSession(final Writer traceWriter, long timestamp) throws IOException {
 
-		writeComment(traceWriter, EclipseDebugTrace.TRACE_NEW_SESSION + this.getFormattedDate());
+		writeComment(traceWriter, EclipseDebugTrace.TRACE_NEW_SESSION + this.getFormattedDate(timestamp));
 		writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERSION_COMMENT + EclipseDebugTrace.TRACE_FILE_VERSION);
+		writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERBOSE_COMMENT + debugOptions.isVerbose());
 		writeComment(traceWriter, "The following option strings are specified for this debug session:"); //$NON-NLS-1$ 
 		final String[] allOptions = FrameworkDebugOptions.getDefault().getAllOptions();
 		for (int i = 0; i < allOptions.length; i++) {
@@ -488,43 +538,53 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param entry The trace entry object to write to the trace file
 	 * @throws IOException If an error occurs while writing this message
 	 */
-	protected void writeMessage(final Writer traceWriter, final FrameworkDebugTraceEntry entry) throws IOException {
+	private void writeMessage(final Writer traceWriter, final FrameworkDebugTraceEntry entry) throws IOException {
 
-		// format the trace entry
-		StringBuffer message = new StringBuffer(entry.getThreadName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(this.getFormattedDate(entry.getTimestamp()));
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getBundleSymbolicName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getOptionPath());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+		final StringBuffer message = new StringBuffer(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getClassName());
+		message.append(encodeText(entry.getThreadName()));
 		message.append(" "); //$NON-NLS-1$
 		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getMethodName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getLineNumber());
+		message.append(this.getFormattedDate(entry.getTimestamp()));
 		message.append(" "); //$NON-NLS-1$
 		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getMessage());
+		if (!debugOptions.isVerbose()) {
+			// format the trace entry for quiet tracing: only the thread name, timestamp, trace message, and exception (if necessary)
+			message.append(encodeText(entry.getMessage()));
+		} else {
+			// format the trace entry for verbose tracing
+			message.append(entry.getBundleSymbolicName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(encodeText(entry.getOptionPath()));
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getClassName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getMethodName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getLineNumber());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(encodeText(entry.getMessage()));
+		}
 		if (entry.getThrowable() != null) {
+			message.append(" "); //$NON-NLS-1$
 			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 			message.append(" "); //$NON-NLS-1$
-			message.append(entry.getThrowable());
+			message.append(this.getFormattedThrowable(entry.getThrowable()));
 		}
+		message.append(" "); //$NON-NLS-1$
+		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(EclipseDebugTrace.LINE_SEPARATOR);
 		// write the message
 		if ((traceWriter != null) && (message != null)) {
@@ -533,11 +593,35 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
+	 * Encodes the specified string to replace any occurrence of the {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER}
+	 * string with the {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER_ENCODED}
+	 * string.  This can be used to ensure that the delimiter character does not break parsing when
+	 * the entry text contains the delimiter character. 
+	 * 
+	 * @param inputString The original string to be written to the trace file. 
+	 * @return The original input string with all occurrences of
+	 * {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER} replaced with 
+	 * {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER_ENCODED}. A <code>null</code> value will be
+	 * returned if the input string is <code>null</code>.
+	 */
+	private static String encodeText(final String inputString) {
+		if (inputString == null || inputString.indexOf(TRACE_ELEMENT_DELIMITER) < 0)
+			return inputString;
+		final StringBuffer tempBuffer = new StringBuffer(inputString);
+		int currentIndex = tempBuffer.indexOf(TRACE_ELEMENT_DELIMITER);
+		while (currentIndex >= 0) {
+			tempBuffer.replace(currentIndex, currentIndex + TRACE_ELEMENT_DELIMITER.length(), TRACE_ELEMENT_DELIMITER_ENCODED);
+			currentIndex = tempBuffer.indexOf(TRACE_ELEMENT_DELIMITER);
+		}
+		return tempBuffer.toString();
+	}
+
+	/**
 	 * Returns a Writer for the given OutputStream
 	 * @param output an OutputStream to use for the Writer
 	 * @return A Writer for the given OutputStream
 	 */
-	protected Writer logForStream(OutputStream output) {
+	private Writer logForStream(OutputStream output) {
 
 		try {
 			return new BufferedWriter(new OutputStreamWriter(output, "UTF-8")); //$NON-NLS-1$
@@ -553,7 +637,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param traceFile The tracing file
 	 * @return Returns a new Writer object  
 	 */
-	protected Writer openWriter(final File traceFile) {
+	private Writer openWriter(final File traceFile) {
 
 		Writer traceWriter = null;
 		if (traceFile != null) {
@@ -573,7 +657,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * 
 	 * @param traceWriter The trace writer
 	 */
-	protected void closeWriter(Writer traceWriter) {
+	private void closeWriter(Writer traceWriter) {
 
 		if (traceWriter != null) {
 			try {
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
index dd9dc4b..445ad49 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.service.debug.*;
 import org.osgi.framework.*;
@@ -30,9 +31,14 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
 public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustomizer {
 
 	private static final String OSGI_DEBUG = "osgi.debug"; //$NON-NLS-1$
+	private static final String OSGI_DEBUG_VERBOSE = "osgi.debug.verbose"; //$NON-NLS-1$
 	public static final String PROP_TRACEFILE = "osgi.tracefile"; //$NON-NLS-1$
-	/** A map of all the options specified for the product */
+	/** monitor used to lock the options maps */
+	private final Object lock = new Object();
+	/** A current map of all the options with values set */
 	private Properties options = null;
+	/** A map of all the disabled options with values set at the time debug was disabled */
+	private Properties disabledOptions = null;
 	/** The singleton object of this class */
 	private static FrameworkDebugOptions singleton = null;
 	/** The default name of the .options file if loading when the -debug command-line argument is used */
@@ -41,6 +47,8 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	protected final static Map debugTraceCache = new HashMap();
 	/** The File object to store messages.  This value may be null. */
 	protected File outFile = null;
+	/** Is verbose debugging enabled?  Changing this value causes a new tracing session to start. */
+	protected boolean verboseDebug = true;
 	private volatile BundleContext context;
 	private volatile ServiceTracker listenerTracker;
 
@@ -48,8 +56,50 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * Internal constructor to create a <code>FrameworkDebugOptions</code> singleton object. 
 	 */
 	private FrameworkDebugOptions() {
-		super();
-		loadOptions();
+		// check if verbose debugging was set during initialization.  This needs to be set even if debugging is disabled
+		this.verboseDebug = Boolean.valueOf(FrameworkProperties.getProperty(OSGI_DEBUG_VERBOSE, Boolean.TRUE.toString())).booleanValue();
+		// if no debug option was specified, don't even bother to try.
+		// Must ensure that the options slot is null as this is the signal to the
+		// platform that debugging is not enabled.
+		String debugOptionsFilename = FrameworkProperties.getProperty(OSGI_DEBUG);
+		if (debugOptionsFilename == null)
+			return;
+		options = new Properties();
+		URL optionsFile;
+		if (debugOptionsFilename.length() == 0) {
+			// default options location is user.dir (install location may be r/o so
+			// is not a good candidate for a trace options that need to be updatable by
+			// by the user)
+			String userDir = FrameworkProperties.getProperty("user.dir").replace(File.separatorChar, '/'); //$NON-NLS-1$
+			if (!userDir.endsWith("/")) //$NON-NLS-1$
+				userDir += "/"; //$NON-NLS-1$
+			debugOptionsFilename = new File(userDir, OPTIONS).toString();
+		}
+		optionsFile = buildURL(debugOptionsFilename, false);
+		if (optionsFile == null) {
+			System.out.println("Unable to construct URL for options file: " + debugOptionsFilename); //$NON-NLS-1$
+			return;
+		}
+		System.out.print("Debug options:\n    " + optionsFile.toExternalForm()); //$NON-NLS-1$
+		try {
+			InputStream input = optionsFile.openStream();
+			try {
+				options.load(input);
+				System.out.println(" loaded"); //$NON-NLS-1$
+			} finally {
+				input.close();
+			}
+		} catch (FileNotFoundException e) {
+			System.out.println(" not found"); //$NON-NLS-1$
+		} catch (IOException e) {
+			System.out.println(" did not parse"); //$NON-NLS-1$
+			e.printStackTrace(System.out);
+		}
+		// trim off all the blanks since properties files don't do that.
+		for (Iterator i = options.keySet().iterator(); i.hasNext();) {
+			Object key = i.next();
+			options.put(key, ((String) options.get(key)).trim());
+		}
 	}
 
 	public void start(BundleContext bc) {
@@ -110,47 +160,26 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 */
 	public boolean getBooleanOption(String option, boolean defaultValue) {
 		String optionValue = getOption(option);
-		return (optionValue != null && optionValue.equalsIgnoreCase("true")) || defaultValue; //$NON-NLS-1$
-	}
-
-	public String[] getOptionsForBundle(String bundleName) {
-
-		List optionsList = null;
-		if (options != null) {
-			optionsList = new ArrayList();
-			final Iterator entrySetIterator = options.entrySet().iterator();
-			int i = 0;
-			String key = null;
-			while (entrySetIterator.hasNext()) {
-				Map.Entry entry = (Map.Entry) entrySetIterator.next();
-				key = (String) entry.getKey();
-				int firstOptionPathIndex = key.indexOf("/"); //$NON-NLS-1$
-				if (key.substring(0, firstOptionPathIndex).equals(bundleName)) {
-					optionsList.add(((String) entry.getKey()) + "=" + ((String) entry.getValue())); //$NON-NLS-1$
-					i++;
-				}
-			}
-		}
-		if (optionsList == null) {
-			optionsList = Collections.EMPTY_LIST;
-		}
-		// convert the list to an array
-		final String[] optionsArray = (String[]) optionsList.toArray(new String[optionsList.size()]);
-		return optionsArray;
+		return optionValue != null ? optionValue.equalsIgnoreCase("true") : defaultValue; //$NON-NLS-1$
 	}
 
 	/**
 	 * @see DebugOptions#getOption(String)
 	 */
 	public String getOption(String option) {
-		return options != null ? options.getProperty(option) : null;
+		return getOption(option, null);
 	}
 
 	/**
 	 * @see DebugOptions#getOption(String, String)
 	 */
 	public String getOption(String option, String defaultValue) {
-		return options != null ? options.getProperty(option, defaultValue) : defaultValue;
+		synchronized (lock) {
+			if (options != null) {
+				return options.getProperty(option, defaultValue);
+			}
+		}
+		return defaultValue;
 	}
 
 	/**
@@ -165,6 +194,17 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 		}
 	}
 
+	public Map getOptions() {
+		Properties snapShot = new Properties();
+		synchronized (lock) {
+			if (options != null)
+				snapShot.putAll(options);
+			else if (disabledOptions != null)
+				snapShot.putAll(disabledOptions);
+		}
+		return snapShot;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#getAllOptions()
@@ -172,18 +212,20 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	String[] getAllOptions() {
 
 		String[] optionsArray = null;
-		if (options != null) {
-			optionsArray = new String[options.size()];
-			final Iterator entrySetIterator = options.entrySet().iterator();
-			int i = 0;
-			while (entrySetIterator.hasNext()) {
-				Map.Entry entry = (Map.Entry) entrySetIterator.next();
-				optionsArray[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue()); //$NON-NLS-1$
-				i++;
+		synchronized (lock) {
+			if (options != null) {
+				optionsArray = new String[options.size()];
+				final Iterator entrySetIterator = options.entrySet().iterator();
+				int i = 0;
+				while (entrySetIterator.hasNext()) {
+					Map.Entry entry = (Map.Entry) entrySetIterator.next();
+					optionsArray[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue()); //$NON-NLS-1$
+					i++;
+				}
 			}
 		}
 		if (optionsArray == null) {
-			optionsArray = new String[1];
+			optionsArray = new String[1]; // TODO this is strange; null is the only element so we can print null in writeSession
 		}
 		return optionsArray;
 	}
@@ -193,12 +235,17 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#removeOption(java.lang.String)
 	 */
 	public void removeOption(String option) {
-
-		if (option != null) {
-			this.options.remove(option);
-			final int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
-			final String symbolicName = option.substring(0, firstSlashIndex);
-			this.optionsChanged(symbolicName);
+		if (option == null)
+			return;
+		String fireChangedEvent = null;
+		synchronized (lock) {
+			if (options != null && options.remove(option) != null) {
+				fireChangedEvent = getSymbolicName(option);
+			}
+		}
+		// Send the options change event outside the sync block
+		if (fireChangedEvent != null) {
+			optionsChanged(fireChangedEvent);
 		}
 	}
 
@@ -207,74 +254,88 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#setOption(java.lang.String, java.lang.String)
 	 */
 	public void setOption(String option, String value) {
-		if (options != null) {
-			// get the current value
-			String currentValue = options.getProperty(option);
-			boolean optionValueHasChanged = false;
-			if (currentValue != null) {
-				if (!currentValue.equals(value)) {
-					optionValueHasChanged = true;
+
+		if (option == null || value == null) {
+			throw new IllegalArgumentException("The option and value must not be null."); //$NON-NLS-1$
+		}
+		String fireChangedEvent = null;
+		value = value != null ? value.trim() : null;
+		synchronized (lock) {
+			if (options != null) {
+				// get the current value
+				String currentValue = options.getProperty(option);
+
+				if (currentValue != null) {
+					if (!currentValue.equals(value)) {
+						fireChangedEvent = getSymbolicName(option);
+					}
+				} else {
+					if (value != null) {
+						fireChangedEvent = getSymbolicName(option);
+					}
 				}
-			} else {
-				if (value != null) {
-					optionValueHasChanged = true;
+				if (fireChangedEvent != null) {
+					options.put(option, value);
 				}
 			}
-			if (optionValueHasChanged) {
-				options.put(option, value.trim());
-				final int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
-				final String symbolicName = option.substring(0, firstSlashIndex);
-				this.optionsChanged(symbolicName);
-			}
 		}
+		// Send the options change event outside the sync block
+		if (fireChangedEvent != null) {
+			optionsChanged(fireChangedEvent);
+		}
+	}
 
+	private String getSymbolicName(String option) {
+		int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
+		if (firstSlashIndex > 0)
+			return option.substring(0, firstSlashIndex);
+		return null;
 	}
 
-	private void loadOptions() {
-		// if no debug option was specified, don't even bother to try.
-		// Must ensure that the options slot is null as this is the signal to the
-		// platform that debugging is not enabled.
-		String debugOptionsFilename = FrameworkProperties.getProperty(OSGI_DEBUG);
-		if (debugOptionsFilename == null)
-			return;
-		options = new Properties();
-		URL optionsFile;
-		if (debugOptionsFilename.length() == 0) {
-			// default options location is user.dir (install location may be r/o so
-			// is not a good candidate for a trace options that need to be updatable by
-			// by the user)
-			String userDir = FrameworkProperties.getProperty("user.dir").replace(File.separatorChar, '/'); //$NON-NLS-1$
-			if (!userDir.endsWith("/")) //$NON-NLS-1$
-				userDir += "/"; //$NON-NLS-1$
-			debugOptionsFilename = new File(userDir, OPTIONS).toString();
+	public void setOptions(Map ops) {
+		if (ops == null)
+			throw new IllegalArgumentException("The options must not be null."); //$NON-NLS-1$
+		Properties newOptions = new Properties();
+		for (Iterator entries = ops.entrySet().iterator(); entries.hasNext();) {
+			Entry entry = (Entry) entries.next();
+			if (!(entry.getKey() instanceof String) || !(entry.getValue() instanceof String))
+				throw new IllegalArgumentException("Option keys and values must be of type String: " + entry.getKey() + "=" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
+			newOptions.put(entry.getKey(), ((String) entry.getValue()).trim());
 		}
-		optionsFile = buildURL(debugOptionsFilename, false);
-		if (optionsFile == null) {
-			System.out.println("Unable to construct URL for options file: " + debugOptionsFilename); //$NON-NLS-1$
-			return;
-		}
-		System.out.print("Debug options:\n    " + optionsFile.toExternalForm()); //$NON-NLS-1$
-		try {
-			InputStream input = optionsFile.openStream();
-			try {
-				options.load(input);
-				System.out.println(" loaded"); //$NON-NLS-1$
-			} finally {
-				input.close();
+		Set fireChangesTo = null;
+
+		synchronized (lock) {
+			if (options == null) {
+				disabledOptions = newOptions;
+				// no events to fire
+				return;
 			}
-		} catch (FileNotFoundException e) {
-			System.out.println(" not found"); //$NON-NLS-1$
-		} catch (IOException e) {
-			System.out.println(" did not parse"); //$NON-NLS-1$
-			e.printStackTrace(System.out);
-		}
-		// trim off all the blanks since properties files don't do that.
-		for (Iterator i = options.keySet().iterator(); i.hasNext();) {
-			Object key = i.next();
-			options.put(key, ((String) options.get(key)).trim());
+			fireChangesTo = new HashSet();
+			// first check for removals
+			for (Iterator keys = options.keySet().iterator(); keys.hasNext();) {
+				String key = (String) keys.next();
+				if (!newOptions.containsKey(key)) {
+					String symbolicName = getSymbolicName(key);
+					if (symbolicName != null)
+						fireChangesTo.add(symbolicName);
+				}
+			}
+			// now check for changes to existing values
+			for (Iterator newEntries = newOptions.entrySet().iterator(); newEntries.hasNext();) {
+				Entry entry = (Entry) newEntries.next();
+				String existingValue = (String) options.get(entry.getKey());
+				if (!entry.getValue().equals(existingValue)) {
+					String symbolicName = getSymbolicName((String) entry.getKey());
+					if (symbolicName != null)
+						fireChangesTo.add(symbolicName);
+				}
+			}
+			// finally set the actual options
+			options = newOptions;
 		}
-		if (options.size() == 0)
-			options = null;
+		if (fireChangesTo != null)
+			for (Iterator iChanges = fireChangesTo.iterator(); iChanges.hasNext();)
+				optionsChanged((String) iChanges.next());
 	}
 
 	/*
@@ -282,9 +343,9 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#isDebugEnabled()
 	 */
 	public boolean isDebugEnabled() {
-
-		//return options != null;
-		return (FrameworkProperties.getProperty(OSGI_DEBUG) != null);
+		synchronized (lock) {
+			return options != null;
+		}
 	}
 
 	/*
@@ -292,18 +353,41 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#setDebugEnabled()
 	 */
 	public void setDebugEnabled(boolean enabled) {
-		if (enabled) {
-			if (!this.isDebugEnabled()) {
+		boolean fireChangedEvent = false;
+		synchronized (lock) {
+			if (enabled) {
+				if (options != null)
+					return;
 				// notify the trace that a new session is started
 				EclipseDebugTrace.newSession = true;
+
+				// enable platform debugging - there is no .options file
+				FrameworkProperties.setProperty(OSGI_DEBUG, ""); //$NON-NLS-1$
+				if (disabledOptions != null) {
+					options = disabledOptions;
+					disabledOptions = null;
+					// fire changed event to indicate some options were re-enabled
+					fireChangedEvent = true;
+				} else {
+					options = new Properties();
+				}
+			} else {
+				if (options == null)
+					return;
+				// disable platform debugging.
+				FrameworkProperties.clearProperty(OSGI_DEBUG);
+				if (options.size() > 0) {
+					// Save the current options off in case debug is re-enabled
+					disabledOptions = options;
+					// fire changed event to indicate some options were disabled
+					fireChangedEvent = true;
+				}
+				options = null;
 			}
-			// enable platform debugging - there is no .options file
-			FrameworkProperties.setProperty(OSGI_DEBUG, ""); //$NON-NLS-1$
-			if (this.options == null)
-				this.options = new Properties();
-		} else {
-			// disable platform debugging.
-			FrameworkProperties.clearProperty(OSGI_DEBUG);
+		}
+		if (fireChangedEvent) {
+			// (Bug 300911) need to fire event to listeners that options have been disabled
+			optionsChanged("*"); //$NON-NLS-1$
 		}
 	}
 
@@ -354,6 +438,26 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 		EclipseDebugTrace.newSession = true;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.osgi.service.debug.DebugOptions#getVerbose()
+	 */
+	boolean isVerbose() {
+
+		return this.verboseDebug;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.osgi.service.debug.DebugOptions#setVerbose(boolean)
+	 */
+	public synchronized void setVerbose(final boolean verbose) {
+
+		this.verboseDebug = verbose;
+		// the verbose flag changed so start a new session
+		EclipseDebugTrace.newSession = true;
+	}
+
 	/**
 	 * Notifies the trace listener for the specified bundle that its option-path has changed.
 	 * @param bundleSymbolicName The bundle of the owning trace listener to notify.
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
index a057932..0fca678 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,7 @@ public class FrameworkDebugTraceEntry {
 	/**
 	 * The method being traced
 	 */
-	private String methodName = null;
+	private final String methodName;
 
 	/**
 	 * The line number
@@ -56,7 +56,7 @@ public class FrameworkDebugTraceEntry {
 	/**
 	 * The trace message
 	 */
-	private final String message;
+	private String message;
 
 	/**
 	 * The trace exception
@@ -75,7 +75,7 @@ public class FrameworkDebugTraceEntry {
 	 * @param traceClass
 	 *            The class that calls the trace API
 	 */
-	public FrameworkDebugTraceEntry(final String bundleSymbolicName, final String optionPath, final String message, final Class traceClass) {
+	public FrameworkDebugTraceEntry(final String bundleSymbolicName, final String optionPath, final String message, final String traceClass) {
 		this(bundleSymbolicName, optionPath, message, null, traceClass);
 	}
 
@@ -93,7 +93,7 @@ public class FrameworkDebugTraceEntry {
 	 * @param traceClass
 	 *            The class that calls the trace API 
 	 */
-	public FrameworkDebugTraceEntry(String bundleSymbolicName, final String optionPath, final String message, final Throwable error, final Class traceClass) {
+	public FrameworkDebugTraceEntry(String bundleSymbolicName, final String optionPath, final String message, final Throwable error, final String traceClass) {
 		threadName = Thread.currentThread().getName();
 		if (optionPath == null) {
 			this.optionPath = FrameworkDebugTraceEntry.DEFAULT_OPTION_PATH;
@@ -122,12 +122,12 @@ public class FrameworkDebugTraceEntry {
 				 * stack element is not that class, then we assume this stack element
 				 * is the caller of the trace API. 
 				 */
-				if ((traceClass == null) || !fullClassName.equals(traceClass.getName())) {
+				if ((traceClass == null) || !fullClassName.equals(traceClass)) {
 					determineClassName = stackElements[i].getClassName();
 					determineMethodName = stackElements[i].getMethodName();
 					determineLineNumber = stackElements[i].getLineNumber();
+					break; // only break when the right stack element has been found; Otherwise keep trying
 				}
-				break;
 			}
 			i++;
 		}
@@ -264,4 +264,13 @@ public class FrameworkDebugTraceEntry {
 
 		return lineNumber;
 	}
+
+	/**
+	 * 
+	 * @param newMessage
+	 */
+	void setMessage(final String newMessage) {
+
+		message = newMessage;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
index c814fce..1c73f44 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -25,9 +25,9 @@ BUNDLE_STATE_CHANGE_EXCEPTION=State change in progress for bundle \"{0}\" by thr
 BUNDLE_REFRESH_FAILURE=PackageAdmin.refreshPackages failed to complete
 BUNDLE_ACTIVATOR_EXCEPTION=Exception in {0}.{1}() of bundle {2}.
 BUNDLE_INVALID_ACTIVATOR_EXCEPTION=The activator {0} for bundle {1} is invalid
-BUNDLE_UNRESOLVED_EXCEPTION=The bundle could not be resolved
+BUNDLE_UNRESOLVED_EXCEPTION=The bundle \"{0}\" could not be resolved
 BUNDLE_UNRESOLVED_STATE_CONFLICT=The state indicates the bundle is resolved
-BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION=The bundle could not be resolved. Reason: {0}
+BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION=The bundle \"{0}\" could not be resolved. Reason: {1}
 BUNDLE_SYSTEMBUNDLE_UNINSTALL_EXCEPTION=The System Bundle cannot be uninstalled
 BUNDLE_READ_EXCEPTION=An error occurred trying to read the bundle
 BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION=The Bundle-ClassPath entry \"{0}\" was not found in the bundle: {1}
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/log/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/log/package.html
new file mode 100644
index 0000000..a4db43c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/log/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>FrameworkLog</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>FrameworkLog</tt> service.
+<p>
+Clients needing to log entries to the eclipse log will likely be interested 
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/util/SecureAction.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
index d13a683..7a25fb5 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.*;
 import java.net.*;
 import java.security.*;
 import java.util.Properties;
+import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.osgi.framework.*;
@@ -31,9 +32,7 @@ public class SecureAction {
 	// This ClassLoader is used in loadSystemClass if System.getClassLoader() returns null
 	static final ClassLoader bootClassLoader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
 		public Object run() {
-			return new ClassLoader(null) {
-				// parentless ClassLoader
-			};
+			return new ClassLoader(Object.class.getClassLoader()) { /* boot class loader */};
 		}
 	});
 
@@ -247,18 +246,28 @@ public class SecureAction {
 	 * @throws IOException if an error occured
 	 */
 	public ZipFile getZipFile(final File file) throws IOException {
-		if (System.getSecurityManager() == null)
-			return new ZipFile(file);
 		try {
-			return (ZipFile) AccessController.doPrivileged(new PrivilegedExceptionAction() {
-				public Object run() throws IOException {
-					return new ZipFile(file);
-				}
-			}, controlContext);
-		} catch (PrivilegedActionException e) {
-			if (e.getException() instanceof IOException)
-				throw (IOException) e.getException();
-			throw (RuntimeException) e.getException();
+			if (System.getSecurityManager() == null)
+				return new ZipFile(file);
+			try {
+				return (ZipFile) AccessController.doPrivileged(new PrivilegedExceptionAction() {
+					public Object run() throws IOException {
+						return new ZipFile(file);
+					}
+				}, controlContext);
+			} catch (PrivilegedActionException e) {
+				if (e.getException() instanceof IOException)
+					throw (IOException) e.getException();
+				throw (RuntimeException) e.getException();
+			}
+		} catch (ZipException e) {
+			ZipException zipNameException = new ZipException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
+			zipNameException.initCause(e);
+			throw zipNameException;
+		} catch (IOException e) {
+			IOException fileNameException = new IOException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
+			fileNameException.initCause(e);
+			throw fileNameException;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/datalocation/Location.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/datalocation/Location.java
index 29e5236..8ae3658 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/datalocation/Location.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/datalocation/Location.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -199,4 +199,27 @@ public interface Location {
 	 * @since 3.4
 	 */
 	public Location createLocation(Location parent, URL defaultValue, boolean readonly);
+
+	/**
+	 * Returns a URL to the specified path within this location.  The path 
+	 * of the returned URL may not exist yet.  It is the responsibility of the 
+	 * client to create the content of the data area returned if it does not exist.
+	 * <p>
+	 * This method can be used to obtain a private area within the given location. 
+	 * For example use the symbolic name of a bundle to obtain a data area specific 
+	 * to that bundle.
+	 * </p>
+	 * <p>
+	 * Clients should check if the location is read only before writing anything
+	 * to the returned data area.  An <code>IOException</code> will be thrown if
+	 * this method is called and the location URL has not been set and there is
+	 * no default value for this location.
+	 * </p>
+	 * 
+	 * @param path the name of the path to get from this location
+	 * @return the URL to the data area with the specified path.
+	 * @throws IOException if the location URL is not already set
+	 * @since 3.6
+	 */
+	public URL getDataArea(String path) throws IOException;
 }
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
index 11e7af8..9e6b3bd 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.osgi.service.debug;
 
 import java.io.File;
+import java.util.Map;
 
 /**
  * Used to get debug options settings and creating a new {@link DebugTrace} instance for
@@ -31,10 +32,13 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option as a boolean value.  The specified
-	 * defaultValue is returned if no such option is found.   Options are specified
-	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
+	 * defaultValue is returned if no such option is found or if debug is not enabled.   
+	 * 
+	 * <p>
+	 * Options are specified in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -43,11 +47,15 @@ public interface DebugOptions {
 	public abstract boolean getBooleanOption(String option, boolean defaultValue);
 
 	/**
-	 * Returns the identified option.  <code>null</code>
-	 * is returned if no such option is found.   Options are specified
+	 * Returns the identified option.  A <code>null</code> value
+	 * is returned if no such option is found or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 *</p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @return the value of the requested debug option or <code>null</code>
 	 */
@@ -55,11 +63,14 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option.  The specified defaultValue is 
-	 * returned if no such option is found or if a NumberFormatException is thrown 
-	 * while converting the option value to an integer.   Options are specified
+	 * returned if no such option is found or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -69,10 +80,16 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option as an int value.  The specified
-	 * defaultValue is returned if no such option is found.   Options are specified
+	 * defaultValue is returned if no such option is found or if a 
+	 * NumberFormatException is thrown while converting the option value 
+	 * to an integer or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -81,30 +98,71 @@ public interface DebugOptions {
 	public abstract int getIntegerOption(String option, int defaultValue);
 
 	/**
-	 * Sets the identified option to the identified value.
+	 * Returns a snapshot of the current options.  All 
+	 * keys and values are of type <code>String</code>.  If no
+	 * options are set then an empty map is returned.
+	 * <p>
+	 * If debug is not enabled then the snapshot of the current disabled 
+	 * values is returned. See {@link DebugOptions#setDebugEnabled(boolean)}.
+	 * </p>
+	 * @return a snapshot of the current options.
+	 * @since 3.6
+	 */
+	public Map /*<String, String>*/getOptions();
+
+	/**
+	 * Sets the identified option to the identified value.  If debug is 
+	 * not enabled then the specified option is not changed.
 	 * @param option the name of the option to set
 	 * @param value the value of the option to set
 	 */
 	public abstract void setOption(String option, String value);
 
 	/**
-	 * Removes the identified option
+	 * Sets the current option key/value pairs to the specified options.
+	 * The specified map replaces all keys and values of the current debug options.
+	 * An <code>IllegalArgumentException</code> is thrown if any key or value 
+	 * in the specified map is not of type <code>String</code>.
+	 * <p>
+	 * If debug is not enabled then the specified options are saved as
+	 * the disabled values and no notifications will be sent. 
+	 * See {@link DebugOptions#setDebugEnabled(boolean)}.
+	 * If debug is enabled then notifications will be sent to the 
+	 * listeners which have options that have been changed, added or removed.
+	 * </p>
+
+	 * @param options the new set of options
+	 * @since 3.6
+	 */
+	public abstract void setOptions(Map /*<String, String>*/options);
+
+	/**
+	 * Removes the identified option.  If debug is not enabled then
+	 * the specified option is not removed.
 	 * @param option the name of the option to remove
 	 * @since 3.5
 	 */
 	public abstract void removeOption(String option);
 
 	/**
-	 * Accessor to determine if debugging/tracing is enabled for the product.
-	 * @return true if debugging/tracing is enabled;  Otherwise false is returned.
+	 * Returns true if debugging/tracing is currently enabled.
+	 * @return true if debugging/tracing is currently enabled;  Otherwise false is returned.
 	 * @since 3.5
 	 */
 	public abstract boolean isDebugEnabled();
 
 	/**
-	 * Enables or disables debug tracing for the entire application.
-	 * @param value If <code>true</code>, debugging is enabled, otherwise
-	 * debugging is disabled
+	 * Enables or disables debugging/tracing.
+	 * <p>
+	 * When debug is disabled all debug options are unset.
+	 * When disabling debug the current debug option values are
+	 * stored in memory as disabled values.  If debug is re-enabled the
+	 * disabled values will be set back and enabled.  The disabled values 
+	 * are only stored in memory and if the framework is restarted then 
+	 * the disabled option values will be lost.
+	 * </p>
+	 * @param value If <code>true</code>, debug is enabled, otherwise
+	 * debug is disabled.
 	 * @since 3.5
 	 */
 	public abstract void setDebugEnabled(boolean value);
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
index 592bc2d..ac6ca3c 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,9 @@ import java.util.EventListener;
  * <p>
  * The {@link DebugOptionsListener#optionsChanged(DebugOptions)} method will automatically 
  * be called upon registration of the debug options listener service.  This allows the 
- * listener to obtain the initial debug options.
+ * listener to obtain the initial debug options.  This initial call to the listener 
+ * will happen even if debug is not enabled at the time of registration 
+ * ({@link DebugOptions#isDebugEnabled()} will return false in this case).
  * </p>
  * A debug options listener allows a bundle to cache trace option values in boolean fields for performance
  * and code cleanliness. For example:
@@ -55,7 +57,7 @@ public interface DebugOptionsListener extends EventListener {
 	 * Notifies this listener that an option-path for its plug-in has changed.
 	 * This method is also called initially by the DebugOptions implementation 
 	 * when the listener is registered as a service.  This allows the listener
-	 * to obtain the initial set of debug options with out the need to 
+	 * to obtain the initial set of debug options without the need to 
 	 * acquire the debug options service.
 	 * @param options a reference to the DebugOptions
 	 */
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
index 33c3e9d..a6768b7 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,11 @@ package org.eclipse.osgi.service.debug;
  * of "/debug/parser", the trace will only be printed if the option "com.acme.bundle/debug/parser"
  * has a value of "true".
  * </p>
+ * <p>
+ * Note that the pipe character ("|") is reserved for internal use. If this character 
+ * happens to occur in any of the thread name, the option, the message or an Exception
+ * message, it will be escaped to the corresponding HTML representation ("&amp#124;").   
+ * </p>
  *  
  * @since 3.5
  * @noimplement This interface is not intended to be implemented by clients.
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/package.html
new file mode 100644
index 0000000..8c32c76
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/debug/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>DebugOptions</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>DebugOptions</tt> service.
+<p>
+Clients accessing debug and trace options will likely be interested 
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/Constants.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/Constants.java
index bfb6526..4b017cd 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/Constants.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/Constants.java
@@ -117,6 +117,13 @@ public interface Constants {
 	public static final String ARCH_PPC = "ppc";//$NON-NLS-1$
 
 	/**
+	 * Constant string (value "ppc64") indicating the platform is running on an
+	 * PowerPC-based 64-bit architecture.
+	 * @since 3.6
+	 */
+	public static final String ARCH_PPC64 = "ppc64";//$NON-NLS-1$
+
+	/**
 	 * Constant string (value "sparc") indicating the platform is running on an
 	 * Sparc-based architecture.
 	 */
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/package.html
new file mode 100644
index 0000000..ef6f904
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/environment/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>EnvironmentInfo</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>EnvironmentInfo</tt> service.
+<p>
+Clients accessing the command line used to start the running framework 
+as well as information about the environment will likely be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java
new file mode 100644
index 0000000..2dde516
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osgi.service.localization;
+
+import java.util.Locale;
+
+/**
+ * A service that is used to determine what the current locale is for a 
+ * particular context or session.  If no <code>LocaleProvider</code> 
+ * service is available then the locale must be determined by other 
+ * means, for example, by calling {@link Locale#getDefault()}.
+ * <p>
+ * More advanced environments can support multiple locales within a 
+ * single system.  For example, a server may support multiple users, 
+ * each needing a different locale.  In such an environment a 
+ * <code>LocaleProvider</code> service must be registered that can 
+ * determine the current locale for the context of the call to the 
+ * {@link #getLocale()} method.
+ * </p>
+ * @since 1.1
+ */
+public interface LocaleProvider {
+
+	/**
+	 * Determines the current locale for the context of the call to 
+	 * this method.  For environments that support a single system wide 
+	 * locale, this is equivalent to calling {@link Locale#getDefault()}.
+	 * <p>
+	 * The result of this method should not be retained or passed to other 
+	 * threads.  The current locale can change any time and may be 
+	 * different for each thread.
+	 * </p>
+	 * @return The current locale.
+	 */
+	public Locale getLocale();
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/package.html
new file mode 100644
index 0000000..07ddb00
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/localization/package.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides bundle localization and local provider service APIs.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>BundleLocalization</tt> and
+<tt>LocalePrivder</tt> services.
+<p>
+Clients accessing the localization resource bundles use to localize 
+OSGi bundle manifests will likely be interested in the types provided 
+by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
index b1be943..85128c9 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,10 @@ package org.eclipse.osgi.service.runnable;
  * <p>
  * This interface is not intended to be implemented by clients.
  * </p>
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * 
  * @since 3.2
  * @noimplement This interface is not intended to be implemented by clients.
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
index c01f2ec..1d9efee 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,10 @@ package org.eclipse.osgi.service.runnable;
 
 /**
  * A parameterized runnable that can be stopped.
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * @since 3.2
  */
 public interface ApplicationRunnable extends ParameterizedRunnable {
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
index 2489dbd..e75c891 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,10 @@ package org.eclipse.osgi.service.runnable;
  * <p>
  * Clients may implement this interface.
  * </p>
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * @since 3.0
  */
 public interface ParameterizedRunnable {
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/package.html
new file mode 100644
index 0000000..03dbe8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/service/runnable/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides API for monitoring and running code on the main thread.
+<h2>
+Package Specification</h2>
+This package specifies the API for monitoring and running code on the main thread.
+<p>
+Clients that monitor the startup sequence will likely be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
index cf23f27..3ebfe71 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -87,12 +87,14 @@ public final class StorageManager {
 	private static final int FILETYPE_STANDARD = 0;
 	private static final int FILETYPE_RELIABLEFILE = 1;
 	private static final SecureAction secure = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
-	private static boolean tempCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanTempFiles")).booleanValue(); //$NON-NLS-1$
-	private static boolean openCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnOpen")).booleanValue(); //$NON-NLS-1$
+	private static final boolean tempCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanTempFiles")).booleanValue(); //$NON-NLS-1$
+	private static final boolean openCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnOpen")).booleanValue(); //$NON-NLS-1$
 	private static final String MANAGER_FOLDER = ".manager"; //$NON-NLS-1$
 	private static final String TABLE_FILE = ".fileTable"; //$NON-NLS-1$
 	private static final String LOCK_FILE = ".fileTableLock"; //$NON-NLS-1$
 	private static final int MAX_LOCK_WAIT = 5000; // 5 seconds 
+	// this should be static but the tests expect to be able to create new managers after changing this setting dynamically
+	private final boolean useReliableFiles = Boolean.valueOf(secure.getProperty("osgi.useReliableFiles")).booleanValue(); //$NON-NLS-1$
 
 	private class Entry {
 		int readId;
@@ -130,24 +132,23 @@ public final class StorageManager {
 		}
 	}
 
-	private File base; //The folder managed
-	private File managerRoot; //The folder that will contain all the file related to the functionning of the manager (typically a subdir of base)
+	private final File base; //The folder managed
+	private final File managerRoot; //The folder that will contain all the file related to the functionning of the manager (typically a subdir of base)
 
-	private String lockMode = null;
-	private File tableFile = null;
-	private File lockFile; // The lock file for the table (this file is the same for all the instances)
+	private final String lockMode;
+	private final File tableFile;
+	private final File lockFile; // The lock file for the table (this file is the same for all the instances)
 	private Locker locker; // The locker for the lock
 
-	private File instanceFile = null; //The file reprensenting the running instance. It is created when the table file is read.
+	private File instanceFile; //The file representing the running instance. It is created when the table file is read.
 	private Locker instanceLocker = null; //The locker for the instance file.
-	private boolean readOnly; // Whether this storage manager is in read-only mode
+	private final boolean readOnly; // Whether this storage manager is in read-only mode
 	private boolean open; // Whether this storage manager is open for use
 
 	// locking related fields
 	private int tableStamp = -1;
 
-	private Properties table = new Properties();
-	private boolean useReliableFiles = Boolean.valueOf(secure.getProperty("osgi.useReliableFiles")).booleanValue(); //$NON-NLS-1$
+	private final Properties table = new Properties();
 
 	/**
 	 * Returns a new storage manager for the area identified by the given base
@@ -174,8 +175,6 @@ public final class StorageManager {
 		this.base = base;
 		this.lockMode = lockMode;
 		this.managerRoot = new File(base, MANAGER_FOLDER);
-		if (!readOnly)
-			this.managerRoot.mkdirs();
 		this.tableFile = new File(managerRoot, TABLE_FILE);
 		this.lockFile = new File(managerRoot, LOCK_FILE);
 		this.readOnly = readOnly;
@@ -677,12 +676,15 @@ public final class StorageManager {
 	 * This methods opens the storage manager. 
 	 * This method must be called before any operation on the storage manager.
 	 * @param wait indicates if the open operation must wait in case of contention on the lock file.
-	 * @throws IOException if an error occured opening the storage manager
+	 * @throws IOException if an error occurred opening the storage manager
 	 */
 	public void open(boolean wait) throws IOException {
 		if (openCleanup)
 			cleanup();
 		if (!readOnly) {
+			managerRoot.mkdirs();
+			if (!managerRoot.exists())
+				throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);
 			boolean locked = lock(wait);
 			if (!locked && wait)
 				throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/package.html b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/package.html
new file mode 100644
index 0000000..6607759
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/storagemanager/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the storage manager API.
+<h2>
+Package Specification</h2>
+This package specifies the API for managing a group of files that are related to each other.
+<p>
+Clients that manage groups of files that are closely related to each other may be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/ManifestElement.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/ManifestElement.java
index ad48d85..17e0c48 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,19 +22,22 @@ import org.osgi.framework.BundleException;
  * This class represents a single manifest element.  A manifest element must consist of a single
  * {@link String} value.  The {@link String} value may be split up into component values each
  * separated by a semi-colon (';').  A manifest element may optionally have a set of 
- * attribute values associated with it. The general syntax of a manifest element is as follows:
+ * attribute and directive values associated with it. The general syntax of a manifest element is as follows:
  * <p>
  * <pre>
- * ManifestElement ::= headervalues (';' attribute)*
- * headervalues ::= headervalue (';' headervalue)*
- * headervalue ::= <any string value that does not have ';'>
- * attribute ::= key '=' value
- * key ::= token
- * value ::= token | quoted-string
+ * ManifestElement ::= component (';' component)* (';' parameter)*
+ * component ::= ([^;,:="\#x0D#x0A#x00])+ | quoted-string
+ * quoted-string::= '"' ( [^"\#x0D#x0A#x00] | '\"'| '\\')* '"'
+ * parameter ::= directive | attribute 
+ * directive ::= token ':=' argument
+ * attribute ::= token '=' argument
+ * argument ::= extended  | quoted-string
+ * token ::= ( alphanum | '_' | '-' )+ 
+ * extended ::= ( alphanum | '_' | '-' | '.' )+ 
  * </pre>
  * </p>
  * <p>
- * For example, The following is an example of a manifest element to the <tt>Export-Package</tt> header:
+ * For example, the following is an example of a manifest element to the <tt>Export-Package</tt> header:
  * </p>
  * <p>
  * <pre>
@@ -60,6 +63,18 @@ import org.osgi.framework.BundleException;
  * components: <tt>code1.jar</tt>, <tt>code2.jar</tt>, and <tt>code3.jar</tt>.
  * </p>
  * <p>
+ * If components contain delimiter characters (e.g ';', ',' ':' "=") then it must be
+ * a quoted string.  For example, the following is an example of a manifest element 
+ * that has multiple components containing delimiter characters:
+ * </p>
+ * <pre>
+ * "component ; 1"; "component , 2"; "component : 3"; attr1=value1; attr2=value2; attr3=value3
+ * </pre>
+ * <p>
+ * This manifest element has a value of <tt>"component ; 1"; "component , 2"; "component : 3"</tt>.  
+ * This value has three components: <tt>"component ; 1"</tt>, <tt>"component , 2"</tt>, <tt>"component : 3"</tt>.
+ * </p>
+ * <p>
  * This class is not intended to be subclassed by clients.
  * </p>
  * 
@@ -97,7 +112,7 @@ public class ManifestElement {
 
 	/**
 	 * Returns the value of the manifest element.  The value returned is the
-	 * complete value up to the first attribute.  For example, the 
+	 * complete value up to the first attribute or directive.  For example, the 
 	 * following manifest element: 
 	 * <p>
 	 * <pre>
@@ -117,8 +132,8 @@ public class ManifestElement {
 	/**
 	 * Returns the value components of the manifest element. The value
 	 * components returned are the complete list of value components up to 
-	 * the first attribute.  
-	 * For example, the folowing manifest element: 
+	 * the first attribute or directive.  
+	 * For example, the following manifest element: 
 	 * <p>
 	 * <pre>
 	 * test1.jar;test2.jar;test3.jar;selection-filter="(os.name=Windows XP)"
@@ -395,7 +410,7 @@ public class ManifestElement {
 						manifestElement.addAttribute(next, val);
 					directive = false;
 				} catch (Exception e) {
-					throw new BundleException(NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, header, value), BundleException.MANIFEST_ERROR);
+					throw new BundleException(NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, header, value), BundleException.MANIFEST_ERROR, e);
 				}
 				c = tokenizer.getChar();
 				if (c == ';') /* more */{
diff --git a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/NLS.java b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/NLS.java
index 71769d8..058e4a1 100644
--- a/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/NLS.java
+++ b/eclipse/plugins/org.eclipse.equinox.supplement/src/org/eclipse/osgi/util/NLS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
 import org.eclipse.osgi.framework.debug.Debug;
+import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
@@ -54,6 +55,10 @@ public abstract class NLS {
 	private static final Object[] EMPTY_ARGS = new Object[0];
 	private static final String EXTENSION = ".properties"; //$NON-NLS-1$
 	private static String[] nlSuffixes;
+	private static final String PROP_WARNINGS = "osgi.nls.warnings"; //$NON-NLS-1$
+	private static final String IGNORE = "ignore"; //$NON-NLS-1$
+	private static final boolean ignoreWarnings = IGNORE.equals(FrameworkProperties.getProperty(PROP_WARNINGS));
+
 	/*
 	 * NOTE do not change the name of this field; it is set by the Framework using reflection
 	 */
@@ -168,7 +173,7 @@ public abstract class NLS {
 					try {
 						number = Integer.parseInt(message.substring(i, index));
 					} catch (NumberFormatException e) {
-						throw new IllegalArgumentException();
+						throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);
 					}
 					if (number == 0 && argZero != null)
 						buffer.append(argZero);
@@ -333,6 +338,8 @@ public abstract class NLS {
 	 * @param e - exception to log
 	 */
 	static void log(int severity, String message, Exception e) {
+		if (severity == SEVERITY_WARNING && ignoreWarnings)
+			return; // ignoring warnings; bug 292980
 		if (frameworkLog != null) {
 			frameworkLog.log(new FrameworkLogEntry("org.eclipse.osgi", severity, 1, message, 0, e, null)); //$NON-NLS-1$
 			return;
@@ -406,7 +413,10 @@ public abstract class NLS {
 				// we know we have a public static non-final field. If we do get an exception, silently
 				// log it and continue. This means that the field will (most likely) be un-initialized and
 				// will fail later in the code and if so then we will see both the NPE and this error.
-				field.set(null, value);
+
+				// Extra care is taken to be sure we create a String with its own backing char[] (bug 287183)
+				// This is to ensure we do not keep the key chars in memory.
+				field.set(null, new String(((String) value).toCharArray()));
 			} catch (Exception e) {
 				log(SEVERITY_ERROR, "Exception setting field value.", e); //$NON-NLS-1$
 			}
diff --git a/eclipse/plugins/org.eclipse.equinox.transforms.hook/.project b/eclipse/plugins/org.eclipse.equinox.transforms.hook/.project
index 3539f42..c27df58 100644
--- a/eclipse/plugins/org.eclipse.equinox.transforms.hook/.project
+++ b/eclipse/plugins/org.eclipse.equinox.transforms.hook/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF
index f710e62..f236b7d 100644
--- a/eclipse/plugins/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.transforms.hook/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.transforms.hook
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Fragment-Host: org.eclipse.osgi;bundle-version="[3.2.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: transformsHook
diff --git a/eclipse/plugins/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java b/eclipse/plugins/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java
index f417f14..7f543e1 100644
--- a/eclipse/plugins/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java
+++ b/eclipse/plugins/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformedBundleFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,10 +163,7 @@ public class TransformedBundleFile extends BundleFile {
 						// 182585)
 						extractDirectory(path);
 				} else {
-					File original = originalFile;
-					if (original == null)
-						return null;
-					if (original.isDirectory()) {
+					if (originalFile.isDirectory()) {
 						if (!nested.mkdirs()) {
 							if (Debug.DEBUG && Debug.DEBUG_GENERAL)
 								Debug.println("Unable to create directory: " + nested.getPath()); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.equinox.transforms.xslt/.project b/eclipse/plugins/org.eclipse.equinox.transforms.xslt/.project
index 63360e6..783cae5 100644
--- a/eclipse/plugins/org.eclipse.equinox.transforms.xslt/.project
+++ b/eclipse/plugins/org.eclipse.equinox.transforms.xslt/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF
index fc3688f..175fcbd 100644
--- a/eclipse/plugins/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.transforms.xslt/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.equinox.transforms.xslt
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: org.eclipse.osgi.framework.log;version="1.0.0",
  org.osgi.framework;version="1.3.0",
diff --git a/eclipse/plugins/org.eclipse.equinox.useradmin/.project b/eclipse/plugins/org.eclipse.equinox.useradmin/.project
index b878668..cd2534b 100644
--- a/eclipse/plugins/org.eclipse.equinox.useradmin/.project
+++ b/eclipse/plugins/org.eclipse.equinox.useradmin/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF
index 7ae7473..5d7a387 100644
--- a/eclipse/plugins/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.useradmin/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Vendor: %bundleVendor
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.200.qualifier
 Bundle-Activator: org.eclipse.equinox.internal.useradmin.Activator
 Bundle-Copyright: %bundleCopyright
 Bundle-SymbolicName: org.eclipse.equinox.useradmin
diff --git a/eclipse/plugins/org.eclipse.equinox.util/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.util/META-INF/MANIFEST.MF
index f52d160..303ee71 100644
--- a/eclipse/plugins/org.eclipse.equinox.util/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.util/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.equinox.util
 Bundle-Name: %bundleName
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-Activator: org.eclipse.equinox.internal.util.UtilActivator
 Bundle-Description: The Equinox Util Bundle contains services to facilitate bundle developers in their programming, and to lighten resource usage at runtime.
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.classpath b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.classpath
new file mode 100644
index 0000000..a38af92
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry excluding="org/eclipse/osgi/aspectj/weavingService/WeavingServiceFactory.java" kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.options b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.options
new file mode 100644
index 0000000..a4c746e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.options
@@ -0,0 +1 @@
+org.aspectj.osgi.service.weaving/debug=false
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.project b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.project
new file mode 100644
index 0000000..1b266ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.weaving.aspectj</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..074ef50
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 04 14:34:18 CEST 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..9d6dac1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,339 @@
+#Tue Nov 11 23:48:19 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..5423ee6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,114 @@
+#Mon Aug 04 14:34:18 CEST 2008
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=true
+cleanup.sort_members_all=true
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_defaultCleanUpProfile
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_defaultFormatterProfile
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;com;de;net;org;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2008 ${user} and others.\n * All rights reserved. This program and the accompanying materials \n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html.\n * \n * Contributors\:\n *     ${user} - initial implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">// ${todo} Auto-generated constructor stub\n${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=true
+sp_cleanup.sort_members_all=true
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..21798cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,22 @@
+#Mon Aug 04 14:34:18 CEST 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..91117e5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WeavingService Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.equinox.weaving.aspectj
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.equinox.weaving.aspectj.AspectJWeavingActivator
+Import-Package: org.aspectj.weaver;version="1.6.3";resolution:=optional,
+ org.aspectj.weaver.loadtime;version="1.6.3";resolution:=optional,
+ org.aspectj.weaver.loadtime.definition;version="1.6.3";resolution:=optional,
+ org.aspectj.weaver.tools;version="1.6.3";resolution:=optional,
+ org.eclipse.equinox.service.weaving,
+ org.eclipse.osgi.service.debug,
+ org.eclipse.osgi.service.resolver,
+ org.eclipse.osgi.util;version="1.1.0",
+ org.osgi.framework
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.equinox.weaving.aspectj;x-friends:="org.eclipse.equinox.weaving.tests",
+ org.eclipse.equinox.weaving.aspectj.loadtime;x-friends:="org.eclipse.equinox.weaving.tests"
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/optional-p2.inf b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/optional-p2.inf
new file mode 100644
index 0000000..43ce7ce
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/META-INF/optional-p2.inf
@@ -0,0 +1,10 @@
+instructions.configure = \
+	setStartLevel(startLevel:4); \
+	markStarted(started: true); \
+  setProgramProperty(propName:org.aspectj.weaver.showWeaveInfo, propValue:true); \
+  setProgramProperty(propName:org.aspectj.osgi.verbose, propValue:true); \
+  setProgramProperty(propName:aj.weaving.verbose, propValue:true);
+instructions.unconfigure = \
+  setProgramProperty(propName:org.aspectj.weaver.showWeaveInfo, propValue:); \
+  setProgramProperty(propName:org.aspectj.osgi.verbose, propValue:); \
+  setProgramProperty(propName:aj.weaving.verbose, propValue:);
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/build.properties b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/build.properties
new file mode 100644
index 0000000..66b927b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               .options
+src.includes = src/
+javacWarnings..=-raw,-unchecked
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectAdmin.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectAdmin.java
new file mode 100644
index 0000000..bcc1d2f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectAdmin.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.osgi.framework.Bundle;
+
+/**
+ * The AspectAdmin gives you detailed information about bundles providing
+ * aspects, which aspects are provided, which aspects are exported and the
+ * defined aspect policies for exported packages.
+ * 
+ * This service is used by the weaver to determine which aspects to weave into
+ * which bundles. It can also be used to implement some basic management
+ * features for the AspectJ-based weaving of Equinox Aspects.
+ * 
+ * @author Martin Lippert
+ */
+public interface AspectAdmin {
+
+    /**
+     * Header for aspect bundle manifest files to indicate whether a bundle is
+     * readily compiled with AJDT, for example. This tells Equinox Aspects that
+     * the bundle does not need to be woven if it refers to just its own
+     * aspects.
+     */
+    public static final String AOP_BUNDLE_FINISHED_HEADER = "Eclipse-AspectBundle"; //$NON-NLS-1$
+
+    /**
+     * The value for the aspect bundle header to indicate that there is no
+     * weaving necessary to finish the aspects of the bundle itself
+     */
+    public static final String AOP_BUNDLE_FINISHED_VALUE = "finished"; //$NON-NLS-1$
+
+    /**
+     * This is the default value for the location of the aop.xml file inside a
+     * bundle
+     */
+    public static final String AOP_CONTEXT_DEFAULT_LOCATION = "META-INF/aop.xml"; //$NON-NLS-1$
+
+    /**
+     * The name of the header to determine where to look for the aop.xml files
+     * inside a bundle Bundles can use this header to specify the location where
+     * their aop.xml is located
+     */
+    public static final String AOP_CONTEXT_LOCATION_HEADER = "Eclipse-AspectContext"; //$NON-NLS-1$
+
+    /**
+     * directive for the policy to apply aspects from imported or required
+     * bundles
+     */
+    public static final String ASPECT_APPLY_POLICY_DIRECTIVE = "apply-aspects"; //$NON-NLS-1$
+
+    /**
+     * apply policy is false in this case, do not apply aspects for weaving
+     */
+    public static final int ASPECT_APPLY_POLICY_FALSE = 2;
+
+    /**
+     * apply policy is not defined
+     */
+    public static final int ASPECT_APPLY_POLICY_NOT_DEFINED = 0;
+
+    /**
+     * apply policy is true, so apply aspects for weaving
+     */
+    public static final int ASPECT_APPLY_POLICY_TRUE = 1;
+
+    /**
+     * directive to declare the aspect policy. possible values are "opt-in" or
+     * "opt-out"
+     */
+    public static final String ASPECT_POLICY_DIRECTIVE = "aspect-policy"; //$NON-NLS-1$
+
+    /**
+     * policy directive value to tell the weaver that clients have explicitly to
+     * ask for those aspects to be applied
+     */
+    public static final String ASPECT_POLICY_DIRECTIVE_OPT_IN = "opt-in"; //$NON-NLS-1$
+
+    /**
+     * policy directive value to tell the weaver that clients will get those
+     * aspects applied automatically unless they ask for not applying them
+     */
+    public static final String ASPECT_POLICY_DIRECTIVE_OPT_OUT = "opt-out"; //$NON-NLS-1$
+
+    /**
+     * This indicates that there is no aspects policy defined
+     */
+    public static final int ASPECT_POLICY_NOT_DEFINED = 0;
+
+    /**
+     * Policy to indicate that the aspects of this package should only be woven
+     * if the importer explicitly asks for it
+     */
+    public static final int ASPECT_POLICY_OPT_IN = 1;
+
+    /**
+     * Policy to indicate that the aspects of this package should automatically
+     * be woven if the importer does not prohibit it
+     */
+    public static final int ASPECT_POLICY_OPT_OUT = 2;
+
+    /**
+     * directive to declare the exported aspects. The values should list the
+     * aspect class names without the package
+     */
+    public static final String ASPECTS_ATTRIBUTE = "aspects"; //$NON-NLS-1$
+
+    /**
+     * Returns the cached aspect definition for the given bundle, if the bundle
+     * has an aspect definition
+     * 
+     * @param bundle The bundle for which the aspect definition should be
+     *            returned
+     * @return The parsed and cached aspect definition for the given bundle or
+     *         null, if the bundle doesn't contain an aspect definition
+     */
+    public Definition getAspectDefinition(final Bundle bundle);
+
+    /**
+     * Gives information on which aspect policy is defined for the given package
+     * of the given bundle
+     * 
+     * @param bundle The bundle which contains the aspects for the given package
+     * @param packageName The name of the package that contains the aspects
+     * @return OPT_IN_POLICY or OPT_OUT_POLICY (where OPT_OUT_POLICY is the
+     *         defailt case)
+     */
+    public int getAspectPolicy(Bundle bundle, String packageName);
+
+    /**
+     * Returns the definitions of aspects whose packages are exported and
+     * therefore visible to the outside of the bundle.
+     * 
+     * @param bundle The bundle for which the visible aspects should be
+     *            calculated
+     * @return The definition for the exported aspects or null, if no aspect is
+     *         visible
+     */
+    public Definition getExportedAspectDefinitions(final Bundle bundle);
+
+    /**
+     * Calculates the set of aspects to be woven if the given imported package
+     * is wired to the given bundle (with the given policy on applying aspects)
+     * 
+     * @param bundle The bundle from which the given package is imported
+     * @param packageName The name of the package that is imported
+     * @param applyAspectsPolicy the policy for applying visible aspects for
+     *            weaving
+     * @return The set of aspects that should be woven from the given imported
+     *         package
+     */
+    public Definition resolveImportedPackage(final Bundle bundle,
+            String packageName, final int applyAspectsPolicy);
+
+    /**
+     * Calculates the set of aspects to be woven if the given bundle is declared
+     * as a required bundle (with the given policy on applying aspects)
+     * 
+     * @param bundle The bundle which is required and might export aspects that
+     *            should be woven
+     * @param applyAspectsPolicy the policy for applying visible aspects for
+     *            weaving
+     * @return The set of aspects that should be woven from the given required
+     *         bundle
+     */
+    public Definition resolveRequiredBundle(final Bundle bundle,
+            final int applyAspectsPolicy);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectConfiguration.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectConfiguration.java
new file mode 100644
index 0000000..2fc91d7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectConfiguration.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.osgi.framework.Bundle;
+
+/**
+ * An aspect configuration object describes for one specific bundle which
+ * aspects from which other bundles are declared to be woven into the bundle.
+ * 
+ * @author Martin Lippert
+ */
+public class AspectConfiguration {
+
+    private final Definition[] aspectDefinitions;
+
+    private final Bundle bundle;
+
+    private final String fingerprint;
+
+    /**
+     * Creates a new aspect configuration object for the given bundle.
+     * 
+     * @param bundle The host bundle this configuration belongs to
+     * @param aspectDefinitions The set of aspect definitions for the weaver
+     * @param fingerprint The fingerprint of the defined aspects
+     */
+    public AspectConfiguration(final Bundle bundle,
+            final Definition[] aspectDefinitions, final String fingerprint) {
+        this.bundle = bundle;
+        this.fingerprint = fingerprint;
+        this.aspectDefinitions = aspectDefinitions;
+    }
+
+    /**
+     * @return The set of aspect configurations to be used by the weaver
+     */
+    public List<Definition> getAspectDefinitions() {
+        return Arrays.asList(aspectDefinitions);
+    }
+
+    /**
+     * @return The host bundle this aspect configuration belongs to
+     */
+    public Bundle getBundle() {
+        return bundle;
+    }
+
+    /**
+     * @return A short version of the different aspects being woven into this
+     *         bundle to be used as unique identifier for aspect configurations
+     */
+    public String getFingerprint() {
+        return fingerprint;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingActivator.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingActivator.java
new file mode 100644
index 0000000..79bddb6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingActivator.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import java.lang.reflect.Method;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class AspectJWeavingActivator implements BundleActivator {
+
+    private static final String CHECK_ASPECTJ_CLASS = "org.aspectj.weaver.loadtime.definition.Definition"; //$NON-NLS-1$
+
+    private static final String REAL_ACTIVATOR_CLASS = "org.eclipse.equinox.weaving.aspectj.AspectJWeavingStarter"; //$NON-NLS-1$
+
+    private Object starter; // to decouple the optional dependencies
+
+    private Class<?> starterClass;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public void start(final BundleContext context) throws Exception {
+        final ClassLoader loader = this.getClass().getClassLoader();
+
+        try {
+            final Class<?> aspectjClass = loader.loadClass(CHECK_ASPECTJ_CLASS);
+            if (aspectjClass != null) {
+                starterClass = loader.loadClass(REAL_ACTIVATOR_CLASS);
+                starter = starterClass.newInstance();
+
+                final Method startMethod = starterClass.getMethod("start",
+                        BundleContext.class);
+                startMethod.invoke(starter, context);
+            }
+        } catch (final Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(final BundleContext context) throws Exception {
+        if (starter != null) {
+            final Method stopMethod = starterClass.getMethod("stop",
+                    BundleContext.class);
+            stopMethod.invoke(starter, context);
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingService.java
new file mode 100644
index 0000000..260387d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingService.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Heiko Seeberger           AJDT 1.5.1 changes     
+ *   Martin Lippert            weaving context and adaptors reworked     
+ *   Martin Lippert            extracted weaving service factory
+ *   Martin Lippert            advanced aspect resolving implemented
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.IWeavingService;
+import org.eclipse.equinox.weaving.aspectj.loadtime.AspectResolver;
+import org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor;
+import org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingContext;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.osgi.framework.Bundle;
+
+public class AspectJWeavingService implements IWeavingService {
+
+    private List<Definition> aspectDefinitions;
+
+    private BundleDescription bundleDescription;
+
+    private boolean enabled;
+
+    private String namespaceAddOn;
+
+    private OSGiWeavingAdaptor weavingAdaptor;
+
+    private OSGiWeavingContext weavingContext;
+
+    public AspectJWeavingService() {
+        if (AspectJWeavingStarter.DEBUG)
+            System.out.println("- WeavingService.<init>");
+    }
+
+    public AspectJWeavingService(final ClassLoader loader, final Bundle bundle,
+            final State state, final BundleDescription bundleDescription,
+            final ISupplementerRegistry supplementerRegistry,
+            final AspectAdmin aspectAdmin) {
+        this.bundleDescription = bundleDescription;
+
+        final AspectResolver aspectResolver = new AspectResolver(state,
+                supplementerRegistry, aspectAdmin, AspectJWeavingStarter
+                        .getDefault().getContext());
+        final AspectConfiguration aspectConfig = aspectResolver
+                .resolveAspectsFor(bundle, bundleDescription);
+        this.namespaceAddOn = aspectConfig.getFingerprint();
+        this.aspectDefinitions = aspectConfig.getAspectDefinitions();
+
+        this.enabled = this.aspectDefinitions.size() > 0;
+        if (this.enabled) {
+            this.weavingContext = new OSGiWeavingContext(loader,
+                    bundleDescription, aspectDefinitions);
+            this.weavingAdaptor = new OSGiWeavingAdaptor(loader,
+                    weavingContext, namespaceAddOn.toString());
+        } else {
+            if (AspectJWeavingStarter.DEBUG) {
+                System.err
+                        .println("[org.eclipse.equinox.weaving.aspectj] info not weaving bundle '"
+                                + bundle.getSymbolicName() + "'");
+            }
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingService#flushGeneratedClasses(java.lang.ClassLoader)
+     */
+    public void flushGeneratedClasses(final ClassLoader loader) {
+        if (enabled) {
+            ensureAdaptorInit();
+            weavingAdaptor.flushGeneratedClasses();
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingService#generatedClassesExistFor(java.lang.ClassLoader,
+     *      java.lang.String)
+     */
+    public boolean generatedClassesExistFor(final ClassLoader loader,
+            final String className) {
+        if (enabled) {
+            ensureAdaptorInit();
+            return weavingAdaptor.generatedClassesExistFor(className);
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingService#getGeneratedClassesFor(java.lang.String)
+     */
+    public Map<String, byte[]> getGeneratedClassesFor(final String className) {
+        if (enabled) {
+            ensureAdaptorInit();
+            return weavingAdaptor.getGeneratedClassesFor(className);
+        } else {
+            return new HashMap<String, byte[]>();
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingService#getKey()
+     */
+    public String getKey() {
+        if (AspectJWeavingStarter.DEBUG)
+            System.out.println("> WeavingService.getKey() bundle="
+                    + bundleDescription.getSymbolicName());
+
+        final String namespace = namespaceAddOn.toString();
+
+        if (AspectJWeavingStarter.DEBUG)
+            System.out.println("< WeavingService.getKey() key='" + namespace
+                    + "'");
+
+        return namespace;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingService#preProcess(java.lang.String,
+     *      byte[], java.lang.ClassLoader)
+     */
+    public byte[] preProcess(final String name, final byte[] classbytes,
+            final ClassLoader loader) throws IOException {
+        if (enabled) {
+            if (AspectJWeavingStarter.DEBUG)
+                System.out.println("> WeavingService.preProcess() bundle="
+                        + bundleDescription.getSymbolicName() + ", name="
+                        + name + ", bytes=" + classbytes.length);
+            byte[] newBytes;
+            ensureAdaptorInit();
+
+            // Bug 215177: Adapt to updated (AJ 1.5.4) signature.
+            newBytes = weavingAdaptor.weaveClass(name, classbytes, false);
+            if (AspectJWeavingStarter.DEBUG)
+                System.out.println("< WeavingService.preProcess() bytes="
+                        + newBytes.length);
+            return newBytes;
+        } else {
+            return null;
+        }
+    }
+
+    private void ensureAdaptorInit() {
+        weavingAdaptor.initialize();
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingServiceFactory.java
new file mode 100644
index 0000000..184eb59
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingServiceFactory.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.IWeavingService;
+import org.eclipse.equinox.service.weaving.IWeavingServiceFactory;
+import org.eclipse.equinox.weaving.aspectj.loadtime.AspectAdminImpl;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.osgi.framework.Bundle;
+
+/**
+ * The factory to create AspectJ-based weavers.
+ * 
+ * @author martinlippert
+ */
+public class AspectJWeavingServiceFactory implements IWeavingServiceFactory {
+
+    private final AspectAdminImpl aspectDefinitionRegistry;
+
+    public AspectJWeavingServiceFactory(final AspectAdminImpl aspectDefinitionRegistry) {
+        this.aspectDefinitionRegistry = aspectDefinitionRegistry;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.IWeavingServiceFactory#createWeavingService(java.lang.ClassLoader,
+     *      org.osgi.framework.Bundle, org.eclipse.osgi.service.resolver.State,
+     *      org.eclipse.osgi.service.resolver.BundleDescription,
+     *      org.eclipse.equinox.service.weaving.ISupplementerRegistry)
+     */
+    public IWeavingService createWeavingService(final ClassLoader loader,
+            final Bundle bundle, final State resolverState,
+            final BundleDescription bundleDesciption,
+            final ISupplementerRegistry supplementerRegistry) {
+        return new AspectJWeavingService(loader, bundle, resolverState,
+                bundleDesciption, supplementerRegistry,
+                aspectDefinitionRegistry);
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingStarter.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingStarter.java
new file mode 100644
index 0000000..1348710
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/AspectJWeavingStarter.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            extracted weaving service factory
+ *   Martin Lippert            dependencies to AspectJ packages made optional
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj;
+
+import java.util.Properties;
+
+import org.eclipse.equinox.service.weaving.IWeavingServiceFactory;
+import org.eclipse.equinox.weaving.aspectj.loadtime.AspectAdminImpl;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class AspectJWeavingStarter implements BundleActivator {
+
+    public static boolean DEBUG;
+
+    public static boolean verbose = Boolean
+            .getBoolean("org.aspectj.osgi.verbose");
+
+    //The shared instance.
+    private static AspectJWeavingStarter plugin;
+
+    private AspectAdminImpl aspectDefinitionRegistry;
+
+    private BundleContext context;
+
+    /**
+     * The constructor.
+     */
+    public AspectJWeavingStarter() {
+        plugin = this;
+    }
+
+    /**
+     * Returns the shared instance.
+     */
+    public static AspectJWeavingStarter getDefault() {
+        return plugin;
+    }
+
+    /**
+     * @return The bundle context of the weaving service bundle or null, of
+     *         bundle is not started
+     */
+    public BundleContext getContext() {
+        return this.context;
+    }
+
+    /**
+     * This method is called upon plug-in activation
+     */
+    public void start(final BundleContext context) throws Exception {
+        this.context = context;
+
+        this.aspectDefinitionRegistry = new AspectAdminImpl();
+        context.addBundleListener(this.aspectDefinitionRegistry);
+        this.aspectDefinitionRegistry.initialize(context.getBundles());
+
+        loadOptions(context);
+        if (verbose)
+            System.err
+                    .println("[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...");
+        final String serviceName = IWeavingServiceFactory.class.getName();
+        final IWeavingServiceFactory weavingServiceFactory = new AspectJWeavingServiceFactory(
+                aspectDefinitionRegistry);
+        final Properties props = new Properties();
+        context.registerService(serviceName, weavingServiceFactory, props);
+    }
+
+    /**
+     * This method is called when the plug-in is stopped
+     */
+    public void stop(final BundleContext context) throws Exception {
+        this.context = null;
+        plugin = null;
+    }
+
+    private void loadOptions(final BundleContext context) {
+        // all this is only to get the application args		
+        DebugOptions service = null;
+        final ServiceReference reference = context
+                .getServiceReference(DebugOptions.class.getName());
+        if (reference != null)
+            service = (DebugOptions) context.getService(reference);
+        if (service == null) return;
+        try {
+            DEBUG = service.getBooleanOption(
+                    "org.aspectj.osgi.service.weaving/debug", false);
+        } finally {
+            // we have what we want - release the service
+            context.ungetService(reference);
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectAdminImpl.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectAdminImpl.java
new file mode 100644
index 0000000..357f083
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectAdminImpl.java
@@ -0,0 +1,464 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj.loadtime;
+
+import java.net.URL;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.aspectj.weaver.loadtime.definition.DocumentParser;
+import org.aspectj.weaver.loadtime.definition.Definition.ConcreteAspect;
+import org.eclipse.equinox.weaving.aspectj.AspectAdmin;
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.Constants;
+import org.osgi.framework.SynchronousBundleListener;
+
+/**
+ * The AspectAdmin takes care of resolving aspect definitions of resolved
+ * bundles and provides information which bundle should be woven with which
+ * aspects.
+ * 
+ * The AspectAdmin takes the aop.xml files into account as well as the aspect
+ * definitions in the bundle manifests.
+ * 
+ * All the information parsing and resolving is done at bundle resolve time, the
+ * removal from the cache is done at unresolved events. The initial state is
+ * re-created by the initialize method.
+ * 
+ * @author Martin Lippert
+ */
+public class AspectAdminImpl implements AspectAdmin, SynchronousBundleListener {
+
+    // remember all aspect definitions for the given bundle (regardless of the way they are declared)
+    private final Map<Bundle, Definition> aspectDefinitions;
+
+    // remember only the exported aspect definitions for the given bundle (regardless of the way they are declared)
+    private final Map<Bundle, Definition> aspectDefinitionsExported;
+
+    // remember the aspect policies per exported package per bundle
+    private final Map<Bundle, Map<String, Integer>> aspectPolicies;
+
+    /**
+     * Create a registry to manage aspect definition files
+     */
+    public AspectAdminImpl() {
+        this.aspectDefinitions = new ConcurrentHashMap<Bundle, Definition>();
+        this.aspectDefinitionsExported = new ConcurrentHashMap<Bundle, Definition>();
+        this.aspectPolicies = new ConcurrentHashMap<Bundle, Map<String, Integer>>();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent)
+     */
+    public void bundleChanged(final BundleEvent event) {
+        if (event.getType() == BundleEvent.RESOLVED) {
+            bundleResolved(event.getBundle());
+        } else if (event.getType() == BundleEvent.UNRESOLVED) {
+            bundleUnresolved(event.getBundle());
+        }
+    }
+
+    /**
+     * Do the parsing when a bundle is resolved
+     * 
+     * @param bundle The bundle that is resolved (should not be null)
+     */
+    public void bundleResolved(final Bundle bundle) {
+        if (!this.aspectDefinitions.containsKey(bundle)
+                && !this.aspectDefinitionsExported.containsKey(bundle)
+                && !this.aspectPolicies.containsKey(bundle)) {
+            parseDefinitions(bundle);
+        }
+    }
+
+    /**
+     * Remove the cached aspect definitions from the aspect definition registry
+     * 
+     * @param bundle The bundle that got unresolved (should not be null)
+     */
+    public void bundleUnresolved(final Bundle bundle) {
+        this.aspectDefinitions.remove(bundle);
+        this.aspectDefinitionsExported.remove(bundle);
+        this.aspectPolicies.remove(bundle);
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.aspectj.AspectAdmin#getAspectDefinition(org.osgi.framework.Bundle)
+     */
+    public Definition getAspectDefinition(final Bundle bundle) {
+        return this.aspectDefinitions.get(bundle);
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.aspectj.AspectAdmin#getAspectPolicy(org.osgi.framework.Bundle,
+     *      java.lang.String)
+     */
+    public int getAspectPolicy(final Bundle bundle, final String packageName) {
+        final Map<String, Integer> policies = this.aspectPolicies.get(bundle);
+        if (policies != null) {
+            final Integer policy = policies.get(packageName);
+            if (policy != null) {
+                return policy;
+            }
+        }
+
+        return AspectAdmin.ASPECT_POLICY_NOT_DEFINED;
+    }
+
+    /**
+     * Finds the location of the aspect definition within the given bundle. The
+     * default location is "META-INF/aop.xml", but if the bundles manifest
+     * contains an entry for "Eclipse-AspectContext", that value is used to
+     * search for the aop.xml file.
+     * 
+     * @param bundle The bundle for which to calculate the location of the
+     *            aspect definition file
+     * @return The path to the aspect definition relately to the given bundle
+     */
+    public String getDefinitionLocation(final Bundle bundle) {
+        String aopContextHeader = (String) bundle.getHeaders().get(
+                AOP_CONTEXT_LOCATION_HEADER);
+        if (aopContextHeader != null) {
+            aopContextHeader = aopContextHeader.trim();
+            return aopContextHeader;
+        }
+
+        return AOP_CONTEXT_DEFAULT_LOCATION;
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.aspectj.AspectAdmin#getExportedAspectDefinitions(org.osgi.framework.Bundle)
+     */
+    public Definition getExportedAspectDefinitions(final Bundle bundle) {
+        return this.aspectDefinitionsExported.get(bundle);
+    }
+
+    /**
+     * Initialize the state of the aspect definition registry for the given
+     * bundles. This should typically be called when the weaving service bundle
+     * is started to set up the aspect definitions for all resolved bundles
+     * 
+     * @param bundles All bundles that should be taken into account and searched
+     *            for aspect definitions
+     * 
+     */
+    public void initialize(final Bundle[] bundles) {
+        for (final Bundle bundle : bundles) {
+            final int state = bundle.getState();
+            if (state != Bundle.INSTALLED && state != Bundle.UNINSTALLED) {
+                parseDefinitions(bundle);
+            }
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.aspectj.AspectAdmin#resolveImportedPackage(org.osgi.framework.Bundle,
+     *      java.lang.String, int)
+     */
+    public Definition resolveImportedPackage(final Bundle bundle,
+            final String packageName, final int applyAspectsPolicy) {
+        if (AspectAdmin.ASPECT_APPLY_POLICY_TRUE == applyAspectsPolicy) {
+            final Definition exportedAspectDefinitions = getExportedAspectDefinitions(bundle);
+            final Definition result = new Definition();
+            if (exportedAspectDefinitions != null) {
+                final List<?> aspectClassNames = exportedAspectDefinitions
+                        .getAspectClassNames();
+                for (final Iterator<?> iterator = aspectClassNames.iterator(); iterator
+                        .hasNext();) {
+                    final String aspectName = (String) iterator.next();
+                    final String aspectPackageName = getPackage(aspectName);
+                    if (aspectPackageName.equals(packageName)) {
+                        result.getAspectClassNames().add(aspectName);
+                    }
+                }
+
+                final Iterator<?> concreteAspects = exportedAspectDefinitions
+                        .getConcreteAspects().iterator();
+                while (concreteAspects.hasNext()) {
+                    final Definition.ConcreteAspect concreteAspect = (ConcreteAspect) concreteAspects
+                            .next();
+                    if (concreteAspect.name != null
+                            && getPackage(concreteAspect.name).equals(
+                                    packageName)) {
+                        result.getConcreteAspects().add(concreteAspect);
+                    }
+                }
+
+                if (exportedAspectDefinitions.getWeaverOptions().trim()
+                        .length() > 0) {
+                    result.appendWeaverOptions(exportedAspectDefinitions
+                            .getWeaverOptions());
+                }
+            }
+            if (result.getAspectClassNames().size() > 0
+                    || result.getConcreteAspects().size() > 0
+                    || result.getWeaverOptions().length() > 0) {
+                return result;
+            } else {
+                return null;
+            }
+        } else if (AspectAdmin.ASPECT_APPLY_POLICY_FALSE == applyAspectsPolicy) {
+            return null;
+        } else {
+            final Definition exportedAspectDefinitions = getExportedAspectDefinitions(bundle);
+            final Definition result = new Definition();
+            if (exportedAspectDefinitions != null) {
+                final List<?> aspectClassNames = exportedAspectDefinitions
+                        .getAspectClassNames();
+                for (final Iterator<?> iterator = aspectClassNames.iterator(); iterator
+                        .hasNext();) {
+                    final String aspectName = (String) iterator.next();
+                    final String aspectPackageName = getPackage(aspectName);
+                    final int aspectPolicy = getAspectPolicy(bundle,
+                            aspectPackageName);
+                    if (aspectPackageName.equals(packageName)
+                            && (AspectAdmin.ASPECT_POLICY_NOT_DEFINED == aspectPolicy || AspectAdmin.ASPECT_POLICY_OPT_OUT == aspectPolicy)) {
+                        result.getAspectClassNames().add(aspectName);
+                    }
+                }
+
+                final Iterator<?> concreteAspects = exportedAspectDefinitions
+                        .getConcreteAspects().iterator();
+                while (concreteAspects.hasNext()) {
+                    final Definition.ConcreteAspect concreteAspect = (ConcreteAspect) concreteAspects
+                            .next();
+
+                    final String aspectPackageName = getPackage(concreteAspect.name);
+                    final int aspectPolicy = getAspectPolicy(bundle,
+                            aspectPackageName);
+
+                    if (aspectPackageName.equals(packageName)
+                            && (AspectAdmin.ASPECT_POLICY_NOT_DEFINED == aspectPolicy || AspectAdmin.ASPECT_POLICY_OPT_OUT == aspectPolicy)) {
+                        result.getConcreteAspects().add(concreteAspect);
+                    }
+                }
+
+                if (exportedAspectDefinitions.getWeaverOptions().trim()
+                        .length() > 0) {
+                    result.appendWeaverOptions(exportedAspectDefinitions
+                            .getWeaverOptions());
+                }
+            }
+
+            if (result.getAspectClassNames().size() > 0
+                    || result.getConcreteAspects().size() > 0
+                    || result.getWeaverOptions().length() > 0) {
+                return result;
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.aspectj.AspectAdmin#resolveRequiredBundle(org.osgi.framework.Bundle,
+     *      int)
+     */
+    public Definition resolveRequiredBundle(final Bundle bundle,
+            final int applyAspectsPolicy) {
+        if (AspectAdmin.ASPECT_APPLY_POLICY_TRUE == applyAspectsPolicy) {
+            return getExportedAspectDefinitions(bundle);
+        } else if (AspectAdmin.ASPECT_APPLY_POLICY_FALSE == applyAspectsPolicy) {
+            return null;
+        } else {
+            final Definition exportedAspectDefinitions = getExportedAspectDefinitions(bundle);
+            final Definition result = new Definition();
+
+            if (exportedAspectDefinitions != null) {
+                final Iterator<?> aspects = exportedAspectDefinitions
+                        .getAspectClassNames().iterator();
+                while (aspects.hasNext()) {
+                    final String aspect = (String) aspects.next();
+                    final String aspectPackage = getPackage(aspect);
+                    final int aspectPolicy = getAspectPolicy(bundle,
+                            aspectPackage);
+
+                    if (aspectPolicy == AspectAdmin.ASPECT_POLICY_NOT_DEFINED
+                            || aspectPolicy == AspectAdmin.ASPECT_POLICY_OPT_OUT) {
+                        result.getAspectClassNames().add(aspect);
+                    }
+                }
+
+                final Iterator<?> concreteAspects = exportedAspectDefinitions
+                        .getConcreteAspects().iterator();
+                while (concreteAspects.hasNext()) {
+                    final Definition.ConcreteAspect concreteAspect = (Definition.ConcreteAspect) concreteAspects
+                            .next();
+                    final String aspectPackage = getPackage(concreteAspect.name);
+                    final int aspectPolicy = getAspectPolicy(bundle,
+                            aspectPackage);
+
+                    if (aspectPolicy == AspectAdmin.ASPECT_POLICY_NOT_DEFINED
+                            || aspectPolicy == AspectAdmin.ASPECT_POLICY_OPT_OUT) {
+                        result.getConcreteAspects().add(concreteAspect);
+                    }
+                }
+
+                if (exportedAspectDefinitions.getWeaverOptions().trim()
+                        .length() > 0) {
+                    result.appendWeaverOptions(exportedAspectDefinitions
+                            .getWeaverOptions());
+                }
+            }
+
+            if (result.getAspectClassNames().size() > 0
+                    || result.getConcreteAspects().size() > 0
+                    || result.getWeaverOptions().length() > 0) {
+                return result;
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * Parse the aspect definition for the given bundle, if there is one.
+     * 
+     * @param bundle The bundle for which the aspect definition should be parsed
+     */
+    protected void parseDefinitions(final Bundle bundle) {
+        try {
+            Definition allAspectsDefinition = null;
+            final Set<String> exportedAspects = new LinkedHashSet<String>();
+            final Set<Definition.ConcreteAspect> exportedConcreteAspects = new HashSet<Definition.ConcreteAspect>();
+            final Map<String, Integer> policies = new HashMap<String, Integer>();
+            final Set<String> exportedPackages = new HashSet<String>();
+
+            // try to find aop.xml file
+            final String aopXmlLocation = getDefinitionLocation(bundle);
+            final URL aopXmlDef = bundle.getEntry(aopXmlLocation);
+            if (aopXmlDef != null) {
+                allAspectsDefinition = DocumentParser.parse(aopXmlDef);
+            }
+
+            // parse export package headers
+            final Dictionary<?, ?> manifest = bundle.getHeaders();
+            final ManifestElement[] exports = ManifestElement.parseHeader(
+                    Constants.EXPORT_PACKAGE, (String) manifest
+                            .get(Constants.EXPORT_PACKAGE));
+
+            for (int i = 0; exports != null && i < exports.length; i++) {
+                final String packageName = exports[i].getValue();
+                exportedPackages.add(packageName);
+
+                // policies
+                final String policy = exports[i]
+                        .getDirective(ASPECT_POLICY_DIRECTIVE);
+                if (policy != null
+                        && policy.trim().toLowerCase().equals(
+                                ASPECT_POLICY_DIRECTIVE_OPT_OUT)) {
+                    policies
+                            .put(packageName, AspectAdmin.ASPECT_POLICY_OPT_OUT);
+                }
+                if (policy != null
+                        && policy.trim().toLowerCase().equals(
+                                ASPECT_POLICY_DIRECTIVE_OPT_IN)) {
+                    policies.put(packageName, AspectAdmin.ASPECT_POLICY_OPT_IN);
+                }
+
+                // aspects
+                final String allaspects = exports[i]
+                        .getAttribute(ASPECTS_ATTRIBUTE);
+                if (allaspects != null) {
+                    final String[] aspects = ManifestElement
+                            .getArrayFromList(allaspects);
+                    if (aspects != null) {
+                        for (int j = 0; j < aspects.length; j++) {
+                            exportedAspects.add(packageName + "." + aspects[j]); //$NON-NLS-1$
+                        }
+                    }
+                }
+            }
+
+            // add aop.xml declared aspects to the list of exported aspects if their packages are exported
+            if (allAspectsDefinition != null
+                    && allAspectsDefinition.getAspectClassNames() != null) {
+                final Iterator<?> iterator = allAspectsDefinition
+                        .getAspectClassNames().iterator();
+                while (iterator.hasNext()) {
+                    final String aspect = (String) iterator.next();
+                    final String packageName = getPackage(aspect);
+                    if (exportedPackages.contains(packageName)) {
+                        exportedAspects.add(aspect);
+                    }
+                }
+            }
+
+            if (allAspectsDefinition != null
+                    && allAspectsDefinition.getConcreteAspects().size() > 0) {
+                final Iterator<?> iterator = allAspectsDefinition
+                        .getConcreteAspects().iterator();
+                while (iterator.hasNext()) {
+                    final Definition.ConcreteAspect concreteAspect = (Definition.ConcreteAspect) iterator
+                            .next();
+                    if (concreteAspect.name != null
+                            && exportedPackages
+                                    .contains(getPackage(concreteAspect.name))) {
+                        exportedConcreteAspects.add(concreteAspect);
+                    }
+                }
+            }
+
+            if (allAspectsDefinition != null) {
+                this.aspectDefinitions.put(bundle, allAspectsDefinition);
+            }
+
+            if (exportedAspects.size() > 0
+                    || exportedConcreteAspects.size() > 0
+                    || (allAspectsDefinition != null && allAspectsDefinition
+                            .getWeaverOptions().length() > 0)) {
+                final Definition exportedAspectsDefinition = new Definition();
+                exportedAspectsDefinition.getAspectClassNames().addAll(
+                        exportedAspects);
+                exportedAspectsDefinition.getConcreteAspects().addAll(
+                        exportedConcreteAspects);
+
+                if (allAspectsDefinition != null
+                        && allAspectsDefinition.getWeaverOptions().trim()
+                                .length() > 0) {
+                    exportedAspectsDefinition
+                            .appendWeaverOptions(allAspectsDefinition
+                                    .getWeaverOptions());
+                }
+
+                this.aspectDefinitionsExported.put(bundle,
+                        exportedAspectsDefinition);
+            }
+
+            if (policies.size() > 0) {
+                this.aspectPolicies.put(bundle, policies);
+            }
+
+        } catch (final Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private String getPackage(final String aspect) {
+        final int index = aspect.lastIndexOf('.');
+        if (index >= 0) {
+            return aspect.substring(0, index);
+        } else {
+            return ""; //$NON-NLS-1$
+        }
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectResolver.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectResolver.java
new file mode 100644
index 0000000..f6df097
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/AspectResolver.java
@@ -0,0 +1,259 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert            initial implementation
+ *   Martin Lippert            fragment handling fixed
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj.loadtime;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.Supplementer;
+import org.eclipse.equinox.weaving.aspectj.AspectAdmin;
+import org.eclipse.equinox.weaving.aspectj.AspectConfiguration;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.ExportPackageDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+/**
+ * The aspect resolver is responsible for finding the right connections between
+ * bundles and aspects. It calculates the set of aspects that should be woven
+ * into a specific bundle, depending on the resolved wires of the bundle and the
+ * aspects declared by the wired bundles.
+ * 
+ * @author Martin Lippert
+ */
+public class AspectResolver {
+
+    private final AspectAdmin aspectAdmin;
+
+    private final State state;
+
+    private final ISupplementerRegistry supplementerRegistry;
+
+    private final BundleContext weavingBundleContext;
+
+    /**
+     * Creates a new instance of an aspect resolver for the given state. This
+     * resolver can be used to resolve aspect configurations for bundles. It
+     * does not carry any own state, it just uses the injected components to
+     * retrieve the necessary informaton to determine which aspects to weave
+     * into which bundles.
+     * 
+     * @param state The state of the OSGi framework (contains wiring
+     *            information)
+     * @param supplementerRegistry The supplementer registry
+     * @param aspectAdmin The aspect admin, which tells us which bundle exports
+     *            which aspects
+     * @param bundleContext The bundle context in which the aspect resolver is
+     *            used
+     */
+    public AspectResolver(final State state,
+            final ISupplementerRegistry supplementerRegistry,
+            final AspectAdmin aspectAdmin, final BundleContext bundleContext) {
+        this.state = state;
+        this.supplementerRegistry = supplementerRegistry;
+        this.aspectAdmin = aspectAdmin;
+        this.weavingBundleContext = bundleContext;
+    }
+
+    /**
+     * Resolve the aspects to be woven into the given bundle
+     * 
+     * @param bundle The bundle in which the aspects should be woven into
+     * @param bundleDescription The description of the bundle to be woven into
+     * @return The configuration of aspects what should be woven into the bundle
+     */
+    public AspectConfiguration resolveAspectsFor(final Bundle bundle,
+            final BundleDescription bundleDescription) {
+        final List<String> fingerprintElements = new ArrayList<String>();
+
+        final List<Definition> definitions = resolveAspectsForBundle(
+                fingerprintElements, bundle, bundleDescription);
+
+        final Definition[] foundDefinitions = definitions
+                .toArray(new Definition[definitions.size()]);
+
+        Collections.sort(fingerprintElements);
+        final StringBuilder fingerprint = new StringBuilder();
+        final Iterator<String> iterator = fingerprintElements.iterator();
+        while (iterator.hasNext()) {
+            final String element = iterator.next();
+            fingerprint.append(element);
+            fingerprint.append(';');
+        }
+
+        return new AspectConfiguration(bundle, foundDefinitions, fingerprint
+                .toString());
+    }
+
+    private int getApplyAspectsPolicy(final ManifestElement[] headers,
+            final String manifestValue) {
+        int result = AspectAdmin.ASPECT_APPLY_POLICY_NOT_DEFINED;
+
+        if (headers != null) {
+            for (int i = 0; i < headers.length; i++) {
+                if (headers[i].getValue().equals(manifestValue)) {
+                    final String directive = headers[i]
+                            .getDirective(AspectAdmin.ASPECT_APPLY_POLICY_DIRECTIVE);
+                    if ("true".equals(directive)) { //$NON-NLS-1$
+                        result = AspectAdmin.ASPECT_APPLY_POLICY_TRUE;
+                    } else if ("false".equals(directive)) { //$NON-NLS-1$
+                        result = AspectAdmin.ASPECT_APPLY_POLICY_FALSE;
+                    }
+                }
+            }
+        }
+        return result;
+    }
+
+    private String getBundleVersion(final Bundle bundle) {
+        return state.getBundle(bundle.getBundleId()).getVersion().toString();
+    }
+
+    private List<Definition> resolveAspectsForBundle(
+            final List<String> fingerprintElements, final Bundle bundle,
+            final BundleDescription bundleDescription) {
+        final List<Definition> result = new ArrayList<Definition>();
+
+        if (weavingBundleContext != null) {
+
+            Definition aspects = null;
+
+            // fragments
+            final BundleDescription[] fragments = bundleDescription
+                    .getFragments();
+            for (int i = 0; i < fragments.length; i++) {
+                final Bundle fragmentBundle = weavingBundleContext
+                        .getBundle(fragments[i].getBundleId());
+                if (fragmentBundle != null) {
+                    aspects = aspectAdmin.getAspectDefinition(fragmentBundle);
+                    if (aspects != null) {
+                        result.add(aspects);
+                        fingerprintElements.add(fragmentBundle
+                                .getSymbolicName()
+                                + ":" //$NON-NLS-1$
+                                + fragments[i].getVersion().toString());
+                    }
+                }
+            }
+
+            // required bundles
+            final BundleDescription[] resolvedRequires = bundleDescription
+                    .getResolvedRequires();
+            ManifestElement[] requireHeaders = null;
+            if (resolvedRequires.length > 0) {
+                try {
+                    requireHeaders = ManifestElement
+                            .parseHeader(Constants.REQUIRE_BUNDLE,
+                                    (String) bundle.getHeaders().get(
+                                            Constants.REQUIRE_BUNDLE));
+                } catch (final BundleException e) {
+                }
+            }
+            for (int i = 0; i < resolvedRequires.length; i++) {
+                final Bundle requiredBundle = weavingBundleContext
+                        .getBundle(resolvedRequires[i].getBundleId());
+                if (requiredBundle != null) {
+                    final int applyPolicy = getApplyAspectsPolicy(
+                            requireHeaders, requiredBundle.getSymbolicName());
+
+                    aspects = aspectAdmin.resolveRequiredBundle(requiredBundle,
+                            applyPolicy);
+
+                    if (aspects != null) {
+                        result.add(aspects);
+                        fingerprintElements.add(requiredBundle
+                                .getSymbolicName()
+                                + ":" //$NON-NLS-1$
+                                + resolvedRequires[i].getVersion().toString());
+                    }
+                }
+            }
+
+            // imported packages
+            final ExportPackageDescription[] resolvedImports = bundleDescription
+                    .getResolvedImports();
+            ManifestElement[] importHeaders = null;
+            if (resolvedImports.length > 0) {
+                try {
+                    importHeaders = ManifestElement
+                            .parseHeader(Constants.IMPORT_PACKAGE,
+                                    (String) bundle.getHeaders().get(
+                                            Constants.IMPORT_PACKAGE));
+                } catch (final BundleException e) {
+                }
+            }
+            for (int i = 0; i < resolvedImports.length; i++) {
+                final Bundle exportingBundle = weavingBundleContext
+                        .getBundle(resolvedImports[i].getExporter()
+                                .getBundleId());
+                if (exportingBundle != null) {
+                    final String importedPackage = resolvedImports[i].getName();
+
+                    final int applyPolicy = getApplyAspectsPolicy(
+                            importHeaders, importedPackage);
+
+                    aspects = aspectAdmin.resolveImportedPackage(
+                            exportingBundle, importedPackage, applyPolicy);
+
+                    if (aspects != null) {
+                        result.add(aspects);
+                        fingerprintElements.add(importedPackage + ":" //$NON-NLS-1$
+                                + resolvedImports[i].getVersion().toString());
+                    }
+                }
+            }
+
+            // supplementers
+            final Supplementer[] supplementers = this.supplementerRegistry
+                    .getSupplementers(bundleDescription.getBundleId());
+
+            for (int i = 0; i < supplementers.length; i++) {
+                aspects = aspectAdmin
+                        .getExportedAspectDefinitions(supplementers[i]
+                                .getSupplementerBundle());
+                if (aspects != null) {
+                    result.add(aspects);
+                    fingerprintElements.add(supplementers[i].getSymbolicName()
+                            + ":" //$NON-NLS-1$
+                            + getBundleVersion(supplementers[i]
+                                    .getSupplementerBundle()));
+                }
+            }
+
+            // this bundle
+            aspects = aspectAdmin.getAspectDefinition(bundle);
+            if (aspects != null) {
+                final String finishedValue = (String) bundle.getHeaders().get(
+                        AspectAdmin.AOP_BUNDLE_FINISHED_HEADER);
+                if (finishedValue == null
+                        || !AspectAdmin.AOP_BUNDLE_FINISHED_VALUE
+                                .equals(finishedValue)) {
+                    result.add(aspects);
+                    fingerprintElements.add(bundle.getSymbolicName() + ":" //$NON-NLS-1$
+                            + bundleDescription.getVersion().toString());
+                }
+            }
+        }
+
+        return result;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java
new file mode 100644
index 0000000..8e6d2ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Heiko Seeberger           AJDT 1.5.1 changes
+ *   Martin Lippert            minor changes and bugfixes
+ *   Martin Lippert            reworked
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj.loadtime;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.aspectj.weaver.IUnwovenClassFile;
+import org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor;
+import org.eclipse.equinox.weaving.aspectj.AspectJWeavingStarter;
+
+/**
+ * The weaving adaptor for AspectJs load-time weaving API that deals with the
+ * OSGi specifics for load-time weaving
+ */
+public class OSGiWeavingAdaptor extends ClassLoaderWeavingAdaptor {
+
+    private final ClassLoader classLoader;
+
+    private boolean initialized;
+
+    private boolean initializing;
+
+    private final String namespace;
+
+    private final OSGiWeavingContext weavingContext;
+
+    public OSGiWeavingAdaptor(final ClassLoader loader,
+            final OSGiWeavingContext context, final String namespace) {
+        super();
+        this.classLoader = loader;
+        this.weavingContext = context;
+        this.namespace = namespace;
+    }
+
+    public Map<String, byte[]> getGeneratedClassesFor(final String className) {
+        final Map<?, ?> generated = this.generatedClasses;
+        final Map<String, byte[]> result = new HashMap<String, byte[]>();
+
+        final Iterator<?> generatedClassNames = generated.keySet().iterator();
+        while (generatedClassNames.hasNext()) {
+            final String name = (String) generatedClassNames.next();
+            final IUnwovenClassFile unwovenClass = (IUnwovenClassFile) generated
+                    .get(name);
+
+            if (!className.equals(name)) {
+                result.put(name, unwovenClass.getBytes());
+            }
+        }
+
+        flushGeneratedClasses();
+        return result;
+    }
+
+    /**
+     * @see org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor#getNamespace()
+     */
+    @Override
+    public String getNamespace() {
+        return namespace;
+    }
+
+    public void initialize() {
+        if (!initializing) {
+            if (!initialized) {
+                initializing = true;
+                super.initialize(classLoader, weavingContext);
+                initialized = true;
+                initializing = false;
+
+                if (AspectJWeavingStarter.verbose) {
+                    if (isEnabled())
+                        System.err
+                                .println("[org.eclipse.equinox.weaving.aspectj] info weaving bundle '"
+                                        + weavingContext.getClassLoaderName()
+                                        + "'");
+                    else
+                        System.err
+                                .println("[org.eclipse.equinox.weaving.aspectj] info not weaving bundle '"
+                                        + weavingContext.getClassLoaderName()
+                                        + "'");
+                }
+            }
+        }
+    }
+
+    // Bug 215177: Adapt to updated (AJ 1.5.4) super class signature:
+    /**
+     * @see org.aspectj.weaver.tools.WeavingAdaptor#weaveClass(java.lang.String,
+     *      byte[], boolean)
+     */
+    @Override
+    public byte[] weaveClass(final String name, byte[] bytes,
+            final boolean mustWeave) throws IOException {
+
+        /* Avoid recursion during adaptor initialization */
+        if (!initializing) {
+            if (!initialized) {
+                initializing = true;
+                initialize(classLoader, weavingContext);
+                initialized = true;
+                initializing = false;
+            }
+            // Bug 215177: Adapt to updated (AJ 1.5.4) super class signature:
+            bytes = super.weaveClass(name, bytes, mustWeave);
+        }
+        return bytes;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingContext.java b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingContext.java
new file mode 100644
index 0000000..6e06d57
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingContext.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *   Martin Lippert            reworked
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.aspectj.loadtime;
+
+import java.net.URL;
+import java.util.List;
+
+import org.aspectj.weaver.loadtime.DefaultWeavingContext;
+import org.aspectj.weaver.loadtime.definition.Definition;
+import org.aspectj.weaver.tools.WeavingAdaptor;
+import org.eclipse.equinox.weaving.aspectj.AspectJWeavingStarter;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+
+/**
+ * The weaving context for AspectJs load-time weaving API that deals with the
+ * OSGi specifics for load-time weaving
+ */
+public class OSGiWeavingContext extends DefaultWeavingContext {
+
+    private final List<Definition> aspectDefinitions;
+
+    private final BundleDescription bundleDescription;
+
+    public OSGiWeavingContext(final ClassLoader loader,
+            final BundleDescription bundleDescription,
+            final List<Definition> aspectDefinitions) {
+        super(loader);
+        this.bundleDescription = bundleDescription;
+        this.aspectDefinitions = aspectDefinitions;
+        if (AspectJWeavingStarter.DEBUG)
+            System.out.println("- WeavingContext.WeavingContext() locader="
+                    + loader + ", bundle="
+                    + bundleDescription.getSymbolicName());
+    }
+
+    /**
+     * @see org.aspectj.weaver.loadtime.DefaultWeavingContext#getClassLoaderName()
+     */
+    @Override
+    public String getClassLoaderName() {
+        return bundleDescription.getSymbolicName();
+    }
+
+    /**
+     * @see org.aspectj.weaver.loadtime.DefaultWeavingContext#getDefinitions(java.lang.ClassLoader,
+     *      org.aspectj.weaver.tools.WeavingAdaptor)
+     */
+    @Override
+    public List getDefinitions(final ClassLoader loader,
+            final WeavingAdaptor adaptor) {
+        return aspectDefinitions;
+    }
+
+    /**
+     * @see org.aspectj.weaver.loadtime.DefaultWeavingContext#getFile(java.net.URL)
+     */
+    @Override
+    public String getFile(final URL url) {
+        return getBundleIdFromURL(url) + url.getFile();
+    }
+
+    /**
+     * @see org.aspectj.weaver.loadtime.DefaultWeavingContext#getId()
+     */
+    @Override
+    public String getId() {
+        return bundleDescription.getSymbolicName();
+    }
+
+    @Override
+    public String toString() {
+        return getClass().getName() + "[" + bundleDescription.getSymbolicName()
+                + "]";
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources.jmx/.classpath b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.core.resources.jmx/.classpath
copy to eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.options b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.options
new file mode 100644
index 0000000..7f5c583
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.options
@@ -0,0 +1 @@
+org.aspectj.osgi.service.caching.j9/debug=false
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.project b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.project
new file mode 100644
index 0000000..e6ede30
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.weaving.caching.j9</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..131a78f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 04 14:33:55 CEST 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..14ce066
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,329 @@
+#Mon Aug 04 14:33:55 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..4f5015a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,114 @@
+#Mon Aug 04 14:33:55 CEST 2008
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=true
+cleanup.sort_members_all=true
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_defaultCleanUpProfile
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_defaultFormatterProfile
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;com;de;net;org;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2008 ${user} and others.\n * All rights reserved. This program and the accompanying materials \n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html.\n * \n * Contributors\:\n *     ${user} - initial implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">// ${todo} Auto-generated constructor stub\n${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=true
+sp_cleanup.sort_members_all=true
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..d0cd502
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,22 @@
+#Mon Aug 04 14:33:55 CEST 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bd21949
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: J9 CachingService Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.equinox.weaving.caching.j9
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.equinox.weaving.internal.caching.j9.CachingServicePlugin
+Bundle-ActivationPolicy: lazy
+Import-Package: com.ibm.oti.shared;resolution:=optional,
+ org.eclipse.equinox.service.weaving,
+ org.eclipse.osgi.service.debug;version="1.0.0",
+ org.osgi.framework;version="1.4.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/p2.inf b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/p2.inf
new file mode 100644
index 0000000..1fdb52e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/META-INF/p2.inf
@@ -0,0 +1,3 @@
+instructions.configure = \
+    setStartLevel(startLevel:4); \
+    markStarted(started: true);
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/build.properties b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/build.properties
new file mode 100644
index 0000000..02f2e5a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               .options
+jars.extra.classpath = j9stubs.jar
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingService.java
new file mode 100644
index 0000000..df3026c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingService.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *   Martin Lippert            extracted caching service factory
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching.j9;
+
+import java.net.URL;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Map;
+
+import com.ibm.oti.shared.HelperAlreadyDefinedException;
+import com.ibm.oti.shared.Shared;
+import com.ibm.oti.shared.SharedClassURLHelper;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.osgi.framework.Bundle;
+
+public class CachingService implements ICachingService {
+
+    SharedClassURLHelper urlhelper;
+
+    private final Bundle bundle;
+
+    private final ClassLoader classLoader;
+
+    private final String partition;
+
+    public CachingService(final ClassLoader loader, final Bundle bundle,
+            final String key) {
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("> CachingService.<init>() bundle="
+                    + bundle.getSymbolicName() + ", loader=" + loader
+                    + ", key='" + key + "'");
+        this.bundle = bundle;
+        this.classLoader = loader;
+        this.partition = hashNamespace(key + bundle.getBundleId()
+                + bundle.getLastModified());
+        try {
+            urlhelper = Shared.getSharedClassHelperFactory().getURLHelper(
+                    classLoader);
+        } catch (final HelperAlreadyDefinedException e) {
+            e.printStackTrace();
+        }
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("< CachingService.<init>() partition='"
+                    + partition + "', urlhelper=" + urlhelper);
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#canCacheGeneratedClasses()
+     */
+    public boolean canCacheGeneratedClasses() {
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#findStoredClass(java.lang.String,
+     *      java.net.URL, java.lang.String)
+     */
+    public CacheEntry findStoredClass(final String namespace,
+            final URL sourceFileURL, final String name) {
+        final byte[] bytes = urlhelper.findSharedClass(partition,
+                sourceFileURL, name);
+        if (CachingServicePlugin.DEBUG && bytes != null)
+            System.out.println("- CachingService.findStoredClass() bundle="
+                    + bundle.getSymbolicName() + ", name=" + name + ", url="
+                    + sourceFileURL + ", bytes=" + bytes);
+
+        if (bytes != null) {
+            return new CacheEntry(true, bytes);
+        } else {
+            return new CacheEntry(false, null);
+        }
+    }
+
+    /**
+     * Hash the shared class namespace using MD5
+     * 
+     * @param keyToHash
+     * @return the MD5 version of the input string
+     */
+    public String hashNamespace(final String namespace) {
+        MessageDigest md = null;
+        try {
+            md = MessageDigest.getInstance("MD5");
+        } catch (final NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        }
+        final byte[] bytes = md.digest(namespace.getBytes());
+        final StringBuffer result = new StringBuffer();
+        for (int i = 0; i < bytes.length; i++) {
+            final byte b = bytes[i];
+            int num;
+            if (b < 0) {
+                num = b + 256;
+            } else {
+                num = b;
+            }
+            String s = Integer.toHexString(num);
+            while (s.length() < 2) {
+                s = "0" + s;
+            }
+            result.append(s);
+        }
+        return new String(result);
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#stop()
+     */
+    public void stop() {
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClass(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[])
+     */
+    public boolean storeClass(final String namespace, final URL sourceFileURL,
+            final Class<?> clazz, final byte[] classbytes) {
+        final boolean success = urlhelper.storeSharedClass(partition,
+                sourceFileURL, clazz);
+        if (CachingServicePlugin.DEBUG && success)
+            System.out.println("- CachingService.storeClass() bundle="
+                    + bundle.getSymbolicName() + ", clazz=" + clazz + ", url="
+                    + sourceFileURL);
+        return success;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClassAndGeneratedClasses(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[], java.util.Map)
+     */
+    public boolean storeClassAndGeneratedClasses(final String namespace,
+            final URL sourceFileUrl, final Class<?> clazz,
+            final byte[] classbytes, final Map<String, byte[]> generatedClasses) {
+        return false;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServiceFactory.java
new file mode 100644
index 0000000..6cadf16
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServiceFactory.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *   Martin Lippert            extracted caching service factory
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching.j9;
+
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.eclipse.equinox.service.weaving.ICachingServiceFactory;
+import org.osgi.framework.Bundle;
+
+/**
+ * Factory implementation to create concrete J9 caching services for individual
+ * bundles
+ * 
+ * @author martinlippert
+ */
+public class CachingServiceFactory implements ICachingServiceFactory {
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingServiceFactory#createCachingService(java.lang.ClassLoader,
+     *      org.osgi.framework.Bundle, java.lang.String)
+     */
+    public ICachingService createCachingService(final ClassLoader classLoader,
+            final Bundle bundle, final String key) {
+        return new CachingService(classLoader, bundle, key);
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java
new file mode 100644
index 0000000..3b66cee
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching.j9/src/org/eclipse/equinox/weaving/internal/caching/j9/CachingServicePlugin.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            minor changes    
+ *   Martin Lippert            extracted caching service factory
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching.j9;
+
+import com.ibm.oti.shared.Shared;
+
+import org.eclipse.equinox.service.weaving.ICachingServiceFactory;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * The main plugin class to be used in the desktop.
+ */
+public class CachingServicePlugin implements BundleActivator {
+
+    public static boolean DEBUG;
+
+    public static boolean verbose = Boolean
+            .getBoolean("org.aspectj.osgi.verbose");
+
+    /**
+     * The constructor.
+     */
+    public CachingServicePlugin() {
+    }
+
+    /**
+     * This method is called upon plug-in activation
+     */
+    public void start(final BundleContext context) throws Exception {
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("> CachingServicePlugin.start() context="
+                    + context);
+
+        loadOptions(context);
+
+        //are we on J9?
+        if (shouldRegister()) {
+            if (verbose)
+                System.err
+                        .println("[org.eclipse.equinox.weaving.caching.j9] info starting J9 caching service ...");
+            final String name = ICachingServiceFactory.class.getName();
+            final CachingServiceFactory cachingServiceFactory = new CachingServiceFactory();
+            context.registerService(name, cachingServiceFactory, null);
+        } else {
+            if (verbose)
+                System.err
+                        .println("[org.eclipse.equinox.weaving.caching.j9] warning cannot start J9 caching service");
+        }
+
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("< CachingServicePlugin.start()");
+    }
+
+    /**
+     * This method is called when the plug-in is stopped
+     */
+    public void stop(final BundleContext context) throws Exception {
+    }
+
+    private void loadOptions(final BundleContext context) {
+        // all this is only to get the application args		
+        DebugOptions service = null;
+        final ServiceReference reference = context
+                .getServiceReference(DebugOptions.class.getName());
+        if (reference != null)
+            service = (DebugOptions) context.getService(reference);
+        if (service == null) return;
+        try {
+            DEBUG = service.getBooleanOption(
+                    "org.aspectj.osgi.service.caching.j9/debug", false);
+        } finally {
+            // we have what we want - release the service
+            context.ungetService(reference);
+        }
+    }
+
+    private boolean shouldRegister() {
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("> CachingServicePlugin.shouldRegister()");
+
+        boolean enabled;
+        try {
+            Class.forName("com.ibm.oti.vm.VM"); //if this fails we are not on J9
+            final boolean sharing = Shared.isSharingEnabled(); //if not using shared classes we want a different adaptor
+            if (CachingServicePlugin.DEBUG)
+                System.out
+                        .println("- CachingServicePlugin.shouldRegister() sharing="
+                                + sharing);
+
+            if (sharing) {
+                enabled = true;
+            } else {
+                enabled = false;
+            }
+        } catch (final ClassNotFoundException ex) {
+            if (CachingServicePlugin.DEBUG)
+                System.out
+                        .println("E CachingServicePlugin.shouldRegister() ex="
+                                + ex);
+            //not on J9
+            enabled = false;
+        }
+
+        if (CachingServicePlugin.DEBUG)
+            System.out.println("< CachingServicePlugin.shouldRegister() "
+                    + enabled);
+        return enabled;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.core.resources.jmx/.classpath b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.classpath
similarity index 100%
copy from eclipse/plugins/org.eclipse.core.resources.jmx/.classpath
copy to eclipse/plugins/org.eclipse.equinox.weaving.caching/.classpath
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.options b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.options
new file mode 100644
index 0000000..847c41a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.options
@@ -0,0 +1 @@
+org.eclipse.equinox.weaving.caching/debug=false
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.project b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.project
new file mode 100644
index 0000000..8d6e476
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.weaving.caching</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..1edc1be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Jul 14 17:28:42 CEST 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..68690b6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,339 @@
+#Mon Aug 04 14:32:44 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..b9a2bb7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,114 @@
+#Mon Jul 14 17:28:42 CEST 2008
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=true
+cleanup.sort_members_all=true
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_defaultCleanUpProfile
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_defaultFormatterProfile
+formatter_settings_version=11
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;com;de;net;org;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2008 ${user} and others.\n * All rights reserved. This program and the accompanying materials \n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html.\n * \n * Contributors\:\n *     ${user} - initial implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">// ${todo} Auto-generated constructor stub\n${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=true
+sp_cleanup.sort_members_all=true
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..efde3d1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,4 @@
+#Sun Jan 13 21:33:28 CET 2008
+eclipse.preferences.version=1
+pluginProject.extensions=false
+resolve.requirebundle=false
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..37d9082
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,23 @@
+#Mon Jul 14 17:28:40 CEST 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..bd51e3b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.equinox.weaving.caching
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: Standard Caching Service for Equinox Aspects (Incubation)
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Activator: org.eclipse.equinox.weaving.internal.caching.Activator
+Import-Package: com.ibm.oti.shared;resolution:=optional,
+ org.eclipse.equinox.service.weaving,
+ org.eclipse.osgi.service.datalocation;version="1.0.0",
+ org.eclipse.osgi.service.debug;version="1.0.0",
+ org.osgi.framework;version="1.4.0"
+Export-Package: org.eclipse.equinox.weaving.internal.caching;x-friends:="org.aspectj.osgi.service.caching.test"
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/p2.inf b/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/p2.inf
new file mode 100644
index 0000000..c89ea93
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/META-INF/p2.inf
@@ -0,0 +1,3 @@
+instructions.configure = \
+	setStartLevel(startLevel:4); \
+	markStarted(started: true);
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/build.properties b/eclipse/plugins/org.eclipse.equinox.weaving.caching/build.properties
new file mode 100644
index 0000000..34d2e4d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java
new file mode 100644
index 0000000..fb56c9f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Heiko Seeberger and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *   Heiko Seeberger           initial implementation
+ *   Martin Lippert            extracted caching service factory
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.eclipse.equinox.service.weaving.ICachingServiceFactory;
+import org.eclipse.osgi.service.debug.DebugOptions;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * {@link BundleActivator} for "org.aspectj.osgi.service.caching".
+ * 
+ * @author Heiko Seeberger
+ */
+public class Activator implements BundleActivator {
+
+    private static boolean verbose = Boolean
+            .getBoolean("org.aspectj.osgi.verbose"); //$NON-NLS-1$
+
+    private CachingServiceFactory cachingServiceFactory;
+
+    private ServiceRegistration cachingServiceFactoryRegistration;
+
+    /**
+     * Registers a new {@link CachingServiceFactory} instance as OSGi service
+     * under the interface {@link ICachingService}.
+     * 
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public void start(final BundleContext bundleContext) {
+        setDebugEnabled(bundleContext);
+
+        if (shouldRegister()) {
+            if (verbose)
+                System.err
+                        .println("[org.eclipse.equinox.weaving.caching] info starting standard caching service ..."); //$NON-NLS-1$
+            registerCachingServiceFactory(bundleContext);
+        } else {
+            if (verbose)
+                System.err
+                        .println("[org.eclipse.equinox.weaving.caching] warning cannot start standard caching service on J9 VM"); //$NON-NLS-1$
+        }
+    }
+
+    /**
+     * Shuts down the {@link CachingServiceFactory}.
+     * 
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(final BundleContext context) {
+        cachingServiceFactory.stop();
+        cachingServiceFactoryRegistration.unregister();
+        if (Log.isDebugEnabled()) {
+            Log.debug("Shut down and unregistered SingletonCachingService."); //$NON-NLS-1$
+        }
+    }
+
+    private void registerCachingServiceFactory(final BundleContext bundleContext) {
+        cachingServiceFactory = new CachingServiceFactory(bundleContext);
+        cachingServiceFactoryRegistration = bundleContext.registerService(
+                ICachingServiceFactory.class.getName(), cachingServiceFactory,
+                null);
+        if (Log.isDebugEnabled()) {
+            Log.debug("Created and registered SingletonCachingService."); //$NON-NLS-1$
+        }
+    }
+
+    private void setDebugEnabled(final BundleContext bundleContext) {
+        final ServiceReference debugOptionsReference = bundleContext
+                .getServiceReference(DebugOptions.class.getName());
+        if (debugOptionsReference != null) {
+            final DebugOptions debugOptions = (DebugOptions) bundleContext
+                    .getService(debugOptionsReference);
+            if (debugOptions != null) {
+                Log.debugEnabled = debugOptions.getBooleanOption(
+                        "org.eclipse.equinox.weaving.caching/debug", false); //$NON-NLS-1$
+            }
+        }
+        if (debugOptionsReference != null) {
+            bundleContext.ungetService(debugOptionsReference);
+        }
+    }
+
+    private boolean shouldRegister() {
+        boolean enabled = true;
+        try {
+            Class.forName("com.ibm.oti.vm.VM"); // if this fails we are not on J9 //$NON-NLS-1$
+            final Class<?> sharedClass = Class
+                    .forName("com.ibm.oti.shared.Shared"); //$NON-NLS-1$
+            final Method isSharingEnabledMethod = sharedClass.getMethod(
+                    "isSharingEnabled", (Class[]) null); //$NON-NLS-1$
+            if (isSharingEnabledMethod != null) {
+                final Boolean sharing = (Boolean) isSharingEnabledMethod
+                        .invoke(null, (Object[]) null);
+                if (sharing != null && sharing.booleanValue()) {
+                    enabled = false;
+                }
+            }
+        } catch (final ClassNotFoundException ex) {
+        } catch (final SecurityException e) {
+        } catch (final NoSuchMethodException e) {
+        } catch (final IllegalArgumentException e) {
+        } catch (final IllegalAccessException e) {
+        } catch (final InvocationTargetException e) {
+        }
+
+        return enabled;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/BundleCachingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/BundleCachingService.java
new file mode 100644
index 0000000..2cf38a9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/BundleCachingService.java
@@ -0,0 +1,264 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Heiko Seeberger and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Heiko Seeberger - initial implementation
+ *     Martin Lippert - asynchronous cache writing
+ *     Martin Lippert - caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.text.MessageFormat;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <p>
+ * {@link ICachingService} instantiated by {@link CachingServiceFactory} for
+ * each bundle.
+ * </p>
+ * <p>
+ * 
+ * @author Heiko Seeberger
+ * @author Martin Lippert
+ */
+public class BundleCachingService implements ICachingService {
+
+    private static final int READ_BUFFER_SIZE = 8 * 1024;
+
+    private final Bundle bundle;
+
+    private File cacheDirectory;
+
+    private final String cacheKey;
+
+    private final BlockingQueue<CacheItem> cacheWriterQueue;
+
+    /**
+     * @param bundleContext Must not be null!
+     * @param bundle Must not be null!
+     * @param key Must not be null!
+     * @param cacheWriterQueue The queue for items to be written to the cache,
+     *            must not be null
+     * @throws IllegalArgumentException if given bundleContext or bundle is
+     *             null.
+     */
+    public BundleCachingService(final BundleContext bundleContext,
+            final Bundle bundle, final String key,
+            final BlockingQueue<CacheItem> cacheWriterQueue) {
+
+        if (bundleContext == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"bundleContext\" must not be null!"); //$NON-NLS-1$
+        }
+        if (bundle == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"bundle\" must not be null!"); //$NON-NLS-1$
+        }
+        if (key == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"key\" must not be null!"); //$NON-NLS-1$
+        }
+
+        this.bundle = bundle;
+        this.cacheKey = hashNamespace(key);
+        this.cacheWriterQueue = cacheWriterQueue;
+
+        final File dataFile = bundleContext.getDataFile(cacheKey);
+        if (dataFile != null) {
+            final String bundleCacheDir = bundle.getBundleId()
+                    + "-" + bundle.getLastModified(); //$NON-NLS-1$
+            cacheDirectory = new File(dataFile, bundleCacheDir);
+        } else {
+            Log.error("Cannot initialize cache!", null); //$NON-NLS-1$
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#canCacheGeneratedClasses()
+     */
+    public boolean canCacheGeneratedClasses() {
+        return true;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#findStoredClass(java.lang.String,
+     *      java.net.URL, java.lang.String)
+     */
+    public CacheEntry findStoredClass(final String namespace,
+            final URL sourceFileURL, final String name) {
+
+        if (name == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"name\" must not be null!"); //$NON-NLS-1$
+        }
+
+        byte[] storedClass = null;
+        boolean isCached = false;
+
+        if (cacheDirectory != null) {
+            final File cachedBytecodeFile = new File(cacheDirectory, name);
+            storedClass = read(name, cachedBytecodeFile);
+            isCached = storedClass != null;
+        }
+
+        if (Log.isDebugEnabled()) {
+            Log.debug(MessageFormat.format("for [{0}]: {1} {2}", bundle //$NON-NLS-1$
+                    .getSymbolicName(), ((storedClass != null) ? "Found" //$NON-NLS-1$
+                    : "Found NOT"), name)); //$NON-NLS-1$
+        }
+        return new CacheEntry(isCached, storedClass);
+    }
+
+    /**
+     * Writes the remaining cache to disk.
+     */
+    public void stop() {
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClass(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[])
+     */
+    public boolean storeClass(final String namespace, final URL sourceFileURL,
+            final Class<?> clazz, final byte[] classbytes) {
+        if (clazz == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"clazz\" must not be null!"); //$NON-NLS-1$
+        }
+        if (classbytes == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"classbytes\" must not be null!"); //$NON-NLS-1$
+        }
+        if (cacheDirectory == null) {
+            return false;
+        }
+
+        final CacheItem item = new CacheItem(classbytes, cacheDirectory
+                .getAbsolutePath(), clazz.getName());
+
+        return this.cacheWriterQueue.offer(item);
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClassAndGeneratedClasses(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[], java.util.Map)
+     */
+    public boolean storeClassAndGeneratedClasses(final String namespace,
+            final URL sourceFileUrl, final Class<?> clazz,
+            final byte[] classbytes, final Map<String, byte[]> generatedClasses) {
+
+        final CacheItem item = new CacheItem(classbytes, cacheDirectory
+                .getAbsolutePath(), clazz.getName(), generatedClasses);
+
+        return this.cacheWriterQueue.offer(item);
+    }
+
+    /**
+     * Hash the shared class namespace using MD5
+     * 
+     * @param keyToHash
+     * @return the MD5 version of the input string
+     */
+    private String hashNamespace(final String namespace) {
+        MessageDigest md = null;
+        try {
+            md = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
+        } catch (final NoSuchAlgorithmException e) {
+            e.printStackTrace();
+        }
+        final byte[] bytes = md.digest(namespace.getBytes());
+        final StringBuffer result = new StringBuffer();
+        for (final byte b : bytes) {
+            int num;
+            if (b < 0) {
+                num = b + 256;
+            } else {
+                num = b;
+            }
+            String s = Integer.toHexString(num);
+            while (s.length() < 2) {
+                s = "0" + s; //$NON-NLS-1$
+            }
+            result.append(s);
+        }
+        return new String(result);
+    }
+
+    private byte[] read(final String name, final File file) {
+        int length = (int) file.length();
+
+        InputStream in = null;
+        try {
+            byte[] classbytes = new byte[length];
+            int bytesread = 0;
+            int readcount;
+
+            in = new FileInputStream(file);
+
+            if (length > 0) {
+                classbytes = new byte[length];
+                for (; bytesread < length; bytesread += readcount) {
+                    readcount = in.read(classbytes, bytesread, length
+                            - bytesread);
+                    if (readcount <= 0) /* if we didn't read anything */
+                    break; /* leave the loop */
+                }
+            } else /* BundleEntry does not know its own length! */{
+                length = READ_BUFFER_SIZE;
+                classbytes = new byte[length];
+                readloop: while (true) {
+                    for (; bytesread < length; bytesread += readcount) {
+                        readcount = in.read(classbytes, bytesread, length
+                                - bytesread);
+                        if (readcount <= 0) /* if we didn't read anything */
+                        break readloop; /* leave the loop */
+                    }
+                    final byte[] oldbytes = classbytes;
+                    length += READ_BUFFER_SIZE;
+                    classbytes = new byte[length];
+                    System.arraycopy(oldbytes, 0, classbytes, 0, bytesread);
+                }
+            }
+            if (classbytes.length > bytesread) {
+                final byte[] oldbytes = classbytes;
+                classbytes = new byte[bytesread];
+                System.arraycopy(oldbytes, 0, classbytes, 0, bytesread);
+            }
+            return classbytes;
+        } catch (final IOException e) {
+            Log.debug(MessageFormat.format(
+                    "for [{0}]: Cannot read [1] from cache!", bundle //$NON-NLS-1$
+                            .getSymbolicName(), name));
+            return null;
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (final IOException e) {
+                    Log.error(MessageFormat.format(
+                            "for [{0}]: Cannot close cache file for [1]!", //$NON-NLS-1$
+                            bundle.getSymbolicName(), name), e);
+                }
+            }
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheItem.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheItem.java
new file mode 100644
index 0000000..7d07e59
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheItem.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Martin Lippert - initial implementation
+ *     Martin Lippert - caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.util.Map;
+
+/**
+ * A CacheItem contains the necessary information to store the cached bytecode
+ * of a class to the cache disk storage.
+ * 
+ * @author Martin Lippert
+ */
+public class CacheItem {
+
+    private final byte[] cachedBytes;
+
+    private final String directory;
+
+    private final Map<String, byte[]> generatedClasses;
+
+    private final String name;
+
+    /**
+     * Create a new item to be cached
+     * 
+     * @param cachedBytes The bytes to be written to the cache
+     * @param directory The directory to where the bytes should be stored
+     * @param name The name of the file to store the bytes in
+     */
+    public CacheItem(final byte[] cachedBytes, final String directory,
+            final String name) {
+        this(cachedBytes, directory, name, null);
+    }
+
+    /**
+     * Create a new item to be cached
+     * 
+     * @param cachedBytes The bytes to be written to the cache
+     * @param directory The directory to where the bytes should be stored
+     * @param name The name of the file to store the bytes in
+     * @param generatedClasses The generated classes that should be stored
+     *            together with this item (className -> bytecode)
+     */
+    public CacheItem(final byte[] cachedBytes, final String directory,
+            final String name, final Map<String, byte[]> generatedClasses) {
+        this.cachedBytes = cachedBytes;
+        this.directory = directory;
+        this.name = name;
+        this.generatedClasses = generatedClasses;
+    }
+
+    /**
+     * @return The bytes to be written to the cache under the given name
+     */
+    public byte[] getCachedBytes() {
+        return cachedBytes;
+    }
+
+    /**
+     * @return The directory in which the item should be stored
+     */
+    public String getDirectory() {
+        return directory;
+    }
+
+    /**
+     * @return A map containing the generated classes (name -> bytecode) for
+     *         this item or null, if there are no generated classes with this
+     *         one
+     */
+    public Map<String, byte[]> getGeneratedClasses() {
+        return generatedClasses;
+    }
+
+    /**
+     * @return The name of the file to be written to the cache
+     */
+    public String getName() {
+        return name;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java
new file mode 100644
index 0000000..eaf2cd7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CacheWriter.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Martin Lippert - initial implementation
+ *     Martin Lippert - caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.io.BufferedOutputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.BlockingQueue;
+
+/**
+ * The CacheWriter is responsible to store cache items to disk. The cache items
+ * are read from the given queue.
+ * 
+ * @author Martin Lippert
+ */
+public class CacheWriter {
+
+    private final Thread writerThread;
+
+    /**
+     * Create a new cache writer for the given queue of cache items
+     * 
+     * @param cacheQueue The blocking queue that delivers the cache items to
+     *            store to this cache writer
+     */
+    public CacheWriter(final BlockingQueue<CacheItem> cacheQueue) {
+        this.writerThread = new Thread(new Runnable() {
+
+            public void run() {
+                try {
+                    while (true) {
+                        final CacheItem item = cacheQueue.take();
+                        try {
+                            store(item);
+                        } catch (final IOException ioe) {
+                            // storing in cache failed, do nothing
+                        }
+                    }
+                } catch (final InterruptedException e) {
+                }
+            }
+        });
+        this.writerThread.setPriority(Thread.MIN_PRIORITY);
+    }
+
+    /**
+     * start the cache writers work (creates a new thread to work on the queue)
+     */
+    public void start() {
+        this.writerThread.start();
+    }
+
+    /**
+     * stops the cache writer
+     */
+    public void stop() {
+        this.writerThread.interrupt();
+    }
+
+    /**
+     * store the cache item to disk
+     * 
+     * This operation creates the appropriate directory for the cache item if it
+     * does not exist
+     * 
+     * @param item the cache item to store to disc
+     * @throws IOException if an error occurs while writing to the cache
+     */
+    protected void store(final CacheItem item) throws IOException {
+
+        // write out generated classes first
+        final Map<String, byte[]> generatedClasses = item.getGeneratedClasses();
+        if (generatedClasses != null) {
+            final Iterator<String> generatedClassNames = generatedClasses
+                    .keySet().iterator();
+            while (generatedClassNames.hasNext()) {
+                final String className = generatedClassNames.next();
+                final byte[] classBytes = generatedClasses.get(className);
+                storeSingleClass(className, classBytes, item.getDirectory());
+            }
+        }
+
+        // write out the woven class
+        storeSingleClass(item.getName(), item.getCachedBytes(), item
+                .getDirectory());
+    }
+
+    private void storeSingleClass(final String className,
+            final byte[] classBytes, final String cacheDirectory)
+            throws FileNotFoundException, IOException {
+        DataOutputStream outCache = null;
+        FileOutputStream fosCache = null;
+        try {
+            final File directory = new File(cacheDirectory);
+            if (!directory.exists()) {
+                directory.mkdirs();
+            }
+
+            fosCache = new FileOutputStream(new File(directory, className));
+            outCache = new DataOutputStream(new BufferedOutputStream(fosCache));
+
+            outCache.write(classBytes);
+        } finally {
+            if (outCache != null) {
+                try {
+                    outCache.flush();
+                    fosCache.getFD().sync();
+                } catch (final IOException e) {
+                    // do nothing, we tried
+                }
+                try {
+                    outCache.close();
+                } catch (final IOException e) {
+                    // do nothing
+                }
+            }
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CachingServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CachingServiceFactory.java
new file mode 100644
index 0000000..8ff4afc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/CachingServiceFactory.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Heiko Seeberger and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Heiko Seeberger - initial implementation
+ *     Martin Lippert - further improvements and optimizations
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.eclipse.equinox.service.weaving.ICachingServiceFactory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.Constants;
+import org.osgi.framework.SynchronousBundleListener;
+
+/**
+ * {@link ICachingService} used as "singleton" OSGi service by
+ * "org.aspectj.osgi".
+ * 
+ * @author Heiko Seeberger
+ */
+public class CachingServiceFactory implements ICachingServiceFactory {
+
+    private final Map<String, ICachingService> bundleCachingServices = new HashMap<String, ICachingService>();
+
+    private final BundleContext bundleContext;
+
+    private final BlockingQueue<CacheItem> cacheQueue;
+
+    private final CacheWriter cacheWriter;
+
+    /**
+     * @param bundleContext Must not be null!
+     * @throws IllegalArgumentException if given bundleContext is null.
+     */
+    public CachingServiceFactory(final BundleContext bundleContext) {
+        if (bundleContext == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"bundleContext\" must not be null!"); //$NON-NLS-1$
+        }
+        this.bundleContext = bundleContext;
+        this.cacheQueue = new ArrayBlockingQueue<CacheItem>(5000);
+        this.cacheWriter = new CacheWriter(this.cacheQueue);
+        this.cacheWriter.start();
+
+        this.bundleContext.addBundleListener(new SynchronousBundleListener() {
+
+            public void bundleChanged(final BundleEvent event) {
+                if (event.getType() == BundleEvent.UNINSTALLED) {
+                    stopBundleCachingService(event);
+                } else if (event.getType() == BundleEvent.UPDATED) {
+                    stopBundleCachingService(event);
+                }
+            }
+        });
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingServiceFactory#createCachingService(java.lang.ClassLoader,
+     *      org.osgi.framework.Bundle, java.lang.String)
+     */
+    public synchronized ICachingService createCachingService(
+            final ClassLoader classLoader, final Bundle bundle, final String key) {
+
+        if (bundle == null) {
+            throw new IllegalArgumentException(
+                    "Argument \"bundle\" must not be null!"); //$NON-NLS-1$
+        }
+
+        final String cacheId = getCacheId(bundle);
+
+        ICachingService bundleCachingService = bundleCachingServices
+                .get(cacheId);
+
+        if (bundleCachingService == null) {
+
+            if (key != null && key.length() > 0) {
+                bundleCachingService = new BundleCachingService(bundleContext,
+                        bundle, key, this.cacheQueue);
+            } else {
+                bundleCachingService = new UnchangedCachingService();
+            }
+            bundleCachingServices.put(cacheId, bundleCachingService);
+
+            if (Log.isDebugEnabled()) {
+                Log.debug(MessageFormat.format(
+                        "Created BundleCachingService for [{0}].", cacheId)); //$NON-NLS-1$
+            }
+        }
+
+        return bundleCachingService;
+    }
+
+    /**
+     * Generates the unique id for the cache of the given bundle (usually the
+     * symbolic name and the bundle version)
+     * 
+     * @param bundle The bundle for which a unique cache id should be calculated
+     * @return The unique id of the cache for the given bundle
+     */
+    public String getCacheId(final Bundle bundle) {
+        String bundleVersion = (String) bundle.getHeaders().get(
+                Constants.BUNDLE_VERSION);
+        if (bundleVersion == null || bundleVersion.length() == 0) {
+            bundleVersion = "0.0.0"; //$NON-NLS-1$
+        }
+        return bundle.getSymbolicName() + "_" + bundleVersion; //$NON-NLS-1$
+    }
+
+    /**
+     * Stops all individual bundle services.
+     */
+    public synchronized void stop() {
+        for (final ICachingService bundleCachingService : bundleCachingServices
+                .values()) {
+            bundleCachingService.stop();
+        }
+        bundleCachingServices.clear();
+        this.cacheWriter.stop();
+    }
+
+    /**
+     * Stops individual bundle caching service if the bundle is uninstalled
+     * 
+     * @param event The event contains the information for which bundle to stop
+     *            the caching service
+     */
+    protected void stopBundleCachingService(final BundleEvent event) {
+        final String cacheId = getCacheId(event.getBundle());
+        final ICachingService bundleCachingService = bundleCachingServices
+                .get(cacheId);
+        if (bundleCachingService != null) {
+            bundleCachingService.stop();
+            bundleCachingServices.remove(cacheId);
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/IBundleConstants.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/IBundleConstants.java
new file mode 100644
index 0000000..a77b2e0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/IBundleConstants.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Heiko Seeberger and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Heiko Seeberger - initial implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+/**
+ * Constants for org.aspectj.osgi.service.caching".
+ * 
+ * @author Heiko Seeberger
+ */
+public interface IBundleConstants {
+
+    /**
+     * The symbolic name for this bundle: "org.aspectj.osgi.service.caching".
+     */
+    public static final String BUNDLE_SYMBOLIC_NAME = "org.eclipse.equinox.weaving.caching"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Log.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Log.java
new file mode 100644
index 0000000..a25b1c3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Log.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Heiko Seeberger and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Heiko Seeberger - initial implementation
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import static org.eclipse.equinox.weaving.internal.caching.IBundleConstants.BUNDLE_SYMBOLIC_NAME;
+
+/**
+ * Logging utility.
+ * 
+ * @author Heiko Seeberger
+ */
+public class Log {
+
+    static boolean debugEnabled = false;
+
+    private static final String PREFIX = "[" + BUNDLE_SYMBOLIC_NAME + "] "; //$NON-NLS-1$ //$NON-NLS-2$
+
+    /**
+     * Logging debug information.
+     * 
+     * @param message The tracing message, optional.
+     */
+    public static void debug(final String message) {
+        if (debugEnabled) {
+            if (message != null) {
+                System.out.println(PREFIX + message);
+            }
+        }
+    }
+
+    /**
+     * Logging an error.
+     * 
+     * @param message The error message, optional.
+     * @param t The Throwable for this error, optional.
+     */
+    public static void error(final String message, final Throwable t) {
+        if (message != null) {
+            System.err.println(PREFIX + message);
+        }
+        if (t != null) {
+            t.printStackTrace(System.err);
+        }
+    }
+
+    /**
+     * Shows debug toggle state.
+     * 
+     * @return true, if debug is enabled, else false.
+     */
+    public static boolean isDebugEnabled() {
+        return debugEnabled;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/UnchangedCachingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/UnchangedCachingService.java
new file mode 100644
index 0000000..fc899fa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/UnchangedCachingService.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html.
+ * 
+ * Contributors:
+ *     Martin Lippert - initial implementation
+ *     Martin Lippert - caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.internal.caching;
+
+import java.net.URL;
+import java.util.Map;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.equinox.service.weaving.ICachingService;
+
+/**
+ * This implementation of the caching service is responsible for those bundles
+ * that are not affected by the weaving. This is the case if no aspects are
+ * being found for this bundle.
+ * 
+ * This caching service indicates for the runtime system that classes of the
+ * bundle this caching service belongs to dont need to be passed to the weaving
+ * service. Instead the original code from the bundle can be used.
+ * 
+ * @author Martin Lippert
+ */
+public class UnchangedCachingService implements ICachingService {
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#canCacheGeneratedClasses()
+     */
+    public boolean canCacheGeneratedClasses() {
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#findStoredClass(java.lang.String,
+     *      java.net.URL, java.lang.String)
+     */
+    public CacheEntry findStoredClass(final String namespace,
+            final URL sourceFileURL, final String name) {
+        return new CacheEntry(true, null);
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#stop()
+     */
+    public void stop() {
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClass(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[])
+     */
+    public boolean storeClass(final String namespace, final URL sourceFileURL,
+            final Class<?> clazz, final byte[] classbytes) {
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ICachingService#storeClassAndGeneratedClasses(java.lang.String,
+     *      java.net.URL, java.lang.Class, byte[], java.util.Map)
+     */
+    public boolean storeClassAndGeneratedClasses(final String namespace,
+            final URL sourceFileUrl, final Class<?> clazz,
+            final byte[] classbytes, final Map<String, byte[]> generatedClasses) {
+        return false;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.classpath b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.classpath
new file mode 100644
index 0000000..a070cdd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry excluding="org/aspectj/weaver/osgi/hooks/AspectJBundleWatcherHook.java|org/aspectj/weaver/osgi/hooks/AspectJBundleFileWrapperFactoryHook.java|org/aspectj/weaver/osgi/hooks/AspectJHookConfigurator.java|org/aspectj/weaver/osgi/hooks/AspectJClassLoadingHook.java|org/aspectj/weaver/osgi/hooks/AspectJClassLoadingStatsHook.java|org/aspectj/osgi/hooks/AspectJHookConfigurator.java|org/aspectj/osgi/hooks/AspectJClassLoadingHook.java|org/aspectj/osgi/hooks/AspectJBundleFileWrapperFactoryHook.java|org/aspectj/osgi/hooks/AspectJBundleWatcherHook.java|org/aspectj/osgi/hooks/AspectJClassLoadingStatsHook.java" kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.options b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.options
new file mode 100644
index 0000000..b588b6c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.options
@@ -0,0 +1,6 @@
+org.aspectj.osgi/debug=false
+org.aspectj.osgi/debug/bundle=false
+org.aspectj.osgi/debug/weave=true
+org.aspectj.osgi/debug/cache=false
+org.aspectj.osgi/debug/supplements=false
+org.aspectj.osgi/debug/bundleName=false
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.project b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.project
new file mode 100644
index 0000000..0e9e7e9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.equinox.weaving.hook</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..f8cd6fb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Mon Aug 04 14:33:29 CEST 2008
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..2c10e2d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,339 @@
+#Sun Oct 19 17:27:55 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=1
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=1
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..1c44c2b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,115 @@
+#Mon Aug 04 14:33:29 CEST 2008
+cleanup.add_default_serial_version_id=false
+cleanup.add_generated_serial_version_id=true
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=true
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=true
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=true
+cleanup.sort_members_all=true
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_defaultCleanUpProfile
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_defaultFormatterProfile
+formatter_settings_version=11
+internal.default.compliance=default
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;com;de;net;org;
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2008 ${user} and others.\n * All rights reserved. This program and the accompanying materials \n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html.\n * \n * Contributors\:\n *     ${user} - initial implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">// ${todo} Auto-generated constructor stub\n${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=true
+sp_cleanup.sort_members_all=true
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..7a5611d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,22 @@
+#Mon Aug 04 14:33:29 CEST 2008
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e191d0d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/META-INF/MANIFEST.MF
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Aspect Weaving Hooks Plug-in (Incubation)
+Bundle-SymbolicName: org.eclipse.equinox.weaving.hook
+Bundle-Version: 1.0.0.qualifier
+Fragment-Host: org.eclipse.osgi;bundle-version="[3.2.0,4.0.0)"
+Export-Package: org.eclipse.equinox.service.weaving,
+ org.eclipse.equinox.weaving.adaptors;x-friends:="org.eclipse.equinox.weaving.tests",
+ org.eclipse.equinox.weaving.hooks;x-friends:="org.eclipse.equinox.weaving.tests"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/build.properties b/eclipse/plugins/org.eclipse.equinox.weaving.hook/build.properties
new file mode 100644
index 0000000..4645e8e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               hookconfigurators.properties,\
+               .options,\
+               fragment.xml
+javacWarnings..=-raw,-unchecked
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/config.ini b/eclipse/plugins/org.eclipse.equinox.weaving.hook/config.ini
new file mode 100644
index 0000000..63a0e87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/config.ini
@@ -0,0 +1,11 @@
+osgi.bundles=org.eclipse.equinox.weaving.aspectj at 1\:start,org.eclipse.equinox.common at 2\:start,org.eclipse.update.configurator at 3\:start,org.eclipse.core.runtime at start
+osgi.bundles.defaultStartLevel=4
+osgi.framework=org.eclipse.osgi
+osgi.configuration.cascaded=false
+osgi.splashPath=platform:/base/plugins/org.eclipse.platform
+
+# AOSGi
+osgi.framework.extensions=org.eclipse.equinox.weaving.hook
+#aj.weaving.verbose=true
+#org.aspectj.weaver.showWeaveInfo=true
+org.aspectj.osgi.verbose=true
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/hookconfigurators.properties b/eclipse/plugins/org.eclipse.equinox.weaving.hook/hookconfigurators.properties
new file mode 100644
index 0000000..d3b464c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/hookconfigurators.properties
@@ -0,0 +1,2 @@
+hook.configurators= \
+ org.eclipse.equinox.weaving.hooks.WeavingHook
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/readme.txt b/eclipse/plugins/org.eclipse.equinox.weaving.hook/readme.txt
new file mode 100644
index 0000000..a5fcf7b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/readme.txt
@@ -0,0 +1,15 @@
+This version works with Eclipse 3.2 Final only. Checkout projects org.aspectj.osgi,
+org.aspectj.osgi.service.weaving and org.eclipse.osgi_3.2.0. The OSGi bundle is 
+needed to run the org.aspectj.osgi Framework Extension bundle fragment as a 
+source project (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143696).
+
+To run the accompanying tests checkout all the projects in aspects/tests and
+open the WeavingTest.lauch configuration.
+
+To run the demos checkout the projects in aspects/demos.
+- HelloWorld: run HelloWorldTest in the demo.hello bundle as a JUnit Plug-in 
+test with the config.ini in the org.aspectj.osgi project.
+- Tooltip: run "Tooltip Demo.launch" in demo.eclipse.tooltip as an 
+Eclipse Application using the config.ini in the same project.
+- Tracing: run "Eclipse Tracing Demo.launch" in demo.eclipse.tooltip as an 
+Eclipse Application using the config.ini in the same project.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/CacheEntry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/CacheEntry.java
new file mode 100644
index 0000000..ad7ec7c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/CacheEntry.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert              initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+/**
+ * A CacheEntry represents an item that is read (or should have been read) from
+ * the cache.
+ * 
+ * A cache entry is the primary communication item between the basic hook
+ * mechanism and the cache implementation. The cache can tell the hook to skip
+ * any weaving for the class (in the case the cache knows that the class don't
+ * need any weaving, e.g. no aspects affect this class) or to use the bytes that
+ * are read from the cache to define the class in the VM.
+ * 
+ * @author Martin Lippert
+ */
+public class CacheEntry {
+
+    private final byte[] cachedBytes;
+
+    private final boolean dontWeave;
+
+    /**
+     * Creates a new cache entry. This item can tell the basic hook mechanism to
+     * use the given cached bytes for the class definition or if the original
+     * class bytes needs weaving or not
+     * 
+     * @param dontWeave A flag that indicates whether this item needs to be
+     *            woven or not
+     * @param cachedBytes The bytes for the class read from the cache
+     */
+    public CacheEntry(final boolean dontWeave, final byte[] cachedBytes) {
+        this.dontWeave = dontWeave;
+        this.cachedBytes = cachedBytes;
+    }
+
+    /**
+     * Tell the hook mechanism to weave a class or not to weave a class
+     * 
+     * @return true, if the class doesn't need any weaving, otherwise false
+     */
+    public boolean dontWeave() {
+        return dontWeave;
+    }
+
+    /**
+     * Returns the bytes that are read from the cache. These bytes should be
+     * used for defining the class instead of the original ones.
+     * 
+     * @return The cached bytes for the class
+     */
+    public byte[] getCachedBytes() {
+        return cachedBytes;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingService.java
new file mode 100644
index 0000000..a1865fb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingService.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *   Martin Lippert            extracted caching service factory
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import java.net.URL;
+import java.util.Map;
+
+public interface ICachingService {
+
+    public boolean canCacheGeneratedClasses();
+
+    public CacheEntry findStoredClass(String namespace, URL sourceFileURL,
+            String name);
+
+    public void stop();
+
+    public boolean storeClass(String namespace, URL sourceFileURL,
+            Class<?> clazz, byte[] classbytes);
+
+    public boolean storeClassAndGeneratedClasses(String namespace,
+            URL sourceFileURL, Class<?> clazz, byte[] classbytes,
+            Map<String, byte[]> generatedClasses);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingServiceFactory.java
new file mode 100644
index 0000000..f917f2f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ICachingServiceFactory.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * This is the central interface for other bundles to implement when they would
+ * like to contribute a concrete caching implementation. Bundles should
+ * implement this interface and register an implementation as an OSGi service
+ * under this interface.
+ * 
+ * @author Martin Lippert
+ */
+public interface ICachingServiceFactory {
+
+    /**
+     * Create concrete caching service for the given bundle. The caching service
+     * is then responsible to cache woven bytecode and retrieve those bytecodes
+     * from the cache.
+     * 
+     * @param classLoader The classloader if the given bundle
+     * @param bundle The bundle the caching service should be created for
+     * @param key A fingerprint that is created by the concrete weavers to
+     *            indicate what the weaving configuration for this bundle is.
+     *            The caching service should be able to handle different keys
+     *            for the same bundle in order not the deliver the wrong cached
+     *            bytes from the cache
+     * @return The caching service for the given bundle
+     */
+    public ICachingService createCachingService(ClassLoader classLoader,
+            Bundle bundle, String key);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ISupplementerRegistry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ISupplementerRegistry.java
new file mode 100644
index 0000000..a1db9ae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/ISupplementerRegistry.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert            initial implementation     
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import java.util.List;
+
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+public interface ISupplementerRegistry {
+
+    public void addBundle(final Bundle bundle);
+
+    public void addSupplementedBundle(final Bundle bundle);
+
+    public void addSupplementer(final Bundle bundle, final boolean updateBundles);
+
+    public List<Supplementer> getMatchingSupplementers(
+            final String symbolicName, final ManifestElement[] imports,
+            final ManifestElement[] exports);
+
+    public PackageAdmin getPackageAdmin();
+
+    public Supplementer[] getSupplementers(final Bundle bundle);
+
+    public Supplementer[] getSupplementers(final long bundleID);
+
+    /**
+     * Refreshes the given bundles
+     * 
+     * @param bundles The bundles to refresh
+     */
+    public void refreshBundles(final Bundle[] bundles);
+
+    public void removeBundle(final Bundle bundle);
+
+    public void setBundleContext(final BundleContext context);
+
+    public void setPackageAdmin(final PackageAdmin packageAdmin);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingService.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingService.java
new file mode 100644
index 0000000..76c567e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingService.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            extracted weaving service factory
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * The IWeavingService is the interface for weavers for individual bundles. This
+ * weaver is used by the core equinox aspects runtime to weave bytecodes when a
+ * class is loaded and not read from cache.
+ * 
+ * @author Martin Lippert
+ */
+public interface IWeavingService {
+
+    /**
+     * Flush all generated classes from the weaving service so that memory kept
+     * by the weaving service for additional classes can be freed.
+     * 
+     * @param loader The class loader the weaving service belongs to
+     */
+    public void flushGeneratedClasses(ClassLoader loader);
+
+    /**
+     * Has the weaving service generated new classes on the fly for the given
+     * class?
+     * 
+     * @param loader The class loader of the woven class
+     * @param className The name of the woven class
+     * @return true, if the weaving service has generated additional classes for
+     *         the woven class (closures, for example)
+     */
+    public boolean generatedClassesExistFor(ClassLoader loader, String className);
+
+    /**
+     * Returns a map that contains all generated classes for the given class.
+     * Implementations of this method should remove those classes from internal
+     * lists (to free memory). This means also that calling this method a second
+     * time will return an emptry map.
+     * 
+     * @param className The name of the class for which additional classes were
+     *            generated
+     * @return The generated classes (key: generated class name, value:
+     *         generated class bytecode)
+     */
+    public Map<String, byte[]> getGeneratedClassesFor(String className);
+
+    /**
+     * The key of a concrete weaver for a bundle defines the setting in which
+     * the weaver works. This key typically defines a unique key for the set of
+     * aspects which are woven into this bundle. The core equinox aspects
+     * runtime uses this key to feed the caching service. This means, the weaver
+     * should return different keys for different set of aspects (including
+     * versions), respectively when the cache should switch its context.
+     * 
+     * @return A unique key to define the set of aspects that are woven into the
+     *         bundle to which this weaver belongs
+     */
+    public String getKey();
+
+    /**
+     * This method is called for each class which is loaded into the JVM and not
+     * read from cache to do the actual weaving, if necessary.
+     * 
+     * @param name The fully qualified name of the class to be loaded
+     * @param classbytes The original unmodified bytecode of the class read by
+     *            the standard OSGi classloading mechanism
+     * @param loader The classloader whichi s responsible for loading the class
+     * @return The modified (woven) bytecode of the class or null, if no
+     *         modification happened
+     * @throws IOException
+     */
+    public byte[] preProcess(String name, byte[] classbytes, ClassLoader loader)
+            throws IOException;
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingServiceFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingServiceFactory.java
new file mode 100644
index 0000000..ffdc7fd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/IWeavingServiceFactory.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.osgi.framework.Bundle;
+
+/**
+ * This is the central interface for other bundles to implement when they would
+ * like to contribute a concrete weaving mechanism. Bundles should implement
+ * this interface and register an implementation as an OSGi service under this
+ * interface.
+ * 
+ * @author Martin Lippert
+ */
+public interface IWeavingServiceFactory {
+
+    /**
+     * Create a concrete weaving implementation for the given bundle. This is
+     * called by the basic equinox aspects weaving hook mechanism lazily when
+     * the classloader for the bundle is created.
+     * 
+     * @param loader The classloader of the bundle for which to create a weaver
+     * @param bundle The bundle for which to create the weaver
+     * @param resolverState The state service of the OSGi runtime
+     * @param bundleDesciption The description of the bundle for which to create
+     *            a weaver
+     * @param supplementerRegistry The supplementer registry which is used by
+     *            the core equinox aspects hook
+     * @return The created weaver for the given bundle
+     */
+    public IWeavingService createWeavingService(ClassLoader loader,
+            Bundle bundle, State resolverState,
+            BundleDescription bundleDesciption,
+            ISupplementerRegistry supplementerRegistry);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/Supplementer.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/Supplementer.java
new file mode 100644
index 0000000..20ec8b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/service/weaving/Supplementer.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Martin Lippert            supplementing mechanism reworked     
+ *   Martin Lippert            fragment handling fixed
+ *******************************************************************************/
+
+package org.eclipse.equinox.service.weaving;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+
+/**
+ * A supplementer object is created for every bundle that contains one or many
+ * of the supplementer headers in its header.
+ * 
+ * The corresponding supplementer object contains the information which headers
+ * the bundle defines and which bundles it supplements in the running system.
+ * 
+ * @author Martin Lippert
+ */
+public class Supplementer {
+
+    private final ManifestElement[] supplementBundle;
+
+    private final Set<Bundle> supplementedBundles; // elements of type Bundle
+
+    private final Bundle supplementer;
+
+    private final Bundle supplementerHost;
+
+    private final ManifestElement[] supplementExporter;
+
+    private final ManifestElement[] supplementImporter;
+
+    /**
+     * Creates a supplementer object for the given bundle.
+     * 
+     * @param bundle The bundle that defines the supplementer headers
+     * @param bundleHost The host bundle of the supplementer bundle, if the
+     *            bundle is a fragment, otherwise null
+     * @param supplementBundle The parsed manifest headers defined for
+     *            Eclipse-SupplementBundle
+     * @param supplementImporter The parsed manifest headers defined for
+     *            Eclipse-SupplementImporter
+     * @param supplementExporter The parsed manifest headers defined for
+     *            Eclipse-SupplementExporter
+     */
+    public Supplementer(final Bundle bundle, final Bundle bundleHost,
+            final ManifestElement[] supplementBundle,
+            final ManifestElement[] supplementImporter,
+            final ManifestElement[] supplementExporter) {
+        this.supplementer = bundle;
+        this.supplementerHost = bundleHost != null ? bundleHost : bundle;
+        this.supplementBundle = supplementBundle;
+        this.supplementImporter = supplementImporter;
+        this.supplementExporter = supplementExporter;
+        this.supplementedBundles = new HashSet<Bundle>();
+    }
+
+    /**
+     * Add a bundle to the list of supplemented bundles
+     * 
+     * @param supplementedBundle The bundle that is supplemented by this
+     *            supplementer
+     */
+    public void addSupplementedBundle(final Bundle supplementedBundle) {
+        this.supplementedBundles.add(supplementedBundle);
+    }
+
+    /**
+     * Gives information about which bundles are currently supplemented by this
+     * supplementer
+     * 
+     * @return The currently supplemented bundles
+     */
+    public Bundle[] getSupplementedBundles() {
+        return supplementedBundles.toArray(new Bundle[supplementedBundles
+                .size()]);
+    }
+
+    /**
+     * Returns the bundle that defines the supplementer headers (this
+     * supplementer object belongs to)
+     * 
+     * @return The bundle object this supplementer belongs to
+     */
+    public Bundle getSupplementerBundle() {
+        return supplementer;
+    }
+
+    /**
+     * Returns the host of the supplementer bundle, if it is a fragment,
+     * otherwise this returns the same as getSupplementerBundle()
+     * 
+     * @return The host bundle this supplementer belongs to
+     */
+    public Bundle getSupplementerHost() {
+        return supplementerHost;
+    }
+
+    /**
+     * The symbolic name of the supplementer bundle
+     * 
+     * @return The symbolic name of the supplementer bundle
+     */
+    public String getSymbolicName() {
+        return supplementer.getSymbolicName();
+    }
+
+    /**
+     * Provides information about whether a given bundle is supplemented by this
+     * supplementer or not
+     * 
+     * @param bundle The bundle that might be supplemented by this supplementer
+     * @return true, if the bundle is supplemented by this supplementer,
+     *         otherwise false
+     */
+    public boolean isSupplemented(final Bundle bundle) {
+        return supplementedBundles.contains(bundle);
+    }
+
+    /**
+     * Checks if the given export-package header definitions matches the
+     * supplement-exporter definitions of this supplementer
+     * 
+     * @param exports The headers to check for matching against this
+     *            supplementer
+     * @return true, if this supplementer matches against the given
+     *         export-package headers
+     */
+    public boolean matchesSupplementExporter(final ManifestElement[] exports) {
+        boolean matches = false;
+
+        if (supplementExporter != null)
+            for (int i = 0; !matches && i < supplementExporter.length; i++) {
+                final ManifestElement supplementExport = supplementExporter[i];
+                for (int j = 0; !matches && j < exports.length; j++) {
+                    final ManifestElement exportPackage = exports[j];
+                    if (supplementExport.getValue().equals(
+                            exportPackage.getValue())) matches = true;
+                }
+            }
+
+        return matches;
+    }
+
+    /**
+     * Checks if the given import-package header definitions matches the
+     * supplement-importer definitions of this supplementer
+     * 
+     * @param imports The headers to check for matching against this
+     *            supplementer
+     * @return true, if this supplementer matches against the given
+     *         import-package headers
+     */
+    public boolean matchesSupplementImporter(final ManifestElement[] imports) {
+        boolean matches = false;
+
+        if (supplementImporter != null)
+            for (int i = 0; !matches && i < supplementImporter.length; i++) {
+                final ManifestElement supplementImport = supplementImporter[i];
+                for (int j = 0; !matches && j < imports.length; j++) {
+                    final ManifestElement importPackage = imports[j];
+                    if (supplementImport.getValue().equals(
+                            importPackage.getValue())) matches = true;
+                }
+            }
+
+        return matches;
+    }
+
+    /**
+     * Checks if the given bundle symbolic name definition matches the
+     * supplement-bundle definition of this supplementer
+     * 
+     * @param symbolicName The symbolic name of the bundle that shoudl be
+     *            checked
+     * @return true, if this supplementer matches against the given bundle
+     *         symbolic name
+     */
+    public boolean matchSupplementer(final String symbolicName) {
+        boolean matches = false;
+
+        if (supplementBundle != null)
+            for (int i = 0; !matches && i < supplementBundle.length; i++) {
+                final ManifestElement bundle = supplementBundle[i];
+                if (equals_wild(bundle.getValue(), symbolicName))
+                    matches = true;
+            }
+
+        return matches;
+    }
+
+    /**
+     * Removes the given bundle from the set of supplemented bundles (that are
+     * supplemented by this supplementer)
+     * 
+     * @param supplementedBundle The bundle that is no longer supplemented by
+     *            this supplementer
+     */
+    public void removeSupplementedBundle(final Bundle supplementedBundle) {
+        this.supplementedBundles.remove(supplementedBundle);
+    }
+
+    //knibb
+    //test if two Strings are equal
+    //with wild card support - only supports strings ending in *
+    private boolean equals_wild(final String input, final String match) {
+        if (input.equals(match)) {
+            //its a match so just return true
+            return true;
+        }
+        if (input.endsWith("*") == false) {
+            //no wildcards are being used here
+            return false;
+        }
+        final String wild_in = input.substring(0, input.length() - 1);
+        if (match.startsWith(wild_in)) return true;
+
+        return false;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java
new file mode 100644
index 0000000..74a8fcd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Matthew Webster           initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.adaptors;
+
+import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
+
+public class Debug {
+
+    public static final String ASPECTJ_OSGI = "org.eclipse.equinox.weaving.hook"; //$NON-NLS-1$
+
+    public static boolean DEBUG_BUNDLE;
+
+    public static String DEBUG_BUNDLENAME;
+
+    public static boolean DEBUG_CACHE;
+
+    public static boolean DEBUG_GENERAL;
+
+    public static boolean DEBUG_SUPPLEMENTS;
+
+    public static boolean DEBUG_WEAVE;
+
+    public static final String OPTION_DEBUG_BUNDLE = ASPECTJ_OSGI
+            + "/debug/bundle"; //$NON-NLS-1$
+
+    public static final String OPTION_DEBUG_BUNDLENAME = ASPECTJ_OSGI
+            + "/debug/bundleName"; //$NON-NLS-1$
+
+    public static final String OPTION_DEBUG_CACHE = ASPECTJ_OSGI
+            + "/debug/cache"; //$NON-NLS-1$
+
+    public static final String OPTION_DEBUG_GENERAL = ASPECTJ_OSGI + "/debug"; //$NON-NLS-1$
+
+    public static final String OPTION_DEBUG_SUPPLEMENTS = ASPECTJ_OSGI
+            + "/debug/supplements"; //$NON-NLS-1$
+
+    public static final String OPTION_DEBUG_WEAVE = ASPECTJ_OSGI
+            + "/debug/weave"; //$NON-NLS-1$
+
+    static {
+        final FrameworkDebugOptions fdo = FrameworkDebugOptions.getDefault();
+        if (fdo != null) {
+            DEBUG_GENERAL = fdo.getBooleanOption(OPTION_DEBUG_GENERAL, false);
+            DEBUG_BUNDLE = fdo.getBooleanOption(OPTION_DEBUG_BUNDLE, false);
+            DEBUG_WEAVE = fdo.getBooleanOption(OPTION_DEBUG_WEAVE, false);
+            DEBUG_CACHE = fdo.getBooleanOption(OPTION_DEBUG_CACHE, false);
+            DEBUG_BUNDLENAME = fdo.getOption(OPTION_DEBUG_BUNDLENAME, "");
+            DEBUG_SUPPLEMENTS = fdo.getBooleanOption(OPTION_DEBUG_SUPPLEMENTS,
+                    false);
+        }
+    }
+
+    public static boolean bundleNameMatches(final String name) {
+        return name.equals(DEBUG_BUNDLENAME);
+    }
+
+    public static void println(final String s) {
+        /* if (s.indexOf("org.eclipse.osgi.tests") != -1) */System.err
+                .println(s);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java
new file mode 100644
index 0000000..a1f3627
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.adaptors;
+
+import java.net.URL;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
+
+public interface IWeavingAdaptor {
+
+    public CacheEntry findClass(String name, URL sourceFileURL);
+
+    public void initialize();
+
+    public void setBaseClassLoader(BaseClassLoader baseClassLoader);
+
+    public boolean storeClass(String name, URL sourceFileURL, Class clazz,
+            byte[] classbytes);
+
+    public byte[] weaveClass(String name, byte[] bytes);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java
new file mode 100644
index 0000000..20d5074
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            minor changes and bugfixes     
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.adaptors;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.eclipse.equinox.service.weaving.IWeavingService;
+import org.eclipse.equinox.weaving.hooks.WeavingBundleFile;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
+import org.eclipse.osgi.framework.internal.core.BundleFragment;
+import org.eclipse.osgi.framework.internal.core.BundleHost;
+import org.osgi.framework.Bundle;
+
+public class WeavingAdaptor implements IWeavingAdaptor {
+
+    private static class ThreadLocalSet extends ThreadLocal {
+
+        public boolean contains(final Object obj) {
+            final Set set = (Set) get();
+            return set.contains(obj);
+        }
+
+        public void put(final Object obj) {
+            final Set set = (Set) get();
+            if (set.contains(obj)) {
+                throw new RuntimeException(obj.toString());
+            }
+            set.add(obj);
+        }
+
+        public void remove(final Object obj) {
+            final Set set = (Set) get();
+            if (!set.contains(obj)) {
+                throw new RuntimeException(obj.toString());
+            }
+            set.remove(obj);
+        }
+
+        @Override
+        protected Object initialValue() {
+            return new HashSet();
+        }
+    }
+
+    private static ThreadLocalSet identifyRecursionSet = new ThreadLocalSet();
+
+    private BaseClassLoader baseLoader;
+
+    private Bundle bundle;
+
+    private ICachingService cachingService;
+
+    private final BaseData data;
+
+    private final WeavingAdaptorFactory factory;
+
+    private boolean initialized = false;
+
+    private String symbolicName;
+
+    private IWeavingService weavingService;
+
+    public WeavingAdaptor(final BaseData baseData,
+            final WeavingAdaptorFactory serviceFactory,
+            final BaseClassLoader baseClassLoader,
+            final IWeavingService weavingService,
+            final ICachingService cachingService) {
+        this.data = baseData;
+        this.factory = serviceFactory;
+        this.symbolicName = baseData.getLocation();
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("- AspectJAdaptor.AspectJAdaptor() bundle="
+                    + symbolicName);
+    }
+
+    public CacheEntry findClass(final String name, final URL sourceFileURL) {
+        if (Debug.DEBUG_CACHE)
+            Debug.println("> AspectJAdaptor.findClass() bundle=" + symbolicName
+                    + ", url=" + sourceFileURL + ", name=" + name);
+        CacheEntry cacheEntry = null;
+
+        initialize();
+        if (cachingService != null) {
+            cacheEntry = cachingService
+                    .findStoredClass("", sourceFileURL, name);
+        }
+
+        if (Debug.DEBUG_CACHE)
+            Debug.println("< AspectJAdaptor.findClass() cacheEntry="
+                    + cacheEntry);
+        return cacheEntry;
+    }
+
+    public void initialize() {
+        synchronized (this) {
+            if (initialized) return;
+
+            this.bundle = data.getBundle();
+            this.symbolicName = data.getSymbolicName();
+            if (!identifyRecursionSet.contains(this)) {
+                identifyRecursionSet.put(this);
+
+                if (Debug.DEBUG_GENERAL)
+                    Debug.println("> AspectJAdaptor.initialize() bundle="
+                            + symbolicName + ", baseLoader=" + baseLoader);
+
+                if (symbolicName.startsWith("org.aspectj")) {
+                    if (Debug.DEBUG_GENERAL)
+                        Debug
+                                .println("- AspectJAdaptor.initialize() symbolicName="
+                                        + symbolicName
+                                        + ", baseLoader="
+                                        + baseLoader);
+                } else if (baseLoader != null) {
+                    weavingService = factory.getWeavingService(baseLoader);
+                    cachingService = factory.getCachingService(baseLoader,
+                            bundle, weavingService);
+                } else if (bundle instanceof BundleFragment) {
+                    final BundleFragment fragment = (BundleFragment) bundle;
+                    final BundleHost host = (BundleHost) factory
+                            .getHost(fragment);
+                    if (Debug.DEBUG_GENERAL)
+                        Debug
+                                .println("- AspectJAdaptor.initialize() symbolicName="
+                                        + symbolicName + ", host=" + host);
+
+                    final BaseData hostData = (BaseData) host.getBundleData();
+                    //				System.err.println("? AspectJAdaptor.initialize() bundleData=" + hostData);
+                    final BundleFile bundleFile = hostData.getBundleFile();
+                    if (bundleFile instanceof WeavingBundleFile) {
+                        final WeavingBundleFile hostFile = (WeavingBundleFile) bundleFile;
+                        //					System.err.println("? AspectJAdaptor.initialize() bundleFile=" + hostFile);
+                        final WeavingAdaptor hostAdaptor = (WeavingAdaptor) hostFile
+                                .getAdaptor();
+                        //					System.err.println("? AspectJAdaptor.initialize() bundleFile=" + hostAdaptor);
+                        weavingService = hostAdaptor.weavingService;
+                        cachingService = factory.getCachingService(
+                                hostAdaptor.baseLoader, bundle, weavingService);
+                    }
+                } else {
+                    if (Debug.DEBUG_GENERAL)
+                        Debug
+                                .println("W AspectJAdaptor.initialize() symbolicName="
+                                        + symbolicName
+                                        + ", baseLoader="
+                                        + baseLoader);
+                }
+                initialized = true;
+                identifyRecursionSet.remove(this);
+            }
+
+            if (Debug.DEBUG_GENERAL)
+                Debug.println("< AspectJAdaptor.initialize() weavingService="
+                        + (weavingService != null) + ", cachingService="
+                        + (cachingService != null));
+        }
+    }
+
+    public void setBaseClassLoader(final BaseClassLoader baseClassLoader) {
+        this.baseLoader = baseClassLoader;
+
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("- AspectJAdaptor.setBaseClassLoader() bundle="
+                    + symbolicName + ", baseLoader=" + baseLoader);
+    }
+
+    public boolean storeClass(final String name, final URL sourceFileURL,
+            final Class clazz, final byte[] classbytes) {
+        if (Debug.DEBUG_CACHE)
+            Debug.println("> AspectJAdaptor.storeClass() bundle="
+                    + symbolicName + ", url=" + sourceFileURL + ", name="
+                    + name + ", clazz=" + clazz);
+        boolean stored = false;
+
+        initialize();
+        if (cachingService != null) {
+            //have we generated a closure? 
+            if (weavingService != null
+                    && weavingService.generatedClassesExistFor(
+                            (ClassLoader) baseLoader, name)) {
+                //If so we need to ask the cache if its capable of handling generated closures
+                if (cachingService.canCacheGeneratedClasses()) {
+                    final Map<String, byte[]> generatedClasses = weavingService
+                            .getGeneratedClassesFor(name);
+
+                    stored = cachingService.storeClassAndGeneratedClasses("",
+                            sourceFileURL, clazz, classbytes, generatedClasses);
+                } else {
+                    weavingService
+                            .flushGeneratedClasses((ClassLoader) baseLoader);
+                    if (Debug.DEBUG_CACHE)
+                        Debug
+                                .println("- AspectJAdaptor.storeClass() generatedClassesExistFor=true");
+                }
+            } else {
+                stored = cachingService.storeClass("", sourceFileURL, clazz,
+                        classbytes);
+                if (!stored) {
+                    if (Debug.DEBUG_CACHE)
+                        Debug.println("E AspectJHook.storeClass() bundle="
+                                + symbolicName + ", name=" + name);
+                }
+            }
+        }
+        if (Debug.DEBUG_CACHE)
+            Debug.println("< AspectJAdaptor.storeClass() stored=" + stored);
+        return stored;
+    }
+
+    @Override
+    public String toString() {
+        return "AspectJAdaptor[" + symbolicName + "]";
+    }
+
+    public byte[] weaveClass(final String name, final byte[] bytes) {
+        if (Debug.DEBUG_WEAVE)
+            Debug.println("> AspectJAdaptor.weaveClass() bundle="
+                    + symbolicName + ", name=" + name + ", bytes="
+                    + bytes.length);
+        byte[] newBytes = null;
+
+        initialize();
+        if (/* shouldWeave(bytes) && */weavingService != null) {
+            try {
+                newBytes = weavingService.preProcess(name, bytes,
+                        (ClassLoader) baseLoader);
+            } catch (final IOException ex) {
+                throw new ClassFormatError(ex.toString());
+            }
+        }
+
+        if (Debug.DEBUG_WEAVE)
+            Debug.println("< AspectJAdaptor.weaveClass() newBytes=" + newBytes);
+        return newBytes;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java
new file mode 100644
index 0000000..65dca70
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Heiko Seeberger           Enhancements for service dynamics     
+ *   Martin Lippert            extracted weaving and caching service factories
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.adaptors;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.equinox.service.weaving.ICachingService;
+import org.eclipse.equinox.service.weaving.ICachingServiceFactory;
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.IWeavingService;
+import org.eclipse.equinox.service.weaving.IWeavingServiceFactory;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class WeavingAdaptorFactory {
+
+    private static final Collection IGNORE_WEAVING_SERVICE_BUNDLES = Arrays
+            .asList(new String[] { "org.eclipse.equinox.weaving.aspectj",
+                    "org.eclipse.equinox.weaving.caching",
+                    "org.eclipse.equinox.weaving.caching.j9",
+                    "org.eclipse.update.configurator",
+                    "org.eclipse.equinox.simpleconfigurator",
+                    "org.eclipse.equinox.common" });
+
+    private static final String WEAVING_SERVICE_DYNAMICS_PROPERTY = "equinox.weaving.service.dynamics";
+
+    private ServiceTracker cachingServiceFactoryTracker;
+
+    private PackageAdmin packageAdminService;
+
+    private StartLevel startLevelService;
+
+    private ISupplementerRegistry supplementerRegistry;
+
+    private ServiceTracker weavingServiceFactoryTracker;
+
+    private ServiceListener weavingServiceListener;
+
+    /**
+     * Bundle -> Local weaving service
+     */
+    private final Map weavingServices = Collections
+            .synchronizedMap(new HashMap());
+
+    public WeavingAdaptorFactory() {
+    }
+
+    public void dispose(final BundleContext context) {
+
+        context.removeServiceListener(weavingServiceListener);
+        if (Debug.DEBUG_WEAVE)
+            Debug.println("> Removed service listener for weaving service.");
+
+        weavingServiceFactoryTracker.close();
+        if (Debug.DEBUG_WEAVE)
+            Debug.println("> Closed service tracker for weaving service.");
+
+        cachingServiceFactoryTracker.close();
+        if (Debug.DEBUG_CACHE)
+            Debug.println("> Closed service tracker for caching service.");
+    }
+
+    public Bundle getHost(final Bundle fragment) {
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("> AspectJAdaptorFactory.getHost() fragment="
+                    + fragment);
+
+        Bundle host = null;
+        if (packageAdminService != null)
+            host = packageAdminService.getHosts(fragment)[0];
+
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("< AspectJAdaptorFactory.getHost() " + host);
+        return host;
+    }
+
+    public void initialize(final BundleContext context,
+            final ISupplementerRegistry supplementerRegistry) {
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("> AspectJAdaptorFactory.initialize() context="
+                    + context);
+        this.supplementerRegistry = supplementerRegistry;
+
+        initializePackageAdminService(context);
+        initializeStartLevelService(context);
+
+        // Service tracker for weaving service
+        weavingServiceFactoryTracker = new ServiceTracker(context,
+                IWeavingServiceFactory.class.getName(), null);
+        weavingServiceFactoryTracker.open();
+        if (Debug.DEBUG_WEAVE)
+            Debug.println("> Opened service tracker for weaving service.");
+
+        // Service listener for weaving service
+        weavingServiceListener = new ServiceListener() {
+
+            public void serviceChanged(final ServiceEvent event) {
+                if (event.getType() == ServiceEvent.REGISTERED) {
+                    final List<Bundle> bundlesToRefresh = new ArrayList<Bundle>();
+
+                    final Iterator bundleEntries = weavingServices.entrySet()
+                            .iterator();
+                    synchronized (weavingServices) {
+                        while (bundleEntries.hasNext()) {
+                            final Entry entry = (Entry) bundleEntries.next();
+                            final Bundle bundle = (Bundle) entry.getKey();
+                            if (entry.getValue() == null) {
+                                bundleEntries.remove();
+                                System.err
+                                        .println("bundle update because of weaving service start: "
+                                                + bundle.getSymbolicName());
+                                bundlesToRefresh.add(bundle);
+                                if (Debug.DEBUG_WEAVE)
+                                    Debug.println("> Updated bundle "
+                                            + bundle.getSymbolicName());
+                            }
+                        }
+                    }
+
+                    if (bundlesToRefresh.size() > 0) {
+                        supplementerRegistry.refreshBundles(bundlesToRefresh
+                                .toArray(new Bundle[bundlesToRefresh.size()]));
+                    }
+                }
+                if (event.getType() == ServiceEvent.UNREGISTERING
+                        && startLevelService != null
+                        && startLevelService.getStartLevel() > 0) {
+                    final List<Bundle> bundlesToRefresh = new ArrayList<Bundle>();
+
+                    final Iterator bundleEntries = weavingServices.entrySet()
+                            .iterator();
+                    synchronized (weavingServices) {
+                        while (bundleEntries.hasNext()) {
+                            final Entry entry = (Entry) bundleEntries.next();
+                            final Bundle bundle = (Bundle) entry.getKey();
+                            if (entry.getValue() != null) {
+                                bundleEntries.remove();
+                                System.err
+                                        .println("bundle update because of weaving service stop: "
+                                                + bundle.getSymbolicName());
+                                bundlesToRefresh.add(bundle);
+                                if (Debug.DEBUG_WEAVE)
+                                    Debug.println("> Updated bundle "
+                                            + bundle.getSymbolicName());
+                            }
+                        }
+                    }
+                    if (bundlesToRefresh.size() > 0) {
+                        supplementerRegistry.refreshBundles(bundlesToRefresh
+                                .toArray(new Bundle[bundlesToRefresh.size()]));
+                    }
+                }
+            }
+        };
+
+        if (System.getProperty(WEAVING_SERVICE_DYNAMICS_PROPERTY, "false")
+                .equals("true")) {
+            try {
+                context.addServiceListener(weavingServiceListener, "("
+                        + Constants.OBJECTCLASS + "="
+                        + IWeavingService.class.getName() + ")");
+            } catch (final InvalidSyntaxException e) { // This is correct!
+            }
+        }
+
+        // Service tracker for caching service
+        cachingServiceFactoryTracker = new ServiceTracker(context,
+                ICachingServiceFactory.class.getName(), null);
+        cachingServiceFactoryTracker.open();
+        if (Debug.DEBUG_CACHE)
+            Debug.println("> Opened service tracker for caching service.");
+    }
+
+    protected ICachingService getCachingService(final BaseClassLoader loader,
+            final Bundle bundle, final IWeavingService weavingService) {
+        if (Debug.DEBUG_CACHE)
+            Debug.println("> AspectJAdaptorFactory.getCachingService() bundle="
+                    + bundle + ", weavingService=" + weavingService);
+        ICachingService service = null;
+        String key = "";
+
+        if (weavingService != null) {
+            key = weavingService.getKey();
+        }
+        final ICachingServiceFactory cachingServiceFactory = (ICachingServiceFactory) cachingServiceFactoryTracker
+                .getService();
+        if (cachingServiceFactory != null) {
+            service = cachingServiceFactory.createCachingService(
+                    (ClassLoader) loader, bundle, key);
+        }
+        if (Debug.DEBUG_CACHE)
+            Debug
+                    .println("< AspectJAdaptorFactory.getCachingService() service="
+                            + service + ", key='" + key + "'");
+        return service;
+    }
+
+    protected IWeavingService getWeavingService(final BaseClassLoader loader) {
+        if (Debug.DEBUG_WEAVE)
+            Debug
+                    .println("> AspectJAdaptorFactory.getWeavingService() baseClassLoader="
+                            + loader);
+
+        final BaseData baseData = loader.getClasspathManager().getBaseData();
+        final State state = baseData.getAdaptor().getState();
+        final Bundle bundle = baseData.getBundle();
+        final BundleDescription bundleDescription = state.getBundle(bundle
+                .getBundleId());
+
+        IWeavingService weavingService = null;
+        if (!IGNORE_WEAVING_SERVICE_BUNDLES.contains(bundle.getSymbolicName())) {
+            final IWeavingServiceFactory weavingServiceFactory = (IWeavingServiceFactory) weavingServiceFactoryTracker
+                    .getService();
+            if (weavingServiceFactory != null) {
+                weavingService = weavingServiceFactory.createWeavingService(
+                        (ClassLoader) loader, bundle, state, bundleDescription,
+                        supplementerRegistry);
+            }
+            synchronized (weavingServices) {
+                weavingServices.put(bundle, weavingService);
+            }
+        }
+        if (Debug.DEBUG_WEAVE)
+            Debug
+                    .println("< AspectJAdaptorFactory.getWeavingService() service="
+                            + weavingService);
+        return weavingService;
+    }
+
+    private void initializePackageAdminService(final BundleContext context) {
+        if (Debug.DEBUG_GENERAL)
+            Debug
+                    .println("> AspectJAdaptorFactory.initializePackageAdminService() context="
+                            + context);
+
+        final ServiceReference ref = context
+                .getServiceReference(PackageAdmin.class.getName());
+        if (ref != null) {
+            packageAdminService = (PackageAdmin) context.getService(ref);
+        }
+
+        if (Debug.DEBUG_GENERAL)
+            Debug
+                    .println("< AspectJAdaptorFactory.initializePackageAdminService() "
+                            + packageAdminService);
+    }
+
+    private void initializeStartLevelService(final BundleContext context) {
+        if (Debug.DEBUG_GENERAL)
+            Debug
+                    .println("> AspectJAdaptorFactory.initializeStartLevelService() context="
+                            + context);
+
+        final ServiceReference ref = context
+                .getServiceReference(StartLevel.class.getName());
+        if (ref != null) {
+            startLevelService = (StartLevel) context.getService(ref);
+        }
+
+        if (Debug.DEBUG_GENERAL)
+            Debug
+                    .println("< AspectJAdaptorFactory.initializeStartLevelService() "
+                            + startLevelService);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java
new file mode 100644
index 0000000..ecc67be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+
+public abstract class AbstractWeavingBundleFile extends BundleFile {
+
+    protected BundleFile delegate;
+
+    private final BundleAdaptorProvider adaptorProvider;
+
+    public AbstractWeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
+            final BundleFile bundleFile) {
+        super(bundleFile.getBaseFile());
+        this.adaptorProvider = adaptorProvider;
+        this.delegate = bundleFile;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#close()
+     */
+    @Override
+    public void close() throws IOException {
+        delegate.close();
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#containsDir(java.lang.String)
+     */
+    @Override
+    public boolean containsDir(final String dir) {
+        return delegate.containsDir(dir);
+    }
+
+    /**
+     * @return
+     */
+    public IWeavingAdaptor getAdaptor() {
+        return this.adaptorProvider.getAdaptor();
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#getBaseFile()
+     */
+    @Override
+    public File getBaseFile() {
+        final File baseFile = delegate.getBaseFile();
+        return baseFile;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#getEntry(java.lang.String)
+     */
+    @Override
+    public BundleEntry getEntry(final String path) {
+        return delegate.getEntry(path);
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#getEntryPaths(java.lang.String)
+     */
+    @Override
+    public Enumeration getEntryPaths(final String path) {
+        return delegate.getEntryPaths(path);
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#getFile(java.lang.String,
+     *      boolean)
+     */
+    @Override
+    public File getFile(final String path, final boolean nativeCode) {
+        return delegate.getFile(path, nativeCode);
+    }
+
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    @Override
+    public URL getResourceURL(final String path, final long hostBundleID) {
+        return delegate.getResourceURL(path, hostBundleID);
+    }
+
+    /**
+     * @deprecated
+     */
+    @Deprecated
+    @Override
+    public URL getResourceURL(final String path, final long hostBundleID,
+            final int index) {
+        return delegate.getResourceURL(path, hostBundleID, index);
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.bundlefile.BundleFile#open()
+     */
+    @Override
+    public void open() throws IOException {
+        delegate.open();
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java
new file mode 100644
index 0000000..ad1438d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java
@@ -0,0 +1,266 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Matthew Webster           initial implementation
+ *   Martin Lippert            supplementing mechanism reworked      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.ProtectionDomain;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.osgi.baseadaptor.BaseAdaptor;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.baseadaptor.HookConfigurator;
+import org.eclipse.osgi.baseadaptor.HookRegistry;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+import org.eclipse.osgi.baseadaptor.hooks.AdaptorHook;
+import org.eclipse.osgi.baseadaptor.hooks.BundleFileWrapperFactoryHook;
+import org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook;
+import org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook;
+import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
+import org.eclipse.osgi.baseadaptor.loader.ClasspathEntry;
+import org.eclipse.osgi.baseadaptor.loader.ClasspathManager;
+import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
+import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate;
+import org.eclipse.osgi.framework.log.FrameworkLog;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * Default implementation of all the necessary adaptor hooks. Used to keep the
+ * real hook implementation focused on only the necessary methods.
+ * 
+ * @author Matthew Webster
+ * @author Martin Lippert
+ */
+public abstract class AbstractWeavingHook implements HookConfigurator,
+        AdaptorHook, BundleFileWrapperFactoryHook, ClassLoadingHook,
+        ClassLoadingStatsHook, IAdaptorProvider {
+
+    /**
+     * flag to indicate whether to print out detailed information or not
+     */
+    public static boolean verbose = Boolean
+            .getBoolean("org.aspectj.osgi.verbose"); //$NON-NLS-1$
+
+    private ISupplementerRegistry supplementerRegistry;
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#addClassPathEntry(java.util.ArrayList,
+     *      java.lang.String,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager,
+     *      org.eclipse.osgi.baseadaptor.BaseData,
+     *      java.security.ProtectionDomain)
+     */
+    public boolean addClassPathEntry(final ArrayList cpEntries,
+            final String cp, final ClasspathManager hostmanager,
+            final BaseData sourcedata, final ProtectionDomain sourcedomain) {
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.HookConfigurator#addHooks(org.eclipse.osgi.baseadaptor.HookRegistry)
+     */
+    public void addHooks(final HookRegistry hooks) {
+        if (verbose)
+            System.err
+                    .println("[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ..."); //$NON-NLS-1$
+
+        supplementerRegistry = new SupplementerRegistry(this);
+
+        hooks.addAdaptorHook(this);
+        hooks.addClassLoadingHook(this);
+        hooks.addBundleFileWrapperFactoryHook(this);
+        hooks.addClassLoadingStatsHook(this);
+        hooks.addClassLoaderDelegateHook(new WeavingLoaderDelegateHook(
+                supplementerRegistry));
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#addProperties(java.util.Properties)
+     */
+    public void addProperties(final Properties properties) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#createClassLoader(java.lang.ClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate,
+     *      org.eclipse.osgi.framework.adaptor.BundleProtectionDomain,
+     *      org.eclipse.osgi.baseadaptor.BaseData, java.lang.String[])
+     */
+    public BaseClassLoader createClassLoader(final ClassLoader parent,
+            final ClassLoaderDelegate delegate,
+            final BundleProtectionDomain domain, final BaseData data,
+            final String[] bundleclasspath) {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#createFrameworkLog()
+     */
+    public FrameworkLog createFrameworkLog() {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#findLibrary(org.eclipse.osgi.baseadaptor.BaseData,
+     *      java.lang.String)
+     */
+    public String findLibrary(final BaseData data, final String libName) {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#frameworkStart(org.osgi.framework.BundleContext)
+     */
+    public void frameworkStart(final BundleContext context)
+            throws BundleException {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#frameworkStop(org.osgi.framework.BundleContext)
+     */
+    public void frameworkStop(final BundleContext context)
+            throws BundleException {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#frameworkStopping(org.osgi.framework.BundleContext)
+     */
+    public void frameworkStopping(final BundleContext context) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#getBundleClassLoaderParent()
+     */
+    public ClassLoader getBundleClassLoaderParent() {
+        return null;
+    }
+
+    /**
+     * Their is only one registry for dealing with supplementers available via
+     * this accessor method.
+     * 
+     * @return The supplementer registry, guaranteed to be not null
+     */
+    public ISupplementerRegistry getSupplementerRegistry() {
+        return this.supplementerRegistry;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#handleRuntimeError(java.lang.Throwable)
+     */
+    public void handleRuntimeError(final Throwable error) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#initialize(org.eclipse.osgi.baseadaptor.BaseAdaptor)
+     */
+    public void initialize(final BaseAdaptor adaptor) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#initializedClassLoader(org.eclipse.osgi.baseadaptor.loader.BaseClassLoader,
+     *      org.eclipse.osgi.baseadaptor.BaseData)
+     */
+    public void initializedClassLoader(final BaseClassLoader baseClassLoader,
+            final BaseData data) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#mapLocationToURLConnection(java.lang.String)
+     */
+    public URLConnection mapLocationToURLConnection(final String location)
+            throws IOException {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.AdaptorHook#matchDNChain(java.lang.String,
+     *      java.lang.String[])
+     */
+    public boolean matchDNChain(final String pattern, final String[] dnChain) {
+        return false;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook#postFindLocalClass(java.lang.String,
+     *      java.lang.Class,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public void postFindLocalClass(final String name, final Class clazz,
+            final ClasspathManager manager) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook#postFindLocalResource(java.lang.String,
+     *      java.net.URL, org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public void postFindLocalResource(final String name, final URL resource,
+            final ClasspathManager manager) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook#preFindLocalClass(java.lang.String,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public void preFindLocalClass(final String name,
+            final ClasspathManager manager) throws ClassNotFoundException {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook#preFindLocalResource(java.lang.String,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public void preFindLocalResource(final String name,
+            final ClasspathManager manager) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook#processClass(java.lang.String,
+     *      byte[], org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
+     *      org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public byte[] processClass(final String name, final byte[] classbytes,
+            final ClasspathEntry classpathEntry, final BundleEntry entry,
+            final ClasspathManager manager) {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook#recordClassDefine(java.lang.String,
+     *      java.lang.Class, byte[],
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
+     *      org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    public void recordClassDefine(final String name, final Class clazz,
+            final byte[] classbytes, final ClasspathEntry classpathEntry,
+            final BundleEntry entry, final ClasspathManager manager) {
+    }
+
+    /**
+     * @see org.eclipse.osgi.baseadaptor.hooks.BundleFileWrapperFactoryHook#wrapBundleFile(org.eclipse.osgi.baseadaptor.bundlefile.BundleFile,
+     *      java.lang.Object, org.eclipse.osgi.baseadaptor.BaseData, boolean)
+     */
+    public BundleFile wrapBundleFile(final BundleFile bundleFile,
+            final Object content, final BaseData data, final boolean base)
+            throws IOException {
+        return null;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java
new file mode 100644
index 0000000..57bcb24
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes     
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+
+public class BaseWeavingBundleFile extends WeavingBundleFile {
+
+    public BaseWeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
+            final BundleFile bundleFile) throws IOException {
+        super(adaptorProvider, bundleFile);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java
new file mode 100644
index 0000000..db49cf6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java
@@ -0,0 +1,29 @@
+
+package org.eclipse.equinox.weaving.hooks;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.framework.internal.core.BundleFragment;
+
+public class BundleAdaptorProvider {
+
+    private final IAdaptorProvider adaptorProvider;
+
+    private final BaseData baseData;
+
+    public BundleAdaptorProvider(final BaseData data,
+            final IAdaptorProvider adaptorProvider) {
+        this.baseData = data;
+        this.adaptorProvider = adaptorProvider;
+    }
+
+    public IWeavingAdaptor getAdaptor() {
+        if (this.baseData.getBundle() instanceof BundleFragment) {
+            return this.adaptorProvider.getHostBundleAdaptor(this.baseData
+                    .getBundleID());
+        } else {
+            return this.adaptorProvider.getAdaptor(this.baseData.getBundleID());
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java
new file mode 100644
index 0000000..d2897b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+
+public class CachedClassBundleEntry extends BundleEntry {
+
+    private final IWeavingAdaptor adaptor;
+
+    private final URL bundleFileURL;
+
+    private final byte[] bytes;
+
+    private final BundleEntry delegate;
+
+    private final String name;
+
+    public CachedClassBundleEntry(final IWeavingAdaptor aspectjAdaptor,
+            final BundleEntry delegate, final String name, final byte[] bytes,
+            final URL url) {
+        this.adaptor = aspectjAdaptor;
+        this.bundleFileURL = url;
+        this.delegate = delegate;
+        this.name = name;
+        this.bytes = bytes;
+    }
+
+    public boolean dontWeave() {
+        return true;
+    }
+
+    public IWeavingAdaptor getAdaptor() {
+        return adaptor;
+    }
+
+    public URL getBundleFileURL() {
+        return bundleFileURL;
+    }
+
+    @Override
+    public byte[] getBytes() throws IOException {
+        return bytes;
+    }
+
+    @Override
+    public URL getFileURL() {
+        return null;
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        if (delegate == null) {
+            System.err.println("error in: " + name);
+        }
+        return delegate.getInputStream();
+    }
+
+    @Override
+    public URL getLocalURL() {
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public long getSize() {
+        return bytes.length;
+    }
+
+    @Override
+    public long getTime() {
+        return 0;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java
new file mode 100644
index 0000000..c2dedf4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+
+public class CachedGeneratedClassBundleEntry extends BundleEntry {
+
+    private final IWeavingAdaptor adaptor;
+
+    private final URL bundleFileURL;
+
+    private final byte[] bytes;
+
+    private final String name;
+
+    public CachedGeneratedClassBundleEntry(final IWeavingAdaptor adaptor,
+            final String path, final byte[] cachedBytes, final URL url) {
+        this.adaptor = adaptor;
+        this.bundleFileURL = url;
+        this.bytes = cachedBytes;
+        this.name = path;
+    }
+
+    public boolean dontWeave() {
+        return true;
+    }
+
+    public IWeavingAdaptor getAdaptor() {
+        return adaptor;
+    }
+
+    public URL getBundleFileURL() {
+        return bundleFileURL;
+    }
+
+    @Override
+    public byte[] getBytes() throws IOException {
+        return bytes;
+    }
+
+    @Override
+    public URL getFileURL() {
+        return null;
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        final ByteArrayInputStream result = new ByteArrayInputStream(bytes);
+        return result;
+    }
+
+    @Override
+    public URL getLocalURL() {
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public long getSize() {
+        return bytes.length;
+    }
+
+    @Override
+    public long getTime() {
+        return 0;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java
new file mode 100644
index 0000000..89fdb41
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java
@@ -0,0 +1,14 @@
+
+package org.eclipse.equinox.weaving.hooks;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+
+public interface IAdaptorProvider {
+
+    public IWeavingAdaptor getAdaptor(long bundleID);
+
+    public IWeavingAdaptor getHostBundleAdaptor(long bundleID);
+
+    public void resetAdaptor(long bundleID);
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementBundleListener.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementBundleListener.java
new file mode 100644
index 0000000..1b05a5b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementBundleListener.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert               initial implementation      
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.SynchronousBundleListener;
+
+public class SupplementBundleListener implements SynchronousBundleListener {
+
+    private final ISupplementerRegistry supplementerRegistry;
+
+    public SupplementBundleListener(
+            final ISupplementerRegistry supplementerRegistry) {
+        this.supplementerRegistry = supplementerRegistry;
+    }
+
+    public void bundleChanged(final BundleEvent event) {
+        final Bundle bundle = event.getBundle();
+        if (event.getType() == BundleEvent.RESOLVED) {
+            supplementerRegistry.addBundle(bundle);
+        } else if (event.getType() == BundleEvent.UNRESOLVED) {
+            supplementerRegistry.removeBundle(bundle);
+        }
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java
new file mode 100644
index 0000000..d089a11
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java
@@ -0,0 +1,418 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Matthew Webster           initial implementation
+ *   Martin Lippert            supplementing mechanism reworked     
+ *   Heiko Seeberger           Enhancements for service dynamics     
+ *   Martin Lippert            fragment handling fixed
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.Supplementer;
+import org.eclipse.osgi.util.ManifestElement;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+public class SupplementerRegistry implements ISupplementerRegistry {
+
+    //knibb
+    /**
+     * Manifest header (named "Supplement-Bundle") identifying the
+     * names (and optionally, version numbers) of any bundles supplemented by
+     * this bundle. All supplemented bundles will have all the exported packages
+     * of this bundle added to their imports list
+     * 
+     * <p>
+     * The attribute value may be retrieved from the <code>Dictionary</code>
+     * object returned by the <code>Bundle.getHeaders</code> method.
+     */
+    public static final String SUPPLEMENT_BUNDLE = "Eclipse-SupplementBundle"; //$NON-NLS-1$
+
+    /**
+     * Manifest header (named "Supplement-Exporter") identifying the
+     * names (and optionally, version numbers) of the packages that the bundle
+     * supplements. All exporters of one of these packages will have the
+     * exported packages of this bundle added to their imports list.
+     * 
+     * <p>
+     * The attribute value may be retrieved from the <code>Dictionary</code>
+     * object returned by the <code>Bundle.getHeaders</code> method.
+     */
+    public static final String SUPPLEMENT_EXPORTER = "Eclipse-SupplementExporter"; //$NON-NLS-1$
+
+    /**
+     * Manifest header (named "Supplement-Importer") identifying the
+     * names (and optionally, version numbers) of the packages that the bundle
+     * supplements. All importers of one of these packages will have the
+     * exported packages of this bundle added to their imports in addition.
+     * 
+     * <p>
+     * The attribute value may be retrieved from the <code>Dictionary</code>
+     * object returned by the <code>Bundle.getHeaders</code> method.
+     */
+    public static final String SUPPLEMENT_IMPORTER = "Eclipse-SupplementImporter"; //$NON-NLS-1$
+
+    private final IAdaptorProvider adaptorProvider;
+
+    private BundleContext context;
+
+    private final Set<String> dontWeaveTheseBundles; // elements of type String (symbolic name of bundle)
+
+    private PackageAdmin packageAdmin;
+
+    private final Map<String, Supplementer> supplementers; // keys of type String (symbolic name of supplementer bundle), values of type Supplementer
+
+    private final Map<Long, Supplementer[]> supplementersByBundle;
+
+    public SupplementerRegistry(final IAdaptorProvider adaptorProvider) {
+        this.adaptorProvider = adaptorProvider;
+
+        this.supplementers = new HashMap<String, Supplementer>();
+        this.supplementersByBundle = new HashMap<Long, Supplementer[]>();
+        this.dontWeaveTheseBundles = new HashSet<String>();
+
+        this.dontWeaveTheseBundles.add("org.eclipse.osgi");
+        this.dontWeaveTheseBundles.add("org.eclipse.update.configurator");
+        this.dontWeaveTheseBundles.add("org.eclipse.core.runtime");
+        this.dontWeaveTheseBundles.add("org.eclipse.equinox.common");
+        this.dontWeaveTheseBundles.add("org.eclipse.equinox.weaving.hook");
+        this.dontWeaveTheseBundles.add("org.eclipse.equinox.weaving.aspectj");
+        this.dontWeaveTheseBundles.add("org.eclipse.equinox.weaving.caching");
+        this.dontWeaveTheseBundles
+                .add("org.eclipse.equinox.weaving.caching.j9");
+        this.dontWeaveTheseBundles.add("org.aspectj.runtime");
+        this.dontWeaveTheseBundles.add("org.aspectj.weaver");
+        this.dontWeaveTheseBundles
+                .add("org.eclipse.equinox.simpleconfigurator");
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addBundle(org.osgi.framework.Bundle)
+     */
+    public void addBundle(final Bundle bundle) {
+        // First analyze which supplementers already exists for this bundle
+        addSupplementedBundle(bundle);
+
+        // Second analyze if this bundle itself is a supplementer
+        addSupplementer(bundle, true);
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addSupplementedBundle(org.osgi.framework.Bundle)
+     */
+    public void addSupplementedBundle(final Bundle bundle) {
+        try {
+            final Dictionary<?, ?> manifest = bundle.getHeaders();
+            final ManifestElement[] imports = ManifestElement.parseHeader(
+                    Constants.IMPORT_PACKAGE, (String) manifest
+                            .get(Constants.IMPORT_PACKAGE));
+            final ManifestElement[] exports = ManifestElement.parseHeader(
+                    Constants.EXPORT_PACKAGE, (String) manifest
+                            .get(Constants.EXPORT_PACKAGE));
+            final List<Supplementer> supplementers = getMatchingSupplementers(
+                    bundle.getSymbolicName(), imports, exports);
+            if (supplementers.size() > 0) {
+                this.addSupplementedBundle(bundle, supplementers);
+            }
+            this.supplementersByBundle.put(bundle.getBundleId(), supplementers
+                    .toArray(new Supplementer[supplementers.size()]));
+        } catch (final BundleException e) {
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#addSupplementer(org.osgi.framework.Bundle,
+     *      boolean)
+     */
+    public void addSupplementer(final Bundle bundle, final boolean updateBundles) {
+        try {
+            final Dictionary<?, ?> manifest = bundle.getHeaders();
+            final ManifestElement[] supplementBundle = ManifestElement
+                    .parseHeader(SUPPLEMENT_BUNDLE, (String) manifest
+                            .get(SUPPLEMENT_BUNDLE));
+            final ManifestElement[] supplementImporter = ManifestElement
+                    .parseHeader(SUPPLEMENT_IMPORTER, (String) manifest
+                            .get(SUPPLEMENT_IMPORTER));
+            final ManifestElement[] supplementExporter = ManifestElement
+                    .parseHeader(SUPPLEMENT_EXPORTER, (String) manifest
+                            .get(SUPPLEMENT_EXPORTER));
+
+            if (supplementBundle != null || supplementImporter != null
+                    || supplementExporter != null) {
+
+                final Bundle[] hosts = this.packageAdmin.getHosts(bundle);
+                final Bundle host = hosts != null && hosts.length == 1 ? hosts[0]
+                        : null;
+
+                final Supplementer newSupplementer = new Supplementer(bundle,
+                        host, supplementBundle, supplementImporter,
+                        supplementExporter);
+
+                this.supplementers.put(bundle.getSymbolicName(),
+                        newSupplementer);
+                if (updateBundles) {
+                    resupplementInstalledBundles(newSupplementer);
+                }
+            }
+        } catch (final BundleException e) {
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getMatchingSupplementers(java.lang.String,
+     *      org.eclipse.osgi.util.ManifestElement[],
+     *      org.eclipse.osgi.util.ManifestElement[])
+     */
+    public List<Supplementer> getMatchingSupplementers(
+            final String symbolicName, final ManifestElement[] imports,
+            final ManifestElement[] exports) {
+        List<Supplementer> result = Collections.emptyList();
+
+        if (supplementers.size() > 0
+                && !this.dontWeaveTheseBundles.contains(symbolicName)) {
+            result = new LinkedList<Supplementer>();
+            for (final Iterator<Supplementer> i = supplementers.values()
+                    .iterator(); i.hasNext();) {
+                final Supplementer supplementer = i.next();
+                if (isSupplementerMatching(symbolicName, imports, exports,
+                        supplementer)) {
+                    result.add(supplementer);
+                }
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getPackageAdmin()
+     */
+    public PackageAdmin getPackageAdmin() {
+        return packageAdmin;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getSupplementers(org.osgi.framework.Bundle)
+     */
+    public Supplementer[] getSupplementers(final Bundle bundle) {
+        return getSupplementers(bundle.getBundleId());
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#getSupplementers(long)
+     */
+    public Supplementer[] getSupplementers(final long bundleID) {
+        if (supplementersByBundle.containsKey(bundleID)) {
+            return supplementersByBundle.get(bundleID);
+        } else {
+            return new Supplementer[0];
+        }
+    }
+
+    /**
+     * Refreshes the given bundles
+     * 
+     * @param bundles The bundles to refresh
+     */
+    public void refreshBundles(final Bundle[] bundles) {
+        if (this.packageAdmin != null) {
+            if (AbstractWeavingHook.verbose) {
+                for (int i = 0; i < bundles.length; i++) {
+                    System.out.println("refresh bundle: "
+                            + bundles[i].getSymbolicName());
+                }
+            }
+
+            this.packageAdmin.refreshPackages(bundles);
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#removeBundle(org.osgi.framework.Bundle)
+     */
+    public void removeBundle(final Bundle bundle) {
+        // if this bundle is itself supplemented by others, remove the bundle from those lists
+        removeSupplementedBundle(bundle);
+        this.supplementersByBundle.remove(bundle.getBundleId());
+
+        this.adaptorProvider.resetAdaptor(bundle.getBundleId());
+
+        // if this bundle supplements other bundles, remove this supplementer and update the other bundles
+        if (supplementers.containsKey(bundle.getSymbolicName())) {
+
+            // remove the supplementer from the list of supplementers
+            final Supplementer supplementer = supplementers.get(bundle
+                    .getSymbolicName());
+            supplementers.remove(bundle.getSymbolicName());
+            if (AbstractWeavingHook.verbose)
+                System.err
+                        .println("[org.eclipse.equinox.weaving.hook] info removing supplementer " //$NON-NLS-1$
+                                + bundle.getSymbolicName());
+
+            // refresh bundles that where supplemented by this bundle
+            final Bundle[] supplementedBundles = supplementer
+                    .getSupplementedBundles();
+            if (supplementedBundles != null && supplementedBundles.length > 0) {
+                final List<Bundle> bundlesToRefresh = new ArrayList<Bundle>(
+                        supplementedBundles.length);
+                for (final Bundle bundleToRefresh : supplementedBundles) {
+                    if (this.adaptorProvider.getAdaptor(bundleToRefresh
+                            .getBundleId()) != null) {
+                        bundlesToRefresh.add(bundleToRefresh);
+                    }
+                }
+
+                if (bundlesToRefresh.size() > 0) {
+                    refreshBundles(bundlesToRefresh
+                            .toArray(new Bundle[bundlesToRefresh.size()]));
+                }
+            }
+
+            // remove this supplementer from the list of supplementers per other bundle
+            for (int i = 0; i < supplementedBundles.length; i++) {
+                final long bundleId = supplementedBundles[i].getBundleId();
+                final List<Supplementer> supplementerList = new ArrayList<Supplementer>(
+                        Arrays.asList(this.supplementersByBundle.get(bundleId)));
+                supplementerList.remove(supplementer);
+                this.supplementersByBundle.put(bundleId, supplementerList
+                        .toArray(new Supplementer[0]));
+            }
+        }
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#setBundleContext(org.osgi.framework.BundleContext)
+     */
+    public void setBundleContext(final BundleContext context) {
+        this.context = context;
+    }
+
+    /**
+     * @see org.eclipse.equinox.service.weaving.ISupplementerRegistry#setPackageAdmin(org.osgi.service.packageadmin.PackageAdmin)
+     */
+    public void setPackageAdmin(final PackageAdmin packageAdmin) {
+        this.packageAdmin = packageAdmin;
+    }
+
+    private void addSupplementedBundle(final Bundle supplementedBundle,
+            final List<Supplementer> supplementers) {
+        for (final Iterator<Supplementer> iterator = supplementers.iterator(); iterator
+                .hasNext();) {
+            final Supplementer supplementer = iterator.next();
+            supplementer.addSupplementedBundle(supplementedBundle);
+        }
+    }
+
+    private boolean isSupplementerMatching(final String symbolicName,
+            final ManifestElement[] imports, final ManifestElement[] exports,
+            final Supplementer supplementer) {
+        final String supplementerName = supplementer.getSymbolicName();
+        if (!supplementerName.equals(symbolicName)) {
+            if (supplementer.matchSupplementer(symbolicName)
+                    || (imports != null && supplementer
+                            .matchesSupplementImporter(imports))
+                    || (exports != null && supplementer
+                            .matchesSupplementExporter(exports))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void removeSupplementedBundle(final Bundle bundle) {
+        for (final Iterator<Supplementer> iterator = this.supplementers
+                .values().iterator(); iterator.hasNext();) {
+            final Supplementer supplementer = iterator.next();
+            supplementer.removeSupplementedBundle(bundle);
+        }
+    }
+
+    private void resupplementInstalledBundles(final Supplementer supplementer) {
+        final Bundle[] installedBundles = context.getBundles();
+
+        final List<Bundle> bundlesToRefresh = new ArrayList<Bundle>();
+
+        for (int i = 0; i < installedBundles.length; i++) {
+            try {
+                final Bundle bundle = installedBundles[i];
+
+                // skip the bundle itself, just resupplement already installed bundles
+                if (bundle.getSymbolicName().equals(
+                        supplementer.getSymbolicName())) {
+                    continue;
+                }
+
+                // skip bundles that should not be woven
+                if (dontWeaveTheseBundles.contains(bundle.getSymbolicName())) {
+                    continue;
+                }
+
+                // find out which of the installed bundles matches the new supplementer
+                final Dictionary<?, ?> manifest = bundle.getHeaders();
+                final ManifestElement[] imports = ManifestElement.parseHeader(
+                        Constants.IMPORT_PACKAGE, (String) manifest
+                                .get(Constants.IMPORT_PACKAGE));
+                final ManifestElement[] exports = ManifestElement.parseHeader(
+                        Constants.EXPORT_PACKAGE, (String) manifest
+                                .get(Constants.EXPORT_PACKAGE));
+
+                if (isSupplementerMatching(bundle.getSymbolicName(), imports,
+                        exports, supplementer)) {
+                    if (this.adaptorProvider.getAdaptor(bundle.getBundleId()) != null) {
+                        bundlesToRefresh.add(bundle);
+                    } else {
+                        supplementer.addSupplementedBundle(bundle);
+                        final Supplementer[] existingSupplementers = supplementersByBundle
+                                .get(bundle.getBundleId());
+                        List<Supplementer> enhancedSupplementerList = null;
+                        if (existingSupplementers != null) {
+                            enhancedSupplementerList = new ArrayList<Supplementer>(
+                                    Arrays.asList(existingSupplementers));
+                        } else {
+                            enhancedSupplementerList = new ArrayList<Supplementer>();
+                        }
+                        if (!enhancedSupplementerList.contains(supplementer)) {
+                            enhancedSupplementerList.add(supplementer);
+                        }
+
+                        this.supplementersByBundle.put(bundle.getBundleId(),
+                                enhancedSupplementerList
+                                        .toArray(new Supplementer[0]));
+                    }
+                }
+
+            } catch (final BundleException e) {
+                e.printStackTrace();
+            }
+        }
+
+        if (bundlesToRefresh.size() > 0) {
+            final Bundle[] bundles = bundlesToRefresh
+                    .toArray(new Bundle[bundlesToRefresh.size()]);
+
+            refreshBundles(bundles);
+        }
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java
new file mode 100644
index 0000000..4ec862d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            minor changes and bugfixes     
+ *   Martin Lippert            splitted into different types of bundle entries
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+
+public class WeavingBundleEntry extends BundleEntry {
+
+    private final IWeavingAdaptor adaptor;
+
+    private final URL bundleFileURL;
+
+    private final BundleEntry delegate;
+
+    private final boolean dontWeave;
+
+    public WeavingBundleEntry(final IWeavingAdaptor aspectjAdaptor,
+            final BundleEntry delegate, final URL url, final boolean dontWeave) {
+        this.adaptor = aspectjAdaptor;
+        this.bundleFileURL = url;
+        this.delegate = delegate;
+        this.dontWeave = dontWeave;
+    }
+
+    public boolean dontWeave() {
+        return dontWeave;
+    }
+
+    public IWeavingAdaptor getAdaptor() {
+        return adaptor;
+    }
+
+    public URL getBundleFileURL() {
+        return bundleFileURL;
+    }
+
+    @Override
+    public byte[] getBytes() throws IOException {
+        return delegate.getBytes();
+    }
+
+    @Override
+    public URL getFileURL() {
+        return delegate.getFileURL();
+    }
+
+    @Override
+    public InputStream getInputStream() throws IOException {
+        return delegate.getInputStream();
+    }
+
+    @Override
+    public URL getLocalURL() {
+        return delegate.getLocalURL();
+    }
+
+    @Override
+    public String getName() {
+        return delegate.getName();
+    }
+
+    @Override
+    public long getSize() {
+        return delegate.getSize();
+    }
+
+    @Override
+    public long getTime() {
+        return delegate.getTime();
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java
new file mode 100644
index 0000000..fe5f47f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes
+ *   Martin Lippert            caching optimizations     
+ *   Martin Lippert            caching of generated classes
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.eclipse.equinox.service.weaving.CacheEntry;
+import org.eclipse.equinox.weaving.adaptors.Debug;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+
+/**
+ * This is a wrapper for bundle files that allows the weaving runtime to create
+ * wrapped instances of bundle entry objects.
+ * 
+ * Those bundle entry objects are used to return class bytes from the cache
+ * instead of the bundle itself.
+ */
+public class WeavingBundleFile extends AbstractWeavingBundleFile {
+
+    private final URL url;
+
+    /**
+     * Create a new wrapper for a bundle file
+     * 
+     * @param adaptorProvider A provider that allows this wrapper to gain access
+     *            to the adaptor of this bundle
+     * @param bundleFile The wrapped bundle file
+     * @throws IOException
+     */
+    public WeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
+            final BundleFile bundleFile) throws IOException {
+        super(adaptorProvider, bundleFile);
+        this.url = delegate.getBaseFile().toURL();
+    }
+
+    @Override
+    public BundleEntry getEntry(final String path) {
+        if (Debug.DEBUG_BUNDLE)
+            Debug.println("> AspectJBundleFile.getEntry() path=" + path
+                    + ", url=" + url);
+        BundleEntry entry = delegate.getEntry(path);
+
+        if (path.endsWith(".class") && entry != null) {
+            final int offset = path.lastIndexOf('.');
+            final String name = path.substring(0, offset).replace('/', '.');
+            final IWeavingAdaptor adaptor = getAdaptor();
+            if (adaptor != null) {
+                final CacheEntry cacheEntry = adaptor.findClass(name, url);
+                if (cacheEntry == null) {
+                    entry = new WeavingBundleEntry(adaptor, entry, url, false);
+                    if (Debug.DEBUG_BUNDLE)
+                        Debug.println("- AspectJBundleFile.getEntry() path="
+                                + path + ", entry=" + entry);
+                } else if (cacheEntry.getCachedBytes() != null) {
+                    entry = new CachedClassBundleEntry(adaptor, entry, path,
+                            cacheEntry.getCachedBytes(), url);
+                } else {
+                    entry = new WeavingBundleEntry(adaptor, entry, url,
+                            cacheEntry.dontWeave());
+                }
+            }
+        } else if (path.endsWith(".class") && entry == null) {
+            final int offset = path.lastIndexOf('.');
+            final String name = path.substring(0, offset).replace('/', '.');
+            final IWeavingAdaptor adaptor = getAdaptor();
+            if (adaptor != null) {
+                final CacheEntry cacheEntry = adaptor.findClass(name, url);
+                if (cacheEntry != null && cacheEntry.getCachedBytes() != null) {
+                    entry = new CachedGeneratedClassBundleEntry(adaptor, path,
+                            cacheEntry.getCachedBytes(), url);
+                }
+            }
+        }
+
+        if (Debug.DEBUG_BUNDLE)
+            Debug.println("< AspectJBundleFile.getEntry() entry=" + entry);
+        return entry;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
new file mode 100644
index 0000000..a67deae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   David Knibb               initial implementation      
+ *   Matthew Webster           Eclipse 3.2 changes 
+ *   Martin Lippert            supplementing mechanism reworked     
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.weaving.adaptors.Debug;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
+import org.eclipse.equinox.weaving.adaptors.WeavingAdaptor;
+import org.eclipse.equinox.weaving.adaptors.WeavingAdaptorFactory;
+import org.eclipse.osgi.baseadaptor.BaseData;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
+import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
+import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
+import org.eclipse.osgi.baseadaptor.loader.ClasspathEntry;
+import org.eclipse.osgi.baseadaptor.loader.ClasspathManager;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+public class WeavingHook extends AbstractWeavingHook {
+
+    private final WeavingAdaptorFactory adaptorFactory;
+
+    private final Map<Long, IWeavingAdaptor> adaptors;
+
+    private BundleContext bundleContext;
+
+    public WeavingHook() {
+        if (Debug.DEBUG_GENERAL) Debug.println("- AspectJHook.<init>()");
+        this.adaptorFactory = new WeavingAdaptorFactory();
+        this.adaptors = new HashMap<Long, IWeavingAdaptor>();
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#frameworkStart(org.osgi.framework.BundleContext)
+     */
+    @Override
+    public void frameworkStart(final BundleContext context)
+            throws BundleException {
+        //		Debug.println("? AspectJHook.frameworkStart() context=" + context + ", fdo=" + FrameworkDebugOptions.getDefault());
+        initialize(context);
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#frameworkStop(org.osgi.framework.BundleContext)
+     */
+    @Override
+    public void frameworkStop(final BundleContext context)
+            throws BundleException {
+        adaptorFactory.dispose(context);
+    }
+
+    public IWeavingAdaptor getAdaptor(final long bundleID) {
+        return this.adaptors.get(bundleID);
+    }
+
+    public IWeavingAdaptor getHostBundleAdaptor(final long bundleID) {
+        final Bundle bundle = this.bundleContext.getBundle(bundleID);
+        if (bundle != null) {
+            final Bundle host = adaptorFactory.getHost(bundle);
+            if (host != null) {
+                final long hostBundleID = host.getBundleId();
+                return this.adaptors.get(hostBundleID);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#initializedClassLoader(org.eclipse.osgi.baseadaptor.loader.BaseClassLoader,
+     *      org.eclipse.osgi.baseadaptor.BaseData)
+     */
+    @Override
+    public void initializedClassLoader(final BaseClassLoader baseClassLoader,
+            final BaseData data) {
+        if (Debug.DEBUG_GENERAL)
+            Debug
+                    .println("> AspectJHook.initializedClassLoader() bundle="
+                            + data.getSymbolicName() + ", loader="
+                            + baseClassLoader + ", data=" + data
+                            + ", bundleFile=" + data.getBundleFile());
+
+        final IWeavingAdaptor adaptor = createAspectJAdaptor(data);
+        adaptor.setBaseClassLoader(baseClassLoader);
+        adaptor.initialize();
+        this.adaptors.put(data.getBundleID(), adaptor);
+
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("< AspectJHook.initializedClassLoader() adaptor="
+                    + adaptor);
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#processClass(java.lang.String,
+     *      byte[], org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
+     *      org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    @Override
+    public byte[] processClass(final String name, final byte[] classbytes,
+            final ClasspathEntry classpathEntry, final BundleEntry entry,
+            final ClasspathManager manager) {
+        byte[] newClassytes = null;
+        if (entry instanceof WeavingBundleEntry) {
+            final WeavingBundleEntry ajBundleEntry = (WeavingBundleEntry) entry;
+            if (!ajBundleEntry.dontWeave()) {
+                final IWeavingAdaptor adaptor = ajBundleEntry.getAdaptor();
+                newClassytes = adaptor.weaveClass(name, classbytes);
+            }
+        }
+        return newClassytes;
+    }
+
+    /**
+     * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#recordClassDefine(java.lang.String,
+     *      java.lang.Class, byte[],
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
+     *      org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
+     *      org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
+     */
+    @Override
+    public void recordClassDefine(final String name, final Class clazz,
+            final byte[] classbytes, final ClasspathEntry classpathEntry,
+            final BundleEntry entry, final ClasspathManager manager) {
+        if (entry instanceof WeavingBundleEntry) {
+            final WeavingBundleEntry ajBundleEntry = (WeavingBundleEntry) entry;
+            if (!ajBundleEntry.dontWeave()) {
+                final IWeavingAdaptor adaptor = ajBundleEntry.getAdaptor();
+                final URL sourceFileURL = ajBundleEntry.getBundleFileURL();
+                adaptor.storeClass(name, sourceFileURL, clazz, classbytes);
+            }
+        }
+    }
+
+    public void resetAdaptor(final long bundleID) {
+        this.adaptors.remove(bundleID);
+    }
+
+    @Override
+    public BundleFile wrapBundleFile(final BundleFile bundleFile,
+            final Object content, final BaseData data, final boolean base)
+            throws IOException {
+        BundleFile wrapped = null;
+        if (Debug.DEBUG_BUNDLE)
+            Debug
+                    .println("> AspectJBundleFileWrapperFactoryHook.wrapBundleFile() bundle="
+                            + data.getSymbolicName()
+                            + " bundleFile="
+                            + bundleFile
+                            + ", content="
+                            + content
+                            + ", data="
+                            + data
+                            + ", base="
+                            + base
+                            + ", baseFile="
+                            + bundleFile.getBaseFile());
+
+        if (base) {
+            wrapped = new BaseWeavingBundleFile(new BundleAdaptorProvider(data,
+                    this), bundleFile);
+        } else {
+            wrapped = new WeavingBundleFile(new BundleAdaptorProvider(data,
+                    this), bundleFile);
+        }
+        if (Debug.DEBUG_BUNDLE)
+            Debug
+                    .println("< AspectJBundleFileWrapperFactoryHook.wrapBundleFile() wrapped="
+                            + wrapped);
+        return wrapped;
+    }
+
+    private IWeavingAdaptor createAspectJAdaptor(final BaseData baseData) {
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("> AspectJHook.createAspectJAdaptor() location="
+                    + baseData.getLocation());
+        IWeavingAdaptor adaptor = null;
+
+        if (adaptorFactory != null) {
+            adaptor = new WeavingAdaptor(baseData, adaptorFactory, null, null,
+                    null);
+        } else {
+            if (Debug.DEBUG_GENERAL)
+                Debug.println("- AspectJHook.createAspectJAdaptor() factory="
+                        + adaptorFactory);
+        }
+
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("< AspectJHook.createAspectJAdaptor() adaptor="
+                    + adaptor);
+        return adaptor;
+    }
+
+    private void initialize(final BundleContext context) {
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("> AspectJHook.initialize() context=" + context);
+
+        this.bundleContext = context;
+
+        final ISupplementerRegistry supplementerRegistry = getSupplementerRegistry();
+        adaptorFactory.initialize(context, supplementerRegistry);
+
+        final ServiceReference serviceReference = context
+                .getServiceReference(PackageAdmin.class.getName());
+        final PackageAdmin packageAdmin = (PackageAdmin) context
+                .getService(serviceReference);
+
+        supplementerRegistry.setBundleContext(context);
+        supplementerRegistry.setPackageAdmin(packageAdmin);
+        context.addBundleListener(new SupplementBundleListener(
+                supplementerRegistry));
+
+        // final re-build supplementer final registry state for final installed bundles
+        final Bundle[] installedBundles = context.getBundles();
+        for (int i = 0; i < installedBundles.length; i++) {
+            supplementerRegistry.addSupplementer(installedBundles[i], false);
+        }
+        for (int i = 0; i < installedBundles.length; i++) {
+            supplementerRegistry.addSupplementedBundle(installedBundles[i]);
+        }
+
+        if (Debug.DEBUG_GENERAL)
+            Debug.println("< AspectJHook.initialize() adaptorFactory="
+                    + adaptorFactory);
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingLoaderDelegateHook.java b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingLoaderDelegateHook.java
new file mode 100644
index 0000000..7f029fa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingLoaderDelegateHook.java
@@ -0,0 +1,250 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Martin Lippert and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *   Martin Lippert            initial implementation
+ *   Martin Lippert            fragment handling fixed
+ *******************************************************************************/
+
+package org.eclipse.equinox.weaving.hooks;
+
+import java.io.FileNotFoundException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
+import org.eclipse.equinox.service.weaving.Supplementer;
+import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
+import org.eclipse.osgi.framework.adaptor.BundleData;
+import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook;
+
+/**
+ * This class implements the delegate hook for the class loader to allow
+ * supplemented bundles find types and resources from theirs supplementer
+ * bundles
+ * 
+ * This works together with the supplementer registry to handle the
+ * supplementing mechanism. The supplementer registry controls which bundle is
+ * supplemented by which other bundle. This hook implementation uses this
+ * information to broaden type and resource visibility according to the
+ * supplementer registry information.
+ */
+public class WeavingLoaderDelegateHook implements ClassLoaderDelegateHook {
+
+    private final ThreadLocal<Set<String>> postFindClassCalls = new ThreadLocal<Set<String>>() {
+
+        @Override
+        protected Set<String> initialValue() {
+            return new HashSet<String>();
+        }
+    };
+
+    private final ThreadLocal<Set<String>> postFindResourceCalls = new ThreadLocal<Set<String>>() {
+
+        @Override
+        protected Set<String> initialValue() {
+            return new HashSet<String>();
+        }
+    };
+
+    private final ThreadLocal<Set<String>> postFindResourcesCalls = new ThreadLocal<Set<String>>() {
+
+        @Override
+        protected Set<String> initialValue() {
+            return new HashSet<String>();
+        }
+    };
+
+    private final ISupplementerRegistry supplementerRegistry;
+
+    /**
+     * Create the hook instance for broaden the visibility according to the
+     * supplementing mechansism.
+     * 
+     * @param supplementerRegistry The supplementer registry to be used by this
+     *            hook for information retrieval which bundles are supplemented
+     *            by which other bundles (needs to not be null)
+     */
+    public WeavingLoaderDelegateHook(
+            final ISupplementerRegistry supplementerRegistry) {
+        this.supplementerRegistry = supplementerRegistry;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#postFindClass(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public Class postFindClass(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws ClassNotFoundException {
+        final long bundleID = data.getBundleID();
+
+        final String callKey = bundleID + name;
+        if (postFindClassCalls.get().contains(callKey)) {
+            return null;
+        }
+
+        postFindClassCalls.get().add(callKey);
+        try {
+            final Supplementer[] supplementers = supplementerRegistry
+                    .getSupplementers(bundleID);
+            if (supplementers != null) {
+                for (int i = 0; i < supplementers.length; i++) {
+                    try {
+                        final Class<?> clazz = supplementers[i]
+                                .getSupplementerHost().loadClass(name);
+                        if (clazz != null) {
+                            return clazz;
+                        }
+                    } catch (final ClassNotFoundException e) {
+                    }
+                }
+            }
+        } finally {
+            postFindClassCalls.get().remove(callKey);
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#postFindLibrary(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public String postFindLibrary(final String name,
+            final BundleClassLoader classLoader, final BundleData data) {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#postFindResource(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public URL postFindResource(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws FileNotFoundException {
+        final long bundleID = data.getBundleID();
+
+        final String callKey = bundleID + name;
+        if (postFindResourceCalls.get().contains(callKey)) {
+            return null;
+        }
+
+        postFindResourceCalls.get().add(callKey);
+        try {
+            final Supplementer[] supplementers = supplementerRegistry
+                    .getSupplementers(bundleID);
+            if (supplementers != null) {
+                for (int i = 0; i < supplementers.length; i++) {
+                    try {
+                        final URL resource = supplementers[i]
+                                .getSupplementerHost().getResource(name);
+                        if (resource != null) {
+                            return resource;
+                        }
+                    } catch (final Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        } finally {
+            postFindResourceCalls.get().remove(callKey);
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#postFindResources(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public Enumeration postFindResources(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws FileNotFoundException {
+        final long bundleID = data.getBundleID();
+
+        final String callKey = bundleID + name;
+        if (postFindResourcesCalls.get().contains(callKey)) {
+            return null;
+        }
+
+        postFindResourcesCalls.get().add(callKey);
+        try {
+            final Supplementer[] supplementers = supplementerRegistry
+                    .getSupplementers(bundleID);
+            if (supplementers != null) {
+                for (int i = 0; i < supplementers.length; i++) {
+                    try {
+                        final Enumeration<?> resource = supplementers[i]
+                                .getSupplementerHost().getResources(name);
+                        if (resource != null) {
+                            // TODO: if more than one enumeration is found, we should return all items
+                            return resource;
+                        }
+                    } catch (final Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+        } finally {
+            postFindResourcesCalls.get().remove(callKey);
+        }
+
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#preFindClass(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public Class preFindClass(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws ClassNotFoundException {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#preFindLibrary(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public String preFindLibrary(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws FileNotFoundException {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#preFindResource(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public URL preFindResource(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws FileNotFoundException {
+        return null;
+    }
+
+    /**
+     * @see org.eclipse.osgi.framework.adaptor.ClassLoaderDelegateHook#preFindResources(java.lang.String,
+     *      org.eclipse.osgi.framework.adaptor.BundleClassLoader,
+     *      org.eclipse.osgi.framework.adaptor.BundleData)
+     */
+    public Enumeration preFindResources(final String name,
+            final BundleClassLoader classLoader, final BundleData data)
+            throws FileNotFoundException {
+        return null;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.equinox.wireadmin/.project b/eclipse/plugins/org.eclipse.equinox.wireadmin/.project
index 72bdd5f..30bf5cb 100644
--- a/eclipse/plugins/org.eclipse.equinox.wireadmin/.project
+++ b/eclipse/plugins/org.eclipse.equinox.wireadmin/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.equinox.wireadmin/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.equinox.wireadmin/META-INF/MANIFEST.MF
index e010b9a..23e0e3c 100644
--- a/eclipse/plugins/org.eclipse.equinox.wireadmin/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.equinox.wireadmin/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.equinox.wireadmin
-Bundle-Version: 1.0.100.qualifier
+Bundle-Version: 1.0.200.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-Description: This bundle provides utility classes for Producer and Consumer services.
 Bundle-Activator: org.eclipse.equinox.internal.wireadmin.Activator
diff --git a/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireAdminImpl.java b/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireAdminImpl.java
index 4a04869..b2b5a93 100644
--- a/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireAdminImpl.java
+++ b/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireAdminImpl.java
@@ -41,6 +41,8 @@ class WireAdminImpl implements WireAdmin, ManagedServiceFactory, ServiceListener
 
 	private Vector waitForUpdate = new Vector();
 
+	long counter = System.currentTimeMillis();
+
 	/**
 	 * Constructs an <code>WireAdminImpl</code> object, which provides
 	 * Framework with methods for manipulating a <code>Wire</code> objects.
@@ -571,8 +573,12 @@ class WireAdminImpl implements WireAdmin, ManagedServiceFactory, ServiceListener
 		return false;
 	}
 
-	private static String getNextPID() {
-		return PID_PREFIX + System.currentTimeMillis();
+	private final String getNextPID() {
+		String nextPID = PID_PREFIX + counter++;
+		while (wires.get(nextPID) != null) {
+			nextPID = PID_PREFIX + counter++;
+		}
+		return nextPID;
 	}
 
 	boolean hasAConnectedWire(boolean isProducer, String pid) {
diff --git a/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireReDispatcher.java b/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireReDispatcher.java
index ca5383c..659d3e8 100644
--- a/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireReDispatcher.java
+++ b/eclipse/plugins/org.eclipse.equinox.wireadmin/src/org/eclipse/equinox/internal/wireadmin/WireReDispatcher.java
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.eclipse.equinox.internal.wireadmin;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Dictionary;
 import java.util.Hashtable;
 import org.eclipse.equinox.internal.util.ref.Log;
@@ -139,7 +141,7 @@ public class WireReDispatcher implements WireAdminListener {
 	 */
 	public void wireAdminEvent(WireAdminEvent event) {
 		ServiceTracker st = eventAdminTracker;
-		EventAdmin eventAdmin = st == null ? null : ((EventAdmin) st.getService());
+		final EventAdmin eventAdmin = st == null ? null : ((EventAdmin) st.getService());
 		if (eventAdmin != null) {
 			ServiceReference ref = event.getServiceReference();
 			if (ref == null) {
@@ -202,7 +204,13 @@ public class WireReDispatcher implements WireAdminListener {
 				addExceptionProps(props, throwable);
 			}
 			props.put(EVENT, event);
-			eventAdmin.postEvent(new Event(topic, (Dictionary) props));
+			final Event eaEvent = new Event(topic, (Dictionary) props);
+			AccessController.doPrivileged(new PrivilegedAction() {
+				public Object run() {
+					eventAdmin.postEvent(eaEvent);
+					return null;
+				}
+			});
 			if (Activator.LOG_DEBUG)
 				log.debug(0, 10018, event.toString(), null, false);
 		}
diff --git a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
index 2cfc24e..e19251a 100644
--- a/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
@@ -2,18 +2,21 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %help_base_plugin_name
 Bundle-SymbolicName: org.eclipse.help.base; singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.5.3.qualifier
 Bundle-Activator: org.eclipse.help.internal.base.HelpBasePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.apache.lucene.demo.html;x-internal:=true,
+ org.eclipse.help.base,
  org.eclipse.help.browser,
  org.eclipse.help.internal.base;
   x-friends:="org.eclipse.help.ui,
    org.eclipse.help.webapp,
    org.eclipse.ua.tests,
-   org.eclipse.ui.intro",
+   org.eclipse.ui.intro,
+   org.eclipse.ua.tests.doc",
  org.eclipse.help.internal.base.remote;x-friends:="org.eclipse.ua.tests,org.eclipse.help.webapp,org.eclipse.help.ui",
+ org.eclipse.help.internal.base.scope;x-friends:="org.eclipse.help.webapp,org.eclipse.ua.tests",
  org.eclipse.help.internal.base.util;x-friends:="org.eclipse.help.ui,org.eclipse.help.webapp,org.eclipse.ua.tests",
  org.eclipse.help.internal.browser;x-friends:="org.eclipse.help.ui,org.eclipse.ua.tests",
  org.eclipse.help.internal.browser.macosx;x-friends:="org.eclipse.ua.tests",
@@ -26,7 +29,7 @@ Export-Package: org.apache.lucene.demo.html;x-internal:=true,
  org.eclipse.help.internal.search.federated;x-friends:="org.eclipse.help.ui,org.eclipse.ua.tests",
  org.eclipse.help.internal.server;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.internal.standalone;x-friends:="org.eclipse.ua.tests",
- org.eclipse.help.internal.validation;x-friends:="org.eclipse.ua.tests",
+ org.eclipse.help.internal.validation;x-friends:="org.eclipse.ua.tests,org.eclipse.ua.tests.doc",
  org.eclipse.help.internal.workingset;x-friends:="org.eclipse.help.ui,org.eclipse.help.webapp,org.eclipse.ua.tests",
  org.eclipse.help.internal.xhtml;
   x-friends:="org.eclipse.help.ui,
@@ -36,12 +39,12 @@ Export-Package: org.apache.lucene.demo.html;x-internal:=true,
  org.eclipse.help.search,
  org.eclipse.help.server,
  org.eclipse.help.standalone
-Require-Bundle: org.apache.lucene;visibility:=reexport,
- org.apache.lucene.analysis;visibility:=reexport,
- org.eclipse.ant.core;bundle-version="3.2.100";resolution:=optional,
- org.eclipse.core.runtime;bundle-version="3.3.0",
- org.eclipse.help;bundle-version="[3.3.0,4.0.0)";visibility:=reexport,
- org.eclipse.core.expressions;bundle-version="3.4.0"
+Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
+ org.apache.lucene.analysis;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
+ org.eclipse.ant.core;bundle-version="3.2.200";resolution:=optional,
+ org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)"
 Import-Package: com.ibm.icu.text,
  org.eclipse.equinox.http.jetty;resolution:=optional
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.help.base/about.properties b/eclipse/plugins/org.eclipse.help.base/about.properties
index e46a525..de1090d 100644
--- a/eclipse/plugins/org.eclipse.help.base/about.properties
+++ b/eclipse/plugins/org.eclipse.help.base/about.properties
@@ -19,6 +19,6 @@ blurb=Eclipse Help\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/platform
 
diff --git a/eclipse/plugins/org.eclipse.help.base/plugin.properties b/eclipse/plugins/org.eclipse.help.base/plugin.properties
index 35d5307..73a5b39 100644
--- a/eclipse/plugins/org.eclipse.help.base/plugin.properties
+++ b/eclipse/plugins/org.eclipse.help.base/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -25,4 +25,6 @@ defaultBrowser = Default Web Browser (Change in System Preferences)
 preferences = Help System Base Preferences
 
 search_participant_extension_point_name = Lucene Search Participant
-server_extension_point_name = Help Server
\ No newline at end of file
+server_extension_point_name = Help Server
+help_search_participant_extension_point_name = Help Search Participant
+help_scope_extension_point_name = Help Scope
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.base/plugin.xml b/eclipse/plugins/org.eclipse.help.base/plugin.xml
index d1cf748..45114fb 100644
--- a/eclipse/plugins/org.eclipse.help.base/plugin.xml
+++ b/eclipse/plugins/org.eclipse.help.base/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -18,6 +19,8 @@
    <extension-point id="activitySupport" name="%activity_extension_point_name" schema="schema/activitySupport.exsd"/>
    <extension-point id="luceneSearchParticipants" name="%search_participant_extension_point_name" schema="schema/luceneSearchParticipants.exsd"/>
    <extension-point id="server" name="%server_extension_point_name" schema="schema/server.exsd"/>
+   <extension-point id="searchParticipant" name="%help_search_participant_extension_point_name" schema="schema/searchParticipant.exsd"/>
+   <extension-point id="scope" name="%help_scope_extension_point_name" schema="schema/scope.exsd"/>
 
 <!-- Stand-alone infocenter application -->
    <extension
@@ -203,7 +206,7 @@
       </extraClasspathEntry>
    </extension>
    <extension
-         point="org.eclipse.help.base.luceneSearchParticipants">
+         point="org.eclipse.help.base.searchParticipant">
       <searchParticipant
             extensions="xhtml"
             id="org.eclipse.help.base.xhtml"
diff --git a/eclipse/plugins/org.eclipse.help.base/preferences.ini b/eclipse/plugins/org.eclipse.help.base/preferences.ini
index 9ddde32..ee19732 100644
--- a/eclipse/plugins/org.eclipse.help.base/preferences.ini
+++ b/eclipse/plugins/org.eclipse.help.base/preferences.ini
@@ -10,6 +10,14 @@ banner=
 # Example: banner_height=60
 banner_height=
 
+# Location of the footer page to display in the bottom frame.
+# Example: footer=/org.eclipse.help.webapp/advanced/banner.html
+footer=
+
+# Height of the footer frame
+# Example: footer_height=60
+footer_height=
+
 # The page to show in the content area when opening help.
 # Specify your html page as /pluginId/path/to/home.html.
 # Currently, the default home is /org.eclipse.help/doc/help_home.html.
@@ -42,6 +50,11 @@ disabled_css=/PRODUCT_PLUGIN/disabled_book.css
 # Set to true or false to control the visibility of the index view.
 indexView=true
 
+# Set to true or false to control the visibility of the filter dialog.
+# Note that the filter dialog will not be shown if no scopes have been
+# defined using the org.eclipse.help.base.scope extension point
+filterDialog=false
+
 # Set to true or false to control the visibility of the bookmarks view.
 # Note: this option has no effect in the infocenter.
 bookmarksView=true
@@ -143,7 +156,7 @@ locales=
 #  off - user can choose to show all topics, disabled topics initially hidden
 #  on - user can choose to show all topics, all topics initially shown
 #  always - topic from disabled capabilities are shown (filtering disabled)
-showDisabledActivityTopics=off
+showDisabledActivityTopics=always
 
 ######################
 # Active (live) help disabling
@@ -163,6 +176,7 @@ remoteHelpOn=false
 remoteHelpName=
 remoteHelpHost=
 remoteHelpPath=
+remoteHelpProtocol=
 remoteHelpUseDefaultPort=
 remoteHelpPort=
 remoteHelpICEnabled=
@@ -181,4 +195,19 @@ highlight-on=true
 #########################
 # Increases security  by preventing urls referencing external sites from being passed
 # in as the topic parameter. 
-restrictTopicParameter=true
\ No newline at end of file
+restrictTopicParameter=true
+
+########################
+# Properties defined for Quick Print
+########################
+# Max connection numbers for concurrent print(print selected topic and all subtopics)
+# Assign a value no greater than Integer.MAX_VALUE
+# Assign nothing to accept the default settings of the application
+# Example: maxConnections=
+maxConnections=10
+
+# Max topic numbers allowed for print in one request
+# Assign a value no greater than Integer.MAX_VALUE
+# Assign nothing to accept the default settings of the application
+# Example: maxTopics=
+maxTopics=500
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.base/schema/luceneSearchParticipants.exsd b/eclipse/plugins/org.eclipse.help.base/schema/luceneSearchParticipants.exsd
index e65c67a..1a7f56e 100644
--- a/eclipse/plugins/org.eclipse.help.base/schema/luceneSearchParticipants.exsd
+++ b/eclipse/plugins/org.eclipse.help.base/schema/luceneSearchParticipants.exsd
@@ -2,11 +2,14 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.help.base" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.help.base" id="luceneSearchParticipants" name="Lucene Search Participants"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         This extension point should be used to add document content to the Lucene search index. There are two cases were you would want to add a search participant:
+         <p><strong>In Eclipse 3.6 the announcement was made that this API is deprecated and will be removed in a future release. Use org.eclipse.help.base.searchParticipant as a replacement.
+</strong></p>
+
+This extension point should be used to add document content to the Lucene search index. There are two cases were you would want to add a search participant:
 <ol>
 <li>
 To index documents registered with the help system's TOC that are not of the HTML format (e.g. XML). In this case, the participant must declare file extensions it can handle. It will be called to index each matching document. In this case, the participant has the plug-in scope.
@@ -23,9 +26,12 @@ Search participants are associated with the plug-in the extension appears in. In
 
    <element name="extension">
       <annotation>
-         <appinfo>
-            <meta.element />
-         </appinfo>
+         <appInfo>
+            <meta.element deprecated="true" replacement="org.eclipse.help.base.searchParticipant" />
+         </appInfo>
+         <documentation>
+            This extension point is deprecated because it depends on API classes which expose Lucene classes, which are not binary compatible between major release. The extension point org.eclipse.help.base.searchParticipant should be used instead.
+         </documentation>
       </annotation>
       <complexType>
          <choice minOccurs="1" maxOccurs="unbounded">
@@ -51,9 +57,9 @@ Search participants are associated with the plug-in the extension appears in. In
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -61,9 +67,9 @@ Search participants are associated with the plug-in the extension appears in. In
 
    <element name="searchParticipant">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="id" icon="icon"/>
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <sequence>
@@ -81,9 +87,9 @@ Search participants are associated with the plug-in the extension appears in. In
                <documentation>
                   an optional translatable name that will be used to represent the participant as a category of documents that can be included in the search. The name is not required when the participant is used for documents in the TOC (i.e. when <code>extensions</code> attribute is set).
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="icon" type="string">
@@ -91,9 +97,9 @@ Search participants are associated with the plug-in the extension appears in. In
                <documentation>
                   an optional icon to be used to render search hits from the documents indexed by this participant. The icon will be used for the documents outside of the help's TOC to indicate that opening the search hit may result in an action different from showing the regular help document. Consequently, icon is not required when the participant is used for documents in the TOC (i.e. when <code>extensions</code> attribute is set).
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="participant" type="string">
@@ -101,9 +107,9 @@ Search participants are associated with the plug-in the extension appears in. In
                <documentation>
                   (<strong>new in 3.2</strong>) the implementation class for the help search participant.  This class must implement the <samp>org.eclipse.help.search.ILuceneSearchParticipant</samp> interface.  This attribute may be omitted, and the nested <samp>participant</samp> element may be provided instead.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.help.IHelpSerchParticipant"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="extensions" type="string">
@@ -117,7 +123,7 @@ Search participants are associated with the plug-in the extension appears in. In
          <attribute name="headless" type="boolean" use="default" value="false">
             <annotation>
                <documentation>
-                  specifies whether or not this search participant should be used when running the help system outside an eclipse workbench, i.e. it is running in either standalone or infocenter mode. The default value is <code>false</code>.
+                  specifies whether or not this search participant should be used when running the help system outside an eclipse workbench, i.e. it is running in either standalone or information center mode. The default value is <code>false</code>.
                </documentation>
             </annotation>
          </attribute>
@@ -165,27 +171,27 @@ Search participants are associated with the plug-in the extension appears in. In
                <documentation>
                   a reference to the search participant declared elsewhere using <code>searchParticipant</code> element. Binding can be used to reuse search participants in plug-ins without violating the top-down policy. Binding is only needed for indexing documents that are part of the TOC. Otherwise, participant has global scope.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.help.base.luceneSearchParticipants/searchParticipant/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          3.2
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is a sample usage of the extension point:
 
@@ -207,29 +213,29 @@ Search participants are associated with the plug-in the extension appears in. In
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The supplied search participant class must extend the <samp>org.eclipse.help.search.LuceneSearchParticipant</samp> abstract class.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Help system provides search participant for XHTML files (xhtml extension). Plug-ins that have dynamic XHTML documents as part of TOC must bind to this participant using <code>binding</code> element and <code>org.eclipse.help.base.xhtml</code> as the target participant id.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
-         Copyright (c) 2005, 2006 IBM Corporation and others.<br>
+         Copyright (c) 2005, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 which accompanies 
 this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
diff --git a/eclipse/plugins/org.eclipse.help.base/schema/scope.exsd b/eclipse/plugins/org.eclipse.help.base/schema/scope.exsd
new file mode 100644
index 0000000..764096c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/schema/scope.exsd
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help.base" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help.base" id="scope" name="Help Scope"/>
+      </appInfo>
+      <documentation>
+         Support for user defined scopes in the help table of contents, index and search results.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="scope"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="scope">
+      <annotation>
+         <documentation>
+            Defines a scope class which contains methods to determine which UA elements are in scope.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  An id for this scope which must be unique among scope ids.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         A class which implements AbstractScope contains functions to determine which elemements should be displayed when the scope is active. The help UI allows the user to specify any of the predefiend scopes.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help.base/schema/searchParticipant.exsd b/eclipse/plugins/org.eclipse.help.base/schema/searchParticipant.exsd
new file mode 100644
index 0000000..28ad900
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/schema/searchParticipant.exsd
@@ -0,0 +1,194 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help.base" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help.base" id="searchParticipant" name="Help Search Participant"/>
+      </appInfo>
+      <documentation>
+         This extension point should be used to add document content to the search index. There are two cases were you would want to add a search participant:
+<ol>
+<li>
+To index documents registered with the help system's TOC that are not of the HTML format (e.g. XML). In this case, the participant must declare file extensions it can handle. It will be called to index each matching document. In this case, the participant has the plug-in scope.
+</li>
+<li>
+To index documents outside of the help system's TOC. In this case, the participant will be given a chance to index all the documents it knows about at once. In addition, the participant will be delegated the task of opening the search result because the help system will not know how to open the documents outside the TOC. In this case, the participant has global scope.
+</li>
+</ol>
+<p>
+Search participants are associated with the plug-in the extension appears in. In order to reuse the participant in other plug-ins, <code>binding</code> should be used to reference them. This strategy prevents a plug-in from imposing its participant on the entire product for the file extensions it was registered with. By adding an explicit reference, the plug-in declares that it allows the referenced search participant to handle indexing of documents with those extensions. For documents that are not part of the TOC, there is no such danger. For this reason, they are global and <code>binding</code> should not be used.
+</p>
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="searchParticipant"/>
+            <element ref="binding"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="searchParticipant">
+      <annotation>
+         <appInfo>
+            <meta.element labelAttribute="id" icon="icon"/>
+         </appInfo>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a unique identifier of this search participant
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional translatable name that will be used to represent the participant as a category of documents that can be included in the search. The name is not required when the participant is used for documents in the TOC (i.e. when <code>extensions</code> attribute is set).
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="icon" type="string">
+            <annotation>
+               <documentation>
+                  an optional icon to be used to render search hits from the documents indexed by this participant. The icon will be used for the documents outside of the help's TOC to indicate that opening the search hit may result in an action different from showing the regular help document. Consequently, icon is not required when the participant is used for documents in the TOC (i.e. when <code>extensions</code> attribute is set).
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="resource"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="participant" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The implementation class for the help search participant.  This class must implement the <samp>org.eclipse.help.search.SearchParticipant</samp> interface.  This attribute may be omitted, and the nested <samp>participant</samp> element may be provided instead.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.search.SearchParticipant:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="extensions" type="string">
+            <annotation>
+               <documentation>
+                  an optional field containing the list of file types handled by the search participant. This is a string containing comma separate file extensions (e.g. "abc, xyz"). This attribute should be used when files are made explicitly known to the help system in the <code>org.eclipse.help.toc</code> extension point. The absence of this attribute is an indication that the participant will index all the documents it is responsible for by itself. 
+<p>Note also that participants that are registered for known documents have plug-in scope. If you want a participant to apply to documents in another plug-in, you must use the <code>binding</code> element to extend the scope. In contrast, participants that do not specify this attribute have global scope.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="headless" type="boolean" use="default" value="false">
+            <annotation>
+               <documentation>
+                  specifies whether or not this search participant should be used when running the help system outside an eclipse workbench, i.e. it is running in either standalone or infocenter mode. The default value is <code>false</code>.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="binding">
+      <complexType>
+         <attribute name="participantId" type="string">
+            <annotation>
+               <documentation>
+                  a reference to the search participant declared elsewhere using <code>searchParticipant</code> element. Binding can be used to reuse search participants in plug-ins without violating the top-down policy. Binding is only needed for indexing documents that are part of the TOC. Otherwise, participant has global scope.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.help.base.luceneSearchParticipants/searchParticipant/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is a sample usage of the extension point:
+
+<p>
+<pre>
+  <extension point="org.eclipse.help.base.luceneSearchParticipant">
+   <searchParticipant id="org.eclipse.myGlobalParticipant"
+     name="Global Participant"
+     icon="icons/mydoc.gif"
+     participant="org.eclipse.myPlugin.myPackage.MyGlobalParticipant"
+     headless="true"/>
+   <searchParticipant id="org.eclipse.myXYZParticipant"
+     extensions="xyz"
+     participant="org.eclipse.myPlugin.myPackage.MyXYZParticipant"/>
+  </extension>
+</pre>
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The supplied search participant class must extend the <samp>org.eclipse.help.search.SearchParticipant</samp> abstract class.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java
new file mode 100644
index 0000000..1b9f7f3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/base/AbstractHelpScope.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.base;
+
+import java.util.Locale;
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.IUAElement;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
+
+/**
+ * Represents a scope which can be used to specify which topics are shown in the
+ * table of contents and which entries will show in the index. The inScope() functions
+ * are used by the help system to determine which elements to show. Both the table of
+ * contents and index are trees and the help system reads these trees starting with the 
+ * root and working down through the children. 
+ * 
+ * @since 3.5
+ */
+
+public abstract class AbstractHelpScope {
+	
+	/**
+	 * Determine whether a table of contents is in scope
+	 */
+	public abstract boolean inScope(IToc toc);
+	
+	/**
+	 * Determine whether a topic is in scope
+	 */
+	public abstract boolean inScope(ITopic topic);
+
+	/**
+	 * Determine whether an index entry is in scope
+	 */
+	public abstract boolean inScope(IIndexEntry entry);
+	
+	/**
+	 * a single information center instance can display content in multiple locales.
+	 * This function exists to provide a name for a specific locale.
+	 * @param locale a string representing the locale used for the UI
+	 * @return a name for this scope appropriate for the locale which 
+	 * will be used in the scope selection dialog. It is recommended that 
+	 * the name be no more than 20 characters long.
+	 */
+	public abstract String getName(Locale locale);
+	
+	/**
+     * In the default implementation of this method an IndexSee element is in scope
+     * if it's target is in scope. May be overridden to exclude more IndexSee elements 
+     * from the scope
+	 * @param see
+	 * @return
+	 */
+	public boolean inScope(IIndexSee see) {
+		return hasInScopeChildren(see);
+	}
+	
+	/**
+	 * The help system can build the trees faster if it knows that an out of
+	 * scope element cannot have child elements which are in scope. This 
+	 * is called a hierarchical scope. If an out of scope element can have
+	 * in scope children this function should be overridden and the help 
+	 * system will perform a deeper search.
+	 */
+	public boolean isHierarchicalScope() {
+		return true;
+	}
+	
+	/**
+	 * Convenience method to make it easier to write subclasses
+	 * In the case of an IIndexSee element this method tests 
+	 * to see if the target is in scope. For all other elements
+	 * it tests all children and if this is not a hierarchical scope 
+	 * all descendants are tested.
+	 * @param element An element which may have children
+	 * @return true if at least one child is in scope
+	 */
+	public final boolean hasInScopeChildren(IUAElement element) {
+		return ScopeUtils.hasInScopeChildren(element, this);
+	}
+		
+}
+
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
index 8b7507e..7c89a4a 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/BaseHelpSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -191,7 +191,8 @@ public final class BaseHelpSystem {
 
 	public static URL resolve(String href, boolean documentOnly) {
 		String url = null;
-		if (href == null || href.indexOf("://") != -1) //$NON-NLS-1$
+		if (href == null || href.indexOf("://") != -1 //$NON-NLS-1$
+				   || isFileProtocol(href)) 
 			url = href;
 		else {
 			BaseHelpSystem.ensureWebappRunning();
@@ -210,7 +211,8 @@ public final class BaseHelpSystem {
 
 	public static URL resolve(String href, String servlet) {
 		String url = null;
-		if (href == null || href.indexOf("://") != -1) { //$NON-NLS-1$
+		if (href == null || href.indexOf("://") != -1 //$NON-NLS-1$
+		   || isFileProtocol(href)) {
 			url = href;
 		}
 		else {
@@ -231,6 +233,12 @@ public final class BaseHelpSystem {
 		}
 	}
 
+	private static boolean isFileProtocol(String href) {
+		// Test for file: or /file:
+		int index = href.indexOf("file:"); //$NON-NLS-1$
+		return ( index == 0 ||  (index == 1 && href.charAt(0) == '/' )); 
+	}
+	
 	public static String unresolve(URL url) {
 		return unresolve(url.toString());
 	}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.java
index a554a8b..67accef 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,4 +62,7 @@ public final class HelpBaseResources extends NLS {
 	public static String HelpIndexBuilder_errorExtractingId;
 	public static String HelpIndexBuilder_errorParsing;
 	public static String PreferenceNameDefault;
+	public static String HelpSearch_QueryTooComplex;
+	public static String EnabledTopicFilterName;
+	public static String SearchScopeFilterName;
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.properties b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.properties
index 162c498..84e7703 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.properties
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpBaseResources.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -51,3 +51,6 @@ HelpIndexBuilder_incompleteIndex=Help documentation could not be indexed complet
 HelpIndexBuilder_cannotCreateDest=Cannot create destination index directory
 HelpIndexBuilder_errorExtractingId=Error extracting plug-in identifier.
 PreferenceNameDefault=Name
+HelpSearch_QueryTooComplex=Query too complex
+EnabledTopicFilterName=Hide topics for capabilities that are not enabled
+SearchScopeFilterName=Hide topics not in active search scope
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
index 42ee38f..87e4fd0 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/HelpDisplay.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ import org.eclipse.osgi.util.NLS;
  */
 public class HelpDisplay {
 
+	private String hrefOpenedFromHelpDisplay;
+
 	/**
 	 * Constructor.
 	 */
@@ -52,6 +54,11 @@ public class HelpDisplay {
 	 * </ul>
 	 */
 	public void displayHelpResource(String href, boolean forceExternal) {
+		setHrefOpenedFromHelpDisplay(href);
+		if (href.startsWith("/file")) { //$NON-NLS-1$
+			displayHelpResource(href.substring(1), forceExternal);
+			return;
+		}
 		if (href != null && (href.startsWith("tab=") //$NON-NLS-1$
 				|| href.startsWith("toc=") //$NON-NLS-1$
 				|| href.startsWith("topic=") //$NON-NLS-1$
@@ -246,4 +253,12 @@ public class HelpDisplay {
 		return null;
 	}
 
+	public String getHrefOpenedFromHelpDisplay() {
+		return hrefOpenedFromHelpDisplay;
+	}
+
+	private void setHrefOpenedFromHelpDisplay(String hrefOpenedFromHelpDisplay) {
+		this.hrefOpenedFromHelpDisplay = hrefOpenedFromHelpDisplay;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
index e6246ac..7bd701e 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/IHelpBaseConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,14 +20,19 @@ public interface IHelpBaseConstants {
 	String P_IN_PLACE = "in_place"; //$NON-NLS-1$
 	String P_IN_EDITOR = "in editor"; //$NON-NLS-1$
 	String P_IN_BROWSER = "in browser"; //$NON-NLS-1$
+	String P_KEY_HELP_SCOPE = "scope"; //$NON-NLS-1$
+	String P_KEY_FILTER_DIALOG = "filterDialog"; //$NON-NLS-1$
 	String P_KEY_ALWAYS_EXTERNAL_BROWSER = "always_external_browser"; //$NON-NLS-1$
 	String P_KEY_SEARCH_FROM_BROWSER = "search_from_browser"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_ON = "remoteHelpOn"; //$NON-NLS-1$
+	String P_KEY_REMOTE_HELP_PREFERRED = "remoteHelpPreferred"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_NAME = "remoteHelpName"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_HOST = "remoteHelpHost"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_PATH = "remoteHelpPath"; //$NON-NLS-1$
+	String P_KEY_REMOTE_HELP_PROTOCOL = "remoteHelpProtocol"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_DEFAULT_PORT = "remoteHelpUseDefaultPort"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_PORT = "remoteHelpPort"; //$NON-NLS-1$
 	String P_KEY_REMOTE_HELP_ICEnabled = "remoteHelpICEnabled"; //$NON-NLS-1$
     String P_SHOW_BREADCRUMBS = "showBreadcrumbs"; //$NON-NLS-1$
+    String P_PAGE_NOT_FOUND = "page_not_found"; //$NON-NLS-1$    
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
index 10f2af4..d596e84 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/DefaultPreferenceFileHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,12 +15,9 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.base.IHelpBaseConstants;
 
-
-
 public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
 
-	private boolean isRemoteOn;
-	
+	private boolean isRemoteOn, isRemoteHelpPreferred;
 	/**
 	 * Class handles the default preferences for the Help Content preference page
 	 */
@@ -31,10 +28,11 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
 		namePreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, ""); //$NON-NLS-1$
 		hostPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, ""); //$NON-NLS-1$
 		pathPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, ""); //$NON-NLS-1$
+		protocolPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, ""); //$NON-NLS-1$
 		portPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, ""); //$NON-NLS-1$
 		icEnabledPreference = prefs.get(IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, ""); //$NON-NLS-1$
 		isRemoteOn = prefs.getBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false);
-		
+		isRemoteHelpPreferred = prefs.getBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false);
 		
 		//Get host array first, and initialize values
 		if(hostPreference.length()==0)
@@ -51,6 +49,7 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
 		// Get the preference values
 		this.nameEntries = getValues(namePreference, ""); //$NON-NLS-1$
 		this.pathEntries = getValues(pathPreference, "/"); //$NON-NLS-1$
+		this.protocolEntries = getValues(protocolPreference, "http"); //$NON-NLS-1$
 		this.portEntries = getValues(portPreference, "80"); //$NON-NLS-1$
 		this.isICEnabled = getValues(icEnabledPreference, "true"); //$NON-NLS-1$
 		
@@ -62,9 +61,13 @@ public class DefaultPreferenceFileHandler extends PreferenceFileHandler {
 			this.numEntries = this.nameEntries.length;
 
 	}
-
-	public boolean isRemoteHelpOn()
-	{
-		return isRemoteOn;
+	
+	public boolean isRemoteHelpOn() { 
+		return isRemoteOn; 
+	}
+	
+	public boolean isRemoteHelpPreferred() {
+		return isRemoteHelpPreferred;
 	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
new file mode 100644
index 0000000..e07bc3c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/HttpsUtility.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.base.remote;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+
+public class HttpsUtility {
+
+	private static final String PATH_TOC = "/toc"; //$NON-NLS-1$
+	private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
+
+	private final static int SOCKET_TIMEOUT = 5000; //milliseconds
+	
+	public static InputStream getHttpsStream(URL httpsURL)
+	{
+		InputStream in =null; 
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+	           in = httpsURL.openStream();
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+		}
+		return in;
+	}
+	
+	public static InputStream getHttpsInputStream(String thisProtocol,String thisHost, String thisPort, String thisPath, String locale)
+	{
+		URL url; 
+		InputStream in = null;
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+	            url = new URL(thisProtocol, thisHost, new Integer(thisPort) .intValue(), 
+						thisPath + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
+				
+				in = url.openStream();
+		}
+		catch(Exception e)
+		{
+			
+		}
+		return in;
+	}
+	
+	public static URL getHttpsURL(String thisProtocol,String thisHost, int thisPort, String thisPath)
+	{
+		URL url=null; 
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+	            url = new URL(thisProtocol, thisHost, thisPort, thisPath);
+		}
+		catch(Exception e)
+		{
+			
+		}
+		return url;
+	}
+	
+	public static URL getHttpsURL(String urlPath)
+	{
+		URL url=null; 
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+	            url = new URL(urlPath);
+		}
+		catch(Exception e)
+		{
+			
+		}
+		return url;
+	}
+	
+	public static URL getHttpsURL(String thisProtocol,String thisHost, String thisPort, String thisPath)
+	{
+		URL url=null; 
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+	            url = new URL(thisProtocol, thisHost, Integer.parseInt(thisPort), thisPath);
+		}
+		catch(Exception e)
+		{
+			
+		}
+		return url;
+	}
+	
+	public static boolean canConnectToHttpsURL(String urlConnection)
+	{
+		boolean validConnection=true;
+		try
+		{
+	            TrustManager[] trustAllCerts = new TrustManager[] {
+	                        new X509TrustManager(){
+	                              public java.security.cert.X509Certificate[] getAcceptedIssuers(){
+	                                    return null;
+	                              }
+	                        public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                              public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType ) { }
+	                        }
+	                  };
+
+	            SSLContext sc = SSLContext.getInstance( "SSL" ); //$NON-NLS-1$
+	            sc.init( null, trustAllCerts, new java.security.SecureRandom() );
+	            HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
+	            
+			HttpsURLConnection testConnection = (HttpsURLConnection)new URL(urlConnection).openConnection();
+			setTimeout(testConnection,SOCKET_TIMEOUT);
+			testConnection.connect();
+		}
+		catch (MalformedURLException e) {
+			validConnection = false;
+		} catch (IOException e) {
+			validConnection = false;
+		} catch (NoSuchAlgorithmException e) {
+			// TODO Auto-generated catch block
+			validConnection = false;
+		} catch (KeyManagementException e) {
+			// TODO Auto-generated catch block
+			validConnection = false;
+		}
+		
+		return validConnection;
+	}
+	
+	private static void setTimeout(URLConnection conn, int milliseconds) {
+		Class conClass = conn.getClass();
+		try {
+			Method timeoutMethod = conClass.getMethod(
+					"setConnectTimeout", new Class[]{ int.class } ); //$NON-NLS-1$
+			timeoutMethod.invoke(conn, new Object[] { new Integer(milliseconds)} );
+		} catch (Exception e) {
+		     // If running on a 1.4 JRE an exception is expected, fall through
+		} 
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
index da43fe1..15398f9 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/PreferenceFileHandler.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -23,14 +23,18 @@ import org.osgi.service.prefs.BackingStoreException;
 
 public class PreferenceFileHandler {
 
-	protected String[] nameEntries, hostEntries, pathEntries, portEntries, isICEnabled = null;
+	protected String[] nameEntries, hostEntries, pathEntries, protocolEntries, portEntries, isICEnabled = null;
 
-	protected String namePreference, hostPreference, pathPreference, portPreference, icEnabledPreference;
+	protected String namePreference, hostPreference, pathPreference, protocolPreference, portPreference, icEnabledPreference;
 
 	protected int numEntries = 0, numHostEntries=0;
 
 	protected static String PREFERENCE_ENTRY_DELIMITER = ","; //$NON-NLS-1$
 
+	public static final int LOCAL_HELP_ONLY=0;
+	public static final int LOCAL_HELP_PRIORITY=1;
+	public static final int REMOTE_HELP_PRIORITY=2;
+	
 	public PreferenceFileHandler() {
 
 		/*
@@ -45,6 +49,8 @@ public class PreferenceFileHandler {
 		    (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, "", null); //$NON-NLS-1$
 		pathPreference = Platform.getPreferencesService().getString
 		    (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, "", null); //$NON-NLS-1$
+		protocolPreference = Platform.getPreferencesService().getString
+	    (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, "", null); //$NON-NLS-1$
 		portPreference = Platform.getPreferencesService().getString
 		    (HelpBasePlugin.PLUGIN_ID,IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, "", null); //$NON-NLS-1$
 		icEnabledPreference =Platform.getPreferencesService().getString
@@ -65,6 +71,7 @@ public class PreferenceFileHandler {
 		// Get the preference values
 		this.nameEntries = getValues(namePreference, ""); //$NON-NLS-1$
 		this.pathEntries = getValues(pathPreference, "/"); //$NON-NLS-1$
+		this.protocolEntries = getValues(protocolPreference, "http"); //$NON-NLS-1$
 		this.portEntries = getValues(portPreference, "80"); //$NON-NLS-1$
 		this.isICEnabled = getValues(icEnabledPreference, "true"); //$NON-NLS-1$
 		
@@ -74,7 +81,6 @@ public class PreferenceFileHandler {
 			this.numEntries = 0;
 		else
 			this.numEntries = this.nameEntries.length;
-
 	}
 
 	protected String[] getValues(String preferenceEntry, String appendString) {
@@ -83,9 +89,14 @@ public class PreferenceFileHandler {
 			return  new String[0];//NEW
 		
 		// Split the string and return an array of Strings
-		String [] currEntries=preferenceEntry.split(PREFERENCE_ENTRY_DELIMITER);
+		String [] currEntries;
 		String [] updatedArray=null;
 		
+		if(!preferenceEntry.equals("")) //$NON-NLS-1$
+			currEntries=preferenceEntry.split(PREFERENCE_ENTRY_DELIMITER);
+		else
+			currEntries = new String[0];
+		
 		if(currEntries.length!=numHostEntries) //Current Entry not equals to Hosts
 		{
 			int i;
@@ -132,7 +143,7 @@ public class PreferenceFileHandler {
 	public static void commitRemoteICs(RemoteIC[] remoteICs) {
 
 		RemoteIC remote_ic = null;
-		String name = "", host = "", path = "", port = "", enabledString = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ 
+		String name = "", host = "", path = "", protocol="", port = "", enabledString = ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ 
 		boolean enabled;
 
 		int numICs = remoteICs.length;
@@ -143,6 +154,7 @@ public class PreferenceFileHandler {
 			name = remote_ic.getName();
 			host = remote_ic.getHost();
 			path = remote_ic.getPath();
+			protocol = remote_ic.getProtocol();
 			port = remote_ic.getPort();
 			enabled = remote_ic.isEnabled();
 			enabledString = enabled + ""; //$NON-NLS-1$
@@ -152,6 +164,7 @@ public class PreferenceFileHandler {
 				name = name + PREFERENCE_ENTRY_DELIMITER + remote_ic.getName();
 				host = host + PREFERENCE_ENTRY_DELIMITER + remote_ic.getHost();
 				path = path + PREFERENCE_ENTRY_DELIMITER + remote_ic.getPath();
+				protocol = protocol + PREFERENCE_ENTRY_DELIMITER + remote_ic.getProtocol();
 				port = port + PREFERENCE_ENTRY_DELIMITER + remote_ic.getPort();
 				enabledString = enabledString + PREFERENCE_ENTRY_DELIMITER + remote_ic.isEnabled();
 			}
@@ -166,6 +179,7 @@ public class PreferenceFileHandler {
 		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_NAME, name);
 		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, host);
 		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, path);
+		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, protocol);
 		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, port);
 		prefs.put(IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, enabledString);
 		try {
@@ -185,7 +199,7 @@ public class PreferenceFileHandler {
 		// Load the preferences in org.eclipse.help.base/preferences.ini
 		RemoteIC initRemoteIC;
 		int totalICs = this.getTotalRemoteInfocenters();
-		String host, name, path, port, enabledDisabled;
+		String host, name, path, protocol, port, enabledDisabled;
 		boolean currEnabled;
 
 		for (int i = 0; i < totalICs; i++) {
@@ -193,6 +207,7 @@ public class PreferenceFileHandler {
 			host = (this.getHostEntries())[i];
 			name = (this.getNameEntries())[i];
 			path = (this.getPathEntries())[i];
+			protocol = (this.getProtocolEntries())[i];
 			port = (this.getPortEntries())[i];
 			enabledDisabled = (this.getEnabledEntries())[i];
 			if (enabledDisabled.equalsIgnoreCase("true")) //$NON-NLS-1$
@@ -202,7 +217,7 @@ public class PreferenceFileHandler {
 				currEnabled = false;
 			}
 
-			initRemoteIC = new RemoteIC(currEnabled, name, host, path, port);
+			initRemoteIC = new RemoteIC(currEnabled, name, host, path, protocol,port);
 			remoteICList.add(initRemoteIC);
 
 		}
@@ -211,6 +226,27 @@ public class PreferenceFileHandler {
 
 	}
 
+	public static int getEmbeddedHelpOption() {
+		boolean isRemoteOn = Platform.getPreferencesService().getBoolean
+	    (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+		
+		boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
+	    (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
+
+		if(!isRemoteOn)
+		{
+			return LOCAL_HELP_ONLY;
+		}
+		else if(!isRemotePreferred)
+		{
+			return LOCAL_HELP_PRIORITY;
+		}
+		else
+		{
+			return REMOTE_HELP_PRIORITY;
+		}
+	}
+	
 	public String[] getHostEntries() {
 		return hostEntries;
 	}
@@ -222,6 +258,10 @@ public class PreferenceFileHandler {
 	public String[] getPathEntries() {
 		return pathEntries;
 	}
+	
+	public String[] getProtocolEntries() {
+		return protocolEntries;
+	}
 
 	public String[] getPortEntries() {
 		return portEntries;
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
index 19eb54b..bf39816 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteContextProvider.java
@@ -1,11 +1,13 @@
-/***************************************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.help.internal.base.remote;
 
 import java.io.IOException;
@@ -38,6 +40,7 @@ public class RemoteContextProvider extends AbstractContextProvider {
 		String host[] = prefHandler.getHostEntries();
 		String port[] = prefHandler.getPortEntries();
 		String path[] = prefHandler.getPathEntries();
+		String [] protocols = prefHandler.getProtocolEntries();
 		String isEnabled[] = prefHandler.isEnabled();
 
 		// InfoCenters ignore remote content
@@ -45,23 +48,34 @@ public class RemoteContextProvider extends AbstractContextProvider {
 
 			int numICs = host.length; // Total number of hosts
 		    //Loop through remote InfoCenters and return first CSH match found
+			URL url=null;
 			for (int i = 0; i < numICs; i++) {
 
 				if (isEnabled[i].equals("true")) { //$NON-NLS-1$
 					InputStream in = null;
 					try {
-
-						URL url = new URL(PROTOCOL, host[i], new Integer(port[i]).intValue(), path[i]
-								+ PATH_CONTEXT + '?' + PARAM_ID + '=' + id + '&' + PARAM_LANG + '=' + locale);
-						HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-						if (connection.getResponseCode() == 200) {
-							in = connection.getInputStream();
-							if (reader == null) {
-								reader = new DocumentReader();
+						
+						HttpURLConnection connection;
+						if(protocols[i].equals(PROTOCOL))
+						{
+							url = new URL(PROTOCOL, host[i], new Integer(port[i]).intValue(), path[i]+ PATH_CONTEXT + '?' + PARAM_ID + '=' + id + '&' + PARAM_LANG + '=' + locale);
+							connection = (HttpURLConnection) url.openConnection();
+							if (connection.getResponseCode() == 200) {
+								in = connection.getInputStream();
+								
 							}
-							return (Context) reader.read(in);
 						}
-
+						else
+						{
+							url = HttpsUtility.getHttpsURL(protocols[i], host[i], port[i], path[i]+ PATH_CONTEXT + '?' + PARAM_ID + '=' + id + '&' + PARAM_LANG + '=' + locale);
+							in = HttpsUtility.getHttpsStream(url);
+						}
+						
+						if (reader == null) {
+							reader = new DocumentReader();
+						}
+						return (Context) reader.read(in);
+						
 					} catch (IOException e) {
 						String msg = "I/O error while trying to contact the remote help server"; //$NON-NLS-1$
 						HelpBasePlugin.logError(msg, e);
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
index cb57d67..eff6866 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteExtensionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,8 @@ import org.eclipse.help.internal.dynamic.DocumentReader;
 public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
 
 	private static final String PATH_EXTENSIONS = "/extension"; //$NON-NLS-1$
-
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
+	
 	private DocumentReader reader;
 
 	public RemoteExtensionProvider() {
@@ -48,7 +49,16 @@ public class RemoteExtensionProvider extends AbstractContentExtensionProvider {
 					InputStream in = null;
 					try {
 						URL url = RemoteHelp.getURL(ic, PATH_EXTENSIONS);
-						in = url.openStream();
+						
+						if(url.getProtocol().equalsIgnoreCase(PROTOCOL_HTTP))
+						{
+							in = url.openStream();
+						}
+						else
+						{
+							in = HttpsUtility.getHttpsStream(url);
+						}
+						
 						if (reader == null) {
 							reader = new DocumentReader();
 						}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
index 08c29a4..30c6315 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteHelp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.help.internal.base.IHelpBaseConstants;
 public class RemoteHelp {
 
 	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
 	private static ListenerList listeners;
 	private static Throwable error;
 
@@ -66,13 +67,20 @@ public class RemoteHelp {
 		PreferenceFileHandler handler = new PreferenceFileHandler();
 		String host = handler.getHostEntries()[ic];
 		String path = handler.getPathEntries()[ic] + pathSuffix;
+		String protocol = handler.getProtocolEntries()[ic];
 		int port;
+		URL url =null;
 		try {
 			port = Integer.parseInt(handler.getPortEntries()[ic]);
 		} catch (NumberFormatException e) {
 			throw new MalformedURLException();
-		}
-		return new URL(PROTOCOL_HTTP, host, port, path);
+		} 
+		if(protocol.equalsIgnoreCase(PROTOCOL_HTTPS))
+			url = HttpsUtility.getHttpsURL(protocol,host,port,path);
+		else
+			url = new URL(PROTOCOL_HTTP, host, port, path);
+		
+		return url;
 	}
 	
 	/*
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
index e5acad7..0ecf4c1 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIC.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,15 +20,29 @@ public class RemoteIC {
 
 	private String path = ""; //$NON-NLS-1$
 	
+	private String protocol = ""; //$NON-NLS-1$
+	
 	private String port;
 	
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
 	
-    public RemoteIC(boolean enabled, String name, String host, String path, String port){
+	public RemoteIC(boolean enabled, String name, String host, String path, String port){
+		
+    	this.enabled = enabled;
+	    this.name    = name;
+	    this.host    = host;
+	    this.path    = path;
+	    this.port    = port;
+	    this.port    = PROTOCOL_HTTP;
+	}
+
+	public RemoteIC(boolean enabled, String name, String host, String path, String protocol, String port){
 		
     	this.enabled = enabled;
 	    this.name    = name;
 	    this.host    = host;
 	    this.path    = path;
+	    this.protocol = protocol;
 	    this.port    = port;
 	   
 	}
@@ -39,6 +53,10 @@ public class RemoteIC {
 	public String getPath() {
 		return path;
 	}
+	
+	public String getProtocol() {
+		return protocol;
+	}
 
 	public String getPort() {
 		return port;
@@ -67,6 +85,10 @@ public class RemoteIC {
 	public void setPath(String path) {
 		this.path = path;
 	}
+	
+	public void setProtocol(String protocol) {
+		this.protocol = protocol;
+	}
 
 	public void setPort(String port) {
 		this.port = port;
@@ -84,6 +106,8 @@ public class RemoteIC {
         	return false;
         if ( !(((RemoteIC) anotherObject).getPath().equals(this.getPath())))
         	return false;
+        if ( !(((RemoteIC) anotherObject).getProtocol().equals(this.getProtocol())))
+        	return false;
         if ( !(((RemoteIC) anotherObject).getPort().equals(this.getPort())))
             return false;    	
         if ( !(((RemoteIC) anotherObject).isEnabled()==this.isEnabled()))
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
index 08fe28f..a0942d0 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteIndexProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
 
 	private static final String PATH_INDEX = "/index"; //$NON-NLS-1$
 	private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
 	
 	/*
 	 * Constructs a new remote index provider, which listens for remote
@@ -51,12 +52,27 @@ public class RemoteIndexProvider extends AbstractIndexProvider {
 			List contributions = new ArrayList();
 			PreferenceFileHandler handler = new PreferenceFileHandler();
 			String isEnabled[] = handler.isEnabled();
+			String [] protocol = handler.getProtocolEntries();
+			String [] host = handler.getHostEntries();
+			String [] port = handler.getPortEntries();
+			String [] path = handler.getPathEntries();
 			for (int ic = 0; ic < handler.getTotalRemoteInfocenters(); ic++) {
 				if (isEnabled[ic].equalsIgnoreCase("true")) { //$NON-NLS-1$
 					InputStream in = null;
 					try {
-						URL url = RemoteHelp.getURL(ic, PATH_INDEX + '?' + PARAM_LANG + '=' + locale);
-						in = url.openStream();
+						URL url;
+						
+						if(protocol[ic].equals(PROTOCOL_HTTP))
+						{
+							url = RemoteHelp.getURL(ic, PATH_INDEX + '?' + PARAM_LANG + '=' + locale);
+							in = url.openStream();
+						}
+						else
+						{
+							url = HttpsUtility.getHttpsURL(protocol[ic], host[ic], port[ic], path[ic]+PATH_INDEX + '?' + PARAM_LANG + '=' + locale);
+							in = HttpsUtility.getHttpsStream(url);
+						}
+						
 						RemoteIndexParser parser = new RemoteIndexParser();
 						IIndexContribution[] result = parser.parse(in);
 						for (int contrib = 0; contrib < result.length; contrib++) {
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
index c1e3a79..11a65f7 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteSearchManager.java
@@ -1,5 +1,5 @@
 /***************************************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved. This program and the
+ * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved. This program and the
  * accompanying materials are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
@@ -29,6 +29,8 @@ public class RemoteSearchManager {
 	private static final String PATH_SEARCH = "/search"; //$NON-NLS-1$
 	private static final String PARAM_PHRASE = "phrase"; //$NON-NLS-1$
 	private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
+	
 	private RemoteSearchParser parser;
 
 	/*
@@ -42,7 +44,9 @@ public class RemoteSearchManager {
 		String host[] = prefHandler.getHostEntries();
 		String port[] = prefHandler.getPortEntries();
 		String path[] = prefHandler.getPathEntries();
+		String [] protocols = prefHandler.getProtocolEntries();
 		String isEnabled[] = prefHandler.isEnabled();
+		
 		try {
 			// InfoCenters ignore remote content
 			if (RemoteHelp.isEnabled()) {
@@ -53,10 +57,19 @@ public class RemoteSearchManager {
 					if (isEnabled[i].equals("true")) { //$NON-NLS-1$
 						InputStream in = null;
 						try {
-
-							URL url = new URL(
-									"http", host[i], new Integer(port[i]).intValue(), path[i] + PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale()); //$NON-NLS-1$
-							in = url.openStream();
+							URL url;
+							
+							if(protocols[i].equals(PROTOCOL_HTTP))
+							{
+								url = new URL("http", host[i], new Integer(port[i]).intValue(), path[i] + PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale()); //$NON-NLS-1$
+								in = url.openStream();
+							}
+							else
+							{
+								url = HttpsUtility.getHttpsURL(protocols[i], host[i], port[i], path[i]+ PATH_SEARCH + '?' + PARAM_PHRASE + '=' + URLCoder.encode(searchQuery.getSearchWord()) + '&' + PARAM_LANG + '=' + searchQuery.getLocale()); 
+								in = HttpsUtility.getHttpsStream(url);
+							}
+							
 							if (parser == null) {
 								parser = new RemoteSearchParser();
 							}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java
new file mode 100644
index 0000000..d494264
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteStatusData.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.base.remote;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.base.IHelpBaseConstants;
+
+public class RemoteStatusData {
+
+
+	private static final String INDEXJSP = "/index.jsp"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
+	
+	/*
+	 * Convience method to see if any remote help
+	 * is down
+	 */
+	public static boolean isAnyRemoteHelpUnavailable()
+	{
+		ArrayList sites = getRemoteSites();
+		if (sites.isEmpty())
+			return false;
+		
+		ArrayList badSites = checkSitesConnectivity(sites);
+		if (badSites.isEmpty())
+			return false;
+		
+		return true;
+	}
+
+	/*
+	 * Checks each URL in the ArrayList site to see if
+	 * a network connection can be opened to 
+	 * url+/index.jsp
+	 * 
+	 * Returns a subset of sites that cannot be connected.
+	 * May be empty, or may be the same as sites
+	 */
+	public static ArrayList checkSitesConnectivity(ArrayList sites)
+	{
+		ArrayList badSites = new ArrayList();
+		
+		for (int i=0;i<sites.size();i++)
+		{
+			URL baseURL = (URL)sites.get(i);
+			try{
+				URL indexURL = new URL(baseURL.toExternalForm()+INDEXJSP);
+				InputStream in;
+				if(indexURL.getProtocol().equalsIgnoreCase(PROTOCOL_HTTP))
+				{
+					in = indexURL.openStream();
+					in.close();
+				}
+				else
+				{
+					in = HttpsUtility.getHttpsStream(indexURL);
+					in.close();
+				}
+				
+			
+			}catch(Exception ex)
+			{
+				badSites.add(baseURL);
+			}
+		}
+		return badSites;
+	}
+	
+	/*
+	 * Loads the remote sites stored in preferences,
+	 * and places them as URLs in an ArrayList.
+	 * 
+	 * Returns the ArrayList with sites in URL form
+	 */
+	public static ArrayList getRemoteSites()
+	{
+		ArrayList sites = new ArrayList();
+		
+		boolean remoteHelpEnabled = 
+			Platform.getPreferencesService().getBoolean(
+					HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false,null);
+		
+		if (!remoteHelpEnabled)
+			return sites;
+
+		String hosts[] = Platform.getPreferencesService().getString(
+				HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_HOST, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
+		String paths[] = Platform.getPreferencesService().getString(
+				HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PATH, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
+		String protocols[] = Platform.getPreferencesService().getString(
+				HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PROTOCOL, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
+		String ports[] = Platform.getPreferencesService().getString(
+				HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PORT, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
+		String enableds[] = Platform.getPreferencesService().getString(
+				HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ICEnabled, "", null).split(","); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		
+		for (int i=0;i<hosts.length;i++)
+		{
+			try{
+				if (enableds[i].equalsIgnoreCase("true")) //$NON-NLS-1$
+				{
+					URL url = new URL(
+							protocols[i]+"://"+hosts[i]+':'+ports[i]+paths[i]); //$NON-NLS-1$
+					sites.add(url);
+				}
+			}
+			catch(Exception ex){
+			}
+		}
+		return sites;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
index cd30dcf..af42144 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/remote/RemoteTocProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,8 +27,9 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
 public class RemoteTocProvider extends AbstractTocProvider {
 
 	private static final String PATH_TOC = "/toc"; //$NON-NLS-1$
-	private static final String PROTOCOL = "http://"; //$NON-NLS-1$
+	private static final String PROTOCOL = "http"; //$NON-NLS-1$
 	private static final String PARAM_LANG = "lang"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
 
 	/*
 	 * Constructs a new remote toc provider, which listens for remote
@@ -65,6 +66,7 @@ public class RemoteTocProvider extends AbstractTocProvider {
 			String host[] = prefHandler.getHostEntries();
 			String port[] = prefHandler.getPortEntries();
 			String path[] = prefHandler.getPathEntries();
+			String protocol[] = prefHandler.getProtocolEntries();
 			String isEnabled[] = prefHandler.isEnabled();
 
 			ITocContribution[] currentContributions = new ITocContribution[0];
@@ -77,17 +79,26 @@ public class RemoteTocProvider extends AbstractTocProvider {
 
 			URL url = null;
 			String urlStr = ""; //$NON-NLS-1$
-			for (int i = 0; i < numICs; i++) {
+			for (int i = numICs-1; i >= 0; i--) {
 				if (isEnabled[i].equalsIgnoreCase("true")) { //$NON-NLS-1$
 					try {
-						url = new URL("http", host[i], new Integer(port[i]) .intValue(),  //$NON-NLS-1$
-								path[i] + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
-						in = url.openStream();
+						
+						if(protocol[i].equalsIgnoreCase(PROTOCOL))
+						{
+							url = new URL(protocol[i], host[i], new Integer(port[i]) .intValue(), 
+									path[i] + PATH_TOC + '?' + PARAM_LANG + '=' + locale);
+							
+							in = url.openStream();
+							urlStr = PROTOCOL + "://"+host[i] + ":" + port[i] + path[i]; //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						else
+						{
+							in = HttpsUtility.getHttpsInputStream(protocol[i],host[i],port[i],path[i],locale);
+							urlStr = PROTOCOL_HTTPS + "://"+host[i] + ":" + port[i] + path[i]; //$NON-NLS-1$ //$NON-NLS-2$
+						}
 
 						if (in != null) {
 							// pass URL to parser
-							urlStr = PROTOCOL + host[i] + ":" + port[i] //$NON-NLS-1$
-									+ path[i];
 							currentContributions = parser.parse(in, urlStr);
 							/*
 							 * Save previous contributed tocs to a temp variable
@@ -133,4 +144,17 @@ public class RemoteTocProvider extends AbstractTocProvider {
 		return new ITocContribution[0];
 	}
 
+	
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.help.AbstractTocProvider#getPriority()
+	 */
+	public int getPriority() {
+		
+		int helpOption=PreferenceFileHandler.getEmbeddedHelpOption();
+		
+		if(helpOption ==PreferenceFileHandler.LOCAL_HELP_ONLY || helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY)
+			return TOC_FILE_PRIORITY+1;
+		else return DEFAULT_PRIORITY-1;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
new file mode 100644
index 0000000..03b1475
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/CriteriaHelpScope.java
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.util.CriteriaUtilities;
+import org.eclipse.help.internal.criteria.CriteriaProviderRegistry;
+import org.eclipse.help.internal.criteria.CriterionResource;
+
+public class CriteriaHelpScope extends AbstractHelpScope {
+
+	private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
+
+	private CriterionResource[] criteriaScope;
+
+	public CriteriaHelpScope(CriterionResource[] criteriaScope) {
+		this.criteriaScope = criteriaScope;
+	}
+
+	public CriteriaHelpScope(List criteriaScope){
+		if(null == criteriaScope) {
+			this.criteriaScope = new CriterionResource[0];
+		} else {
+			this.criteriaScope = new CriterionResource[criteriaScope.size()];                                        		
+			criteriaScope.toArray(this.criteriaScope);
+		}
+	}
+	
+	public boolean inScope(IToc toc) {
+		if(null == toc){
+			if(null == criteriaScope || 0 == criteriaScope.length){
+				return true;
+			}
+			return false;
+		}
+		ICriteria[] criteriaOfToc = CriteriaProviderRegistry.getInstance().getAllCriteria(toc);
+		return isCriteriaInScope(criteriaOfToc);
+	}
+
+	public boolean inScope(ITopic topic) {
+		if(null == topic){
+			if(null == criteriaScope || 0 == criteriaScope.length){
+				return true;
+			}
+			return false;
+		}
+		ICriteria[] criteriaOfTopic = CriteriaProviderRegistry.getInstance().getAllCriteria(topic);
+		return isCriteriaInScope(criteriaOfTopic);
+	}
+
+	private boolean isCriteriaInScope(ICriteria[] criteriaOfTopic) {
+		if(null == criteriaScope){
+			return true;
+		}
+		Map ownCriteria = getCriteriaInfo(criteriaOfTopic);
+		Map scope = getCriteriaInfo(criteriaScope);
+		outer: for (Iterator keyIterator = scope.keySet().iterator(); keyIterator.hasNext();) {
+			String key = String.valueOf(keyIterator.next());
+			for (Iterator valueIterator = ((Set)scope.get(key)).iterator(); valueIterator.hasNext();) {
+				String value = String.valueOf(valueIterator.next());
+				if (value.equals(UNCATEGORIZED)) {
+					if (!ownCriteria.containsKey(key)) {
+						continue outer;						
+					}
+				} else {
+					if (null != ownCriteria.get(key) && ((Set)ownCriteria.get(key)).contains(value))
+						continue outer;					
+				}
+			}
+			return false;
+		}
+		return true;
+	}
+
+	private Map getCriteriaInfo(CriterionResource[] criteria) {
+		Map criteriaMap = new HashMap();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+		return criteriaMap;
+	}
+	
+	private Map getCriteriaInfo(ICriteria[] criteria) {
+		Map criteriaMap = new HashMap();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+	    return criteriaMap;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return hasInScopeChildren(entry);
+	}
+
+	public String getName(Locale locale) {
+		return null;
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java
new file mode 100644
index 0000000..6e0063a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/EnablementScope.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.base.HelpBaseResources;
+
+public class EnablementScope extends AbstractHelpScope {
+
+	public boolean inScope(IToc toc) {
+		return HelpBasePlugin.getActivitySupport().isEnabled(toc.getHref());
+	}
+
+	public boolean inScope(ITopic topic) {
+		return true;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return true;
+	}
+
+	public boolean inScope(IIndexSee see) {
+		return true;
+	}
+	
+	/**
+	 * @return the name for the system locale. This filter only applies to
+	 * the help system running in workbench mode so there is not need to
+	 * be able to return a name in any locale, just the current one.
+	 */
+	public String getName(Locale locale) {
+		return HelpBaseResources.EnabledTopicFilterName;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/FilterScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/FilterScope.java
new file mode 100644
index 0000000..a2d2845
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/FilterScope.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.HelpEvaluationContext;
+
+/**
+ * A scope which tests for content filtering
+ */
+
+public class FilterScope extends AbstractHelpScope {
+
+	public boolean inScope(IToc toc) {
+		if (!toc.isEnabled(HelpEvaluationContext.getContext())) {
+			return false;
+		}
+		return hasInScopeChildren(toc);
+	}
+
+	public boolean inScope(ITopic topic) {
+		if (!topic.isEnabled(HelpEvaluationContext.getContext())) {
+			return false;
+		}
+		if (topic.getHref() != null) {
+			return true;
+		}
+		return ScopeUtils.hasInScopeDescendent(topic, this);
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return entry.isEnabled(HelpEvaluationContext.getContext());
+	}
+
+	public boolean inScope(IIndexSee see) {
+		return see.isEnabled(HelpEvaluationContext.getContext());
+	}
+
+	public String getName(Locale locale) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java
new file mode 100644
index 0000000..e7d7d2e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/IntersectionScope.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+
+/**
+ * A scope which represents the intersection of two or more other scopes
+ * An element is in scope only if it is included in every scope passed to the constructor
+ */
+
+public class IntersectionScope extends AbstractHelpScope {
+	
+	AbstractHelpScope[] scopes;
+	
+	public IntersectionScope(AbstractHelpScope[] scopes) {
+		this.scopes = scopes;
+	}
+
+	public boolean inScope(IToc toc) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].inScope(toc)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public boolean inScope(ITopic topic) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].inScope(topic)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].inScope(entry)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public boolean inScope(IIndexSee see) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].inScope(see)) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public String getName(Locale locale) {
+		return null;
+	}
+	
+	public boolean isHierarchicalScope() {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].isHierarchicalScope()) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public String toString()
+	{
+		String str = "("; //$NON-NLS-1$
+		for (int s=0;s<scopes.length;s++)
+		{
+			str+=scopes[s];
+			if (s<scopes.length-1)
+				str+=' '+ScopeRegistry.SCOPE_AND+' ';
+		}
+		return str+')';
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java
new file mode 100644
index 0000000..c49d530
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeHandle.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import org.eclipse.help.base.AbstractHelpScope;
+
+public class ScopeHandle {
+	
+	private AbstractHelpScope scope;	
+	private String id;
+	
+	public ScopeHandle( String id, AbstractHelpScope scope) {
+		this.id = id;
+		this.scope = scope;
+	}
+
+	public AbstractHelpScope getScope() {
+		return scope;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
new file mode 100644
index 0000000..30583a2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeRegistry.java
@@ -0,0 +1,273 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Stack;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+
+public class ScopeRegistry {
+
+	public static final String SCOPE_XP_NAME = "org.eclipse.help.base.scope"; //$NON-NLS-1$
+	public static final String ENABLEMENT_SCOPE_ID = "org.eclipse.help.enablement"; //$NON-NLS-1$
+	public static final String SEARCH_SCOPE_SCOPE_ID = "org.eclipse.help.searchscope"; //$NON-NLS-1$
+
+	public static final String SCOPE_AND = "^"; //$NON-NLS-1$
+	public static final String SCOPE_OR = "|"; //$NON-NLS-1$
+
+	private static List scopes = null;
+	
+	private static ScopeRegistry instance;
+
+	private boolean initialized = false;
+	
+	private ScopeRegistry() {
+	}
+	
+	public static ScopeRegistry getInstance() {
+		if (instance == null) {
+			instance = new ScopeRegistry();
+		}
+		return instance;
+	}
+	
+	public AbstractHelpScope getScope(String id) {
+		if (id == null) {
+			return new UniversalScope();
+		}
+		readScopes();
+		// Lookup in scope registry
+		for (Iterator iter = scopes.iterator(); iter.hasNext();) {
+			ScopeHandle handle = (ScopeHandle) iter.next();
+			if (id.equals(handle.getId())) {
+				return handle.getScope();
+			}
+		}
+		return null;
+	}
+
+	synchronized private void readScopes() {
+		if (initialized ) {
+			return;
+		}	
+		scopes = new ArrayList();
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(SCOPE_XP_NAME);
+		for (int i = 0; i < elements.length; i++) {
+
+			Object obj = null;
+			try {
+				obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (CoreException e) {
+				HelpBasePlugin.logError("Create extension failed:[" //$NON-NLS-1$
+						+ SCOPE_XP_NAME + "].", e); //$NON-NLS-1$
+			}
+			if (obj instanceof AbstractHelpScope) {
+				String id = elements[i].getAttribute("id"); //$NON-NLS-1$
+				ScopeHandle filter = new ScopeHandle(id, (AbstractHelpScope) obj);
+				scopes.add(filter);
+			}
+		}
+		initialized = true;
+	}
+	
+	public ScopeHandle[] getScopes() {
+		readScopes();
+		return (ScopeHandle[]) scopes.toArray(new ScopeHandle[scopes.size()]);
+	}
+
+	/**
+	 * Parse logical sets of Scopes.  All phrases in the
+	 * array are intersected together
+	 * 
+	 * @param phrases
+	 * @return
+	 */
+	public AbstractHelpScope parseScopePhrases(String phrases[])
+	{
+		ArrayList scopes = new ArrayList();
+		
+		for (int p=0;p<phrases.length;p++)
+		{
+			AbstractHelpScope scope = parseScopePhrase(phrases[p]);
+			if (scope!=null)
+				scopes.add(scope);
+		}
+		
+		if (scopes.size()==0)
+			return null;
+		if (scopes.size()==1)
+			return (AbstractHelpScope)scopes.get(0);
+		return new IntersectionScope(
+				(AbstractHelpScope[])scopes.toArray(
+						new AbstractHelpScope[scopes.size()]));
+	}
+	
+	/**
+	 * Parse a logical phrase of scope names.  i.e.:
+	 * (A^B)|C
+	 * 
+	 * @param phrase
+	 * @return
+	 */
+	public AbstractHelpScope parseScopePhrase(String phrase)
+	{
+		if (!(phrase.startsWith("(") && !phrase.startsWith("("))) //$NON-NLS-1$ //$NON-NLS-2$
+			phrase = '('+phrase+')';
+		
+		Stack scopeStack = new Stack();
+		ScopePhrase scopePhrase = new ScopePhrase(phrase);
+		
+		String elem;
+		
+		while ((elem = scopePhrase.getNextElement())!=null)
+		{
+			if (elem.equals("(")) //$NON-NLS-1$
+			{
+				TempScope scope = new TempScope();
+				scope.setType(TempScope.SELF);
+				scopeStack.push(scope);
+			}
+			else if (elem.equals(")")) //$NON-NLS-1$
+			{
+				TempScope scope = (TempScope)scopeStack.pop();
+				if (scopeStack.isEmpty())
+					return scope.getScope();
+				else{
+					TempScope parent = (TempScope)scopeStack.peek();
+					parent.add(scope.getScope());
+				}
+			}
+			else if (elem.equals(SCOPE_AND))
+			{
+				TempScope scope = (TempScope)scopeStack.peek();
+				scope.setType(TempScope.INTERSECTION);
+			}
+			else if (elem.equals(SCOPE_OR))
+			{
+				TempScope scope = (TempScope)scopeStack.peek();
+				scope.setType(TempScope.UNION);
+			}
+			else
+			{
+				TempScope scope = (TempScope)scopeStack.peek();
+				AbstractHelpScope helpScope = getScope(elem);
+				if (helpScope!=null)
+					scope.add(helpScope);
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * A class used to parse a logical scope phrase, by
+	 * returning each part of the phrase as a separate element
+	 * 
+	 */
+	class ScopePhrase{
+		
+		private String phrase;
+		private int cursor;
+		
+		public ScopePhrase(String phrase)
+		{
+			this.phrase = phrase;
+			this.cursor = 0;
+		}
+		
+		public String getNextElement()
+		{
+			String next = ""; //$NON-NLS-1$
+			
+			for (;cursor<phrase.length();cursor++)
+			{
+				char current = phrase.charAt(cursor);
+				if (current=='(')
+					return format(next,current);
+				if (current==')')
+					return format(next,current);
+				if ((current+"").equals(SCOPE_AND)) //$NON-NLS-1$
+					return format(next,current);
+				if ((current+"").equals(SCOPE_OR)) //$NON-NLS-1$
+					return format(next,current);
+				next+=current;
+			}
+			if (next.equals("")) //$NON-NLS-1$
+				return null;
+			return next;
+		}
+		
+		private String format(String next,char current)
+		{
+			if (next.equals("")) //$NON-NLS-1$
+			{
+				cursor++;
+				return current+""; //$NON-NLS-1$
+			}
+			else
+				return next;
+		}
+	}
+
+	/**
+	 * A class used to contruct a logical AbstractHelpScope based
+	 * on one Scope, or a union/intersection of scopes.
+	 * 
+	 */
+	private class TempScope
+	{
+		public final static int SELF=0;
+		public final static int UNION=1;
+		public final static int INTERSECTION=2;
+		
+		private ArrayList kids = new ArrayList();
+		private int type;
+		
+		public void setType(int type)
+		{
+			this.type = type;
+		}
+		
+		public void add(AbstractHelpScope kid)
+		{
+			kids.add(kid);
+		}
+		
+		public AbstractHelpScope getScope()
+		{
+			switch (type){
+			case UNION:
+				return new UnionScope(
+						(AbstractHelpScope[])kids.toArray(
+								new AbstractHelpScope[kids.size()]));
+			case INTERSECTION:
+				return new IntersectionScope(
+						(AbstractHelpScope[])kids.toArray(
+								new AbstractHelpScope[kids.size()]));
+			default:
+				if (kids.size()>=1)
+					return (AbstractHelpScope)kids.get(0);
+				else
+					return null;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
new file mode 100644
index 0000000..75c0f97
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/ScopeUtils.java
@@ -0,0 +1,229 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexEntry2;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.IUAElement;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.UAElement;
+import org.eclipse.help.internal.index.Index;
+import org.eclipse.help.internal.index.IndexSee;
+
+/**
+ * Utilities to test for enabled topics, index entries etc. 
+ */
+
+public class ScopeUtils {
+	
+
+	/*
+	 * Function to determine whether a topic should be shown in the toc.
+	 * For hierarchical scopes the element itself must be in scope.
+	 * For non hierarchical scopes if any child is in scope the element should show.
+	 * A toc with no in scope topics does not display
+	 */
+	public static boolean showInTree(IToc toc, AbstractHelpScope scope) {
+		if (scope.isHierarchicalScope() && !scope.inScope(toc)) {
+			return false;
+		}
+		return hasInScopeDescendent(toc, scope);
+		
+	}
+
+	/*
+	 * Function to determine whether a topic should be shown in the toc.
+	 * For hierarchical scopes the element itself must be in scope.
+	 * For non hierarchical scopes if any child is in scope the element should show.
+	 * Leaf topics with no href do not show in the toc
+	 */
+	public static boolean showInTree(ITopic topic, AbstractHelpScope scope) {
+		if (scope.inScope(topic)) {
+			return (topic.getHref() != null) || hasInScopeDescendent(topic, scope);
+		}
+		return !scope.isHierarchicalScope() && hasInScopeDescendent(topic, scope);
+	}
+	
+	/*
+	 * Function to determine whether an entry should be shown in the index.
+	 * For hierarchical scopes the element itself must be in scope.
+	 * For non hierarchical scopes if any child is in scope the element should show.
+	 * An entry with no topic descendants does not display
+	 */
+	public static boolean showInTree(IIndexEntry entry, AbstractHelpScope scope) {
+		return (scope.inScope(entry) || !scope.isHierarchicalScope()) && hasInScopeDescendent(entry, scope);
+	}
+
+	/*
+	 * Returns true if one of the children meets the conditions
+	 * necessary to be shown in the Toc tree
+	 */
+	public static boolean hasInScopeDescendent(ITopic topic, AbstractHelpScope scope) {
+		ITopic[] subtopics = topic.getSubtopics();
+		for (int i = 0; i < subtopics.length; i++) {
+			if (showInTree(subtopics[i], scope)) {  
+				return true;
+			}
+		}
+		return false;
+    }
+	
+	/*
+	 * Returns true if one of the children meets the conditions
+	 * necessary to be shown in the Toc tree
+	 */
+	public static boolean hasInScopeDescendent(IToc toc, AbstractHelpScope scope) {
+		ITopic[] topics = toc.getTopics();
+		for (int i = 0; i < topics.length; i++) {
+			if (showInTree(topics[i], scope)) {  
+				return true;
+			}
+		}
+		return false;
+    }
+	
+	/*
+	 * Returns true if one of the children meets the conditions
+	 * necessary to be shown in the Index
+	 */
+	public static boolean hasInScopeDescendent(IIndexEntry entry,
+			AbstractHelpScope scope) {
+		ITopic[] topics = entry.getTopics();
+		for (int t = 0; t < topics.length; t++) {
+			if (showInTree(topics[t], scope)) {
+				return true;
+			}
+		}
+		IIndexEntry[] entries = entry.getSubentries();
+		for (int e = 0; e < entries.length; e++) {
+			if (showInTree(entries[e], scope)) {
+                return true;
+			}
+		}
+		if (entry instanceof IIndexEntry2) {
+			IIndexSee[] sees = ((IIndexEntry2)entry).getSees();
+			for (int s = 0; s < sees.length; s++) {
+				if (showInTree(sees[s], scope)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	public static boolean hasInScopeTarget(IIndexSee see, AbstractHelpScope scope) {
+		if (see instanceof IndexSee) {
+			IndexSee indexSee = (IndexSee)see;
+			UAElement ancestor = indexSee.getParentElement();
+			while (!(ancestor instanceof Index)) {
+				if (ancestor == null) {
+					return true;
+				}
+				ancestor = ancestor.getParentElement();
+			}
+			IIndexEntry target = ((Index)ancestor).getSeeTarget(indexSee);
+			if (target == null) {
+				return false;
+			}
+			return showInTree(target, scope);	
+		}
+		return false;
+	}
+	
+	public static boolean showInTree(IIndexSee see, AbstractHelpScope scope) {
+		if (scope.isHierarchicalScope() && !scope.inScope(see)) {
+			return false;
+		}
+		if (see instanceof IndexSee) {
+			IndexSee indexSee = (IndexSee)see;
+			UAElement ancestor = indexSee.getParentElement();
+			while (!(ancestor instanceof Index)) {
+				if (ancestor == null) {
+					return true;
+				}
+				ancestor = ancestor.getParentElement();
+			}
+			IIndexEntry target = ((Index)ancestor).getSeeTarget(indexSee);
+			if (target == null) {
+				return false;
+			}
+			return showInTree(target, scope);	
+		}
+		return false;
+	}
+
+	/**
+	 * Filter out any disabled entries from an array
+	 * @param entries an array of entries
+	 * @param scope 
+	 * @return an array containing only those entries which are enabled
+	 */
+	public static IIndexEntry[] inScopeEntries(IIndexEntry[] entries, AbstractHelpScope scope) {
+		for (int i=0;i<entries.length;++i) {
+			if (!scope.inScope(entries[i])) {
+				List list = new ArrayList(entries.length);
+				for (int j=0;j<entries.length;++j) {
+					if (j < i || scope.inScope(entries[j])) {
+						list.add(entries[j]);
+					}
+				}
+				return (IIndexEntry[])list.toArray(new IIndexEntry[list.size()]);
+			}
+		}
+		return entries;
+	}
+
+	/**
+	 * Filter out any disabled topics from an array
+	 * @param topics an array of topics
+	 * @param scope 
+	 * @return an array containing only those topics which are enabled
+	 */
+	public static ITopic[] inScopeTopics(ITopic[] topics, AbstractHelpScope scope) {
+		for (int i=0;i<topics.length;++i) {
+			if (!scope.inScope(topics[i])) {
+				List list = new ArrayList(topics.length);
+				for (int j=0;j<topics.length;++j) {
+					if (j < i || scope.inScope(topics[j])) {
+						list.add(topics[j]);
+					}
+				}
+				return (ITopic[])list.toArray(new ITopic[list.size()]);
+			}
+		}
+		return topics;
+	}
+
+	public static boolean hasInScopeChildren(IUAElement element,
+			AbstractHelpScope scope) {
+		if (element instanceof IToc) {
+			return hasInScopeDescendent((IToc)element, scope);
+		}
+		if (element instanceof ITopic) {
+			return hasInScopeDescendent((ITopic)element, scope);
+		}
+		if (element instanceof IIndexEntry) {
+			return hasInScopeDescendent((IIndexEntry) element, scope);
+		}
+		if (element instanceof IIndexSee) {
+			return hasInScopeTarget((IIndexSee) element, scope);
+		}
+		return false;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java
new file mode 100644
index 0000000..51577e4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/SearchScopeScope.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.HelpBaseResources;
+
+/**
+ * This is a dummy scope which is used by the UI to allow the user to turn on
+ * and off filtering by search scope. The inScope functions should never be called
+ */
+
+public class SearchScopeScope extends AbstractHelpScope {
+
+	public boolean inScope(IToc toc) {
+		return false;
+	}
+
+	public boolean inScope(ITopic topic) {
+		return false;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return false;
+	}
+
+	public boolean inScope(IIndexSee see) {
+		return false;
+	}
+	
+	/**
+	 * @return the name for the system locale. This filter only applies to
+	 * the help system running in workbench mode so there is not need to
+	 * be able to return a name in any locale, just the current one.
+	 */
+	public String getName(Locale locale) {
+		return HelpBaseResources.SearchScopeFilterName;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java
new file mode 100644
index 0000000..a29cc3f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UnionScope.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+
+/**
+ * A scope which represents the union of two or more other scopes
+ * An element is in scope if it is included in any scope passed to the constructor
+ */
+
+public class UnionScope extends AbstractHelpScope {
+	
+	AbstractHelpScope[] scopes;
+	
+	public UnionScope(AbstractHelpScope[] scopes) {
+		this.scopes = scopes;
+	}
+
+	public boolean inScope(IToc toc) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (scopes[scope].inScope(toc)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean inScope(ITopic topic) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (scopes[scope].inScope(topic)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (scopes[scope].inScope(entry)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean inScope(IIndexSee see) {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (scopes[scope].inScope(see)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public String getName(Locale locale) {
+		return null;
+	}
+	
+	public boolean isHierarchicalScope() {
+		for (int scope = 0; scope < scopes.length; scope ++) {
+			if (!scopes[scope].isHierarchicalScope()) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public String toString()
+	{
+		String str = "("; //$NON-NLS-1$
+		for (int s=0;s<scopes.length;s++)
+		{
+			str+=scopes[s];
+			if (s<scopes.length-1)
+				str+=' '+ScopeRegistry.SCOPE_OR+' ';
+		}
+		return str+')';
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UniversalScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UniversalScope.java
new file mode 100644
index 0000000..c3cf066
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/UniversalScope.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.Locale;
+
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+
+public class UniversalScope extends AbstractHelpScope {
+
+	public boolean inScope(IToc toc) {
+		return true;
+	}
+
+	public boolean inScope(ITopic topic) {
+		return true;
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return true;
+	}
+
+	public boolean inScope(IIndexSee see) {
+		return true;
+	}
+
+	public String getName(Locale locale) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
new file mode 100644
index 0000000..4d64163
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/scope/WorkingSetScope.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.scope;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.UAElement;
+import org.eclipse.help.internal.base.util.CriteriaUtilities;
+import org.eclipse.help.internal.criteria.CriteriaProviderRegistry;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.IHelpWorkingSetManager;
+import org.eclipse.help.internal.workingset.WorkingSet;
+
+public class WorkingSetScope extends AbstractHelpScope {
+	
+	private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
+	
+	private IHelpWorkingSetManager wSetManager;
+	private WorkingSet workingSet;
+	private AdaptableHelpResource[] elements;
+	private CriterionResource[] criteria;
+	private String name;
+	
+	public WorkingSetScope(String scope, IHelpWorkingSetManager manager, String name) {
+		wSetManager = manager;
+		workingSet = wSetManager.getWorkingSet(scope); 
+		elements = workingSet.getElements();
+		criteria = workingSet.getCriteria();
+		this.name = name;
+	}
+
+	public boolean inScope(IToc toc) {
+		if(HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+			return inContentScope(toc) && inCriteriaScope(toc);
+		} else {
+			return inContentScope(toc);
+		}
+	}
+	
+	private boolean inContentScope(IToc toc) {
+		for (int i = 0; i < elements.length; i++) {	
+			for (AdaptableHelpResource adaptable = elements[i]; adaptable != null; ) {
+				Object itoc = adaptable.getAdapter(IToc.class); 
+				if (toc == itoc) {
+					return true;	
+				}
+				IAdaptable parent= adaptable.getParent();
+				if (parent instanceof AdaptableHelpResource) {
+					adaptable = (AdaptableHelpResource) parent;
+				} else {
+				    adaptable = null;
+				}
+			}		
+		}
+		return false;
+	}
+	
+	private boolean inCriteriaScope(IToc toc) {
+		if(null == toc){
+			if(null == criteria || 0 == criteria.length){
+				return true;
+			}
+			return false;
+		}
+		ICriteria[] criteriaOfToc = CriteriaProviderRegistry.getInstance().getAllCriteria(toc);
+		return isCriteriaInScope(criteriaOfToc);
+	}
+	
+	private boolean isCriteriaInScope(ICriteria[] criteriaOfTopic) {
+		if(null ==criteria){
+			return true;
+		}
+		Map ownCriteria = getCriteriaInfo(criteriaOfTopic);
+		Map scope = getCriteriaInfo(criteria);
+		outer: for (Iterator keyIterator = scope.keySet().iterator(); keyIterator.hasNext();) {
+			String key = String.valueOf(keyIterator.next());
+			for (Iterator valueIterator = ((Set)scope.get(key)).iterator(); valueIterator.hasNext();) {
+				String value = String.valueOf(valueIterator.next());
+				if (value.equals(UNCATEGORIZED)) {
+					if (!ownCriteria.containsKey(key)) {
+						continue outer;						
+					}
+				} else {
+					if (null != ownCriteria.get(key) && ((Set)ownCriteria.get(key)).contains(value))
+						continue outer;					
+				}
+			}
+			return false;
+		}
+		return true;
+	}
+	
+	private Map getCriteriaInfo(CriterionResource[] criteria) {
+		Map criteriaMap = new HashMap();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+		return criteriaMap;
+	}
+	
+	private Map getCriteriaInfo(ICriteria[] criteria) {
+		Map criteriaMap = new HashMap();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+	    return criteriaMap;
+	}
+
+	public boolean inScope(ITopic topic) {
+		if(HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+			return inContentScope(topic) && inCriteriaScope(topic);
+		} else {
+			return inContentScope(topic);
+		}
+	}
+	
+	private boolean inContentScope(ITopic topic) {
+		Set topics = new HashSet();
+		IToc toc = null;
+		topics.add(topic);
+		if (topic instanceof UAElement) {
+			for (UAElement uae = (UAElement) topic; uae != null; ) {
+				if (uae instanceof IToc)  {
+					toc = (IToc) uae;
+					uae = null;
+				} else if (uae instanceof IIndexEntry) {
+					for (int i = 0; i < elements.length; i++) {
+						AdaptableHelpResource adaptable = elements[i];
+						if (adaptable.getTopic(topic.getHref()) != null) {
+							return true;
+						}
+					}
+					return false;
+				} else {					
+					if (uae instanceof ITopic) {
+					    topics.add(uae);
+					}
+					uae = uae.getParentElement();
+				}
+			}
+		}
+		for (int i = 0; i < elements.length; i++) {
+			AdaptableHelpResource adaptable = elements[i];
+			if (toc != null) {
+				Object itoc = adaptable.getAdapter(IToc.class);
+				if (toc == itoc) {
+					return true;
+				}
+			}
+			Object itopic = adaptable.getAdapter(ITopic.class);
+			if (topic != null && topics.contains(itopic)) {
+				return true;
+			}
+			IAdaptable parent = adaptable.getParent();
+			if (parent instanceof AdaptableHelpResource) {
+				adaptable = (AdaptableHelpResource) parent;
+			} else {
+				adaptable = null;
+			}
+		}
+		return false;
+	}
+	
+	private boolean inCriteriaScope(ITopic topic) {
+		if(null == topic){
+			if(null == criteria || 0 == criteria.length){
+				return true;
+			}
+			return false;
+		}
+		ICriteria[] criteriaOfTopic = CriteriaProviderRegistry.getInstance().getAllCriteria(topic);
+		return isCriteriaInScope(criteriaOfTopic);
+	}
+
+	public boolean inScope(IIndexEntry entry) {
+		return hasInScopeChildren(entry);
+	}
+
+	public boolean inScope(IIndexSee see) {
+		return hasInScopeChildren(see);
+	}
+
+	public String getName(Locale locale) {
+		return name;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
new file mode 100644
index 0000000..82a9968
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/CriteriaUtilities.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.util;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.internal.criteria.CriterionResource;
+
+public class CriteriaUtilities {
+	
+    public static List getCriteriaValues(String rawValues) {
+    	List result = new ArrayList();
+    	if (rawValues != null) {
+    		String[] values = rawValues.split(","); //$NON-NLS-1$
+    		for(int j = 0; j < values.length; ++j){
+    			String value = values[j].trim();
+    			if (value.length() > 0) {
+    				result.add(value);
+    			}
+    		}
+    	}
+		return result;
+    }
+    
+    public static void addCriteriaToMap(Map map, ICriteria[] criteria) {
+    	for (int i = 0; i < criteria.length; ++i) {
+			ICriteria criterion = criteria[i];
+			String name = criterion.getName();
+			List values = CriteriaUtilities.getCriteriaValues(criterion.getValue());
+			if (name != null && name.length() > 0 && values.size() > 0) {
+				name = name.toLowerCase();
+				Set existingValueSet = (Set) map.get(name);
+				if (null == existingValueSet) {
+					existingValueSet = new HashSet();
+				}
+				existingValueSet.addAll(values);
+				map.put(name, existingValueSet);
+			}		
+		}
+    }
+    
+    public static void addCriteriaToMap(Map map, CriterionResource[] criteria) {
+    	for(int i = 0; i < criteria.length; ++ i){
+			CriterionResource criterion = criteria[i];
+			String criterionName = criterion.getCriterionName();
+			List criterionValues = criterion.getCriterionValues();
+			
+			Set existedValueSet = (Set)map.get(criterionName);
+			if (null == existedValueSet)
+				existedValueSet = new HashSet();
+			existedValueSet.addAll(criterionValues);
+			map.put(criterionName, existedValueSet);
+		}
+    }
+    
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
new file mode 100644
index 0000000..d8be1b6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/base/util/IndexUtils.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.base.util;
+
+import org.eclipse.help.IIndex;
+import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IIndexSubpath;
+import org.eclipse.help.IUAElement;
+import org.eclipse.help.internal.UAElement;
+
+public class IndexUtils {
+	
+	/**
+	 * Return a path representing all of the elements in the path of the see target
+	 * For example if the see targets Eclipse / PDE the result will be an array
+	 * of length 2 containing the entries for Eclipse and for PDE in that order
+	 * @param index The index containing this see element or null to discover the index
+	 * in this routine.
+	 */
+	public static IIndexEntry[] findSeeTargets(IUAElement index, IIndexSee see, int depth) {
+		if (index == null && see instanceof UAElement) {
+			UAElement ancestor = ((UAElement)see).getParentElement();
+			while (!(ancestor instanceof IIndex)) {
+				if (ancestor == null) {
+					return new IIndexEntry[0];
+				}
+				ancestor = ancestor.getParentElement();
+			}
+			index = ancestor;
+		}
+		String[] path = getPath(see);
+		IUAElement[] children = index.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			if (children[i] instanceof IIndexEntry) {
+				IIndexEntry indexEntry = (IIndexEntry)children[i];
+				String entryKeyword = indexEntry.getKeyword();
+				if (path[depth].equals(entryKeyword)) {
+					if (path.length == depth + 1) {
+					    return new IIndexEntry[] { indexEntry };
+					} 
+					IIndexEntry[] targets = findSeeTargets(indexEntry, see, depth + 1);
+					IIndexEntry[] result = new IIndexEntry[targets.length + 1];
+					result[0] = indexEntry;
+					System.arraycopy(targets, 0, result, 1, targets.length);
+					return result;
+				}
+			}
+		}
+		return new IIndexEntry[0];
+	}
+	
+	public static String[] getPath(IIndexSee see) {
+		IIndexSubpath[] subpaths = see.getSubpathElements();
+		String[] result = new String[1 + subpaths.length];
+		result[0] = see.getKeyword();
+		for (int i = 0; i < subpaths.length; i++) {
+			result[i + 1] = subpaths[i].getKeyword();
+		}
+		return result;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
index e0f22b2..c32cc60 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLConnection.java
@@ -1,6 +1,7 @@
-/***************************************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
@@ -9,13 +10,16 @@
  *******************************************************************************/
 package org.eclipse.help.internal.protocols;
 
+import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.Locale;
 import java.util.StringTokenizer;
 import java.util.Vector;
@@ -26,6 +30,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.base.remote.HttpsUtility;
 import org.eclipse.help.internal.base.remote.PreferenceFileHandler;
 import org.eclipse.help.internal.base.remote.RemoteContentLocator;
 import org.eclipse.help.internal.base.remote.RemoteHelp;
@@ -42,6 +47,10 @@ public class HelpURLConnection extends URLConnection {
 	private final static String PRODUCT_PLUGIN = "PRODUCT_PLUGIN"; //$NON-NLS-1$
 	public final static String PLUGINS_ROOT = "PLUGINS_ROOT/"; //$NON-NLS-1$
 	private final static String PATH_RTOPIC = "/rtopic"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
+	
+	private static Hashtable templates = new Hashtable();
+	
 	// document caching - disabled if running in dev mode
 	protected static boolean cachingEnabled = true;
 	static {
@@ -62,13 +71,18 @@ public class HelpURLConnection extends URLConnection {
 	protected String file;
 	protected String locale;
 	private static String appserverImplPluginId;
+	private boolean localOnly;
 
 	/**
 	 * Constructor for HelpURLConnection
 	 */
 	public HelpURLConnection(URL url) {
+		this(url, false);
+	}
+	
+	public HelpURLConnection(URL url, boolean localOnly) {
 		super(url);
-
+        this.localOnly = localOnly;
 		String urlFile = url.getFile();
 
 		// Strip off everything before and including the PLUGINS_ROOT
@@ -108,27 +122,24 @@ public class HelpURLConnection extends URLConnection {
 			throw new IOException("Resource not found."); //$NON-NLS-1$
 		}
 
-		if (getFile() == null || "".equals(getFile())) { //$NON-NLS-1$
+		if (getFile() == null || "".equals(getFile()) || getFile().indexOf("..\\") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
 			throw new IOException("Resource not found."); //$NON-NLS-1$
 		}
 
+		int helpOption=localOnly ? PreferenceFileHandler.LOCAL_HELP_ONLY 
+			: PreferenceFileHandler.getEmbeddedHelpOption();
 		InputStream in = null;
-		if (plugin != null) {
-			// first try using content provider, then try to find the file
-			// inside doc.zip, and finally try the file system
-			in = ResourceLocator.openFromProducer(plugin,
-					query == null ? getFile() : getFile() + "?" + query, //$NON-NLS-1$
-					getLocale());
-
-			if (in == null) {
-				in = ResourceLocator.openFromZip(plugin, "doc.zip", //$NON-NLS-1$
-						getFile(), getLocale());
-			}
-			if (in == null) {
-				in = ResourceLocator.openFromPlugin(plugin, getFile(), getLocale());
-			}
-		} else {
-			in = openFromRemoteServer(getHref(), getLocale());
+		if (plugin != null && (helpOption==PreferenceFileHandler.LOCAL_HELP_ONLY || helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY)) {
+			in = getLocalHelp(plugin);
+		} 
+        if (in == null && (helpOption==PreferenceFileHandler.LOCAL_HELP_PRIORITY || helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY)) { 
+			
+        	in = openFromRemoteServer(getHref(), getLocale());
+        	
+        	if(in==null && plugin!=null && helpOption==PreferenceFileHandler.REMOTE_HELP_PRIORITY) 
+        	{
+        		in = getLocalHelp(plugin);
+        	}
 		}
 		if (in == null) {
 			throw new IOException("Resource not found."); //$NON-NLS-1$
@@ -136,6 +147,24 @@ public class HelpURLConnection extends URLConnection {
 		return in;
 	}
 
+	private InputStream getLocalHelp(Bundle plugin) {
+		InputStream in;
+		// first try using content provider, then try to find the file
+		// inside doc.zip, and finally try the file system
+		in = ResourceLocator.openFromProducer(plugin,
+				query == null ? getFile() : getFile() + "?" + query, //$NON-NLS-1$
+				getLocale());
+
+		if (in == null) {
+			in = ResourceLocator.openFromZip(plugin, "doc.zip", //$NON-NLS-1$
+					getFile(), getLocale());
+		}
+		if (in == null) {
+			in = ResourceLocator.openFromPlugin(plugin, getFile(), getLocale());
+		}
+		return in;
+	}
+
 	public long getExpiration() {
 		return isCacheable() ? new Date().getTime() + 10000 : 0;
 	}
@@ -366,24 +395,121 @@ public class HelpURLConnection extends URLConnection {
 		}
 		return null;
 	}
-
-	private InputStream openRemoteStream(String remoteURL, String pathSuffix)  {
+	
+	private InputStream getUnverifiedStream(String remoteURL,String pathSuffix)
+	{
 		URL url;
 		InputStream in = null;
 		try {
-			url = new URL(remoteURL + pathSuffix);
-			HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-			in = connection.getInputStream();
+			
+			if(remoteURL.startsWith(PROTOCOL_HTTP))
+			{
+				url = new URL(remoteURL + pathSuffix);
+				HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+				in = connection.getInputStream();
+			}
+			else
+			{
+				url = HttpsUtility.getHttpsURL(remoteURL + pathSuffix);
+				in = HttpsUtility.getHttpsStream(url);
+			}
+			
 		} catch (Exception e) {
 			// File not found on this server
 		}
 		return in;
 	}
+	
+
+	private InputStream openRemoteStream(String remoteURL, String pathSuffix)  {
+		InputStream in = getUnverifiedStream(remoteURL,pathSuffix);	
+
+		String errPage[] = (String[])templates.get(remoteURL);
+		if (errPage==null)
+		{
+			String error = getPageText(getUnverifiedStream(remoteURL,"/rtopic/fakeurltogetatestpage/_ACEGIKMOQ246.html")); //$NON-NLS-1$
+			if (error!=null)
+			{
+				errPage = error.split("\n"); //$NON-NLS-1$
+				templates.put(remoteURL,errPage);
+			}
+			else
+			{
+				errPage = new String[0];
+				templates.put(remoteURL,errPage);
+			}
+		}
+
+		
+		// No error page, InfoCenter is at least 3.6, so it is
+		// returning null already.
+		if (errPage.length==0)
+			return in;
+		
+		// Check to see if the URL is the error page for the 
+		// remote IC.  If so, return null.
+		if (compare(errPage,getUnverifiedStream(remoteURL,pathSuffix)))
+		{
+			try{
+				in.close();
+			}catch(Exception ex){}
+			return null;
+		}
+		return in;
+	}
+	
+	private boolean compare(String lines[],InputStream in)
+	{
+		try{
+			if (in!=null)
+			{
+				BufferedReader br = new BufferedReader(new InputStreamReader(in));
+				String line;
+				int count = 0;
+				
+				while ((line = br.readLine())!=null)
+				{
+					if (count>lines.length)
+						return false;
+					
+					if (!lines[count].equals(line))
+						return false;
+					count++;
+				}
+				br.close();
+				in.close();
+				return true;
+			}
+		}catch(Exception ex)
+		{}
+		return false;
+	}
+	
+	private String getPageText(InputStream in) {
+		try{
+			if (in!=null)
+			{
+				BufferedReader br = new BufferedReader(new InputStreamReader(in));
+				String line,result=""; //$NON-NLS-1$
+				
+				while ((line = br.readLine())!=null)
+				{
+					result+=line+'\n';
+				}
+				br.close();
+				in.close();
+				return result;
+			}
+		}catch(Exception ex){}
+		
+		return null;
+	}
 
 	private InputStream tryOpeningAllServers(String pathSuffix) {
 		PreferenceFileHandler prefHandler = new PreferenceFileHandler();
 		String host[] = prefHandler.getHostEntries();
 		String port[] = prefHandler.getPortEntries();
+		String protocol[] = prefHandler.getProtocolEntries();
 		String path[] = prefHandler.getPathEntries();
 		String isEnabled[] = prefHandler.isEnabled();
 
@@ -391,8 +517,7 @@ public class HelpURLConnection extends URLConnection {
 
 		for (int i = 0; i < numICs; i++) {
 			if (isEnabled[i].equalsIgnoreCase("true")) { //$NON-NLS-1$		
-				String urlStr = "http://" + host[i] + ':' + port[i] //$NON-NLS-1$
-						+ path[i];
+				String urlStr = protocol[i]+"://" + host[i] + ':' + port[i] + path[i]; //$NON-NLS-1$
 				InputStream is = openRemoteStream(urlStr, pathSuffix);
 				if (is != null) {
 					return is;
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
index 34bf6e8..1ff3019 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/protocols/HelpURLStreamHandler.java
@@ -26,9 +26,12 @@ public class HelpURLStreamHandler extends URLStreamHandler {
 		String protocol = url.getProtocol();
 		if (protocol.equals("help")) { //$NON-NLS-1$
 			return new HelpURLConnection(url);
+		} else if (protocol.equals("localhelp")) { //$NON-NLS-1$
+			return new HelpURLConnection(url, true);
 		}
 		return null;
 	}
+	
 	public static URLStreamHandler getDefault() {
 		if (instance == null) {
 			instance = new HelpURLStreamHandler();
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
index 729dc5f..def26f9 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/HTMLSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,19 +14,18 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.content.IContentDescriber;
 import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.xhtml.XHTMLContentDescriber;
-import org.eclipse.help.search.ISearchIndex;
-import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.IHelpSearchIndex;
+import org.eclipse.help.search.ISearchDocument;
+import org.eclipse.help.search.SearchParticipant;
 
 
-public class HTMLSearchParticipant extends LuceneSearchParticipant {
+public class HTMLSearchParticipant extends SearchParticipant {
 
 	private static final String HELP_BASE_XHTML = "org.eclipse.help.base.xhtml"; //$NON-NLS-1$
 	private HTMLDocParser parser;
@@ -39,16 +38,17 @@ public class HTMLSearchParticipant extends LuceneSearchParticipant {
 		this.indexPath = indexPath;
 	}
 
-	public IStatus addDocument(ISearchIndex index, String pluginId, String name, URL url, String id,
-			Document doc) {
+
+	public IStatus addDocument(IHelpSearchIndex index, String pluginId, String name, URL url, String id,
+			ISearchDocument doc) {
 		// if it's XHTML, forward it on to the proper search participant
 		if (isXHTML(pluginId, url)) {
 			LocalSearchManager manager = BaseHelpSystem.getLocalSearchManager();
-			LuceneSearchParticipant participant  = manager.getParticipant(HELP_BASE_XHTML); 
+			SearchParticipant participant  = manager.getParticipant(HELP_BASE_XHTML); 
 			if (participant == null) {
 				participant = getXhtmlParticipant();
 			}
-			return participant.addDocument(index, pluginId, name, url, id, doc);
+			return participant.addDocument((IHelpSearchIndex) index, pluginId, name, url, id, doc);
 		}
 		// otherwise, treat it as HTML
 		else {		
@@ -62,13 +62,10 @@ public class HTMLSearchParticipant extends LuceneSearchParticipant {
 										+ name + " cannot be opened.", //$NON-NLS-1$
 								null);
 					}
-					doc.add(new Field("contents", parser.getContentReader())); //$NON-NLS-1$
-					doc.add(new Field("exact_contents", parser.getContentReader())); //$NON-NLS-1$
+					doc.addContents(parser.getContentReader(), parser.getContentReader()); 
 					String title = parser.getTitle();
-					doc.add(new Field("title", title, Field.Store.NO, Field.Index.TOKENIZED)); //$NON-NLS-1$
-					doc.add(new Field("exact_title", title, Field.Store.NO, Field.Index.TOKENIZED)); //$NON-NLS-1$
-					doc.add(new Field("raw_title", title, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
-					doc.add(new Field("summary", parser.getSummary(title), Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
+					doc.setTitle(title);
+					doc.setSummary(parser.getSummary(title)); 
 					if (parser.getException() != null) {
 						return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR,
 								"Parse error occurred while adding document " + name //$NON-NLS-1$
@@ -88,7 +85,7 @@ public class HTMLSearchParticipant extends LuceneSearchParticipant {
 		}
 	}
 	
-	private XHTMLSearchParticipant getXhtmlParticipant() {
+	private SearchParticipant getXhtmlParticipant() {
 		if (xhtmlParticipant == null) {
 			xhtmlParticipant = new XHTMLSearchParticipant();
 		}
@@ -124,4 +121,5 @@ public class HTMLSearchParticipant extends LuceneSearchParticipant {
 
 		return false;
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
index 7862049..9cef5e7 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/ISearchHitCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,4 +23,13 @@ public interface ISearchHitCollector {
 	 * @param hits the List of raw hits
 	 */
 	public void addHits(List hits, String wordsSearched);
+	
+	/**
+	 * An exception occurred in the search. Implementing subclasses should either
+	 * rethrow the exception or save a local copy and test for it later.
+	 * @param exception
+	 * @throws QueryTooComplexException
+	 */
+	public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException;
 }
+
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
index 55a2765..0340dbd 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,7 @@ import org.eclipse.help.internal.base.util.HelpProperties;
 import org.eclipse.help.internal.protocols.HelpURLConnection;
 import org.eclipse.help.internal.toc.Toc;
 import org.eclipse.help.internal.toc.TocFileProvider;
-import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.SearchParticipant;
 
 /**
  * Indexing Operation represents a long operation, which performs indexing of
@@ -372,7 +372,7 @@ class IndexingOperation {
 			}
 		}
 		//Add documents from global search participants
-		LuceneSearchParticipant[] participants = BaseHelpSystem.getLocalSearchManager().getGlobalParticipants();
+		SearchParticipant[] participants = BaseHelpSystem.getLocalSearchManager().getGlobalParticipants();
 		for (int j=0; j<participants.length; j++) {
 			String participantId;
 			try {
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
index 438c9fb..5f745c9 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LocalSearchManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,7 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.search.IndexingOperation.IndexingException;
 import org.eclipse.help.internal.util.URLCoder;
 import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.SearchParticipant;
 import org.osgi.framework.Bundle;
 
 /*
@@ -46,7 +47,8 @@ import org.osgi.framework.Bundle;
  */
 public class LocalSearchManager {
 
-	private static final String SEARCH_PARTICIPANT_XP_FULLNAME = "org.eclipse.help.base.luceneSearchParticipants"; //$NON-NLS-1$
+	private static final String LUCENE_SEARCH_PARTICIPANT_XP_FULLNAME = "org.eclipse.help.base.luceneSearchParticipants"; //$NON-NLS-1$
+	private static final String SEARCH_PARTICIPANT_XP_FULLNAME = "org.eclipse.help.base.searchParticipant"; //$NON-NLS-1$
 	private static final String SEARCH_PARTICIPANT_XP_NAME = "searchParticipant"; //$NON-NLS-1$
 	private static final String BINDING_XP_NAME = "binding"; //$NON-NLS-1$
 	private static final Object PARTICIPANTS_NOT_FOUND = new Object();
@@ -59,7 +61,7 @@ public class LocalSearchManager {
 	private static class ParticipantDescriptor implements IHelpResource {
 
 		private IConfigurationElement element;
-		private LuceneSearchParticipant participant;
+		private SearchParticipant participant;
 
 		public ParticipantDescriptor(IConfigurationElement element) {
 			this.element = element;
@@ -86,12 +88,16 @@ public class LocalSearchManager {
 			return this;
 		}
 
-		public LuceneSearchParticipant getParticipant() {
+		public SearchParticipant getParticipant() {
 			if (participant == null) {
 				try {
 					Object obj = element.createExecutableExtension("participant"); //$NON-NLS-1$
-					if (obj instanceof LuceneSearchParticipant) {
-						participant = (LuceneSearchParticipant) obj;
+					if (obj instanceof SearchParticipant) {
+						participant = (SearchParticipant)obj;
+						participant.init(getId());
+					} else if (obj instanceof LuceneSearchParticipant) {
+						LuceneSearchParticipant luceneParticipant = (LuceneSearchParticipant) obj;
+						participant = new LuceneSearchParticipantAdapter(luceneParticipant);
 						participant.init(getId());
 					}
 				} catch (Throwable t) {
@@ -259,7 +265,7 @@ public class LocalSearchManager {
 		return pluginId;
 	}
 
-	public LuceneSearchParticipant getGlobalParticipant(String participantId) {
+	public SearchParticipant getGlobalParticipant(String participantId) {
 		ParticipantDescriptor desc = getGlobalParticipantDescriptor(participantId);
 		return desc != null ? desc.getParticipant() : null;
 	}
@@ -294,7 +300,7 @@ public class LocalSearchManager {
 	 * @param participantId the participant's unique id
 	 * @return the participant with the given id
 	 */
-	public LuceneSearchParticipant getParticipant(String participantId) {
+	public SearchParticipant getParticipant(String participantId) {
 		ParticipantDescriptor desc = (ParticipantDescriptor)searchParticipantsById.get(participantId);
 		if (desc != null) {
 			return desc.getParticipant();
@@ -310,7 +316,7 @@ public class LocalSearchManager {
 	 * @return
 	 */
 
-	public LuceneSearchParticipant getParticipant(String pluginId, String fileName) {
+	public SearchParticipant getParticipant(String pluginId, String fileName) {
 		ArrayList list = getParticipantDescriptors(pluginId);
 		if (list == null)
 			return null;
@@ -354,16 +360,10 @@ public class LocalSearchManager {
 
 	public Set getPluginsWithSearchParticipants() {
 		HashSet set = new HashSet();
-		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
-				SEARCH_PARTICIPANT_XP_FULLNAME);
-
-		for (int i = 0; i < elements.length; i++) {
-			IConfigurationElement element = elements[i];
-			if (element.getName().equals("binding") || element.getName().equals("searchParticipant"))  //$NON-NLS-1$//$NON-NLS-2$
-				set.add(element.getContributor().getName());
-		}
+		addSearchBindings(set);
+		addLuceneSearchBindings(set);
 		// must ask global search participants directly
-		LuceneSearchParticipant[] gps = getGlobalParticipants();
+	    SearchParticipant[] gps = getGlobalParticipants();
 		for (int i = 0; i < gps.length; i++) {
 			Set ids;
 			try {
@@ -378,6 +378,28 @@ public class LocalSearchManager {
 		return set;
 	}
 
+	private void addSearchBindings(HashSet set) {
+		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+				SEARCH_PARTICIPANT_XP_FULLNAME);
+
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement element = elements[i];
+			if (element.getName().equals("binding") || element.getName().equals("searchParticipant"))  //$NON-NLS-1$//$NON-NLS-2$
+				set.add(element.getContributor().getName());
+		}
+	}
+	
+	private void addLuceneSearchBindings(HashSet set) {
+		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+				LUCENE_SEARCH_PARTICIPANT_XP_FULLNAME);
+
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement element = elements[i];
+			if (element.getName().equals("binding") || element.getName().equals("searchParticipant"))  //$NON-NLS-1$//$NON-NLS-2$
+				set.add(element.getContributor().getName());
+		}
+	}
+
 	/**
 	 * Loops through all the loaded search participants and notifies them that they can drop the
 	 * cached data to reduce runtime memory footprint.
@@ -391,12 +413,15 @@ public class LocalSearchManager {
 	}
 
 	private ArrayList createSearchParticipants(String pluginId) {
-		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
-				SEARCH_PARTICIPANT_XP_FULLNAME);
-		if (elements.length == 0)
-			return null;
 		ArrayList list = null;
+		list = getBindingsForPlugin(pluginId, list, SEARCH_PARTICIPANT_XP_FULLNAME);
+		list = getBindingsForPlugin(pluginId, list, LUCENE_SEARCH_PARTICIPANT_XP_FULLNAME);
+		return list;
+	}
 
+	private ArrayList getBindingsForPlugin(String pluginId, ArrayList list, String extensionPointName) {
+		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+				extensionPointName);
 		ArrayList binding = null;
 		for (int i = 0; i < elements.length; i++) {
 			IConfigurationElement element = elements[i];
@@ -410,10 +435,10 @@ public class LocalSearchManager {
 					IConfigurationElement rel = elements[j];
 					if (!rel.getName().equals("searchParticipant")) //$NON-NLS-1$
 						continue;
+					String id = rel.getAttribute("id"); //$NON-NLS-1$
 					// don't allow binding the global participants
 					if (rel.getAttribute("extensions") == null) //$NON-NLS-1$
 						continue;
-					String id = rel.getAttribute("id"); //$NON-NLS-1$
 					if (id != null && id.equals(refId)) {
 						// match
 						if (binding == null)
@@ -463,7 +488,7 @@ public class LocalSearchManager {
 				for (int j = 0; j < participants.size(); j++) {
 					ParticipantDescriptor desc = (ParticipantDescriptor) participants.get(j);
 					if (desc.contains(refEl)) {
-						// found the matching rescriptor - add it to the list
+						// found the matching descriptor - add it to the list
 						if (list == null)
 							list = new ArrayList();
 						list.add(desc);
@@ -489,22 +514,27 @@ public class LocalSearchManager {
 	 * @return an array of the global search participants.
 	 */
 
-	public LuceneSearchParticipant[] getGlobalParticipants() {
+	public SearchParticipant[] getGlobalParticipants() {
 		if (globalSearchParticipants == null) {
 			createGlobalSearchParticipants();
 		}
 		ArrayList result = new ArrayList();
 		for (int i = 0; i < globalSearchParticipants.size(); i++) {
 			ParticipantDescriptor desc = (ParticipantDescriptor) globalSearchParticipants.get(i);
-			LuceneSearchParticipant p = desc.getParticipant();
+			SearchParticipant p = desc.getParticipant();
 			if (p != null)
 				result.add(p);
 		}
-		return (LuceneSearchParticipant[]) result.toArray(new LuceneSearchParticipant[result.size()]);
+		return (SearchParticipant[]) result.toArray(new SearchParticipant[result.size()]);
 	}
 
 	private void createGlobalSearchParticipants() {
 		globalSearchParticipants = new ArrayList();
+		addSearchParticipants();
+		addLuceneSearchParticipants();
+	}
+	
+	private void addSearchParticipants() {
 		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
 				SEARCH_PARTICIPANT_XP_FULLNAME);
 		for (int i = 0; i < elements.length; i++) {
@@ -520,6 +550,22 @@ public class LocalSearchManager {
 		}
 	}
 
+	private void addLuceneSearchParticipants() {
+		IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+				LUCENE_SEARCH_PARTICIPANT_XP_FULLNAME);
+		for (int i = 0; i < elements.length; i++) {
+			IConfigurationElement element = elements[i];
+			if (!element.getName().equals(SEARCH_PARTICIPANT_XP_NAME))
+				continue;
+			if (element.getAttribute("extensions") != null) //$NON-NLS-1$
+				continue;
+			if (!isParticipantEnabled(String.valueOf(true).equals(element.getAttribute("headless")))) //$NON-NLS-1$
+				continue;
+			ParticipantDescriptor desc = new ParticipantDescriptor(element);
+			globalSearchParticipants.add(desc);
+		}
+	}
+
 	private ArrayList getParticipantDescriptors(String pluginId) {
 		Object result = searchParticipantsByPlugin.get(pluginId);
 		if (result == null) {
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java
new file mode 100644
index 0000000..beee870
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchDocument.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.search;
+
+import java.io.Reader;
+import java.io.StringReader;
+
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
+import org.eclipse.help.search.ISearchDocument;
+
+/**
+ * Class which adapts a Lucene Document to ISearchDocument. 
+ */
+
+public class LuceneSearchDocument implements ISearchDocument {
+		
+	private Document doc;
+
+	public LuceneSearchDocument(Document document) {
+		this.doc = document;
+	}
+
+	public void setTitle(String title) {
+		doc.add(new Field("title", title, Field.Store.NO, Field.Index.TOKENIZED)); //$NON-NLS-1$
+		doc.add(new Field("exact_title", title, Field.Store.NO, Field.Index.TOKENIZED)); //$NON-NLS-1$
+		doc.add(new Field("raw_title", title, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$
+	}
+
+	public void setSummary(String summary) {
+	  	doc.add(new Field("summary", summary, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$				        
+	}
+
+	public void addContents(String contents) {
+		doc.add(new Field("contents", new StringReader(contents))); //$NON-NLS-1$
+		doc.add(new Field("exact_contents", new StringReader(contents))); //$NON-NLS-1$		
+	}
+
+	public void setHasFilters(boolean hasFilters) {
+		doc.add(new Field("filters", Boolean.toString(hasFilters), Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$ 	
+	}
+	
+	public Document getDocument() {
+		return doc;
+	}
+
+	public void addContents(Reader contents, Reader exactContents) {
+		doc.add(new Field("contents", contents)); //$NON-NLS-1$
+		doc.add(new Field("exact_contents", exactContents)); //$NON-NLS-1$
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java
new file mode 100644
index 0000000..d29e35f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/LuceneSearchParticipantAdapter.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.search;
+
+/**
+ * Adapts a LuceneSearchParticipant to SearchParticipant. This allows
+ * the deprecated extension point org.eclipse.help.base.luceneSearchParticipants
+ * to continue to function even though the rest of the help system has
+ * switched to use the class SearchParticipant instead of LuceneSearchParticipant
+ */
+
+import java.net.URL;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.help.search.IHelpSearchIndex;
+import org.eclipse.help.search.ISearchDocument;
+import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.SearchParticipant;
+
+public class LuceneSearchParticipantAdapter extends SearchParticipant {
+		
+	private LuceneSearchParticipant searchParticipant;
+
+	public LuceneSearchParticipantAdapter(LuceneSearchParticipant participant) {
+		this.searchParticipant = participant;
+	}
+
+	public IStatus addDocument(IHelpSearchIndex index, String pluginId, String name, URL url, String id,
+			ISearchDocument doc) {
+		// In the help system the only class that implements ISearchDocument is LuceneSearchDocument
+		// and the only class that implements IHelpSearchIndex is SearchIndex
+		LuceneSearchDocument luceneDoc = (LuceneSearchDocument)doc;
+		SearchIndex searchIndex = (SearchIndex) index;
+		return searchParticipant.addDocument(searchIndex, pluginId, name, url, id, luceneDoc.getDocument());
+	}
+	
+	public Set getAllDocuments(String locale) {
+		return searchParticipant.getAllDocuments(locale);
+	}
+	
+	public void clear() {
+		searchParticipant.clear();
+	}
+	
+	public boolean equals(Object obj) {
+		return searchParticipant.equals(obj);
+	}
+	
+	public Set getContributingPlugins() {
+		return searchParticipant.getContributingPlugins();
+	}
+	
+	public int hashCode() {
+		return searchParticipant.hashCode();
+	}
+	
+	public boolean open(String id) {
+		return searchParticipant.open(id);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
index 85a6137..fb299c7 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,8 +60,10 @@ import org.eclipse.help.internal.protocols.HelpURLStreamHandler;
 import org.eclipse.help.internal.toc.TocFileProvider;
 import org.eclipse.help.internal.toc.TocManager;
 import org.eclipse.help.internal.util.ResourceLocator;
+import org.eclipse.help.search.IHelpSearchIndex;
+import org.eclipse.help.search.ISearchDocument;
 import org.eclipse.help.search.ISearchIndex;
-import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.SearchParticipant;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.Version;
@@ -69,7 +71,7 @@ import org.osgi.framework.Version;
 /**
  * Text search index. Documents added to this index can than be searched against a search query.
  */
-public class SearchIndex implements ISearchIndex {
+public class SearchIndex implements ISearchIndex, IHelpSearchIndex {
 
 	private IndexReader ir;
 
@@ -192,8 +194,8 @@ public class SearchIndex implements ISearchIndex {
 			if (relativePath != null) {
 				doc.add(new Field(FIELD_INDEX_ID, relativePath, Field.Store.YES, Field.Index.UN_TOKENIZED));
 			}
-			// NEW: check for the explicit search participant.
-			LuceneSearchParticipant participant = null;
+			// check for the explicit search participant.
+			SearchParticipant participant = null;
 			HelpURLConnection urlc = new HelpURLConnection(url);
 			String id = urlc.getValue("id"); //$NON-NLS-1$
 			String pid = urlc.getValue("participantId"); //$NON-NLS-1$
@@ -203,7 +205,7 @@ public class SearchIndex implements ISearchIndex {
 			if (participant == null)
 				participant = BaseHelpSystem.getLocalSearchManager().getParticipant(pluginId, name);
 			if (participant != null) {
-				IStatus status = participant.addDocument(this, pluginId, name, url, id, doc);
+				IStatus status = participant.addDocument(this, pluginId, name, url, id, new LuceneSearchDocument(doc));
 				if (status.getSeverity() == IStatus.OK) {
 					String filters = doc.get("filters"); //$NON-NLS-1$
 					indexedDocs.put(name, filters != null ? filters : "0"); //$NON-NLS-1$
@@ -216,7 +218,7 @@ public class SearchIndex implements ISearchIndex {
 				return status;
 			}
 			// default to html
-			IStatus status = htmlSearchParticipant.addDocument(this, pluginId, name, url, id, doc);
+			IStatus status = htmlSearchParticipant.addDocument(this, pluginId, name, url, id, new LuceneSearchDocument(doc));
 			if (status.getSeverity() == IStatus.OK) {
 				String filters = doc.get("filters"); //$NON-NLS-1$
 				indexedDocs.put(name, filters != null ? filters : "0"); //$NON-NLS-1$
@@ -613,9 +615,9 @@ public class SearchIndex implements ISearchIndex {
 				collector.addHits(LocalSearchManager.asList(hits), highlightTerms);
 			}
 		} catch (BooleanQuery.TooManyClauses tmc) {
-			throw new QueryTooComplexException();
+			collector.addQTCException(new QueryTooComplexException());
 		} catch (QueryTooComplexException qe) {
-			throw qe;
+			collector.addQTCException(qe);
 		} catch (Exception e) {
 			HelpBasePlugin.logError("Exception occurred performing search for: " //$NON-NLS-1$
 					+ searchQuery.getSearchWord() + ".", e); //$NON-NLS-1$
@@ -1035,7 +1037,7 @@ public class SearchIndex implements ISearchIndex {
 				query.append("&id=" + id); //$NON-NLS-1$
 			if (participantId != null)
 				query.append("&participantId=" + participantId); //$NON-NLS-1$
-			return new URL("help", //$NON-NLS-1$
+			return new URL("localhelp", //$NON-NLS-1$
 					null, -1, url + query.toString(), HelpURLStreamHandler.getDefault());
 
 		} catch (MalformedURLException mue) {
@@ -1045,11 +1047,11 @@ public class SearchIndex implements ISearchIndex {
 
 	public IStatus addDocument(String pluginId, String name, URL url, String id, Document doc) {
 		// try a registered participant for the file format
-		LuceneSearchParticipant participant = BaseHelpSystem.getLocalSearchManager()
+		SearchParticipant participant = BaseHelpSystem.getLocalSearchManager()
 				.getParticipant(pluginId, name);
 		if (participant != null) {
 			try {
-				return participant.addDocument(this, pluginId, name, url, id, doc);
+				return participant.addDocument(this, pluginId, name, url, id, new LuceneSearchDocument(doc));
 			}
 			catch (Throwable t) {
 				return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR,
@@ -1058,6 +1060,12 @@ public class SearchIndex implements ISearchIndex {
 			}
 		}
 		// default to html
-		return htmlSearchParticipant.addDocument(this, pluginId, name, url, id, doc);
+		return htmlSearchParticipant.addDocument(this, pluginId, name, url, id, new LuceneSearchDocument(doc));
+	}
+
+	public IStatus addSearchableDocument(String pluginId, String name, URL url, String id, ISearchDocument doc) {
+		// In the help system the only class that implements ISearchDocument is LuceneSearchDocument
+		LuceneSearchDocument luceneDoc = (LuceneSearchDocument)doc;
+		return addDocument(pluginId, name, url, id, luceneDoc.getDocument());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
index 8310f32..4c684d5 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -184,5 +184,9 @@ public class SearchManager {
 			allHits.clear();
 			wordsSearched = null;
 		}
+
+		public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
+			throw exception;
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
index fe327ef..0248241 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchProgressMonitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,10 @@ public class SearchProgressMonitor implements IProgressMonitor {
 		dummy_collector = new ISearchHitCollector() {
 			public void addHits(List hits, String s) {
 			}
+
+			public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
+                throw exception;
+			}
 		};
 	}
 
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
index 91ad7d8..07ada38 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchResults.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,10 +16,16 @@ import java.util.List;
 
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.scope.CriteriaHelpScope;
+import org.eclipse.help.internal.criteria.CriterionResource;
 import org.eclipse.help.internal.util.URLCoder;
 import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.AdaptableSelectedToc;
+import org.eclipse.help.internal.workingset.AdaptableSelectedTopic;
 import org.eclipse.help.internal.workingset.AdaptableToc;
+import org.eclipse.help.internal.workingset.AdaptableTopic;
 import org.eclipse.help.internal.workingset.WorkingSet;
 
 /**
@@ -31,17 +37,32 @@ public class SearchResults implements ISearchHitCollector {
 	private ArrayList scopes;
 	private int maxHits;
 	private String locale;
+	private AbstractHelpScope filter;
+	private CriteriaHelpScope criteriaScope;
 	protected SearchHit[] searchHits = new SearchHit[0];
+	private QueryTooComplexException searchException = null;
+	private boolean isQuickSearch;
+
+	public SearchResults(WorkingSet[] workingSets, int maxHits, String locale) {
+		this(workingSets, maxHits, locale, false);
+	}
+	
 	/**
 	 * Constructor
 	 * 
 	 * @param workingSets
 	 *            working sets or null if no filtering
 	 */
-	public SearchResults(WorkingSet[] workingSets, int maxHits, String locale) {
+	public SearchResults(WorkingSet[] workingSets, int maxHits, String locale, boolean isQuickSearch) {
 		this.maxHits = maxHits;
 		this.locale = locale;
 		this.scopes = getScopes(workingSets);
+		this.criteriaScope = new CriteriaHelpScope(getCriteriaScopes(workingSets));
+		this.isQuickSearch = isQuickSearch;
+	}
+	
+	public void setFilter(AbstractHelpScope filter) {
+		this.filter = filter;
 	}
 
 	/* (non-Javadoc)
@@ -62,14 +83,17 @@ public class SearchResults implements ISearchHitCollector {
 			// the scope for the topic, if any
 			if (scopes == null) {
 				toc = getTocForTopic(href, locale);
+				if (toc == null && !rawHit.canOpen()) {
+					continue;
+				}
 			} else {
 				scope = getScopeForTopic(href);
 				if (scope == null) {
 					// topic outside of scope
 					continue;
-				} else if (scope instanceof AdaptableToc) {
+				} else if ((scope instanceof AdaptableToc) || (scope instanceof AdaptableSelectedToc)) {
 					toc = (IToc) scope.getAdapter(IToc.class);
-				} else { // scope is AdaptableTopic
+				} else if((scope instanceof AdaptableTopic) || (scope instanceof AdaptableSelectedTopic)){ // scope is AdaptableTopic or AdaptableSelectedTopic
 					toc = (IToc) scope.getParent().getAdapter(IToc.class);
 				}
 			}
@@ -118,19 +142,32 @@ public class SearchResults implements ISearchHitCollector {
 	 * Finds a topic within a scope
 	 */
 	private AdaptableHelpResource getScopeForTopic(String href) {
+		boolean enabled = HelpPlugin.getCriteriaManager().isCriteriaEnabled();
 		for (int i = 0; i < scopes.size(); i++) {
 			AdaptableHelpResource scope = (AdaptableHelpResource) scopes.get(i);
-			if (scope.getTopic(href) != null)
-				return scope;
+			ITopic inScopeTopic = scope.getTopic(href);
+			if (inScopeTopic != null){
+				if (filter == null || filter.inScope(inScopeTopic)) {
+					if(!enabled || (enabled && criteriaScope.inScope(inScopeTopic))){
+						return scope;
+					}
+				}
+			}	
 		
 			// add root toc's extradir topics to search scope
-			IToc tocRoot = getTocForScope(scope, locale);
-			if (tocRoot != null) {
-				IToc toc = HelpPlugin.getTocManager().getOwningToc(href);
-				if (toc != null) {
-					String owningTocHref = toc.getHref();
-					if (owningTocHref == tocRoot.getHref()) {
-						return scope;
+			if (!isQuickSearch) {
+				IToc tocRoot = getTocForScope(scope, locale);
+				if (tocRoot != null) {
+					IToc toc = HelpPlugin.getTocManager().getOwningToc(href);
+					if (toc != null) {
+						String owningTocHref = toc.getHref();
+						if (owningTocHref == tocRoot.getHref()) {
+							if (filter == null || filter.inScope(inScopeTopic)) {
+								if(!enabled || (enabled && criteriaScope.inScope(inScopeTopic))){
+									return scope;
+								}
+							}
+						}
 					}
 				}
 			}
@@ -173,10 +210,25 @@ public class SearchResults implements ISearchHitCollector {
 	 */
 	private IToc getTocForTopic(String href, String locale) {
 		IToc[] tocs = HelpPlugin.getTocManager().getTocs(locale);
+		boolean foundInToc = false;
 		for (int i = 0; i < tocs.length; i++) {
 			ITopic topic = tocs[i].getTopic(href);
-			if (topic != null)
-				return tocs[i];
+			if (topic != null) {
+				foundInToc = true;
+				if (filter == null || filter.inScope(topic)) {
+					return tocs[i];
+				}
+			} 
+		}
+		if (!foundInToc) {
+			// test to pick up files in extradirs
+			IToc toc = HelpPlugin.getTocManager().getOwningToc(href);
+			if (toc != null) {
+				foundInToc = true;
+				if (filter == null || filter.inScope(toc)) {
+				    return toc;
+				}
+			}
 		}
 		return null;
 	}
@@ -189,6 +241,10 @@ public class SearchResults implements ISearchHitCollector {
 	public SearchHit[] getSearchHits() {
 		return searchHits;
 	}
+	
+	public QueryTooComplexException getException() {
+		return searchException;
+	}
 
 	/**
 	 * Returns a collection of adaptable help resources that are roots for
@@ -208,4 +264,21 @@ public class SearchResults implements ISearchHitCollector {
 		}
 		return scopes;
 	}
+	
+	private ArrayList getCriteriaScopes(WorkingSet[] wSets){
+		if (wSets == null)
+			return null;
+		
+		ArrayList criteriaScopes = new ArrayList(wSets.length);
+		for (int w = 0; w < wSets.length; w++) {
+			CriterionResource[] elements = wSets[w].getCriteria();
+			for (int i = 0; i < elements.length; i++)
+				criteriaScopes.add(elements[i]);
+		}
+		return criteriaScopes;		
+	}
+
+	public void addQTCException(QueryTooComplexException exception) throws QueryTooComplexException {
+		this.searchException = exception;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
index 761f584..b14f639 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/XHTMLSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,13 +16,13 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
-import org.eclipse.help.search.XMLSearchParticipant;
+import org.eclipse.help.search.SearchParticipantXML;
 import org.xml.sax.Attributes;
 
 /**
  * The search participant responsible for indexing XHTML documents.
  */
-public class XHTMLSearchParticipant extends XMLSearchParticipant {
+public class XHTMLSearchParticipant extends SearchParticipantXML {
 	
 	private static final String KEYWORDS = "keywords"; //$NON-NLS-1$
 	private static final String META_TAG = "meta"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
index 9bf6a42..29ecc3c 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/federated/LocalHelp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,6 +58,10 @@ public class LocalHelp implements ISearchEngine2 {
 
 	private void postResults(SearchResults results,
 			ISearchEngineResultCollector collector, boolean activityFiltering) {
+		if (results.getException() != null) {
+			collector.error(new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, 
+					HelpBaseResources.HelpSearch_QueryTooComplex, results.getException()));
+		}
 		SearchHit[] searchHits = results.getSearchHits();
 		if (!activityFiltering) {
 			collector.accept(searchHits);
@@ -92,7 +96,7 @@ public class LocalHelp implements ISearchEngine2 {
 			return false;
 		String participantId = id.substring(0, sep);
 		id = id.substring(sep+1);
-		LuceneSearchParticipant participant = BaseHelpSystem.getLocalSearchManager().getGlobalParticipant(participantId);
+		SearchParticipant participant = BaseHelpSystem.getLocalSearchManager().getGlobalParticipant(participantId);
 		if (participant==null)
 			return false;
 		try {
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
index 76f2018..68cbcb9 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/server/JettyHelpServer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,11 +62,16 @@ public class JettyHelpServer extends HelpServer {
 
 				// set the base URL
 				d.put("context.path", "/help"); //$NON-NLS-1$ //$NON-NLS-2$
-				d.put("other.info", "org.eclipse.help"); //$NON-NLS-1$ //$NON-NLS-2$
+				d.put("other.info", getOtherInfo()); //$NON-NLS-1$ 
 
 				// suppress Jetty INFO/DEBUG messages to stderr
 				Logger.getLogger("org.mortbay").setLevel(Level.WARNING); //$NON-NLS-1$	
 
+				String hostCommandLineOverride = HelpBasePlugin.getBundleContext().getProperty("server_host"); //$NON-NLS-1$
+				if (hostCommandLineOverride != null && hostCommandLineOverride.trim().length() > 0) {
+				    d.put("http.host", hostCommandLineOverride); //$NON-NLS-1$
+				}
+				
 				JettyConfigurator.startServer(webappName, d);
 			} catch (Throwable t) {
 				setException(t);
@@ -94,8 +99,8 @@ public class JettyHelpServer extends HelpServer {
 
 
 	private String host;
-	private int port = -1;
-	private static final int AUTO_SELECT_JETTY_PORT = 0;
+	protected int port = -1;
+	protected static final int AUTO_SELECT_JETTY_PORT = 0;
 	
 	public void start(final String webappName) throws Exception {		
 		WorkerThread startRunnable = new StartServerThread(webappName); 
@@ -107,14 +112,14 @@ public class JettyHelpServer extends HelpServer {
 	 * Ensures that the bundle with the specified name and the highest available
 	 * version is started and reads the port number
 	 */
-	private void checkBundle() throws InvalidSyntaxException, BundleException {
+	protected void checkBundle() throws InvalidSyntaxException, BundleException {
 		Bundle bundle = Platform.getBundle("org.eclipse.equinox.http.registry"); //$NON-NLS-1$if (bundle != null) {
 		if (bundle.getState() == Bundle.RESOLVED) {
 			bundle.start(Bundle.START_TRANSIENT);
 		}
 		if (port == -1) {
 			// Jetty selected a port number for us
-			ServiceReference[] reference = bundle.getBundleContext().getServiceReferences("org.osgi.service.http.HttpService", "(other.info=org.eclipse.help)"); //$NON-NLS-1$ //$NON-NLS-2$
+			ServiceReference[] reference = bundle.getBundleContext().getServiceReferences("org.osgi.service.http.HttpService", "(other.info=" + getOtherInfo() + ')'); //$NON-NLS-1$ //$NON-NLS-2$
 			Object assignedPort = reference[0].getProperty("http.port"); //$NON-NLS-1$
 			port = Integer.parseInt((String)assignedPort);
 		}
@@ -178,7 +183,7 @@ public class JettyHelpServer extends HelpServer {
 	/*
 	 * Get the port number which will be passed to Jetty
 	 */
-	private int getPortParameter() {
+	protected int getPortParameter() {
 		if (port == -1) { 
 			return AUTO_SELECT_JETTY_PORT;
 		}
@@ -197,6 +202,9 @@ public class JettyHelpServer extends HelpServer {
 		}
 		return host;
 	}
-	
+
+	protected String getOtherInfo() {
+		return "org.eclipse.help"; //$NON-NLS-1$
+	}	
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
index 05c6142..3b357b3 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneHelp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -158,7 +158,7 @@ public class StandaloneHelp extends EclipseController {
 		System.out.println("where:"); //$NON-NLS-1$
 		System.out.println(" href is the URL of the help resource to display,"); //$NON-NLS-1$
 		System.out
-				.println(" eclipseInstallPath specifies Eclipse installation directory; this directory is a parent to \"plugins\" directory and eclipse executable;  the option must be provided, when current directory from which infocenter is launched, is not the same as Eclipse installation directory,"); //$NON-NLS-1$
+				.println(" eclipseInstallPath specifies Eclipse installation directory; this directory is a parent to \"plugins\" directory and eclipse executable;  the option must be provided, when current directory from which information center is launched, is not the same as Eclipse installation directory,"); //$NON-NLS-1$
 		System.out
 				.println(" helpServerHost specifies host name of the interface that help server will use,"); //$NON-NLS-1$
 		System.out
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
index a4a3645..fbd40fb 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/standalone/StandaloneInfocenter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,7 +106,7 @@ public class StandaloneInfocenter extends EclipseController {
 		System.out.println();
 		System.out.println("where:"); //$NON-NLS-1$
 		System.out
-				.println(" eclipseInstallPath specifies Eclipse installation directory; this directory is a parent to \"plugins\" directory and eclipse executable;  the option must be provided, when current directory from which infocenter is launched, is not the same as Eclipse installation directory,"); //$NON-NLS-1$
+				.println(" eclipseInstallPath specifies Eclipse installation directory; this directory is a parent to \"plugins\" directory and eclipse executable;  the option must be provided, when current directory from which information center is launched, is not the same as Eclipse installation directory,"); //$NON-NLS-1$
 		System.out
 				.println(" helpServerHost specifies host name of the interface that help server will use,"); //$NON-NLS-1$
 		System.out
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
index c38ba79..cc88184 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/validation/TocValidator.java
@@ -20,7 +20,7 @@ import org.eclipse.help.internal.toc.TocFileParser;
 import org.xml.sax.SAXException;
 
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,6 +50,16 @@ public class TocValidator {
 			return href; }
 	}
 	
+	public static abstract class Filter {
+	     abstract public boolean isIncluded(String href);
+	}
+	
+	public static class PassThroughFilter extends Filter {
+		public boolean isIncluded(String href) {
+			return true;
+		}
+	}
+	
 	/**
 	 * Checks the validity of all <code>href</code> attributes on <code>topic</code> elements in the toc and the
 	 * <code>topic</code> attribute on the <code>toc</code> element if there is one. Also checks validity of any
@@ -63,10 +73,14 @@ public class TocValidator {
 	 * @throws ParserConfigurationException
 	 */
 	public static ArrayList validate(String[] hrefs) throws IOException, SAXException, ParserConfigurationException{
+		return filteredValidate(hrefs, new PassThroughFilter());
+	}
+	
+	public static ArrayList filteredValidate (String[] hrefs, Filter filter) throws IOException, SAXException, ParserConfigurationException{
 		TocValidator v = new TocValidator();
 		ArrayList result = new ArrayList();
 		for (int i = 0; i < hrefs.length; i++)
-			v.processToc(hrefs[i], null, result);
+			v.processToc(hrefs[i], null, result, filter);
 		return result;
 	}
 	
@@ -78,7 +92,8 @@ public class TocValidator {
 	/* Checks validity of all links in a given toc. If all links are valid, an empty ArrayList is returned.
 	 * Otherwise an ArrayList of BrokenLink objects is returned.
 	 */
-	private void processToc(String href, String plugin, ArrayList result) throws IOException, SAXException, ParserConfigurationException {
+	private void processToc(String href, String plugin, ArrayList result, Filter filter) 
+	               throws IOException, SAXException, ParserConfigurationException {
 		String path;
 		if (href.startsWith("/")) { //$NON-NLS-1$
 			href = href.substring(1);
@@ -102,19 +117,19 @@ public class TocValidator {
 			System.out.println("Starting toc: " + key); //$NON-NLS-1$
 		processedTocs.put(key, new Object());
 		TocContribution contribution = parser.parse(new TocFile(plugin,path, true, "en", null, null)); //$NON-NLS-1$
-		process(contribution.getToc(), plugin, path, result);
+		process(contribution.getToc(), plugin, path, result, filter);
 	}
 	
 	/* Checks validity of all links in the given IUAElement and recursively calls itself to check all children.
 	 * If there are any links to other tocs, calls the processToc method to validate them. If any broken links
 	 * are found, an appropriate BrokenLink object will be added to the result ArrayList.
 	 */
-	private void process(IUAElement element, String plugin, String path, ArrayList result) throws SAXException, ParserConfigurationException {
+	private void process(IUAElement element, String plugin, String path, ArrayList result, Filter filter) throws SAXException, ParserConfigurationException {
 		String href;
 		if (element instanceof ILink) {
 			href = ((ILink)element).getToc();
 			try {
-				processToc(href, plugin, result);
+				processToc(href, plugin, result, filter);
 			} catch (IOException e) {
 				result.add(new BrokenLink("/" + plugin + "/" + path, href)); //$NON-NLS-1$ //$NON-NLS-2$
 			}
@@ -124,14 +139,14 @@ public class TocValidator {
 				href = ((IToc)element).getTopic(null).getHref();
 			else
 				href = ((IHelpResource)element).getHref();
-			if (href != null)
+			if (href != null && filter.isIncluded(href))
 				if (!checkLink(href, plugin)) {
 					result.add(new BrokenLink("/" + plugin + "/" + path, href)); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 		}
 		IUAElement [] children = element.getChildren();
 		for (int i = 0; i < children.length; i++)
-			process(children[i], plugin, path, result);
+			process(children[i], plugin, path, result, filter);
 	}
 
 	/* Checks validity of a given link from a toc in a given plug-in.
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java
new file mode 100644
index 0000000..e9ce8fb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedToc.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.workingset;
+
+import org.eclipse.help.IToc;
+import org.eclipse.help.ITopic;
+import org.w3c.dom.Element;
+
+/**
+ * Makes help resources adaptable and persistable
+ */
+public class AdaptableSelectedToc extends AdaptableHelpResource {
+
+	/**
+	 * This constructor will be called when wrapping help resources.
+	 */
+	public AdaptableSelectedToc(IToc element) {
+		super(element);
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == IToc.class)
+			return element;
+		return super.getAdapter(adapter);
+	}
+
+	public AdaptableHelpResource[] getChildren() {
+		return new AdaptableHelpResource[0];
+	}
+
+
+	/**
+	 * When href is exactly the href of the selected toc, then return the selected topic
+	 * Otherwise, return null
+	 * 
+	 * @param href
+	 *            The topic's href value.
+	 */
+	public ITopic getTopic(String href) {
+		if(null == href){
+			return null;
+		}
+		if(href.equals(((IToc) element).getTopic(null).getHref())){
+			return ((IToc) element).getTopic(null);
+		}
+		return null;
+	}
+
+	public void saveState(Element element) {
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java
new file mode 100644
index 0000000..06112bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableSelectedTopic.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.workingset;
+
+import org.eclipse.help.ITopic;
+import org.w3c.dom.Element;
+
+/**
+ * Makes help resources adaptable and persistable
+ */
+public class AdaptableSelectedTopic extends AdaptableHelpResource {
+
+	/**
+	 * This constructor will be called when wrapping help resources.
+	 */
+	public AdaptableSelectedTopic(ITopic element) {
+		super(element);
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		if (adapter == ITopic.class)
+			return element;
+		return super.getAdapter(adapter);
+	}
+
+	public AdaptableHelpResource[] getChildren() {
+		return new AdaptableHelpResource[0];
+	}
+
+	/**
+	 * When href is exactly the href of the selected topic, then return the selected topic
+	 * Otherwise, return null
+	 * 
+	 * @param href
+	 *            The topic's href value.
+	 */
+	public ITopic getTopic(String href) {
+		if (href == null)
+			return null;
+		if (href.equals(getHref())) {
+			return (ITopic)element;
+		}
+		return null;
+	}
+
+	public void saveState(Element element) {
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableToc.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableToc.java
index d681c72..5dff779 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableToc.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/AdaptableToc.java
@@ -52,6 +52,9 @@ public class AdaptableToc extends AdaptableHelpResource {
 	 * @see org.eclipse.help.IToc#getTopic(java.lang.String)
 	 */
 	public ITopic getTopic(String href) {
+		if(null != href && href.equals(((IToc) element).getTopic(null).getHref())){
+			return ((IToc) element).getTopic(null);
+		}
 		return ((IToc) element).getTopic(href);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
index 9cc4a93..2016c25 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/IHelpWorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,9 @@
  *******************************************************************************/
 package org.eclipse.help.internal.workingset;
 
-import java.io.*;
+import java.io.IOException;
+
+import org.eclipse.help.internal.criteria.CriterionResource;
 
 /**
  * The working set manager stores help working sets. Working sets are persisted
@@ -32,6 +34,8 @@ public interface IHelpWorkingSetManager {
 	public WorkingSet createWorkingSet(String name,
 			AdaptableHelpResource[] elements);
 
+	public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria);
+	
 	/**
 	 * Returns a working set by name
 	 *  
@@ -67,4 +71,14 @@ public interface IHelpWorkingSetManager {
 	public String getCurrentWorkingSet();
 
 	public void setCurrentWorkingSet(String workingSet);
+	
+	public boolean isCriteriaScopeEnabled();
+	
+	public String[] getCriterionIds();
+	
+	public String[] getCriterionValueIds(String criterionId);
+	
+	public String getCriterionDisplayName(String criterionId);
+	
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId);
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
index ca1ff7f..e49d863 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,26 +14,44 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.w3c.dom.*;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 public class WorkingSet {
 	private String name;
 	private List elements;
+	private List criteria;
 
 	public WorkingSet(String name) {
-		this(name, (List) null);
+		this(name, (List) null, (List) null);
 	}
 
 	public WorkingSet(String name, List elements) {
+		this(name, elements, null);
+	}
+	
+	public WorkingSet(String name, List elements, List criteria) {
 		this.name = name;
+		
 		if (elements == null)
 			elements = new ArrayList();
-
 		this.elements = elements;
+		
+		if (criteria != null) {
+			this.criteria = criteria;
+		} else {
+			this.criteria = new ArrayList();
+		}		
 	}
 
 	public WorkingSet(String name, AdaptableHelpResource[] elements) {
+		this(name, elements, null);
+	}
+	
+	public WorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
 		this.name = name;
+		
 		if (elements == null)
 			elements = new AdaptableHelpResource[0];
 
@@ -41,6 +59,14 @@ public class WorkingSet {
 		for (int i = 0; i < elements.length; i++) {
 			this.elements.add(elements[i]);
 		}
+		
+		if (criteria == null)
+			criteria = new CriterionResource[0];
+
+		this.criteria = new ArrayList(criteria.length);
+		for (int j = 0; j < criteria.length; j++) {
+			this.criteria.add(criteria[j]);
+		}
 	}
 
 	public void removeElement(AdaptableHelpResource element) {
@@ -71,19 +97,58 @@ public class WorkingSet {
 		for (int i = 0; i < elements.length; i++)
 			this.elements.add(elements[i]);
 	}
+	
+	
+	public void setCriteria(CriterionResource[] criteria) {
+		this.criteria = new ArrayList(criteria.length);
+		for(int i = 0; i < criteria.length; i++) {
+			this.criteria.add(criteria[i]);
+		}
+	}
+	
+	public CriterionResource[] getCriteria(){
+		CriterionResource[] array = new CriterionResource[criteria.size()];
+		criteria.toArray(array);
+		return array;
+	}
 
 	public void saveState(Element parent) {
 		Document doc = parent.getOwnerDocument();
 		Element ws = doc.createElement("workingSet"); //$NON-NLS-1$
 		ws.setAttribute("name", name); //$NON-NLS-1$
 		parent.appendChild(ws);
-
+		
+		Element contents = doc.createElement("contents"); //$NON-NLS-1$
+		ws.appendChild(contents);
 		for (Iterator it = elements.iterator(); it.hasNext();) {
 			Element child = doc.createElement("item"); //$NON-NLS-1$
-			AdaptableHelpResource helpResource = (AdaptableHelpResource) it
-					.next();
+			AdaptableHelpResource helpResource = (AdaptableHelpResource) it.next();
 			helpResource.saveState(child);
-			ws.appendChild(child);
+			contents.appendChild(child);
+		}
+		
+		if (!criteria.isEmpty()){
+			Element criteriaElement = doc.createElement("criteria"); //$NON-NLS-1$
+			ws.appendChild(criteriaElement);
+			
+			for(Iterator iterator = criteria.iterator(); iterator.hasNext();){
+				Element criterionItem = doc.createElement("criterion"); //$NON-NLS-1$
+				criteriaElement.appendChild(criterionItem);
+				CriterionResource criterion = (CriterionResource)iterator.next();
+				String criterionName = criterion.getCriterionName();
+				criterionItem.setAttribute("name", criterionName);//$NON-NLS-1$
+				List criterionValues = criterion.getCriterionValues();
+				if(!criterionValues.isEmpty()){
+					for(Iterator iter = criterionValues.iterator(); iter.hasNext();){
+						String value = (String)iter.next();
+						if(value != null){
+							Element item = doc.createElement("item"); //$NON-NLS-1$
+							criterionItem.appendChild(item);
+							item.setAttribute("value", value.trim());//$NON-NLS-1$
+						}
+					}
+				}
+			}
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
index 9dce7b9..dd3442b 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/workingset/WorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,8 +16,11 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -39,6 +42,7 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.criteria.CriterionResource;
 import org.osgi.service.prefs.BackingStoreException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -58,9 +62,13 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 	// Working set persistence
 	private static final String WORKING_SET_STATE_FILENAME = "workingsets.xml"; //$NON-NLS-1$
 
+	private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
+	
 	private SortedSet workingSets = new TreeSet(new WorkingSetComparator());
 
 	private AdaptableTocsArray root;
+	
+	private Map allCriteriaValues;
 
 	private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory
 			.newInstance();
@@ -99,6 +107,12 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 			AdaptableHelpResource[] elements) {
 		return new WorkingSet(name, elements);
 	}
+	
+	public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
+		return new WorkingSet(name, elements, criteria);
+	}
+	
+	
 
 	/**
 	 * Tests the receiver and the object for equality
@@ -231,8 +245,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 			if (workingSets.item(i).getNodeType() != Node.ELEMENT_NODE)
 				continue;
 
-			WorkingSet workingSet = restoreWorkingSet((Element) workingSets
-					.item(i));
+			WorkingSet workingSet = restoreWorkingSet((Element) workingSets.item(i));
 			if (workingSet != null) {
 				this.workingSets.add(workingSet);
 			}
@@ -246,46 +259,75 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 	 *         failed.
 	 */
 	private WorkingSet restoreWorkingSet(Element workingSetNode) {
-
 		String name = workingSetNode.getAttribute("name"); //$NON-NLS-1$
-		NodeList items = workingSetNode.getElementsByTagName("item"); //$NON-NLS-1$
-		List helpResources = new ArrayList(items.getLength());
-		for (int i = 0; i < items.getLength(); i++) {
-			Element item = (Element) items.item(i);
-			String href = item.getAttribute("toc"); //$NON-NLS-1$
-			if (href == null || href.length() == 0)
-				continue;
 
-			String child_pos = item.getAttribute("topic"); //$NON-NLS-1$
-			int pos = -1;
-			if (child_pos != null) {
-				try {
-					pos = Integer.parseInt(child_pos);
-				} catch (Exception e) {
+		// scope
+		List helpResources = new ArrayList();
+		NodeList contents = workingSetNode.getElementsByTagName("contents"); //$NON-NLS-1$
+		for (int i = 0; i < contents.getLength(); i++) {
+			Element content = (Element) contents.item(i);
+			NodeList items = content.getElementsByTagName("item"); //$NON-NLS-1$
+			for(int j = 0; j < items.getLength(); j++){
+				Element itemI = (Element) items.item(j);
+				String href = itemI.getAttribute("toc"); //$NON-NLS-1$
+				if (href == null || href.length() == 0)
+					continue;
+
+				String child_pos = itemI.getAttribute("topic"); //$NON-NLS-1$
+				int pos = -1;
+				if (child_pos != null) {
+					try {
+						pos = Integer.parseInt(child_pos);
+					} catch (Exception e) {
+					}
 				}
-			}
 
-			AdaptableHelpResource toc = getAdaptableToc(href);
+				AdaptableHelpResource toc = getAdaptableToc(href);
 
-			if (toc == null)
-				return null;
+				if (toc == null)
+					return null;
 
-			if (pos == -1) {
-				// Create the adaptable toc.
-				helpResources.add(toc);
-			} else {
-				// Create the adaptable topic
-				AdaptableTopic[] topics = (AdaptableTopic[]) toc.getChildren();
-				if (pos >= 0 && topics.length > pos)
-					helpResources.add(topics[pos]);
+				if (pos == -1) {
+					// Create the adaptable toc.
+					helpResources.add(toc);
+				} else {
+					// Create the adaptable topic
+					AdaptableTopic[] topics = (AdaptableTopic[]) toc.getChildren();
+					if (pos >= 0 && topics.length > pos)
+						helpResources.add(topics[pos]);
+				}
 			}
 		}
-
-		AdaptableHelpResource[] elements = new AdaptableHelpResource[helpResources
-				.size()];
+		AdaptableHelpResource[] elements = new AdaptableHelpResource[helpResources.size()];
 		helpResources.toArray(elements);
+				
+		//criteria
+		
+		List criteriaResource = new ArrayList();
+		NodeList criteriaContents = workingSetNode.getElementsByTagName("criterion"); //$NON-NLS-1$
+		for (int i = 0; i < criteriaContents.getLength(); ++i) {
+			Element criterion = (Element) criteriaContents.item(i);
+			String criterionName = criterion.getAttribute("name"); //$NON-NLS-1$
+			if(null != name && 0 != name.length()){
+				NodeList items = criterion.getElementsByTagName("item"); //$NON-NLS-1$
+				List criterionValues = new ArrayList();
+				for(int j = 0; j < items.getLength(); ++j){
+					String value = ((Element) items.item(j)).getAttribute("value"); //$NON-NLS-1$
+					if(null != value && 0 != value.length()){
+						criterionValues.add(value);
+					}
+				}
+				if(criterionValues.size() > 0){
+					CriterionResource criterionResource = new CriterionResource(criterionName, criterionValues);
+					criteriaResource.add(criterionResource);
+				}
+			}	
+		}
+
+		CriterionResource[] criteria = new CriterionResource[criteriaResource.size()];
+		criteriaResource.toArray(criteria);
 
-		WorkingSet ws = createWorkingSet(name, elements);
+		WorkingSet ws = createWorkingSet(name, elements, criteria);
 
 		return ws;
 	}
@@ -296,8 +338,7 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 	public synchronized boolean saveState() {
 		File stateFile = null;
 		try {
-			DocumentBuilder docBuilder = documentBuilderFactory
-					.newDocumentBuilder();
+			DocumentBuilder docBuilder = documentBuilderFactory.newDocumentBuilder();
 			Document doc = docBuilder.newDocument();
 			Element rootElement = doc.createElement("workingSets"); //$NON-NLS-1$
 			doc.appendChild(rootElement);
@@ -415,5 +456,61 @@ public class WorkingSetManager implements IHelpWorkingSetManager {
 		workingSets = new TreeSet(new WorkingSetComparator());
 		restoreState();
 	}
+	
+	public boolean isCriteriaScopeEnabled(){
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(Platform.getNL());
+		}
+		if(HelpPlugin.getCriteriaManager().isCriteriaEnabled() && !allCriteriaValues.isEmpty()) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	public String[] getCriterionIds() {
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(Platform.getNL());
+		}
+		List criterionIds = new ArrayList();
+		if(null != allCriteriaValues){
+			for(Iterator iter = allCriteriaValues.keySet().iterator(); iter.hasNext();){
+				String criterion = (String) iter.next();
+				if(null == criterion || 0 == criterion.length() || 0 == getCriterionValueIds(criterion).length)
+					continue;
+				criterionIds.add(criterion);
+			}
+			Collections.sort(criterionIds);
+		}
+		String[] ids = new String[criterionIds.size()];                                        		
+		criterionIds.toArray(ids);
+		return ids;
+	}
+
+	public String[] getCriterionValueIds(String criterionName) {
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(Platform.getNL());
+		}
+		List valueIds = new ArrayList();
+		if(null != criterionName && null != allCriteriaValues) {
+			Set criterionValues = (Set)allCriteriaValues.get(criterionName);
+			if(null != criterionValues && !criterionValues.isEmpty()) {
+				valueIds.addAll(criterionValues);
+				Collections.sort(valueIds);
+				valueIds.add(UNCATEGORIZED);
+			}
+		}
+		String[] valueIdsArray = new String[valueIds.size()];                                        		
+		valueIds.toArray(valueIdsArray);
+		return valueIdsArray;
+	}
+	
+	public String getCriterionDisplayName(String criterionId) {
+		return HelpPlugin.getCriteriaManager().getCriterionDisplayName(criterionId, Platform.getNL());
+	}
+
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId) {
+		return HelpPlugin.getCriteriaManager().getCriterionValueDisplayName(criterionId, criterionValueId, Platform.getNL());
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
index 5d7e81e..5f054e2 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/xhtml/XHTMLCharsetHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,9 +12,9 @@ package org.eclipse.help.internal.xhtml;
 
 import org.eclipse.help.internal.UAElement;
 import org.eclipse.help.internal.dynamic.ProcessorHandler;
+import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-import org.w3c.dom.Text;
 
 /*
  * Converts the charset in XHTML meta tag to UTF-8. This is the encoding
@@ -37,14 +37,29 @@ public class XHTMLCharsetHandler extends ProcessorHandler {
 				return HANDLED_CONTINUE;
 			}
 		}
-		if ("script".equalsIgnoreCase(element.getElementName())) { //$NON-NLS-1$ 
+		if (endTagRequired(element)) { 
 			Element domElement = element.getElement();
 			if (domElement.getFirstChild() == null) {
 				Document document = domElement.getOwnerDocument();
-				Text child = document.createTextNode(" "); //$NON-NLS-1$
+				Comment child = document.createComment(" "); //$NON-NLS-1$
 				domElement.appendChild(child);
 			}
 		}
 		return UNHANDLED;
 	}
+
+	/*
+	 * Returns true if this element requires the end tag to be separate from the 
+	 * start tag to render correctly in browsers.
+	 * i.e. generate <a></a> rather than <a/>
+	 */
+	private boolean endTagRequired(UAElement element) {
+		String elementName = element.getElementName();
+		if ("a".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$
+		if ("p".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$
+		if ("div".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$
+		if ("script".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$
+		if ("textarea".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java
new file mode 100644
index 0000000..03b7305
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/IHelpSearchIndex.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.search;
+
+import java.net.URL;
+
+
+import org.eclipse.core.runtime.IStatus;
+
+/**
+ * Represents a Lucene index for one locale. The interface is used
+ * to allow participants to delegate indexing of documents outside
+ * of the TOC using the same algorithms as those in TOC.
+ * 
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 3.5
+ */
+
+public interface IHelpSearchIndex {
+
+	/**
+	 * Adds a document to the search index database by parsing it using one of the file-based search
+	 * participants, or the default HTML search participant. Use this method when encountering
+	 * documents outside of TOC that are nevertheless of the known format and help system knows how
+	 * to handle.
+	 * 
+	 * @param pluginId
+	 *            the id of the contributing plug-in
+	 * @param name
+	 *            the name of the document
+	 * @param url
+	 *            the URL of the document using format '/pluginId/href'
+	 * @param id
+	 *            the unique id of this document as defined in the participant
+	 * @param doc
+	 *            the document to be added
+	 * @return the status of the operation
+	 */
+	IStatus addSearchableDocument(String pluginId, String name, URL url, String id, ISearchDocument doc);
+	
+	/**
+	 * A search index is created for each locale.
+	 * @return the locale associated with this index.
+	 */
+	String getLocale();
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java
new file mode 100644
index 0000000..30799a2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchDocument.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.search;
+
+import java.io.Reader;
+
+/**
+ * Represents a document in the search index. This interface is used by
+ * clients which implement the search participant extension point. While the 
+ * help system uses the Lucene classes internally this interface does not
+ * import anything from Lucene and enables the API for adding search participants
+ * to remain binary compatible whatever changes are made in Lucene.
+ * 
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 3.5
+ */
+
+public interface ISearchDocument {
+	
+	/**
+	 * @param title the title which will be shown in the search results summary.
+	 * This function should be called exactly once per document 
+	 */
+	public void setTitle(String title);
+	
+	/**
+	 * @param summary the summary which will be used when displaying search results.
+	 * This function should be called exactly once per document 
+	 */
+	public void setSummary(String summary);
+	
+	/**
+	 * @param contents the text which will be used when performing a search. The search index 
+	 * will parse the contents and store the results in a database for rapid retrieval.
+	 */
+	public void addContents(String contents);
+	
+	/**
+	 * Alternate way of adding contents which is closer to the API for the
+	 * deprecated extension point org.eclipse.help.base.luceneSearchParticipants.
+	 * This is provided for backward compatibility, most users will find it simpler
+	 * to use <code>addContents(String)</code>
+	 * @param contents a Reader object which provides the contents
+	 * @param exactContents a second Reader object which contains the same same contents
+	 */
+	public void addContents(Reader contents, Reader exactContents);
+
+	/**
+	 * Allows search participant to indicate that a document will be processed
+	 * at runtime and that parts of the contents may not be displayed to the 
+	 * user, causing a match in the search to be shown as a potential match.
+	 * By default documents are considered to be unfiltered so this function 
+	 * need only be called to indicate that a document is filtered
+	 */
+	public void setHasFilters(boolean hasFilters);
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchIndex.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchIndex.java
index 05a7104..c45b58a 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchIndex.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/ISearchIndex.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,13 @@ import org.eclipse.core.runtime.IStatus;
  * Represents a Lucene index for one locale. The interface is used
  * to allow participants to delegate indexing of documents outside
  * of the TOC using the same algorithms as those in TOC.
+ * @deprecated 
+ * This interface is deprecated because it exposes Lucene classes, 
+ * which are not binary compatible between major release. This
+ * interface was used by clients which implemented the extension
+ * point org.eclipse.help.bace.luceneSearchParticipants. The 
+ * extension point org.eclipse.help.base.searchParticipant 
+ * and the interface IHelpSearchIndex should be used instead.
  */
 
 public interface ISearchIndex {
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
index a65e4fc..7650823 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/LuceneSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,6 +51,14 @@ import org.osgi.framework.Bundle;
  * </ol>
  * 
  * @since 3.2
+ * @deprecated 
+ * This class is deprecated because it exposes Lucene classes, 
+ * which are not binary compatible between major release. The 
+ * extension point org.eclipse.help.base.searchParticipant 
+ * and the class SearchParticipant should be used instead.
+ * 
+ * In Eclipse 3.6 the announcement was made that this API class will be removed 
+ * in a future release.
  */
 public abstract class LuceneSearchParticipant {
 
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
new file mode 100644
index 0000000..708954c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipant.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.search;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.util.ResourceLocator;
+import org.osgi.framework.Bundle;
+
+/**
+ * Participant in the help search. A plug-in can contribute instance of SearchParticipant to
+ * <code>"org.eclipse.help.search.searchParticipant"</code> extension point. Search
+ * participant is responsible for adding the content of documents it is responsible for into the
+ * help system's search index. Once in the index, the document becomes searchable and can produce
+ * search hits. There are two ways of using the participant:
+ * <ol>
+ * <li> For adding documents that are part of the help's TOC that have content formats not known to
+ * the default indexer (which are essentially all documents that are not of HTML format). In this
+ * case, the help system knows about the documents because they are in TOC but does not know how to
+ * index them. Because of the non-HTML format, help search participants are normally accompanied by
+ * the help content producers that are responsible for transforming the unknown format into HTML on
+ * the fly. <br>
+ * <br>
+ * When used in this mode, search participants must be registered with file extensions they handle.
+ * Based on the file extension mapping, they will be the first to get a chance at indexing the
+ * document with the matching extension.<br>
+ * <br>
+ * </li>
+ * <li> For adding documents that are outside of the help's TOC. In this case, the documents are
+ * completely unknown to the help system. Search participants are responsible for providing a set of
+ * documents they know about and are not supposed to declare file extensions they can handle. They
+ * are also responsible for opening these documents when asked because the help system will not be
+ * able to open them in any meaningful way. </li>
+ * </ol>
+ * 
+ * @since 3.5
+ */
+public abstract class SearchParticipant {
+
+	private static final HashSet EMPTY_SET = new HashSet();
+
+	private String id;
+
+	/**
+	 * Initializes the participant with the unique identifier from the registry. The method is
+	 * called by the help system - subclasses are not supposed to call it.
+	 * 
+	 * @param id
+	 *            the unique identifier of this participant
+	 */
+
+	public final void init(String id) {
+			this.id = id;
+	}
+
+	/**
+	 * Returns the unique identifier of this participant.
+	 * 
+	 * @return the unique id
+	 */
+	public final String getId() {
+		return id;
+	}
+
+	/**
+	 * Adds the document to the search index.
+	 * 
+	 * @param index
+	 *            the abstract representation of the help index that is currently running. Indexing
+	 *            known file types in participants that manage documents outside the TOC can be
+	 *            delegated to the index.
+	 * @param pluginId
+	 *            the plug-in that owns the document
+	 * @param name
+	 *            the name of the document to index
+	 * @param url
+	 *            the url of the document to index
+	 * @param id
+	 *            the unique id associated with this document
+	 * @param doc
+	 *            the document to add searchable content to
+	 * @return the status of the indexing operation. A successful operation should return
+	 *         <code>Status.OK</code>.
+	 */
+	public abstract IStatus addDocument(IHelpSearchIndex index, String pluginId, String name, URL url, String id,
+			ISearchDocument doc);
+
+	/**
+	 * Returns all the documents that this participant knows about. This method is only used for
+	 * participants that handle documents outside of the help system's TOC.
+	 * 
+	 * @param locale
+	 *            the index locale
+	 * 
+	 * @return a set of hrefs for documents managed by this participant.
+	 */
+	public Set getAllDocuments(String locale) {
+		return EMPTY_SET;
+	}
+
+	/**
+	 * Returns a set of identifiers of plug-ins that contribute indexable documents. This method is
+	 * only used for participants that handle documents outside of the help system's TOC.
+	 * 
+	 * @return a set of contributing plug-in ids
+	 */
+
+	public Set getContributingPlugins() {
+		return EMPTY_SET;
+	}
+
+	/**
+	 * A utility method that resolves a file name that contains '$'-based substitution variables.
+	 * 
+	 * @param pluginId
+	 *            the identifier of the originating plug-in
+	 * @param fileName
+	 *            the source file name
+	 * @param locale
+	 *            the locale to use when resolving nl variable
+	 * @return the plug-in relative file name with resolved variables
+	 */
+
+	protected static String resolveVariables(String pluginId, String fileName, String locale) {
+		if (fileName.indexOf('$') == -1)
+			return fileName;
+		ArrayList prefix = ResourceLocator.getPathPrefix(locale);
+		Bundle bundle = Platform.getBundle(pluginId);
+		if (bundle == null)
+			return fileName;
+		URL url = ResourceLocator.find(bundle, new Path(fileName), prefix);
+		URL root = FileLocator.find(bundle, new Path(""), null); //$NON-NLS-1$
+		return url.toString().substring(root.toString().length());
+	}
+
+	/**
+	 * A utility method that adds a title to the document.
+	 * 
+	 * @param title
+	 *            the title string
+	 * @param doc
+	 *            the document
+	 */
+
+	protected void addTitle(String title, ISearchDocument doc) {
+		doc.setTitle(title);
+	}
+
+	/**
+	 * Help system does not know how to open documents outside of the system's TOC. Global search
+	 * participants that bring additional documents into the index when
+	 * <code>getAllDocuments(String)</code> have a chance to open the document when it is part of
+	 * the search results. The default implementation returns <code>false</code> indicating that
+	 * the help system should open the document. In most cases this is wrong for most of XML files
+	 * that are in some interesting way.
+	 * 
+	 * @param id
+	 *            a participant-specific identifier that completely represents a search result
+	 * 
+	 * @return <code>true</code> if the file has been opened correctly or <code>false</code> to
+	 *         allow the help system to try to open the document.
+	 */
+
+	public boolean open(String id) {
+		return false;
+	}
+
+	/**
+	 * Signals to the participant that the indexing operation has finished and that cached resources
+	 * can be disposed to free up memory. The participant itself is still kept around (hence this is
+	 * semantically different from <code>dispose</code>).
+	 */
+	public void clear() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java
new file mode 100644
index 0000000..e3b9073
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/SearchParticipantXML.java
@@ -0,0 +1,385 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.search;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.Stack;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.dynamic.DocumentReader;
+import org.eclipse.help.internal.dynamic.ExtensionHandler;
+import org.eclipse.help.internal.dynamic.IncludeHandler;
+import org.eclipse.help.internal.dynamic.ProcessorHandler;
+import org.eclipse.help.internal.dynamic.XMLProcessor;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * An abstract search participants for adding XML documents to the search index. Subclass it
+ * and implement or override protected methods to handle parsing of the document.
+ * 
+ * @since 3.5
+ */
+public abstract class SearchParticipantXML extends SearchParticipant {
+	private Stack stack = new Stack();
+	private SAXParser parser;
+	private XMLProcessor processor;
+	private boolean hasFilters;
+
+	/**
+	 * Class that implements this interface is used to store data obtained during the parsing phase.
+	 */
+	protected interface IParsedXMLContent {
+
+		/**
+		 * Returns the locale of the index.
+		 * 
+		 * @return the locale string
+		 */
+		String getLocale();
+
+		/**
+		 * Sets the title of the parsed document for indexing.
+		 * 
+		 * @param title
+		 *            the document title
+		 */
+		void setTitle(String title);
+
+		/**
+		 * Sets the optional summary of the parsed document that can be later rendered for the
+		 * search hits.
+		 * 
+		 * @param summary
+		 *            the short document summary
+		 */
+		void addToSummary(String summary);
+
+		/**
+		 * Adds the text to the content buffer for indexing.
+		 * 
+		 * @param text
+		 *            the text to add to the document content buffer
+		 */
+		void addText(String text);
+	}
+
+	private static class ParsedXMLContent implements IParsedXMLContent {
+		private StringBuffer buffer = new StringBuffer();
+		private StringBuffer summary = new StringBuffer();
+		private String title;
+		private String locale;
+		private static int SUMMARY_LENGTH = 200;
+
+		public ParsedXMLContent(String locale) {
+			this.locale = locale;
+		}
+
+		public String getLocale() {
+			return locale;
+		}
+
+		public void setTitle(String title) {
+			this.title = title;
+		}
+
+		public void addToSummary(String text) {
+			if (summary.length() >= SUMMARY_LENGTH)
+				return;
+			if (summary.length() > 0)
+				summary.append(" "); //$NON-NLS-1$
+			summary.append(text);
+			if (summary.length() > SUMMARY_LENGTH)
+				summary.delete(SUMMARY_LENGTH, summary.length());
+		}
+
+		public void addText(String text) {
+			if (buffer.length() > 0)
+				buffer.append(" "); //$NON-NLS-1$
+			buffer.append(text);
+		}
+
+		public String getContent() {
+			return buffer.toString();
+		}
+
+		public String getSummary() {
+			// if the summary starts with the title, trim that part off.
+			String summaryStr = summary.toString();
+			if (title != null && summaryStr.length() >= title.length()) {
+				String header = summaryStr.substring(0, title.length());
+				if (header.equalsIgnoreCase(title)) {
+					return summaryStr.substring(title.length()).trim();
+				}
+			}
+			return summaryStr;
+		}
+
+		public String getTitle() {
+			return title;
+		}
+	}
+
+	private class XMLHandler extends DefaultHandler {
+
+		public ParsedXMLContent data;
+
+		public XMLHandler(ParsedXMLContent data) {
+			this.data = data;
+		}
+
+		public void startElement(String uri, String localName, String qName, Attributes attributes)
+				throws SAXException {
+			stack.push(qName);
+			handleStartElement(qName, attributes, data);
+			if (attributes.getValue("filter") != null || qName.equalsIgnoreCase("filter")) { //$NON-NLS-1$ //$NON-NLS-2$
+				hasFilters = true;
+			}
+		}
+
+		public void endElement(String uri, String localName, String qName) throws SAXException {
+			handleEndElement(qName, data);
+			String top = (String) stack.peek();
+			if (top != null && top.equals(qName))
+				stack.pop();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.xml.sax.helpers.DefaultHandler#startDocument()
+		 */
+		public void startDocument() throws SAXException {
+			SearchParticipantXML.this.handleStartDocument(data);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.xml.sax.helpers.DefaultHandler#endDocument()
+		 */
+		public void endDocument() throws SAXException {
+			SearchParticipantXML.this.handleEndDocument(data);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.xml.sax.helpers.DefaultHandler#processingInstruction(java.lang.String,
+		 *      java.lang.String)
+		 */
+		public void processingInstruction(String target, String pidata) throws SAXException {
+			handleProcessingInstruction(target, data);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.xml.sax.helpers.DefaultHandler#characters(char[], int, int)
+		 */
+		public void characters(char[] characters, int start, int length) throws SAXException {
+			if (length == 0)
+				return;
+			StringBuffer buff = new StringBuffer();
+			for (int i = 0; i < length; i++) {
+				buff.append(characters[start + i]);
+			}
+			String text = buff.toString(); 
+			if (text.trim().length() > 0)
+				handleText(text, data);
+		}
+		
+		/*
+		 * Note: throws clause does not declare IOException due to a bug in
+		 * sun jdk: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6327149
+		 * 
+		 * @see org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String, java.lang.String)
+		 */
+		public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
+			return new InputSource(new StringReader("")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Called when the element has been started.
+	 * 
+	 * @param name
+	 *            the element name
+	 * @param attributes
+	 *            the element attributes
+	 * @param data
+	 *            data the parser content data to update
+	 */
+	protected abstract void handleStartElement(String name, Attributes attributes, IParsedXMLContent data);
+
+	/**
+	 * Called when the element has been ended.
+	 * 
+	 * @param name
+	 *            the name of the XML element
+	 * @param data
+	 *            data the parser content data to update
+	 */
+	protected abstract void handleEndElement(String name, IParsedXMLContent data);
+
+	/**
+	 * Called when the XML document has been started.
+	 * 
+	 * @param data
+	 *            data the parser content data to update
+	 */
+	protected void handleStartDocument(IParsedXMLContent data) {
+	}
+
+	/**
+	 * Called when the XML document has been ended.
+	 * 
+	 * @param data
+	 *            data the parser content data to update
+	 */
+	protected void handleEndDocument(IParsedXMLContent data) {
+	}
+
+	/**
+	 * Called when a processing instruction has been encountered.
+	 * 
+	 * @param type
+	 *            the instruction data
+	 * @param data
+	 *            the parser content data to update
+	 */
+	protected void handleProcessingInstruction(String type, IParsedXMLContent data) {
+	}
+
+	/**
+	 * Called when element body text has been encountered. Use 'getElementStackPath()' to determine
+	 * the element in question.
+	 * 
+	 * @param text
+	 *            the body text
+	 * @param data
+	 *            the parser content data to update
+	 */
+	protected abstract void handleText(String text, IParsedXMLContent data);
+
+	
+	public IStatus addDocument(IHelpSearchIndex index, String pluginId,
+			String name, URL url, String id, ISearchDocument doc) {
+		InputStream stream = null;
+		try {
+			if (parser == null) {
+				parser = SAXParserFactory.newInstance().newSAXParser();
+			}
+			stack.clear();
+			hasFilters = false;
+			ParsedXMLContent parsed = new ParsedXMLContent(index.getLocale());
+			XMLHandler handler = new XMLHandler(parsed);
+			stream = url.openStream();
+			stream = preprocess(stream, name, index.getLocale());
+			parser.parse(stream, handler);
+			doc.addContents(parsed.getContent());
+			String title = parsed.getTitle();
+			if (title != null)
+				addTitle(title, doc);
+			String summary = parsed.getSummary();
+			if (summary != null)
+				doc.setSummary(summary);
+			if (hasFilters) {
+				doc.setHasFilters(true);
+			}
+			return Status.OK_STATUS;
+		} catch (Exception e) {
+			return new Status(IStatus.ERROR, HelpBasePlugin.PLUGIN_ID, IStatus.ERROR,
+					"Exception occurred while adding document " + name //$NON-NLS-1$
+							+ " to index.", //$NON-NLS-1$
+					e);
+		} finally {
+			if (stream != null) {
+				try {
+					stream.close();
+				} catch (IOException e) {
+				}
+				stream = null;
+			}
+		}
+	}
+
+	/**
+	 * Returns the name of the element that is currently at the top of the element stack.
+	 * 
+	 * @return the name of the element that is currently at the top of the element stack
+	 */
+
+	protected String getTopElement() {
+		return (String) stack.peek();
+	}
+
+	/**
+	 * Returns the full path of the current element in the stack separated by the '/' character.
+	 * 
+	 * @return the path to the current element in the stack.
+	 */
+	protected String getElementStackPath() {
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < stack.size(); i++) {
+			if (i > 0)
+				buf.append("/"); //$NON-NLS-1$
+			buf.append((String) stack.get(i));
+		}
+		return buf.toString();
+	}
+	
+	/**
+	 * <p>
+	 * Pre-processes the given document input stream for the given document name and locale.
+	 * This implementation will resolve dynamic content that is applicable to searching,
+	 * e.g. includes and extensions, but not filters. Subclasses may override to do their
+	 * own pre-processing.
+	 * </p>
+	 * <p>
+	 * For performance, implementations that handle documents that do not support dynamic
+	 * content should subclass and return the original stream.
+	 * </p>
+	 * 
+	 * @param in the input stream for the document content
+	 * @param name the name of the document as it appears in the index
+	 * @param locale the locale code, e.g. "en_US"
+	 * @return the processed content
+	 * @since 3.3
+	 */
+	protected InputStream preprocess(InputStream in, String name, String locale) {
+		if (processor == null) {
+			DocumentReader reader = new DocumentReader();
+			processor = new XMLProcessor(new ProcessorHandler[] {
+				new IncludeHandler(reader, locale),
+				new ExtensionHandler(reader, locale)
+			});
+		}
+		try {
+			return processor.process(in, name, null);
+		}
+		catch (Throwable t) {
+			String msg = "An error occured while pre-processing user assistance document \"" + name + "\" for search indexing"; //$NON-NLS-1$ //$NON-NLS-2$
+			HelpBasePlugin.logError(msg, t);
+			return in;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/XMLSearchParticipant.java b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/XMLSearchParticipant.java
index 626f72f..abe7927 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/XMLSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/search/XMLSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,11 @@ import org.xml.sax.helpers.DefaultHandler;
  * and implement or override protected methods to handle parsing of the document.
  * 
  * @since 3.2
+ *  * @deprecated 
+ * This class is deprecated because it exposes Lucene classes, 
+ * which are not binary compatible between major release. The 
+ * extension point org.eclipse.help.base.searchParticipant 
+ * and the class SearchParticipantXML should be used instead.
  */
 public abstract class XMLSearchParticipant extends LuceneSearchParticipant {
 	private Stack stack = new Stack();
diff --git a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/standalone/package.html b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/standalone/package.html
index af9aca3..a97d264 100644
--- a/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/standalone/package.html
+++ b/eclipse/plugins/org.eclipse.help.base/src/org/eclipse/help/standalone/package.html
@@ -1,14 +1,14 @@
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Author" content="IBM">
    <meta name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
    <title>Package-level Javadoc</title>
 </head>
 <body>
-Provides access to infocenter and stand alone help system. 
+Provides access to information center and stand alone help system. 
 Classes in this package are not supposed to be called by Eclipse plugins,
 they are intended to be called from outside of Eclipse environment.
 <h2>
@@ -17,12 +17,12 @@ to the help system is provided
 <TT>org.eclipse.help.standalone.Infocenter </TT> and
 <TT>org.eclipse.help.standalone.Help </TT>
 classes.
-<P>To start or stop the infocenter, use the Infocenter class. The class can be used as a stand alone program, launched from a command line, or can be instantiated and used from a Java program.</P>
+<P>To start or stop the information center, use the Infocenter class. The class can be used as a stand alone program, launched from a command line, or can be instantiated and used from a Java program.</P>
 <p>To start, stop the stand alone help system or cause it to display help on a user machine, use the Help class. The class can be used as a stand alone program, launched from a command line, or can be instantiated and used from a Java program.</P>
 <P>There
 is a general mechanism (defined at the plug-in level) by which individual
 plug-ins contribute on-line help and context-sensitive help for their component.
 This Eclipse mechanism for contributing help content needs to be used. 
 The stand alone help system is responsible for accessing this information
-and displaying it to the user. The infocenter, unlike the stand alone help system, does not launch UI on the machine that it is running on. When infocenter is started the help content   can be obtained by connecting to a help server (port specified in Tomcat plugin preferences) using HTTP connection.</P></body>
+and displaying it to the user. The information center, unlike the stand alone help system, does not launch UI on the machine that it is running on. When infocenter is started the help content   can be obtained by connecting to a help server (port specified in Tomcat plugin preferences) using HTTP connection.</P></body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.help.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.help.ui/META-INF/MANIFEST.MF
index 0e1a2f9..44947f2 100644
--- a/eclipse/plugins/org.eclipse.help.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.help.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %help_system_plugin_name
 Bundle-SymbolicName: org.eclipse.help.ui; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.3.qualifier
 Bundle-Activator: org.eclipse.help.ui.internal.HelpUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -11,14 +11,17 @@ Export-Package: org.eclipse.help.ui,
  org.eclipse.help.ui.internal;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.ui.internal.browser;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.ui.internal.browser.embedded;x-friends:="org.eclipse.ua.tests",
+ org.eclipse.help.ui.internal.dynamic;x-internal:=true,
+ org.eclipse.help.ui.internal.handlers;x-internal:=true,
+ org.eclipse.help.ui.internal.preferences;x-internal:=true,
  org.eclipse.help.ui.internal.search;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.ui.internal.util;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.ui.internal.views;x-friends:="org.eclipse.ui.cheatsheets,org.eclipse.ua.tests"
-Require-Bundle: org.eclipse.help.base;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
- org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="3.4.100"
+Require-Bundle: org.eclipse.help.base;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui.forms;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="3.4.200"
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ui.intro/icons/full/dlcl16/magnify_font.gif b/eclipse/plugins/org.eclipse.help.ui/icons/dlcl16/magnify_font.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro/icons/full/dlcl16/magnify_font.gif
copy to eclipse/plugins/org.eclipse.help.ui/icons/dlcl16/magnify_font.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro/icons/full/dlcl16/reduce_font.gif b/eclipse/plugins/org.eclipse.help.ui/icons/dlcl16/reduce_font.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro/icons/full/dlcl16/reduce_font.gif
copy to eclipse/plugins/org.eclipse.help.ui/icons/dlcl16/reduce_font.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro/icons/full/elcl16/magnify_font.gif b/eclipse/plugins/org.eclipse.help.ui/icons/elcl16/magnify_font.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro/icons/full/elcl16/magnify_font.gif
copy to eclipse/plugins/org.eclipse.help.ui/icons/elcl16/magnify_font.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro/icons/full/elcl16/reduce_font.gif b/eclipse/plugins/org.eclipse.help.ui/icons/elcl16/reduce_font.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro/icons/full/elcl16/reduce_font.gif
copy to eclipse/plugins/org.eclipse.help.ui/icons/elcl16/reduce_font.gif
diff --git a/eclipse/plugins/org.eclipse.help.ui/plugin.properties b/eclipse/plugins/org.eclipse.help.ui/plugin.properties
index 846a036..5bbddba 100644
--- a/eclipse/plugins/org.eclipse.help.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.help.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ HelpViewName = Help
 LocalHelp.label = Local Help
 LocalHelp.desc = Searches local help documents
 
-InfoCenter.label = Info Center
-InfoCenter.desc = Searches a remote Info Center
+InfoCenter.label = Information Center
+InfoCenter.desc = Searches a remote information center
 
 WebSearch.label = Web Search
 WebSearch.desc = Performs a general-purpose Web search
@@ -46,4 +46,9 @@ command.closeTray.name = Close User Assistance Tray
 command.closeTray.description = Close the user assistance tray containing context help information and cheat sheets.
 
 command.index.description = Show Keyword Index
-command.index.name = Index
\ No newline at end of file
+command.index.name = Index
+ 
+command.openBundleResource.name=Open Resource in Browser
+command.openBundleResource.description=Opens a bundle resource in the default web browser.
+commandParameter.openBundleResource.plugin.name=Plugin
+commandParameter.openBundleResource.path.name=Path
diff --git a/eclipse/plugins/org.eclipse.help.ui/plugin.xml b/eclipse/plugins/org.eclipse.help.ui/plugin.xml
index 36c3f4d..be3accd 100644
--- a/eclipse/plugins/org.eclipse.help.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.help.ui/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2007 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -85,6 +86,12 @@
             id="org.eclipse.help.ui.HelpView"/>            
    </extension>
    <extension
+         point="org.eclipse.ui.propertiesView">
+      <excludeSources
+            id="org.eclipse.help.ui.HelpView">
+      </excludeSources>
+   </extension>
+   <extension
          point="org.eclipse.help.ui.searchEngine">
       <engineType
             scopeFactory="org.eclipse.help.ui.internal.search.LocalSearchScopeFactory"
@@ -144,30 +151,30 @@
       </command>
    </extension>
    <extension
-         point="org.eclipse.ui.bindings">
-      <key
-            commandId="org.eclipse.help.ui.closeTray"
-            contextId="org.eclipse.ui.contexts.dialog"
-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
-            sequence="M1+W"/>
-      <key
-            commandId="org.eclipse.help.ui.closeTray"
-            contextId="org.eclipse.ui.contexts.dialog"
-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
-            sequence="M1+F4"/>
-      <key
-            commandId="org.eclipse.help.ui.closeTray"
-            contextId="org.eclipse.ui.contexts.dialog"
-            schemeId="org.eclipse.ui.emacsAcceleratorConfiguration"
-            sequence="CTRL+X K"/>
-   </extension>
-   <extension
          point="org.eclipse.ui.commandImages">
       <image
             commandId="org.eclipse.help.ui.indexcommand"
             icon="icons/etool16/index_co.gif">
       </image>
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+           categoryId="org.eclipse.ui.category.window"
+           defaultHandler="org.eclipse.help.ui.internal.handlers.OpenBundleResourceHandler"
+           description="%command.openBundleResource.description"
+           id="org.eclipse.ui.browser.openBundleResource"
+           name="%command.openBundleResource.name">
+        <commandParameter
+               id="plugin"
+               name="%commandParameter.openBundleResource.plugin.name"
+               optional="true"/>
+        <commandParameter
+               id="path"
+               name="%commandParameter.openBundleResource.path.name"
+               optional="true"/>
+      </command>
+</extension>
     
 <!--
    <extension
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
index c371bff..265d0cd 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,7 +106,7 @@ public class ContextHelpDialog {
 		backgroundColour = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND);
 		foregroundColour = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
 		linkColour = display.getSystemColor(SWT.COLOR_BLUE);
-		parentShell = display.getActiveShell();
+		parentShell = PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
 
 		if (parentShell != null) {
 			boolean isModal = 0 < (parentShell.getStyle() & (SWT.APPLICATION_MODAL
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
index 89f1c97..85bf988 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/IHelpUIConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,10 @@ public interface IHelpUIConstants {
 	public static final String IMAGE_SHOW_DESC = "elcl16/showdesc_co.gif"; //$NON-NLS-1$
 	public static final String IMAGE_ADD_BOOKMARK = "elcl16/addbkmrk_co.gif"; //$NON-NLS-1$
 	public static final String IMAGE_HIGHLIGHT = "elcl16/highlight.gif"; //$NON-NLS-1$
+	public static final String IMAGE_MAGNIFY = "elcl16/magnify_font.gif"; //$NON-NLS-1$
+	public static final String IMAGE_REDUCE = "elcl16/reduce_font.gif"; //$NON-NLS-1$
+	public static final String IMAGE_D_MAGNIFY = "dlcl16/magnify_font.gif"; //$NON-NLS-1$
+	public static final String IMAGE_D_REDUCE = "dlcl16/reduce_font.gif"; //$NON-NLS-1$
 	public static final String IMAGE_COLLAPSE_ALL = "elcl16/collapseall.gif"; //$NON-NLS-1$
 	public static final String IMAGE_SYNC_TOC = "elcl16/synch_toc_nav.gif"; //$NON-NLS-1$
 	public static final String IMAGE_SHOW_ALL = "elcl16/show_all.gif"; //$NON-NLS-1$	
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
index a67f03f..fd61acf 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,6 +74,8 @@ public final class Messages extends NLS {
 	public static String SearchPart_expand;
 	public static String SearchPart_potential_hit;
 	public static String WorkingSetContent;
+	public static String WorkingSetCriteria;
+	public static String UncategorizedCriteria;
 	public static String selectAll;
 	public static String selectWorkingSet;
 	public static String FederatedSearchPart_advanced;
@@ -114,6 +116,8 @@ public final class Messages extends NLS {
 	public static String HelpPreferencePage_message;
 	public static String HelpPreferencePage_infopop;
 	public static String BrowserPart_bookmarkTooltip;
+	public static String BrowserPart_magnifyTooltip;
+	public static String BrowserPart_reduceTooltip;
 	public static String BrowserPart_highlightTooltip;
 	public static String BrowserPart_printTooltip;
 	public static String BrowserPart_syncTocTooltip;	
@@ -166,9 +170,12 @@ public final class Messages extends NLS {
 	public static String IndexInstructions;
 	public static String IndexButton;
 	
-	public static String HelpContentPreferencePage_remote;
 	public static String NoWorkbenchForExecuteCommand_msg;
 	
+	public static String SearchEmbeddedHelpOnly;
+	public static String SearchEmbeddedHelpFirst;
+	public static String SearchEmbeddedHelpLast;
+	
 	// Remote Help Preferences
 	public static String AddICDialog_10;
 
@@ -184,6 +191,8 @@ public final class Messages extends NLS {
 
 	public static String AddICDialog_7;
 
+	public static String AddICDialog_8;
+	
 	public static String AddICDialog_9;
 
 	public static String EditICDialog_10;
@@ -195,6 +204,8 @@ public final class Messages extends NLS {
 	public static String EditICDialog_13;
 
 	public static String EditICDialog_14;
+	
+	public static String EditICDialog_15;
 
 	public static String EditICDialog_7;
 
@@ -210,7 +221,8 @@ public final class Messages extends NLS {
 	public static String HelpContentBlock_testConnectionTitle;
 	public static String HelpContentBlock_rmvTitle;
 	public static String HelpContentBlock_rmvLabel;
-	
+	public static String HelpContentBlock_upTitle;
+	public static String HelpContentBlock_downTitle;
 
 	public static String RemoteICLabelProvider_4;
 
@@ -237,6 +249,8 @@ public final class Messages extends NLS {
 
 	public static String ViewICPropsDialog_13;
 
+	public static String ViewICPropsDialog_14;
+	
 	public static String ViewICPropsDialog_19;
 
 	public static String ViewICPropsDialog_20;
@@ -253,6 +267,9 @@ public final class Messages extends NLS {
 
 	public static String ViewICPropsDialog_8;
 	public static String ViewICPropsDialog_URL;
+	public static String remoteHelpUnavailable;
 
-	
+	public static String See;
+	public static String SeeAlso;
+	public static String SeeList;
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties
index f98d75d..495719a 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/Messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ HelpView_defaultText=Click on any workbench part to show related help topics.
 expression = Search expression:
 expression_label = * = any string, ? = any character, "" = phrase, AND, OR, NOT = boolean operators
 limit_to = Search scope
+remoteHelpUnavailable=Some network help is unavailable.
 
 SeeAlsoPart_search=Search
 SeeAlsoPart_allTopics=Contents
@@ -85,6 +86,8 @@ SearchPart_potential_hit={0} (potential hit)
 
 # LocalHelpPage
 WorkingSetContent = Working set &content:
+WorkingSetCriteria = Working set cr&iteria:
+UncategorizedCriteria=Uncategorized
 selectAll=Sea&rch all topics
 selectWorkingSet=Search only the following &topics
 FederatedSearchPart_advanced=Advanced Settings
@@ -144,7 +147,9 @@ HelpPreferencePage_helpBrowser = In the help browser
 HelpPreferencePage_externalBrowser = In an external browser
 HelpPreferencePage_searchLocation = Open help &search 
 
-HelpContentPreferencePage_remote=&Include help content from a remote infocenter
+SearchEmbeddedHelpOnly =  Include local help only
+SearchEmbeddedHelpFirst = Include remote help and give local help priority
+SearchEmbeddedHelpLast =  Include remote help and give it priority
 
 ScopePreferenceDialog_wtitle = Search Scope - {0}
 ScopePreferenceDialog_new=&New...
@@ -152,6 +157,8 @@ ScopePreferenceDialog_delete=De&lete
 NewEngineWizard_wtitle=New Search Engine
 BrowserPart_showExternalTooltip=Show in external window
 BrowserPart_bookmarkTooltip=Bookmark document
+BrowserPart_magnifyTooltip=Increase Font Size
+BrowserPart_reduceTooltip=Reduce Font Size
 BrowserPart_highlightTooltip=Highlight Search Terms
 BrowserPart_printTooltip=Print
 BrowserPart_syncTocTooltip = Show in Contents
@@ -182,18 +189,21 @@ IndexButton = Display
 
 NoWorkbenchForExecuteCommand_msg = No workbench available for command execution.
 
-HelpContentPage_title = Remote Infocenters:
+HelpContentPage_title = Configure information centers:
 HelpContentBlock_addICTitle = &New
 HelpContentBlock_editICTitle = &Edit 
 HelpContentBlock_removeICTitle = De&lete
 HelpContentBlock_viewICTitle = &View Properties
 HelpContentBlock_testConnectionTitle = &Test Connection
-HelpContentBlock_rmvTitle=Remove {0} &Infocenter
+HelpContentBlock_rmvTitle=Remove {0} information center
 HelpContentBlock_rmvLabel=Are you sure you want to remove {0}?
-AddICDialog_2=Add new infocenter
+HelpContentBlock_upTitle=&Up
+HelpContentBlock_downTitle=&Down
+AddICDialog_2=Add new information center
 AddICDialog_4=&Name:
 AddICDialog_5=&Host:
 AddICDialog_7=&Path:
+AddICDialog_8=Proto&col:
 AddICDialog_9=Use &default port
 AddICDialog_10=Use p&ort:
 AddICDialog_17=You must specify a Host
@@ -201,12 +211,13 @@ AddICDialog_19=Port must be an integer between 0 and 65535
 HelpContentBlock_3=Disa&ble
 HelpContentBlock_4=Ena&ble
 
-EditICDialog_7=Edit {0} infocenter
+EditICDialog_7=Edit {0} information center
 EditICDialog_10=&Name:
 EditICDialog_11=&Host:
 EditICDialog_12=&Path:
 EditICDialog_13=Use &default port
 EditICDialog_14=Use p&ort:
+EditICDialog_15=&Protocol:
 
 RemoteICLabelProvider_4=Enabled
 RemoteICLabelProvider_5=Disabled
@@ -226,9 +237,14 @@ ViewICPropsDialog_10=Name:
 ViewICPropsDialog_11=Host:
 ViewICPropsDialog_12=Path:
 ViewICPropsDialog_13=Port: 
+ViewICPropsDialog_14=Protocol:
 ViewICPropsDialog_19=Status: 
 ViewICPropsDialog_20=Enabled
 ViewICPropsDialog_21=Disabled
 ViewICPropsDialog_23=\ Connected
 ViewICPropsDialog_24=\ Not Connected
 ViewICPropsDialog_URL=URL: 
+
+See=See {0}
+SeeAlso=See also {0}
+SeeList={0} / {1}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
index 851a395..167c451 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/browser/embedded/EmbeddedBrowser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -221,7 +221,7 @@ public class EmbeddedBrowser {
 	}
 	private static void initializeShell(Shell s) {
 		s.setText(initialTitle);
-		Image[] shellImages = createImages();
+		final Image[] shellImages = createImages();
 		if (shellImages != null)
 			s.setImages(shellImages);
 		GridLayout layout = new GridLayout();
@@ -230,6 +230,18 @@ public class EmbeddedBrowser {
 		layout.verticalSpacing = 0;
 		layout.horizontalSpacing = 0;
 		s.setLayout(layout);
+		s.addDisposeListener(new DisposeListener() {
+			
+			public void widgetDisposed(DisposeEvent e) {
+				if (shellImages != null) {
+					for (int i = 0; i < shellImages.length; i++) {
+						shellImages[i].dispose();
+					}
+				}
+				
+			}
+		});
+		
 	}
 	private void initialize(Browser browser) {
 		browser.addOpenWindowListener(new OpenWindowListener() {
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java
new file mode 100644
index 0000000..229efa1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/handlers/OpenBundleResourceHandler.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.ui.internal.handlers;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+public class OpenBundleResourceHandler extends AbstractHandler {
+
+	private static final String PARAM_ID_PLUGIN = "plugin"; //$NON-NLS-1$
+
+	private static final String PARAM_ID_PATH = "path"; //$NON-NLS-1$
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		String pluginId = event.getParameter(PARAM_ID_PLUGIN);
+		String pluginPath = event.getParameter(PARAM_ID_PATH);
+		URL url;
+		File workspaceFile;
+		String errorMessage=""; //$NON-NLS-1$
+		if (pluginId == null || pluginPath==null) {
+			url = null;
+		} else {
+			try {
+				if(pluginPath.startsWith("/")) //$NON-NLS-1$
+					pluginPath = pluginPath.substring(1);
+				url = new URL(Platform.getInstanceLocation().getURL().toString()+pluginId+"/"+pluginPath); //$NON-NLS-1$
+				workspaceFile = new File(url.getFile());	
+				if(!workspaceFile.exists())
+				{	
+					url = BaseHelpSystem.resolve("/" + pluginId + '/' + pluginPath , true); //$NON-NLS-1$
+					if (url == null)
+					{
+						errorMessage="file not found:" + pluginId+"/"+pluginPath; //$NON-NLS-1$ //$NON-NLS-2$
+						throw new ExecutionException(errorMessage);
+					}		
+				}
+			}
+			catch (Exception ex) {
+				throw new ExecutionException(errorMessage, ex);
+			}
+		}
+
+		String browserId = pluginId+"."+pluginPath; //$NON-NLS-1$
+		try {
+			IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench()
+					.getBrowserSupport();
+			
+			IWebBrowser browser = browserSupport.createBrowser(browserId); 
+			browser.openURL(url);
+		} catch (PartInitException ex) {
+			throw new ExecutionException("error opening browser", ex); //$NON-NLS-1$
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/AddICDialog.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/AddICDialog.java
index c735d85..fe4dc59 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/AddICDialog.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/AddICDialog.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -21,6 +21,7 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Event;
@@ -43,6 +44,10 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 	private Label pathLabel;
 
 	private Text pathText;
+	
+	private Label protocolLabel;
+
+	private Combo protocolCombo;
 
 	private Button radio1;
 
@@ -61,6 +66,8 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 	private String enteredPort;
 
 	private String enteredPath;
+	
+	private String enteredProtocol;
 
 	private boolean enteredUseDefault;
 	
@@ -68,6 +75,7 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 	
 	private StatusInfo dialogStatus;
 	
+	private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
 	
 	public AddICDialog(Shell parentShell) {
 
@@ -107,6 +115,7 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 		createNameSection(topGroup);
 		createHostSection(topGroup);
 		createPathSection(topGroup);
+		createProtocolSection(topGroup);
 		createPortSection(topGroup);
 		
 		//Initialize validity
@@ -168,6 +177,18 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 			pathText.setOrientation(SWT.LEFT_TO_RIGHT);
 		pathText.addListener(SWT.Modify, changeListener);
 	}
+	
+	/*
+	 * Create the "Protocol:" label and combo box.
+	 */
+	private void createProtocolSection(Composite parent) {
+		protocolLabel = new Label(parent, SWT.NONE);
+		protocolLabel.setText(Messages.AddICDialog_8);
+		protocolCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
+		protocolCombo.add("http"); //$NON-NLS-1$
+		protocolCombo.add(PROTOCOL_HTTPS);
+		protocolCombo.select(0);
+	}
 
 	/*
 	 * Create the port radio buttons, and text field.
@@ -207,6 +228,11 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 
 		return enteredPath;
 	}
+	
+	public String getEnteredProtocol() {
+
+		return enteredProtocol;
+	}
 
 	public String getEnteredPort() {
 
@@ -225,7 +251,8 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 		enteredHost = hostText.getText();
 		enteredName = nameText.getText();
 		enteredPath = pathText.getText();
-
+		enteredProtocol = protocolCombo.getText();
+		
 		// Logic here for setting port values
 		if (radio1.getSelection()) // Use Default
 		{
@@ -324,7 +351,4 @@ public class AddICDialog extends StatusDialog implements IShellProvider {
 		}
 	}
 
-	
-		
-	
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/EditICDialog.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/EditICDialog.java
index db065cd..b9346ff 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/EditICDialog.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/EditICDialog.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -21,6 +21,7 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Event;
@@ -43,6 +44,10 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 	private Label pathLabel;
 
 	private Text pathText;
+	
+	private Label protocolLabel;
+
+	private Combo protocolCombo;
 
 	private Button radio1;
 
@@ -63,6 +68,8 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 	private String selectedPort = ""; //$NON-NLS-1$
 
 	private String selectedPath = ""; //$NON-NLS-1$
+	
+	private String selectedProtocol = ""; //$NON-NLS-1$
 
 	private String enteredHost;
 
@@ -71,11 +78,15 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 	private String enteredPort;
 
 	private String enteredPath;
+	
+	private String enteredProtocol;
 
 	private String enteredUseDefault;
 		
 	private StatusInfo dialogStatus;
 	
+	private static final String PROTOCOL_HTTP = "http"; //$NON-NLS-1$
+	private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
 	
 	public EditICDialog(Shell parentShell, String infoCenterName) {
 
@@ -116,6 +127,7 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 		createNameSection(topGroup);
 		createHostSection(topGroup);
 		createPathSection(topGroup);
+		createProtocolSection(topGroup);
 		createPortSection(topGroup);
 	
 		//Initialize validator and setup for User Input
@@ -178,6 +190,22 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 	}
 
 	/*
+	 * Create the "Protocol:" label and combo box.
+	 */
+	private void createProtocolSection(Composite parent) {
+		protocolLabel = new Label(parent, SWT.NONE);
+		protocolLabel.setText(Messages.EditICDialog_15);
+		protocolCombo = new Combo(parent, SWT.DROP_DOWN | SWT.READ_ONLY);
+		protocolCombo.add("http"); //$NON-NLS-1$
+		protocolCombo.add(PROTOCOL_HTTPS);
+		
+		if(selectedProtocol.equalsIgnoreCase(PROTOCOL_HTTP))
+			protocolCombo.select(0);
+		else if(selectedProtocol.equalsIgnoreCase(PROTOCOL_HTTPS))
+			protocolCombo.select(1);
+	}
+	
+	/*
 	 * Create the port radio buttons, and text field.
 	 */
 	private void createPortSection(Composite parent) {
@@ -216,13 +244,13 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 	}
 
 	public void setTextValues(String icName, String host, String port,
-			String path) {
+			String path,String protocol) {
 
 		selectedName = icName;
 		selectedHost = host;
 		selectedPort = port;
 		selectedPath = path;
-
+		selectedProtocol=protocol;
 	}
 
 	public String getEnteredHost() {
@@ -234,6 +262,11 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 
 		return enteredPath;
 	}
+	
+	public String getEnteredProtocol() {
+
+		return enteredProtocol;
+	}
 
 	public String getEnteredPort() {
 
@@ -253,6 +286,7 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 		enteredHost = hostText.getText();
 		enteredName = nameText.getText();
 		enteredPath = pathText.getText();
+		enteredProtocol = protocolCombo.getText();
 
 		//Logic here for setting port values
 		if (radio1.getSelection()) //Use Default
@@ -341,7 +375,4 @@ public class EditICDialog extends StatusDialog implements IShellProvider {
 			
 		}
 	}
-	
-	
-
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentBlock.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentBlock.java
index acf226a..49c2f1f 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentBlock.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentBlock.java
@@ -1,15 +1,17 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.help.ui.internal.preferences;
 
+import java.util.Vector;
+
 import org.eclipse.help.internal.base.remote.RemoteIC;
 import org.eclipse.help.ui.internal.Messages;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -37,6 +39,8 @@ public class HelpContentBlock {
 	private Button viewPropertiesButton;
 	private Button testICConnectionButton;
 	private Button enableDisableICButton;
+	private Button upButton;
+	private Button downButton;
 	private IHelpContentBlockContainer container;
 	private RemoteICViewer remoteICviewer = null;
 	private int validated = 2;
@@ -57,6 +61,10 @@ public class HelpContentBlock {
 				testICConnection();
 			} else if (enableDisableICButton == source) {
 				enableDisableIC();
+			} else if (upButton == source) {
+				moveICUp();
+			} else if (downButton == source) {
+				moveICDown();
 			}
 		}
 	};
@@ -93,9 +101,16 @@ public class HelpContentBlock {
 			Messages.HelpContentBlock_3 : Messages.HelpContentBlock_4;
 		enableDisableICButton = container.createPushButton(parent, enableTitle); 
 		enableDisableICButton.addSelectionListener(selectionListener);
-
+		
+		upButton = container.createPushButton(parent, 
+				Messages.HelpContentBlock_upTitle);
+		upButton.addSelectionListener(selectionListener);
+		
+		downButton = container.createPushButton(parent, 
+				Messages.HelpContentBlock_downTitle);
+		downButton.addSelectionListener(selectionListener);
 	}
-
+	
 	private void viewICProperties() {
 
 		// Get selected item
@@ -107,7 +122,7 @@ public class HelpContentBlock {
 					.getControl().getShell(), remoteic.getName());
 
 			dialog.setTextValues(remoteic.getName(), remoteic.getHost(),
-					remoteic.getPort(), remoteic.getPath(), true);
+					remoteic.getPort(), remoteic.getPath(), remoteic.getProtocol(),remoteic.isEnabled());
 			remoteICviewer.getTable().setSelection(indexSelected);
 
 			if (dialog.open() == Window.OK) {
@@ -144,7 +159,7 @@ public class HelpContentBlock {
 					.getShell(), remoteic.getName());
 
 			dialog.setTextValues(remoteic.getName(), remoteic.getHost(),
-					remoteic.getPort(), remoteic.getPath());
+					remoteic.getPort(), remoteic.getPath(),remoteic.getProtocol());
 
 			remoteICviewer.getTable().setSelection(indexSelected);
 
@@ -165,6 +180,7 @@ public class HelpContentBlock {
 				remoteic.setHost(host);
 				remoteic.setPath(dialog.getEnteredPath());
 				remoteic.setPort(dialog.getEnteredPort());
+				remoteic.setProtocol(dialog.getEnteredProtocol());
 
 				remoteICviewer.getRemoteICList().updateRemoteIC(remoteic);
 			}
@@ -190,7 +206,7 @@ public class HelpContentBlock {
 				host = host.substring(7);
 			
 			RemoteIC remoteic = new RemoteIC(true, dialog.getEnteredName(),
-					host, dialog.getEnteredPath(), dialog
+					host, dialog.getEnteredPath(), dialog.getEnteredProtocol(),dialog
 							.getEnteredPort());
 			remoteICviewer.getRemoteICList().addRemoteIC(remoteic);
 			rowCount = remoteICviewer.getTable().getItemCount();
@@ -205,6 +221,9 @@ public class HelpContentBlock {
 
 			enableDisableICButton.setText(Messages.HelpContentBlock_3);
 			enableDisableICButton.setEnabled(true);
+			
+			upButton.setEnabled(true);
+			downButton.setEnabled(true);
 		}
 
 	}
@@ -220,7 +239,7 @@ public class HelpContentBlock {
 
 		if (remoteic != null) {
 			isConnected = TestConnectionUtility.testConnection(remoteic.getHost(),
-					remoteic.getPort(), remoteic.getPath());
+					remoteic.getPort(), remoteic.getPath(),remoteic.getProtocol());
 			TestConnectionDialog dialog = new TestConnectionDialog(
 					remoteICviewer.getControl().getShell());
 			dialog.setValues(remoteic.getName(), remoteic.getHost(), remoteic
@@ -257,6 +276,61 @@ public class HelpContentBlock {
 	}
 
 	/**
+	 * Raise the search priority of the selected InfoCenter
+	 */
+	public void moveICUp() {
+		// Get selected item
+		RemoteIC remoteic = (RemoteIC) ((IStructuredSelection) remoteICviewer
+				.getSelection()).getFirstElement();
+		
+		RemoteIC[] rics = remoteICviewer.getRemoteICList().getRemoteICArray();
+		
+		for(int i = 0; i < rics.length; i++) {
+			if(rics[i] == remoteic) {
+				// Move the item as long as it's not already at the top of the list
+				if(i > 0) { 
+					remoteic = rics[i - 1];
+					rics[i - 1] = rics[i];
+					rics[i] = remoteic;
+				}
+			}
+		}
+		updateRemoteICs(rics);
+	}
+	
+	/**
+	 * Lower the search priority of the selected InfoCenter
+	 */
+	public void moveICDown() {
+		// Get selected item
+		RemoteIC remoteic = (RemoteIC) ((IStructuredSelection) remoteICviewer
+				.getSelection()).getFirstElement();
+		
+		RemoteIC[] rics = remoteICviewer.getRemoteICList().getRemoteICArray();
+		
+		for(int i = 0; i < rics.length; i++) {
+			if(rics[i] == remoteic) {
+				// Move the item as long as it's not already at the bottom of the list
+				if(i < (rics.length - 1)) { 
+					remoteic = rics[i + 1];
+					rics[i + 1] = rics[i];
+					rics[i] = remoteic;
+				}
+			}
+		}
+		updateRemoteICs(rics);
+	}
+	
+	/**
+	 * @param rics the ordered ICs
+	 */
+	public void updateRemoteICs(RemoteIC[] rics) {
+		Vector v = new Vector();
+		for(int i = 0; i < rics.length; i++) { v.add(rics[i]); }
+		getRemoteICviewer().updateRemoteICList(v);
+	}
+	
+	/**
 	 * Creates the group which will contain the buttons.
 	 */
 	private void createButtonGroup(Composite top) {
@@ -320,6 +394,10 @@ public class HelpContentBlock {
 				enableDisableICButton.setEnabled(true);
 				selectedEntry.setEnabled(false);
 			}
+			
+			upButton.setEnabled(true);
+			downButton.setEnabled(true);
+			
 		} else {
 			restoreDefaultButtons();
 		}
@@ -352,14 +430,16 @@ public class HelpContentBlock {
 		testICConnectionButton.setEnabled(false);
 		enableDisableICButton.setEnabled(false);
 		enableDisableICButton.setText(Messages.HelpContentBlock_4);
+		upButton.setEnabled(false);
+		downButton.setEnabled(false);
 		
-		//Clear previous table selection
+		// Clear previous table selection
 		indexSelected = - 1;
 		
 
 	}
+	
 	public void disableAllButtons() {
-
 		addNewICButton.setEnabled(false);
 		editICButton.setEnabled(false);
 		removeICButton.setEnabled(false);
@@ -367,7 +447,8 @@ public class HelpContentBlock {
 		testICConnectionButton.setEnabled(false);
 		enableDisableICButton.setEnabled(false);
 		enableDisableICButton.setText(Messages.HelpContentBlock_4);
-
+		upButton.setEnabled(false);
+		downButton.setEnabled(false);
 	}
 
 	public RemoteICViewer getRemoteICviewer()
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
index f4ef90f..703f6cb 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/HelpContentPreferencePage.java
@@ -43,14 +43,15 @@ public class HelpContentPreferencePage extends PreferencePage implements
 
 	private InfocenterDisplay remoteICPage;
 
-	private Button checkbox;
+	private Button searchLocalHelpOnly;
+	private Button searchLocalHelpFirst;
+	private Button searchLocalHelpLast;
 	private Label descLabel;
 
 	/**
 	 * Creates the preference page
 	 */
 	public HelpContentPreferencePage() {
-		
 	}
 
 	/*
@@ -71,18 +72,19 @@ public class HelpContentPreferencePage extends PreferencePage implements
 				IHelpUIConstants.PREF_PAGE_HELP_CONTENT);
 
 		initializeDialogUnits(parent);
-
-		createCheckbox(parent);
 		
 		descLabel = new Label(parent, SWT.NONE);
 		descLabel.setText(Messages.HelpContentPage_title);
 		Dialog.applyDialogFont(descLabel);
 		
+		createSearchLocalHelpOnly(parent);
+		createSearchLocalHelpFirst(parent);
+		createSearchLocalHelpLast(parent);
+		
 		remoteICPage = new InfocenterDisplay(this);
 		remoteICPage.createContents(parent);
-		
 
-		initializeTableEnablement(checkbox.getSelection());
+		initializeTableEnablement(searchLocalHelpOnly.getSelection());
 		
 		return parent;
 	}
@@ -100,7 +102,11 @@ public class HelpContentPreferencePage extends PreferencePage implements
 		currentBlock.getRemoteICviewer().getRemoteICList().removeAllRemoteICs(currentBlock.getRemoteICList());
 		currentBlock.getRemoteICviewer().getRemoteICList().loadDefaultPreferences();
 		currentBlock.restoreDefaultButtons();
-		checkbox.setSelection(new DefaultPreferenceFileHandler().isRemoteHelpOn());
+		boolean remoteHelpOn = new DefaultPreferenceFileHandler().isRemoteHelpOn();
+		boolean remoteHelpPreferred = new DefaultPreferenceFileHandler().isRemoteHelpPreferred();
+		searchLocalHelpOnly.setSelection(!remoteHelpOn);
+		searchLocalHelpFirst.setSelection(remoteHelpOn && !remoteHelpPreferred);
+		searchLocalHelpLast.setSelection(remoteHelpOn && remoteHelpPreferred);
 		changeListener.handleEvent(null);
 	}
 
@@ -121,7 +127,8 @@ public class HelpContentPreferencePage extends PreferencePage implements
 		 * 
 		 * @see org.eclipse.jface.preference.PreferencePage#performOk()
 		 */
-		prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, checkbox.getSelection());
+		prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, !(searchLocalHelpOnly.getSelection()));
+		prefs.putBoolean(IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, searchLocalHelpLast.getSelection());
 	
 		currentBlock=remoteICPage.getHelpContentBlock();
 		currentRemoteICArray=currentBlock.getRemoteICList();
@@ -141,33 +148,62 @@ public class HelpContentPreferencePage extends PreferencePage implements
 		return super.setButtonLayoutData(button);
 	}
 
-	private void createCheckbox(Composite parent) {
-		checkbox = new Button(parent, SWT.CHECK);
-		checkbox.setText(Messages.HelpContentPreferencePage_remote);
-		checkbox.addListener(SWT.Selection, changeListener);
+	private void createSearchLocalHelpOnly(Composite parent) {
+		searchLocalHelpOnly = new Button(parent, SWT.RADIO);
+		searchLocalHelpOnly.setText(Messages.SearchEmbeddedHelpOnly);
+		searchLocalHelpOnly.addListener(SWT.Selection, changeListener);
 
-		boolean isOn = Platform.getPreferencesService().getBoolean
+		boolean isRemoteOn = Platform.getPreferencesService().getBoolean
 		    (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
-		checkbox.setSelection(isOn);
-		Dialog.applyDialogFont(checkbox);	
+		
+		searchLocalHelpOnly.setSelection(!isRemoteOn);
+		Dialog.applyDialogFont(searchLocalHelpOnly);	
+	}
+	
+	private void createSearchLocalHelpFirst(Composite parent) {
+		searchLocalHelpFirst = new Button(parent, SWT.RADIO);
+		searchLocalHelpFirst.setText(Messages.SearchEmbeddedHelpFirst);
+		searchLocalHelpFirst.addListener(SWT.Selection, changeListener);
+		
+		boolean isRemoteOn = Platform.getPreferencesService().getBoolean
+	    	(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+		boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
+	    	(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
+		
+		searchLocalHelpFirst.setSelection(isRemoteOn && !isRemotePreferred);
+		Dialog.applyDialogFont(searchLocalHelpFirst);
+	}
+	
+	private void createSearchLocalHelpLast(Composite parent) {
+		searchLocalHelpLast = new Button(parent, SWT.RADIO);
+		searchLocalHelpLast.setText(Messages.SearchEmbeddedHelpLast);
+		searchLocalHelpLast.addListener(SWT.Selection, changeListener);
+		
+		boolean isRemoteOn = Platform.getPreferencesService().getBoolean
+			(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_ON, false, null);
+		boolean isRemotePreferred = Platform.getPreferencesService().getBoolean
+			(HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_REMOTE_HELP_PREFERRED, false, null);
+		
+		searchLocalHelpLast.setSelection(isRemoteOn && isRemotePreferred);
+		Dialog.applyDialogFont(searchLocalHelpLast);
 	}
 	
 	/*
 	 * Initialize the table enablement with the current checkbox selection 
 	 */
 	
-	private void initializeTableEnablement(boolean isRemoteHelpEnabled)
+	private void initializeTableEnablement(boolean isRemoteHelpDisabled)
 	{
 		
 		HelpContentBlock currentBlock=remoteICPage.getHelpContentBlock();
 		
-		if(isRemoteHelpEnabled)
-			currentBlock.restoreDefaultButtons();
-		else
+		if(isRemoteHelpDisabled)
 			currentBlock.disableAllButtons();
+		else
+			currentBlock.restoreDefaultButtons();
 			
 		// Disable/Enable table
-		currentBlock.getRemoteICviewer().getTable().setEnabled(isRemoteHelpEnabled);
+		currentBlock.getRemoteICviewer().getTable().setEnabled(!isRemoteHelpDisabled);
 	}
 
 	/*
@@ -179,19 +215,17 @@ public class HelpContentPreferencePage extends PreferencePage implements
 
 			HelpContentBlock currentBlock=remoteICPage.getHelpContentBlock();			
 			
-			boolean isRemoteHelpEnabled=checkbox.getSelection();
+			boolean isRemoteHelpEnabled = !(searchLocalHelpOnly.getSelection());
 			//  Disable/Enable buttons
 			if(isRemoteHelpEnabled)
 				currentBlock.restoreDefaultButtons();
 			else
 				currentBlock.disableAllButtons();
-				
+			
 			// Disable/Enable table
 			currentBlock.getRemoteICviewer().getTable().setEnabled(isRemoteHelpEnabled);
-			
-			
-			
 		}
+		
 	};
-
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICLabelProvider.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICLabelProvider.java
index fe5263b..bbd4983 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ import org.eclipse.swt.graphics.Image;
 public class RemoteICLabelProvider extends LabelProvider implements
 		ITableLabelProvider {
 
-	private final String PROTOCOL = "http://"; //$NON-NLS-1$
+	private final String PROTOCOL = "://"; //$NON-NLS-1$
 
 	public Image getColumnImage(Object element, int columnIndex) {
 		return null;
@@ -37,11 +37,11 @@ public class RemoteICLabelProvider extends LabelProvider implements
 			
 			if(remoteic.getPort().equals("80")) //$NON-NLS-1$
 			{
-				result = PROTOCOL + remoteic.getHost() + remoteic.getPath();
+				result = remoteic.getProtocol() + PROTOCOL + remoteic.getHost() + remoteic.getPath();
 			}
 			else
 			{
-				result = PROTOCOL + remoteic.getHost() + ":" + remoteic.getPort() //$NON-NLS-1$
+				result = remoteic.getProtocol() + PROTOCOL + remoteic.getHost() + ":" + remoteic.getPort() //$NON-NLS-1$
 				+ remoteic.getPath();
 			}
 			break;
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICList.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICList.java
index 3c1d9fe..e7b3d00 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICList.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICList.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -47,7 +47,7 @@ public class RemoteICList {
 		// Load the preferences in org.eclipse.help.base/preferences.ini
 		prefsFileHandler = new PreferenceFileHandler();
 		int totalICs = prefsFileHandler.getTotalRemoteInfocenters();
-		String host,name,path,port,enabledDisabled;
+		String host,name,path,protocol,port,enabledDisabled;
 		boolean currEnabled;
 		
 		for (int i = 0; i < totalICs; i++) {
@@ -56,6 +56,7 @@ public class RemoteICList {
 			name = (prefsFileHandler.getNameEntries())[i];
 			path = (prefsFileHandler.getPathEntries())[i];
 			port = (prefsFileHandler.getPortEntries())[i];
+			protocol = (prefsFileHandler.getProtocolEntries())[i];
 			enabledDisabled=(prefsFileHandler.getEnabledEntries())[i];
 			if(enabledDisabled.equals("true")) //$NON-NLS-1$
 			{
@@ -68,7 +69,7 @@ public class RemoteICList {
 			
 			// Add preferences to the model
 			RemoteIC initRemoteIC;
-			initRemoteIC = new RemoteIC(currEnabled, name, host, path, port);
+			initRemoteIC = new RemoteIC(currEnabled, name, host, path, protocol, port);
 			remote_ics.add(initRemoteIC);
 		}
 	}
@@ -78,7 +79,7 @@ public class RemoteICList {
 		// Load the preferences in org.eclipse.help.base/preferences.ini
 		DefaultPreferenceFileHandler handler = new DefaultPreferenceFileHandler();
 		int totalICs = handler.getTotalRemoteInfocenters();
-		String host,name,path,port,enabledDisabled;
+		String host,name,path,protocol,port,enabledDisabled;
 		boolean currEnabled;
 		
 		for (int i = 0; i < totalICs; i++) {
@@ -86,6 +87,7 @@ public class RemoteICList {
 			host = (handler.getHostEntries())[i];
 			name = (handler.getNameEntries())[i];
 			path = (handler.getPathEntries())[i];
+			protocol = (handler.getProtocolEntries())[i];
 			port = (handler.getPortEntries())[i];
 			enabledDisabled=(handler.getEnabledEntries())[i];
 			if(enabledDisabled.equals("true")) //$NON-NLS-1$
@@ -99,7 +101,7 @@ public class RemoteICList {
 			
 			// Add preferences to the model
 			RemoteIC initRemoteIC;
-			initRemoteIC = new RemoteIC(currEnabled, name, host, path, port);
+			initRemoteIC = new RemoteIC(currEnabled, name, host, path, protocol, port);
 
 			addRemoteIC(initRemoteIC);
 		}
@@ -113,6 +115,13 @@ public class RemoteICList {
 	}
 
 	/**
+	 * @param rics the new set of remote ICs
+	 */
+	public void setRemoteICs(Vector rics) {
+		remote_ics = rics;
+	}
+	
+	/**
 	 * Return the remote IC at the given index in the table
 	 */
 	public RemoteIC getRemoteICAtIndex(int index)
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICViewer.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICViewer.java
index 79203f5..c940685 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICViewer.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/RemoteICViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,16 @@
 package org.eclipse.help.ui.internal.preferences;
 
 import java.util.Arrays;
+import java.util.Vector;
 
 import org.eclipse.help.internal.base.remote.RemoteIC;
 import org.eclipse.help.ui.internal.Messages;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableLayout;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.swt.SWT;
@@ -90,30 +94,37 @@ public class RemoteICViewer {
 		gridData.horizontalAlignment = GridData.FILL;
 		gridData.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
 		gridData.heightHint =  table.getItemHeight();
+		gridData.horizontalSpan = 1;
 		table.setLayoutData(gridData);
-		table.setFont(parent.getFont());
-		table.setLinesVisible(true);
+		
+		TableLayout tableLayout = new TableLayout();
+		table.setLayout(tableLayout);
 		table.setHeaderVisible(true);
+		table.setLinesVisible(true);
+		table.setFont(parent.getFont());
 
-		TableColumn column;
+		ColumnLayoutData[] fTableColumnLayouts= {
+		        new ColumnWeightData(85),
+		        new ColumnWeightData(165),
+		        new ColumnWeightData(60)
+		};  
 		
-		// 2nd column with IC name
-		column =new TableColumn(table, SWT.LEFT);
-		column.setText(NAME_COLUMN);
-		column.setWidth(85);
-
-		// 3rd column with IC name
-		column = new TableColumn(table, SWT.LEFT);
-		column.setText(LOCATION_COLUMN); 
-		column.setWidth(165);
+		TableColumn column;
 		
-
-		//4th column with IC Status enabled/disabled	
-		column = new TableColumn(table, SWT.CENTER);
-		column.setText(STATUS_COLUMN); 
-		column.setWidth(60);
-
-
+		tableLayout.addColumnData(fTableColumnLayouts[0]);
+	    column = new TableColumn(table, SWT.NONE, 0);
+	    column.setResizable(fTableColumnLayouts[0].resizable);
+	    column.setText(NAME_COLUMN);
+	    
+	    tableLayout.addColumnData(fTableColumnLayouts[1]);
+	    column = new TableColumn(table, SWT.NONE, 1);
+	    column.setResizable(fTableColumnLayouts[1].resizable);
+	    column.setText(LOCATION_COLUMN); 
+	    
+	    tableLayout.addColumnData(fTableColumnLayouts[2]);
+	    column = new TableColumn(table, SWT.NONE, 2);
+	    column.setResizable(fTableColumnLayouts[2].resizable);
+	    column.setText(STATUS_COLUMN); 
 	}
 
 	/**
@@ -174,6 +185,21 @@ public class RemoteICViewer {
 	}
 
 	/**
+	 * @param rics the ordered remote InfoCenters
+	 */
+	public void updateRemoteICList(Vector rics) {
+		getRemoteICList().setRemoteICs(rics);
+		updateView();
+	}
+	
+	/**
+	 * Make sure the table viewer shows the latest copy of the ordered InfoCenters 
+	 */
+	public void updateView() {
+		getTableViewer().refresh(getRemoteICList());
+	}
+	
+	/**
 	 * Return the column names in a collection
 	 * 
 	 * @return List containing column names
@@ -188,7 +214,7 @@ public class RemoteICViewer {
 	public ISelection getSelection() {
 		return tableViewer.getSelection();
 	}
-
+	
 	/**
 	 * Return the RemoteICList
 	 */
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TestConnectionUtility.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TestConnectionUtility.java
index db9e8cc..21a11ad 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TestConnectionUtility.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/TestConnectionUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,43 +12,65 @@
  package org.eclipse.help.ui.internal.preferences;
 
 import java.io.IOException;
+import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import org.eclipse.help.internal.base.remote.HttpsUtility;
 
 public class TestConnectionUtility {
 
 	//This class provides a utility for testing if a connection
 	//can be made to a given URL
+	private static final String PROTOCOL_HTTPS = "https"; //$NON-NLS-1$
+	
+	private final static int SOCKET_TIMEOUT = 5000; //milliseconds
 	
 	public static boolean testConnection(String thisHost, String thisPort,
-			String thisPath) {
+			String thisPath, String thisProtocol) {
 
 		URL testURL;
 		boolean validConnection = true;
-		String urlConnection = "http://"; //$NON-NLS-1$
+		String urlConnection = ""; //$NON-NLS-1$
 
 		// Build connection string
 		if (thisPort.equals("80")) //$NON-NLS-1$
-			urlConnection = urlConnection + thisHost + thisPath;
+			urlConnection = thisProtocol+"://" + thisHost + thisPath; //$NON-NLS-1$
 		else
-			urlConnection = urlConnection + thisHost + ":" + thisPort //$NON-NLS-1$
+			urlConnection = thisProtocol+"://" + thisHost + ":" + thisPort //$NON-NLS-1$ //$NON-NLS-2$
 					+ thisPath;
 
-		// Test Connection. If exception thrown, invalid connection
-		try {
-			testURL = new URL(urlConnection);
-
-			URLConnection myConnect = testURL.openConnection();
-			//TODO: Add some time out for the connection test
-			myConnect.connect();
-
-		} catch (MalformedURLException e) {
-			validConnection = false;
-		} catch (IOException e) {
-			validConnection = false;
+		if(thisProtocol.equalsIgnoreCase("http")) //$NON-NLS-1$
+		{
+			// Test Connection. If exception thrown, invalid connection
+			try {
+				testURL = new URL(urlConnection);
+	
+				URLConnection testConnect = testURL.openConnection();
+				setTimeout(testConnect,SOCKET_TIMEOUT);
+				testConnect.connect();
+	
+			} catch (MalformedURLException e) {
+				validConnection = false;
+			} catch (IOException e) {
+				validConnection = false;
+			}
+		}
+		else if(thisProtocol.equalsIgnoreCase(PROTOCOL_HTTPS))
+		{
+			validConnection = HttpsUtility.canConnectToHttpsURL(urlConnection);
 		}
 		return validConnection;
 	}
 
+	private static void setTimeout(URLConnection conn, int milliseconds) {
+		Class conClass = conn.getClass();
+		try {
+			Method timeoutMethod = conClass.getMethod(
+					"setConnectTimeout", new Class[]{ int.class } ); //$NON-NLS-1$
+			timeoutMethod.invoke(conn, new Object[] { new Integer(milliseconds)} );
+		} catch (Exception e) {
+		     // If running on a 1.4 JRE an exception is expected, fall through
+		} 
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ViewICPropsDialog.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ViewICPropsDialog.java
index d9284db..dee87dd 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ViewICPropsDialog.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/preferences/ViewICPropsDialog.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -40,6 +40,10 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 	private Label pathLabel;
 
 	private Label pathText;
+	
+	private Label protocolLabel;
+
+	private Label protocolText;
 
 	private Label portLabel;
 
@@ -66,6 +70,8 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 	private String selectedPort = ""; //$NON-NLS-1$
 
 	private String selectedPath = ""; //$NON-NLS-1$
+	
+	private String selectedProtocol = ""; //$NON-NLS-1$
 
 	private boolean selectedEnabled;
 
@@ -98,6 +104,7 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 		createNameSection(topGroup);
 		createHostSection(topGroup);
 		createPathSection(topGroup);
+		createProtocolSection(topGroup);
 		createPortSection(topGroup);
 		createURLValidateSection(topGroup);
 		createEnabledSection(topGroup);
@@ -161,6 +168,18 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 		pathText.setText(selectedPath);
 
 	}
+	
+	/*
+	 * Create the "Protocol:" label and text field.
+	 */
+	private void createProtocolSection(Composite parent) {
+		protocolLabel = new Label(parent, SWT.NONE);
+		protocolLabel.setText(Messages.ViewICPropsDialog_14);
+		protocolText = new Label(parent, SWT.NONE);
+		protocolText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		protocolText.setText(selectedProtocol);
+
+	}
 
 	/*
 	 * Create the port radio buttons, and text field.
@@ -178,11 +197,11 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 		urlValue = new Label(parent, SWT.NONE);
 		if(selectedPort.equals("80")) //$NON-NLS-1$
 		{
-			urlValue.setText("http://"+selectedHost + selectedPath); //$NON-NLS-1$
+			urlValue.setText(selectedProtocol+"://"+selectedHost + selectedPath); //$NON-NLS-1$
 		}
 		else
 		{
-			urlValue.setText("http://"+selectedHost + ":" + selectedPort + selectedPath); //$NON-NLS-1$ //$NON-NLS-2$
+			urlValue.setText(selectedProtocol+"://"+selectedHost + ":" + selectedPort + selectedPath); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 
 	}
@@ -201,12 +220,13 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 	}
 
 	public void setTextValues(String icName, String host, String port,
-			String path, boolean isEnabled) {
+			String path, String protocol, boolean isEnabled) {
 
 		selectedName = icName;
 		selectedHost = host;
 		selectedPort = port;
 		selectedPath = path;
+		selectedProtocol = protocol;
 		selectedEnabled = isEnabled;
 		
 		
@@ -217,7 +237,7 @@ public class ViewICPropsDialog extends StatusDialog implements IShellProvider {
 		StatusInfo status = new StatusInfo(); 
 		
 		// Check to see if connection is valid
-		boolean isConnection=TestConnectionUtility.testConnection(selectedHost,selectedPort, selectedPath);
+		boolean isConnection=TestConnectionUtility.testConnection(selectedHost,selectedPort, selectedPath,selectedProtocol);
 		
 		if(isConnection)
 			status.setInfo(Messages.ViewICPropsDialog_23);
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
new file mode 100644
index 0000000..dfb9b53
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaContentProvider.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.ui.internal.search;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.ui.internal.Messages;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class HelpCriteriaContentProvider implements ITreeContentProvider {
+	
+	public static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
+
+	public static class CriterionName{
+		public CriterionName(String id, Object parent) {
+			this.id = id;
+			this.parent = parent;
+		}
+		
+		private String id;
+		private Object parent;
+		
+		public String getId() {
+			return id;
+		}
+		
+		public String getName() {
+			return HelpPlugin.getCriteriaManager().getCriterionDisplayName(id, Platform.getNL());
+		}
+
+		public Object getParent() {
+			return parent;
+		}
+		
+		public boolean equals(Object arg0) {
+			if (arg0 instanceof CriterionName) {
+				CriterionName other = (CriterionName) arg0;
+				return other.id.equals(this.id);
+			}
+			return false;
+		}
+		
+		public int hashCode() {
+			return id.hashCode();
+		}
+	}
+	
+	public static class CriterionValue{
+		public CriterionValue(String id, Object parent) {
+			this.id = id;
+			this.parent = parent;
+		}
+		
+		private String id;
+		private Object parent;
+		
+		public String getId() {
+			return id;
+		}
+		
+		public String getName() {
+			if (id.equals(UNCATEGORIZED)) {
+				return Messages.UncategorizedCriteria;
+			}
+			CriterionName parentCriterion = (CriterionName) parent;
+			return HelpPlugin.getCriteriaManager().getCriterionValueDisplayName(parentCriterion.id, id, Platform.getNL());
+		}
+
+		public Object getParent() {
+			return parent;
+		}
+		
+		public boolean equals(Object arg0) {
+			if (arg0 instanceof CriterionValue) {
+				CriterionValue other = (CriterionValue) arg0;
+				return other.id.equals(this.id) && parent.equals(other.parent);
+			}
+			return false;
+		}
+		
+		public int hashCode() {
+			return id.hashCode() + parent.hashCode();
+		}
+	}
+
+	/**
+	 * Constructor for HelpWorkingSetTreeContentProvider.
+	 */
+	public HelpCriteriaContentProvider() {
+		super();
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+	 */
+	public Object[] getChildren(Object parentElement) {
+		if (parentElement instanceof String[]) {
+			String[] names = (String[]) parentElement;
+			CriterionName criterionNames[] = new  CriterionName[names.length];
+			for (int i = 0; i < names.length; i++) {
+				criterionNames[i] = new CriterionName(names[i], parentElement);
+			}
+			return criterionNames;
+		} else if (parentElement instanceof CriterionName) {
+			CriterionName parentCriterion = (CriterionName) parentElement;
+			
+			String[] values = BaseHelpSystem.getWorkingSetManager().getCriterionValueIds(parentCriterion.getId());
+		    CriterionValue[] criterionValues = new CriterionValue[values.length];
+			for (int i = 0; i < values.length; i++) {
+				criterionValues[i] = new CriterionValue(values[i], parentElement);
+			}
+			return criterionValues;
+		} else {
+			return new Object[0];
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+	 */
+	public Object getParent(Object element) {
+		if (element instanceof CriterionName) {
+			return ((CriterionName) element).getParent();
+		} else if (element instanceof CriterionValue) {
+			return ((CriterionValue) element).getParent();
+		} else 
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+	 */
+	public boolean hasChildren(Object element) {
+		return getChildren(element).length > 0;
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+	 */
+	public Object[] getElements(Object inputElement) {
+		return getChildren(inputElement);
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
+	 *      java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java
new file mode 100644
index 0000000..2cdca5e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/HelpCriteriaLabelProvider.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.ui.internal.search;
+
+import org.eclipse.help.ui.internal.search.HelpCriteriaContentProvider.CriterionName;
+import org.eclipse.help.ui.internal.search.HelpCriteriaContentProvider.CriterionValue;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class HelpCriteriaLabelProvider extends LabelProvider {
+
+	/**
+	 * Constructor for HelpWorkingSetElementLabelProvider.
+	 */
+	public HelpCriteriaLabelProvider() {
+		super();
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+	 */
+	public Image getImage(Object element) {
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+	 */
+	public String getText(Object element) {
+		if (element instanceof HelpCriteriaContentProvider.CriterionName) {
+			CriterionName criterionName = (HelpCriteriaContentProvider.CriterionName)element;
+			return criterionName.getName();
+		} else if (element instanceof HelpCriteriaContentProvider.CriterionValue) {
+			CriterionValue criterionValue = (HelpCriteriaContentProvider.CriterionValue)element;
+			return criterionValue.getName();
+		} 
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
index fb0cb95..74e32e2 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalHelpPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,12 +12,17 @@
 package org.eclipse.help.ui.internal.search;
 
 import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
+import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.*;
+import org.eclipse.help.internal.criteria.CriterionResource;
 import org.eclipse.help.internal.workingset.*;
 import org.eclipse.help.ui.*;
 import org.eclipse.help.ui.internal.Messages;
-import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.help.ui.internal.search.HelpCriteriaContentProvider.CriterionName;
+import org.eclipse.help.ui.internal.search.HelpCriteriaContentProvider.CriterionValue;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
@@ -34,18 +39,22 @@ public class LocalHelpPage extends RootScopePage {
 
 	private Button searchSelected;
 
-	private CheckboxTreeViewer tree;
+	private CheckboxTreeViewer contentTree;
 
-	private ITreeContentProvider treeContentProvider;
+	private ITreeContentProvider contentTreeContentProvider;
 
-	private ILabelProvider elementLabelProvider;
+	private ILabelProvider contentTreeLabelProvider;
+	
+	private CheckboxTreeViewer criteriaTree;
+
+	private ITreeContentProvider criteriaTreeContentProvider;
+
+	private ILabelProvider criteriaTreeLabelProvider;
 
 	//private boolean firstCheck;
 
 	private WorkingSet workingSet;
 
-	private Button capabilityFiltering;
-
 	public void init(IEngineDescriptor ed, String scopeSetName) {
 		super.init(ed, scopeSetName);
 		if (scopeSetName != null)
@@ -76,8 +85,10 @@ public class LocalHelpPage extends RootScopePage {
 		searchAll.setLayoutData(gd);
 		searchAll.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				tree.getTree().setEnabled(false);
-				// searchQueryData.setBookFiltering(false);
+				contentTree.getTree().setEnabled(false);
+				if (criteriaTree != null) {
+				    criteriaTree.getTree().setEnabled(false);
+				}
 			}
 		});
 
@@ -88,8 +99,11 @@ public class LocalHelpPage extends RootScopePage {
 		searchSelected.setLayoutData(gd);
 		searchSelected.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				tree.getTree().setEnabled(true);
-				// searchQueryData.setBookFiltering(false);
+				contentTree.getTree().setEnabled(true);
+				if (criteriaTree != null) {
+				    criteriaTree.getTree().setEnabled(true);
+
+				}
 			}
 		});
 
@@ -98,110 +112,166 @@ public class LocalHelpPage extends RootScopePage {
 		else
 			searchSelected.setSelection(true);
 
-		Label label = new Label(parent, SWT.WRAP);
-		label.setFont(font);
-		label.setText(Messages.WorkingSetContent); 
+		Label contentLabel = new Label(parent, SWT.WRAP);
+		contentLabel.setFont(font);
+		contentLabel.setText(Messages.WorkingSetContent); 
 		gd = new GridData(GridData.GRAB_HORIZONTAL
 				| GridData.HORIZONTAL_ALIGN_FILL
 				| GridData.VERTICAL_ALIGN_CENTER);
 		gd.horizontalSpan = 2;
-		label.setLayoutData(gd);
+		contentLabel.setLayoutData(gd);
+
+		createContentTree(parent, font);
+		
+		if (HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+			Label criteriaLabel = new Label(parent, SWT.WRAP);
+			criteriaLabel.setFont(font);
+			criteriaLabel.setText(Messages.WorkingSetCriteria); 
+			gd = new GridData(GridData.GRAB_HORIZONTAL
+					| GridData.HORIZONTAL_ALIGN_FILL
+					| GridData.VERTICAL_ALIGN_CENTER);
+			gd.horizontalSpan = 2;
+			criteriaLabel.setLayoutData(gd);
+		    createCriteriaTree(parent, font);
+		}
+		
+		initializeCheckedState();
+		applyDialogFont(parent);
+
+		// Set help for the page
+		// WorkbenchHelp.setHelp(tree, "help_workingset_page");
+		return 1;
+	}
 
-		tree = new CheckboxTreeViewer(parent, SWT.BORDER | SWT.H_SCROLL
+	protected void createContentTree(Composite parent, Font font) {
+		GridData gd;
+		contentTree = new CheckboxTreeViewer(parent, SWT.BORDER | SWT.H_SCROLL
 				| SWT.V_SCROLL);
 		gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
-		gd.heightHint = convertHeightInCharsToPixels(15);
+		gd.heightHint = getTreeHeightHint();
 		gd.horizontalSpan = 2;
-		tree.getControl().setLayoutData(gd);
-		tree.getControl().setFont(font);
+		contentTree.getControl().setLayoutData(gd);
+		contentTree.getControl().setFont(font);
 
-		treeContentProvider = new HelpWorkingSetTreeContentProvider();
-		tree.setContentProvider(treeContentProvider);
+		contentTreeContentProvider = new HelpWorkingSetTreeContentProvider();
+		contentTree.setContentProvider(contentTreeContentProvider);
 
-		elementLabelProvider = new HelpWorkingSetElementLabelProvider();
-		tree.setLabelProvider(elementLabelProvider);
+		contentTreeLabelProvider = new HelpWorkingSetElementLabelProvider();
+		contentTree.setLabelProvider(contentTreeLabelProvider);
 
-		tree.setUseHashlookup(true);
+		contentTree.setUseHashlookup(true);
 
-		tree.setInput(BaseHelpSystem.getWorkingSetManager().getRoot());
+		contentTree.setInput(BaseHelpSystem.getWorkingSetManager().getRoot());
 
-		tree.addCheckStateListener(new ICheckStateListener() {
+		contentTree.addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
-				handleCheckStateChange(event);
+				handleCheckStateChange(event, contentTree, contentTreeContentProvider);
 			}
 		});
 
-		tree.addTreeListener(new ITreeViewerListener() {
+		contentTree.addTreeListener(new ITreeViewerListener() {
 			public void treeCollapsed(TreeExpansionEvent event) {
 			}
 
 			public void treeExpanded(TreeExpansionEvent event) {
 				final Object element = event.getElement();
-				if (tree.getGrayed(element) == false)
+				if (contentTree.getGrayed(element) == false)
 					BusyIndicator.showWhile(getShell().getDisplay(),
 							new Runnable() {
 								public void run() {
-									setSubtreeChecked(element, tree
-											.getChecked(element), false);
+									setSubtreeChecked(element, contentTree
+											.getChecked(element), false, contentTree, contentTreeContentProvider);
 								}
 							});
 			}
 		});
-		tree.getTree().setEnabled(workingSet != null);
-		capabilityFiltering = new Button(parent, SWT.CHECK);
-		String checkboxLabel = HelpBasePlugin.getActivitySupport().getLocalScopeCheckboxLabel();
-		if (checkboxLabel==null)
-			checkboxLabel = Messages.LocalHelpPage_capabilityFiltering_name;  
-		capabilityFiltering.setText(checkboxLabel);
-		gd = new GridData();
+		contentTree.getTree().setEnabled(workingSet != null);
+	}
+
+	protected int getTreeHeightHint() {
+		if (HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+			return convertHeightInCharsToPixels(8);
+		}
+		return convertHeightInCharsToPixels(15);
+	}
+	
+
+	protected void createCriteriaTree(Composite parent, Font font) {
+		GridData gd;
+		criteriaTree = new CheckboxTreeViewer(parent, SWT.BORDER | SWT.H_SCROLL
+				| SWT.V_SCROLL);
+		gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
+		gd.heightHint = getTreeHeightHint();
 		gd.horizontalSpan = 2;
-		capabilityFiltering.setLayoutData(gd);
-		
-		initializeCheckedState();
-		applyDialogFont(parent);
+		criteriaTree.getControl().setLayoutData(gd);
+		criteriaTree.getControl().setFont(font);
 
-		// Set help for the page
-		// WorkbenchHelp.setHelp(tree, "help_workingset_page");
-		return 1;
+		criteriaTreeContentProvider = new HelpCriteriaContentProvider();
+		criteriaTree.setContentProvider(criteriaTreeContentProvider);
+
+		criteriaTreeLabelProvider = new HelpCriteriaLabelProvider();
+		criteriaTree.setLabelProvider(criteriaTreeLabelProvider);
+
+		criteriaTree.setUseHashlookup(true);
+
+		criteriaTree.setInput(BaseHelpSystem.getWorkingSetManager().getCriterionIds());
+
+		criteriaTree.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				handleCheckStateChange(event, criteriaTree, criteriaTreeContentProvider);
+			}
+		});
+
+		criteriaTree.addTreeListener(new ITreeViewerListener() {
+			public void treeCollapsed(TreeExpansionEvent event) {
+			}
+
+			public void treeExpanded(TreeExpansionEvent event) {
+				final Object element = event.getElement();
+				if (criteriaTree.getGrayed(element) == false)
+					BusyIndicator.showWhile(getShell().getDisplay(),
+							new Runnable() {
+								public void run() {
+									setSubtreeChecked(element, criteriaTree
+											.getChecked(element), false, criteriaTree, criteriaTreeContentProvider);
+								}
+							});
+			}
+		});
+		criteriaTree.getTree().setEnabled(workingSet != null);
 	}
 
+
 	private void initializeCheckedState() {
-		IPreferenceStore store = getPreferenceStore();
-		capabilityFiltering.setSelection(store.getBoolean(getEngineDescriptor()
-				.getId()
-				+ "." + LocalSearchScopeFactory.P_CAPABILITY_FILTERING)); //$NON-NLS-1$
 		if (workingSet == null)
 			return;
 
 		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
 			public void run() {
-				Object[] elements = workingSet.getElements();
-				tree.setCheckedElements(elements);
-				for (int i = 0; i < elements.length; i++) {
-					Object element = elements[i];
-					if (isExpandable(element))
-						setSubtreeChecked(element, true, true);
-					updateParentState(element, true);
+				initializeContentTree();
+				if (HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+				    initializeCriteriaTree();
 				}
 			}
 		});
 	}
 
-	boolean isExpandable(Object element) {
-		return treeContentProvider.hasChildren(element);
+	boolean isExpandable(Object element, ITreeContentProvider contentProvider) {
+		return contentProvider.hasChildren(element);
 	}
 
-	void updateParentState(Object child, boolean baseChildState) {
+	void updateParentState(Object child, boolean baseChildState, 
+			               CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
 		if (child == null)
 			return;
 
-		Object parent = treeContentProvider.getParent(child);
+		Object parent = contentProvider.getParent(child);
 		if (parent == null)
 			return;
 
 		boolean allSameState = true;
 		Object[] children = null;
-		children = treeContentProvider.getChildren(parent);
+		children = contentProvider.getChildren(parent);
 
 		for (int i = children.length - 1; i >= 0; i--) {
 			if (tree.getChecked(children[i]) != baseChildState
@@ -214,13 +284,14 @@ public class LocalHelpPage extends RootScopePage {
 		tree.setGrayed(parent, !allSameState);
 		tree.setChecked(parent, !allSameState || baseChildState);
 
-		updateParentState(parent, baseChildState);
+		updateParentState(parent, baseChildState, tree, contentProvider);
 	}
 
 	void setSubtreeChecked(Object parent, boolean state,
-			boolean checkExpandedState) {
+			boolean checkExpandedState,  
+            CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
 
-		Object[] children = treeContentProvider.getChildren(parent);
+		Object[] children = contentProvider.getChildren(parent);
 		for (int i = children.length - 1; i >= 0; i--) {
 			Object element = children[i];
 			if (state) {
@@ -228,33 +299,56 @@ public class LocalHelpPage extends RootScopePage {
 				tree.setGrayed(element, false);
 			} else
 				tree.setGrayChecked(element, false);
-			if (isExpandable(element))
-				setSubtreeChecked(element, state, checkExpandedState);
+			if (isExpandable(element, contentProvider))
+				setSubtreeChecked(element, state, checkExpandedState, tree, contentProvider);
 		}
 	}
 
-	private void findCheckedElements(java.util.List checkedResources,
-			Object parent) {
-		Object[] children = treeContentProvider.getChildren(parent);
+	private void findCheckedElements(java.util.List checkedResources, Object parent,  
+            CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+		Object[] children = contentProvider.getChildren(parent);
 		for (int i = 0; i < children.length; i++) {
 			if (tree.getGrayed(children[i]))
-				findCheckedElements(checkedResources, children[i]);
+				findCheckedElements(checkedResources, children[i], tree, contentProvider);
 			else if (tree.getChecked(children[i]))
 				checkedResources.add(children[i]);
 		}
 	}
+	
+	private CriterionResource[] findCheckedCriteria(Object parent,  
+            CheckboxTreeViewer tree, ITreeContentProvider contentProvider) {
+		Object[] children = contentProvider.getChildren(parent);
+		List resources = new ArrayList();
+		for (int i = 0; i < children.length; i++) {
+			// First level children are names
+			CriterionName name = (CriterionName) children[i];
+			CriterionResource resource = new CriterionResource(name.getId());
+			Object[] grandChildren = contentProvider.getChildren(name);
+			for (int j = 0; j < grandChildren.length; j++) {
+				if (tree.getChecked(grandChildren[j])) {
+				    CriterionValue value = (CriterionValue) grandChildren[j];
+				    resource.addCriterionValue(value.getId());
+				}
+			}
+			if (resource.getCriterionValues().size() > 0) {
+				resources.add(resource);
+			}
+		}
+		return (CriterionResource[])resources.toArray(new CriterionResource[resources.size()]);
+	}
 
-	void handleCheckStateChange(final CheckStateChangedEvent event) {
+	void handleCheckStateChange(final CheckStateChangedEvent event,  
+            final CheckboxTreeViewer tree, final ITreeContentProvider contentProvider) {
 		BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
 			public void run() {
 				Object element = event.getElement();
 				boolean state = event.getChecked();
 				tree.setGrayed(element, false);
-				if (isExpandable(element))
-					setSubtreeChecked(element, state, state);
+				if (isExpandable(element, contentProvider))
+					setSubtreeChecked(element, state, state, tree, contentProvider);
 				// only check subtree if state is set to true
 
-				updateParentState(element, state);
+				updateParentState(element, state, tree, contentProvider);
 				// validateInput();
 			}
 		});
@@ -262,16 +356,26 @@ public class LocalHelpPage extends RootScopePage {
 
 	public WorkingSet getWorkingSet() {
 		ArrayList elements = new ArrayList(10);
-		findCheckedElements(elements, tree.getInput());
+		CriterionResource[] criteria;
+		if (!HelpPlugin.getCriteriaManager().isCriteriaEnabled()) {
+			criteria = new CriterionResource[0];
+		} else {
+			criteria = findCheckedCriteria(
+				criteriaTree.getInput(), 
+				criteriaTree, 
+				criteriaTreeContentProvider);
+		}
+		findCheckedElements(elements, contentTree.getInput(), contentTree, contentTreeContentProvider);
 		if (workingSet == null) {
 			workingSet = new WorkingSet(
 					getScopeSetName(),
 					(AdaptableHelpResource[]) elements
-							.toArray(new AdaptableHelpResource[elements.size()]));
+							.toArray(new AdaptableHelpResource[elements.size()]), criteria);
 		} else {
 			workingSet.setName(getScopeSetName());
 			workingSet.setElements((AdaptableHelpResource[]) elements
 					.toArray(new AdaptableHelpResource[elements.size()]));
+			workingSet.setCriteria(criteria);
 		}
 		return workingSet;
 	}
@@ -294,11 +398,38 @@ public class LocalHelpPage extends RootScopePage {
 				getScopeSetName());
 		getPreferenceStore().setValue(
 				getKey(LocalSearchScopeFactory.P_CAPABILITY_FILTERING),
-				capabilityFiltering.getSelection());
+				false);
 		return super.performOk();
 	}
 
 	private String getKey(String key) {
 		return getEngineDescriptor().getId() + "." + key; //$NON-NLS-1$
 	}
+
+	protected void initializeContentTree() {
+		Object[] elements = workingSet.getElements();
+		contentTree.setCheckedElements(elements);
+		for (int i = 0; i < elements.length; i++) {
+			Object element = elements[i];
+			if (isExpandable(element, contentTreeContentProvider))
+				setSubtreeChecked(element, true, true, contentTree, contentTreeContentProvider);
+			updateParentState(element, true, contentTree, contentTreeContentProvider);
+		}
+	}
+
+	protected void initializeCriteriaTree() {
+		CriterionResource[] criteria = workingSet.getCriteria();
+		criteriaTree.setCheckedElements(criteria);
+		for (int i = 0; i < criteria.length; i++) {
+			CriterionResource element = criteria[i];
+			CriterionName name = new CriterionName(element.getCriterionName(), null);
+			List values = element.getCriterionValues();
+			for (Iterator iter = values.iterator(); iter.hasNext();) {
+				String valueString = (String) iter.next();
+				CriterionValue value = new CriterionValue(valueString, name);
+			    criteriaTree.setChecked(value, true);
+				updateParentState(value, true, criteriaTree, criteriaTreeContentProvider);
+			}
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
index 37c9e40..2b26145 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/search/LocalSearchScopeFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,6 @@ public class LocalSearchScopeFactory implements ISearchScopeFactory {
         if (name != null)
             workingSet = BaseHelpSystem.getWorkingSetManager().getWorkingSet(name);
         boolean capabilityFiltering = store.getBoolean(engineId+"."+P_CAPABILITY_FILTERING); //$NON-NLS-1$
-        return new LocalHelpScope(workingSet, !capabilityFiltering);
+        return new LocalHelpScope(workingSet, capabilityFiltering);
     }
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
index 0f29574..644f655 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/util/FontUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,15 @@
 
 package org.eclipse.help.ui.internal.util;
 
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.service.environment.Constants;
 import org.eclipse.swt.widgets.Display;
 
 public class FontUtils {
 	
 	private static final int TRAY_FONT_HEIGHT_LIMIT = 17;
 
-	/**
+	/*
 	 * Determine whether the font is suitable for use in a tray dialog
 	 * @return true if the font is so large that the tray would look bad.
 	 */
@@ -29,5 +31,33 @@ public class FontUtils {
 			return true;
 		}
 	}
+	
+	/*
+	 * Get a sequence of JavaScript which will scale the embedded browser contents
+	 * @param percent The percentage scaling relative to the default size
+	 * @return Javascript to perform the scaling or null if we cannot create scaling script for this OS/browser
+	 */
+	static public String getRescaleScript(int percent) {
+		String scaleString = percent/100 + "." + (percent % 100) / 10; //$NON-NLS-1$
+		String os = Platform.getOS();
+		if (Constants.WS_WIN32.equalsIgnoreCase(os) ||
+		    Constants.OS_MACOSX.equalsIgnoreCase(os)) {
+			return "document.body.style.zoom = " + scaleString; //$NON-NLS-1$
+		}
+		return null;  // No rescale in Mozilla browsers
+	}
+	
+	/*
+	 * Function to determine whether the browser in the help view supports a zoom command
+	 */
+	static public boolean canRescaleHelpView() {
+		String os = Platform.getOS();
+		if (Constants.WS_WIN32.equalsIgnoreCase(os) ||
+			Constants.OS_MACOSX.equalsIgnoreCase(os)) {
+			return true;
+		}
+		// No rescale in Mozilla browsers, see Bug 227198
+		return false;
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
index 52efaf7..4be56d9 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/BrowserPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.help.ui.internal.HelpUIPlugin;
 import org.eclipse.help.ui.internal.HelpUIResources;
 import org.eclipse.help.ui.internal.IHelpUIConstants;
 import org.eclipse.help.ui.internal.Messages;
+import org.eclipse.help.ui.internal.util.FontUtils;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
@@ -49,10 +50,12 @@ import org.eclipse.ui.IMemento;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.forms.AbstractFormPart;
 import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.osgi.service.prefs.BackingStoreException;
 
 public class BrowserPart extends AbstractFormPart implements IHelpPart {
 	private final static String QUERY = "BrowserPartQuery:"; //$NON-NLS-1$
 	private final static String HIGHLIGHT_ON = "highlight-on"; //$NON-NLS-1$
+	private final static String HELP_VIEW_SCALE = "help_view_scale"; //$NON-NLS-1$
     private final static String EMPTY_PAGE = "<html><head></head><body></body></html>"; //$NON-NLS-1$
     
 	private ReusableHelpPart parent;
@@ -63,6 +66,14 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 
 	private int lastProgress = -1;
 
+	private static final int SCALE_MAX = 250;
+	
+	private static final int SCALE_MIN = 50;
+	
+	private static final int SCALE_INCREMENT = 10;
+	
+	private int fontScalePercentage = 100;
+
 	private String url;
 
 	private Action showExternalAction;
@@ -74,13 +85,17 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 	private Action bookmarkAction;
 
 	private Action printAction;
+	
+	private Action magnifyAction;
+	
+	private Action reduceAction;
 
 	private String statusURL;
 
 	private String title;
 
 	public BrowserPart(final Composite parent, FormToolkit toolkit,
-			final IToolBarManager tbm) {
+			final IToolBarManager tbm, IMenuManager menuManager) {
 		browser = new Browser(parent, SWT.NULL);
 		browser.addLocationListener(new LocationListener() {
 			public void changing(LocationEvent event) {
@@ -138,6 +153,9 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 					monitor.done();
 				}
 				lastProgress = -1;
+				if (fontScalePercentage != 100) {
+				    rescale();
+				}
 				String value = executeQuery("document.title"); //$NON-NLS-1$
 				BrowserPart.this.title = value != null ? value : "N/A"; //$NON-NLS-1$
 			}
@@ -172,15 +190,11 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 			}
 		});
 		contributeToToolBar(tbm);
+		contributeToMenu(menuManager);
 	}
 
 	private String executeQuery(String domValue) {
-		String query = "window.status=\"" + QUERY + "\"+" + domValue + ";"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		boolean status = browser.execute(query);
-		if (status) {
-			return (String) browser.getData("query"); //$NON-NLS-1$
-		}
-		return null;
+		return (String)browser.evaluate("return " + domValue + ';'); //$NON-NLS-1$
 	}
 
 	private boolean processQuery(String text) {
@@ -229,6 +243,7 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 		bookmarkAction.setToolTipText(Messages.BrowserPart_bookmarkTooltip);
 		bookmarkAction.setImageDescriptor(HelpUIResources
 				.getImageDescriptor(IHelpUIConstants.IMAGE_ADD_BOOKMARK));
+		
 		highlightAction = new Action() {
 			public void run() {
 				InstanceScope instanceScope = new InstanceScope();
@@ -257,6 +272,48 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 		tbm.insertBefore("back", bookmarkAction); //$NON-NLS-1$
 		tbm.insertBefore("back", highlightAction); //$NON-NLS-1$
 		tbm.insertBefore("back", new Separator()); //$NON-NLS-1$
+		enableButtons();
+	}
+	
+	private void contributeToMenu(IMenuManager menuManager) {
+		if (FontUtils.canRescaleHelpView()) {
+			fontScalePercentage = Platform.getPreferencesService().getInt(HelpBasePlugin.PLUGIN_ID,
+					HELP_VIEW_SCALE, 100, null);
+			if (menuManager != null) {
+			    addMenuActions(menuManager); 
+			}
+		}
+	}
+
+	private void addMenuActions(IMenuManager menuManager) {
+		magnifyAction = new Action() {
+
+			public void run() {
+				doMagnify(SCALE_INCREMENT);
+			}
+		};
+		magnifyAction.setToolTipText(Messages.BrowserPart_magnifyTooltip);
+		magnifyAction.setText(Messages.BrowserPart_magnifyTooltip);
+		magnifyAction.setImageDescriptor(HelpUIResources
+				.getImageDescriptor(IHelpUIConstants.IMAGE_MAGNIFY));
+		magnifyAction.setDisabledImageDescriptor(HelpUIResources
+				.getImageDescriptor(IHelpUIConstants.IMAGE_D_MAGNIFY));
+
+		reduceAction = new Action() {
+
+			public void run() {
+				doMagnify(-SCALE_INCREMENT);
+			}
+		};
+		reduceAction.setToolTipText(Messages.BrowserPart_reduceTooltip);
+		reduceAction.setText(Messages.BrowserPart_reduceTooltip);
+		reduceAction
+				.setImageDescriptor(HelpUIResources.getImageDescriptor(IHelpUIConstants.IMAGE_REDUCE));
+		reduceAction.setDisabledImageDescriptor(HelpUIResources
+				.getImageDescriptor(IHelpUIConstants.IMAGE_D_REDUCE));
+		menuManager.add(new Separator());
+		menuManager.add(reduceAction);
+		menuManager.add(magnifyAction);
 	}
 
 	/*
@@ -415,6 +472,30 @@ public class BrowserPart extends AbstractFormPart implements IHelpPart {
 			return printAction;
 		return null;
 	}
+	
+	private void enableButtons() {
+		if (magnifyAction != null) {
+		    magnifyAction.setEnabled(fontScalePercentage < SCALE_MAX);
+	        reduceAction.setEnabled(fontScalePercentage > SCALE_MIN);	
+		}
+	}
+
+	private void doMagnify(int percent) {
+		fontScalePercentage += percent;
+		InstanceScope instanceScope = new InstanceScope();
+		IEclipsePreferences prefs = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+		prefs.putInt(HELP_VIEW_SCALE, fontScalePercentage);
+		try {
+			prefs.flush();
+		} catch (BackingStoreException e) {
+		}
+		rescale();
+	}
+
+	public void rescale() {
+		browser.execute(FontUtils.getRescaleScript(fontScalePercentage)); 
+		enableButtons();
+	}
 
 	public void toggleRoleFilter() {
 	}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
index dbac0c7..11c6598 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ContextHelpPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,9 @@
 package org.eclipse.help.ui.internal.views;
 
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.HelpSystem;
@@ -42,7 +44,9 @@ import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.IWizardContainer;
 import org.eclipse.osgi.util.NLS;
-
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
 import org.eclipse.swt.custom.CTabFolder;
 import org.eclipse.swt.custom.CTabItem;
 import org.eclipse.swt.graphics.Font;
@@ -138,9 +142,9 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 
 		text.addHyperlinkListener(new IHyperlinkListener() {
 			public void linkActivated(HyperlinkEvent e) {
-				Object href = e.getHref();
-				if (href.equals(MORE_HREF)) {
-					doMore();
+				String href = (String) e.getHref();
+				if (href.startsWith(MORE_HREF)) {
+					doMore(href.substring(MORE_HREF.length()));
 				}  else {
 				   doOpenLink(e.getHref());
 				}
@@ -155,6 +159,16 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 			}
 		});
 		text.setText(defaultText, false, false);
+		text.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+		    public void getName(AccessibleEvent e) {
+		        if (e.childID == ACC.CHILDID_SELF) {
+		            String currentName = e.result;
+		            e.result = Messages.ReusableHelpPart_contextHelpPage_name 
+		              + ' ' + getSection().getText()+ ' ' +currentName;    
+		        }
+		    }
+		});
+
 	}
 
 	private static int getSectionStyle() {
@@ -313,7 +327,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 	
 	private long lastUpdate = 0;
 
-	private String phrase;
+	private String[] searchTerms;
 	
 	/*
 	 * If F1 was pressed within the last half second and this is a context change do not
@@ -366,27 +380,26 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 
 	private void updateSearchExpression(String expression, Control c) {
 		if (expression == null) {
-			expression = computeDefaultSearchExpression(c);
+			searchTerms = computeSearchTerms(c);
+		} else {
+		    searchTerms = new String[] { expression };
 		}
-		phrase = expression;
 	}
 	
 	private void updateDynamicHelp() {
 		RelatedTopicsPart part = (RelatedTopicsPart) parent
 				.findPart(IHelpUIConstants.HV_RELATED_TOPICS);
 		if (part != null) {
-			if (phrase != null) {
+			if (searchTerms != null) {
 				if (HelpPlugin.DEBUG_CONTEXT) {
-				    System.out.println("Dynamic help - search for " + phrase); //$NON-NLS-1$
+				    System.out.println("Dynamic help - search for " + searchTerms); //$NON-NLS-1$
 			    }
-				part.startSearch(phrase, lastContext);
+				part.startSearch(buildSearchExpression(searchTerms), lastContext);
 			}
 		}
 	}
 
-	private String computeDefaultSearchExpression(Control c) {
-		String[] searchTerms = computeSearchTerms(c);
-		
+	private String buildSearchExpression(String[] searchTerms) {
 		StringBuffer buff = new StringBuffer();
 		for (int i = 0; i < searchTerms.length; i++) {
 			if (buff.length() > 0)
@@ -397,13 +410,31 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 		}
 		return buff.length() > 0 ? buff.toString().trim() : null;
 	}
+	
+	private class SearchTerms {
+		
+		private List terms = new ArrayList();
+		private Set termSet = new HashSet();
+		public void add(String term) {
+			String lowerCaseTerm = term.toLowerCase();
+			// Do not allow duplicates
+			if (!termSet.contains(lowerCaseTerm)) {
+				termSet.add(lowerCaseTerm);
+				terms.add(term);
+			}
+		}
+		
+		public String[] toArray() {
+			return (String[]) terms.toArray(new String[terms.size()]);
+		}
+	}
 
 	/*
 	 * Used for both dynamic help and to get a useful title
 	 */
 	private String[] computeSearchTerms(Control c) {
 		Composite parent = c.getParent();
-		List searchTerms = new ArrayList();
+		SearchTerms searchTerms = new SearchTerms();
 		while (parent != null) {
 			Object data = parent.getData();
 			if (data instanceof IWizardContainer) {
@@ -452,7 +483,7 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 			}
 			parent = parent.getParent();
 		}
-		return (String[]) searchTerms.toArray(new String[searchTerms.size()]);
+		return (String[]) searchTerms.toArray();
 	}
 
 	private String getPageName(Control focusControl, Object page) {
@@ -587,21 +618,24 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 				}
 			}
 		}
-		if (!RelatedTopicsPart.isUseDynamicHelp() && phrase != null && phrase.length() > 0) {
+		if (!RelatedTopicsPart.isUseDynamicHelp() && searchTerms != null && searchTerms.length > 0) {
 			sbuf.append("<p><span color=\""); //$NON-NLS-1$
 			sbuf.append(IFormColors.TITLE);
 			sbuf.append("\">"); //$NON-NLS-1$
 			sbuf.append(Messages.ContextHelpPart_more);
 			sbuf.append("</span></p>"); //$NON-NLS-1$
-			sbuf.append("<p><img href=\""); //$NON-NLS-1$
-			sbuf.append(IHelpUIConstants.IMAGE_HELP_SEARCH);
-			sbuf.append("\"/>"); //$NON-NLS-1$
-			sbuf.append(" <a href=\""); //$NON-NLS-1$
-			sbuf.append(MORE_HREF);
-			sbuf.append("\">"); //$NON-NLS-1$
-			String searchForMessage = NLS.bind(Messages.ContextHelpPart_searchFor, phrase);
-			sbuf.append(EscapeUtils.escapeSpecialChars(searchForMessage));
-			sbuf.append("</a></p>"); //$NON-NLS-1$
+			for (int term = 0; term < searchTerms.length; term++) {
+				sbuf.append("<p><img href=\""); //$NON-NLS-1$
+				sbuf.append(IHelpUIConstants.IMAGE_HELP_SEARCH);
+				sbuf.append("\"/>"); //$NON-NLS-1$
+				sbuf.append(" <a href=\""); //$NON-NLS-1$
+				sbuf.append(MORE_HREF);
+				sbuf.append(term);
+				sbuf.append("\">"); //$NON-NLS-1$
+				String searchForMessage = NLS.bind(Messages.ContextHelpPart_searchFor, searchTerms[term]);
+				sbuf.append(EscapeUtils.escapeSpecialChars(searchForMessage));
+				sbuf.append("</a></p>"); //$NON-NLS-1$
+			}
 		}
 		sbuf.append("</form>"); //$NON-NLS-1$
 		return sbuf.toString();
@@ -705,7 +739,8 @@ public class ContextHelpPart extends SectionPart implements IHelpPart {
 	public void saveState(IMemento memento) {
 	}
 	
-	private void doMore() {
-		parent.startSearch(phrase);
+	private void doMore(String moreText) {
+		int index = Integer.parseInt(moreText);
+		parent.startSearch(searchTerms[index]);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java
index c74ad0e..fcf99a0 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/EngineResultSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -492,7 +492,7 @@ public class EngineResultSection {
 		buff.append("</b>"); //$NON-NLS-1$
 		buff.append("<br/>"); //$NON-NLS-1$
 		Throwable t = errorStatus.getException();
-		if (t != null)
+		if (t != null && t.getMessage() != null)
 			buff.append(EscapeUtils.escapeSpecialChars(t.getMessage()));
 		buff.append("</li>"); //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
index e527cae..0fa89e3 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpTray.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,7 +122,7 @@ public class HelpTray extends DialogTray implements IPageChangedListener {
 		gd.heightHint = 1;
 		separator.setLayoutData(gd);
 		helpPart = new ReusableHelpPart(PlatformUI.getWorkbench().getProgressService());
-		helpPart.init(null, tbm, null, null);
+		helpPart.init(null, tbm, null, null, null);
 		helpPart.setDefaultContextHelpText(Messages.HelpView_defaultText);
 		helpPart.createControl(container, toolkit);
 		gd = new GridData(GridData.FILL_BOTH);
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
index 1235c41..1916c32 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/HelpView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@ public class HelpView extends ViewPart implements IPartListener2,
 				getHelpPartStyle());
 		IActionBars actionBars = site.getActionBars();
 		reusableHelpPart.init(actionBars, actionBars.getToolBarManager(),
-				actionBars.getStatusLineManager(), memento);
+				actionBars.getStatusLineManager(), actionBars.getMenuManager(), memento);
 		IWorkbenchWindow window = site.getPage().getWorkbenchWindow();
 		IPartService service = window.getPartService();
 		service.addPartListener(this);
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
index 6c22445..6b20a65 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 Intel Corporation and others.
+ * Copyright (c) 2006, 2009 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,21 +8,29 @@
  * Contributors:
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation - 163558 Dynamic content support for all UA
+ *     IBM Corporation - Support for see elements
  *******************************************************************************/
 package org.eclipse.help.ui.internal.views;
 
 import org.eclipse.help.HelpSystem;
 import org.eclipse.help.IHelpResource;
 import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexEntry2;
+import org.eclipse.help.IIndexSee;
 import org.eclipse.help.UAContentFilter;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.base.HelpEvaluationContext;
+import org.eclipse.help.internal.base.util.IndexUtils;
+import org.eclipse.help.internal.index.IndexSee;
 import org.eclipse.help.ui.internal.IHelpUIConstants;
+import org.eclipse.help.ui.internal.Messages;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Tree;
@@ -65,6 +73,10 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 				return ((IIndexEntry) obj).getKeyword();
 			if (obj instanceof IHelpResource)
 				return ((IHelpResource) obj).getLabel();
+			if (obj instanceof IndexSee) {
+				IndexSee see = (IndexSee) obj;
+				return getSeeString(see);
+			} 
 			return super.getText(obj);
 		}
 
@@ -72,6 +84,16 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 			return super.getImage(obj);
 		}
 	}
+	
+	public String getSeeString(IIndexSee see) {
+		String seeText = see.isSeeAlso() ? Messages.SeeAlso : Messages.See;
+		String message = NLS.bind(seeText, see.getKeyword());
+		String[] path = IndexUtils.getPath(see);;
+		for (int i = 1; i < path.length; i++) {
+			message = NLS.bind(Messages.SeeList, message,path[i]);
+		}
+		return message;
+	}
 
 	class RoleFilter extends ViewerFilter {
 		public boolean select(Viewer viewer, Object parentElement,
@@ -80,6 +102,8 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 				return isEnabled((IIndexEntry) element);
 			} else if (element instanceof IHelpResource) {
 				return isEnabled((IHelpResource) element);
+			} else if (element instanceof IIndexSee) {
+				return isEnabled((IIndexSee) element);
 			}
 			return false;
 		}
@@ -96,6 +120,13 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 					if (isEnabled(subentries[i]))
 						return true;
 				}
+				if (entry instanceof IIndexEntry2) {
+					IIndexSee[] sees = ((IIndexEntry2)entry).getSees();
+					for (int i = 0; i < sees.length; i++) {
+						if (isEnabled(sees[i]))
+							return true;
+					}
+				}
 			}
 			return false;
 		}
@@ -137,6 +168,13 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 			if (topics.length == 1) {
 				parent.showURL(topics[0].getHref());
 			}
+		} else if (obj instanceof IIndexSee) {
+			IIndexSee see = (IIndexSee)obj;
+			IIndexEntry[] entrys = IndexUtils.findSeeTargets(HelpSystem.getIndex(), see, 0);
+			for (int i = 0; i < entrys.length; i++) {
+				treeViewer.setExpandedState(entrys[i], true);
+				treeViewer.setSelection(new StructuredSelection(entrys[i]), true);
+			}
 		}
 	}
 
@@ -170,17 +208,22 @@ public class IndexPart extends HyperlinkTreePart implements IHelpUIConstants {
 		 */
 		IHelpResource[] topics = entry.getTopics();
 		IIndexEntry[] subentries = entry.getSubentries();
+		IIndexSee[] sees = entry instanceof IIndexEntry2 ? ((IIndexEntry2)entry).getSees() : 
+			               new IIndexSee[0];
 
-		if (topics.length <= 1) {
-			return subentries;
+		if (topics.length <= 1 && subentries.length == 0 && sees.length == 0) {
+			// Entries with only one topic do not show children
+			return new Object[0];
 		}
 
-		Object[] childrens = new Object[topics.length + subentries.length];
-		System.arraycopy(topics, 0, childrens, 0, topics.length);
-		System.arraycopy(subentries, 0, childrens, topics.length, subentries.length);
+		Object[] children = new Object[topics.length + subentries.length + sees.length];
+		System.arraycopy(topics, 0, children, 0, topics.length);
+		System.arraycopy(subentries, 0, children, topics.length, subentries.length);
+		System.arraycopy(sees, 0, children, topics.length + subentries.length, sees.length);
 
-		return childrens; 
+		return children; 
 	}
+	
 
 	protected Tree getTreeWidget() {
 		return treeViewer.getTree();
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
index c4f9305..fe8b089 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/RelatedTopicsPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.help.ui.internal.views;
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.ui.internal.IHelpUIConstants;
 import org.eclipse.jface.action.IAction;
@@ -126,7 +127,8 @@ public class RelatedTopicsPart extends AbstractFormPart implements IHelpPart {
 	}
 	
 	public void handleActivation(Control c, IWorkbenchPart wpart) {
-		contextHelpPart.handleActivation(null, null, c, wpart, false);
+		IContextProvider provider = (wpart == null) ? null : (IContextProvider) wpart.getAdapter(IContextProvider.class);
+		contextHelpPart.handleActivation(provider, null, c, wpart, false);
 	}
 	
 	public void setDefaultText(String defaultText) {
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
index 19f4c56..71c8c7c 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/ReusableHelpPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.jface.action.IStatusLineManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubMenuManager;
 import org.eclipse.jface.action.SubStatusLineManager;
 import org.eclipse.jface.action.SubToolBarManager;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
@@ -181,6 +182,8 @@ public class ReusableHelpPart implements IHelpUIConstants,
 	
 	private EngineDescriptorManager engineManager;
 
+	public IMenuManager menuManager;
+
 	private abstract class BusyRunAction extends Action {
 		public BusyRunAction(String name) {
 			super(name);
@@ -299,7 +302,9 @@ public class ReusableHelpPart implements IHelpUIConstants,
 
 		private SubActionBars bars;
 
-		private IToolBarManager toolBarManager;
+		private IToolBarManager subToolBarManager;
+		
+		private IMenuManager subMenuManager;
 
 		protected ArrayList partRecs;
 
@@ -310,11 +315,21 @@ public class ReusableHelpPart implements IHelpUIConstants,
 			this.text = text;
 			partRecs = new ArrayList();
 			if (ReusableHelpPart.this.actionBars != null) {
+				// Help View
 				bars = new SubActionBars(ReusableHelpPart.this.actionBars);
-				toolBarManager = bars.getToolBarManager();
-			} else
-				toolBarManager = new SubToolBarManager(
+				subToolBarManager = bars.getToolBarManager();
+				subMenuManager = bars.getMenuManager();
+			} else {
+				// Help Tray
+				subToolBarManager = new SubToolBarManager(
 						ReusableHelpPart.this.toolBarManager);
+				if (ReusableHelpPart.this.menuManager != null) {
+					subMenuManager = new SubMenuManager(
+						ReusableHelpPart.this.menuManager);
+				} else {
+			        subMenuManager = null; 
+			    }
+			}
 		}
 
 		public HelpPartPage(String id, String text, String iconId) {
@@ -326,10 +341,14 @@ public class ReusableHelpPart implements IHelpUIConstants,
 			if (bars != null) {
 				bars.dispose();
 				bars = null;
-				toolBarManager = null;
+				subToolBarManager = null;
+				subMenuManager = null;
 			} else {			
 				try {
-					((SubToolBarManager) toolBarManager).disposeManager();
+					((SubToolBarManager) subToolBarManager).disposeManager();
+					if (subMenuManager != null) {
+					    ((SubMenuManager)subMenuManager).disposeManager();
+					}
 				} catch (RuntimeException e) {
 					// Bug 218079
 				}
@@ -354,7 +373,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
 		}
 
 		public IToolBarManager getToolBarManager() {
-			return toolBarManager;
+			return subToolBarManager;
 		}
 
 		public String getId() {
@@ -382,6 +401,17 @@ public class ReusableHelpPart implements IHelpUIConstants,
 		public PartRec[] getParts() {
 			return (PartRec[]) partRecs.toArray(new PartRec[partRecs.size()]);
 		}
+		
+		public void refreshPage()
+		{
+			PartRec parts[] = getParts();
+			if (parts==null)
+				return;
+			
+			for (int p=0;p<parts.length;p++)
+				if (parts[p]!=null && parts[p].part!=null && parts[p].part.isStale())
+					parts[p].part.refresh();
+		}
 
 		public int getNumberOfFlexibleParts() {
 			return nflexible;
@@ -483,7 +513,10 @@ public class ReusableHelpPart implements IHelpUIConstants,
 					bars.deactivate();
 				bars.updateActionBars();
 			} else {
-				((SubToolBarManager) toolBarManager).setVisible(visible);
+				((SubToolBarManager) subToolBarManager).setVisible(visible);
+				if (subMenuManager != null) {
+				    ((SubMenuManager)subMenuManager).setVisible(visible);
+				}
 				ReusableHelpPart.this.toolBarManager.update(true);
 				getControl().getParent().layout();
 			}
@@ -500,7 +533,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
 
 		private void createRecPart(PartRec rec) throws SWTError {
 			if (rec.part == null) {
-				rec.part = createPart(rec.id, toolBarManager);
+				rec.part = createPart(rec.id, subToolBarManager, subMenuManager);
 			}
 		}
 
@@ -764,10 +797,11 @@ public class ReusableHelpPart implements IHelpUIConstants,
 	}
 
 	public void init(IActionBars bars, IToolBarManager toolBarManager,
-			IStatusLineManager statusLineManager, IMemento memento) {
+			IStatusLineManager statusLineManager, IMenuManager menuManager, IMemento memento) {
 		this.memento = memento;
 		this.actionBars = bars;
 		this.toolBarManager = toolBarManager;
+		this.menuManager = menuManager;
 		this.statusLineManager = statusLineManager;
 		definePages();
 		makeActions();
@@ -955,6 +989,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
 		
 		HelpPartPage page = findPage(id);
 		if (page != null) {
+			page.refreshPage();
 			boolean success = flipPages(currentPage, page);
 			return success ? page : null;
 		}
@@ -1110,7 +1145,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
 		mform.setInput(new ContextHelpProviderInput(provider, context, control, part, isExplicitRequest));
 	}
 
-	private IHelpPart createPart(String id, IToolBarManager tbm) {
+	private IHelpPart createPart(String id, IToolBarManager tbm, IMenuManager menuManager) {
 		IHelpPart part = null;
 		Composite parent = mform.getForm().getBody();
 
@@ -1129,7 +1164,7 @@ public class ReusableHelpPart implements IHelpUIConstants,
 			((RelatedTopicsPart) part)
 					.setDefaultText(getDefaultContextHelpText());
 		} else if (id.equals(HV_BROWSER)) {
-			part = new BrowserPart(parent, mform.getToolkit(), tbm);
+			part = new BrowserPart(parent, mform.getToolkit(), tbm, menuManager);
 		} else if (id.equals(HV_SEARCH_RESULT)) {
 			part = new DynamicHelpPart(parent, mform.getToolkit());
 		} else if (id.equals(HV_FSEARCH_RESULT)) {
diff --git a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
index cc4dca4..37fe7dc 100644
--- a/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
+++ b/eclipse/plugins/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/SearchPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.jobs.IJobChangeListener;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.help.HelpSystem;
 import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.base.remote.RemoteStatusData;
 import org.eclipse.help.internal.search.federated.FederatedSearchEntry;
 import org.eclipse.help.internal.search.federated.FederatedSearchJob;
 import org.eclipse.help.search.ISearchEngineResult;
@@ -32,8 +33,10 @@ import org.eclipse.help.ui.internal.IHelpUIConstants;
 import org.eclipse.help.ui.internal.Messages;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.preference.PreferenceDialog;
 import org.eclipse.jface.preference.PreferenceManager;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyAdapter;
@@ -42,6 +45,7 @@ import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -58,6 +62,7 @@ import org.eclipse.ui.forms.events.HyperlinkEvent;
 import org.eclipse.ui.forms.widgets.FormText;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.ImageHyperlink;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.forms.widgets.TableWrapData;
 import org.eclipse.ui.forms.widgets.TableWrapLayout;
@@ -71,6 +76,10 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
 	private static final String HREF_SEARCH_HELP = "/org.eclipse.platform.doc.user/tasks/help_search.htm"; //$NON-NLS-1$
 
 	private static boolean SEARCH_HELP_AVAILABLE = false;
+	
+	
+	private ImageHyperlink remoteStatusLink;
+	private boolean wasHelpUnavailable = false;
 
 	static {
 		InputStream is = HelpSystem.getHelpContent(HREF_SEARCH_HELP);
@@ -232,10 +241,23 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
 		});
 		
 		createScopeSection(toolkit);
+		
+		createRemoteStatusLink(toolkit);
 		toolkit.paintBordersFor(container);
 		jobListener = new JobListener();
 		Job.getJobManager().addJobChangeListener(jobListener);
 	}
+	
+	public boolean isStale()
+	{
+		if (wasHelpUnavailable!=RemoteStatusData.isAnyRemoteHelpUnavailable())
+		{
+			wasHelpUnavailable=RemoteStatusData.isAnyRemoteHelpUnavailable();
+			return true;
+		}
+		
+		return false;
+	}
 
 	private void createScopeSection(FormToolkit toolkit) {
 		TableWrapData td;
@@ -281,7 +303,35 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
 		updateSearchWordText();
 		toolkit.paintBordersFor(detailGroup);
 	}
+	
+	private void createRemoteStatusLink(FormToolkit toolkit){
+		TableWrapData td;
+		
+		
+		Image warningImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
+		
+		remoteStatusLink = toolkit.createImageHyperlink(container, SWT.NULL);
+		remoteStatusLink.setText(Messages.remoteHelpUnavailable);
+		remoteStatusLink.setImage(warningImage);
+		remoteStatusLink.addHyperlinkListener(new HyperlinkAdapter() {
+
+			public void linkActivated(HyperlinkEvent e) {
+				doRemoteStatus();
+			}
+		});
+		
 
+		if (wasHelpUnavailable = RemoteStatusData.isAnyRemoteHelpUnavailable())
+			remoteStatusLink.setVisible(true);
+		else
+			remoteStatusLink.setVisible(false);
+		
+		td = new TableWrapData();
+		td.colspan = 2;
+		td.align = TableWrapData.FILL;
+		remoteStatusLink.setLayoutData(td);
+	}
+	
 	private void createAdvancedLink(Composite parent, FormToolkit toolkit) {
 		advancedLink = toolkit.createHyperlink(parent, Messages.FederatedSearchPart_advanced, SWT.NULL);
 		advancedLink.addHyperlinkListener(new HyperlinkAdapter() {
@@ -569,6 +619,10 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
 		updateMasters(set);
 	}
 
+	private void doRemoteStatus() {
+        SearchPart.this.parent.showURL("org.eclipse.help.webapp/SearchNetworkHelpStatus.html",true); //$NON-NLS-1$
+	}
+	
 	private void doChangeScopeSet() {
 		ScopeSetDialog dialog = new ScopeSetDialog(container.getShell(), scopeSetManager, parent
 				.getEngineManager());
@@ -640,6 +694,8 @@ public class SearchPart extends AbstractFormPart implements IHelpPart, IHelpUICo
 			searchPending = false;
 			doSearch(searchWordCombo.getText());
 		}
+		
+		remoteStatusLink.setVisible(RemoteStatusData.isAnyRemoteHelpUnavailable());
 	}
 
 	public String getId() {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.help.webapp/META-INF/MANIFEST.MF
index be2929f..e8d69be 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.help.webapp/META-INF/MANIFEST.MF
@@ -2,19 +2,19 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %help_webapp_plugin_name
 Bundle-SymbolicName: org.eclipse.help.webapp;singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.3.qualifier
 Bundle-Activator: org.eclipse.help.internal.webapp.HelpWebappPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Require-Bundle: org.eclipse.help.base;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+Require-Bundle: org.eclipse.help.base;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
  org.apache.jasper;bundle-version="5.5.17",
  org.eclipse.equinox.jsp.jasper.registry;bundle-version="1.0.100",
  org.eclipse.equinox.http.registry;bundle-version="1.0.200",
- org.eclipse.core.expressions;bundle-version="3.4.100"
+ org.eclipse.core.expressions;bundle-version="3.4.200"
 Export-Package: org.eclipse.help.internal.webapp;x-friends:="org.eclipse.ua.tests",
  org.eclipse.help.internal.webapp.data;x-friends:="org.eclipse.ua.tests",
- org.eclipse.help.internal.webapp.servlet;x-friends:="org.eclipse.ua.tests",
+ org.eclipse.help.internal.webapp.servlet;x-friends:="org.eclipse.ua.tests,org.eclipse.ua.tests.doc",
  org.eclipse.help.webapp
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: com.ibm.icu.text;version="3.8.0",
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/advanced.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/advanced.jsp
index 1548097..514a59f 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/advanced.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/advanced.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <title><%=ServletResources.getString("Advanced", request)%></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -218,7 +218,7 @@ for (int i=0; i<tocData.getTocCount(); i++)
   			<table cellspacing=10 cellpading=0 border=0 align=<%=isRTL?"left":"right"%>  style="background:transparent;">
 				<tr>
 					<td>
-						<input id="searchButton" class='button'  type="button" onclick="doAdvancedSearch()" value='<%=ServletResources.getString("Search", request)%>'  id="go" alt='<%=ServletResources.getString("Search", request)%>' title='<%=ServletResources.getString("Search", request)%>'>
+						<input id="searchButton" class='button'  type="button" onclick="doAdvancedSearch()" value='<%=ServletResources.getString("SearchLabel", request)%>'  id="go" alt='<%=ServletResources.getString("SearchLabel", request)%>' title='<%=ServletResources.getString("SearchLabel", request)%>'>
 					</td>
 					<td>
 					  	<input class='button' type="button" onclick="window.close()"  type="button"  value='<%=ServletResources.getString("Cancel", request)%>'  id="cancel" alt='<%=ServletResources.getString("Cancel", request)%>' title='<%=ServletResources.getString("Cancel", request)%>'>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/bookmarksView.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/bookmarksView.jsp
index 2fa543e..61b9ee3 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/bookmarksView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/bookmarksView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="Pragma" content="no-cache">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/confirmShowAll.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/confirmShowAll.jsp
index 8ca6894..de75e78 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/confirmShowAll.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/confirmShowAll.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2008 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <title><%=ServletResources.getString("confirmShowAllTitle", request)%></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/content.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/content.jsp
index 73712b4..5e47dd1 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/content.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/content.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -12,10 +12,11 @@
 
 <% 
 	LayoutData data = new LayoutData(application,request, response);
+	FrameData frameData = new FrameData(application,request, response);
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -43,11 +44,19 @@ FRAMESET {
 </style>
 
 </head>
-
-
-<frameset id="contentFrameset" rows="24,*" frameborder="0" framespacing="0" border=0 spacing=0>
-	<frame name="ContentToolbarFrame" title="<%=ServletResources.getString("topicViewToolbar", request)%>" src='<%="contentToolbar.jsp"+UrlUtil.htmlEncode(data.getQuery())%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+    <frameset id="contentFrameset" rows="<%=frameData.getContentAreaFrameSizes()%>" frameborder=0" framespacing="0" border="0" spacing="0">
+	<frame name="ContentToolbarFrame" title="<%=ServletResources.getString("topicViewToolbar", request)%>" src='<%="contentToolbar.jsp"+UrlUtil.htmlEncode(data.getQuery())%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" >
 	<frame ACCESSKEY="K" name="ContentViewFrame" title="<%=ServletResources.getString("topicView", request)%>" src='<%=UrlUtil.htmlEncode(data.getContentURL())%>'  marginwidth="10"<%=(data.isIE() && "6.0".compareTo(data.getIEVersion()) <=0)?"scrolling=\"yes\"":""%> marginheight="0" frameborder="0" >
+	<%
+	    AbstractFrame[] frames = frameData.getFrames(AbstractFrame.BELOW_CONTENT);
+	    for (int f = 0; f < frames.length; f++) {
+	        AbstractFrame frame = frames[f];
+	        String url = frameData.getUrl(frame);
+	%>
+	<frame name="<%=frame.getName()%>" src="<%=url %>" <%=frame.getFrameAttributes()%> >
+	<% 
+	 } 
+	%>
 </frameset>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/contentToolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/contentToolbar.jsp
index 3aa4cda..ab7f97c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/contentToolbar.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/contentToolbar.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2008 IBM Corporation and others.
+ Copyright (c) 2000, 2009 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/deferredView.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/deferredView.jsp
index 698d10c..6a7a1e0 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/deferredView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/deferredView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2006 IBM Corporation and others.
+ Copyright (c) 2006, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title><%=ServletResources.getString("Loading", request)%></title>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/err.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/err.jsp
index 68a65e3..fa317a4 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/err.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/err.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
 --%>
 <%@ page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"%>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/fheader.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/fheader.jsp
index 0f41145..5cc214f 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/fheader.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/fheader.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2007 IBM Corporation and others.
+ Copyright (c) 2000, 2009 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -9,7 +9,9 @@
      IBM Corporation - initial API and implementation
 --%><%@
 page import="org.eclipse.help.internal.webapp.data.*"  contentType="text/html; charset=UTF-8"
-%><% 
+%>
+<%@page import="org.eclipse.help.webapp.*" %>
+<% 
 request.setCharacterEncoding("UTF-8");
 boolean isRTL = UrlUtil.isRTL(request, response);
 String  direction = isRTL?"rtl":"ltr";
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/header.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/header.jsp
index d29c761..8e435a7 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/header.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/header.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2007 IBM Corporation and others.
+ Copyright (c) 2000, 2009 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -9,7 +9,9 @@
      IBM Corporation - initial API and implementation
 --%><%@
 page import="org.eclipse.help.internal.webapp.data.*"  contentType="text/html; charset=UTF-8"
-%><% 
+%>
+<%@ page import="org.eclipse.help.webapp.*" %>
+<% 
 request.setCharacterEncoding("UTF-8");
 boolean isRTL = UrlUtil.isRTL(request, response);
 String  direction = isRTL?"rtl":"ltr";
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/help.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/help.jsp
index c1e6080..a21f3c2 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/help.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/help.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2008 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/helpToolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/helpToolbar.jsp
new file mode 100644
index 0000000..d94d950
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/helpToolbar.jsp
@@ -0,0 +1,39 @@
+<%--
+ Copyright (c) 2009, 2010 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials 
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ 
+ Contributors:
+     IBM Corporation - initial API and implementation
+--%>
+<%@ include file="fheader.jsp"%>
+
+<% 
+	LayoutData data = new LayoutData(application,request, response);
+    FrameData frameData = new FrameData(application,request, response);
+	WebappPreferences prefs = data.getPrefs();
+	AbstractFrame frame = frameData.getHelpToolbarFrame();
+%>
+
+<html lang="<%=ServletResources.getString("locale", request)%>">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title><%=ServletResources.getString("helpToolbarFrame", request)%></title>
+</head>
+<frameset id="helpToolbarFrameset" cols="<%=frameData.getHelpToolbarFrameSizes()%>" frameborder=0" framespacing="0" border="0" spacing="0">
+<% if (isRTL) {
+if(null != frame){%>
+    <frame name="<%=frame.getName()%>" src="<%= frameData.getUrl(frame) %>" <%=frame.getFrameAttributes()%> >
+<%}%>   	
+    <frame name="SearchFrame" title="<%=ServletResources.getString("SearchFrame", request)%>" src='<%="search.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+<%} else {%>
+   	<frame name="SearchFrame" title="<%=ServletResources.getString("SearchFrame", request)%>" src='<%="search.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+<%if(null != frame){%>    
+    <frame name="<%=frame.getName()%>" src="<%= frameData.getUrl(frame) %>" <%=frame.getFrameAttributes()%> >
+<%} 
+}%>	
+</frameset>
+</html>
+
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/helptree.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/helptree.js
index da9b5d7..6bce19c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/helptree.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/helptree.js
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,11 +15,11 @@
 var oldActive;
 var oldActiveClass;
 
-// WAI Roles
-var WAI_TREEITEM = "wairole:treeitem";
-var WAI_TREE = "wairole:tree";
-var WAI_GROUP = "wairole:group";
-var WAI_APPLICATION = "wairole:application";
+// WAI-ARIA Roles
+var WAI_TREEITEM = "treeitem";
+var WAI_TREE = "tree";
+var WAI_GROUP = "group";
+var WAI_APPLICATION = "application";
 
 /**
  * Returns the currently selected (highlighted) tree node anchor.
@@ -43,7 +43,12 @@ function treeMouseClickHandler(e) {
 	} else if ( clickedNode.tagName == 'A' || clickedNode.tagName == 'IMG') {
 	    var treeItem = getTreeItem(clickedNode);
 	    if (treeItem !== null) {
-	        highlightItem(getTreeItem(clickedNode), true); 
+	        if (treeItem.see) {
+	           // A see element in the index view
+	           handleSee(treeItem.see);
+	        } else {
+	            highlightItem(getTreeItem(clickedNode), true); 
+	        }
 	    } 
 	} 	
 }
@@ -84,13 +89,22 @@ function treeKeyDownHandler(e)
 	var clickedNode = getEventTarget(e);
 	var treeItem = getTreeItem(clickedNode);
     if (!treeItem && key >= 37) { return true; }
-	 	
-  	if (key == 37) { // Left arrow, collapse
-  	    goLeft(treeItem);
-  	} else if (key == 38 ) { // Up arrow, go up
+	 
+	if (isRTL) {	
+  	    if (key == 39) { // Right arrow, collapse
+  	        goLeft(treeItem);
+  	    } else if (key == 37) { // Left arrow, expand
+  	        goRight(treeItem);
+  	    }
+  	} else {	
+  	    if (key == 37) { // Left arrow, collapse
+  	        goLeft(treeItem);
+  	    } else if (key == 39) { // Right arrow, expand
+  	        goRight(treeItem);
+  	    }
+  	}
+  	if (key == 38 ) { // Up arrow, go up
   	    goUp(treeItem);
-  	} if (key == 39) { // Right arrow, expand
-  	    goRight(treeItem);
   	} else if (key == 40 ) { // Down arrow, go down
   		goDown(treeItem);
   	}
@@ -201,12 +215,22 @@ function focusOnItem(treeItem, isHighlighted) {
         if (isHighlighted) {
             highlightItem(treeItem);
   		}
-  		var expander = getExpander(treeItem);
+  		positionToItem(treeItem);
+    }
+}
+
+// Scroll so the item is visible and it's parent is not scrolled off horizontally
+function positionToItem(treeItem) {
+    var anchor = findAnchor(treeItem);
+    if (anchor) {
+        var parentItem = getTreeItem(treeItem.parentNode)
+  		var expander = getExpander(parentItem);
   		if (expander !== null) {
-  		    scrollUntilVisible(anchor.parentNode, SCROLL_HORIZONTAL_AND_VERTICAL);
+  		    scrollUntilVisible(parentItem.parentNode, SCROLL_HORIZONTAL);
   		} else {
-  		    scrollUntilVisible(anchor, SCROLL_HORIZONTAL_AND_VERTICAL);
+  		    scrollUntilVisible(parentItem, SCROLL_HORIZONTAL);
   		}
+  		scrollUntilVisible(anchor, SCROLL_VERTICAL);
     }
 }
 
@@ -223,7 +247,7 @@ function highlightItem(treeItem) {
     }
 }
 
-// Force an items parents to be visible
+// Force an items parents to be visible by expanding if necessary
 function makeVisible(treeItem) {
     var parent = getTreeItem(treeItem.parentNode);
     if (!parent) {
@@ -373,7 +397,7 @@ function toggleExpandState(node) {
     setWAIExpansionState(treeItem, newChildClass == "visible");
     
     if (newChildClass == "visible") {
-        scrollUntilVisible(treeItem, SCROLL_HORIZONTAL_AND_VERTICAL); 
+        positionToItem(treeItem);
     } 
 }
 
@@ -394,24 +418,46 @@ function changeExpanderImage(treeItem, isExpanded) {
 
 // Accessibility
 
-var isNamespaceSupport = typeof document.documentElement.setAttributeNS != 'undefined';
+
+// Accessibility roles are now set for all browsers
+var setAccessibilityRoles = true;
 
 function setAccessibilityRole(node, role) {
-    if (isNamespaceSupport) {
-        node.setAttributeNS("http://www.w3.org/TR/xhtml2", "role", role);
-        node.role = role;
+    if (setAccessibilityRoles) {
+        node.setAttribute("role", role);
+    }
+}
+
+function setAccessibilitySetsize( node, setsize )
+{
+    if (setAccessibilityRoles) {
+        node.setAttribute("aria-setsize", setsize);
+    }
+}
+
+function setAccessibilityPosition( node, posinset)
+{
+    if (setAccessibilityRoles) {
+        node.setAttribute("aria-posinset", posinset);
+    }
+}
+
+function setAccessibilityTreeLevel( node,level )
+{
+    if (setAccessibilityRoles) {
+        node.setAttribute("aria-level", level);
     }
 }
 
 function setWAIExpanded(node, value) {
-    if (isNamespaceSupport) {
+    if (setAccessibilityRoles && node.id != "tree_root") {
         var valueAsString = value? "true" : "false";
-        node.setAttributeNS("http://www.w3.org/2005/07/aaa", "expanded", valueAsString);
+        node.setAttribute("aria-expanded", valueAsString);
     }
 }
 
 function setRootAccessibility() {
-    if (isNamespaceSupport) {
+    if (setAccessibilityRoles) {
         var treeItem = document.getElementById("tree_root");
         if (treeItem) {
             setAccessibilityRole(treeItem, WAI_TREE);
@@ -424,7 +470,7 @@ function setRootAccessibility() {
 }
 
 function setWAIExpansionState(treeItem, isExpanded) { 
-    if (isNamespaceSupport) {
+    if (setAccessibilityRoles) {
         var anchor = findAnchor(treeItem);
         if (anchor) {
             setWAIExpanded(anchor, isExpanded);
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/helptreechildren.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/helptreechildren.js
index 369757b..bff02d8 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/helptreechildren.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/helptreechildren.js
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ function updateTree(xml) {
     var treeRoot = document.getElementById("tree_root");
     var nodes = tocData.childNodes;
     selectedNode = null;
-    mergeChildren(treeRoot, nodes);
+    mergeChildren(treeRoot, nodes, 0);
     if (selectedNode !== null) {
         // Focusing on the last child will increase the chance that it is visible
         if (!highlightSelectedNode) {
@@ -49,7 +49,7 @@ function updateTree(xml) {
     return errorTags.length > 0;
  }
  
-function mergeChildren(treeItem, nodes) {
+function mergeChildren(treeItem, nodes, level) {
     var childContainer;
     if (treeItem.id == "tree_root") {
         childContainer=treeItem;
@@ -59,12 +59,25 @@ function mergeChildren(treeItem, nodes) {
     var childAdded = false;
     var hasPlaceholder = childContainer !== null && childContainer.className == "unopened";
     var existingChildren = hasExistingChildren(childContainer);
+    var childCount = 0;
+    var nodeIndex = 0;
+
+    // Compute total # of nodes for accessibility attributes
+    // nodes.length cannot be used because the list may contain xml elements
+    // which are not nodes
+        
+    for (var i = 0; i < nodes.length; i++) {
+        if (nodes[i].tagName == "node") {
+            childCount++;
+        }
+     }
     if (nodes) {  
         for (var i = 0; i < nodes.length; i++) {
             var node = nodes[i];
             // If the children of this node have already been evaluated
             // and the child XML node has no children we can safely skip it 
             if (node.tagName == "node" && (!existingChildren || node.childNodes.length > 0)) {
+                nodeIndex++;
                 if (hasPlaceholder) {
                     // Remove the loading message
                     treeItem.removeChild(childContainer);
@@ -102,11 +115,11 @@ function mergeChildren(treeItem, nodes) {
                     if (node.getAttribute("closedImage")) {
                         closedImage = "../topic" + node.getAttribute("closedImage");
                     }             
-                   childItem = addChild(childContainer, id, title, href, openImage, closedImage, imageAltText, isLeaf);           
+                   childItem = addChild(childContainer, id, title, href, openImage, closedImage, imageAltText, isLeaf, nodeIndex, childCount, level + 1);           
                 }
                
                 if (!isLeaf) {
-                    mergeChildren(childItem, node.childNodes);
+                    mergeChildren(childItem, node.childNodes, level + 1);
                 } 
                 var isSelected = node.getAttribute("is_selected");                   
                 if (isSelected) {
@@ -155,7 +168,8 @@ function findChildById(treeItem, id) {
 }
 
 // Create a child of treeItem
-function addChild(treeItem, id, name, href, image, closedImage, imageAltText, isLeaf) {        
+function addChild(treeItem, id, name, href, image, closedImage, imageAltText, 
+                  isLeaf, position, setsize, level) {        
     var childItem = document.createElement("DIV");
     // roots should have a className of "root" to prevent indentation
     if (treeItem.id == "tree_root") {
@@ -200,13 +214,18 @@ function addChild(treeItem, id, name, href, image, closedImage, imageAltText, is
       
     var anchor = document.createElement("a");
     if (href === null) {
-        // anchor.href = "about:blank";
         anchor.className = "nolink";
+    } else if (href.match(/^see:/)) {
+         childItem.see = href.substring(4);
+         anchor.className = "see";
     } else {
         anchor.href = href;
     }
     anchor.title = name;
-    setAccessibilityRole(anchor, WAI_TREEITEM);
+    setAccessibilityRole(anchor, WAI_TREEITEM);    
+    setAccessibilitySetsize(anchor, setsize); 
+    setAccessibilityPosition(anchor, position); 
+    setAccessibilityTreeLevel(anchor, level);
     
     if (topicImage) {
         anchor.appendChild(topicImage);
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.css b/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.css
index 1fa8156..f77c6b6 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.css
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.css
@@ -1,4 +1,8 @@
 .resultofText {
-	background-color:Highlight;
-	color:HighlightText;
+	background-color:#FFFF66;
+	color: #000000;
+}
+
+a:link .resultofText, a:visited .resultofText {
+	text-decoration: underline;
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.js
index 630ab7c..47f9e5d 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/highlight.js
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -140,24 +140,18 @@ function highlightWordInText(aWord, textNode){
 			replacementNode.appendChild(newBefore);
 			spanNode=document.createElement("span");
 			spanNode.setAttribute("name","resultofMatch");
-			if(isSafari){
-				if (defaultHighlight == true) {
-					spanNode.style.color="#000000";
-					spanNode.style.background="#B5D5FF";
+
+			if ((defaultHighlight == false) && !document.styleSheets) {
+				if (isIE) spanNode.setAttribute("className",null);
+				else spanNode.setAttribute("class",null);
+			} else {
+				if (isIE) {
+				    spanNode.className ="resultofText";
 				} else {
-					spanNode.style.color=null;
-					spanNode.style.background=null;
-				}
-			}else{
-				if ((defaultHighlight == false) && !document.styleSheets) {
-					if (isIE) spanNode.setAttribute("className",null);
-					else spanNode.setAttribute("class",null);
-				}
-				else {
-					if (isIE) spanNode.setAttribute("className","resultofText");
-					else spanNode.setAttribute("class","resultofText");
+				    spanNode.setAttribute("class","resultofText");
 				}
 			}
+
 			replacementNode.appendChild(spanNode);
 			if(!firstNodeHighlighted){
 			firstNodeToBeHighlighted=spanNode;
@@ -261,27 +255,10 @@ function toggleHighlight() {
 
 function setHighlight(current) {
 	currentHighlight = (current==true);
-	if (isSafari) {
-		var color;
-		var backgnd;
-		if (currentHighlight) {
-			color = "#000000";
-			backgnd = "#B5D5FF";
-		}
-		else {
-			color = null;
-			backgnd = null;
-		}
-		var elements = document.getElementsByName("resultofMatch");
-		for (var i = 0; i<elements.length; i++){
-			elements[i].style.color=color;
-			elements[i].style.backgroundColor= backgnd;
-		}
-	}
-	else if (document.styleSheets){
+    if (document.styleSheets){
 		var text;
 		if (currentHighlight) {
-			text = "COLOR: HighlightText; BACKGROUND-COLOR: Highlight;";
+			text = "COLOR: #000000; BACKGROUND-COLOR: #FFFF66;";
 		} else {
 			text = "";
 		}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/images/e_quick_search_multi.gif b/eclipse/plugins/org.eclipse.help.webapp/advanced/images/e_quick_search_multi.gif
new file mode 100644
index 0000000..97184de
Binary files /dev/null and b/eclipse/plugins/org.eclipse.help.webapp/advanced/images/e_quick_search_multi.gif differ
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/index.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/index.jsp
index 90ae375..9febf8b 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/index.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/index.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@
 	}
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -43,11 +43,12 @@ function onloadHandler(e)
 <% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
 %>	
     try {
-        var h=window.SearchFrame.document.getElementById("searchLabel").offsetHeight; <%-- default 13 --%>
+        var h=window.HelpToolbarFrame.SearchFrame.document.getElementById("searchLabel").offsetHeight; <%-- default 13 --%>
 	    if(h<=19){
 		    // no need to resize up to 19px 
 	    } else {
-	        document.getElementById("indexFrameset").setAttribute("rows", <%="0".equals(data.getBannerHeight())?"":"\""+data.getBannerHeight()+",\"+"%>(11+h)+",*"); <%-- default 24 --%>
+	        document.getElementById("indexFrameset").setAttribute("rows", 
+	            <%="0".equals(data.getBannerHeight())?"":"\""+data.getBannerHeight()+",\"+"%>(11+h)+",*<%=data.getFooterRowText()%>" ); <%-- default 24 --%>
         }
     }
     catch (e) {
@@ -61,13 +62,16 @@ if (data.isMozilla()){
 <%
 }
 %>
-	window.frames["SearchFrame"].document.getElementById("searchWord").focus();
+    try {
+	    window.HelpToolbarFrame.frames["SearchFrame"].document.getElementById("searchWord").focus();
+	} catch (e) {
+	}
 }
 
 </script>
 </head>
 
-<frameset id="indexFrameset" onload="onloadHandler()" rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>24,*"  frameborder="0" framespacing="0" border=0 spacing=0>
+<frameset id="indexFrameset" onload="onloadHandler()" rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>24,*<%=data.getFooterRowText()%>"  frameborder="0" framespacing="0" border=0 spacing=0>
 <%
 	if(!("0".equals(data.getBannerHeight()))){
 %>
@@ -75,8 +79,15 @@ if (data.isMozilla()){
 <%
 	}
 %>
-	<frame name="SearchFrame" title="<%=ServletResources.getString("helpToolbarFrame", request)%>" src='<%="advanced/search.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+	<frame name="HelpToolbarFrame" title="<%=ServletResources.getString("ignore", "HelpToolbarFrame", request)%>" src='<%="advanced/helpToolbar.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
 	<frame name="HelpFrame" title="<%=ServletResources.getString("ignore", "HelpFrame", request)%>" src='<%="advanced/help.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="0" marginheight="0" scrolling="no" frameborder="0" >
+<%
+	if(!("0".equals(data.getFooterHeight()))){
+%>
+	<frame name="FooterFrame" title="<%=ServletResources.getString("Footer", request)%>" src='<%=data.getFooterURL()%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+<%
+	}
+%>
 </frameset>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexToolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexToolbar.jsp
index b9b13e5..5d25bfb 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexToolbar.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexToolbar.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2005 Intel Corporation.
+ Copyright (c) 2005, 2010 Intel Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  
  Contributors:
      Intel Corporation - initial API and implementation
+     IBM Corporation   - add filter button
 --%>
 <%@ include file="header.jsp"%>
 
@@ -14,12 +15,12 @@
 <jsp:include page="toolbar.jsp">
 	<jsp:param name="script" value="navActions.js"/>
 	<jsp:param name="view" value="index"/>
-
+	
 	<jsp:param name="name"     value="show_all"/>
 	<jsp:param name="tooltip"  value='show_all'/>
 	<jsp:param name="image"    value="show_all.gif"/>
 	<jsp:param name="action"   value="toggleShowAll"/>
 	<jsp:param name="param"    value=""/>
 	<jsp:param name="state"    value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
-
+	
 </jsp:include>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.css b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.css
index 00b19df..83b2f09 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.css
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.css
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 Intel Corporation and others.
+ * Copyright (c) 2005, 2009 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation 2006, refactored index view into a single frame
+ *     IBM Corporation 2009, added style for .see
  *******************************************************************************/
 
 BODY {
@@ -173,6 +174,11 @@ A.active:hover{
 	text-decoration:underline; 
 }
 
+A.see {
+    font-style : italic;
+    color : #0000FF;
+}
+
 <%
 if (requestData.isSafari()){
 %>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.js
index cec2c1a..279eb55 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.js
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2010 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation 2006, refactored index view into a single frame
  *     IBM Corporation 2007, allow partial loading of index
+ *     IBM Corporation 2010, add filtering in toc and index view
  *******************************************************************************/
  
 var isMozilla = navigator.userAgent.indexOf("Mozilla") != -1 && parseInt(navigator.appVersion.substring(0,1)) >= 5;
@@ -204,7 +205,7 @@ function removePlaceholder() {
 }
 
 function makeNodeRequest(parameters) {
-    var href = "../indexfragment" + parameters;
+    var href = "indexfragment" + parameters;
     var callback = function(xml) { updateIndexTree(xml);}; 
     var errorCallback = function() { 
         // alert("ajax error"); 
@@ -284,7 +285,7 @@ function typeinChanged() {
     loadChildren(typeinPrevious);
 }
 
-/**
+/*
  * Handler for key down 
  */
 function keyDownHandler(e)
@@ -323,6 +324,14 @@ function typeinKeyDownHandler(e) {
 	return false;
 }
 
+function handleSee(target) {
+    var pathSegments = target.split(", ");
+    typeinPrevious = null;
+    typein.value = pathSegments[0];
+    typeinChanged();
+}
+
+
 /**
   * Select the corresponding item in the index list on typein value change.
   * Check is performed periodically in short interval.
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.jsp
index d9b4232..897f0cc 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/indexView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2005, 2007 Intel Corporation and others.
+ Copyright (c) 2005, 2010 Intel Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
      IBM Corporation - 122967 [Help] Remote help system (improve responsiveness)
      IBM Corporation - 166695 [Webapp] Index View truncates button if large fonts are used
      IBM Corporation 2006, refactored index view into a single frame
+     IBM Corporation 2009, css changes
+     IBM Corporation 2010, added lang to html tag
 --%>
 <%@ include file="fheader.jsp"%>
 
@@ -18,7 +20,7 @@
 	WebappPreferences prefs = requestData.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -27,6 +29,17 @@
 <style type="text/css">
 <%@ include file="indexView.css"%>
 </style>
+<% 
+    if (requestData.isMacMozilla()) {
+%>
+<style type="text/css">
+#button {
+    background:GrayText;
+}
+</style>
+<%
+    }
+%>
 
 <base target="ContentViewFrame">
 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/nav.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/nav.jsp
index be2e8c2..06fd634 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/nav.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/nav.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2008 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/navActions.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/navActions.js
index 17ab164..ad54a97 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/navActions.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/navActions.js
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Pierre Candela  - fix for Bug 194911
@@ -67,6 +67,13 @@ function removeAllBookmarks(button){
 	}
 }
 
+function filter(button){
+	window.parent.parent.selectScope();
+	if (button && document.getElementById(button)){
+		document.getElementById(button).blur();
+	}
+}
+
 function printTopic(errorMsg) {
 	var href = parent.tocViewFrame.getSelectedTopic();
 	if (href) {
@@ -137,17 +144,26 @@ function getWindowBounds(window) {
 
 function getSearchWord() {
     var navFrame = parent.parent.parent;
-	var searchFrame = navFrame.parent.parent.frames["SearchFrame"];
+	var searchFrame = navFrame.parent.parent.HelpToolbarFrame.frames["SearchFrame"];
 	return searchFrame.document.forms["searchForm"].searchWord.value;
 }
 
-function quickSearch(button, errorMsg) {		//search this topic and all subTopics
+function quickSearchTopic(errorMsg) {
+	quickSearch("QuickSearchTopic", errorMsg);
+}
+
+function quickSearchToc(errorMsg) {
+	quickSearch("QuickSearchToc", errorMsg);
+}
+
+function quickSearch(quickSearchType, errorMsg) {		//search this topic and all subTopics
 	var topic = parent.tocViewFrame.getSelectedTopic();
 	if (topic) {
 		var node = parent.tocViewFrame.getActiveAnchor();
 		var treeItem = parent.tocViewFrame.getTreeItem(node);
         if (!treeItem) { return; }  // TODO need better error
 	    var parameters = "?searchWord=" + getSearchWord();
+	    parameters = parameters + "&quickSearchType=" + quickSearchType;
 	     
 	    // Defect 593: resize search window     2/2
 	    var w = 315;
@@ -172,20 +188,20 @@ function quickSearch(button, errorMsg) {		//search this topic and all subTopics
 	}	
 }
 
-function searchFor(searchWord) {  
+function searchFor(searchWord, quickSearchType) {  
 	var node = parent.tocViewFrame.getActiveAnchor();
 	var treeItem = parent.tocViewFrame.getTreeItem(node);
     var topAncestor = parent.tocViewFrame.getTopAncestor(treeItem);
     if (!topAncestor) { return; } 
 	var toc = topAncestor.nodeid;
 	var maxHits = 500;
-	var query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits + "&quickSearch=true&toc="+toc;
+	var query ="searchWord="+encodeURIComponent(searchWord)+"&maxHits="+maxHits + "&quickSearch=true&toc="+toc +"&quickSearchType=" + quickSearchType;
     if (topAncestor !== treeItem) {
         query += "&path=";
         query += treeItem.nodeid;
     }
     var navFrame = parent.parent.parent;
-	var searchFrame = navFrame.parent.parent.frames["SearchFrame"];
+	var searchFrame = navFrame.parent.parent.HelpToolbarFrame.frames["SearchFrame"];
 	navFrame.showView('search');
 	var searchView = navFrame.ViewsFrame.search.searchViewFrame;
 	searchView.location.replace("searchView.jsp?"+query);	
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/print.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/print.jsp
index bf6f958..e3d2763 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/print.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/print.jsp
@@ -12,21 +12,6 @@
 
 <% 
 	PrintData data = new PrintData(application, request, response);
+	data.generateResources(out);
 %>
 
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title><%=UrlUtil.htmlEncode(data.getTitle())%></title>
-<link rel="stylesheet" href="print.css" charset="utf-8" type="text/css">
-</head>
-<body dir="<%=direction%>" onload="print()">
-<%
-	data.generateToc(out);
-%>
-</body>
-</html>
-
-<%
-	data.generateContent(out);
-%>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/printAlert.css b/eclipse/plugins/org.eclipse.help.webapp/advanced/printAlert.css
new file mode 100644
index 0000000..effeca1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/printAlert.css
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/* need this one for Mozilla */
+HTML { 
+	margin:0px;
+	padding:0px;
+}
+
+body{
+    font-family: Arial;
+}
+
+#titleText {
+	font-weight:bold;
+	color:WindowText;
+}
+
+.printAlertDiv {
+    width:400px;
+    border:1px solid ThreeDShadow;
+    background:button;
+}
+
+.caption {
+	background:ActiveCaption;
+	color:CaptionText;
+	height: 30px;
+}
+
+.message, .button {
+	background:ButtonFace;
+	color:ButtonText;
+	font-size: 12px;
+}
+
+.button a { 
+	display:block;
+	margin-left:2px;
+	margin-right:2px;
+	width:18px;
+	height:18px;
+	border:1px solid ButtonFace;
+	writing-mode:tb-rl;
+	vertical-align:middle;
+}
+
+.button a:hover { 
+	border-top:1px solid ButtonHighlight; 
+	border-left:1px solid ButtonHighlight; 
+	border-right:1px solid ButtonShadow; 
+	border-bottom:1px solid ButtonShadow;
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/printConfirm.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/printConfirm.jsp
new file mode 100644
index 0000000..4c1738d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/printConfirm.jsp
@@ -0,0 +1,82 @@
+<%--
+ Copyright (c) 2009, 2010 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials 
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ 
+ Contributors:
+     IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+	String qs = request.getQueryString();
+	String location = "";
+	if (qs != null) {
+		location = "print.jsp?" + qs + "&confirmed=true";
+	}
+	String[] args = new String[] {
+			(String) request.getAttribute("topicsRequested"),
+			(String) request.getAttribute("allowedMaxTopics"),
+			ServletResources.getString("yes", request),
+			ServletResources.getString("no", request)};
+	String notice = ServletResources.getString("topicNumExceeded", args, request);
+%>
+
+<html lang="<%=ServletResources.getString("locale", request)%>">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+<link rel="stylesheet" href="printAlert.css" charset="utf-8" type="text/css">
+
+<script language="JavaScript">
+
+function onloadHandler() {
+	sizeButtons();
+}
+
+function sizeButtons() {
+	var minWidth=60;
+
+	if(document.getElementById("ok").offsetWidth < minWidth){
+		document.getElementById("ok").style.width = minWidth+"px";
+	}
+	if(document.getElementById("cancel").offsetWidth < minWidth){
+		document.getElementById("cancel").style.width = minWidth+"px";
+	}
+}
+
+</script>
+
+</head>
+<body dir="<%=direction%>" onload="onloadHandler()">
+<p> </p>
+<div align="center">
+<div class="printAlertDiv">
+<table align="center" cellpadding="10" cellspacing="0" width="400">
+	<form name="confirmForm" method="post" action="<%=location%>">
+	<tbody>
+		<tr>
+			<td class="caption"><strong><%=ServletResources.getString("alert", request)%></strong></td>
+		</tr>
+		<tr>
+			<td class="message">
+			<p><%=notice%></p>
+			</td>
+		</tr>
+		<tr>
+			<td class="button">
+			<div align="center">
+				<button id="ok" onClick="confirmForm.submit()"><%=ServletResources.getString("yes", request)%></button>
+				<button id="cancel" onClick="top.close()"><%=ServletResources.getString("no", request)%></button>
+            </div>
+			</td>
+		</tr>
+	</tbody>
+	</form>
+</table>
+</div>
+</div>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/printError.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/printError.jsp
new file mode 100644
index 0000000..9ad0256
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/printError.jsp
@@ -0,0 +1,66 @@
+<%--
+ Copyright (c) 2009, 2010 IBM Corporation and others.
+ All rights reserved. This program and the accompanying materials 
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+ 
+ Contributors:
+     IBM Corporation - initial API and implementation
+--%>
+<%@ include file="header.jsp"%>
+<%
+	String msg = (String)request.getAttribute("msg");
+%>
+
+<html lang="<%=ServletResources.getString("locale", request)%>">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Pragma" content="no-cache">
+<meta http-equiv="Expires" content="-1">
+<link rel="stylesheet" href="printAlert.css" charset="utf-8" type="text/css">
+
+<script language="JavaScript">
+
+function onloadHandler() {
+	sizeButtons();
+}
+
+function sizeButtons() {
+	var minWidth=60;
+
+	if(document.getElementById("ok").offsetWidth < minWidth){
+		document.getElementById("ok").style.width = minWidth+"px";
+	}
+}
+
+</script>
+
+</head>
+
+<body dir='<%=direction%>' onload="onloadHandler()">
+<p> </p>
+<div align="center">
+<div class="printAlertDiv">
+	<table align="center" width="400" cellpadding="10" cellspacing="0">
+		<tr>
+			<td class="caption"><strong><%=ServletResources.getString("error", request)%></strong></td>
+		</tr>
+		<tr>
+			<td height="50" class="message">
+			<p><%=ServletResources.getString(msg, request)%>
+			</p>
+			</td>
+		</tr>
+		<tr>
+			<td class="button">
+			<div align="center">
+				<button id="ok" onClick="top.close()"><%=ServletResources.getString("OK", request)%></button>
+            </div>
+			</td>
+		</tr>
+	</table>
+</Ddiv>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/quickSearch.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/quickSearch.jsp
index 3cdcb42..19a7c7b 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/quickSearch.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/quickSearch.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2009 IBM Corporation and others.
+ Copyright (c) 2009, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,11 +13,12 @@
 <% 
     SearchData data=new SearchData(application,request,response);
     WebappPreferences prefs = data.getPrefs();
+    String quickSearchType = data.isSelectedTopicQuickSearchRequest()? "QuickSearchTopic":"QuickSearchToc";
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
-<title><%=ServletResources.getString("QuickSearch", request)%></title>
+<title><%= ServletResources.getString(quickSearchType, request)%></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <meta http-equiv="Pragma" content="no-cache">
 <meta http-equiv="Expires" content="-1">
@@ -92,6 +93,8 @@ if (data.isMozilla()) {
 <script language="JavaScript" src="list.js"></script>
 <script language="JavaScript">
 
+var quickSearchType = "<%=quickSearchType%>";
+
 function onloadHandler() {
 <%
 if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
@@ -116,7 +119,7 @@ function sizeButtons() {
 
 function doQuickSearch(){
 	var searchWord = document.getElementById("searchWord").value;
-	window.opener.searchFor(searchWord);		
+	window.opener.searchFor(searchWord, quickSearchType);		
 	window.close();
 }
 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchScoped.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchScoped.jsp
index b70123d..c335089 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchScoped.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchScoped.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2007 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -17,11 +17,11 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
-<title><%=ServletResources.getString("Search", request)%></title>
+<title><%=ServletResources.getString("SearchLabel", request)%></title>
      
 <style type="text/css">
 /* need this one for Mozilla */
@@ -84,7 +84,17 @@ A {
 }
 
 #go {
-	background:ThreeDShadow;
+<% 
+    if (data.isMacMozilla()) {
+%>
+    background:GrayText;
+<% 
+    } else {
+%>
+    background:ThreeDShadow;
+<%
+    }
+%>
 	color:Window;
 	font-weight:bold;
 	border:1px solid ThreeDShadow;
@@ -189,8 +199,10 @@ function closeAdvanced()
  * This function can be called from this page or from
  * the advanced search page. When called from the advanced
  * search page, a query is passed.
+ * noRefocus is a boolean which if true suppresses
+ * switch of focus to the search view
  */
-function doSearch(query)
+function doSearch(query, noRefocus)
 {
 	var workingSet = document.getElementById("scope").firstChild.nodeValue;
 
@@ -208,19 +220,38 @@ function doSearch(query)
 		
 	/******** HARD CODED VIEW NAME *********/
 	// do some tests to ensure the results are available
-	if (parent.HelpFrame && 
-		parent.HelpFrame.NavFrame && 
-		parent.HelpFrame.NavFrame.showView &&
-		parent.HelpFrame.NavFrame.ViewsFrame && 
-		parent.HelpFrame.NavFrame.ViewsFrame.search && 
-		parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) 
+	if (parent.parent.HelpFrame && 
+		parent.parent.HelpFrame.NavFrame && 
+		parent.parent.HelpFrame.NavFrame.showView &&
+		parent.parent.HelpFrame.NavFrame.ViewsFrame && 
+		parent.parent.HelpFrame.NavFrame.ViewsFrame.search && 
+		parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) 
 	{
-		parent.HelpFrame.NavFrame.showView("search");
-		var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+	    if (!noRefocus) {
+		    parent.parent.HelpFrame.NavFrame.showView("search");
+		}
+		var searchView = parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
 		searchView.location.replace("searchView.jsp?"+query);
 	}
 }
 
+function rescope() {
+    if (parent.parent.HelpFrame && 
+		parent.parent.HelpFrame.NavFrame && 
+		parent.parent.HelpFrame.NavFrame.ViewsFrame) {
+		var viewsFrame = parent.parent.HelpFrame.NavFrame.ViewsFrame;
+		if (viewsFrame.toc && viewsFrame.toc.tocViewFrame) {
+		    var tocView = viewsFrame.toc.tocViewFrame;
+		    tocView.repaint();
+		}
+		if (viewsFrame.index && viewsFrame.index.indexViewFrame) {
+		    var indexView = viewsFrame.index.indexViewFrame;
+		    indexView.loadCurrentPage();
+		}
+		doSearch(null, true);
+	}
+}
+
 function fixHeights()
 {
 	if (!isIE) return;
@@ -234,6 +265,13 @@ function onloadHandler(e)
 	var form = document.forms["searchForm"];
 	form.searchWord.value = '<%=UrlUtil.JavaScriptEncode(data.getSearchWord())%>';
 	fixHeights();
+<%
+    if (data.isScopeRequest() && RequestScope.filterBySearchScope(request)) {
+%>
+    rescope();
+<%
+    }
+%>
 }
 
 </script>
@@ -246,8 +284,8 @@ function onloadHandler(e)
 		<table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
 			<tr nowrap  valign="middle">
 				<td <%=isRTL?"nowrap":""%> id="searchTD">
-					<label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
-					 <%=ServletResources.getLabel("Search", request)%>
+					<label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("SearchLabel", request)%>">
+					 <%=ServletResources.getLabel("SearchLabel", request)%>
 					</label>
 				</td>
 				<td>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchSimple.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchSimple.jsp
index 00af1f4..de69560 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchSimple.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchSimple.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -16,11 +16,11 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
-<title><%=ServletResources.getString("Search", request)%></title>
+<title><%=ServletResources.getString("SearchLabel", request)%></title>
      
 <style type="text/css">
 /* need this one for Mozilla */
@@ -71,7 +71,17 @@ INPUT {
 }
 
 #go {
-	background:ThreeDShadow;
+<% 
+    if (data.isMacMozilla()) {
+%>
+    background:GrayText;
+<% 
+    } else {
+%>
+    background:ThreeDShadow;
+<%
+    }
+%>
 	color:Window;
 	font-weight:bold;
 	border:1px solid ThreeDShadow;
@@ -163,15 +173,15 @@ function doSearch(query)
 		
 	/******** HARD CODED VIEW NAME *********/
 	// do some tests to ensure the results are available
-	if (parent.HelpFrame && 
-		parent.HelpFrame.NavFrame && 
-		parent.HelpFrame.NavFrame.showView &&
-		parent.HelpFrame.NavFrame.ViewsFrame && 
-		parent.HelpFrame.NavFrame.ViewsFrame.search && 
-		parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) 
+	if (parent.parent.HelpFrame && 
+		parent.parent.HelpFrame.NavFrame && 
+		parent.parent.HelpFrame.NavFrame.showView &&
+		parent.parent.HelpFrame.NavFrame.ViewsFrame && 
+		parent.parent.HelpFrame.NavFrame.ViewsFrame.search && 
+		parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame) 
 	{
-		parent.HelpFrame.NavFrame.showView("search");
-		var searchView = parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
+		parent.parent.HelpFrame.NavFrame.showView("search");
+		var searchView = parent.parent.HelpFrame.NavFrame.ViewsFrame.search.searchViewFrame;
 		searchView.location.replace("searchView.jsp?"+query);
 	}
 }
@@ -201,8 +211,8 @@ function onloadHandler(e)
 		<table id="searchTable" align="<%=isRTL?"right":"left"%>" valign="middle" cellspacing="0" cellpadding="0" border="0">
 			<tr nowrap  valign="middle">
 				<td <%=isRTL?"nowrap":""%>>
-					<label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("Search", request)%>">
-					 <%=ServletResources.getLabel("Search", request)%>
+					<label id="searchLabel" for="searchWord" accesskey="<%=ServletResources.getAccessKey("SearchLabel", request)%>">
+					 <%=ServletResources.getLabel("SearchLabel", request)%>
 					</label>
 				</td>
 				<td>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchView.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchView.jsp
index b0fb8d8..ba9e1b9 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/searchView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/searchView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="Pragma" content="no-cache">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/tabs.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/tabs.jsp
index e25bdfb..6ef278e 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/tabs.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/tabs.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,10 +13,10 @@
 <% 
 	LayoutData data = new LayoutData(application,request, response);
 	WebappPreferences prefs = data.getPrefs();
-	View[] views = data.getViews();
+	AbstractView[] views = data.getViews();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -127,10 +127,12 @@ function getTarget(e) {
 
 <%
 for (int i=0; i<views.length; i++) {
+    if (views[i].isVisible()) {
 %>
 	var <%=views[i].getName()%> = new Image();
-	<%=views[i].getName()%>.src = "<%=views[i].getOnImage()%>";
+	<%=views[i].getName()%>.src = "<%=data.getImageURL(views[i])%>";
 <%
+    }
 }
 %>
 
@@ -253,13 +255,14 @@ function getPreviousLink(currentLink){
 <%
 	for (int i=0; i<views.length; i++) 
 	{
-		String title = ServletResources.getString(views[i].getName(), request);
-		if (i != 0) {
+	    if (views[i].isVisible()) {
+		    String title = data.getTitle(views[i]);
+		    if (i != 0) {
 %>
 	<td width="1px" class="separator"><div style="width:1px;height:1px;display:block;"></div></td>
 	<%-- div inside separator cell fixes top separator pixel that was not white on IE, or first separator not displayed when frame width happens to be even number of pixels --%>
 <%
-		}
+		    }
 %>
 	<td  title="<%=UrlUtil.htmlEncode(title)%>" 
 	     align="center"  
@@ -277,13 +280,14 @@ function getPreviousLink(currentLink){
 	         <%=views[i].getKey()==View.NO_SHORTCUT?"":"ACCESSKEY=\""+views[i].getKey()+"\""%>>
 	         <img alt="<%=UrlUtil.htmlEncode(title)%>" 
 	              title="<%=UrlUtil.htmlEncode(title)%>" 
-	              src="<%=views[i].getOnImage()%>"
+	              src="<%=data.getImageURL(views[i])%>"
 	              id="img<%=views[i].getName()%>"
 	              height="16"
 	         >
 	     </a>
 	</td>
 <%
+        }
 	}
 %>
  
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocToolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocToolbar.jsp
index 93803a8..2411323 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocToolbar.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocToolbar.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,8 +15,13 @@
 	String printTocLabel = UrlUtil.JavaScriptEncode(ServletResources.getString("PrintToc", request));
 	String printError = UrlUtil.JavaScriptEncode(ServletResources.getString("PrintError", request));
 	String menuData = printTopicLabel + "=printTopic(\\'" + printError + "\\')," + printTocLabel + "=printToc(\\'" + printError + "\\')";
-    String quickSearchError = UrlUtil.JavaScriptEncode(ServletResources.getString("QuickSearchError", request));
-    // See  Bug 290064 for an explanation of why these constants are used
+   
+	String quickSearchTopicLabel = UrlUtil.JavaScriptEncode(ServletResources.getString("QuickSearchTopic", request));
+	String quickSearchTocLabel = UrlUtil.JavaScriptEncode(ServletResources.getString("QuickSearchToc", request));
+	String quickSearchError = UrlUtil.JavaScriptEncode(ServletResources.getString("QuickSearchError", request));
+	String quickSearchMenuData = quickSearchTopicLabel + "=quickSearchTopic(\\'" + quickSearchError + "\\')," + quickSearchTocLabel+ "=quickSearchToc(\\'" + quickSearchError + "\\')";
+    
+	// See  Bug 290064 for an explanation of why the constants below are used
     final String ON = "on";
     final String OFF = "off";
 %>
@@ -25,13 +30,13 @@
 	<jsp:param name="script" value="navActions.js"/>
 	<jsp:param name="view" value="toc"/>
 
-	<jsp:param name="name"     value="show_all"/>
+    <jsp:param name="name"     value="show_all"/>
 	<jsp:param name="tooltip"  value='show_all'/>
 	<jsp:param name="image"    value="show_all.gif"/>
 	<jsp:param name="action"   value="toggleShowAll"/>
 	<jsp:param name="param"    value=""/>
 	<jsp:param name="state"    value="<%=(new ActivitiesData(application, request, response)).getButtonState()%>"/>
-
+    
 	<jsp:param name="name"     value="print_toc"/>
 	<jsp:param name="tooltip"  value='PrintMulti'/>
 	<jsp:param name="image"    value="print_toc.gif"/>
@@ -47,10 +52,10 @@
 	<jsp:param name="state"    value='off'/>
 	
 	<jsp:param name="name"     value="quick_search"/>
-	<jsp:param name="tooltip"  value='QuickSearch'/>
-	<jsp:param name="image"    value="quick_search.gif"/>
-	<jsp:param name="action"   value="quickSearch"/>
-	<jsp:param name="param"    value="<%=quickSearchError%>"/>
+	<jsp:param name="tooltip"  value='QuickSearchMulti'/>
+	<jsp:param name="image"    value="quick_search_multi.gif"/>
+	<jsp:param name="action"   value="menu"/>
+	<jsp:param name="param"    value="<%=quickSearchMenuData%>"/>
 	<jsp:param name="state"    value='off'/> 
 
 	<jsp:param name="name"     value="collapseall"/>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocTree.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocTree.js
index e582d63..b83c857 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocTree.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocTree.js
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,14 @@
 // Tree code specific to the help toc
 
 var showExpanders = true;
-var ajaxPrefix = "../tocfragment"; 
+var ajaxPath = "tocfragment"; 
 var pendingSynchTopic = null; // Should the toc be synchronized when the view becomes visible
 
-// The default value of ajaxPrefix works from jsp files but needs to be overridden to 
+// The default value of ajaxPath works from jsp files but needs to be overridden to 
 // a non relative path to work from scripts launched from any page
 
 function setAjaxPrefix(prefix) {
-    ajaxPrefix = prefix;
+    ajaxPath = prefix + "/tocfragment";
 }
 
 /*
@@ -174,11 +174,7 @@ function updateTocTree(xml) {
 
 function makeNodeRequest(parameters) {
     var href;
-    if (ajaxPrefix) {
-        href = ajaxPrefix + "/tocfragment" +parameters; 
-    } else {
-        href = "../tocfragment" + parameters;
-    }
+    href = ajaxPath +parameters; 
     var callback = function(xml) { updateTocTree(xml);}; 
     var errorCallback = function() { 
         // alert("ajax error"); 
@@ -188,11 +184,7 @@ function makeNodeRequest(parameters) {
 
 function makeShowInTocRequest(parameters) {
     var href;
-    if (ajaxPrefix) {
-        href = ajaxPrefix + "/tocfragment" +parameters; 
-    } else {
-        href = "../tocfragment" + parameters;
-    }
+    href = ajaxPath +parameters; 
     var callback = function(xml) { showInToc(xml);}; 
     var errorCallback = function() { 
         // alert("ajax error"); 
@@ -270,6 +262,16 @@ function toggleAutosynch() {
     setAutosynchEnabled(!isAutosynchEnabled());  
 }
 
+function repaint() {
+    var selected = getSelectedTopic();
+    var href = "tocView.jsp";
+    if (selected) {
+        href += '?topic=';
+        href += selected;
+    } 
+    location.replace(href);
+}
+
 function onShow() { 
     if ( isAutosynchEnabled() && pendingSynchTopic !== null ) {
         selectTopic(pendingSynchTopic, true);
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocView.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocView.jsp
index 0b1994d..97ac845 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/tocView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/tocView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	WebappPreferences prefs = requestData.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -62,6 +62,7 @@ var loadingMessage = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("Lo
 var cookiesRequired = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("cookiesRequired", request))%>";
 
 var isIE = navigator.userAgent.indexOf('MSIE') != -1;
+var isRTL = <%=isRTL%>;
 
 var tocTitle = "";
 var tocId = "";
@@ -71,9 +72,9 @@ function onloadHandler()
     setRootAccessibility();
 	loadChildren(null);
 	
-	// Set prefix for AJAX calls by removing advanced/tocView.jsp from location
+	// Set prefix for AJAX calls by removing tocView.jsp from location
 	var locationHref = window.location.href;
-    var slashAdvanced = locationHref.lastIndexOf('/advanced');
+    var slashAdvanced = locationHref.lastIndexOf('/tocView.jsp');
     if(slashAdvanced > 0) {
 	    setAjaxPrefix(locationHref.substr(0, slashAdvanced));
 	}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/toolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/toolbar.jsp
index 9fb6dd2..555d4bd 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/toolbar.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/toolbar.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -153,6 +153,16 @@ HTML {
 
 </style>
 
+<%
+    String[] scripts = data.getScriptFiles();
+    for (int s = 0; s < scripts.length; s++) {
+        String path = scripts[s];
+%>
+    <script language="JavaScript" src = "<%=path%>" ></script>
+<%
+    }
+%>
+
 <script language="JavaScript">
 
 var bRestore = false;
@@ -163,7 +173,7 @@ for (int i=0; i<buttons.length; i++) {
 	if (!buttons[i].isSeparator()) {
 %>
 	var <%=buttons[i].getName()%> = new Image();
-	<%=UrlUtil.JavaScriptEncode(buttons[i].getName())%>.src = "<%=UrlUtil.JavaScriptEncode(buttons[i].getOnImage())%>";
+	<%=UrlUtil.JavaScriptEncode(buttons[i].getName())%>.src = "<%=UrlUtil.JavaScriptEncode(buttons[i].getImage())%>";
 <%
 	}
 }
@@ -186,8 +196,12 @@ function setTitle(label)
 function registerMaximizedChangedListener(){
 	// get to the frameset
 	var p = parent;
-	while (p && !p.registerMaximizeListener)
+	while (p && !p.registerMaximizeListener) {	   
+	    if (p === p.parent)  {
+	        return;
+        }
 		p = p.parent;
+	}
 	
 	if (p!= null){
 		p.registerMaximizeListener('<%=UrlUtil.JavaScriptEncode(data.getName())%>Toolbar', maximizedChanged);
@@ -217,8 +231,12 @@ function restore_maximize(button)
 function toggleFrame(){
 	// get to the frameset
 	var p = parent;
-	while (p && !p.toggleFrame)
+	while (p && !p.toggleFrame) {
+	    if (p === p.parent)  {
+	        return;
+        }
 		p = p.parent;
+	}
 	
 	if (p!= null){
 		p.toggleFrame('<%=UrlUtil.JavaScriptEncode(data.getTitle())%>');
@@ -452,7 +470,7 @@ if(buttons.length > 0){
 							   onmouseover="javascript:setWindowStatus('<%=UrlUtil.htmlEncode(buttons[i].getName())%>');return true;" 
 							   onmouseout="window.status='';"
 							   id="b<%=i%>">
-							   <img src="<%=UrlUtil.htmlEncode(buttons[i].getOnImage())%>" 
+							   <img src="<%=UrlUtil.htmlEncode(buttons[i].getImage())%>" 
 									alt='<%=UrlUtil.htmlEncode(buttons[i].getTooltip())%>' 
 									title='<%=UrlUtil.htmlEncode(buttons[i].getTooltip())%>'
 									border="0"
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/utils.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/utils.js
index 401a923..55b9bb6 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/utils.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/utils.js
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -82,8 +82,19 @@ function scrollUntilVisible(node, flags)
 	    }
 	}
 	
-	if (flags & SCROLL_HORIZONTAL && isScrollLeft) {
-	    if (nodeLeft < pageLeft) {
+	if ((flags & SCROLL_HORIZONTAL ) && isRTL) {
+	    // In RTL mode aligning the right edge is more important than aligning the left
+	    if (nodeRight > pageRight && isScrollRight) {
+		    hScroll = nodeRight - pageRight; 
+	    } else {            
+	        if (nodeLeft < pageLeft && isScrollLeft) {
+		        hScroll = Math.max(nodeLeft - pageLeft, nodeRight - pageRight);
+		    } else {
+		        hScroll = 0; // already in view
+		    } 	
+	    }
+    } else if (flags & SCROLL_HORIZONTAL ) {
+	    if (nodeLeft < pageLeft && isScrollLeft) {
 		    hScroll = nodeLeft - pageLeft; 
 	    } else {
 	        if (nodeRight > pageRight && isScrollRight) {
@@ -148,7 +159,13 @@ function getCookie(name) {
 function setCookie(name, value) {
 	var date = new Date();
 	date.setTime(date.getTime()+(365*24*60*60*1000));
-	document.cookie = name + "=" + value + "; expires=" + date.toGMTString() + ";path=/";
+	var path = window.location.pathname;
+	var cookiePath = "/help/";
+	var slash = path.indexOf('/', 1);
+	if(slash > 0) {
+	   cookiePath = path.substr(0, slash + 1); 
+	}			
+	document.cookie = name + "=" + value + "; expires=" + date.toGMTString() + ";path=" + cookiePath;
 }
 
 function setCSSRule(selector, property, value) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/view.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/view.jsp
index 61ee78d..5ebd572 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/view.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/view.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,11 +13,11 @@
 <% 
 	new ActivitiesData(application, request, response); // here it can turn filtering on or off
 	LayoutData data = new LayoutData(application,request, response);
-	View view = data.getCurrentView();
+	AbstractView view = data.getCurrentView();
 	if (view == null) return;
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -33,7 +33,9 @@ function onloadHandler(e)
 function resize()
 {
 <% if (data.isIE() || data.isMozilla() && "1.2.1".compareTo(data.getMozillaVersion()) <=0){
-%>	var h=window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleText").offsetHeight; <%-- default 13 --%>
+%>	var titleText=window.<%=view.getName()%>ToolbarFrame.document.getElementById("titleText");
+	if (!titleText) return;
+	var h=titleText.offsetHeight; <%-- default 13 --%>
 	if(h<=19){
 		return; <%-- no need to resize up to 19px --%>
 	}
@@ -64,16 +66,19 @@ function onShow()
 </head>
 
 <frameset id="viewFrameset" onload="onloadHandler()" rows="24,*" frameborder="0" framespacing="0" border=0  >
-	<frame id="toolbar" name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" src='<%=view.getURL()+view.getName()+"Toolbar.jsp"%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+	<frame id="toolbar" name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" 
+	    src='<%=data.getAdvancedURL(view,"Toolbar.jsp")%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
 	<%
 	if (view.isDeferred()) {
 	%>
-		<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=UrlUtil.htmlEncode(view.getURL())+"deferredView.jsp?href="+view.getURL()+view.getName()+"View.jsp?"+UrlUtil.htmlEncode(request.getQueryString())%>'  marginwidth="10" marginheight="0" frameborder="0" >
+		<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" 
+		    src='<%="deferredView.jsp?href="+data.getAdvancedURL(view,"View.jsp")+"?"+UrlUtil.htmlEncode(request.getQueryString())%>'  marginwidth="10" marginheight="0" frameborder="0" >
 	<%
 	}
 	else {
 	%>
-		<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=UrlUtil.htmlEncode(view.getURL())+view.getName()+"View.jsp?"+UrlUtil.htmlEncode(request.getQueryString())%>'  marginwidth="10" marginheight="0" frameborder="0" >
+		<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" 
+		    src='<%=data.getAdvancedURL(view,"View.jsp") + "?" + UrlUtil.htmlEncode(request.getQueryString())%>'  marginwidth="10" marginheight="0" frameborder="0" >
 	<%
 	}
 	%>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/views.js b/eclipse/plugins/org.eclipse.help.webapp/advanced/views.js
index 46a8927..79ce2b7 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/views.js
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/views.js
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -92,6 +92,16 @@ function showAll(){
 	}catch(ex) {}
 }
 
+function rescope(scopes) {
+     window.location.replace("views.jsp?scope=" + scopes);
+     try{
+         window.frames.toc.tocViewFrame.collapseAll();
+     }catch(ex) {}
+     try{
+         window.frames.index.indexViewFrame.setShowAll(true);
+     }catch(ex) {}
+}
+
 function dontShowAll(){
 	activityFiltering=true;
 	try{
@@ -120,10 +130,14 @@ function closeConfirmShowAllDialog(){
 		if (confirmShowAllDialog){
 			confirmShowAllDialog.close();
 		}
+		if (selectScopeDialog) {
+		    selectScopeDialog.close();
+		}
 	}
 	catch(e) {}
 }
 
 var confirmShowAllDialog;
+var selectScopeDialog;
 var w = 470;
 var h = 240;
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/views.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/views.jsp
index c978123..bcc91cf 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/views.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/views.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2008 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,11 +13,13 @@
 <% 
 	LayoutData data = new LayoutData(application,request, response);
 	WebappPreferences prefs = data.getPrefs();
-	View[] views = data.getViews();
+	AbstractView[] views = data.getViews();	
+	// Read the scope parameter
+	RequestScope.setScopeFromRequest(request, response);
 %>	
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
@@ -91,6 +93,29 @@ if (data.isIE()){
 	confirmShowAllDialog.focus(); 
 }
 
+function selectScope() 
+{
+<%
+if (data.isIE()){
+%>
+	var l = top.screenLeft + (top.document.body.clientWidth - w) / 2;
+	var t = top.screenTop + (top.document.body.clientHeight - h) / 2;
+<%
+} else {
+%>
+	var l = top.screenX + (top.innerWidth - w) / 2;
+	var t = top.screenY + (top.innerHeight - h) / 2;
+<%
+}
+%>
+	// move the dialog just a bit higher than the middle
+	if (t-50 > 0) t = t-50;
+	
+	window.location="javascript://needModal";
+	selectScopeDialog = window.open("selectScope.jsp", "selectScopeDialog", "resizable=no,height="+h+",width="+w+",left="+l+",top="+t );
+	selectScopeDialog.focus(); 
+}
+
 </script>
 
 </head>
@@ -99,9 +124,10 @@ if (data.isIE()){
 <%
 	for (int i=0; i<views.length; i++) 
 	{
-		// normally we would hide the views first, but mozilla needs all iframes to be visible to load 
-		// other frames
-		String className =  data.getVisibleView().equals(views[i].getName()) ? "visible" : "hidden";
+	    if (views[i].isVisible()) {
+		    // normally we would hide the views first, but mozilla needs all iframes to be visible to load 
+		    // other frames
+		    String className =  data.getVisibleView().equals(views[i].getName()) ? "visible" : "hidden";
 %>
  	<iframe frameborder="0" 
  		    class="<%=className%>"  
@@ -112,6 +138,7 @@ if (data.isIE()){
  		    src='<%="view.jsp?view="+views[i].getName()+(request.getQueryString()==null?"":("&"+UrlUtil.htmlEncode(request.getQueryString())))%>'>
  	</iframe> 
 <%
+        }
 	}
 %>	
 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSet.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSet.jsp
index 6581590..4102335 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSet.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSet.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  
  Contributors:
      IBM Corporation - initial API and implementation
+     Sybase, Inc. - Workaround for enableOK slowdown, Bug 289161
+     
 --%>
 <%@ include file="header.jsp"%>
 
@@ -14,10 +16,11 @@
 	WorkingSetData data = new WorkingSetData(application, request, response);
 	TocData tocData = new TocData(application,request, response);
 	WebappPreferences prefs = data.getPrefs();
+	boolean isCriteriaEnable = data.isCriteriaScopeEnabled();
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <title><%=ServletResources.getString(data.isEditMode()?"EditWorkingSet":"NewWorkingSet", request)%></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -67,6 +70,26 @@ INPUT {
 	border:	2px inset ThreeDHighlight;
 	margin:10px;
 	margin-top:2px;
+	margin-bottom: 0px;
+	padding-<%=isRTL?"right":"left"%>:5px;
+	overflow:auto;
+	height:350px;
+<%
+if (data.isIE()) {
+%>
+    width:100%; 
+<%
+}
+%>
+}
+
+#criteriaContainer {
+    background:Window;
+	color:WindowText;
+	border:	2px inset ThreeDHighlight;
+	margin-<%=isRTL?"left":"right"%>:10px;
+	margin-top:2px;
+	margin-bottom: 0px;
 	padding-<%=isRTL?"right":"left"%>:5px;
 	overflow:auto;
 	height:350px;
@@ -90,14 +113,14 @@ if (data.isMozilla()) {
 %>
 }
 
-.book {
+.book, .criterion {
 	margin:0px;
 	border:0px;
 	padding:0px;
 	white-space: nowrap;
 }
 
-.topic {
+.topic, .criterionValue {
 	margin-<%=isRTL?"right":"left"%>:30px;
 	border:0px;
 	padding:0px;
@@ -154,6 +177,12 @@ plus.src = "<%=prefs.getImagesDirectory()%>"+"/plus.gif";
 var oldName = '<%=data.isEditMode()?UrlUtil.JavaScriptEncode(data.getWorkingSetName()):""%>';
 var altBookClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookClosed", request))%>";
 var altBookOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("bookOpen", request))%>";
+var altCriterionClosed = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("criterionClosed", request))%>";
+var altCriterionOpen = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("criterionOpen", request))%>";
+var noTopicsSelected = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("NoTopicsSelected", request))%>";
+var noNameEntered = "<%=UrlUtil.JavaScriptEncode(ServletResources.getString("NoNameEntered", request))%>";
+        
+var alwaysEnableOK = true;  // See Bug 289161
 
 function onloadHandler() {
 <%if(!data.isMozilla() || "1.3".compareTo(data.getMozillaVersion()) <=0){
@@ -161,11 +190,11 @@ function onloadHandler() {
 %>
 	sizeButtons();
 <%}%>
-    sizeBookContainer();
+    sizeContainer();
 	document.getElementById("workingSet").focus();
 	enableOK();
 <%-- event handlers that call enableOK() are not invoked properly on Japanese --%>
-	setInterval("enableOK()", 250);
+	//setInterval("enableOK()", 250);
 
 }
 
@@ -180,8 +209,11 @@ function sizeButtons() {
 	}
 }
 
-function sizeBookContainer() {
-    resizeVertical("booksContainer", "wsTable", "buttonBar", 100, 20);
+function sizeContainer() {
+    resizeVertical("booksContainer", "wsTable", "buttonBar", 100, 30);
+    <%if(isCriteriaEnable){%>
+    resizeVertical("criteriaContainer", "wsTable", "buttonBar", 100, 30);
+    <%}%>
 }
 
 function doSubmit()
@@ -189,26 +221,35 @@ function doSubmit()
 	try
 	{
 		var workingSet = document.getElementById("workingSet").value;
-		if (!workingSet || workingSet == "")
-			return false;
+		if (!workingSet || workingSet.length == 0 || workingSet.charAt(0) == " ")  {
+         		alert(noNameEntered);
+ 			return false;
+        }
+        
+        if (!hasContentSelections()) {
+            alert(noTopicsSelected);
+            return false;
+        }
 	
-		var hrefs = getSelectedResources();
+		var hrefs = getSelectedContentResources();
 		if (!hrefs || hrefs == "")
 			return false;
 
-		var query = "operation="+'<%=UrlUtil.JavaScriptEncode(data.getOperation())%>'+"&workingSet="+encodeURIComponent(workingSet)+ hrefs+"&oldName="+encodeURIComponent(oldName);
+		var criteria = getSelectedCriteriaResources();
+		var query = "operation="+'<%=UrlUtil.JavaScriptEncode(data.getOperation())%>'+"&workingSet="+encodeURIComponent(workingSet)+ hrefs+criteria+"&oldName="+encodeURIComponent(oldName);
 		window.opener.location.replace("workingSetManager.jsp?"+query);
 		window.opener.focus();
 		window.close();
 	} catch(ex) {alert("Error..." + ex.message)}
 }
 
-function getSelectedResources() {
+function getSelectedContentResources() {
 	var hrefs = "";
 	var inputs = document.getElementsByTagName("INPUT");
 	for (var i=0; i<inputs.length; i++)
 	{
 		if (inputs[i].type != "checkbox") continue;
+		if (inputs[i].parentNode.id.indexOf("_criterion") > -1) continue;
 		if (inputs[i].checked == false) continue;
 		if (getGrayed(inputs[i])) continue;
 		if (isToc(inputs[i].name)) {
@@ -220,12 +261,42 @@ function getSelectedResources() {
 	return hrefs;
 }
 
-// Assumption: last character of a toc reference cannot be underscore _
+//Assumption: last character of a toc reference cannot be underscore _
 function isToc(name) {
 	return name.charAt(name.length-1) != "_";
 }
 
 function isParentTocSelected(name) {
+	return isParentCheckboxSelected(name);
+}
+
+function getSelectedCriteriaResources() {
+	var criteria = "";
+	var inputs = document.getElementsByTagName("INPUT");
+	for (var i=0; i<inputs.length; i++)
+	{
+		if (inputs[i].type != "checkbox") continue;
+		if (inputs[i].parentNode.id.indexOf("_criterion") < 0) continue;
+		if (inputs[i].checked == false) continue;
+		if (getGrayed(inputs[i])) continue;
+		if (isCriterionCategory(inputs[i].name)) {
+			criteria += "&criteria=" + encodeURIComponent(inputs[i].name);
+		} else if(!isParentTocSelected(inputs[i].name)){
+            criteria += "&criteria=" + encodeURIComponent(inputs[i].name);
+		}
+	}
+	return criteria;
+}
+
+function isCriterionCategory(name) {
+	return name.charAt(name.length-1) != "_";
+}
+
+function isParentCategorySelected(name){
+	return isParentCheckboxSelected(name);
+}
+
+function isParentCheckboxSelected(name) {
 	var parentCheckbox = getParentCheckbox(name);
 	return (parentCheckbox.checked && !getGrayed(parentCheckbox));
 }
@@ -235,6 +306,13 @@ function getParentCheckbox(name) {
 	return document.getElementById(parentId);
 }
 
+function isCriterionNode(nodeId){
+	if(nodeId && nodeId.indexOf("_criterion") > -1){
+		return true; 
+	}
+	return false;
+}
+
 function collapseOrExpand(nodeId) {
 	var node = document.getElementById("div"+nodeId);
 	var img = document.getElementById("img"+nodeId);
@@ -242,13 +320,23 @@ function collapseOrExpand(nodeId) {
 	if (node.className == "expanded") {
 		node.className = "collapsed";
 		img.src = plus.src;
-		img.alt = altBookClosed;
-		img.title = altBookClosed;
+		if(isCriterionNode(nodeId)){
+			img.alt = altCritrionClosed;
+			img.title = altCriterionClosed;
+		}else{
+			img.alt = altBookClosed;
+			img.title = altBookClosed;
+		}
 	} else {
 		node.className = "expanded";
 		img.src = minus.src;
-		img.alt = altBookOpen;
-		img.title = altBookOpen;
+		if(isCriterionNode(nodeId)){
+			img.alt = altCriterionOpen;
+			img.title = altCriterionOpen;
+		}else{
+			img.alt = altBookOpen;
+			img.title = altBookOpen;
+		}
 	}
 }
 
@@ -258,8 +346,13 @@ function collapse(nodeId) {
 	if (!node || !img) return;
 	node.className = "collapsed";
 	img.src = plus.src;
-	img.alt = altBookClosed;
-	img.title = altBookClosed;
+	if(isCriterionNode(nodeId)){
+		img.alt = altCritrionClosed;
+		img.title = altCriterionClosed;
+	}else{
+		img.alt = altBookClosed;
+		img.title = altBookClosed;
+	}
 }
 
 function expand(nodeId) {
@@ -268,8 +361,13 @@ function expand(nodeId) {
 	if (!node || !img) return;
 	node.className = "expanded";
 	img.src = minus.src;
-	img.alt = altBookOpen;
-	img.title = altBookOpen;
+	if(isCriterionNode(nodeId)){
+		img.alt = altCriterionOpen;
+		img.title = altCriterionOpen;
+	}else{
+		img.alt = altBookOpen;
+		img.title = altBookOpen;
+	}
 }
 
 function getParent(child) {
@@ -364,8 +462,8 @@ function keyDownHandler(folderId, key, target)
   	return false;
 }
 
-function hasSelections() {
-		var hrefs = getSelectedResources();
+function hasContentSelections() {
+		var hrefs = getSelectedContentResources();
 		if (!hrefs || hrefs == "")
 			return false;
 		else
@@ -373,8 +471,12 @@ function hasSelections() {
 }
 
 function enableOK() {
+    if (alwaysEnableOK) {
+        document.getElementById("ok").disabled = false;
+        return;
+    }
 	var value = document.getElementById("workingSet").value;
-	if (!value || value.length == 0 || value.charAt(0) == " " || !hasSelections())
+	if (!value || value.length == 0 || value.charAt(0) == " " || !hasContentSelections())
 		document.getElementById("ok").disabled = true;
 	else
 		document.getElementById("ok").disabled = false;
@@ -384,71 +486,151 @@ function enableOK() {
 
 </head>
 
-<body dir="<%=direction%>" onload="onloadHandler()"  onresize = "sizeBookContainer()">
+<body dir="<%=direction%>" onload="onloadHandler()"  onresize = "sizeContainer()">
 <form onsubmit="doSubmit();return false;">
 	<table id="wsTable" width="100%" cellspacing=0 cellpading=0 border=0 align=center >
 		<tr><td style="padding:5px 10px 0px 10px;"><label for="workingSet" accesskey="<%=ServletResources.getAccessKey("WorkingSetName", request)%>"><%=ServletResources.getLabel("WorkingSetName", request)%></label>
 		</td></tr>
 		<tr><td style="padding:0px 10px;"><input type="text" id="workingSet" name="workingSet" 
-		    value='<%=data.isEditMode()?UrlUtil.htmlEncode(data.getWorkingSetName()):""%>' maxlength=256 alt='<%=ServletResources.getString("WorkingSetName", request)%>' title='<%=ServletResources.getString("WorkingSetName", request)%>' onkeyup="enableOK();return true;">
+		    value='<%=data.isEditMode()?UrlUtil.htmlEncode(data.getWorkingSetName()):data.getDefaultName()%>' maxlength=256 alt='<%=ServletResources.getString("WorkingSetName", request)%>' title='<%=ServletResources.getString("WorkingSetName", request)%>' onkeyup="enableOK();return true;">
         </td></tr>
-         <tr><td><div id="selectBook" style="padding-top:5px; margin-<%=isRTL?"right":"left"%>:10px;"><%=ServletResources.getString("WorkingSetContent", request)%>:</div>
-		</td></tr>
     </table>
     
-<div id="booksContainer">
+    <table width="100%" cellspacing=0 cellpading=0 border=0 align=center style="table-layout:fixed;">
+        <tr>
+            <td>
+               <div id="selectBook" style="padding-top:5px; margin-<%=isRTL?"right":"left"%>:10px;"><%=ServletResources.getString("WorkingSetContent", request)%>:</div>
+		    </td>
+		    <%if(isCriteriaEnable){ %>
+		    <td width="50%">
+               <div id="selectCriteria" style="padding-top:5px;"><%=ServletResources.getString("Criteria", request)%>:</div>
+		    </td>
+		    <% }%>
+		</tr>
+		<tr>
+		    <td>
+		       <div id="booksContainer">
+		       <% for (int i=0; i<data.getTocCount(); i++){
+	                 if(!data.isTocEnabled(i)){
+		             // do not show
+		                 continue;
+	                  }
+	                 String label = data.getTocLabel(i);
+	                 short state = data.getTocState(i);
+	                 String checked = state == WorkingSetData.STATE_CHECKED || state == WorkingSetData.STATE_GRAYED ? "checked" : "";
+	                 String className = state == WorkingSetData.STATE_GRAYED ? "grayed" : "checkbox";
+               %>
+				    <div class="book" id='<%="id"+i%>' >
+					   <img id='<%="img"+i%>' alt="<%=ServletResources.getString("bookClosed", request)%>" title="<%=ServletResources.getString("bookClosed", request)%>" src="<%=prefs.getImagesDirectory()%>/plus.gif" onclick="collapseOrExpand('<%=i%>')">
+					   <input 	class='<%=className%>' 
+							    type="checkbox" 
+							    id='<%=UrlUtil.htmlEncode(data.getTocHref(i))%>' 
+							    name='<%=UrlUtil.htmlEncode(data.getTocHref(i))%>' 
+							    alt="<%=UrlUtil.htmlEncode(label)%>" <%=checked%> 
+						  	    onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+							    onclick="setSubtreeChecked(this, '<%="div"+i%>')">
+							    <label for="<%=UrlUtil.htmlEncode(data.getTocHref(i))%>"><%=UrlUtil.htmlEncode(label)%></label>
+					   <div id='<%="div"+i%>' class="collapsed">
+                         <%
+	                         for (int topic=0; topic<data.getTopicCount(i); topic++)
+	                         {
+	                            if(!data.isTopicEnabled(i, topic)){
+		                           // do not show
+		                           continue;
+	                            }
+		                        String topicLabel = data.getTopicLabel(i, topic);
+		                        String topicChecked = (state == WorkingSetData.STATE_CHECKED) || 
+							                          (state == WorkingSetData.STATE_GRAYED && data.getTopicState(i,topic) == WorkingSetData.STATE_CHECKED) 
+							                          ? "checked" : "";
+                         %>
+						    <div class="topic" id='<%="id"+i+"_"+topic%>'>
+							    <input 	class="checkbox" 
+									    type="checkbox" 
+									    id='<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>' 
+									    name='<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>' 
+									    alt="<%=UrlUtil.htmlEncode(topicLabel)%>" <%=topicChecked%> 
+									    onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
+									    onclick="updateParentState(this, '<%="div"+i%>')">
+									    <label for="<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>"><%=UrlUtil.htmlEncode(topicLabel)%></label>
+						    </div>
+                         <%
+	                         }
+                         %>
+					   </div>
+				    </div>
+               <%
+                   }		
+               %>
+                </div>
+		    </td>
+		    <%if(isCriteriaEnable){ %>
+		    <td width="50%">
+               <div id="criteriaContainer">
+                   <% 
+                     String[] category = data.getCriterionIds();
+                     for (int i=0; i < category.length; i++){
+                    	 String criterionId = category[i];
+	                     if(null == criterionId || 0 == criterionId.trim().length()){
+		                  // do not show
+		                     continue;
+	                     }
+	                     
+	                     short categoryState = data.getCriterionCategoryState(i);	            
+	                     String categoryChecked = categoryState == WorkingSetData.STATE_CHECKED || categoryState == WorkingSetData.STATE_GRAYED ? "checked" : "";
+		                 String inputClassName = categoryState == WorkingSetData.STATE_GRAYED ? "grayed" : "checkbox";
+		                 String criterionDisplayName = data.getCriterionDisplayName(criterionId);
+                   %>
+				    <div class="criterion" id='<%="id_criterion"+i%>' >
+					   <img id='<%="img_criterion"+i%>' alt="<%=ServletResources.getString("criterionClosed", request)%>" title="<%=ServletResources.getString("criterionClosed", request)%>" src="<%=prefs.getImagesDirectory()%>/plus.gif" onclick="collapseOrExpand('_criterion'+'<%=i%>')">
+					   <input 	class='<%=inputClassName%>' 
+							    type="checkbox" 
+							    id='<%=UrlUtil.htmlEncode(criterionId)%>' 
+							    name='<%=UrlUtil.htmlEncode(criterionId)%>' 
+							    alt="<%=UrlUtil.htmlEncode(criterionDisplayName)%>" <%=categoryChecked%> 
+						  	    onkeydown="keyDownHandler('_criterion'+<%=i%>, event.keyCode, this)"
+							    onclick="setSubtreeChecked(this, '<%="div_criterion"+i%>')">
+							    <label for="<%=UrlUtil.htmlEncode(criterionId)%>"><%=UrlUtil.htmlEncode(criterionDisplayName)%></label>
+					   <div id='<%="div_criterion"+i%>' class="collapsed">
+                         <%
+                             String[] criterionValueIds = data.getCriterionValueIds(criterionId);
+	                         for (int j=0; j<criterionValueIds.length; j++)
+	                         {
+		                        String criterionValue = criterionValueIds[j];
+		                        String valueChecked = (categoryState == WorkingSetData.STATE_CHECKED) || 
+		                          (categoryState == WorkingSetData.STATE_GRAYED && data.getCriterionValueState(i,j) == WorkingSetData.STATE_CHECKED) 
+		                          ? "checked" : "";
+		                        String criterionValueDisplayName ="";
+		                        if(criterionValue.equalsIgnoreCase("Uncategorized")){
+		                        	criterionValueDisplayName = ServletResources.getString("Uncategorized", request);
+		                        } else {
+		                        	criterionValueDisplayName = data.getCriterionValueDisplayName(criterionId, criterionValue);
+		                        }
+                         %>
+						    <div class="criterionValue" id='<%="id_criterion"+i+"_"+j%>'>
+							    <input 	class="checkbox" 
+									    type="checkbox" 
+									    id='<%=UrlUtil.htmlEncode(criterionId)+"_"+j+"_"%>' 
+									    name='<%=UrlUtil.htmlEncode(criterionId)+"_"+j+"_"%>' 
+									    alt="<%=UrlUtil.htmlEncode(criterionValueDisplayName)%>" <%=valueChecked%> 
+									    onkeydown="keyDownHandler('_criterion'+<%=i%>, event.keyCode, this)"
+									    onclick="updateParentState(this, '<%="div_criterion"+i%>')">
+									    <label for="<%=UrlUtil.htmlEncode(criterionId)+"_"+j+"_"%>"><%=UrlUtil.htmlEncode(criterionValueDisplayName)%></label>
+						    </div>
+                         <%
+	                         }
+                         %>
+					   </div>
+				    </div>
+               <%
+                   }		
+               %>
+               </div>
+		    </td>
+		    <% }%>
+		</tr>
 
-<% 
-for (int i=0; i<data.getTocCount(); i++)
-{
-	if(!tocData.isEnabled(i)){
-		// do not show
-		continue;
-	}
-	String label = data.getTocLabel(i);
-	short state = data.getTocState(i);
-	String checked = state == WorkingSetData.STATE_CHECKED || state == WorkingSetData.STATE_GRAYED ? "checked" : "";
-	String className = state == WorkingSetData.STATE_GRAYED ? "grayed" : "checkbox";
-%>
-				<div class="book" id='<%="id"+i%>' >
-					<img id='<%="img"+i%>' alt="<%=ServletResources.getString("bookClosed", request)%>" title="<%=ServletResources.getString("bookClosed", request)%>" src="<%=prefs.getImagesDirectory()%>/plus.gif" onclick="collapseOrExpand('<%=i%>')">
-					<input 	class='<%=className%>' 
-							type="checkbox" 
-							id='<%=UrlUtil.htmlEncode(data.getTocHref(i))%>' 
-							name='<%=UrlUtil.htmlEncode(data.getTocHref(i))%>' 
-							alt="<%=UrlUtil.htmlEncode(label)%>" <%=checked%> 
-						  	onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
-							onclick="setSubtreeChecked(this, '<%="div"+i%>')">
-							<label for="<%=UrlUtil.htmlEncode(data.getTocHref(i))%>"><%=UrlUtil.htmlEncode(label)%></label>
-					<div id='<%="div"+i%>' class="collapsed">
-<%
-	for (int topic=0; topic<data.getTopicCount(i); topic++)
-	{
-		String topicLabel = data.getTopicLabel(i, topic);
-		String topicChecked = (state == WorkingSetData.STATE_CHECKED) || 
-							  (state == WorkingSetData.STATE_GRAYED && data.getTopicState(i,topic) == WorkingSetData.STATE_CHECKED) 
-							  ? "checked" : "";
-%>
-						<div class="topic" id='<%="id"+i+"_"+topic%>'>
-							<input 	class="checkbox" 
-									type="checkbox" 
-									id='<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>' 
-									name='<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>' 
-									alt="<%=UrlUtil.htmlEncode(topicLabel)%>" <%=topicChecked%> 
-									onkeydown="keyDownHandler(<%=i%>, event.keyCode, this)"
-									onclick="updateParentState(this, '<%="div"+i%>')">
-									<label for="<%=UrlUtil.htmlEncode(data.getTocHref(i))+"_"+topic+"_"%>"><%=UrlUtil.htmlEncode(topicLabel)%></label>
-						</div>
-<%
-	}
-%>
-					</div>
-				</div>
-<%
-}		
-%>
+    </table>
 
-</div>
 <div id="buttonBar" >
 	<table valign="bottom" align="<%=isRTL?"left":"right"%>">
 		<tr id="buttonsTable" valign="bottom"><td valign="bottom" align="<%=isRTL?"left":"right"%>">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSetManager.jsp b/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSetManager.jsp
index 85d5c05..6aa0ae7 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSetManager.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/advanced/workingSetManager.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -14,10 +14,11 @@
 	WorkingSetManagerData data = new WorkingSetManagerData(application, request, response);
 	WebappPreferences prefs = data.getPrefs();
 	String dataSaveError = data.getSaveError();
+	boolean showCriteriaScope = data.isCriteriaScopeEnabled();
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <title><%=ServletResources.getString("SelectWorkingSetTitle", request)%></title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -184,14 +185,14 @@ function selectWorkingSet() {
 	var searchWord = window.opener.document.forms["searchForm"].searchWord.value;
 	if (searchWord)
 		search += "&searchWord="+encodeURIComponent(searchWord);
-		
+	
 	window.opener.location.replace(
 		window.opener.location.protocol +
 		"//" +
 		window.opener.location.host + 
 		window.opener.location.pathname +
 		search);
-
+   
  	window.close();
 	return false;
 }
@@ -207,7 +208,7 @@ function removeWorkingSet() {
 }
 
 var workingSetDialog;
-var w = 300;
+var w = <%=showCriteriaScope%>? 640:320;
 var h = 500;
 
 function newWorkingSet() { 	
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/err.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/err.jsp
index 196be27..9a63075 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/err.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/err.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -10,8 +10,8 @@
 --%>
 <%@ page import="org.eclipse.help.internal.webapp.data.*" contentType="text/html; charset=UTF-8"%>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
 
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title> Error </title>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/header.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/header.jsp
index 6a6ca76..307b69c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/header.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/header.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2009 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
      IBM Corporation - initial API and implementation
 --%>
 <%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
+<%@ page import="org.eclipse.help.webapp.*" %>
 
 <% 
 	request.setCharacterEncoding("UTF-8");
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/help.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/help.jsp
index bf1d2b8..1a33a9e 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/help.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/help.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@
 	LayoutData data = new LayoutData(application,request, response);
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/index.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/index.jsp
index 5639f62..428cf6a 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/index.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/index.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@
 	LayoutData data = new LayoutData(application,request, response);
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@@ -21,7 +21,7 @@
 <jsp:include page="livehelp_js.jsp"/>
 </head>
 
-<frameset rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>45,*">
+<frameset rows="<%="0".equals(data.getBannerHeight())?"":data.getBannerHeight()+","%>45,*<%=data.getFooterRowText()%>">
 <%
 	if(!("0".equals(data.getBannerHeight()))){
 %>
@@ -31,6 +31,14 @@
 %>
 	<frame name="TabsFrame" title="<%=ServletResources.getString("helpToolbarFrame", request)%>" src='<%="basic/tabs.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' marginwidth="5" marginheight="5" scrolling="no">
 	<frame name="HelpFrame" title="<%=ServletResources.getString("ignore", "HelpFrame", request)%>" src='<%="basic/help.jsp"+UrlUtil.htmlEncode(data.getQuery())%>' frameborder="no" marginwidth="0" marginheight="0" scrolling="no">
+<%
+	if(!("0".equals(data.getFooterHeight()))){
+%>
+	<frame name="FooterFrame" title="<%=ServletResources.getString("Footer", request)%>" src='<%=data.getFooterURL()%>'  marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize=0>
+<%
+	}
+%>
+
 </frameset>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/indexView.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/indexView.jsp
index 9120d47..abc241e 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/indexView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/indexView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2006 Intel Corporation and others.
+ Copyright (c) 2006, 2010 Intel Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/searchView.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/searchView.jsp
index b31b69a..9fd73ee 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/searchView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/searchView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2009 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 	LayoutData ldata = new LayoutData(application,request, response);
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta http-equiv="Pragma" content="no-cache">
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/tabs.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/tabs.jsp
index a6f364c..51782da 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/tabs.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/tabs.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -12,10 +12,10 @@
 <% 
 	LayoutData data = new LayoutData(application,request, response);
 	WebappPreferences prefs = data.getPrefs();
-	View[] views = data.getViews();
+	AbstractView[] views = data.getViews();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -52,26 +52,25 @@ function resynch()
 		if("bookmarks".equals(views[i].getName())){
 			continue;
 		}
+		// do not show non enabled views
+		if(!views[i].isVisibleBasic()){
+			continue;
+		}
 		
 		// search view is not called "advanced view"
-		String title = ServletResources.getString(views[i].getName(), request);
+		String title = data.getTitle(views[i]);
 		if("search".equals(views[i].getName())){
-			title=ServletResources.getString("Search", request);
-		}
-		
-		String viewHref="view.jsp?view="+views[i].getName();
-		// always pass query string to "links view"
-		if("links".equals(views[i].getName())){
-			viewHref=viewHref+(request.getQueryString()!=null?"&"+request.getQueryString():"");
+			title=ServletResources.getString("SearchLabel", request);
 		}
 		
+		String viewHref="view.jsp?view="+views[i].getName();		
 %>
 		<td nowrap>
 		<b>
 		<a  href='<%=viewHref%>' > 
 	         <img alt="<%=title%>" 
 	              title="<%=title%>" 
-	              src="<%=views[i].getOnImage()%>" border=0>
+	              src="<%=data.getImageURL(views[i])%>" border=0>
 	         
 	     <%=title%>
 	     </a>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/tocView.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/tocView.jsp
index d096f73..d3a1829 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/tocView.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/tocView.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@
 	WebappPreferences prefs = data.getPrefs();
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/toolbar.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/toolbar.jsp
index b05d615..eb6fc6a 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/toolbar.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/toolbar.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 %>
 
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
@@ -27,7 +27,7 @@
 	String title=data.getTitle();
 	// search view is not called "advanced view"
 	if("search".equals(request.getParameter("view"))){
-		title=ServletResources.getString("Search", request);
+		title=ServletResources.getString("SearchLabel", request);
 	}
 %>
 	<b>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/basic/view.jsp b/eclipse/plugins/org.eclipse.help.webapp/basic/view.jsp
index 685ec4e..38a0636 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/basic/view.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/basic/view.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -11,20 +11,22 @@
 <%@ include file="header.jsp"%>
 <% 
 	LayoutData data = new LayoutData(application,request, response);
-	View view = data.getCurrentView();
+	AbstractView view = data.getCurrentView();
 	if (view == null) return;
 %>
 
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title><%=ServletResources.getString(view.getName(), request)%></title>
+<title><%=data.getTitle(view)%></title>
 </head>
 
 <frameset  rows="30,*" >
-	<frame name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" src='<%=view.getURL()+view.getName()+"Toolbar.jsp"%>' frameborder="no" marginwidth="5" marginheight="3" scrolling="no">
-	<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" src='<%=view.getURL()+view.getName()+"View.jsp?"+UrlUtil.htmlEncode(request.getQueryString())%>#selectedItem' frameborder="no" marginwidth="5" marginheight="5">
+	<frame name="<%=view.getName()%>ToolbarFrame" title="<%=ServletResources.getString(view.getName()+"ViewToolbar", request)%>" 
+	    src='<%=data.getBasicURL(view,"Toolbar.jsp")%>' frameborder="no" marginwidth="5" marginheight="3" scrolling="no">
+	<frame name='<%=view.getName()%>ViewFrame' title="<%=ServletResources.getString(view.getName()+"View", request)%>" 
+	   src='<%=data.getBasicURL(view, "View.jsp") + "?" +UrlUtil.htmlEncode(request.getQueryString())%>#selectedItem' frameborder="no" marginwidth="5" marginheight="5">
 </frameset>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/build.properties b/eclipse/plugins/org.eclipse.help.webapp/build.properties
index ba224f8..807ba3c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/build.properties
+++ b/eclipse/plugins/org.eclipse.help.webapp/build.properties
@@ -10,7 +10,8 @@
 ###############################################################################
 
 source.. = src/
-src.includes=about.html
+src.includes = about.html,\
+               schema/
 customBuildCallbacks=buildJSPs.xml
 bin.includes = plugin.xml,\
                .,\
diff --git a/eclipse/plugins/org.eclipse.help.webapp/index.jsp b/eclipse/plugins/org.eclipse.help.webapp/index.jsp
index 4c231e0..d006e9b 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/index.jsp
+++ b/eclipse/plugins/org.eclipse.help.webapp/index.jsp
@@ -1,5 +1,5 @@
 <%--
- Copyright (c) 2000, 2004 IBM Corporation and others.
+ Copyright (c) 2000, 2010 IBM Corporation and others.
  All rights reserved. This program and the accompanying materials 
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -11,8 +11,8 @@
 <%@ page import="org.eclipse.help.internal.webapp.data.*" errorPage="/advanced/err.jsp" contentType="text/html; charset=UTF-8"%>
 <%
 	request.setCharacterEncoding("UTF-8");
-	LayoutData data = new LayoutData(application,request, response);
 	ServerState.webappStarted(application,request, response);
+	LayoutData data = new LayoutData(application,request, response);
 
 	if (request.getParameter("noscript") != null) {
 		request.getRequestDispatcher("/basic/index.jsp" + data.getQuery()).forward(request, response);
@@ -23,7 +23,7 @@
 		TocData tData = new TocData(application,request, response);
 %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang="<%=ServletResources.getString("locale", request)%>">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title><%=data.getWindowTitle()%></title>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/plugin.xml b/eclipse/plugins/org.eclipse.help.webapp/plugin.xml
index 1e85bc7..33fd4e0 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/plugin.xml
+++ b/eclipse/plugins/org.eclipse.help.webapp/plugin.xml
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
 <plugin>
-   <extension-point id="contentFilter" name="%content_filter_extension_name" schema="schema/contentFilter.exsd"/>
-   <extension
+   <extension-point id="contentFilter" name="Content Filter" schema="schema/contentFilter.exsd"/>
+   <extension-point id="view" name="View" schema="schema/view.exsd"/>
+   <extension-point id="frame" name="Webapp Frame" schema="schema/frame.exsd"/> 
+   <extension-point id="toolbarButton" name="Toolbar Button" schema="schema/toolbarButton.exsd"/>
+  <extension
          point="org.eclipse.equinox.http.registry.httpcontexts">
       <httpcontext
             id="help">
@@ -80,7 +83,7 @@
             httpcontextId="help">
       </servlet>
       <servlet
-            alias="/tocfragment"
+            alias="/advanced/tocfragment"
             class="org.eclipse.help.internal.webapp.servlet.TocFragmentServlet"
             httpcontextId="help">
       </servlet>
@@ -90,7 +93,7 @@
             httpcontextId="help">
       </servlet>
       <servlet
-            alias="/indexfragment"
+            alias="/advanced/indexfragment"
             class="org.eclipse.help.internal.webapp.servlet.IndexFragmentServlet"
             httpcontextId="help">
       </servlet>
@@ -123,4 +126,12 @@
             filter="(other.info=org.eclipse.help)">
       </serviceSelector>
    </extension>
+   <extension
+         id="org.eclipse.help.webapp.remoteStatusProducer"
+         name="Remote Status Producer"
+         point="org.eclipse.help.contentProducer">
+      <contentProducer
+            producer="org.eclipse.help.internal.webapp.StatusProducer">
+      </contentProducer>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/schema/frame.exsd b/eclipse/plugins/org.eclipse.help.webapp/schema/frame.exsd
new file mode 100644
index 0000000..976e683
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/schema/frame.exsd
@@ -0,0 +1,94 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help.webapp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help.webapp" id="frame" name="Webapp Frame"/>
+      </appInfo>
+      <documentation>
+         Allows additional frames to be added to the help web application.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="frame"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="frame">
+      <annotation>
+         <documentation>
+            A frame in the help web application
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A class which has methods which return the path of the jsp file for this frame as well as other information abot the frame.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.webapp.AbstractFrame:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/schema/toolbarButton.exsd b/eclipse/plugins/org.eclipse.help.webapp/schema/toolbarButton.exsd
new file mode 100644
index 0000000..03f9789
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/schema/toolbarButton.exsd
@@ -0,0 +1,89 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help.webapp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help.webapp" id="toolbarButton" name="Toolbar Button"/>
+      </appInfo>
+      <documentation>
+         Allows additional buttons to be added to the toolbars of the help web application.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="button"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="button">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A class which extends AbstractButton and which contains methods which return the image URL, action to be performed and othe attributes of the button.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.webapp.AbstractButton:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/schema/view.exsd b/eclipse/plugins/org.eclipse.help.webapp/schema/view.exsd
new file mode 100644
index 0000000..70c86d8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/schema/view.exsd
@@ -0,0 +1,89 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help.webapp" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help.webapp" id="view" name="Webapp View"/>
+      </appInfo>
+      <documentation>
+         The view extension point allows a view to be contributed to the help system webapp. The view area of the webapp is the tabbed area (in the advanced presentation) which contains the table of contents as well as search results and other views. Each view requires two jsp files, a View.jsp file and a Toolbar.jsp file. This extension point uses a class to get all of teh properties of teh view.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="view"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="view">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A class which extends AbstractView and which contains methods which return the paths of the icon and the jsp files used for this view.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.webapp.AbstractView:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java
new file mode 100644
index 0000000..b76e5c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/StatusProducer.java
@@ -0,0 +1,272 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Locale;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.IHelpContentProducer;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.base.remote.RemoteStatusData;
+import org.eclipse.help.internal.protocols.HelpURLStreamHandler;
+import org.eclipse.help.internal.util.ProductPreferences;
+import org.eclipse.help.internal.webapp.data.WebappPreferences;
+
+
+public class StatusProducer implements IHelpContentProducer {
+
+	// Remote Status 'page' href
+	public static final String REMOTE_STATUS_HREF = "NetworkHelpStatus.html"; //$NON-NLS-1$
+	// Remote Status from bad topic 'page' href
+	public static final String MISSING_TOPIC_HREF = "MissingTopicStatus.html"; //$NON-NLS-1$
+	// Remote Status from bad topic 'page' href
+	public static final String SEARCH_REMOTE_STATUS_HREF = "SearchNetworkHelpStatus.html"; //$NON-NLS-1$
+	// Default TAB size
+	private static final String TAB = "  "; //$NON-NLS-1$
+	// index.jsp
+	private static final String INDEX = "/index.jsp"; //$NON-NLS-1$
+	
+	// HTML constants
+	private static final String BEGIN_HEAD_HTML = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" //$NON-NLS-1$
+		+ "<html>\n" //$NON-NLS-1$
+		+ tab(1)+"<head>\n" //$NON-NLS-1$
+		+ tab(2)+"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n"; //$NON-NLS-1$
+	
+	private static final String END_HEAD_HTML = tab(1)+"</head>\n"; //$NON-NLS-1$
+
+	private static final String END_BODY_HTML = tab(2)+"</div>\n"+tab(1)+"</body>\n</html>"; //$NON-NLS-1$ //$NON-NLS-2$
+	
+	
+	
+	public InputStream getInputStream(String pluginID, String href, Locale locale) {
+
+		// Only accept requests for our pages.  Otherwise
+		// return null so Eclipse tries to find the right help
+		if (!href.equalsIgnoreCase(REMOTE_STATUS_HREF) && 
+			!href.equalsIgnoreCase(MISSING_TOPIC_HREF) &&
+			!href.equalsIgnoreCase(SEARCH_REMOTE_STATUS_HREF))
+			return null;
+		
+		StringBuffer pageBuffer = new StringBuffer();
+		
+		
+		// Get all remote sites, and subset of non-working sites
+		ArrayList remoteSites = RemoteStatusData.getRemoteSites();
+		ArrayList badSites = RemoteStatusData.checkSitesConnectivity(remoteSites);
+
+		// Check to see if there are any enabled remote sites.
+		// If not, return null - default topic not found will display
+		if (remoteSites.isEmpty())
+		{
+			return null;
+		}
+		
+		// If this is a call from an invalid topic,
+		// check to see if a predefined error page exists
+		// in the preferences
+		if (href.equalsIgnoreCase(MISSING_TOPIC_HREF)){
+            String errorPage = Platform.getPreferencesService().getString(
+            		HelpBasePlugin.PLUGIN_ID, 
+            		"page_not_found",  //$NON-NLS-1$
+            		null, 
+            		null);
+			if (errorPage != null && errorPage.length() > 0) {	
+
+				URL helpURL;
+				try {
+					helpURL = new URL("help", //$NON-NLS-1$
+								null, -1, errorPage,
+								HelpURLStreamHandler.getDefault());
+					return helpURL.openStream();
+				} catch (MalformedURLException e) {
+					HelpWebappPlugin.logError("Unable to locate error page: "+errorPage, e); //$NON-NLS-1$
+				} catch (IOException e) {
+					HelpWebappPlugin.logError("Unable to open error page: "+errorPage, e); //$NON-NLS-1$
+				}
+				
+			}
+		}
+		
+
+		// Write HTML header and body beginning.
+		pageBuffer.append(getHtmlHead(locale));
+		pageBuffer.append(getBeginHtmlBody());
+		
+		
+
+		// Check to see if all remote sites failed,
+		// or just a subset
+		boolean allFailed;
+		if (remoteSites.size()==badSites.size())
+		{
+			allFailed = true;
+			pageBuffer.append(tab(3)+"<h1>"+WebappResources.getString("allRemoteHelpUnavailable", locale)+"</h1>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		else
+		{
+			allFailed = false;
+			pageBuffer.append(tab(3)+"<h1>"+WebappResources.getString("someRemoteHelpUnavailable", locale)+"</h1>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		
+
+		// Add a close link to top
+		if (href.equalsIgnoreCase(REMOTE_STATUS_HREF))
+		{
+			WebappPreferences prefs = new WebappPreferences();
+			String homepage = "/help/topic"+prefs.getHelpHome(); //$NON-NLS-1$
+			
+			pageBuffer.append(tab(3)+"<div style=\"position:absolute;right:4px;top:4px;\">\n"); //$NON-NLS-1$
+			pageBuffer.append(tab(4)+"<table>\n"+tab(5)+"<tr>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			pageBuffer.append(tab(6)+"<td style=\"background-color:white;border-width:1px;border-style:solid;border-color:grey;\">"+makeAnchor(homepage,WebappResources.getString("Close", locale),"style=\"font-size:.8em;\"",false)+"</td>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			pageBuffer.append(tab(5)+"</tr>\n"+tab(4)+"</table>\n"+tab(3)+"</div>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$		
+		}
+		
+		
+		if (href.equalsIgnoreCase(MISSING_TOPIC_HREF))
+			pageBuffer.append(tab(3)+"<p>"+WebappResources.getString("topicUnavailable",locale)+"</p>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		
+		// Write potential causes, based on some or
+		// all sites failing.
+		pageBuffer.append(tab(3)+"<p>"+WebappResources.getString("potentialCauses",locale)+"</p>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		
+		pageBuffer.append(tab(3)+"<ul>\n"); //$NON-NLS-1$
+		pageBuffer.append(tab(4)+"<li>"+WebappResources.getString("serversCouldBeDown",locale)+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		pageBuffer.append(tab(4)+"<li>"+WebappResources.getString("mayNeedProxy",locale)+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		if (allFailed)
+			pageBuffer.append(tab(4)+"<li>"+WebappResources.getString("networkCouldBeDown",locale)+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		pageBuffer.append(tab(3)+"</ul>\n"); //$NON-NLS-1$
+		
+		
+		// Check for bad sites, and write them
+
+		if (remoteSites.size()>badSites.size())
+		{
+			pageBuffer.append(tab(3)+"<h2>"+WebappResources.getString("sitesWithConnectivity", locale)+"</h2>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			pageBuffer.append(tab(3)+"<ul>\n"); //$NON-NLS-1$
+			for (int r=0;r<remoteSites.size();r++)
+			{
+				if (!badSites.contains(remoteSites.get(r)))
+					pageBuffer.append(tab(4)+"<li>"+makeAnchor(remoteSites.get(r)+INDEX,remoteSites.get(r)+INDEX,"",true)+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
+			pageBuffer.append(tab(3)+"</ul>\n"); //$NON-NLS-1$
+		}
+		else
+			pageBuffer.append(tab(3)+WebappResources.getString("noRemoteSitesAvailable", locale)+"</br>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		
+		if (!badSites.isEmpty())
+		{
+			pageBuffer.append(tab(3)+"<h2>"+WebappResources.getString("sitesWithoutConnectivity", locale)+"</h2>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			pageBuffer.append(tab(3)+"<ul>\n"); //$NON-NLS-1$
+			
+			for (int b=0;b<badSites.size();b++)
+				pageBuffer.append(tab(4)+ "<li>"+badSites.get(b)+INDEX+"</li>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+			
+			pageBuffer.append(tab(3)+ "</ul>\n"); //$NON-NLS-1$
+		}
+		
+		String activeLink = 
+			MessageFormat.format(
+					WebappResources.getString("remotePreferences", locale), //$NON-NLS-1$
+					new String[]{getActiveLink(locale)});
+
+		pageBuffer.append(tab(3)+activeLink);
+
+		pageBuffer.append(END_BODY_HTML);
+		
+		
+//		String tmp = pluginID+" , "+href; //$NON-NLS-1$
+//		System.out.println(tmp);
+		
+		ByteArrayInputStream bais = new ByteArrayInputStream(pageBuffer.toString().getBytes());
+		
+		return bais;
+	}
+
+	
+
+	/*
+	 * Build the HTML header
+	 */
+	private String getHtmlHead(Locale locale)
+	{
+		return BEGIN_HEAD_HTML + '\n'
+			+ tab(2) + "<meta name=\"copyright\" content=\"Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.\" >\n" //$NON-NLS-1$
+			+ tab(2) + "<title>"+WebappResources.getString("remoteStatusTitle", locale)+"</title>\n" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			+ tab(2) + "<link rel=\"stylesheet\" href=\"PLUGINS_ROOT/org.eclipse.help.base/doc/book.css\" charset=\"utf-8\" type=\"text/css\">\n" //$NON-NLS-1$
+			+ tab(2) + "<script language=\"JavaScript\" src=\"PLUGINS_ROOT/org.eclipse.help/livehelp.js\"> </script>\n" //$NON-NLS-1$
+			+ tab(2) + "<script type=\"text/javascript\" src=\"../../../content/org.eclipse.help/livehelp.js\"></script>\n" //$NON-NLS-1$
+			+ END_HEAD_HTML;
+	}
+	
+	/*
+	 * Build the beginning of the HTML body
+	 */
+	private String getBeginHtmlBody()
+	{
+		String body = tab(1);
+		
+		if (ProductPreferences.isRTL())
+			body += "<body dir=\"rtl\">"; //$NON-NLS-1$
+		else
+			body += "<body>"; //$NON-NLS-1$
+		
+		
+		return body + '\n'
+			+ tab(2) + "<div id=\"banner\"><img src=\"PLUGINS_ROOT/org.eclipse.help.base/doc/help_banner.jpg\" alt=\"Help banner\" width=\"1600\" height=\"36\"></div>\n" //$NON-NLS-1$
+			+ tab(2) + "<div id=\"content\">\n"; //$NON-NLS-1$
+	}
+	
+	/*
+	 * Build the active help link that opens the
+	 * remote infocenter content preferences
+	 */
+	private String getActiveLink(Locale locale)
+	{
+		return "<img src=\"PLUGINS_ROOT/org.eclipse.help/command_link.png\"/>"  //$NON-NLS-1$
+			+ "<a class=\"command-link\""  //$NON-NLS-1$
+			+ " href='javascript:executeCommand(\"org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.help.ui.contentPreferencePage)\")'>" //$NON-NLS-1$
+			+ WebappResources.getString("remotePreferencesMenuSelect", locale)+"</a>"; //$NON-NLS-1$ //$NON-NLS-2$
+	}	
+	
+	/*
+	 * Generate an HTML anchor.  Anchors
+	 * will open in a new window / tab based on
+	 * newWindow arg.
+	 */
+	private String makeAnchor(String url,String title,String style,boolean newWindow)
+	{
+		String target=""; //$NON-NLS-1$
+		if (newWindow)
+			target = "target=\"_blank\" ";  //$NON-NLS-1$
+		
+		return "<a "+style+" "+target+"href=\""+url+"\">"+title+"</a>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+	}
+	
+	/*
+	 * Generate tabbed spacing for HTML elements
+	 */
+	private static String tab(int count)
+	{
+		String tabs = ""; //$NON-NLS-1$
+		for (int i=0;i<count;i++)
+			tabs+=TAB;
+		return tabs;
+	}	
+	
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java
index 6661e50..5aaf0c9 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,6 +66,29 @@ public class WebappResources {
 		}
 
 	}
+	
+	/**
+	 * Returns a string from a property file. It uses 'name' as the key to
+	 * retrieve from the webapp.properties file. And it uses args[] to replace the variables in property string. 
+	 */
+	public static String getString(String name, Locale locale, String[] args) {
+
+		// get bundle
+		ResourceBundle bundle = getBundle(locale);
+		if (bundle == null) {
+			return name;
+		}
+
+		// get value
+		try {
+			String stringFromPropertiesFile = bundle.getString(name);
+			stringFromPropertiesFile = MessageFormat.format(
+					stringFromPropertiesFile, args);
+			return stringFromPropertiesFile;
+		} catch (Exception e) {
+			return name;
+		}
+	}
 	/**
 	 * Obtains resource bundle for specified locale. Loads bundle if necessary
 	 * 
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
index 2af7d31..0a12255 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/WebappResources.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,13 +8,20 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
+
+# The locale of this translation of the resource file, will be used as follows: <html lang = "en">
+# The resource "locale" is always translated to the name of the locale used for the other resources
+# in this file. For example locale=fr in the French translation of this file 
+locale=en
+
 browserTitle = Help - {0}
-Search=&Search:
+SearchLabel=&Search:
 SearchResults=Search Results
 Content=Contents
 Links=Links
 Bookshelf=Table of Contents
 show_all=Show All Topics
+filter=Filter
 show_categories=Show result categories
 show_descriptions=Show result descriptions
 Toggle=Toggle Navigation
@@ -27,14 +34,16 @@ PrintMulti=Print topics
 PrintTopic=Print selected topic
 PrintToc=Print selected topic and all subtopics
 PrintError=You must select a valid topic to print
-QuickSearch=Search selected topic and all subtopics
+QuickSearchMulti=Search topics
+QuickSearchTopic=Search selected topic
+QuickSearchToc=Search selected topic and all subtopics
 TocHeading=Contents
 Close=Close
 Nothing_found=Nothing found.
 Indexing=Indexing...
 Loading=Loading... please wait
 complete=complete
-GO=GO
+GO=Go
 doSearch=To search the documentation, type a query in the Search field. The search results will be shown in this view.
 Advanced=Advanced Search
 SearchExpression=Search Expression
@@ -47,6 +56,7 @@ Select=Select a set of books to be searched:
 Toolbar=Toolbar
 Tabs=Tabs
 Banner=Banner
+Footer=Footer
 CannotSync=The current document displayed does not exist in the table of contents.
 JavaScript_disabled=This page requires JavaScript.  You need to enable JavaScript in your web browser, restart the browser, and return to this page.
 back_tip = Go Back
@@ -80,24 +90,27 @@ bookmarks=Bookmarks
 Views=Navigation Views
 noLiveHelp=Active help is not enabled in your installation.
 noLiveHelpInInfocenter=You must run help locally to perform "active help" actions.
-cookieSaveFailed=Saving search scope failed.  Please reduce search scope definitions.
+cookieSaveFailed=Saving scope failed.  Please reduce scope definitions.
 CookieUtil.tooManyCookiesNeeded=Too may cookies required to store data.
 cookiesRequired=This feature requires cookies to be enabled in your browser.
 
 All=All topics
-selectAll=Search &all topics
-selectWorkingSet=Search only the following &topics:
-SelectWorkingSetTitle=Select Search Scope
+selectAll=Show &all topics
+selectWorkingSet=Show only the following &topics:
+SelectWorkingSetTitle=Select Scope
 NewWorkingSetButton=&New...
 EditWorkingSetButton=&Edit...
 RemoveWorkingSetButton=&Remove
 OK=OK
-NewWorkingSet=New Search List
-EditWorkingSet=Edit Search List
+NewWorkingSet=New Scope
+EditWorkingSet=Edit Scope
 WorkingSetName=List &name:
-WorkingSetContent=Topics to search
-Scope=Search scope:
-ScopeTooltip=Select Search Scope
+WorkingSetContent=Topics
+Scope=Scope:
+ScopeTooltip=Select Scope
+DefaultScopeName=scope
+NoTopicsSelected=You must select at least one topic
+NoNameEntered=You must enter a name for the scope
 
 #Confirm Show All Topics dialog
 confirmShowAllTitle=Confirm
@@ -107,12 +120,26 @@ yes=Yes
 no=No
 dontask=Do &not warn me again
 
-# Remote help error dialog
-remoteHelpErrorMessage=There was a problem communicating with the remote help server. Some topics\nmay not be available.\n\nPlease check your network connection and remote help server preferences.
+# Remote help status page
+remoteStatusTitle=Network Help Status - Eclipse SDK
+noRemoteSitesToQuery=There are no remote sites to query for status.
+sitesWithConnectivity=Available Sites
+sitesWithoutConnectivity=Unavailable Sites
+noRemoteSitesAvailable=<em>Note: </em>Eclipse can not connect to any of your enabled remote sites.
+allRemoteHelpUnavailable=Network Help Unavailable
+someRemoteHelpUnavailable=Some Network Help Unavailable
+topicUnavailable=The topic that you have requested is not available.
+potentialCauses=This condition may be caused by one of the following:
+serversCouldBeDown=The remote server(s) could be down.
+networkCouldBeDown=Your machine may have lost network connectivity.
+mayNeedProxy=You may need to configure proxy settings to access a remote server.
+remotePreferences=To view, edit, and test network information center settings, open {0}.
+remotePreferencesMenuSelect=Window &gt Preferences &gt Help &gt Content
 
 # Frame Titles 
 ignore=Layout frame: {0}
 helpToolbarFrame=Main Help Toolbar
+SearchFrame=Search Toolbar
 TabsFrame=Selection of Navigation Views
 topicView=Topic View
 topicViewToolbar=Topic View Toolbar
@@ -154,6 +181,8 @@ IndexTypeinButton=Display
 IndexEmpty=There are no entries in the index.
 IndexPrevious=<< Previous
 IndexNext=Next >>
+See=See {0}
+SeeAlso=See also {0}
 
 # About page
 provider=Provider
@@ -164,3 +193,16 @@ aboutPlugins=About Plug-Ins
 userAgent=User Agent
 preferences=Preferences
 badPreferences=Unable to read preferences
+
+# Quick print page
+topicNumExceeded=You have chosen to print {0} individual topics. The maximum number of topics allowed to be printed is {1}. To continue printing the first {1} documents of your selection click ''{2}''. Click ''{3}'' to cancel this print job. 
+noConnection=The maximum capacity for active connections to the server has been reached. Unfortunately, your print job can not be completed at this time. Please try again.\n
+ioException=An error occured during content retrieval.\n
+alert=Alert 
+error=Error
+
+#criteria
+Uncategorized=Uncategorized
+criterionClosed=Criterion closed
+criterionOpen=Criterion open
+Criteria=Criteria
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java
new file mode 100644
index 0000000..14a05a1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ButtonData.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.data;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.webapp.AbstractButton;
+
+public class ButtonData extends RequestData {
+	
+	private static final String BUTTON_EXTENSION_POINT = "org.eclipse.help.webapp.toolbarButton"; //$NON-NLS-1$
+	private List allButtons;
+
+	public ButtonData(ServletContext context, HttpServletRequest request,
+			HttpServletResponse response) {
+		super(context, request, response);
+	}
+	
+	public AbstractButton[] getButtons() {
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(BUTTON_EXTENSION_POINT);
+		if (allButtons == null) {
+			allButtons = new ArrayList();
+			for (int i = 0; i < elements.length; i++) {
+				Object obj = null;
+				try {
+					obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+				} catch (CoreException e) {
+					HelpWebappPlugin.logError("Create extension failed:[" //$NON-NLS-1$
+							+ BUTTON_EXTENSION_POINT + "].", e); //$NON-NLS-1$
+				}
+				if (obj instanceof AbstractButton) {
+					allButtons.add(obj);
+				}
+			}
+			Collections.sort(allButtons);
+		}
+
+		List buttonList = new ArrayList();
+		for (Iterator iter = allButtons.iterator(); iter.hasNext();) {
+			AbstractButton button = (AbstractButton) iter.next();
+			//if (button.isVisible() && button.getLocation() == location) {
+				buttonList.add(button);
+			//}
+		}			
+		AbstractButton[] buttons = (AbstractButton[]) buttonList.toArray(new AbstractButton[buttonList.size()]);
+		return buttons;		
+	}
+	
+	public String getImageUrl(AbstractButton button) {
+		return request.getContextPath() + button.getImageURL();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
index 7c02a79..e51f602 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CookiesData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.webapp.servlet.CookieUtil;
 
 /**
  * Helper class for reading cookie values
@@ -38,7 +39,10 @@ public class CookiesData extends RequestData {
         			}
         		}
 		}
-		return Platform.getPreferencesService().getBoolean(HelpBasePlugin.PLUGIN_ID, "advanced.syncDefault", false, null); //$NON-NLS-1$
+		boolean isSynchToc = Platform.getPreferencesService().getBoolean
+		    (HelpBasePlugin.PLUGIN_ID, "advanced.syncDefault", false, null); //$NON-NLS-1$
+		CookieUtil.setCookieValue("synchToc", Boolean.toString(isSynchToc), request, response); //$NON-NLS-1$
+		return isSynchToc; 
     }
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CssUtil.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CssUtil.java
index a051ed9..f9df417 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CssUtil.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/CssUtil.java
@@ -17,6 +17,7 @@ import java.util.StringTokenizer;
 
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.util.ProductPreferences;
 
 /**
  * Utility class for parsing the CSS preferences
@@ -24,7 +25,7 @@ import org.eclipse.help.internal.base.HelpBasePlugin;
 
 public class CssUtil {
 	
-	private final static String cssLink1 = "<link rel=\"stylesheet\" href=\"../content/PLUGINS_ROOT"; //$NON-NLS-1$
+	private final static String cssLink1 = "<link rel=\"stylesheet\" href=\""; //$NON-NLS-1$
 	private static final String cssLink2 = "\" type=\"text/css\"></link>\n"; //$NON-NLS-1$
 	
 	private static String replaceParameters(String input) {
@@ -61,15 +62,23 @@ public class CssUtil {
 		}
 	}
 	
-	public static String createCssIncludes(List cssFiles) {
+	public static String createCssIncludes(List cssFiles, String backPath) {
 		StringBuffer script = new StringBuffer();
 		for (Iterator iter = cssFiles.iterator(); iter.hasNext();) {
 			String cssPath = (String) iter.next();
 			script.append(cssLink1);
-			script.append(cssPath);
+			script.append(fixCssPath(cssPath, backPath));
 			script.append(cssLink2);
 		}
 		return script.toString();
 	}
+	
+	/*
+	 * Substitute for PLUGINS_ROOT and PRODUCT_PLUGIN
+	 */
+	private static String fixCssPath(String path, String prefix) {
+		String newPath = ProductPreferences.resolveSpecialIdentifiers(path);
+		return prefix + "content" + newPath; //$NON-NLS-1$
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
index f0bb6b6..88cad13 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/EnabledTopicUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexEntry2;
+import org.eclipse.help.IIndexSee;
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
 import org.eclipse.help.UAContentFilter;
@@ -93,9 +95,21 @@ public class EnabledTopicUtils {
 				return true;
 			}
 		}
+		if (entry instanceof IIndexEntry2) {
+			IIndexSee[] sees = ((IIndexEntry2)entry).getSees();
+			for (int i = 0; i < sees.length; i++) {
+				if (isEnabled(sees[i])) {
+					return true;
+				}
+			}
+		}
 		return false;
 	}
 
+	public static boolean isEnabled(IIndexSee see) {
+		return see.isEnabled(HelpEvaluationContext.getContext());
+	}
+
 	/**
 	 * Filter out any disabled entries from an array
 	 * @param entries an array of entries
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java
new file mode 100644
index 0000000..3d16888
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/FrameData.java
@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.data;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.webapp.AbstractFrame;
+
+public class FrameData extends RequestData {
+	
+	private static final String FRAME_EXTENSION_POINT = "org.eclipse.help.webapp.frame"; //$NON-NLS-1$
+	private List allFrames;
+
+	public FrameData(ServletContext context, HttpServletRequest request,
+			HttpServletResponse response) {
+		super(context, request, response);
+	}
+	
+	public AbstractFrame[] getFrames(int location) {
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(FRAME_EXTENSION_POINT);
+		if (allFrames == null) {
+			allFrames = new ArrayList();
+			for (int i = 0; i < elements.length; i++) {
+				Object obj = null;
+				try {
+					obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+				} catch (CoreException e) {
+					HelpWebappPlugin.logError("Create extension failed:[" //$NON-NLS-1$
+							+ FRAME_EXTENSION_POINT + "].", e); //$NON-NLS-1$
+				}
+				if (obj instanceof AbstractFrame) {
+					allFrames.add(obj);
+				}
+			}
+			Collections.sort(allFrames);
+		}
+
+		List frameList = new ArrayList();
+		for (Iterator iter = allFrames.iterator(); iter.hasNext();) {
+			AbstractFrame frame = (AbstractFrame) iter.next();
+			if (frame.isVisible() && frame.getLocation() == location) {
+				frameList.add(frame);
+			}
+		}			
+		AbstractFrame[] frames = (AbstractFrame[]) frameList.toArray(new AbstractFrame[frameList.size()]);
+		return frames;		
+	}
+	
+	public String getUrl(AbstractFrame frame) {
+		return request.getContextPath() + frame.getURL();
+	}
+	
+	public String getContentAreaFrameSizes() {
+		String size = "24,*"; //$NON-NLS-1$
+		AbstractFrame[] frames = getFrames(AbstractFrame.BELOW_CONTENT);
+		for (int f = 0; f < frames.length; f++) {
+			size += ',';
+			size += frames[f].getSize();
+		}
+		return size;
+	}
+	
+	/**
+	 * Get the additional frame added to the Main Help Toolbar
+	 * Considering of the layout and space of Main Help Toolbar, only one extra frame is supported
+	 * 
+	 * @return AbstractFrame or null if not found
+	 */
+	public AbstractFrame getHelpToolbarFrame() {
+		AbstractFrame[] frames = getFrames(AbstractFrame.HELP_TOOLBAR);
+		if(frames.length > 0) {
+			if(frames.length > 1){
+				HelpWebappPlugin.logWarning("Only one extra frame is supported to be added to Help Toolbar. The first reterived element will be used.");  //$NON-NLS-1$
+			}
+			return frames[0];
+		}else {
+			return null;
+		}
+	}
+	
+	/**
+	 * Get layout(frame sizes) of Main Help Toolbar
+	 */
+	public String getHelpToolbarFrameSizes() {
+		String size = "*"; //$NON-NLS-1$
+		AbstractFrame frame = getHelpToolbarFrame();
+		if(null != frame) {
+			boolean isRTL = UrlUtil.isRTL(request, response);
+			if(isRTL) {
+				size = frame.getSize() + ", " + size; //$NON-NLS-1$
+			}else {
+				size =  size + ", " + frame.getSize(); //$NON-NLS-1$
+			}
+		}
+		return size;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
index d256643..06a5602 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/LayoutData.java
@@ -16,10 +16,16 @@ import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.base.remote.RemoteStatusData;
 import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.internal.webapp.StatusProducer;
+import org.eclipse.help.webapp.AbstractView;
 import org.eclipse.osgi.service.localization.BundleLocalization;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -27,8 +33,9 @@ import org.osgi.framework.ServiceReference;
 
 public class LayoutData extends RequestData {
 
+	private static final String VIEW_EXTENSION_POINT = "org.eclipse.help.webapp.view"; //$NON-NLS-1$
 	private String query = ""; //$NON-NLS-1$
-	private View[] views;
+	private AbstractView[] views;
 
 	public LayoutData(ServletContext context, HttpServletRequest request,
 			HttpServletResponse response) {
@@ -64,6 +71,38 @@ public class LayoutData extends RequestData {
 		}
 		return height;
 	}
+	
+	public String getFooterURL() {
+		String footer = preferences.getFooter();
+		if (footer == null || footer.trim().length() == 0) {
+			footer = "about:blank"; //$NON-NLS-1$
+		} else if (footer.startsWith("http:/") || footer.startsWith("https:/")) { //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (footer.startsWith("file:/") || footer.startsWith("jar:file:/")) { //$NON-NLS-1$ //$NON-NLS-2$
+			footer = "topic/" + footer; //$NON-NLS-1$
+		} else {
+			footer = "topic" + footer; //$NON-NLS-1$
+		}
+		return footer;
+	}
+
+	public String getFooterHeight() {
+		String height = preferences.getFooterHeight();
+		if (height == null || height.length() == 0) {
+			height = "0"; //$NON-NLS-1$
+		}
+		return height;
+	}
+	
+	/**
+	 * @return the text to be added to the rows attribute of the frameset
+	 */
+	public String getFooterRowText() {
+		String height = getFooterHeight();
+		if ("0".equals(height)) { //$NON-NLS-1$
+			return ""; //$NON-NLS-1$
+		}
+		return "," + height; //$NON-NLS-1$
+	}
 
 	public String getContentURL() {
 		String navHref = request.getParameter("nav"); //$NON-NLS-1$
@@ -72,12 +111,15 @@ public class LayoutData extends RequestData {
 		}
 		String topicHref = request.getParameter("topic"); //$NON-NLS-1$
 		if (topicHref == null || topicHref.length() == 0) {
-			return UrlUtil.getHelpURL(preferences.getHelpHome());
+			if (BaseHelpSystem.getMode()!=BaseHelpSystem.MODE_INFOCENTER && RemoteStatusData.isAnyRemoteHelpUnavailable())
+				return "../topic/"+HelpWebappPlugin.PLUGIN_ID+'/'+StatusProducer.REMOTE_STATUS_HREF; //$NON-NLS-1$
+			else
+				return UrlUtil.getHelpURL(preferences.getHelpHome());
 		}
 		else {
 			TocData tocData = new TocData(context, request, response);
 			String topic = tocData.getSelectedTopic();
-			if (topic == null || !UrlUtil.isValidTopicURL(topic)) {
+			if (topic == null || !UrlUtil.isValidTopicParamOrWasOpenedFromHelpDisplay(topic)) {
 				return UrlUtil.getHelpURL(preferences.getHelpHome());
 			}
 			return  topic;
@@ -87,7 +129,7 @@ public class LayoutData extends RequestData {
 	/**
 	 * Return array of length 0 if no views
 	 */
-	public View[] getViews() {
+	public AbstractView[] getViews() {
 		if (views != null)
 			return views;
 
@@ -119,13 +161,29 @@ public class LayoutData extends RequestData {
 			viewList.add(bookmarksview);
 		}
 		
-		views = (View[]) viewList.toArray(new View[viewList.size()]);
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(VIEW_EXTENSION_POINT); 
+		for (int i = 0; i < elements.length; i++) {
+			Object obj = null;
+			try {
+				obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (CoreException e) {
+				HelpWebappPlugin.logError("Create extension failed:[" //$NON-NLS-1$
+						+ VIEW_EXTENSION_POINT + "].", e); //$NON-NLS-1$
+			}
+			if (obj instanceof AbstractView) {
+				viewList.add(obj);
+			}
+		}
+		
+		views = (AbstractView[]) viewList.toArray(new AbstractView[viewList.size()]);
 		return views;
 	}
 
 	public String getVisibleView() {
 		String requestedView = request.getParameter("tab"); //$NON-NLS-1$
-		View[] allViews = getViews();
+		AbstractView[] allViews = getViews();
 		for (int i = 0; i < allViews.length; i++) {
 			if (allViews[i].getName().equals(requestedView)) {
 				return requestedView;
@@ -134,7 +192,7 @@ public class LayoutData extends RequestData {
 		return "toc"; //$NON-NLS-1$
 	}
 
-	public View getCurrentView() {
+	public AbstractView getCurrentView() {
 		String name = request.getParameter("view"); //$NON-NLS-1$
 		views = getViews();
 		for (int i = 0; i < views.length; i++)
@@ -142,6 +200,7 @@ public class LayoutData extends RequestData {
 				return views[i];
 		return null;
 	}
+	
 	public String getWindowTitle() {
 		String titlePref = preferences.getTitleResource();
 		int slash = titlePref.indexOf('/');
@@ -165,4 +224,40 @@ public class LayoutData extends RequestData {
 		}
 		return BaseHelpSystem.getProductName();
 	}
+
+	/**
+	 * Returns the URL of a JSP file in the advanced presentation
+	 */
+	public String getAdvancedURL(AbstractView view, String fileSuffix) {
+		return createURL(view.getURL(), view.getName(), fileSuffix);
+	}
+	
+	/**
+	 * Returns the URL of a JSP file in the basic presentation
+	 */
+	public String getBasicURL(AbstractView view, String fileSuffix) {
+		return createURL(view.getBasicURL(), view.getName(), fileSuffix);
+	}
+
+	private String createURL(String path, String viewName, String fileSuffix) {
+		if (path == null || path.length() == 0) {
+			return viewName + fileSuffix;
+		}
+		if (path.charAt(path.length() -1) != '/') {
+			path = path + '/';
+		}
+		return request.getContextPath() + path + viewName + fileSuffix;
+	}
+	
+	public String getImageURL(AbstractView view) {
+		String filename = view.getImageURL();
+		if (filename.length() != 0 && filename.charAt(0) == '/') {
+			return request.getContextPath() + filename;
+		}
+		return filename;
+	}
+	
+	public String getTitle(AbstractView view) {
+		return view.getTitle(UrlUtil.getLocaleObj(request, null));
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
index 534b6a5..ced6d55 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/PrintData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,15 +24,19 @@ import java.util.StringTokenizer;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.help.HelpSystem;
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
 import org.eclipse.help.internal.search.HTMLDocParser;
 import org.eclipse.help.internal.webapp.HelpWebappPlugin;
 import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
@@ -42,6 +46,12 @@ import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
  */
 public class PrintData extends RequestData {
 
+	// default max connections for concurrent print
+	private static final int defaultMaxConnections = 10;
+
+	// default max topics allowed for one print request
+	private static final int defaultMaxTopics = 500;
+
 	// where to inject the section numbers
 	private static final Pattern PATTERN_HEADING = Pattern.compile("<body.*?>[\\s]*?([\\w])", Pattern.MULTILINE | Pattern.DOTALL | Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
 
@@ -51,11 +61,39 @@ public class PrintData extends RequestData {
 	// Where to inject css
 	private static final Pattern PATTERN_END_HEAD = Pattern.compile("</head.*?>", Pattern.MULTILINE | Pattern.DOTALL | Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
 
+	private static boolean initialized = false;
+
+	private static int allowedConnections;
+
+	private static int allowedMaxTopics;
+
+	private boolean confirmed;
+	
+	// flag right-to-left direction of text
+	private boolean isRTL;
+
+	private AbstractHelpScope scope;
+
 	/*
 	 * Constructs the print data for the given request.
 	 */
 	public PrintData(ServletContext context, HttpServletRequest request, HttpServletResponse response) {
 		super(context, request, response);
+
+		if (!initialized) {
+			initPreferences(preferences);
+		}
+
+		isRTL = UrlUtil.isRTL(request, response);
+		scope = RequestScope.getScope(request, response, false);
+		
+		String confirmString = request.getParameter("confirmed"); //$NON-NLS-1$
+		if ((confirmString != null) && ("true".equals(confirmString))) { //$NON-NLS-1$
+			confirmed = true;
+		} else {
+			confirmed = false;
+		}
+
 	}
 
 	/*
@@ -80,74 +118,212 @@ public class PrintData extends RequestData {
 	}
 
 	/*
+	 * init properties set in base preference.ini for quick print
+	 */
+	private static synchronized void initPreferences(WebappPreferences preferences) {
+
+		if (initialized) {
+			return;
+		}
+
+		// set max connection numbers for concurrent access
+		String maxConnections = preferences.getQuickPrintMaxConnections();
+		if ((null == maxConnections) || ("".equals(maxConnections.trim()))) { //$NON-NLS-1$
+			allowedConnections = defaultMaxConnections;
+		} else {
+			try {
+				allowedConnections = Integer.parseInt(maxConnections);
+			} catch (NumberFormatException e) {
+				HelpWebappPlugin.logError("Init maxConnections error. Set to default.", e); //$NON-NLS-1$
+				allowedConnections = defaultMaxConnections;
+			}
+		}
+
+		// set max topics allowed to print in one request
+		String maxTopics = preferences.getQuickPrintMaxTopics();
+		if ((null == maxTopics) || ("".equals(maxTopics.trim()))) { //$NON-NLS-1$
+			allowedMaxTopics = defaultMaxTopics;
+		} else {
+			try {
+				allowedMaxTopics = Integer.parseInt(maxTopics);
+			} catch (NumberFormatException e) {
+				HelpWebappPlugin.logError("Init maxTopics error. Set to default.", e); //$NON-NLS-1$
+				allowedMaxTopics = defaultMaxTopics;
+			}
+		}
+
+		initialized = true;
+	}
+
+	/*
+	 * Generates resources to print
+	 */
+	public void generateResources(Writer out) throws IOException, ServletException {
+		// check resource allocation
+		if (!getConnection()) {
+            RequestDispatcher rd = context.getRequestDispatcher("/advanced/printError.jsp"); //$NON-NLS-1$
+            request.setAttribute("msg", "noConnection"); //$NON-NLS-1$ //$NON-NLS-2$
+            rd.forward(request, response);
+            return;    
+		}
+        
+
+		ITopic topic = getTopic(); // topic selected for print
+		int topicRequested = topicsRequested(topic);
+		if (topicRequested > allowedMaxTopics) {
+			if (!confirmed) {
+				releaseConnection();
+				RequestDispatcher rd = context.getRequestDispatcher("/advanced/printConfirm.jsp"); //$NON-NLS-1$
+				request.setAttribute("topicsRequested", String.valueOf(topicRequested)); //$NON-NLS-1$
+				request.setAttribute("allowedMaxTopics", String.valueOf(allowedMaxTopics)); //$NON-NLS-1$
+				rd.forward(request, response);
+				return;
+			}
+		}
+
+		try {
+			generateToc(out);
+			generateContent(out);
+		} catch (IOException e) {
+			RequestDispatcher rd = context.getRequestDispatcher("/advanced/printError.jsp"); //$NON-NLS-1$
+			request.setAttribute("msg", "ioException"); //$NON-NLS-1$ //$NON-NLS-2$
+			rd.forward(request, response);
+		} finally {
+			releaseConnection();
+		}
+	}
+
+    private static synchronized boolean getConnection() {
+        if (allowedConnections > 0) {
+            allowedConnections--;
+            return true;
+        }
+        return false;
+    }
+
+    private static synchronized void releaseConnection() {
+    	allowedConnections++;
+    }
+	
+	/*
+	 * Calculate the amount of topics to print in one request 
+	 */
+	private int topicsRequested(ITopic topic) {
+		int topicsRequested = 0;
+		if (topic.getHref() != null && topic.getHref().length() > 0) {
+			topicsRequested++;
+		}
+
+		ITopic[] subtopics = ScopeUtils.inScopeTopics(topic.getSubtopics(), scope);
+		for (int i = 0; i < subtopics.length; ++i) {
+			topicsRequested += topicsRequested(subtopics[i]);
+		}
+		return topicsRequested;
+	}
+
+	/*
 	 * Generates and outputs a table of contents div with links.
 	 */
-	public void generateToc(Writer out) throws IOException {
-		out.write("<div id=\"toc\">"); //$NON-NLS-1$
+	private void generateToc(Writer out) throws IOException {
+		int tocGenerated = 0;
+
+		out.write("<html>\n"); //$NON-NLS-1$
+		out.write("<head>\n"); //$NON-NLS-1$
+		out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"); //$NON-NLS-1$
+		out.write("<title>" + UrlUtil.htmlEncode(getTitle()) +"</title>\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
+		out.write("<link rel=\"stylesheet\" href=\"print.css\" charset=\"utf-8\" type=\"text/css\">\n"); //$NON-NLS-1$
+		out.write("</head>\n"); //$NON-NLS-1$
+		out.write("<body dir=\"" + (isRTL ? "right" : "left") + "\" onload=\"print()\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		out.write("<div id=\"toc\">\n"); //$NON-NLS-1$
 		out.write("<h1>"); //$NON-NLS-1$
 		out.write(getTitle());
-		out.write("</h1>"); //$NON-NLS-1$
+		out.write("</h1>\n"); //$NON-NLS-1$
 		out.write("<h2>"); //$NON-NLS-1$
 		out.write(ServletResources.getString("TocHeading", request)); //$NON-NLS-1$
-		out.write("</h2>"); //$NON-NLS-1$
-		out.write("<div id=\"toc_content\">"); //$NON-NLS-1$
+		out.write("</h2>\n"); //$NON-NLS-1$
+		out.write("<div id=\"toc_content\">\n"); //$NON-NLS-1$
 		ITopic topic = getTopic();
-		ITopic[] subtopics = EnabledTopicUtils.getEnabled(topic.getSubtopics());
-		for (int i=0;i<subtopics.length;++i) {
-			generateToc(subtopics[i], String.valueOf(i + 1), out);
+
+		String href = topic.getHref();
+		if (href != null && href.length() > 0) {
+			tocGenerated++;
 		}
-		out.write("</div>"); //$NON-NLS-1$
-		out.write("</div>"); //$NON-NLS-1$
+		ITopic[] subtopics = ScopeUtils.inScopeTopics(topic.getSubtopics(), scope);
+		for (int i = 0; i < subtopics.length; ++i) {
+			tocGenerated = generateToc(subtopics[i], String.valueOf(i + 1), tocGenerated, out);
+		}
+
+		out.write("</div>\n"); //$NON-NLS-1$
+		out.write("</div>\n"); //$NON-NLS-1$
+		out.write("</body>\n"); //$NON-NLS-1$
+		out.write("</html>\n"); //$NON-NLS-1$
 	}
 
 	/*
 	 * Auxiliary method for recursively generating table of contents div.
 	 */
-	private void generateToc(ITopic topic, String sectionId, Writer out) throws IOException {
-		out.write("<div class=\"toc_" + (sectionId.length() > 2 ? "sub" : "") + "entry\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		out.write(sectionId + ". " + "<a href=\"#section" + sectionId + "\">" + topic.getLabel() + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		ITopic[] subtopics = EnabledTopicUtils.getEnabled(topic.getSubtopics());
-		for (int i=0;i<subtopics.length;++i) {
-			String subsectionId = sectionId + "." + (i + 1); //$NON-NLS-1$
-			generateToc(subtopics[i], subsectionId, out);
+	private int generateToc(ITopic topic, String sectionId, int tocGenerated, Writer out) throws IOException {
+		if (tocGenerated < allowedMaxTopics) {
+			out.write("<div class=\"toc_" + (sectionId.length() > 2 ? "sub" : "") + "entry\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			out.write(sectionId + ". " + "<a href=\"#section" + sectionId + "\">" + topic.getLabel() + "</a>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+			String href = topic.getHref();
+			if (href != null && href.length() > 0) {
+				tocGenerated++;
+			}
+
+			ITopic[] subtopics = ScopeUtils.inScopeTopics(topic.getSubtopics(), scope);
+			for (int i = 0; i < subtopics.length; ++i) {
+				String subsectionId = sectionId + "." + (i + 1); //$NON-NLS-1$
+				tocGenerated = generateToc(subtopics[i], subsectionId, tocGenerated, out);
+			}
+			out.write("</div>\n"); //$NON-NLS-1$
+			return tocGenerated;
 		}
-		out.write("</div>"); //$NON-NLS-1$
+		return tocGenerated;
 	}
 
 	/*
 	 * Generates the content to print (the merged topics).
 	 */
 	public void generateContent(Writer out) throws IOException {
-		generateContent(getTopic(), null, out, new HashSet());
+		int topicsGenerated = 0;
+		generateContent(getTopic(), null, topicsGenerated, new HashSet(), out);
 	}
-	
+
 	/*
 	 * Auxiliary method for recursively generating print content.
 	 */
-	private void generateContent(ITopic topic, String sectionId, Writer out, Set generated) throws IOException {
-		String href = topic.getHref();
-		if (href != null) {
-			// get the topic content
-			href = removeAnchor(href);
-			String pathHref = href.substring(0, href.lastIndexOf('/') + 1);
-			String baseHref = "../topic" + pathHref;   //$NON-NLS-1$
-			String content;
-			if (!generated.contains(href)) {
-				generated.add(href);
-				content = getContent(href, locale);
-				// root topic doesn't have sectionId
-				if (sectionId != null) {
-					content = injectHeading(content, sectionId);
+	private int generateContent(ITopic topic, String sectionId, int topicsGenerated, Set generated, Writer out) throws IOException {
+		if (topicsGenerated < allowedMaxTopics) {
+			String href = topic.getHref();
+			if (href != null && href.length() > 0) {
+				topicsGenerated++;
+				// get the topic content
+				href = removeAnchor(href);
+				String pathHref = href.substring(0, href.lastIndexOf('/') + 1);
+				String baseHref = "../topic" + pathHref; //$NON-NLS-1$
+				String content;
+				if (!generated.contains(href)) {
+					generated.add(href);
+					content = getContent(href, locale);
+					// root topic doesn't have sectionId
+					if (sectionId != null) {
+						content = injectHeading(content, sectionId);
+					}
+					content = normalizeHrefs(content, baseHref);
+					content = injectCss(content);
+					out.write(content);
 				}
-				content = normalizeHrefs(content, baseHref);
-				content = injectCss(content);
-				out.write(content);
-			}				
-		}
-		ITopic[] subtopics = EnabledTopicUtils.getEnabled(topic.getSubtopics());
-		for (int i=0;i<subtopics.length;++i) {
-			String subsectionId = (sectionId != null ? sectionId + "." : "") + (i + 1); //$NON-NLS-1$ //$NON-NLS-2$
-			generateContent(subtopics[i], subsectionId, out, generated);
+			}
+			ITopic[] subtopics = ScopeUtils.inScopeTopics(topic.getSubtopics(), scope);
+			for (int i = 0; i < subtopics.length; ++i) {
+				String subsectionId = (sectionId != null ? sectionId + "." : "") + (i + 1); //$NON-NLS-1$ //$NON-NLS-2$
+				topicsGenerated = generateContent(subtopics[i], subsectionId, topicsGenerated, generated, out);
+			}
+			return topicsGenerated;
+		} else {
+			return topicsGenerated;
 		}
 	}
 
@@ -208,6 +384,11 @@ public class PrintData extends RequestData {
 				InputStream rawInput = HelpSystem.getHelpContent(href, locale);
 				boolean filter = BaseHelpSystem.getMode() != BaseHelpSystem.MODE_INFOCENTER;
 				in = DynamicXHTMLProcessor.process(href, rawInput, locale, filter);
+
+				if (in == null) {
+					in = HelpSystem.getHelpContent(href, locale);
+				}
+
 				Reader reader = new BufferedReader(new InputStreamReader(in, charset));
 				char[] cbuf = new char[4096];
 				int num;
@@ -306,6 +487,6 @@ public class PrintData extends RequestData {
 	private String getCssIncludes() {
 		List css = new ArrayList();
 		CssUtil.addCssFiles("topic_css", css); //$NON-NLS-1$
-		return CssUtil.createCssIncludes(css);
+		return CssUtil.createCssIncludes(css, "../"); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestData.java
index 27e04fe..779a602 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,6 +78,11 @@ public class RequestData {
 		return UrlUtil.isMozilla(request);
 	}
 
+	public boolean isMacMozilla() {
+		return UrlUtil.isMozilla(request) && 
+		(request.getHeader("User-Agent").indexOf("Macintosh") > 0 ); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	public String getMozillaVersion() {
 		return UrlUtil.getMozillaVersion(request);
 	}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java
new file mode 100644
index 0000000..ea87628
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/RequestScope.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.data;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.help.HelpSystem;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.base.HelpBaseResources;
+import org.eclipse.help.internal.base.IHelpBaseConstants;
+import org.eclipse.help.internal.base.scope.EnablementScope;
+import org.eclipse.help.internal.base.scope.FilterScope;
+import org.eclipse.help.internal.base.scope.IntersectionScope;
+import org.eclipse.help.internal.base.scope.ScopeRegistry;
+import org.eclipse.help.internal.base.scope.UniversalScope;
+import org.eclipse.help.internal.base.scope.WorkingSetScope;
+import org.eclipse.help.internal.util.ProductPreferences;
+import org.eclipse.help.internal.util.URLCoder;
+import org.eclipse.help.internal.webapp.servlet.CookieUtil;
+import org.eclipse.help.internal.webapp.servlet.WebappWorkingSetManager;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class RequestScope {
+	
+	private static final String SCOPE_PARAMETER_NAME = "scope"; //$NON-NLS-1$
+	private static final String SCOPE_COOKIE_NAME = "filter"; //$NON-NLS-1$
+
+	/**
+	 * Gets a scope object based upon the preferences and request
+	 * @param isSearchFilter is true if this filter will be used to filter search results.
+	 * Search results are already filtered by search scope and if this parameter is true search 
+	 * scopes will not be considered
+	 * @return
+	 */
+	public static AbstractHelpScope getScope(HttpServletRequest req, HttpServletResponse resp, boolean isSearchFilter ) {
+		AbstractHelpScope[] scopeArray;
+		scopeArray = getActiveScopes(req, resp, isSearchFilter);	
+		switch (scopeArray.length) {
+		case 0:
+			return new UniversalScope();
+		case 1:
+			return scopeArray[0];
+		default:
+			return new IntersectionScope(
+					scopeArray);
+		}	
+	}
+
+	public static AbstractHelpScope[] getActiveScopes(HttpServletRequest req,
+			HttpServletResponse resp, boolean isSearchFilter) {
+		AbstractHelpScope[] scopeArray;
+		String scopeString;
+		List scopes = new ArrayList();
+		if (ProductPreferences.useEnablementFilters()) {
+			scopes.add(new FilterScope()); // Workbench is always filtered, infocenter may be
+		}
+		scopeString = getScopeString(req);
+		if (scopeString != null) {
+			AbstractHelpScope scope = ScopeRegistry.getInstance().parseScopePhrase(scopeString);
+			if (scope != null) {
+				scopes.add(scope);
+			}
+		}
+		// If not in infocenter mode test whether disabled topics should be displayed
+		if (!HelpSystem.isShared() && HelpBasePlugin.getActivitySupport().isFilteringEnabled()) {
+			scopes.add(new EnablementScope());
+		}
+		// Add filter by search scope if not called from Help View
+		boolean isHelpViewTopic = "/ntopic".equals(req.getServletPath()); //$NON-NLS-1$
+		if (!isSearchFilter  && !isHelpViewTopic) { 
+			// Try for a working set
+			try {
+				WebappWorkingSetManager manager = new WebappWorkingSetManager(req,
+						resp, UrlUtil.getLocale(req, resp));
+				String wset = manager.getCurrentWorkingSet();
+				if (wset != null && wset.length() > 0) {
+					WorkingSetScope workingSetScope = new WorkingSetScope(wset,
+							manager, HelpBaseResources.SearchScopeFilterName);
+					scopes.add(workingSetScope);
+				}
+			} catch (Exception e) {
+			}
+		}
+		scopeArray = (AbstractHelpScope[]) scopes.toArray(new AbstractHelpScope[scopes.size()]);
+		return scopeArray;
+	}
+
+	private static String getScopeString(HttpServletRequest req) {
+		String scopeString;
+		if (HelpSystem.isShared()) {
+			scopeString = getScopeFromCookies(req);
+		} else {
+			scopeString = getScopeFromPreferences();
+			if (scopeString == null) {
+				scopeString = ScopeRegistry.ENABLEMENT_SCOPE_ID;
+			}
+		}
+		return scopeString;
+	}	
+	
+	public static void setScopeFromRequest(HttpServletRequest request, HttpServletResponse response) {
+		// See if there is a scope parameter, if so save as cookie or preference
+		String[] phrases = request.getParameterValues(SCOPE_PARAMETER_NAME); 
+		String scopeStr = ""; //$NON-NLS-1$
+		if (phrases!=null){
+//			AbstractHelpScope scope = ScopeRegistry.getInstance().parseScopePhrases(phrases);
+			for (int p=0;p<phrases.length;p++)
+			{
+				if (!(phrases[p].startsWith("(") && !phrases[p].startsWith("("))) //$NON-NLS-1$ //$NON-NLS-2$
+					phrases[p] = '('+phrases[p]+')';
+				scopeStr+=phrases[p];
+				if (p<phrases.length-1)
+					scopeStr+=ScopeRegistry.SCOPE_AND;
+			}
+		}
+		CookieUtil.deleteObsoleteCookies(request, response);
+		saveScope(scopeStr, request, response);
+	}
+	
+	public static void saveScope(String scope, HttpServletRequest request, HttpServletResponse response) {
+		if (HelpSystem.isShared()) {
+			if (response != null) {	
+				CookieUtil.setCookieValue(SCOPE_COOKIE_NAME, URLCoder.compactEncode(scope), request, response);
+			}
+		} else {
+			InstanceScope instanceScope = new InstanceScope();
+			IEclipsePreferences pref = instanceScope.getNode(HelpBasePlugin.PLUGIN_ID);
+			pref.put(IHelpBaseConstants.P_KEY_HELP_SCOPE, scope);
+			try {
+				pref.flush();
+			} catch (BackingStoreException e) {
+			}
+		}
+	}
+	
+	private static String getScopeFromCookies(HttpServletRequest request) {
+		// check if scope was passed earlier in this session
+		Cookie[] cookies = request.getCookies();
+		if (cookies != null) {
+			for (int c = 0; c < cookies.length; c++) {
+				if (SCOPE_COOKIE_NAME.equals(cookies[c].getName())) { 
+					return URLCoder.decode(cookies[c].getValue());
+				}
+			}
+		}
+		return null;
+	}
+	
+	private static String getScopeFromPreferences() {
+		String scope = Platform.getPreferencesService().getString
+	         (HelpBasePlugin.PLUGIN_ID, IHelpBaseConstants.P_KEY_HELP_SCOPE, null, null); 
+		return scope;
+	}
+	
+	public static boolean filterBySearchScope(HttpServletRequest request) {
+        return true;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
index 46d4c69..acea7e8 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.help.HelpSystem;
 import org.eclipse.help.IHelpResource;
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.base.HelpBasePlugin;
@@ -37,6 +38,8 @@ import org.eclipse.help.internal.search.SearchQuery;
 import org.eclipse.help.internal.search.SearchResults;
 import org.eclipse.help.internal.webapp.HelpWebappPlugin;
 import org.eclipse.help.internal.webapp.servlet.WebappWorkingSetManager;
+import org.eclipse.help.internal.workingset.AdaptableSelectedToc;
+import org.eclipse.help.internal.workingset.AdaptableSelectedTopic;
 import org.eclipse.help.internal.workingset.AdaptableToc;
 import org.eclipse.help.internal.workingset.AdaptableTopic;
 import org.eclipse.help.internal.workingset.WorkingSet;
@@ -82,6 +85,11 @@ public class SearchData extends ActivitiesData {
 			topicHref = null;
 
 		searchWord = request.getParameter("searchWord"); //$NON-NLS-1$
+		
+		if (isScopeRequest()) {
+			workingSetName = request.getParameter("workingSet"); //$NON-NLS-1$
+			saveWorkingSet(workingSetName);
+		} 
 
 		// try loading search results or get the indexing progress info.
 		if (isSearchRequest() && !isScopeRequest()) {
@@ -123,6 +131,15 @@ public class SearchData extends ActivitiesData {
 	public boolean isScopeRequest() {
 		return (request.getParameter("workingSet") != null); //$NON-NLS-1$
 	}
+	
+	protected boolean isQuickSearch() {
+		return request.getParameterValues("quickSearch") != null; //$NON-NLS-1$
+	}
+	
+	public boolean isSelectedTopicQuickSearchRequest() {
+		String quickSearchType = request.getParameter("quickSearchType"); //$NON-NLS-1$
+		return (null != quickSearchType && "QuickSearchTopic".equalsIgnoreCase(quickSearchType)); //$NON-NLS-1$
+	}
 
 	public String getCategoryLabel(int i) {
 		IHelpResource cat = hits[i].getCategory();
@@ -289,13 +306,10 @@ public class SearchData extends ActivitiesData {
 	 * @return String
 	 */
 	public String getScope() {
-		if (workingSetName != null)
+		if (workingSetName != null && workingSetName.length() != 0)
 			return workingSetName;
 
-		if (isScopeRequest()) {
-			workingSetName = request.getParameter("workingSet"); //$NON-NLS-1$
-			saveWorkingSet(workingSetName);
-		} else if (isSearchRequest()) {
+        if (isSearchRequest()) {
 			workingSetName = request.getParameter("scope"); //$NON-NLS-1$
 			// if we have already set the working set, then use it.
 			if (workingSetName == null) {
@@ -381,17 +395,24 @@ public class SearchData extends ActivitiesData {
 
 	private SearchResults createHitCollector() {
 		WorkingSet[] workingSets;
+		boolean isSearchSelectedAndChildren = false;
 		if (request.getParameterValues("scopedSearch") != null) { //$NON-NLS-1$
 			// scopes are books (advanced search)
 			workingSets = createTempWorkingSets();
-		} else if (request.getParameterValues("quickSearch") != null) { //$NON-NLS-1$
-			// scopes is a toc or topic and its children
-			workingSets = createQuickSearchWorkingSet();
+		} else if (isQuickSearch()) { 
+			// scopes is just the selected toc or topic
+			if(isSelectedTopicQuickSearchRequest()){
+				workingSets = createQuickSearchWorkingSetOnSelectedTopic();
+			} else{  // scopes is a toc or topic and its children
+				workingSets = createQuickSearchWorkingSet();
+				isSearchSelectedAndChildren = true;
+			}
 		} else {
 			// scopes are working set names
 			workingSets = getWorkingSets();
 		}
 
+		AbstractHelpScope filter = RequestScope.getScope(request, response, !isSearchSelectedAndChildren);
 		int maxHits = 500;
 		String maxHitsStr = request.getParameter("maxHits"); //$NON-NLS-1$
 		if (maxHitsStr != null) {
@@ -403,7 +424,7 @@ public class SearchData extends ActivitiesData {
 			} catch (NumberFormatException nfe) {
 			}
 		}
-		return new SearchResultFilter(workingSets, maxHits, getLocale());
+		return new SearchResultFilter(workingSets, maxHits, getLocale(), filter, isQuickSearch());
 	}
 
 	/**
@@ -483,6 +504,32 @@ public class SearchData extends ActivitiesData {
 		workingSets[0] = new WorkingSet("quickSearch", resources); //$NON-NLS-1$
 		return workingSets;
 	}
+	
+	/**
+	 * @return WorkingSet[] consisting of a single selected toc or topic or null
+	 */
+	private WorkingSet[] createQuickSearchWorkingSetOnSelectedTopic() {
+		WorkingSet[] workingSets = new WorkingSet[1];
+		TocData tocData = new TocData(context, request, response);
+		int selectedToc = tocData.getSelectedToc();
+		if (selectedToc < 0) {
+			return new WorkingSet[0];
+		}
+		IToc toc = tocData.getTocs()[selectedToc];
+		ITopic[] topics = tocData.getTopicPathFromRootPath(toc);
+		List resources = new ArrayList();
+		AdaptableSelectedToc adaptableSelectedToc = new AdaptableSelectedToc(toc);
+		if (topics != null) {
+			ITopic selectedTopic = topics[topics.length - 1];
+			AdaptableSelectedTopic adaptableSelectedTopic = new AdaptableSelectedTopic(selectedTopic);
+			resources.add(adaptableSelectedTopic);
+			adaptableSelectedTopic.setParent(adaptableSelectedToc);
+		} else {
+			resources.add(adaptableSelectedToc);
+		}
+		workingSets[0] = new WorkingSet("quickSearch", resources); //$NON-NLS-1$
+		return workingSets;
+	}
 
 	public String getQueryExceptionMessage() {
 		if (queryException == null) {
@@ -496,8 +543,10 @@ public class SearchData extends ActivitiesData {
 	 * that implement ISearchEngineResult2 and canOpen() returns true.
 	 */
 	private static class SearchResultFilter extends SearchResults {
-		public SearchResultFilter(WorkingSet[] workingSets, int maxHits, String locale) {
-			super(workingSets, maxHits, locale);
+		public SearchResultFilter(WorkingSet[] workingSets, int maxHits, String locale, 
+				AbstractHelpScope filter, boolean isQuickSearch) {
+			super(workingSets, maxHits, locale, isQuickSearch);
+			setFilter(filter);
 		}
 		public void addHits(List hits, String highlightTerms) {
 			List filtered = new ArrayList();
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
index 5f5599d..4e6cad9 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ServletResources.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,6 +81,31 @@ public class ServletResources {
 		return property.substring(0, amp - 1)
 				+ property.substring(amp + 1, property.length());
 	}
+	
+	/**
+	 * Returns a string from a property file. It uses 'name' as a the key to
+	 * retrieve from the webapp.properties file. 'args[]' is used to replace 
+	 * the variables in property string.
+	 * 
+	 * @param request
+	 *            HttpServletRequest or null; default locale will be used if
+	 *            null passed
+	 */
+	public static String getString(String name, String[] args,
+			HttpServletRequest request) {
+		String property = WebappResources.getString(name, UrlUtil.getLocaleObj(
+				request, null), args);
+		if (property == null || property.length() <= 0) {
+			return property;
+		}
+		int amp = property.indexOf('&');
+		if (amp <0 || amp >= property.length() - 1) {
+			return property;
+		}
+		return property.substring(0, amp - 1)
+				+ property.substring(amp + 1, property.length());
+	}
+	
 	/**
 	 * Returns a string from a property file, with underlined access key. Access
 	 * key can be specified in the label by &amp: character following character
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
index 55a19ce..e9b8f0d 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TocData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,10 +25,12 @@ import javax.servlet.http.HttpServletResponse;
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
 import org.eclipse.help.UAContentFilter;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.base.HelpBasePlugin;
 import org.eclipse.help.internal.base.HelpEvaluationContext;
 import org.eclipse.help.internal.base.remote.RemoteHelp;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
 
 /**
  * Helper class for tocView.jsp initialization
@@ -56,6 +58,9 @@ public class TocData extends ActivitiesData {
 	
 	// images directory
 	private String imagesDirectory;
+	
+	// Scope
+	private AbstractHelpScope scope;
 	/**
 	 * Constructs the xml data for the contents page.
 	 * 
@@ -70,6 +75,7 @@ public class TocData extends ActivitiesData {
 		this.tocParameter = request.getParameter("toc"); //$NON-NLS-1$
 		this.topicHref = request.getParameter("topic"); //$NON-NLS-1$
 		this.expandPathParam = request.getParameter("expandPath"); //$NON-NLS-1$
+		this.scope = RequestScope.getScope(request, response, false);
 		
 		
 		if (tocParameter != null && tocParameter.length() == 0)
@@ -182,7 +188,7 @@ public class TocData extends ActivitiesData {
 	 * @return true if TOC should be visible
 	 */
 	public boolean isEnabled(int toc) {
-		return EnabledTopicUtils.isEnabled(tocs[toc]);
+		return ScopeUtils.showInTree(tocs[toc], scope);
 	}
 	/**
 	 * Check if given TOC is visible
@@ -213,7 +219,7 @@ public class TocData extends ActivitiesData {
 			}
 		} else {
 			// try obtaining the TOC from the topic
-			TopicFinder finder = new TopicFinder(topicHref, tocs);
+			TopicFinder finder = new TopicFinder(topicHref, tocs, scope);
 			topicPath = finder.getTopicPath();
 			selectedToc = finder.getSelectedToc();
 			numericPath = finder.getNumericPath();
@@ -226,7 +232,7 @@ public class TocData extends ActivitiesData {
 			// path[0] is the index of enabled TOCS, convert to an index into all TOCS
 			int enabled = path[0] + 1;
 			for (int i = 0;  enabled > 0 && i < tocs.length; i++) {
-				if (EnabledTopicUtils.isEnabled(tocs[i])) {
+				if (ScopeUtils.showInTree(tocs[i], scope)) {
 					enabled--;
 					if (enabled == 0) {
 						selectedToc = i;
@@ -234,24 +240,24 @@ public class TocData extends ActivitiesData {
 				}
 			}
 			if (selectedToc != -1) {
-		        topicPath = decodePath(path, tocs[selectedToc]);
+		        topicPath = decodePath(path, tocs[selectedToc], scope);
 			}
 		} else {
 			selectedToc = -1;
 		}
 	}
 
-	public static ITopic[] decodePath(int[] path, IToc toc) {
+	public static ITopic[] decodePath(int[] path, IToc toc, AbstractHelpScope scope) {
 		ITopic[] topicPath = new ITopic[path.length - 1];
 		try {
 			if (path.length > 1) {
 				ITopic[] topics = toc.getTopics();
-				ITopic[] enabledTopics = EnabledTopicUtils.getEnabled(topics);
+				ITopic[] enabledTopics = ScopeUtils.inScopeTopics(topics, scope);
 				topicPath[0] = enabledTopics[path[1]];
 			}
 			for (int i = 1; i < topicPath.length; i++) {
 				ITopic[] topics = topicPath[i-1].getSubtopics();
-				ITopic[] enabledTopics = EnabledTopicUtils.getEnabled(topics);
+				ITopic[] enabledTopics = ScopeUtils.inScopeTopics(topics, scope);
 				topicPath[i] = enabledTopics[path[i+1]];
 			}
 		} catch (RuntimeException e) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java
index c089a15..b10805d 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarButton.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,22 +77,12 @@ public class ToolbarButton {
 	}
 
 	/**
-	 * Returns the enabled gray image
+	 * Returns the image
 	 * 
 	 * @return String
 	 */
 	public String getImage() {
-		int i = image.lastIndexOf('/');
-		return image.substring(0, i) + "/e_" + image.substring(i + 1); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the image when selected
-	 * 
-	 * @return String
-	 */
-	public String getOnImage() {
-		return getImage();
+		return image;
 	}
 
 	public String getAction() {
@@ -109,5 +99,5 @@ public class ToolbarButton {
 	
 	public String getStyleClass() {
 		return styleClass;
-	}
+	}	
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
index 0d251ab..a68ee1d 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/ToolbarData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,12 +15,22 @@ import java.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.webapp.AbstractButton;
+
 /**
  * Control for a toolbar.
  */
 public class ToolbarData extends RequestData {
 
-	ToolbarButton[] buttons;
+	private static final String BUTTON_EXTENSION_POINT = "org.eclipse.help.webapp.toolbarButton"; //$NON-NLS-1$
+	private ToolbarButton[] buttons;
+	private String[] scriptFiles;
+	
 
 	public ToolbarData(ServletContext context, HttpServletRequest request,
 			HttpServletResponse response) {
@@ -57,6 +67,7 @@ public class ToolbarData extends RequestData {
 				|| names.length != params.length
 				|| names.length != states.length) {
 			buttons = new ToolbarButton[0];
+			scriptFiles = new String[0];
 			return;
 		}
 
@@ -68,9 +79,12 @@ public class ToolbarData extends RequestData {
 				buttonList.add(new ToolbarButton(names[i], ServletResources
 						.getString(tooltips[i], request), preferences
 						.getImagesDirectory()
-						+ "/" + images[i], //$NON-NLS-1$
+						+ "/e_" + images[i], //$NON-NLS-1$
 						actions[i], params[i], states[i]));
 		}
+		
+		addExtensionButtons(buttonList);
+		
 		// add implicit maximize/restore button on all toolbars
 		if (isIE() || isMozilla()
 				&& "1.2.1".compareTo(getMozillaVersion()) <= 0 //$NON-NLS-1$
@@ -84,6 +98,53 @@ public class ToolbarData extends RequestData {
 				.toArray(new ToolbarButton[buttonList.size()]);
 	}
 
+	private void addExtensionButtons(List buttonList) {
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(BUTTON_EXTENSION_POINT);
+		
+		List extensionButtons = new ArrayList();
+		List scripts = new ArrayList();
+		for (int i = 0; i < elements.length; i++) {
+			Object obj = null;
+			try {
+				obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (CoreException e) {
+				HelpWebappPlugin.logError("Create extension failed:[" //$NON-NLS-1$
+						+ BUTTON_EXTENSION_POINT + "].", e); //$NON-NLS-1$
+			}
+			if (obj instanceof AbstractButton) {
+				AbstractButton button = (AbstractButton) obj;
+				String toolbarName = request.getParameter("view"); //$NON-NLS-1$
+				if (toolbarName == null)
+				{
+					toolbarName = request.getParameter("toolbar"); //$NON-NLS-1$
+				}
+				if (button.isAddedToToolbar(toolbarName)) {	
+				    extensionButtons.add(button);
+				}
+			}
+		}
+		
+		Collections.sort(extensionButtons);
+
+		for (Iterator iter = extensionButtons.iterator(); iter.hasNext();) {
+			AbstractButton button = (AbstractButton) iter.next();
+			String scriptFile = button.getJavaScriptURL();
+			if (scriptFile != null) {
+				scripts.add(UrlUtil.getRelativePath(request, scriptFile));
+			}
+			ToolbarButton toolButton = new ToolbarButton(button.getId(), 
+					button.getTooltip(UrlUtil.getLocaleObj(request, response)),
+					request.getContextPath() + button.getImageURL(), 
+					button.getAction(),
+					"", //$NON-NLS-1$
+					button.getState());
+			 buttonList.add(toolButton);
+		}	
+		scriptFiles = (String[]) scripts.toArray(new String[scripts.size()]);
+	}
+
 	public ToolbarButton[] getButtons() {
 		return buttons;
 	}
@@ -116,4 +177,8 @@ public class ToolbarData extends RequestData {
 	public String getRestoreTooltip() {
 		return ServletResources.getString("restore", request); //$NON-NLS-1$
 	}
+	
+	public String[] getScriptFiles() {
+		return scriptFiles;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
index 2a36ebf..1651fcc 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/TopicFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,9 +17,8 @@ import java.util.StringTokenizer;
 
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
-import org.eclipse.help.UAContentFilter;
-import org.eclipse.help.internal.base.HelpBasePlugin;
-import org.eclipse.help.internal.base.HelpEvaluationContext;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
 
 /**
  * Class for finding a topic in a set of TOCs based on its href.  Some of this code was
@@ -32,17 +31,25 @@ public class TopicFinder {
 	private int selectedToc;
 	private IToc[] tocs;
 	private String numericPath = null;
+	private AbstractHelpScope scope;
 	
-	public TopicFinder(String topicHref, IToc[] tocs) {
+	public TopicFinder(String topicHref, IToc[] tocs, AbstractHelpScope scope) {
 		this.tocs = tocs;
+		this.scope = scope;
 		if (topicHref != null && topicHref.length() > 0) {
 			int index = -1;
 			do {
 				selectedToc = findTocContainingTopic(topicHref);
-				
-				ITopic topic = findTopic(UrlUtil.getHelpURL(topicHref));
-				if (topic != null && selectedToc >= 0) {
-					foundTopicPath = getTopicPathInToc(topic, tocs[selectedToc]);
+				index = topicHref.indexOf("/nav/"); //$NON-NLS-1$
+				if (index != -1) {
+					foundTopicPath = getTopicPathFromNav(topicHref.substring(index + 5));
+			
+				} else {
+					ITopic topic = findTopic(UrlUtil.getHelpURL(topicHref));
+					if (topic != null && selectedToc >= 0) {
+						foundTopicPath = getTopicPathInToc(topic,
+								tocs[selectedToc]);
+					}
 				}
 				// if no match has been found, check if there is an anchor
 				if (foundTopicPath == null && topicHref != null) {
@@ -57,6 +64,28 @@ public class TopicFinder {
 			foundTopicPath = null;
 	    }	
 	}
+	
+	public ITopic[] getTopicPathFromNav(String nav) {
+		StringTokenizer tok = new StringTokenizer(nav, "_"); //$NON-NLS-1$
+		try {
+			int segments = tok.countTokens();
+			ITopic[] path = new ITopic[segments - 1];
+			// first number is toc index
+			int index = Integer.parseInt(tok.nextToken());
+			IToc toc = tocs[index];
+			ITopic current = toc.getTopic(null);
+			for (int i = 0; tok.hasMoreTokens(); i++) {
+				index = Integer.parseInt(tok.nextToken());
+				appendFilteredIndex(index, current.getSubtopics());
+				current = current.getSubtopics()[index];
+				path[i] = current;
+			}
+			return path;
+		} catch (Exception e) {
+			numericPath = null;
+			return null;
+		}
+	}
 
     public ITopic[] getTopicPath() {
 		return foundTopicPath;
@@ -84,7 +113,7 @@ public class TopicFinder {
 				// returns path in reverse order
 				List reversePath = getTopicPathInTopic(topicToFind, topics[i]);
 				if (reversePath != null) {
-					appendFilteredIndex(i, topics);
+					prependFilteredIndex(i, topics);
 					return invertPath(reversePath);
 				}
 			}
@@ -130,7 +159,7 @@ public class TopicFinder {
 					// it was in a subtopic.. add to the path and return
 					path.add(topic);
 					// Add to the numeric path counting only enabled topics
-					appendFilteredIndex(i, subtopics);
+					prependFilteredIndex(i, subtopics);
 					return path;
 				}
 			}
@@ -144,7 +173,25 @@ public class TopicFinder {
 	private void appendFilteredIndex(int indexInUnfilteredList, ITopic[] unfiltered) {
 		int indexInFilteredList = 0;
 		for (int i = 0; i < indexInUnfilteredList; i++) {
-			if (EnabledTopicUtils.isEnabled(unfiltered[i])) {
+			if (ScopeUtils.showInTree(unfiltered[i], scope)) {
+				indexInFilteredList++;
+			}
+		}
+		
+		if (numericPath == null) {
+			numericPath = "" + indexInFilteredList; //$NON-NLS-1$
+		} else {
+			numericPath = numericPath  + '_' + indexInFilteredList;
+		}						
+	}
+	
+	// Prepend an entry to the numeric path representing the position in the list 
+	// of filtered topics. Note that we need to convert the index in the unfiltered
+	// list to an index in a filtered list of topics
+	private void prependFilteredIndex(int indexInUnfilteredList, ITopic[] unfiltered) {
+		int indexInFilteredList = 0;
+		for (int i = 0; i < indexInUnfilteredList; i++) {
+			if (ScopeUtils.showInTree(unfiltered[i], scope)) {
 				indexInFilteredList++;
 			}
 		}
@@ -280,15 +327,12 @@ public class TopicFinder {
 	 * @return true if TOC should be visible
 	 */
 	private boolean isEnabled(IToc toc) {
-		boolean tocEnabled = HelpBasePlugin.getActivitySupport().isEnabled(
-				toc.getHref())
-				&& !UAContentFilter.isFiltered(toc, HelpEvaluationContext
-						.getContext());
+		boolean tocEnabled = ScopeUtils.showInTree(toc, scope);
 		if (!tocEnabled)
 			return false;
 		ITopic[] topics = toc.getTopics();
 		for (int i = 0; i < topics.length; i++) {
-			if (EnabledTopicUtils.isEnabled(topics[i])) {
+			if (ScopeUtils.showInTree(topics[i], scope)) {
 				return true;
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
index 8b54205..83d0d92 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/UrlUtil.java
@@ -144,13 +144,24 @@ public class UrlUtil {
 	}
 	
 	/**
-	 * Tests to see if this path is permitted in the topic parameter passed in a help URL
+	 * Tests to see if the path specified in a topic parameter can be opened in
+	 * the content frame. See Bug 233466 for an explanation of why in general we do 
+	 * do not want to open external sites in the content frame.
+	 * 
+	 * If the preference org.eclipse.help.base/restrictTopicParameter is false any
+	 * path is permitted. Any href which was just opened from the help display is
+	 * also permitted, this is required for cheat sheets and intro. Otherwise the
+	 * path is permitted only if it does not contain a protocol. 
 	 * @param path the path passed as a ?topic parameter. May not be null.
-	 * @return true unless topic parameters are restricted and the path has a protocol specified
+	 * @return true if the conditions above are met.
 	 */
-	public static boolean isValidTopicURL(String path) {
-		if (BaseHelpSystem.getMode() == BaseHelpSystem.MODE_INFOCENTER 
-				&& new WebappPreferences().isRestrictTopicParameter()) {
+	public static boolean isValidTopicParamOrWasOpenedFromHelpDisplay(String path) {
+		// Topics opened via the help display ( including cheat sheets and intro ) 
+		// are always valid
+		if (path.equals(BaseHelpSystem.getHelpDisplay().getHrefOpenedFromHelpDisplay())) {
+			return true;
+		}
+		if (new WebappPreferences().isRestrictTopicParameter()) {
 		    if (path.indexOf("://") >= 0) {  //$NON-NLS-1$
 			    return false;
 		    }
@@ -697,4 +708,21 @@ public class UrlUtil {
 		int slash2 = uri.indexOf('/', 1);
 		return (slash1 == 0 && slash2 >= 0 && uri.substring(slash2).startsWith("/nav")); //$NON-NLS-1$
 	}
+	
+	// Create a relative path based on the current URL
+	public static String getRelativePath(HttpServletRequest req, String filePath) {
+		StringBuffer result = new StringBuffer(""); //$NON-NLS-1$
+		String reqPath = req.getPathInfo();
+		if (reqPath != null) {
+			for (int i; 0 <= (i = reqPath.indexOf('/', 1));) {
+				if (result.length() == 0 && filePath.startsWith(reqPath.substring(0, i + 1))) {
+					filePath = filePath.substring(i);
+				} else {
+					result.append("../"); //$NON-NLS-1$
+				}
+				reqPath = reqPath.substring(i);
+			}
+		}
+		return result.toString() + filePath.substring(1);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
index afcfd1a..016a6c3 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/View.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,12 @@
  *******************************************************************************/
 package org.eclipse.help.internal.webapp.data;
 
-public class View {
+import java.util.Locale;
+
+import org.eclipse.help.internal.webapp.WebappResources;
+import org.eclipse.help.webapp.AbstractView ;
+
+public class View extends AbstractView {
     public static char NO_SHORTCUT = (char)0;
 	private String name;
 	private String url;
@@ -35,22 +40,14 @@ public class View {
 	}
 
 	/**
-	 * Returns the enabled gray image
+	 * Returns the image shown on the view tab
 	 * 
 	 * @return String
 	 */
-	public String getImage() {
+	public String getImageURL() {
 		int i = imageURL.lastIndexOf('/');
 		return imageURL.substring(0, i) + "/e_" + imageURL.substring(i + 1); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the image when selected
-	 * 
-	 * @return String
-	 */
-	public String getOnImage() {
-		return getImage();
+	
 	}
 	/**
 	 * Returns the image when selected
@@ -68,4 +65,17 @@ public class View {
 	public boolean isDeferred() {
 		return isDeferred;
 	}
+
+	public String getAdvancedUrl() {
+		return null;
+	}
+
+	public String getImageUrl() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getTitle(Locale locale) {
+		return WebappResources.getString(name, locale);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WebappPreferences.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WebappPreferences.java
index 4126b27..97f2a7c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WebappPreferences.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WebappPreferences.java
@@ -36,6 +36,17 @@ public class WebappPreferences {
 	public String getBannerHeight() {
 		return getPreferenceString("banner_height"); //$NON-NLS-1$
 	}
+	
+	/**
+	 * @return String - URL of footer page or null
+	 */
+	public String getFooter() {
+		return getPreferenceString("footer"); //$NON-NLS-1$
+	}
+
+	public String getFooterHeight() {
+		return getPreferenceString("footer_height"); //$NON-NLS-1$
+	}
 
 	public String getHelpHome() {
 		return getPreferenceString("help_home"); //$NON-NLS-1$
@@ -98,6 +109,14 @@ public class WebappPreferences {
 		return getPreferenceString("titleResource"); //$NON-NLS-1$
 	}
 
+	public String getQuickPrintMaxConnections(){
+		return getPreferenceString("maxConnections"); //$NON-NLS-1$
+	}
+	
+	public String getQuickPrintMaxTopics(){
+		return getPreferenceString("maxTopics"); //$NON-NLS-1$
+	}
+	
 	public boolean isWindowTitlePrefix() {
 		return ProductPreferences.getBoolean(HelpBasePlugin.getDefault(), "windowTitlePrefix"); //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
index af71bf1..1b0a99d 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,27 @@
  *******************************************************************************/
 package org.eclipse.help.internal.webapp.data;
 
-import javax.servlet.*;
-import javax.servlet.http.*;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 
-import org.eclipse.help.internal.webapp.servlet.*;
-import org.eclipse.help.internal.workingset.*;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.help.IToc;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
+import org.eclipse.help.internal.base.util.CriteriaUtilities;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.eclipse.help.internal.webapp.servlet.WebappWorkingSetManager;
+import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.AdaptableToc;
+import org.eclipse.help.internal.workingset.AdaptableTocsArray;
+import org.eclipse.help.internal.workingset.AdaptableTopic;
+import org.eclipse.help.internal.workingset.WorkingSet;
 
 /**
  * This class manages help working sets
@@ -28,6 +44,7 @@ public class WorkingSetData extends RequestData {
 
 	private AdaptableToc[] tocs;
 	private boolean isEditMode;
+	private AbstractHelpScope filter;
 
 	public WorkingSetData(ServletContext context, HttpServletRequest request,
 			HttpServletResponse response) {
@@ -36,6 +53,7 @@ public class WorkingSetData extends RequestData {
 		AdaptableTocsArray adaptableTocs = wsmgr.getRoot();
 		tocs = (AdaptableToc[]) adaptableTocs.getChildren();
 		isEditMode = "edit".equals(getOperation()); //$NON-NLS-1$
+		filter = RequestScope.getScope(request, response, true);
 	}
 
 	public boolean isEditMode() {
@@ -93,6 +111,18 @@ public class WorkingSetData extends RequestData {
 		return STATE_UNCHECKED;
 	}
 
+	public boolean isTocEnabled(int tocIndex) {
+		AdaptableToc adaptableToc = tocs[tocIndex];
+		IToc toc = (IToc) adaptableToc.getAdapter(IToc.class);
+		return ScopeUtils.showInTree(toc, filter);
+	}
+	
+	public boolean isTopicEnabled(int tocIndex, int topicIndex) {
+		AdaptableToc adaptableToc = tocs[tocIndex];
+		IToc toc = (IToc) adaptableToc.getAdapter(IToc.class);
+		return ScopeUtils.showInTree(toc.getTopics()[topicIndex], filter);
+	}
+
 	/**
 	 * Returns the state of the topic. The state is not dependent on the parent
 	 * toc, but only whether it was part of the working set. To get the real
@@ -153,4 +183,92 @@ public class WorkingSetData extends RequestData {
 	public String getTopicLabel(int toc, int topic) {
 		return tocs[toc].getTopics()[topic].getLabel();
 	}
+	
+	public String getDefaultName() {
+		for (int i = 1; i < 100; i++) {
+			String name = ServletResources.getString("DefaultScopeName", request) + i; //$NON-NLS-1$
+			if (wsmgr.getWorkingSet(name) == null) {
+				return name;
+			}
+		}
+	    return ""; //$NON-NLS-1$
+	}
+	
+	public boolean isCriteriaScopeEnabled(){
+		return wsmgr.isCriteriaScopeEnabled();
+	}
+	
+	public String[] getCriterionIds() {
+		return wsmgr.getCriterionIds();
+	}
+	
+
+	public String[] getCriterionValueIds(String criterionId) {
+		return wsmgr.getCriterionValueIds(criterionId);
+	}
+
+
+	public String getCriterionDisplayName(String criterionId) {
+		return wsmgr.getCriterionDisplayName(criterionId);
+	}
+	
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId) {
+		return wsmgr.getCriterionValueDisplayName(criterionId, criterionValueId);
+	}
+	
+	public short getCriterionCategoryState(int index) {
+		String[] categories = getCriterionIds();
+		
+		if (!isEditMode())
+			return STATE_UNCHECKED;
+		WorkingSet ws = getWorkingSet();
+		if (ws == null)
+			return STATE_UNCHECKED;
+		if (index < 0 || index >= categories.length)
+			return STATE_UNCHECKED;
+
+		String category = categories[index];
+		Map criteriaMap = new HashMap();
+		CriterionResource[] criteria = ws.getCriteria();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+		if(!criteriaMap.keySet().contains(category))
+			return STATE_UNCHECKED;
+		
+		Set criterionValuesFromWS = (Set) criteriaMap.get(category);
+		Set criterionValuesSet = new HashSet(Arrays.asList(getCriterionValueIds(category)));
+		if(criterionValuesFromWS.containsAll(criterionValuesSet)){
+			return STATE_CHECKED;
+		}else{
+			return STATE_GRAYED;
+		}
+	}
+
+	public short getCriterionValueState(int categoryIndex, int valueIndex) {
+		String[] categories = getCriterionIds();
+		if (!isEditMode)
+			return STATE_UNCHECKED;
+		WorkingSet ws = getWorkingSet();
+		if (ws == null)
+			return STATE_UNCHECKED;
+		if (categoryIndex < 0 || categoryIndex >= categories.length)
+			return STATE_UNCHECKED;
+
+		String category = categories[categoryIndex];
+		Map criteriaMap = new HashMap();
+		CriterionResource[] criteria = ws.getCriteria();
+		CriteriaUtilities.addCriteriaToMap(criteriaMap, criteria);
+		
+		Set criterionValuesFromWS = (Set) criteriaMap.get(category);
+		String[] crietriaValues = getCriterionValueIds(category);
+		if (valueIndex < 0 || valueIndex >= crietriaValues.length){
+			return STATE_UNCHECKED;
+		}
+		String relatedCriterionValue = crietriaValues[valueIndex];
+		if(criterionValuesFromWS.contains(relatedCriterionValue)){
+			return STATE_CHECKED;
+		}else{
+			return STATE_UNCHECKED;
+		}
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java
index 48c49c4..8ca95b0 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/WorkingSetManagerData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,24 @@
  *******************************************************************************/
 package org.eclipse.help.internal.webapp.data;
 
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
-import javax.servlet.*;
-import javax.servlet.http.*;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
-import org.eclipse.help.internal.webapp.servlet.*;
-import org.eclipse.help.internal.workingset.*;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.eclipse.help.internal.webapp.servlet.WebappWorkingSetManager;
+import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.WorkingSet;
 
 /**
  * This class manages help working sets
@@ -40,17 +50,17 @@ public class WorkingSetManagerData extends RequestData {
 		name = request.getParameter("workingSet"); //$NON-NLS-1$
 		try {
 			switch (getOperation()) {
-				case ADD :
-					addWorkingSet();
-					break;
-				case REMOVE :
-					removeWorkingSet();
-					break;
-				case EDIT :
-					editWorkingSet();
-					break;
-				default :
-					break;
+			case ADD:
+				addWorkingSet();
+				break;
+			case REMOVE:
+				removeWorkingSet();
+				break;
+			case EDIT:
+				editWorkingSet();
+				break;
+			default:
+				break;
 			}
 		} catch (IOException ioe) {
 			saved = false;
@@ -74,7 +84,15 @@ public class WorkingSetManagerData extends RequestData {
 			AdaptableHelpResource[] elements = new AdaptableHelpResource[selectedElements
 					.size()];
 			selectedElements.toArray(elements);
-			WorkingSet ws = wsmgr.createWorkingSet(name, elements);
+			
+			WorkingSet ws = null;
+			if(!isCriteriaScopeEnabled()) {
+				ws = wsmgr.createWorkingSet(name, elements);
+			} else {
+				CriterionResource[] criteria = getCriteriaResource();
+				ws = wsmgr.createWorkingSet(name, elements, criteria);
+			}
+			
 			wsmgr.addWorkingSet(ws);
 		}
 	}
@@ -113,6 +131,10 @@ public class WorkingSetManagerData extends RequestData {
 
 				ws.setElements(elements);
 				ws.setName(name);
+				
+				if(isCriteriaScopeEnabled()){
+					ws.setCriteria(getCriteriaResource());
+				}
 				// should also change the name....
 
 				// We send this notification, so that the manager fires to its
@@ -171,6 +193,7 @@ public class WorkingSetManagerData extends RequestData {
 			res = wsmgr.getAdaptableTopic(internalId);
 		return res;
 	}
+
 	/**
 	 * @return null or error message if saving saved
 	 */
@@ -181,4 +204,85 @@ public class WorkingSetManagerData extends RequestData {
 		return UrlUtil.JavaScriptEncode(ServletResources.getString(
 				"cookieSaveFailed", request)); //$NON-NLS-1$
 	}
+
+	private CriterionResource[] getCriteriaResource(){
+		// all values in one criterion selected: version
+		// one criterion value selected(based on criterion category name and index of the value)
+		// eg:version_1_
+		List category = Arrays.asList(getCriterionIds());
+		
+		String[] criteria = request.getParameterValues("criteria"); //$NON-NLS-1$
+		if (criteria == null)
+			criteria = new String[0];
+
+		Map selectedElements = new HashMap();
+		for (int i = 0; i < criteria.length; ++i) {
+			String criterion = criteria[i];
+			if(category.contains(criterion)){
+				List allValuesInCategory = Arrays.asList(getCriterionValueIds(criterion));
+				if(0 == allValuesInCategory.size()){
+					continue;
+				}
+				Set elements = (Set)selectedElements.get(criterion);
+				if(null == elements){
+					elements = new HashSet();
+				}
+				elements.addAll(allValuesInCategory);
+				selectedElements.put(criterion, elements);
+			}else{
+				int len = criterion.length();
+				if (criterion.charAt(len - 1) == '_') {
+					String indexStr = criterion.substring(criterion.lastIndexOf('_', len - 2) + 1, len - 1);
+					int index = 0;
+					try {
+						index = Integer.parseInt(indexStr);
+					} catch (Exception e) {
+						continue;
+					}
+
+					String criterionName = criterion.substring(0, criterion.lastIndexOf('_', len - 2));
+					if(category.contains(criterionName)){
+						String values[] = getCriterionValueIds(criterionName);
+						if (index < 0 || index >= values.length)
+							continue;
+						String selectedValue = values[index];
+						if(null == selectedValue || 0 == selectedValue.length())
+							continue;
+						Set existedElements = (Set)selectedElements.get(criterionName);
+						if(null == existedElements){
+							existedElements = new HashSet();
+						}
+						existedElements.add(selectedValue);
+						selectedElements.put(criterionName, existedElements);	
+					}
+				}
+			}
+		}
+
+		
+		List resources = new ArrayList();
+		for(Iterator iter = selectedElements.keySet().iterator(); iter.hasNext();){
+			String key = (String)iter.next();
+			Set values = (Set) selectedElements.get(key);
+			CriterionResource resource = new CriterionResource(key, new ArrayList(values));
+			resources.add(resource);
+		}
+		
+		CriterionResource[] processedResources = new CriterionResource[resources.size()];
+		resources.toArray(processedResources);
+		return processedResources;
+		
+	}
+
+	public boolean isCriteriaScopeEnabled() {
+		return wsmgr.isCriteriaScopeEnabled();
+	}
+
+	private String[] getCriterionIds() {
+		return wsmgr.getCriterionIds();
+	}
+
+	private String[] getCriterionValueIds(String criterionId) {
+		return wsmgr.getCriterionValueIds(criterionId);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
index fd7e7d8..9ae1998 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/BreadcrumbsFilter.java
@@ -30,9 +30,10 @@ import org.eclipse.help.webapp.IFilter;
  */
 public class BreadcrumbsFilter implements IFilter {
 
-	private static final String HEAD_CONTENT =
-			"\n<link rel=\"stylesheet\" href=\"../content/PLUGINS_ROOT/" + HelpWebappPlugin.PLUGIN_ID + "/advanced/breadcrumbs.css\" charset=\"ISO-8859-1\" type=\"text/css\"></link>"  //$NON-NLS-1$//$NON-NLS-2$
-			+ "\n<script type=\"text/javascript\" src=\"../content/PLUGINS_ROOT/" + HelpPlugin.PLUGIN_ID + "/livehelp.js\"> </script>"; //$NON-NLS-1$ //$NON-NLS-2$
+	private static final String HEAD_CONTENT1 = "\n<link rel=\"stylesheet\" href=\""; //$NON-NLS-1$
+	private static final String HEAD_CONTENT2 = "/content/" + HelpWebappPlugin.PLUGIN_ID + "/advanced/breadcrumbs.css\" charset=\"ISO-8859-1\" type=\"text/css\"></link>"  //$NON-NLS-1$ //$NON-NLS-2$
+		+ "\n<script type=\"text/javascript\" src=\""; //$NON-NLS-1$
+	private static final String HEAD_CONTENT3 = "/content/" + HelpPlugin.PLUGIN_ID + "/livehelp.js\"> </script>"; //$NON-NLS-1$ //$NON-NLS-2$ 
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.help.internal.webapp.servlet.IFilter#filter(javax.servlet.http.HttpServletRequest, java.io.OutputStream)
@@ -42,7 +43,7 @@ public class BreadcrumbsFilter implements IFilter {
 		if (uri == null || !uri.endsWith("html") && !uri.endsWith("htm") && !UrlUtil.isNavPath(uri)) { //$NON-NLS-1$ //$NON-NLS-2$
 			return out;
 		}
-		if ("/rtopic".equals(req.getServletPath())) { //$NON-NLS-1$
+		if ("/rtopic".equals(req.getServletPath()) || "/nftopic".equals(req.getServletPath())) { //$NON-NLS-1$ //$NON-NLS-2$
 			return out;
 		}
 		if (UrlUtil.isBot(req)) {
@@ -75,9 +76,12 @@ public class BreadcrumbsFilter implements IFilter {
 		if (path != null && path.length > 1) {
 			try {
 			boolean isNarrow = "/ntopic".equals(req.getServletPath()); //$NON-NLS-1$
+				String backpath = getBackpath(pathInfo);
 				String bodyContent = getBodyContent(path,
-						getBackpath(pathInfo), isNarrow, locale);
-				return new FilterHTMLHeadAndBodyOutputStream(out, HEAD_CONTENT
+						backpath, isNarrow, locale);
+				String headContent = HEAD_CONTENT1 + backpath + HEAD_CONTENT2 + backpath +
+				    HEAD_CONTENT3;
+				return new FilterHTMLHeadAndBodyOutputStream(out, headContent
 						.getBytes("ASCII"), bodyContent); //$NON-NLS-1$
 			} 
 			catch (Exception e) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java
new file mode 100644
index 0000000..ba2570d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ChildLinkInserter.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.servlet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
+import org.eclipse.help.internal.toc.Toc;
+import org.eclipse.help.internal.webapp.data.RequestScope;
+import org.eclipse.help.internal.webapp.data.UrlUtil;
+
+public class ChildLinkInserter {
+	
+	private static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
+	private HttpServletRequest req;
+	private OutputStream out;
+	private static final String NO_CHILDREN = "no_child_topics"; //$NON-NLS-1$
+	private static final String HAS_CHILDREN = "has_child_topics"; //$NON-NLS-1$
+	private AbstractHelpScope scope;
+
+	public ChildLinkInserter(HttpServletRequest req, OutputStream out) {
+		this.req = req;
+		this.out = out;
+		scope = RequestScope.getScope(req, null, false);
+	}
+	
+	public void addContents(String encoding) throws IOException {	
+	    ITopic[] subtopics = getSubtopics();
+	    if (subtopics.length == 0) {
+	    	return;
+	    }
+	    StringBuffer links = new StringBuffer("\n<ul class=\"childlinks\">\n"); //$NON-NLS-1$
+		for (int i=0;i<subtopics.length;++i) {
+			if (ScopeUtils.showInTree(subtopics[i], scope)) {
+				links.append("\n<li><a href=\""); //$NON-NLS-1$
+				String href = subtopics[i].getHref();
+				if (href == null) {
+					href = "nav.html";   // TODO, handle nav topics as children //$NON-NLS-1$
+				}
+				else {
+					href = XMLGenerator.xmlEscape(href);
+				}
+				links.append(getBackpath(req.getPathInfo()));
+				links.append(href);
+				links.append("\">" + subtopics[i].getLabel() + "</a></li>\n");  //$NON-NLS-1$//$NON-NLS-2$
+			}
+		}
+		links.append("\n</ul>\n"); //$NON-NLS-1$
+		String linkString = links.toString();
+		try {
+			if (encoding != null) {
+			    out.write(linkString.getBytes(encoding));
+			} else {
+			    out.write(linkString.getBytes("UTF8")); //$NON-NLS-1$
+			}
+		} catch (UnsupportedEncodingException e) {
+			out.write(linkString.getBytes());
+		}
+	}
+	
+	private ITopic[] getSubtopics() {
+		String locale = UrlUtil.getLocale(req, null);
+		String pathInfo = req.getPathInfo();
+		String servletPath = req.getServletPath();
+		if ("/nav".equals(servletPath)) return new ITopic[0]; //$NON-NLS-1$
+		Toc[] tocs =  HelpPlugin.getTocManager().getTocs(locale);
+		for (int i = 0; i < tocs.length; i++) {
+			if (pathInfo.equals(tocs[i].getTopic())) {
+				return tocs[i].getTopics();
+			}
+			ITopic topic = tocs[i].getTopic(pathInfo);
+			if (topic != null) {
+				return topic.getSubtopics();
+			}
+		}
+		return   new ITopic[0];
+	}
+	
+	private String getBackpath(String path) {
+		int num = new Path(path).segmentCount() - 1;
+		StringBuffer buf = new StringBuffer();
+		for (int i=0; i < num; ++i) {
+			if (i > 0) {
+				buf.append('/');
+			}
+			buf.append(".."); //$NON-NLS-1$
+		}
+		return buf.toString();
+	}
+
+	public void addStyle() throws UnsupportedEncodingException, IOException {
+		ITopic[] subtopics = getSubtopics();
+		for (int i = 0; i < subtopics.length; ++i) {
+			if (ScopeUtils.showInTree(subtopics[i], scope)) {
+				out.write(HAS_CHILDREN.getBytes(UTF_8));
+				return;
+			}
+		}
+
+		out.write(NO_CHILDREN.getBytes(UTF_8));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
index bc29fe4..c0e8d41 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContentServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ import java.io.*;
 
 import javax.servlet.*;
 import javax.servlet.http.*;
+
+import org.eclipse.help.internal.base.BaseHelpSystem;
 /**
  * Servlet to interface client with remote Eclipse
  */
@@ -38,6 +40,7 @@ public class ContentServlet extends HttpServlet {
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+		BaseHelpSystem.checkMode();
 		if (connector != null) {
 			connector.transfer(req, resp);
 		}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
index ff187fa..1e73676 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/ContextServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,9 +19,11 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.help.IContext;
+import org.eclipse.help.IContext2;
 import org.eclipse.help.IHelpResource;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.Topic;
+import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.context.Context;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 
@@ -38,12 +40,13 @@ public class ContextServlet extends HttpServlet {
 	
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
+		BaseHelpSystem.checkMode();
 		String locale = UrlUtil.getLocale(req, resp);
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
 		resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
 		String id = req.getParameter(PARAMETER_ID);
 		if (id != null) {
-			IContext context = HelpPlugin.getContextManager().getContext(id, locale);
+			IContext context = getContext(locale, id);
 			if (context != null) {
 				serialize(context, resp.getWriter());
 			}
@@ -55,11 +58,24 @@ public class ContextServlet extends HttpServlet {
 			resp.sendError(400); // bad request; missing parameter
 		}
 	}
+
+	protected IContext getContext(String locale, String id) {
+		IContext context = HelpPlugin.getContextManager().getContext(id, locale);
+		return context;
+	}
 	
 	private void serialize(IContext context, Writer out) throws IOException {
 		out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
-		out.write('<' + Context.NAME + ">\n"); //$NON-NLS-1$
+		out.write('<' + Context.NAME );
+		if (context instanceof IContext2) {
+			String title = ((IContext2)context).getTitle();
+			if (title != null && title.length() > 0) {
+				out.write(" title=\"" + title + "\""); //$NON-NLS-1$ //$NON-NLS-2$			
+			}
+		}
+		out.write(">\n"); //$NON-NLS-1$
 		out.write("   <description>" + context.getText() + "</description>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+		
 		IHelpResource[] topics = context.getRelatedTopics();
 		for (int i=0;i<topics.length;++i) {
 			out.write("   <" + Topic.NAME); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
index dd3dd48..45134be 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/CookieUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 package org.eclipse.help.internal.webapp.servlet;
 
 import java.io.*;
+import java.util.HashSet;
+import java.util.Iterator;
 
 import javax.servlet.http.*;
 
@@ -25,7 +27,7 @@ import org.eclipse.help.internal.webapp.data.*;
 public class CookieUtil {
 	private static final int COOKIE_LIFE = 5 * 365 * 24 * 60 * 60;
 	private static final int MAX_COOKIE_PAYLOAD = 4096
-			- "wset01=".length() - "81920<".length() - 1; //$NON-NLS-1$ //$NON-NLS-2$
+			- "wset_contents01=".length() - "81920<".length() - 1; //$NON-NLS-1$ //$NON-NLS-2$
 
 	/**
 	 * @return null or String
@@ -50,26 +52,78 @@ public class CookieUtil {
 		return ret;
 	}
 	public static void setCookieValue(String name, String value,
-			HttpServletResponse response) {
+			HttpServletRequest request, HttpServletResponse response) {
 		Cookie cookie = new Cookie(name, value);
 		cookie.setMaxAge(COOKIE_LIFE);
+		cookie.setPath(getCookiePath(request)); 
 		response.addCookie(cookie);
 		if (HelpWebappPlugin.DEBUG_WORKINGSETS) {
 			System.out
 					.println("CookieUtil.setCookieValue(" + name + ", " + value + ",...)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 	}
+	protected static String getCookiePath(HttpServletRequest request) {
+		String path = request.getContextPath() + '/';
+		return path;
+	}
 
-	public static void deleteCookie(String name, HttpServletResponse response) {
+	public static void deleteCookie(String name, HttpServletRequest request, HttpServletResponse response) {
+		deleteCookieUsingPath(name, response, getCookiePath(request));
+	}
+	
+	protected static void deleteCookieUsingPath(String name,
+			HttpServletResponse response, String cookiePath) {
 		Cookie cookie = new Cookie(name, ""); //$NON-NLS-1$
+		cookie.setPath(cookiePath); 
 		cookie.setMaxAge(0);
 		response.addCookie(cookie);
 	}
+	
+	public static void deleteObsoleteCookies(HttpServletRequest request, HttpServletResponse response) {
+		Cookie[] cookies = request.getCookies();
+		HashSet cookiesToKeep= new HashSet();
+		HashSet cookiesToDelete = new HashSet();
+		if (cookies != null) {
+			for (int i = 0; i < cookies.length; i++) {
+				    String name = cookies[i].getName();
+				    if (isObsoleteCookie(name) || cookiesToKeep.contains(name)) {
+				    	cookiesToDelete.add(name);
+				    }
+					cookiesToKeep.add(name); {				
+				}
+			}
+
+			for (Iterator iter = cookiesToDelete.iterator(); iter.hasNext();) {
+				String name = (String) iter.next();
+				deleteCookieUsingPath(name, response, request.getContextPath() + "/advanced/"); //$NON-NLS-1$
+				deleteCookieUsingPath(name, response, "/"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/*
+	 * Is this one of the cookies that was used before Eclipse 3.6 of the 
+	 * form wset_nn
+	 */
+	private static boolean isObsoleteCookie(String name) {
+		final String WSET_PREFIX = "wset"; //$NON-NLS-1$
+		if (!name.startsWith(WSET_PREFIX)) {
+			return false;
+		}
+		for (int i = WSET_PREFIX.length(); i < name.length(); i++) {
+			char suffixChar = name.charAt(i);
+			if (suffixChar < '0' || suffixChar > '9') {
+				return false;
+			}
+		}
+		return true;
+	}
+	
 	/**
 	 * Saves string in multiple browser cookies. Cookies can store limited
 	 * length string. This method will attemt to split string among multiple
 	 * cookies. The following cookies will be set name1=length <substing1
-	 * name2=substrging2 ... namen=substringn
+	 * name2=substring2 ... namen=substringn
 	 * 
 	 * @param data
 	 *            a string containing legal characters for cookie value
@@ -90,20 +144,20 @@ public class CookieUtil {
 			if (i == 1) {
 				setCookieValue(name + "1", //$NON-NLS-1$
 						len + "<" + data.substring(0, MAX_COOKIE_PAYLOAD), //$NON-NLS-1$
-						response);
+						request, response);
 			} else {
 				setCookieValue(name + i, data.substring(MAX_COOKIE_PAYLOAD
-						* (i - 1), MAX_COOKIE_PAYLOAD * i), response);
+						* (i - 1), MAX_COOKIE_PAYLOAD * i), request, response);
 			}
 		}
 		if (len % MAX_COOKIE_PAYLOAD > 0) {
 			if (n == 0) {
 				setCookieValue(name + "1", //$NON-NLS-1$
 						len + "<" + data.substring(0, len), //$NON-NLS-1$
-						response);
+						request, response);
 			} else {
 				setCookieValue(name + (n + 1), data.substring(
-						MAX_COOKIE_PAYLOAD * n, len), response);
+						MAX_COOKIE_PAYLOAD * n, len), request, response);
 			}
 		}
 
@@ -114,7 +168,7 @@ public class CookieUtil {
 				continue;
 			}
 			if (getCookieValue(name + i, request) != null) {
-				deleteCookie(name + i, response);
+				deleteCookie(name + i, request, response);
 			} else {
 				break;
 			}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/DynamicXHTMLFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/DynamicXHTMLFilter.java
index 24a609c..d94b803 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/DynamicXHTMLFilter.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/DynamicXHTMLFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ import java.io.StringWriter;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.util.ProductPreferences;
 import org.eclipse.help.internal.webapp.WebappResources;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
@@ -77,7 +77,7 @@ public class DynamicXHTMLFilter implements IFilter {
 				}
 				
 				try {
-					boolean filter = BaseHelpSystem.getMode() != BaseHelpSystem.MODE_INFOCENTER;
+					boolean filter = ProductPreferences.useEnablementFilters();
 					InputStream in2 = DynamicXHTMLProcessor.process(href, in, locale, filter);
 					transferContent(in2, out);
 				}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
index 1c62f60..26211e5 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,11 +29,14 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.base.remote.RemoteStatusData;
 import org.eclipse.help.internal.protocols.HelpURLConnection;
 import org.eclipse.help.internal.protocols.HelpURLStreamHandler;
 import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.internal.webapp.StatusProducer;
 import org.eclipse.help.internal.webapp.data.ServletResources;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 import org.eclipse.help.webapp.IFilter;
@@ -42,6 +45,9 @@ import org.eclipse.help.webapp.IFilter;
  * Performs transfer of data from eclipse to a jsp/servlet
  */
 public class EclipseConnector {
+	public interface INotFoundCallout {
+		public void notFound(String url);
+	}
 	private static final String errorPageBegin = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" //$NON-NLS-1$
 			+ "<html><head>\n" //$NON-NLS-1$
 			+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" //$NON-NLS-1$
@@ -50,7 +56,7 @@ public class EclipseConnector {
 	private static final String errorPageEnd = "</p></body></html>"; //$NON-NLS-1$
 	private static final IFilter allFilters[] = new IFilter[] {
 			new HighlightFilter(), new FramesetFilter(), new InjectionFilter(),
-			new DynamicXHTMLFilter(), new BreadcrumbsFilter(),
+			new DynamicXHTMLFilter(), new BreadcrumbsFilter(), new PluginsRootFilter(),
 			new ShowInTocFilter(), new ExtraFilters() };
 
 	private static final IFilter errorPageFilters[] = new IFilter[] {
@@ -58,6 +64,7 @@ public class EclipseConnector {
 			new DynamicXHTMLFilter() };
 
 	private ServletContext context;
+	private static INotFoundCallout notFoundCallout = null; // For JUnit Testing
 	 
  	public EclipseConnector(ServletContext context) {
 		this.context= context;
@@ -70,6 +77,7 @@ public class EclipseConnector {
 			String url = getURL(req);
 			if (url == null)
 				return;
+		    //System.out.println("Transfer " + url); //$NON-NLS-1$
 			// Redirect if the request includes PLUGINS_ROOT and is not a content request
 			int index = url.lastIndexOf(HelpURLConnection.PLUGINS_ROOT);
 			if (index!= -1 && url.indexOf("content/" + HelpURLConnection.PLUGINS_ROOT) == -1) {  //$NON-NLS-1$
@@ -84,8 +92,7 @@ public class EclipseConnector {
 				return;
 			}
 			String lowerCaseuRL = url.toLowerCase(Locale.ENGLISH);
-			if (lowerCaseuRL.startsWith("file:") //$NON-NLS-1$
-					|| lowerCaseuRL.startsWith("jar:") //$NON-NLS-1$
+			if (lowerCaseuRL.startsWith("jar:") //$NON-NLS-1$
 					|| lowerCaseuRL.startsWith("platform:")) { //$NON-NLS-1$
 				int i = url.indexOf('?');
 				if (i != -1)
@@ -99,6 +106,7 @@ public class EclipseConnector {
 				// enable activities matching url
 				// HelpBasePlugin.getActivitySupport().enableActivities(url);
 
+				url = URIUtil.fromString(url).toString();
 				url = "help:" + url; //$NON-NLS-1$
 			}
 
@@ -110,9 +118,21 @@ public class EclipseConnector {
 				is = con.getInputStream();
 			} catch (IOException ioe) {
 			    pageNotFound = true;
-				if (requiresErrorPage(lowerCaseuRL)) { 
-					// Try to load the error page if defined
-		            String errorPage = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, "page_not_found", null, null); //$NON-NLS-1$
+			    if (notFoundCallout != null) {
+			    	notFoundCallout.notFound(url);
+			    }				
+			    
+			    boolean isRTopicPath = isRTopicPath(req.getServletPath());
+			    
+			    if (requiresErrorPage(lowerCaseuRL) && !isRTopicPath) { 
+					
+			    	String errorPage;
+			    	
+					if (RemoteStatusData.isAnyRemoteHelpUnavailable())
+			            errorPage = '/'+HelpWebappPlugin.PLUGIN_ID+'/'+StatusProducer.MISSING_TOPIC_HREF;
+					else // Try to load the error page if defined
+			            errorPage = Platform.getPreferencesService().getString(HelpBasePlugin.PLUGIN_ID, "page_not_found", null, null); //$NON-NLS-1$
+					
 					if (errorPage != null && errorPage.length() > 0) {				
 						con = createConnection(req, resp, "help:" + errorPage); //$NON-NLS-1$
 						resp.setContentType("text/html"); //$NON-NLS-1$
@@ -167,7 +187,11 @@ public class EclipseConnector {
 			}
 
 			transferContent(is, out);
-			out.close();
+			try {
+			    out.close();
+			} catch (IOException ioe) {
+				//  Bug 314324 - do not report an error
+			}
 			is.close();
 
 		} catch (Exception e) {
@@ -330,4 +354,18 @@ public class EclipseConnector {
 			url = url.substring(1);
 		return url;
 	}
-}
+	
+	public static void setNotFoundCallout(INotFoundCallout callout) {
+		notFoundCallout = callout;
+	}
+	
+	public static boolean isRTopicPath(String servletPath)
+	{
+		boolean isRTopicPath=false;
+		
+		if(servletPath.equals("/rtopic")) //$NON-NLS-1$
+			isRTopicPath = true;
+		
+		return isRTopicPath;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
index f60372c..01d0c4f 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/FramesetFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 package org.eclipse.help.internal.webapp.servlet;
 
 import java.io.*;
+import java.net.URLEncoder;
 
 import javax.servlet.http.*;
 
@@ -31,6 +32,7 @@ public class FramesetFilter implements IFilter {
 	 */
 	public OutputStream filter(HttpServletRequest req, OutputStream out) {
 		String uri = req.getRequestURI();
+		String url = req.getPathInfo();
 		if (uri == null) {
 			return out;
 		}
@@ -64,7 +66,15 @@ public class FramesetFilter implements IFilter {
 		} else {
 			script.append("index.jsp?topic="); //$NON-NLS-1$
 		}
-		script.append(req.getPathInfo());
+
+		try{
+			// Bug 317055 -  [webapp] URLEncode url requests from local users
+			url = URLEncoder.encode(url, "UTF-8"); //$NON-NLS-1$
+			script.append(url);
+		} catch (UnsupportedEncodingException uee){
+			return out;
+		}
+
 		script.append(scriptPart3);
 		try {
 			return new FilterHTMLHeadOutputStream(out, script.toString()
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java
index 618a318..f572c08 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/HighlightFilter.java
@@ -32,7 +32,6 @@ public class HighlightFilter implements IFilter {
 	private static final String sheetRefPart1 = "<link id=\"highlightStyle\" rel=\"STYLESHEET\" href=\""; //$NON-NLS-1$
 	private static final String sheetRefPart3 = "advanced/highlight.css\" charset=\"ISO-8859-1\" type=\"text/css\"></link>\n"; //$NON-NLS-1$
 	
-	private static final String noHighlightScript1 = "<script type=\"text/javascript\">\n<!--\nif (parent.ContentToolbarFrame && parent.ContentToolbarFrame.setButtonState) parent.ContentToolbarFrame.setButtonState(\"toggle_highlight\",\"hidden\");\n-->\n</script>\n"; //$NON-NLS-1$
 	/*
 	 * @see IFilter#filter(HttpServletRequest, OutputStream)
 	 */
@@ -47,11 +46,7 @@ public class HighlightFilter implements IFilter {
 
 		Collection keywords = getWords(req);
 		if (keywords.size() == 0) {
-			try {
-				return new FilterHTMLHeadOutputStream(out, noHighlightScript1.getBytes("ASCII")); //$NON-NLS-1$
-			} catch (UnsupportedEncodingException uee) {
-				return out;
-			}
+			return out;
 		}
 		keywords = removeWildCards(keywords);
 		keywords = encodeKeyWords(keywords);
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
index 0a2c969..ee29e3b 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexFragmentServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,13 +24,18 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.help.IIndex;
 import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexEntry2;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IIndexSubpath;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
-import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
 import org.eclipse.help.internal.webapp.WebappResources;
 import org.eclipse.help.internal.webapp.data.ActivitiesData;
-import org.eclipse.help.internal.webapp.data.EnabledTopicUtils;
+import org.eclipse.help.internal.webapp.data.RequestScope;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
+import org.eclipse.osgi.util.NLS;
 
 import com.ibm.icu.text.Collator;
 
@@ -38,7 +43,7 @@ import com.ibm.icu.text.Collator;
  * Creates xml representing selected parts of the index
  * Parameter "start" represents the part of the index to start reading from
  * Parameter "size" indicates the number of entries to read, no size parameter
- * or a negatove size parameter indicates that all entries which match the start 
+ * or a negative size parameter indicates that all entries which match the start 
  * letters should be displayed.
  * Parameter "offset" represents the starting point relative to the start
  */
@@ -96,14 +101,15 @@ public class IndexFragmentServlet extends HttpServlet {
 		
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
 		resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
-		// Cache suppression required if not in infocenter mode because the set of disabled 
+		// Cache suppression required because the set of in scope
 		// topics could change between requests
-		if (BaseHelpSystem.getMode() != BaseHelpSystem.MODE_INFOCENTER) {
-		    resp.setHeader("Cache-Control","no-cache");   //$NON-NLS-1$//$NON-NLS-2$
-		    resp.setHeader("Pragma","no-cache");  //$NON-NLS-1$ //$NON-NLS-2$
-		    resp.setDateHeader ("Expires", 0); 	 //$NON-NLS-1$	
-		}
-		Serializer serializer = new Serializer(locale);
+
+		resp.setHeader("Cache-Control","no-cache");   //$NON-NLS-1$//$NON-NLS-2$
+		resp.setHeader("Pragma","no-cache");  //$NON-NLS-1$ //$NON-NLS-2$
+		resp.setDateHeader ("Expires", 0); 	 //$NON-NLS-1$	
+
+		AbstractHelpScope scope = RequestScope.getScope(req, resp, false);
+		Serializer serializer = new Serializer(locale, scope);
 		String response = serializer.generateIndexXml();	
 		locale2Response.put(locale, response);
 		resp.getWriter().write(response);
@@ -122,9 +128,11 @@ public class IndexFragmentServlet extends HttpServlet {
 		private IIndexEntry[] entries;
 		private boolean enablePrevious = true;
 		private boolean enableNext = true;
+		private AbstractHelpScope scope;
 
-		public Serializer(String locale) {
+		public Serializer(String locale, AbstractHelpScope scope) {
 			this.locale = locale;
+			this.scope = scope;
 			index = HelpPlugin.getIndexManager().getIndex(locale);
 			buf = new StringBuffer();
 		}
@@ -261,21 +269,45 @@ public class IndexFragmentServlet extends HttpServlet {
 		}
 		
 		private int enabledEntryCount(IIndexEntry entry) {
-			if (!EnabledTopicUtils.isEnabled(entry)) return 0;
+			if (!ScopeUtils.showInTree(entry, scope)) return 0;
 			if (entry.getKeyword() == null || entry.getKeyword().length() == 0) {
 				return 0;
 			}
 			int count = 1;
-		    ITopic[] topics = EnabledTopicUtils.getEnabled(entry.getTopics());
-			IIndexEntry[] subentries = EnabledTopicUtils.getEnabled(entry.getSubentries());
-			if (topics.length > 1) {
-				count += topics.length;
-			}
-			for (int i=0;i<subentries.length;++i) {
+		    int topicCount = enabledTopicCount(entry);
+
+			IIndexEntry[] subentries = entry.getSubentries();
+		    int subentryCount = 0;
+			for (int i=0; i<subentries.length; ++i) {
 				count += enabledEntryCount(subentries[i]);
 			}
+			
+			int seeCount = 0;
+			IIndexSee[] sees = entry instanceof IIndexEntry2 ? ((IIndexEntry2)entry).getSees() : new IIndexSee[0];
+			for (int s = 0; s < sees.length; s++) {
+				if (ScopeUtils.showInTree(sees[s], scope)) {
+					seeCount++;
+				}
+			}
+			
+			if (topicCount + subentryCount + seeCount > 1) {
+				count += topicCount;
+			}
+			count += subentryCount;
+			count += seeCount;
             return count;
 		}
+
+		private int enabledTopicCount(IIndexEntry entry) {
+			int topicCount = 0;
+		    ITopic[] topics = entry.getTopics();
+		    for (int i = 0; i < topics.length; i++) {
+		    	if (scope.inScope(topics[i])) {
+		    		topicCount++;
+		    	}
+		    }
+			return topicCount;
+		}
 		
 		private void generateEmptyIndexMessage() {
 			buf.append("<node"); //$NON-NLS-1$			
@@ -288,10 +320,16 @@ public class IndexFragmentServlet extends HttpServlet {
 		}
 		
 		private void generateEntry(IIndexEntry entry, int level, String id) {
-			if (!EnabledTopicUtils.isEnabled(entry)) return;
+			if (!ScopeUtils.showInTree(entry, scope)) return;
 			if (entry.getKeyword() != null && entry.getKeyword().length() > 0) {
-				ITopic[] topics = EnabledTopicUtils.getEnabled(entry.getTopics());
-				IIndexEntry[] subentries = EnabledTopicUtils.getEnabled(entry.getSubentries());
+				ITopic[] topics = ScopeUtils.inScopeTopics(entry.getTopics(), scope);
+				IIndexEntry[] subentries = ScopeUtils.inScopeEntries(entry.getSubentries(), scope);
+				IIndexSee[] sees; 
+				if (entry instanceof IIndexEntry2) {
+					sees = ((IIndexEntry2)entry).getSees();
+				} else {
+					sees = new IIndexSee[0];
+				}
 				boolean multipleTopics = topics.length > 1;
 				boolean singleTopic = topics.length == 1;
 				
@@ -310,9 +348,10 @@ public class IndexFragmentServlet extends HttpServlet {
 				}
 				buf.append(">\n"); //$NON-NLS-1$
 				
-				if (multipleTopics || subentries.length > 0) {
+				if (multipleTopics || subentries.length > 0 || sees.length > 0) {
 					if (multipleTopics) generateTopicList(entry);
 					generateSubentries(entry, level + 1);
+					generateSees(sees);
 				}
 				
 				buf.append("</node>\n"); //$NON-NLS-1$	
@@ -330,30 +369,60 @@ public class IndexFragmentServlet extends HttpServlet {
 			ITopic[] topics = entry.getTopics();
 			
 			for (int i = 0; i < topics.length; ++i) {
-				ITopic topic = (ITopic)topics[i]; 
-				
-				//
-				String label = UrlUtil.htmlEncode(topic.getLabel());
-                if (label == null) {
-                	label = UrlUtil.htmlEncode(topic.getLabel());
-                }
-                
-			
-				buf.append("<node"); //$NON-NLS-1$
-				if (entry.getKeyword() != null) { 
-					buf.append('\n' + "      title=\"" + label + '"'); //$NON-NLS-1$ 
-				}
-				
-				count++;
-				buf.append('\n' + "      id=\"i" + count + '"'); //$NON-NLS-1$							
-				String href = UrlUtil.getHelpURL(topic.getHref());	
-				buf.append('\n' + "      href=\""  //$NON-NLS-1$
-					+ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
-				buf.append(">\n"); //$NON-NLS-1$
-				buf.append("</node>\n"); //$NON-NLS-1$	
+				ITopic topic = (ITopic) topics[i];
+				if (ScopeUtils.showInTree(topic, scope)) {
+					//
+					String label = UrlUtil.htmlEncode(topic.getLabel());
+					if (label == null) {
+						label = UrlUtil.htmlEncode(topic.getLabel());
+					}
 
+					buf.append("<node"); //$NON-NLS-1$
+					if (entry.getKeyword() != null) {
+						buf.append('\n' + "      title=\"" + label + '"'); //$NON-NLS-1$ 
+					}
+
+					count++;
+					buf.append('\n' + "      id=\"i" + count + '"'); //$NON-NLS-1$							
+					String href = UrlUtil.getHelpURL(topic.getHref());
+					buf.append('\n' + "      href=\"" //$NON-NLS-1$
+							+ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
+					buf.append(">\n"); //$NON-NLS-1$
+					buf.append("</node>\n"); //$NON-NLS-1$	
+				}
 			}
-		}	
+		}
+		
+		private void generateSees(IIndexSee[] sees) {
+	        for (int i = 0; i < sees.length; i++) {
+	        	IIndexSee see = sees[i];
+				if (ScopeUtils.showInTree(see, scope)) {
+					//
+					String key = see.isSeeAlso() ? "SeeAlso" : "See"; //$NON-NLS-1$ //$NON-NLS-2$
+					String seePrefix = WebappResources.getString(key, UrlUtil
+							.getLocale(locale));
+					String seeTarget = see.getKeyword();
+					IIndexSubpath[] subpathElements = see.getSubpathElements();
+					for (int pathIndex = 0; pathIndex < subpathElements.length; pathIndex++ ) {
+						seeTarget += ", "; //$NON-NLS-1$
+						seeTarget += subpathElements[pathIndex].getKeyword();
+					}
+					String label = NLS.bind(seePrefix, seeTarget);
+					String encodedLabel = UrlUtil.htmlEncode(label);
+					buf.append("<node"); //$NON-NLS-1$
+
+					buf.append('\n' + "      title=\"" + encodedLabel + '"'); //$NON-NLS-1$ 
+
+					count++;
+					buf.append('\n' + "      id=\"i" + count + '"'); //$NON-NLS-1$							
+					String href = "see:" + seeTarget; //$NON-NLS-1$ 
+					buf.append('\n' + "      href=\"" //$NON-NLS-1$
+							+ XMLGenerator.xmlEscape(href) + "\""); //$NON-NLS-1$
+					buf.append(">\n"); //$NON-NLS-1$
+					buf.append("</node>\n"); //$NON-NLS-1$	
+	        	}
+	        }	
+		}
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
index 652a1c9..3da5a49 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/IndexServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
 import javax.xml.transform.TransformerException;
 
 import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.dynamic.DocumentWriter;
 import org.eclipse.help.internal.index.Index;
 import org.eclipse.help.internal.index.IndexContribution;
@@ -43,6 +44,7 @@ public class IndexServlet extends HttpServlet {
 
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
+		BaseHelpSystem.checkMode();
 		String locale = UrlUtil.getLocale(req, resp);
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
 		resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
index 501ad12..a5b0ae8 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InfocenterWorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,32 @@
  *******************************************************************************/
 package org.eclipse.help.internal.webapp.servlet;
 
-import java.io.*;
-import java.util.*;
-
-import javax.servlet.http.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.help.internal.*;
-import org.eclipse.help.internal.util.*;
-import org.eclipse.help.internal.webapp.*;
-import org.eclipse.help.internal.workingset.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.eclipse.help.internal.util.URLCoder;
+import org.eclipse.help.internal.webapp.HelpWebappPlugin;
+import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.AdaptableToc;
+import org.eclipse.help.internal.workingset.AdaptableTocsArray;
+import org.eclipse.help.internal.workingset.AdaptableTopic;
+import org.eclipse.help.internal.workingset.IHelpWorkingSetManager;
+import org.eclipse.help.internal.workingset.WorkingSet;
+import org.eclipse.help.internal.workingset.WorkingSetComparator;
 
 /**
  * The Infocenter working set manager stores help working sets. Working sets are
@@ -28,7 +44,8 @@ import org.eclipse.help.internal.workingset.*;
  * @since 3.0
  */
 public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
-	private static final String COOKIE_NAME = "wset"; //$NON-NLS-1$
+	private static final String COOKIE_WSET_CONTENTS = "wset_contents"; //$NON-NLS-1$
+	private static final String COOKIE_WSET_CRITERIA = "wset_criteria"; //$NON-NLS-1$
 	private static final int MAX_COOKIES = 15;
 	private HttpServletRequest request;
 	private HttpServletResponse response;
@@ -38,6 +55,9 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 	private SortedSet workingSets = new TreeSet(new WorkingSetComparator());
 	private String locale;
 	private AdaptableTocsArray root;
+	
+	private static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
+	private Map allCriteriaValues;
 
 	/**
 	 * Constructor
@@ -77,6 +97,10 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 		return new WorkingSet(name, elements);
 	}
 
+	public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
+		return new WorkingSet(name, elements, criteria);
+	}
+	
 	/**
 	 * Returns a working set by name
 	 *  
@@ -115,8 +139,13 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 		}
 	}
 
-	private void restoreState() {
-		String data = CookieUtil.restoreString(COOKIE_NAME, request);
+	private void restoreState() {		
+		restoreContents();
+		restoreCriteria();
+	}
+	
+	private void restoreContents(){
+		String data = CookieUtil.restoreString(COOKIE_WSET_CONTENTS, request);
 		if (data == null) {
 			return;
 		}
@@ -125,36 +154,84 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 		if (values.length < 1) {
 			return;
 		}
-		currentWorkingSet = URLCoder.decode(values[0] /* , "UTF8" */
-		);
+		
+		currentWorkingSet = URLCoder.decode(values[0]);
 		i : for (int i = 1; i < values.length; i++) {
 			String[] nameAndHrefs = values[i].split("&", -1); //$NON-NLS-1$
 
-			String name = URLCoder.decode(nameAndHrefs[0] /* , "UTF8" */
-			);
+			String name = URLCoder.decode(nameAndHrefs[0]);
 
 			AdaptableHelpResource[] elements = new AdaptableHelpResource[nameAndHrefs.length - 1];
 			// for each href (working set resource)
+			String previousToc = ""; //$NON-NLS-1$
 			for (int e = 0; e < nameAndHrefs.length - 1; e++) {
 				int h = e + 1;
-				elements[e] = getAdaptableToc(URLCoder.decode(nameAndHrefs[h]
-				/* , "UTF8" */
-				));
+				String decodedName = URLCoder.decode(nameAndHrefs[h]);
+				elements[e] = getAdaptableToc(decodedName);
 				if (elements[e] == null) {
-					elements[e] = getAdaptableTopic(URLCoder
-							.decode(nameAndHrefs[h]
-							/* , "UTF8" */
-							));
+					// Check for a suffix of type _nn_
+					// If there is only a suffix this means use the same toc as the previous entry
+					int suffixStart = decodedName.lastIndexOf('_', decodedName.length() - 2);
+					if (suffixStart > 0) {
+						previousToc = decodedName.substring(0, suffixStart);
+					} else if (suffixStart == 0) {
+					    decodedName = previousToc + decodedName;
+					}
+					elements[e] = getAdaptableTopic(decodedName);
 				}
 				if (elements[e] == null) {
 					// working set cannot be restored
 					continue i;
 				}
 			}
-			WorkingSet ws = createWorkingSet(name, elements);
+			WorkingSet ws = createWorkingSet(name, elements, null);
 			workingSets.add(ws);
 		}
 	}
+	
+	private void restoreCriteria(){
+		
+		String data = CookieUtil.restoreString(COOKIE_WSET_CRITERIA, request);
+		if (data == null) {
+			return;
+		}
+		String[] values = data.split("\\|", -1); //$NON-NLS-1$
+		if (values.length < 1) {
+			return;
+		}
+		//scope1$platform#AIX,WINDOWS,$version#1.0,2.0,
+		for (int i = 1; i < values.length; ++i) {
+			String[] nameAndCriteria = values[i].split("\\$", -1); //$NON-NLS-1$
+			if(nameAndCriteria.length < 2){
+				continue;
+			}
+			String name = URLCoder.decode(nameAndCriteria[0]);
+		    List criteriaResource = new ArrayList();
+			for (int j = 1; j < nameAndCriteria.length; ++j) {
+				String criterion = nameAndCriteria[j];
+				String[] keyAndValue = criterion.split("#", -1); //$NON-NLS-1$
+				if(keyAndValue.length != 2)
+					continue;
+				String key = URLCoder.decode(keyAndValue[0]);
+			    String value = URLCoder.decode(keyAndValue[1]);
+				String[] criterionValues = value.split(",", -1); //$NON-NLS-1$
+				if(criterionValues.length < 1)
+					continue;
+
+				List criterionValuesList = Arrays.asList(criterionValues);
+				CriterionResource criterionResource = new CriterionResource(key, criterionValuesList);
+				criteriaResource.add(criterionResource);
+
+			}
+			
+			WorkingSet workingset = getWorkingSet(name);
+			if(workingset != null){
+				CriterionResource[] criteria = new CriterionResource[criteriaResource.size()];
+				criteriaResource.toArray(criteria);
+				workingset.setCriteria(criteria);
+			}
+		}
+	}
 
 	/***************************************************************************
 	 * Persists all working sets. Should only be called by the webapp working
@@ -162,57 +239,103 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 	 * format: curentWorkingSetName|name1&href11&href12|name2&href22
 	 */
 	private void saveState() throws IOException {
+		saveContents();
+		saveCriteria();
+	}
+	
+	private void saveContents() throws IOException {
+		
 		StringBuffer data = new StringBuffer();
-		data.append(URLCoder.encode(currentWorkingSet /* , "UTF8" */
+		data.append(URLCoder.compactEncode(currentWorkingSet /* , "UTF8" */
 		));
 
 		for (Iterator i = workingSets.iterator(); i.hasNext();) {
 			data.append('|');
 			WorkingSet ws = (WorkingSet) i.next();
-			data.append(URLCoder.encode(ws.getName() /* , "UTF8" */
+			data.append(URLCoder.compactEncode(ws.getName() /* , "UTF8" */
 			));
 
 			AdaptableHelpResource[] resources = ws.getElements();
+			AdaptableToc lastTopicParent = null;
 			for (int j = 0; j < resources.length; j++) {
-				data.append('&');
 
 				IAdaptable parent = resources[j].getParent();
 				if (parent == getRoot()) {
 					// saving toc
-					data.append(URLCoder.encode(resources[j].getHref()
+					data.append('&');
+					data.append(URLCoder.compactEncode(resources[j].getHref()
 					/* , "UTF8" */
 					));
+					lastTopicParent = null;
 				} else {
 					// saving topic as tochref_topic#_
 					AdaptableToc toc = (AdaptableToc) parent;
 					AdaptableHelpResource[] siblings = (toc).getChildren();
 					for (int t = 0; t < siblings.length; t++) {
 						if (siblings[t] == resources[j]) {
-							data.append(URLCoder.encode(toc.getHref()
-							/* , "UTF8" */
-							));
+							data.append('&');
+							if (!toc.equals(lastTopicParent)) {
+								data.append(URLCoder.compactEncode(toc.getHref()
+								/* , "UTF8" */
+								));
+							}
 							data.append('_');
 							data.append(t);
 							data.append('_');
+							lastTopicParent = toc;
 							break;
 						}
 					}
 				}
 			}
 		}
-
+		
+		saveToCookie(COOKIE_WSET_CONTENTS, data.toString());
+	}
+	
+	private void saveCriteria() throws IOException {
+		
+		StringBuffer data = new StringBuffer();
+		data.append(URLCoder.compactEncode(currentWorkingSet));
+		//|scope1$platform#AIX,WINDOWS,$version#1.0,2.0,
+		for (Iterator i = workingSets.iterator(); i.hasNext();) {
+			data.append('|');
+			WorkingSet ws = (WorkingSet) i.next();
+			data.append(URLCoder.compactEncode(ws.getName()));
+
+			CriterionResource[] criteria = ws.getCriteria();
+			for (int j = 0; j < criteria.length; ++ j){
+				CriterionResource criterion = criteria[j];
+				String criterionName = criterion.getCriterionName();
+				List criterionValues = criterion.getCriterionValues();
+				if(null != criterionValues && !criterionValues.isEmpty()){
+					data.append('$');
+					data.append(URLCoder.compactEncode(criterionName));
+					data.append('#');
+					for (Iterator iter = criterionValues.iterator(); iter.hasNext();) {
+						String value = (String) iter.next();						
+						data.append(URLCoder.compactEncode(value+','));
+					}
+				}
+			}	
+		}
+		
+		saveToCookie(COOKIE_WSET_CRITERIA, data.toString());
+	}
+	
+	private void saveToCookie(String name, String data) throws IOException{
+		
 		try {
-			CookieUtil.saveString(COOKIE_NAME, data.toString(), MAX_COOKIES,
-					request, response);
+			CookieUtil.saveString(name, data, MAX_COOKIES, request, response);
 		} catch (IOException ioe) {
 			if (HelpWebappPlugin.DEBUG_WORKINGSETS) {
-				System.out
-						.println("InfocenterWorkingSetManager.saveState(): Too much data to save: " //$NON-NLS-1$
-								+ data.toString());
+				String msg = "InfocenterWorkingSetManager.saveState(): Too much data to save: " + data; //$NON-NLS-1$
+				System.out.println(msg);
 			}
 			throw ioe;
 		}
 	}
+	
 
 	/**
 	 * *
@@ -273,4 +396,62 @@ public class InfocenterWorkingSetManager implements IHelpWorkingSetManager {
 		}
 	}
 
+	public boolean isCriteriaScopeEnabled(){
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(locale);
+		}
+		if(HelpPlugin.getCriteriaManager().isCriteriaEnabled() && !allCriteriaValues.isEmpty()) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	public String[] getCriterionIds() {
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(locale);
+		}
+		List criterionIds = new ArrayList();
+		if(null != allCriteriaValues){
+			for(Iterator iter = allCriteriaValues.keySet().iterator(); iter.hasNext();){
+				String criterion = (String) iter.next();
+				if(null == criterion || 0 == criterion.length() || 0 == getCriterionValueIds(criterion).length)
+					continue;
+				criterionIds.add(criterion);
+			}
+			Collections.sort(criterionIds);
+		}
+		String[] ids = new String[criterionIds.size()];                                        		
+		criterionIds.toArray(ids);
+		return ids;
+	}
+	
+
+	public String[] getCriterionValueIds(String criterionName) {
+		if(null == allCriteriaValues){
+			allCriteriaValues = HelpPlugin.getCriteriaManager().getAllCriteriaValues(locale);
+		}
+		List valueIds = new ArrayList();
+		if(null != criterionName && null != allCriteriaValues) {
+			Set criterionValues = (Set)allCriteriaValues.get(criterionName);
+			if(null != criterionValues && !criterionValues.isEmpty()) {
+				valueIds.addAll(criterionValues);
+				Collections.sort(valueIds);
+				valueIds.add(UNCATEGORIZED);
+			}
+		}
+		String[] valueIdsArray = new String[valueIds.size()];                                        		
+		valueIds.toArray(valueIdsArray);
+		return valueIdsArray;
+	}
+	
+
+	public String getCriterionDisplayName(String criterionId) {
+		return HelpPlugin.getCriteriaManager().getCriterionDisplayName(criterionId, locale);
+	}
+
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId) {
+		return HelpPlugin.getCriteriaManager().getCriterionValueDisplayName(criterionId, criterionValueId, locale);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
index 73b0cca..d28d669 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/InjectionFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,8 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.base.HelpBasePlugin;
+import org.eclipse.help.internal.util.ProductPreferences;
 import org.eclipse.help.internal.webapp.data.CssUtil;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 import org.eclipse.help.webapp.IFilter;
@@ -43,7 +43,7 @@ public class InjectionFilter implements IFilter {
 	 * @see IFilter#filter(HttpServletRequest, OutputStream)
 	 */
 	public OutputStream filter(HttpServletRequest req, OutputStream out) {
-		boolean isInfocenter = BaseHelpSystem.getMode() != BaseHelpSystem.MODE_WORKBENCH;
+		boolean isUnfiltered = ProductPreferences.useEnablementFilters();
 
 		boolean addNarrow = false;
 		boolean addDisabled = false;
@@ -69,7 +69,7 @@ public class InjectionFilter implements IFilter {
 			CssUtil.addCssFiles(TOPIC_CSS, cssIncludes);
 		}
 		
-		boolean enabled = isInfocenter || isNav || HelpBasePlugin.getActivitySupport().isRoleEnabled(
+		boolean enabled = isUnfiltered || isNav || HelpBasePlugin.getActivitySupport().isRoleEnabled(
 				pathInfo);
 		if ("/ntopic".equals(req.getServletPath())) { //$NON-NLS-1$
 			addNarrow = true;
@@ -90,11 +90,12 @@ public class InjectionFilter implements IFilter {
 		String relativePath = FilterUtils.getRelativePathPrefix(req);
 		StringBuffer script = new StringBuffer();
 		StringBuffer disabledContent = new StringBuffer();
-		script.append(CssUtil.createCssIncludes(cssIncludes));
+		script.append(CssUtil.createCssIncludes(cssIncludes, FilterUtils.getRelativePathPrefix(req)));
 		if (addDisabled) {
 			if (needsLiveHelp) {
 				script.append(disabledBook3);
-				script.append("../content/PLUGINS_ROOT/org.eclipse.help/"); //$NON-NLS-1$
+				script.append(relativePath);
+				script.append("content/org.eclipse.help/"); //$NON-NLS-1$
 				script.append(disabledBook4);
 			}
 			appendDisabled(disabledContent, upLevels, addNarrow, relativePath);
@@ -115,7 +116,8 @@ public class InjectionFilter implements IFilter {
 			return;
 		buff.append("<div id=\"help-disabledTopic\">"); //$NON-NLS-1$
 		buff.append("<img src=\""); //$NON-NLS-1$
-		buff.append("../content/PLUGINS_ROOT/org.eclipse.help.webapp/"); //$NON-NLS-1$
+		buff.append(relativePath);
+		buff.append("content/org.eclipse.help.webapp/"); //$NON-NLS-1$
 		buff.append("advanced/images/e_show_all.gif\" border=\"0\" align=\"bottom\"> "); //$NON-NLS-1$		
 		buff.append(message);
 		buff.append("<br><hr></div>"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
index c7c0c0b..f8beaf7 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/NavServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,9 +23,10 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.webapp.WebappResources;
-import org.eclipse.help.internal.webapp.data.EnabledTopicUtils;
+import org.eclipse.help.internal.webapp.data.RequestScope;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 import org.eclipse.help.webapp.IFilter;
 
@@ -61,7 +62,8 @@ public class NavServlet extends HttpServlet {
 		}
 
 		PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8")); //$NON-NLS-1$
-		writeContent(topic, path, locale, writer, UrlUtil.isRTL(req, resp));
+		AbstractHelpScope scope = RequestScope.getScope(req, resp, false);
+		writeContent(topic, path, locale, writer, UrlUtil.isRTL(req, resp), scope);
 		writer.close();
 	}
 	
@@ -93,7 +95,7 @@ public class NavServlet extends HttpServlet {
 		return topic;
 	}
 	
-	private void writeContent(ITopic topic, String path, Locale locale, PrintWriter writer, boolean isRTL) {
+	private void writeContent(ITopic topic, String path, Locale locale, PrintWriter writer, boolean isRTL, AbstractHelpScope scope) {
 		writer.write(XHTML_1);
 		writer.write(topic.getLabel());
 		if (isRTL) {
@@ -106,7 +108,7 @@ public class NavServlet extends HttpServlet {
 		writer.write("<ul class=\"NavList\">\n"); //$NON-NLS-1$
 		ITopic[] subtopics = topic.getSubtopics();
 		for (int i=0;i<subtopics.length;++i) {
-			if (EnabledTopicUtils.isEnabled(subtopics[i])) {
+			if (scope.inScope(subtopics[i])) {
 				writer.write("<li><a href=\""); //$NON-NLS-1$
 				String href = subtopics[i].getHref();
 				if (href == null) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java
new file mode 100644
index 0000000..c03f89e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootFilter.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.servlet;
+
+import java.io.OutputStream;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.help.webapp.IFilter;
+
+/**
+ * This class is a filter based on PluginsRootResolvingStream
+ * which replaces PLUGINS_ROOT with a relative path to eliminate redirects.
+ * It also performs preprocessing to add child links at runtime.
+ */
+public class PluginsRootFilter implements IFilter {	
+	
+    public OutputStream filter(HttpServletRequest req, OutputStream out) {
+		String pathPrefix = FilterUtils.getRelativePathPrefix(req);
+		if (pathPrefix.length() >= 3) {
+		    return new PluginsRootResolvingStream(out, req, pathPrefix.substring(0, pathPrefix.length() - 3));
+		}
+		return out;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java
new file mode 100644
index 0000000..147613e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/PluginsRootResolvingStream.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.webapp.servlet;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.eclipse.help.internal.search.HTMLDocParser;
+
+/**
+ * This class replaces PLUGINS_ROOT with a relative path to eliminate redirects.
+ * It also performs preprocessing to add child links at runtime.
+ */
+public class PluginsRootResolvingStream extends OutputStream {
+	
+	protected OutputStream out;
+	
+	private int state = INITIAL_STATE;
+	private int charsMatched = 0;
+	private int lastKeywordMatch = 0;
+	private static final int  INITIAL_STATE = 0;
+	private static final int  IN_TAG = 1;
+	private static final int  IN_QUOTE = 2;  
+	private static final int  IN_QUOTE_NOT_PLUGINS_ROOT = 3;
+	private static final int  MAY_BE_INCLUDE = 4;
+	private static final int  IN_METATAG = 5;
+	private static final String PLUGINS_ROOT = "PLUGINS_ROOT/"; //$NON-NLS-1$
+	private static final String UTF8 = "UTF8"; //$NON-NLS-1$
+	private static final String INSERT_CHILD_LINKS = "<!--INSERT_CHILD_LINKS-->"; //$NON-NLS-1$
+	private static final String INSERT_CHILD_LINK_STYLE = "<!--INSERT_CHILD_LINK_STYLE-->"; //$NON-NLS-1$
+	private final String[] keywords = { INSERT_CHILD_LINKS, INSERT_CHILD_LINK_STYLE };
+	private boolean[] possibleKeywordMatches;
+	private String pathPrefix;
+	private StringBuffer tag;
+	private ByteArrayOutputStream metaTagBuffer;
+    private boolean tagRead;
+	private HttpServletRequest req;
+	private String charset;
+
+	public PluginsRootResolvingStream(OutputStream out, HttpServletRequest req, String prefix) {
+		this.out = out;
+		this.pathPrefix = prefix;
+		this.req = req;
+	}
+
+	public void write(int b) throws IOException {
+		switch(state) {
+	    case INITIAL_STATE: 
+	    	if (b == '<') {
+	    		state = IN_TAG;
+	    		charsMatched = 0; 
+	    		tag = new StringBuffer();
+	    		tagRead = false;
+	    	} else {
+	    	    out.write(b);
+	    	}
+	    	break;
+	    case IN_TAG: 
+			if (charsMatched == 0) {
+				if (b == '!') {
+					state = MAY_BE_INCLUDE;
+					possibleKeywordMatches = new boolean[keywords.length];
+					for (int i = 0; i < possibleKeywordMatches.length; i++) {
+						possibleKeywordMatches[i] = true;
+					}
+					charsMatched = 2; // Chars matched in "<!--INCLUDE"
+					lastKeywordMatch = 0;
+					break;
+				} else {
+					out.write('<');
+				}
+			}
+	    	if (b == '>') {
+	    		state = INITIAL_STATE;
+	    	} else if (b == '"') {
+	    		state = IN_QUOTE;
+	    		charsMatched = 0;
+	    	} else {
+	    		charsMatched++;
+	    		if (!tagRead) {
+	    			if (b >= 0 && b < 128 && tag.length() < 20) {
+	    				// ASCII
+	    				char c = (char)b;
+	    				if (Character.isLetter(c)) {
+	    					tag.append(c);
+	    				} else if (Character.isWhitespace(c)) {
+	    					tagRead = true;
+	    					if (tag.toString().equalsIgnoreCase("meta")) { //$NON-NLS-1$
+	    						state = IN_METATAG;
+	    						metaTagBuffer = new ByteArrayOutputStream(7);
+	    						metaTagBuffer.write("<meta ".getBytes()); //$NON-NLS-1$
+	    					}
+	    				} else  {
+	    					tag.append(c);
+	    				}
+	    			}
+	    		}
+	    	}
+	    	out.write(b);
+	    	break;
+	    case IN_QUOTE_NOT_PLUGINS_ROOT:
+	    	if (b == '>') {
+	    		state = INITIAL_STATE;
+	    	} else if (b == '"') {
+	    		state = IN_TAG;
+	    		charsMatched = 1;
+	    	}
+	    	out.write(b);
+	    	break;
+	    case IN_QUOTE:
+	    	// In a quote which may start with PLUGINS_ROOT
+	    	if (b == PLUGINS_ROOT.charAt(charsMatched)) {
+	    		charsMatched++;
+	    		if (charsMatched == PLUGINS_ROOT.length()) {
+	    			out.write(pathPrefix.getBytes());
+	    			state = IN_QUOTE_NOT_PLUGINS_ROOT;
+	    		}
+	    	} else {
+	    		// We just discovered that this is not "PLUGINS_ROOT/  
+	    		// flush out the characters
+	    		state = IN_QUOTE_NOT_PLUGINS_ROOT;
+	    		flushPluginsRootCharacters();
+	    		out.write(b);
+	    	}
+	    	break;
+	    case MAY_BE_INCLUDE:
+	    	// Compare against all possible keywords
+	    	boolean canStillMatch = false;
+	    	int perfectMatch = -1;
+	    	for (int i = 0; i < keywords.length; i++) {
+	    		if (possibleKeywordMatches[i]) {
+	    			if (keywords[i].charAt(charsMatched) == b) {
+	    				canStillMatch = true;  
+	    				lastKeywordMatch = i;
+	    				if (keywords[i].length() == charsMatched + 1) {
+	    					perfectMatch = i;
+	    				}
+	    			} else {
+	    				possibleKeywordMatches[i] = false;
+	    			}
+	    		}
+	    	}
+	    	if (perfectMatch != -1) {
+	    		insertBasedOnKeyword(perfectMatch);
+	    		state=INITIAL_STATE;
+	    	} else if (canStillMatch) {
+		    	charsMatched++;
+	    	} else {
+	    		state = INITIAL_STATE;
+	    		flushKeywordCharacters();
+	            out.write(b);
+	    	}
+	    	break;
+	    case IN_METATAG: 
+	    	out.write(b);
+	    	metaTagBuffer.write(b);
+			if (b=='>') {
+				parseMetaTag(metaTagBuffer);
+				metaTagBuffer = null;
+				state = INITIAL_STATE;
+			}
+	    	break;
+		default:
+			out.write(b);
+		}
+	}
+	
+	private void parseMetaTag(ByteArrayOutputStream buffer) {
+		ByteArrayInputStream is = new ByteArrayInputStream(buffer.toByteArray());
+		String value = HTMLDocParser.getCharsetFromHTML(is);
+		try {
+			is.close();
+		}
+		catch (IOException e) {
+		}
+		if (value!=null) {
+			this.charset = value;
+		}
+	}
+
+	protected void insertBasedOnKeyword(int index) throws IOException {
+		if (index == 0 ) {
+			ChildLinkInserter inserter = new ChildLinkInserter(req, out);
+			inserter.addContents(getCharset());
+		} else {
+			ChildLinkInserter inserter = new ChildLinkInserter(req, out);
+			inserter.addStyle();
+		}		
+	}
+
+	private void flushPluginsRootCharacters() throws IOException {
+		out.write(PLUGINS_ROOT.substring(0, charsMatched).getBytes(UTF8));
+	}
+	
+	private void flushKeywordCharacters() throws IOException {
+		String matchingCharacters = keywords[lastKeywordMatch].substring(0, charsMatched);
+		out.write(matchingCharacters.getBytes(UTF8)); 
+	}
+
+	
+	public void close() throws IOException {
+		if (state == IN_QUOTE) {
+			flushPluginsRootCharacters();
+		} else if (state == MAY_BE_INCLUDE) {
+			flushKeywordCharacters();
+		}
+		out.close();
+		super.close();
+	}	
+	
+	public String getCharset() {
+		return charset;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
index 68625b9..b51e8ce 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/SearchServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.search.ISearchHitCollector;
 import org.eclipse.help.internal.search.ISearchQuery;
+import org.eclipse.help.internal.search.QueryTooComplexException;
 import org.eclipse.help.internal.search.SearchHit;
 import org.eclipse.help.internal.search.SearchQuery;
 import org.eclipse.help.internal.util.URLCoder;
@@ -42,16 +43,23 @@ public class SearchServlet extends HttpServlet {
 	private static final long serialVersionUID = 1L;
 	private static final String PARAMETER_PHRASE = "phrase"; //$NON-NLS-1$
 	private Collection results = new ArrayList();
+	private QueryTooComplexException searchException;
 	private ISearchHitCollector collector = new ISearchHitCollector() {
 		public void addHits(List hits, String wordsSearched) {
 			if (results != null) {
 				results.addAll(hits);
 			}
 		}
+
+		public void addQTCException(QueryTooComplexException exception)
+				throws QueryTooComplexException {
+			searchException = exception;			
+		}
 	};
 	
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
+		BaseHelpSystem.checkMode();
 		String locale = UrlUtil.getLocale(req, resp);
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
 		resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
@@ -61,12 +69,15 @@ public class SearchServlet extends HttpServlet {
 			ISearchQuery query = new SearchQuery(phrase, false, Collections.EMPTY_LIST, locale);
 			results.clear();
 			BaseHelpSystem.getSearchManager().search(query, collector, new NullProgressMonitor());
-			String response = serialize(results);
-			resp.getWriter().write(response);
-		}
-		else {
-			resp.sendError(400); // bad request; missing parameter
+			if (searchException == null) {
+				String response = serialize(results);
+				resp.getWriter().write(response);
+				return;
+			}
 		}
+
+		resp.sendError(400); // bad request; missing parameter
+
 	}
 	
 	public static String serialize(Collection results) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
index cce2436..4b60132 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocFragmentServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,11 +22,13 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.base.AbstractHelpScope;
 import org.eclipse.help.internal.Topic;
+import org.eclipse.help.internal.base.scope.ScopeUtils;
 import org.eclipse.help.internal.toc.Toc;
 import org.eclipse.help.internal.webapp.WebappResources;
-import org.eclipse.help.internal.webapp.data.EnabledTopicUtils;
 import org.eclipse.help.internal.webapp.data.IconFinder;
+import org.eclipse.help.internal.webapp.data.RequestScope;
 import org.eclipse.help.internal.webapp.data.TocData;
 import org.eclipse.help.internal.webapp.data.UrlUtil;
 
@@ -54,7 +56,8 @@ public class TocFragmentServlet extends HttpServlet {
 		
 		readParameters(req);
 		
-		Serializer serializer = new Serializer(data, req.getLocale());
+		AbstractHelpScope scope = RequestScope.getScope(req, resp, false);
+		Serializer serializer = new Serializer(data, req.getLocale(), scope);
 		String response = serializer.generateTreeXml();	
 		locale2Response.put(locale, response);
 		resp.getWriter().write(response);
@@ -74,15 +77,17 @@ public class TocFragmentServlet extends HttpServlet {
 		private StringBuffer buf;
 		private int requestKind;
 		private Locale locale;
+		private AbstractHelpScope scope;
 		private static final int REQUEST_SHOW_IN_TOC = 1;      // Get the path to an element an element based on its href
 		private static final int REQUEST_SHOW_TOCS = 2;        // Show all the tocs but not their children
 		private static final int REQUEST_SHOW_CHILDREN = 3;    // Show the children of a node
 		private static final int REQUEST_EXPAND_PATH = 4;      // Get all the nodes requires to expand a path in the tree
 
-		public Serializer(TocData data, Locale locale) {
+		public Serializer(TocData data, Locale locale, AbstractHelpScope scope) {
 			tocData = data;
 			buf = new StringBuffer();
 			this.locale = locale;
+			this.scope = scope;
 			if (tocData.isExpandPath()) {
 				requestKind = REQUEST_EXPAND_PATH;
 			} else if (tocData.getTopicHref() != null) {
@@ -97,11 +102,7 @@ public class TocFragmentServlet extends HttpServlet {
 		public String generateTreeXml() {
 			buf.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
 			buf.append("<tree_data>\n"); //$NON-NLS-1$
-			
-		    if (tocData.isRemoteHelpError()) {
-		    	addError(WebappResources.getString("remoteHelpErrorMessage", locale)); //$NON-NLS-1$			
-		    }
-					
+				
 			// Return an error for show in toc if topic was not found in toc
 			if ((requestKind == REQUEST_SHOW_IN_TOC || requestKind == REQUEST_EXPAND_PATH) && tocData.getTopicPath() == null) {
 				addError(WebappResources.getString("CannotSync", locale)); //$NON-NLS-1$
@@ -123,7 +124,7 @@ public class TocFragmentServlet extends HttpServlet {
 				// Count the number of enabled tocs
 				int enabled = 0;
 				for (int i = 0; i <= selectedToc; i++) {
-					if (EnabledTopicUtils.isEnabled(tocData.getTocs()[i])) {
+					if (ScopeUtils.showInTree(tocData.getTocs()[i], scope)) {
 						enabled++;
 					}
 				}
@@ -152,9 +153,6 @@ public class TocFragmentServlet extends HttpServlet {
 			// toc, otherwise generate the root of every toc.
 			for (int toc=0; toc< tocData.getTocCount(); toc++) {
 				boolean shouldLoad = requestKind == REQUEST_SHOW_TOCS || toc == selectedToc;
-				if(!tocData.isEnabled(toc)){
-					shouldLoad = false;
-				} 
 	            if (shouldLoad) {
 	            	boolean isSelected = false; // Should this node be selected in the tree
 	            	if (requestKind == REQUEST_SHOW_TOCS) {
@@ -169,8 +167,8 @@ public class TocFragmentServlet extends HttpServlet {
 	
 		private void serializeToc(IToc toc, int tocIndex, ITopic[] topicPath, boolean isSelected) {		
 			
-			if (!EnabledTopicUtils.isEnabled(toc)) {
-				// do not generate toc when there are no leaf topics
+			if (!ScopeUtils.showInTree(toc, scope)) {
+				// do not generate toc when there are no leaf topics or if it is filtered out
 				return;
 			}
 			ITopic[] topics = toc.getTopics();
@@ -209,7 +207,7 @@ public class TocFragmentServlet extends HttpServlet {
 
 		private void serializeTopic(ITopic topic, ITopic[] topicPath, boolean isSelected, String parentPath)  {
 		    ITopic[] subtopics = topic.getSubtopics();
-		     boolean isLeaf = !EnabledTopicUtils.hasEnabledSubtopic(topic);
+		     boolean isLeaf = !ScopeUtils.hasInScopeDescendent(topic, scope);
 		    buf.append("<node"); //$NON-NLS-1$
 			if (topic.getLabel() != null) { 
 				buf.append('\n'	+ "      title=\"" + XMLGenerator.xmlEscape(topic.getLabel()) + '"'); //$NON-NLS-1$
@@ -297,14 +295,14 @@ public class TocFragmentServlet extends HttpServlet {
 				// Show the children of this node
 				for (int subtopic = 0; subtopic < childTopics.length; subtopic++) {
 				    ITopic childTopic = childTopics[subtopic];
-				    if (EnabledTopicUtils.isEnabled(childTopic)) {
+				    if (ScopeUtils.showInTree(childTopic, scope)) {
 					    serializeTopic(childTopic, null, false, addSuffix(parentPath, subtopic));
 				    }
 				}
 			} else if (topicPath != null) {
 				for (int subtopic = 0; subtopic < childTopics.length; subtopic++) {
 					ITopic childTopic = childTopics[subtopic];
-					if (EnabledTopicUtils.isEnabled(childTopic)) {
+				    if (ScopeUtils.showInTree(childTopic, scope)) {
 						if (topicPath[0].getLabel().equals(childTopic.getLabel())) {
 							ITopic[] newPath = null;
 							if (topicPath.length > 1) {
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
index 6409606..4e99944 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/TocServlet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
 import javax.xml.transform.TransformerException;
 
 import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.base.BaseHelpSystem;
 import org.eclipse.help.internal.dynamic.DocumentWriter;
 import org.eclipse.help.internal.toc.Toc;
 import org.eclipse.help.internal.toc.TocContribution;
@@ -43,6 +44,7 @@ public class TocServlet extends HttpServlet {
 
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 			throws ServletException, IOException {
+		BaseHelpSystem.checkMode();
 		String locale = UrlUtil.getLocale(req, resp);
 		req.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
 		resp.setContentType("application/xml; charset=UTF-8"); //$NON-NLS-1$
@@ -64,7 +66,7 @@ public class TocServlet extends HttpServlet {
 		resp.getWriter().write(response);
 	}
 		
-	private String serialize(TocContribution[] contributions, String locale) throws TransformerException {
+	protected String serialize(TocContribution[] contributions, String locale) throws TransformerException {
 		StringBuffer buf = new StringBuffer();
 		buf.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); //$NON-NLS-1$
 		buf.append("<tocContributions>\n"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/WebappWorkingSetManager.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/WebappWorkingSetManager.java
index 0da476a..22baa4c 100644
--- a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/WebappWorkingSetManager.java
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/servlet/WebappWorkingSetManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,19 @@
  *******************************************************************************/
 package org.eclipse.help.internal.webapp.servlet;
 
-import java.io.*;
+import java.io.IOException;
 
-import javax.servlet.http.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
-import org.eclipse.help.internal.base.*;
-import org.eclipse.help.internal.workingset.*;
+import org.eclipse.help.internal.base.BaseHelpSystem;
+import org.eclipse.help.internal.criteria.CriterionResource;
+import org.eclipse.help.internal.workingset.AdaptableHelpResource;
+import org.eclipse.help.internal.workingset.AdaptableToc;
+import org.eclipse.help.internal.workingset.AdaptableTocsArray;
+import org.eclipse.help.internal.workingset.AdaptableTopic;
+import org.eclipse.help.internal.workingset.IHelpWorkingSetManager;
+import org.eclipse.help.internal.workingset.WorkingSet;
 
 /**
  * Proxy for WorkingSetManager or InfocenterWorkingSetManager.
@@ -61,6 +68,10 @@ public class WebappWorkingSetManager implements IHelpWorkingSetManager {
 		return wSetManager.createWorkingSet(name, elements);
 	}
 
+	public WorkingSet createWorkingSet(String name, AdaptableHelpResource[] elements, CriterionResource[] criteria) {
+		return wSetManager.createWorkingSet(name, elements, criteria);
+	}
+	
 	/**
 	 * Returns a working set by name
 	 *  
@@ -110,5 +121,28 @@ public class WebappWorkingSetManager implements IHelpWorkingSetManager {
 	public void setCurrentWorkingSet(String scope) {
 		wSetManager.setCurrentWorkingSet(scope);
 	}
+	
+	public boolean isCriteriaScopeEnabled(){
+		return wSetManager.isCriteriaScopeEnabled();
+	}
+	
+	public String[] getCriterionIds() {
+		return wSetManager.getCriterionIds();
+	}
+	
+
+	public String[] getCriterionValueIds(String criterionId) {
+		return wSetManager.getCriterionValueIds(criterionId);
+	}
+
+
+	public String getCriterionDisplayName(String criterionId) {
+		return wSetManager.getCriterionDisplayName(criterionId);
+	}
+	
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId) {
+		return wSetManager.getCriterionValueDisplayName(criterionId, criterionValueId);
+	}
+
 
 }
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java
new file mode 100644
index 0000000..94f3682
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractButton.java
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.webapp;
+
+import java.util.Locale;
+
+/**
+ * A class which contributes a button to the help webapp
+ * @since 3.5
+ */
+
+public abstract class AbstractButton implements Comparable {
+	
+	/**
+	 * Gets the id which will be assigned to the image of the button in the 
+	 * generated HTML
+	 * @return a string that consists of alphanumeric characters only with no spaces
+	 */
+    public abstract String getId();
+    
+    /**
+     * @return a URL relative to /help which is the location
+     * of the 16x16 image icon which will appear in the tab
+     */
+    public abstract String getImageURL();
+    
+    /**
+     * A user visible description of the button which will appear in the tooltip
+     * @param locale the locale of the client
+     * @return the tooltip text to be used in this locale
+     */
+    public abstract String getTooltip(Locale locale);
+    
+    /**
+     * a JavaScript function which will be called when the button is pressed
+     * @return the name of a JavaScript function 
+     */
+    public abstract String getAction(); 
+    
+    /**
+     * The state of a button which is visible but not depressed
+     */
+    public final static String BUTTON_OUT = "off"; //$NON-NLS-1$
+    
+    /**
+     * The state of a button which is visible and depressed
+     */
+    public final static String BUTTON_IN = "on"; //$NON-NLS-1$
+    
+    /**
+     * The state of a button which is hidden
+     */
+    public final static String BUTTON_HIDDEN = "hidden"; //$NON-NLS-1$
+    
+    /**
+     * Get the state of a button
+     * @return one of <code>BUTTON_OUT</code>, <code>BUTTON_IN</code>, or 
+     * <code>BUTTON_HIDDEN</code>.
+     */
+    public String getState() {
+    	return BUTTON_OUT;
+    }
+    
+    /**
+     * Get the location of the a javascript file to be included in any
+     * jsp file which uses this button
+     * @return a URL path, relative to /help or <code>null</code> if there.
+     */
+    public String getJavaScriptURL() {
+    	return null;
+    }
+    
+    /**
+     * Toolbar name for the content pane, which shows help pages
+     */
+    public static final String CONTENT_TOOLBAR = "content"; //$NON-NLS-1$ 
+    
+    /**
+     * Toolbar name for the table of contents
+     */
+    public static final String TOC_TOOLBAR = "toc"; //$NON-NLS-1$ 
+    
+    /**
+     * Toolbar name for the keyword index
+     */
+    public static final String INDEX_TOOLBAR = "index"; //$NON-NLS-1$ 
+    
+    /**
+     * Toolbar name for search results
+     */
+    public static final String SEARCH_TOOLBAR = "search"; //$NON-NLS-1$ 
+    
+    /**
+     * Toolbar name for bookmarks
+     */
+    public static final String BOOKMARKS_TOOLBAR = "bookmarks"; //$NON-NLS-1$
+    
+    /**
+     * Determines whether this button should be true if the button should be added
+     * to particular toolbar 
+     * @param toolbarName
+     * @return true
+     */
+    public boolean isAddedToToolbar(String toolbarName) {
+    	return true;
+    }
+    
+    final public int compareTo(Object o) {
+    	if (o instanceof AbstractButton) {
+    		String objectName = ((AbstractButton)o).getId();
+			return (getId().compareTo(objectName));
+    	}
+    	return 0;
+    }   
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java
new file mode 100644
index 0000000..c606611
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractFrame.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.webapp;
+
+/**
+ * A view which contributes a frame to the help webapp
+ * @since 3.5
+ */
+
+public abstract class AbstractFrame implements Comparable {
+	
+	/**
+	 * Constant returned from getFrameLocation() function to indicate that
+	 * the frame should be created below the content frame or the Main Help Toolbar
+	 */
+	public static final int BELOW_CONTENT = 1;
+	public static final int HELP_TOOLBAR = 2;
+	
+	/**
+	 * Function which defines the frame location
+	 * @return a constant defined in this class which indicates the location of this frame
+	 */
+	public abstract int getLocation();
+	
+	/**
+	 * 
+	 * @return a non translated name which is the name of this frame
+	 */
+    public abstract String getName();
+
+    /**
+     * @return a URL path, relative to /help which is the 
+     * location of the jsp files in the advanced presentation
+     */
+    public abstract String getURL();
+    
+    /**
+     * @return a string which will be used in the rows or cols attribute of a 
+     * frameset in the html
+     */
+    public String getSize() {
+    	return "*"; //$NON-NLS-1$
+    }
+
+    /**
+     * @return true if the frame should be shown in the advanced presentation
+     */
+    public boolean isVisible() {
+        return true;
+    }
+    
+    /**
+     * allows the attributes of this frame other than name and src to be specified
+     * @return a list of attributes
+     */
+    public String getFrameAttributes() {
+    	return "\"marginwidth=\"1\" marginheight=\"1\" frameborder=\"1\" scrolling=\"no\""; //$NON-NLS-1$
+    }
+    
+    final public int compareTo(Object o) {
+    	if (o instanceof AbstractFrame) {
+    		String objectName = ((AbstractFrame)o).getName();
+			return (getName().compareTo(objectName));
+    	}
+    	return 0;
+    }
+    
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java
new file mode 100644
index 0000000..bcc1e08
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help.webapp/src/org/eclipse/help/webapp/AbstractView.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.webapp;
+
+import java.util.Locale;
+
+/**
+ * A view which contributes a view to the help webapp
+ * @since 3.5
+ */
+
+public abstract class AbstractView {
+	
+	/**
+	 * 
+	 * @return a non translated name which is root name of the 
+	 * View and Toolbar jsp files used in this view. For example if the name
+	 * is toc the help system will look for the files tocView.jsp
+	 * and tocToolbar.jsp
+	 */
+    public abstract String getName();
+    
+    /**
+     * @return a URL path, relative to /help which is the 
+     * location of the jsp files in the advanced presentation
+     */
+    public abstract String getURL();
+    
+    /**
+     * @return a URL path, relative to /help which is the 
+     * location of the jsp files in the basic presentation
+     */
+    public String getBasicURL() {
+    	return getURL();
+    }
+    
+    /**
+     * @return a URL relative to /help which is the location
+     * of the 16x16 image icon which will appear in the tab
+     */
+    public abstract String getImageURL();
+    
+    /**
+     * @return a character which can be used as an accesskey to 
+     * navigate directly to this view, or (char)0 if no
+     * acceskey is specified
+     */
+    public abstract char getKey(); 
+    
+    /**
+     * Used to allow for views whose loading is deferred until 
+     * their contents are visible
+     * @return true if this view has deferred loading
+     */
+    public boolean isDeferred() {
+    	return false;
+    }
+    
+    /**
+     * A user visible title for the view which will appear in the tooltip
+     * @param locale the locale of the client
+     * @return the tooltip text to be used in this locale
+     */
+    public abstract String getTitle(Locale locale);
+
+    /**
+     * @return true if the view should be shown in the advanced presentation
+     */
+    public boolean isVisible() {
+        return true;
+    }
+    
+    /**
+     * @return true if the view should be shown in the basic presentation
+     */
+    public boolean isVisibleBasic() {
+        return true;
+    }
+    
+}
diff --git a/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/eclipse/configuration/config.ini b/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/configuration/config.ini
similarity index 100%
rename from eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/eclipse/configuration/config.ini
rename to eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/configuration/config.ini
diff --git a/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/eclipse/launch.ini b/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/eclipse/launch.ini
deleted file mode 100644
index a96f99e..0000000
--- a/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/eclipse/launch.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-# Eclipse Runtime Configuration Overrides
-# These properties are loaded prior to starting the framework and can also be used to override System Properties
-# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework
-# "*" can be used together with @null to clear System Properties that match a prefix name. 
-
-osgi.*=@null
-org.osgi.*=@null
-eclipse.*=@null
-
-osgi.parentClassloader=app
-osgi.contextClassLoaderParent=app
diff --git a/eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/launch.ini b/eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/launch.ini
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.servletbridge/templates/WEB-INF/eclipse/launch.ini
rename to eclipse/plugins/org.eclipse.help.webapp/web-archive/help/WEB-INF/launch.ini
diff --git a/eclipse/plugins/org.eclipse.help/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.help/.settings/org.eclipse.jdt.core.prefs
index c10aee7..ff74e74 100644
--- a/eclipse/plugins/org.eclipse.help/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.help/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,12 @@
-#Mon May 01 10:33:30 EDT 2006
+#Wed Oct 14 08:19:31 PDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
 org.eclipse.jdt.core.compiler.compliance=1.4
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
@@ -12,6 +14,7 @@ org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
 org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
@@ -23,8 +26,11 @@ org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
@@ -32,7 +38,10 @@ org.eclipse.jdt.core.compiler.problem.nullReference=ignore
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
@@ -45,14 +54,18 @@ org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.3
 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
diff --git a/eclipse/plugins/org.eclipse.help/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.help/META-INF/MANIFEST.MF
index 312821a..6d94edc 100644
--- a/eclipse/plugins/org.eclipse.help/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.help/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %help_plugin_name
 Bundle-SymbolicName: org.eclipse.help; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Activator: org.eclipse.help.internal.HelpPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -13,12 +13,18 @@ Export-Package: org.eclipse.help,
    org.eclipse.help.webapp,
    org.eclipse.ui.intro,
    org.eclipse.ua.tests,
-   org.eclipse.ui.cheatsheets",
+   org.eclipse.ui.cheatsheets,
+   org.eclipse.ua.tests.doc",
  org.eclipse.help.internal.context;
   x-friends:="org.eclipse.help.base,
    org.eclipse.help.ui,
    org.eclipse.ua.tests,
    org.eclipse.help.webapp",
+ org.eclipse.help.internal.criteria;
+  x-friends:="org.eclipse.help.base,
+   org.eclipse.help.webapp,
+   org.eclipse.ua.tests,
+   org.eclipse.help.ui",
  org.eclipse.help.internal.dynamic;
   x-friends:="org.eclipse.ua.tests,
    org.eclipse.help.ui,
@@ -41,7 +47,8 @@ Export-Package: org.eclipse.help,
   x-friends:="org.eclipse.help.base,
    org.eclipse.help.ui,
    org.eclipse.help.webapp,
-   org.eclipse.ua.tests",
+   org.eclipse.ua.tests,
+   org.eclipse.ua.tests.doc",
  org.eclipse.help.internal.util;
   x-friends:="org.eclipse.help.base,
    org.eclipse.help.ui,
@@ -49,8 +56,8 @@ Export-Package: org.eclipse.help,
    org.eclipse.ua.tests,
    org.eclipse.ui.intro.universal,
    org.eclipse.ui.intro"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)";visibility:=reexport
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)";visibility:=reexport
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text;version="3.8.0",
  javax.xml.parsers,
diff --git a/eclipse/plugins/org.eclipse.help/plugin.properties b/eclipse/plugins/org.eclipse.help/plugin.properties
index d75ae9d..4b5bfa5 100644
--- a/eclipse/plugins/org.eclipse.help/plugin.properties
+++ b/eclipse/plugins/org.eclipse.help/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,3 +15,5 @@ contexts_extension_point_name = Context Help
 content_producer_extension_point_name = Help Content Producer
 index_extension_point_name = Help Index Contributions
 content_extension_point_name = Help Content Extensions
+
+criteria_provider_extension_point_name = Help Criteria Provider
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help/plugin.xml b/eclipse/plugins/org.eclipse.help/plugin.xml
index 4d2823b..bfd862f 100644
--- a/eclipse/plugins/org.eclipse.help/plugin.xml
+++ b/eclipse/plugins/org.eclipse.help/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -17,7 +18,8 @@
    <extension-point id="contexts" name="%contexts_extension_point_name" schema="schema/contexts.exsd"/>
    <extension-point id="index" name="%index_extension_point_name" schema="schema/index.exsd"/>
    <extension-point id="toc" name="%toc_extension_point_name" schema="schema/toc.exsd"/>
-
+   <extension-point id="criteriaDefinition" name="%criteriaDefinition_extension_point_name" schema="schema/criteriaDefinition.exsd"/>
+   <extension-point id="criteriaProvider" name="%criteria_provider_extension_point_name" schema="schema/criteriaProvider.exsd"/>
    <extension
          point="org.eclipse.help.contentExtension">
       <contentExtensionProvider class="org.eclipse.help.internal.extension.ContentExtensionFileProvider"/>
@@ -38,4 +40,11 @@
       <tocProvider class="org.eclipse.help.internal.toc.TocFileProvider"/>
    </extension>
    
+    <extension
+         point="org.eclipse.help.criteriaDefinition">
+      <criteriaDefinitionProvider
+            class="org.eclipse.help.internal.criteria.CriteriaDefinitionFileProvider">
+      </criteriaDefinitionProvider>
+   </extension>
+   
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.help/preferences.ini b/eclipse/plugins/org.eclipse.help/preferences.ini
index 8f4b0d1..e85af26 100644
--- a/eclipse/plugins/org.eclipse.help/preferences.ini
+++ b/eclipse/plugins/org.eclipse.help/preferences.ini
@@ -4,3 +4,13 @@
 # as /pluginId/path/to/toc.xml. This option is deprecated, 
 # use org.eclipse.help.base.HELP_DATA instead
 baseTOCS= 
+
+# Filtering by criteria
+# Set true to enable criteria filtering, otherwise set false
+enableCriteria=false
+
+# List all the supported criteria names, separated by comma 
+supportedCriteria= 
+
+# Apply filtering by enablement to the infocenter
+filterInfocenter=false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help/schema/criteriaDefinition.exsd b/eclipse/plugins/org.eclipse.help/schema/criteriaDefinition.exsd
new file mode 100644
index 0000000..f57f3fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/schema/criteriaDefinition.exsd
@@ -0,0 +1,182 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help" id="criteriaDefinition" name="Criteria Definition"/>
+      </appInfo>
+      <documentation>
+         For registering a criteria definition for contributed help content.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="criteriaDefinition"/>
+            <element ref="criteriaDefinitionProvider"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="criteriaDefinition">
+      <annotation>
+         <documentation>
+            A criteria contribution made by supplying an XML file
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="file" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the name of the criteria definition file which contains the list of  criteria id and name of the help content.
+<p>
+<i><b>Configuration Markup for criteria definition file:</b></i>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT criteriaDefinition (criterion)* ></tt><br>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT criterion (criterion-value)* ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST criterion id CDATA #REQUIRED ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST criterion name CDATA #REQUIRED ></tt><br>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT criterion-value EMPTY ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST criterion-value id CDATA #REQUIRED ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST criterion-value name CDATA #REQUIRED ></tt><br>
+</p>
+<p><b>The criteriaDefinition element</b>
+<p>The criteriaDefinition element represents an instance of criteria definition. CriteriaDefinition consists of criterion, each of them corresponds to a particular id and its name.
+<p><b>The criterion element</b>
+<p>The criterion element represents a criterion. Each criterion may contain several criterion-value which associated with the criterion. 
+<p><b>The criterion-value element</b>
+<p>The criterion-value element provides value to the criterion category. It also has id and name associated with it.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="resource"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="criteriaDefinitionProvider">
+      <annotation>
+         <documentation>
+            (<b>since 3.5</b>) an criteria definition contribution made by plugging in code
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the implementation class for the criteria definition provider.  This class must implement the <samp>org.eclipse.help.AbstractCriteriaDefinitionProvider</samp> interface.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.AbstractCriteriaDefinitionProvider:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of using the criteria definition extension point.
+
+<p>(in file <tt>plugin.xml</tt>) 
+<pre>
+ <extension point="org.eclipse.help.criteriaDefinition">
+     <criteriaDefinition file="criteria.xml"/>
+ </extension>
+</pre>
+
+<p>(in file <tt>criteria.xml</tt>)
+<blockquote><tt>&lt;criteriaDefinition></tt><br>
+    <tt>&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion id="version" name ="Version"></tt><br>
+        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion-value id="1.0" name ="1.0"/></tt><br>
+        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion-value id="2.0" name ="2.0"/></tt><br>
+    <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/criterion></tt><br>
+    <tt>&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion id="product" name ="Product"></tt><br>
+        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion-value id="DB2" name ="DB2"/></tt><br>
+        <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;criterion-value id="WAS" name ="WAS"/></tt><br>
+    <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/criterion></tt><br>        
+<tt>&lt;/criteriaDefinition></tt><br></blockquote>
+
+<p><b><em>Internationalization</em></b> The criteria definition XML files can be translated and the resulting copy should be placed in nl/&lt;language>/&lt;country> or nl/&lt;language> directory.  The &lt;language> and &lt;country> stand for two letter language and country codes as used in locale codes.  For example, Traditional Chinese translations should be placed in the nl/zh/TW directory.  The nl/&lt;language>/&lt;country> directory has a higher priority than nl/&lt;language>.  Only if no file is found in the nl/&lt;language>/&lt;country>, the file residing in nl/&lt;language> will be used. The root directory of a plugin will be searched last.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         An implementation of <samp>org.eclipse.help.AbstractCriteriaDefinitionProvider</samp> must be supplied if a <samp>criteriaDefinitionProvider</samp> is used.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         The default implementation of the help system UI supplied with the Eclipse platform fully supports the <samp>criteriaDefinition</samp> extension point.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help/schema/criteriaProvider.exsd b/eclipse/plugins/org.eclipse.help/schema/criteriaProvider.exsd
new file mode 100644
index 0000000..ea0d57f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/schema/criteriaProvider.exsd
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.help" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.help" id="criteriaProvider" name="Help Criteria Provider"/>
+      </appInfo>
+      <documentation>
+         Support for defining criteria independent of the table of contents.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="provider"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="provider">
+      <annotation>
+         <documentation>
+            Defines a criteria  provider class
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  A class which contains methods to define criteria values associated with a topic or table of contents.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.help.AbstractCriteriaProvider:"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.5
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         Uses class AbstractCriteriaProvider to allow for criteria to be defined dynamically. Criteria defined using this extension point will be merged with those defined in the table of contents and if multiple criteria providers are defined each will contribute to the criteria of an ITopic or IToc.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.help/schema/index.exsd b/eclipse/plugins/org.eclipse.help/schema/index.exsd
index 6480148..f2c0641 100644
--- a/eclipse/plugins/org.eclipse.help/schema/index.exsd
+++ b/eclipse/plugins/org.eclipse.help/schema/index.exsd
@@ -2,15 +2,20 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.help" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.help" id="index" name="Keyword Index"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          For registering a keyword index for contributed help content.
       </documentation>
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <choice minOccurs="1" maxOccurs="unbounded">
             <element ref="index"/>
@@ -35,9 +40,9 @@
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -56,15 +61,27 @@
                   the name of the index file which contains the list of keywords and related topics of the help content.
 <p>
 <i><b>Configuration Markup for index file:</b></i>
+</p>
 <p>
 <tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT index (entry)* ></tt><br>
-<br>
-<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT entry (entry | topic)* ></tt><br>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT entry (entry | topic |see)* ></tt><br>
 <tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST entry keyword CDATA #REQUIRED ></tt><br>
-<br>
+</p>
+<p>
 <tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT topic EMPTY ></tt><br>
 <tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic href CDATA #REQUIRED ></tt><br>
 <tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic title CDATA #IMPLIED ></tt><br>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT see (subpath)* ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST see keyword CDATA #REQUIRED ></tt><br>
+</p>
+<p>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT subpath EMPTY ></tt><br>
+<tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST subpath keyword CDATA #IMPLIED ></tt><br>
+</p>
 <p><b>The index element</b>
 <p>The index element represents an instance of index. Index consists of entries, each of them corresponds to a particular keyword. All contributed indexes are merged to one master index which the Help System provides to the user. When index is built, entries are appended in alphabetical order.
 <p><b>The entry element</b>
@@ -77,10 +94,12 @@ topics are associated with the single keyword. If the attribute is not
 specified, the title comes from the label attribute if present otherwise from a TOC which owns the link. If the link does not
 belong to any TOC, the title or label attribute must be specified, or else the title
 becomes undefined.
+<p><b>The see element</b>
+The see element represents a synonym to an entry in the index. Clicking on a see link will cause the index to navigate to the index entry for which this is a synonym. The keyword attribute represents the top level element for the synonym. The <b>subpath</b> elements are used only if the synonym is not at the top level of the index and represent additional components of the synonym path.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -98,27 +117,27 @@ becomes undefined.
                <documentation>
                   the implementation class for the index provider.  This class must implement the <samp>org.eclipse.help.AbstractIndexProvider</samp> interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.help.AbstractIndexProvider"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="since"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          3.2
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of using the index extension point.
 
@@ -172,28 +191,27 @@ becomes undefined.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          An implementation of <samp>org.eclipse.help.AbstractIndexProvider</samp> must be supplied if a <samp>indexProvider</samp> is used.
       </documentation>
    </annotation>
 
-
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The default implementation of the help system UI supplied with the Eclipse platform fully supports the <samp>index</samp> extension point.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2006 Intel Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
diff --git a/eclipse/plugins/org.eclipse.help/schema/toc.exsd b/eclipse/plugins/org.eclipse.help/schema/toc.exsd
index 10c0d77..2c72d26 100644
--- a/eclipse/plugins/org.eclipse.help/schema/toc.exsd
+++ b/eclipse/plugins/org.eclipse.help/schema/toc.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.help" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.help" id="toc" name="Table of Contents (TOC)"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          For registering an online help contribution for an individual plug-in.
 
@@ -26,9 +26,9 @@ point and specify TOC file(s).</li>
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <choice minOccurs="1" maxOccurs="unbounded">
@@ -56,9 +56,9 @@ point and specify TOC file(s).</li>
                <documentation>
                   
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -81,10 +81,14 @@ point and specify TOC file(s).</li>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST toc link_to CDATA #IMPLIED ></tt>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST toc label CDATA #REQUIRED ></tt>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST toc topic CDATA #IMPLIED ></tt>
+<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST toc sort CDATA #IMPLIED ></tt>
+<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST toc icon CDATA #IMPLIED ></tt>
 <p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT topic (topic | anchor | link )*
 ></tt>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic label CDATA #REQUIRED ></tt>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic href CDATA #IMPLIED ></tt>
+<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic sort CDATA #IMPLIED ></tt>
+<br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST topic icon CDATA #IMPLIED ></tt>
 <p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT anchor EMPTY ></tt>
 <br><tt>&nbsp;&nbsp;&nbsp; &lt;!ATTLIST anchor id ID&nbsp; #REQUIRED ></tt>
 <p><tt>&nbsp;&nbsp;&nbsp; &lt;!ELEMENT link EMPTY ></tt>
@@ -121,6 +125,9 @@ file as well.
 /></tt>
 <br><tt>&nbsp; ...</tt>
 <br><tt>&lt;/topic></tt>
+<p> If the sort attribute is true child topics will be sorted alphabetically.</p><p> The
+optional icon attribute allows the use of a different icon as defined by a 
+&lt; tocIcon &gt; element in an org.eclipse.help.toc extension.</p>
 <p><b>The link element</b>
 <p>The link element allows to link Table of Contents defined in another
 toc file.&nbsp; All the topics from the toc file specified in the toc attribute
@@ -145,8 +152,11 @@ an anchor as follows:
 <p><b>The toc element</b>
 <p>The toc element is a Table of Contents that groups topics and other
 elements defined in this file.&nbsp; The label identifies the table of
-contents to the user, when it is displayed to the user.&nbsp; The optional topic
-attribute is the path to a topic file describing the TOC.&nbsp; The optional
+contents to the user, when it is displayed to the user.&nbsp;</p><p> The optional topic
+attribute is the path to a topic file describing the TOC.&nbsp; </p>
+<p> If the sort attribute is true child topics will be sorted alphabetically.</p><p> The
+optional icon attribute allows the use of a different icon as defined by a 
+&lt; tocIcon &gt; element in an org.eclipse.help.toc extension.</p><p>The optional
 link_to attribute allows for linking toc from this file into another toc
 file being higher in the navigation hierarchy.&nbsp; The value of the link_to
 attribute must specify an anchor in another toc file. To link toc from
@@ -163,9 +173,9 @@ API"/></tt>
 </p>
 <br>
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="primary" type="boolean" use="default" value="false">
@@ -205,9 +215,9 @@ or not primary and intended to be integrated into another table of contents.
                <documentation>
                   the implementation class for the toc provider.  This class must implement the <samp>org.eclipse.help.AbstractTocProvider</samp> interface.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.help.AbstractTocProvider"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -249,9 +259,9 @@ or not primary and intended to be integrated into another table of contents.
                <documentation>
                   The path of an icon to be used for a toc or topic whose chidren have been expanded.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="closedIcon" type="string">
@@ -259,9 +269,9 @@ or not primary and intended to be integrated into another table of contents.
                <documentation>
                   The path of an icon to be used for a toc or topic whose chidren have been expanded. If no provided openIcon will be used.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="leafIcon" type="string">
@@ -269,9 +279,9 @@ or not primary and intended to be integrated into another table of contents.
                <documentation>
                   The path of an icon to be used for a toc or topic without children. If not provided openIcon will be used.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="altText" type="string">
@@ -279,18 +289,18 @@ or not primary and intended to be integrated into another table of contents.
                <documentation>
                   Text that will be used in the "alt" attribute for the img tag in the web presentation.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of using the <samp>toc</samp> extension point.
 
@@ -378,9 +388,9 @@ to plugin directory.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          An implementation of <samp>org.eclipse.help.AbstractTocProvider</samp> must be supplied if a <samp>tocProvider</samp> is used.
       </documentation>
@@ -388,18 +398,18 @@ to plugin directory.
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The default implementation of the help system UI supplied with the Eclipse platform fully supports this extension point.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2000, 2006 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made 
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaDefinitionProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaDefinitionProvider.java
new file mode 100644
index 0000000..9302110
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaDefinitionProvider.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help;
+
+/**
+ * An <code>AbstractCriteriaDefinitionProvider</code> is a mechanism to provide display name
+ * for criteria attached to toc or topic. <code>AbstractCriteriaDefinitionProvider</code>s must be
+ * registered via the <code>org.eclipse.help.criteriaDefinition</code> extension point.
+ * 
+ * @since 3.5
+ */
+public abstract class AbstractCriteriaDefinitionProvider {
+
+	/**
+	 * Returns all criteria definition contributions for this provider. Providers
+	 * are free to provide any number of contributions (zero or more).
+	 * 
+	 * @param locale the locale for which to get contributions
+	 * @return all the criteria definition contributions for this provider
+	 */
+	public abstract ICriteriaDefinitionContribution[] getCriteriaDefinitionContributions(String locale);
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaProvider.java
new file mode 100644
index 0000000..dff4d23
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractCriteriaProvider.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+
+/**
+ * <code>AbstractCriteriaProvider</code> is a mechanism for assigning criteria to 
+ * <code>ITopic</code> and <code>IToc</code> elements independent of a table of contents
+ * file. The criteria defined by this class are merged with those from the table of contents 
+ * or from other criteria providers by creating a union of defined criteria and
+ * defined criteria values.
+ * @since 3.5
+ */
+public abstract class AbstractCriteriaProvider {
+	
+	/**
+	 * Gets criteria for a topic
+	 * @param topic a topic from a table of contents or index
+	 * @return an array of criteria which will be added to those already defined in
+	 * the table of contents file
+	 */
+	public abstract ICriteria[] getCriteria(ITopic topic);
+
+	/**
+	 * Gets criteria for a table of contents
+	 * @param toc a table of contents
+	 * @return an array of criteria which will be added to those already defined in
+	 * the table of contents file
+	 */
+	public abstract ICriteria[] getCriteria(IToc toc);
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractTocProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractTocProvider.java
index 34f58aa..3f28e05 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractTocProvider.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/AbstractTocProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ import org.eclipse.help.internal.HelpPlugin;
  * @since 3.3
  */
 public abstract class AbstractTocProvider {
-
+	
 	/**
 	 * Returns all toc contributions for this provider. Providers
 	 * are free to provide any number of contributions (zero or more).
@@ -39,4 +39,27 @@ public abstract class AbstractTocProvider {
 		// will force a reload next time around
 		HelpPlugin.getTocManager().clearCache();
 	}
+	
+	/**
+	 * Default priority for toc providers that do not override getPriority()
+	 * @since 3.5
+	 */
+	public static final int DEFAULT_PRIORITY=10;
+	
+	/**
+	 * Priority for toc files read from the local file system
+	 * @since 3.5
+	 */
+	public static final int TOC_FILE_PRIORITY=20;
+	
+	/**
+	 * If two toc contributions have the same id, the one with higher priority will be shown.
+	 * For example, a provider with priority 1 will take precedence over a provider with priority 2.
+	 * @return the priority of this provider
+	 * @since 3.5
+	 */
+	public int getPriority()
+	{
+		return DEFAULT_PRIORITY;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteria.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteria.java
new file mode 100644
index 0000000..9e2fbd5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteria.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * A directive indicating the criteria information of a Toc or Topic described in xml
+ * 
+ * @since 3.5
+ */
+
+public interface ICriteria extends IUAElement {
+
+	/**
+	 * Returns the name of the criteria element, e.g.
+	 * "Platform"
+	 * 
+	 * @return the name of the criteria element
+	 */
+	public String getName();
+	
+	/**
+	 * Returns the value of the criteria element, e.g.
+	 * "AIX,Windows"
+	 * 
+	 * @return the value of the criteria element
+	 */
+	public String getValue();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinition.java
new file mode 100644
index 0000000..a0c68e0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinition.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * ICriteriaDefinition represents the criteria definition of one plug-in.
+ * It contains criterion definitions, each of them is criterion id and its
+ * display name, and criterion values id and their display names. 
+ * 
+ * @since 3.5
+ */
+
+public interface ICriteriaDefinition extends IUAElement{
+
+	/**
+	 * Obtains the criterion definitions contained in the definition file.
+	 * 
+	 * @return Array of ICriterionDefinition
+	 */
+	ICriterionDefinition[] getCriterionDefinitions();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinitionContribution.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinitionContribution.java
new file mode 100644
index 0000000..6758855
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriteriaDefinitionContribution.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * Represents criteria definition contribution
+ * 
+ * @since 3.5
+ */
+
+public interface ICriteriaDefinitionContribution {
+
+	/**
+	 * Returns a unique identifier for this criteria definition.
+	 * 
+	 * @return the contribution's unique identifier
+	 */
+	public String getId();
+
+	/**
+	 * Returns this contributions criteria definition.
+	 * 
+	 * @return the criteria definition data for this contribution
+	 */
+	public ICriteriaDefinition getCriteriaDefinition();
+
+	/**
+	 * Returns the locale for this contribution.
+	 * 
+	 * @return the contribution's locale
+	 */
+	public String getLocale();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java
new file mode 100644
index 0000000..69543a1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionDefinition.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * ICriterionDefinition represents a single criterion definition of the help content.
+ * It includes criterion id and its related values id, and also their display names.
+ * 
+ * @since 3.5
+ */
+public interface ICriterionDefinition extends IUAElement{
+
+    /**
+     * Returns the id that this criterion definition is associated with
+     *
+     * @return the id
+     */
+    public String getId();
+
+    /**
+     * Obtains the display name associated with this criterion definition.
+     * 
+     * @return the name
+     */
+    public String getName();
+
+    /**
+     * Obtains the criterion value definitions contained in the criterion.
+     * 
+     * @return array of ICriterionValueDefinition
+     */
+    public ICriterionValueDefinition[] getCriterionValueDefinitions();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java
new file mode 100644
index 0000000..5cb9cde
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ICriterionValueDefinition.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * ICriterionValueDefinition represents one criterion value definition of one criterion.
+ * It includes value id and its display name.
+ * 
+ * @since 3.5
+ */
+public interface ICriterionValueDefinition extends IUAElement {
+
+    /**
+     * Returns the id that this criterion value
+     *
+     * @return the id
+     */
+    public String getId();
+
+    /**
+     * Obtains the display name associated with this criterion value.
+     * 
+     * @return the name
+     */
+    public String getName();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java
new file mode 100644
index 0000000..25cb737
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexEntry2.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help;
+
+/**
+ * IIndexEntry2 is an index entry which may have see elements as children
+ * 
+ * @since 3.5
+ */
+public interface IIndexEntry2 extends IIndexEntry {
+
+    /**
+     * Obtains see references for this entry
+     * 
+     * @return array of ITopic
+     */
+    public IIndexSee[] getSees();
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSee.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSee.java
new file mode 100644
index 0000000..3234291
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSee.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help;
+
+/**
+ * An entry that represents a see also node in the index. A see
+ * also node must always reference another node.
+ * 
+ * @since 3.5
+ */
+public interface IIndexSee extends IUAElement {
+
+	public String getKeyword(); 
+	
+	/**
+	 * Determines whether the text to be displayed is "see" or "see also"
+	 * @return true if this is a "see also", false if this is a "see"
+	 */
+	public boolean isSeeAlso();
+	
+	/**
+	 * 
+	 * @return an array of length zero if this see element references an element
+	 * at the top level of the index, otherwise a list of entries which represent keywords
+	 * at the second and lower levels of the index tree.
+	 */
+	public IIndexSubpath[] getSubpathElements();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSubpath.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSubpath.java
new file mode 100644
index 0000000..3aa64d3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IIndexSubpath.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help;
+
+/**
+ * A directive indicating the content at the given path should be included in
+ * this document, and replace this node.
+ * 
+ * @since 3.5
+ */
+public interface IIndexSubpath extends IUAElement {
+
+	/**
+	 * @return A segment of the keyword path of a seeAlso element
+	 */
+	public String getKeyword();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IToc2.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IToc2.java
new file mode 100644
index 0000000..1e3d27b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/IToc2.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+/**
+ * <code>IToc2</code> extends <code>IToc </code> by adding methods to support functionality
+ * for criteria, topic sorting and custom icons
+ * @since 3.5
+ */
+public interface IToc2 extends IToc{
+
+	/**
+	 * Return the criteria information of this toc.
+	 * 
+	 * @return array of CriterionResource
+	 */
+	public ICriteria[] getCriteria();
+	
+	/**
+	 * Toc elements can have non standard icons which are declared using a
+	 * tocIcon element in the org.eclipse.help.toc extension point 
+	 * @return NULL if the standard icons are to be used, otherwise the name of
+	 * an icon declared in an org.eclipse.help.toc extension 
+	 */
+	public String getIcon();
+	
+	/**
+	 * Allows child elements to be sorted alphabetically regardless of their actual
+	 * order in the list of children.
+	 * @return true if the children should be sorted alphabetically
+	 */
+	public boolean isSorted();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ITopic2.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ITopic2.java
new file mode 100644
index 0000000..9ccc9c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/ITopic2.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help;
+
+
+/**
+ * <code>ITopic2</code> extends <code>ITopic</code> by adding methods to support functionality
+ * for criteria, topic sorting and custom icons
+ * 
+ * @since 3.5
+ */
+public interface ITopic2 extends ITopic{
+
+	/**
+	 * Return the criteria information of topic.
+	 * @return array of CriterionResource
+	 */
+	public ICriteria[] getCriteria();
+	
+	/**
+	 * Toc elements can have non standard icons which are declared using a
+	 * tocIcon element in the org.eclipse.help.toc extension point 
+	 * @return NULL if the standard icons are to be used, otherwise the name of
+	 * an icon declared in an org.eclipse.help.toc extension 
+	 */
+	public String getIcon();
+	
+	/**
+	 * Allows child elements to be sorted alphabetically regardless of their actual
+	 * order in the list of children.
+	 * @return true if the children should be sorted alphabetically
+	 */
+	public boolean isSorted();
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/HelpPlugin.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/HelpPlugin.java
index dce0b5f..9052c85 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/HelpPlugin.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/HelpPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.help.internal.context.ContextManager;
+import org.eclipse.help.internal.criteria.CriteriaManager;
 import org.eclipse.help.internal.extension.ContentExtensionManager;
 import org.eclipse.help.internal.index.IndexManager;
 import org.eclipse.help.internal.toc.TocManager;
@@ -37,11 +38,13 @@ public class HelpPlugin extends Plugin {
 	public static boolean DEBUG_SEARCH = false;
 	public static boolean DEBUG_TOC = false;
 	public static boolean DEBUG_INDEX = false;
+	public static boolean DEBUG_CRITERIA = false;
 	
 	public final static String HELP_DATA_KEY = "HELP_DATA"; //$NON-NLS-1$
 	public final static String BASE_TOCS_KEY = "baseTOCS"; //$NON-NLS-1$
 	public final static String IGNORED_TOCS_KEY = "ignoredTOCS"; //$NON-NLS-1$
 	public final static String IGNORED_INDEXES_KEY = "ignoredIndexes"; //$NON-NLS-1$
+	public final static String FILTER_INFOCENTER_KEY = "filterInfocenter"; //$NON-NLS-1$
 
 	private static HelpPlugin plugin;
 	private static Object tocManagerCreateLock = new Object();
@@ -50,6 +53,7 @@ public class HelpPlugin extends Plugin {
 	private ContextManager contextManager;
 	private ContentExtensionManager contentExtensionManager;
 	private IndexManager indexManager;
+	private CriteriaManager criteriaManager;
 	private IHelpProvider helpProvider;
 	private File configurationDirectory;
 
@@ -122,6 +126,12 @@ public class HelpPlugin extends Plugin {
 		return getDefault().indexManager;
 	}
 
+	public static CriteriaManager getCriteriaManager() {
+		if (getDefault().criteriaManager == null)
+			getDefault().criteriaManager = new CriteriaManager();
+		return getDefault().criteriaManager;
+	}
+	
 	/*
 	 * Returns the provider responsible for serving help documents.
 	 */
@@ -161,7 +171,8 @@ public class HelpPlugin extends Plugin {
 			DEBUG_CONTEXT = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/context")); //$NON-NLS-1$ //$NON-NLS-2$
 			DEBUG_SEARCH = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/search")); //$NON-NLS-1$ //$NON-NLS-2$
 			DEBUG_TOC = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/toc")); //$NON-NLS-1$ //$NON-NLS-2$		
-			DEBUG_INDEX = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/index")); //$NON-NLS-1$ //$NON-NLS-2$			
+			DEBUG_INDEX = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/index")); //$NON-NLS-1$ //$NON-NLS-2$	
+			DEBUG_CRITERIA = "true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID + "/debug/criteria")); //$NON-NLS-1$ //$NON-NLS-2$	
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/Topic.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/Topic.java
index 1e6125e..538dd7b 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/Topic.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/Topic.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,15 +10,18 @@
  *******************************************************************************/
 package org.eclipse.help.internal;
 
+import org.eclipse.help.ICriteria;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.ITopic2;
 import org.w3c.dom.Element;
 
-public class Topic extends UAElement implements ITopic {
+public class Topic extends UAElement implements ITopic2 {
 
 	public static final String NAME = "topic"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_HREF = "href"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_LABEL = "label"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_SORT= "sort"; //$NON-NLS-1$
 	
 	public Topic() {
 		super(NAME);
@@ -30,10 +33,15 @@ public class Topic extends UAElement implements ITopic {
 		setLabel(src.getLabel());
 		appendChildren(src.getChildren());
 	}
+
 	public String getIcon(){
 		return getAttribute(ATTRIBUTE_ICON);
 	}
 	
+	public boolean isSorted(){
+		return "true".equalsIgnoreCase(getAttribute(ATTRIBUTE_SORT)); //$NON-NLS-1$
+	}
+	
 	public Topic(Element src) {
 		super(src);
 	}
@@ -50,6 +58,10 @@ public class Topic extends UAElement implements ITopic {
 		return (ITopic[])getChildren(ITopic.class);
 	}
 	
+	public ICriteria[] getCriteria() {
+		return (ICriteria[]) getChildren(ICriteria.class);
+	}
+	
 	public void setHref(String href) {
 		setAttribute(ATTRIBUTE_HREF, href);
 	}
@@ -57,4 +69,5 @@ public class Topic extends UAElement implements ITopic {
 	public void setLabel(String label) {
 		setAttribute(ATTRIBUTE_LABEL, label);
 	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
index 11b8321..0e69cd9 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.help.internal;
 import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.List;
+
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -23,10 +24,10 @@ import org.eclipse.core.expressions.ExpressionConverter;
 import org.eclipse.core.expressions.ExpressionTagNames;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.help.HelpSystem;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.dynamic.FilterResolver;
 import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
+import org.eclipse.help.internal.util.ProductPreferences;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -241,7 +242,7 @@ public class UAElement implements IUAElement {
 	}
 	
 	public boolean isEnabled(IEvaluationContext context) {
-		if (HelpSystem.isShared()) {
+		if (!ProductPreferences.useEnablementFilters()) {
 			return true;
 		}
 		if (src != null) {
@@ -261,6 +262,7 @@ public class UAElement implements IUAElement {
 		    try {
 				return enablementExpression.evaluate(context) == EvaluationResult.TRUE;
 			} catch (CoreException e) {
+				return false;
 			}
         }
 		return true;
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElementFactory.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElementFactory.java
index fad3437..0de68ff 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElementFactory.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/UAElementFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,17 +19,29 @@ import org.eclipse.help.IAnchor;
 import org.eclipse.help.ICommandLink;
 import org.eclipse.help.IContentExtension;
 import org.eclipse.help.IContext;
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.ICriteriaDefinition;
+import org.eclipse.help.ICriterionDefinition;
+import org.eclipse.help.ICriterionValueDefinition;
 import org.eclipse.help.IInclude;
 import org.eclipse.help.IIndex;
 import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IIndexSubpath;
 import org.eclipse.help.ILink;
 import org.eclipse.help.IToc;
 import org.eclipse.help.ITopic;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.context.Context;
+import org.eclipse.help.internal.criteria.Criteria;
+import org.eclipse.help.internal.criteria.CriteriaDefinition;
+import org.eclipse.help.internal.criteria.CriterionDefinition;
+import org.eclipse.help.internal.criteria.CriterionValueDefinition;
 import org.eclipse.help.internal.extension.ContentExtension;
 import org.eclipse.help.internal.index.Index;
 import org.eclipse.help.internal.index.IndexEntry;
+import org.eclipse.help.internal.index.IndexSee;
+import org.eclipse.help.internal.index.IndexSubpath;
 import org.eclipse.help.internal.toc.Link;
 import org.eclipse.help.internal.toc.Toc;
 import org.w3c.dom.Element;
@@ -47,10 +59,16 @@ public class UAElementFactory {
 		{ IAnchor.class, Anchor.class },
 		{ IInclude.class, Include.class },
 		{ ILink.class, Link.class },
+		{ IIndexSee.class, IndexSee.class },
+		{ IIndexSubpath.class, IndexSubpath.class },
 		{ IToc.class, Toc.class },
 		{ ICommandLink.class, CommandLink.class },
 		{ IIndex.class, Index.class },
 		{ IContentExtension.class, ContentExtension.class },
+		{ ICriteria.class, Criteria.class },
+		{ ICriteriaDefinition.class, CriteriaDefinition.class },
+		{ ICriterionDefinition.class, CriterionDefinition.class },
+		{ ICriterionValueDefinition.class, CriterionValueDefinition.class },
 	};
 
 	private static final Map classByElementName;
@@ -66,6 +84,12 @@ public class UAElementFactory {
 		classByElementName.put(Context.NAME, Context.class);
 		classByElementName.put(CommandLink.NAME, CommandLink.class);
 		classByElementName.put(Link.NAME, Link.class);
+		classByElementName.put(IndexSee.NAME, IndexSee.class);
+		classByElementName.put(IndexSubpath.NAME, IndexSubpath.class);
+		classByElementName.put(Criteria.NAME, Criteria.class);
+		classByElementName.put(CriteriaDefinition.NAME, CriteriaDefinition.class);
+		classByElementName.put(CriterionDefinition.NAME, CriterionDefinition.class);
+		classByElementName.put(CriterionValueDefinition.NAME, CriterionValueDefinition.class);
 		classByElementName.put(ContentExtension.NAME_CONTRIBUTION, ContentExtension.class);
 		classByElementName.put(ContentExtension.NAME_CONTRIBUTION_LEGACY, ContentExtension.class);
 		classByElementName.put(ContentExtension.NAME_REPLACEMENT, ContentExtension.class);
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
index ce99cff..037d03f 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextFileProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,7 +150,7 @@ public class ContextFileProvider extends AbstractContextProvider {
 	 * Returns the context definitions for the given plug-in and locale,
 	 * as a mapping of short IDs to Context objects (shortContextId -> Context).
 	 */
-	private Map[] getPluginContexts(String pluginId, String locale) {
+	public Map[] getPluginContexts(String pluginId, String locale) {
 		List maps = new ArrayList();
 		Map associations = getPluginAssociations();
 		ContextFile[] descriptors = (ContextFile[])associations.get(pluginId);
@@ -196,39 +196,10 @@ public class ContextFileProvider extends AbstractContextProvider {
 			// load the file
 			InputStream in = ResourceLocator.openFromPlugin(descriptor.getBundleId(), descriptor.getFile(), locale);
 	    	if (in != null) {
-				if (reader == null) {
-					reader = new DocumentReader();
-				}
-				UAElement root = reader.read(in);
-				if ("contexts".equals(root.getElementName())) { //$NON-NLS-1$
-					// process dynamic content
-					if (processor == null) {
-						processor = new DocumentProcessor(new ProcessorHandler[] {
-							new ValidationHandler(getRequiredAttributes()),
-							new NormalizeHandler(),
-							new IncludeHandler(reader, locale),
-							new ExtensionHandler(reader, locale)
-						});
-					}
-					processor.process(root, '/' + descriptor.getBundleId() + '/' + descriptor.getFile());
-					
-					// build map
-					IUAElement[] children = root.getChildren();
-					Map contexts = new HashMap();
-					for (int i=0;i<children.length;++i) {
-						if (children[i] instanceof Context) {
-							Context context = (Context)children[i];
-							String id = context.getId();
-							if (id != null) {
-								contexts.put(id, context);
-							}
-						}
-					}
-					return contexts;
-				}
-				else {
-					String msg = "Required root element \"contexts\" missing from context-sensitive help file \"/" + descriptor.getBundleId() + '/' + descriptor.getFile() + "\" (skipping)"; //$NON-NLS-1$ //$NON-NLS-2$
-					HelpPlugin.logError(msg);
+				try {
+					return loadContextsFromInputStream(descriptor, locale, in);
+				} finally {
+					in.close();
 				}
 	    	}
 	    	else {
@@ -236,12 +207,70 @@ public class ContextFileProvider extends AbstractContextProvider {
 	    	}
 		}
 		catch (Throwable t) {
-			String msg = "Error reading context-sensitive help file /\"" + descriptor.getBundleId() + '/' + descriptor.getFile() + "\" (skipping file)"; //$NON-NLS-1$ //$NON-NLS-2$
+			String msg = "Error reading context-sensitive help file /\"" + getErrorPath(descriptor, locale) + "\" (skipping file)"; //$NON-NLS-1$ //$NON-NLS-2$
 			HelpPlugin.logError(msg, t);
 		}
 		return null;
 	}
+
+
+	private Map loadContextsFromInputStream(ContextFile descriptor, String locale, InputStream in)
+			throws Exception {
+		if (reader == null) {
+			reader = new DocumentReader();
+		}
+		UAElement root = reader.read(in);
+		if ("contexts".equals(root.getElementName())) { //$NON-NLS-1$
+			// process dynamic content
+			if (processor == null) {
+				processor = new DocumentProcessor(new ProcessorHandler[] {
+					new ValidationHandler(getRequiredAttributes()),
+					new NormalizeHandler(),
+					new IncludeHandler(reader, locale),
+					new ExtensionHandler(reader, locale)
+				});
+			}
+			processor.process(root, '/' + descriptor.getBundleId() + '/' + descriptor.getFile());
+			
+			// build map
+			IUAElement[] children = root.getChildren();
+			Map contexts = new HashMap();
+			for (int i=0;i<children.length;++i) {
+				if (children[i] instanceof Context) {
+					Context context = (Context)children[i];
+					String id = context.getId();
+					if (id != null) {
+						Object existingContext =  contexts.get(id);
+						if (existingContext==null)
+						    contexts.put(id, context);
+						else
+						{
+							((Context)existingContext).mergeContext(context);	
+
+							if (HelpPlugin.DEBUG_CONTEXT) 
+							{
+								String error = "Context help ID '"+id+"' is found multiple times in file '"+descriptor.getBundleId()+'/'+descriptor.getFile()+"'\n"+ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+									" Description 1: "+((Context)existingContext).getText()+'\n'+ //$NON-NLS-1$
+									" Description 2: "+context.getText(); //$NON-NLS-1$
+								System.out.println(error);
+							}
+						}
+					}
+				}
+			}
+			return contexts;
+		}
+		else {
+			String msg = "Required root element \"contexts\" missing from context-sensitive help file \"/" + getErrorPath(descriptor, locale) + "\" (skipping)"; //$NON-NLS-1$ //$NON-NLS-2$
+			HelpPlugin.logError(msg);
+		}
+		return null;
+	}
 	
+	private String getErrorPath(ContextFile descriptor, String locale) {
+		return ResourceLocator.getErrorPath(descriptor.getBundleId(), descriptor.getFile(), locale);
+	}
+
 	private Map getRequiredAttributes() {
 		if (requiredAttributes == null) {
 			requiredAttributes = new HashMap();
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextManager.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextManager.java
index dfd3a45..a9bffe7 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextManager.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/context/ContextManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.help.internal.context;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -34,45 +35,24 @@ public class ContextManager {
 	private static final String ATTRIBUTE_NAME_CLASS = "class"; //$NON-NLS-1$
 	
 	private Map providersByPluginId;
+	private Map contextIDsByPluginId;
 	private List globalProviders;
-
-	private Map contextsById = new HashMap();
-	private Map idsByContext = new HashMap();
-	private int idCounter = 0;
-
-	/*
-	 * Adds the given dynamically generated IContext to the system, and
-	 * generates a unique ID for it.
-	 */
-	public String addContext(IContext context) {
-		String plugin = HelpPlugin.PLUGIN_ID;
-		String id = (String)idsByContext.get(context);
-		if (id != null) {
-			// context already registered
-		} else {
-			// generate ID and register the context
-			id = "ID" + idCounter++; //$NON-NLS-1$
-			idsByContext.put(context, id);
-			contextsById.put(id, context);
-		}
-		return plugin + "." + id; //$NON-NLS-1$
+	
+	public ContextManager()
+	{
+		if (HelpPlugin.DEBUG_CONTEXT)
+			checkContextProviders();
 	}
 	
 	/*
 	 * Returns the Context for the given id and locale.
 	 */
 	public IContext getContext(String contextId, String locale) {
+		
+		
 		if (HelpPlugin.DEBUG_CONTEXT  && contextId != null) {
 			System.out.println("ContextManager.getContext(\"" + contextId + "\")"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
-		// first check for dynamic context definitions
-		Context dynamicContext = (Context)contextsById.get(contextId);
-		if (dynamicContext != null) {
-			if (HelpPlugin.DEBUG_CONTEXT) {
-				System.out.println("ContextManager.getContext found dynamic context"); //$NON-NLS-1$
-			}
-			return dynamicContext;
-		}
 		
 		// ask the providers
 		int index = contextId.lastIndexOf('.');
@@ -96,10 +76,41 @@ public class ContextManager {
 					HelpPlugin.logError(msg, t);
 				}
 			}
-		}
+		}		
+		
 		if (HelpPlugin.DEBUG_CONTEXT) {
 			System.out.println("ContextManager.getContext - no context found"); //$NON-NLS-1$
+			
+			String id = contextId;
+			ArrayList potentialMatches = new ArrayList();
+			if ((index = contextId.lastIndexOf('.'))>-1)
+				id = contextId.substring(index+1);
+
+			String warning = "Registered Context Provider IDs:\n"; //$NON-NLS-1$
+			Iterator iter = contextIDsByPluginId.keySet().iterator();			
+			warning+="--------------------------------\n"; //$NON-NLS-1$
+			while (iter.hasNext())
+			{
+				String pluginID = (String)iter.next();
+				List contextIDList = (List)contextIDsByPluginId.get(pluginID);
+				for (int c=0;c<contextIDList.size();c++)
+				{
+					if (((String)contextIDList.get(c)).equalsIgnoreCase(id))
+					{
+						potentialMatches.add(pluginID+'.'+(String)contextIDList.get(c));
+						break;
+					}
+				}
+			
+				warning+=pluginID+' '+contextIDList.toString()+'\n';
+			}
+			warning+="--------------------------------"; //$NON-NLS-1$
+			System.out.println(warning);
+			
+			if (!potentialMatches.isEmpty())
+				System.out.println("The ID searched is "+contextId+".  Did you mean to call setHelp with:\n"+potentialMatches); //$NON-NLS-1$ //$NON-NLS-2$
 		}
+
 		return null;
 	}
 	
@@ -157,4 +168,65 @@ public class ContextManager {
 			}
 		}
 	}
+	
+	/*
+	 * Method only called when debugging context
+	 * sensitive help.
+	 * 
+	 * Checks to see if there are any duplicate ids
+	 * 
+	 */
+	private void checkContextProviders()
+	{
+		contextIDsByPluginId = new Hashtable();
+		Hashtable contextByContextID = new Hashtable();
+		
+		if (providersByPluginId == null) {
+			loadContextProviders();
+		}
+		
+		Iterator i = providersByPluginId.keySet().iterator();
+		
+		while (i.hasNext())
+		{
+			String pluginID = (String)i.next();
+			ArrayList providers = (ArrayList)providersByPluginId.get(pluginID);
+			
+			for (int p=0;p<providers.size();p++)
+			{
+				ContextFileProvider provider = (ContextFileProvider)providers.get(p);
+				Map[] maps = provider.getPluginContexts(pluginID,Platform.getNL());
+				
+				for (int m=0;m<maps.length;m++)
+				{
+					Iterator i2 = maps[m].keySet().iterator();
+					while (i2.hasNext())
+					{
+						String contextID = (String)i2.next();
+						String fullID = pluginID+'.'+contextID;
+						Context currentContext = (Context)maps[m].get(contextID);
+						
+						if (!contextByContextID.containsKey(fullID))
+							contextByContextID.put(fullID,currentContext);
+						else if (HelpPlugin.DEBUG_CONTEXT)
+						{
+							Context initialContext = (Context)contextByContextID.get(fullID);
+							String error = "Context Help ID '"+contextID+"' is found in multiple context files in plugin '"+pluginID+"'\n"+ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+								" Description 1: "+initialContext.getText()+'\n'+ //$NON-NLS-1$
+								" Description 2: "+currentContext.getText(); //$NON-NLS-1$
+
+							System.out.println(error);
+						}
+						
+						ArrayList list = (ArrayList)contextIDsByPluginId.get(pluginID);
+						if (list==null){
+							list = new ArrayList();
+							contextIDsByPluginId.put(pluginID,list);
+						}
+						list.add(contextID);
+					}		
+				}
+			}
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/Criteria.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/Criteria.java
new file mode 100644
index 0000000..ac491ee
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/Criteria.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+/**
+ * A directive indicating the criteria information of a Toc or Topic described in xml
+ * 
+ * @since 3.5
+ */
+
+public class Criteria extends UAElement implements ICriteria {
+	
+	public static final String NAME = "criteria"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
+	
+	public Criteria(ICriteria src) {
+		super(NAME,src);	
+		setName(src.getName());
+		setValue(src.getValue());
+	}
+	
+	public Criteria(Element element) {
+		super(element);  
+	}
+
+	public String getName() { 
+		return getAttribute(ATTRIBUTE_NAME);
+	}
+
+	public String getValue() { 
+		return getAttribute(ATTRIBUTE_VALUE);
+	}
+	
+	public void setName(String name) {
+		setAttribute(ATTRIBUTE_NAME, name);
+	}
+	
+	public void setValue(String value) {
+		setAttribute(ATTRIBUTE_VALUE, value);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinition.java
new file mode 100644
index 0000000..a2e3b2b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinition.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.ICriteriaDefinition;
+import org.eclipse.help.ICriterionDefinition;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+public class CriteriaDefinition extends UAElement implements ICriteriaDefinition {
+    
+	public static final String NAME = "criteriaDefinition"; //$NON-NLS-1$
+
+	public CriteriaDefinition() {
+		super(NAME);
+	}
+	
+	public CriteriaDefinition(ICriteriaDefinition src) {
+		super(NAME, src);
+		appendChildren(src.getChildren());
+	}
+	
+	public CriteriaDefinition(Element src) {
+		super(src);
+	}
+
+	public ICriterionDefinition[] getCriterionDefinitions() {
+		return (ICriterionDefinition[])getChildren(ICriterionDefinition.class);
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionAssembler.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionAssembler.java
new file mode 100644
index 0000000..c761256
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionAssembler.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.help.IUAElement;
+import org.eclipse.help.internal.UAElement;
+
+/*
+ * Assembles individual criteria definition contributions into a complete, fully
+ * criteria definition.
+ */
+public class CriteriaDefinitionAssembler {
+
+	/*
+	 * Assembles the given criteria definition contributions into a complete criteria definition.
+	 * The originals are not modified.
+	 */
+	public CriteriaDefinition assemble(List contributions) {
+		return merge(contributions);
+	}
+	
+	/*
+	 * Merge all criteria definition contributions into one.
+	 */
+	private CriteriaDefinition merge(List contributions) {
+		CriteriaDefinition criteriaDefinition = new CriteriaDefinition();
+		Iterator iter = contributions.iterator();
+		while (iter.hasNext()) {
+			CriteriaDefinitionContribution contribution = (CriteriaDefinitionContribution)iter.next();
+			mergeChildren(criteriaDefinition, (CriteriaDefinition)contribution.getCriteriaDefinition());
+			contribution.setCriteriaDefinition(null);
+		}
+		return criteriaDefinition;
+	}
+	
+	/*
+	 * Merges the children of nodes a and b, and stores them into a. If the two
+	 * contain the same criterion id, only one is kept but its children are merged,
+	 * recursively. In one criterion, if multiple criterion values exist with the 
+	 * same id, only the first one found is kept. 
+	 * 
+	 * Insure criterion has its id at least, and criterion value has both its id and name. 
+	 */
+	private void mergeChildren(UAElement a, UAElement b) {
+		Map criterionById = new HashMap();
+		Set criterionValueIds = new HashSet();
+		
+		IUAElement[] childrenA = a.getChildren();
+		for(int i = 0; i < childrenA.length; ++i){
+			UAElement childA = (UAElement)childrenA[i];
+			if(childA instanceof CriterionDefinition) {
+				String id = childA.getAttribute(CriterionDefinition.ATTRIBUTE_ID);
+				if(null != id && id.trim().length() > 0) {
+					criterionById.put(childA.getAttribute(CriterionDefinition.ATTRIBUTE_ID), childA);
+				}
+			} else if(childA instanceof CriterionValueDefinition) {
+				String valueId = childA.getAttribute(CriterionValueDefinition.ATTRIBUTE_ID);
+				String valueName = childA.getAttribute(CriterionValueDefinition.ATTRIBUTE_NAME);
+				if(null != valueId && valueId.trim().length() > 0 && null != valueName && valueName.trim().length() > 0){
+					criterionValueIds.add(childA.getAttribute(CriterionValueDefinition.ATTRIBUTE_ID));
+				}	
+			}
+		}
+		
+		IUAElement[] childrenB = b.getChildren();
+		for(int i = 0; i < childrenB.length; ++i){
+			UAElement childB = (UAElement) childrenB[i];
+			if(childB instanceof CriterionDefinition) {
+				String idB = childB.getAttribute(CriterionDefinition.ATTRIBUTE_ID);
+				if(null != idB && idB.trim().length() > 0){
+					if (criterionById.containsKey(idB)) {
+						// duplicate id; merge children
+						mergeChildren((CriterionDefinition)criterionById.get(idB), childB);
+					} else {
+						// wasn't a duplicate
+						a.appendChild(childB);
+						criterionById.put(idB, childB);
+					}
+				}
+			} else if(childB instanceof CriterionValueDefinition) {
+				String valueIdB = childB.getAttribute(CriterionValueDefinition.ATTRIBUTE_ID);
+				String valueNameB = childB.getAttribute(CriterionValueDefinition.ATTRIBUTE_NAME);
+				if(null != valueIdB && valueIdB.trim().length() > 0 && null != valueNameB && valueNameB.trim().length() > 0){
+					if (!criterionValueIds.contains(valueIdB)) {
+						// For one criterion, add criterion value only if id doesn't exist yet
+						a.appendChild(childB);
+						criterionValueIds.add(valueIdB);
+					}
+				}				
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionContribution.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionContribution.java
new file mode 100644
index 0000000..4abc566
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionContribution.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.ICriteriaDefinition;
+import org.eclipse.help.ICriteriaDefinitionContribution;
+
+
+public class CriteriaDefinitionContribution implements ICriteriaDefinitionContribution{
+
+	private String id;
+	private ICriteriaDefinition criteriaDefinition;
+	private String locale;
+	
+	public String getId() {
+		return id;
+	}
+	
+	public ICriteriaDefinition getCriteriaDefinition() {
+		return criteriaDefinition;
+	}
+	
+	public String getLocale() {
+		return locale;
+	}
+	
+	public void setId(String id) {
+		this.id = id;
+	}
+	
+	public void setCriteriaDefinition(ICriteriaDefinition criteriaDefinition) {
+		this.criteriaDefinition = criteriaDefinition;
+	}
+
+	public void setLocale(String locale) {
+		this.locale = locale;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java
new file mode 100644
index 0000000..80fb38b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionDocumentReader.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.internal.dynamic.DocumentReader;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class CriteriaDefinitionDocumentReader extends DocumentReader {
+	
+	private static final String CRITERION_ELEMENT = "criterion"; //$NON-NLS-1$
+	private static final String CRITERION_ID_ATTRIBUTE = "id"; //$NON-NLS-1$
+	
+	
+	protected void prepareDocument(Document document) {
+		prune(document.getDocumentElement());
+	}
+
+	private void prune(Node element) {
+		NodeList nodes = element.getChildNodes();
+		Node node = nodes.item(0); 
+		while (node != null) {
+			short nodeType = node.getNodeType();
+			if (nodeType == Node.TEXT_NODE || nodeType == Node.COMMENT_NODE) {
+				Node nodeToDelete = node;
+				node = node.getNextSibling();
+				element.removeChild(nodeToDelete);
+			} else  if (nodeType == Node.ELEMENT_NODE) {
+				String kind = node.getNodeName();
+				if (CRITERION_ELEMENT.equalsIgnoreCase(kind)) {
+					fixCriterionId((Element)node);
+				}
+				prune(node);
+			    node = node.getNextSibling();
+			} else {
+				node = node.getNextSibling();
+			}
+		}
+	}
+	
+	/*
+	 * Cause criterion ID is case insensitive, so just change it to lower case.
+	 */
+	private void fixCriterionId(Element criterion) {
+		String id = criterion.getAttribute(CRITERION_ID_ATTRIBUTE);
+		if (id != null && id.length() > 0) {
+			criterion.setAttribute(CRITERION_ID_ATTRIBUTE, id.toLowerCase());
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java
new file mode 100644
index 0000000..e30abd2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFile.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.help.internal.util.ResourceLocator;
+
+public class CriteriaDefinitionFile {
+
+    private String pluginId;
+    private String file;
+    private String locale;
+
+    public CriteriaDefinitionFile(String pluginId, String file, String locale) {
+        this.pluginId = pluginId;
+        this.file = file;
+        this.locale = locale;
+    }
+
+    public String getFile() {
+        return file;
+    }
+
+    public String getLocale() {
+        return locale;
+    }
+
+    public String getPluginId() {
+        return pluginId;
+    }
+
+    public InputStream getInputStream() throws IOException {
+        if (pluginId != null)
+            return ResourceLocator.openFromPlugin(pluginId, file, locale);
+        else
+        	return new FileInputStream(file);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java
new file mode 100644
index 0000000..de1af6b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileParser.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.help.internal.dynamic.DocumentReader;
+import org.xml.sax.SAXException;
+
+public class CriteriaDefinitionFileParser {
+
+	private DocumentReader reader;
+	
+    public CriteriaDefinitionContribution parse(CriteriaDefinitionFile criteriaDefinitionFile) throws IOException, SAXException, ParserConfigurationException {
+		if (reader == null) {
+			reader = new CriteriaDefinitionDocumentReader();
+		}
+		InputStream in = criteriaDefinitionFile.getInputStream();
+		if (in != null) {
+			CriteriaDefinition criteria = (CriteriaDefinition)reader.read(in);
+			CriteriaDefinitionContribution contrib = new CriteriaDefinitionContribution();
+	    	contrib.setId('/' + criteriaDefinitionFile.getPluginId() + '/' + criteriaDefinitionFile.getFile());
+			contrib.setCriteriaDefinition(criteria);
+			contrib.setLocale(criteriaDefinitionFile.getLocale());
+			return contrib;
+		}
+    	else {
+    		throw new FileNotFoundException();
+    	}
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java
new file mode 100644
index 0000000..4550889
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionFileProvider.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.AbstractCriteriaDefinitionProvider;
+import org.eclipse.help.ICriteriaDefinitionContribution;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.util.ResourceLocator;
+import org.xml.sax.SAXParseException;
+
+/*
+ * Provides criteria definition data from XML files to the help system.
+ */
+public class CriteriaDefinitionFileProvider extends AbstractCriteriaDefinitionProvider {
+
+	private static final String ERROR_READING_HELP_CRITERIA_DEFINITION_FILE = "Error reading criteria definition file /\""; //$NON-NLS-1$
+	public static final String EXTENSION_POINT_ID_CRITERIA_DEFINITION = HelpPlugin.PLUGIN_ID + ".criteriaDefinition"; //$NON-NLS-1$
+	public static final String ELEMENT_NAME_CRITERIA = "criteriaDefinition"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_NAME_FILE = "file"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.help.AbstractCriteriaDefinitionProvider#getCriteriaDefinitionContributions(java.lang.String)
+	 */
+	public ICriteriaDefinitionContribution[] getCriteriaDefinitionContributions(String locale) {
+		List contributions = new ArrayList();
+		CriteriaDefinitionFile[] criteriaDefinitionFiles = getCriteriaDefinitionFiles(locale);
+		CriteriaDefinitionFileParser parser = new CriteriaDefinitionFileParser();
+		for (int i = 0; i < criteriaDefinitionFiles.length; ++i) {
+			CriteriaDefinitionFile criteriaDefinitionFile = criteriaDefinitionFiles[i];
+			try {
+				ICriteriaDefinitionContribution criteria = parser.parse(criteriaDefinitionFile);
+				contributions.add(criteria);
+			}  catch (SAXParseException spe) {
+				StringBuffer buffer = new StringBuffer(ERROR_READING_HELP_CRITERIA_DEFINITION_FILE);
+				buffer.append(getCriteriaDefinitionFilePath(criteriaDefinitionFile));
+				buffer.append("\" at line "); //$NON-NLS-1$
+			    buffer.append(spe.getLineNumber());
+			    buffer.append(". "); //$NON-NLS-1$   
+	            buffer.append(spe.getMessage());
+
+	            // Use the contained exception.
+	            Exception x = spe;
+	            if (spe.getException() != null)
+	                x = spe.getException();
+	            HelpPlugin.logError(buffer.toString(), x);
+
+	        } 
+			catch (Throwable t) {
+				String msg = ERROR_READING_HELP_CRITERIA_DEFINITION_FILE + getCriteriaDefinitionFilePath(criteriaDefinitionFile) + "\" (skipping file)"; //$NON-NLS-1$
+				HelpPlugin.logError(msg, t);
+			}
+		}
+		return (ICriteriaDefinitionContribution[])contributions.toArray(new ICriteriaDefinitionContribution[contributions.size()]);
+	}
+
+	private String getCriteriaDefinitionFilePath(CriteriaDefinitionFile criteriaDefinitionFile) {
+		String pluginId = criteriaDefinitionFile.getPluginId();
+		String file = criteriaDefinitionFile.getFile();		
+		return ResourceLocator.getErrorPath(pluginId, file, criteriaDefinitionFile.getLocale());
+	}
+
+	/*
+	 * Returns all available CriteriaDefinitionFiles for the given locale.
+	 */
+	private CriteriaDefinitionFile[] getCriteriaDefinitionFiles(String locale) {
+		List criteriaDefinitionFiles = new ArrayList();
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID_CRITERIA_DEFINITION);
+		for (int i=0;i<elements.length;++i) {
+			IConfigurationElement elem = elements[i];
+			String pluginId = elem.getContributor().getName();
+			if (elem.getName().equals(ELEMENT_NAME_CRITERIA)) {
+				String file = elem.getAttribute(ATTRIBUTE_NAME_FILE);
+				CriteriaDefinitionFile criteriaDefinitionFile = new CriteriaDefinitionFile(pluginId, file, locale);
+				criteriaDefinitionFiles.add(criteriaDefinitionFile);
+			}
+		}
+		return (CriteriaDefinitionFile[])criteriaDefinitionFiles.toArray(new CriteriaDefinitionFile[criteriaDefinitionFiles.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java
new file mode 100644
index 0000000..d8f0f84
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaDefinitionManager.java
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.AbstractCriteriaDefinitionProvider;
+import org.eclipse.help.ICriteriaDefinition;
+import org.eclipse.help.ICriteriaDefinitionContribution;
+import org.eclipse.help.ICriterionDefinition;
+import org.eclipse.help.ICriterionValueDefinition;
+import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.UAElementFactory;
+
+public class CriteriaDefinitionManager {
+
+	private static final String EXTENSION_POINT_ID_CRITERIA_DEFINITION = HelpPlugin.PLUGIN_ID + ".criteriaDefinition"; //$NON-NLS-1$
+	private static final String ELEMENT_NAME_CRITERIA_DEFINITION_PROVIDER = "criteriaDefinitionProvider"; //$NON-NLS-1$
+	private static final String ATTRIBUTE_NAME_CLASS = "class"; //$NON-NLS-1$
+	
+	private Map criteriaDefinitionContributionsByLocale = new HashMap();
+	private Map criteriaDefinitionsByLocale = new HashMap();
+	private AbstractCriteriaDefinitionProvider[] criteriaDefinitionProviders;
+	
+	public synchronized ICriteriaDefinition getCriteriaDefinition(String locale) {
+		CriteriaDefinition criteriaDefinition = (CriteriaDefinition)criteriaDefinitionsByLocale.get(locale);
+		if (null == criteriaDefinition) {
+			HelpPlugin.getTocManager().getTocs(locale);
+			long start = System.currentTimeMillis();
+			if (HelpPlugin.DEBUG_CRITERIA) {
+			    System.out.println("Start to update criteria definition for locale " + locale); //$NON-NLS-1$
+			}
+			List contributions = new ArrayList(Arrays.asList(readCriteriaDefinitionContributions(locale)));
+			CriteriaDefinitionAssembler assembler = new CriteriaDefinitionAssembler();
+			criteriaDefinition = assembler.assemble(contributions);
+			criteriaDefinitionsByLocale.put(locale, criteriaDefinition);
+			long stop = System.currentTimeMillis();
+			if (HelpPlugin.DEBUG_CRITERIA) {
+			    System.out.println("Milliseconds to update criteria definition for locale " + locale +  " = " + (stop - start)); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		return criteriaDefinition;
+	}
+	
+	/*
+	 * Returns all criteria definition contributions for the given locale, from all providers.
+	 */
+	public synchronized CriteriaDefinitionContribution[] getCriteriaDefinitionContributions(String locale) {
+		CriteriaDefinitionContribution[] contributions = (CriteriaDefinitionContribution[])criteriaDefinitionContributionsByLocale.get(locale);
+		if (contributions == null) {
+			contributions = readCriteriaDefinitionContributions(locale);
+			criteriaDefinitionContributionsByLocale.put(locale, contributions);
+		}
+		return contributions;
+	}
+
+	private CriteriaDefinitionContribution[] readCriteriaDefinitionContributions(String locale) {
+		CriteriaDefinitionContribution[] cached;
+		List contributions = new ArrayList();
+		AbstractCriteriaDefinitionProvider[] providers = getCriteriaDefinitionProviders();
+		for (int i=0;i<providers.length;++i) {
+			ICriteriaDefinitionContribution[] contrib;
+			try {
+				contrib = providers[i].getCriteriaDefinitionContributions(locale);
+			}
+			catch (Throwable t) {
+				// log, and skip the offending provider
+				String msg = "Error getting help criteria definition data from provider: " + providers[i].getClass().getName() + " (skipping provider)"; //$NON-NLS-1$ //$NON-NLS-2$
+				HelpPlugin.logError(msg, t);
+				continue;
+			}
+			
+			// check for nulls and root element
+			for (int j=0;j<contrib.length;++j) {
+				if (contrib[j] == null) {
+					String msg = "Help criteria definition provider \"" + providers[i].getClass().getName() + "\" returned a null contribution (skipping)"; //$NON-NLS-1$ //$NON-NLS-2$
+					HelpPlugin.logError(msg);
+				}
+				else if (contrib[j].getCriteriaDefinition() == null) {
+					String msg = "Help criteria definition provider \"" + providers[i].getClass().getName() + "\" returned a contribution with a null root element (expected a \"" + CriteriaDefinition.NAME + "\" element; skipping)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					HelpPlugin.logError(msg);
+				}
+				else {
+					CriteriaDefinitionContribution contribution = new CriteriaDefinitionContribution();
+					contribution.setId(contrib[j].getId());
+					contribution.setLocale(contrib[j].getLocale());
+					ICriteriaDefinition criteria = contrib[j].getCriteriaDefinition();
+					contribution.setCriteriaDefinition(criteria instanceof CriteriaDefinition ? (CriteriaDefinition)criteria  : (CriteriaDefinition)UAElementFactory.newElement(criteria));
+					contributions.add(contribution);
+				}
+			}
+		}
+		cached = (CriteriaDefinitionContribution[])contributions.toArray(new CriteriaDefinitionContribution[contributions.size()]);
+		return cached;
+	}
+	
+	/*
+	 * Clears all cached contributions, forcing the manager to query the
+	 * providers again next time a request is made.
+	 */
+	public void clearCache() {
+		criteriaDefinitionContributionsByLocale.clear();
+		criteriaDefinitionsByLocale.clear();
+	}
+
+	/*
+	 * Internal hook for unit testing.
+	 */
+	public AbstractCriteriaDefinitionProvider[] getCriteriaDefinitionProviders() {
+		if (null == criteriaDefinitionProviders) {
+			List providers = new ArrayList();
+			IExtensionRegistry registry = Platform.getExtensionRegistry();
+			IConfigurationElement[] elements = registry.getConfigurationElementsFor(EXTENSION_POINT_ID_CRITERIA_DEFINITION);
+			for (int i=0;i<elements.length;++i) {
+				IConfigurationElement elem = elements[i];
+				if (elem.getName().equals(ELEMENT_NAME_CRITERIA_DEFINITION_PROVIDER)) {
+					try {
+						AbstractCriteriaDefinitionProvider provider = (AbstractCriteriaDefinitionProvider)elem.createExecutableExtension(ATTRIBUTE_NAME_CLASS);
+						providers.add(provider);
+					}
+					catch (CoreException e) {
+						// log and skip
+						String msg = "Error instantiating help keyword index provider class \"" + elem.getAttribute(ATTRIBUTE_NAME_CLASS) + '"'; //$NON-NLS-1$
+						HelpPlugin.logError(msg, e);
+					}
+				}
+			}
+			criteriaDefinitionProviders = (AbstractCriteriaDefinitionProvider[])providers.toArray(new AbstractCriteriaDefinitionProvider[providers.size()]);
+		}
+		return criteriaDefinitionProviders;
+	}
+	
+	public boolean isCriteriaDefinitionLoaded(String locale) {
+		return criteriaDefinitionsByLocale.get(locale) != null;
+	}
+
+	/*
+	 * Internal hook for unit testing.
+	 */
+	public void setCriteriaDefinitionProviders(AbstractCriteriaDefinitionProvider[] criteriaDefinitionProviders) {
+		this.criteriaDefinitionProviders = criteriaDefinitionProviders;
+	}
+	
+	public String getCriterionName(String id, String locale) {
+		ICriteriaDefinition definition = getCriteriaDefinition(locale);
+		ICriterionDefinition[] criterionDefinitions = definition.getCriterionDefinitions();
+		for(int i = 0; i < criterionDefinitions.length; i++) {
+			CriterionDefinition criterionDefinition = (CriterionDefinition) criterionDefinitions[i];
+			if(null != criterionDefinition.getId() && criterionDefinition.getId().equalsIgnoreCase(id)){
+				String name = criterionDefinition.getName();
+				if(null != name && 0 != name.length()) {
+					return name;
+				}				
+			}
+		}
+		return id;
+	}
+	
+	public String getCriterionValueName(String criterionId, String criterionValueId, String locale) {
+		ICriteriaDefinition definition = getCriteriaDefinition(locale);
+		ICriterionDefinition[] criterionDefinitions = definition.getCriterionDefinitions();
+		for(int i = 0; i < criterionDefinitions.length; ++ i) {
+			CriterionDefinition criterionDefinition = (CriterionDefinition) criterionDefinitions[i];
+			if(null != criterionDefinition.getId() && criterionDefinition.getId().equalsIgnoreCase(criterionId)){
+				ICriterionValueDefinition[] valueDefinitions = criterionDefinition.getCriterionValueDefinitions();
+				for(int j = 0; j < valueDefinitions.length; ++ j){
+					CriterionValueDefinition valueDefinition = (CriterionValueDefinition) valueDefinitions[j];
+					if(null != valueDefinition.getId() && valueDefinition.getId().equals(criterionValueId)){
+						String name = valueDefinition.getName();
+						if(null != name && 0 != name.length()) {
+							return name;
+						}
+					}
+				}				
+			}
+		}
+		return criterionValueId;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaManager.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaManager.java
new file mode 100644
index 0000000..aece210
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaManager.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.internal.HelpPlugin;
+
+/**
+ * Get criteria related parameter from preferences.ini
+ * 
+ * @since 3.5
+ */
+public class CriteriaManager {
+	
+	private final static String SUPPORTED_CRITERIA = "supportedCriteria"; //$NON-NLS-1$
+	private final static String ENABLE_CRITERIA = "enableCriteria"; //$NON-NLS-1$
+	
+	private List supportedCriteria;
+	private boolean criteriaEnabled;
+	private Map allCriteriaValues;
+	
+	private CriteriaDefinitionManager criteriaDefinitionManager;
+	
+	public CriteriaManager() {
+		criteriaEnabled = Platform.getPreferencesService().getBoolean(HelpPlugin.PLUGIN_ID, ENABLE_CRITERIA, false, null);
+		
+		supportedCriteria = new ArrayList();
+		StringTokenizer criteria = new StringTokenizer(Platform.getPreferencesService().getString(HelpPlugin.PLUGIN_ID, SUPPORTED_CRITERIA, "", null), ",;"); //$NON-NLS-1$ //$NON-NLS-2$
+		while (criteria.hasMoreTokens()) {
+			supportedCriteria.add(criteria.nextToken().toLowerCase().trim());
+		}
+		
+		allCriteriaValues = new HashMap();
+		
+		if (criteriaDefinitionManager == null){
+			criteriaDefinitionManager = new CriteriaDefinitionManager();
+		}
+	}
+
+	public boolean isSupportedCriterion(String criterion){
+		if(null != criterion && supportedCriteria.contains(criterion.toLowerCase())){
+			return true;
+		}
+		return false;
+	}
+	
+	public boolean isCriteriaEnabled(){
+		return criteriaEnabled;
+	}
+	
+	public void addCriteriaValues(ICriteria[] criteria, String locale){
+		Map criteriaInLocale = (HashMap)allCriteriaValues.get(locale);
+		if(null == criteriaInLocale) {
+			criteriaInLocale = new HashMap();
+		}
+		CriterionResource[] resources = CriterionResource.toCriterionResource(criteria);
+		for(int i = 0; i < resources.length; ++ i){
+			CriterionResource criterion = resources[i];
+			String criterionName = criterion.getCriterionName();
+			List criterionValues = criterion.getCriterionValues();
+			
+			Set existedValues = (Set)criteriaInLocale.get(criterionName);
+			if (null == existedValues)
+				existedValues = new HashSet();
+			existedValues.addAll(criterionValues);
+			criteriaInLocale.put(criterionName, existedValues);
+		}
+		allCriteriaValues.put(locale, criteriaInLocale);
+	}
+	
+	public Map getAllCriteriaValues(String locale){
+		Map criteria = (Map) allCriteriaValues.get(locale);
+		if(null == criteria) {
+			criteria = new HashMap();
+		}
+		return criteria;
+	}
+	
+	
+	public String getCriterionDisplayName (String criterionId, String locale){
+		return criteriaDefinitionManager.getCriterionName(criterionId, locale);
+	}
+	
+	public String getCriterionValueDisplayName(String criterionId, String criterionValueId, String locale) {
+		return criteriaDefinitionManager.getCriterionValueName(criterionId, criterionValueId, locale);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaProviderRegistry.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaProviderRegistry.java
new file mode 100644
index 0000000..4f85706
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriteriaProviderRegistry.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.help.AbstractCriteriaProvider;
+import org.eclipse.help.ICriteria;
+import org.eclipse.help.IToc;
+import org.eclipse.help.IToc2;
+import org.eclipse.help.ITopic;
+import org.eclipse.help.ITopic2;
+import org.eclipse.help.internal.HelpPlugin;
+
+public class CriteriaProviderRegistry {
+
+	public static final String PROVIDER_XP_NAME = "org.eclipse.help.criteriaProvider"; //$NON-NLS-1$
+
+	private static List providers = null;
+	
+	private static CriteriaProviderRegistry instance;
+
+	private boolean initialized = false;
+	
+	private CriteriaProviderRegistry() {
+	}
+	
+	public static CriteriaProviderRegistry getInstance() {
+		if (instance == null) {
+			instance = new CriteriaProviderRegistry();
+		}
+		return instance;
+	}
+
+	synchronized private void readProviders() {
+		if (initialized ) {
+			return;
+		}	
+		providers = new ArrayList();
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry
+				.getConfigurationElementsFor(PROVIDER_XP_NAME);
+		for (int i = 0; i < elements.length; i++) {
+
+			Object obj = null;
+			try {
+				obj = elements[i].createExecutableExtension("class"); //$NON-NLS-1$
+			} catch (CoreException e) {
+				HelpPlugin.logError("Create extension failed:[" //$NON-NLS-1$
+						+ PROVIDER_XP_NAME + "].", e); //$NON-NLS-1$
+			}
+			if (obj instanceof AbstractCriteriaProvider) {
+				providers.add(obj);
+			}
+		}
+		initialized = true;
+	}
+	
+	public AbstractCriteriaProvider[] getScopes() {
+		readProviders();
+		return (AbstractCriteriaProvider[]) providers.toArray(new AbstractCriteriaProvider[providers.size()]);
+	}
+
+	public ICriteria[] getAllCriteria(ITopic topic) {
+		readProviders();
+		ICriteria[] criteria; 
+		if (topic instanceof ITopic2) {
+			criteria = ((ITopic2) topic).getCriteria();
+		} else {
+			criteria = new ICriteria[0];
+		}
+		for (Iterator iter = providers.iterator(); iter.hasNext();) {
+			AbstractCriteriaProvider provider = (AbstractCriteriaProvider) iter.next();
+			ICriteria[] newCriteria = provider.getCriteria(topic);
+			if (newCriteria.length > 0) {
+				if (criteria.length == 0) {
+					criteria = newCriteria;
+				} else {
+					ICriteria[] union = new ICriteria[criteria.length + newCriteria.length];
+					System.arraycopy(criteria, 0, union, 0, criteria.length);
+					System.arraycopy(newCriteria, 0, union, criteria.length, newCriteria.length);
+					criteria = union;
+				}
+			}
+		}
+		return criteria;
+	}
+	
+	public ICriteria[] getAllCriteria(IToc toc) {
+		readProviders();
+		ICriteria[] criteria; 
+		if (toc instanceof IToc2) {
+			criteria = ((IToc2) toc).getCriteria();
+		} else {
+			criteria = new ICriteria[0];
+		}
+		for (Iterator iter = providers.iterator(); iter.hasNext();) {
+			AbstractCriteriaProvider provider = (AbstractCriteriaProvider) iter.next();
+			ICriteria[] newCriteria = provider.getCriteria(toc);
+			if (newCriteria.length > 0) {
+				if (criteria.length == 0) {
+					criteria = newCriteria;
+				} else {
+					ICriteria[] union = new ICriteria[criteria.length + newCriteria.length];
+					System.arraycopy(criteria, 0, union, 0, criteria.length);
+					System.arraycopy(newCriteria, 0, union, criteria.length, newCriteria.length);
+					criteria = union;
+				}
+			}
+		}
+		return criteria;
+	}	
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionDefinition.java
new file mode 100644
index 0000000..20ff156
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionDefinition.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.ICriterionDefinition;
+import org.eclipse.help.ICriterionValueDefinition;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+public class CriterionDefinition extends UAElement implements ICriterionDefinition {
+    
+	public static final String NAME = "criterion"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+	
+	public CriterionDefinition(ICriterionDefinition src) {
+		super(NAME, src);
+		setId(src.getId());
+		setName(src.getName());
+		appendChildren(src.getChildren());
+	}
+	
+	public CriterionDefinition(Element src) {
+		super(src);
+	}
+
+	public String getId() {
+		return getAttribute(ATTRIBUTE_ID);
+	}
+	
+	public String getName() {
+		return getAttribute(ATTRIBUTE_NAME);
+	}
+	
+	public void setId(String id) {
+		setAttribute(ATTRIBUTE_ID, id);
+	}
+	
+	public void setName(String name){
+		setAttribute(ATTRIBUTE_NAME, name);
+	}
+
+	public ICriterionValueDefinition[] getCriterionValueDefinitions() {
+		return (ICriterionValueDefinition[])getChildren(ICriterionValueDefinition.class);
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java
new file mode 100644
index 0000000..b647d4b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionResource.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.criteria;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.help.ICriteria;
+
+import org.eclipse.help.internal.HelpPlugin;
+
+/**
+ * A class represents one criterion, which has the name and values
+ * 
+ * @since 3.5
+ */
+public class CriterionResource {
+
+	private String criterionName;
+	private List criterionValues;
+	
+	public CriterionResource(String criterionName){
+		this(criterionName, null);
+	}
+	
+	public CriterionResource (String criterionName, List criterionValues){
+		this.criterionName = criterionName;
+		this.criterionValues = new ArrayList();
+		if(null != criterionValues) {
+			this.addCriterionValues(criterionValues);
+		}
+	}
+	
+	public String getCriterionName(){
+		return this.criterionName;
+	}
+	
+	public List getCriterionValues(){
+		return this.criterionValues;
+	}
+	
+	public void addCriterionValue(String criterionValue){
+		if(null != criterionValue && 0 != criterionValue.length() && !criterionValues.contains(criterionValue)){
+			criterionValues.add(criterionValue);
+		}
+	}
+	
+	public void addCriterionValues(List criterionValues){
+		for(Iterator iterator = criterionValues.iterator(); iterator.hasNext();){
+			String criterionValue = (String) iterator.next();
+			this.addCriterionValue(criterionValue);
+		}
+	}
+	
+	public static CriterionResource[] toCriterionResource(ICriteria[] criteriaElements) {
+		List criteriaList = new ArrayList();
+		outer: for (int i = 0; i < criteriaElements.length; ++i) {
+			String elementName = criteriaElements[i].getName();
+			String elementValue = criteriaElements[i].getValue();
+			if (null != elementName && 0 != elementName.length() && null != elementValue
+					&& 0 != elementValue.length()) {
+				if (HelpPlugin.getCriteriaManager().isSupportedCriterion(elementName)) {
+					elementName = elementName.toLowerCase();
+					StringTokenizer tokenizer = new StringTokenizer(elementValue, ","); //$NON-NLS-1$ 
+					List values = new ArrayList();
+					while (tokenizer.hasMoreTokens()) {
+						values.add(tokenizer.nextToken().trim());
+					}
+					for(int j = 0; j < criteriaList.size(); ++j){
+						CriterionResource criterion = (CriterionResource) criteriaList.get(j);
+						if(elementName.equals(criterion.getCriterionName())){
+							criterion.addCriterionValues(values);
+							continue outer;
+						}
+					}
+				    CriterionResource criterionResource = new CriterionResource(elementName, values);
+				    criteriaList.add(criterionResource);
+				}
+			}
+		}
+		CriterionResource[] criteria = new CriterionResource[criteriaList.size()];                                        		
+		criteriaList.toArray(criteria);
+		return criteria;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionValueDefinition.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionValueDefinition.java
new file mode 100644
index 0000000..9b15b97
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/criteria/CriterionValueDefinition.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.criteria;
+
+import org.eclipse.help.ICriterionValueDefinition;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+public class CriterionValueDefinition extends UAElement implements ICriterionValueDefinition {
+    
+	public static final String NAME = "criterion-value"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+	
+	public CriterionValueDefinition(ICriterionValueDefinition src) {
+		super(NAME, src);
+		setId(src.getId());
+		setName(src.getName());
+	}
+	
+	public CriterionValueDefinition(Element src) {
+		super(src);
+	}
+
+	public String getId() {
+		return getAttribute(ATTRIBUTE_ID);
+	}
+	
+	public String getName() {
+		return getAttribute(ATTRIBUTE_NAME);
+	}
+	
+	public void setId(String id) {
+		setAttribute(ATTRIBUTE_ID, id);
+	}
+	
+	public void setName(String name){
+		setAttribute(ATTRIBUTE_NAME, name);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/dynamic/FilterResolver.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/dynamic/FilterResolver.java
index 9610fde..66037a4 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/dynamic/FilterResolver.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/dynamic/FilterResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,7 +133,7 @@ public class FilterResolver {
 		if (product != null) {
 			return !productId.equals(product.getId());
 		}
-		return false;
+		return true;
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
index 6ecd2e7..78c1992 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/extension/ContentExtensionFileParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@ import java.util.Map;
 
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.UAElement;
 import org.eclipse.help.internal.dynamic.DocumentProcessor;
@@ -46,7 +48,7 @@ public class ContentExtensionFileParser extends DefaultHandler {
     	if (reader == null) {
     		reader = new DocumentReader();
     	}
-		URL url = bundle.getEntry(path);
+		URL url= FileLocator.find(bundle, new Path(path), null);
 		if (url != null) {
 			InputStream in = url.openStream();
 			UAElement extension = (UAElement)reader.read(in);
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
index 9142e3b..b6fffc6 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/Index.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2010 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,13 @@
  * Contributors:
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation - 122967 [Help] Remote help system
+ *     IBM Corporation - add support for see / see also
+ *     IBM Corporation - add support for filtering of the index view
  *******************************************************************************/
 package org.eclipse.help.internal.index;
 
+import java.util.Iterator;
+
 import org.eclipse.help.IIndex;
 import org.eclipse.help.IIndexEntry;
 import org.eclipse.help.internal.UAElement;
@@ -36,4 +40,21 @@ public class Index extends UAElement implements IIndex {
 	public IIndexEntry[] getEntries() {
 		return (IIndexEntry[])getChildren(IIndexEntry.class);
 	}
+
+	/**
+	 * @param see A see element
+	 * @return the entry with matching keyword or null 
+	 */
+	public IndexEntry getSeeTarget(IndexSee see) {
+		if (children == null) getChildren();
+		String keyword = see.getKeyword();
+		for (Iterator iter = children.iterator(); iter.hasNext();) {
+			Object next = iter.next();
+			if (next instanceof IndexEntry && keyword.equals(((IndexEntry)next).getKeyword())) {
+				return (IndexEntry)next;
+			}
+		}
+		return null;
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
index 638470b..0d3c4b0 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexAssembler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     IBM Corporation - add support for filtering of the index view
  *******************************************************************************/
 package org.eclipse.help.internal.index;
 
@@ -19,6 +20,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.eclipse.help.IIndexEntry;
 import org.eclipse.help.ITopic;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.HelpPlugin;
@@ -51,7 +53,7 @@ public class IndexAssembler {
 		this.locale = locale;
 		process(contributions);
 		Index index = merge(contributions);
-		sort(index);
+		sortAndPrune(index);
 		return index;
 	}
 	
@@ -73,12 +75,14 @@ public class IndexAssembler {
 	 * Merges the children of nodes a and b, and stores them into a. If the two
 	 * contain the same keyword, only one is kept but its children are merged,
 	 * recursively. If multiple topics exist with the same href, only the
-	 * first one found is kept.
+	 * first one found is kept. If multiple see elements are found with the same target 
+	 * only one is retained
 	 */
 	private void mergeChildren(UAElement a, UAElement b) {
 		// create data structures for fast lookup
 		Map entriesByKeyword = new HashMap();
 		Set topicHrefs = new HashSet();
+		Set seeTargets = new HashSet();
 		IUAElement[] childrenA = a.getChildren();
 		for (int i=0;i<childrenA.length;++i) {
 			UAElement childA = (UAElement)childrenA[i];
@@ -87,6 +91,8 @@ public class IndexAssembler {
 			}
 			else if (childA instanceof Topic) {
 				topicHrefs.add(childA.getAttribute(Topic.ATTRIBUTE_HREF));
+			} else if (childA instanceof IndexSee) {
+				seeTargets.add(((IndexSee)childA));
 			}
 		}
 		
@@ -113,6 +119,12 @@ public class IndexAssembler {
 					a.appendChild(childB);
 					topicHrefs.add(href);
 				}
+			} else if (childB instanceof IndexSee) {
+				if (!seeTargets.contains(((IndexSee) childB))) {
+					// add see only if it doesn't exist yet
+					a.appendChild(childB);
+					seeTargets.add(childB);
+				}
 			}
 		}
 	}
@@ -136,18 +148,19 @@ public class IndexAssembler {
 	/*
 	 * Sort the given node's descendants recursively.
 	 */
-	private void sort(UAElement element) {
+	private void sortAndPrune(UAElement element) {
 		if (comparator == null) {
 			comparator = new IndexComparator();
 		}
-		sort(element, comparator);
+		sortAndPrune(element, comparator);
 	}
 	
 	/*
 	 * Sort the given node's descendants recursively using the given
-	 * Comparator.
+	 * Comparator. Prune out any empty entry elements. Return true if this node was
+	 * not pruned
 	 */
-	private void sort(UAElement element, Comparator comparator) {
+	private boolean sortAndPrune(UAElement element, Comparator comparator) {
 		// sort children
 		IUAElement[] children = element.getChildren();
 		if (children.length > 1) {
@@ -160,9 +173,30 @@ public class IndexAssembler {
 			}
 		}
 		// sort children's children
+		boolean hasChildren = false;
 		for (int i=0;i<children.length;++i) {
-			sort((UAElement)children[i], comparator);
+			hasChildren = hasChildren | sortAndPrune((UAElement)children[i], comparator);
+		}
+		if (element instanceof IIndexEntry && !hasChildren) {
+			element.getParentElement().removeChild(element);
+			return false;
 		}
+		if (element instanceof IndexSee && !isValidSeeReference((IndexSee) element)) {
+			element.getParentElement().removeChild(element);
+			return false;
+		}
+		return true;
+	}
+	
+	boolean isValidSeeReference(IndexSee see) {
+		UAElement ancestor = see.getParentElement();
+		while (!(ancestor instanceof Index)) {
+			if (ancestor == null) {
+				return true;
+			}
+			ancestor = ancestor.getParentElement();
+		}
+		return ((Index)ancestor).getSeeTarget(see) != null;
 	}
 	
 	/*
@@ -201,7 +235,9 @@ public class IndexAssembler {
 			int c1 = getCategory((UAElement)o1);
 			int c2 = getCategory((UAElement)o2);
 			if (c1 == c2) {
-
+                if (o1 instanceof IndexSee) {
+                	return ((IndexSee)o1).compareTo(o2);
+                }
 				// same type of object; compare alphabetically
 				String s1 = getLabel((UAElement)o1);
 				String s2 = getLabel((UAElement)o2);
@@ -239,9 +275,11 @@ public class IndexAssembler {
 					return 1;
 				}
 				return 4;
+			} else if (element instanceof IndexSee) {
+				return 5;
 			}
 			else {
-				return 5;
+				return 6;
 			}
 		}
 		
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexEntry.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexEntry.java
index 22d121a..1437771 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexEntry.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2009 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,15 +8,18 @@
  * Contributors:
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation - 122967 [Help] Remote help system
+ *     IBM Corporation - Added support for see references
  *******************************************************************************/
 package org.eclipse.help.internal.index;
 
 import org.eclipse.help.IIndexEntry;
+import org.eclipse.help.IIndexEntry2;
+import org.eclipse.help.IIndexSee;
 import org.eclipse.help.ITopic;
 import org.eclipse.help.internal.UAElement;
 import org.w3c.dom.Element;
 
-public class IndexEntry extends UAElement implements IIndexEntry {
+public class IndexEntry extends UAElement implements IIndexEntry2 {
 	
 	public static final String NAME = "entry"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_KEYWORD = "keyword"; //$NON-NLS-1$
@@ -46,4 +49,8 @@ public class IndexEntry extends UAElement implements IIndexEntry {
 	public void setKeyword(String keyword) {
 		setAttribute(ATTRIBUTE_KEYWORD, keyword);
 	}
+
+	public IIndexSee[] getSees() {
+		return (IIndexSee[])getChildren(IIndexSee.class);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
index 3baeaac..d1a2d80 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 Intel Corporation and others.
+ * Copyright (c) 2005, 2009 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     Intel Corporation - initial API and implementation
  *     IBM Corporation - 122967 [Help] Remote help system
  *     IBM Corporation - Use IndexDocumentReader
+ *     IBM Corporation - [Bug 297921
  *******************************************************************************/
 package org.eclipse.help.internal.index;
 
@@ -31,12 +32,16 @@ public class IndexFileParser {
 		}
 		InputStream in = indexFile.getInputStream();
 		if (in != null) {
-			Index index = (Index)reader.read(in);
-			IndexContribution contrib = new IndexContribution();
-	    	contrib.setId('/' + indexFile.getPluginId() + '/' + indexFile.getFile());
-			contrib.setIndex(index);
-			contrib.setLocale(indexFile.getLocale());
-			return contrib;
+			try {
+				Index index = (Index)reader.read(in);
+				IndexContribution contrib = new IndexContribution();
+		    	contrib.setId('/' + indexFile.getPluginId() + '/' + indexFile.getFile());
+				contrib.setIndex(index);
+				contrib.setLocale(indexFile.getLocale());
+				return contrib;
+			} finally {
+				in.close();
+			}
 		}
     	else {
     		throw new FileNotFoundException();
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
index 7e303c2..5ede146 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexFileProvider.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.AbstractIndexProvider;
 import org.eclipse.help.IIndexContribution;
 import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.util.ResourceLocator;
 import org.xml.sax.SAXParseException;
 
 /*
@@ -67,7 +68,9 @@ public class IndexFileProvider extends AbstractIndexProvider {
 	}
 
 	private String getIndexFilePath(IndexFile indexFile) {
-		return indexFile.getPluginId() + '/' + indexFile.getFile();
+		String pluginId = indexFile.getPluginId();
+		String file = indexFile.getFile();		
+		return ResourceLocator.getErrorPath(pluginId, file, indexFile.getLocale());
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
index bede1a7..06d641b 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 Intel Corporation and others.
+ * Copyright (c) 2005, 2010 Intel Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,33 +86,30 @@ public class IndexManager {
 			IIndexContribution[] contrib;
 			try {
 				contrib = providers[i].getIndexContributions(locale);
-			}
-			catch (Throwable t) {
+				// check for nulls and root element
+				for (int j = 0; j < contrib.length; ++j) {
+					if (contrib[j] == null) {
+						String msg = "Help keyword index provider \"" + providers[i].getClass().getName() + "\" returned a null contribution (skipping)"; //$NON-NLS-1$ //$NON-NLS-2$
+						HelpPlugin.logError(msg);
+					} else if (contrib[j].getIndex() == null) {
+						String msg = "Help keyword index provider \"" + providers[i].getClass().getName() + "\" returned a contribution with a null root element (expected a \"" + Index.NAME + "\" element; skipping)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						HelpPlugin.logError(msg);
+					} else {
+						IndexContribution contribution = new IndexContribution();
+						contribution.setId(contrib[j].getId());
+						contribution.setLocale(contrib[j].getLocale());
+						IIndex index = contrib[j].getIndex();
+						contribution.setIndex(index instanceof Index ? (Index) index
+								: (Index) UAElementFactory.newElement(index));
+						contributions.add(contribution);
+					}
+				}
+			} catch (Throwable t) {
 				// log, and skip the offending provider
 				String msg = "Error getting help keyword index data from provider: " + providers[i].getClass().getName() + " (skipping provider)"; //$NON-NLS-1$ //$NON-NLS-2$
 				HelpPlugin.logError(msg, t);
 				continue;
 			}
-			
-			// check for nulls and root element
-			for (int j=0;j<contrib.length;++j) {
-				if (contrib[j] == null) {
-					String msg = "Help keyword index provider \"" + providers[i].getClass().getName() + "\" returned a null contribution (skipping)"; //$NON-NLS-1$ //$NON-NLS-2$
-					HelpPlugin.logError(msg);
-				}
-				else if (contrib[j].getIndex() == null) {
-					String msg = "Help keyword index provider \"" + providers[i].getClass().getName() + "\" returned a contribution with a null root element (expected a \"" + Index.NAME + "\" element; skipping)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-					HelpPlugin.logError(msg);
-				}
-				else {
-					IndexContribution contribution = new IndexContribution();
-					contribution.setId(contrib[j].getId());
-					contribution.setLocale(contrib[j].getLocale());
-					IIndex index = contrib[j].getIndex();
-					contribution.setIndex(index instanceof Index ? (Index)index : (Index)UAElementFactory.newElement(index));
-					contributions.add(contribution);
-				}
-			}
 		}
 		cached = (IndexContribution[])contributions.toArray(new IndexContribution[contributions.size()]);
 		return cached;
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java
new file mode 100644
index 0000000..0d59f4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSee.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.help.internal.index;
+
+import org.eclipse.help.IIndexSee;
+import org.eclipse.help.IIndexSubpath;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+import com.ibm.icu.text.Collator;
+
+public class IndexSee extends UAElement implements IIndexSee, Comparable  {
+	
+	public static final String NAME = "see"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_KEYWORD = "keyword"; //$NON-NLS-1$
+	
+	public IndexSee(Element src) {
+		super(src);
+	}
+	
+	public IndexSee(IIndexSee src) {
+		super(NAME, src);
+		setKeyword(src.getKeyword());
+		appendChildren(src.getChildren());
+	}
+
+	public String getKeyword() {
+		return getAttribute(ATTRIBUTE_KEYWORD);
+	}
+	
+	private String[] getPath() {
+		IIndexSubpath[] subpaths = getSubpathElements();
+		String[] result = new String[1 + subpaths.length];
+		result[0] = getKeyword();
+		for (int i = 0; i < subpaths.length; i++) {
+			result[i + 1] = subpaths[i].getKeyword();
+		}
+		return result;
+	}
+	
+	public void setKeyword(String keyword) {
+		setAttribute(ATTRIBUTE_KEYWORD, keyword);
+	}
+	
+	private int getCategory(String keyword) {
+		if (keyword != null && keyword.length() > 0) {
+			char c = keyword.charAt(0);
+			if (Character.isDigit(c)) {
+				return 2;
+			}
+			else if (Character.isLetter(c)) {
+				return 3;
+			}
+			return 1;
+		}
+		return 4;
+	}
+	
+	public int compareTo(Object arg0) {
+		Collator collator = Collator.getInstance();
+		if (arg0 instanceof IndexSee) {
+			String[] path = getPath();
+			String[] targetPath = ((IndexSee)arg0).getPath();
+			for (int i = 0; i < path.length; i++) {
+				if (i >= targetPath.length) {
+					return 1;
+				}
+                if (getCategory(path[i]) != getCategory(targetPath[i])) {
+                	return getCategory(path[i]) - getCategory(targetPath[i]);
+                }
+				int result = collator.compare(path[i], targetPath[i]);
+				if (result != 0) {
+					return result;
+				}
+			}
+			return path.length - targetPath.length;
+		}
+		return 0;
+	}
+	
+	public boolean equals(Object obj) {
+		return obj instanceof IndexSee && compareTo(obj) == 0;
+	}
+	
+	public int hashCode() {
+		int result = getKeyword().hashCode();
+		IIndexSubpath[] subpaths = getSubpathElements();
+		for (int i = 0; i < subpaths.length; i++) {
+			result += subpaths[i].getKeyword().hashCode();
+		}
+		return result;
+    }
+
+	public boolean isSeeAlso() {
+		UAElement parentElement = getParentElement();
+		return ! (parentElement.getChildren()[0] instanceof IIndexSee);
+	}
+
+	public IIndexSubpath[] getSubpathElements() {
+		return (IIndexSubpath[])getChildren(IIndexSubpath.class);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSubpath.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSubpath.java
new file mode 100644
index 0000000..47f1b05
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/index/IndexSubpath.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.index;
+
+import org.eclipse.help.IIndexSubpath;
+import org.eclipse.help.internal.UAElement;
+import org.w3c.dom.Element;
+
+public class IndexSubpath extends UAElement implements IIndexSubpath {
+	
+	public static final String NAME = "subpath"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_KEYWORD = "keyword"; //$NON-NLS-1$
+	
+	public IndexSubpath(IIndexSubpath src) {
+		super(NAME, src);
+		setKeyword(src.getKeyword());
+		appendChildren(src.getChildren());
+	}
+	
+	public IndexSubpath(Element src) {
+		super(src);
+	}
+
+	public String getKeyword() {
+		return getAttribute(ATTRIBUTE_KEYWORD);
+	}
+	
+	public void setKeyword(String keyword) {
+		setAttribute(ATTRIBUTE_KEYWORD, keyword);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
index 4c6f19f..c67e411 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/Toc.java
@@ -1,12 +1,10 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved. This program and the
+ * accompanying materials are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
  * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
+ * Contributors: IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.help.internal.toc;
 
@@ -14,14 +12,17 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.help.ICriteria;
 import org.eclipse.help.IToc;
+import org.eclipse.help.IToc2;
 import org.eclipse.help.ITocContribution;
 import org.eclipse.help.ITopic;
+import org.eclipse.help.ITopic2;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.UAElement;
 import org.w3c.dom.Element;
 
-public class Toc extends UAElement implements IToc {
+public class Toc extends UAElement implements IToc2 {
 
 	public static final String NAME = "toc"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_LABEL = "label"; //$NON-NLS-1$
@@ -29,7 +30,8 @@ public class Toc extends UAElement implements IToc {
 	public static final String ATTRIBUTE_TOPIC = "topic"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_LINK_TO = "link_to"; //$NON-NLS-1$
 	public static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
-	public static final String ATTRIBUTE_ICON= "icon"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$
+	public static final String ATTRIBUTE_SORT = "sort"; //$NON-NLS-1$
 
 	private ITocContribution contribution;
 	private ITopic topic;
@@ -45,11 +47,11 @@ public class Toc extends UAElement implements IToc {
 		}
 		appendChildren(src.getChildren());
 	}
-	
+
 	public Toc(Element src) {
 		super(src);
 	}
-	
+
 	/*
 	 * Creates a mapping of all topic hrefs to ITopics.
 	 */
@@ -59,31 +61,31 @@ public class Toc extends UAElement implements IToc {
 			map.put(topic.getHref(), topic);
 		}
 		ITopic[] topics = getTopics();
-		for (int i=0;i<topics.length;++i) {
+		for (int i = 0; i < topics.length; ++i) {
 			createHref2TopicMapAux(map, topics[i]);
 		}
 		return map;
 	}
 
 	/*
-	 * Creates a mapping of all topic hrefs to ITopics under the given
-	 * ITopic and stores in the given Map.
+	 * Creates a mapping of all topic hrefs to ITopics under the given ITopic and stores in the
+	 * given Map.
 	 */
 	private void createHref2TopicMapAux(Map map, ITopic topic) {
 		String href = topic.getHref();
 		if (href != null) {
 			map.put(href, topic);
 			int anchorIx = href.lastIndexOf("#"); //$NON-NLS-1$
-			if (anchorIx >= 0) { //anchor exists, drop it and add href again to map
+			if (anchorIx >= 0) { // anchor exists, drop it and add href again to map
 				String simpleHref = href.substring(0, anchorIx);
 				if (!map.containsKey(simpleHref)) {
 					map.put(simpleHref, topic);
 				}
-		    }
+			}
 		}
 		ITopic[] subtopics = topic.getSubtopics();
 		if (subtopics != null) {
-			for (int i=0;i<subtopics.length;++i) {
+			for (int i = 0; i < subtopics.length; ++i) {
 				if (subtopics[i] != null) {
 					createHref2TopicMapAux(map, subtopics[i]);
 				}
@@ -94,11 +96,15 @@ public class Toc extends UAElement implements IToc {
 	public String getHref() {
 		return getAttribute(ATTRIBUTE_HREF);
 	}
-	
-	public String getIcon(){
+
+	public String getIcon() {
 		return getAttribute(ATTRIBUTE_ICON);
 	}
 
+	public boolean isSorted() {
+		return "true".equalsIgnoreCase(getAttribute(ATTRIBUTE_SORT)); //$NON-NLS-1$
+	}
+
 	/*
 	 * Returns a mapping of all topic hrefs to ITopics.
 	 */
@@ -108,51 +114,71 @@ public class Toc extends UAElement implements IToc {
 		}
 		return href2TopicMap;
 	}
-	
+
 	public String getLabel() {
 		return getAttribute(ATTRIBUTE_LABEL);
 	}
-	
+
 	public String getLinkTo() {
 		return getAttribute(ATTRIBUTE_LINK_TO);
 	}
-	
+
 	public String getTopic() {
 		return getAttribute(ATTRIBUTE_TOPIC);
 	}
-	
+
 	public ITopic getTopic(String href) {
 		if (href == null) {
 			if (topic == null) {
-				topic = new ITopic() {
+				topic = new ITopic2() {
+
 					public String getHref() {
 						return getTopic();
 					}
+
 					public String getLabel() {
 						return Toc.this.getLabel();
 					}
+
 					public ITopic[] getSubtopics() {
 						return getTopics();
 					}
+
 					public boolean isEnabled(IEvaluationContext context) {
 						return Toc.this.isEnabled(context);
 					}
+
 					public IUAElement[] getChildren() {
 						return new IUAElement[0];
 					}
+
+					public ICriteria[] getCriteria() {
+						return Toc.this.getCriteria();
+					}
+
+					public String getIcon() {
+						return null;
+					}
+
+					public boolean isSorted() {
+						return false;
+					}
 				};
 			}
 			return topic;
-		}
-		else {
-			return (ITopic)getHref2TopicMap().get(href);
+		} else {
+			return (ITopic) getHref2TopicMap().get(href);
 		}
 	}
 
 	public ITopic[] getTopics() {
-		return (ITopic[])getChildren(ITopic.class);
+		return (ITopic[]) getChildren(ITopic.class);
 	}
 	
+	public ICriteria[] getCriteria() {
+		return (ICriteria[]) getChildren(ICriteria.class);
+	}
+
 	public void setLabel(String label) {
 		setAttribute(ATTRIBUTE_LABEL, label);
 	}
@@ -164,16 +190,17 @@ public class Toc extends UAElement implements IToc {
 	public void setTopic(String href) {
 		setAttribute(ATTRIBUTE_TOPIC, href);
 	}
-	
+
 	public void setHref(String href) {
 		setAttribute(ATTRIBUTE_HREF, href);
 	}
-	
+
 	public ITocContribution getTocContribution() {
 		return contribution;
 	}
-	
+
 	public void setTocContribution(ITocContribution contribution) {
 		this.contribution = contribution;
 	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
index e0977c8..2e7bcb2 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocAssembler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,12 +20,14 @@ import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
+import org.eclipse.help.ICriteria;
 import org.eclipse.help.ITocContribution;
 import org.eclipse.help.IUAElement;
 import org.eclipse.help.internal.Anchor;
 import org.eclipse.help.internal.HelpPlugin;
 import org.eclipse.help.internal.Topic;
 import org.eclipse.help.internal.UAElement;
+import org.eclipse.help.internal.criteria.CriteriaProviderRegistry;
 import org.eclipse.help.internal.dynamic.DocumentProcessor;
 import org.eclipse.help.internal.dynamic.DocumentReader;
 import org.eclipse.help.internal.dynamic.ExtensionHandler;
@@ -431,6 +433,9 @@ public class TocAssembler {
 				if (href != null) {
 					topic.setHref(normalize(href, id));
 				}
+				
+				processCriteria(element, id);
+				
 				return HANDLED_CONTINUE;
 			}
 			else if (element instanceof Toc) {
@@ -440,6 +445,9 @@ public class TocAssembler {
 				if (topic != null) {
 					toc.setTopic(normalize(topic, id));
 				}
+				
+				processCriteria(element, id);
+				
 				return HANDLED_CONTINUE;
 			}
 			return UNHANDLED;
@@ -460,5 +468,23 @@ public class TocAssembler {
 			}
 			return href;
 		}
+		
+		private void processCriteria(UAElement element, String id) {
+			if(HelpPlugin.getCriteriaManager().isCriteriaEnabled()){
+				ITocContribution contribution = getContribution(id);
+				String locale = contribution.getLocale();
+				ICriteria[] criteria = new ICriteria[0];
+				if (element instanceof Topic) {
+					Topic topic = (Topic) element;
+					criteria = CriteriaProviderRegistry.getInstance().getAllCriteria(topic);
+				}
+				else if (element instanceof Toc) {
+					Toc toc = (Toc) element;
+					criteria = CriteriaProviderRegistry.getInstance().getAllCriteria(toc);
+				}
+
+				HelpPlugin.getCriteriaManager().addCriteriaValues(criteria, locale);
+			}
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
index 2d37592..1242c01 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,16 +30,20 @@ public class TocFileParser extends DefaultHandler {
 		}
 		InputStream in = tocFile.getInputStream();
     	if (in != null) {
-			Toc toc = (Toc)reader.read(in);
-			TocContribution contribution = new TocContribution();
-			contribution.setCategoryId(tocFile.getCategory());
-			contribution.setContributorId(tocFile.getPluginId());
-			contribution.setExtraDocuments(DocumentFinder.collectExtraDocuments(tocFile));
-			contribution.setId(HrefUtil.normalizeHref(tocFile.getPluginId(), tocFile.getFile()));
-			contribution.setLocale(tocFile.getLocale());
-			contribution.setToc(toc);
-			contribution.setPrimary(tocFile.isPrimary());
-	    	return contribution;
+			try {
+				Toc toc = (Toc) reader.read(in);
+				TocContribution contribution = new TocContribution();
+				contribution.setCategoryId(tocFile.getCategory());
+				contribution.setContributorId(tocFile.getPluginId());
+				contribution.setExtraDocuments(DocumentFinder.collectExtraDocuments(tocFile));
+				contribution.setId(HrefUtil.normalizeHref(tocFile.getPluginId(), tocFile.getFile()));
+				contribution.setLocale(tocFile.getLocale());
+				contribution.setToc(toc);
+				contribution.setPrimary(tocFile.isPrimary());
+				return contribution;
+			} finally {
+				in.close();
+			}
     	}
     	else {
     		throw new FileNotFoundException();
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
index 165a350..c74e954 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,8 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.help.AbstractTocProvider;
 import org.eclipse.help.ITocContribution;
 import org.eclipse.help.internal.HelpPlugin;
+import org.eclipse.help.internal.util.ResourceLocator;
+import org.xml.sax.SAXParseException;
 
 /*
  * Provides toc data from toc XML files to the help system.
@@ -46,8 +48,19 @@ public class TocFileProvider extends AbstractTocProvider {
 				contributions.add(toc);
 			}
 			catch (Throwable t) {
-				String msg = "Error reading help table of contents file /\"" + tocFiles[i].getPluginId() + '/' + tocFiles[i].getFile() + "\" (skipping file)"; //$NON-NLS-1$ //$NON-NLS-2$
-				HelpPlugin.logError(msg, t);
+				String locationInfo = ""; //$NON-NLS-1$
+				if (t instanceof SAXParseException) {
+					SAXParseException spe = (SAXParseException) t;
+					locationInfo = " at line " + spe.getLineNumber()  //$NON-NLS-1$
+					             + ", column " + spe.getColumnNumber(); //$NON-NLS-1$
+				}
+				String pluginId = tocFiles[i].getPluginId();
+				String file = tocFiles[i].getFile();
+				String msg = "Error reading help table of contents file /\""  //$NON-NLS-1$
+					+ ResourceLocator.getErrorPath(pluginId, file, locale)
+					+ locationInfo 
+					+ "\" (skipping file)"; //$NON-NLS-1$
+				HelpPlugin.logError(msg, t);			
 			}
 		}
 		return (ITocContribution[])contributions.toArray(new ITocContribution[contributions.size()]);
@@ -82,4 +95,11 @@ public class TocFileProvider extends AbstractTocProvider {
 		}
 		return (TocFile[])tocFiles.toArray(new TocFile[tocFiles.size()]);
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.help.AbstractTocProvider#getPriority()
+	 */
+	public int getPriority() {
+		return TOC_FILE_PRIORITY;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
index 3442436..f911f2a 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocManager.java
@@ -13,6 +13,7 @@ package org.eclipse.help.internal.toc;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -81,6 +82,10 @@ public class TocManager {
 				}
 			}
 			tocs = (Toc[])orderedTocs.toArray(new Toc[orderedTocs.size()]);
+			TopicSorter topicSorter = new TopicSorter();
+			for (int i = 0; i < tocs.length; i++) {
+				topicSorter.sortChildren(tocs[i]);
+			}
 			tocsByLocale.put(locale, tocs);
 			long stop = System.currentTimeMillis();
 			if (HelpPlugin.DEBUG_TOC) {
@@ -197,7 +202,7 @@ public class TocManager {
 	private synchronized TocContribution[] getAndCacheTocContributions(String locale, Map contributionsByLocale) {
 		TocContribution[] cached = (TocContribution[])contributionsByLocale.get(locale);
 		if (cached == null) {
-			List contributions = new ArrayList();
+			HashMap contributions = new HashMap();
 			AbstractTocProvider[] providers = getTocProviders();
 			for (int i=0;i<providers.length;++i) {
 				ITocContribution[] contrib;
@@ -215,7 +220,8 @@ public class TocManager {
 						Toc t = toc instanceof Toc ? (Toc)toc : (Toc)UAElementFactory.newElement(toc);
 						t.setLinkTo(contrib[j].getLinkTo());
 						contribution.setToc(t);
-						contributions.add(contribution);
+						if(!contributions.containsKey(contrib[j].getId()))
+							contributions.put(contrib[j].getId(), contribution);
 					}
 				}
 				catch (Throwable t) {
@@ -226,7 +232,7 @@ public class TocManager {
 				}
 				
 			}
-			cached = (TocContribution[])contributions.toArray(new TocContribution[contributions.size()]);
+			cached = (TocContribution[])contributions.values().toArray(new TocContribution[contributions.size()]);
 			contributionsByLocale.put(locale, cached);
 		}
 		return cached;
@@ -242,6 +248,7 @@ public class TocManager {
 		tocsByLocale.clear();
 		tocsById.clear();
 		tocsByTopic = null;
+		tocProviders=null;
 	}
 
 	/*
@@ -266,6 +273,7 @@ public class TocManager {
 					}
 				}
 			}
+			Collections.sort(providers, new TocProviderComparator());
 			tocProviders = (AbstractTocProvider[])providers.toArray(new AbstractTocProvider[providers.size()]);
 		}
 		return tocProviders;
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocProviderComparator.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocProviderComparator.java
new file mode 100644
index 0000000..9b1eeca
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TocProviderComparator.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.toc;
+
+import java.util.Comparator;
+
+import org.eclipse.help.AbstractTocProvider;
+
+
+public class TocProviderComparator implements Comparator{
+
+	public int compare(Object obj1,Object obj2)
+	{
+		AbstractTocProvider provider1 = (AbstractTocProvider)obj1;
+		AbstractTocProvider provider2 = (AbstractTocProvider)obj2;
+		
+		if(provider1.getPriority()<provider2.getPriority())
+			return -1;
+		else if(provider1.getPriority()>provider2.getPriority())
+			return 1;
+		else
+			return 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
new file mode 100644
index 0000000..81113bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/toc/TopicSorter.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.help.internal.toc;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.eclipse.help.ITopic;
+import org.eclipse.help.internal.Topic;
+import org.eclipse.help.internal.UAElement;
+
+import com.ibm.icu.text.Collator;
+
+/*
+ * Handles the "sort" attribute on topics and tocs
+ */
+public class TopicSorter {
+	
+	private Comparator comparator;
+	
+	public void sortChildren(Toc toc) {
+		if (comparator == null) {
+			comparator = new TopicComparator();
+		}
+		if (toc.isSorted()) { 
+			sort(toc, toc.getTopics());
+	    }
+		ITopic[] childTopics = toc.getTopics();
+		for (int i = 0; i < childTopics.length; i++) {
+			sortChildren((Topic)childTopics[i]);
+		}
+	}
+	
+	private void sortChildren(Topic topic) {
+		if (topic.isSorted()) { 
+			sort(topic, topic.getSubtopics());
+	    }
+		ITopic[] childTopics = topic.getSubtopics();
+		for (int i = 0; i < childTopics.length; i++) {
+			sortChildren((Topic)childTopics[i]);
+		}
+	}
+
+	private class TopicComparator implements Comparator {
+		Collator collator = Collator.getInstance();
+		
+		public int compare(Object o1, Object o2) {
+			String label1 = ((ITopic)o1).getLabel();
+			String label2 = ((ITopic)o2).getLabel();
+			return collator.compare(label1, label2);
+		}	
+	}
+	
+	/*
+	 * Sort the given node's descendants recursively using the given
+	 * Comparator.
+	 */
+	private void sort(UAElement element, ITopic[] children) {
+		// sort children
+		if (children.length > 1) {
+			for (int i=0;i<children.length;++i) {
+				element.removeChild((UAElement)children[i]);
+			}
+			Arrays.sort(children, comparator);
+			for (int i=0;i<children.length;++i) {
+				element.appendChild((UAElement)children[i]);
+			}
+		}
+	}
+}
+
+	
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
index 0a97986..23cc059 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ProductPreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Plugin;
+import org.eclipse.help.HelpSystem;
 import org.eclipse.help.internal.HelpData;
 import org.eclipse.help.internal.HelpPlugin;
 import org.osgi.framework.Bundle;
@@ -461,4 +462,11 @@ public class ProductPreferences {
 		}
 		return path;
 	}
+	
+	public static boolean useEnablementFilters() {
+		if (!HelpSystem.isShared()) {
+			return true;
+		}
+		return Platform.getPreferencesService().getBoolean(HelpPlugin.PLUGIN_ID, HelpPlugin.FILTER_INFOCENTER_KEY, false, null); 
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
index 52506d7..9eaeec6 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/ResourceLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,7 +119,7 @@ public class ResourceLocator {
 	}
 
 	/**
-	 * Obtains content proivider for a documentation plug-in, creates one if necessary.
+	 * Obtains content provider for a documentation plug-in, creates one if necessary.
 	 * 
 	 * @param pluginId
 	 * @return ITopicContentProvider or null
@@ -467,4 +467,23 @@ public class ResourceLocator {
 			}
 		}
 	}
+	
+	/**
+	 * Create a path for use in error messages that will identify the plugin and
+	 * file name as well as a resolved path (if available) which will give 
+	 * information about which fragment the file was located in
+	 * @return pluginId/file followed by a resolved path if the file exists
+	 */
+	public static String getErrorPath(String pluginId, String file, String locale)  {
+		String resolvedPath = pluginId + '/' + file;
+		try {
+			ArrayList pathPrefix = ResourceLocator.getPathPrefix(locale);
+			Bundle bundle = Platform.getBundle(pluginId);
+			URL rawURL = ResourceLocator.find(bundle, new Path(file), pathPrefix);
+			URL resolvedURL = FileLocator.resolve(rawURL);
+			resolvedPath += ", URL = " + resolvedURL.toExternalForm(); //$NON-NLS-1$
+		} catch (Exception e) {
+		}
+		return resolvedPath;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
index 100c738..98d4b22 100644
--- a/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
+++ b/eclipse/plugins/org.eclipse.help/src/org/eclipse/help/internal/util/URLCoder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,15 @@ public class URLCoder {
 
 	public static String encode(String s) {
 		try {
-			return urlEncode(s.getBytes("UTF8")); //$NON-NLS-1$
+			return urlEncode(s.getBytes("UTF8"), true); //$NON-NLS-1$
+		} catch (UnsupportedEncodingException uee) {
+			return null;
+		}
+	}
+	
+	public static String compactEncode(String s) {
+		try {
+			return urlEncode(s.getBytes("UTF8"), false); //$NON-NLS-1$
 		} catch (UnsupportedEncodingException uee) {
 			return null;
 		}
@@ -31,15 +39,25 @@ public class URLCoder {
 		}
 	}
 
-	private static String urlEncode(byte[] data) {
+	private static String urlEncode(byte[] data, boolean encodeAllCharacters) {
 		StringBuffer buf = new StringBuffer(data.length);
 		for (int i = 0; i < data.length; i++) {
-			buf.append('%');
-			buf.append(Character.forDigit((data[i] & 240) >>> 4, 16));
-			buf.append(Character.forDigit(data[i] & 15, 16));
+			byte nextByte = data[i];
+			if (!encodeAllCharacters && isAlphaNumericOrDot(nextByte)) {
+				buf.append((char)nextByte);
+			} else {
+				buf.append('%');
+				buf.append(Character.forDigit((nextByte & 240) >>> 4, 16));
+				buf.append(Character.forDigit(nextByte & 15, 16));
+			}
 		}
 		return buf.toString();
 	}
+	
+	private static boolean isAlphaNumericOrDot(byte b) {
+		return (b >= '0' && b <= '9') || (b >= 'a' && b <= 'z') || ( b >= 'A' && b <= 'Z') 
+		   || b == '.';
+	}
 
 	private static byte[] urlDecode(String encodedURL) {
 		int len = encodedURL.length();
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
index 3a9ce93..e8d8521 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.apt.core; singleton:=true
-Bundle-Version: 3.3.202.qualifier
+Bundle-Version: 3.3.402.qualifier
 Bundle-Localization: plugin
 Export-Package: com.sun.mirror.apt,
  com.sun.mirror.declaration,
@@ -18,9 +18,9 @@ Export-Package: com.sun.mirror.apt,
  org.eclipse.jdt.apt.core.internal.type;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.apt.tests,org.eclipse.jdt.apt.ui,org.eclipse.jdt.apt.pluggable.tests",
  org.eclipse.jdt.apt.core.internal.util;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.apt.tests,org.eclipse.jdt.apt.ui,org.eclipse.jdt.apt.pluggable.tests",
  org.eclipse.jdt.apt.core.util
-Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
+Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.5.100,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
  org.apache.ant;bundle-version="[1.6.5,1.8)"
 Bundle-Activator: org.eclipse.jdt.apt.core.internal.AptPlugin
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/build_notes.html b/eclipse/plugins/org.eclipse.jdt.apt.core/build_notes.html
index 25eba41..c5d44e3 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/build_notes.html
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/build_notes.html
@@ -4,24 +4,56 @@
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Build" content="Build">
-   <title>Eclipse Platform Release Notes (3.5.1) - JDT Annotation Processing</title>
+   <title>Eclipse Platform Release Notes (3.6) - JDT Annotation Processing</title>
 </head>
 
 <body>
-<h1>Eclipse Platform Build Notes (3.5.1)<br>
+
+<h1>Eclipse Platform Build Notes (3.6)<br>
 JDT Annotation Processing</h1>
+<p>Integration Build (January 20, 2011)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301894">Bug 301894</a>. OutOfMemory error when building a large project with annotations<br>
+  </p>
+
+<p>Integration Build (July 26, 2010, 11:09 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320195">Bug 320195</a>. Eclipse hangs when processing annotation (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 06, 2010, 9:58 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313324">Bug 313324</a>. Suspicious fall-through (NEW)<br>
+  </p>
+
+<p>Integration Build (April 20, 2010, 11:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261969">Bug 261969</a>. classElement.getAnnotation(...).value() returns null in some cases for String[] properties (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290780">Bug 290780</a>. org.eclipse.jdt.compiler.apt does not export all its packages (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308555">Bug 308555</a>. The ".factorypath" doesn't have a team file type registered (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 21, 2009, 10:36 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290027">Bug 290027</a>. Use IResource#setDerived(boolean, IProgressMonitor) instead of IResource#setDerived(boolean) (NEW)<br>
+  </p>
 
-<p>Integration Build (August 21, 2009, 11:10 p.m.)</p>
+<p>Integration Build (August 21, 2009, 11:24 p.m.) - 3.5.1</p>
 <p>Problem reports updated</p>
 <p>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287323">Bug 287323</a>. [compiler][apt] Error type detection is too conservative (FIXED)<br>
 </p>
 
 <p>Integration Build (August 17, 2009, 11:24 p.m.)</p>
-  <p>Problem reports updated</p>
-  <p>
+<p>Problem reports updated</p>
+<p>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285838">Bug 285838</a>. [apt] IdeFilerImpl breaks javax.annotation.processing.Filer contract (FIXED)<br>
-  </p>
+</p>
 
 <p>Integration Build (April 26, 2009, 12:24 a.m.)</p>
   <p>Problem reports updated</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/design-notes.html b/eclipse/plugins/org.eclipse.jdt.apt.core/design-notes.html
new file mode 100644
index 0000000..c79e6f0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/design-notes.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>Eclipse APT Design Notes</title>
+</head>
+<body lang="EN-US">
+<h1>Overview</h1>
+<p>Annotation processors may implement either the Java 5 com.sun.mirror.apt interfaces or the
+Java 6 javax.annotation.processing interfaces. The two interfaces are functionally similar but
+the details are different. Note that although the Java 5 apt tool has been deprecated by Sun,
+it is still included in the Java 6 JDK and developers continue to write processors against it.
+However, the com.sun.mirror.apt interface is considered proprietary and there are no Java
+compliance tests which validate it.
+</p>
+
+<h1>Build Process</h1>
+<p>The JDT system performs three kinds of build: full build, incremental build, and reconcile. When
+a single file is edited and saved (if autobuild is enabled) or manually built, an incremental
+build is performed: only the affected files will be rebuilt. This will include the edited file
+as well as any other files with relevant dependencies on the edited file. After a clean, or
+when incremental build detects an overwhelming number of files needing to be rebuilt, a full
+build will be performed; in this case every file in the project will be rebuilt. During an
+editing session, prior to saving, a file will frequently be reconciled, in order to identify
+errors while typing. Reconcile operates on only a single file at a time.</p>
+<p>
+Java 5 and Java 6 processors are handled by different code and interact with the Eclipse Java
+compiler in different ways and at different points in the build cycle. This is partly for
+historical reasons and partly in order to support Java 6 processors in the context of the
+command-line Eclipse compiler (ecj.jar). The Java 5 annotation processing code is built against
+the JDT's public API; the Java 6 code uses internal interfaces within the compiler, which was
+necessary because the public APIs use platform classes not available in the command-line package.
+A pleasant consequence is that the Java 6 annotation processing code is somewhat easier
+to understand.</p>
+<p>
+The main challenge of introducing APT into Eclipse is that annotation processors can contribute
+additional Java types, which must in turn be compiled; this compilation can affect previously
+compiled types, because a formerly unresolved reference can be resolved. Because of this, it
+is necessary for annotation processing to be implemented within the compile process, rather than
+as a later build step.</p>
+<p>
+TODO: overview of build process, i.e., when Java 5 processors are called relative to Java 6 processors
+</p>
+<h2>Java 5 Build-time Processing</h2>
+<p>
+The invocation path for Java 5 processors is quite complex, in part because when Java 5 processing
+was implemented it was not possible to integrate it closely with the compiler, and in part for
+silly historical reasons that serve no current purpose. It is ripe for refactoring.</p>
+<p>
+A typical call stack when a Java 5 processor is invoked looks like this:</p>
+<pre>
+	SomeProcessor.process() line: xxx	
+	APTDispatchRunnable.dispatchToFileBasedProcessor(AbstractCompilationEnv, boolean, boolean) line: 628	
+	APTDispatchRunnable.runAPTInFileBasedMode(BuildEnv) line: 317	
+	APTDispatchRunnable.build(BuildEnv) line: 655	
+	APTDispatchRunnable.access$1(APTDispatchRunnable, BuildEnv) line: 647	
+	APTDispatchRunnable$1.run(AbstractCompilationEnv) line: 265	
+	BuildEnv$CallbackRequestor.acceptBinding(String, IBinding) line: 611	
+	CompilationUnitResolver.resolve(ICompilationUnit[], String[], ASTRequestor, int, Map, WorkingCopyOwner, int) line: 766	
+	CompilationUnitResolver.resolve(ICompilationUnit[], String[], ASTRequestor, int, Map, IJavaProject, WorkingCopyOwner, int, IProgressMonitor) line: 478	
+	ASTParser.createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor) line: 737	
+	BaseProcessorEnv.createASTs(IJavaProject, ICompilationUnit[], ASTRequestor) line: 856	
+	BuildEnv.createASTs(BuildContext[]) line: 356	
+	AbstractCompilationEnv.newBuildEnv(BuildContext[], BuildContext[], IJavaProject, AbstractCompilationEnv$EnvCallback) line: 111	
+	APTDispatchRunnable.build() line: 271	
+	APTDispatchRunnable.run(IProgressMonitor) line: 217	
+	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1800	
+	APTDispatchRunnable.runAPTDuringBuild(BuildContext[], BuildContext[], Map<IFile,CategorizedProblem[]>, AptProject, Map<AnnotationProcessorFactory,Attributes>, Set<AnnotationProcessorFactory>, boolean) line: 142	
+	AptCompilationParticipant.processAnnotations(BuildContext[]) line: 193	
+	IncrementalImageBuilder(AbstractImageBuilder).processAnnotations(CompilationParticipantResult[]) line: 627	
+	IncrementalImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 338	
+	IncrementalImageBuilder.build(SimpleLookupTable) line: 134	
+	JavaBuilder.buildDeltas(SimpleLookupTable) line: 265	
+	JavaBuilder.build(int, Map, IProgressMonitor) line: 193	
+	[higher calls omitted for brevity]
+</pre>
+<p>
+Java 5 processors are invoked via the CompilationParticipant interface. The Java compiler calls
+AptCompilationParticipant.processAnnotations(), passing in a list of all the files being built.
+Note that the compiler may break large projects into multiple groups of files, resulting in
+multiple calls to processAnnotations(). Files are marked with whether or not they contain annotations.</p>
+<p>
+Within processAnnotations(), annotation processor factories are discovered from the processor
+factory path (and cached for subsequent invocations); factories and files are then passed in to
+APTDispatchRunnable.runAPTDuringBuild(). This in turn stores the information in a new instance of
+APTDispatchRunnable, and invokes its run() method within a workspace.run() operation.</p>
+<p>
+The run() method invokes BuildEnv.newBuildEnv(), passing in the AptDispatchRunnable as a callback.
+The newBuildEnv() method creates a BuildEnv, gets compilation units for each of the files being
+compiled, and then requests ASTs for each of the files. The parser is passed an ASTRequestor
+callback that is implemented by an inner class of the BuildEnv; in this way, when the ASTs are
+ready for consumption, APTDispatchRunnable.build(BuildEnv) is ultimately called, within the
+ASTRequestor callback.</p>
+<p>
+Finally, within build(), processors are selected on the basis of the
+annotations they support, and each processor's process() method is called on each appropriate file,
+configuring the BuildEnv before each process() invocation so that it will provide the correct data.
+The details of this vary depending on whether the processor is normal (file-based) or is marked
+as requiring batch mode.</p>
+<h3>Batch-mode Processors</h3>
+<p>Processors can be marked in the Advanced Factory Path Options dialog as requiring batch mode.
+If any of the processors on the project's factory path require batch mode, 
+AptDispatchRunnable.build(BuildEnv) calls runAPTInMixedMode(); if none of the processors
+requires batch mode, runAPTInFileBasedMode() is called instead. The chief difference is that
+batch-mode processors are only run during a full build, and that the batch-mode implementation of
+AnnotationProcessorEnvironment.getTypeDeclarations() returns all the compilation units in the
+build, whereas the normal implementation returns only a single compilation unit at a time.</p>
+<p>
+Additionally, a separate classloader is used to load batch-mode processors, and it is
+discarded after each build; thus the classes are reloaded for each build, and static variables
+are reinitialized. This is important because some processors written with command-line
+(non-incremental) compilation in mind store dynamic state in static variables and thus cannot
+be invoked multiple times.
+</p>
+<h3>File-mode Processors</h3>
+<p>Most processors are designed (or at least should be designed) to support incremental compilation,
+meaning that within the AnnotationProcessor.process() invocation, if the processor calls
+AnnotationProcessorEnvironment.getTypeDeclarations(), it will only retrieve a single type at a
+time; the process() method will be called repeatedly during the course of a build so that all
+files are eventually processed.
+</p>
+<h2>Java 6 Build-time Processing</h2>
+<p>
+The invocation process for Java 6 processors is more straightforward. A typical call stack looks
+like this:</p>
+<pre>
+	ModelTesterProc.process(Set<TypeElement>, RoundEnvironment) line: 107	
+	RoundDispatcher.handleProcessor(ProcessorInfo) line: 139	
+	RoundDispatcher.round() line: 121	
+	IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159	
+	IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134	
+	Compiler.processAnnotations() line: 810	
+	Compiler.compile(ICompilationUnit[]) line: 428	
+	IncrementalImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364	
+	IncrementalImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 321	
+	IncrementalImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301	
+	IncrementalImageBuilder.build(SimpleLookupTable) line: 134	
+	JavaBuilder.buildDeltas(SimpleLookupTable) line: 265	
+	JavaBuilder.build(int, Map, IProgressMonitor) line: 193	
+	[higher calls omitted for brevity]
+</pre> 
+<p>
+Note that the processing is performed by an IdeAnnotationProcessorManager; this is distinguished
+from the BatchAnnotationProcessorManager, which would be used if processing was invoked from a
+command line (ecj.jar) compilation. Command-line compilation with ecj.jar uses the same typesystem
+implementation as IDE compilation, but somewhat different Messager and Filer implementations.
+</p>
+<h2>Reconcile-time Processing</h2>
+<p>
+Reconcile-time processing is only supported for Java 5 processors. This is chiefly because, after 
+developing the Java 5 processing implementation, it became clear that writing highly-performant
+annotation processors requires a level of compiler experience that most programmers do not have,
+and if less-performant processors are inserted into the reconcile step, reconcile can become
+painfully and confusingly slow. Thus when the Java 6 processing implementation was added it was
+decided to not support reconcile-time processing. Eclipse's effectiveness as an IDE depends on 
+reconcile being an extremely fast operation. In hindsight, edit-time processing should have been 
+limited to reporting errors, and should have been implemented as a background validation task 
+rather than within the reconcile step.</p>
+<p>
+TODO: describe practical differences between reconcile and build.</p>
+<p>
+The stack trace of a typical reconcile-time invocation looks like this:</p>
+<pre>
+	SomeProcessor.process() line: xxx	
+	APTDispatchRunnable.dispatchToFileBasedProcessor(AbstractCompilationEnv, boolean, boolean) line: 628	
+	APTDispatchRunnable.access$0(APTDispatchRunnable, AbstractCompilationEnv, boolean, boolean) line: 598	
+	APTDispatchRunnable$ReconcileEnvCallback.run(AbstractCompilationEnv) line: 77	
+	ReconcileEnv$CallbackRequestor.acceptBinding(String, IBinding) line: 135	
+	CompilationUnitResolver.resolve(ICompilationUnit[], String[], ASTRequestor, int, Map, WorkingCopyOwner, int) line: 766	
+	CompilationUnitResolver.resolve(ICompilationUnit[], String[], ASTRequestor, int, Map, IJavaProject, WorkingCopyOwner, int, IProgressMonitor) line: 478	
+	ASTParser.createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor) line: 737	
+	BaseProcessorEnv.createASTs(IJavaProject, ICompilationUnit[], ASTRequestor) line: 856	
+	ReconcileEnv.openPipeline() line: 108	
+	AbstractCompilationEnv.newReconcileEnv(ReconcileContext, AbstractCompilationEnv$EnvCallback) line: 97	
+	APTDispatchRunnable.reconcile(ReconcileContext, IJavaProject) line: 211	
+	APTDispatchRunnable.runAPTDuringReconcile(ReconcileContext, AptProject, Map<AnnotationProcessorFactory,Attributes>) line: 159	
+	AptCompilationParticipant.reconcile(ReconcileContext) line: 223	
+	ReconcileWorkingCopyOperation$1.run() line: 257	
+	SafeRunner.run(ISafeRunnable) line: 42	
+	ReconcileWorkingCopyOperation.notifyParticipants(CompilationUnit) line: 244	
+	ReconcileWorkingCopyOperation.executeOperation() line: 94	
+	ReconcileWorkingCopyOperation(JavaModelOperation).run(IProgressMonitor) line: 728	
+	ReconcileWorkingCopyOperation(JavaModelOperation).runOperation(IProgressMonitor) line: 788	
+	CompilationUnit.reconcile(int, int, WorkingCopyOwner, IProgressMonitor) line: 1242	
+	JavaReconcilingStrategy.reconcile(ICompilationUnit, boolean) line: 126	
+	[higher calls omitted for brevity]
+</pre>
+
+<h1>Processor Callbacks</h1>
+<p>When annotation processors are invoked, they can in turn call back into the compiler through various
+interfaces in order to generate new files and report errors. The interfaces are naturally not the same as
+those used within the JDT compiler, so wrappers and proxies are employed to glue the different systems
+together. The most significant difference in systems is that, in both the Java 5 and Java 6 processor
+interfaces, the typesystem is separated into Type and Element hierarchies, in which a Type object
+represents a particular reification of a type while an Element represents a declaration in code. The
+distinction is easiest to understand in the context of generics: for example, the following code sample
+contains declarations of classes Lister and Test, which contain declarations of method get() and fields
+'strings' and 'numbers' respectively. The type of the return of get() is List<T>, the type of strings is
+Lister<String>, and the type of numbers is Lister<Number>. Note that the single declaration of Lister<T>
+was able to generate multiple Types.
+</p>
+<pre>
+  import java.util.List;
+  class Lister<T> {
+    List<T> get() { ... }
+  }
+  class Test {
+    Lister<String> strings;
+    Lister<Number> numbers;
+  }
+</pre>
+
+<h2>Java 5 Type System</h2>
+<p>TODO</p>
+
+<h2>Java 5 Filer and Messager</h2>
+<p>TODO</p>
+
+<h2>Java 6 Type System</h2>
+<p>TODO</p>
+
+<h2>Java 6 Filer and Messager</h2>
+<p>TODO</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/plugin.xml b/eclipse/plugins/org.eclipse.jdt.apt.core/plugin.xml
index 041aeb6..fc4d910 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
 
     
@@ -13,6 +24,14 @@
 	schema="schema/annotationProcessorFactory.exsd"/>
 
 <!-- =================================================================================== -->
+<!-- Extension Point: .factorypath File Type                                             -->
+<!-- =================================================================================== -->
+
+<extension point="org.eclipse.team.core.fileTypes">
+    <fileTypes extension="factorypath" type="text"/>
+</extension>
+
+<!-- =================================================================================== -->
 <!-- Extension: Compilation Participant                                                  -->
 <!-- =================================================================================== -->
 <extension
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/scripts/exportplugin.xml b/eclipse/plugins/org.eclipse.jdt.apt.core/scripts/exportplugin.xml
index c28cdc9..2e91faf 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/scripts/exportplugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/scripts/exportplugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <!-- 
  Build script to create the apt.core plugin. 
  This script assumes that the classes have already been compiled,
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/APTDispatchRunnable.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/APTDispatchRunnable.java
index ce75ab9..145fb20 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/APTDispatchRunnable.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/APTDispatchRunnable.java
@@ -1,5 +1,5 @@
  /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2011 BEA Systems, Inc. and others
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *    mkaufman at bea.com - initial API and implementation
+ *    IBM Corporation - modified to split files
  *******************************************************************************/
 
 
@@ -104,6 +105,7 @@ public class APTDispatchRunnable implements IWorkspaceRunnable
 	}
 	
 	private static final BuildContext[] NO_FILES_TO_PROCESS = new BuildContext[0];
+	private static final int MAX_FILES_PER_ITERATION = 1000;
 	private /*final*/ BuildContext[] _filesWithAnnotation = null;
 	private /*final*/ BuildContext[] _filesWithoutAnnotation = null;
 	private /*final*/ Map<IFile, CategorizedProblem[]> _problemRecorder = null;
@@ -114,7 +116,13 @@ public class APTDispatchRunnable implements IWorkspaceRunnable
 	/** Batch processor dispatched in the current round */
 	private Set<AnnotationProcessorFactory> _currentDispatchBatchFactories = Collections.emptySet();
 	private final boolean _isFullBuild;
+	private static final boolean SPLIT_FILES;
+	private static final String SPLIT_FILES_PROPERTY = "org.eclipse.jdt.apt.core.split_files"; //$NON-NLS-1$
 	
+	static {
+		String setting = System.getProperty(SPLIT_FILES_PROPERTY);
+		SPLIT_FILES = setting != null && setting.equalsIgnoreCase("true"); //$NON-NLS-1$
+	}
 	
 	public static Set<AnnotationProcessorFactory> runAPTDuringBuild(
 			BuildContext[] filesWithAnnotations, 
@@ -265,14 +273,33 @@ public class APTDispatchRunnable implements IWorkspaceRunnable
 					build((BuildEnv)env);
 				}
 			};
-			
-			// Construct build environment, this invokes the build inside a callback
-			// in order to keep open the DOM AST pipeline
-			BuildEnv.newBuildEnv( 
-					_filesWithAnnotation, 
-					_filesWithoutAnnotation, 
-					_aptProject.getJavaProject(),
-					buildCallback);
+			boolean split = false;
+			if (SPLIT_FILES && !hasBatchFactory()) { // don't split the files if batch processors are present
+				split = _filesWithAnnotation.length > MAX_FILES_PER_ITERATION ? true : false;
+			}
+			if (!split) {
+				// Construct build environment, this invokes the build inside a callback
+				// in order to keep open the DOM AST pipeline
+				BuildEnv.newBuildEnv(
+						_filesWithAnnotation,
+						_filesWithoutAnnotation,
+						_aptProject.getJavaProject(),
+						buildCallback);
+			} else {
+				for (int index = 0; index < _filesWithAnnotation.length;) {
+					int numberToProcess = (index + MAX_FILES_PER_ITERATION) > _filesWithAnnotation.length ? _filesWithAnnotation.length - index : MAX_FILES_PER_ITERATION;
+					BuildContext[] filesToProcess = new BuildContext[numberToProcess];			 
+					System.arraycopy(_filesWithAnnotation, index, filesToProcess, 0, numberToProcess);
+					// Construct build environment, this invokes the build inside a callback
+					// in order to keep open the DOM AST pipeline
+					BuildEnv.newBuildEnv( 
+							filesToProcess, 
+							_filesWithoutAnnotation, 
+							_aptProject.getJavaProject(),
+							buildCallback);
+					 index += numberToProcess;
+				}
+			}
 		}
 		
 		// We need to save the file dependency state regardless of whether any Java 5 processing
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ASTBasedDeclarationImpl.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ASTBasedDeclarationImpl.java
index 908f8e0..d35d5b7 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ASTBasedDeclarationImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ASTBasedDeclarationImpl.java
@@ -121,7 +121,7 @@ public abstract class ASTBasedDeclarationImpl extends EclipseDeclarationImpl {
 		return _getAnnotationMirrors(instances);		
     }
 	
-	@SuppressWarnings("unchecked") // DOM AST API returns raw collections
+	@SuppressWarnings("rawtypes") // DOM AST API returns raw collections
 	private IAnnotationBinding[] getAnnotationInstancesFromAST()
 	{	
 		IAnnotationBinding[] instances = null;
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/AnnotationValueImpl.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/AnnotationValueImpl.java
index 515b608..c573a6c 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/AnnotationValueImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/AnnotationValueImpl.java
@@ -92,7 +92,7 @@ public class AnnotationValueImpl implements EclipseMirrorObject, AnnotationValue
 		assert _parent != null : "missing element"; //$NON-NLS-1$
 	}
 	
-	@SuppressWarnings("unchecked") // DOM AST API returns raw collections
+	@SuppressWarnings("rawtypes") // DOM AST API returns raw collections
     public SourcePosition getPosition()
     {		
 		final MirrorKind kind = _parent.kind();
@@ -105,7 +105,8 @@ public class AnnotationValueImpl implements EclipseMirrorObject, AnnotationValue
 			break;
 		case ANNOTATION_ELEMENT:
 			final AnnotationElementDeclarationImpl element = (AnnotationElementDeclarationImpl)_parent;
-			astNode = element.getAstNodeForDefault();			
+			astNode = element.getAstNodeForDefault();
+			break;
 		default:
 			throw new IllegalStateException(); // should never reach this point.
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ClassDeclarationImpl.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ClassDeclarationImpl.java
index 4b97436..544ad1d 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ClassDeclarationImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/ClassDeclarationImpl.java
@@ -46,7 +46,7 @@ public class ClassDeclarationImpl extends TypeDeclarationImpl implements ClassDe
         visitor.visitClassDeclaration(this);
     }
     
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
 	private void getASTConstructor(
     		final AbstractTypeDeclaration typeDecl,
     		final List<ConstructorDeclaration> results){
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/TypeDeclarationImpl.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/TypeDeclarationImpl.java
index 0869deb..8266c87 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/TypeDeclarationImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/declaration/TypeDeclarationImpl.java
@@ -77,7 +77,7 @@ public abstract class TypeDeclarationImpl extends MemberDeclarationImpl
 
     public ITypeBinding getTypeBinding(){ return (ITypeBinding)_binding; }
     
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"rawtypes", "unchecked"})
 	private void getASTFields(
     		final AbstractTypeDeclaration typeDecl, 
     		final List<FieldDeclaration> results){
@@ -237,7 +237,7 @@ public abstract class TypeDeclarationImpl extends MemberDeclarationImpl
     /**
      * create mirror methods that does not have a binding represention.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
 	protected void getASTMethods(
     		final AbstractTypeDeclaration typeDecl, 
     		final List<MethodDeclaration> results){
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
index 8e86472..68b1bb2 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java
@@ -709,7 +709,7 @@ public class BaseProcessorEnv implements AnnotationProcessorEnvironment
         		parser.setBindingsRecovery(true);
                 parser.setSource(unit);
 				parser.setFocalPosition(0);
-				parser.setIgnoreMethodBodies(true);
+                parser.setIgnoreMethodBodies(true);
                 CompilationUnit resultUnit = (CompilationUnit)parser.createAST(null);
                 _modelCompUnit2astCompUnit.put(unit, resultUnit);
                 return resultUnit;
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BinaryFileOutputStream.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BinaryFileOutputStream.java
index 1e44b2f..6eaadfd 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BinaryFileOutputStream.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BinaryFileOutputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc. 
+ * Copyright (c) 2005, 2009 BEA Systems, Inc. 
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.io.InputStream;
 import java.util.Collections;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.apt.core.internal.AptPlugin;
 import org.eclipse.jdt.apt.core.internal.util.FileSystemUtil;
@@ -98,10 +99,8 @@ public class BinaryFileOutputStream extends ByteArrayOutputStream {
 		try {
 			FileSystemUtil.makeDerivedParentFolders(_file.getParent());
 			if (create) {
-				_file.create(toSave, true, null);
-				_file.setDerived(true);
-			}
-			else {
+				_file.create(toSave, IResource.FORCE | IResource.DERIVED, null);
+			} else {
 				_file.setContents(toSave, true, false, null);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedFileManager.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedFileManager.java
index accef59..cd877b4 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedFileManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/generatedfile/GeneratedFileManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 BEA Systems, Inc. and others
+ * Copyright (c) 2005, 2009 BEA Systems, Inc. and others
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -532,7 +532,7 @@ public class GeneratedFileManager
 				// Mark all newly created folders (but not pre-existing ones) as derived.  
 				for (IContainer folder : newFolders) {
 					try {
-						folder.setDerived(true);
+						folder.setDerived(true, progressMonitor);
 					} catch (CoreException e) {
 						AptPlugin.logWarning(e, "Unable to mark generated type folder as derived: " + folder.getName()); //$NON-NLS-1$
 						break;
@@ -553,7 +553,7 @@ public class GeneratedFileManager
 			// deleted this file before we get here, so if the file doesn't
 			// exist, marking it derived throws a ResourceException.
 			if (file.exists()) {
-				file.setDerived(true);
+				file.setDerived(true, progressMonitor);
 			}
 			// We used to also make the file read-only. This is a bad idea,
 			// as refactorings then fail in the future, which is worse
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/FileSystemUtil.java b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/FileSystemUtil.java
index ab6ffd5..52dedcb 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/FileSystemUtil.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/util/FileSystemUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2009 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -120,7 +120,7 @@ public final class FileSystemUtil
 	    			throw e;
 	    		}
 	    	}
-			container.setDerived(true);
+			container.setDerived(true, null);
 		}
     }
     
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
index 7efb556..4f9cccd 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.apt.pluggable.core;singleton:=true
-Bundle-Version: 1.0.201.qualifier
+Bundle-Version: 1.0.301.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.apt.pluggable.core.Apt6Plugin
 Bundle-Vendor: %providerName
 Require-Bundle: org.eclipse.core.runtime,
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/plugin.xml b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/plugin.xml
index 84942a7..59efc9e 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
    <extension
          point="org.eclipse.jdt.core.annotationProcessorManager">
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
index 2cfca87..a89aed2 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 - 2009 BEA Systems, Inc. and others
+ * Copyright (c) 2007 - 2010 BEA Systems, Inc. and others
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.util.HashSet;
 import java.util.Set;
 
 import javax.annotation.processing.Filer;
+import javax.annotation.processing.FilerException;
 import javax.lang.model.element.Element;
 import javax.tools.FileObject;
 import javax.tools.JavaFileObject;
@@ -31,6 +32,7 @@ import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.apt.core.internal.AptCompilationParticipant;
 import org.eclipse.jdt.apt.core.internal.generatedfile.GeneratedSourceFolderManager;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.apt.pluggable.core.Apt6Plugin;
@@ -90,8 +92,10 @@ public class IdeFilerImpl implements Filer {
 			throw new IllegalArgumentException("Relative name is zero length");
 		}
 		IFile file = getFileFromOutputLocation(location, pkg, relativeName);
+		if (AptCompilationParticipant.getInstance().getJava6GeneratedFiles().contains(file)) {
+			throw new FilerException("Source file already created: " + file.getFullPath()); //$NON-NLS-1$
+		}
 		
-		//TODO: check whether file has already been generated in this run
 		Set<IFile> parentFiles;
 		if (originatingElements != null && originatingElements.length > 0) {
 			parentFiles = new HashSet<IFile>(originatingElements.length);
@@ -120,7 +124,11 @@ public class IdeFilerImpl implements Filer {
 		if (null == name) {
 			throw new IllegalArgumentException("Name is null");
 		}
-		//TODO: check whether file has already been generated in this run
+		IFile file = _env.getAptProject().getGeneratedFileManager().getIFileForTypeName(name.toString());
+		if (AptCompilationParticipant.getInstance().getJava6GeneratedFiles().contains(file)) {
+			throw new FilerException("Source file already created: " + file.getFullPath()); //$NON-NLS-1$
+		}
+		
 		Set<IFile> parentFiles = Collections.emptySet();
 		if (originatingElements != null && originatingElements.length > 0) {
 			parentFiles = new HashSet<IFile>(originatingElements.length);
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
index 4095661..d414490 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeNonSourceOutputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 BEA Systems, Inc.
+ * Copyright (c) 2007, 2009 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.io.InputStream;
 import java.util.Collection;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.apt.core.internal.env.BinaryFileOutputStream;
 import org.eclipse.jdt.apt.core.internal.util.FileSystemUtil;
@@ -100,8 +101,7 @@ public class IdeNonSourceOutputStream  extends ByteArrayOutputStream
 		try {
 			FileSystemUtil.makeDerivedParentFolders(_file.getParent());
 			if (create) {
-				_file.create(toSave, true, null);
-				_file.setDerived(true);
+				_file.create(toSave, IResource.FORCE | IResource.DERIVED, null);
 			}
 			else {
 				_file.setContents(toSave, true, false, null);
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
index ebf88a7..831563d 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.apt.ui; singleton:=true
-Bundle-Version: 3.3.200.qualifier
+Bundle-Version: 3.3.300.qualifier
 Bundle-Activator: org.eclipse.jdt.apt.ui.internal.AptUIPlugin
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.jdt.apt.core;bundle-version="[3.2.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.ui/plugin.xml b/eclipse/plugins/org.eclipse.jdt.apt.ui/plugin.xml
index bd7907d..f3f10e4 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.apt.ui/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
 
 <!-- =================================================================================== -->
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.ui/scripts/exportplugin.xml b/eclipse/plugins/org.eclipse.jdt.apt.ui/scripts/exportplugin.xml
index 4db455a..7a066a1 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.ui/scripts/exportplugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.apt.ui/scripts/exportplugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <!-- 
  Build script to create the apt.ui plugin. 
  This script assumes that the classes have already been compiled,
diff --git a/eclipse/plugins/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
index 88e02af..a31be8d 100644
--- a/eclipse/plugins/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
@@ -121,7 +121,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
 			}
 		}
 
-		@SuppressWarnings("unchecked")
+		@SuppressWarnings("rawtypes")
 		public void selectionChanged(ListDialogField field) {
 			List selectedElements= field.getSelectedElements();
 			field.enableButton(IDX_EDIT, canEdit(field, selectedElements));
@@ -135,7 +135,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
 			updateModel(field);
 		}
 
-		@SuppressWarnings("unchecked")
+		@SuppressWarnings("rawtypes")
 		private boolean canEdit(DialogField field, List selectedElements) {
 			if (!field.isEnabled())
 				return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
index 8f03f22..e9d5a1a 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
@@ -2,12 +2,13 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.jdt.compiler.apt;singleton:=true
-Bundle-Version: 1.0.201.qualifier
+Bundle-Version: 1.0.300.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)"
 Bundle-Localization: compiler_apt_fragment
 Export-Package: org.eclipse.jdt.internal.compiler.apt.dispatch;x-friends:="org.eclipse.jdt.apt.pluggable.core",
  org.eclipse.jdt.internal.compiler.apt.model;x-friends:="org.eclipse.jdt.apt.pluggable.core",
- org.eclipse.jdt.internal.compiler.apt.util;x-friends:="org.eclipse.jdt.apt.pluggable.core"
+ org.eclipse.jdt.internal.compiler.apt.util;x-friends:="org.eclipse.jdt.apt.pluggable.core",
+ org.eclipse.jdt.internal.compiler.lookup;x-friends:="org.eclipse.jdt.apt.pluggable.core"
 Import-Package: org.eclipse.jdt.internal.compiler.tool;resolution:=optional
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.apt/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.jdt.compiler.apt/customBuildCallbacks.xml
index 7f5509c..0efee97 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.apt/customBuildCallbacks.xml
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.apt/customBuildCallbacks.xml
@@ -1,4 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <!-- ===================================================================== -->
 <!-- Custom targets called from a project's generated build.xml            -->
 <!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/AnnotationMirrorImpl.java b/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/AnnotationMirrorImpl.java
index ca4509a..6a38940 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/AnnotationMirrorImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/model/AnnotationMirrorImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -352,12 +352,21 @@ public class AnnotationMirrorImpl implements AnnotationMirror, InvocationHandler
 	private Object convertJDTArrayToReflectionArray(Object jdtValue, TypeBinding jdtType, Class<?> expectedType)
 	{
 		assert null != expectedType && expectedType.isArray();
-		if (!jdtType.isArrayType() || !(jdtValue instanceof Object[])) {
-			// TODO: wrap solo element into one-length array
+		if (!jdtType.isArrayType()) {
+			// the compiler says that the type binding isn't an array type; this probably means
+			// that there's some sort of syntax error.
 			return null;
 		}
+		Object[] jdtArray;
+		// See bug 261969: it's legal to pass a solo element for an array-typed value
+		if (jdtValue != null && !(jdtValue instanceof Object[])) {
+			// Create an array of the expected type
+			jdtArray = (Object[]) Array.newInstance(jdtValue.getClass(), 1);
+			jdtArray[0] = jdtValue;
+		} else {
+			jdtArray = (Object[])jdtValue;
+		}
 		TypeBinding jdtLeafType = jdtType.leafComponentType();
-		Object[] jdtArray = (Object[])jdtValue;
 		Class<?> expectedLeafType = expectedType.getComponentType();
         final int length = jdtArray.length;
         final Object returnArray = Array.newInstance(expectedLeafType, length);
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/EclipseFileManager.java b/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/EclipseFileManager.java
index 81f26a3..1aacecf 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/EclipseFileManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/util/EclipseFileManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -147,25 +147,19 @@ public class EclipseFileManager implements StandardJavaFileManager {
 			if (File.separatorChar == '/') {
 				if (!path.endsWith(normalizedPackageName)) return;
 			} else if (!path.endsWith(normalizedPackageName.replace('/', File.separatorChar))) return;
-   			File[] files = currentFile.listFiles();
-   			if (files != null) {
-   				// this was a directory
-   				for (File f : files) {
-   					if (f.isDirectory() && recurse) {
-   						collectAllMatchingFiles(file, normalizedPackageName + '/' + f.getName(), kinds, recurse, collector);
-   					} else {
-   						final Kind kind = getKind(f);
-   						if (kinds.contains(kind)) {
-   							collector.add(new EclipseFileObject(normalizedPackageName + currentFile.getName(), currentFile.toURI(), kind, this.charset));
-   						}
-   					}
-   				}
-   			}
-			// currentFile is not a directory
-			// check if it matches the criteria
-			final Kind kind = getKind(file);
-			if (kinds.contains(kind)) {
-				collector.add(new EclipseFileObject(normalizedPackageName + currentFile.getName(), currentFile.toURI(), kind, this.charset));
+			File[] files = currentFile.listFiles();
+			if (files != null) {
+				// this was a directory
+				for (File f : files) {
+					if (f.isDirectory() && recurse) {
+						collectAllMatchingFiles(file, normalizedPackageName + '/' + f.getName(), kinds, recurse, collector);
+					} else {
+						final Kind kind = getKind(f);
+						if (kinds.contains(kind)) {
+							collector.add(new EclipseFileObject(normalizedPackageName + f.getName(), f.toURI(), kind, this.charset));
+						}
+					}
+				}
 			}
 		} else {
 			Archive archive = this.getArchive(file);
@@ -180,10 +174,10 @@ public class EclipseFileManager implements StandardJavaFileManager {
 						ArrayList<String> types = archive.getTypes(packageName);
 						if (types != null) {
 							for (String typeName : types) {
-		   						final Kind kind = getKind(getExtension(typeName));
-		   						if (kinds.contains(kind)) {
-		   							collector.add(archive.getArchiveFileObject(packageName + typeName, this.charset));
-		   						}
+								final Kind kind = getKind(getExtension(typeName));
+								if (kinds.contains(kind)) {
+									collector.add(archive.getArchiveFileObject(packageName + typeName, this.charset));
+								}
 							}
 						}
 					}
@@ -192,10 +186,10 @@ public class EclipseFileManager implements StandardJavaFileManager {
 				ArrayList<String> types = archive.getTypes(key);
 				if (types != null) {
 					for (String typeName : types) {
-   						final Kind kind = getKind(typeName);
-   						if (kinds.contains(kind)) {
-   							collector.add(archive.getArchiveFileObject(normalizedPackageName + typeName, this.charset));
-   						}
+						final Kind kind = getKind(typeName);
+						if (kinds.contains(kind)) {
+							collector.add(archive.getArchiveFileObject(normalizedPackageName + typeName, this.charset));
+						}
 					}
 				}
 			}
@@ -864,7 +858,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings({"rawtypes", "unchecked"})
 	public void processPathEntries(final int defaultSize, final ArrayList paths,
 			final String currentPath, String customEncoding, boolean isSourceOnly,
 			boolean rejectDestinationPathOnJars) {
@@ -1044,7 +1038,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 				// we go on anyway
 		}
 	}
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings({"rawtypes", "unchecked"})
 	protected void addNewEntry(ArrayList paths, String currentClasspathName,
 			ArrayList currentRuleSpecs, String customEncoding,
 			String destPath, boolean isSourceOnly,
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ArchiveFileObject.java b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ArchiveFileObject.java
index 01ae080..28526cc 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ArchiveFileObject.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/ArchiveFileObject.java
@@ -51,6 +51,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileObject#getAccessLevel()
 	 */
+	@Override
 	public Modifier getAccessLevel() {
 		// cannot express multiple modifier
 		if (getKind() != Kind.CLASS) {
@@ -83,6 +84,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileObject#getKind()
 	 */
+	@Override
 	public Kind getKind() {
 		String name = this.entryName.toLowerCase();
 		if (name.endsWith(Kind.CLASS.extension)) {
@@ -98,6 +100,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileObject#getNestingKind()
 	 */
+	@Override
 	public NestingKind getNestingKind() {
 		switch(getKind()) {
 			case SOURCE :
@@ -132,6 +135,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileObject#isNameCompatible(java.lang.String, javax.tools.JavaFileObject.Kind)
 	 */
+	@Override
 	public boolean isNameCompatible(String simpleName, Kind kind) {
 		return this.zipEntry.getName().endsWith(simpleName + kind.extension);
 	}
@@ -139,6 +143,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#delete()
 	 */
+	@Override
 	public boolean delete() {
 		throw new UnsupportedOperationException();
 	}
@@ -155,6 +160,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#getCharContent(boolean)
 	 */
+	@Override
 	public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
 		if (getKind() == Kind.SOURCE) {
 			return Util.getCharContents(this, ignoreEncodingErrors, org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(this.zipEntry, this.zipFile), this.charset.toString());
@@ -165,6 +171,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#getLastModified()
 	 */
+	@Override
 	public long getLastModified() {
 		return this.zipEntry.getTime(); // looks the closest from the last modification
 	}
@@ -172,6 +179,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#getName()
 	 */
+	@Override
 	public String getName() {
 		return this.zipEntry.getName();
 	}
@@ -179,6 +187,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#openInputStream()
 	 */
+	@Override
 	public InputStream openInputStream() throws IOException {
 		return this.zipFile.getInputStream(this.zipEntry);
 	}
@@ -186,6 +195,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#openOutputStream()
 	 */
+	@Override
 	public OutputStream openOutputStream() throws IOException {
 		throw new UnsupportedOperationException();
 	}
@@ -193,6 +203,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#openReader(boolean)
 	 */
+	@Override
 	public Reader openReader(boolean ignoreEncodingErrors) throws IOException {
 		throw new UnsupportedOperationException();
 	}
@@ -200,6 +211,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#openWriter()
 	 */
+	@Override
 	public Writer openWriter() throws IOException {
 		throw new UnsupportedOperationException();
 	}
@@ -207,6 +219,7 @@ public class ArchiveFileObject implements JavaFileObject {
 	/* (non-Javadoc)
 	 * @see javax.tools.FileObject#toUri()
 	 */
+	@Override
 	public URI toUri() {
 		try {
 			return new URI("jar:" + this.file.toURI().getPath() + "!" + this.zipEntry.getName()); //$NON-NLS-1$//$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java
index 1f8786d..52ace6f 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,7 @@ public class EclipseCompiler implements JavaCompiler {
 	 *
 	 * @see javax.tools.Tool#getSourceVersions()
 	 */
+	@Override
 	public Set<SourceVersion> getSourceVersions() {
 		return EclipseCompiler.SupportedSourceVersions;
 	}
@@ -73,6 +74,7 @@ public class EclipseCompiler implements JavaCompiler {
 	 * @see javax.tools.JavaCompiler#getStandardFileManager(javax.tools.DiagnosticListener,
 	 *      java.util.Locale, java.nio.charset.Charset)
 	 */
+	@Override
 	public StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> someDiagnosticListener, Locale locale, Charset charset) {
 		this.diagnosticListener = someDiagnosticListener;
 		return new EclipseFileManager(locale, charset);
@@ -84,12 +86,13 @@ public class EclipseCompiler implements JavaCompiler {
 	 *      javax.tools.JavaFileManager, javax.tools.DiagnosticListener,
 	 *      java.lang.Iterable, java.lang.Iterable, java.lang.Iterable)
 	 */
+	@Override
 	@SuppressWarnings("unchecked")
 	public CompilationTask getTask(Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> someDiagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits) {
 		PrintWriter writerOut = null;
 		PrintWriter writerErr = null;
 		if (out == null) {
-			writerOut = new PrintWriter(System.out);
+			writerOut = new PrintWriter(System.err);
 			writerErr = new PrintWriter(System.err);
 		} else {
 			writerOut = new PrintWriter(out);
@@ -173,6 +176,7 @@ public class EclipseCompiler implements JavaCompiler {
 
 		return new CompilationTask() {
 			private boolean hasRun = false;
+			@Override
 			public Boolean call() {
 				// set up compiler with passed options
 				if (this.hasRun) {
@@ -182,9 +186,11 @@ public class EclipseCompiler implements JavaCompiler {
 				this.hasRun = true;
 				return value;
 			}
+			@Override
 			public void setLocale(Locale locale) {
 				eclipseCompiler2.setLocale(locale);
 			}
+			@Override
 			public void setProcessors(Iterable<? extends Processor> processors) {
 				ArrayList<Processor> temp = new ArrayList<Processor>();
 				for (Processor processor : processors) {
@@ -201,6 +207,7 @@ public class EclipseCompiler implements JavaCompiler {
 	 *
 	 * @see javax.tools.OptionChecker#isSupportedOption(java.lang.String)
 	 */
+	@Override
 	public int isSupportedOption(String option) {
 		return Options.processOptions(option);
 	}
@@ -211,6 +218,7 @@ public class EclipseCompiler implements JavaCompiler {
 	 * @see javax.tools.Tool#run(java.io.InputStream, java.io.OutputStream,
 	 *      java.io.OutputStream, java.lang.String[])
 	 */
+	@Override
 	public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {
 		boolean succeed = new Main(new PrintWriter(new OutputStreamWriter(out)), new PrintWriter(new OutputStreamWriter(err)), true/*systemExit*/, null/*options*/, null/*progress*/).compile(arguments);
 		return succeed ? 0 : -1;
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java
index c2e0983..ef0322b 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompilerImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -137,9 +137,11 @@ public class EclipseCompilerImpl extends Main {
 	public IErrorHandlingPolicy getHandlingPolicy() {
 		// passes the initial set of files to the batch oracle (to avoid finding more than once the same units when case insensitive match)
 		return new IErrorHandlingPolicy() {
+			@Override
 			public boolean proceedOnErrors() {
 				return false; // stop if there are some errors
 			}
+			@Override
 			public boolean stopOnFirstError() {
 				return false;
 			}
@@ -164,15 +166,19 @@ public class EclipseCompilerImpl extends Main {
 				DiagnosticListener<? super JavaFileObject> diagListener = EclipseCompilerImpl.this.diagnosticListener;
 				if (diagListener != null) {
 					diagListener.report(new Diagnostic<JavaFileObject>() {
+						@Override
 						public String getCode() {
 							return Integer.toString(problemId);
 						}
+						@Override
 						public long getColumnNumber() {
 							return columnNumber;
 						}
+						@Override
 						public long getEndPosition() {
 							return endPosition;
 						}
+						@Override
 						public Kind getKind() {
 							if ((severity & ProblemSeverities.Error) != 0) {
 								return Diagnostic.Kind.ERROR;
@@ -185,29 +191,28 @@ public class EclipseCompilerImpl extends Main {
 							}
 							return Diagnostic.Kind.OTHER;
 						}
+						@Override
 						public long getLineNumber() {
 							return lineNumber;
 						}
+						@Override
 						public String getMessage(Locale locale) {
 							setLocale(locale);
 							return getLocalizedMessage(problemId, problemArguments);
 						}
+						@Override
 						public long getPosition() {
 							return startPosition;
 						}
+						@Override
 						public JavaFileObject getSource() {
-							try {
-								if (EclipseCompilerImpl.this.fileManager.hasLocation(StandardLocation.SOURCE_PATH)) {
-									return EclipseCompilerImpl.this.fileManager.getJavaFileForInput(
-											StandardLocation.SOURCE_PATH,
-											new String(originatingFileName),
-											JavaFileObject.Kind.SOURCE);
-								}
-							} catch (IOException e) {
-								// ignore
+							File f = new File(new String(originatingFileName));
+							if (f.exists()) {
+								return new EclipseFileObject(null, f.toURI(), JavaFileObject.Kind.SOURCE, null);
 							}
 							return null;
 						}
+						@Override
 						public long getStartPosition() {
 							return startPosition;
 						}
@@ -215,11 +220,81 @@ public class EclipseCompilerImpl extends Main {
 				}
 				return super.createProblem(originatingFileName, problemId, problemArguments, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
 			}
+			@Override
+			public CategorizedProblem createProblem(
+					final char[] originatingFileName,
+					final int problemId,
+					final String[] problemArguments,
+					final int elaborationID,
+					final String[] messageArguments,
+					final int severity,
+					final int startPosition,
+					final int endPosition,
+					final int lineNumber,
+					final int columnNumber) {
+
+				DiagnosticListener<? super JavaFileObject> diagListener = EclipseCompilerImpl.this.diagnosticListener;
+				if (diagListener != null) {
+					diagListener.report(new Diagnostic<JavaFileObject>() {
+						@Override
+						public String getCode() {
+							return Integer.toString(problemId);
+						}
+						@Override
+						public long getColumnNumber() {
+							return columnNumber;
+						}
+						@Override
+						public long getEndPosition() {
+							return endPosition;
+						}
+						@Override
+						public Kind getKind() {
+							if ((severity & ProblemSeverities.Error) != 0) {
+								return Diagnostic.Kind.ERROR;
+							}
+							if ((severity & ProblemSeverities.Optional) != 0) {
+								return Diagnostic.Kind.WARNING;
+							}
+							if ((severity & ProblemSeverities.Warning) != 0) {
+								return Diagnostic.Kind.MANDATORY_WARNING;
+							}
+							return Diagnostic.Kind.OTHER;
+						}
+						@Override
+						public long getLineNumber() {
+							return lineNumber;
+						}
+						@Override
+						public String getMessage(Locale locale) {
+							setLocale(locale);
+							return getLocalizedMessage(problemId, problemArguments);
+						}
+						@Override
+						public long getPosition() {
+							return startPosition;
+						}
+						@Override
+						public JavaFileObject getSource() {
+							File f = new File(new String(originatingFileName));
+							if (f.exists()) {
+								return new EclipseFileObject(null, f.toURI(), JavaFileObject.Kind.SOURCE, null);
+							}
+							return null;
+						}
+						@Override
+						public long getStartPosition() {
+							return startPosition;
+						}
+					});
+				}
+				return super.createProblem(originatingFileName, problemId, problemArguments, elaborationID, messageArguments, severity, startPosition, endPosition, lineNumber, columnNumber);
+			}
 		};
 	}
 
 	@Override
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("rawtypes")
 	protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean systemExit, Map customDefaultOptions, CompilationProgress compilationProgress) {
 		super.initialize(outWriter, errWriter, systemExit, customDefaultOptions, compilationProgress);
 		this.javaFileObjectMap = new HashMap<CompilationUnit, JavaFileObject>();
@@ -314,7 +389,7 @@ public class EclipseCompilerImpl extends Main {
 	}
 
 	@Override
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings({"unchecked","rawtypes"})
 	protected void setPaths(ArrayList bootclasspaths,
 			String sourcepathClasspathArg,
 			ArrayList sourcepathClasspaths,
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
index bae79fe..a9a83da 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseFileManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,6 +126,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#close()
 	 */
+	@Override
 	public void close() throws IOException {
 		this.locations = null;
 		for (Archive archive : this.archivesCache.values()) {
@@ -147,25 +148,19 @@ public class EclipseFileManager implements StandardJavaFileManager {
 			if (File.separatorChar == '/') {
 				if (!path.endsWith(normalizedPackageName)) return;
 			} else if (!path.endsWith(normalizedPackageName.replace('/', File.separatorChar))) return;
-   			File[] files = currentFile.listFiles();
-   			if (files != null) {
-   				// this was a directory
-   				for (File f : files) {
-   					if (f.isDirectory() && recurse) {
-   						collectAllMatchingFiles(file, normalizedPackageName + '/' + f.getName(), kinds, recurse, collector);
-   					} else {
-   						final Kind kind = getKind(f);
-   						if (kinds.contains(kind)) {
-   							collector.add(new EclipseFileObject(normalizedPackageName + currentFile.getName(), currentFile.toURI(), kind, this.charset));
-   						}
-   					}
-   				}
-   			}
-			// currentFile is not a directory
-			// check if it matches the criteria
-			final Kind kind = getKind(file);
-			if (kinds.contains(kind)) {
-				collector.add(new EclipseFileObject(normalizedPackageName + currentFile.getName(), currentFile.toURI(), kind, this.charset));
+			File[] files = currentFile.listFiles();
+			if (files != null) {
+				// this was a directory
+				for (File f : files) {
+					if (f.isDirectory() && recurse) {
+						collectAllMatchingFiles(file, normalizedPackageName + '/' + f.getName(), kinds, recurse, collector);
+					} else {
+						final Kind kind = getKind(f);
+						if (kinds.contains(kind)) {
+							collector.add(new EclipseFileObject(normalizedPackageName + f.getName(), f.toURI(), kind, this.charset));
+						}
+					}
+				}
 			}
 		} else {
 			Archive archive = this.getArchive(file);
@@ -180,10 +175,10 @@ public class EclipseFileManager implements StandardJavaFileManager {
 						ArrayList<String> types = archive.getTypes(packageName);
 						if (types != null) {
 							for (String typeName : types) {
-		   						final Kind kind = getKind(getExtension(typeName));
-		   						if (kinds.contains(kind)) {
-		   							collector.add(archive.getArchiveFileObject(packageName + typeName, this.charset));
-		   						}
+								final Kind kind = getKind(getExtension(typeName));
+								if (kinds.contains(kind)) {
+									collector.add(archive.getArchiveFileObject(packageName + typeName, this.charset));
+								}
 							}
 						}
 					}
@@ -192,10 +187,10 @@ public class EclipseFileManager implements StandardJavaFileManager {
 				ArrayList<String> types = archive.getTypes(key);
 				if (types != null) {
 					for (String typeName : types) {
-   						final Kind kind = getKind(typeName);
-   						if (kinds.contains(kind)) {
-   							collector.add(archive.getArchiveFileObject(normalizedPackageName + typeName, this.charset));
-   						}
+						final Kind kind = getKind(typeName);
+						if (kinds.contains(kind)) {
+							collector.add(archive.getArchiveFileObject(normalizedPackageName + typeName, this.charset));
+						}
 					}
 				}
 			}
@@ -217,6 +212,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#flush()
 	 */
+	@Override
 	public void flush() throws IOException {
 		for (Archive archive : this.archivesCache.values()) {
 			archive.flush();
@@ -251,6 +247,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#getClassLoader(javax.tools.JavaFileManager.Location)
 	 */
+	@Override
 	public ClassLoader getClassLoader(Location location) {
 		Iterable<? extends File> files = getLocation(location);
 		if (files == null) {
@@ -383,6 +380,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String)
 	 */
+	@Override
 	public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {
 		Iterable<? extends File> files = getLocation(location);
 		if (files == null) {
@@ -414,6 +412,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#getFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String, javax.tools.FileObject)
 	 */
+	@Override
 	public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling)
 			throws IOException {
 		Iterable<? extends File> files = getLocation(location);
@@ -434,6 +433,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#getJavaFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind)
 	 */
+	@Override
 	public JavaFileObject getJavaFileForInput(Location location, String className, Kind kind) throws IOException {
 		if (kind != Kind.CLASS && kind != Kind.SOURCE) {
 			throw new IllegalArgumentException("Invalid kind : " + kind);//$NON-NLS-1$
@@ -469,6 +469,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#getJavaFileForOutput(javax.tools.JavaFileManager.Location, java.lang.String, javax.tools.JavaFileObject.Kind, javax.tools.FileObject)
 	 */
+	@Override
 	public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling)
 			throws IOException {
 		if (kind != Kind.CLASS && kind != Kind.SOURCE) {
@@ -523,6 +524,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.io.File[])
 	 */
+	@Override
 	public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) {
 		return getJavaFileObjectsFromFiles(Arrays.asList(files));
 	}
@@ -530,6 +532,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#getJavaFileObjects(java.lang.String[])
 	 */
+	@Override
 	public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) {
 		return getJavaFileObjectsFromStrings(Arrays.asList(names));
 	}
@@ -537,6 +540,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromFiles(java.lang.Iterable)
 	 */
+	@Override
 	public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) {
 		ArrayList<JavaFileObject> javaFileArrayList = new ArrayList<JavaFileObject>();
 		for (File f : files) {
@@ -548,6 +552,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#getJavaFileObjectsFromStrings(java.lang.Iterable)
 	 */
+	@Override
 	public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) {
 		ArrayList<File> files = new ArrayList<File>();
 		for (String name : names) {
@@ -574,6 +579,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#getLocation(javax.tools.JavaFileManager.Location)
 	 */
+	@Override
 	public Iterable<? extends File> getLocation(Location location) {
 		if (this.locations == null) return null;
 		return this.locations.get(location.getName());
@@ -595,6 +601,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#handleOption(java.lang.String, java.util.Iterator)
 	 */
+	@Override
 	public boolean handleOption(String current, Iterator<String> remaining) {
 		try {
 			if ("-bootclasspath".equals(current)) {//$NON-NLS-1$
@@ -724,6 +731,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#hasLocation(javax.tools.JavaFileManager.Location)
 	 */
+	@Override
 	public boolean hasLocation(Location location) {
 		return this.locations != null && this.locations.containsKey(location.getName());
 	}
@@ -731,6 +739,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#inferBinaryName(javax.tools.JavaFileManager.Location, javax.tools.JavaFileObject)
 	 */
+	@Override
 	public String inferBinaryName(Location location, JavaFileObject file) {
 		String name = file.getName();
 		JavaFileObject javaFileObject = null;
@@ -757,6 +766,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#isSameFile(javax.tools.FileObject, javax.tools.FileObject)
 	 */
+	@Override
 	public boolean isSameFile(FileObject fileObject1, FileObject fileObject2) {
 		// EclipseFileManager creates only EcliseFileObject
 		if (!(fileObject1 instanceof EclipseFileObject)) throw new IllegalArgumentException("Unsupported file object class : " + fileObject1.getClass());//$NON-NLS-1$
@@ -766,6 +776,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.OptionChecker#isSupportedOption(java.lang.String)
 	 */
+	@Override
 	public int isSupportedOption(String option) {
 		return Options.processOptionsFileManager(option);
 	}
@@ -773,6 +784,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.JavaFileManager#list(javax.tools.JavaFileManager.Location, java.lang.String, java.util.Set, boolean)
 	 */
+	@Override
 	public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds, boolean recurse)
 			throws IOException {
 		
@@ -819,6 +831,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 	/* (non-Javadoc)
 	 * @see javax.tools.StandardJavaFileManager#setLocation(javax.tools.JavaFileManager.Location, java.lang.Iterable)
 	 */
+	@Override
 	public void setLocation(Location location, Iterable<? extends File> path) throws IOException {
 		if (path != null) {
 			if (location.isOutputLocation()) {
@@ -846,7 +859,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 		}
 	}
 
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings({"unchecked", "rawtypes"})
 	public void processPathEntries(final int defaultSize, final ArrayList paths,
 			final String currentPath, String customEncoding, boolean isSourceOnly,
 			boolean rejectDestinationPathOnJars) {
@@ -1026,7 +1039,7 @@ public class EclipseFileManager implements StandardJavaFileManager {
 				// we go on anyway
 		}
 	}
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings({"rawtypes", "unchecked"})
 	protected void addNewEntry(ArrayList paths, String currentClasspathName,
 			ArrayList currentRuleSpecs, String customEncoding,
 			String destPath, boolean isSourceOnly,
diff --git a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
index b32889e..c1cf40b 100644
--- a/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
+++ b/eclipse/plugins/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/Options.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ public final class Options {
 		ZERO_ARGUMENT_OPTIONS = new HashSet<String>();
 		Options.ZERO_ARGUMENT_OPTIONS.add("-progress");//$NON-NLS-1$
 		Options.ZERO_ARGUMENT_OPTIONS.add("-proceedOnError");//$NON-NLS-1$
+		Options.ZERO_ARGUMENT_OPTIONS.add("-proceedOnError:Fatal");//$NON-NLS-1$
 		Options.ZERO_ARGUMENT_OPTIONS.add("-time");//$NON-NLS-1$
 		Options.ZERO_ARGUMENT_OPTIONS.add("-v");//$NON-NLS-1$
 		Options.ZERO_ARGUMENT_OPTIONS.add("-version");//$NON-NLS-1$
@@ -84,6 +85,7 @@ public final class Options {
 		Options.ONE_ARGUMENT_OPTIONS.add("-target");//$NON-NLS-1$
 		Options.ONE_ARGUMENT_OPTIONS.add("-processor");//$NON-NLS-1$
 		Options.ONE_ARGUMENT_OPTIONS.add("-classNames");//$NON-NLS-1$
+		Options.ONE_ARGUMENT_OPTIONS.add("-properties");//$NON-NLS-1$
 	
 	}
 	public static int processOptionsFileManager(String option) {
@@ -145,6 +147,7 @@ public final class Options {
 				if (token.equals("allDeadCode")//$NON-NLS-1$
 						|| token.equals("allDeprecation")//$NON-NLS-1$
 						|| token.equals("allJavadoc")//$NON-NLS-1$
+						|| token.equals("allOver-ann")//$NON-NLS-1$
 						|| token.equals("assertIdentifier")//$NON-NLS-1$
 						|| token.equals("boxing")//$NON-NLS-1$
 						|| token.equals("charConcat")//$NON-NLS-1$
@@ -198,6 +201,7 @@ public final class Options {
 						|| token.equals("typeHiding")//$NON-NLS-1$
 						|| token.equals("unchecked")//$NON-NLS-1$
 						|| token.equals("unnecessaryElse")//$NON-NLS-1$
+						|| token.equals("unnecessaryOperator")//$NON-NLS-1$
 						|| token.equals("unqualified-field-access")//$NON-NLS-1$
 						|| token.equals("unqualifiedField")//$NON-NLS-1$
 						|| token.equals("unsafe")//$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/.settings/.api_filters b/eclipse/plugins/org.eclipse.jdt.core/.settings/.api_filters
deleted file mode 100644
index a9fe599..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/.settings/.api_filters
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jdt.core" version="2">
-    <resource path="dom/org/eclipse/jdt/core/dom/ASTParser.java" type="org.eclipse.jdt.core.dom.ASTParser">
-        <filter id="1142947843">
-            <message_arguments>
-                <message_argument value="3.5.2"/>
-                <message_argument value="setIgnoreMethodBodies(boolean)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="model/org/eclipse/jdt/core/ICompilationUnit.java" type="org.eclipse.jdt.core.ICompilationUnit">
-        <filter id="1210056707">
-            <message_arguments>
-                <message_argument value="3.5.2"/>
-                <message_argument value="IGNORE_METHOD_BODIES"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="model/org/eclipse/jdt/core/ITypeRoot.java" type="org.eclipse.jdt.core.ITypeRoot">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.ITypeRoot"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="model/org/eclipse/jdt/core/compiler/CompilationParticipant.java" type="org.eclipse.jdt.core.compiler.CompilationParticipant">
-        <filter id="388100214">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.compiler.CompilationParticipant"/>
-                <message_argument value="READY_FOR_BUILD"/>
-            </message_arguments>
-        </filter>
-        <filter id="388100214">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.compiler.CompilationParticipant"/>
-                <message_argument value="NEEDS_FULL_BUILD"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="search/org/eclipse/jdt/core/search/ReferenceMatch.java" type="org.eclipse.jdt.core.search.ReferenceMatch">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.search.ReferenceMatch"/>
-                <message_argument value="localElement()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
index f73f509..d8db5ac 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Nov 28 13:46:58 CET 2008
+#Tue Oct 27 09:15:52 EDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -53,6 +53,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -82,7 +83,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
diff --git a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.ui.prefs
index 6e0191b..020f0ab 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,4 @@
-#Thu Sep 11 09:29:02 CEST 2008
+#Tue Jan 05 12:29:35 EST 2010
 cleanup.add_default_serial_version_id=true
 cleanup.add_generated_serial_version_id=false
 cleanup.add_missing_annotations=true
@@ -47,5 +47,59 @@ cleanup.use_this_for_non_static_method_access_only_if_necessary=true
 cleanup_profile=_Numbat
 cleanup_settings_version=2
 eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
 formatter_profile=_Jdtcore [built-in + Indent switch body + LineWidth\:120]
 formatter_settings_version=11
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.update_ibm_copyright_to_current_year=true
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
index c9c5910..6f7536a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.api.tools.prefs
@@ -1,10 +1,12 @@
-#Mon Nov 24 17:11:53 CET 2008
+#Fri May 21 10:24:07 EDT 2010
 ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
 ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
 API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
 API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
 CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
 CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
@@ -79,6 +81,8 @@ TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
 TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
 TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
 TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
 eclipse.preferences.version=1
 incompatible_api_component_version=Error
 incompatible_api_component_version_include_major_without_breaking_change=Disabled
@@ -86,3 +90,5 @@ incompatible_api_component_version_include_minor_without_api_change=Disabled
 invalid_since_tag_version=Error
 malformed_since_tag=Error
 missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
diff --git a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.prefs
index e7df45d..35bb407 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.core/.settings/org.eclipse.pde.prefs
@@ -1,16 +1,35 @@
-#Thu Nov 01 22:46:18 EDT 2007
+#Fri May 21 10:24:08 EDT 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=2
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=2
+compilers.p.build.source.library=2
+compilers.p.build.src.includes=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
 compilers.p.missing-bundle-classpath-entries=2
 compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=2
 compilers.p.unknown-attribute=1
 compilers.p.unknown-class=1
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index d96d632..08cdaa1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Activator: org.eclipse.jdt.core.JavaCore
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java b/eclipse/plugins/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
index 2e6b4b8..44a8dac 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,63 +107,63 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 		 */
 		cmd.createArgument().setValue("-noExit"); //$NON-NLS-1$
 
-        if (this.bootclasspath != null) {
+		if (this.bootclasspath != null) {
 			cmd.createArgument().setValue("-bootclasspath"); //$NON-NLS-1$
-        	if (this.bootclasspath.size() != 0) {
-    			/*
-    			 * Set the bootclasspath for the Eclipse compiler.
-    			 */
-    			cmd.createArgument().setPath(this.bootclasspath);
-        	} else {
-    			cmd.createArgument().setValue(Util.EMPTY_STRING);
-        	}
-        }
-
-        Path classpath = new Path(this.project);
-
-       /*
-         * Eclipse compiler doesn't support -extdirs.
-         * It is emulated using the classpath. We add extdirs entries after the
-         * bootclasspath.
-         */
-        if (this.extdirs != null) {
+			if (this.bootclasspath.size() != 0) {
+				/*
+				 * Set the bootclasspath for the Eclipse compiler.
+				 */
+				cmd.createArgument().setPath(this.bootclasspath);
+			} else {
+				cmd.createArgument().setValue(Util.EMPTY_STRING);
+			}
+		}
+
+		Path classpath = new Path(this.project);
+
+		/*
+		 * Eclipse compiler doesn't support -extdirs.
+		 * It is emulated using the classpath. We add extdirs entries after the
+		 * bootclasspath.
+		 */
+		if (this.extdirs != null) {
 			cmd.createArgument().setValue("-extdirs"); //$NON-NLS-1$
 			cmd.createArgument().setPath(this.extdirs);
-        }
+		}
 
 		/*
 		 * The java runtime is already handled, so we simply want to retrieve the
 		 * ant runtime and the compile classpath.
 		 */
-        classpath.append(getCompileClasspath());
-
-        // For -sourcepath, use the "sourcepath" value if present.
-        // Otherwise default to the "srcdir" value.
-        Path sourcepath = null;
-
-        // retrieve the method getSourcepath() using reflect
-        // This is done to improve the compatibility to ant 1.5
-        Method getSourcepathMethod = null;
-        try {
-	        getSourcepathMethod = javacClass.getMethod("getSourcepath", null); //$NON-NLS-1$
-        } catch(NoSuchMethodException e) {
-        	// if not found, then we cannot use this method (ant 1.5)
-        }
-        Path compileSourcePath = null;
-        if (getSourcepathMethod != null) {
-	 		try {
+		classpath.append(getCompileClasspath());
+
+		// For -sourcepath, use the "sourcepath" value if present.
+		// Otherwise default to the "srcdir" value.
+		Path sourcepath = null;
+
+		// retrieve the method getSourcepath() using reflect
+		// This is done to improve the compatibility to ant 1.5
+		Method getSourcepathMethod = null;
+		try {
+			getSourcepathMethod = javacClass.getMethod("getSourcepath", null); //$NON-NLS-1$
+		} catch(NoSuchMethodException e) {
+			// if not found, then we cannot use this method (ant 1.5)
+		}
+		Path compileSourcePath = null;
+		if (getSourcepathMethod != null) {
+			try {
 				compileSourcePath = (Path) getSourcepathMethod.invoke(this.attributes, null);
 			} catch (IllegalAccessException e) {
 				// should never happen
 			} catch (InvocationTargetException e) {
 				// should never happen
 			}
-        }
-        if (compileSourcePath != null) {
-            sourcepath = compileSourcePath;
-        } else {
-            sourcepath = this.src;
-        }
+		}
+		if (compileSourcePath != null) {
+			sourcepath = compileSourcePath;
+		} else {
+			sourcepath = this.src;
+		}
 		classpath.append(sourcepath);
 		/*
 		 * Set the classpath for the Eclipse compiler.
@@ -171,38 +171,38 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 		cmd.createArgument().setValue("-classpath"); //$NON-NLS-1$
 		createClasspathArgument(cmd, classpath);
 
-        final String javaVersion = JavaEnvUtils.getJavaVersion();
+		final String javaVersion = JavaEnvUtils.getJavaVersion();
 		String memoryParameterPrefix = javaVersion.equals(JavaEnvUtils.JAVA_1_1) ? "-J-" : "-J-X";//$NON-NLS-1$//$NON-NLS-2$
-        if (this.memoryInitialSize != null) {
-            if (!this.attributes.isForkedJavac()) {
-                this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.ignoringMemoryInitialSize"), Project.MSG_WARN); //$NON-NLS-1$
-            } else {
-                cmd.createArgument().setValue(memoryParameterPrefix
-                                              + "ms" + this.memoryInitialSize); //$NON-NLS-1$
-            }
-        }
-
-        if (this.memoryMaximumSize != null) {
-            if (!this.attributes.isForkedJavac()) {
-                this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.ignoringMemoryMaximumSize"), Project.MSG_WARN); //$NON-NLS-1$
-            } else {
-                cmd.createArgument().setValue(memoryParameterPrefix
-                                              + "mx" + this.memoryMaximumSize); //$NON-NLS-1$
-            }
-        }
-
-        if (this.debug) {
-	       // retrieve the method getSourcepath() using reflect
-	        // This is done to improve the compatibility to ant 1.5
-	        Method getDebugLevelMethod = null;
-	        try {
-		        getDebugLevelMethod = javacClass.getMethod("getDebugLevel", null); //$NON-NLS-1$
-	        } catch(NoSuchMethodException e) {
-	        	// if not found, then we cannot use this method (ant 1.5)
-	        	// debug level is only available with ant 1.5.x
-	        }
-     	    String debugLevel = null;
-	        if (getDebugLevelMethod != null) {
+		if (this.memoryInitialSize != null) {
+			if (!this.attributes.isForkedJavac()) {
+				this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.ignoringMemoryInitialSize"), Project.MSG_WARN); //$NON-NLS-1$
+			} else {
+				cmd.createArgument().setValue(memoryParameterPrefix
+						+ "ms" + this.memoryInitialSize); //$NON-NLS-1$
+			}
+		}
+
+		if (this.memoryMaximumSize != null) {
+			if (!this.attributes.isForkedJavac()) {
+				this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.ignoringMemoryMaximumSize"), Project.MSG_WARN); //$NON-NLS-1$
+			} else {
+				cmd.createArgument().setValue(memoryParameterPrefix
+						+ "mx" + this.memoryMaximumSize); //$NON-NLS-1$
+			}
+		}
+
+		if (this.debug) {
+			// retrieve the method getSourcepath() using reflect
+			// This is done to improve the compatibility to ant 1.5
+			Method getDebugLevelMethod = null;
+			try {
+				getDebugLevelMethod = javacClass.getMethod("getDebugLevel", null); //$NON-NLS-1$
+			} catch(NoSuchMethodException e) {
+				// if not found, then we cannot use this method (ant 1.5)
+				// debug level is only available with ant 1.5.x
+			}
+			String debugLevel = null;
+			if (getDebugLevelMethod != null) {
 				try {
 					debugLevel = (String) getDebugLevelMethod.invoke(this.attributes, null);
 				} catch (IllegalAccessException e) {
@@ -210,7 +210,7 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 				} catch (InvocationTargetException e) {
 					// should never happen
 				}
-        	}
+			}
 			if (debugLevel != null) {
 				this.customDefaultOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
 				this.customDefaultOptions.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE);
@@ -230,18 +230,18 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 				this.customDefaultOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.GENERATE);
 				this.customDefaultOptions.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.GENERATE);
 				this.customDefaultOptions.put(CompilerOptions.OPTION_SourceFileAttribute , CompilerOptions.GENERATE);
-            }
-        } else {
+			}
+		} else {
 			this.customDefaultOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
 			this.customDefaultOptions.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE);
 			this.customDefaultOptions.put(CompilerOptions.OPTION_SourceFileAttribute , CompilerOptions.DO_NOT_GENERATE);
-        }
+		}
 
 		/*
 		 * Handle the nowarn option. If none, then we generate all warnings.
 		 */
 		if (this.attributes.getNowarn()) {
-	        // disable all warnings
+			// disable all warnings
 			Object[] entries = this.customDefaultOptions.entrySet().toArray();
 			for (int i = 0, max = entries.length; i < max; i++) {
 				Map.Entry entry = (Map.Entry) entries[i];
@@ -269,7 +269,7 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 			this.customDefaultOptions.put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, CompilerOptions.DISABLED);
 		}
 
-	   	/*
+		/*
 		 * destDir option.
 		 */
 		if (this.destDir != null) {
@@ -302,20 +302,12 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 		 * source option
 		 */
 		String source = this.attributes.getSource();
-        if (source != null) {
+		if (source != null) {
 			this.customDefaultOptions.put(CompilerOptions.OPTION_Source, source);
-        }
-
-		/*
-		 * encoding option
-		 */
-        if (this.encoding != null) {
-            cmd.createArgument().setValue("-encoding"); //$NON-NLS-1$
-            cmd.createArgument().setValue(this.encoding);
-        }
+		}
 
 		if (compilerArgs != null) {
-	        /*
+			/*
 			 * Add extra argument on the command line
 			 */
 			final int length = compilerArgs.length;
@@ -325,17 +317,26 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
 					if (this.logFileName == null && "-log".equals(arg) && ((i + 1) < max)) { //$NON-NLS-1$
 						this.logFileName = compilerArgs[i + 1];
 					}
-			        cmd.createArgument().setValue(arg);
+					cmd.createArgument().setValue(arg);
 				}
 			}
-	   	}
-     	/*
+		}
+		/*
+		 * encoding option. javac task encoding property must be the last encoding on the command
+		 * line as compiler arg might also specify an encoding.
+		 */
+		if (this.encoding != null) {
+			cmd.createArgument().setValue("-encoding"); //$NON-NLS-1$
+			cmd.createArgument().setValue(this.encoding);
+		}
+
+		/*
 		 * Eclipse compiler doesn't have a -sourcepath option. This is
 		 * handled through the javac task that collects all source files in
 		 * srcdir option.
 		 */
-        logAndAddFilesToCompile(cmd);
-        return cmd;
+		logAndAddFilesToCompile(cmd);
+		return cmd;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
index 027f9dd..8735c70 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import java.util.List;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
 import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
 import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
@@ -118,7 +119,9 @@ public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageN
 				return new NameEnvironmentAnswer(
 						reader,
 						fetchAccessRestriction(qualifiedBinaryFileName));
-		} catch (Exception e) {
+		} catch (IOException e) {
+			// treat as if file is missing
+		} catch (ClassFormatException e) {
 			// treat as if file is missing
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
index 035261e..2ed77f1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
@@ -182,7 +182,8 @@ public String toString() {
 }
 public char[] normalizedPath() {
 	if (this.normalizedPath == null) {
-		char[] rawName = this.getPath().toCharArray();
+		String path2 = this.getPath();
+		char[] rawName = path2.toCharArray();
 		if (File.separatorChar == '\\') {
 			CharOperation.replace(rawName, '\\', '/');
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
index 74c99f3..ca3ca8d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,7 +126,7 @@ public FileSystem(String[] classpathNames, String[] initialFileNames, String enc
 	}
 	initializeKnownFileNames(initialFileNames);
 }
-FileSystem(Classpath[] paths, String[] initialFileNames) {
+protected FileSystem(Classpath[] paths, String[] initialFileNames) {
 	final int length = paths.length;
 	int counter = 0;
 	this.classpaths = new FileSystem.Classpath[length];
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/GCCMain.java b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/GCCMain.java
deleted file mode 100644
index 2bba4b0..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/GCCMain.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/**
- * 
- */
-package org.eclipse.jdt.internal.compiler.batch;
-
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.zip.CRC32;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import org.eclipse.jdt.internal.compiler.ClassFile;
-import org.eclipse.jdt.internal.compiler.CompilationResult;
-import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
-import org.eclipse.jdt.internal.compiler.env.AccessRule;
-import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
-import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
-import org.eclipse.jdt.internal.compiler.util.Messages;
-import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
-
-/**
- * This is an alternate entry point for the command-line compiler which
- * is simpler to integrate into GCC.  In particular the option processing
- * is more GNU-like and the recognized options are similar to those supported
- * by other GCC front ends.
- */
-public class GCCMain extends Main {
-
-	// All the compilation units specified on the command line.
-	private HashSet commandLineCompilationUnits = new HashSet();
-	// True if we are only checking syntax.
-	private boolean syntaxOnly;
-	// If not null, the name of the output zip file.
-	// If null, we are generating class files in the file system,
-	// not a zip file.
-	private String zipDestination;
-	// The zip stream to which we're writing, or null if it hasn't been opened.
-	private ZipOutputStream zipStream;
-	
-	// If not null, the name of the zip file to which dependency class files
-	// should be written.
-	private String zipDependencyDestination;
-	// The zip stream to which dependency files should be written.
-	private ZipOutputStream zipDependencyStream;
-
-	public GCCMain(PrintWriter outWriter, PrintWriter errWriter,
-			boolean systemExitWhenFinished) {
-		super(outWriter, errWriter, systemExitWhenFinished);
-		this.logger.setEmacs();
-	}
-
-	public GCCMain(PrintWriter outWriter, PrintWriter errWriter,
-			boolean systemExitWhenFinished, Map customDefaultOptions) {
-		super(outWriter, errWriter, systemExitWhenFinished,
-				customDefaultOptions);
-		this.logger.setEmacs();
-	}
-
-	private void fail(Exception t) {
-		t.printStackTrace();
-		this.logger.logException(t);
-		System.exit(1);
-	}
-
-	public CompilationUnit[] getCompilationUnits() {
-		CompilationUnit[] units = super.getCompilationUnits();
-		for (int i = 0; i < units.length; ++i)
-			this.commandLineCompilationUnits.add(units[i]);
-		return units;
-	}
-
-	private String combine(char[] one, char[] two) {
-		StringBuffer b = new StringBuffer();
-		b.append(one);
-		b.append(two);
-		return b.toString();
-	}
-
-	private ZipOutputStream getZipOutput() throws IOException {
-		if (this.zipDestination != null && this.zipStream == null) {
-			OutputStream os;
-			if ("-".equals(this.zipDestination)) { //$NON-NLS-1$
-				os = System.out;
-			} else {
-				os = new FileOutputStream(this.zipDestination);
-			}
-			zipStream = new ZipOutputStream(new BufferedOutputStream(os));
-			zipStream.setMethod(ZipOutputStream.STORED);
-			// Sun/OpenJDK require at least one entry in the zip file.
-			ZipEntry entry = new ZipEntry(".dummy");
-			byte[] contents = new byte[0];
-			CRC32 crc = new CRC32();
-			crc.update(contents);
-			entry.setSize(contents.length);
-			entry.setCrc(crc.getValue());
-			zipStream.putNextEntry(entry);
-			zipStream.write(contents);
-			zipStream.closeEntry();
-		}
-		return zipStream;
-	}
-
-	private ZipOutputStream getDependencyOutput() throws IOException {
-		if (this.zipDependencyDestination != null && this.zipDependencyStream == null) {
-			OutputStream os = new FileOutputStream(zipDependencyDestination);
-			zipDependencyStream = new ZipOutputStream(new BufferedOutputStream(os));
-			zipDependencyStream.setMethod(ZipOutputStream.STORED);
-			// Sun/OpenJDK require at least one entry in the zip file.
-			ZipEntry entry = new ZipEntry(".dummy");
-			byte[] contents = new byte[0];
-			CRC32 crc = new CRC32();
-			crc.update(contents);
-			entry.setSize(contents.length);
-			entry.setCrc(crc.getValue());
-			zipDependencyStream.putNextEntry(entry);
-			zipDependencyStream.write(contents);
-			zipDependencyStream.closeEntry();
-		}
-		return zipDependencyStream;
-	}
-
-	public void outputClassFiles(CompilationResult unitResult) {
-		if (this.syntaxOnly) {
-			return;
-		}
-		if (this.zipDestination == null) {
-			// Nothing special to do here.
-			super.outputClassFiles(unitResult);
-			return;
-		}
-		if (unitResult == null || unitResult.hasErrors()) {
-			return;
-		}
-
-		// If we are compiling with indirect dispatch, we don't need
-		// any dependent classes.  If we are using the C++ ABI, then we
-		// do need the dependencies in order to do proper layout.
-		boolean gcjCompile = this.commandLineCompilationUnits.contains(unitResult.getCompilationUnit());
-		if (this.zipDependencyDestination == null && !gcjCompile) {
-			return;
-		}
-
-		try {
-			ZipOutputStream dest = gcjCompile ? getZipOutput() : getDependencyOutput();
-			ClassFile[] classFiles = unitResult.getClassFiles();
-			for (int i = 0; i < classFiles.length; ++i) {
-				ClassFile classFile = classFiles[i];
-				String filename = combine(classFile.fileName(), SuffixConstants.SUFFIX_class);
-				if (this.verbose)
-					this.out.println(
-							Messages.bind(
-									Messages.compilation_write,
-									new String[] {
-								String.valueOf(this.exportedClassFilesCounter+1),
-								filename
-							}));
-				ZipEntry entry = new ZipEntry(filename);
-				byte[] contents = classFile.getBytes();
-				CRC32 crc = new CRC32();
-				crc.update(contents);
-				entry.setSize(contents.length);
-				entry.setCrc(crc.getValue());
-				dest.putNextEntry(entry);
-				dest.write(contents);
-				dest.closeEntry();
-			}
-		} catch (IOException err) {
-			fail(err);
-		}
-	}
-	
-	private String getArgument(String option) {
-		int index = option.indexOf('=');
-		return option.substring(index + 1);
-	}
-
-	private void addPath(ArrayList result, String currentClasspathName) {
-		String customEncoding = null;
-		AccessRule[] accessRules = new AccessRule[0];
-		AccessRuleSet accessRuleSet = new AccessRuleSet(accessRules, AccessRestriction.COMMAND_LINE, currentClasspathName);
-		FileSystem.Classpath currentClasspath = FileSystem
-				.getClasspath(currentClasspathName,
-						customEncoding, accessRuleSet);
-		if (currentClasspath != null) {
-			result.add(currentClasspath);
-		}
-	}
-	
-	private void parsePath(ArrayList result, String path) {
-		StringTokenizer iter = new StringTokenizer(path, File.pathSeparator);
-		while (iter.hasMoreTokens()) {
-			addPath(result, iter.nextToken());
-		}
-	}
-
-	protected void handleWarningToken(String token, boolean isEnabling) {
-		// Recognize this for compatibility with older versions of gcj.
-		if ("deprecated".equals(token)) //$NON-NLS-1$
-			token = "deprecation"; //$NON-NLS-1$
-		else if ("static-access".equals(token)   //$NON-NLS-1$
-				|| "dep-ann".equals(token) //$NON-NLS-1$
-				|| "over-ann".equals(token)) { //$NON-NLS-1$
-			// Some exceptions to the warning naming rule.
-		} else if ("extraneous-semicolon".equals(token)) { //$NON-NLS-1$
-			// Compatibility with earlier versions of gcj.
-			token = "semicolon"; //$NON-NLS-1$
-		} else {
-			// Turn "foo-bar-baz" into eclipse-style "fooBarBaz".
-			StringBuffer newToken = new StringBuffer(token.length());
-			StringTokenizer t = new StringTokenizer(token, "-"); //$NON-NLS-1$
-			boolean first = true;
-			while (t.hasMoreTokens()) {
-				String next = t.nextToken();
-				if (first) {
-					newToken.append(next);
-					first = false;
-				} else {
-					newToken.append(Character.toUpperCase(next.charAt(0)));
-					newToken.append(next.substring(1));
-				}
-			}
-			token = newToken.toString();
-		}
-		super.handleWarningToken(token, isEnabling);
-	}
-
-	private void turnWarningsToErrors() {
-		Object[] entries = this.options.entrySet().toArray();
-		for (int i = 0, max = entries.length; i < max; i++) {
-			Map.Entry entry = (Map.Entry) entries[i];
-			if (!(entry.getKey() instanceof String))
-				continue;
-			if (!(entry.getValue() instanceof String))
-				continue;
-			if (((String) entry.getValue()).equals(CompilerOptions.WARNING)) {
-				this.options.put(entry.getKey(), CompilerOptions.ERROR);
-			}
-		}
-	}
-
-	/**
-	 * Set the debug level to the indicated value.  The level should be
-	 * between 0 and 2, inclusive, but this is not checked.
-	 * @param level the debug level
-	 */
-	private void setDebugLevel(int level) {
-		this.options.put(
-				CompilerOptions.OPTION_LocalVariableAttribute,
-				level > 1 ? CompilerOptions.GENERATE : CompilerOptions.DO_NOT_GENERATE);
-		this.options.put(
-				CompilerOptions.OPTION_LineNumberAttribute,
-				level > 0 ? CompilerOptions.GENERATE : CompilerOptions.DO_NOT_GENERATE);
-		this.options.put(
-				CompilerOptions.OPTION_SourceFileAttribute,
-				CompilerOptions.GENERATE);
-	}
-
-	private void readFileList(String file, ArrayList result) {
-		try {
-			BufferedReader b = new BufferedReader(new FileReader(file));
-			String line;
-			while ((line = b.readLine()) != null) {
-				if (line.endsWith(SUFFIX_STRING_java))
-					result.add(line);
-			}
-			b.close();
-		} catch (IOException err) {
-			fail(err);
-		}
-	}
-	
-	private void readAllFileListFiles(ArrayList fileList, ArrayList result) {
-		Iterator it = fileList.iterator();
-		while (it.hasNext()) {
-			readFileList((String) it.next(), result);
-		}
-	}
-
-	private void handleWall(boolean enable) {
-		// A somewhat arbitrary list.  We use the GCC names
-		// here, and the local handleWarningToken translates
-		// for us.
-		handleWarningToken("constructor-name", enable);
-		handleWarningToken("pkg-default-method", enable);
-		handleWarningToken("masked-catch-block", enable);
-		handleWarningToken("all-deprecation", enable);
-		handleWarningToken("unused-local", enable);
-		handleWarningToken("unused-label", enable);
-		handleWarningToken("static-receiver", enable);
-		handleWarningToken("indirect-static", enable);
-		handleWarningToken("no-effect-assign", enable);
-		handleWarningToken("char-concat", enable);
-		handleWarningToken("useless-type-check", enable);
-		handleWarningToken("final-bound", enable);
-		handleWarningToken("assert-identifier", enable);
-		handleWarningToken("enum-identifier", enable);
-		handleWarningToken("finally", enable);
-		handleWarningToken("varargs-cast", enable);
-		handleWarningToken("unused", enable);
-		handleWarningToken("forbidden", enable);
-	}
-
-	public void configure(String[] argv) {
-		if ((argv == null) || (argv.length == 0)) {
-			// This is a "can't happen".
-			System.exit(1);
-		}
-
-		ArrayList files = new ArrayList();
-		ArrayList otherFiles = new ArrayList();
-		String classpath = null;
-		boolean haveFileList = false;
-		boolean inhibitAllWarnings = false;
-		boolean treatWarningsAsErrors = false;
-
-		for (int i = 0; i < argv.length; ++i) {
-			String currentArg = argv[i];
-			
-			if (currentArg.startsWith("-fencoding=")) { //$NON-NLS-1$
-				// Simply accept the last one.
-				String encoding = getArgument(currentArg);
-				try { // ensure encoding is supported
-					new InputStreamReader(new ByteArrayInputStream(new byte[0]), encoding);
-				} catch (UnsupportedEncodingException e) {
-					throw new IllegalArgumentException(
-						this.bind("configure.unsupportedEncoding", encoding)); //$NON-NLS-1$
-				}
-				this.options.put(CompilerOptions.OPTION_Encoding, encoding);
-			} else if (currentArg.startsWith("-foutput-class-dir=")) { //$NON-NLS-1$
-				String arg = getArgument(currentArg);
-				if (this.destinationPath != null) {
-					StringBuffer errorMessage = new StringBuffer();
-					errorMessage.append("-d"); //$NON-NLS-1$
-					errorMessage.append(' ');
-					errorMessage.append(arg);
-					throw new IllegalArgumentException(
-						this.bind("configure.duplicateOutputPath", errorMessage.toString())); //$NON-NLS-1$
-				}
-				this.setDestinationPath(arg);
-			} else if (currentArg.startsWith("-fbootclasspath=")) { //$NON-NLS-1$
-				classpath = getArgument(currentArg);
-			} else if (currentArg.equals("-fzip-target")) { //$NON-NLS-1$
-				++i;
-				if (i >= argv.length)
-					throw new IllegalArgumentException(this.bind("gcc.zipArg")); //$NON-NLS-1$
-				this.zipDestination = argv[i];
-			} else if (currentArg.equals("-fzip-dependency")) { //$NON-NLS-1$
-				++i;
-				if (i >= argv.length)
-					throw new IllegalArgumentException(this.bind("gcc.zipDepArg")); //$NON-NLS-1$
-				this.zipDependencyDestination = argv[i];
-			} else if (currentArg.startsWith("-g")) { //$NON-NLS-1$
-				if (currentArg.equals("-g0")) { //$NON-NLS-1$
-					setDebugLevel(0);
-				} else if (currentArg.equals("-g2") || currentArg.equals("-g3") //$NON-NLS-1$ //$NON-NLS-2$
-						|| currentArg.equals("-g")) { //$NON-NLS-1$
-					setDebugLevel(2);
-				} else {
-					// Handle -g1 but also things like -gstabs.
-					setDebugLevel(1);
-				}
-			} else if (currentArg.equals("-Werror")) { //$NON-NLS-1$
-				treatWarningsAsErrors = true;
-			} else if (currentArg.equals("-Wno-error")) { //$NON-NLS-1$
-				treatWarningsAsErrors = false;
-			} else if (currentArg.equals("-Wall")) { //$NON-NLS-1$
-				handleWall(true);
-			} else if (currentArg.equals("-Wno-all")) { //$NON-NLS-1$
-				handleWall(false);
-			} else if (currentArg.startsWith("-Wno-")) { //$NON-NLS-1$
-				handleWarningToken(currentArg.substring(5), false);
-			} else if (currentArg.startsWith("-W")) { //$NON-NLS-1$
-				handleWarningToken(currentArg.substring(2), true);
-			} else if (currentArg.equals("-w")) { //$NON-NLS-1$
-				inhibitAllWarnings = true;
-			} else if (currentArg.startsWith("-O")) { //$NON-NLS-1$
-				// Ignore.
-			} else if (currentArg.equals("-v")) { //$NON-NLS-1$
-				this.verbose = true;
-			} else if (currentArg.equals("-fsyntax-only")) { //$NON-NLS-1$
-				this.syntaxOnly = true;
-			} else if (currentArg.startsWith("-fsource=")) { //$NON-NLS-1$
-				currentArg = getArgument(currentArg);
-				if (currentArg.equals("1.3")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_3);
-				} else if (currentArg.equals("1.4")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_4);
-				} else if (currentArg.equals("1.5") || currentArg.equals("5") || currentArg.equals("5.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
-				} else if (currentArg.equals("1.6") || currentArg.equals("6") || currentArg.equals("6.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
-				} else {
-					throw new IllegalArgumentException(this.bind("configure.source", currentArg)); //$NON-NLS-1$
-				}
-			} else if (currentArg.startsWith("-ftarget=")) { //$NON-NLS-1$
-				currentArg = getArgument(currentArg);
-				if (currentArg.equals("1.1")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_1);
-				} else if (currentArg.equals("1.2")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_2);
-				} else if (currentArg.equals("1.3")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_3);
-				} else if (currentArg.equals("1.4")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_4);
-				} else if (currentArg.equals("1.5") || currentArg.equals("5") || currentArg.equals("5.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
-				} else if (currentArg.equals("1.6") || currentArg.equals("6") || currentArg.equals("6.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
-				} else if (currentArg.equals("jsr14")) { //$NON-NLS-1$
-					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_JSR14);
-				} else {
-					throw new IllegalArgumentException(this.bind("configure.targetJDK", currentArg)); //$NON-NLS-1$
-				}
-			} else if (currentArg.equals("-ffilelist-file")) { //$NON-NLS-1$
-				haveFileList = true;
-			} else if (currentArg.endsWith(SuffixConstants.SUFFIX_STRING_java)) {
-				files.add(currentArg);
-			} else if (currentArg.charAt(0) == '-'){
-				// FIXME: error if not a file?
-			} else {
-				otherFiles.add(currentArg);
-			}
-		}
-
-		// Read the file list file.  We read them all, but really there
-		// will only be one.
-		if (haveFileList)
-			readAllFileListFiles(otherFiles, files);
-
-		this.filenames = (String[]) files.toArray(new String[0]);
-		this.encodings = new String[this.filenames.length];
-		this.destinationPaths = new String[this.filenames.length];
-		for (int i = 0; i < this.filenames.length; ++i)
-			this.destinationPaths[i] = this.destinationPath;
-		
-		// Classpath processing.
-		ArrayList result = new ArrayList();
-		if (classpath == null)
-			throw new IllegalArgumentException(this.bind("gcc.noClasspath")); //$NON-NLS-1$
-		parsePath(result, classpath);
-
-		// We must always create both output files, even if one is not used.
-		// That way we will always pass valid zip file on to jc1.
-		try {
-			getZipOutput();
-			getDependencyOutput();
-		} catch (IOException err) {
-			fail(err);
-		}
-
-		if (inhibitAllWarnings)
-			disableWarnings();
-		if (treatWarningsAsErrors)
-			turnWarningsToErrors();
-
-		this.checkedClasspaths = new FileSystem.Classpath[result.size()];
-		result.toArray(this.checkedClasspaths);
-
-		this.logger.logCommandLineArguments(argv);
-		this.logger.logOptions(this.options);
-		this.logger.logClasspath(this.checkedClasspaths);
-
-		this.maxRepetition = 1;
-	}
-
-	public boolean compile(String[] argv) {
-		boolean result = super.compile(argv);
-		try {
-			if (zipStream != null) {
-				zipStream.finish();
-				zipStream.close();
-			}
-			if (zipDependencyStream != null) {
-				zipDependencyStream.finish();
-				zipDependencyStream.close();
-			}
-		} catch (IOException err) {
-			fail(err);
-		}
-		return result;
-	}
-
-	public static void main(String[] argv) {
-		boolean result = new GCCMain(new PrintWriter(System.out), new PrintWriter(System.err), false).compile(argv);
-		System.exit(result ? 0 : 1);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 4b98c68..36df1f4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,15 @@
  *     Tom Tromey - Contribution for bug 125961
  *     Tom Tromey - Contribution for bug 159641
  *     Benjamin Muskalla - Contribution for bug 239066
+ *     Stephan Herrmann  - Contribution for bug 236385
+ *     Stephan Herrmann  - Contribution for bug 295551
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.batch;
 
+import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FilenameFilter;
@@ -34,11 +38,13 @@ import java.util.Arrays;
 import java.util.Comparator;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.MissingResourceException;
+import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.StringTokenizer;
@@ -100,6 +106,7 @@ public class Main implements ProblemSeverities, SuffixConstants {
 		public static final int EMACS = 2;
 		private static final String ERROR = "ERROR"; //$NON-NLS-1$
 		private static final String ERROR_TAG = "error"; //$NON-NLS-1$
+		private static final String WARNING_TAG = "warning"; //$NON-NLS-1$
 		private static final String EXCEPTION = "exception"; //$NON-NLS-1$
 		private static final String EXTRA_PROBLEM_TAG = "extra_problem"; //$NON-NLS-1$
 		private static final String EXTRA_PROBLEMS = "extra_problems"; //$NON-NLS-1$
@@ -146,7 +153,7 @@ public class Main implements ProblemSeverities, SuffixConstants {
 		private static final String VALUE = "value"; //$NON-NLS-1$
 		private static final String WARNING = "WARNING"; //$NON-NLS-1$
 		public static final int XML = 1;
-		private static final String XML_DTD_DECLARATION = "<!DOCTYPE compiler PUBLIC \"-//Eclipse.org//DTD Eclipse JDT 3.2.003 Compiler//EN\" \"http://www.eclipse.org/jdt/core/compiler_32_003.dtd\">"; //$NON-NLS-1$
+		private static final String XML_DTD_DECLARATION = "<!DOCTYPE compiler PUBLIC \"-//Eclipse.org//DTD Eclipse JDT 3.2.004 Compiler//EN\" \"http://www.eclipse.org/jdt/core/compiler_32_004.dtd\">"; //$NON-NLS-1$
 		static {
 			try {
 				Class c = IProblem.class;
@@ -718,6 +725,17 @@ public class Main implements ProblemSeverities, SuffixConstants {
 			this.printlnErr(error);
 		}
 
+		/**
+		 * @param message the given message
+		 */
+		public void logWarning(String message) {
+			if ((this.tagBits & Logger.XML) != 0) {
+				this.parameters.put(Logger.MESSAGE, message);
+				printTag(Logger.WARNING_TAG, this.parameters, true, true);
+			}
+			this.printlnOut(message);
+		}
+
 		private void logProblem(CategorizedProblem problem, int localErrorCount,
 			int globalErrorCount, char[] unitSource) {
 			if ((this.tagBits & Logger.EMACS) != 0) {
@@ -1711,6 +1729,7 @@ public void configure(String[] argv) {
 	final int INSIDE_PROCESSOR_start = 18;
 	final int INSIDE_S_start = 19;
 	final int INSIDE_CLASS_NAMES = 20;
+	final int INSIDE_WARNINGS_PROPERTIES = 21;
 
 	final int DEFAULT = 0;
 	ArrayList bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH);
@@ -1730,7 +1749,6 @@ public void configure(String[] argv) {
 	String usageSection = null;
 	boolean printVersionRequired = false;
 
-	boolean didSpecifyDefaultEncoding = false;
 	boolean didSpecifyDeprecation = false;
 	boolean didSpecifyCompliance = false;
 	boolean didSpecifyDisabledAnnotationProcessing = false;
@@ -1739,6 +1757,8 @@ public void configure(String[] argv) {
 	String customDestinationPath = null;
 	String currentSourceDirectory = null;
 	String currentArg = Util.EMPTY_STRING;
+	
+	Set specifiedEncodings = null;
 
 	// expand the command line if necessary
 	boolean needExpansion = false;
@@ -2023,8 +2043,19 @@ public void configure(String[] argv) {
 					this.showProgress = true;
 					continue;
 				}
-				if (currentArg.equals("-proceedOnError")) { //$NON-NLS-1$
+				if (currentArg.startsWith("-proceedOnError")) { //$NON-NLS-1$
 					mode = DEFAULT;
+					int length = currentArg.length();
+					if (length > 15) {
+						if (currentArg.equals("-proceedOnError:Fatal")) { //$NON-NLS-1$
+							this.options.put(CompilerOptions.OPTION_FatalOptionalError, CompilerOptions.ENABLED);
+						} else {
+							throw new IllegalArgumentException(
+									this.bind("configure.invalidWarningConfiguration", currentArg)); //$NON-NLS-1$
+						}
+					} else {
+						this.options.put(CompilerOptions.OPTION_FatalOptionalError, CompilerOptions.DISABLED);
+					}
 					this.proceedOnError = true;
 					continue;
 				}
@@ -2082,7 +2113,7 @@ public void configure(String[] argv) {
 					continue;
 				}
 				if (currentArg.equals("-inlineJSR")) { //$NON-NLS-1$
-				    mode = DEFAULT;
+					mode = DEFAULT;
 					this.options.put(
 							CompilerOptions.OPTION_InlineJsr,
 							CompilerOptions.ENABLED);
@@ -2169,7 +2200,7 @@ public void configure(String[] argv) {
 							break;
 						case '-' :
 							warnTokenStart = 7;
-							isEnabling = false; // mentionned warnings are disabled
+							isEnabling = false; // specified warnings are disabled
 							allowPlusOrMinus = true;
 							break;
 						default:
@@ -2187,7 +2218,7 @@ public void configure(String[] argv) {
 						this.options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.WARNING);
 					}
 
-					nextToken: while (tokenizer.hasMoreTokens()) {
+					while (tokenizer.hasMoreTokens()) {
 						String token = tokenizer.nextToken();
 						tokenCounter++;
 						switch(token.charAt(0)) {
@@ -2196,8 +2227,8 @@ public void configure(String[] argv) {
 									isEnabling = true;
 									token = token.substring(1);
 								} else {
-									tokenCounter = 0;
-									break nextToken;
+									throw new IllegalArgumentException(
+											this.bind("configure.invalidUsageOfPlusOption", token)); //$NON-NLS-1$
 								}
 								break;
 							case '-' :
@@ -2205,10 +2236,9 @@ public void configure(String[] argv) {
 									isEnabling = false;
 									token = token.substring(1);
 								} else {
-									tokenCounter = 0;
-									break nextToken;
+									throw new IllegalArgumentException(
+											this.bind("configure.invalidUsageOfMinusOption", token)); //$NON-NLS-1$
 								}
-								break;
 						}
 						handleWarningToken(token, isEnabling);
 					}
@@ -2218,6 +2248,69 @@ public void configure(String[] argv) {
 					}
 					continue;
 				}
+				if (currentArg.startsWith("-err")) { //$NON-NLS-1$
+					mode = DEFAULT;
+					String errorOption = currentArg;
+					int length = currentArg.length();
+					if (length <= 5) {
+						throw new IllegalArgumentException(
+							this.bind("configure.invalidErrorConfiguration", errorOption)); //$NON-NLS-1$
+					}
+					int errorTokenStart;
+					boolean isEnabling, allowPlusOrMinus;
+					switch (errorOption.charAt(5)) {
+						case '+' :
+							errorTokenStart = 6;
+							isEnabling = true;
+							allowPlusOrMinus = true;
+							break;
+						case '-' :
+							errorTokenStart = 6;
+							isEnabling = false; // specified errors are disabled
+							allowPlusOrMinus = true;
+							break;
+						default:
+							disableErrors();
+							errorTokenStart = 5;
+							isEnabling = true;
+							allowPlusOrMinus = false;
+					}
+
+					StringTokenizer tokenizer =
+						new StringTokenizer(errorOption.substring(errorTokenStart, errorOption.length()), ","); //$NON-NLS-1$
+					int tokenCounter = 0;
+
+					while (tokenizer.hasMoreTokens()) {
+						String token = tokenizer.nextToken();
+						tokenCounter++;
+						switch(token.charAt(0)) {
+							case '+' :
+								if (allowPlusOrMinus) {
+									isEnabling = true;
+									token = token.substring(1);
+								} else {
+									throw new IllegalArgumentException(
+											this.bind("configure.invalidUsageOfPlusOption", token)); //$NON-NLS-1$
+								}
+								break;
+							case '-' :
+								if (allowPlusOrMinus) {
+									isEnabling = false;
+									token = token.substring(1);
+								} else {
+									throw new IllegalArgumentException(
+											this.bind("configure.invalidUsageOfMinusOption", token)); //$NON-NLS-1$
+								}
+								break;
+						}
+						handleErrorToken(token, isEnabling);
+					}
+					if (tokenCounter == 0) {
+						throw new IllegalArgumentException(
+							this.bind("configure.invalidErrorOption", currentArg)); //$NON-NLS-1$
+					}
+					continue;
+				}
 				if (currentArg.equals("-target")) { //$NON-NLS-1$
 					mode = INSIDE_TARGET;
 					continue;
@@ -2226,11 +2319,11 @@ public void configure(String[] argv) {
 					this.options.put(
 						CompilerOptions.OPTION_PreserveUnusedLocal,
 						CompilerOptions.PRESERVE);
-				    mode = DEFAULT;
+					mode = DEFAULT;
 					continue;
 				}
 				if (currentArg.equals("-enableJavadoc")) {//$NON-NLS-1$
-				    mode = DEFAULT;
+					mode = DEFAULT;
 					this.enableJavadocOn = true;
 					continue;
 				}
@@ -2293,6 +2386,10 @@ public void configure(String[] argv) {
 					mode = INSIDE_CLASS_NAMES;
 					continue;
 				}
+				if (currentArg.equals("-properties")) { //$NON-NLS-1$
+					mode = INSIDE_WARNINGS_PROPERTIES;
+					continue;
+				}
 				break;
 			case INSIDE_TARGET :
 				if (this.didSpecifyTarget) {
@@ -2373,9 +2470,23 @@ public void configure(String[] argv) {
 				mode = DEFAULT;
 				continue;
 			case INSIDE_DEFAULT_ENCODING :
-				if (didSpecifyDefaultEncoding) {
-					throw new IllegalArgumentException(
-						this.bind("configure.duplicateDefaultEncoding", currentArg)); //$NON-NLS-1$
+				if (specifiedEncodings != null) {
+					// check already defined encoding
+					if (!specifiedEncodings.contains(currentArg)) {
+						if (specifiedEncodings.size() > 1) {
+							this.logger.logWarning(
+									this.bind("configure.differentencodings", //$NON-NLS-1$
+									currentArg,
+									getAllEncodings(specifiedEncodings)));
+						} else {
+							this.logger.logWarning(
+									this.bind("configure.differentencoding", //$NON-NLS-1$
+									currentArg,
+									getAllEncodings(specifiedEncodings)));
+						}
+					}
+				} else {
+					specifiedEncodings = new HashSet();
 				}
 				try { // ensure encoding is supported
 					new InputStreamReader(new ByteArrayInputStream(new byte[0]), currentArg);
@@ -2383,8 +2494,8 @@ public void configure(String[] argv) {
 					throw new IllegalArgumentException(
 						this.bind("configure.unsupportedEncoding", currentArg)); //$NON-NLS-1$
 				}
+				specifiedEncodings.add(currentArg);
 				this.options.put(CompilerOptions.OPTION_Encoding, currentArg);
-				didSpecifyDefaultEncoding = true;
 				mode = DEFAULT;
 				continue;
 			case INSIDE_DESTINATION_PATH :
@@ -2469,6 +2580,10 @@ public void configure(String[] argv) {
 				}
 				mode = DEFAULT;
 				continue;
+			case INSIDE_WARNINGS_PROPERTIES :
+				initializeWarnings(currentArg);
+				mode = DEFAULT;
+				continue;
 		}
 
 		// default is input directory, if no custom destination path exists
@@ -2562,9 +2677,6 @@ public void configure(String[] argv) {
 	// configure warnings for javadoc contents
 	if (this.warnJavadocOn) {
 		this.options.put(
-			CompilerOptions.OPTION_ReportInvalidJavadoc,
-			CompilerOptions.WARNING);
-		this.options.put(
 			CompilerOptions.OPTION_ReportInvalidJavadocTags,
 			CompilerOptions.ENABLED);
 		this.options.put(
@@ -2574,17 +2686,9 @@ public void configure(String[] argv) {
 			CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef,
 			CompilerOptions.ENABLED);
 		this.options.put(
-			CompilerOptions.OPTION_ReportMissingJavadocTags,
-			CompilerOptions.WARNING);
-		this.options.put(
 			CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility,
 			CompilerOptions.PRIVATE);
 	}
-	if (this.warnAllJavadocOn) {
-		this.options.put(
-			CompilerOptions.OPTION_ReportMissingJavadocComments,
-			CompilerOptions.WARNING);
-	}
 
 	if (printUsageRequired || (filesCount == 0 && classCount == 0)) {
 		if (usageSection ==  null) {
@@ -2648,6 +2752,11 @@ public void configure(String[] argv) {
 			endorsedDirClasspaths,
 			customEncoding);
 
+	if (specifiedEncodings != null && specifiedEncodings.size() > 1) {
+		this.logger.logWarning(this.bind("configure.multipleencodings", //$NON-NLS-1$
+				(String) this.options.get(CompilerOptions.OPTION_Encoding),
+				getAllEncodings(specifiedEncodings)));
+	}
 	if (this.pendingErrors != null) {
 		for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) {
 			String message = (String) iterator.next();
@@ -2656,6 +2765,52 @@ public void configure(String[] argv) {
 		this.pendingErrors = null;
 	}
 }
+private static String getAllEncodings(Set encodings) {
+	int size = encodings.size();
+	String[] allEncodings = new String[size];
+	encodings.toArray(allEncodings);
+	Arrays.sort(allEncodings);
+	StringBuffer buffer = new StringBuffer();
+	for (int i = 0; i < size; i++) {
+		if (i > 0) {
+			buffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(allEncodings[i]);
+	}
+	return String.valueOf(buffer);
+}
+
+private void initializeWarnings(String propertiesFile) {
+	File file = new File(propertiesFile);
+	if (!file.exists()) {
+		throw new IllegalArgumentException(this.bind("configure.missingwarningspropertiesfile", propertiesFile)); //$NON-NLS-1$
+	}
+	BufferedInputStream stream = null;
+	Properties properties = null;
+	try {
+		stream = new BufferedInputStream(new FileInputStream(propertiesFile));
+		properties = new Properties();
+		properties.load(stream);
+	} catch(IOException e) {
+		e.printStackTrace();
+		throw new IllegalArgumentException(this.bind("configure.ioexceptionwarningspropertiesfile", propertiesFile)); //$NON-NLS-1$
+	} finally {
+		if (stream != null) {
+			try {
+				stream.close();
+			} catch(IOException e) {
+				// ignore
+			}
+		}
+	}
+	for (Iterator iterator = properties.entrySet().iterator(); iterator.hasNext(); ) {
+		Map.Entry entry = (Map.Entry) iterator.next();
+		final String key = (String) entry.getKey();
+		if (key.startsWith("org.eclipse.jdt.core.compiler.problem")) { //$NON-NLS-1$
+			this.options.put(key, entry.getValue());
+		}
+	}
+}
 protected void disableWarnings() {
 	Object[] entries = this.options.entrySet().toArray();
 	for (int i = 0, max = entries.length; i < max; i++) {
@@ -2670,6 +2825,19 @@ protected void disableWarnings() {
 	}
 	this.options.put(CompilerOptions.OPTION_TaskTags, Util.EMPTY_STRING);
 }
+protected void disableErrors() {
+	Object[] entries = this.options.entrySet().toArray();
+	for (int i = 0, max = entries.length; i < max; i++) {
+		Map.Entry entry = (Map.Entry) entries[i];
+		if (!(entry.getKey() instanceof String))
+			continue;
+		if (!(entry.getValue() instanceof String))
+			continue;
+		if (((String) entry.getValue()).equals(CompilerOptions.ERROR)) {
+			this.options.put(entry.getKey(), CompilerOptions.IGNORE);
+		}
+	}
+}
 public String extractDestinationPathFromSourceFile(CompilationResult result) {
 	ICompilationUnit compilationUnit = result.compilationUnit;
 	if (compilationUnit != null) {
@@ -2761,12 +2929,7 @@ public IErrorHandlingPolicy getHandlingPolicy() {
 public File getJavaHome() {
 	if (!this.javaHomeChecked) {
 		this.javaHomeChecked = true;
-		String javaHome = System.getProperty("java.home");//$NON-NLS-1$
-		if (javaHome != null) {
-			this.javaHomeCache = new File(javaHome);
-			if (!this.javaHomeCache.exists())
-				this.javaHomeCache = null;
-		}
+		this.javaHomeCache = Util.getJavaHome();
 	}
 	return this.javaHomeCache;
 }
@@ -2796,74 +2959,13 @@ protected ArrayList handleBootclasspath(ArrayList bootclasspaths, String customE
 				paths[i], customEncoding, false, true);
 		}
 	} else {
-	 	bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH);
-		/* no bootclasspath specified
-		 * we can try to retrieve the default librairies of the VM used to run
-		 * the batch compiler
-		 */
-		 String javaversion = System.getProperty("java.version");//$NON-NLS-1$
-		 if (javaversion != null && javaversion.equalsIgnoreCase("1.1.8")) { //$NON-NLS-1$
+		bootclasspaths = new ArrayList(DEFAULT_SIZE_CLASSPATH);
+		try {
+			Util.collectRunningVMBootclasspath(bootclasspaths);
+		} catch(IllegalStateException e) {
 			this.logger.logWrongJDK();
 			this.proceed = false;
 			return null;
-		 }
-
-	 	/*
-	 	 * Handle >= JDK 1.2.2 settings: retrieve the bootclasspath
-	 	 */
-		// check bootclasspath properties for Sun, JRockit and Harmony VMs
-		String bootclasspathProperty = System.getProperty("sun.boot.class.path"); //$NON-NLS-1$
-		if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) {
-			// IBM J9 VMs
-			bootclasspathProperty = System.getProperty("vm.boot.class.path"); //$NON-NLS-1$
-			if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) {
-				// Harmony using IBM VME
-				bootclasspathProperty = System.getProperty("org.apache.harmony.boot.class.path"); //$NON-NLS-1$
-			}
-		}
-		if ((bootclasspathProperty != null) && (bootclasspathProperty.length() != 0)) {
-			StringTokenizer tokenizer = new StringTokenizer(bootclasspathProperty, File.pathSeparator);
-			String token;
-			while (tokenizer.hasMoreTokens()) {
-				token = tokenizer.nextToken();
-				FileSystem.Classpath currentClasspath = FileSystem
-						.getClasspath(token, customEncoding, null);
-				if (currentClasspath != null) {
-					bootclasspaths.add(currentClasspath);
-				}
-			}
-		} else {
-			// try to get all jars inside the lib folder of the java home
-			final File javaHome = getJavaHome();
-			if (javaHome != null) {
-				File[] directoriesToCheck = null;
-				if (System.getProperty("os.name").startsWith("Mac")) {//$NON-NLS-1$//$NON-NLS-2$
-					directoriesToCheck = new File[] {
-						new File(javaHome, "../Classes"), //$NON-NLS-1$
-					};
-				} else {
-					// fall back to try to retrieve them out of the lib directory
-					directoriesToCheck = new File[] {
-						new File(javaHome, "lib") //$NON-NLS-1$
-					};
-				}
-				File[][] systemLibrariesJars = getLibrariesFiles(directoriesToCheck);
-				if (systemLibrariesJars != null) {
-					for (int i = 0, max = systemLibrariesJars.length; i < max; i++) {
-						File[] current = systemLibrariesJars[i];
-						if (current != null) {
-							for (int j = 0, max2 = current.length; j < max2; j++) {
-								FileSystem.Classpath classpath =
-									FileSystem.getClasspath(current[j].getAbsolutePath(),
-										null, false, null, null);
-								if (classpath != null) {
-									bootclasspaths.add(classpath);
-								}
-							}
-						}
-					}
-				}
-			}
 		}
 	}
 	return bootclasspaths;
@@ -3058,13 +3160,48 @@ protected ArrayList handleExtdirs(ArrayList extdirsClasspaths) {
  * Handle a single warning token.
 */
 protected void handleWarningToken(String token, boolean isEnabling) {
+	handleErrorOrWarningToken(token, isEnabling, ProblemSeverities.Warning);
+}
+protected void handleErrorToken(String token, boolean isEnabling) {
+	handleErrorOrWarningToken(token, isEnabling, ProblemSeverities.Error);
+}
+private void setSeverity(String compilerOptions, int severity, boolean isEnabling) {
+	if (isEnabling) {
+		switch(severity) {
+			case ProblemSeverities.Error :
+				this.options.put(compilerOptions, CompilerOptions.ERROR);
+				break;
+			case ProblemSeverities.Warning :
+				this.options.put(compilerOptions, CompilerOptions.WARNING);
+				break;
+			default:
+				this.options.put(compilerOptions, CompilerOptions.IGNORE);
+		}
+	} else {
+		switch(severity) {
+			case ProblemSeverities.Error :
+				String currentValue = (String) this.options.get(compilerOptions);
+				if (CompilerOptions.ERROR.equals(currentValue)) {
+					this.options.put(compilerOptions, CompilerOptions.IGNORE);
+				}
+				break;
+			case ProblemSeverities.Warning :
+				currentValue = (String) this.options.get(compilerOptions);
+				if (CompilerOptions.WARNING.equals(currentValue)) {
+					this.options.put(compilerOptions, CompilerOptions.IGNORE);
+				}
+				break;
+			default:
+				this.options.put(compilerOptions, CompilerOptions.IGNORE);
+		}
+	}
+}
+private void handleErrorOrWarningToken(String token, boolean isEnabling, int severity) {
 	if (token.length() == 0) return;
 	switch(token.charAt(0)) {
 		case 'a' :
 			if (token.equals("allDeprecation")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportDeprecation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportDeprecation, severity, isEnabling);
 				this.options.put(
 					CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
 					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
@@ -3074,58 +3211,51 @@ protected void handleWarningToken(String token, boolean isEnabling) {
 				return;
 			} else if (token.equals("allJavadoc")) { //$NON-NLS-1$
 				this.warnAllJavadocOn = this.warnJavadocOn = isEnabling;
+				setSeverity(CompilerOptions.OPTION_ReportInvalidJavadoc, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportMissingJavadocTags, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportMissingJavadocComments, severity, isEnabling);
 				return;
 			} else if (token.equals("assertIdentifier")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportAssertIdentifier,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportAssertIdentifier, severity, isEnabling);
 				return;
 			} else if (token.equals("allDeadCode")) { //$NON-NLS-1$
+				setSeverity(CompilerOptions.OPTION_ReportDeadCode, severity, isEnabling);
 				this.options.put(
-						CompilerOptions.OPTION_ReportDeadCode,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-					this.options.put(
-						CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement,
-						isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
-					return;
+					CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement,
+					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+				return;
+			} else if (token.equals("allOver-ann")) { //$NON-NLS-1$
+				setSeverity(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, severity, isEnabling);
+				this.options.put(
+					CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation,
+					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+				return;
 			}
 			break;
 		case 'b' :
 			if (token.equals("boxing")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportAutoboxing,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportAutoboxing, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'c' :
 			if (token.equals("constructorName")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportMethodWithConstructorName,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMethodWithConstructorName, severity, isEnabling);
 				return;
 			} else if (token.equals("conditionAssign")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, severity, isEnabling);
 				return;
 			} else if (token.equals("compareIdentical")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportComparingIdentical,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportComparingIdentical, severity, isEnabling);
 				return;
 			} else if (token.equals("charConcat") /*|| token.equals("noImplicitStringConversion")/*backward compatible*/) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNoImplicitStringConversion,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNoImplicitStringConversion, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'd' :
 			if (token.equals("deprecation")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportDeprecation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportDeprecation, severity, isEnabling);
 				this.options.put(
 					CompilerOptions.OPTION_ReportDeprecationInDeprecatedCode,
 					CompilerOptions.DISABLED);
@@ -3134,19 +3264,13 @@ protected void handleWarningToken(String token, boolean isEnabling) {
 					CompilerOptions.DISABLED);
 				return;
 			} else if (token.equals("dep-ann")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMissingDeprecatedAnnotation, severity, isEnabling);
 				return;
 			} else if (token.equals("discouraged")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportDiscouragedReference,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportDiscouragedReference, severity, isEnabling);
 				return;
 			} else if (token.equals("deadCode")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportDeadCode,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportDeadCode, severity, isEnabling);
 				this.options.put(
 					CompilerOptions.OPTION_ReportDeadCodeInTrivialIfStatement,
 					CompilerOptions.DISABLED);
@@ -3156,195 +3280,132 @@ protected void handleWarningToken(String token, boolean isEnabling) {
 		case 'e' :
 			if (token.equals("enumSwitch") //$NON-NLS-1$
 					|| token.equals("incomplete-switch")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportIncompleteEnumSwitch,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportIncompleteEnumSwitch, severity, isEnabling);
 				return;
 			} else if (token.equals("emptyBlock")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUndocumentedEmptyBlock,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, severity, isEnabling);
 				return;
 			} else if (token.equals("enumIdentifier")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportEnumIdentifier,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportEnumIdentifier, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'f' :
 			if (token.equals("fieldHiding")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportFieldHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportFieldHiding, severity, isEnabling);
 				return;
 			} else if (token.equals("finalBound")) {//$NON-NLS-1$
-				this.options.put(
-						CompilerOptions.OPTION_ReportFinalParameterBound,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportFinalParameterBound, severity, isEnabling);
 				return;
 			} else if (token.equals("finally")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportFinallyBlockNotCompletingNormally, severity, isEnabling);
 				return;
 			} else if (token.equals("forbidden")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportForbiddenReference,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportForbiddenReference, severity, isEnabling);
 				return;
 			} else if (token.equals("fallthrough")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportFallthroughCase,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportFallthroughCase, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'h' :
 			if (token.equals("hiding")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportHiddenCatchBlock,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportLocalVariableHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportFieldHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportTypeParameterHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportHiddenCatchBlock, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportLocalVariableHiding, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportFieldHiding, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportTypeParameterHiding, severity, isEnabling);
 				return;
 			} else if (token.equals("hashCode")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportMissingHashCodeMethod,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMissingHashCodeMethod, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'i' :
 			if (token.equals("indirectStatic")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportIndirectStaticAccess,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportIndirectStaticAccess, severity, isEnabling);
 				return;
 			} else if (token.equals("intfNonInherited") || token.equals("interfaceNonInherited")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportIncompatibleNonInheritedInterfaceMethod, severity, isEnabling);
 				return;
 			} else if (token.equals("intfAnnotation")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportAnnotationSuperInterface,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportAnnotationSuperInterface, severity, isEnabling);
 				return;
 			} else if (token.equals("intfRedundant") /*|| token.equals("redundantSuperinterface")*/) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportRedundantSuperinterface,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
+				setSeverity(CompilerOptions.OPTION_ReportRedundantSuperinterface, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'j' :
 			if (token.equals("javadoc")) {//$NON-NLS-1$
 				this.warnJavadocOn = isEnabling;
+				setSeverity(CompilerOptions.OPTION_ReportInvalidJavadoc, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportMissingJavadocTags, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'l' :
 			if (token.equals("localHiding")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportLocalVariableHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportLocalVariableHiding, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'm' :
 			if (token.equals("maskedCatchBlock") || token.equals("maskedCatchBlocks")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportHiddenCatchBlock,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportHiddenCatchBlock, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'n' :
 			if (token.equals("nls")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNonExternalizedStringLiteral,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, severity, isEnabling);
 				return;
 			} else if (token.equals("noEffectAssign")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNoEffectAssignment,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNoEffectAssignment, severity, isEnabling);
 				return;
 			} else if (/*token.equals("charConcat") ||*/ token.equals("noImplicitStringConversion")/*backward compatible*/) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNoImplicitStringConversion,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNoImplicitStringConversion, severity, isEnabling);
 				return;
 			} else if (token.equals("null")) { //$NON-NLS-1$
-				this.options.put(
-						CompilerOptions.OPTION_ReportNullReference,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-						CompilerOptions.OPTION_ReportPotentialNullReference,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-						CompilerOptions.OPTION_ReportRedundantNullCheck,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNullReference, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportPotentialNullReference, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportRedundantNullCheck, severity, isEnabling);
 				return;
 			} else if (token.equals("nullDereference")) { //$NON-NLS-1$
-				this.options.put(
-						CompilerOptions.OPTION_ReportNullReference,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNullReference, severity, isEnabling);
 				if (!isEnabling) {
-					this.options.put(
-							CompilerOptions.OPTION_ReportPotentialNullReference,
-							CompilerOptions.IGNORE);
-					this.options.put(
-							CompilerOptions.OPTION_ReportRedundantNullCheck,
-							CompilerOptions.IGNORE);
+					setSeverity(CompilerOptions.OPTION_ReportPotentialNullReference, ProblemSeverities.Ignore, isEnabling);
+					setSeverity(CompilerOptions.OPTION_ReportRedundantNullCheck, ProblemSeverities.Ignore, isEnabling);
 				}
 				return;
 			}
 			break;
 		case 'o' :
 			if (token.equals("over-sync") /*|| token.equals("syncOverride")*/) { //$NON-NLS-1$ 
-				this.options.put(
-					CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod,
-					isEnabling ? CompilerOptions.ERROR : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, severity, isEnabling);
 				return;
 			} else if (token.equals("over-ann")) { //$NON-NLS-1$
+				setSeverity(CompilerOptions.OPTION_ReportMissingOverrideAnnotation, severity, isEnabling);
 				this.options.put(
-					CompilerOptions.OPTION_ReportMissingOverrideAnnotation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+					CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation,
+					CompilerOptions.DISABLED);
 				return;
 			}
 			break;
 		case 'p' :
 			if (token.equals("pkgDefaultMethod") || token.equals("packageDefaultMethod")/*backward compatible*/ ) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
+				setSeverity(CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod, severity, isEnabling);
 				return;
 			} else if (token.equals("paramAssign")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportParameterAssignment,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportParameterAssignment, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'r' :
 			if (token.equals("raw")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportRawTypeReference,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportRawTypeReference, severity, isEnabling);
 				return;
 			} else if (/*token.equals("intfRedundant") ||*/ token.equals("redundantSuperinterface")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportRedundantSuperinterface,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
+				setSeverity(CompilerOptions.OPTION_ReportRedundantSuperinterface, severity, isEnabling);
 				return;
 			}
 			break;
@@ -3355,47 +3416,45 @@ protected void handleWarningToken(String token, boolean isEnabling) {
 					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
 				return;
 			} else if (token.equals("syntheticAccess") || token.equals("synthetic-access")) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportSyntheticAccessEmulation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, severity, isEnabling);
 				return;
 			} else if (token.equals("staticReceiver")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, severity, isEnabling);
 				return;
 			} else 	if (/*token.equals("over-sync") ||*/ token.equals("syncOverride")) { //$NON-NLS-1$ 
-				this.options.put(
-					CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod,
-					isEnabling ? CompilerOptions.ERROR : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, severity, isEnabling);
 				return;
 			} else if (token.equals("semicolon")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportEmptyStatement,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportEmptyStatement, severity, isEnabling);
 				return;
 			} else if (token.equals("serial")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportMissingSerialVersion,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportMissingSerialVersion, severity, isEnabling);
 				return;
 			} else if (token.equals("suppress")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_SuppressWarnings,
-					isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+				switch(severity) {
+					case ProblemSeverities.Warning :
+						this.options.put(
+								CompilerOptions.OPTION_SuppressWarnings,
+								isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+						this.options.put(
+								CompilerOptions.OPTION_SuppressOptionalErrors,
+								CompilerOptions.DISABLED);
+						break;
+					case ProblemSeverities.Error :
+						this.options.put(
+								CompilerOptions.OPTION_SuppressWarnings,
+								isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+						this.options.put(
+							CompilerOptions.OPTION_SuppressOptionalErrors,
+							isEnabling ? CompilerOptions.ENABLED : CompilerOptions.DISABLED);
+				}
 				return;
 			} else if (token.equals("static-access")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportNonStaticAccessToStatic,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportIndirectStaticAccess,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportNonStaticAccessToStatic, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportIndirectStaticAccess, severity, isEnabling);
 				return;
 			} else if (token.equals("super")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportOverridingMethodWithoutSuperInvocation, severity, isEnabling);
 				return;
 			}
 			break;
@@ -3414,116 +3473,85 @@ protected void handleWarningToken(String token, boolean isEnabling) {
 				this.options.put(
 					CompilerOptions.OPTION_TaskTags,
 					isEnabling ? taskTags : Util.EMPTY_STRING);
+				
+				setSeverity(CompilerOptions.OPTION_ReportTasks, severity, isEnabling);
 				return;
 			} else if (token.equals("typeHiding")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportTypeParameterHiding,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportTypeParameterHiding, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'u' :
 			if (token.equals("unusedLocal") || token.equals("unusedLocals")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedLocal,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedLocal, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedArgument") || token.equals("unusedArguments")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedParameter,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedParameter, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedImport") || token.equals("unusedImports")/*backward compatible*/) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedImport,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedImport, severity, isEnabling);
+				return;
+			} else if (token.equals("unusedAllocation")) { //$NON-NLS-1$
+				setSeverity(CompilerOptions.OPTION_ReportUnusedObjectAllocation, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedPrivate")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedPrivateMember,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedPrivateMember, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedLabel")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedLabel,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedLabel, severity, isEnabling);
 				return;
 			} else if (token.equals("uselessTypeCheck")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnnecessaryTypeCheck,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, severity, isEnabling);
 				return;
 			} else if (token.equals("unchecked") || token.equals("unsafe")) {//$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUncheckedTypeOperation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUncheckedTypeOperation, severity, isEnabling);
 				return;
 			} else if (token.equals("unnecessaryElse")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnnecessaryElse,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnnecessaryElse, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedThrown")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling);
 				return;
 			} else if (token.equals("unqualifiedField") || token.equals("unqualified-field-access")) { //$NON-NLS-1$ //$NON-NLS-2$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnqualifiedFieldAccess,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, severity, isEnabling);
 				return;
 			} else if (token.equals("unused")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedLocal,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedParameter,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedImport,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedPrivateMember,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedDeclaredThrownException,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-						CompilerOptions.OPTION_ReportUnusedLabel,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-						CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
-						isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedLocal, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedParameter, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedImport, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedPrivateMember, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedDeclaredThrownException, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedLabel, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
 				return;
 			} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'v' :
 			if (token.equals("varargsCast")) { //$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportVarargsArgumentNeedCast,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportVarargsArgumentNeedCast, severity, isEnabling);
 				return;
 			}
 			break;
 		case 'w' :
 			if (token.equals("warningToken")) {//$NON-NLS-1$
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnhandledWarningToken,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
-				this.options.put(
-					CompilerOptions.OPTION_ReportUnusedWarningToken,
-					isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
+				setSeverity(CompilerOptions.OPTION_ReportUnhandledWarningToken, severity, isEnabling);
+				setSeverity(CompilerOptions.OPTION_ReportUnusedWarningToken, severity, isEnabling);
 				return;
 			}
 			break;
 	}
-	addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
+	String message = null;
+	switch(severity) {
+		case ProblemSeverities.Warning :
+			message = this.bind("configure.invalidWarning", token); //$NON-NLS-1$
+			break;
+		case ProblemSeverities.Error :
+			message = this.bind("configure.invalidError", token); //$NON-NLS-1$
+	}
+	addPendingErrors(message);
 }
 /**
  * @deprecated - use {@link #initialize(PrintWriter, PrintWriter, boolean, Map, CompilationProgress)} instead
@@ -3546,6 +3574,7 @@ protected void initialize(PrintWriter outWriter, PrintWriter errWriter, boolean
 	this.err = errWriter;
 	this.systemExitWhenFinished = systemExit;
 	this.options = new CompilerOptions().getMap();
+
 	this.progress = compilationProgress;
 	if (customDefaultOptions != null) {
 		this.didSpecifySource = customDefaultOptions.get(CompilerOptions.OPTION_Source) != null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 76420d7..f5758b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,10 +13,10 @@
 
 ### compiler
 #Format: compiler.name = word1 word2 word3
-compiler.name = Eclipse Compiler for Java (TM)
+compiler.name = Eclipse Compiler for Java(TM)
 #Format: compiler.version = 0.XXX[, other words (don't forget the comma if adding other words)]
-compiler.version = 0.981_R35x, 3.5.2 release
-compiler.copyright = Copyright IBM Corp 2000, 2009. All rights reserved.
+compiler.version = 0.A76_R36x, 3.6.2
+compiler.copyright = Copyright IBM Corp 2000, 2010. All rights reserved.
 
 ### progress
 progress.compiling = Compiling
@@ -52,9 +52,9 @@ configure.duplicateBootClasspath = duplicate bootclasspath specification: {0}
 configure.duplicateExtDirs = duplicate extdirs specification: {0}
 configure.duplicateSourcepath = duplicate sourcepath specification: {0}
 configure.invalidDebugOption = invalid debug option: {0}
-configure.invalidWarningConfiguration = invalid warning configuration: {0}
-configure.invalidWarning = invalid warning: {0}. Ignoring warning and compiling
-configure.invalidWarningOption = invalid warning option: {0}. Must specify a warning token
+configure.invalidWarningConfiguration = invalid warning configuration: ''{0}''
+configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling
+configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token
 configure.targetJDK = target level should be comprised in between ''1.1'' and ''1.7'' (or ''5'', ''5.0'', ..., ''7'' or ''7.0'') or cldc1.1: {0}
 configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required
 configure.incompatibleTargetForGenericSource = Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.5'' or better is required
@@ -62,6 +62,13 @@ configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompat
 configure.incompatibleComplianceForTarget = Compliance level ''{0}'' is incompatible with target level ''{1}''. A compliance level ''{1}'' or better is required
 configure.repetition = repetition must be a positive integer: {0}
 configure.maxProblems = max problems must be a positive integer: {0}
+
+configure.invalidErrorConfiguration = invalid error configuration: ''{0}''
+configure.invalidError = invalid error token: ''{0}''. Ignoring this error token and compiling
+configure.invalidErrorOption = invalid error option: ''{0}''. Must specify an error token
+configure.invalidUsageOfPlusOption=usage of ''+'' for ''{0}'' is illegal there
+configure.invalidUsageOfMinusOption=usage of ''-'' for ''{0}'' is illegal there
+
 ## configure.directoryNotExist = directory does not exist: {0}
 configure.unrecognizedOption = Unrecognized option : {0}
 configure.noClasspath = no classpath defined, using default directory instead
@@ -88,6 +95,11 @@ configure.incompatibleSourceForCldcTarget=Target level ''{0}'' is incompatible w
 configure.incompatibleComplianceForCldcTarget=Target level ''{0}'' is incompatible with compliance level ''{1}''. A compliance level ''1.4''or lower is required
 configure.invalidClasspathSection = invalid Class-Path header in manifest of jar file: {0}
 configure.multipleClasspathSections = multiple Class-Path headers in manifest of jar file: {0}
+configure.missingwarningspropertiesfile=properties file {0} does not exist
+configure.ioexceptionwarningspropertiesfile=An IOException occurred while reading the properties file {0}
+configure.multipleencodings=Multiple encoding specified: {1}. The default encoding has been set to {0}
+configure.differentencodings=Found encoding {0}. Different encodings were specified: {1}
+configure.differentencoding=Found encoding {0}. A different encoding was specified: {1}
 
 ### requestor
 requestor.error = {0}. ERROR in {1}
@@ -146,9 +158,11 @@ misc.usage = {1} {2}\n\
 \                       created); this option can be overridden per source\n\
 \                       directory\n\
 \    -d none            generate no .class files\n\
-\    -encoding <enc>    specify custom encoding for all sources. Each\n\
+\    -encoding <enc>    specify default encoding for all source files. Each\n\
 \                       file/directory can override it when suffixed with\n\
-\                       ''[''<enc>'']'' (e.g. X.java[utf8])\n\
+\                       ''[''<enc>'']'' (e.g. X.java[utf8]).\n\
+\                       If multiple default encodings are specified, the last\n\
+\                       one will be used.\n\
 \ \n\
 \ Compliance options:\n\
 \    -1.3               use 1.3 compliance (-source 1.3 -target 1.1)\n\
@@ -167,6 +181,20 @@ misc.usage = {1} {2}\n\
 \    -nowarn -warn:none disable all warnings\n\
 \    -?:warn -help:warn display advanced warning options\n\
 \ \n\
+\ Error options:\n\
+\    -err:<warnings separated by ,>    convert exactly the listed warnings\n\
+\                                      to be reported as errors\n\
+\    -err:+<warnings separated by ,>   enable additional warnings to be\n\
+\                                      reported as errors\n\
+\    -err:-<warnings separated by ,>   disable specific warnings to be\n\
+\                                      reported as errors\n\
+\ \n\
+\ Setting warning or error options using properties file:\n\
+\    -properties: <file>   set warnings/errors option based on the properties\n\
+\                          file contents. This option can be used with -nowarn,\n\
+\                          -err:.. or -warn:.. options, but the last one on the\n\
+\                          command line sets the options to be used.\n\
+\ \n\
 \ Debug options:\n\
 \    -g[:lines,vars,source] custom debug info\n\
 \    -g:lines,source  + both lines table and source debug info\n\
@@ -200,8 +228,10 @@ misc.usage = {1} {2}\n\
 \                       default)\n\
 \    -log <file>        log to a file. If the file extension is ''.xml'', then\n\
 \                       the log will be a xml file.\n\
-\    -proceedOnError    do not stop at first error, dumping class files with\n\
+\    -proceedOnError[:Fatal]\n\
+\                       do not stop at first error, dumping class files with\n\
 \                       problem methods\n\
+\                       With ":Fatal", all optional errors are treated as fatal\n\
 \    -verbose           enable verbose output\n\
 \    -referenceInfo     compute reference info\n\
 \    -progress          show progress (only in -log mode)\n\
@@ -236,6 +266,7 @@ misc.usage.warn = {1} {2}\n\
 \      allDeadCode          dead code including trivial if(DEBUG) check\n\
 \      allDeprecation       deprecation including inside deprecated code\n\
 \      allJavadoc           invalid or missing javadoc\n\
+\      allOver-ann          all missing @Override annotations\n\
 \      assertIdentifier   + ''assert'' used as identifier\n\
 \      boxing               autoboxing conversion\n\
 \      charConcat         + char[] in String concat\n\
@@ -261,7 +292,7 @@ misc.usage.warn = {1} {2}\n\
 \      indirectStatic       indirect reference to static member\n\
 \      intfAnnotation     + annotation type used as super interface\n\
 \      intfNonInherited   + interface non-inherited method compatibility\n\
-\      intfRedundant      + find redundant superinterfaces\n\
+\      intfRedundant        find redundant superinterfaces\n\
 \      javadoc              invalid javadoc\n\
 \      localHiding          local variable hiding another variable\n\
 \      maskedCatchBlock   + hidden catch block\n\
@@ -269,7 +300,7 @@ misc.usage.warn = {1} {2}\n\
 \      noEffectAssign     + assignment without effect\n\
 \      null                 potential missing or redundant null check\n\
 \      nullDereference    + missing null check\n\
-\      over-ann             missing @Override annotation\n\
+\      over-ann             missing @Override annotation (superclass)\n\
 \      paramAssign          assignment to a parameter\n\
 \      pkgDefaultMethod   + attempt to override package-default method\n\
 \      raw                + usage of raw type\n\
@@ -280,6 +311,8 @@ misc.usage.warn = {1} {2}\n\
 \      staticReceiver     + non-static reference to static member\n\
 \      super                overriding a method without making a super invocation\n\
 \      suppress           + enable @SuppressWarnings\n\
+\                           When used with -err:, it can also silent optional\n\
+\                           errors and warnings\n\
 \      syncOverride         missing synchronized in synchr. method override\n\
 \      syntheticAccess      synthetic access for innerclass\n\
 \      tasks(<tags separated by |>) tasks identified by tags inside comments\n\
@@ -287,9 +320,10 @@ misc.usage.warn = {1} {2}\n\
 \      unchecked          + unchecked type operation\n\
 \      unnecessaryElse      unnecessary else clause\n\
 \      unqualifiedField     unqualified reference to field\n\
-\      unused               macro for unusedArgument, unusedImport, unusedLabel,\n\
-\                               unusedLocal, unusedPrivate, unusedThrown,\n\
-\                               and unusedTypeArgs\n\
+\      unused               macro for unusedAllocation, unusedArgument,\n\
+\                               unusedImport, unusedLabel, unusedLocal,\n\
+\                               unusedPrivate, unusedThrown, and unusedTypeArgs\n\
+\      unusedAllocation     allocating an object that is not used\n\
 \      unusedArgument       unread method parameter\n\
 \      unusedImport       + unused import declaration\n\
 \      unusedLabel        + unused label\n\
@@ -300,8 +334,3 @@ misc.usage.warn = {1} {2}\n\
 \      uselessTypeCheck     unnecessary cast/instanceof operation\n\
 \      varargsCast        + varargs argument need explicit cast\n\
 \      warningToken       + unsupported or unnecessary @SuppressWarnings\n
-
-# GCCMain messages.
-gcc.zipArg=-fzip-target requires argument
-gcc.zipDepArg=-fzip-dependency requires argument
-gcc.noClasspath=no classpath specified
diff --git a/eclipse/plugins/org.eclipse.jdt.core/build.properties b/eclipse/plugins/org.eclipse.jdt.core/build.properties
index 8fa9824..ff33f90 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.core/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -24,16 +24,19 @@ javadoc.packages = org.eclipse.jdt.core.*,\
                    org.eclipse.jdt.core.dom.*,\
                    org.eclipse.jdt.core.dom.rewrite.*,\
                    org.eclipse.jdt.core.search.*
-source.. = 	 batch/,\
+source.. =   batch/,\
 	         codeassist/,\
 	         compiler/,\
 	         eval/,\
 	         formatter/,\
 	         dom/,\
-	         model/,\
-	         search/
+	         search/,\
+	         model/
+output.. = bin/
+output.jdtCompilerAdapter.jar = antbin/
 source.jdtCompilerAdapter.jar = antadapter/
 jars.compile.order=.,jdtCompilerAdapter.jar
 jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar
 src.includes = about.html,\
                schema/
+generateSourceReferences=true
diff --git a/eclipse/plugins/org.eclipse.jdt.core/buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 5365e83..46d9ae9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -3,14 +3,14 @@
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Author" content="IBM">
-   <title>JDT/Core Release Notes 3.5</title>
+   <title>JDT/Core Release Notes 3.6</title>
    <link rel="stylesheet" href="jdt_core_style.css" charset="iso-8859-1" type="text/css">
 </head>
 <body text="#000000" bgcolor="#FFFFFF">
 <table border=0 cellspacing=5 cellpadding=2 width="100%" >
   <tr>
     <td align="left" width="72%" class="title1">
-      <font size="+3"><b>jdt core - build notes 3.5 stream</b></font>
+      <font size="+3"><b>jdt core - build notes 3.6 stream</b></font>
     </td>
   </tr>
   <tr><td align="left" width="72%" class="title2"><font size="-2">Java development tools core</font></td></tr>
@@ -20,13 +20,14 @@
 	  <font size="-1">
 	  Here are the build notes for the Eclipse JDT/Core plug-in project
 	  <a href="http://www.eclipse.org/jdt/core/index.php"><b>org.eclipse.jdt.core</b></a>,
-	  describing <a href="http://bugs.eclipse.org/bugs" target=new>bug</a> resolution and substantial changes in the <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core"><b>HEAD</b></a> branch.
-	  For more information on 3.5 planning, please refer to <a href="http://www.eclipse.org/jdt/core/r3.5/index.php#release-plan">JDT/Core release plan</a>,
-	  the next <a href="http://www.eclipse.org/jdt/core/r3.5/index.php#milestone-plan">milestone plan</a>,
-	  the overall <a href="http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_5.html">official plan</a>,
+	  describing <a href="https://bugs.eclipse.org/bugs" target=new>bug</a> resolution and substantial changes in the <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core"><b>HEAD</b></a> branch.
+	  For more information on 3.6 planning, please refer to <a href="http://www.eclipse.org/jdt/core/r3.6/index.php#release-plan">JDT/Core release plan</a>,
+	  the next <a href="http://www.eclipse.org/jdt/core/r3.6/index.php#milestone-plan">milestone plan</a>,
+	  the overall <a href="http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_6.html">official plan</a>,
 	  or the <a href="http://www.eclipse.org/eclipse/platform-releng/buildSchedule.html">build schedule</a>.
-	  This present document covers all changes since Release 3.4 (also see a summary of <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/API_changes.html">API changes</a>).
+	  This present document covers all changes since Release 3.5 (also see a summary of <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/API_changes.html">API changes</a>).
 	  <br>Maintenance of previous releases of JDT/Core is performed in parallel branches:
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_5_maintenance">R3.5.x</a>,
 		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_4_maintenance">R3.4.x</a>,
 		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_3_maintenance">R3.3.x</a>,
 		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_2_maintenance">R3.2.x</a>,
@@ -39,2556 +40,2511 @@
 	</td>
   </tr>
 </table>
-<a name="v_981_R35x"></a>
+<a name="v_A76_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - February 11, 2010 - 3.5.2
-<br>Project org.eclipse.jdt.core v_981_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_981_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - February 8, 2011 - 3.6.2
+<br>Project org.eclipse.jdt.core v_A76_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A76_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301438">301438</a>
-Eclipse hangs when attempting to refactor using the "change method signature"
-
-<a name="v_980_R35x"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5.2 - January 12, 2010
-<br>Project org.eclipse.jdt.core v_980_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_980_R35x">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=291775">291775</a>
-[formatter] Backport fixes for known issues around 'Never Join Lines' preference to 3.5 maintenance stream
-<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296343">296343</a>
-OOM error caused by java indexing referencing classloader from threadLocal
-
-<a name="v_979_R35x"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5.2 - November 30, 2009
-<br>Project org.eclipse.jdt.core v_979_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_979_R35x">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211">288211</a>
-APT uses a lot of memory
-<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643">277643</a>
-Generics compile error
-
-<a name="v_978_R35x"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5.2 - November 25, 2009
-<br>Project org.eclipse.jdt.core v_978_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_978_R35x">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295698">295698</a>
-[1.5][compiler] ClassCastException in unchecked warning report
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336544">336544</a>
+[regression][compiler] Source flagged as dead code incorrectly.
 
-<a name="v_977_R35x"></a>
+<a name="v_A75_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - November 19, 2009
-<br>Project org.eclipse.jdt.core v_977_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_977_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - February 3, 2011
+<br>Project org.eclipse.jdt.core v_A75_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A75_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
+<ul>
+<li>Bundle version has been increment to 3.6.2.qualifier.</li>
+</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294662">294662</a>
-ClassCastException while invoking quick assist
-<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293443">293443</a>
-AbortCompilation when invoking content assist
-<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294404">294404</a>
--target jsr14 flags error on foreach over Collection that does not implement Iterable
-<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291985">291985</a>
-[compiler][jsr14] Translating Enum with jsr14 target: ECJ causes a runtime error while Sun compiler works fine
 
-<a name="v_976_R35x"></a>
+<a name="v_A74_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - October 21, 2009
-<br>Project org.eclipse.jdt.core v_976_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_976_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - January 19, 2011
+<br>Project org.eclipse.jdt.core v_A74_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A74_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
-
+<ul>
+<li>Only copyrights update with the previous version.</li>
+</ul>
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=292350">292350</a>
-[1.5][compiler] Compiler error: ambiguous method since 3.5.1 using generics and interface inheritance
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=292240">292240</a>
-Compiler error on implementation of raw sub interface
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329288">329288</a>
+Fetching parameter names literally hangs on a class with a lot of methods
 
-<a name="v_975_R35x"></a>
+<a name="v_A73_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - October 14, 2009
-<br>Project org.eclipse.jdt.core v_975_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_975_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - January 12, 2011
+<br>Project org.eclipse.jdt.core v_A73_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A73_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284280">284280</a>
-[1.5][compiler] Error on use generic interface in abstract super class
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=290905">290905</a>
-[formatter] Certain formatter pref constellation cause endless loop ==> OOME
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=291472">291472</a>
-[1.5][compiler] Access to a generic method is compiled incorrectly
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327654">327654</a>
+FUP of bug 317264: Refactoring is not possible if the commons-lang.jar is in the path
 
-<a name="v_974_R35x"></a>
+<a name="v_A72_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - October 7, 2009
-<br>Project org.eclipse.jdt.core v_974_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_974_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - December 17, 2010
+<br>Project org.eclipse.jdt.core v_A72_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A72_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=291322">291322</a>
-Test errors when running JDT Core tests on Windows 7
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285124">285124</a>
-serialVersionUID still causes error/warning
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=290877">290877</a>
-[DOM] If using a tag named '@enum' the ASTParser ignores this
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281575">281575</a>
-Eclipse hangs in SourceMapper while doing java proposals
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323514">323514</a>
+[indexing] The Java Indexer is taking longer to run in eclipse 3.6 when opening projects
 
-<a name="v_973_R35x"></a>
+<a name="v_A71_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.2 - September 30, 2009
-<br>Project org.eclipse.jdt.core v_973_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_973_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - November 16, 2010
+<br>Project org.eclipse.jdt.core v_A71_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A71_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Incremented org.eclipse.jdt.core plug-in ID to "3.5.2"</li>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=290730">290730</a>
-Rewriting SwitchStatement throws NPE
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=290376">290376</a>
-Errant "Comparing identical expressions" warning with assignment
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=287592">287592</a>
-[1.5][compiler] Wrong ambiguous compilation error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=287833">287833</a>
-[formatter] Formatter removes the first character after the * in the <pre> tag
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=289892">289892</a>
-[compiler] NPE during binaryTypeBinding field initialization
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330081">330081</a>
+[compiler] ArrayIndexOutOfBoundsException when Switched from C/C++ Perspective to Java Perspective
 
-<a name="v_972_R35x"></a>
+<a name="v_A70_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - September 2, 2009 - 3.5.1
-<br>Project org.eclipse.jdt.core v_972_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_972_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - November 16, 2010
+<br>Project org.eclipse.jdt.core v_A70_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A70_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
-Some copyrights date have been fixed.
 
 <h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=328400">328400</a>
+TextEdit computed incorrectly for inserting annotation before package declaration
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326354">326354</a>
+[3.6][compiler][regression] Compiler in 3.6 and 3.6.1 generates bad code
 
-<a name="v_971_R35x"></a>
+<a name="v_A69_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - August 25, 2009
-<br>Project org.eclipse.jdt.core v_971_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_971_R35x">cvs</a>).
+Eclipse SDK 3.6.2 - October 6, 2010
+<br>Project org.eclipse.jdt.core v_A69_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A69_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=286391">286391</a>
-[compiler] jsr14 target behavior changed between ECJ 3.4.2 and ECJ 3.5
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=326434">326434</a>
+New issues with NPE refreshing external folders with 3.6.1
 
-<a name="v_970_R35x"></a>
+<a name="v_A68_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - August 24, 2009
-<br>Project org.eclipse.jdt.core v_970_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_970_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - September 1, 2010 - 3.6.1
+<br>Project org.eclipse.jdt.core v_A68_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A68_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285799">285799</a>
-HashtableOfObject rehashes and grows buffer on removeKey()
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=324154">324154</a>
+NPE in FlowContext while building
 
-<a name="v_969_R35x"></a>
+<a name="v_A67_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - August 21, 2009
-<br>Project org.eclipse.jdt.core v_969_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_969_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - September 1, 2010
+<br>Project org.eclipse.jdt.core v_A67_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A67_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285466">285466</a>
-[3.5 regression] fails to build IcedTea, works with 3.4.x
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282891">282891</a>
-[compiler] "Comparing identical expressions" warning sometimes invalid
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=286956">286956</a>
-NPE when asking to externalize constant
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281609">281609</a>
-[javadoc] "Javadoc: Invalid reference" warning for @link to Java package
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320754">320754</a>
+[formatter] formatter:off/on tags does not work correctly
 
-<a name="v_968_R35x"></a>
+<a name="v_A66_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - August 19, 2009
-<br>Project org.eclipse.jdt.core v_968_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_968_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - August 27, 2010
+<br>Project org.eclipse.jdt.core v_A66_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A66_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=286840">286840</a>
-ClasspathJar getPath() should return a unique path
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=286682">286682</a>
-SwitchStatement traverses this.expression with incorrect scope
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254738">254738</a>
-NPE in HierarchyResolver.setFocusType
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284785">284785</a>
-[1.5][compiler] Eclipse compiler shows error on javac-valid construct: varargs plus overload
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285701">285701</a>
-[1.5][compiler] Internal Compiler Error - ArrayIndexOutOfBoundsException
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=323693">323693</a>
+[1.5][compiler] Compiler fails to diagnose name clash
 
-<a name="v_967_R35x"></a>
+<a name="v_A65_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - August 12, 2009
-<br>Project org.eclipse.jdt.core v_967_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_967_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - August 25, 2010
+<br>Project org.eclipse.jdt.core v_A65_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A65_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284948">284948</a>
-[1.6][compiler] Java annotations are broken in editor when used on interface methods
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317264">317264</a>
+[search] Refactoring is impossible with commons.lang added to project
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926">321926</a>
+Erroneously deems null check conditional branch to be dead code, and produces incorrect bytecode
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308402">308402</a>
+[index] PatternSearchJob ignores participant index entries
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320802">320802</a>
+ASTParser.createASTs(..) fails silently on multiple missing parameter types.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=322154">322154</a>
+Compiler bug that does not occur in Galileo 3.5.2
 
-<a name="v_966_R35x"></a>
+<a name="v_A64_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - July 29, 2009
-<br>Project org.eclipse.jdt.core v_966_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_966_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - August 11, 2010
+<br>Project org.eclipse.jdt.core v_A64_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A64_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284482">284482</a>
-[compiler] Collision cases not detected
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284431">284431</a>
-Different inherited thrown exception clauses are not properly handled
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=322001">322001</a>
+[1.5][compiler] Name Clash error occurs
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320167">320167</a>
+Auto-Activation works only once
 
-<a name="v_965_R35x"></a>
+<a name="v_A63_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - July 22, 2009
-<br>Project org.eclipse.jdt.core v_965_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_965_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - July 28, 2010
+<br>Project org.eclipse.jdt.core v_A63_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A63_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=283467">283467</a>
-[formatter] wrong indentation with 'Never join lines' selected
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277450">277450</a>
-[1.5][compiler] Problems with += and Autoboxing/Unboxing
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260968">260968</a>
-Deadlock in UserLibraryManager
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276373">276373</a>
-Incorrect resource comparison with IJavaProject.isOnClasspath(IResource)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280497">280497</a>
-Incorrect null result for IJavaProject.getClasspathEntryFor(IPath)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281871">281871</a>
-[content assist] The extension took too long to return from the 'computeCompletionProposals()' operation
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281598">281598</a>
-[assist] Problems during content assist - if project has empty zip file in classpath
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=320414">320414</a>
+Compiler produces incorrect bytecode for null pointer check
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319603">319603</a>
+[1.5][compiler] eclipse fails with 2 generics methods with the same name while javac succeeds
 
-<a name="v_964_R35x"></a>
+<a name="v_A62_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.1 - July 8, 2009
-<br>Project org.eclipse.jdt.core v_964_R35x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_964_R35x">cvs</a>).
+Eclipse SDK 3.6.1 - July 21, 2010
+<br>Project org.eclipse.jdt.core v_A62_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A62_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281533">281533</a>
-[formatter] ArithmeticException: / by zero at Scribe.printLineComment(Scribe.java:2161)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279836">279836</a>
-[1.5][compiler] Eclipse compiler shows error on javac-valid construct: raw types on overridden methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=278745">278745</a>
-Methods overloaded with unavailable types worked in 3.4 but give "indirectly referenced.." error in 3.5
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=278305">278305</a>
-[1.5][compiler] JDT accepts supertype parameterized with wildcard
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277965">277965</a>
-[compiler] NPE in canBeSeenBy due to illegal protected toplevel class
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280888">280888</a>
-change a java file in one plug-in will compile all related plugin projects
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281317">281317</a>
-[search] An internal error occurred during: "Java Search".
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273385">273385</a>
-[model] NPE while closing project
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275330">275330</a>
-NPE from org.eclipse.jdt.internal.core.ClasspathChange.requestIndexing
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280079">280079</a>
-NPE while parsing K_CLASS_BODY_DECLARATIONS
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280063">280063</a>
-org.eclipse.jdt.internal.compiler.parser.Parser.parseClassBodyDeclarations(char[], int, int, CompilationUnitDeclaration) should return consistent results
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267046">267046</a>
-SourceMapper infinite loop on primitive type in generic
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279183">279183</a>
-[1.6][compiler] Inconsistent stackmap frames generated by JDT cause VerifyError
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277204">277204</a>
-IAE in SharedASTProvider for generic local class.
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276938">276938</a>
-Remove unreachable removes reachable logic in case statement.
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274898">274898</a>
-[recovery] IllegalArgumentException in ASTNode#setSourceRange()
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280616">280616</a>
-[formatter] Valid 1.5 code is not formatted inside <pre> tag
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280255">280255</a>
-[formatter] Format edited lines adds two new lines on each save
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280061">280061</a>
-[formatter] AIOOBE while formatting javadoc comment
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=196308">196308</a>
-[formatter] Don't escape entity when formatting in <pre> tags within javadoc comments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273619">273619</a>
-[formatter] Formatting repeats *} in javadoc
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=318020">318020</a>
+[compiler] wrong initialization flow info with if (true) throw... pattern in else block
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319900">319900</a>
+StringLiteral#setLiteralValue needlessly escapes apostrophes (')
 
-<a name="v_963"></a>
+<a name="v_A61_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5.0 - May 27, 2009 - 3.5.0
-<br>Project org.eclipse.jdt.core v_963
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_963">cvs</a>).
+Eclipse SDK 3.6.1 - July 14, 2010
+<br>Project org.eclipse.jdt.core v_A61_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A61_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
-Reverting change for bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236818">236818</a>.
 
 <h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306464">306464</a>
+NPE in ProblemReporter.missingTypeInMethod(ProblemReporter.java:5113)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317841">317841</a>
+[incremental build] unnecessary 'structural changes' due to annotation parameters
 
-<a name="v_962"></a>
+<a name="v_A60_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC3 - May 26, 2009
-<br>Project org.eclipse.jdt.core v_962
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_962">cvs</a>).
+Eclipse SDK 3.6.1 - July 7, 2010
+<br>Project org.eclipse.jdt.core v_A60_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A60_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234194">234194</a>
-Run copyright tool
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277669">277669</a>
-IBinding.getJavaElement() returns 'null' where it should not
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313153">313153</a>
+Too many blocked "Refreshing external folders" jobs (FUP of bug 302295)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317468">317468</a>
+Adding elements to an enum body with trailing comma generates bad code
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313668">313668</a>
+[search] Call hierarchy doesn't show all calls of the method in workspace
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=317972">317972</a>
+Fix for wrong usages of affect* and effect*
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316889">316889</a>
+Internal compiler error: java.lang.NullPointerException with a specific use of recursive generics
 
-<a name="v_961"></a>
+<a name="v_A59_R36x"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC2 - May 21, 2009 - 3.5 RC2
-<br>Project org.eclipse.jdt.core v_961
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_961">cvs</a>).
+Eclipse SDK 3.6.1 - June 24, 2010
+<br>Project org.eclipse.jdt.core v_A59_R36x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A59_R36x">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277372">277372</a>
-[1.5][compiler] Signature attribute should not be generated with target jsr14
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313651">313651</a>
+[formatter] format comments (differs between paste and save action)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315978">315978</a>
+Big regression, eclipse compiles my workspace in 3 mins instead of few seconds
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315732">315732</a>
+[formatter] NullPointerException (always) on inserting a custom template proposal into java code when "Use code formatter" is on
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316456">316456</a>
+[1.5][compiler] Annotation values can access private class members
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314830">314830</a>
+[compiler] Switching on a null expression doesn't always throw NullPointerException
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313825">313825</a>
+Erroneous local variable's problems reported at surrounding ParenthesizedExpression
 
-<a name="v_960"></a>
+<a name="v_A58"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC2 - May 20, 2009
-<br>Project org.eclipse.jdt.core v_960
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_960">cvs</a>).
+Eclipse SDK 3.6 - June 3, 2010 - 3.6.0
+<br>Project org.eclipse.jdt.core v_A58
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A58">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273991">273991</a>
-[assist] Wrong relevance for some proposals which are not compatible with the expected type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276890">276890</a>
-[content assist] proposes nothing for generic type with non-trivial constructor
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315568">315568</a>
+improve Javadoc of SearchPattern#createPattern(String, int, int, int)
 
-<a name="v_959"></a>
+<a name="v_A57"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC1 - May 14, 2009 - 3.5 RC1
-<br>Project org.eclipse.jdt.core v_959
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_959">cvs</a>).
+Eclipse SDK 3.6RC4 - June 3, 2010 - 3.6.0 RC4
+<br>Project org.eclipse.jdt.core v_A57
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A57">cvs</a>).
 <h2>What's new in this drop</h2>
+<ul>
+<li>Use default disabling/enabling tags in the samples of the Javadoc comments
+of the formatter constants <code>FORMATTER_DISABLING_TAG</code> and
+<code>FORMATTER_ENABLING_TAG</code>.</li>
+<li>Fixed minor javadoc issues of <code>createStrictHierarchyScope()</code>.</li>
+</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275471">275471</a>
-Eclipse Compiler needs a compile dependency to a plug-in, but javac does not need that dependency
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=170197">170197</a>
-[model] JavaCore.newLibraryEntry(.., IClasspathAttribute[], ..) should check for null
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314709">314709</a>
+Clarify -encoding <encoding name> in jdt_api_compile.htm
 
-<a name="v_958"></a>
+<a name="v_A56"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC1 - May 12, 2009
-<br>Project org.eclipse.jdt.core v_958
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_958">cvs</a>).
+Eclipse SDK 3.6RC3 - May 27, 2010 - 3.6.0 RC3
+<br>Project org.eclipse.jdt.core v_A56
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A56">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275381">275381</a>
-[1.5][compiler] Missing innerClass attribute for inner types used as type arguments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255752">255752</a>
-[javadoc][assist] Inappropriate completion proposals for javadoc at compilation unit level
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275467">275467</a>
-Batch compiler writes log using default encoding instead of UTF-8
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313890">313890</a>
+Migration guide to 3.6 for containers with MANIFEST-referred entries
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313965">313965</a>
+Breaking change in classpath container API
 
-<a name="v_957"></a>
+<a name="v_A55"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC1 - May 7, 2009
-<br>Project org.eclipse.jdt.core v_957
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_957">cvs</a>).
+Eclipse SDK 3.6RC3 - May 25, 2010
+<br>Project org.eclipse.jdt.core v_A55
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A55">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273157">273157</a>
-[performance] ManifestAnalyzer is causing a 2x performance drop in the updating of classpath of JavaProjects in comparison with 3.4
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268879">268879</a>
-External folders project not cleaned up
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275215">275215</a>
-org.eclipse.jdt.internal.core.util.KeyToSignature#consumeType() uses a method not available in J2SE-1.4 EE
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275244">275244</a>
-org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ZipEntry, ZipFile) should use BufferedInputStream
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=132679">132679</a>
-[assist] Completion fails within non-static anonymous inner class
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313706">313706</a>
+Replace ie. with i.e. in jdt.core documentation
 
-<a name="v_956"></a>
+<a name="v_A54"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5RC1 - May 6, 2009
-<br>Project org.eclipse.jdt.core v_956
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_956">cvs</a>).
+Eclipse SDK 3.6RC2 - May 20, 2010 - 3.6.0 RC2
+<br>Project org.eclipse.jdt.core v_A54
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A54">cvs</a>).
 <h2>What's new in this drop</h2>
+<ul>
+<li>
+Added a new preference to force the formatter to try to keep nested expressions on one line.
+<p>
+This new preference is controlled with the option:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED</code>
+<pre>
+/**
+ * FORMATTER / Option to wrap outer expressions in nested expressions
+ *     - option id:         "org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ *
+ * This option changes the formatter behavior when nested method calls are encountered.
+ * Since 3.6, the formatter tries to wrap outermost method calls first to have a better output.
+ * For example, let's say we are using the Eclipse built-in profile with a max line width=40+space for tab policy.
+ * Then consider the following snippet:
+ *
+ * public class X01 {
+ *     void test() {
+ *         foo(bar(1, 2, 3, 4), bar(5, 6, 7, 8));
+ *     }
+ * }
+ *
+ * With this new strategy, the formatter will wrap the line earlier, between the arguments of the message call
+ * for this example, and then it will allow to keep each nested call on a single line.
+ * Hence, the output will be:
+ *
+ * public class X01 {
+ *     void test() {
+ *         foo(bar(1, 2, 3, 4),
+ *             bar(5, 6, 7, 8));
+ *     }
+ * }
+ *
+ * Important notes:
+ * 1. This new behavior is automatically activated (i.e. the default value for this preference is {@link #TRUE}).
+ *    If the backward compatibility regarding previous versions' formatter behavior (i.e. before 3.6 version) is necessary,
+ *    then the preference needs to be set to {@link #FALSE} to retrieve the previous formatter behavior.
+ * 2. The new strategy currently only applies to nested method calls, but might be extended to other nested expressions in future versions
+ * 
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.6
+ */
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313524">313524</a> for more details.
+</li>
+</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274114">274114</a>
-org.eclipse.jdt.internal.compiler.tool.Options must be updated with latest compiler options
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=185422">185422</a>
-[1.5][compiler] Incorrectly allows generic use of private inner classes
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274917">274917</a>
-Incorrect "empty block" warning underlining on annotations
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274557">274557</a>
-CompletionContext problem with annotation value element
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274332">274332</a>
-jdt.core.model tests take 2 hours to finish on the mac
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313524">313524</a>
+[formatter] Add preference for improved lines wrapping in nested method calls
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313109">313109</a>
+ at SuppressWarnings on multiple locals is marked unnecessary if any local is never used
 
-<a name="v_955"></a>
+<a name="v_A53"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 29, 2009 - 3.5 MILESTONE 7
-<br>Project org.eclipse.jdt.core v_955
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_955">cvs</a>).
+Eclipse SDK 3.6RC1 - May 12, 2010 - 3.6.0 RC1
+<br>Project org.eclipse.jdt.core v_A53
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A53">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274397">274397</a>
-tag projects changed since I20090421-0930 build
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312326">312326</a>
+IllegalArgumentException using open type dialog
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310159">310159</a>
+Hang in JavaModel.getExternalTarget(JavaModel.java:333)
 
-<a name="v_954"></a>
+<a name="v_A52"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 28, 2009
-<br>Project org.eclipse.jdt.core v_954
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_954">cvs</a>).
+Eclipse SDK 3.6RC1 - May 11, 2010
+<br>Project org.eclipse.jdt.core v_A52
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A52">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269934">269934</a>
-[apt] APT-generated classes that contain annotations causes NPE
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259950">259950</a>
-Update copyright for 2009
-
-<a name="v_953"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 27, 2009
-<br>Project org.eclipse.jdt.core v_953
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_953">cvs</a>).
-<h2>What's new in this drop</h2>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=157847">157847</a>
+NPE in WildcardBinding.computeUniqueKey during code assist
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311849">311849</a>
+[quick fix] @SuppressWarnings does not work as expected inside a for loop
 
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272204">272204</a>
-null should never be part of a type hierarchy
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260031">260031</a>
-Wrong type for class constants in stackmap frames
- 
-<a name="v_952"></a>
+<a name="v_A51"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 27, 2009
-<br>Project org.eclipse.jdt.core v_952
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_952">cvs</a>).
+Eclipse SDK 3.6RC1 - May 8, 2010
+<br>Project org.eclipse.jdt.core v_A51
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A51">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273862">273862</a>
-[1.7][compiler] Return type should be used to decide method duplicates
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=84720">84720</a>
-[1.5][assist] proposal ranking by return value should consider auto(un)boxing
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272711">272711</a>
-Exceptions in ASTRewrite
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306170">306170</a>
+[perfs] Regression for FullSourceWorkspaceTypeHierarchyTests#testPerfAllTypes()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298844">298844</a>
+[formatter] New lines in empty method body wrong behavior
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311864">311864</a>
+[formatter] NPE with empty {@code }
 
-<a name="v_951"></a>
+<a name="v_A50"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 24, 2009
-<br>Project org.eclipse.jdt.core v_951
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_951">cvs</a>).
+Eclipse SDK 3.6RC1 - May 6, 2010
+<br>Project org.eclipse.jdt.core v_A50
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A50">cvs</a>).
 <h2>What's new in this drop</h2>
+<ul>
+<li>
+Added a new preference to switch on/off the usage of the disabling/enabling tags of the formatter.
+<p>
+This new preference is controlled with the option:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS</code>
+<pre>
+/**
+ * FORMATTER / Option to use the disabling and enabling tags defined respectively by the {@link #FORMATTER_DISABLING_TAG} and the {@link #FORMATTER_ENABLING_TAG} options.
+ *     - option id:         "org.eclipse.jdt.core.formatter.use_on_off_tags"
+ *     - possible values:   TRUE / FALSE
+ *     - default:           FALSE
+ * 
+ * @since 3.6
+ */
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311582">311582</a> for more details.
+</li>
+</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273308">273308</a>
-[perfs] Save very slow because DeltaProcessor#resourceChanged(..) resolves classpath
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154823">154823</a>
-[getter setter] Getters Setters generation doesn't follow naming convention
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263786">263786</a>
-NamingConventions#suggestVariableNames(..) should not modify all caps parts
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263769">263769</a>
-Javadoc glitches in JavaCore#setComplianceOptions(String, Map)
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311617">311617</a>
+[formatter] provide default tags to enable/disable formatter
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311582">311582</a>
+[formatter] Master switch to enable/disable on/off tags
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307040">307040</a>
+Search Job with HierarchyScope on Object does not cancel
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302295">302295</a>
+After associating source folder with rt.jar project refresh takes exceedingly long time.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311048">311048</a>
+AbortCompilation propagated from CompilationUnitProblemFinder.process()
 
-<a name="v_950"></a>
+<a name="v_A49"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 21, 2009
-<br>Project org.eclipse.jdt.core v_950
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_950">cvs</a>).
+Eclipse SDK 3.6RC1 - May 4, 2010
+<br>Project org.eclipse.jdt.core v_A49
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A49">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266771">266771</a>
-NameLookup.findPackageFragment returns very incorrect package fragments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271102">271102</a>
-Java model corrupt after switching target platform
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270784">270784</a>
-[perfs] Big regression on FullSourceWorkspaceModelTests#testCloseProjects() test
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272450">272450</a>
-DBCS3.5: Classpath resolution fails to honor the 'Class-Path' header of JAR manifest file in DBCS
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272706">272706</a>
-[Model] Generics lost on IField when coming from .class files
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246832">246832</a>
-[1.5][assist] Camel case completion not working with statically imported methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267833">267833</a>
-[javadoc] Custom tags should not be allowed for inline tags
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271680">271680</a>
-[compiler] Stack overflow pasting in Java editor
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251827">251827</a>
-[search] Search for type reference with wildcards finds references in package
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271284">271284</a>
-[search] AIOOBE in StringOperation.getCamelCaseMatchingRegions
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272148">272148</a>
-[assist] Constructors with an array as parameter type are not proposed
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310811">310811</a>
+[perfs] Big regression on FullSourceWorkspaceFormatterTests#testFormatDefaultBigFile()
 
-<a name="v_949"></a>
+<a name="v_A48"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 14, 2009
-<br>Project org.eclipse.jdt.core v_949
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_949">cvs</a>).
+Eclipse SDK 3.6M7 - April 25, 2010 - 3.6.0 M7
+<br>Project org.eclipse.jdt.core v_A48
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A48">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271561">271561</a>
-JavaModelException when accessing an array of nested annotations
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310330">310330</a>
+Add multiple encoding support for the batch compiler
 
-<a name="v_948"></a>
+<a name="v_A47"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - April 7, 2009
-<br>Project org.eclipse.jdt.core v_948
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_948">cvs</a>).
+Eclipse SDK 3.6M7 - April 25, 2010
+<br>Project org.eclipse.jdt.core v_A47
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A47">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271303">271303</a>
-[1.5][compiler] Override and package visibility issue
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270367">270367</a>
-[DOM] NullPointerException in ParenthesizedExpression.resolveTypeBinding()
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253008">253008</a>
-[assist] Boolean expressions should be proposed with higher relevence in if(), while() etc
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270983">270983</a>
-[formatter] Enum with field declarations but no constants confuses formatter
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=159851">159851</a>
-[1.5] [compiler] Eclipse compiler fails to report type parameter bounds errors when generic instance is a type argument
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270446">270446</a>
-"Compute launch button tooltip" error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270148">270148</a>
-ASTParser cannot parse K_CLASS_BODY_DECLARATIONS with syntax errors
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309835">309835</a>
+[formatter] adds blank lines on each run
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310213">310213</a>
+AIOOBE in IndexSelector.initializeIndexLocations()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309966">309966</a>
+IType#getKey() does not work for unresolved local ITypes
 
-<a name="v_947"></a>
+<a name="v_A46"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - March 31, 2009
-<br>Project org.eclipse.jdt.core v_947
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_947">cvs</a>).
+Eclipse SDK 3.6M7 - April 23, 2010
+<br>Project org.eclipse.jdt.core v_A46
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A46">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270409">270409</a>
-[perfs] No JDT/Core tests results in last baseline run
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267670">267670</a>
-Private enum constant incorrectly marked as never read locally
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269493">269493</a>
-[assist] Keywords are not proposed in a for statement without block
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270194">270194</a>
-[1.5][compiler] Java error in 3.5M6 that was not present in 3.4
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270257">270257</a>
-[perfs] Small regression on 'JDT/Core plugin initialization' test
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270113">270113</a>
-[code assist] Missing ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION proposal
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269985">269985</a>
-Full Build triggered when using class folder on classpath and custom builder
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207935">207935</a>
-[1.5][compiler] inconsistency with javac 1.5&1.6 involving parameterized invocation of non-generic method
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269964">269964</a>
-[perfs] Regression on 'Search all type names' test
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=59891">59891</a>
+[formatter] improve lines wrapping in nested method calls
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306172">306172</a>
+[perfs] Invalid test duration for FullSourceWorkspaceTypeHierarchyTests#testPerSuperTypes()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267091">267091</a>
+[content assist] After 'implements' interface members are not proposed
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261534">261534</a>
+content assist after instanceof should also work after &&
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308980">308980</a>
+[content assist]An initializer inside a non-array field declaration confuses content assist
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310002">310002</a>
+ToolFactory.createScanner(..) should use workspace compliance
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291528">291528</a>
+Synchronize project warning/error settings to build.properties
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309787">309787</a>
+Extension point "org.eclipse.jdt.core.codeFormatter" is ignored
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244820">244820</a>
+Content assist after 'instanceof' should also work in assignment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309706">309706</a>
+[formatter] doesn't work when code has three semicolons side by side
 
-<a name="v_946"></a>
+<a name="v_A45"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - March 24, 2009
-<br>Project org.eclipse.jdt.core v_946
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_946">cvs</a>).
+Eclipse SDK 3.6M7 - April 20, 2010
+<br>Project org.eclipse.jdt.core v_A45
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A45">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247037">247037</a>
-[javadoc] compiler should issue warning for {@inheritDoc} at illegal location
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244406">244406</a>
-[buildpath] Internal jars refered with OS path are shown as non-Java resources
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269476">269476</a>
-testInitJDTPlugin() seems to leak several DeltaProcessor and JavaModelManager
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269336">269336</a>
-[prefs] JavaProject preferences listeners are not removed
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=203060">203060</a>
-[codeassist] assert keyword should not be proposed when compliance level is set to 1.3
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251539">251539</a>
-[1.6][compiler] java.lang.IllegalArgumentException: info cannot be null (StackMapFrame.java)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268837">268837</a>
-[1.6][compiler] Incorrectly report ambiguity of methods with generics
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265104">265104</a>
-Reconciler cannot handle annotation with reference to missing type
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305037">305037</a>
+missing story for attributes of referenced JARs in classpath containers
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305116">305116</a>
+[index] Improve performance of indexes results tables
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236306">236306</a>
+[content assist] for method invocation in variable initializer should not guess variable
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302865">302865</a>
+Issue with "import" a class and "import static" a method with the same name
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309022">309022</a>
+[ImportRewrite] Add Import wrongly removes import for nested type
 
-<a name="v_945"></a>
+<a name="v_A44"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M7 - March 17, 2009
-<br>Project org.eclipse.jdt.core v_945
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_945">cvs</a>).
+Eclipse SDK 3.6M7 - April 13, 2010
+<br>Project org.eclipse.jdt.core v_A44
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A44">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267789">267789</a>
-eclipse-Automated-Tests-3.4.zip produces compile errors (build path?) with IBM JDK
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268802">268802</a>
-Useless call to getSource() in SourceTypeConverter
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308754">308754</a>
+CompilationUnit.rewrite messes up .class-literal in annotation instead of changing class to interface
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306519">306519</a>
+JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject) should allow null project
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308428">308428</a>
+Possible problem to get corrections with surrogate characters
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307295">307295</a>
+Task tags and task priorities
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308476">308476</a>
+Test ClasspathTests#testBug308150 fails on all platforms
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305043">305043</a>
+Internal error during classpath init
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307486">307486</a>
+DBCS3.6: Fail to propose Ext-B labels with content assist in Java Editor
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308256">308256</a>
+DiagnosticListener always supplies Diagnostic.getSource()==null
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308356">308356</a>
+codeSelect(..) doesn't work for local variable with surrogate in name
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308245">308245</a>
+Valid code fails to compile in 3.6
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307885">307885</a>
+Error message for instanceof <parameterized type> wrong arguments
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=249704">249704</a>
+[code assist] autocomplete with anonymous classes does stop working
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308150">308150</a>
+JAR with invalid Class-Path entry in MANIFEST.MF crashes the project
 
-<a name="v_944"></a>
+<a name="v_A43"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - March 10, 2009 - 3.5 MILESTONE 6
-<br>Project org.eclipse.jdt.core v_944
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_944">cvs</a>).
+Eclipse SDK 3.6M7 - April 6, 2010
+<br>Project org.eclipse.jdt.core v_A43
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A43">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267941">267941</a>
-[perfs] Possible regression on 'Code assist in expression' test
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267773">267773</a>
-[open type] Use of ? results in error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267658">267658</a>
-[formatter] Javadoc comments may be still formatted as block comments
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306223">306223</a>
+[search] Searching for annotation references report all type references
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292087">292087</a>
+anonymous class in array member initializer confuses content assist
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307337">307337</a>
+[content assist] Default constructor should not be proposed for anonymous types
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306568">306568</a>
+[ImportRewrite] Add Import does not work for nested type when package is on-demand imported
 
-<a name="v_943"></a>
+<a name="v_A42"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - March 9, 2009
-<br>Project org.eclipse.jdt.core v_943
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_943">cvs</a>).
+Eclipse SDK 3.6M7 - March 30, 2010
+<br>Project org.eclipse.jdt.core v_A42
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A42">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=124646">124646</a>
-Connecting type parameter fails for local types
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634">202634</a>
+[codeassist] missing super proposal in specific source
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304394">304394</a>
+IJavaElement#getAttachedJavadoc(IProgressMonitor) should support referenced entries
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305122">305122</a>
+FUP of 302949
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306917">306917</a>
+Exception occurred during compilation unit conversion:
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306196">306196</a>
+[search] NPE while searching for annotation references in rt.jar of JRE 6.0
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288658">288658</a>
+[compiler][1.5] Annotations visibility issues
 
-<a name="v_942"></a>
+<a name="v_A41"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - March 7, 2009
-<br>Project org.eclipse.jdt.core v_942
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_942">cvs</a>).
+Eclipse SDK 3.6M7 - March 23, 2010
+<br>Project org.eclipse.jdt.core v_A41
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A41">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Added the following APIs to allow clients to provide the source of a compilation unit or a package that is neither on the 
-       classpath nor in a working copy.
-       <ul>
-       <li><code>org.eclipse.jdt.core.WorkingCopyOwner.findSource(String, String)</code></li>
-       <li><code>org.eclipse.jdt.core.WorkingCopyOwner.isPackage(String[])</code></li>
-       </ul>
-       See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257528">bug 257528</a> for details.
-</li>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267088">267088</a>
-[1.5][compiler] Misleading error message in case of inherited methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260840">260840</a>
-NamingConventions creates wrong plural for name ending in <vowel>y
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243406">243406</a>
-[code assist] Content assist gives "assertion failed" for import Foo|.Bar
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237241">237241</a>
-Content assist does not scale with javadoc on type with many members
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265962">265962</a>
-[compiler] Internal compiler error on while with return clause
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236520">236520</a>
-[search] AIOOBE in PatternLocator.updateMatch
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265103">265103</a>
-Manifest Class-Path is not read correctly with ECJ
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=99399">99399</a>
-[1.5][assist] Code assist propose final classes in methods type parameter extends clause
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257528">257528</a>
-An API to incrementaly generate compilation units for binding resolution environment
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266582">266582</a>
-[1.5][compiler] AbortCompilation while decoding the type variable of an anonymous type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266837">266837</a>
-[model] SourceField.getConstant does not supply a value if type is fully qualified
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305518">305518</a>
+[formatter] Line inside <pre> tag is wrongly indented by one space when starting just after the star
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295825">295825</a>
+[formatter] Commentaries are running away after formatting are used
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306477">306477</a>
+Indexer(?) fails to recognise enum as a type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305830">305830</a>
+[formatter] block comment should not be formatted when a non-nls tag is on the same line
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031">300031</a>
+The deprecation warning for a type should not include the package name
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306078">306078</a>
+Navigate to Inaccessible Field
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=209479">209479</a>
+infinite loop in BindingKey when signatures are invalid
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293558">293558</a>
+[quick assist] "Invert if statement" fails when comment follows
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182459">182459</a>
+[compiler] Inconsistent error range for unresolved field
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=192233">192233</a>
+[AST] CompilationUnit.rewrite() removes whitespace between return type and method name
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306073">306073</a>
+ASTRewrite Javadoc wrongly talks about getTargetSourceRangeComputer
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305001">305001</a>
+Exception occurred in listener of Java element change notification
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305590">305590</a>
+Redundant null check false-positive
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305755">305755</a>
+Remove deprecated API that has been added for 3.6
 
-<a name="v_941"></a>
+<a name="v_A40"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - March 3, 2009
-<br>Project org.eclipse.jdt.core v_941
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_941">cvs</a>).
+Eclipse SDK 3.6M7 - March 16, 2010
+<br>Project org.eclipse.jdt.core v_A40
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A40">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252442">252442</a>
-[Search] NPE after move followed by undo
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261722">261722</a>
-[search] NPE after removing a project
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266421">266421</a>
-[1.5][compiler] code compiles correctly in 3.4.1 but gives compilation errors in 3.5M5
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260011">260011</a>
-[formatter] Formatting of html in javadoc comments doesn't work with style attributes
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=217108">217108</a>
-[formatter] deletes blank lines between comments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198963">198963</a>
-[formatter] 3.3 Code Formatter repeatedly indents block comment
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265571">265571</a>
-Abstract method that is not directly used is flagged as unused
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305371">305371</a>
+[formatter] Unexpected indentation of line comment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305281">305281</a>
+[formatter] Turning off formatting changes comment's formatting
 
-<a name="v_940"></a>
+<a name="v_A39"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - February 24, 2009
-<br>Project org.eclipse.jdt.core v_940
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_940">cvs</a>).
+Eclipse SDK 3.6M6 - March 9, 2010 - 3.6.0 M6
+<br>Project org.eclipse.jdt.core v_A39
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A39">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Fixed odd API in <code>ReferenceMatch</code><br>
-(see more details in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248878">248878</a>).
-</li>
-</ul>
-
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265820">265820</a>
-Unused methods inside org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233356">233356</a>
-[search] NPE in org.eclipse.jdt.internal.compiler.util.SimpleLookupTable.get()
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265630">265630</a>
-[search][perfs] Regression in testSearchPackageDeclarationsWorkspace
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248878">248878</a>
-[search] Odd API in ReferenceMatch
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=206930">206930</a>
-[1.5][compiler] Mismatch between javac and Eclipse compiler
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265142">265142</a>
-Compiler fails to warn on unused constructors of private classes
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264950">264950</a>
-[scanner] IScanner does not return whitespace token
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264843">264843</a>
-[1.5][compiler] Eclipse compiler fails to reject invalid code with primitives autoboxed to generics
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265065">265065</a>
-[search] java.lang.ClassCastException while running "Refactor...Extract Class"
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289057">289057</a>
+Java Content Assist taking too long
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303830">303830</a>
+"X cannot be resolved or is not a field" erroneously reported
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235658">235658</a>
+Valid identifier unrecognized.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304841">304841</a>
+[search] NPE in IndexSelector.initializeIndexLocations
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295866">295866</a>
+FormalParameter in JDT DOM/AST documentation
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304817">304817</a>
+Review documentation of ASTParser class
 
-<a name="v_939"></a>
+<a name="v_A38"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M6 - February 17, 2009
-<br>Project org.eclipse.jdt.core v_939
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_939">cvs</a>).
+Eclipse SDK 3.6M6 - March 5, 2010
+<br>Project org.eclipse.jdt.core v_A38
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A38">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>Added a new API method on <code>SearchPattern</code> to provide matching
-regions between a pattern and a name when they are compared using a given match rule<br>
-(see more details in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218605">218605</a>).
+<li>
+Added two new preferences to allow to disable the formatter in a section of the code.
+These two preference define respectively the tag which disables the formatting
+and the tag which re-enable it.
+<p>
+These new preferences are controlled with the options:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG</code>
+<code>DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG</code>
 <pre>
 /**
- * Answers all the regions in a given name matching a given pattern using
- * a specified match rule.
- * 
- * Each of these regions is made of its starting index and its length in the given
- * name. They are all concatenated in a single array of <code>int</code>
- * which therefore always has an even length.
+ * FORMATTER / Option to define the tag to put in a comment to disable the formatting.
+ * See the {@link #FORMATTER_ENABLING_TAG} option to re-enable it.
+ *     - option id:         "org.eclipse.jdt.core.formatter.disabling_tag"
+ *     - possible values:   String, with constraints mentioned below
+ *     - default:           ""
  * 
- * All returned regions are disjointed from each other. That means that the end
- * of a region is always different than the start of the following one.
- * For example, if two regions are returned:
- * <code>{ start1, length1, start2, length2 }</code>
- * then <code>start1+length1</code> will always be smaller than
- * <code>start2</code>.
+ * Note that:
  * 
- * The possible comparison rules between the name and the pattern are:
- *     . {@link #R_EXACT_MATCH exact matching}
- *     . {@link #R_PREFIX_MATCH prefix matching}
- *     . {@link #R_PATTERN_MATCH pattern matching}
- *     . {@link #R_CAMELCASE_MATCH camel case matching}
- *     . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH camel case matching with same parts count}
+ * 1. The tag name will be trimmed. Hence if it does contain white spaces
+ *    at the beginning or at the end, they will not be taken into account while
+ *    searching for the tag in the comments
+ * 2. If a tag is starting with a letter or digit, then it cannot be leaded by
+ *    another letter or digit to be recognized
+ *    (<b><i>"ToDisableFormatter"</i></b> will not be recognized as a disabling tag
+ *    <b><i>"DisableFormatter"</i></b>, but <b><i>"Re:DisableFormatter"</i></b>
+ *    will be detected for either tag <b><i>"DisableFormatter"</i></b> or
+ *    <b><i>":DisableFormatter"</i></b>).
+ *    Respectively, a tag ending with a letter or digit cannot be followed by a letter
+ *    or digit to be recognized (<b><i>"DisableFormatter1"</i></b> will not be
+ *    recognized as a disabling tag <b><i>"DisableFormatter"</i></b>, but
+ *    <b><i>"DisableFormatter:1"</i></b> will be detected either for tag
+ *    <b><i>"DisableFormatter"</i></b> or <b><i>"DisableFormatter:"</i></b>)
+ * 3. As soon as the formatter encounters the defined disabling tag, it stops to
+ *    format the code from the beginning of the comment including this tag. If it
+ *    was already disabled, the tag has no special effect.
+ *    For example, the second defined enabling tag "<b>disable-formatter</b>"
+ *    in the following snippet is not necessary as the formatter was already disabled
+ *    since the first one:
+ *     class X {
+ *     // disable-formatter
+ *     void foo1() {}
+ *     // disable-formatter
+ *     void foo2() {}
+ *     void bar1() {}
+ *     void bar2() {}
+ *     }
  *
- * Each of these rules may be combined with the
- * {@link #R_CASE_SENSITIVE case sensitive flag} if the match comparison
- * should respect the case.
- *
- * Examples:
- *    .   pattern = "NPE"
- *        name = NullPointerException / NoPermissionException
- *        matchRule = {@link #R_CAMELCASE_MATCH}
- *        result:  { 0, 1, 4, 1, 11, 1 } / { 0, 1, 2, 1, 12, 1 } 
- *     .  pattern = "NuPoEx"
- *        name = NullPointerException
- *        matchRule = {@link #R_CAMELCASE_MATCH}
- *        result:  { 0, 2, 4, 2, 11, 2 }
- *     .  pattern = "IPL3"
- *        name = "IPerspectiveListener3"
- *        matchRule = {@link #R_CAMELCASE_MATCH}
- *        result:  { 0, 2, 12, 1, 20, 1 }
- *     .  pattern = "HashME"
- *        name = "HashMapEntry"
- *        matchRule = {@link #R_CAMELCASE_MATCH}
- *        result:  { 0, 5, 7, 1 }
- *     .  pattern = "N???Po*Ex?eption"
- *        name = NullPointerException
- *        matchRule = {@link #R_PATTERN_MATCH} | {@link #R_CASE_SENSITIVE}
- *        result:  { 0, 1, 4, 2, 11, 2, 14, 6 }
- *     .  pattern = "Ha*M*ent*"
- *        name = "HashMapEntry"
- *        matchRule = {@link #R_PATTERN_MATCH}
- *        result:  { 0, 2, 4, 1, 7, 3 }
+ * 4. If no enabling tag is found by the formatter after the disabling tag, then
+ *    the end of the snippet won't be formatted.
+ *    For example, when a disabling tag is put at the beginning of the code, then
+ *    the entire content of a compilation unit is not formatted:
+ *     // disable-formatter
+ *     class X {
+ *     void foo1() {}
+ *     void foo2() {}
+ *     void bar1() {}
+ *     void bar2() {}
+ *     }
  * 
- * @see #camelCaseMatch(String, String, boolean) for more details on the
- * 	camel case behavior
- * @see CharOperation#match(char[], char[], boolean) for more details on the
- * 	pattern match behavior
- *
- * @param pattern the given pattern. If <code>null</code>,
- *     then an empty region (<code>new int[0]</code>) will be returned
- *     showing that the name matches the pattern but no common
- *     character has been found.
- * @param name the given name
- * @param matchRule the rule to apply for the comparison.
- *     The following values are accepted:
- *         . {@link #R_EXACT_MATCH}
- *         . {@link #R_PREFIX_MATCH}
- *         . {@link #R_PATTERN_MATCH}
- *         . {@link #R_CAMELCASE_MATCH}
- *         . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH}
+ * 5. If a mix of disabling and enabling tags is done in the same comment, then
+ *    the formatter will only take into account the last encountered tag in the
+ *    comment.
+ *    For example, in the following snippet, the formatter will be disabled after
+ *    the comment:
+ *     class X {
+ *     /*
+ *      * This is a comment with a mix of disabling and enabling tags:
+ *      *  - <b>disable-formatter</b>
+ *      *  - <b>enable-formatter</b>
+ *      *  - <b>disable-formatter</b>
+ *      * The formatter will stop to format from the beginning of this comment...
+ *      */
+ *     void foo() {}
+ *     void bar() {}
+ *     }
  * 
- *     Each of these valid values may be also combined with
- *     the {@link #R_CASE_SENSITIVE} flag.
+ * 6. The tag cannot include newline character (i.e. '\n') but it can have white spaces.
+ *    E.g. "<b>format: off</b>" is a valid disabling tag
+ *    In the future, newlines may be used to support multiple disabling tags.
  * 
- *     Some examples:
- *         . {@link #R_EXACT_MATCH} | {@link #R_CASE_SENSITIVE}:
- *           if an exact case sensitive match is expected,
- *         . {@link #R_PREFIX_MATCH}:
- *           if a case insensitive prefix match is expected,
- *         . {@link #R_CAMELCASE_MATCH}:
- *           if a case insensitive camel case match is expected,
- *         . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH}
- *            | {@link #R_CASE_SENSITIVE}:
- *           if a case sensitive camel case with same parts count match
- *           is expected,
- *         . etc.
+ * @since 3.6
+ */
+
+/**
+ * FORMATTER / Option to define the tag to put in a comment to re-enable the
+ * formatting after it has been disabled (see {@link #FORMATTER_DISABLING_TAG})
+ *     - option id:         "org.eclipse.jdt.core.formatter.enabling_tag"
+ *     - possible values:   String, with constraints mentioned below
+ *     - default:           ""
  * 
- * @return an array of <code>int</code> having two slots per returned
- *     regions (the first one is the region starting index and the second one
- *     is the region length or <code>null</code> if the given name does not
- *     match the given pattern).
- *
- *     The returned regions may be empty (<code>new int[0]</code>) if the
- *     pattern is <code>null</code> (whatever the match rule is). The returned
- *     regions will also be empty if the pattern is only made of <code>'?'</code>
- *     and/or <code>'*'</code> character(s) (e.g. <code>'*'</code>,
- *     <code>'?*'</code>, <code>'???'</code>, etc.) when using a pattern
- *     match rule.
+ * Note that:
+ * 
+ * 1. The tag name will be trimmed. Hence if it does contain white spaces
+ *    at the beginning or at the end, they will not be taken into account while
+ *    searching for the tag in the comments
+ * 2. If a tag is starting with a letter or digit, then it cannot be leaded by
+ *    another letter or digit to be recognized
+ *    (<b>"ReEnableFormatter"</b> will not be recognized as an enabling tag
+ *    <b><i>"EnableFormatter"</i></b>, but <b><i>"Re:EnableFormatter"</i></b>
+ *    will be detected for either tag <b><i>"EnableFormatter"</i></b> or
+ *    <b><i>":EnableFormatter"</i></b>).
+ *    Respectively, a tag ending with a letter or digit cannot be followed by a letter
+ *    or digit to be recognized (<b><i>"EnableFormatter1"</i></b> will not be
+ *    recognized as an enabling tag <b><i>"EnableFormatter"</i></b>, but
+ *    <b><i>"EnableFormatter:1"</i></b> will be detected either for tag
+ *    <b><i>"EnableFormatter"</i></b> or <b><i>"EnableFormatter:"</i></b>)
+ * 3. As soon as the formatter encounters the defined enabling tag, it re-starts
+ *    to format the code just after the comment including this tag. If it was already
+ *    active, i.e. already re-enabled or never disabled, the tag has no special effect.
+ *    For example, the defined enabling tag "<b>enable-formatter</b>"
+ *    in the following snippet is not necessary as the formatter has never been
+ *    disabled:
+ *     class X {
+ *     void foo1() {}
+ *     void foo2() {}
+ *     // enable-formatter
+ *     void bar1() {}
+ *     void bar2() {}
+ *     }
+ * 
+ *    Or, in the following other snippet, the second enabling tag is not necessary as
+ *    the formatting will have been re-enabled by the first one:
+ *     class X {
+ *     // disable-formatter
+ *     void foo1() {}
+ *     void foo2() {}
+ *     // enable-formatter
+ *     void bar1() {}
+ *     // enable-formatter
+ *     void bar2() {}
+ *     }
+ * 
+ * 4. If a mix of disabling and enabling tags is done in the same comment, then
+ *    the formatter will only take into account the last encountered tag in the
+ *    comment.
+ *    For example, in the following snippet, the formatter will be re-enabled after
+ *    the comment:
+ *     // disable-formatter
+ *     class X {
+ *     /*
+ *      * This is a comment with a mix of disabling and enabling tags:
+ *      *  - <b>enable-formatter</b>
+ *      *  - <b>disable-formatter</b>
+ *      *  - <b>enable-formatter</b>
+ *      * The formatter will restart to format after this comment...
+ *      */
+ *     void foo() {}
+ *     void bar() {}
+ *     }
+ * 
+ * 5. The tag cannot include newline character (i.e. '\n') but it can have white spaces.
+ *    E.g. "<b>format: on</b>" is a valid enabling tag
+ *    In the future, newlines may be used to support multiple enabling tags.
  * 
- * @since 3.5
+ * @since 3.6
  */
 </pre>
-</li>
-</ul>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264991">264991</a>
-Wrong 'unused' problem reported
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237742">237742</a>
-[javadoc] Javadoc tag name validation is incorrect
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264843">264843</a>
-[1.5][compiler] Eclipse compiler fails to reject invalid code with primitives autoboxed to generics
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264881">264881</a>
-[1.5][compiler]Incorrect unchecked conversion warnings for return types
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=201912">201912</a>
-[compiler] Unused public members of private classes not flagged
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264817">264817</a>
-[search] <char> + * returns 'null' from SearchPattern.getMatchingRegions(String, String, int)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264816">264816</a>
-[search] AIOOBE in StringOperation.getPatternMatchingRegions(..) with pattern "?*"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250454">250454</a>
-[search] Cannot find method references between projects
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218605">218605</a>
-[search] SearchPattern: provide way to get the matching regions
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263558">263558</a>
-Can't compile package-info.java from FindBugs with 3.5 Eclipse
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264443">264443</a>
-[parser] ASTParser.createASTs and IVariableBinding
-
-<a name="v_938"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M6 - February 10, 2009
-<br>Project org.eclipse.jdt.core v_938
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_938">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261594">261594</a>
-Adjust code to new PRE_REFRESH semantics
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263877">263877</a>
-[1.5][compiler] forward reference error flagged within enum
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263633">263633</a>
-[1.5][compiler] Invalid type mismatch for after generic method inference
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262932">262932</a>
-[assist] Constructor completion makes array allocation difficult
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263653">263653</a>
-patch for jdt.core.model.tests to accommodate icu 4.0.1
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246627">246627</a>
-[ast rewrite] Wrong indentation for statement inserted before SwitchCase
-
-<a name="v_937"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M6 - February 3, 2009
-<br>Project org.eclipse.jdt.core v_937
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_937">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=202393">202393</a>
-[compiler] Incomplete code coverage or useless statement within ThrowStatement#resolve
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263215">263215</a>
-[1.5][compiler]  I20090129-1200 generates suddenly an generics compile error that 3.5M4  didnt do
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261510">261510</a>
-[compiler] Deadlock in static initializer of JDT classes
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262517">262517</a>
-[ast rewrite] Whitespace settings in formatter ignored when adding annotation
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260848">260848</a>
-[perfs] Regression on JDT/Core plugin initialization performance test
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257716">257716</a>
-[compiler] Erroneous blank field may not have been initialized
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262408">262408</a>
-remove deprecated NamingConventions.VK_CONSTANT_FIELD
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262717">262717</a>
-Wrong line numbers in classfile
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262568">262568</a>
-improve Javadoc for ICompilationUnit.applyTextEdit(TextEdit, IProgressMonitor)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262389">262389</a>
-Internal code must not use ICompilationUnit.applyTextEdit
-
-<a name="v_936"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M5 - January 27, 2009 - 3.5 MILESTONE 5
-<br>Project org.eclipse.jdt.core v_936
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_936">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262304">262304</a>
-[1.5][compiler] Enum constant in annotation value: javac vs Eclipse differ
+<p>For example, the following snippet:</p>
+<pre>
+public class Test {
+/* disable-formatter */
+void     foo(    )      {	
+				//      unformatted       area  	  
+}
+/* enable-formatter */
+void     bar(    )      {	
+				//      formatted       area  	  
+}
+}
+</pre>
+formatted with disabling tags = "disable-formatter" and enabling tags
+= "enable-formatter" produces the following output:
+<pre>
+public class Test {
 
-<a name="v_935"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M5 - January 25, 2009
-<br>Project org.eclipse.jdt.core v_935
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_935">cvs</a>).
-<h2>What's new in this drop</h2>
-<ul>
-<li>Added APIs to take into account the generic type and the rank of a wildcard type binding:
-       <code>ITypeBinding#getGenericTypeOfWildcardType()</code>, <code>ITypeBinding#getRank()</code>, and
-       <code>BindingKey#createWildcardTypeBindingKey(String genericTypeKey, char boundKind, String boundTypeKey, int rank)</code>.</li>
+/* disable-formatter *	
+void     foo(    )      {
+				//      unformatted       area  	  
+}
+/* enable-formatter *
+	void bar() {
+		// formatted area
+	}
+}
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=27079">27079</a> for more details.
+</li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262208">262208</a>
-[1.5][compiler]Incorrect @Override and name clash errors 
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262209">262209</a>
-[1.5][compiler]Incorrect ambiguous method calls 
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234609">234609</a>
-[dom] BindingKey#toSignature() fails with key from createWilcardTypeBindingKey(..)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261973">261973</a>
-[assist] Constructor completion should be improved (bug 6930)
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=129804">129804</a>
+[dom] Local variable bindings from ASTParser#createASTs(.., String[], .., ..) have no declaring method
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304705">304705</a>
+[formatter] Unexpected indentation of wrapped line comments when 'Never indent line comment on first column' preference is checked
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304656">304656</a>
+StringIndexOutOfBoundsException when using JDT dom methods to process sourcefile
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304506">304506</a>
+Task descriptions always have a space after the tag
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304081">304081</a>
+IJavaProject#isOnClasspath(IJavaElement) returns false for type from referenced JAR
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304122">304122</a>
+TypeBindings.getAnnotations() breaks interface
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304416">304416</a>
+VerifyError after compiling without preserve all locals
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304529">304529</a>
+[formatter] NPE when either the disabling or the enabling tag is not defined
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=27079">27079</a>
+Tags for disabling/enabling code formatter (feature)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304316">304316</a>
+NPE when javadoc URL is invalid
 
-<a name="v_934"></a>
+<a name="v_A37"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M5 - January 20, 2009
-<br>Project org.eclipse.jdt.core v_934
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_934">cvs</a>).
+Eclipse SDK 3.6M6 - March 2, 2010
+<br>Project org.eclipse.jdt.core v_A37
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A37">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>Added new API to propose constructor completion<br>
-When "new ArrayLis" is completed now constructors are proposed instead of type references.
-This new completion kind is <code>CONSTRUCTOR_INVOCATION</code> and this proposal has always a 
-<code>TYPE_REF</code> required proposal to describe the type of the constructor.
-The <code>CONSTRUCTOR_INVOCATION</code> has "()" as completion string and <code>TYPE_REF</code> has
-"java.util.ArrayList" as completion string.<br>
-There is also a similar new API to complete anonymous type constructor: <code>ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION</code><br>
+<li>Added new configurable option to fix bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551">295551</a>:<br>
+<pre>
+/**
+ * Compiler option ID: Further Determining the Effect of @SuppressWarnings if also
+ * COMPILER_PB_SUPPRESS_WARNINGS is enabled.
+ * When enabled, the @SuppressWarnings annotation can additionally be used to suppress 
+ * optional compiler diagnostics that have been configured as ERROR.
+ * When disabled, all @SuppressWarnings annotations only affects warnings.
+ *
+ * Option id: "org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors"
+ * Possible values: { "enabled", "disabled" }
+ * Default: "disabled"
+ * 
+ * @since 3.6
+ * @category CompilerOptionID
+ */
+public static final String COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS = PLUGIN_ID + ".compiler.problem.suppressOptionalErrors";
+</pre>
+</li>
+<li>
+Added a new formatter preferences to align method declaration.
+<p>
+This new preference is controlled with the option:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION</code>
+<pre>
+/**
+ * FORMATTER / Option for alignment of method declaration
+ *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_method_declaration"
+ *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ *     - default:           createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
+ * 
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.6
+ */
+</pre>
+<p>For example, the following snippet:</p>
+<pre>
+public class Test {
+public final synchronized java.lang.String a_method_which_has_a_very_long_name() {
+return null;
+}
+}
+</pre>
+formatted with this preference activated as 'Wrap only when necessary', will
+produce the following output:
+<pre>
+public class Test {
+	public final synchronized java.lang.String
+			a_method_which_has_a_very_long_name() {
+		return null;
+	}
+}
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284789">284789</a> for more details.
+</li>
+<li>New API to fix bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246594">246594</a>. See the bug for details.
+<pre>
+org.eclipse.jdt.core.ITypeParameter
+	/**
+	 * Returns the signatures for this type parameter's bounds. The type parameter may have 
+	 * been declared as part of a type or a method. The signatures represent only the individual 
+	 * bounds and do not include the type variable name or the <code>extends</code> keyword.  
+	 * The signatures may be either unresolved (for source types) or resolved (for binary types). 
+	 * See {@link Signature} for details.
+	 * 
+	 * @return the signatures for the bounds of this formal type parameter
+	 * @throws JavaModelException
+	 *             if this element does not exist or if an exception occurs while accessing its corresponding resource.
+	 * @see Signature
+	 * @since 3.6
+	 */
+	String[] getBoundsSignatures() throws JavaModelException;
+</pre>
+</li>
+<li>
+Added a new formatter preference to enable or disable the formatting of line
+comments that start on the first column.<br>
+Note that the indentation of line comments will also be disabled when activating
+this option, as otherwise the formatter could not produce stable outputs...
+<p>
+The default is to format these comments to have a backward compatible behavior.
+</p><p>
+This new preferences is controlled with the options:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN</code>
+<pre>
+/**
+ * FORMATTER / Option to format line comments that start on the first column
+ *     - option id:         "org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ * 
+ * Note that this option is ignored if either the
+ * {@link #FORMATTER_COMMENT_FORMAT_LINE_COMMENT} option has been set to
+ * {@link #FALSE} or the formatter is created with the mode
+ * {@link ToolFactory#M_FORMAT_NEW}.
+ * 
+ * @see #TRUE
+ * @see #FALSE
+ * @see ToolFactory#createCodeFormatter(Map, int)
+ * @since 3.6
+ */
+</pre>
+<p>For example, the following snippet:</p>
+<pre>
+public class X01 {
+//    int	a  =   1;
+//    int	b  =   2;
+}
+</pre>
+will be untouched by the formatter if both options are activated.
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251133">251133</a> for more details.
+</li>
+<li>New API to fix bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=252431">252431</a>. See the bug for details.
+<pre>
+org.eclipse.jdt.core.IClasspathEntry
+	/**
+	 * Returns the classpath entry that is making a reference to this classpath entry. For entry kinds 
+	 * {@link #CPE_LIBRARY}, the return value is the entry that is representing the JAR that includes 
+	 * <code>this</code> in the MANIFEST.MF file's Class-Path section. For entry kinds other than 
+	 * {@link #CPE_LIBRARY}, this returns <code>null</code>. For those entries that are on the raw classpath already, 
+	 * this returns <code>null</code>.
+	 *
+	 * It is possible that multiple library entries refer to the same entry
+	 * via the MANIFEST.MF file. In those cases, this method returns the first classpath entry 
+	 * that appears in the raw classpath. However, this does not mean that the other referencing 
+	 * entries do not relate to their referenced entries. 
+	 * See {@link JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject)} for 
+	 * more details.
+	 * 
+	 * @return the classpath entry that is referencing this entry or <code>null</code> if 
+	 * 		not applicable.
+	 * @since 3.6
+	 */
+	IClasspathEntry getReferencingEntry();
 
 
-<pre>
+org.eclipse.jdt.core.IJavaProject
+	/**
+	 * Works similar to {@link #setRawClasspath(IClasspathEntry[], IPath, IProgressMonitor)} and 
+	 * additionally allows persisting the given array of referenced entries for this project.
+	 * The referenced entries and their attributes are stored in the .classpath file of this 
+	 * project. For details on referenced entries, see 
+	 * {@link JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject)}
+	 * and {@link IClasspathEntry#getReferencingEntry()}.
+	 * 
+	 * Since the referenced entries are stored in the .classpath file, clients can store additional 
+	 * information that belong to these entries and retrieve them across sessions, though the referenced
+	 * entries themselves may not be present in the raw classpath. By passing a <code>null</code>
+	 * referencedEntries, clients can choose not to modify the already persisted referenced entries,
+	 * which is fully equivalent to {@link #setRawClasspath(IClasspathEntry[], IPath, IProgressMonitor)}.
+	 * If an empty array is passed as referencedEntries, the already persisted referenced entries, 
+	 * if any, will be cleared. 
+	 * 
+	 * If there are duplicates of a referenced entry or if any of the <code>referencedEntries</code> 
+	 * is already present in the raw classpath(<code>entries</code>) those referenced entries will 
+	 * be excluded and not be persisted.
+	 *
+	 * @param entries a list of classpath entries
+	 * @param referencedEntries the list of referenced classpath entries to be persisted
+	 * @param outputLocation the default output location
+	 * @param monitor the given progress monitor
+	 * @exception JavaModelException if the classpath could not be set. Reasons include:
+	 *  	This Java element does not exist (ELEMENT_DOES_NOT_EXIST)
+	 *  	The classpath is being modified during resource change event notification (CORE_EXCEPTION)
+	 *  	The classpath failed the validation check as defined by {@link JavaConventions#validateClasspath(IJavaProject, IClasspathEntry[], IPath)}
+	 * @see IClasspathEntry
+	 * @see #getReferencedClasspathEntries()
+	 * @since 3.6
+	 */
+	void setRawClasspath(IClasspathEntry[] entries, IClasspathEntry[] referencedEntries, IPath outputLocation,
+			IProgressMonitor monitor) throws JavaModelException;
 
 	/**
-	 * Completion is a reference to a constructor.
-	 * This kind of completion might occur in a context like
-	 * <code>"new Lis"</code> and complete it to
-	 * <code>"new List();"</code> if List is a class that is not abstract.
-	 * <p>
-	 * The following additional context information is available
-	 * for this kind of completion proposal at little extra cost:
-	 * <ul>
-	 * <li>{@link #getDeclarationSignature()} -
-	 * the type signature of the type that declares the constructor that is referenced
-	 * </li>
-	 * <li>{@link #getFlags()} -
-	 * the modifiers flags of the constructor that is referenced
-	 * </li>
-	 * <li>{@link #getName()} -
-	 * the simple name of the constructor that is referenced
-	 * </li>
-	 * <li>{@link #getSignature()} -
-	 * the method signature of the constructor that is referenced
-	 * </li>
-	 * </ul>
-	 * </p>
-	 * <p>
-	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
-	 * (eg. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)}).<br>
-	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
-	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
-	 * </p>
+	 * Returns the list of referenced classpath entries stored in the .classpath file of <code>this</code> 
+	 * java project. Clients can store the referenced classpath entries using 
+	 * {@link #setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, IProgressMonitor)}
+	 * If the client has not stored any referenced entries for this project, an empty array is returned.
 	 *
-	 * @see #getKind()
-	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)
+	 * @throws JavaModelException
+	 * @return an array of referenced classpath entries stored for this java project or an empty array if none
+	 * 			stored earlier.
+	 * @since 3.6
+	 */
+	IClasspathEntry[] getReferencedClasspathEntries() throws JavaModelException;
+	
+
+org.eclipse.jdt.core.IPackageFragmentRoot
+	/**
+	 * Returns the first resolved classpath entry that corresponds to this package fragment root.
+	 * A resolved classpath entry is said to correspond to a root if the path of the resolved
+	 * entry is equal to the root's path.
 	 * 
-	 * @since 3.5
+	 * @return the first resolved classpath entry that corresponds to this package fragment root
+	 * @throws JavaModelException if this element does not exist or if an
+	 *		exception occurs while accessing its corresponding resource. 
+	 * @since 3.6
 	 */
-	public static final int CONSTRUCTOR_INVOCATION = 26;
+	IClasspathEntry getResolvedClasspathEntry() throws JavaModelException;
 	
+
+org.eclipse.jdt.core.JavaCore
 	/**
-	 * Completion is a reference of a constructor of an anonymous class.
-	 * This kind of completion might occur in a context like
-	 * <code>"new Lis^;"</code> and complete it to
-	 * <code>"new List() {}"</code> if List is an interface or abstract class.
-	 * <p>
-	 * The following additional context information is available
-	 * for this kind of completion proposal at little extra cost:
-	 * <ul>
-	 * <li>{@link #getDeclarationSignature()} -
-	 * the type signature of the type being implemented or subclassed
-	 * </li>
-	 * <li>{@link #getDeclarationKey()} -
-	 * the type unique key of the type being implemented or subclassed
-	 * </li>
-	 * <li>{@link #getSignature()} -
-	 * the method signature of the constructor that is referenced
-	 * </li>
-	 * <li>{@link #getKey()} -
-	 * the method unique key of the constructor that is referenced
-	 * if the declaring type is not an interface
-	 * </li>
-	 * <li>{@link #getFlags()} -
-	 * the modifiers flags of the constructor that is referenced
-	 * </li>
-	 * </ul>
-	 * </p>
-	 * <p>
-	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
-	 * (eg. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)})<br>
-	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
-	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
-	 * </p>
+	 * Returns an array of classpath entries that are referenced directly or indirectly 
+	 * by a given classpath entry. For the entry kind {@link IClasspathEntry#CPE_LIBRARY}, 
+	 * the method returns the libraries that are included in the Class-Path section of 
+	 * the MANIFEST.MF file. If a referenced JAR file has further references to other library 
+	 * entries, they are processed recursively and added to the list. For entry kinds other 
+	 * than {@link IClasspathEntry#CPE_LIBRARY}, this method returns an empty array.
 	 *
-	 * @see #getKind()
-	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)
+	 * If a referenced entry has already been stored 
+	 * in the given project's .classpath, the stored attributes are populated in the corresponding
+	 * referenced entry. For more details on storing referenced entries see
+	 * see {@link IJavaProject#setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, 
+	 * IProgressMonitor)}. 
 	 * 
-	 * @since 3.5
+	 * @param libraryEntry the library entry whose referenced entries are sought 
+	 * @param project project where the persisted referenced entries to be retrieved from
+	 * @return an array of classpath entries that are referenced directly or indirectly by the given entry. 
+	 * 			If not applicable, returns an empty array.
+	 * @since 3.6
 	 */
-	public static final int ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION = 27;
-</pre>
-These new proposals can require a long computation so they are proposed only if code assist was called with a progress monitor.
-To avoid that the code assist operation takes too much time a <code>IProgressMonitor</code> which automatically cancel the code
-assist operation when a specified amount of time is reached could be used.
-
-<pre>
-new IProgressMonitor() {
-    private final static int TIMEOUT = 500; //ms
-    private long endTime;
-    public void beginTask(String name, int totalWork) {
-        fEndTime= System.currentTimeMillis() + TIMEOUT;
-    }
-    public boolean isCanceled() {
-        return endTime <= System.currentTimeMillis();
-    }
-    ...
- };
+	public static IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project);	
 </pre>
 </li>
-<li>Fix for <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6930">bug 6930</a> required the index version to be incremented. 
-    Indexes will be automatically regenerated upon subsequent search queries (accounting for indexing notification in search progress 
-    dialogs) and the size of the new indexes will be bigger.
-</li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260717">260717</a>
-[assist] Constructors should be proposed even when the declaring type is not imported
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6930">6930</a>
-[assist] Constructor completion
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=220311">220311</a>
-[1.5][compiler] package-info.java does not recognise duplicate annotations as a problem
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259685">259685</a>
-Bogus build error "Cannot nest" xyz "inside library"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260798">260798</a>
-[formatter] Strange behavior of never join lines
-
-<a name="v_933"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M5 - January 13, 2009
-<br>Project org.eclipse.jdt.core v_933
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_933">cvs</a>).
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=252431">252431</a>
+New API is needed to better identify referenced jars in the Class-Path: entry
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251133">251133</a>
+[formatter] Automatic formatting single line comments is incoherent among tools
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=248897">248897</a>
+[1.5][compiler] Wrong warning 'The local variable 'var' is never read'.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304031">304031</a>
+Unused @SuppressWarnings(..) not flagged when suppressed problem is set to Error
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295551">295551</a>
+Add option to automatically promote all warnings to errors
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303810">303810</a>
+Compact boolean fields on FlowContext
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251227">251227</a>
+[compiler] Fup of bug 115814, comparing doubles should not be flagged
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268798">268798</a>
+[1.5][compiler] Eclipse 3.5M5/6 produces new compiler errors with generics
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448">303448</a>
+Wrong code generation optimization when assert condition is false
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303776">303776</a>
+Member types imports are removed too aggressively
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302949">302949</a>
+JavaModelManager hangs accessing the nonChainingJars set
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246594">246594</a>
+[model] API request: ITypeParameter#getBoundsSignatures() or #getSignature()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=253896">253896</a>
+[compiler][null] wrong "Null comparison always yields false" problem for auto-unboxing
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284789">284789</a>
+[formatter] Does not line-break method declaration exception with parameters
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303480">303480</a>
+[1.5][compiler] CCE: org.eclipse.jdt.internal.compiler.parser.RecoveredBlock cannot be cast to org.eclipse.jdt.internal.compiler.parser.RecoveredType
+
+<a name="v_A36"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M6 - February 23, 2010
+<br>Project org.eclipse.jdt.core v_A36
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A36">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>Improved generic method inference to better match JLS 15.12.2.6. The compiler now infers better in presence of unchecked conversion in argument types (raw types). </li>
+<li>
+Added a new formatter preferences to align annotation arguments (i.e. element-value pairs).
+<p>
+This new preference is controlled with the option:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION</code>
+<pre>
+/**
+ * FORMATTER / Option for alignment of arguments in annotation
+ *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation"
+ *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ *     - default:           createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
+ * 
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.6
+ */
+</pre>
+<p>For example, the following snippet:</p>
+<pre>
+ at MyAnnot(value1 = "this is an example", value2 = "of an annotation", value3 = "with several arguments", value4 = "which may need to be wrapped")
+public class Test {
+}
+</pre>
+formatted with this preference activated, will produce the following output
+while using the <code>Eclipse [built-in]</code> profile:
+<pre>
+ at MyAnnot(value1 = "this is an example", value2 = "of an annotation",
+		value3 = "with several arguments",
+		value4 = "which may need to be wrapped")
+public class Test {
+}
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282030">282030</a> for more details.
+</li>
+<li>In order to get bindings outside the Eclipse environment, the following methods has been added on the ASTParser class.
+<br>See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=206391">206391</a> for details.<br>
+<pre>
+org.eclipse.jdt.core.dom.ASTParser
+	/**
+	 * Set the environment that can be used when no IJavaProject are available.
+	 * 
+	 * The user has to be sure to include all required types on the classpaths for binary types
+	 * or on the sourcepaths for source types to resolve the given source code.
+	 * All classpath and sourcepath entries are absolute paths.
+	 * If sourcepaths contain units using a specific encoding (not the platform encoding), then the
+	 * given encodings must be set. If the given encodings is set, its length must
+	 * match the length of the sourcepaths parameter or an IllegalArgumentException will be thrown.
+	 * If encodings is not null, the given sourcepathEntries must not be null.
+	 * 
+	 * @param classpathEntries the given classpath entries to be used to resolve bindings
+	 * @param sourcepathEntries the given sourcepath entries to be used to resolve bindings
+	 * @param encodings the encodings of the corresponding sourcepath entries or null if the platform encoding
+	 * can be used.
+	 * @param includeRunningVMBootclasspath true if the bootclasspath of the running VM must be prepended to the
+	 * given classpath and false if the bootclasspath of the running VM should be ignored.
+	 * @throws IllegalArgumentException if the size of the given encodings is not equals to the size of the given
+	 * sourcepathEntries
+	 * @since 3.6
+	 */
+	public void setEnvironment(String[] classpathEntries, String[] sourcepathEntries, String[] encodings, boolean includeRunningVMBootclasspath);
+	
+	/**
+	 * Creates ASTs for a batch of compilation units. When bindings are being resolved, processing a
+	 * batch of compilation units is more efficient because much of the work involved in resolving 
+	 * bindings can be shared. 
+	 *
+	 * When bindings are being resolved, all compilation units are resolved 
+	 * using the same environment, which must be set beforehand with 
+	 * {@link #setEnvironment(String[], String[], String[], boolean) setEnvironment}.
+	 * The compilation units are processed one at a time in no specified order. 
+	 * For each of the compilation units in turn,
+	 *  - {@link ASTParser#createAST(IProgressMonitor) ASTParser.createAST} is called to parse it 
+	 *           and create a corresponding AST. The calls to {@link ASTParser#createAST(IProgressMonitor) ASTParser.createAST} 
+	 *           all employ the same settings.</li>
+	 *  - {@link FileASTRequestor#acceptAST(String, CompilationUnit) FileASTRequestor.acceptAST} is called passing
+	 *           the compilation unit path and the corresponding AST to <code>requestor</code>. The compilation unit path is the same
+	 *           path that is passed into the given <code>sourceFilePaths</code> parameter.
+	 *
+	 * Note only ASTs from the given compilation units are reported
+	 * to the requestor. If additional compilation units are required to
+	 * resolve the original ones, the corresponding ASTs are <b>not</b>
+	 * reported to the requestor.
+	 * 
+	 * Note also the following parser parameters are used, regardless of what
+	 * may have been specified:
+	 *  - The {@linkplain #setKind(int) parser kind} is <code>K_COMPILATION_UNIT</code>
+	 *  - The {@linkplain #setSourceRange(int,int) source range} is <code>(0, -1)</code>
+	 *  - The {@linkplain #setFocalPosition(int) focal position} is not set
+	 *
+	 * The <code>bindingKeys</code> parameter specifies bindings keys
+	 * ({@link IBinding#getKey()}) that are to be looked up. These keys may
+	 * be for elements either inside or outside the set of compilation
+	 * units being processed. When bindings are being resolved,
+	 * the keys and corresponding bindings (or <code>null</code> if none) are
+	 * passed to {@link FileASTRequestor#acceptBinding(String, IBinding) FileASTRequestor.acceptBinding}. Note that binding keys
+	 * for elements outside the set of compilation units being processed are looked up
+	 * after all {@link FileASTRequestor#acceptAST(String, CompilationUnit) ASTRequestor.acceptAST}
+	 * callbacks have been made.
+	 * Binding keys for elements inside the set of compilation units being processed
+	 * are looked up and reported right after the corresponding
+	 * {@link FileASTRequestor#acceptAST(String, CompilationUnit) FileASTRequestor.acceptAST} callback has been made.
+	 * No {@link FileASTRequestor#acceptBinding(String, IBinding) FileASTRequestor.acceptBinding} callbacks are made unless
+	 * bindings are being resolved.
+	 *
+	 * A successful call to this method returns all settings to their
+	 * default values so the object is ready to be reused.
+	 * 
+	 * The given <code>encodings</code> are used to properly parse the given source units. If the platform encoding is sufficient,
+	 * then the given encodings can be set to <code>null</code>.
+	 *
+	 * @param sourceFilePaths the compilation units to create ASTs for
+	 * @param encodings the given encoding for the source units
+	 * @param bindingKeys the binding keys to create bindings for
+	 * @param requestor the AST requestor that collects abstract syntax trees and bindings
+	 * @param monitor the progress monitor used to report progress and request cancellation,
+	 *   or <code>null</code> if none
+	 * @exception IllegalStateException if the settings provided
+	 * are insufficient, contradictory, or otherwise unsupported
+	 * @since 3.6
+	 */
+	 public void createASTs(String[] sourceFilePaths, String[] encodings, String[] bindingKeys, FileASTRequestor requestor, IProgressMonitor monitor)
+</pre>
+</li>
+<li>
+Added two new formatter preferences to condense block and javadoc comments.
+<p>
+These new preferences are controlled respectively with the options:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES</code><br>
+<code>DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES</code>
+<pre>
+/**
+ * FORMATTER / Option to control whether block comments will have new lines at boundaries
+ *     - option id:         "org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ * 
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.6
+ */
+
+/**
+ * FORMATTER / Option to control whether javadoc comments will have new lines at boundaries
+ *     - option id:         "org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ * 
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.6
+ */
+ </pre>
+<p>For example, the following snippet:</p>
+<pre>
+public class X {
+	/*
+	 * This block comment after formatting will no longer use a new line
+	 * at the beginning and at the end of the comment...
+	 */
+	void foo() {
+	}
+	/**
+	 * This javadoc comment after formatting will no longer use a new line
+	 * at the beginning and at the end of the comment...
+	 */
+	void bar() {
+	}
+}
+</pre>
+formatted with both the options set to FALSE, will produce the following output:
+<pre>
+public class X {
+	/* This block comment after formatting will no longer use a new line at the
+	 * beginning and at the end of the comment... */
+	void foo() {
+	}
+
+	/** This javadoc comment after formatting will no longer use a new line at
+	 * the beginning and at the end of the comment... */
+	void bar() {
+	}
+}
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270209">270209</a> for more details.
+</li>
+<li>
+The <code>CodeFormatter.F_INCLUDE_COMMENT</code> flag now works for all kind
+of snippet while using the formatter.<br>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236406">236406</a> for more details.
+</li>
+<li>
+Added a new formatter preferences to insert a new line after a label.
+<p>
+This new preference is controlled with the option:</p>
+<code>DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL</code>
+<pre>
+/**
+ * FORMATTER / Option to insert a new line after a label
+ *     - option id:         "org.eclipse.jdt.core.formatter.insert_new_line_after_label"
+ *     - possible values:   { INSERT, DO_NOT_INSERT }
+ *     - default:           DO_NOT_INSERT
+ *
+ * @see JavaCore#INSERT
+ * @see JavaCore#DO_NOT_INSERT
+ * @since 3.6
+ */
+</pre>
+<p>For example, the following snippet:</p>
+<pre>
+public class X {
+	void foo() {
+		LABEL:for (int i = 0; i < 10; i++) {
+		}
+	}
+}
+</pre>
+formatted with this preference activated, will produce the following output:
+<pre>
+public class X {
+	void foo() {
+		LABEL:
+		for (int i = 0; i < 10; i++) {
+		}
+	}
+}
+</pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150741">150741</a> for more details.
+</li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=214948">214948</a>
-Incorrect deprecation warning on annotation instances
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260276">260276</a>
-[formatter] Inconsistent formatting of one-line block comment
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239607">239607</a>
-[formatter] Incorrect removal of asterisk (*) within a block comment when formatting
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254998">254998</a>
-[formatter] wrong type comment format during code generation
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258798">258798</a>
-[1.5][compiler] Return type should be erased after unchecked conversion during inference
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258906">258906</a>
-[jsr269] Package annotations not visible to Java 6 APT processors
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259633">259633</a>
-[1.5][compiler] Bound of type parameter of class in method not checked
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=149768">149768</a>
-Annotations should be a compilation dependency
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260257">260257</a>
-Reduce space taken by SourceRefElementInfos
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259607">259607</a>
-Deadlock opening launch configuration dialog
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298362">298362</a>
+[1.5][compiler] Compiler returns java.lang.Object instead of generic type T when javac returns T
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281655">281655</a>
+[formatter] "Never join lines" does not work for annotations.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282030">282030</a>
+[formatter] Java annotation formatting
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270209">270209</a>
+[format] Condensed block comment formatting
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236406">236406</a>
+[formatter] The comments flags should work for all kinds of snippet
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294360">294360</a>
+Duplicate entries in Classpath Resolution when importing dependencies from parent project
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=206391">206391</a>
+[DOM] Binding Resolutions for projects outside of Eclipse workspace
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150409">150409</a>
+[compiler] AST does not expose method bindings for non-visible inherited field
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358">302358</a>
+Compiler finds wrong method for method invocation with generics
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302919">302919</a>
+misreported cast Error when mixing generic and raw class in nested class
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150741">150741</a>
+[formatter] Add  option: "add new line after label"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287939">287939</a>
+[code assist] The instanceof and the auto cast feature should also work for an assignment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303108">303108</a>
+[import rewrite] ImportRewrite#removeImport(String) does not work with setUseContextToFilterImplicitImports(true)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295619">295619</a>
+Test failure caused by a timing issue in M20091118-0800
+
+<a name="v_A35"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M6 - February 16, 2010
+<br>Project org.eclipse.jdt.core v_A35
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A35">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>In order to fix bugs <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235253">235253</a> and
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194358">194358</a>, a new API was added to preserve the existing pre-3.6 behavior for existing clients:<br>
+<pre>
+	/**
+	 * Sets whether a context should be used to properly filter implicit imports.
+	 *
+	 * By default, the option is disabled to preserve pre-3.6 behavior.
+	 *
+	 *
+	 * When this option is set, the context passed to the addImport*(...) methods is used to determine
+	 * whether an import can be filtered because the type is implicitly visible. Note that too many imports
+	 * may be kept if this option is set and addImport*(...) methods are called without a context.
+	 *
+	 * 
+	 * @param useContextToFilterImplicitImports the given setting
+	 * 
+	 * @see #setFilterImplicitImports(boolean)
+	 * @since 3.6
+	 */
+	public void setUseContextToFilterImplicitImports(boolean useContextToFilterImplicitImports);
+</pre>
+</li>
+</ul>
 
-<a name="v_932"></a>
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302455">302455</a>
+java.lang.ClassCastException in secondary types removal
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=102279">102279</a>
+[search] method reference performance depends on method name
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236814">236814</a>
+[jsr199] EclipseCompiler#getTask does not respect its contract when its first argument is null
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302552">302552</a>
+[formatter] Formatting qualified invocations can be broken when the Line Wrapping policy forces element to be on a new line
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302587">302587</a>
+Encoding/decoding of problem arguments in Marker fails if argument contains #
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301438">301438</a>
+Eclipse hangs when attempting to refactor using the "change method signature"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260381">260381</a>
+[formatter] Javadoc formatter breaks {@code ...} tags.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302446">302446</a>
+[compiler] Regression in if statement flow analysis related to null checks
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=194358">194358</a>
+[import rewrite] Organize Imports produces wrong order of imports
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235253">235253</a>
+[organize imports] Organize imports removes needed import statement.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302379">302379</a>
+[search] JavaSearchTests.testZIPArchive2() test failed in I20100209-0800
+
+<a name="v_A34"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M5 - January 6, 2009
-<br>Project org.eclipse.jdt.core v_932
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_932">cvs</a>).
+Eclipse SDK 3.6M6 - February 9, 2010
+<br>Project org.eclipse.jdt.core v_A34
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A34">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258145">258145</a>
-Fup of bug 252555, JME is thrown when package-info.java exists twice in the same project
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259129">259129</a>
-[compiler] Fup of bug 258950, wrong line number attribute for cascading method invocations
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302123">302123</a>
+[formatter] AssertionFailedException occurs while formatting a source containing the specific javadoc comment /** ***/
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300379">300379</a>
+[formatter] Fup of bug 287833
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=250056">250056</a>
+[compiler][null] Another assert and "Redundant null check"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301683">301683</a>
+Annotations are broken when native methods are present in a class
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300734">300734</a>
+Extract temp misses duplicate occurrence.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289560">289560</a>
+Eclipse hangs after modifying user libraries
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301562">301562</a>
+[JSR269] Error in EclipseFileManager.collectAllMatchingFiles
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298637">298637</a>
+Could not retrieve declared methods (NPE in ParameterizedTypeBinding.resolve)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057">294057</a>
+[1.5][compiler] Imports not resolved correctly with generics and inner interfaces
 
-<a name="v_931"></a>
+<a name="v_A33"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M5 - December 16, 2008
-<br>Project org.eclipse.jdt.core v_931
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_931">cvs</a>).
+Eclipse SDK 3.6M6 - February 2, 2010
+<br>Project org.eclipse.jdt.core v_A33
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A33">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=171136">171136</a>
-[buildpath] Illegal type of archive for required library is an incorrect message.
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300136">300136</a>
+classpathentry OPTIONAL attribute not honored for var entries
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300723">300723</a>
+Fup of bug 235783
 
-<a name="v_930"></a>
+<a name="v_A32a"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - December 10, 2008 - 3.5 MILESTONE 4
-<br>Project org.eclipse.jdt.core v_930
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_930">cvs</a>).
+Eclipse SDK 3.6M5 - January 21, 2010 - 3.6.0 M5
+<br>Project org.eclipse.jdt.core v_A32a
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A32a">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255008">255008</a>
-[compiler] Assert statement discrepancy with javac caused by an uninitialized variable
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258039">258039</a>
-[1.5][compiler] Misleading error message for "instanceof List<Object>"
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300133">300133</a>
+[1.5][compiler] Local classes inside enum constants generate default constructor without implicit constructor call
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300440">300440</a>
+icu dependency needs to be udpated
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299900">299900</a>
+[null]Missing potential null warnings for variable on the right of an OR conditional expression
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293917">293917</a>
+Invalid 'potential null access' warning reports
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=252379">252379</a>
+Organize imports deletes needed static import.
 
-<a name="v_929"></a>
+<a name="v_A31"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - December 8, 2008
-<br>Project org.eclipse.jdt.core v_929
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_929">cvs</a>).
+Eclipse SDK 3.6M5 - January 18, 2010
+<br>Project org.eclipse.jdt.core v_A31
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A31">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>Added property to adjust the size of the openable cache: "org.eclipse.jdt.core.javamodelcache.ratio". For example, starting Eclipse as follows will increase the
-     size of the openable cache by 50%: 
-     <pre>eclipse.exe -vmArgs -Dorg.eclipse.jdt.core.javamodelcache.ratio=1.5</pre>
-</li>
-<li>
-As users may want to have different behavior in comments, the new formatter
-preference to preserve line breaks is now controlled by two different options:
-<ul>
-<li>for the already wrapped code lines:<br>
-<code>DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES</code>
+<li>New API to fix bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295894">295894</a>. See the bug for details.
 <pre>
 /**
- * FORMATTER / Option to specify whether the formatter can join wrapped lines or not
- * 
- * 		For example, the wrapped lines of method foo return statement in following test case:
- * 			class X {
- * 			String foo() {
- * 			return "select x "
- * 			       + "from y "
- * 			       + "where z=a";
- * 			}
- * 			}
+ * Returns a Java search scope limited to the hierarchy of the given type and to a given project.
+ * The Java elements resulting from a search with this scope will be types in this hierarchy.
  *
- * 		will be preserved by the formatter when the new preference is used
- * 		even if the maximum line width would give it enough space to join the lines.
- * 		Hence produces the following output:
- * 			class X {
- * 			    String foo() {
- * 			        return "select x "
- * 			                + "from y "
- * 			                + "where z=a";
- * 			    }
- * 			}
+ * Unlike the createHierarchyScope methods, this method creates strict
+ * scopes that only contain types that actually span the hierarchy of the focus
+ * type, but do not include additional enclosing or member types.
+ *
+ *
+ * By default, hierarchy scopes include all direct and indirect supertypes and subtypes of the
+ * focus type. This method, however, allows to restrict the hierarchy to true subtypes,
+ * not including supertypes. Also inclusion of the focus type itself is controled by a parameter. 
  *
- *     - option id:         "org.eclipse.jdt.core.formatter.join_wrapped_lines"
- *     - possible values:   { TRUE, FALSE }
- *     - default:           TRUE
  * 
- * @since 3.5
+ * @param project the project to which to constrain the search, or null if
+ *        search should consider all types in the workspace 
+ * @param type the focus of the hierarchy scope
+ * @param onlySubtypes if true only subtypes of type are considered
+ * @param includeFocusType if true the focus type type is included in the resulting scope, 
+ * 		  otherwise it is excluded
+ * @param owner the owner of working copies that take precedence over original compilation units, 
+ *        or null if the primary working copy owner should be used
+ * @return a new hierarchy scope
+ * @exception JavaModelException if the hierarchy could not be computed on the given type
+ * @since 3.6
  */
+public static IJavaSearchScope createStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner) throws JavaModelException;
 </pre>
 </li>
-<li>for the lines in comments:<br>
-<code>DefaultCodeFormatterConstants.FORMATTER_JOIN_LINES_IN_COMMENTS</code>
+<li>New API added to report a compiler warning when object allocations are unused:
 <pre>
+org.eclipse.jdt.core.compiler.IProblem.UnusedObjectAllocation
+
 /**
- * FORMATTER / Option to specify whether the formatter can join text lines in comments or not
- * 
- * 		For example, the following comment:
- * 			/**
- * 			 * The foo method.
- * 			 * foo is a substitute for bar.
- * 			 */
- * 			public class X {
- * 			}
- * 
- * 		will be unchanged by the formatter when this new preference is used,
- * 		even if the maximum line width would give it enough space to join the lines.
+ * Compiler option ID: Reporting Allocation of an Unused Object.
+ * When enabled, the compiler will issue an error or a warning if an object is allocated but never used,
+ * neither by holding a reference nor by invoking one of the object's methods.
  *
- *     - option id:         "org.eclipse.jdt.core.formatter.join_lines_in_comments"
- *     - possible values:   { TRUE, FALSE }
- *     - default:           TRUE
+ * Option id:"org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation"
+ * Possible values:{ "error", "warning", "ignore" }
+ * Default:"ignore"
  *
- * @since 3.5
+ * @since 3.6
+ * @category CompilerOptionID
  */
+public static final String COMPILER_PB_UNUSED_OBJECT_ALLOCATION = PLUGIN_ID + ".compiler.problem.unusedObjectAllocation";
 </pre>
 </li>
 </ul>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257907">257907</a>
-[Formatter] FORMATTER_PRESERVE_EXISTING_LINE_BREAKS needs clarification
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257906">257906</a>
-[Formatter] should have separate 'preserve existing line breaks' for code and comment formatting
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232816">232816</a>
-[buildpath] Misleading problem text for missing jar in user library
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257849">257849</a>
-[1.5][compiler] Internal compiler error using generics w/ abstract classes & interfaces
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257869">257869</a>
-Adjust Java model cache size using a property
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007">245007</a>
+[compiler] Should not completely ignore anonymous type with missing super type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295894">295894</a>
+[search] Search shows focus type implementation for nested types even though the scope is restricted to subtypes.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236385">236385</a>
+[compiler] Warn for potential programming problem if an object is created but not used
 
-<a name="v_928"></a>
+<a name="v_A30"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - December 7, 2008
-<br>Project org.eclipse.jdt.core v_928
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_928">cvs</a>).
+Eclipse SDK 3.6M5 - January 12, 2010
+<br>Project org.eclipse.jdt.core v_A30
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A30">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>
-Added a new formatter preference to preserve existing breaks in already wrapped and comments lines.<br>
-<p>
-For example, the wrapped lines of method foo return statement in following test case:
-</p>
-<pre>
-class X {
-String foo() {
-return "select x "
-       + "from y "
-       + "where z=a";
-}
-}
-</pre>
-will be preserved by the formatter when the new preference is used, hence produces
-now the following output:
-<pre>
-class X {
-    String foo() {
-        return "select x "
-                + "from y "
-                + "where z=a";
-    }
-}
-</pre>
-Similarly, following comment:
-<pre>
-/**
- * The foo method.
- * foo is a substitute for bar.
- */
-public class X {
-}
-</pre>
-is now unchanged by the formatter when this new preference is used...<br>
-<p>
-This diagnosis is controlled by the option:<br>
-<code>DefaultCodeFormatterConstants.FORMATTER_PRESERVE_EXISTING_LINE_BREAKS</code>:</p>
+<li>New API added to expose the reconcile flags used in the reconcile context:
 <pre>
 /**
- * FORMATTER / Option to specify whether the formatter should preserve existing line breaks or not
- *     - option id:         "org.eclipse.jdt.core.formatter.preserve_existing_line_breaks"
- *     - possible values:   { TRUE, FALSE }
- *     - default:           FALSE
- * @since 3.5
+ * Returns the reconcile flag of this context. This flag is a bitwise value of the constant defined
+ * in ICompilationUnit.
+ *
+ * @return the reconcile flag of this context
+ * @since 3.6
+ *
+ * @see ICompilationUnit#ENABLE_BINDINGS_RECOVERY
+ * @see ICompilationUnit#ENABLE_STATEMENTS_RECOVERY
+ * @see ICompilationUnit#IGNORE_METHOD_BODIES
  */
+public int getReconcileFlags();
 </pre>
 </li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257434">257434</a>
-[1.5][compiler] Should detect type mismatch after capture
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257384">257384</a>
-AIOOBE during problem reporting
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239130">239130</a>
-[formatter] Comment formatter does not keep blank lines after @see references
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198074">198074</a>
-[formatter] the code formatter doesn't respect my new lines
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256799">256799</a>
-[formatter] Formatter wrongly adds space to //$FALL-THROUGH$ is
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=243917">243917</a>
+[compiler] should not warn about unused field when native method present
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296343">296343</a>
+OOM error caused by java indexing referencing classloader from threadLocal
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=130000">130000</a>
+[API] ReconcileContext API: Does getAST3 return AST with bindings?
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298238">298238</a>
+Unresolved import in superclass causes 'Cannot reduce the visibility of the inherited method' in subclass
+
+<a name="v_A29a"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M5 - January 5, 2010
+<br>Project org.eclipse.jdt.core v_A29a
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A29a">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293861">293861</a>
+Problem with refactoring when existing jar with invalid package names
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264112">264112</a>
+[Formatter] Wrap when necessary too aggressive on short qualifiers
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298250">298250</a>
+[1.6][compiler] NegativeArraySizeException in StackMapFrame.duplicate
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296998">296998</a>
+Unused imports should not prevent execution
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298243">298243</a>
+[formatter] Removing empty lines between import groups
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297546">297546</a>
+[formatter] Formatter removes blank after @see if reference is wrapped
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235781">235781</a>
+[compiler] difference to javac in definite unassignment analysis involving an exception within a constructor
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235783">235783</a>
+[eval] CodeSnippetParser and some 'CodeSnippet*' ast node does not seem up to date
 
-<a name="v_927"></a>
+<a name="v_A28"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - December 2, 2008
-<br>Project org.eclipse.jdt.core v_927
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_927">cvs</a>).
+Eclipse SDK 3.6M5 - December 14, 2009
+<br>Project org.eclipse.jdt.core v_A28
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A28">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196714">196714</a>
+[comment] InvalidInputException prevents the AbstractCommentMapper to retrieve tag element
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297757">297757</a>
+Cannot get bindings for IType corresponding to parameterized anonymous type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255640">255640</a>
+[spec] Methods Signature.toCharArray(..) have unclear precondition
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262898">262898</a>
+BufferChangedEvent must not have @noinstantiate
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=181682">181682</a>
+JavaConventions.validateJavaTypeName should list valid constants
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108784">108784</a>
+SourceMapper doesn't find name range of inner class constructors
+
+<a name="v_A27"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M4 - December 8, 2009 - 3.6.0 M4
+<br>Project org.eclipse.jdt.core v_A27
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A27">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297225">297225</a>
+[formatter] Indentation may be still wrong in certain circumstances after formatting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=293697">293697</a>
+JavaSearchBugTests.testBug286379c is failing randomly
+
+<a name="v_A26"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M4 - December 7, 2009
+<br>Project org.eclipse.jdt.core v_A26
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A26">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297045">297045</a>
+Weird tests failures in N20091204-2000 and N20091205-2000 builds
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293300">293300</a>
+[formatter] The formatter is still unstable in certain circumstances
+
+<a name="v_A25"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M4 - December 4, 2009
+<br>Project org.eclipse.jdt.core v_A25
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A25">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>
-Improved dead code detection by having it (optionally) tolerate trivial IF statement,
-such as <code>if (DEBUG) ...</code>. This extra option is defined by
-<code>JavaCore.COMPILER_PB_DEAD_CODE_IN_TRIVIAL_IF_STATEMENT</code>.
-<pre>
-* Compiler option ID: Reporting Dead Code Inside Trivial If Statement.
-* When enabled, the compiler will signal presence of dead code inside trivial IF statement, e.g. if (DEBUG)...
-* The severity of the problem is controlled with option {@link #COMPILER_PB_DEAD_CODE}.
-* 
-* Option id:"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"
-* Possible values:{ "enabled", "disabled" }
-* Default:"warning"
-</pre>
-</li>
-<li>Dead code detection warning also got enabled by default.
+<li>Match result can now report the access rules through a new API added on <code>TypeNameMatch</code>:
 <pre>
-* Compiler option ID: Reporting Dead Code.
-* When enabled, the compiler will issue an error or a warning if some non fatal dead code is detected. For instance, if (false) foo();
-* is not reported as truly unreachable code by the Java Language Specification. If this diagnostic is enabled, then the invocation of foo() is
-* going to be signaled as being dead code.
-* Option id:"org.eclipse.jdt.core.compiler.problem.deadCode"
-* Possible values:{ "error", "warning", "ignore" }
-* Default:"warning"
+/**
+ * Returns the accessibility of the type name match
+ *
+ * @see IAccessRule
+ *
+ * @return the accessibility of the type name which may be
+ * 		{@link IAccessRule#K_ACCESSIBLE}, {@link IAccessRule#K_DISCOURAGED}
+ * 		or {@link IAccessRule#K_NON_ACCESSIBLE}.
+ * 		The default returned value is {@link IAccessRule#K_ACCESSIBLE}.
+ *
+ * @since 3.6
+ */
+public abstract int getAccessibility();
 </pre>
+See bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296277">296277</a> for more details.
 </li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256329">256329</a>
-Impossible NPE in JavaModelManager.getOptions
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256882">256882</a>
-[compiler] Enable DeadCode detection by default
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255970">255970</a>
-test tear down failed causing cascade of failures
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207093">207093</a>
-Perf: adding a new top-level package is slow if many source files exist
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252948">252948</a>
-Unncessary compilation when adding packages with an existing path segment at the beginning
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256735">256735</a>
-Marker property value is too long for internal compiler error (java.lang.StackOverflowError)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227986">227986</a>
-Avoid duplicated strings in Java model
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256463">256463</a>
-[compiler] Support common debug pattern in unreachable code detection
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256679">256679</a>
-[perfs] SearchAllTypeNames performance tests are slower on eplnx2
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=228845">228845</a>
-[hierarchy] Type hierarchy should include subtypes in primary working copies
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252571">252571</a>
-[buildpath] External folder appears empty after workspace move
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256404">256404</a>
-Wrong handle identifier for external library folder
-
-<a name="v_926"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M4 - November 25, 2008
-<br>Project org.eclipse.jdt.core v_926
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_926">cvs</a>).
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296277">296277</a>
+[search] SearchEngine#searchAllTypeNames(.., TypeNameMatchRequestor,..) should report access rules
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296708">296708</a>
+[DOM/AST] clarify setters when createASTs(..) is used
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296629">296629</a>
+[quick fix] Cast quick fix not offered for method-local classes
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295948">295948</a>
+ElementImpl.hashCode throws an NPE
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660">296660</a>
+[compiler] Incorrect unused method warning from compiler
+
+<a name="v_A24"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M4 - December 1, 2009
+<br>Project org.eclipse.jdt.core v_A24
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A24">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>
-Added a new compiler warning to signal presence of dead code,  e.g. <code>if (false) deadCode(); </code>.
-This diagnosis is controlled by option: 
-<code>JavaCore.COMPILER_PB_DEAD_CODE</code> and produces a problem marker which ID is <code>IProblem.DeadCode</code> problem ID.
+<li>New API added to ignore method bodies inside AST tree. The new APIs are tagged as 3.5.2 as this code
+will be backported to 3.5.2:
 <pre>
-* Compiler option ID: Reporting Dead Code.
-* When enabled, the compiler will issue an error or a warning if some non fatal dead code is detected. For instance, if (false) foo();
-* is not reported as truly unreachable code by the Java Language Specification. If this diagnostic is enabled, then the invocation of foo() is
-* going to be signaled as being dead code.
-* Option id:"org.eclipse.jdt.core.compiler.problem.deadCode"
-* Possible values:{ "error", "warning", "ignore" }
-* Default:"ignore"
+org.eclipse.jdt.core.dom.ASTParser:
+	/**
+	 * Requests an abstract syntax tree without method bodies. 
+	 * 
+	 * When ignore method bodies is enabled, all method bodies are discarded.
+	 * This has no impact on the binding resolution.
+	 *
+	 * If a method contains local types, its method body will be retained.
+	 * This settings is not used if the kind used in setKind(int) is either 
+	 * K_EXPRESSION or K_STATEMENTS.
+	 * @since 3.5.2
+	 */
+	public void setIgnoreMethodBodies(boolean enabled);
+
+org.eclipse.jdt.core.ICompilationUnit:
+	/**
+	 * Constant indicating that a reconcile operation could ignore to parse the method bodies.
+	 * @see ASTParser#setIgnoreMethodBodies(boolean)
+	 * @since 3.5.2
+	 */
+	public static final int IGNORE_METHOD_BODIES = 0x08;
+
 </pre>
 </li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251504">251504</a>
-[index] Wrong indexes may be used while performing a search request
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=48399">48399</a>
-[compiler] Enhance unreachable code detection
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254825">254825</a>
-[javadoc] compile error when referencing outer param from inner class javadoc
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252555">252555</a>
-[javadoc] NPE on duplicate package-info
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251690">251690</a>
-[compiler] NPE if type collides with a package
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249134">249134</a>
-[compiler] error message (implement abstract method) not as intended
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154162">154162</a>
-[1.5][compiler] Uninformative error message for qualified enum constants in switch statement
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255974">255974</a>
-Abusive usage of InvalidInputException in the compiler
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251693">251693</a>
-NamingConventions.suggestXXXNames should call suggestVariableNames()
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255345">255345</a>
-Problems in new NamingConventions APIs
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255452">255452</a>
-[1.5][compiler] Eclipse allows forward reference in enum constructor
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288174">288174</a>
+[search] NullPointerException when searching for type references
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277643">277643</a>
+Generics compile error
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211">288211</a>
+APT uses a lot of memory
 
-<a name="v_925"></a>
+<a name="v_A23"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - November 18, 2008
-<br>Project org.eclipse.jdt.core v_925
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_925">cvs</a>).
+Eclipse SDK 3.6M4 - November 24, 2009
+<br>Project org.eclipse.jdt.core v_A23
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A23">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255501">255501</a>
-EncodingTests failing when run by itself
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255035">255035</a>
-[compiler] Internal compile error gets reported (NPE)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250297">250297</a>
-[compiler] NPE in org.eclipse.jdt.internal.compiler.problem.ProblemReporter.missingTypeInMethod(ProblemReporter.java:4925)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232558">232558</a>
-[compiler] += is not allowed between Object and String
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295698">295698</a>
+[1.5][compiler] ClassCastException in unchecked warning report
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295260">295260</a>
+Wrong warnings on Java.Compiler.Errors/Warnings "Redundant null check"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190737">190737</a>
+[compiler][null] missing 'cannot be null' warning within for loop
 
-<a name="v_924"></a>
+<a name="v_A22"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - November 10, 2008
-<br>Project org.eclipse.jdt.core v_924
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_924">cvs</a>).
+Eclipse SDK 3.6M4 - November 16, 2009
+<br>Project org.eclipse.jdt.core v_A22
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A22">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252868">252868</a>
-[batch][compiler] ConcurrentModificationException in org.eclipse.jdt.internal.compiler.batch.ClasspathJar.fetchLinkedJars
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236242">236242</a>
-[compiler][1.7] compiler difference to javac 7 involving parameterized uses of raw methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=211256">211256</a>
-[ast rewrite] whitespace missing between return and expression
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253891">253891</a>
-Incorrect tag closure in JavaModel javadoc
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252120">252120</a>
-[1.5][compiler] raw type diagnostic not coherent with javac one
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153429">153429</a>
+JUnit4 in Eclipse Testing Framework
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295238">295238</a>
+[formatter] The comment formatter add an unexpected new line in block comment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295175">295175</a>
+[formatter] Missing space before a string at the beginning of a line in a javadoc comment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294529">294529</a>
+The Scanner sometimes ignores the given offset if larger than the EOF.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294662">294662</a>
+ClassCastException while invoking quick assist
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294404">294404</a>
+-target jsr14 flags error on foreach over Collection that does not implement Iterable
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293955">293955</a>
+valid javadoc url set on user library, but still says no javadoc
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293443">293443</a>
+AbortCompilation when invoking content assist
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293711">293711</a>
+Clarify ICompilationUnit#getOwner() javadoc
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293615">293615</a>
+error message since v3.6.0M2: name clash by overriding generic methods
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294618">294618</a>
+[formatter] The formatter fails to format a compilation unit with deep nesting of html tags
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=248312">248312</a>
+[model] IMemberValuePair#getValue() should also work for negative numerals
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294731">294731</a>
+Specify value type of JAVADOC_LOCATION_ATTRIBUTE_NAME
 
-<a name="v_923"></a>
+<a name="v_A21"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M4 - November 4, 2008
-<br>Project org.eclipse.jdt.core v_923
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_923">cvs</a>).
+Eclipse SDK 3.6M4 - November 10, 2009
+<br>Project org.eclipse.jdt.core v_A21
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A21">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250211">250211</a>
-[search] Organize Imports Hangs
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241821">241821</a>
-[compiler] Multiple interfaces and incompatible return types
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251279">251279</a>
-[1.5][compiler] Covariant generics interfaces causes compile error
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294631">294631</a>
+[formatter] The formatter takes two passes to format a common sequence of html tags
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294500">294500</a>
+[formatter] MalformedTreeException when formatting an invalid sequence of <code> tags in a javadoc comment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294488">294488</a>
+Javadoc of ISourceReference#getSourceRange() should link to SourceRange#isAvailable(..)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199265">199265</a>
+[formatter] 3.3 Code Formatter mis-places commented-out import statements
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=241549">241549</a>
+[spec] IType#getFields/Initializers/Methods() should define order from class file
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275805">275805</a>
+creating a non-primary working copy causes typeHierarchyChanged event
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292510">292510</a>
+FUP of 292364: Error messages don't identify partial types precisely.
 
-<a name="v_922"></a>
+<a name="v_A20"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 29, 2008 - 3.5 MILESTONE 3
-<br>Project org.eclipse.jdt.core v_922
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_922">cvs</a>).
+Eclipse SDK 3.6M4 - November 3, 2009
+<br>Project org.eclipse.jdt.core v_A20
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A20">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252481">252481</a>
-[code assist] NPE in findAllTypes
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293384">293384</a>
+Eclipse erroneously reports method "is ambiguous for type"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002">285002</a>
+[compiler] visibility error for package private method
 
-<a name="v_921"></a>
+<a name="v_A19"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 28, 2008
-<br>Project org.eclipse.jdt.core v_921
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_921">cvs</a>).
+Eclipse SDK 3.6M3 - October 29, 2009 - 3.6M3
+<br>Project org.eclipse.jdt.core v_A19
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A19">cvs</a>).
 <h2>What's new in this drop</h2>
+This version was created to tentatively fix bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=293697">293697</a>
+but it occurs again in subsequent build. So, it has been reopened and moved to next version...
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252264">252264</a>
-Invalid classpath header messages should be logged in verbose mode only
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252392">252392</a>
-Missing jars referenced in the Class-Path: clause of a MANIFEST.MF file should not be reported as errors
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247845">247845</a>
-[misc] Errors in log from fetching Javadoc when working disconnected
 
-<a name="v_920"></a>
+<a name="v_A18"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 25, 2008
-<br>Project org.eclipse.jdt.core v_920
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_920">cvs</a>).
+Eclipse SDK 3.6M3 - October 28, 2009
+<br>Project org.eclipse.jdt.core v_A18
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A18">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>NamingConventions has now a more flexible API to suggest variable name: <code>NamingConventions.suggestVariableNames()</code>.<br>
-The same method can be used to suggest local, instance field, static field and constant field name.
-This method use a new specific heuristic to generate constant name with upper case and underscore (e.g. <code>CONSTANT_FIELD_NAME</code>).
-<pre>
-public static String[] suggestVariableNames(
-			int variableKind,
-			int baseNameKind,
-			String baseName,
-			IJavaProject javaProject,
-			int dim,
-			String[] excluded,
-			boolean evaluateDefault)
-</pre>
-</li>
-<li>NamingConventions has now an API to compute the name used to generate a variable name: <code>NamingConventions.getBaseName()</code>.<br>
-<pre>
-public static String getBaseName(
-			int variableKind,
-			String variableName,
-			IJavaProject javaProject)
-</pre>
-</li>
-<li>New options are added to specify the prefixes and suffixes of a constant field: <code>JavaCore.CODEASSIST_STATIC_FIELD_PREFIXES</code> and <code>JavaCore.CODEASSIST_STATIC_FIELD_SUFFIXES</code>.
-</li></ul>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250975">250975</a>
-[1.5][compiler] Stack overflow on static import.
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249785">249785</a>
-[javadoc][assist] Javadoc content assist after "@see #" does not work with deprecated member before
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249692">249692</a>
-The ImportRewriteAnalyzer does not honor a formatter setting
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251814">251814</a>
-[1.5][compiler] Dup Enum#valueOf(...) should keep the synthetic one
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248309">248309</a>
-[model] IAnnotatable#getAnnotations() does not work for standard annotations on binary members
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251518">251518</a>
-Tons of invalid API tooling errors when checking out jdt.core
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251356">251356</a>
-Fix for bug 146768 breaks JDT Refactoring and its test
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249027">249027</a>
-NPE in Engine if type collides with a package
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=85946">85946</a>
-NamingConventions.suggestFieldNames(..) does not consider 'final' modifier for constants
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38111">38111</a>
-[DCR] Make NamingConventions more flexible
-
-<a name="v_919"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 21, 2008
-<br>Project org.eclipse.jdt.core v_919
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_919">cvs</a>).
-<h2>What's new in this drop</h2>
-<ul>
-<li>The compiler is now better resilient with duplicate field/method definitions and will avoid secondary errors 
-detected when subsenquently using the offending field/method.
-</li></ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251523">251523</a>
-[1.5][compiler] Should still flag Enum#valueOf override
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246276">246276</a>
-NPE during code completion
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249844">249844</a>
-IBinding#getJavaElement() always returns null for IAnnotationBindings declared in annotation or enum types
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=146768">146768</a>
-[compiler] Should be more resilient with duplicate fields/methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251091">251091</a>
-Covariant return types not honored for combined extension and implementation
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251079">251079</a>
-Got error dialog after switching default JRE
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=293496">293496</a>
+Adding the serialVersionUID field doesn't work when tab size is 0
 
-<a name="v_918"></a>
+<a name="v_A17"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 16, 2008
-<br>Project org.eclipse.jdt.core v_918
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_918">cvs</a>).
+Eclipse SDK 3.6M3 - October 26, 2009
+<br>Project org.eclipse.jdt.core v_A17
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A17">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>New API for the ASTVisitor class: <code>org.eclipse.jdt.core.dom.ASTVisitor.preVisit2(ASTNode)</code>.<br>
-New API type: <code>org.eclipse.jdt.core.dom.NodeFinder</code>.<br>
-All details are available in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=53024">53024</a>.<br>
-These new APIs are still under discussion and are released for JDT/UI adoption.</li>
+<li>Reverted change for bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263564">263564</a>.</li>
 </ul>
-
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250946">250946</a>
-Bogus jar file is added to the project build path
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250022">250022</a>
-Java Model Exception: Java Model Status when getting code assist in debug detail formatter dialog
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=53024">53024</a>
-[DOM] Move NodeFinder to a non-internal package
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250753">250753</a>
-[formatter] Insert space between empty braces in array initializers ignored without "Keep empty array initializer on one line"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248319">248319</a>
-[compiler][1.5] Valid Java source produces class file that doesn't verify (VerifyError, javac compiles correctly)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249567">249567</a>
-Incorrect behavior of Util.getUnresolvedJavaElement(...) method
 
-<a name="v_917"></a>
+<a name="v_A16"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 14, 2008
-<br>Project org.eclipse.jdt.core v_917
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_917">cvs</a>).
+Eclipse SDK 3.6M3 - October 25, 2009
+<br>Project org.eclipse.jdt.core v_A16
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A16">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Duplicate classpath entries are no longer reported if they are duplicate because of the classpath resolution
-      (e.g. if two classpath containers add the same entry to the resolved classpath).
-       Duplicate classpath entries at the raw classpath level are still reported.
-       See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=175226">bug 175226</a> for details.
-</li>
-<li>
-Added a new compiler warning to report a missing hashCode() method when overriding the equals() method from Object. 
-This diagnosis is controlled by option: 
-<code>JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD</code> and produces a problem marker which ID is
-<code>IProblem.MissingHashCodeMethod</code> problem ID.
-<pre>
-  Compiler option ID: Reporting Missing HashCode Method.
-  When enabled, the compiler will issue an error or a warning if a type
-  overrides Object.equals(Object) but does not override hashCode().
-  Option id: "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"
-  Possible values: { "error", "warning", "ignore" }
-  Default: "ignore"
-</pre>
-</li>
-<li>The "Class-Path:" clause of a jar manifest is now honored in the Java model. Jars referenced by "Class-Path:" are now automatically
-      added to the build path. See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198572">bug 198572</a> for details.</li>
-<li>Code Select search types outside the current project scope if no types are found in this scope</li>
-<li>Code Assist operation can be called with a progress monitor:
-<pre>
-public interface ICodeAssist {
-	/**
-	 * Performs code completion at the given offset position in this compilation unit,
-	 * reporting results to the given completion requestor. The <code>offset</code>
-	 * is the 0-based index of the character, after which code assist is desired.
-	 * An <code>offset</code> of -1 indicates to code assist at the beginning of this
-	 * compilation unit.
-	 * It considers types in the working copies with the given owner first. In other words,
-	 * the owner's working copies will take precedence over their original compilation units
-	 * in the workspace.
-	 * <p>
-	 * Note that if a working copy is empty, it will be as if the original compilation
-	 * unit had been deleted.
-	 * </p>
-	 *
-	 * @param offset the given offset position
-	 * @param requestor the given completion requestor
-	 * @param owner the owner of working copies that take precedence over their original compilation units
-	 * @exception JavaModelException if code assist could not be performed. Reasons include:<ul>
-	 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
-	 *  <li> The position specified is < -1 or is greater than this compilation unit's
-	 *      source length (INDEX_OUT_OF_BOUNDS)
-	 * </ul>
-	 *
-	 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
-	 * @since 3.0
-	 * @deprecated Use {@link #codeComplete(int, CompletionRequestor, WorkingCopyOwner)} instead.
-	 */
-	void codeComplete(int offset, ICompletionRequestor requestor, WorkingCopyOwner owner)
-		throws JavaModelException;
 
-	/**
-	 * Performs code completion at the given offset position in this compilation unit,
-	 * reporting results to the given completion requestor. The <code>offset</code>
-	 * is the 0-based index of the character, after which code assist is desired.
-	 * An <code>offset</code> of -1 indicates to code assist at the beginning of this
-	 * compilation unit.
-	 * <p>
-	 *
-	 * @param offset the given offset position
-	 * @param requestor the given completion requestor
-	 * @exception JavaModelException if code assist could not be performed. Reasons include:<ul>
-	 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
-	 *  <li> The position specified is < -1 or is greater than this compilation unit's
-	 *      source length (INDEX_OUT_OF_BOUNDS)
-	 * </ul>
-	 *
-	 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
-	 * @since 3.0
- 	 */
-	void codeComplete(int offset, CompletionRequestor requestor)
-		throws JavaModelException;
-}
-
-public interface IType {
-	/**
-	 * Do code completion inside a code snippet in the context of the current type.
-	 *
-	 * If the type can access to his source code and the insertion position is valid,
-	 * then completion is performed against source. Otherwise the completion is performed
-	 * against type structure and given locals variables.
-	 *
-	 * @param snippet the code snippet
-	 * @param insertion the position with in source where the snippet
-	 * is inserted. This position must not be in comments.
-	 * A possible value is -1, if the position is not known.
-	 * @param position the position within snippet where the user
-	 * is performing code assist.
-	 * @param localVariableTypeNames an array (possibly empty) of fully qualified
-	 * type names of local variables visible at the current scope
-	 * @param localVariableNames an array (possibly empty) of local variable names
-	 * that are visible at the current scope
-	 * @param localVariableModifiers an array (possible empty) of modifiers for
-	 * local variables
-	 * @param isStatic whether the current scope is in a static context
-	 * @param requestor the completion requestor
-	 * @param monitor the progress monitor used to report progress
-	 * @exception JavaModelException if this element does not exist or if an
-	 *		exception occurs while accessing its corresponding resource.
-	 * @since 3.5
-	 */
-	void codeComplete(
-		char[] snippet,
-		int insertion,
-		int position,
-		char[][] localVariableTypeNames,
-		char[][] localVariableNames,
-		int[] localVariableModifiers,
-		boolean isStatic,
-		CompletionRequestor requestor,
-		IProgressMonitor monitor)
-		throws JavaModelException;
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=293240">293240</a>
+[formatter] 'insert_space_before_opening_brace_in_array_initializer' preference may be reset in certain circumstances
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263564">263564</a>
+API to know when default compiler preference settings have been altered
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=289385">289385</a>
+Investigate comment in performance tests
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=286379">286379</a>
+[search] Problem while searching class
 
-	/**
-	 * Do code completion inside a code snippet in the context of the current type.
-	 * It considers types in the working copies with the given owner first. In other words,
-	 * the owner's working copies will take precedence over their original compilation units
-	 * in the workspace.
-	 * <p>
-	 * Note that if a working copy is empty, it will be as if the original compilation
-	 * unit had been deleted.
-	 * </p><p>
-	 * If the type can access to his source code and the insertion position is valid,
-	 * then completion is performed against source. Otherwise the completion is performed
-	 * against type structure and given locals variables.
-	 * </p>
-	 *
-	 * @param snippet the code snippet
-	 * @param insertion the position with in source where the snippet
-	 * is inserted. This position must not be in comments.
-	 * A possible value is -1, if the position is not known.
-	 * @param position the position with in snippet where the user
-	 * is performing code assist.
-	 * @param localVariableTypeNames an array (possibly empty) of fully qualified
-	 * type names of local variables visible at the current scope
-	 * @param localVariableNames an array (possibly empty) of local variable names
-	 * that are visible at the current scope
-	 * @param localVariableModifiers an array (possible empty) of modifiers for
-	 * local variables
-	 * @param isStatic whether the current scope is in a static context
-	 * @param requestor the completion requestor
-	 * @param owner the owner of working copies that take precedence over their original compilation units
-	 * @param monitor the progress monitor used to report progress
-	 * @exception JavaModelException if this element does not exist or if an
-	 *		exception occurs while accessing its corresponding resource.
-	 * @since 3.5
-	 */
-	void codeComplete(
-		char[] snippet,
-		int insertion,
-		int position,
-		char[][] localVariableTypeNames,
-		char[][] localVariableNames,
-		int[] localVariableModifiers,
-		boolean isStatic,
-		CompletionRequestor requestor,
-		WorkingCopyOwner owner,
-		IProgressMonitor monitor)
-		throws JavaModelException;
-}
+<a name="v_A15"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M3 - October 20, 2009
+<br>Project org.eclipse.jdt.core v_A15
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A15">cvs</a>).
+<h2>What's new in this drop</h2>
 
-public interface IEvaluationContext {
-	/**
-	 * Performs a code completion at the given position in the given code snippet,
-	 * reporting results to the given completion requestor.
-	 * <p>
-	 * Note that code completion does not involve evaluation.
-	 * <p>
-	 *
-	 * @param codeSnippet the code snippet to complete in
-	 * @param position the character position in the code snippet to complete at,
-	 *   or -1 indicating the beginning of the snippet
-	 * @param requestor the code completion requestor capable of accepting all
-	 *    possible types of completions
-	 * @param monitor the progress monitor used to report progress
-	 * @exception JavaModelException if code completion could not be performed. Reasons include:
-	 *  <ul>
-	 *	  <li>The position specified is less than -1 or is greater than the snippet's
-	 *	    length (INDEX_OUT_OF_BOUNDS)</li>
-	 *  </ul>
-	 * @since 3.5
-	 */
-	public void codeComplete(
-		String codeSnippet,
-		int position,
-		CompletionRequestor requestor,
-		IProgressMonitor monitor)
-		throws JavaModelException;
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=292350">292350</a>
+[1.5][compiler] Compiler error: ambiguous method since 3.5.1 using generics and interface inheritance
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=292364">292364</a>
+[internal] Type name in CastExpression not treated as Type name.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292428">292428</a>
+Internal compiler error: NullPointerException at org.eclipse.jdt.internal.compiler.ast.CastExpression.checkUnsafeCast(CastExpression.java:333)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291985">291985</a>
+[compiler][jsr14] Translating Enum with jsr14 target: ECJ causes a runtime error while Sun compiler works fine
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292240">292240</a>
+Compiler error on implementation of raw sub interface
 
-	/**
-	 * Performs a code completion at the given position in the given code snippet,
-	 * reporting results to the given completion requestor.
-	 * It considers types in the working copies with the given owner first. In other words,
-	 * the owner's working copies will take precedence over their original compilation units
-	 * in the workspace.
-	 * <p>
-	 * Note that if a working copy is empty, it will be as if the original compilation
-	 * unit had been deleted.
-	 * </p>
-	 * <p>
-	 * Note that code completion does not involve evaluation.
-	 * <p>
-	 *
-	 * @param codeSnippet the code snippet to complete in
-	 * @param position the character position in the code snippet to complete at,
-	 *   or -1 indicating the beginning of the snippet
-	 * @param requestor the code completion requestor capable of accepting all
-	 *    possible types of completions
-	 * @param owner the owner of working copies that take precedence over their original compilation units
-	 * @param monitor the progress monitor used to report progress
-	 * @exception JavaModelException if code completion could not be performed. Reasons include:
-	 *  <ul>
-	 *	  <li>The position specified is less than -1 or is greater than the snippet's
-	 *	    length (INDEX_OUT_OF_BOUNDS)</li>
-	 *  </ul>
-	 * @since 3.5
-	 */
-	public void codeComplete(
-		String codeSnippet,
-		int position,
-		CompletionRequestor requestor,
-		WorkingCopyOwner owner,
-		IProgressMonitor monitor)
-		throws JavaModelException;
-}
-</pre>
-</li>
-</ul>
+<a name="v_A14"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M3 - October 13, 2009
+<br>Project org.eclipse.jdt.core v_A14
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A14">cvs</a>).
+<h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250685">250685</a>
-[assist] Code assist can bot be canceled when search indexes are not ready
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250083">250083</a>
-[model] Search indexes are not correctly updated
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=175226">175226</a>
-[buildpath] Build path contains duplicate entry
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38751">38751</a>
-Optionally show compiler warning when equals() is overriden but hashCode() is not
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249930">249930</a>
-Deadlock with JavaModelManager$PerProjectInfo
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250398">250398</a>
-[assist] Faults in javadoc of IType#codeComplete
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247941">247941</a>
-[assist] Add progress monitor to code completion
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243820">243820</a>
-[1.5][compiler] Method has same erasure as an interface method but is not considered to implement it
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232880">232880</a>
-[select] Navigate to classes in workspace even if not on classpath
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198572">198572</a>
-eclipse does not respect class-path manifest of external jars
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291391">291391</a>
+update the Bundle-Version of the JDT Core Batch Compiler (ecj) from 3.3.0 to 3.6.*
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284280">284280</a>
+[1.5][compiler] Error on use generic interface in abstract super class
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286228">286228</a>
+[1.5][compiler] Generics inconsistencies possible regression
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286601">286601</a>
+[formatter] Code formatter formats anonymous inner classes wrongly when 'Never join lines' is on
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=215139">215139</a>
+[search] More options for HierarchyScope
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291472">291472</a>
+[1.5][compiler] Access to a generic method is compiled incorrectly
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283539">283539</a>
+NamingConventions.suggestVariableNames doesn't work if name contains '_'
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280784">280784</a>
+[batch] Allow access restrictions to be reported as errors
 
-<a name="v_916"></a>
+<a name="v_A13"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M3 - October 7, 2008
-<br>Project org.eclipse.jdt.core v_916
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_916">cvs</a>).
+Eclipse SDK 3.6M3 - October 6, 2009
+<br>Project org.eclipse.jdt.core v_A13
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A13">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>
-The new compiler warning (added during 3.5M1) to signal absence of <code>synchronized</code> modifier 
-when overriding a synchronized method got disabled by default.
-<pre>
-  Compiler option ID: Reporting Missing Synchronized Modifier On Inherited Method.
-  When enabled, the compiler will issue an error or a warning if a method
-  overrides a synchronized method without having a synchronized modifier.
-  Option id: "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"
-  Possible values: { "error", "warning", "ignore" }
-  Default: "ignore"
-</pre>
-</li>
+<li>Reverted fix for <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=106478">106478</a>.</li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249140">249140</a>
-[1.5][compiler] asymmetric errors with covariant inherited methods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244762">244762</a>
-[1.5][compiler] Internal compiler error java.lang.NullPointerException after importing file
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227527">227527</a>
-[1.5][compiler] Useless error message for local enum
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227530">227530</a>
-[1.5][compiler] Incomplete error message for annotation inside a member type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247981">247981</a>
-save on a single file (any type - java source, text file  
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249584">249584</a>
-CompilerParticipant constants should be marked as such
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161977">161977</a>
-[compiler] Identical branches in org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding#syntheticMethods
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249535">249535</a>
-[compiler] Consider disabling the syncOverride warning/error by default
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247666">247666</a>
-[1.5][compiler] AIOOBE inside missing type reporting
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249321">249321</a>
-IPackagerFragmentRoot#getRawClasspathEntry() returns resolved ".." path
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249107">249107</a>
-[compiler] IllegalAccessError in presence of synthetic field access
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247953">247953</a>
-[1.5][compiler] IllegalAccessError: tried to access class p.IA from class X
-
-<a name="v_915"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M3 - September 30, 2008
-<br>Project org.eclipse.jdt.core v_915
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_915">cvs</a>).
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291322">291322</a>
+Test errors when running JDT Core tests on Windows 7
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282770">282770</a>
+[compiler] Dead code detection should have specific @SuppressWarnings
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290028">290028</a>
+Use IResource#setDerived(boolean, IProgressMonitor) instead of IResource#setDerived(boolean)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287607">287607</a>
+[1.5][compiler] cast of inner of generic enclosing type are not reported as unsafe
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288749">288749</a>
+Redundant superinterface not flagged inside one declaration
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290905">290905</a>
+[formatter] Certain formatter pref constellation cause endless loop ==> OOME
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285124">285124</a>
+serialVersionUID still causes error/warning
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290877">290877</a>
+[DOM] If using a tag named '@enum' the ASTParser ignores this
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281575">281575</a>
+Eclipse hangs in SourceMapper while doing java proposals
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290470">290470</a>
+[JSR199][compiler] JDT compiler not jsr199 compatible.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290730">290730</a>
+Rewriting SwitchStatement throws NPE
+
+<a name="v_A12"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M3 - September 29, 2009
+<br>Project org.eclipse.jdt.core v_A12
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A12">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Added support for ".." in classpath for library, variable and container entries.
-		See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=57732">bug 57732</a> for details.</li>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248680">248680</a>
-Error when create a new element (class, interface,...)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=57732">57732</a>
-[buildpath] relative build classpath leading outside of eclipse workspace
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247612">247612</a>
-[compiler] Compiler could avoid allocating field bindings for receiver type change
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247757">247757</a>
-[model] Move a class to root package, lose block comment at the top
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241400">241400</a>
-[LinkedResources] Random errors when changing project settings
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248313">248313</a>
-[DOM] Javadoc bug in StringLiteral#setLiteralValue(String)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248308">248308</a>
-Typo in Javadoc of IBinding#getAnnotations()
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248243">248243</a>
-Add apt.pluggable.core as x-friend for jdt.core
-
-<a name="v_914"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M3 - September 23, 2008
-<br>Project org.eclipse.jdt.core v_914
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_914">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247835">247835</a>
-SearchPattern extends non-API type InternalSearchPattern
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245858">245858</a>
-CompletionProposal extends non-API type InternalCompletionProposal
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247688">247688</a>
-SearchDocument extends non-API type InternalSearchDocument
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245860">245860</a>
-BuildContext extends non-API type CompilationParticipantResult
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247292">247292</a>
-[compiler] Compiler should avoid allocating method bindings for receiver type change
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245835">245835</a>
-CompletionContext extends non-API type InternalCompletionContext
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247618">247618</a>
-*ReferenceMatch extends non-API type InternalReferenceMatch
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247307">247307</a>
-[1.5][compiler] Array clone return type should be governed by source level instead of compliance
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=128563">128563</a>
-[compiler] Inner class compiles but IllegalAccessError if splitted with two output folders
-
-<a name="v_913"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M2 - September 13, 2008 - 3.5 MILESTONE 2
-<br>Project org.eclipse.jdt.core v_913
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_913">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246955">246955</a>
-Add API compatibility filter for ITypeRoot
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=211054">211054</a>
-[javadoc] @see package reference should raise a warning except for the package declaration
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692">243692</a>
-[buildpath] Cannot set Attached Source from Class File Editor
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207765">207765</a>
-[javadoc] Javadoc warning on @see reference could be improved
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247118">247118</a>
-Endless loop in Signature.encodeQualifiedName
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244164">244164</a>
-[1.5][compiler] Missing implementation error when referencing a generic field with error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233187">233187</a>
-[javadoc] partially qualified inner types  should be warned
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=170637">170637</a>
-[javadoc] incorrect warning about missing parameter javadoc when using many links
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=142990">142990</a>
-[model] Rename operation should not use workspace root rule
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246712">246712</a>
-[javadoc] Unexpected warning about missing parameter doc in case of @inheritDoc
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246682">246682</a>
-Inconsistent parser/scanner encoding for commentStart position
-
-<a name="v_912"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M2 - September 9, 2008
-<br>Project org.eclipse.jdt.core v_912
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_912">cvs</a>).
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287676">287676</a>
+[1.5][compiler] Useless cast warning not emited
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290563">290563</a>
+add specification for fine grain search flags
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290376">290376</a>
+Errant "Comparing identical expressions" warning with assignment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287592">287592</a>
+[1.5][compiler] Wrong ambiguous compilation error
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290049">290049</a>
+Reconciling a compilation unit does not return an AST with bindings when it should (probably)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290034">290034</a>
+Effects of @SuppressWarnings("unchecked") are broader in Eclipse than in javac
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267561">267561</a>
+[evaluation] LocalEvaluationEngine does not accept primitive types
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=163194">163194</a>
+[1.6] compiler should warn about missing @Override annotation for interface method
+
+<a name="v_A11"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.6M3 - September 22, 2009
+<br>Project org.eclipse.jdt.core v_A11
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A11">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>Introduced a marker comment (<code>$FALL-THROUGH$</code>) for silencing compiler diagnosis for switch case 
-falling through next case. This allows to document intended fall through situations in the code.
-Note: The marker comment can also be a block comment, i.e. <code>/* $FALL-THROUGH$ */</code>.
-<br>e.g. 
-<pre>
-    switch(val) {
-        case 0 :
-            doit(0);
-            // $FALL-THROUGH$ - also fall into next case
-       case 1:
-            doit(1);
-            break;
-    }
-</pre>
-</li>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245257">245257</a>
-[compiler] Allow to suppress fall-through warning
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240034">240034</a>
-[buildpath] Eclipse ignores .classpath file if it is encoded in UTF8 with BOM
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245963">245963</a>
-deprecate unused JavaCore.COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237772">237772</a>
-[implementation] Deadlock in JDT causing UI freeze
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=114116">114116</a>
-[assist] name suggestion for collections
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246066">246066</a>
-[batch] Redundant superinterface warning cannot be activated
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245973">245973</a>
-[compiler] Problem irritant cannot exceed 64bit limit
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244849">244849</a>
-[implementation] Memory leak in DeltaProcessingState#externalTimeStamps ?
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207657">207657</a>
-[search] Exception when refactoring member type to top-level.
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243023">243023</a>
-[content assist] RuntimeException thrown by JavaTypeCompletionProposalComputer
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289892">289892</a>
+[compiler] NPE during binaryTypeBinding field initialization
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287833">287833</a>
+[formatter] Formatter removes the first character after the * in the <pre> tag
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=238943">238943</a>
+SortElementsOperation doesn't use project specific settings
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288621">288621</a>
+[1.5][compiler] Creating type hierarchy failed when pressing F4
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289538">289538</a>
+[1.5][compiler] compiler fails to generate correct code for private constructor in inner class
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289639">289639</a>
+Problems opening perspective JavaPerspective, NPE on JavaModelManager.containersReset()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289516">289516</a>
+Annotations (visible and invisible) should be preserved with target jsr14
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289576">289576</a>
+[1.5][compiler] Compiler changes 'private' modifier on methods with annotated parameter
 
-<a name="v_911"></a>
+<a name="v_A10"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M2 - September 2, 2008
-<br>Project org.eclipse.jdt.core v_911
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_911">cvs</a>).
+Eclipse SDK 3.6M2 - September 14, 2009 - 3.6M2
+<br>Project org.eclipse.jdt.core v_A10
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A10">cvs</a>).
 <h2>What's new in this drop</h2>
-<ul>
-<li>
-Added a new compiler warning to signal absence of <code>synchronized</code> modifier when overriding a synchronized method. 
-This diagnosis is controlled by option: 
-<code>JavaCore.COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD</code> and produces a problem marker which ID is
-<code>IProblem.MissingSynchronizedModifierInInheritedMethod</code> problem ID;
-it may be suppressed using <code>@SuppressWarnings("super")</code>.
-<pre>
-  Compiler option ID: Reporting Missing Synchronized Modifier On Inherited Method.
-  When enabled, the compiler will issue an error or a warning if a method
-  overrides a synchronized method without having a synchronized modifier.
-  Option id: "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"
-  Possible values: { "error", "warning", "ignore" }
-  Default: "warning"
-</pre>
-</li>
-</ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=222900">222900</a>
-[Javadoc] Missing description is warned if valid description is on a new line
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=186858">186858</a>
-Intermittent failure of org.eclipse.jdt.core.tests.model.ExclusionPatternsTests#testCreateExcludedPackage2
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237453">237453</a>
-[formatter] Save actions fails to remove excess new lines when set to "format edited lines"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245830">245830</a>
-ClasspathEntry illegally instantiates AssertionFailedException
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242029">242029</a>
-Multiple source attachment paths don't work when source attachment path points to a folder
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234583">234583</a>
-[formatter] Code formatter should adapt edits instead of regions
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245576">245576</a>
-No error message for updating read-only .classpath file
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245563">245563</a>
-npe in reconciler
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245518">245518</a>
-ICompilationUnit.createType failing with unexpected exception
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245435">245435</a>
-[1.5][compiler] "Value for annotation attribute must be a constant expression" error on valid constant expression
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245348">245348</a>
-[DOM] Annotations are recognized by ASTParser even in COMPILER_SOURCE is set < 1.5
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241751">241751</a>
-Using a ClasspathContainerInitializer requires the use of workspace lock
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242448">242448</a>
-[1.5][compiler] Sun's javac compiles the following but jdt does not
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239066">239066</a>
-[compiler] Overriding a Synchronized Method with a Non-synchronized Method
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288148">288148</a>
+[perfs] Comments applied for performance tests may be obsolete
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289247">289247</a>
+[1.5][compiler]Detecting duplicate methods should not consider return type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288920">288920</a>
+[compiler] NPE renaming run() method
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288698">288698</a>
+Cannot create type hierarchy for abstract types when they have inline descendants and *.class* in project name
 
-<a name="v_910"></a>
+<a name="v_A09"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M2 - August 26, 2008
-<br>Project org.eclipse.jdt.core v_910
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_910">cvs</a>).
+Eclipse SDK 3.6M2 - September 1, 2009
+<br>Project org.eclipse.jdt.core v_A09
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A09">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239096">239096</a>
-Implementation oddness in TypeHierarchy#getAllSuper*(IType)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244549">244549</a>
-JavaCore.create(String handleIdentifier) fails for local variable with parameterized type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241687">241687</a>
-[formatter] problem formatting block comments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240686">240686</a>
-[formatter] Formatter do unexpected things
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242933">242933</a>
-[1.5] NullPointerException for @Range(min=1, max=9999999999999999)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241345">241345</a>
-[formatter] Didn't Format HTML tags is unavailable
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242646">242646</a>
-deadlock on org.eclipse.jdt.internal.core.ExternalFoldersManager
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287009">287009</a>
+Inner Annotation Checks are Missing
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287701">287701</a>
+[dom] Length of Assignment should not include whitespace
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285230">285230</a>
+[performance] Duplicate buffers created for internal classes
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286391">286391</a>
+[compiler] jsr14 target behavior changed between ECJ 3.4.2 and ECJ 3.5
 
-<a name="v_909"></a>
+<a name="v_A08"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M2 - August 19, 2008
-<br>Project org.eclipse.jdt.core v_909
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_909">cvs</a>).
+Eclipse SDK 3.6M2 - August 25, 2009
+<br>Project org.eclipse.jdt.core v_A08
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A08">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244477">244477</a>
-[formatter] Formatter fails on special Java array construct
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287462">287462</a>
+[formatter] new failures in last 2 nightly builds
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285565">285565</a>
+[inline] Inlining constant or local variables causes exceptions with tab width 0
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285799">285799</a>
+HashtableOfObject rehashes and grows buffer on removeKey()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286912">286912</a>
+[formatter] Never join lines preferences makes the formatter unstable in certain circumstances
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286668">286668</a>
+[formatter] 'Never Join Lines' joins lines that are split on method invocation
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=248661">248661</a>
+Axis2:  Missing required libraries in Axis 2 WS Client Projects
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286918">286918</a>
+[javadoc] Compiler should warn when @see and @link tag references in package-info.java don't have fully qualified names
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285466">285466</a>
+[3.5 regression] fails to build IcedTea, works with 3.4.x
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286956">286956</a>
+NPE when asking to externalize constant
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281609">281609</a>
+[javadoc] "Javadoc: Invalid reference" warning for @link to Java package
 
-<a name="v_908"></a>
+<a name="v_A07"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M2 - August 11, 2008
-<br>Project org.eclipse.jdt.core v_908
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_908">cvs</a>).
+Eclipse SDK 3.6M2 - August 18, 2009
+<br>Project org.eclipse.jdt.core v_A07
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A07">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239833">239833</a>
-[compiler] Odd compiler error message "Illegal modifier for the method ..."
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243715">243715</a>
-[DOM] Parser.createASTs() throws exception on 'illogical' JavaDoc
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243653">243653</a>
-ASTRewrite is incorrectly documented
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286840">286840</a>
+ClasspathJar getPath() should return a unique path
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=254738">254738</a>
+NPE in HierarchyResolver.setFocusType
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276294">276294</a>
+Error does not go away after it is resolved
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284785">284785</a>
+[1.5][compiler] Eclipse compiler shows error on javac-valid construct: varargs plus overload
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286405">286405</a>
+Default value character of annotations in ClassFileEditor are badly printed
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286407">286407</a>
+[Model] IMemberValuePair don't return the right value for java.lang.annotation.RetentionPolicy annotations
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285701">285701</a>
+[1.5][compiler] Internal Compiler Error - ArrayIndexOutOfBoundsException
 
-<a name="v_907"></a>
+<a name="v_A06"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - August 6, 2008 - 3.5 MILESTONE 1
-<br>Project org.eclipse.jdt.core v_907
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_907">cvs</a>).
+Eclipse SDK 3.6M1 - August 3, 2009 - 3.6M1
+<br>Project org.eclipse.jdt.core v_A06
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A06">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242961">242961</a> [DOM] ITypeBinding.getDeclaredFields returns empty results if any field has undefined type
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284948">284948</a>
+[1.6][compiler] Java annotations are broken in editor when used on interface methods
 
-<a name="v_906"></a>
+<a name="v_A05"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 31, 2008
-<br>Project org.eclipse.jdt.core v_906
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_906">cvs</a>).
+Eclipse SDK 3.6M1 - July 30, 2009
+<br>Project org.eclipse.jdt.core v_A05
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A05">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242292">242292</a>
-call to createAST(..) throws IllegalStateException when parser source is not char[]
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218500">218500</a>
-[dom] bug in ITypeBinding.getQualifiedName for member of local type
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276526">276526</a>
+[content assist] Error - Type Duplicate interface Iterable for the type TestClass
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191176">191176</a>
+JavaProject#getOption optimizations
 
-<a name="v_905"></a>
+<a name="v_A04"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 28, 2008
-<br>Project org.eclipse.jdt.core v_905
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_905">cvs</a>).
+Eclipse SDK 3.6M1 - July 28, 2009
+<br>Project org.eclipse.jdt.core v_A04
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A04">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236096">236096</a>
-Incorrectly allow raw return type in overridden method
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238014">238014</a>
-[1.5][compiler] Missing "name clash" error?
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238817">238817</a>
-[1.5][compiler] Unexpected nameclash reported
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237418">237418</a>
-deadlock between auto-build/refresh right after startup
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241841">241841</a>
-[compiler] Compilation error 'incompatible types' should use full qualified class names
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239439">239439</a>
-[1.5][compiler] Behavior change for binding for parameterized type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=106821">106821</a>
-[assist] Code assist: Deprecated elements not marked
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=209639">209639</a>
-codeSelect does not resolve correct key for implicit method type arguments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239117">239117</a>
-AST overlapping source ranges in recovered AST
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=230830">230830</a>
-[select] Search doesn't find annotated local variable declaration with error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=229092">229092</a>
-[batch compiler] error reporting is non-deterministic
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=261909">261909</a>
+ClassFileReader.getModifiers() answers funny bits
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283225">283225</a>
+[1.6][compiler] classfile versus source conformance check too strict
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284679">284679</a>
+[formatter] empty single semi statement prevent enum elements format
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284482">284482</a>
+[compiler] Collision cases not detected
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284431">284431</a>
+Different inherited thrown exception clauses are not properly handled
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=133911">133911</a>
+type.move() returns unclear exception "invalid destination"
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270436">270436</a>
+[assist] Interface type proposed where only class is legal
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=210385">210385</a>
+[compiler] ProblemReporter#getProblemCategory misbehaves when passed ProblemSeverities.Ignore as severity parameter
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282891">282891</a>
+[compiler] "Comparing identical expressions" warning sometimes invalid
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282869">282869</a>
+[compiler] Unnecessary cast warning for cast from char to int
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270437">270437</a>
+[assist] Completion proposal leads to cycle detected error
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=217443">217443</a>
+Documentation for JavaCore#CORE_ENCODING does not match the observed behavior
 
-<a name="v_904"></a>
+<a name="v_A03"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 21, 2008
-<br>Project org.eclipse.jdt.core v_904
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_904">cvs</a>).
+Eclipse SDK 3.6M1 - July 21, 2009
+<br>Project org.eclipse.jdt.core v_A03
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A03">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=169682">169682</a>
-In class that compiles and runs when ctrl+space is pressed I get "No completions available"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240815">240815</a>
-[DOM] CCE in AST#resolveWellKnownType(..)  for java.lang.Boolean without rt.jar
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235727">235727</a>
-misspelling in syntax error message
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236193">236193</a>
-DiagnoseParser has unreachable code
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283467">283467</a>
+[formatter] wrong indentation with 'Never join lines' selected
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281776">281776</a>
+Should not warn for comparison of identical expression with float type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282768">282768</a>
+[compiler] Dead code detection should ignore trivial case for ternary if operator
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283133">283133</a>
+[formatter] IAE when pasting a snippet
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283299">283299</a>
+Complete SourceRange API
 
-<a name="v_903"></a>
+<a name="v_A02"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java Development Tooling Core</h1>
+Eclipse SDK 3.6M1 - July 13, 2009
+<br>Project org.eclipse.jdt.core v_A02
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A02">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added new API type org.eclipse.jdt.core.SourceRange</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=271296">271296</a>
+[assist] void typed proposal may not be appropriate in many contexts
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281871">281871</a>
+[content assist] The extension took too long to return from the 'computeCompletionProposals()' operation
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281598">281598</a>
+[assist] Problems during content assist - if project has empty zip file in classpath
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235294">235294</a>
+[formatter] javadoc for DefaultCodeFormatterConstants#FORMATTER_ALIGNMENT_FOR_ASSIGNMENT cites a non-API constant
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280497">280497</a>
+Incorrect null result for IJavaProject.getClasspathEntryFor(IPath)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=204777">204777</a>
+Clarify documentation for ITypeHierarchy created on interface types
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=88265">88265</a>
+Make SourceRange API
+
+<a name="v_A01"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 15, 2008
-<br>Project org.eclipse.jdt.core v_903
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_903">cvs</a>).
+Eclipse SDK 3.6M1 - July 7, 2009
+<br>Project org.eclipse.jdt.core v_A01
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A01">cvs</a>).
 <h2>What's new in this drop</h2>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237469">237469</a>
-[assist] AbortCompilation in log during normal editing
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240214">240214</a>
-[compiler] final bit should be cleared from class file access flag for anonymous class
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240349">240349</a>
-Improve disassembler output
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240206">240206</a>
-ITypeRoot should have @noimplement tag
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237937">237937</a>
-[javadoc] Wrong "Javadoc: Malformed link reference" if href label contains //
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237931">237931</a>
-[1.6][compiler] wrong signature of String[][] in class file
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=101610">101610</a>
-Code assist not offered without transitive dependency
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239229">239229</a>
-[compiler] Regression bug against Eclipse 3.3: cannot resolve correct import
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260968">260968</a>
+Deadlock in UserLibraryManager
 
-<a name="v_902"></a>
+<a name="v_A00"></a>
 <hr><h1>
 Eclipse Platform Build Notes<br>
 Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 8, 2008
-<br>Project org.eclipse.jdt.core v_902
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_902">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236336">236336</a>
-[1.6][compiler] Stack map generation error with 10,000-line method in Java
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239941">239941</a>
-[formatter] Unclosed html tags make the formatter to produce incorrect outputs
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239719">239719</a>
-[formatter] Code formatter destroys pre formatted javadoc comments
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238923">238923</a>
-[1.6][compiler] Internal compiler error caused by a for loop in an initializer block
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239758">239758</a>
-[1.5][compiler] Generic interface inheritance and overriding error
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239305">239305</a>
-[compiler] VerifyError caused by casting long to long to int
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239198">239198</a>
-[compiler] NegativeArraySizeException thrown for triple quotes
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238920">238920</a>
-[formatter] Code Formatter removes javadoc status if @category present
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238853">238853</a>
-[formatter] Code Formatter does not properly format valid xhtml (<br /> & <p />) in javadoc.
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=160217">160217</a>
-[ast rewrite] ASTRewrite#getListRewrite does not fullfill spec
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232565">232565</a>
-[1.5][compiler] wrong autoboxing code generation leads to VerifyError at runtime
-
-<a name="v_901"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M1 - July 1, 2008
-<br>Project org.eclipse.jdt.core v_901
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_901">cvs</a>).
-<h2>What's new in this drop</h2>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232478">232478</a>
-[buildpath] Classpath failed to bind to installed JRE
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238210">238210</a>
-[formatter] CodeFormatter wraps line comments without whitespaces
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238484">238484</a>
-[1.5][compiler] Eclipse generates bad code (major regression)
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235370">235370</a>
-Add performance test for bug 234718
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=135906">135906</a>
-CompilationUnitStructureRequestor.resolveDuplicates has bad performance
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=169678">169678</a>
-[hierarchy] Type Hierarchy on static nested class includes unrelated types
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=95480">95480</a>
-[model] Missing INVALID_SIBLING exception when creating a type in an enum type that contains constants
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235369">235369</a>
-DeltaProcessor.resetProjectCaches() should clear the list of projects to reset
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=190840">190840</a>
-SourceMapper#computeAllRootPaths(IType) factorisation suggestion
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=148664">148664</a>
-[spec] IJavaModel#getJavaProject(String) throws IAE for invalid name
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=231130">231130</a>
-[spec] IClassFile.getPath() not specified for external class folders
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=209425">209425</a>
-[spec] Ambiguous JavaDoc in ASTParser#setUnitName regarding source folders
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235272">235272</a>
-javadoc of JavaCore#COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION needs improvement
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235778">235778</a>
-Potential race condition computing resolved classpath
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154865">154865</a>
-[hierarchy] Focus on Package only shows classes with missing superclasses
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236445">236445</a>
-NPE in content assist
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237123">237123</a>
-[search] And/OrPatterns miss to override one overload
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=226357">226357</a>
-[dom] NPE in MethodBinding.getParameterAnnotations() if some, but not all parameters are annotated
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=120082">120082</a>
-Signature is missing capture
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235882">235882</a>
-[compiler] constructor-scoped inner classes unable to recognize final member variable initialization
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238090">238090</a>
-[formatter] New lines wrongly added while formatting too long @see references
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237942">237942</a>
-[formatter] String references are put on next line when over the max line length
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233259">233259</a>
-[formatter] html tag should not be split by formatter
-
-
-<a name="v_900"></a>
-<hr><h1>
-Eclipse Platform Build Notes<br>
-Java development tools core</h1>
-Eclipse SDK 3.5M1 - June 24, 2008
-<br>Project org.eclipse.jdt.core v_900
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_900">cvs</a>).
+Eclipse SDK 3.6M1 - June 30, 2009
+<br>Project org.eclipse.jdt.core v_A00
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A00">cvs</a>).
 <h2>What's new in this drop</h2>
 <ul>
-<li>Incremented JDT/Core plug-in id to "3.5.0", since added new API/feature.
-</li>
-<li>Added a new compiler warning to detect comparisons between identical expressions. This diagnosis is controlled by option: 
-<code>JavaCore.COMPILER_PB_COMPARING_IDENTICAL</code> and produces a problem marker which ID is
-<code>IProblem.ComparingIdentical</code> problem ID.
+<li>New API added to handle the new <code>invokedynamic</code> bytecode:
 <pre>
-Compiler option ID: Reporting Comparison of Identical Expressions.
-When enabled, the compiler will issue an error or a warning if a comparison
-is involving identical operands (e.g <code>'x == x'</code>).
-  - Option id:"org.eclipse.jdt.core.compiler.problem.comparingIdentical"
-  - Possible values: { "error", "warning", "ignore" }
-  - Default: "warning"
+org.eclipse.jdt.core.util.ByteCodeVisitorAdapter:
+	public void _invokedynamic(
+			int pc,
+			int index,
+			IConstantPoolEntry nameEntry,
+			IConstantPoolEntry descriptorEntry) {
+		// default behavior is to do nothing
+	}
 </pre>
+<pre>org.eclipse.jdt.core.util.IBytecodeVisitor#_invokedynamic(int, int, IConstantPoolEntry, IConstantPoolEntry)</pre>
+<pre>org.eclipse.jdt.core.util.IOpcodeMnemonics#INVOKEDYNAMIC</pre>
 </li>
 </ul>
 
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234172">234172</a>
-[1.5][select] no hover in qualified name with generics
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233568">233568</a>
-Type in Server Runtime is not resolved in editor
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=217287">217287</a>
-[dom]IVariableBinding#getJavaElement() return null for variable inside an initializer
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235921">235921</a>
-[1.5][compiler] Incorrect generic signature attribute created for inner anonymous type
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234619">234619</a>
-[1.5][compiler] Object#getClass() has wrong expression type binding with JRE from 1.6
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=115814">115814</a>
-[compiler] warning on comparing same to same
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235004">235004</a>
-[compiler] Misleading compiler warning
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232944">232944</a>
-IMember#getJavadocRange() should end with "*/"
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=222665">222665</a>
-Error opening workbench
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=216772">216772</a>
-IJavaModel#refreshExternalArchives fails to refresh ExternalJavaProject jar cache
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=205917">205917</a>
-JavaCore#create(String, WorkingCopyOwner) should deal with null owner
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237051">237051</a>
-[formatter] Formatter insert blank lines after javadoc if javadoc contains Commons Attributes @@ annotations
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236230">236230</a>
-[formatter] SIOOBE while formatting a compilation unit.
-
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277450">277450</a>
+[1.5][compiler] Problems with += and Autoboxing/Unboxing
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=206498">206498</a>
+[1.7][compiler] Remove fix for bug 206483 once 1.7 VMS can handle .class files with version 51.0
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191176">191176</a>
+JavaProject#getOption optimizations
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201762">201762</a>
+Content Assist has no proposals with certain CU structure
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281681">281681</a>
+Stale code in CompilerOptions
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231796">231796</a>
+[formatter] @throws tag description is not indented using @param preference when there's a syntax error
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255142">255142</a>
+[select] Codeselect should not omit cast
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=235295">235295</a>
+[formatter] javadoc of CodeFormatter#F_INCLUDE_COMMENTS needs improvement
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280134">280134</a>
+[1.5][compiler] Requesting Java AST from selection has encountered a problem
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281317">281317</a>
+[search] An internal error occurred during: "Java Search".
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276373">276373</a>
+Incorrect resource comparison with IJavaProject.isOnClasspath(IResource)
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275518">275518</a>
+[assist] Content assist does not provide proposals if invoked right after a method's opening brace
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280888">280888</a>
+change a java file in one plug-in will compile all related plugin projects
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274466">274466</a>
+[assist] Assert expressions should be proposed with high relevance
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277382">277382</a>
+NPE and other failures in Parser
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275330">275330</a>
+NPE from org.eclipse.jdt.internal.core.ClasspathChange.requestIndexing
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273385">273385</a>
+[model] NPE while closing project
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280079">280079</a>
+NPE while parsing K_CLASS_BODY_DECLARATIONS
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280063">280063</a>
+org.eclipse.jdt.internal.compiler.parser.Parser.parseClassBodyDeclarations(char[], int, int, CompilationUnitDeclaration) should return consistent results
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267046">267046</a>
+SourceMapper infinite loop on primitive type in generic
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=240934">240934</a>
+Add support for the invokedynamic bytecode into the disassembler
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267551">267551</a>
+[formatter] Wrong spacing in default array parameter for annotation type
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277965">277965</a>
+[compiler] NPE in canBeSeenBy due to illegal protected toplevel class
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273990">273990</a>
+[compiler] FUP of 269388: Eclipse accepts code rejected by javac
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279183">279183</a>
+[1.6][compiler] Inconsistent stackmap frames generated by JDT cause VerifyError
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=209778">209778</a>
+[search] TypeReferenceMatch#getOtherElements() fails for match in annotation
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=221065">221065</a>
+[search] Search still finds overridden method
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279836">279836</a>
+[1.5][compiler] Eclipse compiler shows error on javac-valid construct: raw types on overridden methods
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280616">280616</a>
+[formatter] Valid 1.5 code is not formatted inside <pre> tag
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280255">280255</a>
+[formatter] Format edited lines adds two new lines on each save
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280061">280061</a>
+[formatter] AIOOBE while formatting javadoc comment
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276938">276938</a>
+Remove unreachable removes reachable logic in case statement.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274898">274898</a>
+[recovery] IllegalArgumentException in ASTNode#setSourceRange()
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277204">277204</a>
+IAE in SharedASTProvider for generic local class.
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276741">276741</a>
+comparing identical value detection does not work for this
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276740">276740</a>
+comparing identical value detection does not work for primitive types
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278745">278745</a>
+Methods overloaded with unavailable types worked in 3.4 but give "indirectly referenced.." error in 3.5
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278305">278305</a>
+[1.5][compiler] JDT accepts supertype parameterized with wildcard
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=196308">196308</a>
+[formatter] Don't escape entity when formatting in <pre> tags within javadoc comments
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279359">279359</a>
+[formatter] Formatter with 'never join lines' produces extra level of indent
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273619">273619</a>
+[formatter] Formatting repeats *} in javadoc
 
 <hr>
-<p>For earlier build notes, also see <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/R34_buildnotes_jdt-core.html">build notes up to Release 3.4</a>.</p>
+<p>For earlier build notes, also see <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/R35_buildnotes_jdt-core.html">build notes up to Release 3.5</a>.</p>
 <br>
   <p>
     <a href="http://validator.w3.org/check?uri=referer"><img
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
index 5b2b230..4ff8e23 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,6 @@ import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 import org.eclipse.jdt.internal.compiler.lookup.*;
-import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
 import org.eclipse.jdt.internal.compiler.parser.SourceTypeConverter;
 import org.eclipse.jdt.internal.compiler.parser.JavadocTagConstants;
@@ -499,6 +498,8 @@ public final class CompletionEngine
 	private final static int SUPERTYPE = 1;
 	private final static int SUBTYPE = 2;
 	
+	private final static char[] DOT_ENUM = ".enum".toCharArray(); //$NON-NLS-1$
+	
 	int expectedTypesPtr = -1;
 	TypeBinding[] expectedTypes = new TypeBinding[1];
 	int expectedTypesFilter;
@@ -549,7 +550,6 @@ public final class CompletionEngine
 	int javadocTagPosition; // Position of previous tag while completing in javadoc
 	HashtableOfObject knownPkgs = new HashtableOfObject(10);
 	HashtableOfObject knownTypes = new HashtableOfObject(10);
-	Scanner nameScanner;
 	
  	/*
 		static final char[][] mainDeclarations =
@@ -615,6 +615,7 @@ public final class CompletionEngine
 		public void setFieldIndex(int depth){/* empty */}
 		public int sourceEnd() { return 0; 	}
 		public int sourceStart() { return 0; 	}
+		public TypeBinding expectedType() { return null; }
 	};
 
 	private int foundTypesCount;
@@ -663,15 +664,6 @@ public final class CompletionEngine
 			new LookupEnvironment(this, this.compilerOptions, this.problemReporter, nameEnvironment);
 		this.parser =
 			new CompletionParser(this.problemReporter, this.requestor.isExtendedContextRequired());
-		this.nameScanner =
-			new Scanner(
-				false /*comment*/,
-				false /*whitespace*/,
-				false /*nls*/,
-				this.compilerOptions.sourceLevel,
-				null /*taskTags*/,
-				null/*taskPriorities*/,
-				true/*taskCaseSensitive*/);
 		this.owner = owner;
 		this.monitor = monitor;
 	}
@@ -757,7 +749,10 @@ public final class CompletionEngine
 		
 		HashtableOfObject onDemandFound = new HashtableOfObject();
 		
-		ArrayList deferredProposals = new ArrayList();
+		ArrayList deferredProposals = null;
+		if (DEFER_QUALIFIED_PROPOSALS) {
+			deferredProposals = new ArrayList();
+		}
 		
 		try {
 			next : for (int i = 0; i < length; i++) {
@@ -1162,6 +1157,10 @@ public final class CompletionEngine
 					break;
 			}
 		}
+		
+		if (isForbiddenType(packageName, simpleTypeName, enclosingTypeNames)) {
+			return;
+		}
 
 		if(this.acceptedTypes == null) {
 			this.acceptedTypes = new ObjectVector();
@@ -3630,6 +3629,13 @@ public final class CompletionEngine
 			addExpectedType(TypeBinding.BOOLEAN, scope);
 		} else if (parent instanceof IfStatement) {  
 			addExpectedType(TypeBinding.BOOLEAN, scope);
+		} else if (parent instanceof AssertStatement) {
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=274466
+			// If the assertExpression is same as the node , then the assistNode is the conditional part of the assert statement
+			AssertStatement assertStatement = (AssertStatement) parent;
+			if (assertStatement.assertExpression == node) {
+				addExpectedType(TypeBinding.BOOLEAN, scope);
+			}
 		} else if (parent instanceof ForStatement) {   // astNodeParent set to ForStatement only for the condition  
 			addExpectedType(TypeBinding.BOOLEAN, scope);
 
@@ -3779,15 +3785,26 @@ public final class CompletionEngine
 			TypeDeclaration typeDeclaration = ((ClassScope)scope).referenceContext;
 			if(typeDeclaration.superclass == astNode) {
 				addForbiddenBindings(typeDeclaration.binding);
+				addForbiddenBindingsForMemberTypes(typeDeclaration);
 				return scope.parent;
 			}
 			TypeReference[] superInterfaces = typeDeclaration.superInterfaces;
 			int length = superInterfaces == null ? 0 : superInterfaces.length;
+			int astNodeIndex = -1;
 			for (int i = 0; i < length; i++) {
 				if(superInterfaces[i] == astNode) {
 					addForbiddenBindings(typeDeclaration.binding);
-					return scope.parent;
+					addForbiddenBindingsForMemberTypes(typeDeclaration);
+					astNodeIndex = i;
+					break;
+				}
+			}
+			if (astNodeIndex >= 0) {
+				// Need to loop only up to astNodeIndex as the rest will be undefined.
+				for (int i = 0; i < astNodeIndex; i++) {
+					addForbiddenBindings(superInterfaces[i].resolvedType);
 				}
+				return scope.parent;
 			}
 		} else {
 			if (astNodeParent != null && astNodeParent instanceof TryStatement) {
@@ -3822,6 +3839,16 @@ public final class CompletionEngine
 		return scope;
 	}
 
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=270437
+	private void addForbiddenBindingsForMemberTypes(TypeDeclaration typeDeclaration) {
+		TypeDeclaration[] memberTypes = typeDeclaration.memberTypes;
+		int memberTypesLen = memberTypes == null ? 0 : memberTypes.length;
+		for (int i = 0; i < memberTypesLen; i++) {
+			addForbiddenBindings(memberTypes[i].binding);
+			addForbiddenBindingsForMemberTypes(memberTypes[i]);
+		}
+	}
+
 	private char[] computePrefix(SourceTypeBinding declarationType, SourceTypeBinding invocationType, boolean isStatic){
 
 		StringBuffer completion = new StringBuffer(10);
@@ -3956,6 +3983,11 @@ public final class CompletionEngine
 	private int computeRelevanceForExpectingType(TypeBinding proposalType){
 		if(this.expectedTypes != null && proposalType != null) {
 			int relevance = 0;
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=271296
+			// If there is at least one expected type, then void proposal types attract a degraded relevance.  
+			if (proposalType == TypeBinding.VOID && this.expectedTypesPtr >=0) {
+				return R_VOID;
+			}	
 			for (int i = 0; i <= this.expectedTypesPtr; i++) {
 				if((this.expectedTypesFilter & SUBTYPE) != 0
 						&& proposalType.isCompatibleWith(this.expectedTypes[i])) {
@@ -6001,7 +6033,7 @@ public final class CompletionEngine
 			int relevance = computeBaseRelevance();
 			relevance += computeRelevanceForResolution();
 			relevance += computeRelevanceForInterestingProposal(field);
-			if (fieldName != null) relevance += computeRelevanceForCaseMatching(fieldName, field.name);
+			relevance += computeRelevanceForCaseMatching(fieldName, field.name);
 			relevance += computeRelevanceForExpectingType(field.type);
 			relevance += computeRelevanceForEnumConstant(field.type);
 			relevance += computeRelevanceForStatic(onlyStaticFields, field.isStatic());
@@ -7162,7 +7194,7 @@ public final class CompletionEngine
 			int relevance = computeBaseRelevance();
 			relevance += computeRelevanceForResolution();
 			relevance += computeRelevanceForInterestingProposal(field);
-			if (fieldName != null) relevance += computeRelevanceForCaseMatching(fieldName, field.name);
+			relevance += computeRelevanceForCaseMatching(fieldName, field.name);
 			relevance += computeRelevanceForExpectingType(field.type);
 			relevance += computeRelevanceForEnumConstant(field.type);
 			relevance += computeRelevanceForStatic(true, true);
@@ -8301,7 +8333,7 @@ public final class CompletionEngine
 			int relevance = computeBaseRelevance();
 			relevance += computeRelevanceForResolution();
 			relevance += computeRelevanceForInterestingProposal();
-			if (methodName != null) relevance += computeRelevanceForCaseMatching(methodName, method.selector);
+			relevance += computeRelevanceForCaseMatching(methodName, method.selector);
 			relevance += computeRelevanceForExpectingType(method.returnType);
 			relevance += computeRelevanceForEnumConstant(method.returnType);
 			relevance += computeRelevanceForStatic(onlyStaticMethods, method.isStatic());
@@ -8560,7 +8592,7 @@ public final class CompletionEngine
 				int relevance = computeBaseRelevance();
 				relevance += computeRelevanceForResolution();
 				relevance += computeRelevanceForInterestingProposal();
-				if (methodName != null) relevance += computeRelevanceForCaseMatching(methodName, method.selector);
+				relevance += computeRelevanceForCaseMatching(methodName, method.selector);
 				relevance += computeRelevanceForExpectingType(method.returnType);
 				relevance += computeRelevanceForEnumConstant(method.returnType);
 				relevance += computeRelevanceForStatic(true, method.isStatic());
@@ -9894,7 +9926,7 @@ public final class CompletionEngine
 		ObjectVector typesFound) {
 
 		ReferenceBinding currentType = receiverType;
-		if (typeName == null || typeName.length == 0)
+		if (typeName == null)
 			return;
 
 		if (this.assistNodeIsSuperType && !this.insideQualifiedReference && isForbidden(currentType)) return; // we're trying to find a supertype
@@ -10325,6 +10357,10 @@ public final class CompletionEngine
 				checkCancel();
 				
 				SourceTypeBinding sourceType = types[i];
+				
+				if (isForbidden(sourceType)) continue;
+				if (this.assistNodeIsClass && sourceType.isInterface()) continue;
+				if (this.assistNodeIsInterface && sourceType.isClass()) continue;
 
 				char[] qualifiedSourceTypeName = CharOperation.concatWith(sourceType.compoundName, '.');
 
@@ -11673,6 +11709,32 @@ public final class CompletionEngine
 		return false;
 	}
 
+	private boolean isForbiddenType(char[] givenPkgName, char[] givenTypeName, char[][] enclosingTypeNames) {
+		// CharOperation.concatWith() handles the cases where input args are null/empty
+		char[] fullTypeName = CharOperation.concatWith(enclosingTypeNames, givenTypeName, '.');
+		for (int i = 0; i <= this.forbbidenBindingsPtr; i++) {
+			if (this.forbbidenBindings[i] instanceof TypeBinding) {
+				TypeBinding typeBinding = (TypeBinding) this.forbbidenBindings[i];
+				char[] currPkgName = typeBinding.qualifiedPackageName();
+				if (CharOperation.equals(givenPkgName, currPkgName))	{
+					char[] currTypeName = typeBinding.qualifiedSourceName();
+					if (CharOperation.equals(fullTypeName, currTypeName)) {
+						return true;
+					}
+				}
+			}
+		}
+		
+		// filter packages ending with enum for projects above 1.5 
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=317264
+		if (this.compilerOptions.sourceLevel >= ClassFileConstants.JDK1_5 &&
+				CharOperation.endsWith(givenPkgName, DOT_ENUM)) { //note: it should be .enum and not just enum
+				return true;
+		}
+		
+		return false;
+	}
+
 	private boolean isIgnored(int kind) {
 		return this.requestor.isIgnored(kind);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
index 0352ff5..20fab09 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.codeassist.complete.CompletionNodeDetector;
 import org.eclipse.jdt.internal.codeassist.complete.CompletionParser;
 import org.eclipse.jdt.internal.codeassist.impl.AssistCompilationUnit;
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
@@ -81,7 +82,6 @@ public class InternalExtendedCompletionContext {
 	private ObjectVector visibleMethods;
 
 	private boolean hasComputedEnclosingJavaElements;
-	Map bindingsToNodes;
 	private Map bindingsToHandles;
 	private Map nodesWithProblemsToHandles;
 	private ICompilationUnit compilationUnit;
@@ -167,7 +167,6 @@ public class InternalExtendedCompletionContext {
 			this.visibleLocalVariables = new ObjectVector();
 			this.visibleFields = new ObjectVector();
 			this.visibleMethods = new ObjectVector();
-			this.bindingsToNodes = new HashMap();
 	
 			ReferenceContext referenceContext = scope.referenceContext();
 			if (referenceContext instanceof AbstractMethodDeclaration) {
@@ -719,7 +718,23 @@ public class InternalExtendedCompletionContext {
 
 						if (local.isSecret())
 							continue next;
-
+						// If the local variable declaration's initialization statement itself has the completion,
+						// then don't propose the local variable
+						if (local.declaration.initialization != null) {
+							if(local.declaration.initialization.sourceEnd > 0) {
+									if (this.assistNode.sourceEnd <= local.declaration.initialization.sourceEnd
+											&& this.assistNode.sourceStart >= local.declaration.initialization.sourceStart) {
+										continue next;
+									}
+							} else {
+								CompletionNodeDetector detector = new CompletionNodeDetector(
+										this.assistNode,
+										local.declaration.initialization);
+								if (detector.containsCompletionNode()) {
+									continue next;
+								}
+							}
+						}
 						for (int f = 0; f < localsFound.size; f++) {
 							LocalVariableBinding otherLocal =
 								(LocalVariableBinding) localsFound.elementAt(f);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/RelevanceConstants.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/RelevanceConstants.java
index 0c52963..72abf4f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/RelevanceConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/RelevanceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,21 @@ package org.eclipse.jdt.internal.codeassist;
 
 public interface RelevanceConstants {
 
-	int R_DEFAULT = 0;
+	
+	/*
+	 * Important: The following rules must be strictly adhered to while declaring new relevance constants or modifying the existing:
+	 * 1. One or more relevance constants are used in combination to form a relevance.
+	 * 2. A particular relevance constant can be added only once to form a relevance.
+	 * 3. A resultant relevance (after combining all the applicable relevance constants) must be a positive number.
+	 * 4. The value of R_DEFAULT is maintained at a positive value such that the sum of all the negative relevance constants
+	 *    and R_DEFAULT must not be negative. 
+	 */
+	int R_DEFAULT = 5;
 	int R_INTERESTING = 5;
 	int R_CASE = 10;
 	int R_CAMEL_CASE = 5;
 	int R_EXACT_NAME = 4;
+	int R_VOID = -5;
 	int R_EXPECTED_TYPE = 20;
 	int R_EXACT_EXPECTED_TYPE = 30;
 	int R_INTERFACE = 20;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
index 8ae9323..267e42d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,7 +61,7 @@ import org.eclipse.jdt.internal.core.util.HashSetOfCharArrayArray;
  */
 public final class SelectionEngine extends Engine implements ISearchRequestor {
 	
-	private class SelectionTypeNameMatchRequestorWrapper extends TypeNameMatchRequestorWrapper {
+	private static class SelectionTypeNameMatchRequestorWrapper extends TypeNameMatchRequestorWrapper {
 		
 		class AcceptedType {
 			public int modifiers;
@@ -478,11 +478,20 @@ public final class SelectionEngine extends Engine implements ISearchRequestor {
 		}
 	}
 	private boolean checkSelection(
-		char[] source,
-		int selectionStart,
-		int selectionEnd) {
-
-		Scanner scanner = new Scanner();
+			char[] source,
+			int selectionStart,
+			int selectionEnd) {
+
+		Scanner scanner =
+			new Scanner(
+				false /*comment*/,
+				false /*whitespace*/,
+				false /*nls*/,
+				this.compilerOptions.sourceLevel,
+				this.compilerOptions.complianceLevel,
+				null/*taskTag*/,
+				null/*taskPriorities*/,
+				true /*taskCaseSensitive*/);
 		scanner.setSource(source);
 
 		int lastIdentifierStart = -1;
@@ -1096,126 +1105,139 @@ public final class SelectionEngine extends Engine implements ISearchRequestor {
 					this.actualSelectionEnd);
 			}
 			this.acceptedAnswer = true;
-		} else
-			if (binding instanceof MethodBinding) {
-				MethodBinding methodBinding = (MethodBinding) binding;
-				this.noProposal = false;
+		} else if (binding instanceof MethodBinding) {
+			MethodBinding methodBinding = (MethodBinding) binding;
+			this.noProposal = false;
 
-				boolean isValuesOrValueOf = false;
-				if(binding instanceof SyntheticMethodBinding) {
-					SyntheticMethodBinding syntheticMethodBinding = (SyntheticMethodBinding) binding;
-					if(syntheticMethodBinding.purpose  == SyntheticMethodBinding.EnumValues
-							|| syntheticMethodBinding.purpose  == SyntheticMethodBinding.EnumValueOf) {
-						isValuesOrValueOf =  true;
-					}
+			boolean isValuesOrValueOf = false;
+			if(binding instanceof SyntheticMethodBinding) {
+				SyntheticMethodBinding syntheticMethodBinding = (SyntheticMethodBinding) binding;
+				if(syntheticMethodBinding.purpose  == SyntheticMethodBinding.EnumValues
+						|| syntheticMethodBinding.purpose  == SyntheticMethodBinding.EnumValueOf) {
+					isValuesOrValueOf =  true;
+				}
+			}
+
+			if(!isValuesOrValueOf && !methodBinding.isSynthetic()) {
+				TypeBinding[] parameterTypes = methodBinding.original().parameters;
+				int length = parameterTypes.length;
+				char[][] parameterPackageNames = new char[length][];
+				char[][] parameterTypeNames = new char[length][];
+				String[] parameterSignatures = new String[length];
+				for (int i = 0; i < length; i++) {
+					parameterPackageNames[i] = parameterTypes[i].qualifiedPackageName();
+					parameterTypeNames[i] = parameterTypes[i].qualifiedSourceName();
+					parameterSignatures[i] = new String(getSignature(parameterTypes[i])).replace('/', '.');
 				}
 
-				if(!isValuesOrValueOf && !methodBinding.isSynthetic()) {
-					TypeBinding[] parameterTypes = methodBinding.original().parameters;
-					int length = parameterTypes.length;
-					char[][] parameterPackageNames = new char[length][];
-					char[][] parameterTypeNames = new char[length][];
-					String[] parameterSignatures = new String[length];
-					for (int i = 0; i < length; i++) {
-						parameterPackageNames[i] = parameterTypes[i].qualifiedPackageName();
-						parameterTypeNames[i] = parameterTypes[i].qualifiedSourceName();
-						parameterSignatures[i] = new String(getSignature(parameterTypes[i])).replace('/', '.');
+				TypeVariableBinding[] typeVariables = methodBinding.original().typeVariables;
+				length = typeVariables == null ? 0 : typeVariables.length;
+				char[][] typeParameterNames = new char[length][];
+				char[][][] typeParameterBoundNames = new char[length][][];
+				for (int i = 0; i < length; i++) {
+					TypeVariableBinding typeVariable = typeVariables[i];
+					typeParameterNames[i] = typeVariable.sourceName;
+					if (typeVariable.firstBound == null) {
+						typeParameterBoundNames[i] = new char[0][];
+					} else if (typeVariable.firstBound == typeVariable.superclass) {
+						int boundCount = 1 + (typeVariable.superInterfaces == null ? 0 : typeVariable.superInterfaces.length);
+						typeParameterBoundNames[i] = new char[boundCount][];
+						typeParameterBoundNames[i][0] = typeVariable.superclass.sourceName;
+						for (int j = 1; j < boundCount; j++) {
+							typeParameterBoundNames[i][j] = typeVariables[i].superInterfaces[j - 1].sourceName;
+						}
+					} else {
+						int boundCount = typeVariable.superInterfaces == null ? 0 : typeVariable.superInterfaces.length;
+						typeParameterBoundNames[i] = new char[boundCount][];
+						for (int j = 0; j < boundCount; j++) {
+							typeParameterBoundNames[i][j] = typeVariables[i].superInterfaces[j].sourceName;
+						}
 					}
+				}
 
-					TypeVariableBinding[] typeVariables = methodBinding.original().typeVariables;
-					length = typeVariables == null ? 0 : typeVariables.length;
-					char[][] typeParameterNames = new char[length][];
-					char[][][] typeParameterBoundNames = new char[length][][];
-					for (int i = 0; i < length; i++) {
-						TypeVariableBinding typeVariable = typeVariables[i];
-						typeParameterNames[i] = typeVariable.sourceName;
-						if (typeVariable.firstBound == null) {
-							typeParameterBoundNames[i] = new char[0][];
-						} else if (typeVariable.firstBound == typeVariable.superclass) {
-							int boundCount = 1 + (typeVariable.superInterfaces == null ? 0 : typeVariable.superInterfaces.length);
-							typeParameterBoundNames[i] = new char[boundCount][];
-							typeParameterBoundNames[i][0] = typeVariable.superclass.sourceName;
-							for (int j = 1; j < boundCount; j++) {
-								typeParameterBoundNames[i][j] = typeVariables[i].superInterfaces[j - 1].sourceName;
-							}
+				ReferenceBinding declaringClass = methodBinding.declaringClass;
+				if (isLocal(declaringClass) && this.requestor instanceof SelectionRequestor) {
+					((SelectionRequestor)this.requestor).acceptLocalMethod(methodBinding);
+				} else {
+					this.requestor.acceptMethod(
+						declaringClass.qualifiedPackageName(),
+						declaringClass.qualifiedSourceName(),
+						declaringClass.enclosingType() == null ? null : new String(getSignature(declaringClass.enclosingType())),
+						methodBinding.isConstructor()
+							? declaringClass.sourceName()
+							: methodBinding.selector,
+						parameterPackageNames,
+						parameterTypeNames,
+						parameterSignatures,
+						typeParameterNames,
+						typeParameterBoundNames,
+						methodBinding.isConstructor(),
+						isDeclaration,
+						methodBinding.computeUniqueKey(),
+						this.actualSelectionStart,
+						this.actualSelectionEnd);
+				}
+			}
+			this.acceptedAnswer = true;
+		} else if (binding instanceof FieldBinding) {
+			FieldBinding fieldBinding = (FieldBinding) binding;
+			ReferenceBinding declaringClass = fieldBinding.declaringClass;
+			if (declaringClass != null) { // arraylength
+				this.noProposal = false;
+				if (isLocal(declaringClass) && this.requestor instanceof SelectionRequestor) {
+					((SelectionRequestor)this.requestor).acceptLocalField(fieldBinding);
+				} else {
+					// if the binding is a problem field binding, we want to make sure
+					// we can retrieve the closestMatch if the problem reason is NotVisible
+					FieldBinding currentFieldBinding = fieldBinding;
+					while (currentFieldBinding instanceof ProblemFieldBinding) {
+						ProblemFieldBinding problemFieldBinding = (ProblemFieldBinding) currentFieldBinding;
+						if (problemFieldBinding.problemId() == ProblemReasons.NotVisible) {
+							currentFieldBinding = problemFieldBinding.closestMatch;
 						} else {
-							int boundCount = typeVariable.superInterfaces == null ? 0 : typeVariable.superInterfaces.length;
-							typeParameterBoundNames[i] = new char[boundCount][];
-							for (int j = 0; j < boundCount; j++) {
-								typeParameterBoundNames[i][j] = typeVariables[i].superInterfaces[j].sourceName;
-							}
+							currentFieldBinding = null;
 						}
 					}
-
-					ReferenceBinding declaringClass = methodBinding.declaringClass;
-					if (isLocal(declaringClass) && this.requestor instanceof SelectionRequestor) {
-						((SelectionRequestor)this.requestor).acceptLocalMethod(methodBinding);
+					char[] fieldName = null;
+					char[] key = null;
+					if (currentFieldBinding != null) {
+						fieldName = currentFieldBinding.name;
+						key = currentFieldBinding.computeUniqueKey();
 					} else {
-						this.requestor.acceptMethod(
-							declaringClass.qualifiedPackageName(),
-							declaringClass.qualifiedSourceName(),
-							declaringClass.enclosingType() == null ? null : new String(getSignature(declaringClass.enclosingType())),
-							methodBinding.isConstructor()
-								? declaringClass.sourceName()
-								: methodBinding.selector,
-							parameterPackageNames,
-							parameterTypeNames,
-							parameterSignatures,
-							typeParameterNames,
-							typeParameterBoundNames,
-							methodBinding.isConstructor(),
-							isDeclaration,
-							methodBinding.computeUniqueKey(),
-							this.actualSelectionStart,
-							this.actualSelectionEnd);
+						fieldName = fieldBinding.name;
+						key = fieldBinding.computeUniqueKey();
 					}
+					this.requestor.acceptField(
+						declaringClass.qualifiedPackageName(),
+						declaringClass.qualifiedSourceName(),
+						fieldName,
+						false,
+						key,
+						this.actualSelectionStart,
+						this.actualSelectionEnd);
 				}
 				this.acceptedAnswer = true;
-			} else
-				if (binding instanceof FieldBinding) {
-					FieldBinding fieldBinding = (FieldBinding) binding;
-					ReferenceBinding declaringClass = fieldBinding.declaringClass;
-					if (declaringClass != null) { // arraylength
-						this.noProposal = false;
-						if (isLocal(declaringClass) && this.requestor instanceof SelectionRequestor) {
-							((SelectionRequestor)this.requestor).acceptLocalField(fieldBinding);
-						} else {
-							this.requestor.acceptField(
-								declaringClass.qualifiedPackageName(),
-								declaringClass.qualifiedSourceName(),
-								fieldBinding.name,
-								false,
-								fieldBinding.computeUniqueKey(),
-								this.actualSelectionStart,
-								this.actualSelectionEnd);
-						}
-						this.acceptedAnswer = true;
-					}
-				} else
-					if (binding instanceof LocalVariableBinding) {
-						if (this.requestor instanceof SelectionRequestor) {
-							((SelectionRequestor)this.requestor).acceptLocalVariable((LocalVariableBinding)binding);
-							this.acceptedAnswer = true;
-						} else {
-							// open on the type of the variable
-							selectFrom(((LocalVariableBinding) binding).type, parsedUnit, false);
-						}
-					} else
-						if (binding instanceof ArrayBinding) {
-							selectFrom(((ArrayBinding) binding).leafComponentType, parsedUnit, false);
-							// open on the type of the array
-						} else
-							if (binding instanceof PackageBinding) {
-								PackageBinding packageBinding = (PackageBinding) binding;
-								this.noProposal = false;
-								this.requestor.acceptPackage(packageBinding.readableName());
-								this.acceptedAnswer = true;
-							} else
-								if(binding instanceof BaseTypeBinding) {
-									this.acceptedAnswer = true;
-								}
+			}
+		} else if (binding instanceof LocalVariableBinding) {
+			if (this.requestor instanceof SelectionRequestor) {
+				((SelectionRequestor)this.requestor).acceptLocalVariable((LocalVariableBinding)binding);
+				this.acceptedAnswer = true;
+			} else {
+				// open on the type of the variable
+				selectFrom(((LocalVariableBinding) binding).type, parsedUnit, false);
+			}
+		} else if (binding instanceof ArrayBinding) {
+			selectFrom(((ArrayBinding) binding).leafComponentType, parsedUnit, false);
+			// open on the type of the array
+		} else if (binding instanceof PackageBinding) {
+			PackageBinding packageBinding = (PackageBinding) binding;
+			this.noProposal = false;
+			this.requestor.acceptPackage(packageBinding.readableName());
+			this.acceptedAnswer = true;
+		} else if(binding instanceof BaseTypeBinding) {
+			this.acceptedAnswer = true;
+		}
 	}
-
 	/*
 	 * Checks if a local declaration got selected in this method/initializer/field.
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
index 840efeb..5b8c437 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ public class CompletionParser extends AssistParser {
 	protected static final int K_NEXT_TYPEREF_IS_CLASS = COMPLETION_PARSER + 5; // whether the next type reference is a class
 	protected static final int K_NEXT_TYPEREF_IS_INTERFACE = COMPLETION_PARSER + 6; // whether the next type reference is an interface
 	protected static final int K_NEXT_TYPEREF_IS_EXCEPTION = COMPLETION_PARSER + 7; // whether the next type reference is an exception
-	protected static final int K_BETWEEN_NEW_AND_LEFT_BRACKET = COMPLETION_PARSER + 8; // whether we are between the keyword 'new' and the following left braket, ie. '[', '(' or '{'
+	protected static final int K_BETWEEN_NEW_AND_LEFT_BRACKET = COMPLETION_PARSER + 8; // whether we are between the keyword 'new' and the following left braket, i.e. '[', '(' or '{'
 	protected static final int K_INSIDE_THROW_STATEMENT = COMPLETION_PARSER + 9; // whether we are between the keyword 'throw' and the end of a throw statement
 	protected static final int K_INSIDE_RETURN_STATEMENT = COMPLETION_PARSER + 10; // whether we are between the keyword 'return' and the end of a return statement
 	protected static final int K_CAST_STATEMENT = COMPLETION_PARSER + 11; // whether we are between ')' and the end of a cast statement
@@ -80,6 +80,9 @@ public class CompletionParser extends AssistParser {
 	protected static final int K_CONTROL_STATEMENT_DELIMITER = COMPLETION_PARSER + 38;
 	protected static final int K_INSIDE_ASSERT_EXCEPTION = COMPLETION_PARSER + 39;
 	protected static final int K_INSIDE_FOR_CONDITIONAL = COMPLETION_PARSER + 40;
+	// added for https://bugs.eclipse.org/bugs/show_bug.cgi?id=261534
+	protected static final int K_BETWEEN_INSTANCEOF_AND_RPAREN = COMPLETION_PARSER + 41;
+
 
 	public final static char[] FAKE_TYPE_NAME = new char[]{' '};
 	public final static char[] FAKE_METHOD_NAME = new char[]{' '};
@@ -132,10 +135,6 @@ public class CompletionParser extends AssistParser {
 	// a pointer in the expression stack to the qualifier of a invocation
 	int qualifier;
 
-	// last modifiers info
-	int lastModifiers = ClassFileConstants.AccDefault;
-	int lastModifiersStart = -1;
-
 	// used to find if there is unused modifiers when building completion inside a method or an initializer
 	boolean hasUnusedModifiers;
 
@@ -562,9 +561,20 @@ protected void attachOrphanCompletionNode(){
 				}
 			}
 			if(expression == this.assistNode
+				|| (expression instanceof Assignment	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=287939
+					&& ((Assignment)expression).expression == this.assistNode
+					&& ((this.expressionPtr > 0 && this.expressionStack[this.expressionPtr - 1] instanceof InstanceOfExpression)
+						|| (this.elementPtr >= 0 && this.elementObjectInfoStack[this.elementPtr] instanceof InstanceOfExpression)))
 				|| (expression instanceof AllocationExpression
-					&& ((AllocationExpression)expression).type == this.assistNode)){
+					&& ((AllocationExpression)expression).type == this.assistNode)
+				|| (expression instanceof AND_AND_Expression
+						&& (this.elementPtr >= 0 && this.elementObjectInfoStack[this.elementPtr] instanceof InstanceOfExpression))){
 				buildMoreCompletionContext(expression);
+				if (this.assistNodeParent == null
+					&& expression instanceof Assignment) {
+					this.assistNodeParent = detector.getCompletionNodeParent();
+				}
+				return;
 			} else {
 				this.assistNodeParent = detector.getCompletionNodeParent();
 				if(this.assistNodeParent != null) {
@@ -572,6 +582,22 @@ protected void attachOrphanCompletionNode(){
 				} else {
 					this.currentElement = this.currentElement.add(expression, 0);
 				}
+				return;
+			}
+		}
+	}
+	if (this.astPtr > -1 && this.astStack[this.astPtr] instanceof LocalDeclaration) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=287939
+		// To take care of:  if (a instance of X)  int i = a.|
+		LocalDeclaration local = (LocalDeclaration) this.astStack[this.astPtr];
+		if (local.initialization == this.assistNode) {
+			Statement enclosing = buildMoreCompletionEnclosingContext(local);
+			if (enclosing instanceof IfStatement) {
+				if (this.currentElement instanceof RecoveredBlock) {
+					// RecoveredLocalVariable must be removed from its parent because the IfStatement will be added instead
+					RecoveredBlock recoveredBlock = (RecoveredBlock) this.currentElement;
+					recoveredBlock.statements[--recoveredBlock.statementCount] = null;
+					this.currentElement = this.currentElement.add(enclosing, 0);
+				}
 			}
 		}
 	}
@@ -771,9 +797,8 @@ private void buildMoreCompletionContext(Expression expression) {
 			case K_CAST_STATEMENT :
 				Expression castType;
 				if(this.expressionPtr > 0
-					&& ((castType = this.expressionStack[this.expressionPtr-1]) instanceof TypeReference
-						|| castType instanceof NameReference)) {
-					CastExpression cast = new CastExpression(expression, getTypeReference(castType));
+					&& ((castType = this.expressionStack[this.expressionPtr-1]) instanceof TypeReference)) {
+					CastExpression cast = new CastExpression(expression, castType);
 					cast.sourceStart = castType.sourceStart;
 					cast.sourceEnd= expression.sourceEnd;
 					this.assistNodeParent = cast;
@@ -1042,8 +1067,16 @@ private Statement buildMoreCompletionEnclosingContext(Statement statement) {
 
 	int blockIndex = lastIndexOfElement(K_BLOCK_DELIMITER);
 	int controlIndex = lastIndexOfElement(K_CONTROL_STATEMENT_DELIMITER);
-	int index = blockIndex != -1 && controlIndex < blockIndex ? blockIndex : controlIndex;
-
+	int index;
+	if (controlIndex != -1) {
+		index = blockIndex != -1 && controlIndex < blockIndex ? blockIndex : controlIndex;
+	} else {
+		// To handle the case when the completion is requested before enclosing R_PAREN
+		// and an instanceof expression is also present
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=261534
+		int instanceOfIndex = lastIndexOfElement(K_BETWEEN_INSTANCEOF_AND_RPAREN);
+		index = blockIndex != -1 && instanceOfIndex < blockIndex ? blockIndex : instanceOfIndex;
+	}
 	if (index != -1 && this.elementInfoStack[index] == IF && this.elementObjectInfoStack[index] != null) {
 		Expression condition = (Expression)this.elementObjectInfoStack[index];
 
@@ -1066,7 +1099,9 @@ private Statement buildMoreCompletionEnclosingContext(Statement statement) {
 
 			}
 		}
-
+		if (statement instanceof AND_AND_Expression && this.assistNode instanceof Statement) {
+			statement = (Statement) this.assistNode;
+		}
 		IfStatement ifStatement =
 			new IfStatement(
 					condition,
@@ -1424,8 +1459,8 @@ private boolean checkInvocation() {
 	boolean isEmptyNameCompletion = false;
 	boolean isEmptyAssistIdentifier = false;
 	if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR_QUALIFIER
-		&& ((isEmptyNameCompletion = topExpression == this.assistNode && isEmptyNameCompletion()) // eg. it is something like "this.fred([cursor]" but it is not something like "this.fred(1 + [cursor]"
-			|| (isEmptyAssistIdentifier = this.indexOfAssistIdentifier() >= 0 && this.identifierStack[this.identifierPtr].length == 0))) { // eg. it is something like "this.fred(1 [cursor]"
+		&& ((isEmptyNameCompletion = topExpression == this.assistNode && isEmptyNameCompletion()) // e.g. it is something like "this.fred([cursor]" but it is not something like "this.fred(1 + [cursor]"
+			|| (isEmptyAssistIdentifier = this.indexOfAssistIdentifier() >= 0 && this.identifierStack[this.identifierPtr].length == 0))) { // e.g. it is something like "this.fred(1 [cursor]"
 
 		// pop empty name completion
 		if (isEmptyNameCompletion) {
@@ -1595,7 +1630,7 @@ private boolean checkLabelStatement() {
 	return false;
 }
 /**
- * Checks if the completion is on a member access (ie. in an identifier following a dot).
+ * Checks if the completion is on a member access (i.e. in an identifier following a dot).
  * Returns whether we found a completion node.
  */
 private boolean checkMemberAccess() {
@@ -1619,7 +1654,7 @@ private boolean checkNameCompletion() {
 	/*
 		We didn't find any other completion, but the completion identifier is on the identifier stack,
 		so it can only be a completion on name.
-		Note that we allow the completion on a name even if nothing is expected (eg. foo() b[cursor] would
+		Note that we allow the completion on a name even if nothing is expected (e.g. foo() b[cursor] would
 		be a completion on 'b'). This policy gives more to the user than he/she would expect, but this
 		simplifies the problem. To fix this, the recovery must be changed to work at a 'statement' granularity
 		instead of at the 'expression' granularity as it does right now.
@@ -1942,7 +1977,7 @@ public void completionIdentifierCheck(){
 	if (checkClassLiteralAccess()) return;
 	if (checkInstanceofKeyword()) return;
 
-	// if the completion was not on an empty name, it can still be inside an invocation (eg. this.fred("abc"[cursor])
+	// if the completion was not on an empty name, it can still be inside an invocation (e.g. this.fred("abc"[cursor])
 	// (NB: Put this check before checkNameCompletion() because the selector of the invocation can be on the identifier stack)
 	if (checkInvocation()) return;
 
@@ -2586,6 +2621,10 @@ protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 protected void consumeInstanceOfExpression() {
 	super.consumeInstanceOfExpression();
 	popElement(K_BINARY_OPERATOR);
+	// to handle https://bugs.eclipse.org/bugs/show_bug.cgi?id=261534
+	if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_IF_AND_RIGHT_PAREN) {
+		pushOnElementStack(K_BETWEEN_INSTANCEOF_AND_RPAREN, IF, this.expressionStack[this.expressionPtr]);
+	}
 
 	InstanceOfExpression exp = (InstanceOfExpression) this.expressionStack[this.expressionPtr];
 	if(this.assistNode != null && exp.type == this.assistNode) {
@@ -3223,15 +3262,15 @@ protected void consumeToken(int token) {
 		switch (token) {
 			case TokenNameDOT:
 				switch (previous) {
-					case TokenNamethis: // eg. this[.]fred()
+					case TokenNamethis: // e.g. this[.]fred()
 						this.invocationType = EXPLICIT_RECEIVER;
 						break;
-					case TokenNamesuper: // eg. super[.]fred()
+					case TokenNamesuper: // e.g. super[.]fred()
 						this.invocationType = SUPER_RECEIVER;
 						break;
-					case TokenNameIdentifier: // eg. bar[.]fred()
+					case TokenNameIdentifier: // e.g. bar[.]fred()
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) != K_BETWEEN_NEW_AND_LEFT_BRACKET) {
-							if (this.identifierPtr != prevIdentifierPtr) { // if identifier has been consumed, eg. this.x[.]fred()
+							if (this.identifierPtr != prevIdentifierPtr) { // if identifier has been consumed, e.g. this.x[.]fred()
 								this.invocationType = EXPLICIT_RECEIVER;
 							} else {
 								this.invocationType = NAME_RECEIVER;
@@ -3241,21 +3280,21 @@ protected void consumeToken(int token) {
 				}
 				break;
 			case TokenNameIdentifier:
-				if (previous == TokenNameDOT) { // eg. foo().[fred]()
-					if (this.invocationType != SUPER_RECEIVER // eg. not super.[fred]()
-						&& this.invocationType != NAME_RECEIVER // eg. not bar.[fred]()
-						&& this.invocationType != ALLOCATION // eg. not new foo.[Bar]()
-						&& this.invocationType != QUALIFIED_ALLOCATION) { // eg. not fred().new foo.[Bar]()
+				if (previous == TokenNameDOT) { // e.g. foo().[fred]()
+					if (this.invocationType != SUPER_RECEIVER // e.g. not super.[fred]()
+						&& this.invocationType != NAME_RECEIVER // e.g. not bar.[fred]()
+						&& this.invocationType != ALLOCATION // e.g. not new foo.[Bar]()
+						&& this.invocationType != QUALIFIED_ALLOCATION) { // e.g. not fred().new foo.[Bar]()
 
 						this.invocationType = EXPLICIT_RECEIVER;
 						this.qualifier = this.expressionPtr;
 					}
 				}
-				if (previous == TokenNameGREATER) { // eg. foo().<X>[fred]()
-					if (this.invocationType != SUPER_RECEIVER // eg. not super.<X>[fred]()
-						&& this.invocationType != NAME_RECEIVER // eg. not bar.<X>[fred]()
-						&& this.invocationType != ALLOCATION // eg. not new foo.<X>[Bar]()
-						&& this.invocationType != QUALIFIED_ALLOCATION) { // eg. not fred().new foo.<X>[Bar]()
+				if (previous == TokenNameGREATER) { // e.g. foo().<X>[fred]()
+					if (this.invocationType != SUPER_RECEIVER // e.g. not super.<X>[fred]()
+						&& this.invocationType != NAME_RECEIVER // e.g. not bar.<X>[fred]()
+						&& this.invocationType != ALLOCATION // e.g. not new foo.<X>[Bar]()
+						&& this.invocationType != QUALIFIED_ALLOCATION) { // e.g. not fred().new foo.<X>[Bar]()
 
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_METHOD_INVOCATION) {
 							this.invocationType = EXPLICIT_RECEIVER;
@@ -3267,20 +3306,20 @@ protected void consumeToken(int token) {
 			case TokenNamenew:
 				pushOnElementStack(K_BETWEEN_NEW_AND_LEFT_BRACKET);
 				this.qualifier = this.expressionPtr; // NB: even if there is no qualification, set it to the expression ptr so that the number of arguments are correctly computed
-				if (previous == TokenNameDOT) { // eg. fred().[new] X()
+				if (previous == TokenNameDOT) { // e.g. fred().[new] X()
 					this.invocationType = QUALIFIED_ALLOCATION;
-				} else { // eg. [new] X()
+				} else { // e.g. [new] X()
 					this.invocationType = ALLOCATION;
 				}
 				break;
 			case TokenNamethis:
-				if (previous == TokenNameDOT) { // eg. fred().[this]()
+				if (previous == TokenNameDOT) { // e.g. fred().[this]()
 					this.invocationType = QUALIFIED_ALLOCATION;
 					this.qualifier = this.expressionPtr;
 				}
 				break;
 			case TokenNamesuper:
-				if (previous == TokenNameDOT) { // eg. fred().[super]()
+				if (previous == TokenNameDOT) { // e.g. fred().[super]()
 					this.invocationType = QUALIFIED_ALLOCATION;
 					this.qualifier = this.expressionPtr;
 				}
@@ -3293,7 +3332,7 @@ protected void consumeToken(int token) {
 					this.qualifier = this.expressionPtr; // remenber the last expression so that arguments are correctly computed
 				}
 				switch (previous) {
-					case TokenNameIdentifier: // eg. fred[(]) or foo.fred[(])
+					case TokenNameIdentifier: // e.g. fred[(]) or foo.fred[(])
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) {
 							int info = 0;
 							if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER,1) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
@@ -3313,7 +3352,7 @@ protected void consumeToken(int token) {
 						this.qualifier = -1;
 						this.invocationType = NO_RECEIVER;
 						break;
-					case TokenNamethis: // explicit constructor invocation, eg. this[(]1, 2)
+					case TokenNamethis: // explicit constructor invocation, e.g. this[(]1, 2)
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) {
 							this.pushOnElementStack(K_SELECTOR_INVOCATION_TYPE, (this.invocationType == QUALIFIED_ALLOCATION) ? QUALIFIED_ALLOCATION : ALLOCATION);
 							this.pushOnElementStack(K_SELECTOR_QUALIFIER, this.qualifier);
@@ -3321,7 +3360,7 @@ protected void consumeToken(int token) {
 						this.qualifier = -1;
 						this.invocationType = NO_RECEIVER;
 						break;
-					case TokenNamesuper: // explicit constructor invocation, eg. super[(]1, 2)
+					case TokenNamesuper: // explicit constructor invocation, e.g. super[(]1, 2)
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) {
 							this.pushOnElementStack(K_SELECTOR_INVOCATION_TYPE, (this.invocationType == QUALIFIED_ALLOCATION) ? QUALIFIED_ALLOCATION : ALLOCATION);
 							this.pushOnElementStack(K_SELECTOR_QUALIFIER, this.qualifier);
@@ -3329,7 +3368,7 @@ protected void consumeToken(int token) {
 						this.qualifier = -1;
 						this.invocationType = NO_RECEIVER;
 						break;
-					case TokenNameGREATER: // explicit constructor invocation, eg. Fred<X>[(]1, 2)
+					case TokenNameGREATER: // explicit constructor invocation, e.g. Fred<X>[(]1, 2)
 					case TokenNameRIGHT_SHIFT: // or fred<X<X>>[(]1, 2)
 					case TokenNameUNSIGNED_RIGHT_SHIFT: //or Fred<X<X<X>>>[(]1, 2)
 						if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SELECTOR) {
@@ -3424,6 +3463,9 @@ protected void consumeToken(int token) {
 					case K_BETWEEN_CATCH_AND_RIGHT_PAREN :
 						popElement(K_BETWEEN_CATCH_AND_RIGHT_PAREN);
 						break;
+					case K_BETWEEN_INSTANCEOF_AND_RPAREN :
+						popElement(K_BETWEEN_INSTANCEOF_AND_RPAREN);
+						//$FALL-THROUGH$
 					case K_BETWEEN_IF_AND_RIGHT_PAREN :
 						if(topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) == this.bracketDepth) {
 							popElement(K_BETWEEN_IF_AND_RIGHT_PAREN);
@@ -4302,7 +4344,14 @@ private void initializeForBlockStatements() {
 	this.qualifier = -1;
 	popUntilElement(K_SWITCH_LABEL);
 	if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) != K_SWITCH_LABEL) {
-		popUntilElement(K_BLOCK_DELIMITER);
+		if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_ARRAY_INITIALIZER) {
+			// if recovery is taking place in an array initializer, we should prevent popping
+			// up to the enclosing block until the array initializer is properly closed
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249704
+			popUntilElement(K_ARRAY_INITIALIZER);
+		} else {
+			popUntilElement(K_BLOCK_DELIMITER);
+		}
 	}
 }
 public void initializeScanner(){
@@ -4310,7 +4359,7 @@ public void initializeScanner(){
 }
 /**
  * Returns whether the completion is just after an array type
- * eg. String[].[cursor]
+ * e.g. String[].[cursor]
  */
 private boolean isAfterArrayType() {
 	// TBD: The following relies on the fact that array dimensions are small: it says that if the
@@ -4587,7 +4636,13 @@ public void recoveryTokenCheck() {
 		case TokenNameRBRACE :
 			super.recoveryTokenCheck();
 			if(this.currentElement != oldElement && oldElement instanceof RecoveredBlock) {
-				popElement(K_BLOCK_DELIMITER);
+				if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_ARRAY_INITIALIZER) {
+					// When inside an array initializer, we should not prematurely pop the enclosing block
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249704
+					popElement(K_ARRAY_INITIALIZER);
+				} else {
+					popElement(K_BLOCK_DELIMITER);
+				}
 			}
 			break;
 		case TokenNamecase :
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
index a24fa39..25e8df7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ package org.eclipse.jdt.internal.codeassist.complete;
  *  n  means completion behind the n-th character
  */
 import org.eclipse.jdt.core.compiler.*;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
 
@@ -184,7 +185,7 @@ public int getNextToken() throws InvalidInputException {
 					this.startPosition == this.cursorLocation + 1){
 					// compute end of empty identifier.
 					// if the empty identifier is at the start of a next token the end of
-					// empty identifier is the end of the next token (eg. "<empty token>next").
+					// empty identifier is the end of the next token (e.g. "<empty token>next").
 					int temp = this.eofPosition;
 					this.eofPosition = this.source.length;
 				 	while(getNextCharAsJavaIdentifierPart()){/*empty*/}
@@ -219,9 +220,9 @@ public int getNextToken() throws InvalidInputException {
 					return TokenNameCOMMA;
 				case '.' :
 					if (this.startPosition <= this.cursorLocation
-					    && this.cursorLocation < this.currentPosition){
-					    	return TokenNameDOT; // completion inside .<|>12
-				    }
+							&& this.cursorLocation < this.currentPosition){
+						return TokenNameDOT; // completion inside .<|>12
+					}
 					if (getNextCharAsDigit()) {
 						return scanNumber(true);
 					}
@@ -791,7 +792,39 @@ public int getNextToken() throws InvalidInputException {
 					throw new InvalidInputException("Ctrl-Z"); //$NON-NLS-1$
 
 				default :
-					if (ScannerHelper.isJavaIdentifierStart(this.currentCharacter))
+					char c = this.currentCharacter;
+					if (c < ScannerHelper.MAX_OBVIOUS) {
+						if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[c] & ScannerHelper.C_IDENT_START) != 0) {
+							return scanIdentifierOrKeyword();
+						} else if ((ScannerHelper.OBVIOUS_IDENT_CHAR_NATURES[c] & ScannerHelper.C_DIGIT) != 0) {
+								return scanNumber(false);
+						} else {
+							return TokenNameERROR;
+						}
+					}
+					boolean isJavaIdStart;
+					if (c >= HIGH_SURROGATE_MIN_VALUE && c <= HIGH_SURROGATE_MAX_VALUE) {
+						if (this.complianceLevel < ClassFileConstants.JDK1_5) {
+							throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+						}
+						// Unicode 4 detection
+						char low = (char) getNextChar();
+						if (low < LOW_SURROGATE_MIN_VALUE || low > LOW_SURROGATE_MAX_VALUE) {
+							// illegal low surrogate
+							throw new InvalidInputException(INVALID_LOW_SURROGATE);
+						}
+						isJavaIdStart = ScannerHelper.isJavaIdentifierStart(c, low);
+					}
+					else if (c >= LOW_SURROGATE_MIN_VALUE && c <= LOW_SURROGATE_MAX_VALUE) {
+						if (this.complianceLevel < ClassFileConstants.JDK1_5) {
+							throw new InvalidInputException(INVALID_UNICODE_ESCAPE);
+						}
+						throw new InvalidInputException(INVALID_HIGH_SURROGATE);
+					} else {
+						// optimized case already checked
+						isJavaIdStart = Character.isJavaIdentifierStart(c);
+					}
+					if (isJavaIdStart)
 						return scanIdentifierOrKeyword();
 					if (ScannerHelper.isDigit(this.currentCharacter)) {
 						return scanNumber(false);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
index 9774c76..e4b5785 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,7 +33,9 @@ import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 public abstract class AssistParser extends Parser {
 	public ASTNode assistNode;
 	public boolean isOrphanCompletionNode;
-
+	// last modifiers info
+	protected int lastModifiers = ClassFileConstants.AccDefault;
+	protected int lastModifiersStart = -1;
 	/* recovery */
 	int[] blockStarts = new int[30];
 
@@ -357,7 +359,7 @@ protected void consumeExplicitConstructorInvocation(int flag, int recFlag) {
 }
 protected void consumeForceNoDiet() {
 	super.consumeForceNoDiet();
-	// if we are not in a method (ie. we are not in a local variable initializer)
+	// if we are not in a method (i.e. we are not in a local variable initializer)
 	// then we are entering a field initializer
 	if (!isInsideMethod()) {
 		if(topKnownElementKind(ASSIST_PARSER) != K_ENUM_CONSTANT_DELIMITER) {
@@ -578,7 +580,7 @@ protected void consumePackageDeclarationNameWithModifiers() {
 }
 protected void consumeRestoreDiet() {
 	super.consumeRestoreDiet();
-	// if we are not in a method (ie. we were not in a local variable initializer)
+	// if we are not in a method (i.e. we were not in a local variable initializer)
 	// then we are exiting a field initializer
 	if (!isInsideMethod()) {
 		popElement(K_FIELD_INITIALIZER_DELIMITER);
@@ -763,13 +765,13 @@ protected void consumeToken(int token) {
 					case TokenNameIdentifier:
 						this.pushOnElementStack(K_SELECTOR, this.identifierPtr);
 						break;
-					case TokenNamethis: // explicit constructor invocation, eg. this(1, 2)
+					case TokenNamethis: // explicit constructor invocation, e.g. this(1, 2)
 						this.pushOnElementStack(K_SELECTOR, THIS_CONSTRUCTOR);
 						break;
-					case TokenNamesuper: // explicit constructor invocation, eg. super(1, 2)
+					case TokenNamesuper: // explicit constructor invocation, e.g. super(1, 2)
 						this.pushOnElementStack(K_SELECTOR, SUPER_CONSTRUCTOR);
 						break;
-					case TokenNameGREATER: // explicit constructor invocation, eg. Fred<X>[(]1, 2)
+					case TokenNameGREATER: // explicit constructor invocation, e.g. Fred<X>[(]1, 2)
 					case TokenNameRIGHT_SHIFT: // or fred<X<X>>[(]1, 2)
 					case TokenNameUNSIGNED_RIGHT_SHIFT: //or Fred<X<X<X>>>[(]1, 2)
 						if(this.identifierPtr > -1) {
@@ -1118,10 +1120,10 @@ protected int indexOfAssistIdentifier(){
 	return this.indexOfAssistIdentifier(false);
 }
 /*
- * Iterate the most recent group of awaiting identifiers (grouped for qualified name reference (eg. aa.bb.cc)
+ * Iterate the most recent group of awaiting identifiers (grouped for qualified name reference (e.g. aa.bb.cc)
  * so as to check whether one of them is the assist identifier.
  * If so, then answer the index of the assist identifier (0 being the first identifier of the set).
- *	eg. aa(0).bb(1).cc(2)
+ *	e.g. aa(0).bb(1).cc(2)
  * If no assist identifier was found, answers -1.
  */
 protected int indexOfAssistIdentifier(boolean useGenericsStack){
@@ -1269,7 +1271,11 @@ public void parseBlockStatements(ConstructorDeclaration cd, CompilationUnitDecla
 	//convert bugs into parse error
 
 	initialize();
-
+	// set the lastModifiers to reflect the modifiers of the constructor whose
+	// block statements are being parsed
+	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634
+	this.lastModifiers = cd.modifiers;
+	this.lastModifiersStart = cd.modifiersSourceStart;
 	// simulate goForConstructorBody except that we don't want to balance brackets because they are not going to be balanced
 	goForBlockStatementsopt();
 
@@ -1335,7 +1341,11 @@ public void parseBlockStatements(
 	CompilationUnitDeclaration unit) {
 
 	initialize();
-
+	// set the lastModifiers to reflect the modifiers of the initializer whose
+	// block statements are being parsed
+	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634
+	this.lastModifiers = initializer.modifiers;
+	this.lastModifiersStart = initializer.modifiersSourceStart;
 	// simulate goForInitializer except that we don't want to balance brackets because they are not going to be balanced
 	goForBlockStatementsopt();
 
@@ -1392,7 +1402,11 @@ public void parseBlockStatements(MethodDeclaration md, CompilationUnitDeclaratio
 		return;
 
 	initialize();
-
+	// set the lastModifiers to reflect the modifiers of the method whose
+	// block statements are being parsed
+	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202634
+	this.lastModifiers = md.modifiers;
+	this.lastModifiersStart = md.modifiersSourceStart;
 	// simulate goForMethodBody except that we don't want to balance brackets because they are not going to be balanced
 	goForBlockStatementsopt();
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
index 1553a6a..14f9a01 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
@@ -296,7 +296,7 @@ public abstract class Engine implements ITypeRequestor {
 			int length = methods.length;
 			for (int i = 0; i < length; i++) {
 				AbstractMethodDeclaration method = methods[i];
-				if (method.bodyStart > position)
+				if (method.bodyStart > position + 1)
 					continue;
 
 				if(method.isDefaultConstructor())
diff --git a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
index 1f718ee..9d7b828 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
@@ -41,6 +41,7 @@ public class SelectionParser extends AssistParser {
 	// KIND : all values known by SelectionParser are between 1025 and 1549
 	protected static final int K_BETWEEN_CASE_AND_COLON = SELECTION_PARSER + 1; // whether we are inside a block
 	protected static final int K_INSIDE_RETURN_STATEMENT = SELECTION_PARSER + 2; // whether we are between the keyword 'return' and the end of a return statement
+	protected static final int K_CAST_STATEMENT = SELECTION_PARSER + 3; // whether we are between ')' and the end of a cast statement
 	
 
 	public ASTNode assistNodeParent; // the parent node of assist node
@@ -129,6 +130,17 @@ private void buildMoreCompletionContext(Expression expression) {
 					this.assistNodeParent = parentNode;
 				}
 				break nextElement;
+			case K_CAST_STATEMENT :
+				Expression castType;
+				if(this.expressionPtr > 0
+					&& ((castType = this.expressionStack[this.expressionPtr-1]) instanceof TypeReference)) {
+					CastExpression cast = new CastExpression(expression, castType);
+					cast.sourceStart = castType.sourceStart;
+					cast.sourceEnd= expression.sourceEnd;
+					parentNode = cast;
+					this.assistNodeParent = parentNode;
+				}
+				break nextElement;
 		}
 	}
 	if(parentNode != null) {
@@ -249,6 +261,26 @@ protected void consumeArrayCreationExpressionWithInitializer() {
 		this.isOrphanCompletionNode = true;
 	}
 }
+protected void consumeCastExpressionLL1() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionLL1();
+}
+protected void consumeCastExpressionWithGenericsArray() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionWithGenericsArray();
+}
+protected void consumeCastExpressionWithNameArray() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionWithNameArray();
+}
+protected void consumeCastExpressionWithPrimitiveType() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionWithPrimitiveType();
+}
+protected void consumeCastExpressionWithQualifiedGenericsArray() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionWithQualifiedGenericsArray();
+}
 protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() {
 	// ClassInstanceCreationExpression ::= Primary '.' 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
 	// ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
@@ -562,6 +594,18 @@ protected void consumeFormalParameter(boolean isVarArgs) {
 		this.listLength++;
 	}
 }
+protected void consumeInsideCastExpression() {
+	super.consumeInsideCastExpression();
+	pushOnElementStack(K_CAST_STATEMENT);
+}
+protected void consumeInsideCastExpressionLL1() {
+	super.consumeInsideCastExpressionLL1();
+	pushOnElementStack(K_CAST_STATEMENT);
+}
+protected void consumeInsideCastExpressionWithQualifiedGenerics() {
+	super.consumeInsideCastExpressionWithQualifiedGenerics();
+	pushOnElementStack(K_CAST_STATEMENT);
+}
 protected void consumeInstanceOfExpression() {
 	if (indexOfAssistIdentifier() < 0) {
 		super.consumeInstanceOfExpression();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
index 371e85e..8ce36b2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CharOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -2097,7 +2097,7 @@ public static final int indexOf(final char[] toBeFound, final char[] array, fina
 public static final int indexOf(final char[] toBeFound, final char[] array, final boolean isCaseSensitive, final int start, final int end) {
 	final int arrayLength = end;
 	final int toBeFoundLength = toBeFound.length;
-	if (toBeFoundLength > arrayLength) return -1;
+	if (toBeFoundLength > arrayLength || start < 0) return -1;
 	if (toBeFoundLength == 0) return 0;
 	if (toBeFoundLength == arrayLength) {
 		if (isCaseSensitive) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index c7489a9..d821fe5 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -115,7 +115,8 @@
  *								   RedundantSuperinterface
  *		Benjamin Muskalla - added the following constants
  *									MissingSynchronizedModifierInInheritedMethod
- *									
+ *		Stephan Herrmann  - added the following constants
+ *									UnusedObjectAllocation									
  *******************************************************************************/
 package org.eclipse.jdt.core.compiler;
 
@@ -356,6 +357,8 @@ void setSourceStart(int sourceStart);
 	int FinalFieldAssignment = FieldRelated + 80;
 	int UninitializedBlankFinalField = FieldRelated + 81;
 	int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
+	/** @since 3.6 */
+	int UnresolvedVariable = FieldRelated + 83;
 
 	// variable hiding
 	/** @since 3.0 */
@@ -426,6 +429,8 @@ void setSourceStart(int sourceStart);
 	int UnhandledExceptionInImplicitConstructorCall = TypeRelated + 147;
 
 	// expressions
+	/** @since 3.6 */
+	int UnusedObjectAllocation = Internal + 148;
 	/** @since 3.5 */
 	int DeadCode = Internal + 149;
 	int ArrayReferenceRequired = Internal + 150;
@@ -1123,6 +1128,8 @@ void setSourceStart(int sourceStart);
 	int IncompatibleTypesInForeach = TypeRelated + 580;
 	/** @since 3.1 */
 	int InvalidTypeForCollection = Internal + 581;
+	/** @since 3.6*/
+	int InvalidTypeForCollectionTarget14 = Internal + 582;
 
 	/**
 	 * 1.5 Syntax errors (when source level < 1.5)
@@ -1223,6 +1230,8 @@ void setSourceStart(int sourceStart);
 	int MethodMustOverrideOrImplement = MethodRelated + 634;
 	/** @since 3.4 */
 	int UnusedWarningToken = Internal + 635;
+	/** @since 3.6 */
+	int MissingOverrideAnnotationForInterfaceMethodImplementation = MethodRelated + 636;
 
 	/**
 	 * More problems in generics
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index fa860f0..a9cd269 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -191,6 +191,7 @@ public class ClassFile implements TypeConstants, TypeIds {
 					AbstractMethodDeclaration methodDecl = methodDecls[i];
 					MethodBinding method = methodDecl.binding;
 					if (method == null || method.isConstructor()) continue;
+					method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
 					classFile.addAbstractMethod(methodDecl, method);
 				}
 			} else {
@@ -209,7 +210,6 @@ public class ClassFile implements TypeConstants, TypeIds {
 			}
 			// add abstract methods
 			classFile.addDefaultAbstractMethods();
-			//classFile.addSpecialMethods();
 		}
 
 		// propagate generation of (problem) member types
@@ -260,17 +260,14 @@ public class ClassFile implements TypeConstants, TypeIds {
 
 	/**
 	 * INTERNAL USE-ONLY
-	 * Generate the byte for a problem method info that correspond to a boggus method.
+	 * Generate the byte for a problem method info that correspond to a bogus method.
 	 *
 	 * @param method org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration
 	 * @param methodBinding org.eclipse.jdt.internal.compiler.nameloopkup.MethodBinding
 	 */
 	public void addAbstractMethod(
-		AbstractMethodDeclaration method,
-		MethodBinding methodBinding) {
-
-		// force the modifiers to be public and abstract
-		methodBinding.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
+			AbstractMethodDeclaration method,
+			MethodBinding methodBinding) {
 
 		this.generateMethodInfoHeader(methodBinding);
 		int methodAttributeOffset = this.contentsOffset;
@@ -401,7 +398,7 @@ public class ClassFile implements TypeConstants, TypeIds {
 			this.contents[this.contentsOffset++] = methodIndexByte2;
 			attributesNumber++;
 		}
-		if (this.targetJDK >= ClassFileConstants.JDK1_5) {
+		if (this.targetJDK >= ClassFileConstants.JDK1_4) {
 			TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
 			if (typeDeclaration != null) {
 				final Annotation[] annotations = typeDeclaration.annotations;
@@ -673,7 +670,7 @@ public class ClassFile implements TypeConstants, TypeIds {
 			this.contents[this.contentsOffset++] = (byte) signatureIndex;
 			attributesNumber++;
 		}
-		if (this.targetJDK >= ClassFileConstants.JDK1_5) {
+		if (this.targetJDK >= ClassFileConstants.JDK1_4) {
 			FieldDeclaration fieldDeclaration = fieldBinding.sourceField();
 			if (fieldDeclaration != null) {
 				Annotation[] annotations = fieldDeclaration.annotations;
@@ -6290,7 +6287,7 @@ public class ClassFile implements TypeConstants, TypeIds {
 			this.contents[this.contentsOffset++] = (byte) signatureIndex;
 			attributeNumber++;
 		}
-		if (this.targetJDK >= ClassFileConstants.JDK1_5) {
+		if (this.targetJDK >= ClassFileConstants.JDK1_4) {
 			AbstractMethodDeclaration methodDeclaration = methodBinding.sourceMethod();
 			if (methodDeclaration != null) {
 				Annotation[] annotations = methodDeclaration.annotations;
@@ -6856,9 +6853,6 @@ public class ClassFile implements TypeConstants, TypeIds {
 		this.header[this.headerOffset++] = (byte) (0xCAFEBABEL >> 0);
 
 		long targetVersion = this.targetJDK;
-		if (targetVersion == ClassFileConstants.JDK1_7) {
-			targetVersion = ClassFileConstants.JDK1_6;
-		}
 		this.header[this.headerOffset++] = (byte) (targetVersion >> 8); // minor high
 		this.header[this.headerOffset++] = (byte) (targetVersion>> 0); // minor low
 		this.header[this.headerOffset++] = (byte) (targetVersion >> 24); // major high
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
index 709399f..f4d1ee3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -330,8 +330,8 @@ public void recordPackageName(char[][] packName) {
 public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) {
 	//new Exception("VERBOSE PROBLEM REPORTING").printStackTrace();
 	if(newProblem.getID() == IProblem.Task) {
-			recordTask(newProblem);
-			return;
+		recordTask(newProblem);
+		return;
 	}
 	if (this.problemCount == 0) {
 		this.problems = new CategorizedProblem[5];
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
index c4341db..32881da 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
@@ -586,16 +586,16 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
 			result
 				.record(
 					this.problemReporter
-					.createProblem(
-						result.getFileName(),
-						IProblem.Unclassified,
-						pbArguments,
-						pbArguments,
-						Error, // severity
-						0, // source start
-						0, // source end
-						0, // line number
-						0),// column number
+						.createProblem(
+							result.getFileName(),
+							IProblem.Unclassified,
+							pbArguments,
+							pbArguments,
+							Error, // severity
+							0, // source start
+							0, // source end
+							0, // line number
+							0),// column number
 					unit);
 
 			/* hand back the compilation result */
@@ -761,7 +761,7 @@ public class Compiler implements ITypeRequestor, ProblemSeverities {
 		long analyzeStart = System.currentTimeMillis();
 		this.stats.resolveTime += analyzeStart - resolveStart;
 		
-		// no need to analyse or generate code if statements are not required
+		//No need of analysis or generation of code if statements are not required		
 		if (!this.options.ignoreMethodBodies) unit.analyseCode(); // flow analysis
 
 		long generateStart = System.currentTimeMillis();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
index 24d1f69..2a1ad18 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 
 package org.eclipse.jdt.internal.compiler;
 
+import java.lang.reflect.InvocationTargetException;
+
 import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
 
 public class ReadManager implements Runnable {
@@ -43,7 +45,12 @@ public ReadManager(ICompilationUnit[] files, int length) {
 			else if (threadCount > CACHE_SIZE)
 				threadCount = CACHE_SIZE;
 		}
-	} catch (Exception ignored) { // ignored
+	} catch (IllegalAccessException ignored) { // ignored
+	} catch (ClassNotFoundException e) { // ignored
+	} catch (SecurityException e) { // ignored
+	} catch (NoSuchMethodException e) { // ignored
+	} catch (IllegalArgumentException e) { // ignored
+	} catch (InvocationTargetException e) { // ignored
 	}
 
 	if (threadCount > 0) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index 6914661..973407e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
 	public final static int Bit5 = 0x10;					// value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl)
 	public final static int Bit6 = 0x20;					// depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) | is recovered (annotation reference)
 	public final static int Bit7 = 0x40;					// depth (name ref, msg) | operator (operator) | need runtime checkcast (cast expression) | label used (labelStatement) | needFreeReturn (AbstractMethodDeclaration)
-	public final static int Bit8 = 0x80;					// depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) | is default constructor (constructor declaration)
-	public final static int Bit9 = 0x100;				// depth (name ref, msg) | operator (operator) | is local type (type decl)
+	public final static int Bit8 = 0x80;					// depth (name ref, msg) | operator (operator) | unsafe cast (cast expression) | is default constructor (constructor declaration) | isElseStatementUnreachable (if statement)
+	public final static int Bit9 = 0x100;				// depth (name ref, msg) | operator (operator) | is local type (type decl) | isThenStatementUnreachable (if statement)
 	public final static int Bit10= 0x200;				// depth (name ref, msg) | operator (operator) | is anonymous type (type decl)
 	public final static int Bit11 = 0x400;				// depth (name ref, msg) | operator (operator) | is member type (type decl)
 	public final static int Bit12 = 0x800;				// depth (name ref, msg) | operator (operator) | has abstract methods (type decl)
@@ -194,6 +194,8 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
 	// for if statement
 	public static final int IsElseIfStatement = Bit30;
 	public static final int ThenExit = Bit31;
+	public static final int IsElseStatementUnreachable = Bit8;
+	public static final int IsThenStatementUnreachable = Bit9;
 
 	// for type reference
 	public static final int IsSuperType = Bit5;
@@ -585,20 +587,50 @@ public abstract class ASTNode implements TypeConstants, TypeIds {
 					case Binding.FIELD :
 						FieldBinding field = (FieldBinding) recipient;
 						field.tagBits = ((FieldBinding) annotationRecipient).tagBits;
+						if (annotations != null) {
+							// need to fill the instances array
+							for (int j = 0; j < length; j++) {
+								Annotation annot = sourceAnnotations[j];
+								annotations[j] = annot.getCompilerAnnotation();
+							}
+						}
 						break;
 					case Binding.LOCAL :
 						LocalVariableBinding local = (LocalVariableBinding) recipient;
-						local.tagBits = ((LocalVariableBinding) annotationRecipient).tagBits;
+						long otherLocalTagBits = ((LocalVariableBinding) annotationRecipient).tagBits;
+						local.tagBits = otherLocalTagBits;
+						if ((otherLocalTagBits & TagBits.AnnotationSuppressWarnings) == 0) {
+							// None of the annotations is a SuppressWarnings annotation
+							// need to fill the instances array
+							if (annotations != null) {
+								for (int j = 0; j < length; j++) {
+									Annotation annot = sourceAnnotations[j];
+									annotations[j] = annot.getCompilerAnnotation();
+								}
+							}
+						} else if (annotations != null) {
+							// One of the annotations at least is a SuppressWarnings annotation
+							LocalDeclaration localDeclaration = local.declaration;
+							int declarationSourceEnd = localDeclaration.declarationSourceEnd;
+							int declarationSourceStart = localDeclaration.declarationSourceStart;
+							for (int j = 0; j < length; j++) {
+								Annotation annot = sourceAnnotations[j];
+								/*
+								 * Annotations are shared between two locals, but we still need to record
+								 * the suppress annotation range for the second local
+								 */
+								AnnotationBinding annotationBinding = annot.getCompilerAnnotation();
+								annotations[j] = annotationBinding;
+								if (annotationBinding != null) {
+									final ReferenceBinding annotationType = annotationBinding.getAnnotationType();
+									if (annotationType != null && annotationType.id == TypeIds.T_JavaLangSuppressWarnings) {
+										annot.recordSuppressWarnings(scope, declarationSourceStart, declarationSourceEnd, scope.compilerOptions().suppressWarnings);
+									}
+								}
+							}
+						}
 						break;
 				}
-				if (annotations != null) {
-					// need to fill the instances array
-					annotations[0] = annotation.getCompilerAnnotation();
-					for (int j = 1; j < length; j++) {
-						Annotation annot = sourceAnnotations[j];
-						annotations[j] = annot.getCompilerAnnotation();
-					}
-				}
 				return;
 			} else {
 				annotation.recipient = recipient;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index 0bceab7..c01b5a6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -241,7 +241,11 @@ public abstract class AbstractMethodDeclaration
 			// local variable attributes
 			codeStream.exitUserScope(this.scope);
 			codeStream.recordPositionsFrom(0, this.declarationSourceEnd);
-			classFile.completeCodeAttribute(codeAttributeOffset);
+			try {
+				classFile.completeCodeAttribute(codeAttributeOffset);
+			} catch(NegativeArraySizeException e) {
+				throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
+			}
 			attributeNumber++;
 		} else {
 			checkArgumentsSize();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
index bbe8d96..ab66d39 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,11 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
 public abstract class AbstractVariableDeclaration extends Statement implements InvocationSite {
 	public int declarationEnd;
+	/**
+	 * For local declarations (outside of for statement initialization) and field declarations,
+	 * the declarationSourceEnd covers multiple locals if any.
+	 * For local declarations inside for statement initialization, this is not the case.
+	 */
 	public int declarationSourceEnd;
 	public int declarationSourceStart;
 	public int hiddenVariableDepth; // used to diagnose hiding scenarii
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index f808070..56d0b91 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for bug 236385
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -82,8 +83,11 @@ public Expression enclosingInstance() {
 }
 
 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+	if (!valueRequired)
+		currentScope.problemReporter().unusedObjectAllocation(this);
+
 	int pc = codeStream.position;
-	 MethodBinding codegenBinding = this.binding.original();
+	MethodBinding codegenBinding = this.binding.original();
 	ReferenceBinding allocatedType = codegenBinding.declaringClass;
 
 	codeStream.new_(allocatedType);
@@ -197,7 +201,7 @@ public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo f
 	if (codegenBinding.isPrivate() && currentScope.enclosingSourceType() != (declaringClass = codegenBinding.declaringClass)) {
 
 		// from 1.4 on, local type constructor can lose their private flag to ease emulation
-		if ((declaringClass.tagBits & TagBits.IsLocalType) != 0 	&& currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
+		if ((declaringClass.tagBits & TagBits.IsLocalType) != 0 && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
 			// constructor will not be dumped as private, no emulation required thus
 			codegenBinding.tagBits |= TagBits.ClearPrivateModifier;
 		} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
index 23a47e0..cb47efc 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
@@ -54,6 +54,14 @@ public class Argument extends LocalDeclaration {
 
 		if (this.binding == null) {
 			this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, true);
+		} else if (!this.binding.type.isValidBinding()) {
+			AbstractMethodDeclaration methodDecl = scope.referenceMethod();
+			if (methodDecl != null) {
+				MethodBinding methodBinding = methodDecl.binding;
+				if (methodBinding != null) {
+					methodBinding.tagBits |= TagBits.HasUnresolvedArguments;
+				}
+			}
 		}
 		scope.addLocalVariable(this.binding);
 		resolveAnnotations(scope, this.annotations, this.binding);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
index 3b29f42..bab16b3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,8 +44,10 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 	Constant cst = this.assertExpression.optimizedBooleanConstant();
 	boolean isOptimizedTrueAssertion = cst != Constant.NotAConstant && cst.booleanValue() == true;
 	boolean isOptimizedFalseAssertion = cst != Constant.NotAConstant && cst.booleanValue() == false;
-
+	
+	flowContext.tagBits |= FlowContext.HIDE_NULL_COMPARISON_WARNING;
 	FlowInfo conditionFlowInfo = this.assertExpression.analyseCode(currentScope, flowContext, flowInfo.copy());
+	flowContext.tagBits &= ~FlowContext.HIDE_NULL_COMPARISON_WARNING;
 	UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo.initsWhenTrue().unconditionalInits();
 	FlowInfo assertInfo = conditionFlowInfo.initsWhenFalse();
 	if (isOptimizedTrueAssertion) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
index c63b73c..ec68428 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,9 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 // a field reference, a blank final field reference, a field of an enclosing instance or
 // just a local variable.
 	LocalVariableBinding local = this.lhs.localVariableBinding();
+	flowInfo = ((Reference) this.lhs)
+		.analyseAssignment(currentScope, flowContext, flowInfo, this, false)
+		.unconditionalInits();
 	int nullStatus = this.expression.nullStatus(flowInfo);
 	if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) {
 		if (nullStatus == FlowInfo.NULL) {
@@ -44,9 +47,6 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 				FlowContext.CAN_ONLY_NULL | FlowContext.IN_ASSIGNMENT, flowInfo);
 		}
 	}
-	flowInfo = ((Reference) this.lhs)
-		.analyseAssignment(currentScope, flowContext, flowInfo, this, false)
-		.unconditionalInits();
 	if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) {
 		switch(nullStatus) {
 			case FlowInfo.NULL :
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
index 057e61b..cb789a4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
@@ -119,8 +119,8 @@ public void traverse(ASTVisitor visitor, BlockScope blockScope) {
  * Dispatch the call on its last statement.
  */
 public void branchChainTo(BranchLabel label) {
-	 if (this.statements != null) {
-	 	this.statements[this.statements.length - 1].branchChainTo(label);
-	 }
+	if (this.statements != null) {
+		this.statements[this.statements.length - 1].branchChainTo(label);
+	}
 }
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
index a40bb85..7eb4c34 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
@@ -87,7 +87,7 @@ public void resolve(BlockScope scope) {
  */
 public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
 	// switchExpressionType maybe null in error case
-    scope.enclosingCase = this; // record entering in a switch case block
+	scope.enclosingCase = this; // record entering in a switch case block
 
 	if (this.constantExpression == null) {
 		// remember the default case into the associated switch statement
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
index 37cd7f0..5c4c539 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -115,31 +115,17 @@ public static void checkNeedForArgumentCast(BlockScope scope, int operator, int
 	if (scope.compilerOptions().getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
 
 	// check need for left operand cast
-	int alternateLeftTypeId = expressionTypeId;
 	if ((expression.bits & ASTNode.UnnecessaryCast) == 0 && expression.resolvedType.isBaseType()) {
 		// narrowing conversion on base type may change value, thus necessary
 		return;
-	} else  {
+	} else {
 		TypeBinding alternateLeftType = ((CastExpression)expression).expression.resolvedType;
 		if (alternateLeftType == null) return; // cannot do better
-		if ((alternateLeftTypeId = alternateLeftType.id) == expressionTypeId) { // obvious identity cast
+		if (alternateLeftType.id == expressionTypeId) { // obvious identity cast
 			scope.problemReporter().unnecessaryCast((CastExpression)expression);
 			return;
-		} else if (alternateLeftTypeId == TypeIds.T_null) {
-			alternateLeftTypeId = expressionTypeId;  // tolerate null argument cast
-			return;
 		}
 	}
-/*		tolerate widening cast in unary expressions, as may be used when combined in binary expressions (41680)
-		int alternateOperatorSignature = OperatorExpression.OperatorSignatures[operator][(alternateLeftTypeId << 4) + alternateLeftTypeId];
-		// (cast)  left   Op (cast)  right --> result
-		//  1111   0000       1111   0000     1111
-		//  <<16   <<12       <<8    <<4       <<0
-		final int CompareMASK = (0xF<<16) + (0xF<<8) + 0xF; // mask hiding compile-time types
-		if ((operatorSignature & CompareMASK) == (alternateOperatorSignature & CompareMASK)) { // same promotions and result
-			scope.problemReporter().unnecessaryCastForArgument((CastExpression)expression,  TypeBinding.wellKnownType(scope, expression.implicitConversion >> 4));
-		}
-*/
 }
 
 /**
@@ -199,7 +185,7 @@ public static void checkNeedForArgumentCasts(BlockScope scope, int operator, int
 		} else  {
 			TypeBinding alternateLeftType = ((CastExpression)left).expression.resolvedType;
 			if (alternateLeftType == null) return; // cannot do better
-			if ((alternateLeftTypeId = alternateLeftType.id) == leftTypeId) { // obvious identity cast
+			if ((alternateLeftTypeId = alternateLeftType.id) == leftTypeId || scope.environment().computeBoxingType(alternateLeftType).id == leftTypeId) { // obvious identity cast
 				scope.problemReporter().unnecessaryCast((CastExpression)left);
 				leftIsCast = false;
 			} else if (alternateLeftTypeId == TypeIds.T_null) {
@@ -217,7 +203,7 @@ public static void checkNeedForArgumentCasts(BlockScope scope, int operator, int
 		} else {
 			TypeBinding alternateRightType = ((CastExpression)right).expression.resolvedType;
 			if (alternateRightType == null) return; // cannot do better
-			if ((alternateRightTypeId = alternateRightType.id) == rightTypeId) { // obvious identity cast
+			if ((alternateRightTypeId = alternateRightType.id) == rightTypeId || scope.environment().computeBoxingType(alternateRightType).id == rightTypeId) { // obvious identity cast
 				scope.problemReporter().unnecessaryCast((CastExpression)right);
 				rightIsCast = false;
 			} else if (alternateRightTypeId == TypeIds.T_null) {
@@ -258,6 +244,7 @@ private static void checkAlternateBinding(BlockScope scope, Expression receiver,
 			public void setFieldIndex(int depth){ /* ignore */}
 			public int sourceStart() { return 0; }
 			public int sourceEnd() { return 0; }
+			public TypeBinding expectedType() { return invocationSite.expectedType(); }
 		};
 		MethodBinding bindingIfNoCast;
 		if (binding.isConstructor()) {
@@ -311,7 +298,7 @@ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding ex
 	}
 	switch (castType.kind()) {
 		case Binding.PARAMETERIZED_TYPE :
-			if (castType.isBoundParameterizedType()) {
+			if (!castType.isReifiable()) {
 				if (match == null) { // unrelated types
 					this.bits |= ASTNode.UnsafeCast;
 					return true;
@@ -330,7 +317,7 @@ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding ex
 							ParameterizedTypeBinding paramMatch = (ParameterizedTypeBinding) match;
 							// easy case if less parameters on match
 							TypeBinding[] castArguments = paramCastType.arguments;
-							int length = castArguments.length;
+							int length = castArguments == null ? 0 : castArguments.length;
 							if (paramMatch.arguments == null || length > paramMatch.arguments.length) {
 								this.bits |= ASTNode.UnsafeCast;
 							} else if ((paramCastType.tagBits & (TagBits.HasDirectWildcard|TagBits.HasTypeVariable)) != 0) {
@@ -379,7 +366,7 @@ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding ex
 			break;
 		case Binding.ARRAY_TYPE :
 			TypeBinding leafType = castType.leafComponentType();
-			if (isNarrowing && (leafType.isBoundParameterizedType() || leafType.isTypeVariable())) {
+			if (isNarrowing && (!leafType.isReifiable() || leafType.isTypeVariable())) {
 				this.bits |= ASTNode.UnsafeCast;
 				return true;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
index 1950ac5..8741654 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -278,7 +278,11 @@ public class Clinit extends AbstractMethodDeclaration {
 			}
 			// Record the end of the clinit: point to the declaration of the class
 			codeStream.recordPositionsFrom(0, declaringType.sourceStart);
-			classFile.completeCodeAttributeForClinit(codeAttributeOffset);
+			try {
+				classFile.completeCodeAttributeForClinit(codeAttributeOffset);
+			} catch(NegativeArraySizeException e) {
+				throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
index e7b4e90..b9e19f2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann  - Contribution for bug 295551
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -15,7 +16,6 @@ import java.util.Comparator;
 
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
@@ -194,7 +194,7 @@ public void createPackageInfoType() {
  * Finds the matching type amoung this compilation unit types.
  * Returns null if no type with this name is found.
  * The type name is a compound name
- * eg. if we're looking for X.A.B then a type name would be {X, A, B}
+ * e.g. if we're looking for X.A.B then a type name would be {X, A, B}
  */
 public TypeDeclaration declarationOfType(char[][] typeName) {
 	for (int i = 0; i < this.types.length; i++) {
@@ -213,20 +213,23 @@ public void finalizeProblems() {
 	int problemCount = this.compilationResult.problemCount;
 	IrritantSet[] foundIrritants = new IrritantSet[this.suppressWarningsCount];
 	CompilerOptions options = this.scope.compilerOptions();
-	boolean hasErrors = false;
+	boolean hasMandatoryErrors = false;
 	nextProblem: for (int iProblem = 0, length = problemCount; iProblem < length; iProblem++) {
 		CategorizedProblem problem = problems[iProblem];
 		int problemID = problem.getID();
+		int irritant = ProblemReporter.getIrritant(problemID);
 		if (problem.isError()) {
-			if (problemID != IProblem.UnusedWarningToken) {
-			// tolerate unused warning tokens which were promoted as errors
-				hasErrors = true;
+			if (irritant == 0) {
+				// tolerate unused warning tokens when mandatory errors
+				hasMandatoryErrors = true;
+				continue;
+			}
+			if (!options.suppressOptionalErrors) {
+				continue;
 			}
-			continue;
 		}
 		int start = problem.getSourceStart();
 		int end = problem.getSourceEnd();
-		int irritant = ProblemReporter.getIrritant(problemID);
 		nextSuppress: for (int iSuppress = 0, suppressCount = this.suppressWarningsCount; iSuppress < suppressCount; iSuppress++) {
 			long position = this.suppressWarningScopePositions[iSuppress];
 			int startSuppress = (int) (position >>> 32);
@@ -263,7 +266,7 @@ public void finalizeProblems() {
 		this.compilationResult.problemCount -= removed;
 	}
 	// flag SuppressWarnings which had no effect (only if no (mandatory) error got detected within unit
-	if (!hasErrors) {
+	if (!hasMandatoryErrors) {
 		int severity = options.getSeverity(CompilerOptions.UnusedWarningToken);
 		if (severity != ProblemSeverities.Ignore) {
 			boolean unusedWarningTokenIsWarning = (severity & ProblemSeverities.Error) == 0;
@@ -288,7 +291,7 @@ public void finalizeProblems() {
 											IrritantSet tokenIrritants = CompilerOptions.warningTokenToIrritants(cst.stringValue());
 											if (tokenIrritants != null
 													&& !tokenIrritants.areAllSet() // no complaint against @SuppressWarnings("all")
-													&& options.isAnyEnabled(tokenIrritants) // if irritant is effectevely enabled
+													&& options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
 													&& (foundIrritants[iSuppress] == null || !foundIrritants[iSuppress].isAnySet(tokenIrritants))) { // if irritant had no matching problem
 												if (unusedWarningTokenIsWarning) {
 													int start = value.sourceStart, end = value.sourceEnd;
@@ -312,7 +315,7 @@ public void finalizeProblems() {
 									IrritantSet tokenIrritants = CompilerOptions.warningTokenToIrritants(cst.stringValue());
 									if (tokenIrritants != null
 											&& !tokenIrritants.areAllSet() // no complaint against @SuppressWarnings("all")
-											&& options.isAnyEnabled(tokenIrritants) // if irritant is effectevely enabled
+											&& options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
 											&& (foundIrritants[iSuppress] == null || !foundIrritants[iSuppress].isAnySet(tokenIrritants))) { // if irritant had no matching problem
 										if (unusedWarningTokenIsWarning) {
 											int start = value.sourceStart, end = value.sourceEnd;
@@ -474,9 +477,18 @@ public void recordSuppressWarnings(IrritantSet irritants, Annotation annotation,
 		System.arraycopy(this.suppressWarningAnnotations, 0,this.suppressWarningAnnotations = new Annotation[2*this.suppressWarningsCount], 0, this.suppressWarningsCount);
 		System.arraycopy(this.suppressWarningScopePositions, 0,this.suppressWarningScopePositions = new long[2*this.suppressWarningsCount], 0, this.suppressWarningsCount);
 	}
+	final long scopePositions = ((long)scopeStart<<32) + scopeEnd;
+	for (int i = 0, max = this.suppressWarningsCount; i < max; i++) {
+		if (this.suppressWarningAnnotations[i] == annotation
+				&& this.suppressWarningScopePositions[i] == scopePositions
+				&& this.suppressWarningIrritants[i].hasSameIrritants(irritants)) {
+			// annotation data already recorded
+			return;
+		}
+	}
 	this.suppressWarningIrritants[this.suppressWarningsCount] = irritants;
 	this.suppressWarningAnnotations[this.suppressWarningsCount] = annotation;
-	this.suppressWarningScopePositions[this.suppressWarningsCount++] = ((long)scopeStart<<32) + scopeEnd;
+	this.suppressWarningScopePositions[this.suppressWarningsCount++] = scopePositions;
 }
 
 /*
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
index c2a96d9..e323760 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
@@ -107,6 +107,9 @@ public int nullStatus(FlowInfo flowInfo) {
 			scope.problemReporter().expressionShouldBeAVariable(this.lhs);
 			return null;
 		}
+		boolean expressionIsCast = this.expression instanceof CastExpression;
+		if (expressionIsCast)
+			this.expression.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on
 		TypeBinding originalLhsType = this.lhs.resolveType(scope);
 		TypeBinding originalExpressionType = this.expression.resolveType(scope);
 		if (originalLhsType == null || originalExpressionType == null)
@@ -181,6 +184,8 @@ public int nullStatus(FlowInfo flowInfo) {
 		this.expression.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 8) & 0x0000F), originalExpressionType);
 		this.preAssignImplicitConversion =  (unboxedLhs ? BOXING : 0) | (lhsID << 4) | (result & 0x0000F);
 		if (unboxedLhs) scope.problemReporter().autoboxing(this, lhsType, originalLhsType);
+		if (expressionIsCast)
+			CastExpression.checkNeedForArgumentCasts(scope, this.operator, result, this.lhs, originalLhsType.id, false, this.expression, originalExpressionType.id, true);
 		return this.resolvedType = originalLhsType;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
index 2cb3ba1..a45688b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
@@ -41,7 +41,8 @@ public class ConditionalExpression extends OperatorExpression {
 	}
 
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
-		FlowInfo flowInfo) {
+			FlowInfo flowInfo) {
+		int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMPLAINED;
 		Constant cst = this.condition.optimizedBooleanConstant();
 		boolean isConditionOptimizedTrue = cst != Constant.NotAConstant && cst.booleanValue() == true;
 		boolean isConditionOptimizedFalse = cst != Constant.NotAConstant && cst.booleanValue() == false;
@@ -53,9 +54,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
 		FlowInfo trueFlowInfo = flowInfo.initsWhenTrue().copy();
 		if (isConditionOptimizedFalse) {
 			if ((mode & FlowInfo.UNREACHABLE) == 0) {
-				currentScope.problemReporter().fakeReachable(this.valueIfTrue);
 				trueFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
 			}
+			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
+				this.valueIfTrue.complainIfUnreachable(trueFlowInfo, currentScope, initialComplaintLevel);
+			}
 		}
 		this.trueInitStateIndex = currentScope.methodScope().recordInitializationStates(trueFlowInfo);
 		trueFlowInfo = this.valueIfTrue.analyseCode(currentScope, flowContext, trueFlowInfo);
@@ -64,9 +67,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
 		FlowInfo falseFlowInfo = flowInfo.initsWhenFalse().copy();
 		if (isConditionOptimizedTrue) {
 			if ((mode & FlowInfo.UNREACHABLE) == 0) {
-				currentScope.problemReporter().fakeReachable(this.valueIfFalse);
 				falseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
 			}
+			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
+				this.valueIfFalse.complainIfUnreachable(falseFlowInfo, currentScope, initialComplaintLevel);
+			}
 		}
 		this.falseInitStateIndex = currentScope.methodScope().recordInitializationStates(falseFlowInfo);
 		falseFlowInfo = this.valueIfFalse.analyseCode(currentScope, flowContext, falseFlowInfo);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index f15354a..2ca39ce 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -161,7 +161,9 @@ public void analyseCode(ClassScope classScope, InitializationFlowContext initial
 		}
 
 		// reuse the initial reach mode for diagnosing missing blank finals
-		flowInfo.setReachMode(initialReachMode);
+		// no, we should use the updated reach mode for diagnosing uninitialized blank finals.
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=235781
+		// flowInfo.setReachMode(initialReachMode);
 
 		// check missing blank final field initializations
 		if ((this.constructorCall != null)
@@ -355,7 +357,11 @@ private void internalGenerateCode(ClassScope classScope, ClassFile classFile) {
 		// local variable attributes
 		codeStream.exitUserScope(this.scope);
 		codeStream.recordPositionsFrom(0, this.bodyEnd);
-		classFile.completeCodeAttribute(codeAttributeOffset);
+		try {
+			classFile.completeCodeAttribute(codeAttributeOffset);
+		} catch(NegativeArraySizeException e) {
+			throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
+		}
 		attributeNumber++;
 		if ((codeStream instanceof StackMapFrameCodeStream)
 				&& needFieldInitializations
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
index 3228d46..1e00810 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -101,7 +101,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 				actionInfo.addPotentialNullInfoFrom(
 				  condInfo.initsWhenTrue().unconditionalInits()));
 	}
-
+	if (loopingContext.hasEscapingExceptions()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+		FlowInfo loopbackFlowInfo = flowInfo.copy();
+		loopbackFlowInfo.mergedWith(condInfo.initsWhenTrue().unconditionalCopy());
+		loopingContext.simulateThrowAfterLoopBack(loopbackFlowInfo);
+	}
 	// end of loop
 	FlowInfo mergedInfo = 
 		FlowInfo.mergedOptimizedBranches(
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
index e4d3c25..87c25cb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,6 +47,9 @@ public class EqualExpression extends BinaryExpression {
 					initsWhenTrue.markAsComparedEqualToNonNull(local); // from thereon it is set
 					initsWhenFalse.markAsComparedEqualToNull(local); // from thereon it is set
 				}
+				if ((flowContext.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) != 0) {
+					flowInfo.markedAsNullOrNonNullInAssertExpression(local);
+				}
 				break;
 			case FlowInfo.NON_NULL :
 				if (((this.bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL) {
@@ -811,9 +814,16 @@ public class EqualExpression extends BinaryExpression {
 
 			// check whether comparing identical expressions
 			Binding leftDirect = Expression.getDirectBinding(this.left);
-			if (leftDirect != null && leftDirect == Expression.getDirectBinding(this.right)
-					&& !(this.right instanceof Assignment)) {
-				scope.problemReporter().comparingIdenticalExpressions(this);
+			if (leftDirect != null && leftDirect == Expression.getDirectBinding(this.right)) {
+				if (leftTypeID != TypeIds.T_double && leftTypeID != TypeIds.T_float
+						&&(!(this.right instanceof Assignment))) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=281776
+					scope.problemReporter().comparingIdenticalExpressions(this);
+			} else if (this.constant != Constant.NotAConstant) {
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=276740
+				int operator = (this.bits & OperatorMASK) >> OperatorSHIFT;
+				if ((operator == EQUAL_EQUAL && this.constant == BooleanConstant.fromValue(true))
+						|| (operator == NOT_EQUAL && this.constant == BooleanConstant.fromValue(false)))
+					scope.problemReporter().comparingIdenticalExpressions(this);
 			}
 			return this.resolvedType = TypeBinding.BOOLEAN;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index 9a83c44..03072e8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -216,7 +216,7 @@ public class ExplicitConstructorCall extends Statement implements InvocationSite
 			if (this.binding.isPrivate() && this.accessMode != ExplicitConstructorCall.This) {
 				ReferenceBinding declaringClass = codegenBinding.declaringClass;
 				// from 1.4 on, local type constructor can lose their private flag to ease emulation
-				if ((declaringClass.tagBits & TagBits.IsLocalType) != 0 	&& currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
+				if ((declaringClass.tagBits & TagBits.IsLocalType) != 0 && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
 					// constructor will not be dumped as private, no emulation required thus
 					codegenBinding.tagBits |= TagBits.ClearPrivateModifier;
 				} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
index 07e2f6b..6b63f80 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -444,7 +444,7 @@ public final boolean checkCastTypesCompatibility(Scope scope, TypeBinding castTy
 						// ( TYPE_PARAMETER ) CLASS
 						match = expressionType.findSuperTypeOriginatingFrom(castType);
 						if (match == null) {
-							checkUnsafeCast(scope, castType, expressionType, match, true);
+							checkUnsafeCast(scope, castType, expressionType, null, true);
 						}
 						// recurse on the type variable upper bound
 						return checkCastTypesCompatibility(scope, ((TypeVariableBinding)castType).upperBound(), expressionType, expression);
@@ -521,7 +521,7 @@ public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding ex
 		if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
 		return true;
 	}
-	if (match != null && (castType.isBoundParameterizedType() || expressionType.isBoundParameterizedType())) {
+	if (match != null && (!castType.isReifiable() || !expressionType.isReifiable())) {
 		if(isNarrowing
 				? match.isProvablyDistinct(expressionType)
 				: castType.isProvablyDistinct(match)) {
@@ -776,6 +776,8 @@ public static Binding getDirectBinding(Expression someExpression) {
 			// case where a static field is retrieved using ClassName.fieldname
 			return qualifiedNameReference.binding;
 		}
+	} else if (someExpression.isThis()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=276741
+		return someExpression.resolvedType;
 	}
 //		} else if (someExpression instanceof PostfixExpression) { // recurse for postfix: i++ --> i
 //			// note: "b = b++" is equivalent to doing nothing, not to "b++"
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
index 4c58e21..2b44591 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,14 +150,11 @@ public void resolve(MethodScope initializationScope) {
 			SourceTypeBinding declaringType = classScope.enclosingSourceType();
 			checkHidingSuperField: {
 				if (declaringType.superclass == null) break checkHidingSuperField;
-				Binding existingVariable = classScope.findField(declaringType.superclass, this.name, this,  false /*do not resolve hidden field*/);
+				FieldBinding existingVariable = classScope.findField(declaringType.superclass, this.name, this,  false /*do not resolve hidden field*/);
 				if (existingVariable == null) break checkHidingSuperField; // keep checking outer scenario
 				if (!existingVariable.isValidBinding())  break checkHidingSuperField; // keep checking outer scenario
-				if (existingVariable instanceof FieldBinding) {
-					FieldBinding existingField = (FieldBinding) existingVariable;
-					if (existingField.original() == this.binding) break checkHidingSuperField; // keep checking outer scenario
-					if (!existingField.canBeSeenBy(declaringType, this, initializationScope)) break checkHidingSuperField; // keep checking outer scenario
-				}
+				if (existingVariable.original() == this.binding) break checkHidingSuperField; // keep checking outer scenario
+				if (!existingVariable.canBeSeenBy(declaringType, this, initializationScope)) break checkHidingSuperField; // keep checking outer scenario
 				// collision with supertype field
 				initializationScope.problemReporter().fieldHiding(this, existingVariable);
 				break checkHiding; // already found a matching field
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index 4c6f3e5..b30571e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,8 @@ import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.InvocationSite;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
+import org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ProblemFieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
@@ -541,8 +543,31 @@ public TypeBinding resolveType(BlockScope scope) {
 			// problem already got signaled on receiver, do not report secondary problem
 			return null;
 		}
-		scope.problemReporter().invalidField(this, this.actualReceiverType);
-		return null;
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
+		// missing super type for anonymous classes ... 
+		ReferenceBinding declaringClass = fieldBinding.declaringClass;
+		boolean avoidSecondary = declaringClass != null &&
+								 declaringClass.isAnonymousType() &&
+								 declaringClass.superclass() instanceof MissingTypeBinding;
+		if (!avoidSecondary) {
+			scope.problemReporter().invalidField(this, this.actualReceiverType);
+		}
+		if (fieldBinding instanceof ProblemFieldBinding) {
+			ProblemFieldBinding problemFieldBinding = (ProblemFieldBinding) fieldBinding;
+			FieldBinding closestMatch = problemFieldBinding.closestMatch;
+			switch(problemFieldBinding.problemId()) {
+				case ProblemReasons.InheritedNameHidesEnclosingName :
+				case ProblemReasons.NotVisible :
+				case ProblemReasons.NonStaticReferenceInConstructorInvocation :
+				case ProblemReasons.NonStaticReferenceInStaticContext :
+					if (closestMatch != null) {
+						fieldBinding = closestMatch;
+					}
+			}
+		}
+		if (!fieldBinding.isValidBinding()) {
+			return null;
+		}
 	}
 	// handle indirect inheritance thru variable secondary bound
 	// receiver may receive generic cast, as part of implicit conversion
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
index 1b92645..7330bb8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -194,7 +194,13 @@ public class ForStatement extends Statement {
 			incrementContext.complainOnDeferredNullChecks(currentScope,
 				actionInfo);
 		}
-
+		if (loopingContext.hasEscapingExceptions()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+			FlowInfo loopbackFlowInfo = flowInfo.copy();
+			if (this.continueLabel != null) {  // we do get to the bottom 
+				loopbackFlowInfo.mergedWith(actionInfo.unconditionalCopy());
+			}
+			loopingContext.simulateThrowAfterLoopBack(loopbackFlowInfo);
+		}
 		//end of loop
 		FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
 				(loopingContext.initsOnBreak.tagBits &
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
index fc068e0..989fcb9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -381,6 +381,7 @@ public class ForeachStatement extends Statement {
 
 		TypeBinding expectedCollectionType = null;
 		if (elementType != null && collectionType != null) {
+			boolean isTargetJsr14 = this.scope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4;
 			if (collectionType.isArrayType()) { // for(E e : E[])
 				this.kind = ARRAY;
 				this.collectionElementType = ((ArrayBinding) collectionType).elementsType();
@@ -414,7 +415,6 @@ public class ForeachStatement extends Statement {
 				}
 			} else if (collectionType instanceof ReferenceBinding) {
 				ReferenceBinding iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaLangIterable, false /*Iterable is not a class*/);
-				boolean isTargetJsr14 = upperScope.compilerOptions().targetJDK == ClassFileConstants.JDK1_4;
 				if (iterableType == null && isTargetJsr14) {
 					iterableType = ((ReferenceBinding)collectionType).findSuperTypeOriginatingFrom(T_JavaUtilCollection, false /*Iterable is not a class*/);
 				}
@@ -482,9 +482,7 @@ public class ForeachStatement extends Statement {
 						}
 					} else {
 						if (this.collectionElementType.isBaseType()) {
-							int boxedID = this.scope.environment().computeBoxingType(this.collectionElementType).id;
 							this.elementVariableImplicitWidening = BOXING | (compileTimeTypeID << 4) | compileTimeTypeID; // use primitive type in implicit conversion
-							compileTimeTypeID = boxedID;
 						}
 					}
 				}
@@ -516,7 +514,11 @@ public class ForeachStatement extends Statement {
 					this.indexVariable.setConstant(Constant.NotAConstant); // not inlinable
 					break;
 				default :
-					this.scope.problemReporter().invalidTypeForCollection(this.collection);
+					if (isTargetJsr14) {
+						this.scope.problemReporter().invalidTypeForCollectionTarget14(this.collection);
+					} else {
+						this.scope.problemReporter().invalidTypeForCollection(this.collection);
+					}
 			}
 		}
 		if (this.action != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
index c7f879a..b2551e0 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ public class IfStatement extends Statement {
 	int elseInitStateIndex = -1;
 	int mergedInitStateIndex = -1;
 
-public IfStatement(Expression condition, Statement thenStatement, 	int sourceStart, int sourceEnd) {
+public IfStatement(Expression condition, Statement thenStatement, int sourceStart, int sourceEnd) {
 	this.condition = condition;
 	this.thenStatement = thenStatement;
 	// remember useful empty statement
@@ -65,16 +65,31 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 	if (isConditionOptimizedFalse) {
 		thenFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
 	}
-	FlowInfo elseFlowInfo = conditionFlowInfo.initsWhenFalse();
+	FlowInfo elseFlowInfo = conditionFlowInfo.initsWhenFalse().copy();
 	if (isConditionOptimizedTrue) {
 		elseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
 	}
+	if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) && 
+			((thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)) {
+		// Mark then block as unreachable
+		// No need if the whole if-else construct itself lies in unreachable code
+		this.bits |= ASTNode.IsThenStatementUnreachable;
+	} else if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) &&
+			((elseFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)) {
+		// Mark else block as unreachable
+		// No need if the whole if-else construct itself lies in unreachable code
+		this.bits |= ASTNode.IsElseStatementUnreachable;
+	}
 	if (this.thenStatement != null) {
 		// Save info for code gen
 		this.thenInitStateIndex = currentScope.methodScope().recordInitializationStates(thenFlowInfo);
-		if (isConditionOptimizedFalse) {
+		if (isConditionOptimizedFalse || ((this.bits & ASTNode.IsThenStatementUnreachable) != 0)) {
 			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
 				this.thenStatement.complainIfUnreachable(thenFlowInfo, currentScope, initialComplaintLevel);
+			} else {
+				// its a known coding pattern which should be tolerated by dead code analysis
+				// according to isKnowDeadCodePattern()
+				this.bits &= ~ASTNode.IsThenStatementUnreachable;
 			}
 		}
 		thenFlowInfo = this.thenStatement.analyseCode(currentScope, flowContext, thenFlowInfo);
@@ -86,28 +101,34 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 
 	// process the ELSE part
 	if (this.elseStatement != null) {
-	    // signal else clause unnecessarily nested, tolerate else-if code pattern
-	    if (thenFlowInfo == FlowInfo.DEAD_END
-	            && (this.bits & IsElseIfStatement) == 0 	// else of an else-if
-	            && !(this.elseStatement instanceof IfStatement)) {
-	        currentScope.problemReporter().unnecessaryElse(this.elseStatement);
-	    }
+		// signal else clause unnecessarily nested, tolerate else-if code pattern
+		if (thenFlowInfo == FlowInfo.DEAD_END
+				&& (this.bits & IsElseIfStatement) == 0 	// else of an else-if
+				&& !(this.elseStatement instanceof IfStatement)) {
+			currentScope.problemReporter().unnecessaryElse(this.elseStatement);
+		}
 		// Save info for code gen
 		this.elseInitStateIndex = currentScope.methodScope().recordInitializationStates(elseFlowInfo);
-		if (isConditionOptimizedTrue) {
+		if (isConditionOptimizedTrue || ((this.bits & ASTNode.IsElseStatementUnreachable) != 0)) {
 			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
 				this.elseStatement.complainIfUnreachable(elseFlowInfo, currentScope, initialComplaintLevel);
+			} else {
+				// its a known coding pattern which should be tolerated by dead code analysis
+				// according to isKnowDeadCodePattern()
+				this.bits &= ~ASTNode.IsElseStatementUnreachable;
 			}
 		}
 		elseFlowInfo = this.elseStatement.analyseCode(currentScope, flowContext, elseFlowInfo);
 	}
 	// merge THEN & ELSE initializations
-	FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranches(
+	FlowInfo mergedInfo = FlowInfo.mergedOptimizedBranchesIfElse(
 		thenFlowInfo,
 		isConditionOptimizedTrue,
 		elseFlowInfo,
 		isConditionOptimizedFalse,
-		true /*if(true){ return; }  fake-reachable(); */);
+		true /*if(true){ return; }  fake-reachable(); */,
+		flowInfo,
+		this);
 	this.mergedInitStateIndex = currentScope.methodScope().recordInitializationStates(mergedInfo);
 	return mergedInfo;
 }
@@ -138,13 +159,20 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
 			|| this.elseStatement.isEmptyBlock());
 	if (hasThenPart) {
 		BranchLabel falseLabel = null;
-		// generate boolean condition
-		this.condition.generateOptimizedBoolean(
-			currentScope,
-			codeStream,
-			null,
-			hasElsePart ? (falseLabel = new BranchLabel(codeStream)) : endifLabel,
-			true/*cst == Constant.NotAConstant*/);
+		// generate boolean condition only if needed
+		if (((this.bits & ASTNode.IsElseStatementUnreachable) != 0) ||
+				(cst != Constant.NotAConstant && cst.booleanValue() == true)) {
+			// No need to generate if condition statement when we know that only the then action
+			// will be executed
+			this.condition.generateCode(currentScope, codeStream, false);
+		} else {
+			this.condition.generateOptimizedBoolean(
+				currentScope,
+				codeStream,
+				null,
+				hasElsePart ? (falseLabel = new BranchLabel(codeStream)) : endifLabel,
+				true/*cst == Constant.NotAConstant*/);
+		}
 		// May loose some local variable initializations : affecting the local variable attributes
 		if (this.thenInitStateIndex != -1) {
 			codeStream.removeNotDefinitelyAssignedVariables(currentScope, this.thenInitStateIndex);
@@ -173,13 +201,20 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
 			this.elseStatement.generateCode(currentScope, codeStream);
 		}
 	} else if (hasElsePart) {
-		// generate boolean condition
-		this.condition.generateOptimizedBoolean(
-			currentScope,
-			codeStream,
-			endifLabel,
-			null,
-			true/*cst == Constant.NotAConstant*/);
+		// generate boolean condition only if needed
+		if (((this.bits & ASTNode.IsThenStatementUnreachable) != 0) ||
+				(cst != Constant.NotAConstant && cst.booleanValue() == false)) {
+			// No need to generate if condition statement when we know that only the else action
+			// will be executed
+			this.condition.generateCode(currentScope, codeStream, false);
+		} else {
+			this.condition.generateOptimizedBoolean(
+				currentScope,
+				codeStream,
+				endifLabel,
+				null,
+				true/*cst == Constant.NotAConstant*/);
+		}
 		// generate else statement
 		// May loose some local variable initializations : affecting the local variable attributes
 		if (this.elseInitStateIndex != -1) {
@@ -205,37 +240,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream) {
 	codeStream.recordPositionsFrom(pc, this.sourceStart);
 }
 
-/**
- * Answers true if the if is identified as a known coding pattern which
- * should be tolerated by dead code analysis.
- * e.g. if (DEBUG) print(); // no complaint
- * Only invoked when overall condition is known to be optimizeable into false.
- */
-public static boolean isKnowDeadCodePattern(Expression expression) {
-	// if (!DEBUG) print(); - tolerated
-	if (expression instanceof UnaryExpression) {
-		expression = ((UnaryExpression) expression).expression;
-	}
-	// if (DEBUG) print(); - tolerated
-	if (expression instanceof Reference) return true;
 
-//	if (expression instanceof BinaryExpression) {
-//		BinaryExpression binary = (BinaryExpression) expression;
-//		switch ((binary.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT/* operator */) {
-//			case OperatorIds.AND_AND :
-//			case OperatorIds.OR_OR :
-//				break;
-//			default: 
-//				// if (DEBUG_LEVEL > 0) print(); - tolerated
-//				if ((binary.left instanceof Reference) && binary.right.constant != Constant.NotAConstant)
-//					return true;
-//				// if (0 < DEBUG_LEVEL) print(); - tolerated
-//				if ((binary.right instanceof Reference) && binary.left.constant != Constant.NotAConstant)
-//					return true;
-//		}
-//	}
-	return false;
-}
 
 public StringBuffer printStatement(int indent, StringBuffer output) {
 	printIndent(indent, output).append("if ("); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 0e6b60f..1fd4c94 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ public class InstanceOfExpression extends OperatorExpression {
 public InstanceOfExpression(Expression expression, TypeReference type) {
 	this.expression = expression;
 	this.type = type;
+	type.bits |= IgnoreRawTypeCheck; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=282141
 	this.bits |= INSTANCEOF << OperatorSHIFT;
 	this.sourceStart = expression.sourceStart;
 	this.sourceEnd = type.sourceEnd;
@@ -32,12 +33,12 @@ public InstanceOfExpression(Expression expression, TypeReference type) {
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
 	LocalVariableBinding local = this.expression.localVariableBinding();
 	if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) {
-		flowContext.recordUsingNullReference(currentScope, local,
-			this.expression, FlowContext.CAN_ONLY_NULL | FlowContext.IN_INSTANCEOF, flowInfo);
 		flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo).
 			unconditionalInits();
 		FlowInfo initsWhenTrue = flowInfo.copy();
 		initsWhenTrue.markAsComparedEqualToNonNull(local);
+		flowContext.recordUsingNullReference(currentScope, local,
+				this.expression, FlowContext.CAN_ONLY_NULL | FlowContext.IN_INSTANCEOF, flowInfo);
 		// no impact upon enclosing try context
 		return FlowInfo.conditional(initsWhenTrue, flowInfo.copy());
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
index 20c88d9..a764c87 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
@@ -820,6 +820,18 @@ public class Javadoc extends ASTNode {
 					}
 				}
 			}
+			/*
+			 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=286918
+			 *
+			 * We are concerned only about the Single type references (i.e. without any package) If they are not in default package,
+			 * then report an error. References with qualified yet incorrect names would have already been taken care of.
+			 */
+			if (scope.referenceCompilationUnit().isPackageInfo() && typeReference instanceof JavadocSingleTypeReference) {
+				if (resolvedType.fPackage.compoundName.length > 0) {
+					scope.problemReporter().javadocInvalidReference(typeReference.sourceStart, typeReference.sourceEnd);
+					return; // Not really needed - just in case more code added in future
+				}
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
index a00e50d..ee7df88 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,8 +56,6 @@ public class JavadocQualifiedTypeReference extends QualifiedTypeReference {
 			}
 			return null;
 		}
-		if (isTypeUseDeprecated(type, scope))
-			reportDeprecatedType(type, scope);
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=209936
 		// raw convert all enclosing types when dealing with Javadoc references
 		if (type.isGenericType() || type.isParameterizedType()) {
@@ -68,6 +66,10 @@ public class JavadocQualifiedTypeReference extends QualifiedTypeReference {
 	protected void reportDeprecatedType(TypeBinding type, Scope scope) {
 		scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
 	}
+	
+	protected void reportDeprecatedType(TypeBinding type, Scope scope, int index) {
+		scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers(), index);
+	}
 
 	protected void reportInvalidType(Scope scope) {
 		scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index 256d01b..83de2d9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,11 +40,11 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 	if (this.initialization == null) {
 		return flowInfo;
 	}
-	int nullStatus = this.initialization.nullStatus(flowInfo);
 	flowInfo =
 		this.initialization
 			.analyseCode(currentScope, flowContext, flowInfo)
 			.unconditionalInits();
+	int nullStatus = this.initialization.nullStatus(flowInfo);
 	if (!flowInfo.isDefinitelyAssigned(this.binding)){// for local variable debug attributes
 		this.bits |= FirstAssignmentToLocal;
 	} else {
@@ -223,7 +223,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 					? this.initialization.constant.castTo((variableType.id << 4) + this.initialization.constant.typeID())
 					: Constant.NotAConstant);
 		}
-		// only resolve annotation at the end, for constant to be positionned before (96991)
+		// only resolve annotation at the end, for constant to be positioned before (96991)
 		resolveAnnotations(scope, this.annotations, this.binding);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
index a79d3b1..a083742 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ElementValuePair;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
@@ -81,6 +82,16 @@ public class MemberValuePair extends ASTNode {
 			valueType = null; // no need to pursue
 		} else {
 			valueType = this.value.resolveType(scope);
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=248897
+			ASTVisitor visitor = new ASTVisitor() {
+				public boolean visit(SingleNameReference reference, BlockScope scop) {
+					if (reference.binding instanceof LocalVariableBinding) {
+						((LocalVariableBinding) reference.binding).useFlag = LocalVariableBinding.USED;
+					}
+					return true;
+				}
+			};
+			this.value.traverse(visitor, scope);
 		}
 		this.compilerElementPair = new ElementValuePair(this.name, this.value, this.binding);
 		if (valueType == null)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index 329bc27..afa81d6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.InvocationSite;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemMethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding;
@@ -409,7 +410,14 @@ public TypeBinding resolveType(BlockScope scope) {
 				return null;
 			}
 		}
-		scope.problemReporter().invalidMethod(this, this.binding);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=245007 avoid secondary errors in case of
+		// missing super type for anonymous classes ... 
+		ReferenceBinding declaringClass = this.binding.declaringClass;
+		boolean avoidSecondary = declaringClass != null &&
+								 declaringClass.isAnonymousType() &&
+								 declaringClass.superclass() instanceof MissingTypeBinding;
+		if (!avoidSecondary)
+			scope.problemReporter().invalidMethod(this, this.binding);
 		MethodBinding closestMatch = ((ProblemMethodBinding)this.binding).closestMatch;
 		switch (this.binding.problemId()) {
 			case ProblemReasons.Ambiguous :
@@ -541,6 +549,9 @@ public void setExpectedType(TypeBinding expectedType) {
 public void setFieldIndex(int depth) {
 	// ignore for here
 }
+public TypeBinding expectedType() {
+	return this.expectedType;
+}
 
 public void traverse(ASTVisitor visitor, BlockScope blockScope) {
 	if (visitor.visit(this, blockScope)) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
index e82ad0a..fd4e05b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
@@ -145,25 +145,48 @@ public class MethodDeclaration extends AbstractMethodDeclaration {
 		final CompilerOptions compilerOptions = this.scope.compilerOptions();
 		checkOverride: {
 			if (this.binding == null) break checkOverride;
-			long sourceLevel = compilerOptions.sourceLevel;
-			if (sourceLevel < ClassFileConstants.JDK1_5) break checkOverride;
+			long complianceLevel = compilerOptions.complianceLevel;
+			if (complianceLevel < ClassFileConstants.JDK1_5) break checkOverride;
 			int bindingModifiers = this.binding.modifiers;
 			boolean hasOverrideAnnotation = (this.binding.tagBits & TagBits.AnnotationOverride) != 0;
-			if (hasOverrideAnnotation) {
+			boolean hasUnresolvedArguments = (this.binding.tagBits & TagBits.HasUnresolvedArguments) != 0;
+			if (hasOverrideAnnotation  && !hasUnresolvedArguments) {
 				// no static method is considered overriding
 				if ((bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding)
 					break checkOverride;
 				//	in 1.5, strictly for overriding superclass method
 				//	in 1.6 and above, also tolerate implementing interface method
-				if (sourceLevel >= ClassFileConstants.JDK1_6
+				if (complianceLevel >= ClassFileConstants.JDK1_6
 						&& ((bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccImplementing)) == ExtraCompilerModifiers.AccImplementing))
 					break checkOverride;
 				// claims to override, and doesn't actually do so
-				this.scope.problemReporter().methodMustOverride(this);
-			} else if (!this.binding.declaringClass.isInterface()
-						&& (bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding) {
-				// actually overrides, but did not claim to do so
-				this.scope.problemReporter().missingOverrideAnnotation(this);
+				this.scope.problemReporter().methodMustOverride(this, complianceLevel);
+			} else {
+				//In case of  a concrete class method, we have to check if it overrides(in 1.5 and above) OR implements a method(1.6 and above).
+				//Also check if the method has a signature that is override-equivalent to that of any public method declared in Object.
+				if (!this.binding.declaringClass.isInterface()){
+						if((bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding) {
+							this.scope.problemReporter().missingOverrideAnnotation(this);
+						} else {
+							if(complianceLevel >= ClassFileConstants.JDK1_6
+								&& compilerOptions.reportMissingOverrideAnnotationForInterfaceMethodImplementation
+								&& this.binding.isImplementing()) {
+									// actually overrides, but did not claim to do so
+									this.scope.problemReporter().missingOverrideAnnotationForInterfaceMethodImplementation(this);
+							}
+							
+						}
+				}
+				else {	//For 1.6 and above only
+					//In case of a interface class method, we have to check if it overrides a method (isImplementing returns true in case it overrides)
+					//Also check if the method has a signature that is override-equivalent to that of any public method declared in Object.
+					if(complianceLevel >= ClassFileConstants.JDK1_6
+							&& compilerOptions.reportMissingOverrideAnnotationForInterfaceMethodImplementation
+							&& (((bindingModifiers & (ClassFileConstants.AccStatic|ExtraCompilerModifiers.AccOverriding)) == ExtraCompilerModifiers.AccOverriding) || this.binding.isImplementing())){
+						// actually overrides, but did not claim to do so
+						this.scope.problemReporter().missingOverrideAnnotationForInterfaceMethodImplementation(this);
+					}
+				}
 			}
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
index 3b0f3e2..4076d51 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,9 +62,12 @@ public class OR_OR_Expression extends BinaryExpression {
 			}
 		}
 		rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo);
+		// The definitely null variables in right info when true should not be missed out while merging
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=299900
+		FlowInfo leftInfoWhenTrueForMerging = leftInfo.initsWhenTrue().unconditionalCopy().addPotentialInitializationsFrom(rightInfo.unconditionalInitsWithoutSideEffect());
 		FlowInfo mergedInfo = FlowInfo.conditional(
 					// merging two true initInfos for such a negative case: if ((t && (b = t)) || f) r = b; // b may not have been initialized
-					leftInfo.initsWhenTrue().unconditionalInits().mergedWith(
+				leftInfoWhenTrueForMerging.unconditionalInits().mergedWith(
 						rightInfo.safeInitsWhenTrue().setReachMode(previousMode).unconditionalInits()),
 					rightInfo.initsWhenFalse());
 		this.mergedInitStateIndex =
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
index b92ed3f..e0e5053 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -112,19 +112,17 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
 		this.constant = Constant.NotAConstant;
 		if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved
 			if (this.resolvedType != null) { // is a shared type reference which was already resolved
-				if (this.resolvedType != null) { // is a shared type reference which was already resolved
-					if (this.resolvedType.isValidBinding()) {
-						return this.resolvedType;
-					} else {
-						switch (this.resolvedType.problemId()) {
-							case ProblemReasons.NotFound :
-							case ProblemReasons.NotVisible :
-							case ProblemReasons.InheritedNameHidesEnclosingName :
-								TypeBinding type = this.resolvedType.closestMatch();
-								return type;
-							default :
-								return null;
-						}
+				if (this.resolvedType.isValidBinding()) {
+					return this.resolvedType;
+				} else {
+					switch (this.resolvedType.problemId()) {
+						case ProblemReasons.NotFound :
+						case ProblemReasons.NotVisible :
+						case ProblemReasons.InheritedNameHidesEnclosingName :
+							TypeBinding type = this.resolvedType.closestMatch();
+							return type;
+						default :
+							return null;
 					}
 				}
 			}
@@ -188,7 +186,7 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
 			} else {
 				if (typeIsConsistent && currentType.isStatic()
 						&& (qualifyingType.isParameterizedTypeWithActualArguments() || qualifyingType.isGenericType())) {
-					scope.problemReporter().staticMemberOfParameterizedType(this, scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), null, qualifyingType));
+					scope.problemReporter().staticMemberOfParameterizedType(this, scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), null, qualifyingType), i);
 					typeIsConsistent = false;
 				}
 				ReferenceBinding enclosingType = currentType.enclosingType();
@@ -245,7 +243,7 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
 					}
 					return this.resolvedType;
 				} else if (argLength != typeVariables.length) { // check arity
-					scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes);
+					scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes, i);
 					return null;
 				}
 				// check parameterizing non-static member type of raw type
@@ -271,7 +269,7 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
 						return null;
 				if (currentOriginal.isGenericType()) {
 	   			    if (typeIsConsistent && qualifyingType != null && qualifyingType.isParameterizedType()) {
-						scope.problemReporter().parameterizedMemberTypeMissingArguments(this, scope.environment().createParameterizedType(currentOriginal, null, qualifyingType));
+						scope.problemReporter().parameterizedMemberTypeMissingArguments(this, scope.environment().createParameterizedType(currentOriginal, null, qualifyingType), i);
 						typeIsConsistent = false;
 					}
 	   			    qualifyingType = scope.environment().createRawType(currentOriginal, qualifyingType); // raw type
@@ -282,7 +280,7 @@ public class ParameterizedQualifiedTypeReference extends ArrayQualifiedTypeRefer
 				}
 			}
 			if (isTypeUseDeprecated(qualifyingType, scope))
-				reportDeprecatedType(qualifyingType, scope);
+				reportDeprecatedType(qualifyingType, scope, i);
 			this.resolvedType = qualifyingType;
 		}
 		// array type ?
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
index e9b9572..80c2983 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -104,6 +104,8 @@ public class QualifiedAllocationExpression extends AllocationExpression {
 	}
 
 	public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+		if (!valueRequired)
+			currentScope.problemReporter().unusedObjectAllocation(this);
 		int pc = codeStream.position;
 		MethodBinding codegenBinding = this.binding.original();
 		ReferenceBinding allocatedType = codegenBinding.declaringClass;
@@ -350,8 +352,6 @@ public class QualifiedAllocationExpression extends AllocationExpression {
 							}
 						}
 					}
-				} else {
-					return null;
 				}
 				if (this.anonymousType != null) {
 					// insert anonymous type in scope (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=210070)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index 211c460..3378343 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,7 +93,9 @@ public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowConte
 			} else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
 				localBinding.useFlag = LocalVariableBinding.FAKE_USED;
 			}
-			checkNPE(currentScope, flowContext, flowInfo, true);
+			if (needValue) {
+				checkNPE(currentScope, flowContext, flowInfo, true);
+			}
 	}
 
 	if (needValue) {
@@ -190,12 +192,14 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 			if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) this.binding)) {
 				currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
 			}
-			if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
+			if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
 				localBinding.useFlag = LocalVariableBinding.USED;
 			} else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
 				localBinding.useFlag = LocalVariableBinding.FAKE_USED;
 			}
-			checkNPE(currentScope, flowContext, flowInfo, true);
+			if (needValue) {
+				checkNPE(currentScope, flowContext, flowInfo, true);
+			}
 	}
 	if (needValue) {
 		manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
@@ -214,7 +218,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 
 public void checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, boolean checkString) {
 	// cannot override localVariableBinding because this would project o.m onto o when
-	// analysing assignments
+	// analyzing assignments
 	if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
 		LocalVariableBinding local = (LocalVariableBinding) this.binding;
 		if (local != null &&
@@ -225,7 +229,7 @@ public void checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInf
 					FlowContext.MAY_NULL, flowInfo);
 			}
 			flowInfo.markAsComparedEqualToNonNull(local);
-				// from thereon it is set
+			// from thereon it is set
 			if (flowContext.initsOnFinally != null) {
 				flowContext.initsOnFinally.markAsComparedEqualToNonNull(local);
 			}
@@ -762,14 +766,19 @@ public TypeBinding getOtherFieldBindings(BlockScope scope) {
 }
 
 public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
-	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
 	//If inlinable field, forget the access emulation, the code gen will directly target it
 	if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) {
 		return;
 	}
 	if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
-		currentScope.emulateOuterAccess((LocalVariableBinding) this.binding);
-	}
+		LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding;
+		if (localVariableBinding != null) {
+			switch(localVariableBinding.useFlag) {
+				case LocalVariableBinding.FAKE_USED :
+				case LocalVariableBinding.USED :
+					currentScope.emulateOuterAccess(localVariableBinding);
+			}
+		}
 	}
 }
 
@@ -777,7 +786,7 @@ public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, Fl
  * index is <0 to denote write access emulation
  */
 public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, int index, FlowInfo flowInfo) {
-	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)	return;
+	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return;
 	// index == 0 denotes the first fieldBinding, index > 0 denotes one of the 'otherBindings', index < 0 denotes a write access (to last binding)
 	if (fieldBinding.constant() != Constant.NotAConstant)
 		return;
@@ -928,7 +937,7 @@ public TypeBinding resolveType(BlockScope scope) {
 					ReferenceBinding declaringClass = fieldBinding.original().declaringClass;
 					SourceTypeBinding sourceType = methodScope.enclosingSourceType();
 					// check for forward references
-					if ((this.indexOfFirstFieldBinding == 1 || (fieldBinding.modifiers & ClassFileConstants.AccEnum) != 0) // enum constants are checked even when qualified
+					if ((this.indexOfFirstFieldBinding == 1 || (fieldBinding.modifiers & ClassFileConstants.AccEnum) != 0 || (!fieldBinding.isFinal() && declaringClass.isEnum())) // enum constants are checked even when qualified
 							&& sourceType == declaringClass
 							&& methodScope.lastVisibleFieldID >= 0
 							&& fieldBinding.id >= methodScope.lastVisibleFieldID
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index 5d33bfe..f6d5e3e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,8 +86,8 @@ public class QualifiedTypeReference extends TypeReference {
 				scope.problemReporter().illegalAccessFromTypeVariable((TypeVariableBinding) this.resolvedType, this);
 				return null;
 			}
-			if (i < last && isTypeUseDeprecated(this.resolvedType, scope)) {
-				reportDeprecatedType(this.resolvedType, scope);
+			if (i <= last && isTypeUseDeprecated(this.resolvedType, scope)) {
+				reportDeprecatedType(this.resolvedType, scope, i);
 			}
 			if (isClassScope)
 				if (((ClassScope) scope).detectHierarchyCycle(this.resolvedType, this)) // must connect hierarchy to find inherited member types
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index 06cc151..ba1d8a4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -161,7 +161,7 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 			if (!flowInfo.isDefinitelyAssigned(localBinding = (LocalVariableBinding) this.binding)) {
 				currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
 			}
-			if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
+			if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
 				localBinding.useFlag = LocalVariableBinding.USED;
 			} else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
 				localBinding.useFlag = LocalVariableBinding.FAKE_USED;
@@ -719,12 +719,18 @@ public LocalVariableBinding localVariableBinding() {
 }
 
 public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
-	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0)	{
-		//If inlinable field, forget the access emulation, the code gen will directly target it
-		if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) return;
-
-		if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
-			currentScope.emulateOuterAccess((LocalVariableBinding) this.binding);
+	//If inlinable field, forget the access emulation, the code gen will directly target it
+	if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) {
+		return;
+	}
+	if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
+		LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding;
+		if (localVariableBinding != null) {
+			switch(localVariableBinding.useFlag) {
+				case LocalVariableBinding.FAKE_USED :
+				case LocalVariableBinding.USED :
+					currentScope.emulateOuterAccess(localVariableBinding);
+			}
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
index 43fdbcd..645fdaa 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,7 +70,7 @@ public class SingleTypeReference extends TypeReference {
 			}
 		}
 		if (isTypeUseDeprecated(memberType, scope))
-			scope.problemReporter().deprecatedType(memberType, this);
+			reportDeprecatedType(memberType, scope);
 		memberType = scope.environment().convertToRawType(memberType, false /*do not force conversion of enclosing types*/);
 		if (memberType.isRawType()
 				&& (this.bits & IgnoreRawTypeCheck) == 0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
index cba7331..faaa9eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,37 @@ import org.eclipse.jdt.internal.compiler.lookup.*;
 
 public abstract class Statement extends ASTNode {
 
+	/**
+	 * Answers true if the if is identified as a known coding pattern which
+	 * should be tolerated by dead code analysis.
+	 * e.g. if (DEBUG) print(); // no complaint
+	 * Only invoked when overall condition is known to be optimizeable into false/true.
+	 */
+	protected static boolean isKnowDeadCodePattern(Expression expression) {
+		// if (!DEBUG) print(); - tolerated
+		if (expression instanceof UnaryExpression) {
+			expression = ((UnaryExpression) expression).expression;
+		}
+		// if (DEBUG) print(); - tolerated
+		if (expression instanceof Reference) return true;
+
+//		if (expression instanceof BinaryExpression) {
+//			BinaryExpression binary = (BinaryExpression) expression;
+//			switch ((binary.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT/* operator */) {
+//				case OperatorIds.AND_AND :
+//				case OperatorIds.OR_OR :
+//					break;
+//				default: 
+//					// if (DEBUG_LEVEL > 0) print(); - tolerated
+//					if ((binary.left instanceof Reference) && binary.right.constant != Constant.NotAConstant)
+//						return true;
+//					// if (0 < DEBUG_LEVEL) print(); - tolerated
+//					if ((binary.right instanceof Reference) && binary.left.constant != Constant.NotAConstant)
+//						return true;
+//			}
+//		}
+		return false;
+	}
 public abstract FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo);
 
 	public static final int NOT_COMPLAINED = 0;
@@ -132,14 +163,14 @@ public boolean isEmptyBlock() {
 public boolean isValidJavaStatement() {
 	//the use of this method should be avoid in most cases
 	//and is here mostly for documentation purpose.....
-	//while the parser is responsable for creating
+	//while the parser is responsible for creating
 	//welled formed expression statement, which results
 	//in the fact that java-non-semantic-expression-used-as-statement
-	//should not be parsable...thus not being built.
+	//should not be parsed...thus not being built.
 	//It sounds like the java grammar as help the compiler job in removing
 	//-by construction- some statement that would have no effect....
 	//(for example all expression that may do side-effects are valid statement
-	// -this is an appromative idea.....-)
+	// -this is an approximative idea.....-)
 
 	return true;
 }
@@ -160,4 +191,12 @@ public Constant resolveCase(BlockScope scope, TypeBinding testType, SwitchStatem
 	resolve(scope);
 	return Constant.NotAConstant;
 }
+/** 
+ * Implementation of {@link org.eclipse.jdt.internal.compiler.lookup.InvocationSite#expectedType}
+ * suitable at this level. Subclasses should override as necessary.
+ * @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#expectedType()
+ */
+public TypeBinding expectedType() {
+	return null;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index 0d2e13f..5a71646 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@ public class SwitchStatement extends Statement {
 	int mergedInitStateIndex = -1;
 
 	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
-	    try {
+		try {
 			flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo);
 			SwitchFlowContext switchContext =
 				new SwitchFlowContext(flowContext, this, (this.breakLabel = new BranchLabel()));
@@ -94,8 +94,8 @@ public class SwitchStatement extends Statement {
 			}
 
 			final TypeBinding resolvedTypeBinding = this.expression.resolvedType;
-			if (this.caseCount > 0 && resolvedTypeBinding.isEnum()) {
-				final SourceTypeBinding sourceTypeBinding = this.scope.classScope().referenceContext.binding;
+			if (resolvedTypeBinding.isEnum()) {
+				final SourceTypeBinding sourceTypeBinding = currentScope.classScope().referenceContext.binding;
 				this.synthetic = sourceTypeBinding.addSyntheticMethodForSwitchEnum(resolvedTypeBinding);
 			}
 			// if no default case, then record it may jump over the block directly to the end
@@ -111,9 +111,9 @@ public class SwitchStatement extends Statement {
 			this.mergedInitStateIndex =
 				currentScope.methodScope().recordInitializationStates(mergedInfo);
 			return mergedInfo;
-	    } finally {
-	        if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
-	    }
+		} finally {
+			if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
+		}
 	}
 
 	/**
@@ -124,7 +124,7 @@ public class SwitchStatement extends Statement {
 	 */
 	public void generateCode(BlockScope currentScope, CodeStream codeStream) {
 
-	    try {
+		try {
 			if ((this.bits & IsReachable) == 0) {
 				return;
 			}
@@ -133,36 +133,37 @@ public class SwitchStatement extends Statement {
 			// prepare the labels and constants
 			this.breakLabel.initialize(codeStream);
 			CaseLabel[] caseLabels = new CaseLabel[this.caseCount];
-			boolean needSwitch = this.caseCount != 0;
-			for (int i = 0; i < this.caseCount; i++) {
+			for (int i = 0, max = this.caseCount; i < max; i++) {
 				this.cases[i].targetLabel = (caseLabels[i] = new CaseLabel(codeStream));
 				caseLabels[i].tagBits |= BranchLabel.USED;
 			}
 			CaseLabel defaultLabel = new CaseLabel(codeStream);
-			if (needSwitch) defaultLabel.tagBits |= BranchLabel.USED;
+			final boolean hasCases = this.caseCount != 0;
+			if (hasCases) defaultLabel.tagBits |= BranchLabel.USED;
 			if (this.defaultCase != null) {
 				this.defaultCase.targetLabel = defaultLabel;
 			}
 
 			final TypeBinding resolvedType = this.expression.resolvedType;
+			boolean valueRequired = false;
 			if (resolvedType.isEnum()) {
-				if (needSwitch) {
-					// go through the translation table
-					codeStream.invoke(Opcodes.OPC_invokestatic, this.synthetic, null /* default declaringClass */);
-					this.expression.generateCode(currentScope, codeStream, true);
-					// get enum constant ordinal()
-					codeStream.invokeEnumOrdinal(resolvedType.constantPoolName());
-					codeStream.iaload();
-				} else {
-					// no need to go through the translation table
-					this.expression.generateCode(currentScope, codeStream, false);
+				// go through the translation table
+				codeStream.invoke(Opcodes.OPC_invokestatic, this.synthetic, null /* default declaringClass */);
+				this.expression.generateCode(currentScope, codeStream, true);
+				// get enum constant ordinal()
+				codeStream.invokeEnumOrdinal(resolvedType.constantPoolName());
+				codeStream.iaload();
+				if (!hasCases) {
+					// we can get rid of the generated ordinal value
+					codeStream.pop();
 				}
 			} else {
+				valueRequired = this.expression.constant == Constant.NotAConstant || hasCases;
 				// generate expression
-				this.expression.generateCode(currentScope, codeStream, needSwitch); // value required (switch without cases)
+				this.expression.generateCode(currentScope, codeStream, valueRequired);
 			}
 			// generate the appropriate switch table/lookup bytecode
-			if (needSwitch) {
+			if (hasCases) {
 				int[] sortedIndexes = new int[this.caseCount];
 				// we sort the keys to be able to generate the code for tableswitch or lookupswitch
 				for (int i = 0; i < this.caseCount; i++) {
@@ -194,6 +195,8 @@ public class SwitchStatement extends Statement {
 					codeStream.lookupswitch(defaultLabel, this.constants, sortedIndexes, caseLabels);
 				}
 				codeStream.updateLastRecordedEndPC(this.scope, codeStream.position);
+			} else if (valueRequired) {
+				codeStream.pop();
 			}
 
 			// generate the switch block statements
@@ -234,9 +237,9 @@ public class SwitchStatement extends Statement {
 				defaultLabel.place();
 			}
 			codeStream.recordPositionsFrom(pc, this.sourceStart);
-	    } finally {
-	        if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
-	    }
+		} finally {
+			if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
+		}
 	}
 
 	public StringBuffer printStatement(int indent, StringBuffer output) {
@@ -258,8 +261,7 @@ public class SwitchStatement extends Statement {
 	}
 
 	public void resolve(BlockScope upperScope) {
-
-	    try {
+		try {
 			boolean isEnumSwitch = false;
 			TypeBinding expressionType = this.expression.resolveType(upperScope);
 			if (expressionType != null) {
@@ -285,7 +287,7 @@ public class SwitchStatement extends Statement {
 				}
 			}
 			if (this.statements != null) {
-				this.scope = /*explicitDeclarations == 0 ? upperScope : */new BlockScope(upperScope);
+				this.scope = new BlockScope(upperScope);
 				int length;
 				// collection of cases is too big but we will only iterate until caseCount
 				this.cases = new CaseStatement[length = this.statements.length];
@@ -355,9 +357,9 @@ public class SwitchStatement extends Statement {
 					}
 				}
 			}
-	    } finally {
-	        if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
-	    }
+		} finally {
+			if (this.scope != null) this.scope.enclosingCase = null; // no longer inside switch case block
+		}
 	}
 
 	public void traverse(
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
index be67759..ab49caf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for bug 332637 - Dead Code detection removing code that isn't dead
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -126,18 +127,15 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 								addPotentialInitializationsFrom(
 									handlingContext.initsOnReturn));
 				} else {
+					FlowInfo initsOnException = handlingContext.initsOnException(this.caughtExceptionTypes[i]);
 					catchInfo =
-						flowInfo.unconditionalCopy().
-							addPotentialInitializationsFrom(
-								handlingContext.initsOnException(
-									this.caughtExceptionTypes[i]))
+						flowInfo.nullInfoLessUnconditionalCopy()
+							.addPotentialInitializationsFrom(initsOnException)
+							.addNullInfoFrom(initsOnException)	// null info only from here, this is the only way to enter the catch block
 							.addPotentialInitializationsFrom(
-								tryInfo.nullInfoLessUnconditionalCopy())
-								// remove null info to protect point of
-								// exception null info
+									tryInfo.nullInfoLessUnconditionalCopy())
 							.addPotentialInitializationsFrom(
-								handlingContext.initsOnReturn.
-									nullInfoLessUnconditionalCopy());
+									handlingContext.initsOnReturn.nullInfoLessUnconditionalCopy());
 				}
 
 				// catch var is always set
@@ -238,18 +236,15 @@ public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl
 								addPotentialInitializationsFrom(
 									handlingContext.initsOnReturn));
 				}else {
+					FlowInfo initsOnException = handlingContext.initsOnException(this.caughtExceptionTypes[i]);
 					catchInfo =
-						flowInfo.unconditionalCopy()
+						flowInfo.nullInfoLessUnconditionalCopy()
+							.addPotentialInitializationsFrom(initsOnException)
+							.addNullInfoFrom(initsOnException)	// null info only from here, this is the only way to enter the catch block
 							.addPotentialInitializationsFrom(
-								handlingContext.initsOnException(
-									this.caughtExceptionTypes[i]))
-									.addPotentialInitializationsFrom(
-								tryInfo.nullInfoLessUnconditionalCopy())
-								// remove null info to protect point of
-								// exception null info
+									tryInfo.nullInfoLessUnconditionalCopy())
 							.addPotentialInitializationsFrom(
-									handlingContext.initsOnReturn.
-									nullInfoLessUnconditionalCopy());
+									handlingContext.initsOnReturn.nullInfoLessUnconditionalCopy());
 				}
 
 				// catch var is always set
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
index 3a2fef8..03e279c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -470,7 +470,7 @@ public AbstractMethodDeclaration declarationOf(MethodBinding methodBinding) {
  * Finds the matching type amoung this type's member types.
  * Returns null if no type with this name is found.
  * The type name is a compound name relative to this type
- * eg. if this type is X and we're looking for Y.X.A.B
+ * e.g. if this type is X and we're looking for Y.X.A.B
  *     then a type name would be {X, A, B}
  */
 public TypeDeclaration declarationOfType(char[][] typeName) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
index 431678d..c6edaad 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
@@ -147,7 +148,8 @@ protected TypeBinding internalResolveType(Scope scope) {
 		scope.problemReporter().cannotAllocateVoidArray(this);
 		return null;
 	}
-	if (isTypeUseDeprecated(type, scope)) {
+	if (!(this instanceof QualifiedTypeReference)   // QualifiedTypeReference#getTypeBinding called above will have already checked deprecation
+			&& isTypeUseDeprecated(type, scope)) {
 		reportDeprecatedType(type, scope);
 	}
 	type = scope.environment().convertToRawType(type, false /*do not force conversion of enclosing types*/);
@@ -166,8 +168,12 @@ public boolean isTypeReference() {
 	return true;
 }
 
+protected void reportDeprecatedType(TypeBinding type, Scope scope, int index) {
+	scope.problemReporter().deprecatedType(type, this, index);
+}
+
 protected void reportDeprecatedType(TypeBinding type, Scope scope) {
-	scope.problemReporter().deprecatedType(type, this);
+	scope.problemReporter().deprecatedType(type, this, Integer.MAX_VALUE);
 }
 
 protected void reportInvalidType(Scope scope) {
@@ -206,7 +212,22 @@ public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding g
 }
 
 public TypeBinding resolveTypeArgument(ClassScope classScope, ReferenceBinding genericType, int rank) {
-    return resolveType(classScope);
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057, circularity is allowed when we are
+	// resolving type arguments i.e interface A<T extends C> {}	interface B extends A<D> {}
+	// interface D extends C {}	interface C extends B {}
+	ReferenceBinding ref = classScope.referenceContext.binding;
+	boolean pauseHierarchyCheck = false;
+	try {
+		if (ref.isHierarchyBeingConnected()) {
+			ref.tagBits |= TagBits.PauseHierarchyCheck;
+			pauseHierarchyCheck = true;
+		}
+	    return resolveType(classScope);
+	} finally {
+		if (pauseHierarchyCheck) {
+			ref.tagBits &= ~TagBits.PauseHierarchyCheck;
+		}
+	}
 }
 
 public abstract void traverse(ASTVisitor visitor, BlockScope scope);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
index 00db5c9..4b80b5b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -137,6 +137,13 @@ public class WhileStatement extends Statement {
 						actionInfo.unconditionalInits()).
 					addInitializationsFrom(condInfo.initsWhenFalse());
 			}
+			if (loopingContext.hasEscapingExceptions()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+				FlowInfo loopbackFlowInfo = flowInfo.copy();
+				if (this.continueLabel != null) {  // we do get to the bottom 
+					loopbackFlowInfo.mergedWith(actionInfo.unconditionalCopy());
+				}
+				loopingContext.simulateThrowAfterLoopBack(loopbackFlowInfo);
+			}
 		}
 
 		// end of loop
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/AnnotationInfo.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/AnnotationInfo.java
index 109bc66..13f27ee 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/AnnotationInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/AnnotationInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 BEA Systems, Inc.
+ * Copyright (c) 2005, 2010 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,15 +7,19 @@
  *
  * Contributors:
  *    tyeung at bea.com - initial API and implementation
+ *    olivier_thomann at ca.ibm.com - add hashCode() and equals(..) methods
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.classfmt;
 
+import java.util.Arrays;
+
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.*;
 import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.util.Util;
 
 public class AnnotationInfo extends ClassFileStruct implements IBinaryAnnotation {
 	/** The name of the annotation type */
@@ -376,4 +380,30 @@ public String toString() {
 	}
 	return buffer.toString();
 }
+public int hashCode() {
+	final int prime = 31;
+	int result = 1;
+	result = prime * result + Util.hashCode(this.pairs);
+	result = prime * result + CharOperation.hashCode(this.typename);
+	return result;
+}
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+	AnnotationInfo other = (AnnotationInfo) obj;
+	if (!Arrays.equals(this.pairs, other.pairs)) {
+		return false;
+	}
+	if (!Arrays.equals(this.typename, other.typename)) {
+		return false;
+	}
+	return true;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
index b6431eb..d2a2b62 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -658,10 +658,15 @@ public char[][][] getMissingTypeNames() {
  * @return int
  */
 public int getModifiers() {
+	int modifiers;
 	if (this.innerInfo != null) {
-		return this.innerInfo.getModifiers() | (this.accessFlags & ClassFileConstants.AccDeprecated);
+		modifiers = this.innerInfo.getModifiers()
+			| (this.accessFlags & ClassFileConstants.AccDeprecated)
+			| (this.accessFlags & ClassFileConstants.AccSynthetic);
+	} else {
+		modifiers = this.accessFlags;
 	}
-	return this.accessFlags;
+	return modifiers;
 }
 
 /**
@@ -969,8 +974,27 @@ private boolean hasStructuralAnnotationChanges(IBinaryAnnotation[] currentAnnota
 		for (int j = 0; j < currentPairsLength; j++) {
 			if (!CharOperation.equals(currentPairs[j].getName(), otherPairs[j].getName()))
 				return true;
-			if (!currentPairs[j].getValue().equals(otherPairs[j].getValue()))
+			final Object value = currentPairs[j].getValue();
+			final Object value2 = otherPairs[j].getValue();
+			if (value instanceof Object[]) {
+				Object[] currentValues = (Object[]) value;
+				if (value2 instanceof Object[]) {
+					Object[] currentValues2 = (Object[]) value2;
+					final int length = currentValues.length;
+					if (length != currentValues2.length) {
+						return true;
+					}
+					for (int n = 0; n < length; n++) {
+						if (!currentValues[n].equals(currentValues2[n])) {
+							return true;
+						}
+					}
+					return false;
+				}
+				return true;
+			} else if (!value.equals(value2)) {
 				return true;
+			}
 		}
 	}
 	return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ElementValuePairInfo.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ElementValuePairInfo.java
index 188051b..5a40c0d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ElementValuePairInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ElementValuePairInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2010 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,14 @@
  *
  * Contributors:
  *    tyeung at bea.com - initial API and implementation
+ *    olivier_thomann at ca.ibm.com - add hashCode() and equals(..) methods
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.classfmt;
 
+import java.util.Arrays;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+
 public class ElementValuePairInfo implements org.eclipse.jdt.internal.compiler.env.IBinaryElementValuePair {
 
 	static final ElementValuePairInfo[] NoMembers = new ElementValuePairInfo[0];
@@ -45,4 +50,34 @@ public String toString() {
 	}
 	return buffer.toString();
 }
+public int hashCode() {
+	final int prime = 31;
+	int result = 1;
+	result = prime * result + CharOperation.hashCode(this.name);
+	result = prime * result + ((this.value == null) ? 0 : this.value.hashCode());
+	return result;
+}
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+	ElementValuePairInfo other = (ElementValuePairInfo) obj;
+	if (!Arrays.equals(this.name, other.name)) {
+		return false;
+	}
+	if (this.value == null) {
+		if (other.value != null) {
+			return false;
+		}
+	} else if (!this.value.equals(other.value)) {
+		return false;
+	}
+	return true;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CaseLabel.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CaseLabel.java
index 6ff6db9..ed1180b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CaseLabel.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CaseLabel.java
@@ -68,7 +68,7 @@ public void place() {
 		for (int i = 0, length = forwardReferenceCount(); i < length; i++) {
 			this.codeStream.writeSignedWord(forwardRefs[i], offset);
 		}
-		// add the label int the codeStream labels collection
+		// add the label in the codeStream labels collection
 		this.codeStream.addLabel(this);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index 9aad201..d1e6563 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -4904,7 +4904,7 @@ public void ldc(String constant) {
 	if (index > 0) {
 		// the string already exists inside the constant pool
 		// we reuse the same index
-		ldcForIndex(index, constantChars);
+		ldcForIndex(index);
 	} else {
 		// the string is too big to be utf8-encoded in one pass.
 		// we have to split it into different pieces.
@@ -4949,7 +4949,7 @@ public void ldc(String constant) {
 		System.arraycopy(constantChars, 0, subChars, 0, i);
 		System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length);
 		index = this.constantPool.literalIndex(subChars, utf8encoding);
-		ldcForIndex(index, subChars);
+		ldcForIndex(index);
 		// write the remaining part
 		invokeStringConcatenationStringConstructor();
 		while (i < constantLength) {
@@ -4986,7 +4986,7 @@ public void ldc(String constant) {
 			System.arraycopy(constantChars, startIndex, subChars, 0, newCharLength);
 			System.arraycopy(utf8encoding, 0, utf8encoding = new byte[length], 0, length);
 			index = this.constantPool.literalIndex(subChars, utf8encoding);
-			ldcForIndex(index, subChars);
+			ldcForIndex(index);
 			// now on the stack it should be a StringBuffer and a string.
 			invokeStringConcatenationAppendForType(TypeIds.T_JavaLangString);
 		}
@@ -5050,7 +5050,7 @@ public void ldc2_w(long constant) {
 	writeUnsignedShort(index);
 }
 
-public void ldcForIndex(int index, char[] constant) {
+public void ldcForIndex(int index) {
 	this.stackDepth++;
 	if (this.stackDepth > this.stackMax) {
 		this.stackMax = this.stackDepth;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrame.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrame.java
index 310c4e6..add0dcb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrame.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/StackMapFrame.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java
index 4eb8b8a..f9c29bf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/AccessRuleSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ClassSignature.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ClassSignature.java
index 6c68a09..f3e4685 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ClassSignature.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ClassSignature.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2010 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,14 @@
  *
  * Contributors:
  *    tyeung at bea.com - initial API and implementation
+ *    olivier_thomann at ca.ibm.com - add hashCode() and equals(..) methods
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.env;
 
+import java.util.Arrays;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+
 /**
  * Represents a class reference in the class file.
  * One of the possible results for the default value of an annotation method or an element value pair.
@@ -35,4 +40,25 @@ public String toString() {
 	buffer.append(".class"); //$NON-NLS-1$
 	return buffer.toString();
 }
+
+public int hashCode() {
+	final int prime = 31;
+	int result = 1;
+	result = prime * result + CharOperation.hashCode(this.className);
+	return result;
+}
+
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+	ClassSignature other = (ClassSignature) obj;
+	return Arrays.equals(this.className, other.className);
+}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/EnumConstantSignature.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/EnumConstantSignature.java
index 66a8434..437df94 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/EnumConstantSignature.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/EnumConstantSignature.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2010 BEA Systems, Inc.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,13 @@
  *
  * Contributors:
  *    tyeung at bea.com - initial API and implementation
+ *    olivier_thomann at ca.ibm.com - add hashCode() and equals(..) methods
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.env;
 
+import java.util.Arrays;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
 /**
  * Represents a reference to a enum constant in the class file.
  * One of the possible results for the default value of an annotation method.
@@ -45,4 +49,29 @@ public String toString() {
 	buffer.append(this.constName);
 	return buffer.toString();
 }
+
+public int hashCode() {
+	final int prime = 31;
+	int result = 1;
+	result = prime * result + CharOperation.hashCode(this.constName);
+	result = prime * result + CharOperation.hashCode(this.typeName);
+	return result;
+}
+
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+	EnumConstantSignature other = (EnumConstantSignature) obj;
+	if (!Arrays.equals(this.constName, other.constName)) {
+		return false;
+	}
+	return Arrays.equals(this.typeName, other.typeName);
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
index 2d3ee6a..d75686b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@ package org.eclipse.jdt.internal.compiler.env;
 
 // clinit methods (synthetics too?) can be returned from IBinaryType>>getMethods()
 // BUT do not have to be... the compiler will ignore them when building the binding.
-// The synthetic argument of a member type's constructor (ie. the first arg of a non-static
+// The synthetic argument of a member type's constructor (i.e. the first arg of a non-static
 // member type) is also ignored by the compiler, BUT in this case it must be included
 // in the constructor's signature.
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
index 1471b44..5e1681e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for bug 332637 - Dead Code detection removing code that isn't dead
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
@@ -35,6 +36,13 @@ public FlowInfo addInitializationsFrom(FlowInfo otherInits) {
 	return this;
 }
 
+public FlowInfo addNullInfoFrom(FlowInfo otherInits) {
+
+	this.initsWhenTrue.addNullInfoFrom(otherInits);
+	this.initsWhenFalse.addNullInfoFrom(otherInits);
+	return this;
+}
+
 public FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits) {
 
 	this.initsWhenTrue.addPotentialInitializationsFrom(otherInits);
@@ -214,4 +222,14 @@ public UnconditionalFlowInfo unconditionalInitsWithoutSideEffect() {
 	return this.initsWhenTrue.unconditionalCopy().
 			mergedWith(this.initsWhenFalse.unconditionalInits());
 }
+
+public void markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local) {
+	this.initsWhenTrue.markedAsNullOrNonNullInAssertExpression(local);
+	this.initsWhenFalse.markedAsNullOrNonNullInAssertExpression(local);
+}
+
+public boolean isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local) {
+	return (this.initsWhenTrue.isMarkedAsNullOrNonNullInAssertExpression(local)
+		|| this.initsWhenFalse.isMarkedAsNullOrNonNullInAssertExpression(local));
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
index 2884643..37bf18f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
 
 /**
@@ -80,7 +81,7 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 	}
 
 	// check inconsistent null checks
-	if (this.deferNullDiagnostic) { // within an enclosing loop, be conservative
+	if ((this.tagBits & FlowContext.DEFER_NULL_DIAGNOSTIC) != 0) { // within an enclosing loop, be conservative
 		for (int i = 0; i < this.nullCount; i++) {
 			this.parent.recordUsingNullReference(scope, this.nullLocals[i],
 					this.nullReferences[i],	this.nullCheckTypes[i], flowInfo);
@@ -96,9 +97,13 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 				case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL:
 					if (flowInfo.isDefinitelyNonNull(local)) {
 						if (this.nullCheckTypes[i] == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-							scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							}
 						} else {
-							scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							}
 						}
 						continue;
 					}
@@ -110,10 +115,22 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 					if (flowInfo.isDefinitelyNull(local)) {
 						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
 							case FlowContext.IN_COMPARISON_NULL:
-								scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_COMPARISON_NON_NULL:
-								scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_ASSIGNMENT:
 								scope.problemReporter().localVariableRedundantNullAssignment(local, expression);
@@ -122,6 +139,23 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 								scope.problemReporter().localVariableNullInstanceof(local, expression);
 								continue;
 						}
+					} else if (flowInfo.isPotentiallyNull(local)) {
+						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
+							case FlowContext.IN_COMPARISON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+							case FlowContext.IN_COMPARISON_NON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+						}
 					}
 					break;
 				case MAY_NULL:
@@ -181,7 +215,7 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 	public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 			Expression reference, int checkType, FlowInfo flowInfo) {
 		if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0 && !flowInfo.isDefinitelyUnknown(local))	{
-			if (this.deferNullDiagnostic) { // within an enclosing loop, be conservative
+			if ((this.tagBits & FlowContext.DEFER_NULL_DIAGNOSTIC) != 0) { // within an enclosing loop, be conservative
 				switch (checkType) {
 					case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL:
 					case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL:
@@ -191,19 +225,47 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 					case CAN_ONLY_NULL | IN_INSTANCEOF:
 						if (flowInfo.cannotBeNull(local)) {
 							if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
-							} else {
-								scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+								}
+								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+								}
+							} else if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL)) {
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+								}
+								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+								}
 							}
 							return;
 						}
 						if (flowInfo.canOnlyBeNull(local)) {
 							switch(checkType & CONTEXT_MASK) {
 								case FlowContext.IN_COMPARISON_NULL:
-									scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariableNullReference(local, reference);
+										return;
+									}
+									if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+									}
+									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+									}
 									return;
 								case FlowContext.IN_COMPARISON_NON_NULL:
-									scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariableNullReference(local, reference);
+										return;
+									}
+									if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+									}
+									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+									}
 									return;
 								case FlowContext.IN_ASSIGNMENT:
 									scope.problemReporter().localVariableRedundantNullAssignment(local, reference);
@@ -212,6 +274,21 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 									scope.problemReporter().localVariableNullInstanceof(local, reference);
 									return;
 							}
+						} else if (flowInfo.isPotentiallyNull(local)) {
+							switch(checkType & CONTEXT_MASK) {
+								case FlowContext.IN_COMPARISON_NULL:
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariablePotentialNullReference(local, reference);
+										return;
+									}
+									break;
+								case FlowContext.IN_COMPARISON_NON_NULL:
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariablePotentialNullReference(local, reference);
+										return;
+									}
+									break;
+							}
 						}
 						break;
 					case MAY_NULL :
@@ -233,9 +310,19 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 					case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL:
 						if (flowInfo.isDefinitelyNonNull(local)) {
 							if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+								}
+								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+								}
 							} else {
-								scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+								}
+								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+								}
 							}
 							return;
 						}
@@ -247,10 +334,28 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 						if (flowInfo.isDefinitelyNull(local)) {
 							switch(checkType & CONTEXT_MASK) {
 								case FlowContext.IN_COMPARISON_NULL:
-									scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariableNullReference(local, reference);
+										return;
+									}
+									if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+									}
+									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+									}
 									return;
 								case FlowContext.IN_COMPARISON_NON_NULL:
-									scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariableNullReference(local, reference);
+										return;
+									}
+									if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+									}
+									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+									}
 									return;
 								case FlowContext.IN_ASSIGNMENT:
 									scope.problemReporter().localVariableRedundantNullAssignment(local, reference);
@@ -259,6 +364,21 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 									scope.problemReporter().localVariableNullInstanceof(local, reference);
 									return;
 							}
+						} else if (flowInfo.isPotentiallyNull(local)) {
+							switch(checkType & CONTEXT_MASK) {
+								case FlowContext.IN_COMPARISON_NULL:
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariablePotentialNullReference(local, reference);
+										return;
+									}
+									break;
+								case FlowContext.IN_COMPARISON_NON_NULL:
+									if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+										scope.problemReporter().localVariablePotentialNullReference(local, reference);
+										return;
+									}
+									break;
+							}
 						}
 						break;
 					case MAY_NULL :
@@ -278,7 +398,13 @@ public void complainOnDeferredChecks(FlowInfo flowInfo, BlockScope scope) {
 						// never happens
 				}
 			}
-			recordNullReference(local, reference, checkType);
+			// if the contention is inside assert statement, we want to avoid null warnings only in case of
+			// comparisons and not in case of assignment, instanceof, or may be null.
+			if(((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) || checkType == MAY_NULL
+					|| (checkType & CONTEXT_MASK) == FlowContext.IN_ASSIGNMENT
+					|| (checkType & CONTEXT_MASK) == FlowContext.IN_INSTANCEOF) {
+				recordNullReference(local, reference, checkType);
+			}
 			// prepare to re-check with try/catch flow info
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
index 6d5564c..369d24e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
+import java.util.ArrayList;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
@@ -27,6 +28,7 @@ import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
 
 /**
@@ -38,38 +40,44 @@ public class FlowContext implements TypeConstants {
 	// preempt marks looping contexts
 	public final static FlowContext NotContinuableContext = new FlowContext(null, null);
 	public ASTNode associatedNode;
-		public FlowContext parent;
+	public FlowContext parent;
 	public NullInfoRegistry initsOnFinally;
 		// only used within try blocks; remembers upstream flow info mergedWith
 		// any null related operation happening within the try block
 
-boolean deferNullDiagnostic, preemptNullDiagnostic;
-
-public static final int
-  CAN_ONLY_NULL_NON_NULL = 0x0000,
-  	// check against null and non null, with definite values -- comparisons
-  CAN_ONLY_NULL = 0x0001,
-  	// check against null, with definite values -- comparisons
-  CAN_ONLY_NON_NULL = 0x0002,
-	// check against non null, with definite values -- comparisons
-  MAY_NULL = 0x0003,
-	// check against null, with potential values -- NPE guard
-  CHECK_MASK = 0x00FF,
-  IN_COMPARISON_NULL = 0x0100,
-  IN_COMPARISON_NON_NULL = 0x0200,
-    // check happened in a comparison
-  IN_ASSIGNMENT = 0x0300,
-    // check happened in an assignment
-  IN_INSTANCEOF = 0x0400,
-    // check happened in an instanceof expression
-  CONTEXT_MASK = ~CHECK_MASK;
+	public int tagBits;
+	public static final int DEFER_NULL_DIAGNOSTIC = 0x1;
+	public static final int PREEMPT_NULL_DIAGNOSTIC = 0x2;
+	/**
+	 * used to hide null comparison related warnings inside assert statements 
+	 */
+	public static final int HIDE_NULL_COMPARISON_WARNING = 0x4;
+
+public static final int CAN_ONLY_NULL_NON_NULL = 0x0000;
+//check against null and non null, with definite values -- comparisons
+public static final int CAN_ONLY_NULL = 0x0001;
+//check against null, with definite values -- comparisons
+public static final int CAN_ONLY_NON_NULL = 0x0002;
+//check against non null, with definite values -- comparisons
+public static final int MAY_NULL = 0x0003;
+// check against null, with potential values -- NPE guard
+public static final int CHECK_MASK = 0x00FF;
+public static final int IN_COMPARISON_NULL = 0x0100;
+public static final int IN_COMPARISON_NON_NULL = 0x0200;
+// check happened in a comparison
+public static final int IN_ASSIGNMENT = 0x0300;
+// check happened in an assignment
+public static final int IN_INSTANCEOF = 0x0400;
+// check happened in an instanceof expression
+public static final int CONTEXT_MASK = ~CHECK_MASK;
 
 public FlowContext(FlowContext parent, ASTNode associatedNode) {
 	this.parent = parent;
 	this.associatedNode = associatedNode;
 	if (parent != null) {
-		this.deferNullDiagnostic =
-			parent.deferNullDiagnostic || parent.preemptNullDiagnostic;
+		if ((parent.tagBits & (FlowContext.DEFER_NULL_DIAGNOSTIC | FlowContext.PREEMPT_NULL_DIAGNOSTIC)) != 0) {
+			this.tagBits |= FlowContext.DEFER_NULL_DIAGNOSTIC;
+		}
 		this.initsOnFinally = parent.initsOnFinally;
 	}
 }
@@ -85,6 +93,7 @@ public void checkExceptionHandlers(TypeBinding raisedException, ASTNode location
 	// all related catch blocks are marked as reachable... instead of those only
 	// until the point where it is safely handled (Smarter - see comment at the end)
 	FlowContext traversedContext = this;
+	ArrayList abruptlyExitedLoops = null;
 	while (traversedContext != null) {
 		SubRoutineStatement sub;
 		if (((sub = traversedContext.subroutine()) != null) && sub.isSubRoutineEscaping()) {
@@ -108,6 +117,12 @@ public void checkExceptionHandlers(TypeBinding raisedException, ASTNode location
 				    int state = caughtException == null
 				    	? Scope.EQUAL_OR_MORE_SPECIFIC /* any exception */
 				        : Scope.compareTypes(raisedException, caughtException);
+				    if (abruptlyExitedLoops != null && caughtException != null && state != Scope.NOT_RELATED) {
+				    	for (int i = 0, abruptlyExitedLoopsCount = abruptlyExitedLoops.size(); i < abruptlyExitedLoopsCount; i++) {
+							LoopingFlowContext loop = (LoopingFlowContext) abruptlyExitedLoops.get(i);
+							loop.recordCatchContextOfEscapingException(exceptionContext, caughtException);
+						}
+					}
 					switch (state) {
 						case Scope.EQUAL_OR_MORE_SPECIFIC :
 							exceptionContext.recordHandlingException(
@@ -149,6 +164,11 @@ public void checkExceptionHandlers(TypeBinding raisedException, ASTNode location
 				}
 				break; // not handled anywhere, thus jump to error handling
 			}
+		} else if (traversedContext instanceof LoopingFlowContext) {
+			if (abruptlyExitedLoops == null) {
+				abruptlyExitedLoops = new ArrayList(5);
+			}
+			abruptlyExitedLoops.add(traversedContext);
 		}
 
 		traversedContext.recordReturnFrom(flowInfo.unconditionalInits());
@@ -188,6 +208,7 @@ public void checkExceptionHandlers(TypeBinding[] raisedExceptions, ASTNode locat
 		raisedCount);
 	FlowContext traversedContext = this;
 
+	ArrayList abruptlyExitedLoops = null;
 	while (traversedContext != null) {
 		SubRoutineStatement sub;
 		if (((sub = traversedContext.subroutine()) != null) && sub.isSubRoutineEscaping()) {
@@ -213,6 +234,12 @@ public void checkExceptionHandlers(TypeBinding[] raisedExceptions, ASTNode locat
 						    int state = caughtException == null
 						    	? Scope.EQUAL_OR_MORE_SPECIFIC /* any exception */
 						        : Scope.compareTypes(raisedException, caughtException);
+						    if (abruptlyExitedLoops != null && caughtException != null && state != Scope.NOT_RELATED) {
+						    	for (int i = 0, abruptlyExitedLoopsCount = abruptlyExitedLoops.size(); i < abruptlyExitedLoopsCount; i++) {
+									LoopingFlowContext loop = (LoopingFlowContext) abruptlyExitedLoops.get(i);
+									loop.recordCatchContextOfEscapingException(exceptionContext, caughtException);
+								}
+							}
 							switch (state) {
 								case Scope.EQUAL_OR_MORE_SPECIFIC :
 									exceptionContext.recordHandlingException(
@@ -275,6 +302,11 @@ public void checkExceptionHandlers(TypeBinding[] raisedExceptions, ASTNode locat
 				}
 				break; // not handled anywhere, thus jump to error handling
 			}
+        } else if (traversedContext instanceof LoopingFlowContext) {
+			if (abruptlyExitedLoops == null) {
+				abruptlyExitedLoops = new ArrayList(5);
+			}
+			abruptlyExitedLoops.add(traversedContext);
 		}
 		if (remainingCount == 0)
 			return;
@@ -542,9 +574,19 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 		case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL:
 			if (flowInfo.isDefinitelyNonNull(local)) {
 				if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-					scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+					}
 				} else {
-					scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+					}
 				}
 				return;
 			}
@@ -559,10 +601,28 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 			if (flowInfo.isDefinitelyNull(local)) {
 				switch(checkType & CONTEXT_MASK) {
 					case FlowContext.IN_COMPARISON_NULL:
-						scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariableNullReference(local, reference);
+							return;
+						}
+						if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+						}
+						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+						}
 						return;
 					case FlowContext.IN_COMPARISON_NON_NULL:
-						scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariableNullReference(local, reference);
+							return;
+						}
+						if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+						}
+						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+						}
 						return;
 					case FlowContext.IN_ASSIGNMENT:
 						scope.problemReporter().localVariableRedundantNullAssignment(local, reference);
@@ -571,6 +631,21 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 						scope.problemReporter().localVariableNullInstanceof(local, reference);
 						return;
 				}
+			} else if (flowInfo.isPotentiallyNull(local)) {
+				switch(checkType & CONTEXT_MASK) {
+					case FlowContext.IN_COMPARISON_NULL:
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariablePotentialNullReference(local, reference);
+							return;
+						}
+						break;
+					case FlowContext.IN_COMPARISON_NON_NULL:
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariablePotentialNullReference(local, reference);
+							return;
+						}
+						break;
+				}
 			} else if (flowInfo.cannotBeDefinitelyNullOrNonNull(local)) {
 				return;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
index d0898b5..886309e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann <stephan at cs.tu-berlin.de> - Contribution for bug 332637 - Dead Code detection removing code that isn't dead
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
+import org.eclipse.jdt.internal.compiler.ast.IfStatement;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 
@@ -39,6 +42,13 @@ public abstract class FlowInfo {
  */
 abstract public FlowInfo addInitializationsFrom(FlowInfo otherInits);
 
+/**
+ * Add all null information from otherInits to this flow info and return this.
+ * The operation models the effect of an unconditional sequence of this flow info
+ * and otherInits.
+ */
+abstract public FlowInfo addNullInfoFrom(FlowInfo otherInits);
+
 
 /**
  * Compose other inits over this flow info, then return this. The operation
@@ -70,7 +80,7 @@ abstract public FlowInfo addPotentialInitializationsFrom(FlowInfo otherInits);
  * unknown or else as being both potentially null and potentially non null,
  * then it won't ever be promoted as definitely null or definitely non null. (It
  * could still get promoted to definite unknown).
- * @param local the variable to ckeck
+ * @param local the variable to check
  * @return true iff this flow info prevents local from being promoted to
  *         definite non null or definite null against an enclosing flow info
  */
@@ -295,6 +305,77 @@ public static UnconditionalFlowInfo mergedOptimizedBranches(
 }
 
 /**
+ * Merge if-else branches using optimized boolean conditions
+ */
+public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse(
+		FlowInfo initsWhenTrue, boolean isOptimizedTrue,
+		FlowInfo initsWhenFalse, boolean isOptimizedFalse,
+		boolean allowFakeDeadBranch, FlowInfo flowInfo, IfStatement ifStatement) {
+	UnconditionalFlowInfo mergedInfo;
+	if (isOptimizedTrue){
+		if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
+			mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE).
+				unconditionalInits();
+		}
+		else {
+			mergedInfo =
+				initsWhenTrue.addPotentialInitializationsFrom(initsWhenFalse.
+					nullInfoLessUnconditionalCopy()).
+				unconditionalInits();
+		}
+	}
+	else if (isOptimizedFalse) {
+		if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
+			mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE).
+				unconditionalInits();
+		}
+		else {
+			mergedInfo =
+				initsWhenFalse.addPotentialInitializationsFrom(initsWhenTrue.
+					nullInfoLessUnconditionalCopy()).
+				unconditionalInits();
+		}
+	}
+	else if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0 &&
+				(ifStatement.bits & ASTNode.IsElseStatementUnreachable) != 0 &&
+				initsWhenTrue != FlowInfo.DEAD_END &&
+				initsWhenFalse != FlowInfo.DEAD_END) {
+		// Done when the then branch will always be executed but the condition does not have a boolean
+		// true or false (i.e if(true), etc) for sure
+		// We don't do this if both if and else branches themselves are in an unreachable code
+		// or if any of them is a DEAD_END (e.g. contains 'return' or 'throws')
+		mergedInfo =
+			initsWhenTrue.addPotentialInitializationsFrom(initsWhenFalse.
+				nullInfoLessUnconditionalCopy()).
+			unconditionalInits();
+		// if a variable is only initialized in one branch and not initialized in the other,
+		// then we need to cast a doubt on its initialization in the merged info
+		mergedInfo.definiteInits &= initsWhenFalse.unconditionalCopy().definiteInits;
+		
+	}
+	else if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0 &&
+			(ifStatement.bits & ASTNode.IsThenStatementUnreachable) != 0 && initsWhenTrue != FlowInfo.DEAD_END
+			&& initsWhenFalse != FlowInfo.DEAD_END) {
+		// Done when the else branch will always be executed but the condition does not have a boolean
+		// true or false (i.e if(true), etc) for sure
+		// We don't do this if both if and else branches themselves are in an unreachable code
+		// or if any of them is a DEAD_END (e.g. contains 'return' or 'throws')
+		mergedInfo = 
+			initsWhenFalse.addPotentialInitializationsFrom(initsWhenTrue.
+				nullInfoLessUnconditionalCopy()).
+			unconditionalInits();
+		// if a variable is only initialized in one branch and not initialized in the other,
+		// then we need to cast a doubt on its initialization in the merged info
+		mergedInfo.definiteInits &= initsWhenTrue.unconditionalCopy().definiteInits;
+	}
+	else {
+		mergedInfo = initsWhenTrue.
+			mergedWith(initsWhenFalse.unconditionalInits());
+	}
+	return mergedInfo;
+}
+
+/**
  * Return REACHABLE if this flow info is reachable, UNREACHABLE
  * else.
  * @return REACHABLE if this flow info is reachable, UNREACHABLE
@@ -386,4 +467,20 @@ abstract public UnconditionalFlowInfo unconditionalInits();
  * @return a flow info carrying this unconditional flow info
  */
 abstract public UnconditionalFlowInfo unconditionalInitsWithoutSideEffect();
+
+/**
+ * Tell the flowInfo that a local variable got marked as non null or null
+ * due to comparison with null inside an assert expression.
+ * This is to prevent over-aggressive code generation for subsequent if statements
+ * where this variable is being checked against null
+ */
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448
+abstract public void markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local);
+
+/** 
+ * Returns true if the local variable being checked for was marked as null or not null
+ * inside an assert expression due to comparison against null.
+ */
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448
+abstract public boolean isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local);
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
index 514a214..69fe575 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
+import java.util.ArrayList;
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.Reference;
@@ -17,7 +18,9 @@ import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
 
 /**
@@ -44,6 +47,23 @@ public class LoopingFlowContext extends SwitchFlowContext {
 	int[] nullCheckTypes;
 	int nullCount;
 
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+	static private class EscapingExceptionCatchSite {
+		final ReferenceBinding caughtException;
+		final ExceptionHandlingFlowContext catchingContext;
+		public EscapingExceptionCatchSite(ExceptionHandlingFlowContext catchingContext,	ReferenceBinding caughtException) {
+			this.catchingContext = catchingContext;
+			this.caughtException = caughtException;
+		}
+		void simulateThrowAfterLoopBack(FlowInfo flowInfo) {
+			this.catchingContext.recordHandlingException(this.caughtException,
+					flowInfo.unconditionalInits(), null, // raised exception, irrelevant here
+					null, /* invocation site, irrelevant here */ true // we have no business altering the needed status.
+					);
+		}
+	}
+	private ArrayList escapingExceptionCatchSites = null;
+
 	Scope associatedScope;
 
 	public LoopingFlowContext(
@@ -54,7 +74,7 @@ public class LoopingFlowContext extends SwitchFlowContext {
 		BranchLabel continueLabel,
 		Scope associatedScope) {
 		super(parent, associatedNode, breakLabel);
-		this.preemptNullDiagnostic = true;
+		this.tagBits |= FlowContext.PREEMPT_NULL_DIAGNOSTIC;
 			// children will defer to this, which may defer to its own parent
 		this.continueLabel = continueLabel;
 		this.associatedScope = associatedScope;
@@ -115,7 +135,7 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 	this.innerFlowContextsCount = 0;
 	UnconditionalFlowInfo flowInfo = this.upstreamNullFlowInfo.
 		addPotentialNullInfoFrom(callerFlowInfo.unconditionalInitsWithoutSideEffect());
-	if (this.deferNullDiagnostic) {
+	if ((this.tagBits & FlowContext.DEFER_NULL_DIAGNOSTIC) != 0) {
 		// check only immutable null checks on innermost looping context
 		for (int i = 0; i < this.nullCount; i++) {
 			LocalVariableBinding local = this.nullLocals[i];
@@ -127,9 +147,13 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 					if (flowInfo.isDefinitelyNonNull(local)) {
 						this.nullReferences[i] = null;
 						if (this.nullCheckTypes[i] == (CAN_ONLY_NON_NULL | IN_COMPARISON_NON_NULL)) {
-							scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							}
 						} else {
-							scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							}
 						}
 						continue;
 					}
@@ -139,18 +163,26 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 					if (flowInfo.isDefinitelyNonNull(local)) {
 						this.nullReferences[i] = null;
 						if (this.nullCheckTypes[i] == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-							scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							}
 						} else {
-							scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							}
 						}
 						continue;
 					}
 					if (flowInfo.isDefinitelyNull(local)) {
 						this.nullReferences[i] = null;
 						if (this.nullCheckTypes[i] == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL)) {
-							scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+							}
 						} else {
-							scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+							}
 						}
 						continue;
 					}
@@ -163,10 +195,22 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 						this.nullReferences[i] = null;
 						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
 							case FlowContext.IN_COMPARISON_NULL:
-								scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_COMPARISON_NON_NULL:
-								scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_ASSIGNMENT:
 								scope.problemReporter().localVariableRedundantNullAssignment(local, expression);
@@ -175,7 +219,24 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 								scope.problemReporter().localVariableNullInstanceof(local, expression);
 								continue;
 						}
-					}
+					} else if (flowInfo.isPotentiallyNull(local)) {
+						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
+							case FlowContext.IN_COMPARISON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+							case FlowContext.IN_COMPARISON_NON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+						}
+					}	
 					break;
 				case MAY_NULL:
 					if (flowInfo.isDefinitelyNull(local)) {
@@ -203,9 +264,13 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 					if (flowInfo.isDefinitelyNonNull(local)) {
 						this.nullReferences[i] = null;
 						if (this.nullCheckTypes[i] == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-							scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableRedundantCheckOnNonNull(local, expression);
+							}
 						} else {
-							scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+								scope.problemReporter().localVariableNonNullComparedToNull(local, expression);
+							}
 						}
 						continue;
 					}
@@ -218,10 +283,22 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 						this.nullReferences[i] = null;
 						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
 							case FlowContext.IN_COMPARISON_NULL:
-								scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableRedundantCheckOnNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_COMPARISON_NON_NULL:
-								scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariableNullReference(local, expression);
+									continue;
+								}
+								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+									scope.problemReporter().localVariableNullComparedToNonNull(local, expression);
+								}
 								continue;
 							case FlowContext.IN_ASSIGNMENT:
 								scope.problemReporter().localVariableRedundantNullAssignment(local, expression);
@@ -230,6 +307,23 @@ public void complainOnDeferredNullChecks(BlockScope scope, FlowInfo callerFlowIn
 								scope.problemReporter().localVariableNullInstanceof(local, expression);
 								continue;
 						}
+					} else if (flowInfo.isPotentiallyNull(local)) {
+						switch(this.nullCheckTypes[i] & CONTEXT_MASK) {
+							case FlowContext.IN_COMPARISON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+							case FlowContext.IN_COMPARISON_NON_NULL:
+								this.nullReferences[i] = null;
+								if (((this.nullCheckTypes[i] & CHECK_MASK) == CAN_ONLY_NULL) && (expression.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+									scope.problemReporter().localVariablePotentialNullReference(local, expression);
+									continue;
+								}
+								break;
+						}
 					}
 					break;
 				case MAY_NULL:
@@ -395,21 +489,48 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 		case CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL:
 			if (flowInfo.isDefinitelyNonNull(local)) {
 				if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NON_NULL)) {
-					scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+					}
 				} else {
-					scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+					}
 				}
 			} else if (flowInfo.isDefinitelyNull(local)) {
 				if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL)) {
-					scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+					}
 				} else {
-					scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+					}
+					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+					}
+				}
+			} else if (this.upstreamNullFlowInfo.isDefinitelyNonNull(local) && !flowInfo.isPotentiallyNull(local)) {    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=291418
+				flowInfo.markAsDefinitelyNonNull(local);
+				if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+					recordNullReference(local, reference, checkType);
 				}
 			} else if (! flowInfo.cannotBeDefinitelyNullOrNonNull(local)) {
 				if (flowInfo.isPotentiallyNonNull(local)) {
 					recordNullReference(local, reference, CAN_ONLY_NON_NULL | checkType & CONTEXT_MASK);
 				} else {
-					recordNullReference(local, reference, checkType);
+					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+						recordNullReference(local, reference, checkType);
+					}
 				}
 			}
 			return;
@@ -424,10 +545,28 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 			if (flowInfo.isDefinitelyNull(local)) {
 				switch(checkType & CONTEXT_MASK) {
 					case FlowContext.IN_COMPARISON_NULL:
-						scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariableNullReference(local, reference);
+							return;
+						}
+						if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
+						}
+						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
+						}
 						return;
 					case FlowContext.IN_COMPARISON_NON_NULL:
-						scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariableNullReference(local, reference);
+							return;
+						}
+						if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
+							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
+						}
+						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
+							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
+						}
 						return;
 					case FlowContext.IN_ASSIGNMENT:
 						scope.problemReporter().localVariableRedundantNullAssignment(local, reference);
@@ -436,8 +575,29 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 						scope.problemReporter().localVariableNullInstanceof(local, reference);
 						return;
 				}
+			} else if (flowInfo.isPotentiallyNull(local)) {
+				switch(checkType & CONTEXT_MASK) {
+					case FlowContext.IN_COMPARISON_NULL:
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariablePotentialNullReference(local, reference);
+							return;
+						}
+						break;
+					case FlowContext.IN_COMPARISON_NON_NULL:
+						if (((checkType & CHECK_MASK) == CAN_ONLY_NULL) && (reference.implicitConversion & TypeIds.UNBOXING) != 0) { // check for auto-unboxing first and report appropriate warning
+							scope.problemReporter().localVariablePotentialNullReference(local, reference);
+							return;
+						}
+						break;
+				}
+			}
+			// if the contention is inside assert statement, we want to avoid null warnings only in case of
+			// comparisons and not in case of assignment and instanceof
+			if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0 
+					|| (checkType & CONTEXT_MASK) == FlowContext.IN_ASSIGNMENT
+					|| (checkType & CONTEXT_MASK) == FlowContext.IN_INSTANCEOF) {
+				recordNullReference(local, reference, checkType);
 			}
-			recordNullReference(local, reference, checkType);
 			return;
 		case MAY_NULL :
 			if (flowInfo.isDefinitelyNonNull(local)) {
@@ -467,4 +627,31 @@ public void recordUsingNullReference(Scope scope, LocalVariableBinding local,
 			}
 		}
 	}
+
+	/* Simulate a throw of an exception from inside a loop in its second or subsequent iteration.
+	   See https://bugs.eclipse.org/bugs/show_bug.cgi?id=321926
+	 */
+	public void simulateThrowAfterLoopBack(FlowInfo flowInfo) {
+		if (this.escapingExceptionCatchSites != null) {
+			for (int i = 0, exceptionCount = this.escapingExceptionCatchSites.size(); i < exceptionCount; i++) {
+				((EscapingExceptionCatchSite) this.escapingExceptionCatchSites.get(i)).simulateThrowAfterLoopBack(flowInfo);
+			}
+			this.escapingExceptionCatchSites = null; // don't care for it anymore.
+		}
+	}
+
+	/* Record the fact that some exception thrown by code within this loop
+	   is caught by an outer catch block. This is used to propagate data flow
+	   along the edge back to the next iteration. See simulateThrowAfterLoopBack
+	 */
+	public void recordCatchContextOfEscapingException(ExceptionHandlingFlowContext catchingContext,	ReferenceBinding caughtException) {
+		if (this.escapingExceptionCatchSites == null) {
+			this.escapingExceptionCatchSites = new ArrayList(5);
+		}
+		this.escapingExceptionCatchSites.add(new EscapingExceptionCatchSite(catchingContext, caughtException));
+	}
+
+	public boolean hasEscapingExceptions() {
+		return this.escapingExceptionCatchSites != null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
index acf0a81..0287c1f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann <stephan at cs.tu-berlin.de> - Contribution for bug 332637   
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
@@ -84,18 +85,28 @@ public class UnconditionalFlowInfo extends FlowInfo {
 
 	// Constants
 	public static final int BitCacheSize = 64; // 64 bits in a long.
+	public int[] nullStatusChangedInAssert; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448
 
 public FlowInfo addInitializationsFrom(FlowInfo inits) {
+	return addInfoFrom(inits, true);
+}
+public FlowInfo addNullInfoFrom(FlowInfo inits) {
+	return addInfoFrom(inits, false);
+}
+private FlowInfo addInfoFrom(FlowInfo inits, boolean handleInits) {
 	if (this == DEAD_END)
 		return this;
 	if (inits == DEAD_END)
 		return this;
 	UnconditionalFlowInfo otherInits = inits.unconditionalInits();
 
-	// union of definitely assigned variables,
-	this.definiteInits |= otherInits.definiteInits;
-	// union of potentially set ones
-	this.potentialInits |= otherInits.potentialInits;
+	if (handleInits) {
+		// union of definitely assigned variables,
+		this.definiteInits |= otherInits.definiteInits;
+		// union of potentially set ones
+		this.potentialInits |= otherInits.potentialInits;
+	}
+
 	// combine null information
 	boolean thisHadNulls = (this.tagBits & NULL_FLAG_MASK) != 0,
 		otherHasNulls = (otherInits.tagBits & NULL_FLAG_MASK) != 0;
@@ -217,14 +228,17 @@ public FlowInfo addInitializationsFrom(FlowInfo inits) {
 			}
 		}
 		int i;
-		// manage definite assignment info
-		for (i = 0; i < mergeLimit; i++) {
-			this.extra[0][i] |= otherInits.extra[0][i];
-			this.extra[1][i] |= otherInits.extra[1][i];
-		}
-		for (; i < copyLimit; i++) {
-			this.extra[0][i] = otherInits.extra[0][i];
-			this.extra[1][i] = otherInits.extra[1][i];
+		if (handleInits) {
+			// manage definite assignment info
+			for (i = 0; i < mergeLimit; i++) {
+				this.extra[0][i] |= otherInits.extra[0][i];
+				this.extra[1][i] |= otherInits.extra[1][i];
+			}
+			for (; i < copyLimit; i++) {
+				this.extra[0][i] = otherInits.extra[0][i];
+				this.extra[1][i] = otherInits.extra[1][i];
+			
+			}
 		}
 		// tweak limits for nulls
 		if (!thisHadNulls) {
@@ -283,6 +297,7 @@ public FlowInfo addInitializationsFrom(FlowInfo inits) {
 			}
 		}
 	}
+	combineNullStatusChangeInAssertInfo(otherInits);
 	return this;
 }
 
@@ -490,6 +505,7 @@ public UnconditionalFlowInfo addPotentialNullInfoFrom(
 			}
 		}
 	}
+	combineNullStatusChangeInAssertInfo(otherInits);
 	if (thisHasNulls) {
 		this.tagBits |= NULL_FLAG_MASK;
 	}
@@ -621,6 +637,7 @@ public FlowInfo copy() {
 			}
 		}
 	}
+	copy.nullStatusChangedInAssert = this.nullStatusChangedInAssert;
 	return copy;
 }
 
@@ -1571,6 +1588,7 @@ public UnconditionalFlowInfo mergedWith(UnconditionalFlowInfo otherInits) {
 			}
 		}
 	}
+	combineNullStatusChangeInAssertInfo(otherInits);
 	if (thisHasNulls) {
 		this.tagBits |= NULL_FLAG_MASK;
 	}
@@ -1732,6 +1750,7 @@ public UnconditionalFlowInfo unconditionalFieldLessCopy() {
 		copy.nullBit3 = this.nullBit3 & mask;
 		copy.nullBit4 = this.nullBit4 & mask;
 	}
+	copy.nullStatusChangedInAssert = this.nullStatusChangedInAssert;
 	// use extra vector
 	if (this.extra == null) {
 		return copy; // if vector not yet allocated, then not initialized
@@ -1774,5 +1793,60 @@ public UnconditionalFlowInfo unconditionalInits() {
 public UnconditionalFlowInfo unconditionalInitsWithoutSideEffect() {
 	return this;
 }
+
+public void markedAsNullOrNonNullInAssertExpression(LocalVariableBinding local) {
+	int position = local.id + this.maxFieldCount;
+	int oldLength;
+	if (this.nullStatusChangedInAssert == null) {
+		this.nullStatusChangedInAssert = new int[position + 1];
+	}
+	else {
+		if(position >= (oldLength = this.nullStatusChangedInAssert.length)) {
+			System.arraycopy(this.nullStatusChangedInAssert, 0, (this.nullStatusChangedInAssert = new int[position + 1]), 0, oldLength); 
+		}
+	}
+	this.nullStatusChangedInAssert[position] = 1;
+}
+
+public boolean isMarkedAsNullOrNonNullInAssertExpression(LocalVariableBinding local) {
+	int position = local.id + this.maxFieldCount;
+	if(this.nullStatusChangedInAssert == null || position >= this.nullStatusChangedInAssert.length) {
+		return false;
+	}
+	if(this.nullStatusChangedInAssert[position] == 1) {
+		return true;
+	}
+	return false;
+}
+
+/**
+ * Combine the null status changes in assert expressions info
+ * @param otherInits
+ */
+// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=303448
+private void combineNullStatusChangeInAssertInfo(UnconditionalFlowInfo otherInits) {
+	if (this.nullStatusChangedInAssert != null || otherInits.nullStatusChangedInAssert != null) {
+		int mergedLength, length;
+		if (this.nullStatusChangedInAssert != null) {
+			if (otherInits.nullStatusChangedInAssert != null) {
+				if(otherInits.nullStatusChangedInAssert.length > this.nullStatusChangedInAssert.length) {
+					mergedLength = otherInits.nullStatusChangedInAssert.length;
+					length = this.nullStatusChangedInAssert.length;
+					System.arraycopy(this.nullStatusChangedInAssert, 0, (this.nullStatusChangedInAssert = new int[mergedLength]), 0, length);
+					for(int i = 0; i < length; i ++) {
+						this.nullStatusChangedInAssert[i] |= otherInits.nullStatusChangedInAssert[i];
+					}
+					System.arraycopy(otherInits.nullStatusChangedInAssert, length, this.nullStatusChangedInAssert, length, mergedLength - length);
+				} else {
+					for(int i = 0; i < otherInits.nullStatusChangedInAssert.length; i ++) {
+						this.nullStatusChangedInAssert[i] |= otherInits.nullStatusChangedInAssert[i];
+					}
+				}
+			}
+		} else if (otherInits.nullStatusChangedInAssert != null) {
+			this.nullStatusChangedInAssert = otherInits.nullStatusChangedInAssert;
+		}
+	}
+}
 }
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/BooleanConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/BooleanConstant.java
index af70d44..4f486df 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/BooleanConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/BooleanConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ public class BooleanConstant extends Constant {
 	private static final BooleanConstant TRUE = new BooleanConstant(true);
 	private static final BooleanConstant FALSE = new BooleanConstant(false);
 
-	public static BooleanConstant fromValue(boolean value) {
+	public static Constant fromValue(boolean value) {
 		return value ? BooleanConstant.TRUE : BooleanConstant.FALSE;
 	}
 
@@ -41,4 +41,22 @@ public class BooleanConstant extends Constant {
 	public int typeID() {
 		return T_boolean;
 	}
+
+	public int hashCode() {
+		return this.value ? 1231 : 1237;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		BooleanConstant other = (BooleanConstant) obj;
+		return this.value == other.value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ByteConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ByteConstant.java
index 28de82b..f563962 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ByteConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ByteConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,4 +62,22 @@ public class ByteConstant extends Constant {
 	public int typeID() {
 		return T_byte;
 	}
+
+	public int hashCode() {
+		return this.value;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		ByteConstant other = (ByteConstant) obj;
+		return this.value == other.value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CharConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CharConstant.java
index 538315e..6f740d6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CharConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CharConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,4 +62,22 @@ public class CharConstant extends Constant {
 	public int typeID() {
 		return T_char;
 	}
+
+	public int hashCode() {
+		return this.value;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		CharConstant other = (CharConstant) obj;
+		return this.value == other.value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index a7cd80b..fe6bf99 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
+ *     Stephan Herrmann  - Contribution for bug 236385
+ *     Stephan Herrmann  - Contribution for bug 295551
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.impl;
 
@@ -105,11 +107,13 @@ public class CompilerOptions {
 	public static final String OPTION_ReportAutoboxing = "org.eclipse.jdt.core.compiler.problem.autoboxing"; //$NON-NLS-1$
 	public static final String OPTION_ReportAnnotationSuperInterface = "org.eclipse.jdt.core.compiler.problem.annotationSuperInterface"; //$NON-NLS-1$
 	public static final String OPTION_ReportMissingOverrideAnnotation = "org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation"; //$NON-NLS-1$
+	public static final String OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation = "org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation"; //$NON-NLS-1$
 	public static final String OPTION_ReportMissingDeprecatedAnnotation = "org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation"; //$NON-NLS-1$
 	public static final String OPTION_ReportIncompleteEnumSwitch = "org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch"; //$NON-NLS-1$
 	public static final String OPTION_ReportForbiddenReference =  "org.eclipse.jdt.core.compiler.problem.forbiddenReference"; //$NON-NLS-1$
 	public static final String OPTION_ReportDiscouragedReference =  "org.eclipse.jdt.core.compiler.problem.discouragedReference"; //$NON-NLS-1$
 	public static final String OPTION_SuppressWarnings =  "org.eclipse.jdt.core.compiler.problem.suppressWarnings"; //$NON-NLS-1$
+	public static final String OPTION_SuppressOptionalErrors = "org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors"; //$NON-NLS-1$
 	public static final String OPTION_ReportUnhandledWarningToken =  "org.eclipse.jdt.core.compiler.problem.unhandledWarningToken"; //$NON-NLS-1$
 	public static final String OPTION_ReportUnusedWarningToken =  "org.eclipse.jdt.core.compiler.problem.unusedWarningToken"; //$NON-NLS-1$
 	public static final String OPTION_ReportUnusedLabel =  "org.eclipse.jdt.core.compiler.problem.unusedLabel"; //$NON-NLS-1$
@@ -125,6 +129,8 @@ public class CompilerOptions {
 	public static final String OPTION_ReportMissingHashCodeMethod =  "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"; //$NON-NLS-1$
 	public static final String OPTION_ReportDeadCode =  "org.eclipse.jdt.core.compiler.problem.deadCode"; //$NON-NLS-1$
 	public static final String OPTION_ReportDeadCodeInTrivialIfStatement =  "org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"; //$NON-NLS-1$
+	public static final String OPTION_ReportTasks = "org.eclipse.jdt.core.compiler.problem.tasks"; //$NON-NLS-1$
+	public static final String OPTION_ReportUnusedObjectAllocation = "org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation";  //$NON-NLS-1$
 
 	// Backward compatibility
 	public static final String OPTION_ReportInvalidAnnotation = "org.eclipse.jdt.core.compiler.problem.invalidAnnotation"; //$NON-NLS-1$
@@ -229,9 +235,8 @@ public class CompilerOptions {
 	// group 2
 	public static final int ShouldImplementHashcode = IrritantSet.GROUP2 | ASTNode.Bit1;
 	public static final int DeadCode = IrritantSet.GROUP2 | ASTNode.Bit2;
-	
-	// Map: String optionKey --> Long irritant>
-	private static Map OptionToIrritants;
+	public static final int Tasks = IrritantSet.GROUP2 | ASTNode.Bit3;
+	public static final int UnusedObjectAllocation = IrritantSet.GROUP2 | ASTNode.Bit4;
 
 	// Severity level for handlers
 	/** 
@@ -251,11 +256,11 @@ public class CompilerOptions {
 	
 	/** Classfile debug information, may contain source file name, line numbers, local variable tables, etc... */
 	public int produceDebugAttributes; 
-	/** Compliance level for the compiler, refers to a JDK version, e.g. {lnk {@link ClassFileConstants#JDK1_4} */
+	/** Compliance level for the compiler, refers to a JDK version, e.g. {link {@link ClassFileConstants#JDK1_4} */
 	public long complianceLevel;
-	/** Java source level, refers to a JDK version, e.g. {lnk {@link ClassFileConstants#JDK1_4} */
+	/** Java source level, refers to a JDK version, e.g. {link {@link ClassFileConstants#JDK1_4} */
 	public long sourceLevel;
-	/** VM target level, refers to a JDK version, e.g. {lnk {@link ClassFileConstants#JDK1_4} */
+	/** VM target level, refers to a JDK version, e.g. {link {@link ClassFileConstants#JDK1_4} */
 	public long targetJDK;
 	/** Source encoding format */
 	public String defaultEncoding;
@@ -272,7 +277,7 @@ public class CompilerOptions {
 	/** Tags used to recognize tasks in comments */
 	public char[][] taskTags;
 	/** Respective priorities of recognized task tags */
-	public char[][] taskPriorites;
+	public char[][] taskPriorities;
 	/** Indicate whether tag detection is case sensitive or not */
 	public boolean isTaskCaseSensitive;
 	/** Specify whether deprecation inside deprecated code is to be reported */
@@ -317,8 +322,10 @@ public class CompilerOptions {
 	public boolean reportMissingJavadocCommentsOverriding;
 	/** Indicate whether the JSR bytecode should be inlined to avoid its presence in classfile */
 	public boolean inlineJsrBytecode;
-	/** Indicate if @SuppressWarning annotation are activated */
+	/** Indicate if @SuppressWarning annotations are activated */
 	public boolean suppressWarnings;
+	/** Indicate if @SuppressWarning annotations should also suppress optional errors */
+	public boolean suppressOptionalErrors;
 	/** Specify if should treat optional error as fatal or just like warning */
 	public boolean treatOptionalErrorAsFatal;
 	/** Specify if parser should perform structural recovery in methods */
@@ -329,12 +336,13 @@ public class CompilerOptions {
 	public boolean processAnnotations;
 	/** Store annotations */
 	public boolean storeAnnotations;
+	/** Specify if need to report missing override annotation for a method implementing an interface method (java 1.6 and above)*/
+	public boolean reportMissingOverrideAnnotationForInterfaceMethodImplementation;
 	/** Indicate if annotation processing generates classfiles */
 	public boolean generateClassFiles;
 	/** Indicate if method bodies should be ignored */
 	public boolean ignoreMethodBodies;
 
-
 	// keep in sync with warningTokenToIrritant and warningTokenFromIrritant
 	public final static String[] warningTokens = {
 		"all", //$NON-NLS-1$
@@ -349,6 +357,7 @@ public class CompilerOptions {
 		"nls", //$NON-NLS-1$
 		"null", //$NON-NLS-1$
 		"restriction", //$NON-NLS-1$
+		"rawtypes", //$NON-NLS-1$
 		"serial", //$NON-NLS-1$
 		"static-access", //$NON-NLS-1$
 		"super", //$NON-NLS-1$
@@ -513,31 +522,12 @@ public class CompilerOptions {
 				return OPTION_ReportMissingHashCodeMethod;
 			case DeadCode :
 				return OPTION_ReportDeadCode;
+			case UnusedObjectAllocation:
+				return OPTION_ReportUnusedObjectAllocation;
 		}
 		return null;
 	}
 
-	public static long optionKeyToIrritant(String optionName) {
-		if (OptionToIrritants == null) {
-			Map temp = new HashMap();
-			int group = 0;
-			for (int g = 0; g < 8; g++) {
-				group <<= 1;
-				int index = 0;
-				for (int i = 0; i < 30; i++) {
-					index <<= 1;
-					int irritant = (group<<IrritantSet.GROUP_SHIFT)+index;
-					String optionKey = optionKeyFromIrritant(irritant);
-					if (optionKey == null) continue;
-					temp.put(optionKey, new Integer(irritant));
-				}
-			}
-			OptionToIrritants = temp;
-		}
-		Long irritant = (Long)OptionToIrritants.get(optionName);
-		return irritant == null ? 0 : irritant.longValue();
-	}
-
 	public static String versionFromJdkLevel(long jdkLevel) {
 		switch ((int)(jdkLevel>>16)) {
 			case ClassFileConstants.MAJOR_VERSION_1_1 :
@@ -660,6 +650,7 @@ public class CompilerOptions {
 			OPTION_ReportUnusedDeclaredThrownException,
 			OPTION_ReportUnusedImport,
 			OPTION_ReportUnusedLocal,
+			OPTION_ReportUnusedObjectAllocation,
 			OPTION_ReportUnusedParameter,
 			OPTION_ReportUnusedPrivateMember,
 			OPTION_ReportVarargsArgumentNeedCast,
@@ -690,12 +681,6 @@ public class CompilerOptions {
 				return "nls"; //$NON-NLS-1$
 			case UnnecessaryTypeCheck :
 				return "cast"; //$NON-NLS-1$
-			case UnusedLocalVariable :
-			case UnusedArgument :
-			case UnusedImport :
-			case UnusedPrivateMember :
-			case UnusedDeclaredThrownException :
-				return "unused"; //$NON-NLS-1$
 			case IndirectStaticAccess :
 			case NonStaticAccessToStatic :
 				return "static-access"; //$NON-NLS-1$
@@ -716,10 +701,17 @@ public class CompilerOptions {
 			case MissingDeprecatedAnnotation :
 				return "dep-ann"; //$NON-NLS-1$
 			case RawTypeReference :
-				return "unchecked"; //$NON-NLS-1$
+				return "rawtypes"; //$NON-NLS-1$
 			case UnusedLabel :
 			case UnusedTypeArguments :
 			case RedundantSuperinterface :
+			case UnusedLocalVariable :
+			case UnusedArgument :
+			case UnusedImport :
+			case UnusedPrivateMember :
+			case UnusedDeclaredThrownException :
+			case DeadCode :
+			case UnusedObjectAllocation :
 				return "unused"; //$NON-NLS-1$
 			case DiscouragedReference :
 			case ForbiddenReference :
@@ -779,6 +771,8 @@ public class CompilerOptions {
 					return IrritantSet.NULL;
 				break;
 			case 'r' :
+				if ("rawtypes".equals(warningToken)) //$NON-NLS-1$
+					return IrritantSet.RAW;
 				if ("restriction".equals(warningToken)) //$NON-NLS-1$
 					return IrritantSet.RESTRICTION;
 				break;
@@ -869,6 +863,7 @@ public class CompilerOptions {
 		optionsMap.put(OPTION_ReportDiscouragedReference, getSeverityString(DiscouragedReference));
 		optionsMap.put(OPTION_ReportVarargsArgumentNeedCast, getSeverityString(VarargsArgumentNeedCast));
 		optionsMap.put(OPTION_ReportMissingOverrideAnnotation, getSeverityString(MissingOverrideAnnotation));
+		optionsMap.put(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, this.reportMissingOverrideAnnotationForInterfaceMethodImplementation ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportMissingDeprecatedAnnotation, getSeverityString(MissingDeprecatedAnnotation));
 		optionsMap.put(OPTION_ReportIncompleteEnumSwitch, getSeverityString(IncompleteEnumSwitch));
 		optionsMap.put(OPTION_ReportUnusedLabel, getSeverityString(UnusedLabel));
@@ -881,7 +876,7 @@ public class CompilerOptions {
 			optionsMap.put(OPTION_Encoding, this.defaultEncoding);
 		}
 		optionsMap.put(OPTION_TaskTags, this.taskTags == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskTags,',')));
-		optionsMap.put(OPTION_TaskPriorities, this.taskPriorites == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskPriorites,',')));
+		optionsMap.put(OPTION_TaskPriorities, this.taskPriorities == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskPriorities,',')));
 		optionsMap.put(OPTION_TaskCaseSensitive, this.isTaskCaseSensitive ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportUnusedParameterWhenImplementingAbstract, this.reportUnusedParameterWhenImplementingAbstract ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportUnusedParameterWhenOverridingConcrete, this.reportUnusedParameterWhenOverridingConcrete ? ENABLED : DISABLED);
@@ -893,6 +888,7 @@ public class CompilerOptions {
 		optionsMap.put(OPTION_ReportPotentialNullReference, getSeverityString(PotentialNullReference));
 		optionsMap.put(OPTION_ReportRedundantNullCheck, getSeverityString(RedundantNullCheck));
 		optionsMap.put(OPTION_SuppressWarnings, this.suppressWarnings ? ENABLED : DISABLED);
+		optionsMap.put(OPTION_SuppressOptionalErrors, this.suppressOptionalErrors ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportUnhandledWarningToken, getSeverityString(UnhandledWarningToken));
 		optionsMap.put(OPTION_ReportUnusedWarningToken, getSeverityString(UnusedWarningToken));
 		optionsMap.put(OPTION_ReportParameterAssignment, getSeverityString(ParameterAssignment));
@@ -906,6 +902,8 @@ public class CompilerOptions {
 		optionsMap.put(OPTION_ReportMissingHashCodeMethod, getSeverityString(ShouldImplementHashcode));
 		optionsMap.put(OPTION_ReportDeadCode, getSeverityString(DeadCode));
 		optionsMap.put(OPTION_ReportDeadCodeInTrivialIfStatement, this.reportDeadCodeInTrivialIfStatement ? ENABLED : DISABLED);
+		optionsMap.put(OPTION_ReportTasks, getSeverityString(Tasks));
+		optionsMap.put(OPTION_ReportUnusedObjectAllocation, getSeverityString(UnusedObjectAllocation));
 		return optionsMap;
 	}
 
@@ -977,7 +975,7 @@ public class CompilerOptions {
 
 		// tags used to recognize tasks in comments
 		this.taskTags = null;
-		this.taskPriorites = null;
+		this.taskPriorities = null;
 		this.isTaskCaseSensitive = true;
 
 		// deprecation report
@@ -1021,8 +1019,11 @@ public class CompilerOptions {
 		// suppress warning annotation
 		this.suppressWarnings = true;
 
-		// treat optional error as fatal or just like warning?
-		this.treatOptionalErrorAsFatal = true;
+		// suppress also optional errors
+		this.suppressOptionalErrors = false;
+
+		// treat optional error as non fatal
+		this.treatOptionalErrorAsFatal = false;
 
 		// parser perform statements recovery
 		this.performMethodsFullRecovery = true;
@@ -1039,9 +1040,12 @@ public class CompilerOptions {
 		// enable annotation processing by default only in batch mode
 		this.processAnnotations = false;
 		
+		// disable missing override annotation reporting for interface method implementation
+		this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true;
+		
 		// dead code detection
 		this.reportDeadCodeInTrivialIfStatement = false;
-
+		
 		// ignore method bodies
 		this.ignoreMethodBodies = false;
 	}
@@ -1200,9 +1204,9 @@ public class CompilerOptions {
 			if (optionValue instanceof String) {
 				String stringValue = (String) optionValue;
 				if (stringValue.length() == 0) {
-					this.taskPriorites = null;
+					this.taskPriorities = null;
 				} else {
-					this.taskPriorites = CharOperation.splitAndTrimOn(',', stringValue.toCharArray());
+					this.taskPriorities = CharOperation.splitAndTrimOn(',', stringValue.toCharArray());
 				}
 			}
 		}
@@ -1229,6 +1233,13 @@ public class CompilerOptions {
 				this.suppressWarnings = false;
 			}
 		}
+		if ((optionValue = optionsMap.get(OPTION_SuppressOptionalErrors)) != null) {
+			if (ENABLED.equals(optionValue)) {
+				this.suppressOptionalErrors = true;
+			} else if (DISABLED.equals(optionValue)) {
+				this.suppressOptionalErrors = false;
+			}
+		}
 		if ((optionValue = optionsMap.get(OPTION_FatalOptionalError)) != null) {
 			if (ENABLED.equals(optionValue)) {
 				this.treatOptionalErrorAsFatal = true;
@@ -1236,6 +1247,13 @@ public class CompilerOptions {
 				this.treatOptionalErrorAsFatal = false;
 			}
 		}
+		if ((optionValue = optionsMap.get(OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation)) != null) {
+			if (ENABLED.equals(optionValue)) {
+				this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = true;
+			} else if (DISABLED.equals(optionValue)) {
+				this.reportMissingOverrideAnnotationForInterfaceMethodImplementation = false;
+			}
+		}
 		if ((optionValue = optionsMap.get(OPTION_ReportMethodWithConstructorName)) != null) updateSeverity(MethodWithConstructorName, optionValue);
 		if ((optionValue = optionsMap.get(OPTION_ReportOverridingPackageDefaultMethod)) != null) updateSeverity(OverriddenPackageDefaultMethod, optionValue);
 		if ((optionValue = optionsMap.get(OPTION_ReportDeprecation)) != null) updateSeverity(UsingDeprecatedAPI, optionValue);
@@ -1291,6 +1309,8 @@ public class CompilerOptions {
 		if ((optionValue = optionsMap.get(OPTION_ReportMissingSynchronizedOnInheritedMethod)) != null) updateSeverity(MissingSynchronizedModifierInInheritedMethod, optionValue);
 		if ((optionValue = optionsMap.get(OPTION_ReportMissingHashCodeMethod)) != null) updateSeverity(ShouldImplementHashcode, optionValue);
 		if ((optionValue = optionsMap.get(OPTION_ReportDeadCode)) != null) updateSeverity(DeadCode, optionValue);
+		if ((optionValue = optionsMap.get(OPTION_ReportTasks)) != null) updateSeverity(Tasks, optionValue);
+		if ((optionValue = optionsMap.get(OPTION_ReportUnusedObjectAllocation)) != null) updateSeverity(UnusedObjectAllocation, optionValue);
 
 		// Javadoc options
 		if ((optionValue = optionsMap.get(OPTION_DocCommentSupport)) != null) {
@@ -1452,7 +1472,7 @@ public class CompilerOptions {
 		buf.append("\n\t- parse literal expressions as constants : ").append(this.parseLiteralExpressionsAsConstants ? "ON" : "OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		buf.append("\n\t- encoding : ").append(this.defaultEncoding == null ? "<default>" : this.defaultEncoding); //$NON-NLS-1$ //$NON-NLS-2$
 		buf.append("\n\t- task tags: ").append(this.taskTags == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskTags,',')));  //$NON-NLS-1$
-		buf.append("\n\t- task priorities : ").append(this.taskPriorites == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskPriorites,','))); //$NON-NLS-1$
+		buf.append("\n\t- task priorities : ").append(this.taskPriorities == null ? Util.EMPTY_STRING : new String(CharOperation.concatWith(this.taskPriorities,','))); //$NON-NLS-1$
 		buf.append("\n\t- report deprecation inside deprecated code : ").append(this.reportDeprecationInsideDeprecatedCode ? ENABLED : DISABLED); //$NON-NLS-1$
 		buf.append("\n\t- report deprecation when overriding deprecated method : ").append(this.reportDeprecationWhenOverridingDeprecatedMethod ? ENABLED : DISABLED); //$NON-NLS-1$
 		buf.append("\n\t- report unused parameter when implementing abstract method : ").append(this.reportUnusedParameterWhenImplementingAbstract ? ENABLED : DISABLED); //$NON-NLS-1$
@@ -1473,9 +1493,11 @@ public class CompilerOptions {
 		buf.append("\n\t- autoboxing: ").append(getSeverityString(AutoBoxing)); //$NON-NLS-1$
 		buf.append("\n\t- annotation super interface: ").append(getSeverityString(AnnotationSuperInterface)); //$NON-NLS-1$
 		buf.append("\n\t- missing @Override annotation: ").append(getSeverityString(MissingOverrideAnnotation)); //$NON-NLS-1$
+		buf.append("\n\t- missing @Override annotation for interface method implementation: ").append(this.reportMissingOverrideAnnotationForInterfaceMethodImplementation ? ENABLED : DISABLED); //$NON-NLS-1$
 		buf.append("\n\t- missing @Deprecated annotation: ").append(getSeverityString(MissingDeprecatedAnnotation)); //$NON-NLS-1$
 		buf.append("\n\t- incomplete enum switch: ").append(getSeverityString(IncompleteEnumSwitch)); //$NON-NLS-1$
 		buf.append("\n\t- suppress warnings: ").append(this.suppressWarnings ? ENABLED : DISABLED); //$NON-NLS-1$
+		buf.append("\n\t- suppress optional errors: ").append(this.suppressOptionalErrors ? ENABLED : DISABLED); //$NON-NLS-1$
 		buf.append("\n\t- unhandled warning token: ").append(getSeverityString(UnhandledWarningToken)); //$NON-NLS-1$
 		buf.append("\n\t- unused warning token: ").append(getSeverityString(UnusedWarningToken)); //$NON-NLS-1$
 		buf.append("\n\t- unused label: ").append(getSeverityString(UnusedLabel)); //$NON-NLS-1$
@@ -1490,6 +1512,8 @@ public class CompilerOptions {
 		buf.append("\n\t- should implement hashCode() method: ").append(getSeverityString(ShouldImplementHashcode)); //$NON-NLS-1$
 		buf.append("\n\t- dead code: ").append(getSeverityString(DeadCode)); //$NON-NLS-1$
 		buf.append("\n\t- dead code in trivial if statement: ").append(this.reportDeadCodeInTrivialIfStatement ? ENABLED : DISABLED); //$NON-NLS-1$
+		buf.append("\n\t- tasks severity: ").append(getSeverityString(Tasks)); //$NON-NLS-1$
+		buf.append("\n\t- unused object allocation: ").append(getSeverityString(UnusedObjectAllocation)); //$NON-NLS-1$
 		return buf.toString();
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerStats.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerStats.java
index 858ce8a..c21b4a4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerStats.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerStats.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/DoubleConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/DoubleConstant.java
index a163d81..ef841cb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/DoubleConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/DoubleConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,4 +63,23 @@ public class DoubleConstant extends Constant {
 	public int typeID() {
 		return T_double;
 	}
+
+	public int hashCode() {
+		long temp = Double.doubleToLongBits(this.value);
+		return (int) (temp ^ (temp >>> 32));
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		DoubleConstant other = (DoubleConstant) obj;
+		return Double.doubleToLongBits(this.value) == Double.doubleToLongBits(other.value);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/FloatConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/FloatConstant.java
index 8a2b9c6..41ced2d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/FloatConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/FloatConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,4 +61,22 @@ public class FloatConstant extends Constant {
 	public int typeID() {
 		return T_float;
 	}
+
+	public int hashCode() {
+		return Float.floatToIntBits(this.value);
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		FloatConstant other = (FloatConstant) obj;
+		return Float.floatToIntBits(this.value) == Float.floatToIntBits(other.value);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java
index 8464934..01fb04a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IntConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -97,4 +97,22 @@ public class IntConstant extends Constant {
 	public int typeID() {
 		return T_int;
 	}
+
+	public int hashCode() {
+		return this.value;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		IntConstant other = (IntConstant) obj;
+		return this.value == other.value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
index 32ec458..b9e1dd7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,50 +36,26 @@ public class IrritantSet {
 	// public final static int GROUP7 = 7 << GROUP_SHIFT;
 
 	// Predefine sets of irritants matching warning tokens
-	public static final IrritantSet ALL = new IrritantSet(
-			0xFFFFFFFF & ~GROUP_MASK);
-	public static final IrritantSet BOXING = new IrritantSet(
-			CompilerOptions.AutoBoxing);
-	public static final IrritantSet CAST = new IrritantSet(
-			CompilerOptions.UnnecessaryTypeCheck);
-	public static final IrritantSet DEPRECATION = new IrritantSet(
-			CompilerOptions.UsingDeprecatedAPI);
-	public static final IrritantSet DEP_ANN = new IrritantSet(
-			CompilerOptions.MissingDeprecatedAnnotation);
-	public static final IrritantSet FALLTHROUGH = new IrritantSet(
-			CompilerOptions.FallthroughCase);
-	public static final IrritantSet FINALLY = new IrritantSet(
-			CompilerOptions.FinallyBlockNotCompleting);
-	public static final IrritantSet HIDING = new IrritantSet(
-			CompilerOptions.MaskedCatchBlock); // further scenarii in static
-												// initializer
-	public static final IrritantSet INCOMPLETE_SWITCH = new IrritantSet(
-			CompilerOptions.IncompleteEnumSwitch);
-	public static final IrritantSet NLS = new IrritantSet(
-			CompilerOptions.NonExternalizedString);
-	public static final IrritantSet NULL = new IrritantSet(
-			CompilerOptions.NullReference); // further scenarii in static
-											// initializer
-	public static final IrritantSet RESTRICTION = new IrritantSet(
-			CompilerOptions.ForbiddenReference); // further scenarii in static
-													// initializer
-	public static final IrritantSet SERIAL = new IrritantSet(
-			CompilerOptions.MissingSerialVersion);
-	public static final IrritantSet STATIC_ACCESS = new IrritantSet(
-			CompilerOptions.IndirectStaticAccess); // further scenarii in static
-													// initializer
-	public static final IrritantSet SYNTHETIC_ACCESS = new IrritantSet(
-			CompilerOptions.AccessEmulation);
-	public static final IrritantSet SUPER = new IrritantSet(
-			CompilerOptions.OverridingMethodWithoutSuperInvocation);
-	public static final IrritantSet UNUSED = new IrritantSet(
-			CompilerOptions.UnusedLocalVariable); // further scenarii in static
-													// initializer
-	public static final IrritantSet UNCHECKED = new IrritantSet(
-			CompilerOptions.UncheckedTypeOperation); // further scenarii in
-														// static initializer
-	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(
-			CompilerOptions.UnqualifiedFieldAccess);
+	public static final IrritantSet ALL = new IrritantSet(0xFFFFFFFF & ~GROUP_MASK);
+	public static final IrritantSet BOXING = new IrritantSet(CompilerOptions.AutoBoxing);
+	public static final IrritantSet CAST = new IrritantSet(CompilerOptions.UnnecessaryTypeCheck);
+	public static final IrritantSet DEPRECATION = new IrritantSet(CompilerOptions.UsingDeprecatedAPI);
+	public static final IrritantSet DEP_ANN = new IrritantSet(CompilerOptions.MissingDeprecatedAnnotation);
+	public static final IrritantSet FALLTHROUGH = new IrritantSet(CompilerOptions.FallthroughCase);
+	public static final IrritantSet FINALLY = new IrritantSet(CompilerOptions.FinallyBlockNotCompleting);
+	public static final IrritantSet HIDING = new IrritantSet(CompilerOptions.MaskedCatchBlock);
+	public static final IrritantSet INCOMPLETE_SWITCH = new IrritantSet(CompilerOptions.IncompleteEnumSwitch);
+	public static final IrritantSet NLS = new IrritantSet(CompilerOptions.NonExternalizedString);
+	public static final IrritantSet NULL = new IrritantSet(CompilerOptions.NullReference);
+	public static final IrritantSet RAW = new IrritantSet(CompilerOptions.RawTypeReference);
+	public static final IrritantSet RESTRICTION = new IrritantSet(CompilerOptions.ForbiddenReference);
+	public static final IrritantSet SERIAL = new IrritantSet(CompilerOptions.MissingSerialVersion);
+	public static final IrritantSet STATIC_ACCESS = new IrritantSet(CompilerOptions.IndirectStaticAccess);
+	public static final IrritantSet SYNTHETIC_ACCESS = new IrritantSet(CompilerOptions.AccessEmulation);
+	public static final IrritantSet SUPER = new IrritantSet(CompilerOptions.OverridingMethodWithoutSuperInvocation);
+	public static final IrritantSet UNUSED = new IrritantSet(CompilerOptions.UnusedLocalVariable);
+	public static final IrritantSet UNCHECKED = new IrritantSet(CompilerOptions.UncheckedTypeOperation);
+	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(CompilerOptions.UnqualifiedFieldAccess);
 
 	public static final IrritantSet COMPILER_DEFAULT_ERRORS = new IrritantSet(0); // no optional error by default	
 	public static final IrritantSet COMPILER_DEFAULT_WARNINGS = new IrritantSet(0); // see static initializer below
@@ -119,7 +95,9 @@ public class IrritantSet {
 				| CompilerOptions.UnusedWarningToken
 				| CompilerOptions.ComparingIdentical)
 			// group-2 warnings enabled by default
-			.set(CompilerOptions.DeadCode);
+			.set(
+				CompilerOptions.DeadCode
+				|CompilerOptions.Tasks);
 			
 		ALL.setAll();
 		HIDING
@@ -138,8 +116,13 @@ public class IrritantSet {
 			.set(CompilerOptions.UnusedLabel)
 			.set(CompilerOptions.UnusedImport)
 			.set(CompilerOptions.UnusedTypeArguments)
-			.set(CompilerOptions.RedundantSuperinterface);
-		UNCHECKED.set(CompilerOptions.RawTypeReference);
+			.set(CompilerOptions.RedundantSuperinterface)
+			.set(CompilerOptions.DeadCode)
+			.set(CompilerOptions.UnusedObjectAllocation);
+		String suppressRawWhenUnchecked = System.getProperty("suppressRawWhenUnchecked"); //$NON-NLS-1$
+		if (suppressRawWhenUnchecked != null && "true".equalsIgnoreCase(suppressRawWhenUnchecked)) { //$NON-NLS-1$
+			UNCHECKED.set(CompilerOptions.RawTypeReference);
+		}
 	}
 
 	// Internal state
@@ -212,6 +195,20 @@ public class IrritantSet {
 		return false;
 	}
 
+	/**
+	 * Returns true if all of the irritants in the given irritant set are set in receiver
+	 * @param irritantSet the given irritant set
+	 */
+	public boolean hasSameIrritants(IrritantSet irritantSet) {
+		if (irritantSet == null)
+			return false;
+		for (int i = 0; i < GROUP_MAX; i++) {
+			if (this.bits[i] != irritantSet.bits[i])
+				return false;
+		}
+		return true;
+	}
+
 	public boolean isSet(int singleGroupIrritants) {
 		int group = (singleGroupIrritants & GROUP_MASK) >> GROUP_SHIFT;
 		return (this.bits[group] & singleGroupIrritants) != 0;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java
index 3f83954..99f9f8e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/LongConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,4 +71,22 @@ public String toString(){
 public int typeID() {
 	return T_long;
 }
+
+public int hashCode() {
+	return (int) (this.value ^ (this.value >>> 32));
+}
+
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+	LongConstant other = (LongConstant) obj;
+	return this.value == other.value;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ShortConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ShortConstant.java
index 9afba0f..6f107ae 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ShortConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ShortConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,4 +63,22 @@ public class ShortConstant extends Constant {
 	public int typeID() {
 		return T_short;
 	}
+
+	public int hashCode() {
+		return this.value;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		ShortConstant other = (ShortConstant) obj;
+		return this.value == other.value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/StringConstant.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/StringConstant.java
index adf9158..37d493f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/StringConstant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/StringConstant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,4 +39,29 @@ public class StringConstant extends Constant {
 	public int typeID() {
 		return T_JavaLangString;
 	}
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((this.value == null) ? 0 : this.value.hashCode());
+		return result;
+	}
+
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (getClass() != obj.getClass()) {
+			return false;
+		}
+		StringConstant other = (StringConstant) obj;
+		if (this.value == null) {
+			return other.value == null;
+		} else {
+			return this.value.equals(other.value);
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index e6bda1d..b12a7b2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -302,7 +302,9 @@ void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
 			char[] methodDescriptor = binaryType.getEnclosingMethod();
 			if (methodDescriptor != null) {
 				MethodBinding enclosingMethod = findMethod(methodDescriptor, missingTypeNames);
-				typeVars = enclosingMethod.typeVariables;
+				if (enclosingMethod != null) {
+					typeVars = enclosingMethod.typeVariables;
+				}
 			}
 
 			// attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
@@ -688,6 +690,7 @@ private MethodBinding findMethod(char[] methodDescriptor, char[][][] missingType
 	TypeBinding[] parameters = Binding.NO_PARAMETERS;
 	int numOfParams = 0;
 	char nextChar;
+	int paramStart = index;
 	while ((nextChar = methodDescriptor[++index]) != ')') {
 		if (nextChar != '[') {
 			numOfParams++;
@@ -695,27 +698,41 @@ private MethodBinding findMethod(char[] methodDescriptor, char[][][] missingType
 				while ((nextChar = methodDescriptor[++index]) != ';'){/*empty*/}
 		}
 	}
-
-	int startIndex = 0;
 	if (numOfParams > 0) {
 		parameters = new TypeBinding[numOfParams];
-		index = 1;
-		int end = 0;   // first character is always '(' so skip it
+		index = paramStart + 1;
+		int end = paramStart; // first character is always '(' so skip it
 		for (int i = 0; i < numOfParams; i++) {
 			while ((nextChar = methodDescriptor[++end]) == '['){/*empty*/}
 			if (nextChar == 'L')
 				while ((nextChar = methodDescriptor[++end]) != ';'){/*empty*/}
 
-			if (i >= startIndex) {   // skip the synthetic arg if necessary
-				parameters[i - startIndex] = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames);
+			TypeBinding param = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames);
+			if (param instanceof UnresolvedReferenceBinding) {
+				param = resolveType(param, this.environment, true /* raw conversion */);
 			}
+			parameters[i] = param;
 			index = end + 1;
 		}
 	}
 
-	return CharOperation.equals(selector, TypeConstants.INIT)
-		? this.enclosingType.getExactConstructor(parameters)
-		: this.enclosingType.getExactMethod(selector, parameters, null);
+	int parameterLength = parameters.length;
+	MethodBinding[] methods2 = this.enclosingType.getMethods(selector, parameterLength);
+	// find matching method using parameters
+	loop: for (int i = 0, max = methods2.length; i < max; i++) {
+		MethodBinding currentMethod = methods2[i];
+		TypeBinding[] parameters2 = currentMethod.parameters;
+		int currentMethodParameterLength = parameters2.length;
+		if (parameterLength == currentMethodParameterLength) {
+			for (int j = 0; j < currentMethodParameterLength; j++) {
+				if (parameters[j] != parameters2[j] && parameters[j].erasure() != parameters2[j].erasure()) {
+					continue loop;
+				}
+			}
+			return currentMethod;
+		}
+	}
+	return null;
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index effd7a1..6d88273 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -191,14 +191,14 @@ void computeLocalVariablePositions(int ilocal, int initOffset, CodeStream codeSt
 			LocalVariableBinding local = this.locals[ilocal]; // if no local at all, will be locals[ilocal]==null
 
 			// check if variable is actually used, and may force it to be preserved
-			boolean generateCurrentLocalVar = (local.useFlag == LocalVariableBinding.USED && local.constant() == Constant.NotAConstant);
+			boolean generateCurrentLocalVar = (local.useFlag != LocalVariableBinding.UNUSED && local.constant() == Constant.NotAConstant);
 
 			// do not report fake used variable
 			if (local.useFlag == LocalVariableBinding.UNUSED
 				&& (local.declaration != null) // unused (and non secret) local
 				&& ((local.declaration.bits & ASTNode.IsLocalDeclarationReachable) != 0)) { // declaration is reachable
 
-				if (!(local.declaration instanceof Argument))  // do not report unused catch arguments
+				if (!(local.declaration instanceof Argument)) // do not report unused catch arguments
 					problemReporter().unusedLocalVariable(local.declaration);
 			}
 
@@ -481,6 +481,12 @@ public Binding getBinding(char[][] compoundName, int mask, InvocationSite invoca
 		}
 		if ((binding = findMemberType(nextName, referenceBinding)) == null) {
 			if ((mask & Binding.FIELD) != 0) {
+				return new ProblemFieldBinding(
+						null,
+						referenceBinding,
+						nextName,
+						ProblemReasons.NotFound);
+			} else if ((mask & Binding.VARIABLE) != 0) {
 				return new ProblemBinding(
 					CharOperation.subarray(compoundName, 0, currentIndex),
 					referenceBinding,
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index 64be3cd..dc5d6d3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -299,13 +299,16 @@ public class ClassScope extends Scope {
 			methodBindings[1] = sourceType.addSyntheticEnumMethod(TypeConstants.VALUEOF); // add <EnumType> valueOf()
 		}
 		// create bindings for source methods
+		boolean hasNativeMethods = false;
 		if (sourceType.isAbstract()) {
 			for (int i = 0; i < size; i++) {
 				if (i != clinitIndex) {
 					MethodScope scope = new MethodScope(this, methods[i], false);
 					MethodBinding methodBinding = scope.createMethod(methods[i]);
-					if (methodBinding != null) // is null if binding could not be created
+					if (methodBinding != null) { // is null if binding could not be created
 						methodBindings[count++] = methodBinding;
+						hasNativeMethods = hasNativeMethods || methodBinding.isNative();
+					}
 				}
 			}
 		} else {
@@ -317,6 +320,7 @@ public class ClassScope extends Scope {
 					if (methodBinding != null) { // is null if binding could not be created
 						methodBindings[count++] = methodBinding;
 						hasAbstractMethods = hasAbstractMethods || methodBinding.isAbstract();
+						hasNativeMethods = hasNativeMethods || methodBinding.isNative();
 					}
 				}
 			}
@@ -327,6 +331,17 @@ public class ClassScope extends Scope {
 			System.arraycopy(methodBindings, 0, methodBindings = new MethodBinding[count], 0, count);
 		sourceType.tagBits &= ~(TagBits.AreMethodsSorted|TagBits.AreMethodsComplete); // in case some static imports reached already into this type
 		sourceType.setMethods(methodBindings);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=243917, conservatively tag all methods and fields as
+		// being in use if there is a native method in the class.
+		if (hasNativeMethods) {
+			for (int i = 0; i < methodBindings.length; i++) {
+				methodBindings[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+			}
+			FieldBinding[] fields = sourceType.unResolvedFields(); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=301683
+			for (int i = 0; i < fields.length; i++) {
+				fields[i].modifiers |= ExtraCompilerModifiers.AccLocallyUsed;	
+			}
+		}
 	}
 
 	SourceTypeBinding buildType(SourceTypeBinding enclosingType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
@@ -969,7 +984,7 @@ public class ClassScope extends Scope {
 			}
 
 			// check for simple interface collisions
-			// Check for a duplicate interface once the name is resolved, otherwise we may be confused (ie : a.b.I and c.d.I)
+			// Check for a duplicate interface once the name is resolved, otherwise we may be confused (i.e. a.b.I and c.d.I)
 			for (int j = 0; j < i; j++) {
 				if (interfaceBindings[j] == superInterface) {
 					problemReporter().duplicateSuperinterface(sourceType, superInterfaceRef, superInterface);
@@ -1072,6 +1087,12 @@ public class ClassScope extends Scope {
 			compilationUnitScope().recordSuperTypeReference(superType); // to record supertypes
 			return detectHierarchyCycle(this.referenceContext.binding, (ReferenceBinding) superType, reference);
 		}
+		// Reinstate the code deleted by the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=205235
+		// For details, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057. 
+		if ((superType.tagBits & TagBits.BeginHierarchyCheck) == 0 && superType instanceof SourceTypeBinding)
+			// ensure if this is a source superclass that it has already been checked
+			((SourceTypeBinding) superType).scope.connectTypeHierarchyWithoutMembers();
+
 		return false;
 	}
 
@@ -1090,7 +1111,7 @@ public class ClassScope extends Scope {
 		if (superType.isMemberType()) {
 			ReferenceBinding current = superType.enclosingType();
 			do {
-				if (current.isHierarchyBeingConnected() && current == sourceType) {
+				if (current.isHierarchyBeingActivelyConnected() && current == sourceType) {
 					problemReporter().hierarchyCircularity(sourceType, current, reference);
 					sourceType.tagBits |= TagBits.HierarchyHasProblems;
 					current.tagBits |= TagBits.HierarchyHasProblems;
@@ -1143,11 +1164,11 @@ public class ClassScope extends Scope {
 			return hasCycle;
 		}
 
-		if (superType.isHierarchyBeingConnected()) {
+		if (superType.isHierarchyBeingActivelyConnected()) {
 			org.eclipse.jdt.internal.compiler.ast.TypeReference ref = ((SourceTypeBinding) superType).scope.superTypeReference;
 			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=133071
 			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=121734
-			if (ref != null && (ref.resolvedType == null || ((ReferenceBinding) ref.resolvedType).isHierarchyBeingConnected())) {
+			if (ref != null && (ref.resolvedType == null || ((ReferenceBinding) ref.resolvedType).isHierarchyBeingActivelyConnected())) {
 				problemReporter().hierarchyCircularity(sourceType, superType, reference);
 				sourceType.tagBits |= TagBits.HierarchyHasProblems;
 				superType.tagBits |= TagBits.HierarchyHasProblems;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index 1c4d112..d01198d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -222,8 +222,8 @@ void checkParameterizedTypes() {
  * be actually outputed if sitting inside unreachable code.
  */
 public char[] computeConstantPoolName(LocalTypeBinding localType) {
-	if (localType.constantPoolName() != null) {
-		return localType.constantPoolName();
+	if (localType.constantPoolName != null) {
+		return localType.constantPoolName;
 	}
 	// delegates to the outermost enclosing classfile, since it is the only one with a global vision of its innertypes.
 
@@ -381,7 +381,7 @@ void faultInImports() {
 			ReferenceBinding conflictingType = null;
 			if (importBinding instanceof MethodBinding) {
 				conflictingType = (ReferenceBinding) getType(compoundName, compoundName.length);
-				if (!conflictingType.isValidBinding())
+				if (!conflictingType.isValidBinding() || (importReference.isStatic() && !conflictingType.isStatic()))
 					conflictingType = null;
 			}
 			// collisions between an imported static field & a type should be checked according to spec... but currently not by javac
@@ -396,8 +396,29 @@ void faultInImports() {
 				ReferenceBinding existingType = typesBySimpleNames.get(compoundName[compoundName.length - 1]);
 				if (existingType != null) {
 					// duplicate test above should have caught this case, but make sure
-					if (existingType == referenceBinding)
+					if (existingType == referenceBinding) {
+						// https://bugs.eclipse.org/bugs/show_bug.cgi?id=302865
+						// Check all resolved imports to see if this import qualifies as a duplicate
+						for (int j = 0; j < index; j++) {
+							ImportBinding resolved = resolvedImports[j];
+							if (resolved instanceof ImportConflictBinding) {
+								ImportConflictBinding importConflictBinding = (ImportConflictBinding) resolved;
+								if (importConflictBinding.conflictingTypeBinding == referenceBinding) {
+									if (!importReference.isStatic()) {
+										// resolved is implicitly static
+										problemReporter().duplicateImport(importReference);
+										resolvedImports[index++] = new ImportBinding(compoundName, false, importBinding, importReference);
+									}
+								}
+							} else if (resolved.resolvedImport == referenceBinding) {
+								if (importReference.isStatic() != resolved.isStatic()) {
+									problemReporter().duplicateImport(importReference);
+									resolvedImports[index++] = new ImportBinding(compoundName, false, importBinding, importReference);
+								}
+							}
+						}
 						continue nextImport;
+					}
 					// either the type collides with a top level type or another imported type
 					for (int j = 0, length = this.topLevelTypes.length; j < length; j++) {
 						if (CharOperation.equals(this.topLevelTypes[j].sourceName, existingType.sourceName)) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
index 8e953ab..fcee42b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
@@ -141,7 +141,11 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
 	TypeBinding originalDeclaringClass = this.declaringClass.original();
 	ReferenceBinding currentType = (ReferenceBinding) receiverType;
 	do {
-		if (originalDeclaringClass == currentType.original()) return true;
+		if (currentType.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
+			if (originalDeclaringClass == currentType.erasure().original()) return true;
+		} else {
+			if (originalDeclaringClass == currentType.original()) return true;
+		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
 		if (currentPackage != null && currentPackage != declaringPackage) return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
index 7d3c766..a09b056 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,4 +24,5 @@ public interface InvocationSite {
 	void setFieldIndex(int depth);
 	int sourceEnd();
 	int sourceStart();
+	TypeBinding expectedType();
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
index c01f3a1..4bf4096 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -114,7 +114,12 @@ public char[] computeUniqueKey(boolean isLeaf) {
 }
 
 public char[] constantPoolName() /* java/lang/Object */ {
-	return this.constantPoolName;
+	if (this.constantPoolName == null && this.scope != null) {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=322154, we do have some
+		// cases where the left hand does not know what the right is doing.
+		this.constantPoolName = this.scope.compilationUnitScope().computeConstantPoolName(this);
+	}
+	return this.constantPoolName;	
 }
 
 ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnvironment) {
@@ -139,7 +144,7 @@ ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnviron
  * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=99686)
  */
 public char[] genericTypeSignature() {
-	if (this.genericReferenceTypeSignature == null && constantPoolName() == null) {
+	if (this.genericReferenceTypeSignature == null && this.constantPoolName == null) {
 		if (isAnonymousType())
 			setConstantPoolName(superclass().sourceName());
 		else
@@ -213,7 +218,7 @@ public void setConstantPoolName(char[] computedConstantPoolName) /* java/lang/Ob
  * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=102284)
  */
 public char[] signature() {
-	if (this.signature == null && constantPoolName() == null) {
+	if (this.signature == null && this.constantPoolName == null) {
 		if (isAnonymousType())
 			setConstantPoolName(superclass().sourceName());
 		else
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index c474c5c..042c2d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,7 @@ public class LookupEnvironment implements ProblemReasons, TypeConstants {
 	private SimpleLookupTable uniqueRawTypeBindings;
 	private SimpleLookupTable uniqueWildcardBindings;
 	private SimpleLookupTable uniqueParameterizedGenericMethodBindings;
+	private SimpleLookupTable uniqueGetClassMethodBinding; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=300734
 
 	public CompilationUnitDeclaration unitBeingCompleted = null; // only set while completing units
 	public Object missingClassFileLocation = null; // only set when resolving certain references, to help locating problems
@@ -256,6 +257,39 @@ public void completeTypeBindings(CompilationUnitDeclaration parsedUnit, boolean
 		parsedUnit.scope.buildFieldsAndMethods();
 	this.unitBeingCompleted = null;
 }
+
+/*
+* Used by other compiler tools which do not start by calling completeTypeBindings()
+* and have more than 1 unit to complete.
+*
+* 1. Connect the type hierarchy for the type bindings created for parsedUnits.
+* 2. Create the field bindings
+* 3. Create the method bindings
+*/
+public void completeTypeBindings(CompilationUnitDeclaration[] parsedUnits, boolean[] buildFieldsAndMethods, int unitCount) {
+	for (int i = 0; i < unitCount; i++) {
+		CompilationUnitDeclaration parsedUnit = parsedUnits[i];
+		if (parsedUnit.scope != null)
+			(this.unitBeingCompleted = parsedUnit).scope.checkAndSetImports();
+	}
+
+	for (int i = 0; i < unitCount; i++) {
+		CompilationUnitDeclaration parsedUnit = parsedUnits[i];
+		if (parsedUnit.scope != null)
+			(this.unitBeingCompleted = parsedUnit).scope.connectTypeHierarchy();
+	}
+
+	for (int i = 0; i < unitCount; i++) {
+		CompilationUnitDeclaration parsedUnit = parsedUnits[i];
+		if (parsedUnit.scope != null) {
+			(this.unitBeingCompleted = parsedUnit).scope.checkParameterizedTypes();
+			if (buildFieldsAndMethods[i])
+				parsedUnit.scope.buildFieldsAndMethods();
+		}
+	}
+
+	this.unitBeingCompleted = null;
+}
 public MethodBinding computeArrayClone(MethodBinding objectClone) {
 	if (this.arrayClone == null) {
 		this.arrayClone = new MethodBinding(
@@ -778,6 +812,21 @@ public ParameterizedGenericMethodBinding createParameterizedGenericMethod(Method
 	return parameterizedGenericMethod;
 }
 
+public ParameterizedMethodBinding createGetClassMethod(TypeBinding receiverType, MethodBinding originalMethod, Scope scope) {
+	// see if we have already cached this method for the given receiver type.
+	ParameterizedMethodBinding retVal = null;
+	if (this.uniqueGetClassMethodBinding == null) {
+		this.uniqueGetClassMethodBinding = new SimpleLookupTable(3);
+	} else {
+		retVal = (ParameterizedMethodBinding)this.uniqueGetClassMethodBinding.get(receiverType);
+	}
+	if (retVal == null) {
+		retVal = ParameterizedMethodBinding.instantiateGetClass(receiverType, originalMethod, scope);
+		this.uniqueGetClassMethodBinding.put(receiverType, retVal);
+	}
+	return retVal;
+}
+
 public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
 	// cached info is array of already created parameterized types for this type
 	ParameterizedTypeBinding[] cachedInfo = (ParameterizedTypeBinding[])this.uniqueParameterizedTypeBindings.get(genericType);
@@ -1297,6 +1346,7 @@ public void reset() {
 	this.uniqueRawTypeBindings = new SimpleLookupTable(3);
 	this.uniqueWildcardBindings = new SimpleLookupTable(3);
 	this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
+	this.uniqueGetClassMethodBinding = null;
 	this.missingTypes = null;
 
 	for (int i = this.units.length; --i >= 0;)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
index cb80c3a..6381130 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -161,13 +161,22 @@ MethodBinding asRawMethod(LookupEnvironment env) {
 			arguments[i] = env.convertToRawType(var.upperBound(), false /*do not force conversion of enclosing types*/);
 		} else {
 			// use an intersection type to retain full bound information if more than 1 bound
-			TypeBinding rawSuperclass = env.convertToRawType(var.superclass(), false);
 			TypeBinding[] itsSuperinterfaces = var.superInterfaces();
 			int superLength = itsSuperinterfaces.length;
-			TypeBinding[] rawSuperinterfaces = new TypeBinding[superLength];
-			for (int s = 0; s < superLength; s++)
-				rawSuperinterfaces[s] = env.convertToRawType(itsSuperinterfaces[s], false);
-			arguments[i] = env.createWildcard(null, 0, rawSuperclass, rawSuperinterfaces, org.eclipse.jdt.internal.compiler.ast.Wildcard.EXTENDS);
+			TypeBinding rawFirstBound = null;
+			TypeBinding[] rawOtherBounds = null;
+			if (var.boundsCount() == superLength) {
+				rawFirstBound = env.convertToRawType(itsSuperinterfaces[0], false);
+				rawOtherBounds = new TypeBinding[superLength - 1];
+				for (int s = 1; s < superLength; s++)
+					rawOtherBounds[s - 1] = env.convertToRawType(itsSuperinterfaces[s], false);
+			} else {
+				rawFirstBound = env.convertToRawType(var.superclass(), false);
+				rawOtherBounds = new TypeBinding[superLength];
+				for (int s = 0; s < superLength; s++)
+					rawOtherBounds[s] = env.convertToRawType(itsSuperinterfaces[s], false);
+			}
+			arguments[i] = env.createWildcard(null, 0, rawFirstBound, rawOtherBounds, org.eclipse.jdt.internal.compiler.ast.Wildcard.EXTENDS);
 		}
 	}
 	return env.createParameterizedGenericMethod(this, arguments);
@@ -312,9 +321,13 @@ public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invoca
 	if (receiverType instanceof ArrayBinding)
 		return false;
 	TypeBinding originalDeclaringClass = this.declaringClass.original();
-	ReferenceBinding currentType = (ReferenceBinding) receiverType;
+	ReferenceBinding currentType = (ReferenceBinding) (receiverType);
 	do {
-		if (originalDeclaringClass == currentType.original()) return true;
+		if (currentType.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
+			if (originalDeclaringClass == currentType.erasure().original()) return true;
+		} else {
+			if (originalDeclaringClass == currentType.original()) return true;
+		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
 		if (currentPackage != null && currentPackage != declaringPackage) return false;
@@ -540,86 +553,6 @@ public Object getDefaultValue() {
 }
 
 /**
- * Return the highest method/constructor in supertype hierarchy with same selector and arguments
- */
-public MethodBinding getHighestOverridenMethod(LookupEnvironment environment) {
-	MethodBinding bestMethod = this;
-    ReferenceBinding currentType = this.declaringClass;
-    if (this.isConstructor()) {
-    	// walk superclasses - only
-    	do {
-    		MethodBinding superMethod = currentType.getExactConstructor(this.parameters);
-    		if (superMethod != null) {
-    			bestMethod = superMethod;
-    		}
-    	} while ((currentType = currentType.superclass()) != null);
-    	return bestMethod;
-    }
-    MethodVerifier verifier = environment.methodVerifier();
-	// walk superclasses
-	ReferenceBinding[] interfacesToVisit = null;
-	int nextPosition = 0;
-	do {
-		MethodBinding[] superMethods = currentType.getMethods(this.selector);
-		for (int i = 0, length = superMethods.length; i < length; i++) {
-			if (verifier.doesMethodOverride(this, superMethods[i])) {
-				bestMethod = superMethods[i];
-				break;
-			}
-		}
-		ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
-		if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
-			if (interfacesToVisit == null) {
-				interfacesToVisit = itsInterfaces;
-				nextPosition = interfacesToVisit.length;
-			} else {
-				int itsLength = itsInterfaces.length;
-				if (nextPosition + itsLength >= interfacesToVisit.length)
-					System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
-				nextInterface : for (int a = 0; a < itsLength; a++) {
-					ReferenceBinding next = itsInterfaces[a];
-					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
-					interfacesToVisit[nextPosition++] = next;
-				}
-			}
-		}
-	} while ((currentType = currentType.superclass()) != null);
-	if (bestMethod.declaringClass.id == TypeIds.T_JavaLangObject) {
-		return bestMethod;
-	}
-	// walk superinterfaces
-	for (int i = 0; i < nextPosition; i++) {
-		currentType = interfacesToVisit[i];
-		MethodBinding[] superMethods = currentType.getMethods(this.selector);
-		for (int j = 0, length = superMethods.length; j < length; j++) {
-			MethodBinding superMethod = superMethods[j];
-			if (verifier.doesMethodOverride(this, superMethod)) {
-				TypeBinding bestReturnType = bestMethod.returnType;
-				if (bestReturnType == superMethod.returnType
-						|| bestMethod.returnType.findSuperTypeOriginatingFrom(superMethod.returnType) != null) {
-					bestMethod = superMethod;
-				}
-				break;
-			}
-		}
-		ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
-		if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
-			int itsLength = itsInterfaces.length;
-			if (nextPosition + itsLength >= interfacesToVisit.length)
-				System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
-			nextInterface : for (int a = 0; a < itsLength; a++) {
-				ReferenceBinding next = itsInterfaces[a];
-				for (int b = 0; b < nextPosition; b++)
-					if (next == interfacesToVisit[b]) continue nextInterface;
-				interfacesToVisit[nextPosition++] = next;
-			}
-		}
-	}	
-	return bestMethod;
-}
-
-/**
  * @return the annotations for each of the method parameters or <code>null></code>
  * 	if there's no parameter or no annotation at all.
  */
@@ -1110,6 +1043,9 @@ public final int sourceEnd() {
 	return method.sourceEnd;
 }
 public AbstractMethodDeclaration sourceMethod() {
+	if (isSynthetic()) {
+		return null;
+	}
 	SourceTypeBinding sourceType;
 	try {
 		sourceType = (SourceTypeBinding) this.declaringClass;
@@ -1118,9 +1054,11 @@ public AbstractMethodDeclaration sourceMethod() {
 	}
 
 	AbstractMethodDeclaration[] methods = sourceType.scope.referenceContext.methods;
-	for (int i = methods.length; --i >= 0;)
-		if (this == methods[i].binding)
-			return methods[i];
+	if (methods != null) {
+		for (int i = methods.length; --i >= 0;)
+			if (this == methods[i].binding)
+				return methods[i];
+	}
 	return null;
 }
 public final int sourceStart() {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
index 4901ba8..f78b1b2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -295,7 +295,7 @@ public void computeLocalVariablePositions(int initOffset, CodeStream codeStream)
  * Error management:
  * 		keep null for all the errors that prevent the method to be created
  * 		otherwise return a correct method binding (but without the element
- *		that caused the problem) : ie : Incorrect thrown exception
+ *		that caused the problem) : i.e. Incorrect thrown exception
  */
 MethodBinding createMethod(AbstractMethodDeclaration method) {
 	// is necessary to ensure error reporting
@@ -469,7 +469,7 @@ public final int recordInitializationStates(FlowInfo flowInfo) {
 }
 
 /**
- *  Answer the reference method of this scope, or null if initialization scoope.
+ *  Answer the reference method of this scope, or null if initialization scope.
  */
 public AbstractMethodDeclaration referenceMethod() {
 	if (this.referenceContext instanceof AbstractMethodDeclaration) return (AbstractMethodDeclaration) this.referenceContext;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
index c706f58..47ecc69 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,7 +35,7 @@ Binding creation is responsible for reporting all problems with types:
 		- extending a final class
 		- extending an interface instead of a class
 		- implementing a class instead of an interface
-		- implementing the same interface more than once (ie. duplicate interfaces)
+		- implementing the same interface more than once (i.e. duplicate interfaces)
 	- with nested types:
 		- shadowing an enclosing type's source name
 		- defining a static class or interface inside a non-static nested class
@@ -253,8 +253,22 @@ void checkForRedundantSuperinterfaces(ReferenceBinding superclass, ReferenceBind
 	if (superInterfaces == Binding.NO_SUPERINTERFACES) return;
 
 	SimpleSet interfacesToCheck = new SimpleSet(superInterfaces.length);
-	for (int i = 0, l = superInterfaces.length; i < l; i++)
-		interfacesToCheck.add(superInterfaces[i]);
+	next : for (int i = 0, l = superInterfaces.length; i < l; i++) {
+		ReferenceBinding toCheck = superInterfaces[i];
+		for (int j = 0; j < l; j++) {
+			if (i != j && toCheck.implementsInterface(superInterfaces[j], true)) {
+				TypeReference[] refs = this.type.scope.referenceContext.superInterfaces;
+				for (int r = 0, rl = refs.length; r < rl; r++) {
+					if (refs[r].resolvedType == toCheck) {
+						problemReporter().redundantSuperInterface(this.type, refs[j], superInterfaces[j], toCheck);
+						continue next;
+					}
+				}
+			}
+		}
+		interfacesToCheck.add(toCheck);
+	}
+
 	ReferenceBinding[] itsInterfaces = null;
 	SimpleSet inheritedInterfaces = new SimpleSet(5);
 	ReferenceBinding superType = superclass;
@@ -409,15 +423,26 @@ For each inherited method identifier (message pattern - vm signature minus the r
 void checkMethods() {
 	boolean mustImplementAbstractMethods = mustImplementAbstractMethods();
 	boolean skipInheritedMethods = mustImplementAbstractMethods && canSkipInheritedMethods(); // have a single concrete superclass so only check overridden methods
+	boolean isOrEnclosedByPrivateType = this.type.isOrEnclosedByPrivateType();
 	char[][] methodSelectors = this.inheritedMethods.keyTable;
 	nextSelector : for (int s = methodSelectors.length; --s >= 0;) {
 		if (methodSelectors[s] == null) continue nextSelector;
 
 		MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(methodSelectors[s]);
+		MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
+		
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
+		// inherited methods of super classes are too. current != null case handled below.
+		if (current == null && !isOrEnclosedByPrivateType) {
+			int length = inherited.length;
+			for (int i = 0; i < length; i++){
+				inherited[i].original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+			}
+		}
+
 		if (current == null && skipInheritedMethods)
 			continue nextSelector;
 
-		MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
 		if (inherited.length == 1 && current == null) { // handle the common case
 			if (mustImplementAbstractMethods && inherited[0].isAbstract())
 				checkAbstractMethod(inherited[0]);
@@ -448,7 +473,11 @@ void checkMethods() {
 		for (int i = 0, length = inherited.length; i < length; i++) {
 			MethodBinding inheritedMethod = inherited[i];
 			if (inheritedMethod == null) continue;
-
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
+			// inherited methods of super classes are too. current == null case handled already.
+			if (!isOrEnclosedByPrivateType && current != null) {
+				inheritedMethod.original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+			}
 			matchingInherited[++index] = inheritedMethod;
 			for (int j = i + 1; j < length; j++) {
 				MethodBinding otherInheritedMethod = inherited[j];
@@ -521,8 +550,8 @@ Binding creation is responsible for reporting:
 */
 void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] superInterfaces) {
 	// only want to remember inheritedMethods that can have an impact on the current type
-	// if an inheritedMethod has been 'replaced' by a supertype's method then skip it
-
+	// if an inheritedMethod has been 'replaced' by a supertype's method then skip it, however
+    // see usage of canOverridingMethodDifferInErasure below.
 	this.inheritedMethods = new HashtableOfObject(51); // maps method selectors to an array of methods... must search to match paramaters & return type
 	ReferenceBinding[] interfacesToVisit = null;
 	int nextPosition = 0;
@@ -534,30 +563,24 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
 
 	ReferenceBinding superType = superclass;
 	HashtableOfObject nonVisibleDefaultMethods = new HashtableOfObject(3); // maps method selectors to an array of methods
-	boolean allSuperclassesAreAbstract = true;
 
 	while (superType != null && superType.isValidBinding()) {
-	    if (allSuperclassesAreAbstract) {
-		    if (superType.isAbstract()) {
-				// only need to include superinterfaces if immediate superclasses are abstract
-				if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
-					if (interfacesToVisit == null) {
-						interfacesToVisit = itsInterfaces;
-						nextPosition = interfacesToVisit.length;
-					} else {
-						int itsLength = itsInterfaces.length;
-						if (nextPosition + itsLength >= interfacesToVisit.length)
-							System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
-						nextInterface : for (int a = 0; a < itsLength; a++) {
-							ReferenceBinding next = itsInterfaces[a];
-							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
-							interfacesToVisit[nextPosition++] = next;
-						}
-					}
-				}
+		// We used to only include superinterfaces if immediate superclasses are abstract
+		// but that is problematic. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358
+		if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
+			if (interfacesToVisit == null) {
+				interfacesToVisit = itsInterfaces;
+				nextPosition = interfacesToVisit.length;
 			} else {
-			    allSuperclassesAreAbstract = false;
+				int itsLength = itsInterfaces.length;
+				if (nextPosition + itsLength >= interfacesToVisit.length)
+					System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
+				nextInterface : for (int a = 0; a < itsLength; a++) {
+					ReferenceBinding next = itsInterfaces[a];
+					for (int b = 0; b < nextPosition; b++)
+						if (next == interfacesToVisit[b]) continue nextInterface;
+					interfacesToVisit[nextPosition++] = next;
+				}
 			}
 		}
 
@@ -570,7 +593,9 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
 			if (existingMethods != null) {
 				existing : for (int i = 0, length = existingMethods.length; i < length; i++) {
 					MethodBinding existingMethod = existingMethods[i];
-					if (existingMethod.declaringClass != inheritedMethod.declaringClass && areMethodsCompatible(existingMethod, inheritedMethod)) {
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358, skip inherited method only if any overriding version
+					// in a subclass is guaranteed to have the same erasure as an existing method.
+					if (existingMethod.declaringClass != inheritedMethod.declaringClass && areMethodsCompatible(existingMethod, inheritedMethod) && !canOverridingMethodDifferInErasure(existingMethod, inheritedMethod)) {
 						if (inheritedMethod.isDefault()) {
 							if (inheritedMethod.isAbstract()) {
 								checkPackagePrivateAbstractMethod(inheritedMethod);
@@ -652,8 +677,10 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
 				} else {
 					int length = existingMethods.length;
 					// look to see if any of the existingMethods implement this inheritedMethod
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358, skip inherited method only if any overriding version
+					// in a subclass is guaranteed to have the same erasure as an existing method.
 					for (int e = 0; e < length; e++)
-						if (isInterfaceMethodImplemented(inheritedMethod, existingMethods[e], superType))
+						if (isInterfaceMethodImplemented(inheritedMethod, existingMethods[e], superType) && !canOverridingMethodDifferInErasure(existingMethods[e], inheritedMethod))
 							continue nextMethod; // skip interface method with the same signature if visible to its declaringClass
 					System.arraycopy(existingMethods, 0, existingMethods = new MethodBinding[length + 1], 0, length);
 					existingMethods[length] = inheritedMethod;
@@ -664,6 +691,11 @@ void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup
 	}
 }
 
+// Given `overridingMethod' which overrides `inheritedMethod' answer whether some subclass method that
+// differs in erasure from overridingMethod could override `inheritedMethod'
+protected boolean canOverridingMethodDifferInErasure(MethodBinding overridingMethod, MethodBinding inheritedMethod) {
+	return false;   // the case for <= 1.4  (cannot differ)
+}
 void computeMethods() {
 	MethodBinding[] methods = this.type.methods();
 	int size = methods.length;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
index e7def0d..9a41b69 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
-import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 import org.eclipse.jdt.internal.compiler.util.SimpleSet;
 
@@ -97,6 +96,15 @@ boolean areTypesEqual(TypeBinding one, TypeBinding two) {
 	//		return ((UnresolvedReferenceBinding) two).resolvedType == one;
 	return false; // all other type bindings are identical
 }
+// Given `overridingMethod' which overrides `inheritedMethod' answer whether some subclass method that
+// differs in erasure from overridingMethod could override `inheritedMethod'
+protected boolean canOverridingMethodDifferInErasure(MethodBinding overridingMethod, MethodBinding inheritedMethod) {
+	if (overridingMethod.areParameterErasuresEqual(inheritedMethod))
+		return false;  // no further change in signature is possible due to parameterization.
+	if (overridingMethod.declaringClass.isRawType())
+		return false;  // no parameterization is happening anyways.
+	return true;
+}
 boolean canSkipInheritedMethods() {
 	if (this.type.superclass() != null)
 		if (this.type.superclass().isAbstract() || this.type.superclass().isParameterizedType())
@@ -122,8 +130,11 @@ void checkConcreteInheritedMethod(MethodBinding concreteMethod, MethodBinding[]
 				problemReporter().unsafeReturnTypeOverride(concreteMethod, originalInherited, this.type);
 
 		// check whether bridge method is already defined above for interface methods
+		// skip generation of bridge method for current class & method if an equivalent
+		// bridge will be/would have been generated in the context of the super class since
+		// the bridge itself will be inherited. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=298362
 		if (originalInherited.declaringClass.isInterface()) {
-			if ((concreteMethod.declaringClass == this.type.superclass && this.type.superclass.isParameterizedType())
+			if ((concreteMethod.declaringClass == this.type.superclass && this.type.superclass.isParameterizedType() && !areMethodsCompatible(concreteMethod, originalInherited))
 				|| this.type.superclass.erasure().findSuperTypeOriginatingFrom(originalInherited.declaringClass) == null)
 					this.type.addSyntheticBridgeMethod(originalInherited, concreteMethod.original());
 		}
@@ -139,11 +150,25 @@ void checkForBridgeMethod(MethodBinding currentMethod, MethodBinding inheritedMe
 		if (!isAcceptableReturnTypeOverride(currentMethod, inheritedMethod))
 			problemReporter(currentMethod).unsafeReturnTypeOverride(currentMethod, originalInherited, this.type);
 
-	if (this.type.addSyntheticBridgeMethod(originalInherited, currentMethod.original()) != null) {
+	MethodBinding bridge = this.type.addSyntheticBridgeMethod(originalInherited, currentMethod.original());
+	if (bridge != null) {
 		for (int i = 0, l = allInheritedMethods == null ? 0 : allInheritedMethods.length; i < l; i++) {
 			if (allInheritedMethods[i] != null && detectInheritedNameClash(originalInherited, allInheritedMethods[i].original()))
 				return;
 		}
+		// See if the new bridge clashes with any of the user methods of the class. For this check
+		// we should check for "method descriptor clash" and not just "method signature clash". Really
+		// what we are checking is whether there is a contention for the method dispatch table slot.
+		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=293615.
+		MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(bridge.selector);
+		for (int i = current.length - 1; i >= 0; --i) {
+			final MethodBinding thisMethod = current[i];
+			if (thisMethod.areParameterErasuresEqual(bridge) && thisMethod.returnType.erasure() == bridge.returnType.erasure()) {
+				// use inherited method for problem reporting.
+				problemReporter(thisMethod).methodNameClash(thisMethod, inheritedMethod.declaringClass.isRawType() ? inheritedMethod : inheritedMethod.original());
+				return;	
+			}
+		}
 	}
 }
 void checkForNameClash(MethodBinding currentMethod, MethodBinding inheritedMethod) {
@@ -181,7 +206,7 @@ void checkForNameClash(MethodBinding currentMethod, MethodBinding inheritedMetho
 
 	if (currentMethod.declaringClass.isInterface() || inheritedMethod.isStatic()) return;
 
-	if (!detectNameClash(currentMethod, inheritedMethod)) { // check up the hierarchy for skipped inherited methods
+	if (!detectNameClash(currentMethod, inheritedMethod, false)) { // check up the hierarchy for skipped inherited methods
 		TypeBinding[] currentParams = currentMethod.parameters;
 		TypeBinding[] inheritedParams = inheritedMethod.parameters;
 		int length = currentParams.length;
@@ -205,7 +230,7 @@ void checkForNameClash(MethodBinding currentMethod, MethodBinding inheritedMetho
 			MethodBinding[] methods = superType.getMethods(currentMethod.selector);
 			for (int m = 0, n = methods.length; m < n; m++) {
 				MethodBinding substitute = computeSubstituteMethod(methods[m], currentMethod);
-				if (substitute != null && !isSubstituteParameterSubsignature(currentMethod, substitute) && detectNameClash(currentMethod, substitute))
+				if (substitute != null && !isSubstituteParameterSubsignature(currentMethod, substitute) && detectNameClash(currentMethod, substitute, true))
 					return;
 			}
 			if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
@@ -233,7 +258,7 @@ void checkForNameClash(MethodBinding currentMethod, MethodBinding inheritedMetho
 				MethodBinding[] methods = superType.getMethods(currentMethod.selector);
 				for (int m = 0, n = methods.length; m < n; m++){
 					MethodBinding substitute = computeSubstituteMethod(methods[m], currentMethod);
-					if (substitute != null && !isSubstituteParameterSubsignature(currentMethod, substitute) && detectNameClash(currentMethod, substitute))
+					if (substitute != null && !isSubstituteParameterSubsignature(currentMethod, substitute) && detectNameClash(currentMethod, substitute, true))
 						return;
 				}
 				if ((itsInterfaces = superType.superInterfaces()) != Binding.NO_SUPERINTERFACES) {
@@ -353,15 +378,34 @@ boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMetho
 void checkMethods() {
 	boolean mustImplementAbstractMethods = mustImplementAbstractMethods();
 	boolean skipInheritedMethods = mustImplementAbstractMethods && canSkipInheritedMethods(); // have a single concrete superclass so only check overridden methods
+	boolean isOrEnclosedByPrivateType = this.type.isOrEnclosedByPrivateType();
 	char[][] methodSelectors = this.inheritedMethods.keyTable;
 	nextSelector : for (int s = methodSelectors.length; --s >= 0;) {
 		if (methodSelectors[s] == null) continue nextSelector;
 
 		MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(methodSelectors[s]);
+		MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
+		
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
+		// inherited methods of super classes are too. current != null case handled below.
+		if (current == null && !isOrEnclosedByPrivateType) {
+			int length = inherited.length;
+			for (int i = 0; i < length; i++){
+				inherited[i].original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;
+			}
+		}
+		if (current == null && this.type.isPublic()) {
+			int length = inherited.length;
+			for (int i = 0; i < length; i++) {
+				MethodBinding inheritedMethod = inherited[i];
+				if (inheritedMethod.isPublic() && !inheritedMethod.declaringClass.isPublic())
+					this.type.addSyntheticBridgeMethod(inheritedMethod.original());
+			}
+		}
+
 		if (current == null && skipInheritedMethods)
 			continue nextSelector;
 
-		MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
 		if (inherited.length == 1 && current == null) { // handle the common case
 			if (mustImplementAbstractMethods && inherited[0].isAbstract())
 				checkAbstractMethod(inherited[0]);
@@ -407,9 +451,20 @@ void checkMethods() {
 		// either because they match the same currentMethod or match each other
 		boolean[] skip = new boolean[inheritedLength];
 		for (int i = 0; i < inheritedLength; i++) {
+			MethodBinding matchMethod = foundMatch[i];
+			if (matchMethod == null && current != null && this.type.isPublic()) { // current == null case handled already.
+				MethodBinding inheritedMethod = inherited[i];
+				if (inheritedMethod.isPublic() && !inheritedMethod.declaringClass.isPublic()) {
+					this.type.addSyntheticBridgeMethod(inheritedMethod.original());
+				}
+			}
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
+			// inherited methods of super classes are too. current == null case handled already.
+			if (!isOrEnclosedByPrivateType && matchMethod == null && current != null) {
+				inherited[i].original().modifiers |= ExtraCompilerModifiers.AccLocallyUsed;	
+			}
 			if (skip[i]) continue;
 			MethodBinding inheritedMethod = inherited[i];
-			MethodBinding matchMethod = foundMatch[i];
 			if (matchMethod == null)
 				matchingInherited[++index] = inheritedMethod;
 			for (int j = i + 1; j < inheritedLength; j++) {
@@ -418,6 +473,20 @@ void checkMethods() {
 					continue; // both inherited methods matched the same currentMethod
 				if (canSkipInheritedMethods(inheritedMethod, otherInheritedMethod))
 					continue;
+				// Skip the otherInheritedMethod if it is completely replaced by inheritedMethod
+				// This elimination used to happen rather eagerly in computeInheritedMethods step
+				// itself earlier. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358)
+				if (inheritedMethod.declaringClass != otherInheritedMethod.declaringClass) {
+					if (otherInheritedMethod.declaringClass.isInterface()) {
+						if (isInterfaceMethodImplemented(otherInheritedMethod, inheritedMethod, otherInheritedMethod.declaringClass)) {
+							skip[j] = true;
+							continue;
+						}
+					} else if (areMethodsCompatible(inheritedMethod, otherInheritedMethod)) {
+						skip[j] = true;
+						continue;
+					}
+				}
 				otherInheritedMethod = computeSubstituteMethod(otherInheritedMethod, inheritedMethod);
 				if (otherInheritedMethod != null) {
 					if (inheritedMethod.declaringClass != otherInheritedMethod.declaringClass
@@ -470,7 +539,14 @@ void checkTypeVariableMethods(TypeParameter typeParameter) {
 			if (index > 0) {
 				MethodBinding first = matchingInherited[0];
 				int count = index + 1;
-				while (--count > 0 && areReturnTypesCompatible(first, matchingInherited[count])){/*empty*/}
+				while (--count > 0) {
+					MethodBinding match = matchingInherited[count];
+					if (areReturnTypesCompatible(first, match)) continue;
+					// unrelated interfaces - check to see if return types are compatible
+					if (first.declaringClass.isInterface() && match.declaringClass.isInterface() && areReturnTypesCompatible(match, first))
+						continue;
+					break;
+				}
 				if (count > 0) {  // All inherited methods do NOT have the same vmSignature
 					problemReporter().inheritedMethodsHaveIncompatibleReturnTypes(typeParameter, matchingInherited, index + 1);
 					continue nextSelector;
@@ -541,33 +617,52 @@ MethodBinding computeSubstituteMethod(MethodBinding inheritedMethod, MethodBindi
 boolean detectInheritedNameClash(MethodBinding inherited, MethodBinding otherInherited) {
 	if (!inherited.areParameterErasuresEqual(otherInherited))
 		return false;
-	if (this.environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_7) {
-		// with fix for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
-		// we now ignore return types when detecting name clashes
-		// FYI for now we will only make this change when compliance is set to 1.7 or higher
-		if (inherited.returnType.erasure() != otherInherited.returnType.erasure())
-			return false;
-	}
-	// skip it if otherInherited is defined by a subtype of inherited's declaringClass
-	if (inherited.declaringClass.erasure() != otherInherited.declaringClass.erasure())
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=322001
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=323693
+	// When reporting a name clash between two inherited methods, we should not look for a
+	// signature clash, but instead should be looking for method descriptor clash. 
+	if (inherited.returnType.erasure() != otherInherited.returnType.erasure())
+		return false;
+	// skip it if otherInherited is defined by a subtype of inherited's declaringClass or vice versa.
+	// avoid being order sensitive and check with the roles reversed also.
+	if (inherited.declaringClass.erasure() != otherInherited.declaringClass.erasure()) {
 		if (inherited.declaringClass.findSuperTypeOriginatingFrom(otherInherited.declaringClass) != null)
 			return false;
+		if (otherInherited.declaringClass.findSuperTypeOriginatingFrom(inherited.declaringClass) != null)
+			return false;
+	}
 
 	problemReporter().inheritedMethodsHaveNameClash(this.type, inherited, otherInherited);
 	return true;
 }
-boolean detectNameClash(MethodBinding current, MethodBinding inherited) {
-	MethodBinding original = inherited.original(); // can be the same as inherited
+boolean detectNameClash(MethodBinding current, MethodBinding inherited, boolean treatAsSynthetic) {
+	MethodBinding methodToCheck = inherited;
+	MethodBinding original = methodToCheck.original(); // can be the same as inherited
 	if (!current.areParameterErasuresEqual(original))
 		return false;
-	if (this.environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_7) {
-		// with fix for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
-		// we now ignore return types when detecting name clashes
-		// FYI for now we will only make this change when compliance is set to 1.7 or higher
-		if (current.returnType.erasure() != original.returnType.erasure())
-			return false;
+	if (!treatAsSynthetic) {
+		// For a user method, see if current class overrides the inherited method. If it does,
+		// then any grievance we may have ought to be against the current class's method and
+		// NOT against any super implementations. https://bugs.eclipse.org/bugs/show_bug.cgi?id=293615
+		
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=315978 : we now defer this rather expensive
+		// check to just before reporting (the incorrect) name clash. In the event there is no name
+		// clash to report to begin with (the common case), no penalty needs to be paid.  
+		MethodBinding[] currentNamesakes = (MethodBinding[]) this.currentMethods.get(inherited.selector);
+		if (currentNamesakes.length > 1) { // we know it ought to at least one and that current is NOT the override
+			for (int i = 0, length = currentNamesakes.length; i < length; i++) {
+				MethodBinding currentMethod = currentNamesakes[i];
+				if (currentMethod != current && doesMethodOverride(currentMethod, inherited)) {
+					methodToCheck = currentMethod;
+					break;
+				}
+			}
+		}
 	}
-
+	original = methodToCheck.original(); // can be the same as inherited
+	if (!current.areParameterErasuresEqual(original))
+		return false;
+	original = inherited.original();  // For error reporting use, inherited.original()
 	problemReporter(current).methodNameClash(current, inherited.declaringClass.isRawType() ? inherited : original);
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
index a32b2bc..e0a6bf2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
-import org.eclipse.jdt.internal.compiler.ast.MessageSend;
-
 /**
  * Binding denoting a generic method after type parameter substitutions got performed.
  * On parameterized type bindings, all methods got substituted, regardless whether
@@ -61,12 +59,7 @@ public class ParameterizedGenericMethodBinding extends ParameterizedMethodBindin
 					System.arraycopy(inferenceContext.substitutes, 0, uncheckedArguments = new TypeBinding[length], 0, length);
 				}
 				if (methodSubstitute.returnType != TypeBinding.VOID) {
-					TypeBinding expectedType = null;
-					// if message invocation has expected type
-					if (invocationSite instanceof MessageSend) {
-						MessageSend message = (MessageSend) invocationSite;
-						expectedType = message.expectedType;
-					}
+					TypeBinding expectedType = invocationSite.expectedType();
 					if (expectedType != null) {
 						// record it was explicit from context, as opposed to assumed by default (see below)
 						inferenceContext.hasExplicitExpectedType = true;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
index 6b8e5f7..22b5afa 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,12 +29,15 @@ public class ParameterizedMethodBinding extends MethodBinding {
 		super(
 				originalMethod.modifiers,
 				originalMethod.selector,
-				 originalMethod.returnType,
+				originalMethod.returnType,
 				originalMethod.parameters,
 				originalMethod.thrownExceptions,
 				parameterizedDeclaringClass);
 		this.originalMethod = originalMethod;
-		this.tagBits = originalMethod.tagBits;
+		/* missing type bit cannot be copied as is it might come from the return type or a parameter type that
+		 * is substituted by a raw type.
+		 */
+		this.tagBits = originalMethod.tagBits & ~TagBits.HasMissingType;
 
 		final TypeVariableBinding[] originalVariables = originalMethod.typeVariables;
 		Substitution substitution = null;
@@ -61,13 +64,13 @@ public class ParameterizedMethodBinding extends MethodBinding {
 					return !isStatic && parameterizedDeclaringClass.isRawSubstitution();
 				}
 				public TypeBinding substitute(TypeVariableBinding typeVariable) {
-			        // check this variable can be substituted given copied variables
-			        if (typeVariable.rank < length && originalVariables[typeVariable.rank] == typeVariable) {
+					// check this variable can be substituted given copied variables
+					if (typeVariable.rank < length && originalVariables[typeVariable.rank] == typeVariable) {
 						return substitutedVariables[typeVariable.rank];
-			        }
-			        if (!isStatic)
+					}
+					if (!isStatic)
 						return parameterizedDeclaringClass.substitute(typeVariable);
-			        return typeVariable;
+					return typeVariable;
 				}
 			};
 
@@ -105,8 +108,8 @@ public class ParameterizedMethodBinding extends MethodBinding {
 			this.returnType = Scope.substitute(substitution, this.returnType);
 			this.parameters = Scope.substitute(substitution, this.parameters);
 			this.thrownExceptions = Scope.substitute(substitution, this.thrownExceptions);
-		    // error case where exception type variable would have been substituted by a non-reference type (207573)
-		    if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS;
+			// error case where exception type variable would have been substituted by a non-reference type (207573)
+			if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS;
 		}
 		checkMissingType: {
 			if ((this.tagBits & TagBits.HasMissingType) != 0)
@@ -143,7 +146,10 @@ public class ParameterizedMethodBinding extends MethodBinding {
 				originalMethod.thrownExceptions,
 				declaringClass);
 		this.originalMethod = originalMethod;
-		this.tagBits = originalMethod.tagBits;
+		/* missing type bit cannot be copied as is it might come from the return type or a parameter type that
+		 * is substituted by a raw type.
+		 */
+		this.tagBits = originalMethod.tagBits & ~TagBits.HasMissingType;
 
 		final TypeVariableBinding[] originalVariables = originalMethod.typeVariables;
 		Substitution substitution = null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
index 33183d4..ec7c1dc 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,8 +26,30 @@ public class RawTypeBinding extends ParameterizedTypeBinding {
      */
 	public RawTypeBinding(ReferenceBinding type, ReferenceBinding enclosingType, LookupEnvironment environment){
 		super(type, null, enclosingType, environment);
-		if (enclosingType == null || (enclosingType.modifiers & ExtraCompilerModifiers.AccGenericSignature) == 0)
+		this.tagBits &= ~TagBits.HasMissingType;
+		if ((type.tagBits & TagBits.HasMissingType) != 0) {
+			if (type instanceof MissingTypeBinding) {
+				this.tagBits |= TagBits.HasMissingType;
+			} else if (type instanceof ParameterizedTypeBinding) {
+				ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) type;
+				if (parameterizedTypeBinding.genericType() instanceof MissingTypeBinding) {
+					this.tagBits |= TagBits.HasMissingType;
+				}
+			}
+		}
+		if (enclosingType != null && (enclosingType.tagBits & TagBits.HasMissingType) != 0) {
+			if (enclosingType instanceof MissingTypeBinding) {
+				this.tagBits |= TagBits.HasMissingType;
+			} else if (enclosingType instanceof ParameterizedTypeBinding) {
+				ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) enclosingType;
+				if (parameterizedTypeBinding.genericType() instanceof MissingTypeBinding) {
+					this.tagBits |= TagBits.HasMissingType;
+				}
+			}
+		}
+		if (enclosingType == null || (enclosingType.modifiers & ExtraCompilerModifiers.AccGenericSignature) == 0) {
 			this.modifiers &= ~ExtraCompilerModifiers.AccGenericSignature; // only need signature if enclosing needs one
+		}
 	}
 
 	public char[] computeUniqueKey(boolean isLeaf) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
index 5fb1015..34dba3b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -261,7 +261,11 @@ public final boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding
 	ReferenceBinding currentType = receiverType;
 	TypeBinding originalDeclaringClass = (enclosingType() == null ? this : enclosingType()).original();
 	do {
-		if (originalDeclaringClass == currentType.original()) return true;
+		if (currentType.isCapture()) {  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
+			if (originalDeclaringClass == currentType.erasure().original()) return true;
+		} else { 
+			if (originalDeclaringClass == currentType.original()) return true;
+		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
 		if (currentPackage != null && currentPackage != this.fPackage) return false;
@@ -669,7 +673,7 @@ public boolean detectAnnotationCycle() {
 	MethodBinding[] currentMethods = methods();
 	boolean inCycle = false; // check each method before failing
 	for (int i = 0, l = currentMethods.length; i < l; i++) {
-		TypeBinding returnType = currentMethods[i].returnType.leafComponentType();
+		TypeBinding returnType = currentMethods[i].returnType.leafComponentType().erasure();
 		if (this == returnType) {
 			if (this instanceof SourceTypeBinding) {
 				MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod();
@@ -1070,6 +1074,13 @@ public final boolean isFinal() {
 public boolean isHierarchyBeingConnected() {
 	return (this.tagBits & TagBits.EndHierarchyCheck) == 0 && (this.tagBits & TagBits.BeginHierarchyCheck) != 0;
 }
+/**
+ * Returns true if the type hierarchy is being connected "actively" i.e not paused momentatrily, 
+ * while resolving type arguments. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=294057
+ */
+public boolean isHierarchyBeingActivelyConnected() {
+	return (this.tagBits & TagBits.EndHierarchyCheck) == 0 && (this.tagBits & TagBits.BeginHierarchyCheck) != 0 && (this.tagBits & TagBits.PauseHierarchyCheck) == 0;
+}
 
 /**
  * Returns true if the type hierarchy is connected
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index cc9445d..697af73 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -876,10 +876,26 @@ public abstract class Scope {
 		ReferenceBinding memberType = enclosingType.getMemberType(typeName);
 		if (memberType != null) {
 			unitScope.recordTypeReference(memberType);
-			if (enclosingReceiverType == null
-				? memberType.canBeSeenBy(getCurrentPackage())
-				: memberType.canBeSeenBy(enclosingType, enclosingReceiverType))
+			if (enclosingReceiverType == null) {
+				if (memberType.canBeSeenBy(getCurrentPackage())) {
 					return memberType;
+				}
+				// maybe some type in the compilation unit is extending some class in some package
+				// and the selection is for some protected inner class of that superclass
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=235658
+				if (this instanceof CompilationUnitScope) {
+					TypeDeclaration[] types = ((CompilationUnitScope)this).referenceContext.types;
+					if (types != null) {
+						for (int i = 0, max = types.length; i < max; i++) {
+							if (memberType.canBeSeenBy(enclosingType, types[i].binding)) {
+								return memberType;
+							}
+						}
+					}
+				}
+			} else if (memberType.canBeSeenBy(enclosingType, enclosingReceiverType)) {
+				return memberType;
+			}
 			return new ProblemReferenceBinding(new char[][]{typeName}, memberType, ProblemReasons.NotVisible);
 		}
 		return null;
@@ -906,7 +922,7 @@ public abstract class Scope {
 				if (argumentTypes == Binding.NO_PARAMETERS
 				    && CharOperation.equals(selector, TypeConstants.GETCLASS)
 				    && exactMethod.returnType.isParameterizedType()/*1.5*/) {
-						return ParameterizedMethodBinding.instantiateGetClass(receiverType, exactMethod, this);
+						return environment().createGetClassMethod(receiverType, exactMethod, this);
 			    }
 				// targeting a generic method could find an exact match with variable return type
 				if (invocationSite.genericTypeArguments() != null) {
@@ -970,8 +986,10 @@ public abstract class Scope {
 
 		currentType.initializeForStaticImports();
 		FieldBinding field = currentType.getField(fieldName, needResolve);
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=316456
+		boolean insideTypeAnnotations = this instanceof MethodScope && ((MethodScope) this).insideTypeAnnotation;
 		if (field != null) {
-			if (invocationSite == null
+			if (invocationSite == null || insideTypeAnnotations
 				? field.canBeSeenBy(getCurrentPackage())
 				: field.canBeSeenBy(currentType, invocationSite, this))
 					return field;
@@ -1393,17 +1411,19 @@ public abstract class Scope {
 				MethodBinding candidate = candidates[i];
 				if (candidate instanceof ParameterizedGenericMethodBinding)
 					candidate = ((ParameterizedGenericMethodBinding) candidate).originalMethod;
-				if (candidate instanceof ParameterizedMethodBinding)
+				if (candidate.hasSubstitutedParameters()) {
 					for (int j = i + 1; j < visiblesCount; j++) {
 						MethodBinding otherCandidate = candidates[j];
-						if (otherCandidate == candidate
-								|| (candidate.declaringClass == otherCandidate.declaringClass && candidate.areParametersEqual(otherCandidate))) {
-							return new ProblemMethodBinding(candidates[i], candidates[i].selector, candidates[i].parameters, ProblemReasons.Ambiguous);
+						if (otherCandidate.hasSubstitutedParameters()) {
+							if (otherCandidate == candidate
+									|| (candidate.declaringClass == otherCandidate.declaringClass && candidate.areParametersEqual(otherCandidate))) {
+								return new ProblemMethodBinding(candidates[i], candidates[i].selector, candidates[i].parameters, ProblemReasons.Ambiguous);
+							}
 						}
 					}
+				}
 			}
 		}
-
 		if (inStaticContext) {
 			MethodBinding[] staticCandidates = new MethodBinding[visiblesCount];
 			int staticCount = 0;
@@ -1455,7 +1475,7 @@ public abstract class Scope {
 			            break;
 			        case 'g':
 			            if (CharOperation.equals(selector, TypeConstants.GETCLASS) && methodBinding.returnType.isParameterizedType()/*1.5*/) {
-							return ParameterizedMethodBinding.instantiateGetClass(receiverType, methodBinding, this);
+							return environment().createGetClassMethod(receiverType, methodBinding, this);
 			            }
 			            break;
 			    }
@@ -1635,7 +1655,7 @@ public abstract class Scope {
 											}
 										}
 										if (receiverType == fieldBinding.declaringClass || compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
-											// found a valid field in the 'immediate' scope (ie. not inherited)
+											// found a valid field in the 'immediate' scope (i.e. not inherited)
 											// OR in 1.4 mode (inherited shadows enclosing)
 											if (foundField == null) {
 												if (depth > 0){
@@ -1648,7 +1668,7 @@ public abstract class Scope {
 											if (foundField.isValidBinding())
 												// if a valid field was found, complain when another is found in an 'immediate' enclosing type (that is, not inherited)
 												if (foundField.declaringClass != fieldBinding.declaringClass)
-													// ie. have we found the same field - do not trust field identity yet
+													// i.e. have we found the same field - do not trust field identity yet
 													return new ProblemFieldBinding(
 														foundField, // closest match
 														foundField.declaringClass,
@@ -1970,7 +1990,7 @@ public abstract class Scope {
 									if (inheritedHasPrecedence
 											|| receiverType == methodBinding.declaringClass
 											|| (receiverType.getMethods(selector)) != Binding.NO_METHODS) {
-										// found a valid method in the 'immediate' scope (ie. not inherited)
+										// found a valid method in the 'immediate' scope (i.e. not inherited)
 										// OR in 1.4 mode (inherited visible shadows enclosing)
 										// OR the receiverType implemented a method with the correct name
 										// return the methodBinding if it is not declared in a superclass of the scope's binding (that is, inherited)
@@ -1985,7 +2005,7 @@ public abstract class Scope {
 										if (argumentTypes == Binding.NO_PARAMETERS
 										    && CharOperation.equals(selector, TypeConstants.GETCLASS)
 										    && methodBinding.returnType.isParameterizedType()/*1.5*/) {
-												return ParameterizedMethodBinding.instantiateGetClass(receiverType, methodBinding, this);
+												return environment().createGetClassMethod(receiverType, methodBinding, this);
 										}
 										return methodBinding;
 									}
@@ -2245,7 +2265,7 @@ public abstract class Scope {
 			if (argumentTypes == Binding.NO_PARAMETERS
 			    && CharOperation.equals(selector, TypeConstants.GETCLASS)
 			    && methodBinding.returnType.isParameterizedType()/*1.5*/) {
-					return ParameterizedMethodBinding.instantiateGetClass(receiverType, methodBinding, this);
+					return environment().createGetClassMethod(receiverType, methodBinding, this);
 		    }
 			return methodBinding;
 		} catch (AbortCompilation e) {
@@ -2502,11 +2522,11 @@ public abstract class Scope {
 									if (sourceType == memberType.enclosingType() || inheritedHasPrecedence) {
 										if (insideStaticContext && !memberType.isStatic() && sourceType.isGenericType())
 											return new ProblemReferenceBinding(new char[][]{name}, memberType, ProblemReasons.NonStaticReferenceInStaticContext);
-										// found a valid type in the 'immediate' scope (ie. not inherited)
+										// found a valid type in the 'immediate' scope (i.e. not inherited)
 										// OR in 1.4 mode (inherited visible shadows enclosing)
 										if (foundType == null || (inheritedHasPrecedence && foundType.problemId() == ProblemReasons.NotVisible))
 											return memberType;
-										// if a valid type was found, complain when another is found in an 'immediate' enclosing type (ie. not inherited)
+										// if a valid type was found, complain when another is found in an 'immediate' enclosing type (i.e. not inherited)
 										if (foundType.isValidBinding() && foundType != memberType)
 											return new ProblemReferenceBinding(new char[][]{name}, foundType, ProblemReasons.InheritedNameHidesEnclosingName);
 									}
@@ -2661,10 +2681,17 @@ public abstract class Scope {
 		if (foundType == null) {
 			char[][] qName = new char[][] { name };
 			ReferenceBinding closestMatch = null;
-			if ((mask & Binding.PACKAGE) != 0 || unitScope.environment.getTopLevelPackage(name) == null) {
+			if ((mask & Binding.PACKAGE) != 0) {
 				if (needResolve) {
 					closestMatch = environment().createMissingType(unitScope.fPackage, qName);
 				}
+			} else {
+				PackageBinding packageBinding = unitScope.environment.getTopLevelPackage(name);
+				if (packageBinding == null || !packageBinding.isValidBinding()) {
+					if (needResolve) {
+						closestMatch = environment().createMissingType(unitScope.fPackage, qName);
+					}
+				}
 			}
 			foundType = new ProblemReferenceBinding(qName, closestMatch, ProblemReasons.NotFound);
 			if (typeOrPackageCache != null && (mask & Binding.PACKAGE) != 0) { // only put NotFound type in cache if you know its not a package
@@ -3608,6 +3635,7 @@ public abstract class Scope {
 			public void setFieldIndex(int depth) { /* ignore */}
 			public int sourceStart() { return invocationSite.sourceStart(); }
 			public int sourceEnd() { return invocationSite.sourceStart(); }
+			public TypeBinding expectedType() { return invocationSite.expectedType(); }
 		};
 		MethodBinding[] moreSpecific = new MethodBinding[visibleSize];
 		int count = 0;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index 669a519..a598b14 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -537,6 +537,52 @@ public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMe
 	}
 	return accessMethod;
 }
+/*
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=288658. Generate a bridge method if a public method is inherited
+ * from a non-public class into a public class (only in 1.6 or greater)
+ */
+public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) {
+	if (this.scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_5) {
+		return null;
+	}
+	if (isInterface()) return null;
+	if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) {
+		return null;
+	}
+	if (this.synthetics == null)
+		this.synthetics = new HashMap[MAX_SYNTHETICS];
+	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) {
+		this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
+	} else {
+		// check to see if there is another equivalent inheritedMethod already added
+		Iterator synthMethods = this.synthetics[SourceTypeBinding.METHOD_EMUL].keySet().iterator();
+		while (synthMethods.hasNext()) {
+			Object synthetic = synthMethods.next();
+			if (synthetic instanceof MethodBinding) {
+				MethodBinding method = (MethodBinding) synthetic;
+				if (CharOperation.equals(inheritedMethodToBridge.selector, method.selector)
+					&& inheritedMethodToBridge.returnType.erasure() == method.returnType.erasure()
+					&& inheritedMethodToBridge.areParameterErasuresEqual(method)) {
+						return null;
+				}
+			}
+		}
+	}
+
+	SyntheticMethodBinding accessMethod = null;
+	SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(inheritedMethodToBridge);
+	if (accessors == null) {
+		accessMethod = new SyntheticMethodBinding(inheritedMethodToBridge, this);
+		this.synthetics[SourceTypeBinding.METHOD_EMUL].put(inheritedMethodToBridge, accessors = new SyntheticMethodBinding[2]);
+		accessors[0] = accessMethod;
+	} else {
+		if ((accessMethod = accessors[0]) == null) {
+			accessMethod = new SyntheticMethodBinding(inheritedMethodToBridge, this);
+			accessors[0] = accessMethod;
+		}
+	}
+	return accessMethod;
+}
 boolean areFieldsInitialized() {
 	return this.fields != Binding.UNINITIALIZED_FIELDS;
 }
@@ -1099,7 +1145,6 @@ public MethodBinding[] methods() {
 
 		// find & report collision cases
 		boolean complyTo15 = this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
-		boolean complyTo17 = this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7;
 		for (int i = 0, length = this.methods.length; i < length; i++) {
 			MethodBinding method = resolvedMethods[i];
 			if (method == null)
@@ -1113,64 +1158,8 @@ public MethodBinding[] methods() {
 				if (!CharOperation.equals(selector, method2.selector))
 					break nextSibling; // methods with same selector are contiguous
 
-				if (complyTo15 && method.returnType != null && method2.returnType != null) {
-					// 8.4.2, for collision to be detected between m1 and m2:
-					// signature(m1) == signature(m2) i.e. same arity, same type parameter count, can be substituted
-					// signature(m1) == erasure(signature(m2)) or erasure(signature(m1)) == signature(m2)
-					TypeBinding[] params1 = method.parameters;
-					TypeBinding[] params2 = method2.parameters;
-					int pLength = params1.length;
-					if (pLength != params2.length)
-						continue nextSibling;
-
-					TypeVariableBinding[] vars = method.typeVariables;
-					TypeVariableBinding[] vars2 = method2.typeVariables;
-					boolean equalTypeVars = vars == vars2;
-					MethodBinding subMethod = method2;
-					if (!equalTypeVars) {
-						MethodBinding temp = method.computeSubstitutedMethod(method2, this.scope.environment());
-						if (temp != null) {
-							equalTypeVars = true;
-							subMethod = temp;
-						}
-					}
-					boolean equalParams = method.areParametersEqual(subMethod);
-					if (equalParams && equalTypeVars) {
-						// duplicates regardless of return types
-					} else if ((complyTo17 || method.returnType.erasure() == subMethod.returnType.erasure())
-						&& (equalParams || method.areParameterErasuresEqual(method2))) {
-						// with fix for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
-						// we now ignore return types when detecting duplicates, just as we did before 1.5 
-						// name clash for sure if not duplicates, report as duplicates
-						// FYI for now we will only make this change when compliance is set to 1.7 or higher
-					} else if (!equalTypeVars && vars != Binding.NO_TYPE_VARIABLES && vars2 != Binding.NO_TYPE_VARIABLES) {
-						// type variables are different so we can distinguish between methods
-						continue nextSibling;
-					} else if (pLength > 0) {
-						// check to see if the erasure of either method is equal to the other
-						int index = pLength;
-						for (; --index >= 0;) {
-							if (params1[index] != params2[index].erasure())
-								break;
-							if (params1[index] == params2[index]) {
-								TypeBinding type = params1[index].leafComponentType();
-								if (type instanceof SourceTypeBinding && type.typeVariables() != Binding.NO_TYPE_VARIABLES) {
-									index = pLength; // handle comparing identical source types like X<T>... its erasure is itself BUT we need to answer false
-									break;
-								}
-							}
-						}
-						if (index >= 0 && index < pLength) {
-							for (index = pLength; --index >= 0;)
-								if (params1[index].erasure() != params2[index])
-									break;
-						}
-						if (index >= 0)
-							continue nextSibling;
-					}
-				} else if (!method.areParametersEqual(method2)) { // prior to 1.5, parameter identity meant a collision case
-					continue nextSibling;
-				}
+				if (complyTo15 ? !method.areParameterErasuresEqual(method2) : !method.areParametersEqual(method2))
+					continue nextSibling; // otherwise duplicates / name clash
 				boolean isEnumSpecialMethod = isEnum() && (CharOperation.equals(selector,TypeConstants.VALUEOF) || CharOperation.equals(selector,TypeConstants.VALUES));
 				// report duplicate
 				boolean removeMethod2 = true;
@@ -1617,7 +1606,7 @@ public String toString() {
 	return buffer.toString();
 }
 public TypeVariableBinding[] typeVariables() {
-	return this.typeVariables;
+	return this.typeVariables != null ? this.typeVariables : Binding.NO_TYPE_VARIABLES;
 }
 void verifyMethods(MethodVerifier verifier) {
 	verifier.verify(this);
@@ -1625,4 +1614,8 @@ void verifyMethods(MethodVerifier verifier) {
 	for (int i = this.memberTypes.length; --i >= 0;)
 		 ((SourceTypeBinding) this.memberTypes[i]).verifyMethods(verifier);
 }
+
+public FieldBinding[] unResolvedFields() {
+	return this.fields;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
index c561055..9fae857 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -264,6 +264,27 @@ public class SyntheticMethodBinding extends MethodBinding {
 			this.modifiers |= ClassFileConstants.AccStrictfp;
 		}
 	}
+	
+	// Create a synthetic method that will simply call the super classes method.
+	// Used when a public method is inherited from a non-public class into a public class.
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=288658
+	public SyntheticMethodBinding(MethodBinding overridenMethodToBridge, SourceTypeBinding declaringClass) {
+
+	    this.declaringClass = declaringClass;
+	    this.selector = overridenMethodToBridge.selector;
+	    // amongst other, clear the AccGenericSignature, so as to ensure no remains of original inherited persist (101794)
+	    // also use the modifiers from the target method, as opposed to inherited one (147690)
+	    this.modifiers = (overridenMethodToBridge.modifiers | ClassFileConstants.AccBridge | ClassFileConstants.AccSynthetic) & ~(ClassFileConstants.AccAbstract | ClassFileConstants.AccNative  | ClassFileConstants.AccFinal | ExtraCompilerModifiers.AccGenericSignature);
+		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
+	    this.returnType = overridenMethodToBridge.returnType;
+	    this.parameters = overridenMethodToBridge.parameters;
+	    this.thrownExceptions = overridenMethodToBridge.thrownExceptions;
+	    this.targetMethod = overridenMethodToBridge;
+	    this.purpose = SyntheticMethodBinding.SuperMethodAccess;
+		SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods();
+		int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+		this.index = methodId;
+	}
 
 	/**
 	 * An constructor accessor is a constructor with an extra argument (declaringClass), in case of
@@ -301,8 +322,7 @@ public class SyntheticMethodBinding extends MethodBinding {
 				// check for collision with known methods
 				MethodBinding[] methods = sourceType.methods();
 				for (int i = 0, length = methods.length; i < length; i++) {
-					if (CharOperation.equals(this.selector, methods[i].selector)
-						&& areParametersEqual(methods[i])) {
+					if (CharOperation.equals(this.selector, methods[i].selector) && areParameterErasuresEqual(methods[i])) {
 						needRename = true;
 						break check;
 					}
@@ -312,8 +332,7 @@ public class SyntheticMethodBinding extends MethodBinding {
 					for (int i = 0, length = knownSyntheticMethods.length; i < length; i++) {
 						if (knownSyntheticMethods[i] == null)
 							continue;
-						if (CharOperation.equals(this.selector, knownSyntheticMethods[i].selector)
-								&& areParametersEqual(knownSyntheticMethods[i])) {
+						if (CharOperation.equals(this.selector, knownSyntheticMethods[i].selector) && areParameterErasuresEqual(knownSyntheticMethods[i])) {
 							needRename = true;
 							break check;
 						}
@@ -380,7 +399,7 @@ public class SyntheticMethodBinding extends MethodBinding {
 				// check for collision with known methods
 				MethodBinding[] methods = declaringSourceType.methods();
 				for (int i = 0, length = methods.length; i < length; i++) {
-					if (CharOperation.equals(this.selector, methods[i].selector) && areParametersEqual(methods[i])) {
+					if (CharOperation.equals(this.selector, methods[i].selector) && areParameterErasuresEqual(methods[i])) {
 						needRename = true;
 						break check;
 					}
@@ -389,7 +408,7 @@ public class SyntheticMethodBinding extends MethodBinding {
 				if (knownAccessMethods != null) {
 					for (int i = 0, length = knownAccessMethods.length; i < length; i++) {
 						if (knownAccessMethods[i] == null) continue;
-						if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && areParametersEqual(knownAccessMethods[i])) {
+						if (CharOperation.equals(this.selector, knownAccessMethods[i].selector) && areParameterErasuresEqual(knownAccessMethods[i])) {
 							needRename = true;
 							break check;
 						}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
index 094ce32..466362a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,17 +33,21 @@ public interface TagBits {
 	// for method
 	long HasUncheckedTypeArgumentForBoundCheck = ASTNode.Bit9;
 	
+	// set when method has argument(s) that couldn't be resolved
+	long HasUnresolvedArguments = ASTNode.Bit10;
+	
 	// for the type cycle hierarchy check used by ClassScope
 	long BeginHierarchyCheck = ASTNode.Bit9;  // type
 	long EndHierarchyCheck = ASTNode.Bit10; // type
-	long HasParameterAnnotations = ASTNode.Bit11; // method
+	long PauseHierarchyCheck = ASTNode.Bit20; // type
+	long HasParameterAnnotations = ASTNode.Bit11; // method/constructor
 
 
 	// test bit to see if default abstract methods were computed
 	long KnowsDefaultAbstractMethods = ASTNode.Bit11; // type
 
 	long IsArgument = ASTNode.Bit11; // local
-	long ClearPrivateModifier = ASTNode.Bit11; // constructor binding
+	long ClearPrivateModifier = ASTNode.Bit10; // constructor binding
 
 	// test bits to see if parts of binary types are faulted
 	long AreFieldsSorted = ASTNode.Bit13;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
index 7b8e17f..c281de2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -295,7 +295,7 @@ public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType) {
 			int nextPosition = 0;
 			do {
 				ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
-				if (itsInterfaces != Binding.NO_SUPERINTERFACES) {
+				if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
 					if (interfacesToVisit == null) {
 						interfacesToVisit = itsInterfaces;
 						nextPosition = interfacesToVisit.length;
@@ -320,7 +320,7 @@ public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType) {
 				if (currentType.original() == otherType)
 					return currentType;
 				ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
-				if (itsInterfaces != Binding.NO_SUPERINTERFACES) {
+				if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
 					int itsLength = itsInterfaces.length;
 					if (nextPosition + itsLength >= interfacesToVisit.length)
 						System.arraycopy(interfacesToVisit, 0, interfacesToVisit = new ReferenceBinding[nextPosition + itsLength + 5], 0, nextPosition);
@@ -612,7 +612,7 @@ public boolean isProvablyDistinct(TypeBinding otherType) {
 		            		ReferenceBinding otherEnclosing = otherParamType.enclosingType();
 		            		if (otherEnclosing == null) return true;
 		            		if ((otherEnclosing.tagBits & TagBits.HasDirectWildcard) == 0) {
-								if (enclosing != otherEnclosing) return true;
+		            			if (enclosing.isProvablyDistinct(otherEnclosing)) return true; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=302919
 		            		} else {
 		            			if (!enclosing.isEquivalentTo(otherParamType.enclosingType())) return true;
 		            		}
@@ -854,18 +854,22 @@ public boolean isReifiable() {
 			case Binding.INTERSECTION_TYPE:
 			case Binding.GENERIC_TYPE:
 				return false;
-				case Binding.PARAMETERIZED_TYPE:
+			case Binding.PARAMETERIZED_TYPE:
 				if (current.isBoundParameterizedType())
 					return false;
 				break;
 			case Binding.RAW_TYPE:
 				return true;
 		}
-		if (current.isStatic())
+		if (current.isStatic()) {
 			return true;
+		}
 		if (current.isLocalType()) {
-			NestedTypeBinding nestedType = (NestedTypeBinding) current.erasure();
-			if (nestedType.scope.methodScope().isStatic) return true;
+			LocalTypeBinding localTypeBinding = (LocalTypeBinding) current.erasure();
+			MethodBinding enclosingMethod = localTypeBinding.enclosingMethod;
+			if (enclosingMethod != null && enclosingMethod.isStatic()) {
+				return true;
+			}
 		}
 	} while ((current = current.enclosingType()) != null);
 	return true;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
index d5991b9..0e6e487 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
@@ -386,7 +386,10 @@ public class WildcardBinding extends ReferenceBinding {
     	if (this.otherBounds == null) {
 	    	if (this.boundKind == Wildcard.EXTENDS)
 		        return this.bound.erasure();
-	    	return typeVariable().erasure();
+			TypeVariableBinding var = typeVariable();
+			if (var != null)
+				return var.erasure();
+		    return this.genericType; // if typeVariable() == null, then its inconsistent & return this.genericType to avoid NPE case
     	}
     	// intersection type
     	return this.bound.id == TypeIds.T_JavaLangObject
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
index def76d8..614d5ac 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,7 +8,7 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-### Eclipse Java Core Compiler messages.
+### compiler messages.
 
 ### compilation
 compilation_unresolvedProblem =  Unresolved compilation problem: \n
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index 1235b9d..d5ef030 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -130,7 +130,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 			this.astPtr = -1;
 			this.identifierPtr = -1;
 			this.currentTokenType = -1;
-			this.inlineTagStarted = false;
+			setInlineTagStarted(false);
 			this.inlineTagStart = -1;
 			this.lineStarted = false;
 			this.returnStatement = null;
@@ -147,6 +147,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 			boolean verifText = (this.kind & TEXT_VERIF) != 0;
 			boolean isDomParser = (this.kind & DOM_PARSER) != 0;
 			boolean isFormatterParser = (this.kind & FORMATTER_COMMENT_PARSER) != 0;
+			int lastStarPosition = -1;
 
 			// Init scanner position
 			this.linePtr = getLineNumber(this.firstTagPosition);
@@ -207,7 +208,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 						// Start tag parsing only if we are on line beginning or at inline tag beginning
 						if ((!this.lineStarted || previousChar == '{')) {
 							if (this.inlineTagStarted) {
-								this.inlineTagStarted = false;
+								setInlineTagStarted(false);
 								// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53279
 								// Cannot have @ inside inline comment
 								if (this.reportProblems) {
@@ -228,7 +229,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 										pushText(this.textStart, textEndPosition);
 									}
 								}
-								this.inlineTagStarted = true;
+								setInlineTagStarted(true);
 								invalidInlineTagLineEnd = this.lineEnd;
 							} else if (this.textStart != -1 && this.textStart < invalidTagLineEnd) {
 								pushText(this.textStart, invalidTagLineEnd);
@@ -287,7 +288,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 							}
 							refreshInlineTagPosition(previousPosition);
 							if (!isFormatterParser) this.textStart = this.index;
-							this.inlineTagStarted = false;
+							setInlineTagStarted(false);
 						} else {
 							if (!this.lineStarted) {
 								this.textStart = previousPosition;
@@ -301,7 +302,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 							refreshReturnStatement();
 						}
 						if (this.inlineTagStarted) {
-							this.inlineTagStarted = false;
+							setInlineTagStarted(false);
 							// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53279
 							// Cannot have opening brace in inline comment
 							if (this.reportProblems) {
@@ -325,6 +326,7 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 						break;
 					case '*' :
 						// Store the star position as text start while formatting
+						lastStarPosition = previousPosition;
 						if (previousChar != '*') {
 							this.starPosition = previousPosition;
 							if (isDomParser || isFormatterParser) {
@@ -400,8 +402,8 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 					pushText(this.textStart, textEndPosition);
 				}
 				refreshInlineTagPosition(textEndPosition);
-				this.inlineTagStarted = false;
-			} else if (this.lineStarted && this.textStart != -1 && this.textStart <= textEndPosition) {
+				setInlineTagStarted(false);
+			} else if (this.lineStarted && this.textStart != -1 && this.textStart <= textEndPosition && (this.textStart < this.starPosition || this.starPosition == lastStarPosition)) {
 				pushText(this.textStart, textEndPosition);
 			}
 			updateDocComment();
@@ -981,16 +983,22 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 			// Report problem
 			this.currentTokenType = -1;
 			if (isCompletionParser) return false;
-			end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition();
-			while ((token=readToken()) != TerminalTokens.TokenNameWHITESPACE && token != TerminalTokens.TokenNameEOF) {
-				this.currentTokenType = -1;
+			if (this.reportProblems) {
+				// we only need end if we report problems
 				end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition();
-			}
-			if (this.reportProblems)
+				try {
+					while ((token=readToken()) != TerminalTokens.TokenNameWHITESPACE && token != TerminalTokens.TokenNameEOF) {
+						this.currentTokenType = -1;
+						end = hasMultiLines ? this.lineEnd: this.scanner.getCurrentTokenEndPosition();
+					}
+				} catch (InvalidInputException e) {
+					end = this.lineEnd;
+				}
 				if (mayBeGeneric && isTypeParam)
 					this.sourceParser.problemReporter().javadocInvalidParamTypeParameter(start, end);
 				else
 					this.sourceParser.problemReporter().javadocInvalidParamTagName(start, end);
+			}
 			this.scanner.currentPosition = start;
 			this.index = start;
 			this.currentTokenType = -1;
@@ -1033,23 +1041,62 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 					consumeToken();
 					break;
 
-				case TerminalTokens.TokenNamevoid :
-				case TerminalTokens.TokenNameboolean :
-				case TerminalTokens.TokenNamebyte :
-				case TerminalTokens.TokenNamechar :
-				case TerminalTokens.TokenNamedouble :
-				case TerminalTokens.TokenNamefloat :
-				case TerminalTokens.TokenNameint :
-				case TerminalTokens.TokenNamelong :
-				case TerminalTokens.TokenNameshort :
-					if (iToken > 0) {
-						throw new InvalidInputException();
+				case TerminalTokens.TokenNameabstract:
+				case TerminalTokens.TokenNameassert:
+				case TerminalTokens.TokenNameboolean:
+				case TerminalTokens.TokenNamebreak:
+				case TerminalTokens.TokenNamebyte:
+				case TerminalTokens.TokenNamecase:
+				case TerminalTokens.TokenNamecatch:
+				case TerminalTokens.TokenNamechar:
+				case TerminalTokens.TokenNameclass:
+				case TerminalTokens.TokenNamecontinue:
+				case TerminalTokens.TokenNamedefault:
+				case TerminalTokens.TokenNamedo:
+				case TerminalTokens.TokenNamedouble:
+				case TerminalTokens.TokenNameelse:
+				case TerminalTokens.TokenNameextends:
+				case TerminalTokens.TokenNamefalse:
+				case TerminalTokens.TokenNamefinal:
+				case TerminalTokens.TokenNamefinally:
+				case TerminalTokens.TokenNamefloat:
+				case TerminalTokens.TokenNamefor:
+				case TerminalTokens.TokenNameif:
+				case TerminalTokens.TokenNameimplements:
+				case TerminalTokens.TokenNameimport:
+				case TerminalTokens.TokenNameinstanceof:
+				case TerminalTokens.TokenNameint:
+				case TerminalTokens.TokenNameinterface:
+				case TerminalTokens.TokenNamelong:
+				case TerminalTokens.TokenNamenative:
+				case TerminalTokens.TokenNamenew:
+				case TerminalTokens.TokenNamenull:
+				case TerminalTokens.TokenNamepackage:
+				case TerminalTokens.TokenNameprivate:
+				case TerminalTokens.TokenNameprotected:
+				case TerminalTokens.TokenNamepublic:
+				case TerminalTokens.TokenNameshort:
+				case TerminalTokens.TokenNamestatic:
+				case TerminalTokens.TokenNamestrictfp:
+				case TerminalTokens.TokenNamesuper:
+				case TerminalTokens.TokenNameswitch:
+				case TerminalTokens.TokenNamesynchronized:
+				case TerminalTokens.TokenNamethis:
+				case TerminalTokens.TokenNamethrow:
+				case TerminalTokens.TokenNametransient:
+				case TerminalTokens.TokenNametrue:
+				case TerminalTokens.TokenNametry:
+				case TerminalTokens.TokenNamevoid:
+				case TerminalTokens.TokenNamevolatile:
+				case TerminalTokens.TokenNamewhile:
+					if (iToken == 0) {
+						pushIdentifier(true, true);
+						primitiveToken = token;
+						consumeToken();
+						break nextToken;
 					}
-					pushIdentifier(true, false);
-					primitiveToken = token;
-					consumeToken();
-					break nextToken;
-
+					// Fall through default case to verify that we do not leave on a dot
+					//$FALL-THROUGH$
 				default :
 					if (iToken == 0) {
 						if (this.identifierPtr>=0) {
@@ -1505,6 +1552,13 @@ public abstract class AbstractCommentParser implements JavadocTagConstants {
 		// do nothing by default
 	}
 
+	/**
+	 * @param started the inlineTagStarted to set
+	 */
+	protected void setInlineTagStarted(boolean started) {
+		this.inlineTagStarted = started;
+	}
+
 	/*
 	 * Entry point for recovery on invalid syntax
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 6316bf6..092b0cf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -409,7 +409,7 @@ public class Parser implements  ParserBasicInformation, TerminalTokens, Operator
 				newRecoveyTemplatesIndex[index] = (char)newRecoveyTemplatesPtr;
 	
 				String token = tokens[i + 2].trim();
-				java.util.StringTokenizer st = new java.util.StringTokenizer(new String(token), " ");  //$NON-NLS-1$
+				java.util.StringTokenizer st = new java.util.StringTokenizer(token, " ");  //$NON-NLS-1$
 				String[] terminalNames = new String[st.countTokens()];
 				int t = 0;
 				while (st.hasMoreTokens()) {
@@ -1657,17 +1657,18 @@ protected void consumeAssignment() {
 	int op = this.intStack[this.intPtr--] ; //<--the encoded operator
 
 	this.expressionPtr -- ; this.expressionLengthPtr -- ;
+	Expression expression = this.expressionStack[this.expressionPtr+1];
 	this.expressionStack[this.expressionPtr] =
 		(op != EQUAL ) ?
 			new CompoundAssignment(
 				this.expressionStack[this.expressionPtr] ,
-				this.expressionStack[this.expressionPtr+1],
+				expression,
 				op,
-				this.scanner.startPosition - 1)	:
+				expression.sourceEnd):
 			new Assignment(
 				this.expressionStack[this.expressionPtr] ,
-				this.expressionStack[this.expressionPtr+1],
-				this.scanner.startPosition - 1);
+				expression,
+				expression.sourceEnd);
 
 	if (this.pendingRecoveredType != null) {
 		// Used only in statements recovery.
@@ -2026,7 +2027,7 @@ protected void consumeCastExpressionLL1() {
 	this.expressionStack[this.expressionPtr] =
 		cast = new CastExpression(
 			exp=this.expressionStack[this.expressionPtr+1] ,
-			getTypeReference(this.expressionStack[this.expressionPtr]));
+			this.expressionStack[this.expressionPtr]);
 	this.expressionLengthPtr -- ;
 	updateSourcePosition(cast);
 	cast.sourceEnd=exp.sourceEnd;
@@ -3195,6 +3196,8 @@ protected void consumeEnumConstantHeader() {
       anonymousType.modifiers = 0;
       anonymousType.bodyStart = this.scanner.currentPosition;
       markEnclosingMemberWithLocalType();
+      consumeNestedType();
+      this.variablesCounter[this.nestedType]++;
       pushOnAstStack(anonymousType);
       QualifiedAllocationExpression allocationExpression = new QualifiedAllocationExpression(anonymousType);
       allocationExpression.enumConstant = enumConstant;
@@ -3269,13 +3272,6 @@ protected void consumeEnumConstantHeaderName() {
    enumConstant.modifiers = this.intStack[this.intPtr--];
    enumConstant.declarationSourceStart = enumConstant.modifiersSourceStart;
 
-	// Store secondary info
-	if ((enumConstant.bits & ASTNode.IsMemberType) == 0 && (enumConstant.bits & ASTNode.IsLocalType) == 0) {
-		if (this.compilationUnit != null && !CharOperation.equals(enumConstant.name, this.compilationUnit.getMainTypeName())) {
-			enumConstant.bits |= ASTNode.IsSecondaryType;
-		}
-	}
-
 	// consume annotations
    int length;
    if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
@@ -3315,6 +3311,8 @@ protected void consumeEnumConstantWithClassBody() {
    fieldDeclaration.declarationEnd = this.endStatementPosition;
    fieldDeclaration.declarationSourceEnd = anonymousType.declarationSourceEnd;
    this.intPtr --; // remove end position of the arguments
+   this.variablesCounter[this.nestedType] = 0;
+   this.nestedType--;
 }
 protected void consumeEnumDeclaration() {
 	// EnumDeclaration ::= EnumHeader ClassHeaderImplementsopt EnumBody
@@ -3403,6 +3401,14 @@ protected void consumeEnumHeaderName() {
 	if (enumDeclaration.modifiersSourceStart >= 0) {
 		enumDeclaration.declarationSourceStart = enumDeclaration.modifiersSourceStart;
 	}
+
+	// Store secondary info
+	if ((enumDeclaration.bits & ASTNode.IsMemberType) == 0 && (enumDeclaration.bits & ASTNode.IsLocalType) == 0) {
+		if (this.compilationUnit != null && !CharOperation.equals(enumDeclaration.name, this.compilationUnit.getMainTypeName())) {
+			enumDeclaration.bits |= ASTNode.IsSecondaryType;
+		}
+	}
+
 	// consume annotations
 	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
@@ -3482,6 +3488,14 @@ protected void consumeEnumHeaderNameWithTypeParameters() {
 	if (enumDeclaration.modifiersSourceStart >= 0) {
 		enumDeclaration.declarationSourceStart = enumDeclaration.modifiersSourceStart;
 	}
+
+	// Store secondary info
+	if ((enumDeclaration.bits & ASTNode.IsMemberType) == 0 && (enumDeclaration.bits & ASTNode.IsLocalType) == 0) {
+		if (this.compilationUnit != null && !CharOperation.equals(enumDeclaration.name, this.compilationUnit.getMainTypeName())) {
+			enumDeclaration.bits |= ASTNode.IsSecondaryType;
+		}
+	}
+
 	// consume annotations
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 		System.arraycopy(
@@ -3866,7 +3880,9 @@ protected void consumeInsideCastExpression() {
 }
 protected void consumeInsideCastExpressionLL1() {
 	// InsideCastExpressionLL1 ::= $empty
-	pushOnExpressionStack(getUnspecifiedReferenceOptimized());
+	pushOnGenericsLengthStack(0); // handle type arguments
+	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+	pushOnExpressionStack(getTypeReference(0));
 }
 protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 	// InsideCastExpressionWithQualifiedGenerics ::= $empty
@@ -4317,10 +4333,8 @@ protected void consumeMethodDeclaration(boolean isNotAbstract) {
 	if (isNotAbstract) {
 		//statements
 		explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
-		if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
-			if (this.options.ignoreMethodBodies) {
-				this.astPtr -= length;
-			} else {
+		if (!this.options.ignoreMethodBodies) {
+			if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
 				System.arraycopy(
 					this.astStack,
 					(this.astPtr -= length) + 1,
@@ -4328,6 +4342,9 @@ protected void consumeMethodDeclaration(boolean isNotAbstract) {
 					0,
 					length);
 			}
+		} else {
+			length = this.astLengthStack[this.astLengthPtr--];
+			this.astPtr -= length;
 		}
 	}
 
@@ -7734,11 +7751,17 @@ protected void consumeTypeHeaderNameWithTypeParameters() {
 
 	this.listTypeParameterLength = 0;
 
-	if (this.currentElement != null) { // is recovering
-		RecoveredType recoveredType = (RecoveredType) this.currentElement;
-		recoveredType.pendingTypeParameters = null;
-
-		this.lastCheckPoint = typeDecl.bodyStart;
+	if (this.currentElement != null) {
+		// is recovering
+		if (this.currentElement instanceof RecoveredType) {
+			RecoveredType recoveredType = (RecoveredType) this.currentElement;
+			recoveredType.pendingTypeParameters = null;
+			this.lastCheckPoint = typeDecl.bodyStart;
+		} else {
+			this.lastCheckPoint = typeDecl.bodyStart;
+			this.currentElement = this.currentElement.add(typeDecl, 0);
+			this.lastIgnoredToken = -1;
+		}
 	}
 }
 protected void consumeTypeImportOnDemandDeclarationName() {
@@ -8971,7 +8994,7 @@ public void initializeScanner(){
 		this.options.sourceLevel /*sourceLevel*/,
 		this.options.complianceLevel /*complianceLevel*/,
 		this.options.taskTags/*taskTags*/,
-		this.options.taskPriorites/*taskPriorities*/,
+		this.options.taskPriorities/*taskPriorities*/,
 		this.options.isTaskCaseSensitive/*taskCaseSensitive*/);
 }
 public void jumpOverMethodBody() {
@@ -10309,10 +10332,13 @@ public void recoveryExitFromVariable() {
 			this.currentElement = this.currentElement.parent;
 		} else if(this.currentElement instanceof RecoveredField
 			&& !(this.currentElement instanceof RecoveredInitializer)) {
-
-			int end = ((RecoveredField)this.currentElement).fieldDeclaration.sourceEnd;
-			this.currentElement.updateSourceEndIfNecessary(end);
-			this.currentElement = this.currentElement.parent;
+			// Do not move focus to parent if we are still inside an array initializer
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=292087 
+			if (this.currentElement.bracketBalance <= 0) {
+				int end = ((RecoveredField)this.currentElement).fieldDeclaration.sourceEnd;
+				this.currentElement.updateSourceEndIfNecessary(end);
+				this.currentElement = this.currentElement.parent;
+			}
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
index 7680f7b..51cd7db 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,11 +16,11 @@ package org.eclipse.jdt.internal.compiler.parser;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference;
-import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Statement;
@@ -207,8 +207,8 @@ public FieldDeclaration updatedFieldDeclaration(int depth, Set knownTypes){
 					TypeDeclaration anonymousType = recoveredType.updatedTypeDeclaration(depth + 1, knownTypes);
 					if (anonymousType != null) {
 						this.fieldDeclaration.initialization = anonymousType.allocation;
-						if(this.fieldDeclaration.declarationSourceEnd == 0) {
-							int end = anonymousType.declarationSourceEnd;
+						int end = anonymousType.declarationSourceEnd;
+						if (end > this.fieldDeclaration.declarationSourceEnd) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=307337
 							this.fieldDeclaration.declarationSourceEnd = end;
 							this.fieldDeclaration.declarationEnd = end;
 						}
@@ -247,7 +247,8 @@ public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
 				updateSourceEndIfNecessary(braceEnd - 1);
 				return this.parent;
 			} else {
-				this.alreadyCompletedFieldInitialization = true;
+				if (this.fieldDeclaration.declarationSourceEnd > 0)
+					this.alreadyCompletedFieldInitialization = true;
 			}
 		}
 		return this;
@@ -265,11 +266,18 @@ public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
  * in which case the bodyStart is updated.
  */
 public RecoveredElement updateOnOpeningBrace(int braceStart, int braceEnd){
-	if (this.fieldDeclaration.declarationSourceEnd == 0
-		&& (this.fieldDeclaration.type instanceof ArrayTypeReference || this.fieldDeclaration.type instanceof ArrayQualifiedTypeReference)
-		&& !this.alreadyCompletedFieldInitialization){
-		this.bracketBalance++;
-		return null; // no update is necessary	(array initializer)
+	if (this.fieldDeclaration.declarationSourceEnd == 0) {
+		if (this.fieldDeclaration.type instanceof ArrayTypeReference || this.fieldDeclaration.type instanceof ArrayQualifiedTypeReference) {
+			if (!this.alreadyCompletedFieldInitialization) {
+				this.bracketBalance++;
+				return null; // no update is necessary	(array initializer)
+			}
+		} else {  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=308980
+			// in case an initializer bracket is opened in a non-array field
+			// e.g. int field = {..
+			this.bracketBalance++;
+			return null; // no update is necessary	(array initializer)
+		}
 	}
 	if (this.fieldDeclaration.declarationSourceEnd == 0
 		&& this.fieldDeclaration.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT){
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
index 0b8dd14..5d3f653 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredStatement.java
@@ -54,4 +54,11 @@ public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){
 	if (this.statement.sourceEnd == 0)
 		this.statement.sourceEnd = bodyEnd;
 }
+public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){
+	if ((--this.bracketBalance <= 0) && (this.parent != null)){
+		this.updateSourceEndIfNecessary(braceStart, braceEnd);
+		return this.parent.updateOnClosingBrace(braceStart, braceEnd);
+	}
+	return this;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index 55121c4..2e68575 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -211,20 +211,30 @@ public Scanner(
 	this.complianceLevel = complianceLevel;
 	this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals;
 	if (taskTags != null) {
-		int length = taskTags.length;
+		int taskTagsLength = taskTags.length;
+		int length = taskTagsLength;
 		if (taskPriorities != null) {
+			int taskPrioritiesLength = taskPriorities.length;
+			if (taskPrioritiesLength != taskTagsLength) {
+				if (taskPrioritiesLength > taskTagsLength) {
+					System.arraycopy(taskPriorities, 0, (taskPriorities = new char[taskTagsLength][]), 0, taskTagsLength);
+				} else {
+					System.arraycopy(taskTags, 0, (taskTags = new char[taskPrioritiesLength][]), 0, taskPrioritiesLength);
+					length = taskPrioritiesLength;
+				}
+			}
 			int[] initialIndexes = new int[length];
 			for (int i = 0; i < length; i++) {
 				initialIndexes[i] = i;
 			}
-			Util.reverseQuickSort(taskTags, 0, taskTags.length - 1, initialIndexes);
+			Util.reverseQuickSort(taskTags, 0, length - 1, initialIndexes);
 			char[][] temp = new char[length][];
 			for (int i = 0; i < length; i++) {
 				temp[i] = taskPriorities[initialIndexes[i]];
 			}
 			this.taskPriorities = temp;
 		} else {
-			Util.reverseQuickSort(taskTags, 0, taskTags.length - 1);
+			Util.reverseQuickSort(taskTags, 0, length - 1);
 		}
 		this.taskTags = taskTags;
 		this.isTaskCaseSensitive = isTaskCaseSensitive;
@@ -368,10 +378,9 @@ public void checkTaskTag(int commentStart, int commentEnd) throws InvalidInputEx
 			continue;
 		}
 		// trim the message
+		// we don't trim the beginning of the message to be able to show it after the task tag
 		while (CharOperation.isWhitespace(src[end]) && msgStart <= end)
 			end--;
-		while (CharOperation.isWhitespace(src[msgStart]) && msgStart <= end)
-			msgStart++;
 		// update the end position of the task
 		this.foundTaskPositions[i][1] = end;
 		// get the message source
@@ -1379,6 +1388,9 @@ public int getNextToken() throws InvalidInputException {
 						}
 
 						while (this.currentCharacter != '"') {
+							if (this.currentPosition >= this.eofPosition) {
+								throw new InvalidInputException(UNTERMINATED_STRING);
+							}
 							/**** \r and \n are not valid in string literals ****/
 							if ((this.currentCharacter == '\n') || (this.currentCharacter == '\r')) {
 								// relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
@@ -1486,6 +1498,12 @@ public int getNextToken() throws InvalidInputException {
 								} //jump over the \\
 								boolean isUnicode = false;
 								while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+									if (this.currentPosition >= this.eofPosition) {
+										this.lastCommentLinePosition = this.currentPosition;
+										this.currentPosition ++;
+										// this avoids duplicating the code in the catch(IndexOutOfBoundsException e)
+										throw new IndexOutOfBoundsException();
+									}
 									this.lastCommentLinePosition = this.currentPosition;
 									//get the next char
 									isUnicode = false;
@@ -1504,16 +1522,16 @@ public int getNextToken() throws InvalidInputException {
 								 * We need to completely consume the line break
 								 */
 								if (this.currentCharacter == '\r'
-								   && this.eofPosition > this.currentPosition) {
-								   	if (this.source[this.currentPosition] == '\n') {
+										&& this.eofPosition > this.currentPosition) {
+									if (this.source[this.currentPosition] == '\n') {
 										this.currentPosition++;
 										this.currentCharacter = '\n';
-								   	} else if ((this.source[this.currentPosition] == '\\')
+									} else if ((this.source[this.currentPosition] == '\\')
 										&& (this.source[this.currentPosition + 1] == 'u')) {
 										getNextUnicodeChar();
 										isUnicode = true;
 									}
-							   	}
+								}
 								recordComment(TokenNameCOMMENT_LINE);
 								if (this.taskTags != null) checkTaskTag(this.startPosition, this.currentPosition);
 								if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
@@ -1601,6 +1619,9 @@ public int getNextToken() throws InvalidInputException {
 								//loop until end of comment */
 								int firstTag = 0;
 								while ((this.currentCharacter != '/') || (!star)) {
+									if (this.currentPosition >= this.eofPosition) {
+										throw new InvalidInputException(UNTERMINATED_COMMENT);
+									}
 									if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
 										if (this.recordLineSeparator) {
 											if (isUnicode) {
@@ -1865,13 +1886,16 @@ public final void jumpOverMethodBody() {
 								getNextUnicodeChar();
 							} else {
 								if (this.withoutUnicodePtr != 0) {
-								    unicodeStore();
+									unicodeStore();
 								}
 							}
 						} catch (InvalidInputException ex) {
 								// ignore
 						}
 						while (this.currentCharacter != '"') {
+							if (this.currentPosition >= this.eofPosition) {
+								return;
+							}
 							if (this.currentCharacter == '\r'){
 								if (this.source[this.currentPosition] == '\n') this.currentPosition++;
 								break NextToken; // the string cannot go further that the line
@@ -1935,6 +1959,12 @@ public final void jumpOverMethodBody() {
 								} //jump over the \\
 								boolean isUnicode = false;
 								while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+									if (this.currentPosition >= this.eofPosition) {
+										this.lastCommentLinePosition = this.currentPosition;
+										this.currentPosition ++;
+										// this avoids duplicating the code inside the catch(IndexOutOfBoundsException e) below
+										throw new IndexOutOfBoundsException();
+									}
 									this.lastCommentLinePosition = this.currentPosition;
 									//get the next char
 									isUnicode = false;
@@ -1953,16 +1983,16 @@ public final void jumpOverMethodBody() {
 								 * We need to completely consume the line break
 								 */
 								if (this.currentCharacter == '\r'
-								   && this.eofPosition > this.currentPosition) {
-								   	if (this.source[this.currentPosition] == '\n') {
+										&& this.eofPosition > this.currentPosition) {
+									if (this.source[this.currentPosition] == '\n') {
 										this.currentPosition++;
 										this.currentCharacter = '\n';
-								   	} else if ((this.source[this.currentPosition] == '\\')
+									} else if ((this.source[this.currentPosition] == '\\')
 											&& (this.source[this.currentPosition + 1] == 'u')) {
 										isUnicode = true;
 										getNextUnicodeChar();
 									}
-							   	}
+								}
 								recordComment(TokenNameCOMMENT_LINE);
 								if (this.recordLineSeparator
 									&& ((this.currentCharacter == '\r') || (this.currentCharacter == '\n'))) {
@@ -2007,7 +2037,7 @@ public final void jumpOverMethodBody() {
 								} else {
 									isUnicode = false;
 									if (this.withoutUnicodePtr != 0) {
-    								    unicodeStore();
+										unicodeStore();
 									}
 								}
 
@@ -2045,6 +2075,9 @@ public final void jumpOverMethodBody() {
 								//loop until end of comment */
 								int firstTag = 0;
 								while ((this.currentCharacter != '/') || (!star)) {
+									if (this.currentPosition >= this.eofPosition) {
+										return;
+									}
 									if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
 										if (this.recordLineSeparator) {
 											if (isUnicode) {
@@ -2944,20 +2977,23 @@ private int internalScanIdentifierOrKeyword(int index, int length, char[] data)
 		case 'e' : //else extends
 			switch (length) {
 				case 4 :
-					if ((data[++index] == 'l') && (data[++index] == 's') && (data[++index] == 'e'))
-						return TokenNameelse;
-					else if ((data[index] == 'n')
-						&& (data[++index] == 'u')
-						&& (data[++index] == 'm')) {
-							if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
-								return TokenNameenum;
-							} else {
-								this.useEnumAsAnIndentifier = true;
-								return TokenNameIdentifier;
-							}
+					if (data[++index] == 'l') {
+						if ((data[++index] == 's') && (data[++index] == 'e')) {
+							return TokenNameelse;
+						} else {
+							return TokenNameIdentifier;
+						}
+					} else if ((data[index] == 'n')
+							&& (data[++index] == 'u')
+							&& (data[++index] == 'm')) {
+						if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
+							return TokenNameenum;
 						} else {
+							this.useEnumAsAnIndentifier = true;
 							return TokenNameIdentifier;
 						}
+					}
+					return TokenNameIdentifier;
 				case 7 :
 					if ((data[++index] == 'x')
 						&& (data[++index] == 't')
@@ -3640,36 +3676,26 @@ public String toString() {
 	if (this.currentPosition <= 0)
 		return "NOT started!\n\n"+ new String(this.source); //$NON-NLS-1$
 
-	char front[] = new char[this.startPosition];
-	System.arraycopy(this.source, 0, front, 0, this.startPosition);
+	StringBuffer buffer = new StringBuffer();
+	if (this.startPosition < 1000) {
+		buffer.append(this.source, 0, this.startPosition);
+	} else {
+		buffer.append("<source beginning>\n...\n"); //$NON-NLS-1$
+		int line = Util.getLineNumber(this.startPosition-1000, this.lineEnds, 0, this.linePtr);
+		int lineStart = getLineStart(line);
+		buffer.append(this.source, lineStart, this.startPosition-lineStart);
+	}
 
+	buffer.append("\n===============================\nStarts here -->"); //$NON-NLS-1$
 	int middleLength = (this.currentPosition - 1) - this.startPosition + 1;
-	char middle[];
 	if (middleLength > -1) {
-		middle = new char[middleLength];
-		System.arraycopy(
-			this.source,
-			this.startPosition,
-			middle,
-			0,
-			middleLength);
-	} else {
-		middle = CharOperation.NO_CHAR;
+		buffer.append(this.source, this.startPosition, middleLength);
 	}
+	buffer.append("<-- Ends here\n===============================\n"); //$NON-NLS-1$
 
-	char end[] = new char[this.eofPosition - (this.currentPosition - 1)];
-	System.arraycopy(
-		this.source,
-		(this.currentPosition - 1) + 1,
-		end,
-		0,
-		this.eofPosition - (this.currentPosition - 1) - 1);
-
-	return new String(front)
-		+ "\n===============================\nStarts here -->" //$NON-NLS-1$
-		+ new String(middle)
-		+ "<-- Ends here\n===============================\n" //$NON-NLS-1$
-		+ new String(end);
+	buffer.append(this.source, (this.currentPosition - 1) + 1, this.eofPosition - (this.currentPosition - 1) - 1);
+
+	return buffer.toString();
 }
 public String toStringAction(int act) {
 	switch (act) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 7dff062..678f940 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
+ *     Stephan Herrmann  - Contribution for bug 236385
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.problem;
 
@@ -254,6 +255,7 @@ public static int getIrritant(int problemID) {
 			return CompilerOptions.RawTypeReference;
 
 		case IProblem.MissingOverrideAnnotation:
+		case IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation:
 			return CompilerOptions.MissingOverrideAnnotation;
 
 		case IProblem.FieldMissingDeprecatedAnnotation:
@@ -410,6 +412,12 @@ public static int getIrritant(int problemID) {
 			
 		case IProblem.DeadCode:
 			return CompilerOptions.DeadCode;
+			
+		case IProblem.Task :
+			return CompilerOptions.Tasks;
+
+		case IProblem.UnusedObjectAllocation:
+			return CompilerOptions.UnusedObjectAllocation;
 	}
 	return 0;
 }
@@ -439,7 +447,7 @@ public static int getProblemCategory(int severity, int problemID) {
 			case CompilerOptions.AutoBoxing :
 			case CompilerOptions.MissingOverrideAnnotation :
 			case CompilerOptions.MissingDeprecatedAnnotation :
-			case CompilerOptions.ParameterAssignment :				
+			case CompilerOptions.ParameterAssignment :
 				return CategorizedProblem.CAT_CODE_STYLE;
 
 			case CompilerOptions.MaskedCatchBlock :
@@ -460,6 +468,7 @@ public static int getProblemCategory(int severity, int problemID) {
 			case CompilerOptions.MissingSynchronizedModifierInInheritedMethod :
 			case CompilerOptions.ShouldImplementHashcode :
 			case CompilerOptions.DeadCode :
+			case CompilerOptions.UnusedObjectAllocation :
 				return CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM;
 			
 			case CompilerOptions.OverriddenPackageDefaultMethod :
@@ -467,7 +476,7 @@ public static int getProblemCategory(int severity, int problemID) {
 			case CompilerOptions.LocalVariableHiding :
 			case CompilerOptions.FieldHiding :
 			case CompilerOptions.TypeHiding :
-				return CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT;		
+				return CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT;
 
 			case CompilerOptions.UnusedLocalVariable :
 			case CompilerOptions.UnusedArgument :
@@ -480,7 +489,7 @@ public static int getProblemCategory(int severity, int problemID) {
 			case CompilerOptions.UnusedWarningToken :
 			case CompilerOptions.UnusedLabel :
 			case CompilerOptions.RedundantSuperinterface :	
-				return CategorizedProblem.CAT_UNNECESSARY_CODE;					
+				return CategorizedProblem.CAT_UNNECESSARY_CODE;
 
 			case CompilerOptions.UsingDeprecatedAPI :
 				return CategorizedProblem.CAT_DEPRECATION;
@@ -495,11 +504,11 @@ public static int getProblemCategory(int severity, int problemID) {
 			case CompilerOptions.MissingJavadocTags :
 			case CompilerOptions.InvalidJavadoc :
 			case CompilerOptions.InvalidJavadoc|CompilerOptions.UsingDeprecatedAPI :
-				return CategorizedProblem.CAT_JAVADOC;					
+				return CategorizedProblem.CAT_JAVADOC;
 
 			case CompilerOptions.UncheckedTypeOperation :
 			case CompilerOptions.RawTypeReference :
-				return CategorizedProblem.CAT_UNCHECKED_RAW;				
+				return CategorizedProblem.CAT_UNCHECKED_RAW;
 			
 			case CompilerOptions.ForbiddenReference :
 			case CompilerOptions.DiscouragedReference :
@@ -1202,9 +1211,7 @@ public void comparingIdenticalExpressions(Expression comparison){
 public int computeSeverity(int problemID){
 
 	switch (problemID) {
-		case IProblem.Task :
-			return ProblemSeverities.Warning;
- 		case IProblem.VarargsConflict :
+		case IProblem.VarargsConflict :
 			return ProblemSeverities.Warning;
  		case IProblem.TypeCollidesWithPackage :
 			return ProblemSeverities.Warning;
@@ -1349,35 +1356,63 @@ public void deprecatedMethod(MethodBinding method, ASTNode location) {
 	int severity = computeSeverity(isConstructor ? IProblem.UsingDeprecatedConstructor : IProblem.UsingDeprecatedMethod);
 	if (severity == ProblemSeverities.Ignore) return;
 	if (isConstructor) {
+		int start = -1;
+		if(location instanceof AllocationExpression) {
+			// omit the new keyword from the warning marker
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
+			AllocationExpression allocationExpression = (AllocationExpression) location;
+			if (allocationExpression.enumConstant != null) {
+				start = allocationExpression.enumConstant.sourceStart;
+			}
+			start = allocationExpression.type.sourceStart;
+		}
 		this.handle(
 			IProblem.UsingDeprecatedConstructor,
 			new String[] {new String(method.declaringClass.readableName()), typesAsString(method.isVarargs(), method.parameters, false)},
 			new String[] {new String(method.declaringClass.shortReadableName()), typesAsString(method.isVarargs(), method.parameters, true)},
 			severity,
-			location.sourceStart,
+			(start == -1) ? location.sourceStart : start,
 			location.sourceEnd);
 	} else {
+		int start = -1;
+		if (location instanceof MessageSend) {
+			// start the warning marker from the location where the name of the method starts
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
+			start = (int) (((MessageSend)location).nameSourcePosition >>> 32);
+		}
 		this.handle(
 			IProblem.UsingDeprecatedMethod,
 			new String[] {new String(method.declaringClass.readableName()), new String(method.selector), typesAsString(method.isVarargs(), method.parameters, false)},
 			new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), typesAsString(method.isVarargs(), method.parameters, true)},
 			severity,
-			location.sourceStart,
+			(start == -1) ? location.sourceStart : start,
 			location.sourceEnd);
 	}
 }
 public void deprecatedType(TypeBinding type, ASTNode location) {
+	deprecatedType(type, location, Integer.MAX_VALUE);
+}
+// The argument 'index' makes sure that we demarcate partial types correctly while marking off
+// a deprecated type in a qualified reference (see bug 292510)
+public void deprecatedType(TypeBinding type, ASTNode location, int index) {
 	if (location == null) return; // 1G828DN - no type ref for synthetic arguments
 	int severity = computeSeverity(IProblem.UsingDeprecatedType);
 	if (severity == ProblemSeverities.Ignore) return;
 	type = type.leafComponentType();
+	int sourceStart = -1;
+	if (location instanceof QualifiedTypeReference) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=300031
+		QualifiedTypeReference ref = (QualifiedTypeReference) location;
+		if (index < Integer.MAX_VALUE) {
+			sourceStart = (int) (ref.sourcePositions[index] >> 32);
+		}
+	}
 	this.handle(
 		IProblem.UsingDeprecatedType,
 		new String[] {new String(type.readableName())},
 		new String[] {new String(type.shortReadableName())},
 		severity,
-		location.sourceStart,
-		nodeSourceEnd(null, location));
+		(sourceStart == -1) ? location.sourceStart : sourceStart,
+		nodeSourceEnd(null, location, index));
 }
 public void disallowedTargetForAnnotation(Annotation annotation) {
 	this.handle(
@@ -2106,7 +2141,12 @@ public void illegalGenericArray(TypeBinding leafComponentType, ASTNode location)
 public void illegalInstanceOfGenericType(TypeBinding checkedType, ASTNode location) {
 	TypeBinding erasedType = checkedType.leafComponentType().erasure();
 	StringBuffer recommendedFormBuffer = new StringBuffer(10);
-	recommendedFormBuffer.append(erasedType.sourceName());
+	if (erasedType instanceof ReferenceBinding) {
+		ReferenceBinding referenceBinding = (ReferenceBinding) erasedType;
+		recommendedFormBuffer.append(referenceBinding.qualifiedSourceName());
+	} else {
+		recommendedFormBuffer.append(erasedType.sourceName());
+	}
 	int count = erasedType.typeVariables().length;
 	if (count > 0) {
 		recommendedFormBuffer.append('<');
@@ -2649,6 +2689,9 @@ public void incompatibleReturnType(MethodBinding currentMethod, MethodBinding in
 		sourceEnd);
 }
 public void incorrectArityForParameterizedType(ASTNode location, TypeBinding type, TypeBinding[] argumentTypes) {
+	incorrectArityForParameterizedType(location, type, argumentTypes, Integer.MAX_VALUE);
+}
+public void incorrectArityForParameterizedType(ASTNode location, TypeBinding type, TypeBinding[] argumentTypes, int index) {
     if (location == null) {
 		this.handle(
 			IProblem.IncorrectArityForParameterizedType,
@@ -2664,7 +2707,7 @@ public void incorrectArityForParameterizedType(ASTNode location, TypeBinding typ
 		new String[] {new String(type.readableName()), typesAsString(false, argumentTypes, false)},
 		new String[] {new String(type.shortReadableName()), typesAsString(false, argumentTypes, true)},
 		location.sourceStart,
-		location.sourceEnd);
+		nodeSourceEnd(null, location, index));
 }
 public void incorrectLocationForNonEmptyDimension(ArrayAllocationExpression expression, int index) {
 	this.handle(
@@ -3184,8 +3227,14 @@ public void invalidField(NameReference nameRef, FieldBinding field) {
 						nameRef.sourceEnd);
 					return;
 			}
-			id = IProblem.UndefinedField;
-			break;
+			String[] arguments = new String[] {new String(field.readableName())};
+			this.handle(
+					id,
+					arguments,
+					arguments,
+					nodeSourceStart(field, nameRef),
+					nodeSourceEnd(field, nameRef));
+			return;
 		case ProblemReasons.NotVisible :
 			char[] name = field.readableName();
 			name = CharOperation.lastSegment(name, '.');
@@ -3268,14 +3317,17 @@ public void invalidField(QualifiedNameReference nameRef, FieldBinding field, int
 						(int) nameRef.sourcePositions[index-1]);
 					return;
 			}
-			id = IProblem.UndefinedField;
-/* also need to check that the searchedType is the receiver type
-			if (searchedType.isHierarchyInconsistent())
-				severity = SecondaryError;
-*/
-			break;
-		case ProblemReasons.NotVisible :
 			String fieldName = new String(nameRef.tokens[index]);
+			String[] arguments = new String[] {fieldName };
+			this.handle(
+					id,
+					arguments,
+					arguments,
+					nodeSourceStart(field, nameRef),
+					nodeSourceEnd(field, nameRef));
+			return;
+		case ProblemReasons.NotVisible :
+			fieldName = new String(nameRef.tokens[index]);
 			this.handle(
 				IProblem.NotVisibleField,
 				new String[] {fieldName, new String(field.declaringClass.readableName())},
@@ -3607,8 +3659,13 @@ public void invalidType(ASTNode location, TypeBinding type) {
 	if (type.isParameterizedType()) {
 		List missingTypes = type.collectMissingTypes(null);
 		if (missingTypes != null) {
+			ReferenceContext savedContext = this.referenceContext;
 			for (Iterator iterator = missingTypes.iterator(); iterator.hasNext(); ) {
-				invalidType(location, (TypeBinding) iterator.next());
+				try {
+					invalidType(location, (TypeBinding) iterator.next());
+				} finally {
+					this.referenceContext = savedContext;
+				}
 			}
 			return;
 		}
@@ -3632,10 +3689,10 @@ public void invalidType(ASTNode location, TypeBinding type) {
 			break;
 		case ProblemReasons.NonStaticReferenceInStaticContext :
 			id = IProblem.NonStaticTypeFromStaticInvocation;
-		    break;
+			break;
 		case ProblemReasons.IllegalSuperTypeVariable :
-		    id = IProblem.IllegalTypeVariableSuperReference;
-		    break;
+			id = IProblem.IllegalTypeVariableSuperReference;
+			break;
 		case ProblemReasons.NoError : // 0
 		default :
 			needImplementation(location); // want to fail to see why we were here...
@@ -3702,6 +3759,14 @@ public void invalidTypeForCollection(Expression expression) {
 			expression.sourceStart,
 			expression.sourceEnd);
 }
+public void invalidTypeForCollectionTarget14(Expression expression) {
+	this.handle(
+			IProblem.InvalidTypeForCollectionTarget14,
+			NoArgument,
+			NoArgument,
+			expression.sourceStart,
+			expression.sourceEnd);
+}
 public void invalidTypeReference(Expression expression) {
 	this.handle(
 		IProblem.InvalidTypeExpression,
@@ -3980,6 +4045,9 @@ public void javadocDeprecatedMethod(MethodBinding method, ASTNode location, int
 	}
 }
 public void javadocDeprecatedType(TypeBinding type, ASTNode location, int modifiers) {
+	javadocDeprecatedType(type, location, modifiers, Integer.MAX_VALUE);
+}
+public void javadocDeprecatedType(TypeBinding type, ASTNode location, int modifiers, int index) {
 	if (location == null) return; // 1G828DN - no type ref for synthetic arguments
 	int severity = computeSeverity(IProblem.JavadocUsingDeprecatedType);
 	if (severity == ProblemSeverities.Ignore) return;
@@ -3993,7 +4061,7 @@ public void javadocDeprecatedType(TypeBinding type, ASTNode location, int modifi
 				new String[] {new String(type.shortReadableName())},
 				severity,
 				location.sourceStart,
-				location.sourceEnd);
+				nodeSourceEnd(null, location, index));
 		}
 	}
 }
@@ -4885,10 +4953,10 @@ public void localVariableRedundantNullAssignment(LocalVariableBinding local, AST
 		nodeSourceEnd(local, location));
 }
 
-public void methodMustOverride(AbstractMethodDeclaration method) {
+public void methodMustOverride(AbstractMethodDeclaration method, long complianceLevel) {
 	MethodBinding binding = method.binding;
 	this.handle(
-		this.options.sourceLevel == ClassFileConstants.JDK1_5 ? IProblem.MethodMustOverride : IProblem.MethodMustOverrideOrImplement,
+		complianceLevel == ClassFileConstants.JDK1_5 ? IProblem.MethodMustOverride : IProblem.MethodMustOverrideOrImplement,
 		new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), },
 		new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),},
 		method.sourceStart,
@@ -5001,6 +5069,18 @@ public void missingOverrideAnnotation(AbstractMethodDeclaration method) {
 		method.sourceStart,
 		method.sourceEnd);
 }
+public void missingOverrideAnnotationForInterfaceMethodImplementation(AbstractMethodDeclaration method) {
+	int severity = computeSeverity(IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation);
+	if (severity == ProblemSeverities.Ignore) return;
+	MethodBinding binding = method.binding;
+	this.handle(
+		IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation,
+		new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, false), new String(binding.declaringClass.readableName()), },
+		new String[] {new String(binding.selector), typesAsString(binding.isVarargs(), binding.parameters, true), new String(binding.declaringClass.shortReadableName()),},
+		severity,
+		method.sourceStart,
+		method.sourceEnd);
+}
 public void missingReturnType(AbstractMethodDeclaration methodDecl) {
 	this.handle(
 		IProblem.MissingReturnType,
@@ -5044,6 +5124,10 @@ public void missingSynchronizedOnInheritedMethod(MethodBinding currentMethod, Me
 }
 public void missingTypeInConstructor(ASTNode location, MethodBinding constructor) {
 	List missingTypes = constructor.collectMissingTypes(null);
+	if (missingTypes == null) {
+		System.err.println("The constructor " + constructor + " is wrongly tagged as containing missing types"); //$NON-NLS-1$ //$NON-NLS-2$
+		return;
+	}
 	TypeBinding missingType = (TypeBinding) missingTypes.get(0);
 	int start = location.sourceStart;
 	int end = location.sourceEnd;
@@ -5072,6 +5156,10 @@ public void missingTypeInConstructor(ASTNode location, MethodBinding constructor
 
 public void missingTypeInMethod(MessageSend messageSend, MethodBinding method) {
 	List missingTypes = method.collectMissingTypes(null);
+	if (missingTypes == null) {
+		System.err.println("The method " + method + " is wrongly tagged as containing missing types"); //$NON-NLS-1$ //$NON-NLS-2$
+		return;
+	}
 	TypeBinding missingType = (TypeBinding) missingTypes.get(0);
 	this.handle(
 			IProblem.MissingTypeInMethod,
@@ -5213,7 +5301,11 @@ private int nodeSourceEnd(Binding field, ASTNode node, int index) {
 			if (index == 0) {
 				return (int) (ref.sourcePositions[ref.indexOfFirstFieldBinding-1]);
 			} else {
-				return (int) (ref.sourcePositions[index]);
+				int length = ref.sourcePositions.length;
+				if (index < length) {
+					return (int) (ref.sourcePositions[index]);
+				}
+				return (int) (ref.sourcePositions[0]);
 			}
 		}
 		FieldBinding[] otherFields = ref.otherBindings;
@@ -5240,7 +5332,16 @@ private int nodeSourceEnd(Binding field, ASTNode node, int index) {
 	} else if (node instanceof ArrayQualifiedTypeReference) {
 		ArrayQualifiedTypeReference reference = (ArrayQualifiedTypeReference) node;
 		int length = reference.sourcePositions.length;
+		if (index < length) {
+			return (int) reference.sourcePositions[index];
+		}
 		return (int) reference.sourcePositions[length - 1];
+	} else if (node instanceof QualifiedTypeReference) {
+		QualifiedTypeReference reference = (QualifiedTypeReference) node;
+		int length = reference.sourcePositions.length;
+		if (index < length) {
+			return (int) reference.sourcePositions[index];
+		}
 	}
 	return node.sourceEnd;
 }
@@ -5607,7 +5708,7 @@ private String parameterBoundAsString(TypeVariableBinding typeVariable, boolean
 	}
 	return nameBuffer.toString();
 }
-public void parameterizedMemberTypeMissingArguments(ASTNode location, TypeBinding type) {
+public void parameterizedMemberTypeMissingArguments(ASTNode location, TypeBinding type, int index) {
 	if (location == null) { // binary case
 	    this.handle(
 			IProblem.MissingArgumentsForParameterizedMemberType,
@@ -5623,7 +5724,7 @@ public void parameterizedMemberTypeMissingArguments(ASTNode location, TypeBindin
 		new String[] {new String(type.readableName())},
 		new String[] {new String(type.shortReadableName())},
 		location.sourceStart,
-		location.sourceEnd);
+		nodeSourceEnd(null, location, index));
 }
 public void parseError(
 	int startPosition,
@@ -5954,7 +6055,7 @@ public void rawTypeReference(ASTNode location, TypeBinding type) {
 		new String[] {new String(type.readableName()), new String(type.erasure().readableName()), },
 		new String[] {new String(type.shortReadableName()),new String(type.erasure().shortReadableName()),},
 		location.sourceStart,
-		nodeSourceEnd(null, location));
+		nodeSourceEnd(null, location, Integer.MAX_VALUE));
 }
 public void recursiveConstructorInvocation(ExplicitConstructorCall constructorCall) {
 	this.handle(
@@ -6256,7 +6357,7 @@ public void staticInheritedMethodConflicts(SourceTypeBinding type, MethodBinding
 		type.sourceStart(),
 		type.sourceEnd());
 }
-public void staticMemberOfParameterizedType(ASTNode location, ReferenceBinding type) {
+public void staticMemberOfParameterizedType(ASTNode location, ReferenceBinding type, int index) {
 	if (location == null) { // binary case
 	    this.handle(
 			IProblem.StaticMemberOfParameterizedType,
@@ -6267,7 +6368,6 @@ public void staticMemberOfParameterizedType(ASTNode location, ReferenceBinding t
 			0);
 	    return;
 	}
-	int end = location.sourceEnd;
 	/*if (location instanceof ArrayTypeReference) {
 		ArrayTypeReference arrayTypeReference = (ArrayTypeReference) location;
 		if (arrayTypeReference.token != null && arrayTypeReference.token.length == 0) return;
@@ -6278,7 +6378,7 @@ public void staticMemberOfParameterizedType(ASTNode location, ReferenceBinding t
 		new String[] {new String(type.readableName()), new String(type.enclosingType().readableName()), },
 		new String[] {new String(type.shortReadableName()), new String(type.enclosingType().shortReadableName()), },
 		location.sourceStart,
-		end);
+		nodeSourceEnd(null, location, index));
 }
 public void stringConstantIsExceedingUtf8Limit(ASTNode location) {
 	this.handle(
@@ -6802,6 +6902,7 @@ public void unresolvableReference(NameReference nameRef, Binding binding) {
 */
 	String[] arguments = new String[] {new String(binding.readableName())};
 	int end = nameRef.sourceEnd;
+	int sourceStart = nameRef.sourceStart;
 	if (nameRef instanceof QualifiedNameReference) {
 		QualifiedNameReference ref = (QualifiedNameReference) nameRef;
 		if (isRecoveredName(ref.tokens)) return;
@@ -6810,12 +6911,20 @@ public void unresolvableReference(NameReference nameRef, Binding binding) {
 	} else {
 		SingleNameReference ref = (SingleNameReference) nameRef;
 		if (isRecoveredName(ref.token)) return;
+		int numberOfParens = (ref.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+		if (numberOfParens != 0) {
+			sourceStart = retrieveStartingPositionAfterOpeningParenthesis(sourceStart, end, numberOfParens);
+			end = retrieveEndingPositionAfterOpeningParenthesis(sourceStart, end, numberOfParens);
+		}
 	}
+	int problemId = (nameRef.bits & Binding.VARIABLE) != 0 && (nameRef.bits & Binding.TYPE) == 0
+		? IProblem.UnresolvedVariable
+		: IProblem.UndefinedName;
 	this.handle(
-		IProblem.UndefinedName,
+		problemId,
 		arguments,
 		arguments,
-		nameRef.sourceStart,
+		sourceStart,
 		end);
 }
 public void unsafeCast(CastExpression castExpression, Scope scope) {
@@ -7076,6 +7185,14 @@ public void unusedLocalVariable(LocalDeclaration localDecl) {
 		localDecl.sourceStart,
 		localDecl.sourceEnd);
 }
+public void unusedObjectAllocation(AllocationExpression allocationExpression) {
+	this.handle(
+		IProblem.UnusedObjectAllocation, 
+		NoArgument, 
+		NoArgument, 
+		allocationExpression.sourceStart, 
+		allocationExpression.sourceEnd);
+}
 public void unusedPrivateConstructor(ConstructorDeclaration constructorDecl) {
 
 	int severity = computeSeverity(IProblem.UnusedPrivateConstructor);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemSeverities.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemSeverities.java
index b7eff04..5676163 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemSeverities.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemSeverities.java
@@ -12,7 +12,7 @@ package org.eclipse.jdt.internal.compiler.problem;
 
 public interface ProblemSeverities {
 
-	final int Ignore = -1; // during handling only
+	final int Ignore = 256; // during handling only
 	final int Warning = 0; // during handling only
 
 	final int Error = 1; // when bit is set: problem is error, if not it is a warning
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index b03aa82..a0173f9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -71,6 +71,7 @@
 80 = The final field {0}.{1} cannot be assigned
 81 = The blank final field {0} may not have been initialized
 82 = The final field {0} may already have been assigned
+83 = {0} cannot be resolved to a variable
 
 90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
 91 = The local variable {0} is hiding a field from type {1}
@@ -122,6 +123,8 @@
 146 = Default constructor cannot handle exception type {0} thrown by implicit super constructor. Must define an explicit constructor
 147 = Unhandled exception type {0} thrown by implicit super constructor
 
+
+148 = The allocated object is never used
 149 = Dead code
 150 = The type of the expression must be an array type but it resolved to {0}
 151 = Must explicitly convert the char[] to a String
@@ -371,7 +374,7 @@
 441 = 'enum' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on
 442 = Enum constants cannot be surrounded by parenthesis
 
-450 = {0} {1}
+450 = {0}{1}
 
 451 = Null pointer access: The variable {0} can only be null at this location
 452 = Potential null pointer access: The variable {0} may be null at this location
@@ -509,6 +512,7 @@
 ### FOREACH
 580 = Type mismatch: cannot convert from element type {0} to {1}
 581 = Can only iterate over an array or an instance of java.lang.Iterable
+582 = Can only iterate over an array or an instance of java.util.Collection
 
 ### SOURCE LEVEL
 590 = Syntax error, type parameters are only available if source level is 1.5
@@ -559,6 +563,7 @@
 633 = The value for annotation attribute {0}.{1} must be an enum constant expression
 634 = The method {0}({1}) of type {2} must override or implement a supertype method
 635 = Unnecessary @SuppressWarnings("{0}")
+636 = The method {0}({1}) of type {2} should be tagged with @Override since it actually overrides a superinterface method
 
 ### MORE GENERICS
 660 = Unused type arguments for the non generic constructor {0}({1}) of type {2}; it should not be parameterized with arguments <{3}>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
index 7e2acad..48912ab 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,6 +113,32 @@ public final class HashtableOfObject implements Cloneable {
 		return value;
 	}
 
+	/**
+	 * Put a value at the index of the given using the local hash code computation.
+	 * <p>
+	 * Note that this is an unsafe put as there's no prior verification whether
+	 * the given key already exists in the table or not.
+	 * </p>
+	 * @param key The key of the table entry
+	 * @param value The value of the table entry
+	 */
+	public void putUnsafely(char[] key, Object value) {
+		int length = this.keyTable.length,
+			index = CharOperation.hashCode(key) % length;
+		while (this.keyTable[index] != null) {
+			if (++index == length) {
+				index = 0;
+			}
+		}
+		this.keyTable[index] = key;
+		this.valueTable[index] = value;
+	
+		// assumes the threshold is never equal to the size of the table
+		if (++this.elementSize > this.threshold) {
+			rehash();
+		}
+	}
+
 	public Object removeKey(char[] key) {
 		int length = this.keyTable.length,
 			index = CharOperation.hashCode(key) % length;
@@ -140,7 +166,7 @@ public final class HashtableOfObject implements Cloneable {
 		char[] currentKey;
 		for (int i = this.keyTable.length; --i >= 0;)
 			if ((currentKey = this.keyTable[i]) != null)
-				newHashtable.put(currentKey, this.valueTable[i]);
+				newHashtable.putUnsafely(currentKey, this.valueTable[i]);
 
 		this.keyTable = newHashtable.keyTable;
 		this.valueTable = newHashtable.valueTable;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
index b11dc3b..5805a0c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.util.HashSet;
+import java.util.List;
 import java.util.StringTokenizer;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
@@ -31,6 +32,8 @@ import java.util.zip.ZipFile;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.batch.FileSystem;
+import org.eclipse.jdt.internal.compiler.batch.Main;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
@@ -291,7 +294,7 @@ public class Util implements SuffixConstants {
 	*/
 	/**
 	 * Returns the given input stream's contents as a byte array.
-	 * If a length is specified (ie. if length != -1), only length bytes
+	 * If a length is specified (i.e. if length != -1), only length bytes
 	 * are returned. Otherwise all bytes in the stream are returned.
 	 * Note this doesn't close the stream.
 	 * @throws IOException if a problem occured reading the stream.
@@ -374,7 +377,7 @@ public class Util implements SuffixConstants {
 	*/
 	/**
 	 * Returns the given input stream's contents as a character array.
-	 * If a length is specified (ie. if length != -1), this represents the number of bytes in the stream.
+	 * If a length is specified (i.e. if length != -1), this represents the number of bytes in the stream.
 	 * Note this doesn't close the stream.
 	 * @throws IOException if a problem occured reading the stream.
 	 */
@@ -519,7 +522,17 @@ public class Util implements SuffixConstants {
 			}
 		}
 	}
-
+	public static int hashCode(Object[] array) {
+		int prime = 31;
+		if (array == null) {
+			return 0;
+		}
+		int result = 1;
+		for (int index = 0; index < array.length; index++) {
+			result = prime * result + (array[index] == null ? 0 : array[index].hashCode());
+		}
+		return result;
+	}
 	/**
 	 * Returns whether the given name is potentially a zip archive file name
 	 * (it has a file extension and it is not ".java" nor ".class")
@@ -882,4 +895,85 @@ public class Util implements SuffixConstants {
 			classFile.recordInnerClasses(typeBinding);
 		}
 	}
+	/*
+	 * External API
+	 */
+	public static File getJavaHome() {
+		String javaHome = System.getProperty("java.home");//$NON-NLS-1$
+		if (javaHome != null) {
+			File javaHomeFile = new File(javaHome);
+			if (javaHomeFile.exists()) {
+				return javaHomeFile;
+			}
+		}
+		return null;
+	}
+
+	public static void collectRunningVMBootclasspath(List bootclasspaths) {
+		/* no bootclasspath specified
+		 * we can try to retrieve the default librairies of the VM used to run
+		 * the batch compiler
+		 */
+		String javaversion = System.getProperty("java.version");//$NON-NLS-1$
+		if (javaversion != null && javaversion.equalsIgnoreCase("1.1.8")) { //$NON-NLS-1$
+			throw new IllegalStateException();
+		}
+
+		/*
+		 * Handle >= JDK 1.2.2 settings: retrieve the bootclasspath
+		 */
+		// check bootclasspath properties for Sun, JRockit and Harmony VMs
+		String bootclasspathProperty = System.getProperty("sun.boot.class.path"); //$NON-NLS-1$
+		if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) {
+			// IBM J9 VMs
+			bootclasspathProperty = System.getProperty("vm.boot.class.path"); //$NON-NLS-1$
+			if ((bootclasspathProperty == null) || (bootclasspathProperty.length() == 0)) {
+				// Harmony using IBM VME
+				bootclasspathProperty = System.getProperty("org.apache.harmony.boot.class.path"); //$NON-NLS-1$
+			}
+		}
+		if ((bootclasspathProperty != null) && (bootclasspathProperty.length() != 0)) {
+			StringTokenizer tokenizer = new StringTokenizer(bootclasspathProperty, File.pathSeparator);
+			String token;
+			while (tokenizer.hasMoreTokens()) {
+				token = tokenizer.nextToken();
+				FileSystem.Classpath currentClasspath = FileSystem.getClasspath(token, null, null);
+				if (currentClasspath != null) {
+					bootclasspaths.add(currentClasspath);
+				}
+			}
+		} else {
+			// try to get all jars inside the lib folder of the java home
+			final File javaHome = getJavaHome();
+			if (javaHome != null) {
+				File[] directoriesToCheck = null;
+				if (System.getProperty("os.name").startsWith("Mac")) {//$NON-NLS-1$//$NON-NLS-2$
+					directoriesToCheck = new File[] {
+						new File(javaHome, "../Classes"), //$NON-NLS-1$
+					};
+				} else {
+					// fall back to try to retrieve them out of the lib directory
+					directoriesToCheck = new File[] {
+						new File(javaHome, "lib") //$NON-NLS-1$
+					};
+				}
+				File[][] systemLibrariesJars = Main.getLibrariesFiles(directoriesToCheck);
+				if (systemLibrariesJars != null) {
+					for (int i = 0, max = systemLibrariesJars.length; i < max; i++) {
+						File[] current = systemLibrariesJars[i];
+						if (current != null) {
+							for (int j = 0, max2 = current.length; j < max2; j++) {
+								FileSystem.Classpath classpath =
+									FileSystem.getClasspath(current[j].getAbsolutePath(),
+										null, false, null, null);
+								if (classpath != null) {
+									bootclasspaths.add(classpath);
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.core/component.xml b/eclipse/plugins/org.eclipse.jdt.core/component.xml
index 9be8f9f..6199452 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/component.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/component.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2005, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
index f3b0fb2..c9884ce 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -267,7 +267,7 @@ public final class AST {
 		ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
 		BindingResolver resolver = null;
 		if (isResolved) {
-			resolver = new DefaultBindingResolver(compilationUnitDeclaration.scope, workingCopy.owner, new DefaultBindingResolver.BindingTables(), false);
+			resolver = new DefaultBindingResolver(compilationUnitDeclaration.scope, workingCopy.owner, new DefaultBindingResolver.BindingTables(), false, true);
 			((DefaultBindingResolver) resolver).isRecoveringBindings = (reconcileFlags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0;
 			ast.setFlag(AST.RESOLVED_BINDINGS);
 		} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
index 048cdf3..c4e00ff 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
 import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
+import org.eclipse.jdt.internal.core.util.Util;
 
 /**
  * Internal class for converting internal compiler ASTs into public ASTs.
@@ -1219,80 +1220,94 @@ class ASTConverter {
 	}
 
 	public CompilationUnit convert(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, char[] source) {
-		if(unit.compilationResult.recoveryScannerData != null) {
-			RecoveryScanner recoveryScanner = new RecoveryScanner(this.scanner, unit.compilationResult.recoveryScannerData.removeUnused());
-			this.scanner = recoveryScanner;
-			this.docParser.scanner = this.scanner;
-		}
-		this.compilationUnitSource = source;
-		this.compilationUnitSourceLength = source.length;
-		this.scanner.setSource(source, unit.compilationResult);
-		CompilationUnit compilationUnit = new CompilationUnit(this.ast);
-		compilationUnit.setStatementsRecoveryData(unit.compilationResult.recoveryScannerData);
-
-		// Parse comments
-		int[][] comments = unit.comments;
-		if (comments != null) {
-			buildCommentsTable(compilationUnit, comments);
-		}
-
-		// handle the package declaration immediately
-		// There is no node corresponding to the package declaration
-		if (this.resolveBindings) {
-			recordNodes(compilationUnit, unit);
-		}
-		if (unit.currentPackage != null) {
-			PackageDeclaration packageDeclaration = convertPackage(unit);
-			compilationUnit.setPackage(packageDeclaration);
-		}
-		org.eclipse.jdt.internal.compiler.ast.ImportReference[] imports = unit.imports;
-		if (imports != null) {
-			int importLength = imports.length;
-			for (int i = 0; i < importLength; i++) {
-				compilationUnit.imports().add(convertImport(imports[i]));
-			}
-		}
-
-		org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = unit.types;
-		if (types != null) {
-			int typesLength = types.length;
-			for (int i = 0; i < typesLength; i++) {
-				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration declaration = types[i];
-				if (CharOperation.equals(declaration.name, TypeConstants.PACKAGE_INFO_NAME)) {
-					continue;
+		try {
+			if(unit.compilationResult.recoveryScannerData != null) {
+				RecoveryScanner recoveryScanner = new RecoveryScanner(this.scanner, unit.compilationResult.recoveryScannerData.removeUnused());
+				this.scanner = recoveryScanner;
+				this.docParser.scanner = this.scanner;
+			}
+			this.compilationUnitSource = source;
+			this.compilationUnitSourceLength = source.length;
+			this.scanner.setSource(source, unit.compilationResult);
+			CompilationUnit compilationUnit = new CompilationUnit(this.ast);
+			compilationUnit.setStatementsRecoveryData(unit.compilationResult.recoveryScannerData);
+	
+			// Parse comments
+			int[][] comments = unit.comments;
+			if (comments != null) {
+				buildCommentsTable(compilationUnit, comments);
+			}
+	
+			// handle the package declaration immediately
+			// There is no node corresponding to the package declaration
+			if (this.resolveBindings) {
+				recordNodes(compilationUnit, unit);
+			}
+			if (unit.currentPackage != null) {
+				PackageDeclaration packageDeclaration = convertPackage(unit);
+				compilationUnit.setPackage(packageDeclaration);
+			}
+			org.eclipse.jdt.internal.compiler.ast.ImportReference[] imports = unit.imports;
+			if (imports != null) {
+				int importLength = imports.length;
+				for (int i = 0; i < importLength; i++) {
+					compilationUnit.imports().add(convertImport(imports[i]));
+				}
+			}
+	
+			org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = unit.types;
+			if (types != null) {
+				int typesLength = types.length;
+				for (int i = 0; i < typesLength; i++) {
+					org.eclipse.jdt.internal.compiler.ast.TypeDeclaration declaration = types[i];
+					if (CharOperation.equals(declaration.name, TypeConstants.PACKAGE_INFO_NAME)) {
+						continue;
+					}
+					ASTNode type = convert(declaration);
+					if (type == null) {
+						compilationUnit.setFlags(compilationUnit.getFlags() | ASTNode.MALFORMED);
+					} else {
+						compilationUnit.types().add(type);
+					}
 				}
-				ASTNode type = convert(declaration);
-				if (type == null) {
-					compilationUnit.setFlags(compilationUnit.getFlags() | ASTNode.MALFORMED);
+			}
+			compilationUnit.setSourceRange(unit.sourceStart, unit.sourceEnd - unit.sourceStart  + 1);
+	
+			int problemLength = unit.compilationResult.problemCount;
+			if (problemLength != 0) {
+				CategorizedProblem[] resizedProblems = null;
+				final CategorizedProblem[] problems = unit.compilationResult.getProblems();
+				final int realProblemLength=problems.length;
+				if (realProblemLength == problemLength) {
+					resizedProblems = problems;
 				} else {
-					compilationUnit.types().add(type);
+					System.arraycopy(problems, 0, (resizedProblems = new CategorizedProblem[realProblemLength]), 0, realProblemLength);
 				}
+				ASTSyntaxErrorPropagator syntaxErrorPropagator = new ASTSyntaxErrorPropagator(resizedProblems);
+				compilationUnit.accept(syntaxErrorPropagator);
+				ASTRecoveryPropagator recoveryPropagator =
+					new ASTRecoveryPropagator(resizedProblems, unit.compilationResult.recoveryScannerData);
+				compilationUnit.accept(recoveryPropagator);
+				compilationUnit.setProblems(resizedProblems);
 			}
+			if (this.resolveBindings) {
+				lookupForScopes();
+			}
+			compilationUnit.initCommentMapper(this.scanner);
+			return compilationUnit;
+		} catch(IllegalArgumentException e) {
+			StringBuffer message = new StringBuffer("Exception occurred during compilation unit conversion:");  //$NON-NLS-1$
+			String lineDelimiter = Util.findLineSeparator(source);
+			if (lineDelimiter == null) lineDelimiter = System.getProperty("line.separator");//$NON-NLS-1$
+			message.append(lineDelimiter);
+			message.append("----------------------------------- SOURCE BEGIN -------------------------------------"); //$NON-NLS-1$
+			message.append(lineDelimiter);
+			message.append(source);
+			message.append(lineDelimiter);
+			message.append("----------------------------------- SOURCE END -------------------------------------"); //$NON-NLS-1$
+			Util.log(e, message.toString());
+			throw e;
 		}
-		compilationUnit.setSourceRange(unit.sourceStart, unit.sourceEnd - unit.sourceStart  + 1);
-
-		int problemLength = unit.compilationResult.problemCount;
-		if (problemLength != 0) {
-			CategorizedProblem[] resizedProblems = null;
-			final CategorizedProblem[] problems = unit.compilationResult.getProblems();
-			final int realProblemLength=problems.length;
-			if (realProblemLength == problemLength) {
-				resizedProblems = problems;
-			} else {
-				System.arraycopy(problems, 0, (resizedProblems = new CategorizedProblem[realProblemLength]), 0, realProblemLength);
-			}
-			ASTSyntaxErrorPropagator syntaxErrorPropagator = new ASTSyntaxErrorPropagator(resizedProblems);
-			compilationUnit.accept(syntaxErrorPropagator);
-			ASTRecoveryPropagator recoveryPropagator =
-				new ASTRecoveryPropagator(resizedProblems, unit.compilationResult.recoveryScannerData);
-			compilationUnit.accept(recoveryPropagator);
-			compilationUnit.setProblems(resizedProblems);
-		}
-		if (this.resolveBindings) {
-			lookupForScopes();
-		}
-		compilationUnit.initCommentMapper(this.scanner);
-		return compilationUnit;
 	}
 
 	public Assignment convert(org.eclipse.jdt.internal.compiler.ast.CompoundAssignment expression) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
index 0929ed2..d3ef293 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,9 @@ package org.eclipse.jdt.core.dom;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -28,6 +30,7 @@ import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration;
+import org.eclipse.jdt.internal.compiler.batch.Main;
 import org.eclipse.jdt.internal.compiler.env.IBinaryType;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScannerData;
@@ -46,6 +49,10 @@ import org.eclipse.jdt.internal.core.util.Util;
  * char[] source = ...;
  * ASTParser parser = ASTParser.newParser(AST.JLS3);  // handles JDK 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
  * parser.setSource(source);
+ * // In order to parse 1.5 code, some compiler options need to be set to 1.5
+ * Map options = JavaCore.getOptions();
+ * JavaCore.setComplianceOptions(JavaCore.VERSION_1_5, options);
+ * parser.setCompilerOptions(options);
  * CompilationUnit result = (CompilationUnit) parser.createAST(null);
  * </pre>
  * Once a configured parser instance has been used to create an AST,
@@ -132,31 +139,7 @@ public class ASTParser {
 	 * Compiler options. Defaults to JavaCore.getOptions().
 	 */
 	private Map compilerOptions;
-
-	/**
-	 * Request for bindings. Defaults to <code>false</code>.
-     */
-	private boolean resolveBindings;
-
-	/**
-	 * Request for a partial AST. Defaults to <code>false</code>.
-     */
-	private boolean partial = false;
-
-	/**
-	 * Request for a statements recovery. Defaults to <code>false</code>.
-     */
-	private boolean statementsRecovery;
-
-	/**
-	 * Request to ignore parsing the method bodies. Defaults to <code>false</code>.
-     */
-	private boolean ignoreMethodBodies;
-	/**
-     * Request for a bindings recovery. Defaults to <code>false</code>.
-     */
-    private boolean bindingsRecovery;
-
+	
     /**
 	 * The focal point for a partial AST request.
      * Only used when <code>partial</code> is <code>true</code>.
@@ -203,15 +186,35 @@ public class ASTParser {
 	 * <code>null</code> if none. Defaults to none.
      */
 	private String unitName = null;
+	
+	/**
+	 * Classpath entries to use to resolve bindings when no java project are available.
+	 */
+	private String[] classpaths;
+
+	/**
+	 * Sourcepath entries to use to resolve bindings when no java project are available.
+	 */
+	private String[] sourcepaths;
+	
+	/**
+	 * Encoding of the given sourcepaths entries.
+	 */
+	private String[] sourcepathsEncodings;
+	
+	/**
+	 * Bits used to set the different values from CompilationUnitResolver values.
+	 */
+	private int bits;
 
- 	/**
+	/**
 	 * Creates a new AST parser for the given API level.
 	 * <p>
 	 * N.B. This constructor is package-private.
 	 * </p>
 	 *
 	 * @param level the API level; one of the LEVEL constants
-     * declared on <code>AST</code>
+	 * declared on <code>AST</code>
 	 */
 	ASTParser(int level) {
 		if ((level != AST.JLS2_INTERNAL)
@@ -219,9 +222,40 @@ public class ASTParser {
 			throw new IllegalArgumentException();
 		}
 		this.apiLevel = level;
-	   	initializeDefaults();
+		initializeDefaults();
 	}
 
+	private List getClasspath() throws IllegalStateException {
+		Main main = new Main(new PrintWriter(System.out), new PrintWriter(System.err), false/*systemExit*/, null/*options*/, null/*progress*/);
+		ArrayList allClasspaths = new ArrayList();
+		try {
+			if ((this.bits & CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH) != 0) {
+				org.eclipse.jdt.internal.compiler.util.Util.collectRunningVMBootclasspath(allClasspaths);
+			}
+			if (this.sourcepaths != null) {
+				for (int i = 0, max = this.sourcepaths.length; i < max; i++) {
+					String encoding = this.sourcepathsEncodings == null ? null : this.sourcepathsEncodings[i];
+					main.processPathEntries(
+							Main.DEFAULT_SIZE_CLASSPATH,
+							allClasspaths, this.sourcepaths[i], encoding, true, false);
+				}
+			}
+			if (this.classpaths != null) {
+				for (int i = 0, max = this.classpaths.length; i < max; i++) {
+					main.processPathEntries(
+							Main.DEFAULT_SIZE_CLASSPATH,
+							allClasspaths, this.classpaths[i], null, false, false);
+				}
+			}
+			ArrayList pendingErrors = main.pendingErrors;
+			if (pendingErrors != null && pendingErrors.size() != 0) {
+				throw new IllegalStateException("invalid environment settings"); //$NON-NLS-1$
+			}
+		} catch (IllegalArgumentException e) {
+			throw new IllegalStateException("invalid environment settings"); //$NON-NLS-1$
+		}
+		return allClasspaths;
+	}
 	/**
 	 * Sets all the setting to their default values.
 	 */
@@ -229,37 +263,76 @@ public class ASTParser {
 		this.astKind = K_COMPILATION_UNIT;
 		this.rawSource = null;
 		this.typeRoot = null;
-		this.resolveBindings = false;
-		this.ignoreMethodBodies = false;
+		this.bits = 0;
 		this.sourceLength = -1;
 		this.sourceOffset = 0;
 		this.workingCopyOwner = DefaultWorkingCopyOwner.PRIMARY;
 		this.unitName = null;
 		this.project = null;
-		this.partial = false;
+		this.classpaths = null;
+		this.sourcepaths = null;
+		this.sourcepathsEncodings = null;
 		Map options = JavaCore.getOptions();
 		options.remove(JavaCore.COMPILER_TASK_TAGS); // no need to parse task tags
 		this.compilerOptions = options;
 	}
 
-    /**
-     * Requests that the compiler should perform bindings recovery.
-     * When bindings recovery is enabled the compiler returns incomplete bindings.
-     * <p>
-     * Default to <code>false</code>.
-     * </p>
-     * <p>This should be set to true only if bindings are resolved. It has no effect if there is no binding
-     * resolution.</p>
-     *
-     * @param enabled <code>true</code> if incomplete bindings are expected,
-     *   and <code>false</code> if only complete bindings are expected.
-     *
-     * @see IBinding#isRecovered()
-     * @since 3.3
-     */
-    public void setBindingsRecovery(boolean enabled) {
-        this.bindingsRecovery = enabled;
-    }
+	/**
+	 * Requests that the compiler should perform bindings recovery.
+	 * When bindings recovery is enabled the compiler returns incomplete bindings.
+	 * <p>
+	 * Default to <code>false</code>.
+	 * </p>
+	 * <p>This should be set to true only if bindings are resolved. It has no effect if there is no binding
+	 * resolution.</p>
+	 *
+	 * @param enabled <code>true</code> if incomplete bindings are expected,
+	 *   and <code>false</code> if only complete bindings are expected.
+	 *
+	 * @see IBinding#isRecovered()
+	 * @since 3.3
+	 */
+	public void setBindingsRecovery(boolean enabled) {
+		if (enabled) {
+			this.bits |= CompilationUnitResolver.BINDING_RECOVERY;
+		} else {
+			this.bits &= ~CompilationUnitResolver.BINDING_RECOVERY;
+		}
+	}
+	
+	/**
+	 * Sets the environment to be used when no {@link IJavaProject} is available.
+	 * 
+	 * <p>The user has to make sure that all the required types are included either in the classpath or source paths. 
+	 * All the paths containing binary types must be included in the <code>classpathEntries</code> whereas all paths containing  
+	 * source types must be included in the <code>sourcepathEntries</code>.</p>
+	 * <p>All paths in the <code>classpathEntries</code> and <code>sourcepathEntries</code> are absolute paths.</p>
+	 * <p>If the source paths contain units using a specific encoding (other than the platform encoding), then the
+	 * given <code>encodings</code> must be set. When the <code>encodings</code> is set to non <code>null</code>, its length must
+	 * match the length of <code>sourcepathEntries</code> or an IllegalArgumentException will be thrown.</p>
+	 * <p>If <code>encodings</code> is not <code>null</code>, the given <code>sourcepathEntries</code> must not be <code>null</code>.</p>
+	 * 
+	 * @param classpathEntries the given classpath entries to be used to resolve bindings
+	 * @param sourcepathEntries the given sourcepath entries to be used to resolve bindings
+	 * @param encodings the encodings of the corresponding sourcepath entries or <code>null</code> if the platform encoding
+	 * can be used.
+	 * @param includeRunningVMBootclasspath <code>true</code> if the bootclasspath of the running VM must be prepended to the
+	 * given classpath and <code>false</code> if the bootclasspath of the running VM should be ignored.
+	 * @throws IllegalArgumentException if the size of the given encodings is not equals to the size of the given <code>
+	 * sourcepathEntries</code>
+	 * @since 3.6
+	 */
+	public void setEnvironment(String[] classpathEntries, String[] sourcepathEntries, String[] encodings, boolean includeRunningVMBootclasspath) {
+		this.classpaths = classpathEntries;
+		this.sourcepaths = sourcepathEntries;
+		this.sourcepathsEncodings = encodings;
+		if (encodings != null) {
+			if (sourcepathEntries == null || sourcepathEntries.length != encodings.length) {
+				throw new IllegalArgumentException(); 
+			}
+		}
+		this.bits |= CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH;
+	}
 	/**
 	 * Sets the compiler options to be used when parsing.
 	 * <p>
@@ -270,7 +343,7 @@ public class ASTParser {
 	 * to {@link JavaCore#getOptions()}. In either case, and especially
 	 * in the latter, the caller should carefully weight the consequences of
 	 * allowing compiler options to be defaulted as opposed to being
-	 * explicitly specified for the <code>ASTParser</code> instance.
+	 * explicitly specified for the {@link ASTParser} instance.
 	 * For instance, there is a compiler option called "Source Compatibility Mode"
 	 * which determines which JDK level the source code is expected to meet.
 	 * If you specify "1.4", then "assert" is treated as a keyword and disallowed
@@ -298,12 +371,12 @@ public class ASTParser {
 
 	/**
 	 * Requests that the compiler should provide binding information for
-     * the AST nodes it creates.
-     * <p>
-     * Default to <code>false</code> (no bindings).
-     * </p>
+	 * the AST nodes it creates.
 	 * <p>
-	 * If <code>setResolveBindings(true)</code>, the various names
+	 * Default to <code>false</code> (no bindings).
+	 * </p>
+	 * <p>
+	 * If {@link #setResolveBindings(boolean) setResolveBindings(true)}, the various names
 	 * and types appearing in the AST can be resolved to "bindings"
 	 * by calling the <code>resolveBinding</code> methods. These bindings
 	 * draw connections between the different parts of a program, and
@@ -318,10 +391,9 @@ public class ASTParser {
 	 * <code>resolveBinding</code> methods in any way; these methods return the
 	 * same binding as before the AST was modified (including modifications
 	 * that rearrange subtrees by reparenting nodes).
-	 * If <code>setResolveBindings(false)</code> (the default), the analysis
+	 * If {@link #setResolveBindings(boolean) setResolveBindings(false)}, (the default), the analysis
 	 * does not go beyond parsing and building the tree, and all
-	 * <code>resolveBinding</code> methods return <code>null</code> from the
-	 * outset.
+	 * <code>resolveBinding</code> methods return <code>null</code> from the outset.
 	 * </p>
 	 * <p>
 	 * When bindings are requested, instead of considering compilation units on disk only
@@ -329,36 +401,44 @@ public class ASTParser {
 	 * by this owner take precedence over the underlying compilation units when looking
 	 * up names and drawing the connections.
 	 * </p>
+	 * <p>Note that working copy owner are used only if the <code>org.eclipse.jdt.core</code>
+	 * bundle is initialized.</p>
 	 * <p>
-     * Binding information is obtained from the Java model.
-     * This means that the compilation unit must be located relative to the
-     * Java model. This happens automatically when the source code comes from
-     * either {@link #setSource(ICompilationUnit) setSource(ICompilationUnit)}
-     * or {@link #setSource(IClassFile) setSource(IClassFile)}.
-     * When source is supplied by {@link #setSource(char[]) setSource(char[])},
-     * the location must be extablished explicitly by calling
-     * {@link #setProject(IJavaProject)} and  {@link #setUnitName(String)}.
+	 * Binding information is obtained from the Java model.
+	 * This means that the compilation unit must be located relative to the
+	 * Java model. This happens automatically when the source code comes from
+	 * either {@link #setSource(ICompilationUnit) setSource(ICompilationUnit)}
+	 * or {@link #setSource(IClassFile) setSource(IClassFile)}.
+	 * When source is supplied by {@link #setSource(char[]) setSource(char[])},
+	 * the location must be established explicitly by setting an environment using
+	 * {@link #setProject(IJavaProject)} or {@link #setEnvironment(String[], String[], String[], boolean)} 
+	 * and a unit name {@link #setUnitName(String)}.
 	 * Note that the compiler options that affect doc comment checking may also
 	 * affect whether any bindings are resolved for nodes within doc comments.
 	 * </p>
 	 *
-	 * @param bindings <code>true</code> if bindings are wanted,
+	 * @param enabled <code>true</code> if bindings are wanted,
 	 *   and <code>false</code> if bindings are not of interest
 	 */
-	public void setResolveBindings(boolean bindings) {
-	  this.resolveBindings = bindings;
+	public void setResolveBindings(boolean enabled) {
+		if (enabled) {
+			this.bits |= CompilationUnitResolver.RESOLVE_BINDING;
+		} else {
+			this.bits &= ~CompilationUnitResolver.RESOLVE_BINDING;
+		}
 	}
 
 	/**
-     * Requests an abridged abstract syntax tree.
-     * By default, complete ASTs are returned.
-     * <p>
-     * When <code>true</code> the resulting AST does not have nodes for
-     * the entire compilation unit. Rather, the AST is only fleshed out
-     * for the node that include the given source position. This kind of limited
-     * AST is sufficient for certain purposes but totally unsuitable for others.
-     * In places where it can be used, the limited AST offers the advantage of
-     * being smaller and faster to construct.
+	 * Requests an abridged abstract syntax tree.
+	 * By default, complete ASTs are returned.
+	 * <p>
+	 * When the given <code>position</code> is a valid position within the source code of 
+	 * the compilation unit, the resulting AST does not have nodes for
+	 * the entire compilation unit. Rather, the AST is only fleshed out
+	 * for the node that include the given source position. This kind of limited
+	 * AST is sufficient for certain purposes but totally unsuitable for others.
+	 * In places where it can be used, the limited AST offers the advantage of
+	 * being smaller and faster to construct.
 	 * </p>
 	 * <p>
 	 * The AST will include nodes for all of the compilation unit's
@@ -375,7 +455,7 @@ public class ASTParser {
 	 * Field declarations are never abridged. Note that the AST for the body of
 	 * that one unabridged method (or initializer) is 100% complete; it has all
 	 * its statements, including any local or anonymous type declarations
-	 * embedded within them. When the the given position is not located within
+	 * embedded within them. When the given <code>position</code> is not located within
 	 * the source range of any body declaration of a top-level type, the AST
 	 * returned will be a skeleton that includes nodes for all and only the major
 	 * declarations; this kind of AST is still quite useful because it contains
@@ -383,16 +463,19 @@ public class ASTParser {
 	 * compilation unit.
 	 * </p>
 	 *
+	 * <p>This focal position is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 * 
 	 * @param position a position into the corresponding body declaration
 	 */
 	public void setFocalPosition(int position) {
-		this.partial = true;
+		this.bits |= CompilationUnitResolver.PARTIAL;
 		this.focalPointPosition = position;
 	}
 
 	/**
 	 * Sets the kind of constructs to be parsed from the source.
-     * Defaults to an entire compilation unit.
+	 * Defaults to an entire compilation unit.
 	 * <p>
 	 * When the parse is successful the result returned includes the ASTs for the
 	 * requested source:
@@ -426,7 +509,7 @@ public class ASTParser {
 	 * </ul>
 	 * The contrived nodes do not have source positions. Other aspects of the
 	 * {@link CompilationUnit CompilationUnit} node are unspecified, including
-	 * the exact arrangment of intervening nodes.
+	 * the exact arrangement of intervening nodes.
 	 * </p>
 	 * <p>
 	 * Lexical or syntax errors detected while parsing can result in
@@ -453,9 +536,12 @@ public class ASTParser {
 	 * </p>
 	 * <p>
 	 * Binding information is only computed when <code>kind</code> is
-     * <code>K_COMPILATION_UNIT</code>.
+	 * {@link #K_COMPILATION_UNIT}.
 	 * </p>
-	 *
+	 * 
+	 * <p>This kind is not used when the AST is built using
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 * 
 	 * @param kind the kind of construct to parse: one of
 	 * {@link #K_COMPILATION_UNIT},
 	 * {@link #K_CLASS_BODY_DECLARATIONS},
@@ -473,11 +559,21 @@ public class ASTParser {
 	}
 
 	/**
-     * Sets the source code to be parsed.
-     *
+	 * Sets the source code to be parsed.
+	 *
+	 * <p>This source is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 *
+	 * <p>If this method is used, the user needs to specify compiler options explicitly using
+	 * {@link #setCompilerOptions(Map)} as 1.5 code will not be properly parsed without setting
+	 * the appropriate values for the compiler options: {@link JavaCore#COMPILER_SOURCE},
+	 * {@link JavaCore#COMPILER_CODEGEN_TARGET_PLATFORM}, and {@link JavaCore#COMPILER_COMPLIANCE}.</p>
+	 * <p>Otherwise the default values for the compiler options will be used to parse the given source.</p>
+	 *
 	 * @param source the source string to be parsed,
-     * or <code>null</code> if none
-     */
+	 * or <code>null</code> if none
+	 * @see JavaCore#setComplianceOptions(String, Map)
+	 */
 	public void setSource(char[] source) {
 		this.rawSource = source;
 		// clear the type root
@@ -485,40 +581,52 @@ public class ASTParser {
 	}
 
 	/**
-     * Sets the source code to be parsed.
-     * This method automatically sets the project (and compiler
-     * options) based on the given compilation unit, in a manner
-     * equivalent to <code>setProject(source.getJavaProject())</code>
-     *
+	 * Sets the source code to be parsed.
+	 * 
+	 * <p>This method automatically sets the project (and compiler
+	 * options) based on the given compilation unit, in a manner
+	 * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.</p>
+	 *
+	 * <p>This source is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 * 
 	 * @param source the Java model compilation unit whose source code
-     * is to be parsed, or <code>null</code> if none
-      */
+	 * is to be parsed, or <code>null</code> if none
+	 */
 	public void setSource(ICompilationUnit source) {
 		setSource((ITypeRoot)source);
 	}
 
 	/**
-     * Sets the source code to be parsed.
-     * <p>This method automatically sets the project (and compiler
-     * options) based on the given compilation unit, in a manner
-     * equivalent to <code>setProject(source.getJavaProject())</code>.</p>
-     * <p>If the given class file has  no source attachment, the creation of the
-     * ast will fail with an IllegalStateException.</p>
-     *
+	 * Sets the source code to be parsed.
+	 *
+	 * <p>This method automatically sets the project (and compiler
+	 * options) based on the given compilation unit, in a manner
+	 * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.</p>
+	 * <p>If the given class file has  no source attachment, the creation of the
+	 * ast will fail with an {@link IllegalStateException}.</p>
+	 *
+	 * <p>This source is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 * 
 	 * @param source the Java model class file whose corresponding source code
-     * is to be parsed, or <code>null</code> if none
-     */
+	 * is to be parsed, or <code>null</code> if none
+	 */
 	public void setSource(IClassFile source) {
 		setSource((ITypeRoot)source);
 	}
 
 	/**
 	 * Sets the source code to be parsed.
+	 *
 	 * <p>This method automatically sets the project (and compiler
 	 * options) based on the given compilation unit of class file, in a manner
-	 * equivalent to <code>setProject(source.getJavaProject())</code>.</p>
+	 * equivalent to {@link #setProject(IJavaProject) setProject(source.getJavaProject())}.</p>
 	 * <p>If the source is a class file without source attachment, the creation of the
-	 * ast will fail with an IllegalStateException.</p>
+	 * ast will fail with an {@link IllegalStateException}.</p>
+	 *
+	 * <p>This source is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
 	 *
 	 * @param source the Java model compilation unit or class file whose corresponding source code
 	 * is to be parsed, or <code>null</code> if none
@@ -541,6 +649,9 @@ public class ASTParser {
      * By default, the entire source string will be parsed
      * (<code>offset</code> 0 and <code>length</code> -1).
      *
+	 * <p>This range is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+     *
      * @param offset the index of the first character to parse
      * @param length the number of characters to parse, or -1 if
      * the remainder of the source string is to be parsed
@@ -567,7 +678,11 @@ public class ASTParser {
 	 * @since 3.2
 	 */
 	public void setStatementsRecovery(boolean enabled) {
-		this.statementsRecovery = enabled;
+		if (enabled) {
+			this.bits |= CompilationUnitResolver.STATEMENT_RECOVERY;
+		} else {
+			this.bits &= ~CompilationUnitResolver.STATEMENT_RECOVERY;
+		}
 	}
 	
 	/**
@@ -576,13 +691,16 @@ public class ASTParser {
 	 * <p>When ignore method bodies is enabled, all method bodies are discarded.
 	 * This has no impact on the binding resolution.</p>
 	 *
-	 * <p>This setting is not used if the kind used in {@link #setKind(int)} is either 
+	 * <p>This setting is not used when the kind used in {@link #setKind(int)} is either 
 	 * {@link #K_EXPRESSION} or {@link #K_STATEMENTS}.</p>
-	 *
 	 * @since 3.5.2
 	 */
 	public void setIgnoreMethodBodies(boolean enabled) {
-		this.ignoreMethodBodies = true;
+		if (enabled) {
+			this.bits |= CompilationUnitResolver.IGNORE_METHOD_BODIES;
+		} else {
+			this.bits &= ~CompilationUnitResolver.IGNORE_METHOD_BODIES;
+		}
 	}
 
     /**
@@ -601,10 +719,12 @@ public class ASTParser {
 	}
 
 	/**
-     * Sets the name of the compilation unit that would hypothetically contains
-     * the source string. This is used in conjunction with {@link #setSource(char[])}
-     * and {@link #setProject(IJavaProject) } to locate the compilation unit relative to a Java project.
-     * Defaults to none (<code>null</code>).
+	 * Sets the name of the compilation unit that would hypothetically contains the
+	 * source string.
+	 * 
+	 *  <p>This is used in conjunction with {@link #setSource(char[])}
+	 * and {@link #setProject(IJavaProject)} to locate the compilation unit relative to a Java project.
+	 * Defaults to none (<code>null</code>).</p>
 	 * <p>
 	 * The name of the compilation unit must be supplied for resolving bindings.
 	 * This name should be suffixed by a dot ('.') followed by one of the
@@ -616,29 +736,33 @@ public class ASTParser {
 	 * of the compilation unit must be "/P/Foo.java".
 	 * If the source declares a public class name "Bar" in a package "p1.p2" in a project "P" in a source folder "src",
 	 * the name of the compilation unit must be "/P/src/p1/p2/Bar.java".</p>
-     *
+	 *
+	 * <p>This unit name is not used when the AST is built using 
+	 * {@link #createASTs(ICompilationUnit[], String[], ASTRequestor, IProgressMonitor)}.</p>
+	 *
 	 * @param unitName the name of the compilation unit that would contain the source
 	 *    string, or <code>null</code> if none
-     */
+	 */
 	public void setUnitName(String unitName) {
 		this.unitName = unitName;
 	}
 
 	/**
 	 * Sets the Java project used when resolving bindings.
-	 * This method automatically sets the compiler
-	 * options based on the given project:
+	 * 
+	 * <p>This method automatically sets the compiler
+	 * options based on the given project:</p>
 	 * <pre>
 	 * setCompilerOptions(project.getOptions(true));
 	 * </pre>
-	 * See {@link #setCompilerOptions(Map)} for a discussion of
+	 * <p>See {@link #setCompilerOptions(Map)} for a discussion of
 	 * the pros and cons of using these options vs specifying
-	 * compiler options explicitly.
-	 * This setting is used in conjunction with <code>setSource(char[])</code>.
+	 * compiler options explicitly.</p>
+	 * <p>This setting is used in conjunction with {@link #setSource(char[])}.
 	 * For the purposes of resolving bindings, types declared in the
 	 * source string will hide types by the same name available
-	 * through the classpath of the given project.
-	 * Defaults to none (<code>null</code>).
+	 * through the classpath of the given project.</p>
+	 * <p>Defaults to none (<code>null</code>).</p>
 	 *
 	 * @param project the Java project used to resolve names, or
 	 *    <code>null</code> if none
@@ -653,61 +777,60 @@ public class ASTParser {
 	}
 
 	/**
-     * Creates an abstract syntax tree.
-     * <p>
-     * A successful call to this method returns all settings to their
-     * default values so the object is ready to be reused.
-     * </p>
-     *
-	 * @param monitor the progress monitor used to report progress and request cancelation,
+	 * Creates an abstract syntax tree.
+	 * <p>
+	 * A successful call to this method returns all settings to their
+	 * default values so the object is ready to be reused.
+	 * </p>
+	 *
+	 * @param monitor the progress monitor used to report progress and request cancellation,
 	 *   or <code>null</code> if none
 	 * @return an AST node whose type depends on the kind of parse
 	 *  requested, with a fallback to a <code>CompilationUnit</code>
 	 *  in the case of severe parsing errors
 	 * @exception IllegalStateException if the settings provided
 	 * are insufficient, contradictory, or otherwise unsupported
-     */
+	 */
 	public ASTNode createAST(IProgressMonitor monitor) {
-	   ASTNode result = null;
-	   if (monitor != null) monitor.beginTask("", 1); //$NON-NLS-1$
+		ASTNode result = null;
+		if (monitor != null) monitor.beginTask("", 1); //$NON-NLS-1$
 		try {
 			if (this.rawSource == null && this.typeRoot == null) {
-		   	  throw new IllegalStateException("source not specified"); //$NON-NLS-1$
-		   }
-	   		result = internalCreateAST(monitor);
+				throw new IllegalStateException("source not specified"); //$NON-NLS-1$
+			}
+			result = internalCreateAST(monitor);
 		} finally {
-	   	   // re-init defaults to allow reuse (and avoid leaking)
-	   	   initializeDefaults();
-	   	   if (monitor != null) monitor.done();
+			// reset to defaults to allow reuse (and avoid leaking)
+			initializeDefaults();
+			if (monitor != null) monitor.done();
 		}
-   	   return result;
+		return result;
 	}
 
 	/**
-     * Creates ASTs for a batch of compilation units.
-     * When bindings are being resolved, processing a
-     * batch of compilation units is more efficient because much
-     * of the work involved in resolving bindings can be shared.
-     * <p>
-     * When bindings are being resolved, all compilation units must
-     * come from the same Java project, which must be set beforehand
-     * with <code>setProject</code>.
-     * The compilation units are processed one at a time in no
-     * specified order. For each of the compilation units in turn,
+	 * Creates ASTs for a batch of compilation units.
+	 * <p>When bindings are being resolved, processing a
+	 * batch of compilation units is more efficient because much
+	 * of the work involved in resolving bindings can be shared.</p>
+	 * <p>
+	 * When bindings are being resolved, all compilation units must
+	 * come from the same Java project, which must be set beforehand
+	 * with {@link #setProject(IJavaProject) setProject}.</p>
+	 * <p>The compilation units are processed one at a time in no
+	 * specified order. For each of the compilation units in turn,</p>
 	 * <ul>
-	 * <li><code>ASTParser.createAST</code> is called to parse it
+	 * <li>{@link #createAST(IProgressMonitor) ASTParser.createAST} is called to parse it
 	 * and create a corresponding AST. The calls to
-	 * <code>ASTParser.createAST</code> all employ the same settings.</li>
-	 * <li><code>ASTRequestor.acceptAST</code> is called passing
-	 * the compilation unit and the corresponding AST to
-	 * <code>requestor</code>.
+	 * {@link #createAST(IProgressMonitor) ASTParser.createAST} all employ the same settings.</li>
+	 * <li>{@link ASTRequestor#acceptAST(ICompilationUnit, CompilationUnit) ASTRequestor.acceptAST}
+	 * is called passing the compilation unit and the corresponding AST to <code>requestor</code>.
 	 * </li>
 	 * </ul>
-     * Note only ASTs from the given compilation units are reported
-     * to the requestor. If additional compilation units are required to
-     * resolve the original ones, the corresponding ASTs are <b>not</b>
-     * reported to the requestor.
-     * </p>
+	 * Note only ASTs from the given compilation units are reported
+	 * to the requestor. If additional compilation units are required to
+	 * resolve the original ones, the corresponding ASTs are <b>not</b>
+	 * reported to the requestor.
+	 * </p>
 	 * <p>
 	 * Note also the following parser parameters are used, regardless of what
 	 * may have been specified:
@@ -717,64 +840,166 @@ public class ASTParser {
 	 * <li>The {@linkplain #setFocalPosition(int) focal position} is not set</li>
 	 * </ul>
 	 * </p>
-     * <p>
-     * The <code>bindingKeys</code> parameter specifies bindings keys
-     * ({@link IBinding#getKey()}) that are to be looked up. These keys may
-     * be for elements either inside or outside the set of compilation
-     * units being processed. When bindings are being resolved,
-     * the keys and corresponding bindings (or <code>null</code> if none) are
-     * passed to <code>ASTRequestor.acceptBinding</code>. Note that binding keys
-     * for elements outside the set of compilation units being processed are looked up
-     * after all <code>ASTRequestor.acceptAST</code> callbacks have been made.
-     * Binding keys for elements inside the set of compilation units being processed
-     * are looked up and reported right after the corresponding
-     * <code>ASTRequestor.acceptAST</code> callback has been made.
-     * No <code>ASTRequestor.acceptBinding</code> callbacks are made unless
-     * bindings are being resolved.
-     * </p>
-     * <p>
-     * A successful call to this method returns all settings to their
-     * default values so the object is ready to be reused.
-     * </p>
-     *
-     * @param compilationUnits the compilation units to create ASTs for
-     * @param bindingKeys the binding keys to create bindings for
-     * @param requestor the AST requestor that collects abstract syntax trees and bindings
+	 * <p>
+	 * The <code>bindingKeys</code> parameter specifies bindings keys
+	 * ({@link IBinding#getKey()}) that are to be looked up. These keys may
+	 * be for elements either inside or outside the set of compilation
+	 * units being processed. When bindings are being resolved,
+	 * the keys and corresponding bindings (or <code>null</code> if none) are
+	 * passed to {@link ASTRequestor#acceptBinding(String, IBinding) ASTRequestor.acceptBinding}.
+	 * Note that binding keys for elements outside the set of compilation units being processed
+	 * are looked up after all {@link ASTRequestor#acceptAST(ICompilationUnit, CompilationUnit) ASTRequestor.acceptAST}
+	 * callbacks have been made.
+	 * Binding keys for elements inside the set of compilation units being processed
+	 * are looked up and reported right after the corresponding
+	 * {@link ASTRequestor#acceptAST(ICompilationUnit, CompilationUnit) ASTRequestor.acceptAST} callback has been made.
+	 * No {@link ASTRequestor#acceptBinding(String, IBinding) ASTRequestor.acceptBinding} callbacks are made unless
+	 * bindings are being resolved.
+	 * </p>
+	 * <p>
+	 * A successful call to this method returns all settings to their
+	 * default values so the object is ready to be reused.
+	 * </p>
+	 *
+	 * @param compilationUnits the compilation units to create ASTs for
+	 * @param bindingKeys the binding keys to create bindings for
+	 * @param requestor the AST requestor that collects abstract syntax trees and bindings
 	 * @param monitor the progress monitor used to report progress and request cancellation,
 	 *   or <code>null</code> if none
 	 * @exception IllegalStateException if the settings provided
 	 * are insufficient, contradictory, or otherwise unsupported
 	 * @since 3.1
-     */
+	 */
 	public void createASTs(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor requestor, IProgressMonitor monitor) {
 		try {
 			int flags = 0;
-			if (this.statementsRecovery) flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
-			if (this.ignoreMethodBodies) flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
-			if (this.resolveBindings) {
+			if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
+				flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
+			}
+			if ((this.bits & CompilationUnitResolver.IGNORE_METHOD_BODIES) != 0) {
+				flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+			}
+			if ((this.bits & CompilationUnitResolver.RESOLVE_BINDING) != 0) {
 				if (this.project == null)
 					throw new IllegalStateException("project not specified"); //$NON-NLS-1$
-				if (this.bindingsRecovery) flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+				if ((this.bits & CompilationUnitResolver.BINDING_RECOVERY) != 0) {
+					flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+				}
 				CompilationUnitResolver.resolve(compilationUnits, bindingKeys, requestor, this.apiLevel, this.compilerOptions, this.project, this.workingCopyOwner, flags, monitor);
 			} else {
 				CompilationUnitResolver.parse(compilationUnits, requestor, this.apiLevel, this.compilerOptions, flags, monitor);
 			}
 		} finally {
-			// re-init defaults to allow reuse (and avoid leaking)
+			// reset to defaults to allow reuse (and avoid leaking)
 			initializeDefaults();
 		}
 	}
 
 	/**
-	 * Creates bindings for a batch of Java elements. These elements are either
-	 * enclosed in {@link ICompilationUnit}s or in {@link IClassFile}s.
+	 * Creates ASTs for a batch of compilation units.
+	 * When bindings are being resolved, processing a
+	 * batch of compilation units is more efficient because much
+	 * of the work involved in resolving bindings can be shared.
+	 * <p>
+	 * When bindings are being resolved, all compilation units are resolved using
+	 * the same environment, which must be set beforehand
+	 * with {@link #setEnvironment(String[], String[], String[], boolean) setEnvironment}.
+	 * The compilation units are processed one at a time in no
+	 * specified order. For each of the compilation units in turn,
+	 * <ul>
+	 * <li>{@link ASTParser#createAST(IProgressMonitor) ASTParser.createAST} is called to parse it
+	 * and create a corresponding AST. The calls to
+	 * {@link ASTParser#createAST(IProgressMonitor) ASTParser.createAST} all employ the same settings.</li>
+	 * <li>{@link FileASTRequestor#acceptAST(String, CompilationUnit) FileASTRequestor.acceptAST} is called passing
+	 * the compilation unit path and the corresponding AST to <code>requestor</code>. The compilation unit path is the same
+	 * path that is passed into the given <code>sourceFilePaths</code> parameter.
+	 * </li>
+	 * </ul>
+	 * Note only ASTs from the given compilation units are reported
+	 * to the requestor. If additional compilation units are required to
+	 * resolve the original ones, the corresponding ASTs are <b>not</b>
+	 * reported to the requestor.
+	 * </p>
+	 * <p>
+	 * Note also the following parser parameters are used, regardless of what
+	 * may have been specified:
+	 * <ul>
+	 * <li>The {@linkplain #setKind(int) parser kind} is <code>K_COMPILATION_UNIT</code></li>
+	 * <li>The {@linkplain #setSourceRange(int,int) source range} is <code>(0, -1)</code></li>
+	 * <li>The {@linkplain #setFocalPosition(int) focal position} is not set</li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * The <code>bindingKeys</code> parameter specifies bindings keys
+	 * ({@link IBinding#getKey()}) that are to be looked up. These keys may
+	 * be for elements either inside or outside the set of compilation
+	 * units being processed. When bindings are being resolved,
+	 * the keys and corresponding bindings (or <code>null</code> if none) are
+	 * passed to {@link FileASTRequestor#acceptBinding(String, IBinding) FileASTRequestor.acceptBinding}. Note that binding keys
+	 * for elements outside the set of compilation units being processed are looked up
+	 * after all {@link FileASTRequestor#acceptAST(String, CompilationUnit) ASTRequestor.acceptAST}
+	 * callbacks have been made.
+	 * Binding keys for elements inside the set of compilation units being processed
+	 * are looked up and reported right after the corresponding
+	 * {@link FileASTRequestor#acceptAST(String, CompilationUnit) FileASTRequestor.acceptAST} callback has been made.
+	 * No {@link FileASTRequestor#acceptBinding(String, IBinding) FileASTRequestor.acceptBinding} callbacks are made unless
+	 * bindings are being resolved.
+	 * </p>
+	 * <p>
+	 * A successful call to this method returns all settings to their
+	 * default values so the object is ready to be reused.
+	 * </p>
+	 * <p>The given <code>encodings</code> are used to properly parse the given source units. If the platform encoding is sufficient,
+	 * then the given encodings can be set to <code>null</code>.</p>
+	 *
+	 * @param sourceFilePaths the compilation units to create ASTs for
+	 * @param encodings the given encoding for the source units
+	 * @param bindingKeys the binding keys to create bindings for
+	 * @param requestor the AST requestor that collects abstract syntax trees and bindings
+	 * @param monitor the progress monitor used to report progress and request cancellation,
+	 *   or <code>null</code> if none
+	 * @exception IllegalStateException if the settings provided
+	 * are insufficient, contradictory, or otherwise unsupported
+	 * @since 3.6
+	 */
+	public void createASTs(String[] sourceFilePaths, String[] encodings, String[] bindingKeys,
+			FileASTRequestor requestor, IProgressMonitor monitor) {
+		try {
+			int flags = 0;
+			if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
+				flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
+			}
+			if ((this.bits & CompilationUnitResolver.IGNORE_METHOD_BODIES) != 0) {
+				flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+			}
+			if ((this.bits & CompilationUnitResolver.RESOLVE_BINDING) != 0) {
+				if (this.classpaths == null && this.sourcepaths == null && ((this.bits & CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH) == 0)) {
+					throw new IllegalStateException("no environment is specified"); //$NON-NLS-1$
+				}
+				if ((this.bits & CompilationUnitResolver.BINDING_RECOVERY) != 0) {
+					flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+				}
+				CompilationUnitResolver.resolve(sourceFilePaths, encodings, bindingKeys, requestor, this.apiLevel, this.compilerOptions, getClasspath(), flags, monitor);
+			} else {
+				CompilationUnitResolver.parse(sourceFilePaths, encodings, requestor, this.apiLevel, this.compilerOptions, flags, monitor);
+			}
+		} finally {
+			// reset to defaults to allow reuse (and avoid leaking)
+			initializeDefaults();
+		}
+	}
+	/**
+	 * Creates bindings for a batch of Java elements.
+	 * 
+	 * <p>These elements are either
+	 * enclosed in {@link ICompilationUnit ICompilationUnits} or in {@link IClassFile IClassFiles}.</p>
 	 * <p>
 	 * All enclosing compilation units and class files must
 	 * come from the same Java project, which must be set beforehand
-	 * with <code>setProject</code>.
+	 * with {@link #setProject(IJavaProject) setProject}.
 	 * </p>
 	 * <p>
-	 * All elements must exist. If one doesn't exist, an <code>IllegalStateException</code>
+	 * All elements must exist. If one doesn't exist, an {@link IllegalStateException}
 	 * is thrown.
 	 * </p>
 	 * <p>
@@ -807,20 +1032,26 @@ public class ASTParser {
 	public IBinding[] createBindings(IJavaElement[] elements, IProgressMonitor monitor) {
 		try {
 			if (this.project == null)
-				throw new IllegalStateException("project not specified"); //$NON-NLS-1$
+				throw new IllegalStateException("project or classpath not specified"); //$NON-NLS-1$
 			int flags = 0;
-			if (this.statementsRecovery) flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
-			if (this.bindingsRecovery)  flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
-			if (this.ignoreMethodBodies) flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+			if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
+				flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
+			}
+			if ((this.bits & CompilationUnitResolver.BINDING_RECOVERY) != 0) {
+				flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+			}
+			if ((this.bits & CompilationUnitResolver.IGNORE_METHOD_BODIES) != 0) {
+				flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+			}
 			return CompilationUnitResolver.resolve(elements, this.apiLevel, this.compilerOptions, this.project, this.workingCopyOwner, flags, monitor);
 		} finally {
-			// re-init defaults to allow reuse (and avoid leaking)
+			// reset to defaults to allow reuse (and avoid leaking)
 			initializeDefaults();
 		}
 	}
 
 	private ASTNode internalCreateAST(IProgressMonitor monitor) {
-		boolean needToResolveBindings = this.resolveBindings;
+		boolean needToResolveBindings = (this.bits & CompilationUnitResolver.RESOLVE_BINDING) != 0;
 		switch(this.astKind) {
 			case K_CLASS_BODY_DECLARATIONS :
 			case K_EXPRESSION :
@@ -912,25 +1143,39 @@ public class ASTParser {
 							throw new IllegalStateException(String.valueOf(stringWriter.getBuffer()));
 						}
 					} else if (this.rawSource != null) {
-						needToResolveBindings = this.resolveBindings && this.unitName != null && this.project != null && this.compilerOptions != null;
+						needToResolveBindings = 
+							((this.bits & CompilationUnitResolver.RESOLVE_BINDING) != 0)
+							&& this.unitName != null
+							&& (this.project != null
+									|| this.classpaths != null
+									|| this.sourcepaths != null
+									|| ((this.bits & CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH) != 0))
+							&& this.compilerOptions != null;
 						sourceUnit = new BasicCompilationUnit(this.rawSource, null, this.unitName == null ? "" : this.unitName, this.project); //$NON-NLS-1$
 					} else {
 						throw new IllegalStateException();
 					}
-					if (this.partial) {
+					if ((this.bits & CompilationUnitResolver.PARTIAL) != 0) {
 						searcher = new NodeSearcher(this.focalPointPosition);
 					}
 					int flags = 0;
-					if (this.statementsRecovery) flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
-					if (searcher == null && this.ignoreMethodBodies) flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+					if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
+						flags |= ICompilationUnit.ENABLE_STATEMENTS_RECOVERY;
+					}
+					if (searcher == null && ((this.bits & CompilationUnitResolver.IGNORE_METHOD_BODIES) != 0)) {
+						flags |= ICompilationUnit.IGNORE_METHOD_BODIES;
+					}
 					if (needToResolveBindings) {
-						if (this.bindingsRecovery) flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+						if ((this.bits & CompilationUnitResolver.BINDING_RECOVERY) != 0) {
+							flags |= ICompilationUnit.ENABLE_BINDINGS_RECOVERY;
+						}
 						try {
 							// parse and resolve
 							compilationUnitDeclaration =
 								CompilationUnitResolver.resolve(
 									sourceUnit,
 									this.project,
+									getClasspath(),
 									searcher,
 									this.compilerOptions,
 									this.workingCopyOwner,
@@ -962,11 +1207,13 @@ public class ASTParser {
 						wcOwner,
 						needToResolveBindings ? new DefaultBindingResolver.BindingTables() : null,
 						flags,
-						monitor);
+						monitor,
+						this.project != null);
 					result.setTypeRoot(this.typeRoot);
 					return result;
 				} finally {
-					if (compilationUnitDeclaration != null && this.resolveBindings) {
+					if (compilationUnitDeclaration != null
+							&& ((this.bits & CompilationUnitResolver.RESOLVE_BINDING) != 0)) {
 						compilationUnitDeclaration.cleanUp();
 					}
 				}
@@ -1053,18 +1300,24 @@ public class ASTParser {
 		AST ast = AST.newAST(this.apiLevel);
 		ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
 		ast.setBindingResolver(new BindingResolver());
-		if (this.statementsRecovery) {
+		if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
 			ast.setFlag(ICompilationUnit.ENABLE_STATEMENTS_RECOVERY);
 		}
 		converter.setAST(ast);
-		CodeSnippetParsingUtil codeSnippetParsingUtil = new CodeSnippetParsingUtil(this.ignoreMethodBodies);
+		CodeSnippetParsingUtil codeSnippetParsingUtil = new CodeSnippetParsingUtil((this.bits & CompilationUnitResolver.IGNORE_METHOD_BODIES) != 0);
 		CompilationUnit compilationUnit = ast.newCompilationUnit();
 		if (this.sourceLength == -1) {
 			this.sourceLength = this.rawSource.length;
 		}
 		switch(this.astKind) {
 			case K_STATEMENTS :
-				ConstructorDeclaration constructorDeclaration = codeSnippetParsingUtil.parseStatements(this.rawSource, this.sourceOffset, this.sourceLength, this.compilerOptions, true, this.statementsRecovery);
+				ConstructorDeclaration constructorDeclaration = codeSnippetParsingUtil.parseStatements(
+						this.rawSource,
+						this.sourceOffset,
+						this.sourceLength,
+						this.compilerOptions,
+						true,
+						(this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0);
 				RecoveryScannerData data = constructorDeclaration.compilationResult.recoveryScannerData;
 				if(data != null) {
 					Scanner scanner = converter.scanner;
@@ -1124,7 +1377,14 @@ public class ASTParser {
 					return compilationUnit;
 				}
 			case K_CLASS_BODY_DECLARATIONS :
-				final org.eclipse.jdt.internal.compiler.ast.ASTNode[] nodes = codeSnippetParsingUtil.parseClassBodyDeclarations(this.rawSource, this.sourceOffset, this.sourceLength, this.compilerOptions, true, this.statementsRecovery);
+				final org.eclipse.jdt.internal.compiler.ast.ASTNode[] nodes =
+					codeSnippetParsingUtil.parseClassBodyDeclarations(
+							this.rawSource,
+							this.sourceOffset,
+							this.sourceLength,
+							this.compilerOptions,
+							true,
+							(this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0);
 				recordedParsingInformation = codeSnippetParsingUtil.recordedParsingInformation;
 				comments = recordedParsingInformation.commentPositions;
 				if (comments != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTRequestor.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTRequestor.java
index 1b35622..5dbb1d0 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTRequestor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTRequestor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,18 +14,17 @@ import org.eclipse.jdt.core.ICompilationUnit;
 
 /**
  * An AST requestor handles ASTs for compilation units passed to
- * <code>ASTParser.createASTs</code>.
+ * {@link ASTParser#createASTs(ICompilationUnit[], String[], ASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
  * <p>
- * <code>ASTRequestor.acceptAST</code> is called for each of the
- * compilation units passed to <code>ASTParser.createASTs</code>.
+ * {@link #acceptAST(ICompilationUnit, CompilationUnit) ASTRequestor.acceptAST} is called for each of the
+ * compilation units passed to {@link ASTParser#createASTs(ICompilationUnit[], String[], ASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
  * After all the compilation units have been processed,
- * <code>ASTRequestor.acceptBindings</code> is called for each
- * of the binding keys passed to <code>ASTParser.createASTs</code>.
+ * {@link #acceptBinding(String, IBinding) ASTRequestor.acceptBindings} is called for each
+ * of the binding keys passed to {@link ASTParser#createASTs(ICompilationUnit[], String[], ASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
  * </p>
  * <p>
  * This class is intended to be subclassed by clients.
- * AST requestors are serially reusable, but neither reentrant nor
- * thread-safe.
+ * AST requestors are serially reusable, but neither reentrant nor thread-safe.
  * </p>
  *
  * @see ASTParser#createASTs(ICompilationUnit[], String[], ASTRequestor, org.eclipse.core.runtime.IProgressMonitor)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
index 043aa8c..0f20578 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,7 +152,6 @@ public abstract class ASTVisitor {
 
 	/**
 	 * Visits the given AST node prior to the type-specific visit (before <code>visit</code>).
-	 * This API is still under discussion, see https://bugs.eclipse.org/53024 .
 	 * <p>
 	 * The default implementation calls {@link #preVisit(ASTNode)} and then
 	 * returns true. Subclasses may reimplement.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CatchClause.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CatchClause.java
index 60f9d2f..9c7dafa 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CatchClause.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CatchClause.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import java.util.List;
  *    <b>catch</b> <b>(</b> FormalParameter <b>)</b> Block
  * </pre>
  *
+ * <p>The FormalParameter is represented by a {@link SingleVariableDeclaration}.</p>
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
index ec7a585..08c3721 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -902,7 +902,7 @@ public class CompilationUnit extends ASTNode {
 	 * on record. Subsequence modifications made to the AST
 	 * are added to the ones already on record. If this method
 	 * is called again later, the resulting text edit object will
-	 * accurately reflect the net cumulative affect of all those
+	 * accurately reflect the net cumulative effect of all those
 	 * changes.
 	 * </p>
 	 *
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index 8e00cef..e56ef57 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,12 @@
  *******************************************************************************/
 package org.eclipse.jdt.core.dom;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -32,6 +35,7 @@ import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
 import org.eclipse.jdt.internal.compiler.IProblemFactory;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.jdt.internal.compiler.batch.FileSystem.Classpath;
 import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
 import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
 import org.eclipse.jdt.internal.compiler.env.ISourceType;
@@ -47,9 +51,11 @@ import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt;
 import org.eclipse.jdt.internal.compiler.util.Messages;
+import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.jdt.internal.core.BinaryMember;
 import org.eclipse.jdt.internal.core.CancelableNameEnvironment;
 import org.eclipse.jdt.internal.core.CancelableProblemFactory;
+import org.eclipse.jdt.internal.core.INameEnviromentWithProgress;
 import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jdt.internal.core.NameLookup;
 import org.eclipse.jdt.internal.core.SourceRefElement;
@@ -59,6 +65,12 @@ import org.eclipse.jdt.internal.core.util.CommentRecorderParser;
 import org.eclipse.jdt.internal.core.util.DOMFinder;
 
 class CompilationUnitResolver extends Compiler {
+	public static final int RESOLVE_BINDING = 0x1;
+	public static final int PARTIAL = 0x2;
+	public static final int STATEMENT_RECOVERY = 0x4;
+	public static final int IGNORE_METHOD_BODIES = 0x8;
+	public static final int BINDING_RECOVERY = 0x10;
+	public static final int INCLUDE_RUNNING_VM_BOOTCLASSPATH = 0x20;
 
 	/* A list of int */
 	static class IntArrayList {
@@ -74,7 +86,7 @@ class CompilationUnitResolver extends Compiler {
 
 	/*
 	 * The sources that were requested.
-	 * Map from file name (char[]) to ICompilationUnit.
+	 * Map from file name (char[]) to org.eclipse.jdt.internal.compiler.env.ICompilationUnit.
 	 */
 	HashtableOfObject requestedSources;
 
@@ -89,6 +101,11 @@ class CompilationUnitResolver extends Compiler {
 	boolean hasCompilationAborted;
 
 	private IProgressMonitor monitor;
+	
+	/**
+	 * Set to <code>true</code> if the receiver was initialized using a java project name environment
+	 */
+	boolean fromJavaProject;
 
 	/**
 	 * Answer a new CompilationUnitVisitor using the given name environment and compiler options.
@@ -131,11 +148,13 @@ class CompilationUnitResolver extends Compiler {
 		CompilerOptions compilerOptions,
 		ICompilerRequestor requestor,
 		IProblemFactory problemFactory,
-		IProgressMonitor monitor) {
+		IProgressMonitor monitor,
+		boolean fromJavaProject) {
 
 		super(environment, policy, compilerOptions, requestor, problemFactory);
 		this.hasCompilationAborted = false;
 		this.monitor =monitor;
+		this.fromJavaProject = fromJavaProject;
 	}
 
 	/*
@@ -147,6 +166,10 @@ class CompilationUnitResolver extends Compiler {
 		SourceTypeElementInfo sourceType = (SourceTypeElementInfo) sourceTypes[0];
 		accept((org.eclipse.jdt.internal.compiler.env.ICompilationUnit) sourceType.getHandle().getCompilationUnit(), accessRestriction);
 	}
+	
+	public synchronized void accept(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
+		super.accept(sourceUnit, accessRestriction);
+	}
 
 	/**
 	 * Add the initial set of compilation units into the loop
@@ -234,18 +257,28 @@ class CompilationUnitResolver extends Compiler {
 		BindingKeyResolver keyResolver = new BindingKeyResolver(key, this, this.lookupEnvironment);
 		Binding compilerBinding = keyResolver.getCompilerBinding();
 		if (compilerBinding == null) return null;
-		DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null/*no owner*/, this.bindingTables, false);
+		DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null/*no owner*/, this.bindingTables, false, this.fromJavaProject);
 		return resolver.getBinding(compilerBinding);
 	}
 
-	public static CompilationUnit convert(CompilationUnitDeclaration compilationUnitDeclaration, char[] source, int apiLevel, Map options, boolean needToResolveBindings, WorkingCopyOwner owner, DefaultBindingResolver.BindingTables bindingTables, int flags, IProgressMonitor monitor) {
+	public static CompilationUnit convert(
+			CompilationUnitDeclaration compilationUnitDeclaration,
+			char[] source,
+			int apiLevel,
+			Map options,
+			boolean needToResolveBindings,
+			WorkingCopyOwner owner,
+			DefaultBindingResolver.BindingTables bindingTables,
+			int flags,
+			IProgressMonitor monitor,
+			boolean fromJavaProject) {
 		BindingResolver resolver = null;
 		AST ast = AST.newAST(apiLevel);
 		ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
 		CompilationUnit compilationUnit = null;
 		ASTConverter converter = new ASTConverter(options, needToResolveBindings, monitor);
 		if (needToResolveBindings) {
-			resolver = new DefaultBindingResolver(compilationUnitDeclaration.scope, owner, bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0);
+			resolver = new DefaultBindingResolver(compilationUnitDeclaration.scope, owner, bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, fromJavaProject);
 			ast.setFlag(flags | AST.RESOLVED_BINDINGS);
 		} else {
 			resolver = new BindingResolver();
@@ -360,12 +393,13 @@ class CompilationUnitResolver extends Compiler {
 				//real parse of the method....
 				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = compilationUnitDeclaration.types;
 				if (types != null) {
-					for (int j = 0, typeLength = types.length; j < typeLength; j++)
+					for (int j = 0, typeLength = types.length; j < typeLength; j++) {
 						types[j].parseMethods(parser, compilationUnitDeclaration);
+					}
 				}
 
 				// convert AST
-				CompilationUnit node = convert(compilationUnitDeclaration, parser.scanner.getSource(), apiLevel, options, false/*don't resolve binding*/, null/*no owner needed*/, null/*no binding table needed*/, flags /* flags */, monitor);
+				CompilationUnit node = convert(compilationUnitDeclaration, parser.scanner.getSource(), apiLevel, options, false/*don't resolve binding*/, null/*no owner needed*/, null/*no binding table needed*/, flags /* flags */, monitor, true);
 				node.setTypeRoot(compilationUnits[i]);
 
 				// accept AST
@@ -377,7 +411,71 @@ class CompilationUnitResolver extends Compiler {
 			if (monitor != null) monitor.done();
 		}
 	}
+	public static void parse(
+			String[] sourceUnits,
+			String[] encodings,
+			FileASTRequestor astRequestor,
+			int apiLevel,
+			Map options,
+			int flags,
+			IProgressMonitor monitor) {
+		try {
+			CompilerOptions compilerOptions = new CompilerOptions(options);
+			compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
+			Parser parser = new CommentRecorderParser(
+				new ProblemReporter(
+						DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+						compilerOptions,
+						new DefaultProblemFactory()),
+				false);
+			int unitLength = sourceUnits.length;
+			if (monitor != null) monitor.beginTask("", unitLength); //$NON-NLS-1$
+			for (int i = 0; i < unitLength; i++) {
+				char[] contents = null;
+				String encoding = encodings != null ? encodings[i] : null;
+				try {
+					contents = Util.getFileCharContent(new File(sourceUnits[i]), encoding);
+				} catch(IOException e) {
+					// go to the next unit
+					continue;
+				}
+				if (contents == null) {
+					// go to the next unit
+					continue;
+				}
+				org.eclipse.jdt.internal.compiler.batch.CompilationUnit compilationUnit = new org.eclipse.jdt.internal.compiler.batch.CompilationUnit(contents, sourceUnits[i], encoding);
+				org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationUnit;
+				CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
+				CompilationUnitDeclaration compilationUnitDeclaration = parser.dietParse(sourceUnit, compilationResult);
 
+				if (compilationUnitDeclaration.ignoreMethodBodies) {
+					compilationUnitDeclaration.ignoreFurtherInvestigation = true;
+					// if initial diet parse did not work, no need to dig into method bodies.
+					continue;
+				}
+
+				//fill the methods bodies in order for the code to be generated
+				//real parse of the method....
+				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = compilationUnitDeclaration.types;
+				if (types != null) {
+					for (int j = 0, typeLength = types.length; j < typeLength; j++) {
+						types[j].parseMethods(parser, compilationUnitDeclaration);
+					}
+				}
+
+				// convert AST
+				CompilationUnit node = convert(compilationUnitDeclaration, parser.scanner.getSource(), apiLevel, options, false/*don't resolve binding*/, null/*no owner needed*/, null/*no binding table needed*/, flags /* flags */, monitor, true);
+				node.setTypeRoot(null);
+
+				// accept AST
+				astRequestor.acceptAST(sourceUnits[i], node);
+
+				if (monitor != null) monitor.worked(1);
+			}
+		} finally {
+			if (monitor != null) monitor.done();
+		}
+	}
 	public static CompilationUnitDeclaration parse(
 			org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
 			NodeSearcher nodeSearcher,
@@ -433,13 +531,14 @@ class CompilationUnitResolver extends Compiler {
 				}
 			}
 		} else {
-			//fill the methods bodies in order for the code to be generated
-			//real parse of the method....
-			org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = compilationUnitDeclaration.types;
-			if (types != null) {
-				for (int i = 0, length = types.length; i < length; i++)
-					types[i].parseMethods(parser, compilationUnitDeclaration);
-			}
+				//fill the methods bodies in order for the code to be generated
+				//real parse of the method....			
+				org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] types = compilationUnitDeclaration.types;
+				if (types != null) {
+					for (int j = 0, typeLength = types.length; j < typeLength; j++) {
+						types[j].parseMethods(parser, compilationUnitDeclaration);
+					}
+				}
 		}
 		return compilationUnitDeclaration;
 	}
@@ -473,7 +572,8 @@ class CompilationUnitResolver extends Compiler {
 					compilerOptions,
 					getRequestor(),
 					problemFactory,
-					monitor);
+					monitor,
+					javaProject != null);
 			resolver.resolve(compilationUnits, bindingKeys, requestor, apiLevel, options, owner, flags);
 			if (NameLookup.VERBOSE) {
 				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
@@ -485,16 +585,66 @@ class CompilationUnitResolver extends Compiler {
 		} finally {
 			if (monitor != null) monitor.done();
 			if (environment != null) {
-				environment.monitor = null; // don't hold a reference to this external object
+				environment.setMonitor(null); // don't hold a reference to this external object
 			}
 			if (problemFactory != null) {
 				problemFactory.monitor = null; // don't hold a reference to this external object
 			}
 		}
 	}
+	public static void resolve(
+			String[] sourceUnits,
+			String[] encodings,
+			String[] bindingKeys,
+			FileASTRequestor requestor,
+			int apiLevel,
+			Map options,
+			List classpaths,
+			int flags,
+			IProgressMonitor monitor) {
+
+			INameEnviromentWithProgress environment = null;
+			CancelableProblemFactory problemFactory = null;
+			try {
+				if (monitor != null) {
+					int amountOfWork = (sourceUnits.length + bindingKeys.length) * 2; // 1 for beginToCompile, 1 for resolve
+					monitor.beginTask("", amountOfWork); //$NON-NLS-1$
+				}
+				Classpath[] allEntries = new Classpath[classpaths.size()];
+				classpaths.toArray(allEntries);
+				environment = new NameEnviromentWithProgress(allEntries, null, monitor);
+				problemFactory = new CancelableProblemFactory(monitor);
+				CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
+				compilerOptions.ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
+				CompilationUnitResolver resolver =
+					new CompilationUnitResolver(
+						environment,
+						getHandlingPolicy(),
+						compilerOptions,
+						getRequestor(),
+						problemFactory,
+						monitor,
+						false);
+				resolver.resolve(sourceUnits, encodings, bindingKeys, requestor, apiLevel, options, flags);
+				if (NameLookup.VERBOSE && (environment instanceof CancelableNameEnvironment)) {
+					CancelableNameEnvironment cancelableNameEnvironment = (CancelableNameEnvironment) environment;
+					System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + cancelableNameEnvironment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + cancelableNameEnvironment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			} finally {
+				if (monitor != null) monitor.done();
+				if (environment != null) {
+					environment.setMonitor(null); // don't hold a reference to this external object
+				}
+				if (problemFactory != null) {
+					problemFactory.monitor = null; // don't hold a reference to this external object
+				}
+			}
+		}
 	public static CompilationUnitDeclaration resolve(
 			org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
 			IJavaProject javaProject,
+			List classpaths,
 			NodeSearcher nodeSearcher,
 			Map options,
 			WorkingCopyOwner owner,
@@ -502,11 +652,17 @@ class CompilationUnitResolver extends Compiler {
 			IProgressMonitor monitor) throws JavaModelException {
 
 		CompilationUnitDeclaration unit = null;
-		CancelableNameEnvironment environment = null;
+		INameEnviromentWithProgress environment = null;
 		CancelableProblemFactory problemFactory = null;
 		CompilationUnitResolver resolver = null;
 		try {
-			environment = new CancelableNameEnvironment(((JavaProject)javaProject), owner, monitor);
+			if (javaProject == null) {
+				Classpath[] allEntries = new Classpath[classpaths.size()];
+				classpaths.toArray(allEntries);
+				environment = new NameEnviromentWithProgress(allEntries, null, monitor);
+			} else {
+				environment = new CancelableNameEnvironment((JavaProject) javaProject, owner, monitor);
+			}
 			problemFactory = new CancelableProblemFactory(monitor);
 			CompilerOptions compilerOptions = getCompilerOptions(options, (flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
 			boolean ignoreMethodBodies = (flags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0;
@@ -518,7 +674,8 @@ class CompilationUnitResolver extends Compiler {
 					compilerOptions,
 					getRequestor(),
 					problemFactory,
-					monitor);
+					monitor,
+					javaProject != null);
 			boolean analyzeAndGenerateCode = !ignoreMethodBodies;
 			unit =
 				resolver.resolve(
@@ -540,27 +697,20 @@ class CompilationUnitResolver extends Compiler {
 				}
 				return unitDeclaration;
 			}
-			if (NameLookup.VERBOSE) {
-				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
-				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+			if (NameLookup.VERBOSE && environment instanceof CancelableNameEnvironment) {
+				CancelableNameEnvironment cancelableNameEnvironment = (CancelableNameEnvironment) environment;
+				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + cancelableNameEnvironment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + cancelableNameEnvironment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
 			}
 			return unit;
 		} finally {
 			if (environment != null) {
-				environment.monitor = null; // don't hold a reference to this external object
+				// don't hold a reference to this external object
+				environment.setMonitor(null);
 			}
 			if (problemFactory != null) {
 				problemFactory.monitor = null; // don't hold a reference to this external object
 			}
-			// first unit cleanup is done by caller, but cleanup all enqueued requested units (not processed)
-//			if (resolver != null) {
-//				for (int i = 1; i <  resolver.totalUnits; i++) { // could be more requested units
-//					CompilationUnitDeclaration parsedUnit = resolver.unitsToProcess[i];
-//					if (parsedUnit.scope != null)
-//						parsedUnit.scope.faultInTypes(); // force resolution of signatures, so clients can query DOM AST
-//					parsedUnit.cleanUp();
-//				}
-//			}
 		}
 	}
 	public static IBinding[] resolve(
@@ -674,7 +824,14 @@ class CompilationUnitResolver extends Compiler {
 		}
 	}
 
-	private void resolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor astRequestor, int apiLevel, Map compilerOptions, WorkingCopyOwner owner, int flags) {
+	private void resolve(
+			ICompilationUnit[] compilationUnits,
+			String[] bindingKeys,
+			ASTRequestor astRequestor,
+			int apiLevel,
+			Map compilerOptions,
+			WorkingCopyOwner owner,
+			int flags) {
 
 		// temporarily connect ourselves to the ASTResolver - must disconnect when done
 		astRequestor.compilationUnitResolver = this;
@@ -713,7 +870,7 @@ class CompilationUnitResolver extends Compiler {
 						ast.setFlag(flags | AST.RESOLVED_BINDINGS);
 						ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
 						ASTConverter converter = new ASTConverter(compilerOptions, true/*need to resolve bindings*/, this.monitor);
-						BindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0);
+						BindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);
 						ast.setBindingResolver(resolver);
 						converter.setAST(ast);
 						CompilationUnit compilationUnit = converter.convert(unit, contents);
@@ -757,7 +914,140 @@ class CompilationUnitResolver extends Compiler {
 			}
 
 			// remaining binding keys
-			DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0);
+			DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, owner, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);
+			Object[] keys = this.requestedKeys.valueTable;
+			for (int j = 0, keysLength = keys.length; j < keysLength; j++) {
+				BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];
+				if (keyResolver == null) continue;
+				Binding compilerBinding = keyResolver.getCompilerBinding();
+				IBinding binding = compilerBinding == null ? null : resolver.getBinding(compilerBinding);
+				// pass it to requestor
+				astRequestor.acceptBinding(((BindingKeyResolver) this.requestedKeys.valueTable[j]).getKey(), binding);
+				worked(1);
+			}
+		} catch (OperationCanceledException e) {
+			throw e;
+		} catch (AbortCompilation e) {
+			this.handleInternalException(e, unit);
+		} catch (Error e) {
+			this.handleInternalException(e, unit, null);
+			throw e; // rethrow
+		} catch (RuntimeException e) {
+			this.handleInternalException(e, unit, null);
+			throw e; // rethrow
+		} finally {
+			// disconnect ourselves from ast requestor
+			astRequestor.compilationUnitResolver = null;
+		}
+	}
+
+	private void resolve(
+			String[] sourceCompilationUnits,
+			String[] encodings,
+			String[] bindingKeys,
+			FileASTRequestor astRequestor,
+			int apiLevel,
+			Map compilerOptions,
+			int flags) {
+
+		// temporarily connect ourselves to the ASTResolver - must disconnect when done
+		astRequestor.compilationUnitResolver = this;
+		this.bindingTables = new DefaultBindingResolver.BindingTables();
+		CompilationUnitDeclaration unit = null;
+		try {
+			int length = sourceCompilationUnits.length;
+			org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits = new org.eclipse.jdt.internal.compiler.env.ICompilationUnit[length];
+			int count = 0;
+			for (int i = 0; i < length; i++) {
+				char[] contents = null;
+				String encoding = encodings != null ? encodings[i] : null;
+				String sourceUnitPath = sourceCompilationUnits[i];
+				try {
+					contents = Util.getFileCharContent(new File(sourceUnitPath), encoding);
+				} catch(IOException e) {
+					// go to the next unit
+					continue;
+				}
+				if (contents == null) {
+					// go to the next unit
+					continue;
+				}
+				sourceUnits[count++] = new org.eclipse.jdt.internal.compiler.batch.CompilationUnit(contents, sourceUnitPath, encoding);
+			}
+			beginToCompile(sourceUnits, bindingKeys);
+			// process all units (some more could be injected in the loop by the lookup environment)
+			for (int i = 0; i < this.totalUnits; i++) {
+				if (resolvedRequestedSourcesAndKeys(i)) {
+					// no need to keep resolving if no more ASTs and no more binding keys are needed
+					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=114935
+					// cleanup remaining units
+					for (; i < this.totalUnits; i++) {
+						this.unitsToProcess[i].cleanUp();
+						this.unitsToProcess[i] = null;
+					}
+					break;
+				}
+				unit = this.unitsToProcess[i];
+				try {
+					super.process(unit, i); // this.process(...) is optimized to not process already known units
+
+					// requested AST
+					char[] fileName = unit.compilationResult.getFileName();
+					org.eclipse.jdt.internal.compiler.env.ICompilationUnit source = (org.eclipse.jdt.internal.compiler.env.ICompilationUnit) this.requestedSources.get(fileName);
+					if (source != null) {
+						// convert AST
+						CompilationResult compilationResult = unit.compilationResult;
+						org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;
+						char[] contents = sourceUnit.getContents();
+						AST ast = AST.newAST(apiLevel);
+						ast.setFlag(flags | AST.RESOLVED_BINDINGS);
+						ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
+						ASTConverter converter = new ASTConverter(compilerOptions, true/*need to resolve bindings*/, this.monitor);
+						BindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, this.fromJavaProject);
+						ast.setBindingResolver(resolver);
+						converter.setAST(ast);
+						CompilationUnit compilationUnit = converter.convert(unit, contents);
+						compilationUnit.setTypeRoot(null);
+						compilationUnit.setLineEndTable(compilationResult.getLineSeparatorPositions());
+						ast.setDefaultNodeFlag(0);
+						ast.setOriginalModificationCount(ast.modificationCount());
+
+						// pass it to requestor
+						astRequestor.acceptAST(new String(source.getFileName()), compilationUnit);
+
+						worked(1);
+
+						// remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested
+						this.requestedSources.put(fileName, null); // mark it as removed
+					}
+
+					// requested binding
+					Object key = this.requestedKeys.get(fileName);
+					if (key != null) {
+						if (key instanceof BindingKeyResolver) {
+							reportBinding(key, astRequestor, unit);
+							worked(1);
+						} else if (key instanceof ArrayList) {
+							Iterator iterator = ((ArrayList) key).iterator();
+							while (iterator.hasNext()) {
+								reportBinding(iterator.next(), astRequestor, unit);
+								worked(1);
+							}
+						}
+
+						// remove at the end so that we don't resolve twice if a source and a key for the same file name have been requested
+						this.requestedKeys.put(fileName, null); // mark it as removed
+					}
+				} finally {
+					// cleanup compilation unit result
+					unit.cleanUp();
+				}
+				this.unitsToProcess[i] = null; // release reference to processed unit declaration
+				this.requestor.acceptResult(unit.compilationResult.tagAsAccepted());
+			}
+
+			// remaining binding keys
+			DefaultBindingResolver resolver = new DefaultBindingResolver(this.lookupEnvironment, null, this.bindingTables, (flags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0, true);
 			Object[] keys = this.requestedKeys.valueTable;
 			for (int j = 0, keysLength = keys.length; j < keysLength; j++) {
 				BindingKeyResolver keyResolver = (BindingKeyResolver) keys[j];
@@ -788,7 +1078,24 @@ class CompilationUnitResolver extends Compiler {
 		BindingKeyResolver keyResolver = (BindingKeyResolver) key;
 		Binding compilerBinding = keyResolver.getCompilerBinding();
 		if (compilerBinding != null) {
-			DefaultBindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, false);
+			DefaultBindingResolver resolver = new DefaultBindingResolver(unit.scope, owner, this.bindingTables, false, this.fromJavaProject);
+			AnnotationBinding annotationBinding = keyResolver.getAnnotationBinding();
+			IBinding binding;
+			if (annotationBinding != null) {
+				binding = resolver.getAnnotationInstance(annotationBinding);
+			} else {
+				binding = resolver.getBinding(compilerBinding);
+			}
+			if (binding != null)
+				astRequestor.acceptBinding(keyResolver.getKey(), binding);
+		}
+	}
+
+	private void reportBinding(Object key, FileASTRequestor astRequestor, CompilationUnitDeclaration unit) {
+		BindingKeyResolver keyResolver = (BindingKeyResolver) key;
+		Binding compilerBinding = keyResolver.getCompilerBinding();
+		if (compilerBinding != null) {
+			DefaultBindingResolver resolver = new DefaultBindingResolver(unit.scope, null, this.bindingTables, false, this.fromJavaProject);
 			AnnotationBinding annotationBinding = keyResolver.getAnnotationBinding();
 			IBinding binding;
 			if (annotationBinding != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
index 8c0003b..6c0897e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -134,11 +134,16 @@ class DefaultBindingResolver extends BindingResolver {
 	 * Toggle controlling whether DOM bindings should be created when missing internal compiler bindings..
 	 */
 	boolean isRecoveringBindings;
-
+	
+	/**
+	 * Set to <code>true</code> if initialized from a java project
+	 */
+	boolean fromJavaProject;
+	
 	/**
 	 * Constructor for DefaultBindingResolver.
 	 */
-	DefaultBindingResolver(CompilationUnitScope scope, WorkingCopyOwner workingCopyOwner, BindingTables bindingTables, boolean isRecoveringBindings) {
+	DefaultBindingResolver(CompilationUnitScope scope, WorkingCopyOwner workingCopyOwner, BindingTables bindingTables, boolean isRecoveringBindings, boolean fromJavaProject) {
 		this.newAstToOldAst = new HashMap();
 		this.astNodesToBlockScope = new HashMap();
 		this.bindingsToAstNodes = new HashMap();
@@ -146,9 +151,10 @@ class DefaultBindingResolver extends BindingResolver {
 		this.scope = scope;
 		this.workingCopyOwner = workingCopyOwner;
 		this.isRecoveringBindings = isRecoveringBindings;
+		this.fromJavaProject = fromJavaProject;
 	}
 
-	DefaultBindingResolver(LookupEnvironment lookupEnvironment, WorkingCopyOwner workingCopyOwner, BindingTables bindingTables, boolean isRecoveringBindings) {
+	DefaultBindingResolver(LookupEnvironment lookupEnvironment, WorkingCopyOwner workingCopyOwner, BindingTables bindingTables, boolean isRecoveringBindings, boolean fromJavaProject) {
 		this.newAstToOldAst = new HashMap();
 		this.astNodesToBlockScope = new HashMap();
 		this.bindingsToAstNodes = new HashMap();
@@ -156,6 +162,7 @@ class DefaultBindingResolver extends BindingResolver {
 		this.scope = new CompilationUnitScope(new CompilationUnitDeclaration(null, null, -1), lookupEnvironment);
 		this.workingCopyOwner = workingCopyOwner;
 		this.isRecoveringBindings = isRecoveringBindings;
+		this.fromJavaProject = fromJavaProject;
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java
index 04c7cbb..0f2a85a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,9 @@ import java.util.List;
  *    <b>for</b> <b>(</b> FormalParameter <b>:</b> Expression <b>)</b>
  * 			Statement
  * </pre>
- * The FormalParameter is represented by a <code>SingleVariableDeclaration</code>
- * (without an initializer).
+ * 
+ * <p>The FormalParameter is represented by a {@link SingleVariableDeclaration}
+ * (without an initializer).</p>
  *
  * @since 3.1
  * @noinstantiate This class is not intended to be instantiated by clients.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FileASTRequestor.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FileASTRequestor.java
new file mode 100644
index 0000000..0a96f51
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FileASTRequestor.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+/**
+ * An AST requestor handles ASTs for compilation units passed to
+ * {@link ASTParser#createASTs(String[], String[], String[], FileASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
+ * <p>
+ * {@link FileASTRequestor#acceptAST(String, CompilationUnit) FileASTRequestor.acceptAST} is called for each of the
+ * compilation units passed to {@link ASTParser#createASTs(String[], String[], String[], FileASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
+ * After all the compilation units have been processed,
+ * {@link #acceptBinding(String, IBinding) FileASTRequestor.acceptBinding} is called for each
+ * of the binding keys passed to {@link ASTParser#createASTs(String[], String[], String[], FileASTRequestor, org.eclipse.core.runtime.IProgressMonitor) ASTParser.createASTs}.
+ * </p>
+ * <p>
+ * This class is intended to be subclassed by clients.
+ * AST requestors are serially reusable, but neither reentrant nor thread-safe.
+ * </p>
+ *
+ * @see ASTParser#createASTs(String[], String[], String[], FileASTRequestor, org.eclipse.core.runtime.IProgressMonitor)
+ * @since 3.6
+ */
+public abstract class FileASTRequestor {
+
+	/**
+	 * The compilation unit resolver used to resolve bindings, or
+	 * <code>null</code> if none. Note that this field is non-null
+	 * only within the dynamic scope of a call to
+	 * <code>ASTParser.createASTs</code>.
+	 */
+	CompilationUnitResolver compilationUnitResolver = null;
+
+	/**
+	 * Accepts an AST corresponding to the compilation unit.
+	 * That is, <code>ast</code> is an AST for <code>source</code>.
+	 * <p>
+	 * The default implementation of this method does nothing.
+	 * Clients should override to process the resulting AST.
+	 * </p>
+	 *
+	 * @param sourceFilePath the compilation unit the given ast is coming from
+	 * @param ast the requested abstract syntax tree
+	 */
+	public void acceptAST(String sourceFilePath, CompilationUnit ast) {
+		// do nothing
+	}
+
+	/**
+	 * Accepts a binding corresponding to the binding key.
+	 * That is, <code>binding</code> is the binding for
+	 * <code>bindingKey</code>; <code>binding</code> is <code>null</code>
+	 * if the key cannot be resolved.
+	 * <p>
+	 * The default implementation of this method does nothing.
+	 * Clients should override to process the resulting binding.
+	 * </p>
+	 *
+	 * @param bindingKey the key of the requested binding
+	 * @param binding the requested binding, or <code>null</code> if none
+	 */
+	public void acceptBinding(String bindingKey, IBinding binding) {
+		// do nothing
+	}
+
+	/**
+	 * Resolves bindings for the given binding keys.
+	 * The given binding keys must have been obtained earlier
+	 * using {@link IBinding#getKey()}.
+	 * <p>
+	 * If a binding key cannot be resolved, <code>null</code> is put in the resulting array.
+	 * Bindings can only be resolved in the dynamic scope of a <code>ASTParser.createASTs</code>,
+	 * and only if <code>ASTParser.resolveBindings(true)</code> was specified.
+	 * </p>
+	 * <p>
+	 * Caveat: During an <code>acceptAST</code> callback, there are implementation
+	 * limitations concerning the look up of binding keys representing local elements.
+	 * In some cases, the binding is unavailable, and <code>null</code> will be returned.
+	 * This is only an issue during an <code>acceptAST</code> callback, and only
+	 * when the binding key represents a local element (e.g., local variable,
+	 * local class, method declared in anonymous class). There is no such limitation
+	 * outside of <code>acceptAST</code> callbacks, or for top-level types and their
+	 * members even within <code>acceptAST</code> callbacks.
+	 * </p>
+	 *
+	 * @param bindingKeys the binding keys to look up
+	 * @return a list of bindings paralleling the <code>bindingKeys</code> parameter,
+	 * with <code>null</code> entries for keys that could not be resolved
+	 */
+	public final IBinding[] createBindings(String[] bindingKeys) {
+		int length = bindingKeys.length;
+		IBinding[] result = new IBinding[length];
+		for (int i = 0; i < length; i++) {
+			result[i] = null;
+			if (this.compilationUnitResolver != null) {
+				result[i] = this.compilationUnitResolver.createBinding(bindingKeys[i]);
+			}
+		}
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
index 34dc52f..06678c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
index f14ad02..32bfb76 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 package org.eclipse.jdt.core.dom;
 
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
 import org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding;
@@ -243,9 +244,13 @@ class MethodBinding implements IMethodBinding {
 	}
 
 	private JavaElement getUnresolvedJavaElement() {
+		if (JavaCore.getPlugin() == null) {
+			return null;
+		}
 		if (!(this.resolver instanceof DefaultBindingResolver)) return null;
 
 		DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
+		if (!defaultBindingResolver.fromJavaProject) return null;
 		return Util.getUnresolvedJavaElement(
 				this.binding,
 				defaultBindingResolver.workingCopyOwner,
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
index 067b254..08e68f2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import java.util.List;
 /**
  * Method declaration AST node type. A method declaration
  * is the union of a method declaration and a constructor declaration.
+ * 
  * For JLS2:
  * <pre>
  * MethodDeclaration:
@@ -59,6 +60,7 @@ import java.util.List;
  * no modifiers). The source range extends through the last character of the
  * ";" token (if no body), or the last character of the block (if body).
  * </p>
+ * <p>The FormalParameter is represented by a {@link SingleVariableDeclaration}.</p>
  *
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnviromentWithProgress.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnviromentWithProgress.java
new file mode 100644
index 0000000..dac646f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NameEnviromentWithProgress.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jdt.internal.compiler.batch.FileSystem;
+import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
+import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.jdt.internal.core.INameEnviromentWithProgress;
+import org.eclipse.jdt.internal.core.NameLookup;
+
+/**
+ * Batch name environment that is cancelable using a monitor.
+ * @since 3.6
+ */
+class NameEnviromentWithProgress extends FileSystem implements INameEnviromentWithProgress {
+	IProgressMonitor monitor;
+	
+	public NameEnviromentWithProgress(Classpath[] paths, String[] initialFileNames, IProgressMonitor monitor) {
+		super(paths, initialFileNames);
+		setMonitor(monitor);
+	}
+	private void checkCanceled() {
+		if (this.monitor != null && this.monitor.isCanceled()) {
+			if (NameLookup.VERBOSE) {
+				System.out.println(Thread.currentThread() + " CANCELLING LOOKUP "); //$NON-NLS-1$
+			}
+			throw new AbortCompilation(true/*silent*/, new OperationCanceledException());
+		}
+	}
+	public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
+		checkCanceled();
+		return super.findType(typeName, packageName);
+	}
+	public NameEnvironmentAnswer findType(char[][] compoundName) {
+		checkCanceled();
+		return super.findType(compoundName);
+	}
+	public boolean isPackage(char[][] compoundName, char[] packageName) {
+		checkCanceled();
+		return super.isPackage(compoundName, packageName);
+	}
+	
+	public void setMonitor(IProgressMonitor monitor) {
+		this.monitor = monitor;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
index 6ad538d..36cef08 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import org.eclipse.jdt.core.compiler.InvalidInputException;
 
 /**
  * For a given range, finds the covered node and the covering node.
- * This API is still under discussion, see https://bugs.eclipse.org/53024 .
  *
  * @since 3.5
  */
@@ -150,8 +149,8 @@ public final class NodeFinder {
 			IBuffer buffer= source.getBuffer();
 			if (buffer != null) {
 				IScanner scanner= ToolFactory.createScanner(false, false, false, false);
-				scanner.setSource(buffer.getText(start, length).toCharArray());
 				try {
+					scanner.setSource(buffer.getText(start, length).toCharArray());
 					int token= scanner.getNextToken();
 					if (token != ITerminalSymbols.TokenNameEOF) {
 						int tStart= scanner.getCurrentTokenStartPosition();
@@ -164,6 +163,9 @@ public final class NodeFinder {
 					}
 				} catch (InvalidInputException e) {
 					// ignore
+				} catch (IndexOutOfBoundsException e) {
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=305001
+					return null;
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageBinding.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageBinding.java
index b8f65f8..90aefda 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,10 +13,14 @@ package org.eclipse.jdt.core.dom;
 
 import java.util.Iterator;
 import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
@@ -191,10 +195,20 @@ class PackageBinding implements IPackageBinding {
 	public IJavaElement getJavaElement() {
 		INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment; // a package binding always has a LooupEnvironment set
 		if (!(nameEnvironment instanceof SearchableEnvironment)) return null;
+		// this is not true in standalone DOM/AST
 		NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
 		if (nameLookup == null) return null;
 		IJavaElement[] pkgs = nameLookup.findPackageFragments(getName(), false/*exact match*/);
 		if (pkgs == null) return null;
+		if (pkgs.length == 0) {
+			// add additional tracing as this should not happen
+			org.eclipse.jdt.internal.core.util.Util.log(
+				new Status(
+						IStatus.WARNING,
+						JavaCore.PLUGIN_ID,
+						"Searching for package " + getName() + " returns an empty array")); //$NON-NLS-1$ //$NON-NLS-2$
+			return null;
+		}
 		return pkgs[0];
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java
index f2e34c0..b68c4f1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/StringLiteral.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -291,9 +291,6 @@ public class StringLiteral extends Expression {
 				case '\"':
 					b.append("\\\""); //$NON-NLS-1$
 					break;
-				case '\'':
-					b.append("\\\'"); //$NON-NLS-1$
-					break;
 				case '\\':
 					b.append("\\\\"); //$NON-NLS-1$
 					break;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
index 69c013a..c8aba87 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,9 @@
 package org.eclipse.jdt.core.dom;
 
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.internal.compiler.ast.Expression;
+import org.eclipse.jdt.internal.compiler.ast.StringLiteral;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
@@ -41,6 +42,8 @@ import org.eclipse.jdt.internal.core.PackageFragment;
  * Internal implementation of type bindings.
  */
 class TypeBinding implements ITypeBinding {
+	private static final StringLiteral EXPRESSION = new org.eclipse.jdt.internal.compiler.ast.StringLiteral(0,0);
+
 	protected static final IMethodBinding[] NO_METHOD_BINDINGS = new IMethodBinding[0];
 
 	private static final String NO_NAME = ""; //$NON-NLS-1$
@@ -80,9 +83,13 @@ class TypeBinding implements ITypeBinding {
 		if (this.annotations != null) {
 			return this.annotations;
 		}
-		if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) {
-			org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType =
-				(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding;
+		org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding refType = null;
+		if (this.binding instanceof ParameterizedTypeBinding) {
+			refType = ((ParameterizedTypeBinding) this.binding).genericType();
+		} else if (this.binding.isAnnotationType() || this.binding.isClass() || this.binding.isEnum() || this.binding.isInterface()) {
+			refType = (org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding) this.binding;
+		}
+		if (refType != null) {
 			org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations = refType.getAnnotations();
 			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
 			if (length != 0) {
@@ -512,15 +519,18 @@ class TypeBinding implements ITypeBinding {
 		return getUnresolvedJavaElement(this.binding);
 	}
 	private JavaElement getUnresolvedJavaElement(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding ) {
+		if (JavaCore.getPlugin() == null) {
+			return null;
+		}
 		if (this.resolver instanceof DefaultBindingResolver) {
 			DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
+			if (!defaultBindingResolver.fromJavaProject) return null;
 			return org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(
 					typeBinding,
 					defaultBindingResolver.workingCopyOwner,
 					defaultBindingResolver.getBindingsToNodesMap());
-		} else {
-			return org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(typeBinding, null, null);
 		}
+		return null;
 	}
 
 	/*
@@ -995,18 +1005,13 @@ class TypeBinding implements ITypeBinding {
 	 */
 	public boolean isCastCompatible(ITypeBinding type) {
 		try {
-			Expression expression = new Expression() {
-				public StringBuffer printExpression(int indent,StringBuffer output) {
-					return null;
-				}
-			};
 			Scope scope = this.resolver.scope();
 			if (scope == null) return false;
 			if (!(type instanceof TypeBinding)) return false;
 			org.eclipse.jdt.internal.compiler.lookup.TypeBinding expressionType = ((TypeBinding) type).binding;
 			// simulate capture in case checked binding did not properly get extracted from a reference
 			expressionType = expressionType.capture(scope, 0);
-			return expression.checkCastTypesCompatibility(scope, this.binding, expressionType, null);
+			return TypeBinding.EXPRESSION.checkCastTypesCompatibility(scope, this.binding, expressionType, null);
 		} catch (AbortCompilation e) {
 			// don't surface internal exception to clients
 			// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=143013
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
index 22c88ff..e8a1226 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableBinding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,15 @@
 package org.eclipse.jdt.core.dom;
 
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.util.IModifierConstants;
+import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.Initializer;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TagBits;
@@ -126,7 +130,22 @@ class VariableBinding implements IVariableBinding {
 		if (!isField()) {
 			ASTNode node = this.resolver.findDeclaringNode(this);
 			while (true) {
-				if (node == null) break;
+				if (node == null) {
+					if (this.binding instanceof LocalVariableBinding) {
+						LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding;
+						BlockScope blockScope = localVariableBinding.declaringScope;
+						if (blockScope != null) {
+							ReferenceContext referenceContext = blockScope.referenceContext();
+							if (referenceContext instanceof Initializer) {
+								return null;
+							}
+							if (referenceContext instanceof AbstractMethodDeclaration) {
+								return this.resolver.getMethodBinding(((AbstractMethodDeclaration) referenceContext).binding);
+							}
+						}
+					}
+					return null;
+				}
 				switch(node.getNodeType()) {
 					case ASTNode.INITIALIZER :
 						return null;
@@ -202,20 +221,25 @@ class VariableBinding implements IVariableBinding {
 	}
 
 	private JavaElement getUnresolvedJavaElement() {
+		if (JavaCore.getPlugin() == null) {
+			return null;
+		}
 		if (isField()) {
 			if (this.resolver instanceof DefaultBindingResolver) {
 				DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
+				if (!defaultBindingResolver.fromJavaProject) return null;
 				return Util.getUnresolvedJavaElement(
 						(FieldBinding) this.binding,
 						defaultBindingResolver.workingCopyOwner,
 						defaultBindingResolver.getBindingsToNodesMap());
-			} else {
-				return Util.getUnresolvedJavaElement((FieldBinding) this.binding, null, null);
 			}
+			return null;
 		}
 		// local variable
 		if (!(this.resolver instanceof DefaultBindingResolver)) return null;
-		VariableDeclaration localVar = (VariableDeclaration) ((DefaultBindingResolver) this.resolver).bindingsToAstNodes.get(this);
+		DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
+		if (!defaultBindingResolver.fromJavaProject) return null;
+		VariableDeclaration localVar = (VariableDeclaration) defaultBindingResolver.bindingsToAstNodes.get(this);
 		if (localVar == null) return null;
 		int nameStart;
 		int nameLength;
@@ -244,15 +268,10 @@ class VariableBinding implements IVariableBinding {
 				// Local variable is declared inside an initializer
 				TypeDeclaration typeDeclaration = (TypeDeclaration) referenceContext;
 				JavaElement typeHandle = null;
-				if (this.resolver instanceof DefaultBindingResolver) {
-					DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
-					typeHandle = Util.getUnresolvedJavaElement(
-						typeDeclaration.binding,
-						defaultBindingResolver.workingCopyOwner,
-						defaultBindingResolver.getBindingsToNodesMap());
-				} else {
-					typeHandle = Util.getUnresolvedJavaElement(typeDeclaration.binding, null, null);
-				}
+				typeHandle = Util.getUnresolvedJavaElement(
+					typeDeclaration.binding,
+					defaultBindingResolver.workingCopyOwner,
+					defaultBindingResolver.getBindingsToNodesMap());
 				parent = Util.getUnresolvedJavaElement(sourceStart, sourceEnd, typeHandle);
 			} else {
 				return null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
index c253c06..6d8a6ca 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -162,14 +162,14 @@ public class ASTRewrite {
 	 * <p>
 	 * For nodes in the original that are being replaced or deleted,
 	 * this rewriter computes the adjusted source ranges
-	 * by calling <code>getTargetSourceRangeComputer().computeSourceRange(node)</code>.
+	 * by calling {@link TargetSourceRangeComputer#computeSourceRange(ASTNode) getExtendedSourceRangeComputer().computeSourceRange(node)}.
 	 * </p>
 	 * <p>
 	 * Calling this methods does not discard the modifications
 	 * on record. Subsequence modifications are added to the ones
 	 * already on record. If this method is called again later,
 	 * the resulting text edit object will accurately reflect
-	 * the net cumulative affect of all those changes.
+	 * the net cumulative effect of all those changes.
 	 * </p>
 	 *
 	 * @param document original document containing source code
@@ -217,14 +217,14 @@ public class ASTRewrite {
 	 * <p>
 	 * For nodes in the original that are being replaced or deleted,
 	 * this rewriter computes the adjusted source ranges
-	 * by calling <code>getTargetSourceRangeComputer().computeSourceRange(node)</code>.
+	 * by calling {@link TargetSourceRangeComputer#computeSourceRange(ASTNode) getExtendedSourceRangeComputer().computeSourceRange(node)}.
 	 * </p>
 	 * <p>
 	 * Calling this methods does not discard the modifications
 	 * on record. Subsequence modifications are added to the ones
 	 * already on record. If this method is called again later,
 	 * the resulting text edit object will accurately reflect
-	 * the net cumulative affect of all those changes.
+	 * the net cumulative effect of all those changes.
 	 * </p>
 	 *
 	 * @return text edit object describing the changes to the
@@ -663,6 +663,7 @@ public class ASTRewrite {
 	 *
 	 * @return an extended source range computer
 	 * @since 3.1
+	 * @see #setTargetSourceRangeComputer(TargetSourceRangeComputer)
 	 */
 	public final TargetSourceRangeComputer getExtendedSourceRangeComputer() {
 		if (this.targetSourceRangeComputer == null) {
@@ -680,9 +681,10 @@ public class ASTRewrite {
 	 * or <code>null</code> to restore the default value of
 	 * <code>new TargetSourceRangeComputer()</code>
 	 * @since 3.1
+	 * @see #getExtendedSourceRangeComputer()
 	 */
 	public final void setTargetSourceRangeComputer(TargetSourceRangeComputer computer) {
-		// if computer==null, rely on lazy init code in getTargetSourceRangeComputer()
+		// if computer==null, rely on lazy init code in getExtendedSourceRangeComputer()
 		this.targetSourceRangeComputer = computer;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
index aa3d6db..49b4ce7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,9 @@
 package org.eclipse.jdt.core.dom.rewrite;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -22,12 +24,14 @@ import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IImportDeclaration;
 import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.dom.*;
 import org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer;
 import org.eclipse.jdt.internal.core.util.Messages;
+import org.eclipse.jdt.internal.core.util.Util;
 import org.eclipse.text.edits.MultiTextEdit;
 import org.eclipse.text.edits.TextEdit;
 
@@ -122,6 +126,7 @@ public final class ImportRewrite {
 
 	private final boolean restoreExistingImports;
 	private final List existingImports;
+	private final Map importsKindMap;
 
 	private String[] importOrder;
 	private int importOnDemandThreshold;
@@ -134,6 +139,7 @@ public final class ImportRewrite {
 	private String[] createdStaticImports;
 
 	private boolean filterImplicitImports;
+	private boolean useContextToFilterImplicitImports;
 
 	/**
 	 * Creates a {@link ImportRewrite} from a {@link ICompilationUnit}. If <code>restoreExistingImports</code>
@@ -218,6 +224,8 @@ public final class ImportRewrite {
 			this.restoreExistingImports= false;
 		}
 		this.filterImplicitImports= true;
+		// consider that no contexts are used
+		this.useContextToFilterImplicitImports = false;
 
 		this.defaultContext= new ImportRewriteContext() {
 			public int findInContext(String qualifier, String name, int kind) {
@@ -232,6 +240,8 @@ public final class ImportRewrite {
 		this.importOrder= CharOperation.NO_STRINGS;
 		this.importOnDemandThreshold= 99;
 		this.staticImportOnDemandThreshold= 99;
+		
+		this.importsKindMap = new HashMap();
 	}
 
 
@@ -298,15 +308,46 @@ public final class ImportRewrite {
 	}
 
 	/**
-	 * Specifies that implicit imports (types in default package, package <code>java.lang</code> or
-	 * in the same package as the rewrite compilation unit should not be created except if necessary
-	 * to resolve an on-demand import conflict. The filter is enabled by default.
-	 * @param filterImplicitImports if set, implicit imports will be filtered.
+	 * Specifies that implicit imports (for types in <code>java.lang</code>, types in the same package as the rewrite
+	 * compilation unit, and types in the compilation unit's main type) should not be created, except if necessary to
+	 * resolve an on-demand import conflict.
+	 * <p>
+	 * The filter is enabled by default.
+	 * </p>
+	 * <p>
+	 * Note: {@link #setUseContextToFilterImplicitImports(boolean)} can be used to filter implicit imports
+	 * when a context is used.
+	 * </p>
+	 * 
+	 * @param filterImplicitImports
+	 *            if <code>true</code>, implicit imports will be filtered
+	 * 
+	 * @see #setUseContextToFilterImplicitImports(boolean)
 	 */
 	public void setFilterImplicitImports(boolean filterImplicitImports) {
 		this.filterImplicitImports= filterImplicitImports;
 	}
 
+	/**
+	* Sets whether a context should be used to properly filter implicit imports.
+	* <p>
+	* By default, the option is disabled to preserve pre-3.6 behavior.
+	* </p>
+	* <p>
+	* When this option is set, the context passed to the <code>addImport*(...)</code> methods is used to determine
+	* whether an import can be filtered because the type is implicitly visible. Note that too many imports
+	* may be kept if this option is set and <code>addImport*(...)</code> methods are called without a context.
+	* </p>
+	* 
+	* @param useContextToFilterImplicitImports the given setting
+	* 
+	* @see #setFilterImplicitImports(boolean)
+	* @since 3.6
+	*/
+	public void setUseContextToFilterImplicitImports(boolean useContextToFilterImplicitImports) {
+		this.useContextToFilterImplicitImports = useContextToFilterImplicitImports;
+	}
+	
 	private static int compareImport(char prefix, String qualifier, String name, String curr) {
 		if (curr.charAt(0) != prefix || !curr.endsWith(name)) {
 			return ImportRewriteContext.RES_NAME_UNKNOWN;
@@ -345,13 +386,27 @@ public final class ImportRewrite {
 			int res= compareImport(prefix, qualifier, name, curr);
 			if (res != ImportRewriteContext.RES_NAME_UNKNOWN) {
 				if (!allowAmbiguity || res == ImportRewriteContext.RES_NAME_FOUND) {
-					return res;
+					if (prefix != STATIC_PREFIX) {
+						return res;
+					}
+					Object currKind = this.importsKindMap.get(curr.substring(1));
+					if (currKind != null && currKind.equals(this.importsKindMap.get(qualifier + '.' + name))) {
+						return res;
+					}
 				}
 			}
 		}
+		if (this.filterImplicitImports && this.useContextToFilterImplicitImports) {
+			String fPackageName= this.compilationUnit.getParent().getElementName();
+			String mainTypeSimpleName= JavaCore.removeJavaLikeExtension(this.compilationUnit.getElementName());
+			String fMainTypeName= Util.concatenateName(fPackageName, mainTypeSimpleName, '.');
+			if (kind == ImportRewriteContext.KIND_TYPE
+					&& (qualifier.equals(fPackageName)
+							|| fMainTypeName.equals(Util.concatenateName(qualifier, name, '.'))))
+				return ImportRewriteContext.RES_NAME_FOUND;
+		}
 		return ImportRewriteContext.RES_NAME_UNKNOWN;
 	}
-
 	/**
 	 * Adds a new import to the rewriter's record and returns a {@link Type} node that can be used
 	 * in the code as a reference to the type. The type binding can be an array binding, type variable or wildcard.
@@ -832,19 +887,21 @@ public final class ImportRewrite {
 	 * an import conflict prevented the import.
 	 */
 	public String addStaticImport(String declaringTypeName, String simpleName, boolean isField, ImportRewriteContext context) {
+		String key = declaringTypeName + '.' + simpleName;
 		if (declaringTypeName.indexOf('.') == -1) {
-			return declaringTypeName + '.' + simpleName;
+			return key;
 		}
 		if (context == null) {
 			context= this.defaultContext;
 		}
 		int kind= isField ? ImportRewriteContext.KIND_STATIC_FIELD : ImportRewriteContext.KIND_STATIC_METHOD;
+		this.importsKindMap.put(key, new Integer(kind));
 		int res= context.findInContext(declaringTypeName, simpleName, kind);
 		if (res == ImportRewriteContext.RES_NAME_CONFLICT) {
-			return declaringTypeName + '.' + simpleName;
+			return key;
 		}
 		if (res == ImportRewriteContext.RES_NAME_UNKNOWN) {
-			addEntry(STATIC_PREFIX + declaringTypeName + '.' + simpleName);
+			addEntry(STATIC_PREFIX + key);
 		}
 		return simpleName;
 	}
@@ -951,7 +1008,7 @@ public final class ImportRewrite {
 	 * <p>
 	 * Calling this methods does not discard the modifications on record. Subsequence modifications are added
 	 * to the ones already on record. If this method is called again later, the resulting text edit object will accurately
-	 * reflect the net cumulative affect of all those changes.
+	 * reflect the net cumulative effect of all those changes.
 	 * </p>
 	 * @param monitor the progress monitor or <code>null</code>
 	 * @return text edit object describing the changes to the document corresponding to the changes
@@ -980,7 +1037,15 @@ public final class ImportRewrite {
 				usedAstRoot= (CompilationUnit) parser.createAST(new SubProgressMonitor(monitor, 1));
 			}
 
-			ImportRewriteAnalyzer computer= new ImportRewriteAnalyzer(this.compilationUnit, usedAstRoot, this.importOrder, this.importOnDemandThreshold, this.staticImportOnDemandThreshold, this.restoreExistingImports);
+			ImportRewriteAnalyzer computer=
+				new ImportRewriteAnalyzer(
+						this.compilationUnit,
+						usedAstRoot,
+						this.importOrder,
+						this.importOnDemandThreshold,
+						this.staticImportOnDemandThreshold,
+						this.restoreExistingImports,
+						this.useContextToFilterImplicitImports);
 			computer.setFilterImplicitImports(this.filterImplicitImports);
 
 			if (this.addedImports != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
index ed72cc2..88fd275 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.jdt.internal.compiler.parser.RecoveryScannerData;
 import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
 import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
+import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.BlockContext;
 import org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.NodeMarker;
 import org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.Prefix;
@@ -289,7 +290,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 			}
 			return new String(cont, lineStart, i - lineStart);
 		}
-		return new String();
+		return Util.EMPTY_STRING;
 	}
 
 
@@ -763,8 +764,22 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 				}
 				case RewriteEvent.REPLACED: {
 					ASTNode node= (ASTNode) event.getOriginalValue();
+					boolean insertNewLine = false;
 					if (endPos == -1) {
+						int previousEnd = node.getStartPosition() + node.getLength();
 						endPos= getExtendedEnd(node);
+						if (endPos != previousEnd) {
+							// check if the end is a comment
+							int token = TokenScanner.END_OF_FILE;
+							try {
+								token = getScanner().readNext(previousEnd, false);
+							} catch(CoreException e) {
+								// ignore
+							}
+							if (token == TerminalTokens.TokenNameCOMMENT_LINE) {
+								insertNewLine = true;
+							}
+						}
 					}
 					TextEditGroup editGroup= getEditGroup(event);
 					int nodeLen= endPos - offset;
@@ -774,7 +789,11 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 					doTextRemoveAndVisit(offset, nodeLen, node, editGroup);
 
 					String prefix= strings[0];
-					doTextInsert(offset, prefix, editGroup);
+					String insertedPrefix = prefix;
+					if (insertNewLine) {
+						insertedPrefix = getLineDelimiter() + this.formatter.createIndentString(indent) + insertedPrefix.trim() + ' ';
+					}
+					doTextInsert(offset, insertedPrefix, editGroup);
 					String lineInPrefix= getCurrentLine(prefix, prefix.length());
 					if (prefix.length() != lineInPrefix.length()) {
 						// prefix contains a new line: update the indent to the one used in the prefix
@@ -792,7 +811,6 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		}
 		return pos;
 	}
-
 	private int rewriteOptionalQualifier(ASTNode parent, StructuralPropertyDescriptor property, int startPos) {
 		RewriteEvent event= getEvent(parent, property);
 		if (event != null) {
@@ -1019,7 +1037,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 				if (isAllRemoved) { // all removed: remove right and space up to next element
 					int endPos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameGREATER, pos); // set pos to '>'
 					endPos= getScanner().getNextStartOffset(endPos, false);
-					String replacement= needsSpaceOnRemoveAll ? String.valueOf(' ') : new String();
+					String replacement= needsSpaceOnRemoveAll ? String.valueOf(' ') : Util.EMPTY_STRING;
 					doTextReplace(pos, endPos - pos, replacement, getEditGroup(children[children.length - 1]));
 					return endPos;
 				} else if (isAllInserted) {
@@ -1162,9 +1180,12 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 			NodeMarker curr= (NodeMarker) markers.get(i);
 
 			int offset= curr.offset;
-			if (offset != currPos) {
+			if (offset >= currPos) {
 				String insertStr= formatted.substring(currPos, offset);
 				doTextInsert(insertOffset, insertStr, editGroup); // insert until the marker's begin
+			} else {
+				// already processed
+				continue;
 			}
 
 			Object data= curr.data;
@@ -1470,7 +1491,8 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 
 		int pos= rewriteJavadoc(node, TypeDeclaration.JAVADOC_PROPERTY);
 
-		if (apiLevel == JLS2_INTERNAL) {
+		boolean isJLS2 = apiLevel == JLS2_INTERNAL;
+		if (isJLS2) {
 			rewriteModifiers(node, TypeDeclaration.MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, TypeDeclaration.MODIFIERS2_PROPERTY, pos);
@@ -1482,7 +1504,16 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		if (invertType) {
 			try {
 				int typeToken= isInterface ? TerminalTokens.TokenNameinterface : TerminalTokens.TokenNameclass;
-				getScanner().readToToken(typeToken, node.getStartPosition());
+				int startPosition = node.getStartPosition();
+				if (!isJLS2) {
+					List modifiers = node.modifiers();
+					final int size = modifiers.size();
+					if (size != 0) {
+						ASTNode modifierNode = (ASTNode) modifiers.get(size - 1);
+						startPosition = modifierNode.getStartPosition() + modifierNode.getLength();
+					}
+				}
+				getScanner().readToToken(typeToken, startPosition);
 
 				String str= isInterface ? "class" : "interface"; //$NON-NLS-1$ //$NON-NLS-2$
 				int start= getScanner().getCurrentStartOffset();
@@ -1497,13 +1528,13 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		// name
 		pos= rewriteRequiredNode(node, TypeDeclaration.NAME_PROPERTY);
 
-		if (apiLevel >= AST.JLS3) {
+		if (!isJLS2) {
 			pos= rewriteOptionalTypeParameters(node, TypeDeclaration.TYPE_PARAMETERS_PROPERTY, pos, "", false, true); //$NON-NLS-1$
 		}
 
 		// superclass
 		if (!isInterface || invertType) {
-			ChildPropertyDescriptor superClassProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
+			ChildPropertyDescriptor superClassProperty= isJLS2 ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
 
 			RewriteEvent superClassEvent= getEvent(node, superClassProperty);
 
@@ -1537,7 +1568,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 			}
 		}
 		// extended interfaces
-		ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
+		ChildListPropertyDescriptor superInterfaceProperty= isJLS2 ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
 
 		RewriteEvent interfaceEvent= getEvent(node, superInterfaceProperty);
 		if (interfaceEvent == null || interfaceEvent.getChangeKind() == RewriteEvent.UNCHANGED) {
@@ -1584,6 +1615,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		boolean returnTypeExists=  originalReturnType != null && originalReturnType.getStartPosition() != -1;
 		if (!isConstructorChange && returnTypeExists) {
 			rewriteRequiredNode(node, property);
+			ensureSpaceAfterReplace(node, property);
 			return;
 		}
 		// difficult cases: return type insert or remove
@@ -2154,6 +2186,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		}
 
 		pos= rewriteRequiredNode(node, FieldDeclaration.TYPE_PROPERTY);
+		ensureSpaceAfterReplace(node, FieldDeclaration.TYPE_PROPERTY);
 		rewriteNodeList(node, FieldDeclaration.FRAGMENTS_PROPERTY, pos, "", ", "); //$NON-NLS-1$ //$NON-NLS-2$
 		return false;
 	}
@@ -2511,7 +2544,7 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 		}
 		if (node.getAST().apiLevel() >= AST.JLS3) {
 			int pos= rewriteJavadoc(node, PackageDeclaration.JAVADOC_PROPERTY);
-			rewriteNodeList(node, PackageDeclaration.ANNOTATIONS_PROPERTY, pos, "", " "); //$NON-NLS-1$ //$NON-NLS-2$
+			rewriteModifiers2(node, PackageDeclaration.ANNOTATIONS_PROPERTY, pos);
 		}
 
 		rewriteRequiredNode(node, PackageDeclaration.NAME_PROPERTY);
@@ -2634,6 +2667,11 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 					}
 				}
 			}
+			if (!node.isVarargs()) {
+				ensureSpaceAfterReplace(node, SingleVariableDeclaration.TYPE_PROPERTY);
+			}
+		} else {
+			ensureSpaceAfterReplace(node, SingleVariableDeclaration.TYPE_PROPERTY);
 		}
 
 		pos= rewriteRequiredNode(node, SingleVariableDeclaration.NAME_PROPERTY);
@@ -3365,7 +3403,22 @@ public final class ASTRewriteAnalyzer extends ASTVisitor {
 						String str= this.formatter.FIRST_ENUM_CONST.getPrefix(indent - 1);
 						doTextInsert(pos, str, getEditGroup(children[0]));
 					}
-					doTextInsert(pos, ";", getEditGroup(children[0])); //$NON-NLS-1$
+					if (token == TerminalTokens.TokenNameCOMMA) {
+						// a comma is at the end of the enum constant before a potential semicolon
+						int endPos= getScanner().getCurrentEndOffset();
+						int nextToken= getScanner().readNext(endPos, true);
+						if (nextToken != TerminalTokens.TokenNameSEMICOLON) {
+							doTextInsert(endPos, ";", getEditGroup(children[0])); //$NON-NLS-1$
+						} else {
+							endPos= getScanner().getCurrentEndOffset();
+							if (isAllOfKind(children, RewriteEvent.REMOVED)) {
+								doTextRemove(pos, endPos - pos, getEditGroup(children[0]));
+							}
+						}
+						pos= endPos;
+					} else {
+						doTextInsert(pos, ";", getEditGroup(children[0])); //$NON-NLS-1$
+					}
 				} else if (hasSemicolon) {
 					int endPos= getScanner().getCurrentEndOffset();
 					if (isAllOfKind(children, RewriteEvent.REMOVED)) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
index fd90197..2f2b7b8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
index 4a807ff..f2a21a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -546,8 +546,8 @@ import org.eclipse.text.edits.TextEdit;
 
 	public final BlockContext IF_BLOCK_WITH_ELSE= new BlockFormattingPrefixSuffix("if (true)", "else{}", 8); //$NON-NLS-1$ //$NON-NLS-2$
 	public final BlockContext IF_BLOCK_NO_ELSE= new BlockFormattingPrefix("if (true)", 8); //$NON-NLS-1$
-	public final BlockContext ELSE_AFTER_STATEMENT= new BlockFormattingPrefix("if (true) foo(); else ", 15); //$NON-NLS-1$
-	public final BlockContext ELSE_AFTER_BLOCK= new BlockFormattingPrefix("if (true) {} else ", 11); //$NON-NLS-1$
+	public final BlockContext ELSE_AFTER_STATEMENT= new BlockFormattingPrefix("if (true) foo();else ", 15); //$NON-NLS-1$
+	public final BlockContext ELSE_AFTER_BLOCK= new BlockFormattingPrefix("if (true) {}else ", 11); //$NON-NLS-1$
 
 	public final BlockContext FOR_BLOCK= new BlockFormattingPrefix("for (;;) ", 7); //$NON-NLS-1$
 	public final BlockContext WHILE_BLOCK= new BlockFormattingPrefix("while (true)", 11); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
index 554a617..6843eaf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ImportRewriteAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.ImportDeclaration;
@@ -33,6 +34,7 @@ import org.eclipse.jdt.core.search.IJavaSearchConstants;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.TypeNameRequestor;
+import org.eclipse.jdt.internal.core.JavaProject;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.Region;
 import org.eclipse.text.edits.DeleteEdit;
@@ -53,6 +55,7 @@ public final class ImportRewriteAnalyzer {
 	private final int staticImportOnDemandThreshold;
 
 	private boolean filterImplicitImports;
+	private boolean useContextToFilterImplicitImports;
 	private boolean findAmbiguousImports;
 
 	private int flags= 0;
@@ -62,10 +65,18 @@ public final class ImportRewriteAnalyzer {
 
 	private static final String JAVA_LANG= "java.lang"; //$NON-NLS-1$
 
-	public ImportRewriteAnalyzer(ICompilationUnit cu, CompilationUnit root, String[] importOrder, int threshold, int staticThreshold, boolean restoreExistingImports) {
+	public ImportRewriteAnalyzer(
+			ICompilationUnit cu,
+			CompilationUnit root,
+			String[] importOrder,
+			int threshold,
+			int staticThreshold,
+			boolean restoreExistingImports,
+			boolean useContextToFilterImplicitImports) {
 		this.compilationUnit= cu;
 		this.importOnDemandThreshold= threshold;
 		this.staticImportOnDemandThreshold= staticThreshold;
+		this.useContextToFilterImplicitImports = useContextToFilterImplicitImports;
 
 		this.filterImplicitImports= true;
 		this.findAmbiguousImports= true; //!restoreExistingImports;
@@ -168,9 +179,55 @@ public final class ImportRewriteAnalyzer {
 		}
 	}
 
-	private static String getQualifier(ImportDeclaration decl) {
-		String name= decl.getName().getFullyQualifiedName();
-		return decl.isOnDemand() ? name : Signature.getQualifier(name);
+	private String getQualifier(ImportDeclaration decl) {
+		String name = decl.getName().getFullyQualifiedName();
+		/*
+		 * If it's on demand import, return the fully qualified name. (e.g. pack1.Foo.* => pack.Foo, pack1.* => pack1)
+		 * This is because we need to have pack1.Foo.* and pack1.Bar under different qualifier groups.
+		 */
+		if (decl.isOnDemand()) {
+			return name;
+		}
+		return getQualifier(name, decl.isStatic());
+	}
+
+	private String getQualifier(String name, boolean isStatic) {
+		// For static imports, return the Type name as well as part of the qualifier
+		if (isStatic || !this.useContextToFilterImplicitImports) {
+			return Signature.getQualifier(name);
+		}
+
+		char[] searchedName = name.toCharArray();
+		int index = name.length();
+		/* Stop at the last fragment */
+		JavaProject project = (JavaProject) this.compilationUnit.getJavaProject();
+		do {
+			String testedName = new String(searchedName, 0, index);
+			IJavaElement fragment = null;
+			try {
+				fragment = project.findPackageFragment(testedName);
+			} catch (JavaModelException e) {
+				return name;
+			}
+			if (fragment != null) {
+				return testedName;
+			}
+			try {
+				fragment = project.findType(testedName);
+			} catch (JavaModelException e) {
+				return name;
+			}
+			if (fragment != null) {
+				index = CharOperation.lastIndexOf(Signature.C_DOT, searchedName, 0, index - 1);
+			} else {
+				// we use the heuristic that a name starting with a lowercase is a package name
+				index = CharOperation.lastIndexOf(Signature.C_DOT, searchedName, 0, index - 1);
+				if (Character.isLowerCase(searchedName[index + 1])) {
+					return testedName;
+				}
+			}
+		} while (index >= 0); 
+		return name;
 	}
 
 	private static String getFullName(ImportDeclaration decl) {
@@ -209,7 +266,7 @@ public final class ImportRewriteAnalyzer {
 				currEndLine++;
 				nextOffset= root.getPosition(currEndLine, 0);
 			}
-			currPackage.add(new ImportDeclEntry(name, isStatic, new Region(currOffset, nextOffset - currOffset)));
+			currPackage.add(new ImportDeclEntry(packName.length(), name, isStatic, new Region(currOffset, nextOffset - currOffset)));
 			currOffset= nextOffset;
 			curr= next;
 
@@ -219,7 +276,7 @@ public final class ImportRewriteAnalyzer {
 
 				currPackage= new PackageEntry(); // create a comment package entry for this
 				this.packageEntries.add(currPackage);
-				currPackage.add(new ImportDeclEntry(null, false, new Region(currOffset, nextOffset - currOffset)));
+				currPackage.add(new ImportDeclEntry(packName.length(), null, false, new Region(currOffset, nextOffset - currOffset)));
 
 				currOffset= nextOffset;
 			}
@@ -234,21 +291,29 @@ public final class ImportRewriteAnalyzer {
 			this.packageEntries.add(currPackage);
 		}
 		int length= this.replaceRange.getOffset() + this.replaceRange.getLength() - curr.getStartPosition();
-		currPackage.add(new ImportDeclEntry(name, isStatic, new Region(curr.getStartPosition(), length)));
+		currPackage.add(new ImportDeclEntry(packName.length(), name, isStatic, new Region(curr.getStartPosition(), length)));
 	}
 
 	/**
-	 * Sets that implicit imports (types in default package, CU- package and
-	 * 'java.lang') should not be created. Note that this is a heuristic filter and can
-	 * lead to missing imports, e.g. in cases where a type is forced to be specified
-	 * due to a name conflict.
-	 * By default, the filter is enabled.
-	 * @param filterImplicitImports The filterImplicitImports to set
+	 * Specifies that implicit imports (for types in <code>java.lang</code>, types in the same package as the rewrite
+	 * compilation unit and types in the compilation unit's main type) should not be created, except if necessary to
+	 * resolve an on-demand import conflict.
+	 * <p>
+	 * The filter is enabled by default.
+	 * </p>
+	 * <p>
+	 * Note: {@link #ImportRewriteAnalyzer(ICompilationUnit, CompilationUnit, String[], int, int, boolean, boolean)} with true as the last
+	 * parameter can be used to filter implicit imports when a context is used.
+	 * </p>
+	 * 
+	 * @param filterImplicitImports
+	 *            if <code>true</code>, implicit imports will be filtered
+	 * 
+	 * @see #ImportRewriteAnalyzer(ICompilationUnit, CompilationUnit, String[], int, int, boolean, boolean)
 	 */
 	public void setFilterImplicitImports(boolean filterImplicitImports) {
 		this.filterImplicitImports= filterImplicitImports;
 	}
-
 	/**
 	 * When set searches for imports that can not be folded into on-demand
 	 * imports but must be specified explicitly
@@ -385,10 +450,11 @@ public final class ImportRewriteAnalyzer {
 		return bestMatch;
 	}
 
-	private static boolean isImplicitImport(String qualifier, ICompilationUnit cu) {
+	private boolean isImplicitImport(String qualifier) {
 		if (JAVA_LANG.equals(qualifier)) {
 			return true;
 		}
+		ICompilationUnit cu= this.compilationUnit;
 		String packageName= cu.getParent().getElementName();
 		if (qualifier.equals(packageName)) {
 			return true;
@@ -401,13 +467,13 @@ public final class ImportRewriteAnalyzer {
 	}
 
 	public void addImport(String fullTypeName, boolean isStatic) {
-		String typeContainerName= Signature.getQualifier(fullTypeName);
-		ImportDeclEntry decl= new ImportDeclEntry(fullTypeName, isStatic, null);
+		String typeContainerName= getQualifier(fullTypeName, isStatic);
+		ImportDeclEntry decl= new ImportDeclEntry(typeContainerName.length(), fullTypeName, isStatic, null);
 		sortIn(typeContainerName, decl, isStatic);
 	}
 
 	public boolean removeImport(String qualifiedName, boolean isStatic) {
-		String containerName= Signature.getQualifier(qualifiedName);
+		String containerName= getQualifier(qualifiedName, isStatic);
 
 		int nPackages= this.packageEntries.size();
 		for (int i= 0; i < nPackages; i++) {
@@ -453,9 +519,11 @@ public final class ImportRewriteAnalyzer {
 				PackageEntry packEntry= new PackageEntry(typeContainerName, group, isStatic);
 				packEntry.add(decl);
 				int index= this.packageEntries.indexOf(bestMatch);
-				if (cmp < 0) { 	// insert ahead of best match
+				if (cmp < 0) {
+					// insert ahead of best match
 					this.packageEntries.add(index, packEntry);
-				} else {		// insert after best match
+				} else {
+					// insert after best match
 					this.packageEntries.add(index + 1, packEntry);
 				}
 			}
@@ -522,17 +590,14 @@ public final class ImportRewriteAnalyzer {
 			int nPackageEntries= this.packageEntries.size();
 			for (int i= 0; i < nPackageEntries; i++) {
 				PackageEntry pack= (PackageEntry) this.packageEntries.get(i);
-				int nImports= pack.getNumberOfImports();
-
-				if (this.filterImplicitImports && !pack.isStatic() && isImplicitImport(pack.getName(), this.compilationUnit)) {
-					pack.removeAllNew(onDemandConflicts);
-					nImports= pack.getNumberOfImports();
+				if (this.filterImplicitImports && !pack.isStatic() && isImplicitImport(pack.getName())) {
+					pack.filterImplicitImports(this.useContextToFilterImplicitImports);
 				}
+				int nImports= pack.getNumberOfImports();
 				if (nImports == 0) {
 					continue;
 				}
 
-
 				if (spacesBetweenGroups > 0) {
 					// add a space between two different groups by looking at the two adjacent imports
 					if (lastPackage != null && !pack.isComment() && !pack.isSameGroup(lastPackage)) {
@@ -552,9 +617,10 @@ public final class ImportRewriteAnalyzer {
 
 				boolean doStarImport= pack.hasStarImport(threshold, onDemandConflicts);
 				if (doStarImport && (pack.find("*") == null)) { //$NON-NLS-1$
-					String starImportString= pack.getName() + ".*"; //$NON-NLS-1$
-					String str= getNewImportString(starImportString, isStatic, lineDelim);
-					stringsToInsert.add(str);
+					String[] imports = getNewImportStrings(pack, isStatic, lineDelim);
+					for (int j = 0, max = imports.length; j < max; j++) {
+						stringsToInsert.add(imports[j]);
+					}
 				}
 
 				for (int k= 0; k < nImports; k++) {
@@ -565,13 +631,27 @@ public final class ImportRewriteAnalyzer {
 						if (!doStarImport || currDecl.isOnDemand() || (onDemandConflicts != null && onDemandConflicts.contains(currDecl.getSimpleName()))) {
 							String str= getNewImportString(currDecl.getElementName(), isStatic, lineDelim);
 							stringsToInsert.add(str);
+						} else if (doStarImport && !currDecl.isOnDemand()) {
+							String simpleName = currDecl.getTypeQualifiedName();
+							if (simpleName.indexOf('.') != -1) {
+								String str= getNewImportString(currDecl.getElementName(), isStatic, lineDelim);
+								if (stringsToInsert.indexOf(str) == -1) {
+									stringsToInsert.add(str);
+								}
+							}
 						}
-					} else {
-						if (!doStarImport || currDecl.isOnDemand() || onDemandConflicts == null || onDemandConflicts.contains(currDecl.getSimpleName())) {
-							int offset= region.getOffset();
-							removeAndInsertNew(buffer, currPos, offset, stringsToInsert, resEdit);
-							stringsToInsert.clear();
-							currPos= offset + region.getLength();
+					} else if (!doStarImport || currDecl.isOnDemand() || onDemandConflicts == null || onDemandConflicts.contains(currDecl.getSimpleName())) {
+						int offset= region.getOffset();
+						removeAndInsertNew(buffer, currPos, offset, stringsToInsert, resEdit);
+						stringsToInsert.clear();
+						currPos= offset + region.getLength();
+					} else if (doStarImport && !currDecl.isOnDemand()) {
+						String simpleName = currDecl.getTypeQualifiedName();
+						if (simpleName.indexOf('.') != -1) {
+							String str= getNewImportString(currDecl.getElementName(), isStatic, lineDelim);
+							if (stringsToInsert.indexOf(str) == -1) {
+								stringsToInsert.add(str);
+							}
 						}
 					}
 				}
@@ -724,6 +804,25 @@ public final class ImportRewriteAnalyzer {
 		}
 		return buf.toString();
 	}
+	
+	private String[] getNewImportStrings(PackageEntry packageEntry, boolean isStatic, String lineDelim) {
+		boolean isStarImportAdded = false;
+		List allImports = new ArrayList();
+		int nImports = packageEntry.getNumberOfImports();
+		for (int i= 0; i < nImports; i++) {
+			ImportDeclEntry curr= packageEntry.getImportAt(i);
+			String simpleName = curr.getTypeQualifiedName();
+			if (simpleName.indexOf('.') != -1) {
+				// member type imports - we preserve it
+				allImports.add(getNewImportString(curr.getElementName(), isStatic, lineDelim));
+			} else if (!isStarImportAdded) {
+				String starImportString= packageEntry.getName() + ".*"; //$NON-NLS-1$
+				allImports.add(getNewImportString(starImportString, isStatic, lineDelim));
+				isStarImportAdded = true;
+			}
+		}
+		return (String[]) allImports.toArray(new String[allImports.size()]);
+	}
 
 	private static int getFirstTypeBeginPos(CompilationUnit root) {
 		List types= root.types();
@@ -748,13 +847,11 @@ public final class ImportRewriteAnalyzer {
 			}
 			int firstTypePos= getFirstTypeBeginPos(root);
 			if (firstTypePos != -1 && firstTypePos <= afterPackageStatementPos) {
-				if (firstTypePos <= afterPackageStatementPos) {
-					this.flags|= F_NEEDS_TRAILING_DELIM;
-					if (firstTypePos == afterPackageStatementPos) {
-						this.flags|= F_NEEDS_LEADING_DELIM;
-					}
-					return firstTypePos;
+				this.flags|= F_NEEDS_TRAILING_DELIM;
+				if (firstTypePos == afterPackageStatementPos) {
+					this.flags|= F_NEEDS_LEADING_DELIM;
 				}
+				return firstTypePos;
 			}
 			this.flags|= F_NEEDS_LEADING_DELIM;
 			return afterPackageStatementPos; // insert a line after after package statement
@@ -781,11 +878,13 @@ public final class ImportRewriteAnalyzer {
 		private String elementName;
 		private IRegion sourceRange;
 		private final boolean isStatic;
+		private int containerNameLength;
 
-		public ImportDeclEntry(String elementName, boolean isStatic, IRegion sourceRange) {
+		public ImportDeclEntry(int containerNameLength, String elementName, boolean isStatic, IRegion sourceRange) {
 			this.elementName= elementName;
 			this.sourceRange= sourceRange;
 			this.isStatic= isStatic;
+			this.containerNameLength = containerNameLength;
 		}
 
 		public String getElementName() {
@@ -807,6 +906,10 @@ public final class ImportRewriteAnalyzer {
 			return Signature.getSimpleName(this.elementName);
 		}
 
+		public String getTypeQualifiedName() {
+			return this.elementName.substring(this.containerNameLength + 1);
+		}
+		
 		public boolean isOnDemand() {
 			return this.elementName != null && this.elementName.endsWith(".*"); //$NON-NLS-1$
 		}
@@ -930,12 +1033,21 @@ public final class ImportRewriteAnalyzer {
 			return false;
 		}
 
-		public void removeAllNew(Set onDemandConflicts) {
+		public void filterImplicitImports(boolean useContextToFilterImplicitImports) {
 			int nInports= this.importEntries.size();
 			for (int i= nInports - 1; i >= 0; i--) {
 				ImportDeclEntry curr= getImportAt(i);
-				if (curr.isNew() /*&& (onDemandConflicts == null || onDemandConflicts.contains(curr.getSimpleName()))*/) {
-					this.importEntries.remove(i);
+				if (curr.isNew()) {
+					if (!useContextToFilterImplicitImports) {
+						this.importEntries.remove(i);
+					} else {
+						String elementName = curr.getElementName();
+						int lastIndexOf = elementName.lastIndexOf('.');
+						boolean internalClassImport = lastIndexOf > getName().length();
+						if (!internalClassImport) {
+							this.importEntries.remove(i);
+						}
+					}
 				}
 			}
 		}
@@ -1006,11 +1118,11 @@ public final class ImportRewriteAnalyzer {
 				int nImports= getNumberOfImports();
 				for (int i= 0; i < nImports; i++) {
 					ImportDeclEntry curr= getImportAt(i);
-					buf.append("  "); //$NON-NLS-1$
+					buf.append(" "); //$NON-NLS-1$
 					if (curr.isStatic()) {
 						buf.append("static "); //$NON-NLS-1$
 					}
-					buf.append(curr.getSimpleName());
+					buf.append(curr.getTypeQualifiedName());
 					if (curr.isNew()) {
 						buf.append(" (new)"); //$NON-NLS-1$
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
index c6665e3..7b06a7f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,10 @@ package org.eclipse.jdt.internal.eval;
 import org.eclipse.jdt.internal.compiler.ast.AllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.CastExpression;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
+import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
@@ -119,6 +123,48 @@ public TypeBinding resolveType(BlockScope scope) {
 	// Propagate the type checking to the arguments, and check if the constructor is defined.
 	this.constant = Constant.NotAConstant;
 	this.resolvedType = this.type.resolveType(scope, true /* check bounds*/); // will check for null after args are resolved
+	checkParameterizedAllocation: {
+		if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
+			ReferenceBinding currentType = (ReferenceBinding)this.resolvedType;
+			if (currentType == null) return currentType;
+			do {
+				// isStatic() is answering true for toplevel types
+				if ((currentType.modifiers & ClassFileConstants.AccStatic) != 0) break checkParameterizedAllocation;
+				if (currentType.isRawType()) break checkParameterizedAllocation;
+			} while ((currentType = currentType.enclosingType())!= null);
+			ParameterizedQualifiedTypeReference qRef = (ParameterizedQualifiedTypeReference) this.type;
+			for (int i = qRef.typeArguments.length - 2; i >= 0; i--) {
+				if (qRef.typeArguments[i] != null) {
+					scope.problemReporter().illegalQualifiedParameterizedTypeAllocation(this.type, this.resolvedType);
+					break;
+				}
+			}
+		}
+	}
+
+	// resolve type arguments (for generic constructor call)
+	if (this.typeArguments != null) {
+		int length = this.typeArguments.length;
+		boolean argHasError = scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_5;
+		this.genericTypeArguments = new TypeBinding[length];
+		for (int i = 0; i < length; i++) {
+			TypeReference typeReference = this.typeArguments[i];
+			if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) {
+				argHasError = true;
+			}
+			if (argHasError && typeReference instanceof Wildcard) {
+				scope.problemReporter().illegalUsageOfWildcard(typeReference);
+			}
+		}
+		if (argHasError) {
+			if (this.arguments != null) { // still attempt to resolve arguments
+				for (int i = 0, max = this.arguments.length; i < max; i++) {
+					this.arguments[i].resolveType(scope);
+				}
+			}
+			return null;
+		}
+	}
 
 	// buffering the arguments' types
 	boolean argsContainCast = false;
@@ -204,8 +250,8 @@ public TypeBinding resolveType(BlockScope scope) {
 	}
 	if (this.arguments != null) {
 		for (int i = 0; i < this.arguments.length; i++) {
-		    TypeBinding parameterType = this.binding.parameters[i];
-		    TypeBinding argumentType = argumentTypes[i];
+			TypeBinding parameterType = this.binding.parameters[i];
+			TypeBinding argumentType = argumentTypes[i];
 			this.arguments[i].computeConversion(scope, parameterType, argumentType);
 			if (argumentType.needsUncheckedConversion(parameterType)) {
 				scope.problemReporter().unsafeTypeConversion(this.arguments[i], argumentType, parameterType);
@@ -216,7 +262,10 @@ public TypeBinding resolveType(BlockScope scope) {
 		}
 	}
 	if (allocatedType.isRawType() && this.binding.hasSubstitutedParameters()) {
-	    scope.problemReporter().unsafeRawInvocation(this, this.binding);
+		scope.problemReporter().unsafeRawInvocation(this, this.binding);
+	}
+	if (this.typeArguments != null && this.binding.original().typeVariables == Binding.NO_TYPE_VARIABLES) {
+		scope.problemReporter().unnecessaryTypeArgumentsForMethodInvocation(this.binding, this.genericTypeArguments, this.typeArguments);
 	}
 	return allocatedType;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
index 36e4122..52c943d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,10 +56,6 @@ public CodeSnippetClassFile(
 	this.header[this.headerOffset++] = (byte) (0xCAFEBABEL >> 0);
 
 	long targetVersion = this.targetJDK = this.referenceBinding.scope.compilerOptions().targetJDK;
-
-	if (targetVersion == ClassFileConstants.JDK1_7) {
-		targetVersion = ClassFileConstants.JDK1_6;
-	}
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 8); // minor high
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 0); // minor low
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 24); // major high
@@ -144,6 +140,15 @@ public static void createProblemType(TypeDeclaration typeDeclaration, Compilatio
 	ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true);
 
 	// inner attributes
+	if (typeBinding.hasMemberTypes()) {
+		// see bug 180109
+		ReferenceBinding[] members = typeBinding.memberTypes;
+		for (int i = 0, l = members.length; i < l; i++)
+			classFile.recordInnerClasses(members[i]);
+	}
+	// TODO (olivier) handle cases where a field cannot be generated (name too long)
+	// TODO (olivier) handle too many methods
+	// inner attributes
 	if (typeBinding.isNestedType()) {
 		classFile.recordInnerClasses(typeBinding);
 	}
@@ -184,6 +189,7 @@ public static void createProblemType(TypeDeclaration typeDeclaration, Compilatio
 				AbstractMethodDeclaration methodDecl = methodDecls[i];
 				MethodBinding method = methodDecl.binding;
 				if (method == null || method.isConstructor()) continue;
+				method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
 				classFile.addAbstractMethod(methodDecl, method);
 			}
 		} else {
@@ -193,6 +199,8 @@ public static void createProblemType(TypeDeclaration typeDeclaration, Compilatio
 				if (method == null) continue;
 				if (method.isConstructor()) {
 					classFile.addProblemConstructor(methodDecl, method, problemsCopy);
+				} else if (method.isAbstract()) {
+					classFile.addAbstractMethod(methodDecl, method);
 				} else {
 					classFile.addProblemMethod(methodDecl, method, problemsCopy);
 				}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
index 8383a10..0a40e7c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -84,6 +84,59 @@ protected void classInstanceCreation(boolean alwaysQualified) {
 		this.astLengthPtr--;
 	}
 }
+protected void consumeClassInstanceCreationExpressionWithTypeArguments() {
+	// ClassInstanceCreationExpression ::= 'new' TypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt
+	AllocationExpression alloc;
+	int length;
+	if (((length = this.astLengthStack[this.astLengthPtr--]) == 1)
+		&& (this.astStack[this.astPtr] == null)) {
+		//NO ClassBody
+		this.astPtr--;
+		alloc = new CodeSnippetAllocationExpression(this.evaluationContext);
+		alloc.sourceEnd = this.endPosition; //the position has been stored explicitly
+
+		if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+			this.expressionPtr -= length;
+			System.arraycopy(
+				this.expressionStack,
+				this.expressionPtr + 1,
+				alloc.arguments = new Expression[length],
+				0,
+				length);
+		}
+		alloc.type = getTypeReference(0);
+
+		length = this.genericsLengthStack[this.genericsLengthPtr--];
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, alloc.typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;
+
+		//the default constructor with the correct number of argument
+		//will be created and added by the TC (see createsInternalConstructorWithBinding)
+		alloc.sourceStart = this.intStack[this.intPtr--];
+		pushOnExpressionStack(alloc);
+	} else {
+		dispatchDeclarationInto(length);
+		TypeDeclaration anonymousTypeDeclaration = (TypeDeclaration)this.astStack[this.astPtr];
+		anonymousTypeDeclaration.declarationSourceEnd = this.endStatementPosition;
+		anonymousTypeDeclaration.bodyEnd = this.endStatementPosition;
+		if (length == 0 && !containsComment(anonymousTypeDeclaration.bodyStart, anonymousTypeDeclaration.bodyEnd)) {
+			anonymousTypeDeclaration.bits |= ASTNode.UndocumentedEmptyBlock;
+		}
+		this.astPtr--;
+		this.astLengthPtr--;
+
+		QualifiedAllocationExpression allocationExpression = anonymousTypeDeclaration.allocation;
+		if (allocationExpression != null) {
+			allocationExpression.sourceEnd = this.endStatementPosition;
+			// handle type arguments
+			length = this.genericsLengthStack[this.genericsLengthPtr--];
+			this.genericsPtr -= length;
+			System.arraycopy(this.genericsStack, this.genericsPtr + 1, allocationExpression.typeArguments = new TypeReference[length], 0, length);
+			allocationExpression.sourceStart = this.intStack[this.intPtr--];
+		}
+	}
+}
 protected void consumeClassDeclaration() {
 	super.consumeClassDeclaration();
 	/* recovery */
@@ -177,53 +230,6 @@ protected void consumeFieldAccess(boolean isSuperAccess) {
 		this.expressionStack[this.expressionPtr] = fr;
 	}
 }
-protected void consumeInterfaceHeaderName1() {
-	// InterfaceHeaderName ::= Modifiersopt 'interface' 'Identifier'
-	TypeDeclaration typeDecl;
-	if (this.nestedMethod[this.nestedType] == 0) {
-		if (this.nestedType != 0) {
-			typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
-			typeDecl.bits |= ASTNode.IsMemberType;
-		} else {
-			typeDecl = new CodeSnippetTypeDeclaration(this.compilationUnit.compilationResult);
-		}
-	} else {
-		// Record that the block has a declaration for local types
-		typeDecl = new TypeDeclaration(this.compilationUnit.compilationResult);
-		typeDecl.bits |= ASTNode.IsLocalType;
-		markEnclosingMemberWithLocalType();
-		blockReal();
-	}
-
-	//highlight the name of the type
-	long pos = this.identifierPositionStack[this.identifierPtr];
-	typeDecl.sourceEnd = (int) pos;
-	typeDecl.sourceStart = (int) (pos >>> 32);
-	typeDecl.name = this.identifierStack[this.identifierPtr--];
-	this.identifierLengthPtr--;
-
-	//compute the declaration source too
-	typeDecl.declarationSourceStart = this.intStack[this.intPtr--];
-	this.intPtr--;
-	// 'class' and 'interface' push an int position
-	typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
-	typeDecl.modifiers = this.intStack[this.intPtr--];
-	if (typeDecl.modifiersSourceStart >= 0) {
-		typeDecl.declarationSourceStart = typeDecl.modifiersSourceStart;
-	}
-	typeDecl.bodyStart = typeDecl.sourceEnd + 1;
-	pushOnAstStack(typeDecl);
-	this.listLength = 0; // will be updated when reading super-interfaces
-	// recovery
-	if (this.currentElement != null){ // is recovering
-		this.lastCheckPoint = typeDecl.bodyStart;
-		this.currentElement = this.currentElement.add(typeDecl, 0);
-		this.lastIgnoredToken = -1;
-	}
-	// javadoc
-	typeDecl.javadoc = this.javadoc;
-	this.javadoc = null;
-}
 protected void consumeInternalCompilationUnit() {
 	// InternalCompilationUnit ::= PackageDeclaration
 	// InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports
@@ -295,9 +301,14 @@ protected void consumeMethodDeclaration(boolean isNotAbstract) {
 			if (nameEnd >= 0) {
 				trimmedTypeName = CharOperation.subarray(trimmedTypeName, 0, nameEnd);
 			}
-			TypeReference typeReference = new QualifiedTypeReference(
-				CharOperation.splitOn('.', trimmedTypeName),
-				positions);
+			TypeReference typeReference;
+			if (CharOperation.indexOf('.', trimmedTypeName) == -1) {
+				typeReference = new SingleTypeReference(trimmedTypeName, position);
+			} else {
+				typeReference = new QualifiedTypeReference(
+						CharOperation.splitOn('.', trimmedTypeName),
+						positions);
+			}
 			int dimCount = CharOperation.occurencesOf('[', this.evaluationContext.localVariableTypeNames[i]);
 			if (dimCount > 0) {
 				typeReference = copyDims(typeReference, dimCount);
@@ -325,10 +336,11 @@ protected void consumeMethodDeclaration(boolean isNotAbstract) {
 		finallyBlock.sourceEnd = end;
 		finallyBlock.statements = new Statement[varCount];
 		for (int i = 0; i < varCount; i++){
+			SingleNameReference nameRef = new SingleNameReference(this.evaluationContext.localVariableNames[i], position);
 			finallyBlock.statements[i] = new Assignment(
 				new SingleNameReference(CharOperation.concat(LOCAL_VAR_PREFIX, this.evaluationContext.localVariableNames[i]), position),
-				new SingleNameReference(this.evaluationContext.localVariableNames[i], position),
-				(int) position);
+				nameRef,
+				nameRef.sourceEnd);
 		}
 		tryStatement.finallyBlock = finallyBlock;
 
@@ -364,7 +376,35 @@ protected void consumeMethodInvocationName() {
 		super.consumeMethodInvocationName();
 	}
 }
+protected void consumeMethodInvocationNameWithTypeArguments() {
+	// MethodInvocation ::= Name '.' TypeArguments 'Identifier' '(' ArgumentListopt ')'
 
+	// when the name is only an identifier...we have a message send to "this" (implicit)
+	if (this.scanner.startPosition >= this.codeSnippetStart
+			&& this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838
+			&& isTopLevelType()) {
+
+	
+		MessageSend m = newMessageSendWithTypeArguments();
+		m.sourceEnd = this.rParenPos;
+		m.sourceStart =
+			(int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
+		m.selector = this.identifierStack[this.identifierPtr--];
+		this.identifierLengthPtr--;
+	
+		// handle type arguments
+		int length = this.genericsLengthStack[this.genericsLengthPtr--];
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;
+	
+		m.receiver = getUnspecifiedReference();
+		m.sourceStart = m.receiver.sourceStart;
+		pushOnExpressionStack(m);
+	} else {
+		super.consumeMethodInvocationNameWithTypeArguments();
+	}
+}
 protected void consumeMethodInvocationSuper() {
 	// MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')'
 
@@ -377,6 +417,25 @@ protected void consumeMethodInvocationSuper() {
 	m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition);
 	pushOnExpressionStack(m);
 }
+protected void consumeMethodInvocationSuperWithTypeArguments() {
+	// MethodInvocation ::= 'super' '.' TypeArguments 'Identifier' '(' ArgumentListopt ')'
+
+	MessageSend m = newMessageSendWithTypeArguments();
+	this.intPtr--; // start position of the typeArguments
+	m.sourceEnd = this.rParenPos;
+	m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr];
+	m.selector = this.identifierStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+
+	// handle type arguments
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	this.genericsPtr -= length;
+	System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
+	m.sourceStart = this.intStack[this.intPtr--]; // start position of the super keyword
+
+	m.receiver = new CodeSnippetSuperReference(m.sourceStart, this.endPosition);
+	pushOnExpressionStack(m);
+}
 protected void consumePrimaryNoNewArrayThis() {
 	// PrimaryNoNewArray ::= 'this'
 
@@ -673,6 +732,22 @@ protected MessageSend newMessageSend() {
 	}
 	return m;
 }
+protected MessageSend newMessageSendWithTypeArguments() {
+	// '(' ArgumentListopt ')'
+	// the arguments are on the expression stack
+	CodeSnippetMessageSend m = new CodeSnippetMessageSend(this.evaluationContext);
+	int length;
+	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		this.expressionPtr -= length;
+		System.arraycopy(
+			this.expressionStack,
+			this.expressionPtr + 1,
+			m.arguments = new Expression[length],
+			0,
+			length);
+	}
+	return m;
+}
 /**
  * Records the scanner position if we're parsing a top level type.
  */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
index a6b30a0..4ec8e3e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,7 +125,11 @@ public final boolean canBeSeenByForCodeSnippet(FieldBinding fieldBinding, TypeBi
 	PackageBinding declaringPackage = fieldBinding.declaringClass.fPackage;
 	TypeBinding originalDeclaringClass = fieldBinding.declaringClass .original();
 	do {
-		if (originalDeclaringClass == type.original()) return true;
+		if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
+			if (originalDeclaringClass == type.erasure().original()) return true;	
+		} else {
+			if (originalDeclaringClass == type.original()) return true;
+		}
 		if (declaringPackage != type.fPackage) return false;
 	} while ((type = type.superclass()) != null);
 	return false;
@@ -196,7 +200,11 @@ public final boolean canBeSeenByForCodeSnippet(MethodBinding methodBinding, Type
 	PackageBinding declaringPackage = methodBinding.declaringClass.fPackage;
 	TypeBinding originalDeclaringClass = methodBinding.declaringClass .original();
 	do {
-		if (originalDeclaringClass == type.original()) return true;
+		if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
+			if (originalDeclaringClass == type.erasure().original()) return true;
+		} else {
+			if (originalDeclaringClass == type.original()) return true;
+		}
 		if (declaringPackage != type.fPackage) return false;
 	} while ((type = type.superclass()) != null);
 	return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
index c55be42..5fd2256 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetToCuMapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,7 +56,6 @@ class CodeSnippetToCuMapper implements EvaluationConstants {
 	// Mapping of external local variables
 	char[][] localVarNames;
 	char[][] localVarTypeNames;
-	int[] localVarModifiers;
 
 /**
  * Rebuild source in presence of external local variables
@@ -69,7 +68,6 @@ class CodeSnippetToCuMapper implements EvaluationConstants {
 	this.snippetVarClassName = varClassName;
 	this.localVarNames = localVarNames;
 	this.localVarTypeNames = localVarTypeNames;
-	this.localVarModifiers = localVarModifiers;
 	this.snippetDeclaringTypeName = declaringTypeName;
 	buildCUSource(lineSeparator);
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
index 56e7457..5a09110 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -512,7 +512,7 @@ public char[] getPackageName() {
 	return this.packageName;
 }
 /**
- * Return the binary for the root code snippet class (ie. org.eclipse.jdt.internal.eval.target.CodeSnippet).
+ * Return the binary for the root code snippet class (i.e. org.eclipse.jdt.internal.eval.target.CodeSnippet).
  */
 IBinaryType getRootCodeSnippetBinary() {
 	if (this.codeSnippetBinary == null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationResult.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationResult.java
index 533be9e..c0828c3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationResult.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/EvaluationResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.jdt.core.compiler.CategorizedProblem;
  * An EvaluationResult is the result of a code snippet evaluation, a global
  * variable evaluation or it is used to report problems against imports and
  * package declaration.
- * It primarily contains the representation of the resulting value (eg. its
+ * It primarily contains the representation of the resulting value (e.g. its
  * toString() representation). However if the code snippet, a global variable
  * definition, an import or the package declaration could not be compiled, it
  * contains the corresponding compilation problems.
@@ -129,7 +129,7 @@ public Object getValue() {
  * Returns the displayable representation of this result's value.
  * This is obtained by sending toString() to the result object on the target side
  * if it is not a primitive value. If it is a primitive value, the corresponding
- * static toString(...) is used, eg. Integer.toString(int n) if it is an int.
+ * static toString(...) is used, e.g. Integer.toString(int n) if it is an int.
  * Returns null if there is no value.
  */
 public char[] getValueDisplayString() {
@@ -138,7 +138,7 @@ public char[] getValueDisplayString() {
 /**
  * Returns the dot-separated fully qualified name of this result's value type.
  * If the value is a primitive value, returns the toString() representation of its type
- * (eg. "int", "boolean", etc.)
+ * (e.g. "int", "boolean", etc.)
  * Returns null if there is no value.
  */
 public char[] getValueTypeName() {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/GlobalVariable.java b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/GlobalVariable.java
index 4764ee4..4b28df4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/GlobalVariable.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/GlobalVariable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public GlobalVariable(char[] typeName, char[] name, char[] initializer) {
 }
 /**
  * Returns the initializer of this global variable. The initializer is a
- * variable initializer (ie. an expression or an array initializer) as defined
+ * variable initializer (i.e. an expression or an array initializer) as defined
  * in the Java Language Specifications.
  */
 public char[] getInitializer() {
@@ -45,7 +45,7 @@ public char[] getName() {
 }
 /**
  * Returns the dot separated fully qualified name of the type of this global variable,
- * or its simple representation if it is a primitive type (eg. int, boolean, etc.)
+ * or its simple representation if it is a primitive type (e.g. int, boolean, etc.)
  */
 public char[] getTypeName() {
 	return this.typeName;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java
index ab3b61b..787d4e6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,25 +24,53 @@ public abstract class CodeFormatter {
 
 	/**
 	 * Unknown kind
-	 *
-	 * Note that since 3.4, the {@link #F_INCLUDE_COMMENTS} flag can be added
-	 * to this constant in order to get the comments formatted if a compilation unit
-	 * is processed.
+	 *<p>
+	 * <b>Since 3.6</b>, if the corresponding comment options are set to
+	 * <code>true</code> then it is also possible to format the comments on the fly
+	 * by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
+	 * </p>
 	 */
 	public static final int K_UNKNOWN = 0x00;
 
 	/**
 	 * Kind used to format an expression
+	 * <p>
+	 * Note that using this constant, the comments encountered while formatting
+	 * the expression may be shifted to match the correct indentation but are not
+	 * formatted.
+	 * </p><p>
+	 * <b>Since 3.6</b>, if the corresponding comment options are set to
+	 * <code>true</code> then it is also possible to format the comments on the fly
+	 * by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
+	 * </p>
 	 */
 	public static final int K_EXPRESSION = 0x01;
 
 	/**
 	 * Kind used to format a set of statements
+	 * <p>
+	 * Note that using this constant, the comments encountered while formatting
+	 * the statements may be shifted to match the correct indentation but are not
+	 * formatted.
+	 * </p><p>
+	 * <b>Since 3.6</b>, if the corresponding comment options are set to
+	 * <code>true</code> then it is also possible to format the comments on the fly
+	 * by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
+	 * </p>
 	 */
 	public static final int K_STATEMENTS = 0x02;
 
 	/**
 	 * Kind used to format a set of class body declarations
+	 * <p>
+	 * Note that using this constant, the comments encountered while formatting
+	 * the body declarations may be shifted to match the correct indentation but
+	 * are not formatted.
+	 * </p><p>
+	 * <b>Since 3.6</b>, if the corresponding comment options are set to
+	 * <code>true</code> then it is also possible to format the comments on the fly
+	 * by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
+	 * </p>
 	 */
 	public static final int K_CLASS_BODY_DECLARATIONS = 0x04;
 
@@ -50,11 +78,12 @@ public abstract class CodeFormatter {
 	 * Kind used to format a compilation unit
 	 * <p>
 	 * Note that using this constant, the comments are only indented while
-	 * processing the compilation unit.
+	 * formatting the compilation unit.
 	 * </p><p>
 	 * <b>Since 3.4</b>, if the corresponding comment option is set to
 	 * <code>true</code> then it is also possible to format the comments on the fly
 	 * by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
+	 * </p>
 	 */
 	public static final int K_COMPILATION_UNIT = 0x08;
 
@@ -81,18 +110,28 @@ public abstract class CodeFormatter {
 	 * Flag used to include the comments during the formatting of the code
 	 * snippet.
 	 * <p>
-	 * This flag can only be combined with {@link #K_COMPILATION_UNIT} and
-	 * {@link #K_UNKNOWN} kinds for now but might be extended to other ones
-	 * in future versions.
+	 * This flag can be combined with the following kinds:
+	 * <ul>
+	 * 		<li>{@link #K_COMPILATION_UNIT}</li>
+	 * 		<li>{@link #K_UNKNOWN}</li>
+	 * 		<li>{@link #K_CLASS_BODY_DECLARATIONS} <i>(since 3.6)</i></li>
+	 * 		<li>{@link #K_EXPRESSION} <i>(since 3.6)</i></li>
+	 * 		<li>{@link #K_STATEMENTS} <i>(since 3.6)</i></li>
+	 * </ul>
 	 * </p><p>
-	 * Note also that it has an effect only when the option
-	 * {@link DefaultCodeFormatterConstants#FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT}
-	 * is set to {@link DefaultCodeFormatterConstants#TRUE} while calling
+	 * Note also that it has an effect only when one or several format comments
+	 * options for
+	 * {@link DefaultCodeFormatterConstants#FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT javadoc}
+	 * ,
+	 * {@link DefaultCodeFormatterConstants#FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT block}
+	 * or
+	 * {@link DefaultCodeFormatterConstants#FORMATTER_COMMENT_FORMAT_LINE_COMMENT line}
+	 * are set to {@link DefaultCodeFormatterConstants#TRUE true} while calling
 	 * {@link #format(int, String, int, int, int, String)} or
 	 * {@link #format(int, String, IRegion[], int, String)} methods
 	 * </p><p>
-	 * For example, with the Eclipse default formatter options, the formatting of
-	 * the following code snippet using {@link #K_COMPILATION_UNIT}:
+	 * For example, with the Eclipse default formatter options, the formatting
+	 * of the following code snippet using {@link #K_COMPILATION_UNIT}:
 	 * <pre>
 	 * public class X {
 	 * /**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
index 6f122fa..4be41a6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak - Contribution for bug 150741
  *******************************************************************************/
 package org.eclipse.jdt.core.formatter;
 
@@ -86,6 +87,17 @@ public class DefaultCodeFormatterConstants {
 	public static final String FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT = JavaCore.PLUGIN_ID + ".formatter.alignment_for_arguments_in_enum_constant";	 //$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option for alignment of arguments in annotation
+	 *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation"
+	 *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+	 *     - default:           createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
+	 * </pre>
+	 * @see #createAlignmentValue(boolean, int, int)
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION = JavaCore.PLUGIN_ID + ".formatter.alignment_for_arguments_in_annotation";	 //$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / Option for alignment of arguments in explicit constructor call
 	 *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call"
 	 *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
@@ -122,7 +134,7 @@ public class DefaultCodeFormatterConstants {
 	 * FORMATTER / Option for alignment of assignment
 	 *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_assignment"
 	 *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
-	 *     - default:           createAlignmentValue(false, M_NO_ALIGNMENT, INDENT_DEFAULT)
+	 *     - default:           createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
 	 * </pre>
 	 * @see #createAlignmentValue(boolean, int, int)
 	 * @since 3.2
@@ -185,6 +197,17 @@ public class DefaultCodeFormatterConstants {
 	public static final String FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.alignment_for_expressions_in_array_initializer";	 //$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option for alignment of method declaration
+	 *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_method_declaration"
+	 *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+	 *     - default:           createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
+	 * </pre>
+	 * @see #createAlignmentValue(boolean, int, int)
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION = JavaCore.PLUGIN_ID + ".formatter.alignment_for_method_declaration";	 //$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / Option for alignment of multiple fields
 	 *     - option id:         "org.eclipse.jdt.core.formatter.alignment_for_multiple_fields"
 	 *     - possible values:   values returned by <code>createAlignmentValue(boolean, int, int)</code> call
@@ -629,6 +652,24 @@ public class DefaultCodeFormatterConstants {
 	 * @since 3.3
 	 */
 	public final static String FORMATTER_COMMENT_FORMAT_LINE_COMMENT = "org.eclipse.jdt.core.formatter.comment.format_line_comments"; //$NON-NLS-1$
+	/**
+	 * <pre>
+	 * FORMATTER / Option to format line comments that start on the first column
+	 *     - option id:         "org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column"
+	 *     - possible values:   { TRUE, FALSE }
+	 *     - default:           TRUE
+	 * </pre>
+	 * Note that this option is ignored if either the
+	 * {@link #FORMATTER_COMMENT_FORMAT_LINE_COMMENT} option has been set to
+	 * {@link #FALSE} or the formatter is created with the mode
+	 * {@link ToolFactory#M_FORMAT_NEW}.
+	 * 
+	 * @see #TRUE
+	 * @see #FALSE
+	 * @see ToolFactory#createCodeFormatter(Map, int)
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN = JavaCore.PLUGIN_ID + ".formatter.format_line_comment_starting_on_first_column"; //$NON-NLS-1$
 
 	/**
 	 * <pre>
@@ -760,6 +801,32 @@ public class DefaultCodeFormatterConstants {
 
 	/**
 	 * <pre>
+	 * FORMATTER / Option to control whether block comments will have new lines at boundaries
+	 *     - option id:         "org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries"
+	 *     - possible values:   { TRUE, FALSE }
+	 *     - default:           TRUE
+	 * </pre>
+	 * @see #TRUE
+	 * @see #FALSE
+	 * @since 3.6
+	 */
+	public final static String FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES = "org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries"; //$NON-NLS-1$
+
+	/**
+	 * <pre>
+	 * FORMATTER / Option to control whether javadoc comments will have new lines at boundaries
+	 *     - option id:         "org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries"
+	 *     - possible values:   { TRUE, FALSE }
+	 *     - default:           TRUE
+	 * </pre>
+	 * @see #TRUE
+	 * @see #FALSE
+	 * @since 3.6
+	 */
+	public final static String FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES = "org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries"; //$NON-NLS-1$
+
+	/**
+	 * <pre>
 	 * FORMATTER / Option to compact else/if
 	 *     - option id:         "org.eclipse.jdt.core.formatter.compact_else_if"
 	 *     - possible values:   { TRUE, FALSE }
@@ -793,6 +860,191 @@ public class DefaultCodeFormatterConstants {
 	public static final String FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER = JavaCore.PLUGIN_ID + ".formatter.continuation_indentation_for_array_initializer";	//$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option to use the disabling and enabling tags defined respectively by the {@link #FORMATTER_DISABLING_TAG} and the {@link #FORMATTER_ENABLING_TAG} options.
+	 *     - option id:         "org.eclipse.jdt.core.formatter.use_on_off_tags"
+	 *     - possible values:   TRUE / FALSE
+	 *     - default:           FALSE
+	 * </pre>
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_USE_ON_OFF_TAGS = JavaCore.PLUGIN_ID + ".formatter.use_on_off_tags";	//$NON-NLS-1$
+	/**
+	 * <pre>
+	 * FORMATTER / Option to define the tag to put in a comment to disable the formatting.
+	 *     - option id:         "org.eclipse.jdt.core.formatter.disabling_tag"
+	 *     - possible values:   String, with constraints mentioned below
+	 *     - default:           "@formatter:off"
+	 * 
+	 * See the {@link #FORMATTER_ENABLING_TAG} option to re-enable it.
+	 * </pre>
+	 * 
+	 * <p>
+	 * Note that:
+	 * <ol>
+	 * <li>This tag is used by the formatter only if the 
+	 * {@link #FORMATTER_USE_ON_OFF_TAGS} option is set to {@link #TRUE}.</li>
+	 * <li>The tag name will be trimmed. Hence if it does contain white spaces
+	 * at the beginning or at the end, they will not be taken into account while
+	 * searching for the tag in the comments</li>
+	 * <li>If a tag is starting with a letter or digit, then it cannot be leaded by
+	 * another letter or digit to be recognized
+	 * (<code>"ToDisableFormatter"</code> will not be recognized as a disabling tag
+	 * <code>"DisableFormatter"</code>, but <code>"To:DisableFormatter"</code>
+	 * will be detected for either tag <code>"DisableFormatter"</code> or
+	 * <code>":DisableFormatter"</code>).<br>
+	 * Respectively, a tag ending with a letter or digit cannot be followed by a letter
+	 * or digit to be recognized (<code>"DisableFormatter1"</code> will not be
+	 * recognized as a disabling tag <code>"DisableFormatter"</code>, but
+	 * <code>"DisableFormatter:1"</code> will be detected either for tag
+	 * <code>"DisableFormatter"</code> or <code>"DisableFormatter:"</code>)</li>
+	 * <li>As soon as the formatter encounters the defined disabling tag, it stops to
+	 * format the code from the beginning of the comment including this tag. If it
+	 * was already disabled, the tag has no special effect.
+	 * <p>
+	 * For example, the second default enabling tag "<b>@formatter:off</b>"
+	 * in the following snippet is not necessary as the formatter was already disabled
+	 * since the first one:
+	 * <pre>
+	 * class X {
+	 * // @formatter:off
+	 * void foo1() {}
+	 * // @formatter:off
+	 * void foo2() {}
+	 * void bar1() {}
+	 * void bar2() {}
+	 * }
+	 * </pre>
+	 * </li>
+	 * <li>If no enabling tag is found by the formatter after the disabling tag, then
+	 * the end of the snippet won't be formatted.<br>
+	 * For example, when a disabling tag is put at the beginning of the code, then
+	 * the entire content of a compilation unit is not formatted:
+	 * <pre>
+	 * // @formatter:off
+	 * class X {
+	 * void foo1() {}
+	 * void foo2() {}
+	 * void bar1() {}
+	 * void bar2() {}
+	 * }
+	 * </pre>
+	 * </li>
+	 * <li>If a mix of disabling and enabling tags is done in the same comment, then
+	 * the formatter will only take into account the last encountered tag in the
+	 * comment.
+	 * <p>For example, in the following snippet, the formatter will be disabled after
+	 * the comment:</p>
+	 * <pre>
+	 * class X {
+	 * /*
+	 *  * This is a comment with a mix of disabling and enabling tags:
+	 *  *  - <b>@formatter:off</b>
+	 *  *  - <b>@formatter:on</b>
+	 *  *  - <b>@formatter:off</b>
+	 *  * The formatter will stop to format from the beginning of this comment...
+	 *  */
+	 * void foo() {}
+	 * void bar() {}
+	 * }
+	 * </pre>
+	 * </li>
+	 * <li>The tag cannot include newline character (i.e. '\n') but it can have white
+	 * spaces.<br>
+	 * E.g. "<b>format: off</b>" is a valid disabling tag.<br>
+	 * In the future, newlines may be used to support multiple disabling tags.</li>
+	 * </ol>
+	 * </p>
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_DISABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.disabling_tag";	//$NON-NLS-1$
+	/**
+	 * <pre>
+	 * FORMATTER / Option to define the tag to put in a comment to re-enable the formatting after it has been disabled (see {@link #FORMATTER_DISABLING_TAG})
+	 *     - option id:         "org.eclipse.jdt.core.formatter.enabling_tag"
+	 *     - possible values:   String, with constraints mentioned below
+	 *     - default:           "@formatter:on"
+	 * </pre>
+	 * 
+	 * <p>
+	 * Note that:
+	 * <ol>
+	 * <li>This tag is used by the formatter only if the 
+	 * {@link #FORMATTER_USE_ON_OFF_TAGS} option is set to {@link #TRUE}.</li>
+	 * <li>The tag name will be trimmed. Hence if it does contain white spaces
+	 * at the beginning or at the end, they will not be taken into account while
+	 * searching for the tag in the comments</li>
+	 * <li>If a tag is starting with a letter or digit, then it cannot be leaded by
+	 * another letter or digit to be recognized
+	 * (<code>"ReEnableFormatter"</code> will not be recognized as an enabling tag
+	 * <code>"EnableFormatter"</code>, but <code>"Re:EnableFormatter"</code>
+	 * will be detected for either tag <code>"EnableFormatter"</code> or
+	 * <code>":EnableFormatter"</code>).<br>
+	 * Respectively, a tag ending with a letter or digit cannot be followed by a letter
+	 * or digit to be recognized (<code>"EnableFormatter1"</code> will not be
+	 * recognized as an enabling tag <code>"EnableFormatter"</code>, but
+	 * <code>"EnableFormatter:1"</code> will be detected either for tag
+	 * <code>"EnableFormatter"</code> or <code>"EnableFormatter:"</code>)</li>
+	 * <li>As soon as the formatter encounters the defined enabling tag, it re-starts
+	 * to format the code just after the comment including this tag. If it was already
+	 * active, i.e. already re-enabled or never disabled, the tag has no special effect.
+	 * <p>
+	 * For example, the default enabling tag "<b>@formatter:on</b>"
+	 * in the following snippet is not necessary as the formatter has never been
+	 * disabled:
+	 * <pre>
+	 * class X {
+	 * void foo1() {}
+	 * void foo2() {}
+	 * // @formatter:on
+	 * void bar1() {}
+	 * void bar2() {}
+	 * }
+	 * </pre>
+	 * Or, in the following other snippet, the second enabling tag is not necessary as
+	 * the formatting will have been re-enabled by the first one:
+	 * <pre>
+	 * class X {
+	 * // @formatter:off
+	 * void foo1() {}
+	 * void foo2() {}
+	 * // @formatter:on
+	 * void bar1() {}
+	 * // @formatter:on
+	 * void bar2() {}
+	 * }
+	 * </pre>
+	 * </li>
+	 * <li>If a mix of disabling and enabling tags is done in the same comment, then
+	 * the formatter will only take into account the last encountered tag in the
+	 * comment.
+	 * <p>For example, in the following snippet, the formatter will be re-enabled after
+	 * the comment:</p>
+	 * <pre>
+	 * // @formatter:off
+	 * class X {
+	 * /*
+	 *  * This is a comment with a mix of disabling and enabling tags:
+	 *  *  - <b>@formatter:on</b>
+	 *  *  - <b>@formatter:off</b>
+	 *  *  - <b>@formatter:on</b>
+	 *  * The formatter will restart to format after this comment...
+	 *  */
+	 * void foo() {}
+	 * void bar() {}
+	 * }
+	 * </pre>
+	 * <li>The tag cannot include newline character (i.e. '\n') but it can have white
+	 * spaces.<br>
+	 * E.g. "<b>format: on</b>" is a valid enabling tag<br>
+	 * In the future, newlines may be used to support multiple enabling tags.</li>
+	 * </li>
+	 * </ol>
+	 * </p>
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_ENABLING_TAG = JavaCore.PLUGIN_ID + ".formatter.enabling_tag";	//$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / Option to indent body declarations compare to its enclosing annotation declaration header
 	 *     - option id:         "org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header"
 	 *     - possible values:   { TRUE, FALSE }
@@ -983,6 +1235,18 @@ public class DefaultCodeFormatterConstants {
 	 */
 	public static final String FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_annotation_on_local_variable";//$NON-NLS-1$
 
+	/**
+	 * <pre>
+	 * FORMATTER / Option to insert a new line after a label
+	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_new_line_after_label"
+	 *     - possible values:   { INSERT, DO_NOT_INSERT }
+	 *     - default:           DO_NOT_INSERT
+	 * </pre>
+	 * @see JavaCore#INSERT
+	 * @see JavaCore#DO_NOT_INSERT
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_INSERT_NEW_LINE_AFTER_LABEL = JavaCore.PLUGIN_ID + ".formatter.insert_new_line_after_label";	//$NON-NLS-1$	
 
 	/**
 	 * <pre>
@@ -3096,7 +3360,12 @@ public class DefaultCodeFormatterConstants {
 	 *     - possible values:   { TRUE, FALSE }
 	 *     - default:           FALSE
 	 * </pre>
-	 * Note that this option is ignored if the formatter is created with the mode {@link ToolFactory#M_FORMAT_NEW}.
+	 * Note that:
+	 * <ul>
+	 * <li>this option is ignored if the formatter is created with the mode {@link ToolFactory#M_FORMAT_NEW}</li>
+	 * <li>even with this option activated, the formatter still can ignore line comments starting at first column
+	 * if the option {@link #FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN} is set to {@value #FALSE}</li>
+	 * </ul>
 	 * @see #TRUE
 	 * @see #FALSE
 	 * @see ToolFactory#createCodeFormatter(Map, int)
@@ -3231,6 +3500,51 @@ public class DefaultCodeFormatterConstants {
 	public static final String FORMATTER_WRAP_BEFORE_BINARY_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_binary_operator"; //$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option to wrap outer expressions in nested expressions
+	 *     - option id:         "org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested"
+	 *     - possible values:   { TRUE, FALSE }
+	 *     - default:           TRUE
+	 * </pre>
+	 * <p>
+	 * This option changes the formatter behavior when nested method calls are encountered.
+	 * Since 3.6, the formatter tries to wrap outermost method calls first to have a better output.</p>
+	 * <p>For example, let's say we are using the Eclipse built-in profile with a max line width=40+space for tab policy.
+	 * Then consider the following snippet:</p>
+	 * <pre>
+	 * public class X01 {
+	 *     void test() {
+	 *         foo(bar(1, 2, 3, 4), bar(5, 6, 7, 8));
+	 *     }
+	 * }
+	 * </pre>
+	 * <p>With this new strategy, the formatter will wrap the line earlier, between the arguments of the message call
+	 * for this example, and then it will allow to keep each nested call on a single line.</p>
+	 * <p>Hence, the output will be:</p>
+	 * <pre>
+	 * public class X01 {
+	 *     void test() {
+	 *         foo(bar(1, 2, 3, 4),
+	 *             bar(5, 6, 7, 8));
+	 *     }
+	 * }
+	 * </pre>
+	 * <p>
+	 * </p>
+	 * <p><b><u>Important notes</u></b>:</p>
+	 * <ol>
+	 * <li>This new behavior is automatically activated (i.e. the default value for this preference is {@link #TRUE}).
+	 * If the backward compatibility regarding previous versions' formatter behavior (i.e. before 3.6 version) is necessary,
+	 * then the preference needs to be set to {@link #FALSE} to retrieve the previous formatter behavior.</li>
+	 * <li>The new strategy currently only applies to nested method calls, but might be extended to other nested expressions in future versions</li>
+	 * </ol>
+	 * 
+	 * @see #TRUE
+	 * @see #FALSE
+	 * @since 3.6
+	 */
+	public static final String FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED = JavaCore.PLUGIN_ID + ".formatter.wrap_outer_expressions_when_nested"; //$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / The wrapping is done by indenting by one compare to the current indentation.
 	 * </pre>
 	 * @since 3.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java
index f0d4936..da519a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/IndentManipulation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,16 +68,17 @@ public final class IndentManipulation {
 	 * @return the number of indentation units that line is indented by
 	 * @exception IllegalArgumentException if:
 	 * <ul>
-	 * <li>the given <code>indentWidth</code> is lower or equals to zero</li>
+	 * <li>the given <code>indentWidth</code> is lower than zero</li>
 	 * <li>the given <code>tabWidth</code> is lower than zero</li>
 	 * <li>the given <code>line</code> is null</li>
 	 * </ul>
 	 */
 	public static int measureIndentUnits(CharSequence line, int tabWidth, int indentWidth) {
-		if (indentWidth <= 0 || tabWidth < 0 || line == null) {
+		if (indentWidth < 0 || tabWidth < 0 || line == null) {
 			throw new IllegalArgumentException();
 		}
 
+		if (indentWidth == 0) return 0;
 		int visualLength= measureIndentInSpaces(line, tabWidth);
 		return visualLength / indentWidth;
 	}
@@ -108,8 +109,7 @@ public final class IndentManipulation {
 		for (int i= 0; i < max; i++) {
 			char ch= line.charAt(i);
 			if (ch == '\t') {
-				int reminder= length % tabWidth;
-				length += tabWidth - reminder;
+				length = calculateSpaceEquivalents(tabWidth, length);
 			} else if (isIndentChar(ch)) {
 				length++;
 			} else {
@@ -130,26 +130,25 @@ public final class IndentManipulation {
 	 * @return the indent part of <code>line</code>, but no odd spaces
 	 * @exception IllegalArgumentException if:
 	 * <ul>
-	 * <li>the given <code>indentWidth</code> is lower or equals to zero</li>
+	 * <li>the given <code>indentWidth</code> is lower than zero</li>
 	 * <li>the given <code>tabWidth</code> is lower than zero</li>
 	 * <li>the given <code>line</code> is null</li>
 	 * </ul>
 	 */
 	public static String extractIndentString(String line, int tabWidth, int indentWidth) {
-		if (tabWidth < 0 || indentWidth <= 0 || line == null) {
+		if (tabWidth < 0 || indentWidth < 0 || line == null) {
 			throw new IllegalArgumentException();
 		}
 
-		int size= line.length();
-		int end= 0;
+		int size = line.length();
+		int end = 0;
 
-		int spaceEquivs= 0;
-		int characters= 0;
-		for (int i= 0; i < size; i++) {
-			char c= line.charAt(i);
+		int spaceEquivs = 0;
+		int characters = 0;
+		for (int i = 0; i < size; i++) {
+			char c = line.charAt(i);
 			if (c == '\t') {
-				int remainder= spaceEquivs % tabWidth;
-				spaceEquivs += tabWidth - remainder;
+				spaceEquivs = calculateSpaceEquivalents(tabWidth, spaceEquivs);
 				characters++;
 			} else if (isIndentChar(c)) {
 				spaceEquivs++;
@@ -159,8 +158,12 @@ public final class IndentManipulation {
 			}
 			if (spaceEquivs >= indentWidth) {
 				end += characters;
-				characters= 0;
-				spaceEquivs= spaceEquivs % indentWidth;
+				characters = 0;
+				if(indentWidth == 0) {
+					spaceEquivs = 0;
+				} else {
+					spaceEquivs = spaceEquivs % indentWidth;
+				}
 			}
 		}
 		if (end == 0) {
@@ -175,8 +178,8 @@ public final class IndentManipulation {
 
 	/**
 	 * Removes the given number of indentation units from a given line. If the line
-	 * has less than the given indent, all the available indentation is removed.
-	 * If <code>indentsToRemove <= 0</code> the line is returned.
+	 * has less indent than the given indentUnitsToRemove, all the available indentation is removed.
+	 * If <code>indentsToRemove <= 0 or indent == 0</code> the line is returned.
 	 *
 	 * @param line the line to trim
 	 * @param tabWidth the width of one tab in space equivalents
@@ -184,19 +187,19 @@ public final class IndentManipulation {
 	 * @return the trimmed string
 	 * @exception IllegalArgumentException if:
 	 * <ul>
-	 * <li>the given <code>indentWidth</code> is lower or equals to zero</li>
+	 * <li>the given <code>indentWidth</code> is lower than zero</li>
 	 * <li>the given <code>tabWidth</code> is lower than zero</li>
 	 * <li>the given <code>line</code> is null</li>
 	 * </ul>
 	 */
 	public static String trimIndent(String line, int indentUnitsToRemove, int tabWidth, int indentWidth) {
-		if (tabWidth < 0 || indentWidth <= 0 || line == null) {
+		if (tabWidth < 0 || indentWidth < 0 || line == null) {
 			throw new IllegalArgumentException();
 		}
 
-		if (indentUnitsToRemove <= 0)
+		if (indentUnitsToRemove <= 0 || indentWidth == 0) {
 			return line;
-
+		}
 		final int spaceEquivalentsToRemove= indentUnitsToRemove * indentWidth;
 
 		int start= 0;
@@ -206,8 +209,7 @@ public final class IndentManipulation {
 		for (int i= 0; i < size; i++) {
 			char c= line.charAt(i);
 			if (c == '\t') {
-				int remainder= spaceEquivalents % tabWidth;
-				spaceEquivalents += tabWidth - remainder;
+				spaceEquivalents = calculateSpaceEquivalents(tabWidth, spaceEquivalents);
 			} else if (isIndentChar(c)) {
 				spaceEquivalents++;
 			} else {
@@ -256,7 +258,7 @@ public final class IndentManipulation {
 	 * @return the newly indent code, containing only the given line delimiters.
 	 * @exception IllegalArgumentException if:
 	 * <ul>
-	 * <li>the given <code>indentWidth</code> is lower or equals to zero</li>
+	 * <li>the given <code>indentWidth</code> is lower than zero</li>
 	 * <li>the given <code>tabWidth</code> is lower than zero</li>
 	 * <li>the given <code>code</code> is null</li>
 	 * <li>the given <code>indentUnitsToRemove</code> is lower than zero</li>
@@ -265,7 +267,7 @@ public final class IndentManipulation {
 	 * </ul>
 	 */
 	public static String changeIndent(String code, int indentUnitsToRemove, int tabWidth, int indentWidth, String newIndentString, String lineDelim) {
-		if (tabWidth < 0 || indentWidth <= 0 || code == null || indentUnitsToRemove < 0 || newIndentString == null || lineDelim == null) {
+		if (tabWidth < 0 || indentWidth < 0 || code == null || indentUnitsToRemove < 0 || newIndentString == null || lineDelim == null) {
 			throw new IllegalArgumentException();
 		}
 
@@ -290,7 +292,11 @@ public final class IndentManipulation {
 				} else { // no new line after last line
 					buf.append(lineDelim);
 					buf.append(newIndentString);
-					buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth));
+					if(indentWidth != 0) {
+						buf.append(trimIndent(line, indentUnitsToRemove, tabWidth, indentWidth));
+					} else {
+						buf.append(line);
+					}
 				}
 			}
 			return buf.toString();
@@ -315,7 +321,7 @@ public final class IndentManipulation {
 	 * @return returns the resulting text edits
 	 * @exception IllegalArgumentException if:
 	 * <ul>
-	 * <li>the given <code>indentWidth</code> is lower or equals to zero</li>
+	 * <li>the given <code>indentWidth</code> is lower than zero</li>
 	 * <li>the given <code>tabWidth</code> is lower than zero</li>
 	 * <li>the given <code>source</code> is null</li>
 	 * <li>the given <code>indentUnitsToRemove</code> is lower than zero</li>
@@ -323,7 +329,7 @@ public final class IndentManipulation {
 	 * </ul>
 	 */
 	public static ReplaceEdit[] getChangeIndentEdits(String source, int indentUnitsToRemove, int tabWidth, int indentWidth, String newIndentString) {
-		if (tabWidth < 0 || indentWidth <= 0 || source == null || indentUnitsToRemove < 0 || newIndentString == null) {
+		if (tabWidth < 0 || indentWidth < 0 || source == null || indentUnitsToRemove < 0 || newIndentString == null) {
 			throw new IllegalArgumentException();
 		}
 
@@ -367,8 +373,7 @@ public final class IndentManipulation {
 		for (int i= 0; i < size && blanks < spaceEquivalents; i++) {
 			char c= line.charAt(i);
 			if (c == '\t') {
-				int remainder= blanks % tabWidth;
-				blanks += tabWidth - remainder;
+				blanks = calculateSpaceEquivalents(tabWidth, blanks);
 			} else if (isIndentChar(c)) {
 				blanks++;
 			} else {
@@ -381,6 +386,18 @@ public final class IndentManipulation {
 		return result + 1;
 	}
 
+	/*
+	 * Calculates space equivalents up to the next tab stop
+	 */
+	private static int calculateSpaceEquivalents(int tabWidth, int spaceEquivalents) {
+		if (tabWidth == 0){
+			return spaceEquivalents;
+		}
+		int remainder = spaceEquivalents % tabWidth;
+		spaceEquivalents += tabWidth - remainder;
+		return spaceEquivalents;
+	}
+
 	/**
 	 * Returns the tab width as configured in the given map.
 	 * <p>Use {@link org.eclipse.jdt.core.IJavaProject#getOptions(boolean)} to get the most current project options.</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
index 1a94679..4be56a9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak - Contribution for bug 150741
+ *     Nanda Firdausi - Contribution for bug 298844
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
@@ -16,6 +18,7 @@ import java.util.Map;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.compiler.InvalidInputException;
+import org.eclipse.jdt.core.formatter.CodeFormatter;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.ast.AND_AND_Expression;
@@ -116,7 +119,6 @@ import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
 import org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil;
 import org.eclipse.jdt.internal.formatter.align.Alignment;
 import org.eclipse.jdt.internal.formatter.align.AlignmentException;
-import org.eclipse.jdt.internal.formatter.comment.CommentRegion;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.text.edits.TextEdit;
 
@@ -169,7 +171,6 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		TerminalTokens.TokenNameUNSIGNED_RIGHT_SHIFT,
 		TerminalTokens.TokenNameGREATER
 	};
-	private int chunkKind;
 	public int lastLocalDeclarationSourceStart;
 	private Scanner localScanner;
 	public DefaultCodeFormatterOptions preferences;
@@ -261,13 +262,6 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		messageSend.traverse(builder, scope);
 		return builder;
 	}
-	public boolean checkChunkStart(int kind) {
-		if (this.chunkKind != kind) {
-			this.chunkKind = kind;
-			return true;
-		}
-		return false;
-	}
 
 	private boolean commentStartsBlock(int start, int end) {
 		this.localScanner.resetTo(start, end);
@@ -427,9 +421,14 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		BinaryExpressionFragmentBuilder builder = buildFragments(binaryExpression, scope);
 		final int fragmentsSize = builder.size();
 
-		if ((builder.realFragmentsSize() > 1 || builder.size() > 4) && numberOfParens == 0) {
+		if ((builder.realFragmentsSize() > 1 || fragmentsSize > 4) && numberOfParens == 0) {
 			this.scribe.printComment();
-			Alignment binaryExpressionAlignment = this.scribe.createAlignment("binaryExpressionAlignment", this.preferences.alignment_for_binary_expression, Alignment.R_OUTERMOST, fragmentsSize, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+			Alignment binaryExpressionAlignment = this.scribe.createAlignment(
+					Alignment.BINARY_EXPRESSION,
+					this.preferences.alignment_for_binary_expression,
+					Alignment.R_OUTERMOST,
+					fragmentsSize,
+					this.scribe.scanner.currentPosition);
 			this.scribe.enterAlignment(binaryExpressionAlignment);
 			boolean ok = false;
 			ASTNode[] fragments = builder.fragments();
@@ -439,9 +438,9 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < fragmentsSize - 1; i++) {
 						ASTNode fragment = fragments[i];
 						fragment.traverse(this, scope);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						if (this.scribe.lastNumberOfNewLines == 1) {
-							// a new line has been inserted by printTrailingComment()
+							// a new line has been inserted by printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT)
 							this.scribe.indentationLevel = binaryExpressionAlignment.breakIndentationLevel;
 						}
 						if (this.preferences.wrap_before_binary_operator) {
@@ -460,7 +459,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						}
 					}
 					fragments[fragmentsSize - 1].traverse(this, scope);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					ok = true;
 				} catch(AlignmentException e){
 					this.scribe.redoAlignment(e);
@@ -597,7 +596,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			if (this.preferences.insert_space_after_assignment_operator) {
 				this.scribe.space();
 			}
-			Alignment assignmentAlignment = this.scribe.createAlignment("fieldDeclarationAssignmentAlignment", this.preferences.alignment_for_assignment, Alignment.R_OUTERMOST, 1, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+			Alignment assignmentAlignment = this.scribe.createAlignment(
+					Alignment.FIELD_DECLARATION_ASSIGNMENT,
+					this.preferences.alignment_for_assignment,
+					Alignment.R_INNERMOST,
+					1,
+					this.scribe.scanner.currentPosition);
 			this.scribe.enterAlignment(assignmentAlignment);
 			boolean ok = false;
 			do {
@@ -616,16 +620,16 @@ public class CodeFormatterVisitor extends ASTVisitor {
 
 		if (memberAlignment != null) {
 			this.scribe.alignFragment(memberAlignment, 2);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		} else {
 			this.scribe.space();
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 	}
 
 	private void format(ImportReference importRef, boolean isLast) {
 		this.scribe.printNextToken(TerminalTokens.TokenNameimport);
-		this.preferences.number_of_empty_lines_to_preserve = this.preferences.blank_lines_between_import_groups;
+		if (!isLast) this.scribe.blank_lines_between_import_groups = this.preferences.blank_lines_between_import_groups;
 		this.scribe.space();
 		if (importRef.isStatic()) {
 			this.scribe.printNextToken(TerminalTokens.TokenNamestatic);
@@ -641,9 +645,11 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
 		}
 		if (isLast) {
-			this.scribe.printTrailingComment();
+			this.scribe.blank_lines_between_import_groups = -1;
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.IMPORT_TRAILING_COMMENT);
 		} else {
-			this.scribe.printTrailingComment(this.preferences.blank_lines_between_import_groups);
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.NO_TRAILING_COMMENT);
+			this.scribe.blank_lines_between_import_groups = -1;
 		}
 		this.scribe.printNewLine();
 	}
@@ -677,7 +683,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final int multipleFieldDeclarationsLength = multiFieldDeclaration.declarations.length;
 
 		Alignment multiFieldDeclarationsAlignment =this.scribe.createAlignment(
-				"multiple_field",//$NON-NLS-1$
+				Alignment.MULTIPLE_FIELD,
 				this.preferences.alignment_for_multiple_fields,
 				multipleFieldDeclarationsLength - 1,
 				this.scribe.scanner.currentPosition);
@@ -726,7 +732,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 
 					if (i != length - 1) {
 						this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_multiple_field_declarations);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						this.scribe.alignFragment(multiFieldDeclarationsAlignment, i);
 
 						if (this.preferences.insert_space_after_comma_in_multiple_field_declarations) {
@@ -735,7 +741,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					} else {
 						this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
 						this.scribe.alignFragment(fieldAlignment, 2);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					}
 				}
 				ok = true;
@@ -761,7 +767,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final char[] compilationUnitSource = string.toCharArray();
 
 		this.localScanner.setSource(compilationUnitSource);
-		this.scribe.initializeScanner(compilationUnitSource);
+		this.scribe.resetScanner(compilationUnitSource);
 
 		if (nodes == null) {
 			return null;
@@ -798,7 +804,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final char[] compilationUnitSource = string.toCharArray();
 
 		this.localScanner.setSource(compilationUnitSource);
-		this.scribe.initializeScanner(compilationUnitSource);
+		this.scribe.resetScanner(compilationUnitSource);
 
 		this.lastLocalDeclarationSourceStart = -1;
 		try {
@@ -827,7 +833,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final char[] compilationUnitSource = string.toCharArray();
 
 		this.localScanner.setSource(compilationUnitSource);
-		this.scribe.initializeScanner(compilationUnitSource);
+		this.scribe.resetScanner(compilationUnitSource);
 
 		if (constructorDeclaration == null) {
 			return null;
@@ -871,7 +877,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final char[] compilationUnitSource = string.toCharArray();
 
 		this.localScanner.setSource(compilationUnitSource);
-		this.scribe.initializeScanner(compilationUnitSource);
+		this.scribe.resetScanner(compilationUnitSource);
 
 		if (expression == null) {
 			return null;
@@ -891,38 +897,6 @@ public class CodeFormatterVisitor extends ASTVisitor {
 	}
 
 	/**
-	 * @see org.eclipse.jdt.core.formatter.CodeFormatter#format(int, String, int, int, int, String)
-	 */
-	public TextEdit format(String string, CommentRegion region) {
-		// reset the scribe
-		this.scribe.reset();
-
-		if (region == null) {
-			return failedToFormat();
-		}
-
-		long startTime = 0;
-		if (DEBUG){
-			startTime = System.currentTimeMillis();
-		}
-
-		final char[] compilationUnitSource = string.toCharArray();
-
-		this.scribe.initializeScanner(compilationUnitSource);
-
-		TextEdit result = null;
-		try {
-			result = region.format(this.preferences.initial_indentation_level, true);
-		} catch(AbortFormatting e){
-			return failedToFormat();
-		}
-		if (DEBUG){
-			System.out.println("Formatting time: " + (System.currentTimeMillis() - startTime));  //$NON-NLS-1$
-		}
-		return result;
-	}
-
-	/**
 	 * @param source the source of the comment to format
 	 */
 	public void formatComment(int kind, String source, int start, int end, int indentationLevel) {
@@ -931,38 +905,38 @@ public class CodeFormatterVisitor extends ASTVisitor {
 	}
 
 	private void format(TypeDeclaration typeDeclaration){
-        /*
-         * Print comments to get proper line number
-         */
-        this.scribe.printComment();
-        int line = this.scribe.line;
+		/*
+		 * Print comments to get proper line number
+		 */
+		this.scribe.printComment();
+		int line = this.scribe.line;
 
 		this.scribe.printModifiers(typeDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER);
 
 		if (this.scribe.line > line) {
-        	// annotations introduced new line, but this is not a line wrapping
+			// annotations introduced new line, but this is not a line wrapping
 			// see 158267
 			line = this.scribe.line;
 		}
 
-        /*
+		/*
 		 * Type name
 		 */
-        switch(TypeDeclaration.kind(typeDeclaration.modifiers)) {
-        	case TypeDeclaration.CLASS_DECL :
+		switch(TypeDeclaration.kind(typeDeclaration.modifiers)) {
+			case TypeDeclaration.CLASS_DECL :
 				this.scribe.printNextToken(TerminalTokens.TokenNameclass, true);
-        		break;
-        	case TypeDeclaration.INTERFACE_DECL :
+				break;
+			case TypeDeclaration.INTERFACE_DECL :
 				this.scribe.printNextToken(TerminalTokens.TokenNameinterface, true);
-        		break;
-        	case TypeDeclaration.ENUM_DECL :
+				break;
+			case TypeDeclaration.ENUM_DECL :
 				this.scribe.printNextToken(TerminalTokens.TokenNameenum, true);
-        		break;
-        	case TypeDeclaration.ANNOTATION_TYPE_DECL :
+				break;
+			case TypeDeclaration.ANNOTATION_TYPE_DECL :
 				this.scribe.printNextToken(TerminalTokens.TokenNameAT, this.preferences.insert_space_before_at_in_annotation_type_declaration);
 				this.scribe.printNextToken(TerminalTokens.TokenNameinterface, this.preferences.insert_space_after_at_in_annotation_type_declaration);
-        		break;
-        }
+				break;
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
 
 		TypeParameter[] typeParameters = typeDeclaration.typeParameters;
@@ -993,7 +967,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final TypeReference superclass = typeDeclaration.superclass;
 		if (superclass != null) {
 			Alignment superclassAlignment =this.scribe.createAlignment(
-					"superclass", //$NON-NLS-1$
+					Alignment.SUPER_CLASS,
 					this.preferences.alignment_for_superclass_in_type_declaration,
 					2,
 					this.scribe.scanner.currentPosition);
@@ -1031,7 +1005,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int superInterfaceLength = superInterfaces.length;
 			Alignment interfaceAlignment =this.scribe.createAlignment(
-					"superInterfaces",//$NON-NLS-1$
+					Alignment.SUPER_INTERFACES,
 					alignment_for_superinterfaces,
 					superInterfaceLength+1,  // implements token is first fragment
 					this.scribe.scanner.currentPosition);
@@ -1048,7 +1022,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < superInterfaceLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_superinterfaces);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							this.scribe.alignFragment(interfaceAlignment, i+1);
 							if (this.preferences.insert_space_after_comma_in_superinterfaces) {
 								this.scribe.space();
@@ -1088,7 +1062,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				space_before_opening_brace = this.preferences.insert_space_before_opening_brace_in_type_declaration;
 				break;
 		}
-        formatLeftCurlyBrace(line, class_declaration_brace);
+		formatLeftCurlyBrace(line, class_declaration_brace);
 		formatTypeOpeningBrace(class_declaration_brace, space_before_opening_brace, typeDeclaration);
 
 		boolean indent_body_declarations_compare_to_header;
@@ -1124,7 +1098,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				hasConstants = enumConstantsLength != 0;
 				if (enumConstantsLength > 1) {
 					Alignment enumConstantsAlignment = this.scribe.createAlignment(
-							"enumConstants",//$NON-NLS-1$
+							Alignment.ENUM_CONSTANTS,
 							this.preferences.alignment_for_enum_constants,
 							enumConstantsLength,
 							this.scribe.scanner.currentPosition,
@@ -1143,7 +1117,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 									if (this.preferences.insert_space_after_comma_in_enum_declarations) {
 										this.scribe.space();
 									}
-									this.scribe.printTrailingComment();
+									this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 									if (fieldDeclaration.initialization instanceof QualifiedAllocationExpression) {
 										this.scribe.printNewLine();
 									}
@@ -1164,7 +1138,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						if (this.preferences.insert_space_after_comma_in_enum_declarations) {
 							this.scribe.space();
 						}
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						if (fieldDeclaration.initialization instanceof QualifiedAllocationExpression) {
 							this.scribe.printNewLine();
 						}
@@ -1173,7 +1147,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			if (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
 				this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				if (hasConstants
 						|| ((enumConstantsLength - length) != 0)
 						|| typeDeclaration.methods != null
@@ -1210,7 +1184,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		if (class_declaration_brace.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
 			this.scribe.unIndent();
 		}
@@ -1305,7 +1279,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		if (DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED.equals(block_brace_position)) {
 			this.scribe.unIndent();
 		}
@@ -1355,7 +1329,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 				int argumentLength = arguments.length;
 				Alignment argumentsAlignment = this.scribe.createAlignment(
-						"messageArguments", //$NON-NLS-1$
+						Alignment.MESSAGE_ARGUMENTS,
 						this.preferences.alignment_for_arguments_in_method_invocation,
 						Alignment.R_OUTERMOST,
 						argumentLength,
@@ -1367,7 +1341,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						for (int j = 0; j < argumentLength; j++) {
 							if (j > 0) {
 								this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
-								this.scribe.printTrailingComment();
+								this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							}
 							this.scribe.alignFragment(argumentsAlignment, j);
 							if (j > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
@@ -1390,16 +1364,30 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			startingPositionInCascade = 2;
 		}
+		int tieBreakRule = this.preferences.wrap_outer_expressions_when_nested && size-startingPositionInCascade > 2
+			? Alignment.R_OUTERMOST
+			: Alignment.R_INNERMOST;
 		Alignment cascadingMessageSendAlignment =
 			this.scribe.createAlignment(
-				"cascadingMessageSendAlignment", //$NON-NLS-1$
+				Alignment.CASCADING_MESSAGE_SEND,
 				this.preferences.alignment_for_selector_in_method_invocation,
-				Alignment.R_INNERMOST,
+				tieBreakRule,
 				size,
 				this.scribe.scanner.currentPosition);
 		this.scribe.enterAlignment(cascadingMessageSendAlignment);
 		boolean ok = false;
+		boolean setStartingColumn = true;
+		switch (this.preferences.alignment_for_arguments_in_method_invocation & Alignment.SPLIT_MASK) {
+			case Alignment.M_COMPACT_FIRST_BREAK_SPLIT:
+			case Alignment.M_NEXT_SHIFTED_SPLIT:
+			case Alignment.M_ONE_PER_LINE_SPLIT:
+				setStartingColumn = false;
+				break;
+		}
 		do {
+			if (setStartingColumn) {
+				cascadingMessageSendAlignment.startingColumn = this.scribe.column;
+			}
 			try {
 				this.scribe.alignFragment(cascadingMessageSendAlignment, 0);
 				this.scribe.printNextToken(TerminalTokens.TokenNameDOT);
@@ -1439,26 +1427,39 @@ public class CodeFormatterVisitor extends ASTVisitor {
 							this.scribe.space();
 						}
 						int argumentLength = arguments.length;
+						int alignmentMode = this.preferences.alignment_for_arguments_in_method_invocation;
 						Alignment argumentsAlignment = this.scribe.createAlignment(
-								"messageArguments", //$NON-NLS-1$
-								this.preferences.alignment_for_arguments_in_method_invocation,
+								Alignment.MESSAGE_ARGUMENTS,
+								alignmentMode,
 								Alignment.R_OUTERMOST,
 								argumentLength,
 								this.scribe.scanner.currentPosition);
 						this.scribe.enterAlignment(argumentsAlignment);
 						boolean okForArguments = false;
 						do {
+							switch (alignmentMode & Alignment.SPLIT_MASK) {
+								case Alignment.M_COMPACT_SPLIT:
+								case Alignment.M_NEXT_PER_LINE_SPLIT:
+									argumentsAlignment.startingColumn = this.scribe.column;
+									break;
+							}
 							try {
 								for (int j = 0; j < argumentLength; j++) {
 									if (j > 0) {
 										this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
-										this.scribe.printTrailingComment();
+										this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 									}
 									this.scribe.alignFragment(argumentsAlignment, j);
-									if (j > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
+									if (j == 0) {
+										int fragmentIndentation = argumentsAlignment.fragmentIndentations[j];
+										if ((argumentsAlignment.mode & Alignment.M_INDENT_ON_COLUMN) != 0 && fragmentIndentation > 0) {
+											this.scribe.indentationLevel = fragmentIndentation;
+										}	
+									} else if (this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
 										this.scribe.space();
 									}
 									arguments[j].traverse(this, scope);
+									argumentsAlignment.startingColumn = -1;
 								}
 								okForArguments = true;
 							} catch (AlignmentException e) {
@@ -1473,6 +1474,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					if (numberOfParens > 0) {
 						manageClosingParenthesizedExpression(currentMessageSend, numberOfParens);
 					}
+					cascadingMessageSendAlignment.startingColumn = -1;
 					if (i < size - 1) {
 						this.scribe.alignFragment(cascadingMessageSendAlignment, i);
 						this.scribe.printNextToken(TerminalTokens.TokenNameDOT);
@@ -1493,7 +1495,11 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final int FIELD = 1, METHOD = 2, TYPE = 3;
 		this.scribe.lastNumberOfNewLines = 1;
 		ASTNode[] mergedNodes = computeMergedMemberDeclarations(nodes);
-		Alignment memberAlignment = this.scribe.createMemberAlignment("typeMembers", this.preferences.align_type_members_on_columns ? Alignment.M_MULTICOLUMN : Alignment.M_NO_ALIGNMENT, 4, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+		Alignment memberAlignment = this.scribe.createMemberAlignment(
+				Alignment.TYPE_MEMBERS,
+				this.preferences.align_type_members_on_columns ? Alignment.M_MULTICOLUMN : Alignment.M_NO_ALIGNMENT,
+				4,
+				this.scribe.scanner.currentPosition);
 		this.scribe.enterMemberAlignment(memberAlignment);
 		boolean isChunkStart = false;
 		boolean ok = false;
@@ -1530,9 +1536,9 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						isChunkStart = memberAlignment.checkChunkStart(TYPE, i, this.scribe.scanner.currentPosition);
 						format((TypeDeclaration)member, null, isChunkStart, i == 0);
 					}
-					if (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
+					while (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
 						this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					}
 					if (i != max - 1) {
 						this.scribe.printNewLine();
@@ -1556,7 +1562,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		while(isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
 			this.scribe.printComment();
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 		if (hasSemiColon && isFirst) {
 			this.scribe.printNewLine();
@@ -1571,26 +1577,26 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final Statement[] statements = block.statements;
 		statements[0].traverse(this, scope);
 		this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE, true);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 	}
 
-    private void formatLeftCurlyBrace(final int line, final String bracePosition) {
+	private void formatLeftCurlyBrace(final int line, final String bracePosition) {
 		this.scribe.formatBrace = true;
-        /*
-         * deal with (quite unexpected) comments right before lcurly
-         */
+		/*
+		 * deal with (quite unexpected) comments right before lcurly
+		 */
 		try {
-	        this.scribe.printComment();
-	        if (DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP.equals(bracePosition)
-	                && (this.scribe.line > line || this.scribe.column >= this.preferences.page_width))
-	        {
-	            this.scribe.printNewLine();
-	        }
+			this.scribe.printComment();
+			if (DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP.equals(bracePosition)
+					&& (this.scribe.line > line || this.scribe.column >= this.preferences.page_width))
+			{
+				this.scribe.printNewLine();
+			}
 		}
 		finally {
 			this.scribe.formatBrace = false;
 		}
-    }
+	}
 
 	private void formatLocalDeclaration(LocalDeclaration localDeclaration, BlockScope scope, boolean insertSpaceBeforeComma, boolean insertSpaceAfterComma) {
 
@@ -1637,7 +1643,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			if (this.preferences.insert_space_after_assignment_operator) {
 				this.scribe.space();
 			}
-			Alignment assignmentAlignment = this.scribe.createAlignment("localDeclarationAssignmentAlignment", this.preferences.alignment_for_assignment, Alignment.R_OUTERMOST, 1, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+			Alignment assignmentAlignment = this.scribe.createAlignment(
+					Alignment.LOCAL_DECLARATION_ASSIGNMENT,
+					this.preferences.alignment_for_assignment,
+					Alignment.R_OUTERMOST,
+					1,
+					this.scribe.scanner.currentPosition);
 			this.scribe.enterAlignment(assignmentAlignment);
 			boolean ok = false;
 			do {
@@ -1657,7 +1668,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			if (insertSpaceAfterComma) {
 				this.scribe.space();
 			}
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 	}
 
@@ -1667,7 +1678,9 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		Alignment messageAlignment) {
 
 		if (messageAlignment != null) {
-			this.scribe.alignFragment(messageAlignment, 0);
+			if (!this.preferences.wrap_outer_expressions_when_nested || messageAlignment.canAlign()) {
+				this.scribe.alignFragment(messageAlignment, 0);
+			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameDOT);
 		}
 		TypeReference[] typeArguments = messageSend.typeArguments;
@@ -1702,25 +1715,43 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int argumentsLength = arguments.length;
 			if (argumentsLength > 1) {
+				int alignmentMode = this.preferences.alignment_for_arguments_in_method_invocation;
 				Alignment argumentsAlignment = this.scribe.createAlignment(
-						"messageArguments", //$NON-NLS-1$
-						this.preferences.alignment_for_arguments_in_method_invocation,
+						Alignment.MESSAGE_ARGUMENTS,
+						alignmentMode,
 						argumentsLength,
 						this.scribe.scanner.currentPosition);
 				this.scribe.enterAlignment(argumentsAlignment);
 				boolean ok = false;
 				do {
+					switch (alignmentMode & Alignment.SPLIT_MASK) {
+						case Alignment.M_COMPACT_SPLIT:
+						case Alignment.M_NEXT_PER_LINE_SPLIT:
+							argumentsAlignment.startingColumn = this.scribe.column;
+							break;
+					}
 					try {
 						for (int i = 0; i < argumentsLength; i++) {
 							if (i > 0) {
 								this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
-								this.scribe.printTrailingComment();
+								this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							}
 							this.scribe.alignFragment(argumentsAlignment, i);
 							if (i > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
 								this.scribe.space();
 							}
+							int fragmentIndentation = 0;
+							if (i == 0) {
+								int wrappedIndex = argumentsAlignment.wrappedIndex();
+								if (wrappedIndex >= 0) {
+									fragmentIndentation = argumentsAlignment.fragmentIndentations[wrappedIndex];
+									if ((argumentsAlignment.mode & Alignment.M_INDENT_ON_COLUMN) != 0 && fragmentIndentation > 0) {
+										this.scribe.indentationLevel = fragmentIndentation;
+									}
+								}
+							}
 							arguments[i].traverse(this, scope);
+							argumentsAlignment.startingColumn = -1;
 						}
 						ok = true;
 					} catch (AlignmentException e) {
@@ -1729,16 +1760,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				} while (!ok);
 				this.scribe.exitAlignment(argumentsAlignment, true);
 			} else {
-				for (int i = 0; i < argumentsLength; i++) {
-					if (i > 0) {
-						this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_method_invocation_arguments);
-						this.scribe.printTrailingComment();
-					}
-					if (i > 0 && this.preferences.insert_space_after_comma_in_method_invocation_arguments) {
-						this.scribe.space();
-					}
-					arguments[i].traverse(this, scope);
-				}
+				arguments[0].traverse(this, scope);
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_method_invocation);
 		} else {
@@ -1765,24 +1787,36 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int argumentLength = arguments.length;
 			Alignment argumentsAlignment = this.scribe.createAlignment(
-					"methodArguments",//$NON-NLS-1$
+					Alignment.METHOD_ARGUMENTS,
 					methodDeclarationParametersAlignment,
 					argumentLength,
 					this.scribe.scanner.currentPosition);
 			this.scribe.enterAlignment(argumentsAlignment);
 			boolean ok = false;
 			do {
+				switch (methodDeclarationParametersAlignment & Alignment.SPLIT_MASK) {
+					case Alignment.M_COMPACT_SPLIT:
+					case Alignment.M_NEXT_PER_LINE_SPLIT:
+						argumentsAlignment.startingColumn = this.scribe.column;
+						break;
+				}
 				try {
 					for (int i = 0; i < argumentLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, spaceBeforeComma);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						this.scribe.alignFragment(argumentsAlignment, i);
-						if (i > 0 && spaceAfterComma) {
+						if (i == 0) {
+							int fragmentIndentation = argumentsAlignment.fragmentIndentations[0];
+							if ((argumentsAlignment.mode & Alignment.M_INDENT_ON_COLUMN) != 0 && fragmentIndentation > 0) {
+								this.scribe.indentationLevel = fragmentIndentation;
+							}
+						} else if (spaceAfterComma) {
 							this.scribe.space();
 						}
 						arguments[i].traverse(this, methodDeclaration.scope);
+						argumentsAlignment.startingColumn = -1;
 					}
 					ok = true;
 				} catch (AlignmentException e) {
@@ -1816,7 +1850,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		if (arguments != null) {
 			int argumentLength = arguments.length;
 			Alignment argumentsAlignment = this.scribe.createAlignment(
-					"enumConstantArguments",//$NON-NLS-1$
+					Alignment.ENUM_CONSTANTS_ARGUMENTS,
 					methodDeclarationParametersAlignment,
 					argumentLength,
 					this.scribe.scanner.currentPosition);
@@ -1830,7 +1864,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < argumentLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, spaceBeforeComma);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						this.scribe.alignFragment(argumentsAlignment, i);
 						if (i > 0 && spaceAfterComma) {
@@ -1856,25 +1890,24 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNewLine();
 			this.scribe.indent();
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			this.scribe.unIndent();
 		} else {
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 	}
 
 	private void formatOpeningBrace(String bracePosition, boolean insertSpaceBeforeBrace) {
 
-		if (DefaultCodeFormatterConstants.NEXT_LINE.equals(bracePosition)) {
-			this.scribe.printNewLine();
-		} else if (DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED.equals(bracePosition)) {
-			this.scribe.printNewLine();
-			this.scribe.indent();
-		}
-		this.scribe.printNextToken(TerminalTokens.TokenNameLBRACE, insertSpaceBeforeBrace);
-
-		this.scribe.printTrailingComment();
+			if (DefaultCodeFormatterConstants.NEXT_LINE.equals(bracePosition)) {
+				this.scribe.printNewLine();
+			} else if (DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED.equals(bracePosition)) {
+				this.scribe.printNewLine();
+				this.scribe.indent();
+			}
+			this.scribe.printNextToken(TerminalTokens.TokenNameLBRACE, insertSpaceBeforeBrace);
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.UNMODIFIABLE_TRAILING_COMMENT);
 	}
 	private void formatStatements(BlockScope scope, final Statement[] statements, boolean insertNewLineAfterLastStatement) {
 		int statementsLength = statements.length;
@@ -1886,7 +1919,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			statement.traverse(this, scope);
 			if (statement instanceof Expression) {
 				this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				if (i != statementsLength - 1) {
 					if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
 						this.scribe.printNewLine();
@@ -1904,7 +1937,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						LocalDeclaration nextLocal = (LocalDeclaration) statements[i + 1];
 						if (currentLocal.declarationSourceStart != nextLocal.declarationSourceStart) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							if (i != statementsLength - 1) {
 								if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
 									this.scribe.printNewLine();
@@ -1915,7 +1948,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						}
 					} else {
 						this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						if (i != statementsLength - 1) {
 							if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
 								this.scribe.printNewLine();
@@ -1926,7 +1959,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					}
 				} else {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					if (i != statementsLength - 1) {
 						if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
 							this.scribe.printNewLine();
@@ -1955,7 +1988,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		if (thrownExceptions != null) {
 			int thrownExceptionsLength = thrownExceptions.length;
 			Alignment throwsAlignment = this.scribe.createAlignment(
-					"throws",//$NON-NLS-1$
+					Alignment.THROWS,
 					alignmentForThrowsClause,
 					thrownExceptionsLength, // throws is the first token
 					this.scribe.scanner.currentPosition);
@@ -1970,7 +2003,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < thrownExceptionsLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, spaceBeforeComma);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							this.scribe.alignFragment(throwsAlignment, i);
 							if (spaceAfterComma) {
 								this.scribe.space();
@@ -1993,74 +2026,85 @@ public class CodeFormatterVisitor extends ASTVisitor {
 	 * Merged traversal of member (types, fields, methods)
 	 */
 	private void formatTypeMembers(TypeDeclaration typeDeclaration) {
-		Alignment memberAlignment = this.scribe.createMemberAlignment("typeMembers", this.preferences.align_type_members_on_columns ? Alignment.M_MULTICOLUMN : Alignment.M_NO_ALIGNMENT, 3, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+		Alignment memberAlignment = this.scribe.createMemberAlignment(
+				Alignment.TYPE_MEMBERS,
+				this.preferences.align_type_members_on_columns ? Alignment.M_MULTICOLUMN : Alignment.M_NO_ALIGNMENT,
+				3,
+				this.scribe.scanner.currentPosition);
 		this.scribe.enterMemberAlignment(memberAlignment);
 		ASTNode[] members = computeMergedMemberDeclarations(typeDeclaration);
 		boolean isChunkStart = false;
 		boolean ok = false;
-		int startIndex = 0;
-		do {
-			try {
-				for (int i = startIndex, max = members.length; i < max; i++) {
-					ASTNode member = members[i];
-					if (member instanceof FieldDeclaration) {
-						isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_FIELD, i, this.scribe.scanner.currentPosition);
-						if (member instanceof MultiFieldDeclaration) {
-							MultiFieldDeclaration multiField = (MultiFieldDeclaration) member;
-
-							if (multiField.isStatic()) {
-								format(multiField, this, typeDeclaration.staticInitializerScope, isChunkStart, i == 0);
-							} else {
-								format(multiField, this, typeDeclaration.initializerScope, isChunkStart, i == 0);
-							}
-						} else if (member instanceof Initializer) {
-							int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0;
-							if (newLineBeforeChunk > 0 && i != 0) {
-								this.scribe.printEmptyLines(newLineBeforeChunk);
-							} else if (i == 0) {
-								int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration;
-								if (newLinesBeforeFirstClassBodyDeclaration > 0) {
-									this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration);
+		int membersLength = members.length;
+		if (membersLength > 0) {
+			int startIndex = 0;
+			do {
+				try {
+					for (int i = startIndex, max = members.length; i < max; i++) {
+						ASTNode member = members[i];
+						if (member instanceof FieldDeclaration) {
+							isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_FIELD, i, this.scribe.scanner.currentPosition);
+							if (member instanceof MultiFieldDeclaration) {
+								MultiFieldDeclaration multiField = (MultiFieldDeclaration) member;
+	
+								if (multiField.isStatic()) {
+									format(multiField, this, typeDeclaration.staticInitializerScope, isChunkStart, i == 0);
+								} else {
+									format(multiField, this, typeDeclaration.initializerScope, isChunkStart, i == 0);
+								}
+							} else if (member instanceof Initializer) {
+								int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0;
+								if (newLineBeforeChunk > 0 && i != 0) {
+									this.scribe.printEmptyLines(newLineBeforeChunk);
+								} else if (i == 0) {
+									int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration;
+									if (newLinesBeforeFirstClassBodyDeclaration > 0) {
+										this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration);
+									}
+								}
+								Initializer initializer = (Initializer) member;
+								if (initializer.isStatic()) {
+									initializer.traverse(this, typeDeclaration.staticInitializerScope);
+								} else {
+									initializer.traverse(this, typeDeclaration.initializerScope);
 								}
-							}
-							Initializer initializer = (Initializer) member;
-							if (initializer.isStatic()) {
-								initializer.traverse(this, typeDeclaration.staticInitializerScope);
-							} else {
-								initializer.traverse(this, typeDeclaration.initializerScope);
-							}
-						} else {
-							FieldDeclaration field = (FieldDeclaration) member;
-							if (field.isStatic()) {
-								format(field, this, typeDeclaration.staticInitializerScope, isChunkStart, i == 0);
 							} else {
-								format(field, this, typeDeclaration.initializerScope, isChunkStart, i == 0);
+								FieldDeclaration field = (FieldDeclaration) member;
+								if (field.isStatic()) {
+									format(field, this, typeDeclaration.staticInitializerScope, isChunkStart, i == 0);
+								} else {
+									format(field, this, typeDeclaration.initializerScope, isChunkStart, i == 0);
+								}
 							}
+						} else if (member instanceof AbstractMethodDeclaration) {
+							isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_METHOD, i, this.scribe.scanner.currentPosition);
+							format((AbstractMethodDeclaration) member, typeDeclaration.scope, isChunkStart, i == 0);
+						} else if (member instanceof TypeDeclaration) {
+							isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_TYPE, i, this.scribe.scanner.currentPosition);
+							format((TypeDeclaration)member, typeDeclaration.scope, isChunkStart, i == 0);
+						}
+						while (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
+							this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
+						}
+						this.scribe.printNewLine();
+						// realign to the proper value
+						if (this.scribe.memberAlignment != null) {
+							// select the last alignment
+							this.scribe.indentationLevel = this.scribe.memberAlignment.originalIndentationLevel;
 						}
-					} else if (member instanceof AbstractMethodDeclaration) {
-						isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_METHOD, i, this.scribe.scanner.currentPosition);
-						format((AbstractMethodDeclaration) member, typeDeclaration.scope, isChunkStart, i == 0);
-					} else if (member instanceof TypeDeclaration) {
-						isChunkStart = memberAlignment.checkChunkStart(Alignment.CHUNK_TYPE, i, this.scribe.scanner.currentPosition);
-						format((TypeDeclaration)member, typeDeclaration.scope, isChunkStart, i == 0);
-					}
-					if (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
-						this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-						this.scribe.printTrailingComment();
-					}
-					this.scribe.printNewLine();
-					// realign to the proper value
-					if (this.scribe.memberAlignment != null) {
-						// select the last alignment
-						this.scribe.indentationLevel = this.scribe.memberAlignment.originalIndentationLevel;
 					}
+					ok = true;
+				} catch(AlignmentException e){
+					startIndex = memberAlignment.chunkStartIndex;
+					this.scribe.redoMemberAlignment(e);
 				}
-				ok = true;
-			} catch(AlignmentException e){
-				startIndex = memberAlignment.chunkStartIndex;
-				this.scribe.redoMemberAlignment(e);
-			}
-		} while (!ok);
+			} while (!ok);
+		} else if (isNextToken(TerminalTokens.TokenNameSEMICOLON)) {
+			// the only body declaration is an empty declaration (';')
+			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
+		}
 		this.scribe.printComment();
 		this.scribe.exitMemberAlignment(memberAlignment);
 	}
@@ -2290,7 +2334,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				case TerminalTokens.TokenNameCOMMENT_JAVADOC :
 				case TerminalTokens.TokenNameCOMMENT_BLOCK :
 				case TerminalTokens.TokenNameCOMMENT_LINE :
-	    			this.scribe.printComment(token);
+	    			this.scribe.printComment(token, Scribe.NO_TRAILING_COMMENT);
 	    			break;
 			}
 		} catch(InvalidInputException e) {
@@ -2347,7 +2391,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int argumentLength = arguments.length;
 			Alignment argumentsAlignment =this.scribe.createAlignment(
-					"allocation",//$NON-NLS-1$
+					Alignment.ALLOCATION,
 					this.preferences.alignment_for_arguments_in_allocation_expression,
 					argumentLength,
 					this.scribe.scanner.currentPosition);
@@ -2358,7 +2402,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < argumentLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_allocation_expression);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						this.scribe.alignFragment(argumentsAlignment, i);
 						if (i > 0 && this.preferences.insert_space_after_comma_in_allocation_expression) {
@@ -2435,7 +2479,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			defaultValue.traverse(this, (BlockScope) null);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -2548,7 +2592,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					this.scribe.printNewLine();
 				}
 				Alignment arrayInitializerAlignment =this.scribe.createAlignment(
-						"array_initializer",//$NON-NLS-1$
+						Alignment.ARRAY_INITIALIZER,
 						this.preferences.alignment_for_expressions_in_array_initializer,
 						Alignment.R_OUTERMOST,
 						expressionsLength,
@@ -2571,7 +2615,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						expressions[0].traverse(this, scope);
 						for (int i = 1; i < expressionsLength; i++) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							this.scribe.alignFragment(arrayInitializerAlignment, i);
 							if (this.preferences.insert_space_after_comma_in_array_initializer) {
 								this.scribe.space();
@@ -2580,7 +2624,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 							if (i == expressionsLength - 1) {
 								if (isNextToken(TerminalTokens.TokenNameCOMMA)) {
 									this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
-									this.scribe.printTrailingComment();
+									this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 								}
 							}
 						}
@@ -2604,7 +2648,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				expressions[0].traverse(this, scope);
 				if (isNextToken(TerminalTokens.TokenNameCOMMA)) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				if (insert_new_line_after_opening_brace) {
 					this.scribe.unIndent();
@@ -2626,14 +2670,14 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACE, this.preferences.insert_space_before_opening_brace_in_array_initializer);
 				if (isNextToken(TerminalTokens.TokenNameCOMMA)) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE, this.preferences.insert_space_between_empty_braces_in_array_initializer);
 			} else {
 				formatOpeningBrace(array_initializer_brace_position, this.preferences.insert_space_before_opening_brace_in_array_initializer);
 				if (isNextToken(TerminalTokens.TokenNameCOMMA)) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_array_initializer);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE, this.preferences.insert_space_between_empty_braces_in_array_initializer);
 				if (array_initializer_brace_position.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
@@ -2802,7 +2846,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			assertStatement.exceptionArgument.traverse(this, scope);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -2821,7 +2865,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.space();
 		}
 
-		Alignment assignmentAlignment = this.scribe.createAlignment("assignmentAlignment", this.preferences.alignment_for_assignment, Alignment.R_OUTERMOST, 1, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+		Alignment assignmentAlignment = this.scribe.createAlignment(
+				Alignment.ASSIGNMENT,
+				this.preferences.alignment_for_assignment,
+				Alignment.R_OUTERMOST,
+				1,
+				this.scribe.scanner.currentPosition);
 		this.scribe.enterAlignment(assignmentAlignment);
 		boolean ok = false;
 		do {
@@ -2900,7 +2949,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -3028,7 +3077,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.space();
 			this.scribe.printQualifiedReference(compilationUnitDeclaration.currentPackage.sourceEnd, false/*do not expect parenthesis*/);
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			int blankLinesAfterPackage = this.preferences.blank_lines_after_package;
 			if (blankLinesAfterPackage > 0) {
 				this.scribe.printEmptyLines(blankLinesAfterPackage);
@@ -3051,18 +3100,15 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 			}
 			int importLength = imports.length;
-			int savedNumberOfLineToPreserve = this.preferences.number_of_empty_lines_to_preserve;
 			if (importLength != 1) {
 				format(imports[0], false);
     			for (int i = 1; i < importLength - 1; i++) {
     				format(imports[i], false);
     			}
     			format(imports[importLength - 1], true);
-    			this.preferences.number_of_empty_lines_to_preserve = savedNumberOfLineToPreserve;
 			} else {
 				format(imports[0], true);
 			}
-			this.preferences.number_of_empty_lines_to_preserve = savedNumberOfLineToPreserve;
 
 			int blankLinesAfterImports = this.preferences.blank_lines_after_imports;
 			if (blankLinesAfterImports > 0) {
@@ -3149,7 +3195,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		if (this.preferences.insert_space_after_assignment_operator) {
 			this.scribe.space();
 		}
-		Alignment assignmentAlignment = this.scribe.createAlignment("compoundAssignmentAlignment", this.preferences.alignment_for_assignment, Alignment.R_OUTERMOST, 1, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+		Alignment assignmentAlignment = this.scribe.createAlignment(
+				Alignment.COMPOUND_ASSIGNMENT,
+				this.preferences.alignment_for_assignment,
+				Alignment.R_OUTERMOST,
+				1,
+				this.scribe.scanner.currentPosition);
 		this.scribe.enterAlignment(assignmentAlignment);
 		boolean ok = false;
 		do {
@@ -3183,7 +3234,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
     	conditionalExpression.condition.traverse(this, scope);
 
     	Alignment conditionalExpressionAlignment =this.scribe.createAlignment(
-    			"conditionalExpression", //$NON-NLS-1$
+    			Alignment.CONDITIONAL_EXPRESSION,
     			this.preferences.alignment_for_conditional_expression,
     			2,
     			this.scribe.scanner.currentPosition);
@@ -3199,7 +3250,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
     				this.scribe.space();
     			}
     			conditionalExpression.valueIfTrue.traverse(this, scope);
-    			this.scribe.printTrailingComment();
+    			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
     			this.scribe.alignFragment(conditionalExpressionAlignment, 1);
     			this.scribe.printNextToken(TerminalTokens.TokenNameCOLON, this.preferences.insert_space_before_colon_in_conditional);
 
@@ -3235,7 +3286,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				this.scribe.printIndentationIfNecessary();
 			}
 			this.scribe.scanner.resetTo(constructorDeclaration.declarationSourceEnd + 1, this.scribe.scannerEndPosition - 1);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			switch(this.scribe.scanner.source[this.scribe.scanner.currentPosition]) {
 				case '\n' :
 					this.scribe.scanner.currentPosition++;
@@ -3339,8 +3390,10 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				if (this.preferences.indent_statements_compare_to_body) {
 					this.scribe.unIndent();
 				}
-			} else if (this.preferences.insert_new_line_in_empty_method_body) {
-				this.scribe.printNewLine();
+			} else {
+				if (this.preferences.insert_new_line_in_empty_method_body) {
+					this.scribe.printNewLine();
+				}
 				if (this.preferences.indent_statements_compare_to_body) {
 					this.scribe.indent();
 				}
@@ -3350,14 +3403,14 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			if (constructor_declaration_brace.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
 				this.scribe.unIndent();
 			}
 		} else {
 			// no method body
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 		return false;
 	}
@@ -3372,7 +3425,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -3401,7 +3454,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				action.traverse(this, scope);
 				if (action instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				this.scribe.printNewLine();
 				this.scribe.unIndent();
@@ -3427,7 +3480,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 
 		this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_while);
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -3460,7 +3513,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNewLine();
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 	// field is an enum constant
@@ -3494,7 +3547,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			 */
 			String enum_constant_brace = this.preferences.brace_position_for_enum_constant;
 
-	        formatLeftCurlyBrace(line, enum_constant_brace);
+			formatLeftCurlyBrace(line, enum_constant_brace);
 			formatTypeOpeningBraceForEnumConstant(enum_constant_brace, this.preferences.insert_space_before_opening_brace_in_enum_constant, typeDeclaration);
 
 			if (this.preferences.indent_body_declarations_compare_to_enum_constant_header) {
@@ -3513,7 +3566,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				this.scribe.printNewLine();
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			if (enum_constant_brace.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
 				this.scribe.unIndent();
 			}
@@ -3588,7 +3641,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int argumentLength = arguments.length;
 			Alignment argumentsAlignment =this.scribe.createAlignment(
-					"explicit_constructor_call",//$NON-NLS-1$
+					Alignment.EXPLICIT_CONSTRUCTOR_CALL,
 					this.preferences.alignment_for_arguments_in_explicit_constructor_call,
 					argumentLength,
 					this.scribe.scanner.currentPosition);
@@ -3599,7 +3652,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < argumentLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_explicit_constructor_call_arguments);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						this.scribe.alignFragment(argumentsAlignment, i);
 						if (i > 0 && this.preferences.insert_space_after_comma_in_explicit_constructor_call_arguments) {
@@ -3618,7 +3671,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_between_empty_parens_in_method_invocation);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 	/**
@@ -3697,7 +3750,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final Statement action = forStatement.action;
 		if (action != null) {
 			if (action instanceof Block) {
-	            formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
+				formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
 				action.traverse(this, scope);
 			} else if (action instanceof EmptyStatement) {
 				/*
@@ -3712,7 +3765,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			if (action instanceof Expression) {
 				this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			}
 		} else {
 			/*
@@ -3748,7 +3801,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						if (this.preferences.insert_space_after_comma_in_for_inits) {
 							this.scribe.space();
 						}
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					}
 				}
 			}
@@ -3774,7 +3827,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					if (this.preferences.insert_space_after_comma_in_for_increments) {
 						this.scribe.space();
 					}
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 			}
 		}
@@ -3783,7 +3836,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final Statement action = forStatement.action;
 		if (action != null) {
 			if (action instanceof Block) {
-	            formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
+				formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
 				action.traverse(this, scope);
 			} else if (action instanceof EmptyStatement) {
 				/*
@@ -3798,7 +3851,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			if (action instanceof Expression) {
 				this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			}
 		} else {
 			/*
@@ -3847,7 +3900,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 			} else if (elseStatement == null && this.preferences.keep_simple_if_on_one_line) {
 				Alignment compactIfAlignment = this.scribe.createAlignment(
-						"compactIf", //$NON-NLS-1$
+						Alignment.COMPACT_IF,
 						this.preferences.alignment_for_compact_if,
 						Alignment.R_OUTERMOST,
 						1,
@@ -3863,7 +3916,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						thenStatement.traverse(this, scope);
 						if (thenStatement instanceof Expression) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						ok = true;
 					} catch (AlignmentException e) {
@@ -3876,19 +3929,19 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				thenStatement.traverse(this, scope);
 				if (thenStatement instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				if (elseStatement != null) {
 					this.scribe.printNewLine();
 				}
 			} else {
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				this.scribe.printNewLine();
 				this.scribe.indent();
 				thenStatement.traverse(this, scope);
 				if (thenStatement instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				if (elseStatement != null) {
 					this.scribe.printNewLine();
@@ -3920,7 +3973,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				elseStatement.traverse(this, scope);
 				if (elseStatement instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 			} else {
 				this.scribe.printNewLine();
@@ -3928,7 +3981,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				elseStatement.traverse(this, scope);
 				if (elseStatement instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				this.scribe.unIndent();
 			}
@@ -4001,11 +4054,14 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		if (this.preferences.insert_space_after_colon_in_labeled_statement) {
 			this.scribe.space();
 		}
+		if (this.preferences.insert_new_line_after_label) {
+			this.scribe.printNewLine();
+		}
 		final Statement statement = labeledStatement.statement;
 		statement.traverse(this, scope);
 		if (statement instanceof Expression) {
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		}
 		return false;
 	}
@@ -4080,14 +4136,21 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			Alignment messageAlignment = null;
 			if (!messageSend.receiver.isImplicitThis()) {
 				messageSend.receiver.traverse(this, scope);
+				int alignmentMode = this.preferences.alignment_for_selector_in_method_invocation;
 				messageAlignment = this.scribe.createAlignment(
-						"messageAlignment", //$NON-NLS-1$
-						this.preferences.alignment_for_selector_in_method_invocation,
+						Alignment.MESSAGE_SEND,
+						alignmentMode,
 						1,
 						this.scribe.scanner.currentPosition);
 				this.scribe.enterAlignment(messageAlignment);
 				boolean ok = false;
 				do {
+					switch (alignmentMode & Alignment.SPLIT_MASK) {
+						case Alignment.M_COMPACT_SPLIT:
+						case Alignment.M_NEXT_PER_LINE_SPLIT:
+							messageAlignment.startingColumn = this.scribe.column;
+							break;
+					}
 					try {
 						formatMessageSend(messageSend, scope, messageAlignment);
 						ok = true;
@@ -4119,7 +4182,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				this.scribe.printIndentationIfNecessary();
 			}
 			this.scribe.scanner.resetTo(methodDeclaration.declarationSourceEnd + 1, this.scribe.scannerEndPosition - 1);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			if (!this.scribe.scanner.atEnd()) {
 				switch(this.scribe.scanner.source[this.scribe.scanner.currentPosition]) {
 					case '\n' :
@@ -4137,91 +4200,116 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			return false;
 		}
 
-        /*
-         * Print comments to get proper line number
-         */
-        this.scribe.printComment();
-        int line = this.scribe.line;
+		/*
+		 * Print comments to get proper line number
+		 */
+		this.scribe.printComment();
+		int line = this.scribe.line;
 
-        this.scribe.printModifiers(methodDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER);
+		// Create alignment
+		Alignment methodDeclAlignment = this.scribe.createAlignment(
+				Alignment.METHOD_DECLARATION,
+				this.preferences.alignment_for_method_declaration,
+				Alignment.R_INNERMOST,
+				3,
+				this.scribe.scanner.currentPosition);
+		this.scribe.enterAlignment(methodDeclAlignment);
+		boolean ok = false;
+		final MethodScope methodDeclarationScope = methodDeclaration.scope;
+		do {
+			try {
 
-		if (this.scribe.line > line) {
-        	// annotations introduced new line, but this is not a line wrapping
-			// see 158267
-			line = this.scribe.line;
-		}
-		this.scribe.space();
+				this.scribe.printModifiers(methodDeclaration.annotations, this, ICodeFormatterConstants.ANNOTATION_ON_MEMBER);
+				int fragmentIndex = 0;
+				this.scribe.alignFragment(methodDeclAlignment, fragmentIndex);
 
-		TypeParameter[] typeParameters = methodDeclaration.typeParameters;
-		if (typeParameters != null) {
-			this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_type_parameters);
-			if (this.preferences.insert_space_after_opening_angle_bracket_in_type_parameters) {
-				this.scribe.space();
-			}
-			int length = typeParameters.length;
-			for (int i = 0; i < length - 1; i++) {
-				typeParameters[i].traverse(this, methodDeclaration.scope);
-				this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_type_parameters);
-				if (this.preferences.insert_space_after_comma_in_type_parameters) {
-					this.scribe.space();
+				if (this.scribe.line > line) {
+					// annotations introduced new line, but this is not a line wrapping
+					// see 158267
+					line = this.scribe.line;
 				}
-			}
-			typeParameters[length - 1].traverse(this, methodDeclaration.scope);
-			if (isClosingGenericToken()) {
-				this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS, this.preferences.insert_space_before_closing_angle_bracket_in_type_parameters);
-			}
-			if (this.preferences.insert_space_after_closing_angle_bracket_in_type_parameters) {
 				this.scribe.space();
-			}
-		}
 
-		/*
-		 * Print the method return type
-		 */
-		final TypeReference returnType = methodDeclaration.returnType;
-		final MethodScope methodDeclarationScope = methodDeclaration.scope;
+				TypeParameter[] typeParameters = methodDeclaration.typeParameters;
+				if (typeParameters != null) {
+					this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_type_parameters);
+					if (this.preferences.insert_space_after_opening_angle_bracket_in_type_parameters) {
+						this.scribe.space();
+					}
+					int length = typeParameters.length;
+					for (int i = 0; i < length - 1; i++) {
+						typeParameters[i].traverse(this, methodDeclaration.scope);
+						this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_type_parameters);
+						if (this.preferences.insert_space_after_comma_in_type_parameters) {
+							this.scribe.space();
+						}
+					}
+					typeParameters[length - 1].traverse(this, methodDeclaration.scope);
+					if (isClosingGenericToken()) {
+						this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS, this.preferences.insert_space_before_closing_angle_bracket_in_type_parameters);
+					}
+					if (this.preferences.insert_space_after_closing_angle_bracket_in_type_parameters) {
+						this.scribe.space();
+					}
+					this.scribe.alignFragment(methodDeclAlignment, ++fragmentIndex);
+				}
 
-		if (returnType != null) {
-			returnType.traverse(this, methodDeclarationScope);
-		}
-		/*
-		 * Print the method name
-		 */
-		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
+				/*
+				 * Print the method return type
+				 */
+				final TypeReference returnType = methodDeclaration.returnType;
+		
+				if (returnType != null) {
+					returnType.traverse(this, methodDeclarationScope);
+				}
+				this.scribe.alignFragment(methodDeclAlignment, ++fragmentIndex);
 
-		formatMethodArguments(
-			methodDeclaration,
-			this.preferences.insert_space_before_opening_paren_in_method_declaration,
-			this.preferences.insert_space_between_empty_parens_in_method_declaration,
-			this.preferences.insert_space_before_closing_paren_in_method_declaration,
-			this.preferences.insert_space_after_opening_paren_in_method_declaration,
-			this.preferences.insert_space_before_comma_in_method_declaration_parameters,
-			this.preferences.insert_space_after_comma_in_method_declaration_parameters,
-			this.preferences.alignment_for_parameters_in_method_declaration);
+				/*
+				 * Print the method name
+				 */
+				this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
+
+				// Format arguments
+				formatMethodArguments(
+					methodDeclaration,
+					this.preferences.insert_space_before_opening_paren_in_method_declaration,
+					this.preferences.insert_space_between_empty_parens_in_method_declaration,
+					this.preferences.insert_space_before_closing_paren_in_method_declaration,
+					this.preferences.insert_space_after_opening_paren_in_method_declaration,
+					this.preferences.insert_space_before_comma_in_method_declaration_parameters,
+					this.preferences.insert_space_after_comma_in_method_declaration_parameters,
+					this.preferences.alignment_for_parameters_in_method_declaration);
 
-		/*
-		 * Check for extra dimensions
-		 */
-		int extraDimensions = getDimensions();
-		if (extraDimensions != 0) {
-			 for (int i = 0; i < extraDimensions; i++) {
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			 }
-		}
+				/*
+				 * Check for extra dimensions
+				 */
+				int extraDimensions = getDimensions();
+				if (extraDimensions != 0) {
+					 for (int i = 0; i < extraDimensions; i++) {
+					 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
+					 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
+					 }
+				}
 
-		formatThrowsClause(
-			methodDeclaration,
-			this.preferences.insert_space_before_comma_in_method_declaration_throws,
-			this.preferences.insert_space_after_comma_in_method_declaration_throws,
-			this.preferences.alignment_for_throws_clause_in_method_declaration);
+				// Format throws
+				formatThrowsClause(
+					methodDeclaration,
+					this.preferences.insert_space_before_comma_in_method_declaration_throws,
+					this.preferences.insert_space_after_comma_in_method_declaration_throws,
+					this.preferences.alignment_for_throws_clause_in_method_declaration);
+				ok = true;
+			} catch (AlignmentException e) {
+				this.scribe.redoAlignment(e);
+			}
+		} while (!ok);
+		this.scribe.exitAlignment(methodDeclAlignment, true);
 
 		if (!methodDeclaration.isNative() && !methodDeclaration.isAbstract() && ((methodDeclaration.modifiers & ExtraCompilerModifiers.AccSemicolonBody) == 0)) {
 			/*
 			 * Method body
 			 */
 			String method_declaration_brace = this.preferences.brace_position_for_method_declaration;
-            formatLeftCurlyBrace(line, method_declaration_brace);
+			formatLeftCurlyBrace(line, method_declaration_brace);
 			formatOpeningBrace(method_declaration_brace, this.preferences.insert_space_before_opening_brace_in_method_declaration);
 			final int numberOfBlankLinesAtBeginningOfMethodBody = this.preferences.blank_lines_at_beginning_of_method_body;
 			if (numberOfBlankLinesAtBeginningOfMethodBody > 0) {
@@ -4238,8 +4326,10 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				if (this.preferences.indent_statements_compare_to_body) {
 					this.scribe.unIndent();
 				}
-			} else if (this.preferences.insert_new_line_in_empty_method_body) {
-				this.scribe.printNewLine();
+			} else {
+				if (this.preferences.insert_new_line_in_empty_method_body) {
+					this.scribe.printNewLine();
+				}
 				if (this.preferences.indent_statements_compare_to_body) {
 					this.scribe.indent();
 				}
@@ -4249,17 +4339,18 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				}
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 			if (method_declaration_brace.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
 				this.scribe.unIndent();
 			}
 		} else {
 			// no method body
 			this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-			this.scribe.printTrailingComment();
+			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.COMPLEX_TRAILING_COMMENT);
 		}
 		return false;
 	}
+
 	public boolean visit(NormalAnnotation annotation, BlockScope scope) {
 		this.scribe.printNextToken(TerminalTokens.TokenNameAT);
 		if (this.preferences.insert_space_after_at_in_annotation) {
@@ -4273,14 +4364,32 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		MemberValuePair[] memberValuePairs = annotation.memberValuePairs;
 		if (memberValuePairs != null) {
 			int length = memberValuePairs.length;
-			for (int i = 0; i < length - 1; i++) {
-				memberValuePairs[i].traverse(this, scope);
-				this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_annotation);
-				if (this.preferences.insert_space_after_comma_in_annotation) {
-					this.scribe.space();
+			Alignment annotationAlignment = this.scribe.createAlignment(
+					Alignment.ANNOTATION_MEMBERS_VALUE_PAIRS,
+					this.preferences.alignment_for_arguments_in_annotation,
+					length,
+					this.scribe.scanner.currentPosition);
+			this.scribe.enterAlignment(annotationAlignment);
+			boolean ok = false;
+			do {
+				try {
+					for (int i = 0; i < length; i++) {
+						if (i > 0) {
+							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_annotation);
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
+						}
+						this.scribe.alignFragment(annotationAlignment, i);
+						if (i > 0 && this.preferences.insert_space_after_comma_in_annotation) {
+							this.scribe.space();
+						}
+						memberValuePairs[i].traverse(this, scope);
+					}
+					ok = true;
+				} catch (AlignmentException e) {
+					this.scribe.redoAlignment(e);
 				}
-			}
-			memberValuePairs[length - 1].traverse(this, scope);
+			} while (!ok);
+			this.scribe.exitAlignment(annotationAlignment, true);
 		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameRPAREN, this.preferences.insert_space_before_closing_paren_in_annotation);
 		return false;
@@ -4604,7 +4713,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 			}
 			int argumentLength = arguments.length;
 			Alignment argumentsAlignment =this.scribe.createAlignment(
-					"allocation",//$NON-NLS-1$
+					Alignment.ALLOCATION,
 					this.preferences.alignment_for_arguments_in_qualified_allocation_expression,
 					argumentLength,
 					this.scribe.scanner.currentPosition);
@@ -4615,7 +4724,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					for (int i = 0; i < argumentLength; i++) {
 						if (i > 0) {
 							this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_allocation_expression);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						}
 						this.scribe.alignFragment(argumentsAlignment, i);
 						if (i > 0 && this.preferences.insert_space_after_comma_in_allocation_expression) {
@@ -4762,7 +4871,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		 * Print the semi-colon
 		 */
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 	public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
@@ -4844,7 +4953,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		}
 		this.scribe.checkNLSTag(stringLiteral.sourceStart);
 		this.scribe.printNextToken(TerminalTokens.TokenNameStringLiteral);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(stringLiteral, numberOfParens);
 		}
@@ -4863,7 +4972,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		this.scribe.printComment();
 		ASTNode[] fragments = stringLiteral.literals;
 		int fragmentsSize = stringLiteral.counter;
-		Alignment binaryExpressionAlignment = this.scribe.createAlignment("binaryExpressionAlignment", this.preferences.alignment_for_binary_expression, Alignment.R_OUTERMOST, fragmentsSize, this.scribe.scanner.currentPosition); //$NON-NLS-1$
+		Alignment binaryExpressionAlignment = this.scribe.createAlignment(
+				Alignment.STRING_CONCATENATION,
+				this.preferences.alignment_for_binary_expression,
+				Alignment.R_OUTERMOST,
+				fragmentsSize,
+				this.scribe.scanner.currentPosition);
 		this.scribe.enterAlignment(binaryExpressionAlignment);
 		boolean ok = false;
 		do {
@@ -4871,9 +4985,9 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				for (int i = 0; i < fragmentsSize - 1; i++) {
 					ASTNode fragment = fragments[i];
 					fragment.traverse(this, scope);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					if (this.scribe.lastNumberOfNewLines == 1) {
-						// a new line has been inserted by printTrailingComment()
+						// a new line has been inserted by printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT)
 						this.scribe.indentationLevel = binaryExpressionAlignment.breakIndentationLevel;
 					}
 					this.scribe.alignFragment(binaryExpressionAlignment, i);
@@ -4883,7 +4997,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					}
 				}
 				fragments[fragmentsSize - 1].traverse(this, scope);
-				this.scribe.printTrailingComment();
+				this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				ok = true;
 			} catch(AlignmentException e){
 				this.scribe.redoAlignment(e);
@@ -4953,12 +5067,12 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						this.scribe.unIndent();
 					}
 					statement.traverse(this, scope);
-					this.scribe.printTrailingComment();
 					wasACase = true;
 					wasAStatement = false;
 					if (this.preferences.indent_switchstatements_compare_to_cases) {
 						this.scribe.indent();
 					}
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.COMPLEX_TRAILING_COMMENT);
 				} else if (statement instanceof BreakStatement) {
 					if (this.preferences.indent_breaks_compare_to_cases) {
 						if (wasAStatement && !this.preferences.indent_switchstatements_compare_to_cases) {
@@ -5011,7 +5125,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 					 * Print the semi-colon
 					 */
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 					this.scribe.printNewLine();
 				} else if (statement instanceof LocalDeclaration) {
 					LocalDeclaration currentLocal = (LocalDeclaration) statement;
@@ -5026,7 +5140,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 								 * Print the semi-colon
 								 */
 								this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-								this.scribe.printTrailingComment();
+								this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 								this.scribe.printNewLine();
 							}
 						} else {
@@ -5034,7 +5148,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 							 * Print the semi-colon
 							 */
 							this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-							this.scribe.printTrailingComment();
+							this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 							this.scribe.printNewLine();
 						}
 					} else {
@@ -5042,7 +5156,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 						 * Print the semi-colon
 						 */
 						this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-						this.scribe.printTrailingComment();
+						this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 						this.scribe.printNewLine();
 					}
 				} else if (!wasACase) {
@@ -5060,7 +5174,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		}
 		this.scribe.printNewLine();
 		this.scribe.printNextToken(TerminalTokens.TokenNameRBRACE);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		if (switch_brace.equals(DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED)) {
 			this.scribe.unIndent();
 		}
@@ -5127,7 +5241,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		 * Print the semi-colon
 		 */
 		this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-		this.scribe.printTrailingComment();
+		this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 		return false;
 	}
 
@@ -5366,7 +5480,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 		final Statement action = whileStatement.action;
 		if (action != null) {
 			if (action instanceof Block) {
-                formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
+				formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
 				action.traverse(this, scope);
 			} else if (action instanceof EmptyStatement) {
 				/*
@@ -5379,7 +5493,7 @@ public class CodeFormatterVisitor extends ASTVisitor {
 				action.traverse(this, scope);
 				if (action instanceof Expression) {
 					this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
-					this.scribe.printTrailingComment();
+					this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
 				}
 				this.scribe.unIndent();
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
index 03f3587..5dc553e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,15 +28,8 @@ import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
 import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil;
-import org.eclipse.jdt.internal.formatter.comment.CommentRegion;
-import org.eclipse.jdt.internal.formatter.comment.JavaDocRegion;
-import org.eclipse.jdt.internal.formatter.comment.MultiCommentRegion;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.Region;
-import org.eclipse.text.edits.MultiTextEdit;
 import org.eclipse.text.edits.TextEdit;
 
 public class DefaultCodeFormatter extends CodeFormatter {
@@ -56,40 +49,9 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		| K_MULTI_LINE_COMMENT
 		| K_JAVA_DOC;
 
-	/*
-	 * Temporary internal statics to enable new comments formatter
-	 * see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780
-	 * see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=227043
-	 * TODO (frederic) remove in 3.5
-	 */
-	private final static String NEW_COMMENTS_FORMAT = System.getProperty("org.eclipse.jdt.core.formatter.comments.new"); //$NON-NLS-1$
-	public static boolean ENABLE_NEW_COMMENTS_FORMAT = !JavaCore.DISABLED.equals(NEW_COMMENTS_FORMAT);
-
 	// Scanner use to probe the kind of the source given to the formatter
 	private static Scanner PROBING_SCANNER;
 
-	/**
-	 * Creates a comment region for a specific document partition type.
-	 *
-	 * @param kind the comment snippet kind
-	 * @param document the document which contains the comment region
-	 * @param range range of the comment region in the document
-	 * @return a new comment region for the comment region range in the
-	 *         document
-	 * @since 3.1
-	 */
-	public static CommentRegion createRegion(int kind, IDocument document, Position range, CodeFormatterVisitor formatter) {
-		switch (kind & K_MASK) {
-			case K_SINGLE_LINE_COMMENT:
-				return new CommentRegion(document, range, formatter);
-			case K_MULTI_LINE_COMMENT:
-				return new MultiCommentRegion(document, range, formatter);
-			case K_JAVA_DOC:
-				return new JavaDocRegion(document, range, formatter);
-		}
-		return null;
-	}
-
 	private CodeSnippetParsingUtil codeSnippetParsingUtil;
 	private Map defaultCompilerOptions;
 
@@ -140,9 +102,11 @@ public class DefaultCodeFormatter extends CodeFormatter {
 				break;
 			case DefaultCodeFormatterOptions.MIXED :
 				int tabSize = this.preferences.tab_size;
-				int spaceEquivalents = indentationLevel * this.preferences.indentation_size;
-				tabs = spaceEquivalents / tabSize;
-				spaces = spaceEquivalents % tabSize;
+				if (tabSize != 0) {
+					int spaceEquivalents = indentationLevel * this.preferences.indentation_size;
+					tabs = spaceEquivalents / tabSize;
+					spaces = spaceEquivalents % tabSize;
+				}
 				break;
 			default:
 				return Util.EMPTY_STRING;
@@ -172,17 +136,11 @@ public class DefaultCodeFormatter extends CodeFormatter {
 			case K_JAVA_DOC :
 				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780
 				// use the integrated comment formatter to format comment
-				if (ENABLE_NEW_COMMENTS_FORMAT) {
-	                return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)});
-				}
+                return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)});
 				// $FALL-THROUGH$ - fall through next case when old comment formatter is activated
 			case K_MULTI_LINE_COMMENT :
 			case K_SINGLE_LINE_COMMENT :
-				if (ENABLE_NEW_COMMENTS_FORMAT) {
-	                return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)});
-				}
-				this.codeSnippetParsingUtil = new CodeSnippetParsingUtil();
-				return formatComment(kind, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)}, false);
+                return formatComment(kind & K_MASK, source, indentationLevel, lineSeparator, new IRegion[] {new Region(offset, length)});
 		}
 
 		return format(kind, source, new IRegion[] {new Region(offset, length)}, indentationLevel, lineSeparator);
@@ -197,18 +155,17 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		}
 
 		this.codeSnippetParsingUtil = new CodeSnippetParsingUtil();
+		boolean includeComments =  (kind & F_INCLUDE_COMMENTS) != 0;
 		switch(kind & K_MASK) {
 			case K_CLASS_BODY_DECLARATIONS :
-				return formatClassBodyDeclarations(source, indentationLevel, lineSeparator, regions);
+				return formatClassBodyDeclarations(source, indentationLevel, lineSeparator, regions, includeComments);
 			case K_COMPILATION_UNIT :
-				boolean includeComments =  (kind & F_INCLUDE_COMMENTS) != 0; // || FORCE_NEW_COMMENTS_FORMAT;
 				return formatCompilationUnit(source, indentationLevel, lineSeparator, regions, includeComments);
 			case K_EXPRESSION :
-				return formatExpression(source, indentationLevel, lineSeparator, regions);
+				return formatExpression(source, indentationLevel, lineSeparator, regions, includeComments);
 			case K_STATEMENTS :
-				return formatStatements(source, indentationLevel, lineSeparator, regions);
+				return formatStatements(source, indentationLevel, lineSeparator, regions, includeComments);
 			case K_UNKNOWN :
-				includeComments =  (kind & F_INCLUDE_COMMENTS) != 0; // || FORCE_NEW_COMMENTS_FORMAT;
 				return probeFormatting(source, indentationLevel, lineSeparator, regions, includeComments);
 			case K_JAVA_DOC :
 			case K_MULTI_LINE_COMMENT :
@@ -219,14 +176,14 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		return null;
 	}
 
-	private TextEdit formatClassBodyDeclarations(String source, int indentationLevel, String lineSeparator, IRegion[] regions) {
+	private TextEdit formatClassBodyDeclarations(String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) {
 		ASTNode[] bodyDeclarations = this.codeSnippetParsingUtil.parseClassBodyDeclarations(source.toCharArray(), getDefaultCompilerOptions(), true);
 
 		if (bodyDeclarations == null) {
 			// a problem occurred while parsing the source
 			return null;
 		}
-		return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, regions);
+		return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, regions, includeComments);
 	}
 
 	/*
@@ -269,55 +226,6 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		return null;
 	}
 
-	/**
-	 * Returns the resulting text edit after formatting the given comment.
-	 *
-	 * @param kind the given kind
-	 * @param source the given source
-	 * @param indentationLevel the given indentation level
-	 * @param lineSeparator the given line separator
-	 * @param regions the given regions
-	 * @param includeComments TODO
-	 * @return the resulting text edit
-	 */
-	private TextEdit formatComment(int kind, String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) {
-		Object oldOption = oldCommentFormatOption();
-		boolean isFormattingComments = false;
-		if (oldOption == null) {
-			switch (kind & K_MASK) {
-				case K_SINGLE_LINE_COMMENT:
-					isFormattingComments = DefaultCodeFormatterConstants.TRUE.equals(this.options.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT));
-					break;
-				case K_MULTI_LINE_COMMENT:
-					isFormattingComments = DefaultCodeFormatterConstants.TRUE.equals(this.options.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT));
-					break;
-				case K_JAVA_DOC:
-					isFormattingComments = DefaultCodeFormatterConstants.TRUE.equals(this.options.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT));
-			}
-		} else {
-			isFormattingComments = DefaultCodeFormatterConstants.TRUE.equals(oldOption);
-		}
-		if (isFormattingComments) {
-			if (lineSeparator != null) {
-				this.preferences.line_separator = lineSeparator;
-			} else {
-				this.preferences.line_separator = Util.LINE_SEPARATOR;
-			}
-			this.preferences.initial_indentation_level = indentationLevel;
-			this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, null, includeComments);
-
-			IRegion coveredRegion = getCoveredRegion(regions);
-			int offset = coveredRegion.getOffset();
-			int length = coveredRegion.getLength();
-
-			final CommentRegion region = createRegion(kind, new Document(source), new Position(offset, length), this.newCodeFormatter);
-			if (region != null) {
-				return this.newCodeFormatter.format(source, region);
-			}
-		}
-		return new MultiTextEdit();
-	}
-
 	private TextEdit formatCompilationUnit(String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) {
 		CompilationUnitDeclaration compilationUnitDeclaration = this.codeSnippetParsingUtil.parseCompilationUnit(source.toCharArray(), getDefaultCompilerOptions(), true);
 
@@ -333,24 +241,24 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		return this.newCodeFormatter.format(source, compilationUnitDeclaration);
 	}
 
-	private TextEdit formatExpression(String source, int indentationLevel, String lineSeparator, IRegion[] regions) {
+	private TextEdit formatExpression(String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) {
 		Expression expression = this.codeSnippetParsingUtil.parseExpression(source.toCharArray(), getDefaultCompilerOptions(), true);
 
 		if (expression == null) {
 			// a problem occurred while parsing the source
 			return null;
 		}
-		return internalFormatExpression(source, indentationLevel, lineSeparator, expression, regions);
+		return internalFormatExpression(source, indentationLevel, lineSeparator, expression, regions, includeComments);
 	}
 
-	private TextEdit formatStatements(String source, int indentationLevel, String lineSeparator, IRegion[] regions) {
+	private TextEdit formatStatements(String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) {
 		ConstructorDeclaration constructorDeclaration = this.codeSnippetParsingUtil.parseStatements(source.toCharArray(), getDefaultCompilerOptions(), true, false);
 
 		if (constructorDeclaration.statements == null) {
 			// a problem occured while parsing the source
 			return null;
 		}
-		return internalFormatStatements(source, indentationLevel, lineSeparator, constructorDeclaration, regions);
+		return internalFormatStatements(source, indentationLevel, lineSeparator, constructorDeclaration, regions, includeComments);
 	}
 
 	private IRegion getCoveredRegion(IRegion[] regions) {
@@ -385,6 +293,7 @@ public class DefaultCodeFormatter extends CodeFormatter {
 			optionsMap.put(CompilerOptions.OPTION_ReportDeprecationWhenOverridingDeprecatedMethod, CompilerOptions.DISABLED);
 			optionsMap.put(CompilerOptions.OPTION_ReportHiddenCatchBlock, CompilerOptions.IGNORE);
 			optionsMap.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.IGNORE);
+			optionsMap.put(CompilerOptions.OPTION_ReportUnusedObjectAllocation, CompilerOptions.IGNORE);
 			optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameter, CompilerOptions.IGNORE);
 			optionsMap.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
 			optionsMap.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
@@ -421,8 +330,8 @@ public class DefaultCodeFormatter extends CodeFormatter {
 			optionsMap.put(CompilerOptions.OPTION_ReportUnqualifiedFieldAccess, CompilerOptions.IGNORE);
 			optionsMap.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_4);
 			optionsMap.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_2);
-			optionsMap.put(CompilerOptions.OPTION_TaskTags, ""); //$NON-NLS-1$
-			optionsMap.put(CompilerOptions.OPTION_TaskPriorities, ""); //$NON-NLS-1$
+			optionsMap.put(CompilerOptions.OPTION_TaskTags, Util.EMPTY_STRING);
+			optionsMap.put(CompilerOptions.OPTION_TaskPriorities, Util.EMPTY_STRING);
 			optionsMap.put(CompilerOptions.OPTION_TaskCaseSensitive, CompilerOptions.DISABLED);
 			optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameterWhenImplementingAbstract, CompilerOptions.DISABLED);
 			optionsMap.put(CompilerOptions.OPTION_ReportUnusedParameterWhenOverridingConcrete, CompilerOptions.DISABLED);
@@ -440,7 +349,7 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		return this.defaultCompilerOptions;
 	}
 
-	private TextEdit internalFormatClassBodyDeclarations(String source, int indentationLevel, String lineSeparator, ASTNode[] bodyDeclarations, IRegion[] regions) {
+	private TextEdit internalFormatClassBodyDeclarations(String source, int indentationLevel, String lineSeparator, ASTNode[] bodyDeclarations, IRegion[] regions, boolean includeComments) {
 		if (lineSeparator != null) {
 			this.preferences.line_separator = lineSeparator;
 		} else {
@@ -448,11 +357,11 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		}
 		this.preferences.initial_indentation_level = indentationLevel;
 
-		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, false);
+		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, includeComments);
 		return this.newCodeFormatter.format(source, bodyDeclarations);
 	}
 
-	private TextEdit internalFormatExpression(String source, int indentationLevel, String lineSeparator, Expression expression, IRegion[] regions) {
+	private TextEdit internalFormatExpression(String source, int indentationLevel, String lineSeparator, Expression expression, IRegion[] regions, boolean includeComments) {
 		if (lineSeparator != null) {
 			this.preferences.line_separator = lineSeparator;
 		} else {
@@ -460,13 +369,13 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		}
 		this.preferences.initial_indentation_level = indentationLevel;
 
-		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, false);
+		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, includeComments);
 
 		TextEdit textEdit = this.newCodeFormatter.format(source, expression);
 		return textEdit;
 	}
 
-	private TextEdit internalFormatStatements(String source, int indentationLevel, String lineSeparator, ConstructorDeclaration constructorDeclaration, IRegion[] regions) {
+	private TextEdit internalFormatStatements(String source, int indentationLevel, String lineSeparator, ConstructorDeclaration constructorDeclaration, IRegion[] regions, boolean includeComments) {
 		if (lineSeparator != null) {
 			this.preferences.line_separator = lineSeparator;
 		} else {
@@ -474,7 +383,7 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		}
 		this.preferences.initial_indentation_level = indentationLevel;
 
-		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, false);
+		this.newCodeFormatter = new CodeFormatterVisitor(this.preferences, this.options, regions, this.codeSnippetParsingUtil, includeComments);
 
 		return this.newCodeFormatter.format(source, constructorDeclaration);
 	}
@@ -520,13 +429,7 @@ public class DefaultCodeFormatter extends CodeFormatter {
 					break;
 			}
 			if (kind != -1) {
-				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=227043
-				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102780
-				// use the integrated comment formatter to format comment
-				if (ENABLE_NEW_COMMENTS_FORMAT /*|| FORCE_NEW_COMMENTS_FORMAT*/) {
-					return formatComment(kind, source, indentationLevel, lineSeparator, regions);
-				}
-				return formatComment(kind, source, indentationLevel, lineSeparator, regions, includeComments);
+				return formatComment(kind, source, indentationLevel, lineSeparator, regions);
 			}
 		} catch (InvalidInputException e) {
 			// ignore
@@ -536,19 +439,19 @@ public class DefaultCodeFormatter extends CodeFormatter {
 		// probe for expression
 		Expression expression = this.codeSnippetParsingUtil.parseExpression(source.toCharArray(), getDefaultCompilerOptions(), true);
 		if (expression != null) {
-			return internalFormatExpression(source, indentationLevel, lineSeparator, expression, regions);
+			return internalFormatExpression(source, indentationLevel, lineSeparator, expression, regions, includeComments);
 		}
 
 		// probe for body declarations (fields, methods, constructors)
 		ASTNode[] bodyDeclarations = this.codeSnippetParsingUtil.parseClassBodyDeclarations(source.toCharArray(), getDefaultCompilerOptions(), true);
 		if (bodyDeclarations != null) {
-			return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, regions);
+			return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, regions, includeComments);
 		}
 
 		// probe for statements
 		ConstructorDeclaration constructorDeclaration = this.codeSnippetParsingUtil.parseStatements(source.toCharArray(), getDefaultCompilerOptions(), true, false);
 		if (constructorDeclaration.statements != null) {
-			return internalFormatStatements(source, indentationLevel, lineSeparator, constructorDeclaration, regions);
+			return internalFormatStatements(source, indentationLevel, lineSeparator, constructorDeclaration, regions, includeComments);
 		}
 
 		// this has to be a compilation unit
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
index 74d4d4d..0e6bf72 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak - Contribution for bug 150741
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
@@ -15,6 +16,7 @@ import java.util.Map;
 
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.jdt.internal.formatter.align.Alignment;
 
 /**
@@ -46,6 +48,7 @@ public class DefaultCodeFormatterOptions {
 	}
 
 	public int alignment_for_arguments_in_allocation_expression;
+	public int alignment_for_arguments_in_annotation;
 	public int alignment_for_arguments_in_enum_constant;
 	public int alignment_for_arguments_in_explicit_constructor_call;
 	public int alignment_for_arguments_in_method_invocation;
@@ -56,6 +59,7 @@ public class DefaultCodeFormatterOptions {
 	public int alignment_for_conditional_expression;
 	public int alignment_for_enum_constants;
 	public int alignment_for_expressions_in_array_initializer;
+	public int alignment_for_method_declaration;
 	public int alignment_for_multiple_fields;
 	public int alignment_for_parameters_in_constructor_declaration;
 	public int alignment_for_parameters_in_method_declaration;
@@ -98,8 +102,11 @@ public class DefaultCodeFormatterOptions {
 
 	public boolean comment_clear_blank_lines_in_javadoc_comment;
 	public boolean comment_clear_blank_lines_in_block_comment;
+	public boolean comment_new_lines_at_block_boundaries;
+	public boolean comment_new_lines_at_javadoc_boundaries;
 	public boolean comment_format_javadoc_comment;
 	public boolean comment_format_line_comment;
+	public boolean comment_format_line_comment_starting_on_first_column;
 	public boolean comment_format_block_comment;
 	public boolean comment_format_header;
 	public boolean comment_format_html;
@@ -110,6 +117,12 @@ public class DefaultCodeFormatterOptions {
 	public boolean comment_insert_new_line_for_parameter;
 	public int comment_line_length;
 
+	public boolean use_tags;
+	public char[] disabling_tag;
+	public char[] enabling_tag;
+	private final static char[] DEFAULT_DISABLING_TAG = "@formatter:off".toCharArray(); //$NON-NLS-1$
+	private final static char[] DEFAULT_ENABLING_TAG = "@formatter:on".toCharArray(); //$NON-NLS-1$
+
 	public boolean indent_statements_compare_to_block;
 	public boolean indent_statements_compare_to_body;
 	public boolean indent_body_declarations_compare_to_annotation_declaration_header;
@@ -125,6 +138,7 @@ public class DefaultCodeFormatterOptions {
 	public boolean insert_new_line_after_annotation_on_member;
 	public boolean insert_new_line_after_annotation_on_parameter;
 	public boolean insert_new_line_after_annotation_on_local_variable;
+	public boolean insert_new_line_after_label;
 	public boolean insert_new_line_after_opening_brace_in_array_initializer;
 	public boolean insert_new_line_at_end_of_file_if_missing;
 	public boolean insert_new_line_before_catch_in_try_statement;
@@ -311,6 +325,7 @@ public class DefaultCodeFormatterOptions {
 	public int tab_char;
 	public boolean use_tabs_only_for_leading_indentations;
 	public boolean wrap_before_binary_operator;
+	public boolean wrap_outer_expressions_when_nested;
 
 	public int initial_indentation_level;
 	public String line_separator;
@@ -332,6 +347,7 @@ public class DefaultCodeFormatterOptions {
 	public Map getMap() {
 		Map options = new HashMap();
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ALLOCATION_EXPRESSION, getAlignment(this.alignment_for_arguments_in_allocation_expression));
+		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION, getAlignment(this.alignment_for_arguments_in_annotation));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT, getAlignment(this.alignment_for_arguments_in_enum_constant));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL, getAlignment(this.alignment_for_arguments_in_explicit_constructor_call));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION, getAlignment(this.alignment_for_arguments_in_method_invocation));
@@ -342,6 +358,7 @@ public class DefaultCodeFormatterOptions {
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION, getAlignment(this.alignment_for_conditional_expression));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ENUM_CONSTANTS, getAlignment(this.alignment_for_enum_constants));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_EXPRESSIONS_IN_ARRAY_INITIALIZER, getAlignment(this.alignment_for_expressions_in_array_initializer));
+		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION, getAlignment(this.alignment_for_method_declaration));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS, getAlignment(this.alignment_for_multiple_fields));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_CONSTRUCTOR_DECLARATION, getAlignment(this.alignment_for_parameters_in_constructor_declaration));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION, getAlignment(this.alignment_for_parameters_in_method_declaration));
@@ -365,11 +382,14 @@ public class DefaultCodeFormatterOptions {
 		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, this.brace_position_for_switch);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT, this.comment_clear_blank_lines_in_block_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT, this.comment_clear_blank_lines_in_javadoc_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
-		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT, this.comment_format_javadoc_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
-		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT, this.comment_format_line_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES, this.comment_new_lines_at_block_boundaries ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES, this.comment_new_lines_at_javadoc_boundaries ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT, this.comment_format_block_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER, this.comment_format_header ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HTML, this.comment_format_html ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT, this.comment_format_javadoc_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT, this.comment_format_line_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN, this.comment_format_line_comment_starting_on_first_column ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_SOURCE, this.comment_format_source ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION, this.comment_indent_parameter_description ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_ROOT_TAGS, this.comment_indent_root_tags ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
@@ -418,6 +438,7 @@ public class DefaultCodeFormatterOptions {
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION, this.insert_new_line_in_empty_enum_declaration? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, this.insert_new_line_in_empty_method_body? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION, this.insert_new_line_in_empty_type_declaration? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, this.insert_new_line_after_label? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_AND_IN_TYPE_PARAMETER, this.insert_space_after_and_in_type_parameter? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ASSIGNMENT_OPERATOR, this.insert_space_after_assignment_operator? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_AT_IN_ANNOTATION, this.insert_space_after_at_in_annotation? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
@@ -599,6 +620,10 @@ public class DefaultCodeFormatterOptions {
 		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, Integer.toString(this.tab_size));
 		options.put(DefaultCodeFormatterConstants.FORMATTER_USE_TABS_ONLY_FOR_LEADING_INDENTATIONS, this.use_tabs_only_for_leading_indentations ?  DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, this.wrap_before_binary_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG, this.disabling_tag == null ? Util.EMPTY_STRING : new String(this.disabling_tag));
+		options.put(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG, this.enabling_tag == null ? Util.EMPTY_STRING : new String(this.enabling_tag));
+		options.put(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS, this.use_tags ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED, this.wrap_outer_expressions_when_nested ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		return options;
 	}
 
@@ -613,6 +638,16 @@ public class DefaultCodeFormatterOptions {
 				this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
 			}
 		}
+		final Object alignmentForArgumentsInAnnotationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION);
+		if (alignmentForArgumentsInAnnotationOption != null) {
+			try {
+				this.alignment_for_arguments_in_annotation = Integer.parseInt((String) alignmentForArgumentsInAnnotationOption);
+			} catch (NumberFormatException e) {
+				this.alignment_for_arguments_in_annotation = Alignment.M_NO_ALIGNMENT;
+			} catch (ClassCastException e) {
+				this.alignment_for_arguments_in_annotation = Alignment.M_NO_ALIGNMENT;
+			}
+		}
 		final Object alignmentForArgumentsInEnumConstantOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT);
 		if (alignmentForArgumentsInEnumConstantOption != null) {
 			try {
@@ -713,6 +748,16 @@ public class DefaultCodeFormatterOptions {
 				this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT;
 			}
 		}
+		final Object alignmentForMethodDeclarationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION);
+		if (alignmentForMethodDeclarationOption != null) {
+			try {
+				this.alignment_for_method_declaration = Integer.parseInt((String) alignmentForMethodDeclarationOption);
+			} catch (NumberFormatException e) {
+				this.alignment_for_method_declaration = Alignment.M_COMPACT_SPLIT;
+			} catch(ClassCastException e) {
+				this.alignment_for_method_declaration = Alignment.M_COMPACT_SPLIT;
+			}
+		}
 		final Object alignmentForMultipleFieldsOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS);
 		if (alignmentForMultipleFieldsOption != null) {
 			try {
@@ -1048,6 +1093,10 @@ public class DefaultCodeFormatterOptions {
 		if (commentFormatLineCommentOption != null) {
 			this.comment_format_line_comment = DefaultCodeFormatterConstants.TRUE.equals(commentFormatLineCommentOption);
 		}
+		final Object formatLineCommentStartingOnFirstColumnOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN);
+		if (formatLineCommentStartingOnFirstColumnOption != null) {
+			this.comment_format_line_comment_starting_on_first_column = DefaultCodeFormatterConstants.TRUE.equals(formatLineCommentStartingOnFirstColumnOption);
+		}
 		final Object commentFormatHeaderOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER);
 		if (commentFormatHeaderOption != null) {
 			this.comment_format_header = DefaultCodeFormatterConstants.TRUE.equals(commentFormatHeaderOption);
@@ -1086,6 +1135,14 @@ public class DefaultCodeFormatterOptions {
 				this.comment_line_length = 80;
 			}
 		}
+		final Object commentNewLinesAtBlockBoundariesOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES);
+		if (commentNewLinesAtBlockBoundariesOption != null) {
+			this.comment_new_lines_at_block_boundaries = DefaultCodeFormatterConstants.TRUE.equals(commentNewLinesAtBlockBoundariesOption);
+		}
+		final Object commentNewLinesAtJavadocBoundariesOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES);
+		if (commentNewLinesAtJavadocBoundariesOption != null) {
+			this.comment_new_lines_at_javadoc_boundaries = DefaultCodeFormatterConstants.TRUE.equals(commentNewLinesAtJavadocBoundariesOption);
+		}
 		final Object indentStatementsCompareToBlockOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BLOCK);
 		if (indentStatementsCompareToBlockOption != null) {
 			this.indent_statements_compare_to_block = DefaultCodeFormatterConstants.TRUE.equals(indentStatementsCompareToBlockOption);
@@ -1192,6 +1249,10 @@ public class DefaultCodeFormatterOptions {
 		if (insertNewLineInEmptyTypeDeclarationOption != null) {
 			this.insert_new_line_in_empty_type_declaration = JavaCore.INSERT.equals(insertNewLineInEmptyTypeDeclarationOption);
 		}
+		final Object insertNewLineAfterLabelOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL);
+		if (insertNewLineAfterLabelOption != null) {
+			this.insert_new_line_after_label = JavaCore.INSERT.equals(insertNewLineAfterLabelOption);
+		}
 		final Object insertSpaceAfterAndInWildcardOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_AND_IN_TYPE_PARAMETER);
 		if (insertSpaceAfterAndInWildcardOption != null) {
 			this.insert_space_after_and_in_type_parameter = JavaCore.INSERT.equals(insertSpaceAfterAndInWildcardOption);
@@ -1900,6 +1961,48 @@ public class DefaultCodeFormatterOptions {
 		if (wrapBeforeBinaryOperatorOption != null) {
 			this.wrap_before_binary_operator = DefaultCodeFormatterConstants.TRUE.equals(wrapBeforeBinaryOperatorOption);
 		}
+		final Object useTags = settings.get(DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS);
+		if (useTags != null) {
+			this.use_tags = DefaultCodeFormatterConstants.TRUE.equals(useTags);
+		}
+		final Object disableTagOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG);
+		if (disableTagOption != null) {
+			if (disableTagOption instanceof String) {
+				String stringValue = (String) disableTagOption;
+				int idx = stringValue.indexOf('\n');
+				if (idx == 0) {
+					this.disabling_tag = null;
+				} else {
+					String tag = idx < 0 ? stringValue.trim() : stringValue.substring(0, idx).trim();
+					if (tag.length() == 0) {
+						this.disabling_tag = null;
+					} else {
+						this.disabling_tag = tag.toCharArray();
+					}
+				}
+			}
+		}
+		final Object enableTagOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG);
+		if (enableTagOption != null) {
+			if (enableTagOption instanceof String) {
+				String stringValue = (String) enableTagOption;
+				int idx = stringValue.indexOf('\n');
+				if (idx == 0) {
+					this.enabling_tag = null;
+				} else {
+					String tag = idx < 0 ? stringValue.trim() : stringValue.substring(0, idx).trim();
+					if (tag.length() == 0) {
+						this.enabling_tag = null;
+					} else {
+						this.enabling_tag = tag.toCharArray();
+					}
+				}
+			}
+		}
+		final Object wrapWrapOuterExpressionsWhenNestedOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED);
+		if (wrapWrapOuterExpressionsWhenNestedOption != null) {
+			this.wrap_outer_expressions_when_nested = DefaultCodeFormatterConstants.TRUE.equals(wrapWrapOuterExpressionsWhenNestedOption);
+		}
 	}
 
 	/**
@@ -1949,6 +2052,7 @@ public class DefaultCodeFormatterOptions {
 
 	public void setDefaultSettings() {
 		this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
+		this.alignment_for_arguments_in_annotation = Alignment.M_NO_ALIGNMENT;
 		this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
@@ -1959,6 +2063,7 @@ public class DefaultCodeFormatterOptions {
 		this.alignment_for_conditional_expression = Alignment.M_ONE_PER_LINE_SPLIT;
 		this.alignment_for_enum_constants = Alignment.NONE;
 		this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT;
+		this.alignment_for_method_declaration = Alignment.M_NO_ALIGNMENT;
 		this.alignment_for_multiple_fields = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_parameters_in_constructor_declaration = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT;
@@ -1985,6 +2090,7 @@ public class DefaultCodeFormatterOptions {
 		this.comment_format_block_comment = true;
 		this.comment_format_javadoc_comment = true;
 		this.comment_format_line_comment = true;
+		this.comment_format_line_comment_starting_on_first_column = true;
 		this.comment_format_header = false;
 		this.comment_format_html = true;
 		this.comment_format_source = true;
@@ -1992,6 +2098,8 @@ public class DefaultCodeFormatterOptions {
 		this.comment_indent_root_tags = true;
 		this.comment_insert_empty_line_before_root_tags = true;
 		this.comment_insert_new_line_for_parameter = true;
+		this.comment_new_lines_at_block_boundaries = true;
+		this.comment_new_lines_at_javadoc_boundaries = true;
 		this.comment_line_length = 80;
 		this.continuation_indentation = 2;
 		this.continuation_indentation_for_array_initializer = 2;
@@ -2205,6 +2313,10 @@ public class DefaultCodeFormatterOptions {
 		this.tab_char = TAB; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49081
 		this.use_tabs_only_for_leading_indentations = false;
 		this.wrap_before_binary_operator = true;
+		this.use_tags = false;
+		this.disabling_tag = DEFAULT_DISABLING_TAG;
+		this.enabling_tag = DEFAULT_ENABLING_TAG;
+		this.wrap_outer_expressions_when_nested = true;
 	}
 
 	public void setEclipseDefaultSettings() {
@@ -2215,6 +2327,7 @@ public class DefaultCodeFormatterOptions {
 
 	public void setJavaConventionsSettings() {
 		this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
+		this.alignment_for_arguments_in_annotation = Alignment.M_NO_ALIGNMENT;
 		this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_arguments_in_explicit_constructor_call = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
@@ -2225,6 +2338,7 @@ public class DefaultCodeFormatterOptions {
 		this.alignment_for_conditional_expression = Alignment.M_NEXT_PER_LINE_SPLIT;
 		this.alignment_for_enum_constants = Alignment.NONE;
 		this.alignment_for_expressions_in_array_initializer = Alignment.M_COMPACT_SPLIT;
+		this.alignment_for_method_declaration = Alignment.M_NO_ALIGNMENT;
 		this.alignment_for_multiple_fields = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_parameters_in_constructor_declaration = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_parameters_in_method_declaration = Alignment.M_COMPACT_SPLIT;
@@ -2251,6 +2365,7 @@ public class DefaultCodeFormatterOptions {
 		this.comment_format_block_comment = true;
 		this.comment_format_javadoc_comment = true;
 		this.comment_format_line_comment = true;
+		this.comment_format_line_comment_starting_on_first_column = true;
 		this.comment_format_header = false;
 		this.comment_format_html = true;
 		this.comment_format_source = true;
@@ -2258,6 +2373,8 @@ public class DefaultCodeFormatterOptions {
 		this.comment_indent_root_tags = true;
 		this.comment_insert_empty_line_before_root_tags = true;
 		this.comment_insert_new_line_for_parameter = true;
+		this.comment_new_lines_at_block_boundaries = true;
+		this.comment_new_lines_at_javadoc_boundaries = true;
 		this.comment_line_length = 80;
 		this.continuation_indentation = 2;
 		this.continuation_indentation_for_array_initializer = 2;
@@ -2471,5 +2588,9 @@ public class DefaultCodeFormatterOptions {
 		this.tab_char = MIXED;
 		this.use_tabs_only_for_leading_indentations = false;
 		this.wrap_before_binary_operator = true;
+		this.use_tags = false;
+		this.disabling_tag = DEFAULT_DISABLING_TAG;
+		this.enabling_tag = DEFAULT_ENABLING_TAG;
+		this.wrap_outer_expressions_when_nested = true;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocBlock.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocBlock.java
index da2ad06..daf6fc4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
+import org.eclipse.jdt.internal.compiler.parser.Scanner;
 import org.eclipse.jdt.internal.formatter.comment.IJavaDocTagConstants;
 
 /**
@@ -31,6 +32,7 @@ public class FormatJavadocBlock extends FormatJavadocNode implements IJavaDocTag
 	final static int PARAM_TAG = 0x0020;
 	final static int IN_PARAM_TAG = 0x0040;
 	final static int IN_DESCRIPTION = 0x0080;
+	final static int IMMUTABLE = 0x0100;
 
 	// constants
 	final static int MAX_TAG_HIERARCHY = 10;
@@ -53,6 +55,11 @@ public FormatJavadocBlock(int start, int end, int line, int value) {
 		case TAG_THROWS_VALUE:
 		case TAG_EXCEPTION_VALUE:
 			this.flags |= PARAM_TAG;
+			break;
+		case TAG_CODE_VALUE:
+		case TAG_LITERAL_VALUE:
+			this.flags |= IMMUTABLE;
+			break;
 	}
 }
 
@@ -141,6 +148,9 @@ void addText(FormatJavadocText text) {
 		}
 	}
 	addNode(text);
+	if (isImmutable()) {
+		text.immutable = true;
+	}
 }
 
 void clean() {
@@ -211,14 +221,14 @@ FormatJavadocText[] getTextHierarchy(FormatJavadocNode node, int htmlDepth) {
 			}
 			// If we have a text after another text, keep the same level to append
 			if (lastTextCanHaveChildren || (htmlDepth == 0 && !lastText.isHtmlTag() && text != null && !text.isHtmlTag())) {
-				if (textHierarchy == null) textHierarchy = new FormatJavadocText[MAX_TAG_HIERARCHY];
+				if (textHierarchy == null) textHierarchy = new FormatJavadocText[htmlDepth+1];
 				textHierarchy[ptr] = lastText;
 				return textHierarchy;
 			}
 			// Last text cannot have children, so return the built hierarchy
 			return textHierarchy;
 		}
-		if (textHierarchy == null) textHierarchy = new FormatJavadocText[MAX_TAG_HIERARCHY];
+		if (textHierarchy == null) textHierarchy = new FormatJavadocText[htmlDepth+1];
 		textHierarchy[ptr++] = lastText;
 		lastNode = lastText.htmlNodes[lastText.htmlNodesPtr];
 	}
@@ -270,6 +280,19 @@ public boolean isHeaderLine() {
 }
 
 /**
+ * Returns whether the block is immutable or not.
+ * <p>
+ * Currently, only {@code} and {@literal} inline tags block are considered as
+ * immutable.
+ * </p>
+ * @return <code>true</code> if the block is immutable,
+ * 	<code>false</code> otherwise.
+ */
+public boolean isImmutable() {
+	return (this.flags & IMMUTABLE) == IMMUTABLE;
+}
+
+/**
  * Returns whether the block is a description or inlined in a description.
  * @see #isParamTag()
  *
@@ -302,9 +325,9 @@ public boolean isInParamTag() {
 }
 
 /**
- * Returns whether the text is on the same line of the tag.
+ * Returns whether the the tag is on one line only.
  *
- * @return <code>true</code> if the text is on the same line than the tag,
+ * @return <code>true</code> if the tag is on one line only,
  * 	<code>false</code> otherwise.
  */
 public boolean isOneLineTag() {
@@ -332,9 +355,14 @@ void setHeaderLine(int javadocLineStart) {
 }
 
 protected void toString(StringBuffer buffer) {
-	if ((this.flags & INLINED) != 0) buffer.append('{');
+	boolean inlined = (this.flags & INLINED) != 0;
+	if (inlined) buffer.append("	{"); //$NON-NLS-1$
 	buffer.append('@');
-	buffer.append(this.tagValue);
+	if (this.tagValue == TAG_OTHERS_VALUE) {
+		buffer.append("others_tag"); //$NON-NLS-1$
+	} else {
+		buffer.append(TAG_NAMES[this.tagValue]);
+	}
 	super.toString(buffer);
 	if (this.reference == null) {
 		buffer.append('\n');
@@ -343,8 +371,52 @@ protected void toString(StringBuffer buffer) {
 		this.reference.toString(buffer);
 		buffer.append(")\n"); //$NON-NLS-1$
 	}
+	StringBuffer flagsBuffer = new StringBuffer();
+	if (isDescription()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("description"); //$NON-NLS-1$
+	}
+	if (isFirst()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("first"); //$NON-NLS-1$
+	}
+	if (isHeaderLine()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("header line"); //$NON-NLS-1$
+	}
+	if (isImmutable()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("immutable"); //$NON-NLS-1$
+	}
+	if (isInDescription()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("in description"); //$NON-NLS-1$
+	}
+	if (isInlined()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("inlined"); //$NON-NLS-1$
+	}
+	if (isInParamTag()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("in param tag"); //$NON-NLS-1$
+	}
+	if (isOneLineTag()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("one line tag"); //$NON-NLS-1$
+	}
+	if (isParamTag()) {
+		if (flagsBuffer.length() > 0) flagsBuffer.append(',');
+		flagsBuffer.append("param tag"); //$NON-NLS-1$
+	}
+	if (flagsBuffer.length() > 0) {
+		if (inlined) buffer.append('\t');
+		buffer.append("	flags: "); //$NON-NLS-1$
+		buffer.append(flagsBuffer);
+		buffer.append('\n');
+	}
 	if (this.nodesPtr > -1) {
 		for (int i = 0; i <= this.nodesPtr; i++) {
+			if (inlined) buffer.append('\t');
 			this.nodes[i].toString(buffer);
 		}
 	}
@@ -368,4 +440,16 @@ public void toStringDebug(StringBuffer buffer, char[] source) {
 		this.nodes[i].toStringDebug(buffer, source);
 	}
 }
+
+void update(Scanner scanner) {
+	int blockEnd = scanner.getLineNumber(this.sourceEnd);
+	if (blockEnd == this.lineStart) {
+		this.flags |= FormatJavadocBlock.ONE_LINE_TAG;
+	}
+	for (int i=0; i<=this.nodesPtr; i++) {
+		if (!this.nodes[i].isText()) {
+			((FormatJavadocBlock)this.nodes[i]).update(scanner);
+		}
+	}
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocNode.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocNode.java
index d41531d..b73283b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocNode.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,6 +56,17 @@ public boolean isText() {
 	return false;
 }
 
+/**
+ * Returns whether the node is immutable or not. If <code>true</code>, then
+ * the formatter will leave it contents unchanged.
+ *
+ * @return <code>true</code> if the node is immutable, <code>false</code>
+ * 	otherwise.
+ */
+public boolean isImmutable() {
+	return false;
+}
+
 public String toString() {
 	StringBuffer buffer = new StringBuffer();
 	toString(buffer);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocText.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocText.java
index e6e882f..a4ff1e3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocText.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatJavadocText.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ public class FormatJavadocText extends FormatJavadocNode implements IJavaDocTagC
 	long[] separators;
 	int separatorsPtr = -1;
 	private int htmlTagIndex = -1;
+	boolean immutable = false;
 	FormatJavadocNode[] htmlNodes;
 	int[] htmlIndexes;
 	int htmlNodesPtr = -1;
@@ -49,6 +50,7 @@ public FormatJavadocText(int start, int end, int line, int htmlIndex, int htmlDe
  * child node.
  */
 void appendText(FormatJavadocText text) {
+	text.immutable = this.immutable;
 	if (this.depth == text.depth) {
 		addSeparator(text);
 		this.sourceEnd = text.sourceEnd;
@@ -174,6 +176,21 @@ public boolean isImmutableHtmlTag() {
 }
 
 /**
+ * Returns whether the text is immutable or not.
+ * <p>
+ * A text in considered as immutable when it  belongs to an immutable block
+ * or when it's an immutable html tag.
+ * </p>
+ *
+ * @return <code>true</code> if the node is an immutable tag,
+ *		<code>false</code> otherwise.
+ */
+public boolean isImmutable() {
+	return this.immutable || (this.htmlTagIndex != -1 && (this.htmlTagIndex & JAVADOC_TAGS_ID_MASK) == JAVADOC_IMMUTABLE_TAGS_ID);
+
+}
+
+/**
  * Returns whether the text at the given separator index position is after a
  * separator tag or not.
  *
@@ -212,6 +229,9 @@ protected void toString(StringBuffer buffer) {
 	StringBuffer indentation = new StringBuffer();
 	for (int t=0; t<=this.depth; t++) indentation.append('\t');
 	buffer.append(indentation);
+	if (isImmutable()) {
+		buffer.append("immutable "); //$NON-NLS-1$
+	}
 	buffer.append("text"); //$NON-NLS-1$
 	super.toString(buffer);
 	buffer.append(" ("); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java
index dcdd100..2e3e1d6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.jdt.internal.formatter.comment.IJavaDocTagConstants;
 public class FormatterCommentParser extends JavadocParser implements IJavaDocTagConstants {
 	char[][] htmlTags;
 	int htmlTagsPtr = -1;
+	int inlineHtmlTagsPtr = -1;
 	private boolean invalidTagName;
 	public boolean parseHtmlTags;
 
@@ -272,7 +273,7 @@ protected boolean parseHtmlTag(int previousPosition, int endTextPosition) throws
 	    }
 	    
 	    // Looking for tag closing
-	    switch (token = readTokenAndConsume()) {
+	    switch (readTokenAndConsume()) {
 	    	case TerminalTokens.TokenNameLESS:
 	    	case TerminalTokens.TokenNameLESS_EQUAL:
 	    		// consider that the closing '>' is missing
@@ -355,6 +356,7 @@ protected boolean parseIdentifierTag(boolean report) {
 		this.scanner.resetTo(this.index, this.javadocEnd);
 		return true;
 	}
+	this.tagValue = TAG_OTHERS_VALUE; // tag is invalid, do not keep the parsed tag value
 	return false;
 }
 
@@ -381,6 +383,7 @@ protected boolean parseParam() throws InvalidInputException {
 			}
 			this.scanner.resetTo(this.tagSourceEnd+1, this.javadocEnd);
 		}
+		this.tagValue = TAG_OTHERS_VALUE; // tag is invalid, do not keep the parsed tag value
 	}
 	return valid;
 }
@@ -393,6 +396,7 @@ protected boolean parseReference() throws InvalidInputException {
 	if (!valid) {
 		this.scanner.resetTo(this.tagSourceEnd+1, this.javadocEnd);
 		this.index = this.tagSourceEnd+1;
+		this.tagValue = TAG_OTHERS_VALUE; // tag is invalid, do not keep the parsed tag value
 	}
 	return valid;
 }
@@ -415,7 +419,8 @@ protected boolean parseTag(int previousPosition) throws InvalidInputException {
 		int ptr = this.htmlTagsPtr;
    		while (ptr >= 0) {
 			if (getHtmlTagIndex(this.htmlTags[ptr--]) == JAVADOC_CODE_TAGS_ID) {
-				if (this.textStart == -1) this.textStart = previousPosition;
+				if (this.textStart == -1) this.textStart = this.inlineTagStarted ? this.inlineTagStart : previousPosition;
+				this.inlineTagStarted = false;
 				return true;
 			}
 		}
@@ -504,7 +509,7 @@ protected boolean parseTag(int previousPosition) throws InvalidInputException {
 			if (length == TAG_LINK_LENGTH && CharOperation.equals(TAG_LINK, tagName)) {
 				this.tagValue = TAG_LINK_VALUE;
 				if (this.inlineTagStarted || (this.kind & COMPLETION_PARSER) != 0) {
-					valid= parseReference();
+					valid = parseReference();
 				} else {
 					// bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=53290
 					// Cannot have @link outside inline comment
@@ -603,7 +608,6 @@ protected boolean parseTag(int previousPosition) throws InvalidInputException {
 	} else if (this.invalidTagName) {
 		this.textStart = previousPosition;
 	} else if (this.astPtr == ptr) {
-		this.tagValue = TAG_OTHERS_VALUE; // tag is invalid, do not keep the parsed tag value
 		createTag();
 	}
 	return true;
@@ -618,6 +622,7 @@ protected boolean parseThrows() {
 		// If invalid, restart from the end tag position
 		this.scanner.resetTo(this.tagSourceEnd+1, this.javadocEnd);
 		this.index = this.tagSourceEnd+1;
+		this.tagValue = TAG_OTHERS_VALUE; // tag is invalid, do not keep the parsed tag value
 	}
 	return valid;
 }
@@ -747,6 +752,23 @@ protected void refreshInlineTagPosition(int previousPosition) {
 	}
 }
 
+/*
+ * Store the html tags level when entering an inline tag in case a wrong sequence
+ * of opening/closing tags is defined inside it. Then, when leaving the inline tag
+ * the level is reset to the entering value and avoid to wrongly attach subsequent
+ * html tags to node inside the inline tag last node...
+ */
+protected void setInlineTagStarted(boolean started) {
+	super.setInlineTagStarted(started);
+	if (started) {
+		this.inlineHtmlTagsPtr = this.htmlTagsPtr;
+	} else {
+		if (this.htmlTagsPtr > this.inlineHtmlTagsPtr) {
+			this.htmlTagsPtr = this.inlineHtmlTagsPtr;
+		}
+	}
+}
+
 public String toString() {
 	StringBuffer buffer = new StringBuffer();
 	buffer.append("FormatterCommentParser\n"); //$NON-NLS-1$
@@ -774,10 +796,7 @@ protected void updateDocComment() {
 		for (int i=0; i<length; i++) {
 			FormatJavadocBlock block = (FormatJavadocBlock) this.astStack[i];
 			block.clean();
-			int blockEnd = this.scanner.getLineNumber(block.sourceEnd);
-			if (block.lineStart == blockEnd) {
-				block.flags |= FormatJavadocBlock.ONE_LINE_TAG;
-			}
+			block.update(this.scanner);
 			formatJavadoc.blocks[i] = block;
 			if (i== 0) {
 				block.flags |= FormatJavadocBlock.FIRST;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Location.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Location.java
index e80bdcb..bf82570 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Location.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Location.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ package org.eclipse.jdt.internal.formatter;
 public class Location {
 
 	public int inputOffset;
+	/** deprecated */
 	public int inputColumn;
 	public int outputLine;
 	public int outputColumn;
@@ -43,7 +44,7 @@ public class Location {
 		this.outputColumn = scribe.column;
 		this.outputLine = scribe.line;
 		this.inputOffset = sourceRestart;
-		this.inputColumn = scribe.getCurrentIndentation(sourceRestart);
+		this.inputColumn = scribe.getCurrentIndentation(sourceRestart) + 1;
 		this.outputIndentationLevel = scribe.indentationLevel;
 		this.lastNumberOfNewLines = scribe.lastNumberOfNewLines;
 		this.needSpace = scribe.needSpace;
@@ -53,4 +54,15 @@ public class Location {
 		this.numberOfIndentations = scribe.numberOfIndentations;
 		this.textEdit = scribe.getLastEdit();
 	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("output (column="+this.outputColumn); //$NON-NLS-1$
+		buffer.append(", line="+this.outputLine); //$NON-NLS-1$
+		buffer.append(", indentation level="+this.outputIndentationLevel); //$NON-NLS-1$
+		buffer.append(") input (offset="+this.inputOffset); //$NON-NLS-1$
+		buffer.append(", column="+this.inputColumn); //$NON-NLS-1$
+		buffer.append(')');
+		return buffer.toString();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
index e6d268d..c4f04f8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
@@ -78,10 +78,15 @@ public class Scribe implements IJavaDocTagConstants {
 
 	private int[] lineEnds;
 	private int maxLines;
-	private String lineSeparator;
 	public Alignment memberAlignment;
 	public boolean needSpace = false;
 
+	// Line separator infos
+	final private String lineSeparator;
+	final private String lineSeparatorAndSpace;
+	final private char firstLS;
+	final private int lsLength;
+
 	public int nlsTagCounter;
 	public int pageWidth;
 	public boolean pendingSpace = false;
@@ -96,8 +101,13 @@ public class Scribe implements IJavaDocTagConstants {
 	public int numberOfIndentations;
 	private boolean useTabsOnlyForLeadingIndents;
 
-	/** indent empty lines*/
+	/** empty lines*/
 	private final boolean indentEmptyLines;
+	int blank_lines_between_import_groups = -1;
+
+	/** disabling */
+	boolean editsEnabled;
+	boolean useTags;
 
 	/* Comments formatting */
 	private static final int INCLUDE_BLOCK_COMMENTS = CodeFormatter.F_INCLUDE_COMMENTS | CodeFormatter.K_MULTI_LINE_COMMENT;
@@ -105,15 +115,48 @@ public class Scribe implements IJavaDocTagConstants {
 	private static final int INCLUDE_LINE_COMMENTS = CodeFormatter.F_INCLUDE_COMMENTS | CodeFormatter.K_SINGLE_LINE_COMMENT;
 	private static final int SKIP_FIRST_WHITESPACE_TOKEN = -2;
 	private static final int INVALID_TOKEN = 2000;
+	static final int NO_TRAILING_COMMENT = 0x0000;
+	static final int BASIC_TRAILING_COMMENT = 0x0100;
+	static final int COMPLEX_TRAILING_COMMENT = 0x0200;
+	static final int IMPORT_TRAILING_COMMENT = COMPLEX_TRAILING_COMMENT | 0x0001;
+	static final int UNMODIFIABLE_TRAILING_COMMENT = 0x0400;
 	private int formatComments = 0;
 	private int headerEndPosition = -1;
 	String commentIndentation; // indentation requested in comments (usually in javadoc root tags description)
 
+	// Class to store previous line comment information
+	static class LineComment {
+		boolean contiguous = false;
+		int currentIndentation, indentation;
+		int lines;
+		char[] leadingSpaces;
+	}
+	final LineComment lastLineComment = new LineComment();
+
 	// New way to format javadoc
 	private FormatterCommentParser formatterCommentParser; // specialized parser to format comments
 
+	// Disabling and enabling tags
+	OptimizedReplaceEdit previousDisabledEdit;
+	private char[] disablingTag, enablingTag;
+
+	// Well know strings
+	private String[] newEmptyLines = new String[10];
+	private static String[] COMMENT_INDENTATIONS = new String[20];
+
+	// final string buffers
+	private final StringBuffer tempBuffer= new StringBuffer();
+	private final StringBuffer blockCommentBuffer = new StringBuffer();
+	private final StringBuffer blockCommentTokensBuffer = new StringBuffer();
+	private final StringBuffer codeSnippetBuffer = new StringBuffer();
+	private final StringBuffer javadocBlockRefBuffer= new StringBuffer();
+	private final StringBuffer javadocGapLinesBuffer = new StringBuffer();
+	private StringBuffer[] javadocHtmlTagBuffers = new StringBuffer[5];
+	private final StringBuffer javadocTextBuffer = new StringBuffer();
+	private final StringBuffer javadocTokensBuffer = new StringBuffer();
+
 	Scribe(CodeFormatterVisitor formatter, long sourceLevel, IRegion[] regions, CodeSnippetParsingUtil codeSnippetParsingUtil, boolean includeComments) {
-		this.scanner = new Scanner(true, true, false/*nls*/, sourceLevel/*sourceLevel*/, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
+		initializeScanner(sourceLevel, formatter.preferences);
 		this.formatter = formatter;
 		this.pageWidth = formatter.preferences.page_width;
 		this.tabLength = formatter.preferences.tab_size;
@@ -128,6 +171,9 @@ public class Scribe implements IJavaDocTagConstants {
 			this.indentationSize = this.tabLength;
 		}
 		this.lineSeparator = formatter.preferences.line_separator;
+		this.lineSeparatorAndSpace = this.lineSeparator+' ';
+		this.firstLS = this.lineSeparator.charAt(0);
+		this.lsLength = this.lineSeparator.length();
 		this.indentationLevel = formatter.preferences.initial_indentation_level * this.indentationSize;
 		this.regions= regions;
 		if (codeSnippetParsingUtil != null) {
@@ -214,7 +260,7 @@ public class Scribe implements IJavaDocTagConstants {
 
 	/*
 	 * Adapt edits to regions.
-	 *
+	 * 
 	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=234583"
 	 * 	for more details
 	 */
@@ -259,7 +305,7 @@ public class Scribe implements IJavaDocTagConstants {
      * Search whether a region overlap edit(s) at its start and/or at its end.
      * If so, modify the concerned edits to keep only the modifications which are
      * inside the given region.
-     *
+     * 
      * The edit modification is done as follow:
      * 1) start it from the region start if it overlaps the region's start
      * 2) end it at the region end if it overlaps the region's end
@@ -399,11 +445,7 @@ public class Scribe implements IJavaDocTagConstants {
 							if (linesCount == 0) {
 				    			edit.replacement = ""; //$NON-NLS-1$
 							} else {
-								StringBuffer buffer = new StringBuffer();
-								for (int j=0; j<linesCount; j++) {
-									buffer.append(this.lineSeparator);
-								}
-								edit.replacement = buffer.toString();
+								edit.replacement = getNewLineString(linesCount);
 							}
 						}
 					}
@@ -432,6 +474,18 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	private final void addOptimizedReplaceEdit(int offset, int length, String replacement) {
+		if (!this.editsEnabled) {
+			if (this.previousDisabledEdit != null && this.previousDisabledEdit.offset == offset) {
+				replacement = this.previousDisabledEdit.replacement;
+			}
+			this.previousDisabledEdit = null;
+			if (replacement.indexOf(this.lineSeparator) >= 0) {
+				if (length == 0 || printNewLinesCharacters(offset, length)) {
+					this.previousDisabledEdit = new OptimizedReplaceEdit(offset, length, replacement);
+				}
+			}
+			return;
+		}
 		if (this.editsIndex > 0) {
 			// try to merge last two edits
 			final OptimizedReplaceEdit previous = this.edits[this.editsIndex-1];
@@ -555,24 +609,24 @@ public class Scribe implements IJavaDocTagConstants {
 	    return INVALID_TOKEN;
     }
 
-	public Alignment createAlignment(String name, int mode, int count, int sourceRestart){
-		return createAlignment(name, mode, Alignment.R_INNERMOST, count, sourceRestart);
+	public Alignment createAlignment(int kind, int mode, int count, int sourceRestart){
+		return createAlignment(kind, mode, Alignment.R_INNERMOST, count, sourceRestart);
 	}
 
-	public Alignment createAlignment(String name, int mode, int count, int sourceRestart, boolean adjust){
-		return createAlignment(name, mode, Alignment.R_INNERMOST, count, sourceRestart, adjust);
+	public Alignment createAlignment(int kind, int mode, int count, int sourceRestart, boolean adjust){
+		return createAlignment(kind, mode, Alignment.R_INNERMOST, count, sourceRestart, adjust);
 	}
 
-	public Alignment createAlignment(String name, int mode, int tieBreakRule, int count, int sourceRestart){
-		return createAlignment(name, mode, tieBreakRule, count, sourceRestart, this.formatter.preferences.continuation_indentation, false);
+	public Alignment createAlignment(int kind, int mode, int tieBreakRule, int count, int sourceRestart){
+		return createAlignment(kind, mode, tieBreakRule, count, sourceRestart, this.formatter.preferences.continuation_indentation, false);
 	}
 
-	public Alignment createAlignment(String name, int mode, int count, int sourceRestart, int continuationIndent, boolean adjust){
-		return createAlignment(name, mode, Alignment.R_INNERMOST, count, sourceRestart, continuationIndent, adjust);
+	public Alignment createAlignment(int kind, int mode, int count, int sourceRestart, int continuationIndent, boolean adjust){
+		return createAlignment(kind, mode, Alignment.R_INNERMOST, count, sourceRestart, continuationIndent, adjust);
 	}
 
-	public Alignment createAlignment(String name, int mode, int tieBreakRule, int count, int sourceRestart, int continuationIndent, boolean adjust){
-		Alignment alignment = new Alignment(name, mode, tieBreakRule, this, count, sourceRestart, continuationIndent);
+	public Alignment createAlignment(int kind, int mode, int tieBreakRule, int count, int sourceRestart, int continuationIndent, boolean adjust){
+		Alignment alignment = new Alignment(kind, mode, tieBreakRule, this, count, sourceRestart, continuationIndent);
 		// adjust break indentation
 		if (adjust && this.memberAlignment != null) {
 			Alignment current = this.memberAlignment;
@@ -634,8 +688,8 @@ public class Scribe implements IJavaDocTagConstants {
 		return alignment;
 	}
 
-	public Alignment createMemberAlignment(String name, int mode, int count, int sourceRestart) {
-		Alignment mAlignment = createAlignment(name, mode, Alignment.R_INNERMOST, count, sourceRestart);
+	public Alignment createMemberAlignment(int kind, int mode, int count, int sourceRestart) {
+		Alignment mAlignment = createAlignment(kind, mode, Alignment.R_INNERMOST, count, sourceRestart);
 		mAlignment.breakIndentationLevel = this.indentationLevel;
 		return mAlignment;
 	}
@@ -684,13 +738,6 @@ public class Scribe implements IJavaDocTagConstants {
 		this.memberAlignment = current.enclosing;
 	}
 
-	public Alignment getAlignment(String name){
-		if (this.currentAlignment != null) {
-			return this.currentAlignment.getAlignment(name);
-		}
-		return null;
-	}
-
 	/**
 	 * Answer actual indentation level based on true column position
 	 * @return int
@@ -783,10 +830,10 @@ public class Scribe implements IJavaDocTagConstants {
 		return null;
 	}
 
-	private int getCurrentCommentOffset(int start) {
+	private int getCurrentCommentIndentation(int start) {
 		int linePtr = -Arrays.binarySearch(this.lineEnds, start);
-		int offset = 0;
-		int beginningOfLine = getLineEnd(linePtr - 1);
+		int indentation = 0;
+		int beginningOfLine = getLineEnd(linePtr - 1)+1;
 		if (beginningOfLine == -1) {
 			beginningOfLine = 0;
 		}
@@ -796,27 +843,63 @@ public class Scribe implements IJavaDocTagConstants {
 		// find the position of the beginning of the line containing the comment
 		while (beginningOfLine > currentStartPosition) {
 			if (linePtr > 0) {
-				beginningOfLine = getLineEnd(--linePtr);
+				beginningOfLine = getLineEnd(--linePtr)+1;
 			} else {
 				beginningOfLine = 0;
 				break;
 			}
 		}
-		for (int i = currentStartPosition - 1; i >= beginningOfLine ; i--) {
+		for (int i=beginningOfLine; i < currentStartPosition ; i++) {
 			char currentCharacter = source[i];
 			switch (currentCharacter) {
 				case '\t' :
-					offset += this.tabLength;
+					if (this.tabLength != 0) {
+						int reminder = indentation % this.tabLength;
+						if (reminder == 0) {
+							indentation += this.tabLength;
+						} else {
+							indentation = ((indentation / this.tabLength) + 1) * this.tabLength;
+						}
+					}
+					break;
+				case '\r' :
+				case '\n' :
+					indentation = 0;
+					break;
+				default:
+					indentation++;
+					break;
+			}
+		}
+		return indentation;
+	}
+
+	int getCurrentIndentation(char[] whitespaces, int offset) {
+		if (whitespaces == null) return offset;
+		int length = whitespaces.length;
+		if (this.tabLength == 0) return length;
+		int indentation = offset;
+		for (int i=0; i<length; i++) {
+			char ch = whitespaces[i];
+			switch (ch) {
+				case '\t' :
+					int reminder = indentation % this.tabLength;
+					if (reminder == 0) {
+						indentation += this.tabLength;
+					} else {
+						indentation = ((indentation / this.tabLength) + 1) * this.tabLength;
+					}
 					break;
 				case '\r' :
 				case '\n' :
+					indentation = 0;
 					break;
 				default:
-					offset++;
+					indentation++;
 					break;
 			}
 		}
-		return offset;
+		return indentation;
 	}
 
 	int getCurrentIndentation(int start) {
@@ -824,7 +907,7 @@ public class Scribe implements IJavaDocTagConstants {
 		if (linePtr < 0) {
 			linePtr = -linePtr - 1;
 		}
-		int offset = 0;
+		int indentation = 0;
 		int beginningOfLine = getLineEnd(linePtr)+1;
 		if (beginningOfLine == -1) {
 			beginningOfLine = 0;
@@ -835,31 +918,45 @@ public class Scribe implements IJavaDocTagConstants {
 			char currentCharacter = source[i];
 			switch (currentCharacter) {
 				case '\t' :
-					offset += this.tabLength;
+					if (this.tabLength != 0) {
+						int reminder = indentation % this.tabLength;
+						if (reminder == 0) {
+							indentation += this.tabLength;
+						} else {
+							indentation = ((indentation / this.tabLength) + 1) * this.tabLength;
+						}
+					}
 					break;
 				case '\r' :
 				case '\n' :
+					indentation = 0;
 					break;
 				case ' ':
-					offset++;
+					indentation++;
 					break;
 				default:
-					return offset;
+					return indentation;
 			}
 		}
-		return offset;
+		return indentation;
 	}
 
 	public String getEmptyLines(int linesNumber) {
 		if (this.nlsTagCounter > 0) {
 			return Util.EMPTY_STRING;
 		}
-		StringBuffer buffer = new StringBuffer();
+		String emptyLines;
 		if (this.lastNumberOfNewLines == 0) {
 			linesNumber++; // add an extra line breaks
-			for (int i = 0; i < linesNumber; i++) {
-				if (this.indentEmptyLines) printIndentationIfNecessary(buffer);
-				buffer.append(this.lineSeparator);
+			if (this.indentEmptyLines) {
+				this.tempBuffer.setLength(0);
+				for (int i = 0; i < linesNumber; i++) {
+					printIndentationIfNecessary(this.tempBuffer);
+					this.tempBuffer.append(this.lineSeparator);
+				}
+				emptyLines = this.tempBuffer.toString();
+			} else {
+				emptyLines = getNewLineString(linesNumber);
 			}
 			this.lastNumberOfNewLines += linesNumber;
 			this.line += linesNumber;
@@ -867,9 +964,15 @@ public class Scribe implements IJavaDocTagConstants {
 			this.needSpace = false;
 			this.pendingSpace = false;
 		} else if (this.lastNumberOfNewLines == 1) {
-			for (int i = 0; i < linesNumber; i++) {
-				if (this.indentEmptyLines) printIndentationIfNecessary(buffer);
-				buffer.append(this.lineSeparator);
+			if (this.indentEmptyLines) {
+				this.tempBuffer.setLength(0);
+				for (int i = 0; i < linesNumber; i++) {
+					printIndentationIfNecessary(this.tempBuffer);
+					this.tempBuffer.append(this.lineSeparator);
+				}
+				emptyLines = this.tempBuffer.toString();
+			} else {
+				emptyLines = getNewLineString(linesNumber);
 			}
 			this.lastNumberOfNewLines += linesNumber;
 			this.line += linesNumber;
@@ -882,9 +985,15 @@ public class Scribe implements IJavaDocTagConstants {
 				return Util.EMPTY_STRING;
 			}
 			final int realNewLineNumber = linesNumber - this.lastNumberOfNewLines + 1;
-			for (int i = 0; i < realNewLineNumber; i++) {
-				if (this.indentEmptyLines) printIndentationIfNecessary(buffer);
-				buffer.append(this.lineSeparator);
+			if (this.indentEmptyLines) {
+				this.tempBuffer.setLength(0);
+				for (int i = 0; i < realNewLineNumber; i++) {
+					printIndentationIfNecessary(this.tempBuffer);
+					this.tempBuffer.append(this.lineSeparator);
+				}
+				emptyLines = this.tempBuffer.toString();
+			} else {
+				emptyLines = getNewLineString(realNewLineNumber);
 			}
 			this.lastNumberOfNewLines += realNewLineNumber;
 			this.line += realNewLineNumber;
@@ -892,7 +1001,7 @@ public class Scribe implements IJavaDocTagConstants {
 			this.needSpace = false;
 			this.pendingSpace = false;
 		}
-		return String.valueOf(buffer);
+		return emptyLines;
 	}
 
 	private int getIndexOfAdaptedRegionAt(int offset) {
@@ -950,6 +1059,23 @@ public class Scribe implements IJavaDocTagConstants {
 		return this.lineSeparator;
 	}
 
+	private String getNewLineString(int linesCount) {
+		int length = this.newEmptyLines.length;
+		if (linesCount > length) {
+			System.arraycopy(this.newEmptyLines, 0, this.newEmptyLines = new String[linesCount+10], 0, length);
+		}
+		String newLineString = this.newEmptyLines[linesCount-1];
+		if (newLineString == null) {
+			this.tempBuffer.setLength(0);
+			for (int j=0; j<linesCount; j++) {
+				this.tempBuffer.append(this.lineSeparator);
+			}
+			newLineString = this.tempBuffer.toString();
+			this.newEmptyLines[linesCount-1] = newLineString;
+		}
+		return newLineString;
+	}
+
 	/**
 	 * Answer next indentation level based on column estimated position
 	 * (if column is not indented, then use indentationLevel)
@@ -959,7 +1085,10 @@ public class Scribe implements IJavaDocTagConstants {
 		if (indent == 0)
 			return this.indentationLevel;
 		if (this.tabChar == DefaultCodeFormatterOptions.TAB) {
-			if (this.indentationSize == 0 || this.useTabsOnlyForLeadingIndents) {
+			if (this.useTabsOnlyForLeadingIndents) {
+				return indent;
+			}
+			if (this.indentationSize == 0) {
 				return indent;
 			}
 			int rem = indent % this.indentationSize;
@@ -982,7 +1111,7 @@ public class Scribe implements IJavaDocTagConstants {
 				// or when there's no direct member alignment
 				// (additional fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=286601)
 				if (this.lastNumberOfNewLines == 0 || this.memberAlignment == null || this.memberAlignment.location.inputOffset < this.currentAlignment.location.inputOffset) {
-
+					
 					// Debug
 					if (DefaultCodeFormatter.DEBUG) {
 						System.out.println("Preserve empty lines:"); //$NON-NLS-1$
@@ -999,16 +1128,17 @@ public class Scribe implements IJavaDocTagConstants {
 					this.indentationLevel = this.currentAlignment.location.outputIndentationLevel;
 
 					// Create new line
-					StringBuffer buffer = new StringBuffer(getNewLine());
-
+					this.tempBuffer.setLength(0);
+					this.tempBuffer.append(getNewLine());
+					
 					// Look for current indentation
-					int currentColumn = getCurrentIndentation(this.scanner.currentPosition);
-
+					int currentIndentation = getCurrentIndentation(this.scanner.currentPosition);
+					
 					// Determine whether the alignment indentation can be used or not
 					// So far, the best algorithm is to use it when
 					// 1. this is not the opening brace of a local declaration assignment
 					// 2. this is not the first opening brace
-					//     or this is an array initializer alignment
+					//     or this is an array initializer alignment 
 					//     or this is an binary expression alignment
 					// 3. the indentation level is below the alignment break indentation
 					int currentTokenStartPosition = this.scanner.currentPosition;
@@ -1019,24 +1149,24 @@ public class Scribe implements IJavaDocTagConstants {
 						// skip
 					}
 					this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-					boolean canUseAlignmentIndentation = (nextToken != TerminalTokens.TokenNameLBRACE || !this.currentAlignment.name.equals("localDeclarationAssignmentAlignment")); //$NON-NLS-1$
+					boolean canUseAlignmentIndentation = (nextToken != TerminalTokens.TokenNameLBRACE || this.currentAlignment.kind != Alignment.LOCAL_DECLARATION_ASSIGNMENT);
 					if (canUseAlignmentIndentation &&
 							(!this.formatBrace ||
-									this.currentAlignment.name.equals("array_initializer") || //$NON-NLS-1$
-									this.currentAlignment.name.equals("binaryExpressionAlignment")) && //$NON-NLS-1$
+									this.currentAlignment.kind == Alignment.ARRAY_INITIALIZER ||
+									this.currentAlignment.kind == Alignment.BINARY_EXPRESSION) &&
 							this.indentationLevel < this.currentAlignment.breakIndentationLevel) {
 						this.indentationLevel = this.currentAlignment.breakIndentationLevel;
 					}
-
+					
 					// Use the current indentation if over the computed indentation
-					if (this.indentationLevel < currentColumn) {
-						this.indentationLevel = currentColumn;
+					if (this.indentationLevel < currentIndentation) {
+						this.indentationLevel = currentIndentation;
 					}
-
+					
 					// Debug
 					if (DefaultCodeFormatter.DEBUG) {
 						System.out.println(" - format brace = "+this.formatBrace); //$NON-NLS-1$
-						System.out.println(" - current column = "+currentColumn); //$NON-NLS-1$
+						System.out.println(" - current column = "+(currentIndentation+1)); //$NON-NLS-1$
 						System.out.println(" - current position = "+this.scanner.currentPosition); //$NON-NLS-1$
 						System.out.print(" - current line = "); //$NON-NLS-1$
 						int linePtr = Arrays.binarySearch(this.lineEnds, this.scanner.currentPosition);
@@ -1051,17 +1181,20 @@ public class Scribe implements IJavaDocTagConstants {
 						System.out.println(" - indentation level = "+this.indentationLevel); //$NON-NLS-1$
 						System.out.println();
 					}
-
+					
 					// Set the flag to indicate that a specific indentation is currently in used
 					this.preserveLineBreakIndentation = true;
-
+					
 					// Print the computed indentation in the buffer
-					printIndentationIfNecessary(buffer);
-					return buffer.toString();
+					printIndentationIfNecessary(this.tempBuffer);
+					return this.tempBuffer.toString();
 				}
 			}
 			return Util.EMPTY_STRING;
 		}
+		if (this.blank_lines_between_import_groups >= 0) {
+			return getEmptyLines(this.blank_lines_between_import_groups);
+		}
 		if (this.formatter.preferences.number_of_empty_lines_to_preserve != 0) {
 			int linesToPreserve = Math.min(count, this.formatter.preferences.number_of_empty_lines_to_preserve);
 			return getEmptyLines(linesToPreserve);
@@ -1126,6 +1259,10 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	public void handleLineTooLong() {
+		if (this.formatter.preferences.wrap_outer_expressions_when_nested) {
+			handleLineTooLongSmartly();
+			return;
+		}
 		// search for closest breakable alignment, using tiebreak rules
 		// look for outermost breakable one
 		int relativeDepth = 0, outerMostDepth = -1;
@@ -1153,6 +1290,79 @@ public class Scribe implements IJavaDocTagConstants {
 		// did not find any breakable location - proceed
 	}
 
+	private void handleLineTooLongSmartly() {
+		// search for closest breakable alignment, using tiebreak rules
+		// look for outermost breakable one
+		int relativeDepth = 0, outerMostDepth = -1;
+		Alignment targetAlignment = this.currentAlignment;
+		int previousKind = -1;
+		int insideMessage = 0;
+		boolean insideStringConcat = false;
+		while (targetAlignment != null){
+			boolean couldBreak = targetAlignment.tieBreakRule == Alignment.R_OUTERMOST ||
+				(!insideStringConcat &&
+						insideMessage > 0 && targetAlignment.kind == Alignment.MESSAGE_ARGUMENTS &&
+						(!targetAlignment.wasReset() || previousKind != Alignment.MESSAGE_SEND));
+			if (couldBreak && targetAlignment.couldBreak()){
+				outerMostDepth = relativeDepth;
+			}
+			switch (targetAlignment.kind) {
+				case Alignment.MESSAGE_ARGUMENTS:
+				case Alignment.MESSAGE_SEND:
+					insideMessage++;
+					break;
+				case Alignment.STRING_CONCATENATION:
+					insideStringConcat = true;
+					break;
+			}
+			previousKind = targetAlignment.kind;
+			targetAlignment = targetAlignment.enclosing;
+			relativeDepth++;
+		}
+		if (outerMostDepth >= 0) {
+			throw new AlignmentException(AlignmentException.LINE_TOO_LONG, outerMostDepth);
+		}
+		// look for innermost breakable one
+		relativeDepth = 0;
+		targetAlignment = this.currentAlignment;
+		AlignmentException alignmentException = null;
+		int msgArgsDepth = -1;
+		while (targetAlignment != null) {
+			if (targetAlignment.kind == Alignment.MESSAGE_ARGUMENTS) {
+				msgArgsDepth = relativeDepth;
+			}
+			if (alignmentException == null) {
+				if (targetAlignment.couldBreak()) {
+					// do not throw the exception immediately to have a chance to reset
+					// previously broken alignments (see bug 203588)
+					alignmentException = new AlignmentException(AlignmentException.LINE_TOO_LONG, relativeDepth);
+					if (insideStringConcat) throw alignmentException;
+				}
+			} else if (targetAlignment.wasSplit) {
+				// reset the nearest already broken outermost alignment.
+				// Note that it's not done twice to avoid infinite loop while raising
+				// the exception on an innermost alignment...
+				if (!targetAlignment.wasReset()) {
+					targetAlignment.reset();
+					if (msgArgsDepth > alignmentException.relativeDepth) {
+						alignmentException.relativeDepth = msgArgsDepth;
+					}
+					throw alignmentException;
+				}
+			}
+			targetAlignment = targetAlignment.enclosing;
+			relativeDepth++;
+		}
+		if (alignmentException != null) {
+			throw alignmentException;
+		}
+		// did not find any breakable location - proceed
+		if (this.currentAlignment != null) {
+			this.currentAlignment.blockAlign = false;
+			this.currentAlignment.tooLong = true;
+		}
+	}
+
 	/*
 	 * Check if there is a NLS tag on this line. If yes, return true, returns false otherwise.
 	 */
@@ -1205,18 +1415,24 @@ public class Scribe implements IJavaDocTagConstants {
 		this.numberOfIndentations++;
 	}
 
-	/**
-	 * @param compilationUnitSource
-	 */
-	public void initializeScanner(char[] compilationUnitSource) {
-		this.scanner.setSource(compilationUnitSource);
-		this.scannerEndPosition = compilationUnitSource.length;
-		this.scanner.resetTo(0, this.scannerEndPosition - 1);
-		this.edits = new OptimizedReplaceEdit[INITIAL_SIZE];
-		this.maxLines = this.lineEnds == null ? -1 : this.lineEnds.length - 1;
-		this.scanner.lineEnds = this.lineEnds;
-		this.scanner.linePtr = this.maxLines;
-		initFormatterCommentParser();
+	private void initializeScanner(long sourceLevel, DefaultCodeFormatterOptions preferences) {
+		this.useTags = preferences.use_tags;
+		char[][] taskTags = null;
+		if (this.useTags) {
+			this.disablingTag = preferences.disabling_tag;
+			this.enablingTag = preferences.enabling_tag;
+			if (this.disablingTag == null) {
+				if (this.enablingTag != null) {
+					taskTags = new char[][] { this.enablingTag };
+				}
+			} else if (this.enablingTag == null) {
+				taskTags = new char[][] { this.disablingTag };
+			} else {
+				taskTags = new char[][] { this.disablingTag, this.enablingTag };
+			}
+		}
+		this.scanner = new Scanner(true, true, false/*nls*/, sourceLevel/*sourceLevel*/, taskTags, null/*taskPriorities*/, true/*taskCaseSensitive*/);
+		this.editsEnabled = true;
 	}
 
 	private void initFormatterCommentParser() {
@@ -1307,9 +1523,11 @@ public class Scribe implements IJavaDocTagConstants {
 
 	private void preserveEmptyLines(int count, int insertPosition) {
 		if (count > 0) {
-			if (this.formatter.preferences.number_of_empty_lines_to_preserve != 0) {
+			if (this.blank_lines_between_import_groups >= 0) {
+				printEmptyLines(this.blank_lines_between_import_groups, insertPosition);
+			} else if (this.formatter.preferences.number_of_empty_lines_to_preserve != 0) {
 				int linesToPreserve = Math.min(count, this.formatter.preferences.number_of_empty_lines_to_preserve);
-				this.printEmptyLines(linesToPreserve, insertPosition);
+				printEmptyLines(linesToPreserve, insertPosition);
 			} else {
 				printNewLine(insertPosition);
 			}
@@ -1375,7 +1593,7 @@ public class Scribe implements IJavaDocTagConstants {
 		if ((commentColumn-1) > this.indentationLevel) {
 			this.indentationLevel = commentColumn-1;
 		}
-		int currentCommentOffset = onFirstColumn ? 0 : getCurrentCommentOffset(start);
+		int currentCommentIndentation = onFirstColumn ? 0 : getCurrentCommentIndentation(start);
 		boolean formatComment = (isJavadoc && (this.formatComments & CodeFormatter.K_JAVA_DOC) != 0) || (!isJavadoc && (this.formatComments & CodeFormatter.K_MULTI_LINE_COMMENT) != 0);
 
 		try {
@@ -1402,13 +1620,8 @@ public class Scribe implements IJavaDocTagConstants {
 							this.line++;
 							isNewLine = false;
 
-							StringBuffer buffer = new StringBuffer();
+							boolean addSpace = false;
 							if (onFirstColumn) {
-								// simply insert indentation if necessary
-								buffer.append(this.lineSeparator);
-								if (indentComment) {
-									printIndentationIfNecessary(buffer);
-								}
 								if (formatComment) {
 									if (ScannerHelper.isWhitespace((char) currentCharacter)) {
 										int previousStartPosition = this.scanner.currentPosition;
@@ -1423,25 +1636,32 @@ public class Scribe implements IJavaDocTagConstants {
 										}
 									}
 									if (currentCharacter != '\r' && currentCharacter != '\n') {
-										buffer.append(' ');
+										addSpace = true;
 									}
 								}
 							} else {
 								if (ScannerHelper.isWhitespace((char) currentCharacter)) {
 									int previousStartPosition = this.scanner.currentPosition;
-									int count = 0;
+									int currentIndentation = 0;
 									loop: while(currentCharacter != -1 && currentCharacter != '\r' && currentCharacter != '\n' && ScannerHelper.isWhitespace((char) currentCharacter)) {
-										if (count >= currentCommentOffset) {
+										if (currentIndentation >= currentCommentIndentation) {
 											break loop;
 										}
 										previousStart = nextCharacterStart;
 										previousStartPosition = this.scanner.currentPosition;
 										switch(currentCharacter) {
 											case '\t' :
-												count += this.tabLength;
+												if (this.tabLength != 0) {
+													int reminder = currentIndentation % this.tabLength;
+													if (reminder == 0) {
+														currentIndentation += this.tabLength;
+													} else {
+														currentIndentation = ((currentIndentation / this.tabLength) + 1) * this.tabLength;
+													}
+												}
 												break;
 											default :
-												count ++;
+												currentIndentation ++;
 										}
 										currentCharacter = this.scanner.getNextChar();
 										nextCharacterStart = this.scanner.currentPosition;
@@ -1450,10 +1670,6 @@ public class Scribe implements IJavaDocTagConstants {
 										nextCharacterStart = previousStartPosition;
 									}
 								}
-								buffer.append(this.lineSeparator);
-								if (indentComment) {
-									printIndentationIfNecessary(buffer);
-								}
 								if (formatComment) {
 									int previousStartTemp = previousStart;
 									int nextCharacterStartTemp = nextCharacterStart;
@@ -1463,7 +1679,7 @@ public class Scribe implements IJavaDocTagConstants {
 										nextCharacterStart = this.scanner.currentPosition;
 									}
 									if (currentCharacter == '*') {
-										buffer.append(' ');
+										addSpace = true;
 									} else {
 										previousStart = previousStartTemp;
 										nextCharacterStart = nextCharacterStartTemp;
@@ -1471,7 +1687,21 @@ public class Scribe implements IJavaDocTagConstants {
 									this.scanner.currentPosition = nextCharacterStart;
 								}
 							}
-							addReplaceEdit(start, previousStart - 1, String.valueOf(buffer));
+							String replacement;
+							if (indentComment) {
+								this.tempBuffer.setLength(0);
+								this.tempBuffer.append(this.lineSeparator);
+								if (this.indentationLevel > 0) {
+									printIndentationIfNecessary(this.tempBuffer);
+								}
+								if (addSpace) {
+									this.tempBuffer.append(' ');
+								}
+								replacement = this.tempBuffer.toString();
+							} else {
+								replacement = addSpace ? this.lineSeparatorAndSpace : this.lineSeparator;
+							}
+							addReplaceEdit(start, previousStart - 1, replacement);
 						} else {
 							this.column += (nextCharacterStart - previousStart);
 						}
@@ -1533,12 +1763,12 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 
 		// Consume the comment prefix
-		StringBuffer buffer = new StringBuffer();
+		this.blockCommentBuffer.setLength(0);
 		this.scanner.getNextChar();
 		this.scanner.getNextChar();
 		this.column += 2;
 		this.scanner.skipComments = true;
-		StringBuffer tokensBuffer = new StringBuffer();
+		this.blockCommentTokensBuffer.setLength(0);
 		int editStart = this.scanner.currentPosition;
 		int editEnd = -1;
 
@@ -1549,11 +1779,13 @@ public class Scribe implements IJavaDocTagConstants {
 		boolean hasMultiLines = false;
 		boolean hasTokens = false;
 		boolean bufferHasTokens = false;
+		boolean bufferHasNewLine = false;
 		boolean lineHasTokens = false;
 		int hasTextOnFirstLine = 0;
 		boolean firstWord = true;
 		boolean clearBlankLines = this.formatter.preferences.comment_clear_blank_lines_in_block_comment;
 		boolean joinLines = this.formatter.preferences.join_lines_in_comments;
+		boolean newLinesAtBoundaries = this.formatter.preferences.comment_new_lines_at_block_boundaries;
 		int scannerLine = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, 0, this.maxLines);
 		int firstLine = scannerLine;
 		int lineNumber = scannerLine;
@@ -1574,15 +1806,16 @@ public class Scribe implements IJavaDocTagConstants {
     		boolean isTokenStar = false;
 			switch (token) {
 				case TerminalTokens.TokenNameWHITESPACE:
-					if (tokensBuffer.length() > 0) {
+					if (this.blockCommentTokensBuffer.length() > 0) {
 						if (hasTextOnFirstLine == 1 && multiLines) {
-							printBlockCommentHeaderLine(buffer);
+							printBlockCommentHeaderLine(this.blockCommentBuffer);
 							hasTextOnFirstLine = -1;
 						}
-						buffer.append(tokensBuffer);
-						this.column += tokensBuffer.length();
-						tokensBuffer.setLength(0);
+						this.blockCommentBuffer.append(this.blockCommentTokensBuffer);
+						this.column += this.blockCommentTokensBuffer.length();
+						this.blockCommentTokensBuffer.setLength(0);
 						bufferHasTokens = true;
+						bufferHasNewLine = false;
 					}
 					if (previousToken == -1) {
 						// do not remember the first whitespace
@@ -1601,23 +1834,25 @@ public class Scribe implements IJavaDocTagConstants {
 					isTokenStar = true;
 					lineNumber = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, scannerLine>1 ? scannerLine-2 : 0, this.maxLines);
 					if (lineNumber == firstLine && previousToken == SKIP_FIRST_WHITESPACE_TOKEN) {
-						editStart = this.scanner.getCurrentTokenStartPosition();
+						this.blockCommentBuffer.append(' ');
 					}
 					previousToken = token;
 					if (this.scanner.currentCharacter == '/') {
 						editEnd = this.scanner.startPosition - 1;
 						// Add remaining buffered tokens
-						if (tokensBuffer.length() > 0) {
-							buffer.append(tokensBuffer);
-							this.column += tokensBuffer.length();
+						if (this.blockCommentTokensBuffer.length() > 0) {
+							this.blockCommentBuffer.append(this.blockCommentTokensBuffer);
+							this.column += this.blockCommentTokensBuffer.length();
 						}
 						// end of comment
-						if (multiLines || hasMultiLines) {
-					    	buffer.append(this.lineSeparator);
-					    	this.column = 1;
-					    	printIndentationIfNecessary(buffer);
+						if (newLinesAtBoundaries) {
+							if (multiLines || hasMultiLines) {
+						    	this.blockCommentBuffer.append(this.lineSeparator);
+						    	this.column = 1;
+						    	printIndentationIfNecessary(this.blockCommentBuffer);
+							}
 						}
-						buffer.append(' ');
+						this.blockCommentBuffer.append(' ');
 						this.column += BLOCK_FOOTER_LENGTH + 1;
 				    	this.scanner.getNextChar(); // reach the end of scanner
 				    	continue;
@@ -1661,7 +1896,7 @@ public class Scribe implements IJavaDocTagConstants {
 			int max;
 			lineNumber = Util.getLineNumber(this.scanner.currentPosition, this.lineEnds, scannerLine>1 ? scannerLine-2 : 0, this.maxLines);
 			if (lastTextLine == -1) {
-				linesGap = lineNumber - firstLine;
+				linesGap = newLinesAtBoundaries ? lineNumber - firstLine : 0;
 				max = 0;
 			} else {
 				linesGap = lineNumber - lastTextLine;
@@ -1682,22 +1917,23 @@ public class Scribe implements IJavaDocTagConstants {
 				}
 				for (int i=0; i<linesGap; i++) {
 					// Add remaining buffered tokens
-					if (tokensBuffer.length() > 0) {
+					if (this.blockCommentTokensBuffer.length() > 0) {
 						if (hasTextOnFirstLine == 1) {
-							printBlockCommentHeaderLine(buffer);
+							printBlockCommentHeaderLine(this.blockCommentBuffer);
 							hasTextOnFirstLine = -1;
 						}
-						buffer.append(tokensBuffer);
-						tokensBuffer.setLength(0);
+						this.blockCommentBuffer.append(this.blockCommentTokensBuffer);
+						this.blockCommentTokensBuffer.setLength(0);
 						bufferHasTokens = true;
 					}
-			    	buffer.append(this.lineSeparator);
+			    	this.blockCommentBuffer.append(this.lineSeparator);
 			    	this.column = 1;
-			    	printIndentationIfNecessary(buffer);
-		    		buffer.append(BLOCK_LINE_PREFIX);
+			    	printIndentationIfNecessary(this.blockCommentBuffer);
+		    		this.blockCommentBuffer.append(BLOCK_LINE_PREFIX);
 		    		this.column += BLOCK_LINE_PREFIX_LENGTH;
 		    		firstWord = true;
 					multiLines = true;
+					bufferHasNewLine = true;
 				}
 				insertSpace = insertSpace && linesGap == 0;
 			}
@@ -1716,46 +1952,50 @@ public class Scribe implements IJavaDocTagConstants {
 	    			hasTextOnFirstLine = -1;
 	    		}
     		}
-    		int lastColumn = this.column + tokensBuffer.length() + tokenLength;
+    		int lastColumn = this.column + this.blockCommentTokensBuffer.length() + tokenLength;
     		if (insertSpace) lastColumn++;
 
     		// Append next token inserting a new line if max line is reached
 			if (lineHasTokens && !firstWord && lastColumn > maxColumn) {
-		    	String tokensString = tokensBuffer.toString().trim();
+		    	String tokensString = this.blockCommentTokensBuffer.toString().trim();
+		    	int tokensStringLength = tokensString.length();
 				// not enough space on the line
 				if (hasTextOnFirstLine == 1) {
-					printBlockCommentHeaderLine(buffer);
+					printBlockCommentHeaderLine(this.blockCommentBuffer);
 				}
-				if ((this.indentationLevel+tokensString.length()+tokenLength) > maxColumn) {
+				if ((this.indentationLevel+tokensStringLength+tokenLength) > maxColumn) {
 					// there won't be enough room even if we break the line before the buffered tokens
 					// So add the buffered tokens now
-					buffer.append(tokensString);
-					this.column += tokensString.length();
-					tokensBuffer.setLength(0);
+					this.blockCommentBuffer.append(this.blockCommentTokensBuffer);
+					this.column += this.blockCommentTokensBuffer.length();
+					this.blockCommentTokensBuffer.setLength(0);
+					bufferHasNewLine = false;
+					bufferHasTokens = true;
 				}
-				if (bufferHasTokens) {
-			    	buffer.append(this.lineSeparator);
+				if (bufferHasTokens && !bufferHasNewLine) {
+			    	this.blockCommentBuffer.append(this.lineSeparator);
 			    	this.column = 1;
-			    	printIndentationIfNecessary(buffer);
-		    		buffer.append(BLOCK_LINE_PREFIX);
+			    	printIndentationIfNecessary(this.blockCommentBuffer);
+		    		this.blockCommentBuffer.append(BLOCK_LINE_PREFIX);
 			    	this.column += BLOCK_LINE_PREFIX_LENGTH;
 				}
-		    	if (tokensBuffer.length() > 0) {
-					buffer.append(tokensString);
-					this.column += tokensString.length();
-					tokensBuffer.setLength(0);
+		    	if (this.blockCommentTokensBuffer.length() > 0) {
+					this.blockCommentBuffer.append(tokensString);
+					this.column += tokensStringLength;
+					this.blockCommentTokensBuffer.setLength(0);
 		    	}
-				buffer.append(this.scanner.source, tokenStart, tokenLength);
+				this.blockCommentBuffer.append(this.scanner.source, tokenStart, tokenLength);
 				bufferHasTokens = true;
+				bufferHasNewLine = false;
 				this.column += tokenLength;
 				multiLines = true;
 				hasTextOnFirstLine = -1;
 			} else {
 				// append token to the line
 				if (insertSpace)  {
-					tokensBuffer.append(' ');
+					this.blockCommentTokensBuffer.append(' ');
 				}
-				tokensBuffer.append(this.scanner.source, tokenStart, tokenLength);
+				this.blockCommentTokensBuffer.append(this.scanner.source, tokenStart, tokenLength);
 			}
 			previousToken = token;
 			newLine = false;
@@ -1765,22 +2005,28 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 
 		// Replace block comment text
-		if (hasTokens || multiLines) {
-			StringBuffer replacement = new StringBuffer();
-			if (hasTextOnFirstLine == 1) {
-				if ((hasMultiLines || multiLines)) {
-					int col = this.column;
-					replacement.append(this.lineSeparator);
-					this.column = 1;
-					printIndentationIfNecessary(replacement);
-					replacement.append(BLOCK_LINE_PREFIX);
-			    	this.column = col;
+		if (this.nlsTagCounter == 0 || !multiLines) {
+			if (hasTokens || multiLines) {
+				StringBuffer replacement;
+				if (hasTextOnFirstLine == 1) {
+					this.blockCommentTokensBuffer.setLength(0);
+					replacement = this.blockCommentTokensBuffer;
+					if ((hasMultiLines || multiLines)) {
+						int col = this.column;
+						replacement.append(this.lineSeparator);
+						this.column = 1;
+						printIndentationIfNecessary(replacement);
+						replacement.append(BLOCK_LINE_PREFIX);
+				    	this.column = col;
+					} else if (this.blockCommentBuffer.length()==0 || this.blockCommentBuffer.charAt(0)!=' ') {
+						replacement.append(' ');
+					}
+					replacement.append(this.blockCommentBuffer);
 				} else {
-					replacement.append(' ');
+					replacement = this.blockCommentBuffer;
 				}
+				addReplaceEdit(editStart, editEnd, replacement.toString());
 			}
-			replacement.append(buffer);
-			addReplaceEdit(editStart, editEnd, replacement.toString());
 		}
 
 		// Reset
@@ -1794,20 +2040,24 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	private void printBlockCommentHeaderLine(StringBuffer buffer) {
-	    if (buffer.length() == 0) {
+		if (!this.formatter.preferences.comment_new_lines_at_block_boundaries) {
+			buffer.insert(0, ' ');
+			this.column++;
+		}
+	    else if (buffer.length() == 0) {
 	    	buffer.append(this.lineSeparator);
 	    	this.column = 1;
 	    	printIndentationIfNecessary(buffer);
 	    	buffer.append(BLOCK_LINE_PREFIX);
 	    	this.column += BLOCK_LINE_PREFIX_LENGTH;
 	    } else {
-	    	StringBuffer insert = new StringBuffer();
-	    	insert.append(this.lineSeparator);
+	    	this.tempBuffer.setLength(0);
+	    	this.tempBuffer.append(this.lineSeparator);
 	    	this.column = 1;
-	    	printIndentationIfNecessary(insert);
-	    	insert.append(BLOCK_LINE_PREFIX);
+			printIndentationIfNecessary(this.tempBuffer);
+	    	this.tempBuffer.append(BLOCK_LINE_PREFIX);
 	    	this.column += BLOCK_LINE_PREFIX_LENGTH;
-	    	buffer.insert(0, insert.toString());
+	    	buffer.insert(0, this.tempBuffer.toString());
 	    }
     }
 
@@ -1930,55 +2180,94 @@ public class Scribe implements IJavaDocTagConstants {
 			throw new AbortFormatting(e);
 		}
 	}
+
 	/*
 	 * prints a code snippet
 	 */
-	private void printCodeSnippet(int startPosition, int endPosition) {
+	private void printCodeSnippet(int startPosition, int endPosition, int linesGap) {
 		String snippet = new String(this.scanner.source, startPosition, endPosition - startPosition + 1);
-
+	
 		// 1 - strip content prefix (@see JavaDocRegion#preprocessCodeSnippet)
-		ILineTracker tracker= new DefaultLineTracker();
-		String contentPrefix= IJavaDocTagConstants.JAVADOC_STAR;
-
-		StringBuffer inputBuffer= new StringBuffer();
-		inputBuffer.setLength(0);
-		inputBuffer.append(snippet);
-		tracker.set(snippet);
-		for (int lines= tracker.getNumberOfLines() - 1; lines > 0; lines--) {
-			int lineOffset;
-			try {
-				lineOffset= tracker.getLineOffset(lines);
-			} catch (BadLocationException e) {
-				// should not happen
-				CommentFormatterUtil.log(e);
-				return;
+		int firstLine = Util.getLineNumber(startPosition, this.lineEnds, 0, this.maxLines) - 1;
+		int lastLine = Util.getLineNumber(endPosition, this.lineEnds, firstLine>1 ? firstLine-2 : 0, this.maxLines) - 1;
+		this.codeSnippetBuffer.setLength(0);
+		if (firstLine == lastLine && linesGap == 0) {
+			this.codeSnippetBuffer.append(snippet);
+		} else {
+			boolean hasCharsAfterStar = false;
+			if (linesGap == 0) {
+				this.codeSnippetBuffer.append(this.scanner.source, startPosition, this.lineEnds[firstLine]+1-startPosition);
+				firstLine++;
 			}
-			int prefixOffset = inputBuffer.indexOf(contentPrefix, lineOffset);
-			if (prefixOffset >= 0 && inputBuffer.substring(lineOffset, prefixOffset).trim().length() == 0) {
-				int offsetEnd = prefixOffset + 1;
-				char ch = inputBuffer.charAt(offsetEnd);
-				switch (ch) {
-					case '\n':
-					case '\r':
-						break;
-					case ' ':
-					case '\t':
-					case '\u000c' :    /* FORM FEED               */
-						offsetEnd++;
-						break;
-					default:
-						if (ScannerHelper.isWhitespace(ch)) {
-							offsetEnd++;
+			int initialLength = this.codeSnippetBuffer.length();
+			for (int currentLine=firstLine; currentLine<=lastLine; currentLine++) {
+				this.scanner.resetTo(this.lineEnds[currentLine-1]+1, this.lineEnds[currentLine]);
+				int lineStart = this.scanner.currentPosition;
+				boolean hasStar = false;
+				loop: while (!this.scanner.atEnd()) {
+					char ch = (char) this.scanner.getNextChar();
+					switch (ch) {
+						case ' ':
+						case '\t' :
+						case '\u000c' :
+							break;
+						case '\r' :
+						case '\n' :
+							break loop;
+						case '*':
+							hasStar = true;
+							break loop;
+						default:
+							if (ScannerHelper.isWhitespace(ch)) {
+								break;
+							}
+							break loop;
+					}
+				}
+				if (hasStar) {
+					lineStart = this.scanner.currentPosition;
+					if (!hasCharsAfterStar && !this.scanner.atEnd()) {
+						char ch = (char) this.scanner.getNextChar();
+						boolean atEnd = this.scanner.atEnd();
+						switch (ch) {
+							case ' ':
+							case '\t' :
+							case '\u000c' :
+								break;
+							case '\r' :
+							case '\n' :
+								atEnd = true;
+								break;
+							default:
+								if (!ScannerHelper.isWhitespace(ch)) {
+									if (hasStar) {
+										// A non whitespace character is just after the star
+										// then we need to restart from the beginning without
+										// consuming the space after the star
+										hasCharsAfterStar = true;
+										currentLine = firstLine-1;
+										this.codeSnippetBuffer.setLength(initialLength);
+										continue;
+									}
+								}
+								break;
 						}
-						break;
+						if (!hasCharsAfterStar && !atEnd) {
+							// Until then, there's always a whitespace after each star
+							// of the comment, hence we need to consume it as it will
+							// be rewritten while reindenting the snippet lines
+							lineStart = this.scanner.currentPosition;
+						}
+					}
 				}
-				inputBuffer.delete(lineOffset, offsetEnd);
+				int end = currentLine == lastLine ? endPosition : this.lineEnds[currentLine];
+				this.codeSnippetBuffer.append(this.scanner.source, lineStart, end+1-lineStart);
 			}
 		}
-
+	
 		// 2 - convert HTML to Java (@see JavaDocRegion#convertHtml2Java)
-		HTMLEntity2JavaReader reader= new HTMLEntity2JavaReader(new StringReader(inputBuffer.toString()));
-		char[] buf= new char[snippet.length()]; // html2text never gets longer, only shorter!
+		HTMLEntity2JavaReader reader= new HTMLEntity2JavaReader(new StringReader(this.codeSnippetBuffer.toString()));
+		char[] buf= new char[this.codeSnippetBuffer.length()]; // html2text never gets longer, only shorter!
 		String convertedSnippet;
 		try {
 			int read= reader.read(buf);
@@ -1988,7 +2277,7 @@ public class Scribe implements IJavaDocTagConstants {
 			CommentFormatterUtil.log(e);
 			return;
 		}
-
+	
 		// 3 - format snippet (@see JavaDocRegion#formatCodeSnippet)
 		// include comments in case of line comments are present in the snippet
 		String formattedSnippet = convertedSnippet;
@@ -1999,63 +2288,72 @@ public class Scribe implements IJavaDocTagConstants {
 		TextEdit edit= CommentFormatterUtil.format2(CodeFormatter.K_UNKNOWN | CodeFormatter.F_INCLUDE_COMMENTS, convertedSnippet, 0, this.lineSeparator, options);
 		if (edit == null) {
 			// 3.a - not a valid code to format, keep initial buffer
-			formattedSnippet = inputBuffer.toString();
+			formattedSnippet = this.codeSnippetBuffer.toString();
 		} else {
 			// 3.b - valid code formatted
 			// 3.b.i - get the result
 			formattedSnippet = CommentFormatterUtil.evaluateFormatterEdit(convertedSnippet, edit, null);
-
+	
 			// 3.b.ii- convert back to HTML (@see JavaDocRegion#convertJava2Html)
 			Java2HTMLEntityReader javaReader= new Java2HTMLEntityReader(new StringReader(formattedSnippet));
 			buf= new char[256];
-			StringBuffer conversionBuffer= new StringBuffer();
+			this.codeSnippetBuffer.setLength(0);
 			int l;
 			try {
 				do {
 					l= javaReader.read(buf);
 					if (l != -1)
-						conversionBuffer.append(buf, 0, l);
+						this.codeSnippetBuffer.append(buf, 0, l);
 				} while (l > 0);
-				formattedSnippet = conversionBuffer.toString();
+				formattedSnippet = this.codeSnippetBuffer.toString();
 			} catch (IOException e) {
 				// should not happen
 				CommentFormatterUtil.log(e);
 				return;
 			}
 		}
-
+	
 		// 4 - add the content prefix (@see JavaDocRegion#postprocessCodeSnippet)
-		StringBuffer outputBuffer = new StringBuffer();
-		tracker = new DefaultLineTracker();
+		this.codeSnippetBuffer.setLength(0);
+		ILineTracker tracker = new DefaultLineTracker();
 		this.column = 1;
-		printIndentationIfNecessary(outputBuffer); // append indentation
-		outputBuffer.append(BLOCK_LINE_PREFIX);
-		String linePrefix = outputBuffer.toString();
-		outputBuffer.setLength(0);
-		outputBuffer.append(formattedSnippet);
-		tracker.set(outputBuffer.toString());
-		for (int lines=tracker.getNumberOfLines() - 1; lines > 0; lines--) {
-			try {
-				outputBuffer.insert(tracker.getLineOffset(lines), linePrefix);
-			} catch (BadLocationException e) {
-				// should not happen
-				CommentFormatterUtil.log(e);
-				return;
+		printIndentationIfNecessary(this.codeSnippetBuffer); // append indentation
+		this.codeSnippetBuffer.append(BLOCK_LINE_PREFIX);
+		String linePrefix = this.codeSnippetBuffer.toString();
+		this.codeSnippetBuffer.setLength(0);
+		String replacement = formattedSnippet;
+		tracker.set(formattedSnippet);
+		int numberOfLines = tracker.getNumberOfLines();
+		if (numberOfLines > 1) {
+			int lastLineOffset = -1;
+			for (int i=0; i<numberOfLines-1; i++) {
+				if (i>0) this.codeSnippetBuffer.append(linePrefix);
+				try {
+					lastLineOffset = tracker.getLineOffset(i+1);
+					this.codeSnippetBuffer.append(formattedSnippet.substring(tracker.getLineOffset(i), lastLineOffset));
+				} catch (BadLocationException e) {
+					// should not happen
+					CommentFormatterUtil.log(e);
+					return;
+				}
 			}
+			this.codeSnippetBuffer.append(linePrefix);
+			this.codeSnippetBuffer.append(formattedSnippet.substring(lastLineOffset));
+			replacement = this.codeSnippetBuffer.toString();
 		}
-
+	
 		// 5 - replace old text with the formatted snippet
-		addReplaceEdit(startPosition, endPosition, outputBuffer.toString());
+		addReplaceEdit(startPosition, endPosition, replacement);
 	}
 
 	void printComment() {
-		printComment(CodeFormatter.K_UNKNOWN);
+		printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
 	}
 
 	/*
 	 * Main method to print and format comments (javadoc, block and single line comments)
 	 */
-	void printComment(int kind) {
+	void printComment(int kind, int trailing) {
 		final boolean rejectLineComment = kind  == CodeFormatter.K_MULTI_LINE_COMMENT || kind == CodeFormatter.K_JAVA_DOC;
 		final boolean rejectBlockComment = kind  == CodeFormatter.K_SINGLE_LINE_COMMENT || kind  == CodeFormatter.K_JAVA_DOC;
 		final boolean rejectJavadocComment = kind  == CodeFormatter.K_SINGLE_LINE_COMMENT || kind  == CodeFormatter.K_MULTI_LINE_COMMENT;
@@ -2064,13 +2362,16 @@ public class Scribe implements IJavaDocTagConstants {
 			int currentTokenStartPosition = this.scanner.currentPosition;
 			boolean hasComment = false;
 			boolean hasLineComment = false;
-			boolean hasWhitespace = false;
-			int count = 0;
+			boolean hasWhitespaces = false;
+			int lines = 0;
 			while ((this.currentToken = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
+				int foundTaskCount = this.scanner.foundTaskCount;
 				switch(this.currentToken) {
 					case TerminalTokens.TokenNameWHITESPACE :
 						char[] whiteSpaces = this.scanner.getCurrentTokenSource();
-						count = 0;
+						int whitespacesStartPosition = this.scanner.getCurrentTokenStartPosition();
+						int whitespacesEndPosition = this.scanner.getCurrentTokenEndPosition();
+						lines = 0;
 						for (int i = 0, max = whiteSpaces.length; i < max; i++) {
 							switch(whiteSpaces[i]) {
 								case '\r' :
@@ -2079,91 +2380,221 @@ public class Scribe implements IJavaDocTagConstants {
 											i++;
 										}
 									}
-									count++;
+									lines++;
 									break;
 								case '\n' :
-									count++;
+									lines++;
 							}
 						}
-						if (count == 0) {
-							hasWhitespace = true;
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						} else if (hasLineComment) {
-							preserveEmptyLines(count, this.scanner.getCurrentTokenStartPosition());
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						} else if (hasComment) {
-							if (count == 1) {
-								this.printNewLine(this.scanner.getCurrentTokenStartPosition());
-							} else {
-								preserveEmptyLines(count - 1, this.scanner.getCurrentTokenStartPosition());
+						// If following token is a line comment on the same line or the line just after,
+						// then it might be not really formatted as a trailing comment
+						boolean realTrailing = trailing > NO_TRAILING_COMMENT;
+						if (realTrailing && this.scanner.currentCharacter == '/' && (lines == 0 || (lines == 1 && !hasLineComment && trailing == IMPORT_TRAILING_COMMENT))) {
+							// sometimes changing the trailing may not be the best idea
+							// for complex trailing comment, it's basically a good idea
+							boolean canChangeTrailing = (trailing & COMPLEX_TRAILING_COMMENT) != 0;
+							// for basic trailing comment preceded by a line comment, then it depends on the comments relative position
+							// when following comment column (after having been rounded) is below the preceding one,
+							// then it becomes not a good idea to change the trailing flag
+							if (trailing == BASIC_TRAILING_COMMENT && hasLineComment) {
+								int currentCommentIndentation = getCurrentIndentation(whiteSpaces, 0);
+								int relativeIndentation = currentCommentIndentation - this.lastLineComment.currentIndentation;
+								if (this.tabLength == 0) {
+									canChangeTrailing = relativeIndentation == 0;
+								} else {
+									canChangeTrailing = relativeIndentation > -this.tabLength;
+								}
 							}
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						} else if (count != 0 && (!this.formatter.preferences.join_wrapped_lines || this.formatter.preferences.number_of_empty_lines_to_preserve != 0)) {
-							addReplaceEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition(), getPreserveEmptyLines(count-1));
+							// if the trailing can be change, then look at the following tokens
+							if (canChangeTrailing) {
+								int currentPosition = this.scanner.currentPosition;
+								if (this.scanner.getNextToken() == TerminalTokens.TokenNameCOMMENT_LINE) {
+									realTrailing = !hasLineComment;
+									switch (this.scanner.getNextToken()) {
+										case TerminalTokens.TokenNameCOMMENT_LINE:
+											// at least two contiguous line comments
+											// the formatter should not consider comments as trailing ones
+											realTrailing = false;
+											break;
+										case TerminalTokens.TokenNameWHITESPACE:
+											if (this.scanner.getNextToken() == TerminalTokens.TokenNameCOMMENT_LINE) {
+												// at least two contiguous line comments
+												// the formatter should not consider comments as trailing ones
+												realTrailing = false;
+											}
+											break;
+									}
+								}
+								this.scanner.resetTo(currentPosition, this.scanner.eofPosition - 1);
+							}
+						}
+						// Look whether comments line may be contiguous or not
+						// Note that when preceding token is a comment line, then only one line
+						// is enough to have an empty line as the line end is included in the comment line...
+						// If comments are contiguous, store the white spaces to be able to compute the current comment indentation
+						if (lines > 1 || (lines == 1 && hasLineComment)) {
+							this.lastLineComment.contiguous = false;
+						}
+						this.lastLineComment.leadingSpaces = whiteSpaces;
+						this.lastLineComment.lines = lines;
+						// Strategy to consume spaces and eventually leave at this stage
+						// depends on the fact that a trailing comment is expected or not
+						if (realTrailing) {
+							// if a line comment is consumed, no other comment can be on the same line after
+							if (hasLineComment) {
+								if (lines >= 1) {
+									currentTokenStartPosition = whitespacesStartPosition;
+									preserveEmptyLines(lines, currentTokenStartPosition);
+									addDeleteEdit(currentTokenStartPosition, whitespacesEndPosition);
+									this.scanner.resetTo(this.scanner.currentPosition, this.scannerEndPosition - 1);
+									return;
+								}
+								this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
+								return;
+							} 
+							// if one or several new lines are consumed, following comments cannot be considered as trailing ones
+							if (lines >= 1) {
+								if (hasComment) {
+									this.printNewLine(whitespacesStartPosition);
+								}
+								this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
+								return;
+							}
+							// delete consumed white spaces
+							hasWhitespaces = true;
+							currentTokenStartPosition = this.scanner.currentPosition;
+							addDeleteEdit(whitespacesStartPosition, whitespacesEndPosition);
 						} else {
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
+							if (lines == 0) {
+								hasWhitespaces = true;
+								addDeleteEdit(whitespacesStartPosition, whitespacesEndPosition);
+							} else if (hasLineComment) {
+								currentTokenStartPosition = whitespacesStartPosition;
+								preserveEmptyLines(lines, currentTokenStartPosition);
+								addDeleteEdit(currentTokenStartPosition, whitespacesEndPosition);
+							} else if (hasComment) {
+								if (lines == 1) {
+									this.printNewLine(whitespacesStartPosition);
+								} else {
+									preserveEmptyLines(lines - 1, whitespacesStartPosition);
+								}
+								addDeleteEdit(whitespacesStartPosition, whitespacesEndPosition);
+							} else if (lines != 0 && (!this.formatter.preferences.join_wrapped_lines || this.formatter.preferences.number_of_empty_lines_to_preserve != 0 || this.blank_lines_between_import_groups > 0)) {
+								addReplaceEdit(whitespacesStartPosition, whitespacesEndPosition, getPreserveEmptyLines(lines-1));
+							} else {
+								addDeleteEdit(whitespacesStartPosition, whitespacesEndPosition);
+							}
 						}
 						currentTokenStartPosition = this.scanner.currentPosition;
 						break;
 					case TerminalTokens.TokenNameCOMMENT_LINE :
+						if (this.useTags && this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+							if (!this.editsEnabled && this.editsIndex > 1) {
+								OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+								if (this.scanner.startPosition == currentEdit.offset+currentEdit.length) {
+									printNewLinesBeforeDisablingComment();
+								}
+							}
+						}
 						if (rejectLineComment) break;
-						if (count >= 1) {
-							if (count > 1) {
-								preserveEmptyLines(count - 1, this.scanner.getCurrentTokenStartPosition());
-							} else if (count == 1) {
+						if (lines >= 1) {
+							if (lines > 1) {
+								preserveEmptyLines(lines - 1, this.scanner.getCurrentTokenStartPosition());
+							} else if (lines == 1) {
 								printNewLine(this.scanner.getCurrentTokenStartPosition());
 							}
-						} else if (hasWhitespace) {
+						} else if (hasWhitespaces) {
 							space();
 						}
-						hasWhitespace = false;
+						hasWhitespaces = false;
 						printLineComment();
 						currentTokenStartPosition = this.scanner.currentPosition;
 						hasLineComment = true;
-						count = 0;
+						lines = 0;
+						if (this.useTags && !this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+						}
 						break;
 					case TerminalTokens.TokenNameCOMMENT_BLOCK :
+						if (this.useTags && this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+							if (!this.editsEnabled && this.editsIndex > 1) {
+								OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+								if (this.scanner.startPosition == currentEdit.offset+currentEdit.length) {
+									printNewLinesBeforeDisablingComment();
+								}
+							}
+						}
+						if (trailing > NO_TRAILING_COMMENT && lines >= 1) {
+							// a block comment on next line means that there's no trailing comment
+							this.scanner.resetTo(this.scanner.getCurrentTokenStartPosition(), this.scannerEndPosition - 1);
+							return;
+						}
+						this.lastLineComment.contiguous = false;
 						if (rejectBlockComment) break;
-						if (count >= 1) {
-							if (count > 1) {
-								preserveEmptyLines(count - 1, this.scanner.getCurrentTokenStartPosition());
-							} else if (count == 1) {
+						if (lines >= 1) {
+							if (lines > 1) {
+								preserveEmptyLines(lines - 1, this.scanner.getCurrentTokenStartPosition());
+							} else if (lines == 1) {
 								printNewLine(this.scanner.getCurrentTokenStartPosition());
 							}
-						} else if (hasWhitespace) {
+						} else if (hasWhitespaces) {
 							space();
 						}
-						hasWhitespace = false;
+						hasWhitespaces = false;
 						printBlockComment(false);
 						currentTokenStartPosition = this.scanner.currentPosition;
 						hasLineComment = false;
 						hasComment = true;
-						count = 0;
+						lines = 0;
+						if (this.useTags && !this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+						}
 						break;
 					case TerminalTokens.TokenNameCOMMENT_JAVADOC :
+						if (this.useTags && this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+							if (!this.editsEnabled && this.editsIndex > 1) {
+								OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+								if (this.scanner.startPosition == currentEdit.offset+currentEdit.length) {
+									printNewLinesBeforeDisablingComment();
+								}
+							}
+						}
+						if (trailing > NO_TRAILING_COMMENT) {
+							// a javadoc comment should not be considered as a trailing comment
+							this.scanner.resetTo(this.scanner.getCurrentTokenStartPosition(), this.scannerEndPosition - 1);
+							return;
+						}
+						this.lastLineComment.contiguous = false;
 						if (rejectJavadocComment) break;
-						if (count >= 1) {
-							if (count > 1) {
-								preserveEmptyLines(count - 1, this.scanner.getCurrentTokenStartPosition());
-							} else if (count == 1) {
+						if (lines >= 1) {
+							if (lines > 1) {
+								preserveEmptyLines(lines - 1, this.scanner.getCurrentTokenStartPosition());
+							} else if (lines == 1) {
 								printNewLine(this.scanner.getCurrentTokenStartPosition());
 							}
-						} else if (hasWhitespace) {
+						} else if (hasWhitespaces) {
 							space();
 						}
-						hasWhitespace = false;
+						hasWhitespaces = false;
 						if (includesJavadocComments()) {
 							printJavadocComment(this.scanner.startPosition, this.scanner.currentPosition);
 						} else {
 							printBlockComment(true);
 						}
+						if (this.useTags && !this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+						}
 						printNewLine();
 						currentTokenStartPosition = this.scanner.currentPosition;
 						hasLineComment = false;
 						hasComment = true;
-						count = 0;
+						lines = 0;
 						break;
 					default :
+						this.lastLineComment.contiguous = false;
 						// step back one token
 						this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
 						return;
@@ -2177,7 +2608,7 @@ public class Scribe implements IJavaDocTagConstants {
 	void printComment(int kind, String source, int start, int end, int level) {
 
 		// Set scanner
-		initializeScanner(source.toCharArray());
+		resetScanner(source.toCharArray());
 		this.scanner.resetTo(start, end);
 		// Put back 3.4RC2 code => comment following line  as it has an impact on Linux tests
 		// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=234336
@@ -2193,10 +2624,10 @@ public class Scribe implements IJavaDocTagConstants {
 	    // Print corresponding comment
 	    switch (kind) {
 	    	case CodeFormatter.K_SINGLE_LINE_COMMENT:
-			    printComment(kind);
+			    printComment(kind, NO_TRAILING_COMMENT);
 	    		break;
 	    	case CodeFormatter.K_MULTI_LINE_COMMENT:
-			    printComment(kind);
+			    printComment(kind, NO_TRAILING_COMMENT);
 	    		break;
 	    	case CodeFormatter.K_JAVA_DOC:
 	    		printJavadocComment(start, end);
@@ -2218,12 +2649,66 @@ public class Scribe implements IJavaDocTagConstants {
     	int start = currentTokenStartPosition;
     	int nextCharacterStart = currentTokenStartPosition;
 
-    	if (this.indentationLevel != 0) {
-    		if (!this.formatter.preferences.never_indent_line_comments_on_first_column
-    				|| !isOnFirstColumn(start)) {
-    			printIndentationIfNecessary();
+    	// Print comment line indentation
+    	int commentIndentationLevel;
+   		boolean onFirstColumn = isOnFirstColumn(start);
+    	if (this.indentationLevel == 0) {
+    		commentIndentationLevel = this.column - 1;
+    	} else {
+			if (onFirstColumn &&
+					((includesLineComments && !this.formatter.preferences.comment_format_line_comment_starting_on_first_column) ||
+					 this.formatter.preferences.never_indent_line_comments_on_first_column)
+    			) {
+	   			commentIndentationLevel = this.column - 1;
+    		} else {
+    			// Indentation may be specific for contiguous comment
+    			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=293300
+				if (this.lastLineComment.contiguous) {
+					// The leading spaces have been set while looping in the printComment(int) method
+					int currentCommentIndentation = getCurrentIndentation(this.lastLineComment.leadingSpaces, 0);
+					// Keep the current comment indentation when over the previous contiguous line comment
+					// and the previous comment has not been reindented
+					int relativeIndentation = currentCommentIndentation - this.lastLineComment.currentIndentation;
+					boolean similarCommentsIndentation = false;
+					if (this.tabLength == 0) {
+						similarCommentsIndentation = relativeIndentation == 0;
+					} else if (relativeIndentation > -this.tabLength) {
+						similarCommentsIndentation = relativeIndentation == 0 || currentCommentIndentation != 0 && this.lastLineComment.currentIndentation != 0;
+					}
+					if (similarCommentsIndentation && this.lastLineComment.indentation != this.indentationLevel) {
+						int currentIndentationLevel = this.indentationLevel;
+						this.indentationLevel = this.lastLineComment.indentation ;
+						printIndentationIfNecessary();
+						this.indentationLevel = currentIndentationLevel;
+			   			commentIndentationLevel = this.lastLineComment.indentation ;
+					} else {
+						printIndentationIfNecessary();
+			   			commentIndentationLevel = this.column - 1;
+					}
+				} else {
+					if (this.currentAlignment != null && this.currentAlignment.kind == Alignment.ARRAY_INITIALIZER &&
+						this.indentationLevel < this.currentAlignment.breakIndentationLevel &&
+						this.lastLineComment.lines > 0)
+					{
+						int currentIndentationLevel = this.indentationLevel;
+						this.indentationLevel = this.currentAlignment.breakIndentationLevel;
+		    			printIndentationIfNecessary();
+						this.indentationLevel = currentIndentationLevel;
+			   			commentIndentationLevel = this.currentAlignment.breakIndentationLevel;
+					} else {
+		    			printIndentationIfNecessary();
+			   			commentIndentationLevel = this.column - 1;
+					}
+				}
     		}
     	}
+    	
+    	// Store line comment information
+   		this.lastLineComment.contiguous = true;
+		this.lastLineComment.currentIndentation = getCurrentCommentIndentation(currentTokenStartPosition);
+		this.lastLineComment.indentation = commentIndentationLevel;
+		
+		// Add pending space if necessary
     	if (this.pendingSpace) {
     		addInsertEdit(currentTokenStartPosition, " "); //$NON-NLS-1$
     	}
@@ -2231,7 +2716,7 @@ public class Scribe implements IJavaDocTagConstants {
     	this.pendingSpace = false;
     	int previousStart = currentTokenStartPosition;
 
-		if (!isNlsTag && includesLineComments) {
+		if (!isNlsTag && includesLineComments && (!onFirstColumn || this.formatter.preferences.comment_format_line_comment_starting_on_first_column)) {
 			printLineComment(currentTokenStartPosition, currentTokenEndPosition-1);
 		} else {
 			// do nothing!?
@@ -2283,7 +2768,12 @@ public class Scribe implements IJavaDocTagConstants {
 		int indentLevel = this.indentationLevel;
 		int indentations = this.numberOfIndentations;
 		this.indentationLevel = getNextIndentationLevel(firstColumn);
-		this.numberOfIndentations = this.indentationSize==0 ? 0 : this.indentationLevel / this.indentationSize;
+		if (this.indentationSize != 0) {
+			this.numberOfIndentations = this.indentationLevel / this.indentationSize;
+		}
+		else{
+			this.numberOfIndentations = 0;
+		}
 
 		// Consume the comment prefix
 		this.scanner.resetTo(commentStart, commentEnd);
@@ -2379,12 +2869,15 @@ public class Scribe implements IJavaDocTagConstants {
 					this.lastNumberOfNewLines++;
 					this.line++;
 					if (newLineString == null) {
-						StringBuffer newLineBuffer = new StringBuffer(this.lineSeparator);
+						this.tempBuffer.setLength(0);
+						this.tempBuffer.append(this.lineSeparator);
 						this.column = 1;
-						printIndentationIfNecessary(newLineBuffer);
-					    newLineBuffer.append(LINE_COMMENT_PREFIX);
+						if (!this.formatter.preferences.never_indent_line_comments_on_first_column) {
+							printIndentationIfNecessary(this.tempBuffer);
+						}
+					    this.tempBuffer.append(LINE_COMMENT_PREFIX);
 						this.column += LINE_COMMENT_PREFIX_LENGTH;
-						newLineString = newLineBuffer.toString();
+						newLineString = this.tempBuffer.toString();
 				    	firstColumn = this.column;
 					} else {
 						this.column = firstColumn;
@@ -2431,9 +2924,10 @@ public class Scribe implements IJavaDocTagConstants {
 			}
 		}
 
-		// Delete leading whitespaces if any
-		if (previousToken != -1 && lastTokenEndPosition != commentStart && spaceEndPosition > lastTokenEndPosition) {
-			addDeleteEdit(lastTokenEndPosition, spaceEndPosition-1);
+		// Replace the line separator at the end of the comment if any...
+		int startReplace = previousToken == SKIP_FIRST_WHITESPACE_TOKEN ? spaceStartPosition : lastTokenEndPosition;
+		if (this.column == 1 && commentEnd >= startReplace) {
+			addReplaceEdit(startReplace, commentEnd, this.formatter.preferences.line_separator);
 		}
 	}
 
@@ -2448,10 +2942,10 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	void printIndentationIfNecessary() {
-		StringBuffer buffer = new StringBuffer();
-		printIndentationIfNecessary(buffer);
-		if (buffer.length() > 0) {
-			addInsertEdit(this.scanner.getCurrentTokenStartPosition(), buffer.toString());
+		this.tempBuffer.setLength(0);
+		printIndentationIfNecessary(this.tempBuffer);
+		if (this.tempBuffer.length() > 0) {
+			addInsertEdit(this.scanner.getCurrentTokenStartPosition(), this.tempBuffer.toString());
 			this.pendingSpace = false;
 		}
 	}
@@ -2469,12 +2963,11 @@ public class Scribe implements IJavaDocTagConstants {
 							indentationsAsTab++;
 							int complement = this.tabLength - ((this.column - 1) % this.tabLength); // amount of space
 							this.column += complement;
-							this.needSpace = false;
 						} else {
 							if (buffer != null) buffer.append(' ');
 							this.column++;
-							this.needSpace = false;
 						}
+						this.needSpace = false;
 					}
 				} else if (this.tabLength > 0) {
 					while (this.column <= this.indentationLevel) {
@@ -2580,15 +3073,7 @@ public class Scribe implements IJavaDocTagConstants {
 						commentIndentationLevel += this.indentationSize;
 					}
 				}
-				if (commentIndentationLevel == 0) {
-				    this.commentIndentation = null;
-				} else {
-		    		StringBuffer indentationBuffer = new StringBuffer();
-		        	for (int i=0; i<commentIndentationLevel; i++) {
-		    			indentationBuffer.append(' ');
-		        	}
-	        		this.commentIndentation = indentationBuffer.toString();
-		    	}
+				setCommentIndentation(commentIndentationLevel);
 			}
 			FormatJavadocReference reference= block.reference;
 			if (reference != null) {
@@ -2631,17 +3116,21 @@ public class Scribe implements IJavaDocTagConstants {
 							if (newLines > 0)  newLines = 1;
 						}
 					}
-					if (newLines == 0) {
+					if (newLines == 0 && (!node.isImmutable() || block.reference != null)) {
 						newLines = printJavadocBlockNodesNewLines(block, node, previousEnd);
 					}
-					printJavadocGapLines(previousEnd+1, nodeStart-1, newLines, clearBlankLines, false, null);
+					if (block.isImmutable()) {
+						printJavadocGapLinesForImmutableBlock(block);
+					} else {
+						printJavadocGapLines(previousEnd+1, nodeStart-1, newLines, clearBlankLines, false, null);
+					}
 				} else {
-					StringBuffer buffer = new StringBuffer();
+					this.tempBuffer.setLength(0);
 					if (newLines > 0) {
 						for (int j=0; j<newLines; j++) {
-							printJavadocNewLine(buffer);
+							printJavadocNewLine(this.tempBuffer);
 						}
-						addInsertEdit(nodeStart, buffer.toString());
+						addInsertEdit(nodeStart, this.tempBuffer.toString());
 					}
 				}
 			} else {
@@ -2663,18 +3152,16 @@ public class Scribe implements IJavaDocTagConstants {
 			// Print node
 			if (node.isText()) {
 				FormatJavadocText text = (FormatJavadocText) node;
-				if (text.isHtmlTag()) {
-					if (text.isImmutableHtmlTag()) {
-						// Indent if new line was added
-						if (newLines > 0 && this.commentIndentation != null) {
-					    	addInsertEdit(node.sourceStart, this.commentIndentation);
-					    	this.column += this.commentIndentation.length();
-						}
-						printJavadocHtmlImmutableTag(text, block, newLines > 0);
-						this.column += getTextLength(block, text);
-					} else {
-						printJavadocHtmlTag(text, block, newLines>0);
+				if (text.isImmutable()) {
+					// Indent if new line was added
+					if (text.isImmutableHtmlTag() && newLines > 0 && this.commentIndentation != null) {
+				    	addInsertEdit(node.sourceStart, this.commentIndentation);
+				    	this.column += this.commentIndentation.length();
 					}
+					printJavadocImmutableText(text, block, newLines > 0);
+					this.column += getTextLength(block, text);
+				} else if (text.isHtmlTag()) {
+					printJavadocHtmlTag(text, block, newLines>0);
 				} else {
 					printJavadocText(text, block, newLines>0);
 				}
@@ -2699,50 +3186,66 @@ public class Scribe implements IJavaDocTagConstants {
  	    try {
 			this.scanner.resetTo(nodeStart , node.sourceEnd);
 	    	int length = 0;
-	    	int newLines = 0;
 	    	boolean newLine = false;
 			boolean headerLine = block.isHeaderLine() && this.lastNumberOfNewLines == 0;
 			int firstColumn = 1 + this.indentationLevel + BLOCK_LINE_PREFIX_LENGTH;
 			if (this.commentIndentation != null) firstColumn += this.commentIndentation.length();
 			if (headerLine) maxColumn++;
-	    	if (node.isText()) {
-	    		FormatJavadocText text = (FormatJavadocText)node;
-    			if (text.isImmutableHtmlTag()) {
+			FormatJavadocText text = null;
+			boolean isImmutableNode = node.isImmutable();
+			boolean nodeIsText = node.isText();
+			if (nodeIsText) {
+	    		text = (FormatJavadocText)node;
+			} else {
+				FormatJavadocBlock inlinedBlock = (FormatJavadocBlock)node;
+				if (isImmutableNode) {
+					text = (FormatJavadocText) inlinedBlock.getLastNode();
+					if (text != null) {
+			    		length += inlinedBlock.tagEnd - inlinedBlock.sourceStart + 1;  // tag length
+				    	if (nodeStart > (previousEnd+1)) {
+				    		length++; // include space between nodes
+				    	}
+						this.scanner.resetTo(text.sourceStart , node.sourceEnd);
+					}
+				}
+			}
+	    	if (text != null) {
+    			if (isImmutableNode) {
 			    	if (nodeStart > (previousEnd+1)) {
 			    		length++; // include space between nodes
 			    	}
     				int lastColumn = this.column + length;
 	    			while (!this.scanner.atEnd()) {
-	    				int token = this.scanner.getNextToken();
-	    				switch (token) {
-	    					case TerminalTokens.TokenNameWHITESPACE:
-	    						if (CharOperation.indexOf('\n', this.scanner.source, this.scanner.startPosition, this.scanner.currentPosition) >= 0) {
-	    							return newLines;
-	    						}
-	    						length = 1;
-	    						break;
-	    					case TerminalTokens.TokenNameMULTIPLY:
-	    						if (newLine) {
-	    							newLine = false;
-	    							continue;
-	    						}
-	    						length = 1;
-	    						break;
-	    					default:
-				    			length = (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - this.scanner.startPosition;
-	    						break;
+	    				try {
+		    				int token = this.scanner.getNextToken();
+		    				switch (token) {
+		    					case TerminalTokens.TokenNameWHITESPACE:
+		    						if (CharOperation.indexOf('\n', this.scanner.source, this.scanner.startPosition, this.scanner.currentPosition) >= 0) {
+		    							return 0;
+		    						}
+									lastColumn = getCurrentIndentation(this.scanner.getCurrentTokenSource(), lastColumn);
+		    						break;
+		    					case TerminalTokens.TokenNameMULTIPLY:
+		    						if (newLine) {
+		    							newLine = false;
+		    							continue;
+		    						}
+		    						lastColumn++;
+		    						break;
+		    					default:
+					    			lastColumn += (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - this.scanner.startPosition;
+		    						break;
+		    				}
+	    				}
+	    				catch (InvalidInputException iie) {
+	    					// maybe an unterminated string or comment
+			    			lastColumn += (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - this.scanner.startPosition;
 	    				}
-	    				lastColumn += length;
 	    				if (lastColumn > maxColumn) {
-							newLines++;
-				    		if (headerLine) {
-								maxColumn--;
-								headerLine = false;
-			    			}
-							lastColumn = firstColumn;
+	    					return 1;
 						}
 	    			}
-	    			return newLines;
+	    			return 0;
     			}
     			if (text.isHtmlTag()) {
     				if (text.getHtmlTagID() == JAVADOC_SINGLE_BREAK_TAG_ID) {
@@ -2831,7 +3334,7 @@ public class Scribe implements IJavaDocTagConstants {
 
 		// First we need to know what is the indentation
 		this.scanner.resetTo(block.tagEnd+1, reference.sourceEnd);
-		StringBuffer buffer = new StringBuffer();
+		this.javadocBlockRefBuffer.setLength(0);
 		boolean needFormat = false;
 		int previousToken = -1;
 		int spacePosition = -1;
@@ -2850,10 +3353,10 @@ public class Scribe implements IJavaDocTagConstants {
 							case TerminalTokens.TokenNameLPAREN:
 								break;
 							default:	// space between method arguments
-								spacePosition = buffer.length();
+								spacePosition = this.javadocBlockRefBuffer.length();
 								// $FALL-THROUGH$ - fall through next case
 							case -1:
-								buffer.append(' ');
+								this.javadocBlockRefBuffer.append(' ');
 								this.column++;
 								break;
 						}
@@ -2866,29 +3369,30 @@ public class Scribe implements IJavaDocTagConstants {
 							this.lastNumberOfNewLines++;
 							this.line++;
 							if (newLineString == null) {
-								StringBuffer newLineBuffer = new StringBuffer(this.lineSeparator);
+								this.tempBuffer.setLength(0);
+								this.tempBuffer.append(this.lineSeparator);
 						    	this.column = 1;
-						    	printIndentationIfNecessary(newLineBuffer);
-					    		newLineBuffer.append(BLOCK_LINE_PREFIX);
+						    	printIndentationIfNecessary(this.tempBuffer);
+					    		this.tempBuffer.append(BLOCK_LINE_PREFIX);
 					    		this.column += BLOCK_LINE_PREFIX_LENGTH;
 								if (this.commentIndentation != null) {
-							    	newLineBuffer.append(this.commentIndentation);
+							    	this.tempBuffer.append(this.commentIndentation);
 							    	this.column += this.commentIndentation.length();
 						    	}
-						    	newLineString = newLineBuffer.substring(0, newLineBuffer.length()-1); // remove last space as buffer will be inserted before a space
+						    	newLineString = this.tempBuffer.substring(0, this.tempBuffer.length()-1); // remove last space as buffer will be inserted before a space
 						    	firstColumn = this.column;
 							} else {
 								this.column = firstColumn;
 							}
-							this.column = firstColumn + buffer.length() - spacePosition - 1;
-							buffer.insert(spacePosition, newLineString);
+							this.column = firstColumn + this.javadocBlockRefBuffer.length() - spacePosition - 1;
+							this.javadocBlockRefBuffer.insert(spacePosition, newLineString);
 							if (headerLine) {
 								headerLine = false;
 								maxColumn--;
 							}
 							spacePosition = -1;
 						}
-						buffer.append(this.scanner.source, this.scanner.startPosition, tokenLength);
+						this.javadocBlockRefBuffer.append(this.scanner.source, this.scanner.startPosition, tokenLength);
 			    		this.column += tokenLength;
 			    		break;
 				}
@@ -2898,14 +3402,14 @@ public class Scribe implements IJavaDocTagConstants {
 			}
 		}
 		if (needFormat) {
-		    addReplaceEdit(block.tagEnd+1, reference.sourceEnd, buffer.toString());
+		    addReplaceEdit(block.tagEnd+1, reference.sourceEnd, this.javadocBlockRefBuffer.toString());
 		}
     }
 
 	private int getTextLength(FormatJavadocBlock block, FormatJavadocText text) {
 
 		// Special case for immutable tags
-		if (text.isImmutableHtmlTag()) {
+		if (text.isImmutable()) {
 			this.scanner.resetTo(text.sourceStart , text.sourceEnd);
 			int textLength = 0;
 			while (!this.scanner.atEnd()) {
@@ -2928,7 +3432,8 @@ public class Scribe implements IJavaDocTagConstants {
 	    			}
 	    			textLength += (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - this.scanner.startPosition;
                 } catch (InvalidInputException e) {
-	                return textLength;
+   					// maybe an unterminated string or comment
+	    			textLength += (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - this.scanner.startPosition;
                 }
 			}
 			return textLength;
@@ -3024,7 +3529,7 @@ public class Scribe implements IJavaDocTagConstants {
 			printJavadocBlock(previousBlock);
 
 			// format the header and footer empty spaces
-			int newLines = this.line > currentLine || javadoc.isMultiLine() ? 1 : 0;
+			int newLines = (this.formatter.preferences.comment_new_lines_at_javadoc_boundaries && (this.line > currentLine || javadoc.isMultiLine())) ? 1 : 0;
 			printJavadocGapLines(javadoc.textStart, firstBlockStart-1, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, false, null);
 			printJavadocGapLines(previousBlock.sourceEnd+1, javadoc.textEnd, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, true, null);
 		}
@@ -3057,23 +3562,23 @@ public class Scribe implements IJavaDocTagConstants {
 			// if there's no enough room to replace text, then insert the gap
 			if (textStartPosition > textEndPosition) {
 				if (newLines > 0) {
-					StringBuffer buffer = new StringBuffer();
+					this.javadocGapLinesBuffer.setLength(0);
 					for (int i=0; i<newLines; i++) {
-						buffer.append(this.lineSeparator);
+						this.javadocGapLinesBuffer.append(this.lineSeparator);
 						this.column = 1;
-						printIndentationIfNecessary(buffer);
+						printIndentationIfNecessary(this.javadocGapLinesBuffer);
 						if (footer) {
-							buffer.append(' ');
+							this.javadocGapLinesBuffer.append(' ');
 							this.column++;
 						} else {
-							buffer.append(BLOCK_LINE_PREFIX);
+							this.javadocGapLinesBuffer.append(BLOCK_LINE_PREFIX);
 							this.column += BLOCK_LINE_PREFIX_LENGTH;
 						}
 					}
 					if (output == null) {
-						addInsertEdit(textStartPosition, buffer.toString());
+						addInsertEdit(textStartPosition, this.javadocGapLinesBuffer.toString());
 					} else {
-						output.append(buffer);
+						output.append(this.javadocGapLinesBuffer);
 					}
 				}
 				return;
@@ -3087,16 +3592,17 @@ public class Scribe implements IJavaDocTagConstants {
 			int linePtr = this.scanner.linePtr;
 			int lineCount = 0;
 			int start = textStartPosition;
+			boolean endsOnMultiply = false;
 			while (!this.scanner.atEnd()) {
 				switch (this.scanner.getNextToken()) {
 					case TerminalTokens.TokenNameMULTIPLY:
 						// we just need to replace each lines between '*' with the javadoc formatted ones
 						int linesGap = this.scanner.linePtr - linePtr;
 						if (linesGap > 0) {
-							StringBuffer buffer = new StringBuffer();
+							this.javadocGapLinesBuffer.setLength(0);
 							if (lineCount > 0) {
-								// TODO (eric) https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
-								buffer.append( ' ');
+								// TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
+								this.javadocGapLinesBuffer.append( ' ');
 							}
 							for (int i = 0; i < linesGap ; i++) {
 								if (clearBlankLines && lineCount >= newLines) {
@@ -3104,21 +3610,21 @@ public class Scribe implements IJavaDocTagConstants {
 									// so remove any remaining blanks and leave
 									if (textEndPosition >= start) {
 										if (output == null) {
-											addReplaceEdit(start, textEndPosition, buffer.toString());
+											addReplaceEdit(start, textEndPosition, this.javadocGapLinesBuffer.toString());
 										} else {
-											output.append(buffer);
+											output.append(this.javadocGapLinesBuffer);
 										}
 									}
 									return;
 								}
-								buffer.append(this.lineSeparator);
+								this.javadocGapLinesBuffer.append(this.lineSeparator);
 								this.column = 1;
-								printIndentationIfNecessary(buffer);
+								printIndentationIfNecessary(this.javadocGapLinesBuffer);
 								if (i == (linesGap-1)) {
-									buffer.append(' ');
+									this.javadocGapLinesBuffer.append(' ');
 									this.column++;
 								} else {
-									buffer.append(BLOCK_LINE_PREFIX);
+									this.javadocGapLinesBuffer.append(BLOCK_LINE_PREFIX);
 									this.column += BLOCK_LINE_PREFIX_LENGTH;
 								}
 								lineCount++;
@@ -3126,9 +3632,9 @@ public class Scribe implements IJavaDocTagConstants {
 							int currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
 							int tokenLength = this.scanner.currentPosition - currentTokenStartPosition;
 							if (output == null) {
-								addReplaceEdit(start, currentTokenStartPosition-1, buffer.toString());
+								addReplaceEdit(start, currentTokenStartPosition-1, this.javadocGapLinesBuffer.toString());
 							} else {
-								output.append(buffer);
+								output.append(this.javadocGapLinesBuffer);
 								output.append(this.scanner.source, currentTokenStartPosition, tokenLength);
 							}
 							this.column += tokenLength;
@@ -3144,6 +3650,10 @@ public class Scribe implements IJavaDocTagConstants {
 						// next start is just after the current token
 						start = this.scanner.currentPosition;
 						linePtr = this.scanner.linePtr;
+						endsOnMultiply = true;
+						break;
+					default:
+						endsOnMultiply = false;
 						break;
 				}
 			}
@@ -3151,52 +3661,60 @@ public class Scribe implements IJavaDocTagConstants {
 			// Format the last whitespaces
 			if (lineCount < newLines) {
 				// Insert new lines as not enough was encountered while scanning the whitespaces
-				StringBuffer buffer = new StringBuffer();
+				this.javadocGapLinesBuffer.setLength(0);
 				if (lineCount > 0) {
-					// TODO (eric) https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
-					buffer.append( ' ');
+					// TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
+					this.javadocGapLinesBuffer.append( ' ');
 				}
 				for (int i = lineCount; i < newLines-1; i++) {
-					printJavadocNewLine(buffer);
+					printJavadocNewLine(this.javadocGapLinesBuffer);
 				}
-				buffer.append(this.lineSeparator);
+				this.javadocGapLinesBuffer.append(this.lineSeparator);
 				this.column = 1;
-				printIndentationIfNecessary(buffer);
+				printIndentationIfNecessary(this.javadocGapLinesBuffer);
 				if (footer) {
-					buffer.append(' ');
+					this.javadocGapLinesBuffer.append(' ');
 					this.column++;
 				} else {
-					buffer.append(BLOCK_LINE_PREFIX);
+					this.javadocGapLinesBuffer.append(BLOCK_LINE_PREFIX);
 					this.column += BLOCK_LINE_PREFIX_LENGTH;
 				}
 				if (output == null) {
 					if (textEndPosition >= start) {
-						addReplaceEdit(start, textEndPosition, buffer.toString());
+						addReplaceEdit(start, textEndPosition, this.javadocGapLinesBuffer.toString());
 					} else {
-						addInsertEdit(textEndPosition+1, buffer.toString());
+						addInsertEdit(textEndPosition+1, this.javadocGapLinesBuffer.toString());
 					}
 				} else {
-					output.append(buffer);
+					output.append(this.javadocGapLinesBuffer);
 				}
 			} else {
 				// Replace all remaining whitespaces by a single space
 				if (textEndPosition >= start) {
-					StringBuffer buffer = new StringBuffer();
+					this.javadocGapLinesBuffer.setLength(0);
 					if (this.scanner.linePtr > linePtr) {
 						if (lineCount > 0) {
-							// TODO (eric) https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
-							buffer.append( ' ');
+							// TODO https://bugs.eclipse.org/bugs/show_bug.cgi?id=49619
+							this.javadocGapLinesBuffer.append(' ');
 						}
-						buffer.append(this.lineSeparator);
+						this.javadocGapLinesBuffer.append(this.lineSeparator);
 						this.column = 1;
-						printIndentationIfNecessary(buffer);
+						printIndentationIfNecessary(this.javadocGapLinesBuffer);
+					}
+					this.javadocGapLinesBuffer.append(' ');
+					if (output == null) {
+						addReplaceEdit(start, textEndPosition, this.javadocGapLinesBuffer.toString());
+					} else {
+						output.append(this.javadocGapLinesBuffer);
 					}
-					buffer.append(' ');
+					this.needSpace = false;
+				} else if (endsOnMultiply) {
 					if (output == null) {
-						addReplaceEdit(start, textEndPosition, buffer.toString());
+						addInsertEdit(textEndPosition+1, " "); //$NON-NLS-1$
 					} else {
-						output.append(buffer);
+						output.append(' ');
 					}
+					this.needSpace = false;
 				}
 				this.column++;
 			}
@@ -3213,25 +3731,18 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 	}
 
-	private void printJavadocHtmlImmutableTag(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
+	private void printJavadocImmutableText(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
 
 		try {
 			// Iterate on text line separators
-			int lineNumber = text.lineStart;
+			int textLineStart = text.lineStart;
 			this.scanner.tokenizeWhiteSpace = false;
-			StringBuffer buffer = null;
-			for (int idx=1, max=text.separatorsPtr; idx<max ; idx++) {
+			String newLineString = null;
+			for (int idx=0, max=text.separatorsPtr; idx<=max ; idx++) {
 				int start = (int) text.separators[idx];
-				int lineStart = Util.getLineNumber(start, this.lineEnds, lineNumber, this.maxLines);
-				if (buffer == null) {
-					buffer = new StringBuffer();
-					this.column = 1;
-					printIndentationIfNecessary(buffer);
-					buffer.append(BLOCK_LINE_PREFIX);
-					this.column += BLOCK_LINE_PREFIX_LENGTH;
-				}
-				while (lineNumber < lineStart) {
-					int end = this.lineEnds[lineNumber-1];
+				int lineStart = Util.getLineNumber(start, this.lineEnds, textLineStart-1, this.maxLines);
+				while (textLineStart < lineStart) {
+					int end = this.lineEnds[textLineStart-1];
 					this.scanner.resetTo(end, start);
 					int token = this.scanner.getNextToken();
 					switch (token) {
@@ -3244,8 +3755,16 @@ public class Scribe implements IJavaDocTagConstants {
 					if (this.scanner.currentCharacter == ' ') {
 						this.scanner.getNextChar();
 					}
-					addReplaceEdit(end+1, this.scanner.getCurrentTokenEndPosition(), buffer.toString());
-					lineNumber++;
+					if (newLineString == null) {
+						this.tempBuffer.setLength(0);
+						this.column = 1;
+						printIndentationIfNecessary(this.tempBuffer);
+						this.tempBuffer.append(BLOCK_LINE_PREFIX);
+						this.column += BLOCK_LINE_PREFIX_LENGTH;
+						newLineString = this.tempBuffer.toString();
+					}
+					addReplaceEdit(end+1, this.scanner.getCurrentTokenEndPosition(), newLineString);
+					textLineStart++;
 				}
 			}
 		}
@@ -3260,6 +3779,174 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 	}
 
+	/*
+	 *  Print the gap lines for an immutable block.
+	 *  That's needed to  be specific as the formatter needs to keep white spaces
+	 *  if possible except those which are indentation ones.
+	 *  Note that in the peculiar case of a two lines immutable tag (multi lines block),
+	 *  the formatter will join the two lines.
+	 */
+	private void printJavadocGapLinesForImmutableBlock(FormatJavadocBlock block) {
+
+		// Init
+		int firstLineEnd = -1; // not initialized
+		int newLineStart = -1; // not initialized
+		int secondLineStart = -1; // not initialized
+		int starPosition = -1; // not initialized
+		int offset = 0;
+		int start = block.tagEnd + 1;
+		int end = block.nodes[0].sourceStart-1;
+		this.scanner.resetTo(start, end);
+		int lineStart = block.lineStart;
+		int lineEnd = Util.getLineNumber(block.nodes[0].sourceEnd, this.lineEnds, lineStart-1, this.maxLines);
+		boolean multiLinesBlock = lineEnd > (lineStart+1);
+		int previousPosition = this.scanner.currentPosition;
+		String newLineString = null;
+		int indentationColumn = 0;
+		int leadingSpaces = -1;
+
+		// Scan the existing gap
+		while (!this.scanner.atEnd()) {
+			char ch = (char) this.scanner.getNextChar();
+			switch (ch) {
+				case '\t' :
+					// increase the corresponding counter from the appropriate tab value
+					if (secondLineStart > 0 || firstLineEnd < 0) {
+						int reminder = this.tabLength == 0 ? 0 : offset % this.tabLength;
+						if (reminder == 0) {
+							offset += this.tabLength;
+						} else {
+							offset = ((offset / this.tabLength) + 1) * this.tabLength;
+						}
+					} else if (leadingSpaces >= 0) {
+						int reminder = this.tabLength == 0 ? 0 : offset % this.tabLength;
+						if (reminder == 0) {
+							leadingSpaces += this.tabLength;
+						} else {
+							leadingSpaces = ((offset / this.tabLength) + 1) * this.tabLength;
+						}
+					}
+					break;
+				case '\r' :
+				case '\n' :
+					// new line, store the end of the first one
+					if (firstLineEnd < 0) {
+						firstLineEnd = previousPosition;
+					}
+					// print indentation if there were spaces without any star on the line
+					if (leadingSpaces > 0 && multiLinesBlock) {
+						if (newLineString == null) {
+							this.column = 1;
+							this.tempBuffer.setLength(0);
+							printIndentationIfNecessary(this.tempBuffer);
+							this.tempBuffer.append(BLOCK_LINE_PREFIX);
+							this.column += BLOCK_LINE_PREFIX_LENGTH;
+							newLineString = this.tempBuffer.toString();
+							indentationColumn = this.column;
+						} else {
+							this.column = indentationColumn;
+						}
+						addReplaceEdit(newLineStart, newLineStart+indentationColumn-2, newLineString);
+					}
+					// store line start and reset positions
+					newLineStart = this.scanner.currentPosition;
+					leadingSpaces = 0;
+					starPosition = -1;
+					if (multiLinesBlock) {
+						offset = 0;
+						secondLineStart = -1;
+					}
+					break;
+				case '*' :
+					// store line start position if this is the first star of the line
+					if (starPosition < 0 && firstLineEnd > 0) {
+						secondLineStart = this.scanner.currentPosition;
+						starPosition = this.scanner.currentPosition;
+						leadingSpaces = -1;
+					}
+					break;
+				default :
+					// increment offset if line has started
+					if (secondLineStart > 0) {
+						// skip first white space after the first '*'
+						if (secondLineStart == starPosition) {
+							secondLineStart = this.scanner.currentPosition;
+						} else {
+							// print indentation before the following characters
+							if (offset == 0 && multiLinesBlock) {
+								if (newLineString == null) {
+									this.tempBuffer.setLength(0);
+									this.column = 1;
+									printIndentationIfNecessary(this.tempBuffer);
+									this.tempBuffer.append(BLOCK_LINE_PREFIX);
+									this.column += BLOCK_LINE_PREFIX_LENGTH;
+									indentationColumn = this.column;
+									newLineString = this.tempBuffer.toString();
+								} else {
+									this.column = indentationColumn;
+								}
+								addReplaceEdit(newLineStart, secondLineStart-1, newLineString);
+							}
+							offset++;
+						}
+					} else if (firstLineEnd < 0) {
+						// no new line yet, increment the offset
+						offset++;
+					} else if (leadingSpaces >= 0) {
+						// no star yet, increment the leading spaces
+						leadingSpaces++;
+					}
+					break;
+			}
+			previousPosition = this.scanner.currentPosition;
+		}
+		
+		// Increment the columns from the numbers of characters counted on the line
+		if (multiLinesBlock) {
+			this.column += offset;
+		} else {
+			this.column++;
+		}
+		
+		// Replace the new line with a single space when there's only one separator
+		// or, if necessary, print the indentation on the last line
+		if (!multiLinesBlock) {
+			addReplaceEdit(firstLineEnd, end, " "); //$NON-NLS-1$
+		}
+		else if (secondLineStart > 0) {
+			if (newLineString == null) {
+				this.tempBuffer.setLength(0);
+				this.column = 1;
+				printIndentationIfNecessary(this.tempBuffer);
+				this.tempBuffer.append(BLOCK_LINE_PREFIX);
+				this.column += BLOCK_LINE_PREFIX_LENGTH;
+				newLineString = this.tempBuffer.toString();
+				indentationColumn = this.column;
+			} else {
+				this.column = indentationColumn;
+			}
+			addReplaceEdit(newLineStart, secondLineStart-1, newLineString);
+		}
+		else if (leadingSpaces > 0) {
+			if (newLineString == null) {
+				this.tempBuffer.setLength(0);
+				this.column = 1;
+				printIndentationIfNecessary(this.tempBuffer);
+				this.tempBuffer.append(BLOCK_LINE_PREFIX);
+				this.column += BLOCK_LINE_PREFIX_LENGTH;
+				newLineString = this.tempBuffer.toString();
+				indentationColumn = this.column;
+			} else {
+				this.column = indentationColumn;
+			}
+			addReplaceEdit(newLineStart, newLineStart+indentationColumn-2, newLineString);
+		}
+
+		// Reset
+		this.needSpace = false;
+		this.scanner.resetTo(end+1, this.scannerEndPosition - 1);
+	}
+
 	private int printJavadocHtmlTag(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
 
 		// Compute indentation if necessary
@@ -3273,7 +3960,17 @@ public class Scribe implements IJavaDocTagConstants {
 		int nextStart = textStart;
 		int startLine = Util.getLineNumber(textStart, this.lineEnds, 0, this.maxLines);
 	    int htmlTagID = text.getHtmlTagID();
-	    StringBuffer buffer = new StringBuffer();
+	    if (text.depth >= this.javadocHtmlTagBuffers.length) {
+	    	int length = this.javadocHtmlTagBuffers.length;
+	    	System.arraycopy(this.javadocHtmlTagBuffers, 0, this.javadocHtmlTagBuffers = new StringBuffer[text.depth+6], 0, length);
+	    }
+	    StringBuffer buffer = this.javadocHtmlTagBuffers[text.depth];
+	    if (buffer == null) {
+	    	buffer = new StringBuffer();
+	    	this.javadocHtmlTagBuffers[text.depth] = buffer;
+	    } else {
+	    	buffer.setLength(0);
+	    }
 
 	    // New line will be added before next node
 	    int max = text.separatorsPtr;
@@ -3307,7 +4004,7 @@ public class Scribe implements IJavaDocTagConstants {
 				if (textStart < previousEnd) {
 					addReplaceEdit(textStart, previousEnd, buffer.toString());
 				}
-				boolean immutable = htmlTag == null ? false : htmlTag.isImmutableHtmlTag();
+				boolean immutable = node.isImmutable();
 				if (newLines == 0) {
 					newLines = printJavadocBlockNodesNewLines(block, node, previousEnd);
 				}
@@ -3316,7 +4013,7 @@ public class Scribe implements IJavaDocTagConstants {
 					printJavadocGapLines(previousEnd+1, nodeStart-1, newLines, clearBlankLines, false, null);
 				}
 				if (newLines > 0) textOnNewLine = true;
-				buffer = new StringBuffer();
+				buffer.setLength(0);
 				if (node.isText()) {
 					if (immutable) {
 						// do not change immutable tags, just increment column
@@ -3324,7 +4021,7 @@ public class Scribe implements IJavaDocTagConstants {
 					    	addInsertEdit(node.sourceStart, this.commentIndentation);
 					    	this.column += this.commentIndentation.length();
 						}
-						printJavadocHtmlImmutableTag(htmlTag, block, textOnNewLine);
+						printJavadocImmutableText(htmlTag, block, textOnNewLine);
 						this.column += getTextLength(block, htmlTag);
 						linesAfter = 0;
 					} else {
@@ -3347,7 +4044,7 @@ public class Scribe implements IJavaDocTagConstants {
 				}
 			} else {
 				if (idx > 0 && linesAfter > 0) {
-					printJavadocGapLines(previousEnd+1, nextStart, linesAfter, clearBlankLines, false, buffer);
+					printJavadocGapLines(previousEnd+1, nextStart-1, linesAfter, clearBlankLines, false, buffer);
 					textOnNewLine = true;
 				}
 				boolean needIndentation = textOnNewLine;
@@ -3393,7 +4090,6 @@ public class Scribe implements IJavaDocTagConstants {
     				if (this.formatter.preferences.comment_format_source) {
 						if (textStart < end) addReplaceEdit(textStart, end, buffer.toString());
 						// See whether there's a space before the code
-						boolean needLeadingSpace = false;
 						if (linesGap > 0) {
 							int lineStart = this.scanner.getLineStart(startLine);
 							if (nextStart > lineStart) { // if code starts at the line, then no leading space is needed
@@ -3403,19 +4099,9 @@ public class Scribe implements IJavaDocTagConstants {
 									if (token == TerminalTokens.TokenNameWHITESPACE) {
 										// skip indentation
 										token = this.scanner.getNextToken();
-										needLeadingSpace = false; // there may be no star after
-									} else {
-										needLeadingSpace = true;
 									}
 									if (token == TerminalTokens.TokenNameMULTIPLY) {
 										nextStart = this.scanner.currentPosition;
-										// skip javadoc comment star
-										token = this.scanner.getNextToken();
-										needLeadingSpace = true;
-									}
-									if (token == TerminalTokens.TokenNameWHITESPACE) {
-										needLeadingSpace = false;
-										nextStart++;
 									}
 								}
 								catch (InvalidInputException iie) {
@@ -3426,12 +4112,10 @@ public class Scribe implements IJavaDocTagConstants {
 						// Format gap lines before code
 						int newLines = linesGap;
 						if (newLines == 0) newLines=1;
+						this.needSpace = false;
 						printJavadocGapLines(end+1, nextStart-1, newLines, false/* clear first blank lines inside <pre> tag as done by old formatter */, false, null);
-						if (needLeadingSpace) {
-							addInsertEdit(nextStart, " "); //$NON-NLS-1$
-						}
 						// Format the code
-						printCodeSnippet(nextStart, codeEnd);
+						printCodeSnippet(nextStart, codeEnd, linesGap);
 						// Format the gap lines after the code
 						nextStart = (int) text.separators[max];
 	    				printJavadocGapLines(codeEnd+1, nextStart-1, 1, false/* clear blank lines inside <pre> tag as done by old formatter */, false, null);
@@ -3456,8 +4140,9 @@ public class Scribe implements IJavaDocTagConstants {
 
 		// Insert last gap
 	    boolean closingTag = isHtmlBreakTag || (text.htmlIndexes != null && (text.htmlIndexes[max] & JAVADOC_TAGS_ID_MASK) == htmlTagID);
+		boolean isValidHtmlSeparatorTag = max > 0 && isHtmlSeparatorTag && closingTag;
 		if (previousEnd != -1) {
-		    if (max > 0 && isHtmlSeparatorTag && closingTag) {
+		    if (isValidHtmlSeparatorTag) {
 				if (linesAfter == 0) linesAfter = 1;
 			}
 			if (linesAfter > 0) {
@@ -3483,10 +4168,7 @@ public class Scribe implements IJavaDocTagConstants {
 		this.scanner.resetTo(text.sourceEnd+1, this.scannerEndPosition - 1);
 
 		// Return the new lines to insert after
-	    if (max > 0 && isHtmlSeparatorTag) {
-			return 1;
-		}
-	    return 0;
+	    return isValidHtmlSeparatorTag ? 1 : 0;
     }
 
 	private void printJavadocNewLine(StringBuffer buffer) {
@@ -3497,13 +4179,13 @@ public class Scribe implements IJavaDocTagConstants {
 	    this.column += BLOCK_LINE_PREFIX_LENGTH;
 	    this.line++;
 	    this.lastNumberOfNewLines++;
-    }
+	}
 
 	private void printJavadocText(FormatJavadocText text, FormatJavadocBlock block, boolean textOnNewLine) {
 
 		boolean clearBlankLines = this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment;
 		boolean joinLines = this.formatter.preferences.join_lines_in_comments;
-		StringBuffer buffer = new StringBuffer();
+		this.javadocTextBuffer.setLength(0);
 		int textStart = text.sourceStart;
 		int nextStart = textStart;
 		int startLine = Util.getLineNumber(textStart, this.lineEnds, 0, this.maxLines);
@@ -3520,7 +4202,7 @@ public class Scribe implements IJavaDocTagConstants {
 				}
 			}
 			this.needSpace = idx > 0;
-			printJavadocTextLine(buffer, nextStart, end, block, idx==0 /*first text?*/, needIndentation, false /*not an html tag*/);
+			printJavadocTextLine(this.javadocTextBuffer, nextStart, end, block, idx==0 || (!joinLines && textOnNewLine)/*first text?*/, needIndentation, false /*not an html tag*/);
 			textOnNewLine = false;
 
 			// Replace with current buffer if there are several empty lines between text lines
@@ -3531,24 +4213,27 @@ public class Scribe implements IJavaDocTagConstants {
 				int gapLine = endLine;
 				if (joinLines) gapLine++; // if not preserving line break then gap must be at least of one line
 				if (startLine > gapLine) {
-					addReplaceEdit(textStart, end, buffer.toString());
+					addReplaceEdit(textStart, end, this.javadocTextBuffer.toString());
 					textStart = nextStart;
-					buffer.setLength(0);
+					this.javadocTextBuffer.setLength(0);
 					int newLines = startLine - endLine;
 					if (clearBlankLines) newLines = 1;
 					printJavadocGapLines(end+1, nextStart-1, newLines, this.formatter.preferences.comment_clear_blank_lines_in_javadoc_comment, false, null);
 					textOnNewLine = true;
 				}
+				else if (startLine > endLine) {
+					textOnNewLine = !joinLines;
+				}
 			}
 		}
 
 		// Replace remaining line
 		boolean needIndentation = textOnNewLine;
 		this.needSpace = text.separatorsPtr >= 0;
-		printJavadocTextLine(buffer, nextStart, text.sourceEnd, block, text.separatorsPtr==-1 /* first text?*/, needIndentation, false /*not an html tag*/);
+		printJavadocTextLine(this.javadocTextBuffer, nextStart, text.sourceEnd, block, text.separatorsPtr==-1 /* first text?*/, needIndentation, false /*not an html tag*/);
 		// TODO Bring back following optimization
 		// if (lastNewLines != this.lastNumberOfNewLines || (this.column - currentColumn) != (text.sourceEnd - text.sourceStart + 1)) {
-			addReplaceEdit(textStart, text.sourceEnd, buffer.toString());
+			addReplaceEdit(textStart, text.sourceEnd, this.javadocTextBuffer.toString());
 		// }
 
 		// Reset
@@ -3564,7 +4249,7 @@ public class Scribe implements IJavaDocTagConstants {
 		boolean headerLine = block.isHeaderLine() && this.lastNumberOfNewLines == 0;
 
 		// First we need to know what is the indentation
-		StringBuffer tokensBuffer = new StringBuffer();
+		this.javadocTokensBuffer.setLength(0);
 		int firstColumn = 1 + this.indentationLevel + BLOCK_LINE_PREFIX_LENGTH;
 		int maxColumn = this.formatter.preferences.comment_line_length + 1;
 		if (headerLine) {
@@ -3574,6 +4259,7 @@ public class Scribe implements IJavaDocTagConstants {
 		if (needIndentation && this.commentIndentation != null) {
 			buffer.append(this.commentIndentation);
 	    	this.column += this.commentIndentation.length();
+	    	firstColumn += this.commentIndentation.length();
 		}
 		if (this.column < firstColumn) {
 			this.column = firstColumn;
@@ -3595,11 +4281,11 @@ public class Scribe implements IJavaDocTagConstants {
 				} catch (InvalidInputException iie) {
 					token = consumeInvalidToken(textEnd);
 				}
-	    		int tokensBufferLength = tokensBuffer.length();
+	    		int tokensBufferLength = this.javadocTokensBuffer.length();
     			int tokenStart = this.scanner.getCurrentTokenStartPosition();
 	    		int tokenLength = (this.scanner.atEnd() ? this.scanner.eofPosition : this.scanner.currentPosition) - tokenStart;
 				boolean insertSpace = (previousToken == TerminalTokens.TokenNameWHITESPACE || this.needSpace) && !textOnNewLine;
-				String tokensBufferString = tokensBuffer.toString().trim();
+				String tokensBufferString = this.javadocTokensBuffer.toString().trim();
 				switch (token) {
 					case TerminalTokens.TokenNameWHITESPACE:
 						if (tokensBufferLength > 0) {
@@ -3611,17 +4297,18 @@ public class Scribe implements IJavaDocTagConstants {
 								this.lastNumberOfNewLines++;
 								this.line++;
 								if (newLineString == null) {
-									StringBuffer newLineBuffer = new StringBuffer(this.lineSeparator);
+									this.tempBuffer.setLength(0);
+									this.tempBuffer.append(this.lineSeparator);
 							    	this.column = 1;
-							    	printIndentationIfNecessary(newLineBuffer);
-						    		newLineBuffer.append(BLOCK_LINE_PREFIX);
+							    	printIndentationIfNecessary(this.tempBuffer);
+						    		this.tempBuffer.append(BLOCK_LINE_PREFIX);
 							    	this.column += BLOCK_LINE_PREFIX_LENGTH;
 									if (this.commentIndentation != null) {
-										newLineBuffer.append(this.commentIndentation);
+										this.tempBuffer.append(this.commentIndentation);
 								    	this.column += this.commentIndentation.length();
 									}
 						    		firstColumn = this.column;
-						    		newLineString = newLineBuffer.toString();
+						    		newLineString = this.tempBuffer.toString();
 								} else {
 									this.column = firstColumn;
 								}
@@ -3634,10 +4321,10 @@ public class Scribe implements IJavaDocTagConstants {
 									headerLine = false;
 								}
 							} else {
-								buffer.append(tokensBuffer);
+								buffer.append(this.javadocTokensBuffer);
 								this.column += tokensBufferLength;
 							}
-							tokensBuffer.setLength(0);
+							this.javadocTokensBuffer.setLength(0);
 						}
 						textOnNewLine = false;
 						previousToken = token;
@@ -3654,33 +4341,34 @@ public class Scribe implements IJavaDocTagConstants {
 	    		if (insertSpace) lastColumn++;
 				boolean shouldSplit = lastColumn > maxColumn // the max length is reached
 					&& (!isHtmlTag || previousToken == -1) // not an html tag or just at the beginning of it
-					&& token != TerminalTokens.TokenNameAT && (tokensBufferLength == 0 || tokensBuffer.charAt(tokensBufferLength-1) != '@'); // avoid to split just before a '@'
+					&& token != TerminalTokens.TokenNameAT && (tokensBufferLength == 0 || this.javadocTokensBuffer.charAt(tokensBufferLength-1) != '@'); // avoid to split just before a '@'
 				if (shouldSplit) {
 					// not enough space on the line
 					if ((tokensBufferLength > 0 || tokenLength < maxColumn) && !isHtmlTag && tokensBufferLength > 0 && (firstColumn+tokensBufferLength+tokenLength) >= maxColumn) {
 						// there won't be enough room even if we break the line before the buffered tokens
 						// So add the buffered tokens now
-						buffer.append(tokensBuffer);
+						buffer.append(this.javadocTokensBuffer);
 						this.column += tokensBufferLength;
-						tokensBuffer.setLength(0);
+						this.javadocTokensBuffer.setLength(0);
 						tokensBufferLength = 0;
 						textOnNewLine = false;
 					}
-					if ((tokensBufferLength > 0 || tokenLength < maxColumn) && (!textOnNewLine || !firstText)) {
+					if ((tokensBufferLength > 0 || /*(firstColumn+tokenLength) < maxColumn || (insertSpace &&*/ this.column > firstColumn) && (!textOnNewLine || !firstText)) {
 						this.lastNumberOfNewLines++;
 						this.line++;
 						if (newLineString == null) {
-							StringBuffer newLineBuffer = new StringBuffer(this.lineSeparator);
+							this.tempBuffer.setLength(0);
+							this.tempBuffer.append(this.lineSeparator);
 					    	this.column = 1;
-					    	printIndentationIfNecessary(newLineBuffer);
-				    		newLineBuffer.append(BLOCK_LINE_PREFIX);
+					    	printIndentationIfNecessary(this.tempBuffer);
+				    		this.tempBuffer.append(BLOCK_LINE_PREFIX);
 					    	this.column += BLOCK_LINE_PREFIX_LENGTH;
 							if (this.commentIndentation != null) {
-								newLineBuffer.append(this.commentIndentation);
+								this.tempBuffer.append(this.commentIndentation);
 						    	this.column += this.commentIndentation.length();
 							}
 				    		firstColumn = this.column;
-				    		newLineString = newLineBuffer.toString();
+				    		newLineString = this.tempBuffer.toString();
 						} else {
 							this.column = firstColumn;
 						}
@@ -3690,9 +4378,9 @@ public class Scribe implements IJavaDocTagConstants {
 			    		String tokensString = tokensBufferString;
 						buffer.append(tokensString);
 						this.column += tokensString.length();
-						tokensBuffer.setLength(0);
+						this.javadocTokensBuffer.setLength(0);
 						tokensBufferLength = 0;
-			    	}
+		    		}
 					buffer.append(this.scanner.source, tokenStart, tokenLength);
 					this.column += tokenLength;
 					textOnNewLine = false;
@@ -3704,9 +4392,9 @@ public class Scribe implements IJavaDocTagConstants {
     			} else {
 					// append token to the line
 		    		if (insertSpace) {
-		    			tokensBuffer.append(' ');
+		    			this.javadocTokensBuffer.append(' ');
 		    		}
-					tokensBuffer.append(this.scanner.source, tokenStart, tokenLength);
+					this.javadocTokensBuffer.append(this.scanner.source, tokenStart, tokenLength);
     			}
 				previousToken = token;
     			this.needSpace = false;
@@ -3719,9 +4407,9 @@ public class Scribe implements IJavaDocTagConstants {
 		finally {
 			this.scanner.skipComments = false;
 			// Add remaining buffered tokens
-			if (tokensBuffer.length() > 0) {
-				buffer.append(tokensBuffer);
-				this.column += tokensBuffer.length();
+			if (this.javadocTokensBuffer.length() > 0) {
+				buffer.append(this.javadocTokensBuffer);
+				this.column += this.javadocTokensBuffer.length();
 			}
 		}
     }
@@ -3739,6 +4427,7 @@ public class Scribe implements IJavaDocTagConstants {
 			boolean hasComment = false;
 			boolean hasModifiers = false;
 			while ((this.currentToken = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
+				int foundTaskCount = this.scanner.foundTaskCount;
 				switch(this.currentToken) {
 					case TerminalTokens.TokenNamepublic :
 					case TerminalTokens.TokenNameprotected :
@@ -3763,7 +4452,14 @@ public class Scribe implements IJavaDocTagConstants {
 						}
 						this.scanner.resetTo(this.scanner.getCurrentTokenStartPosition(), this.scannerEndPosition - 1);
 						if (annotationsIndex < annotationsLength) {
-							annotations[annotationsIndex++].traverse(visitor, (BlockScope) null);
+							boolean insertSpaceBeforeBrace = this.formatter.preferences.insert_space_before_opening_brace_in_array_initializer;
+							this.formatter.preferences.insert_space_before_opening_brace_in_array_initializer = false;
+							try {
+								annotations[annotationsIndex++].traverse(visitor, (BlockScope) null);
+							}
+							finally {
+								this.formatter.preferences.insert_space_before_opening_brace_in_array_initializer = insertSpaceBeforeBrace;
+							}
 							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=122247
 							boolean shouldAddNewLine = false;
 							switch (annotationSourceKind) {
@@ -3795,17 +4491,37 @@ public class Scribe implements IJavaDocTagConstants {
 						currentTokenStartPosition = this.scanner.currentPosition;
 						break;
 					case TerminalTokens.TokenNameCOMMENT_BLOCK :
-						printBlockComment(false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						hasComment = true;
-						break;
 					case TerminalTokens.TokenNameCOMMENT_JAVADOC :
-						printBlockComment(true);
+						if (this.useTags && this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+							if (!this.editsEnabled && this.editsIndex > 1) {
+								OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+								if (this.scanner.startPosition == currentEdit.offset+currentEdit.length) {
+									printNewLinesBeforeDisablingComment();
+								}
+							}
+						}
+						printBlockComment(this.currentToken == TerminalTokens.TokenNameCOMMENT_JAVADOC);
+						if (this.useTags && !this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+						}
 						currentTokenStartPosition = this.scanner.currentPosition;
 						hasComment = true;
 						break;
 					case TerminalTokens.TokenNameCOMMENT_LINE :
+						if (this.useTags && this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+							if (!this.editsEnabled && this.editsIndex > 1) {
+								OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+								if (this.scanner.startPosition == currentEdit.offset+currentEdit.length) {
+									printNewLinesBeforeDisablingComment();
+								}
+							}
+						}
 						printLineComment();
+						if (this.useTags && !this.editsEnabled && foundTaskCount > 0) {
+							setEditsEnabled(foundTaskCount);
+						}
 						currentTokenStartPosition = this.scanner.currentPosition;
 						break;
 					case TerminalTokens.TokenNameWHITESPACE :
@@ -3858,7 +4574,7 @@ public class Scribe implements IJavaDocTagConstants {
 			// ensure that the scribe is at the beginning of a new line
 			// only if no specific indentation has been previously set
 			if (!this.preserveLineBreakIndentation) {
-				this.column = 1;
+				this.column = 1; 
 			}
 			this.preserveLineBreakIndentation = false;
 			return;
@@ -3870,13 +4586,150 @@ public class Scribe implements IJavaDocTagConstants {
 		this.needSpace = false;
 		this.pendingSpace = false;
 		this.preserveLineBreakIndentation = false;
+		this.lastLineComment.contiguous = false;
+	}
+
+	/*
+	 * Print the indentation of a disabling comment
+	 */
+	private void printNewLinesBeforeDisablingComment() {
+
+		// Get the beginning of comment line
+		int linePtr = Arrays.binarySearch(this.lineEnds, this.scanner.startPosition);
+		if (linePtr < 0) {
+			linePtr = -linePtr - 1;
+		}
+		int indentation = 0;
+		int beginningOfLine = getLineEnd(linePtr)+1;
+		if (beginningOfLine == -1) {
+			beginningOfLine = 0;
+		}
+		
+		// If the comment is in the middle of the line, then there's nothing to do
+		OptimizedReplaceEdit currentEdit = this.edits[this.editsIndex-1];
+		int offset = currentEdit.offset;
+		if (offset >= beginningOfLine) return;
+
+		// Compute the comment indentation
+		int scannerStartPosition = this.scanner.startPosition;
+		int scannerEofPosition = this.scanner.eofPosition;
+		int scannerCurrentPosition = this.scanner.currentPosition;
+		char scannerCurrentChar = this.scanner.currentCharacter;
+		int length = currentEdit.length;
+		this.scanner.resetTo(beginningOfLine, offset+length-1);
+		try {
+			while (!this.scanner.atEnd()) {
+				char ch = (char) this.scanner.getNextChar();
+				switch (ch) {
+					case '\t' :
+						if (this.tabLength != 0) {
+							int reminder = indentation % this.tabLength;
+							if (reminder == 0) {
+								indentation += this.tabLength;
+							} else {
+								indentation = ((indentation / this.tabLength) + 1) * this.tabLength;
+							}
+						}
+						break;
+					case ' ':
+						indentation++;
+						break;
+					default:
+						// Should not happen as the offset of the edit is before the beginning of line
+						return;
+				}
+			}
+		
+			// Split the existing edit to keep the change before the beginning of the last line
+			// but change the indentation after. Note that at this stage, the add*Edit methods
+			// cannot be longer used as the edits are disabled
+			String indentationString;
+			int currentIndentation = getCurrentIndentation(this.scanner.currentPosition);
+			if (currentIndentation > 0 && this.indentationLevel > 0) {
+				int col = this.column;
+				this.tempBuffer.setLength(0);
+				printIndentationIfNecessary(this.tempBuffer);
+				indentationString = this.tempBuffer.toString();
+				this.column = col;
+			} else {
+				indentationString = Util.EMPTY_STRING;
+			}
+			String replacement = currentEdit.replacement;
+			if (replacement.length() == 0) {
+				// previous edit was a delete, as we're sure to have a new line before
+				// the comment, then the edit needs to be either replaced entirely with
+				// the expected indentation
+				this.edits[this.editsIndex-1] = new OptimizedReplaceEdit(beginningOfLine, offset+length-beginningOfLine, indentationString);
+			} else {
+				int idx = replacement.lastIndexOf(this.lineSeparator);
+				if (idx >= 0) {
+					// replace current edit if it contains a line separator
+					int start = idx + this.lsLength;
+					this.tempBuffer.setLength(0);
+					this.tempBuffer.append(replacement.substring(0, start));
+					if (indentationString != Util.EMPTY_STRING) {
+						this.tempBuffer.append(indentationString);
+					}
+					this.edits[this.editsIndex-1] = new OptimizedReplaceEdit(offset, length, this.tempBuffer.toString());
+				}
+			}
+		}
+		finally {
+			this.scanner.startPosition = scannerStartPosition;
+			this.scanner.eofPosition = scannerEofPosition;
+			this.scanner.currentPosition = scannerCurrentPosition;
+			this.scanner.currentCharacter = scannerCurrentChar;
+		}
+	}
+
+	/*
+	 * Print new lines characters when the edits are disabled. In this case, only
+	 * the line separator is replaced if necessary, the other white spaces are untouched.
+	 */
+	private boolean printNewLinesCharacters(int offset, int length) {
+		boolean foundNewLine = false;
+		int scannerStartPosition = this.scanner.startPosition;
+		int scannerEofPosition = this.scanner.eofPosition;
+		int scannerCurrentPosition = this.scanner.currentPosition;
+		char scannerCurrentChar = this.scanner.currentCharacter;
+		this.scanner.resetTo(offset, offset+length-1);
+		try {
+			while (!this.scanner.atEnd()) {
+				int start = this.scanner.currentPosition;
+				char ch = (char) this.scanner.getNextChar();
+				boolean needReplace = ch != this.firstLS;
+				switch (ch) {
+					case '\r':
+						if (this.scanner.atEnd()) break;
+						ch = (char) this.scanner.getNextChar();
+						if (ch != '\n') break;
+						needReplace = needReplace || this.lsLength != 2;
+						//$FALL-THROUGH$
+					case '\n':
+						if (needReplace) {
+							if (this.editsIndex == 0 || this.edits[this.editsIndex-1].offset != start) {
+								this.edits[this.editsIndex++] = new OptimizedReplaceEdit(start, this.scanner.currentPosition-start, this.lineSeparator);
+							}
+						}
+						foundNewLine = true;
+						break;
+				}
+			}
+		}
+		finally {
+			this.scanner.startPosition = scannerStartPosition;
+			this.scanner.eofPosition = scannerEofPosition;
+			this.scanner.currentPosition = scannerCurrentPosition;
+			this.scanner.currentCharacter = scannerCurrentChar;
+		}
+		return foundNewLine;		
 	}
 
 	public void printNextToken(int expectedTokenType){
 		printNextToken(expectedTokenType, false);
 	}
 
-	public void printNextToken(int expectedTokenType, boolean considerSpaceIfAny){
+	public void printNextToken(int expectedTokenType, boolean considerSpaceIfAny) {
 		// Set brace flag, it's useful for the scribe while preserving line breaks
 		switch (expectedTokenType) {
 			case TerminalTokens.TokenNameRBRACE:
@@ -3884,7 +4737,7 @@ public class Scribe implements IJavaDocTagConstants {
 				this.formatBrace = true;
 		}
 		try {
-			printComment(CodeFormatter.K_UNKNOWN);
+			printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
 			try {
 				this.currentToken = this.scanner.getNextToken();
 				if (expectedTokenType != this.currentToken) {
@@ -3910,7 +4763,7 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	public void printNextToken(int[] expectedTokenTypes, boolean considerSpaceIfAny){
-		printComment(CodeFormatter.K_UNKNOWN);
+		printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
 		try {
 			this.currentToken = this.scanner.getNextToken();
 			if (Arrays.binarySearch(expectedTokenTypes, this.currentToken) < 0) {
@@ -3934,7 +4787,7 @@ public class Scribe implements IJavaDocTagConstants {
 		int numberOfIdentifiers = 0;
 		try {
 			do {
-				printComment(CodeFormatter.K_UNKNOWN);
+				printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
 				switch(this.currentToken = this.scanner.getNextToken()) {
 					case TerminalTokens.TokenNameEOF :
 						return;
@@ -3980,7 +4833,7 @@ public class Scribe implements IJavaDocTagConstants {
 		int currentTokenStartPosition = this.scanner.currentPosition;
 		try {
 			do {
-				printComment(CodeFormatter.K_UNKNOWN);
+				printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
 				switch(this.currentToken = this.scanner.getNextToken()) {
 					case TerminalTokens.TokenNameEOF :
 						return;
@@ -4018,6 +4871,7 @@ public class Scribe implements IJavaDocTagConstants {
 	}
 
 	private void printRule(StringBuffer stringBuffer) {
+		// only called if this.tabLength > 0
 		for (int i = 0; i < this.pageWidth; i++){
 			if ((i % this.tabLength) == 0) {
 				stringBuffer.append('+');
@@ -4033,151 +4887,6 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 	}
 
-	public void printTrailingComment(int numberOfNewLinesToInsert) {
-		try {
-			// if we have a space between two tokens we ensure it will be dumped in the formatted string
-			int currentTokenStartPosition = this.scanner.currentPosition;
-			boolean hasWhitespaces = false;
-			boolean hasLineComment = false;
-			while ((this.currentToken = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
-				switch(this.currentToken) {
-					case TerminalTokens.TokenNameWHITESPACE :
-						int count = 0;
-						char[] whiteSpaces = this.scanner.getCurrentTokenSource();
-						for (int i = 0, max = whiteSpaces.length; i < max; i++) {
-							switch(whiteSpaces[i]) {
-								case '\r' :
-									if ((i + 1) < max) {
-										if (whiteSpaces[i + 1] == '\n') {
-											i++;
-										}
-									}
-									count++;
-									break;
-								case '\n' :
-									count++;
-							}
-						}
-						if (hasLineComment) {
-							if (count >= 1) {
-								currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
-								preserveEmptyLines(numberOfNewLinesToInsert, currentTokenStartPosition);
-								addDeleteEdit(currentTokenStartPosition, this.scanner.getCurrentTokenEndPosition());
-								this.scanner.resetTo(this.scanner.currentPosition, this.scannerEndPosition - 1);
-								return;
-							}
-							this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-							return;
-						} else if (count > 1) {
-							this.printEmptyLines(numberOfNewLinesToInsert, this.scanner.getCurrentTokenStartPosition());
-							this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-							return;
-						} else {
-							hasWhitespaces = true;
-							currentTokenStartPosition = this.scanner.currentPosition;
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						}
-						break;
-					case TerminalTokens.TokenNameCOMMENT_LINE :
-						if (hasWhitespaces) {
-							space();
-						}
-						printLineComment();
-						currentTokenStartPosition = this.scanner.currentPosition;
-						hasLineComment = true;
-						break;
-					case TerminalTokens.TokenNameCOMMENT_BLOCK :
-						if (hasWhitespaces) {
-							space();
-						}
-						printBlockComment(false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						break;
-					default :
-						// step back one token
-						this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-						return;
-				}
-			}
-		} catch (InvalidInputException e) {
-			throw new AbortFormatting(e);
-		}
-	}
-	public void printTrailingComment() {
-		try {
-			// if we have a space between two tokens we ensure it will be dumped in the formatted string
-			int currentTokenStartPosition = this.scanner.currentPosition;
-			boolean hasWhitespaces = false;
-			boolean hasComment = false;
-			boolean hasLineComment = false;
-			while ((this.currentToken = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
-				switch(this.currentToken) {
-					case TerminalTokens.TokenNameWHITESPACE :
-						int count = 0;
-						char[] whiteSpaces = this.scanner.getCurrentTokenSource();
-						for (int i = 0, max = whiteSpaces.length; i < max; i++) {
-							switch(whiteSpaces[i]) {
-								case '\r' :
-									if ((i + 1) < max) {
-										if (whiteSpaces[i + 1] == '\n') {
-											i++;
-										}
-									}
-									count++;
-									break;
-								case '\n' :
-									count++;
-							}
-						}
-						if (hasLineComment) {
-							if (count >= 1) {
-								currentTokenStartPosition = this.scanner.getCurrentTokenStartPosition();
-								preserveEmptyLines(count, currentTokenStartPosition);
-								addDeleteEdit(currentTokenStartPosition, this.scanner.getCurrentTokenEndPosition());
-								this.scanner.resetTo(this.scanner.currentPosition, this.scannerEndPosition - 1);
-								return;
-							}
-							this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-							return;
-						} else if (count >= 1) {
-							if (hasComment) {
-								this.printNewLine(this.scanner.getCurrentTokenStartPosition());
-							}
-							this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-							return;
-						} else {
-							hasWhitespaces = true;
-							currentTokenStartPosition = this.scanner.currentPosition;
-							addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						}
-						break;
-					case TerminalTokens.TokenNameCOMMENT_LINE :
-						if (hasWhitespaces) {
-							space();
-						}
-						printLineComment();
-						currentTokenStartPosition = this.scanner.currentPosition;
-						hasLineComment = true;
-						break;
-					case TerminalTokens.TokenNameCOMMENT_BLOCK :
-						if (hasWhitespaces) {
-							space();
-						}
-						printBlockComment(false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						hasComment = true;
-						break;
-					default :
-						// step back one token
-						this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-						return;
-				}
-			}
-		} catch (InvalidInputException e) {
-			throw new AbortFormatting(e);
-		}
-	}
-
 	void redoAlignment(AlignmentException e){
 		if (e.relativeDepth > 0) { // if exception targets a distinct context
 			e.relativeDepth--; // record fact that current context got traversed
@@ -4186,7 +4895,7 @@ public class Scribe implements IJavaDocTagConstants {
 		}
 		// reset scribe/scanner to restart at this given location
 		resetAt(this.currentAlignment.location);
-		this.scanner.resetTo(this.currentAlignment.location.inputOffset, this.scanner.eofPosition);
+		this.scanner.resetTo(this.currentAlignment.location.inputOffset, this.scanner.eofPosition - 1);
 		// clean alignment chunkKind so it will think it is a new chunk again
 		this.currentAlignment.chunkKind = 0;
 	}
@@ -4194,7 +4903,7 @@ public class Scribe implements IJavaDocTagConstants {
 	void redoMemberAlignment(AlignmentException e){
 		// reset scribe/scanner to restart at this given location
 		resetAt(this.memberAlignment.location);
-		this.scanner.resetTo(this.memberAlignment.location.inputOffset, this.scanner.eofPosition);
+		this.scanner.resetTo(this.memberAlignment.location.inputOffset, this.scanner.eofPosition - 1);
 		// clean alignment chunkKind so it will think it is a new chunk again
 		this.memberAlignment.chunkKind = 0;
 	}
@@ -4223,10 +4932,62 @@ public class Scribe implements IJavaDocTagConstants {
 		this.formatter.lastLocalDeclarationSourceStart = location.lastLocalDeclarationSourceStart;
 	}
 
+	/**
+	 * @param compilationUnitSource
+	 */
+	public void resetScanner(char[] compilationUnitSource) {
+		this.scanner.setSource(compilationUnitSource);
+		this.scannerEndPosition = compilationUnitSource.length;
+		this.scanner.resetTo(0, this.scannerEndPosition - 1);
+		this.edits = new OptimizedReplaceEdit[INITIAL_SIZE];
+		this.maxLines = this.lineEnds == null ? -1 : this.lineEnds.length - 1;
+		this.scanner.lineEnds = this.lineEnds;
+		this.scanner.linePtr = this.maxLines;
+		initFormatterCommentParser();
+	}
+
 	private void resize() {
 		System.arraycopy(this.edits, 0, (this.edits = new OptimizedReplaceEdit[this.editsIndex * 2]), 0, this.editsIndex);
 	}
 
+	private void setCommentIndentation(int commentIndentationLevel) {
+		if (commentIndentationLevel == 0) {
+		    this.commentIndentation = null;
+		} else {
+			int length = COMMENT_INDENTATIONS.length;
+			if (commentIndentationLevel > length) {
+				System.arraycopy(COMMENT_INDENTATIONS, 0, COMMENT_INDENTATIONS = new String[commentIndentationLevel+10], 0, length);
+			}
+			this.commentIndentation = COMMENT_INDENTATIONS[commentIndentationLevel-1];
+			if (this.commentIndentation == null) {
+				this.tempBuffer.setLength(0);
+				for (int i=0; i<commentIndentationLevel; i++) {
+					this.tempBuffer.append(' ');
+				}
+				this.commentIndentation = this.tempBuffer.toString();
+				COMMENT_INDENTATIONS[commentIndentationLevel-1] = this.commentIndentation;
+			}
+		}
+	}
+
+	/*
+	 * Look for the tags identified by the scanner to see whether some of them
+	 * may change the status of the edition for the formatter.
+	 * Do not return as soon as a match is found, as there may have several
+	 * disabling/enabling tags in a comment, hence the last one will be the one really
+	 * changing the formatter behavior...
+	 */
+	private void setEditsEnabled(int count) {
+		for (int i=0; i<count; i++) {
+			if (this.disablingTag != null && CharOperation.equals(this.scanner.foundTaskTags[i], this.disablingTag)) {
+				this.editsEnabled = false;
+			}
+			if (this.enablingTag != null && CharOperation.equals(this.scanner.foundTaskTags[i], this.enablingTag)) {
+				this.editsEnabled = true;
+			}
+		}
+	}
+
 	void setIncludeComments(boolean on) {
 		if (on) {
 			this.formatComments |= CodeFormatter.F_INCLUDE_COMMENTS;
@@ -4270,7 +5031,7 @@ public class Scribe implements IJavaDocTagConstants {
 			.append(this.lineSeparator)
 			.append("==================================================================================")	//$NON-NLS-1$
 			.append(this.lineSeparator);
-		if (this.tabLength >= 0) {
+		if (this.tabLength > 0) {
 			printRule(stringBuffer);
 		}
 		return stringBuffer.toString();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/align/Alignment.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/align/Alignment.java
index 7893530..40ab51b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/align/Alignment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/align/Alignment.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter.align;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.jdt.internal.formatter.Location;
 import org.eclipse.jdt.internal.formatter.Scribe;
 
@@ -20,8 +21,62 @@ import org.eclipse.jdt.internal.formatter.Scribe;
  */
 public class Alignment {
 
+	// Kind of alignment
+	public int kind;
+	public static final int ALLOCATION = 1;
+	public static final int ANNOTATION_MEMBERS_VALUE_PAIRS = 2;
+	public static final int ARRAY_INITIALIZER = 3;
+	public static final int ASSIGNMENT = 4;
+	public static final int BINARY_EXPRESSION = 5;
+	public static final int CASCADING_MESSAGE_SEND = 6;
+	public static final int COMPACT_IF = 7;
+	public static final int COMPOUND_ASSIGNMENT = 8;
+	public static final int CONDITIONAL_EXPRESSION = 9;
+	public static final int ENUM_CONSTANTS = 10;
+	public static final int ENUM_CONSTANTS_ARGUMENTS = 11;
+	public static final int EXPLICIT_CONSTRUCTOR_CALL = 12;
+	public static final int FIELD_DECLARATION_ASSIGNMENT = 13;
+	public static final int LOCAL_DECLARATION_ASSIGNMENT = 14;
+	public static final int MESSAGE_ARGUMENTS = 15;
+	public static final int MESSAGE_SEND = 16;
+	public static final int METHOD_ARGUMENTS = 17;
+	public static final int METHOD_DECLARATION = 18;
+	public static final int MULTIPLE_FIELD = 19;
+	public static final int SUPER_CLASS = 20;
+	public static final int SUPER_INTERFACES = 21;
+	public static final int THROWS = 22;
+	public static final int TYPE_MEMBERS = 23;
+	public static final int STRING_CONCATENATION = 24;
+
 	// name of alignment
 	public String name;
+	public static final String[] NAMES = {
+		"", //$NON-NLS-1$
+		"allocation", //$NON-NLS-1$
+		"annotationMemberValuePairs", //$NON-NLS-1$
+		"array_initializer", //$NON-NLS-1$
+		"assignmentAlignment", //$NON-NLS-1$
+		"binaryExpressionAlignment", //$NON-NLS-1$
+		"cascadingMessageSendAlignment", //$NON-NLS-1$
+		"compactIf", //$NON-NLS-1$
+		"compoundAssignmentAlignment", //$NON-NLS-1$
+		"conditionalExpression", //$NON-NLS-1$
+		"enumConstants", //$NON-NLS-1$
+		"enumConstantArguments", //$NON-NLS-1$
+		"explicit_constructor_call", //$NON-NLS-1$
+		"fieldDeclarationAssignmentAlignment", //$NON-NLS-1$
+		"localDeclarationAssignmentAlignment", //$NON-NLS-1$
+		"messageArguments", //$NON-NLS-1$
+		"messageAlignment", //$NON-NLS-1$
+		"methodArguments", //$NON-NLS-1$
+		"methodDeclaration", //$NON-NLS-1$
+		"multiple_field", //$NON-NLS-1$
+		"superclass", //$NON-NLS-1$
+		"superInterfaces", //$NON-NLS-1$
+		"throws", //$NON-NLS-1$
+		"typeMembers", //$NON-NLS-1$
+		"stringConcatenation", //$NON-NLS-1$
+	};
 
 	// link to enclosing alignment
 	public Alignment enclosing;
@@ -45,9 +100,14 @@ public class Alignment {
 	public int shiftBreakIndentationLevel;
 	public int[] fragmentBreaks;
 	public boolean wasSplit;
+	public boolean blockAlign = false;
+	public boolean tooLong = false;
 
 	public Scribe scribe;
 
+	// reset
+	private boolean reset = false;
+
 	/*
 	 * Alignment modes
 	 */
@@ -120,6 +180,7 @@ public class Alignment {
 	public static final int R_OUTERMOST = 1;
 	public static final int R_INNERMOST = 2;
 	public int tieBreakRule;
+	public int startingColumn = -1;
 
 	// alignment effects on a per fragment basis
 	public static final int NONE = 0;
@@ -132,9 +193,11 @@ public class Alignment {
 	public static final int CHUNK_ENUM = 4;
 
 	// location to align and break on.
-	public Alignment(String name, int mode, int tieBreakRule, Scribe scribe, int fragmentCount, int sourceRestart, int continuationIndent){
+	public Alignment(int kind, int mode, int tieBreakRule, Scribe scribe, int fragmentCount, int sourceRestart, int continuationIndent){
 
-		this.name = name;
+		Assert.isTrue(kind >=ALLOCATION && kind <=STRING_CONCATENATION);
+		this.kind = kind;
+		this.name = NAMES[kind];
 		this.location = new Location(scribe, sourceRestart);
 		this.mode = mode;
 		this.tieBreakRule = tieBreakRule;
@@ -173,9 +236,9 @@ public class Alignment {
 		}
 	}
 
-	public boolean checkChunkStart(int kind, int startIndex, int sourceRestart) {
-		if (this.chunkKind != kind) {
-			this.chunkKind = kind;
+	public boolean checkChunkStart(int chunk, int startIndex, int sourceRestart) {
+		if (this.chunkKind != chunk) {
+			this.chunkKind = chunk;
 
 			// when redoing same chunk alignment, must not reset
 			if (startIndex != this.chunkStartIndex) {
@@ -231,6 +294,61 @@ public class Alignment {
 		}
 		return depth;
 	}
+	
+	/**
+	 * Returns whether the alignment can be aligned or not.
+	 * Only used for message send alignment, it currently blocks its alignment
+	 * when it's at the first nesting level of a message send. It allow to save
+	 * space on the argument broken line by reducing the number of indentations.
+	 */
+	public boolean canAlign() {
+		if (this.tooLong) {
+			return true;
+		}
+		boolean canAlign = true;
+		Alignment enclosingAlignment = this.enclosing;
+		while (enclosingAlignment != null) {
+			switch (enclosingAlignment.kind) {
+				case Alignment.ALLOCATION:
+				case Alignment.MESSAGE_ARGUMENTS:
+					// message send inside arguments, avoid to align
+					if (enclosingAlignment.isWrapped() && 
+							(enclosingAlignment.fragmentIndex > 0 || enclosingAlignment.fragmentCount < 2)) {
+						return !this.blockAlign;
+					}
+					if (enclosingAlignment.tooLong) {
+						return true;
+					}
+					canAlign = false;
+					break;
+				case Alignment.MESSAGE_SEND:
+					// multiple depth of message send, hence allow current to align
+					switch (this.kind) {
+						case Alignment.ALLOCATION:
+						case Alignment.MESSAGE_ARGUMENTS:
+						case Alignment.MESSAGE_SEND:
+							Alignment superEnclosingAlignment = enclosingAlignment.enclosing;
+							while (superEnclosingAlignment != null) {
+								switch (superEnclosingAlignment.kind) {
+									case Alignment.ALLOCATION:
+									case Alignment.MESSAGE_ARGUMENTS:
+									case Alignment.MESSAGE_SEND:
+										// block the alignment of the intermediate message send
+										if (this.scribe.nlsTagCounter == 0) {
+											enclosingAlignment.blockAlign = true;
+										}
+										return !this.blockAlign;
+								}
+								superEnclosingAlignment = superEnclosingAlignment.enclosing;
+							}
+							break;
+					}
+					return !this.blockAlign;
+			}
+			enclosingAlignment = enclosingAlignment.enclosing;
+		}
+		return canAlign && !this.blockAlign;
+	}
 
 	public boolean couldBreak(){
 		int i;
@@ -328,12 +446,17 @@ public class Alignment {
 		return false; // cannot split better
 	}
 
-	public Alignment getAlignment(String targetName) {
-
-		if (targetName.equals(this.name)) return this;
-		if (this.enclosing == null) return null;
+	public boolean isWrapped() {
+		return this.fragmentBreaks[this.fragmentIndex] == BREAK;
+	}
 
-		return this.enclosing.getAlignment(targetName);
+	public int wrappedIndex() {
+		for (int i = 0, max = this.fragmentCount; i < max; i++) {
+			if (this.fragmentBreaks[i] == BREAK) {
+				return i;
+			}
+		}
+		return -1;
 	}
 
 	// perform alignment effect for current fragment
@@ -351,17 +474,21 @@ public class Alignment {
 			}
 		}
 
-		if (this.fragmentBreaks[this.fragmentIndex] == BREAK) {
-			this.scribe.printNewLine();
-		}
-		if (this.fragmentIndentations[this.fragmentIndex] > 0) {
-			this.scribe.indentationLevel = this.fragmentIndentations[this.fragmentIndex];
+		int fragmentIndentation = this.fragmentIndentations[this.fragmentIndex];
+		if (this.startingColumn < 0 || (fragmentIndentation+1) < this.startingColumn) {
+			if (this.fragmentBreaks[this.fragmentIndex] == BREAK) {
+				this.scribe.printNewLine();
+			}
+			if (fragmentIndentation > 0) {
+				this.scribe.indentationLevel = fragmentIndentation;
+			}
 		}
 	}
 
 	// reset fragment indentation/break status
 	public void reset() {
 
+		this.wasSplit = false;
 		if (this.fragmentCount > 0){
 			this.fragmentIndentations = new int[this.fragmentCount];
 			this.fragmentBreaks = new int[this.fragmentCount];
@@ -371,6 +498,7 @@ public class Alignment {
 		if ((this.mode & M_FORCE) != 0) {
 			couldBreak();
 		}
+		this.reset = true;
 	}
 
 	public void toFragmentsString(StringBuffer buffer){
@@ -383,20 +511,24 @@ public class Alignment {
 	}
 
 	public String toString(StringBuffer buffer, int level) {
-
+		
 		// Compute the indentation at the given level
 		StringBuffer indentation = new StringBuffer();
 		for (int i=0; i<level; i++) {
 			indentation.append('\t');
 		}
-
+		
 		// First line is for class and name
 		buffer.append(indentation);
 		buffer
+			.append("<kind: ")	//$NON-NLS-1$
+			.append(this.kind)
+			.append("> ");	//$NON-NLS-1$
+		buffer
 			.append("<name: ")	//$NON-NLS-1$
 			.append(this.name)
 			.append(">\n");	//$NON-NLS-1$
-
+		
 		// Line for depth and break indentation
 		buffer.append(indentation);
 		buffer
@@ -435,7 +567,7 @@ public class Alignment {
 		buffer
 			.append(indentation)
 			.append(">\n"); //$NON-NLS-1$
-
+		
 		// Display enclosing
 		if (this.enclosing != null && level >= 0) {
 			buffer
@@ -446,7 +578,7 @@ public class Alignment {
 				.append(indentation)
 				.append(">\n"); //$NON-NLS-1$
 		}
-
+		
 		// Return the result
 		return buffer.toString();
 	}
@@ -459,12 +591,7 @@ public class Alignment {
 		}
 	}
 
-	public boolean isWrapped() {
-		for (int i = 0, max = this.fragmentCount; i < max; i++) {
-			if (this.fragmentBreaks[i] == BREAK) {
-				return true;
-			}
-		}
-		return false;
+	public boolean wasReset() {
+		return this.reset;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentLine.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentLine.java
deleted file mode 100644
index 0b83394..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentLine.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.util.LinkedList;
-
-import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
-
-/**
- * General comment line in a comment region.
- *
- * @since 3.0
- */
-public abstract class CommentLine implements IBorderAttributes {
-
-	/** Prefix of non-formattable comment lines */
-	protected static final String NON_FORMAT_START_PREFIX= "/*-"; //$NON-NLS-1$
-
-	/** The attributes of this line */
-	private int fAttributes= 0;
-
-	/** The parent region of this line */
-	private final CommentRegion fParent;
-
-	/** The comment ranges in this line */
-	private final LinkedList fRanges= new LinkedList();
-
-	/**
-	 * Creates a new comment line.
-	 *
-	 * @param parent comment region to create the comment line for
-	 */
-	protected CommentLine(final CommentRegion parent) {
-		this.fParent= parent;
-	}
-
-	/**
-	 * Adapts the line attributes from the previous line in the comment
-	 * region.
-	 *
-	 * @param previous the previous comment line in the comment region
-	 */
-	protected abstract void adapt(final CommentLine previous);
-
-	/**
-	 * Appends the specified comment range to this comment line.
-	 *
-	 * @param range comment range to append to this line
-	 */
-	protected void append(final CommentRange range) {
-		this.fRanges.add(range);
-	}
-
-	/**
-	 * Formats this comment line as content line.
-	 *
-	 * @param predecessor the predecessor comment line in the comment region
-	 * @param last the most recently processed comment range
-	 * @param indentation the indentation of the comment region
-	 * @param line the index of this comment line in the comment region
-	 * @return the first comment range in this comment line
-	 */
-	protected CommentRange formatLine(final CommentLine predecessor, final CommentRange last, final String indentation, final int line) {
-
-		int offset= 0;
-		int length= 0;
-
-		CommentRange next= last;
-		CommentRange previous= null;
-
-		final int stop= this.fRanges.size() - 1;
-		final int end= this.fParent.getSize() - 1;
-
-		for (int index= stop; index >= 0; index--) {
-
-			previous= next;
-			next= (CommentRange)this.fRanges.get(index);
-
-			if (this.fParent.canFormat(previous, next)) {
-
-				offset= next.getOffset() + next.getLength();
-				length= previous.getOffset() - offset;
-
-				if (index == stop && line != end)
-					this.fParent.logEdit(this.fParent.getDelimiter(predecessor, this, previous, next, indentation), offset, length);
-				else
-					this.fParent.logEdit(this.fParent.getDelimiter(previous, next), offset, length);
-			}
-		}
-		return next;
-	}
-
-	/**
-	 * Formats this comment line as end line having a lower border
-	 * consisting of content line prefixes.
-	 *
-	 * @param range last comment range of the last comment line in the
-	 *                comment region
-	 * @param indentation the indentation of the comment region
-	 * @param length the maximal length of text in this comment region
-	 *                measured in average character widths
-	 */
-	protected void formatLowerBorder(final CommentRange range, final String indentation, final int length) {
-
-		final int offset= range.getOffset() + range.getLength();
-
-		final StringBuffer buffer= new StringBuffer(length);
-		final String end= getEndingPrefix();
-		final String delimiter= this.fParent.getDelimiter();
-
-		if (this.fParent.isSingleLine() && this.fParent.getSize() == 1)
-			buffer.append(end);
-		else {
-
-			final String filler= getContentPrefix().trim();
-
-			buffer.append(delimiter);
-			buffer.append(indentation);
-
-			if (this.fParent.hasBorder(BORDER_LOWER)) {
-
-				buffer.append(' ');
-				for (int character= 0; character < length; character++)
-					buffer.append(filler);
-
-				buffer.append(end.trim());
-
-			} else
-				buffer.append(end);
-		}
-		this.fParent.logEdit(buffer.toString(), offset, this.fParent.getLength() - offset);
-	}
-
-	/**
-	 * Formats this comment line as start line having an upper border
-	 * consisting of content line prefixes.
-	 *
-	 * @param range the first comment range in the comment region
-	 * @param indentation the indentation of the comment region
-	 * @param length the maximal length of text in this comment region
-	 *                measured in average character widths
-	 */
-	protected void formatUpperBorder(final CommentRange range, final String indentation, final int length) {
-
-		final StringBuffer buffer= new StringBuffer(length);
-		final String start= getStartingPrefix();
-		final String content= getContentPrefix();
-
-		if (this.fParent.isSingleLine() && this.fParent.getSize() == 1)
-			buffer.append(start);
-		else {
-
-			final String trimmed= start.trim();
-			final String filler= content.trim();
-
-			buffer.append(trimmed);
-
-			if (this.fParent.hasBorder(BORDER_UPPER)) {
-
-				for (int character= 0; character < length - trimmed.length() + start.length(); character++)
-					buffer.append(filler);
-			}
-
-			buffer.append(this.fParent.getDelimiter());
-			buffer.append(indentation);
-			buffer.append(content);
-		}
-		this.fParent.logEdit(buffer.toString(), 0, range.getOffset());
-	}
-
-	/**
-	 * Returns the line prefix of content lines.
-	 *
-	 * @return line prefix of content lines
-	 */
-	protected abstract String getContentPrefix();
-
-	/**
-	 * Returns the line prefix of end lines.
-	 *
-	 * @return line prefix of end lines
-	 */
-	protected abstract String getEndingPrefix();
-
-	/**
-	 * Returns the first comment range in this comment line.
-	 *
-	 * @return the first comment range
-	 */
-	protected final CommentRange getFirst() {
-		return (CommentRange)this.fRanges.getFirst();
-	}
-
-	/**
-	 * Returns the indentation reference string for this line.
-	 *
-	 * @return the indentation reference string for this line
-	 */
-	protected String getIndentationReference() {
-		return ""; //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the last comment range in this comment line.
-	 *
-	 * @return the last comment range
-	 */
-	protected final CommentRange getLast() {
-		return (CommentRange)this.fRanges.getLast();
-	}
-
-	/**
-	 * Returns the parent comment region of this comment line.
-	 *
-	 * @return the parent comment region
-	 */
-	protected final CommentRegion getParent() {
-		return this.fParent;
-	}
-
-	/**
-	 * Returns the number of comment ranges in this comment line.
-	 *
-	 * @return the number of ranges in this line
-	 */
-	protected final int getSize() {
-		return this.fRanges.size();
-	}
-
-	/**
-	 * Returns the line prefix of start lines.
-	 *
-	 * @return line prefix of start lines
-	 */
-	protected abstract String getStartingPrefix();
-
-	/**
-	 * Is the attribute <code>attribute</code> true?
-	 *
-	 * @param attribute the attribute to get.
-	 * @return <code>true</code> iff this attribute is <code>true</code>,
-	 *         <code>false</code> otherwise.
-	 */
-	protected final boolean hasAttribute(final int attribute) {
-		return (this.fAttributes & attribute) == attribute;
-	}
-
-	/**
-	 * Scans this comment line for comment range boundaries.
-	 *
-	 * @param line the index of this line in the comment region
-	 */
-	protected abstract void scanLine(final int line);
-
-	/**
-	 * Set the attribute <code>attribute</code> to true.
-	 *
-	 * @param attribute the attribute to set.
-	 */
-	protected final void setAttribute(final int attribute) {
-		this.fAttributes |= attribute;
-	}
-
-	/**
-	 * Tokenizes this comment line into comment ranges
-	 *
-	 * @param line the index of this line in the comment region
-	 */
-	protected void tokenizeLine(final int line) {
-
-		int offset= 0;
-		int index= offset;
-
-		final CommentRange range= (CommentRange)this.fRanges.get(0);
-		final int begin= range.getOffset();
-
-		final String content= this.fParent.getText(begin, range.getLength());
-		final int length= content.length();
-
-		while (offset < length) {
-
-			while (offset < length && ScannerHelper.isWhitespace(content.charAt(offset)))
-				offset++;
-
-			index= offset;
-
-			while (index < length && !ScannerHelper.isWhitespace(content.charAt(index)))
-				index++;
-
-			if (index - offset > 0) {
-				this.fParent.append(new CommentRange(begin + offset, index - offset));
-
-				offset= index;
-			}
-		}
-	}
-
-	public String toString() {
-		final StringBuffer buffer = new StringBuffer();
-		final int size = this.fRanges.size();
-		for (int i = 0; i < size; i++) {
-			buffer.append(this.fRanges.get(i)).append("\n"); //$NON-NLS-1$
-		}
-		return String.valueOf(buffer);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRange.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRange.java
deleted file mode 100644
index f523659..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRange.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jface.text.Position;
-
-/**
- * Range in a comment region in comment region coordinates.
- *
- * @since 3.0
- */
-public class CommentRange extends Position implements ICommentAttributes, IHtmlTagDelimiters {
-
-	/** The attributes of this range */
-	private int fAttributes= 0;
-
-	/**
-	 * Creates a new comment range.
-	 *
-	 * @param position offset of the range
-	 * @param count length of the range
-	 */
-	public CommentRange(final int position, final int count) {
-		super(position, count);
-	}
-
-	/**
-	 * Is the attribute <code>attribute</code> true?
-	 *
-	 * @param attribute the attribute to get
-	 * @return <code>true</code> iff this attribute is <code>true</code>,
-	 *         <code>false</code> otherwise
-	 */
-	protected final boolean hasAttribute(final int attribute) {
-		return (this.fAttributes & attribute) == attribute;
-	}
-
-	/**
-	 * Does this comment range contain a closing HTML tag?
-	 *
-	 * @param token token belonging to the comment range
-	 * @param tag the HTML tag to check
-	 * @return <code>true</code> iff this comment range contains a closing
-	 *         html tag, <code>false</code> otherwise
-	 */
-	protected final boolean isClosingTag(final char[] token, final char[] tag) {
-
-		boolean result= (CharOperation.indexOf(HTML_CLOSE_PREFIX, token, false) == 0)
-				&& token[token.length - 1] == HTML_TAG_POSTFIX;
-		if (result) {
-
-			setAttribute(COMMENT_CLOSE);
-			result= CharOperation.equals(tag, token, HTML_CLOSE_PREFIX.length, token.length - 1, false);
-		}
-		return result;
-	}
-
-	/**
-	 * Does this comment range contain an opening HTML tag?
-	 *
-	 * @param token token belonging to the comment range
-	 * @param tag the HTML tag to check
-	 * @return <code>true</code> iff this comment range contains an
-	 *         opening html tag, <code>false</code> otherwise
-	 */
-	protected final boolean isOpeningTag(final char[] token, final char[] tag) {
-
-		boolean result= token.length > 0
-				&& token[0] == HTML_TAG_PREFIX
-				&& (CharOperation.indexOf(HTML_CLOSE_PREFIX, token, false) != 0)
-				&& token[token.length - 1] == HTML_TAG_POSTFIX;
-		if (result) {
-
-			setAttribute(COMMENT_OPEN);
-			result= CharOperation.indexOf(tag, token, false) == 1;
-		}
-		return result;
-	}
-
-	/**
-	 * Mark the comment range with the occurred HTML tags.
-	 *
-	 * @param tags the HTML tags to test for their occurrence
-	 * @param token token belonging to the comment range
-	 * @param attribute attribute to set if a HTML tag is present
-	 * @param open <code>true</code> iff opening tags should be marked,
-	 *                <code>false</code> otherwise
-	 * @param close <code>true</code> iff closing tags should be marked,
-	 *                <code>false</code> otherwise
-	 */
-	protected final void markHtmlTag(final char[][] tags, final char[] token, final int attribute, final boolean open, final boolean close) {
-		if (token[0] == HTML_TAG_PREFIX && token[token.length - 1] == HTML_TAG_POSTFIX) {
-
-			char[] tag= null;
-			boolean isOpen= false;
-			boolean isClose= false;
-
-			for (int index= 0; index < tags.length; index++) {
-
-				tag= tags[index];
-
-				isOpen= isOpeningTag(token, tag);
-				isClose= isClosingTag(token, tag);
-
-				if ((open && isOpen) || (close && isClose)) {
-
-					setAttribute(attribute);
-					break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Mark the comment range with the occurred tags.
-	 *
-	 * @param tags the tags to test for their occurrence
-	 * @param prefix the prefix which is common to all the tags to test
-	 * @param token the token belonging to the comment range
-	 * @param attribute attribute to set if a tag is present
-	 */
-	protected final void markPrefixTag(final char[][] tags, final char prefix, final char[] token, final int attribute) {
-
-		if (token[0] == prefix) {
-
-			char[] tag= null;
-			for (int index= 0; index < tags.length; index++) {
-
-				tag= tags[index];
-				if (CharOperation.equals(token, tag)) {
-
-					setAttribute(attribute);
-					break;
-				}
-			}
-		}
-	}
-
-	/**
-	 * Marks the comment range with the HTML range tag.
-	 *
-	 * @param token the token belonging to the comment range
-	 * @param tag the HTML tag which confines the HTML range
-	 * @param level the nesting level of the current HTML range
-	 * @param key the key of the attribute to set if the comment range is in
-	 *                the HTML range
-	 * @param html <code>true</code> iff the HTML tags in this HTML range
-	 *                should be marked too, <code>false</code> otherwise
-	 * @return the new nesting level of the HTML range
-	 */
-	protected final int markTagRange(final char[] token, final char[] tag, int level, final int key, final boolean html) {
-
-		if (isOpeningTag(token, tag)) {
-			if (level++ > 0)
-				setAttribute(key);
-		} else if (isClosingTag(token, tag)) {
-			if (--level > 0)
-				setAttribute(key);
-		} else if (level > 0) {
-			if (html || !hasAttribute(COMMENT_HTML))
-				setAttribute(key);
-		}
-		return level;
-	}
-
-	/**
-	 * Moves this comment range.
-	 *
-	 * @param delta the delta to move the range
-	 */
-	public final void move(final int delta) {
-		this.offset += delta;
-	}
-
-	/**
-	 * Set the attribute <code>attribute</code> to true.
-	 *
-	 * @param attribute the attribute to set.
-	 */
-	protected final void setAttribute(final int attribute) {
-		this.fAttributes |= attribute;
-	}
-
-	/**
-	 * Trims this comment range at the beginning.
-	 *
-	 * @param delta amount to trim the range
-	 */
-	public final void trimBegin(final int delta) {
-		this.offset += delta;
-		this.length -= delta;
-	}
-
-	/**
-	 * Trims this comment range at the end.
-	 *
-	 * @param delta amount to trim the range
-	 */
-	public final void trimEnd(final int delta) {
-		this.length += delta;
-	}
-
-	/*
-	 * @see java.lang.Object#toString()
-	 * @since 3.1
-	 */
-	public String toString() {
-		List attributes= new ArrayList();
-		if (hasAttribute(COMMENT_BLANKLINE))
-			attributes.add("COMMENT_BLANKLINE"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_BREAK))
-			attributes.add("COMMENT_BREAK"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_CLOSE))
-			attributes.add("COMMENT_CLOSE"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_CODE))
-			attributes.add("COMMENT_CODE"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_HTML))
-			attributes.add("COMMENT_HTML"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_IMMUTABLE))
-			attributes.add("COMMENT_IMMUTABLE"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_NEWLINE))
-			attributes.add("COMMENT_NEWLINE"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_OPEN))
-			attributes.add("COMMENT_OPEN"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_PARAGRAPH))
-			attributes.add("COMMENT_PARAGRAPH"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_PARAMETER))
-			attributes.add("COMMENT_PARAMETER"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_ROOT))
-			attributes.add("COMMENT_ROOT"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_SEPARATOR))
-			attributes.add("COMMENT_SEPARATOR"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_FIRST_TOKEN))
-			attributes.add("COMMENT_FIRST_TOKEN"); //$NON-NLS-1$
-		if (hasAttribute(COMMENT_STARTS_WITH_RANGE_DELIMITER))
-			attributes.add("COMMENT_STARTS_WITH_RANGE_DELIMITER"); //$NON-NLS-1$
-
-		StringBuffer buf= new StringBuffer("CommentRange [" + this.offset + "+" + this.length + "] {"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		for (Iterator it= attributes.iterator(); it.hasNext();) {
-			String string= (String) it.next();
-			buf.append(string);
-			if (it.hasNext())
-				buf.append(", "); //$NON-NLS-1$
-		}
-
-		return buf.toString() + "}"; //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRegion.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRegion.java
deleted file mode 100644
index 33a267e..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/CommentRegion.java
+++ /dev/null
@@ -1,576 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.TextEdit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ILineTracker;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-
-import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
-import org.eclipse.jdt.internal.formatter.CodeFormatterVisitor;
-import org.eclipse.jdt.internal.formatter.DefaultCodeFormatterOptions;
-import org.eclipse.jdt.internal.formatter.Scribe;
-
-/**
- * Comment region in a source code document.
- *
- * @since 3.0
- */
-public class CommentRegion extends Position implements IHtmlTagDelimiters, IBorderAttributes, ICommentAttributes {
-
-	/** Default comment range delimiter */
-	protected static final String COMMENT_RANGE_DELIMITER= " "; //$NON-NLS-1$
-
-	/** Default line prefix length */
-	private static final int COMMENT_PREFIX_LENGTH= 3;
-
-	/** The borders of this region */
-	private int fBorders= 0;
-
-	/** Should all blank lines be cleared during formatting? */
-	protected boolean fClear;
-
-	/** The line delimiter used in this comment region */
-	private final String fDelimiter;
-
-	/** The document to format */
-	private final IDocument fDocument;
-
-	/** The lines in this comment region */
-	private final LinkedList fLines= new LinkedList();
-
-	/** The formatting preferences */
-	protected final DefaultCodeFormatterOptions preferences;
-
-	/** The comment ranges in this comment region */
-	private final LinkedList fRanges= new LinkedList();
-
-	/** Is this comment region a single line region? */
-	private final boolean fSingleLine;
-
-	/** Number of spaces representing tabulator */
-	private int fTabSize;
-
-	/** the scribe used to create edits */
-	protected Scribe scribe;
-
-	/**
-	 * Creates a new comment region.
-	 *
-	 * @param document the document which contains the comment region
-	 * @param position the position of this comment region in the document
-	 * @param formatter the given code formatter
-	 */
-	public CommentRegion(final IDocument document, final Position position, final CodeFormatterVisitor formatter) {
-		super(position.getOffset(), position.getLength());
-
-		this.preferences = formatter.preferences;
-		this.fDelimiter = this.preferences.line_separator;
-		this.fDocument= document;
-
-		this.fTabSize= DefaultCodeFormatterOptions.SPACE == this.preferences.tab_char ? this.preferences.indentation_size : this.preferences.tab_size;
-
-		this.scribe = formatter.scribe;
-
-		final ILineTracker tracker= new DefaultLineTracker();
-
-		IRegion range= null;
-		CommentLine line= null;
-
-		tracker.set(getText(0, getLength()));
-		final int lines= tracker.getNumberOfLines();
-
-		this.fSingleLine= lines == 1;
-
-		try {
-
-			for (int index= 0; index < lines; index++) {
-
-				range= tracker.getLineInformation(index);
-				line= createLine();
-				line.append(new CommentRange(range.getOffset(), range.getLength()));
-
-				this.fLines.add(line);
-			}
-
-		} catch (BadLocationException exception) {
-			// Should not happen
-		}
-	}
-
-	/**
-	 * Appends the comment range to this comment region.
-	 *
-	 * @param range comment range to append to this comment region
-	 */
-	protected final void append(final CommentRange range) {
-		this.fRanges.addLast(range);
-	}
-
-	/**
-	 * Can the comment range be appended to the comment line?
-	 *
-	 * @param line comment line where to append the comment range
-	 * @param previous comment range which is the predecessor of the current
-	 *                comment range
-	 * @param next comment range to test whether it can be appended to the
-	 *                comment line
-	 * @param index amount of space in the comment line used by already
-	 *                inserted comment ranges
-	 * @param width the maximal width of text in this comment region
-	 *                measured in average character widths
-	 * @return <code>true</code> iff the comment range can be added to the
-	 *         line, <code>false</code> otherwise
-	 */
-	protected boolean canAppend(final CommentLine line, final CommentRange previous, final CommentRange next, final int index, final int width) {
-		return index == 0 || index + next.getLength() <= width;
-	}
-
-	/**
-	 * Can the whitespace between the two comment ranges be formatted?
-	 *
-	 * @param previous previous comment range which was already formatted,
-	 *                can be <code>null</code>
-	 * @param next next comment range to be formatted
-	 * @return <code>true</code> iff the next comment range can be
-	 *         formatted, <code>false</code> otherwise.
-	 */
-	protected boolean canFormat(final CommentRange previous, final CommentRange next) {
-		return previous != null;
-	}
-
-	/**
-	 * Formats the comment region with the given indentation level.
-	 *
-	 * @param indentationLevel the indentation level
-	 * @return the resulting text edit of the formatting process
-	 * @since 3.1
-	 */
-	public final TextEdit format(int indentationLevel, boolean returnEdit) {
-		final String probe= getText(0, CommentLine.NON_FORMAT_START_PREFIX.length());
-		if (!probe.startsWith(CommentLine.NON_FORMAT_START_PREFIX)) {
-
-			int margin= this.preferences.comment_line_length;
-			String indentation= computeIndentation(indentationLevel);
-			margin= Math.max(COMMENT_PREFIX_LENGTH + 1, margin - stringToLength(indentation) - COMMENT_PREFIX_LENGTH);
-
-			tokenizeRegion();
-			markRegion();
-			wrapRegion(margin);
-			formatRegion(indentation, margin);
-
-		}
-		if (returnEdit) {
-			return this.scribe.getRootEdit();
-		}
-		return null;
-	}
-
-	/**
-	 * Formats this comment region.
-	 *
-	 * @param indentation the indentation of this comment region
-	 * @param width the maximal width of text in this comment region
-	 *                measured in average character widths
-	 */
-	protected void formatRegion(final String indentation, final int width) {
-
-		final int last= this.fLines.size() - 1;
-		if (last >= 0) {
-
-			CommentLine lastLine= (CommentLine)this.fLines.get(last);
-			CommentRange lastRange= lastLine.getLast();
-			lastLine.formatLowerBorder(lastRange, indentation, width);
-
-			CommentLine previous;
-			CommentLine next= null;
-			CommentRange range= null;
-			for (int line= last; line >= 0; line--) {
-
-				previous= next;
-				next= (CommentLine)this.fLines.get(line);
-
-				range= next.formatLine(previous, range, indentation, line);
-			}
-			next.formatUpperBorder(range, indentation, width);
-		}
-	}
-
-	/**
-	 * Returns the line delimiter used in this comment region.
-	 *
-	 * @return the line delimiter for this comment region
-	 */
-	protected final String getDelimiter() {
-		return this.fDelimiter;
-	}
-
-	/**
-	 * Returns the line delimiter used in this comment line break.
-	 *
-	 * @param predecessor the predecessor comment line after the line break
-	 * @param successor the successor comment line before the line break
-	 * @param previous the comment range after the line break
-	 * @param next the comment range before the line break
-	 * @param indentation indentation of the formatted line break
-	 * @return the line delimiter for this comment line break
-	 */
-	protected String getDelimiter(final CommentLine predecessor, final CommentLine successor, final CommentRange previous, final CommentRange next, final String indentation) {
-		return this.fDelimiter + indentation + successor.getContentPrefix();
-	}
-
-	/**
-	 * Returns the range delimiter for this comment range break.
-	 *
-	 * @param previous the previous comment range to the right of the range
-	 *                delimiter
-	 * @param next the next comment range to the left of the range delimiter
-	 * @return the delimiter for this comment range break
-	 */
-	protected String getDelimiter(final CommentRange previous, final CommentRange next) {
-		return COMMENT_RANGE_DELIMITER;
-	}
-
-	/**
-	 * Returns the document of this comment region.
-	 *
-	 * @return the document of this region
-	 */
-	protected final IDocument getDocument() {
-		return this.fDocument;
-	}
-
-	/**
-	 * Returns the comment ranges in this comment region
-	 *
-	 * @return the comment ranges in this region
-	 */
-	protected final LinkedList getRanges() {
-		return this.fRanges;
-	}
-
-	/**
-	 * Returns the number of comment lines in this comment region.
-	 *
-	 * @return the number of lines in this comment region
-	 */
-	protected final int getSize() {
-		return this.fLines.size();
-	}
-
-	/**
-	 * Returns the text of this comment region in the indicated range.
-	 *
-	 * @param position the offset of the comment range to retrieve in
-	 *                comment region coordinates
-	 * @param count the length of the comment range to retrieve
-	 * @return the content of this comment region in the indicated range
-	 */
-	protected final String getText(final int position, final int count) {
-
-		String content= ""; //$NON-NLS-1$
-		try {
-			content= this.fDocument.get(getOffset() + position, count);
-		} catch (BadLocationException exception) {
-			// Should not happen
-		}
-		return content;
-	}
-
-	/**
-	 * Does the border <code>border</code> exist?
-	 *
-	 * @param border the type of the border, must be a border attribute of
-	 *                <code>CommentRegion</code>
-	 * @return <code>true</code> iff this border exists,
-	 *         <code>false</code> otherwise
-	 */
-	protected final boolean hasBorder(final int border) {
-		return (this.fBorders & border) == border;
-	}
-
-	/**
-	 * Does the comment range consist of letters and digits only?
-	 *
-	 * @param range the comment range to text
-	 * @return <code>true</code> iff the comment range consists of letters
-	 *         and digits only, <code>false</code> otherwise
-	 */
-	protected final boolean isAlphaNumeric(final CommentRange range) {
-
-		final String token= getText(range.getOffset(), range.getLength());
-
-		for (int index= 0; index < token.length(); index++) {
-			if (!ScannerHelper.isLetterOrDigit(token.charAt(index)))
-				return false;
-		}
-		return true;
-	}
-
-	/**
-	 * Does the comment range contain no letters and digits?
-	 *
-	 * @param range the comment range to text
-	 * @return <code>true</code> iff the comment range contains no letters
-	 *         and digits, <code>false</code> otherwise
-	 */
-	protected final boolean isNonAlphaNumeric(final CommentRange range) {
-
-		final String token= getText(range.getOffset(), range.getLength());
-
-		for (int index= 0; index < token.length(); index++) {
-			if (ScannerHelper.isLetterOrDigit(token.charAt(index)))
-				return false;
-		}
-		return true;
-	}
-
-	/**
-	 * Should blank lines be cleared during formatting?
-	 *
-	 * @return <code>true</code> iff blank lines should be cleared,
-	 *         <code>false</code> otherwise
-	 */
-	protected final boolean isClearLines() {
-		return this.fClear;
-	}
-
-	/**
-	 * Is this comment region a single line region?
-	 *
-	 * @return <code>true</code> iff this region is single line,
-	 *         <code>false</code> otherwise
-	 */
-	protected final boolean isSingleLine() {
-		return this.fSingleLine;
-	}
-
-	/**
-	 * Logs a text edit operation occurred during the formatting process
-	 *
-	 * @param change the changed text
-	 * @param position offset measured in comment region coordinates where
-	 *                to apply the changed text
-	 * @param count length of the range where to apply the changed text
-	 */
-	protected final void logEdit(final String change, final int position, final int count) {
-		try {
-			final int base= getOffset() + position;
-			final String content= this.fDocument.get(base, count);
-
-			if (!change.equals(content)) {
-				if (count > 0) {
-					this.scribe.addReplaceEdit(base, base + count - 1, change);
-				} else {
-					this.scribe.addInsertEdit(base, change);
-				}
-			}
-		} catch (BadLocationException exception) {
-			// Should not happen
-			CommentFormatterUtil.log(exception);
-		} catch (MalformedTreeException exception) {
-			// Do nothing
-			CommentFormatterUtil.log(exception);
-		}
-	}
-
-	/**
-	 * Marks the comment ranges in this comment region.
-	 */
-	protected void markRegion() {
-		// Do nothing
-	}
-
-	/**
-	 * Set the border type <code>border</code> to true.
-	 *
-	 * @param border the type of the border. Must be a border attribute of
-	 *                <code>CommentRegion</code>
-	 */
-	protected final void setBorder(final int border) {
-		this.fBorders |= border;
-	}
-
-	/**
-	 * Returns the indentation of the given indentation level.
-	 *
-	 * @param indentationLevel the indentation level
-	 * @return the indentation of the given indentation level
-	 * @since 3.1
-	 */
-	private String computeIndentation(int indentationLevel) {
-		if (DefaultCodeFormatterOptions.TAB == this.preferences.tab_char)
-			return replicate("\t", indentationLevel); //$NON-NLS-1$
-
-		if (DefaultCodeFormatterOptions.SPACE == this.preferences.tab_char)
-			return replicate(" ", indentationLevel * this.preferences.tab_size); //$NON-NLS-1$
-
-		if (DefaultCodeFormatterOptions.MIXED == this.preferences.tab_char) {
-			int tabSize= this.preferences.tab_size;
-			int indentSize= this.preferences.indentation_size;
-			int spaceEquivalents= indentationLevel * indentSize;
-			return replicate("\t", spaceEquivalents / tabSize) + replicate(" ", spaceEquivalents % tabSize); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-
-		Assert.isTrue(false);
-		return null;
-	}
-
-	/**
-	 * Returns the given string n-times replicated.
-	 *
-	 * @param string the string
-	 * @param n n
-	 * @return the given string n-times replicated
-	 * @since 3.1
-	 */
-	private String replicate(String string, int n) {
-		StringBuffer buffer= new StringBuffer(n*string.length());
-		for (int i= 0; i < n; i++)
-			buffer.append(string);
-		return buffer.toString();
-	}
-
-	/**
-	 * Computes the equivalent indentation for a string
-	 *
-	 * @param reference the string to compute the indentation for
-	 * @return the indentation string
-	 */
-	protected final String stringToIndent(final String reference) {
-		return replicate(" ", stringToLength(reference)); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the length of the string in expanded characters.
-	 *
-	 * @param reference the string to get the length for
-	 * @return the length of the string in expanded characters
-	 */
-	protected final int stringToLength(final String reference) {
-		return expandTabs(reference).length();
-	}
-
-	/**
-	 * Expands the given string's tabs according to the given tab size.
-	 *
-	 * @param string the string
-	 * @return the expanded string
-	 * @since 3.1
-	 */
-	private String expandTabs(String string) {
-		StringBuffer expanded= new StringBuffer();
-		for (int i= 0, n= string.length(), chars= 0; i < n; i++) {
-			char ch= string.charAt(i);
-			if (ch == '\t') {
-				for (; chars < this.fTabSize; chars++)
-					expanded.append(' ');
-				chars= 0;
-			} else {
-				expanded.append(ch);
-				chars++;
-				if (chars >= this.fTabSize)
-					chars= 0;
-			}
-
-		}
-		return expanded.toString();
-	}
-
-	/**
-	 * Tokenizes the comment region.
-	 */
-	protected void tokenizeRegion() {
-
-		int index= 0;
-		CommentLine line= null;
-
-		for (final Iterator iterator= this.fLines.iterator(); iterator.hasNext(); index++) {
-
-			line= (CommentLine)iterator.next();
-
-			line.scanLine(index);
-			line.tokenizeLine(index);
-		}
-	}
-
-	/**
-	 * Wraps the comment ranges in this comment region into comment lines.
-	 *
-	 * @param width the maximal width of text in this comment region
-	 *                measured in average character widths
-	 */
-	protected void wrapRegion(final int width) {
-
-		this.fLines.clear();
-
-		int index= 0;
-		boolean adapted= false;
-
-		CommentLine successor= null;
-		CommentLine predecessor= null;
-
-		CommentRange previous= null;
-		CommentRange next= null;
-
-		while (!this.fRanges.isEmpty()) {
-
-			index= 0;
-			adapted= false;
-
-			predecessor= successor;
-			successor= createLine();
-			this.fLines.add(successor);
-
-			while (!this.fRanges.isEmpty()) {
-				next= (CommentRange)this.fRanges.getFirst();
-
-				if (canAppend(successor, previous, next, index, width)) {
-
-					if (!adapted && predecessor != null) {
-
-						successor.adapt(predecessor);
-						adapted= true;
-					}
-
-					this.fRanges.removeFirst();
-					successor.append(next);
-
-					index += (next.getLength() + 1);
-					previous= next;
-				} else
-					break;
-			}
-		}
-	}
-
-	/**
-	 * Creates a new line for this region.
-	 *
-	 * @return a new line for this region
-	 * @since 3.1
-	 */
-	protected CommentLine createLine() {
-		return new SingleCommentLine(this);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IBorderAttributes.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IBorderAttributes.java
deleted file mode 100644
index 40a06ba..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IBorderAttributes.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-/**
- * Comment region border attributes.
- *
- * @since 3.0
- */
-public interface IBorderAttributes {
-
-	/** Region has lower border attribute */
-	public static final int BORDER_LOWER= 1 << 0;
-
-	/** Region has upper border attribute */
-	public static final int BORDER_UPPER= 1 << 1;
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/ICommentAttributes.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/ICommentAttributes.java
deleted file mode 100644
index bdbe4d8..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/ICommentAttributes.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-/**
- * General comment range attributes.
- *
- * @since 3.0
- */
-public interface ICommentAttributes {
-
-	/** Range has blank line attribute */
-	public static final int COMMENT_BLANKLINE= 1 << 1;
-
-	/** Range has line break attribute */
-	public static final int COMMENT_BREAK= 1 << 2;
-
-	/** Range has close tag attribute */
-	public static final int COMMENT_CLOSE= 1 << 3;
-
-	/** Range has source code attribute */
-	public static final int COMMENT_CODE= 1 << 4;
-
-	/** Range has html tag attribute */
-	public static final int COMMENT_HTML= 1 << 5;
-
-	/** Range has the immutable region attribute */
-	public static final int COMMENT_IMMUTABLE= 1 << 6;
-
-	/** Range has new line attribute */
-	public static final int COMMENT_NEWLINE= 1 << 7;
-
-	/** Range has open tag attribute */
-	public static final int COMMENT_OPEN= 1 << 8;
-
-	/** Range has paragraph attribute */
-	public static final int COMMENT_PARAGRAPH= 1 << 9;
-
-	/** Range has parameter tag attribute */
-	public static final int COMMENT_PARAMETER= 1 << 10;
-
-	/** Range has root tag attribute */
-	public static final int COMMENT_ROOT= 1 << 11;
-
-	/** Range has paragraph separator attribute */
-	public static final int COMMENT_SEPARATOR= 1 << 12;
-
-	/** Range is the first token on the line in the original source */
-	public static final int COMMENT_FIRST_TOKEN= 1 << 13;
-
-	/**
-	 * Range was preceded by whitespace / line delimiters
-	 * @since 3.1
-	 */
-	public static final int COMMENT_STARTS_WITH_RANGE_DELIMITER= 1 << 14;
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IHtmlTagDelimiters.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IHtmlTagDelimiters.java
deleted file mode 100644
index d40067d..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/IHtmlTagDelimiters.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-/**
- * Html tag constants.
- *
- * @since 3.0
- */
-public interface IHtmlTagDelimiters {
-
-	/** Html tag close prefix */
-	public static final char[] HTML_CLOSE_PREFIX= "</".toCharArray(); //$NON-NLS-1$
-
-	/** Html tag postfix */
-	public static final char HTML_TAG_POSTFIX= '>';
-
-	/** Html tag prefix */
-	public static final char HTML_TAG_PREFIX= '<';
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocLine.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocLine.java
deleted file mode 100644
index e192518..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocLine.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-/**
- * Javadoc comment line in a comment region.
- *
- * @since 3.0
- */
-public class JavaDocLine extends MultiCommentLine {
-
-	/** Line prefix of javadoc start lines */
-	public static final String JAVADOC_START_PREFIX= "/**"; //$NON-NLS-1$
-
-	/**
-	 * Creates a new javadoc line.
-	 *
-	 * @param region comment region to create the line for
-	 */
-	protected JavaDocLine(final CommentRegion region) {
-		super(region);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#formatUpperBorder(org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String, int)
-	 */
-	protected void formatUpperBorder(final CommentRange range, final String indentation, final int length) {
-
-		final CommentRegion parent= getParent();
-
-		if (parent.isSingleLine() && parent.getSize() == 1) {
-			parent.logEdit(getStartingPrefix() + CommentRegion.COMMENT_RANGE_DELIMITER, 0, range.getOffset());
-		} else
-			super.formatUpperBorder(range, indentation, length);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getStartingPrefix()
-	 */
-	protected String getStartingPrefix() {
-		return JAVADOC_START_PREFIX;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocRegion.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocRegion.java
deleted file mode 100644
index 8f6ab06..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocRegion.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.text.edits.TextEdit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DefaultLineTracker;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ILineTracker;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextUtilities;
-
-import org.eclipse.jdt.core.formatter.CodeFormatter;
-import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
-import org.eclipse.jdt.internal.formatter.CodeFormatterVisitor;
-
-
-/**
- * Javadoc region in a source code document.
- *
- * @since 3.0
- */
-public class JavaDocRegion extends MultiCommentRegion {
-
-	/** The positions of code ranges */
-	private final ArrayList fCodePositions= new ArrayList();
-
-	/** Should HTML tags be formatted? */
-	private final boolean fFormatHtml;
-
-	/** Should source code regions be formatted? */
-	private final boolean fFormatSource;
-
- 	/**
-	 * Creates a new Javadoc region.
-	 *
-	 * @param document the document which contains the comment region
-	 * @param position the position of this comment region in the document
-	 * @param formatter the given formatter
-	 */
-	public JavaDocRegion(final IDocument document, final Position position, final CodeFormatterVisitor formatter) {
-		super(document, position, formatter);
-
-		this.fFormatSource = this.preferences.comment_format_source;
-		this.fFormatHtml = this.preferences.comment_format_html;
-		this.fClear = this.preferences.comment_clear_blank_lines_in_javadoc_comment;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#canFormat(org.eclipse.jdt.internal.corext.text.comment.CommentRange, org.eclipse.jdt.internal.corext.text.comment.CommentRange)
-	 */
-	protected boolean canFormat(final CommentRange previous, final CommentRange next) {
-
-		if (previous != null) {
-
-			final boolean isCurrentCode= next.hasAttribute(COMMENT_CODE);
-			final boolean isLastCode= previous.hasAttribute(COMMENT_CODE);
-
-			final int base= getOffset();
-
-			if (!isLastCode && isCurrentCode)
-				this.fCodePositions.add(new Position(base + previous.getOffset()));
-			else if (isLastCode && !isCurrentCode)
-				this.fCodePositions.add(new Position(base + next.getOffset() + next.getLength()));
-
-			if (previous.hasAttribute(COMMENT_IMMUTABLE) && next.hasAttribute(COMMENT_IMMUTABLE))
-				return false;
-
-			return true;
-		}
-		return false;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#formatRegion(java.lang.String, int)
-	 */
-	protected final void formatRegion(final String indentation, final int width) {
-
-		super.formatRegion(indentation, width);
-
-		if (this.fFormatSource) {
-
-			try {
-
-				if (this.fCodePositions.size() > 0) {
-
-					int begin= 0;
-					int end= 0;
-
-					Position position= null;
-
-					final IDocument document= getDocument();
-
-					for (int index= this.fCodePositions.size() - 1; index >= 0;) {
-
-						position= (Position)this.fCodePositions.get(index--);
-						begin= position.getOffset();
-
-						if (index >= 0) {
-							position= (Position)this.fCodePositions.get(index--);
-							end= position.getOffset();
-						} else {
-							/*
-							 * Handle missing closing tag
-							 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=57011
-							 */
-							position= null;
-							end= getOffset() + getLength() - MultiCommentLine.MULTI_COMMENT_END_PREFIX.trim().length();
-							while (end > begin && ScannerHelper.isWhitespace(document.getChar(end - 1)))
-								end--;
-						}
-
-						String snippet= document.get(begin, end - begin);
-						snippet= preprocessCodeSnippet(snippet);
-						snippet= formatCodeSnippet(snippet);
-						snippet= postprocessCodeSnippet(snippet, indentation);
-
-						logEdit(snippet, begin - getOffset(), end - begin);
-					}
-				}
-			} catch (BadLocationException e) {
-				// Can not happen
-				CommentFormatterUtil.log(e);
-			}
-		}
-	}
-
-	/**
-	 * Preprocess a given code snippet.
-	 *
-	 * @param snippet the code snippet
-	 * @return the preprocessed code snippet
-	 */
-	private String preprocessCodeSnippet(String snippet) {
-		// strip content prefix
-		StringBuffer buffer= new StringBuffer();
-		ILineTracker tracker= new DefaultLineTracker();
-		String contentPrefix= MultiCommentLine.MULTI_COMMENT_CONTENT_PREFIX.trim();
-
-		buffer.setLength(0);
-		buffer.append(snippet);
-		tracker.set(snippet);
-		for (int line= tracker.getNumberOfLines() - 1; line > 0; line--) {
-			int lineOffset;
-			try {
-				lineOffset= tracker.getLineOffset(line);
-			} catch (BadLocationException e) {
-				// Can not happen
-				CommentFormatterUtil.log(e);
-				return snippet;
-			}
-			int prefixOffset= buffer.indexOf(contentPrefix, lineOffset);
-			if (prefixOffset >= 0 && buffer.substring(lineOffset, prefixOffset).trim().length() == 0)
-				buffer.delete(lineOffset, prefixOffset + contentPrefix.length() + 1);
-		}
-
-		return convertHtml2Java(buffer.toString());
-	}
-
-	/**
-	 * Format the given code snippet
-	 *
-	 * @param snippet the code snippet
-	 * @return the formatted code snippet
-	 */
-	private String formatCodeSnippet(String snippet) {
-		String lineDelimiter= TextUtilities.getDefaultLineDelimiter(getDocument());
-		TextEdit edit= CommentFormatterUtil.format2(CodeFormatter.K_UNKNOWN, snippet, 0, lineDelimiter, this.preferences.getMap());
-		if (edit != null)
-			snippet= CommentFormatterUtil.evaluateFormatterEdit(snippet, edit, null);
-		return snippet;
-	}
-
-	/**
-	 * Postprocesses the given code snippet with the given indentation.
-	 *
-	 * @param snippet the code snippet
-	 * @param indentation the indentation
-	 * @return the postprocessed code snippet
-	 */
-	private String postprocessCodeSnippet(String snippet, String indentation) {
-		// patch content prefix
-		StringBuffer buffer= new StringBuffer();
-		ILineTracker tracker= new DefaultLineTracker();
-		String patch= indentation + MultiCommentLine.MULTI_COMMENT_CONTENT_PREFIX;
-
-		// remove trailing spaces
-		int i= snippet.length();
-		while (i > 0 && ' ' == snippet.charAt(i-1))
-			i--;
-		snippet= snippet.substring(0, i);
-
-		buffer.setLength(0);
-		String lineDelimiter= getDelimiter();
-		if (lineDelimiter != null && snippet.indexOf(lineDelimiter) != 0)
-			buffer.append(lineDelimiter);
-		buffer.append(convertJava2Html(snippet));
-		if (lineDelimiter != null && snippet.lastIndexOf(lineDelimiter) != snippet.length() - lineDelimiter.length())
-			buffer.append(lineDelimiter);
-		tracker.set(buffer.toString());
-
-		for (int line= tracker.getNumberOfLines() - 1; line > 0; line--)
-			try {
-				buffer.insert(tracker.getLineOffset(line), patch);
-			} catch (BadLocationException e) {
-				// Can not happen
-				CommentFormatterUtil.log(e);
-				return snippet;
-			}
-
-		return buffer.toString();
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.MultiCommentRegion#markHtmlRanges()
-	 */
-	protected final void markHtmlRanges() {
-
-		markTagRanges(JAVADOC_IMMUTABLE_TAGS, COMMENT_IMMUTABLE, true);
-
-		if (this.fFormatSource)
-			markTagRanges(JAVADOC_CODE_TAGS, COMMENT_CODE, false);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.MultiCommentRegion#markHtmlTag(org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String)
-	 */
-	protected final void markHtmlTag(final CommentRange range, final char[] token) {
-
-		if (range.hasAttribute(COMMENT_HTML)) {
-
-			range.markHtmlTag(JAVADOC_IMMUTABLE_TAGS, token, COMMENT_IMMUTABLE, true, true);
-			if (this.fFormatHtml) {
-
-				range.markHtmlTag(JAVADOC_SEPARATOR_TAGS, token, COMMENT_SEPARATOR, true, true);
-				range.markHtmlTag(JAVADOC_BREAK_TAGS, token, COMMENT_BREAK, false, true);
-				range.markHtmlTag(JAVADOC_SINGLE_BREAK_TAG, token, COMMENT_BREAK, true, false);
-				range.markHtmlTag(JAVADOC_NEWLINE_TAGS, token, COMMENT_NEWLINE, true, false);
-
-			} else
-				range.markHtmlTag(JAVADOC_CODE_TAGS, token, COMMENT_SEPARATOR, true, true);
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.MultiCommentRegion#markJavadocTag(org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String)
-	 */
-	protected final void markJavadocTag(final CommentRange range, final char[] token) {
-
-		range.markPrefixTag(JAVADOC_PARAM_TAGS, COMMENT_TAG_PREFIX, token, COMMENT_PARAMETER);
-
-		if (token[0] == JAVADOC_TAG_PREFIX && !range.hasAttribute(COMMENT_PARAMETER))
-			range.setAttribute(COMMENT_ROOT);
-	}
-
-	/**
-	 * Marks the comment region with the HTML range tag.
-	 *
-	 * @param tags the HTML tag which confines the HTML range
-	 * @param attribute the attribute to set if the comment range is in the
-	 *                HTML range
-	 * @param html <code>true</code> iff the HTML tags in this HTML range
-	 *                should be marked too, <code>false</code> otherwise
-	 */
-	protected final void markTagRanges(final char[][] tags, final int attribute, final boolean html) {
-
-		int level= 0;
-		int count= 0;
-		char[] token= null;
-		CommentRange current= null;
-
-		for (int index= 0; index < tags.length; index++) {
-
-			level= 0;
-			for (final Iterator iterator= getRanges().iterator(); iterator.hasNext();) {
-
-				current= (CommentRange)iterator.next();
-				count= current.getLength();
-
-				if (count > 0 || level > 0) { // PR44035: when inside a tag, mark blank lines as well to get proper snippet formatting
-
-					token= getText(current.getOffset(), current.getLength()).toCharArray();
-					level= current.markTagRange(token, tags[index], level, attribute, html);
-				}
-			}
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#canAppend(org.eclipse.jdt.internal.corext.text.comment.CommentLine, org.eclipse.jdt.internal.corext.text.comment.CommentRange, org.eclipse.jdt.internal.corext.text.comment.CommentRange, int, int)
-	 */
-	protected boolean canAppend(CommentLine line, CommentRange previous, CommentRange next, int index, int count) {
-		// don't append code sections
-		if (next.hasAttribute(COMMENT_CODE | COMMENT_FIRST_TOKEN) && line.getSize() != 0)
-			return false;
-		return super.canAppend(line, previous, next, index, count);
-	}
-
-	/**
-	 * Converts <code>formatted</code> into valid html code suitable to be
-	 * put inside <pre></pre> tags by replacing any html symbols
-	 * by the relevant entities.
-	 *
-	 * @param formatted the formatted java code
-	 * @return html version of the formatted code
-	 */
-	private String convertJava2Html(String formatted) {
-		Java2HTMLEntityReader reader= new Java2HTMLEntityReader(new StringReader(formatted));
-		char[] buf= new char[256];
-		StringBuffer buffer= new StringBuffer();
-		int l;
-		try {
-			do {
-				l= reader.read(buf);
-				if (l != -1)
-					buffer.append(buf, 0, l);
-			} while (l > 0);
-			return buffer.toString();
-		} catch (IOException e) {
-			return formatted;
-		}
-	}
-
-	/**
-	 * Converts <code>html</code> into java code suitable for formatting
-	 * by replacing any html entities by their plain text representation.
-	 *
-	 * @param html html code, may contain html entities
-	 * @return plain textified version of <code>html</code>
-	 */
-	private String convertHtml2Java(String html) {
-		HTMLEntity2JavaReader reader= new HTMLEntity2JavaReader(new StringReader(html));
-		char[] buf= new char[html.length()]; // html2text never gets longer, only shorter!
-
-		try {
-			int read= reader.read(buf);
-			return new String(buf, 0, read);
-		} catch (IOException e) {
-			return html;
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#createLine()
-	 * @since 3.1
-	 */
-	protected CommentLine createLine() {
-		return new JavaDocLine(this);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentLine.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentLine.java
deleted file mode 100644
index a75addf..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentLine.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jdt.internal.compiler.parser.ScannerHelper;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-
-/**
- * Multi-line comment line in a comment region.
- *
- * @since 3.0
- */
-public class MultiCommentLine extends CommentLine implements ICommentAttributes, IHtmlTagDelimiters, IJavaDocTagConstants {
-
-	/** Line prefix of multi-line comment content lines */
-	public static final String MULTI_COMMENT_CONTENT_PREFIX= " * "; //$NON-NLS-1$
-
-	/** Line prefix of multi-line comment end lines */
-	public static final String MULTI_COMMENT_END_PREFIX= " */"; //$NON-NLS-1$
-
-	/** Line prefix of multi-line comment content lines */
-	public static final String MULTI_COMMENT_START_PREFIX= "/* "; //$NON-NLS-1$
-
-	/** The indentation reference of this line */
-	private String fReferenceIndentation= ""; //$NON-NLS-1$
-
-	/** The javadoc tag lookup. */
-	private static final Set fgTagLookup;
-
-	static {
-		fgTagLookup= new HashSet();
-		for (int i= 0; i < JAVADOC_BREAK_TAGS.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_BREAK_TAGS[i]));
-		}
-		for (int i= 0; i < JAVADOC_SINGLE_BREAK_TAG.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_SINGLE_BREAK_TAG[i]));
-		}
-		for (int i= 0; i < JAVADOC_CODE_TAGS.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_CODE_TAGS[i]));
-		}
-		for (int i= 0; i < JAVADOC_IMMUTABLE_TAGS.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_IMMUTABLE_TAGS[i]));
-		}
-		for (int i= 0; i < JAVADOC_NEWLINE_TAGS.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_NEWLINE_TAGS[i]));
-		}
-		for (int i= 0; i < JAVADOC_SEPARATOR_TAGS.length; i++) {
-			fgTagLookup.add(new String(JAVADOC_SEPARATOR_TAGS[i]));
-		}
-	}
-
-	/**
-	 * Creates a new multi-line comment line.
-	 *
-	 * @param region comment region to create the line for
-	 */
-	protected MultiCommentLine(final CommentRegion region) {
-		super(region);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#adapt(org.eclipse.jdt.internal.corext.text.comment.CommentLine)
-	 */
-	protected void adapt(final CommentLine previous) {
-
-		if (!hasAttribute(COMMENT_ROOT) && !hasAttribute(COMMENT_PARAMETER) && !previous.hasAttribute(COMMENT_BLANKLINE))
-			this.fReferenceIndentation= previous.getIndentationReference();
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#append(org.eclipse.jdt.internal.corext.text.comment.CommentRange)
-	 */
-	protected void append(final CommentRange range) {
-
-		final MultiCommentRegion parent= (MultiCommentRegion)getParent();
-
-		if (range.hasAttribute(COMMENT_PARAMETER))
-			setAttribute(COMMENT_PARAMETER);
-		else if (range.hasAttribute(COMMENT_ROOT))
-			setAttribute(COMMENT_ROOT);
-		else if (range.hasAttribute(COMMENT_BLANKLINE))
-			setAttribute(COMMENT_BLANKLINE);
-
-		final int ranges= getSize();
-		if (ranges == 1) {
-
-			if (parent.isIndentRoots()) {
-
-				final CommentRange first= getFirst();
-				final String common= parent.getText(first.getOffset(), first.getLength()) + CommentRegion.COMMENT_RANGE_DELIMITER;
-
-				if (hasAttribute(COMMENT_ROOT))
-					this.fReferenceIndentation= common;
-				else if (hasAttribute(COMMENT_PARAMETER)) {
-					if (parent.isIndentDescriptions())
-						this.fReferenceIndentation= "\t" + common; //$NON-NLS-1$
-					else
-						this.fReferenceIndentation= common;
-				}
-			}
-		}
-		super.append(range);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getContentLinePrefix()
-	 */
-	protected String getContentPrefix() {
-		return MULTI_COMMENT_CONTENT_PREFIX;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getEndLinePrefix()
-	 */
-	protected String getEndingPrefix() {
-		return MULTI_COMMENT_END_PREFIX;
-	}
-
-	/**
-	 * Returns the reference indentation to use for this line.
-	 *
-	 * @return the reference indentation for this line
-	 */
-	protected final String getIndentationReference() {
-		return this.fReferenceIndentation;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getStartLinePrefix()
-	 */
-	protected String getStartingPrefix() {
-		return MULTI_COMMENT_START_PREFIX;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#scanLine(int)
-	 */
-	protected void scanLine(final int line) {
-
-		final CommentRegion parent= getParent();
-		final String start= getStartingPrefix().trim();
-		final String end= getEndingPrefix().trim();
-		final String content= getContentPrefix().trim();
-
-		final int lines= parent.getSize();
-		final CommentRange range= getFirst();
-
-		int offset= 0;
-		int postfix= 0;
-
-		String text= parent.getText(range.getOffset(), range.getLength());
-		if (line == 0) {
-
-			offset= text.indexOf(start);
-			if (offset >= 0 && text.substring(0, offset).trim().length() != 0)
-				offset= -1;
-
-			if (offset >= 0) {
-
-				offset += start.length();
-				range.trimBegin(offset);
-
-				postfix= text.lastIndexOf(end);
-				if (postfix >= 0 && text.substring(postfix + end.length()).trim().length() != 0)
-					postfix= -1;
-
-				if (postfix >= offset)
-					// comment ends on same line
-					range.setLength(postfix - offset);
-				else {
-					postfix= text.lastIndexOf(content);
-					if (postfix >= 0 && text.substring(postfix + content.length()).trim().length() != 0)
-						postfix= -1;
-
-					if (postfix >= offset) {
-
-						range.setLength(postfix - offset);
-						parent.setBorder(BORDER_UPPER);
-
-						if (postfix > offset) {
-
-							text= parent.getText(range.getOffset(), range.getLength());
-							final IRegion region= trimLine(text, content);
-
-							range.move(region.getOffset());
-							range.setLength(region.getLength());
-						}
-					}
-				}
-			}
-		} else if (line == lines - 1) {
-
-			offset= text.indexOf(content);
-			if (offset >= 0 && text.substring(0, offset).trim().length() != 0)
-				offset= -1;
-			postfix= text.lastIndexOf(end);
-			if (postfix >= 0 && text.substring(postfix + end.length()).trim().length() != 0)
-				postfix= -1;
-
-			if (offset >= 0 && offset == postfix)
-				// no content on line, only the comment postfix
-				range.setLength(0);
-			else {
-				if (offset >= 0)
-					// omit the content prefix
-					range.trimBegin(offset + content.length());
-
-				if (postfix >= 0)
-					// omit the comment postfix
-					range.trimEnd(-end.length());
-
-				text= parent.getText(range.getOffset(), range.getLength());
-				final IRegion region= trimLine(text, content);
-				if (region.getOffset() != 0 || region.getLength() != text.length()) {
-
-					range.move(region.getOffset());
-					range.setLength(region.getLength());
-
-					parent.setBorder(BORDER_UPPER);
-					parent.setBorder(BORDER_LOWER);
-				}
-			}
-		} else {
-
-			offset= text.indexOf(content);
-			if (offset >= 0 && text.substring(0, offset).trim().length() != 0)
-				offset= -1;
-
-			if (offset >= 0) {
-
-				offset += content.length();
-				range.trimBegin(offset);
-			}
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#tokenizeLine(int)
-	 */
-	protected void tokenizeLine(int line) {
-
-		int offset= 0;
-		int index= offset;
-
-		final CommentRegion parent= getParent();
-		final CommentRange range= getFirst();
-		final int begin= range.getOffset();
-
-		final String content= parent.getText(begin, range.getLength());
-		final int length= content.length();
-
-		while (offset < length && ScannerHelper.isWhitespace(content.charAt(offset)))
-			offset++;
-
-		CommentRange result= null;
-		if (offset >= length && !parent.isClearLines() && (line > 0 && line < parent.getSize() - 1)) {
-
-			result= new CommentRange(begin, 0);
-			result.setAttribute(COMMENT_BLANKLINE);
-			result.setAttribute(COMMENT_FIRST_TOKEN);
-
-			parent.append(result);
-		}
-
-		int attribute= COMMENT_FIRST_TOKEN | COMMENT_STARTS_WITH_RANGE_DELIMITER;
-		while (offset < length) {
-
-			while (offset < length && ScannerHelper.isWhitespace(content.charAt(offset))) {
-				offset++;
-				attribute |= COMMENT_STARTS_WITH_RANGE_DELIMITER;
-			}
-
-			index= offset;
-
-			if (index < length) {
-
-				if (content.charAt(index) == HTML_TAG_PREFIX) {
-
-					// in order to avoid recognizing any < in a comment, even those which are part of e.g.
-					// java source code, we validate the tag content to be one of the recognized
-					// tags (structural, breaks, pre, code).
-					int tag= ++index;
-					while (index < length && content.charAt(index) != HTML_TAG_POSTFIX && content.charAt(index) != HTML_TAG_PREFIX)
-						index++;
-
-					if (index < length && content.charAt(index) == HTML_TAG_POSTFIX && isValidTag(content.substring(tag, index))) {
-						index++;
-						attribute |= COMMENT_HTML; // only set html attribute if postfix found
-					} else {
-						// no tag - do the usual thing from the original offset
-						index= tag;
-						while (index < length
-								&& !ScannerHelper.isWhitespace(content.charAt(index))
-								&& content.charAt(index) != HTML_TAG_PREFIX
-								&& !content.startsWith(LINK_TAG_PREFIX_STRING, index))
-							index++;
-					}
-
-
-				} else if (content.startsWith(LINK_TAG_PREFIX_STRING, index)) {
-
-					while (index < length && content.charAt(index) != LINK_TAG_POSTFIX)
-						index++;
-
-					if (index < length && content.charAt(index) == LINK_TAG_POSTFIX)
-						index++;
-
-					attribute |= COMMENT_OPEN | COMMENT_CLOSE;
-
-				} else {
-
-					while (index < length
-							&& !ScannerHelper.isWhitespace(content.charAt(index))
-							&& content.charAt(index) != HTML_TAG_PREFIX
-							&& !content.startsWith(LINK_TAG_PREFIX_STRING, index))
-						index++;
-				}
-			}
-
-			if (index - offset > 0) {
-
-				result= new CommentRange(begin + offset, index - offset);
-				result.setAttribute(attribute);
-
-				parent.append(result);
-				offset= index;
-			}
-
-			attribute= 0;
-		}
-	}
-
-	/**
-	 * Checks whether <code>tag</code> is a valid tag content (text inside
-	 * the angular brackets <, >).
-	 * <p>
-	 * The algorithm is to see if the tag trimmed of whitespace and an
-	 * optional slash starts with one of our recognized tags.
-	 *
-	 * @param tag the tag to check
-	 * @return <code>true</code> if <code>tag</code> is a valid tag
-	 *         content
-	 */
-	private boolean isValidTag(String tag) {
-		// strip the slash
-		if (tag.startsWith("/")) //$NON-NLS-1$
-			tag= tag.substring(1, tag.length());
-
-		// strip ws
-		tag= tag.trim();
-
-		// extract first token
-		int i= 0;
-		while (i < tag.length() && !ScannerHelper.isWhitespace(tag.charAt(i)))
-			i++;
-		tag= tag.substring(0, i);
-
-		// see if it's a tag
-		return isTagName(tag.toLowerCase());
-	}
-
-	/**
-	 * Checks whether <code>tag</code> is one of the configured tags.
-	 *
-	 * @param tag the tag to check
-	 * @return <code>true</code> if <code>tag</code> is a configured tag
-	 *         name
-	 */
-	private boolean isTagName(String tag) {
-		return fgTagLookup.contains(tag);
-	}
-
-	/**
-	 * Removes all leading and trailing occurrences from <code>line</code>.
-	 *
-	 * @param line the string to remove the occurrences of
-	 *                <code>trimmable</code>
-	 * @param trimmable the string to remove from <code>line</code>
-	 * @return the region of the trimmed substring within <code>line</code>
-	 */
-	protected final IRegion trimLine(final String line, final String trimmable) {
-
-		final int trim= trimmable.length();
-
-		int offset= 0;
-		int length= line.length() - trim;
-
-		while (line.startsWith(trimmable, offset))
-			offset += trim;
-
-		while (line.startsWith(trimmable, length))
-			length -= trim;
-
-		return new Region(offset, length + trim);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentRegion.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentRegion.java
deleted file mode 100644
index f48ef45..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/MultiCommentRegion.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-import java.util.Iterator;
-import java.util.ListIterator;
-
-import org.eclipse.jdt.internal.formatter.CodeFormatterVisitor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-
-/**
- * Multi-comment region in a source code document.
- *
- * @since 3.0
- */
-public class MultiCommentRegion extends CommentRegion implements IJavaDocTagConstants {
-
-	/** Should root tag parameter descriptions be indented after the tag? */
-	private final boolean fIndentDescriptions;
-
-	/** Should root tag parameter descriptions be indented? */
-	private final boolean fIndentRoots;
-
-	/** Should description of parameters go to the next line? */
-	private final boolean fParameterNewLine;
-
-	/** Should root tags be separated from description? */
-	private boolean fSeparateRoots;
-
- 	/**
-	 * Creates a new multi-comment region.
-	 *
-	 * @param document the document which contains the comment region
-	 * @param position the position of this comment region in the document
-	 * @param formatter the given formatter
-	 */
-	public MultiCommentRegion(final IDocument document, final Position position, final CodeFormatterVisitor formatter) {
-		super(document, position, formatter);
-
-		this.fIndentRoots= this.preferences.comment_indent_root_tags;
-		this.fIndentDescriptions= this.preferences.comment_indent_parameter_description;
-		this.fSeparateRoots= this.preferences.comment_insert_empty_line_before_root_tags;
-		this.fParameterNewLine= this.preferences.comment_insert_new_line_for_parameter;
-		this.fClear = this.preferences.comment_clear_blank_lines_in_block_comment;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#canAppend(org.eclipse.jdt.internal.corext.text.comment.CommentLine, org.eclipse.jdt.internal.corext.text.comment.CommentRange, org.eclipse.jdt.internal.corext.text.comment.CommentRange, int, int)
-	 */
-	protected boolean canAppend(final CommentLine line, final CommentRange previous, final CommentRange next, final int index, int count) {
-
-		final boolean blank= next.hasAttribute(COMMENT_BLANKLINE);
-
-		// Avoid wrapping punctuation
-		if (next.getLength() <= 2 && !blank && isNonAlphaNumeric(next))
-			return true;
-
-		if (this.fParameterNewLine && line.hasAttribute(COMMENT_PARAMETER) && line.getSize() > 1)
-			return false;
-
-		if (previous != null) {
-
-			if (index != 0 && (blank || previous.hasAttribute(COMMENT_BLANKLINE) || next.hasAttribute(COMMENT_PARAMETER) || next.hasAttribute(COMMENT_ROOT) || next.hasAttribute(COMMENT_SEPARATOR) || next.hasAttribute(COMMENT_NEWLINE) || previous.hasAttribute(COMMENT_BREAK) || previous.hasAttribute(COMMENT_SEPARATOR)))
-				return false;
-
-			if (previous.hasAttribute(COMMENT_ROOT))
-				return true;
-
-			if (next.hasAttribute(COMMENT_IMMUTABLE) && previous.hasAttribute(COMMENT_IMMUTABLE))
-				return true;
-		}
-
-		// always append elements that did not have any range separators
-		if (!next.hasAttribute(COMMENT_STARTS_WITH_RANGE_DELIMITER)) {
-			return true;
-		}
-
-		if (this.fIndentRoots && !line.hasAttribute(COMMENT_ROOT) && !line.hasAttribute(COMMENT_PARAMETER))
-			count -= stringToLength(line.getIndentationReference());
-
-		// Avoid appending consecutive immutable ranges, which together exceed the line width
-		if (next.hasAttribute(COMMENT_IMMUTABLE) && (previous == null || !previous.hasAttribute(COMMENT_IMMUTABLE))) {
-			// Breaking the abstraction by directly accessing the list of ranges for looking ahead
-			Iterator iter= getRanges().iterator();
-			CommentRange current= null;
-			while (iter.hasNext() && current != next)
-				current= (CommentRange) iter.next();
-
-			if (current != null && iter.hasNext()) {
-				try {
-					int lineNumber= getDocument().getLineOfOffset(getOffset() + current.getOffset());
-					CommentRange last= current;
-					while (iter.hasNext()) {
-						current= (CommentRange) iter.next();
-						if (current.hasAttribute(COMMENT_IMMUTABLE) && getDocument().getLineOfOffset(getOffset() + current.getOffset()) == lineNumber)
-							last= current;
-						else
-							break;
-					}
-					count -= last.getOffset() + last.getLength() - (next.getOffset() + next.getLength());
-				} catch (BadLocationException e) {
-					// Should not happen
-				}
-			}
-		}
-
-		return super.canAppend(line, previous, next, index, count);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#getDelimiter(org.eclipse.jdt.internal.corext.text.comment.CommentLine, org.eclipse.jdt.internal.corext.text.comment.CommentLine, org.eclipse.jdt.internal.corext.text.comment.CommentRange, org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String)
-	 */
-	protected String getDelimiter(CommentLine predecessor, CommentLine successor, CommentRange previous, CommentRange next, String indentation) {
-
-		final String delimiter= super.getDelimiter(predecessor, successor, previous, next, indentation);
-
-		if (previous != null) {
-
-			// Blank line before <pre> tag
-			if (previous.hasAttribute(COMMENT_IMMUTABLE | COMMENT_SEPARATOR) && !next.hasAttribute(COMMENT_CODE) && !successor.hasAttribute(COMMENT_BLANKLINE))
-				return delimiter + delimiter;
-
-			// Blank line after </pre> tag
-			else if (next.hasAttribute(COMMENT_IMMUTABLE | COMMENT_SEPARATOR) && !successor.hasAttribute(COMMENT_BLANKLINE) && !predecessor.hasAttribute(COMMENT_BLANKLINE))
-				return delimiter + delimiter;
-
-			// Add blank line before first root/parameter tag, if "Blank line before Javadoc tags"
-			else if (this.fSeparateRoots && previous.hasAttribute(COMMENT_PARAGRAPH) && !successor.hasAttribute(COMMENT_BLANKLINE) && !predecessor.hasAttribute(COMMENT_BLANKLINE))
-				return delimiter + delimiter;
-
-			else if (this.fIndentRoots && !predecessor.hasAttribute(COMMENT_ROOT) && !predecessor.hasAttribute(COMMENT_PARAMETER) && !predecessor.hasAttribute(COMMENT_BLANKLINE))
-				return delimiter + stringToIndent(predecessor.getIndentationReference());
-		}
-		return delimiter;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#getDelimiter(org.eclipse.jdt.internal.corext.text.comment.CommentRange, org.eclipse.jdt.internal.corext.text.comment.CommentRange)
-	 */
-	protected String getDelimiter(final CommentRange previous, final CommentRange next) {
-		// simply preserve range (~ word) breaks
-		if (previous != null && !previous.hasAttribute(COMMENT_STARTS_WITH_RANGE_DELIMITER)) {
-			return ""; //$NON-NLS-1$
-		} else {
-			return super.getDelimiter(previous, next);
-		}
-	}
-
-	/**
-	 * Should root tag parameter descriptions be indented after the tag?
-	 *
-	 * @return <code>true</code> iff the descriptions should be indented
-	 *         after, <code>false</code> otherwise.
-	 */
-	protected final boolean isIndentDescriptions() {
-		return this.fIndentDescriptions;
-	}
-
-	/**
-	 * Should root tag parameter descriptions be indented?
-	 *
-	 * @return <code>true</code> iff the root tags should be indented,
-	 *         <code>false</code> otherwise.
-	 */
-	protected final boolean isIndentRoots() {
-		return this.fIndentRoots;
-	}
-
-	/**
-	 * Marks the comment ranges confined by HTML ranges.
-	 */
-	protected void markHtmlRanges() {
-		// Do nothing
-	}
-
-	/**
-	 * Marks the comment range with its HTML tag attributes.
-	 *
-	 * @param range the comment range to mark
-	 * @param token token associated with the comment range
-	 */
-	protected void markHtmlTag(final CommentRange range, final char[] token) {
-		// Do nothing
-	}
-
-	/**
-	 * Marks the comment range with its javadoc tag attributes.
-	 *
-	 * @param range the comment range to mark
-	 * @param token token associated with the comment range
-	 */
-	protected void markJavadocTag(final CommentRange range, final char[] token) {
-		range.markPrefixTag(COMMENT_ROOT_TAGS, COMMENT_TAG_PREFIX, token, COMMENT_ROOT);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#markRegion()
-	 */
-	protected void markRegion() {
-
-		int count= 0;
-		boolean paragraph= false;
-
-		char[] token= null;
-		CommentRange range= null;
-
-		for (final ListIterator iterator= getRanges().listIterator(); iterator.hasNext();) {
-
-			range= (CommentRange)iterator.next();
-			count= range.getLength();
-
-			if (count > 0) {
-
-				token= getText(range.getOffset(), count).toLowerCase().toCharArray();
-
-				markJavadocTag(range, token);
-				if (!paragraph && (range.hasAttribute(COMMENT_ROOT) || range.hasAttribute(COMMENT_PARAMETER))) {
-					range.setAttribute(COMMENT_PARAGRAPH);
-					paragraph= true;
-				}
-				markHtmlTag(range, token);
-			}
-		}
-		markHtmlRanges();
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentRegion#createLine()
-	 * @since 3.1
-	 */
-	protected CommentLine createLine() {
-		return new MultiCommentLine(this);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/SingleCommentLine.java b/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/SingleCommentLine.java
deleted file mode 100644
index 7506cec..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/SingleCommentLine.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.formatter.comment;
-
-/**
- * Single-line comment line in a comment region.
- *
- * @since 3.0
- */
-public class SingleCommentLine extends CommentLine {
-
-	/** Line prefix for single line comments */
-	public static final String SINGLE_COMMENT_PREFIX= "// "; //$NON-NLS-1$
-
-	/** NLS tag prefix */
-	private static final String NLS_TAG_PREFIX= "//$NON-NLS-"; //$NON-NLS-1$
-
-	/** Is the comment a NLS locale tag sequence? */
-	private boolean fLocaleSequence= false;
-
-	/**
-	 * Creates a new single-line comment line.
-	 *
-	 * @param region comment region to create the line for
-	 */
-	protected SingleCommentLine(final CommentRegion region) {
-		super(region);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#adapt(org.eclipse.jdt.internal.corext.text.comment.CommentLine)
-	 */
-	protected void adapt(final CommentLine previous) {
-		// Do nothing
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#formatLowerBorder(org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String, int)
-	 */
-	protected void formatLowerBorder(final CommentRange range, final String indentation, final int length) {
-
-		final int offset= range.getOffset() + range.getLength();
-		final CommentRegion parent= getParent();
-
-		parent.logEdit(parent.getDelimiter(), offset, parent.getLength() - offset);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#formatUpperBorder(org.eclipse.jdt.internal.corext.text.comment.CommentRange, java.lang.String, int)
-	 */
-	protected void formatUpperBorder(final CommentRange range, final String indentation, final int length) {
-
-		final CommentRegion parent= getParent();
-
-		parent.logEdit(getContentPrefix(), 0, range.getOffset());
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getContentPrefix()
-	 */
-	protected String getContentPrefix() {
-		return SINGLE_COMMENT_PREFIX;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getEndingPrefix()
-	 */
-	protected String getEndingPrefix() {
-		return SINGLE_COMMENT_PREFIX;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#getStartingPrefix()
-	 */
-	protected String getStartingPrefix() {
-		return SINGLE_COMMENT_PREFIX;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#scanLine(int)
-	 */
-	protected void scanLine(final int line) {
-
-		final CommentRange range= getFirst();
-		final String content= getParent().getText(range.getOffset(), range.getLength());
-		final String prefix= getContentPrefix().trim();
-
-		final int offset= content.indexOf(prefix);
-		if (offset >= 0) {
-
-			if (content.startsWith(NLS_TAG_PREFIX))
-				this.fLocaleSequence= true;
-
-			range.trimBegin(offset + prefix.length());
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.corext.text.comment.CommentLine#tokenizeLine(int)
-	 */
-	protected void tokenizeLine(final int line) {
-
-		if (!this.fLocaleSequence)
-			super.tokenizeLine(line);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BufferChangedEvent.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BufferChangedEvent.java
index 3620bae..ac5a2ac 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BufferChangedEvent.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/BufferChangedEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,12 +36,8 @@ import java.util.EventObject;
  * When a buffer is closed, <code>getOffset</code> is 0, <code>getLength</code>
  * is 0, and <code>getText</code> is <code>null</code>.
  * </p>
- * <p>
- * Instances of this class are automatically created by the Java model.
- * </p>
  *
  * @see IBuffer
- * @noinstantiate This class is not intended to be instantiated by clients.
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class BufferChangedEvent extends EventObject {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java
index 53faecc..8f8e70f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -818,7 +818,7 @@ public class CompletionProposal {
 	 * </p>
 	 * <p>
 	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
-	 * (eg. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)}).<br>
+	 * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)}).<br>
 	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
 	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
 	 * </p>
@@ -859,7 +859,7 @@ public class CompletionProposal {
 	 * </p>
 	 * <p>
 	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
-	 * (eg. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)})<br>
+	 * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)})<br>
 	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
 	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
 	 * </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CorrectionEngine.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CorrectionEngine.java
index a893e53..0902f1a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CorrectionEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/CorrectionEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -219,6 +219,7 @@ public class CorrectionEngine {
 					argument = arguments[0];
 					break;
 				case IProblem.UndefinedName :
+				case IProblem.UnresolvedVariable :
 					this.filter = FIELD | LOCAL;
 					argument = arguments[0];
 					break;
@@ -234,7 +235,20 @@ public class CorrectionEngine {
 	private void correct(char[] argument) {
 		try {
 			String source = this.compilationUnit.getSource();
-			Scanner scanner = new Scanner();
+			Map currentProjectOptions = this.compilationUnit.getJavaProject().getOptions(true);
+			long sourceLevel = CompilerOptions.versionToJdkLevel(currentProjectOptions.get(JavaCore.COMPILER_SOURCE));
+			long complianceLevel = CompilerOptions.versionToJdkLevel(currentProjectOptions.get(JavaCore.COMPILER_COMPLIANCE));
+			
+			Scanner scanner =
+				new Scanner(
+					false /*comment*/,
+					false /*whitespace*/,
+					false /*nls*/,
+					sourceLevel,
+					complianceLevel,
+					null/*taskTag*/,
+					null/*taskPriorities*/,
+					true /*taskCaseSensitive*/);
 			scanner.setSource(source.toCharArray());
 
 			scanner.resetTo(this.correctionStart, this.correctionEnd);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IBuffer.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IBuffer.java
index 68ba233..9cebaa2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IBuffer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IBuffer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,12 +152,14 @@ public IOpenable getOwner();
  * Returns the given range of text in this buffer.
  * <p>
  * The returned value is undefined if the buffer is closed.
+ * </p>
  *
- * @param offset the  zero-based starting offset
+ * @param offset the zero-based starting offset
  * @param length the number of characters to retrieve
  * @return the given range of text in this buffer
+ * @exception IndexOutOfBoundsException when buffer is out of synch
  */
-public String getText(int offset, int length);
+public String getText(int offset, int length) throws IndexOutOfBoundsException;
 /**
  * Returns the underlying resource for which this buffer was opened,
  * or <code>null</code> if this buffer was not opened on a resource.
@@ -194,7 +196,7 @@ public boolean isClosed();
 public boolean isReadOnly();
 /**
  * Removes the given listener from this buffer.
- * Has no affect if an identical listener is not registered or if the buffer is closed.
+ * Has no effect if an identical listener is not registered or if the buffer is closed.
  *
  * @param listener the listener
  */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java
index df6db5a..d90ab15 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathAttribute.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,8 @@ public interface IClasspathAttribute {
 
 	/**
 	 * Constant for the name of the javadoc location attribute.
+	 * 
+	 * <p>The value for this attribute has to be the string representation of a URL.</p>
 	 *
 	 * @since 3.1
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java
index 6248737..5b862f6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,10 @@ import org.eclipse.core.runtime.IPath;
  * <li> project entries (<code>CPE_PROJECT</code>) </li>
  * </ul>
  * In particular, a classpath container can neither reference further classpath containers or classpath variables.
+ * <p> 
+ * A library entry can reference other libraries through the Class-Path section of the JAR's MANIFEST.MF file. If the
+ * container wants such referenced entries to be part of the classpath, the container must explicitly add them to the
+ * array returned from {@link #getClasspathEntries()}.
  * <p>
  * Classpath container values are persisted locally to the workspace, but are not preserved from a
  * session to another. It is thus highly recommended to register a <code>ClasspathContainerInitializer</code>
@@ -63,7 +67,10 @@ public interface IClasspathContainer {
 	 * </ul>
 	 * A classpath container can neither reference further classpath containers
 	 * or classpath variables.
-	 * </p>
+	 * <p>
+	 * A library entry can reference other libraries through the Class-Path section of the JAR's MANIFEST.MF file. If
+	 * the container wants such referenced entries to be part of the classpath, the container must explicitly add them
+	 * to the result.
 	 * <p>
 	 * This method is called by the Java model when it needs to resolve this
 	 * classpath container entry into a list of library and project entries.
@@ -80,6 +87,7 @@ public interface IClasspathContainer {
 	 * <li>{@link JavaCore#newProjectEntry(IPath, boolean)} and variants</li>
 	 * <li>{@link JavaCore#create(org.eclipse.core.resources.IWorkspaceRoot)}</li>
 	 * <li>{@link JavaCore#create(org.eclipse.core.resources.IProject)}</li>
+	 * <li>{@link JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject)} with <code>null</code> as project</li>
 	 * <li>{@link IJavaModel#getJavaProjects()}</li>
 	 * <li>{@link IJavaProject#getRawClasspath()}</li>
 	 * <li>{@link IJavaProject#readRawClasspath()}</li>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java
index 3725823..8c882fd 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IClasspathEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -418,6 +418,28 @@ public interface IClasspathEntry {
 	 */
 	IPath getSourceAttachmentRootPath();
 
+	
+	/**
+	 * Returns the classpath entry that is making a reference to this classpath entry. For entry kinds 
+	 * {@link #CPE_LIBRARY}, the return value is the entry that is representing the JAR that includes 
+	 * <code>this</code> in the MANIFEST.MF file's Class-Path section. For entry kinds other than 
+	 * {@link #CPE_LIBRARY}, this returns <code>null</code>. For those entries that are on the raw classpath already, 
+	 * this returns <code>null</code>.  
+	 * <p>
+	 * It is possible that multiple library entries refer to the same entry
+	 * via the MANIFEST.MF file. In those cases, this method returns the first classpath entry 
+	 * that appears in the raw classpath. However, this does not mean that the other referencing 
+	 * entries do not relate to their referenced entries. 
+	 * See {@link JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject)} for 
+	 * more details.
+	 * </p>
+	 * 
+	 * @return the classpath entry that is referencing this entry or <code>null</code> if 
+	 * 		not applicable.
+	 * @since 3.6
+	 */
+	IClasspathEntry getReferencingEntry();
+
 	/**
 	 * Returns whether this entry is exported to dependent projects.
 	 * Always returns <code>false</code> for source entries (kind
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
index ef78b3c..728e5c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -160,7 +160,7 @@ void becomeWorkingCopy(IProgressMonitor monitor) throws JavaModelException;
  *
  * <p>It is possible that the contents of the original resource have changed
  * since this working copy was created, in which case there is an update conflict.
- * The value of the <code>force</code> parameter effects the resolution of
+ * The value of the <code>force</code> parameter affects the resolution of
  * such a conflict:<ul>
  * <li> <code>true</code> - in this case the contents of this working copy are applied to
  * 	the underlying resource even though this working copy was created before
@@ -280,7 +280,7 @@ IImportDeclaration createImport(String name, IJavaElement sibling, int flags, IP
  * to the end of this compilation unit.
  *
  * <p>It is possible that a type with the same name already exists in this compilation unit.
- * The value of the <code>force</code> parameter effects the resolution of
+ * The value of the <code>force</code> parameter affects the resolution of
  * such a conflict:<ul>
  * <li> <code>true</code> - in this case the type is created with the new contents</li>
  * <li> <code>false</code> - in this case a {@link JavaModelException} is thrown</li>
@@ -409,10 +409,13 @@ IImportDeclaration[] getImports() throws JavaModelException;
  */
 ICompilationUnit getPrimary();
 /**
- * Returns the working copy owner of this working copy.
- * Returns null if it is not a working copy or if it has no owner.
- *
- * @return WorkingCopyOwner the owner of this working copy or <code>null</code>
+ * Returns <tt>null</tt> if this <code>ICompilationUnit</code> is the primary
+ * working copy, or this <code>ICompilationUnit</code> is not a working copy,
+ * otherwise the <code>WorkingCopyOwner</code>
+ * 
+ * @return <tt>null</tt> if this <code>ICompilationUnit</code> is the primary
+ * working copy, or this <code>ICompilationUnit</code> is not a working copy,
+ * otherwise the <code>WorkingCopyOwner</code>
  * @since 3.0
  */
 WorkingCopyOwner getOwner();
@@ -576,10 +579,10 @@ boolean isWorkingCopy();
  * </p>
  * <p>
  * If requested, a DOM AST representing the compilation unit is returned.
- * Its bindings are computed only if the problem requestor is active, or if the
- * problem detection is forced. This method returns <code>null</code> if the
- * creation of the DOM AST was not requested, or if the requested level of AST
- * API is not supported, or if the working copy was already consistent.
+ * Its bindings are computed only if the problem requestor is active.
+ * This method returns <code>null</code> if the creation of the DOM AST was not requested,
+ * or if the requested level of AST API is not supported, or if the working copy was
+ * already consistent.
  * </p>
  *
  * <p>
@@ -639,10 +642,10 @@ CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, WorkingCo
  * </p>
  * <p>
  * If requested, a DOM AST representing the compilation unit is returned.
- * Its bindings are computed only if the problem requestor is active, or if the
- * problem detection is forced. This method returns <code>null</code> if the
- * creation of the DOM AST was not requested, or if the requested level of AST
- * API is not supported, or if the working copy was already consistent.
+ * Its bindings are computed only if the problem requestor is active.
+ * This method returns <code>null</code> if the creation of the DOM AST was not requested,
+ * or if the requested level of AST API is not supported, or if the working copy was
+ * already consistent.
  * </p>
  *
  * <p>
@@ -707,10 +710,10 @@ CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, boolean e
  * </p>
  * <p>
  * If requested, a DOM AST representing the compilation unit is returned.
- * Its bindings are computed only if the problem requestor is active, or if the
- * problem detection is forced. This method returns <code>null</code> if the
- * creation of the DOM AST was not requested, or if the requested level of AST
- * API is not supported, or if the working copy was already consistent.
+ * Its bindings are computed only if the problem requestor is active.
+ * This method returns <code>null</code> if the creation of the DOM AST was not requested,
+ * or if the requested level of AST API is not supported, or if the working copy was
+ * already consistent.
  * </p>
  *
  * <p>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IField.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IField.java
index 1a35f96..15cf167 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IField.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -95,13 +95,16 @@ public Object getConstant() throws JavaModelException;
  */
 String getElementName();
 /**
- * Returns the binding key for this field. A binding key is a key that uniquely
- * identifies this field. It allows access to generic info for parameterized
- * fields.
+ * Returns the binding key for this field only if the given field is {@link #isResolved() resolved}.
+ * A binding key is a key that uniquely identifies this field. It allows access to generic info
+ * for parameterized fields.
  *
+ * <p>If the given field is not resolved, the returned key is simply the java element's key.
+ * </p>
  * @return the binding key for this field
  * @see org.eclipse.jdt.core.dom.IBinding#getKey()
  * @see BindingKey
+ * @see #isResolved()
  * @since 3.1
  */
 String getKey();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModel.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModel.java
index 44a2f80..d4bab84 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModel.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -96,6 +96,7 @@ boolean contains(IResource resource);
  * 		name and <code>replace</code> has been specified as <code>false</code> (<code>NAME_COLLISION</code>)</li>
  * <li> A container or element is read-only (<code>READ_ONLY</code>) </li>
  * </ul>
+ * @see org.eclipse.jdt.core.IJavaModelStatusConstants#INVALID_DESTINATION
  */
 void copy(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException;
 /**
@@ -201,6 +202,7 @@ IWorkspace getWorkspace();
  * </ul>
  *
  * @exception IllegalArgumentException any element or container is <code>null</code>
+ * @see org.eclipse.jdt.core.IJavaModelStatusConstants#INVALID_DESTINATION
  */
 void move(IJavaElement[] elements, IJavaElement[] containers, IJavaElement[] siblings, String[] renamings, boolean replace, IProgressMonitor monitor) throws JavaModelException;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelMarker.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelMarker.java
index b3fe18d..dbc6e55 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelMarker.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelMarker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.core;
 
+import org.eclipse.core.resources.IMarker;
+
 /**
  * Markers used by the Java model.
  * <p>
@@ -60,9 +62,14 @@ public interface IJavaModelMarker {
 	 * Id marker attribute (value <code>"arguments"</code>). Arguments are
 	 * concatenated into one String, prefixed with an argument count (followed
 	 * with colon separator) and separated with '#' characters. For example: {
-	 * "foo", "bar" } is encoded as "2:foo#bar", { } is encoded as "0: "
-	 *
+	 * "foo", "bar" } is encoded as "2:foo#bar", { } is encoded as "0:".
+	 * <p>Empty argument is encoded as three spaces ("   ").</p>
+	 * <p>If the argument contains a '#', the character is doubled.<br>
+	 * {"foo#test", "bar" } is encoded as "2:foo##test#bar"
+	 * </p>
+	 * 
 	 * @since 2.0
+	 * @see CorrectionEngine#getProblemArguments(IMarker)
 	 */
 	String ARGUMENTS = "arguments"; //$NON-NLS-1$
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelStatusConstants.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelStatusConstants.java
index 6a658ae..604248b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelStatusConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaModelStatusConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -132,7 +132,12 @@ public interface IJavaModelStatusConstants {
 
 	/**
 	 * Status constant indicating that a destination provided for a copy/move/rename operation
-	 * is invalid.
+	 * is invalid. The destination for a package fragment must be a package fragment root; the 
+	 * destination for a compilation unit must be a package fragment; the destination for 
+	 * a package declaration or import declaration must be a compilation unit; the 
+	 * destination for a type must be a type or compilation unit; the destination for any 
+	 * type member (other than a type) must be a type. <br>
+	 * 
 	 * The destination element can be retrieved using <code>getElements</code> on the status object.
 	 */
 	public static final int INVALID_DESTINATION = 978;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
index c932b11..5283cf4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IJavaProject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1008,6 +1008,56 @@ public interface IJavaProject extends IParent, IJavaElement, IOpenable {
 	void setRawClasspath(IClasspathEntry[] entries, boolean canModifyResources, IProgressMonitor monitor) throws JavaModelException;
 
 	/**
+	 * Works similar to {@link #setRawClasspath(IClasspathEntry[], IPath, IProgressMonitor)} and 
+	 * additionally allows persisting the given array of referenced entries for this project.
+	 * The referenced entries and their attributes are stored in the .classpath file of this 
+	 * project. For details on referenced entries, see 
+	 * {@link JavaCore#getReferencedClasspathEntries(IClasspathEntry, IJavaProject)}
+	 * and {@link IClasspathEntry#getReferencingEntry()}.
+	 * <p>
+	 * Since the referenced entries are stored in the .classpath file, clients can store additional 
+	 * information that belong to these entries and retrieve them across sessions, though the referenced
+	 * entries themselves may not be present in the raw classpath. By passing a <code>null</code>
+	 * referencedEntries, clients can choose not to modify the already persisted referenced entries,
+	 * which is fully equivalent to {@link #setRawClasspath(IClasspathEntry[], IPath, IProgressMonitor)}.
+	 * If an empty array is passed as referencedEntries, the already persisted referenced entries, 
+	 * if any, will be cleared. 
+	 * </p> <p>
+	 * If there are duplicates of a referenced entry or if any of the <code>referencedEntries</code> 
+	 * is already present in the raw classpath(<code>entries</code>) those referenced entries will 
+	 * be excluded and not be persisted.
+	 *</p>
+	 * @param entries a list of classpath entries
+	 * @param referencedEntries the list of referenced classpath entries to be persisted
+	 * @param outputLocation the default output location
+	 * @param monitor the given progress monitor
+	 * @exception JavaModelException if the classpath could not be set. Reasons include:
+	 * <ul>
+	 * <li> This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
+	 * <li> The classpath is being modified during resource change event notification (CORE_EXCEPTION)
+	 * <li> The classpath failed the validation check as defined by {@link JavaConventions#validateClasspath(IJavaProject, IClasspathEntry[], IPath)}
+	 * </ul>
+	 * @see IClasspathEntry
+	 * @see #getReferencedClasspathEntries()
+	 * @since 3.6
+	 */
+	void setRawClasspath(IClasspathEntry[] entries, IClasspathEntry[] referencedEntries, IPath outputLocation,
+			IProgressMonitor monitor) throws JavaModelException;
+
+	/**
+	 * Returns the list of referenced classpath entries stored in the .classpath file of <code>this</code> 
+	 * java project. Clients can store the referenced classpath entries using 
+	 * {@link #setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, IProgressMonitor)}
+	 * If the client has not stored any referenced entries for this project, an empty array is returned.
+	 *
+	 * @throws JavaModelException
+	 * @return an array of referenced classpath entries stored for this java project or an empty array if none
+	 * 			stored earlier.
+	 * @since 3.6
+	 */
+	IClasspathEntry[] getReferencedClasspathEntries() throws JavaModelException;
+	
+	/**
 	 * Sets the classpath of this project using a list of classpath entries. In particular such a classpath may contain
 	 * classpath variable entries. Classpath variable entries can be resolved individually ({@link JavaCore#getClasspathVariable(String)}),
 	 * or the full classpath can be resolved at once using the helper method {@link #getResolvedClasspath(boolean)}.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
index c93dc8a..14f2ecb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,9 @@ package org.eclipse.jdt.core;
  * Common protocol for Java elements that can be members of types.
  * This set consists of <code>IType</code>, <code>IMethod</code>,
  * <code>IField</code>, and <code>IInitializer</code>.
+ * <p>
+ * The children are listed in the order in which they appear in the source or class file.
+ * </p>
  *
  * @noimplement This interface is not intended to be implemented by clients.
  */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMemberValuePair.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMemberValuePair.java
index bbf0772..89167b8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMemberValuePair.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMemberValuePair.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,7 +125,7 @@ public interface IMemberValuePair {
 	 *      analyzed to determine its kind. For example, in <code>@MyAnnot({3.4, 1 + 2.3})</code>,
 	 *      the kind of the second element "1 + 2.3" is unknown.</li>
 	 * <li>the value is an array that contains heterogeneous values, e.g.
-	 *      <code>@MyAnnot(1, 2.3, "abc")</code></li>
+	 *      <code>@MyAnnot({1, 2.3, "abc"})</code></li>
 	 * </ul>
 	 * If the value kind is unknown, the returned value is always either <code>null</code>, or an
 	 * array containing {@link Object}s and/or <code>null</code>s for unknown elements.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMethod.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMethod.java
index 95ee2b4..daa458a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMethod.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMethod.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -101,13 +101,16 @@ ITypeParameter[] getTypeParameters() throws JavaModelException;
  */
 int getNumberOfParameters();
 /**
- * Returns the binding key for this method. A binding key is a key that uniquely
- * identifies this method. It allows access to generic info for parameterized
- * methods.
+ * Returns the binding key for this method only if the given method is {@link #isResolved() resolved}.
+ * A binding key is a key that uniquely identifies this method. It allows access
+ * to generic info for parameterized methods.
  *
+ * <p>If the given method is not resolved, the returned key is simply the java element's key.
+ * </p>
  * @return the binding key for this method
  * @see org.eclipse.jdt.core.dom.IBinding#getKey()
  * @see BindingKey
+ * @see #isResolved()
  * @since 3.1
  */
 String getKey();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragment.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragment.java
index 3dcb3b8..cea9e2b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public interface IPackageFragment extends IParent, IJavaElement, IOpenable, ISou
 	 *
 	 * <p>It is possible that a compilation unit with the same name already exists in this
 	 * package fragment.
-	 * The value of the <code>force</code> parameter effects the resolution of
+	 * The value of the <code>force</code> parameter affects the resolution of
 	 * such a conflict:<ul>
 	 * <li> <code>true</code> - in this case the compilation is created with the new contents</li>
 	 * <li> <code>false</code> - in this case a <code>JavaModelException</code> is thrown</li>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragmentRoot.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragmentRoot.java
index 535ad23..c1ed588 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragmentRoot.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IPackageFragmentRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -311,6 +311,18 @@ public interface IPackageFragmentRoot
 	 * @since 2.0
 	 */
 	IClasspathEntry getRawClasspathEntry() throws JavaModelException;
+	
+	/**
+	 * Returns the first resolved classpath entry that corresponds to this package fragment root.
+	 * A resolved classpath entry is said to correspond to a root if the path of the resolved
+	 * entry is equal to the root's path.
+	 * 
+	 * @return the first resolved classpath entry that corresponds to this package fragment root
+	 * @throws JavaModelException if this element does not exist or if an
+	 *		exception occurs while accessing its corresponding resource. 
+	 * @since 3.6
+	 */
+	IClasspathEntry getResolvedClasspathEntry() throws JavaModelException;
 
 	/**
 	 * Returns the absolute path to the source archive attached to
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceManipulation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceManipulation.java
index 93e7b2e..c915c7c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceManipulation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceManipulation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@ public interface ISourceManipulation {
  * </ul>
  *
  * @exception IllegalArgumentException if container is <code>null</code>
+ * @see org.eclipse.jdt.core.IJavaModelStatusConstants#INVALID_DESTINATION
  */
 void copy(IJavaElement container, IJavaElement sibling, String rename, boolean replace, IProgressMonitor monitor) throws JavaModelException;
 /**
@@ -88,6 +89,7 @@ void delete(boolean force, IProgressMonitor monitor) throws JavaModelException;
  * </ul>
  *
  * @exception IllegalArgumentException if container is <code>null</code>
+ * @see org.eclipse.jdt.core.IJavaModelStatusConstants#INVALID_DESTINATION
  */
 void move(IJavaElement container, IJavaElement sibling, String rename, boolean replace, IProgressMonitor monitor) throws JavaModelException;
 /**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceRange.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceRange.java
index 84fb217..8bc9e02 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceRange.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceRange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,13 @@ package org.eclipse.jdt.core;
  * A source range defines an element's source coordinates relative to
  * its source buffer.
  *
+ * <p>Clients may use the method {@link org.eclipse.jdt.core.SourceRange#isAvailable(ISourceRange)}
+ * in order to find out if a source range is available. This method returns <code>false</code>
+ * when the source range offset is equals to <code>-1</code>.</p>
+ * 
+ * <p>Clients may use the default implementation provided by {@link SourceRange}.</p>
+ *
+ * @see SourceRange
  * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface ISourceRange {
@@ -28,10 +35,12 @@ public interface ISourceRange {
 int getLength();
 /**
  * Returns the 0-based index of the first character of the source code for this element,
- * relative to the source buffer in which this element is contained.
+ * relative to the source buffer in which this element is contained. However, if the element
+ * has no associated source code, an implementation may return -1. 
  *
  * @return the 0-based index of the first character of the source code for this element,
- * relative to the source buffer in which this element is contained
+ * relative to the source buffer in which this element is contained. However, if the element
+ * has no associated source code, an implementation may return -1. 
  */
 int getOffset();
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceReference.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceReference.java
index fb5ad2b..f88fa83 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ISourceReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,13 +61,15 @@ String getSource() throws JavaModelException;
  * associated with the class file (if there is one).
  * </p>
  * <p>
- * If this element has no associated source code <code>null</code> is either returned,
- * or a source range with a -1 offset and a 0 length.
+ * If this element has no associated source code, either <code>null</code> is returned,
+ * or a source range with a -1 offset and a 0 length. {@link SourceRange#isAvailable(ISourceRange)}
+ * can be used to detect that case.
  * </p>
  *
  * @return the source range, or either <code>null</code> or [-1, 0] if this element has no
  *   associated source code
  * @exception JavaModelException if an exception occurs while accessing its corresponding resource
+ * @see SourceRange#isAvailable(ISourceRange)
  */
 ISourceRange getSourceRange() throws JavaModelException;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java
index 0bbbd36..d843d61 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -335,7 +335,7 @@ public interface IType extends IMember, IAnnotatable {
 	 * as the last field declaration in this type.</p>
 	 *
 	 * <p>It is possible that a field with the same name already exists in this type.
-	 * The value of the <code>force</code> parameter effects the resolution of
+	 * The value of the <code>force</code> parameter affects the resolution of
 	 * such a conflict:<ul>
 	 * <li> <code>true</code> - in this case the field is created with the new contents</li>
 	 * <li> <code>false</code> - in this case a <code>JavaModelException</code> is thrown</li>
@@ -393,7 +393,7 @@ public interface IType extends IMember, IAnnotatable {
 	 * to this type.
 	 *
 	 * <p>It is possible that a method with the same signature already exists in this type.
-	 * The value of the <code>force</code> parameter effects the resolution of
+	 * The value of the <code>force</code> parameter affects the resolution of
 	 * such a conflict:<ul>
 	 * <li> <code>true</code> - in this case the method is created with the new contents</li>
 	 * <li> <code>false</code> - in this case a <code>JavaModelException</code> is thrown</li>
@@ -427,7 +427,7 @@ public interface IType extends IMember, IAnnotatable {
 	 * to this type.</p>
 	 *
 	 * <p>It is possible that a type with the same name already exists in this type.
-	 * The value of the <code>force</code> parameter effects the resolution of
+	 * The value of the <code>force</code> parameter affects the resolution of
 	 * such a conflict:<ul>
 	 * <li> <code>true</code> - in this case the type is created with the new contents</li>
 	 * <li> <code>false</code> - in this case a <code>JavaModelException</code> is thrown</li>
@@ -472,6 +472,10 @@ public interface IType extends IMember, IAnnotatable {
 	 * Returns the children of this type that have the given category as a <code>@category</code> tag.
 	 * Returns an empty array if no children with this category exist.
 	 *
+	 * <p>
+	 * The results are listed in the order in which they appear in the source or class file.
+	 * </p>
+	 * 
 	 * @return the children for the given category.
 	 * @exception JavaModelException if this element does not exist or if an
 	 *      exception occurs while accessing its corresponding resource.
@@ -498,10 +502,8 @@ public interface IType extends IMember, IAnnotatable {
 	IField getField(String name);
 
 	/**
-	 * Returns the fields declared by this type.
-	 * If this is a source type, the results are listed in the order
-	 * in which they appear in the source, otherwise, the results are
-	 * in no particular order.  For binary types, this includes synthetic fields.
+	 * Returns the fields declared by this type in the order in which they appear 
+	 * in the source or class file. For binary types, this includes synthetic fields.
 	 *
 	 * @exception JavaModelException if this element does not exist or if an
 	 *		exception occurs while accessing its corresponding resource.
@@ -580,10 +582,9 @@ public interface IType extends IMember, IAnnotatable {
 	IInitializer getInitializer(int occurrenceCount);
 
 	/**
-	 * Returns the initializers declared by this type.
-	 * For binary types this is an empty collection.
-	 * If this is a source type, the results are listed in the order
-	 * in which they appear in the source.
+	 * Returns the initializers declared by this type. For binary types this is an 
+	 * empty collection. For source types, the results are listed in the order in 
+	 * which they appear in the source. 
 	 *
 	 * @exception JavaModelException if this element does not exist or if an
 	 *		exception occurs while accessing its corresponding resource.
@@ -592,14 +593,17 @@ public interface IType extends IMember, IAnnotatable {
 	IInitializer[] getInitializers() throws JavaModelException;
 
 	/**
-	 * Returns the binding key for this type. A binding key is a key that uniquely
-	 * identifies this type. It allows access to generic info for parameterized
-	 * types.
+	 * Returns the binding key for this type only if the given type is {@link #isResolved() resolved}.
+	 * A binding key is a key that uniquely identifies this type. It allows access
+	 * to generic info for parameterized types.
 	 *
+	 * <p>If the given type is not resolved, the returned key is simply the java element's key.
+	 * </p>
 	 * @return the binding key for this type
 	 * @see org.eclipse.jdt.core.dom.IBinding#getKey()
 	 * @see BindingKey
 	 * @since 3.1
+	 * @see #isResolved()
 	 */
 	String getKey();
 
@@ -623,11 +627,11 @@ public interface IType extends IMember, IAnnotatable {
 
 	/**
 	 * Returns the methods and constructors declared by this type.
-	 * For binary types, this may include the special <code><clinit></code>; method
+	 * For binary types, this may include the special <code><clinit></code> method
 	 * and synthetic methods.
-	 * If this is a source type, the results are listed in the order
-	 * in which they appear in the source, otherwise, the results are
-	 * in no particular order.
+	 * <p>
+	 * The results are listed in the order in which they appear in the source or class file. 
+	 * </p>
 	 *
 	 * @exception JavaModelException if this element does not exist or if an
 	 *		exception occurs while accessing its corresponding resource.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeHierarchy.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeHierarchy.java
index 8267fe4..51f0755 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeHierarchy.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeHierarchy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * created such that the root of the hierarchy is always included. For example, if a type
  * hierarchy is created for a <code>java.io.File</code>, and the region the hierarchy was
  * created in is the package fragment <code>java.io</code>, the supertype
- * <code>java.lang.Object</code> will still be included.
+ * <code>java.lang.Object</code> will still be included. As a historical quirk,
+ * <code>java.lang.Object</code> has always been included in type hierarchies
+ * created on interface types.
  * <p>
  * A type hierarchy is static and can become stale. Although consistent when
  * created, it does not automatically track changes in the model.
@@ -141,7 +143,7 @@ IType[] getAllSupertypes(IType type);
  * order. Any types in the creation region which were not resolved to
  * have any subtypes or supertypes are not included in the result.
  *
- * @return all types in this type hierarchy's grap
+ * @return all types in this type hierarchy's graph
  */
 IType[] getAllTypes();
 
@@ -275,7 +277,7 @@ IType getType();
 void refresh(IProgressMonitor monitor) throws JavaModelException;
 /**
  * Removes the given listener from this type hierarchy.
- * Has no affect if an identical listener is not registered.
+ * Has no effect if an identical listener is not registered.
  *
  * @param listener the listener
  */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeParameter.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeParameter.java
index 0175f44..2411a36 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeParameter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeParameter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,21 @@ public interface ITypeParameter extends IJavaElement, ISourceReference {
 	String[] getBounds() throws JavaModelException;
 
 	/**
+	 * Returns the signatures for this type parameter's bounds. The type parameter may have 
+	 * been declared as part of a type or a method. The signatures represent only the individual 
+	 * bounds and do not include the type variable name or the <code>extends</code> keyword.  
+	 * The signatures may be either unresolved (for source types) or resolved (for binary types). 
+	 * See {@link Signature} for details.
+	 * 
+	 * @return the signatures for the bounds of this formal type parameter
+	 * @throws JavaModelException
+	 *             if this element does not exist or if an exception occurs while accessing its corresponding resource.
+	 * @see Signature
+	 * @since 3.6
+	 */
+	String[] getBoundsSignatures() throws JavaModelException;
+	
+	/**
 	 * Returns the declaring member of this type parameter. This can be either an <code>IType</code>
 	 * or an <code>IMethod</code>.
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IWorkingCopy.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IWorkingCopy.java
index aac30a2..e7537ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IWorkingCopy.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IWorkingCopy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,7 +59,7 @@ public interface IWorkingCopy {
 	 *
 	 * <p>It is possible that the contents of the original resource have changed
 	 * since this working copy was created, in which case there is an update conflict.
-	 * The value of the <code>force</code> parameter effects the resolution of
+	 * The value of the <code>force</code> parameter affects the resolution of
 	 * such a conflict:<ul>
 	 * <li> <code>true</code> - in this case the contents of this working copy are applied to
 	 * 	the underlying resource even though this working copy was created before
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
index 827645e..5d80813 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -377,13 +377,18 @@ public final class JavaConventions {
 	 * @deprecated Use {@link #validateJavaTypeName(String id, String sourceLevel, String complianceLevel)} instead
 	 */
 	public static IStatus validateJavaTypeName(String name) {
-		return validateJavaTypeName(name, CompilerOptions.VERSION_1_3,CompilerOptions.VERSION_1_3);
+		return validateJavaTypeName(name, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3);
 	}
 
 	/**
 	 * Validate the given Java type name, either simple or qualified, for the given source and compliance levels.
-	 * For example, <code>"java.lang.Object"</code>, or <code>"Object"</code>.
-	 * <p>
+	 * 
+	 * <p>For example, <code>"java.lang.Object"</code>, or <code>"Object"</code>.</p>
+	 * 
+	 * <p>The source level and compliance level values should be taken from the constant defined inside
+	 * {@link JavaCore} class. The constants are named <code>JavaCore#VERSION_1_x</code>, x being set
+	 * between '1' and '7'.
+	 * </p>
 	 *
 	 * @param name the name of a type
 	 * @param sourceLevel the source level
@@ -395,6 +400,13 @@ public final class JavaConventions {
 	 *      otherwise a status object indicating what is wrong with
 	 *      the name
 	 * @since 3.3
+	 * @see JavaCore#VERSION_1_1
+	 * @see JavaCore#VERSION_1_2
+	 * @see JavaCore#VERSION_1_3
+	 * @see JavaCore#VERSION_1_4
+	 * @see JavaCore#VERSION_1_5
+	 * @see JavaCore#VERSION_1_6
+	 * @see JavaCore#VERSION_1_7
 	 */
 	public static IStatus validateJavaTypeName(String name, String sourceLevel, String complianceLevel) {
 		if (name == null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
index 2703b67..a95d149 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,7 +81,10 @@
  *                                 COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_EXEMPT_EXCEPTION_AND_THROWABLE
  *     IBM Corporation - added getOptionForConfigurableSeverity(int)
  *     Benjamin Muskalla - added COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD
+ *     Stephan Herrmann  - added COMPILER_PB_UNUSED_OBJECT_ALLOCATION
+ *     Stephan Herrmann  - added COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS
  *******************************************************************************/
+
 package org.eclipse.jdt.core;
 
 import java.util.ArrayList;
@@ -976,6 +979,21 @@ public final class JavaCore extends Plugin {
 	 */
 	public static final String COMPILER_PB_MISSING_OVERRIDE_ANNOTATION = PLUGIN_ID + ".compiler.problem.missingOverrideAnnotation"; //$NON-NLS-1$
 	/**
+	 * Compiler option ID: Reporting Missing <code>@Override</code> Annotation for interface method implementation.
+	 * <p>When enabled, the compiler will issue an error or a warning whenever encountering a method
+	 *    declaration which overrides or implements a superinterface method but has no <code>@Override</code> annotation.</p>
+	 * <p>This option only has an effect if the compiler compliance is 1.6 or greater.</p>
+	 * <p>The severity of the problem is controlled with option {@link #COMPILER_PB_MISSING_OVERRIDE_ANNOTATION}.</p>
+	 * <dl>
+	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation"</code></dd>
+	 * <dt>Possible values:</dt><dd><code>{ "enabled", "disabled" }</code></dd>
+	 * <dt>Default:</dt><dd><code>"enabled"</code></dd>
+	 * </dl>
+	 * @since 3.6
+	 * @category CompilerOptionID
+	 */
+	public static final String COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION = PLUGIN_ID + ".compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation"; //$NON-NLS-1$
+	/**
 	 * Compiler option ID: Reporting Missing <code>@Deprecated</code> Annotation.
 	 * <p>When enabled, the compiler will issue an error or a warning whenever encountering a declaration
 	 *    carrying a <code>@deprecated</code> doc tag but having no corresponding <code>@Deprecated</code> annotation.
@@ -1022,7 +1040,7 @@ public final class JavaCore extends Plugin {
 	 * <dl>
 	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"</code></dd>
 	 * <dt>Possible values:</dt><dd><code>{ "enabled", "disabled" }</code></dd>
-	 * <dt>Default:</dt><dd><code>"disabled"</code></dd>	
+	 * <dt>Default:</dt><dd><code>"disabled"</code></dd>
 	 * </dl>
 	 * @since 3.5
 	 * @category CompilerOptionID
@@ -1254,13 +1272,14 @@ public final class JavaCore extends Plugin {
 	/**
 	 * Compiler option ID: Treating Optional Error as Fatal.
 	 * <p>When enabled, optional errors (i.e. optional problems which severity is set to <code>"error"</code>) will be treated as standard
-	 *    compiler errors, yielding problem methods/types preventing from running offending code until the issue got resolved.
+	 *    compiler errors, yielding problem methods/types preventing from running offending code until the issue got resolved.</p>
 	 * <p>When disabled, optional errors are only considered as warnings, still carrying an error indication to make them more
-	 *    severe. Note that by default, errors are fatal, whether they are optional or not.
+	 *    severe. Note that by default, optional errors are not fatal. Non-optional errors are
+	 *    always fatal.</p>
 	 * <dl>
 	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.fatalOptionalError"</code></dd>
 	 * <dt>Possible values:</dt><dd><code>{ "enabled", "disabled" }</code></dd>
-	 * <dt>Default:</dt><dd><code>"enabled"</code></dd>
+	 * <dt>Default:</dt><dd><code>"disabled"</code></dd>
 	 * </dl>
 	 * @since 3.2
 	 * @category CompilerOptionID
@@ -1317,7 +1336,9 @@ public final class JavaCore extends Plugin {
 	 * Compiler option ID: Defining the Automatic Task Priorities.
 	 * <p>In parallel with the Automatic Task Tags, this list defines the priorities (high, normal or low)
 	 *    of the task markers issued by the compiler.
-	 *    If the default is specified, the priority of each task marker is <code>"NORMAL"</code>.
+	 *    If the default is specified, the priority of each task marker is <code>"NORMAL"</code>.</p>
+	 * <p>Task Priorities and task tags must have the same length. If task priorities are set, then task tags should also
+	 * be set.</p>
 	 * <dl>
 	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.taskPriorities"</code></dd>
 	 * <dt>Possible values:</dt><dd><code>{ "<priority>[,<priority>]*" }</code> where <code><priority></code> is one of <code>"HIGH"</code>, <code>"NORMAL"</code> or <code>"LOW"</code></dd>
@@ -1325,6 +1346,7 @@ public final class JavaCore extends Plugin {
 	 * </dl>
 	 * @since 2.1
 	 * @category CompilerOptionID
+	 * @see #COMPILER_TASK_TAGS
 	 */
 	public static final String COMPILER_TASK_PRIORITIES = PLUGIN_ID + ".compiler.taskPriorities"; //$NON-NLS-1$
 	/**
@@ -1332,15 +1354,17 @@ public final class JavaCore extends Plugin {
 	 * <p>When the tag list is not empty, the compiler will issue a task marker whenever it encounters
 	 *    one of the corresponding tags inside any comment in Java source code.
 	 * <p>Generated task messages will start with the tag, and range until the next line separator,
-	 *    comment ending, or tag.
+	 *    comment ending, or tag.</p>
 	 * <p>When a given line of code bears multiple tags, each tag will be reported separately.
 	 *    Moreover, a tag immediately followed by another tag will be reported using the contents of the
-	 *    next non-empty tag of the line, if any.
+	 *    next non-empty tag of the line, if any.</p>
 	 * <p>Note that tasks messages are trimmed. If a tag is starting with a letter or digit, then it cannot be leaded by
 	 *    another letter or digit to be recognized (<code>"fooToDo"</code> will not be recognized as a task for tag <code>"ToDo"</code>, but <code>"foo#ToDo"</code>
 	 *    will be detected for either tag <code>"ToDo"</code> or <code>"#ToDo"</code>). Respectively, a tag ending with a letter or digit cannot be followed
 	 *    by a letter or digit to be recognized (<code>"ToDofoo"</code> will not be recognized as a task for tag <code>"ToDo"</code>, but <code>"ToDo:foo"</code> will
-	 *    be detected either for tag <code>"ToDo"</code> or <code>"ToDo:"</code>).
+	 *    be detected either for tag <code>"ToDo"</code> or <code>"ToDo:"</code>).</p>
+	 * <p>Task Priorities and task tags must have the same length. If task tags are set, then task priorities should also
+	 * be set.</p>
 	 * <dl>
 	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.taskTags"</code></dd>
 	 * <dt>Possible values:</dt><dd><code>{ "<tag>[,<tag>]*" }</code> where <code><tag></code> is a String without any wild-card or leading/trailing spaces</dd>
@@ -1348,6 +1372,7 @@ public final class JavaCore extends Plugin {
 	 * </dl>
 	 * @since 2.1
 	 * @category CompilerOptionID
+	 * @see #COMPILER_TASK_PRIORITIES
 	 */
 	public static final String COMPILER_TASK_TAGS = PLUGIN_ID + ".compiler.taskTags"; //$NON-NLS-1$
 	/**
@@ -1402,6 +1427,21 @@ public final class JavaCore extends Plugin {
 	 */
 	public static final String COMPILER_PB_SUPPRESS_WARNINGS = PLUGIN_ID + ".compiler.problem.suppressWarnings"; //$NON-NLS-1$
 	/**
+	 * Compiler option ID: Further Determining the Effect of <code>@SuppressWarnings</code> if also
+	 * {@link #COMPILER_PB_SUPPRESS_WARNINGS} is enabled.
+	 * <p>When enabled, the <code>@SuppressWarnings</code> annotation can additionally be used to suppress 
+	 * optional compiler diagnostics that have been configured as {@link #ERROR}.
+	 * <p>When disabled, all <code>@SuppressWarnings</code> annotations only affects warnings.
+	 * <dl>
+	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors"</code></dd>
+	 * <dt>Possible values:</dt><dd><code>{ "enabled", "disabled" }</code></dd>
+	 * <dt>Default:</dt><dd><code>"disabled"</code></dd>
+	 * </dl>
+	 * @since 3.6
+	 * @category CompilerOptionID
+	 */
+	public static final String COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS = PLUGIN_ID + ".compiler.problem.suppressOptionalErrors"; //$NON-NLS-1$
+	/**
 	 * Compiler option ID: Reporting Unhandled Warning Token for <code>@SuppressWarnings</code>.
 	 * <p>When enabled, the compiler will issue an error or a warning when encountering a token
 	 *    it cannot handle inside a <code>@SuppressWarnings</code> annotation.
@@ -1526,6 +1566,19 @@ public final class JavaCore extends Plugin {
 	 */
 	public static final String COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD = PLUGIN_ID + ".compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$
 	/**
+	 * Compiler option ID: Reporting Allocation of an Unused Object.
+	 * <p>When enabled, the compiler will issue an error or a warning if an object is allocated but never used,
+	 * neither by holding a reference nor by invoking one of the object's methods.
+	 * <dl>
+	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation"</code></dd>
+	 * <dt>Possible values:</dt><dd><code>{ "error", "warning", "ignore" }</code></dd>
+	 * <dt>Default:</dt><dd><code>"ignore"</code></dd>
+	 * </dl>
+	 * @since 3.6
+	 * @category CompilerOptionID
+	 */
+	public static final String COMPILER_PB_UNUSED_OBJECT_ALLOCATION = PLUGIN_ID + ".compiler.problem.unusedObjectAllocation";  //$NON-NLS-1$
+	/**
 	 * Core option ID: Computing Project Build Order.
 	 * <p>Indicate whether JavaCore should enforce the project build order to be based on
 	 *    the classpath prerequisite chain. When requesting to compute, this takes over
@@ -2969,8 +3022,8 @@ public final class JavaCore extends Plugin {
 	 *
 	 * @return a table of all known configurable options with their default values
 	 */
- 	public static Hashtable getDefaultOptions(){
- 		return JavaModelManager.getJavaModelManager().getDefaultOptions();
+	public static Hashtable getDefaultOptions(){
+		return JavaModelManager.getJavaModelManager().getDefaultOptions();
 	}
 
 	/**
@@ -4540,6 +4593,36 @@ public final class JavaCore extends Plugin {
 			false, // no access rules to combine
 			extraAttributes);
 	}
+	
+	/**
+	 * Returns an array of classpath entries that are referenced directly or indirectly 
+	 * by a given classpath entry. For the entry kind {@link IClasspathEntry#CPE_LIBRARY}, 
+	 * the method returns the libraries that are included in the Class-Path section of 
+	 * the MANIFEST.MF file. If a referenced JAR file has further references to other library 
+	 * entries, they are processed recursively and added to the list. For entry kinds other 
+	 * than {@link IClasspathEntry#CPE_LIBRARY}, this method returns an empty array.
+	 * <p> 
+	 * When a non-null project is passed, any additional attributes that may have been stored 
+	 * previously in the project's .classpath file are retrieved and populated in the 
+	 * corresponding referenced entry. If the project is <code>null</code>, the raw referenced
+	 * entries are returned without any persisted attributes. 
+	 * For more details on storing referenced entries, see 
+	 * {@link IJavaProject#setRawClasspath(IClasspathEntry[], IClasspathEntry[], IPath, 
+	 * IProgressMonitor)}. 
+	 * </p>
+	 * 
+	 * @param libraryEntry the library entry whose referenced entries are sought 
+	 * @param project project where the persisted referenced entries to be retrieved from. If <code>null</code>
+	 * 			persisted attributes are not attempted to be retrived.
+	 * @return an array of classpath entries that are referenced directly or indirectly by the given entry. 
+	 * 			If not applicable, returns an empty array.
+	 * @since 3.6
+	 */
+	public static IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project) {
+		JavaModelManager manager = JavaModelManager.getJavaModelManager();
+		return manager.getReferencedClasspathEntries(libraryEntry, project);
+	}
+	
 	/**
 	 * Removed the given classpath variable. Does nothing if no value was
 	 * set for this classpath variable.
@@ -4584,7 +4667,7 @@ public final class JavaCore extends Plugin {
 
 	/**
 	 * Removes the given element changed listener.
-	 * Has no affect if an identical listener is not registered.
+	 * Has no effect if an identical listener is not registered.
 	 *
 	 * @param listener the listener
 	 */
@@ -4608,7 +4691,7 @@ public final class JavaCore extends Plugin {
 	/**
 	 * Removes the given pre-processing resource changed listener.
 	 * <p>
-	 * Has no affect if an identical listener is not registered.
+	 * Has no effect if an identical listener is not registered.
 	 *
 	 * @param listener the listener
 	 * @since 3.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java
index 2bdb6d4..f2be23e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/NamingConventions.java
@@ -1058,7 +1058,7 @@ public final class NamingConventions {
 	 * There is a heuristic by variable kind.
 	 * <ul>
 	 * <li>{@link #VK_PARAMETER}, {@link #VK_LOCAL}, {@link #VK_INSTANCE_FIELD} and {@link #VK_STATIC_FIELD}:<br>
-	 * In this case the first character will be converted to lower case and the other characters won't be changed.<br>
+	 * In this case the first word will be converted to lower case and the other characters won't be changed.<br>
 	 * If the base name is <code>SimpleName</code> then the suggested name will be <code>simpleName</code>.<br></li>
 	 * <li>{@link #VK_STATIC_FINAL_FIELD} :<br>
 	 * In this case all letters of the name will be converted to upper case and words will be separated by an underscore (<code>"_"</code>).<br>
@@ -1068,7 +1068,7 @@ public final class NamingConventions {
 	 * There is a heuristic by variable kind.
 	 * <ul>
 	 * <li>{@link #VK_PARAMETER}, {@link #VK_LOCAL}, {@link #VK_INSTANCE_FIELD} and {@link #VK_STATIC_FIELD}:<br>
-	 * In this case a variable name will contain some words of the base name and the first character will be converted to lower case.<br>
+	 * In this case a variable name will contain some words of the base name and the first word will be converted to lower case.<br>
 	 * If the type is <code>TypeName</code> then the suggested names will be <code>typeName</code> and <code>name</code>.</li>
 	 * <li>{@link #VK_STATIC_FINAL_FIELD} :<br>
 	 * In this case a variable name will contain some words of the base name, all letters of the name will be converted to upper case and segments will be separated by a underscore (<code>"_"</code>).<br>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java
index 1229209..b290571 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Signature.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -138,6 +138,9 @@ import org.eclipse.jdt.internal.core.util.Util;
  * <p>
  * This class provides static methods and constants only.
  * </p>
+ * <p>Note: An empty signature is considered to be syntactically incorrect. So most methods will throw
+ * an IllegalArgumentException if an empty signature is provided.</p>
+ * 
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public final class Signature {
@@ -2141,7 +2144,7 @@ public static String removeCapture(String methodOrTypeSignature) {
  * @param includeReturnType <code>true</code> if the return type is to be
  *   included
  * @return the char array representation of the method signature
- *
+ * @throws IllegalArgumentException if the method signature is syntactically incorrect
  * @since 2.0
  */
 public static char[] toCharArray(char[] methodSignature, char[] methodName, char[][] parameterNames, boolean fullyQualifyTypeNames, boolean includeReturnType) {
@@ -2172,6 +2175,7 @@ public static char[] toCharArray(char[] methodSignature, char[] methodName, char
  * @param isVargArgs <code>true</code> if the last argument should be displayed as a
  * variable argument,  <code>false</code> otherwise.
  * @return the char array representation of the method signature
+ * @throws IllegalArgumentException if the method signature is syntactically incorrect
  *
  * @since 3.1
  */
@@ -2242,14 +2246,16 @@ public static char[] toCharArray(char[] methodSignature, char[] methodName, char
  *
  * @param signature the type signature
  * @return the string representation of the type
- * @exception IllegalArgumentException if the signature is not syntactically
- *   correct
+ * @exception IllegalArgumentException if the signature is syntactically incorrect
  *
  * @since 2.0
  */
 public static char[] toCharArray(char[] signature) throws IllegalArgumentException {
 		int sigLength = signature.length;
-		if (sigLength == 0 || signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) {
+		if (sigLength == 0) {
+			throw new IllegalArgumentException();
+		}
+		if (signature[0] == C_PARAM_START || signature[0] == C_GENERIC_START) {
 			return toCharArray(signature, CharOperation.NO_CHAR, null, true, true);
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/SourceRange.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/SourceRange.java
new file mode 100644
index 0000000..094916d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/SourceRange.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core;
+
+
+/**
+ * A source range defines an element's source coordinates relative to
+ * its source buffer.
+ *
+ * @see ISourceRange
+ * @since 3.6
+ */
+public final class SourceRange implements ISourceRange {
+
+	/**
+	 * Helper method that answers whether a valid source range is available
+	 * in the given ISourceRange. When an element has no associated source
+	 * code, Java Model APIs may return either <code>null</code> or a range of
+	 * [-1, 0] to indicate an invalid range. This utility method can be used
+	 * to detect that case.
+	 *
+	 * @param range a source range, can be <code>null</code>
+	 * @return <code>true</code> iff range is not null and range.getOffset() is not -1
+	 */
+	public static boolean isAvailable(ISourceRange range) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=130161
+		return range != null && range.getOffset() != -1;
+	}
+
+	private int offset;
+	private int length;
+
+	/**
+	 * Instantiate a new source range using the given offset and the given length.
+	 * 
+	 * @param offset the given offset
+	 * @param length the given length
+	 */
+	public SourceRange(int offset, int length) {
+		this.offset = offset;
+		this.length = length;
+	}
+	/*
+	 * @see Object#equals(Object)
+	 */
+	public boolean equals(Object obj) {
+		if (!(obj instanceof ISourceRange))
+			return false;
+		ISourceRange sourceRange = (ISourceRange) obj;
+		return sourceRange.getOffset() == this.offset && sourceRange.getLength() == this.length;
+	}
+	/**
+	 * @see ISourceRange
+	 */
+	public int getLength() {
+		return this.length;
+	}
+	/**
+	 * @see ISourceRange
+	 */
+	public int getOffset() {
+		return this.offset;
+	}
+
+	/*
+	 * @see Object#hashCode()
+	 */
+	public int hashCode() {
+		return this.length ^ this.offset;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("[offset="); //$NON-NLS-1$
+		buffer.append(this.offset);
+		buffer.append(", length="); //$NON-NLS-1$
+		buffer.append(this.length);
+		buffer.append("]"); //$NON-NLS-1$
+		return buffer.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
index fc3f315..f03ec1c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ToolFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import java.util.zip.ZipFile;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.core.compiler.IScanner;
+import org.eclipse.jdt.core.compiler.ITerminalSymbols;
 import org.eclipse.jdt.core.formatter.CodeFormatter;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
@@ -86,7 +87,7 @@ public class ToolFactory {
 	 * @return an instance of a code formatter
 	 * @see ICodeFormatter
 	 * @see ToolFactory#createDefaultCodeFormatter(Map)
-	 * @deprecated Use {@link #createCodeFormatter(Map)} instead. Extension point is discontinued
+	 * @deprecated The extension point has been deprecated, use {@link #createCodeFormatter(Map)} instead.
 	 */
 	public static ICodeFormatter createCodeFormatter(){
 
@@ -162,6 +163,8 @@ public class ToolFactory {
 		if (options == null) options = JavaCore.getOptions();
 		Map currentOptions = new HashMap(options);
 		if (mode == M_FORMAT_NEW) {
+			// disable the option for not formatting comments starting on first column
+			currentOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN, DefaultCodeFormatterConstants.TRUE);
 			// disable the option for not indenting comments starting on first column
 			currentOptions.put(DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN, DefaultCodeFormatterConstants.FALSE);
 			currentOptions.put(DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN, DefaultCodeFormatterConstants.FALSE);
@@ -342,9 +345,7 @@ public class ToolFactory {
 	}
 
 	/**
-	 * Create an instance of the built-in code formatter. A code formatter implementation can be contributed via the
-	 * extension point "org.eclipse.jdt.core.codeFormatter". If unable to find a registered extension, the factory will
-	 * default to using the default code formatter.
+	 * Create an instance of the default code formatter.
 	 *
 	 * @param options - the options map to use for formatting with the default code formatter. Recognized options
 	 * 	are documented on <code>JavaCore#getDefaultOptions()</code>. If set to <code>null</code>, then use
@@ -353,7 +354,7 @@ public class ToolFactory {
 	 * @see ICodeFormatter
 	 * @see ToolFactory#createCodeFormatter()
 	 * @see JavaCore#getOptions()
-	 * @deprecated Use {@link #createCodeFormatter(Map)} instead
+	 * @deprecated Use {@link #createCodeFormatter(Map)} instead but note the different options
 	 */
 	public static ICodeFormatter createDefaultCodeFormatter(Map options){
 		if (options == null) options = JavaCore.getOptions();
@@ -377,26 +378,38 @@ public class ToolFactory {
 	 * </pre>
 	 * </code>
 	 *
-	 * <p>
-	 * The returned scanner will tolerate unterminated line comments (missing line separator). It can be made stricter
-	 * by using API with extra boolean parameter (<code>strictCommentMode</code>).
-	 * <p>
+	 * <p>By default the compliance used to create the scanner is the workspace's compliance when running inside the IDE
+	 * or 1.4 if running from outside of a headless eclipse.
+	 * </p>
+	 *
 	 * @param tokenizeComments if set to <code>false</code>, comments will be silently consumed
 	 * @param tokenizeWhiteSpace if set to <code>false</code>, white spaces will be silently consumed,
 	 * @param assertMode if set to <code>false</code>, occurrences of 'assert' will be reported as identifiers
-	 * (<code>ITerminalSymbols#TokenNameIdentifier</code>), whereas if set to <code>true</code>, it
-	 * would report assert keywords (<code>ITerminalSymbols#TokenNameassert</code>). Java 1.4 has introduced
+	 * ({@link ITerminalSymbols#TokenNameIdentifier}), whereas if set to <code>true</code>, it
+	 * would report assert keywords ({@link ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
 	 * a new 'assert' keyword.
 	 * @param recordLineSeparator if set to <code>true</code>, the scanner will record positions of encountered line
 	 * separator ends. In case of multi-character line separators, the last character position is considered. These positions
-	 * can then be extracted using <code>IScanner#getLineEnds</code>. Only non-unicode escape sequences are
+	 * can then be extracted using {@link IScanner#getLineEnds()}. Only non-unicode escape sequences are
 	 * considered as valid line separators.
   	 * @return a scanner
 	 * @see org.eclipse.jdt.core.compiler.IScanner
+	 * @see #createScanner(boolean, boolean, boolean, String, String)
 	 */
 	public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean assertMode, boolean recordLineSeparator){
-
-		PublicScanner scanner = new PublicScanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/, assertMode ? ClassFileConstants.JDK1_4 : ClassFileConstants.JDK1_3/*sourceLevel*/, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
+		// use default workspace compliance
+		long complianceLevelValue = CompilerOptions.versionToJdkLevel(JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE));
+		if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; // fault-tolerance
+		PublicScanner scanner =
+			new PublicScanner(
+				tokenizeComments,
+				tokenizeWhiteSpace,
+				false/*nls*/,
+				assertMode ? ClassFileConstants.JDK1_4 : ClassFileConstants.JDK1_3/*sourceLevel*/,
+				complianceLevelValue,
+				null/*taskTags*/,
+				null/*taskPriorities*/,
+				true/*taskCaseSensitive*/);
 		scanner.recordLineSeparator = recordLineSeparator;
 		return scanner;
 	}
@@ -418,29 +431,41 @@ public class ToolFactory {
 	 * </pre>
 	 * </code>
 	 *
-	 * <p>
-	 * The returned scanner will tolerate unterminated line comments (missing line separator). It can be made stricter
-	 * by using API with extra boolean parameter (<code>strictCommentMode</code>).
-	 * <p>
+	 * <p>By default the compliance used to create the scanner is the workspace's compliance when running inside the IDE
+	 * or 1.4 if running from outside of a headless eclipse.
+	 * </p>
+	 *
 	 * @param tokenizeComments if set to <code>false</code>, comments will be silently consumed
 	 * @param tokenizeWhiteSpace if set to <code>false</code>, white spaces will be silently consumed,
 	 * @param recordLineSeparator if set to <code>true</code>, the scanner will record positions of encountered line
 	 * separator ends. In case of multi-character line separators, the last character position is considered. These positions
-	 * can then be extracted using <code>IScanner#getLineEnds</code>. Only non-unicode escape sequences are
+	 * can then be extracted using {@link IScanner#getLineEnds()}. Only non-unicode escape sequences are
 	 * considered as valid line separators.
 	 * @param sourceLevel if set to <code>"1.3"</code> or <code>null</code>, occurrences of 'assert' will be reported as identifiers
-	 * (<code>ITerminalSymbols#TokenNameIdentifier</code>), whereas if set to <code>"1.4"</code>, it
-	 * would report assert keywords (<code>ITerminalSymbols#TokenNameassert</code>). Java 1.4 has introduced
+	 * ({@link ITerminalSymbols#TokenNameIdentifier}), whereas if set to <code>"1.4"</code>, it
+	 * would report assert keywords ({@link ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
 	 * a new 'assert' keyword.
-  	 * @return a scanner
+	 * @return a scanner
 	 * @see org.eclipse.jdt.core.compiler.IScanner
-     * @since 3.0
+	 * @see #createScanner(boolean, boolean, boolean, String, String)
+	 * @since 3.0
 	 */
 	public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean recordLineSeparator, String sourceLevel) {
-		PublicScanner scanner = null;
-		long level = CompilerOptions.versionToJdkLevel(sourceLevel);
-		if (level == 0) level = ClassFileConstants.JDK1_3; // fault-tolerance
-		scanner = new PublicScanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/,level /*sourceLevel*/, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
+		// use default workspace compliance
+		long complianceLevelValue = CompilerOptions.versionToJdkLevel(JavaCore.getOption(JavaCore.COMPILER_COMPLIANCE));
+		if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; // fault-tolerance
+		long sourceLevelValue = CompilerOptions.versionToJdkLevel(sourceLevel);
+		if (sourceLevelValue == 0) sourceLevelValue = ClassFileConstants.JDK1_3; // fault-tolerance
+		PublicScanner scanner =
+			new PublicScanner(
+				tokenizeComments,
+				tokenizeWhiteSpace,
+				false/*nls*/,
+				sourceLevelValue /*sourceLevel*/,
+				complianceLevelValue,
+				null/*taskTags*/,
+				null/*taskPriorities*/,
+				true/*taskCaseSensitive*/);
 		scanner.recordLineSeparator = recordLineSeparator;
 		return scanner;
 	}
@@ -462,33 +487,29 @@ public class ToolFactory {
 	 * </pre>
 	 * </code>
 	 *
-	 * <p>
-	 * The returned scanner will tolerate unterminated line comments (missing line separator). It can be made stricter
-	 * by using API with extra boolean parameter (<code>strictCommentMode</code>).
-	 * <p>
 	 * @param tokenizeComments if set to <code>false</code>, comments will be silently consumed
 	 * @param tokenizeWhiteSpace if set to <code>false</code>, white spaces will be silently consumed,
 	 * @param recordLineSeparator if set to <code>true</code>, the scanner will record positions of encountered line
 	 * separator ends. In case of multi-character line separators, the last character position is considered. These positions
-	 * can then be extracted using <code>IScanner#getLineEnds</code>. Only non-unicode escape sequences are
+	 * can then be extracted using {@link IScanner#getLineEnds()}. Only non-unicode escape sequences are
 	 * considered as valid line separators.
 	 * @param sourceLevel if set to <code>"1.3"</code> or <code>null</code>, occurrences of 'assert' will be reported as identifiers
-	 * (<code>ITerminalSymbols#TokenNameIdentifier</code>), whereas if set to <code>"1.4"</code>, it
-	 * would report assert keywords (<code>ITerminalSymbols#TokenNameassert</code>). Java 1.4 has introduced
+	 * ({@link ITerminalSymbols#TokenNameIdentifier}), whereas if set to <code>"1.4"</code>, it
+	 * would report assert keywords ({@link ITerminalSymbols#TokenNameassert}). Java 1.4 has introduced
 	 * a new 'assert' keyword.
 	 * @param complianceLevel This is used to support the Unicode 4.0 character sets. if set to 1.5 or above,
 	 * the Unicode 4.0 is supporte, otherwise Unicode 3.0 is supported.
-  	 * @return a scanner
+	 * @return a scanner
 	 * @see org.eclipse.jdt.core.compiler.IScanner
 	 *
-     * @since 3.1
+	 * @since 3.1
 	 */
 	public static IScanner createScanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean recordLineSeparator, String sourceLevel, String complianceLevel) {
 		PublicScanner scanner = null;
 		long sourceLevelValue = CompilerOptions.versionToJdkLevel(sourceLevel);
 		if (sourceLevelValue == 0) sourceLevelValue = ClassFileConstants.JDK1_3; // fault-tolerance
 		long complianceLevelValue = CompilerOptions.versionToJdkLevel(complianceLevel);
-		if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_3; // fault-tolerance
+		if (complianceLevelValue == 0) complianceLevelValue = ClassFileConstants.JDK1_4; // fault-tolerance
 		scanner = new PublicScanner(tokenizeComments, tokenizeWhiteSpace, false/*nls*/,sourceLevelValue /*sourceLevel*/, complianceLevelValue, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
 		scanner.recordLineSeparator = recordLineSeparator;
 		return scanner;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java
index d9c11d5..a2aa851 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/CompilationParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ package org.eclipse.jdt.core.compiler;
 import org.eclipse.jdt.core.IJavaProject;
 
 /**
- * A compilation participant is notified of events occuring during the compilation process.
+ * A compilation participant is notified of events occurring during the compilation process.
  * The compilation process not only involves generating .class files (i.e. building), it also involves
  * cleaning the output directory, reconciling a working copy, etc.
  * So the notified events are the result of a build action, a clean action, a reconcile operation
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
index 6fa7747..c79e60c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -118,7 +118,20 @@ public int getASTLevel() {
 public boolean isResolvingBindings() {
 	return this.operation.resolveBindings;
 }
-
+/**
+ * Returns the reconcile flag of this context. This flag is a bitwise value of the constant defined
+ * in {@link ICompilationUnit}.
+ *
+ * @return the reconcile flag of this context
+ * @since 3.6
+ *
+ * @see ICompilationUnit#ENABLE_BINDINGS_RECOVERY
+ * @see ICompilationUnit#ENABLE_STATEMENTS_RECOVERY
+ * @see ICompilationUnit#IGNORE_METHOD_BODIES
+ */
+public int getReconcileFlags() {
+	return this.operation.reconcileFlags;
+}
 /**
  * Returns the delta describing the change to the working copy being reconciled.
  * Returns <code>null</code> if there is no change.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ByteCodeVisitorAdapter.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ByteCodeVisitorAdapter.java
index 78d0f75..dd894ad 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ByteCodeVisitorAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ByteCodeVisitorAdapter.java
@@ -922,7 +922,17 @@ public class ByteCodeVisitorAdapter implements IBytecodeVisitor {
 	public void _instanceof(int pc, int index, IConstantPoolEntry constantClass) {
 		// default behavior is to do nothing
 	}
-
+	/**
+	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
+	 * @since 3.6
+	 */
+	public void _invokedynamic(
+			int pc,
+			int index,
+			IConstantPoolEntry nameEntry,
+			IConstantPoolEntry descriptorEntry) {
+		// default behavior is to do nothing
+	}
 	/**
 	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IBytecodeVisitor.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IBytecodeVisitor.java
index 66d7968..52ccb16 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IBytecodeVisitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IBytecodeVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -166,6 +166,14 @@ public interface IBytecodeVisitor {
 		int pc,
 		int index,
 		IConstantPoolEntry constantClass);
+	/**
+	 * @since 3.6
+	 */
+	void _invokedynamic(
+			int pc,
+			int index,
+			IConstantPoolEntry nameEntry,
+			IConstantPoolEntry descriptorEntry);
 	void _invokeinterface(
 		int pc,
 		int index,
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IOpcodeMnemonics.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IOpcodeMnemonics.java
index e44b6c6..06134b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IOpcodeMnemonics.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IOpcodeMnemonics.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -204,6 +204,10 @@ public interface IOpcodeMnemonics {
 	int INVOKESPECIAL = 0xB7;
 	int INVOKESTATIC = 0xB8;
 	int INVOKEINTERFACE = 0xB9;
+	/**
+	 * @since 3.6
+	 */
+	int INVOKEDYNAMIC = 0xBA;
 	int NEW = 0xBB;
 	int NEWARRAY = 0xBC;
 	int ANEWARRAY = 0xBD;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/OpcodeStringValues.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/OpcodeStringValues.java
index a54c7d5..5acd024 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/OpcodeStringValues.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/OpcodeStringValues.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -207,6 +207,7 @@ public class OpcodeStringValues implements IOpcodeMnemonics {
 		BYTECODE_NAMES[INVOKESPECIAL] = "invokespecial"; //$NON-NLS-1$
 		BYTECODE_NAMES[INVOKESTATIC] = "invokestatic"; //$NON-NLS-1$
 		BYTECODE_NAMES[INVOKEINTERFACE] = "invokeinterface"; //$NON-NLS-1$
+		BYTECODE_NAMES[INVOKEDYNAMIC] = "invokedynamic"; //$NON-NLS-1$
 		BYTECODE_NAMES[NEW] = "new"; //$NON-NLS-1$
 		BYTECODE_NAMES[NEWARRAY] = "newarray"; //$NON-NLS-1$
 		BYTECODE_NAMES[ANEWARRAY] = "anewarray"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Annotation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Annotation.java
index addd5a1..2601848 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Annotation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Annotation.java
@@ -16,6 +16,7 @@ import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IMemberValuePair;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
 import org.eclipse.jdt.internal.compiler.env.IBinaryElementValuePair;
 import org.eclipse.jdt.internal.core.util.Util;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java
index 01807e5..ef32aad 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryType.java
@@ -23,6 +23,7 @@ import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.internal.codeassist.CompletionEngine;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
 import org.eclipse.jdt.internal.compiler.env.IBinaryType;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -315,7 +316,7 @@ public IField[] getFields() throws JavaModelException {
  */
 public int getFlags() throws JavaModelException {
 	IBinaryType info = (IBinaryType) getElementInfo();
-	return info.getModifiers();
+	return info.getModifiers() & ~ClassFileConstants.AccSuper;
 }
 /*
  * @see IType#getFullyQualifiedName()
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Buffer.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Buffer.java
index 54efa0b..4740662 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Buffer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Buffer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,7 +76,7 @@ public void append(char[] text) {
 		}
 		int length = getLength();
 		synchronized(this.lock) {
-		    if (this.contents == null) return;
+			if (this.contents == null) return;
 			moveAndResizeGap(length, text.length);
 			System.arraycopy(text, 0, this.contents, length, text.length);
 			this.gapStart += text.length;
@@ -290,7 +290,7 @@ public void replace(int position, int length, char[] text) {
 	if (!isReadOnly()) {
 		int textLength = text == null ? 0 : text.length;
 		synchronized (this.lock) {
-		    if (this.contents == null) return;
+			if (this.contents == null) return;
 
 			// move gap
 			moveAndResizeGap(position + length, textLength - length);
@@ -416,7 +416,7 @@ public void setContents(char[] newContents) {
 			string = new String(newContents);
 		}
 		synchronized (this.lock) {
-		    if (this.contents == null) return; // ignore if buffer is closed (as per spec)
+			if (this.contents == null) return; // ignore if buffer is closed (as per spec)
 			this.contents = newContents;
 			this.flags |= F_HAS_UNSAVED_CHANGES;
 			this.gapStart = -1;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CancelableNameEnvironment.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CancelableNameEnvironment.java
index f4d8227..c69893b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CancelableNameEnvironment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CancelableNameEnvironment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,12 +19,12 @@ import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
 import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
 
 
-public class CancelableNameEnvironment extends SearchableEnvironment {
-	public IProgressMonitor monitor;
+public class CancelableNameEnvironment extends SearchableEnvironment implements INameEnviromentWithProgress {
+	private IProgressMonitor monitor;
 
 	public CancelableNameEnvironment(JavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException {
 		super(project, owner);
-		this.monitor = monitor;
+		setMonitor(monitor);
 	}
 
 	private void checkCanceled() {
@@ -54,4 +54,8 @@ public class CancelableNameEnvironment extends SearchableEnvironment {
 		checkCanceled();
 		super.findTypes(prefix, findMembers, camelCaseMatch, searchFor, storage, progressMonitor);
 	}
+	
+	public void setMonitor(IProgressMonitor monitor) {
+		this.monitor = monitor;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ChangeClasspathOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ChangeClasspathOperation.java
index c7d59b4..9e8b329 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ChangeClasspathOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ChangeClasspathOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,7 @@ public abstract class ChangeClasspathOperation extends JavaModelOperation {
 	 * - update project references
 	 * - create resolved classpath markers
 	 */
-	protected void classpathChanged(ClasspathChange change) throws JavaModelException {
+	protected void classpathChanged(ClasspathChange change, boolean refreshExternalFolder) throws JavaModelException {
 		// reset the project's caches early since some clients rely on the project's caches being up-to-date when run inside an IWorkspaceRunnable
 		// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212769#c5 )
 		JavaProject project = change.project;
@@ -59,7 +59,7 @@ public abstract class ChangeClasspathOperation extends JavaModelOperation {
 			new ProjectReferenceChange(project, change.oldResolvedClasspath).updateProjectReferencesIfNecessary();
 
 			// and ensure that external folders are updated as well
-			new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(true/*refresh if external linked folder already exists*/, null);
+			new ExternalFolderChange(project, change.oldResolvedClasspath).updateExternalFoldersIfNecessary(refreshExternalFolder, null);
 
 		} else {
 			DeltaProcessingState state = JavaModelManager.getDeltaState();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFile.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFile.java
index edebc15..cf4a1bf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFile.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -445,8 +445,8 @@ public IJavaElement getElementAtConsideringSibling(int position) throws JavaMode
 
 				SourceRange range = mapper.getSourceRange(classFile.getType());
 				if (range == SourceMapper.UNKNOWN_RANGE) continue;
-				int newStart = range.offset;
-				int newEnd = newStart + range.length - 1;
+				int newStart = range.getOffset();
+				int newEnd = newStart + range.getLength() - 1;
 				if(newStart > start && newEnd < end
 						&& newStart <= position && newEnd >= position) {
 					type = classFile.getType();
@@ -625,17 +625,24 @@ private IStatus validateClassFile() {
  * @see Openable
  */
 protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException {
-	SourceMapper mapper = getSourceMapper();
-	if (mapper != null) {
-		return mapSource(mapper, info instanceof IBinaryType ? (IBinaryType) info : null);
+	// Check the cache for the top-level type first
+	IType outerMostEnclosingType = getOuterMostEnclosingType();
+	IBuffer buffer = getBufferManager().getBuffer(outerMostEnclosingType.getClassFile());
+	if (buffer == null) {
+		SourceMapper mapper = getSourceMapper();
+		IBinaryType typeInfo = info instanceof IBinaryType ? (IBinaryType) info : null;
+		if (mapper != null) {
+			buffer = mapSource(mapper, typeInfo, outerMostEnclosingType.getClassFile());
+		}
 	}
-	return null;
+	return buffer;
 }
-private IBuffer mapSource(SourceMapper mapper, IBinaryType info) {
+/** Loads the buffer via SourceMapper, and maps it in SourceMapper */
+private IBuffer mapSource(SourceMapper mapper, IBinaryType info, IClassFile bufferOwner) {
 	char[] contents = mapper.findSource(getType(), info);
 	if (contents != null) {
 		// create buffer
-		IBuffer buffer = BufferManager.createBuffer(this);
+		IBuffer buffer = BufferManager.createBuffer(bufferOwner);
 		if (buffer == null) return null;
 		BufferManager bufManager = getBufferManager();
 		bufManager.addBuffer(buffer);
@@ -649,12 +656,12 @@ private IBuffer mapSource(SourceMapper mapper, IBinaryType info) {
 		buffer.addBufferChangedListener(this);
 
 		// do the source mapping
-		mapper.mapSource(getType(), contents, info);
+		mapper.mapSource(getOuterMostEnclosingType(), contents, info);
 
 		return buffer;
 	} else {
 		// create buffer
-		IBuffer buffer = BufferManager.createNullBuffer(this);
+		IBuffer buffer = BufferManager.createNullBuffer(bufferOwner);
 		if (buffer == null) return null;
 		BufferManager bufManager = getBufferManager();
 		bufManager.addBuffer(buffer);
@@ -674,6 +681,18 @@ private IBuffer mapSource(SourceMapper mapper, IBinaryType info) {
 	else
 		return simpleName;
 }
+
+/** Returns the type of the top-level declaring class used to find the source code */
+private IType getOuterMostEnclosingType() {
+	IType type = getType();
+	IType enclosingType = type.getDeclaringType();
+	while (enclosingType != null) {
+		type = enclosingType;
+		enclosingType = type.getDeclaringType();
+	}
+	return type;
+}
+
 /**
  * Returns the Java Model representation of the given name
  * which is provided in diet class file format, or <code>null</code>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileInfo.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileInfo.java
index c054ddd..5903fce 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -139,7 +139,7 @@ private IMemberValuePair[] getTargetElementTypes(long tagBits) {
 	final Object value;
 	if (values.size() == 0) {
 		if ((tagBits & TagBits.AnnotationTarget) != 0)
-			value = new String[0];
+			value = CharOperation.NO_STRINGS;
 		else
 			return Annotation.NO_MEMBER_VALUE_PAIRS;
 	} else if (values.size() == 1) {
@@ -296,16 +296,17 @@ private void generateTypeParameterInfos(BinaryMember parent, char[] signature, H
 	for (int i = 0, typeParameterCount = typeParameterSignatures.length; i < typeParameterCount; i++) {
 		char[] typeParameterSignature = typeParameterSignatures[i];
 		char[] typeParameterName = Signature.getTypeVariable(typeParameterSignature);
+		CharOperation.replace(typeParameterSignature, '/', '.');
 		char[][] typeParameterBoundSignatures = Signature.getTypeParameterBounds(typeParameterSignature);
 		int boundLength = typeParameterBoundSignatures.length;
 		char[][] typeParameterBounds = new char[boundLength][];
 		for (int j = 0; j < boundLength; j++) {
 			typeParameterBounds[j] = Signature.toCharArray(typeParameterBoundSignatures[j]);
-			CharOperation.replace(typeParameterBounds[j], '/', '.');
 		}
 		TypeParameter typeParameter = new TypeParameter(parent, new String(typeParameterName));
 		TypeParameterElementInfo info = new TypeParameterElementInfo();
 		info.bounds = typeParameterBounds;
+		info.boundsSignatures = typeParameterBoundSignatures;
 		typeParameterHandles.add(typeParameter);
 
 		// ensure that 2 binary methods with the same signature but with different return types have different occurence counts.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
index 043975c..66d40f7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,6 +77,7 @@ public class ClasspathEntry implements IClasspathEntry {
 
 	public static final String TAG_CLASSPATH = "classpath"; //$NON-NLS-1$
 	public static final String TAG_CLASSPATHENTRY = "classpathentry"; //$NON-NLS-1$
+	public static final String TAG_REFERENCED_ENTRY = "referencedentry"; //$NON-NLS-1$
 	public static final String TAG_OUTPUT = "output"; //$NON-NLS-1$
 	public static final String TAG_KIND = "kind"; //$NON-NLS-1$
 	public static final String TAG_PATH = "path"; //$NON-NLS-1$
@@ -141,8 +142,9 @@ public class ClasspathEntry implements IClasspathEntry {
 	private IPath[] exclusionPatterns;
 	private char[][] fullExclusionPatternChars;
 	private final static char[][] UNINIT_PATTERNS = new char[][] { "Non-initialized yet".toCharArray() }; //$NON-NLS-1$
-	private final static ClasspathEntry[] NO_ENTRIES = new ClasspathEntry[0];
+	public final static ClasspathEntry[] NO_ENTRIES = new ClasspathEntry[0];
 	private final static IPath[] NO_PATHS = new IPath[0];
+	private final static IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
 
 	private boolean combineAccessRules;
 
@@ -196,6 +198,11 @@ public class ClasspathEntry implements IClasspathEntry {
 	 * a non-<code>null</code> value.
 	 */
 	public IPath sourceAttachmentRootPath;
+	
+	/**
+	 * See {@link IClasspathEntry#getReferencingEntry()}
+	 */
+	public IClasspathEntry referencingEntry;
 
 	/**
 	 * Specific output location (for this source entry)
@@ -214,11 +221,40 @@ public class ClasspathEntry implements IClasspathEntry {
 	 */
 	public boolean isExported;
 
-	/*
+	/**
 	 * The extra attributes
 	 */
-	IClasspathAttribute[] extraAttributes;
+	public IClasspathAttribute[] extraAttributes;
 
+	public ClasspathEntry(
+			int contentKind,
+			int entryKind,
+			IPath path,
+			IPath[] inclusionPatterns,
+			IPath[] exclusionPatterns,
+			IPath sourceAttachmentPath,
+			IPath sourceAttachmentRootPath,
+			IPath specificOutputLocation,
+			boolean isExported,
+			IAccessRule[] accessRules,
+			boolean combineAccessRules,
+			IClasspathAttribute[] extraAttributes) {
+
+		this(	contentKind, 
+				entryKind, 
+				path, 
+				inclusionPatterns, 
+				exclusionPatterns, 
+				sourceAttachmentPath, 
+				sourceAttachmentRootPath, 
+				specificOutputLocation,
+				null,
+				isExported,
+				accessRules,
+				combineAccessRules,
+				extraAttributes);
+	}
+	
 	/**
 	 * Creates a class path entry of the specified kind with the given path.
 	 */
@@ -231,6 +267,7 @@ public class ClasspathEntry implements IClasspathEntry {
 		IPath sourceAttachmentPath,
 		IPath sourceAttachmentRootPath,
 		IPath specificOutputLocation,
+		IClasspathEntry referencingEntry,
 		boolean isExported,
 		IAccessRule[] accessRules,
 		boolean combineAccessRules,
@@ -241,7 +278,8 @@ public class ClasspathEntry implements IClasspathEntry {
 		this.path = path;
 		this.inclusionPatterns = inclusionPatterns;
 		this.exclusionPatterns = exclusionPatterns;
-
+		this.referencingEntry = referencingEntry;
+		
 		int length;
 		if (accessRules != null && (length = accessRules.length) > 0) {
 			AccessRule[] rules = new AccessRule[length];
@@ -488,7 +526,7 @@ public class ClasspathEntry implements IClasspathEntry {
 	/**
 	 * Returns the XML encoding of the class path.
 	 */
-	public void elementEncode(XMLWriter writer, IPath projectPath, boolean indent, boolean newLine, Map unknownElements) {
+	public void elementEncode(XMLWriter writer, IPath projectPath, boolean indent, boolean newLine, Map unknownElements, boolean isReferencedEntry) {
 		HashMap parameters = new HashMap();
 
 		parameters.put(TAG_KIND, ClasspathEntry.kindToString(this.entryKind));
@@ -552,12 +590,15 @@ public class ClasspathEntry implements IClasspathEntry {
 		boolean hasRestrictions = getAccessRuleSet() != null; // access rule set is null if no access rules
 		ArrayList unknownChildren = unknownXmlElements != null ? unknownXmlElements.children : null;
 		boolean hasUnknownChildren = unknownChildren != null;
+		
+		/* close tag if no extra attributes, no restriction and no unknown children */
+		String tagName = isReferencedEntry ? TAG_REFERENCED_ENTRY : TAG_CLASSPATHENTRY; 
 		writer.printTag(
-			TAG_CLASSPATHENTRY,
+			tagName,
 			parameters,
 			indent,
 			newLine,
-			!hasExtraAttributes && !hasRestrictions && !hasUnknownChildren/*close tag if no extra attributes, no restriction and no unknown children*/);
+			!hasExtraAttributes && !hasRestrictions && !hasUnknownChildren);
 
 		if (hasExtraAttributes)
 			encodeExtraAttributes(writer, indent, newLine);
@@ -569,7 +610,7 @@ public class ClasspathEntry implements IClasspathEntry {
 			encodeUnknownChildren(writer, indent, newLine, unknownChildren);
 
 		if (hasExtraAttributes || hasRestrictions || hasUnknownChildren)
-			writer.endTag(TAG_CLASSPATHENTRY, indent, true/*insert new line*/);
+			writer.endTag(tagName, indent, true/*insert new line*/);
 	}
 
 	void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine) {
@@ -890,6 +931,13 @@ public class ClasspathEntry implements IClasspathEntry {
 					}
 				} else {
 					IPath calledJar = directoryPath.append(new Path(calledFileName));
+					// Ignore if segment count is Zero (https://bugs.eclipse.org/bugs/show_bug.cgi?id=308150)
+					if (calledJar.segmentCount() == 0) {
+						if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
+							Util.verbose("Invalid Class-Path entry " + calledFileName + " in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						continue;
+					}
 					resolvedChainedLibraries(calledJar, visited, result);
 					result.add(calledJar);
 				}
@@ -956,14 +1004,13 @@ public class ClasspathEntry implements IClasspathEntry {
 	 */
 	public static IPath resolveDotDot(IPath path) {
 		IPath newPath = null;
-		IWorkspaceRoot root = null;
 		IPath workspaceLocation = null;
 		for (int i = 0, length = path.segmentCount(); i < length; i++) {
 			String segment = path.segment(i);
 			if (DOT_DOT.equals(segment)) {
 				if (newPath == null) {
 					if (i == 0) {
-						workspaceLocation = (root = ResourcesPlugin.getWorkspace().getRoot()).getLocation();
+						workspaceLocation = workspaceRoot.getLocation();
 						newPath = workspaceLocation;
 					} else {
 						newPath = path.removeFirstSegments(i);
@@ -972,12 +1019,12 @@ public class ClasspathEntry implements IClasspathEntry {
 					if (newPath.segmentCount() > 0) {
 						newPath = newPath.removeLastSegments(1);
 					} else {
-						workspaceLocation = (root = ResourcesPlugin.getWorkspace().getRoot()).getLocation();
+						workspaceLocation = workspaceRoot.getLocation();
 						newPath = workspaceLocation;
 					}
 				}
 			} else if (newPath != null) {
-				if (newPath.equals(workspaceLocation) && root.getProject(segment).isAccessible()) {
+				if (newPath.equals(workspaceLocation) && workspaceRoot.getProject(segment).isAccessible()) {
 					newPath = new Path(segment).makeAbsolute();
 				} else {
 					newPath = newPath.append(segment);
@@ -1178,6 +1225,11 @@ public class ClasspathEntry implements IClasspathEntry {
 		return this.sourceAttachmentRootPath;
 	}
 
+
+	public IClasspathEntry getReferencingEntry() {
+		return this.referencingEntry;
+	}
+
 	/**
 	 * Returns the hash code for this classpath entry
 	 */
@@ -1380,6 +1432,7 @@ public class ClasspathEntry implements IClasspathEntry {
 							getSourceAttachmentPath(),
 							getSourceAttachmentRootPath(),
 							getOutputLocation(),
+							this.getReferencingEntry(),
 							this.isExported,
 							getAccessRules(),
 							this.combineAccessRules,
@@ -1397,19 +1450,21 @@ public class ClasspathEntry implements IClasspathEntry {
 			return NO_ENTRIES;
 		ClasspathEntry[] result = new ClasspathEntry[length];
 		for (int i = 0; i < length; i++) {
+			// Chained(referenced) libraries can have their own attachment path. Hence, set them to null
 			result[i] = new ClasspathEntry(
-									getContentKind(),
-									getEntryKind(),
-									paths[i],
-									this.inclusionPatterns,
-									this.exclusionPatterns,
-									getSourceAttachmentPath(),
-									getSourceAttachmentRootPath(),
-									getOutputLocation(),
-									this.isExported,
-									getAccessRules(),
-									this.combineAccessRules,
-									this.extraAttributes);
+					getContentKind(),
+					getEntryKind(),
+					paths[i],
+					this.inclusionPatterns,
+					this.exclusionPatterns,
+					null,
+					null,
+					getOutputLocation(),
+					this,
+					this.isExported,
+					getAccessRules(),
+					this.combineAccessRules,
+					NO_EXTRA_ATTRIBUTES);
 		}
 		return result;
 	}
@@ -1758,15 +1813,20 @@ public class ClasspathEntry implements IClasspathEntry {
 	 */
 	public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean referredByContainer){
 		IJavaModelStatus status = validateClasspathEntry(project, entry, null, checkSourceAttachment, referredByContainer);
-		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171136, ignore class path errors from optional entries.
-		if (status.getCode() == IJavaModelStatusConstants.INVALID_CLASSPATH && ((ClasspathEntry) entry).isOptional())
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171136 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=300136
+		// Ignore class path errors from optional entries.
+		int statusCode = status.getCode();
+		if ( (statusCode == IJavaModelStatusConstants.INVALID_CLASSPATH || 
+				statusCode == IJavaModelStatusConstants.CP_CONTAINER_PATH_UNBOUND ||
+				statusCode == IJavaModelStatusConstants.CP_VARIABLE_PATH_UNBOUND ||
+				statusCode == IJavaModelStatusConstants.INVALID_PATH) &&
+				((ClasspathEntry) entry).isOptional())
 			return JavaModelStatus.VERIFIED_OK;
 		return status;
 	}
 	
 	private static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, IClasspathContainer entryContainer, boolean checkSourceAttachment, boolean referredByContainer){
 
-		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
 		IPath path = entry.getPath();
 
 		// Build some common strings for status message
@@ -1812,8 +1872,6 @@ public class ClasspathEntry implements IClasspathEntry {
 									|| kind == IClasspathEntry.CPE_SOURCE
 									|| kind == IClasspathEntry.CPE_VARIABLE
 									|| kind == IClasspathEntry.CPE_CONTAINER){
-										String description = container.getDescription();
-										if (description == null) description = path.makeRelative().toString();
 										return new JavaModelStatus(IJavaModelStatusConstants.INVALID_CP_CONTAINER_ENTRY, project, path);
 								}
 								IJavaModelStatus containerEntryStatus = validateClasspathEntry(project, containerEntry, container, checkSourceAttachment, true/*referred by container*/);
@@ -1960,6 +2018,12 @@ public class ClasspathEntry implements IClasspathEntry {
 	private static IJavaModelStatus validateLibraryEntry(IPath path, IJavaProject project, String container, IPath sourceAttachment, String entryPathMsg) {
 		if (path.isAbsolute() && !path.isEmpty()) {
 			Object target = JavaModel.getTarget(path, true);
+			if (target == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=248661
+				IPath workspaceLocation = workspaceRoot.getLocation(); 
+				if (workspaceLocation.isPrefixOf(path)) {
+					target = JavaModel.getTarget(path.makeRelativeTo(workspaceLocation).makeAbsolute(), true);
+				}
+			}
 			if (target != null && !JavaCore.IGNORE.equals(project.getOption(JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL, true))) {
 				long projectTargetJDK = CompilerOptions.versionToJdkLevel(project.getOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, true));
 				long libraryJDK = Util.getJdkLevel(target);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
index f517b45..2d62037 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitElementInfo.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitElementInfo.java
index be6cc9d..6229d32 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitElementInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitElementInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.jdt.internal.core;
 
 import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.SourceRange;
 
 public class CompilationUnitElementInfo extends OpenableElementInfo {
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
index 7e62a1b..6f7ea3e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -140,20 +140,24 @@ public class CompilationUnitProblemFinder extends Compiler {
 		};
 	}
 
+	/*
+	 * Can return null if the process was aborted or canceled 
+	 */
 	public static CompilationUnitDeclaration process(
-		CompilationUnit unitElement,
-		SourceElementParser parser,
-		WorkingCopyOwner workingCopyOwner,
-		HashMap problems,
-		boolean creatingAST,
-		int reconcileFlags,
-		IProgressMonitor monitor)
+			CompilationUnit unitElement,
+			SourceElementParser parser,
+			WorkingCopyOwner workingCopyOwner,
+			HashMap problems,
+			boolean creatingAST,
+			int reconcileFlags,
+			IProgressMonitor monitor)
 		throws JavaModelException {
 
 		JavaProject project = (JavaProject) unitElement.getJavaProject();
 		CancelableNameEnvironment environment = null;
 		CancelableProblemFactory problemFactory = null;
 		CompilationUnitProblemFinder problemFinder = null;
+		CompilationUnitDeclaration unit = null;
 		try {
 			environment = new CancelableNameEnvironment(project, workingCopyOwner, monitor);
 			problemFactory = new CancelableProblemFactory(monitor);
@@ -166,11 +170,13 @@ public class CompilationUnitProblemFinder extends Compiler {
 				compilerOptions,
 				getRequestor(),
 				problemFactory);
-			boolean analyzeAndGenerateCode = !ignoreMethodBodies;
-			CompilationUnitDeclaration unit = null;
-			if (parser != null) {
-				problemFinder.parser = parser;
-				try {
+			boolean analyzeAndGenerateCode = true;
+			if (ignoreMethodBodies) {
+				analyzeAndGenerateCode = false;
+			}
+			try {
+				if (parser != null) {
+					problemFinder.parser = parser;
 					unit = parser.parseCompilationUnit(unitElement, true/*full parse*/, monitor);
 					problemFinder.resolve(
 						unit,
@@ -178,37 +184,38 @@ public class CompilationUnitProblemFinder extends Compiler {
 						true, // verify methods
 						analyzeAndGenerateCode, // analyze code
 						analyzeAndGenerateCode); // generate code
-				} catch (AbortCompilation e) {
-					problemFinder.handleInternalException(e, unit);
+				} else {
+					unit =
+						problemFinder.resolve(
+							unitElement,
+							true, // verify methods
+							analyzeAndGenerateCode, // analyze code
+							analyzeAndGenerateCode); // generate code
 				}
-			} else {
-				unit =
-					problemFinder.resolve(
-						unitElement,
-						true, // verify methods
-						analyzeAndGenerateCode, // analyze code
-						analyzeAndGenerateCode); // generate code
-			}
-			CompilationResult unitResult = unit.compilationResult;
-			CategorizedProblem[] unitProblems = unitResult.getProblems();
-			int length = unitProblems == null ? 0 : unitProblems.length;
-			if (length > 0) {
-				CategorizedProblem[] categorizedProblems = new CategorizedProblem[length];
-				System.arraycopy(unitProblems, 0, categorizedProblems, 0, length);
-				problems.put(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, categorizedProblems);
+			} catch (AbortCompilation e) {
+				problemFinder.handleInternalException(e, unit);
 			}
-			unitProblems = unitResult.getTasks();
-			length = unitProblems == null ? 0 : unitProblems.length;
-			if (length > 0) {
-				CategorizedProblem[] categorizedProblems = new CategorizedProblem[length];
-				System.arraycopy(unitProblems, 0, categorizedProblems, 0, length);
-				problems.put(IJavaModelMarker.TASK_MARKER, categorizedProblems);
-			}
-			if (NameLookup.VERBOSE) {
-				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
-				System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+			if (unit != null) {
+				CompilationResult unitResult = unit.compilationResult;
+				CategorizedProblem[] unitProblems = unitResult.getProblems();
+				int length = unitProblems == null ? 0 : unitProblems.length;
+				if (length > 0) {
+					CategorizedProblem[] categorizedProblems = new CategorizedProblem[length];
+					System.arraycopy(unitProblems, 0, categorizedProblems, 0, length);
+					problems.put(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, categorizedProblems);
+				}
+				unitProblems = unitResult.getTasks();
+				length = unitProblems == null ? 0 : unitProblems.length;
+				if (length > 0) {
+					CategorizedProblem[] categorizedProblems = new CategorizedProblem[length];
+					System.arraycopy(unitProblems, 0, categorizedProblems, 0, length);
+					problems.put(IJavaModelMarker.TASK_MARKER, categorizedProblems);
+				}
+				if (NameLookup.VERBOSE) {
+					System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInSourcePackage: " + environment.nameLookup.timeSpentInSeekTypesInSourcePackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+					System.out.println(Thread.currentThread() + " TIME SPENT in NameLoopkup#seekTypesInBinaryPackage: " + environment.nameLookup.timeSpentInSeekTypesInBinaryPackage + "ms");  //$NON-NLS-1$ //$NON-NLS-2$
+				}
 			}
-			return unit;
 		} catch (OperationCanceledException e) {
 			// catch this exception so as to not enter the catch(RuntimeException e) below
 			throw e;
@@ -226,23 +233,24 @@ public class CompilationUnitProblemFinder extends Compiler {
 			throw new JavaModelException(e, IJavaModelStatusConstants.COMPILER_FAILURE);
 		} finally {
 			if (environment != null)
-				environment.monitor = null; // don't hold a reference to this external object
+				environment.setMonitor(null); // don't hold a reference to this external object
 			if (problemFactory != null)
 				problemFactory.monitor = null; // don't hold a reference to this external object
 			// NB: unit.cleanUp() is done by caller
 			if (problemFinder != null && !creatingAST)
 				problemFinder.lookupEnvironment.reset();
 		}
+		return unit;
 	}
 
 	public static CompilationUnitDeclaration process(
-		CompilationUnit unitElement,
-		WorkingCopyOwner workingCopyOwner,
-		HashMap problems,
-		boolean creatingAST,
-		int reconcileFlags,
-		IProgressMonitor monitor)
-		throws JavaModelException {
+			CompilationUnit unitElement,
+			WorkingCopyOwner workingCopyOwner,
+			HashMap problems,
+			boolean creatingAST,
+			int reconcileFlags,
+			IProgressMonitor monitor)
+			throws JavaModelException {
 
 		return process(unitElement, null/*use default Parser*/, workingCopyOwner, problems, creatingAST, reconcileFlags, monitor);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitStructureRequestor.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitStructureRequestor.java
index 15f5690..00af3a2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitStructureRequestor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitStructureRequestor.java
@@ -29,15 +29,17 @@ import org.eclipse.jdt.internal.compiler.ast.ImportReference;
 import org.eclipse.jdt.internal.compiler.ast.Literal;
 import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
 import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
+import org.eclipse.jdt.internal.compiler.ast.OperatorIds;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
+import org.eclipse.jdt.internal.compiler.ast.UnaryExpression;
 import org.eclipse.jdt.internal.compiler.parser.Parser;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt;
 import org.eclipse.jdt.internal.core.util.ReferenceInfoAdapter;
 import org.eclipse.jdt.internal.core.util.Util;
-
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 /**
  * A requestor for the fuzzy parser, used to compute the children of an ICompilationUnit.
  */
@@ -719,7 +721,19 @@ protected Object getMemberValue(org.eclipse.jdt.internal.core.MemberValuePair me
 		if (memberValuePair.valueKind == -1)
 			memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
 		return values;
+	} else if (expression instanceof UnaryExpression) {			// to deal with negative numerals (see bug - 248312)
+		UnaryExpression unaryExpression = (UnaryExpression) expression;
+		if ((unaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT == OperatorIds.MINUS) {
+			if (unaryExpression.expression instanceof Literal) {
+				Literal subExpression = (Literal) unaryExpression.expression;
+				subExpression.computeConstant();
+				return Util.getNegativeAnnotationMemberValue(memberValuePair, subExpression.constant);
+			}
+		}
+		memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
+		return null;
 	} else {
+		memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
 		return null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyElementsOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyElementsOperation.java
index ca567b3..27aa306 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyElementsOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyElementsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -242,7 +242,7 @@ protected IJavaModelStatus verify() {
  *	<li>INVALID_DESTINATION - The destination parent specified for <code>element</code>
  *		is of an incompatible type. The destination for a package declaration or import declaration must
  *		be a compilation unit; the destination for a type must be a type or compilation
- *		unit; the destinaion for any type member (other than a type) must be a type. When
+ *		unit; the destination for any type member (other than a type) must be a type. When
  *		this error occurs, the element provided in the operation status is the <code>element</code>.
  *	<li>INVALID_NAME - the new name for <code>element</code> does not have valid syntax.
  *      In this case the element and name are provided in the status.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
index 9c33583..9f199b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
index 8dabcbe..d92c42c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -353,7 +353,7 @@ public class DeltaProcessor {
 										// java project doesn't exist: ignore
 									}
 									removeFromParentInfo(javaProject);
-									this.manager.removePerProjectInfo(javaProject);
+									this.manager.removePerProjectInfo(javaProject, false /* don't remove index files and timestamp info of external jar */);
 									this.manager.containerRemove(javaProject);
 								}
 								this.state.rootsAreStale = true;
@@ -376,7 +376,7 @@ public class DeltaProcessor {
 										checkExternalFolderChange(project, javaProject);
 									} else {
 										// remove classpath cache so that initializeRoots() will not consider the project has a classpath
-										this.manager.removePerProjectInfo(javaProject);
+										this.manager.removePerProjectInfo(javaProject, true /* remove external jar files indexes and timestamps */);
 										// remove container cache for this project
 										this.manager.containerRemove(javaProject);
 										// close project
@@ -409,7 +409,7 @@ public class DeltaProcessor {
 						this.manager.forceBatchInitializations(false/*not initAfterLoad*/);
 
 						// remove classpath cache so that initializeRoots() will not consider the project has a classpath
-						this.manager.removePerProjectInfo(javaProject);
+						this.manager.removePerProjectInfo(javaProject, true /* remove external jar files indexes and timestamps*/);
 						// remove container cache for this project
 						this.manager.containerRemove(javaProject);
 
@@ -893,6 +893,7 @@ public class DeltaProcessor {
 									externalArchivesStatus.put(entryPath, EXTERNAL_JAR_ADDED);
 									this.state.getExternalLibTimeStamps().put(entryPath, new Long(newTimeStamp));
 									// index the new jar
+									this.manager.indexManager.removeIndex(entryPath);
 									this.manager.indexManager.indexLibrary(entryPath, project.getProject());
 								}
 							}
@@ -1886,9 +1887,9 @@ public class DeltaProcessor {
 					// notification we see, implies that all projects are about to be refreshed.
 					 projects = ((IWorkspace) o).getRoot().getProjects(IContainer.INCLUDE_HIDDEN);
 				}
-				for (int i = 0; projects != null && i < projects.length; i++) {
-					JavaModelManager.getExternalManager().refreshReferences(projects[i], null);
-				}
+				//https://bugs.eclipse.org/bugs/show_bug.cgi?id=302295
+				// Refresh all project references together in a single job
+				JavaModelManager.getExternalManager().refreshReferences(projects, null);
 				return;
 
 			case IResourceChangeEvent.POST_CHANGE :
@@ -2336,7 +2337,7 @@ public class DeltaProcessor {
 	}
 
 	/*
-	 * Update the current delta (ie. add/remove/change the given element) and update the correponding index.
+	 * Update the current delta (i.e. add/remove/change the given element) and update the correponding index.
 	 * Returns whether the children of the given delta must be processed.
 	 * @throws a JavaModelException if the delta doesn't correspond to a java element of the given type.
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DiscardWorkingCopyOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DiscardWorkingCopyOperation.java
index fa533e6..4e3409d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DiscardWorkingCopyOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DiscardWorkingCopyOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public class DiscardWorkingCopyOperation extends JavaModelOperation {
 		if (useCount == 0) {
 			IJavaProject javaProject = workingCopy.getJavaProject();
 			if (ExternalJavaProject.EXTERNAL_PROJECT_NAME.equals(javaProject.getElementName())) {
-				manager.removePerProjectInfo((JavaProject) javaProject);
+				manager.removePerProjectInfo((JavaProject) javaProject, true /* remove external jar files indexes and timestamps*/);
 				manager.containerRemove(javaProject);
 			}
 			if (!workingCopy.isPrimary()) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
index 526ae19..150768e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,13 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Vector;
 
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -39,14 +42,24 @@ import org.eclipse.jdt.internal.core.util.Util;
 public class ExternalFoldersManager {
 	private static final String EXTERNAL_PROJECT_NAME = ".org.eclipse.jdt.core.external.folders"; //$NON-NLS-1$
 	private static final String LINKED_FOLDER_NAME = ".link"; //$NON-NLS-1$
-	private HashMap folders;
+	private Map folders;
 	private int counter = 0;
+	/* Singleton instance */
+	private static ExternalFoldersManager MANAGER = new ExternalFoldersManager();
 
+	private ExternalFoldersManager() {
+		// Prevent instantiation
+	}
+	
+	public static ExternalFoldersManager getExternalFoldersManager() {
+		return MANAGER;
+	}
+	
 	/*
 	 * Returns a set of external path to external folders referred to on the given classpath.
 	 * Returns null if none.
 	 */
-	public static HashSet 	getExternalFolders(IClasspathEntry[] classpath) {
+	public static HashSet getExternalFolders(IClasspathEntry[] classpath) {
 		if (classpath == null)
 			return null;
 		HashSet folders = null;
@@ -92,8 +105,8 @@ public class ExternalFoldersManager {
 		return addFolder(externalFolderPath, getExternalFoldersProject());
 	}
 
-	private synchronized IFolder addFolder(IPath externalFolderPath, IProject externalFoldersProject) {
-		HashMap knownFolders = getFolders();
+	private IFolder addFolder(IPath externalFolderPath, IProject externalFoldersProject) {
+		Map knownFolders = getFolders();
 		Object existing = knownFolders.get(externalFolderPath);
 		if (existing != null) {
 			return (IFolder) existing;
@@ -129,25 +142,27 @@ public class ExternalFoldersManager {
 			project.delete(true, monitor);
 	}
 
-	private synchronized ArrayList getFoldersToCleanUp(IProgressMonitor monitor) throws CoreException {
+	private ArrayList getFoldersToCleanUp(IProgressMonitor monitor) throws CoreException {
 		DeltaProcessingState state = JavaModelManager.getDeltaState();
 		HashMap roots = state.roots;
 		HashMap sourceAttachments = state.sourceAttachments;
 		if (roots == null && sourceAttachments == null)
 			return null;
-		HashMap knownFolders = getFolders();
-		Iterator iterator = knownFolders.entrySet().iterator();
+		Map knownFolders = getFolders();
 		ArrayList result = null;
-		while (iterator.hasNext()) {
-			Map.Entry entry = (Map.Entry) iterator.next();
-			IPath path = (IPath) entry.getKey();
-			if ((roots != null && !roots.containsKey(path))
-					&& (sourceAttachments != null && !sourceAttachments.containsKey(path))) {
-				IFolder folder = (IFolder) entry.getValue();
-				if (folder != null) {
-					if (result == null)
-						result = new ArrayList();
-					result.add(folder);
+		synchronized (knownFolders) {
+			Iterator iterator = knownFolders.entrySet().iterator();
+			while (iterator.hasNext()) {
+				Map.Entry entry = (Map.Entry) iterator.next();
+				IPath path = (IPath) entry.getKey();
+				if ((roots != null && !roots.containsKey(path))
+						&& (sourceAttachments != null && !sourceAttachments.containsKey(path))) {
+					IFolder folder = (IFolder) entry.getValue();
+					if (folder != null) {
+						if (result == null)
+							result = new ArrayList();
+						result.add(folder);
+					}
 				}
 			}
 		}
@@ -222,13 +237,13 @@ public class ExternalFoldersManager {
 		project.create(desc, IResource.HIDDEN, monitor);
 	}
 
-	public synchronized IFolder getFolder(IPath externalFolderPath) {
+	public IFolder getFolder(IPath externalFolderPath) {
 		return (IFolder) getFolders().get(externalFolderPath);
 	}
 
-	private HashMap getFolders() {
+	private Map getFolders() {
 		if (this.folders == null) {
-			this.folders = new HashMap();
+			Map tempFolders = new HashMap();
 			IProject project = getExternalFoldersProject();
 			try {
 				if (!project.isAccessible()) {
@@ -237,7 +252,7 @@ public class ExternalFoldersManager {
 						openExternalFoldersProject(project, null/*no progress*/);
 					} else {
 						// if project doesn't exist, do not open and recreate it as it means that there are no external folders
-						return this.folders;
+						return this.folders = Collections.synchronizedMap(tempFolders);
 					}
 				}
 				IResource[] members = project.members();
@@ -245,19 +260,72 @@ public class ExternalFoldersManager {
 					IResource member = members[i];
 					if (member.getType() == IResource.FOLDER && member.isLinked() && member.getName().startsWith(LINKED_FOLDER_NAME)) {
 						IPath externalFolderPath = member.getLocation();
-						this.folders.put(externalFolderPath, member);
+						tempFolders.put(externalFolderPath, member);
 					}
 				}
 			} catch (CoreException e) {
 				Util.log(e, "Exception while initializing external folders"); //$NON-NLS-1$
 			}
+			this.folders = Collections.synchronizedMap(tempFolders);
 		}
 		return this.folders;
 	}
-
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=313153
+	// Use the same RefreshJob if the job is still available
+	private void runRefreshJob(Collection paths) {
+		Job[] jobs = Job.getJobManager().find(ResourcesPlugin.FAMILY_MANUAL_REFRESH);
+		RefreshJob refreshJob = null;
+		if (jobs != null) {
+			for (int index = 0; index < jobs.length; index++) {
+				// We are only concerned about ExternalFolderManager.RefreshJob
+				if(jobs[index] instanceof RefreshJob) {
+					refreshJob =  (RefreshJob) jobs[index];
+					refreshJob.addFoldersToRefresh(paths);
+					if (refreshJob.getState() == Job.NONE) {
+						refreshJob.schedule();
+					}
+					break;
+				}
+			}
+		}
+		if (refreshJob == null) {
+			refreshJob = new RefreshJob(new Vector(paths));
+			refreshJob.schedule();
+		}
+	}
 	/*
 	 * Refreshes the external folders referenced on the classpath of the given source project
 	 */
+	public void refreshReferences(final IProject[] sourceProjects, IProgressMonitor monitor) {
+		IProject externalProject = getExternalFoldersProject();
+		try {
+			HashSet externalFolders = null;
+			for (int index = 0; index < sourceProjects.length; index++) {
+				if (sourceProjects[index].equals(externalProject))
+					continue;
+				if (!JavaProject.hasJavaNature(sourceProjects[index]))
+					continue;
+
+				HashSet foldersInProject = getExternalFolders(((JavaProject) JavaCore.create(sourceProjects[index])).getResolvedClasspath());
+				
+				if (foldersInProject == null || foldersInProject.size() == 0)
+					continue;
+				if (externalFolders == null)
+					externalFolders = new HashSet();
+				
+				externalFolders.addAll(foldersInProject);
+			}
+			if (externalFolders == null) 
+				return;
+
+			runRefreshJob(externalFolders);
+
+		} catch (CoreException e) {
+			Util.log(e, "Exception while refreshing external project"); //$NON-NLS-1$
+		}
+		return;
+	}
 	public void refreshReferences(IProject source, IProgressMonitor monitor) {
 		IProject externalProject = getExternalFoldersProject();
 		if (source.equals(externalProject))
@@ -268,35 +336,68 @@ public class ExternalFoldersManager {
 			HashSet externalFolders = getExternalFolders(((JavaProject) JavaCore.create(source)).getResolvedClasspath());
 			if (externalFolders == null)
 				return;
-			final Iterator iterator = externalFolders.iterator();
-			Job refreshJob = new Job(Messages.refreshing_external_folders) {
-				public boolean belongsTo(Object family) {
-					return family == ResourcesPlugin.FAMILY_MANUAL_REFRESH;
-				}
-				protected IStatus run(IProgressMonitor pm) {
-					try {
-						while (iterator.hasNext()) {
-							IPath externalPath = (IPath) iterator.next();
-							IFolder folder = getFolder(externalPath);
-							if (folder != null)
-								folder.refreshLocal(IResource.DEPTH_INFINITE, pm);
-						}
-					} catch (CoreException e) {
-						return e.getStatus();
-					}
-					return Status.OK_STATUS;
-				}
-			};
-			refreshJob.schedule();
+			
+			runRefreshJob(externalFolders);
 		} catch (CoreException e) {
 			Util.log(e, "Exception while refreshing external project"); //$NON-NLS-1$
 		}
 		return;
 	}
 
-	public synchronized IFolder removeFolder(IPath externalFolderPath) {
+	public IFolder removeFolder(IPath externalFolderPath) {
 		return (IFolder) getFolders().remove(externalFolderPath);
 	}
 
-
+	class RefreshJob extends Job {
+		Vector externalFolders = null;
+		RefreshJob(Vector externalFolders){
+			super(Messages.refreshing_external_folders);
+			this.externalFolders = externalFolders;
+		}
+		
+		public boolean belongsTo(Object family) {
+			return family == ResourcesPlugin.FAMILY_MANUAL_REFRESH;
+		}
+		
+		/*
+		 * Add the collection of paths to be refreshed to the already 
+		 * existing list of paths.  
+		 */
+		public void addFoldersToRefresh(Collection paths) {
+			if (!paths.isEmpty() && this.externalFolders == null) {
+				this.externalFolders = new Vector(); 
+			}
+			Iterator it = paths.iterator();
+			while(it.hasNext()) {
+				Object path = it.next();
+				if (!this.externalFolders.contains(path)) {
+					this.externalFolders.add(path);
+				}
+			}
+		}
+		
+		protected IStatus run(IProgressMonitor pm) {
+			try {
+				if (this.externalFolders == null) 
+					return Status.OK_STATUS;
+				IPath externalPath = null;
+				for (int index = 0; index < this.externalFolders.size(); index++ ) {
+					if ((externalPath = (IPath)this.externalFolders.get(index)) != null) {
+						IFolder folder = getFolder(externalPath);
+						if (folder != null)
+							folder.refreshLocal(IResource.DEPTH_INFINITE, pm);
+					}
+					// Set the processed ones to null instead of removing the element altogether,
+					// so that they will not be considered as duplicates.
+					// This will also avoid elements being shifted to the left every time an element
+					// is removed. However, there is a risk of Collection size to be increased more often.
+					this.externalFolders.setElementAt(null, index);
+				}
+			} catch (CoreException e) {
+				return e.getStatus();
+			}
+			return Status.OK_STATUS;
+		}
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalPackageFragmentRoot.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalPackageFragmentRoot.java
index 6894ef1..8471f03 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalPackageFragmentRoot.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalPackageFragmentRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/INameEnviromentWithProgress.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/INameEnviromentWithProgress.java
new file mode 100644
index 0000000..45e13bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/INameEnviromentWithProgress.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.core;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+
+/**
+ * The name environment provides a callback API that the compiler
+ * can use to look up types, compilation units, and packages in the
+ * current environment.  The name environment is passed to the compiler
+ * on creation.
+ * 
+ * This name environment can be canceled using the monitor passed as an argument to
+ * {@link #setMonitor(IProgressMonitor)}.
+ * 
+ * @since 3.6
+ */
+public interface INameEnviromentWithProgress extends INameEnvironment {
+	
+	/**
+	 * Set the monitor for the given name environment. In order to be able to cancel this name environment calls,
+	 * a non-null monitor should be given. 
+	 * 
+	 * @param monitor the given monitor
+	 */
+	void setMonitor(IProgressMonitor monitor);
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ImportContainer.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ImportContainer.java
index 2c5aac2..cf33848 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ImportContainer.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ImportContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,6 @@
 package org.eclipse.jdt.internal.core;
 
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.IImportContainer;
-import org.eclipse.jdt.core.IImportDeclaration;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.ISourceReference;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.core.util.MementoTokenizer;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/InternalNamingConventions.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/InternalNamingConventions.java
index c7939a1..e9ce1a2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/InternalNamingConventions.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/InternalNamingConventions.java
@@ -152,14 +152,18 @@ public class InternalNamingConventions {
 				case IS_UNDERSCORE:
 					switch (previousCharKind) {
 						case IS_UNDERSCORE:
-							if (i > 0) {
-								char pc = sourceName[i - 1];
-								previousCharKind =
-									ScannerHelper.isLowerCase(pc) ? IS_LOWER_CASE :
-										ScannerHelper.isUpperCase(pc) ? IS_UPPER_CASE :
-											pc == '_' ? IS_UNDERSCORE : IS_OTHER;
+							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=283539
+							// Process consecutive underscores only for constant types 
+							if (isConstantField) {
+								if (i > 0) {
+									char pc = sourceName[i - 1];
+									previousCharKind =
+										ScannerHelper.isLowerCase(pc) ? IS_LOWER_CASE :
+											ScannerHelper.isUpperCase(pc) ? IS_UPPER_CASE :
+												pc == '_' ? IS_UNDERSCORE : IS_OTHER;
+								}
+								endIndex = i;
 							}
-							endIndex = i;
 							break;
 						case IS_LOWER_CASE:
 						case IS_UPPER_CASE:
@@ -171,7 +175,8 @@ public class InternalNamingConventions {
 										ScannerHelper.isUpperCase(pc) ? IS_UPPER_CASE :
 											pc == '_' ? IS_UNDERSCORE : IS_OTHER;
 							}
-							endIndex = i;
+							// Include the '_' also. E.g. My_word -> "My_" and "word".
+							endIndex = i+1;
 							break;
 						default:
 							previousCharKind = IS_UNDERSCORE;
@@ -230,8 +235,6 @@ public class InternalNamingConventions {
 		}
 		
 		char[] namePart = nameParts[0];
-		int namePartLength = namePart.length;
-		
 		
 		char[] name = CharOperation.toLowerCase(namePart);
 		
@@ -243,17 +246,16 @@ public class InternalNamingConventions {
 		
 		for (int i = 1; i <= namePartsPtr; i++) {
 			namePart = nameParts[i];
-			namePartLength = namePart.length;
 			
 			name = CharOperation.concat(CharOperation.toLowerCase(namePart), nameSuffix);
-			name[namePartLength] = ScannerHelper.toUpperCase(name[namePartLength]);
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=283539
+			// Only the first word is converted to lower case and the rest of them are not changed for non-constants
 			
 			if (!onlyLongest) {
 				names[namePartsPtr - i] = name;
 			}
 			
 			nameSuffix = CharOperation.concat(namePart, nameSuffix);
-			nameSuffix[namePartLength] = ScannerHelper.toUpperCase(nameSuffix[namePartLength]);
 		}
 		if (onlyLongest) {
 			names[0] = name;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java
index eaa4906..8cedb3d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
index ca05f07..dd1afbf 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -649,40 +649,28 @@ public abstract class JavaElement extends PlatformObject implements IJavaElement
 		}
 
 		if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
-			IClasspathEntry entry= root.getRawClasspathEntry();
-			if (entry == null) {
-				return null;
-			}
-			if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
-				entry= getRealClasspathEntry(root.getJavaProject(), entry.getPath(), root.getPath());
-				if (entry == null) {
-					return null;
+			IClasspathEntry entry= null;
+			try {
+				entry= root.getResolvedClasspathEntry();
+				URL url = getLibraryJavadocLocation(entry);
+				if (url != null) {
+					return url;
 				}
 			}
-			return getLibraryJavadocLocation(entry);
-		}
-		return null;
-	}
-
-	private static IClasspathEntry getRealClasspathEntry(IJavaProject jproject, IPath containerPath, IPath libPath) throws JavaModelException {
-		IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
-		if (container != null) {
-			IClasspathEntry[] entries= container.getClasspathEntries();
-			for (int i= 0; i < entries.length; i++) {
-				IClasspathEntry curr = entries[i];
-				if (curr == null) {
-					if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
-						JavaModelManager.getJavaModelManager().verbose_missbehaving_container(jproject, containerPath, entries);
-					}
-					break;
-				}
-				IClasspathEntry resolved= JavaCore.getResolvedClasspathEntry(curr);
-				if (resolved != null && libPath.equals(resolved.getPath())) {
-					return curr; // return the real entry
-				}
+			catch(JavaModelException jme) {
+				// Proceed with raw classpath
 			}
+			
+			entry= root.getRawClasspathEntry();
+			switch (entry.getEntryKind()) {
+				case IClasspathEntry.CPE_LIBRARY:
+				case IClasspathEntry.CPE_VARIABLE:
+					return getLibraryJavadocLocation(entry);
+				default:
+					return null;
+			}			
 		}
-		return null; // not found
+		return null;
 	}
 
 	protected static URL getLibraryJavadocLocation(IClasspathEntry entry) throws JavaModelException {
@@ -749,7 +737,15 @@ public abstract class JavaElement extends PlatformObject implements IJavaElement
 				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=156307
 				connection.setUseCaches(false);
 			}
-			stream = new BufferedInputStream(connection.getInputStream());
+			try {
+				stream = new BufferedInputStream(connection.getInputStream());
+			} catch (IllegalArgumentException e) {
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=304316
+				return null;
+			} catch (NullPointerException e) {
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=304316
+				return null;
+			}
 			String encoding = connection.getContentEncoding();
 			byte[] contents = org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(stream, connection.getContentLength());
 			if (encoding == null) {
@@ -784,8 +780,8 @@ public abstract class JavaElement extends PlatformObject implements IJavaElement
 					return new String(contents);
 				}
 			}
- 		} catch (MalformedURLException e) {
- 			throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
+		} catch (MalformedURLException e) {
+			throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.CANNOT_RETRIEVE_ATTACHED_JAVADOC, this));
 		} catch (FileNotFoundException e) {
 			// ignore. see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=120559
 		} catch(SocketException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementDelta.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementDelta.java
index 5b08cd4..ee0d715 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementDelta.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementDelta.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,19 +106,17 @@ protected void addAffectedChild(JavaElementDelta child) {
 		fineGrained();
 	}
 
-	if (this.affectedChildren.length == 0) {
+	if (this.affectedChildren == null || this.affectedChildren.length == 0) {
 		this.affectedChildren = new IJavaElementDelta[] {child};
 		return;
 	}
 	JavaElementDelta existingChild = null;
 	int existingChildIndex = -1;
-	if (this.affectedChildren != null) {
-		for (int i = 0; i < this.affectedChildren.length; i++) {
-			if (equalsAndSameParent(this.affectedChildren[i].getElement(), child.getElement())) { // handle case of two jars that can be equals but not in the same project
-				existingChild = (JavaElementDelta)this.affectedChildren[i];
-				existingChildIndex = i;
-				break;
-			}
+	for (int i = 0; i < this.affectedChildren.length; i++) {
+		if (equalsAndSameParent(this.affectedChildren[i].getElement(), child.getElement())) { // handle case of two jars that can be equals but not in the same project
+			existingChild = (JavaElementDelta)this.affectedChildren[i];
+			existingChildIndex = i;
+			break;
 		}
 	}
 	if (existingChild == null) { //new affected child
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementInfo.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementInfo.java
index 135b222..0250d5d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElementInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.jdt.core.IJavaElement;
  * Holds cached structure and properties for a Java element.
  * Subclassed to carry properties for specific kinds of elements.
  */
-public class JavaElementInfo {
+public class JavaElementInfo implements Cloneable {
 
 	/**
 	 * Shared empty collection used for efficiency.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModel.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModel.java
index 173f031..d2e6aba 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModel.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public class JavaModel extends Openable implements IJavaModel {
 
 	/**
 	 * A set of external files ({@link #existingExternalFiles}) which have
-	 * been confirmed as file (ie. which returns true to {@link java.io.File#isFile()}.
+	 * been confirmed as file (i.e. which returns true to {@link java.io.File#isFile()}.
 	 * Note this cache is kept for the whole session.
 	 */
 	public static HashSet existingExternalConfirmedFiles = new HashSet();
@@ -366,14 +366,14 @@ private synchronized static boolean existingExternalFilesContains(File externalF
 }
 
 /**
- * Helper method - returns whether an object is afile (ie. which returns true to {@link java.io.File#isFile()}.
+ * Helper method - returns whether an object is afile (i.e. which returns true to {@link java.io.File#isFile()}.
  */
 public static boolean isFile(Object target) {
 	return getFile(target) != null;
 }
 
 /**
- * Helper method - returns the file item (ie. which returns true to {@link java.io.File#isFile()},
+ * Helper method - returns the file item (i.e. which returns true to {@link java.io.File#isFile()},
  * or null if unbound
  */
 public static synchronized File getFile(Object target) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java
index b276733..6a049a9 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -155,7 +155,7 @@ public IJavaElement getExistingElement(IJavaElement element) {
 }
 
 protected double getMemoryRatio() {
-	if (this.memoryRatio == -1) {
+	if ((int) this.memoryRatio == -1) {
 		long maxMemory = Runtime.getRuntime().maxMemory();
 		// if max memory is infinite, set the ratio to 4d which corresponds to the 256MB that Eclipse defaults to
 		// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=111299)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
index e7f57cc..1a2a73d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -212,6 +212,11 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	public static final String ANNOTATION_PROCESSOR_MANAGER_EXTPOINT_ID = "annotationProcessorManager" ;  //$NON-NLS-1$
 
 	/**
+	 * Name of the JVM parameter to specify whether or not referenced JAR should be resolved for container libraries.
+	 */
+	private static final String RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS = "resolveReferencedLibrariesForContainers"; //$NON-NLS-1$
+	
+	/**
 	 * Special value used for recognizing ongoing initialization and breaking initialization cycles
 	 */
 	public final static IPath VARIABLE_INITIALIZATION_IN_PROGRESS = new Path("Variable Initialization In Progress"); //$NON-NLS-1$
@@ -257,6 +262,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 
 	public static boolean PERF_VARIABLE_INITIALIZER = false;
 	public static boolean PERF_CONTAINER_INITIALIZER = false;
+	// Non-static, which will give it a chance to retain the default when and if JavaModelManager is restarted.
+	boolean resolveReferencedLibrariesForContainers = false;
 
 	public final static ICompilationUnit[] NO_WORKING_COPY = new ICompilationUnit[0];
 
@@ -451,7 +458,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	/* whether an AbortCompilationUnit should be thrown when the source of a compilation unit cannot be retrieved */
 	public ThreadLocal abortOnMissingSource = new ThreadLocal();
 
-	private ExternalFoldersManager externalFoldersManager = new ExternalFoldersManager();
+	private ExternalFoldersManager externalFoldersManager = ExternalFoldersManager.getExternalFoldersManager();
 
 	/**
 	 * Returns whether the given full path (for a package) conflicts with the output location
@@ -781,7 +788,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 					Iterator containerIterator = projectContainers.keySet().iterator();
 					while (containerIterator.hasNext()){
 						IPath containerPath = (IPath)containerIterator.next();
-						if (containerPath.segment(0).equals(containerID)) { // registered container
+						if (containerID.equals(containerPath.segment(0))) { // registered container
 							projectContainers.put(containerPath, null); // reset container value, but leave entry in Map
 						}
 					}
@@ -1095,6 +1102,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		public Object savedState;
 		public boolean triedRead;
 		public IClasspathEntry[] rawClasspath;
+		public IClasspathEntry[] referencedEntries;
 		public IJavaModelStatus rawClasspathStatus;
 		public int rawTimeStamp = 0;
 		public boolean writtingRawClasspath = false;
@@ -1169,9 +1177,11 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 			return setResolvedClasspath(null, null, null, null, this.rawTimeStamp, true/*add classpath change*/);
 		}
 
-		private ClasspathChange setClasspath(IClasspathEntry[] newRawClasspath, IPath newOutputLocation, IJavaModelStatus newRawClasspathStatus, IClasspathEntry[] newResolvedClasspath, Map newRootPathToRawEntries, Map newRootPathToResolvedEntries, IJavaModelStatus newUnresolvedEntryStatus, boolean addClasspathChange) {
+		private ClasspathChange setClasspath(IClasspathEntry[] newRawClasspath, IClasspathEntry[] referencedEntries, IPath newOutputLocation, IJavaModelStatus newRawClasspathStatus, IClasspathEntry[] newResolvedClasspath, Map newRootPathToRawEntries, Map newRootPathToResolvedEntries, IJavaModelStatus newUnresolvedEntryStatus, boolean addClasspathChange) {
 			ClasspathChange classpathChange = addClasspathChange ? addClasspathChange() : null;
 
+			if (referencedEntries != null)	this.referencedEntries = referencedEntries;
+			if (this.referencedEntries == null) this.referencedEntries = ClasspathEntry.NO_ENTRIES;
 			this.rawClasspath = newRawClasspath;
 			this.outputLocation = newOutputLocation;
 			this.rawClasspathStatus = newRawClasspathStatus;
@@ -1191,32 +1201,46 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 			return classpathChange;
 		}
 
-		public synchronized ClasspathChange setRawClasspath(IClasspathEntry[] newRawClasspath, IPath newOutputLocation, IJavaModelStatus newRawClasspathStatus) {
+		public ClasspathChange setRawClasspath(IClasspathEntry[] newRawClasspath, IPath newOutputLocation, IJavaModelStatus newRawClasspathStatus) {
+			return setRawClasspath(newRawClasspath, null, newOutputLocation, newRawClasspathStatus);
+		}
+
+		public synchronized ClasspathChange setRawClasspath(IClasspathEntry[] newRawClasspath, IClasspathEntry[] referencedEntries, IPath newOutputLocation, IJavaModelStatus newRawClasspathStatus) {
 			this.rawTimeStamp++;
-			return setClasspath(newRawClasspath, newOutputLocation, newRawClasspathStatus, null/*resolved classpath*/, null/*root to raw map*/, null/*root to resolved map*/, null/*unresolved status*/, true/*add classpath change*/);
+			return setClasspath(newRawClasspath, referencedEntries, newOutputLocation, newRawClasspathStatus, null/*resolved classpath*/, null/*root to raw map*/, null/*root to resolved map*/, null/*unresolved status*/, true/*add classpath change*/);
 		}
 
-		public synchronized ClasspathChange setResolvedClasspath(IClasspathEntry[] newResolvedClasspath, Map newRootPathToRawEntries, Map newRootPathToResolvedEntries, IJavaModelStatus newUnresolvedEntryStatus, int timeStamp, boolean addClasspathChange) {
+		public ClasspathChange setResolvedClasspath(IClasspathEntry[] newResolvedClasspath, Map newRootPathToRawEntries, Map newRootPathToResolvedEntries, IJavaModelStatus newUnresolvedEntryStatus, int timeStamp, boolean addClasspathChange) {
+			return setResolvedClasspath(newResolvedClasspath, null, newRootPathToRawEntries, newRootPathToResolvedEntries, newUnresolvedEntryStatus, timeStamp, addClasspathChange);
+		}
+		
+		public synchronized ClasspathChange setResolvedClasspath(IClasspathEntry[] newResolvedClasspath, IClasspathEntry[] referencedEntries, Map newRootPathToRawEntries, Map newRootPathToResolvedEntries, IJavaModelStatus newUnresolvedEntryStatus, int timeStamp, boolean addClasspathChange) {
 			if (this.rawTimeStamp != timeStamp)
 				return null;
-			return setClasspath(this.rawClasspath, this.outputLocation, this.rawClasspathStatus, newResolvedClasspath, newRootPathToRawEntries, newRootPathToResolvedEntries, newUnresolvedEntryStatus, addClasspathChange);
+			return setClasspath(this.rawClasspath, referencedEntries, this.outputLocation, this.rawClasspathStatus, newResolvedClasspath, newRootPathToRawEntries, newRootPathToResolvedEntries, newUnresolvedEntryStatus, addClasspathChange);
 		}
 
-		public synchronized IClasspathEntry[] readAndCacheClasspath(JavaProject javaProject) {
+		/**
+		 * Reads the classpath and caches the entries. Returns a two-dimensional array, where the number of elements in the row is fixed to 2.
+		 * The first element is an array of raw classpath entries and the second element is an array of referenced entries that may have been stored
+		 * by the client earlier. See {@link IJavaProject#getReferencedClasspathEntries()} for more details. 
+		 * 
+		 */		
+		public synchronized IClasspathEntry[][] readAndCacheClasspath(JavaProject javaProject) {
 			// read file entries and update status
-			IClasspathEntry[] classpath;
+			IClasspathEntry[][] classpath;
 			IJavaModelStatus status;
 			try {
 				classpath = javaProject.readFileEntriesWithException(null/*not interested in unknown elements*/);
 				status = JavaModelStatus.VERIFIED_OK;
 			} catch (CoreException e) {
-				classpath = JavaProject.INVALID_CLASSPATH;
+				classpath = new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 				status =
 					new JavaModelStatus(
 						IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT,
 						Messages.bind(Messages.classpath_cannotReadClasspathFile, javaProject.getElementName()));
 			} catch (IOException e) {
-				classpath = JavaProject.INVALID_CLASSPATH;
+				classpath = new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 				if (Messages.file_badFormat.equals(e.getMessage()))
 					status =
 						new JavaModelStatus(
@@ -1228,7 +1252,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 							IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT,
 							Messages.bind(Messages.classpath_cannotReadClasspathFile, javaProject.getElementName()));
 			} catch (ClasspathEntry.AssertionFailedException e) {
-				classpath = JavaProject.INVALID_CLASSPATH;
+				classpath = new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 				status =
 					new JavaModelStatus(
 						IJavaModelStatusConstants.INVALID_CLASSPATH_FILE_FORMAT,
@@ -1236,19 +1260,20 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 			}
 
 			// extract out the output location
+			int rawClasspathLength = classpath[0].length;
 			IPath output = null;
-			if (classpath.length > 0) {
-				IClasspathEntry entry = classpath[classpath.length - 1];
+			if (rawClasspathLength > 0) {
+				IClasspathEntry entry = classpath[0][rawClasspathLength - 1];
 				if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) {
 					output = entry.getPath();
-					IClasspathEntry[] copy = new IClasspathEntry[classpath.length - 1];
-					System.arraycopy(classpath, 0, copy, 0, copy.length);
-					classpath = copy;
+					IClasspathEntry[] copy = new IClasspathEntry[rawClasspathLength - 1];
+					System.arraycopy(classpath[0], 0, copy, 0, copy.length);
+					classpath[0] = copy;
 				}
 			}
 
 			// store new raw classpath, new output and new status, and null out resolved info
-			setRawClasspath(classpath, output, status);
+			setRawClasspath(classpath[0], classpath[1], output, status);
 
 			return classpath;
 		}
@@ -1292,20 +1317,31 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 			return buffer.toString();
 		}
 
-		public boolean writeAndCacheClasspath(JavaProject javaProject, final IClasspathEntry[] newRawClasspath, final IPath newOutputLocation) throws JavaModelException {
+		public boolean writeAndCacheClasspath(
+				JavaProject javaProject, 
+				final IClasspathEntry[] newRawClasspath, 
+				IClasspathEntry[] newReferencedEntries,
+				final IPath newOutputLocation) throws JavaModelException {
 			try {
 				this.writtingRawClasspath = true;
+				if (newReferencedEntries == null) newReferencedEntries = this.referencedEntries;
+				
 				// write .classpath
-				if (!javaProject.writeFileEntries(newRawClasspath, newOutputLocation)) {
+				if (!javaProject.writeFileEntries(newRawClasspath, newReferencedEntries,  newOutputLocation)) {
 					return false;
 				}
 				// store new raw classpath, new output and new status, and null out resolved info
-				setRawClasspath(newRawClasspath, newOutputLocation, JavaModelStatus.VERIFIED_OK);
+				setRawClasspath(newRawClasspath, newReferencedEntries, newOutputLocation, JavaModelStatus.VERIFIED_OK);
 			} finally {
 				this.writtingRawClasspath = false;
 			}
 			return true;
 		}
+		
+		public boolean writeAndCacheClasspath(JavaProject javaProject, final IClasspathEntry[] newRawClasspath, final IPath newOutputLocation) throws JavaModelException {
+			return writeAndCacheClasspath(javaProject, newRawClasspath, null, newOutputLocation);
+		}
+
 	}
 
 	public static class PerWorkingCopyInfo implements IProblemRequestor {
@@ -1378,7 +1414,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	/*
 	 * List of IPath of jars that are known to not contain a chaining (through MANIFEST.MF) to another library
 	 */
-	private HashSet nonChainingJars;
+	private Set nonChainingJars;
 
 	/**
 	 * Update the classpath variable cache
@@ -1511,6 +1547,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		if (Platform.isRunning()) {
 			this.indexManager = new IndexManager();
 			this.nonChainingJars = loadNonChainingJarsCache();
+			String includeContainerReferencedLib = System.getProperty(RESOLVE_REFERENCED_LIBRARIES_FOR_CONTAINERS);
+			this.resolveReferencedLibrariesForContainers = TRUE.equalsIgnoreCase(includeContainerReferencedLib);
 		}
 	}
 
@@ -1523,9 +1561,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	}
 	
 	public void addNonChainingJar(IPath path) {
-		if (this.nonChainingJars == null)
-			return;
-		this.nonChainingJars.add(path);
+		if (this.nonChainingJars != null)
+			this.nonChainingJars.add(path);
 	}
 
 	/**
@@ -1642,7 +1679,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	/*
 	 * Return a new Java 6 annotation processor manager.  The manager will need to
 	 * be configured before it can be used.  Returns null if a manager cannot be
-	 * created, ie if the current VM does not support Java 6 annotation processing.
+	 * created, i.e. if the current VM does not support Java 6 annotation processing.
 	 */
 	public AbstractAnnotationProcessorManager createAnnotationProcessorManager() {
 		synchronized(this) {
@@ -1802,7 +1839,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 
 		if (container == null) {
 			if (batchContainerInitializations()) {
-				// avoid deep recursion while initializaing container on workspace restart
+				// avoid deep recursion while initializing container on workspace restart
 				// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=60437)
 				try {
 					container = initializeAllContainers(project, containerPath);
@@ -1819,6 +1856,33 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		return container;
 	}
 
+	public IClasspathEntry[] getReferencedClasspathEntries(IClasspathEntry libraryEntry, IJavaProject project) {
+		
+		IClasspathEntry[] referencedEntries = ((ClasspathEntry)libraryEntry).resolvedChainedLibraries();
+		
+		if (project == null)
+			return referencedEntries;
+		
+		PerProjectInfo perProjectInfo = getPerProjectInfo(project.getProject(), false);
+		if(perProjectInfo == null) 
+			return referencedEntries;
+		
+		List pathToReferencedEntries = new ArrayList(referencedEntries.length);
+		for (int index = 0; index < referencedEntries.length; index++) {
+
+			if (pathToReferencedEntries.contains(referencedEntries[index].getPath()))
+				continue;
+
+			IClasspathEntry persistedEntry = null;
+			if ((persistedEntry = (IClasspathEntry)perProjectInfo.rootPathToResolvedEntries.get(referencedEntries[index].getPath())) != null) {
+				// TODO: reconsider this - may want to copy the values instead of reference assignment?
+				referencedEntries[index] = persistedEntry;
+			}
+			pathToReferencedEntries.add(referencedEntries[index].getPath());
+		}
+		return referencedEntries;
+	}
+	
 	public DeltaProcessor getDeltaProcessor() {
 		return this.deltaState.getDeltaProcessor();
 	}
@@ -1996,11 +2060,11 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		// set options using preferences service lookup
 		Iterator iterator = this.optionNames.iterator();
 		while (iterator.hasNext()) {
-		    String propertyName = (String) iterator.next();
-		    String propertyValue = service.get(propertyName, null, this.preferencesLookup);
-		    if (propertyValue != null) {
-			    options.put(propertyName, propertyValue);
-		    }
+			String propertyName = (String) iterator.next();
+			String propertyValue = service.get(propertyName, null, this.preferencesLookup);
+			if (propertyValue != null) {
+				options.put(propertyName, propertyValue);
+			}
 		}
 
 		// get encoding through resource plugin
@@ -2009,6 +2073,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		// backward compatibility
 		addDeprecatedOptions(options);
 
+		Util.fixTaskTags(options);
 		// store built map in cache
 		this.optionsCache = new Hashtable(options);
 
@@ -2868,8 +2933,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	    }
 	}
 	
-	private HashSet loadNonChainingJarsCache() {
-		HashSet nonChainingJarsCache = new HashSet();
+	private Set loadNonChainingJarsCache() {
+		Set nonChainingJarsCache = new HashSet();
 		File nonChainingJarsFile = getNonChainingJarsFile();
 		DataInputStream in = null;
 		try {
@@ -2891,17 +2956,20 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 				}
 			}
 		}
-		return nonChainingJarsCache;
+		return Collections.synchronizedSet(nonChainingJarsCache);
 	}
 
 	private File getNonChainingJarsFile() {
 		return JavaCore.getPlugin().getStateLocation().append("nonChainingJarsCache").toFile(); //$NON-NLS-1$
 	}
 	
-	private HashSet getNonChainingJarsCache() throws CoreException {
-		if (this.nonChainingJars != null)
+	private Set getNonChainingJarsCache() throws CoreException {
+		// Even if there is one entry in the cache, just return it. It may not be 
+		// the complete cache, but avoid going through all the projects to populate the cache.
+		if (this.nonChainingJars != null && this.nonChainingJars.size() > 0) {
 			return this.nonChainingJars;
-		HashSet result = new HashSet();
+		}
+		Set result = new HashSet();
 		IJavaProject[] projects = getJavaModel().getJavaProjects();
 		for (int i = 0, length = projects.length; i < length; i++) {
 			IJavaProject javaProject = projects[i];
@@ -2916,7 +2984,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 				}
 			}
 		}
-		return result;
+		this.nonChainingJars = Collections.synchronizedSet(result);
+		return this.nonChainingJars;
 	}
 
 	public void loadVariablesAndContainers() throws CoreException {
@@ -3488,7 +3557,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		} else {
 			IClasspathEntry[] entries;
 			try {
-				entries = ((JavaProject) project).decodeClasspath(containerString, null/*not interested in unknown elements*/);
+				entries = ((JavaProject) project).decodeClasspath(containerString, null/*not interested in unknown elements*/)[0];
 			} catch (IOException e) {
 				Util.log(e, "Could not recreate persisted container: \n" + containerString); //$NON-NLS-1$
 				entries = JavaProject.INVALID_CLASSPATH;
@@ -3586,15 +3655,18 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		return null;
 	}
 
-	public void removePerProjectInfo(JavaProject javaProject) {
+	public void removePerProjectInfo(JavaProject javaProject, boolean removeExtJarInfo) {
 		synchronized(this.perProjectInfos) { // use the perProjectInfo collection as its own lock
 			IProject project = javaProject.getProject();
 			PerProjectInfo info= (PerProjectInfo) this.perProjectInfos.get(project);
 			if (info != null) {
 				this.perProjectInfos.remove(project);
-				info.forgetExternalTimestampsAndIndexes();
+				if (removeExtJarInfo) {
+					info.forgetExternalTimestampsAndIndexes();
+				}
 			}
 		}
+		resetNonChainingJarsCache();
 	}
 
 	/*
@@ -3637,7 +3709,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	}
 	
 	public void resetNonChainingJarsCache() {
-		this.nonChainingJars = null;
+		if (this.nonChainingJars != null) 
+			this.nonChainingJars.clear();
 	}
 
 	/*
@@ -3716,12 +3789,14 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		DataOutputStream out = null;
 		try {
 			out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
-			HashSet nonChainingJarsCache = getNonChainingJarsCache();
-			out.writeInt(nonChainingJarsCache.size());
-			Iterator entries = nonChainingJarsCache.iterator();
-			while (entries.hasNext()) {
-				IPath path = (IPath) entries.next();
-				out.writeUTF(path.toPortableString());
+			Set nonChainingJarsCache = getNonChainingJarsCache();
+			synchronized (nonChainingJarsCache) {
+				out.writeInt(nonChainingJarsCache.size());
+				Iterator entries = nonChainingJarsCache.iterator();
+				while (entries.hasNext()) {
+					IPath path = (IPath) entries.next();
+					out.writeUTF(path.toPortableString());
+				}
 			}
 		} catch (IOException e) {
 			IStatus status = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, IStatus.ERROR, "Problems while saving non-chaining jar cache", e); //$NON-NLS-1$
@@ -4323,6 +4398,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 					ICompilationUnit unit = JavaModelManager.createCompilationUnitFrom(file, null);
 					IType type = unit.getType(typeName);
 					types.put(typeName, type); // replace stored path with type itself
+				} else {
+					types.remove(typeName);
 				}
 			}
 		}
@@ -4550,6 +4627,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	public void setOptions(Hashtable newOptions) {
 
 		try {
+			Hashtable cachedValue = newOptions == null ? null : new Hashtable(newOptions);
 			IEclipsePreferences defaultPreferences = getDefaultPreferences();
 			IEclipsePreferences instancePreferences = getInstancePreferences();
 
@@ -4560,7 +4638,12 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 				while (keys.hasMoreElements()){
 					String key = (String)keys.nextElement();
 					if (!this.optionNames.contains(key)) continue; // unrecognized option
-					if (key.equals(JavaCore.CORE_ENCODING)) continue; // skipped, contributed by resource prefs
+					if (key.equals(JavaCore.CORE_ENCODING)) {
+						if (cachedValue != null) {
+							cachedValue.put(key, JavaCore.getEncoding());
+						}
+						continue; // skipped, contributed by resource prefs
+					}
 					String value = (String)newOptions.get(key);
 					String defaultValue = defaultPreferences.get(key, null);
 					if (defaultValue != null && defaultValue.equals(value)) {
@@ -4575,7 +4658,8 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 			instancePreferences.flush();
 
 			// update cache
-			this.optionsCache = newOptions==null ? null : new Hashtable(newOptions);
+			Util.fixTaskTags(cachedValue);
+			this.optionsCache = cachedValue;
 		} catch (BackingStoreException e) {
 			// ignore
 		}
@@ -4649,7 +4733,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 						workspace.run(
 							new IWorkspaceRunnable() {
 								public void run(IProgressMonitor progress) throws CoreException {
-									ISavedState savedState = workspace.addSaveParticipant(JavaCore.getJavaCore(), JavaModelManager.this);
+									ISavedState savedState = workspace.addSaveParticipant(JavaCore.PLUGIN_ID, JavaModelManager.this);
 									if (savedState != null) {
 										// the event type coming from the saved state is always POST_AUTO_BUILD
 										// force it to be POST_CHANGE so that the delta processor can handle it
@@ -4691,7 +4775,7 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 		}
 		IWorkspace workspace = ResourcesPlugin.getWorkspace();
 		workspace.removeResourceChangeListener(this.deltaState);
-		workspace.removeSaveParticipant(JavaCore.getJavaCore());
+		workspace.removeSaveParticipant(JavaCore.PLUGIN_ID);
 
 		// Stop listening to content-type changes
 		Platform.getContentTypeManager().removeContentTypeChangeListener(this);
@@ -4822,6 +4906,20 @@ public class JavaModelManager implements ISaveParticipant, IContentTypeChangeLis
 	public void contentTypeChanged(ContentTypeChangeEvent event) {
 		Util.resetJavaLikeExtensions();
 
+		// Walk through projects to reset their secondary types cache
+		IJavaProject[] projects;
+		try {
+			projects = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProjects();
+		} catch (JavaModelException e) {
+			return;
+		}
+		for (int i = 0, length = projects.length; i < length; i++) {
+			IJavaProject project = projects[i];
+			final PerProjectInfo projectInfo = getPerProjectInfo(project.getProject(), false /* don't create info */);
+			if (projectInfo != null) {
+				projectInfo.secondaryTypes = null;
+			}
+		}
 	}
 
 	public synchronized String cacheToString(String prefix) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelOperation.java
index 842a30f..08c4b60 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -309,7 +309,7 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable, IProgres
 				getSubProgressMonitor(1));
 			setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE);
 			while (resource instanceof IFolder) {
-				// deleting a package: delete the parent if it is empty (eg. deleting x.y where folder x doesn't have resources but y)
+				// deleting a package: delete the parent if it is empty (e.g. deleting x.y where folder x doesn't have resources but y)
 				// without deleting the package fragment root
 				resource = resource.getParent();
 				if (!resource.equals(rootResource) && resource.members().length == 0) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
index 3ca7a60..781dc69 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -45,6 +46,7 @@ import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jdt.core.IClasspathAttribute;
 import org.eclipse.jdt.core.IClasspathContainer;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
@@ -260,6 +262,20 @@ public class JavaProject
 			return false;
 		return true;
 	}
+	
+	private static boolean areClasspathsEqual(IClasspathEntry[] first, IClasspathEntry[] second) {
+		if (first != second){
+		    if (first == null) return false;
+			int length = first.length;
+			if (second == null || second.length != length)
+				return false;
+			for (int i = 0; i < length; i++) {
+				if (!first[i].equals(second[i]))
+					return false;
+			}
+		}
+		return true;
+	}
 
 	/**
 	 * Returns a canonicalized path from the given external path.
@@ -845,10 +861,13 @@ public class JavaProject
 		return new JavaProjectElementInfo();
 	}
 
-	/*
-	 * Reads and decode an XML classpath string
+	/**
+	 * Reads and decode an XML classpath string. Returns a two-dimensional array, where the number of elements in the row is fixed to 2.
+	 * The first element is an array of raw classpath entries and the second element is an array of referenced entries that may have been stored
+	 * by the client earlier. See {@link IJavaProject#getReferencedClasspathEntries()} for more details. 
+	 * 
 	 */
-	public IClasspathEntry[] decodeClasspath(String xmlClasspath, Map unknownElements) throws IOException, ClasspathEntry.AssertionFailedException {
+	public IClasspathEntry[][] decodeClasspath(String xmlClasspath, Map unknownElements) throws IOException, ClasspathEntry.AssertionFailedException {
 
 		ArrayList paths = new ArrayList();
 		IClasspathEntry defaultOutput = null;
@@ -868,7 +887,7 @@ public class JavaProject
 		if (!cpElement.getNodeName().equalsIgnoreCase("classpath")) { //$NON-NLS-1$
 			throw new IOException(Messages.file_badFormat);
 		}
-		NodeList list = cpElement.getElementsByTagName("classpathentry"); //$NON-NLS-1$
+		NodeList list = cpElement.getElementsByTagName(ClasspathEntry.TAG_CLASSPATHENTRY);
 		int length = list.getLength();
 
 		for (int i = 0; i < length; ++i) {
@@ -880,15 +899,32 @@ public class JavaProject
 						defaultOutput = entry; // separate output
 					} else {
 						paths.add(entry);
+					}
+				}
 			}
 		}
+		int pathSize = paths.size();
+		IClasspathEntry[][] entries = new IClasspathEntry[2][];
+		entries[0] = new IClasspathEntry[pathSize + (defaultOutput == null ? 0 : 1)];
+		paths.toArray(entries[0]);
+		if (defaultOutput != null) entries[0][pathSize] = defaultOutput; // ensure output is last item
+		
+		paths.clear();
+		list = cpElement.getElementsByTagName(ClasspathEntry.TAG_REFERENCED_ENTRY);
+		length = list.getLength();
+
+		for (int i = 0; i < length; ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				IClasspathEntry entry = ClasspathEntry.elementDecode((Element)node, this, unknownElements);
+				if (entry != null){
+					paths.add(entry);
+				}
 			}
 		}
-		// return a new empty classpath is it size is 0, to differenciate from an INVALID_CLASSPATH
-		int pathSize = paths.size();
-		IClasspathEntry[] entries = new IClasspathEntry[pathSize + (defaultOutput == null ? 0 : 1)];
-		paths.toArray(entries);
-		if (defaultOutput != null) entries[pathSize] = defaultOutput; // ensure output is last item
+		entries[1] = new IClasspathEntry[paths.size()];
+		paths.toArray(entries[1]);
+
 		return entries;
 	}
 
@@ -911,7 +947,7 @@ public class JavaProject
 				reader.close();
 			}
 
-			if (!node.getNodeName().equalsIgnoreCase("classpathentry") //$NON-NLS-1$
+			if (!node.getNodeName().equalsIgnoreCase(ClasspathEntry.TAG_CLASSPATHENTRY)
 					|| node.getNodeType() != Node.ELEMENT_NODE) {
 				return null;
 			}
@@ -956,7 +992,7 @@ public class JavaProject
 	/**
 	 * Returns the XML String encoding of the class path.
 	 */
-	protected String encodeClasspath(IClasspathEntry[] classpath, IPath outputLocation, boolean indent, Map unknownElements) throws JavaModelException {
+	protected String encodeClasspath(IClasspathEntry[] classpath, IClasspathEntry[] referencedEntries, IPath outputLocation, boolean indent, Map unknownElements) throws JavaModelException {
 		try {
 			ByteArrayOutputStream s = new ByteArrayOutputStream();
 			OutputStreamWriter writer = new OutputStreamWriter(s, "UTF8"); //$NON-NLS-1$
@@ -964,7 +1000,7 @@ public class JavaProject
 
 			xmlWriter.startTag(ClasspathEntry.TAG_CLASSPATH, indent);
 			for (int i = 0; i < classpath.length; ++i) {
-				((ClasspathEntry)classpath[i]).elementEncode(xmlWriter, this.project.getFullPath(), indent, true, unknownElements);
+				((ClasspathEntry)classpath[i]).elementEncode(xmlWriter, this.project.getFullPath(), indent, true, unknownElements, false);
 			}
 
 			if (outputLocation != null) {
@@ -976,6 +1012,12 @@ public class JavaProject
 				xmlWriter.printTag(ClasspathEntry.TAG_CLASSPATHENTRY, parameters, indent, true, true);
 			}
 
+			if (referencedEntries != null) {
+				for (int i = 0; i < referencedEntries.length; ++i) {
+					((ClasspathEntry) referencedEntries[i]).elementEncode(xmlWriter, this.project.getFullPath(), indent, true, unknownElements, true);
+				}
+			}
+			
 			xmlWriter.endTag(ClasspathEntry.TAG_CLASSPATH, indent, true/*insert new line*/);
 			writer.flush();
 			writer.close();
@@ -991,7 +1033,7 @@ public class JavaProject
 			OutputStreamWriter writer = new OutputStreamWriter(s, "UTF8"); //$NON-NLS-1$
 			XMLWriter xmlWriter = new XMLWriter(writer, this, false/*don't print XML version*/);
 
-			((ClasspathEntry)classpathEntry).elementEncode(xmlWriter, this.project.getFullPath(), true/*indent*/, true/*insert new line*/, null/*not interested in unknown elements*/);
+			((ClasspathEntry)classpathEntry).elementEncode(xmlWriter, this.project.getFullPath(), true/*indent*/, true/*insert new line*/, null/*not interested in unknown elements*/, (classpathEntry.getReferencingEntry() != null));
 
 			writer.flush();
 			writer.close();
@@ -1573,13 +1615,11 @@ public class JavaProject
 	 * @see org.eclipse.jdt.core.IJavaProject#getOption(String, boolean)
 	 */
 	public String getOption(String optionName, boolean inheritJavaCoreOptions) {
-
-		String propertyName = optionName;
-		if (JavaModelManager.getJavaModelManager().optionNames.contains(propertyName)){
+		if (JavaModelManager.getJavaModelManager().optionNames.contains(optionName)){
 			IEclipsePreferences projectPreferences = getEclipsePreferences();
-			String javaCoreDefault = inheritJavaCoreOptions ? JavaCore.getOption(propertyName) : null;
+			String javaCoreDefault = inheritJavaCoreOptions ? JavaCore.getOption(optionName) : null;
 			if (projectPreferences == null) return javaCoreDefault;
-			String value = projectPreferences.get(propertyName, javaCoreDefault);
+			String value = projectPreferences.get(optionName, javaCoreDefault);
 			return value == null ? null : value.trim();
 		}
 		return null;
@@ -1634,8 +1674,10 @@ public class JavaProject
 					options.put(propertyName, propertyValue.trim());
 				}
 			}
+			Util.fixTaskTags(options);
 			return options;
 		}
+		Util.fixTaskTags(projectOptions);
 		return projectOptions;
 	}
 
@@ -1843,7 +1885,7 @@ public class JavaProject
 		IClasspathEntry[] classpath = perProjectInfo.rawClasspath;
 		if (classpath != null) return classpath;
 
-		classpath = perProjectInfo.readAndCacheClasspath(this);
+		classpath = perProjectInfo.readAndCacheClasspath(this)[0];
 
 		if (classpath == JavaProject.INVALID_CLASSPATH)
 			return defaultClasspath();
@@ -1852,6 +1894,13 @@ public class JavaProject
 	}
 
 	/**
+	 * @see IJavaProject
+	 */
+	public IClasspathEntry[] getReferencedClasspathEntries() throws JavaModelException {
+		return getPerProjectInfo().referencedEntries;
+	}
+	
+	/**
 	 * @see IJavaProject#getRequiredProjectNames()
 	 */
 	public String[] getRequiredProjectNames() throws JavaModelException {
@@ -2111,45 +2160,20 @@ public class JavaProject
 		if (isSource)
 			return false;
 
-		// then look at resolved entries
-		for (int i = 0; i < length; i++) {
-			IClasspathEntry rawEntry = rawClasspath[i];
-			switch (rawEntry.getEntryKind()) {
-				case IClasspathEntry.CPE_CONTAINER:
-					IClasspathContainer container;
-					try {
-						container = JavaCore.getClasspathContainer(rawEntry.getPath(), this);
-					} catch (JavaModelException e) {
-						break;
-					}
-					if (container == null)
-						break;
-					IClasspathEntry[] containerEntries = container.getClasspathEntries();
-					if (containerEntries == null)
-						break;
-					// container was bound
-					for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
-						IClasspathEntry resolvedEntry = containerEntries[j];
-						if (resolvedEntry == null) {
-							if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
-								JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
-							}
-							return false;
-						}
-						if (isOnClasspathEntry(elementPath, isFolderPath, isPackageFragmentRoot, resolvedEntry))
-							return true;
-					}
-					break;
-				case IClasspathEntry.CPE_VARIABLE:
-					IClasspathEntry resolvedEntry = JavaCore.getResolvedClasspathEntry(rawEntry);
-					if (resolvedEntry == null)
-						break;
-					if (isOnClasspathEntry(elementPath, isFolderPath, isPackageFragmentRoot, resolvedEntry))
-						return true;
-					break;
-			}
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=304081
+		// All the resolved classpath entries need to be considered, including the referenced classpath entries
+		IClasspathEntry[] resolvedClasspath = null;
+		try {
+			resolvedClasspath = getResolvedClasspath();
+		} catch (JavaModelException e) {
+			return false; // Perhaps, not a Java project
 		}
 
+		for (int index = 0; index < resolvedClasspath.length; index++) {
+			if (isOnClasspathEntry(elementPath, isFolderPath, isPackageFragmentRoot, resolvedClasspath[index]))
+				return true;
+		}
+		
 		return false;
 	}
 
@@ -2379,14 +2403,17 @@ public class JavaProject
 			return result;
 		}
 	}
-
-	/*
+	/**
 	 * Reads the classpath file entries of this project's .classpath file.
-	 * This includes the output entry.
+	 * Returns a two-dimensional array, where the number of elements in the row is fixed to 2.
+	 * The first element is an array of raw classpath entries, which includes the output entry,
+	 * and the second element is an array of referenced entries that may have been stored 
+	 * by the client earlier. 
+	 * See {@link IJavaProject#getReferencedClasspathEntries()} for more details.
 	 * As a side effect, unknown elements are stored in the given map (if not null)
 	 * Throws exceptions if the file cannot be accessed or is malformed.
 	 */
-	public IClasspathEntry[] readFileEntriesWithException(Map unknownElements) throws CoreException, IOException, ClasspathEntry.AssertionFailedException {
+	public IClasspathEntry[][] readFileEntriesWithException(Map unknownElements) throws CoreException, IOException, ClasspathEntry.AssertionFailedException {
 		IFile rscFile = this.project.getFile(JavaProject.CLASSPATH_FILENAME);
 		byte[] bytes;
 		if (rscFile.exists()) {
@@ -2405,7 +2432,7 @@ public class JavaProject
 				bytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(file);
 			} catch (IOException e) {
 				if (!file.exists())
-					return defaultClasspath();
+					return new IClasspathEntry[][]{defaultClasspath(), ClasspathEntry.NO_ENTRIES};
 				throw e;
 			}
 		}
@@ -2429,18 +2456,18 @@ public class JavaProject
 	 * This includes the output entry.
 	 * As a side effect, unknown elements are stored in the given map (if not null)
 	 */
-	private IClasspathEntry[] readFileEntries(Map unkwownElements) {
+	private IClasspathEntry[][] readFileEntries(Map unkwownElements) {
 		try {
 			return readFileEntriesWithException(unkwownElements);
 		} catch (CoreException e) {
 			Util.log(e, "Exception while reading " + getPath().append(JavaProject.CLASSPATH_FILENAME)); //$NON-NLS-1$
-			return JavaProject.INVALID_CLASSPATH;
+			return new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 		} catch (IOException e) {
 			Util.log(e, "Exception while reading " + getPath().append(JavaProject.CLASSPATH_FILENAME)); //$NON-NLS-1$
-			return JavaProject.INVALID_CLASSPATH;
+			return new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 		} catch (ClasspathEntry.AssertionFailedException e) {
 			Util.log(e, "Exception while reading " + getPath().append(JavaProject.CLASSPATH_FILENAME)); //$NON-NLS-1$
-			return JavaProject.INVALID_CLASSPATH;
+			return new IClasspathEntry[][]{JavaProject.INVALID_CLASSPATH, ClasspathEntry.NO_ENTRIES};
 		}
 	}
 
@@ -2449,14 +2476,14 @@ public class JavaProject
 	 */
 	public IPath readOutputLocation() {
 		// Read classpath file without creating markers nor logging problems
-		IClasspathEntry[] classpath = readFileEntries(null/*not interested in unknown elements*/);
-		if (classpath == JavaProject.INVALID_CLASSPATH)
+		IClasspathEntry[][] classpath = readFileEntries(null/*not interested in unknown elements*/);
+		if (classpath[0] == JavaProject.INVALID_CLASSPATH)
 			return defaultOutputLocation();
 
 		// extract the output location
 		IPath outputLocation = null;
-		if (classpath.length > 0) {
-			IClasspathEntry entry = classpath[classpath.length - 1];
+		if (classpath[0].length > 0) {
+			IClasspathEntry entry = classpath[0][classpath[0].length - 1];
 			if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) {
 				outputLocation = entry.getPath();
 			}
@@ -2469,20 +2496,20 @@ public class JavaProject
 	 */
 	public IClasspathEntry[] readRawClasspath() {
 		// Read classpath file without creating markers nor logging problems
-		IClasspathEntry[] classpath = readFileEntries(null/*not interested in unknown elements*/);
-		if (classpath == JavaProject.INVALID_CLASSPATH)
+		IClasspathEntry[][] classpath = readFileEntries(null/*not interested in unknown elements*/);
+		if (classpath[0] == JavaProject.INVALID_CLASSPATH)
 			return defaultClasspath();
 
 		// discard the output location
-		if (classpath.length > 0) {
-			IClasspathEntry entry = classpath[classpath.length - 1];
+		if (classpath[0].length > 0) {
+			IClasspathEntry entry = classpath[0][classpath[0].length - 1];
 			if (entry.getContentKind() == ClasspathEntry.K_OUTPUT) {
-				IClasspathEntry[] copy = new IClasspathEntry[classpath.length - 1];
-				System.arraycopy(classpath, 0, copy, 0, copy.length);
-				classpath = copy;
+				IClasspathEntry[] copy = new IClasspathEntry[classpath[0].length - 1];
+				System.arraycopy(classpath[0], 0, copy, 0, copy.length);
+				classpath[0] = copy;
 			}
 		}
-		return classpath;
+		return classpath[0];
 	}
 
 	/**
@@ -2535,14 +2562,47 @@ public class JavaProject
 		IJavaModelStatus unresolvedEntryStatus = JavaModelStatus.VERIFIED_OK;
 		HashMap rawReverseMap = new HashMap();
 		Map rootPathToResolvedEntries = new HashMap();
+		IClasspathEntry[] referencedEntries = null;
 	}
 	
 	public ResolvedClasspath resolveClasspath(IClasspathEntry[] rawClasspath, boolean usePreviousSession, boolean resolveChainedLibraries) throws JavaModelException {
+		return resolveClasspath(rawClasspath, null, usePreviousSession, resolveChainedLibraries);
+	}
+
+	public ResolvedClasspath resolveClasspath(IClasspathEntry[] rawClasspath, IClasspathEntry[] referencedEntries, boolean usePreviousSession, boolean resolveChainedLibraries) throws JavaModelException {
 		JavaModelManager manager = JavaModelManager.getJavaModelManager();
 		ExternalFoldersManager externalFoldersManager = JavaModelManager.getExternalManager();
 		ResolvedClasspath result = new ResolvedClasspath();
 
+		Map referencedEntriesMap = new HashMap();
+		List rawLibrariesPath = new ArrayList();
 		LinkedHashSet resolvedEntries = new LinkedHashSet();
+		
+		if(resolveChainedLibraries) {
+			for (int index = 0; index < rawClasspath.length; index++) {
+				IClasspathEntry currentEntry = rawClasspath[index]; 
+				if (currentEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
+					rawLibrariesPath.add(ClasspathEntry.resolveDotDot(currentEntry.getPath()));
+				}
+			}
+			if (referencedEntries != null) {
+				// The Set is required to keep the order intact while the referencedEntriesMap (Map)
+				// is used to map the referenced entries with path
+				LinkedHashSet referencedEntriesSet = new LinkedHashSet();
+				for (int index = 0; index < referencedEntries.length; index++) {
+					IPath path = referencedEntries[index].getPath();
+					if (!rawLibrariesPath.contains(path) && referencedEntriesMap.get(path) == null) {
+						referencedEntriesMap.put(path, referencedEntries[index]);
+						referencedEntriesSet.add(referencedEntries[index]);
+					}
+				}
+				if (referencedEntriesSet.size() > 0) {
+					result.referencedEntries = new IClasspathEntry[referencedEntriesSet.size()];
+					referencedEntriesSet.toArray(result.referencedEntries);
+				}
+			}
+		}
+		
 		int length = rawClasspath.length;
 		for (int i = 0; i < length; i++) {
 
@@ -2563,14 +2623,21 @@ public class JavaProject
 					if (resolvedEntry == null) {
 						result.unresolvedEntryStatus = new JavaModelStatus(IJavaModelStatusConstants.CP_VARIABLE_PATH_UNBOUND, this, rawEntry.getPath());
 					} else {
-						if (resolveChainedLibraries && resolvedEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
+						// If the entry is already present in the rawReversetMap, it means the entry and the chained libraries
+						// have already been processed. So, skip it.
+						if (resolveChainedLibraries && resolvedEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY
+													&& result.rawReverseMap.get(resolvedEntry.getPath()) == null) {
 							// resolve Class-Path: in manifest
 							ClasspathEntry[] extraEntries = ((ClasspathEntry) resolvedEntry).resolvedChainedLibraries();
 							for (int j = 0, length2 = extraEntries.length; j < length2; j++) {
-								addToResult(rawEntry, extraEntries[j], result, resolvedEntries, externalFoldersManager);
+								if (!rawLibrariesPath.contains(extraEntries[j].getPath())) {
+									// https://bugs.eclipse.org/bugs/show_bug.cgi?id=305037
+									// referenced entries for variable entries could also be persisted with extra attributes, so addAsChainedEntry = true
+									addToResult(rawEntry, extraEntries[j], result, resolvedEntries, externalFoldersManager, referencedEntriesMap, true);
+								}
 							}
 						}
-						addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager);
+						addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false);
 					}
 					break;
 
@@ -2604,16 +2671,21 @@ public class JavaProject
 						if (cEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
 							// resolve ".." in library path
 							cEntry = cEntry.resolvedDotDot();
-							
-							if (resolveChainedLibraries) {
+							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=313965
+							// Do not resolve if the system attribute is set to false	
+							if (resolveChainedLibraries
+									&& JavaModelManager.getJavaModelManager().resolveReferencedLibrariesForContainers
+									&& result.rawReverseMap.get(cEntry.getPath()) == null) {
 								// resolve Class-Path: in manifest
 								ClasspathEntry[] extraEntries = cEntry.resolvedChainedLibraries();
 								for (int k = 0, length2 = extraEntries.length; k < length2; k++) {
-									addToResult(rawEntry, extraEntries[k], result, resolvedEntries, externalFoldersManager);
+									if (!rawLibrariesPath.contains(extraEntries[k].getPath())) {
+										addToResult(rawEntry, extraEntries[k], result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false);
+									}
 								}
 							}
 						}
-						addToResult(rawEntry, cEntry, result, resolvedEntries, externalFoldersManager);
+						addToResult(rawEntry, cEntry, result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false);
 					}
 					break;
 
@@ -2621,18 +2693,20 @@ public class JavaProject
 					// resolve ".." in library path
 					resolvedEntry = ((ClasspathEntry) rawEntry).resolvedDotDot();
 					
-					if (resolveChainedLibraries) {
+					if (resolveChainedLibraries && result.rawReverseMap.get(resolvedEntry.getPath()) == null) {
 						// resolve Class-Path: in manifest
 						ClasspathEntry[] extraEntries = ((ClasspathEntry) resolvedEntry).resolvedChainedLibraries();
 						for (int k = 0, length2 = extraEntries.length; k < length2; k++) {
-							addToResult(rawEntry, extraEntries[k], result, resolvedEntries, externalFoldersManager);
+							if (!rawLibrariesPath.contains(extraEntries[k].getPath())) {
+								addToResult(rawEntry, extraEntries[k], result, resolvedEntries, externalFoldersManager, referencedEntriesMap, true);
+							}
 						}
 					}
 
-					addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager);
+					addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false);
 					break;
 				default :
-					addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager);
+					addToResult(rawEntry, resolvedEntry, result, resolvedEntries, externalFoldersManager, referencedEntriesMap, false);
 					break;
 			}
 		}
@@ -2641,18 +2715,46 @@ public class JavaProject
 		return result;
 	}
 
-	private void addToResult(IClasspathEntry rawEntry, IClasspathEntry resolvedEntry, ResolvedClasspath result, LinkedHashSet resolvedEntries, ExternalFoldersManager externalFoldersManager) {
+	private void addToResult(IClasspathEntry rawEntry, IClasspathEntry resolvedEntry, ResolvedClasspath result,
+			LinkedHashSet resolvedEntries, ExternalFoldersManager externalFoldersManager,
+			Map oldChainedEntriesMap, boolean addAsChainedEntry) {
+
 		IPath resolvedPath;
+		// If it's already been resolved, do not add to resolvedEntries
 		if (result.rawReverseMap.get(resolvedPath = resolvedEntry.getPath()) == null) {
 			result.rawReverseMap.put(resolvedPath, rawEntry);
 			result.rootPathToResolvedEntries.put(resolvedPath, resolvedEntry);
+			resolvedEntries.add(resolvedEntry);
+			if (addAsChainedEntry) {
+				IClasspathEntry chainedEntry = null;
+				chainedEntry = (ClasspathEntry) oldChainedEntriesMap.get(resolvedPath);
+				if (chainedEntry != null) {
+					// This is required to keep the attributes if any added by the user in
+					// the previous session such as source attachment path etc.
+					copyFromOldChainedEntry((ClasspathEntry) resolvedEntry, (ClasspathEntry) chainedEntry);
+				}
+			}
 		}
-		resolvedEntries.add(resolvedEntry);
 		if (resolvedEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY && ExternalFoldersManager.isExternalFolderPath(resolvedPath)) {
 			externalFoldersManager.addFolder(resolvedPath); // no-op if not an external folder or if already registered
 		}
 	}
 
+	private void copyFromOldChainedEntry(ClasspathEntry resolvedEntry, ClasspathEntry chainedEntry) {
+		IPath path = chainedEntry.getSourceAttachmentPath();
+		if ( path != null) {
+			resolvedEntry.sourceAttachmentPath = path;
+		}
+		path = chainedEntry.getSourceAttachmentRootPath();
+		if (path != null) {
+			resolvedEntry.sourceAttachmentRootPath = path;
+		}
+		IClasspathAttribute[] attributes = chainedEntry.getExtraAttributes();
+		if (attributes != null) {
+			resolvedEntry.extraAttributes = attributes;
+		}
+	}
+	
 	/*
 	 * Resolve the given perProjectInfo's raw classpath and store the resolved classpath in the perProjectInfo.
 	 */
@@ -2667,22 +2769,24 @@ public class JavaProject
 			}
 
 			// get raw info inside a synchronized block to ensure that it is consistent
-			IClasspathEntry[] rawClasspath;
+			IClasspathEntry[][] classpath = new IClasspathEntry[2][];
 			int timeStamp;
 			synchronized (perProjectInfo) {
-				rawClasspath= perProjectInfo.rawClasspath;
-				if (rawClasspath == null)
-					rawClasspath = perProjectInfo.readAndCacheClasspath(this);
+				classpath[0] = perProjectInfo.rawClasspath;
+				classpath[1] = perProjectInfo.referencedEntries;
+				// Checking null only for rawClasspath enough
+				if (classpath[0] == null)
+					classpath = perProjectInfo.readAndCacheClasspath(this);
 				timeStamp = perProjectInfo.rawTimeStamp;
 			}
-			
-			ResolvedClasspath result = resolveClasspath(rawClasspath, usePreviousSession, true/*resolve chained libraries*/);
 
+			ResolvedClasspath result = resolveClasspath(classpath[0], classpath[1], usePreviousSession, true/*resolve chained libraries*/);
+			
 			if (CP_RESOLUTION_BP_LISTENERS != null)
 				breakpoint(2, this);
 
 			// store resolved info along with the raw info to ensure consistency
-			perProjectInfo.setResolvedClasspath(result.resolvedClasspath, result.rawReverseMap, result.rootPathToResolvedEntries, usePreviousSession ? PerProjectInfo.NEED_RESOLUTION : result.unresolvedEntryStatus, timeStamp, addClasspathChange);
+			perProjectInfo.setResolvedClasspath(result.resolvedClasspath, result.referencedEntries, result.rawReverseMap, result.rootPathToResolvedEntries, usePreviousSession ? PerProjectInfo.NEED_RESOLUTION : result.unresolvedEntryStatus, timeStamp, addClasspathChange);
 		} finally {
 			if (!isClasspathBeingResolved) {
 				manager.setClasspathBeingResolved(this, false);
@@ -2710,25 +2814,30 @@ public class JavaProject
 	 * @return boolean Return whether the .classpath file was modified.
 	 * @throws JavaModelException
 	 */
-	public boolean writeFileEntries(IClasspathEntry[] newClasspath, IPath newOutputLocation) throws JavaModelException {
+	public boolean writeFileEntries(IClasspathEntry[] newClasspath, IClasspathEntry[] referencedEntries, IPath newOutputLocation) throws JavaModelException {
 
 		if (!this.project.isAccessible()) return false;
 
 		Map unknownElements = new HashMap();
-		IClasspathEntry[] fileEntries = readFileEntries(unknownElements);
-		if (fileEntries != JavaProject.INVALID_CLASSPATH && areClasspathsEqual(newClasspath, newOutputLocation, fileEntries)) {
+		IClasspathEntry[][] fileEntries = readFileEntries(unknownElements);
+		if (fileEntries[0] != JavaProject.INVALID_CLASSPATH && 
+				areClasspathsEqual(newClasspath, newOutputLocation, fileEntries[0])
+				&& (referencedEntries == null || areClasspathsEqual(referencedEntries, fileEntries[1])) ) {
 			// no need to save it, it is the same
 			return false;
 		}
 
 		// actual file saving
 		try {
-			setSharedProperty(JavaProject.CLASSPATH_FILENAME, encodeClasspath(newClasspath, newOutputLocation, true, unknownElements));
+			setSharedProperty(JavaProject.CLASSPATH_FILENAME, encodeClasspath(newClasspath, referencedEntries, newOutputLocation, true, unknownElements));
 			return true;
 		} catch (CoreException e) {
 			throw new JavaModelException(e);
 		}
 	}
+	public boolean writeFileEntries(IClasspathEntry[] newClasspath, IPath newOutputLocation) throws JavaModelException {
+		return writeFileEntries(newClasspath, ClasspathEntry.NO_ENTRIES, newOutputLocation);
+	}
 
 	/**
 	 * Update the Java command in the build spec (replace existing one if present,
@@ -2876,22 +2985,7 @@ public class JavaProject
 			boolean canModifyResources,
 			IProgressMonitor monitor)
 			throws JavaModelException {
-
-		try {
-			if (newRawClasspath == null) //are we already with the default classpath
-				newRawClasspath = defaultClasspath();
-
-			SetClasspathOperation op =
-				new SetClasspathOperation(
-					this,
-					newRawClasspath,
-					newOutputLocation,
-					canModifyResources);
-			op.runOperation(monitor);
-		} catch (JavaModelException e) {
-			JavaModelManager.getJavaModelManager().getDeltaProcessor().flush();
-			throw e;
-		}
+		setRawClasspath(newRawClasspath, null, newOutputLocation, canModifyResources, monitor);
 	}
 
 	/**
@@ -2909,6 +3003,32 @@ public class JavaProject
 			true/*can change resource (as per API contract)*/,
 			monitor);
 	}
+	
+	public void setRawClasspath(IClasspathEntry[] entries, IClasspathEntry[] referencedEntries, IPath outputLocation,
+			IProgressMonitor monitor) throws JavaModelException {
+		setRawClasspath(entries, referencedEntries, outputLocation, true, monitor);
+	}
+	
+	protected void setRawClasspath(IClasspathEntry[] newRawClasspath, IClasspathEntry[] referencedEntries, IPath newOutputLocation,
+			boolean canModifyResources,	IProgressMonitor monitor) throws JavaModelException {
+
+		try {
+			if (newRawClasspath == null) //are we already with the default classpath
+				newRawClasspath = defaultClasspath();
+
+			SetClasspathOperation op =
+				new SetClasspathOperation(
+					this,
+					newRawClasspath,
+					referencedEntries,
+					newOutputLocation,
+					canModifyResources);
+			op.runOperation(monitor);
+		} catch (JavaModelException e) {
+			JavaModelManager.getJavaModelManager().getDeltaProcessor().flush();
+			throw e;
+		}
+	}
 
 	/**
 	 * @see IJavaProject
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocConstants.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocConstants.java
index 26bd3ff..239665b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocConstants.java
@@ -13,25 +13,25 @@ package org.eclipse.jdt.internal.core;
 public interface JavadocConstants {
 
 	String ANCHOR_PREFIX_END = "\""; //$NON-NLS-1$
-	String ANCHOR_PREFIX_START = "<A NAME=\""; //$NON-NLS-1$
-	int ANCHOR_PREFIX_START_LENGHT = ANCHOR_PREFIX_START.length();
-	String ANCHOR_SUFFIX = "</A>"; //$NON-NLS-1$
-	int ANCHOR_SUFFIX_LENGTH = JavadocConstants.ANCHOR_SUFFIX.length();
-	String CONSTRUCTOR_DETAIL = "<!-- ========= CONSTRUCTOR DETAIL ======== -->"; //$NON-NLS-1$
-	String CONSTRUCTOR_SUMMARY = "<!-- ======== CONSTRUCTOR SUMMARY ======== -->"; //$NON-NLS-1$
-	String FIELD_DETAIL= "<!-- ============ FIELD DETAIL =========== -->"; //$NON-NLS-1$
-	String FIELD_SUMMARY = "<!-- =========== FIELD SUMMARY =========== -->"; //$NON-NLS-1$
-	String ENUM_CONSTANT_SUMMARY = "<!-- =========== ENUM CONSTANT SUMMARY =========== -->"; //$NON-NLS-1$
-	String ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY = "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->"; //$NON-NLS-1$
-	String ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY = "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->"; //$NON-NLS-1$
-	String END_OF_CLASS_DATA = "<!-- ========= END OF CLASS DATA ========= -->"; //$NON-NLS-1$
+	char[] ANCHOR_PREFIX_START = "<A NAME=\"".toCharArray(); //$NON-NLS-1$
+	int ANCHOR_PREFIX_START_LENGHT = ANCHOR_PREFIX_START.length;
+	char[] ANCHOR_SUFFIX = "</A>".toCharArray(); //$NON-NLS-1$
+	int ANCHOR_SUFFIX_LENGTH = JavadocConstants.ANCHOR_SUFFIX.length;
+	char[] CONSTRUCTOR_DETAIL = "<!-- ========= CONSTRUCTOR DETAIL ======== -->".toCharArray(); //$NON-NLS-1$
+	char[] CONSTRUCTOR_SUMMARY = "<!-- ======== CONSTRUCTOR SUMMARY ======== -->".toCharArray(); //$NON-NLS-1$
+	char[] FIELD_DETAIL= "<!-- ============ FIELD DETAIL =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] FIELD_SUMMARY = "<!-- =========== FIELD SUMMARY =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] ENUM_CONSTANT_SUMMARY = "<!-- =========== ENUM CONSTANT SUMMARY =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY = "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY = "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] END_OF_CLASS_DATA = "<!-- ========= END OF CLASS DATA ========= -->".toCharArray(); //$NON-NLS-1$
 	String HTML_EXTENSION = ".html"; //$NON-NLS-1$
 	String INDEX_FILE_NAME = "index.html"; //$NON-NLS-1$
-	String METHOD_DETAIL = "<!-- ============ METHOD DETAIL ========== -->"; //$NON-NLS-1$
-	String METHOD_SUMMARY = "<!-- ========== METHOD SUMMARY =========== -->"; //$NON-NLS-1$
-	String NESTED_CLASS_SUMMARY = "<!-- ======== NESTED CLASS SUMMARY ======== -->"; //$NON-NLS-1$
+	char[] METHOD_DETAIL = "<!-- ============ METHOD DETAIL ========== -->".toCharArray(); //$NON-NLS-1$
+	char[] METHOD_SUMMARY = "<!-- ========== METHOD SUMMARY =========== -->".toCharArray(); //$NON-NLS-1$
+	char[] NESTED_CLASS_SUMMARY = "<!-- ======== NESTED CLASS SUMMARY ======== -->".toCharArray(); //$NON-NLS-1$
 	String PACKAGE_FILE_NAME = "package-summary.html"; //$NON-NLS-1$
-	String SEPARATOR_START = "<!-- ="; //$NON-NLS-1$
-	String START_OF_CLASS_DATA = "<!-- ======== START OF CLASS DATA ======== -->"; //$NON-NLS-1$
-	int START_OF_CLASS_DATA_LENGTH = JavadocConstants.START_OF_CLASS_DATA.length();
+	char[] SEPARATOR_START = "<!-- =".toCharArray(); //$NON-NLS-1$
+	char[] START_OF_CLASS_DATA = "<!-- ======== START OF CLASS DATA ======== -->".toCharArray(); //$NON-NLS-1$
+	int START_OF_CLASS_DATA_LENGTH = JavadocConstants.START_OF_CLASS_DATA.length;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java
index 8da6da3..1f0c6d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavadocContents.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class JavadocContents {
 	private static final int[] UNKNOWN_FORMAT = new int[0]; 
 	
 	private BinaryType type;
-	private String content;
+	private char[] content;
 	
 	private int childrenStart;
 	
@@ -60,16 +60,8 @@ public class JavadocContents {
 	
 	public JavadocContents(BinaryType type, String content) {
 		this.type = type;
-		this.content = content;
+		this.content = content != null ? content.toCharArray() : null;
 	}
-	
-	/*
-	 * Return the full content of the javadoc
-	 */
-	public String getContent() {
-		return this.content;
-	}
-	
 	/*
 	 * Returns the part of the javadoc that describe the type
 	 */
@@ -84,7 +76,7 @@ public class JavadocContents {
 		
 		if (this.typeDocRange != null) {
 			if (this.typeDocRange == UNKNOWN_FORMAT) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, this.type));
-			return this.content.substring(this.typeDocRange[0], this.typeDocRange[1]);
+			return String.valueOf(CharOperation.subarray(this.content, this.typeDocRange[0], this.typeDocRange[1]));
 		}
 		return null;
 	}
@@ -111,7 +103,7 @@ public class JavadocContents {
 		
 		if (range != null) {
 			if (range == UNKNOWN_FORMAT) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, child));
-			return this.content.substring(range[0], range[1]);
+			return String.valueOf(CharOperation.subarray(this.content, range[0], range[1]));
 		}
 		return null;
 	}
@@ -138,7 +130,7 @@ public class JavadocContents {
 		
 		if (range != null) {
 			if (range == UNKNOWN_FORMAT) throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.UNKNOWN_JAVADOC_FORMAT, child));
-			return this.content.substring(range[0], range[1]);
+			return String.valueOf(CharOperation.subarray(this.content, range[0], range[1]));
 		}
 		return null;
 	}
@@ -146,14 +138,14 @@ public class JavadocContents {
 	/*
 	 * Compute the ranges of the parts of the javadoc that describe each method of the type
 	 */
-	private int[] computeChildRange(String anchor, int indexOfSectionBottom) throws JavaModelException {
+	private int[] computeChildRange(char[] anchor, int indexOfSectionBottom) throws JavaModelException {
 		
 		// checks each known anchor locations
 		if (this.tempAnchorIndexesCount > 0) {
 			for (int i = 0; i < this.tempAnchorIndexesCount; i++) {
 				int anchorEndStart = this.tempAnchorIndexes[i];
 				
-				if (anchorEndStart != -1 && this.content.startsWith(anchor, anchorEndStart)) {
+				if (anchorEndStart != -1 && Util.prefixEquals(anchor, this.content, false, anchorEndStart)) {
 					
 					this.tempAnchorIndexes[i] = -1;
 					
@@ -166,15 +158,14 @@ public class JavadocContents {
 		int index;
 		
 		// check each next unknown anchor locations
-		while ((index = this.content.indexOf(JavadocConstants.ANCHOR_PREFIX_START, fromIndex)) != -1 && (index < indexOfSectionBottom || indexOfSectionBottom == -1)) {
+		while ((index = CharOperation.indexOf(JavadocConstants.ANCHOR_PREFIX_START, this.content, false, fromIndex)) != -1 && (index < indexOfSectionBottom || indexOfSectionBottom == -1)) {
 			fromIndex = index + 1;
 			
 			int anchorEndStart = index + JavadocConstants.ANCHOR_PREFIX_START_LENGHT;
 			
 			this.tempLastAnchorFoundIndex = anchorEndStart;
 			
-			if (this.content.startsWith(anchor, anchorEndStart)) {
-				
+			if (Util.prefixEquals(anchor, this.content, false, anchorEndStart)) {
 				return computeChildRange(anchorEndStart, anchor, indexOfSectionBottom);
 			} else {
 				if (this.tempAnchorIndexes.length == this.tempAnchorIndexesCount) {
@@ -188,16 +179,16 @@ public class JavadocContents {
 		return null;
 	}
 	
-	private int[] computeChildRange(int anchorEndStart, String anchor, int indexOfBottom) {
+	private int[] computeChildRange(int anchorEndStart, char[] anchor, int indexOfBottom) {
 		int[] range = null;
 				
 		// try to find the bottom of the section
 		if (indexOfBottom != -1) {
 			// try to find the end of the anchor
-			int indexOfEndLink = this.content.indexOf(JavadocConstants.ANCHOR_SUFFIX, anchorEndStart + anchor.length());
+			int indexOfEndLink = CharOperation.indexOf(JavadocConstants.ANCHOR_SUFFIX, this.content, false, anchorEndStart + anchor.length);
 			if (indexOfEndLink != -1) {
 				// try to find the next anchor
-				int indexOfNextElement = this.content.indexOf(JavadocConstants.ANCHOR_PREFIX_START, indexOfEndLink);
+				int indexOfNextElement = CharOperation.indexOf(JavadocConstants.ANCHOR_PREFIX_START, this.content, false, indexOfEndLink);
 				
 				int javadocStart = indexOfEndLink + JavadocConstants.ANCHOR_SUFFIX_LENGTH;
 				int javadocEnd = indexOfNextElement == -1 ? indexOfBottom : Math.min(indexOfNextElement, indexOfBottom);
@@ -216,22 +207,23 @@ public class JavadocContents {
 
 	private void computeChildrenSections() {
 		// try to find the next separator part
-		int lastIndex = this.content.indexOf(JavadocConstants.SEPARATOR_START, this.childrenStart);
-		
+		int lastIndex = CharOperation.indexOf(JavadocConstants.SEPARATOR_START, this.content, false, this.childrenStart);
+		lastIndex = lastIndex == -1 ? this.childrenStart : lastIndex;
+
 		// try to find field detail start
-		this.indexOfFieldDetails = this.content.indexOf(JavadocConstants.FIELD_DETAIL, lastIndex);
+		this.indexOfFieldDetails = CharOperation.indexOf(JavadocConstants.FIELD_DETAIL, this.content, false, lastIndex);
 		lastIndex = this.indexOfFieldDetails == -1 ? lastIndex : this.indexOfFieldDetails;
 		
 		// try to find constructor detail start
-		this.indexOfConstructorDetails = this.content.indexOf(JavadocConstants.CONSTRUCTOR_DETAIL, lastIndex);
+		this.indexOfConstructorDetails = CharOperation.indexOf(JavadocConstants.CONSTRUCTOR_DETAIL, this.content, false, lastIndex);
 		lastIndex = this.indexOfConstructorDetails == -1 ? lastIndex : this.indexOfConstructorDetails;
 		
 		// try to find method detail start
-		this.indexOfMethodDetails = this.content.indexOf(JavadocConstants.METHOD_DETAIL, lastIndex);
+		this.indexOfMethodDetails = CharOperation.indexOf(JavadocConstants.METHOD_DETAIL, this.content, false, lastIndex);
 		lastIndex = this.indexOfMethodDetails == -1 ? lastIndex : this.indexOfMethodDetails;
 		
 		// we take the end of class data
-		this.indexOfEndOfClassData = this.content.indexOf(JavadocConstants.END_OF_CLASS_DATA, lastIndex);
+		this.indexOfEndOfClassData = CharOperation.indexOf(JavadocConstants.END_OF_CLASS_DATA, this.content, false, lastIndex);
 		
 		// try to find the field detail end
 		this.indexOfFieldsBottom =
@@ -257,7 +249,9 @@ public class JavadocContents {
 			computeChildrenSections();
 		}
 		
-		String anchor = field.getElementName() + JavadocConstants.ANCHOR_PREFIX_END;
+		StringBuffer buffer = new StringBuffer(field.getElementName());
+		buffer.append(JavadocConstants.ANCHOR_PREFIX_END);
+		char[] anchor = String.valueOf(buffer).toCharArray();
 		
 		int[] range = null;
 		
@@ -307,7 +301,7 @@ public class JavadocContents {
 			computeChildrenSections();
 		}
 		
-		String anchor = computeMethodAnchorPrefixEnd((BinaryMethod)method);
+		char[] anchor = computeMethodAnchorPrefixEnd((BinaryMethod)method).toCharArray();
 		
 		int[] range = null;
 		
@@ -420,45 +414,45 @@ public class JavadocContents {
 	 * Compute the range of the part of the javadoc that describe the type
 	 */
 	private void computeTypeRange() throws JavaModelException {
-		final int indexOfStartOfClassData = this.content.indexOf(JavadocConstants.START_OF_CLASS_DATA);
+		final int indexOfStartOfClassData = CharOperation.indexOf(JavadocConstants.START_OF_CLASS_DATA, this.content, false);
 		if (indexOfStartOfClassData == -1) {
 			this.typeDocRange = UNKNOWN_FORMAT;
 			return;
 		}
-		int indexOfNextSeparator = this.content.indexOf(JavadocConstants.SEPARATOR_START, indexOfStartOfClassData);
+		int indexOfNextSeparator = CharOperation.indexOf(JavadocConstants.SEPARATOR_START, this.content, false, indexOfStartOfClassData);
 		if (indexOfNextSeparator == -1) {
 			this.typeDocRange = UNKNOWN_FORMAT;
 			return;
 		}
-		int indexOfNextSummary = this.content.indexOf(JavadocConstants.NESTED_CLASS_SUMMARY, indexOfNextSeparator);
+		int indexOfNextSummary = CharOperation.indexOf(JavadocConstants.NESTED_CLASS_SUMMARY, this.content, false, indexOfNextSeparator);
 		if (indexOfNextSummary == -1 && this.type.isEnum()) {
 			// try to find enum constant summary start
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.ENUM_CONSTANT_SUMMARY, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.ENUM_CONSTANT_SUMMARY, this.content, false, indexOfNextSeparator);
 		}
 		if (indexOfNextSummary == -1 && this.type.isAnnotation()) {
 			// try to find required enum constant summary start
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY, this.content, false, indexOfNextSeparator);
 			if (indexOfNextSummary == -1) {
 				// try to find optional enum constant summary start
-				indexOfNextSummary = this.content.indexOf(JavadocConstants.ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY, indexOfNextSeparator);
+				indexOfNextSummary = CharOperation.indexOf(JavadocConstants.ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY, this.content, false, indexOfNextSeparator);
 			}
 		}
 		if (indexOfNextSummary == -1) {
 			// try to find field summary start
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.FIELD_SUMMARY, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.FIELD_SUMMARY, this.content, false, indexOfNextSeparator);
 		}
 		if (indexOfNextSummary == -1) {
 			// try to find constructor summary start
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.CONSTRUCTOR_SUMMARY, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.CONSTRUCTOR_SUMMARY, this.content, false, indexOfNextSeparator);
 		}
 		if (indexOfNextSummary == -1) {
 			// try to find method summary start
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.METHOD_SUMMARY, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.METHOD_SUMMARY, this.content, false, indexOfNextSeparator);
 		}
 		
 		if (indexOfNextSummary == -1) {
 			// we take the end of class data
-			indexOfNextSummary = this.content.indexOf(JavadocConstants.END_OF_CLASS_DATA, indexOfNextSeparator);
+			indexOfNextSummary = CharOperation.indexOf(JavadocConstants.END_OF_CLASS_DATA, this.content, false, indexOfNextSeparator);
 		} else {
 			// improve performance of computation of children ranges
 			this.childrenStart = indexOfNextSummary + 1;
@@ -473,10 +467,7 @@ public class JavadocContents {
 		 * We remove what the contents between the start of class data and the first <P>
 		 */
 		int start = indexOfStartOfClassData + JavadocConstants.START_OF_CLASS_DATA_LENGTH;
-		int indexOfFirstParagraph = this.content.indexOf("<P>", start); //$NON-NLS-1$
-		if (indexOfFirstParagraph == -1) {
-			indexOfFirstParagraph = this.content.indexOf("<p>", start); //$NON-NLS-1$
-		}
+		int indexOfFirstParagraph = CharOperation.indexOf("<P>".toCharArray(), this.content, false, start); //$NON-NLS-1$
 		if (indexOfFirstParagraph != -1 && indexOfFirstParagraph < indexOfNextSummary) {
 			start = indexOfFirstParagraph;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/LocalVariable.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/LocalVariable.java
index fda80ed..a0627a2 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/LocalVariable.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/LocalVariable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,13 +17,16 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.core.*;
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.ArrayInitializer;
 import org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.Literal;
 import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
+import org.eclipse.jdt.internal.compiler.ast.OperatorIds;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
+import org.eclipse.jdt.internal.compiler.ast.UnaryExpression;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
 import org.eclipse.jdt.internal.core.util.MementoTokenizer;
 import org.eclipse.jdt.internal.core.util.Util;
@@ -198,6 +201,17 @@ public class LocalVariable extends SourceRefElement implements ILocalVariable {
 			if (memberValuePair.valueKind == -1)
 				memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
 			return values;
+		} else if (expression instanceof UnaryExpression) {			//to deal with negative numerals (see bug - 248312)
+			UnaryExpression unaryExpression = (UnaryExpression) expression;
+			if ((unaryExpression.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT == OperatorIds.MINUS) {
+				if (unaryExpression.expression instanceof Literal) {
+					Literal subExpression = (Literal) unaryExpression.expression;
+					subExpression.computeConstant();
+					return Util.getNegativeAnnotationMemberValue(memberValuePair, subExpression.constant);
+				}
+			}
+			memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
+			return null;
 		} else {
 			memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
 			return null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Member.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Member.java
index c17fcd6..b4dd2fa 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Member.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/Member.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -279,8 +279,8 @@ public ISourceRange getJavadocRange() throws JavaModelException {
 	final int length= range.getLength();
 	if (length > 0 && buf.getChar(start) == '/') {
 		IScanner scanner= ToolFactory.createScanner(true, false, false, false);
-		scanner.setSource(buf.getText(start, length).toCharArray());
 		try {
+			scanner.setSource(buf.getText(start, length).toCharArray());
 			int docOffset= -1;
 			int docEnd= -1;
 
@@ -305,6 +305,8 @@ public ISourceRange getJavadocRange() throws JavaModelException {
 			}
 		} catch (InvalidInputException ex) {
 			// try if there is inherited Javadoc
+		} catch (IndexOutOfBoundsException e) {
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=305001
 		}
 	}
 	return null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ModelUpdater.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ModelUpdater.java
index 5f3bc20..2996543 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ModelUpdater.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ModelUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -130,7 +130,7 @@ public class ModelUpdater {
 			case IJavaElement.JAVA_PROJECT :
 				JavaModelManager manager = JavaModelManager.getJavaModelManager();
 				JavaProject javaProject = (JavaProject) element;
-				manager.removePerProjectInfo(javaProject);
+				manager.removePerProjectInfo(javaProject, true /* remove external jar files indexes and timestamps*/);
 				manager.containerRemove(javaProject);
 				break;
 			case IJavaElement.PACKAGE_FRAGMENT_ROOT :
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java
index c3e314d..cb1e11c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -583,12 +583,6 @@ public class NameLookup implements SuffixConstants {
 	 * Find secondary type for a project.
 	 */
 	private IType findSecondaryType(String packageName, String typeName, IJavaProject project, boolean waitForIndexes, IProgressMonitor monitor) {
-		if (JavaModelManager.VERBOSE) {
-			Util.verbose("NameLookup FIND SECONDARY TYPES:"); //$NON-NLS-1$
-			Util.verbose(" -> pkg name: " + packageName);  //$NON-NLS-1$
-			Util.verbose(" -> type name: " + typeName);  //$NON-NLS-1$
-			Util.verbose(" -> project: "+project.getElementName()); //$NON-NLS-1$
-		}
 		JavaModelManager manager = JavaModelManager.getJavaModelManager();
 		try {
 			IJavaProject javaProject = project;
@@ -599,6 +593,10 @@ public class NameLookup implements SuffixConstants {
 					IType type = (IType) types.get(typeName);
 					if (type != null) {
 						if (JavaModelManager.VERBOSE) {
+							Util.verbose("NameLookup FIND SECONDARY TYPES:"); //$NON-NLS-1$
+							Util.verbose(" -> pkg name: " + packageName);  //$NON-NLS-1$
+							Util.verbose(" -> type name: " + typeName);  //$NON-NLS-1$
+							Util.verbose(" -> project: "+project.getElementName()); //$NON-NLS-1$
 							Util.verbose(" -> type: " + type.getElementName());  //$NON-NLS-1$
 						}
 						return type;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
index 69cf2e9..35fb34b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -179,7 +179,7 @@ public boolean exists() {
  */
 public IClassFile getClassFile(String classFileName) {
 	if (!org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(classFileName)) {
-		throw new IllegalArgumentException(Messages.element_invalidClassFileName);
+		throw new IllegalArgumentException(Messages.bind(Messages.element_invalidClassFileName, classFileName));
 	}
 	// don't hold on the .class file extension to save memory
 	// also make sure to not use substring as the resulting String may hold on the underlying char[] which might be much bigger than necessary
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java
index 3f99ff4..9fb59c6 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -554,6 +554,22 @@ public IClasspathEntry getRawClasspathEntry() throws JavaModelException {
 	}
 	return rawEntry;
 }
+/*
+ * @see IPackageFragmentRoot
+ */
+public IClasspathEntry getResolvedClasspathEntry() throws JavaModelException {
+	IClasspathEntry resolvedEntry = null;
+	JavaProject project = (JavaProject)getJavaProject();
+	project.getResolvedClasspath(); // force the resolved entry cache to be populated
+	Map rootPathToResolvedEntries = project.getPerProjectInfo().rootPathToResolvedEntries;
+	if (rootPathToResolvedEntries != null) {
+		resolvedEntry = (IClasspathEntry) rootPathToResolvedEntries.get(getPath());
+	}
+	if (resolvedEntry == null) {
+		throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH, this));
+	}
+	return resolvedEntry;
+}
 
 
 public IResource resource() {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetClasspathOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetClasspathOperation.java
index c01a164..9623813 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetClasspathOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetClasspathOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,21 +30,33 @@ import org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo;
 public class SetClasspathOperation extends ChangeClasspathOperation {
 
 	IClasspathEntry[] newRawClasspath;
+	IClasspathEntry[] referencedEntries;
 	IPath newOutputLocation;
 	JavaProject project;
 
+	public SetClasspathOperation(
+		JavaProject project,
+		IClasspathEntry[] newRawClasspath,
+		IPath newOutputLocation,
+		boolean canChangeResource) {
+
+		this(project, newRawClasspath, null, newOutputLocation, canChangeResource);
+	}
+	
 	/**
 	 * When executed, this operation sets the raw classpath and output location of the given project.
 	 */
 	public SetClasspathOperation(
 		JavaProject project,
 		IClasspathEntry[] newRawClasspath,
+		IClasspathEntry[] referencedEntries,
 		IPath newOutputLocation,
 		boolean canChangeResource) {
 
 		super(new IJavaElement[] { project }, canChangeResource);
 		this.project = project;
 		this.newRawClasspath = newRawClasspath;
+		this.referencedEntries = referencedEntries;
 		this.newOutputLocation = newOutputLocation;
 	}
 
@@ -56,10 +68,10 @@ public class SetClasspathOperation extends ChangeClasspathOperation {
 		try {
 			// set raw classpath and null out resolved info
 			PerProjectInfo perProjectInfo = this.project.getPerProjectInfo();
-			ClasspathChange classpathChange = perProjectInfo.setRawClasspath(this.newRawClasspath, this.newOutputLocation, JavaModelStatus.VERIFIED_OK/*format is ok*/);
+			ClasspathChange classpathChange = perProjectInfo.setRawClasspath(this.newRawClasspath, this.referencedEntries, this.newOutputLocation, JavaModelStatus.VERIFIED_OK/*format is ok*/);
 
 			// if needed, generate delta, update project ref, create markers, ...
-			classpathChanged(classpathChange);
+			classpathChanged(classpathChange, true/*refresh if external linked folder already exists*/);
 
 			// write .classpath file
 			if (this.canChangeResources && perProjectInfo.writeAndCacheClasspath(this.project, this.newRawClasspath, this.newOutputLocation))
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetContainerOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetContainerOperation.java
index 181ce9b..4a498fb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetContainerOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetContainerOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,7 +107,7 @@ public class SetContainerOperation extends ChangeClasspathOperation {
 					ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
 
 					// if needed, generate delta, update project ref, create markers, ...
-					classpathChanged(classpathChange);
+					classpathChanged(classpathChange, i==0/*refresh external linked folder only once*/);
 
 					if (this.canChangeResources) {
 						// touch project to force a build if needed
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java
index aa2a75b..e4dfc5c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -144,7 +144,7 @@ public class SetVariablesOperation extends ChangeClasspathOperation {
 						ClasspathChange classpathChange = affectedProject.getPerProjectInfo().resetResolvedClasspath();
 
 						// if needed, generate delta, update project ref, create markers, ...
-						classpathChanged(classpathChange);
+						classpathChanged(classpathChange, true/*refresh if external linked folder already exists*/);
 
 						if (this.canChangeResources) {
 							// touch project to force a build if needed
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
index d82c7f3..98c83b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SortElementsOperation.java
@@ -137,7 +137,7 @@ public class SortElementsOperation extends JavaModelOperation {
 			}
 
 			Document document= new Document(content);
-			return rewrite.rewriteAST(document, null);
+			return rewrite.rewriteAST(document, cu.getJavaProject().getOptions(true));
 		} finally {
 			done();
 		}
@@ -162,7 +162,7 @@ public class SortElementsOperation extends JavaModelOperation {
 		if (rewriter == null)
 			return document.get();
 
-		TextEdit edits = rewriter.rewriteAST(document, null);
+		TextEdit edits = rewriter.rewriteAST(document, unit.getJavaProject().getOptions(true));
 
 		RangeMarker[] markers = null;
 		if (this.positions != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
index 0b0796f..78eb287 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
@@ -48,6 +48,7 @@ import org.eclipse.jdt.core.JavaConventions;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.IProblemFactory;
@@ -701,23 +702,27 @@ public class SourceMapper
 			IType currentType = this.types[this.typeDepth];
 			int currenTypeModifiers = this.typeModifiers[this.typeDepth];
 			char[][] parameterTypes = methodInfo.parameterTypes;
-			if (parameterTypes != null && methodInfo.isConstructor && currentType.getDeclaringType() != null && !Flags.isStatic(currenTypeModifiers)) {
+			if (methodInfo.isConstructor && currentType.getDeclaringType() != null && !Flags.isStatic(currenTypeModifiers)) {
 				IType declaringType = currentType.getDeclaringType();
 				String declaringTypeName = declaringType.getElementName();
 				if (declaringTypeName.length() == 0) {
 					IClassFile classFile = declaringType.getClassFile();
-					int length = parameterTypes.length;
+					int length = parameterTypes != null ? parameterTypes.length : 0;
 					char[][] newParameterTypes = new char[length+1][];
 					declaringTypeName = classFile.getElementName();
 					declaringTypeName = declaringTypeName.substring(0, declaringTypeName.indexOf('.'));
 					newParameterTypes[0] = declaringTypeName.toCharArray();
-					System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
+					if (length != 0) {
+						System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
+					}
 					this.methodParameterTypes[this.typeDepth] = newParameterTypes;
 				} else {
-					int length = parameterTypes.length;
+					int length = parameterTypes != null ? parameterTypes.length : 0;
 					char[][] newParameterTypes = new char[length+1][];
 					newParameterTypes[0] = declaringTypeName.toCharArray();
-					System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
+					if (length != 0) {
+						System.arraycopy(parameterTypes, 0, newParameterTypes, 1, length);
+					}
 					this.methodParameterTypes[this.typeDepth] = newParameterTypes;
 				}
 			} else {
@@ -1215,7 +1220,10 @@ public class SourceMapper
 		this.methodParameterNames = new char[1][][];
 		this.anonymousCounter = 0;
 
-		HashMap oldSourceRanges = (HashMap) this.sourceRanges.clone();
+		HashMap oldSourceRanges = null;
+		if (elementToFind != null) {
+			oldSourceRanges = (HashMap) this.sourceRanges.clone();
+		}
 		try {
 			IProblemFactory factory = new DefaultProblemFactory();
 			SourceElementParser parser = null;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRange.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRange.java
deleted file mode 100644
index 169e91b..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRange.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.core;
-
-import org.eclipse.jdt.core.ISourceRange;
-
-/**
- * @see ISourceRange
- */
-public class SourceRange implements ISourceRange {
-
-protected int offset, length;
-
-public SourceRange(int offset, int length) {
-	this.offset = offset;
-	this.length = length;
-}
-/*
- * @see Object#equals(Object)
- */
-public boolean equals(Object obj) {
-	if (!(obj instanceof ISourceRange))
-        return false;
-	ISourceRange sourceRange = (ISourceRange) obj;
-    return sourceRange.getOffset() == this.offset && sourceRange.getLength() == this.length;
-}
-/**
- * @see ISourceRange
- */
-public int getLength() {
-	return this.length;
-}
-/**
- * @see ISourceRange
- */
-public int getOffset() {
-	return this.offset;
-}
-/*
- * @see Object#hashCode()
- */
-public int hashCode() {
-    return this.length ^ this.offset;
-}
-public String toString() {
-	StringBuffer buffer = new StringBuffer();
-	buffer.append("[offset="); //$NON-NLS-1$
-	buffer.append(this.offset);
-	buffer.append(", length="); //$NON-NLS-1$
-	buffer.append(this.length);
-	buffer.append("]"); //$NON-NLS-1$
-	return buffer.toString();
-}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRefElementInfo.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRefElementInfo.java
index ebb5087..dc5ff84 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRefElementInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceRefElementInfo.java
@@ -11,6 +11,7 @@
 package org.eclipse.jdt.internal.core;
 
 import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.SourceRange;
 
 /**
  * Element info for ISourceReference elements.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameter.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameter.java
index 49cf01d..0038563 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameter.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,6 @@
 package org.eclipse.jdt.internal.core;
 
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.ITypeParameter;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.compiler.CharOperation;
 
 public class TypeParameter extends SourceRefElement implements ITypeParameter {
@@ -36,7 +33,35 @@ public class TypeParameter extends SourceRefElement implements ITypeParameter {
 		TypeParameterElementInfo info = (TypeParameterElementInfo) getElementInfo();
 		return CharOperation.toStrings(info.bounds);
 	}
-
+	
+	public String[] getBoundsSignatures() throws JavaModelException {
+		
+		String[] boundSignatures = null;
+		TypeParameterElementInfo info = (TypeParameterElementInfo) this.getElementInfo();
+		
+		// For a binary type or method, the signature is already available from the .class file.
+		// No need to construct again
+		if (this.parent instanceof BinaryMember) {
+			char[][] boundsSignatures = info.boundsSignatures;
+			if (boundsSignatures == null || boundsSignatures.length == 0) {
+				return CharOperation.NO_STRINGS;	
+			}
+			return CharOperation.toStrings(info.boundsSignatures);
+		}
+		
+		char[][] bounds = info.bounds;
+		if (bounds == null || bounds.length == 0) {
+			return CharOperation.NO_STRINGS;
+		}
+	
+		int boundsLength = bounds.length;
+		boundSignatures = new String[boundsLength];
+		for (int i = 0; i < boundsLength; i++) {
+			boundSignatures[i] = new String(Signature.createCharArrayTypeSignature(bounds[i], false));
+		}
+		return boundSignatures;
+	}
+	
 	public IMember getDeclaringMember() {
 			return (IMember) getParent();
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameterElementInfo.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameterElementInfo.java
index 88fa850..401ba0f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameterElementInfo.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/TypeParameterElementInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,4 +28,9 @@ public class TypeParameterElementInfo extends SourceRefElementInfo {
 	 * The bounds names of this type parameter.
 	 */
 	public char[][] bounds;
+	
+	/*
+	 * The bounds' signatures for this type parameter. 
+	 */
+	public char[][] boundsSignatures;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
index d2ef99a..36f58ca 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
index 70dfd77..531b2b5 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -835,7 +835,7 @@ protected void writeClassFileContents(ClassFile classFile, IFile file, String qu
 		if (JavaBuilder.DEBUG)
 			System.out.println("Writing changed class file " + file.getName());//$NON-NLS-1$
 		if (!file.isDerived())
-			file.setDerived(true);
+			file.setDerived(true, null);
 		file.setContents(input, true, false, null);
 	} else {
 		// Default implementation just writes out the bytes for the new class file...
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AdditionalTypeCollection.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AdditionalTypeCollection.java
index 5098dca..9bf892b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AdditionalTypeCollection.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AdditionalTypeCollection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ char[][] definedTypeNames;
 
 protected AdditionalTypeCollection(char[][] definedTypeNames, char[][][] qualifiedReferences, char[][] simpleNameReferences, char[][] rootReferences) {
 	super(qualifiedReferences, simpleNameReferences, rootReferences);
-	this.definedTypeNames = definedTypeNames; // do not bother interning member type names (ie. 'A$M')
+	this.definedTypeNames = definedTypeNames; // do not bother interning member type names (i.e. 'A$M')
 }
 }
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BatchImageBuilder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BatchImageBuilder.java
index ea536af..5893e38 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BatchImageBuilder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/BatchImageBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -105,7 +105,7 @@ protected void cleanOutputFolders(boolean copyBack) throws CoreException {
 							member.accept(
 								new IResourceVisitor() {
 									public boolean visit(IResource resource) throws CoreException {
-										resource.setDerived(true);
+										resource.setDerived(true, null);
 										return resource.getType() != IResource.FILE;
 									}
 								}
@@ -137,7 +137,7 @@ protected void cleanOutputFolders(boolean copyBack) throws CoreException {
 										if (Util.isExcluded(resource.getFullPath(), inclusionPatterns, exclusionPatterns, false))
 											return false;
 									if (!resource.isDerived())
-										resource.setDerived(true);
+										resource.setDerived(true, null);
 									resource.delete(IResource.FORCE, null);
 								}
 								return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
index a6669a0..3268b4c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJar.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.*;
 
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
 import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
 import org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer;
 import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
@@ -151,7 +152,8 @@ public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPa
 			String fileNameWithoutExtension = qualifiedBinaryFileName.substring(0, qualifiedBinaryFileName.length() - SuffixConstants.SUFFIX_CLASS.length);
 			return new NameEnvironmentAnswer(reader, this.accessRuleSet.getViolatedRestriction(fileNameWithoutExtension.toCharArray()));
 		}
-	} catch (Exception e) { // treat as if class file is missing
+	} catch (IOException e) { // treat as if class file is missing
+	} catch (ClassFormatException e) { // treat as if class file is missing
 	}
 	return null;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
index d88bde4..1273281 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathMultiDirectory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
index bf87e14..d050b57 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
@@ -818,7 +818,7 @@ protected void writeClassFileContents(ClassFile classfile, IFile file, String qu
 			if (JavaBuilder.DEBUG)
 				System.out.println("Writing changed class file " + file.getName());//$NON-NLS-1$
 			if (!file.isDerived())
-				file.setDerived(true);
+				file.setDerived(true, null);
 			file.setContents(new ByteArrayInputStream(bytes), true, false, null);
 		} else if (JavaBuilder.DEBUG) {
 			System.out.println("Skipped over unchanged class file " + file.getName());//$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ReferenceCollection.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ReferenceCollection.java
index ed4b725..6d8410b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ReferenceCollection.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ReferenceCollection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ char[][] simpleNameReferences;
 char[][] rootReferences;
 
 protected ReferenceCollection(char[][][] qualifiedNameReferences, char[][] simpleNameReferences, char[][] rootReferences) {
-	this.qualifiedNameReferences = internQualifiedNames(qualifiedNameReferences);
+	this.qualifiedNameReferences = internQualifiedNames(qualifiedNameReferences, false);
 	this.simpleNameReferences = internSimpleNames(simpleNameReferences, true);
 	this.rootReferences = internSimpleNames(rootReferences, false);
 }
@@ -33,7 +33,7 @@ public void addDependencies(String[] typeNameDependencies) {
 	char[][][] qNames = new char[typeNameDependencies.length][][];
 	for (int i = typeNameDependencies.length; --i >= 0;)
 		qNames[i] = CharOperation.splitOn('.', typeNameDependencies[i].toCharArray());
-	qNames = internQualifiedNames(qNames);
+	qNames = internQualifiedNames(qNames, false);
 
 	next : for (int i = qNames.length; --i >= 0;) {
 		char[][] qualifiedTypeName = qNames[i];
@@ -53,7 +53,7 @@ public void addDependencies(String[] typeNameDependencies) {
 			this.qualifiedNameReferences[length] = qualifiedTypeName;
 
 			qualifiedTypeName = CharOperation.subarray(qualifiedTypeName, 0, qualifiedTypeName.length - 1);
-			char[][][] temp = internQualifiedNames(new char[][][] {qualifiedTypeName});
+			char[][][] temp = internQualifiedNames(new char[][][] {qualifiedTypeName}, false);
 			if (temp == EmptyQualifiedNames)
 				continue next; // qualifiedTypeName is a well known name
 			qualifiedTypeName = temp[0];
@@ -206,10 +206,14 @@ public static char[][][] internQualifiedNames(StringSet qualifiedStrings) {
 	for (int i = 0, l = strings.length; i < l; i++)
 		if (strings[i] != null)
 			result[--length] = CharOperation.splitOn('/', strings[i].toCharArray());
-	return internQualifiedNames(result);
+	return internQualifiedNames(result, false);
 }
 
 public static char[][][] internQualifiedNames(char[][][] qualifiedNames) {
+	return internQualifiedNames(qualifiedNames, false);
+}
+
+public static char[][][] internQualifiedNames(char[][][] qualifiedNames, boolean keepWellKnown) {
 	if (qualifiedNames == null) return EmptyQualifiedNames;
 	int length = qualifiedNames.length;
 	if (length == 0) return EmptyQualifiedNames;
@@ -223,8 +227,12 @@ public static char[][][] internQualifiedNames(char[][][] qualifiedNames) {
 			char[][] wellKnownName = WellKnownQualifiedNames[j];
 			if (qLength > wellKnownName.length)
 				break; // all remaining well known names are shorter
-			if (CharOperation.equals(qualifiedName, wellKnownName))
+			if (CharOperation.equals(qualifiedName, wellKnownName)) {
+				if (keepWellKnown) {
+					keepers[index++] = wellKnownName;
+				}
 				continue next;
+			}
 		}
 
 		// InternedQualifiedNames[0] is for the rest (> 7 & 1)
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
index 2769749..ec76a27 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/State.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class State {
 String javaProjectName;
 ClasspathMultiDirectory[] sourceLocations;
 ClasspathLocation[] binaryLocations;
-// keyed by the project relative path of the type (ie. "src1/p1/p2/A.java"), value is a ReferenceCollection or an AdditionalTypeCollection
+// keyed by the project relative path of the type (i.e. "src1/p1/p2/A.java"), value is a ReferenceCollection or an AdditionalTypeCollection
 SimpleLookupTable references;
 // keyed by qualified type name "p1/p2/A", value is the project relative path which defines this type "src1/p1/p2/A.java"
 public SimpleLookupTable typeLocators;
@@ -44,7 +44,7 @@ private long previousStructuralBuildTime;
 private StringSet structurallyChangedTypes;
 public static int MaxStructurallyChangedTypes = 100; // keep track of ? structurally changed types, otherwise consider all to be changed
 
-public static final byte VERSION = 0x0018; // to fix 291472
+public static final byte VERSION = 0x0018; // fix for 291472
 
 static final byte SOURCE_FOLDER = 1;
 static final byte BINARY_FOLDER = 2;
@@ -297,7 +297,7 @@ static State read(IProject project, DataInputStream in) throws IOException {
 			qName[j] = internedSimpleNames[in.readInt()];
 		internedQualifiedNames[i] = qName;
 	}
-	internedQualifiedNames = ReferenceCollection.internQualifiedNames(internedQualifiedNames);
+	internedQualifiedNames = ReferenceCollection.internQualifiedNames(internedQualifiedNames, false);
 
 	newState.references = new SimpleLookupTable(length = in.readInt());
 	for (int i = 0; i < length; i++) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
index 60e471a..7212053 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
@@ -502,7 +502,11 @@ private void reportHierarchy(IType focus, TypeDeclaration focusLocalType, Refere
 	fixSupertypeBindings();
 
 	int objectIndex = -1;
+	IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
 	for (int current = this.typeIndex; current >= 0; current--) {
+		if (progressMonitor != null && progressMonitor.isCanceled())
+			throw new OperationCanceledException();
+		
 		ReferenceBinding typeBinding = this.typeBindings[current];
 
 		// java.lang.Object treated at the end
@@ -751,26 +755,31 @@ public void resolve(Openable[] openables, HashSet localTypes, IProgressMonitor m
 			}
 		}
 
-		// complete type bindings (ie. connect super types)
+		// complete type bindings (i.e. connect super types)
 		for (int i = 0; i < unitsIndex; i++) {
 			CompilationUnitDeclaration parsedUnit = parsedUnits[i];
 			if (parsedUnit != null) {
 				try {
-					boolean containsLocalType = hasLocalType[i];
-					if (containsLocalType) { // NB: no-op if method bodies have been already parsed
+					if (hasLocalType[i]) { // NB: no-op if method bodies have been already parsed
+						if (monitor != null && monitor.isCanceled())
+							throw new OperationCanceledException();
 						parser.getMethodBodies(parsedUnit);
 					}
-					// complete type bindings and build fields and methods only for local types
-					// (in this case the constructor is needed when resolving local types)
-					// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333)
-					this.lookupEnvironment.completeTypeBindings(parsedUnit, containsLocalType);
 				} catch (AbortCompilation e) {
 					// classpath problem for this type: don't try to resolve (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49809)
 					hasLocalType[i] = false;
 				}
 			}
-			worked(monitor, 1);
 		}
+		// complete type bindings and build fields and methods only for local types
+		// (in this case the constructor is needed when resolving local types)
+		// (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=145333)
+		try {
+			this.lookupEnvironment.completeTypeBindings(parsedUnits, hasLocalType, unitsIndex);
+		} catch (AbortCompilation e) {
+			// skip it silently
+		}
+		worked(monitor, 1);
 
 		// remember type bindings
 		for (int i = 0; i < unitsIndex; i++) {
@@ -778,6 +787,8 @@ public void resolve(Openable[] openables, HashSet localTypes, IProgressMonitor m
 			if (parsedUnit != null) {
 				boolean containsLocalType = hasLocalType[i];
 				if (containsLocalType) {
+					if (monitor != null && monitor.isCanceled())
+						throw new OperationCanceledException();
 					parsedUnit.scope.faultInTypes();
 					parsedUnit.resolve();
 				}
@@ -815,7 +826,7 @@ private void setEnvironment(LookupEnvironment lookupEnvironment, HierarchyBuilde
 }
 
 /*
- * Set the focus type (ie. the type that this resolver is computing the hierarch for.
+ * Set the focus type (i.e. the type that this resolver is computing the hierarch for.
  * Returns the binding of this focus type or null if it could not be found.
  */
 public ReferenceBinding setFocusType(char[][] compoundName) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
index 0b49220..bf54a70 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
@@ -460,8 +460,8 @@ public static void searchAllPossibleSubTypes(
 			boolean isLocalOrAnonymous = record.enclosingTypeName == IIndexConstants.ONE_ZERO;
 			pathRequestor.acceptPath(documentPath, isLocalOrAnonymous);
 			char[] typeName = record.simpleName;
-			int suffix = documentPath.toLowerCase().lastIndexOf(SUFFIX_STRING_class);
-			if (suffix != -1){
+			if (documentPath.toLowerCase().endsWith(SUFFIX_STRING_class)) {
+			    int suffix = documentPath.length()-SUFFIX_STRING_class.length();
 				HierarchyBinaryType binaryType = (HierarchyBinaryType)binariesFromIndexMatches.get(documentPath);
 				if (binaryType == null){
 					char[] enclosingTypeName = record.enclosingTypeName;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/TypeHierarchy.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/TypeHierarchy.java
index 6b87787..1688730 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/TypeHierarchy.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/TypeHierarchy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -318,7 +318,7 @@ public boolean contains(IType type) {
 	return false;
 }
 /**
- * Determines if the change effects this hierarchy, and fires
+ * Determines if the change affects this hierarchy, and fires
  * change notification if required.
  */
 public void elementChanged(ElementChangedEvent event) {
@@ -828,7 +828,7 @@ public synchronized boolean isAffected(IJavaElementDelta delta, int eventType) {
 /**
  * Returns true if any of the children of a project, package
  * fragment root, or package fragment have changed in a way that
- * effects this type hierarchy.
+ * affects this type hierarchy.
  * @param eventType TODO
  */
 private boolean isAffectedByChildren(IJavaElementDelta delta, int eventType) {
@@ -984,6 +984,14 @@ private boolean isAffectedByPackageFragmentRoot(IJavaElementDelta delta, IJavaEl
 protected boolean isAffectedByOpenable(IJavaElementDelta delta, IJavaElement element, int eventType) {
 	if (element instanceof CompilationUnit) {
 		CompilationUnit cu = (CompilationUnit)element;
+		ICompilationUnit focusCU = 
+			this.focusType != null ? this.focusType.getCompilationUnit() : null;
+		if (focusCU != null && focusCU.getOwner() != cu.getOwner())
+			return false;
+		//ADDED delta arising from getWorkingCopy() should be ignored
+		if (eventType != ElementChangedEvent.POST_RECONCILE && !cu.isPrimary() &&
+				delta.getKind() == IJavaElementDelta.ADDED)
+			return false;
 		ChangeCollector collector = this.changeCollector;
 		if (collector == null) {
 		    collector = new ChangeCollector(this);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java
index 5250726..a582f06 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -444,6 +444,8 @@ public class BindingKeyParser {
 
 	private boolean hasTypeName = true;
 
+	private boolean isMalformed;
+
 	public BindingKeyParser(BindingKeyParser parser) {
 		this(""); //$NON-NLS-1$
 		this.scanner = parser.scanner;
@@ -577,7 +579,7 @@ public class BindingKeyParser {
 	}
 
 	public void malformedKey() {
-		// default is to do nothing
+		this.isMalformed = true;
 	}
 
 	public BindingKeyParser newParser() {
@@ -684,38 +686,38 @@ public class BindingKeyParser {
 				consumeBaseType(this.scanner.getTokenSource());
 				this.hasTypeName = false;
 				break;
-	 		case Scanner.ARRAY:
-	 			this.keyStart = this.scanner.start;
-	 			consumeArrayDimension(this.scanner.getTokenSource());
-	 			switch (this.scanner.nextToken()) {
-	 				case Scanner.TYPE:
-		 				consumeFullyQualifiedName(this.scanner.getTokenSource());
-		 				break;
-	 				case Scanner.BASE_TYPE:
-	 					consumeBaseType(this.scanner.getTokenSource());
-	 					this.hasTypeName = false;
-	 					break;
-	 				default:
+			case Scanner.ARRAY:
+				this.keyStart = this.scanner.start;
+				consumeArrayDimension(this.scanner.getTokenSource());
+				switch (this.scanner.nextToken()) {
+					case Scanner.TYPE:
+						consumeFullyQualifiedName(this.scanner.getTokenSource());
+						break;
+					case Scanner.BASE_TYPE:
+						consumeBaseType(this.scanner.getTokenSource());
+						this.hasTypeName = false;
+						break;
+					default:
 						malformedKey();
 						return;
 				}
 				break;
 			default:
-	 			malformedKey();
+				malformedKey();
 				return;
 		}
 	}
 
 	private void parseParameterizedMethod() {
 		this.scanner.skipParametersStart();
-		while (!this.scanner.isAtParametersEnd()) {
+		while (!this.scanner.isAtParametersEnd() && !this.isMalformed) {
 			parseTypeArgument();
 		}
 		consumeParameterizedGenericMethod();
 	}
 
 	private void parseGenericType() {
-		while (!this.scanner.isAtParametersEnd()) {
+		while (!this.scanner.isAtParametersEnd() && !this.isMalformed) {
 			if (this.scanner.nextToken() != Scanner.TYPE) {
 				malformedKey();
 				return;
@@ -729,17 +731,17 @@ public class BindingKeyParser {
 		if (!this.scanner.isAtMemberTypeStart() || this.scanner.nextToken() != Scanner.TYPE)
 			return;
 		char[] typeName = this.scanner.getTokenSource();
-	 	if (Character.isDigit(typeName[0])) {
-	 		// anonymous or local type
-	 		int nextToken = Scanner.TYPE;
-	 		while (this.scanner.isAtMemberTypeStart())
-	 			nextToken = this.scanner.nextToken();
-	 		typeName = nextToken == Scanner.END ? this.scanner.source : CharOperation.subarray(this.scanner.source, this.keyStart, this.scanner.index+1);
-	 		consumeLocalType(typeName);
-	 	} else {
+		if (Character.isDigit(typeName[0])) {
+			// anonymous or local type
+			int nextToken = Scanner.TYPE;
+			while (this.scanner.isAtMemberTypeStart() && !this.isMalformed)
+				nextToken = this.scanner.nextToken();
+			typeName = nextToken == Scanner.END ? this.scanner.source : CharOperation.subarray(this.scanner.source, this.keyStart, this.scanner.index+1);
+			consumeLocalType(typeName);
+		} else {
 			consumeMemberType(typeName);
 			parseInnerType();
-	 	}
+		}
 	}
 
 	private void parseLocalVariable() {
@@ -792,16 +794,17 @@ public class BindingKeyParser {
 		parser.parse();
 		consumeParser(parser);
 		consumeAnnotation();
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
 	private void parseCapture() {
 		if (this.scanner.nextToken() != Scanner.CAPTURE) return;
-	 	parseCaptureWildcard();
+		parseCaptureWildcard();
 		if (this.scanner.nextToken() != Scanner.TYPE) {
-	 		malformedKey();
+			malformedKey();
 			return;
-	 	}
+		}
 		char[] positionChars = this.scanner.getTokenSource();
 		int position = Integer.parseInt(new String(positionChars));
 		consumeCapture(position);
@@ -817,6 +820,7 @@ public class BindingKeyParser {
 		BindingKeyParser parser = newParser();
 		parser.parse();
 		consumeParser(parser);
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
@@ -832,19 +836,20 @@ public class BindingKeyParser {
 		 * See bug 264443
 		 */
 		int token = this.scanner.token;
-		while (this.scanner.isAtThrownStart()) {
+		while (this.scanner.isAtThrownStart() && !this.isMalformed) {
 			this.scanner.skipThrownStart();
 			BindingKeyParser parser = newParser();
 			parser.parse();
 			consumeParser(parser);
 			consumeException();
+			this.isMalformed = parser.isMalformed;
 		}
 		this.scanner.token = token;
 	}
 
 	private void parseParameterizedType(char[] typeName, boolean isRaw) {
 		if (!isRaw) {
-			while (!this.scanner.isAtParametersEnd()) {
+			while (!this.scanner.isAtParametersEnd() && !this.isMalformed) {
 				parseTypeArgument();
 			}
 		}
@@ -886,6 +891,7 @@ public class BindingKeyParser {
 		BindingKeyParser parser = newParser();
 		parser.parse();
 		consumeParser(parser);
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
@@ -903,6 +909,7 @@ public class BindingKeyParser {
 		BindingKeyParser parser = newParser();
 		parser.parse();
 		consumeParser(parser);
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
@@ -917,6 +924,7 @@ public class BindingKeyParser {
 		parser.parse();
 		consumeParser(parser);
 		consumeTypeWithCapture();
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
@@ -942,30 +950,30 @@ public class BindingKeyParser {
 	private void parseWildcard() {
 		parseWildcardRank();
 		if (this.scanner.nextToken() != Scanner.WILDCARD) return;
-	 	char[] source = this.scanner.getTokenSource();
-	 	if (source.length == 0) {
-	 		malformedKey();
-	 		return;
-	 	}
-	 	int kind = -1;
-	 	switch (source[0]) {
-		 	case '*':
-		 		kind = Wildcard.UNBOUND;
-		 		break;
-		 	case '+':
-		 		kind = Wildcard.EXTENDS;
-		 		break;
-		 	case '-':
-		 		kind = Wildcard.SUPER;
-		 		break;
-	 	}
-	 	if (kind == -1) {
-	 		malformedKey();
-	 		return;
-	 	}
-	 	if (kind != Wildcard.UNBOUND)
-	 		parseWildcardBound();
-	 	consumeWildCard(kind);
+		char[] source = this.scanner.getTokenSource();
+		if (source.length == 0) {
+			malformedKey();
+			return;
+		}
+		int kind = -1;
+		switch (source[0]) {
+			case '*':
+				kind = Wildcard.UNBOUND;
+				break;
+			case '+':
+				kind = Wildcard.EXTENDS;
+				break;
+			case '-':
+				kind = Wildcard.SUPER;
+				break;
+		}
+		if (kind == -1) {
+			malformedKey();
+			return;
+		}
+		if (kind != Wildcard.UNBOUND)
+			parseWildcardBound();
+		consumeWildCard(kind);
 	}
 
 	private void parseWildcardRank() {
@@ -985,6 +993,7 @@ public class BindingKeyParser {
 		BindingKeyParser parser = newParser();
 		parser.parse();
 		consumeParser(parser);
+		this.isMalformed = parser.isMalformed;
 		this.scanner.token = token;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java
index 4e6e8fc..88d7e45 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BindingKeyResolver.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -435,7 +435,14 @@ public class BindingKeyResolver extends BindingKeyParser {
 			case Wildcard.EXTENDS:
 			case Wildcard.SUPER:
 				BindingKeyResolver boundResolver = (BindingKeyResolver) this.types.get(0);
-				this.typeBinding = this.environment.createWildcard((ReferenceBinding) this.typeBinding, this.wildcardRank, (TypeBinding) boundResolver.compilerBinding, null /*no extra bound*/, kind);
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=157847, do not allow creation of
+				// internally inconsistent wildcards of the form '? super <null>' or '? extends <null>'
+				final Binding boundBinding = boundResolver.compilerBinding;
+				if (boundBinding instanceof TypeBinding) {
+					this.typeBinding = this.environment.createWildcard((ReferenceBinding) this.typeBinding, this.wildcardRank, (TypeBinding) boundBinding, null /*no extra bound*/, kind);
+				} else {
+					this.typeBinding = null;
+				}
 				break;
 			case Wildcard.UNBOUND:
 				this.typeBinding = this.environment.createWildcard((ReferenceBinding) this.typeBinding, this.wildcardRank, null/*no bound*/, null /*no extra bound*/, kind);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
index 9ff9f43..82ba955 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
@@ -1046,6 +1046,19 @@ public class CodeAttribute extends ClassFileAttribute implements ICodeAttribute
 					visitor._invokeinterface(pc - this.codeOffset, index, count, constantPoolEntry);
 					pc += 5;
 					break;
+				case IOpcodeMnemonics.INVOKEDYNAMIC :
+					index = u2At(this.classFileBytes, 1, pc);
+					constantPoolEntry = this.constantPool.decodeEntry(index);
+					if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_NameAndType) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					visitor._invokedynamic(
+							pc - this.codeOffset,
+							index,
+							this.constantPool.decodeEntry(constantPoolEntry.getNameAndTypeInfoNameIndex()),
+							this.constantPool.decodeEntry(constantPoolEntry.getNameAndTypeInfoDescriptorIndex()));
+					pc += 5;
+					break;
 				case IOpcodeMnemonics.NEW :
 					index = u2At(this.classFileBytes, 1, pc);
 					constantPoolEntry = this.constantPool.decodeEntry(index);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CommentRecorderParser.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CommentRecorderParser.java
index b596316..41d51c3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CommentRecorderParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CommentRecorderParser.java
@@ -226,7 +226,7 @@ public class CommentRecorderParser extends Parser {
 				this.options.getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore /*nls*/,
 				this.options.sourceLevel /*sourceLevel*/,
 				this.options.taskTags/*taskTags*/,
-				this.options.taskPriorites/*taskPriorities*/,
+				this.options.taskPriorities/*taskPriorities*/,
 				this.options.isTaskCaseSensitive/*taskCaseSensitive*/);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DOMFinder.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DOMFinder.java
index c447a1d..f56ce63 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DOMFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DOMFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.jdt.core.dom.MarkerAnnotation;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.NormalAnnotation;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
+import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeParameter;
@@ -90,6 +91,9 @@ public class DOMFinder extends ASTVisitor {
 		switch (parent.getNodeType()) {
 			case ASTNode.CLASS_INSTANCE_CREATION:
 				name = ((ClassInstanceCreation) parent).getType();
+				if (name.getNodeType() == ASTNode.PARAMETERIZED_TYPE) {
+					name = ((ParameterizedType) name).getType();
+				}
 				break;
 			case ASTNode.ENUM_CONSTANT_DECLARATION:
 				name = ((EnumConstantDeclaration) parent).getName();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java
index 9404ded..d94dd4e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/DefaultBytecodeVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1490,7 +1490,28 @@ public class DefaultBytecodeVisitor implements IBytecodeVisitor {
 		}));
 		writeNewLine();
 	}
+	/**
+	 * @see IBytecodeVisitor#_invokedynamic(int, int, IConstantPoolEntry, IConstantPoolEntry)
+	 */
+	public void _invokedynamic(
+		int pc,
+		int index,
+		IConstantPoolEntry nameEntry,
+		IConstantPoolEntry descriptorEntry) {
 
+		dumpPcNumber(pc);
+		this.buffer.append(Messages.bind(Messages.classformat_invokedynamic, new String[] {
+			OpcodeStringValues.BYTECODE_NAMES[IOpcodeMnemonics.INVOKEDYNAMIC],
+			Integer.toString(index),
+			Util.toString(
+				null,
+				nameEntry.getUtf8Value(),
+				descriptorEntry.getUtf8Value(),
+				true,
+				isCompact())
+		}));
+		writeNewLine();
+	}
 	/**
 	 * @see IBytecodeVisitor#_invokeinterface(int, int, byte, IConstantPoolEntry)
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
index 6c7a1a3..e4df0b0 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -158,107 +158,64 @@ public class Disassembler extends ClassFileBytesDisassembler {
 		});
 	}
 	public static String escapeString(String s) {
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0, max = s.length(); i < max; i++) {
-			char c = s.charAt(i);
-			switch(c) {
-				case '\b' :
-					buffer.append("\\b"); //$NON-NLS-1$
-					break;
-				case '\t' :
-					buffer.append("\\t"); //$NON-NLS-1$
-					break;
-				case '\n' :
-					buffer.append("\\n"); //$NON-NLS-1$
-					break;
-				case '\f' :
-					buffer.append("\\f"); //$NON-NLS-1$
-					break;
-				case '\r' :
-					buffer.append("\\r"); //$NON-NLS-1$
-					break;
-				case '\0' :
-					buffer.append("\\0"); //$NON-NLS-1$
-					break;
-				case '\1' :
-					buffer.append("\\1"); //$NON-NLS-1$
-					break;
-				case '\2' :
-					buffer.append("\\2"); //$NON-NLS-1$
-					break;
-				case '\3' :
-					buffer.append("\\3"); //$NON-NLS-1$
-					break;
-				case '\4' :
-					buffer.append("\\4"); //$NON-NLS-1$
-					break;
-				case '\5' :
-					buffer.append("\\5"); //$NON-NLS-1$
-					break;
-				case '\6' :
-					buffer.append("\\6"); //$NON-NLS-1$
-					break;
-				case '\7' :
-					buffer.append("\\7"); //$NON-NLS-1$
-					break;
-				default:
-					buffer.append(c);
-			}
-		}
-		return buffer.toString();
+		return decodeStringValue(s);
 	}
 
 	static String decodeStringValue(char[] chars) {
 		StringBuffer buffer = new StringBuffer();
 		for (int i = 0, max = chars.length; i < max; i++) {
 			char c = chars[i];
-			switch(c) {
-				case '\b' :
-					buffer.append("\\b"); //$NON-NLS-1$
-					break;
-				case '\t' :
-					buffer.append("\\t"); //$NON-NLS-1$
-					break;
-				case '\n' :
-					buffer.append("\\n"); //$NON-NLS-1$
-					break;
-				case '\f' :
-					buffer.append("\\f"); //$NON-NLS-1$
-					break;
-				case '\r' :
-					buffer.append("\\r"); //$NON-NLS-1$
-					break;
-				case '\0' :
-					buffer.append("\\0"); //$NON-NLS-1$
-					break;
-				case '\1' :
-					buffer.append("\\1"); //$NON-NLS-1$
-					break;
-				case '\2' :
-					buffer.append("\\2"); //$NON-NLS-1$
-					break;
-				case '\3' :
-					buffer.append("\\3"); //$NON-NLS-1$
-					break;
-				case '\4' :
-					buffer.append("\\4"); //$NON-NLS-1$
-					break;
-				case '\5' :
-					buffer.append("\\5"); //$NON-NLS-1$
-					break;
-				case '\6' :
-					buffer.append("\\6"); //$NON-NLS-1$
-					break;
-				case '\7' :
-					buffer.append("\\7"); //$NON-NLS-1$
-					break;
-				default:
-					buffer.append(c);
-			}
+			escapeChar(buffer, c);
 		}
 		return buffer.toString();
 	}
 
+	private static void escapeChar(StringBuffer buffer, char c) {
+		switch(c) {
+			case '\b' :
+				buffer.append("\\b"); //$NON-NLS-1$
+				break;
+			case '\t' :
+				buffer.append("\\t"); //$NON-NLS-1$
+				break;
+			case '\n' :
+				buffer.append("\\n"); //$NON-NLS-1$
+				break;
+			case '\f' :
+				buffer.append("\\f"); //$NON-NLS-1$
+				break;
+			case '\r' :
+				buffer.append("\\r"); //$NON-NLS-1$
+				break;
+			case '\0' :
+				buffer.append("\\0"); //$NON-NLS-1$
+				break;
+			case '\1' :
+				buffer.append("\\1"); //$NON-NLS-1$
+				break;
+			case '\2' :
+				buffer.append("\\2"); //$NON-NLS-1$
+				break;
+			case '\3' :
+				buffer.append("\\3"); //$NON-NLS-1$
+				break;
+			case '\4' :
+				buffer.append("\\4"); //$NON-NLS-1$
+				break;
+			case '\5' :
+				buffer.append("\\5"); //$NON-NLS-1$
+				break;
+			case '\6' :
+				buffer.append("\\6"); //$NON-NLS-1$
+				break;
+			case '\7' :
+				buffer.append("\\7"); //$NON-NLS-1$
+				break;
+			default:
+				buffer.append(c);
+		}
+	}
+
 	static String decodeStringValue(String s) {
 		return decodeStringValue(s.toCharArray());
 	}
@@ -337,22 +294,26 @@ public class Disassembler extends ClassFileBytesDisassembler {
 						value = Double.toString(constantPoolEntry.getDoubleValue());
 						break;
 					case IConstantPoolConstant.CONSTANT_Integer:
+						StringBuffer temp = new StringBuffer();
 						switch(annotationComponentValue.getTag()) {
 							case IAnnotationComponentValue.CHAR_TAG :
-								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
+								temp.append('\'');
+								escapeChar(temp, (char) constantPoolEntry.getIntegerValue());
+								temp.append('\'');
 								break;
 							case IAnnotationComponentValue.BOOLEAN_TAG :
-								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
+								temp.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
 								break;
 							case IAnnotationComponentValue.BYTE_TAG :
-								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(byte) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 								break;
 							case IAnnotationComponentValue.SHORT_TAG :
-								value =  "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(short) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 								break;
 							case IAnnotationComponentValue.INTEGER_TAG :
-								value =  "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(int) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 						}
+						value = String.valueOf(temp);
 						break;
 					case IConstantPoolConstant.CONSTANT_Utf8:
 						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
@@ -1836,22 +1797,26 @@ public class Disassembler extends ClassFileBytesDisassembler {
 						value = Double.toString(constantPoolEntry.getDoubleValue());
 						break;
 					case IConstantPoolConstant.CONSTANT_Integer:
+						StringBuffer temp = new StringBuffer();
 						switch(annotationComponentValue.getTag()) {
 							case IAnnotationComponentValue.CHAR_TAG :
-								value = "'" + (char) constantPoolEntry.getIntegerValue() + "'"; //$NON-NLS-1$//$NON-NLS-2$
+								temp.append('\'');
+								escapeChar(temp, (char) constantPoolEntry.getIntegerValue());
+								temp.append('\'');
 								break;
 							case IAnnotationComponentValue.BOOLEAN_TAG :
-								value = constantPoolEntry.getIntegerValue() == 1 ? "true" : "false";//$NON-NLS-1$//$NON-NLS-2$
+								temp.append(constantPoolEntry.getIntegerValue() == 1 ? "true" : "false");//$NON-NLS-1$//$NON-NLS-2$
 								break;
 							case IAnnotationComponentValue.BYTE_TAG :
-								value = "(byte) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(byte) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 								break;
 							case IAnnotationComponentValue.SHORT_TAG :
-								value =  "(short) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(short) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 								break;
 							case IAnnotationComponentValue.INTEGER_TAG :
-								value =  "(int) " + constantPoolEntry.getIntegerValue(); //$NON-NLS-1$
+								temp.append("(int) ").append(constantPoolEntry.getIntegerValue()); //$NON-NLS-1$
 						}
+						value = String.valueOf(temp);
 						break;
 					case IConstantPoolConstant.CONSTANT_Utf8:
 						value = "\"" + decodeStringValue(constantPoolEntry.getUtf8Value()) + "\"";//$NON-NLS-1$//$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HandleFactory.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HandleFactory.java
index d306117..9087c13 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HandleFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/HandleFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,9 +65,9 @@ public class HandleFactory {
 
 	/**
 	 * Creates an Openable handle from the given resource path.
-	 * The resource path can be a path to a file in the workbench (eg. /Proj/com/ibm/jdt/core/HandleFactory.java)
+	 * The resource path can be a path to a file in the workbench (e.g. /Proj/com/ibm/jdt/core/HandleFactory.java)
 	 * or a path to a file in a jar file - it then contains the path to the jar file and the path to the file in the jar
-	 * (eg. c:/jdk1.2.2/jre/lib/rt.jar|java/lang/Object.class or /Proj/rt.jar|java/lang/Object.class)
+	 * (e.g. c:/jdk1.2.2/jre/lib/rt.jar|java/lang/Object.class or /Proj/rt.jar|java/lang/Object.class)
 	 * NOTE: This assumes that the resource path is the toString() of an IPath,
 	 *       in other words, it uses the IPath.SEPARATOR for file path
 	 *            and it uses '/' for entries in a zip file.
@@ -144,10 +144,11 @@ public class HandleFactory {
 			if (org.eclipse.jdt.internal.core.util.Util.isJavaLikeFileName(simpleName)) {
 				ICompilationUnit unit= pkgFragment.getCompilationUnit(simpleName);
 				return (Openable) unit;
-			} else {
+			} else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(simpleName)){
 				IClassFile classFile= pkgFragment.getClassFile(simpleName);
 				return (Openable) classFile;
 			}
+			return null;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
index 81a725a..fa27ea7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
@@ -316,6 +316,7 @@ public final class Messages extends NLS {
 	public static String classformat_invokeinterface;
 	public static String classformat_invokestatic;
 	public static String classformat_invokevirtual;
+	public static String classformat_invokedynamic;
 	public static String classformat_getfield;
 	public static String classformat_getstatic;
 	public static String classformat_putstatic;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
index 1cc9071..6192c20 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -365,10 +365,9 @@ public void checkTaskTag(int commentStart, int commentEnd) throws InvalidInputEx
 			continue;
 		}
 		// trim the message
+		// we don't trim the beginning of the message to be able to show it after the task tag
 		while (CharOperation.isWhitespace(src[end]) && msgStart <= end)
 			end--;
-		while (CharOperation.isWhitespace(src[msgStart]) && msgStart <= end)
-			msgStart++;
 		// update the end position of the task
 		this.foundTaskPositions[i][1] = end;
 		// get the message source
@@ -1376,6 +1375,9 @@ public int getNextToken() throws InvalidInputException {
 						}
 
 						while (this.currentCharacter != '"') {
+							if (this.currentPosition >= this.eofPosition) {
+								throw new InvalidInputException(UNTERMINATED_STRING);
+							}
 							/**** \r and \n are not valid in string literals ****/
 							if ((this.currentCharacter == '\n') || (this.currentCharacter == '\r')) {
 								// relocate if finding another quote fairly close: thus unicode '/u000D' will be fully consumed
@@ -1483,6 +1485,12 @@ public int getNextToken() throws InvalidInputException {
 								} //jump over the \\
 								boolean isUnicode = false;
 								while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+									if (this.currentPosition >= this.eofPosition) {
+										this.lastCommentLinePosition = this.currentPosition;
+										this.currentPosition ++;
+										// this avoids duplicating the code in the catch(IndexOutOfBoundsException e)
+										throw new IndexOutOfBoundsException();
+									}
 									this.lastCommentLinePosition = this.currentPosition;
 									//get the next char
 									isUnicode = false;
@@ -1501,16 +1509,16 @@ public int getNextToken() throws InvalidInputException {
 								 * We need to completely consume the line break
 								 */
 								if (this.currentCharacter == '\r'
-								   && this.eofPosition > this.currentPosition) {
-								   	if (this.source[this.currentPosition] == '\n') {
+										&& this.eofPosition > this.currentPosition) {
+									if (this.source[this.currentPosition] == '\n') {
 										this.currentPosition++;
 										this.currentCharacter = '\n';
-								   	} else if ((this.source[this.currentPosition] == '\\')
+									} else if ((this.source[this.currentPosition] == '\\')
 										&& (this.source[this.currentPosition + 1] == 'u')) {
 										getNextUnicodeChar();
 										isUnicode = true;
 									}
-							   	}
+								}
 								recordComment(TokenNameCOMMENT_LINE);
 								if (this.taskTags != null) checkTaskTag(this.startPosition, this.currentPosition);
 								if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
@@ -1598,6 +1606,9 @@ public int getNextToken() throws InvalidInputException {
 								//loop until end of comment */
 								int firstTag = 0;
 								while ((this.currentCharacter != '/') || (!star)) {
+									if (this.currentPosition >= this.eofPosition) {
+										throw new InvalidInputException(UNTERMINATED_COMMENT);
+									}
 									if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
 										if (this.recordLineSeparator) {
 											if (isUnicode) {
@@ -1862,13 +1873,16 @@ public final void jumpOverMethodBody() {
 								getNextUnicodeChar();
 							} else {
 								if (this.withoutUnicodePtr != 0) {
-								    unicodeStore();
+									unicodeStore();
 								}
 							}
 						} catch (InvalidInputException ex) {
 								// ignore
 						}
 						while (this.currentCharacter != '"') {
+							if (this.currentPosition >= this.eofPosition) {
+								return;
+							}
 							if (this.currentCharacter == '\r'){
 								if (this.source[this.currentPosition] == '\n') this.currentPosition++;
 								break NextToken; // the string cannot go further that the line
@@ -1932,6 +1946,12 @@ public final void jumpOverMethodBody() {
 								} //jump over the \\
 								boolean isUnicode = false;
 								while (this.currentCharacter != '\r' && this.currentCharacter != '\n') {
+									if (this.currentPosition >= this.eofPosition) {
+										this.lastCommentLinePosition = this.currentPosition;
+										this.currentPosition ++;
+										// this avoids duplicating the code inside the catch(IndexOutOfBoundsException e) below
+										throw new IndexOutOfBoundsException();
+									}
 									this.lastCommentLinePosition = this.currentPosition;
 									//get the next char
 									isUnicode = false;
@@ -1950,16 +1970,16 @@ public final void jumpOverMethodBody() {
 								 * We need to completely consume the line break
 								 */
 								if (this.currentCharacter == '\r'
-								   && this.eofPosition > this.currentPosition) {
-								   	if (this.source[this.currentPosition] == '\n') {
+										&& this.eofPosition > this.currentPosition) {
+									if (this.source[this.currentPosition] == '\n') {
 										this.currentPosition++;
 										this.currentCharacter = '\n';
-								   	} else if ((this.source[this.currentPosition] == '\\')
+									} else if ((this.source[this.currentPosition] == '\\')
 											&& (this.source[this.currentPosition + 1] == 'u')) {
 										isUnicode = true;
 										getNextUnicodeChar();
 									}
-							   	}
+								}
 								recordComment(TokenNameCOMMENT_LINE);
 								if (this.recordLineSeparator
 									&& ((this.currentCharacter == '\r') || (this.currentCharacter == '\n'))) {
@@ -2004,7 +2024,7 @@ public final void jumpOverMethodBody() {
 								} else {
 									isUnicode = false;
 									if (this.withoutUnicodePtr != 0) {
-    								    unicodeStore();
+										unicodeStore();
 									}
 								}
 
@@ -2042,6 +2062,9 @@ public final void jumpOverMethodBody() {
 								//loop until end of comment */
 								int firstTag = 0;
 								while ((this.currentCharacter != '/') || (!star)) {
+									if (this.currentPosition >= this.eofPosition) {
+										return;
+									}
 									if ((this.currentCharacter == '\r') || (this.currentCharacter == '\n')) {
 										if (this.recordLineSeparator) {
 											if (isUnicode) {
@@ -2941,20 +2964,23 @@ private int internalScanIdentifierOrKeyword(int index, int length, char[] data)
 		case 'e' : //else extends
 			switch (length) {
 				case 4 :
-					if ((data[++index] == 'l') && (data[++index] == 's') && (data[++index] == 'e'))
-						return TokenNameelse;
-					else if ((data[index] == 'n')
-						&& (data[++index] == 'u')
-						&& (data[++index] == 'm')) {
-							if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
-								return TokenNameenum;
-							} else {
-								this.useEnumAsAnIndentifier = true;
-								return TokenNameIdentifier;
-							}
+					if (data[++index] == 'l') {
+						if ((data[++index] == 's') && (data[++index] == 'e')) {
+							return TokenNameelse;
 						} else {
 							return TokenNameIdentifier;
 						}
+					} else if ((data[index] == 'n')
+							&& (data[++index] == 'u')
+							&& (data[++index] == 'm')) {
+						if (this.sourceLevel >= ClassFileConstants.JDK1_5) {
+							return TokenNameenum;
+						} else {
+							this.useEnumAsAnIndentifier = true;
+							return TokenNameIdentifier;
+						}
+					}
+					return TokenNameIdentifier;
 				case 7 :
 					if ((data[++index] == 'x')
 						&& (data[++index] == 't')
@@ -3637,36 +3663,26 @@ public String toString() {
 	if (this.currentPosition <= 0)
 		return "NOT started!\n\n"+ new String(this.source); //$NON-NLS-1$
 
-	char front[] = new char[this.startPosition];
-	System.arraycopy(this.source, 0, front, 0, this.startPosition);
+	StringBuffer buffer = new StringBuffer();
+	if (this.startPosition < 1000) {
+		buffer.append(this.source, 0, this.startPosition);
+	} else {
+		buffer.append("<source beginning>\n...\n"); //$NON-NLS-1$
+		int line = Util.getLineNumber(this.startPosition-1000, this.lineEnds, 0, this.linePtr);
+		int lineStart = getLineStart(line);
+		buffer.append(this.source, lineStart, this.startPosition-lineStart);
+	}
 
+	buffer.append("\n===============================\nStarts here -->"); //$NON-NLS-1$
 	int middleLength = (this.currentPosition - 1) - this.startPosition + 1;
-	char middle[];
 	if (middleLength > -1) {
-		middle = new char[middleLength];
-		System.arraycopy(
-			this.source,
-			this.startPosition,
-			middle,
-			0,
-			middleLength);
-	} else {
-		middle = CharOperation.NO_CHAR;
+		buffer.append(this.source, this.startPosition, middleLength);
 	}
+	buffer.append("<-- Ends here\n===============================\n"); //$NON-NLS-1$
 
-	char end[] = new char[this.eofPosition - (this.currentPosition - 1)];
-	System.arraycopy(
-		this.source,
-		(this.currentPosition - 1) + 1,
-		end,
-		0,
-		this.eofPosition - (this.currentPosition - 1) - 1);
-
-	return new String(front)
-		+ "\n===============================\nStarts here -->" //$NON-NLS-1$
-		+ new String(middle)
-		+ "<-- Ends here\n===============================\n" //$NON-NLS-1$
-		+ new String(end);
+	buffer.append(this.source, (this.currentPosition - 1) + 1, this.eofPosition - (this.currentPosition - 1) - 1);
+
+	return buffer.toString();
 }
 public String toStringAction(int act) {
 	switch (act) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
index 6f052c4..6265464 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -95,7 +95,7 @@ public class Util {
 		public org.eclipse.jdt.internal.compiler.ast.ASTNode get(Binding binding);
 	}
 
-	private static final String ARGUMENTS_DELIMITER = "#"; //$NON-NLS-1$
+	private static final char ARGUMENTS_DELIMITER = '#';
 
 	private static final String EMPTY_ARGUMENT = "   "; //$NON-NLS-1$
 
@@ -112,6 +112,7 @@ public class Util {
 	private static final char[] VOID = "void".toCharArray(); //$NON-NLS-1$
 	private static final char[] INIT = "<init>".toCharArray(); //$NON-NLS-1$
 
+	private static final String TASK_PRIORITIES_PROBLEM = "TASK_PRIORITIES_PB"; //$NON-NLS-1$
 	private static List fgRepeatedMessages= new ArrayList(5);
 
 	private Util() {
@@ -267,44 +268,6 @@ public class Util {
 		}
 		return len1 - len2;
 	}
-
-	/**
-	 * Concatenate two strings with a char in between.
-	 * @see #concat(String, String)
-	 */
-	public static String concat(String s1, char c, String s2) {
-		if (s1 == null) s1 = "null"; //$NON-NLS-1$
-		if (s2 == null) s2 = "null"; //$NON-NLS-1$
-		int l1 = s1.length();
-		int l2 = s2.length();
-		char[] buf = new char[l1 + 1 + l2];
-		s1.getChars(0, l1, buf, 0);
-		buf[l1] = c;
-		s2.getChars(0, l2, buf, l1 + 1);
-		return new String(buf);
-	}
-
-	/**
-	 * Concatenate two strings.
-	 * Much faster than using +, which:
-	 * 		- creates a StringBuffer,
-	 * 		- which is synchronized,
-	 * 		- of default size, so the resulting char array is
-	 *        often larger than needed.
-	 * This implementation creates an extra char array, since the
-	 * String constructor copies its argument, but there's no way around this.
-	 */
-	public static String concat(String s1, String s2) {
-		if (s1 == null) s1 = "null"; //$NON-NLS-1$
-		if (s2 == null) s2 = "null"; //$NON-NLS-1$
-		int l1 = s1.length();
-		int l2 = s2.length();
-		char[] buf = new char[l1 + l2];
-		s1.getChars(0, l1, buf, 0);
-		s2.getChars(0, l2, buf, l1);
-		return new String(buf);
-	}
-
 	/**
 	 * Concatenate a String[] compound name to a continuous char[].
 	 */
@@ -327,7 +290,19 @@ public class Util {
 		}
 		return compoundChars;
 	}
-
+	public static String concatenateName(String name1, String name2, char separator) {
+		StringBuffer buf= new StringBuffer();
+		if (name1 != null && name1.length() > 0) {
+			buf.append(name1);
+		}
+		if (name2 != null && name2.length() > 0) {
+			if (buf.length() > 0) {
+				buf.append(separator);
+			}
+			buf.append(name2);
+		}
+		return buf.toString();
+	}
 	/**
 	 * Returns the concatenation of the given array parts using the given separator between each part.
 	 * <br>
@@ -411,25 +386,6 @@ public class Util {
 		return buffer.toString();
 
 	}
-
-	/**
-	 * Concatenate three strings.
-	 * @see #concat(String, String)
-	 */
-	public static String concat(String s1, String s2, String s3) {
-		if (s1 == null) s1 = "null"; //$NON-NLS-1$
-		if (s2 == null) s2 = "null"; //$NON-NLS-1$
-		if (s3 == null) s3 = "null"; //$NON-NLS-1$
-		int l1 = s1.length();
-		int l2 = s2.length();
-		int l3 = s3.length();
-		char[] buf = new char[l1 + l2 + l3];
-		s1.getChars(0, l1, buf, 0);
-		s2.getChars(0, l2, buf, l1);
-		s3.getChars(0, l3, buf, l1 + l2);
-		return new String(buf);
-	}
-
 	/**
 	 * Converts a type signature from the IBinaryType representation to the DC representation.
 	 */
@@ -1058,7 +1014,7 @@ public class Util {
 			if(arguments[j].length() == 0) {
 				args.append(EMPTY_ARGUMENT);
 			} else {
-				args.append(arguments[j]);
+				encodeArgument(arguments[j], args);
 			}
 		}
 
@@ -1066,16 +1022,39 @@ public class Util {
 	}
 
 	/**
+	 * Encode the argument by doubling the '#' if present into the argument value.
+	 * 
+	 * <p>This stores the encoded argument into the given buffer.</p>
+	 *
+	 * @param argument the given argument
+	 * @param buffer the buffer in which the encoded argument is stored
+	 */
+	private static void encodeArgument(String argument, StringBuffer buffer) {
+		for (int i = 0, max = argument.length(); i < max; i++) {
+			char charAt = argument.charAt(i);
+			switch(charAt) {
+				case ARGUMENTS_DELIMITER :
+					buffer.append(ARGUMENTS_DELIMITER).append(ARGUMENTS_DELIMITER);
+					break;
+				default:
+					buffer.append(charAt);
+			}
+		}
+	}
+
+	/**
 	 * Separate all the arguments of a String made by getProblemArgumentsForMarker
 	 */
 	public static String[] getProblemArgumentsFromMarker(String argumentsString){
-		if (argumentsString == null) return null;
+		if (argumentsString == null) {
+			return null;
+		}
 		int index = argumentsString.indexOf(':');
 		if(index == -1)
 			return null;
 
 		int length = argumentsString.length();
-		int numberOfArg;
+		int numberOfArg = 0;
 		try{
 			numberOfArg = Integer.parseInt(argumentsString.substring(0 , index));
 		} catch (NumberFormatException e) {
@@ -1083,22 +1062,64 @@ public class Util {
 		}
 		argumentsString = argumentsString.substring(index + 1, length);
 
-		String[] args = new String[length];
-		int count = 0;
+		return decodeArgumentString(numberOfArg, argumentsString);
+	}
 
-		StringTokenizer tokenizer = new StringTokenizer(argumentsString, ARGUMENTS_DELIMITER);
-		while(tokenizer.hasMoreTokens()) {
-			String argument = tokenizer.nextToken();
-			if(argument.equals(EMPTY_ARGUMENT))
-				argument = "";  //$NON-NLS-1$
-			args[count++] = argument;
+	private static String[] decodeArgumentString(int length, String argumentsString) {
+		// decode the argumentString knowing that '#' is doubled if part of the argument value
+		if (length == 0) {
+			if (argumentsString.length() != 0) {
+				return null;
+			}
+			return CharOperation.NO_STRINGS;
 		}
-
-		if(count != numberOfArg)
+		String[] result = new String[length];
+		int count = 0;
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0, max = argumentsString.length(); i < max; i++) {
+			char current = argumentsString.charAt(i);
+			switch(current) {
+				case ARGUMENTS_DELIMITER :
+					/* check the next character. If this is also ARGUMENTS_DELIMITER then only put one into the
+					 * decoded argument and proceed with the next character
+					 */
+					if ((i + 1) == max) {
+						return null;
+					}
+					char next = argumentsString.charAt(i + 1);
+					if (next == ARGUMENTS_DELIMITER) {
+						buffer.append(ARGUMENTS_DELIMITER);
+						i++; // proceed with the next character
+					} else {
+						// this means the current argument is over
+						String currentArgumentContents = String.valueOf(buffer);
+						if (EMPTY_ARGUMENT.equals(currentArgumentContents)) {
+							currentArgumentContents = org.eclipse.jdt.internal.compiler.util.Util.EMPTY_STRING;
+						}
+						result[count++] = currentArgumentContents;
+						if (count > length) {
+							// too many elements - ill-formed
+							return null;
+						}
+						buffer.delete(0, buffer.length());
+					}
+					break;
+				default :
+					buffer.append(current);
+			}
+		}
+		// process last argument
+		String currentArgumentContents = String.valueOf(buffer);
+		if (EMPTY_ARGUMENT.equals(currentArgumentContents)) {
+			currentArgumentContents = org.eclipse.jdt.internal.compiler.util.Util.EMPTY_STRING;
+		}
+		result[count++] = currentArgumentContents;
+		if (count > length) {
+			// too many elements - ill-formed
 			return null;
-
-		System.arraycopy(args, 0, args = new String[count], 0, count);
-		return args;
+		}
+		buffer.delete(0, buffer.length());
+		return result;
 	}
 
 	/**
@@ -1382,7 +1403,7 @@ public class Util {
 
 					}
 				} else {
-					parameterSignatures = new String[0];
+					parameterSignatures = CharOperation.NO_STRINGS;
 				}
 				return (JavaElement) declaringType.getMethod(String.valueOf(methodDeclaration.selector), parameterSignatures);
 			}
@@ -1805,6 +1826,17 @@ public class Util {
 		log(e);
 	}
 
+	public static void logRepeatedMessage(String key, int statusErrorID, String message) {
+		if (key == null) {
+			throw new IllegalArgumentException("key cannot be null"); //$NON-NLS-1$
+		}
+		if (fgRepeatedMessages.contains(key)) {
+			return;
+		}
+		fgRepeatedMessages.add(key);
+		log(statusErrorID, message);
+	}
+
 	/*
 	 * Add a log entry
 	 */
@@ -2552,7 +2584,7 @@ public class Util {
 
 		// decode declaring class name
 		// it can be either an array signature or a type signature
-		if (declaringClass.length > 0) {
+		if (declaringClass != null && declaringClass.length > 0) {
 			char[] declaringClassSignature = null;
 			if (declaringClass[0] == Signature.C_ARRAY) {
 				CharOperation.replace(declaringClass, '/', '.');
@@ -2567,14 +2599,14 @@ public class Util {
 			} else {
 				buffer.append(declaringClassSignature);
 			}
+			if (!isConstructor) {
+				buffer.append('.');
+			}
 		}
 
 		// selector
-		if (!isConstructor) {
-			buffer.append('.');
-			if (methodName != null) {
-				buffer.append(methodName);
-			}
+		if (!isConstructor && methodName != null) {
+			buffer.append(methodName);
 		}
 
 		// parameters
@@ -3196,6 +3228,34 @@ public class Util {
 				return null;
 		}
 	}
+	
+	/*
+	 * Creates a member value from the given constant in case of negative numerals,
+	 * and sets the valueKind on the given memberValuePair
+	 */
+	public static Object getNegativeAnnotationMemberValue(MemberValuePair memberValuePair, Constant constant) {
+		if (constant == null) {
+			memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
+			return null;
+		}
+		switch (constant.typeID()) {
+			case TypeIds.T_int :
+				memberValuePair.valueKind = IMemberValuePair.K_INT;
+				return new Integer(constant.intValue() * -1);
+			case TypeIds.T_float :
+				memberValuePair.valueKind = IMemberValuePair.K_FLOAT;
+				return new Float(constant.floatValue() * -1.0f);
+			case TypeIds.T_double :
+				memberValuePair.valueKind = IMemberValuePair.K_DOUBLE;
+				return new Double(constant.doubleValue() * -1.0);
+			case TypeIds.T_long :
+				memberValuePair.valueKind = IMemberValuePair.K_LONG;
+				return new Long(constant.longValue() * -1L);
+			default:
+				memberValuePair.valueKind = IMemberValuePair.K_UNKNOWN;
+				return null;
+		}
+	}
 	/**
 	 * Split signatures of all levels  from a type unique key.
 	 *
@@ -3523,4 +3583,98 @@ public class Util {
 		return start;
 	}
 
+	/*
+	 * This method adjusts the task tags and task priorities so that they have the same size
+	 */
+	public static void fixTaskTags(Map defaultOptionsMap) {
+		Object taskTagsValue = defaultOptionsMap.get(JavaCore.COMPILER_TASK_TAGS);
+		char[][] taskTags = null;
+		if (taskTagsValue instanceof String) {
+			taskTags = CharOperation.splitAndTrimOn(',', ((String) taskTagsValue).toCharArray());
+		}
+		Object taskPrioritiesValue = defaultOptionsMap.get(JavaCore.COMPILER_TASK_PRIORITIES);
+		char[][] taskPriorities = null;
+		if (taskPrioritiesValue instanceof String) {
+			taskPriorities = CharOperation.splitAndTrimOn(',', ((String) taskPrioritiesValue).toCharArray());
+		}
+		if (taskPriorities == null) {
+			if (taskTags != null) {
+				Util.logRepeatedMessage(TASK_PRIORITIES_PROBLEM, IStatus.ERROR, "Inconsistent values for taskTags (not null) and task priorities (null)"); //$NON-NLS-1$
+				defaultOptionsMap.remove(JavaCore.COMPILER_TASK_TAGS);
+			}
+			return;
+		} else if (taskTags == null) {
+			Util.logRepeatedMessage(TASK_PRIORITIES_PROBLEM, IStatus.ERROR, "Inconsistent values for taskTags (null) and task priorities (not null)"); //$NON-NLS-1$
+			defaultOptionsMap.remove(JavaCore.COMPILER_TASK_PRIORITIES);
+			return;
+		}
+		int taskTagsLength = taskTags.length;
+		int taskPrioritiesLength = taskPriorities.length;
+		if (taskTagsLength != taskPrioritiesLength) {
+			Util.logRepeatedMessage(TASK_PRIORITIES_PROBLEM, IStatus.ERROR, "Inconsistent values for taskTags and task priorities : length is different"); //$NON-NLS-1$
+			if (taskTagsLength > taskPrioritiesLength) {
+				System.arraycopy(taskTags, 0, (taskTags = new char[taskPrioritiesLength][]), 0, taskPrioritiesLength);
+				defaultOptionsMap.put(JavaCore.COMPILER_TASK_TAGS, new String(CharOperation.concatWith(taskTags,',')));
+			} else {
+				System.arraycopy(taskPriorities, 0, (taskPriorities = new char[taskTagsLength][]), 0, taskTagsLength);
+				defaultOptionsMap.put(JavaCore.COMPILER_TASK_PRIORITIES, new String(CharOperation.concatWith(taskPriorities,',')));
+			}
+		}
+	}
+	
+	/**
+	 * Answers true if the given name, starting from the given index, starts with the given prefix,
+	 * false otherwise. isCaseSensitive is used to find out whether or not the comparison should be
+	 * case sensitive.
+	 * <br>
+	 * <br>
+	 * For example:
+	 * <ol>
+	 * <li><pre>
+	 *    prefix = { 'a' , 'B' }
+	 *    name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    startIndex = 2
+	 *    isCaseSensitive = false
+	 *    result => true
+	 * </pre>
+	 * </li>
+	 * <li><pre>
+	 *    prefix = { 'a' , 'B' }
+	 *    name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' }
+	 *    startIndex = 2
+	 *    isCaseSensitive = true
+	 *    result => false
+	 * </pre>
+	 * </li>
+	 * </ol>
+	 *
+	 * @param prefix the given prefix
+	 * @param name the given name
+	 * @param isCaseSensitive to find out whether or not the comparison should be case sensitive
+	 * @param startIndex index from which the prefix should be searched in the name
+	 * @return true if the given name starts with the given prefix, false otherwise
+	 * @throws NullPointerException if the given name is null or if the given prefix is null
+	 */
+	public static final boolean prefixEquals(
+		char[] prefix,
+		char[] name,
+		boolean isCaseSensitive,
+		int startIndex) {
+
+		int max = prefix.length;
+		if (name.length - startIndex < max)
+			return false;
+		if (isCaseSensitive) {
+			for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name
+				if (prefix[i] != name[startIndex + i])
+					return false;
+			return true;
+		}
+
+		for (int i = max; --i >= 0;) // assumes the prefix is not larger than the name
+			if (ScannerHelper.toLowerCase(prefix[i])
+				!= ScannerHelper.toLowerCase(name[startIndex + i]))
+				return false;
+		return true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
index 2b7f435..78a1922 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ hierarchy_creatingOnType = Creating type hierarchy on {0}...
 ### java element
 element_doesNotExist = {0} does not exist
 element_notOnClasspath = {0} is not on its project''s build path
-element_invalidClassFileName = Class file name must end with .class
+element_invalidClassFileName = {0} is not a valid class file name
 element_reconciling = Reconciling...
 element_attachingSource = Attaching source...
 element_invalidResourceForProject = Illegal argument - must be one of IProject, IFolder, or IFile
@@ -184,7 +184,7 @@ path_nullPath = Path cannot be null
 path_mustBeAbsolute = Path must be absolute
 cache_invalidLoadFactor = Incorrect load factor
 savedState_jobName = Processing Java changes since last activation
-refreshing_external_folders = "Refreshing external folders"
+refreshing_external_folders = Refreshing external folders
 
 ## java model initialization
 javamodel_initialization = Initializing Java tooling
@@ -355,6 +355,7 @@ classformat_new = {0} {2} [{1}]
 classformat_iinc = {0} {1} {2}{3}
 classformat_invokespecial ={0} {2} [{1}]
 classformat_invokeinterface ={0} {3} [{1}] [nargs: {2}]
+classformat_invokedynamic={0} {2} [{1}]
 classformat_invokestatic ={0} {2} [{1}]
 classformat_invokevirtual ={0} {2} [{1}]
 classformat_getfield ={0} {2}.{3} : {4} [{1}]
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/API_changes.html b/eclipse/plugins/org.eclipse.jdt.core/notes/API_changes.html
index 93f1dbe..0ae31a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/notes/API_changes.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/API_changes.html
@@ -232,7 +232,7 @@ void becomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor moni
  *
  * It is possible that the contents of the original resource have changed
  * since this working copy was created, in which case there is an update conflict.
- * The value of the force parameter effects the resolution of
+ * The value of the force parameter affects the resolution of
  * such a conflict:
  * - true - in this case the contents of this working copy are applied to
  * 	the underlying resource even though this working copy was created 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/R30_buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/notes/R30_buildnotes_jdt-core.html
index 676a991..cc985a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/notes/R30_buildnotes_jdt-core.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/R30_buildnotes_jdt-core.html
@@ -721,7 +721,7 @@ public static void addPreProcessingResourceChangedListener(IResourceChangeListen
 /**
  * Removes the given pre-processing resource changed listener.
  *
- * Has no affect if an identical listener is not registered.
+ * Has no effect if an identical listener is not registered.
  *
  * @param listener the listener
  * @since 3.0
@@ -4006,7 +4006,7 @@ void becomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor moni
  *
  * It is possible that the contents of the original resource have changed
  * since this working copy was created, in which case there is an update conflict.
- * The value of the force parameter effects the resolution of
+ * The value of the force parameter affects the resolution of
  * such a conflict:
  * - true - in this case the contents of this working copy are applied to
  * 	the underlying resource even though this working copy was created 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/R31_buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/notes/R31_buildnotes_jdt-core.html
index ed4a307..7a64b2a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/notes/R31_buildnotes_jdt-core.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/R31_buildnotes_jdt-core.html
@@ -1704,7 +1704,7 @@ What's new in this drop</h2>
       </ul>
 </li>
 <li>Code select now works into Javadoc comment wherever a reference can be specified
-(ie. @see, @link, @linkplain, @throws, @exception, @param or @value tags)<br>
+(i.e. @see, @link, @linkplain, @throws, @exception, @param or @value tags)<br>
 (see bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=54968">54968</a>).<br>
 For example, hit F3 with cursor located in <code>MyClass</code>, in following Javadoc comment:
 <pre>
@@ -1898,7 +1898,7 @@ int IGNORE_DECLARING_TYPE = 0x10;
  */
 int IGNORE_RETURN_TYPE = 0x20;
 </pre>
-Note that these flags are active only for search of declarations (ie. <code>IJavaSearchConstants.DECLARATIONS</code> and <code>IJavaSearchConstants.ALL_OCCURRENCES</code>)
+Note that these flags are active only for search of declarations (i.e. <code>IJavaSearchConstants.DECLARATIONS</code> and <code>IJavaSearchConstants.ALL_OCCURRENCES</code>)
 and while searching for IJavaElement (see doc of <code>SearchPattern.createPattern(IJavaElement, int)</code> API method).
 </li>
 <li>Improved API for type name requestor. Abstract class <code>TypeNameRequestor</code> replaces interface <code>ITypeNameRequestor</code> which is deprecated.<br>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/R32_buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/notes/R32_buildnotes_jdt-core.html
index 0eda2ea..37787aa 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/notes/R32_buildnotes_jdt-core.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/R32_buildnotes_jdt-core.html
@@ -2330,7 +2330,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int
 /**
  * Validate compatibility between given string pattern and match rule.
  *
- * Optimized (ie. returned match rule is modified) combinations are:
+ * Optimized (i.e. returned match rule is modified) combinations are:
  *  - {@link #R_PATTERN_MATCH} without any '*' or '?' in string pattern:
  * 		pattern match bit is unset,
  * 	- {@link #R_PATTERN_MATCH} and {@link #R_PREFIX_MATCH}  bits simultaneously set:
@@ -2342,7 +2342,7 @@ public static final boolean camelCaseMatch(String pattern, int patternStart, int
  * 	- {@link #R_CAMELCASE_MATCH} combined with {@link #R_PREFIX_MATCH} and {@link #R_CASE_SENSITIVE}
  * 		bits is reduced to only {@link #R_CAMELCASE_MATCH} as Camel Case search is already prefix and case sensitive.
  *
- * Rejected (ie. returned match rule -1) combinations are:
+ * Rejected (i.e. returned match rule -1) combinations are:
  * 	- {@link #R_REGEXP_MATCH} with any other match mode bit set.
  *
  * @param stringPattern The string pattern
@@ -2355,7 +2355,7 @@ public static int validateMatchRule(String stringPattern, int matchRule) {
 <li>Added Camel Case support in completion.
 When you perform code complete, the proposals list contains proposals whose name match with the camel case pattern.
 <br>
-eg. a possible proposal for TT| is ToTo.
+e.g. a possible proposal for TT| is ToTo.
 </li>
 <li>Added option to control Camel Case completion.
 <pre>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/R33_buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/notes/R33_buildnotes_jdt-core.html
index d090bcb..6ca636e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/notes/R33_buildnotes_jdt-core.html
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/R33_buildnotes_jdt-core.html
@@ -2156,7 +2156,7 @@ to create an instance of it:
 public static TypeNameMatch createTypeNameMatch(IType type, int modifiers)
 </pre>
 Early performance tests using added <code>searchAllTypeNames</code> method with <code>TypeNameMatchRequestor</code>
-requestor (ie. a la Open Type dialog) show interesting memory footprint reduction (around 30%). More precise measures of this
+requestor (i.e. a la Open Type dialog) show interesting memory footprint reduction (around 30%). More precise measures of this
 performance improvement will be done later...
 </li>
 <li>Added new <code>SearchEngine</code> API method for search all type names with multiple qualifications and type names
@@ -2605,7 +2605,7 @@ Eclipse SDK 3.3M2 - 15th September 2006 - 3.3 MILESTONE 2
 and <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=156491">bug 156491</a>).
 <br>
 When a search requestor (<code>SearchRequestor</code>) accepts this kind of match,
-it knows if a method reference match is a polymorphic method (ie. implemented in a super or sub type) or not.
+it knows if a method reference match is a polymorphic method (i.e. implemented in a super or sub type) or not.
 <p>
 For example, in example below:</p>
 <pre>
@@ -2995,7 +2995,7 @@ Eclipse SDK 3.3M1 - 27th June 2006
  *     . {@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type
  *     . {@link IJavaSearchConstants#CLASS_AND_ENUM}: only look for classes and enumerations
  *     . {@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces
- *     . {@link IJavaSearchConstants#TYPE}: look for all types (ie. classes, interfaces, enum and annotation types)
+ *     . {@link IJavaSearchConstants#TYPE}: look for all types (i.e. classes, interfaces, enum and annotation types)
  * @param scope the scope to search in
  * @param nameRequestor the requestor that collects the results of the search
  * @param waitingPolicy one of
diff --git a/eclipse/plugins/org.eclipse.jdt.core/notes/R35_buildnotes_jdt-core.html b/eclipse/plugins/org.eclipse.jdt.core/notes/R35_buildnotes_jdt-core.html
new file mode 100644
index 0000000..009720c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/notes/R35_buildnotes_jdt-core.html
@@ -0,0 +1,2266 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <title>JDT/Core Release Notes 3.5</title>
+   <link rel="stylesheet" href="jdt_core_style.css" charset="iso-8859-1" type="text/css">
+</head>
+<body text="#000000" bgcolor="#FFFFFF">
+<table border=0 cellspacing=5 cellpadding=2 width="100%" >
+  <tr>
+    <td align="left" width="72%" class="title1">
+      <font size="+3"><b>jdt core - build notes 3.5 stream</b></font>
+    </td>
+  </tr>
+  <tr><td align="left" width="72%" class="title2"><font size="-2">Java development tools core</font></td></tr>
+  <tr><td> </td></tr>
+  <tr>
+  	<td class="title3">
+	  <font size="-1">
+	  Here are the build notes for the Eclipse JDT/Core plug-in project
+	  <a href="http://www.eclipse.org/jdt/core/index.php"><b>org.eclipse.jdt.core</b></a>,
+	  describing <a href="http://bugs.eclipse.org/bugs" target=new>bug</a> resolution and substantial changes in the <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core"><b>HEAD</b></a> branch.
+	  For more information on 3.5 planning, please refer to <a href="http://www.eclipse.org/jdt/core/r3.5/index.php#release-plan">JDT/Core release plan</a>,
+	  the next <a href="http://www.eclipse.org/jdt/core/r3.5/index.php#milestone-plan">milestone plan</a>,
+	  the overall <a href="http://www.eclipse.org/eclipse/development/eclipse_project_plan_3_5.html">official plan</a>,
+	  or the <a href="http://www.eclipse.org/eclipse/platform-releng/buildSchedule.html">build schedule</a>.
+	  This present document covers all changes since Release 3.4 (also see a summary of <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/API_changes.html">API changes</a>).
+	  <br>Maintenance of previous releases of JDT/Core is performed in parallel branches:
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_4_maintenance">R3.4.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_3_maintenance">R3.3.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_2_maintenance">R3.2.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_1_maintenance">R3.1.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R3_0_maintenance">R3.0.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R2_1_maintenance">R2.1.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=R2_0_1">R2.0.x</a>,
+		  <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=ECLIPSE_1_0">R1.0.x</a>.
+	  </font>
+	</td>
+  </tr>
+</table>
+<a name="v_963"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC3 - May 27, 2009 - 3.5 RC3
+<br>Project org.eclipse.jdt.core v_963
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_963">cvs</a>).
+<h2>What's new in this drop</h2>
+Reverting change for bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236818">236818</a>.
+
+<h3>Problem Reports Fixed</h3>
+
+<a name="v_962"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC3 - May 26, 2009
+<br>Project org.eclipse.jdt.core v_962
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_962">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234194">234194</a>
+Run copyright tool
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277669">277669</a>
+IBinding.getJavaElement() returns 'null' where it should not
+
+<a name="v_961"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC2 - May 21, 2009 - 3.5 RC2
+<br>Project org.eclipse.jdt.core v_961
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_961">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277372">277372</a>
+[1.5][compiler] Signature attribute should not be generated with target jsr14
+
+<a name="v_960"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC2 - May 20, 2009
+<br>Project org.eclipse.jdt.core v_960
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_960">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273991">273991</a>
+[assist] Wrong relevance for some proposals which are not compatible with the expected type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276890">276890</a>
+[content assist] proposes nothing for generic type with non-trivial constructor
+
+<a name="v_959"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC1 - May 14, 2009 - 3.5 RC1
+<br>Project org.eclipse.jdt.core v_959
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_959">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275471">275471</a>
+Eclipse Compiler needs a compile dependency to a plug-in, but javac does not need that dependency
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=170197">170197</a>
+[model] JavaCore.newLibraryEntry(.., IClasspathAttribute[], ..) should check for null
+
+<a name="v_958"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC1 - May 12, 2009
+<br>Project org.eclipse.jdt.core v_958
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_958">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275381">275381</a>
+[1.5][compiler] Missing innerClass attribute for inner types used as type arguments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255752">255752</a>
+[javadoc][assist] Inappropriate completion proposals for javadoc at compilation unit level
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275467">275467</a>
+Batch compiler writes log using default encoding instead of UTF-8
+
+<a name="v_957"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC1 - May 7, 2009
+<br>Project org.eclipse.jdt.core v_957
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_957">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273157">273157</a>
+[performance] ManifestAnalyzer is causing a 2x performance drop in the updating of classpath of JavaProjects in comparison with 3.4
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268879">268879</a>
+External folders project not cleaned up
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275215">275215</a>
+org.eclipse.jdt.internal.core.util.KeyToSignature#consumeType() uses a method not available in J2SE-1.4 EE
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275244">275244</a>
+org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ZipEntry, ZipFile) should use BufferedInputStream
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=132679">132679</a>
+[assist] Completion fails within non-static anonymous inner class
+
+<a name="v_956"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5RC1 - May 6, 2009
+<br>Project org.eclipse.jdt.core v_956
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_956">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274114">274114</a>
+org.eclipse.jdt.internal.compiler.tool.Options must be updated with latest compiler options
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=185422">185422</a>
+[1.5][compiler] Incorrectly allows generic use of private inner classes
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274917">274917</a>
+Incorrect "empty block" warning underlining on annotations
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274557">274557</a>
+CompletionContext problem with annotation value element
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274332">274332</a>
+jdt.core.model tests take 2 hours to finish on the mac
+
+<a name="v_955"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 29, 2009 - 3.5 MILESTONE 7
+<br>Project org.eclipse.jdt.core v_955
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_955">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274397">274397</a>
+tag projects changed since I20090421-0930 build
+
+<a name="v_954"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 28, 2009
+<br>Project org.eclipse.jdt.core v_954
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_954">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269934">269934</a>
+[apt] APT-generated classes that contain annotations causes NPE
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259950">259950</a>
+Update copyright for 2009
+
+<a name="v_953"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 27, 2009
+<br>Project org.eclipse.jdt.core v_953
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_953">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272204">272204</a>
+null should never be part of a type hierarchy
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260031">260031</a>
+Wrong type for class constants in stackmap frames
+ 
+<a name="v_952"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 27, 2009
+<br>Project org.eclipse.jdt.core v_952
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_952">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273862">273862</a>
+[1.7][compiler] Return type should be used to decide method duplicates
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=84720">84720</a>
+[1.5][assist] proposal ranking by return value should consider auto(un)boxing
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272711">272711</a>
+Exceptions in ASTRewrite
+
+<a name="v_951"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 24, 2009
+<br>Project org.eclipse.jdt.core v_951
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_951">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273308">273308</a>
+[perfs] Save very slow because DeltaProcessor#resourceChanged(..) resolves classpath
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154823">154823</a>
+[getter setter] Getters Setters generation doesn't follow naming convention
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263786">263786</a>
+NamingConventions#suggestVariableNames(..) should not modify all caps parts
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263769">263769</a>
+Javadoc glitches in JavaCore#setComplianceOptions(String, Map)
+
+<a name="v_950"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 21, 2009
+<br>Project org.eclipse.jdt.core v_950
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_950">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266771">266771</a>
+NameLookup.findPackageFragment returns very incorrect package fragments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271102">271102</a>
+Java model corrupt after switching target platform
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270784">270784</a>
+[perfs] Big regression on FullSourceWorkspaceModelTests#testCloseProjects() test
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272450">272450</a>
+DBCS3.5: Classpath resolution fails to honor the 'Class-Path' header of JAR manifest file in DBCS
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272706">272706</a>
+[Model] Generics lost on IField when coming from .class files
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246832">246832</a>
+[1.5][assist] Camel case completion not working with statically imported methods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267833">267833</a>
+[javadoc] Custom tags should not be allowed for inline tags
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271680">271680</a>
+[compiler] Stack overflow pasting in Java editor
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251827">251827</a>
+[search] Search for type reference with wildcards finds references in package
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271284">271284</a>
+[search] AIOOBE in StringOperation.getCamelCaseMatchingRegions
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272148">272148</a>
+[assist] Constructors with an array as parameter type are not proposed
+
+<a name="v_949"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 14, 2009
+<br>Project org.eclipse.jdt.core v_949
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_949">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271561">271561</a>
+JavaModelException when accessing an array of nested annotations
+
+<a name="v_948"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - April 7, 2009
+<br>Project org.eclipse.jdt.core v_948
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_948">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271303">271303</a>
+[1.5][compiler] Override and package visibility issue
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270367">270367</a>
+[DOM] NullPointerException in ParenthesizedExpression.resolveTypeBinding()
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253008">253008</a>
+[assist] Boolean expressions should be proposed with higher relevence in if(), while() etc
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270983">270983</a>
+[formatter] Enum with field declarations but no constants confuses formatter
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=159851">159851</a>
+[1.5] [compiler] Eclipse compiler fails to report type parameter bounds errors when generic instance is a type argument
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270446">270446</a>
+"Compute launch button tooltip" error
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270148">270148</a>
+ASTParser cannot parse K_CLASS_BODY_DECLARATIONS with syntax errors
+
+<a name="v_947"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - March 31, 2009
+<br>Project org.eclipse.jdt.core v_947
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_947">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270409">270409</a>
+[perfs] No JDT/Core tests results in last baseline run
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267670">267670</a>
+Private enum constant incorrectly marked as never read locally
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269493">269493</a>
+[assist] Keywords are not proposed in a for statement without block
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270194">270194</a>
+[1.5][compiler] Java error in 3.5M6 that was not present in 3.4
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270257">270257</a>
+[perfs] Small regression on 'JDT/Core plugin initialization' test
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=270113">270113</a>
+[code assist] Missing ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION proposal
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269985">269985</a>
+Full Build triggered when using class folder on classpath and custom builder
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207935">207935</a>
+[1.5][compiler] inconsistency with javac 1.5&1.6 involving parameterized invocation of non-generic method
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269964">269964</a>
+[perfs] Regression on 'Search all type names' test
+
+<a name="v_946"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - March 24, 2009
+<br>Project org.eclipse.jdt.core v_946
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_946">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247037">247037</a>
+[javadoc] compiler should issue warning for {@inheritDoc} at illegal location
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244406">244406</a>
+[buildpath] Internal jars refered with OS path are shown as non-Java resources
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269476">269476</a>
+testInitJDTPlugin() seems to leak several DeltaProcessor and JavaModelManager
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269336">269336</a>
+[prefs] JavaProject preferences listeners are not removed
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=203060">203060</a>
+[codeassist] assert keyword should not be proposed when compliance level is set to 1.3
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251539">251539</a>
+[1.6][compiler] java.lang.IllegalArgumentException: info cannot be null (StackMapFrame.java)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268837">268837</a>
+[1.6][compiler] Incorrectly report ambiguity of methods with generics
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265104">265104</a>
+Reconciler cannot handle annotation with reference to missing type
+
+<a name="v_945"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M7 - March 17, 2009
+<br>Project org.eclipse.jdt.core v_945
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_945">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267789">267789</a>
+eclipse-Automated-Tests-3.4.zip produces compile errors (build path?) with IBM JDK
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268802">268802</a>
+Useless call to getSource() in SourceTypeConverter
+
+<a name="v_944"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - March 10, 2009 - 3.5 MILESTONE 6
+<br>Project org.eclipse.jdt.core v_944
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_944">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267941">267941</a>
+[perfs] Possible regression on 'Code assist in expression' test
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267773">267773</a>
+[open type] Use of ? results in error
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267658">267658</a>
+[formatter] Javadoc comments may be still formatted as block comments
+
+<a name="v_943"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - March 9, 2009
+<br>Project org.eclipse.jdt.core v_943
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_943">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=124646">124646</a>
+Connecting type parameter fails for local types
+
+<a name="v_942"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - March 7, 2009
+<br>Project org.eclipse.jdt.core v_942
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_942">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added the following APIs to allow clients to provide the source of a compilation unit or a package that is neither on the 
+       classpath nor in a working copy.
+       <ul>
+       <li><code>org.eclipse.jdt.core.WorkingCopyOwner.findSource(String, String)</code></li>
+       <li><code>org.eclipse.jdt.core.WorkingCopyOwner.isPackage(String[])</code></li>
+       </ul>
+       See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257528">bug 257528</a> for details.
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267088">267088</a>
+[1.5][compiler] Misleading error message in case of inherited methods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260840">260840</a>
+NamingConventions creates wrong plural for name ending in <vowel>y
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243406">243406</a>
+[code assist] Content assist gives "assertion failed" for import Foo|.Bar
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237241">237241</a>
+Content assist does not scale with javadoc on type with many members
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265962">265962</a>
+[compiler] Internal compiler error on while with return clause
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236520">236520</a>
+[search] AIOOBE in PatternLocator.updateMatch
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265103">265103</a>
+Manifest Class-Path is not read correctly with ECJ
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=99399">99399</a>
+[1.5][assist] Code assist propose final classes in methods type parameter extends clause
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257528">257528</a>
+An API to incrementaly generate compilation units for binding resolution environment
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266582">266582</a>
+[1.5][compiler] AbortCompilation while decoding the type variable of an anonymous type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266837">266837</a>
+[model] SourceField.getConstant does not supply a value if type is fully qualified
+
+<a name="v_941"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - March 3, 2009
+<br>Project org.eclipse.jdt.core v_941
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_941">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252442">252442</a>
+[Search] NPE after move followed by undo
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261722">261722</a>
+[search] NPE after removing a project
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=266421">266421</a>
+[1.5][compiler] code compiles correctly in 3.4.1 but gives compilation errors in 3.5M5
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260011">260011</a>
+[formatter] Formatting of html in javadoc comments doesn't work with style attributes
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=217108">217108</a>
+[formatter] deletes blank lines between comments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198963">198963</a>
+[formatter] 3.3 Code Formatter repeatedly indents block comment
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265571">265571</a>
+Abstract method that is not directly used is flagged as unused
+
+<a name="v_940"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - February 24, 2009
+<br>Project org.eclipse.jdt.core v_940
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_940">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Fixed odd API in <code>ReferenceMatch</code><br>
+(see more details in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248878">248878</a>).
+</li>
+</ul>
+
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265820">265820</a>
+Unused methods inside org.eclipse.jdt.internal.core.dom.rewrite.ImportRewriteAnalyzer
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233356">233356</a>
+[search] NPE in org.eclipse.jdt.internal.compiler.util.SimpleLookupTable.get()
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265630">265630</a>
+[search][perfs] Regression in testSearchPackageDeclarationsWorkspace
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248878">248878</a>
+[search] Odd API in ReferenceMatch
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=206930">206930</a>
+[1.5][compiler] Mismatch between javac and Eclipse compiler
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265142">265142</a>
+Compiler fails to warn on unused constructors of private classes
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264950">264950</a>
+[scanner] IScanner does not return whitespace token
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264843">264843</a>
+[1.5][compiler] Eclipse compiler fails to reject invalid code with primitives autoboxed to generics
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265065">265065</a>
+[search] java.lang.ClassCastException while running "Refactor...Extract Class"
+
+<a name="v_939"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - February 17, 2009
+<br>Project org.eclipse.jdt.core v_939
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_939">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added a new API method on <code>SearchPattern</code> to provide matching
+regions between a pattern and a name when they are compared using a given match rule<br>
+(see more details in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218605">218605</a>).
+<pre>
+/**
+ * Answers all the regions in a given name matching a given pattern using
+ * a specified match rule.
+ * 
+ * Each of these regions is made of its starting index and its length in the given
+ * name. They are all concatenated in a single array of <code>int</code>
+ * which therefore always has an even length.
+ * 
+ * All returned regions are disjointed from each other. That means that the end
+ * of a region is always different than the start of the following one.
+ * For example, if two regions are returned:
+ * <code>{ start1, length1, start2, length2 }</code>
+ * then <code>start1+length1</code> will always be smaller than
+ * <code>start2</code>.
+ * 
+ * The possible comparison rules between the name and the pattern are:
+ *     . {@link #R_EXACT_MATCH exact matching}
+ *     . {@link #R_PREFIX_MATCH prefix matching}
+ *     . {@link #R_PATTERN_MATCH pattern matching}
+ *     . {@link #R_CAMELCASE_MATCH camel case matching}
+ *     . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH camel case matching with same parts count}
+ *
+ * Each of these rules may be combined with the
+ * {@link #R_CASE_SENSITIVE case sensitive flag} if the match comparison
+ * should respect the case.
+ *
+ * Examples:
+ *    .   pattern = "NPE"
+ *        name = NullPointerException / NoPermissionException
+ *        matchRule = {@link #R_CAMELCASE_MATCH}
+ *        result:  { 0, 1, 4, 1, 11, 1 } / { 0, 1, 2, 1, 12, 1 } 
+ *     .  pattern = "NuPoEx"
+ *        name = NullPointerException
+ *        matchRule = {@link #R_CAMELCASE_MATCH}
+ *        result:  { 0, 2, 4, 2, 11, 2 }
+ *     .  pattern = "IPL3"
+ *        name = "IPerspectiveListener3"
+ *        matchRule = {@link #R_CAMELCASE_MATCH}
+ *        result:  { 0, 2, 12, 1, 20, 1 }
+ *     .  pattern = "HashME"
+ *        name = "HashMapEntry"
+ *        matchRule = {@link #R_CAMELCASE_MATCH}
+ *        result:  { 0, 5, 7, 1 }
+ *     .  pattern = "N???Po*Ex?eption"
+ *        name = NullPointerException
+ *        matchRule = {@link #R_PATTERN_MATCH} | {@link #R_CASE_SENSITIVE}
+ *        result:  { 0, 1, 4, 2, 11, 2, 14, 6 }
+ *     .  pattern = "Ha*M*ent*"
+ *        name = "HashMapEntry"
+ *        matchRule = {@link #R_PATTERN_MATCH}
+ *        result:  { 0, 2, 4, 1, 7, 3 }
+ * 
+ * @see #camelCaseMatch(String, String, boolean) for more details on the
+ * 	camel case behavior
+ * @see CharOperation#match(char[], char[], boolean) for more details on the
+ * 	pattern match behavior
+ *
+ * @param pattern the given pattern. If <code>null</code>,
+ *     then an empty region (<code>new int[0]</code>) will be returned
+ *     showing that the name matches the pattern but no common
+ *     character has been found.
+ * @param name the given name
+ * @param matchRule the rule to apply for the comparison.
+ *     The following values are accepted:
+ *         . {@link #R_EXACT_MATCH}
+ *         . {@link #R_PREFIX_MATCH}
+ *         . {@link #R_PATTERN_MATCH}
+ *         . {@link #R_CAMELCASE_MATCH}
+ *         . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH}
+ * 
+ *     Each of these valid values may be also combined with
+ *     the {@link #R_CASE_SENSITIVE} flag.
+ * 
+ *     Some examples:
+ *         . {@link #R_EXACT_MATCH} | {@link #R_CASE_SENSITIVE}:
+ *           if an exact case sensitive match is expected,
+ *         . {@link #R_PREFIX_MATCH}:
+ *           if a case insensitive prefix match is expected,
+ *         . {@link #R_CAMELCASE_MATCH}:
+ *           if a case insensitive camel case match is expected,
+ *         . {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH}
+ *            | {@link #R_CASE_SENSITIVE}:
+ *           if a case sensitive camel case with same parts count match
+ *           is expected,
+ *         . etc.
+ * 
+ * @return an array of <code>int</code> having two slots per returned
+ *     regions (the first one is the region starting index and the second one
+ *     is the region length or <code>null</code> if the given name does not
+ *     match the given pattern).
+ *
+ *     The returned regions may be empty (<code>new int[0]</code>) if the
+ *     pattern is <code>null</code> (whatever the match rule is). The returned
+ *     regions will also be empty if the pattern is only made of <code>'?'</code>
+ *     and/or <code>'*'</code> character(s) (e.g. <code>'*'</code>,
+ *     <code>'?*'</code>, <code>'???'</code>, etc.) when using a pattern
+ *     match rule.
+ * 
+ * @since 3.5
+ */
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264991">264991</a>
+Wrong 'unused' problem reported
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237742">237742</a>
+[javadoc] Javadoc tag name validation is incorrect
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264843">264843</a>
+[1.5][compiler] Eclipse compiler fails to reject invalid code with primitives autoboxed to generics
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264881">264881</a>
+[1.5][compiler]Incorrect unchecked conversion warnings for return types
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=201912">201912</a>
+[compiler] Unused public members of private classes not flagged
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264817">264817</a>
+[search] <char> + * returns 'null' from SearchPattern.getMatchingRegions(String, String, int)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264816">264816</a>
+[search] AIOOBE in StringOperation.getPatternMatchingRegions(..) with pattern "?*"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250454">250454</a>
+[search] Cannot find method references between projects
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218605">218605</a>
+[search] SearchPattern: provide way to get the matching regions
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263558">263558</a>
+Can't compile package-info.java from FindBugs with 3.5 Eclipse
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=264443">264443</a>
+[parser] ASTParser.createASTs and IVariableBinding
+
+<a name="v_938"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - February 10, 2009
+<br>Project org.eclipse.jdt.core v_938
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_938">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261594">261594</a>
+Adjust code to new PRE_REFRESH semantics
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263877">263877</a>
+[1.5][compiler] forward reference error flagged within enum
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263633">263633</a>
+[1.5][compiler] Invalid type mismatch for after generic method inference
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262932">262932</a>
+[assist] Constructor completion makes array allocation difficult
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263653">263653</a>
+patch for jdt.core.model.tests to accommodate icu 4.0.1
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246627">246627</a>
+[ast rewrite] Wrong indentation for statement inserted before SwitchCase
+
+<a name="v_937"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M6 - February 3, 2009
+<br>Project org.eclipse.jdt.core v_937
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_937">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=202393">202393</a>
+[compiler] Incomplete code coverage or useless statement within ThrowStatement#resolve
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=263215">263215</a>
+[1.5][compiler]  I20090129-1200 generates suddenly an generics compile error that 3.5M4  didnt do
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261510">261510</a>
+[compiler] Deadlock in static initializer of JDT classes
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262517">262517</a>
+[ast rewrite] Whitespace settings in formatter ignored when adding annotation
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260848">260848</a>
+[perfs] Regression on JDT/Core plugin initialization performance test
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257716">257716</a>
+[compiler] Erroneous blank field may not have been initialized
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262408">262408</a>
+remove deprecated NamingConventions.VK_CONSTANT_FIELD
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262717">262717</a>
+Wrong line numbers in classfile
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262568">262568</a>
+improve Javadoc for ICompilationUnit.applyTextEdit(TextEdit, IProgressMonitor)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262389">262389</a>
+Internal code must not use ICompilationUnit.applyTextEdit
+
+<a name="v_936"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - January 27, 2009 - 3.5 MILESTONE 5
+<br>Project org.eclipse.jdt.core v_936
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_936">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262304">262304</a>
+[1.5][compiler] Enum constant in annotation value: javac vs Eclipse differ
+
+<a name="v_935"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - January 25, 2009
+<br>Project org.eclipse.jdt.core v_935
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_935">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added APIs to take into account the generic type and the rank of a wildcard type binding:
+       <code>ITypeBinding#getGenericTypeOfWildcardType()</code>, <code>ITypeBinding#getRank()</code>, and
+       <code>BindingKey#createWildcardTypeBindingKey(String genericTypeKey, char boundKind, String boundTypeKey, int rank)</code>.</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262208">262208</a>
+[1.5][compiler]Incorrect @Override and name clash errors 
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=262209">262209</a>
+[1.5][compiler]Incorrect ambiguous method calls 
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234609">234609</a>
+[dom] BindingKey#toSignature() fails with key from createWilcardTypeBindingKey(..)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=261973">261973</a>
+[assist] Constructor completion should be improved (bug 6930)
+
+<a name="v_934"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - January 20, 2009
+<br>Project org.eclipse.jdt.core v_934
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_934">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added new API to propose constructor completion<br>
+When "new ArrayLis" is completed now constructors are proposed instead of type references.
+This new completion kind is <code>CONSTRUCTOR_INVOCATION</code> and this proposal has always a 
+<code>TYPE_REF</code> required proposal to describe the type of the constructor.
+The <code>CONSTRUCTOR_INVOCATION</code> has "()" as completion string and <code>TYPE_REF</code> has
+"java.util.ArrayList" as completion string.<br>
+There is also a similar new API to complete anonymous type constructor: <code>ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION</code><br>
+
+
+<pre>
+
+	/**
+	 * Completion is a reference to a constructor.
+	 * This kind of completion might occur in a context like
+	 * <code>"new Lis"</code> and complete it to
+	 * <code>"new List();"</code> if List is a class that is not abstract.
+	 * <p>
+	 * The following additional context information is available
+	 * for this kind of completion proposal at little extra cost:
+	 * <ul>
+	 * <li>{@link #getDeclarationSignature()} -
+	 * the type signature of the type that declares the constructor that is referenced
+	 * </li>
+	 * <li>{@link #getFlags()} -
+	 * the modifiers flags of the constructor that is referenced
+	 * </li>
+	 * <li>{@link #getName()} -
+	 * the simple name of the constructor that is referenced
+	 * </li>
+	 * <li>{@link #getSignature()} -
+	 * the method signature of the constructor that is referenced
+	 * </li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
+	 * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)}).<br>
+	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
+	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
+	 * </p>
+	 *
+	 * @see #getKind()
+	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)
+	 * 
+	 * @since 3.5
+	 */
+	public static final int CONSTRUCTOR_INVOCATION = 26;
+	
+	/**
+	 * Completion is a reference of a constructor of an anonymous class.
+	 * This kind of completion might occur in a context like
+	 * <code>"new Lis^;"</code> and complete it to
+	 * <code>"new List() {}"</code> if List is an interface or abstract class.
+	 * <p>
+	 * The following additional context information is available
+	 * for this kind of completion proposal at little extra cost:
+	 * <ul>
+	 * <li>{@link #getDeclarationSignature()} -
+	 * the type signature of the type being implemented or subclassed
+	 * </li>
+	 * <li>{@link #getDeclarationKey()} -
+	 * the type unique key of the type being implemented or subclassed
+	 * </li>
+	 * <li>{@link #getSignature()} -
+	 * the method signature of the constructor that is referenced
+	 * </li>
+	 * <li>{@link #getKey()} -
+	 * the method unique key of the constructor that is referenced
+	 * if the declaring type is not an interface
+	 * </li>
+	 * <li>{@link #getFlags()} -
+	 * the modifiers flags of the constructor that is referenced
+	 * </li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * This kind of proposal could require a long computation, so they are computed only if completion operation is called with a {@link IProgressMonitor}
+	 * (e.g. {@link ICodeAssist#codeComplete(int, CompletionRequestor, IProgressMonitor)})<br>
+	 * This kind of proposal is always is only proposals with a {@link #TYPE_REF} required proposal, so this kind of required proposal must be allowed:
+	 * <code>requestor.setAllowsRequiredProposals(CONSTRUCTOR_INVOCATION, TYPE_REF, true)</code>.
+	 * </p>
+	 *
+	 * @see #getKind()
+	 * @see CompletionRequestor#setAllowsRequiredProposals(int, int, boolean)
+	 * 
+	 * @since 3.5
+	 */
+	public static final int ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION = 27;
+</pre>
+These new proposals can require a long computation so they are proposed only if code assist was called with a progress monitor.
+To avoid that the code assist operation takes too much time a <code>IProgressMonitor</code> which automatically cancel the code
+assist operation when a specified amount of time is reached could be used.
+
+<pre>
+new IProgressMonitor() {
+    private final static int TIMEOUT = 500; //ms
+    private long endTime;
+    public void beginTask(String name, int totalWork) {
+        fEndTime= System.currentTimeMillis() + TIMEOUT;
+    }
+    public boolean isCanceled() {
+        return endTime <= System.currentTimeMillis();
+    }
+    ...
+ };
+</pre>
+</li>
+<li>Fix for <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6930">bug 6930</a> required the index version to be incremented. 
+    Indexes will be automatically regenerated upon subsequent search queries (accounting for indexing notification in search progress 
+    dialogs) and the size of the new indexes will be bigger.
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260717">260717</a>
+[assist] Constructors should be proposed even when the declaring type is not imported
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=6930">6930</a>
+[assist] Constructor completion
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=220311">220311</a>
+[1.5][compiler] package-info.java does not recognise duplicate annotations as a problem
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259685">259685</a>
+Bogus build error "Cannot nest" xyz "inside library"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260798">260798</a>
+[formatter] Strange behavior of never join lines
+
+<a name="v_933"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - January 13, 2009
+<br>Project org.eclipse.jdt.core v_933
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_933">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Improved generic method inference to better match JLS 15.12.2.6. The compiler now infers better in presence of unchecked conversion in argument types (raw types). </li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=214948">214948</a>
+Incorrect deprecation warning on annotation instances
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260276">260276</a>
+[formatter] Inconsistent formatting of one-line block comment
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239607">239607</a>
+[formatter] Incorrect removal of asterisk (*) within a block comment when formatting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254998">254998</a>
+[formatter] wrong type comment format during code generation
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258798">258798</a>
+[1.5][compiler] Return type should be erased after unchecked conversion during inference
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258906">258906</a>
+[jsr269] Package annotations not visible to Java 6 APT processors
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259633">259633</a>
+[1.5][compiler] Bound of type parameter of class in method not checked
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=149768">149768</a>
+Annotations should be a compilation dependency
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260257">260257</a>
+Reduce space taken by SourceRefElementInfos
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259607">259607</a>
+Deadlock opening launch configuration dialog
+
+<a name="v_932"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - January 6, 2009
+<br>Project org.eclipse.jdt.core v_932
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_932">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258145">258145</a>
+Fup of bug 252555, JME is thrown when package-info.java exists twice in the same project
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=259129">259129</a>
+[compiler] Fup of bug 258950, wrong line number attribute for cascading method invocations
+
+<a name="v_931"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M5 - December 16, 2008
+<br>Project org.eclipse.jdt.core v_931
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_931">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=171136">171136</a>
+[buildpath] Illegal type of archive for required library is an incorrect message.
+
+<a name="v_930"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - December 10, 2008 - 3.5 MILESTONE 4
+<br>Project org.eclipse.jdt.core v_930
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_930">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255008">255008</a>
+[compiler] Assert statement discrepancy with javac caused by an uninitialized variable
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258039">258039</a>
+[1.5][compiler] Misleading error message for "instanceof List<Object>"
+
+<a name="v_929"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - December 8, 2008
+<br>Project org.eclipse.jdt.core v_929
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_929">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added property to adjust the size of the openable cache: "org.eclipse.jdt.core.javamodelcache.ratio". For example, starting Eclipse as follows will increase the
+     size of the openable cache by 50%: 
+     <pre>eclipse.exe -vmArgs -Dorg.eclipse.jdt.core.javamodelcache.ratio=1.5</pre>
+</li>
+<li>
+As users may want to have different behavior in comments, the new formatter
+preference to preserve line breaks is now controlled by two different options:
+<ul>
+<li>for the already wrapped code lines:<br>
+<code>DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES</code>
+<pre>
+/**
+ * FORMATTER / Option to specify whether the formatter can join wrapped lines or not
+ * 
+ * 		For example, the wrapped lines of method foo return statement in following test case:
+ * 			class X {
+ * 			String foo() {
+ * 			return "select x "
+ * 			       + "from y "
+ * 			       + "where z=a";
+ * 			}
+ * 			}
+ *
+ * 		will be preserved by the formatter when the new preference is used
+ * 		even if the maximum line width would give it enough space to join the lines.
+ * 		Hence produces the following output:
+ * 			class X {
+ * 			    String foo() {
+ * 			        return "select x "
+ * 			                + "from y "
+ * 			                + "where z=a";
+ * 			    }
+ * 			}
+ *
+ *     - option id:         "org.eclipse.jdt.core.formatter.join_wrapped_lines"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ * 
+ * @since 3.5
+ */
+</pre>
+</li>
+<li>for the lines in comments:<br>
+<code>DefaultCodeFormatterConstants.FORMATTER_JOIN_LINES_IN_COMMENTS</code>
+<pre>
+/**
+ * FORMATTER / Option to specify whether the formatter can join text lines in comments or not
+ * 
+ * 		For example, the following comment:
+ * 			/**
+ * 			 * The foo method.
+ * 			 * foo is a substitute for bar.
+ * 			 */
+ * 			public class X {
+ * 			}
+ * 
+ * 		will be unchanged by the formatter when this new preference is used,
+ * 		even if the maximum line width would give it enough space to join the lines.
+ *
+ *     - option id:         "org.eclipse.jdt.core.formatter.join_lines_in_comments"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           TRUE
+ *
+ * @since 3.5
+ */
+</pre>
+</li>
+</ul>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257907">257907</a>
+[Formatter] FORMATTER_PRESERVE_EXISTING_LINE_BREAKS needs clarification
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257906">257906</a>
+[Formatter] should have separate 'preserve existing line breaks' for code and comment formatting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232816">232816</a>
+[buildpath] Misleading problem text for missing jar in user library
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257849">257849</a>
+[1.5][compiler] Internal compiler error using generics w/ abstract classes & interfaces
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257869">257869</a>
+Adjust Java model cache size using a property
+
+<a name="v_928"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - December 7, 2008
+<br>Project org.eclipse.jdt.core v_928
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_928">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>
+Added a new formatter preference to preserve existing breaks in already wrapped and comments lines.<br>
+<p>
+For example, the wrapped lines of method foo return statement in following test case:
+</p>
+<pre>
+class X {
+String foo() {
+return "select x "
+       + "from y "
+       + "where z=a";
+}
+}
+</pre>
+will be preserved by the formatter when the new preference is used, hence produces
+now the following output:
+<pre>
+class X {
+    String foo() {
+        return "select x "
+                + "from y "
+                + "where z=a";
+    }
+}
+</pre>
+Similarly, following comment:
+<pre>
+/**
+ * The foo method.
+ * foo is a substitute for bar.
+ */
+public class X {
+}
+</pre>
+is now unchanged by the formatter when this new preference is used...<br>
+<p>
+This diagnosis is controlled by the option:<br>
+<code>DefaultCodeFormatterConstants.FORMATTER_PRESERVE_EXISTING_LINE_BREAKS</code>:</p>
+<pre>
+/**
+ * FORMATTER / Option to specify whether the formatter should preserve existing line breaks or not
+ *     - option id:         "org.eclipse.jdt.core.formatter.preserve_existing_line_breaks"
+ *     - possible values:   { TRUE, FALSE }
+ *     - default:           FALSE
+ * @since 3.5
+ */
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257434">257434</a>
+[1.5][compiler] Should detect type mismatch after capture
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257384">257384</a>
+AIOOBE during problem reporting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239130">239130</a>
+[formatter] Comment formatter does not keep blank lines after @see references
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198074">198074</a>
+[formatter] the code formatter doesn't respect my new lines
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256799">256799</a>
+[formatter] Formatter wrongly adds space to //$FALL-THROUGH$ is
+
+<a name="v_927"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - December 2, 2008
+<br>Project org.eclipse.jdt.core v_927
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_927">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>
+Improved dead code detection by having it (optionally) tolerate trivial IF statement,
+such as <code>if (DEBUG) ...</code>. This extra option is defined by
+<code>JavaCore.COMPILER_PB_DEAD_CODE_IN_TRIVIAL_IF_STATEMENT</code>.
+<pre>
+* Compiler option ID: Reporting Dead Code Inside Trivial If Statement.
+* When enabled, the compiler will signal presence of dead code inside trivial IF statement, e.g. if (DEBUG)...
+* The severity of the problem is controlled with option {@link #COMPILER_PB_DEAD_CODE}.
+* 
+* Option id:"org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement"
+* Possible values:{ "enabled", "disabled" }
+* Default:"warning"
+</pre>
+</li>
+<li>Dead code detection warning also got enabled by default.
+<pre>
+* Compiler option ID: Reporting Dead Code.
+* When enabled, the compiler will issue an error or a warning if some non fatal dead code is detected. For instance, if (false) foo();
+* is not reported as truly unreachable code by the Java Language Specification. If this diagnostic is enabled, then the invocation of foo() is
+* going to be signaled as being dead code.
+* Option id:"org.eclipse.jdt.core.compiler.problem.deadCode"
+* Possible values:{ "error", "warning", "ignore" }
+* Default:"warning"
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256329">256329</a>
+Impossible NPE in JavaModelManager.getOptions
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256882">256882</a>
+[compiler] Enable DeadCode detection by default
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255970">255970</a>
+test tear down failed causing cascade of failures
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207093">207093</a>
+Perf: adding a new top-level package is slow if many source files exist
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252948">252948</a>
+Unncessary compilation when adding packages with an existing path segment at the beginning
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256735">256735</a>
+Marker property value is too long for internal compiler error (java.lang.StackOverflowError)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227986">227986</a>
+Avoid duplicated strings in Java model
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256463">256463</a>
+[compiler] Support common debug pattern in unreachable code detection
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256679">256679</a>
+[perfs] SearchAllTypeNames performance tests are slower on eplnx2
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=228845">228845</a>
+[hierarchy] Type hierarchy should include subtypes in primary working copies
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252571">252571</a>
+[buildpath] External folder appears empty after workspace move
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256404">256404</a>
+Wrong handle identifier for external library folder
+
+<a name="v_926"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - November 25, 2008
+<br>Project org.eclipse.jdt.core v_926
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_926">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>
+Added a new compiler warning to signal presence of dead code,  e.g. <code>if (false) deadCode(); </code>.
+This diagnosis is controlled by option: 
+<code>JavaCore.COMPILER_PB_DEAD_CODE</code> and produces a problem marker which ID is <code>IProblem.DeadCode</code> problem ID.
+<pre>
+* Compiler option ID: Reporting Dead Code.
+* When enabled, the compiler will issue an error or a warning if some non fatal dead code is detected. For instance, if (false) foo();
+* is not reported as truly unreachable code by the Java Language Specification. If this diagnostic is enabled, then the invocation of foo() is
+* going to be signaled as being dead code.
+* Option id:"org.eclipse.jdt.core.compiler.problem.deadCode"
+* Possible values:{ "error", "warning", "ignore" }
+* Default:"ignore"
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251504">251504</a>
+[index] Wrong indexes may be used while performing a search request
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=48399">48399</a>
+[compiler] Enhance unreachable code detection
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254825">254825</a>
+[javadoc] compile error when referencing outer param from inner class javadoc
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252555">252555</a>
+[javadoc] NPE on duplicate package-info
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251690">251690</a>
+[compiler] NPE if type collides with a package
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249134">249134</a>
+[compiler] error message (implement abstract method) not as intended
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154162">154162</a>
+[1.5][compiler] Uninformative error message for qualified enum constants in switch statement
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255974">255974</a>
+Abusive usage of InvalidInputException in the compiler
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251693">251693</a>
+NamingConventions.suggestXXXNames should call suggestVariableNames()
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255345">255345</a>
+Problems in new NamingConventions APIs
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255452">255452</a>
+[1.5][compiler] Eclipse allows forward reference in enum constructor
+
+<a name="v_925"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - November 18, 2008
+<br>Project org.eclipse.jdt.core v_925
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_925">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255501">255501</a>
+EncodingTests failing when run by itself
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255035">255035</a>
+[compiler] Internal compile error gets reported (NPE)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250297">250297</a>
+[compiler] NPE in org.eclipse.jdt.internal.compiler.problem.ProblemReporter.missingTypeInMethod(ProblemReporter.java:4925)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232558">232558</a>
+[compiler] += is not allowed between Object and String
+
+<a name="v_924"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - November 10, 2008
+<br>Project org.eclipse.jdt.core v_924
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_924">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252868">252868</a>
+[batch][compiler] ConcurrentModificationException in org.eclipse.jdt.internal.compiler.batch.ClasspathJar.fetchLinkedJars
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236242">236242</a>
+[compiler][1.7] compiler difference to javac 7 involving parameterized uses of raw methods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=211256">211256</a>
+[ast rewrite] whitespace missing between return and expression
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253891">253891</a>
+Incorrect tag closure in JavaModel javadoc
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252120">252120</a>
+[1.5][compiler] raw type diagnostic not coherent with javac one
+
+<a name="v_923"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M4 - November 4, 2008
+<br>Project org.eclipse.jdt.core v_923
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_923">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250211">250211</a>
+[search] Organize Imports Hangs
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241821">241821</a>
+[compiler] Multiple interfaces and incompatible return types
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251279">251279</a>
+[1.5][compiler] Covariant generics interfaces causes compile error
+
+<a name="v_922"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 29, 2008 - 3.5 MILESTONE 3
+<br>Project org.eclipse.jdt.core v_922
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_922">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252481">252481</a>
+[code assist] NPE in findAllTypes
+
+<a name="v_921"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 28, 2008
+<br>Project org.eclipse.jdt.core v_921
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_921">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252264">252264</a>
+Invalid classpath header messages should be logged in verbose mode only
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252392">252392</a>
+Missing jars referenced in the Class-Path: clause of a MANIFEST.MF file should not be reported as errors
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247845">247845</a>
+[misc] Errors in log from fetching Javadoc when working disconnected
+
+<a name="v_920"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 25, 2008
+<br>Project org.eclipse.jdt.core v_920
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_920">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>NamingConventions has now a more flexible API to suggest variable name: <code>NamingConventions.suggestVariableNames()</code>.<br>
+The same method can be used to suggest local, instance field, static field and constant field name.
+This method use a new specific heuristic to generate constant name with upper case and underscore (e.g. <code>CONSTANT_FIELD_NAME</code>).
+<pre>
+public static String[] suggestVariableNames(
+			int variableKind,
+			int baseNameKind,
+			String baseName,
+			IJavaProject javaProject,
+			int dim,
+			String[] excluded,
+			boolean evaluateDefault)
+</pre>
+</li>
+<li>NamingConventions has now an API to compute the name used to generate a variable name: <code>NamingConventions.getBaseName()</code>.<br>
+<pre>
+public static String getBaseName(
+			int variableKind,
+			String variableName,
+			IJavaProject javaProject)
+</pre>
+</li>
+<li>New options are added to specify the prefixes and suffixes of a constant field: <code>JavaCore.CODEASSIST_STATIC_FIELD_PREFIXES</code> and <code>JavaCore.CODEASSIST_STATIC_FIELD_SUFFIXES</code>.
+</li></ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250975">250975</a>
+[1.5][compiler] Stack overflow on static import.
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249785">249785</a>
+[javadoc][assist] Javadoc content assist after "@see #" does not work with deprecated member before
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249692">249692</a>
+The ImportRewriteAnalyzer does not honor a formatter setting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251814">251814</a>
+[1.5][compiler] Dup Enum#valueOf(...) should keep the synthetic one
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248309">248309</a>
+[model] IAnnotatable#getAnnotations() does not work for standard annotations on binary members
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251518">251518</a>
+Tons of invalid API tooling errors when checking out jdt.core
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251356">251356</a>
+Fix for bug 146768 breaks JDT Refactoring and its test
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249027">249027</a>
+NPE in Engine if type collides with a package
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=85946">85946</a>
+NamingConventions.suggestFieldNames(..) does not consider 'final' modifier for constants
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38111">38111</a>
+[DCR] Make NamingConventions more flexible
+
+<a name="v_919"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 21, 2008
+<br>Project org.eclipse.jdt.core v_919
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_919">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>The compiler is now better resilient with duplicate field/method definitions and will avoid secondary errors 
+detected when subsenquently using the offending field/method.
+</li></ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251523">251523</a>
+[1.5][compiler] Should still flag Enum#valueOf override
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246276">246276</a>
+NPE during code completion
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249844">249844</a>
+IBinding#getJavaElement() always returns null for IAnnotationBindings declared in annotation or enum types
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=146768">146768</a>
+[compiler] Should be more resilient with duplicate fields/methods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251091">251091</a>
+Covariant return types not honored for combined extension and implementation
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=251079">251079</a>
+Got error dialog after switching default JRE
+
+<a name="v_918"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 16, 2008
+<br>Project org.eclipse.jdt.core v_918
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_918">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>New API for the ASTVisitor class: <code>org.eclipse.jdt.core.dom.ASTVisitor.preVisit2(ASTNode)</code>.<br>
+New API type: <code>org.eclipse.jdt.core.dom.NodeFinder</code>.<br>
+All details are available in bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=53024">53024</a>.<br>
+These new APIs are still under discussion and are released for JDT/UI adoption.</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250946">250946</a>
+Bogus jar file is added to the project build path
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250022">250022</a>
+Java Model Exception: Java Model Status when getting code assist in debug detail formatter dialog
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=53024">53024</a>
+[DOM] Move NodeFinder to a non-internal package
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250753">250753</a>
+[formatter] Insert space between empty braces in array initializers ignored without "Keep empty array initializer on one line"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248319">248319</a>
+[compiler][1.5] Valid Java source produces class file that doesn't verify (VerifyError, javac compiles correctly)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249567">249567</a>
+Incorrect behavior of Util.getUnresolvedJavaElement(...) method
+
+<a name="v_917"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 14, 2008
+<br>Project org.eclipse.jdt.core v_917
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_917">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Duplicate classpath entries are no longer reported if they are duplicate because of the classpath resolution
+      (e.g. if two classpath containers add the same entry to the resolved classpath).
+       Duplicate classpath entries at the raw classpath level are still reported.
+       See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=175226">bug 175226</a> for details.
+</li>
+<li>
+Added a new compiler warning to report a missing hashCode() method when overriding the equals() method from Object. 
+This diagnosis is controlled by option: 
+<code>JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD</code> and produces a problem marker which ID is
+<code>IProblem.MissingHashCodeMethod</code> problem ID.
+<pre>
+  Compiler option ID: Reporting Missing HashCode Method.
+  When enabled, the compiler will issue an error or a warning if a type
+  overrides Object.equals(Object) but does not override hashCode().
+  Option id: "org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod"
+  Possible values: { "error", "warning", "ignore" }
+  Default: "ignore"
+</pre>
+</li>
+<li>The "Class-Path:" clause of a jar manifest is now honored in the Java model. Jars referenced by "Class-Path:" are now automatically
+      added to the build path. See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198572">bug 198572</a> for details.</li>
+<li>Code Select search types outside the current project scope if no types are found in this scope</li>
+<li>Code Assist operation can be called with a progress monitor:
+<pre>
+public interface ICodeAssist {
+	/**
+	 * Performs code completion at the given offset position in this compilation unit,
+	 * reporting results to the given completion requestor. The <code>offset</code>
+	 * is the 0-based index of the character, after which code assist is desired.
+	 * An <code>offset</code> of -1 indicates to code assist at the beginning of this
+	 * compilation unit.
+	 * It considers types in the working copies with the given owner first. In other words,
+	 * the owner's working copies will take precedence over their original compilation units
+	 * in the workspace.
+	 * <p>
+	 * Note that if a working copy is empty, it will be as if the original compilation
+	 * unit had been deleted.
+	 * </p>
+	 *
+	 * @param offset the given offset position
+	 * @param requestor the given completion requestor
+	 * @param owner the owner of working copies that take precedence over their original compilation units
+	 * @exception JavaModelException if code assist could not be performed. Reasons include:<ul>
+	 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
+	 *  <li> The position specified is < -1 or is greater than this compilation unit's
+	 *      source length (INDEX_OUT_OF_BOUNDS)
+	 * </ul>
+	 *
+	 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
+	 * @since 3.0
+	 * @deprecated Use {@link #codeComplete(int, CompletionRequestor, WorkingCopyOwner)} instead.
+	 */
+	void codeComplete(int offset, ICompletionRequestor requestor, WorkingCopyOwner owner)
+		throws JavaModelException;
+
+	/**
+	 * Performs code completion at the given offset position in this compilation unit,
+	 * reporting results to the given completion requestor. The <code>offset</code>
+	 * is the 0-based index of the character, after which code assist is desired.
+	 * An <code>offset</code> of -1 indicates to code assist at the beginning of this
+	 * compilation unit.
+	 * <p>
+	 *
+	 * @param offset the given offset position
+	 * @param requestor the given completion requestor
+	 * @exception JavaModelException if code assist could not be performed. Reasons include:<ul>
+	 *  <li>This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
+	 *  <li> The position specified is < -1 or is greater than this compilation unit's
+	 *      source length (INDEX_OUT_OF_BOUNDS)
+	 * </ul>
+	 *
+	 * @exception IllegalArgumentException if <code>requestor</code> is <code>null</code>
+	 * @since 3.0
+ 	 */
+	void codeComplete(int offset, CompletionRequestor requestor)
+		throws JavaModelException;
+}
+
+public interface IType {
+	/**
+	 * Do code completion inside a code snippet in the context of the current type.
+	 *
+	 * If the type can access to his source code and the insertion position is valid,
+	 * then completion is performed against source. Otherwise the completion is performed
+	 * against type structure and given locals variables.
+	 *
+	 * @param snippet the code snippet
+	 * @param insertion the position with in source where the snippet
+	 * is inserted. This position must not be in comments.
+	 * A possible value is -1, if the position is not known.
+	 * @param position the position within snippet where the user
+	 * is performing code assist.
+	 * @param localVariableTypeNames an array (possibly empty) of fully qualified
+	 * type names of local variables visible at the current scope
+	 * @param localVariableNames an array (possibly empty) of local variable names
+	 * that are visible at the current scope
+	 * @param localVariableModifiers an array (possible empty) of modifiers for
+	 * local variables
+	 * @param isStatic whether the current scope is in a static context
+	 * @param requestor the completion requestor
+	 * @param monitor the progress monitor used to report progress
+	 * @exception JavaModelException if this element does not exist or if an
+	 *		exception occurs while accessing its corresponding resource.
+	 * @since 3.5
+	 */
+	void codeComplete(
+		char[] snippet,
+		int insertion,
+		int position,
+		char[][] localVariableTypeNames,
+		char[][] localVariableNames,
+		int[] localVariableModifiers,
+		boolean isStatic,
+		CompletionRequestor requestor,
+		IProgressMonitor monitor)
+		throws JavaModelException;
+
+	/**
+	 * Do code completion inside a code snippet in the context of the current type.
+	 * It considers types in the working copies with the given owner first. In other words,
+	 * the owner's working copies will take precedence over their original compilation units
+	 * in the workspace.
+	 * <p>
+	 * Note that if a working copy is empty, it will be as if the original compilation
+	 * unit had been deleted.
+	 * </p><p>
+	 * If the type can access to his source code and the insertion position is valid,
+	 * then completion is performed against source. Otherwise the completion is performed
+	 * against type structure and given locals variables.
+	 * </p>
+	 *
+	 * @param snippet the code snippet
+	 * @param insertion the position with in source where the snippet
+	 * is inserted. This position must not be in comments.
+	 * A possible value is -1, if the position is not known.
+	 * @param position the position with in snippet where the user
+	 * is performing code assist.
+	 * @param localVariableTypeNames an array (possibly empty) of fully qualified
+	 * type names of local variables visible at the current scope
+	 * @param localVariableNames an array (possibly empty) of local variable names
+	 * that are visible at the current scope
+	 * @param localVariableModifiers an array (possible empty) of modifiers for
+	 * local variables
+	 * @param isStatic whether the current scope is in a static context
+	 * @param requestor the completion requestor
+	 * @param owner the owner of working copies that take precedence over their original compilation units
+	 * @param monitor the progress monitor used to report progress
+	 * @exception JavaModelException if this element does not exist or if an
+	 *		exception occurs while accessing its corresponding resource.
+	 * @since 3.5
+	 */
+	void codeComplete(
+		char[] snippet,
+		int insertion,
+		int position,
+		char[][] localVariableTypeNames,
+		char[][] localVariableNames,
+		int[] localVariableModifiers,
+		boolean isStatic,
+		CompletionRequestor requestor,
+		WorkingCopyOwner owner,
+		IProgressMonitor monitor)
+		throws JavaModelException;
+}
+
+public interface IEvaluationContext {
+	/**
+	 * Performs a code completion at the given position in the given code snippet,
+	 * reporting results to the given completion requestor.
+	 * <p>
+	 * Note that code completion does not involve evaluation.
+	 * <p>
+	 *
+	 * @param codeSnippet the code snippet to complete in
+	 * @param position the character position in the code snippet to complete at,
+	 *   or -1 indicating the beginning of the snippet
+	 * @param requestor the code completion requestor capable of accepting all
+	 *    possible types of completions
+	 * @param monitor the progress monitor used to report progress
+	 * @exception JavaModelException if code completion could not be performed. Reasons include:
+	 *  <ul>
+	 *	  <li>The position specified is less than -1 or is greater than the snippet's
+	 *	    length (INDEX_OUT_OF_BOUNDS)</li>
+	 *  </ul>
+	 * @since 3.5
+	 */
+	public void codeComplete(
+		String codeSnippet,
+		int position,
+		CompletionRequestor requestor,
+		IProgressMonitor monitor)
+		throws JavaModelException;
+
+	/**
+	 * Performs a code completion at the given position in the given code snippet,
+	 * reporting results to the given completion requestor.
+	 * It considers types in the working copies with the given owner first. In other words,
+	 * the owner's working copies will take precedence over their original compilation units
+	 * in the workspace.
+	 * <p>
+	 * Note that if a working copy is empty, it will be as if the original compilation
+	 * unit had been deleted.
+	 * </p>
+	 * <p>
+	 * Note that code completion does not involve evaluation.
+	 * <p>
+	 *
+	 * @param codeSnippet the code snippet to complete in
+	 * @param position the character position in the code snippet to complete at,
+	 *   or -1 indicating the beginning of the snippet
+	 * @param requestor the code completion requestor capable of accepting all
+	 *    possible types of completions
+	 * @param owner the owner of working copies that take precedence over their original compilation units
+	 * @param monitor the progress monitor used to report progress
+	 * @exception JavaModelException if code completion could not be performed. Reasons include:
+	 *  <ul>
+	 *	  <li>The position specified is less than -1 or is greater than the snippet's
+	 *	    length (INDEX_OUT_OF_BOUNDS)</li>
+	 *  </ul>
+	 * @since 3.5
+	 */
+	public void codeComplete(
+		String codeSnippet,
+		int position,
+		CompletionRequestor requestor,
+		WorkingCopyOwner owner,
+		IProgressMonitor monitor)
+		throws JavaModelException;
+}
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250685">250685</a>
+[assist] Code assist can bot be canceled when search indexes are not ready
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250083">250083</a>
+[model] Search indexes are not correctly updated
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=175226">175226</a>
+[buildpath] Build path contains duplicate entry
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38751">38751</a>
+Optionally show compiler warning when equals() is overriden but hashCode() is not
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249930">249930</a>
+Deadlock with JavaModelManager$PerProjectInfo
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=250398">250398</a>
+[assist] Faults in javadoc of IType#codeComplete
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247941">247941</a>
+[assist] Add progress monitor to code completion
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243820">243820</a>
+[1.5][compiler] Method has same erasure as an interface method but is not considered to implement it
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232880">232880</a>
+[select] Navigate to classes in workspace even if not on classpath
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=198572">198572</a>
+eclipse does not respect class-path manifest of external jars
+
+<a name="v_916"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - October 7, 2008
+<br>Project org.eclipse.jdt.core v_916
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_916">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>
+The new compiler warning (added during 3.5M1) to signal absence of <code>synchronized</code> modifier 
+when overriding a synchronized method got disabled by default.
+<pre>
+  Compiler option ID: Reporting Missing Synchronized Modifier On Inherited Method.
+  When enabled, the compiler will issue an error or a warning if a method
+  overrides a synchronized method without having a synchronized modifier.
+  Option id: "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"
+  Possible values: { "error", "warning", "ignore" }
+  Default: "ignore"
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249140">249140</a>
+[1.5][compiler] asymmetric errors with covariant inherited methods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244762">244762</a>
+[1.5][compiler] Internal compiler error java.lang.NullPointerException after importing file
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227527">227527</a>
+[1.5][compiler] Useless error message for local enum
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=227530">227530</a>
+[1.5][compiler] Incomplete error message for annotation inside a member type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247981">247981</a>
+save on a single file (any type - java source, text file  
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249584">249584</a>
+CompilerParticipant constants should be marked as such
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=161977">161977</a>
+[compiler] Identical branches in org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding#syntheticMethods
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249535">249535</a>
+[compiler] Consider disabling the syncOverride warning/error by default
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247666">247666</a>
+[1.5][compiler] AIOOBE inside missing type reporting
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249321">249321</a>
+IPackagerFragmentRoot#getRawClasspathEntry() returns resolved ".." path
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249107">249107</a>
+[compiler] IllegalAccessError in presence of synthetic field access
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247953">247953</a>
+[1.5][compiler] IllegalAccessError: tried to access class p.IA from class X
+
+<a name="v_915"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - September 30, 2008
+<br>Project org.eclipse.jdt.core v_915
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_915">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Added support for ".." in classpath for library, variable and container entries.
+		See <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=57732">bug 57732</a> for details.</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248680">248680</a>
+Error when create a new element (class, interface,...)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=57732">57732</a>
+[buildpath] relative build classpath leading outside of eclipse workspace
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247612">247612</a>
+[compiler] Compiler could avoid allocating field bindings for receiver type change
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247757">247757</a>
+[model] Move a class to root package, lose block comment at the top
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241400">241400</a>
+[LinkedResources] Random errors when changing project settings
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248313">248313</a>
+[DOM] Javadoc bug in StringLiteral#setLiteralValue(String)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248308">248308</a>
+Typo in Javadoc of IBinding#getAnnotations()
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248243">248243</a>
+Add apt.pluggable.core as x-friend for jdt.core
+
+<a name="v_914"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M3 - September 23, 2008
+<br>Project org.eclipse.jdt.core v_914
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_914">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247835">247835</a>
+SearchPattern extends non-API type InternalSearchPattern
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245858">245858</a>
+CompletionProposal extends non-API type InternalCompletionProposal
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247688">247688</a>
+SearchDocument extends non-API type InternalSearchDocument
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245860">245860</a>
+BuildContext extends non-API type CompilationParticipantResult
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247292">247292</a>
+[compiler] Compiler should avoid allocating method bindings for receiver type change
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245835">245835</a>
+CompletionContext extends non-API type InternalCompletionContext
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247618">247618</a>
+*ReferenceMatch extends non-API type InternalReferenceMatch
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247307">247307</a>
+[1.5][compiler] Array clone return type should be governed by source level instead of compliance
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=128563">128563</a>
+[compiler] Inner class compiles but IllegalAccessError if splitted with two output folders
+
+<a name="v_913"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - September 13, 2008 - 3.5 MILESTONE 2
+<br>Project org.eclipse.jdt.core v_913
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_913">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246955">246955</a>
+Add API compatibility filter for ITypeRoot
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=211054">211054</a>
+[javadoc] @see package reference should raise a warning except for the package declaration
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243692">243692</a>
+[buildpath] Cannot set Attached Source from Class File Editor
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207765">207765</a>
+[javadoc] Javadoc warning on @see reference could be improved
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=247118">247118</a>
+Endless loop in Signature.encodeQualifiedName
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244164">244164</a>
+[1.5][compiler] Missing implementation error when referencing a generic field with error
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233187">233187</a>
+[javadoc] partially qualified inner types  should be warned
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=170637">170637</a>
+[javadoc] incorrect warning about missing parameter javadoc when using many links
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=142990">142990</a>
+[model] Rename operation should not use workspace root rule
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246712">246712</a>
+[javadoc] Unexpected warning about missing parameter doc in case of @inheritDoc
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246682">246682</a>
+Inconsistent parser/scanner encoding for commentStart position
+
+<a name="v_912"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - September 9, 2008
+<br>Project org.eclipse.jdt.core v_912
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_912">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Introduced a marker comment (<code>$FALL-THROUGH$</code>) for silencing compiler diagnosis for switch case 
+falling through next case. This allows to document intended fall through situations in the code.
+Note: The marker comment can also be a block comment, i.e. <code>/* $FALL-THROUGH$ */</code>.
+<br>e.g. 
+<pre>
+    switch(val) {
+        case 0 :
+            doit(0);
+            // $FALL-THROUGH$ - also fall into next case
+       case 1:
+            doit(1);
+            break;
+    }
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245257">245257</a>
+[compiler] Allow to suppress fall-through warning
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240034">240034</a>
+[buildpath] Eclipse ignores .classpath file if it is encoded in UTF8 with BOM
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245963">245963</a>
+deprecate unused JavaCore.COMPILER_PB_BOOLEAN_METHOD_THROWING_EXCEPTION
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237772">237772</a>
+[implementation] Deadlock in JDT causing UI freeze
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=114116">114116</a>
+[assist] name suggestion for collections
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=246066">246066</a>
+[batch] Redundant superinterface warning cannot be activated
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245973">245973</a>
+[compiler] Problem irritant cannot exceed 64bit limit
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244849">244849</a>
+[implementation] Memory leak in DeltaProcessingState#externalTimeStamps ?
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=207657">207657</a>
+[search] Exception when refactoring member type to top-level.
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243023">243023</a>
+[content assist] RuntimeException thrown by JavaTypeCompletionProposalComputer
+
+<a name="v_911"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - September 2, 2008
+<br>Project org.eclipse.jdt.core v_911
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_911">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>
+Added a new compiler warning to signal absence of <code>synchronized</code> modifier when overriding a synchronized method. 
+This diagnosis is controlled by option: 
+<code>JavaCore.COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD</code> and produces a problem marker which ID is
+<code>IProblem.MissingSynchronizedModifierInInheritedMethod</code> problem ID;
+it may be suppressed using <code>@SuppressWarnings("super")</code>.
+<pre>
+  Compiler option ID: Reporting Missing Synchronized Modifier On Inherited Method.
+  When enabled, the compiler will issue an error or a warning if a method
+  overrides a synchronized method without having a synchronized modifier.
+  Option id: "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"
+  Possible values: { "error", "warning", "ignore" }
+  Default: "warning"
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=222900">222900</a>
+[Javadoc] Missing description is warned if valid description is on a new line
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=186858">186858</a>
+Intermittent failure of org.eclipse.jdt.core.tests.model.ExclusionPatternsTests#testCreateExcludedPackage2
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237453">237453</a>
+[formatter] Save actions fails to remove excess new lines when set to "format edited lines"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245830">245830</a>
+ClasspathEntry illegally instantiates AssertionFailedException
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242029">242029</a>
+Multiple source attachment paths don't work when source attachment path points to a folder
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234583">234583</a>
+[formatter] Code formatter should adapt edits instead of regions
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245576">245576</a>
+No error message for updating read-only .classpath file
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245563">245563</a>
+npe in reconciler
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245518">245518</a>
+ICompilationUnit.createType failing with unexpected exception
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245435">245435</a>
+[1.5][compiler] "Value for annotation attribute must be a constant expression" error on valid constant expression
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245348">245348</a>
+[DOM] Annotations are recognized by ASTParser even in COMPILER_SOURCE is set < 1.5
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241751">241751</a>
+Using a ClasspathContainerInitializer requires the use of workspace lock
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242448">242448</a>
+[1.5][compiler] Sun's javac compiles the following but jdt does not
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239066">239066</a>
+[compiler] Overriding a Synchronized Method with a Non-synchronized Method
+
+<a name="v_910"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - August 26, 2008
+<br>Project org.eclipse.jdt.core v_910
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_910">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239096">239096</a>
+Implementation oddness in TypeHierarchy#getAllSuper*(IType)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244549">244549</a>
+JavaCore.create(String handleIdentifier) fails for local variable with parameterized type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241687">241687</a>
+[formatter] problem formatting block comments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240686">240686</a>
+[formatter] Formatter do unexpected things
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242933">242933</a>
+[1.5] NullPointerException for @Range(min=1, max=9999999999999999)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241345">241345</a>
+[formatter] Didn't Format HTML tags is unavailable
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242646">242646</a>
+deadlock on org.eclipse.jdt.internal.core.ExternalFoldersManager
+
+<a name="v_909"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - August 19, 2008
+<br>Project org.eclipse.jdt.core v_909
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_909">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244477">244477</a>
+[formatter] Formatter fails on special Java array construct
+
+<a name="v_908"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M2 - August 11, 2008
+<br>Project org.eclipse.jdt.core v_908
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_908">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239833">239833</a>
+[compiler] Odd compiler error message "Illegal modifier for the method ..."
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243715">243715</a>
+[DOM] Parser.createASTs() throws exception on 'illogical' JavaDoc
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=243653">243653</a>
+ASTRewrite is incorrectly documented
+
+<a name="v_907"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - August 6, 2008 - 3.5 MILESTONE 1
+<br>Project org.eclipse.jdt.core v_907
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_907">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242961">242961</a> [DOM] ITypeBinding.getDeclaredFields returns empty results if any field has undefined type
+
+<a name="v_906"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 31, 2008
+<br>Project org.eclipse.jdt.core v_906
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_906">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=242292">242292</a>
+call to createAST(..) throws IllegalStateException when parser source is not char[]
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=218500">218500</a>
+[dom] bug in ITypeBinding.getQualifiedName for member of local type
+
+<a name="v_905"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 28, 2008
+<br>Project org.eclipse.jdt.core v_905
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_905">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236096">236096</a>
+Incorrectly allow raw return type in overridden method
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238014">238014</a>
+[1.5][compiler] Missing "name clash" error?
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238817">238817</a>
+[1.5][compiler] Unexpected nameclash reported
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237418">237418</a>
+deadlock between auto-build/refresh right after startup
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=241841">241841</a>
+[compiler] Compilation error 'incompatible types' should use full qualified class names
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239439">239439</a>
+[1.5][compiler] Behavior change for binding for parameterized type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=106821">106821</a>
+[assist] Code assist: Deprecated elements not marked
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=209639">209639</a>
+codeSelect does not resolve correct key for implicit method type arguments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239117">239117</a>
+AST overlapping source ranges in recovered AST
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=230830">230830</a>
+[select] Search doesn't find annotated local variable declaration with error
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=229092">229092</a>
+[batch compiler] error reporting is non-deterministic
+
+<a name="v_904"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 21, 2008
+<br>Project org.eclipse.jdt.core v_904
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_904">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=169682">169682</a>
+In class that compiles and runs when ctrl+space is pressed I get "No completions available"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240815">240815</a>
+[DOM] CCE in AST#resolveWellKnownType(..)  for java.lang.Boolean without rt.jar
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235727">235727</a>
+misspelling in syntax error message
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236193">236193</a>
+DiagnoseParser has unreachable code
+
+<a name="v_903"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 15, 2008
+<br>Project org.eclipse.jdt.core v_903
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_903">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237469">237469</a>
+[assist] AbortCompilation in log during normal editing
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240214">240214</a>
+[compiler] final bit should be cleared from class file access flag for anonymous class
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240349">240349</a>
+Improve disassembler output
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=240206">240206</a>
+ITypeRoot should have @noimplement tag
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237937">237937</a>
+[javadoc] Wrong "Javadoc: Malformed link reference" if href label contains //
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237931">237931</a>
+[1.6][compiler] wrong signature of String[][] in class file
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=101610">101610</a>
+Code assist not offered without transitive dependency
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239229">239229</a>
+[compiler] Regression bug against Eclipse 3.3: cannot resolve correct import
+
+<a name="v_902"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 8, 2008
+<br>Project org.eclipse.jdt.core v_902
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_902">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236336">236336</a>
+[1.6][compiler] Stack map generation error with 10,000-line method in Java
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239941">239941</a>
+[formatter] Unclosed html tags make the formatter to produce incorrect outputs
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239719">239719</a>
+[formatter] Code formatter destroys pre formatted javadoc comments
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238923">238923</a>
+[1.6][compiler] Internal compiler error caused by a for loop in an initializer block
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239758">239758</a>
+[1.5][compiler] Generic interface inheritance and overriding error
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239305">239305</a>
+[compiler] VerifyError caused by casting long to long to int
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239198">239198</a>
+[compiler] NegativeArraySizeException thrown for triple quotes
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238920">238920</a>
+[formatter] Code Formatter removes javadoc status if @category present
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238853">238853</a>
+[formatter] Code Formatter does not properly format valid xhtml (<br /> & <p />) in javadoc.
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=160217">160217</a>
+[ast rewrite] ASTRewrite#getListRewrite does not fullfill spec
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232565">232565</a>
+[1.5][compiler] wrong autoboxing code generation leads to VerifyError at runtime
+
+<a name="v_901"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - July 1, 2008
+<br>Project org.eclipse.jdt.core v_901
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_901">cvs</a>).
+<h2>What's new in this drop</h2>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232478">232478</a>
+[buildpath] Classpath failed to bind to installed JRE
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238210">238210</a>
+[formatter] CodeFormatter wraps line comments without whitespaces
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238484">238484</a>
+[1.5][compiler] Eclipse generates bad code (major regression)
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235370">235370</a>
+Add performance test for bug 234718
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=135906">135906</a>
+CompilationUnitStructureRequestor.resolveDuplicates has bad performance
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=169678">169678</a>
+[hierarchy] Type Hierarchy on static nested class includes unrelated types
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=95480">95480</a>
+[model] Missing INVALID_SIBLING exception when creating a type in an enum type that contains constants
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235369">235369</a>
+DeltaProcessor.resetProjectCaches() should clear the list of projects to reset
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=190840">190840</a>
+SourceMapper#computeAllRootPaths(IType) factorisation suggestion
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=148664">148664</a>
+[spec] IJavaModel#getJavaProject(String) throws IAE for invalid name
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=231130">231130</a>
+[spec] IClassFile.getPath() not specified for external class folders
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=209425">209425</a>
+[spec] Ambiguous JavaDoc in ASTParser#setUnitName regarding source folders
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235272">235272</a>
+javadoc of JavaCore#COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION needs improvement
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235778">235778</a>
+Potential race condition computing resolved classpath
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=154865">154865</a>
+[hierarchy] Focus on Package only shows classes with missing superclasses
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236445">236445</a>
+NPE in content assist
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237123">237123</a>
+[search] And/OrPatterns miss to override one overload
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=226357">226357</a>
+[dom] NPE in MethodBinding.getParameterAnnotations() if some, but not all parameters are annotated
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=120082">120082</a>
+Signature is missing capture
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235882">235882</a>
+[compiler] constructor-scoped inner classes unable to recognize final member variable initialization
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238090">238090</a>
+[formatter] New lines wrongly added while formatting too long @see references
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237942">237942</a>
+[formatter] String references are put on next line when over the max line length
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233259">233259</a>
+[formatter] html tag should not be split by formatter
+
+
+<a name="v_900"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.5M1 - June 24, 2008
+<br>Project org.eclipse.jdt.core v_900
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_900">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Incremented JDT/Core plug-in id to "3.5.0", since added new API/feature.
+</li>
+<li>Added a new compiler warning to detect comparisons between identical expressions. This diagnosis is controlled by option: 
+<code>JavaCore.COMPILER_PB_COMPARING_IDENTICAL</code> and produces a problem marker which ID is
+<code>IProblem.ComparingIdentical</code> problem ID.
+<pre>
+Compiler option ID: Reporting Comparison of Identical Expressions.
+When enabled, the compiler will issue an error or a warning if a comparison
+is involving identical operands (e.g <code>'x == x'</code>).
+  - Option id:"org.eclipse.jdt.core.compiler.problem.comparingIdentical"
+  - Possible values: { "error", "warning", "ignore" }
+  - Default: "warning"
+</pre>
+</li>
+</ul>
+
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234172">234172</a>
+[1.5][select] no hover in qualified name with generics
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=233568">233568</a>
+Type in Server Runtime is not resolved in editor
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=217287">217287</a>
+[dom]IVariableBinding#getJavaElement() return null for variable inside an initializer
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235921">235921</a>
+[1.5][compiler] Incorrect generic signature attribute created for inner anonymous type
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234619">234619</a>
+[1.5][compiler] Object#getClass() has wrong expression type binding with JRE from 1.6
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=115814">115814</a>
+[compiler] warning on comparing same to same
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=235004">235004</a>
+[compiler] Misleading compiler warning
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232944">232944</a>
+IMember#getJavadocRange() should end with "*/"
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=222665">222665</a>
+Error opening workbench
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=216772">216772</a>
+IJavaModel#refreshExternalArchives fails to refresh ExternalJavaProject jar cache
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=205917">205917</a>
+JavaCore#create(String, WorkingCopyOwner) should deal with null owner
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=237051">237051</a>
+[formatter] Formatter insert blank lines after javadoc if javadoc contains Commons Attributes @@ annotations
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236230">236230</a>
+[formatter] SIOOBE while formatting a compilation unit.
+
+
+<hr>
+<p>For earlier build notes, also see <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/R34_buildnotes_jdt-core.html">build notes up to Release 3.4</a>.</p>
+<br>
+  <p>
+    <a href="http://validator.w3.org/check?uri=referer"><img
+        src="http://www.w3.org/Icons/valid-html401"
+        alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
+  </p>
+</body>
+</html>
+
diff --git a/eclipse/plugins/org.eclipse.jdt.core/plugin.xml b/eclipse/plugins/org.eclipse.jdt.core/plugin.xml
index 4a044b6..3784256 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-    Copyright (c) 2004, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2004, 2010 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.core/schema/codeFormatter.exsd b/eclipse/plugins/org.eclipse.jdt.core/schema/codeFormatter.exsd
index 4fe77e6..61c1911 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/schema/codeFormatter.exsd
+++ b/eclipse/plugins/org.eclipse.jdt.core/schema/codeFormatter.exsd
@@ -1,111 +1,100 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jdt.core">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.eclipse.jdt.core" id="codeFormatter" name="Code Formatters"/>
-      </appInfo>
-      <documentation>
-         This extension point allows clients to contribute new source code formatter implementations.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="codeFormatter" minOccurs="0" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  a fully qualified identifier of the target extension point
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  an optional identifier of the extension instance
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  an optional name of the extension instance
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="codeFormatter">
-      <complexType>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  the class that defines the code formatter implementation. This class must be a public implementation of <code>org.eclipse.jdt.core.ICodeFormatter</code> with a public 0-argument constructor.
-               </documentation>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         2.0
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jdt.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jdt.core" id="codeFormatter" name="Code Formatters"/>
+      </appInfo>
+      <documentation>
+         This extension point allows clients to contribute new source code formatter implementations.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element deprecated="true" />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="codeFormatter" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  an optional identifier of the extension instance
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  an optional name of the extension instance
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="codeFormatter">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  the class that defines the code formatter implementation. This class must be a public implementation of <code>org.eclipse.jdt.core.ICodeFormatter</code> with a public 0-argument constructor.
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         2.0
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
          Example of an implementation of <code>ICodeFormatter</code>:  <pre>                                                                       
 <extension point="org.eclipse.jdt.core.codeFormatter">            
    <codeFormatter                                                                                              
       class="com.example.MyCodeFormatter"/>                           
 </extension>
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="copyright"/>
-      </appInfo>
-      <documentation>
-         Copyright (c) 2000, 2004 IBM Corporation and others.<br>
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Eclipse Public License v1.0 which accompanies 
-this distribution, and is available at <a
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
-     </documentation>
-   </annotation>
-
-</schema>
+</pre>
+      </documentation>
+   </annotation>
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2000, 2010 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which accompanies 
+this distribution, and is available at <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/schema/compiler.dtd b/eclipse/plugins/org.eclipse.jdt.core/schema/compiler.dtd
index f838dd4..7d989a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/schema/compiler.dtd
+++ b/eclipse/plugins/org.eclipse.jdt.core/schema/compiler.dtd
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!ELEMENT compiler (error*,command_line?,options?,classpaths?,error*,sources*,extra_problems?,stats?,exception*)>
+<!ELEMENT compiler (error*,command_line?,options?,classpaths?,error*,warning*,sources*,extra_problems?,stats?,exception*)>
 <!ELEMENT command_line (argument*)>
 <!ELEMENT options (option*)>
 <!ELEMENT classpaths (classpath+)>
 <!ELEMENT error (#PCDATA)>
+<!ELEMENT warning (#PCDATA)>
 <!ELEMENT sources (source+)>
 <!ELEMENT source (problems*,tasks*,(classfile | error)*)>
 <!ELEMENT problems (problem+)>
@@ -68,6 +69,7 @@
 >
 <!ATTLIST classfile path CDATA #REQUIRED>
 <!ATTLIST error message CDATA #REQUIRED>
+<!ATTLIST warning message CDATA #REQUIRED>
 <!ATTLIST problem_summary problems CDATA #REQUIRED
                           errors   CDATA #REQUIRED
                           warnings CDATA #REQUIRED
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.core/scripts/META-INF/MANIFEST.MF
deleted file mode 100644
index 0c54849..0000000
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
-Bundle-ManifestVersion: 2
-Bundle-Name: Eclipse Compiler for Java
-Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
-Bundle-Version: 3.3.0
-Bundle-ClassPath: .
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jdt.core,
- org.eclipse.jdt.core.compiler,
- org.eclipse.jdt.internal.antadapter;x-internal:=true,
- org.eclipse.jdt.internal.compiler;x-internal:=true,
- org.eclipse.jdt.internal.compiler.ast;x-internal:=true,
- org.eclipse.jdt.internal.compiler.batch;x-internal:=true,
- org.eclipse.jdt.internal.compiler.classfmt;x-internal:=true,
- org.eclipse.jdt.internal.compiler.codegen;x-internal:=true,
- org.eclipse.jdt.internal.compiler.env;x-internal:=true,
- org.eclipse.jdt.internal.compiler.flow;x-internal:=true,
- org.eclipse.jdt.internal.compiler.impl;x-internal:=true,
- org.eclipse.jdt.internal.compiler.lookup;x-internal:=true,
- org.eclipse.jdt.internal.compiler.parser;x-internal:=true,
- org.eclipse.jdt.internal.compiler.parser.diagnose;x-internal:=true,
- org.eclipse.jdt.internal.compiler.problem;x-internal:=true,
- org.eclipse.jdt.internal.compiler.util;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..2adaf31
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
+Bundle-ManifestVersion: 2
+Bundle-Name: Eclipse Compiler for Java(TM)
+Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
+Bundle-Version: 3.6.0.qualifier
+Bundle-ClassPath: .
+Bundle-Vendor: Eclipse.org
+Export-Package: org.eclipse.jdt.core,
+ org.eclipse.jdt.core.compiler,
+ org.eclipse.jdt.internal.antadapter;x-internal:=true,
+ org.eclipse.jdt.internal.compiler;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.apt.dispatch;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.apt.model;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.apt.util;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.ast;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.batch;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.classfmt;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.codegen;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.env;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.flow;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.impl;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.lookup;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.parser;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.parser.diagnose;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.problem;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.util;x-internal:=true,
+ org.eclipse.jdt.internal.compiler.tool;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ecj.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ecj.xml
index 29e25a7..c4ec3ba 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ecj.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ecj.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
<!--
+
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
@@ -78,18 +79,28 @@
 		<mkdir dir="${dest}" />
 		<echo message="UPDATE ecj-${buildLabel}.jar" />
 		<delete file="${dest}/ecj-${buildLabel}.jar" failonerror="false"/>
+		<copy todir="${ecj-temp-folder}">
+			<fileset dir="scripts/binary" />
+		</copy>
+		<replace file="${ecj-temp-folder}/META-INF/MANIFEST.MF" token="qualifier" value="${buildLabel}"/>
 		<zip zipfile="${dest}/ecj-${buildLabel}.jar">
 			<fileset dir="${ecj-temp-folder}">
 				<include name="**/*"/>
 			</fileset>
 			<fileset dir="scripts">
-				<include name="META-INF/**" />
 				<include name="about.html" />
 			</fileset>
 		</zip>
+
+
 		<echo message="UPDATE ecjsrc-${buildLabel}.zip" />
 		<delete file="${dest}/ecjsrc-${buildLabel}.zip" failonerror="false"/>
+		<copy todir="${ecj-temp-src-folder}">
+			<fileset dir="scripts/source" />
+		</copy>
+		<replace file="${ecj-temp-src-folder}/META-INF/MANIFEST.MF" token="qualifier" value="${buildLabel}"/>
 		<zip zipfile="${dest}/ecjsrc-${buildLabel}.zip">
+			<zipfileset dir="ecj-temp-src-folder" />
 			<zipfileset dir="batch" />
 			<zipfileset dir="compiler" />
 			<zipfileset dir="antadapter">
@@ -97,7 +108,6 @@
 			</zipfileset>
 			<zipfileset dir="scripts">
 				<include name="about.html" />
-				<include name="META-INF/**" />
 				<include name="build.xml" />
 			</zipfileset>
 		</zip>
@@ -105,11 +115,16 @@
 	</target>
 
 	<target name="export_src_bin">
+		<property name="buildLabel" value="head" />
 		<property name="dest" value="../../ecj-export" />
 		<mkdir dir="${dest}" />
 		<echo message="UPDATE ecj_all.jar" />
 		<delete file="${dest}/ecj_all.jar" failonerror="false"/>
 		<mkdir dir="${ecj-temp-src-folder}/src" />
+		<copy todir="${ecj-temp-folder}">
+			<fileset dir="scripts/binary" />
+		</copy>
+		<replace file="${ecj-temp-folder}/META-INF/MANIFEST.MF" token="qualifier" value="${buildLabel}"/>
 
 		<copy todir="${ecj-temp-src-folder}/src">
 			<fileset dir="batch" />
@@ -124,9 +139,10 @@
 				<include name="**/*"/>
 				<include name="about.html"/>
 			</fileset>
-			<fileset dir="${ecj-temp-src-folder}"/>
+			<fileset dir="${ecj-temp-src-folder}">
+				<exclude name="META-INF/**"/>
+			</fileset>
 			<fileset dir="scripts">
-				<include name="META-INF/**" />
 				<include name="about.html" />
 			</fileset>
 		</zip>
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac.xml
index 8c7d2ac..22e0ccc 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2.xml
index a5fe20e..52ce9d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2_linux.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2_linux.xml
index 6d38b19..91f931d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2_linux.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac2_linux.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac_linux.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac_linux.xml
index 7a0cae9..3e2cbbc 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac_linux.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/export-ejavac_linux.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/exportplugin.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/exportplugin.xml
index b10113d..f15df63 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/exportplugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/exportplugin.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
<!--
+
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
@@ -11,8 +12,28 @@
  -->
 
 <!-- build script to create a plugin from ${plugin} -->
-<project name="${plugin}" default="export plug-in [_3.5.0]" basedir="..">
-
+<project name="${plugin}" default="export plug-in [_3.6.0]" basedir="..">
+<target name="export plug-in [_3.6.0]">
+    <tstamp/>
+	<property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
+	<antcall target="zz_internal_export">
+		<param name="jdt_core_version" value="3.6.0"/>
+	</antcall>
+</target>
+<target name="export plug-in [_3.6.0.qualifier] (binary only)">
+    <tstamp/>
+	<property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
+	<antcall target="zz_internal_export_binary_only">
+		<param name="jdt_core_version" value="3.6.0.${qualifier}"/>
+	</antcall>
+</target>
+<target name="export plug-in [_3.6.0.qualifier] (with sources)">
+    <tstamp/>
+	<property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
+	<antcall target="zz_internal_export">
+		<param name="jdt_core_version" value="3.6.0.${qualifier}"/>
+	</antcall>
+</target>
 <target name="export plug-in [_3.5.0]">
     <tstamp/>
 	<property name="qualifier" value="z${DSTAMP}-${TSTAMP}" />
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
index ff090db..922bb32 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/oldexportplugin.xml b/eclipse/plugins/org.eclipse.jdt.core/scripts/oldexportplugin.xml
index 4b76405..79fe67d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/scripts/oldexportplugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/oldexportplugin.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
<!--
+
+<!--
     Copyright (c) 2007, 2009 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.jdt.core/scripts/source/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.core/scripts/source/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..1966ba5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.core/scripts/source/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Source of Eclipse Compiler for Java(TM)
+Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch.source
+Bundle-Version: 3.6.0.qualifier
+Bundle-Vendor: Eclipse.org
+Eclipse-SourceBundle: org.eclipse.jdt.core.compiler.batch;version="3.6.0.qualifier";roots:="."
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
index edaaf7e..26763cd 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contributions for bug 215139 and bug 295894
  *******************************************************************************/
 package org.eclipse.jdt.core.search;
 
@@ -188,6 +189,36 @@ public class SearchEngine {
 	}
 
 	/**
+	 * Returns a Java search scope limited to the hierarchy of the given type and to a given project.
+	 * The Java elements resulting from a search with this scope will be types in this hierarchy.
+	 * <p>
+	 * Unlike the <code>createHierarchyScope</code> methods, this method creates <em>strict</em>
+	 * scopes that only contain types that actually span the hierarchy of the focus
+	 * type, but do not include additional enclosing or member types.
+	 * </p>
+	 * <p>
+	 * By default, hierarchy scopes include all direct and indirect supertypes and subtypes of the
+	 * focus type. This method, however, allows to restrict the hierarchy to true subtypes,
+	 * and exclude supertypes. Also, inclusion of the focus type itself is controlled by a parameter. 
+	 * </p>
+	 * 
+	 * @param project the project to which to constrain the search, or <code>null</code> if
+	 *        search should consider all types in the workspace 
+	 * @param type the focus of the hierarchy scope
+	 * @param onlySubtypes if <code>true</code> only subtypes of <code>type</code> are considered
+	 * @param includeFocusType if true the focus type <code>type</code> is included in the resulting scope, 
+	 * 		  otherwise it is excluded
+	 * @param owner the owner of working copies that take precedence over original compilation units, 
+	 *        or <code>null</code> if the primary working copy owner should be used
+	 * @return a new hierarchy scope
+	 * @exception JavaModelException if the hierarchy could not be computed on the given type
+	 * @since 3.6
+	 */
+	public static IJavaSearchScope createStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner) throws JavaModelException {
+		return BasicSearchEngine.createStrictHierarchyScope(project, type, onlySubtypes, includeFocusType, owner);
+	}
+
+	/**
 	 * Returns a Java search scope limited to the given resources.
 	 * The Java elements resulting from a search with this scope will
 	 * have their underlying resource included in or equals to one of the given
@@ -589,7 +620,7 @@ public class SearchEngine {
 	 *		<li>{@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type</li>
 	 * 	<li>{@link IJavaSearchConstants#CLASS_AND_ENUM}: only look for classes and enumerations</li>
 	 *		<li>{@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces</li>
-	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (ie. classes, interfaces, enum and annotation types)</li>
+	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (i.e. classes, interfaces, enum and annotation types)</li>
 	 *	</ul>
 	 * @param scope the scope to search in
 	 * @param nameRequestor the requestor that collects the results of the search
@@ -678,7 +709,7 @@ public class SearchEngine {
 	 *		<li>{@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type</li>
 	 * 	<li>{@link IJavaSearchConstants#CLASS_AND_ENUM}: only look for classes and enumerations</li>
 	 *		<li>{@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces</li>
-	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (ie. classes, interfaces, enum and annotation types)</li>
+	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (i.e. classes, interfaces, enum and annotation types)</li>
 	 *	</ul>
 	 * @param scope the scope to search in
 	 * @param nameRequestor the requestor that collects the results of the search
@@ -779,7 +810,7 @@ public class SearchEngine {
 	 *		<li>{@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type</li>
 	 * 	<li>{@link IJavaSearchConstants#CLASS_AND_ENUM}: only look for classes and enumerations</li>
 	 *		<li>{@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces</li>
-	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (ie. classes, interfaces, enum and annotation types)</li>
+	 * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (i.e. classes, interfaces, enum and annotation types)</li>
 	 *	</ul>
 	 * @param scope the scope to search in
 	 * @param nameMatchRequestor the {@link TypeNameMatchRequestor requestor} that collects
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
index fcca83a..fa4f83e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,8 @@ import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
  */
 public abstract class SearchParticipant {
 
+	private IPath lastIndexLocation;
+
 	/**
 	 * Creates a new search participant.
 	 */
@@ -205,6 +207,10 @@ public abstract class SearchParticipant {
 		// TODO (frederic) should not have to create index manually, should expose API that recreates index instead
 		manager.ensureIndexExists(indexLocation, containerPath);
 		manager.scheduleDocumentIndexing(document, containerPath, indexLocation, this);
+		if (!indexLocation.equals(this.lastIndexLocation)) {
+			manager.updateParticipant(indexLocation, containerPath);
+			this.lastIndexLocation = indexLocation;
+		}
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
index 743b103..cf96ff3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchPattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
 import org.eclipse.jdt.internal.core.LocalVariable;
 import org.eclipse.jdt.internal.core.index.EntryResult;
 import org.eclipse.jdt.internal.core.index.Index;
+import org.eclipse.jdt.internal.core.search.HierarchyScope;
 import org.eclipse.jdt.internal.core.search.IndexQueryRequestor;
 import org.eclipse.jdt.internal.core.search.JavaSearchScope;
 import org.eclipse.jdt.internal.core.search.StringOperation;
@@ -275,6 +276,13 @@ public SearchPattern(int matchRule) {
  * @nooverride This method is not intended to be re-implemented or extended by clients.
  */
 public void acceptMatch(String relativePath, String containerPath, char separator, SearchPattern pattern, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope) {
+	acceptMatch(relativePath, containerPath, separator, pattern, requestor, participant, scope, null);
+}
+/**
+ * @noreference This method is not intended to be referenced by clients.
+ * @nooverride This method is not intended to be re-implemented or extended by clients.
+ */
+public void acceptMatch(String relativePath, String containerPath, char separator, SearchPattern pattern, IndexQueryRequestor requestor, SearchParticipant participant, IJavaSearchScope scope, IProgressMonitor monitor) {
 
 	if (scope instanceof JavaSearchScope) {
 		JavaSearchScope javaSearchScope = (JavaSearchScope) scope;
@@ -295,7 +303,9 @@ public void acceptMatch(String relativePath, String containerPath, char separato
 		buffer.append(separator);
 		buffer.append(relativePath);
 		String documentPath = buffer.toString();
-		if (scope.encloses(documentPath))
+		boolean encloses = (scope instanceof HierarchyScope) ? ((HierarchyScope)scope).encloses(documentPath, monitor)
+							: scope.encloses(documentPath);
+		if (encloses) 
 			if (!requestor.acceptIndexMatch(documentPath, pattern, participant, null))
 				throw new OperationCanceledException();
 
@@ -1379,103 +1389,159 @@ private static SearchPattern createPackagePattern(String patternString, int limi
  * <ul>
  * 	<li>Type patterns have the following syntax:
  * 		<p><b><code>[qualification '.']typeName ['<' typeArguments '>']</code></b></p>
- *			<p>Some samples:<code>
+ *			<p>Examples:</p>
  *			<ul>
- * 			<li>java.lang.Object</li>
- *				<li>Runnable</li>
- *				<li>List<String></li>
+ * 			<li><code>java.lang.Object</code></li>
+ *				<li><code>Runnable</code></li>
+ *				<li><code>List<String></code></li>
  *			</ul>
- *			</code>
- *			</p><p>
+ *			<p>
  *			Type arguments can be specified to search for references to parameterized types
  * 		using following syntax:</p><p>
  * 		<b><code>'<' { [ '?' {'extends'|'super'} ] type ( ',' [ '?' {'extends'|'super'} ] type )* | '?' } '>'</code></b>
- * 		</p><p><i>
+ * 		</p><div style="font-style:italic;">
  * 		Note that:
  * 		<ul>
  * 			<li>'*' is not valid inside type arguments definition <></li>
  * 			<li>'?' is treated as a wildcard when it is inside <> (i.e. it must be put on first position of the type argument)</li>
  * 		</ul>
- * 		</i></p>
+ * 		</div>
  * 	</li>
  * 	<li>Method patterns have the following syntax:
  * 		<p><b><code>[declaringType '.'] ['<' typeArguments '>'] methodName ['(' parameterTypes ')'] [returnType]</code></b></p>
- *			<p>Type arguments have the same syntax as explained in the type patterns section</p>
- *			<p>Some samples:<code>
+ *			<p>Type arguments have the same syntax as explained in the type patterns section.</p>
+ *			<p>Examples:</p>
  *			<ul>
- *				<li>java.lang.Runnable.run() void</li>
- *				<li>main(*)</li>
- *				<li><String>toArray(String[])</li>
+ *				<li><code>java.lang.Runnable.run() void</code></li>
+ *				<li><code>main(*)</code></li>
+ *				<li><code><String>toArray(String[])</code></li>
  *			</ul>
- *			</code>
- *			</p>
- *		</li>
+ *	</li>
  * 	<li>Constructor patterns have the following syntax:
  *			<p><b><code>['<' typeArguments '>'] [declaringQualification '.'] typeName ['(' parameterTypes ')']</code></b></p>
- *			<p>Type arguments have the same syntax as explained in the type patterns section</p>
- *			<p>Some samples:<code>
+ *			<p>Type arguments have the same syntax as explained in the type patterns section.</p>
+ *			<p><i>Note that the constructor name should not be entered as it is always the same as the type name.</i></p>
+ *			<p>Examples:</p>
  *			<ul>
- *				<li>java.lang.Object()</li>
- *				<li>Test(*)</li>
- *				<li><Exception>Sample(Exception)</li>
+ *				<li><code>java.lang.Object()</code></li>
+ *				<li><code>Test(*)</code></li>
+ *				<li><code><Exception>Sample(Exception)</code></li>
  *			</ul>
- *			</code>
- *			 </p>
+ * 		<br>
  * 	</li>
  * 	<li>Field patterns have the following syntax:
  *			<p><b><code>[declaringType '.'] fieldName [fieldType]</code></b></p>
- *			<p>Some samples:<code>
+ *			<p>Examples:</p>
  *			<ul>
- *				<li>java.lang.String.serialVersionUID long</li>
- *				<li>field*</li>
+ *				<li><code>java.lang.String.serialVersionUID long</code></li>
+ *				<li><code>field*</code></li>
  *			</ul>
- *			</code>
- *			</p>
  * 	</li>
  * 	<li>Package patterns have the following syntax:
  *			<p><b><code>packageNameSegment {'.' packageNameSegment}</code></b></p>
- *			<p>Some samples:<code>
+ *			<p>Examples:</p>
  *			<ul>
- *				<li>java.lang</li>
- *				<li>org.e*.jdt.c*e</li>
+ *				<li><code>java.lang</code></li>
+ *				<li><code>org.e*.jdt.c*e</code></li>
  *			</ul>
- *			</code>
- *			</p>
  * 	</li>
  * </ul>
  * @param searchFor determines the nature of the searched elements
  *	<ul>
  * 	<li>{@link IJavaSearchConstants#CLASS}: only look for classes</li>
- *		<li>{@link IJavaSearchConstants#INTERFACE}: only look for interfaces</li>
+ *	<li>{@link IJavaSearchConstants#INTERFACE}: only look for interfaces</li>
  * 	<li>{@link IJavaSearchConstants#ENUM}: only look for enumeration</li>
- *		<li>{@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type</li>
+ *	<li>{@link IJavaSearchConstants#ANNOTATION_TYPE}: only look for annotation type</li>
  * 	<li>{@link IJavaSearchConstants#CLASS_AND_ENUM}: only look for classes and enumerations</li>
- *		<li>{@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces</li>
+ *	<li>{@link IJavaSearchConstants#CLASS_AND_INTERFACE}: only look for classes and interfaces</li>
  * 	<li>{@link IJavaSearchConstants#TYPE}: look for all types (i.e. classes, interfaces, enum and annotation types)</li>
- *		<li>{@link IJavaSearchConstants#FIELD}: look for fields</li>
- *		<li>{@link IJavaSearchConstants#METHOD}: look for methods</li>
- *		<li>{@link IJavaSearchConstants#CONSTRUCTOR}: look for constructors</li>
- *		<li>{@link IJavaSearchConstants#PACKAGE}: look for packages</li>
+ *	<li>{@link IJavaSearchConstants#FIELD}: look for fields</li>
+ *	<li>{@link IJavaSearchConstants#METHOD}: look for methods</li>
+ *	<li>{@link IJavaSearchConstants#CONSTRUCTOR}: look for constructors</li>
+ *	<li>{@link IJavaSearchConstants#PACKAGE}: look for packages</li>
  *	</ul>
  * @param limitTo determines the nature of the expected matches
  *	<ul>
- * 	<li>{@link IJavaSearchConstants#DECLARATIONS}: will search declarations matching
+ * 	<li>{@link IJavaSearchConstants#DECLARATIONS DECLARATIONS}: will search declarations matching
  * 			with the corresponding element. In case the element is a method, declarations of matching
  * 			methods in sub-types will also be found, allowing to find declarations of abstract methods, etc.<br>
- * 			Note that additional flags {@link IJavaSearchConstants#IGNORE_DECLARING_TYPE} and
- * 			{@link IJavaSearchConstants#IGNORE_RETURN_TYPE} are ignored for string patterns.
+ * 			Note that additional flags {@link IJavaSearchConstants#IGNORE_DECLARING_TYPE IGNORE_DECLARING_TYPE} and
+ * 			{@link IJavaSearchConstants#IGNORE_RETURN_TYPE IGNORE_RETURN_TYPE} are ignored for string patterns.
  * 			This is due to the fact that client may omit to define them in string pattern to have same behavior.
  * 	</li>
- *		 <li>{@link IJavaSearchConstants#REFERENCES}: will search references to the given element.</li>
- *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES}: will search for either declarations or
+ *		 <li>{@link IJavaSearchConstants#REFERENCES REFERENCES}: will search references to the given element.</li>
+ *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES ALL_OCCURRENCES}: will search for either declarations or
  *				references as specified above.
  *		</li>
- *		 <li>{@link IJavaSearchConstants#IMPLEMENTORS}: for types, will find all types
+ *		 <li>{@link IJavaSearchConstants#IMPLEMENTORS IMPLEMENTORS}: for types, will find all types
  *				which directly implement/extend a given interface.
- *				Note that types may be only classes or only interfaces if {@link IJavaSearchConstants#CLASS } or
- *				{@link IJavaSearchConstants#INTERFACE} is respectively used instead of {@link IJavaSearchConstants#TYPE}.
+ *				Note that types may be only classes or only interfaces if {@link IJavaSearchConstants#CLASS CLASS} or
+ *				{@link IJavaSearchConstants#INTERFACE INTERFACE} is respectively used instead of {@link IJavaSearchConstants#TYPE TYPE}.
  *		</li>
- *		<li>TODO (frederic) add specification for fine grain flags
+ *		 <li>All other fine grain constants defined in the <b>limitTo</b> category
+ *				of the {@link IJavaSearchConstants} are also accepted nature: 
+ * 			<table border=0>
+ *     			<tr>
+ *         		<th align=left>Fine grain constant
+ *         		<th align=left>Meaning
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a field declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a local variable declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#PARAMETER_DECLARATION_TYPE_REFERENCE PARAMETER_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a method parameter declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPERTYPE_TYPE_REFERENCE SUPERTYPE_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a super type or as a super interface.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THROWS_CLAUSE_TYPE_REFERENCE THROWS_CLAUSE_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a throws clause.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CAST_TYPE_REFERENCE CAST_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a cast expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CATCH_TYPE_REFERENCE CATCH_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a catch header.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CLASS_INSTANCE_CREATION_TYPE_REFERENCE CLASS_INSTANCE_CREATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in class instance creation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#RETURN_TYPE_REFERENCE RETURN_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a method return type.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPORT_DECLARATION_TYPE_REFERENCE IMPORT_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in an import declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#ANNOTATION_TYPE_REFERENCE ANNOTATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as an annotation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_ARGUMENT_TYPE_REFERENCE TYPE_ARGUMENT_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type argument in a parameterized type or a parameterized method.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_VARIABLE_BOUND_TYPE_REFERENCE TYPE_VARIABLE_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type variable bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#WILDCARD_BOUND_TYPE_REFERENCE WILDCARD_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a wildcard bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#INSTANCEOF_TYPE_REFERENCE INSTANCEOF_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type of an <code>instanceof</code> expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPER_REFERENCE SUPER_REFERENCE}
+ *         		<td>Return only super field accesses or super method invocations (e.g. using the <code>super</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#QUALIFIED_REFERENCE QUALIFIED_REFERENCE}
+ *         		<td>Return only qualified field accesses or qualified method invocations.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THIS_REFERENCE THIS_REFERENCE}
+ *         		<td>Return only primary field accesses or primary method invocations (e.g. using the <code>this</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPLICIT_THIS_REFERENCE IMPLICIT_THIS_REFERENCE}
+ *         		<td>Return only field accesses or method invocations without any qualification.
+ * 			</table>
  *		</li>
  *	</ul>
  * @param matchRule one of the following match rules
@@ -1501,10 +1567,10 @@ private static SearchPattern createPackagePattern(String patternString, int limi
  *			<li>{@link #R_EXACT_MATCH} | {@link #R_ERASURE_MATCH}: if a case
  *				insensitive and erasure match is requested.</li>
  *		</ul>
- * 	Note that {@link #R_ERASURE_MATCH} or {@link #R_EQUIVALENT_MATCH} has no effect
- * 	on non-generic types/methods search.
+ * 	<p>Note that {@link #R_ERASURE_MATCH} or {@link #R_EQUIVALENT_MATCH} has no effect
+ * 	on non-generic types/methods search.</p>
  * 	<p>
- * 	Note also that the default behavior for generic types/methods search is to find exact matches.
+ * 	Note also that the default behavior for generic types/methods search is to find exact matches.</p>
  * @return a search pattern on the given string pattern, or <code>null</code> if the string pattern is ill-formed
  */
 public static SearchPattern createPattern(String stringPattern, int searchFor, int limitTo, int matchRule) {
@@ -1560,12 +1626,12 @@ public static SearchPattern createPattern(String stringPattern, int searchFor, i
  * @param element the Java element the search pattern is based on
  * @param limitTo determines the nature of the expected matches
  *	<ul>
- * 	<li>{@link IJavaSearchConstants#DECLARATIONS}: will search declarations matching
+ * 	<li>{@link IJavaSearchConstants#DECLARATIONS DECLARATIONS}: will search declarations matching
  * 			with the corresponding element. In case the element is a method, declarations of matching
  * 			methods in sub-types will also be found, allowing to find declarations of abstract methods, etc.
  *				Some additional flags may be specified while searching declaration:
  *				<ul>
- *					<li>{@link IJavaSearchConstants#IGNORE_DECLARING_TYPE}: declaring type will be ignored
+ *					<li>{@link IJavaSearchConstants#IGNORE_DECLARING_TYPE IGNORE_DECLARING_TYPE}: declaring type will be ignored
  *							during the search.<br>
  *							For example using following test case:
  *					<pre>
@@ -1576,7 +1642,7 @@ public static SearchPattern createPattern(String stringPattern, int searchFor, i
  *							search for <code>method</code> declaration with this flag
  *							will return 2 matches: in A and in C
  *					</li>
- *					<li>{@link IJavaSearchConstants#IGNORE_RETURN_TYPE}: return type will be ignored
+ *					<li>{@link IJavaSearchConstants#IGNORE_RETURN_TYPE IGNORE_RETURN_TYPE}: return type will be ignored
  *							during the search.<br>
  *							Using same example, search for <code>method</code> declaration with this flag
  *							will return 2 matches: in A and in B.
@@ -1586,14 +1652,74 @@ public static SearchPattern createPattern(String stringPattern, int searchFor, i
  *				during the search. Then, using same example, search for <code>method</code> declaration
  *				with these 2 flags will return 3 matches: in A, in B  and in C
  * 	</li>
- *		 <li>{@link IJavaSearchConstants#REFERENCES}: will search references to the given element.</li>
- *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES}: will search for either declarations or
+ *		 <li>{@link IJavaSearchConstants#REFERENCES REFERENCES}: will search references to the given element.</li>
+ *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES ALL_OCCURRENCES}: will search for either declarations or
  *				references as specified above.
  *		</li>
- *		 <li>{@link IJavaSearchConstants#IMPLEMENTORS}: for types, will find all types
- *				which directly implement/extend a given interface.
- *		</li>
- *		<li>TODO (frederic) add specification for fine grain flags
+ *		 <li>All other fine grain constants defined in the <b>limitTo</b> category
+ *				of the {@link IJavaSearchConstants} are also accepted nature: 
+ * 			<table border=0>
+ *     			<tr>
+ *         		<th align=left>Fine grain constant
+ *         		<th align=left>Meaning
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a field declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a local variable declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#PARAMETER_DECLARATION_TYPE_REFERENCE PARAMETER_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a method parameter declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPERTYPE_TYPE_REFERENCE SUPERTYPE_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a super type or as a super interface.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THROWS_CLAUSE_TYPE_REFERENCE THROWS_CLAUSE_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a throws clause.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CAST_TYPE_REFERENCE CAST_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a cast expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CATCH_TYPE_REFERENCE CATCH_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a catch header.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CLASS_INSTANCE_CREATION_TYPE_REFERENCE CLASS_INSTANCE_CREATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in class instance creation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#RETURN_TYPE_REFERENCE RETURN_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a method return type.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPORT_DECLARATION_TYPE_REFERENCE IMPORT_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in an import declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#ANNOTATION_TYPE_REFERENCE ANNOTATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as an annotation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_ARGUMENT_TYPE_REFERENCE TYPE_ARGUMENT_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type argument in a parameterized type or a parameterized method.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_VARIABLE_BOUND_TYPE_REFERENCE TYPE_VARIABLE_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type variable bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#WILDCARD_BOUND_TYPE_REFERENCE WILDCARD_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a wildcard bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#INSTANCEOF_TYPE_REFERENCE INSTANCEOF_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type of an <code>instanceof</code> expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPER_REFERENCE SUPER_REFERENCE}
+ *         		<td>Return only super field accesses or super method invocations (e.g. using the <code>super</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#QUALIFIED_REFERENCE QUALIFIED_REFERENCE}
+ *         		<td>Return only qualified field accesses or qualified method invocations.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THIS_REFERENCE THIS_REFERENCE}
+ *         		<td>Return only primary field accesses or primary method invocations (e.g. using the <code>this</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPLICIT_THIS_REFERENCE IMPLICIT_THIS_REFERENCE}
+ *         		<td>Return only field accesses or method invocations without any qualification.
+ * 			</table>
  *		</li>
  *	</ul>
  * @return a search pattern for a Java element or <code>null</code> if the given element is ill-formed
@@ -1609,12 +1735,12 @@ public static SearchPattern createPattern(IJavaElement element, int limitTo) {
  * @param element the Java element the search pattern is based on
  * @param limitTo determines the nature of the expected matches
  *	<ul>
- * 	<li>{@link IJavaSearchConstants#DECLARATIONS}: will search declarations matching
+ * 	<li>{@link IJavaSearchConstants#DECLARATIONS DECLARATIONS}: will search declarations matching
  * 			with the corresponding element. In case the element is a method, declarations of matching
  * 			methods in sub-types will also be found, allowing to find declarations of abstract methods, etc.
  *				Some additional flags may be specified while searching declaration:
  *				<ul>
- *					<li>{@link IJavaSearchConstants#IGNORE_DECLARING_TYPE}: declaring type will be ignored
+ *					<li>{@link IJavaSearchConstants#IGNORE_DECLARING_TYPE IGNORE_DECLARING_TYPE}: declaring type will be ignored
  *							during the search.<br>
  *							For example using following test case:
  *					<pre>
@@ -1625,7 +1751,7 @@ public static SearchPattern createPattern(IJavaElement element, int limitTo) {
  *							search for <code>method</code> declaration with this flag
  *							will return 2 matches: in A and in C
  *					</li>
- *					<li>{@link IJavaSearchConstants#IGNORE_RETURN_TYPE}: return type will be ignored
+ *					<li>{@link IJavaSearchConstants#IGNORE_RETURN_TYPE IGNORE_RETURN_TYPE}: return type will be ignored
  *							during the search.<br>
  *							Using same example, search for <code>method</code> declaration with this flag
  *							will return 2 matches: in A and in B.
@@ -1635,15 +1761,75 @@ public static SearchPattern createPattern(IJavaElement element, int limitTo) {
  *				during the search. Then, using same example, search for <code>method</code> declaration
  *				with these 2 flags will return 3 matches: in A, in B  and in C
  * 	</li>
- *		 <li>{@link IJavaSearchConstants#REFERENCES}: will search references to the given element.</li>
- *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES}: will search for either declarations or
+ *		 <li>{@link IJavaSearchConstants#REFERENCES REFERENCES}: will search references to the given element.</li>
+ *		 <li>{@link IJavaSearchConstants#ALL_OCCURRENCES ALL_OCCURRENCES}: will search for either declarations or
  *				references as specified above.
  *		</li>
- *		 <li>{@link IJavaSearchConstants#IMPLEMENTORS}: for types, will find all types
- *				which directly implement/extend a given interface.
- *		</li>
- *		<li>TODO (frederic) add specification for fine grain flags
- *		</li>
+ *		 <li>All other fine grain constants defined in the <b>limitTo</b> category
+ *				of the {@link IJavaSearchConstants} are also accepted nature: 
+ * 			<table border=0>
+ *     			<tr>
+ *         		<th align=left>Fine grain constant
+ *         		<th align=left>Meaning
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#FIELD_DECLARATION_TYPE_REFERENCE FIELD_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a field declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a local variable declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#PARAMETER_DECLARATION_TYPE_REFERENCE PARAMETER_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as the type of a method parameter declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPERTYPE_TYPE_REFERENCE SUPERTYPE_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a super type or as a super interface.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THROWS_CLAUSE_TYPE_REFERENCE THROWS_CLAUSE_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a throws clause.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CAST_TYPE_REFERENCE CAST_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a cast expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CATCH_TYPE_REFERENCE CATCH_TYPE_REFERENCE}
+ *         		<td>Return only type references used in a catch header.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#CLASS_INSTANCE_CREATION_TYPE_REFERENCE CLASS_INSTANCE_CREATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in class instance creation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#RETURN_TYPE_REFERENCE RETURN_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a method return type.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPORT_DECLARATION_TYPE_REFERENCE IMPORT_DECLARATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used in an import declaration.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#ANNOTATION_TYPE_REFERENCE ANNOTATION_TYPE_REFERENCE}
+ *         		<td>Return only type references used as an annotation.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_ARGUMENT_TYPE_REFERENCE TYPE_ARGUMENT_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type argument in a parameterized type or a parameterized method.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#TYPE_VARIABLE_BOUND_TYPE_REFERENCE TYPE_VARIABLE_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type variable bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#WILDCARD_BOUND_TYPE_REFERENCE WILDCARD_BOUND_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a wildcard bound.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#INSTANCEOF_TYPE_REFERENCE INSTANCEOF_TYPE_REFERENCE}
+ *         		<td>Return only type references used as a type of an <code>instanceof</code> expression.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#SUPER_REFERENCE SUPER_REFERENCE}
+ *         		<td>Return only super field accesses or super method invocations (e.g. using the <code>super</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#QUALIFIED_REFERENCE QUALIFIED_REFERENCE}
+ *         		<td>Return only qualified field accesses or qualified method invocations.
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#THIS_REFERENCE THIS_REFERENCE}
+ *         		<td>Return only primary field accesses or primary method invocations (e.g. using the <code>this</code> qualifier).
+ *     			<tr>
+ *         		<td>{@link IJavaSearchConstants#IMPLICIT_THIS_REFERENCE IMPLICIT_THIS_REFERENCE}
+ *         		<td>Return only field accesses or method invocations without any qualification.
+ * 			</table>
+ * 	</li>
  *	</ul>
  * @param matchRule one of the following match rules:
  * 	<ul>
@@ -2039,15 +2225,15 @@ private static SearchPattern createTypePattern(String patternString, int limitTo
 		case IJavaSearchConstants.DECLARATIONS : // cannot search for explicit member types
 			return new QualifiedTypeDeclarationPattern(qualificationChars, typeChars, indexSuffix, matchRule);
 		case IJavaSearchConstants.REFERENCES :
-			return new TypeReferencePattern(qualificationChars, typeChars, typeSignature, matchRule);
+			return new TypeReferencePattern(qualificationChars, typeChars, typeSignature, indexSuffix, matchRule);
 		case IJavaSearchConstants.IMPLEMENTORS :
 			return new SuperTypeReferencePattern(qualificationChars, typeChars, SuperTypeReferencePattern.ONLY_SUPER_INTERFACES, indexSuffix, matchRule);
 		case IJavaSearchConstants.ALL_OCCURRENCES :
 			return new OrPattern(
 				new QualifiedTypeDeclarationPattern(qualificationChars, typeChars, indexSuffix, matchRule),// cannot search for explicit member types
-				new TypeReferencePattern(qualificationChars, typeChars, typeSignature, matchRule));
+				new TypeReferencePattern(qualificationChars, typeChars, typeSignature, indexSuffix, matchRule));
 		default:
-			return new TypeReferencePattern(qualificationChars, typeChars, typeSignature, limitTo, matchRule);
+			return new TypeReferencePattern(qualificationChars, typeChars, typeSignature, limitTo, indexSuffix, matchRule);
 	}
 }
 /**
@@ -2121,7 +2307,7 @@ public void findIndexMatches(Index index, IndexQueryRequestor requestor, SearchP
 				// TODO (kent) some clients may not need the document names
 				String[] names = entry.getDocumentNames(index);
 				for (int j = 0, n = names.length; j < n; j++)
-					acceptMatch(names[j], containerPath, separator, decodedResult, requestor, participant, scope);
+					acceptMatch(names[j], containerPath, separator, decodedResult, requestor, participant, scope, monitor);
 			}
 		}
 	} finally {
@@ -2176,7 +2362,6 @@ public char[][] getIndexCategories() {
  * @return one of R_EXACT_MATCH, R_PREFIX_MATCH, R_PATTERN_MATCH, R_REGEXP_MATCH combined with R_CASE_SENSITIVE,
  *   e.g. R_EXACT_MATCH | R_CASE_SENSITIVE if an exact and case sensitive match is requested,
  *   or R_PREFIX_MATCH if a prefix non case sensitive match is requested.
- * [TODO (frederic) I hope R_ERASURE_MATCH doesn't need to be on this list. Because it would be a breaking API change.]
  */
 public final int getMatchRule() {
 	return this.matchRule;
@@ -2237,7 +2422,6 @@ public boolean matchesName(char[] pattern, char[] name) {
 				break;
 
 			case R_PATTERN_MATCH :
-				// TODO_PERFS (frederic) not sure this lowercase was necessary...
 				if (!isCaseSensitive)
 					pattern = CharOperation.toLowerCase(pattern);
 				return CharOperation.match(pattern, name, isCaseSensitive);
@@ -2256,7 +2440,7 @@ public boolean matchesName(char[] pattern, char[] name) {
 				return matchFirstChar && CharOperation.camelCaseMatch(pattern, name, true);
 
 			case R_REGEXP_MATCH :
-				// TODO (frederic) implement regular expression match
+				// TODO implement regular expression match
 				return true;
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameMatch.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameMatch.java
index 9cb2800..9ca3a3a 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameMatch.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameMatch.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,9 +18,8 @@ import org.eclipse.jdt.core.*;
  * <p>
  * The type of this match is available from {@link #getType()}.
  * </p>
- * <p>
- * This class is not intended to be overridden by clients.
- * </p>
+ *
+ * @noextend This class is not intended to be subclassed by clients.
  *
  * @see TypeNameMatchRequestor
  * @see SearchEngine#searchAllTypeNames(char[], int, char[], int, int, IJavaSearchScope, TypeNameMatchRequestor, int, org.eclipse.core.runtime.IProgressMonitor)
@@ -30,6 +29,20 @@ import org.eclipse.jdt.core.*;
 public abstract class TypeNameMatch {
 
 /**
+ * Returns the accessibility of the type name match
+ *
+ * @see IAccessRule
+ *
+ * @return the accessibility of the type name which may be
+ * 		{@link IAccessRule#K_ACCESSIBLE}, {@link IAccessRule#K_DISCOURAGED}
+ * 		or {@link IAccessRule#K_NON_ACCESSIBLE}.
+ * 		The default returned value is {@link IAccessRule#K_ACCESSIBLE}.
+ *
+ * @since 3.6
+ */
+public abstract int getAccessibility();
+
+/**
  * Returns the matched type's fully qualified name using '.' character
  * as separator (e.g. package name + '.' enclosing type names + '.' simple name).
  *
@@ -61,7 +74,7 @@ public abstract int getModifiers();
  * @see IJavaElement#getAncestor(int)
  *
  * @throws NullPointerException if matched type is <code> null</code>
- * @return the existing java model package fragment root (ie. cannot be <code>null</code>
+ * @return the existing java model package fragment root (i.e. cannot be <code>null</code>
  * 	and will return <code>true</code> to <code>exists()</code> message).
  */
 public IPackageFragmentRoot getPackageFragmentRoot() {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameRequestor.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameRequestor.java
index de0a24c..159d81e 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameRequestor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeNameRequestor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,12 +29,12 @@ public abstract class TypeNameRequestor {
 	 * </p>
 	 *
 	 * @param modifiers the modifier flags of the type. Note that for source type,
-	 *		these flags may slightly differ from thoses get after resolution.
+	 *		these flags may slightly differ from those get after resolution.
 	 *		For example an interface defined by <code>interface A {}</code>,
 	 *		although obviously public, will be returned false by <code>Flags.isPublic(modifiers)</code>
-	 *		due to the fact that its declaration does not explicitely define public flag.
+	 *		due to the fact that its declaration does not explicitly define public flag.
 	 *		@see org.eclipse.jdt.core.Flags
-	 * @param packageName the package name as specified in the package declaration (ie. a dot-separated name)
+	 * @param packageName the package name as specified in the package declaration (i.e. a dot-separated name)
 	 * @param simpleTypeName the simple name of the type
 	 * @param enclosingTypeNames if the type is a member type,
 	 *          the simple names of the enclosing types from the outer-most to the
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeReferenceMatch.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeReferenceMatch.java
index 5793209..e84e8eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeReferenceMatch.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/TypeReferenceMatch.java
@@ -57,6 +57,7 @@ public TypeReferenceMatch(IJavaElement enclosingElement, int accuracy, int offse
  *         </pre>
  * 		will return one match whose other elements is an array of two fields:
  * 		{@link IField test2} and {@link IField test3}.
+ * 		<br><br>
  * 	</li>
  * 	<li>searching for the references to the type <code>Test</code> in
  * 		<pre>
@@ -69,6 +70,21 @@ public TypeReferenceMatch(IJavaElement enclosingElement, int accuracy, int offse
  *         </pre>
  * 		will return one match whose other elements is an array of two local
  * 		variables: {@link ILocalVariable local2} and {@link ILocalVariable local3}.
+ * 		<br><br>
+ * 	</li>
+ * 	<li>since 3.6, searching for the references to the type
+ * 		<code>Test</code> in
+ * 		<pre>
+ *         public class Test {
+ *                 void testB(int testKind) {
+ *                         @Annot int test1, test2;
+ *                 }
+ *         }
+ *         @interface Annot {}
+ *         </pre>
+ * 		will return one match whose other elements is an array of one annotation:
+ * 		{@link IAnnotation Annot} which parent is the local variable
+ * 		{@link ILocalVariable test2}.
  * 	</li>
  * </ul>
  *
@@ -76,10 +92,7 @@ public TypeReferenceMatch(IJavaElement enclosingElement, int accuracy, int offse
  * @since 3.2
  */
 public final IJavaElement[] getOtherElements() {
-	if (this.localElement == null || this.localElement.getElementType() != IJavaElement.ANNOTATION) {
-		return this.otherElements;
-	}
-	return null;
+	return this.otherElements;
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
index 41545f4..2724ec3 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -132,20 +132,20 @@ SimpleSet addDocumentNames(String substring, MemoryIndex memoryIndex) throws IOE
 	}
 	return results;
 }
-private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, HashtableOfObject wordsToDocNumbers, MemoryIndex memoryIndex) throws IOException {
+private HashtableOfObject addQueryResult(HashtableOfObject results, char[] word, Object docs, MemoryIndex memoryIndex, boolean prevResults) throws IOException {
 	// must skip over documents which have been added/changed/deleted in the memory index
 	if (results == null)
 		results = new HashtableOfObject(13);
-	EntryResult result = (EntryResult) results.get(word);
+	EntryResult result = prevResults ? (EntryResult) results.get(word) : null;
 	if (memoryIndex == null) {
 		if (result == null)
-			results.put(word, new EntryResult(word, wordsToDocNumbers));
+			results.putUnsafely(word, new EntryResult(word, docs));
 		else
-			result.addDocumentTable(wordsToDocNumbers);
+			result.addDocumentTable(docs);
 	} else {
 		SimpleLookupTable docsToRefs = memoryIndex.docsToReferences;
 		if (result == null) result = new EntryResult(word, null);
-		int[] docNumbers = readDocumentNumbers(wordsToDocNumbers.get(word));
+		int[] docNumbers = readDocumentNumbers(docs);
 		for (int i = 0, l = docNumbers.length; i < l; i++) {
 			String docName = readDocumentName(docNumbers[i]);
 			if (!docsToRefs.containsKey(docName))
@@ -161,17 +161,23 @@ HashtableOfObject addQueryResults(char[][] categories, char[] key, int matchRule
 	if (this.categoryOffsets == null) return null; // file is empty
 
 	HashtableOfObject results = null; // initialized if needed
+	
+	// No need to check the results table for duplicacy while processing the 
+	// first category table or if the first category tables doesn't have any results.
+	boolean prevResults = false;
 	if (key == null) {
 		for (int i = 0, l = categories.length; i < l; i++) {
 			HashtableOfObject wordsToDocNumbers = readCategoryTable(categories[i], true); // cache if key is null since its a definite match
 			if (wordsToDocNumbers != null) {
 				char[][] words = wordsToDocNumbers.keyTable;
+				Object[] values = wordsToDocNumbers.valueTable;
 				if (results == null)
 					results = new HashtableOfObject(wordsToDocNumbers.elementSize);
 				for (int j = 0, m = words.length; j < m; j++)
 					if (words[j] != null)
-						results = addQueryResult(results, words[j], wordsToDocNumbers, memoryIndex);
+						results = addQueryResult(results, words[j], values[j], memoryIndex, prevResults);
 			}
+			prevResults = results != null;
 		}
 		if (results != null && this.cachedChunks == null)
 			cacheDocumentNames();
@@ -180,8 +186,10 @@ HashtableOfObject addQueryResults(char[][] categories, char[] key, int matchRule
 			case SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE:
 				for (int i = 0, l = categories.length; i < l; i++) {
 					HashtableOfObject wordsToDocNumbers = readCategoryTable(categories[i], false);
-					if (wordsToDocNumbers != null && wordsToDocNumbers.containsKey(key))
-						results = addQueryResult(results, key, wordsToDocNumbers, memoryIndex);
+					Object value;
+					if (wordsToDocNumbers != null && (value = wordsToDocNumbers.get(key)) != null)
+						results = addQueryResult(results, key, value, memoryIndex, prevResults);
+					prevResults = results != null;
 				}
 				break;
 			case SearchPattern.R_PREFIX_MATCH | SearchPattern.R_CASE_SENSITIVE:
@@ -189,12 +197,14 @@ HashtableOfObject addQueryResults(char[][] categories, char[] key, int matchRule
 					HashtableOfObject wordsToDocNumbers = readCategoryTable(categories[i], false);
 					if (wordsToDocNumbers != null) {
 						char[][] words = wordsToDocNumbers.keyTable;
+						Object[] values = wordsToDocNumbers.valueTable;
 						for (int j = 0, m = words.length; j < m; j++) {
 							char[] word = words[j];
 							if (word != null && key[0] == word[0] && CharOperation.prefixEquals(key, word))
-								results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex);
+								results = addQueryResult(results, word, values[j], memoryIndex, prevResults);
 						}
 					}
+					prevResults = results != null;
 				}
 				break;
 			default:
@@ -202,12 +212,14 @@ HashtableOfObject addQueryResults(char[][] categories, char[] key, int matchRule
 					HashtableOfObject wordsToDocNumbers = readCategoryTable(categories[i], false);
 					if (wordsToDocNumbers != null) {
 						char[][] words = wordsToDocNumbers.keyTable;
+						Object[] values = wordsToDocNumbers.valueTable;
 						for (int j = 0, m = words.length; j < m; j++) {
 							char[] word = words[j];
 							if (word != null && Index.isMatch(key, word, matchRule))
-								results = addQueryResult(results, word, wordsToDocNumbers, memoryIndex);
+								results = addQueryResult(results, word, values[j], memoryIndex, prevResults);
 						}
 					}
+					prevResults = results != null;
 				}
 		}
 	}
@@ -346,7 +358,7 @@ private void copyQueryResults(HashtableOfObject categoryToWords, int newPosition
 				if (word != null) {
 					Object o = wordsToDocs.get(word);
 					if (o == null) {
-						wordsToDocs.put(word, new int[] {newPosition});
+						wordsToDocs.putUnsafely(word, new int[] {newPosition});
 					} else if (o instanceof IntList) {
 						((IntList) o).add(newPosition);
 					} else {
@@ -469,7 +481,7 @@ private void mergeCategory(char[] categoryName, DiskIndex onDisk, int[] position
 
 				Object o = wordsToDocs.get(oldWord);
 				if (o == null) {
-					wordsToDocs.put(oldWord, mappedNumbers);
+					wordsToDocs.putUnsafely(oldWord, mappedNumbers);
 				} else {
 					IntList list = null;
 					if (o instanceof IntList) {
@@ -641,9 +653,9 @@ private synchronized HashtableOfObject readCategoryTable(char[] categoryName, bo
 			//		> 1 & < 256 then the size of the array is > 1 & < 256, the document array follows immediately
 			//		256 if the array size >= 256 followed by another int which is the offset to the array (written prior to the table)
 			if (arrayOffset <= 0) {
-				categoryTable.put(word, new int[] {-arrayOffset}); // store 1 element array by negating documentNumber
+				categoryTable.putUnsafely(word, new int[] {-arrayOffset}); // store 1 element array by negating documentNumber
 			} else if (arrayOffset < largeArraySize) {
-				categoryTable.put(word, readStreamDocumentArray(stream, arrayOffset)); // read in-lined array providing size
+				categoryTable.putUnsafely(word, readStreamDocumentArray(stream, arrayOffset)); // read in-lined array providing size
 			} else {
 				arrayOffset = readStreamInt(stream); // read actual offset
 				if (readDocNumbers) {
@@ -653,7 +665,7 @@ private synchronized HashtableOfObject readCategoryTable(char[] categoryName, bo
 						firstOffset = arrayOffset;
 					matchingWords[count++] = word;
 				}
-				categoryTable.put(word, new Integer(arrayOffset)); // offset to array in the file
+				categoryTable.putUnsafely(word, new Integer(arrayOffset)); // offset to array in the file
 			}
 		}
 		this.categoryTables.put(INTERNED_CATEGORY_NAMES.get(categoryName), categoryTable);
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/EntryResult.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/EntryResult.java
index a3f2597..ad65513 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/EntryResult.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/EntryResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,32 +11,31 @@
 package org.eclipse.jdt.internal.core.index;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 import org.eclipse.jdt.internal.compiler.util.SimpleSet;
 
 public class EntryResult {
 
 private char[] word;
-private HashtableOfObject[] documentTables;
+private Object[] documentTables;
 private SimpleSet documentNames;
 
-public EntryResult(char[] word, HashtableOfObject table) {
+public EntryResult(char[] word, Object table) {
 	this.word = word;
 	if (table != null)
-		this.documentTables = new HashtableOfObject[] {table};
+		this.documentTables = new Object[] {table};
 }
 public void addDocumentName(String documentName) {
 	if (this.documentNames == null)
 		this.documentNames = new SimpleSet(3);
 	this.documentNames.add(documentName);
 }
-public void addDocumentTable(HashtableOfObject table) {
+public void addDocumentTable(Object table) {
 	if (this.documentTables != null) {
 		int length = this.documentTables.length;
-		System.arraycopy(this.documentTables, 0, this.documentTables = new HashtableOfObject[length + 1], 0, length);
+		System.arraycopy(this.documentTables, 0, this.documentTables = new Object[length + 1], 0, length);
 		this.documentTables[length] = table;
 	} else {
-		this.documentTables = new HashtableOfObject[] {table};
+		this.documentTables = new Object[] {table};
 	}
 }
 public char[] getWord() {
@@ -46,7 +45,7 @@ public String[] getDocumentNames(Index index) throws java.io.IOException {
 	if (this.documentTables != null) {
 		int length = this.documentTables.length;
 		if (length == 1 && this.documentNames == null) { // have a single table
-			Object offset = this.documentTables[0].get(this.word);
+			Object offset = this.documentTables[0];
 			int[] numbers = index.diskIndex.readDocumentNumbers(offset);
 			String[] names = new String[numbers.length];
 			for (int i = 0, l = numbers.length; i < l; i++)
@@ -55,7 +54,7 @@ public String[] getDocumentNames(Index index) throws java.io.IOException {
 		}
 
 		for (int i = 0; i < length; i++) {
-			Object offset = this.documentTables[i].get(this.word);
+			Object offset = this.documentTables[i];
 			int[] numbers = index.diskIndex.readDocumentNumbers(offset);
 			for (int j = 0, k = numbers.length; j < k; j++)
 				addDocumentName(index.diskIndex.readDocumentName(numbers[j]));
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java
index 19db977..3d32607 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/Index.java
@@ -34,6 +34,7 @@ public ReadWriteMonitor monitor;
 // Separator to use after the container path
 static final char DEFAULT_SEPARATOR = '/';
 public char separator = DEFAULT_SEPARATOR;
+static final char JAR_SEPARATOR = IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR.charAt(0);
 
 protected DiskIndex diskIndex;
 protected MemoryIndex memoryIndex;
@@ -204,4 +205,8 @@ public void stopQuery() {
 public String toString() {
 	return "Index for " + this.containerPath; //$NON-NLS-1$
 }
+public boolean isIndexForJar()
+{
+	return this.separator == JAR_SEPARATOR;
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java
index 60d1eb9..ba5c38b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/BasicSearchEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contributions for bug 215139 and bug 295894
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.search;
 
@@ -108,6 +109,13 @@ public class BasicSearchEngine {
 	}
 
 	/**
+	 * @see SearchEngine#createStrictHierarchyScope(IJavaProject,IType,boolean,boolean,WorkingCopyOwner) for detailed comment.
+	 */
+	public static IJavaSearchScope createStrictHierarchyScope(IJavaProject project, IType type, boolean onlySubtypes, boolean includeFocusType, WorkingCopyOwner owner) throws JavaModelException {
+		return new HierarchyScope(project, type, owner, onlySubtypes, true, includeFocusType);
+	}
+
+	/**
 	 * @see SearchEngine#createJavaSearchScope(IJavaElement[]) for detailed comment.
 	 */
 	public static IJavaSearchScope createJavaSearchScope(IJavaElement[] elements) {
@@ -643,7 +651,12 @@ public class BasicSearchEngine {
 			if (copies != null) {
 				for (int i = 0; i < copiesLength; i++) {
 					final ICompilationUnit workingCopy = copies[i];
-					if (!scope.encloses(workingCopy)) continue;
+					if (scope instanceof HierarchyScope) {
+						if (!((HierarchyScope)scope).encloses(workingCopy, progressMonitor)) continue;
+					} else {
+						if (!scope.encloses(workingCopy)) continue;
+					}
+					
 					final String path = workingCopy.getPath().toString();
 					if (workingCopy.isConsistent()) {
 						IPackageDeclaration[] packageDeclarations = workingCopy.getPackageDeclarations();
@@ -1132,7 +1145,11 @@ public class BasicSearchEngine {
 			if (copies != null) {
 				for (int i = 0; i < copiesLength; i++) {
 					final ICompilationUnit workingCopy = copies[i];
-					if (!scope.encloses(workingCopy)) continue;
+					if (scope instanceof HierarchyScope) {
+						if (!((HierarchyScope)scope).encloses(workingCopy, progressMonitor)) continue;
+					} else {
+						if (!scope.encloses(workingCopy)) continue;
+					}
 					final String path = workingCopy.getPath().toString();
 					if (workingCopy.isConsistent()) {
 						IPackageDeclaration[] packageDeclarations = workingCopy.getPackageDeclarations();
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/HierarchyScope.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/HierarchyScope.java
index 233296e..6224c5b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/HierarchyScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/HierarchyScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contributions for bug 215139 and bug 295894
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.search;
 
@@ -17,12 +18,10 @@ import java.util.Iterator;
 
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.core.*;
 import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
 import org.eclipse.jdt.internal.core.*;
-import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
-import org.eclipse.jdt.internal.core.JavaElement;
-import org.eclipse.jdt.internal.core.JavaModel;
 import org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy;
 
 /**
@@ -35,7 +34,6 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 	private WorkingCopyOwner owner;
 
 	private ITypeHierarchy hierarchy;
-	private IType[] types;
 	private HashSet resourcePaths;
 	private IPath[] enclosingProjectsAndJars;
 
@@ -44,6 +42,11 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 
 	public boolean needsRefresh;
 
+	private HashSet subTypes = null; // null means: don't filter for subTypes
+	private IJavaProject javaProject = null; // null means: don't constrain the search to a project
+	private boolean allowMemberAndEnclosingTypes = true;
+	private boolean includeFocusType = true;
+
 	/* (non-Javadoc)
 	 * Adds the given resource to this search scope.
 	 */
@@ -59,6 +62,29 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		this.elements[this.elementCount++] = element;
 	}
 
+	/**
+	 * Creates a new hierarchy scope for the given type with the given configuration options.
+	 * @param project      constrain the search result to this project, 
+	 *                     or <code>null</code> if search should consider all types in the workspace 
+	 * @param type         the focus type of the hierarchy
+	 * @param owner 	   the owner of working copies that take precedence over original compilation units, 
+	 *                     or <code>null</code> if the primary working copy owner should be used
+	 * @param onlySubtypes if true search only subtypes of 'type'
+	 * @param noMembersOrEnclosingTypes if true the hierarchy is strict, 
+	 * 					   i.e., no additional member types or enclosing types of types spanning the hierarchy are included,
+	 * 					   otherwise all member and enclosing types of types in the hierarchy are included.
+	 * @param includeFocusType if true the focus type <code>type</code> is included in the resulting scope, otherwise it is excluded
+	 */
+	public HierarchyScope(IJavaProject project, IType type, WorkingCopyOwner owner, boolean onlySubtypes, boolean noMembersOrEnclosingTypes, boolean includeFocusType) throws JavaModelException {
+		this(type, owner);
+		this.javaProject = project;
+		if (onlySubtypes) {
+			this.subTypes = new HashSet();
+		}
+		this.includeFocusType = includeFocusType;
+		this.allowMemberAndEnclosingTypes = !noMembersOrEnclosingTypes;
+	}
+
 	/* (non-Javadoc)
 	 * Creates a new hiearchy scope for the given type.
 	 */
@@ -100,10 +126,24 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 	private void buildResourceVector() {
 		HashMap resources = new HashMap();
 		HashMap paths = new HashMap();
-		this.types = this.hierarchy.getAllTypes();
-		for (int i = 0; i < this.types.length; i++) {
-			IType type = this.types[i];
-			IResource resource = ((JavaElement) type).resource();
+		IType[] types = null;
+		if (this.subTypes != null) {
+			types = this.hierarchy.getAllSubtypes(this.focusType);
+			if (this.includeFocusType) {
+				int len = types.length;
+				System.arraycopy(types, 0, types=new IType[len+1], 0, len);
+				types[len] = this.focusType;
+			}
+		} else {
+			types = this.hierarchy.getAllTypes();
+		}
+		for (int i = 0; i < types.length; i++) {
+			IType type = types[i];
+			if (this.subTypes != null) {
+				// remember subtypes for later use in encloses()
+				this.subTypes.add(type);
+			}
+			IResource resource = ((JavaElement)type).resource();
 			if (resource != null && resources.get(resource) == null) {
 				resources.put(resource, resource);
 				add(resource);
@@ -220,13 +260,16 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 	 * @see IJavaSearchScope#encloses(String)
 	 */
 	public boolean encloses(String resourcePath) {
+		return encloses(resourcePath, null);
+	}
+	public boolean encloses(String resourcePath, IProgressMonitor progressMonitor) {
 		if (this.hierarchy == null) {
 			if (resourcePath.equals(this.focusPath)) {
 				return true;
 			} else {
 				if (this.needsRefresh) {
 					try {
-						initialize();
+						initialize(progressMonitor);
 					} catch (JavaModelException e) {
 						return false;
 					}
@@ -239,7 +282,7 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		}
 		if (this.needsRefresh) {
 			try {
-				refresh();
+				refresh(progressMonitor);
 			} catch(JavaModelException e) {
 				return false;
 			}
@@ -256,17 +299,32 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		}
 		return false;
 	}
+	/** 
+	 * Optionally perform additional checks after element has already passed matching based on index/documents.
+	 * 
+	 * @param element the given element
+	 * @return <code>true</code> if the element is enclosed or if no fine grained checking 
+	 *         (regarding subtypes and members) is requested
+	 */
+	public boolean enclosesFineGrained(IJavaElement element) {
+		if ((this.subTypes == null) && this.allowMemberAndEnclosingTypes) 
+			return true; // no fine grained checking requested
+		return encloses(element, null);
+	}
 	/* (non-Javadoc)
 	 * @see IJavaSearchScope#encloses(IJavaElement)
 	 */
 	public boolean encloses(IJavaElement element) {
+		return encloses(element, null);
+	}
+	public boolean encloses(IJavaElement element, IProgressMonitor progressMonitor) {
 		if (this.hierarchy == null) {
-			if (this.focusType.equals(element.getAncestor(IJavaElement.TYPE))) {
+			if (this.includeFocusType && this.focusType.equals(element.getAncestor(IJavaElement.TYPE))) {
 				return true;
 			} else {
 				if (this.needsRefresh) {
 					try {
-						initialize();
+						initialize(progressMonitor);
 					} catch (JavaModelException e) {
 						return false;
 					}
@@ -279,7 +337,7 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		}
 		if (this.needsRefresh) {
 			try {
-				refresh();
+				refresh(progressMonitor);
 			} catch(JavaModelException e) {
 				return false;
 			}
@@ -291,6 +349,38 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 			type = ((IMember) element).getDeclaringType();
 		}
 		if (type != null) {
+			if (this.focusType.equals(type))
+				return this.includeFocusType;
+			// potentially allow travelling in:
+			if (enclosesType(type, this.allowMemberAndEnclosingTypes)) {
+				return true;
+			}
+			if (this.allowMemberAndEnclosingTypes) {
+				// travel out: queried type is enclosed in this scope if its (indirect) declaring type is:
+				IType enclosing = type.getDeclaringType();
+				while (enclosing != null) {
+					// don't allow travelling in again:
+					if (enclosesType(enclosing, false)) {
+						return true;
+					}
+					enclosing = enclosing.getDeclaringType();
+				}
+			}
+		}
+		return false;
+	}
+	private boolean enclosesType(IType type, boolean recurse) {
+		if (this.subTypes != null) {
+			// searching subtypes
+			if (this.subTypes.contains(type)) {
+				return true;
+			}
+			// be flexible: look at original element (see bug 14106 and below)
+			IType original = type.isBinary() ? null : (IType)type.getPrimaryElement();
+			if (original != type && this.subTypes.contains(original)) {
+				return true;
+			}
+		} else {
 			if (this.hierarchy.contains(type)) {
 				return true;
 			} else {
@@ -298,10 +388,25 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 				IType original;
 				if (!type.isBinary()
 						&& (original = (IType)type.getPrimaryElement()) != null) {
-					return this.hierarchy.contains(original);
+					if (this.hierarchy.contains(original)) {
+						return true;
+					}
 				}
 			}
 		}
+		if (recurse) {
+			// queried type is enclosed in this scope if one of its members is:
+			try {
+				IType[] memberTypes = type.getTypes();
+				for (int i = 0; i < memberTypes.length; i++) {
+					if (enclosesType(memberTypes[i], recurse)) {
+						return true;
+					}
+				}
+			} catch (JavaModelException e) {
+				return false;
+			}
+		}
 		return false;
 	}
 	/* (non-Javadoc)
@@ -311,7 +416,7 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 	public IPath[] enclosingProjectsAndJars() {
 		if (this.needsRefresh) {
 			try {
-				refresh();
+				refresh(null);
 			} catch(JavaModelException e) {
 				return new IPath[0];
 			}
@@ -319,14 +424,21 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		return this.enclosingProjectsAndJars;
 	}
 	protected void initialize() throws JavaModelException {
+		initialize(null);
+	}
+	protected void initialize(IProgressMonitor progressMonitor) throws JavaModelException {
 		this.resourcePaths = new HashSet();
 		this.elements = new IResource[5];
 		this.elementCount = 0;
 		this.needsRefresh = false;
 		if (this.hierarchy == null) {
-			this.hierarchy = this.focusType.newTypeHierarchy(this.owner, null);
+			if (this.javaProject != null) {
+				this.hierarchy = this.focusType.newTypeHierarchy(this.javaProject, this.owner, progressMonitor);
+			} else {
+				this.hierarchy = this.focusType.newTypeHierarchy(this.owner, progressMonitor);
+			}
 		} else {
-			this.hierarchy.refresh(null);
+			this.hierarchy.refresh(progressMonitor);
 		}
 		buildResourceVector();
 	}
@@ -338,8 +450,11 @@ public class HierarchyScope extends AbstractSearchScope implements SuffixConstan
 		this.needsRefresh = this.hierarchy == null ? false : ((TypeHierarchy)this.hierarchy).isAffected(delta, eventType);
 	}
 	protected void refresh() throws JavaModelException {
+		refresh(null);
+	}
+	protected void refresh(IProgressMonitor progressMonitor) throws JavaModelException {
 		if (this.hierarchy != null) {
-			initialize();
+			initialize(progressMonitor);
 		}
 	}
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java
index c08871b..3f829b4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,15 +11,20 @@
 package org.eclipse.jdt.internal.core.search;
 
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.internal.compiler.util.ObjectVector;
 import org.eclipse.jdt.internal.compiler.util.SimpleSet;
 import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
 import org.eclipse.jdt.internal.core.JavaModel;
 import org.eclipse.jdt.internal.core.JavaModelManager;
 import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jdt.internal.core.builder.ReferenceCollection;
+import org.eclipse.jdt.internal.core.builder.State;
 import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
 import org.eclipse.jdt.internal.core.search.matching.MatchLocator;
 import org.eclipse.jdt.internal.core.search.matching.MethodPattern;
@@ -49,10 +54,10 @@ public static boolean canSeeFocus(SearchPattern pattern, IPath projectOrJarPath)
 	try {
 		IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
 		IJavaProject project = getJavaProject(projectOrJarPath, model);
-		IJavaElement[] focuses = getFocusedElements(pattern, project);
+		IJavaElement[] focuses = getFocusedElementsAndTypes(pattern, project, null);
 		if (focuses.length == 0) return false;
 		if (project != null) {
-			return canSeeFocus(focuses, (JavaProject) project);
+			return canSeeFocus(focuses, (JavaProject) project, null);
 		}
 
 		// projectOrJarPath is a jar
@@ -62,7 +67,7 @@ public static boolean canSeeFocus(SearchPattern pattern, IPath projectOrJarPath)
 			JavaProject otherProject = (JavaProject) allProjects[i];
 			IClasspathEntry entry = otherProject.getClasspathEntryFor(projectOrJarPath);
 			if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
-				if (canSeeFocus(focuses, otherProject)) {
+				if (canSeeFocus(focuses, otherProject, null)) {
 					return true;
 				}
 			}
@@ -72,14 +77,14 @@ public static boolean canSeeFocus(SearchPattern pattern, IPath projectOrJarPath)
 		return false;
 	}
 }
-private static boolean canSeeFocus(IJavaElement[] focuses, JavaProject javaProject) {
+private static boolean canSeeFocus(IJavaElement[] focuses, JavaProject javaProject, char[][][] focusQualifiedNames) {
 	int length = focuses.length;
 	for (int i=0; i<length; i++) {
-		if (canSeeFocus(focuses[i], javaProject)) return true;
+		if (canSeeFocus(focuses[i], javaProject, focusQualifiedNames)) return true;
 	}
 	return false;
 }
-private static boolean canSeeFocus(IJavaElement focus, JavaProject javaProject) {
+private static boolean canSeeFocus(IJavaElement focus, JavaProject javaProject, char[][][] focusQualifiedNames) {
 	try {
 		if (focus == null) return false;
 		if (focus.equals(javaProject)) return true;
@@ -100,8 +105,24 @@ private static boolean canSeeFocus(IJavaElement focus, JavaProject javaProject)
 		IClasspathEntry[] entries = javaProject.getExpandedClasspath();
 		for (int i = 0, length = entries.length; i < length; i++) {
 			IClasspathEntry entry = entries[i];
-			if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT && entry.getPath().equals(focusPath))
+			if (entry.getEntryKind() == IClasspathEntry.CPE_PROJECT && entry.getPath().equals(focusPath)) {
+				if (focusQualifiedNames != null) { // builder state is usable, hence use it to try to reduce project which can see the focus...
+					State projectState = (State) JavaModelManager.getJavaModelManager().getLastBuiltState(javaProject.getProject(), null);
+					if (projectState != null) {
+						Object[] values = projectState.getReferences().valueTable;
+						int vLength = values.length;
+						for (int j=0; j<vLength; j++)  {
+							if (values[j] == null) continue;
+							ReferenceCollection references = (ReferenceCollection) values[j];
+							if (references.includes(focusQualifiedNames, null, null)) {
+								return true;
+							}
+						}
+						return false;
+					}
+				}
 				return true;
+			}
 		}
 		return false;
 	} catch (JavaModelException e) {
@@ -112,7 +133,7 @@ private static boolean canSeeFocus(IJavaElement focus, JavaProject javaProject)
 /*
  * Create the list of focused jars or projects.
  */
-private static IJavaElement[] getFocusedElements(SearchPattern pattern, IJavaElement focusElement) throws JavaModelException {
+private static IJavaElement[] getFocusedElementsAndTypes(SearchPattern pattern, IJavaElement focusElement, ObjectVector superTypes) throws JavaModelException {
 	if (pattern instanceof MethodPattern) {
 		// For method pattern, it needs to walk along the focus type super hierarchy
 		// and add jars/projects of all the encountered types.
@@ -133,6 +154,8 @@ private static IJavaElement[] getFocusedElements(SearchPattern pattern, IJavaEle
 					IPackageFragmentRoot root = (IPackageFragmentRoot) allTypes[i].getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
 					IJavaElement element = root.isArchive() ? root : root.getParent();
 					focusSet.add(element);
+					if (superTypes != null) superTypes.add(allTypes[i]);
+					break;
 				}
 			}
 		}
@@ -169,20 +192,28 @@ private void initializeIndexLocations() {
 		}
 	} else {
 		try {
+			// See whether the state builder might be used to reduce the number of index locations
+		
 			// find the projects from projectsAndJars that see the focus then walk those projects looking for the jars from projectsAndJars
 			int length = projectsAndJars.length;
 			JavaProject[] projectsCanSeeFocus = new JavaProject[length];
 			SimpleSet visitedProjects = new SimpleSet(length);
 			int projectIndex = 0;
 			SimpleSet externalLibsToCheck = new SimpleSet(length);
-			IJavaElement[] focuses = getFocusedElements(this.pattern, focus);
+			ObjectVector superTypes = new ObjectVector();
+			IJavaElement[] focuses = getFocusedElementsAndTypes(this.pattern, focus, superTypes);
+			char[][][] focusQualifiedNames = null;
+			boolean isAutoBuilding = ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
+			if (isAutoBuilding && focus instanceof IJavaProject) {
+				focusQualifiedNames = getQualifiedNames(superTypes);
+			}
 			IJavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
 			for (int i = 0; i < length; i++) {
 				IPath path = projectsAndJars[i];
 				JavaProject project = (JavaProject) getJavaProject(path, model);
 				if (project != null) {
 					visitedProjects.add(project);
-					if (canSeeFocus(focuses, project)) {
+					if (canSeeFocus(focuses, project, focusQualifiedNames)) {
 						locations.add(manager.computeIndexLocation(path));
 						projectsCanSeeFocus[projectIndex++] = project;
 					}
@@ -258,4 +289,24 @@ private static IJavaProject getJavaProject(IPath path, IJavaModel model) {
 	}
 	return null;
 }
+
+private char[][][] getQualifiedNames(ObjectVector types) {
+	final int size = types.size;
+	char[][][] focusQualifiedNames = null;
+	IJavaElement javaElement = this.pattern.focus;
+	while (javaElement != null && !(javaElement instanceof ITypeRoot)) {
+		javaElement = javaElement.getParent();
+	}
+	if (javaElement != null) {
+		IType primaryType = ((ITypeRoot) javaElement).findPrimaryType();
+		if (primaryType != null) {
+			focusQualifiedNames = new char[size+1][][];
+			focusQualifiedNames[0] = CharOperation.splitOn('.', primaryType.getFullyQualifiedName().toCharArray());
+		}
+	}
+	for (int i = 0; i < size; i++) {
+		focusQualifiedNames[i+1] = CharOperation.splitOn('.', ((IType)(types.elementAt(i))).getFullyQualifiedName().toCharArray());
+	}
+	return focusQualifiedNames == null ? null : ReferenceCollection.internQualifiedNames(focusQualifiedNames, true);
+}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java
index 85d06c1..617d8c4 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -603,10 +603,10 @@ public IPackageFragmentRoot packageFragmentRoot(String resourcePathString, int j
 				return project.getPackageFragmentRoot(jarPath);
 			}
 			Object target = JavaModel.getWorkspaceTarget(new Path(this.containerPaths[index]+'/'+this.relativePaths[index]));
-			if (target instanceof IProject) {
-				return project.getPackageFragmentRoot((IProject) target);
-			}
-			if (target instanceof IResource) {
+			if (target != null) {
+				if (target instanceof IProject) {
+					return project.getPackageFragmentRoot((IProject) target);
+				}
 				IJavaElement element = JavaModelManager.create((IResource) target, project);
 				return (IPackageFragmentRoot) element.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchTypeNameMatch.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchTypeNameMatch.java
index a41ed94..110e0e1 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchTypeNameMatch.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/JavaSearchTypeNameMatch.java
@@ -20,8 +20,10 @@ import org.eclipse.jdt.core.search.*;
  */
 public class JavaSearchTypeNameMatch extends TypeNameMatch {
 
-private IType type;
-private int modifiers = -1; // store modifiers to avoid java model population
+	private IType type;
+	private int modifiers = -1; // store modifiers to avoid java model population
+
+	private int accessibility = IAccessRule.K_ACCESSIBLE;
 
 /**
  * Creates a new Java Search type name match.
@@ -48,6 +50,13 @@ public boolean equals(Object obj) {
 }
 
 /* (non-Javadoc)
+ * @see org.eclipse.jdt.core.search.TypeNameMatch#getAccessibility()
+ */
+public int getAccessibility() {
+	return this.accessibility;
+}
+
+/* (non-Javadoc)
  * @see org.eclipse.jdt.core.search.TypeNameMatch#getModifiers()
  */
 public int getModifiers() {
@@ -73,6 +82,15 @@ public int hashCode() {
 }
 
 /**
+ * Sets the accessibility of the accepted match.
+ * 
+ * @param accessibility the accessibility of the current match
+ */
+public void setAccessibility(int accessibility) {
+	this.accessibility = accessibility;
+}
+
+/**
  * Set modifiers of the matched type.
  *
  * @param modifiers the modifiers of the matched type.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/PatternSearchJob.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/PatternSearchJob.java
index d3dd62c..459730c 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/PatternSearchJob.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/PatternSearchJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,7 +88,6 @@ public String getJobFamily() {
 public boolean search(Index index, IProgressMonitor progressMonitor) {
 	if (index == null) return COMPLETE;
 	if (progressMonitor != null && progressMonitor.isCanceled()) throw new OperationCanceledException();
-
 	ReadWriteMonitor monitor = index.monitor;
 	if (monitor == null) return COMPLETE; // index got deleted since acquired
 	try {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/TypeNameMatchRequestorWrapper.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/TypeNameMatchRequestorWrapper.java
index 9e3d8cd..81a74da 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/TypeNameMatchRequestorWrapper.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/TypeNameMatchRequestorWrapper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,22 +7,28 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for bug 215139
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.search;
 
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IAccessRule;
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.TypeNameMatchRequestor;
 import org.eclipse.jdt.core.search.TypeNameRequestor;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.core.Openable;
 import org.eclipse.jdt.internal.core.PackageFragmentRoot;
 import org.eclipse.jdt.internal.core.util.HandleFactory;
@@ -66,6 +72,8 @@ public class TypeNameMatchRequestorWrapper implements IRestrictedAccessTypeReque
 	 * Cache package handles to optimize memory.
 	 */
 	private HashtableOfArrayToObject packageHandles;
+	private Object lastProject;
+	private long complianceValue;
 
 public TypeNameMatchRequestorWrapper(TypeNameMatchRequestor requestor, IJavaSearchScope scope) {
 	this.requestor = requestor;
@@ -79,6 +87,8 @@ public TypeNameMatchRequestorWrapper(TypeNameMatchRequestor requestor, IJavaSear
  * @see org.eclipse.jdt.internal.core.search.IRestrictedAccessTypeRequestor#acceptType(int, char[], char[], char[][], java.lang.String, org.eclipse.jdt.internal.compiler.env.AccessRestriction)
  */
 public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path, AccessRestriction access) {
+
+	// Get type
 	try {
 		IType type = null;
 		if (this.handleFactory != null) {
@@ -107,8 +117,30 @@ public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName,
 				? createTypeFromPath(path, new String(simpleTypeName), enclosingTypeNames)
 				: createTypeFromJar(path, separatorIndex);
 		}
+
+		// Accept match if the type has been found
 		if (type != null) {
-			this.requestor.acceptTypeNameMatch(new JavaSearchTypeNameMatch(type, modifiers));
+			// hierarchy scopes require one more check:
+			if (!(this.scope instanceof HierarchyScope) || ((HierarchyScope)this.scope).enclosesFineGrained(type)) {
+
+				// Create the match
+				final JavaSearchTypeNameMatch match = new JavaSearchTypeNameMatch(type, modifiers);
+
+				// Update match accessibility
+				if(access != null) {
+					switch (access.getProblemId()) {
+						case IProblem.ForbiddenReference:
+							match.setAccessibility(IAccessRule.K_NON_ACCESSIBLE);
+							break;
+						case IProblem.DiscouragedReference:
+							match.setAccessibility(IAccessRule.K_DISCOURAGED);
+							break;
+					}
+				}
+
+				// Accept match
+				this.requestor.acceptTypeNameMatch(match);
+			}
 		}
 	} catch (JavaModelException e) {
 		// skip
@@ -141,6 +173,18 @@ private IType createTypeFromJar(String resourcePath, int separatorIndex) throws
 	IPackageFragment pkgFragment= (IPackageFragment) this.packageHandles.get(pkgName);
 	if (pkgFragment == null) {
 		pkgFragment= ((PackageFragmentRoot) this.lastPkgFragmentRoot).getPackageFragment(pkgName);
+		// filter org.apache.commons.lang.enum package for projects above 1.5 
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=317264
+		if (length == 5 && pkgName[4].equals("enum")) { //$NON-NLS-1$
+			IJavaProject proj = (IJavaProject)pkgFragment.getAncestor(IJavaElement.JAVA_PROJECT);
+			if (!proj.equals(this.lastProject)) {
+				String complianceStr = proj.getOption(CompilerOptions.OPTION_Source, true);
+				this.complianceValue = CompilerOptions.versionToJdkLevel(complianceStr);
+				this.lastProject = proj;
+			}
+			if (this.complianceValue >= ClassFileConstants.JDK1_5)
+				return null;
+		} 
 		this.packageHandles.put(pkgName, pkgFragment);
 	}
 	return pkgFragment.getClassFile(simpleNames[length]).getType();
@@ -187,9 +231,10 @@ private IType createTypeFromPath(String resourcePath, String simpleTypeName, cha
 			type = type.getType(simpleTypeName);
 		}
 		return type;
-	} else {
+	} else if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(simpleName)){
 		IClassFile classFile= pkgFragment.getClassFile(simpleName);
 		return classFile.getType();
 	}
+	return null;
 }
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
index 4b55855..168904f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,10 +22,15 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.compiler.InvalidInputException;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.parser.Scanner;
+import org.eclipse.jdt.internal.compiler.parser.TerminalTokens;
 import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
 import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.jdt.internal.core.JavaModelManager;
 import org.eclipse.jdt.internal.core.index.Index;
@@ -36,6 +41,7 @@ class AddJarFileToIndex extends IndexRequest {
 
 	private static final char JAR_SEPARATOR = IJavaSearchScope.JAR_FILE_ENTRY_SEPARATOR.charAt(0);
 	IFile resource;
+	Scanner scanner;
 
 	public AddJarFileToIndex(IFile resource, IndexManager manager) {
 		super(resource.getFullPath(), manager);
@@ -153,7 +159,8 @@ class AddJarFileToIndex extends IndexRequest {
 						// iterate each entry to index it
 						ZipEntry ze = (ZipEntry) e.nextElement();
 						String zipEntryName = ze.getName();
-						if (Util.isClassFileName(zipEntryName))
+						if (Util.isClassFileName(zipEntryName) && isValidPackageNameForClass(zipEntryName))
+								// the class file may not be there if the package name is not valid
 							indexedFileNames.put(zipEntryName, EXISTS);
 					}
 					boolean needToReindex = indexedFileNames.elementSize != max; // a new file was added
@@ -195,7 +202,10 @@ class AddJarFileToIndex extends IndexRequest {
 
 					// iterate each entry to index it
 					ZipEntry ze = (ZipEntry) e.nextElement();
-					if (Util.isClassFileName(ze.getName())) {
+					String zipEntryName = ze.getName();
+					if (Util.isClassFileName(zipEntryName) && 
+							isValidPackageNameForClass(zipEntryName)) {
+						// index only classes coming from valid packages - https://bugs.eclipse.org/bugs/show_bug.cgi?id=293861
 						final byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ze, zip);
 						JavaSearchDocument entryDocument = new JavaSearchDocument(ze, zipFilePath, classFileBytes, participant);
 						this.manager.indexDocument(entryDocument, participant, index, this.containerPath);
@@ -228,6 +238,30 @@ class AddJarFileToIndex extends IndexRequest {
 		if (this.resource != null)
 			return super.getJobFamily();
 		return this.containerPath.toOSString(); // external jar
+	}	
+	private  boolean isValidPackageNameForClass(String className) {
+		char[] classNameArray = className.toCharArray();
+		if (this.scanner == null)
+			this.scanner = new Scanner(false /* comment */, true /* whitespace */, false /* nls */,
+					ClassFileConstants.JDK1_3/* sourceLevel */, null/* taskTag */, null/* taskPriorities */, true /* taskCaseSensitive */);
+		this.scanner.setSource(classNameArray); 
+		this.scanner.eofPosition = classNameArray.length - SuffixConstants.SUFFIX_CLASS.length;
+		try {
+			if (this.scanner.scanIdentifier() == TerminalTokens.TokenNameIdentifier) {
+				while (this.scanner.eofPosition > this.scanner.currentPosition) {
+					if (this.scanner.getNextChar() != '/' || this.scanner.eofPosition <= this.scanner.currentPosition) {
+						return false;
+					}
+					if (this.scanner.scanIdentifier() != TerminalTokens.TokenNameIdentifier) {
+						return false;
+					}
+				}
+				return true;
+			}
+		} catch (InvalidInputException e) {
+			// invalid class name
+		}
+		return false;
 	}
 	protected Integer updatedIndexState() {
 		return IndexManager.REBUILDING_STATE;
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
index c88495c..df800ed 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,17 +47,22 @@ public class IndexManager extends JobManager implements IIndexConstants {
 
 	/* need to save ? */
 	private boolean needToSave = false;
-	private static final CRC32 checksumCalculator = new CRC32();
 	private IPath javaPluginLocation = null;
 
 	/* can only replace a current state if its less than the new one */
 	// key = indexLocation path, value = index state integer
 	private SimpleLookupTable indexStates = null;
 	private File savedIndexNamesFile = new File(getSavedIndexesDirectory(), "savedIndexNames.txt"); //$NON-NLS-1$
+	private File participantIndexNamesFile = new File(getSavedIndexesDirectory(), "participantsIndexNames.txt"); //$NON-NLS-1$
+	private boolean javaLikeNamesChanged = true;
 	public static final Integer SAVED_STATE = new Integer(0);
 	public static final Integer UPDATING_STATE = new Integer(1);
 	public static final Integer UNKNOWN_STATE = new Integer(2);
 	public static final Integer REBUILDING_STATE = new Integer(3);
+	
+	// search participants who register indexes with the index manager
+	private SimpleLookupTable participantsContainers = null;
+	private boolean participantUpdated = false;
 
 	// Debug
 	public static boolean DEBUG = false;
@@ -133,7 +138,7 @@ public IPath computeIndexLocation(IPath containerPath) {
 	IPath indexLocation = (IPath) this.indexLocations.get(containerPath);
 	if (indexLocation == null) {
 		String pathString = containerPath.toOSString();
-		checksumCalculator.reset();
+		CRC32 checksumCalculator = new CRC32();
 		checksumCalculator.update(pathString.getBytes());
 		String fileName = Long.toString(checksumCalculator.getValue()) + ".index"; //$NON-NLS-1$
 		if (VERBOSE)
@@ -295,6 +300,9 @@ public Index[] getIndexes(IPath[] locations, IProgressMonitor progressMonitor) {
 	int length = locations.length;
 	Index[] locatedIndexes = new Index[length];
 	int count = 0;
+	if (this.javaLikeNamesChanged) {
+		this.javaLikeNamesChanged = hasJavaLikeNamesChanged();
+	}
 	for (int i = 0; i < length; i++) {
 		if (progressMonitor != null && progressMonitor.isCanceled()) {
 			throw new OperationCanceledException();
@@ -305,12 +313,45 @@ public Index[] getIndexes(IPath[] locations, IProgressMonitor progressMonitor) {
 		if (index == null) {
 			// only need containerPath if the index must be built
 			IPath containerPath = (IPath) this.indexLocations.keyForValue(indexLocation);
-			if (containerPath != null) // sanity check
+			if (containerPath != null) {// sanity check
 				index = getIndex(containerPath, indexLocation, true /*reuse index file*/, false /*do not create if none*/);
+				if (index != null && this.javaLikeNamesChanged && !index.isIndexForJar()) {
+					// When a change in java like names extension has been detected, all
+					// non jar files indexes (i.e. containing sources) need to be rebuilt.
+					// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=286379
+					File indexFile = index.getIndexFile();
+					if (indexFile.exists()) {
+						if (DEBUG)
+							Util.verbose("Change in javaLikeNames - removing index file for " + containerPath ); //$NON-NLS-1$
+						indexFile.delete();
+					}
+					this.indexes.put(indexLocation, null);
+					rebuildIndex(indexLocation, containerPath);
+					index = null;
+				}
+			} else {
+				if (!getJavaPluginWorkingLocation().isPrefixOf(indexLocation)) { // the index belongs to non-jdt search participant
+					if (indexLocation.toFile().exists()) { 
+						try {
+							IPath container = getParticipantsContainer(indexLocation);
+							if (container != null) {
+								index = new Index(indexLocation.toOSString(), container.toOSString(), true /*reuse index file*/);
+								this.indexes.put(indexLocation, index);
+							}
+						} catch (IOException e) {
+							// ignore
+						}
+					} 
+				}
+			}
 		}
 		if (index != null)
 			locatedIndexes[count++] = index; // only consider indexes which are ready
 	}
+	if (this.javaLikeNamesChanged) {
+		writeJavaLikeNamesFile();
+		this.javaLikeNamesChanged = false;
+	}
 	if (count < length) {
 		System.arraycopy(locatedIndexes, 0, locatedIndexes=new Index[count], 0, count);
 	}
@@ -340,10 +381,20 @@ private SimpleLookupTable getIndexStates() {
 			}
 		}
 	} else {
+		// All the index files are getting deleted and hence there is no need to 
+		// further check for change in javaLikeNames. 
+		writeJavaLikeNamesFile();
+		this.javaLikeNamesChanged = false;
 		deleteIndexFiles();
 	}
 	return this.indexStates;
 }
+private IPath getParticipantsContainer(IPath indexLocation) {
+	if (this.participantsContainers == null) {
+		readParticipantsIndexNamesFile();
+	}
+	return (IPath)this.participantsContainers.get(indexLocation);
+}
 private IPath getJavaPluginWorkingLocation() {
 	if (this.javaPluginLocation != null) return this.javaPluginLocation;
 
@@ -353,6 +404,49 @@ private IPath getJavaPluginWorkingLocation() {
 private File getSavedIndexesDirectory() {
 	return new File(getJavaPluginWorkingLocation().toOSString());
 }
+/*
+ * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=286379
+ * Returns true if there is a change in javaLikeNames since it
+ * has been last stored. 
+ * The javaLikeNames stored in the file javaLikeNames.txt 
+ * is compared with the current javaLikeNames and if there is a change, this 
+ * function returns true. If the file javaLikeNames.txt doesn't exist and there 
+ * is only one javaLikeName (.java), then this returns false so that no-reindexing 
+ * happens. 
+ */
+private boolean hasJavaLikeNamesChanged() {
+	char[][] currentNames = Util.getJavaLikeExtensions();
+	int current = currentNames.length;
+	char[][] prevNames = readJavaLikeNamesFile();
+	if (prevNames == null) {
+		if (VERBOSE && current != 1)
+			Util.verbose("No Java like names found and there is atleast one non-default javaLikeName", System.err); //$NON-NLS-1$
+		return (current != 1); //Ignore if only java
+	}
+	int prev = prevNames.length;
+	if (current != prev) {
+		if (VERBOSE)
+			Util.verbose("Java like names have changed", System.err); //$NON-NLS-1$
+		return true;
+	}
+	if (current > 1) {
+		// Sort the current java like names. 
+		// Copy the array to avoid modifying the Util static variable
+		System.arraycopy(currentNames, 0, currentNames = new char[current][], 0, current);
+		Util.sort(currentNames);
+	}
+	
+	// The JavaLikeNames would have been sorted before getting stored in the file,
+	// hence just do a direct compare.
+	for (int i = 0; i < current; i++) {
+		if (!CharOperation.equals(currentNames[i],prevNames[i])) {
+			if (VERBOSE)
+				Util.verbose("Java like names have changed", System.err); //$NON-NLS-1$
+			return true;
+		}
+	}
+	return false;
+}
 public void indexDocument(SearchDocument searchDocument, SearchParticipant searchParticipant, Index index, IPath indexLocation) {
 	try {
 		searchDocument.setIndex(index);
@@ -457,6 +551,23 @@ protected void notifyIdle(long idlingTime){
 public String processName(){
 	return Messages.process_name;
 }
+private char[][] readJavaLikeNamesFile() {
+	try {
+		String pathName = getJavaPluginWorkingLocation().toOSString();	
+		File javaLikeNamesFile = new File(pathName, "javaLikeNames.txt"); //$NON-NLS-1$
+		if (!javaLikeNamesFile.exists())
+			return null;
+		char[] javaLikeNames = org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(javaLikeNamesFile, null);
+		if (javaLikeNames.length > 0) {
+			char[][] names = CharOperation.splitOn('\n', javaLikeNames);
+			return names;
+		}
+	} catch (IOException ignored) {
+		if (VERBOSE)
+			Util.verbose("Failed to read javaLikeNames file"); //$NON-NLS-1$
+	}
+	return null;
+}
 private void rebuildIndex(IPath indexLocation, IPath containerPath) {
 	Object target = JavaModel.getTarget(containerPath, true);
 	if (target == null) return;
@@ -575,6 +686,10 @@ public synchronized void removeIndexPath(IPath path) {
 		for (int i = 0; i < count; i++)
 			this.indexes.removeKey(locations[i]);
 		removeIndexesState(locations);
+		if (this.participantsContainers != null && this.participantsContainers.get(path.toOSString()) != null) {
+			this.participantsContainers.removeKey(path.toOSString());	
+			writeParticipantsIndexNamesFile();
+		}
 	}
 }
 /**
@@ -716,6 +831,10 @@ public void saveIndexes() {
 			monitor.exitRead();
 		}
 	}
+	if (this.participantsContainers != null && this.participantUpdated) {
+		writeParticipantsIndexNamesFile();
+		this.participantUpdated = false;
+	}
 	this.needToSave = !allSaved;
 }
 public void scheduleDocumentIndexing(final SearchDocument searchDocument, IPath container, final IPath indexLocation, final SearchParticipant searchParticipant) {
@@ -775,6 +894,28 @@ private char[][] readIndexState(String dirOSString) {
 	}
 	return null;
 }
+private void readParticipantsIndexNamesFile() {
+	SimpleLookupTable containers = new SimpleLookupTable(3);
+	try {
+		char[] participantIndexNames = org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(this.participantIndexNamesFile, null);
+		if (participantIndexNames.length > 0) {
+			char[][] names = CharOperation.splitOn('\n', participantIndexNames);
+			if (names.length >= 3) {
+				// First line is DiskIndex signature  (see writeParticipantsIndexNamesFile())
+				if (DiskIndex.SIGNATURE.equals(new String(names[0]))) {					
+					for (int i = 1, l = names.length-1 ; i < l ; i+=2) {
+						containers.put(new Path(new String(names[i])), new Path(new String(names[i+1])));
+					}
+				}				
+			}
+		}	
+	} catch (IOException ignored) {
+		if (VERBOSE)
+			Util.verbose("Failed to read participant index file names"); //$NON-NLS-1$
+	}
+	this.participantsContainers = containers;
+	return;
+}
 private synchronized void removeIndexesState(IPath[] locations) {
 	getIndexStates(); // ensure the states are initialized
 	int length = locations.length;
@@ -821,6 +962,79 @@ private synchronized void updateIndexState(IPath indexLocation, Integer indexSta
 	}
 
 }
+public void updateParticipant(IPath indexLocation, IPath containerPath) {
+	if (this.participantsContainers == null) {
+		readParticipantsIndexNamesFile();
+	} 
+	if (this.participantsContainers.get(indexLocation) == null) {
+		this.participantsContainers.put(indexLocation, containerPath);
+		this.participantUpdated  = true;
+	}
+}
+private void writeJavaLikeNamesFile() {
+	BufferedWriter writer = null;
+	String pathName = getJavaPluginWorkingLocation().toOSString();
+	try {		
+		char[][] currentNames = Util.getJavaLikeExtensions();
+		int length = currentNames.length;
+		if (length > 1) {
+			// Sort the current java like names. 
+			// Copy the array to avoid modifying the Util static variable
+			System.arraycopy(currentNames, 0, currentNames=new char[length][], 0, length);
+			Util.sort(currentNames);
+		}
+		File javaLikeNamesFile = new File(pathName, "javaLikeNames.txt"); //$NON-NLS-1$
+		writer = new BufferedWriter(new FileWriter(javaLikeNamesFile));
+		for (int i = 0; i < length-1; i++) {
+			writer.write(currentNames[i]);
+			writer.write('\n');
+		}
+		if (length > 0) 
+			writer.write(currentNames[length-1]);
+		
+	} catch (IOException ignored) {
+		if (VERBOSE)
+			Util.verbose("Failed to write javaLikeNames file", System.err); //$NON-NLS-1$
+	} finally {
+		if (writer != null) {
+			try {
+				writer.close();
+			} catch (IOException e) {
+				// ignore
+			}
+		}
+	}
+}
+private void writeParticipantsIndexNamesFile() {
+	BufferedWriter writer = null;
+	try {
+		writer = new BufferedWriter(new FileWriter(this.participantIndexNamesFile));
+		writer.write(DiskIndex.SIGNATURE);
+		writer.write('\n');
+		Object[] indexFiles = this.participantsContainers.keyTable;
+		Object[] containers = this.participantsContainers.valueTable;
+		for (int i = 0, l = indexFiles.length; i < l; i++) {
+			IPath indexFile = (IPath)indexFiles[i];
+			if (indexFile != null) {
+				writer.write(indexFile.toOSString());
+				writer.write('\n');
+				writer.write(((IPath)containers[i]).toOSString());
+				writer.write('\n');
+			}
+		}
+	} catch (IOException ignored) {
+		if (VERBOSE)
+			Util.verbose("Failed to write participant index file names", System.err); //$NON-NLS-1$
+	} finally {
+		if (writer != null) {
+			try {
+				writer.close();
+			} catch (IOException e) {
+				// ignore
+			}
+		}
+	}
+}
 private void writeSavedIndexNamesFile() {
 	BufferedWriter writer = null;
 	try {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/RemoveFolderFromIndex.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/RemoveFolderFromIndex.java
index 174d15f..7043f69 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/RemoveFolderFromIndex.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/RemoveFolderFromIndex.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,14 +24,12 @@ class RemoveFolderFromIndex extends IndexRequest {
 	IPath folderPath;
 	char[][] inclusionPatterns;
 	char[][] exclusionPatterns;
-	IProject project;
 
 	public RemoveFolderFromIndex(IPath folderPath, char[][] inclusionPatterns, char[][] exclusionPatterns, IProject project, IndexManager manager) {
 		super(project.getFullPath(), manager);
 		this.folderPath = folderPath;
 		this.inclusionPatterns = inclusionPatterns;
 		this.exclusionPatterns = exclusionPatterns;
-		this.project = project;
 	}
 	public boolean execute(IProgressMonitor progressMonitor) {
 
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IntersectingPattern.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IntersectingPattern.java
index 37dedb5..87bd73f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IntersectingPattern.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/IntersectingPattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,7 +71,7 @@ public void findIndexMatches(Index index, IndexQueryRequestor requestor, SearchP
 	Object[] names = intersectedNames.values;
 	for (int i = 0, l = names.length; i < l; i++)
 		if (names[i] != null)
-			acceptMatch((String) names[i], containerPath, separator, null/*no pattern*/, requestor, participant, scope); // AndPatterns cannot provide the decoded result
+			acceptMatch((String) names[i], containerPath, separator, null/*no pattern*/, requestor, participant, scope, progressMonitor); // AndPatterns cannot provide the decoded result
 }
 /**
  * Returns whether another query must be done.
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
index 54731f8..661b08b 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -436,35 +436,48 @@ protected IJavaElement createHandle(AbstractMethodDeclaration method, IJavaEleme
 		// fall thru if its a constructor with a synthetic argument... find it the slower way
 		ClassFileReader reader = classFileReader(type);
 		if (reader != null) {
-			IBinaryMethod[] methods = reader.getMethods();
-			if (methods != null) {
-				// build arguments names
-				boolean firstIsSynthetic = false;
-				if (reader.isMember() && method.isConstructor() && !Flags.isStatic(reader.getModifiers())) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=48261
-					firstIsSynthetic = true;
-					argCount++;
+			// build arguments names
+			boolean firstIsSynthetic = false;
+			if (reader.isMember() && method.isConstructor() && !Flags.isStatic(reader.getModifiers())) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=48261
+				firstIsSynthetic = true;
+				argCount++;
+			}
+			char[][] argumentTypeNames = new char[argCount][];
+			for (int i = 0; i < argCount; i++) {
+				char[] typeName = null;
+				if (i == 0 && firstIsSynthetic) {
+					typeName = type.getDeclaringType().getFullyQualifiedName().toCharArray();
+				} else if (arguments != null) {
+					TypeReference typeRef = arguments[firstIsSynthetic ? i - 1 : i].type;
+					typeName = CharOperation.concatWith(typeRef.getTypeName(), '.');
+					for (int k = 0, dim = typeRef.dimensions(); k < dim; k++)
+						typeName = CharOperation.concat(typeName, new char[] {'[', ']'});
 				}
-				char[][] argumentTypeNames = new char[argCount][];
-				for (int i = 0; i < argCount; i++) {
-					char[] typeName = null;
-					if (i == 0 && firstIsSynthetic) {
-						typeName = type.getDeclaringType().getFullyQualifiedName().toCharArray();
-					} else if (arguments != null) {
-						TypeReference typeRef = arguments[firstIsSynthetic ? i - 1 : i].type;
-						typeName = CharOperation.concatWith(typeRef.getTypeName(), '.');
-						for (int k = 0, dim = typeRef.dimensions(); k < dim; k++)
-							typeName = CharOperation.concat(typeName, new char[] {'[', ']'});
-					}
-					if (typeName == null) {
-						// invalid type name
-						return null;
+				if (typeName == null) {
+					// invalid type name
+					return null;
+				}
+				argumentTypeNames[i] = typeName;
+			}
+			// return binary method
+			IMethod binaryMethod = createBinaryMethodHandle(type, method.selector, argumentTypeNames);
+			if (binaryMethod == null) {
+				// when first attempt fails, try with similar matches if any...
+				PossibleMatch similarMatch = this.currentPossibleMatch.getSimilarMatch();
+				while (similarMatch != null) {
+					type = ((ClassFile)similarMatch.openable).getType();
+					binaryMethod = createBinaryMethodHandle(type, method.selector, argumentTypeNames);
+					if (binaryMethod != null) {
+						return binaryMethod;
 					}
-					argumentTypeNames[i] = typeName;
+					similarMatch = similarMatch.getSimilarMatch();
 				}
-
-				// return binary method
-				return createBinaryMethodHandle(type, method.selector, argumentTypeNames);
 			}
+			return binaryMethod;
+		}
+		if (BasicSearchEngine.VERBOSE) {
+			System.out.println("Not able to createHandle for the method " + //$NON-NLS-1$
+					CharOperation.charToString(method.selector) + " May miss some results");  //$NON-NLS-1$
 		}
 		return null;
 	}
@@ -712,8 +725,36 @@ protected IType createTypeHandle(String simpleTypeName) {
 	return classFile.getType();
 }
 protected boolean encloses(IJavaElement element) {
-	return element != null && this.scope.encloses(element);
+	if (element != null) {
+		if (this.scope instanceof HierarchyScope)
+			return ((HierarchyScope)this.scope).encloses(element, this.progressMonitor);
+		else 
+			return this.scope.encloses(element);
+	}
+	return false;
 }
+private boolean filterEnum(SearchMatch match) {
+	
+	// filter org.apache.commons.lang.enum package for projects above 1.5 
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317264	
+	IJavaElement element = (IJavaElement)match.getElement();
+	PackageFragment pkg = (PackageFragment)element.getAncestor(IJavaElement.PACKAGE_FRAGMENT);
+	if (pkg != null) {
+		// enum was found in org.apache.commons.lang.enum at index 4
+		if (pkg.names.length == 5 && pkg.names[4].equals("enum")) {  //$NON-NLS-1$
+			if (this.options == null) {
+				IJavaProject proj = (IJavaProject)pkg.getAncestor(IJavaElement.JAVA_PROJECT);
+				String complianceStr = proj.getOption(CompilerOptions.OPTION_Source, true);
+				if (CompilerOptions.versionToJdkLevel(complianceStr) >= ClassFileConstants.JDK1_5)
+					return true;
+			} else if (this.options.sourceLevel >= ClassFileConstants.JDK1_5) {
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
 /* (non-Javadoc)
  * Return info about last type argument of a parameterized type reference.
  * These info are made of concatenation of 2 int values which are respectively
@@ -936,7 +977,7 @@ public void initialize(JavaProject project, int possibleMatchSize) throws JavaMo
 
 	// create lookup environment
 	Map map = project.getOptions(true);
-	map.put(CompilerOptions.OPTION_TaskTags, ""); //$NON-NLS-1$
+	map.put(CompilerOptions.OPTION_TaskTags, org.eclipse.jdt.internal.compiler.util.Util.EMPTY_STRING);
 	this.options = new CompilerOptions(map);
 	ProblemReporter problemReporter =
 		new ProblemReporter(
@@ -1130,7 +1171,7 @@ public void locateMatches(SearchDocument[] searchDocuments) throws CoreException
 			this.progressMonitor.beginTask("", searchDocuments.length); //$NON-NLS-1$
 		}
 
-		// initialize pattern for polymorphic search (ie. method reference pattern)
+		// initialize pattern for polymorphic search (i.e. method reference pattern)
 		this.patternLocator.initializePolymorphicSearch(this);
 
 		JavaProject previousJavaProject = null;
@@ -1683,6 +1724,12 @@ protected void report(SearchMatch match) throws CoreException {
 		}
 		return;
 	}
+	if (filterEnum(match)){
+		if (BasicSearchEngine.VERBOSE) {
+			System.out.println("Filtered package with name enum"); //$NON-NLS-1$
+		}
+		return;
+	}
 	long start = -1;
 	if (BasicSearchEngine.VERBOSE) {
 		start = System.currentTimeMillis();
@@ -1706,21 +1753,23 @@ protected void report(SearchMatch match) throws CoreException {
 		} catch (Exception e) {
 			// it's just for debug purposes... ignore all exceptions in this area
 		}
-		if (match instanceof TypeReferenceMatch) {
+		if (match instanceof ReferenceMatch) {
 			try {
-				TypeReferenceMatch typeRefMatch = (TypeReferenceMatch) match;
-				JavaElement local = (JavaElement) typeRefMatch.getLocalElement();
+				ReferenceMatch refMatch = (ReferenceMatch) match;
+				JavaElement local = (JavaElement) refMatch.getLocalElement();
 				if (local != null) {
 					System.out.println("\tLocal element: "+ local.toStringWithAncestors()); //$NON-NLS-1$
 				}
-				IJavaElement[] others = typeRefMatch.getOtherElements();
-				if (others != null) {
-					int length = others.length;
-					if (length > 0) {
-						System.out.println("\tOther elements:"); //$NON-NLS-1$
-						for (int i=0; i<length; i++) {
-							JavaElement other = (JavaElement) others[i];
-							System.out.println("\t\t- "+ other.toStringWithAncestors()); //$NON-NLS-1$
+				if (match instanceof TypeReferenceMatch) {
+					IJavaElement[] others = ((TypeReferenceMatch) refMatch).getOtherElements();
+					if (others != null) {
+						int length = others.length;
+						if (length > 0) {
+							System.out.println("\tOther elements:"); //$NON-NLS-1$
+							for (int i=0; i<length; i++) {
+								JavaElement other = (JavaElement) others[i];
+								System.out.println("\t\t- "+ other.toStringWithAncestors()); //$NON-NLS-1$
+							}
 						}
 					}
 				}
@@ -1812,7 +1861,7 @@ protected void reportAccurateParameterizedMethodReference(SearchMatch match, AST
 	if (match.getRule() == 0) return;
 	if (!encloses((IJavaElement)match.getElement())) return;
 
-	// If there's type arguments, look for end (ie. char '>') of last one.
+	// If there's type arguments, look for end (i.e. char '>') of last one.
 	int start = match.getOffset();
 	if (typeArguments != null && typeArguments.length > 0) {
 		boolean isErasureMatch= (this.pattern instanceof OrPattern) ? ((OrPattern)this.pattern).isErasureMatch() : ((JavaSearchPattern)this.pattern).isErasureMatch();
@@ -1868,7 +1917,7 @@ protected void reportAccurateParameterizedTypeReference(SearchMatch match, TypeR
 	if (match.getRule() == 0) return;
 	if (!encloses((IJavaElement)match.getElement())) return;
 
-	// If there's type arguments, look for end (ie. char '>') of last one.
+	// If there's type arguments, look for end (i.e. char '>') of last one.
 	int end = typeRef.sourceEnd;
 	if (typeArguments != null) {
 
@@ -2060,7 +2109,7 @@ protected void reportBinaryMemberDeclaration(IResource resource, IMember binaryM
 }
 /**
  * Visit the given method declaration and report the nodes that match exactly the
- * search pattern (ie. the ones in the matching nodes set)
+ * search pattern (i.e. the ones in the matching nodes set)
  * Note that the method declaration has already been checked.
  */
 protected void reportMatching(AbstractMethodDeclaration method, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) throws CoreException {
@@ -2130,7 +2179,9 @@ protected void reportMatching(AbstractMethodDeclaration method, TypeDeclaration
 		if (enclosingElement == null) {
 			enclosingElement = createHandle(method, parent);
 		}
-		reportMatching(typeParameters, enclosingElement, parent, method.binding, nodeSet);
+		if (enclosingElement != null) {
+			reportMatching(typeParameters, enclosingElement, parent, method.binding, nodeSet);
+		}
 	}
 
 	// report annotations
@@ -2138,7 +2189,9 @@ protected void reportMatching(AbstractMethodDeclaration method, TypeDeclaration
 		if (enclosingElement == null) {
 			enclosingElement = createHandle(method, parent);
 		}
-		reportMatching(method.annotations, enclosingElement, null, method.binding, nodeSet, true, true);
+		if (enclosingElement != null) {
+			reportMatching(method.annotations, enclosingElement, null, method.binding, nodeSet, true, true);
+		}
 	}
 
 	// references in this method
@@ -2187,14 +2240,24 @@ protected void reportMatching(AbstractMethodDeclaration method, TypeDeclaration
 protected void reportMatching(Annotation[] annotations, IJavaElement enclosingElement, IJavaElement[] otherElements, Binding elementBinding, MatchingNodeSet nodeSet, boolean matchedContainer, boolean enclosesElement) throws CoreException {
 	for (int i=0, al=annotations.length; i<al; i++) {
 		Annotation annotationType = annotations[i];
-		IJavaElement localElement = null;
+		IJavaElement localAnnotation = null;
+		IJavaElement[] otherAnnotations = null;
+		int length = otherElements == null ? 0 : otherElements.length;
+		boolean handlesCreated = false;
 
 		// Look for annotation type ref
 		TypeReference typeRef = annotationType.type;
 		Integer level = (Integer) nodeSet.matchingNodes.removeKey(typeRef);
 		if (level != null && enclosesElement && matchedContainer) {
-			localElement = createHandle(annotationType, (IAnnotatable) enclosingElement);
-			this.patternLocator.matchReportReference(typeRef, enclosingElement, localElement, otherElements, elementBinding, level.intValue(), this);
+			localAnnotation = createHandle(annotationType, (IAnnotatable) enclosingElement);
+			if (length > 0) {
+				otherAnnotations = new IJavaElement[length];
+				for (int o=0; o<length; o++) {
+					otherAnnotations[o] = createHandle(annotationType, (IAnnotatable) otherElements[o]);
+				}
+			}
+			handlesCreated = true;
+			this.patternLocator.matchReportReference(typeRef, enclosingElement, localAnnotation, otherAnnotations, elementBinding, level.intValue(), this);
 		}
 
 		// Look for attribute ref
@@ -2204,10 +2267,17 @@ protected void reportMatching(Annotation[] annotations, IJavaElement enclosingEl
 			level = (Integer) nodeSet.matchingNodes.removeKey(pair);
 			if (level != null && enclosesElement) {
 				ASTNode reference = (annotationType instanceof SingleMemberAnnotation) ? (ASTNode) annotationType: pair;
-				if (localElement == null) {
-					localElement = createHandle(annotationType, (IAnnotatable) enclosingElement);
+				if (!handlesCreated) {
+					localAnnotation = createHandle(annotationType, (IAnnotatable) enclosingElement);
+					if (length > 0) {
+						otherAnnotations = new IJavaElement[length];
+						for (int o=0; o<length; o++) {
+							otherAnnotations[o] = createHandle(annotationType, (IAnnotatable) otherElements[o]);
+						}
+					}
+					handlesCreated = true;
 				}
-				this.patternLocator.matchReportReference(reference, enclosingElement, localElement, otherElements, pair.binding, level.intValue(), this);
+				this.patternLocator.matchReportReference(reference, enclosingElement, localAnnotation, otherAnnotations, pair.binding, level.intValue(), this);
 			}
 		}
 
@@ -2223,10 +2293,17 @@ protected void reportMatching(Annotation[] annotations, IJavaElement enclosingEl
 					ASTNode node = nodes[j];
 					level = (Integer) nodeSet.matchingNodes.removeKey(node);
 					if (enclosesElement) {
-						if (localElement == null) {
-							localElement = createHandle(annotationType, (IAnnotatable) enclosingElement);
+						if (!handlesCreated) {
+							localAnnotation = createHandle(annotationType, (IAnnotatable) enclosingElement);
+							if (length > 0) {
+								otherAnnotations = new IJavaElement[length];
+								for (int o=0; o<length; o++) {
+									otherAnnotations[o] = createHandle(annotationType, (IAnnotatable) otherElements[o]);
+								}
+							}
+							handlesCreated = true;
 						}
-						this.patternLocator.matchReportReference(node, enclosingElement, localElement, otherElements, elementBinding, level.intValue(), this);
+						this.patternLocator.matchReportReference(node, enclosingElement, localAnnotation, otherAnnotations, elementBinding, level.intValue(), this);
 					}
 				}
 			}
@@ -2347,7 +2424,7 @@ protected void reportMatching(CompilationUnitDeclaration unit, boolean mustResol
 }
 /**
  * Visit the given field declaration and report the nodes that match exactly the
- * search pattern (ie. the ones in the matching nodes set)
+ * search pattern (i.e. the ones in the matching nodes set)
  */
 protected void reportMatching(FieldDeclaration field, FieldDeclaration[] otherFields, TypeDeclaration type, IJavaElement parent, int accuracy, boolean typeInHierarchy, MatchingNodeSet nodeSet) throws CoreException {
 	IJavaElement enclosingElement = null;
@@ -2475,7 +2552,7 @@ protected void reportMatching(FieldDeclaration field, FieldDeclaration[] otherFi
 }
 /**
  * Visit the given type declaration and report the nodes that match exactly the
- * search pattern (ie. the ones in the matching nodes set)
+ * search pattern (i.e. the ones in the matching nodes set)
  */
 protected void reportMatching(TypeDeclaration type, IJavaElement parent, int accuracy, MatchingNodeSet nodeSet, int occurrenceCount) throws CoreException {
 	// create type handle
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
index 7af6ecb..b7ee6fd 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -213,8 +213,8 @@ protected void consumeCastExpressionLL1() {
 	super.consumeCastExpressionLL1();
 	if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) {
 		CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr];
-		if (castExpression.type instanceof Reference) {
-			this.patternLocator.match((Reference) castExpression.type, this.nodeSet);
+		if (castExpression.type instanceof TypeReference) {
+			this.patternLocator.match((TypeReference) castExpression.type, this.nodeSet);
         }
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MemberDeclarationVisitor.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MemberDeclarationVisitor.java
index c68026d..ca95c05 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MemberDeclarationVisitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MemberDeclarationVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -155,7 +155,15 @@ private void storeHandle(int idx) {
 	            	System.arraycopy(this.otherElements, 0, this.otherElements = new IJavaElement[length+10], 0, length);
 	            }
             }
-	    	this.otherElements[this.ptr] = handle;
+    		if (this.annotation == null) {
+		    	this.otherElements[this.ptr] = handle;
+    		} else {
+		    	IJavaElement annotHandle = this.locator.createHandle(this.annotation, (IAnnotatable) handle);
+		    	if (annotHandle == null) {
+			    	annotHandle = this.locator.createHandle(this.annotation, (IAnnotatable) this.enclosingElement);
+		    	}
+		    	this.otherElements[this.ptr] = annotHandle == null ? handle : annotHandle;
+    		}
     	}
     } else {
     	if (this.localElements[idx] == null) {
@@ -179,7 +187,15 @@ private void storeHandle(int idx) {
 	            	System.arraycopy(this.allOtherElements[idx], 0, this.allOtherElements[idx] = new IJavaElement[length+10], 0, length);
         	    }
 	        }
- 		   	this.allOtherElements[idx][oPtr] = handle;
+	    	if (this.annotation == null) {
+	 		   	this.allOtherElements[idx][oPtr] = handle;
+    		} else {
+		    	IJavaElement annotHandle = this.locator.createHandle(this.annotation, (IAnnotatable) handle);
+		    	if (annotHandle == null) {
+			    	annotHandle = this.locator.createHandle(this.annotation, (IAnnotatable) this.enclosingElement);
+		    	}
+	 		   	this.allOtherElements[idx][oPtr] = annotHandle == null ? handle : annotHandle;
+    		}
     	}
     }
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
index e79a1bb..24ba359 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
@@ -49,6 +49,25 @@ protected void clear() {
 protected int fineGrain() {
 	return this.pattern.fineGrain;
 }
+
+private MethodBinding getMethodBinding(ReferenceBinding type, TypeBinding[] argumentTypes) {
+	MethodBinding[] methods = type.getMethods(this.pattern.selector);
+	MethodBinding method = null;
+	methodsLoop: for (int i=0, length=methods.length; i<length; i++) {
+		method = methods[i];
+		TypeBinding[] parameters = method.parameters;
+		if (argumentTypes.length == parameters.length) {
+			for (int j=0,l=parameters.length; j<l; j++) {
+				if (parameters[j].erasure() != argumentTypes[j].erasure()) {
+					continue methodsLoop;
+				}
+			}
+			return method;
+		}
+	}
+	return null;
+}
+
 public void initializePolymorphicSearch(MatchLocator locator) {
 	long start = 0;
 	if (BasicSearchEngine.VERBOSE) {
@@ -662,7 +681,8 @@ protected int resolveLevelAsSubtype(char[] qualifiedPattern, ReferenceBinding ty
 
 	int level = resolveLevelForType(qualifiedPattern, type);
 	if (level != IMPOSSIBLE_MATCH) {
-		if (!type.isAbstract() && !type.isInterface()) { // if concrete class, then method is overridden
+		MethodBinding method = argumentTypes == null ? null : getMethodBinding(type, argumentTypes);
+		if (((method != null && !method.isAbstract()) || !type.isAbstract()) && !type.isInterface()) { // if concrete, then method is overridden
 			level |= OVERRIDDEN_METHOD_FLAVOR;
 		}
 		return level;
@@ -674,28 +694,15 @@ protected int resolveLevelAsSubtype(char[] qualifiedPattern, ReferenceBinding ty
 		if (level != IMPOSSIBLE_MATCH) {
 			if (argumentTypes != null) {
 				// need to verify if method may be overridden
-				MethodBinding[] methods = type.getMethods(this.pattern.selector);
-				for (int i=0, length=methods.length; i<length; i++) {
-					MethodBinding method = methods[i];
-					TypeBinding[] parameters = method.parameters;
-					if (argumentTypes.length == parameters.length) {
-						boolean found = true;
-						for (int j=0,l=parameters.length; j<l; j++) {
-							if (parameters[j].erasure() != argumentTypes[j].erasure()) {
-								found = false;
-								break;
-							}
-						}
-						if (found) { // one method match in hierarchy
-							if ((level & OVERRIDDEN_METHOD_FLAVOR) != 0) {
-								// this method is already overridden on a super class, current match is impossible
-								return IMPOSSIBLE_MATCH;
-							}
-							if (!method.isAbstract() && !type.isInterface()) {
-								// store the fact that the method is overridden
-								level |= OVERRIDDEN_METHOD_FLAVOR;
-							}
-						}
+				MethodBinding method = getMethodBinding(type, argumentTypes);
+				if (method != null) { // one method match in hierarchy
+					if ((level & OVERRIDDEN_METHOD_FLAVOR) != 0) {
+						// this method is already overridden on a super class, current match is impossible
+						return IMPOSSIBLE_MATCH;
+					}
+					if (!method.isAbstract() && !type.isInterface()) {
+						// store the fact that the method is overridden
+						level |= OVERRIDDEN_METHOD_FLAVOR;
 					}
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java
index 03129a3..0ca02c7 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodPattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,7 +42,6 @@ protected IType declaringType;
 
 // Signatures and arguments for generic search
 char[][] returnTypeSignatures;
-char[][][] returnTypeArguments;
 char[][][] parametersTypeSignatures;
 char[][][][] parametersTypeArguments;
 boolean methodParameters = false;
@@ -177,7 +176,6 @@ public MethodPattern(
 	// Store type signatures and arguments for return type
 	if (returnSignature != null) {
 		this.returnTypeSignatures = Util.splitTypeLevelsSignature(returnSignature);
-		this.returnTypeArguments = Util.getAllTypeArguments(this.returnTypeSignatures);
 	}
 
 	// Store type signatures and arguments for method parameters type
@@ -235,7 +233,6 @@ public MethodPattern(
 	// Store type signatures and arguments for return type
 	if (returnSignature != null) {
 		this.returnTypeSignatures = Util.splitTypeLevelsSignature(returnSignature);
-		this.returnTypeArguments = Util.getAllTypeArguments(this.returnTypeSignatures);
 	}
 
 	// Store type signatures and arguments for method parameters type
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
index 1a41f4c..ff8549d 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -132,7 +132,6 @@ protected int matchLevelForTokens(char[][] tokens) {
 			break;
 
 		case SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH:
-			packageName = CharOperation.concatWith(tokens, '.');
 			if (CharOperation.camelCaseMatch(this.pattern.pkgName, CharOperation.concatWith(tokens, '.'), true)) {
 				return POSSIBLE_MATCH;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferencePattern.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferencePattern.java
index 3a1d98d..3ecfc39 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferencePattern.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferencePattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,7 +56,7 @@ public char[][] getIndexCategories() {
 }
 protected boolean hasNextQuery() {
 	// if package has at least 4 segments, don't look at the first 2 since they are mostly
-	// redundant (eg. in 'org.eclipse.jdt.core.*' 'org.eclipse' is used all the time)
+	// redundant (e.g. in 'org.eclipse.jdt.core.*' 'org.eclipse' is used all the time)
 	return --this.currentSegment >= (this.segments.length >= 4 ? 2 : 0);
 }
 public boolean matchesDecodedKey(SearchPattern decodedPattern) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
index d978c75..5167157 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -264,7 +264,7 @@ protected boolean matchesName(char[] pattern, char[] name) {
  * 		<li>{@link #EXACT_FLAVOR}: Given name is equals to pattern</li>
  * 		<li>{@link #PREFIX_FLAVOR}: Given name prefix equals to pattern</li>
  * 		<li>{@link #CAMELCASE_FLAVOR}: Given name matches pattern as Camel Case</li>
- * 		<li>{@link #PATTERN_FLAVOR}: Given name matches pattern as Pattern (ie. using '*' and '?' characters)</li>
+ * 		<li>{@link #PATTERN_FLAVOR}: Given name matches pattern as Pattern (i.e. using '*' and '?' characters)</li>
  * 		</ul>
  * 	</li>
  * </ul>
@@ -426,9 +426,9 @@ protected int referenceType() {
 /**
  * Finds out whether the given ast node matches this search pattern.
  * Returns IMPOSSIBLE_MATCH if it doesn't.
- * Returns INACCURATE_MATCH if it potentially matches this search pattern (ie.
+ * Returns INACCURATE_MATCH if it potentially matches this search pattern (i.e.
  * it has already been resolved but resolving failed.)
- * Returns ACCURATE_MATCH if it matches exactly this search pattern (ie.
+ * Returns ACCURATE_MATCH if it matches exactly this search pattern (i.e.
  * it doesn't need to be resolved or it has already been resolved.)
  */
 public int resolveLevel(ASTNode possibleMatchingNode) {
@@ -702,7 +702,7 @@ public int resolveLevel(Binding binding) {
  * Returns whether the given type binding matches the given simple name pattern
  * and qualification pattern.
  * Note that from since 3.1, this method resolve to accurate member or local types
- * even if they are not fully qualified (ie. X.Member instead of p.X.Member).
+ * even if they are not fully qualified (i.e. X.Member instead of p.X.Member).
  * Returns ACCURATE_MATCH if it does.
  * Returns INACCURATE_MATCH if resolve failed.
  * Returns IMPOSSIBLE_MATCH if it doesn't.
@@ -822,7 +822,7 @@ protected int resolveLevelForType (char[] simpleNamePattern,
 		return level;
 	}
 
-	// Standard types (ie. neither generic nor parameterized nor raw types)
+	// Standard types (i.e. neither generic nor parameterized nor raw types)
 	// cannot match pattern with type parameters or arguments
 	TypeBinding leafType = type.leafComponentType();
 	if (!leafType.isParameterizedType()) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeParameterLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeParameterLocator.java
index 34ab8cb..00b206f 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeParameterLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeParameterLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public class TypeParameterLocator extends PatternLocator {
 
 	/*
 	 * Verify whether a type reference matches name pattern.
-	 * Type parameter references (ie. type arguments) are compiler type reference nodes
+	 * Type parameter references (i.e. type arguments) are compiler type reference nodes
 	 */
 	public int match(TypeReference node, MatchingNodeSet nodeSet) {
 		if (this.pattern.findReferences) {
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java
index de6b1ef..137c9c8 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferenceLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -687,12 +687,39 @@ protected int resolveLevel(TypeReference typeRef) {
  * This is just an helper to avoid call of method with all parameters...
  */
 protected int resolveLevelForType(TypeBinding typeBinding) {
-	return resolveLevelForType(
-			this.pattern.simpleName,
-			this.pattern.qualification,
-			this.pattern.getTypeArguments(),
-			0,
-			typeBinding);
+	if (typeBinding == null || !typeBinding.isValidBinding()) {
+		if (this.pattern.typeSuffix != TYPE_SUFFIX) return INACCURATE_MATCH;
+	} else {
+		switch (this.pattern.typeSuffix) {
+			case CLASS_SUFFIX:
+				if (!typeBinding.isClass()) return IMPOSSIBLE_MATCH;
+				break;
+			case CLASS_AND_INTERFACE_SUFFIX:
+				if (!(typeBinding.isClass() || (typeBinding.isInterface() && !typeBinding.isAnnotationType()))) return IMPOSSIBLE_MATCH;
+				break;
+			case CLASS_AND_ENUM_SUFFIX:
+				if (!(typeBinding.isClass() || typeBinding.isEnum())) return IMPOSSIBLE_MATCH;
+				break;
+			case INTERFACE_SUFFIX:
+				if (!typeBinding.isInterface() || typeBinding.isAnnotationType()) return IMPOSSIBLE_MATCH;
+				break;
+			case INTERFACE_AND_ANNOTATION_SUFFIX:
+				if (!(typeBinding.isInterface() || typeBinding.isAnnotationType())) return IMPOSSIBLE_MATCH;
+				break;
+			case ENUM_SUFFIX:
+				if (!typeBinding.isEnum()) return IMPOSSIBLE_MATCH;
+				break;
+			case ANNOTATION_TYPE_SUFFIX:
+				if (!typeBinding.isAnnotationType()) return IMPOSSIBLE_MATCH;
+				break;
+			case TYPE_SUFFIX : // nothing
+		}
+	}
+	return resolveLevelForType( this.pattern.simpleName,
+						this.pattern.qualification,
+						this.pattern.getTypeArguments(),
+						0,
+						typeBinding);
 }
 /**
  * Returns whether the given type binding or one of its enclosing types
diff --git a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferencePattern.java b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferencePattern.java
index f00a726..e87aa65 100644
--- a/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferencePattern.java
+++ b/eclipse/plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/TypeReferencePattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ public class TypeReferencePattern extends IntersectingPattern {
 		CATEGORIES = { REF, ANNOTATION_REF },
 		CATEGORIES_ANNOT_REF = { ANNOTATION_REF };
 	private char[][] categories;
+	char typeSuffix = TYPE_SUFFIX;
 
 	public TypeReferencePattern(char[] qualification, char[] simpleName, int matchRule) {
 		this(matchRule);
@@ -58,14 +59,21 @@ public class TypeReferencePattern extends IntersectingPattern {
 	 * Instantiate a type reference pattern with additional information for generics search
 	 */
 	public TypeReferencePattern(char[] qualification, char[] simpleName, String typeSignature, int matchRule) {
-		this(qualification, simpleName, typeSignature, 0, matchRule);
+		this(qualification, simpleName, typeSignature, 0, TYPE_SUFFIX, matchRule);
+	}
+	/*
+	 * Instantiate a type reference pattern with additional information for generics search and search elements nature
+	 */
+	public TypeReferencePattern(char[] qualification, char[] simpleName, String typeSignature, char typeSuffix, int matchRule) {
+		this(qualification, simpleName, typeSignature, 0, typeSuffix, matchRule);
 	}
 
 	/*
-	 * Instanciate a type reference pattern with additional information for generics search and fine grain information
+	 * Instanciate a type reference pattern with additional information for generics search, search elements nature and fine grain information
 	 */
-	public TypeReferencePattern(char[] qualification, char[] simpleName, String typeSignature, int limitTo, int matchRule) {
+	public TypeReferencePattern(char[] qualification, char[] simpleName, String typeSignature, int limitTo, char typeSuffix, int matchRule) {
 		this(qualification, simpleName,matchRule);
+		this.typeSuffix = typeSuffix;
 		if (typeSignature != null) {
 			// store type signatures and arguments
 			this.typeSignatures = Util.splitTypeLevelsSignature(typeSignature);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/.classpath b/eclipse/plugins/org.eclipse.jdt.debug.ui/.classpath
index f621ea2..f921cfa 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/.classpath
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="ui"/>
-	<classpathentry kind="src" path="Snippet Support"/>
+	<classpathentry kind="src" output="snippet_bin" path="Snippet Support"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.core.prefs
index 559fe24..c0a87f0 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,99 +1,101 @@
-#Thu Feb 26 08:16:04 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Thu Oct 15 14:51:15 CDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.pde.prefs
index b7d835c..9bb0094 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:39:07 CST 2007
+#Mon Dec 14 12:07:52 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=1
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
index c30c069..7b8751d 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
@@ -2,12 +2,13 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.debug.ui; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.2.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jdt.debug.ui,
  org.eclipse.jdt.debug.ui.actions,
+ org.eclipse.jdt.debug.ui.breakpoints,
  org.eclipse.jdt.debug.ui.launchConfigurations,
  org.eclipse.jdt.internal.debug.core.refactoring;x-internal:=true,
  org.eclipse.jdt.internal.debug.ui;x-internal:=true,
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/build.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/build.properties
index 4b7216f..df20706 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -20,3 +20,5 @@ src.includes = about.html,\
                schema/
 source.snippetsupport.jar=Snippet Support/
 source.. = ui/
+output.. = bin/
+output.snippetsupport.jar = snippet_bin/
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newsbook_wiz.gif b/eclipse/plugins/org.eclipse.jdt.debug.ui/icons/full/etool16/new_sbook.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newsbook_wiz.gif
copy to eclipse/plugins/org.eclipse.jdt.debug.ui/icons/full/etool16/new_sbook.gif
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.properties
index 2b35b33..8f67ed1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -55,7 +55,7 @@ breakpointPropertiesPage.label=Breakpoint Properties
 terminateEvaluationAction.label=&Terminate Evaluation
 terminateEvaluationAction.tooltip=Terminate Current Evaluation
 
-EnableBreakpoint.label=Toggl&e Enablement
+EnableBreakpoint.label=Toggl&e Breakpoint Enablement
 
 entryAction.label=Entr&y
 
@@ -215,7 +215,9 @@ ActionDefinition.watch.name=Watch
 ActionDefinition.allReferences.name=All References
 ActionDefinition.allReferences.description=Inspect all references to the selected object
 ActionDefinition.allInstances.name=All Instances
-ActionDefinition.allInstances.description=View all instances of the selected object loaded in the target VM
+ActionDefinition.allInstances.description=View all instances of the selected type loaded in the target VM
+ActionDefinition.instanceCount.name=Instance Count
+ActionDefinition.instanceCount.description=View the instance count of the selected type loaded in the target VM
 ActionDefinition.breakpointproperties.name=Breakpoint P&roperties
 ActionDefinition.breakpointproperties.description=View and edit the properties for a given Java breakpoint
 CommandDefinition.breakpointproperties.name=Java Breakpoint Properties
@@ -270,7 +272,10 @@ javaLogicalStruturePref.name=Logical Structures
 EditLogicalStructure.label=Edit Logical Structure...
 
 allInstances.label=All Ins&tances...
-allInstances.tooltip=Displays a popup window showing all live instances of the selected java type in the current running VM
+allInstances.tooltip=Displays a popup window showing all live instances of the selected type in the current running VM
+
+instanceCount.label=Instance Co&unt...
+instanceCount.tooltip=Displays the number of live instances of the selected type in the current running VM
 
 allReferences.label=All &References...
 allReferences.tooltip=Inspect references to the selected object
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.xml b/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.xml
index 7608be6..d6a1635 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -311,6 +311,41 @@
             </enablement>
          </action>
          <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.actions.InstanceCount"
+               label="%instanceCount.label"
+               menubarPath="org.eclipse.ui.run/jdtGroup"
+               tooltip="%instanceCount.tooltip">
+                           <enablement>
+                              <and>
+                                 <systemProperty
+                                       name="org.eclipse.jdt.debug.ui.debuggerActive"
+                                       value="true">
+                                 </systemProperty>
+                                 <systemProperty
+                                       name="org.eclipse.jdt.debug.ui.supportsInstanceRetrieval"
+                                       value="true">
+                                 </systemProperty>
+                                 <or>
+                                    <objectClass
+                                          name="org.eclipse.jface.text.ITextSelection">
+                                    </objectClass>
+                                    <objectClass
+                                          name="org.eclipse.jdt.debug.core.IJavaVariable">
+                                    </objectClass>
+                                    <objectClass
+                                          name="org.eclipse.jdt.core.IMethod">
+                                    </objectClass>
+                                    <objectClass
+                                          name="org.eclipse.jdt.core.IType">
+                                    </objectClass>
+                                 </or>
+                              </and>
+            </enablement>
+         </action>         
+         <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
                helpContextId="all_instances_action_context"
@@ -964,6 +999,15 @@
             </systemProperty>
          </visibility>
          <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.cuPopup.InstanceCount"
+               label="%instanceCount.label"
+               menubarPath="additions"
+               tooltip="%instanceCount.tooltip">
+         </action>
+         <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
                helpContextId="all_instances_action_context"
@@ -1089,6 +1133,15 @@
             </systemProperty>
          </visibility>
          <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.cuPopup.InstanceCount"
+               label="%instanceCount.label"
+               menubarPath="additions"
+               tooltip="%instanceCount.tooltip">
+         </action>
+         <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
                helpContextId="all_instances_action_context"
@@ -1276,6 +1329,16 @@
             id="org.eclipse.jdt.debug.ui.FilteredJavaVariableActions"
             objectClass="org.eclipse.jdt.debug.core.IJavaVariable">
          <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               enablesFor="1"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.instanceCount"
+               label="%instanceCount.label"
+               menubarPath="emptyNavigationGroup"
+               tooltip="%instanceCount.tooltip">
+         </action>
+         <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
                enablesFor="1"
@@ -1739,6 +1802,16 @@
             </and>
          </visibility>
           <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               enablesFor="1"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.instanceCount"
+               label="%instanceCount.label"
+               menubarPath="additions"
+               tooltip="%instanceCount.tooltip">
+          </action>
+          <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
                enablesFor="1"
@@ -1765,6 +1838,16 @@
                </objectState>
              </and>
 	      </visibility>
+	      <action
+               class="org.eclipse.jdt.internal.debug.ui.heapwalking.InstanceCountActionDelegate"
+               definitionId="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+               enablesFor="1"
+               helpContextId="instance_count_action_context"
+               id="org.eclipse.jdt.debug.ui.instanceCount"
+               label="%instanceCount.label"
+               menubarPath="additions"
+               tooltip="%instanceCount.tooltip">
+          </action>
           <action
                class="org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate"
                definitionId="org.eclipse.jdt.debug.ui.commands.AllInstances"
@@ -2137,7 +2220,7 @@
       </page>
       <page
             name="%breakpointPropertiesPage.label"
-            class="org.eclipse.jdt.internal.debug.ui.propertypages.JavaLineBreakpointPage"
+            class="org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage"
             id="org.eclipse.jdt.debug.ui.propertypages.LineBreakpoints">
          <enabledWhen>
             <or>
@@ -2198,7 +2281,7 @@
       </page>
       <page
             name="%breakpointPropertiesPage.label"
-            class="org.eclipse.jdt.internal.debug.ui.propertypages.JavaExceptionBreakpointPage"
+            class="org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage"
             id="org.eclipse.jdt.debug.ui.propertypages.ExceptionBreakpoint">
          <enabledWhen>
             <or>
@@ -2577,6 +2660,13 @@ M4 = Platform-specific fourth key
       </command>
       <command
             categoryId="org.eclipse.debug.ui.category.run"
+            description="%ActionDefinition.instanceCount.description"
+            helpContextId="all_instances_action_context"
+            id="org.eclipse.jdt.debug.ui.commands.InstanceCount"
+            name="%ActionDefinition.instanceCount.name">
+      </command>      
+      <command
+            categoryId="org.eclipse.debug.ui.category.run"
             description="%ActionDefinition.breakpointproperties.description"
             id="org.eclipse.jdt.debug.ui.breakpoint.properties"
             name="%CommandDefinition.breakpointproperties.name">
@@ -2588,6 +2678,18 @@ M4 = Platform-specific fourth key
             contextId="org.eclipse.debug.ui.debugging"
             commandId="org.eclipse.jdt.debug.ui.commands.StepIntoSelection"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+     <!-- On carbon: Command+F5 starts Voice Over, Ctrl+F5 moves focus to toolbar -->
+      <key
+            platform="carbon"
+            sequence="M1+F5"
+            contextId="org.eclipse.debug.ui.debugging"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+      <key
+            platform="carbon"
+            sequence="M3+F5"
+            contextId="org.eclipse.debug.ui.debugging"
+            commandId="org.eclipse.jdt.debug.ui.commands.StepIntoSelection"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
       <key
             sequence="M2+M3+F"
             commandId="org.eclipse.jdt.debug.ui.commands.ForceReturn"
@@ -3167,7 +3269,7 @@ M4 = Platform-specific fourth key
       </category>
       <wizard
             name="%NewJavaScrapbookPage.label"
-            icon="$nl$/icons/full/obj16/jsbook_obj.gif"
+            icon="$nl$/icons/full/etool16/new_sbook.gif"
             category="org.eclipse.jdt.ui.java/org.eclipse.jdt.debug.ui.java"
             class="org.eclipse.jdt.internal.debug.ui.snippeteditor.NewSnippetFileCreationWizard"
             id="org.eclipse.jdt.debug.ui.snippetEditor.NewSnippetFileCreationWizard">
@@ -3451,4 +3553,35 @@ M4 = Platform-specific fourth key
           id="org.eclipse.jdt.debug.ui.uncaughtExceptionListener">
     </breakpointListener>
  </extension>
+ <extension
+       point="org.eclipse.debug.ui.detailPaneFactories">
+    <detailFactories
+          class="org.eclipse.jdt.internal.debug.ui.breakpoints.BreakpointDetailPaneFactory"
+          id="org.eclipse.jdt.debug.ui.breakpoint.detailFactories">
+       <enablement>
+          <with
+                variable="selection">
+             <count
+                   value="1">
+             </count>
+             <iterate>
+                <or>
+                   <instanceof
+                         value="org.eclipse.jdt.debug.core.IJavaLineBreakpoint">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.jdt.debug.core.IJavaWatchpoint">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.jdt.debug.core.IJavaExceptionBreakpoint">
+                   </instanceof>
+                   <instanceof
+                         value="org.eclipse.jdt.debug.core.IJavaClassPrepareBreakpoint">
+                   </instanceof>
+                </or>
+             </iterate>
+          </with>
+       </enablement>
+    </detailFactories>
+ </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java
new file mode 100644
index 0000000..b425894
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/JavaBreakpointConditionEditor.java
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.debug.ui.breakpoints;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
+import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.contentassist.IJavaDebugContentAssistContext;
+import org.eclipse.jdt.internal.debug.ui.contentassist.JavaDebugContentAssistProcessor;
+import org.eclipse.jdt.internal.debug.ui.contentassist.TypeContext;
+import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
+import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.TextViewerUndoManager;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+/**
+ * Controls to edit a breakpoint's conditional expression, condition enabled state,
+ * and suspend policy (suspend when condition is <code>true</code> or when the value of the
+ * conditional expression changes).
+ * <p>
+ * The controls are intended to be embedded in a composite provided by the client - for
+ * example, in a dialog. Clients must call {@link #createControl(Composite)} as the first
+ * life cycle method after instantiation. Clients may then call {@link #setInput(Object)}
+ * with the breakpoint object to be displayed/edited. Changes are not applied to the
+ * breakpoint until {@link #doSave()} is called. The method {@link #isDirty()} may be used
+ * to determine if any changes have been made in the editor, and {@link #getStatus()} may
+ * be used to determine if the editor settings are valid. Clients can register for
+ * property change notification ({@link #addPropertyListener(IPropertyListener)}). The editor
+ * will fire a property change each time a setting is modified. The same editor can be
+ * used to display different breakpoints by calling {@link #setInput(Object)} with different
+ * breakpoint objects. 
+ * </p>
+ * 
+ * @since 3.5
+ */
+public final class JavaBreakpointConditionEditor extends AbstractJavaBreakpointEditor {
+	
+	private Button fConditional;
+	private Button fWhenTrue;
+	private Button fWhenChange;
+	private JDISourceViewer fViewer;
+	private IContentAssistProcessor fCompletionProcessor;	
+	private IJavaLineBreakpoint fBreakpoint;
+	private IHandlerService fHandlerService;
+	private IHandler fHandler;
+	private IHandlerActivation fActivation;
+    private IDocumentListener fDocumentListener;	
+    
+    /**
+     * Property id for breakpoint condition expression.
+     */
+    public static final int PROP_CONDITION = 0x1001;
+    
+    /**
+     * Property id for breakpoint condition enabled state.
+     */
+    public static final int PROP_CONDITION_ENABLED = 0x1002;
+    
+    /**
+     * Property id for breakpoint condition suspend policy.
+     */
+    public static final int PROP_CONDITION_SUSPEND_POLICY = 0x1003;
+	
+	/**
+	 * Adds the given property listener to this editor. Property changes
+	 * are reported on the breakpoint being edited. Property identifiers
+	 * are breakpoint attribute keys.
+	 * 
+	 * @param listener listener
+	 */
+	public void addPropertyListener(IPropertyListener listener) {
+		super.addPropertyListener(listener);
+	}
+	
+	/**
+	 * Removes the property listener from this editor.
+	 * 
+	 * @param listener listener
+	 */
+	public void removePropertyListener(IPropertyListener listener) {
+		super.removePropertyListener(listener);
+	}
+	
+	/**
+	 * Sets the breakpoint to editor or <code>null</code> if none.
+	 * 
+	 * @param input breakpoint or <code>null</code>
+	 * @throws CoreException if unable to access breakpoint attributes
+	 */
+	public void setInput(Object input) throws CoreException {
+		try {
+			suppressPropertyChanges(true);
+			if (input instanceof IJavaLineBreakpoint) {
+				setBreakpoint((IJavaLineBreakpoint)input);
+			} else {
+				setBreakpoint(null);
+			}
+		} finally {
+			suppressPropertyChanges(false);
+		}
+	}
+	
+	/**
+	 * Sets the breakpoint to edit. Has no effect if the breakpoint responds
+	 * <code>false</code> to {@link IJavaLineBreakpoint#supportsCondition()}.
+	 * The same editor can be used iteratively for different breakpoints.
+	 * 
+	 * @param breakpoint the breakpoint to edit or <code>null</code> if none
+	 * @exception CoreException if unable to access breakpoint attributes
+	 */
+	private void setBreakpoint(IJavaLineBreakpoint breakpoint) throws CoreException {
+		fBreakpoint = breakpoint;
+		if (fDocumentListener != null) {
+			fViewer.getDocument().removeDocumentListener(fDocumentListener);
+			fDocumentListener = null;
+		}
+		fViewer.unconfigure();
+		IDocument document = new Document();
+		JDIDebugUIPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING);
+		fViewer.setInput(document);
+		String condition = null;
+		IType type = null;
+		boolean controlsEnabled = false;
+		boolean conditionEnabled = false;
+		boolean whenTrue = true;
+		if (breakpoint != null) {
+			controlsEnabled = true;
+			if (breakpoint.supportsCondition()) {
+				condition = breakpoint.getCondition();
+				conditionEnabled = breakpoint.isConditionEnabled();
+				whenTrue = breakpoint.isConditionSuspendOnTrue();
+				type = BreakpointUtils.getType(breakpoint);
+			}
+		}
+		IJavaDebugContentAssistContext context = null;
+		if (type == null || breakpoint == null) {
+			context = new TypeContext(null, -1);
+		} else {
+			String source = null;
+			ICompilationUnit compilationUnit = type.getCompilationUnit();
+			if (compilationUnit != null && compilationUnit.getJavaProject().getProject().exists()) {
+				source = compilationUnit.getSource();
+			} 
+			else {
+				IClassFile classFile = type.getClassFile();
+				if (classFile != null) {
+					source = classFile.getSource();
+				}
+			}
+			int lineNumber = breakpoint.getMarker().getAttribute(IMarker.LINE_NUMBER, -1);
+			int position= -1;
+			if (source != null && lineNumber != -1) {
+				try {
+					position = new Document(source).getLineOffset(lineNumber - 1);
+				} 
+				catch (BadLocationException e) {JDIDebugUIPlugin.log(e);}
+			}
+			context = new TypeContext(type, position);
+		}
+		fCompletionProcessor = new JavaDebugContentAssistProcessor(context);
+		fViewer.configure(new DisplayViewerConfiguration() {
+			public IContentAssistProcessor getContentAssistantProcessor() {
+					return fCompletionProcessor;
+			}
+		});
+		document.set((condition == null ? "" : condition)); //$NON-NLS-1$
+		fViewer.setUndoManager(new TextViewerUndoManager(10));
+		fViewer.getUndoManager().connect(fViewer);
+		fDocumentListener = new IDocumentListener() {
+            public void documentAboutToBeChanged(DocumentEvent event) {
+            }
+            public void documentChanged(DocumentEvent event) {
+            	setDirty(PROP_CONDITION);
+            }
+        };
+		fViewer.getDocument().addDocumentListener(fDocumentListener);
+		fConditional.setEnabled(controlsEnabled);
+		fConditional.setSelection(conditionEnabled);
+		fWhenTrue.setSelection(whenTrue);
+		fWhenChange.setSelection(!whenTrue);
+		setEnabled(conditionEnabled && breakpoint != null && breakpoint.supportsCondition(), false);
+		setDirty(false);
+	}
+	
+	/**
+	 * Creates the condition editor widgets and returns the top level
+	 * control.
+	 * 
+	 * @param parent composite to embed the editor controls in
+	 * @return top level control
+	 */
+	public Control createControl(Composite parent) {
+		Composite controls = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
+		fConditional = SWTFactory.createCheckButton(controls, 
+				processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_0), 
+				null, 
+				false, 
+				1);
+		fConditional.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
+		fConditional.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				boolean checked = fConditional.getSelection();
+				setEnabled(checked, true);
+				setDirty(PROP_CONDITION_ENABLED);
+			}
+		});
+		Composite radios = SWTFactory.createComposite(controls, controls.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
+		fWhenTrue = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_1));
+		fWhenTrue.setLayoutData(new GridData());
+		fWhenChange = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointConditionEditor_2));
+		fWhenChange.setLayoutData(new GridData());
+		fWhenTrue.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDirty(PROP_CONDITION_SUSPEND_POLICY);
+			}
+		});
+		fWhenChange.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDirty(PROP_CONDITION_SUSPEND_POLICY);
+			}
+		});
+				
+		fViewer = new JDISourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT);
+		fViewer.setEditable(false);
+		ControlDecoration decoration = new ControlDecoration(fViewer.getControl(), SWT.TOP | SWT.LEFT);
+		decoration.setShowOnlyOnFocus(true);
+		FieldDecoration dec = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+		decoration.setImage(dec.getImage());
+		decoration.setDescriptionText(dec.getDescription());
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		// set height/width hints based on font
+		GC gc = new GC(fViewer.getTextWidget());
+		gc.setFont(fViewer.getTextWidget().getFont());
+		FontMetrics fontMetrics = gc.getFontMetrics();
+		//gd.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, 10);
+		gd.widthHint = Dialog.convertWidthInCharsToPixels(fontMetrics, 40);
+		gc.dispose();
+		fViewer.getControl().setLayoutData(gd);
+		fHandler = new AbstractHandler() {
+			public Object execute(ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
+				fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
+				return null;
+			}
+		};
+		fHandlerService = (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
+		fViewer.getControl().addFocusListener(new FocusAdapter() {
+			public void focusGained(FocusEvent e) {
+				activateContentAssist();
+			}
+			public void focusLost(FocusEvent e) {
+				deactivateContentAssist();
+			}				
+		});
+		parent.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				dispose();
+			}
+		});
+		return parent;
+	}
+	
+	/**
+	 * Disposes this editor and its controls. Once disposed, the editor can no
+	 * longer be used.
+	 */
+	protected void dispose() {
+		super.dispose();
+		deactivateContentAssist();
+		if (fDocumentListener != null) {
+			fViewer.getDocument().removeDocumentListener(fDocumentListener);
+		}
+		fViewer.dispose();	
+	}
+	
+	/**
+	 * Gives focus to an appropriate control in the editor.
+	 */
+	public void setFocus() {
+		fViewer.getControl().setFocus();
+	}
+	
+	/**
+	 * Saves current settings to the breakpoint being edited. Has no
+	 * effect if a breakpoint is not currently being edited or if this
+	 * editor is not dirty.
+	 * 
+	 * @exception CoreException if unable to update the breakpoint.
+	 */
+	public void doSave() throws CoreException {
+		if (fBreakpoint != null && isDirty()) {
+			fBreakpoint.setCondition(fViewer.getDocument().get().trim());
+			fBreakpoint.setConditionEnabled(fConditional.getSelection());
+			fBreakpoint.setConditionSuspendOnTrue(fWhenTrue.getSelection());
+			setDirty(false);
+		}
+	}
+	
+	/**
+	 * Returns a status describing whether the condition editor is in
+	 * a valid state. Returns an OK status when all is good. For example, an error
+	 * status is returned when the conditional expression is empty but enabled.
+	 * 
+	 * @return editor status.
+	 */
+	public IStatus getStatus() {
+		if (fBreakpoint != null && fBreakpoint.supportsCondition()) {
+			if (fConditional.getSelection()) {
+				if (fViewer.getDocument().get().trim().length() == 0) {
+					return new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(),  PropertyPageMessages.BreakpointConditionEditor_1);
+				}
+			}
+		}
+		return Status.OK_STATUS;
+	}
+	
+	/**
+	 * Returns whether the editor needs saving.
+	 *  
+	 * @return whether the editor needs saving
+	 */
+	public boolean isDirty() {
+		return super.isDirty();
+	}
+	
+	/**
+	 * Sets whether mnemonics should be displayed in editor controls.
+	 * Only has an effect if set before {@link #createControl(Composite)}
+	 * is called. By default, mnemonics are displayed.
+	 * 
+	 * @param mnemonics whether to display mnemonics
+	 */
+	public void setMnemonics(boolean mnemonics) {
+		super.setMnemonics(mnemonics);
+	}
+	
+	private void activateContentAssist() {
+		fActivation = fHandlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, fHandler);
+	}
+
+	private void deactivateContentAssist() {
+		if(fActivation != null) {
+			fHandlerService.deactivateHandler(fActivation);
+			fActivation = null;
+		}
+	}	
+	
+	/**
+	 * Enables controls based on whether the breakpoint's condition is enabled.
+	 * 
+	 * @param enabled whether to enable
+	 */
+	private void setEnabled(boolean enabled, boolean focus) {
+	    fViewer.setEditable(enabled);
+	    fViewer.getTextWidget().setEnabled(enabled);
+	    fWhenChange.setEnabled(enabled);
+	    fWhenTrue.setEnabled(enabled);
+		if (enabled) {
+			fViewer.updateViewerColors();
+			if (focus) {
+				setFocus();
+			}
+		} else {
+			Color color = fViewer.getControl().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+			fViewer.getTextWidget().setBackground(color);			
+		}
+	}
+
+	/**
+	 * Returns the breakpoint being edited or <code>null</code> if none.
+	 * 
+	 * @return breakpoint or <code>null</code>
+	 */
+	public Object getInput() {
+		return fBreakpoint;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/package.html b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/package.html
new file mode 100644
index 0000000..8d6add6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/breakpoints/package.html
@@ -0,0 +1,17 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Java Debug UI</title>
+</head>
+
+<body link="#0000FF" vlink="#800080">
+
+<p align="left">Provides an editor for breakpoint conditions.</p>
+
+<h2 align="left">Package Specification</h2>
+
+<p>This package provides an editor for breakpoint conditions.</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletMainTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletMainTab.java
index 5a886c4..a8ac666 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletMainTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletMainTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IType;
@@ -23,14 +24,11 @@ import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.launcher.AppletLaunchConfigurationUtils;
 import org.eclipse.jdt.internal.debug.ui.launcher.DebugTypeSelectionDialog;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
 import org.eclipse.jdt.internal.debug.ui.launcher.SharedJavaMainTab;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jdt.ui.ISharedImages;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.window.Window;
@@ -176,24 +174,8 @@ public class AppletMainTab extends SharedJavaMainTab {
 	private void initializeDefaults(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) {
 		initializeJavaProject(javaElement, config);
 		initializeMainTypeAndName(javaElement, config);
-		initializeHardCodedDefaults(config);
 		initializeAppletViewerClass(config);
 	}
-	
-	/**
-	 * Set the VM attributes on the working copy based on the workbench default VM.
-	 */
-	private void initializeDefaultVM(ILaunchConfigurationWorkingCopy config) {
-		IVMInstall vmInstall= JavaRuntime.getDefaultVMInstall();
-		if (vmInstall == null) {
-			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, (String)null);
-			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, (String)null);
-		}
-		else {
-			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_NAME, vmInstall.getName());
-			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_INSTALL_TYPE, vmInstall.getVMInstallType().getId());
-		}
-	}
 		
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.internal.debug.ui.launcher.AbstractJavaMainTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
@@ -203,13 +185,6 @@ public class AppletMainTab extends SharedJavaMainTab {
 		updateMainTypeFromConfig(config);
 		updateAppletViewerClassNameFromConfig(config);
 	}
-
-	/**
-	 * Initialize those attributes whose default values are independent of any context.
-	 */
-	private void initializeHardCodedDefaults(ILaunchConfigurationWorkingCopy config) {
-		initializeDefaultVM(config);
-	}
 	
 	/**
 	 * Returns whether the default applet viewer is to be used
@@ -278,10 +253,7 @@ public class AppletMainTab extends SharedJavaMainTab {
 	 */
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
 		IJavaElement je= getContext();
-		if (je == null) {
-			initializeHardCodedDefaults(config);
-		}
-		else {
+		if (je != null) {
 			initializeDefaults(je, config);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
index 234714a..3cb783f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/AppletParametersTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,9 +16,9 @@ import java.util.Map;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
 import org.eclipse.jdt.internal.debug.ui.launcher.NameValuePairDialog;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaAppletLaunchShortcut.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaAppletLaunchShortcut.java
index e158d3c..f87316f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaAppletLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaAppletLaunchShortcut.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ public class JavaAppletLaunchShortcut extends JavaLaunchShortcut {
 		ILaunchConfiguration config = null;
 		try {
 			ILaunchConfigurationType configType = getConfigurationType();
-			ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(type.getElementName())); 
+			ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(type.getElementName())); 
 			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
 			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
 			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_APPLET_WIDTH, AppletParametersTab.DEFAULT_APPLET_WIDTH);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
index 29ec2f2..71c4854 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaApplicationLaunchShortcut.java
@@ -47,12 +47,14 @@ import org.eclipse.jface.operation.IRunnableContext;
 public class JavaApplicationLaunchShortcut extends JavaLaunchShortcut {
 	
 	/**
-	 * Returns the Java elements corresponding to the given objects.
+	 * Returns the Java elements corresponding to the given objects. Members are translated
+	 * to corresponding declaring types where possible.
 	 * 
 	 * @param objects selected objects
 	 * @return corresponding Java elements
+	 * @since 3.5
 	 */
-	private IJavaElement[] getJavaElements(Object[] objects) {
+	protected IJavaElement[] getJavaElements(Object[] objects) {
 		List list= new ArrayList(objects.length);
 		for (int i = 0; i < objects.length; i++) {
 			Object object = objects[i];
@@ -81,7 +83,7 @@ public class JavaApplicationLaunchShortcut extends JavaLaunchShortcut {
 		ILaunchConfigurationWorkingCopy wc = null;
 		try {
 			ILaunchConfigurationType configType = getConfigurationType();
-			wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(type.getTypeQualifiedName('.')));
+			wc = configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(type.getTypeQualifiedName('.')));
 			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
 			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
 			wc.setMappedResources(new IResource[] {type.getUnderlyingResource()});
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaArgumentsTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaArgumentsTab.java
index 41ff91a..a25d805 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaArgumentsTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaArgumentsTab.java
@@ -141,7 +141,7 @@ public class JavaArgumentsTab extends JavaLaunchTab {
 		fPrgmArgumentsText.setFont(font);
 		fPrgmArgumentsText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent evt) {
-				updateLaunchConfigurationDialog();
+				scheduleUpdateJob();
 			}
 		});
 		ControlAccessibleListener.addListener(fPrgmArgumentsText, group.getText());
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
index d788614..e458ea1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaConnectTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,13 +20,13 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.launcher.AbstractJavaMainTab;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaJRETab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaJRETab.java
index 8a7a18d..c599b3a 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaJRETab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaJRETab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,44 +11,26 @@
 package org.eclipse.jdt.debug.ui.launchConfigurations;
 
  
-import com.ibm.icu.text.MessageFormat;
-
 import java.util.Map;
 
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
-
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.ui.PlatformUI;
-
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationType;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.ILaunchConfigurationTab;
-
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.jres.JREDescriptor;
 import org.eclipse.jdt.internal.debug.ui.jres.JREsComboBlock;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
@@ -57,9 +39,18 @@ import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
-
 import org.eclipse.jdt.ui.ISharedImages;
 import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.PlatformUI;
+
+import com.ibm.icu.text.MessageFormat;
 
 /**
  * A launch configuration tab that displays and edits the VM install 
@@ -266,41 +257,45 @@ public class JavaJRETab extends JavaLaunchTab {
 			source = LauncherMessages.JavaJRETab_4;
 		}
 		IPath vmPath = fJREBlock.getPath();
-		IVMInstall vm = null;
-		if(JavaRuntime.newDefaultJREContainerPath().equals(vmPath)) {
-			if(javaProject.isOpen()) {
-				try {
-					vm = JavaRuntime.getVMInstall(getJavaProject());
-				} catch (CoreException e) {
-					JDIDebugUIPlugin.log(e);
-					return Status.OK_STATUS;
-				}
-				if(vm == null) {
-					vm = JavaRuntime.getVMInstall(vmPath);
+		if (vmPath != null) {
+			IVMInstall vm = null;
+			if(JavaRuntime.newDefaultJREContainerPath().equals(vmPath)) {
+				if(javaProject.isOpen()) {
+					try {
+						vm = JavaRuntime.getVMInstall(getJavaProject());
+					} catch (CoreException e) {
+						JDIDebugUIPlugin.log(e);
+						return Status.OK_STATUS;
+					}
+					if(vm == null) {
+						vm = JavaRuntime.getVMInstall(vmPath);
+					}
 				}
 			}
-		}
-		else {
-			vm = JavaRuntime.getVMInstall(vmPath);
-		}
-		String environmentId = JavaRuntime.getExecutionEnvironmentId(vmPath);
-		if(vm instanceof AbstractVMInstall) {
-			AbstractVMInstall install = (AbstractVMInstall) vm;
-			String vmver = install.getJavaVersion();
-			if(vmver != null) {
-				int val = compliance.compareTo(vmver);
-				if(val > 0) {
-					String setting = null;
-					if (environmentId == null) {
-						setting = LauncherMessages.JavaJRETab_2;
-					} else {
-						setting = LauncherMessages.JavaJRETab_1;
+			else {
+				vm = JavaRuntime.getVMInstall(vmPath);
+			}
+			String environmentId = JavaRuntime.getExecutionEnvironmentId(vmPath);
+			if(vm instanceof AbstractVMInstall) {
+				AbstractVMInstall install = (AbstractVMInstall) vm;
+				String vmver = install.getJavaVersion();
+				if(vmver != null) {
+					int val = compliance.compareTo(vmver);
+					if(val > 0) {
+						String setting = null;
+						if (environmentId == null) {
+							setting = LauncherMessages.JavaJRETab_2;
+						} else {
+							setting = LauncherMessages.JavaJRETab_1;
+						}
+						return new Status(IStatus.ERROR, IJavaDebugUIConstants.PLUGIN_ID, IStatus.ERROR, MessageFormat.format(LauncherMessages.JavaJRETab_0, new String[] {setting, source, compliance}), null); 
 					}
-					return new Status(IStatus.ERROR, IJavaDebugUIConstants.PLUGIN_ID, IStatus.ERROR, MessageFormat.format(LauncherMessages.JavaJRETab_0, new String[] {setting, source, compliance}), null); 
 				}
 			}
+			return Status.OK_STATUS;
 		}
-		return Status.OK_STATUS;
+		// when no VM path is specified return the error status from the JRE block
+		return fJREBlock.getStatus();
 	}	
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
index 7a0436b..4a5aa81 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaLaunchShortcut.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,8 +152,9 @@ public abstract class JavaLaunchShortcut implements ILaunchShortcut2 {
 	 * 
 	 * @param type type to launch
 	 * @param mode launch mode
+	 * @since 3.5
 	 */
-	private void launch(IType type, String mode) {
+	protected void launch(IType type, String mode) {
 		ILaunchConfiguration config = findLaunchConfiguration(type, getConfigurationType());
 		if (config == null) {
 			config = createConfiguration(type);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java
index 2c6a2b5..362475a 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/debug/ui/launchConfigurations/JavaMainTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
@@ -31,7 +32,6 @@ import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.launcher.DebugTypeSelectionDialog;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
 import org.eclipse.jdt.internal.debug.ui.launcher.MainMethodSearchEngine;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
index f476d6d..5d4784b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameFieldParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,17 +10,23 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.core.refactoring;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.debug.core.IJavaWatchpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint;
 import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
 
 /**
  * Breakpoint participant for field rename.
@@ -37,6 +43,22 @@ public class BreakpointRenameFieldParticipant extends BreakpointRenameParticipan
 	}
 	
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.core.refactoring.BreakpointRenameParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
+		List changes = new ArrayList();
+		IResource resource = getBreakpointContainer();
+		IMarker[] markers = resource.findMarkers(JavaWatchpoint.JAVA_WATCHPOINT, true, IResource.DEPTH_INFINITE);
+		gatherChanges(markers, changes, getArguments().getNewName());
+		if (changes.size() > 1) {
+			return new CompositeChange(RefactoringMessages.BreakpointRenameParticipant_1, (Change[]) changes.toArray(new Change[changes.size()]));
+		} else if (changes.size() == 1) {
+			return (Change) changes.get(0);
+		}
+		return null;
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.internal.debug.core.refactoring.BreakpointRenameParticipant#gatherChanges(org.eclipse.core.resources.IMarker[], java.util.List, java.lang.String)
 	 */
 	protected void gatherChanges(IMarker[] markers, List changes, String destFieldName) throws CoreException, OperationCanceledException {
@@ -46,10 +68,12 @@ public class BreakpointRenameFieldParticipant extends BreakpointRenameParticipan
 			IBreakpoint breakpoint = getBreakpoint(marker);
 			if (breakpoint instanceof IJavaWatchpoint) {
 				IJavaWatchpoint watchpoint = (IJavaWatchpoint) breakpoint;
-				IType breakpointType = BreakpointUtils.getType(watchpoint);
-				if (breakpointType != null && originalField.getDeclaringType().equals(breakpointType)) {
-					IField destField = originalField.getDeclaringType().getField(destFieldName);
-					changes.add(new WatchpointFieldChange(watchpoint, destField));
+				if(originalField.getElementName().equals(watchpoint.getFieldName())) {
+					IType breakpointType = BreakpointUtils.getType(watchpoint);
+					if (breakpointType != null && originalField.getDeclaringType().equals(breakpointType)) {
+						IField destField = originalField.getDeclaringType().getField(destFieldName);
+						changes.add(new WatchpointFieldChange(watchpoint, destField));
+					}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameMethodParticipant.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameMethodParticipant.java
index 373d016..b2c789c 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameMethodParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/core/refactoring/BreakpointRenameMethodParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,10 +47,15 @@ public class BreakpointRenameMethodParticipant extends BreakpointRenameParticipa
 			IBreakpoint breakpoint = getBreakpoint(marker);
 			if (breakpoint instanceof IJavaMethodBreakpoint) {
 				IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) breakpoint;
-				IType breakpointType = BreakpointUtils.getType(methodBreakpoint);
-				if (breakpointType != null && originalMethod.getDeclaringType().equals(breakpointType)) {
-					IMethod destMethod = originalMethod.getDeclaringType().getMethod(destMethodName, originalMethod.getParameterTypes());
-					changes.add(new MethodBreakpointMethodChange(methodBreakpoint, destMethod));
+				//ensure we only update the marker that corresponds to the method being renamed
+				//https://bugs.eclipse.org/bugs/show_bug.cgi?id=280518
+				if(methodBreakpoint.getMethodName().equals(originalMethod.getElementName()) &&
+						methodBreakpoint.getMethodSignature().equals(originalMethod.getSignature())) {
+					IType breakpointType = BreakpointUtils.getType(methodBreakpoint);
+					if (breakpointType != null && originalMethod.getDeclaringType().equals(breakpointType)) {
+						IMethod destMethod = originalMethod.getDeclaringType().getMethod(destMethodName, originalMethod.getParameterTypes());
+						changes.add(new MethodBreakpointMethodChange(methodBreakpoint, destMethod));
+					}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java
index 1a2970d..2ff49cd 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/BreakpointMarkerUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,15 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.ui;
 
+import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IBreakpointManager;
 import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
 import org.eclipse.jdt.debug.core.IJavaPatternBreakpoint;
@@ -27,6 +26,7 @@ import org.eclipse.jdt.debug.core.IJavaStratumLineBreakpoint;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
 import org.eclipse.jdt.internal.debug.core.breakpoints.ValidBreakpointLocationLocator;
+import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -95,41 +95,40 @@ public class BreakpointMarkerUpdater implements IMarkerUpdater {
 		if (breakpoint instanceof IJavaStratumLineBreakpoint || breakpoint instanceof IJavaPatternBreakpoint) {
 			return true;
 		}
-		ASTParser parser = ASTParser.newParser(AST.JLS3);
-		setParserOptions(marker, parser);
-		parser.setSource(document.get().toCharArray());
-		CompilationUnit unit = (CompilationUnit) parser.createAST(null);
-		if(unit != null) {
-			try {
-				ValidBreakpointLocationLocator loc = new ValidBreakpointLocationLocator(unit, document.getLineOfOffset(position.getOffset())+1, true, true);
-				unit.accept(loc);
-				if(loc.getLocationType() == ValidBreakpointLocationLocator.LOCATION_NOT_FOUND) {
-					return false;
-				}
-				int line = loc.getLineLocation();
-				//if the line number is already good, perform no marker updating
-				if(MarkerUtilities.getLineNumber(marker) == line) {
-					//if there exists a breakpoint on the line remove this one
-					if(isLineBreakpoint(marker)) {
-						ensureRanges(document, marker, line);
-						return lineBreakpointExists(marker.getResource(), ((IJavaLineBreakpoint)breakpoint).getTypeName(), line, marker) == null;
-					}
-					return true;
-				}
-				//if the line info is a valid location with an invalid line number,
-				//a line breakpoint must be removed
-				if(isLineBreakpoint(marker) & line == -1) {
-					return false;
-				}
-				MarkerUtilities.setLineNumber(marker, line);
+		ICompilationUnit cunit = JavaCore.createCompilationUnitFrom((IFile) marker.getResource());
+		if(cunit == null) {
+			return false;
+		}
+		CompilationUnit unit = SharedASTProvider.getAST(cunit, SharedASTProvider.WAIT_YES, null);
+		try {
+			ValidBreakpointLocationLocator loc = new ValidBreakpointLocationLocator(unit, document.getLineOfOffset(position.getOffset())+1, true, true);
+			unit.accept(loc);
+			if(loc.getLocationType() == ValidBreakpointLocationLocator.LOCATION_NOT_FOUND) {
+				return false;
+			}
+			int line = loc.getLineLocation();
+			//if the line number is already good, perform no marker updating
+			if(MarkerUtilities.getLineNumber(marker) == line) {
+				//if there exists a breakpoint on the line remove this one
 				if(isLineBreakpoint(marker)) {
 					ensureRanges(document, marker, line);
+					return lineBreakpointExists(marker.getResource(), ((IJavaLineBreakpoint)breakpoint).getTypeName(), line, marker) == null;
 				}
 				return true;
-			} 
-			catch (BadLocationException e) {JDIDebugUIPlugin.log(e);} 
-			catch (CoreException e) {JDIDebugUIPlugin.log(e);}
-		}
+			}
+			//if the line info is a valid location with an invalid line number,
+			//a line breakpoint must be removed
+			if(isLineBreakpoint(marker) & line == -1) {
+				return false;
+			}
+			MarkerUtilities.setLineNumber(marker, line);
+			if(isLineBreakpoint(marker)) {
+				ensureRanges(document, marker, line);
+			}
+			return true;
+		} 
+		catch (BadLocationException e) {JDIDebugUIPlugin.log(e);} 
+		catch (CoreException e) {JDIDebugUIPlugin.log(e);}
 		return false;
 	}
 	
@@ -153,21 +152,6 @@ public class BreakpointMarkerUpdater implements IMarkerUpdater {
 	}
 	
 	/**
-	 * Properly sets all of the compiler options for the parser used for the breakpoint marker updater
-	 * @param marker
-	 * @param parser
-	 */
-	private void setParserOptions(IMarker marker, ASTParser parser) {
-		IResource resource = marker.getResource();
-		if(resource != null) {
-			IJavaProject jproject = JavaCore.create(resource.getProject());
-			if(jproject != null) {
-				parser.setCompilerOptions(jproject.getOptions(true));
-			}
-		}
-	}
-	
-	/**
 	 * Returns if the specified marker is for an <code>IJavaLineBreakpoint</code>
 	 * @param marker
 	 * @return true if the marker is for an <code>IJavalineBreakpoint</code>, false otherwise
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
index b491e90..50e3bdd 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -367,4 +367,6 @@ public class DebugUIMessages extends NLS {
 	public static String JavaPrimitivesPreferencePage_1;
 	
 	public static String JavaStepFilterPreferencePage__Use_step_filters;
+
+	public static String JavaVariableLabelProvider_0;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
index 0a1c572..ddd5576 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DebugUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -295,6 +295,7 @@ JavaDebugPreferencePage_25=Access & Modification
 JavaDebugPreferencePage_26=Access
 JavaDebugPreferencePage_27=Modification
 JavaDebugPreferencePage_0=See <a>''{0}''</a> for general debug settings.
+JavaVariableLabelProvider_0=unavailable
 EditLogicalStructureDialog_0=Qualified type &name:
 EditLogicalStructureDialog_1=&Browse...
 EditLogicalStructureDialog_2=D&escription:
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DetailFormatterDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DetailFormatterDialog.java
index 42b9a08..2d7dc68 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DetailFormatterDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/DetailFormatterDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,51 +13,15 @@ package org.eclipse.jdt.internal.debug.ui;
 
 import java.util.List;
 
-import com.ibm.icu.text.MessageFormat;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.IHandler;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.StatusDialog;
-
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.source.ISourceViewer;
-
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.SelectionDialog;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.keys.IBindingService;
-
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
@@ -68,16 +32,44 @@ import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchParticipant;
 import org.eclipse.jdt.core.search.SearchPattern;
 import org.eclipse.jdt.core.search.SearchRequestor;
-
 import org.eclipse.jdt.internal.debug.ui.contentassist.DynamicTypeContext;
 import org.eclipse.jdt.internal.debug.ui.contentassist.JavaDebugContentAssistProcessor;
 import org.eclipse.jdt.internal.debug.ui.contentassist.DynamicTypeContext.ITypeProvider;
 import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
-
 import org.eclipse.jdt.ui.IJavaElementSearchConstants;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.text.IJavaPartitions;
 import org.eclipse.jdt.ui.text.JavaTextTools;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.handlers.IHandlerActivation;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
+
+import com.ibm.icu.text.MessageFormat;
 
 /**
  * Dialog for edit detail formatter.
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
index c22df97..7c9ef9b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/EditLogicalStructureDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/ExpressionInformationControlCreator.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/ExpressionInformationControlCreator.java
index 4e24e93..3efdf03 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/ExpressionInformationControlCreator.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/ExpressionInformationControlCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.debug.ui;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.internal.ui.model.elements.ElementContentProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
@@ -85,6 +86,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
 		 */
 		private IVariable fVariable;
 		
+		private IPresentationContext fContext;
 	    private TreeModelViewer fViewer;
 	    private SashForm fSashForm;
 	    private Composite fDetailPaneComposite;
@@ -230,6 +232,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
 		 */
 		public void dispose() {
 			persistSettings(getShell());
+            fContext.dispose();
 			super.dispose();
 		}
 
@@ -272,18 +275,18 @@ public class ExpressionInformationControlCreator implements IInformationControlC
 
 		    // update presentation context
 	        AbstractDebugView view = getViewToEmulate();
-	        IPresentationContext context = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW);
+	        fContext = new PresentationContext(IDebugUIConstants.ID_VARIABLE_VIEW);
 	        if (view != null) {
 	        	// copy over properties
 	        	IPresentationContext copy = ((TreeModelViewer)view.getViewer()).getPresentationContext();
 	        	String[] properties = copy.getProperties();
 	        	for (int i = 0; i < properties.length; i++) {
 					String key = properties[i];
-					context.setProperty(key, copy.getProperty(key));
+					fContext.setProperty(key, copy.getProperty(key));
 				}
 	        }
 	       
-	        fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, context);
+	        fViewer = new TreeModelViewer(fSashForm, SWT.NO_TRIM | SWT.MULTI | SWT.VIRTUAL, fContext);
 	        fViewer.setAutoExpandLevel(1);
 	        
 	        if (view != null) {
@@ -425,7 +428,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
 				}
 			};
 		}
-
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
index 89a7bfc..f583b2b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HeapWalkingPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.core.HeapWalkingManager;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.swt.events.ModifyEvent;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HotCodeReplaceErrorDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HotCodeReplaceErrorDialog.java
index 2fdf4a7..b42e87b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HotCodeReplaceErrorDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/HotCodeReplaceErrorDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,16 +13,23 @@ package org.eclipse.jdt.internal.debug.ui;
 import com.ibm.icu.text.MessageFormat;
 
 import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+
 import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
 
 /**
  * An error dialog reporting a problem with a debug
@@ -66,8 +73,35 @@ public class HotCodeReplaceErrorDialog extends ErrorDialogWithToggle {
 		if (canTerminate && !canDisconnect) {
 			createButton(parent, RESTART_ID, DebugUIMessages.HotCodeReplaceErrorDialog_7, false); 
 		}
+		blockMnemonicWithoutModifier(getToggleButton());
+	}
+
+	/*
+	 * @see org.eclipse.jface.dialogs.Dialog#createButton(org.eclipse.swt.widgets.Composite, int, java.lang.String, boolean)
+	 * @since 3.6
+	 */
+	protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
+		Button button= super.createButton(parent, id, label, defaultButton);
+		blockMnemonicWithoutModifier(button);
+		return button;
 	}
 
+	/**
+	 * Ensures that simple key presses don't activate the given button.
+	 *  
+	 * @param button the button to tweak
+	 * @since 3.6
+	 */
+	protected void blockMnemonicWithoutModifier(Button button) {
+		button.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent e) {
+				if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit == true && e.stateMask != SWT.MOD3) {
+					e.doit= false;
+				}
+			}
+		});
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
index ad85848..fbd6e79 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JDIDebugUIPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -406,10 +406,10 @@ public class JDIDebugUIPlugin extends AbstractUIPlugin {
 		new ExceptionInspector();
 		
 		ResourcesPlugin.getWorkspace().addSaveParticipant(this, new ISaveParticipant() {
-			public void doneSaving(ISaveContext context) {}
-			public void prepareToSave(ISaveContext context)	throws CoreException {}
-			public void rollback(ISaveContext context) {}
-			public void saving(ISaveContext context) throws CoreException {
+			public void doneSaving(ISaveContext sc) {}
+			public void prepareToSave(ISaveContext sc)	throws CoreException {}
+			public void rollback(ISaveContext sc) {}
+			public void saving(ISaveContext sc) throws CoreException {
 				savePluginPreferences();
 			}
 		});
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
index 0504fad..c2220c7 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,8 +24,17 @@ import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ILocalVariable;
 import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.FieldAccess;
+import org.eclipse.jdt.core.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
+import org.eclipse.jdt.core.dom.ThisExpression;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
 import org.eclipse.jdt.debug.core.IJavaReferenceType;
 import org.eclipse.jdt.debug.core.IJavaStackFrame;
@@ -36,6 +45,7 @@ import org.eclipse.jdt.debug.core.IJavaVariable;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.core.logicalstructures.JDIPlaceholderVariable;
 import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jdt.ui.text.java.hover.IJavaEditorTextHover;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.BadLocationException;
@@ -323,6 +333,30 @@ public class JavaDebugHover implements IJavaEditorTextHover, ITextHoverExtension
             		    	}
             		    } else {
             		    	if (!frame.isStatic()) {
+            		    		// ensure that we only resolve a field access on 'this':
+            		    		if (!(codeAssist instanceof ITypeRoot))
+            		    			return null;
+            		    		ITypeRoot typeRoot = (ITypeRoot) codeAssist;
+            		    		ASTNode root= SharedASTProvider.getAST(typeRoot, SharedASTProvider.WAIT_NO, null);
+            		    		if (root == null) {
+	            		    		ASTParser parser = ASTParser.newParser(AST.JLS3);
+	            		    		parser.setSource(typeRoot);
+	            		    		parser.setFocalPosition(hoverRegion.getOffset());
+									root = parser.createAST(null);
+            		    		}
+            		    		ASTNode node = NodeFinder.perform(root, hoverRegion.getOffset(), hoverRegion.getLength());
+            		    		if (node == null)
+            		    			return null;
+								StructuralPropertyDescriptor locationInParent = node.getLocationInParent();
+								if (locationInParent == FieldAccess.NAME_PROPERTY) {
+									FieldAccess fieldAccess = (FieldAccess) node.getParent();
+									if (!(fieldAccess.getExpression() instanceof ThisExpression)) {
+										return null;
+									}
+								} else if (locationInParent == QualifiedName.NAME_PROPERTY) {
+									return null;
+								}
+            		    		
             		    		String typeSignature = Signature.createTypeSignature(field.getDeclaringType().getFullyQualifiedName(), true);
             		    		typeSignature = typeSignature.replace('.', '/');
             		    		variable = frame.getThis().getField(field.getElementName(), typeSignature);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
index e0f1b96..e7a66fa 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.debug.ui;
 
  
 import org.eclipse.core.runtime.Preferences;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
 import org.eclipse.jdt.debug.core.JDIDebugModel;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
index 62fa9dc..acf0254 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,20 +133,11 @@ public class JavaDetailFormattersManager implements IPropertyChangeListener, IDe
 	 * @param listener the listener
 	 */	
 	public void computeValueDetail(final IJavaValue objectValue, final IJavaThread thread, final IValueDetailListener listener) {
-		Runnable postEventDispatch = new Runnable() {
+		thread.queueRunnable(new Runnable() {
 			public void run() {
-				if (!thread.isSuspended() && !thread.isPerformingEvaluation()) {
-					listener.detailComputed(objectValue, DebugUIMessages.JavaDetailFormattersManager_9); 
-				} else {
-					thread.queueRunnable(new Runnable() {
-						public void run() {
-							resolveFormatter(objectValue, thread, listener);
-						}
-					});
-				}
+				resolveFormatter(objectValue, thread, listener);
 			}
-		};
-		DebugPlugin.getDefault().asyncExec(postEventDispatch);
+		});
 	}
 	
 	private void resolveFormatter(final IJavaValue value, final IJavaThread thread, final IValueDetailListener listener) {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
index 9319b1c..e300793 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaLogicalStructuresPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.core.logicalstructures.JavaLogicalStructure;
 import org.eclipse.jdt.internal.debug.core.logicalstructures.JavaLogicalStructures;
 import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
index b12072c..136731c 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaStepFilterPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.debug.ui;
 
 import java.util.ArrayList;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IType;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaWordFinder.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaWordFinder.java
index 66370b0..c53eccc 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaWordFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaWordFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.ui;
  
+
+import com.ibm.icu.text.UTF16;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -22,8 +25,8 @@ import org.eclipse.jface.text.Region;
 public class JavaWordFinder {
 	
 	/**
-	 * Returns the IRegion containing the java identifier ("word") enclosing the specified offset or 
-	 * <code>null</code> if the document or offset is invalid.  Checks characters before and after the 
+	 * Returns the IRegion containing the java identifier ("word") enclosing the specified offset or
+	 * <code>null</code> if the document or offset is invalid.  Checks characters before and after the
 	 * offset to see if they are allowed java identifier characters until a separator character (period,
 	 * space, etc) is found.
 	 * 
@@ -48,8 +51,20 @@ public class JavaWordFinder {
 			
 			while (pos >= 0) {
 				c= document.getChar(pos);
-				if (!Character.isJavaIdentifierPart(c))
-					break;
+				if (!Character.isJavaIdentifierPart(c)) {
+					// Check for surrogates
+					if (UTF16.isSurrogate(c)) {
+						/*
+						 * XXX: Here we should create the code point and test whether it is a Java
+						 * identifier part. Currently this is not possible because
+						 * java.lang.Character in 1.4 does not support surrogates and because
+						 * com.ibm.icu.lang.UCharacter.isJavaIdentifierPart(int) is not correctly
+						 * implemented.
+						 */
+					} else {
+						break;
+					}
+				}
 				--pos;
 			}
 			
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/SWTFactory.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/SWTFactory.java
deleted file mode 100644
index 96bd7bd..0000000
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/SWTFactory.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.debug.ui;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
-/**
- * Factory class to create SWT resources.
- * @since 3.3
- */
-public class SWTFactory {
-	
-	/**
-	 * Returns a width hint for a button control.
-	 */
-	public static int getButtonWidthHint(Button button) {
-		button.setFont(JFaceResources.getDialogFont());
-		PixelConverter converter= new PixelConverter(button);
-		int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
-		return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
-	}
-	
-	/**
-	 * Sets width and height hint for the button control.
-	 * <b>Note:</b> This is a NOP if the button's layout data is not
-	 * an instance of <code>GridData</code>.
-	 * 
-	 * @param	the button for which to set the dimension hint
-	 */		
-	public static void setButtonDimensionHint(Button button) {
-		Object gd= button.getLayoutData();
-		if (gd instanceof GridData) {
-			((GridData)gd).widthHint= getButtonWidthHint(button);	
-			((GridData)gd).horizontalAlignment = GridData.FILL;	 
-		}
-	}		
-	
-	
-	/**
-	 * Creates and returns a new push button with the given
-	 * label and/or image.
-	 * 
-	 * @param parent parent control
-	 * @param label button label or <code>null</code>
-	 * @param image image or <code>null</code>
-	 * 
-	 * @return a new push button
-	 */
-	public static Button createPushButton(Composite parent, String label, Image image) {
-		Button button = new Button(parent, SWT.PUSH);
-		button.setFont(parent.getFont());
-		if (image != null) {
-			button.setImage(image);
-		}
-		if (label != null) {
-			button.setText(label);
-		}
-		GridData gd = new GridData();
-		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
-		return button;	
-	}	
-
-	/**
-	 * Creates and returns a new push button with the given
-	 * label, tooltip and/or image.
-	 * 
-	 * @param parent parent control
-	 * @param label button label or <code>null</code>
-	 * @param tooltip the tooltip text for the button or <code>null</code>
-	 * @param image image of <code>null</code>
-	 * 
-	 * @return a new push button
-	 */
-	public static Button createPushButton(Composite parent, String label, String tooltip, Image image) {
-		Button button = createPushButton(parent, label, image);
-		button.setToolTipText(tooltip);
-		return button;
-	}
-	
-	/**
-	 * Creates and returns a new radio button with the given
-	 * label.
-	 * 
-	 * @param parent parent control
-	 * @param label button label or <code>null</code>
-	 * 
-	 * @return a new radio button
-	 */
-	public static Button createRadioButton(Composite parent, String label) {
-		Button button = new Button(parent, SWT.RADIO);
-		button.setFont(parent.getFont());
-		if (label != null) {
-			button.setText(label);
-		}
-		GridData gd = new GridData();
-		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
-		return button;	
-	}	
-	
-	/**
-	 * Creates and returns a new radio button with the given
-	 * label.
-	 * 
-	 * @param parent parent control
-	 * @param label button label or <code>null</code>
-	 * @param hspan the number of columns to span in the parent composite
-	 * 
-	 * @return a new radio button
-	 */
-	public static Button createRadioButton(Composite parent, String label, int hspan) {
-		Button button = new Button(parent, SWT.RADIO);
-		button.setFont(parent.getFont());
-		if (label != null) {
-			button.setText(label);
-		}
-		GridData gd = new GridData(GridData.BEGINNING);
-		gd.horizontalSpan = hspan;
-		button.setLayoutData(gd);	
-		SWTFactory.setButtonDimensionHint(button);
-		return button;	
-	}
-	
-	/**
-	 * Creates a check box button using the parents' font
-	 * @param parent the parent to add the button to
-	 * @param label the label for the button
-	 * @param image the image for the button 
-	 * @param checked the initial checked state of the button
-	 * @param hspan the horizontal span to take up in the parent composite
-	 * @return a new checked button set to the initial checked state
-	 */
-	public static Button createCheckButton(Composite parent, String label, Image image, boolean checked, int hspan) {
-		Button button = new Button(parent, SWT.CHECK);
-		button.setFont(parent.getFont());
-		button.setSelection(checked);
-		if(image != null) {
-			button.setImage(image);
-		}
-		if(label != null) {
-			button.setText(label);
-		}
-		GridData gd = new GridData();
-		gd.horizontalSpan = hspan;
-		button.setLayoutData(gd);
-		setButtonDimensionHint(button);
-		return button;
-	}
-	
-	/**
-	 * Creates a new label widget
-	 * @param parent the parent composite to add this label widget to
-	 * @param text the text for the label
-	 * @param hspan the horizontal span to take up in the parent composite
-	 * @return the new label
-	 */
-	public static Label createLabel(Composite parent, String text, Font font, int hspan) {
-		Label l = new Label(parent, SWT.NONE);
-		l.setFont(font);
-		l.setText(text);
-		GridData gd = new GridData();
-		gd.horizontalSpan = hspan;
-		l.setLayoutData(gd);
-		return l;
-	}
-	
-	/**
-	 * Creates a new label widget
-	 * @param parent the parent composite to add this label widget to
-	 * @param text the text for the label
-	 * @param hspan the horizontal span to take up in the parent composite
-	 * @return the new label
-	 */
-	public static Label createLabel(Composite parent, String text, int hspan) {
-		Label l = new Label(parent, SWT.NONE);
-		l.setFont(parent.getFont());
-		l.setText(text);
-		GridData gd = new GridData();
-		gd.horizontalSpan = hspan;
-		l.setLayoutData(gd);
-		return l;
-	}
-	
-	/**
-	 * Creates a wrapping label
-	 * @param parent the parent composite to add this label to
-	 * @param text the text to be displayed in the label
-	 * @param hspan the horizontal span that label should take up in the parent composite
-	 * @param wrapwidth the width hint that the label should wrap at
-	 * @return a new label that wraps at a specified width
-	 */
-	public static Label createWrapLabel(Composite parent, String text, int hspan, int wrapwidth) {
-		Label l = new Label(parent, SWT.WRAP);
-		l.setFont(parent.getFont());
-		l.setText(text);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = hspan;
-		gd.widthHint = wrapwidth;
-		l.setLayoutData(gd);
-		return l;
-	}
-	
-	/**
-	 * Creates a new text widget 
-	 * @param parent the parent composite to add this text widget to
-	 * @param hspan the horizontal span to take up on the parent composite
-	 * @return the new text widget
-	 */
-	public static Text createSingleText(Composite parent, int hspan) {
-    	Text t = new Text(parent, SWT.SINGLE | SWT.BORDER);
-    	t.setFont(parent.getFont());
-    	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-    	gd.horizontalSpan = hspan;
-    	t.setLayoutData(gd);
-    	return t;
-    }
-	
-	/**
-	 * Creates a new text widget 
-	 * @param parent the parent composite to add this text widget to
-	 * @param style the style bits for the text widget
-	 * @param hspan the horizontal span to take up on the parent composite
-	 * @param text the initial text, not <code>null</code>
-	 * @return the new text widget
-	 */
-	public static Text createText(Composite parent, int style, int hspan, String text) {
-    	Text t = new Text(parent, style);
-    	t.setFont(parent.getFont());
-    	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-    	gd.horizontalSpan = hspan;
-    	t.setLayoutData(gd);
-    	t.setText(text);
-    	return t;
-    }
-	
-	/**
-	 * Creates a Group widget
-	 * @param parent the parent composite to add this group to
-	 * @param text the text for the heading of the group
-	 * @param columns the number of columns within the group
-	 * @param hspan the horizontal span the group should take up on the parent
-	 * @param fill the style for how this composite should fill into its parent
-	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
-	 * @return the new group
-	 */
-	public static Group createGroup(Composite parent, String text, int columns, int hspan, int fill) {
-    	Group g = new Group(parent, SWT.NONE);
-    	g.setLayout(new GridLayout(columns, false));
-    	g.setText(text);
-    	g.setFont(parent.getFont());
-    	GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-    	g.setLayoutData(gd);
-    	return g;
-    }
-	
-	/**
-	 * This method allows us to open the preference dialog on the specific page
-	 * @param id the id of pref page to show
-	 */
-	public static void showPreferencePage(String id) {
-		PreferencesUtil.createPreferenceDialogOn(JDIDebugUIPlugin.getShell(), id, new String[] { id }, null).open();
-	}
-	
-	/**
-	 * This method allows users to open a specific preference page and supply a custom
-	 * set of page filter items.
-	 * 
-	 * This alternative to <code>showPreferencePage(String)</code> allows other related 
-	 * pref pages to be shown at the same time at the developers/context discretion.
-	 * All pages can be shown if <code>null</code> is passed.  
-	 * 
-	 * @param page_id the id for the page to open
-	 * @param page_filters the listing of pages to be shown in the dialog
-	 * @since 3.3
-	 */
-	public static void showPreferencePage(String page_id, String[] page_filters) {
-		PreferencesUtil.createPreferenceDialogOn(JDIDebugUIPlugin.getShell(), page_id, page_filters, null).open();
-	}
-	
-	/**
-	 * Creates a composite that uses the parent's font and has a grid layout
-	 * @param parent the parent to add the composite to
-	 * @param columns the number of columns the composite should have
-	 * @param hspan the horizontal span the new composite should take up in the parent
-	 * @param fill the fill style of the composite {@link GridData}
-	 * @return a new composite with a grid layout
-	 * 
-	 * @since 3.3
-	 */
-	public static Composite createComposite(Composite parent, int columns, int hspan, int fill) {
-		Composite g = new Composite(parent, SWT.NONE);
-    	g.setLayout(new GridLayout(columns, false));
-    	g.setFont(parent.getFont());
-    	GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-    	g.setLayoutData(gd);
-    	return g;
-	}
-	
-	/**
-	 * Creates a Composite widget
-	 * @param parent the parent composite to add this composite to
-	 * @param columns the number of columns within the composite
-	 * @param hspan the horizontal span the composite should take up on the parent
-	 * @param fill the style for how this composite should fill into its parent
-	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
-	 * @return the new group
-	 */
-	public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
-    	Composite g = new Composite(parent, SWT.NONE);
-    	g.setLayout(new GridLayout(columns, false));
-    	g.setFont(font);
-    	GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-    	g.setLayoutData(gd);
-    	return g;
-    }
-	
-	/**
-	 * Creates a Composite widget
-	 * @param parent the parent composite to add this composite to
-	 * @param columns the number of columns within the composite
-	 * @param hspan the horizontal span the composite should take up on the parent
-	 * @param fill the style for how this composite should fill into its parent
-	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
-	 * @param marginwidth the width of the margin to place around the composite (default is 5, specified by GridLayout)
-	 * @param marginheight the height of the margin to place around the composite (default is 5, specified by GridLayout)
-	 * @return the new group
-	 */
-	public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
-		Composite g = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout(columns, false);
-		layout.marginWidth = marginwidth;
-		layout.marginHeight = marginheight;
-    	g.setLayout(layout);
-    	g.setFont(font);
-    	GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-    	g.setLayoutData(gd);
-    	return g;
-	}
-	
-	/**
-	 * creates a vertical spacer for separating components
-	 * @param comp
-	 * @param numlines
-	 */
-	public static void createVerticalSpacer(Composite comp, int numlines) {
-		Label lbl = new Label(comp, SWT.NONE);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.heightHint = numlines;
-		lbl.setLayoutData(gd);
-	}
-	
-	/**
-	 * creates a horizontal spacer for separating components
-	 * @param comp
-	 * @param numlines
-	 */
-	public static void createHorizontalSpacer(Composite comp, int numlines) {
-		Label lbl = new Label(comp, SWT.NONE);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = numlines;
-		lbl.setLayoutData(gd);
-	}
-	
-	/**
-	 * This method is used to make a combo box
-	 * @param parent the parent composite to add the new combo to
-	 * @param style the style for the Combo
-	 * @param hspan the horizontal span to take up on the parent composite
-	 * @param fill how the combo will fill into the composite
-	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
-	 * @param items the item to put into the combo
-	 * @return a new Combo instance
-	 */
-	public static Combo createCombo(Composite parent, int style, int hspan, int fill, String[] items) {
-		Combo c = new Combo(parent, style);
-		c.setFont(parent.getFont());
-		GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-		c.setLayoutData(gd);
-		if (items != null){
-			c.setItems(items);			
-		}
-		// Some platforms open up combos in bad sizes without this, see bug 245569
-		c.setVisibleItemCount(30);
-		c.select(0);
-		return c;
-	}
-	
-	/**
-	 * This method is used to make a combo box with a default fill style of GridData.FILL_HORIZONTAL
-	 * @param parent the parent composite to add the new combo to
-	 * @param style the style for the Combo
-	 * @param hspan the horizontal span to take up on the parent composite
-	 * @param items the item to put into the combo
-	 * @return a new Combo instance
-	 */
-	public static Combo createCombo(Composite parent, int style, int hspan, String[] items) {
-		Combo c = new Combo(parent, style);
-		c.setFont(parent.getFont());
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = hspan;
-		c.setLayoutData(gd);
-		if (items != null){
-			c.setItems(items);
-		}
-		// Some platforms open up combos in bad sizes without this, see bug 245569
-		c.setVisibleItemCount(30);
-		c.select(0);
-		return c;
-	}
-	
-	/**
-	 * Creates an ExpandibleComposite widget
-	 * @param parent the parent to add this widget to
-	 * @param style the style for ExpandibleComposite expanding handle, and layout
-	 * @param label the label for the widget
-	 * @param hspan how many columns to span in the parent
-	 * @param fill the fill style for the widget
-	 * Can be one of <code>GridData.FILL_HORIZONAL</code>, <code>GridData.FILL_BOTH</code> or <code>GridData.FILL_VERTICAL</code>
-	 * @return a new ExpandibleComposite widget
-	 */
-	public static ExpandableComposite createExpandibleComposite(Composite parent, int style, String label, int hspan, int fill) {
-		ExpandableComposite ex = new ExpandableComposite(parent, SWT.NONE, style);
-		ex.setText(label);
-		ex.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
-		GridData gd = new GridData(fill);
-		gd.horizontalSpan = hspan;
-		ex.setLayoutData(gd);
-		return ex;
-	}
-	
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
index c18a05b..b5da0f7 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/BreakpointLocationVerifierJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,19 +13,13 @@ package org.eclipse.jdt.internal.debug.ui.actions;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
 import org.eclipse.jdt.debug.core.JDIDebugModel;
@@ -46,11 +40,6 @@ import com.ibm.icu.text.MessageFormat;
  * Job used to verify the position of a breakpoint
  */
 public class BreakpointLocationVerifierJob extends Job {
-
-	/**
-	 * The document which contains the code source.
-	 */
-	private IDocument fDocument;
 	
 	/**
 	 * The temporary breakpoint that has been set. Can be <code>null</code> if the callee was not able
@@ -75,37 +64,52 @@ public class BreakpointLocationVerifierJob extends Job {
 	private IType fType;
 	
 	/**
-	 * Indicate if the search for a valid location should be limited to a line
-	 * or expanded to field and method declaration.
+	 * The current IEditorPart
 	 */
-	private boolean fBestMatch;
-
+	private IEditorPart fEditorPart;
+	
 	/**
-	 * The resource in which should be set the breakpoint.
+	 * The parsed {@link CompilationUnit}
 	 */
-	private IResource fResource;
+	CompilationUnit fCunit = null;
 	
 	/**
-	 * The current IEditorPart
+	 * The document context
 	 */
-	private IEditorPart fEditorPart;
+	private IDocument fDocument = null;
 	
 	/**
 	 * The status line to use to display errors
 	 */
 	private IEditorStatusLine fStatusLine;
 	
-	public BreakpointLocationVerifierJob(IDocument document, IJavaLineBreakpoint breakpoint, int lineNumber, boolean bestMatch, String typeName, IType type, IResource resource, IEditorPart editorPart) {
+	/**
+	 * If a best guess should be made at the breakpoint location
+	 */
+	private boolean fBestMatch = false;
+	
+	/**
+	 * Constructor
+	 * @param document
+	 * @param cunit
+	 * @param breakpoint
+	 * @param lineNumber
+	 * @param typeName
+	 * @param type
+	 * @param editorPart
+	 * @param bestmatch
+	 */
+	public BreakpointLocationVerifierJob(IDocument document, CompilationUnit cunit, IJavaLineBreakpoint breakpoint, int lineNumber, String typeName, IType type, IEditorPart editorPart, boolean bestmatch) {
 		super(ActionMessages.BreakpointLocationVerifierJob_breakpoint_location); 
-		fDocument= document;
-		fBreakpoint= breakpoint;
-		fLineNumber= lineNumber;
-		fBestMatch= bestMatch;
-		fTypeName= typeName;
-		fType= type;
-		fResource= resource;
-		fEditorPart= editorPart;
-		fStatusLine= (IEditorStatusLine) editorPart.getAdapter(IEditorStatusLine.class);
+		fCunit = cunit;
+		fDocument = document;
+		fBreakpoint = breakpoint;
+		fLineNumber = lineNumber;
+		fTypeName = typeName;
+		fType = type;
+		fEditorPart = editorPart;
+		fBestMatch = bestmatch;
+		fStatusLine = (IEditorStatusLine) editorPart.getAdapter(IEditorStatusLine.class);
 		setSystem(true);
 	}
 	
@@ -113,63 +117,10 @@ public class BreakpointLocationVerifierJob extends Job {
 	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public IStatus run(IProgressMonitor monitor) {
-		ASTParser parser = ASTParser.newParser(AST.JLS3);
-		char[] source = fDocument.get().toCharArray();
-		parser.setSource(source);
-		IJavaElement javaElement = JavaCore.create(fResource);
-		IJavaProject project= null;
-		if (javaElement != null) {
-			Map options=JavaCore.getDefaultOptions();
-            project= javaElement.getJavaProject();
-            String compilerCompliance = JavaCore.VERSION_1_5;
-            String compilerSource = JavaCore.VERSION_1_5;
-            if (project != null) {
-                compilerCompliance = project.getOption(JavaCore.COMPILER_COMPLIANCE, true);
-                compilerSource = project.getOption(JavaCore.COMPILER_SOURCE, true);
-            }
-            options.put(JavaCore.COMPILER_COMPLIANCE, compilerCompliance);
-            options.put(JavaCore.COMPILER_SOURCE, compilerSource);
-			parser.setCompilerOptions(options);
-		}
-		CompilationUnit compilationUnit= (CompilationUnit)parser.createAST(null);
-		ValidBreakpointLocationLocator locator= new ValidBreakpointLocationLocator(compilationUnit, fLineNumber, false, fBestMatch);
-		compilationUnit.accept(locator);
-		if (locator.isBindingsRequired()) {
-			if (javaElement != null) {
-				// try again with bindings if required and available
-				String unitName = null;
-				if (fType == null) {
-					String name = fResource.getName();
-					if (JavaCore.isJavaLikeFileName(name)) {
-						unitName = name;
-					}
-				} else {
-					if (fType.isBinary()) {
-						String className= fType.getClassFile().getElementName();
-						int nameLength= className.indexOf('$');
-						if (nameLength < 0) {
-							nameLength= className.indexOf('.');
-						}
-						unitName= className.substring(0, nameLength) + ".java"; //$NON-NLS-1$
-					} else {
-						unitName= fType.getCompilationUnit().getElementName();
-					}
-				}
-				if (unitName != null) {
-					parser = ASTParser.newParser(AST.JLS3);
-					parser.setSource(source);
-					parser.setProject(project);
-					parser.setUnitName(unitName);
-					parser.setResolveBindings(true);
-					compilationUnit= (CompilationUnit)parser.createAST(null);
-					locator= new ValidBreakpointLocationLocator(compilationUnit, fLineNumber, true, fBestMatch);
-					compilationUnit.accept(locator);
-				}
-			}
-		}
-		int lineNumber= locator.getLineLocation();		
-		String typeName= locator.getFullyQualifiedTypeName();
-		
+		ValidBreakpointLocationLocator locator = new ValidBreakpointLocationLocator(fCunit, fLineNumber, true, fBestMatch);
+		fCunit.accept(locator);
+		int lineNumber = locator.getLineLocation();		
+		String typeName = locator.getFullyQualifiedTypeName();
 		try {
 			switch (locator.getLocationType()) {
 				case ValidBreakpointLocationLocator.LOCATION_LINE:
@@ -211,7 +162,7 @@ public class BreakpointLocationVerifierJob extends Job {
 	public IStatus manageLineBreakpoint(String typeName, int lineNumber) {
 		try {
 			boolean differentLineNumber= lineNumber != fLineNumber;
-			IJavaLineBreakpoint breakpoint= JDIDebugModel.lineBreakpointExists(fResource, typeName, lineNumber);
+			IJavaLineBreakpoint breakpoint= JDIDebugModel.lineBreakpointExists(fBreakpoint.getMarker().getResource(), typeName, lineNumber);
 			boolean breakpointExist= breakpoint != null;
 			if (fBreakpoint == null) {
 				if (breakpointExist) {
@@ -264,7 +215,7 @@ public class BreakpointLocationVerifierJob extends Job {
 		int start = -1, end = -1;
 		if (fType != null) {
 			try {
-				IRegion line= fDocument.getLineInformation(lineNumber - 1);
+				IRegion line = fDocument.getLineInformation(lineNumber - 1);
 				start = line.getOffset();
 				end = start + line.getLength();
 				
@@ -273,7 +224,7 @@ public class BreakpointLocationVerifierJob extends Job {
 			}
 			BreakpointUtils.addJavaBreakpointAttributes(newAttributes, fType);
 		}
-		JDIDebugModel.createLineBreakpoint(fResource, typeName, lineNumber, start, end, 0, true, newAttributes);
+		JDIDebugModel.createLineBreakpoint(fBreakpoint.getMarker().getResource(), typeName, lineNumber, start, end, 0, true, newAttributes);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EditStepFiltersAction.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EditStepFiltersAction.java
index a8c61a9..f11c0df 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EditStepFiltersAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EditStepFiltersAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.ui.actions;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.JavaStepFilterPreferencePage;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.ui.actions.ActionDelegate;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
index bf2a1bb..34617a0 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExpressionInputDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  Copyright (c) 2004, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -15,12 +15,12 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.debug.core.IJavaVariable;
 import org.eclipse.jdt.internal.debug.core.model.JDINullValue;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
 import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.contentassist.CurrentFrameContext;
 import org.eclipse.jdt.internal.debug.ui.contentassist.JavaDebugContentAssistProcessor;
 import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
@@ -330,7 +330,6 @@ public class ExpressionInputDialog extends TrayDialog {
 	 */
     protected void okPressed() {
         fResult= getText();
-		dispose();
         super.okPressed();
     }
     
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenTypeAction.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenTypeAction.java
index 776d614..ff65059 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenTypeAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/OpenTypeAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,33 +11,37 @@
 package org.eclipse.jdt.internal.debug.ui.actions;
 
 
-import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.model.IDebugElement;
+
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.search.IJavaSearchConstants;
 import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
+import org.eclipse.jdt.core.search.TypeNameMatch;
+import org.eclipse.jdt.core.search.TypeNameMatchRequestor;
+
 import org.eclipse.jdt.debug.core.IJavaArrayType;
 import org.eclipse.jdt.debug.core.IJavaType;
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IDebugElement;
+
 import org.eclipse.jdt.internal.debug.core.JavaDebugUtils;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+
 import org.eclipse.jdt.internal.ui.util.OpenTypeHierarchyUtil;
+
 import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.IStructuredSelection;
 
 public abstract class OpenTypeAction extends ObjectActionDelegate {
 	
@@ -140,32 +144,39 @@ public abstract class OpenTypeAction extends ObjectActionDelegate {
 	 * @throws JavaModelException
 	 */
 	public static IType findTypeInWorkspace(String typeName) throws CoreException {
-		IType[] types= findTypes(typeName, null);
-		if (types.length > 0) {
-			return types[0];
+		int dot= typeName.lastIndexOf('.');
+		char[][] qualifications;
+		String simpleName;
+		if (dot != -1) {
+			qualifications= new char[][] { typeName.substring(0, dot).toCharArray() };
+			simpleName= typeName.substring(dot + 1);
+		} else {
+			qualifications= null;
+			simpleName= typeName;
 		}
-		return null;
-	}
-	
-	private static IType[] findTypes(String typeName, IProgressMonitor monitor) throws CoreException {
+		char[][] typeNames= new char[][] { simpleName.toCharArray() };
 		
-		final List results= new ArrayList();
-		
-		SearchRequestor collector= new SearchRequestor() {
-			public void acceptSearchMatch(SearchMatch match) throws CoreException {
-				Object element= match.getElement();
-				if (element instanceof IType)
-					results.add(element);
+		class ResultException extends RuntimeException {
+			private static final long serialVersionUID= 1L;
+			private final IType fType;
+			public ResultException(IType type) {
+				fType= type;
+			}
+		}
+		TypeNameMatchRequestor requestor= new TypeNameMatchRequestor() {
+			public void acceptTypeNameMatch(TypeNameMatch match) {
+				throw new ResultException(match.getType());
 			}
 		};
-		
-		SearchEngine engine= new SearchEngine();
-		SearchPattern pattern= SearchPattern.createPattern(typeName, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
-		engine.search(pattern, new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, SearchEngine.createWorkspaceScope(), collector, monitor);
-		
-		return (IType[]) results.toArray(new IType[results.size()]);
+		try {
+			new SearchEngine().searchAllTypeNames(qualifications, typeNames, SearchEngine.createWorkspaceScope(), requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
+		} catch (ResultException e) {
+			return e.fType;
+		}
+		return null;
 	}
 	
+	
 	protected void typeHierarchyError() {
 		showErrorMessage(ActionMessages.ObjectActionDelegate_Unable_to_display_type_hierarchy__The_selected_source_element_is_not_contained_in_the_workspace__1); 
 	}	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ProjectSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ProjectSelectionDialog.java
index 87fc1ca..1610686 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ProjectSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ProjectSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,7 @@ public class ProjectSelectionDialog extends AbstractDebugCheckboxSelectionDialog
 	public ProjectSelectionDialog(Shell parentShell, List projects){
 		super(parentShell);
 		setShellStyle(getShellStyle() | SWT.RESIZE);
+		setShowSelectAllButtons(true);
 		fProjects = projects;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ShowStratumAction.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ShowStratumAction.java
index ed8b7eb..ad7fe5e 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ShowStratumAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ShowStratumAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import org.eclipse.debug.core.DebugEvent;
 import org.eclipse.debug.core.DebugException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IStackFrame;
-import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupManager;
+import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
 import org.eclipse.jdt.debug.core.IJavaReferenceType;
 import org.eclipse.jdt.debug.core.IJavaStackFrame;
@@ -100,19 +100,21 @@ public class ShowStratumAction implements IObjectActionDelegate, IMenuCreator {
     private void fillMenu(Menu m) {
         IStackFrame frame = (IStackFrame) fSelection.getFirstElement();
         final IJavaStackFrame javaStackFrame = (IJavaStackFrame) frame.getAdapter(IJavaStackFrame.class);
-        try {
-            IJavaReferenceType declaringType = javaStackFrame.getReferenceType();
-            final IJavaDebugTarget target = (IJavaDebugTarget) javaStackFrame.getDebugTarget();
-            String currentStratum = target.getDefaultStratum();
-            String[] strata = declaringType.getAvailableStrata();
-            for (int i = 0; i < strata.length; i++) {
-                final String stratum = strata[i];
-                MenuItem item = createMenuItem(m, stratum, javaStackFrame, target);
-                item.setSelection(stratum.equals(currentStratum));
-            }
-            MenuItem item = createMenuItem(m, null, javaStackFrame, target);
-            item.setSelection(currentStratum == null);
-        } catch (DebugException e) {
+        if (javaStackFrame != null) {
+	        try {
+	            IJavaReferenceType declaringType = javaStackFrame.getReferenceType();
+	            final IJavaDebugTarget target = (IJavaDebugTarget) javaStackFrame.getDebugTarget();
+	            String currentStratum = target.getDefaultStratum();
+	            String[] strata = declaringType.getAvailableStrata();
+	            for (int i = 0; i < strata.length; i++) {
+	                final String stratum = strata[i];
+	                MenuItem item = createMenuItem(m, stratum, javaStackFrame, target);
+	                item.setSelection(stratum.equals(currentStratum));
+	            }
+	            MenuItem item = createMenuItem(m, null, javaStackFrame, target);
+	            item.setSelection(currentStratum == null);
+	        } catch (DebugException e) {
+	        }
         }
     }
     
@@ -132,8 +134,10 @@ public class ShowStratumAction implements IObjectActionDelegate, IMenuCreator {
                 }
                 DebugEvent event = new DebugEvent(frame, DebugEvent.CHANGE, DebugEvent.CONTENT);
                 DebugPlugin.getDefault().fireDebugEventSet(new DebugEvent[]{event});
-                // TODO: post 3.2 - make API to force source lookup
-                SourceLookupManager.getDefault().displaySource(frame, fPart.getSite().getPage(), true);
+                ISourceDisplay display = (ISourceDisplay) frame.getAdapter(ISourceDisplay.class);
+                if (display != null) {
+                	display.displaySource(frame, fPart.getSite().getPage(), true);
+                }
             }
         });
         return item;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/StringValueInputDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/StringValueInputDialog.java
index fcb5e74..a701ba9 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/StringValueInputDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/StringValueInputDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  Copyright (c) 2004, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,10 +11,10 @@
 package org.eclipse.jdt.internal.debug.ui.actions;
 
 import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.debug.core.IJavaVariable;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.text.Document;
 import org.eclipse.jface.text.DocumentEvent;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
index 07b4d09..5a722b3 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ToggleBreakpointAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IPackageDeclaration;
@@ -45,9 +46,15 @@ import org.eclipse.jdt.core.ITypeParameter;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.SourceRange;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimpleType;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
 import org.eclipse.jdt.debug.core.IJavaClassPrepareBreakpoint;
 import org.eclipse.jdt.debug.core.IJavaFieldVariable;
@@ -63,6 +70,7 @@ import org.eclipse.jdt.internal.debug.ui.DebugWorkingCopyManager;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
 import org.eclipse.jdt.ui.IWorkingCopyManager;
 import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -170,7 +178,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
      * @see org.eclipse.debug.ui.actions.IToggleBreakpointsTarget#toggleLineBreakpoints(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
      */
     public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
-    	toggleLineBreakpoints(part, selection, false);
+    	toggleLineBreakpoints(part, selection, false, null);
     }
     
     /**
@@ -179,7 +187,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
      * @param selection the current selection
      * @param bestMatch if we should make a best match or not
      */
-    public void toggleLineBreakpoints(final IWorkbenchPart part, final ISelection selection, final boolean bestMatch) {
+    public void toggleLineBreakpoints(final IWorkbenchPart part, final ISelection selection, final boolean bestMatch, final ValidBreakpointLocationLocator locator) {
         Job job = new Job("Toggle Line Breakpoint") { //$NON-NLS-1$
             protected IStatus run(IProgressMonitor monitor) {
             	ITextEditor editor = getTextEditor(part);
@@ -206,9 +214,15 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
 	                    	else {
 	                    		type = member.getDeclaringType();
 	                    	}
-	                    	String tname = createQualifiedTypeName(type);
+	                    	String tname = null;
+	                    	IJavaProject project = type.getJavaProject();
+	                    	if (locator == null || (project != null && !project.isOnClasspath(type))) {
+	                    		tname = createQualifiedTypeName(type);
+	                    	} else {
+	                    		tname = locator.getFullyQualifiedTypeName();
+	                    	}
 	                    	IResource resource = BreakpointUtils.getBreakpointResource(type);
-							int lnumber = ((ITextSelection) selection).getStartLine() + 1;
+							int lnumber = locator == null ? ((ITextSelection) selection).getStartLine() + 1 : locator.getLineLocation();
 							IJavaLineBreakpoint existingBreakpoint = JDIDebugModel.lineBreakpointExists(resource, tname, lnumber);
 							if (existingBreakpoint != null) {
 								DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(existingBreakpoint, true);
@@ -229,7 +243,9 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
 							catch (BadLocationException ble) {JDIDebugUIPlugin.log(ble);}
 							BreakpointUtils.addJavaBreakpointAttributes(attributes, type);
 							IJavaLineBreakpoint breakpoint = JDIDebugModel.createLineBreakpoint(resource, tname, lnumber, charstart, charend, 0, true, attributes);
-							new BreakpointLocationVerifierJob(document, breakpoint, lnumber, bestMatch, tname, type, resource, editor).schedule();
+							if(locator == null) {
+								new BreakpointLocationVerifierJob(document, parseCompilationUnit(type.getTypeRoot()), breakpoint, lnumber, tname, type, editor, bestMatch).schedule();
+							}
 	                    }
 	                    else {
 	                    	report(ActionMessages.ToggleBreakpointAdapter_3, part);
@@ -321,7 +337,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
                                         return Status.OK_STATUS;
                                     }
                                 }
-                                JDIDebugModel.createMethodBreakpoint(BreakpointUtils.getBreakpointResource(members[i]), createQualifiedTypeName(type), mname, signature, true, false, false, -1, start, end, 0, true, attributes);
+                                JDIDebugModel.createMethodBreakpoint(BreakpointUtils.getBreakpointResource(members[i]), getQualifiedName(type), mname, signature, true, false, false, -1, start, end, 0, true, attributes);
                             } else {
                             	DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true);
                             }
@@ -382,7 +398,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
 								start = range.getOffset();
 								end = start + range.getLength();
 							}
-							JDIDebugModel.createClassPrepareBreakpoint(BreakpointUtils.getBreakpointResource(member), createQualifiedTypeName(type), IJavaClassPrepareBreakpoint.TYPE_CLASS, start, end, true, map);
+							JDIDebugModel.createClassPrepareBreakpoint(BreakpointUtils.getBreakpointResource(member), getQualifiedName(type), IJavaClassPrepareBreakpoint.TYPE_CLASS, start, end, true, map);
 						}
 					}
 					else {
@@ -414,7 +430,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
     	IJavaBreakpoint breakpoint = null;
     	for (int i = 0; i < breakpoints.length; i++) {
 			breakpoint = (IJavaBreakpoint) breakpoints[i];
-			if (breakpoint instanceof IJavaClassPrepareBreakpoint && createQualifiedTypeName(type).equals(breakpoint.getTypeName())) {
+			if (breakpoint instanceof IJavaClassPrepareBreakpoint && getQualifiedName(type).equals(breakpoint.getTypeName())) {
 				existing = breakpoint;
 				break;
 			}
@@ -423,13 +439,76 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
     }
     	
     /**
+     * Returns the binary name for the {@link IType} derived from its {@link ITypeBinding}.
+     * <br><br>
+     * If the {@link ITypeBinding} cannot be derived this method falls back to calling
+     * {@link #createQualifiedTypeName(IType)} to try and compose the type name.
+     * @param type
+     * @return the binary name for the given {@link IType}
+     * @since 3.6
+     */
+    String getQualifiedName(IType type) throws JavaModelException {
+    	IJavaProject project = type.getJavaProject();
+    	if (project != null && project.isOnClasspath(type) && needsBindings(type)) {
+    		CompilationUnit cuNode = parseCompilationUnit(type.getTypeRoot());
+    		ISourceRange nameRange = type.getNameRange();
+    		if (SourceRange.isAvailable(nameRange)) {
+				ASTNode node = NodeFinder.perform(cuNode, nameRange);
+				if (node instanceof SimpleName) {
+					IBinding binding;
+					if (node.getLocationInParent() == SimpleType.NAME_PROPERTY &&
+							node.getParent().getLocationInParent() == ClassInstanceCreation.TYPE_PROPERTY) {
+						binding = ((ClassInstanceCreation) node.getParent().getParent()).resolveTypeBinding();
+					} else {
+						binding = ((SimpleName) node).resolveBinding();
+					}
+					if (binding instanceof ITypeBinding) {
+			    		String name = ((ITypeBinding) binding).getBinaryName();
+			    		if (name != null) {
+			    			return name;
+			    		}
+					}
+				}
+    		}    		
+    	}
+	    return createQualifiedTypeName(type);
+    }
+    
+    /**
+     * Checks if the type or any of its enclosing types are local types.
+     * @param type
+     * @return <code>true</code> if the type or a parent type are a local type
+     * @throws JavaModelException
+     * @since 3.6
+     */
+    boolean needsBindings(IType type) throws JavaModelException {
+    	if(type.isMember()) {
+    		if(type.isLocal() && !type.isAnonymous()) {
+    			return true;
+    		}
+    		IJavaElement parent = type.getParent();
+    		IType ptype = null;
+    		while(parent != null) {
+    			if(parent.getElementType() == IJavaElement.TYPE) {
+    				ptype = (IType) parent;
+    				if(ptype.isLocal() && !ptype.isAnonymous()) {
+    					return true;
+    				}
+    			}
+    			parent = parent.getParent();
+    		}
+    	}
+    	return false;
+    }
+    
+    /**
      * Returns the package qualified name, while accounting for the fact that a source file might
      * not have a project
      * @param type the type to ensure the package qualified name is created for
      * @return the package qualified name
      * @since 3.3
      */
-    private String createQualifiedTypeName(IType type) {
+    String createQualifiedTypeName(IType type) {
     	String tname = pruneAnonymous(type);
     	try {
     		String packName = null;
@@ -760,7 +839,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
 	                        if (element instanceof IField) {
 								javaField = (IField) element;
 								IType type = javaField.getDeclaringType();
-								typeName = createQualifiedTypeName(type);
+								typeName = getQualifiedName(type);
 								fieldName = javaField.getElementName();
 								int f = javaField.getFlags();
 								boolean fin = Flags.isFinal(f);
@@ -1011,15 +1090,21 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
      * @return the compilation unit or <code>null</code>
      */
     protected CompilationUnit parseCompilationUnit(ITextEditor editor) {
-        ITypeRoot root = getTypeRoot(editor.getEditorInput());
-        if(root != null) {
-	        ASTParser parser = ASTParser.newParser(AST.JLS3);
-	        parser.setSource(root);
-	        return (CompilationUnit) parser.createAST(null);
+        return parseCompilationUnit(getTypeRoot(editor.getEditorInput()));
+    }
+
+    /**
+     * Parses the {@link ITypeRoot}.
+     * @param root the root
+     * @return the parsed {@link CompilationUnit}
+     */
+    CompilationUnit parseCompilationUnit(ITypeRoot root) {
+    	if(root != null) {
+    		return SharedASTProvider.getAST(root, SharedASTProvider.WAIT_YES, null);
         }
         return null;
     }
-
+    
     /*
      * (non-Javadoc)
      * 
@@ -1142,13 +1227,13 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
     	if(sel instanceof IStructuredSelection) {
     		IMember member = (IMember) ((IStructuredSelection)sel).getFirstElement();
     		int mtype = member.getElementType();
-    		if(mtype == IJavaElement.FIELD || mtype == IJavaElement.METHOD) {
+    		if(mtype == IJavaElement.FIELD || mtype == IJavaElement.METHOD || mtype == IJavaElement.INITIALIZER) {
     			// remove line breakpoint if present first
     	    	if (selection instanceof ITextSelection) {
     				ITextSelection ts = (ITextSelection) selection;
     				IType declaringType = member.getDeclaringType();
     				IResource resource = BreakpointUtils.getBreakpointResource(declaringType);
-					IJavaLineBreakpoint breakpoint = JDIDebugModel.lineBreakpointExists(resource, createQualifiedTypeName(declaringType), ts.getStartLine() + 1);
+					IJavaLineBreakpoint breakpoint = JDIDebugModel.lineBreakpointExists(resource, getQualifiedName(declaringType), ts.getStartLine() + 1);
     				if (breakpoint != null) {
     					DebugPlugin.getDefault().getBreakpointManager().removeBreakpoint(breakpoint, true);
     					return;
@@ -1163,7 +1248,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
         				toggleWatchpoints(part, ts);
         			}
         			else if(loc.getLocationType() == ValidBreakpointLocationLocator.LOCATION_LINE) {
-        				toggleLineBreakpoints(part, ts);
+        				toggleLineBreakpoints(part, ts, false, loc);
         			}
     			} 
     		}
@@ -1172,7 +1257,7 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTargetExtensio
     		}
     		else {
     			//fall back to old behavior, always create a line breakpoint
-    			toggleLineBreakpoints(part, selection, true);
+    			toggleLineBreakpoints(part, selection, true, null);
     		}
     	}
     }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ValidBreakpointLocationLocator.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ValidBreakpointLocationLocator.java
new file mode 100644
index 0000000..a445bb9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ValidBreakpointLocationLocator.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.actions;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+/**
+ * This class remains for internal binary compatibility. The original class moved to a different
+ * package. @see bug 297808.
+ */
+public class ValidBreakpointLocationLocator extends org.eclipse.jdt.internal.debug.core.breakpoints.ValidBreakpointLocationLocator {
+
+	/**
+	 * @param compilationUnit the JDOM CompilationUnit of the source code.
+	 * @param lineNumber the line number in the source code where to put the breakpoint.
+	 * @param bestMatch if <code>true</code> look for the best match, otherwise look only for a valid line
+	 */
+	public ValidBreakpointLocationLocator(CompilationUnit compilationUnit, int lineNumber, boolean bindingsResolved, boolean bestMatch) {
+		super(compilationUnit, lineNumber, bindingsResolved, bestMatch);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java
new file mode 100644
index 0000000..7fa476b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractDetailPane.java
@@ -0,0 +1,288 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.IDetailPane3;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorActionBarContributor;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartConstants;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.part.EditorActionBarContributor;
+
+/**
+ * Common detail pane function.
+ * 
+ * @since 3.6
+ */
+public abstract class AbstractDetailPane implements IDetailPane3 {
+	
+	private String fName;
+	private String fDescription;
+	private String fId;
+	private AbstractJavaBreakpointEditor fEditor;
+	private Set fAutoSaveProperties = new HashSet();
+	private IWorkbenchPartSite fSite; 
+	
+	// property listeners
+	private ListenerList fListeners = new ListenerList();
+	private Composite fEditorParent;
+	
+	/**
+	 * Constructs a detail pane.
+	 * 
+	 * @param name detail pane name
+	 * @param description detail pane description
+	 * @param id detail pane ID
+	 */
+	public AbstractDetailPane(String name, String description, String id) {
+		fName = name;
+		fDescription = description;
+		fId = id;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane3#addPropertyListener(org.eclipse.ui.IPropertyListener)
+	 */
+	public void addPropertyListener(IPropertyListener listener) {
+		fListeners.add(listener);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane3#removePropertyListener(org.eclipse.ui.IPropertyListener)
+	 */
+	public void removePropertyListener(IPropertyListener listener) {
+		fListeners.remove(listener);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane2#getSelectionProvider()
+	 */
+	public ISelectionProvider getSelectionProvider() {
+		return null;
+	}
+	
+	/**
+	 * Fires a property change to all listeners.
+	 * 
+	 * @param property the property
+	 */
+	protected void firePropertyChange(int property) {
+		Object[] listeners = fListeners.getListeners();
+		for (int i = 0; i < listeners.length; i++) {
+			((IPropertyListener)listeners[i]).propertyChanged(this, property);
+		}	
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#init(org.eclipse.ui.IWorkbenchPartSite)
+	 */
+	public void init(IWorkbenchPartSite partSite) {
+		fSite = partSite;
+	}
+
+	public String getID() {
+		return fId;
+	}
+
+	public String getName() {
+		return fName;
+	}
+
+	public String getDescription() {
+		return fDescription;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#dispose()
+	 */
+	public void dispose() {
+		fEditor = null;
+		fSite = null;
+		fListeners.clear();
+		fAutoSaveProperties.clear();
+		fEditorParent.dispose();
+	}	
+	
+	/**
+	 * Adds the given auto save properties to this detail pain. Whenever one of these
+	 * properties changes, the detail pane editor is immediately saved.
+	 * 
+	 * @param autosave
+	 */
+	protected void addAutosaveProperties(int[] autosave) {
+		for (int i = 0; i < autosave.length; i++) {
+			fAutoSaveProperties.add(new Integer(autosave[i]));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		fEditorParent = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
+		fEditor = createEditor(fEditorParent);
+		fEditor.setMnemonics(false);
+		fEditor.addPropertyListener(new IPropertyListener() {
+			public void propertyChanged(Object source, int propId) {
+				if (fAutoSaveProperties.contains(new Integer(propId))) {
+					try {
+						fEditor.doSave();
+						return;
+					} catch (CoreException e) {
+					}
+				}
+				firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY);
+			}
+		});
+		return fEditor.createControl(fEditorParent);
+	}
+	
+	/**
+	 * Creates the detail pane specific editor.
+	 * 
+	 * @param parent parent composite
+	 * @return editor
+	 */
+	protected abstract AbstractJavaBreakpointEditor createEditor(Composite parent);
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSaveAs()
+	 */
+	public void doSaveAs() {
+		// do nothing
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed()
+	 */
+	public boolean isSaveAsAllowed() {
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isSaveOnCloseNeeded()
+	 */
+	public boolean isSaveOnCloseNeeded() {
+		return isDirty() && fEditor.getStatus().isOK();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#setFocus()
+	 */
+	public boolean setFocus() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor monitor) {
+		IStatusLineManager statusLine = getStatusLine();
+		if (statusLine != null) {
+			statusLine.setErrorMessage(null);
+		}
+		try {
+			fEditor.doSave();
+		} catch (CoreException e) {
+			if (statusLine != null) {
+				statusLine.setErrorMessage(e.getMessage());
+				Display.getCurrent().beep();
+			} else {
+				JDIDebugUIPlugin.log(e.getStatus());
+			}
+		}
+	}
+	
+	private IStatusLineManager getStatusLine() {
+		// we want to show messages globally hence we
+		// have to go through the active part
+		if (fSite instanceof IViewSite) {
+			IViewSite site= (IViewSite) fSite;
+			IWorkbenchPage page= site.getPage();
+			IWorkbenchPart activePart= page.getActivePart();
+
+			if (activePart instanceof IViewPart) {
+				IViewPart activeViewPart= (IViewPart)activePart;
+				IViewSite activeViewSite= activeViewPart.getViewSite();
+				return activeViewSite.getActionBars().getStatusLineManager();
+			}
+	
+			if (activePart instanceof IEditorPart) {
+				IEditorPart activeEditorPart= (IEditorPart)activePart;
+				IEditorActionBarContributor contributor= activeEditorPart.getEditorSite().getActionBarContributor();
+				if (contributor instanceof EditorActionBarContributor)
+					return ((EditorActionBarContributor) contributor).getActionBars().getStatusLineManager();
+			}
+			// no active part
+			return site.getActionBars().getStatusLineManager();
+		}
+		return null;
+	}	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.ISaveablePart#isDirty()
+	 */
+	public boolean isDirty() {
+		return fEditor.isDirty();
+	}
+	
+	/**
+	 * Returns the editor associated with this detail pane.
+	 * 
+	 * @return editor
+	 */
+	protected AbstractJavaBreakpointEditor getEditor() {
+		return fEditor;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPane#display(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public void display(IStructuredSelection selection) {
+		// clear status line
+		IStatusLineManager statusLine = getStatusLine();
+		if (statusLine != null) {
+			statusLine.setErrorMessage(null);
+		}
+		AbstractJavaBreakpointEditor editor = getEditor();
+		Object input = null;
+		if (selection != null && selection.size() == 1) {
+			input = selection.getFirstElement();
+			// update even if the same in case attributes have changed
+		}
+		try {
+			editor.setInput(input);
+		} catch (CoreException e) {
+			JDIDebugUIPlugin.log(e);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractJavaBreakpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractJavaBreakpointEditor.java
new file mode 100644
index 0000000..ec9f6a5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AbstractJavaBreakpointEditor.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.action.LegacyActionTools;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IPropertyListener;
+import org.eclipse.ui.IWorkbenchPartConstants;
+
+/**
+ * Common function for Breakpoint editor controls.
+ * 
+ * @since 3.6
+ */
+public abstract class AbstractJavaBreakpointEditor {
+	
+    private ListenerList fListeners = new ListenerList();
+    private boolean fDirty = false;
+    private boolean fMnemonics = true;
+    private boolean fSuppressPropertyChanges = false;
+	
+	/**
+	 * Adds the given property listener to this editor. Property changes
+	 * are reported on the breakpoint being edited. Property identifiers
+	 * are breakpoint attribute keys.
+	 * 
+	 * @param listener listener
+	 */
+	public void addPropertyListener(IPropertyListener listener) {
+		fListeners.add(listener);
+	}
+	
+	/**
+	 * Sets whether mnemonics should be displayed in editor controls.
+	 * Only has an effect if set before {@link #createControl(Composite)}
+	 * is called. By default, mnemonics are displayed.
+	 * 
+	 * @param mnemonics whether to display mnemonics
+	 */
+	public void setMnemonics(boolean mnemonics) {
+		fMnemonics = mnemonics;
+	}
+	
+	/**
+	 * Returns whether mnemonics should be displayed in editor controls.
+	 * 
+	 * @return whether mnemonics should be displayed in editor controls
+	 */
+	protected boolean isMnemonics() {
+		return fMnemonics;
+	}
+	
+	/**
+	 * Returns text with mnemonics in tact or removed based on {@link #isMnemonics()}.
+	 * 
+	 * @param text string to process 
+	 * @return text with mnemonics in tact or removed based on {@link #isMnemonics()}
+	 */
+	protected String processMnemonics(String text) {
+		if (isMnemonics()) {
+			return text;
+		}
+		return LegacyActionTools.removeMnemonics(text);
+	}
+	
+	/**
+	 * Removes the property listener from this editor.
+	 * 
+	 * @param listener listener
+	 */
+	public void removePropertyListener(IPropertyListener listener) {
+		fListeners.remove(listener);
+	}
+	
+	/**
+	 * Creates the condition editor widgets and returns the top level
+	 * control.
+	 * 
+	 * @param parent composite to embed the editor controls in
+	 * @return top level control
+	 */
+	public abstract Control createControl(Composite parent);
+	
+	/**
+	 * Disposes this editor and its controls. Once disposed, the editor can no
+	 * longer be used.
+	 */
+	protected void dispose() {
+		fListeners.clear();
+	}
+	
+	/**
+	 * Gives focus to an appropriate control in the editor.
+	 */
+	public abstract void setFocus();
+	
+	/**
+	 * Saves current settings to the breakpoint being edited. Has no
+	 * effect if a breakpoint is not currently being edited or if this
+	 * editor is not dirty.
+	 * 
+	 * @exception CoreException if unable to update the breakpoint.
+	 */
+	public abstract void doSave() throws CoreException;
+	
+	/**
+	 * Returns a status describing whether the condition editor is in
+	 * a valid state. Returns an OK status when all is good. For example, an error
+	 * status is returned when the conditional expression is empty but enabled.
+	 * 
+	 * @return editor status.
+	 */
+	public abstract IStatus getStatus();
+		
+	/**
+	 * Returns whether the editor needs saving.
+	 *  
+	 * @return whether the editor needs saving
+	 */
+	public boolean isDirty() {
+		return fDirty;
+	}
+	
+	/**
+	 * Sets the dirty flag based on the given property change
+	 * 
+	 * @param propId the property that changed
+	 */
+	protected void setDirty(int propId) {
+		fDirty = true;
+		firePropertyChange(propId);
+	}
+	
+	/**
+	 * Sets the dirty flag and fires a dirty property change if required.
+	 * 
+	 * @param dirty whether dirty
+	 */
+	protected void setDirty(boolean dirty) {
+		if (fDirty != dirty) {
+			fDirty = dirty;
+			firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY);
+		}
+	}
+	
+	/**
+	 * Fires a property change event to all listeners.
+	 * 
+	 * @param source
+	 * @param propId
+	 * @param value
+	 */
+	protected void firePropertyChange(int propId) {
+		if (!fSuppressPropertyChanges) {
+			Object[] listeners = fListeners.getListeners();
+			for (int i = 0; i < listeners.length; i++) {
+				IPropertyListener listener = (IPropertyListener) listeners[i];
+				listener.propertyChanged(this, propId);
+			}
+		}
+	}
+	
+	/**
+	 * Returns the breakpoint being displayed or <code>null</code> if none.
+	 * 
+	 * @return breakpoint or <code>null</code>
+	 */
+	public abstract Object getInput();
+	
+	/**
+	 * Sets the breakpoint to display and edit or <code>null</code> if none.
+	 * 
+	 * @param breakpoint breakpoint or <code>null</code>
+	 * @exception CoreException if unable to set the input
+	 */
+	public abstract void setInput(Object breakpoint) throws CoreException;
+	
+	/**
+	 * Sets whether to suppress property change notification.
+	 * 
+	 * @param suppress whether to suppress notification
+	 */
+	protected void suppressPropertyChanges(boolean suppress) {
+		fSuppressPropertyChanges = suppress;
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
index f18042b..a15ff5d 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,18 +122,20 @@ public class AddExceptionAction implements IViewActionDelegate, IWorkbenchWindow
 		BreakpointUtils.addJavaBreakpointAttributes(map, type);
 		IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(
 						JDIDebugModel.getPluginIdentifier());
+		IJavaExceptionBreakpoint breakpoint = null;
 		boolean exists = false;
 		for (int j = 0; j < breakpoints.length; j++) {
-			IJavaBreakpoint breakpoint = (IJavaBreakpoint) breakpoints[j];
-			if (breakpoint instanceof IJavaExceptionBreakpoint) {
+			if (breakpoints[j] instanceof IJavaExceptionBreakpoint) {
+				breakpoint = (IJavaExceptionBreakpoint) breakpoints[j];
 				if (breakpoint.getTypeName().equals(type.getFullyQualifiedName())) {
 					exists = true;
 					break;
 				}
 			}
 		}
+		// If the breakpoint does not exist, add it.  If it does exist, make sure it is enabled.
 		if (!exists) {
-			new Job(BreakpointMessages.AddExceptionAction_0) {
+			Job job = new Job(BreakpointMessages.AddExceptionAction_0) {
 				protected IStatus run(IProgressMonitor monitor) {
 					try {
 						JDIDebugModel.createExceptionBreakpoint(resource,
@@ -145,7 +147,25 @@ public class AddExceptionAction implements IViewActionDelegate, IWorkbenchWindow
 					}
 				}
 
-			}.schedule();
+			};
+			job.setSystem(true);
+			job.setPriority(Job.INTERACTIVE);
+			job.schedule();
+		} else {
+			final IJavaBreakpoint existingBreakpoint = breakpoint;
+			Job job = new Job(BreakpointMessages.AddExceptionAction_EnableExceptionBreakpoint) {
+	            protected IStatus run(IProgressMonitor monitor) {
+	                try {
+	                	existingBreakpoint.setEnabled(true);
+	                    return Status.OK_STATUS;
+	                } catch (final CoreException e) {
+	                	return e.getStatus();
+	                }
+	            }
+	        };
+	        job.setSystem(true);
+			job.setPriority(Job.INTERACTIVE);
+			job.schedule();
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionTypeDialogExtension.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionTypeDialogExtension.java
index 80f6516..c175c56 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionTypeDialogExtension.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/AddExceptionTypeDialogExtension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,11 +13,11 @@ package org.eclipse.jdt.internal.debug.ui.breakpoints;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeHierarchy;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java
new file mode 100644
index 0000000..a937afa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointDetailPaneFactory.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.ui.IDetailPane;
+import org.eclipse.debug.ui.IDetailPaneFactory;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * Detail pane factory for Java breakpoints.
+ * 
+ * @since 3.6
+ */
+public class BreakpointDetailPaneFactory implements IDetailPaneFactory {
+	
+	/**
+	 * Maps pane IDs to names
+	 */
+	private Map fNameMap;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneTypes(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public Set getDetailPaneTypes(IStructuredSelection selection) {
+		HashSet set = new HashSet();
+		if (selection.size() == 1) {
+			IBreakpoint b = (IBreakpoint) selection.getFirstElement();
+			try {
+				String type = b.getMarker().getType();
+				if (JavaLineBreakpoint.JAVA_LINE_BREAKPOINT.equals(type)) {
+					set.add(LineBreakpointDetailPane.DETAIL_PANE_LINE_BREAKPOINT);
+				} else if (JavaWatchpoint.JAVA_WATCHPOINT.equals(type)) {
+					set.add(WatchpointDetailPane.DETAIL_PANE_WATCHPOINT);
+				} else if (JavaMethodBreakpoint.JAVA_METHOD_BREAKPOINT.equals(type)) {
+					set.add(MethodBreakpointDetailPane.DETAIL_PANE_METHOD_BREAKPOINT);
+				} else if (JavaExceptionBreakpoint.JAVA_EXCEPTION_BREAKPOINT.equals(type)) {
+					set.add(ExceptionBreakpointDetailPane.DETAIL_PANE_EXCEPTION_BREAKPOINT);
+				} else {
+					set.add(StandardBreakpointDetailPane.DETAIL_PANE_STANDARD);
+				}
+			} catch (CoreException e) {}
+		}
+		return set;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public String getDefaultDetailPane(IStructuredSelection selection) {
+		if (selection.size() == 1) {
+			IBreakpoint b = (IBreakpoint) selection.getFirstElement();
+			try {
+				String type = b.getMarker().getType();
+				if (JavaLineBreakpoint.JAVA_LINE_BREAKPOINT.equals(type)) {
+					return LineBreakpointDetailPane.DETAIL_PANE_LINE_BREAKPOINT;
+				} else if (JavaWatchpoint.JAVA_WATCHPOINT.equals(type)) {
+					return WatchpointDetailPane.DETAIL_PANE_WATCHPOINT;
+				} else if (JavaExceptionBreakpoint.JAVA_EXCEPTION_BREAKPOINT.equals(type)) {
+					return ExceptionBreakpointDetailPane.DETAIL_PANE_EXCEPTION_BREAKPOINT;
+				} else if (JavaMethodBreakpoint.JAVA_METHOD_BREAKPOINT.equals(type)) {
+					return MethodBreakpointDetailPane.DETAIL_PANE_METHOD_BREAKPOINT;
+				} else {
+					return StandardBreakpointDetailPane.DETAIL_PANE_STANDARD;
+				}
+			} catch (CoreException e) {}
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPaneFactory#createDetailPane(java.lang.String)
+	 */
+	public IDetailPane createDetailPane(String paneID) {
+		if (LineBreakpointDetailPane.DETAIL_PANE_LINE_BREAKPOINT.equals(paneID)) {
+			return new LineBreakpointDetailPane();
+		}
+		if (StandardBreakpointDetailPane.DETAIL_PANE_STANDARD.equals(paneID)) {
+			return new StandardBreakpointDetailPane();
+		}
+		if (WatchpointDetailPane.DETAIL_PANE_WATCHPOINT.equals(paneID)) {
+			return new WatchpointDetailPane();
+		}
+		if (MethodBreakpointDetailPane.DETAIL_PANE_METHOD_BREAKPOINT.equals(paneID)) {
+			return new MethodBreakpointDetailPane();
+		}
+		if (ExceptionBreakpointDetailPane.DETAIL_PANE_EXCEPTION_BREAKPOINT.equals(paneID)) {
+			return new ExceptionBreakpointDetailPane();
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneName(java.lang.String)
+	 */
+	public String getDetailPaneName(String paneID) {
+		return (String) getNameMap().get(paneID);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.IDetailPaneFactory#getDetailPaneDescription(java.lang.String)
+	 */
+	public String getDetailPaneDescription(String paneID) {
+		return (String) getNameMap().get(paneID);
+	}
+	
+	private Map getNameMap() {
+		if (fNameMap == null) {
+			fNameMap = new HashMap();
+			fNameMap.put(LineBreakpointDetailPane.DETAIL_PANE_LINE_BREAKPOINT, BreakpointMessages.BreakpointDetailPaneFactory_0);
+			fNameMap.put(WatchpointDetailPane.DETAIL_PANE_WATCHPOINT, BreakpointMessages.WatchpointDetailPane_0);
+			fNameMap.put(MethodBreakpointDetailPane.DETAIL_PANE_METHOD_BREAKPOINT, BreakpointMessages.BreakpointDetailPaneFactory_1);
+			fNameMap.put(StandardBreakpointDetailPane.DETAIL_PANE_STANDARD, BreakpointMessages.StandardBreakpointDetailPane_0);
+			fNameMap.put(ExceptionBreakpointDetailPane.DETAIL_PANE_EXCEPTION_BREAKPOINT, BreakpointMessages.ExceptionBreakpointDetailPane_0);
+		}
+		return fNameMap;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.java
index 752acdd..52a80eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -17,6 +17,8 @@ public class BreakpointMessages extends NLS {
 
 	public static String AddExceptionAction_0;
 	public static String AddExceptionAction_1;
+
+	public static String AddExceptionAction_EnableExceptionBreakpoint;
 	public static String AddExceptionDialog_13;
 	public static String AddExceptionDialog_15;
 	public static String AddExceptionDialog_16;
@@ -25,7 +27,18 @@ public class BreakpointMessages extends NLS {
 	public static String AddClassPrepareBreakpointAction_1;
 	public static String AddClassPrepareBreakpointAction_2;
 	
-	public static String JavaBreakpointTypeAdapterFactory_0;
+	public static String BreakpointConditionDetailPane_0;
+
+	public static String BreakpointDetailPaneFactory_0;
+
+	public static String BreakpointDetailPaneFactory_1;
+	
+	public static String ExceptionBreakpointDetailPane_0;
+	
+	public static String JavaBreakpointTypeAdapterFactory_0;	
+	public static String StandardBreakpointDetailPane_0;
+
+	public static String WatchpointDetailPane_0;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.properties
index 054cb85..4102bff 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/BreakpointMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -11,12 +11,19 @@
 
 AddExceptionAction_0=Add Java Exception Breakpoint
 AddExceptionAction_1=Choose an e&xception (? = any character, * = any string)
+AddExceptionAction_EnableExceptionBreakpoint=Enable Java Exception Breakpoint
 
 AddExceptionDialog_15=Suspend on &caught exceptions
 AddExceptionDialog_16=Suspend on &uncaught exceptions
-AddExceptionDialog_13=Selected item is not an exceptiones
+AddExceptionDialog_13=Selected item is not an exception
 
 AddClassPrepareBreakpointAction_0=Add Class Load Breakpoint
 AddClassPrepareBreakpointAction_1=Choose a &type (? = any character, * = any string)
 AddClassPrepareBreakpointAction_2=Create Breakpoint
+BreakpointConditionDetailPane_0=Breakpoint Condition
+BreakpointDetailPaneFactory_0=Line Breakpoint Settings
+BreakpointDetailPaneFactory_1=Method Breakpoint Settings
+ExceptionBreakpointDetailPane_0=Exception Settings
 JavaBreakpointTypeAdapterFactory_0={0} Breakpoints
+StandardBreakpointDetailPane_0=Breakpoint Settings
+WatchpointDetailPane_0=Watchpoint Settings
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/CompositeBreakpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/CompositeBreakpointEditor.java
new file mode 100644
index 0000000..93262ca
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/CompositeBreakpointEditor.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IPropertyListener;
+
+/**
+ * Combines editors.
+ * 
+ * @since 3.6
+ */
+public class CompositeBreakpointEditor extends AbstractJavaBreakpointEditor {
+	
+	private AbstractJavaBreakpointEditor[] fEditors;
+	
+	public CompositeBreakpointEditor(AbstractJavaBreakpointEditor[] editors) {
+		fEditors = editors;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#addPropertyListener(org.eclipse.ui.IPropertyListener)
+	 */
+	public void addPropertyListener(IPropertyListener listener) {
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].addPropertyListener(listener);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#removePropertyListener(org.eclipse.ui.IPropertyListener)
+	 */
+	public void removePropertyListener(IPropertyListener listener) {
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].removePropertyListener(listener);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#dispose()
+	 */
+	protected void dispose() {
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].dispose();
+		}
+		fEditors = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_BOTH, 0, 0);
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].createControl(comp);
+		}
+		return comp;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#setFocus()
+	 */
+	public void setFocus() {
+		fEditors[0].setFocus();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#doSave()
+	 */
+	public void doSave() throws CoreException {
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].doSave();
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#isDirty()
+	 */
+	public boolean isDirty() {
+		for (int i = 0; i < fEditors.length; i++) {
+			if (fEditors[i].isDirty()) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#getStatus()
+	 */
+	public IStatus getStatus() {
+		for (int i = 0; i < fEditors.length; i++) {
+			IStatus status = fEditors[i].getStatus();
+			if (!status.isOK()) {
+				return status;
+			}
+		}
+		return Status.OK_STATUS;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#getInput()
+	 */
+	public Object getInput() {
+		return fEditors[0].getInput();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#setInput(java.lang.Object)
+	 */
+	public void setInput(Object breakpoint) throws CoreException {
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].setInput(breakpoint);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#setMnemonics(boolean)
+	 */
+	public void setMnemonics(boolean mnemonics) {
+		super.setMnemonics(mnemonics);
+		for (int i = 0; i < fEditors.length; i++) {
+			fEditors[i].setMnemonics(mnemonics);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointDetailPane.java
new file mode 100644
index 0000000..1189aae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointDetailPane.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Exception breakpoint detail pane.
+ * 
+ * @since 3.6
+ */
+public class ExceptionBreakpointDetailPane extends AbstractDetailPane {
+	
+	/**
+	 * Identifier for this detail pane editor
+	 */
+	public static final String DETAIL_PANE_EXCEPTION_BREAKPOINT = JDIDebugUIPlugin.getUniqueIdentifier() + ".DETAIL_PANE_EXCEPTION_BREAKPOINT"; //$NON-NLS-1$
+
+	public ExceptionBreakpointDetailPane() {
+		super(BreakpointMessages.ExceptionBreakpointDetailPane_0, BreakpointMessages.ExceptionBreakpointDetailPane_0, DETAIL_PANE_EXCEPTION_BREAKPOINT);
+		addAutosaveProperties(new int[]{
+				StandardJavaBreakpointEditor.PROP_HIT_COUNT_ENABLED,
+				StandardJavaBreakpointEditor.PROP_SUSPEND_POLICY,
+				ExceptionBreakpointEditor.PROP_CAUGHT,
+				ExceptionBreakpointEditor.PROP_UNCAUGHT,
+				ExceptionBreakpointEditor.PROP_SUBCLASSES
+		});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractDetailPane#createEditor(org.eclipse.swt.widgets.Composite)
+	 */
+	protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
+		return new ExceptionBreakpointEditor();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointEditor.java
new file mode 100644
index 0000000..b7a3f8c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/ExceptionBreakpointEditor.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.debug.core.IJavaBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaExceptionBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
+import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @since 3.6
+ */
+public class ExceptionBreakpointEditor extends StandardJavaBreakpointEditor {
+	
+	/**
+     * Property id's
+     */
+    public static final int PROP_CAUGHT = 0x1020;
+    public static final int PROP_UNCAUGHT = 0x1021;
+    public static final int PROP_SUBCLASSES = 0x1022;
+	
+	// editors
+	private Button fCaught;
+	private Button fUncaught;
+	private Button fSubclasses;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		Composite container = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, 0, 0, 0);
+		// add standard controls
+		super.createControl(container);
+		Composite composite = SWTFactory.createComposite(container, parent.getFont(), 5, 1, 0, 0, 0);
+//		SWTFactory.createLabel(composite, PropertyPageMessages.ExceptionBreakpointEditor_0, 1);
+		fCaught = createSusupendPropertyEditor(composite, processMnemonics(PropertyPageMessages.ExceptionBreakpointEditor_1), PROP_CAUGHT);
+		fUncaught = createSusupendPropertyEditor(composite, processMnemonics(PropertyPageMessages.ExceptionBreakpointEditor_2), PROP_UNCAUGHT);
+		fSubclasses = createSusupendPropertyEditor(composite, processMnemonics(PropertyPageMessages.ExceptionBreakpointEditor_3), PROP_SUBCLASSES);
+		return container;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#setBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint)
+	 */
+	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
+		super.setBreakpoint(breakpoint);
+		if (breakpoint instanceof IJavaExceptionBreakpoint) {
+			IJavaExceptionBreakpoint ex = (IJavaExceptionBreakpoint) breakpoint;
+			fCaught.setEnabled(true);
+			fUncaught.setEnabled(true);
+			fSubclasses.setEnabled(true);
+			fCaught.setSelection(ex.isCaught());
+			fUncaught.setSelection(ex.isUncaught());
+			fSubclasses.setSelection(((JavaExceptionBreakpoint)ex).isSuspendOnSubclasses());
+		} else {
+			fCaught.setEnabled(false);
+			fUncaught.setEnabled(false);
+			fSubclasses.setEnabled(false);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#doSave()
+	 */
+	public void doSave() throws CoreException {
+		super.doSave();
+		IJavaBreakpoint breakpoint = getBreakpoint();
+		if (breakpoint instanceof IJavaExceptionBreakpoint) {
+			IJavaExceptionBreakpoint ex = (IJavaExceptionBreakpoint) breakpoint;
+			ex.setCaught(fCaught.getSelection());
+			ex.setUncaught(fUncaught.getSelection());
+			((JavaExceptionBreakpoint)ex).setSuspendOnSubclasses(fSubclasses.getSelection());
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
index 97a6e26..d32d20b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/JavaBreakpointTypeAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,7 +82,7 @@ public class JavaBreakpointTypeAdapterFactory implements IAdapterFactory {
             	IBreakpoint breakpoint = (IBreakpoint)adaptableObject;
             	String type = DebugPlugin.getDefault().getBreakpointManager().getTypeName(breakpoint);
             	IBreakpointTypeCategory category = (IBreakpointTypeCategory) fOtherTypes.get(type);
-            	if (category == null) {
+            	if (category == null && type != null) {
 	            	if (breakpoint instanceof IJavaExceptionBreakpoint) {
 	                   	category = new BreakpointTypeCategory(type, getImageDescriptor(JavaDebugImages.IMG_OBJS_EXCEPTION_BRKPT_TYPE));
 	            	} else if (breakpoint instanceof IJavaClassPrepareBreakpoint) {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/LineBreakpointDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/LineBreakpointDetailPane.java
new file mode 100644
index 0000000..40467ea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/LineBreakpointDetailPane.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Detail pane for editing a line breakpoint.
+ *
+ * @since 3.6
+ */
+public class LineBreakpointDetailPane extends AbstractDetailPane {
+	
+	/**
+	 * Identifier for this detail pane editor
+	 */
+	public static final String DETAIL_PANE_LINE_BREAKPOINT = JDIDebugUIPlugin.getUniqueIdentifier() + ".DETAIL_PANE_LINE_BREAKPOINT"; //$NON-NLS-1$
+	
+	public LineBreakpointDetailPane() {
+		super(BreakpointMessages.BreakpointConditionDetailPane_0, BreakpointMessages.BreakpointConditionDetailPane_0, DETAIL_PANE_LINE_BREAKPOINT); 
+		addAutosaveProperties(new int[]{
+				JavaBreakpointConditionEditor.PROP_CONDITION_ENABLED,
+				JavaBreakpointConditionEditor.PROP_CONDITION_SUSPEND_POLICY,
+				StandardJavaBreakpointEditor.PROP_HIT_COUNT_ENABLED,
+				StandardJavaBreakpointEditor.PROP_SUSPEND_POLICY});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractDetailPane#createEditor(org.eclipse.swt.widgets.Composite)
+	 */
+	protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
+		return new CompositeBreakpointEditor(
+			new AbstractJavaBreakpointEditor[] {new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor()}); 
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointDetailPane.java
new file mode 100644
index 0000000..68f3382
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointDetailPane.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Watchpoint detail pane. Suspend on access or modification.
+ * 
+ * @since 3.6
+ */
+public class MethodBreakpointDetailPane extends AbstractDetailPane {
+	
+	/**
+	 * Identifier for this detail pane editor
+	 */
+	public static final String DETAIL_PANE_METHOD_BREAKPOINT = JDIDebugUIPlugin.getUniqueIdentifier() + ".DETAIL_PANE_METHOD_BREAKPOINT"; //$NON-NLS-1$
+
+	public MethodBreakpointDetailPane() {
+		super(BreakpointMessages.StandardBreakpointDetailPane_0, BreakpointMessages.StandardBreakpointDetailPane_0, DETAIL_PANE_METHOD_BREAKPOINT);
+		addAutosaveProperties(new int[]{
+				StandardJavaBreakpointEditor.PROP_HIT_COUNT_ENABLED,
+				StandardJavaBreakpointEditor.PROP_SUSPEND_POLICY,
+				MethodBreakpointEditor.PROP_ENTRY,
+				MethodBreakpointEditor.PROP_EXIT,
+				JavaBreakpointConditionEditor.PROP_CONDITION_ENABLED,
+				JavaBreakpointConditionEditor.PROP_CONDITION_SUSPEND_POLICY
+		});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractDetailPane#createEditor(org.eclipse.swt.widgets.Composite)
+	 */
+	protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
+		return new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] 
+			{new MethodBreakpointEditor(), new JavaBreakpointConditionEditor()});
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointEditor.java
new file mode 100644
index 0000000..b4f9185
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/MethodBreakpointEditor.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.debug.core.IJavaBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
+import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Editor for method entry/exit breakpoint.
+ * 
+ * @since 3.6
+ */
+public class MethodBreakpointEditor extends StandardJavaBreakpointEditor {
+	
+	// Method entry/exit editors
+	private Button fEntry;
+	private Button fExit;
+
+	public static final int PROP_ENTRY = 0x1012;
+	public static final int PROP_EXIT = 0x1013;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, 0, 0, 0);
+		// add standard controls
+		super.createStandardControls(composite);
+		Composite watchComp = SWTFactory.createComposite(composite, parent.getFont(), 3, 1, 0, 0, 0);
+		fEntry = createSusupendPropertyEditor(watchComp, processMnemonics(PropertyPageMessages.JavaLineBreakpointPage_10), PROP_ENTRY);
+		fExit = createSusupendPropertyEditor(watchComp, processMnemonics(PropertyPageMessages.JavaLineBreakpointPage_11), PROP_EXIT); 
+		return composite;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#setBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint)
+	 */
+	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
+		super.setBreakpoint(breakpoint);
+		if (breakpoint instanceof IJavaMethodBreakpoint) {
+			IJavaMethodBreakpoint watchpoint = (IJavaMethodBreakpoint) breakpoint;
+			fEntry.setEnabled(true);
+			fExit.setEnabled(true);
+			fEntry.setSelection(watchpoint.isEntry());
+			fExit.setSelection(watchpoint.isExit());
+		} else {
+			fEntry.setEnabled(false);
+			fExit.setEnabled(false);
+			fEntry.setSelection(false);
+			fExit.setSelection(false);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#doSave()
+	 */
+	public void doSave() throws CoreException {
+		super.doSave();
+		IJavaBreakpoint breakpoint = getBreakpoint();
+		if (breakpoint instanceof IJavaMethodBreakpoint) {
+			IJavaMethodBreakpoint watchpoint = (IJavaMethodBreakpoint) breakpoint;
+			watchpoint.setEntry(fEntry.getSelection());
+			watchpoint.setExit(fExit.getSelection());
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardBreakpointDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardBreakpointDetailPane.java
new file mode 100644
index 0000000..7ab3d21
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardBreakpointDetailPane.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Suspend policy and hit count detail pane.
+ * 
+ * @since 3.6
+ */
+public class StandardBreakpointDetailPane extends AbstractDetailPane {
+	
+	/**
+	 * Identifier for this detail pane editor
+	 */
+	public static final String DETAIL_PANE_STANDARD = JDIDebugUIPlugin.getUniqueIdentifier() + ".DETAIL_PANE_STANDARD"; //$NON-NLS-1$
+
+	public StandardBreakpointDetailPane() {
+		super(BreakpointMessages.StandardBreakpointDetailPane_0, BreakpointMessages.StandardBreakpointDetailPane_0, DETAIL_PANE_STANDARD);
+		addAutosaveProperties(new int[]{
+				StandardJavaBreakpointEditor.PROP_HIT_COUNT_ENABLED,
+				StandardJavaBreakpointEditor.PROP_SUSPEND_POLICY});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractDetailPane#createEditor(org.eclipse.swt.widgets.Composite)
+	 */
+	protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
+		return new StandardJavaBreakpointEditor();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardJavaBreakpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardJavaBreakpointEditor.java
new file mode 100644
index 0000000..6b1a83e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/StandardJavaBreakpointEditor.java
@@ -0,0 +1,247 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.debug.core.IJavaBreakpoint;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @since 3.6
+ */
+public class StandardJavaBreakpointEditor extends AbstractJavaBreakpointEditor {
+	
+	private IJavaBreakpoint fBreakpoint;
+	private Button fHitCountButton;
+	private Text fHitCountText;
+	private Button fSuspendThread;
+	private Button fSuspendVM;
+	
+	/**
+     * Property id for hit count enabled state.
+     */
+    public static final int PROP_HIT_COUNT_ENABLED = 0x1005;
+    
+	/**
+     * Property id for breakpoint hit count.
+     */
+    public static final int PROP_HIT_COUNT = 0x1006;  
+    
+	/**
+     * Property id for suspend policy.
+     */
+    public static final int PROP_SUSPEND_POLICY = 0x1007;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		return createStandardControls(parent);
+	}
+	
+	protected Control createStandardControls(Composite parent) {
+		Composite composite = SWTFactory.createComposite(parent, parent.getFont(), 4, 1, 0, 0, 0);
+		fHitCountButton = SWTFactory.createCheckButton(composite, processMnemonics(PropertyPageMessages.JavaBreakpointPage_4), null, false, 1);
+		fHitCountButton.setLayoutData(new GridData());
+		fHitCountButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent event) {
+				boolean enabled = fHitCountButton.getSelection();
+				fHitCountText.setEnabled(enabled);
+				if(enabled) {
+					fHitCountText.setFocus();
+				}
+				setDirty(PROP_HIT_COUNT_ENABLED);
+			}
+		});
+		fHitCountText = SWTFactory.createSingleText(composite, 1);
+		GridData gd = (GridData) fHitCountText.getLayoutData();
+		gd.minimumWidth = 50;
+		fHitCountText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				setDirty(PROP_HIT_COUNT);
+			}
+		});
+		SWTFactory.createLabel(composite, "", 1); // spacer //$NON-NLS-1$
+		Composite radios = SWTFactory.createComposite(composite, composite.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
+		fSuspendThread = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_7), 1);
+		fSuspendThread.setLayoutData(new GridData());
+		fSuspendVM = SWTFactory.createRadioButton(radios, processMnemonics(PropertyPageMessages.JavaBreakpointPage_8), 1);
+		fSuspendVM.setLayoutData(new GridData());
+		fSuspendThread.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDirty(PROP_SUSPEND_POLICY);
+			}
+		});	
+		fSuspendVM.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDirty(PROP_SUSPEND_POLICY);
+			}
+		});
+		composite.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				dispose();
+			}
+		});
+		return composite;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#setInput(java.lang.Object)
+	 */
+	public void setInput(Object breakpoint) throws CoreException {
+		try {
+			suppressPropertyChanges(true);
+			if (breakpoint instanceof IJavaBreakpoint) {
+				setBreakpoint((IJavaBreakpoint) breakpoint);
+			} else {
+				setBreakpoint(null);
+			}
+		} finally {
+			suppressPropertyChanges(false);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#getInput()
+	 */
+	public Object getInput() {
+		return fBreakpoint;
+	}
+	
+	/**
+	 * Sets the breakpoint to edit. The same editor can be used iteratively for different breakpoints.
+	 * 
+	 * @param breakpoint the breakpoint to edit or <code>null</code> if none
+	 * @exception CoreException if unable to access breakpoint attributes
+	 */
+	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
+		fBreakpoint = breakpoint;
+		boolean enabled = false;
+		boolean hasHitCount = false;
+		String text = ""; //$NON-NLS-1$
+		boolean suspendThread = true;
+		if (breakpoint != null) {
+			enabled = true;
+			int hitCount = breakpoint.getHitCount();
+			if (hitCount > 0) {
+				text = new Integer(hitCount).toString();
+				hasHitCount = true;
+			}
+			suspendThread= breakpoint.getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD;
+		}
+		fHitCountButton.setEnabled(enabled);
+		fHitCountButton.setSelection(enabled & hasHitCount);
+		fHitCountText.setEnabled(hasHitCount);
+		fHitCountText.setText(text);
+		fSuspendThread.setEnabled(enabled);
+		fSuspendVM.setEnabled(enabled);
+		fSuspendThread.setSelection(suspendThread);
+		fSuspendVM.setSelection(!suspendThread);
+		setDirty(false);
+	}
+	
+	/**
+	 * Returns the current breakpoint being edited or <code>null</code> if none.
+	 * 
+	 * @return breakpoint or <code>null</code>
+	 */
+	protected IJavaBreakpoint getBreakpoint() { 
+		return fBreakpoint;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#setFocus()
+	 */
+	public void setFocus() {
+		// do nothing
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#doSave()
+	 */
+	public void doSave() throws CoreException {
+		if (fBreakpoint != null) {
+			int suspendPolicy = IJavaBreakpoint.SUSPEND_THREAD;
+			if(fSuspendVM.getSelection()) {
+				suspendPolicy = IJavaBreakpoint.SUSPEND_VM;
+			}
+			fBreakpoint.setSuspendPolicy(suspendPolicy);
+			int hitCount = -1;
+			if (fHitCountButton.getSelection()) {
+				try {
+					hitCount = Integer.parseInt(fHitCountText.getText());
+				} 
+				catch (NumberFormatException e) {
+					throw new CoreException(new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, PropertyPageMessages.JavaBreakpointPage_0, e));
+				}
+			}
+			fBreakpoint.setHitCount(hitCount);
+		}
+		setDirty(false);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor#getStatus()
+	 */
+	public IStatus getStatus() {
+		if (fHitCountButton.getSelection()) {
+			String hitCountText= fHitCountText.getText();
+			int hitCount= -1;
+			try {
+				hitCount = Integer.parseInt(hitCountText);
+			} catch (NumberFormatException e1) {
+				return new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, PropertyPageMessages.JavaBreakpointPage_0, null);
+			}
+			if (hitCount < 1) {
+				return new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, PropertyPageMessages.JavaBreakpointPage_0, null);
+			}
+		}
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * Creates and returns a check box button with the given text.
+	 * 
+	 * @param parent parent composite
+	 * @param text label
+	 * @param propId property id to fire on modification
+	 * @return check box
+	 */
+	protected Button createSusupendPropertyEditor(Composite parent, String text, final int propId) {
+		Button button = new Button(parent, SWT.CHECK);
+		button.setFont(parent.getFont());
+		button.setText(text);
+		GridData gd = new GridData(SWT.BEGINNING);
+		button.setLayoutData(gd);
+		button.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setDirty(propId);
+			}
+		});
+		return button;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointDetailPane.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointDetailPane.java
new file mode 100644
index 0000000..9b026c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointDetailPane.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Watchpoint detail pane. Suspend on access or modification.
+ * 
+ * @since 3.6
+ */
+public class WatchpointDetailPane extends AbstractDetailPane {
+	
+	/**
+	 * Identifier for this detail pane editor
+	 */
+	public static final String DETAIL_PANE_WATCHPOINT = JDIDebugUIPlugin.getUniqueIdentifier() + ".DETAIL_PANE_WATCHPOINT"; //$NON-NLS-1$
+
+	public WatchpointDetailPane() {
+		super(BreakpointMessages.WatchpointDetailPane_0, BreakpointMessages.WatchpointDetailPane_0, DETAIL_PANE_WATCHPOINT);
+		addAutosaveProperties(new int[]{
+				StandardJavaBreakpointEditor.PROP_HIT_COUNT_ENABLED,
+				StandardJavaBreakpointEditor.PROP_SUSPEND_POLICY,
+				WatchpointEditor.PROP_ACCESS,
+				WatchpointEditor.PROP_MODIFICATION
+		});
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractDetailPane#createEditor(org.eclipse.swt.widgets.Composite)
+	 */
+	protected AbstractJavaBreakpointEditor createEditor(Composite parent) {
+		return new WatchpointEditor();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointEditor.java
new file mode 100644
index 0000000..5e209f4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/breakpoints/WatchpointEditor.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.breakpoints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.debug.core.IJavaBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaWatchpoint;
+import org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @since 3.6
+ */
+public class WatchpointEditor extends StandardJavaBreakpointEditor {
+	
+	/**
+     * Property id for access/modification suspend.
+     */
+    public static final int PROP_ACCESS = 0x1010;
+    public static final int PROP_MODIFICATION = 0x1011;
+	
+	// Watchpoint editors
+	private Button fAccess;
+	private Button fModification;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		Composite container = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, 0, 0, 0);
+		// add standard controls
+		super.createStandardControls(container);
+		Composite watchComp = SWTFactory.createComposite(container, parent.getFont(), 2, 1, 0, 0, 0);
+		fAccess = createSusupendPropertyEditor(watchComp, processMnemonics(PropertyPageMessages.JavaLineBreakpointPage_7), PROP_ACCESS);
+		fModification = createSusupendPropertyEditor(watchComp, processMnemonics(PropertyPageMessages.JavaLineBreakpointPage_8), PROP_MODIFICATION);
+		return container;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#setBreakpoint(org.eclipse.jdt.debug.core.IJavaBreakpoint)
+	 */
+	protected void setBreakpoint(IJavaBreakpoint breakpoint) throws CoreException {
+		super.setBreakpoint(breakpoint);
+		if (breakpoint instanceof IJavaWatchpoint) {
+			IJavaWatchpoint watchpoint = (IJavaWatchpoint) breakpoint;
+			fAccess.setEnabled(true);
+			fModification.setEnabled(true);
+			fAccess.setSelection(watchpoint.isAccess());
+			fModification.setSelection(watchpoint.isModification());
+		} else {
+			fAccess.setEnabled(false);
+			fModification.setEnabled(false);
+			fAccess.setSelection(false);
+			fModification.setSelection(false);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor#doSave()
+	 */
+	public void doSave() throws CoreException {
+		super.doSave();
+		IJavaBreakpoint breakpoint = getBreakpoint();
+		if (breakpoint instanceof IJavaWatchpoint) {
+			IJavaWatchpoint watchpoint = (IJavaWatchpoint) breakpoint;
+			watchpoint.setAccess(fAccess.getSelection());
+			watchpoint.setModification(fModification.getSelection());
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/AllInstancesActionDelegate.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/AllInstancesActionDelegate.java
index 59eb5a1..523786e 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/AllInstancesActionDelegate.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/AllInstancesActionDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -98,7 +98,7 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 						    		IJavaElement[] selectedTypes = ((ICodeAssist)element).codeSelect(selectedWord.getOffset(), selectedWord.getLength());
 						    		// findWord() will only return one element, so only check the first element
 						    		if (selectedTypes.length > 0){
-						    			runAllInstancesForType(selectedTypes[0]);  
+						    			runForSelection(selectedTypes[0]);  
 						    			return;
 						    		}
 								} catch (JavaModelException e){
@@ -111,7 +111,7 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 					
 				// Otherwise, get the first selected element and check if it is a type
 				} else if (selection instanceof IStructuredSelection){
-					runAllInstancesForType(((IStructuredSelection)selection).getFirstElement());
+					runForSelection(((IStructuredSelection)selection).getFirstElement());
 					return;
 				}
 			}
@@ -120,12 +120,12 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 	}
 	
 	/**
-	 * Checks if the passed element is a java type or constructor that all instances can 
-	 * be retrieved for. If so, retrieves the instances and displays them in a popup dialog.
+	 * Resolves a debug reference type for the selected element and then
+	 * runs the action.
 	 * 
-	 * @param selectedElement The element to obtain all instances for
+	 * @param selectedElement a method, type, or variable
 	 */
-	protected void runAllInstancesForType(Object selectedElement){
+	protected void runForSelection(Object selectedElement){
 		if (selectedElement != null){
 						
 			IJavaType type = null;
@@ -147,13 +147,8 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 							if(types != null && types.length > 0) {
 								type = types[0];
 							} else {
-								// If the type is not known the the VM, open a popup dialog with 0 instances
-								JDIAllInstancesValue aiv = new JDIAllInstancesValue((JDIDebugTarget)target, null);
-								InspectPopupDialog ipd = new InspectPopupDialog(getShell(), 
-										getAnchor(), 
-										PopupInspectAction.ACTION_DEFININITION_ID,
-										new JavaInspectExpression(MessageFormat.format(Messages.AllInstancesActionDelegate_2, new String[]{itype.getElementName()}), aiv));
-								ipd.open();
+								// If the type is not known the the VM, open a pop-up dialog with 0 instances
+								displayNoInstances(target, itype.getFullyQualifiedName());
 								return;
 							}
 						}
@@ -179,23 +174,48 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 					
 			if(type instanceof JDIReferenceType) {
 				JDIReferenceType rtype = (JDIReferenceType) type;
-				try{
-					JDIAllInstancesValue aiv = new JDIAllInstancesValue((JDIDebugTarget)rtype.getDebugTarget(), rtype);
-					InspectPopupDialog ipd = new InspectPopupDialog(getShell(), 
-							getAnchor(), 
-							PopupInspectAction.ACTION_DEFININITION_ID,
-							new JavaInspectExpression(MessageFormat.format(Messages.AllInstancesActionDelegate_2, new String[]{type.getName()}), aiv));
-					ipd.open();
-					return;
-				} catch (DebugException e) {
-					JDIDebugUIPlugin.log(e);
-					report(Messages.AllInstancesActionDelegate_0,getPart());
-				}
+				displayInstaces((JDIDebugTarget)rtype.getDebugTarget(), rtype);
+				return;
 			}
 		}
 		report(Messages.AllInstancesActionDelegate_3,getPart());
 	}
 	
+	/**
+	 * No types are loaded in the given target with the specified type name. Displays the result.
+	 * 
+	 * @param target target
+	 * @param typeName resolve type name
+	 */
+	protected void displayNoInstances(IJavaDebugTarget target, String typeName) {
+		JDIAllInstancesValue aiv = new JDIAllInstancesValue((JDIDebugTarget)target, null);
+		InspectPopupDialog ipd = new InspectPopupDialog(getShell(), 
+				getAnchor(), 
+				PopupInspectAction.ACTION_DEFININITION_ID,
+				new JavaInspectExpression(MessageFormat.format(Messages.AllInstancesActionDelegate_2, new String[]{typeName}), aiv));
+		ipd.open();
+	}
+	
+	/**
+	 * Display instances of the given resolved type.
+	 * 
+	 * @param target target
+	 * @param rtype resolved reference type
+	 */
+	protected void displayInstaces(IJavaDebugTarget target, JDIReferenceType rtype) {
+		try{
+			JDIAllInstancesValue aiv = new JDIAllInstancesValue((JDIDebugTarget)rtype.getDebugTarget(), rtype);
+			InspectPopupDialog ipd = new InspectPopupDialog(getShell(), 
+					getAnchor(), 
+					PopupInspectAction.ACTION_DEFININITION_ID,
+					new JavaInspectExpression(MessageFormat.format(Messages.AllInstancesActionDelegate_2, new String[]{rtype.getName()}), aiv));
+			ipd.open();
+		} catch (DebugException e) {
+			JDIDebugUIPlugin.log(e);
+			report(Messages.AllInstancesActionDelegate_0,getPart());
+		}
+	}
+	
 	 /**
      * Convenience method for printing messages to the status line
      * @param message the message to be displayed
@@ -324,7 +344,7 @@ public class AllInstancesActionDelegate  extends ObjectActionDelegate implements
 	/**
 	 * @return the shell to use for new popups or <code>null</code>
 	 */
-	private Shell getShell(){
+	protected Shell getShell(){
 		if (fWindow != null){
 			return fWindow.getShell();
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/InstanceCountActionDelegate.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/InstanceCountActionDelegate.java
new file mode 100644
index 0000000..02be5d1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/InstanceCountActionDelegate.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.debug.ui.heapwalking;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.debug.core.IJavaDebugTarget;
+import org.eclipse.jdt.internal.debug.core.model.JDIReferenceType;
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Action to display the instance count for a selected type.
+ * 
+ * @since 3.6
+ */
+public class InstanceCountActionDelegate extends AllInstancesActionDelegate {
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate#displayInstaces(org.eclipse.jdt.debug.core.IJavaDebugTarget, org.eclipse.jdt.internal.debug.core.model.JDIReferenceType)
+	 */
+	protected void displayInstaces(IJavaDebugTarget target, JDIReferenceType rtype) {
+		try {
+			displayNumInstances(rtype.getName(), rtype.getInstanceCount());
+		} catch (CoreException e) {
+			JDIDebugUIPlugin.log(e);
+			report(Messages.AllInstancesActionDelegate_0,getPart());
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.debug.ui.heapwalking.AllInstancesActionDelegate#displayNoInstances(org.eclipse.jdt.debug.core.IJavaDebugTarget, java.lang.String)
+	 */
+	protected void displayNoInstances(IJavaDebugTarget target, String typeName) {
+		displayNumInstances(typeName, 0);
+	}
+	
+	/**
+	 * Displays a message dialog with the number of instances.
+	 * 
+	 * @param typeName type name
+	 * @param instanceCount number of instances
+	 */
+	protected void displayNumInstances(String typeName, long instanceCount) {
+		String message = null;
+		if (instanceCount == 0L) {
+			message = MessageFormat.format(Messages.InstanceCountActionDelegate_0, new String[]{typeName});
+		} else if (instanceCount == 1L) {
+			message = MessageFormat.format(Messages.InstanceCountActionDelegate_1, new String[]{typeName});
+		} else {
+			message = MessageFormat.format(Messages.InstanceCountActionDelegate_2, new String[]{Long.toString(instanceCount), typeName});
+		}
+		MessageDialog.openInformation(getShell(), Messages.InstanceCountActionDelegate_3, message);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.java
index bde2f71..fa5f51a 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,6 +28,14 @@ public class Messages extends NLS {
 	public static String AllReferencesInViewActionDelegate_0;
 	public static String AllReferencesInViewActionDelegate_1;
 
+	public static String InstanceCountActionDelegate_0;
+
+	public static String InstanceCountActionDelegate_1;
+
+	public static String InstanceCountActionDelegate_2;
+
+	public static String InstanceCountActionDelegate_3;
+
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.properties
index bb60951..52b95a0 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/heapwalking/Messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2006, 2009 IBM Corporation and others.
+#  Copyright (c) 2006, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -15,3 +15,7 @@ AllReferencesActionDelegate_0=An object must be selected to find all references
 AllReferencesActionDelegate_1={0} referenced from:
 AllReferencesInViewActionDelegate_0=Operation Not Supported
 AllReferencesInViewActionDelegate_1=The current VM does not support reference retrieval.  References will not be shown in the view.
+InstanceCountActionDelegate_0=There are no instances of {0}
+InstanceCountActionDelegate_1=There is 1 instance of {0}
+InstanceCountActionDelegate_2=There are {0} instances of {1}
+InstanceCountActionDelegate_3=Instance Count
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
index 748f57f..9f02746 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/EEVMPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,20 +15,23 @@ import java.io.File;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
 import org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.StatusInfo;
 import org.eclipse.jdt.internal.launching.EEVMInstall;
 import org.eclipse.jdt.launching.IVMInstallType;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jdt.launching.VMStandin;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Image;
@@ -103,6 +106,11 @@ public class EEVMPage extends AbstractVMInstallPage {
 		gd = (GridData) fVMArgs.getLayoutData();
 		gd.widthHint = 200;
 		gd.heightHint = 75;
+	//Variables button
+		Button variables = SWTFactory.createPushButton(composite, JREMessages.EEVMPage_3, null);
+		gd = (GridData) variables.getLayoutData();
+		gd.horizontalSpan = 3;
+		gd.horizontalAlignment = GridData.END;
 	//VM libraries block 
 		SWTFactory.createLabel(composite, JREMessages.AddVMDialog_JRE_system_libraries__1, 3);
 		fLibraryBlock = new VMLibraryBlock();
@@ -148,6 +156,17 @@ public class EEVMPage extends AbstractVMInstallPage {
 				}
 			}
 		});
+		variables.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+				if (dialog.open() == Window.OK) {
+					String expression = dialog.getVariableExpression();
+					if (expression != null) {
+						fVMArgs.insert(expression);
+					}
+				}
+			}
+		});		
 		Dialog.applyDialogFont(composite);
 		setControl(composite);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaDebugHelpContextIds.EDIT_JRE_EE_FILE_WIZARD_PAGE);	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
index 2e5658e..dfb12d1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/ExecutionEnvironmentsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -231,6 +231,12 @@ public class ExecutionEnvironmentsPreferencePage extends PreferencePage implemen
 		for (int i = 0; i < environments.length; i++) {
 			IExecutionEnvironment environment = environments[i];
 			IVMInstall vm = (IVMInstall) fDefaults.get(environment);
+			// if the VM no longer exists - set to default to avoid illegal argument exception (bug 267914)
+			if (vm != null) {
+				if (vm.getVMInstallType().findVMInstall(vm.getId()) == null) {
+					vm = null;
+				}
+			}
 			environment.setDefaultVM(vm);
 		}
 		return super.performOk();
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
index 8f7961f..1114c21 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/InstalledJREsBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.launching.AbstractVMInstall;
 import org.eclipse.jdt.launching.AbstractVMInstallType;
 import org.eclipse.jdt.launching.IVMInstall;
@@ -376,18 +376,24 @@ public class InstalledJREsBlock implements IAddVMDialogRequestor, ISelectionProv
             standin.setName(generateName(selectedVM.getName()));
 			EditVMInstallWizard wizard = new EditVMInstallWizard(standin, (IVMInstall[]) fVMs.toArray(new IVMInstall[fVMs.size()]));
 			WizardDialog dialog = new WizardDialog(getShell(), wizard);
-			if (dialog.open() == Window.OK) {
+			int dialogResult = dialog.open();
+			if (dialogResult == Window.OK) {
 				VMStandin result = wizard.getResult();
 				if (result != null) {
-					// add the new VM
-					fVMs.add(result);
-					fVMList.refresh();
-					fVMList.setSelection(new StructuredSelection(result));
+					newEntries.add(result);
 				}
+			} else if (dialogResult == Window.CANCEL){
+				// Cancelling one wizard should cancel all subsequent wizards
+				break;
 			}
         }
-        fVMList.refresh();
-        fVMList.setSelection(new StructuredSelection(newEntries.toArray()));
+        if (newEntries.size() > 0){
+        	fVMs.addAll(newEntries);
+        	fVMList.refresh();
+        	fVMList.setSelection(new StructuredSelection(newEntries.toArray()));
+        } else {
+        	fVMList.setSelection(selection);
+        }
     }
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREContainerWizardPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREContainerWizardPage.java
index cf8a3e4..a139da8 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREContainerWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREContainerWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 20010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,23 +13,18 @@ package org.eclipse.jdt.internal.debug.ui.jres;
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
-
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.wizard.WizardPage;
-
 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.launching.JavaRuntime;
-
 import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
 
 /**
  * Extension to allow a user to associate a JRE with a Java project.
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java
index 994c7ad..00e8374 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -45,6 +45,14 @@ public class JREMessages extends NLS {
 
 	public static String JREsComboBlock_1;
 
+	public static String JREsComboBlock_10;
+
+	public static String JREsComboBlock_11;
+
+	public static String JREsComboBlock_12;
+
+	public static String JREsComboBlock_13;
+
 	public static String JREsComboBlock_2;
 	public static String JREsComboBlock_3;
 	public static String JREsComboBlock_15;
@@ -106,6 +114,8 @@ public class JREMessages extends NLS {
 
 	public static String EEVMPage_2;
 
+	public static String EEVMPage_3;
+
 	public static String EEVMPage_4;
 
 	public static String EEVMPage_5;
@@ -151,6 +161,8 @@ public class JREMessages extends NLS {
 
 	public static String StandardVMPage_2;
 
+	public static String StandardVMPage_3;
+
 	public static String JREProfilesPreferencePage_0;
 
 	public static String JREProfilesPreferencePage_1;
@@ -167,6 +179,14 @@ public class JREMessages extends NLS {
 
 	public static String JREsComboBlock_14;
 
+	public static String JREsComboBlock_6;
+
+	public static String JREsComboBlock_7;
+
+	public static String JREsComboBlock_8;
+
+	public static String JREsComboBlock_9;
+
 	public static String InstalledJREsBlock_19;
 
 	public static String LibraryLabelProvider_0;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties
index 03b55f4..26325c0 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -36,6 +36,10 @@ InstalledJREsBlock_16=Dupli&cate...
 InstalledJREsBlock_19={0} (locked)
 
 JREsComboBlock_1=Alternate &JRE:
+JREsComboBlock_10=JRE name not specified for JRE type: {0}
+JREsComboBlock_11=Unable to resolve JRE: {0} ({1})
+JREsComboBlock_12=JRE home directory not specified
+JREsComboBlock_13=JRE home directory does not exist
 JREsComboBlock_14=Envir&onments...
 JREsComboBlock_15={0} ({1})
 JREsComboBlock_16={0} (unbound)
@@ -44,9 +48,14 @@ JREsComboBlock_3=Runtime JRE:
 JREsComboBlock_0=No JREs defined in workspace
 JREsComboBlock_4=E&xecution environment:
 JREsComboBlock_5=No execution environments defined in workspace
+JREsComboBlock_6=Unknown execution environment specified: {0}
+JREsComboBlock_7=No JREs in workspace compatible with specified execution environment: {0}
+JREsComboBlock_8=JRE type not specified
+JREsComboBlock_9=Unknown JRE type specified: {0}
 StandardVMPage_0=Add Standard VM
 StandardVMPage_1=JRE Definition
 StandardVMPage_2=Specify attributes for a JRE
+StandardVMPage_3=Var&iables...
 JREContainerWizardPage_JRE_System_Library_1=JRE System Library
 JREContainerWizardPage_4=Select JRE for the project build path.
 JREContainerWizardPage_3=System library
@@ -105,6 +114,7 @@ MacVMSearch_2=JVM {0}
 EEVMPage_0=Add EE VM
 EEVMPage_1=&Definition File:
 EEVMPage_2=F&ile...
+EEVMPage_3=Variabl&es...
 EEVMPage_4=Enter definition file
 EEVMPage_5=Definition file does not exist
 EEVMPage_6=JRE Definition
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
index 3e4b9fb..cbf4a82 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.ui.jres;
 
-import com.ibm.icu.text.MessageFormat;
-
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -23,9 +21,18 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Status;
-
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
-
+import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jdt.internal.debug.ui.actions.ControlAccessibleListener;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.VMStandin;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -39,18 +46,7 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
-import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
-import org.eclipse.jdt.internal.debug.ui.actions.ControlAccessibleListener;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.VMStandin;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
+import com.ibm.icu.text.MessageFormat;
 
 /**
  * A composite that displays installed JREs in a combo box, with a 'manage...'
@@ -614,12 +610,12 @@ public class JREsComboBlock {
 				if (environment == null) {
 					fErrorPath = containerPath;
 					selectEnvironment(environment);
-					setError(MessageFormat.format("Unknown execution environment specified: {0}", new String[]{envId})); //$NON-NLS-1$
+					setError(MessageFormat.format(JREMessages.JREsComboBlock_6, new String[]{envId}));
 				} else {
 					selectEnvironment(environment);
 					IVMInstall[] installs = environment.getCompatibleVMs();
 					if (installs.length == 0) {
-						setError(MessageFormat.format("No JREs in workspace compatible with specified execution environment: {0}", new String[]{environment.getId()})); //$NON-NLS-1$
+						setError(MessageFormat.format(JREMessages.JREsComboBlock_7, new String[]{environment.getId()}));
 					}
 				}
 			} else {
@@ -629,17 +625,17 @@ public class JREsComboBlock {
 					fErrorPath = containerPath;
 					String installTypeId = JavaRuntime.getVMInstallTypeId(containerPath);
 					if (installTypeId == null) {
-						setError("JRE type not specified"); //$NON-NLS-1$
+						setError(JREMessages.JREsComboBlock_8);
 					} else {
 						IVMInstallType installType = JavaRuntime.getVMInstallType(installTypeId);
 						if (installType == null) {
-							setError(MessageFormat.format("Unknown JRE type specified: {0}", new String[]{installTypeId})); //$NON-NLS-1$
+							setError(MessageFormat.format(JREMessages.JREsComboBlock_9, new String[]{installTypeId}));
 						} else {
 							String installName = JavaRuntime.getVMInstallName(containerPath);
 							if (installName == null) {
-								setError(MessageFormat.format("JRE name not specified for JRE type: {0}", new String[]{installType.getName()})); //$NON-NLS-1$
+								setError(MessageFormat.format(JREMessages.JREsComboBlock_10, new String[]{installType.getName()}));
 							} else {
-								setError(MessageFormat.format("Unable to resolve JRE: {0} ({1})", new String[]{installName, installType.getName()})); //$NON-NLS-1$
+								setError(MessageFormat.format(JREMessages.JREsComboBlock_11, new String[]{installName, installType.getName()}));
 							}
 						}
 					}
@@ -647,9 +643,9 @@ public class JREsComboBlock {
 					selectJRE(install);
 					File location = install.getInstallLocation();
 					if (location == null) {
-						setError("JRE home directory not specified");  //$NON-NLS-1$
+						setError(JREMessages.JREsComboBlock_12); 
 					} else if (!location.exists()) {
-						setError("JRE home directory does not exist");  //$NON-NLS-1$
+						setError(JREMessages.JREsComboBlock_13);
 					}							
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsPreferencePage.java
index 5c9b4f0..e4ef085 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,12 +18,12 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.launching.AbstractVMInstall;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java
index 756a349..c1b6f9e 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/LibraryStandin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,13 @@ package org.eclipse.jdt.internal.debug.ui.jres;
 
 import java.net.URL;
 
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
 import org.eclipse.jdt.launching.LibraryLocation;
 
@@ -95,7 +97,7 @@ public final class LibraryStandin {
 			return getSystemLibraryPath().equals(lib.getSystemLibraryPath()) 
 				&& equals(getSystemLibrarySourcePath(), lib.getSystemLibrarySourcePath())
 				&& equals(getPackageRootPath(), lib.getPackageRootPath())
-				&& equalsOrNull(getJavadocLocation(), lib.getJavadocLocation());
+				&& equalURLs(getJavadocLocation(), lib.getJavadocLocation());
 		} 
 		return false;
 	}
@@ -135,6 +137,22 @@ public final class LibraryStandin {
 	}
 
 	/**
+	 * Returns whether the given URLs are equal - either may be <code>null</code>.
+	 * @param url1 URL to be compared
+	 * @param url2 URL to be compared
+	 * @return whether the given URLs are equal
+	 */
+	protected boolean equalURLs(URL url1, URL url2) {
+		if (url1 == null) {
+			return url2 == null;
+		}
+		if (url2 == null) {
+			return false;
+		}
+		return url1.toExternalForm().equals(url2.toExternalForm());
+	}
+	
+	/**
 	 * Returns the Javadoc location associated with this Library location.
 	 * 
 	 * @return a url pointing to the Javadoc location associated with
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
index 70057fb..c6c4d5f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/StandardVMPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,19 +18,22 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.debug.ui.StringVariableSelectionDialog;
 import org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.StatusInfo;
 import org.eclipse.jdt.launching.AbstractVMInstallType;
 import org.eclipse.jdt.launching.IVMInstallType;
 import org.eclipse.jdt.launching.VMStandin;
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Image;
@@ -100,7 +103,10 @@ public class StandardVMPage extends AbstractVMInstallPage {
 		fVMName = SWTFactory.createSingleText(composite, 2);
 	//VM arguments
 		SWTFactory.createLabel(composite, JREMessages.AddVMDialog_23, 1);
-		fVMArgs = SWTFactory.createSingleText(composite, 2);
+		fVMArgs = SWTFactory.createSingleText(composite, 1);
+		Button variables = SWTFactory.createPushButton(composite, JREMessages.StandardVMPage_3, null);
+		data = (GridData) variables.getLayoutData();
+		data.horizontalAlignment = GridData.END;
 	//VM libraries block 
 		SWTFactory.createLabel(composite, JREMessages.AddVMDialog_JRE_system_libraries__1, 3);
 		fLibraryBlock = new VMLibraryBlock();
@@ -140,6 +146,17 @@ public class StandardVMPage extends AbstractVMInstallPage {
 				}
 			}
 		});
+		variables.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
+				if (dialog.open() == Window.OK) {
+					String expression = dialog.getVariableExpression();
+					if (expression != null) {
+						fVMArgs.insert(expression);
+					}
+				}
+			}
+		});
 		Dialog.applyDialogFont(composite);
 		setControl(composite);
 		initializeFields();
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMDetailsDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMDetailsDialog.java
index 5ac1414..b36b2d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMDetailsDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMDetailsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,9 @@
 package org.eclipse.jdt.internal.debug.ui.jres;
 
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.IVMInstall2;
 import org.eclipse.jdt.launching.JavaRuntime;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
index 6de0863..2a3767f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMLibraryBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,11 +20,11 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants;
 import org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.debug.ui.jres.LibraryContentProvider.SubElement;
 import org.eclipse.jdt.internal.launching.EEVMInstall;
 import org.eclipse.jdt.internal.launching.EEVMType;
@@ -243,6 +243,7 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 	 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
 	 */
 	public void widgetSelected(SelectionEvent e) {
+		boolean completed = true; 
 		Object source= e.getSource();
 		if (source == fUpButton) {
 			fLibraryContentProvider.up((IStructuredSelection) fLibraryViewer.getSelection());
@@ -251,7 +252,7 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 		} else if (source == fRemoveButton) {
 			fLibraryContentProvider.remove((IStructuredSelection) fLibraryViewer.getSelection());
 		} else if (source == fAddButton) {
-			add((IStructuredSelection) fLibraryViewer.getSelection());
+			completed = add((IStructuredSelection) fLibraryViewer.getSelection());
 		} 
 		else if(source == fJavadocButton) {
 			edit((IStructuredSelection) fLibraryViewer.getSelection(), SubElement.JAVADOC_URL);
@@ -262,7 +263,9 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 		else if (source == fDefaultButton) {
 			restoreDefaultLibraries();
 		}
-		update();
+		if (completed) {
+			update();
+		}
 	}
 
 	/* (non-Javadoc)
@@ -271,9 +274,10 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 	public void widgetDefaultSelected(SelectionEvent e) {}
 
 	/**
-	 * Open the file selection dialog, and add the return jars as libraries.
+	 * Adds external libraries to the JRE. Returns <code>true</code> if successful and
+	 * <code>false</code> if canceled.
 	 */
-	private void add(IStructuredSelection selection) {
+	private boolean add(IStructuredSelection selection) {
 		IDialogSettings dialogSettings= JDIDebugUIPlugin.getDefault().getDialogSettings();
 		String lastUsedPath= dialogSettings.get(LAST_PATH_SETTING);
 		if (lastUsedPath == null) {
@@ -285,7 +289,7 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 		dialog.setFilterPath(lastUsedPath);
 		String res= dialog.open();
 		if (res == null) {
-			return;
+			return false;
 		}
 		String[] fileNames= dialog.getFileNames();
 		int nChosen= fileNames.length;
@@ -298,6 +302,7 @@ public class VMLibraryBlock extends AbstractVMInstallPage implements SelectionLi
 		dialogSettings.put(LAST_PATH_SETTING, filterPath.toOSString());
 		
 		fLibraryContentProvider.add(libs, selection);
+		return true;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
index 14a1498..ef60898 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/VMTypePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,10 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JavaDebugImages;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jdt.internal.launching.StandardVMType;
 import org.eclipse.jdt.launching.IVMInstallType;
 import org.eclipse.jdt.launching.JavaRuntime;
@@ -36,7 +36,6 @@ import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.PlatformUI;
 
@@ -101,11 +100,7 @@ public class VMTypePage extends WizardPage {
 	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createControl(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 1;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+		Composite composite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
 		
 		SWTFactory.createLabel(composite, JREMessages.VMTypePage_3, 1);
 		
@@ -113,6 +108,7 @@ public class VMTypePage extends WizardPage {
 		GridData data = new GridData(GridData.FILL_BOTH);
         data.heightHint = 250;
         data.widthHint = 300;
+        fTypesViewer.getControl().setFont(composite.getFont());
         fTypesViewer.getControl().setLayoutData(data);
         fTypesViewer.setContentProvider(new ArrayContentProvider());
         fTypesViewer.setLabelProvider(new TypeLabelProvider());
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AbstractJavaMainTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AbstractJavaMainTab.java
index 7e089e2..b4c9649 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AbstractJavaMainTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/AbstractJavaMainTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,25 +16,24 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchTab;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
+import org.eclipse.jdt.internal.debug.ui.actions.ControlAccessibleListener;
 import org.eclipse.jdt.internal.launching.JavaMigrationDelegate;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
@@ -111,20 +110,10 @@ private class WidgetListener implements ModifyListener, SelectionListener {
 	 * @param parent the parent composite
 	 */
 	protected void createProjectEditor(Composite parent) {
-		Font font= parent.getFont();
-		Group group= new Group(parent, SWT.NONE);
-		group.setText(LauncherMessages.AbstractJavaMainTab_0); 
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		group.setLayoutData(gd);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		group.setLayout(layout);
-		group.setFont(font);
-		fProjText = new Text(group, SWT.SINGLE | SWT.BORDER);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		fProjText.setLayoutData(gd);
-		fProjText.setFont(font);
+		Group group = SWTFactory.createGroup(parent, LauncherMessages.AbstractJavaMainTab_0, 2, 1, GridData.FILL_HORIZONTAL);
+		fProjText = SWTFactory.createSingleText(group, 1);
 		fProjText.addModifyListener(fListener);
+		ControlAccessibleListener.addListener(fProjText, group.getText());
 		fProjButton = createPushButton(group, LauncherMessages.AbstractJavaMainTab_1, null); 
 		fProjButton.addSelectionListener(fListener);
 	}	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaWorkingDirectoryBlock.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaWorkingDirectoryBlock.java
index f3e06d5..46f70f5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaWorkingDirectoryBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/JavaWorkingDirectoryBlock.java
@@ -19,7 +19,6 @@ import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.ui.WorkingDirectoryBlock;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
-import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.JavaRuntime;
 
@@ -40,7 +39,7 @@ public class JavaWorkingDirectoryBlock extends WorkingDirectoryBlock {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock#getProject(org.eclipse.debug.core.ILaunchConfiguration)
+	 * @see org.eclipse.debug.ui.WorkingDirectoryBlock#getProject(org.eclipse.debug.core.ILaunchConfiguration)
 	 */
 	protected IProject getProject(ILaunchConfiguration configuration)
 			throws CoreException {
@@ -49,10 +48,10 @@ public class JavaWorkingDirectoryBlock extends WorkingDirectoryBlock {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock#log(org.eclipse.core.runtime.CoreException)
+	 * @see org.eclipse.debug.ui.WorkingDirectoryBlock#log(org.eclipse.core.runtime.CoreException)
 	 */
 	protected void log(CoreException e) {
-		JDIDebugUIPlugin.log(e);
+		setErrorMessage(e.getMessage());
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/NameValuePairDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/NameValuePairDialog.java
index a024bd7..1dd7521 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/NameValuePairDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/NameValuePairDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.jdt.internal.debug.ui.launcher;
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -52,20 +53,8 @@ public class NameValuePairDialog extends Dialog {
 	protected Control createDialogArea(Composite parent) {
 		Font font = parent.getFont();
 		
-		Composite comp = new Composite(parent, SWT.NULL);
-		GridLayout topLayout = new GridLayout();
-		topLayout.numColumns = 2;
-		topLayout.marginHeight =
-			convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
-		topLayout.marginWidth =
-			convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-		topLayout.verticalSpacing =
-			convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-		topLayout.horizontalSpacing =
-			convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);		
-		comp.setLayout(topLayout);
-		comp.setFont(font);
-		GridData gd;
+		Composite comp = (Composite) super.createDialogArea(parent);
+		((GridLayout)comp.getLayout()).numColumns=2;
 		
 		fNameLabel = new Label(comp, SWT.NONE);
 		fNameLabel.setText(fFieldLabels[0]);
@@ -79,7 +68,7 @@ public class NameValuePairDialog extends Dialog {
 		
 		fNameText = new Text(comp, SWT.BORDER | SWT.SINGLE);
 		fNameText.setText(fInitialValues[0]);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
 		gd.widthHint = 300;
 		fNameText.setLayoutData(gd);
 		fNameText.setFont(font);
@@ -114,8 +103,8 @@ public class NameValuePairDialog extends Dialog {
 	 */
 	protected void buttonPressed(int buttonId) {
 		if (buttonId == IDialogConstants.OK_ID) {
-			fName= fNameText.getText();
-			fValue = fValueText.getText();
+			fName= fNameText.getText().trim();
+			fValue = fValueText.getText().trim();
 		} else {
 			fName = null;
 			fValue = null;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/OpenPreferencePageResolution.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/OpenPreferencePageResolution.java
index 4c46217..56e950e 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/OpenPreferencePageResolution.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/OpenPreferencePageResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.IMarkerResolution2;
 import org.eclipse.ui.progress.UIJob;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
index dd71be9..48545c9 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/SharedJavaMainTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
@@ -24,13 +25,12 @@ import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
+import org.eclipse.jdt.internal.debug.ui.actions.ControlAccessibleListener;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
@@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Text;
  * Provides general widgets and methods for a Java type launch configuration 
  * 'Main' tab. 
  * This class provides shared functionality for those main tabs which have a 'main type' field on them;
- * such as a main method for a local Java app, or an applet for Java applets
+ * such as a main method for a local Java application, or an Applet for Java Applets
  * 
  * @since 3.2
  */
@@ -56,16 +56,15 @@ public abstract class SharedJavaMainTab extends AbstractJavaMainTab {
 	 * @param parent the parent composite
 	 */
 	protected void createMainTypeEditor(Composite parent, String text) {
-		Font font= parent.getFont();
-		Group mainGroup = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); 
-		Composite comp = SWTFactory.createComposite(mainGroup, font, 2, 2, GridData.FILL_BOTH, 0, 0);
-		fMainText = SWTFactory.createSingleText(comp, 1);
+		Group group = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); 
+		fMainText = SWTFactory.createSingleText(group, 1);
 		fMainText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				updateLaunchConfigurationDialog();
 			}
 		});
-		fSearchButton = createPushButton(comp, LauncherMessages.AbstractJavaMainTab_2, null); 
+		ControlAccessibleListener.addListener(fMainText, group.getText());
+		fSearchButton = createPushButton(group, LauncherMessages.AbstractJavaMainTab_2, null); 
 		fSearchButton.addSelectionListener(new SelectionListener() {
 			public void widgetDefaultSelected(SelectionEvent e) {
 			}
@@ -73,7 +72,7 @@ public abstract class SharedJavaMainTab extends AbstractJavaMainTab {
 				handleSearchButtonSelected();
 			}
 		});
-		createMainTypeExtensions(comp);
+		createMainTypeExtensions(group);
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/VMArgumentsBlock.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/VMArgumentsBlock.java
index c2a7183..1a5c724 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/VMArgumentsBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/VMArgumentsBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,7 +88,7 @@ public class VMArgumentsBlock extends JavaLaunchTab {
 		fVMArgumentsText.setFont(font);
 		fVMArgumentsText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent evt) {
-				updateLaunchConfigurationDialog();
+				scheduleUpdateJob();
 			}
 		});	
 		ControlAccessibleListener.addListener(fVMArgumentsText, group.getText());
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/WorkspaceOperationRunner.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/WorkspaceOperationRunner.java
index 7c5f19e..24a65d1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/WorkspaceOperationRunner.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/launcher/WorkspaceOperationRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,10 +17,8 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
-
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-
 import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
 import org.eclipse.ui.texteditor.ISchedulingRuleProvider;
 
@@ -64,9 +62,15 @@ class WorkspaceOperationRunner implements IRunnableContext {
 		else
 			run(fork, cancelable, runnable, ResourcesPlugin.getWorkspace().getRoot());
 	}
-	
-	/*
-	 * @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
+
+	/**
+	 * Runs a new {@link WorkspaceModifyDelegatingOperation}
+	 * @param fork
+	 * @param cancelable
+	 * @param runnable
+	 * @param schedulingRule
+	 * @throws InvocationTargetException
+	 * @throws InterruptedException
 	 */
 	public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable, ISchedulingRule schedulingRule) throws InvocationTargetException, InterruptedException {
 		WorkspaceModifyDelegatingOperation operation= new WorkspaceModifyDelegatingOperation(runnable, schedulingRule);
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaContendedMonitor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaContendedMonitor.java
index 0a02940..deac982 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaContendedMonitor.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaContendedMonitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -161,8 +161,12 @@ public class JavaContendedMonitor extends PlatformObject implements IDebugElemen
 	 * @see org.eclipse.debug.core.model.ISuspendResume#canResume()
 	 */
 	public boolean canResume() {
-		if(getOwningThread() != null) {
-			return getOwningThread().getThread().getOriginalThread().canResume();
+		JavaOwningThread owningThread = getOwningThread();
+		if(owningThread != null) {
+			IThread originalThread = owningThread.getThread().getOriginalThread();
+			if (originalThread != null) {
+				return originalThread.canResume();
+			}
 		}
 		return false;
 	}
@@ -178,8 +182,12 @@ public class JavaContendedMonitor extends PlatformObject implements IDebugElemen
 	 * @see org.eclipse.debug.core.model.ISuspendResume#isSuspended()
 	 */
 	public boolean isSuspended() {
-		if(getOwningThread() != null) {
-			return getOwningThread().getThread().getOriginalThread().isSuspended();
+		JavaOwningThread owningThread = getOwningThread();
+		if(owningThread != null) {
+			IThread originalThread = owningThread.getThread().getOriginalThread();
+			if (originalThread != null) {
+				return originalThread.isSuspended();
+			}
 		}
 		return false;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaElementContentProvider.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaElementContentProvider.java
index bba1831..27584b6 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaElementContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/monitors/JavaElementContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,8 +26,6 @@ import org.eclipse.jface.util.PropertyChangeEvent;
  */
 public abstract class JavaElementContentProvider extends ElementContentProvider {
 	
-	protected Object[] EMPTY = new Object[0];
-	
 	private static boolean fgDisplayMonitors;
 	private static boolean fgDisplayThreadGroups;
 	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java
deleted file mode 100644
index 980fc06..0000000
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/BreakpointConditionEditor.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.debug.ui.propertypages;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
-import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
-import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.JDISourceViewer;
-import org.eclipse.jdt.internal.debug.ui.contentassist.IJavaDebugContentAssistContext;
-import org.eclipse.jdt.internal.debug.ui.contentassist.JavaDebugContentAssistProcessor;
-import org.eclipse.jdt.internal.debug.ui.contentassist.TypeContext;
-import org.eclipse.jdt.internal.debug.ui.display.DisplayViewerConfiguration;
-import org.eclipse.jdt.ui.text.IJavaPartitions;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jface.text.TextViewerUndoManager;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-/**
- * The widget for the conditional editor on the breakpoints properties page
- */
-public class BreakpointConditionEditor {
-	
-	private JDISourceViewer fViewer;
-	private IContentAssistProcessor fCompletionProcessor;	
-	private String fOldValue;
-	private String fErrorMessage;
-	private JavaLineBreakpointPage fPage;
-	private IJavaLineBreakpoint fBreakpoint;
-	private IHandlerService fHandlerService;
-	private IHandler fHandler;
-	private IHandlerActivation fActivation;
-    private IDocumentListener fDocumentListener;
-		
-	/**
-	 * Constructor
-	 * @param parent the parent to add this widget to
-	 * @param page the page that is associated with this widget
-	 */
-	public BreakpointConditionEditor(Composite parent, JavaLineBreakpointPage page) {
-		fPage = page;
-		fBreakpoint = (IJavaLineBreakpoint) fPage.getBreakpoint();
-		String condition = new String();
-		try {
-			condition = fBreakpoint.getCondition();
-			fErrorMessage  = PropertyPageMessages.BreakpointConditionEditor_1; 
-			fOldValue = ""; //$NON-NLS-1$
-			
-			fViewer = new JDISourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT);
-			fViewer.setInput(parent);
-			IDocument document = new Document();
-			JDIDebugUIPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING);
-		// we can only do code assist if there is an associated type
-			IJavaDebugContentAssistContext context = null;
-			IType type = BreakpointUtils.getType(fBreakpoint);
-			if (type == null) {
-				context = new TypeContext(null, -1);
-			} 
-			else {
-				try {	
-					String source = null;
-					ICompilationUnit compilationUnit = type.getCompilationUnit();
-					if (compilationUnit != null && compilationUnit.getJavaProject().getProject().exists()) {
-						source = compilationUnit.getSource();
-					} 
-					else {
-						IClassFile classFile = type.getClassFile();
-						if (classFile != null) {
-							source = classFile.getSource();
-						}
-					}
-					int lineNumber = fBreakpoint.getMarker().getAttribute(IMarker.LINE_NUMBER, -1);
-					int position= -1;
-					if (source != null && lineNumber != -1) {
-						try {
-							position = new Document(source).getLineOffset(lineNumber - 1);
-						} 
-						catch (BadLocationException e) {JDIDebugUIPlugin.log(e);}
-					}
-					context = new TypeContext(type, position);
-				} 
-				catch (CoreException e) {JDIDebugUIPlugin.log(e);}
-			}
-			fCompletionProcessor = new JavaDebugContentAssistProcessor(context);
-			fViewer.configure(new DisplayViewerConfiguration() {
-				public IContentAssistProcessor getContentAssistantProcessor() {
-						return fCompletionProcessor;
-				}
-			});
-			fViewer.setEditable(true);
-		//if we don't check upstream tracing can throw assertion exceptions see bug 181914
-			document.set((condition == null ? "" : condition)); //$NON-NLS-1$
-			fViewer.setDocument(document);
-			fViewer.setUndoManager(new TextViewerUndoManager(10));
-			fViewer.getUndoManager().connect(fViewer);
-			fDocumentListener = new IDocumentListener() {
-	            public void documentAboutToBeChanged(DocumentEvent event) {
-	            }
-	            public void documentChanged(DocumentEvent event) {
-	                valueChanged();
-	            }
-	        };
-			fViewer.getDocument().addDocumentListener(fDocumentListener);
-			GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
-			gd.heightHint = fPage.convertHeightInCharsToPixels(10);
-			gd.widthHint = fPage.convertWidthInCharsToPixels(40);
-			fViewer.getControl().setLayoutData(gd);
-			fHandler = new AbstractHandler() {
-				public Object execute(ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
-					fViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
-					return null;
-				}
-			};
-			fHandlerService = (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
-			
-			fViewer.getControl().addFocusListener(new FocusAdapter() {
-				public void focusGained(FocusEvent e) {
-					activateContentAssist();
-				}
-				public void focusLost(FocusEvent e) {
-					deactivateContentAssist();
-				}				
-			});
-		} 
-		catch (CoreException exception) {JDIDebugUIPlugin.log(exception);}
-	}
-
-	/**
-	 * Returns the condition defined in the source viewer.
-	 * @return the contents of this condition editor
-	 */
-	public String getCondition() {
-		return fViewer.getDocument().get();
-	}
-
-	/**
-	 * @see org.eclipse.jface.preference.FieldEditor#refreshValidState()
-	 */
-	protected void refreshValidState() {
-		if (!fViewer.isEditable()) {
-			fPage.removeErrorMessage(fErrorMessage);
-		} else {
-			String text = fViewer.getDocument().get();
-			if (!(text != null && text.trim().length() > 0)) {
-				fPage.addErrorMessage(fErrorMessage);
-			} else {
-				fPage.removeErrorMessage(fErrorMessage);
-			}
-		}
-	}
-
-	/**
-	 * @see org.eclipse.jface.preference.FieldEditor#setEnabled(boolean, org.eclipse.swt.widgets.Composite)
-	 */
-	public void setEnabled(boolean enabled) {
-	    fViewer.setEditable(enabled);
-	    fViewer.getTextWidget().setEnabled(enabled);
-		if (enabled) {
-			fViewer.updateViewerColors();
-			fViewer.getTextWidget().setFocus();			
-		} else {
-			Color color = fViewer.getControl().getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
-			fViewer.getTextWidget().setBackground(color);			
-		}
-		valueChanged();
-	}
-	
-	/**
-	 * Handle that the value changed
-	 */
-	protected void valueChanged() {
-		String newValue = fViewer.getDocument().get();
-		if (!newValue.equals(fOldValue)) {
-			fOldValue = newValue;
-		}
-		refreshValidState();
-	}
-	
-	/**
-	 * Dispose of the handlers, etc
-	 */
-	public void dispose() {
-		deactivateContentAssist();
-		
-	    fViewer.getDocument().removeDocumentListener(fDocumentListener);
-		fViewer.dispose();
-	}
-	
-	private void activateContentAssist() {
-		fActivation = fHandlerService.activateHandler(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, fHandler);
-	}
-
-	private void deactivateContentAssist() {
-		if(fActivation != null) {
-			fHandlerService.deactivateHandler(fActivation);
-			fActivation = null;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
index f320f77..9632552 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaBreakpointPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,27 +19,39 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.internal.ui.SWTFactory;
+import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaWatchpoint;
+import org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaClassPrepareBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaMethodBreakpoint;
+import org.eclipse.jdt.internal.debug.core.breakpoints.JavaWatchpoint;
+import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.AbstractJavaBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.CompositeBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.ExceptionBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.MethodBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.StandardJavaBreakpointEditor;
+import org.eclipse.jdt.internal.debug.ui.breakpoints.WatchpointEditor;
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IPropertyListener;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.PropertyPage;
 import org.eclipse.ui.model.IWorkbenchAdapter;
@@ -53,10 +65,9 @@ public class JavaBreakpointPage extends PropertyPage {
 	
 	protected JavaElementLabelProvider fJavaLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
 	protected Button fEnabledButton;
-	protected Button fHitCountButton;
-	protected Text fHitCountText;
-	protected Combo fSuspendPolicy;
 	protected List fErrorMessages= new ArrayList();
+	protected String fPrevMessage = null;
+	private AbstractJavaBreakpointEditor fEditor;
 	
 	/**
 	 * Attribute used to indicate that a breakpoint should be deleted
@@ -70,11 +81,6 @@ public class JavaBreakpointPage extends PropertyPage {
 	protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
 	
 	/**
-	 * the hit count error message
-	 */
-	private static final String fgHitCountErrorMessage = PropertyPageMessages.JavaBreakpointPage_0; 
-	
-	/**
 	 * Store the breakpoint properties.
 	 * @see org.eclipse.jface.preference.IPreferencePage#performOk()
 	 */
@@ -140,9 +146,10 @@ public class JavaBreakpointPage extends PropertyPage {
 	 */
 	protected void doStore() throws CoreException {
 		IJavaBreakpoint breakpoint = getBreakpoint();
-		storeSuspendPolicy(breakpoint);
-		storeHitCount(breakpoint);
 		storeEnabled(breakpoint);
+		if (fEditor.isDirty()) {
+			fEditor.doSave();
+		}
 	}
 
 	/**
@@ -154,55 +161,18 @@ public class JavaBreakpointPage extends PropertyPage {
 	private void storeEnabled(IJavaBreakpoint breakpoint) throws CoreException {
 		breakpoint.setEnabled(fEnabledButton.getSelection());
 	}
-
-	/**
-	 * Stores the value of the hit count in the breakpoint.
-	 * @param breakpoint the breakpoint to update
-	 * @throws CoreException if an exception occurs while setting
-	 *  the hit count
-	 */
-	private void storeHitCount(IJavaBreakpoint breakpoint) throws CoreException {
-		int hitCount = -1;
-		if (fHitCountButton.getSelection()) {
-			try {
-				hitCount = Integer.parseInt(fHitCountText.getText());
-			} 
-			catch (NumberFormatException e) {
-				JDIDebugUIPlugin.log(new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), IStatus.ERROR, MessageFormat.format("JavaBreakpointPage allowed input of invalid string for hit count value: {0}.", new String[] { fHitCountText.getText() }), e));  //$NON-NLS-1$
-			}
-		}
-		breakpoint.setHitCount(hitCount);
-	}
-
-	/**
-	 * Stores the value of the suspend policy in the breakpoint.
-	 * @param breakpoint the breakpoint to update
-	 * @throws CoreException if an exception occurs while setting the suspend policy
-	 */
-	private void storeSuspendPolicy(IJavaBreakpoint breakpoint) throws CoreException {
-		int suspendPolicy = IJavaBreakpoint.SUSPEND_VM;
-		if(fSuspendPolicy.getSelectionIndex() == 0) {
-			suspendPolicy = IJavaBreakpoint.SUSPEND_THREAD;
-		}
-		breakpoint.setSuspendPolicy(suspendPolicy);
-	}
-
+	
 	/**
 	 * Creates the labels and editors displayed for the breakpoint.
 	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createContents(Composite parent) {
-		setTitle(PropertyPageMessages.JavaBreakpointPage_11);
 		noDefaultAndApplyButton();
-		Composite mainComposite = createComposite(parent, 1);
+		Composite mainComposite = SWTFactory.createComposite(parent, parent.getFont(), 1, 1, GridData.FILL_HORIZONTAL, 0, 0);
 		createLabels(mainComposite);
-		try {
-			createEnabledButton(mainComposite);
-			createHitCountEditor(mainComposite);
-			createTypeSpecificEditors(mainComposite);
-			createSuspendPolicyEditor(mainComposite); // Suspend policy is considered uncommon. Add it last.
-		} 
-		catch (CoreException e) {JDIDebugUIPlugin.log(e);}
+		createLabel(mainComposite, ""); //$NON-NLS-1$ // spacer
+		createEnabledButton(mainComposite);
+		createTypeSpecificEditors(mainComposite);
 		setValid(true);
 		// if this breakpoint is being created, change the shell title to indicate 'creation'
 		try {
@@ -247,7 +217,7 @@ public class JavaBreakpointPage extends PropertyPage {
 	 * @param parent
 	 */
 	protected void createLabels(Composite parent) {
-		Composite labelComposite = createComposite(parent, 2);
+		Composite labelComposite = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
 		try {
 			String typeName = ((IJavaBreakpoint) getElement()).getTypeName();
 			if (typeName != null) {
@@ -262,89 +232,17 @@ public class JavaBreakpointPage extends PropertyPage {
 	}
 
 	/**
-	 * Creates the editor for configuring the suspend policy (suspend
-	 * VM or suspend thread) of the breakpoint.
-	 * @param parent the composite in which the suspend policy
-	 * 		editor will be created.
-	 */
-	private void createSuspendPolicyEditor(Composite parent) throws CoreException {
-		Composite comp = createComposite(parent, 2);
-		createLabel(comp, PropertyPageMessages.JavaBreakpointPage_6); 
-		boolean suspendThread= getBreakpoint().getSuspendPolicy() == IJavaBreakpoint.SUSPEND_THREAD;
-		fSuspendPolicy = new Combo(comp, SWT.BORDER | SWT.READ_ONLY);
-		fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_7);
-		fSuspendPolicy.add(PropertyPageMessages.JavaBreakpointPage_8);
-		fSuspendPolicy.select(1);
-		if(suspendThread) {
-			fSuspendPolicy.select(0);
-		}
-	}
-
-	/**
-	 * @param parent the composite in which the hit count editor
-	 * 		will be created
-	 */
-	private void createHitCountEditor(Composite parent) throws CoreException {
-		Composite hitCountComposite = createComposite(parent, 2);
-		fHitCountButton= createCheckButton(hitCountComposite, PropertyPageMessages.JavaBreakpointPage_4); 
-		fHitCountButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent event) {
-				fHitCountText.setEnabled(fHitCountButton.getSelection());
-				hitCountChanged();
-			}
-		});
-		int hitCount = getBreakpoint().getHitCount();
-		String hitCountString= EMPTY_STRING;
-		if (hitCount > 0) {
-			hitCountString = new Integer(hitCount).toString();
-			fHitCountButton.setSelection(true);
-		} else {
-			fHitCountButton.setSelection(false);
-		}
-		fHitCountText= createText(hitCountComposite, hitCountString); 
-		if (hitCount <= 0) {
-			fHitCountText.setEnabled(false);
-		}
-		fHitCountText.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				hitCountChanged();
-			}
-		});
-	}
-	
-	/**
-	 * Validates the current state of the hit count editor.
-	 * Hit count value must be a positive integer.
-	 */
-	private void hitCountChanged() {
-		if (!fHitCountButton.getSelection()) {
-			removeErrorMessage(fgHitCountErrorMessage);
-			return;
-		}
-		String hitCountText= fHitCountText.getText();
-		int hitCount= -1;
-		try {
-			hitCount = Integer.parseInt(hitCountText);
-		} 
-		catch (NumberFormatException e1) {
-			addErrorMessage(fgHitCountErrorMessage);
-			return;
-		}
-		if (hitCount < 1) {
-			addErrorMessage(fgHitCountErrorMessage);
-		} else {
-			removeErrorMessage(fgHitCountErrorMessage);
-		}
-	}
-
-	/**
 	 * Creates the button to toggle enablement of the breakpoint
 	 * @param parent
-	 * @throws CoreException
 	 */
-	protected void createEnabledButton(Composite parent) throws CoreException {
+	protected void createEnabledButton(Composite parent) {
 		fEnabledButton = createCheckButton(parent, PropertyPageMessages.JavaBreakpointPage_5); 
-		fEnabledButton.setSelection(getBreakpoint().isEnabled());
+		try {
+			fEnabledButton.setSelection(getBreakpoint().isEnabled());
+		}
+		catch(CoreException ce) {
+			JDIDebugUIPlugin.log(ce);
+		}
 	}
 	
 	/**
@@ -360,14 +258,94 @@ public class JavaBreakpointPage extends PropertyPage {
 	 * breakpoint page.
 	 * @param parent
 	 */
-	protected void createTypeSpecificLabels(Composite parent) {}
+	protected void createTypeSpecificLabels(Composite parent) {
+		// Line number
+		IJavaBreakpoint jb = getBreakpoint();
+		if (jb instanceof IJavaLineBreakpoint) {
+			IJavaLineBreakpoint breakpoint = (IJavaLineBreakpoint) jb;
+			StringBuffer lineNumber = new StringBuffer(4);
+			try {
+				int lNumber = breakpoint.getLineNumber();
+				if (lNumber > 0) {
+					lineNumber.append(lNumber);
+				}
+			} catch (CoreException ce) {
+				JDIDebugUIPlugin.log(ce);
+			}
+			if (lineNumber.length() > 0) {
+				createLabel(parent, PropertyPageMessages.JavaLineBreakpointPage_2); 
+				Text text = SWTFactory.createText(parent, SWT.READ_ONLY, 1, lineNumber.toString());
+				text.setBackground(parent.getBackground());
+			}
+			// Member
+			try {
+				IMember member = BreakpointUtils.getMember(breakpoint);
+				if (member == null) {
+					return;
+				}
+				String label = PropertyPageMessages.JavaLineBreakpointPage_3; 
+				if (breakpoint instanceof IJavaMethodBreakpoint) {
+					label = PropertyPageMessages.JavaLineBreakpointPage_4; 
+				} else if (breakpoint instanceof IJavaWatchpoint) {
+					label = PropertyPageMessages.JavaLineBreakpointPage_5; 
+				}
+				createLabel(parent, label);
+				Text text = SWTFactory.createText(parent, SWT.READ_ONLY, 1, fJavaLabelProvider.getText(member));
+				text.setBackground(parent.getBackground());
+			} 
+			catch (CoreException exception) {JDIDebugUIPlugin.log(exception);}
+		}
+	}
 	
 	/**
 	* Allows subclasses to add type specific editors to the common Java
 	* breakpoint page.
 	* @param parent
 	*/
-   protected void createTypeSpecificEditors(Composite parent) throws CoreException {}
+   protected void createTypeSpecificEditors(Composite parent) {
+	   try {
+		String type = getBreakpoint().getMarker().getType();
+		if (JavaClassPrepareBreakpoint.JAVA_CLASS_PREPARE_BREAKPOINT.equals(type)) {
+			setTitle(PropertyPageMessages.JavaBreakpointPage_11);
+			fEditor = new StandardJavaBreakpointEditor();
+		} else if (JavaLineBreakpoint.JAVA_LINE_BREAKPOINT.equals(type)) {
+			setTitle(PropertyPageMessages.JavaLineBreakpointPage_18);
+			fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[]
+			    {new StandardJavaBreakpointEditor(), new JavaBreakpointConditionEditor()}); 
+		} else if (JavaExceptionBreakpoint.JAVA_EXCEPTION_BREAKPOINT.equals(type)) {
+			setTitle(PropertyPageMessages.JavaExceptionBreakpointPage_5);
+			fEditor = new ExceptionBreakpointEditor();
+		} else if (JavaWatchpoint.JAVA_WATCHPOINT.equals(type)) {
+			setTitle(PropertyPageMessages.JavaLineBreakpointPage_19);
+			fEditor = new WatchpointEditor();
+		} else if (JavaMethodBreakpoint.JAVA_METHOD_BREAKPOINT.equals(type)) {
+			setTitle(PropertyPageMessages.JavaLineBreakpointPage_20);
+			fEditor = new CompositeBreakpointEditor(new AbstractJavaBreakpointEditor[] 
+			    {new MethodBreakpointEditor(), new JavaBreakpointConditionEditor()});
+		} else {
+			// use standard editor for any other kind of breakpoint (@see bug 325161)
+			fEditor = new StandardJavaBreakpointEditor();
+		}
+		fEditor.createControl(parent);
+		fEditor.addPropertyListener(new IPropertyListener() {
+			public void propertyChanged(Object source, int propId) {
+				IStatus status = fEditor.getStatus();
+				if (status.isOK()) {
+					if (fPrevMessage != null) {
+						removeErrorMessage(fPrevMessage);
+						fPrevMessage = null;
+					}
+				} else {
+					fPrevMessage = status.getMessage();
+					addErrorMessage(fPrevMessage);
+				}
+			}
+		});
+		fEditor.setInput(getBreakpoint());
+	} catch (CoreException e) {
+		setErrorMessage(e.getMessage());
+	}
+   }
 	
 	/**
 	 * Creates a fully configured text editor with the given initial value
@@ -378,16 +356,6 @@ public class JavaBreakpointPage extends PropertyPage {
 	protected Text createText(Composite parent, String initialValue) {
 		return SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1, initialValue);
 	}
-	
-	/**
-	 * Creates a fully configured composite with the given number of columns
-	 * @param parent
-	 * @param numColumns
-	 * @return the configured composite
-	 */
-	protected Composite createComposite(Composite parent, int numColumns) {
-		return SWTFactory.createComposite(parent, parent.getFont(), numColumns, 1, GridData.FILL_HORIZONTAL, 0, 0);
-	}
 
 	/**
 	 * Creates a fully configured check button with the given text.
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaExceptionBreakpointPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaExceptionBreakpointPage.java
deleted file mode 100644
index c8c5c0a..0000000
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaExceptionBreakpointPage.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.debug.ui.propertypages;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.debug.core.IJavaExceptionBreakpoint;
-import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
-import org.eclipse.jdt.internal.debug.core.breakpoints.JavaExceptionBreakpoint;
-import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Implements the property page for a Java exception breakpoint
- */
-public class JavaExceptionBreakpointPage extends JavaBreakpointPage {
-
-	//widgets
-	private Button fCaughtButton;
-	private Button fUncaughtButton;
-	private Button fSuspendOnSubclasses;
-	
-	private static final String fgExceptionBreakpointError= PropertyPageMessages.JavaExceptionBreakpointPage_2; 
-	/**
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#doStore()
-	 */
-	protected void doStore() throws CoreException {
-		super.doStore();
-		IJavaExceptionBreakpoint breakpoint= (IJavaExceptionBreakpoint) getBreakpoint();
-		boolean caught= fCaughtButton.getSelection();
-		if (caught != breakpoint.isCaught()) {
-			breakpoint.setCaught(caught);
-		}
-		boolean uncaught= fUncaughtButton.getSelection();
-		if (uncaught != breakpoint.isUncaught()) {
-			breakpoint.setUncaught(uncaught);
-		}
-		// TODO remove cast once the API freeze is over and the method has been added to IJavaExceptionBreakpoint
-		boolean suspend = fSuspendOnSubclasses.getSelection();
-		if(suspend != ((JavaExceptionBreakpoint)breakpoint).isSuspendOnSubclasses()) {
-			((JavaExceptionBreakpoint)breakpoint).setSuspendOnSubclasses(suspend);
-		}
-	}
-
-	/**
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#createTypeSpecificEditors(org.eclipse.swt.widgets.Composite)
-	 */
-	protected void createTypeSpecificEditors(Composite parent) {
-		setTitle(PropertyPageMessages.JavaExceptionBreakpointPage_5);
-		IJavaExceptionBreakpoint breakpoint= (IJavaExceptionBreakpoint) getBreakpoint();
-		SelectionAdapter exceptionBreakpointValidator= new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				validateExceptionBreakpoint();
-			}
-		};
-		createLabel(parent, PropertyPageMessages.JavaExceptionBreakpointPage_3); 
-		fEnabledButton.addSelectionListener(exceptionBreakpointValidator);
-		fCaughtButton= createCheckButton(parent, PropertyPageMessages.JavaExceptionBreakpointPage_0); 
-		try {
-			fCaughtButton.setSelection(breakpoint.isCaught());
-		} catch (CoreException e) {
-			JDIDebugPlugin.log(e);
-		}
-		fCaughtButton.addSelectionListener(exceptionBreakpointValidator);
-		fUncaughtButton= createCheckButton(parent, PropertyPageMessages.JavaExceptionBreakpointPage_1); 
-		try {
-			fUncaughtButton.setSelection(breakpoint.isUncaught());
-		} catch (CoreException e) {
-			JDIDebugPlugin.log(e);
-		}
-		fUncaughtButton.addSelectionListener(exceptionBreakpointValidator);
-		fSuspendOnSubclasses = createCheckButton(parent, PropertyPageMessages.JavaExceptionBreakpointPage_4);
-		try {
-			// TODO add back the API for isSuspendOnSubclasses and setSuspendOnSubclasses in IJavaExceptionBreakpoint, and remove the cast below
-			fSuspendOnSubclasses.setSelection(((JavaExceptionBreakpoint)breakpoint).isSuspendOnSubclasses());
-		}
-		catch (CoreException ce) {JDIDebugPlugin.log(ce);}
-	}
-
-	/**
-	 * validates the exception breakpoint
-	 */
-	private void validateExceptionBreakpoint() {
-		if (fEnabledButton.getSelection() && !(fCaughtButton.getSelection() || fUncaughtButton.getSelection())) {
-			addErrorMessage(fgExceptionBreakpointError);
-		} else {
-			removeErrorMessage(fgExceptionBreakpointError);
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#createControl(org.eclipse.swt.widgets.Composite)
-	 */
-	public void createControl(Composite parent) {
-		super.createControl(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaDebugHelpContextIds.JAVA_EXCEPTION_BREAKPOINT_PROPERTY_PAGE);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java
deleted file mode 100644
index ae6a827..0000000
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/JavaLineBreakpointPage.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.debug.ui.propertypages;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
-import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
-import org.eclipse.jdt.debug.core.IJavaWatchpoint;
-import org.eclipse.jdt.internal.debug.ui.BreakpointUtils;
-import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
-import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Property page for editing breakpoints of type
- * <code>org.eclipse.jdt.debug.core.IJavaLineBreakpoint</code>.
- */
-public class JavaLineBreakpointPage extends JavaBreakpointPage {
-	
-	private Button fEnableConditionButton;
-	private BreakpointConditionEditor fConditionEditor;
-	private Button fConditionIsTrue;
-	private Button fConditionHasChanged;
-	private Label fSuspendWhenLabel;
-	// Watchpoint editors
-	private Button fFieldAccess;
-	private Button fFieldModification;
-	// Method breakpoint editors
-	private Button fMethodEntry;
-	private Button fMethodExit;
-	
-	private static final String fgWatchpointError = PropertyPageMessages.JavaLineBreakpointPage_0; 
-	private static final String fgMethodBreakpointError = PropertyPageMessages.JavaLineBreakpointPage_1;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#doStore()
-	 */
-	protected void doStore() throws CoreException {
-		IJavaLineBreakpoint breakpoint= (IJavaLineBreakpoint) getBreakpoint();
-		super.doStore();
-		if (fConditionEditor != null) {
-			boolean enableCondition = fEnableConditionButton.getSelection();
-			String condition = fConditionEditor.getCondition();
-			boolean suspendOnTrue= fConditionIsTrue.getSelection();
-			if (breakpoint.isConditionEnabled() != enableCondition) {
-				breakpoint.setConditionEnabled(enableCondition);
-			}
-			if (!condition.equals(breakpoint.getCondition())) {
-				breakpoint.setCondition(condition);
-			}
-			if (breakpoint.isConditionSuspendOnTrue() != suspendOnTrue) {
-				breakpoint.setConditionSuspendOnTrue(suspendOnTrue);
-			}
-		}
-		if (breakpoint instanceof IJavaWatchpoint) {
-			IJavaWatchpoint watchpoint= (IJavaWatchpoint) getBreakpoint();
-			boolean access = fFieldAccess.getSelection();
-			boolean modification = fFieldModification.getSelection();
-			if (access != watchpoint.isAccess()) {
-				watchpoint.setAccess(access);
-			}
-			if (modification != watchpoint.isModification()) {
-				watchpoint.setModification(modification);
-			}
-		}
-		if (breakpoint instanceof IJavaMethodBreakpoint) {
-			IJavaMethodBreakpoint methodBreakpoint= (IJavaMethodBreakpoint) getBreakpoint();
-			boolean entry = fMethodEntry.getSelection();
-			boolean exit = fMethodExit.getSelection();
-			if (entry != methodBreakpoint.isEntry()) {
-				methodBreakpoint.setEntry(entry);
-			}
-			if (exit != methodBreakpoint.isExit()) {
-				methodBreakpoint.setExit(exit);
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#createTypeSpecificLabels(org.eclipse.swt.widgets.Composite)
-	 */
-	protected void createTypeSpecificLabels(Composite parent) {
-		// Line number
-		IJavaLineBreakpoint breakpoint = (IJavaLineBreakpoint) getBreakpoint();
-		StringBuffer lineNumber = new StringBuffer(4);
-		try {
-			int lNumber = breakpoint.getLineNumber();
-			if (lNumber > 0) {
-				lineNumber.append(lNumber);
-			}
-		} catch (CoreException ce) {
-			JDIDebugUIPlugin.log(ce);
-		}
-		if (lineNumber.length() > 0) {
-			createLabel(parent, PropertyPageMessages.JavaLineBreakpointPage_2); 
-			Text text = SWTFactory.createText(parent, SWT.READ_ONLY, 1, lineNumber.toString());
-			text.setBackground(parent.getBackground());
-		}
-		// Member
-		try {
-			IMember member = BreakpointUtils.getMember(breakpoint);
-			if (member == null) {
-				return;
-			}
-			String label = PropertyPageMessages.JavaLineBreakpointPage_3; 
-			if (breakpoint instanceof IJavaMethodBreakpoint) {
-				label = PropertyPageMessages.JavaLineBreakpointPage_4; 
-			} else if (breakpoint instanceof IJavaWatchpoint) {
-				label = PropertyPageMessages.JavaLineBreakpointPage_5; 
-			}
-			createLabel(parent, label);
-			Text text = SWTFactory.createText(parent, SWT.READ_ONLY, 1, fJavaLabelProvider.getText(member));
-			text.setBackground(parent.getBackground());
-		} 
-		catch (CoreException exception) {JDIDebugUIPlugin.log(exception);}
-	}
-	
-	/**
-	 * Create the condition editor and associated editors.
-	 * @see org.eclipse.jdt.internal.debug.ui.propertypages.JavaBreakpointPage#createTypeSpecificEditors(org.eclipse.swt.widgets.Composite)
-	 */
-	protected void createTypeSpecificEditors(Composite parent) throws CoreException {
-		setTitle(PropertyPageMessages.JavaLineBreakpointPage_18);
-		IJavaLineBreakpoint breakpoint = (IJavaLineBreakpoint) getBreakpoint();
-		if (breakpoint.supportsCondition()) {
-			createConditionEditor(parent);
-		}
-		if (breakpoint instanceof IJavaWatchpoint) {
-			setTitle(PropertyPageMessages.JavaLineBreakpointPage_19);
-			IJavaWatchpoint watchpoint= (IJavaWatchpoint) getBreakpoint();
-			SelectionAdapter watchpointValidator= new SelectionAdapter() {
-				public void widgetSelected(SelectionEvent e) {
-					validateWatchpoint();
-				}
-			};
-			createLabel(parent, PropertyPageMessages.JavaLineBreakpointPage_6); 
-			fEnabledButton.addSelectionListener(watchpointValidator);
-			fFieldAccess = createCheckButton(parent, PropertyPageMessages.JavaLineBreakpointPage_7); 
-			fFieldAccess.setSelection(watchpoint.isAccess());
-			fFieldAccess.addSelectionListener(watchpointValidator);
-			fFieldModification = createCheckButton(parent, PropertyPageMessages.JavaLineBreakpointPage_8); 
-			fFieldModification.setSelection(watchpoint.isModification());
-			fFieldModification.addSelectionListener(watchpointValidator);
-		}
-		if (breakpoint instanceof IJavaMethodBreakpoint) {
-			setTitle(PropertyPageMessages.JavaLineBreakpointPage_20);
-			IJavaMethodBreakpoint methodBreakpoint = (IJavaMethodBreakpoint) getBreakpoint();
-			SelectionAdapter methodBreakpointValidator= new SelectionAdapter() {
-				public void widgetSelected(SelectionEvent e) {
-					validateMethodBreakpoint();
-				}
-			}; 
-			createLabel(parent, PropertyPageMessages.JavaLineBreakpointPage_9); 
-			fEnabledButton.addSelectionListener(methodBreakpointValidator);
-			fMethodEntry = createCheckButton(parent, PropertyPageMessages.JavaLineBreakpointPage_10); 
-			fMethodEntry.setSelection(methodBreakpoint.isEntry());
-			fMethodEntry.addSelectionListener(methodBreakpointValidator);
-			fMethodExit = createCheckButton(parent, PropertyPageMessages.JavaLineBreakpointPage_11); 
-			fMethodExit.setSelection(methodBreakpoint.isExit());
-			fMethodExit.addSelectionListener(methodBreakpointValidator);
-		}
-	}
-	
-	/**
-	 * Validates the watchpoint...if we are one
-	 */
-	private void validateWatchpoint() {
-		if (fEnabledButton.getSelection() && !(fFieldAccess.getSelection() || fFieldModification.getSelection())) {
-			addErrorMessage(fgWatchpointError);
-		} 
-		else {
-			removeErrorMessage(fgWatchpointError);
-		}
-	}
-	
-	/**
-	 * Validates the method breakpoint, if we are one
-	 */
-	private void validateMethodBreakpoint() {
-		boolean valid = true;
-		if (fEnabledButton.getSelection() && !(fMethodEntry.getSelection() || fMethodExit.getSelection())) {
-			setErrorMessage(fgMethodBreakpointError);
-			valid = false;
-		} 
-		else {
-			setErrorMessage(null);
-		}
-		setValid(valid);
-	}
-	
-	/**
-	 * Creates the controls that allow the user to specify the breakpoint's
-	 * condition
-	 * @param parent the composite in which the condition editor should be created
-	 * @throws CoreException if an exception occurs accessing the breakpoint
-	 */
-	private void createConditionEditor(Composite parent) throws CoreException {
-		IJavaLineBreakpoint breakpoint = (IJavaLineBreakpoint) getBreakpoint();
-		String label = null;
-		if (BreakpointUtils.getType(breakpoint) != null) {
-			IBindingService bindingService = (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
-			if(bindingService != null) {
-				TriggerSequence keyBinding = bindingService.getBestActiveBindingFor(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
-				if (keyBinding != null) {
-					label = MessageFormat.format(PropertyPageMessages.JavaLineBreakpointPage_12, new String[] {keyBinding.format()}); 
-				} 
-			}
-		}
-		if (label == null) {
-			label = PropertyPageMessages.JavaLineBreakpointPage_13; 
-		}
-		
-		Composite conditionComposite = SWTFactory.createGroup(parent, EMPTY_STRING, 1, 1, GridData.FILL_BOTH);
-		fEnableConditionButton = createCheckButton(conditionComposite, label);
-		fEnableConditionButton.setSelection(breakpoint.isConditionEnabled());
-		fEnableConditionButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				setConditionEnabled(fEnableConditionButton.getSelection());
-			}
-		});
-		fConditionEditor = new BreakpointConditionEditor(conditionComposite, this); 
-		fSuspendWhenLabel = createLabel(conditionComposite, PropertyPageMessages.JavaLineBreakpointPage_15); 
-		fConditionIsTrue = createRadioButton(conditionComposite, PropertyPageMessages.JavaLineBreakpointPage_16); 
-		fConditionHasChanged = createRadioButton(conditionComposite, PropertyPageMessages.JavaLineBreakpointPage_17); 
-		if (breakpoint.isConditionSuspendOnTrue()) {
-			fConditionIsTrue.setSelection(true);
-		} 
-		else {
-			fConditionHasChanged.setSelection(true);
-		}
-		setConditionEnabled(fEnableConditionButton.getSelection());
-	}
-
-	/**
-	 * Sets the enabled state of the condition editing controls.
-	 * @param enabled
-	 */
-	private void setConditionEnabled(boolean enabled) {
-		fConditionEditor.setEnabled(enabled);
-		fSuspendWhenLabel.setEnabled(enabled);
-		fConditionIsTrue.setEnabled(enabled);
-		fConditionHasChanged.setEnabled(enabled);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int)
-	 */
-	public int convertHeightInCharsToPixels(int chars) {
-		return super.convertHeightInCharsToPixels(chars);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int)
-	 */
-	public int convertWidthInCharsToPixels(int chars) {
-		return super.convertWidthInCharsToPixels(chars);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
-	 */
-	public void dispose() {
-		if (fConditionEditor != null) {
-			fConditionEditor.dispose();
-		}
-		super.dispose();
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite)
-	 */
-	public void createControl(Composite parent) {
-		super.createControl(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaDebugHelpContextIds.JAVA_LINE_BREAKPOINT_PROPERTY_PAGE);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.java
index 0627e6f..dc81935 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,10 @@ public class PropertyPageMessages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.jdt.internal.debug.ui.propertypages.PropertyPageMessages";//$NON-NLS-1$
 
 	public static String BreakpointConditionEditor_1;
+	public static String ExceptionBreakpointEditor_1;
+	public static String ExceptionBreakpointEditor_2;
+	public static String ExceptionBreakpointEditor_3;
+
 	public static String ExceptionFilterEditor_5;
 	public static String ExceptionFilterEditor_6;
 	public static String ExceptionFilterEditor_7;
@@ -32,6 +36,11 @@ public class PropertyPageMessages extends NLS {
 	public static String ExceptionFilterEditor_19;
 	public static String ExceptionFilterEditor_20;
 	public static String ExceptionFilterEditor_22;
+	
+	public static String JavaBreakpointConditionEditor_0;
+	public static String JavaBreakpointConditionEditor_1;
+	public static String JavaBreakpointConditionEditor_2;
+
 	public static String JavaBreakpointPage_0;
 	public static String JavaBreakpointPage_10;
 
@@ -39,49 +48,33 @@ public class PropertyPageMessages extends NLS {
 	public static String JavaBreakpointPage_3;
 	public static String JavaBreakpointPage_4;
 	public static String JavaBreakpointPage_5;
-	public static String JavaBreakpointPage_6;
 	public static String JavaBreakpointPage_7;
 	public static String JavaBreakpointPage_8;
 	public static String JavaBreakpointPage_9;
-	public static String JavaExceptionBreakpointPage_0;
-	public static String JavaExceptionBreakpointPage_1;
-
 	public static String JavaExceptionBreakpointPage_5;
-	public static String JavaLineBreakpointPage_0;
-	public static String JavaLineBreakpointPage_1;
 
 	public static String JavaLineBreakpointPage_18;
 
 	public static String JavaLineBreakpointPage_19;
-	public static String JavaLineBreakpointPage_2;
 
-	public static String JavaLineBreakpointPage_20;
+	public static String JavaLineBreakpointPage_2;
 	public static String JavaLineBreakpointPage_3;
 	public static String JavaLineBreakpointPage_4;
 	public static String JavaLineBreakpointPage_5;
-	public static String JavaLineBreakpointPage_6;
+	public static String JavaLineBreakpointPage_20;
 	public static String JavaLineBreakpointPage_7;
 	public static String JavaLineBreakpointPage_8;
-	public static String JavaLineBreakpointPage_9;
 	public static String JavaLineBreakpointPage_10;
 	public static String JavaLineBreakpointPage_11;
-	public static String JavaLineBreakpointPage_12;
-	public static String JavaLineBreakpointPage_13;
-	public static String JavaLineBreakpointPage_15;
-	public static String JavaLineBreakpointPage_16;
-	public static String JavaLineBreakpointPage_17;
 	public static String ThreadFilterEditor_1;
 	public static String ThreadFilterEditor_2;
 	public static String InstanceFilterEditor_0;
-	public static String JavaExceptionBreakpointPage_2;
-	public static String JavaExceptionBreakpointPage_3;
 
 	static {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, PropertyPageMessages.class);
 	}
 
-	public static String JavaExceptionBreakpointPage_4;
 	public static String VMCapabilitiesPropertyPage_0;
 	public static String VMCapabilitiesPropertyPage_1;
 	public static String VMCapabilitiesPropertyPage_10;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.properties
index 7d91e0a..b947886 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/PropertyPageMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2007 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,6 +9,9 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 BreakpointConditionEditor_1=Enter a condition
+ExceptionBreakpointEditor_1=&Caught locations
+ExceptionBreakpointEditor_2=&Uncaught locations
+ExceptionBreakpointEditor_3=Subclasses of this e&xception
 ExceptionFilterEditor_5=Re&strict to Selected Location(s):\nChecked locations are inclusive (stop in the specified location)\nUnchecked locations are exclusive (do not stop in the specified location)
 ExceptionFilterEditor_6=&Add
 ExceptionFilterEditor_7=Add a fully qualified type name or package name expression as a filter pattern for this breakpoint
@@ -25,44 +28,32 @@ ExceptionFilterEditor_18=&Select a package to add to the scope of the breakpoint
 ExceptionFilterEditor_19=Add Class to Scope
 ExceptionFilterEditor_20=Could not open class selection dialog for scope definition
 ExceptionFilterEditor_22=&Select a class to add to the scope of the breakpoint:
+JavaBreakpointConditionEditor_0=Co&nditional
+JavaBreakpointConditionEditor_1=Suspend when \'tr&ue\'
+JavaBreakpointConditionEditor_2=Suspend &when value changes
 JavaBreakpointPage_0=Hit count must be a positive integer
 JavaBreakpointPage_10=Create Breakpoint for {0}
 JavaBreakpointPage_11=Class Prepare Breakpoint
 JavaBreakpointPage_3=&Type:
-JavaBreakpointPage_4=&Hit Count:
+JavaBreakpointPage_4=&Hit count:
 JavaBreakpointPage_5=&Enabled
-JavaBreakpointPage_6=Suspend Policy:
-JavaBreakpointPage_7=Suspend Thread
-JavaBreakpointPage_8=Suspend VM
+JavaBreakpointPage_7=&Suspend thread
+JavaBreakpointPage_8=Suspend &VM
 JavaBreakpointPage_9=Unable to cancel breakpoint creation
-JavaExceptionBreakpointPage_0=&Caught Exception
-JavaExceptionBreakpointPage_1=&Uncaught Exception
-JavaLineBreakpointPage_0=Must suspend on field access or modification
-JavaLineBreakpointPage_1=Must suspend on method entry or exit
 JavaLineBreakpointPage_2=&Line Number:
 JavaLineBreakpointPage_3=&Member:
 JavaLineBreakpointPage_4=&Method:
 JavaLineBreakpointPage_5=&Field:
-JavaLineBreakpointPage_6=Suspend on:
-JavaLineBreakpointPage_7=Field &Access
-JavaLineBreakpointPage_8=Field &Modification
-JavaLineBreakpointPage_9=Suspend on:
-JavaLineBreakpointPage_10=Method E&ntry
-JavaLineBreakpointPage_11=Method E&xit
-JavaLineBreakpointPage_12=E&nable Condition ({0} for code assist)
-JavaLineBreakpointPage_13=E&nable Condition (code assist not available)
-JavaLineBreakpointPage_15=Suspend when:
-JavaLineBreakpointPage_16=condition is \'tr&ue\'
-JavaLineBreakpointPage_17=value of condition ch&anges
+JavaLineBreakpointPage_7=&Access
+JavaLineBreakpointPage_8=&Modification
+JavaLineBreakpointPage_10=Entr&y
+JavaLineBreakpointPage_11=E&xit
 JavaLineBreakpointPage_18=Line Breakpoint
 JavaLineBreakpointPage_19=Watchpoint
 JavaLineBreakpointPage_20=Method Breakpoint
 ThreadFilterEditor_1=&Restrict to Selected Thread(s):
 ThreadFilterEditor_2=Must select a thread in selected targets
 InstanceFilterEditor_0=Restricted to Selected Ob&ject(s)
-JavaExceptionBreakpointPage_2=Must suspend on caught or uncaught exception
-JavaExceptionBreakpointPage_3=Suspend on:
-JavaExceptionBreakpointPage_4=&Suspend on Subclasses of this Exception
 JavaExceptionBreakpointPage_5=Java Exception Breakpoint
 VMCapabilitiesPropertyPage_0=The selected debug element does not allow access to the underlying virtual machine.
 VMCapabilitiesPropertyPage_1=&Virtual Machine: 
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
index 20adf0b..4fd4648 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/propertypages/VMCapabilitiesPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,12 +16,12 @@ import java.util.List;
 import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdi.internal.VirtualMachineImpl;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
 import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/NewSnippetFileWizardPage.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/NewSnippetFileWizardPage.java
index d134b0f..33e9c12 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/NewSnippetFileWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/NewSnippetFileWizardPage.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -43,6 +43,7 @@ public class NewSnippetFileWizardPage extends WizardNewFileCreationPage {
 	public NewSnippetFileWizardPage(IStructuredSelection selection) {
 		super("createScrapBookPage", selection); //$NON-NLS-1$
 		setTitle(SnippetMessages.getString("NewSnippetFileWizardPage.title")); //$NON-NLS-1$
+		setDescription(SnippetMessages.getString("NewSnippetFileWizardPage.description"));		 //$NON-NLS-1$
 	}
 
 	public boolean finish() {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
index 10e4494..fb496a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SelectImportsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.jdt.internal.debug.ui.snippeteditor;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
@@ -26,7 +27,6 @@ import org.eclipse.jdt.internal.debug.ui.FilterLabelProvider;
 import org.eclipse.jdt.internal.debug.ui.FilterViewerComparator;
 import org.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
-import org.eclipse.jdt.internal.ui.util.SWTUtil;
 import org.eclipse.jdt.ui.IJavaElementSearchConstants;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -139,7 +139,6 @@ public class SelectImportsDialog extends TitleAreaDialog {
 	
 	private void createImportButtons(Composite container) {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IJavaDebugHelpContextIds.SNIPPET_IMPORTS_DIALOG);
-		Font font = container.getFont();
 		
 		// button container
 		Composite buttonContainer = new Composite(container, SWT.NONE);
@@ -152,12 +151,10 @@ public class SelectImportsDialog extends TitleAreaDialog {
 		buttonContainer.setLayout(buttonLayout);
 		
 		// Add type button
-		fAddTypeButton = new Button(buttonContainer, SWT.PUSH);
-		fAddTypeButton.setText(SnippetMessages.getString("SelectImportsDialog.Add_&Type_1")); //$NON-NLS-1$
-		fAddTypeButton.setToolTipText(SnippetMessages.getString("SelectImportsDialog.Choose_a_Type_to_Add_as_an_Import_2")); //$NON-NLS-1$
-		gd = getButtonGridData(fAddTypeButton);
-		fAddTypeButton.setLayoutData(gd);
-		fAddTypeButton.setFont(font);
+		fAddTypeButton = SWTFactory.createPushButton(buttonContainer, 
+				SnippetMessages.getString("SelectImportsDialog.Add_&Type_1"),  //$NON-NLS-1$
+				SnippetMessages.getString("SelectImportsDialog.Choose_a_Type_to_Add_as_an_Import_2"),  //$NON-NLS-1$
+				null);
 		fAddTypeButton.addSelectionListener(new SelectionListener() {
 			public void widgetSelected(SelectionEvent se) {
 				addType();
@@ -167,12 +164,10 @@ public class SelectImportsDialog extends TitleAreaDialog {
 		});
 		
 		// Add package button
-		fAddPackageButton = new Button(buttonContainer, SWT.PUSH);
-		fAddPackageButton.setText(SnippetMessages.getString("SelectImportsDialog.Add_&Package_3")); //$NON-NLS-1$
-		fAddPackageButton.setToolTipText(SnippetMessages.getString("SelectImportsDialog.Choose_a_Package_to_Add_as_an_Import_4")); //$NON-NLS-1$
-		gd = getButtonGridData(fAddPackageButton);
-		fAddPackageButton.setLayoutData(gd);
-		fAddPackageButton.setFont(font);
+		fAddPackageButton = SWTFactory.createPushButton(buttonContainer, 
+				SnippetMessages.getString("SelectImportsDialog.Add_&Package_3"),  //$NON-NLS-1$
+				SnippetMessages.getString("SelectImportsDialog.Choose_a_Package_to_Add_as_an_Import_4"),  //$NON-NLS-1$
+				null);
 		fAddPackageButton.addSelectionListener(new SelectionListener() {
 			public void widgetSelected(SelectionEvent se) {
 				addPackage();
@@ -182,12 +177,10 @@ public class SelectImportsDialog extends TitleAreaDialog {
 		});
 		
 		// Remove button
-		fRemoveImportsButton = new Button(buttonContainer, SWT.PUSH);
-		fRemoveImportsButton.setText(SnippetMessages.getString("SelectImportsDialog.&Remove_5")); //$NON-NLS-1$
-		fRemoveImportsButton.setToolTipText(SnippetMessages.getString("SelectImportsDialog.Remove_All_Selected_Imports_6")); //$NON-NLS-1$
-		gd = getButtonGridData(fRemoveImportsButton);
-		fRemoveImportsButton.setLayoutData(gd);
-		fRemoveImportsButton.setFont(font);
+		fRemoveImportsButton = SWTFactory.createPushButton(buttonContainer, 
+				SnippetMessages.getString("SelectImportsDialog.&Remove_5"),  //$NON-NLS-1$
+				SnippetMessages.getString("SelectImportsDialog.Remove_All_Selected_Imports_6"),  //$NON-NLS-1$
+				null);
 		fRemoveImportsButton.addSelectionListener(new SelectionListener() {
 			public void widgetSelected(SelectionEvent se) {
 				removeImports();
@@ -199,13 +192,6 @@ public class SelectImportsDialog extends TitleAreaDialog {
 		
 	}
 	
-	private GridData getButtonGridData(Button button) {
-		GridData gd= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
-		button.setLayoutData(gd);
-		SWTUtil.setButtonDimensionHint(button);
-		return gd;
-	}
-		
 	private void removeImports() {
 		IStructuredSelection selection = (IStructuredSelection)fImportsViewer.getSelection();		
 		fImportContentProvider.removeImports(selection.toArray());
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetMessages.properties
index 546722f..053eabd 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/snippeteditor/SnippetMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -83,7 +83,8 @@ ShowInPackageViewAction.not_found=Cannot reveal the selected element in Package
 
 NewSnippetFileCreationWizard.title=New Scrapbook Page
 
-NewSnippetFileWizardPage.title=Create Java Scrapbook Page
+NewSnippetFileWizardPage.description=Create a new Java scrapbook page
+NewSnippetFileWizardPage.title=Scrapbook Page
 NewSnippetFileWizardPage.error.AlreadyExists=A resource with the specified path already exists.
 NewSnippetFileWizardPage.error.OnlyInJavaProject=The scrapbook page can only be created in a Java project.
 NewSnippetFileWizardPage.open_error.message=Error in NewScrapbookPage
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
index f328b5e..2d483b5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/threadgroups/JavaThreadEventHandler.java
@@ -224,7 +224,7 @@ public class JavaThreadEventHandler extends ThreadEventHandler implements IPrope
 						if (event.getKind() == DebugEvent.SUSPEND) {
 							try {
 								IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame();
-								if (frame.getDeclaringTypeName().startsWith("org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain")) { //$NON-NLS-1$
+								if (frame == null || frame.getDeclaringTypeName().startsWith("org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain")) { //$NON-NLS-1$
 									return false;
 								}
 							} catch (DebugException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableColumnPresentation.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableColumnPresentation.java
index b6e9fea..ba44c41 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableColumnPresentation.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableColumnPresentation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,11 +23,16 @@ public class JavaVariableColumnPresentation extends VariableColumnPresentation {
 	 */
 	public final static String JAVA_VARIABLE_COLUMN_PRESENTATION = IJavaDebugUIConstants.PLUGIN_ID + ".VARIALBE_COLUMN_PRESENTATION";  //$NON-NLS-1$
 	/**
-	 * Default column identifiers
+	 * Instance ID column identifier
 	 */
 	public final static String COLUMN_INSTANCE_ID = JAVA_VARIABLE_COLUMN_PRESENTATION + ".COL_INSTANCE_ID"; //$NON-NLS-1$
 	
 	/**
+	 * Instance count column identifier
+	 */
+	public final static String COLUMN_INSTANCE_COUNT = JAVA_VARIABLE_COLUMN_PRESENTATION + ".COL_INSTANCE_COUNT"; //$NON-NLS-1$
+	
+	/**
 	 * Column ids
 	 */
 	private static String[] fgAllColumns = null;
@@ -38,9 +43,10 @@ public class JavaVariableColumnPresentation extends VariableColumnPresentation {
 	public String[] getAvailableColumns() {
 		if (fgAllColumns == null) {
 			String[] basic = super.getAvailableColumns();
-			fgAllColumns = new String[basic.length + 1];
+			fgAllColumns = new String[basic.length + 2];
 			System.arraycopy(basic, 0, fgAllColumns, 0, basic.length);
 			fgAllColumns[basic.length] = COLUMN_INSTANCE_ID;
+			fgAllColumns[basic.length+1] = COLUMN_INSTANCE_COUNT;
 		}
 		return fgAllColumns;
 	}
@@ -52,6 +58,9 @@ public class JavaVariableColumnPresentation extends VariableColumnPresentation {
 		if (COLUMN_INSTANCE_ID.equals(id)) {
 			return VariableMessages.JavaVariableColumnPresentation_0;
 		}
+		if (COLUMN_INSTANCE_COUNT.equals(id)) {
+			return VariableMessages.JavaVariableColumnPresentation_1;
+		}
 		return super.getHeader(id);
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
index 3120345..42cc206 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/JavaVariableLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,18 +14,28 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
 import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.model.IValue;
 import org.eclipse.debug.core.model.IVariable;
 import org.eclipse.debug.internal.ui.model.elements.VariableLabelProvider;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
 import org.eclipse.debug.ui.IDebugModelPresentation;
+import org.eclipse.jdt.debug.core.IJavaInterfaceType;
+import org.eclipse.jdt.debug.core.IJavaObject;
+import org.eclipse.jdt.debug.core.IJavaReferenceType;
+import org.eclipse.jdt.debug.core.IJavaStackFrame;
+import org.eclipse.jdt.debug.core.IJavaType;
 import org.eclipse.jdt.debug.core.IJavaValue;
+import org.eclipse.jdt.debug.core.IJavaVariable;
 import org.eclipse.jdt.debug.core.JDIDebugModel;
 import org.eclipse.jdt.internal.debug.core.model.JDIObjectValue;
+import org.eclipse.jdt.internal.debug.core.model.JDIThread;
 import org.eclipse.jdt.internal.debug.ui.DebugUIMessages;
 import org.eclipse.jdt.internal.debug.ui.IJDIPreferencesConstants;
 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
@@ -45,8 +55,19 @@ public class JavaVariableLabelProvider extends VariableLabelProvider implements
 	private Map fQualifiedNameSettings = new HashMap();
 	private boolean fQualifiedNames = false;
 	
+	/**
+	 * Whether to use a thread rule for a label update job (serialize on thread)
+	 */
+	private int fSerializeMode = SERIALIZE_NONE;
+	
+	private static final int SERIALIZE_ALL = 0; // no toString()'s in line, so serialize labels
+	private static final int SERIALIZE_NONE = 1; // all toString()'s in line, so don't serialize labels (evaluations will be serialized)
+	private static final int SERIALIZE_SOME = 2; // some - only serialize those that don't have formatters (ones with formatters will be serialized by evaluation)
+	
 	public JavaVariableLabelProvider() {
-		JDIDebugUIPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this);
+		Preferences prefs = JDIDebugUIPlugin.getDefault().getPluginPreferences();
+		prefs.addPropertyChangeListener(this);
+		determineSerializationMode(prefs.getString(IJDIPreferencesConstants.PREF_SHOW_DETAILS));
 	}
 	
 	/* (non-Javadoc)
@@ -116,6 +137,26 @@ public class JavaVariableLabelProvider extends VariableLabelProvider implements
 			}
 			return ""; //$NON-NLS-1$
 		}
+		if (JavaVariableColumnPresentation.COLUMN_INSTANCE_COUNT.equals(columnId)) {
+			if (value instanceof IJavaObject) {
+				IJavaType jType = ((IJavaObject)value).getJavaType();
+				if (jType == null && variable instanceof IJavaVariable) {
+					jType = ((IJavaVariable)variable).getJavaType();
+				}
+				if (jType instanceof IJavaReferenceType) {
+					if (!(jType instanceof IJavaInterfaceType)) {
+						long count = ((IJavaReferenceType)jType).getInstanceCount();
+						if (count == -1) {
+							return DebugUIMessages.JavaVariableLabelProvider_0;
+						}
+						StringBuffer buffer = new StringBuffer();
+						buffer.append(count);
+						return buffer.toString();
+					}
+				}
+			}
+			return ""; //$NON-NLS-1$
+		}
 		return super.getColumnText(variable, value, context, columnId);
 	}
 
@@ -135,6 +176,23 @@ public class JavaVariableLabelProvider extends VariableLabelProvider implements
 	public void propertyChange(PropertyChangeEvent event) {
 		if (event.getProperty().endsWith(IJDIPreferencesConstants.PREF_SHOW_QUALIFIED_NAMES)) {
 			fQualifiedNameSettings.clear();
+		} else if (event.getProperty().equals(IJDIPreferencesConstants.PREF_SHOW_DETAILS)) {
+			determineSerializationMode((String) event.getNewValue());
+		}
+	}
+	
+	/**
+	 * Sets the serialization mode for label jobs based on the current preference setting.
+	 * 
+	 * @param value preferance value for PREF_SHOW_DETAILS
+	 */
+	private void determineSerializationMode(String value) {
+		if (value.equals(IJDIPreferencesConstants.INLINE_ALL)) {
+			fSerializeMode = SERIALIZE_NONE;
+		} else if (value.equals(IJDIPreferencesConstants.INLINE_FORMATTERS)) {
+			fSerializeMode = SERIALIZE_SOME;
+		} else {
+			fSerializeMode = SERIALIZE_ALL;
 		}
 	}
 
@@ -152,5 +210,37 @@ public class JavaVariableLabelProvider extends VariableLabelProvider implements
 		return super.getLabel(elementPath, context, columnId);
 	}
 	
-	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getRule(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate)
+	 */
+	protected ISchedulingRule getRule(ILabelUpdate update) {
+		IJavaStackFrame frame = null;
+		switch (fSerializeMode) {
+		case SERIALIZE_NONE:
+			return null;
+		case SERIALIZE_ALL:
+			Object input = update.getViewerInput();
+			frame = (IJavaStackFrame) DebugPlugin.getAdapter(input, IJavaStackFrame.class);
+			break;
+		case SERIALIZE_SOME:
+			Object element = update.getElement();
+			if (element instanceof IJavaVariable) {
+				try {
+					IValue value = ((IJavaVariable)element).getValue();
+					if (value instanceof IJavaValue) {
+						if (!fLabelProvider.isShowLabelDetails((IJavaValue)value)) {
+							input = update.getViewerInput();
+							frame = (IJavaStackFrame) DebugPlugin.getAdapter(input, IJavaStackFrame.class);			
+						}
+					}
+				} catch (DebugException e) {
+
+				}
+			}
+		}
+		if (frame != null) {
+			return ((JDIThread)frame.getThread()).getThreadRule();
+		}
+		return null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.java
index 22921ae..1e75bdc 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,5 +28,6 @@ public class VariableMessages extends NLS {
 	}
 
 	public static String JavaVariableColumnPresentation_0;
+	public static String JavaVariableColumnPresentation_1;
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.properties
index 856ad3a..0f53e21 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2007 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,3 +10,4 @@
 ###############################################################################
 
 JavaVariableColumnPresentation_0=Instance ID
+JavaVariableColumnPresentation_1=Instance Count
diff --git a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableOptionsAction.java b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableOptionsAction.java
index af46b39..39b42f1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableOptionsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/variables/VariableOptionsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,8 @@ package org.eclipse.jdt.internal.debug.ui.variables;
 
 import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
 import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.IDebugView;
-import org.eclipse.jdt.internal.debug.ui.SWTFactory;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.ui.IViewActionDelegate;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.core.prefs
index 9baa958..645d906 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.jdt.core.prefs
@@ -1,99 +1,102 @@
-#Thu Feb 26 08:15:55 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Thu Oct 15 14:49:22 CDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.pde.prefs
index 3972d1d..91a1356 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.debug/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:38:59 CST 2007
+#Mon Dec 14 12:05:06 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=0
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=1
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
index 22a2edb..f47aaf0 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.debug/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.debug; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-ClassPath: jdi.jar,
  jdimodel.jar,
  tools.jar
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html b/eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html
index f72c835..4f92a71 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html
+++ b/eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html
@@ -8,148 +8,30 @@
    <title>Java Debug Release Notes</title>
 </head>
 <body>
-<h1>Eclipse 3.5 Java Debug Build Notes</h1>
-
-<h2>Summary of API changes in 3.5</h2>
-<h3>Configurable problem severity when a compatible JRE cannot be bound to specified execution environment </h3>
-<p><strong>Description:</strong> In release 3.4 and earlier, when a project was bound to an execution environment (for example, J2SE-1.4), and the workspace did not have a strictly compatible JRE installed (for example, only a J2SE-1.5 JRE was available), a build path problem with a warning severity was issued. Since 3.5, API has been added to allow the severity of the problem to be ignored, a warning, or an error. See the newly added constants in JavaRuntime: <code>PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE</code>, <code>VALUE_IGNORE</code>, <code>VALUE_WARNING</code>, and <code>VALUE_ERROR</code>.</p>
-<h3>OSGi Profile Properties for IExecutionEnvironment </h3>
-<p><strong>What is affected:</strong> Clients contributing an execution environment can provide an associated OSGi system profile properties file. </p>
-<p><strong>Description:</strong> In release 3.4 and earlier, clients could contribute an execution environment, but when that environment was bound to a build path for a plug-in project, default compiler compliance settings were not set appropriately. Since 3.5, clients may specify an OSGi system profile properties file with an execution environment. The properties file provides information about system packages, default source and target compiler settings, etc. When provided, tooling will be able to leverage the information to create default access rules for system packages and properly set default compiler compliance settings for projects bound to the contributed environment. See the newly added method <code>IExecutionEnvironment.getProfileProperties()</code> and the new extension point attribute <code>profileProperties</code>.</p>
-<p><strong>Action required:</strong> Clients contributing an execution environment should provide an associated OSGi system profile properties file. </p>
-<h3>API to read execution environment description files </h3>
-<p><strong>Description:</strong> An API has been added to support reading of <a href="http://wiki.eclipse.org/index.php/Execution_Environment_Descriptions">execution environment description files</a>. The class <code>ExecutionEnvironmentDescription</code> has been added to the <code>org.eclipse.jdt.launching.environments</code> package. The new class provides access to the properties in description files as well as convenience methods to generate descriptions of the system libraries assocaited with a description. </p>
-<h3>API to set/get stepping behavior with step filters </h3>
-<p><strong>Description:</strong> An API has been added to set/get the stepping behavior associated with step filters. This allows clients to programmatically set what happens when a step lands in a filtered location. The target can be configured to step through to an unfiltered location or return the location where the step originated. The following methods has been added to <code>IJavaDebugTarget</code>: <code>setStepThruFilters(boolean)</code> and <code>isStepThruFilters()</code>. </p>
-
-<h2>May 21, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268241">Bug 268241</a>: [breakpoint][refactor]  Saving file causes refactored breakpoint to be removed<br>
-
-<h2>May 21, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277187">Bug 277187</a>: [evaluation] duplicate named synthetic local variables cause expression evaluation error<br>
-
-<h2>May 11, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275486">Bug 275486</a>: NPE while debugging.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265037">Bug 265037</a>: Deadlock in the debugger<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273633">Bug 273633</a>: JDIObjectValue / IJavaClassType classcast in inspect / display<br>
-
-<h2>May 5, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273858">Bug 273858</a>: Edit and Remove buttons incorrectly enabled<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273656">Bug 273656</a>: Generated launch configuration has no name if anonymous class is instantiated in main<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274727">Bug 274727</a>: [launching] Debug Configurations dialog is slow when network is down<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=274552">Bug 274552</a>: Can end up with empty target when thread groups are on<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=273845">Bug 273845</a>: quick fix for "no compatible JREs installed in the workspace"<br>
-
-<h2>April 21, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272494">Bug 272494</a>: Debug view shows stale threads<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=272508">Bug 272508</a>: Many com.sun.jdi.ObjectCollectedException recently<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=271785">Bug 271785</a>: Migrate compilation error/uncaught exception handling to breakpoint listener extension<br>
-
-<h2>March 24, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=269273">Bug 269273</a>: updating "show in context" looks  up source agressively<br>
-
-<h2>March 17, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268241">Bug 268241</a>: [breakpoint][refactor]  Saving file causes refactored breakpoint to be removed<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268393">Bug 268393</a>: Debugger not letting me change value on null String<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268104">Bug 268104</a>: Launch config: JRE tab should show project's EE<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=268238">Bug 268238</a>: JDT doesn't know that it has stopped at a class load breakpoint<br>
-
-<h2>March 10, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258845">Bug 258845</a>: Launch configs fail with "Source attachment path '...' for IClasspathEntry must be absolute"<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258119">Bug 258119</a>: [64] no JRE detected on x86_64<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=267060">Bug 267060</a>: Add API for IJavaValue.isNull()<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260910">Bug 260910</a>: Ability to contribute actions to be run whenever a java breakpoint is hit<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265871">Bug 265871</a>: IOException from VM not suppressed for conditional breakpoint<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=77737">Bug 77737</a>: No templates in code assist in debug pseudo editors<br>
-
-<h2>February 17, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=265115">Bug 265115</a>: Make EE first in JRE container wizard page<br>
-
-<h2>February 10, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234425">Bug 234425</a>: Only use relevant compiler options for debug evaluations<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=214130">Bug 214130</a>: Provide API support for Step Thru Filters preference<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=234425">Bug 234425</a>: Only use relevant compiler options for debug evaluations<br>
-
-<h2>3.5 M5 - January 30, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256566">Bug 256566</a>: Possibly broken code in JDIModelPresentation.isObjectValue(String)<br>
-
-<h2>January 20, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260834">Bug 260834</a>: [doc] breakpoint conditions are arbitrary expression evals<br>
-
-<h2>January 13, 2009</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260402">Bug 260402</a>: Conflits during JRE's import are not solved correctly.<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=260445">Bug 260445</a>: Deadlock in JavaRuntime.initializeVMs<br>
-
-<h2>December 16, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=254994">Bug 254994</a>: Improve message regarding compatible JREs<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=256568">Bug 256568</a>: Possibly broken code in JDTDebugRefactoringUtil.createChangesForOuterTypeChange(ILaunchConfiguration, IType, String, String)<br>
-
-<h2>Milestone 4 - December 9, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=236296">Bug 236296</a>: update the classpath settings feature sets wrong project compiler compliance level<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=212605">Bug 212605</a>: [launching] Mac OS X launcher should not hide the necessary -XstartOnFirstThread<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=257466">Bug 257466</a>: Hot Code Replace Fail dlg has two buttons with _D_<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=258560">Bug 258560</a>: API to retrieve properties from ee definition files<br>
-
-<h2>November 18, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255031">Bug 255031</a>: Missing EEs prevent project to build<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=255381">Bug 255381</a>: Inconsistent Default Filtered resources<br>
-
-<h2>November 11, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=253022">Bug 253022</a>: Suppport for new OSGi/Minimum-1.2 Execution environment<br>
-
-<h2>November 4, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=252521">Bug 252521</a>: VM Disconnection exception when program terminates with thread group turned on<br>
-
-<h2>October 21, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244395">Bug 244395</a>: [refactoring] [launch config refactoring] project rename cannot undo<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249932">Bug 249932</a>: Clean + project build does not update 'strictly match JRE' problem<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=232710">Bug 232710</a>: [breakpoints] Java breakpoint markers description icon/text missing<br>
-
-<h2>October 7, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=248466">Bug 248466</a>: Cannot launch if build path contains a ".." entry<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244693">Bug 244693</a>: Default severity for missing JRE for Execution Environment should be Error<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=249490">Bug 249490</a>: JDI fails to unmarshal JDWP reply packet correctly<br>
-
-<h2>August 26, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=189486">Bug 189486</a>: Unable to retrieve system properties for 1.1.8 VM<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=245153">Bug 245153</a>: Variable references empty selection: ${java_type_name}<br>
-
-<h2>August 19, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=244285">Bug 244285</a>: An internal error occurred during: "Initializing Java Tooling".<br>
-
-<h2>3.5 M1 - August 8, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=238350">Bug 238350</a>: Starting Java application (like JBoss) in debug causes NPE. Run mode works ok<br>
-
-<h2>July 8, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=239612">Bug 239612</a>: Use Ctrl+Click instead of Ctrl+Alt for 'Step Into Selection'<br>
-
-<h2>August 12, 2008</h2>
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=217752">Bug 217752</a>: [logview] provide action to open entry stack trace in console<br>
+<h1>Eclipse 3.6 Java Debug Build Notes</h1>
+
+<h2>Summary of API changes in 3.6</h2>
+
+<h3>Target specific hot code replace listeners</h3>
+<p><strong>What is affected:</strong>
+<ul>
+  <li>Method addition: <code>public void addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)</code></li>
+  <li>Method addition: <code>public void removeHotCodeReplaceListener(IJavaHotCodeReplaceListener listener)</code> </li>
+</ul>
+<p><strong>Description: </strong>Methods have been added to <code>org.eclipse.jdt.debug.core.IJavaDebugTarget</code> to
+support target sepcific hot code replace listeners. When listeners are registered with a specific target, the listeners
+registered with <code>org.eclipse.jdt.debug.core.JDIDebugModel</code> are not notified for that target. This allows a target
+to have custom hot code replace event handling.
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
+
+<h3>Breakpoint condition editor</h3>
+<p><strong>What is affected:</strong>
+<ul>
+  <li>Class addition: <code>org.eclipse.jdt.debug.ui.breakpoints.JavaBreakpointConditionEditor</code></li>
+</ul>
+<p><strong>Description: </strong>This class provides controls for editing a Java breakpoint's conditional
+ expression. The class may be instantiated but is not intended to be sublcassed.
+<p><strong>Action required:</strong> This is a backwards compatible change. No action required. </p>
 
 <p> </p>
 </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
index 119f903..93e25be 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -188,6 +188,8 @@ import org.eclipse.jdt.internal.debug.eval.ast.instructions.Value;
 import org.eclipse.jdt.internal.debug.eval.ast.instructions.XorAssignmentOperator;
 import org.eclipse.jdt.internal.debug.eval.ast.instructions.XorOperator;
 
+import com.ibm.icu.text.MessageFormat;
+
 /**
  * The AST instruction compiler generates a sequence
  * of instructions (InstructionSequence) from a
@@ -441,12 +443,12 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 		if (expression instanceof MethodInvocation) {
 			IMethodBinding methodBinding= (IMethodBinding)((MethodInvocation)expression).getName().resolveBinding();
-			if ("void".equals(methodBinding.getReturnType().getName())) { //$NON-NLS-1$
+			if (methodBinding != null && "void".equals(methodBinding.getReturnType().getName())) { //$NON-NLS-1$
 				pop= false;
 			}
 		} else if (expression instanceof SuperMethodInvocation) {
 			IMethodBinding methodBinding= (IMethodBinding)((SuperMethodInvocation)expression).getName().resolveBinding();
-			if ("void".equals(methodBinding.getReturnType().getName())) { //$NON-NLS-1$
+			if (methodBinding != null && "void".equals(methodBinding.getReturnType().getName())) { //$NON-NLS-1$
 				pop= false;
 			}
 		} else if (expression instanceof VariableDeclarationExpression) {
@@ -593,6 +595,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 	public void endVisit(ArrayAccess node) {
 		if (!isActive() || hasErrors())
 			return;
+		ITypeBinding typeBinding = node.getIndex().resolveTypeBinding();
+		if (typeBinding != null && unBoxing(typeBinding)) {
+			// un-box the index, if required
+			storeInstruction();
+		}
 		storeInstruction();
 	}
 
@@ -1518,10 +1525,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 		ArrayType arrayType= node.getType();
 
-		if (isALocalType(arrayType.resolveBinding().getElementType())) {
+		ITypeBinding binding = resolveTypeBinding(arrayType);
+		if (binding != null && isALocalType(binding.getElementType())) {
 			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Local_type_array_instance_creation_cannot_be_used_in_an_evaluation_expression_29); 
 			setHasError(true);
-			return true;
+			return false;
 		}
 
 		push(new ArrayAllocation(arrayType.getDimensions(), node.dimensions().size(), node.getInitializer() != null, fCounter));
@@ -1537,11 +1545,12 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return false;
 		}
 
-		ITypeBinding typeBinding= node.resolveTypeBinding();
-		int dimension= typeBinding.getDimensions();
-		String signature= getTypeSignature(typeBinding.getElementType());
-
-		push(new ArrayInitializerInstruction(signature, node.expressions().size(), dimension, fCounter));
+		ITypeBinding typeBinding = resolveTypeBinding(node);
+		if (typeBinding != null) {
+			int dimension= typeBinding.getDimensions();
+			String signature= getTypeSignature(typeBinding.getElementType());
+			push(new ArrayInitializerInstruction(signature, node.expressions().size(), dimension, fCounter));
+		}
 
 		return true;
 	}
@@ -1553,11 +1562,12 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (!isActive()) {
 			return false;
 		}
-		ITypeBinding arrayTypeBinding= node.resolveBinding();
-		int dimension= arrayTypeBinding.getDimensions();
-		String signature= getTypeSignature(arrayTypeBinding.getElementType());
-
-		push(new PushArrayType(signature, dimension, fCounter));
+		ITypeBinding arrayTypeBinding= resolveTypeBinding(node);
+		if (arrayTypeBinding != null) {
+			int dimension= arrayTypeBinding.getDimensions();
+			String signature= getTypeSignature(arrayTypeBinding.getElementType());
+			push(new PushArrayType(signature, dimension, fCounter));
+		}
 
 		return false;
 	}
@@ -1571,7 +1581,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 		setHasError(true);
 		addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Assert_statement_cannot_be_used_in_an_evaluation_expression_3); 
-		return true;
+		return false;
 	}
 
 	/**
@@ -1594,6 +1604,14 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			char2 = opToken.charAt(2);
 		}
 
+		ITypeBinding rightBinding = resolveTypeBinding(rightHandSide);
+		if (rightBinding == null) {
+			return false;
+		}
+		ITypeBinding leftBinding = resolveTypeBinding(leftHandSide);
+		if (leftBinding == null) {
+			return false;
+		}
 		if (variableTypeId == Instruction.T_Object) {
 			// If the variable is an object, the value may need to be boxed for
 			// the simple assignment.
@@ -1612,8 +1630,8 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			if (char0 == '=') {
 				
 				boolean storeRequired= false;
-				if (rightHandSide.resolveTypeBinding().isPrimitive()) {
-					boxing(leftHandSide.resolveTypeBinding(), rightHandSide.resolveTypeBinding());
+				if (rightBinding.isPrimitive()) {
+					boxing(leftBinding, rightBinding);
 					storeRequired= true;
 				}
 				rightHandSide.accept(this);
@@ -1625,7 +1643,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 				boolean unrecognized = false;
 				
 				
-				boxing(leftHandSide.resolveTypeBinding(), rightHandSide.resolveTypeBinding());
+				boxing(leftBinding, rightBinding);
 				
 				switch (char0) {
 					case '=': // equal
@@ -1681,12 +1699,12 @@ public class ASTInstructionCompiler extends ASTVisitor {
 					return false;
 				}
 
-				unBoxing(leftHandSide.resolveTypeBinding());
+				unBoxing(leftBinding);
 				push(new Dup());
 				storeInstruction(); // dupe
 				storeInstruction(); // un-boxing
 			
-				boolean storeRequired= unBoxing(rightHandSide.resolveTypeBinding());
+				boolean storeRequired= unBoxing(rightBinding);
 				rightHandSide.accept(this);
 				if (storeRequired) {
 					storeInstruction(); // un-boxing
@@ -1756,7 +1774,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			}
 			
 			leftHandSide.accept(this);
-			boolean storeRequired= unBoxing(rightHandSide.resolveTypeBinding());
+			boolean storeRequired= unBoxing(rightBinding);
 			rightHandSide.accept(this);
 			if (storeRequired) {
 				storeInstruction();
@@ -1836,20 +1854,18 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 		Type type= node.getType();
 		int typeId= getTypeId(type);
-		ITypeBinding typeBinding= type.resolveBinding();
-
-		String baseTypeSignature;
-		int dimension= typeBinding.getDimensions();
-
-		if (typeBinding.isArray()) {
-			typeBinding= typeBinding.getElementType();
-		}
+		ITypeBinding typeBinding= resolveTypeBinding(type);
 		
-		baseTypeSignature= getTypeName(typeBinding);
-
-		push(new Cast(typeId, baseTypeSignature, dimension, fCounter));
-
-		node.getExpression().accept(this);
+		if (typeBinding != null) {
+			String baseTypeSignature;
+			int dimension= typeBinding.getDimensions();
+			if (typeBinding.isArray()) {
+				typeBinding= typeBinding.getElementType();
+			}
+			baseTypeSignature= getTypeName(typeBinding);
+			push(new Cast(typeId, baseTypeSignature, dimension, fCounter));
+			node.getExpression().accept(this);
+		}
 
 		return false;
 	}
@@ -1863,7 +1879,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 		setHasError(true);
 		addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Catch_clause_cannot_be_used_in_an_evaluation_expression_6); 
-		return true;
+		return false;
 	}
 
 	/**
@@ -1894,8 +1910,12 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 
 		IMethodBinding methodBinding= node.resolveConstructorBinding();
+		if (methodBinding == null) {
+			setHasError(true);
+			addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_1, new String[]{node.toString()}));
+			return false;
+		}
 		ITypeBinding typeBinding= methodBinding.getDeclaringClass();
-		ITypeBinding enclosingTypeBinding= typeBinding.getDeclaringClass();
 
 		boolean isInstanceMemberType= typeBinding.isMember() && ! Modifier.isStatic(typeBinding.getModifiers());
 
@@ -1911,13 +1931,20 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 
 		if (hasErrors()) {
-			return true;
+			return false;
 		}
 
 		int paramCount= methodBinding.getParameterTypes().length;
 
 		String enclosingTypeSignature= null;
+		ITypeBinding enclosingTypeBinding= null;
 		if (isInstanceMemberType) {
+			enclosingTypeBinding= typeBinding.getDeclaringClass();
+			if (enclosingTypeBinding == null) {
+				setHasError(true);
+				addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_2, new String[]{typeBinding.getQualifiedName()}));
+				return false;
+			}
 			enclosingTypeSignature= getTypeSignature(enclosingTypeBinding);
 			paramCount++;
 		}
@@ -1942,7 +1969,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 				if (Modifier.isStatic(((MethodDeclaration)parent).getModifiers())) {
 					setHasError(true);
 					addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Must_explicitly_qualify_the_allocation_with_an_instance_of_the_enclosing_type_33); 
-					return true;
+					return false;
 				}
 
 				push(new PushThis(getEnclosingLevel(node, enclosingTypeBinding)));
@@ -2044,9 +2071,15 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		push(new NoOp(fCounter));
 		
 		
-		ITypeBinding typeBinding= node.getExpression().resolveTypeBinding();
+		ITypeBinding typeBinding= resolveTypeBinding(node.getExpression());
+		if (typeBinding == null) {
+			return false;
+		}
 		Type paramType= node.getParameter().getType();
-        ITypeBinding paramBinding = paramType.resolveBinding();
+        ITypeBinding paramBinding = resolveTypeBinding(paramType);
+        if (paramBinding == null) {
+			return false;
+        }
 		String typeSignature= getTypeSignature(paramBinding);
 		int paramTypeId= getTypeId(paramType);
 		boolean isParamPrimitiveType= paramTypeId != Instruction.T_Object && paramTypeId != Instruction.T_String;
@@ -2310,8 +2343,21 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		Expression rightOperand= node.getRightOperand();
 		int leftTypeId;
 		int rightTypeId;
-		// == case, do not un-box, if the two operands are objects
-		boolean unbox= char0 != '=' || leftOperand.resolveTypeBinding().isPrimitive() || rightOperand.resolveTypeBinding().isPrimitive();
+		boolean unbox = false;
+		// for == and != un-box when at least operand is primitive (otherwise compare the objects)
+		ITypeBinding leftBinding = resolveTypeBinding(leftOperand);
+		if (leftBinding == null) {
+			return false;
+		}
+		ITypeBinding rightBinding = resolveTypeBinding(rightOperand);
+		if (rightBinding == null) {
+			return false;
+		}
+		if ((char0 == '=' || char0 == '!') && char1 == '=') {
+			unbox = leftBinding.isPrimitive() || rightBinding.isPrimitive();
+		} else {
+			unbox = true;
+		}
 		if (unbox) {
 			leftTypeId= getUnBoxedTypeId(leftOperand);
 			rightTypeId = getUnBoxedTypeId(rightOperand);
@@ -2476,7 +2522,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 
 		if (hasErrors()) {
-			return true;
+			return false;
 		}
 
 		iterator = extendedOperands.iterator();
@@ -2488,7 +2534,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			ConditionalJump[] conditionalJumps= new ConditionalJump[operatorNumber];
 			int[] conditionalJumpAddresses = new int[operatorNumber];
 
-			boolean storeRequired= unBoxing(leftOperand.resolveTypeBinding());
+			boolean storeRequired= unBoxing(leftBinding);
 			leftOperand.accept(this);
 			if (storeRequired) {
 				storeInstruction();
@@ -2500,7 +2546,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			push(conditionalJump);
 			storeInstruction();
 
-			storeRequired= unBoxing(rightOperand.resolveTypeBinding());
+			storeRequired= unBoxing(rightBinding);
 			rightOperand.accept(this);
 			if (storeRequired) {
 				storeInstruction();
@@ -2513,7 +2559,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 				push(conditionalJump);
 				storeInstruction();
 				Expression operand= (Expression) iterator.next();
-				storeRequired= unBoxing(operand.resolveTypeBinding());
+				ITypeBinding typeBinding = resolveTypeBinding(operand);
+				if (typeBinding == null) {
+					return false;
+				}
+				storeRequired= unBoxing(typeBinding);
 				operand.accept(this);
 				if (storeRequired) {
 					storeInstruction();
@@ -2539,14 +2589,14 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 			boolean storeRequired= false;
 			if (unbox) {
-				storeRequired= unBoxing(leftOperand.resolveTypeBinding());
+				storeRequired= unBoxing(leftBinding);
 			}
 			leftOperand.accept(this);
 			if (storeRequired) {
 				storeInstruction();
 			}
 			if (unbox) {
-				storeRequired= unBoxing(rightOperand.resolveTypeBinding());
+				storeRequired= unBoxing(rightBinding);
 			}
 			rightOperand.accept(this);
 			if (storeRequired) {
@@ -2557,7 +2607,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			for (int i= 1; i < operatorNumber; i ++) {
 				Expression operand= (Expression) iterator.next();
 				if (unbox) {
-					storeRequired= unBoxing(operand.resolveTypeBinding());
+					ITypeBinding typeBinding = resolveTypeBinding(operand);
+					if (typeBinding == null) {
+						return false;
+					}
+					storeRequired= unBoxing(typeBinding);
 				}
 				operand.accept(this);
 				if (storeRequired) {
@@ -2673,16 +2727,13 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 		
 		if (hasErrors()) {
-			return true;
+			return false;
 		}
 
 		if (containsALocalType(methodBinding)) {
 			setHasError(true);
-			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32); 
-		}
-
-		if (hasErrors()) {
-			return true;
+			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32);
+			return false;
 		}
 
 		int paramCount = methodBinding.getParameterTypes().length;
@@ -2727,7 +2778,15 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		int argCount = arguments.size();
 		ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
 		int paramCount = parameterTypes.length;
-		if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == ((Expression)arguments.get(argCount - 1)).resolveTypeBinding().getDimensions())) {
+		ITypeBinding lastArgBinding = null;
+		if (methodBinding.isVarargs()) {
+			Expression lastArg = (Expression)arguments.get(argCount - 1);
+			lastArgBinding = resolveTypeBinding(lastArg);
+			if (lastArgBinding == null) {
+				return;
+			}
+		}
+		if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == lastArgBinding.getDimensions())) {
 			// if this method is a varargs, and if the method is invoked using the varargs syntax
 			// (multiple arguments) and not an array
 			Iterator iterator= arguments.iterator();
@@ -2921,8 +2980,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (!isActive()) {
 			return false;
 		}
-		ITypeBinding typeBinding  = node.resolveBinding();
-		push(new PushType(getTypeName(typeBinding)));
+		ITypeBinding typeBinding  = resolveTypeBinding(node);
+		if (typeBinding != null) {
+			push(new PushType(getTypeName(typeBinding)));
+		}
 		return false;
 	}
 
@@ -2967,7 +3028,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 				default:
 					setHasError(true);
 					addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_unrecognized_postfix_operator____15 + opToken); 
-					break;
+					return false;
 			}
 			push(new Value(fCounter));
 			push(new Dup());
@@ -2975,12 +3036,16 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			storeInstruction(); // value
 			push(new DupX1());
 			storeInstruction(); // dup_x1
-			unBoxing(operand.resolveTypeBinding());
+			ITypeBinding typeBinding = resolveTypeBinding(operand);
+			if (typeBinding == null) {
+				return false;
+			}
+			unBoxing(typeBinding);
 			storeInstruction(); // un-boxing
 			push(new PushInt(1));
 			storeInstruction(); // push 1
 			storeInstruction(); // operator
-			boxing(operand.resolveTypeBinding(), null);
+			boxing(typeBinding, null);
 			storeInstruction(); // boxing
 			storeInstruction(); // assignment
 			push(new Pop(assignmentInstruction.getSize() + 1));
@@ -2999,7 +3064,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			default:
 				setHasError(true);
 				addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_unrecognized_postfix_operator____15 + opToken); 
-				break;
+				return false;
 		}
 
 		return true;
@@ -3030,6 +3095,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			
 			int expressionUnBoxedTypeId= getUnBoxedTypeId(operand);
 			
+			ITypeBinding typeBinding = resolveTypeBinding(operand);
+			if (typeBinding == null) {
+				return false;
+			}
 			if (char1 == '\0') {
 				switch (char0) {
 					case '+': // unary plus
@@ -3047,10 +3116,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 					default:
 						setHasError(true);
 						addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_unrecognized_prefix_operator____16 + opToken); 
-						break;
+						return false;
 				}
 	
-				unBoxing(operand.resolveTypeBinding());
+				unBoxing(typeBinding);
 				operand.accept(this);
 				storeInstruction(); // un-boxing
 				
@@ -3061,7 +3130,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 				
 				operand.accept(this);
 				
-				boxing(operand.resolveTypeBinding(), null);
+				boxing(typeBinding, null);
 				
 				switch (char1) {
 					case '+':
@@ -3073,10 +3142,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 					default:
 						setHasError(true);
 						addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_unrecognized_prefix_operator____16 + opToken); 
-						break;
+						return false;
 				}
 				
-				unBoxing(operand.resolveTypeBinding());
+				unBoxing(typeBinding);
 				push(new Dup());
 				storeInstruction(); // dupe
 				storeInstruction(); // un-boxing
@@ -3133,6 +3202,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (unrecognized) {
 			setHasError(true);
 			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_unrecognized_prefix_operator____16 + opToken); 
+			return false;
 		}
 
 		return true;
@@ -3145,8 +3215,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (!isActive()) {
 			return false;
 		}
-		ITypeBinding typeBinding  = node.resolveBinding();
-		push(new PushPrimitiveType(getTypeName(typeBinding)));
+		ITypeBinding typeBinding  = resolveTypeBinding(node);
+		if (typeBinding != null) {
+			push(new PushPrimitiveType(getTypeName(typeBinding)));
+		}
 		return false;
 	}
 
@@ -3162,14 +3234,20 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return true;
 		}
 
-		IBinding binding = node.resolveBinding();
+		IBinding binding = resolveBinding(node);
+		if (binding == null) {
+			return false;
+		}
 		switch (binding.getKind()) {
 			case IBinding.TYPE:
 				node.getName().accept(this);
 				break;
 			case IBinding.VARIABLE:
 				SimpleName fieldName= node.getName();
-				IVariableBinding fieldBinding= (IVariableBinding) fieldName.resolveBinding();
+				IVariableBinding fieldBinding= (IVariableBinding) resolveBinding(fieldName);
+				if (fieldBinding == null) {
+					return false;
+				}
 				ITypeBinding declaringTypeBinding= fieldBinding.getDeclaringClass();
 				String fieldId = fieldName.getIdentifier();
 
@@ -3197,8 +3275,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (!isActive()) {
 			return false;
 		}
-		ITypeBinding typeBinding  = node.resolveBinding();
-		push(new PushType(getTypeName(typeBinding)));
+		ITypeBinding typeBinding  = resolveTypeBinding(node);
+		if (typeBinding != null) {
+			push(new PushType(getTypeName(typeBinding)));
+		}
 		return false;
 	}
 
@@ -3225,14 +3305,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return true;
 		}
 
-		IBinding binding = node.resolveBinding();
-
-		String variableId = node.getIdentifier();
+		IBinding binding = resolveBinding(node);
 		if (binding == null) {
-			setHasError(true);
-			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_binding_null_for__17 + variableId); 
 			return true;
 		}
+		String variableId = node.getIdentifier();
 
 		switch (binding.getKind()) {
 			case IBinding.TYPE:
@@ -3273,9 +3350,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return false;
 		}
 
-		ITypeBinding typeBinding  = node.resolveBinding();
-		push(new PushType(getTypeName(typeBinding)));
-
+		ITypeBinding typeBinding  = resolveTypeBinding(node);
+		if (typeBinding != null) {
+			push(new PushType(getTypeName(typeBinding)));
+		}
 		return false;
 	}
 
@@ -3294,15 +3372,17 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		if (!isActive()) {
 			return false;
 		}
-		ITypeBinding typeBinding= node.getType().resolveBinding();
-		int typeDimension= typeBinding.getDimensions();
-		if (typeDimension != 0) {
-			typeBinding= typeBinding.getElementType();
-		}
-		Expression initializer= node.getInitializer();
-		push(new LocalVariableCreation(node.getName().getIdentifier(), getTypeSignature(typeBinding), typeDimension, typeBinding.isPrimitive(), initializer != null, fCounter));
-		if (initializer != null) {
-			initializer.accept(this);
+		ITypeBinding typeBinding= resolveTypeBinding(node.getType());
+		if (typeBinding != null) {
+			int typeDimension= typeBinding.getDimensions();
+			if (typeDimension != 0) {
+				typeBinding= typeBinding.getElementType();
+			}
+			Expression initializer= node.getInitializer();
+			push(new LocalVariableCreation(node.getName().getIdentifier(), getTypeSignature(typeBinding), typeDimension, typeBinding.isPrimitive(), initializer != null, fCounter));
+			if (initializer != null) {
+				initializer.accept(this);
+			}
 		}
 		return false;
 	}
@@ -3341,7 +3421,10 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 
 		SimpleName fieldName= node.getName();
-		IVariableBinding fieldBinding= (IVariableBinding) fieldName.resolveBinding();
+		IVariableBinding fieldBinding= (IVariableBinding) resolveBinding(fieldName);
+		if (fieldBinding == null) {
+			return false;
+		}
 		ITypeBinding declaringTypeBinding= fieldBinding.getDeclaringClass();
 		String fieldId = fieldName.getIdentifier();
 
@@ -3352,8 +3435,16 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			int superLevel= 1;
 			int enclosingLevel= 0;
 			if (qualifier != null) {
-				superLevel= getSuperLevel(qualifier.resolveTypeBinding(), declaringTypeBinding);
-				enclosingLevel= getEnclosingLevel(node, (ITypeBinding)qualifier.resolveBinding());
+				ITypeBinding typeBinding = resolveTypeBinding(qualifier);
+				if (typeBinding == null) {
+					return false;
+				}
+				superLevel= getSuperLevel(typeBinding, declaringTypeBinding);
+				ITypeBinding binding = (ITypeBinding)resolveBinding(qualifier);
+				if (binding == null) {
+					return false;
+				}
+				enclosingLevel= getEnclosingLevel(node, binding);
 			}
 			push(new PushFieldVariable(fieldId, superLevel, fCounter));
 			push(new PushThis(enclosingLevel));
@@ -3373,15 +3464,15 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return false;
 		}
 
-		IMethodBinding methodBinding = (IMethodBinding) node.getName().resolveBinding();
+		IMethodBinding methodBinding = (IMethodBinding) resolveBinding(node.getName());
+		if (methodBinding == null) {
+			return false;
+		}
 
 		if (containsALocalType(methodBinding)) {
 			setHasError(true);
-			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32); 
-		}
-
-		if (hasErrors()) {
-			return true;
+			addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Method_which_contains_a_local_type_as_parameter_cannot_be_used_in_an_evaluation_expression_32);
+			return false;
 		}
 
 		ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
@@ -3396,7 +3487,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			push(new SendMessage(selector, signature, paramCount, getTypeSignature(methodBinding.getDeclaringClass()), fCounter));
 			int enclosingLevel= 0;
 			if (qualifier != null) {
-				enclosingLevel= getEnclosingLevel(node, (ITypeBinding)qualifier.resolveBinding());
+				ITypeBinding typeBinding = (ITypeBinding)resolveBinding(qualifier);
+				if (typeBinding == null) {
+					return false;
+				}
+				enclosingLevel= getEnclosingLevel(node, typeBinding);
 			}
 			push(new PushThis(enclosingLevel));
 			storeInstruction();
@@ -3404,7 +3499,14 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 		List arguments = node.arguments();
 		int argCount = arguments.size();
-		if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == ((Expression)arguments.get(argCount - 1)).resolveTypeBinding().getDimensions())) {
+		ITypeBinding lastArgBinding = null;
+		if (methodBinding.isVarargs()) {
+			lastArgBinding = resolveTypeBinding((Expression)arguments.get(argCount - 1));
+			if (lastArgBinding == null) {
+				return false;
+			}
+		}
+		if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == lastArgBinding.getDimensions())) {
 			// if this method is a varargs, and if the method is invoked using the varargs syntax
 			// (multiple arguments) and not an array
 			Iterator iterator= arguments.iterator();
@@ -3597,7 +3699,11 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		Name qualifier= node.getQualifier();
 		int enclosingLevel= 0;
 		if (qualifier != null) {
-			enclosingLevel= getEnclosingLevel(node, (ITypeBinding)qualifier.resolveBinding());
+			ITypeBinding binding = (ITypeBinding)resolveBinding(qualifier);
+			if (binding == null) {
+				return false;
+			}
+			enclosingLevel= getEnclosingLevel(node, binding);
 		}
 		push(new PushThis(enclosingLevel));
 
@@ -3624,7 +3730,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 		setHasError(true);
 		addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Try_statement_cannot_be_used_in_an_evaluation_expression_23); 
-		return true;
+		return false;
 	}
 
 	/**
@@ -3706,16 +3812,19 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		ASTNode parent= node.getParent();
 		switch (parent.getNodeType()) {
 			case ASTNode.VARIABLE_DECLARATION_EXPRESSION:
-				varTypeBinding= ((VariableDeclarationExpression)parent).getType().resolveBinding();
+				varTypeBinding= resolveTypeBinding(((VariableDeclarationExpression)parent).getType());
 				break;
 			case ASTNode.VARIABLE_DECLARATION_STATEMENT:
-				varTypeBinding= ((VariableDeclarationStatement)parent).getType().resolveBinding();
+				varTypeBinding= resolveTypeBinding(((VariableDeclarationStatement)parent).getType());
 				break;
 			default:
 				setHasError(true);
 				addErrorMessage(EvaluationEngineMessages.ASTInstructionCompiler_Error_in_type_declaration_statement); 
 				return false;
 		}
+		if (varTypeBinding == null) {
+			return false;
+		}
 		int typeDimension= varTypeBinding.getDimensions();
 		ITypeBinding elementBinding = varTypeBinding;
 		if (typeDimension != 0) {
@@ -3779,6 +3888,9 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 	private int getTypeId(Expression expression) {
 		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		if (typeBinding == null) {
+			return Instruction.T_undefined;
+		}
 		String typeName = typeBinding.getQualifiedName();
 		if (typeBinding.isPrimitive()) {
 			return getPrimitiveTypeId(typeName);
@@ -3791,6 +3903,9 @@ public class ASTInstructionCompiler extends ASTVisitor {
 
 	private int getUnBoxedTypeId(Expression expression) {
 		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		if (typeBinding == null) {
+			return Instruction.T_undefined;
+		}
 		String typeName = typeBinding.getQualifiedName();
 		if (typeBinding.isPrimitive()) {
 			return getPrimitiveTypeId(typeName);
@@ -3824,7 +3939,7 @@ public class ASTInstructionCompiler extends ASTVisitor {
 			return getPrimitiveTypeId(((PrimitiveType)type).getPrimitiveTypeCode().toString());
 		} else if (type.isSimpleType()) {
 			SimpleType simpleType = (SimpleType) type;
-			if ("java.lang.String".equals(simpleType.getName())){ //$NON-NLS-1$
+			if ("java.lang.String".equals(simpleType.getName().getFullyQualifiedName())){ //$NON-NLS-1$
 				return Instruction.T_String;
 			} 
 			return Instruction.T_Object;
@@ -3893,4 +4008,68 @@ public class ASTInstructionCompiler extends ASTVisitor {
 		}
 		return Instruction.T_undefined;
 	}
+	
+	/**
+	 * Resolves and returns the type binding from the given expression reporting an error
+	 * if the binding is <code>null</code>.
+	 *  
+	 * @param expression expression to resolve type binding for
+	 * @return type binding or <code>null</code> if not available
+	 */
+	private ITypeBinding resolveTypeBinding(Expression expression) {
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		if (typeBinding == null) {
+			setHasError(true);
+			addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_3, new String[]{expression.toString()}));
+		}
+		return typeBinding;
+	}
+	
+	/**
+	 * Resolves and returns the type binding for the give type reporting an error
+	 * if the binding is <code>null</code>.
+	 * 
+	 * @param type type to resolve binding for
+	 * @return type binding or <code>null</code> if not available
+	 */
+	private ITypeBinding resolveTypeBinding(Type type) {
+		ITypeBinding typeBinding = type.resolveBinding();
+		if (typeBinding == null) {
+			setHasError(true);
+			addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_3, new String[]{type.toString()}));
+		}
+		return typeBinding;
+	}
+	
+	/**
+	 * Resolves and returns the binding for the given name reporting an error
+	 * if the binding is <code>null</code>.
+	 * 
+	 * @param name name to resolve binding for
+	 * @return binding or <code>null</code> if not available
+	 */
+	private IBinding resolveBinding(Name name) {
+		IBinding binding = name.resolveBinding();
+		if (binding == null) {
+			setHasError(true);
+			addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_5, new String[]{name.getFullyQualifiedName()}));
+		}
+		return binding;
+	}	
+	
+	/**
+	 * Resolves and returns the type binding for the given name reporting an error
+	 * if the binding is <code>null</code>.
+	 * 
+	 * @param name name to resolve type binding for
+	 * @return type binding or <code>null</code> if not available
+	 */
+	private ITypeBinding resolveTypeBinding(Name name) {
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		if (typeBinding == null) {
+			setHasError(true);
+			addErrorMessage(MessageFormat.format(EvaluationEngineMessages.ASTInstructionCompiler_3, new String[]{name.getFullyQualifiedName()}));
+		}
+		return typeBinding;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/AbstractRuntimeContext.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/AbstractRuntimeContext.java
index dcea6c1..e73d87b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/AbstractRuntimeContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/AbstractRuntimeContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,20 +10,22 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.eval.ast.engine;
 
-import com.ibm.icu.text.MessageFormat;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jdi.internal.TypeImpl;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.debug.core.IJavaClassObject;
 import org.eclipse.jdt.debug.core.IJavaClassType;
+import org.eclipse.jdt.debug.core.IJavaFieldVariable;
 import org.eclipse.jdt.debug.core.IJavaObject;
+import org.eclipse.jdt.debug.core.IJavaReferenceType;
 import org.eclipse.jdt.debug.core.IJavaType;
 import org.eclipse.jdt.debug.core.IJavaValue;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.eval.ast.instructions.InstructionsEvaluationMessages;
 
+import com.ibm.icu.text.MessageFormat;
 import com.sun.jdi.InvocationException;
 
 /**
@@ -101,11 +103,30 @@ public abstract class AbstractRuntimeContext implements IRuntimeContext {
      * @throws CoreException if loading fails
      */
     protected IJavaClassObject classForName(String qualifiedName, IJavaObject loader) throws CoreException {
+    	String tname = qualifiedName;
+    	if (tname.startsWith("[")) { //$NON-NLS-1$
+    		tname = TypeImpl.signatureToName(qualifiedName);
+    	}
+		IJavaType[] types = getVM().getJavaTypes(tname);
+		if (types != null && types.length > 0) {
+			// find the one with the right class loader
+			for (int i = 0; i < types.length; i++) {
+				IJavaReferenceType type = (IJavaReferenceType) types[i];
+				IJavaObject cloader = type.getClassLoaderObject();
+				if (isCompatibleLoader(loader, cloader)) {
+					return type.getClassObject();
+				}
+			}
+		}
     	IJavaValue loaderArg = loader;
     	if (loader == null) {
     		loaderArg = getVM().nullValue();
     	}
-        IJavaValue[] args = new IJavaValue[] {getVM().newValue(qualifiedName), getVM().newValue(true), loaderArg};
+    	//prevent the name string from being collected during the class lookup call
+    	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=301412
+    	final IJavaValue name = getVM().newValue(qualifiedName);
+    	((IJavaObject)name).disableCollection();
+        IJavaValue[] args = new IJavaValue[] {name, getVM().newValue(true), loaderArg};
         try {
             return (IJavaClassObject) getJavaLangClass().sendMessage(FOR_NAME, FOR_NAME_SIGNATURE, args, getThread());
         } catch (CoreException e) {
@@ -117,6 +138,9 @@ public abstract class AbstractRuntimeContext implements IRuntimeContext {
             }
             throw e;
         }
+        finally {
+        	((IJavaObject)name).enableCollection();
+        }
     }
 
     /* (non-Javadoc)
@@ -132,4 +156,59 @@ public abstract class AbstractRuntimeContext implements IRuntimeContext {
 	public IJavaProject getProject() {
 		return fProject;
 	}
+	
+	/**
+	 * Returns whether the class loaded by the <code>otherLoader</code> is compatible
+	 * with the receiver's class loader. To be compatible, the other's loader must
+	 * be the same or a parent of the receiver's loader.
+	 * 
+	 * @param recLoader class loader of receiver
+	 * @param otherLoader class loader of other class
+	 * @return whether compatible
+	 */
+	private boolean isCompatibleLoader(IJavaObject recLoader, IJavaObject otherLoader) throws CoreException {
+		if (recLoader == null || otherLoader == null) {
+			// if either class is a bootstrap loader, then they are compatible since all loaders
+			// stem from the bootstrap loader
+			return true;
+		} 
+		if (recLoader.equals(otherLoader)) {
+			return true;
+		}
+		// check parent loaders
+		IJavaObject parent = getParentLoader(recLoader);
+		while (parent != null) {
+			if (parent.equals(otherLoader)) {
+				return true;
+			}
+			parent = getParentLoader(parent);
+		}
+		return false;
+	}
+	
+	/**
+	 * Returns the parent class loader of the given class loader object or <code>null</code>
+	 * if none.
+	 * 
+	 * @param loader class loader object
+	 * @return parent class loader or <code>null</code>
+	 * @throws CoreException
+	 */
+	private IJavaObject getParentLoader(IJavaObject loader) throws CoreException {
+		// to avoid message send, first check for 'parent' field
+		IJavaFieldVariable field = loader.getField("parent", false); //$NON-NLS-1$
+		if (field != null) {
+			IJavaValue value = (IJavaValue)field.getValue();
+			if (value.isNull()) {
+				return null;
+			}
+			return (IJavaObject)value;
+		}
+		IJavaValue result = loader.sendMessage("getParent", "()Ljava/lang/ClassLoader;", null, getThread(), false); //$NON-NLS-1$ //$NON-NLS-2$
+		if (result.isNull()) {
+			return null;
+		}
+		return (IJavaObject)result;
+	}
 }
+
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.java
index 50ee1d8..ccfba0f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,6 @@ public class EvaluationEngineMessages extends NLS {
 
 	public static String ASTInstructionCompiler_unrecognized_postfix_operator____15;
 	public static String ASTInstructionCompiler_unrecognized_prefix_operator____16;
-	public static String ASTInstructionCompiler_binding_null_for__17;
 
 	public static String ASTInstructionCompiler_super_constructor_invocation_cannot_be_used_in_an_evaluation_expression_19;
 	public static String ASTInstructionCompiler_Try_statement_cannot_be_used_in_an_evaluation_expression_23;
@@ -48,8 +47,12 @@ public class EvaluationEngineMessages extends NLS {
 	public static String ASTEvaluationEngine_AST_evaluation_engine_cannot_evaluate_expression;
 	public static String ASTEvaluationEngine_An_unknown_error_occurred_during_evaluation;
 	public static String ASTEvaluationEngine_Cannot_perform_nested_evaluations;
+	public static String ASTInstructionCompiler_3;
 	public static String ASTInstructionCompiler_36;
 	public static String ASTInstructionCompiler_0;
+	public static String ASTInstructionCompiler_1;
+	public static String ASTInstructionCompiler_2;
+	public static String ASTInstructionCompiler_5;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.properties
index e186512..648e82f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationEngineMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ ASTInstructionCompiler_Unrecognized_infix_operator____13=Unrecognized infix oper
 
 ASTInstructionCompiler_unrecognized_postfix_operator____15=unrecognized postfix operator :
 ASTInstructionCompiler_unrecognized_prefix_operator____16=unrecognized prefix operator :
-ASTInstructionCompiler_binding_null_for__17=binding == null for
 
 ASTInstructionCompiler_super_constructor_invocation_cannot_be_used_in_an_evaluation_expression_19=super constructor invocation cannot be used in an evaluation expression
 ASTInstructionCompiler_Try_statement_cannot_be_used_in_an_evaluation_expression_23=Try statement cannot be used in an evaluation expression
@@ -43,8 +42,12 @@ ASTEvaluationEngine_AST_evaluation_engine_cannot_evaluate_expression=The AST eva
 ASTEvaluationEngine_An_unknown_error_occurred_during_evaluation=An unknown error occurred during evaluation
 ASTEvaluationEngine_Cannot_perform_nested_evaluations=Cannot perform nested evaluations.
 
+ASTInstructionCompiler_3=Unable to resolve type binding for: {0}
 ASTInstructionCompiler_36=Local type field access cannot be used in an evaluation expression
 ASTInstructionCompiler_0=Enum declaration cannot be used in an evaluation expression
+ASTInstructionCompiler_1=Unable to resolve type binding of constructor: {0}
+ASTInstructionCompiler_2=Unable to resolve type binding of declaring type of: {0}
+ASTInstructionCompiler_5=Unable to resolve binding for: {0}
 ASTEvaluationEngine_0=Unable to evaluate expressions in the context of an interface
 ASTEvaluationEngine_1=Unable to retrieve type for java.lang.Object
 ArrayRuntimeContext_0=Unable to retrieve type for java.lang.Object
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
index 2972bc5..2a23193 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java
@@ -11,20 +11,15 @@
 package org.eclipse.jdt.internal.debug.eval.ast.engine;
 
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.DebugException;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -33,10 +28,6 @@ import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.core.JavaDebugUtils;
 import org.eclipse.jdt.internal.debug.core.model.JDIReferenceType;
 
-import com.sun.jdi.AbsentInformationException;
-import com.sun.jdi.Location;
-import com.sun.jdi.ReferenceType;
-
 /**
  * Creates the source code necessary to evaluate a code snippet.
  * The (simplified) structure of the source is as follows:
@@ -141,14 +132,14 @@ public class EvaluationSourceGenerator {
 		return fCodeSnippet;
 	}
 
-	private void createEvaluationSourceFromSource(String source, String typeName, int position, boolean createInAStaticMethod, IJavaProject project) throws DebugException {
+	private void createEvaluationSourceFromSource(String source, IType type, boolean createInAStaticMethod, IJavaProject project) throws DebugException {
 		ASTParser parser = ASTParser.newParser(AST.JLS3);
 		parser.setSource(source.toCharArray());
 		Map options=getCompilerOptions(project);
 		String sourceLevel = project.getOption(JavaCore.COMPILER_SOURCE, true);
 		parser.setCompilerOptions(options);
 		CompilationUnit unit= (CompilationUnit)parser.createAST(null);
-		SourceBasedSourceGenerator visitor= new SourceBasedSourceGenerator(unit, typeName, position, createInAStaticMethod, fLocalVariableTypeNames, fLocalVariableNames, fCodeSnippet, sourceLevel);
+		SourceBasedSourceGenerator visitor= new SourceBasedSourceGenerator(type, createInAStaticMethod, fLocalVariableTypeNames, fLocalVariableNames, fCodeSnippet, sourceLevel);
 		unit.accept(visitor);
 		
 		if (visitor.hasError()) {
@@ -207,10 +198,17 @@ public class EvaluationSourceGenerator {
 	
 	public String getSource(IJavaReferenceType type, IJavaProject javaProject, boolean isStatic) throws CoreException {
 		if (fSource == null) {
-			String baseSource= getTypeSourceFromProject(type, javaProject);
-			int lineNumber= getLineNumber((JDIReferenceType)type);
-			if (baseSource != null && lineNumber != -1) {
-				createEvaluationSourceFromSource(baseSource, type.getName(), lineNumber, isStatic, javaProject);
+			IType iType = JavaDebugUtils.resolveType(type);
+			if (iType != null && !iType.isInterface()) {
+				String baseSource = null;
+				if (iType.isBinary()) {
+					baseSource = iType.getClassFile().getSource();
+				} else {
+					baseSource = iType.getCompilationUnit().getSource();
+				}
+				if (baseSource != null) {
+					createEvaluationSourceFromSource(baseSource, iType, isStatic, javaProject);
+				}
 			}
 			if (fSource == null) {
 				BinaryBasedSourceGenerator mapper= getInstanceSourceMapper((JDIReferenceType) type, isStatic, javaProject);
@@ -220,18 +218,6 @@ public class EvaluationSourceGenerator {
 		return fSource;
 	}
 
-	private int getLineNumber(JDIReferenceType type) {
-		ReferenceType referenceType= (ReferenceType) type.getUnderlyingType();
-		try {
-			List allLineLocations = referenceType.allLineLocations();
-			if (!allLineLocations.isEmpty()) {
-				return ((Location)allLineLocations.get(0)).lineNumber();
-			}
-		} catch (AbsentInformationException e) {
-		}
-		return -1;
-	}
-
 	protected void setCompilationUnitName(String name) {
 		fCompilationUnitName= name;
 	}
@@ -240,36 +226,4 @@ public class EvaluationSourceGenerator {
 		fSource= source;
 	}
 
-	private String getTypeSourceFromProject(IJavaReferenceType type, IJavaProject javaProject) throws CoreException {
-		String[] sourcePaths = type.getSourcePaths(null);
-		IJavaElement element = null;
-		if (sourcePaths != null && sourcePaths.length > 0) {
-			element = javaProject.findElement(new Path(sourcePaths[0]));
-		} else {
-			// must guess at source name when debug attribute not present
-			element = JavaDebugUtils.findElement(type.getName(), javaProject);
-		}	
-		return resolveSource(element);
-	}
-	
-	/**
-	 * Returns source for the given class file or compilation unit
-	 * or <code>null</code> if none.
-	 *  
-	 * @param element Java element or <code>null</code> 
-	 */
-	private String resolveSource(IJavaElement element) throws DebugException {
-		String source= null;
-		try {
-			if (element instanceof IClassFile) {
-				source = ((IClassFile)element).getSource();
-			} else if (element instanceof ICompilationUnit) {
-				source = ((ICompilationUnit)element).getSource();
-			}
-		} catch (JavaModelException e) {
-			throw new DebugException(e.getStatus());
-		}
-		return source;			
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
index dd86d71..a8d3b83 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,10 @@ import java.util.List;
 import java.util.Set;
 
 import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
@@ -107,6 +110,7 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.WildcardType;
+import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 
 
 public class SourceBasedSourceGenerator extends ASTVisitor  {
@@ -127,11 +131,7 @@ public class SourceBasedSourceGenerator extends ASTVisitor  {
 	
 	private String fError;
 	
-	private CompilationUnit fUnit;
-	
-	private String fTypeName;
-	
-	private int fPosition;
+	private IType fType;
 	
 	private StringBuffer fSource;
 	
@@ -157,11 +157,9 @@ public class SourceBasedSourceGenerator extends ASTVisitor  {
 	 * which contains the code snippet is an no-static method, even if <code>position</code>
 	 * is in a static method.
 	 */
-	public SourceBasedSourceGenerator(CompilationUnit unit, String typeName, int position, boolean createInAStaticMethod, String[] localTypesNames, String[] localVariables, String codeSnippet, String sourceLevel) {
+	public SourceBasedSourceGenerator(IType type, boolean createInAStaticMethod, String[] localTypesNames, String[] localVariables, String codeSnippet, String sourceLevel) {
 		fRightTypeFound= false;
-		fUnit= unit;
-		fTypeName= typeName;
-		fPosition= position;
+		fType= type;
 		fLocalVariableTypeNames= localTypesNames;
 		fLocalVariableNames= localVariables;
 		fCodeSnippet= codeSnippet;
@@ -183,10 +181,6 @@ public class SourceBasedSourceGenerator extends ASTVisitor  {
 		return fSource.toString();
 	}
 	
-	private CompilationUnit getCompilationUnit() {
-		return fUnit;
-	}
-	
 	public String getCompilationUnitName() {
 		return fCompilationUnitName;
 	}
@@ -201,15 +195,6 @@ public class SourceBasedSourceGenerator extends ASTVisitor  {
 		return fRunMethodLength;
 	}
 	
-	private int getPosition() {
-		return fPosition;
-	}
-	
-	private int getCorrespondingLineNumber(int charOffset) {
-        int lineNumber = getCompilationUnit().getLineNumber(charOffset);
-        return lineNumber < 1 ? 1 : lineNumber;
-	}
-	
 	private boolean rightTypeFound() {
 		return  fRightTypeFound;
 	}
@@ -289,71 +274,11 @@ public class SourceBasedSourceGenerator extends ASTVisitor  {
 	 * false otherwise
 	 */
 	private boolean isRightType(ASTNode node) {
-		int position= getPosition();
-		int startLineNumber= getCorrespondingLineNumber(node.getStartPosition());
-		int endLineNumber= getCorrespondingLineNumber(node.getStartPosition() + node.getLength() - 1);
-		if (startLineNumber <= position && position <= endLineNumber) {
-			// check the typeName
-			String typeName= fTypeName;
-			while (node != null) {
-				if (node instanceof AbstractTypeDeclaration) {
-					AbstractTypeDeclaration abstractTypeDeclaration= (AbstractTypeDeclaration) node;
-					String name= abstractTypeDeclaration.getName().getIdentifier();
-					if (abstractTypeDeclaration.isLocalTypeDeclaration()) {
-						if (! typeName.endsWith('$' + name)) {
-							return false;
-						}
-						typeName= typeName.substring(0, typeName.length() - name.length() - 1);
-						int index= typeName.lastIndexOf('$');
-						if (index < 0) {
-							return false;
-						}
-						for (int i= typeName.length() - 1; i > index; i--) {
-							if (!Character.isDigit(typeName.charAt(i))) {
-								return false;
-							}
-						}
-						typeName= typeName.substring(0, index);
-						ASTNode parent= node.getParent();
-						while (!(parent instanceof CompilationUnit)) {
-							node= parent;
-							parent= node.getParent();
-						}
-					} else {
-						if (abstractTypeDeclaration.isPackageMemberTypeDeclaration()) {
-							PackageDeclaration packageDeclaration= ((CompilationUnit) node.getParent()).getPackage();
-							if (packageDeclaration == null) {
-								return typeName.equals(name);
-							}
-							return typeName.equals(getQualifiedIdentifier(packageDeclaration.getName()) + '.' + name);
-						}
-						if (!typeName.endsWith('$' + name)) {
-							return false;
-						}
-						typeName= typeName.substring(0, typeName.length() - name.length() - 1);
-						node= node.getParent();
-					}
-				} else if (node instanceof ClassInstanceCreation) {
-					int index= typeName.lastIndexOf('$');
-					if (index < 0) {
-						return false;
-					}
-					for (int i= typeName.length() - 1; i > index; i--) {
-						if (!Character.isDigit(typeName.charAt(i))) {
-							return false;
-						}
-					}
-					typeName= typeName.substring(0, index);
-					ASTNode parent= node.getParent();
-					while (!(parent instanceof CompilationUnit)) {
-						node= parent;
-						parent= node.getParent();
-					}
-				}
-				else if(node instanceof AnonymousClassDeclaration) {
-					node = node.getParent();
-				}
-			}
+		SourceRange range = new SourceRange(node.getStartPosition(), node.getLength());
+		try {
+			return fType.getSourceRange().equals(range);
+		} catch (JavaModelException e) {
+			JDIDebugPlugin.log(e.getStatus());
 		}
 		return false;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/ArrayAccess.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/ArrayAccess.java
index 7858c5a..de0b2c7 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/ArrayAccess.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/ArrayAccess.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,14 +11,15 @@
 package org.eclipse.jdt.internal.debug.eval.ast.instructions;
 
 
-import com.ibm.icu.text.MessageFormat;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.debug.core.IJavaArray;
 import org.eclipse.jdt.debug.core.IJavaPrimitiveValue;
+import org.eclipse.jdt.debug.core.IJavaValue;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
+
+import com.ibm.icu.text.MessageFormat;
  
 /**
  * Resolves an array access - the top of the stack is
@@ -33,7 +34,7 @@ public class ArrayAccess extends ArrayInstruction {
 	
 	public void execute() throws CoreException {
 		int index = ((IJavaPrimitiveValue)popValue()).getIntValue();
-		IJavaArray array = (IJavaArray)popValue();
+		IJavaArray array = popArray();
 		if (index >= array.getLength() || index < 0) {
 			throw new CoreException(new Status(IStatus.ERROR, JDIDebugPlugin.getUniqueIdentifier(), IStatus.OK, MessageFormat.format(InstructionsEvaluationMessages.ArrayAccess_illegal_index, new Object[] {new Integer(index)}), null)); 
 		}
@@ -43,5 +44,25 @@ public class ArrayAccess extends ArrayInstruction {
 	public String toString() {
 		return InstructionsEvaluationMessages.ArrayAccess_array_access_1; 
 	}
+	
+	/**
+	 * Pops an array object off the top of the stack. Throws an exception if not an array
+	 * object or <code>null</code>.
+	 * 
+	 * @return array object on top of the stack
+	 * @throws CoreException if not available
+	 */
+	protected IJavaArray popArray() throws CoreException {
+		IJavaValue value = popValue();
+		if (value instanceof IJavaArray) {
+			return (IJavaArray)value;
+		} else if (value.isNull()) {
+			// null pointer
+			throw new CoreException(new Status(IStatus.ERROR, JDIDebugPlugin.getUniqueIdentifier(), IStatus.OK, InstructionsEvaluationMessages.ArrayAccess_0, null));
+		} else {
+			// internal error
+			throw new CoreException(new Status(IStatus.ERROR, JDIDebugPlugin.getUniqueIdentifier(), IStatus.OK, "Internal error: attempt to access non-array object", null)); //$NON-NLS-1$
+		}
+	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
index 5bc2587..e1e3c9c 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved.   This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.   This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -16,6 +16,8 @@ public class InstructionsEvaluationMessages extends NLS {
 
 	public static String AndAssignmentOperator_operator_1;
 	public static String AndOperator_____operator_1;
+	public static String ArrayAccess_0;
+
 	public static String ArrayAccess_array_access_1;
 	public static String ArrayAccess_illegal_index;
 	public static String ArrayAllocation_array_allocation_1;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.properties
index 409d51e..bf19172 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/InstructionsEvaluationMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 AndAssignmentOperator_operator_1='&=\' operator
 AndOperator_____operator_1='&\' operator
+ArrayAccess_0=Null pointer exception: attempt to access null array object
 ArrayAccess_array_access_1=array access
 ArrayAccess_illegal_index=Attempt to access illegal array index: {0}
 ArrayAllocation_array_allocation_1=array allocation
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/PushArrayLength.java b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/PushArrayLength.java
index a921924..4d8820f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/PushArrayLength.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/instructions/PushArrayLength.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,15 +17,14 @@ import org.eclipse.jdt.debug.core.IJavaArray;
 /**
  * Pops an array object off the stack, and pushes its length.
  */
-public class PushArrayLength extends CompoundInstruction {
+public class PushArrayLength extends ArrayAccess {
 	
 	public PushArrayLength(int start) {
 		super(start);
 	}
 	
 	public void execute() throws CoreException {
-		IJavaArray receiver= (IJavaArray)popValue();
-		
+		IJavaArray receiver= popArray();
 		int length= receiver.getLength();
 		pushNewValue(length);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java b/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
index 4c15198..c5146b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/MirrorImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -258,7 +258,7 @@ public class MirrorImpl implements Mirror {
 			case JdwpReplyPacket.VM_DEAD:
 				throw new VMDisconnectedException();
 			default:
-				throw new InternalException(JDIMessages.MirrorImpl_Got_error_code_in_reply___1 + error); 
+				throw new InternalException(JDIMessages.MirrorImpl_Got_error_code_in_reply___1 + error, error); 
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java b/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
index 2a36905..ee87d83 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/VirtualMachineImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -883,7 +883,7 @@ public class VirtualMachineImpl extends MirrorImpl implements VirtualMachine, or
 			return;
 
 		/*
-		 * fGotIDSizes must first be assigned true to prevent an invinite loop
+		 * fGotIDSizes must first be assigned true to prevent an infinite loop
 		 * because getIDSizes() calls requestVM which calls packetSendManager.
 		 */
 		fGotIDSizes = true;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaDebugTarget.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaDebugTarget.java
index 7b4a1ec..299685c 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaDebugTarget.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaDebugTarget.java
@@ -450,4 +450,56 @@ public interface IJavaDebugTarget extends IDebugTarget, IStepFilters {
 	 */
 	public String getVersion() throws DebugException;	
 	
+	/**
+	 * Refreshes the state of the Java debug model elements (client) with the current
+	 * state of the debug target.
+	 * <p>
+	 * For example, a {@link IJavaThread} may currently have a suspended state, but was
+	 * somehow resumed on the target. Calling this method will causes all threads to update
+	 * their state based on the current state of the target. Elements will fire debug events
+	 * associated with any state changes. For example, a thread would fire a resume event
+	 * if it discovered it was in a running state when it thought it was suspended.
+	 * </p>
+	 * @throws DebugException if an exception occurs
+	 * @since 3.6
+	 */
+	public void refreshState() throws DebugException;
+	
+	/**
+	 * Sends a JDWP command to the back end and returns the JDWP reply packet as bytes.
+	 * This method creates an appropriate command header and packet id, before sending
+	 * to the back end.
+	 * 
+	 * @param commandSet command set identifier as defined by JDWP
+	 * @param commandId command identifier as defined by JDWP
+	 * @param data any bytes required for the command that follow the command header
+	 * 	or <code>null</code> for commands that have no data
+	 * @return raw reply packet as bytes defined by JDWP
+	 * @exception DebugException if an error occurs sending the packet or receiving the reply
+	 * @since 3.6
+	 */
+	public byte[] sendCommand(byte commandSet, byte commandId, byte[] data) throws DebugException;	
+	
+	/**
+	 * Adds the given listener to this target for hot code replace notifications. Has
+	 * no effect if an identical listener is already registered.
+	 * <p>
+	 * When a hot code replace listener is added to a specific target, general hot code
+	 * replace notifications via {@link JDIDebugModel} are not reported for that target.
+	 * This allows a target to override general/default hot code replace listeners/handlers.
+	 * </p>
+	 * @param listener hot code replace listener
+	 * @since 3.6
+	 */
+	public void addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener);
+	
+	/**
+	 * Removes the given listener from this target. Has no effect if an identical
+	 * listener is not already registered.
+	 * 
+	 * @param listener hot code replace listener
+	 * @since 3.6
+	 */
+	public void removeHotCodeReplaceListener(IJavaHotCodeReplaceListener listener);
+	
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaReferenceType.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaReferenceType.java
index c072723..efca630 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaReferenceType.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaReferenceType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -123,6 +123,7 @@ public interface IJavaReferenceType extends IJavaType {
      * the specified stratum, or <code>null</code> if the source name debug attribute is
      * not present. 
      * 
+     * @param stratum stratum identifier or <code>null</code> to use this type's default stratum
      * @return unqualified source file names or <code>null</code>
      * @throws DebugException if an exception occurs retrieving the source name
      * @since 3.2
@@ -134,6 +135,7 @@ public interface IJavaReferenceType extends IJavaType {
      * the specified stratum, or <code>null</code> if the source name debug attribute is
      * not present. 
      * 
+     * @param stratum stratum identifier or <code>null</code> to use this type's default stratum
      * @return qualified source file names or <code>null</code>
      * @throws DebugException if an exception occurs retrieving the source name
      * @since 3.2
@@ -149,5 +151,15 @@ public interface IJavaReferenceType extends IJavaType {
      * @since 3.3
      */
     public IJavaObject[] getInstances(long max) throws DebugException;
+    
+    /**
+     * Returns the number of instances of this type currently allocated in the target
+     * virtual machine, or -1 if instance counts are not supported by the target.
+     * 
+     * @return number of instances of this type, or -1 if unsupported
+     * @throws DebugException on failure
+     * @since 3.6
+     */
+    public long getInstanceCount() throws DebugException;
 	
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaThread.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaThread.java
index 8336d94..048386f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaThread.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/IJavaThread.java
@@ -271,5 +271,14 @@ public interface IJavaThread extends IThread, IFilteredStep {
 	 * @since 3.3
 	 */
 	public int getFrameCount() throws DebugException;
+	
+	/**
+	 * Returns the object reference associated with this thread.
+	 * 
+	 * @return thread object reference 
+	 * @throws DebugException if unable to retrieve an object reference
+	 * @since 3.6
+	 */
+	public IJavaObject getThreadObject() throws DebugException;
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
index 73fb66c..a8b617f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/debug/core/JDIDebugModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -180,9 +180,15 @@ public class JDIDebugModel {
 	/**
 	 * Registers the given listener for hot code replace notifications. Has no
 	 * effect if an identical listener is already registered.
-	 * 
+	 * <p>
+	 * Note that since 3.6, if an {@link IJavaDebugTarget} has hot code replace listeners
+	 * registered with it directly, listeners registered with this class are not notified
+	 * of hot code replace events for that target. This allows a target to have custom
+	 * hot code replace notification behavior. 
+	 * </p>
 	 * @param listener hot code replace listener
 	 * @see IJavaHotCodeReplaceListener
+	 * @see IJavaDebugTarget#addHotCodeReplaceListener(IJavaHotCodeReplaceListener)
 	 * @since 2.0
 	 */
 	public static void addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener) {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
index 5f7228f..94cbcd5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/EventDispatcher.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
index d8ca247..fde45a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,6 +29,13 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.debug.core.IJavaReferenceType;
 import org.eclipse.jdt.debug.core.IJavaStackFrame;
 import org.eclipse.jdt.debug.core.IJavaThread;
@@ -192,7 +199,7 @@ public class JavaDebugUtils {
      * @param javaElement java element containing the type
      * @return type
      */
-    private static IType resolveType(String qualifiedName, IJavaElement javaElement) {
+    private static IType resolveType(final String qualifiedName, IJavaElement javaElement) {
     	IType type = null;
         String[] typeNames = getNestedTypeNames(qualifiedName);
         if (javaElement instanceof IClassFile) {
@@ -205,10 +212,49 @@ public class JavaDebugUtils {
         if (type != null) {
             for (int i = 1; i < typeNames.length; i++) {
                 String innerTypeName= typeNames[i];
-                try {
-                    Integer.parseInt(innerTypeName);
-                    return type;
-                } catch (NumberFormatException e) {
+                
+                class ResultException extends RuntimeException {
+					private static final long serialVersionUID= 1L;
+					private final IType fResult;
+                	public ResultException(IType result) {
+                		fResult= result;
+                	}
+                }
+                if (innerTypeName.length() > 0) {
+                	try {
+                		Integer.parseInt(innerTypeName.substring(0, 1)); // throws NFE if not an integer
+                		
+                		// perform expensive lookup for anonymous types:
+                		ASTParser parser = ASTParser.newParser(AST.JLS3);
+                		parser.setResolveBindings(true);
+                		parser.setSource(type.getTypeRoot());
+                		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
+                		cu.accept(new ASTVisitor(false) {
+                			public boolean visit(AnonymousClassDeclaration node) {
+                				ITypeBinding binding = node.resolveBinding();
+                				if (binding == null)
+                					return false;
+                				if (qualifiedName.equals(binding.getBinaryName()))
+                					throw new ResultException((IType) binding.getJavaElement());
+                				return true;
+                			}
+                			public boolean visit(TypeDeclaration node) {
+                				ITypeBinding binding = node.resolveBinding();
+                				if (binding == null)
+                					return false;
+                				if (qualifiedName.equals(binding.getBinaryName()))
+                					throw new ResultException((IType) binding.getJavaElement());
+                				return true;
+                			}
+                		});
+                		return type; // return enclosing type if exact type not found
+                	} catch (NumberFormatException e) {
+	                	// normal nested type, continue
+	                } catch (IllegalStateException e) {
+	                	return type; // binary class without source
+	                } catch (ResultException e) {
+	                	return e.fResult;
+	                }
                 }
                 type = type.getType(innerTypeName);
             }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
index 77ddf89..5c16e46 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/BreakpointListenerManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,7 +163,7 @@ public class BreakpointListenerManager {
 		public int installingBreakpoint(IJavaDebugTarget target, IJavaBreakpoint breakpoint, IJavaType type) {
 			IJavaBreakpointListener delegate = getDelegate();
 			if (delegate != null) {
-				delegate.installingBreakpoint(target, breakpoint, type);
+				return delegate.installingBreakpoint(target, breakpoint, type);
 			}
 			return IJavaBreakpointListener.DONT_CARE;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.java
index c235156..9dee846 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,8 @@ public class JDIDebugBreakpointMessages extends NLS {
 
 	public static String JavaExceptionBreakpoint_Unable_to_create_breakpoint_request___VM_disconnected__1;
 
+	public static String JavaMethodBreakpoint_0;
+
 	public static String JavaMethodBreakpoint_Unable_to_create_breakpoint_request___VM_disconnected__1;
 
 	public static String JavaTargetPatternBreakpoint_Unable_to_add_breakpoint___VM_disconnected__1;
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.properties
index 40c8ec1..2771291 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JDIDebugBreakpointMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ JavaWatchpoint_Unable_to_create_breakpoint_request___VM_disconnected__1=Unable t
 
 JavaExceptionBreakpoint_Unable_to_create_breakpoint_request___VM_disconnected__1=Unable to create breakpoint request - VM disconnected.
 
+JavaMethodBreakpoint_0=Unable to restore type name pattern on method breakpoint
 JavaMethodBreakpoint_Unable_to_create_breakpoint_request___VM_disconnected__1=Unable to create breakpoint request - VM disconnected.
 
 JavaTargetPatternBreakpoint_Unable_to_add_breakpoint___VM_disconnected__1=Unable to add breakpoint - VM disconnected.
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
index a98eec2..539514f 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IBreakpointImportParticipant;
 import org.eclipse.jdt.core.ICompilationUnit;
@@ -143,12 +144,18 @@ public class JavaBreakpointImportParticipant implements IBreakpointImportPartici
 				default : {
 					if (node instanceof AbstractTypeDeclaration) {
 						AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) node;
-						if (typeDeclaration.isPackageMemberTypeDeclaration()) {
-							buffer.insert(0, typeDeclaration.getName().getIdentifier());
+						ITypeBinding binding = typeDeclaration.resolveBinding();
+						if(binding != null) {
+							return binding.getBinaryName();
 						}
 						else {
-							buffer.insert(0, typeDeclaration.getName().getFullyQualifiedName());
-							buffer.insert(0, '$');
+							if (typeDeclaration.isPackageMemberTypeDeclaration()) {
+								buffer.insert(0, typeDeclaration.getName().getIdentifier());
+							}
+							else {
+								buffer.insert(0, typeDeclaration.getName().getFullyQualifiedName());
+								buffer.insert(0, '$');
+							}
 						}
 					}
 				}
@@ -257,7 +264,8 @@ public class JavaBreakpointImportParticipant implements IBreakpointImportPartici
 		 */
 		public boolean visit(MethodDeclaration node) {
 			SimpleName name = node.getName();
-			if(!fTypename.equals(fTypeNameStack.peek())) {
+			String typename = (String) fTypeNameStack.peek();
+			if(!fTypename.equals(typename) && !fTypename.startsWith(typename)) {
 				return false;
 			}
 			if(name != null && name.getFullyQualifiedName().equals(fName)) {
@@ -278,7 +286,8 @@ public class JavaBreakpointImportParticipant implements IBreakpointImportPartici
 					}
 				}
 			}
-			return false;
+			//visit children in the event we have a class load breakpoint on a local type
+			return fBreakpoint instanceof JavaClassPrepareBreakpoint;
 		}
 		
 		/**
@@ -483,9 +492,18 @@ public class JavaBreakpointImportParticipant implements IBreakpointImportPartici
 				int newline = locator.getLineLocation();
 				if(locator.getLocationType() == ValidBreakpointLocationLocator.LOCATION_LINE) {
 					if(currentline != newline) {
+						bp.getMarker().setAttribute(JavaBreakpoint.TYPE_NAME, locator.getFullyQualifiedTypeName());
 						bp.getMarker().setAttribute(IMarker.LINE_NUMBER, newline);
+						int length = bp.getCharEnd() - bp.getCharStart();
+						int pos = unit.getPosition(newline, 1);
+						bp.getMarker().setAttribute(IMarker.CHAR_START, pos);
+						bp.getMarker().setAttribute(IMarker.CHAR_END, pos+length);
 					}
 				}
+				else {
+					//the line breakpoint will not be a line breakpoint anymore get rid of it
+					throw new CoreException(Status.CANCEL_STATUS);
+				}
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaClassPrepareBreakpoint.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaClassPrepareBreakpoint.java
index 57c31ad..9b0fcf4 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaClassPrepareBreakpoint.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaClassPrepareBreakpoint.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ import com.sun.jdi.request.EventRequest;
  */
 public class JavaClassPrepareBreakpoint extends JavaBreakpoint implements IJavaClassPrepareBreakpoint {
 	
-	protected static final String JAVA_CLASS_PREPARE_BREAKPOINT= "org.eclipse.jdt.debug.javaClassPrepareBreakpointMarker"; //$NON-NLS-1$
+	public static final String JAVA_CLASS_PREPARE_BREAKPOINT= "org.eclipse.jdt.debug.javaClassPrepareBreakpointMarker"; //$NON-NLS-1$
 	
 	/**
 	 * Class prepare breakpoint attribute storing the type of member this
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
index c5e0165..2076c7d 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaExceptionBreakpoint.java
@@ -47,7 +47,7 @@ import com.sun.jdi.request.ExceptionRequest;
 
 public class JavaExceptionBreakpoint extends JavaBreakpoint implements IJavaExceptionBreakpoint {
 
-	private static final String JAVA_EXCEPTION_BREAKPOINT= "org.eclipse.jdt.debug.javaExceptionBreakpointMarker"; //$NON-NLS-1$
+	public static final String JAVA_EXCEPTION_BREAKPOINT= "org.eclipse.jdt.debug.javaExceptionBreakpointMarker"; //$NON-NLS-1$
 	
 	/**
 	 * Exception breakpoint attribute storing the suspend on caught value
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
index f348ffb..44af462 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaLineBreakpoint.java
@@ -92,7 +92,7 @@ public class JavaLineBreakpoint extends JavaBreakpoint implements IJavaLineBreak
 	 */
 	protected static final String SOURCE_NAME= "org.eclipse.jdt.debug.core.sourceName";	 //$NON-NLS-1$
 
-	protected static final String JAVA_LINE_BREAKPOINT = "org.eclipse.jdt.debug.javaLineBreakpointMarker"; //$NON-NLS-1$
+	public static final String JAVA_LINE_BREAKPOINT = "org.eclipse.jdt.debug.javaLineBreakpointMarker"; //$NON-NLS-1$
 	
 	/**
 	 * Maps suspended threads to the suspend event that suspended them
@@ -204,20 +204,22 @@ public class JavaLineBreakpoint extends JavaBreakpoint implements IJavaLineBreak
 		removeCachedThreads(fCompiledExpressions, target);
 
 		// clean up cached projects for stack frames
-		Set frames= fProjectsByFrame.keySet();
-		List framesToRemove= new ArrayList();
-		Iterator iter= frames.iterator();
-		JDIStackFrame frame;
-		while (iter.hasNext()) {
-			frame= (JDIStackFrame)iter.next();
-			if (frame.getDebugTarget() == target) {
-				framesToRemove.add(frame);
+		synchronized (fProjectsByFrame) {
+			Set frames= fProjectsByFrame.keySet();
+			List framesToRemove= new ArrayList();
+			Iterator iter= frames.iterator();
+			JDIStackFrame frame;
+			while (iter.hasNext()) {
+				frame= (JDIStackFrame)iter.next();
+				if (frame.getDebugTarget() == target) {
+					framesToRemove.add(frame);
+				}
 			}
+			iter= framesToRemove.iterator();
+			while (iter.hasNext()) {
+				fProjectsByFrame.remove(iter.next());
+			}					
 		}
-		iter= framesToRemove.iterator();
-		while (iter.hasNext()) {
-			fProjectsByFrame.remove(iter.next());
-		}		
 		
 	}
 	
@@ -395,14 +397,16 @@ public class JavaLineBreakpoint extends JavaBreakpoint implements IJavaLineBreak
 	}
 		
 	protected IJavaProject getJavaProject(IJavaStackFrame stackFrame) {
-	    IJavaProject project= (IJavaProject) fProjectsByFrame.get(stackFrame);
-	    if (project == null) {
-	        project = computeJavaProject(stackFrame);
-	        if (project != null) {
-	            fProjectsByFrame.put(stackFrame, project);
-	        }
-	    }
-	    return project;
+		synchronized (fProjectsByFrame) {
+		    IJavaProject project= (IJavaProject) fProjectsByFrame.get(stackFrame);
+		    if (project == null) {
+		        project = computeJavaProject(stackFrame);
+		        if (project != null) {
+		            fProjectsByFrame.put(stackFrame, project);
+		        }
+		    }
+		    return project;			
+		}
 	}
 	
 	private IJavaProject computeJavaProject(IJavaStackFrame stackFrame) {
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
index b0ea082..df54c2d 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaMethodBreakpoint.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,14 +14,18 @@ package org.eclipse.jdt.internal.debug.core.breakpoints;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspaceRunnable;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.debug.core.model.IDebugTarget;
 import org.eclipse.jdt.debug.core.IJavaMethodBreakpoint;
+import org.eclipse.jdt.debug.core.JDIDebugModel;
 import org.eclipse.jdt.internal.debug.core.JDIDebugPlugin;
 import org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget;
 import org.eclipse.jdt.internal.debug.core.model.JDIThread;
@@ -46,7 +50,7 @@ import com.sun.jdi.request.MethodExitRequest;
 
 public class JavaMethodBreakpoint extends JavaLineBreakpoint implements IJavaMethodBreakpoint {
 	
-	protected static final String JAVA_METHOD_BREAKPOINT = "org.eclipse.jdt.debug.javaMethodBreakpointMarker"; //$NON-NLS-1$
+	public static final String JAVA_METHOD_BREAKPOINT = "org.eclipse.jdt.debug.javaMethodBreakpointMarker"; //$NON-NLS-1$
 	
 	/**
 	 * Breakpoint attribute storing the name of the method
@@ -554,7 +558,11 @@ public class JavaMethodBreakpoint extends JavaLineBreakpoint implements IJavaMet
 		fMethodSignature = marker.getAttribute(METHOD_SIGNATURE, null);
 		String typePattern= marker.getAttribute(TYPE_NAME, ""); //$NON-NLS-1$
 		if (typePattern != null) {
-			fPattern = Pattern.compile(convertToRegularExpression(typePattern));
+			try {
+				fPattern = Pattern.compile(convertToRegularExpression(typePattern));
+			} catch (PatternSyntaxException e) {
+				throw new CoreException(new Status(IStatus.ERROR, JDIDebugModel.getPluginIdentifier(), JDIDebugBreakpointMessages.JavaMethodBreakpoint_0, e));
+			}
 		}
 	}	
 	
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
index bc042a1..65347ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaWatchpoint.java
@@ -44,7 +44,7 @@ import com.sun.jdi.request.WatchpointRequest;
 
 public class JavaWatchpoint extends JavaLineBreakpoint implements IJavaWatchpoint {
 	
-	private static final String JAVA_WATCHPOINT= "org.eclipse.jdt.debug.javaWatchpointMarker"; //$NON-NLS-1$
+	public static final String JAVA_WATCHPOINT= "org.eclipse.jdt.debug.javaWatchpointMarker"; //$NON-NLS-1$
 	/**
 	 * Watchpoint attribute storing the access value (value <code>"org.eclipse.jdt.debug.core.access"</code>).
 	 * This attribute is stored as a <code>boolean</code>, indicating whether a
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
index 9d4b874..6598894 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,6 +50,7 @@ import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.ForStatement;
 import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.IfStatement;
 import org.eclipse.jdt.core.dom.ImportDeclaration;
@@ -191,9 +192,35 @@ public class ValidBreakpointLocationLocator extends ASTVisitor {
 	
 	/**
 	 * Compute the name of the type which contains this node.
-	 * Result will be the name of the type or the inner type which contains this node, but not of the local or anonymous type.
+	 * <br><br>
+	 * Delegates to the old method of computing the type name if bindings are not available.
+	 * @see #computeTypeName0(ASTNode)
+	 * @since 3.6
 	 */
 	private String computeTypeName(ASTNode node) {
+		AbstractTypeDeclaration type = null;
+		while (!(node instanceof CompilationUnit)) {
+			if (node instanceof AbstractTypeDeclaration) {
+				type = (AbstractTypeDeclaration) node;
+				break;
+			}
+			node = node.getParent();
+		}
+		if(type != null) {
+			ITypeBinding binding = type.resolveBinding();
+			if(binding != null) {
+				return binding.getBinaryName();
+			}
+		}
+		return computeTypeName0(node);
+	}
+
+	/**
+	 * Fall back to compute the type name if bindings are not resolved
+	 * @param node
+	 * @return the computed type name
+	 */
+	String computeTypeName0(ASTNode node) {
 		String typeName = null;
 		while (!(node instanceof CompilationUnit)) {
 			if (node instanceof AbstractTypeDeclaration) {
@@ -219,7 +246,7 @@ public class ValidBreakpointLocationLocator extends ASTVisitor {
 		}
 		return packageIdentifier + typeName;
 	}
-
+	
 	/**
 	 * Return <code>true</code> if this node children may contain a valid location
 	 * for the breakpoint.
@@ -1111,17 +1138,29 @@ public class ValidBreakpointLocationLocator extends ASTVisitor {
 	 */
 	public boolean visit(VariableDeclarationFragment node) {
 		Expression initializer = node.getInitializer();
-		if (visit(node, false) && initializer != null) {
+		if (visit(node, false)) {
 			int startLine = lineNumber(node.getName().getStartPosition());
-            
-			if (fLineNumber == startLine) {
-				fLineLocation= startLine;
-				fLocationFound= true;
-				fLocationType= LOCATION_LINE;
-				fTypeName= computeTypeName(node);
-				return false;
+			if(initializer != null) {
+				if (fLineNumber == startLine) {
+					fLineLocation = startLine;
+					fLocationFound = true;
+					fLocationType = LOCATION_LINE;
+					fTypeName = computeTypeName(node);
+					return false;
+				}
+				initializer.accept(this);
+			}
+			else {
+				//the variable has no initializer
+				int offset = node.getName().getStartPosition();
+				// check if the breakpoint is to be set on the line which contains the name of the field
+				if (lineNumber(offset) == fLineNumber) {
+					fMemberOffset = offset;
+					fLocationType = LOCATION_FIELD;
+					fLocationFound = true;
+					return false;
+				}
 			}
-			initializer.accept(this);
 		}
 		return false;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
index 0f98f8e..16c550a 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/hcr/JavaHotCodeReplaceManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -195,8 +195,10 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 		DebugPlugin.getDefault().removeDebugEventListener(this);
 		getWorkspace().removeResourceChangeListener(this);
 		fHotCodeReplaceListeners = new ListenerList();
-		fHotSwapTargets= null;
-		fNoHotSwapTargets= null;
+		synchronized (this) {
+			fHotSwapTargets.clear();
+			fNoHotSwapTargets.clear();
+		}
 	}
 	/**
 	 * Returns the workspace.
@@ -219,9 +221,11 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 		if (!projects.isEmpty()) {
 			updateProjectBuildTime(projects);
 		}
-		if (fHotSwapTargets.isEmpty() && fNoHotSwapTargets.isEmpty()) {
-			// If there are no targets to notify, only update the build times.
-			return;
+		synchronized (this) {
+			if (fHotSwapTargets.isEmpty() && fNoHotSwapTargets.isEmpty()) {
+				// If there are no targets to notify, only update the build times.
+				return;
+			}
 		}
 		ChangedClassFilesVisitor visitor = getChangedClassFiles(event);
 		if (visitor != null) {
@@ -383,7 +387,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * Returns the currently registered debug targets that support
 	 * hot code replace.
 	 */
-	protected List getHotSwapTargets() {
+	protected synchronized List getHotSwapTargets() {
 		return (List) fHotSwapTargets.clone();
 	}
 	
@@ -391,7 +395,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * Returns the currently registered debug targets that do
 	 * not support hot code replace.
 	 */
-	protected List getNoHotSwapTargets() {
+	protected synchronized List getNoHotSwapTargets() {
 		return (List) fNoHotSwapTargets.clone();
 	}
 	
@@ -645,10 +649,29 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	}
 	
 	/**
+	 * Return the listeners to notify for the given target. Target specific
+	 * listeners take precedence over generic listeners registered with the
+	 * debug model plug-in.
+	 * 
+	 * @param target Java debug target
+	 * @return hot code replace listeners
+	 */
+	private Object[] getHotCodeReplaceListeners(IJavaDebugTarget target) {
+		Object[] listeners = null;
+		if (target instanceof JDIDebugTarget) {
+			listeners = ((JDIDebugTarget)target).getHotCodeReplaceListeners();
+		}
+		if (listeners == null || listeners.length == 0) {
+			listeners= fHotCodeReplaceListeners.getListeners();
+		}
+		return listeners;
+	}
+	
+	/**
 	 * Notifies listeners that a hot code replace attempt succeeded
 	 */
 	private void fireHCRSucceeded(IJavaDebugTarget target) {
-		Object[] listeners= fHotCodeReplaceListeners.getListeners();
+		Object[] listeners= getHotCodeReplaceListeners(target);
 		for (int i=0; i<listeners.length; i++) {
 			((IJavaHotCodeReplaceListener)listeners[i]).hotCodeReplaceSucceeded(target);
 		}		
@@ -658,7 +681,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * Notifies listeners that a hot code replace attempt failed with the given exception
 	 */
 	private void fireHCRFailed(JDIDebugTarget target, DebugException exception) {
-		Object[] listeners= fHotCodeReplaceListeners.getListeners();
+		Object[] listeners= getHotCodeReplaceListeners(target);
 		for (int i=0; i<listeners.length; i++) {
 			((IJavaHotCodeReplaceListener)listeners[i]).hotCodeReplaceFailed(target, exception);
 		}
@@ -668,7 +691,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * Notifies listeners that obsolete methods remain on the stack
 	 */
 	private void fireObsoleteMethods(JDIDebugTarget target) {
-		Object[] listeners= fHotCodeReplaceListeners.getListeners();
+		Object[] listeners= getHotCodeReplaceListeners(target);
 		for (int i=0; i<listeners.length; i++) {
 			((IJavaHotCodeReplaceListener)listeners[i]).obsoleteMethods(target);
 		}
@@ -1192,8 +1215,10 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 				}				
 			}
 		}
-		if (!fHotSwapTargets.isEmpty() || !fNoHotSwapTargets.isEmpty()) {
-			getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_BUILD);
+		synchronized (this) {
+			if (!fHotSwapTargets.isEmpty() || !fNoHotSwapTargets.isEmpty()) {
+				getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_BUILD);
+			}			
 		}
 	}
 	
@@ -1253,7 +1278,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * 
 	 * @param target a target that supports hot swap
 	 */
-	protected void addHotSwapTarget(JDIDebugTarget target) {
+	protected synchronized void addHotSwapTarget(JDIDebugTarget target) {
 		if (!fHotSwapTargets.contains(target)) {
 			fHotSwapTargets.add(target);
 		}
@@ -1265,7 +1290,7 @@ public class JavaHotCodeReplaceManager implements IResourceChangeListener, ILaun
 	 * 
 	 * @param target a target that does not support hot swap
 	 */
-	protected void addNonHotSwapTarget(JDIDebugTarget target) {
+	protected synchronized void addNonHotSwapTarget(JDIDebugTarget target) {
 		if (!fNoHotSwapTargets.contains(target)) {
 			fNoHotSwapTargets.add(target);
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugModelMessages.properties b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugModelMessages.properties
index 49a5cd6..84f8758 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugModelMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugModelMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -59,7 +59,7 @@ JDILocalVariable_exception_retrieving_local_variable_type_name={0} occurred retr
 JDILocalVariable_exception_retrieving_local_variable_type_signature={0} occurred retrieving local variable type signature.
 JDILocalVariable_exception_while_retrieving_type_of_local_variable={0} occurred while retrieving type of local variable.
 
-JDIModificationVariable_0=The value''s format is incompatable with type {0}
+JDIModificationVariable_0=The value''s format is incompatible with type {0}
 JDIModificationVariable_Unable_to_generate_value___VM_disconnected__1=Unable to generate value - VM disconnected.
 
 JDIObjectValue_exception_retrieving_field={0} occurred retrieving field.
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
index ce02d57..ed6b944 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIDebugTarget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,10 @@ import java.util.Set;
 
 import org.eclipse.core.resources.IMarkerDelta;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
@@ -36,9 +38,14 @@ import org.eclipse.debug.core.IDebugEventSetListener;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchListener;
 import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.core.model.IDebugElement;
 import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.debug.core.model.IDisconnect;
 import org.eclipse.debug.core.model.IMemoryBlock;
+import org.eclipse.debug.core.model.IMemoryBlockRetrieval;
 import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.debug.core.model.ISuspendResume;
+import org.eclipse.debug.core.model.ITerminate;
 import org.eclipse.debug.core.model.IThread;
 import org.eclipse.jdi.TimeoutException;
 import org.eclipse.jdi.internal.VirtualMachineImpl;
@@ -46,6 +53,7 @@ import org.eclipse.jdi.internal.jdwp.JdwpReplyPacket;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
+import org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener;
 import org.eclipse.jdt.debug.core.IJavaThread;
 import org.eclipse.jdt.debug.core.IJavaThreadGroup;
 import org.eclipse.jdt.debug.core.IJavaType;
@@ -61,6 +69,7 @@ import org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint;
 import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint;
 
 import com.ibm.icu.text.MessageFormat;
+import com.sun.jdi.InternalException;
 import com.sun.jdi.ObjectCollectedException;
 import com.sun.jdi.ReferenceType;
 import com.sun.jdi.ThreadGroupReference;
@@ -238,7 +247,12 @@ public class JDIDebugTarget extends JDIDebugElement implements IJavaDebugTarget,
 	 */
 	private boolean fIsPerformingHotCodeReplace= false;
 	
-	 
+	/**
+	 * Target specific HCR listeners
+	 * @since 3.6
+	 */
+	private ListenerList fHCRListeners = new ListenerList();
+	
 	/**
 	 * Creates a new JDI debug target for the given virtual machine.
 	 * 
@@ -553,14 +567,14 @@ public class JDIDebugTarget extends JDIDebugElement implements IJavaDebugTarget,
 	 */
 	public boolean canSuspend() {
 		if (!isSuspended() && isAvailable()) {
-			// only allow suspend if no threads are currently suspended
+			// allow suspend when one or more threads are currently running
 			IThread[] threads= getThreads();
 			for (int i= 0, numThreads= threads.length; i < numThreads; i++) {
-				if (!((JDIThread)threads[i]).canSuspend()) {
-					return false;
+				if (((JDIThread)threads[i]).canSuspend()) {
+					return true;
 				}
 			}
-			return true;
+			return false;
 		}
 		return false;
 	}
@@ -1430,6 +1444,7 @@ public class JDIDebugTarget extends JDIDebugElement implements IJavaDebugTarget,
 		setThreadStartHandler(null);
 		setEventDispatcher(null);
 		setStepFilters(new String[0]);
+		fHCRListeners.clear();
 	}
 
 	/**
@@ -2481,6 +2496,16 @@ public class JDIDebugTarget extends JDIDebugElement implements IJavaDebugTarget,
 	public boolean supportsSelectiveGarbageCollection() {
 		return fSupportsDisableGC;
 	}
+	
+	/**
+	 * Sets whether this target supports selectively disabling/enabling garbage collection
+	 * of specific objects.
+	 * 
+	 * @param enableGC whether this target supports selective GC
+	 */
+	void setSupportsSelectiveGarbageCollection(boolean enableGC) {
+		fSupportsDisableGC = enableGC;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#getVMName()
@@ -2516,5 +2541,146 @@ public class JDIDebugTarget extends JDIDebugElement implements IJavaDebugTarget,
 			// #targetRequestFailed will throw an exception				
 			return null;
 		}
-	}	
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#refreshState()
+	 */
+	public void refreshState() throws DebugException {
+		if (isTerminated() || isDisconnected()) {
+			return;
+		}
+		boolean prevSuspend = isSuspended();
+		int running = 0;
+		int suspended = 0;
+		List toSuspend = new ArrayList();
+		List toResume = new ArrayList();
+		List toRefresh = new ArrayList();
+		Iterator iterator = getThreadIterator();
+		while (iterator.hasNext()) {
+			JDIThread thread = (JDIThread) iterator.next();
+			boolean modelSuspended = thread.isSuspended(); 
+			ThreadReference reference = thread.getUnderlyingThread();
+			try {
+				boolean realSuspended = reference.isSuspended();
+				if (realSuspended) {
+					suspended++;
+					if (modelSuspended) {
+						// Even if the model is suspended, it might be in a different location so refresh
+						toRefresh.add(thread);
+					} else {
+						// The thread is actually suspended, refresh frames and fire suspend event.
+						toSuspend.add(thread);
+					}
+				} else {
+					running++;
+					if (modelSuspended) {
+						// thread is actually running, model is suspended, resume model 
+						toResume.add(thread);
+					}
+					// else both are running - OK
+				}
+			} catch (InternalException e) {
+				requestFailed(e.getMessage(), e);
+			}
+		}
+		// if the entire target changed state/fire events at target level, else fire thread events
+		boolean targetLevelEvent = false;
+		if (prevSuspend) {
+			if (running > 0) {
+				// was suspended, but now a thread is running
+				targetLevelEvent = true;
+			}
+		} else {
+			if (running == 0) {
+				// was running, but now all threads are suspended
+				targetLevelEvent = true;
+			}
+		}
+		if (targetLevelEvent) {
+			iterator = toSuspend.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.suspendedByVM();
+			}
+			iterator = toResume.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.resumedByVM();
+			}
+			iterator = toRefresh.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.preserveStackFrames();
+			}
+			if (running == 0) {
+				synchronized (this) {
+					setSuspended(true);
+				}
+				fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
+			} else {
+				synchronized (this) {
+					setSuspended(false);
+				}
+				fireResumeEvent(DebugEvent.CLIENT_REQUEST);
+			}
+		} else {
+			iterator = toSuspend.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.preserveStackFrames();
+				thread.setRunning(false);
+				thread.fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
+			}
+			iterator = toResume.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.setRunning(true);
+				thread.fireResumeEvent(DebugEvent.CLIENT_REQUEST);
+			}
+			iterator = toRefresh.iterator();
+			while (iterator.hasNext()) {
+				JDIThread thread = (JDIThread) iterator.next();
+				thread.preserveStackFrames();
+				thread.fireSuspendEvent(DebugEvent.CLIENT_REQUEST);
+			}
+		}
+			 
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#sendCommand(byte, byte, byte[])
+	 */
+	public byte[] sendCommand(byte commandSet, byte commandId, byte[] data) throws DebugException {
+		try {
+			return sendJDWPCommand(commandSet, commandId, data);
+		} catch (IOException e) {
+			requestFailed(e.getMessage(), e);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#addHotCodeReplaceListener(org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener)
+	 */
+	public void addHotCodeReplaceListener(IJavaHotCodeReplaceListener listener) {
+		fHCRListeners.add(listener);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaDebugTarget#removeHotCodeReplaceListener(org.eclipse.jdt.debug.core.IJavaHotCodeReplaceListener)
+	 */
+	public void removeHotCodeReplaceListener(IJavaHotCodeReplaceListener listener) {
+		fHCRListeners.remove(listener);
+	}
+	
+	/**
+	 * Returns an array of current hot code replace listeners.
+	 * 
+	 * @return registered hot code replace listeners
+	 * @since 3.6
+	 */
+	public Object[] getHotCodeReplaceListeners() {
+		return fHCRListeners.getListeners();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
index 6a9941a..12c310a 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIObjectValue.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -416,6 +416,9 @@ public class JDIObjectValue extends JDIValue implements IJavaObject {
 		if (getJavaDebugTarget().supportsSelectiveGarbageCollection()) {
 			try {
 				getUnderlyingObject().disableCollection();
+			} catch (UnsupportedOperationException e) {
+				// The VM does not support enable/disable GC - update target capabilities and ignore (bug 246577)
+				getJavaDebugTarget().setSupportsSelectiveGarbageCollection(false);
 			} catch (RuntimeException e) {
 				targetRequestFailed(JDIDebugModelMessages.JDIObjectValue_13, e);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
index 773b653..3bc4cd5 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIReferenceType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.debug.core.model;
 
+import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
@@ -29,6 +30,7 @@ import com.sun.jdi.Field;
 import com.sun.jdi.ReferenceType;
 import com.sun.jdi.Type;
 import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * References a class, interface, or array type.
@@ -292,4 +294,22 @@ public abstract class JDIReferenceType extends JDIType implements IJavaReference
 		return null;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaReferenceType#getInstanceCount()
+	 */
+	public long getInstanceCount() throws DebugException {
+		JDIDebugTarget target = getJavaDebugTarget();
+		if (target.supportsInstanceRetrieval()) {
+			ArrayList list = new ArrayList(2);
+			list.add(getUnderlyingType());
+			VirtualMachine vm = getVM();
+			try {
+				long[] counts = vm.instanceCounts(list);
+				return counts[0];
+			} catch (RuntimeException e) {
+				targetRequestFailed(JDIDebugModelMessages.JDIReferenceType_5, e);
+			}
+		}
+		return -1;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
index 389e18c..938519b 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.util.List;
 import java.util.Vector;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
@@ -31,7 +32,10 @@ import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.IStatusHandler;
 import org.eclipse.debug.core.model.IBreakpoint;
 import org.eclipse.debug.core.model.IStackFrame;
+import org.eclipse.debug.core.model.IStep;
+import org.eclipse.debug.core.model.ISuspendResume;
 import org.eclipse.debug.core.model.ITerminate;
+import org.eclipse.debug.core.model.IThread;
 import org.eclipse.jdt.core.Signature;
 import org.eclipse.jdt.debug.core.IEvaluationRunnable;
 import org.eclipse.jdt.debug.core.IJavaBreakpoint;
@@ -1099,7 +1103,8 @@ public class JDIThread extends JDIDebugElement implements IJavaThread {
 		// is really hit).
 		if (breakpoint instanceof JavaLineBreakpoint) {
 			JavaLineBreakpoint lbp = (JavaLineBreakpoint) breakpoint;
-			if (lbp.hasCondition()) {
+			// evaluate condition unless we're in an evaluation already (bug 284022)
+			if (lbp.hasCondition() && !isPerformingEvaluation()) {
 				ConditionalBreakpointHandler handler = new ConditionalBreakpointHandler();
 				int vote = handler.breakpointHit(this, breakpoint);
 				if (vote == IJavaBreakpointListener.DONT_SUSPEND) {
@@ -2891,4 +2896,12 @@ public class JDIThread extends JDIDebugElement implements IJavaThread {
 	public synchronized boolean isSuspendVoteInProgress() {
 		return fSuspendVoteInProgress;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.debug.core.IJavaThread#getThreadObject()
+	 */
+	public IJavaObject getThreadObject() throws DebugException {
+		return (IJavaObject) JDIValue.createValue(getJavaDebugTarget(), fThread);
+	}
+	
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
index 5c756bd..119b5d3 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
+++ b/eclipse/plugins/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThreadGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jdt.debug.core.IJavaThreadGroup;
 
 import com.sun.jdi.ThreadGroupReference;
 import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VMDisconnectedException;
 
 /**
  * @since 3.2
@@ -59,6 +60,9 @@ public class JDIThreadGroup extends JDIDebugElement implements IJavaThreadGroup,
 				}
 			}
 			return (IJavaThread[]) modelThreads.toArray(new IJavaThread[modelThreads.size()]);
+		} catch (VMDisconnectedException e) {
+			// terminated/disconnected, return empty collection
+			return new IJavaThread[0];
 		} catch (RuntimeException e) {
 			targetRequestFailed(JDIDebugModelMessages.JDIThreadGroup_0, e);
 		}
@@ -96,6 +100,8 @@ public class JDIThreadGroup extends JDIDebugElement implements IJavaThreadGroup,
 				}
 			}
 			return (IJavaThreadGroup[]) modelGroups.toArray(new IJavaThreadGroup[modelGroups.size()]);
+		} catch (VMDisconnectedException e) {
+			return new IJavaThreadGroup[0];
 		} catch (RuntimeException e) {
 			targetRequestFailed(JDIDebugModelMessages.JDIThreadGroup_2, e);
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/plugin.xml b/eclipse/plugins/org.eclipse.jdt.debug/plugin.xml
index 563c2cc..bbfd254 100644
--- a/eclipse/plugins/org.eclipse.jdt.debug/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.debug/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html b/eclipse/plugins/org.eclipse.jdt.debug/r3_5_buildnotes_jdt-debug.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.debug/buildnotes_jdt-debug.html
copy to eclipse/plugins/org.eclipse.jdt.debug/r3_5_buildnotes_jdt-debug.html
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.doc.isv/META-INF/MANIFEST.MF
index 5bdfd7b..e9f6049 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.doc.isv; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/about.properties b/eclipse/plugins/org.eclipse.jdt.doc.isv/about.properties
index c22e18e..813400f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/about.properties
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Java development tooling plug-in developers guide\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright IBM Corp. and others 2000, 2004.  All rights reserved.\n\
+(c) Copyright IBM Corporation. and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/jdt
 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml b/eclipse/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
index 3b32b7e..c36f182 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
@@ -7,7 +7,6 @@
 
 	<target name="all" depends="init" unless="index.present">
 		<antcall target="convertSchemaToHtml" />
-		<antcall target="examplesDocCopy" />
 		<antcall target="generateJavadoc" />
 		<antcall target="build.index" />
 		<!--antcall target="createDocZip" /-->
@@ -28,21 +27,13 @@
 		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.debug/plugin.xml" destination="${dest}" />
 		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.debug.ui/plugin.xml" destination="${dest}" />
 		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.junit/plugin.xml" destination="${dest}" />
+		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.junit.core/plugin.xml" destination="${dest}" />
 		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.launching/plugin.xml" destination="${dest}" />
 		<pde.convertSchemaToHTML manifest="../org.eclipse.jdt.ui/plugin.xml" destination="${dest}" />
 
 		<record name="${basedir}/jdtconvert.txt" action="stop"/>
 	</target>
 
-	<target name="examplesDocCopy" >
-		<copy todir="samples">
-			<fileset dir="..">
-				<include name="org.eclipse.jdt.ui.examples.projects/doc-html/"/>
-			</fileset>
-		</copy>
-	</target>
-
-
 	<target name="getJavadocPath">
 		<available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/>
 		<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
@@ -77,7 +68,14 @@
 		<exec dir="." executable="${javadoc}" output="doc.bin.log">
 			<arg line="@${basedir}/${optionsFile} -J-Xmx500M" />
 		</exec>
+		
+		<!--workaround for bug 101048-->
+		<replace dir="reference/api" token="="/../misc/api-usage-rules.html" value="="./../misc/api-usage-rules.html">
+			<include name="*htm*" />
+		</replace>
+		
 		<antcall target="generateJdtAptJavadoc" />
+		
 	</target>
 	
 	<target name="generateJdtAptJavadoc">
@@ -103,6 +101,12 @@
 		<exec dir="." executable="${javadoc15}" output="jdtapt.doc.bin.log">
 			<arg line="@${basedir}/${jdtaptoptionsFile} -J-Xmx500M" />
 		</exec>
+		
+		<!--workaround for bug 101048-->
+		<replace dir="reference/apt" token="="/../misc/api-usage-rules.html" value="="./../misc/api-usage-rules.html">
+			<include name="*htm*" />
+		</replace>
+		
 	</target>
 
 	<target name="buildPlatformDoc" unless="platform.index.present">
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/CopyrightTabPage.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/CopyrightTabPage.html
index 9e59c29..06b71be 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/CopyrightTabPage.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/CopyrightTabPage.html
@@ -1,4 +1,14 @@
-<pre><font color="#4444cc">/*******************************************************************************
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="stylesheet" type="text/css" href="../book.css">
+</head>
+<body>
+<font color="#4444cc">
+<pre>/*******************************************************************************
  * Copyright (c) 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -204,13 +214,13 @@ public class CopyrightTabPage implements ICleanUpConfigurationUI {
 			}
 
 			Rectangle area= fContainer.getClientArea();
-			if (area.width > x) {
+			if (area.width > x) {
 				fContainer.setExpandHorizontal(true);
 			} else {
 				fContainer.setExpandHorizontal(false);
 			}
 
-			if (area.height > y) {
+			if (area.height > y) {
 				fContainer.setExpandVertical(true);
 			} else {
 				fContainer.setExpandVertical(false);
@@ -238,3 +248,5 @@ public class CopyrightTabPage implements ICleanUpConfigurationUI {
 		}
 	}
 }</font></pre>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_codeformatter.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_codeformatter.htm
index a9741f0..042a880 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_codeformatter.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_codeformatter.htm
@@ -71,7 +71,7 @@ in order to get the formatted result.</p>
 				DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
 				DefaultCodeFormatterConstants.INDENT_ON_COLUMN));
 		
-		// instanciate the default code formatter with the given options
+		// instantiate the default code formatter with the given options
 		final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(options);
 		
 		// retrieve the source to format
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
index 01122da..2fff92a 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
      
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      
@@ -19,7 +19,7 @@ Java .class files from source code. There is no direct API provided by the
 compiler. It is installed as a builder on Java projects. Compilation is triggered 
 using standard platform build mechanisms.</p>
 <p> The platform build mechanism is described in detail in <a href="../../org.eclipse.platform.doc.isv/guide/resAdv_builders.htm" class="XRef">
- Incremental project builders</a> .</p>
+ Incremental project builders</a>.</p>
 <h3> Compiling code</h3>
 <p> You can programmatically compile the Java source files in a project using 
 the build API.</p>
@@ -105,17 +105,22 @@ You can control how progress is reported, or how the batch compiler is canceled,
 <p>
 The recommended options have an orange background.
 </p>
+<p>When some options are being set multiple times, the batch compiler consumes them from left to right. When the warning option (-warn:....) is used without 
+'+' or '-', this overrides the set of warnings previously specified. So the user should make sure that such an option is given before
+any other usage of the -warn option.
+</p>
+<p>Same applies for the -err: option.</p>
 <table BORDER CELLSPACING="2" CELLPADDING="2">
 <tr>
 <th>Name</th>
-<th>Usage</th>
+<th colspan="3">Usage</th>
 </tr>
 <tr>
-<th colspan="2">Classpath options</th>
+<th colspan="4">Classpath options</th>
 </tr>
 <tr>
 <td valign=top bgcolor="#FFCCAA" width="250">-bootclasspath <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top bgcolor="#FFCCAA">This is a list of directories or jar files used to bootstrap the class files used by the compiler. By default the libraries of the running
+<td valign=top bgcolor="#FFCCAA" colspan="3">This is a list of directories or jar files used to bootstrap the class files used by the compiler. By default the libraries of the running
 VM are used. Entries are separated by the platform path separator.
 <br>Each directory or file can specify access rules for types between '[' and ']'.
 <p>If no bootclasspath is specified, the compiler will infer it using the following system properties <code>sun.boot.class.path</code>,
@@ -124,7 +129,7 @@ VM are used. Entries are separated by the platform path separator.
 </tr>
 <tr>
 <td valign="top" bgcolor="#FFCCAA" width="250">-cp<br>-classpath <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top bgcolor="#FFCCAA">This is a list of directories or jar files used to compile the source files. The default value is the value of the property "java.class.path".
+<td valign=top bgcolor="#FFCCAA" colspan="3">This is a list of directories or jar files used to compile the source files. The default value is the value of the property "java.class.path".
  Entries are separated by the platform path separator.
 <br>Each directory or file can specify access rules for types between '[' and ']' (e.g. [-X] to forbid access to type X, [~X] to 
 discourage access to type X, [+p/X:-p/*] to forbid access to all types in package p but allow access to p/X).
@@ -135,33 +140,52 @@ classpath, provided it is not on the classpath yet.
 </tr>
 <tr>
 <td valign=top width="250">-extdirs <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top>This is a list of directories used to specify the location of extension zip/jar files. Entries are separated by the platform path separator.</td>
+<td valign=top colspan="3">This is a list of directories used to specify the location of extension zip/jar files. Entries are separated by the platform path separator.</td>
 </tr>
 <tr>
 <td valign=top width="250">-endorseddirs <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top>This is a list of directories used to specify the location of endorsed zip/jar files. Entries are separated by the platform path separator.</td>
+<td valign=top colspan="3">This is a list of directories used to specify the location of endorsed zip/jar files. Entries are separated by the platform path separator.</td>
 </tr>
 <tr>
 <td valign=top width="250">-sourcepath <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top>This is a list of directories used to specify the source files. Entries are separated by the platform path separator.
+<td valign=top colspan="3">This is a list of directories used to specify the source files. Entries are separated by the platform path separator.
 <br>Each directory can specify access rules for types between '[' and ']'.</td>
 </tr>
 <tr>
 <td valign=top bgcolor="#FFCCAA" width="250">-d <dir 1>|none</td>
-<td bgcolor="#FFCCAA">This is used to specify in which directory the generated .class files should be dumped. If it is omitted, no package directory structure is created.<br>
+<td bgcolor="#FFCCAA" colspan="3">This is used to specify in which directory the generated .class files should be dumped. If it is omitted, no package directory structure is created.<br>
 If you want to generate no .class file at all, use <font color="#3366FF">-d none</font>.</td>
 </tr>
 <tr>
 <td valign=top width="250">-encoding <encoding name></td>
-<td>Specify default source encoding format (custom encoding can also be specified on a per file basis by suffixing each input source file/folder name with <font color="#3366FF">[<encoding name>]</font>, 
-    for example <font color="#3366FF">X.java[utf8]</font>).</td>
+<td colspan="3">Specify default encoding for all source files. Custom encoding can also be specified on a per file basis by suffixing each input source file/folder name with <font color="#3366FF">[<encoding name>]</font>. 
+For example <font color="#3366FF">X.java[utf8]</font> would specify the <code>UTF-8</code> encoding for the compilation unit
+X.java located in the current user directory.<p>If multiple default source file encodings are specified, the last one will be used.</p>
+<p>For example:</p>
+<ul>
+<li>
+<font color="#3366FF"><code>... -encoding UTF-8 X.java[Cp1252] Y.java[UTF-16] Z.java ....</code></font><br>
+All source files will be read using UTF-8 encoding (this includes <font color="#3366FF">Z.java</font>). <font color="#3366FF">X.java</font> 
+will be read using Cp1252 encoding and <font color="#3366FF">Y.java</font> will be read
+using UTF-16 encoding.
+</li>
+<li>
+<font color="#3366FF"><code>... -encoding UTF-8 -encoding UTF-16 ....</code></font><br>
+All source files will be read using UTF-16 encoding. The -encoding option for UTF-8 is ignored.
+</li>
+<li>
+<font color="#3366FF"><code>... -encoding Cp1252 /foo/bar/X.java[UTF-16] /foo/bar[UTF-8] ....</code></font><br>
+All source files will be read using Cp1252 encoding. X.java is the only file inside the /foo/bar directory to be read using 
+the encoding UTF-16. All other files in that directory will use UTF-8 encoding.
+</li>
+</ul></td>
 </tr>
 <tr>
-<th colspan="2">Compliance options</th>
+<th colspan="4">Compliance options</th>
 </tr>
 <tr>
 <td valign=top width="250">-target 1.1 to 1.7 or (5, 5.0, etc)</td>
-<td>This specifies the .class file target setting.
+<td colspan="3">This specifies the .class file target setting.
 The possible value are:
 <ul>
 <li><font color="#3366FF">1.1</font> (major version: 45 minor: 3)</li>
@@ -185,27 +209,27 @@ Defaults are:
 </tr>
 <tr>
 <td valign=top>-1.3</td>
-<td>Set compliance level to <font color="#3366FF">1.3</font>. Implicit -source 1.3 -target 1.1.</td>
+<td colspan="3">Set compliance level to <font color="#3366FF">1.3</font>. Implicit -source 1.3 -target 1.1.</td>
 </tr>
 <tr>
 <td valign=top>-1.4</td>
-<td>Set compliance level to <font color="#3366FF">1.4</font> (default). Implicit -source 1.3 -target 1.2.</td>
+<td colspan="3">Set compliance level to <font color="#3366FF">1.4</font> (default). Implicit -source 1.3 -target 1.2.</td>
 </tr>
 <tr>
 <td valign=top>-1.5</td>
-<td>Set compliance level to <font color="#3366FF">1.5</font>. Implicit -source 1.5 -target 1.5.</td>
+<td colspan="3">Set compliance level to <font color="#3366FF">1.5</font>. Implicit -source 1.5 -target 1.5.</td>
 </tr>
 <tr>
 <td valign=top>-1.6</td>
-<td>Set compliance level to <font color="#3366FF">1.6</font>. Implicit -source 1.6 -target 1.6.</td>
+<td colspan="3">Set compliance level to <font color="#3366FF">1.6</font>. Implicit -source 1.6 -target 1.6.</td>
 </tr>
 <tr>
 <td valign=top>-1.7</td>
-<td>Set compliance level to <font color="#3366FF">1.7</font>. Implicit -source 1.7 -target 1.7.</td>
+<td colspan="3">Set compliance level to <font color="#3366FF">1.7</font>. Implicit -source 1.7 -target 1.7.</td>
 </tr>
 <tr>
 <td valign=top width="250">-source 1.1 to 1.7 or (5, 5.0, etc)</td>
-<td>This is used to specify the source level expected by the compiler.<br>
+<td colspan="3">This is used to specify the source level expected by the compiler.<br>
 The possible value are:
 <ul>
 <li><font color="#3366FF">1.3</font></li>
@@ -226,342 +250,444 @@ In <font color="#3366FF">1.4</font>, <font color="#3366FF"><I>assert</I></font>
 and <font color="#3366FF">1.6</font>, <font color="#3366FF"><I>enum</I></font> and <font color="#3366FF"><i>assert</i></font> are treated as a keywords.</td>
 </tr>
 <tr>
-<th colspan="2">Warning options</th>
+<th colspan="4">Warning options</th>
 </tr>
 <tr>
 <td valign=top>-?:warn -help:warn</td>
-<td>Display advanced warning options</td>
-</tr>
-<tr>
-<td valign=top width="250">-warn:<blockquote>allDeadCode<br>allDeprecation<br>allJavadoc<br><font color="#FF0000">assertIdentifier</font><br>boxing<br><font color="#FF0000">charConcat</font><br>
-<font color="#FF0000">compareIdentical</font><br>conditionAssign<br><font color="#FF0000">constructorName</font>
-<br><font color="#FF0000">deadCode</font>
-<br>dep-ann<br><font color="#FF0000">deprecation</font><br><font color="#FF0000">discouraged</font><br>emptyBlock<br>
-<font color="#FF0000">enumIdentifier</font><br>enumSwitch<br>fallthrough<br>fieldHiding
-<br><font color="#FF0000">finalBound</font><br><font color="#FF0000">finally</font>
-<br><font color="#FF0000">forbidden</font><br>
-hashCode<br>hiding<br>indirectStatic
-<br><font color="#FF0000">intfAnnotation</font><br><font color="#FF0000">intfNonInherited</font>
-<br>intfRedundant<br>javadoc<br>localHiding
-<br><font color="#FF0000">maskedCatchBlock</font><br>nls<br><font color="#FF0000">noEffectAssign</font>
-<br><font color="#FF0000">null</font><br>nullDereference<br>over-ann<br>paramAssign<br><font color="#FF0000">pkgDefaultMethod</font>
-<br><font color="#FF0000">raw</font><br>semicolon<br><font color="#FF0000">serial</font><br>
-specialParamHiding<br>static-access<br><font color="#FF0000">staticReceiver</font><br>super<br><font color="#FF0000">suppress</font><br>synthetic-access<br>
-syncOverride<br>syntheticAccess<br>tasks(<task1>|...|<taskN>)<br>
-<font color="#FF0000">typeHiding</font><br><font color="#FF0000">unchecked</font><br>unnecessaryElse<br>unqualified-field-access<br>unqualifiedField<br>unused<br>unusedArgument<br><font color="#FF0000">unusedImport</font><br><font color="#FF0000">unusedLabel</font><br><font color="#FF0000">unusedLocal</font><br><font color="#FF0000">unusedPrivate</font><br>unusedThrown
-<br><font color="#FF0000">unusedTypeArgs</font><br>uselessTypeCheck<br><font color="#FF0000">varargsCast</font><br><font color="#FF0000">warningToken</font>
-</blockquote>
+<td colspan="3">Display advanced warning options</td>
+</tr>
+<tr>
+<td valign=top width="250" rowspan="67">-warn:...
 </td>
-<td valign=top>Set warning level.<br>e.g. <font color="#3366FF">-warn:unusedLocal,deprecation</font><br>
-<p>In <font color="#FF0000">red</font> are the default settings.</p>
-<pre>
-    -warn:none                               disable all warnings
-    -warn:<warnings separated by ,>    enable exactly the listed warnings
-    -warn:+<warnings separated by ,>   enable additional warnings
-    -warn:-<warnings separated by ,>   disable specific warnings
-</pre>
+<td valign=top colspan="3">Specify the set of enabled warnings.<br>e.g. <font color="#3366FF">-warn:unusedLocal,deprecation</font><br>
 <table>
 <tr>
-<th align=left valign=top>allDeadCode</th>
+<td>-warn:none</td><td>disable all warnings</td>
+</tr>
+<tr>
+<td>-warn:<warning tokens separated by ,></td><td>enable exactly the listed warnings</td>
+</tr>
+<tr>
+<td>-warn:+<warning tokens separated by ,></td><td>enable additional warnings</td>
+</tr>
+<tr>
+<td>-warn:-<warning tokens separated by ,></td><td>disable specific warnings</td>
+</tr>
+</table>
+</td>
+</tr>
+<tr>
+<th align=center width="50">Default</th>
+<th align=left width="150">Token name</th>
+<th align=left>Description</th>
+</tr>
+<tr>
+<td align=center valign=top>-</td>
+<td align=left valign=top>allDeadCode</td>
 <td valign=top>dead code including trivial if(DEBUG) check</td>
 </tr>
 <tr>
-<th align=left valign=top>allDeprecation</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>allDeprecation</td>
 <td valign=top>deprecation even inside deprecated code</td>
 </tr>
 <tr>
-<th align=left valign=top>allJavadoc</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>allJavadoc</td>
 <td valign=top>invalid or missing javadoc</td>
 </tr>
 <tr>
-<th align=left valign=top>assertIdentifier</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>allOver-ann</td>
+<td valign=top>all missing @Override annotations (superclass and superinterfaces)</td>
+</tr>
+<tr>
+<td align=center valign=top>+</td>
+<td align=left valign=top>assertIdentifier</td>
 <td valign=top>occurrence of <i>assert</i> used as identifier</td>
 </tr>
 <tr>
-<th align=left valign=top>boxing</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>boxing</td>
 <td valign=top>autoboxing conversion</td>
 </tr>
 <tr>
-<th align=left valign=top>charConcat</th>
-<td valign=top>when a char array is used in a string concatenation without being converted explicitly to 
-a string</td>
+<td align=center valign=top>+</td>
+<td align=left valign=top>charConcat</td>
+<td valign=top>when a char array is used in a string concatenation without being converted explicitly to a string</td>
 </tr>
 <tr>
-<th align=left valign=top>compareIdentical</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>compareIdentical</td>
 <td valign=top>comparing identical expressions</td>
 </tr>
 <tr>
-<th align=left valign=top>conditionAssign</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>conditionAssign</td>
 <td valign=top>possible accidental boolean assignment</td>
 </tr>
 <tr>
-<th align=left valign=top>constructorName</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>constructorName</td>
 <td valign=top>method with constructor name</td>
 </tr>
 <tr>
-<th align=left valign=top>deadCode</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>deadCode</td>
 <td valign=top>dead code excluding trivial if (DEBUG) check</td>
 </tr><tr>
-<th align=left valign=top>dep-ann</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>dep-ann</td>
 <td valign=top>missing @Deprecated annotation</td>
 </tr>
 <tr>
-<th align=left valign=top>deprecation</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>deprecation</td>
 <td valign=top>usage of deprecated type or member outside deprecated code</td>
 </tr>
 <tr>
-<th align=left valign=top>discouraged</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>discouraged</td>
 <td valign=top>use of types matching a discouraged access rule</td>
 </tr>
 <tr>
-<th align=left valign=top>emptyBlock</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>emptyBlock</td>
 <td valign=top>undocumented empty block</td>
 </tr>
 <tr>
-<th align=left valign=top>enumIdentifier</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>enumIdentifier</td>
 <td valign=top>occurrence of <i>enum</i> used as identifier</td>
 </tr>
 <tr>
-<th align=left valign=top>enumSwitch</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>enumSwitch</td>
 <td valign=top>incomplete enum switch</td>
 </tr>
 <tr>
-<th align=left valign=top>fallthrough</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>fallthrough</td>
 <td valign=top>possible fall-through case</td>
 </tr>
 <tr>
-<th align=left valign=top>fieldHiding</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>fieldHiding</td>
 <td valign=top>field hiding another variable</td>
 </tr>
 <tr>
-<th align=left valign=top>finalBound</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>finalBound</td>
 <td valign=top>type parameter with final bound</td>
 </tr>
 <tr>
-<th align=left valign=top>finally</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>finally</td>
 <td valign=top>finally block not completing normally</td>
 </tr>
 <tr>
-<th align=left valign=top>forbidden</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>forbidden</td>
 <td valign=top>use of types matching a forbidden access rule</td>
 </tr>
 <tr>
-<th align=left valign=top>hashCode</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>hashCode</td>
 <td valign=top>missing hashCode() method when overriding equals()</td>
 </tr>
 <tr>
-<th align=left valign=top>hiding</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>hiding</td>
 <td valign=top>macro for fieldHiding, localHiding, typeHiding and maskedCatchBlock</td>
 </tr>
 <tr>
-<th align=left valign=top>indirectStatic</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>indirectStatic</td>
 <td valign=top>indirect reference to static member</td>
 </tr>
 <tr>
-<th align=left valign=top>intfAnnotation</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>intfAnnotation</td>
 <td valign=top>annotation type used as super interface</td>
 </tr>
 <tr>
-<th align=left valign=top>intfNonInherited</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>intfNonInherited</td>
 <td valign=top>interface non-inherited method compatibility</td>
 </tr>
 <tr>
-<th align=left valign=top>intfRedundant</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>intfRedundant</td>
 <td valign=top>find redundant superinterfaces</td>
 </tr>
 <tr>
-<th align=left valign=top>javadoc</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>javadoc</td>
 <td valign=top>invalid javadoc</td>
 </tr>
 <tr>
-<th align=left valign=top>localHiding</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>localHiding</td>
 <td valign=top>local variable hiding another variable</td>
 </tr>
 <tr>
-<th align=left valign=top>maskedCatchBlock</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>maskedCatchBlock</td>
 <td valign=top>hidden catch block</td>
 </tr>
 <tr>
-<th align=left valign=top>nls</th>
-<td>non-nls string literals (lacking of tags //$NON-NLS-<n>)</td>
+<td align=center valign=top>-</td>
+<td align=left valign=top>nls</td>
+<td valign=top>non-nls string literals (lacking of tags //$NON-NLS-<n>)</td>
 </tr>
 <tr>
-<th align=left valign=top>noEffectAssign</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>noEffectAssign</td>
 <td valign=top>assignment with no effect</td>
 </tr>
 <tr>
-<th align=left valign=top>null</th>
-<td>potential missing or redundant null check</td>
+<td align=center valign=top>-</td>
+<td align=left valign=top>null</td>
+<td valign=top>potential missing or redundant null check</td>
 </tr>
 <tr>
-<th align=left valign=top>nullDereference</th>
-<td>missing null check</td>
+<td align=center valign=top>-</td>
+<td align=left valign=top>nullDereference</td>
+<td valign=top>missing null check</td>
 </tr>
 <tr>
-<th align=left valign=top>over-ann</th>
-<td>missing @Override annotation</td>
+<td align=center valign=top>-</td>
+<td align=left valign=top>over-ann</td>
+<td valign=top>missing @Override annotation (superclass only)</td>
 </tr>
 <tr>
-<th align=left valign=top>paramAssign</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>paramAssign</td>
 <td valign=top>assignment to a parameter</td>
 </tr>
 <tr>
-<th align=left valign=top>pkgDefaultMethod</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>pkgDefaultMethod</td>
 <td valign=top>attempt to override package-default method</td>
 </tr>
 <tr>
-<th align=left valign=top>raw</th>
-<td valign=top>usage a of raw type (instead of a parametrized type)</td>
+<td align=center valign=top>+</td>
+<td align=left valign=top>raw</td>
+<td valign=top>usage a of raw type (instead of a parameterized type)</td>
 </tr>
 <tr>
-<th align=left valign=top>semicolon</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>semicolon</td>
 <td valign=top>unnecessary semicolon or empty statement</td>
 </tr>
 <tr>
-<th align=left valign=top>serial</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>serial</td>
 <td valign=top>missing serialVersionUID</td>
 </tr>
 <tr>
-<th align=left valign=top>specialParamHiding</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>specialParamHiding</td>
 <td valign=top>constructor or setter parameter hiding another field</td>
 </tr>
 <tr>
-<th align=left valign=top>static-access</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>static-access</td>
 <td valign=top>macro for indirectStatic and staticReceiver</td>
 </tr>
 <tr>
-<th align=left valign=top>staticReceiver</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>staticReceiver</td>
 <td valign=top>if a non static receiver is used to get a static field or call a static method</td>
 </tr>
 <tr>
-<th align=left valign=top>super</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>super</td>
 <td valign=top>overriding a method without making a super invocation</td>
 </tr>
 <tr>
-<th align=left valign=top>suppress</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>suppress</td>
 <td valign=top>enable @SuppressWarnings</td>
 </tr>
 <tr>
-<th align=left valign=top>syncOverride</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>syncOverride</td>
 <td valign=top>missing synchronized in synchronized method override</td>
 </tr>
 <tr>
-<th align=left valign=top>syntheticAccess</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>syntheticAccess</td>
 <td valign=top>when performing synthetic access for innerclass</td>
 </tr>
 <tr>
-<th align=left valign=top>tasks</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>tasks</td>
 <td valign=top>enable support for tasks tags in source code</td>
 </tr>
 <tr>
-<th align=left valign=top>typeHiding</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>typeHiding</td>
 <td valign=top>type parameter hiding another type</td>
 </tr>
 <tr>
-<th align=left valign=top>unchecked</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unchecked</td>
 <td valign=top>unchecked type operation</td>
 </tr>
 <tr>
-<th align=left valign=top>unnecessaryElse</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unnecessaryElse</td>
 <td valign=top>unnecessary else clause</td>
 </tr>
 <tr>
-<th align=left valign=top>unqualifiedField</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unqualifiedField</td>
 <td valign=top>unqualified reference to field</td>
 </tr>
 <tr>
-<th align=left valign=top>unused</th>
-<td valign=top>macro for unusedArgument, unusedImport, unusedLabel, unusedLocal, unusedPrivate and unusedThrown</td>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unused</td>
+<td valign=top>macro for unusedAllocation, unusedArgument, unusedImport, unusedLabel, unusedLocal, unusedPrivate and unusedThrown</td>
+</tr>
+<tr>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unusedAllocation</td>
+<td valign=top>allocating an object that is not used</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedArgument</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unusedArgument</td>
 <td valign=top>unused method argument</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedImport</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unusedImport</td>
 <td valign=top>unused import reference</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedLabel</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unusedLabel</td>
 <td valign=top>unused label</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedLocal</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unusedLocal</td>
 <td valign=top>unused local variable</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedPrivate</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unusedPrivate</td>
 <td valign=top>unused private member declaration</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedThrown</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>unusedThrown</td>
 <td valign=top>unused declared thrown exception</td>
 </tr>
 <tr>
-<th align=left valign=top>unusedTypeArgs</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>unusedTypeArgs</td>
 <td valign=top>unused type arguments for method</td>
 </tr>
 <tr>
-<th align=left valign=top>uselessTypeCheck</th>
+<td align=center valign=top>-</td>
+<td align=left valign=top>uselessTypeCheck</td>
 <td valign=top>unnecessary cast/instanceof operation</td>
 </tr>
 <tr>
-<th align=left valign=top>varargsCast</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>varargsCast</td>
 <td valign=top>varargs argument need explicit cast</td>
 </tr>
 <tr>
-<th align=left valign=top>warningToken</th>
+<td align=center valign=top>+</td>
+<td align=left valign=top>warningToken</td>
 <td valign=top>unhandled warning token in @SuppressWarnings</td>
 </tr>
-</table>
+<tr>
+<td valign=top>-nowarn</td>
+<td colspan="3">No warning (equivalent to <font color="#3366FF">-warn:none</font>)</td>
+</tr>
+<tr>
+<td valign=top width="250">-err:...
 </td>
+<td valign=top colspan="3">Specify the set of enabled warnings that are converted to errors.
+<br>e.g. <font color="#3366FF">-err:unusedLocal,deprecation</font><br>
+unusedLocal and deprecation warnings will be converted to errors. All other warnings are still reported as warnings.
+<table>
+<tr>
+<td>-err:<warning tokens separated by ,></td><td>convert exactly the listed warnings to errors</td>
 </tr>
 <tr>
-<td valign=top>-nowarn</td>
-<td>No warning (equivalent to <font color="#3366FF">-warn:none</font>)</td>
+<td>-err:+<warning tokens separated by ,></td><td>convert additional warnings to errors</td>
+</tr>
+<tr>
+<td>-err:-<warning tokens separated by ,></td><td>remove specific warnings from being converted to errors</td>
+</tr>
+</table>
+</td>
 </tr>
 <tr>
 <td valign=top>-deprecation</td>
-<td>Equivalent to <font color="#3366FF">-warn:+deprecation</font>.</td>
+<td colspan="3">Equivalent to <font color="#3366FF">-warn:+deprecation</font>.</td>
+</tr>
+<tr>
+<td valign=top>-properties <file></td>
+<td colspan="3">Set warnings/errors option based on the properties file contents.
+This option can be used with -nowarn, -err:.. or -warn:.. options, but the last one on the 
+command line sets the options to be used.<br>
+<p>The properties file contents can be generated by setting project specific settings on an existing java project
+and using the file in <code>.settings/org.eclipse.jdt.core.prefs</code> file as a properties file, or
+a simple text file that is defined entry/value pairs using the constants defined in the 
+<code>org.eclipse.jdt.core.JavaCore</code> class.</p>
+<pre>
+...
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+...
+</pre>
+</td>
 </tr>
 <tr>
-<th colspan="2">Debug options</th>
+<th colspan="4">Debug options</th>
 </tr>
 <tr>
 <td valign=top>-g[:none|:lines,vars,source]
 </td>
-<td>Set the debug attributes level<br>
+<td colspan="3">Set the debug attributes level<br>
 <table>
 <tr>
 <th align=left>-g</th>
-<td>All debug info (equivalent to <font color="#3366FF">-g:lines,vars,source</font>)
+<td colspan="3">All debug info (equivalent to <font color="#3366FF">-g:lines,vars,source</font>)
 </td>
 </tr>
 <tr>
 <th align=left>-g:none</th>
-<td>No debug info</td>
+<td colspan="3">No debug info</td>
 </tr>
 <tr>
 <th align=left>-g:[lines,vars,source]</th>
-<td>Selective debug info</td>
+<td colspan="3">Selective debug info</td>
 </tr>
 </table>
 </td>
 </tr>
 <tr>
 <td valign=top>-preserveAllLocals</td>
-<td>Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will remove unused locals.</td>
+<td colspan="3">Explicitly request the compiler to preserve all local variables (for debug purpose). If omitted, the compiler will remove unused locals.</td>
 </tr>
 <tr>
-<th colspan="2">Annotation processing options (require a 1.6 VM or above and are used only if the compliance is 1.6)</th>
+<th colspan="4">Annotation processing options (require a 1.6 VM or above and are used only if the compliance is 1.6)</th>
 </tr>
 <tr>
 <td>-Akey[=value]</td>
-<td valign=top>Annotation processors options that are passed to annotation processors. <code>key</code> is made of identifiers separated by dots</td>
+<td valign=top colspan="3">Annotation processors options that are passed to annotation processors. <code>key</code> is made of identifiers separated by dots</td>
 </tr>
 <tr>
 <td>-proc:[only|none]</td>
-<td valign=top>If <code>-proc:only</code> is specified, the annotation processors will run but
+<td valign=top colspan="3">If <code>-proc:only</code> is specified, the annotation processors will run but
 no compilation will be performed. If <code>-proc:none</code> is specified, annotation processors
 will not be discovered or run; compilation will proceed as if no annotation processors
 were found. By default the compiler must search the classpath for annotation
@@ -570,71 +696,71 @@ not required.</td>
 </tr>
 <tr>
 <td>-processor <class1[,class2,...]></td>
-<td valign=top>Qualified class names of annotation processors to run. If specified, the normal
+<td valign=top colspan="3">Qualified class names of annotation processors to run. If specified, the normal
 <a href="http://java.sun.com/javase/6/docs/api/javax/annotation/processing/Processor.html">
 processor discovery process</a> will be skipped.</td>
 </tr>
 <tr>
 <td>-processorpath <dir 1>;<dir 2>;...;<dir P></td>
-<td valign=top>A list of directories or jar files which will be searched for annotation processors. 
+<td valign=top colspan="3">A list of directories or jar files which will be searched for annotation processors. 
 Entries are separated by the platform path separator. If not specified, the classpath will be searched instead.</td>
 </tr>
 <tr>
 <td>-s <dir></td>
-<td valign=top>The directory where generated source files will be created.</td>
+<td valign=top colspan="3">The directory where generated source files will be created.</td>
 </tr>
 <tr>
 <td>-XprintProcessorInfo</td>
-<td valign=top>Print information about which annotations and which elements a processor is asked to process</td>
+<td valign=top colspan="3">Print information about which annotations and which elements a processor is asked to process</td>
 </tr>
 <tr>
 <td>-XprintRounds</td>
-<td valign=top>Print information about annotation processing rounds</td>
+<td valign=top colspan="3">Print information about annotation processing rounds</td>
 </tr>
 <tr>
 <td>-classNames <class1[,class2,...]></td>
-<td valign=top>Qualified names of binary types that need to be processed</td>
+<td valign=top colspan="3">Qualified names of binary types that need to be processed</td>
 </tr>
 <tr>
-<th colspan="2">Ignored options (for compatibility with javac options)</th>
+<th colspan="4">Ignored options (for compatibility with javac options)</th>
 </tr>
 <tr>
 <td>-J<option></td>
-<td valign=top>Pass option to the virtual machine</td>
+<td valign=top colspan="3">Pass option to the virtual machine</td>
 </tr>
 <tr>
 <td>-X<option></td>
-<td valign=top>Specify non-standard option. -Xemacs is not ignored.</td>
+<td valign=top colspan="3">Specify non-standard option. -Xemacs is not ignored.</td>
 </tr>
 <tr>
 <td>-X</td>
-<td valign=top>Print non-standard options and exit</td>
+<td valign=top colspan="3">Print non-standard options and exit</td>
 </tr>
 <tr>
 <td>-O</td>
-<td valign=top>Optimize for execution time</td>
+<td valign=top colspan="3">Optimize for execution time</td>
 </tr>
 <tr>
-<th colspan="2">Advanced options</th>
+<th colspan="4">Advanced options</th>
 </tr>
 <tr>
 <td>@<file></td>
-<td valign=top>Read command-line arguments from file</td>
+<td valign=top colspan="3">Read command-line arguments from file</td>
 </tr>
 <tr>
 <td>-maxProblems <n></td>
-<td valign=top>Max number of problems per compilation unit (100 by default)</td>
+<td valign=top colspan="3">Max number of problems per compilation unit (100 by default)</td>
 </tr>
 <tr>
 <td valign=top>-log <filename></td>
-<td>Specify a log file in which all output from the compiler will be dumped. This is really useful if you want to debug the batch
+<td colspan="3">Specify a log file in which all output from the compiler will be dumped. This is really useful if you want to debug the batch
 compiler or get a file which contains all errors and warnings from a batch build. If the extension is <b>.xml</b>, the generated log
 will be an xml file.
 </td>
 </tr>
 <tr>
 <td valign=top>-Xemacs</td>
-<td>Use emacs style to present errors and warnings locations into the console
+<td colspan="3">Use emacs style to present errors and warnings locations into the console
     and regular text logs. XML logs are unaffected by this option. With this option
     active, the message:
     <br><code><font color="#3366FF">
@@ -644,58 +770,61 @@ will be an xml file.
 /workspace/X.java:8: warning: The method...</font></code></td>
 </tr>
 <tr>
-<td valign=top>-proceedOnError</td>
-<td>Keep compiling in spite of errors, dumping class files with problem methods or problem types. This is recommended only if you want
-to be able to run your application even if you have remaining errors.</td>
+<td valign=top>-proceedOnError[:Fatal]</td>
+<td colspan="3">Keep compiling in spite of errors, dumping class files with problem methods or problem types.
+This is recommended only if you want to be able to run your application even if you have remaining errors.<br>
+With ":Fatal", all optional errors are treated as fatal and this leads to code that will abort if an error is reached at
+runtime. Without ":Fatal", optional errors don't prevent the proper code generation and the produced .class files can
+be run without a problem.</td>
 </tr>
 <tr>
 <td valign=top>-verbose</td>
-<td>Print accessed/processed compilation units in the console or the log file if specified.</td>
+<td colspan="3">Print accessed/processed compilation units in the console or the log file if specified.</td>
 </tr>
 <tr>
 <td valign=top>-referenceInfo</td>
-<td>Compute reference info. This is useful only if connected to the builder. The reference infos are useless otherwise.</td>
+<td colspan="3">Compute reference info. This is useful only if connected to the builder. The reference infos are useless otherwise.</td>
 </tr>
 <tr>
 <td valign=top>-progress</td>
-<td>Show progress (only in -log mode).</td>
+<td colspan="3">Show progress (only in -log mode).</td>
 </tr>
 <tr>
 <td valign=top>-time
 </td>
-<td>Display speed information.</td>
+<td colspan="3">Display speed information.</td>
 </tr>
 <tr>
 <td valign=top>-noExit</td>
-<td>Do not call <font color="#3366FF">System.exit(n)</font> at end of compilation (<font color="#3366FF">n=0</font> if no error).</td>
+<td colspan="3">Do not call <font color="#3366FF">System.exit(n)</font> at end of compilation (<font color="#3366FF">n=0</font> if no error).</td>
 </tr>
 <tr>
 <td valign=top>-repeat <n>
 </td>
-<td>Repeat compilation process <font color="#3366FF"><n></font> times (perf analysis).</td>
+<td colspan="3">Repeat compilation process <font color="#3366FF"><n></font> times (perf analysis).</td>
 </tr>
 <tr>
 <td valign=top>-inlineJSR</td>
-<td>Inline JSR bytecode (implicit if target >= 1.5).</td>
+<td colspan="3">Inline JSR bytecode (implicit if target >= 1.5).</td>
 </tr>
 <tr>
 <td valign=top>-enableJavadoc</td>
-<td>Consider references inside javadoc.</td>
+<td colspan="3">Consider references inside javadoc.</td>
 </tr>
 <tr>
-<th colspan="2">Helping options</th>
+<th colspan="4">Helping options</th>
 </tr>
 <tr>
 <td>-? -help</td>
-<td valign=top>Display the help message.</td>
+<td valign=top colspan="3">Display the help message.</td>
 </tr>
 <tr>
 <td valign=top>-v -version</td>
-<td>Display the build number of the compiler. This is very useful to report a bug.</td>
+<td colspan="3">Display the build number of the compiler. This is very useful to report a bug.</td>
 </tr>
 <tr>
 <td valign=top>-showversion</td>
-<td>Display the build number of the compiler and continue. This is very useful to report a bug.</td>
+<td colspan="3">Display the build number of the compiler and continue. This is very useful to report a bug.</td>
 </tr>
 </table>
 <h4>Examples</h4>
@@ -723,9 +852,9 @@ Eclipse batch compiler. When you run your ant buildfile:</p>
 <ol>
 <li>outside of Eclipse: the easiest way to set up the ant runtime classpath is to add the <code>ecj.jar</code> file using the <code>-lib</code>
 argument or dumping it inside the <code>ANT_HOME</code> location.</li>
-<li>inside Eclipse using the same JRE than Eclipse: the Eclipse batch compiler is implicitely added to the ant runtime
+<li>inside Eclipse using the same JRE than Eclipse: the Eclipse batch compiler is implicitly added to the ant runtime
 classpath.</li>
-<li>inside Eclipse using the different JRE: the Eclipse batch compiler must be explicitely added to the ant runtime classpath.
+<li>inside Eclipse using the different JRE: the Eclipse batch compiler must be explicitly added to the ant runtime classpath.
 This can be done using the <code>ecj.jar</code> file or using the org.eclipse.jdt.core jar file and the <code>jdtCompilerAdapter.jar</code> file located inside the
 org.eclipse.jdt.core jar file (this jar file needs to be extracted first).</li>
 </ol>
@@ -749,7 +878,7 @@ org.eclipse.jdt.core jar file (this jar file needs to be extracted first).</li>
 	</target>
 </project>
 </font>
-</pre><p>The syntax used for the javac Ant task can be found in the <a href="http://ant.apache.org/manual/CoreTasks/javac.html">
+</pre><p>The syntax used for the javac Ant task can be found in the <a href="http://ant.apache.org/manual/Tasks/javac.html">
  Ant javac task documentation</a>. The current adapter supports the Javac Ant task 1.4.1 up to 1.6.5 versions.</p>
 <p>If you are using a version above 1.5.0, you can use the nested compiler argument element (<code><compilerarg></code>) to specify compiler
 specific options.
@@ -859,13 +988,15 @@ keep the warnings in other locations of the same compilation unit or the same pr
 <li><font color="green">incomplete-switch</font> to suppress warnings relative to missing entries in a switch statement (enum case)</li>
 <li><font color="green">nls</font> to suppress warnings relative to non-nls string literals</li>
 <li><font color="green">null</font> to suppress warnings relative to null analysis</li>
+<li><font color="green">raw</font> to suppress warnings relative to usage of raw types</li>
 <li><font color="green">restriction</font> to suppress warnings relative to usage of discouraged or forbidden references</li>
 <li><font color="green">serial</font> to suppress warnings relative to missing serialVersionUID field for a serializable class</li>
 <li><font color="green">static-access</font> to suppress warnings relative to incorrect static access</li>
+<li><font color="green">super</font> to suppress warnings relative to overriding a method without super invocations</li>
 <li><font color="green">synthetic-access</font> to suppress warnings relative to unoptimized access from inner classes</li>
 <li><font color="green">unchecked</font> to suppress warnings relative to unchecked operations</li>
 <li><font color="green">unqualified-field-access</font> to suppress warnings relative to field access unqualified</li>
-<li><font color="green">unused</font> to suppress warnings relative to unused code</li>
+<li><font color="green">unused</font> to suppress warnings relative to unused code and dead code</li>
 </ul>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_contributing_a_cleanup.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_contributing_a_cleanup.htm
index 8fd682a..2d71f6a 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_contributing_a_cleanup.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_contributing_a_cleanup.htm
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
 <meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
@@ -6,44 +6,45 @@
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
 <title>Contributing a simple clean up and a simple save action using the org.eclipse.jdt.ui.cleanUps extension point</title>
-<link rel="stylesheet" type="text/css" href="../book.css">
 </head>
 <body>
 <h2> Contributing a clean up and a save action using the <b>clean up</b> extension point</h2>
 <p>The <a href="../reference/extension-points/org_eclipse_jdt_ui_cleanUps.html"><b>org.eclipse.jdt.ui.cleanUps</b></a> extension point enables you to contribute your own Java code clean ups and Java editor save actions.
-The clean ups help in resolving the problems for a compilation unit. A save action is a special clean up which also resolves problems by doing the selected actions on save automatically.
+Clean ups help in resolving problems in a compilation unit or establishing a code style. A save action is a special clean up that perform the requested modifications on save automatically.
 </p>
 <h3> Using the extension point</h3>
 <p>To create a new extension for the <a href="../reference/extension-points/org_eclipse_jdt_ui_cleanUps.html"><b>org.eclipse.jdt.ui.cleanUps</b></a> extension point
 you need to first provide the required extensions in the plugin.xml. There are 3 extensions that need to be declared as shown below with the example of a clean up
 which updates the copyrights for a file on save: </p>
-<p>
-<pre class="CleanUp"><span class="code SchemaTag">
+
+<pre>
    <extension
-         point=</span><span class="code SchemaCstring">"org.eclipse.jdt.ui.cleanUps"</span><span class="code SchemaTag">>
+         point="org.eclipse.jdt.ui.cleanUps">
       <cleanUp
-            id=</span><span class="code SchemaCstring">"org.eclipse.jdt.copyrightsaveaction.copyright_clean_up"</span><span class="code SchemaTag">
-            class=</span><span class="code SchemaCstring">"org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightUpdaterCleanUp"</span><span class="code SchemaTag">>
+            id="org.eclipse.jdt.copyrightsaveaction.copyright_clean_up"
+            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightUpdaterCleanUp">
       </cleanUp>
       
       <cleanUpOptionsInitializer
-            class=</span><span class="code SchemaCstring">"org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightOnSaveOptionsInitializer"</span><span class="code SchemaTag">
-            cleanUpKind=</span><span class="code SchemaCstring">"saveAction"</span><span class="code SchemaTag">>
+            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightOnSaveOptionsInitializer"
+            cleanUpKind="saveAction">
       </cleanUpOptionsInitializer>
       
       <cleanUpConfigurationUI
-            class=</span><span class="code SchemaCstring">"org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightTabPage"</span><span class="code SchemaTag">
-            name=</span><span class="code SchemaCstring">"%cleanUpConfigurationUI.name"</span><span class="code SchemaTag">
-            cleanUpKind=</span><span class="code SchemaCstring">"saveAction"</span><span class="code SchemaTag">>
+            class="org.eclipse.jdt.ui.internal.copyrightupdater.CopyrightTabPage"
+            name="%cleanUpConfigurationUI.name"
+            cleanUpKind="saveAction">
       </cleanUpConfigurationUI>
    </extension>
-</span></pre>
+</pre>
 
-For a description of the attributes list please refer to the extension point document.
+<p>
+For a description of the individual attributes, please refer to the extension point documentation.
 </p>
-<h3>Contributing  a clean up</h3>
+
+<h3>Contributing a clean up</h3>
 <p>To contribute a clean up, you need to first create the class that implements the <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUp.html"><b>ICleanUp</b></a> Interface. 
-Lets create the <code>CopyrightUpdaterCleanUp</code> class for our example clean up and implement the inherited methods :</p>
+Lets create the <code>CopyrightUpdaterCleanUp</code> class for our example clean up and implement the inherited methods:</p>
 <pre><font color="#4444cc">	public class CopyrightUpdaterCleanUp implements ICleanUp {
 	
 		private CleanUpOptions fOptions;
@@ -53,8 +54,8 @@ Lets create the <code>CopyrightUpdaterCleanUp</code> class for our example clean
 		
 		}</font></pre>
 
-<p>The CleanUpRequirements contain various requirements for the clean up such as an AST or a fresh AST containing changes from other clean ups, compiler options and changed 
-regions, which are used by the <code>CleanUpContext</code> to create the fix. It can be obtained using the method getRequirements() 
+The <code>CleanUpRequirements</code> contain various requirements for the clean up such as an AST or a fresh AST containing changes from other clean ups, compiler options and changed 
+regions, which are used by the <code>CleanUpContext</code> to create the fix. It has to be returned from the method getRequirements(): 
 <pre><font color="#4444cc">		public CleanUpRequirements getRequirements() {
 			boolean changedRegionsRequired= false;
 			Map compilerOptions= null;
@@ -62,7 +63,7 @@ regions, which are used by the <code>CleanUpContext</code> to create the fix. It
 			return new CleanUpRequirements(isUpdateCopyrights, isUpdateCopyrights, changedRegionsRequired, compilerOptions);	    
 		}</font></pre>
 
-A human readable description can be set for each step of the clean up using getStepDescriptions()
+A human readable description should be returned for each step of the clean up that is enabled in the current options:
 <pre><font color="#4444cc">		public String[] getStepDescriptions() {
 			if (fOptions.isEnabled("cleanup.update_copyrights"))//$NON-NLS-1$
 				return new String[] {"Update Copyrights"};//$NON-NLS-1$
@@ -70,14 +71,14 @@ A human readable description can be set for each step of the clean up using getS
 			return null;
 		}</font></pre>
 
-The CleanUpOptions for the given options keys need to be set using the setOptions(...)
+The CleanUpOptions for the supported options keys will be set using setOptions(...):
 <pre><font color="#4444cc">		public void setOptions(CleanUpOptions options) {
 			Assert.isLegal(options != null);
 			Assert.isTrue(fOptions == null);
 			fOptions= options;		
 		}</font></pre>
 
-The clean up pre-conditions and post-conditions should be checked for an OK status using checkPreConditions(...) and checkPostConditions(...)
+The clean up pre-conditions and post-conditions are being checked in checkPreConditions(...) and checkPostConditions(...):
 <pre><font color="#4444cc">		public RefactoringStatus checkPreConditions(IJavaProject project, ICompilationUnit[] compilationUnits, IProgressMonitor monitor) throws CoreException {
 			if (fOptions.isEnabled("cleanup.update_copyrights")) { //$NON-NLS-1$
 				fStatus= new RefactoringStatus();
@@ -97,7 +98,7 @@ The clean up pre-conditions and post-conditions should be checked for an OK stat
 			}
 		}</font></pre>
 
-Finally a <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpFix.html"><b>ICleanUpFix</b></a> is to be created which fixes all the problems for the given context using createFix(...)
+Finally, a <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpFix.html"><b>ICleanUpFix</b></a> is to be created which fixes all the problems for the given context using createFix(...)
 <pre><font color="#4444cc">		public ICleanUpFix createFix(CleanUpContext context) throws CoreException {
 			CompilationUnit compilationUnit= context.getAST();
 			if (compilationUnit == null)
@@ -105,28 +106,27 @@ Finally a <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpFix.html"
 
 			return CopyrightsFix.createCleanUp(compilationUnit, fOptions.isEnabled("cleanup.update_copyrights"));//$NON-NLS-1$
 		}</font></pre> 
-</p>
 
 <h3>Contributing a clean up options provider</h3>
-<p>To create the UI for the clean up , an options provider tab page has to be created by implementing the <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpConfigurationUI.html"><b>ICleanUpConfigurationUI</b></a> interface.
+<p>To create the UI for the clean up, an options provider tab page has to be created by implementing the <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpConfigurationUI.html"><b>ICleanUpConfigurationUI</b></a> interface.
 The page can be created by implementing the createContents(...) method in the <code>CopyrightTabPage</code> class. The preferences page along with the desired groups and options can be 
 created using the method doCreatePreferences().
-Optionally a code snippet of the new clean up with the given options can be shown in the clean up preview tab using the method getPreview(). If the CleanUpOptions get modified in the UI,
- they need to be set again using the method setOptions(...).
+Optionally, a code snippet of the new clean up with the given options can be shown in the clean up preview tab using the method getPreview(). If the CleanUpOptions get modified in the UI,
+ they need to be set again using the method setOptions(...).</p>
 
 <h3> Contributing a clean up options initializer</h3>
 <p>A clean up options initializer, which returns the default options for each clean up kind can be created by implementing the <a href="../reference/api/org/eclipse/jdt/ui/cleanup/ICleanUpOptionsInitializer.html"><b>ICleanUpOptionsInitializer</b></a>.
-The options initializer can either be for a normal code clean up or for a save action.
+The options initializer can either be contributed for a normal code clean up or for a save action.</p>
 <pre><font color="#4444cc">	public class CopyrightOnSaveOptionsInitializer implements ICleanUpOptionsInitializer {
 
 		public CopyrightOnSaveOptionsInitializer() {		
 		}</font></pre>
 
-The default options for this initializer can be set using setDefaultOptions(...)
+<p>The default options for this initializer can be set in setDefaultOptions(...)</p>
 <pre><font color="#4444cc">		public void setDefaultOptions(CleanUpOptions options) {
 			options.setOption("cleanup.update_copyrights", CleanUpOptions.TRUE);
 		}
 	}</font></pre>
-<p> The UI code to configure the options can be found here: <a href="CopyrightTabPage.html"><b>CleanUpTabPage.java</b></a>.
+<p> The UI code to configure the options for this example can be found here: <a href="CopyrightTabPage.html"><b>CleanUpTabPage.java</b></a>.</p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
index 518396d..93947a4 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
@@ -317,7 +317,7 @@ fairly simple to iterate and retrieve the right token. We also recommend that yo
 position of the <i>super</i> keyword in a 
 <b><a href="../reference/api/org/eclipse/jdt/core/dom/SuperMethodInvocation.html">SuperMethodInvocation</a></b>.</p>
 
-<h4>Source code modifcations</h4>
+<h4>Source code modifications</h4>
 
 <P>
 Some source code modifications are not provided via the Java element API.
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_options.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_options.htm
index 4ea4517..5c6ab59 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_options.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_options.htm
@@ -380,7 +380,7 @@ DOM AST Javadoc node will be only a flat text instead of having structured tag e
 </tr>
 <tr valign="top">
 <td rowspan=3>When enabled, the compiler will issue an error or a warning when 
-  a case may be entered by falling through a preceeding, non empty case.</td>
+  a case may be entered by falling through a preceding, non empty case.</td>
 <td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ERROR">ERROR</a></b></td>
 </tr>
 <tr valign="top">
@@ -802,7 +802,20 @@ When enabling this option, the compiler will issue an error or a warning for hid
 </tr>
 <tr valign="top">
 <td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#IGNORE"><i>IGNORE</i></a></b></td>
-</tr>							  
+</tr>
+
+<tr>
+<td colspan=2><b>Reporting Missing <code>@Override</code> Annotation For Interface Method Implementation</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION">COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>When enabled, the compiler will issue an error or a warning whenever encountering a method declaration which overrides or implements a superinterface method but has no <code>@Override</code> annotation.
+<br>This option only has an effect if the compiler compliance is 1.6 or greater.
+<br>The severity of the problem is controlled with option <b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_MISSING_OVERRIDE_ANNOTATION">COMPILER_PB_MISSING_OVERRIDE_ANNOTATION</a></b>.</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ENABLED"><i>ENABLED</i></a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#DISABLED">DISABLED</a></b></td>							  
+</tr>
 
 <tr>
 <td colspan=2><b>Reporting Missing Declaration of serialVersionUID Field on Serializable Class</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_MISSING_SERIAL_VERSION">COMPILER_PB_MISSING_SERIAL_VERSION</a></b>)</td>
@@ -1024,6 +1037,19 @@ When enabling this option, the compiler will issue an error or a warning for hid
 </tr>
 
 <tr>
+<td colspan=2><b>Further Determining the Effect of <code>@SuppressWarnings</code> if also COMPILER_PB_SUPPRESS_WARNINGS is enabled.</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS">COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>When enabled, the <code>@SuppressWarnings</code> annotation can additionally be used to suppress optional compiler diagnostics that have been configured as ERROR. 
+<br>When disabled, all <code>@SuppressWarnings</code> annotations only affects warnings. 
+</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ENABLED">ENABLED</a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#DISABLED"><i>DISABLED</i></a></b></td>
+</tr>
+
+<tr>
 <td colspan=2><b>Determining Effect of @SuppressWarnings</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_SUPPRESS_WARNINGS">COMPILER_PB_SUPPRESS_WARNINGS</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -1351,6 +1377,20 @@ invalidates type safety since involving raw types (e.g. invoking #foo(X<Strin
 </tr>
 
 <tr>
+<td colspan=2><b>Reporting Allocation of an Unused Object</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_UNUSED_OBJECT_ALLOCATION">COMPILER_PB_UNUSED_OBJECT_ALLOCATION</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=3>When enabled, the compiler will issue an error or a warning if an object is allocated but never used, neither by holding a reference nor by invoking one of the object's methods.</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ERROR">ERROR</a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#WARNING">WARNING</a></b></td>
+</tr>
+<tr valign="top">
+<td><b><i><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#IGNORE">IGNORE</a></i></b></td>
+</tr>
+
+<tr>
 <td colspan=2><b>Reporting Unused Parameter</b> (<b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_UNUSED_PARAMETER">COMPILER_PB_UNUSED_PARAMETER</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -1673,7 +1713,7 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <tr valign="top">
 <td rowspan=1>Specify filters to control the resource copy process. (<name> is a file name pattern (only * wild-cards allowed) or the name of a folder which ends with '/';
   any resource which name matches one or more of these patterns is <em>not</em>
-  copied to the ouput folder.)</td>
+  copied to the output folder.)</td>
 <td>{<name>[,<name>]*}.<br><b><i>Default value is ""</i></b></td>
 </tr>
 
@@ -1811,6 +1851,17 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td>createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)</td>
 </tr>
 <tr>
+<td colspan=2><b>Option for alignment of arguments in annotation</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION">FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION</a></b>)</td>
+</tr>
+<tr valign="top">
+<td>Possible value</td>
+<td>values returned by <code>createAlignmentValue(boolean, int, int)</code> call</td>
+</tr>
+<tr valign="top">
+<td>Default value</td>
+<td>createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)</td>
+</tr>
+<tr>
 <td colspan=2><b>Option for alignment of arguments in explicit constructor call</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL">FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_EXPLICIT_CONSTRUCTOR_CALL</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -1910,6 +1961,17 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td>createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)</td>
 </tr>
 <tr>
+<td colspan=2><b>Option for alignment of method declaration</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION">FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION</a></b>)</td>
+</tr>
+<tr valign="top">
+<td>Possible value</td>
+<td>values returned by <code>createAlignmentValue(boolean, int, int)</code> call</td>
+</tr>
+<tr valign="top">
+<td>Default value</td>
+<td>createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)</td>
+</tr>
+<tr>
 <td colspan=2><b>Option for alignment of multiple fields</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS">FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -2367,6 +2429,16 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td>
 </tr>
 <tr>
+<td colspan=2><b>Option to format line comments that start on the first column</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN">FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE"><i>TRUE</i></a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td>
+</tr>
+<tr>
 <td colspan=2><b>Option to control whether the header comment of a Java source file is formatted</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_COMMENT_FORMAT_HEADER">FORMATTER_COMMENT_FORMAT_HEADER</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -2448,6 +2520,26 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td>"80"</td>
 </tr>
 <tr>
+<td colspan=2><b>Option to control whether block comments will have new lines at boundaries</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES">FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE"><i>TRUE</i></a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td>
+</tr>
+<tr>
+<td colspan=2><b>Option to control whether javadoc comments will have new lines at boundaries</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES">FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE"><i>TRUE</i></a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td>
+</tr>
+<tr>
 <td colspan=2><b>Option to compact else/if</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_COMPACT_ELSE_IF">FORMATTER_COMPACT_ELSE_IF</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -2480,6 +2572,38 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td>"2"</td>
 </tr>
 <tr>
+<td colspan=2><b>Option to use the disabling and enabling tags</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_USE_ON_OFF_TAGS">FORMATTER_USE_ON_OFF_TAGS</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE">TRUE</a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE"><i>FALSE</i></a></b></td>
+</tr>
+<tr>
+<td colspan=2><b>Option to define the tag to put in a comment to disable the formatting</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_DISABLING_TAG">FORMATTER_DISABLING_TAG</a></b>)</td>
+</tr>
+<tr valign="top">
+<td>Possible values</td>
+<td>String</td>
+</tr>
+<tr valign="top">
+<td>Default value</td>
+<td>"@format:off"</td>
+</tr>
+<tr>
+<td colspan=2><b>Option to define the tag to put in a comment to re-enable the formatting after it has been disabled</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ENABLING_TAG">FORMATTER_ENABLING_TAG</a></b>)</td>
+</tr>
+<tr valign="top">
+<td>Possible values</td>
+<td>String</td>
+</tr>
+<tr valign="top">
+<td>Default value</td>
+<td>"@format:on"</td>
+</tr>
+<tr>
 <td colspan=2><b>Option to indent body declarations compare to its enclosing annotation declaration header</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ANNOTATION_DECLARATION_HEADER">FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ANNOTATION_DECLARATION_HEADER</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -2621,6 +2745,16 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT">DO_NOT_INSERT</a></b></td>
 </tr>
 <tr>
+<td colspan=2><b>Option to insert a new line after a label</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_NEW_LINE_AFTER_LABEL">FORMATTER_INSERT_NEW_LINE_AFTER_LABEL</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT">INSERT</a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td>
+</tr>
+<tr>
 <td colspan=2><b>Option to insert a new line after the opening brace in an array initializer</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER">FORMATTER_INSERT_NEW_LINE_AFTER_OPENING_BRACE_IN_ARRAY_INITIALIZER</a></b>)</td>
 </tr>
 <tr valign="top">
@@ -4313,7 +4447,7 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE"><i>FALSE</i></a></b></td>
 </tr>
 <tr>
-<td colspan=2><b>Option to keep empty array initializer one one line</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE">FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE</a></b>)</td>
+<td colspan=2><b>Option to keep empty array initializer one line</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE">FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE</a></b>)</td>
 </tr>
 <tr valign="top">
 <td rowspan=2>Possible values</td>
@@ -4438,7 +4572,18 @@ in a <a HREF="#compatibility"><b>compatibility table</b></a> below.
 <tr valign="top">
 <td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE"><i>FALSE</i></a></b></td>
 </tr>
-<tr><td colspan=2><b>Option to wrap before the binary operator</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_WRAP_BEFORE_BINARY_OPERATOR">FORMATTER_WRAP_BEFORE_BINARY_OPERATOR</a></b>)</td>
+<tr>
+<td colspan=2><b>Option to wrap before the binary operator</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_WRAP_BEFORE_BINARY_OPERATOR">FORMATTER_WRAP_BEFORE_BINARY_OPERATOR</a></b>)</td>
+</tr>
+<tr valign="top">
+<td rowspan=2>Possible values</td>
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE"><i>TRUE</i></a></b></td>
+</tr>
+<tr valign="top">
+<td><b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td>
+</tr>
+<tr>
+<td colspan=2><b>Option to wrap outer expressions in nested expressions</b> (<b><a href="../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED">FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED</a></b>)</td>
 </tr>
 <tr valign="top">
 <td rowspan=2>Possible values</td>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_wizards.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_wizards.htm
index 8cd4a1f..36cb5b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_wizards.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_api_wizards.htm
@@ -44,7 +44,7 @@ intended to be subclassed. </p>
   </li>    
   <li> 
     <a href="../reference/api/org/eclipse/jdt/ui/wizards/NewAnnotationWizardPage.html"><b>NewAnnotationWizardPage</b></a>
-    allows users to define a new Java annotations.Clients can instantiate and configure the wizard page. To implement your own type wizard
+    allows users to define a new Java annotations. Clients can instantiate and configure the wizard page. To implement your own type wizard
     subclass <a href="../reference/api/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.html"><b>NewTypeWizardPage</b></a>.
     To simply open the original 'New Java Annotation wizard' use the <a href="../reference/api/org/eclipse/jdt/ui/actions/OpenNewAnnotationWizardAction.html"><b>OpenNewAnnotationWizardAction</b></a>.
     </li>    
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_int_core.htm b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_int_core.htm
index 79d04f9..7cad0c3 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_int_core.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/guide/jdt_int_core.htm
@@ -42,7 +42,7 @@ Java IDE infrastructure.  The JDT Core packages include:</p>
   </li>
   <li><a href="../reference/api/org/eclipse/jdt/core/jdom/package-summary.html"><b> 
     org.eclipse.jdt.core.jdom</b></a> - supports a Java Document Object Model (DOM) 
-    that can be used for walking the structure of a Java compilation unit.
+    that can be used for walking the structure of a Java compilation unit. All types within this package are deprecated.
   </li>
   <li><b><a href="../reference/api/org/eclipse/jdt/core/search/package-summary.html"> 
     org.eclipse.jdt.core.search</a></b> - supports searching the workspace's Java
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
index fc65b33..9b51010 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
@@ -15,28 +15,32 @@
 ;../org.eclipse.jdt.debug/eval
 ;../org.eclipse.jdt.debug.ui/ui
 ;../org.eclipse.jdt.junit/src
+;../org.eclipse.jdt.junit.core/src
 ;../org.eclipse.jdt.junit.runtime/src
 ;../org.eclipse.jdt.launching/launching
 ;../org.eclipse.jdt.ui/ui
 ;../org.eclipse.jdt.ui/core refactoring
 ;../org.eclipse.jdt.ui/ui refactoring
 ;../org.eclipse.jdt.ui/core extension
+;../org.eclipse.jdt.ui/internal compatibility
 ;../org.eclipse.jdt.core.manipulation/refactoring
 ;../org.eclipse.jdt.core.manipulation/common
+;../org.eclipse.ant.launching/src
 ;../org.eclipse.ant.ui/Ant Tools Support
 ;../org.eclipse.ant.ui/Ant Editor
 ;../org.eclipse.jdt.apt.core/src"
 -d reference/api
 -classpath @rt@
-;../com.ibm.icu_4.0.1.v20090822.jar
+;../com.ibm.icu_4.2.1.v20100412.jar
 ;../org.eclipse.jdt.apt.core/mirrorapi.jar
-;../org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar
+;../org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar
 ;../org.eclipse.ant.core/@dot
 ;../org.eclipse.compare/@dot
 ;../org.eclipse.compare.core/@dot
 ;../org.eclipse.core.commands/@dot
 ;../org.eclipse.core.contenttype/@dot
 ;../org.eclipse.core.expressions/@dot
+;../org.eclipse.core.externaltools/@dot
 ;../org.eclipse.core.filebuffers/@dot
 ;../org.eclipse.core.filesystem/@dot
 ;../org.eclipse.core.jobs/@dot
@@ -58,6 +62,7 @@
 ;../org.eclipse.jdt.core.manipulation/@dot
 ;../org.eclipse.jdt.debug/jdi.jar
 ;../org.eclipse.jdt.junit/@dot
+;../org.eclipse.jdt.junit.core/@dot
 ;../org.eclipse.jface/@dot
 ;../org.eclipse.jface.text/@dot
 ;../org.eclipse.ltk.core.refactoring/@dot
@@ -86,21 +91,23 @@
 -splitIndex
 -windowtitle "Eclipse JDT API Specification"
 -doctitle "Eclipse JDT API Specification"
--header "<b>Eclipse JDT</b><br>Release 3.5"
--bottom "Copyright (c) IBM Corp. and others 2000, 2008.  All Rights Reserved."
+-header "<b>Eclipse JDT</b><br>Release 3.6"
+-bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using Eclipse APIs</a>.</p><p>Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.</p></font>'
 -group "Java development tools core plug-in packages" "org.eclipse.jdt.core
 ;org.eclipse.jdt.core.*"
 -group "Java development tools UI plug-in packages" "org.eclipse.jdt.ui
 ;org.eclipse.jdt.ui.*"
--link http://java.sun.com/j2se/1.5/docs/api
+-link http://download.oracle.com/javase/6/docs/api
 -linkoffline ./../../../org.eclipse.platform.doc.isv/reference/api ../org.eclipse.platform.doc.isv/reference/api
 -link http://bundles.osgi.org/javadoc/r4
--tag 'category:X'
 -tag 'noimplement:a:Restriction:'
 -tag 'noextend:a:Restriction:'
 -tag 'noreference:a:Restriction:'
 -tag 'noinstantiate:a:Restriction:'
 -tag 'nooverride:a:Restriction:'
+-tag 'category:a:Category:'
+
+org.eclipse.ant.launching
 org.eclipse.ant.ui.launching
 org.eclipse.jdt.core
 org.eclipse.jdt.core.compiler
@@ -118,6 +125,7 @@ org.eclipse.jdt.core.util
 org.eclipse.jdt.debug.core
 org.eclipse.jdt.debug.eval
 org.eclipse.jdt.debug.ui
+org.eclipse.jdt.debug.ui.breakpoints
 org.eclipse.jdt.debug.ui.launchConfigurations
 org.eclipse.jdt.launching
 org.eclipse.jdt.launching.environments
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt
index b787f38..95df4fb 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt
@@ -15,25 +15,29 @@
 ;../org.eclipse.jdt.debug/eval
 ;../org.eclipse.jdt.debug.ui/ui
 ;../org.eclipse.jdt.junit/src
+;../org.eclipse.jdt.junit.core/src
 ;../org.eclipse.jdt.junit.runtime/src
 ;../org.eclipse.jdt.launching/launching
 ;../org.eclipse.jdt.ui/ui
 ;../org.eclipse.jdt.ui/core refactoring
 ;../org.eclipse.jdt.ui/ui refactoring
 ;../org.eclipse.jdt.ui/core extension
+;../org.eclipse.jdt.ui/internal compatibility
 ;../org.eclipse.jdt.core.manipulation/refactoring
 ;../org.eclipse.jdt.core.manipulation/common
 ;../org.eclipse.jdt.apt.core/src"
 -d reference/apt
 -classpath ${bootclasspath}
-;../com.ibm.icu_4.0.1.v20090822.jar
+;../com.ibm.icu_4.2.1.v20100412.jar
 ;../org.eclipse.jdt.apt.core/mirrorapi.jar
-;../org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar
+;../org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar
+;../org.eclipse.ant.core/@dot
 ;../org.eclipse.compare/@dot
 ;../org.eclipse.compare.core/@dot
 ;../org.eclipse.core.commands/@dot
 ;../org.eclipse.core.contenttype/@dot
 ;../org.eclipse.core.expressions/@dot
+;../org.eclipse.core.externaltools/@dot
 ;../org.eclipse.core.filebuffers/@dot
 ;../org.eclipse.core.filesystem/@dot
 ;../org.eclipse.core.jobs/@dot
@@ -56,6 +60,7 @@
 ;../org.eclipse.jdt.core.manipulation/@dot
 ;../org.eclipse.jdt.debug/jdi.jar
 ;../org.eclipse.jdt.junit/@dot
+;../org.eclipse.jdt.junit.core/@dot
 ;../org.eclipse.jface/@dot
 ;../org.eclipse.jface.text/@dot
 ;../org.eclipse.ltk.core.refactoring/@dot
@@ -71,30 +76,32 @@
 ;../org.eclipse.ui/@dot
 ;../org.eclipse.ui.console/@dot
 ;../org.eclipse.ui.editors/@dot
+;../org.eclipse.ui.externaltools/@dot
 ;../org.eclipse.ui.forms/@dot
 ;../org.eclipse.ui.ide/@dot
 ;../org.eclipse.ui.navigator/@dot
 ;../org.eclipse.ui.views/@dot
 ;../org.eclipse.ui.workbench.texteditor/@dot
 ;../org.eclipse.ui.workbench/@dot
+;../org.junit/junit.jar
 -breakiterator
 -use
 -splitIndex
--tag 'noimplement:a:Restriction:'
--tag 'noextend:a:Restriction:'
--tag 'noreference:a:Restriction:'
--tag 'noinstantiate:a:Restriction:'
--tag 'nooverride:a:Restriction:'
 -windowtitle "Eclipse JDT API Specification"
 -doctitle "Eclipse JDT API Specification"
--header "<b>Eclipse JDT</b><br>Release 3.5"
--bottom "Copyright (c) IBM Corp. and others 2000, 2008.  All Rights Reserved."
+-header "<b>Eclipse JDT</b><br>Release 3.6"
+-bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using Eclipse APIs</a>.</p><p>Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.</p></font>'
 -group "Java development tools APT plug-in packages" "org.eclipse.jdt.apt.core
 ;org.eclipse.jdt.apt.core.*"
--link http://java.sun.com/j2se/1.5/docs/api
+-link http://download.oracle.com/javase/6/docs/api
 -linkoffline ./../../../org.eclipse.platform.doc.isv/reference/api ../org.eclipse.platform.doc.isv/reference/api
 -linkoffline ./../../../org.eclipse.jdt.doc.isv/reference/api ./reference/api
 -link http://bundles.osgi.org/javadoc/r4
+-tag 'noimplement:a:Restriction:'
+-tag 'noextend:a:Restriction:'
+-tag 'noreference:a:Restriction:'
+-tag 'noinstantiate:a:Restriction:'
+-tag 'nooverride:a:Restriction:'
 
 org.eclipse.jdt.apt.core.build
 org.eclipse.jdt.apt.core.env
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/notices.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/notices.html
index b2201a7..33aa981 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/notices.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/notices.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -13,7 +13,7 @@
 <h3>
 <a NAME="Notices"></a>Notices</h3>
 <p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2009.
+The material in this guide is Copyright (c) IBM Corporation and others 2000, 2010.
 </p>
 <p>
 <a href="about.html">Terms and conditions regarding the use of this guide.</a>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/plugin.xml b/eclipse/plugins/org.eclipse.jdt.doc.isv/plugin.xml
index 222df0f..3c90aa5 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/plugin.xml
@@ -34,6 +34,8 @@
 <!-- ============================================================================= -->
    <extension point="org.eclipse.pde.core.javadoc">
        <javadoc path="reference/api">
+           <plugin id="org.eclipse.ant.launching"/>
+           <plugin id="org.eclipse.ant.ui"/>
            <plugin id="org.eclipse.jdt.core"/>
            <plugin id="org.eclipse.jdt.core.manipulation"/>
            <plugin id="org.eclipse.jdt.debug"/>
@@ -43,6 +45,7 @@
            <plugin id="org.eclipse.jdt.apt.ui"/>
            <plugin id="org.eclipse.jdt.apt.core"/>
            <plugin id="org.eclipse.jdt.junit"/>
+           <plugin id="org.eclipse.jdt.junit.core"/>
        </javadoc>
    </extension>
    
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.2/recommended.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.2/recommended.html
index c6e9ca5..19bae6c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.2/recommended.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.2/recommended.html
@@ -23,11 +23,11 @@
 </ol>
 
 <h2><a name="compilationParticipant">Compilation participant extension point</a></h2>
-	<p>A new extension point (<code>org.eclipse.jdt.core.compilationParticipant</code>) allows plugins that are dependent on
+	<p>A new extension point (<code>org.eclipse.jdt.core.compilationParticipant</code>) allows plug-ins that are dependent on
 	<code>org.eclipse.jdt.core</code> to participate in the Java build process, as well as in the reconciling of Java editors.</p>
 	<p>By implementing <code>org.eclipse.jdt.core.compiler.CompilationParticipant</code> and extending this extension
 	point, one can be notified when a build is starting, when a clean is starting, or when a working copy (in a Java editor) is being
-	reconciled. During these notifcations, types can be added, changed or removed, build markers can be created, or errors
+	reconciled. During these notifications, types can be added, changed or removed, build markers can be created, or errors
 	can be reported to the Java editor.</p>
   
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/faq.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/faq.html
index 5729119..6cbaf9d 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/faq.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/faq.html
@@ -69,7 +69,7 @@ How to re-write the code depends on the fact that given problem requestor was nu
 	<li><strong>Problem requestor was not null</strong>
 	<p>
 	In this case, client must ensure that the working copy owner requestor is the same than
-	the one given as parameter to the deprecated method. The simplest way to to this is to make
+	the one given as parameter to the deprecated method. The simplest way to this is to make
 	the working copy owner returning this requestor.
 	</p><p>
 	So, following snippet warned for calls to deprecated methods...:</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/recommended.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/recommended.html
index 501430d..64de020 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/recommended.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.3/recommended.html
@@ -74,7 +74,7 @@ How to re-write the code depends on the fact that given problem requestor was nu
 	<li><strong>Problem requestor was not null</strong>
 	<p>
 	In this case, client must ensure that the working copy owner requestor is the same than
-	the one given as parameter to the deprecated method. The simplest way to to this is to make
+	the one given as parameter to the deprecated method. The simplest way to this is to make
 	the working copy owner returning this requestor.
 	</p><p>
 	So, following snippet warned for calls to deprecated methods...:</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/faq.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/faq.html
new file mode 100644
index 0000000..6194a2a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/faq.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Eclipse 3.6 Plug-in Migration FAQ</title>
+</head>
+
+<body>
+
+<h1>Eclipse 3.6 Plug-in Migration FAQ</h1>
+
+<ol>
+	<li>None</li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+<!-- <h2><a name="item1">Item 1</a></h2>
+<p>
+</p>
+-->
+
+<!-- ############################################## -->
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/incompatibilities.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/incompatibilities.html
new file mode 100644
index 0000000..3d555dd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/incompatibilities.html
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Incompatibilities between Eclipse 3.5 and 3.6</title>
+</head>
+<body>
+<h1>Incompatibilities between Eclipse 3.5 and 3.6</h1>
+
+<p>
+  Eclipse changed in incompatible ways between 3.5 and 3.6 in ways that affect 
+  plug-ins. The following entries describe the areas that changed and provide 
+  instructions for migrating 3.5 plug-ins to 3.6. Note that you only need to look 
+  here if you are experiencing problems compiling or running your 3.5 plug-in on 3.6.
+</p>
+
+<ol>
+  <li><a href="#JUnit4">SDK ships 2 org.junit plug-ins (versions 3.8.2 and 4.8.1)</a></li>
+  <li><a href="#AbstractTemplatesPage">Source incompatibility for subclasses of <code>AbstractTemplatesPage</code></a></li>
+  <li><a href="#SuppressWarningRawTypes"><code>@SuppressWarnings("unchecked")</code> does not ignore raw types warnings anymore</a></li>
+  <li><a href="#ReferencedLibraries">Classpath containers have the choice to resolve the referenced libraries themselves</a></li>  
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+<h2>1. <a name="JUnit4">SDK ships 2 org.junit plug-ins (versions 3.8.2 and 4.8.1)</a></h2>
+<p><strong>What is affected:</strong> Clients that require the org.junit and don't include 4.x in their version bounds</p>
+<p><strong>Description:</strong>
+The SDK now ships 2 org.junit plug-ins (versions 3.8.2 and 4.8.1). Clients that want to run JUnit Plug-in Tests with a Java 5 or later VM
+and that require org.junit with a version bound that does not include 4.x need to update their version bound to include 4.x
+(e.g. change their <code>Require-Bundle:</code> header to <code>org.junit;bundle-version="3.8.2"</code>).
+If they don't update their bounds, both versions of org.junit are resolved at run time, which leads to errors when test classes are loaded.</p>
+<p>For complete details on the steps required to transition to using JUnit4 or to continue using JUnit3, please see:<br>
+<a href="http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes">http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes</a>.</p>
+<p><strong>Action required:</strong> Clients that require org.junit should make sure they
+include 4.x in their required version bounds.</p>
+
+<!-- ############################################## -->
+
+<h2>2. <a name="AbstractTemplatesPage">Source incompatibility for subclasses of <code>AbstractTemplatesPage</code></a></h2>
+<p><strong>What is affected:</strong> Subclasses of <code>org.eclipse.ui.texteditor.templates.AbstractTemplatesPage</code>.</p>
+<p><strong>Description:</strong> In order to provide new API we had to make two methods public. While this <em>does not break binary compatibility</em> it breaks source compatibility.</p>
+<p><strong>Action required:</strong> Change the visibility of <code>getSelectedTemplates()</code> and <code>getTemplateStore()</code> to <code>public</code>.</p>
+
+<!-- ############################################## -->
+
+<h2>3. <a name="SuppressWarningRawTypes"><code>@SuppressWarnings("unchecked")</code> does not ignore raw types warnings anymore</a></h2>
+<p><strong>What is affected:</strong> Usage of <code>@SuppressWarnings("unchecked")</code>.</p>
+<p><strong>Description:</strong> Up to Eclipse 3.5, <code>@SuppressWarnings("unchecked")</code> was used to suppress the unchecked and raw types warnings.
+This was not consistent with other compilers (e.g. javac). A new warning token <code>"rawtypes"</code> has been added to cover the case of raw type warnings
+exclusively. So in order to get rid of all warnings, in Eclipse 3.6, it might be required to add <code>"rawtypes"</code> in the warning token list.</p>
+<p>If it is not possible to update the code, a system property (<code>-DsuppressRawWhenUnchecked=true</code>) can be added to the <code>-vmargs</code> list on startup.
+This preserves the old behavior. The projects need to be manually cleaned and rebuilt after toggling the property.</p>
+<p><strong>Action required:</strong> When new warnings that were previously ignored are now reported, add <code>"rawtypes"</code> to the list of warning tokens.
+</p>Before:
+<pre>
+ at SuppressWarnings("unchecked")
+    void bar(List list) {
+        List<String> ls2 = list;
+    }
+ at SuppressWarnings("unchecked")
+private List l;
+</pre>
+After:
+<pre>
+ at SuppressWarnings(<b>{</b>"unchecked", "rawtypes"<b>}</b>)
+    void bar(List list) {
+        List<String> ls2 = list;
+    }
+ at SuppressWarnings("rawtypes")
+private List l;
+</pre>
+<!-- ############################################## -->
+<h2>4. <a name="ReferencedLibraries">Classpath containers have the choice to resolve the referenced libraries themselves</a></h2>
+<p><strong>What is affected:</strong> Classpath containers that depended on JDT to resolve referenced libraries via JAR's MANIFEST.MF.</p>
+<p><strong>Description:</strong> 
+In 3.5, classpath containers did not have full control over what JARs ended up on the classpath, since references in the Class-Path section 
+of a JAR's MANIFEST.MF were automatically added. In 3.6, referenced JARs are not automatically added any more. However, a classpath container 
+implementor can use <code>JavaCore#getReferencedClasspathEntries()</code> to resolve the referenced JARs and return them in the implementation of 
+<code>IClasspathContainer#getClasspathEntries()</code>.</p>
+<p>Please refer to the documentation of these APIs:</p>
+<ul>
+<li><code>IClasspathContainer</code></li>
+<li><code>JavaCore#getReferencedClasspathEntries()</code></li>
+</ul>
+<p><strong>Action required:</strong> 
+If the classpath container implementation cannot be changed to accommodate this, the 3.5 behavior can be retained by adding a system property (<code>-DresolveReferencedLibrariesForContainers=true</code>) to the <code>-vmargs</code>
+list on start-up.</p> 
+
+<!-- ############################################## -->
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/recommended.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/recommended.html
new file mode 100644
index 0000000..2976096
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/3.6/recommended.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Adopting 3.6 mechanisms and APIs</title>
+</head>
+
+<body>
+
+<h1>Adopting 3.6 mechanisms and APIs</h1>
+<p>
+  This section describes changes that are required if you are trying to change 
+  your 3.5 plug-in to adopt the 3.6 mechanisms and APIs.
+</p>
+
+<ol>
+	<li>None</li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+<!-- <h2>1. <a name="item1">Item 1</a></h2>
+<p>
+</p>
+-->
+
+<!-- ############################################## -->
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/eclipse_3_6_porting_guide.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/eclipse_3_6_porting_guide.html
new file mode 100644
index 0000000..432896b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/porting/eclipse_3_6_porting_guide.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+
+<head>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<title>Eclipse JDT 3.6 Plug-in Migration Guide</title>
+</head>
+
+<body>
+
+<h1>Eclipse JDT 3.6 Plug-in Migration Guide</h1>
+<p>This guide covers migrating Eclipse JDT 3.5 plug-ins to Eclipse JDT 3.6.</p>
+<p>One of the goals of Eclipse 3.6 was to move Eclipse forward while remaining compatible 
+  with previous versions to the greatest extent possible. That is, plug-ins written 
+  against the Eclipse 3.5 APIs should continue to work in 3.6 in spite of the 
+  API changes.</p>
+<p>The key kinds of compatibility are API contract compatibility and binary compatibility. 
+  API contract compatibility means that valid use of 3.5 APIs remains valid for 
+  3.6, so there is no need to revisit working code. Binary compatibility means 
+  that the API method signatures, etc. did not change in ways that would cause 
+  existing compiled ("binary") code to no longer link and run with the 
+  new 3.6 libraries.</p>
+<p>While every effort was made to avoid breakage, there are a few areas of incompatibility or new
+  APIs that should be adopted by clients. 
+  This document describes those areas and provides instructions for migrating 3.5 plug-ins to 
+  3.6.</p>
+<ul>
+  <li><a href="3.6/faq.html">Eclipse JDT 3.6 Plug-in Migration FAQ</a></li>
+  <li><a href="3.6/incompatibilities.html">Incompatibilities between Eclipse JDT 3.5 and 3.6</a></li>
+  <li><a href="3.6/recommended.html">Adopting 3.6 mechanisms and API</a></li>
+</ul>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/api-usage-rules.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/api-usage-rules.html
new file mode 100644
index 0000000..6a83810
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/api-usage-rules.html
@@ -0,0 +1,343 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<link REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+   <title>Eclipse Platform API - Rules of Engagement</title>
+  
+
+</head>
+<body>
+
+<h1>
+Eclipse platform<br>
+API rules of engagement</h1>
+<i><font size=-1>Version 0.15 - Last revised 12:00 May 30, 2001</font></i>
+<p>Here are the rules of engagement for clients of the Eclipse platform
+API (and other components).</p>
+<h2>
+What it means to be API</h2>
+<p>The Eclipse platform defines API elements for use by its clients, namely
+ISVs writing plug-ins. These plug-ins may in turn define API elements for
+their clients, and so on. API elements are the public face: they carry
+a specification about what they are supposed to do, and about how they
+are intended to be used. API elements are supported: the Eclipse platform
+team will fix implementation bugs where there is a deviation from the specified
+behavior. Since there is often a high cost associated with breaking API
+changes, the Eclipse platform team will also try to evolve API elements
+gracefully through successive major releases.</p>
+<h2>
+How to tell API from non-API</h2>
+<p>By their very nature, API elements are documented and have a specification,
+in contrast to non-API elements which are internal implementation details
+usually without published documentation or specifications. So if you cannot
+find the documentation for something, that's usually a good indicator that
+it's not API.</p>
+<p>To try to draw the line more starkly, the code base for the platform
+is separated into API and non-API packages, with all API elements being
+declared in designated API packages.</p>
+<ul>
+<li>
+<b>API package</b> - a Java package that contains at least one API class
+or API interface. The names of API packages are advertised in the documentation
+for that component; where feasible, all other packages containing only
+implementation details have "internal" in the package name. The names of
+API packages may legitimately appear in client code. For the Eclipse platform
+proper, these are:</li>
+
+</ul><ul>
+<li>
+<tt>org.eclipse.foo.*</tt> - for example, <tt>org.eclipse.swt.widgets</tt>,
+<tt>org.eclipse.ui</tt>,
+or <tt>org.eclipse.core.runtime</tt></li>
+
+<li>
+<tt>org.eclipse.foo.internal.*</tt> - not API; internal implementation
+packages</li>
+
+<li>
+<tt>org.eclipse.foo.examples.*</tt> - not API; these are examples</li>
+
+<li>
+<tt>org.eclipse.foo.tests.*</tt> - not API; these are test suites</li>
+</ul>
+<ul>
+<li>
+<b>API class or interface</b> - a <tt>public</tt> class or interface in
+an API package, or a <tt>public</tt> or <tt>protected</tt> class or interface
+member declared in, or inherited by, some other API class or interface.
+The names of API classes and interfaces may legitimately appear in client
+code.</li>
+
+<li>
+<b>API method or constructor</b> - a <tt>public</tt> or <tt>protected</tt>
+method or constructor either declared in, or inherited by, an API class
+or interface. The names of API methods may legitimately appear in client
+code.</li>
+
+<li>
+<b>API field</b> - a <tt>public</tt> or <tt>protected</tt> field either
+declared in, or inherited by, an API class or interface. The names of API
+fields may legitimately appear in client code.</li>
+</ul>
+Everything else is considered internal implementation detail and off limits
+to all clients. Legitimate client code must never reference the names of
+non-API elements (not even using Java reflection). In some cases, the Java
+language's name accessibility rules are used to disallow illegal references.
+However, there are many cases where this is simply not possible. Observing
+this one simple rule avoids the problem completely:
+<ul>
+<li>
+<b>Stick to officially documented APIs. </b>Only reference packages that
+are documented in the <b><i>published API Javadoc</i></b> for the component.
+Never reference a package belonging to another component that has "internal"
+in its name---these are never API. Never reference a package for which
+there is no published API Javadoc---these are not API either.</li>
+</ul>
+
+<h2>
+General rules</h2>
+The specification of API elements is generated from Javadoc comments in
+the element's Java source code. For some types of elements, the specification
+is in the form of a contract. For example, in the case of methods, the
+contract is between two parties, the caller of the method and the implementor
+of the method. The fundamental ground rule is:
+<ul>
+<li>
+<b>Honor all contracts.</b> The contracts are described in the published
+Javadoc for the API elements you are using.</li>
+</ul>
+The term "must", when used in an API contract, means that it is incumbent
+on the party to ensure that the condition would always be met; any failure
+to do so would be considered a programming error with unspecified (and
+perhaps unpredictable) consequences.
+<ul>
+<li>
+<b>You must honor "must". </b>Pay especially close heed to conditions where
+"must" is used.</li>
+</ul>
+Other common sense rules:
+<ul>
+<li>
+<b>Do not rely on incidental behavior. </b>Incidental behavior is behavior
+observed by experiment or in practice, but which is not guaranteed by any
+API specification.</li>
+
+<li>
+<b>Do not treat null as an object.</b> Null is more the lack of an object.
+Assume everything is non-null unless the API specification says otherwise.</li>
+
+<li>
+<b>Do not try to cheat with Java reflection.</b> Using Java reflection
+to circumvent Java compiler checking buys you nothing more. There are no
+additional API contracts for uses of reflection; reflection simply increases
+the likelihood of relying on unspecified behavior and internal implementation
+detail.</li>
+
+<li>
+<b>Use your own packages. </b>Do not declare code in a package belonging
+to another component. Always declare your own code in your own packages.</li>
+</ul>
+
+<h2>
+Calling public API methods</h2>
+For most clients, the bulk of the Eclipse API takes the form of public
+methods on API interfaces or classes, provided for the client to call when
+appropriate.
+<ul>
+<li>
+<b>Ensure preconditions.</b> Do ensure that an API method's preconditions
+are met before calling the method. Conversely, the caller may safely assume
+that the method's postconditions will have been achieved immediately upon
+return from the call.</li>
+
+<li>
+<b>Null parameters.</b> Do not pass null as a parameter to an API method
+unless the parameter is explicitly documented as allowing null. This is
+perhaps the most frequently made programming error.</li>
+
+<li>
+<b>Restricted callers.</b> Do not call an API method that is documented
+as available only to certain callers unless you're one of them. In some
+situations, methods need to be part of the public API for the benefit of
+a certain class of callers (often internal); calling one of these methods
+at the wrong time has unspecified (and perhaps unpredictable) consequences.</li>
+
+<li>
+<b>Debugging methods.</b> Do not call an API method labeled "for debugging
+purposes only". For example, most <tt>toString()</tt> methods are in this
+category.</li>
+
+<li>
+<b>Parameter capture.</b> Do not pass an array, collection, or other mutable
+object as a parameter to an API method and then modify the object passed
+in. This is just asking for trouble.</li>
+</ul>
+
+<h2>
+Instantiating platform API classes</h2>
+Not all concrete API classes are intended to be instantiated by just anyone.
+API classes have an instantiation contract indicating the terms under which
+instances may be created. The contract may also cover things like residual
+initialization responsibilities (for example, configuring a certain property
+before the instance is fully active) and associated lifecycle responsibilities
+(for example, calling <tt>dispose()</tt> to free up OS resources hung on
+to by the instance). Classes that are designed to be instantiated by clients
+are explicitly flagged in the Javadoc class comment (with words like "Clients
+may instantiate.").
+<ul>
+<li>
+<b>Restricted instantiators.</b> Do not instantiate an API class that is
+documented as available only to certain parties unless you're one of them.
+In some situations, classes need to be part of the public API for the benefit
+of a certain party (often internal); instantiating one of these classes
+incorrectly has unspecified (and perhaps unpredictable) consequences.</li>
+</ul>
+
+<h2>
+Subclassing platform API classes</h2>
+Only a subset of the API classes were designed to be subclassed. API classes
+have a subclass contract indicating the terms under which subclasses may
+be declared. This contract also covers initialization responsibilities
+and lifecycle responsibilities. Classes that are designed to be subclassed
+by clients are explicitly flagged in the Javadoc class comment (with words
+like "Clients may subclass.").
+<ul>
+<li>
+<b>Restricted subclassers.</b> Do not subclass an API class that is not
+intended to be subclassed. Treat these classes as if they had been declared
+final. (These are sometimes referred to as "soft final" classes).</li>
+</ul>
+
+<h2>
+Calling protected API methods</h2>
+Calling inherited protected and public methods from within a subclass is
+generally allowed; however, this often requires more care to correctly
+call than to call public methods from outside the hierarchy.
+<h2>
+Overriding API methods</h2>
+Only a subset of the public and protected API methods were designed to
+be overridden. Each API method has a subclass contract indicating the terms
+under which a subclass may override it. By default, overriding is not permitted.
+It is important to check the subclass contract on the actual method implementation
+being overridden; the terms of subclass contracts are not automatically
+passed along when that method is overridden.
+<ul>
+<li>
+<b>Do not override a public or protected API method unless it is explicitly
+allowed.</b> Unless otherwise indicated, treat all methods as if they had
+been declared final. (These are sometimes known as "soft final" methods).
+If the kind of overriding allowed is:
+
+<ul>
+<li>"<b>implement</b>" - the abstract method declared on the subclass must
+be implemented by a concrete subclass</li>
+<li>"<b>extend</b>" - the method declared on the subclass must invoke the
+method on the superclass (exactly once)</li>
+<li>"<b>re-implement</b>" - the method declared on the subclass must not
+invoke the method on the superclass</li>
+<li>"<b>override</b>" - the method declared on the subclass is free to
+invoke the method on the superclass as it sees fit</li></ul></li>
+
+<li>
+<b>Ensure postconditions. </b>Do ensure that any postconditions specified
+for the API method are met by the implementation upon return.</li>
+
+<li>
+<b>Proactively check preconditions. </b>Do not presume that preconditions
+specified for the API method have necessarily been met upon entry. Although
+the method implementation would be within its rights to not check specified
+preconditions, it is usually a good idea to check preconditions (when feasible
+and reasonably inexpensive) in order to blow the whistle on misbehaving
+callers.</li>
+
+<li>
+<b>Null result. </b>Do not return null as a result from an API method unless
+the result is explicitly documented (on the specifying interface or superclass)
+as allowing null.</li>
+
+<li>
+<b>Return copies. </b>Do not return an irreplaceable array, collection,
+or other mutable object as the result from an API method. Always return
+a copy to avoid trouble from callers that might modify the object.</li>
+</ul>
+
+<h2>
+Implementing platform API interfaces</h2>
+Only a subset of the API interfaces were designed to be implemented by
+clients. API interfaces have a contract indicating the terms under which
+it may be implemented. Interfaces that are designed to be implemented by
+clients are explicitly flagged in the Javadoc class comment (with words
+like "Clients may implement."). A client may declare a subinterface of
+an API interface if and only if they are allowed to implement it.
+<ul>
+<li>
+<b>Restricted implementors.</b> Do not implement an API interface that
+is documented as available only to certain parties unless you're one of
+them. In many situations, interfaces are used to hide internal implementation
+details from view.</li>
+</ul>
+
+<h2>
+Implementing public API methods</h2>
+See "Overriding API methods".
+<h2>
+Accessing fields in API classes and interfaces</h2>
+<p>Clients may read API fields, most of which are final. Certain struct-like
+objects may have non-final public fields, which clients may read and write
+unless otherwise indicated.</p>
+<ul>
+<li>
+<b>Null fields.</b> Do not set an API field to null unless this is explicitly
+allowed.</li>
+</ul>
+
+<h2>
+Casting objects of a known API type</h2>
+<p>
+An object of a known API type may only be cast to a different API type
+(or conditionally cast using instanceof) if this is explicitly allowed
+in the API.
+</p>
+<ul>
+<li>
+<b>Cast and instanceof.</b> Do not use instanceof and cast expressions
+to increase what is known about an object beyond what the API supports.
+Improper use exposes incidental implementation details not guaranteed by
+the API.</li>
+</ul>
+<p>
+And, of course, casting any object to a non-API class or interface is always
+inappropriate.
+</p>
+<h2>
+Not following the rules</h2>
+<p>Whether done knowingly or unwittingly, there are consequences for transgressing
+the rules. It might be easier for all involved if there were API police
+that would bust you for breaking the rules. However, that is not the case.
+For the most part, API conformance operates as an honor system, with each
+client responsible for knowing the rules and adhering to them.</p>
+<p>The contracts on the API elements delimit the behavior that is supported
+and sustained. As the Eclipse platform matures and evolves, it will be
+the API contracts that guide how this evolution happens. Outside of these
+contracts, everything is unsupported and subject to change, without notice,
+and at any time (even mid-release or between different OS platforms). Client
+code that oversteps the above rules might fail on different versions and
+patch levels of the platform; or when run on different underlying OSes;
+or when run with a different mix of co-resident plug-ins; or when run with
+a different workbench perspective; and so on. Indeed, no one is even particularly
+interested in speculating exactly how any particular transgression might
+come back to bite you. To those who choose to ignore the rules, don't say
+that you weren't warned. And don't expect much more than a sympathetic
+"Told you so."</p>
+<p>On the other hand, client plug-in code that lives by the above rules
+should continue to work across different versions and patch levels of the
+platform, across different underlying OSes, and should peacefully co-exist
+with other plug-ins. If everyone plays by the rules, the Eclipse platform
+will provide a stable and supported base on which to build exciting new
+products.</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/overview-jdt.html b/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/overview-jdt.html
index 8722e1c..817a7ef 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/overview-jdt.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/reference/misc/overview-jdt.html
@@ -1,7 +1,7 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta name="Author" content="OTI">
 <title>JDT Overview - Map of JDT Plug-ins</title>
@@ -13,7 +13,7 @@
   environment. </p>
 <p>The Java development tooling itself is divided up into a number of separate 
   plug-ins. The following table shows which API packages are found in which plug-ins as of
-Eclipse 3.5. This table is useful 
+Eclipse 3.6. This table is useful 
   for determining which plug-ins a given plug-in should include as prerequisites. 
 </p>
 <table border="1" width="80%" align="center">
@@ -57,7 +57,8 @@ Eclipse 3.5. This table is useful
   </tr>
   <tr>
     <td><tt>org.eclipse.jdt.junit[.*]</tt></td>
-    <td><tt>org.eclipse.jdt.junit</tt></td>
+    <td><tt>org.eclipse.jdt.junit<br>
+            org.eclipse.jdt.junit.core</tt></td>
   </tr>
   <tr>
     <td><tt>junit.*</tt></td>
@@ -69,6 +70,10 @@ Eclipse 3.5. This table is useful
     <td><tt>org.junit4</tt></td>
   </tr>
   <tr> 
+    <td><tt>org.eclipse.ant.launching</tt></td>
+    <td><tt>org.eclipse.ant.launching</tt></td>
+  </tr>
+  <tr> 
     <td><tt>org.eclipse.ant.ui.launching</tt></td>
     <td><tt>org.eclipse.ant.ui</tt></td>
   </tr>  
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/toc.xml b/eclipse/plugins/org.eclipse.jdt.doc.isv/toc.xml
index 84d5d29..88207e7 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/toc.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/toc.xml
@@ -11,7 +11,7 @@
 	<topic label="Reference">
 		<link toc="topics_Reference.xml" />
 	</topic>
-	<topic label="3.5 Plug-in Migration Guide">
+	<topic label="3.6 Plug-in Migration Guide">
 		<link toc="topics_Porting.xml"/>
 	</topic>
 	<topic label="Questions Index" href="questions/index.html">
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Porting.xml b/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Porting.xml
index 7ce9b5d..e3d6b5c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Porting.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Porting.xml
@@ -4,6 +4,12 @@
 <!-- Define topics for the porting guide index                                     -->
 <!-- ============================================================================= -->
 <toc label="Migration">
+	<topic label="Migrating to Eclipse JDT 3.6 from 3.5">
+		<topic label="Introduction" href="porting/eclipse_3_6_porting_guide.html"/>
+		<topic label="FAQ" href="porting/3.6/faq.html" />
+		<topic label="Incompatibilities" href="porting/3.6/incompatibilities.html" />
+		<topic label="Adopting 3.6 Mechanisms and API" href="porting/3.6/recommended.html" />
+	</topic>
 	<topic label="Migrating to Eclipse JDT 3.5 from 3.4">
 		<topic label="Introduction" href="porting/eclipse_3_5_porting_guide.html"/>
 		<topic label="FAQ" href="porting/3.5/faq.html" />
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Reference.xml b/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Reference.xml
index cfb8824..35a07b5 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Reference.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.isv/topics_Reference.xml
@@ -5,6 +5,7 @@
 <!-- ============================================================================= -->
 <toc label="Reference">
 	<topic label="API Reference" href="reference/api/overview-summary.html">
+	   <topic label="org.eclipse.ant.launching" href="reference/api/org/eclipse/ant/launching/package-summary.html"/>
 	   <topic label="org.eclipse.ant.ui.launching" href="reference/api/org/eclipse/ant/ui/launching/package-summary.html"/>
        <topic label="org.eclipse.jdt.core" href="reference/api/org/eclipse/jdt/core/package-summary.html"/>
        <topic label="org.eclipse.jdt.core.compiler" href="reference/api/org/eclipse/jdt/core/compiler/package-summary.html"/>
@@ -22,6 +23,7 @@
        <topic label="org.eclipse.jdt.debug.core" href="reference/api/org/eclipse/jdt/debug/core/package-summary.html"/>
        <topic label="org.eclipse.jdt.debug.eval" href="reference/api/org/eclipse/jdt/debug/eval/package-summary.html"/>
        <topic label="org.eclipse.jdt.debug.ui" href="reference/api/org/eclipse/jdt/debug/ui/package-summary.html"/>
+       <topic label="org.eclipse.jdt.debug.ui.breakpoints" href="reference/api/org/eclipse/jdt/debug/ui/breakpoints/package-summary.html"/>
        <topic label="org.eclipse.jdt.debug.ui.launchConfigurations" href="reference/api/org/eclipse/jdt/debug/ui/launchConfigurations/package-summary.html"/>
        <topic label="org.eclipse.jdt.launching" href="reference/api/org/eclipse/jdt/launching/package-summary.html"/>
        <topic label="org.eclipse.jdt.launching.environments" href="reference/api/org/eclipse/jdt/launching/environments/package-summary.html"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.doc.user/META-INF/MANIFEST.MF
index a707bd3..67a866e 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.doc.user; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/about.properties b/eclipse/plugins/org.eclipse.jdt.doc.user/about.properties
index 536ead4..e750e07 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/about.properties
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Java development tooling user guide\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright IBM Corp. and others 2000, 2004.  All rights reserved.\n\
+(c) Copyright IBM Corporation and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/jdt
 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-editor.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-editor.htm
index 7e04379..0096ef5 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-editor.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-editor.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
 
@@ -47,7 +47,7 @@
     </p>
 
     <p>The most common way to invoke the Java editor is to open a Java file from the
-    Package explorer using pop-up menus or by clicking the file
+    Package Explorer using pop-up menus or by clicking the file
     (single or double-click depending on the user preferences). You can
     also open the editor by opening Java elements, such as types, methods, or
     fields, from other views.</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-perspective.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-perspective.htm
index 3555b75..b658174 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-perspective.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-perspective.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
 
@@ -21,7 +21,7 @@
     <ul>
       <li><span>Package Explorer</span></li>
 
-      <li><span>Hierarchy</span></li>
+      <li><span>Type Hierarchy</span></li>
 
       <li><span>Outline</span></li>
 
@@ -84,8 +84,8 @@
      <a href="../reference/views/display/ref-display_view.htm">Display view</a><br>
      <a href="../reference/views/expressions/ref-expressions_view.htm">Expressions view</a><br>
      <a href="../reference/views/ref-view-outline.htm">Java outline</a><br>
-     <a href="../reference/views/ref-view-package-explorer.htm">Package explorer view</a><br>
-     <a href="../reference/views/ref-type-hierarchy.htm">Type hierarchy view</a><br>
+     <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer view</a><br>
+     <a href="../reference/views/ref-type-hierarchy.htm">Type Hierarchy view</a><br>
      <a href="../reference/views/variables/ref-variables_view.htm">Variables view</a></p>
 
     
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-decorators.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-decorators.htm
index 765395d..7c61c01 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-decorators.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-decorators.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -39,7 +39,7 @@
 	
     <p><img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
      <a href="../reference/preferences/java/ref-preferences-appearance.htm">Appearance preference page</a><br>
-     <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a></p>
+     <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a></p>
 
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-filtering.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-filtering.htm
index 3d56ccd..7a6bd44 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-filtering.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-filtering.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -63,7 +63,7 @@
 	
     <p><img src="../images/ngrelr.png" alt="Related reference" border="0" ></p>
     <p>
-       <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+       <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-presentation.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-presentation.htm
index 08e2bd1..10a1203 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-presentation.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views-presentation.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -64,7 +64,7 @@
 	<br>
     <p><img src="../images/ngrelr.png" alt="Related reference" border="0" ><br>
      <a href="../reference/preferences/java/ref-preferences-appearance.htm">Java appearance preference page</a><br>
-     <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a><br>
+     <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a><br>
     </p>
 
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views.htm
index 6e29ca9..893e71c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/concepts/concept-java-views.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -23,12 +23,12 @@
 	    <li>source folders and libraries</li>
 	    <li>packages</li>
 	    <li>source and class files</li>
-	    <li>types, methods, fields and initialzers</li>
+	    <li>types, methods, fields and initializers</li>
     </ul>
 
-    <h2>Hierarchy View</h2>
+    <h2>Type Hierarchy View</h2>
 
-    <p>The Hierarchy view allows you to look at the complete hierarchy for a
+    <p>The Type Hierarchy view allows you to look at the complete hierarchy for a
     type, only its subtypes, or only its supertypes. You can also open the hierarchy on a project, source folder or package.</p>
 
     <h2>Projects View</h2>
@@ -81,9 +81,9 @@
      <a href="../reference/views/display/ref-display_view.htm">Display view</a><br>
      <a href="../reference/views/expressions/ref-expressions_view.htm">Expressions view</a><br>
      <a href="../reference/views/ref-view-outline.htm">Java outline</a><br>
-     <a href="../reference/views/ref-view-package-explorer.htm">Package explorer view</a><br>
-     <a href="../reference/views/ref-type-hierarchy.htm">Type hierarchy view</a><br>
-     <a href="../reference/views/ref-call-hierarchy.htm">Call hierarchy view</a><br>
+     <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer view</a><br>
+     <a href="../reference/views/ref-type-hierarchy.htm">Type Hierarchy view</a><br>
+     <a href="../reference/views/ref-call-hierarchy.htm">Call Hierarchy view</a><br>
      <a href="../reference/views/variables/ref-variables_view.htm">Variables view</a><br>
      <a href="../reference/views/ref-viewsandeditors.htm">Views and editors</a><br>
     <br>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT.xml b/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT.xml
index 98c73d8..97026f6 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT.xml
@@ -47,8 +47,8 @@
     </context>
 
     <context id="show_in_hierarchyview_action_context">
-        <description>This command opens the Hierarchy view on the selected element.</description>
-        <topic label="Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
+        <description>This command opens the Type Hierarchy view on the selected element.</description>
+        <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
         <topic label="Navigate actions" href="reference/ref-menu-navigate.htm"/>
     </context>
 
@@ -93,13 +93,13 @@
     </context>
 
     <context id="focus_on_selection_action">
-        <description>This command allows you to select a type visible in the Hierarchy view to become the new focus of the Hierarchy view.</description>
+        <description>This command allows you to select a type visible in the Type Hierarchy view to become the new focus of the Type Hierarchy view.</description>
         <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
         <topic label="Java views" href="concepts/concept-java-views.htm"/>
     </context>
 
     <context id="focus_on_type_action">
-        <description>This command allows you to choose any type and opens it in the Hierarchy view.</description>
+        <description>This command allows you to choose any type and opens it in the Type Hierarchy view.</description>
         <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
         <topic label="Java views" href="concepts/concept-java-views.htm"/>
     </context>
@@ -256,7 +256,7 @@
     </context>
 
     <context id="open_type_in_hierarchy_action">
-        <description>Choose a type and open it in the Hierarchy view and in a Java editor.</description>
+        <description>Choose a type and open it in the Type Hierarchy view and in a Java editor.</description>
         <topic label="Open type dialog" href="reference/ref-dialog-open-type.htm"/>
         <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
     </context>
@@ -450,8 +450,8 @@
         <topic label="Navigate actions" href="reference/ref-menu-navigate.htm"/>
     </context>
 
-    <context id="open_external_javadoc_action">
-        <description>Opens the selected element's Javadoc in the default external HTML browser.</description>
+    <context id="open_attached_javadoc_action">
+        <description>Opens the selected element's Javadoc in a browser.</description>
         <topic label="Navigate actions" href="reference/ref-menu-navigate.htm"/>
         <topic label="Javadoc location" href="reference/ref-dialog-javadoc-location.htm"/>
     </context>
@@ -522,7 +522,7 @@
     </context>
 
     <context id="toggle_orientations_action">
-        <description>Changes the orientation of the panes of the Hierarchy view.</description>
+        <description>Changes the orientation of the panes of the Type Hierarchy view.</description>
         <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
     </context>
 
@@ -547,7 +547,7 @@
     </context>
 
     <context id="open_type_hierarchy_action">
-        <description>Opens the Hierarchy view for the selected element.</description>
+        <description>Opens the Type Hierarchy view for the selected element.</description>
         <topic label="Type Hierarchy view" href="reference/views/ref-type-hierarchy.htm"/>
         <topic label="Navigate actions" href="reference/ref-menu-navigate.htm"/>
     </context>
@@ -814,11 +814,11 @@
         <description>This view displays the workspace's Java projects and lets you explore their contents.</description>
         <topic label="Browsing Java elements" href="gettingStarted/qs-4.htm"/>
         <topic label="Java views" href="concepts/concept-java-views.htm"/>
-        <topic label="Package explorer view" href="reference/views/ref-view-package-explorer.htm"/>
+        <topic label="Package Explorer view" href="reference/views/ref-view-package-explorer.htm"/>
         <topic label="Java element filters dialog" href="reference/ref-dialog-java-element-filters.htm"/>
     </context>
     
-    <context id="type_hierarchy_view_context" title="About Hierarchy view">
+    <context id="type_hierarchy_view_context" title="About Type Hierarchy view">
         <description>This view displays a type's hierarchy.</description>
         <topic label="Viewing the Type Hierarchy" href="gettingStarted/qs-6.htm"/>
         <topic label="Java Views" href="concepts/concept-java-views.htm"/>
@@ -845,7 +845,7 @@
     </context>
     
     <context id="call_hierarchy_view_context" title="About Call Hierarchy view">
-        <description>The Call Hierarchy shows all callers or callees of the given method.</description>
+        <description>This view shows all callers or callees of the given method.</description>
         <topic label="Call Hierarchy view" href="reference/views/ref-call-hierarchy.htm"/>
         <topic label="Java views" href="concepts/concept-java-views.htm"/>
     </context>
@@ -1412,6 +1412,7 @@
     </context>
     <context id="source_attachment_context">
         <description>Allows you to attach a source code archive to a JAR file.</description>
+        <topic label="Attaching Source to JAR Files and Variables" href="reference/ref-properties-source-attachment.htm"/>
         <topic label="Build class path" href="concepts/concept-java-builder.htm"/>
     </context>
 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT_Debugger.xml b/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT_Debugger.xml
index 9c68ac3..10a3ead 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT_Debugger.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/contexts_JDT_Debugger.xml
@@ -2,7 +2,7 @@
 <?NLS TYPE="org.eclipse.help.contexts"?>
 <contexts>
 <!--
-	Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
+	Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
 
 	All JDT Debug contexts, those for org.eclipse.jdt.debug.ui, are located in this file
 	All contexts are grouped by their relation, with all relations grouped alphabetically.
@@ -679,9 +679,17 @@
 		<topic label="Expressions View" href="reference/views/expressions/ref-expressions_view.htm"/>
 		<topic label="Variables View" href="reference/views/variables/ref-variables_view.htm"/>
 		<description>Opens preference pages to configure settings related to variables in the Java debugger.</description>
+	</context>
+	<context  id="instance_count_action_context">
+		<description>Displays the instance count of the currently selected type.</description>
+		<topic label="All Instances" href="reference/views/shared/ref-allinstances.htm"/>
+		<topic label="All References" href="reference/views/shared/ref-allreferences.htm"/>
+		<topic label="Expressions View" href="reference/views/expressions/ref-expressions_view.htm"/>
+		<topic label="Variables View" href="reference/views/variables/ref-variables_view.htm"/>
+		<topic label="Run Menu" href="reference/menus/run/ref-menu-run.htm"/>
 	</context> 
 	<context  id="all_instances_action_context">
-		<description>Displays all of the instances of the currently selected object in the variables view</description>
+		<description>Displays all of the instances of the currently selected type.</description>
 		<topic label="All Instances" href="reference/views/shared/ref-allinstances.htm"/>
 		<topic label="All References" href="reference/views/shared/ref-allreferences.htm"/>
 		<topic label="Expressions View" href="reference/views/expressions/ref-expressions_view.htm"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_package_explorer_open_type_hierarchy.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_package_explorer_open_type_hierarchy.png
index ffcc2e3..77aa2db 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_package_explorer_open_type_hierarchy.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_package_explorer_open_type_hierarchy.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase.png
index 8790a32..8019b04 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_focused.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_focused.png
index 748e646..fd048f4 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_focused.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_focused.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_menu.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_menu.png
index dd1103e..f3e583d 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_menu.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_menu.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_runtest_locked.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_runtest_locked.png
index baeb61c..560ca0a 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_runtest_locked.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_runtest_locked.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_small.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_small.png
index 1d5d1cd..e2c998c 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_small.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_small.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_subtype.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_subtype.png
index 444bd09..2b7b6e3 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_subtype.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_subtype.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype.png
index 811d436..3414f40 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype_locked.png b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype_locked.png
index f905ecd..7467508 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype_locked.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/images/view_typehierarchy_testcase_supertype_locked.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-11.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-11.htm
index 8fcfea7..7fe10e9 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-11.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-11.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
@@ -49,7 +49,7 @@ you to find matches inside comments and strings.
 </ol>
 <h2> Searching from a Java view </h2>
 <p> Java searches can also be performed from specific views, including the Outline, 
-  Hierarchy view and the Package Explorer view. </p>
+  Type Hierarchy view and the Package Explorer view. </p>
 <ol>
   <li> In the Package Explorer view, double-click <em>junit.framework.Assert.java</em> 
     to open it in an editor. </li>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-12.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-12.htm
index bdca042..4afcac1 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-12.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-12.htm
@@ -75,7 +75,7 @@
     </p>
   </li>
   <li> By default the currently selected resource or active editor is launched when the run button is hit. If none of these is 
-  launchable the current project will be launched. You can configure this behaviour under
+  launchable the current project will be launched. You can configure this behavior under
   <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.LaunchingPreferencePage)")'>
       <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Goto the Launching preference page">
       <strong>Run/Debug > Launching</strong></a>.
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-3.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-3.htm
index fd2dbb5..676a7be 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-3.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-3.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
@@ -23,7 +23,7 @@
 
 <P>First you need to download the JUnit source code.</P>
 <OL>
-	<LI>Click <A href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.ui.examples.projects/archive/junit/junit381src.jar?view=co">here</A> to download the JUnit source code.</LI>
+	<LI>Click <A href="http://www.eclipse.org/jdt/ui/smoke-test/junit3.8.1src.zip">here</A> to download the JUnit source code.</LI>
 	<LI>Save the archive (do not extract) to a directory from now on referenced as <em><Downloads></em>.</LI>
 	</OL>
 <H2>Creating the project</H2>
@@ -74,7 +74,7 @@
 	page.</LI>
 	<LI>In the Package Explorer view, expand the JUnit project and the src folder to view the
 	JUnit packages.
-	<P><img src="images/view_package_explorer_junit.png"  alt="Package explorer"></P>
+	<P><img src="images/view_package_explorer_junit.png"  alt="Package Explorer"></P>
 	</LI>
 </OL>
 <P class="nav_footer" id="nav_footer">Next Section: <A href="qs-4.htm">Browsing Java elements using the package explorer</A>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-4.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-4.htm
index 9a51128..1bd9f1c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-4.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-4.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
@@ -29,7 +29,7 @@
         The public type and its members (fields and
         methods) appear in the tree.
         <p>
-            <img src="images/view_package_explorer_junit_exp.png"  alt="Package explorer"> 
+            <img src="images/view_package_explorer_junit_exp.png"  alt="Package Explorer"> 
         </p>
       </li>
     </ol>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm
index b29472b..33426eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-6.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <title> Viewing the type hierarchy</title>
@@ -10,7 +10,7 @@
 </head>
 <body>
 <h1>Viewing the type hierarchy</h1>
-<p> In this section, you will learn about using the Hierarchy view by viewing
+<p> In this section, you will learn about using the Type Hierarchy view by viewing
 classes and members in a variety of different ways. </p>
 <ol>
   <li> In the Package Explorer view, find <em>junit.framework/TestCase.java</em>. 
@@ -35,7 +35,7 @@ classes and members in a variety of different ways. </p>
     small arrow on the left side of the type icon of TestCase indicates that the 
     hierarchy was opened on this type.
 	<p>
-    <img src="images/view_typehierarchy_testcase_small.png"  alt="Type hierarchy"> 
+    <img src="images/view_typehierarchy_testcase_small.png"  alt="Type Hierarchy"> 
 	</p>
   </li>
   <li> Click the <strong>Show the Supertype Hierarchy</strong> button to 
@@ -59,15 +59,15 @@ classes and members in a variety of different ways. </p>
     <img src="images/view_typehierarchy_testcase_runtest_locked.png"  alt="Subtype hierarchy showing method implementors"> 
 	</p>
   </li>
-  <li> In the Hierarchy view, click the <strong>Show the Supertype Hierarchy</strong> 
+  <li> In the Type Hierarchy view, click the <strong>Show the Supertype Hierarchy</strong> 
     button. Then on the member pane, select <code>countTestCases()</code> to display 
     the places where this method is declared.
 	<p>
     <img src="images/view_typehierarchy_testcase_supertype_locked.png"  alt="Supertype hierarchy showing method implementors"> 
 	</p>
   </li>
-  <li> In the Hierarchy view select the <em>Test</em> element and select <strong>Focus 
-    On 'Test'</strong> from its context menu. <em>Test</em> is presented in the Hierarchy view. </li>
+  <li> In the Type Hierarchy view select the <em>Test</em> element and select <strong>Focus 
+    On 'Test'</strong> from its context menu. <em>Test</em> is presented in the Type Hierarchy view. </li>
   <li> Activate the Package Explorer view and select the package junit.framework. 
     Use <strong>Open Type Hierarchy</strong> from its context menu. A hierarchy 
     is opened containing all classes of the package. For completion of the tree, 
@@ -112,7 +112,7 @@ To see where a virtual method call can resolve to:
 <em>setUp()</em></li>
 <li>Press <kbd>Ctrl+T</kbd> or invoke <strong>Navigate > Quick Type Hierarchy</strong> and the
 in-place type hierarchy view is shown.</li>
-<li>You can see that <em>setIup()</em> is implemented in 3 more classes. <em>Object</em> and <em>Assert</em> are
+<li>You can see that <em>setUp()</em> is implemented in 3 more classes. <em>Object</em> and <em>Assert</em> are
 only shown with a white filled images as are only required to complete the hierarchy but do not implement <em>setUp()</em></li>
 <li>Select a type to navigate to its implementation of <em>setUp()</em></li>
 </ol>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-Navigate.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-Navigate.htm
index f5fa283..cbd6a43 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-Navigate.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/gettingStarted/qs-Navigate.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
@@ -52,11 +52,11 @@
 		</p>
 	  </li>
 	  <li> 
-	    The Hierarchy view opens with the TestCase class displayed.
+	    The Type Hierarchy view opens with the TestCase class displayed.
 		<p>
-	    <img src="images/view_typehierarchy_testcase.png"  alt="Type hierarchy view">
+	    <img src="images/view_typehierarchy_testcase.png"  alt="Type Hierarchy view">
 		</p>
-	    <em>Note: You can also open editors on types and methods in the Hierarchy view.</em> 
+	    <em>Note: You can also open editors on types and methods in the Type Hierarchy view.</em> 
 	  </li>
 	</ol>
 	<P class="nav_footer" id="nav_footer">Next Section: <A href="qs-6.htm">Viewing the type hierarchy</A>
diff --git a/eclipse/plugins/org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.gif b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.debug.ui/ovr16/skip_breakpoint_ov.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.debug.ui/icons/full/ovr16/skip_breakpoint_ov.gif
copy to eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.debug.ui/ovr16/skip_breakpoint_ov.gif
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/testfile_obj.gif b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.junit/obj16/testfile_obj.gif
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/testfile_obj.gif
rename to eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.junit/obj16/testfile_obj.gif
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_cast.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_cast.png
index 30161b9..1d64b4e 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_cast.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_cast.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_move.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_move.png
index 2467a94..464688e 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_move.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_move.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_multi_fix.gif b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_multi_fix.gif
new file mode 100644
index 0000000..af02bf5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/correction_multi_fix.gif differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_obj.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_obj.png
index 7863464..5eaee6f 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_obj.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_obj.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_src_obj.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_src_obj.png
index 9237bb3..e68f261 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_src_obj.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/obj16/jar_src_obj.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/error_co_buildpath.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/error_co_buildpath.png
new file mode 100644
index 0000000..4a07e97
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/error_co_buildpath.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/transient_co.png b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/transient_co.png
new file mode 100644
index 0000000..4f54e54
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/images/org.eclipse.jdt.ui/ovr16/transient_co.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/notices.html b/eclipse/plugins/org.eclipse.jdt.doc.user/notices.html
index b2201a7..33aa981 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/notices.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/notices.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -13,7 +13,7 @@
 <h3>
 <a NAME="Notices"></a>Notices</h3>
 <p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2009.
+The material in this guide is Copyright (c) IBM Corporation and others 2000, 2010.
 </p>
 <p>
 <a href="about.html">Terms and conditions regarding the use of this guide.</a>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_caught.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_caught.PNG
index 1065674..4b80151 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_caught.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_caught.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_condition.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_condition.PNG
index e81b353..4b13fe4 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_condition.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_condition.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_enabled.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_enabled.PNG
index a45108b..5dd3f54 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_enabled.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_enabled.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_entry.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_entry.PNG
index b6c9ec4..7c31d42 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_entry.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_entry.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_exit.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_exit.PNG
index da620b4..8298d10 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_exit.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_exit.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_hitcount.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_hitcount.PNG
index 3c742ba..c16b8c0 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_hitcount.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_hitcount.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendpolicy.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendpolicy.PNG
index 17482ed..24c0a4e 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendpolicy.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendpolicy.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendsubclass.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendsubclass.PNG
index 85e8369..5ce8ce2 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendsubclass.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_suspendsubclass.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_uncaught.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_uncaught.PNG
index 4c704c9..2052ada 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_uncaught.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-breakpoint_uncaught.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_access_option.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_access_option.PNG
index 18ee045..3ed5c24 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_access_option.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_access_option.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_mod.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_mod.PNG
index 3f4b207..0aca902 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_mod.PNG and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/images/ref-watchpoint_mod.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-access_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-access_option.htm
index dd6abaa..189e0ed 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-access_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-access_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1> Watchpoint Field Access </h1>
-<p> Select the <strong>Field Access </strong>option to suspend execution when the associated field is accessed (read). </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>,  or by <a href="../../reference/views/breakpoints/ref-access_contextaction.htm">right-clicking</a> a watchpoint. </p>
+<p> Select the <strong>Access </strong>option to suspend execution when the associated field is accessed (read). </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>,  or by <a href="../../reference/views/breakpoints/ref-access_contextaction.htm">right-clicking</a> a watchpoint. </p>
 <p><img src="images/ref-watchpoint_access_option.PNG" alt="The 'access' option for a watchpoint"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts" > </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-caught_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-caught_option.htm
index 59667f5..a043908 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-caught_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-caught_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1>Exception Breakpoint Caught Exception </h1>
-<p> Select the <strong>Caught Exception</strong> option to suspend execution when an exception of the same type as the breakpoint is thrown in a caught location. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-caught_contextaction.htm">right-clicking</a> an exception breakpoint.</p>
+<p> Select the <strong>Caught locations</strong> option to suspend execution when an exception of the same type as the breakpoint is thrown in a caught location. </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-caught_contextaction.htm">right-clicking</a> an exception breakpoint.</p>
 <p><img src="images/ref-breakpoint_caught.PNG" alt="Exception breakpoint caught option"></p>
 <p> </p>
 <p> <img src="../../images/ngrelc.png" alt="Related concepts" ></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-condition_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-condition_option.htm
index c5bd12f..8994e45 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-condition_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-condition_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,7 +9,7 @@
 </head>
 <body>
 <h1>Breakpoint Enable Condition</h1>
-<p>Select the <strong>Enable Condition</strong> option to enable the ability to provide a custom condition for the breakpoint. </p>
+<p>Select the <strong>Conditional</strong> option to enable the ability to provide a custom condition for the breakpoint. </p>
 <p>Each breakpoint can have a unique condition that determines when the breakpoint will be hit.</p>
 <p>A condition for a breakpoint can be any logical expression that evaluates to either true or false.
   The expression is evaluated in the scope of the breakpoint location, meaning you cannot make reference to a class, etc., outside the scope of the breakpoint
@@ -29,7 +29,7 @@
 <p>For example a valid condition could be:</p>
 <pre>	age == 56 </pre>
 <p>meaning the breakpoint would only suspend when age was equal to 56.</p>
-<p>Conditions can be added to breakpoints with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoints Properties...</strong></a> shown below. </p>
+<p>Conditions can be added to breakpoints in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane or with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoints Properties...</strong></a> shown below. </p>
 <p><img src="images/ref-breakpoint_condition.PNG" alt="Breakpoint condition option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-enabled_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-enabled_option.htm
index 85b6d20..912d7c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-enabled_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-enabled_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -10,7 +10,7 @@
 <body>
 <h1>Breakpoint Enabled</h1>
 <p>Select the <strong>Enabled</strong> option to enable or disable a breakpoint. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>,  by <a href="../../reference/views/breakpoints/ref-enable_contextaction.htm">right-clicking</a> a breakpoint, or by selecting the breakpoint or its grouping in the <strong><a href="../../reference/views/breakpoints/ref-breakpoints_view.htm">Breakpoints View</a></strong>. </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>,  by <a href="../../reference/views/breakpoints/ref-enable_contextaction.htm">right-clicking</a> a breakpoint, or by selecting the breakpoint or its grouping in the <strong><a href="../../reference/views/breakpoints/ref-breakpoints_view.htm">Breakpoints View</a></strong>. </p>
 <p><img src="images/ref-breakpoint_enabled.PNG" alt="Breakpoint enabled option"></p>
 <p> </p>
 <p> <img  src="../../images/ngrelc.png" alt="Related concepts"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-entry_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-entry_option.htm
index 867211d..c4d1e7f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-entry_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-entry_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1> Breakpoint Method Entry</h1>
-<p> Select the <strong>Method Entry</strong> option to suspend execution when the method associated with the breakboint is entered. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-entry_contextaction.htm">right-clicking</a> a method breakpoint.</p>
+<p> Select the <strong>Entry</strong> option to suspend execution when the method associated with the breakpoint is entered. </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-entry_contextaction.htm">right-clicking</a> a method breakpoint.</p>
 <p><img src="images/ref-breakpoint_entry.PNG" alt="Method breakpoint entry option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-exit_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-exit_option.htm
index 83802d3..4c582a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-exit_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-exit_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1> Breakpoint Method Exit</h1>
-<p> Select the <strong>Method Exit</strong> option to suspend execution when the method associated with the breakpoint is exited. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-exit_contextaction.htm">right-clicking</a> a method breakpoint.</p>
+<p> Select the <strong>Exit</strong> option to suspend execution when the method associated with the breakpoint is exited. </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-exit_contextaction.htm">right-clicking</a> a method breakpoint.</p>
 <p><img src="images/ref-breakpoint_exit.PNG" alt="Method breakpoint exit option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-hitcount_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-hitcount_option.htm
index 9a444da..dd175dc 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-hitcount_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-hitcount_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -13,7 +13,7 @@
 <p>The <strong>Hit Count</strong> option is used to determine when your program should suspend on that breakpoint. </p>
 <p>If a breakpoint has a hit count of <em>N</em>, execution will suspend when the breakpoint is encountered for the <em>N</em>th time. After being hit, the breakpoint is disabled until either it is re-enabled or its hit count is changed.<br>
   <br>
-  This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-hitcount_contextaction.htm">right-clicking</a> a breakpoint.</p>
+  This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-hitcount_contextaction.htm">right-clicking</a> a breakpoint.</p>
 <p><img src="images/ref-breakpoint_hitcount.PNG" alt="Breakpoint hit count option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts" ></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-modification_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-modification_option.htm
index ccc8a92..5108d0c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-modification_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-modification_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1> Watchpoint Field Modification</h1>
-<p> Select this option to suspend execution when the associated field is modified (written). </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-modification_contextaction.htm">right-clicking</a> a watchpoint. </p>
+<p> Select the <strong>Modification</strong> option to suspend execution when the associated field is modified (written). </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-modification_contextaction.htm">right-clicking</a> a watchpoint. </p>
 <p><img src="images/ref-watchpoint_mod.PNG" alt="Watchpoint field modification option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts" > </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendpolicy_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendpolicy_option.htm
index 9e37cfe..46b621f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendpolicy_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendpolicy_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -10,14 +10,14 @@
 </head>
 <body>
 <h1>Breakpoint Suspend Policy</h1>
-<p>The <strong>Suspend Policy</strong>  option is used to indicate what should be suspended when a  breakpoint is hit. </p>
+<p>A breapoint's suspend policy determines what should be suspended when a breakpoint is hit.</p>
 <p>There are two options for Java breakpoints:</p>
 <ul>
-  <li>Suspend Thread - suspends only the thread that encountered the breakpoint</li>
-  <li>Suspend VM - suspends the entire VM when the breakpoint is encountered<br>
+  <li><strong>Suspend thread</strong> - suspends only the thread that encountered the breakpoint</li>
+  <li><strong>Suspend VM</strong> - suspends the entire VM when the breakpoint is encountered<br>
   </li>
 </ul>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-suspendpolicy_contextaction.htm">right-clicking</a> a breakpoint.</p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-suspendpolicy_contextaction.htm">right-clicking</a> a breakpoint.</p>
 <p><img src="images/ref-breakpoint_suspendpolicy.PNG" alt="Breakpoint suspend policy option"></p>
 <p>You can also change the default setting for the suspend policy for all newly created breakpoints. </p>
 <p>To do this go to the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.JavaDebugPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Java Debug preference page"> <strong>Java >Debug</strong></a> preference page and change it there. </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendsubclass_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendsubclass_option.htm
index d579885..8ad7c82 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendsubclass_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-suspendsubclass_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,9 +9,9 @@
 </head>
 <body>
 <h1> Exception Breakpoint Suspend on Subclass of this Exception </h1>
-<p> Select the <strong>Suspend on Subclass of this Exception</strong> option to suspend execution when subclasses of the exception type are encountered.</p>
+<p> Select the <strong>Subclasses of this exception</strong> option to suspend execution when subclasses of the exception type are encountered.</p>
 <p>For example, if an exception breakpoint for <code>RuntimeException</code> is configured to suspend on subclasses, it will also be triggered by a <code>NullPointerException</code>. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-suspendpolicy_contextaction.htm">right-clicking</a> a breakpoint.</p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-suspendpolicy_contextaction.htm">right-clicking</a> a breakpoint.</p>
 <p><img src="images/ref-breakpoint_suspendsubclass.PNG" alt="Exception breakpoint suspend on subclass option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-uncaught_option.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-uncaught_option.htm
index 89fa30c..6081c83 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-uncaught_option.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/breakpoints/ref-uncaught_option.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,8 +9,8 @@
 </head>
 <body>
 <h1> Exception Breakpoint Uncaught Exception </h1>
-<p> Select the <strong>Uncaught Exception</strong> option to suspend execution when an exception of the same type as the breakpoint is thrown in an uncaught location. </p>
-<p>This option can be changed with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-uncaught_contextaction.htm">right-clicking</a> an exception breakpoint.</p>
+<p> Select the <strong>Uncaught locations</strong> option to suspend execution when an exception of the same type as the breakpoint is thrown in an uncaught location. </p>
+<p>This option can be changed in the <a href="../../reference/views/breakpoints/ref-breakpoints_view.htm#detail_pane"><strong>Breakpoints View</strong></a> detail pane, with the <a href="../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>, or by <a href="../../reference/views/breakpoints/ref-uncaught_contextaction.htm">right-clicking</a> an exception breakpoint.</p>
 <p><img src="images/ref-breakpoint_uncaught.PNG" alt="Exception breakpoint uncaught option"></p>
 <p> </p>
 <p> <img border="0" src="../../images/ngrelc.png" alt="Related concepts" ></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-condense-multi-lines-comments.png b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-condense-multi-lines-comments.png
new file mode 100644
index 0000000..15a140b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-condense-multi-lines-comments.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-disabling-enabling-tags.png b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-disabling-enabling-tags.png
new file mode 100644
index 0000000..0ea0d37
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-disabling-enabling-tags.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-join-lines-after.png b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-join-lines-after.png
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-join-lines-after.png
rename to eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-join-lines-after.png
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-join-lines-before.png b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-join-lines-before.png
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-join-lines-before.png
rename to eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-join-lines-before.png
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-prefer-wrapping-outer-expressions.png b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-prefer-wrapping-outer-expressions.png
new file mode 100644
index 0000000..e6a1f29
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/images/formatter-prefer-wrapping-outer-expressions.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-dll_debug.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-dll_debug.htm
index eef56e9..7ac5e66 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-dll_debug.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-dll_debug.htm
@@ -11,7 +11,7 @@
 <body>
 <h1> Debug Last Launched / Debug </h1>
 <p> Select the <strong>Debug Last Launched / Debug </strong>command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/debuglast_co.png" alt="Debug Last Launched"> ] to re-launch the last configuration or launch the current selection in <em>debug</em> mode. You can also use the keyboard shortcut <em><strong>F11</strong> </em></p>
-<p>New in 3.3 is the ability to launch the selected resource. This feature shares the <strong>Debug Last Launched</strong> command, so when it is enabled, it in effect replaces the the <strong>Debug Last Launched</strong> with the <strong>Debug</strong> command. </p>
+<p>New in 3.3 is the ability to launch the selected resource. This feature shares the <strong>Debug Last Launched</strong> command, so when it is enabled, it in effect replaces the <strong>Debug Last Launched</strong> with the <strong>Debug</strong> command. </p>
 <p>The preference for launching last or launching the selected resource can be changed on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.LaunchingPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Heap Walking preference page"> <strong>Run/Debug > Launching</strong></a> preference page. </p>
 <p><img border="0" src="../../../images/ngrelc.png" alt="Related concepts"></p>
 <p><a href="../../../concepts/cdebugger.htm">Debugger</a><br>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-rll_run.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-rll_run.htm
index d122696..6af1fb9 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-rll_run.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/menus/run/ref-rll_run.htm
@@ -11,8 +11,8 @@
 <body>
 <h1> Run Last Launched / Run </h1>
 <p> Select the <strong>Run Last Launched / Run </strong>command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/runlast_co.png" alt="Run Last Launched"> ] to re-launch the last configuration or launch the current selection in  <em>run</em> mode. You can also use the keyboard shortcut <em><strong>Ctrl + F11</strong> </em></p>
-<p>New in 3.3 is the ability to launch the selected resource. This feature shares the <strong>Run Last Launched</strong> command, so when it is enabled, it in effect replaces the the <strong>Run Last Launched</strong> with the <strong>Run</strong> command. </p>
-<p>The preference for launching last or launching the selected resource can be chnaged on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.LaunchingPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Heap Walking preference page"> <strong>Run/Debug > Launching</strong></a> preference page. </p>
+<p>New in 3.3 is the ability to launch the selected resource. This feature shares the <strong>Run Last Launched</strong> command, so when it is enabled, it in effect replaces the <strong>Run Last Launched</strong> with the <strong>Run</strong> command. </p>
+<p>The preference for launching last or launching the selected resource can be changed on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.LaunchingPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Heap Walking preference page"> <strong>Run/Debug > Launching</strong></a> preference page. </p>
 <p><img border="0" src="../../../images/ngrelc.png" alt="Related concepts"></p>
 <p><a href="../../../concepts/cdebugger.htm">Debugger</a><br>
   <a href="../../../concepts/clocdbug.htm">Local Debugging</a><br>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-cleanup.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-cleanup.htm
index f3c0796..fd8683f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-cleanup.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-cleanup.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Clean Up Preferences
@@ -73,6 +73,14 @@ lets you manage your code clean up profiles for the Java code clean up.</p>
 		</tr>
 		<tr>
 			<td valign="top" width="25%">
+			<p>Export All...</p>
+			</td>
+			<td valign="top">
+			<p>Exports all the profiles to the file system.</p>
+			</td>
+		</tr>
+		<tr>
+			<td valign="top" width="25%">
 			<p>Details</p>
 			</td>
 			<td valign="top">
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-formatter.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-formatter.htm
index b109e46..72fe861 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-formatter.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/codestyle/ref-preferences-formatter.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Code Formatter Preferences
@@ -73,6 +73,14 @@ lets you manage your code formatter profiles for the Java code formatter.</p>
 		</tr>
 		<tr>
 			<td valign="top" width="25%">
+			<p>Export All...</p>
+			</td>
+			<td valign="top">
+			<p>Exports all the profiles to the file system.</p>
+			</td>
+		</tr>
+		<tr>
+			<td valign="top" width="25%">
 			<p>Details</p>
 			</td>
 			<td valign="top">
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-building.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-building.htm
index d29a243..a0cbec6 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-building.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-building.htm
@@ -133,7 +133,7 @@
 		<p>Rebuild class files modified by others</p>
 		</td>
 		<td valign="top">
-		<p>Indicate whether class files which have been modified by others should be rebuilded to undo the modification.</p>
+		<p>Indicate whether class files which have been modified by others should be rebuilt to undo the modification.</p>
 		</td>
 		<td valign="top">
 		<p>Off</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
index b96cfc1..8538752 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/compiler/ref-preferences-errors-warnings.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Java Compiler Errors/Warnings Preferences</title>
 <link rel="stylesheet" href="../../../../book.css" charset="ISO-8859-1" type="text/css">
@@ -184,13 +184,13 @@
 	</tr>
 	<tr>
 		<td valign="top">
-		<p>Hidden catch blocks</p>
+		<p>Hidden catch block</p>
 		</td>
 		<td valign="top">
 		<p>Locally to a try statement, some catch blocks may hide others , e.g.</p>
 		<code>try { throw new java.io.CharConversionException();</code><br>
 		<code>} catch (java.io.CharConversionException e) {</code><br>
-		<code>} catch (java.io.IOException e) {}.</code><br>
+		<code>} catch (java.io.IOException e) {}</code><br>
 		<br>
 		<p>When enabled, the compiler will issue an error or a warning for hidden catch blocks corresponding to checked exceptions.</p>
 		</td>
@@ -236,7 +236,7 @@
 		<p>'switch' case fall-through</p>
 		</td>
 		<td valign="top">
-		<p>When enabled, the compiler will issue an error or a warning whenever it encounters a switch case without a 'break' statement. Empty switch cases are allowed.</p>
+		<p>When enabled, the compiler will issue an error or a warning when a case may be entered by falling through a preceding, non empty case.</p>
 		</td>
 		<td valign="top">
 		<p>Ignore</p>
@@ -269,12 +269,59 @@
 		<p>Comparing identical</p>
 		</td>
 		<td valign="top">
-		<p>When enabled, the compiler will issue an error or a warning if a comparisonis involving identical operands (e.g 'x == x')..</p>
+		<p>When enabled, the compiler will issue an error or a warning if a comparison is involving identical operands (e.g 'x == x').</p>
 		</td>
 		<td valign="top">
 		<p>Warning</p>
 		</td>
 	</tr>
+	<tr>
+		<td valign="top">
+		<p>Missing synchronized modifier on inherited method</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will issue an error or a warning when it encounters an inherited method which is missing the synchronized modifier.</p>
+		</td>
+		<td valign="top">
+		<p>Ignore</p>
+		</td>
+	</tr>
+	<tr>
+		<td valign="top">
+		<p>Class overrides 'equals()' but not 'hashCode()'</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will issue an error or a warning when it encounters a class which overrides 'equals()' but not 'hashCode()'.</p>
+		</td>
+		<td valign="top">
+		<p>Ignore</p>
+		</td>
+	</tr>
+	<tr>
+		<td valign="top">
+		<p>Dead code</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will issue an error or a warning when it encounters dead code (e.g 'if (false)' ).</p>
+		</td>
+		<td valign="top">
+		<p>Warning</p>
+		</td>
+	</tr>
+	<tr>
+		<td valign="top">
+		<p>Unused object allocation</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will issue an error or a warning when it encounters an allocated object which is not used, e.g.</p>
+		<code>if (name == null)</code><br>
+		<code>   new IllegalArgumentException();</code><br>
+		<br>
+		</td>
+		<td valign="top">
+		<p>Ignore</p>
+		</td>
+	</tr>
 </table>
 
 <h3>Name shadowing and conflicts</h3>
@@ -542,7 +589,7 @@
 		<p>Ignore exceptions documented with '@throws' or '@exception' tags</p>
 		</td>
 		<td valign="top">
-		<p>When enabled, the compiler will not issue an error or a warning whenever an an unnecessary declaration of a thrown exception is documented with an '@throws' or '@exception' tag.</p>
+		<p>When enabled, the compiler will not issue an error or a warning whenever an unnecessary declaration of a thrown exception is documented with an '@throws' or '@exception' tag.</p>
 		</td>
 		<td valign="top">
 		<p>On</p>
@@ -637,6 +684,20 @@
 		</td>
 	</tr>
 	<tr>
+		<td valign="top" style="padding-left: 2em;">
+		<p>Include implementations of interface methods (1.6 or higher)</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will also issue an error or a warning whenever it encounters a method overriding or implementing
+		a method declared in an interface, and the '@Override' annotation is missing.<br>
+		Note that '@Override' is only allowed on such methods if the compiler compliance level is 1.6 or higher, so this error or
+		warning will never appear in 1.5 code.</p>
+		</td>
+		<td valign="top">
+		<p>On</p>
+		</td>
+	</tr>	
+	<tr>
 		<td valign="top">
 		<p>Missing '@Deprecated' annotation</p>
 		</td>
@@ -671,6 +732,17 @@
 	</tr>
 	<tr>
 		<td valign="top">
+		<p>Enable '@SuppressWarnings' annotations</p>
+		</td>
+		<td valign="top">
+		<p>When enabled, the compiler will process '@SuppressWarnings' annotations.</p>
+		</td>
+		<td valign="top">
+		<p>On</p>
+		</td>
+	</tr>
+	<tr>
+		<td valign="top" style="padding-left: 2em;">
 		<p>Unused '@SuppressWarnings' token</p>
 		</td>
 		<td valign="top">
@@ -679,16 +751,16 @@
 		<td valign="top">
 		<p>Warning</p>
 		</td>
-	</tr>	
+	</tr>
 	<tr>
-		<td valign="top">
-		<p>Enable '@SuppressWarnings' annotations</p>
+		<td valign="top" style="padding-left: 2em;">
+		<p>Suppress optional errors with '@SuppressWarnings'</p>
 		</td>
 		<td valign="top">
-		<p>When enabled, the compiler will process '@SuppressWarnings' annotations.</p>
+		<p>When enabled, the '@SuppressWarnings' annotation will also suppress the optional compiler errors.</p>
 		</td>
 		<td valign="top">
-		<p>On</p>
+		<p>Off</p>
 		</td>
 	</tr>
 </table>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-debug.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-debug.htm
index e77035f..09bd662 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-debug.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-debug.htm
@@ -24,7 +24,7 @@
     <tr>
       <td colspan="1" valign="top" align="left">Suspend execution on uncaught exceptions </td>
       <td colspan="1" valign="top" align="left"><p>This option controls if a program will suspend if an uncaught exception is thrown. </p>
-      <p>For example if you try to call a method on a null object and a NullPointerException is thrown, with this option on your prgram will suspend at the location the exception was thrown </p></td>
+      <p>For example if you try to call a method on a null object and a NullPointerException is thrown, with this option on your program will suspend at the location the exception was thrown </p></td>
       <td colspan="1" valign="top" align="left">On</td>
     </tr>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-detail_formatters.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-detail_formatters.htm
index 7196df1..108d6e3 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-detail_formatters.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-detail_formatters.htm
@@ -10,8 +10,8 @@
 </head>
 <body>
 <h1> Detail Formatters Preferences </h1>
-<p> The following preferences can be set using the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.JavaDetailFormattersPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Detail Formatters preference page"> <b>Java > Debug > Detail Formaters</b></a> preference page.</p>
-<p>Thess preferences are used to create and manage detail formatters, which are used in the details panes of variables views, or for varibale labels themselves. </p>
+<p> The following preferences can be set using the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.JavaDetailFormattersPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Detail Formatters preference page"> <b>Java > Debug > Detail Formatters</b></a> preference page.</p>
+<p>These preferences are used to create and manage detail formatters, which are used in the details panes of variables views, or for variable labels themselves. </p>
 <table border="1" cellspacing="0" cellpadding= "5" summary="Detail formatters preferences">
   <thead>
     <tr>
@@ -22,8 +22,8 @@
   </thead>
   <tbody>
     <tr>
-      <td colspan="1" valign="top" align="left">Types with detial formatters </td>
-      <td colspan="1" valign="top" align="left">The listing of types that currently have detail formatters (the list itself), and trhe enabled state of the detail formatter, i.e. if it is on use (the checked state of a list item) </td>
+      <td colspan="1" valign="top" align="left">Types with detail formatters </td>
+      <td colspan="1" valign="top" align="left">The listing of types that currently have detail formatters (the list itself), and the enabled state of the detail formatter, i.e. if it is on use (the checked state of a list item) </td>
       <td colspan="1" valign="top" align="left"> </td>
     </tr>
     <tr>
@@ -43,16 +43,16 @@
     </tr>
     <tr>
       <td colspan="1" valign="top" align="left">Detail formatter code snippet for selected type </td>
-      <td colspan="1" valign="top" align="left">Displays the current code snippet in use for the detail formatter of the selected type. This field is not editable, the only way to edit a detila formatter is to use the Edit... button </td>
+      <td colspan="1" valign="top" align="left">Displays the current code snippet in use for the detail formatter of the selected type. This field is not editable, the only way to edit a detail formatter is to use the Edit... button </td>
       <td colspan="1" valign="top" align="left"> </td>
     </tr>
     <tr>
       <td colspan="1" valign="top" align="left">Show variables details </td>
-      <td colspan="1" valign="top" align="left"><p>This option controls where you want to see the detial formatter appear, you have one of three choices:</p>
+      <td colspan="1" valign="top" align="left"><p>This option controls where you want to see the detail formatter appear, you have one of three choices:</p>
         <ul>
-          <li>As a label for variables with detail formatters - will appear as the primary display label only for associated variables the have detial formatters </li>
+          <li>As a label for variables with detail formatters - will appear as the primary display label only for associated variables the have detail formatters </li>
           <li>As a label for all variables - will appear for all associated variables, regardless of them having detail formatters already </li>
-          <li>In detail pane only - will only appear in variables view detials panes and nowhere else </li>
+          <li>In detail pane only - will only appear in variables view details panes and nowhere else </li>
       </ul></td>
       <td colspan="1" valign="top" align="left"> </td>
     </tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-primitive_display_options.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-primitive_display_options.htm
index f544e46..4ffa540 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-primitive_display_options.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/debug/ref-primitive_display_options.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../../book.css" charset="ISO-8859-1" type="text/css">
@@ -11,7 +11,7 @@
 <body>
 <h1> Primitive Display Options Preferences </h1>
 <p> The following preferences can be set using the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.debug.ui.JavaPrimitivesPreferencePage)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Primitive Display Options preference page"> <b>Java > Debug > Primitive Display Options</b></a> preference page.</p>
-<p>These preferences effect how primitive values are displayed (int, double, etc). </p>
+<p>These preferences affect how primitive values are displayed (int, double, etc). </p>
 <table border="1" cellspacing="0" cellpadding= "5">
   <thead>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/ref-preferences-compiler.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/ref-preferences-compiler.htm
index 8d1151a..270549f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/ref-preferences-compiler.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/java/ref-preferences-compiler.htm
@@ -19,6 +19,7 @@
     <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Java Compiler preference page">
     <b>Java > Compiler</b></a> preference page
     lets you configure the various settings related to compiling of Java source code and class file generation.</p>
+    <p>An Eclipse-based product may change the compiler defaults, so they may be different than the ones indicated here.</p>
 <p>Sub pages offer more compiler settings:</p>
  <ul>
   <li><a href="compiler/ref-preferences-building.htm">Building</a></li>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/ref-preferences-java.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/ref-preferences-java.htm
index a5f44c4..e5fac55 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/ref-preferences-java.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/ref-preferences-java.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Java Preferences
@@ -196,8 +196,8 @@
       <img src="../../images/ngrelr.png" alt="Related reference" border="0" >
     </p>
     <p>
-      <a href="../../reference/views/ref-view-package-explorer.htm">Package explorer view</a><br>
-      <a href="../../reference/views/ref-type-hierarchy.htm">Type hierarchy view</a>
+      <a href="../../reference/views/ref-view-package-explorer.htm">Package Explorer view</a><br>
+      <a href="../../reference/views/ref-type-hierarchy.htm">Type Hierarchy view</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-console.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-console.htm
index 009c192..5476195 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-console.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-console.htm
@@ -56,25 +56,25 @@
     </tr>
     <tr>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Standard Out Text Color </p></td>
-      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the colour of text written to the standard output 
+      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the color of text written to the standard output 
           stream by an application. </p></td>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Black </p></td>
     </tr>
     <tr>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Standard Error Text Color </p></td>
-      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the colour of text written to the standard error 
+      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the color of text written to the standard error 
           stream by an application. </p></td>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Red </p></td>
     </tr>
     <tr>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Standard In Text Color </p></td>
-      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the colour of text typed into the console to 
+      <td rowspan="1" colspan="1" valign="top" align="left"><p> This preference controls the color of text typed into the console to 
           be read by an application. </p></td>
       <td rowspan="1" colspan="1" valign="top" align="left"><p> Green </p></td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left">Background Colour </td>
-      <td colspan="1" valign="top" align="left">This preference controls the colour of the background of the console </td>
+      <td colspan="1" valign="top" align="left">Background Color </td>
+      <td colspan="1" valign="top" align="left">This preference controls the color of the background of the console </td>
       <td colspan="1" valign="top" align="left">White</td>
     </tr>
   </tbody>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-launch_configurations.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-launch_configurations.htm
index 13487f8..8d8eb9f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-launch_configurations.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-launch_configurations.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css">
@@ -11,7 +11,7 @@
 <body>
 <h1> Launch Configurations Preferences </h1>
 <p> The following preferences can be set using the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.debug.ui.LaunchConfigurations)")'> <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Launch Configurations preference page"> <b>Run/Debug > Launching > Launch Configurations</b></a> preference page.</p>
-<p>This page allows you set filtering options that are used throughout the workbench  to limit the exposure of certain kinds of launch configurations. These filtering setting effect the launch dialog, launch histories and the workbench. </p>
+<p>This page allows you set filtering options that are used throughout the workbench  to limit the exposure of certain kinds of launch configurations. These filtering setting affect the launch dialog, launch histories and the workbench. </p>
 <table border="1" cellspacing="0" cellpadding= "5">
   <thead>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-perspectives.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-perspectives.htm
index 7fdb944..7967e87 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-perspectives.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-perspectives.htm
@@ -33,7 +33,7 @@
     </tr>
     <tr>
       <td colspan="1" valign="top" align="left">Open the associated perspective when an application suspends </td>
-      <td colspan="1" valign="top" align="left"><p>This option controls if the specified perspective will be switched to when the application susupends </p>
+      <td colspan="1" valign="top" align="left"><p>This option controls if the specified perspective will be switched to when the application suspends </p>
         <ul>
           <li>Always - the specified perspective will always be opened</li>
           <li>Never - the specified perspective will never be opened</li>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-run_debug.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-run_debug.htm
index 6eab835..a253fd7 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-run_debug.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-run_debug.htm
@@ -31,7 +31,7 @@
       <td align="left" valign="top"><p> On </p></td>
     </tr>
     <tr>
-      <td align="left" valign="top">Activate the workbench when when a breakpoint 
+      <td align="left" valign="top">Activate the workbench when a breakpoint 
         is hit</td>
       <td align="left" valign="top">This option brings attention to the debugger 
         when a breakpoint is encountered, by activating the associated window. 
@@ -67,23 +67,23 @@
       <td align="left" valign="top">On</td>
     </tr>
     <tr>
-      <td align="left" valign="top">Changed value colour </td>
-      <td align="left" valign="top">This option allows you to change the colour of a changed value in the variables view, expressions view, memory view, anywhere running program variables are rendered </td>
+      <td align="left" valign="top">Changed value color </td>
+      <td align="left" valign="top">This option allows you to change the color of a changed value in the variables view, expressions view, memory view, anywhere running program variables are rendered </td>
       <td align="left" valign="top">Red</td>
     </tr>
     <tr>
-      <td align="left" valign="top">Changed value background colour </td>
-      <td align="left" valign="top">This option allows you to change the selection colour  of a changed variable, e.g. in the variables view showing columns </td>
+      <td align="left" valign="top">Changed value background color </td>
+      <td align="left" valign="top">This option allows you to change the selection color  of a changed variable, e.g. in the variables view showing columns </td>
       <td align="left" valign="top">Yellow</td>
     </tr>
     <tr>
-      <td align="left" valign="top">Memory unbuffered colour </td>
-      <td align="left" valign="top">This option allows you to change the rendering colour of unbuffered memory blocks in the memory view </td>
+      <td align="left" valign="top">Memory unbuffered color </td>
+      <td align="left" valign="top">This option allows you to change the rendering color of unbuffered memory blocks in the memory view </td>
       <td align="left" valign="top">Grey</td>
     </tr>
     <tr>
-      <td align="left" valign="top">Memory buffered colour </td>
-      <td align="left" valign="top">This option allows you to change the rendering colour of buffered memory blocks in the memory view </td>
+      <td align="left" valign="top">Memory buffered color </td>
+      <td align="left" valign="top">This option allows you to change the rendering color of buffered memory blocks in the memory view </td>
       <td align="left" valign="top">Black</td>
     </tr>
   </tbody>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-string_substitution.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-string_substitution.htm
index 406dd7d..495c72c 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-string_substitution.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-string_substitution.htm
@@ -20,7 +20,7 @@
 <p><img src="../../../reference/preferences/run-debug/images/ref-string_dialog.PNG" alt="String Variable Selection Dialog"> </p>
 <p>We can now select the <em>TEST</em> variable and insert in as an argument if we wish, as shown in the following screen shot.</p>
 <p><img src="../../../reference/preferences/run-debug/images/ref-lcd_string_subbed.PNG" alt="Launch Dialog With Substituted String"> </p>
-<p>The other mentioned platform use of string substitution in in the External Tools launch dialog, used with Ant configurations, as shown in the following screen shot.</p>
+<p>The other mentioned platform use of string substitution in the External Tools launch dialog, used with Ant configurations, as shown in the following screen shot.</p>
 <p><img src="../../../reference/preferences/run-debug/images/ref-ext_string_subbed.PNG" alt="Ant Configuration Using String Substitution"> </p>
 <p><img src="../../../images/ngrelc.png" alt="Related concepts" border="0"></p>
 <p> <a href="../../../concepts/cdebugger.htm">Debugger</a><br>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-view_management.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-view_management.htm
index 15322c4..ff9d40f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-view_management.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/preferences/run-debug/ref-view_management.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css">
@@ -28,7 +28,7 @@
     </tr>
     <tr>
       <td colspan="1" valign="top" align="left">Do not automatically open/close views which have been manually opened/closed </td>
-      <td colspan="1" valign="top" align="left">This option controls if views manually opened/closed will be effected by view managment </td>
+      <td colspan="1" valign="top" align="left">This option controls if views manually opened/closed will be affected by view management </td>
       <td colspan="1" valign="top" align="left">On</td>
     </tr>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-actions-toolbar.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-actions-toolbar.htm
index c223cdd..597f80d 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-actions-toolbar.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-actions-toolbar.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -149,7 +149,7 @@
           </td>
           <td align="left" valign="top">
             <p>
-              This command helps you create a new JUni test case.
+              This command helps you create a new JUnit test case.
             </p>
           </td>
         </tr>
@@ -165,7 +165,7 @@
           <td align="left" valign="top">
             <p>
               This command allows you to browse the workspace for a type to open in the defined default Java editor. You can optionally choose to display the type simultaneously
-              in the Hierarchy view. See <a href="ref-dialog-open-type.htm">Open Type dialog</a>. 
+              in the Type Hierarchy view. See <a href="ref-dialog-open-type.htm">Open Type dialog</a>. 
             </p>
           </td>
         </tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPath.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPath.htm
index 5602aef..1a717e6 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPath.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPath.htm
@@ -17,18 +17,18 @@
     The Factory Path preference pane specifies which processors are enabled and permits configuration of 
     individual processors. <i>Settings in the Factory Path preference pane will only have an effect if
     annotation processing is enabled in the Annotation Processing preference pane.</i></p>
-    <p>The pane displays a list of all the plugins and jar files that contain annotation processors that
+    <p>The pane displays a list of all the plug-ins and jar files that contain annotation processors that
     may be applied to the project.  To add or remove jar files from the list, use the corresponding buttons.
     Jar files may be specified by absolute path using the Add External Jars... button, or by path relative
-    to a classpath variable using the Add Variable... button.  All installed plugins that extend the
+    to a classpath variable using the Add Variable... button.  All installed plug-ins that extend the
     org.eclipse.jdt.apt.annotationProcessorFactory extension point are also displayed in the list.</p>
-    <p>To enable a particular plugin or jar file, select the corresponding checkbox within the list.
-    Processors within plugins and jars that are not checked will not be executed.  If more than one processor
+    <p>To enable a particular plug-in or jar file, select the corresponding checkbox within the list.
+    Processors within plug-ins and jars that are not checked will not be executed.  If more than one processor
     claims the same annotation, only first one on the list will be served that annotation.  To reorder the
     list, use the Up and Down buttons.</p>
     <p>The Advanced... button leads to the <a href="ref-apt-factoryPathOptions.htm">Advanced Factory Path Options
-    dialog</a>, which is used to view the individual processors within a plugin or jar file
-    and to configure additional options. If a plugin or jar file on the factory path is known to contain
+    dialog</a>, which is used to view the individual processors within a plug-in or jar file
+    and to configure additional options. If a plug-in or jar file on the factory path is known to contain
     processors but it does not show any contents in the Advanced Factory Path Options dialog, it may be missing
     the META-INF/services entry or plugin.xml entry that is required to declare the processors. More
     information about developing annotation processors is available in the 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPathOptions.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPathOptions.htm
index 2c9c549..03024c7 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPathOptions.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-apt-factoryPathOptions.htm
@@ -12,7 +12,7 @@
       Advanced Factory Path Options Dialog
     </h1>
     <p>The Advanced Factory Path Options dialog is reached from the <a href="ref-apt-factoryPath.htm">Factory Path</a>
-    preferences pane.  It is used to view the individual processors within a plugin or jar file
+    preferences pane.  It is used to view the individual processors within a plug-in or jar file
     and to configure additional options.  Options on this dialog do not normally need to be changed from
     the default.</p>
     <dl>
@@ -23,7 +23,7 @@
     processor classes are loaded at the beginning of a build, executed over the full set of Java types,
     and then unloaded, as they would be when running apt at the command line.  Processors run in this
     mode are only run during a full build, not during incremental builds.
-    This option is only configurable for jar files; for plugins it is always set to false.  
+    This option is only configurable for jar files; for plug-ins it is always set to false.  
     This option only applies to processors using the Java 5 Mirror APIs. It does not affect processors
     using the Java 6 annotation processing APIs.
     </dd>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-element-filters.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-element-filters.htm
index d1b14ff..6cd1cd9 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-element-filters.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-element-filters.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Java Element Filters Dialog
@@ -91,7 +91,7 @@
       <img src="../images/ngrelr.png" alt="Related reference" border="0" >
     </p>
     <p>
-      <a href="../reference/views/ref-view-package-explorer.htm">Package explorer view</a>
+      <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer view</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-search.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-search.htm
index c382fe6..18c742b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-search.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-java-search.htm
@@ -19,48 +19,71 @@
 
     <p>In this field, type the expression for which you wish to search, using the wildcard characters mentioned in the dialog as needed. This field is initialized based on the
     current selection.</p>
-
-    <ul>
-      <li>Depending on what is searched for, the search string should describe the element:
-      <ul>
-        <li>Type: the type name (may be qualified or not).<br>
-        	<i>Examples:</i>
-        	<ul>
-        		<li><i>org.eclipse.jdt.internal.core.JavaElement</i></li>
-        		<li><i>MyClass.Inner</i></li>
-        		<li><i>Foo</i></li>
-        	</ul>
-        </li>
-        <li>Method: the defining type name (may be qualified or not as for Type search, optional), the method selector and its parameters (optional).<br>
-        	<i>Examples:</i>
-        	<ul>
-        		<li><i>org.eclipse.jdt.internal.core.JavaElement.getHandleFromMemento(MementoTokenizer, WorkingCopyOwner)</i></li>
-        		<li><i>equals(Object)</i></li>
-        		<li><i>foo</i></li>
-        	</ul>
-        </li>
-        <li>Package: the package name for a package (e.g. org.eclipse.jdt.internal.core)</li>
-        <li>Constructor: the defining type name (may be qualified or not as for Type search, optional) and the constructor parameters (optional).<br>
-        	<i>Examples:</i>
-        	<ul>
-        		<li><i>org.eclipse.jdt.internal.core.JavaElement(JavaElement, String)</i></li>
-        		<li><i>Foo</i></li>
-        	</ul>
-             Note that the constructor name should not be entered as it is always the same as the type name.
-        </li>
-        <li>Field: the defining type name (qualified or not as for Type search, optional) and the field name.<br>
-        	<i>Examples:</i>
-        	<ul>
-        		<li><i>org.eclipse.jdt.internal.core.JavaElement.name</i></li>
-        		<li><i>foo</i></li>
-        	</ul>
-        </li>
-      </ul>
-      </li>
-      <li>From the drop-down menu, you can choose to repeat (or modify) a recent search.<br>
-       Select the <span class="control">Case sensitive</span> field to force a case aware search. <span class="control">Case sensitive</span> is enabled when a custom search
-      string is entered.</li>
-    </ul>
+<!-- Description copied from Javadoc of org.eclipse.jdt.core.search.SearchPattern.createPattern(String, int, int, int): -->
+ <ul>
+ 	<li>Type patterns have the following syntax:
+ 		<p><b><code>[qualification '.']typeName ['<' typeArguments '>']</code></b></p>
+			<p>Examples:</p>
+			<ul>
+ 			<li><code>java.lang.Object</code></li>
+				<li><code>Runnable</code></li>
+				<li><code>List<String></code></li>
+			</ul>
+			<p>
+			Type arguments can be specified to search for references to parameterized types
+ 		using following syntax:</p><p>
+ 		<b><code>'<' { [ '?' {'extends'|'super'} ] type ( ',' [ '?' {'extends'|'super'} ] type )* | '?' } '>'</code></b>
+ 		</p><div style="font-style:italic;">
+ 		Note that:
+ 		<ul>
+ 			<li>'*' is not valid inside type arguments definition <></li>
+ 			<li>'?' is treated as a wildcard when it is inside <> (i.e. it must be put on first position of the type argument)</li>
+ 		</ul>
+ 		</div>
+ 		<br>
+ 	</li>
+ 	<li>Method patterns have the following syntax:
+ 		<p><b><code>[declaringType '.'] ['<' typeArguments '>'] methodName ['(' parameterTypes ')'] [returnType]</code></b></p>
+			<p>Type arguments have the same syntax as explained in the type patterns section.</p>
+			<p>Examples:</p>
+			<ul>
+				<li><code>java.lang.Runnable.run() void</code></li>
+				<li><code>main(*)</code></li>
+				<li><code><String>toArray(String[])</code></li>
+			</ul>
+ 		<br>
+		</li>
+ 	<li>Constructor patterns have the following syntax:
+			<p><b><code>['<' typeArguments '>'] [declaringQualification '.'] typeName ['(' parameterTypes ')']</code></b></p>
+			<p>Type arguments have the same syntax as explained in the type patterns section.</p>
+			<p><i>Note that the constructor name should not be entered as it is always the same as the type name.</i></p>
+			<p>Examples:</p>
+			<ul>
+				<li><code>java.lang.Object()</code></li>
+				<li><code>Test(*)</code></li>
+				<li><code><Exception>Sample(Exception)</code></li>
+			</ul>
+ 		<br>
+ 	</li>
+ 	<li>Field patterns have the following syntax:
+			<p><b><code>[declaringType '.'] fieldName [fieldType]</code></b></p>
+			<p>Examples:</p>
+			<ul>
+				<li><code>java.lang.String.serialVersionUID long</code></li>
+				<li><code>field*</code></li>
+			</ul>
+ 		<br>
+ 	</li>
+ 	<li>Package patterns have the following syntax:
+			<p><b><code>packageNameSegment {'.' packageNameSegment}</code></b></p>
+			<p>Examples:</p>
+			<ul>
+				<li><code>java.lang</code></li>
+				<li><code>org.e*.jdt.c*e</code></li>
+			</ul>
+ 	</li>
+ </ul>
+<!-- End of copy -->
 
     <h2 class="Head">Search For</h2>
 
@@ -95,25 +118,37 @@
 
       <li>Write access (available only when searching for fields)</li>
       
-      <li>Match locations (available only when searching for types).<br>
-        Match locations allow to further narrow the location of matches. Select the location
-        where to search for the type reference.
+      <li>Match locations (available only when searching for types or methods references).
+        <p>Match locations allow to further narrow the location of matches.</p>
+        <p>Select the location where to search for:</p>
         <ul>
-        <li>Super class declarations</li>
-		<li>Annotations</li>
-		<li>Field types</li>
-		<li>Local variable types</li>       
-        <li>Method return types</li>
-		<li>Method parameter types</li>
-		<li>Thrown exception types</li>
-		<li>Type parameter bounds</li>
-        <li>Wildcard bounds</li>
-		<li>Type argument</li>
-		<li>Cast expressions</li>
-		<li>Catch clauses</li>
-		<li>Class instance creations</li>
-		<li>'instanceof' checks</li>		
-		</ul>
+          <li>type reference:
+            <ul>
+              <li>Super class declarations</li>
+              <li>Annotations</li>
+              <li>Field types</li>
+              <li>Local variable types</li>
+              <li>Method return types</li>
+              <li>Method parameter types</li>
+              <li>Thrown exception types</li>
+              <li>Type parameter bounds</li>
+              <li>Wildcard bounds</li>
+              <li>Type argument</li>
+              <li>Cast expressions</li>
+              <li>Catch clauses</li>
+              <li>Class instance creations</li>
+              <li>'instanceof' checks</li>
+            </ul>
+          </li>
+          <li>method reference:
+            <ul>
+              <li>'this' references</li>
+              <li>Implicit 'this' references</li>
+              <li>'super' references</li>
+              <li>Qualified references</li>
+            </ul>
+          </li>
+        </ul>
       </li>
     </ul>
 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-javadoc-location.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-javadoc-location.htm
index 98e3795..26824d4 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-javadoc-location.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-javadoc-location.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -34,7 +34,7 @@
 	</p>
     <ul>
       <li>
-        <strong>Open External Javadoc</strong> in the <a href="ref-menu-navigate.htm">Navigate menu</a> to find the Javadoc location of an element
+        <strong>Open Attached Javadoc</strong> in the <a href="ref-menu-navigate.htm">Navigate menu</a> to open the attached Javadoc of an element
       </li>
       <li>
         Context Help (F1) to point to a Javadoc location
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-tostring.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-tostring.htm
index b7bcce2..34a9a52 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-tostring.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-dialog-tostring.htm
@@ -122,6 +122,21 @@
       <tr>
         <td valign="top">
           <p>
+            Sort
+          </p>
+        </td>
+        <td valign="top">
+          <p>
+            Sort elements in every group in lexicographical order.
+          </p>
+        </td>
+        <td valign="top">
+        <p>n/a</p>
+        </td>
+      </tr>
+      <tr>
+        <td valign="top">
+          <p>
             Insertion point
           </p>
         </td>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-icons.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-icons.htm
index f93b1de..ef222a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-icons.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-icons.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -46,10 +46,10 @@
         </tr>
         <tr>
           <td valign="middle" align="center">
-            <img src="../images/org.eclipse.jdt.ui/obj16/file_obj.png"  alt="file without icon assigned to its type"><br>
+            <img src="../images/org.eclipse.jdt.ui/obj16/file_obj.png"  alt="generic file (unknown content type)"><br>
           </td>
           <td valign="top">
-            file without icon assigned to its type<br>
+            generic file (unknown content type)<br>
           </td>
         </tr>
         <tr>
@@ -86,7 +86,7 @@
         </tr>
         <tr>
           <td valign="middle" align="center">
-            <img src="../images/org.eclipse.jdt.ui/obj16/testfile_obj.gif"  alt="JUnit test result file"><br>
+            <img src="../images/org.eclipse.jdt.junit/obj16/testfile_obj.gif"  alt="JUnit test result file"><br>
           </td>
           <td valign="top">
             JUnit test result file<br>
@@ -405,6 +405,14 @@
         </tr>
         <tr>
           <td valign="middle" align="center">
+            <img src="../images/org.eclipse.jdt.ui/ovr16/error_co_buildpath.png"  alt="build path error decorator"><br>
+          </td>
+          <td valign="top">
+            decorates Java projects and working sets that contain build path errors<br>
+          </td>
+        </tr>
+        <tr>
+          <td valign="middle" align="center">
             <img src="../images/org.eclipse.jdt.ui/ovr16/error_co.png" alt="Abstract Overlay" ><br>
           </td>
           <td valign="top">
@@ -472,8 +480,32 @@
             synchronized member<br>
           </td>
         </tr>
+        <tr>
+          <td valign="middle" align="center">
+            <img src="../images/org.eclipse.jdt.ui/ovr16/native_co.png" alt="Native Overlay" ><br>
+          </td>
+          <td valign="top">
+            native method<br>
+          </td>
+        </tr>
+        <tr>
+          <td valign="middle" align="center">
+            <img src="../images/org.eclipse.jdt.ui/ovr16/transient_co.png" alt="Transient Overlay" ><br>
+          </td>
+          <td valign="top">
+            transient field<br>
+          </td>
+        </tr>
+        <tr>
+          <td valign="middle" align="center">
+            <img src="../images/org.eclipse.jdt.ui/ovr16/volatile_co.png" alt="Volatile Overlay" ><br>
+          </td>
+          <td valign="top">
+            volatile field<br>
+          </td>
+        </tr>
         <!--
-          native_co.png and volatile_co.png, and read.png and write.png are currently unused.
+          read.png and write.png are currently unused.
           sync_impl.png and sync_over.png are self-explanatory combinations of the above overlays.
         -->
         <tr>
@@ -481,7 +513,8 @@
             <img src="../images/org.eclipse.jdt.ui/ovr16/run_co.png" alt="Run Overlay" ><br>
           </td>
           <td valign="top">
-            type with public static void main(String[] args)<br>
+            type with<br>
+            public static void main(String[] args)<br>
           </td>
         </tr>
         <tr>
@@ -515,7 +548,7 @@
             <img src="../images/org.eclipse.jdt.ui/ovr16/focus_ovr.png" alt="Focus Overlay" ><br>
           </td>
           <td valign="top">
-            type with focus in Type hierarchy<br>
+            type with focus in Type Hierarchy<br>
           </td>
         </tr>
         <tr>
@@ -952,9 +985,15 @@
     </td>
   </tr>
   <tr> 
-    <td valign="middle" align="center"> <img src="../images/org.eclipse.jdt.debug.ui/ovr16/installed_ovr.png"  alt="adornment that marks a line breakpoints as installed"><br>
+    <td valign="middle" align="center"> <img src="../images/org.eclipse.debug.ui/ovr16/skip_breakpoint_ov.gif"  alt="adornment that marks a breakpoint as skipped"><br>
+    </td>
+    <td valign="top"> adornment that marks a breakpoint as skipped<br>
+    </td>
+  </tr>
+  <tr> 
+    <td valign="middle" align="center"> <img src="../images/org.eclipse.jdt.debug.ui/ovr16/installed_ovr.png"  alt="adornment that marks a line breakpoint as installed"><br>
     </td>
-    <td valign="top"> adornment that marks a line breakpoints as installed<br>
+    <td valign="top"> adornment that marks a line breakpoint as installed<br>
     </td>
   </tr>
   <tr> 
@@ -1311,6 +1350,14 @@
         </tr>
         <tr>
           <td valign="middle" align="center">
+            <img src="../images/org.eclipse.jdt.ui/obj16/correction_multi_fix.gif"  alt="fix multiple problems"><br>
+          </td>
+          <td valign="top">
+            fix multiple problems<br>
+          </td>
+        </tr>
+        <tr>
+          <td valign="middle" align="center">
             <img src="../images/org.eclipse.jdt.ui/obj16/correction_move.png"  alt="move to another package"><br>
           </td>
           <td valign="top">
@@ -1396,7 +1443,7 @@
             <img src="../images/org.eclipse.ltk.ui.refactoring/obj16/file_change.png"  alt="file change"><br>
           </td>
           <td valign="top">
-            file change
+            file change<br>
           </td>
         </tr>
         <tr>
@@ -1504,7 +1551,7 @@
             <img src="../images/org.eclipse.jdt.ui/obj16/occ_write.png"  alt="write access to local or field"><br>
           </td>
           <td valign="top">
-			write access to local or field          
+			write access to local or field
 		  </td>
         </tr>
       </tbody>
@@ -1512,25 +1559,25 @@
     <br>
     
     <h2>
-      Type hierarchy view
+      Type Hierarchy view
     </h2>
     <table cellspacing="0" cellpadding="5" border="1" width="300">
       <colgroup> <col width="25px"> </colgroup>
       <tbody>
         <tr>
           <td valign="middle" align="center">
-            <img src="../images/org.eclipse.jdt.ui/obj16/classfo_obj.png"  alt="type from non selected package"><br>
+            <img src="../images/org.eclipse.jdt.ui/obj16/classfo_obj.png"  alt="type outside of selected package"><br>
           </td>
           <td valign="top">
-            type from non selected package<br>
+            type outside of selected package<br>
           </td>
         </tr>
         <tr>
           <td valign="middle" align="center">
-            <img src="../images/org.eclipse.jdt.ui/obj16/intf_obj.png"  alt="interface from non selected package"><br>
+            <img src="../images/org.eclipse.jdt.ui/obj16/intf_obj.png"  alt="interface outside of selected package"><br>
           </td>
           <td valign="top">
-            interface from non selected package<br>
+            interface outside of selected package<br>
           </td>
         </tr>
       </tbody>
@@ -1550,11 +1597,6 @@ error_gray_obj.png
 warning_gray_obj.png
 -->
 
-<!-- unsure what to do:
-jworkingSet_obj.png
--->
-
-    
   </body>
 </html>
 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-formatter.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-formatter.htm
new file mode 100644
index 0000000..b1ddc31
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-formatter.htm
@@ -0,0 +1,116 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+    <meta http-equiv="Content-Style-Type" content="text/css"/>
+    <title>
+      Formatter
+    </title>
+    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"/>
+  </head>
+  <body>
+
+    <h1>
+      Formatter
+    </h1>
+
+    <p>
+      In the Java editor press <b>Ctrl+Shift+F</b> on code to format it. If no
+      selection is set then the entire source is formatted otherwise only the
+      selection will be. Some tips for using the formatter are listed in the
+      paragraphs of this chapter.
+    </p>
+
+    <p>
+      Note that the Java Formatter preferences are accessible on the 
+      <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.CodeFormatterPreferencePage)")'>
+      <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Java Formatter preference page"/>
+      <b>Java Formatter</b></a> preference page.
+    </p>
+
+    <h2>
+      Disabling formatter inside sections
+    </h2>
+    <p>
+      You can disable/enable the formatter in one or several sections in the
+      code as shown in the sample below:</p>
+    <img src="images/formatter-disabling-enabling-tags.png"
+         alt="Java formatter example. Some code using disabling and enabling tags."/>
+    <p>
+      The snippet above use default tag names, but they can be changed on the
+      <b>Off/On tags</b> tab of the Java Formatter preference page.</p>
+
+    <h2>
+      Wrap outermost method calls
+    </h2>
+    <p>
+      Since version 3.6, the Java formatter now tries to wrap the outermost
+      method calls first to have a better output when wrapping nested method
+      calls.</p>
+    <p>
+      Here is an example of a formatted code where the formatter has
+      wrapped the line between the arguments of the outermost message call
+      to keep each nested method call on a single line:</p>
+    <img src="images/formatter-prefer-wrapping-outer-expressions.png"
+         alt="Java formatter example. The simple snippet with the formatted nested method calls."/>
+    <p>
+      A new preference allows you to disable this strategy, typically if you
+      want to format your code as before, then uncheck the
+      <b>Prefer wrapping outer expressions</b> preference accessible on the
+      <b>Line wrapping</b> tab of the Java Formatter preference page.</p>
+    <p>
+      <b>Note:</b> Currently the new strategy only applies to nested method
+      calls, but that might be extended to other nested expressions in future
+      versions.</p>
+
+    <h2>
+      Condense Javadoc and block comments
+    </h2>
+    <p>
+      Users can reduce the number of lines of formatted multi-lines
+      comments as shown in the example below:</p>
+    <img src="images/formatter-condense-multi-lines-comments.png"
+         alt="Java formatter example. The simple snippet with the block and Javadoc comments formatted with less lines than with the default profile."/>
+    <p>
+      To activate this behavior uncheck the
+      <b>/* and */ on separate lines</b> preference accessible on the
+      <b>Comments</b> tab of the Java Formatter preference page.</p>
+    <p>
+      The same kind of preference is also available for the Javadoc comments.</p>
+
+    <h2>
+      Preserve user line breaks
+    </h2>
+    <p>
+      Users can preserve line breaks by not joining lines in code or comments.</p>
+    <p>
+      For example, the already wrapped lines of the <code>return</code>
+      statement in the following test case:</p>
+    <img src="images/formatter-join-lines-before.png" alt="Example of Code to Format"/>
+    <p>
+      will be preserved by the formatter when the <b>Never join lines</b>
+      preference is used, hence produces the following output when formatted:</p>
+    <img src="images/formatter-join-lines-after.png" alt="Coded Formatted with Never Join Lines"/>
+    <p>
+      To activate this behavior check the <b>Never join lines</b> preference
+      accessible on the <b>Line Wrapping</b> and the <b>Comments</b> tabs of
+      the Java Formatter preference page.</p>
+
+    <img src="../images/ngrelc.png" alt="Related concepts" border="0"/> 
+    <p>
+      <a href="../concepts/concept-java-editor.htm">Java editor</a><br/>
+       <a href="../concepts/concept-jdt.htm">Java development tools (JDT)</a>
+    </p>
+    <p>
+      <img src="../images/ngrelr.png"  alt="Related reference"/>
+    </p>
+    <p>
+      <a href="../reference/ref-menu-edit.htm">Edit menu</a><br/>
+      <a href="../reference/preferences/java/ref-preferences-editor.htm">Java editor preferences</a><br/>
+      <a href="../reference/preferences/java/codestyle/ref-preferences-formatter.htm">Formatter preferences</a><br/>
+    </p>
+    
+  </body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickassist.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickassist.htm
index 180de3c..d42b14b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickassist.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickassist.htm
@@ -209,14 +209,14 @@ instanceof Vector) {<br>
       <td style="vertical-align: top;" width="15%">select a part of a string literal</td>
     </tr>
     <tr>
-      <td style="vertical-align: top;" width="15%">Convert string concatination to StringBuilder (J2SE 5.0) or StringBuffer</td>
+      <td style="vertical-align: top;" width="15%">Convert string concatenation to StringBuilder (J2SE 5.0) or StringBuffer</td>
       <td style="vertical-align: top; text-align: right;" width="34%"><code>"Hello " + name</code></td>
       <td style="vertical-align: top;">></td>
       <td style="vertical-align: top;" width="34%"><code>StringBuilder builder= new StringBuilder();<br>builder.append("Hello ");<br>builder.append(name);</code></td>
       <td style="vertical-align: top;" width="15%">select a string literal</td>
     </tr>
     <tr>
-      <td style="vertical-align: top;" width="15%">Convert string concatination to MessageFormat</td>
+      <td style="vertical-align: top;" width="15%">Convert string concatenation to MessageFormat</td>
       <td style="vertical-align: top; text-align: right;" width="34%"><code>"Hello " + name</code></td>
       <td style="vertical-align: top;">></td>
       <td style="vertical-align: top;" width="34%"><code>MessageFormat.format("Hello {0}", name);</code></td>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickfix.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickfix.htm
index 2a19625..71469fa 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickfix.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-java-editor-quickfix.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
 
@@ -159,6 +159,8 @@ contains this information for all applicable proposals. To fix all problems of t
 				<li>Add missing Javadoc comments</li>
 				<li>Add missing Javadoc tags</li>
 				<li>Suppress a warning using @SuppressWarnings</li>
+				<li>Throw the allocated object</li>
+				<li>Return the allocated object</li>
 			</ul>
 			</td>
 		</tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-jdt-faq.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-jdt-faq.htm
index 1f8027a..c3e8dc2 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-jdt-faq.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-jdt-faq.htm
@@ -66,7 +66,7 @@
       How do I prevent having my documentation files from being copied to the project's output folder?
     </h3>
     <p>
-      Use source folders and put any resources that you do not want to be copied to the output folder into a separate folder that is not included on the class path.You can also
+      Use source folders and put any resources that you do not want to be copied to the output folder into a separate folder that is not included on the class path.  You can also
       set a resource filter in the Java compiler preferences:<strong> Window > Preferences > Java > Compiler > Building</strong> to for example *.doc.
     </p>
     <h3>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-navigate.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-navigate.htm
index bc380c7..e10502b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-navigate.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-navigate.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -123,10 +123,24 @@
 			</p>
           </td>
           <td>
-            Ctrl + Alt + H
+            Ctrl+Alt+H
           </td>
         </tr>
-		  
+		<tr>
+          <td align="left" valign="top">
+            <p>
+              Open Implementation
+            </p>
+          </td>
+          <td align="left" valign="top">
+            <p>
+				Opens the implementation of the currently selected method if there's only one implementor, else opens the Quick Type Hierarchy on that method.
+			</p>
+          </td>
+          <td>  
+                     
+          </td>
+        </tr>  
         <tr>
           <td align="left" valign="top">
             <p>
@@ -145,16 +159,16 @@
         </tr>
         <tr>
           <td>
-            Open External Javadoc
+            Open Attached Javadoc
           </td>
           <td>
             Opens the Javadoc documentation of the currently selected element or text selection. The location of the Javadoc of a JAR or a project is specified in the <a href=
-            "ref-dialog-javadoc-location.htm">Javadoc location property page</a> on projects or JARs. Note that this external Javadoc documentation may not be up to date with the
+            "ref-dialog-javadoc-location.htm">Javadoc location property page</a> on projects or JARs. Note that this attached Javadoc documentation may not be up to date with the
             Javadoc specified in the current code. You can create Javadoc documentation for source files in a Java project using the <a href="ref-export-javadoc.htm">Javadoc
             export wizard</a>. 
           </td>
           <td>
-            Shift + F2
+            Shift+F2
           </td>
         </tr>
         <tr align="left" valign="top">
@@ -165,7 +179,7 @@
             Brings up the <a href="ref-dialog-open-type.htm">Open Type</a> dialog to open a type in the editor. The Open Type selection dialog shows all types existing in the workspace.
           </td>
           <td>
-            Ctrl + Shift + T
+            Ctrl+Shift+T
           </td>
         </tr>
         <tr align="left" valign="top">
@@ -177,7 +191,7 @@
             shows all types that exist in the workspace.
           </td>
           <td>
-            Ctrl + Shift + H
+            Ctrl+Shift+H
           </td>
         </tr>
 		<tr>
@@ -190,7 +204,7 @@
             <p>Opens the Open Resource dialog to open any resource in your workspace.</p>
           </td>
           <td>
-            Ctrl + Shift + R
+            Ctrl+Shift+R
           </td>
         </tr>
 		<tr>
@@ -203,7 +217,7 @@
             Shows the currently selected element in the breadcrub bar of the Java editor.
           </td>
           <td>
-            Ctrl + Shift + B
+            Ctrl+Shift+B
           </td>
         </tr>        
         <tr align="left" valign="top">
@@ -217,7 +231,7 @@
 				  <li>Outline</li>
 			  </ul>
 		  </td>
-          <td>Alt + Shift + W</td>
+          <td>Alt+Shift+W</td>
         </tr>
         <tr align="left" valign="top">
           <td>
@@ -226,7 +240,7 @@
           <td>
             Opens the lightweight outliner for the currently selected type.
           </td>
-          <td>Ctrl + O
+          <td>Ctrl+O
           </td>
         </tr>
 	   <tr align="left" valign="top">
@@ -236,29 +250,7 @@
           <td>
             Opens the lightweight hierarchy viewer for the currently selected type.
           </td>
-          <td>Ctrl + T
-          </td>
-        </tr>
-        <tr>
-          <td>
-            Next / Next Annotation / <a href="views/debug/ref-nextthread.htm">Next Thread</a>
-          </td>
-          <td>
-            Selects the next annotation in the Java editor.  Selects the next suspended thread in the <a href="views/debug/ref-debug_view.htm">Debug View</a>.
-          </td>
-          <td>
-            Ctrl + .
-          </td>
-        </tr>
-        <tr>
-          <td>
-            Previous / Previous Annotation / <a href="views/debug/ref-previousthread.htm">Previous Thread</a>
-          </td>
-          <td>
-            Selects the previous annotation in the java editor. Selects the previous suspended thread in the <a href="views/debug/ref-debug_view.htm">Debug View</a>.
-          </td>
-          <td>
-            Ctrl + ,
+          <td>Ctrl+T
           </td>
         </tr>
         <tr>
@@ -269,7 +261,7 @@
             Reveals the location where the last edit occurred.
           </td>
           <td>
-            Ctrl + Q
+            Ctrl+Q
           </td>
         </tr>
         <tr>
@@ -280,7 +272,7 @@
             Opens an a dialog which allows entering the line number to which the editor should jump to. Editor only.
           </td>
           <td>
-            Ctrl + L
+            Ctrl+L
           </td>
         </tr>
 		<tr>
@@ -289,7 +281,7 @@
           </td>
           <td>Reveals the previous editor location in the location history.</td>
           <td>
-            Alt + Left
+            Alt+Left
           </td>
         </tr>
 		<tr>
@@ -298,7 +290,7 @@
 		  </td>
           <td>Reveals the next editor location in the location history.</td>
           <td>
-            Alt + Right
+            Alt+Right
           </td>
         </tr>
       </tbody>
@@ -324,8 +316,8 @@
       <img border="0"  src="../images/ngrelr.png" alt="Related reference">
       </p>
       <p>
-      <a href="views/ref-view-package-explorer.htm">Package explorer view</a><br>
-	  <a href="views/ref-type-hierarchy.htm">Type hierarchy view</a><br>
+      <a href="views/ref-view-package-explorer.htm">Package Explorer view</a><br>
+	  <a href="views/ref-type-hierarchy.htm">Type Hierarchy view</a><br>
 	  <a href="ref-dialog-javadoc-location.htm">Javadoc location properties</a><br>
 	  <a href="ref-export-javadoc.htm">Javadoc export wizard</a>
     </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm
index 6d00b6f..906308b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-menu-refactor.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 <meta name="copyright"
-	content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+	content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <title>Refactor Actions</title>
@@ -232,19 +232,18 @@
 		</tr>
 		<tr>
 
-			<td align="left" valign="top">Convert Member Type to Top Level</td>
+			<td align="left" valign="top">Move Type to New File</td>
 
-			<td>Creates a new Java compilation unit for the selected member
+			<td>Creates a new Java compilation unit for the selected member type or the selected secondary 
 			type, updating all references as needed. For non-static member types,
 			a field is added to allow access to the former enclosing instance, if
 			necessary. <br>
-			<table border="0" cellspacing="1" cellpadding="5" summary="Convert Member Type to Top Level refactoring">
+			<table border="0" cellspacing="1" cellpadding="5" summary="Move Type to New File refactoring">
 				<tbody>
 					<tr>
 						<td align="left" valign="top">Available:</td>
-						<td>Member types or text resolving to a member type.
-						<br>This refactoring is also available as <a href="ref-java-editor-quickassist.htm">quick assist</a> on
-						member classes selected in the editor.
+						<td>Member types, secondary types, or text resolving to a member type or a secondary type.
+						<br>
 						</td>
 					</tr>
 				</tbody>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm
index 57dd325..703769f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
 
@@ -23,7 +23,7 @@
     <p>Source folders are top-level folders in the project hierarchy. They are the root of packages containing .java files. 
     The compiler will translate the contained files to .class files that will be written to the output folder.</p>
 <p>Source folders allow to structure the project, for example to separate 
-test from the application in two source folders. Within a source folder, a more detailed structuring can be acived by using packages.</p> 
+test from the application in two source folders. Within a source folder, a more detailed structuring can be achieved by using packages.</p> 
 <p>Each source folder can define an exclusion filter to specify which 
 resources inside the folder should not be visible to the compiler.</p>
 <p>Resources existing in source folders are copied to the output folder unless the setting in the <a href="preferences/java/compiler/ref-preferences-building.htm">Java > Compiler > Building</a> preference
@@ -85,7 +85,7 @@ resources inside the folder should not be visible to the compiler.</p>
 		<tr>
 			<td align="left" valign="top" width="20%">Exclusion filter</td>
 
-			<td align="left" valign="top">Selects which resources are not visible to the compiler</td>
+			<td align="left" valign="top">Selects which resources are not visible to the compiler. For details see <a href="../concepts/concept-inclusion-exclusion-patterns.htm">Inclusion and exclusion patterns</a>.</td>
 		</tr>
 
 		<tr>
@@ -97,7 +97,7 @@ resources inside the folder should not be visible to the compiler.</p>
 		<tr>
 			<td align="left" valign="top">Native library location</td>
 
-			<td align="left" valign="top">Defines the folder that contains the native libararies
+			<td align="left" valign="top">Defines the folder that contains the native libraries
 			  (for example 'dll' or 'o' files) required at runtime by the sources in the source folder.
 			</td>
 		</tr>
@@ -300,6 +300,7 @@ resources inside the folder should not be visible to the compiler.</p>
     <p>
      <a href="../concepts/concept-build-classpath.htm">Build classpath</a><br>
      <a href="../concepts/concept-classpath-variables.htm">Classpath variables</a><br>
+     <a href="../concepts/concept-inclusion-exclusion-patterns.htm">Inclusion and exclusion patterns</a><br>
     </p>
      <p>
       <img src="../images/ngrelr.png" alt="Related reference" border="0" >
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-listcontent.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-listcontent.htm
index b697f60..7fa7670 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-listcontent.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-listcontent.htm
@@ -50,7 +50,7 @@ A helper method returns a string listing items of a given array, in the form of
 <p>The same solution is used for all JDK versions: <code>aList.subList(0, Math.min(aList.size(), maxLen))</code></p>
 
 <h2>Listing limited contents of <code>Collection</code>s (helper method)</h2>
-<p>A <code>Collection</code> cannot be turned into a <code>List</code> without copying its contents (assuming iy isn't a <code>List</code> already), so a helper method is used to iterate over first <code>maxLen</code> elements and build a string out of them:</p>
+<p>A <code>Collection</code> cannot be turned into a <code>List</code> without copying its contents (assuming it isn't a <code>List</code> already), so a helper method is used to iterate over first <code>maxLen</code> elements and build a string out of them:</p>
 <pre>private String toString(Collection collection, int maxLen) {
 	StringBuffer stringBuffer = new StringBuffer();
 	stringBuffer.append("[");
@@ -116,7 +116,7 @@ A helper method returns a string listing items of a given array, in the form of
 <tr>
 <th>jdk 1.6, limit elements</th>
 <td><code>member.subList()</code></td>
-<td>helper method <code>toSting(Collection)</code></td>
+<td>helper method <code>toString(Collection)</code></td>
 <td>helper method <code>toString(Collection)</code> with <code>map.entrySet()</code></td>
 <td><code>Arrays.toString(Arrays.copyOf(member, ...))</code></td>
 <td><code>Arrays.asList(array).subList()</code></td>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-styles.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-styles.htm
index ab5404c..c576f72 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-styles.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-tostring-styles.htm
@@ -82,7 +82,7 @@ return builder.toString();</pre>
 This style is very pleasant for relatively short list of elements, but with longer ones it becomes hard to see which fields are associated with which variables. Unfortunately, the <b>"Skip null values"</b> option cannot be used with this style.
 <pre>return String.format("FooClass [aFloat=%s, aString=%s, anInt=%s, anObject=%s]",
   aFloat, aString, anInt, anObject);</pre>
-Because there's no <code>String.format()</code> in JDK 1.4 and ealier, <code>MessageFormat.format()</code> is used instead:
+Because there's no <code>String.format()</code> in JDK 1.4 and earlier, <code>MessageFormat.format()</code> is used instead:
 <pre>return MessageFormat.format("FooClass [aFloat={0}, aString={1}, anInt={2}, anObject={3}]", 
   new Object[] { new Float(aFloat), aString, new Integer(anInt), anObject });</pre>
 </li>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-class.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-class.htm
index 36a4578..3454961 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-class.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-class.htm
@@ -18,7 +18,7 @@
     <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.NewClassCreationWizard)")'>
     <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the New Java Class wizard">
     <b>New Java Class</b></a> wizard
-    helps you to create a new Java class in in a Java project.</p>
+    helps you to create a new Java class in a Java project.</p>
 
     <table border="1" cellspacing="0" cellpadding="5" summary="New Java class settings">
       <caption>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-enum.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-enum.htm
index c4ebb3a..f171978 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-enum.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-enum.htm
@@ -18,7 +18,7 @@
     <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.NewEnumCreationWizard)")'>
     <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the New Java Enum Type wizard">
     <b>New Java Enum Type</b></a> wizard
-    helps you to create a new Java enum in in a Java project.</p>
+    helps you to create a new Java enum in a Java project.</p>
 
     <table border="1" cellspacing="0" cellpadding="5" summary="New Java enum options">
       <caption>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-java-project.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-java-project.htm
index 15c9ab6..a7c455e 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-java-project.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/ref-wizard-java-project.htm
@@ -2,7 +2,7 @@
 
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
@@ -41,26 +41,12 @@
 
          <tr>
           <td valign="top">
-            Contents
+            Location
           </td>
           <td valign="top">
-            <dl>
-              <dt>
-                <strong>Create new project in workspace:</strong>
-              </dt>
-              <dd>
-                When selected, the New Project Wizard will create a new project with the specified name in the workspace.
-              </dd>
-              <dt>
-                <strong>Create project from existing source:</strong>
-              </dt>
-              <dd>
-                 When selected, you can specify the location from which the New Java Project Wizard will retrieve
-                 an existing Java project. In this case the wizard will analyze the existing project and set up the
-                 build path automatically.
-                 <br>Click on <strong>Browse...</strong> to browse for a location of an existing Java project.
-              </dd>
-            </dl>
+            When <strong>'Use default location'</strong> is selected, the New Project Wizard will create a new project with the specified name in the workspace. 
+            <br><br>Otherwise, you can specify the location from which the New Java Project Wizard will retrieve an existing Java project. In this case the wizard will analyze the existing project and set up the build path automatically. 
+			Click on <strong>Browse...</strong> to browse for a location of an existing Java project.                 
           </td>
           <td valign="top">
              workspace
@@ -164,7 +150,7 @@
     <p>Source folders are top-level folders in the project hierarchy. They are the root of packages containing .java files. 
     The compiler will translate the contained files to .class files that will be written to the output folder.</p>
 <p>Source folders allow to structure the project, for example to separate 
-test from the application in two source folders. Within a source folder, a more detailed structuring can be acived by using packages.</p> 
+test from the application in two source folders. Within a source folder, a more detailed structuring can be achieved by using packages.</p> 
 <p>Each source folder can define an exclusion filter to specify which 
 resources inside the folder should not be visible to the compiler.</p>
 <p>Resources existing in source folders are copied to the output folder unless the setting in the <a href="preferences/java/compiler/ref-preferences-building.htm">Java > Compiler > Building</a> preference
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/images/ref-views_breakpoint_details.PNG b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/images/ref-views_breakpoint_details.PNG
new file mode 100644
index 0000000..b8e35d7
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/images/ref-views_breakpoint_details.PNG differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm
index 1f13412..b8044a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/breakpoints/ref-breakpoints_view.htm
@@ -1,10 +1,10 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<meta http-equiv="Content-Style-Type" content="text/css"/>
+<link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css"/>
 <title>Breakpoints View</title>
 </head>
 <body>
@@ -12,7 +12,12 @@
 <p> The <strong>Breakpoints View</strong> lists all the breakpoints you currently have set in your workspace. </p>
 <p>You can double-click a breakpoint to display its location in the editor (if applicable). You can also enable or disable breakpoints, delete them, add new ones, group them by working set, or set hit counts. </p>
 <p>In the example shown below the <strong><a href="../../../reference/views/breakpoints/ref-groupby_viewaction.htm">Group by > Breakpoint Types</a></strong> option is turned on.</p>
-<p><img src="../../../reference/views/breakpoints/images/ref-views_breakpoints_view.PNG" alt="Breakpoints View"> </p>
+<p><img src="../../../reference/views/breakpoints/images/ref-views_breakpoints_view.PNG" alt="Breakpoints View"/> </p>
+<a name="detail_pane"/>
+<p>The breakpoints view displays details of the selected breakpoint and can be used to configure attributes
+   of the selected breakpoint similar to the <a href="../../../reference/views/breakpoints/ref-properties_contextaction.htm"><strong>Breakpoint Properties...</strong></a>
+   action. The orientation of the detail pane can be configured from the view drop down menu.</p>
+<p><img src="../../../reference/views/breakpoints/images/ref-views_breakpoint_details.PNG" alt="Breakpoints Details"/> </p>
 <p>The commands available in the <strong>Breakpoints View</strong> are listed below.</p>
 <table border="1" cellpadding="5" cellspacing="0" summary="The commands available in the Breakpoints View">
   <caption>
@@ -34,7 +39,7 @@
       <td colspan="1" valign="top" align="left">Context menu</td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/elcl16/exc_catch.png" alt="Add Exception Breakpoint"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/elcl16/exc_catch.png" alt="Add Exception Breakpoint"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-addexception_viewaction.htm"><strong>Add Exception Breakpoint</strong> </a></td>
       <td colspan="1" valign="top" align="left">Opens the create exception breakpoint dialog.</td>
       <td colspan="1" valign="top" align="left">View action </td>
@@ -52,25 +57,25 @@
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/collapseall.png" alt="Collapse All"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/collapseall.png" alt="Collapse All"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/shared/ref-collapseall.htm"><strong>Collapse All</strong> </a></td>
       <td colspan="1" valign="top" align="left">Collapses all of the items in the view.</td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/copy_edit_co.png" alt="Copy"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/copy_edit_co.png" alt="Copy"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/shared/ref-copy.htm"><strong>Copy</strong></a></td>
       <td colspan="1" valign="top" align="left">Copies the selected breakpoints to the system clipboard. </td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/disabled_co.png" alt="Disabled"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/disabled_co.png" alt="Disabled"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-disable_contextaction.htm"><strong>Disable</strong></a></td>
       <td colspan="1" valign="top" align="left">Changes the selected breakpoint(s) to be disabled.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/enabled_co.png" alt="Enable"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/enabled_co.png" alt="Enable"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-enable_contextaction.htm"><strong>Enable</strong></a></td>
       <td colspan="1" valign="top" align="left">Changes the selected breakpoint(s) to be enabled.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
@@ -88,19 +93,19 @@
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/expandall.png" alt="Expand All"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/expandall.png" alt="Expand All"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-expandall_viewaction.htm"><strong>Expand All</strong> </a></td>
       <td colspan="1" valign="top" align="left">Expands all of the items in the view.</td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/export_brkpts.png" alt="Export Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/export_brkpts.png" alt="Export Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-export_contextaction.htm"><strong>Export Breakpoints...</strong> </a></td>
       <td colspan="1" valign="top" align="left">Opens the export breakpoints wizard.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.ui/elcl16/goto_input.png" alt="Go to File"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.ui/elcl16/goto_input.png" alt="Go to File"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-gotofile_viewaction.htm"><strong>Go to File </strong></a></td>
       <td colspan="1" valign="top" align="left">Opens the corresponding location of the breakpoint in the java editor. </td>
       <td colspan="1" valign="top" align="left">Context menu and view action </td>
@@ -112,19 +117,19 @@
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/elcl16/sethitcount_co.png" alt="Hit Count"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/elcl16/sethitcount_co.png" alt="Hit Count"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-hitcount_contextaction.htm"><strong>Hit Count</strong> </a></td>
       <td colspan="1" valign="top" align="left">Allows you to set or change the hit count for the selected breakpoint.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/import_brkpts.png" alt="Import Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/import_brkpts.png" alt="Import Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-import_contextaction.htm"><strong>Import Breakpoints... </strong></a></td>
       <td colspan="1" valign="top" align="left">Opens the import breakpoints wizard. </td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/synced.png" alt="Link with View"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/synced.png" alt="Link with View"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-linkwith_viewaction.htm"><strong>Link with View </strong></a></td>
       <td colspan="1" valign="top" align="left">Changes if the breakpoints should be linked to the Debug View. </td>
       <td colspan="1" valign="top" align="left">View action </td>
@@ -136,19 +141,19 @@
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.ui.console/elcl16/paste_edit.png" alt="Paste Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.ui.console/elcl16/paste_edit.png" alt="Paste Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/shared/ref-paste.htm"><strong>Paste</strong></a></td>
       <td colspan="1" valign="top" align="left">Pastes copied breakpoints into the view.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/rem_all_co.png" alt="Remove All Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/rem_all_co.png" alt="Remove All Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-removeall_viewaction.htm"><strong>Remove All </strong></a></td>
       <td colspan="1" valign="top" align="left">Removes all breakpoints from the view. </td>
       <td colspan="1" valign="top" align="left">Context menu and view action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/rem_co.png" alt="Remove Selected Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/rem_co.png" alt="Remove Selected Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-remove_viewaction.htm"><strong>Remove Selected Breakpoints</strong> </a></td>
       <td colspan="1" valign="top" align="left">Removes only the selected breakpoint(s) from the view.</td>
       <td colspan="1" valign="top" align="left">Context menu and view action </td>
@@ -160,31 +165,31 @@
       <td colspan="1" valign="top" align="left">Context menu </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/obj16/brkp_grp.png" alt="Select Defautl Working Sets"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/obj16/brkp_grp.png" alt="Select Defautl Working Sets"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-selectdefaultws_viewaction.htm"><strong>Select Default Working Set</strong> </a></td>
       <td colspan="1" valign="top" align="left">Allows you to choose which working set will be the default one. </td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/obj16/package_obj.png" alt="Show Qualified Names"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/obj16/package_obj.png" alt="Show Qualified Names"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/shared/ref-showqualified.htm"><strong>Show Qualified Names</strong> </a></td>
       <td colspan="1" valign="top" align="left">Changes if qualified names are shown or not.</td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/obj16/debugt_obj.png" alt="Show Supported Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/obj16/debugt_obj.png" alt="Show Supported Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-showsupported_viewaction.htm"><strong>Show Supported Breakpoints </strong></a></td>
       <td colspan="1" valign="top" align="left">Changes if only supported breakpoints should be shown or not. </td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/skip_brkp.png" alt="Skip All Breakpoints"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/skip_brkp.png" alt="Skip All Breakpoints"/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-skipall_viewaction.htm"><strong>Skip All </strong></a></td>
       <td colspan="1" valign="top" align="left">Sets all breakpoints to be skipped.</td>
       <td colspan="1" valign="top" align="left">View action </td>
     </tr>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/suspend_co.png" alt="Suspend..."></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/suspend_co.png" alt="Suspend..."/></td>
       <td colspan="1" valign="top" align="left"><a href="../../../reference/views/breakpoints/ref-suspendpolicy_contextaction.htm"><strong>Suspend </strong></a></td>
       <td colspan="1" valign="top" align="left">Allows you to choose what to suspend when the selected breakpoint is hit.</td>
       <td colspan="1" valign="top" align="left">Context menu </td>
@@ -203,19 +208,19 @@
     </tr>
   </tbody>
 </table>
-<p> <img border="0" src="../../../images/ngrelc.png" alt="Related concepts" > </p>
-<p> <a href="../../../concepts/cbrkpnts.htm">Breakpoints</a><br>
-  <a href="../../../concepts/concept-java-views.htm">Java views</a> <br>
+<p> <img border="0" src="../../../images/ngrelc.png" alt="Related concepts"/> </p>
+<p> <a href="../../../concepts/cbrkpnts.htm">Breakpoints</a><br/>
+  <a href="../../../concepts/concept-java-views.htm">Java views</a> <br/>
   <a href="../../../concepts/concept-java-perspective.htm">Java perspectives</a></p>
-<p> <img border="0" src="../../../images/ngrelt.png" alt="Related tasks" > </p>
-<p> <a href="../../../tasks/task-add_line_breakpoints.htm">Adding breakpoints</a><br>
-  <a href="../../../tasks/task-apply_hit_count.htm">Applying hit counts</a><br>
-  <a href="../../../tasks/task-catching_exceptions.htm">Catching Java exceptions</a><br>
-  <a href="../../../tasks/task-remove_line_breakpoints.htm">Removing breakpoints</a><br>
-  <a href="../../../tasks/task-enable_disable_breakpoints.htm">Enabling and disabling breakpoints</a><br>
-  <a href="../../../tasks/task-manage_conditional_breakpoint.htm">Managing conditional breakpoints</a><br>
+<p> <img border="0" src="../../../images/ngrelt.png" alt="Related tasks"/> </p>
+<p> <a href="../../../tasks/task-add_line_breakpoints.htm">Adding breakpoints</a><br/>
+  <a href="../../../tasks/task-apply_hit_count.htm">Applying hit counts</a><br/>
+  <a href="../../../tasks/task-catching_exceptions.htm">Catching Java exceptions</a><br/>
+  <a href="../../../tasks/task-remove_line_breakpoints.htm">Removing breakpoints</a><br/>
+  <a href="../../../tasks/task-enable_disable_breakpoints.htm">Enabling and disabling breakpoints</a><br/>
+  <a href="../../../tasks/task-manage_conditional_breakpoint.htm">Managing conditional breakpoints</a><br/>
   <a href="../../../tasks/task-set_method_breakpoints.htm">Setting method breakpoints</a> </p>
-<p> <img border="0" src="../../../images/ngrelr.png" alt="Related reference" > </p>
+<p> <img border="0" src="../../../images/ngrelr.png" alt="Related reference"/> </p>
 <p> <a href="../ref-viewsandeditors.htm">Views and editors</a> </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-addwatch.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-addwatch.htm
index 7b88c08..1634d52 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-addwatch.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-addwatch.htm
@@ -9,7 +9,7 @@
 </head>
 <body>
 <h1> Add Watch Expression</h1>
-<p> Select the <strong>Add Watch Expression </strong>command [ <img src="../../../images/org.eclipse.debug.ui/obj16/expression_obj.png" alt="Add Watch Expression"> ] to open the create new expression dialog, which allows you to create a new watch expression and add it to the <strong><a href="../../../reference/views/expressions/ref-expressions_view.htm">Expressions View</a></strong>.</p>
+<p> Select the <strong>Add Watch Expression </strong>command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/monitorexpression_tsk.png" alt="Add Watch Expression"> ] to open the create new expression dialog, which allows you to create a new watch expression and add it to the <strong><a href="../../../reference/views/expressions/ref-expressions_view.htm">Expressions View</a></strong>.</p>
 <p>The add watch expression dialog.</p>
 <p><img src="../../../reference/views/expressions/images/ref-addwatchexpression_dialog.PNG" alt="Add Watch Expression Dialog"></p>
 <p> <img border="0" src="../../../images/ngrelt.png" alt="Related tasks" > </p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-expressions_view.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-expressions_view.htm
index 01b413e..a523f33 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-expressions_view.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/expressions/ref-expressions_view.htm
@@ -27,7 +27,7 @@
   </caption>
   <thead>
     <tr>
-      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/obj16/expression_obj.png" alt="Add Watch Expression"></td>
+      <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/monitorexpression_tsk.png" alt="Add Watch Expression"></td>
       <td colspan="1" valign="top" align="left" ><a href="../../../reference/views/expressions/ref-addwatch.htm"><strong>Add Watch Expression</strong></a></td>
       <td colspan="1" valign="top" align="left" >Allows you to add a watch expression.</td>
       <td>Context menu </td>
@@ -55,7 +55,7 @@
     <tr>
       <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/collapseall.png" alt="Collapse All"></td>
       <td colspan="1" valign="top" align="left" ><a href="../../../reference/views/shared/ref-collapseall.htm"><strong>Collapse All</strong></a></td>
-      <td colspan="1" valign="top" align="left" >Collapses all the the currently expanded variables.</td>
+      <td colspan="1" valign="top" align="left" >Collapses all the currently expanded variables.</td>
       <td>View action </td>
     </tr>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-call-hierarchy.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-call-hierarchy.htm
index 58071d5..1187633 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-call-hierarchy.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-call-hierarchy.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Call Hierarchy View</title>
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -9,7 +9,7 @@
 <body>
 <h1>Call Hierarchy View</h1>
 <p>The Call Hierarchy view shows callers and callees for a selected Java member.</p>
-<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Call hierarchy">
+<table border="1" cellspacing="0" cellpadding="5" width="100%" summary="Call Hierarchy">
 	<caption>Call Hierarchy commands:</caption>
 	<thead>
 		<tr>
@@ -29,8 +29,15 @@
 			<td valign="top">
 			<p>Refresh the whole hierarchy</p>
 			</td>
-		</tr>	
-	
+		</tr>
+		<tr>
+			<td valign="top">
+			<p>Refresh (context menu)</p>
+			</td>
+			<td valign="top">
+			<p>Refresh the selected elements and their direct children</p>
+			</td>
+		</tr>
 		<tr>
 			<td valign="top">
 			<p>Cancel Current Search</p>
@@ -118,6 +125,14 @@
 			in anonymous types</strong> option.</p>
 			</td>
 		</tr>
+		<tr>
+			<td valign="top">
+			<p>Remove from View</p>
+			</td>
+			<td valign="top">
+			<p>Remove the selected nodes from the view</p>
+			</td>
+		</tr>
 	</tbody>
 </table>
 <p><img border="0" src="../../images/ngrelr.png" alt="Related reference"></p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htm
index 2738a3a..b301058 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-java-editor.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Java editor
@@ -125,7 +125,7 @@
                 The entire compilation unit is displayed in the editor, with the selected Java element highlighted in the marker bar with a range indicator.</p>
             <p>
                 <strong>On</strong>:
-                Only the selected Java element is displayed in the editor, which is linked to the selection in the Outline or Hierarchy view.</p>
+                Only the selected Java element is displayed in the editor, which is linked to the selection in the Outline or Type Hierarchy view.</p>
           </td>
         </tr>
         
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-type-hierarchy.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-type-hierarchy.htm
index 7610ac6..5432beb 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-type-hierarchy.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-type-hierarchy.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title>
       Type Hierarchy View
@@ -66,7 +66,7 @@
           </td>
           <td valign="top">
             <p>
-              This command displays the type in its full context (i.e., superclasses and subclasses) in the Hierarchy view. To see for which type the hierarchy is shown, hover
+              This command displays the type in its full context (i.e., superclasses and subclasses) in the Type Hierarchy view. To see for which type the hierarchy is shown, hover
               over the view title (e.g., "Types").
             </p>
           </td>
@@ -79,7 +79,7 @@
           </td>
           <td valign="top">
             <p>
-              This command displays the supertypes and the hierarchy of all implemented interfaces of the type in the Hierarchy view. The tree starts at the selected type and
+              This command displays the supertypes and the hierarchy of all implemented interfaces of the type in the Type Hierarchy view. The tree starts at the selected type and
               displays the result of traversing up the hierarchy.
             </p>
              <em>Note: The selected type is always at the top level, in the upper-left corner.</em>
@@ -93,7 +93,7 @@
           </td>
           <td valign="top">
             <p>
-              This command displays the subtypes of the selected class and/or all implementors of the interface in the Hierarchy view. The tree starts at the selected type and
+              This command displays the subtypes of the selected class and/or all implementors of the interface in the Type Hierarchy view. The tree starts at the selected type and
               displays the result of traversing down the hierarchy
             </p>
              <em>Note: The selected type is always at the top level, in the upper-left corner.</em>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-viewsandeditors.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-viewsandeditors.htm
index 32a1553..78611e9 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-viewsandeditors.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/ref-viewsandeditors.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -40,12 +40,12 @@
        <a href="display/ref-display_view.htm">Display view</a><br>
        <a href="expressions/ref-expressions_view.htm">Expressions view</a><br>
        <a href="../views/ref-java-editor.htm">Java editor</a><br>
-       <a href="ref-view-package-explorer.htm">Package explorer view</a><br>
+       <a href="ref-view-package-explorer.htm">Package Explorer view</a><br>
        <a href="variables/ref-variables_view.htm">Variables view</a><br>
        <a href="ref-view-outline.htm">Java outline</a><br>
        <a href="../views/ref-view-scrapbook.htm">Java scrapbook Page</a><br>
-       <a href="ref-type-hierarchy.htm">Type hierarchy view</a><br>
-       <a href="ref-call-hierarchy.htm">Call hierarchy view</a>
+       <a href="ref-type-hierarchy.htm">Type Hierarchy view</a><br>
+       <a href="ref-call-hierarchy.htm">Call Hierarchy view</a>
     </p>
     <p> </p>
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-changevarvalue.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-changevarvalue.htm
index 2d73003..b36ff64 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-changevarvalue.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-changevarvalue.htm
@@ -9,7 +9,7 @@
 </head>
 <body>
 <h1> Change Variable Value </h1>
-<p> Select the <strong>Change Value...</strong> command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/changevariablevalue_co.png" alt="Change Variable Value"> ] to open a dialog in which you can change the value of the the selected variable or register.</p>
+<p> Select the <strong>Change Value...</strong> command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/changevariablevalue_co.png" alt="Change Variable Value"> ] to open a dialog in which you can change the value of the selected variable or register.</p>
 <p>In the <a href="../../../reference/views/variables/ref-variables_view.htm"><strong>Variables View</strong></a>, if variables are displayed in the column form, variable values can also can be changed by directly editing the value in the column.</p>
 <p>When debugging a Java program, there are three different types of dialogs that this command can open.</p>
 <p>The <strong>Change Primitive Value Dialog</strong> is used to change the value of a primitive such as an int, long, or char.</p>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-forcereturn.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-forcereturn.htm
index 671daec..26b7d3f 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-forcereturn.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/shared/ref-forcereturn.htm
@@ -9,7 +9,7 @@
 </head>
 <body>
 <h1> Force Return </h1>
-<p> Select the <strong>Force Return </strong> command  to return from the current method with the speified value.</p>
+<p> Select the <strong>Force Return </strong> command  to return from the current method with the specified value.</p>
 <p>You can force an early return from a method (only 
   available when debugging on a Java SE 6 virtual machine). This returns 
   a value from the current stack frame without executing any more instructions 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/variables/ref-variables_view.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/variables/ref-variables_view.htm
index 4974895..bcba899 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/variables/ref-variables_view.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/reference/views/variables/ref-variables_view.htm
@@ -39,7 +39,7 @@
     <tr>
       <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.jdt.debug.ui/elcl16/all_references.png" alt="All References"></td>
       <td colspan="1" valign="top" align="left" ><a href="../../../reference/views/shared/ref-allreferences.htm"><strong>All References</strong></a></td>
-      <td colspan="1" valign="top" align="left" >Opens a popup dialog displayinga list of all Java objects that have references to the selected variable. Your Java virtual machine must support reference retrieval. </td>
+      <td colspan="1" valign="top" align="left" >Opens a popup dialog displaying a list of all Java objects that have references to the selected variable. Your Java virtual machine must support reference retrieval. </td>
       <td>Context menu </td>
     </tr>
   </thead>
@@ -53,7 +53,7 @@
     <tr>
       <td colspan="1" valign="top" align="left"><img src="../../../images/org.eclipse.debug.ui/elcl16/collapseall.png" alt="Collapse All"></td>
       <td colspan="1" valign="top" align="left" ><a href="../../../reference/views/shared/ref-collapseall.htm"><strong>Collapse All</strong></a></td>
-      <td colspan="1" valign="top" align="left" >Collapses all the the currently expanded variables.</td>
+      <td colspan="1" valign="top" align="left" >Collapses all the currently expanded variables.</td>
       <td>View action </td>
     </tr>
     <tr>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-202.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-202.htm
index 7e6153c..2d5e238 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-202.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-202.htm
@@ -20,7 +20,7 @@
       <li>from the menu bar, select <span class="control">Source > Find Broken Externalized Strings</span></li>
     </ul>
 
-    <p>After the search is finished, the Search Result view displays a list of unused keys in the propertie files and all incorrect references to non-existing keys.</p>
+    <p>After the search is finished, the Search Result view displays a list of unused keys in the properties files and all incorrect references to non-existing keys.</p>
 
     <p><img src="../images/ngrelc.png" alt="Related concepts" border="0" ><br>
      <a href="../concepts/concept-string-externalization.htm">String externalization</a><br>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-33.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-33.htm
index d74825a..057c275 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-33.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-33.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
   <head>
-	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -80,7 +80,7 @@
 	</p>
 	<p>	  
        <a href="../reference/ref-export-jar.htm">JAR file exporter</a><br>
-       <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+       <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-62.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-62.htm
index 31de9ca..24eeea2 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-62.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-62.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -50,7 +50,7 @@
       <img border="0"  src="../images/ngrelr.png" alt="Related reference">
     </p>
     <p>
-      <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+      <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
      </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-63a.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-63a.htm
index 72c7679..b0d867d 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-63a.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-63a.htm
@@ -40,7 +40,7 @@
         The <strong>History</strong> view opens and shows all editions of the selected element available in the local history.
       </li>
       <li>
-        Select an edition in the hitory view to see the differences between the selected edition and the edition in the workbench in a comparison editor.
+        Select an edition in the history view to see the differences between the selected edition and the edition in the workbench in a comparison editor.
       </li>
       <li>
         If you are done with the comparison, click close the comparison editor.
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-74.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-74.htm
index 7f52089..95d5b70 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-74.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-74.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -60,7 +60,7 @@
     </p>
     <p>
       <a href="../reference/preferences/ref-preferences-java.htm">Java preference page</a><br>
-       <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+       <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-75.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-75.htm
index bd37823..80bf6ae 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-75.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-75.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -57,7 +57,7 @@
     </p>
     <p>
       <a href="../reference/ref-menu-navigate.htm">Navigate actions</a><br>
-       <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+       <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-76.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-76.htm
index 93944d9..7fbfc80 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-76.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-76.htm
@@ -22,7 +22,7 @@
 		</li>
 		<li>
 			In the <strong>Enter type name prefix or pattern</strong> field, begin typing an expression to narrow the list of available types, using wildcards as needed. As you
-			type, the list is filtered to display only types that match the current expression. CamelCase notation is also supported; that means you aonly need to enter the capital letters
+			type, the list is filtered to display only types that match the current expression. CamelCase notation is also supported; that means you only need to enter the capital letters
 			of the type name.
 		</li>
 		<li>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-77.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-77.htm
index 0183bf4..dee4a5b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-77.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-77.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="en">
   <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta http-equiv="Content-Style-Type" content="text/css">
     <title>
@@ -39,7 +39,7 @@
     </p>
     <p>
       <a href="../reference/ref-menu-navigate.htm">Navigate actions</a><br>
-       <a href="../reference/views/ref-view-package-explorer.htm">Package explorer</a>
+       <a href="../reference/views/ref-view-package-explorer.htm">Package Explorer</a>
     </p>
     
   </body>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm
index 8b2bdb9..d14502b 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tasks/tasks-java-local-configuration.htm
@@ -52,7 +52,14 @@
     <li>The <strong>Environment</strong> tab defines the environment variable 
       values to use when running or debugging a Java application. By default, 
       the environment is inherited from the Eclipse runtime. You may override 
-      or append to the inherited environment. </li>
+      or append to the inherited environment. Variables specified in the tab
+      always replace values in the underlying native environment. However, when
+      "Append environment to native environment" is selected the launched environment is seeded
+      with the native environment, after which variables in the tab replace (existing variables)
+      or augment the set of environment variables. When "Replace native environment with
+      specified environment" is selected, the launched environment is comprised only of the
+      variables specified in the tab.
+      </li>
     <li>The <strong>Common</strong> tab defines general information about the 
       launch configuration.  You may choose to store the launch configuration 
       in a specific file and specify which perspectives become active when the 
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/build-path-error-decorator.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/build-path-error-decorator.png
new file mode 100644
index 0000000..e10346c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/build-path-error-decorator.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/hierarchy-lockview.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/hierarchy-lockview.png
index 7b44cce..b5574a2 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/hierarchy-lockview.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/hierarchy-lockview.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/nls-problem-search.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/nls-problem-search.png
index 81ed8a3..7d31980 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/nls-problem-search.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/nls-problem-search.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/all-instances.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/all-instances.png
new file mode 100644
index 0000000..aab8a89
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/all-instances.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/breakpoint_condition.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/breakpoint_condition.png
index a54b399..e882211 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/breakpoint_condition.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/breakpoint_condition.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/class-load-breakpoint.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/class-load-breakpoint.png
new file mode 100644
index 0000000..8344133
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/class-load-breakpoint.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/debug-by-writing-to-console.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/debug-by-writing-to-console.png
new file mode 100644
index 0000000..2cde889
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/debug-by-writing-to-console.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/method-breakpoint.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/method-breakpoint.png
new file mode 100644
index 0000000..a08e631
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/method-breakpoint.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/select-columns.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/select-columns.png
new file mode 100644
index 0000000..a26f37c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/select-columns.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/show-references.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/show-references.png
new file mode 100644
index 0000000..8c99593
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/show-references.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/variable-view-columns.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/variable-view-columns.png
new file mode 100644
index 0000000..9539a37
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/variable-view-columns.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/watchpoint_properties.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/watchpoint_properties.png
index 5b2e865..ec95ab9 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/watchpoint_properties.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/org.eclipse.jdt.debug.ui/watchpoint_properties.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-off.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-off.png
new file mode 100644
index 0000000..baa8663
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-off.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-on.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-on.png
new file mode 100644
index 0000000..0344a96
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/package-abbreviations-on.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/sort-by-def.png b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/sort-by-def.png
index 574424b..948e3b5 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/sort-by-def.png and b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/images/sort-by-def.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/jdt_tips.html b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/jdt_tips.html
index 2ab4fd4..297f837 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/tips/jdt_tips.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/tips/jdt_tips.html
@@ -1,14 +1,14 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <meta http-equiv="Content-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
 <style type="text/css">
-ul {padding-left: 1.2em;}
+ul {padding-left: 1.2em; margin-left: 1.2em;}
 </style>
 <title>Tips and Tricks (JDT)</title>
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
@@ -20,15 +20,15 @@ ul {padding-left: 1.2em;}
 <p>
 The following tips and tricks give some helpful ideas for increasing your productivity.
 See also <a href="../../org.eclipse.platform.doc.user/tips/platform_tips.html">Platform Tips and Tricks</a>
-for general Eclipse tips and <a href="../../org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html">What's New in 3.5 (JDT)</a> for
+for general Eclipse tips and <a href="../../org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html">What's New in 3.6 (JDT)</a> for
 features in this release.
 </p>
 <br>
 <p>
 <a href="#editing_section">Editing</a>   |  
 <a href="#refactor_section">Refactoring</a>   |  
-<a href="#navigation_section">Navigation</a>   |  
 <a href="#searching_section">Searching</a>   |  
+<a href="#navigation_section">Navigation</a>   |  
 <a href="#views_section">Views</a>   |  
 <a href="#misc_section">Miscellaneous</a>   |  
 <a href="#debugging_section">Debugging</a>
@@ -129,7 +129,7 @@ features in this release.
 		    <td valign="top" align="left" width="80%">Content assist can propose members 
 		      available on types used in instanceof conditions.
 		      <p>
-		      <img title="Content Assist After instancoef Condition" alt="Screenshot showing Content Assist after instanceof condition" src="images/instanceof-compl-proposals.png">
+		      <img title="Content Assist After instanceof Condition" alt="Screenshot showing Content Assist after instanceof condition" src="images/instanceof-compl-proposals.png">
 		      </p>
 		      <p>
 		      Eclipse will add the required cast for you when you select such a proposal.
@@ -736,7 +736,7 @@ features in this release.
 </p>
 			<p>
 			When you enable <b>Automatically insert Semicolons at correct
-			position</b>, typing a semicolon  automatically positions the cursor at the end of the statement before inserting the semicolon. This safes you some additional cursor navigation.<br>
+			position</b>, typing a semicolon  automatically positions the cursor at the end of the statement before inserting the semicolon. This saves you some additional cursor navigation.<br>
 			You can
 			undo this automatic positioning by pressing backspace right afterwards.
 			</p>
@@ -1309,12 +1309,12 @@ much easier to manage workspaces containing lots of projects.
 			Hierarchy' feature:
 			<ol>
 				<li>Select the method to look at and press <b>F4 (Navigate > Open
-				Type Hierarchy)</b>. This opens the type Hierarchy view on the
+				Type Hierarchy)</b>. This opens the Type Hierarchy view on the
 				method's declaring type.</li>
-				<li>With the method selected in the Hierarchy view, press the 'Lock
+				<li>With the method selected in the Type Hierarchy view, press the 'Lock
 				View and Show Members in Hierarchy' tool bar button.</li>
 			</ol>
-				The Hierarchy view now shows only types that implement or define
+				The Type Hierarchy view now shows only types that implement or define
 				the 'locked' method. You can for example see that <code>isEmpty()</code> is
 				defined in <code>List</code> and implemented in <code>ArrayList</code> and <code>Vector</code> but
 				not in <code>AbstractList</code>.
@@ -1341,12 +1341,12 @@ much easier to manage workspaces containing lots of projects.
 				<li>Focus the type hierarchy on a new type by pressing <b>F4
 				(Navigate > Open Type Hierarchy)</b> on an element or a selected
 				name.</li>
-				<li>You can open the Hierarchy view not only on types but also on
+				<li>You can open the Type Hierarchy view not only on types but also on
 				packages, source folders, JAR archives and Java projects.</li>
-				<li>You can Drag & Drop an element onto the Hierarchy view to
+				<li>You can Drag & Drop an element onto the Type Hierarchy view to
 				focus on that element.</li>
 				<li>You can change the orientation (from the default vertical to
-				horizontal) of the Hierarchy view from the view's toolbar menu.</li>
+				horizontal) of the Type Hierarchy view from the view's toolbar menu.</li>
 			</ul>
 			</td>
 		</tr>
@@ -1444,6 +1444,32 @@ much easier to manage workspaces containing lots of projects.
 			</td>
 		</tr>
 		<tr>
+			<td width="20%" valign="top" align="left"><b>Package name abbreviations</b></td>
+			<td valign="top" align="left" width="80%">Package names in Java views can be abbreviated with custom rules. For example,
+        the following rules produce the rendering shown below:
+        <pre>org.eclipse.ui={UI}
+org.eclipse.ui.texteditor={T}
+org.eclipse.ui.internal.texteditor=[iT]</pre>
+			<table cellpadding="0" cellspacing="0" summary="Screenshots">
+        <tr>
+	        <td>Without abbreviations:</td>
+	        <td>With abbreviations:</td>
+        </tr>
+        <tr>
+	        <td style="padding-top:2px; padding-right:4px;"><img src="images/package-abbreviations-off.png" alt="Package Explorer with abbreviations disabled"></td>
+	        <td style="padding-top:2px;"><img src="images/package-abbreviations-on.png" alt="Package Explorer with abbreviations enabled"></td>
+        </tr>
+        </table>
+       
+        <p>The abbreviation rules can be configured on the
+			<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.AppearancePreferencePage)")'>
+			<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Appearance preference page">
+			<b>Java > Appearance</b></a> preference page.
+		</p>
+
+			</td>
+		</tr>
+		<tr>
 			<td width="20%" valign="top" align="left"><b>Manipulating the Java
 			build path directly in the Package Explorer</b>		
 			</td>
@@ -1771,6 +1797,21 @@ public class HelloWorld {
 			</ol>
 			</td>
 		</tr>
+		
+		<tr>
+			<td width="20%" valign="top" align="left"><b>Build path error decorator</b></td>
+			<td width="80%" valign="top" align="left">
+			The <b>Package Explorer</b> and the <b>Project Explorer</b> show this error decorator 
+			<img src="../images/org.eclipse.jdt.ui/ovr16/error_co_buildpath.png"  alt="Build path error decorator"> 
+			on Java projects and working sets if they contain build path errors:
+			 <p><img src="images/build-path-error-decorator.png" alt="Build path error decorator"></p>
+			
+			In case of build path errors in the <b>Problems</b> view, first look in the <b>Package
+  Explorer</b> for this icon since it better indicates where the problem is.
+			
+			</td>
+		</tr>
+		
 	</tbody>
 </table>
 
@@ -1868,6 +1909,49 @@ public class HelloWorld {
 		</tr>
 		<tr>
 			<td width="20%" valign="top" align="left">
+      <p><b>Variable columns</b></p>
+    </td>
+			<td width="80%" valign="top" align="left">
+			
+      <p>Columns in the <b>Variables view</b> can be configured by selecting
+        <b>Layout > Select Columns...</b> in the view menu. A dialog allows
+        you to select the columns to display. For example, a column
+        can be added to display instance counts of classes (when debugging with
+        JavaSE-1.6). Columns can be toggled on/off using the <b>Layout > Show Columns</b>
+        action.</p>
+			<p><img src="images/org.eclipse.jdt.debug.ui/select-columns.png"  alt="Dialog used to select configure columns in the variables view"></p>
+			<p><img src="images/org.eclipse.jdt.debug.ui/variable-view-columns.png"  alt="Column display in the variables view"></p>
+			</td>
+			
+		</tr>
+	  <tr>
+	  <td width="20%" valign="top" align="left">		
+      <p><b>Show references</b></p>
+    </td>
+			<td width="80%" valign="top" align="left">
+			
+      <p>When debugging with JavaSE-1.6, references to objects can be displayed in
+      the <b>Variables view</b> by selecting <b>Java > Show References</b> in the
+      view menu. A "<b>referenced from</b>" entry will appear under each object
+      that can be expanded to show all references to that object. </p>
+			<p><img src="images/org.eclipse.jdt.debug.ui/show-references.png"  alt="Display references in the variables view"></p>
+			</td>
+		</tr>
+	  <tr>
+	  <td width="20%" valign="top" align="left">		
+      <p><b>All instances</b></p>
+    </td>
+			<td width="80%" valign="top" align="left">
+			
+      <p>When debugging with JavaSE-1.6, all instances of a class can be inspected by selecting a class
+      in an editor outline, variables view, compilation unit or class file editor and invoking
+      <b>All Instances...</b> from the context menu. A pop-up dialog will display all instances of the
+      seleted class.</p>
+			<p><img src="images/org.eclipse.jdt.debug.ui/all-instances.png"  alt="Display references in the variables view"></p>
+			</td>
+		</tr>		
+		<tr>
+			<td width="20%" valign="top" align="left">
       <p><b>Default VM arguments</b></p>
     </td>
 			<td width="80%" valign="top" align="left">
@@ -1893,15 +1977,28 @@ public class HelloWorld {
 		</tr>
 		<tr>
 			<td valign="top" align="left"><b>Conditional breakpoints</b></td>
-			<td valign="top" align="left">You can use conditional breakpoints in
-			<b> Breakpoint Properties... </b>to control when a breakpoint
+			<td valign="top" align="left">You can use expressions to define conditional
+			breakpoints using the <b> Breakpoint Properties... </b> dialog or detail
+			pane in the breakpoints view. A condition controls when a breakpoint
 			actually halts execution. You can specify whether you want the
 			breakpoint to suspend execution only when the condition is true, or
-			when the condition value changes.
-			<p><img src="images/org.eclipse.jdt.debug.ui/breakpoint_condition.png"  alt="Breakpoint condition editor in breakpoint properties dialog"></p>
+			when the condition value changes. The breakpoint condition editor
+			supports content assist.
+			<p><img src="images/org.eclipse.jdt.debug.ui/breakpoint_condition.png"  alt="Breakpoint condition editor in breakpoint properties dialog or breakpoint detail pane"></p>
 			</td>
 		</tr>
 		<tr>
+			<td valign="top" align="left"><b>Debugging by writing to console</b></td>
+			<td valign="top" align="left">
+			
+      You can avoid inserting <code>System.out.println()</code> statements in your code for debugging by using conditional breakpoints to print to the Console view. 
+      To do so, set a conditional breakpoint with <b>Suspend when 'true'</b> option and a condition which is always false, e.g.
+      <p><img src="images/org.eclipse.jdt.debug.ui/debug-by-writing-to-console.png" alt='System.out.println("Debug statement!"); return false;'>
+</p>
+			</td>
+		</tr>
+		
+		<tr>
 			<td valign="top" align="left"><b>Disabling breakpoints</b></td>
 			<td valign="top" align="left">
 			If you find yourself frequently adding and removing a breakpoint
@@ -1975,7 +2072,7 @@ public class HelloWorld {
         debugging </b></td>
 			<td valign="top" align="left">
 			The Java debugger allows you to step into a single method within a
-			series of chained or nested method calls. Simply highlight the method
+			series of chained or nested method calls. Simply select the method
 			you wish to step into and select <b>Step into Selection</b> from the
 			Java editor context menu.
 			<p>This feature works in places other than the currently executing
@@ -1985,6 +2082,10 @@ public class HelloWorld {
 			
         <p><img src="images/org.eclipse.jdt.debug.ui/step_into_selection.png"
 				alt="Stepping into selection"></p>
+			<p>When the caret is not in a method name, the feature steps into the next method on the selected line.
+			When you e.g. have line with nested method calls and the caret is a the beginning of the line, the feature
+			steps into the outermost method (unlike Step Into).</p>
+				
         <p>You can also step into a method by using hyperlink navigation. Simply 
           place the cursor over the method you wish to step into and use <strong>Ctrl+Alt+Click</strong> 
           to step into the method (rather than <strong>Ctrl+Click</strong> which 
@@ -2025,6 +2126,37 @@ public class HelloWorld {
 			</td>
 		</tr>
 		<tr>
+			<td valign="top" align="left"><b>Class load breakpoints</b></td>
+			<td valign="top" align="left">
+			
+      A class load breakpoint suspends execution when a specified 
+          class is loaded in the virtual machine. To set a class load breakpoint, select a class in 
+          the Outline view and choose <b>Toggle Class Load Breakpoint</b> from its context 
+          menu. You can also use the <b>Run > Add Class Load Breakpoint...</b> menu action to create
+          a class load breakpoint.
+			<p><img src="images/org.eclipse.jdt.debug.ui/class-load-breakpoint.png"  alt="Class load breakpoints suspend execution when a specified class is loaded">
+</p>
+			</td>
+		</tr>
+		<tr>
+			<td valign="top" align="left"><b>Method breakpoints</b></td>
+			<td valign="top" align="left">
+			
+      A method breakpoint suspends execution when a specific method is entered or exited. 
+          To set a method breakpoint, select a method in 
+          the Outline view and choose <b>Toggle Method Breakpoint</b> from its context 
+          menu. Alternatively, double click on a method declaration line in the editor ruler
+          or use the <b>Run > Toggle Method Breakpoint</b> menu action to create
+          a method breakpoint in the currently selected method.
+          <p>By default a method breakpoint
+          only suspends execution when a method is entered. You can use the breakpoint detail
+          pane or the breakpoint properties dialog to configure the breakpoint to suspend
+          on exit. Method breakpoints also support conditions.</p> 
+			<p><img src="images/org.eclipse.jdt.debug.ui/method-breakpoint.png"  alt="Method breakpoints suspend execution when a specific method is entered or exited">
+</p>
+			</td>
+		</tr>				
+		<tr>
 
 			<td valign="top" align="left"><b>Threads and monitors</b></td>
 			<td valign="top" align="left">
@@ -2203,7 +2335,7 @@ public class HelloWorld {
         <p><img src="images/org.eclipse.jdt.debug.ui/activate-debug-view.png" alt="Run/Debug preference page" > </p>
         <p>You can disable the perspective switching prompt on the <strong>Run/Debug > Perspectives</strong> preference page. With these settings the Debug view will automatically open in the Java perspective when a breakpoint is hit. </p>
         <p><img src="images/org.eclipse.jdt.debug.ui/perspective-prompt.png" alt="Perspectives preference page" > </p>
-        <p>By placing the Debug view at the top of the perspective and resizing it's height to the size of one element, the view will switch to a bread crumb presentation. This minimizes the amount of screen space the view consumes.</p>
+        <p>By placing the Debug view at the top of the perspective and resizing its height to the size of one element, the view will switch to a bread crumb presentation. This minimizes the amount of screen space the view consumes.</p>
         <p><img src="images/org.eclipse.jdt.debug.ui/dbg-bread-crumb.png" alt="Debug view in bread crumb mode" ></p></td>
 		</tr>
 	</tbody>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/topics_Reference.xml b/eclipse/plugins/org.eclipse.jdt.doc.user/topics_Reference.xml
index e805761..c460fa0 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/topics_Reference.xml
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/topics_Reference.xml
@@ -411,6 +411,7 @@
 -->
 	<topic label="Java Editor" href="reference/views/ref-java-editor.htm">
 		<topic label="Java Content Assist" href="reference/ref-java-editor-code-assist.htm" />
+		<topic label="Java Formatter" href="reference/ref-java-editor-formatter.htm" />
 		<topic label="Quick fix" href="reference/ref-java-editor-quickfix.htm" />
 		<topic label="Quick assist" href="reference/ref-java-editor-quickassist.htm" />
 	</topic>
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/annotations-in-javadoc.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/annotations-in-javadoc.png
new file mode 100644
index 0000000..1f492c3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/annotations-in-javadoc.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/background-computation-of-type-hierarchy.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/background-computation-of-type-hierarchy.png
new file mode 100644
index 0000000..1ea9489
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/background-computation-of-type-hierarchy.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/bp-details.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/bp-details.png
new file mode 100644
index 0000000..b918791
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/bp-details.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/browser-preferences.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/browser-preferences.png
new file mode 100644
index 0000000..22e787f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/browser-preferences.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-dot-dot-path.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-dot-dot-path.png
deleted file mode 100644
index b85c94a..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-dot-dot-path.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-duplicate-entries.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-duplicate-entries.png
deleted file mode 100644
index 89ea67b..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-duplicate-entries.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-error-decorator.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-error-decorator.png
new file mode 100644
index 0000000..e10346c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-error-decorator.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-invalid-dups.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-invalid-dups.png
deleted file mode 100644
index 61a686f..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-invalid-dups.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-problems.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-problems.png
new file mode 100644
index 0000000..5fb1a9a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/build-path-problems.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/class-path-header.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/class-path-header.png
deleted file mode 100644
index 8cfa0c8..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/class-path-header.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/comparing-identical-values-example.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/comparing-identical-values-example.png
deleted file mode 100644
index 92ba73f..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/comparing-identical-values-example.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-deadcode-diagnosis.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-deadcode-diagnosis.png
deleted file mode 100644
index e473d0b..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-deadcode-diagnosis.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-hashcode-diagnosis.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-hashcode-diagnosis.png
deleted file mode 100644
index 0099e68..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compiler-hashcode-diagnosis.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compliance-follows-ee.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compliance-follows-ee.png
deleted file mode 100644
index ba1d280..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/compliance-follows-ee.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/constructor-completion.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/constructor-completion.png
deleted file mode 100644
index a88a365..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/constructor-completion.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/delete-working-set.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/delete-working-set.png
deleted file mode 100644
index 1ed0b03..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/delete-working-set.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/dynamic-structure-compare.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/dynamic-structure-compare.png
deleted file mode 100644
index 0526010..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/dynamic-structure-compare.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/edit-test-method.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/edit-test-method.png
new file mode 100644
index 0000000..0e91118
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/edit-test-method.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/expand-with-constructors.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/expand-with-constructors.png
deleted file mode 100644
index 992c46a..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/expand-with-constructors.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/export-all-profiles.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/export-all-profiles.png
new file mode 100644
index 0000000..005802d
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/export-all-profiles.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-continue.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-continue.png
new file mode 100644
index 0000000..83927c6
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-continue.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-multiple-return-values.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-multiple-return-values.png
new file mode 100644
index 0000000..060ed95
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/extract-method-multiple-return-values.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/find-externalized-strings-constants.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/find-externalized-strings-constants.png
new file mode 100644
index 0000000..e4e6423
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/find-externalized-strings-constants.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-formatted.png
new file mode 100644
index 0000000..a663b54
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-preference.png
new file mode 100644
index 0000000..405f9a0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-annotation-arguments-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-formatted.png
new file mode 100644
index 0000000..ece3dfc
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-preference.png
new file mode 100644
index 0000000..c716a32
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-align-method-declaration-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-formatted.png
new file mode 100644
index 0000000..15a140b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-preference.png
new file mode 100644
index 0000000..9d673c9
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-condense-multi-lines-comments-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-formatted.png
new file mode 100644
index 0000000..0ea0d37
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-preference.png
new file mode 100644
index 0000000..39907b1
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-disabling-enabling-tags-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-formatted.png
new file mode 100644
index 0000000..d6185a1
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-preference.png
new file mode 100644
index 0000000..be9f89f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-new-line-after-label-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-formatted.png
new file mode 100644
index 0000000..e6a1f29
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-preference.png
new file mode 100644
index 0000000..443b403
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-prefer-wrapping-outer-expressions-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-formatted.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-formatted.png
new file mode 100644
index 0000000..eb20901
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-formatted.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-preference.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-preference.png
new file mode 100644
index 0000000..096bcca
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/formatter-skip-first-column-comments-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/generate-tostring-dialog.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/generate-tostring-dialog.png
deleted file mode 100644
index b5ed978..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/generate-tostring-dialog.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/hashcode-and-equals-wizard.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/hashcode-and-equals-wizard.png
deleted file mode 100644
index 6339dc6..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/hashcode-and-equals-wizard.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/instance-counts.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/instance-counts.png
new file mode 100644
index 0000000..e4dc07b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/instance-counts.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/jar-export.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/jar-export.png
deleted file mode 100644
index 7c33331..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/jar-export.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-assist.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-assist.png
deleted file mode 100644
index 9ad7b7b..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-assist.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hover.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hover.png
deleted file mode 100644
index d54890c..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hover.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hyperlinking.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hyperlinking.png
deleted file mode 100644
index f1127b1..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-hyperlinking.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-outline.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-outline.png
deleted file mode 100644
index 6220cfe..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/java-compare-outline.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-header-links.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-header-links.png
deleted file mode 100644
index ecf11e0..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-header-links.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-hover.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-hover.png
deleted file mode 100644
index baf4782..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/javadoc-hover.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-import-url.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-import-url.png
new file mode 100644
index 0000000..947ea42
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-import-url.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-view-import.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-view-import.png
deleted file mode 100644
index e46ed64..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/junit-view-import.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/missing-synchronized.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/missing-synchronized.png
deleted file mode 100644
index b411ab4..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/missing-synchronized.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/move-type-to-new-file-refactoring.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/move-type-to-new-file-refactoring.png
new file mode 100644
index 0000000..7d071b6
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/move-type-to-new-file-refactoring.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/multifix-problem-hover.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/multifix-problem-hover.png
new file mode 100644
index 0000000..82eba07
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/multifix-problem-hover.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation-command.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation-command.png
new file mode 100644
index 0000000..1c7acc3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation-command.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation.png
deleted file mode 100644
index d9c8031..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-implementation.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-junit-view.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-junit-view.png
deleted file mode 100644
index 79c92d7..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-junit-view.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-properties-file.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-properties-file.png
deleted file mode 100644
index 59e3db1..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-in-properties-file.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-type.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-type.png
deleted file mode 100644
index 81dac90..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/open-type.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/override.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/override.png
new file mode 100644
index 0000000..172bea2
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/override.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-off.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-off.png
new file mode 100644
index 0000000..4e3835b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-off.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-on.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-on.png
new file mode 100644
index 0000000..606172c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/package-abbreviations-on.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-appearance.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-appearance.png
new file mode 100644
index 0000000..ac26c94
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-appearance.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-code.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-code.png
new file mode 100644
index 0000000..7d538ea
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-code.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-compiler.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-compiler.png
new file mode 100644
index 0000000..0221293
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/preference-transfer-compiler.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/refresh-element-action.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/refresh-element-action.png
new file mode 100644
index 0000000..f4663e2
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/refresh-element-action.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/remove-from-view-action.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/remove-from-view-action.png
new file mode 100644
index 0000000..7cb23cc
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/remove-from-view-action.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/rename-in-workspace.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/rename-in-workspace.png
deleted file mode 100644
index 3786c86..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/rename-in-workspace.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/runnable-jar-in-jar-export.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/runnable-jar-in-jar-export.png
deleted file mode 100644
index 636205b..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/runnable-jar-in-jar-export.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/sort-working-sets.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/sort-working-sets.png
deleted file mode 100644
index 4ec0ca5..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/sort-working-sets.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/source-attachments-in-referenced-JARs.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/source-attachments-in-referenced-JARs.png
new file mode 100644
index 0000000..578a051
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/source-attachments-in-referenced-JARs.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/suppress-optional-errors.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/suppress-optional-errors.png
new file mode 100644
index 0000000..f180a21
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/suppress-optional-errors.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/switch-case-fall-through.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/switch-case-fall-through.png
deleted file mode 100644
index 08646ea..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/switch-case-fall-through.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/unused-object-allocation.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/unused-object-allocation.png
new file mode 100644
index 0000000..bb389e9
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/unused-object-allocation.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/value-in-javadoc.png b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/value-in-javadoc.png
new file mode 100644
index 0000000..efd2e7e
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/images/value-in-javadoc.png differ
diff --git a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html
index 8f19f46..c80c9de 100644
--- a/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html
+++ b/eclipse/plugins/org.eclipse.jdt.doc.user/whatsNew/jdt_whatsnew.html
@@ -1,11 +1,10 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1"
-	type="text/css">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
+<meta http-equiv="Content-Language" content="en-us"/>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css"/>
 <style type="text/css">
 td {border-top: solid thin black;}
 td table tbody tr td {border-top: none;} /* no border for nested tables */
@@ -13,33 +12,34 @@ img[alt] {background-color:#ffdddd;}
 tr {vertical-align: top;}
 ul {padding-left: 1.2em;}
 </style>
-<title>What's New in 3.5 (JDT)</title>
+<title>What's New in 3.6 (JDT)</title>
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
 </head>
 
 <body>
-<h2>What's New in 3.5 (JDT)</h2>
+<h2>What's New in 3.6 (JDT)</h2>
 <p>Here are descriptions of some of the more interesting or significant changes made to the Java development tools
-for the 3.5 release of Eclipse. They are grouped into:</p>
+for the 3.6 release of Eclipse. They are grouped into:</p>
 <ul>
 	<li><a href="#JavaEditor">Java Editor</a></li>
-	<li><a href="#JavaCompareEditor">Java Compare Editor</a></li>
-	<li><a href="#JavaRefactoring">Java Refactoring and Source Actions</a></li>
+	<li><a href="#JavaFormatter">Java Formatter</a></li>
+	<li><a href="#JavaRefactoring">Java Refactorings</a></li>
 	<li><a href="#JavaCompiler">Java Compiler</a></li>
 	<li><a href="#JavaViews">Java Views and Dialogs</a></li>
+	<li><a href="#JUnit">JUnit</a></li>
 </ul>
 <p>
-See also the <a href="../../org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html">Eclipse Platform What's New in 3.5</a>
+See also the <a href="../../org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html">Eclipse Platform What's New in 3.6</a>
 document for changes in the Platform.
 </p>
-<br>
+<br/>
 <!-- *************************************************** -->
 
 
 <table cellpadding="10" cellspacing="0" width="600" summary="New and noteworthy items">
   <colgroup>
-  <col width="30%">
-  <col width="70%">
+  <col width="30%"/>
+  <col width="70%"/>
   </colgroup>
 
   <tbody>  
@@ -49,470 +49,560 @@ document for changes in the Platform.
           Java Editor </div></td>
     </tr>
 
-  <tr id="constructor-completion"> 
+  <tr id="multifix-problem-hover">
     <td width="30%" valign="top" align="left">
-		<b>Constructor completion</b>
-	</td>
+      <b>Fix multiple problems via problem hover</b>
+    </td>
     <td width="70%" valign="top">
-      Content Assist can now propose the available constructors of a class when
-         the completion happens in an allocation expression:
-      <p><img src="images/constructor-completion.png" alt="Constructor completion"></p>
-      <p>If the class is not already imported (as shown in the example above),
-      then the corresponding import will also be added.</p>
+      The problem hover now shows quick fix links that fix multiple instances of a problem in a file:
+      <p><img src="images/multifix-problem-hover.png" alt="Support for multi-fix quick fixes in problem hover"/></p>       
+      The new links behave the same as pressing <b>Ctrl+Enter</b> in the Quick Fix proposal list (<b>Ctrl+1</b>). 
     </td>
   </tr>
 
-  <tr id="open-implementation">
+  <tr id="annotations-in-javadoc">
     <td width="30%" valign="top" align="left">
-        <b>Open Implementation hyperlink</b>
+        <b>Javadoc hovers include annotations</b>
     </td>
     <td width="70%" valign="top">
-        An <b>Open Implementation</b> hyperlink has been added for overridable methods, which directly opens the implementation 
-        in case there's only one, or shows all the concrete implementations for that method in the hierarchy of its declaring type, using 
-        the quick type hierarchy. By default, the hyperlink appears when you hold down the <b>Ctrl</b> key
-        while hovering over an overridable method.
-       <p><img src="images/open-implementation.png" alt="Open Implementation hyperlink for methods" ></p>
-       <p>You can configure the modifier for this hyperlink on the
-       <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.editors.preferencePages.HyperlinkDetectorsPreferencePage)")'>
-       <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the hyperlinking preference page">
-       <b>General > Editors > Text Editors > Hyperlinking</b></a> preference page.</p>
+        Javadoc hovers now include annotations:
+        <p><img src="images/annotations-in-javadoc.png" alt="Javadoc hover"/></p>
     </td>
   </tr>
-  
-  <tr id="select-comment">
+
+  <tr id="value-in-javadoc">
     <td width="30%" valign="top" align="left">
-        <b>Select comment with double click</b>
+        <b>Javadoc hovers render {@value}</b>
     </td>
     <td width="70%" valign="top">
-		Double clicking on the beginning or end marker of a comment now selects the whole comment.
+        Javadoc hovers now render {@value} inlined:
+        <p><img src="images/value-in-javadoc.png" alt="Javadoc hover"/></p>
     </td>
   </tr>
   
-    <tr id="rename-in-workspace">
+   <tr id="open-implementation-command">
     <td width="30%" valign="top" align="left">
-        <b>Quick Fix to start Rename refactoring</b>
+        <b>Command to open an implementation</b>
     </td>
     <td width="70%" valign="top">
-    	The <b>Rename</b> refactoring can now also be started via Quick Fix (<b>Ctrl+1</b>):
-       <p> <img src="images/rename-in-workspace.png" alt="Quick Fix 'Rename in workspace' in Java editor"></p>
+    	The <b>Open Implementation</b> command is available from the <b>Navigate</b> menu. A key binding can be
+    	assigned on the
+		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Keys)")'>
+		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens keys preference page"/>
+		<b>General > Keys</b></a> preference page.
+        <p><img src="images/open-implementation-command.png" alt="Open Implementation action in Navigate menu" /></p>
+    	<p>
+    	This action is enabled on text selections in the Java editor for overridable methods and directly opens the implementation in case there's only one, 
+    	or shows all the concrete implementations for that method in the hierarchy of its declaring type, using the Quick Type Hierarchy.</p> 
     </td>
+  </tr> 
+
+  <tr id="getter-setter-content-assist">
+    <td width="30%" valign="top" align="left"><b>Improved content assist for getter and setter proposals</b></td>
+    <td width="70%" valign="top">Content assist now proposes all possible getter and setter proposals
+    in case of field name clashes and no longer proposes setter proposals for final fields.
+	</td>
   </tr>
 
-  <tr id="javadoc-header-links">
+  <tr id="new-preference-transfer-code">
     <td width="30%" valign="top" align="left">
-        <b>Links in Javadoc headers</b>
+        <b>New 'Java Code Style Preferences' category when importing or exporting preferences</b>
     </td>
     <td width="70%" valign="top">
-        In the headers of Javadoc hovers and the Javadoc view, references to other types and members are now links.
-        You can click on a method return type or parameter type to quickly read the type's Javadoc.
-    	<p><img src="images/javadoc-header-links.png" alt="Javadoc hover with mouse over method return type"></p>
-    	And when you're done with reading, just click <b>Back</b> in the toolbar to see the original Javadoc again.
+        When importing or exporting preferences, a new category is available that
+        allows you to control whether Java code style preferences are imported or exported:
+       <p><img src="images/preference-transfer-code.png" alt="Java code style preference transfers"/></p> 
     </td>
   </tr>
-  
-  <tr id="open-in-properties-file">
+
+  <!-- ******************* Java Formatter ************************************* -->
+  <tr> 
+    <td colspan="2"><a name="JavaFormatter"></a> <div style="font-size: 20px; font-weight: bold;"> 
+      Java Formatter </div></td>
+  </tr>
+
+  <tr id="formatter-disabling-enabling-tags-preference"> 
     <td width="30%" valign="top" align="left">
-        <b>Open in Properties File action in NLS Hover</b>
+      <b>Control the formatting in code sections</b>
     </td>
     <td width="70%" valign="top">
-        The <b>NLS string hover</b> now has an <b>Open in Properties File </b> action in the toolbar which  
-        locates the selected NLS string in the corresponding properties file where it is defined. The action 
-        is activated in the toolbar with focus on the hover. 
-       <p><img src="images/open-in-properties-file.png" alt="Open in Properties File action in NLS hover"></p>        
+      This preference allows you to define one tag to disable and one tag
+      to enable the formatter (see the <b>Off/On Tags</b> tab in your formatter
+      profile):
+      <p><img src="images/formatter-disabling-enabling-tags-preference.png"
+          alt="Java formatter preference page. Set the disabling and enabling tags on the 'Off/On Tags' tab of the formatter profile."/></p>
+      <p>Here is an example of formatted code which is using code sections
+      with the tags defined as shown above:</p>
+      <p><img src="images/formatter-disabling-enabling-tags-formatted.png"
+          alt="Java formatter example. The simple snippet with the formatted annotation and its element-value pairs aligned."/></p>
     </td>
   </tr>
-  
-  <tr id="joinLine-formatter-option"> 
+
+  <tr id="formatter-prefer-wrapping-outer-expressions-preference"> 
     <td width="30%" valign="top" align="left">
-		<b>Formatter option to preserve user line breaks</b>
+      <b>New strategy to wrap nested method calls</b>
     </td>
     <td width="70%" valign="top">
-      The Java code formatter can now optionally preserve user line breaks by not joining lines in code or comments.
-      <p>For example, the wrapped lines of the <code>return</code> statement in following test case:</p>
-      <p><img src="images/formatter-join-lines-before.png" alt="Example of Code to Format"></p>  
-      <p>will be preserved by the formatter when the <b>Never join lines</b> preference is used and now produces the following result:</p>
-      <p><img src="images/formatter-join-lines-after.png" alt="Coded Formatted with Never Join Lines"></p>  
-      <p>This preference can be configured on the
-      <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.CodeFormatterPreferencePage)")'>
-      <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the formatter preference page">
-      <b>Java > Code Style > Formatter</b></a> preference page.
-      		 See the <b>Never join lines</b> option on the <b>Line Wrapping</b> and <b>Comments</b> tab.</p>
+      The Java formatter now tries to wrap the outermost method calls
+      first to have a better output when wrapping nested method calls.
+      <p>
+      Here is an example of a formatted code where the formatter has
+      wrapped the line earlier, e.g. between the arguments of the outermost
+      message call. Doing this, each nested method call is kept on a single
+      line:</p>
+      <p><img src="images/formatter-prefer-wrapping-outer-expressions-formatted.png"
+          alt="Java formatter example. The simple snippet with the formatted nested method calls."/></p>
+      <p>
+      A new preference allows you to disable this new strategy, e.g. if you want to format your code as before:</p>
+      <p><img src="images/formatter-prefer-wrapping-outer-expressions-preference.png"
+          alt="Java formatter preference page. Activate the new strategy when wrapping nested method calls."/></p>
+          
+      <p><b>Note:</b> Currently the new strategy only applies to nested method
+      calls, but that might be extended to other nested expressions in future
+      versions.</p>
     </td>
   </tr>
 
-   <!-- ******************* Java Compare Editor ************************************* -->
-
-     <tr> 
-      <td colspan="2"><a name="JavaCompareEditor"></a> <div style="font-size: 20px; font-weight: bold;"> 
-          Java Compare Editor</div></td>
-    </tr>
-   
-  <tr id="workspace_java-compare">
+  <tr id="formatter-new-line-after-label-preference"> 
     <td width="30%" valign="top" align="left">
-		<b>General editing enhancements</b></td>
+      <b>Insert a new line after a label</b>
+    </td>
+
     <td width="70%" valign="top">
-		The Java Compare editor now supports new text editing features like move/copy/delete line and formatting.
+      <img src="images/formatter-new-line-after-label-preference.png"
+          alt="Java formatter preference page. Check the preference on the 'New Lines' tab of the formatter profile."/>
+      <p>For example, with this preference activated as shown above, the loop
+      will be placed on a new line after its label:</p>
+      <p><img src="images/formatter-new-line-after-label-formatted.png"
+          alt="Java formatter example. The simple snippet with a label formatted."/>
+      </p>
     </td>
   </tr>
 
-    <tr id="java-compare-hyperlinking">
+  <tr id="formatter-align-annotation-arguments-preference"> 
     <td width="30%" valign="top" align="left">
-        <b>Hyperlinking (Ctrl+Click)</b>
+      <b>Align element-value pairs in annotations</b>
     </td>
     <td width="70%" valign="top">
-    	<img src="images/java-compare-hyperlinking.png" alt="Hyperlinking">
-	</td>
-  </tr>
-  
-    <tr id="java-compare-content-assist">
-    <td width="30%" valign="top" align="left">
-        <b>Content Assist (Ctrl+Space)</b>
+      <img src="images/formatter-align-annotation-arguments-preference.png"
+          alt="Java formatter preference page. Check the preference on the 'Line Wrapping' tab of the formatter profile."/>
+      <p>For example, the two annotation arguments are each put on a new line
+      if the chosen alignment policy for this preference is <b>Wrap all elements,
+      every element on a new line</b> and if the <b>Force split</b> check-box
+      is selected:</p>
+      <p><img src="images/formatter-align-annotation-arguments-formatted.png"
+          alt="Java formatter example. The simple snippet with the formatted annotation and its element-value pairs aligned."/></p>
     </td>
-    <td width="70%" valign="top">
-		<img src="images/java-compare-assist.png" alt="Content Assist">
-	</td>
   </tr>
-  
-    <tr id="javadoc-on-hover">
+
+  <tr id="formatter-wrap-method-declaration-preference"> 
     <td width="30%" valign="top" align="left">
-        <b>Javadoc on hover</b>
+      <b>Wrap method declaration</b>
     </td>
     <td width="70%" valign="top">
-		<img src="images/java-compare-hover.png" alt="Javadoc hovers">
-	</td>
+      <img src="images/formatter-align-method-declaration-preference.png"
+          alt="Java formatter preference page. Check the preference on the 'Line Wrapping' tab of the formatter profile."/>
+      <p>For example, the modifier, the return type and the name of the method
+      can each be placed on a new line if the chosen alignment policy for
+      this preference is <b>Wrap all elements, every element on a new line</b>
+      and if the <b>Force split</b> check-box is selected:</p>
+      <p><img src="images/formatter-align-method-declaration-formatted.png"
+         alt="Java formatter example. The simple snippet with the formatted method declaration aligned."/></p>
+    </td>
   </tr>
-  
-    <tr id="java-compare-quick-outline">
+
+  <tr id="formatter-condense-multi-lines-comments-preference"> 
     <td width="30%" valign="top" align="left">
-        <b>Quick Outline (Ctrl+O)</b>
+      <b>Put start and end of comments on separate lines</b>
     </td>
+
     <td width="70%" valign="top">
-		<img src="images/java-compare-outline.png" alt="Quick outline">
+      This preference lets you to decide whether the beginning and the
+      ending characters of a multi-line comment will be placed on separate
+      lines or not:
+      <p><img src="images/formatter-condense-multi-lines-comments-preference.png"
+          alt="Java formatter preference page. Check the preferences on the 'Comments' tab of the formatter profile."/></p>
+      <p>For example with the above preferences disabled,
+      a block comment can be formatted to take less lines in the code:</p>
+      <p><img src="images/formatter-condense-multi-lines-comments-formatted.png"
+          alt="Java formatter example. The simple snippet with the block and javadoc comments formatted with less lines than with the default profile."/></p>
     </td>
   </tr>
-  
-    <tr id="java-compare-reconcile">
+
+  <tr id="formatter-skip-first-column-comments-preference"> 
     <td width="30%" valign="top" align="left">
-        <b>Reconcile Java compare structure while typing</b>
+      <b>Skip formatting of line comments starting at first column</b>
     </td>
+
     <td width="70%" valign="top">
-        The Java compare editor now updates its structure while you are typing inside the editor.
-        <p><img src="images/dynamic-structure-compare.png" alt="Dynamic structure comparison"></p>
+      This preference lets you decide whether line comments which start
+      at the first column of the file will be formatted or not:
+      <p><img src="images/formatter-skip-first-column-comments-preference.png"
+          alt="Java formatter preference page. Check the preference on the 'Comments' tab of the formatter profile."/></p>
+      <p>For example, with this preference not activated as shown above,
+      the first comment is untouched after the formatting:</p>
+      <p><img src="images/formatter-skip-first-column-comments-formatted.png"
+          alt="Java formatter example. A simple snippet with line comment starting at first column."/></p>
     </td>
   </tr>
-  
-    
+
   <!-- *************** Java Refactoring ************************************ -->
     <tr> 
       <td colspan="2"><a name="JavaRefactoring"></a> <div style="font-size: 20px; font-weight: bold;"> 
-          Java Refactoring and Source Actions</div></td>
+          Java Refactorings</div></td>
     </tr>
 
-  <tr id="generate-tostring">
-    <td width="30%" valign="top" align="left">
-        <b>Generate toString()</b>
-    </td>
+ <tr id="extract-method-continue">
+    <td width="30%" valign="top" align="left"><b>Extract Method improvements</b></td>
     <td width="70%" valign="top">
-        The new toString() generator allows you to quickly generate a toString() method for your class.
-        <b>Source</b> > <b>Generate toString()...</b> offers several options to configure the
-        format of the resulting String and the style of the generated code in the toString() method body.
-       <p><img src="images/generate-tostring-dialog.png" alt="Generate toString() dialog"></p>
+      The <b>Extract Method</b> refactoring now handles selections that contain <code>continue</code> statements.
+      To preserve the semantics of the existing code, the selection needs to include the last statement of the loop.
+      In the extracted method, <code>continue</code> statements are changed to <code>return</code>:
+      <p>
+
+        <img src="images/extract-method-continue.png" alt="Extract method refactoring with continue" />
+      </p>
+      For a selection that would need multiple return values in the extracted method,
+      Eclipse now lists the conflicting variables in the error message:
+      <p>
+        <img src="images/extract-method-multiple-return-values.png" alt="Extract method refactoring with an ambiguous return value error" />
+      </p>
     </td>
   </tr>
 
-  <tr id="use-blocks">
+  <tr id="move-type-to-new-file-refactoring">
     <td width="30%" valign="top" align="left">
-        <b>Optionally use blocks when generating hashCode() and equals()</b>
+        <b>Move type to new file refactoring</b>
     </td>
     <td width="70%" valign="top">
-    	The <b>Generate hashCode() and equals()</b> wizard now allows you to choose
-    	whether blocks are used for <code>if</code> statements:
-		<p><img src="images/hashcode-and-equals-wizard.png" alt="Generate hashCode() and equals() wizard"></p>
+        The <b>Convert Member Type to Top Level</b> refactoring has been renamed to <b>Move Type to New File</b> and now allows any
+        secondary type in a file to be moved into its own file. The action continues to work for member types.
+        <p><img src="images/move-type-to-new-file-refactoring.png" alt="Move Type to New File refactoring"/></p>
     </td>
   </tr>
-     
+
     <!-- ******************* Java Compiler ************************************* -->
     <tr> 
       <td colspan="2"><a name="JavaCompiler"></a> <div style="font-size: 20px; font-weight: bold;"> 
           Java Compiler </div></td>
     </tr>
 
-    <TR id=compiler-diagnostic>
-      <TD vAlign=top align=left width="30%"><B>Comparing identical values</B> </TD>
-      <TD vAlign=top width="70%">Comparing identical values is now detected
-          by the compiler and reported as a warning by default:
-        <P><IMG alt="Comparing Identical Values Warning Example" 
-      src="images/comparing-identical-values-example.png"></p>
-        <P>You can configure this setting in the <B>Potential programming problems</B> section
-          on the
-          <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
-          <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page">
-          <b>Java > Compiler > Errors/Warnings</b></a> preference page,
-          or by clicking the <B>Configure Problem Severity</B> button in the
-          problem hover toolbar.</P></TD>
-    </TR>
-
-  <tr id="missing-synchronized">
-    <td width="30%" valign="top" align="left">
-        <b>Missing synchronized modifier</b>
-    </td>
-    <td width="70%" valign="top">
-    	The compiler now issues a warning when a method overrides a synchronized method
-    	but the method itself is not synchronized.
-    	<p><img src="images/missing-synchronized.png" alt="Problem hover with quick fix for missing synchronized modifier"></p>
-    	You can use the quick fix to add the <code>synchronized</code> modifier, and you can
-    	configure the problem severity on
-        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
-        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page">
-        <b>Preferences > Java > Compiler > Errors/Warnings</b></a> 
-    	in the <b>Potential programming problems</b> section.
-    </td>
+  <tr id="override-annotation-interfaces">
+    <td width="30%" valign="top" align="left"><b>Report missing <code>@Override</code> for method implementations in 1.6 mode </b></td>
+    <td width="70%" valign="top">The compiler now reports about missing <code>@Override</code> annotation in the case where a method implements
+	a method from an interface:
+	<p><img src="images/override.png" alt="Missing @Override annotation"/></p>
+	<p>
+	This new behavior can be controlled via
+	<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
+	<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page"/>
+	<b>Java > Compiler > Errors/Warnings</b></a>
+	in the <b>Annotations</b> section and configured for Clean Up and Save Actions.
+	</p>
+	<p><strong>Note:</strong> This is reported only in 1.6 mode as <code>@Override</code> annotations are not expected on a method implementation in 1.5.</p>  
+	</td>
   </tr>
 
-  <tr id="switch-case-fall-through">
-    <td width="30%" valign="top" align="left">
-        <b>Suppress compiler problem for 'switch' case fall-through</b>
-    </td>
-    <td width="70%" valign="top">
-        The compiler problem for expected fall-throughs in switch case statements can now be suppressed by preceding
-        the following <code>case</code> statement with a comment that starts with $FALL-THROUGH$. This is especially
-		interesting for code that can't use the J2SE-5.0-style <code>@SuppressWarnings("fallthrough")</code> annotation.
-    	<p><img src="images/switch-case-fall-through.png" alt="Problem hover with quick fixes for switch case fall-through"></p>
-    	This problem is not reported by default. You can enable the <b>'switch' case fall-through</b> warning on
-        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
-        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page">
-        <b>Preferences > Java > Compiler > Errors/Warnings</b></a> 
-    	in the <b>Potential programming problems</b> section.
-    </td>
+  <tr id="rawtypes-token">
+    <td width="30%" valign="top" align="left"><b>New "rawtypes" token for <code>@SuppressWarnings</code> annotation</b></td>
+    <td width="70%" valign="top">The compiler now makes the distinction between warnings reported for raw type usage versus warnings reported for unchecked 
+	generic operations.
+	<p>In case it is not possible to update the code with the new token, the <code>suppressRawWhenUnchecked=true</code> system property can be set when starting Eclipse.</p>
+	</td>
   </tr>
 
-  <tr id="hash-code-compiler-diagnostic"> 
-    <td width="30%" valign="top" align="left">
-        <b>Missing hashCode() method</b>
-    </td>
-    <td width="70%" valign="top">
-    	The compiler can now detect whether a class overrides the <code>equals()</code> method
-    	without overriding the <code>hashCode()</code> method:
-    	<p><img src="images/compiler-hashcode-diagnosis.png" alt="Problem hover with quick fix for missing hashCode method"></p>
-    	<p>You can either use the quick fix to override the <code>hashCode()</code> method or the quick fix to regenerate both methods.</p>
-    	<p>This problem is not reported by default. You can enable it on
-        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
-        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page">
-        <b>Preferences > Java > Compiler > Errors/Warnings</b></a> 
-    	in the <b>Potential programming problems</b> section.</p>
+  <tr id="suppress-optional-errors">
+    <td width="30%" valign="top" align="left"><b><code>@SuppressWarnings</code> for optional errors</b></td>
+    <td width="70%" valign="top">The <code>@SuppressWarnings</code> annotation can now also suppress optional compile errors:
+        <p><img src="images/suppress-optional-errors.png" alt="A suppressed and an unsuppressed optional error"/></p>
+        <p>In this example, <b>Local variable is never read</b> has been set to Error.</p>
+        <p>This behavior can be enabled on the
+		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
+		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page"/>
+		<b>Java > Compiler > Errors/Warnings</b></a>
+        preference page
+        in the <b>Annotations</b> section with the check box <b>Suppress optional errors with '@SuppressWarnings'</b>.</p>
     </td>
   </tr>
 
-  <tr id="deadCode-diagnostic"> 
+  <tr id="unused-object-allocation-detection">
     <td width="30%" valign="top" align="left">
-		<b>Dead code</b>
+        <b>Compiler detects unused object allocation</b>
     </td>
-
     <td width="70%" valign="top">
-      The compiler can now issue a warning if dead code is detected.
-      <p> For instance, <code>if (false) foo();</code> is not reported as truly unreachable code by the Java Language Specification. 
-             When this diagnostic is enabled, the invocation of foo() is signaled as dead code:</p>
-      <p><img src="images/compiler-deadcode-diagnosis.png" alt="Problem hover with quick fix for dead code"></p>
-      <p>This problem is reported as a warning by default.  You can configure the problem severity on
-        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
-        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page">
-        <b>Preferences > Java > Compiler > Errors/Warnings</b></a> 
-	    	in the <b>Potential programming problems</b> section</p>
-      <p>Note that dead code following an <code>if (constant variable)</code> statement, e.g. <code>if (DEBUG)</code>, is not reported.</p>
+        The Java compiler can now detect unused object allocations:
+        <p><img src="images/unused-object-allocation.png" alt="if (name == null) new IllegalArgumentException();"/></p> 
+        This detection is disabled by default and can be enabled on the
+		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)")'> 
+		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Errors/Warnings preference page"/>
+		<b>Java > Compiler > Errors/Warnings</b></a>
+        preference page
+        at the end of the <b>Potential programming problems</b> section.
     </td>
   </tr>
-
-  <tr id="class-path-header"> 
+  
+  <tr id="compiler-preference-transfer-compiler">
     <td width="30%" valign="top" align="left">
-		<b>Classpath resolution honors the 'Class-Path' header of JAR manifest file</b>
+        <b>Import and export compiler preferences</b>
     </td>
     <td width="70%" valign="top">
-      The 'Class-Path' header of a JAR manifest is now honored in the Java model. JARs defined by 'Class-Path' are now automatically
-      added to the build path.
-      <p>For example, 'nested.jar' is a referenced library although it was not explicitly specified in the project build path
-      but through the manifest of 'lib.jar':</p>
-      <p><img src="images/class-path-header.png" alt="Class-Path Clause Example"></p>  
+        The new 'Java Compiler Preferences' category allows to just import or export the compiler preferences:
+       <p><img src="images/preference-transfer-compiler.png" alt="New Java Compiler Preference transfer"/></p> 
     </td>
   </tr>
 
-  <tr id="relative-build-path"> 
+   <!-- ******************* Java Views and Dialogs ************************************* -->
+     
+     <tr> 
+      <td colspan="2"><a name="JavaViews"></a> <div style="font-size: 20px; font-weight: bold;"> 
+          Java Views and Dialogs</div></td>
+    </tr>
+
+   <tr id="new-build-path-error-decorator">
     <td width="30%" valign="top" align="left">
-		<b>Build path supports ".."</b>
+        <b>New build path error decorator</b>
     </td>
     <td width="70%" valign="top">
-      The path of a library, variable or container entry can now be anywhere relative to the project,
-      e.g. if the library is on a sibling directory, its path can be specified using the ".." as follows:
-      <p><img src="images/build-path-dot-dot-path.png" alt="Parent Relative Path Example"></p>  
+        Build path problems are sometimes easy to miss among other problems in a project.
+        The <b>Package Explorer</b> and <b>Project Explorer</b> views now show a new 
+        decorator on Java projects and working sets that contain build path errors:
+       <p><img src="images/build-path-error-decorator.png" alt="Build path error decorator"/></p> 
+       
+        <p>The concrete errors can be seen in the <b>Problems</b> view, and if you open the view menu and select
+        <b>Group By > Java Problem Type</b>, they all show up in the Build Path category:</p>
+       <p><img src="images/build-path-problems.png" alt="Build path error decorator"/></p> 
     </td>
   </tr>
 
-  <tr id="duplicate-build-path-diagnostic"> 
+   <tr id="package-name-abbreviations">
     <td width="30%" valign="top" align="left">
-		<b>Build path resolution tolerates duplicate entries</b>
+        <b>Package name abbreviations</b>
     </td>
     <td width="70%" valign="top">
-      Duplicate entries in the build path are now tolerated if the redundant entry is found while resolving the build path
-      and not at the raw level.
-      <p>For example, two user libraries used in the project build path referring to the same JAR file are tolerated:</p>
-      <p><img src="images/build-path-duplicate-entries.png" alt="Classpath Duplicate Entries Example"></p>
-      However, an error is reported if the same JAR file is directly specified twice:
-      <p><img src="images/build-path-invalid-dups.png" alt="Classpath Invalid Duplicate Entries Example"></p>
+        Package names in Java views can now be abbreviated with custom rules. For example,
+        the following rules produce the rendering shown below:
+        <pre>org.eclipse.ui={UI}
+org.eclipse.ui.texteditor={T}
+org.eclipse.ui.internal.texteditor=[iT]</pre>
+        <table cellpadding="0" cellspacing="0" summary="Screenshots">
+        <tr>
+	        <td>Without abbreviations:</td>
+	        <td>With abbreviations:</td>
+        </tr>
+        <tr>
+	        <td style="padding-top:2px; padding-right:7px;"><img src="images/package-abbreviations-off.png" alt="Package Explorer with abbreviations disabled"/></td>
+	        <td style="padding-top:2px;"><img src="images/package-abbreviations-on.png" alt="Package Explorer with abbreviations enabled"/></td>
+        </tr>
+        </table>
+       
+        <p>The abbreviation rules can be configured on the
+		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.AppearancePreferencePage)")'>
+		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Appearance preference page"/>
+		<b>Java > Appearance</b></a>
+		preference page.</p>
     </td>
   </tr>
 
-  <tr id="compliance-follows-execution-environment">
+  <tr id="remove-from-view-action">
     <td width="30%" valign="top" align="left">
-        <b>Compiler compliance follows execution environment</b>
+        <b>Remove nodes from Call Hierarchy</b>
     </td>
     <td width="70%" valign="top">
-        When you change the JRE on the build path of a Java project to an execution 
-        environment, Eclipse now automatically updates the compiler compliance settings 
-        on the <b>Java Compiler</b> properties page to use the settings defined by the execution environment.
-       <p><img src="images/compliance-follows-ee.png" alt="Java Compiler properties page"></p>
-       <p>Note that as of 3.5, an execution environment is the first choice when 
-       creating a new Java project or a launch configuration.</p>
+        The <b>Call Hierarchy</b> now allows to remove a single or multiple nodes from the view via context menu:
+       <p><img src="images/remove-from-view-action.png" alt="Remove from View action in Call Hierarchy"/></p>        
     </td>
   </tr>
-
-   <!-- ******************* Java Views and Dialogs ************************************* -->
-     
-     <tr> 
-      <td colspan="2"><a name="JavaViews"></a> <div style="font-size: 20px; font-weight: bold;"> 
-          Java Views and Dialogs</div></td>
-    </tr>
-
-  <tr id="open-type">
+  
+  <tr id="refresh-element-action">
     <td width="30%" valign="top" align="left">
-        <b>Emphasized matching characters in Open Type dialog</b>
+        <b>Improved refresh in the Call Hierarchy</b>
     </td>
     <td width="70%" valign="top">
-        The <b>Open Type</b> dialog now emphasizes the characters that match the pattern:
-       <p><img src="images/open-type.png" alt="Emphasized matching characters in Open Type dialog"></p>
+        The Call Hierarchy now allows to refresh single or multiple elements at once via the <b>Refresh (F5)</b> action from the context menu:
+       <p>
+         <img src="images/refresh-element-action.png" alt="Refresh element action in Call Hierarchy"/></p> 
+       <p>
+       This will refresh the selected elements and their direct children. The action in the toolbar has been renamed to <b>Refresh View</b> and still refreshes the entire view.
+    	</p>
     </td>
   </tr>
-
-  <tr id="sort-working-sets">
+  
+  <tr id="background-computation-of-type-hierarchy">
     <td width="30%" valign="top" align="left">
-        <b>Sort working sets in Package Explorer</b>
+      <b>Type Hierarchy computed in background</b>
     </td>
     <td width="70%" valign="top">
-        The <b>Configure Working Sets...</b> dialog now has a <b>Sort working sets</b> option to sort working sets alphabetically.
-	    The setting is preserved, so the working sets stay sorted, even as new working sets are added.
-       <p><img src="images/sort-working-sets.png" alt="Sort working sets in Package Explorer"></p>
-        You can enable working sets in the Package Explorer via the <b>Top Level Elements</b> > <b>Working Sets</b> view menu.
+      The <b>Type Hierarchy</b> is now computed in an operation that can be sent to the background
+      (or always runs in the background, depending on your settings):
+      <p><img src="images/background-computation-of-type-hierarchy.png" alt="Background computation of Type Hierarchy"/></p> 
+      <p>Your workbench is no longer blocked while a big hierarchy is computed.</p>       
     </td>
   </tr>
 
-  <tr id="delete-workingSets">
+  <tr id="export-all-formatter">
     <td width="30%" valign="top" align="left">
-        <b>Delete working sets from the Package Explorer</b>
+        <b>Export all profiles</b>
     </td>
     <td width="70%" valign="top">
-    	The <b>Delete</b> functionality is now enabled for working sets when the top level 
-    	elements are Working Sets in the Package Explorer. When deleting working sets, you can now either remove or
-    	just hide them from the Package Explorer: 
-       <p> <img src="images/delete-working-set.png" alt="Delete working sets from a Package Explorer"></p> 
+        The <b>Formatter</b> preference page and the <b>Clean Up</b> preference page now have an <b>Export All... </b> button that allows exporting all user-defined profiles 
+		into an XML file. The exported profiles can be imported from the XML file at once using the <b>Import...</b> button. 
+       <p><img src="images/export-all-profiles.png" alt="Export All... from Formatter preference page"/></p>        
     </td>
   </tr>
 
-  <tr id="paste-patch">
+  <tr id="open-attached-javadoc">
+    <td width="30%" valign="top" align="left"><b>Opening attached Javadoc now uses preferred web browser</b></td>
+    <td width="70%" valign="top"><b>Open External Javadoc</b> has been renamed to <b>Open Attached Javadoc</b> and now uses the configured web browser: 
+	<p><img src="images/browser-preferences.png" alt="Web Browser preferences"/></p> 
+	</td>
+  </tr>
+  
+	<tr id="instancecounts">
+	<td align="left" valign="top" width="30%"><b>Instance counts
+	</b></td>
+	<td valign="top" width="70%">The <b>Variables</b> view provides a new column
+	displaying the number of instances corresponding to the concrete type of
+	each variable. To display the column, 
+	select <b>Layout > Select Columns...</b> from the view's menu, and then
+	select <b>Instance Count</b> from the <b>Select Columns</b> dialog.
+	Note that instance counts are only available debugging on JavaSE-1.6 (or newer) and
+	are not applicable to primitive types.
+	<p><img alt="Instance Counts" title="Instance Counts" src="images/instance-counts.png"/><br/><br/></p>
+	<p>You can also display the instance count of a selected type in an editor or editor outline
+	and selecting <b>Instance Count...</b> from the context menu. The result is displayed
+	in a dialog. 
+	</p>
+	</td>
+	</tr>
+
+	<tr id="breakpoint-details">
+		<td align="left" valign="top" width="30%"><b>Java breakpoint detail</b></td>
+		<td valign="top" width="70%">The Java breakpoint detail panes now
+		display all properties in a single pane. Detail pane orientation can be configured
+		via the <b>Layout</b> view menu.
+		<p><img alt="Breakpoint Detail Panes" src="images/bp-details.png"/><br/><br/></p>
+		<p>For example, a Java line breakpoint allows its condition to be edited in place with content
+		assist. Use the <b>File > Save (Ctrl+S)</b> action to save a condition that has been edited.
+		Radio button properties are saved immediately.
+		</p>
+		</td>
+	</tr>
+
+  <tr id="source-attachments-in-referenced-JARs">
+    <td width="30%" valign="top" align="left"><b>Source attachments for referenced JARs</b></td>
+    <td width="70%" valign="top">Source attachments can now be configured separately for JARs
+        that are not directly on the classpath of a Java project, but referenced from another
+        JAR via the <code>Class-Path:</code> attribute in the <code>MANIFEST.MF</code>:
+        <p><img src="images/source-attachments-in-referenced-JARs.png" alt="Screenshot showing source attachment dialog"/></p>
+    </td>
+  </tr>
+
+  <tr id="find-externalized-strings">
+    <td width="30%" valign="top" align="left"><b>Find broken externalized strings improvements</b></td>
+    <td width="70%" valign="top"><b>Source > Find Broken Externalized Strings</b> now reports less false positives:
+    <p>• It ignores
+    all methods that don't take a single parameter of type <code>String</code>. For example, method calls like
+    <code>Messages.getResourceBundle()</code> are no longer listed as undefined keys.</p>
+  
+    <p>• Constants used for message keys are now correctly recognized.
+      In the example below, <code>MAIN_INDIRECT</code> is no longer listed as an undefined key:</p>
+     <p><img src="images/find-externalized-strings-constants.png" alt="'Find Broken Externalized Strings' handles constants example"/></p>
+    </td>
+  </tr>
+  
+    <tr id="new-preference-transfer-appearance">
     <td width="30%" valign="top" align="left">
-        <b>Paste patch into Package Explorer</b>
+        <b>New Java appearance category when importing or exporting preferences</b>
     </td>
     <td width="70%" valign="top">
-    	What's the quickest way to apply a patch from Bugzilla? Just open the attachment,
-    	copy the patch to the clipboard and paste it into the <b>Package Explorer</b>.
+        There is a new category available when importing or exporting preferences that
+        allows you to control whether
+		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.jdt.ui.preferences.AppearancePreferencePage)")'>
+		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the Appearance preference page"/>
+		<b>Java > Appearance</b></a>
+        preferences are imported or exported:
+       <p><img src="images/preference-transfer-appearance.png" alt="Java appearance preference transfers"/></p> 
     </td>
   </tr>
-  
-  <tr id="expand-with-constructors">
+
+   <!-- ******************* JUnit ************************************* -->
+     
+     <tr> 
+      <td colspan="2"><a name="JUnit"></a> <div style="font-size: 20px; font-weight: bold;"> 
+          JUnit</div></td>
+    </tr>
+
+
+  <tr id="junit4.8.1">
     <td width="30%" valign="top" align="left">
-        <b>Call Hierarchy can expand with constructors</b>
+        <b>JUnit 4.8.1</b>
     </td>
     <td width="70%" valign="top">
-        In Callers mode, the Call Hierarchy now has an <b>Expand With Constructors</b> action in the context menu for instance methods.
-        <p>
-        This action replaces the normal children of the method with
-        </p>
-        <ul>
-        <li> the constructors of the method's declaring class</li>
-        <li> a node that contains the direct callers of the method.</li>
-        </ul>
-        This is useful for methods in anonymous classes, for example to follow the callers that create a <code>Runnable</code>,
-        instead of those which actually call its <code>run()</code> method.
-        <p><img src="images/expand-with-constructors.png" alt="Expand With Constructors"></p>
-        <p>Some methods (e.g. <code>java.lang.Runnable#run()</code>) are expanded with constructors by default.
-        The defaults can be configured in the view menu.</p>
+    	The JUnit 4 version shipped with Eclipse has been updated to 4.8.1.
     </td>
   </tr>
   
-    <TR id=javadoc-hover>
-      <TD vAlign=top align=left width="30%"><B>Improved Javadoc view and hover</B> </TD>
-      <TD vAlign=top width="70%">The Javadoc view and hovers now support the <STRONG>{@inheritDoc}</STRONG> tag
-        and add links to overridden methods (like the Javadoc tool):
-        <P><img alt="Improved Javadoc hover" 
-      src="images/javadoc-hover.png"></p>
-        <P>Moreover, the message for deprecated elements now shows up on top,
-          and relative links are supported (for example, to embed images from
-          the 
-      "doc-files" directory or to link to <STRONG>{@docRoot}</STRONG>). </P></TD>
-    </TR>
-
-  <tr id="open-jar-export-wizard">
+  <tr id="org.junit-plugins">
     <td width="30%" valign="top" align="left">
-        <b>Open *.jardesc files with JAR Export Wizard</b>
+      <b>2 versions of org.junit plug-in</b>
     </td>
     <td width="70%" valign="top">
-        Opening *.jardesc files now launches the JAR Export Wizard by default.
-    	<p><img src="images/jar-export.png" alt="Open With > JAR Export Wizard"></p>
-    	<p>The <b>Open JAR Packager...</b> action in the context menu is gone.</p>
+      The SDK now ships 2 org.junit plug-ins (versions 3.8.2 and 4.8.1). Clients that want to run JUnit Plug-in Tests with a Java 5 or later VM
+      and that require org.junit with a version bound that does not include 4.x need to update their version bound to include 4.x
+      (e.g. by specifying <code>Require-Bundle: org.junit;bundle-version="3.8.2"</code>.
+      If they don't update their bounds, both versions of org.junit are resolved at run time, which leads to errors when test classes are loaded.
+      <p>For complete details on the steps required to transition to using JUnit4 or to continue using JUnit3, please see:<br/>
+      <a href="http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes">http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes</a>.</p>
     </td>
   </tr>
 
-  <tr id="open-in-junit-view">
-    <td width="30%" valign="top" align="left">
-        <b>Open test result files in JUnit view</b>
-    </td>
+  <tr id="junit-open-url">
+    <td width="30%" valign="top" align="left"><b>JUnit view opens test result URL</b></td>
     <td width="70%" valign="top">
-        JUnit test result files from Eclipse or the Ant JUnit tasks can now be opened in the JUnit view via
-        double click or via <b>Open With > JUnit View</b>.
-    	<p><img src="images/open-in-junit-view.png" alt="Open With > JUnit View"></p>
-    	<p>If the files are not inside your workspace, you can still open them
-    	from the JUnit view via the <b>Test Run History...</b> drop-down menu.
-    	And the <b>Import...</b> and <b>Export...</b> actions now always start at the most recently used location.</p>
-    	<p><img src="images/junit-view-import.png" alt="Test Run History... > Import"></p>
+      The <b>JUnit</b> view can now directly load test result files from an URL. You can either just drag and drop an URL to the view or open the
+      <b>Test Run History...</b> tool bar button's drop-down and choose <b>Import from URL...</b> to enter an URL from which
+      the test results should be loaded.
+      <p>
+        <img src="images/junit-import-url.png" alt="'Import from URL...' menu item"/></p>
+      <p>
+      Supported test run formats are XML files exported from the JUnit view or
+      generated by the Ant JUnit task.</p>
     </td>
   </tr>
   
-    <tr id="junit4.5">
-    <td width="30%" valign="top" align="left">
-        <b>JUnit 4.5</b>
+  <tr id="junit-skipped-node">
+    <td width="30%" valign="top" align="left"><b>JUnit imports test results with </b><code><skipped></code><b> nodes</b>
     </td>
     <td width="70%" valign="top">
-    	The JUnit4 version shipped with Eclipse has been updated to 4.5.
-    	See their <a href="http://sourceforge.net/project/shownotes.php?release_id=618683&group_id=15278">Release Notes</a>
-    	for the changes in version 4.5.
+        The JUnit view can now import test run files that contain <code><skipped></code> nodes.
+        Eclipse and the Ant JUnit task do not generate such nodes, but e.g. test result files from Apache Maven
+        do generate them for ignored JUnit4 tests.
     </td>
   </tr>
   
-  <tr id="jar-in-jar-exporter">
+    <tr id="edit-test-method">
     <td width="30%" valign="top" align="left">
-        <b>Runnable Jar-in-Jar exporter can package libraries</b>
+      <b>Edit test method in JUnit launch configuration</b>
+    </td>
+    <td width="70%" valign="top">
+      In JUnit launch configurations, you can now edit the test method:
+      <p><img src="images/edit-test-method.png" alt="JUnit launch configuration on 'Test' tab"/></p>       
+      When the test method is empty, all tests in the class will be run. 
     </td>
+  </tr>
+
+ <tr id="junit-split">
+    <td width="30%" valign="top" align="left"><b>org.eclipse.jdt.junit split</b></td>
     <td width="70%" valign="top">
-    	The Runnable JAR File Export wizard can now also package the required libraries into the exported runnable JAR file
-    	or into a folder next to the JAR:
-       <p> <img src="images/runnable-jar-in-jar-export.png" alt="Runnable JAR File Export wizard"></p>
-       <p> The advantage of the second and third options is that the required libraries
-         will just be copied and don't need be repackaged. </p>
+      The non-UI parts of the <code>org.eclipse.jdt.junit</code> plug-in have been split off into the new plug-in
+      called <code>org.eclipse.jdt.junit.core</code>. This change does not affect existing clients of the
+      <code>org.eclipse.jdt.junit</code> plug-in, but allows new clients to use only the launcher without
+      requiring all the UI dependencies.
     </td>
   </tr>
 
     <!-- ****************** END OF N&N TABLE ****************** -->
   </tbody>
 </table>
-
-
 </body>
 </html>
-
diff --git a/eclipse/plugins/org.eclipse.core.resources.compatibility/.classpath b/eclipse/plugins/org.eclipse.jdt.junit.core/.classpath
similarity index 100%
rename from eclipse/plugins/org.eclipse.core.resources.compatibility/.classpath
rename to eclipse/plugins/org.eclipse.jdt.junit.core/.classpath
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/.project b/eclipse/plugins/org.eclipse.jdt.junit.core/.project
new file mode 100644
index 0000000..ff6d29a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.jdt.junit.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.core.prefs
copy to eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/plugins/org.eclipse.core.filebuffers/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.launching.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.core.filebuffers/.settings/org.eclipse.jdt.launching.prefs
copy to eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.launching.prefs
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.junit/.settings/org.eclipse.jdt.ui.prefs
copy to eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.core.expressions/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.pde.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.core.expressions/.settings/org.eclipse.pde.prefs
copy to eclipse/plugins/org.eclipse.jdt.junit.core/.settings/org.eclipse.pde.prefs
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..161af7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.jdt.junit.core;singleton:=true
+Bundle-Version: 3.6.1.qualifier
+Bundle-Activator: org.eclipse.jdt.internal.junit.JUnitCorePlugin
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: 
+ org.eclipse.jdt.internal.junit;x-friends:="org.eclipse.jdt.junit",
+ org.eclipse.jdt.internal.junit.buildpath;core="split"; mandatory:="core";x-friends:="org.eclipse.jdt.junit",
+ org.eclipse.jdt.internal.junit.launcher;core="split"; mandatory:="core";x-friends:="org.eclipse.jdt.junit",
+ org.eclipse.jdt.internal.junit.model;x-friends:="org.eclipse.jdt.junit",
+ org.eclipse.jdt.internal.junit.util;core="split"; mandatory:="core";x-friends:="org.eclipse.jdt.junit",
+ org.eclipse.jdt.junit,
+ org.eclipse.jdt.junit.launcher;core="split"; mandatory:="core",
+ org.eclipse.jdt.junit.model
+Require-Bundle: 
+ org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.launching;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.junit.runtime;bundle-version="[3.4.100,4.0.0)",
+ org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)"
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/about.html b/eclipse/plugins/org.eclipse.jdt.junit.core/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.exemplarysetup/about.html
rename to eclipse/plugins/org.eclipse.jdt.junit.core/about.html
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/build.properties b/eclipse/plugins/org.eclipse.jdt.junit.core/build.properties
new file mode 100644
index 0000000..5f06917
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/build.properties
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+bin.includes = plugin.xml,\
+               about.html,\
+               plugin.properties,\
+               .,\
+               META-INF/
+
+source.. = src/
+
+src.includes = about.html,\
+               schema/
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.properties b/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.properties
new file mode 100644
index 0000000..3949667
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.properties
@@ -0,0 +1,77 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+pluginName=Java Development Tools JUnit core support
+providerName=Eclipse.org
+
+testRunListeners.name= Test Run Listeners
+junitQuickFixProcessor= JUnit Quick Fix Processor
+junitClasspathFixProcessor= JUnit Classpath Fix Processor
+
+junitLaunchConfigs.name= JUnit Launch Configurations
+testKinds.name= JUnit Test Kinds
+
+JUnitLaunchDelegate.name=Eclipse JUnit Launcher
+JUnitLaunchDelegate.description=The Eclipse JUnit Launcher supports running and debugging JUnit tests and test suites.
+
+RunJUnitLaunchShortcut.description=Runs a set of JUnit tests
+DebugJUnitLaunchShortcut.description=Debugs a set of JUnit tests
+
+preferenceKeywords.general=Java JUnit filter stack trace stacktrace
+
+View.label= JUnit
+Launch.label= JUnit
+PreferencePage.label= JUnit
+
+TestWizard.description= Create a JUnit Test Case
+SuiteWizard.description= Create a JUnit Test Suite
+UpdateSuiteAction.label= Recreate Test Suite...
+UpdateSuiteAction.tooltip= Recreate JUnit TestSuite with New Test Classes
+Task.name= JUnit Task
+WizardCategory.name= JUnit
+TestCaseWizard.name= JUnit Test Case
+TestSuiteWizard.name= JUnit Test Suite
+
+JUnitShortcut.label= JUnit Test
+JUnitShortcut.description.run= Run JUnit Test
+JUnitShortcut.description.debug= Debug JUnit Test
+JUnitShortcut.description.rerunLast= Rerun JUnit Test
+JUnitShortcut.description.rerunFailedFirst= Rerun JUnit Test - Failures First
+
+
+searchMenu.label= Se&arch
+
+JUnitTabGroupDescription.debug=Create a configuration that will launch a JUnit test in debug mode.
+JUnitTabGroupDescription.run=Create a configuration that will launch a JUnit test.
+
+JUnitActionSet.label= JUnit
+
+GotoTestAction.label= Referring &Tests...
+GotoTestAction.tooltip= Go to Test Referring to Selection
+
+GotoTestCommand.name= Referring Tests
+GotoTestCommand.description= Referring Tests
+
+ViewCommand.junitView.name= JUnit
+ViewCommand.junitView.description= JUnit
+
+RenameTypeParticipant.name=JUnit Launch configuration participant
+junitRenameParticipant= JUnit Project Rename Participant
+
+testKind.junit3 = JUnit 3
+testKind.junit4 = JUnit 4
+
+JUnitContainerName = JUnit
+
+classpathVariableInitializer.deprecated.JUNIT_HOME=Use the JUnit library instead
+classpathVariableInitializer.deprecated.JUNIT_SRC_HOME=Use the JUnit library instead
+
+JUnitView.editor.name = JUnit View
+JUnitTestResult.content-type.name = JUnit Test Result
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.xml b/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.xml
new file mode 100644
index 0000000..d747c49
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/plugin.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension-point id="org.eclipse.jdt.junit.testRunListeners" name="%testRunListeners.name" schema="schema/testRunListeners.exsd"/>
+   <extension-point id="org.eclipse.jdt.junit.internal_testKinds" name="%testKinds.name" schema="schema/internal_testKinds.exsd"/>
+
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            name="%Launch.label"
+            delegateDescription="%JUnitLaunchDelegate.description"
+            delegateName="%JUnitLaunchDelegate.name"
+            delegate="org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate"
+            modes="run, debug"
+            id="org.eclipse.jdt.junit.launchconfig"
+            sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"
+            migrationDelegate="org.eclipse.jdt.internal.junit.launcher.JUnitMigrationDelegate">
+      </launchConfigurationType>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationComparators">
+      <launchConfigurationComparator
+            attribute="org.eclipse.jdt.junit.CONTAINER"
+            class="org.eclipse.jdt.internal.junit.launcher.ContainerComparator"
+            id="org.eclipse.jdt.junit.containerComparator">
+      </launchConfigurationComparator>
+   </extension>
+   
+   <extension
+         point="org.eclipse.jdt.core.classpathVariableInitializer">
+      <classpathVariableInitializer
+            variable="JUNIT_HOME"
+            class="org.eclipse.jdt.internal.junit.buildpath.JUnitHomeInitializer"
+            deprecated="%classpathVariableInitializer.deprecated.JUNIT_HOME"
+            readOnly="true">
+      </classpathVariableInitializer>
+      <classpathVariableInitializer
+            variable="JUNIT_SRC_HOME"
+            class="org.eclipse.jdt.internal.junit.buildpath.JUnitHomeInitializer"
+            deprecated="%classpathVariableInitializer.deprecated.JUNIT_SRC_HOME"
+            readOnly="true">
+      </classpathVariableInitializer>
+   </extension>
+         
+   <extension
+         point="org.eclipse.core.expressions.propertyTesters">
+      <propertyTester
+            properties="isTest,canLaunchAsJUnit"
+            namespace="org.eclipse.jdt.junit"
+            type="org.eclipse.core.runtime.IAdaptable"
+            class="org.eclipse.jdt.internal.junit.JUnitPropertyTester"
+            id="org.eclipse.jdt.junit.JUnitPropertyTester">
+      </propertyTester>
+   </extension>
+
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer class="org.eclipse.jdt.internal.junit.JunitPreferenceInitializer"/>
+   </extension>
+   
+    <!-- JUnit Container -->
+   
+   <extension
+      point="org.eclipse.jdt.core.classpathContainerInitializer">
+      <classpathContainerInitializer
+            class="org.eclipse.jdt.internal.junit.buildpath.JUnitContainerInitializer"
+            id="org.eclipse.jdt.junit.JUNIT_CONTAINER">
+      </classpathContainerInitializer>
+   </extension>
+   
+   <extension
+         point="org.eclipse.jdt.junit.internal_testKinds">
+      <kind
+            id="org.eclipse.jdt.junit.loader.junit3"
+            displayName="%testKind.junit3"
+            finderClass="org.eclipse.jdt.internal.junit.launcher.JUnit3TestFinder"
+            loaderPluginId="org.eclipse.jdt.junit.runtime"
+            loaderClass="org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader">
+         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.core"/>     	
+         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.runtime"/>     	
+      </kind>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.junit.internal_testKinds">
+      <kind
+            id="org.eclipse.jdt.junit.loader.junit4"
+            displayName="%testKind.junit4" 
+            finderClass="org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder"
+            loaderPluginId="org.eclipse.jdt.junit4.runtime"
+            loaderClass="org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader">
+         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit4.runtime" />
+         <!-- TODO: do we need these? -->
+         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.core" />     	
+         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.runtime"/>     	
+         <!-- END : do we need these? -->
+      </kind>
+   </extension>
+   
+   <extension
+         point="org.eclipse.core.contenttype.contentTypes">
+      <content-type
+            base-type="org.eclipse.core.runtime.xml"
+            file-extensions="xml"
+            id="org.eclipse.jdt.junit.JUnitResult"
+            name="%JUnitTestResult.content-type.name"
+            priority="high">
+         <describer
+               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
+            <parameter
+                  name="element"
+                  value="testrun">
+            </parameter>
+            <parameter
+                  name="element"
+                  value="testsuite">
+            </parameter>
+            <parameter
+                  name="element"
+                  value="testsuites">
+            </parameter>
+         </describer>
+      </content-type>
+   </extension>   
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/schema/internal_testKinds.exsd b/eclipse/plugins/org.eclipse.jdt.junit.core/schema/internal_testKinds.exsd
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/schema/internal_testKinds.exsd
rename to eclipse/plugins/org.eclipse.jdt.junit.core/schema/internal_testKinds.exsd
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/schema/testRunListeners.exsd b/eclipse/plugins/org.eclipse.jdt.junit.core/schema/testRunListeners.exsd
new file mode 100644
index 0000000..d60a693
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/schema/testRunListeners.exsd
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.jdt.junit" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.jdt.junit" id="testRunListeners" name="Test Run Listeners"/>
+      </appInfo>
+      <documentation>
+         Extension point to register additional test run listeners. A test run listener is notified about the execution of a test run.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+         <documentation>
+            a fully qualified identifier of the target extension point
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="testRunListener"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  a fully qualified identifier of the target extension point
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="testRunListener">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A test run listener that extends org.eclipse.jdt.junit.TestRunListener (since 3.6).
+<em>Note: Also accepts org.eclipse.jdt.junit.ITestRunListener, but that interface is deprecated.</em>
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.jdt.junit.TestRunListener:org.eclipse.jdt.junit.ITestRunListener"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         2.1
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of a test run listener contribution:
+
+<p>
+<pre>
+ <extension point="org.eclipse.jdt.junit.testRunListeners">
+  <testRunListener class="com.example.SampleTestRunListener"/>
+ </extension>
+</pre>
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         Test run listeners should extend org.eclipse.jdt.junit.TestRunListener (since 3.6).
+In previous versions, they could also implement the org.eclipse.jdt.junit.ITestRunListener interface, but that one is deprecated now.
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2004 IBM Corporation and others.
+All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/scripts/exportplugin.xml b/eclipse/plugins/org.eclipse.jdt.junit.core/scripts/exportplugin.xml
new file mode 100644
index 0000000..e015558
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/scripts/exportplugin.xml
@@ -0,0 +1,57 @@
+<!-- build script to create JUnit Plugin -->
+<project name="org.eclipse.jdt.junit.core" default="export" basedir="..">
+	<target name="init">
+		<tstamp/>
+		<property name="destdir" value="../../plugin-export" />
+		<property name="plugin"  value="org.eclipse.jdt.junit.core" />
+		<property name="qualifier" value="zzz${DSTAMP}-${TSTAMP}" />
+		
+		<!-- define property ${plugin_version} by reading version from MANIFEST.MF: -->
+		<tempfile property="plugin_version_file" suffix=".plugin_version.tmp" destdir="${destdir}"/>
+		<copy file="META-INF/MANIFEST.MF" tofile="${plugin_version_file}"/>
+		<replaceregexp file="${plugin_version_file}" match=".*Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier.*" replace="plugin_version=_\1${qualifier}" flags="s" />
+		<property file="${plugin_version_file}"/>
+		<delete file="${plugin_version_file}" />
+		
+		<property name="dest"  value="${destdir}/${plugin}${plugin_version}" />
+		<property name="destjar"	value="${destdir}/${plugin}${plugin_version}.jar" />
+	</target>
+
+	<target name="build" depends="init">
+    	<eclipse.incrementalBuild project="${plugin}" kind="incr"/>
+	</target>
+
+	<target name="export" depends="build">
+		<mkdir dir="${destdir}" />
+		<delete dir="${dest}" />
+		<mkdir dir="${dest}" />
+		
+		<copy todir="${dest}/META-INF">
+			<fileset dir="META-INF" />
+		</copy>		
+		
+		<replaceregexp file="${dest}/META-INF/MANIFEST.MF" match="Bundle-Version: ((\d)+\.(\d)+\.(\d)+\.)qualifier" replace="Bundle-Version: \1${qualifier}" byline="true" />
+		
+		<delete file="${destjar}" />
+		<zip zipfile="${destjar}">
+			<fileset dir=".">
+			  <include name="plugin.xml" />
+			  <include name="plugin.properties" />
+			  <include name="about.html" />
+			  <include name="schema/**"/>
+			</fileset>
+			<fileset dir="bin" />
+			
+		    <zipfileset dir="src" prefix="src" />
+		    
+			<fileset dir="${dest}">
+			  <include name="META-INF/**" />
+			</fileset>
+		</zip>
+		
+		<delete dir="${dest}" />
+		
+	</target>
+	
+	
+</project>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java
new file mode 100644
index 0000000..1916b90
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import java.io.File;
+
+import org.eclipse.osgi.util.TextProcessor;
+
+import org.eclipse.core.runtime.IPath;
+
+import org.eclipse.core.resources.IResource;
+
+
+/**
+ * A label provider for basic elements like paths. The label provider will make sure that the labels are correctly
+ * shown in RTL environments.
+ *
+ * @since 3.4
+ */
+public class BasicElementLabels {
+
+	private BasicElementLabels(){}
+
+	/**
+	 * Adds special marks so that that the given string is readable in a BIDI environment.
+	 *
+	 * @param string the string
+	 * @param delimiters the additional delimiters
+	 * @return the processed styled string
+	 */
+	private static String markLTR(String string, String delimiters) {
+		return TextProcessor.process(string, delimiters);
+	}
+
+	/**
+	 * Returns the label of a path.
+	 *
+	 * @param path the path
+	 * @param isOSPath if <code>true</code>, the path represents an OS path, if <code>false</code> it is a workspace path.
+	 * @return the label of the path to be used in the UI.
+	 */
+	public static String getPathLabel(IPath path, boolean isOSPath) {
+		String label;
+		if (isOSPath) {
+			label= path.toOSString();
+		} else {
+			label= path.makeRelative().toString();
+		}
+		return markLTR(label, "/\\:."); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns the label of the path of a file.
+	 *
+	 * @param file the file
+	 * @return the label of the file path to be used in the UI.
+	 */
+	public static String getPathLabel(File file) {
+		return markLTR(file.getAbsolutePath(), "/\\:.");  //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns the label for a file pattern like '*.java'
+	 *
+	 * @param name the pattern
+	 * @return the label of the pattern.
+	 */
+	public static String getFilePattern(String name) {
+		return markLTR(name, "*.?/\\:."); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns the label for a URL, URI or URL part. Example is 'http://www.x.xom/s.html#1'
+	 *
+	 * @param name the URL string
+	 * @return the label of the URL.
+	 */
+	public static String getURLPart(String name) {
+		return markLTR(name, ":@?-#/\\:."); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a label for a resource name.
+	 *
+	 * @param resource the resource
+	 * @return the label of the resource name.
+	 */
+	public static String getResourceName(IResource resource) {
+		return markLTR(resource.getName(), ":."); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a label for a resource name.
+	 *
+	 * @param resourceName the resource name
+	 * @return the label of the resource name.
+	 */
+	public static String getResourceName(String resourceName) {
+		return markLTR(resourceName, ":."); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a label for a version name. Example is '1.4.1'
+	 *
+	 * @param name the version string
+	 * @return the version label
+	 */
+	public static String getVersionName(String name) {
+		return markLTR(name, ":.");  //$NON-NLS-1$
+	}
+
+
+	/**
+	 * Returns a label for Java element name. Example is 'new Test<? extends List>() { ...}'.
+	 * This method should only be used for simple element names. Use
+	 * JavaElementLabels to create a label from a Java element.
+	 *
+	 * @param name the Java element name.
+	 * @return the label for the Java element
+	 */
+	public static String getJavaElementName(String name) {
+		return markLTR(name, "<>()?,{}.:"); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitCorePlugin.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitCorePlugin.java
new file mode 100644
index 0000000..f9e77bb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitCorePlugin.java
@@ -0,0 +1,281 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *   Julien Ruaux: jruaux at octo.com
+ * 	 Vincent Massol: vmassol at octo.com
+ *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+import org.eclipse.jdt.junit.TestRunListener;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+import org.eclipse.jdt.internal.junit.model.JUnitModel;
+
+/**
+ * The plug-in runtime class for the JUnit core plug-in.
+ */
+public class JUnitCorePlugin extends Plugin {
+
+	/**
+	 * The single instance of this plug-in runtime class.
+	 */
+	private static JUnitCorePlugin fgPlugin= null;
+
+	public static final String CORE_PLUGIN_ID= "org.eclipse.jdt.junit.core"; //$NON-NLS-1$
+	
+	public static final String PLUGIN_ID= "org.eclipse.jdt.junit"; //$NON-NLS-1$
+	public static final String ID_EXTENSION_POINT_TESTRUN_LISTENERS= PLUGIN_ID + "." + "testRunListeners"; //$NON-NLS-1$ //$NON-NLS-2$
+	public static final String ID_EXTENSION_POINT_TEST_KINDS= PLUGIN_ID + "." + "internal_testKinds"; //$NON-NLS-1$ //$NON-NLS-2$
+
+	public final static String TEST_SUPERCLASS_NAME= "junit.framework.TestCase"; //$NON-NLS-1$
+	public final static String TEST_INTERFACE_NAME= "junit.framework.Test"; //$NON-NLS-1$
+
+	public final static String JUNIT4_ANNOTATION_NAME= "org.junit.Test"; //$NON-NLS-1$
+	public static final String SIMPLE_TEST_INTERFACE_NAME= "Test"; //$NON-NLS-1$
+
+	/**
+	 * The class path variable referring to the junit home location
+	 */
+	public final static String JUNIT_HOME= "JUNIT_HOME"; //$NON-NLS-1$
+
+	/**
+	 * The class path variable referring to the junit source location
+     * @since 3.2
+	 */
+	public static final String JUNIT_SRC_HOME= "JUNIT_SRC_HOME";  //$NON-NLS-1$
+
+	private static final String HISTORY_DIR_NAME= "history"; //$NON-NLS-1$
+
+	private final JUnitModel fJUnitModel= new JUnitModel();
+
+
+	/**
+	 * List storing the registered test run listeners
+	 */
+	private List/*<ITestRunListener>*/ fLegacyTestRunListeners;
+
+	/**
+	 * List storing the registered test run listeners
+	 */
+	private ListenerList/*<TestRunListener>*/ fNewTestRunListeners;
+
+	private BundleContext fBundleContext;
+
+	private static boolean fIsStopped= false;
+
+
+	public JUnitCorePlugin() {
+		fgPlugin= this;
+		fNewTestRunListeners= new ListenerList();
+	}
+
+	public static JUnitCorePlugin getDefault() {
+		return fgPlugin;
+	}
+
+	public static String getPluginId() {
+		return CORE_PLUGIN_ID;
+	}
+
+	public static void log(Throwable e) {
+		log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, "Error", e)); //$NON-NLS-1$
+	}
+
+	public static void log(IStatus status) {
+		getDefault().getLog().log(status);
+	}
+
+	/**
+	 * @see Plugin#start(BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		fBundleContext= context;
+		fJUnitModel.start();
+	}
+
+	/**
+	 * @see Plugin#stop(BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		fIsStopped= true;
+		try {
+			new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).flush();
+			fJUnitModel.stop();
+		} finally {
+			super.stop(context);
+		}
+		fBundleContext= null;
+	}
+
+	/**
+	 * Returns a service with the specified name or <code>null</code> if none.
+	 * 
+	 * @param serviceName name of service
+	 * @return service object or <code>null</code> if none
+	 * @since 3.5
+	 */
+	public Object getService(String serviceName) {
+		ServiceReference reference= fBundleContext.getServiceReference(serviceName);
+		if (reference == null)
+			return null;
+		return fBundleContext.getService(reference);
+	}
+
+	public static JUnitModel getModel() {
+		return getDefault().fJUnitModel;
+	}
+
+	/**
+	 * Initializes TestRun Listener extensions
+	 * @deprecated to avoid deprecation warning
+	 */
+	private synchronized void loadTestRunListeners() {
+		if (fLegacyTestRunListeners != null)
+			return;
+
+		fLegacyTestRunListeners= new ArrayList();
+		IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ID_EXTENSION_POINT_TESTRUN_LISTENERS);
+		if (extensionPoint == null) {
+			return;
+		}
+		IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
+		MultiStatus status= new MultiStatus(CORE_PLUGIN_ID, IStatus.OK, "Could not load some testRunner extension points", null); //$NON-NLS-1$
+
+		for (int i= 0; i < configs.length; i++) {
+			try {
+				Object testRunListener= configs[i].createExecutableExtension("class"); //$NON-NLS-1$
+				if (testRunListener instanceof TestRunListener) {
+					fNewTestRunListeners.add(testRunListener);
+				} else if (testRunListener instanceof org.eclipse.jdt.junit.ITestRunListener) {
+					fLegacyTestRunListeners.add(testRunListener);
+				}
+			} catch (CoreException e) {
+				status.add(e.getStatus());
+			}
+		}
+		if (!status.isOK()) {
+			JUnitCorePlugin.log(status);
+		}
+	}
+
+	/**
+	 * @return an array of all TestRun listeners
+	 * @deprecated to avoid deprecation warnings
+	 */
+	public org.eclipse.jdt.junit.ITestRunListener[] getTestRunListeners() {
+		loadTestRunListeners();
+		return (org.eclipse.jdt.junit.ITestRunListener[]) fLegacyTestRunListeners.toArray(new org.eclipse.jdt.junit.ITestRunListener[fLegacyTestRunListeners.size()]);
+	}
+
+	/**
+	 * Returns the bundle for a given bundle name,
+	 * regardless whether the bundle is resolved or not.
+	 *
+	 * @param bundleName the bundle name
+	 * @return the bundle
+	 * @since 3.2
+	 */
+	public Bundle getBundle(String bundleName) {
+		Bundle[] bundles= getBundles(bundleName, null);
+		if (bundles != null && bundles.length > 0)
+			return bundles[0];
+		return null;
+	}
+
+	/**
+	 * Returns the bundles for a given bundle name,
+	 *
+	 * @param bundleName the bundle name
+	 * @param version the version of the bundle
+	 * @return the bundles of the given name
+	 */
+	public Bundle[] getBundles(String bundleName, String version) {
+		Bundle[] bundles= Platform.getBundles(bundleName, version);
+		if (bundles != null)
+			return bundles;
+
+		// Accessing unresolved bundle
+		ServiceReference serviceRef= fBundleContext.getServiceReference(PackageAdmin.class.getName());
+		PackageAdmin admin= (PackageAdmin)fBundleContext.getService(serviceRef);
+		bundles= admin.getBundles(bundleName, version);
+		if (bundles != null && bundles.length > 0)
+			return bundles;
+		return null;
+	}
+
+	/**
+	 * Adds a TestRun listener to the collection of listeners
+	 * @param newListener the listener to add
+	 * @deprecated to avoid deprecation warnings
+	 */
+	public void addTestRunListener(org.eclipse.jdt.junit.ITestRunListener newListener) {
+		loadTestRunListeners();
+
+		for (Iterator iter= fLegacyTestRunListeners.iterator(); iter.hasNext();) {
+			Object o= iter.next();
+			if (o == newListener)
+				return;
+		}
+		fLegacyTestRunListeners.add(newListener);
+	}
+
+	/**
+	 * Removes a TestRun listener to the collection of listeners
+	 * @param newListener the listener to remove
+	 * @deprecated to avoid deprecation warnings
+	 */
+	public void removeTestRunListener(org.eclipse.jdt.junit.ITestRunListener newListener) {
+		if (fLegacyTestRunListeners != null)
+			fLegacyTestRunListeners.remove(newListener);
+	}
+
+	/**
+	 * @return a <code>ListenerList</code> of all <code>TestRunListener</code>s
+	 */
+	public ListenerList/*<TestRunListener>*/ getNewTestRunListeners() {
+		loadTestRunListeners();
+		
+		return fNewTestRunListeners;
+	}
+
+	public static boolean isStopped() {
+		return fIsStopped;
+	}
+
+	public static File getHistoryDirectory() throws IllegalStateException {
+		File historyDir= getDefault().getStateLocation().append(HISTORY_DIR_NAME).toFile();
+		if (! historyDir.isDirectory()) {
+			historyDir.mkdir();
+		}
+		return historyDir;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.java
new file mode 100644
index 0000000..7bd387f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class JUnitMessages extends NLS {
+
+	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.junit.JUnitMessages";//$NON-NLS-1$
+
+	public static String JUnit4TestFinder_searching_description;
+
+	public static String JUnitContainerInitializer_description_initializer_junit3;
+
+	public static String JUnitContainerInitializer_description_initializer_junit4;
+
+	public static String JUnitContainerInitializer_description_initializer_unresolved;
+
+	public static String JUnitContainerInitializer_description_junit3;
+
+	public static String JUnitContainerInitializer_description_junit4;
+
+	public static String JUnitLaunchConfigurationDelegate_create_source_locator_description;
+
+	public static String JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist;
+
+	public static String JUnitLaunchConfigurationDelegate_error_invalidproject;
+
+	public static String JUnitLaunchConfigurationDelegate_error_junit4notonpath;
+
+	public static String JUnitLaunchConfigurationDelegate_error_junitnotonpath;
+
+	public static String JUnitLaunchConfigurationDelegate_error_no_socket;
+
+	public static String JUnitLaunchConfigurationDelegate_error_notests_kind;
+
+	public static String JUnitLaunchConfigurationDelegate_error_wrong_input;
+
+	public static String JUnitLaunchConfigurationDelegate_input_type_does_not_exist;
+
+	public static String JUnitLaunchConfigurationDelegate_verifying_attriburtes_description;
+
+	public static String TestRunnerViewPart_configName;
+	public static String TestRunSession_unrootedTests;
+
+	public static String TestSearchEngine_message_searching;
+
+	static {
+		NLS.initializeMessages(BUNDLE_NAME, JUnitMessages.class);
+	}
+
+	private JUnitMessages() {
+		// Do not instantiate
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.properties b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.properties
new file mode 100644
index 0000000..cf3fb9f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.properties
@@ -0,0 +1,29 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+TestSearchEngine_message_searching=Searching for tests and suites...
+JUnit4TestFinder_searching_description=Searching for JUnit 4 tests...
+JUnitContainerInitializer_description_junit3=JUnit 3
+JUnitContainerInitializer_description_junit4=JUnit 4
+JUnitContainerInitializer_description_initializer_junit3=JUnit 3
+JUnitContainerInitializer_description_initializer_junit4=JUnit 4
+JUnitContainerInitializer_description_initializer_unresolved=Unresolved JUnit container
+JUnitLaunchConfigurationDelegate_verifying_attriburtes_description=Verifying launch attributes...
+JUnitLaunchConfigurationDelegate_create_source_locator_description=Creating source locator...
+JUnitLaunchConfigurationDelegate_error_no_socket=No socket available
+JUnitLaunchConfigurationDelegate_error_invalidproject=Invalid project specified.
+JUnitLaunchConfigurationDelegate_error_junitnotonpath=Cannot find 'junit.framework.TestCase' on project build path. JUnit 3 tests can only be run if JUnit is on the build path.
+JUnitLaunchConfigurationDelegate_error_junit4notonpath=Cannot find 'org.junit.Test' on project build path. JUnit 4 tests can only be run if JUnit 4 is on the build path.
+JUnitLaunchConfigurationDelegate_error_notests_kind=No tests found with test runner ''{0}''.
+JUnitLaunchConfigurationDelegate_error_wrong_input=Can only run types or single method
+JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist=The input element of the launch configuration does not exist
+JUnitLaunchConfigurationDelegate_input_type_does_not_exist=The input type of the launch configuration does not exist
+TestRunnerViewPart_configName=Rerun {0}
+TestRunSession_unrootedTests=Unrooted Tests
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPreferencesConstants.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPreferencesConstants.java
new file mode 100644
index 0000000..328ccb3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPreferencesConstants.java
@@ -0,0 +1,150 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+/**
+ * Defines constants which are used to refer to values in the plugin's preference store.
+ */
+public class JUnitPreferencesConstants {
+	/**
+	 * Boolean preference controlling whether the failure stack should be
+	 * filtered.
+	 */
+	public static final String DO_FILTER_STACK= JUnitCorePlugin.PLUGIN_ID + ".do_filter_stack"; //$NON-NLS-1$
+
+	/**
+	 * Boolean preference controlling whether the JUnit view should be shown on
+	 * errors only.
+	 */
+	public static final String SHOW_ON_ERROR_ONLY= JUnitCorePlugin.PLUGIN_ID + ".show_on_error"; //$NON-NLS-1$
+
+	/**
+	 * Boolean preference controlling whether the JUnit view should be shown on
+	 * errors only.
+	 */
+	public static final String ENABLE_ASSERTIONS= JUnitCorePlugin.PLUGIN_ID + ".enable_assertions"; //$NON-NLS-1$
+
+	/**
+	 * List of active stack filters. A String containing a comma separated list
+	 * of fully qualified type names/patterns.
+	 */
+	public static final String PREF_ACTIVE_FILTERS_LIST = JUnitCorePlugin.PLUGIN_ID + ".active_filters"; //$NON-NLS-1$
+
+	/**
+	 * List of inactive stack filters. A String containing a comma separated
+	 * list of fully qualified type names/patterns.
+	 */
+	public static final String PREF_INACTIVE_FILTERS_LIST = JUnitCorePlugin.PLUGIN_ID + ".inactive_filters"; //$NON-NLS-1$
+
+	/**
+	 * Maximum number of remembered test runs.
+	 */
+	public static final String MAX_TEST_RUNS= JUnitCorePlugin.PLUGIN_ID + ".max_test_runs"; //$NON-NLS-1$
+
+	/**
+	 * Javadoc location for JUnit 3
+	 */
+	public static final String JUNIT3_JAVADOC= JUnitCorePlugin.PLUGIN_ID + ".junit3.javadoclocation"; //$NON-NLS-1$
+
+
+	/**
+	 * Javadoc location for JUnit 4
+	 */
+	public static final String JUNIT4_JAVADOC= JUnitCorePlugin.PLUGIN_ID + ".junit4.javadoclocation"; //$NON-NLS-1$
+
+	/**
+	 * Javadoc location for org.hamcrest.core (JUnit 4)
+	 */
+	public static final String HAMCREST_CORE_JAVADOC= JUnitCorePlugin.PLUGIN_ID + ".junit4.hamcrest.core.javadoclocation"; //$NON-NLS-1$
+	
+
+	private static final String[] fgDefaultFilterPatterns= new String[] {
+		"org.eclipse.jdt.internal.junit.runner.*", //$NON-NLS-1$
+		"org.eclipse.jdt.internal.junit4.runner.*", //$NON-NLS-1$
+		"org.eclipse.jdt.internal.junit.ui.*", //$NON-NLS-1$
+		"junit.framework.TestCase", //$NON-NLS-1$
+		"junit.framework.TestResult", //$NON-NLS-1$
+		"junit.framework.TestResult$1", //$NON-NLS-1$
+		"junit.framework.TestSuite", //$NON-NLS-1$
+		"junit.framework.Assert", //$NON-NLS-1$
+		"org.junit.*", //$NON-NLS-1$ //TODO: filter all these?
+		"java.lang.reflect.Method.invoke", //$NON-NLS-1$
+		"sun.reflect.*", //$NON-NLS-1$
+	};
+
+	private JUnitPreferencesConstants() {
+		// no instance
+	}
+
+	/**
+	 * Returns the default list of active stack filters.
+	 *
+	 * @return list
+	 */
+	public static List createDefaultStackFiltersList() {
+		return Arrays.asList(fgDefaultFilterPatterns);
+	}
+
+	/**
+	 * Serializes the array of strings into one comma-separated string.
+	 *
+	 * @param list array of strings
+	 * @return a single string composed of the given list
+	 */
+	public static String serializeList(String[] list) {
+		if (list == null)
+			return ""; //$NON-NLS-1$
+
+		StringBuffer buffer= new StringBuffer();
+		for (int i= 0; i < list.length; i++) {
+			if (i > 0)
+				buffer.append(',');
+
+			buffer.append(list[i]);
+		}
+		return buffer.toString();
+	}
+	
+	/**
+	 * Parses the comma-separated string into an array of strings.
+	 * 
+	 * @param listString a comma-separated string
+	 * @return an array of strings
+	 */
+	public static String[] parseList(String listString) {
+		List list= new ArrayList(10);
+		StringTokenizer tokenizer= new StringTokenizer(listString, ","); //$NON-NLS-1$
+		while (tokenizer.hasMoreTokens())
+			list.add(tokenizer.nextToken());
+		return (String[]) list.toArray(new String[list.size()]);
+	}
+
+	public static String[] getFilterPatterns() {
+		return JUnitPreferencesConstants.parseList(Platform.getPreferencesService().getString(JUnitCorePlugin.CORE_PLUGIN_ID, PREF_ACTIVE_FILTERS_LIST, null, null));
+	}
+
+	public static boolean getFilterStack() {
+		return Platform.getPreferencesService().getBoolean(JUnitCorePlugin.CORE_PLUGIN_ID, DO_FILTER_STACK, true, null);
+	}
+
+	public static void setFilterStack(boolean filter) {
+		new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).putBoolean(DO_FILTER_STACK, filter);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java
new file mode 100644
index 0000000..16667f8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+
+import org.eclipse.core.resources.IResource;
+
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
+
+
+/**
+ * JUnitPropertyTester provides propertyTester(s) for IResource types
+ * for use in XML Expression Language syntax.
+ */
+public class JUnitPropertyTester extends PropertyTester {
+
+	private static final String PROPERTY_IS_TEST= "isTest";	 //$NON-NLS-1$
+
+	private static final String PROPERTY_CAN_LAUNCH_AS_JUNIT_TEST= "canLaunchAsJUnit"; //$NON-NLS-1$
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.corext.refactoring.participants.properties.IPropertyEvaluator#test(java.lang.Object, java.lang.String, java.lang.String)
+	 */
+	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+		if (!(receiver instanceof IAdaptable)) {
+			throw new IllegalArgumentException("Element must be of type 'IAdaptable', is " + receiver == null ? "null" : receiver.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		IJavaElement element;
+		if (receiver instanceof IJavaElement) {
+			element= (IJavaElement) receiver;
+		} else if (receiver instanceof IResource) {
+			element = JavaCore.create((IResource) receiver);
+			if (element == null) {
+				return false;
+			}
+		} else { // is IAdaptable
+			element= (IJavaElement) ((IAdaptable) receiver).getAdapter(IJavaElement.class);
+			if (element == null) {
+				IResource resource= (IResource) ((IAdaptable) receiver).getAdapter(IResource.class);
+				element = JavaCore.create(resource);
+				if (element == null) {
+					return false;
+				}
+			}
+		}
+		if (PROPERTY_IS_TEST.equals(property)) {
+			return isJUnitTest(element);
+		} else if (PROPERTY_CAN_LAUNCH_AS_JUNIT_TEST.equals(property)) {
+			return canLaunchAsJUnitTest(element);
+		}
+		throw new IllegalArgumentException("Unknown test property '" + property + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	private boolean canLaunchAsJUnitTest(IJavaElement element) {
+		try {
+			switch (element.getElementType()) {
+				case IJavaElement.JAVA_PROJECT:
+				case IJavaElement.PACKAGE_FRAGMENT_ROOT:
+					return true; // can run, let test runner detect if there are tests
+				case IJavaElement.PACKAGE_FRAGMENT:
+					return ((IPackageFragment) element).hasChildren();
+				case IJavaElement.COMPILATION_UNIT:
+				case IJavaElement.CLASS_FILE:
+				case IJavaElement.TYPE:
+				case IJavaElement.METHOD:
+					return isJUnitTest(element);
+				default:
+					return false;
+			}
+		} catch (JavaModelException e) {
+			return false;
+		}
+	}
+
+	/*
+	 * Return whether the target resource is a JUnit test.
+	 */
+	private boolean isJUnitTest(IJavaElement element) {
+		try {
+			IType testType= null;
+			if (element instanceof ICompilationUnit) {
+				testType= (((ICompilationUnit) element)).findPrimaryType();
+			} else if (element instanceof IClassFile) {
+				testType= (((IClassFile) element)).getType();
+			} else if (element instanceof IType) {
+				testType= (IType) element;
+			} else if (element instanceof IMember) {
+				testType= ((IMember) element).getDeclaringType();
+			}
+			if (testType != null && testType.exists()) {
+				return CoreTestSearchEngine.isTestOrTestSuite(testType);
+			}
+		} catch (CoreException e) {
+			// ignore, return false
+		}
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JunitPreferenceInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JunitPreferenceInitializer.java
new file mode 100644
index 0000000..9f83570
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JunitPreferenceInitializer.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Sebastian Davids <sdavids at gmx.de> - initial API and implementation
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit;
+
+import java.util.List;
+
+import org.osgi.service.prefs.BackingStoreException;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+/**
+ * Default preference value initialization for the
+ * <code>org.eclipse.jdt.junit</code> plug-in.
+ */
+public class JunitPreferenceInitializer extends AbstractPreferenceInitializer {
+
+	/** {@inheritDoc} */
+	public void initializeDefaultPreferences() {
+		IEclipsePreferences prefs= new DefaultScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID);
+
+		prefs.putBoolean(JUnitPreferencesConstants.DO_FILTER_STACK, true);
+
+		prefs.putBoolean(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, false);
+		prefs.putBoolean(JUnitPreferencesConstants.ENABLE_ASSERTIONS, false);
+
+		List defaults= JUnitPreferencesConstants.createDefaultStackFiltersList();
+		String[] filters= (String[]) defaults.toArray(new String[defaults.size()]);
+		String active= JUnitPreferencesConstants.serializeList(filters);
+		prefs.put(JUnitPreferencesConstants.PREF_ACTIVE_FILTERS_LIST, active);
+		prefs.put(JUnitPreferencesConstants.PREF_INACTIVE_FILTERS_LIST, ""); //$NON-NLS-1$
+		prefs.putInt(JUnitPreferencesConstants.MAX_TEST_RUNS, 10);
+
+		// see http://sourceforge.net/tracker/index.php?func=detail&aid=1877429&group_id=15278&atid=115278
+		prefs.put(JUnitPreferencesConstants.JUNIT3_JAVADOC, "http://www.junit.org/junit/javadoc/3.8.1"); //$NON-NLS-1$
+		prefs.put(JUnitPreferencesConstants.JUNIT4_JAVADOC, "http://www.junit.org/junit/javadoc/4.5"); //$NON-NLS-1$
+		
+		// migrate old instance scope prefs
+		IEclipsePreferences oldInstancePrefs= new InstanceScope().getNode(JUnitCorePlugin.PLUGIN_ID);
+		IEclipsePreferences newInstancePrefs= new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID);
+		String[] oldKeys;
+		try {
+			oldKeys= oldInstancePrefs.keys();
+			for (int i= 0; i < oldKeys.length; i++ ) {
+				String key= oldKeys[i];
+				newInstancePrefs.put(key, oldInstancePrefs.get(key, null));
+				oldInstancePrefs.remove(key);
+			}
+			newInstancePrefs.flush();
+			oldInstancePrefs.flush();
+		} catch (BackingStoreException e) {
+			JUnitCorePlugin.log(e);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/Messages.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/Messages.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/Messages.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/Messages.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java
new file mode 100644
index 0000000..2901976
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.buildpath;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.osgi.framework.Version;
+
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.jdt.junit.JUnitCore;
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.URIUtil;
+
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
+
+
+public class BuildPathSupport {
+
+	
+	public static class JUnitPluginDescription {
+		
+		private final String bundleId;
+		private final VersionRange versionRange;
+		private final String sourceBundleId;
+		private final String bundleRoot;
+		private final String repositorySource;
+		private final String javadocPreferenceKey;
+
+		public JUnitPluginDescription(String bundleId, VersionRange versionRange, String bundleRoot, String sourceBundleId, String repositorySource, String javadocPreferenceKey) {
+			this.bundleId= bundleId;
+			this.versionRange= versionRange;
+			this.sourceBundleId= sourceBundleId;
+			this.bundleRoot= bundleRoot;
+			this.repositorySource= repositorySource;
+			this.javadocPreferenceKey= javadocPreferenceKey;
+		}
+		
+		public IPath getBundleLocation() {
+			return P2Utils.getBundleLocationPath(P2Utils.findBundle(bundleId, versionRange, false));
+		}
+		
+		public IPath getSourceBundleLocation() {
+			return getSourceLocation(P2Utils.findBundle(bundleId, versionRange, false));
+		}
+		
+		public IClasspathEntry getLibraryEntry() {
+			BundleInfo bundleInfo= P2Utils.findBundle(bundleId, versionRange, false);
+			IPath bundleLocation= P2Utils.getBundleLocationPath(bundleInfo);
+			if (bundleLocation != null) {
+				
+				IPath bundleRootLocation= bundleLocation;
+				if (bundleRoot != null)
+					bundleRootLocation= bundleLocation.append(bundleRoot);
+				
+				IPath srcLocation= getSourceLocation(bundleInfo);
+				
+				IAccessRule[] accessRules= { };
+
+				String javadocLocation= Platform.getPreferencesService().getString(JUnitCorePlugin.CORE_PLUGIN_ID, javadocPreferenceKey, "", null); //$NON-NLS-1$
+				IClasspathAttribute[] attributes;
+				if (javadocLocation.length() == 0) {
+					attributes= new IClasspathAttribute[0];
+				} else {
+					attributes= new IClasspathAttribute[] { JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javadocLocation) };
+				}
+				
+				return JavaCore.newLibraryEntry(bundleRootLocation, srcLocation, null, accessRules, attributes, false);
+			}
+			return null;
+		}
+
+		private IPath getSourceLocation(BundleInfo bundleInfo) {
+			if (bundleInfo == null)
+				return null;
+			
+			IPath srcLocation= null;
+			if (repositorySource != null) {
+				// Try source in workspace (from repository)
+				try {
+					URL bundleUrl= FileLocator.toFileURL(URIUtil.toURL(bundleInfo.getLocation()));
+					File bundleFile= new File(bundleUrl.getFile());
+					if (bundleFile.isDirectory()) {
+						File srcFile= new File(bundleFile, repositorySource);
+						if (srcFile.exists()) {
+							srcLocation= new Path(srcFile.getPath());
+							if (srcFile.isDirectory()) {
+								srcLocation= srcLocation.addTrailingSeparator();
+							}
+						}
+					}
+				} catch (MalformedURLException e) {
+					//continue
+				} catch (IOException e) {
+					//continue
+				}
+			}
+			
+			if (srcLocation == null) {
+				// Try exact version
+				BundleInfo sourceBundleInfo= P2Utils.findBundle(sourceBundleId, new Version(bundleInfo.getVersion()), true);
+				if (sourceBundleInfo == null) {
+					// Try version range
+					sourceBundleInfo= P2Utils.findBundle(sourceBundleId, versionRange, true);
+				}
+				srcLocation= P2Utils.getBundleLocationPath(sourceBundleInfo);
+			}
+			return srcLocation;
+		}
+	}
+
+	
+	public static final JUnitPluginDescription JUNIT3_PLUGIN= new JUnitPluginDescription(
+			"org.junit", new VersionRange("[3.8.2,3.9)"), "junit.jar", "org.junit.source", "source-bundle/", JUnitPreferencesConstants.JUNIT3_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+	
+	private static final JUnitPluginDescription JUNIT4_PLUGIN= new JUnitPluginDescription(
+			"org.junit", new VersionRange("[4.7.0,5.0.0)"), "junit.jar", "org.junit.source", "source-bundle/", JUnitPreferencesConstants.JUNIT4_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+	
+	private static final JUnitPluginDescription HAMCREST_CORE_PLUGIN= new JUnitPluginDescription(
+			"org.hamcrest.core", new VersionRange("[1.1.0,2.0.0)"), null, "org.hamcrest.core.source", "source-bundle/", JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+	/**
+	 * @return the JUnit3 classpath container
+	 */
+	public static IClasspathEntry getJUnit3ClasspathEntry() {
+		return JavaCore.newContainerEntry(JUnitCore.JUNIT3_CONTAINER_PATH);
+	}
+
+	/**
+	 * @return the JUnit4 classpath container
+	 */
+	public static IClasspathEntry getJUnit4ClasspathEntry() {
+		return JavaCore.newContainerEntry(JUnitCore.JUNIT4_CONTAINER_PATH);
+	}
+
+	/**
+	 * @return the org.junit library
+	 */
+	public static IClasspathEntry getJUnit3LibraryEntry() {
+		return JUNIT3_PLUGIN.getLibraryEntry();
+	}
+
+	/**
+	 * @return the org.junit4 library
+	 */
+	public static IClasspathEntry getJUnit4LibraryEntry() {
+		return JUNIT4_PLUGIN.getLibraryEntry();
+	}
+
+	/**
+	 * @return the org.hamcrest.core library
+	 */
+	public static IClasspathEntry getHamcrestCoreLibraryEntry() {
+		return HAMCREST_CORE_PLUGIN.getLibraryEntry();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java
new file mode 100644
index 0000000..98361d1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.buildpath;
+
+import java.util.ArrayList;
+
+import org.eclipse.jdt.junit.JUnitCore;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitMessages;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
+
+public class JUnitContainerInitializer extends ClasspathContainerInitializer {
+
+	private static final IStatus NOT_SUPPORTED= new Status(IStatus.ERROR, JUnitCorePlugin.CORE_PLUGIN_ID, ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED, new String(), null);
+	private static final IStatus READ_ONLY= new Status(IStatus.ERROR, JUnitCorePlugin.CORE_PLUGIN_ID, ClasspathContainerInitializer.ATTRIBUTE_READ_ONLY, new String(), null);
+
+	/**
+	 * @deprecated just for compatibility
+	 */
+	private final static String JUNIT3_8_1= "3.8.1"; //$NON-NLS-1$
+	private final static String JUNIT3= "3"; //$NON-NLS-1$
+	private final static String JUNIT4= "4"; //$NON-NLS-1$
+
+	private static class JUnitContainer implements IClasspathContainer {
+
+		private final IClasspathEntry[] fEntries;
+		private final IPath fPath;
+
+		public JUnitContainer(IPath path, IClasspathEntry[] entries) {
+			fPath= path;
+			fEntries= entries;
+		}
+
+		public IClasspathEntry[] getClasspathEntries() {
+			return fEntries;
+		}
+
+		public String getDescription() {
+			if (JUnitCore.JUNIT4_CONTAINER_PATH.equals(fPath)) {
+				return JUnitMessages.JUnitContainerInitializer_description_junit4;
+			}
+			return JUnitMessages.JUnitContainerInitializer_description_junit3;
+		}
+
+		public int getKind() {
+			return IClasspathContainer.K_APPLICATION;
+		}
+
+		public IPath getPath() {
+			return fPath;
+		}
+
+	}
+
+
+	public JUnitContainerInitializer() {
+	}
+
+	public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
+		if (isValidJUnitContainerPath(containerPath)) {
+			JUnitContainer container= getNewContainer(containerPath);
+			JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, 	new IClasspathContainer[] { container }, null);
+		}
+
+	}
+
+	private static JUnitContainer getNewContainer(IPath containerPath) {
+		IClasspathEntry entry= null;
+		IClasspathEntry entry2= null;
+		String version= containerPath.segment(1);
+		if (JUNIT3_8_1.equals(version) || JUNIT3.equals(version)) {
+			entry= BuildPathSupport.getJUnit3LibraryEntry();
+		} else if (JUNIT4.equals(version)) {
+			entry= BuildPathSupport.getJUnit4LibraryEntry();
+			entry2= BuildPathSupport.getHamcrestCoreLibraryEntry();
+		}
+		IClasspathEntry[] entries;
+		if (entry == null) {
+			entries= new IClasspathEntry[] { };
+		} else if (entry2 == null) {
+			entries= new IClasspathEntry[] { entry };
+		} else {
+			entries= new IClasspathEntry[] { entry, entry2 };
+		}
+		return new JUnitContainer(containerPath, entries);
+	}
+
+
+	private static boolean isValidJUnitContainerPath(IPath path) {
+		return path != null && path.segmentCount() == 2 && JUnitCore.JUNIT_CONTAINER_ID.equals(path.segment(0));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
+	 */
+	public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAccessRulesStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
+	 */
+	public IStatus getAccessRulesStatus(IPath containerPath, IJavaProject project) {
+		return NOT_SUPPORTED;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getSourceAttachmentStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
+	 */
+	public IStatus getSourceAttachmentStatus(IPath containerPath, IJavaProject project) {
+		return READ_ONLY;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAttributeStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, java.lang.String)
+	 */
+	public IStatus getAttributeStatus(IPath containerPath, IJavaProject project, String attributeKey) {
+		if (attributeKey.equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
+			return Status.OK_STATUS;
+		}
+		return NOT_SUPPORTED;
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#requestClasspathContainerUpdate(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathContainer)
+	 */
+	public void requestClasspathContainerUpdate(IPath containerPath, IJavaProject project, IClasspathContainer containerSuggestion) throws CoreException {
+		IEclipsePreferences preferences= new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID);
+		
+		IClasspathEntry[] entries= containerSuggestion.getClasspathEntries();
+		if (entries.length >= 1 && isValidJUnitContainerPath(containerPath)) {
+			String version= containerPath.segment(1);
+			
+			// only modifiable entry is Javadoc location
+			for (int i= 0; i < entries.length; i++) {
+				IClasspathEntry entry= entries[i];
+				String preferenceKey= getPreferenceKey(entry, version);
+				
+				IClasspathAttribute[] extraAttributes= entry.getExtraAttributes();
+				if (extraAttributes.length == 0) {
+					// Revert to default
+					String defaultValue = new DefaultScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).get(preferenceKey, ""); //$NON-NLS-1$
+					if (!defaultValue.equals(preferences.get(preferenceKey, defaultValue))) {
+						preferences.put(preferenceKey, defaultValue);
+					}
+					
+					/* 
+					 * The following would be correct, but would not allow to revert to the default.
+					 * There's no concept of "default value" for a classpath attribute, see
+					 * org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationBlock.performDefaults()
+					 */
+					// preferenceStore.setValue(preferenceKey, "");
+				} else {
+					for (int j= 0; j < extraAttributes.length; j++) {
+						IClasspathAttribute attrib= extraAttributes[j];
+						if (attrib.getName().equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
+							if (preferenceKey != null) {
+								preferences.put(preferenceKey, attrib.getValue());
+							}
+							break;
+						}
+					}
+				}
+			}
+			rebindClasspathEntries(project.getJavaModel(), containerPath);
+		}
+	}
+
+	private String getPreferenceKey(IClasspathEntry entry, String version) {
+		if (JUNIT3.equals(version)) {
+			return JUnitPreferencesConstants.JUNIT3_JAVADOC;
+		} else if (JUNIT4.equals(version)) {
+			if (entry.getPath().lastSegment().indexOf("junit") != -1) { //$NON-NLS-1$
+				return JUnitPreferencesConstants.JUNIT4_JAVADOC;
+			} else {
+				return JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC;
+			}
+		}
+		return null;
+	}
+
+	private static void rebindClasspathEntries(IJavaModel model, IPath containerPath) throws JavaModelException {
+		ArrayList affectedProjects= new ArrayList();
+
+		IJavaProject[] projects= model.getJavaProjects();
+		for (int i= 0; i < projects.length; i++) {
+			IJavaProject project= projects[i];
+			IClasspathEntry[] entries= project.getRawClasspath();
+			for (int k= 0; k < entries.length; k++) {
+				IClasspathEntry curr= entries[k];
+				if (curr.getEntryKind() == IClasspathEntry.CPE_CONTAINER && containerPath.equals(curr.getPath())) {
+					affectedProjects.add(project);
+				}
+			}
+		}
+		if (!affectedProjects.isEmpty()) {
+			IJavaProject[] affected= (IJavaProject[]) affectedProjects.toArray(new IJavaProject[affectedProjects.size()]);
+			IClasspathContainer[] containers= new IClasspathContainer[affected.length];
+			for (int i= 0; i < containers.length; i++) {
+				containers[i]= getNewContainer(containerPath);
+			}
+			JavaCore.setClasspathContainer(containerPath, affected, containers, null);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getDescription(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
+	 */
+	public String getDescription(IPath containerPath, IJavaProject project) {
+		if (isValidJUnitContainerPath(containerPath)) {
+			String version= containerPath.segment(1);
+			if (JUNIT3_8_1.equals(version) || JUNIT3.equals(version)) {
+				return JUnitMessages.JUnitContainerInitializer_description_initializer_junit3;
+			} else if (JUNIT4.equals(version)) {
+				return JUnitMessages.JUnitContainerInitializer_description_initializer_junit4;
+			}
+		}
+		return JUnitMessages.JUnitContainerInitializer_description_initializer_unresolved;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getComparisonID(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
+	 */
+	public Object getComparisonID(IPath containerPath, IJavaProject project) {
+		return containerPath;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java
new file mode 100644
index 0000000..743c67b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.buildpath;
+
+
+import org.eclipse.core.runtime.IPath;
+
+import org.eclipse.jdt.core.ClasspathVariableInitializer;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+public class JUnitHomeInitializer extends ClasspathVariableInitializer {
+
+	/*
+	 * @see ClasspathVariableInitializer#initialize(String)
+	 */
+	public void initialize(String variable) {
+		if (JUnitCorePlugin.JUNIT_HOME.equals(variable)) {
+			initializeHome();
+		} else if (JUnitCorePlugin.JUNIT_SRC_HOME.equals(variable)) {
+			initializeSource();
+		}
+	}
+
+	private void initializeHome() {
+		try {
+			IPath location= BuildPathSupport.JUNIT3_PLUGIN.getBundleLocation();
+			if (location != null) {
+				JavaCore.setClasspathVariable(JUnitCorePlugin.JUNIT_HOME, location, null);
+			} else {
+				JavaCore.removeClasspathVariable(JUnitCorePlugin.JUNIT_HOME, null);
+			}
+		} catch (JavaModelException e1) {
+			JavaCore.removeClasspathVariable(JUnitCorePlugin.JUNIT_HOME, null);
+		}
+	}
+
+	private void initializeSource() {
+		try {
+			IPath sourceLocation= BuildPathSupport.JUNIT3_PLUGIN.getSourceBundleLocation();
+			if (sourceLocation != null) {
+				JavaCore.setClasspathVariable(JUnitCorePlugin.JUNIT_SRC_HOME, sourceLocation, null);
+			} else {
+				JavaCore.removeClasspathVariable(JUnitCorePlugin.JUNIT_SRC_HOME, null);
+			}
+		} catch (JavaModelException e1) {
+			JavaCore.removeClasspathVariable(JUnitCorePlugin.JUNIT_SRC_HOME, null);
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
new file mode 100644
index 0000000..50eb50c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Patrick Higgins <patrick133t at yahoo.com> - [JUnit] JUnit not found when JDT installed as dropin - https://bugs.eclipse.org/bugs/show_bug.cgi?id=297663
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.buildpath;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URLDecoder;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Version;
+
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.URIUtil;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+
+/**
+ * Utilities to read and write bundle and source information files.
+ * 
+ * @since 3.5
+ */
+class P2Utils {
+
+	/**
+	 * Finds the bundle info for the given arguments.
+	 * <p>
+	 * The first match will be returned if more than one bundle matches the arguments.
+	 * </p>
+	 * 
+	 * @param symbolicName the symbolic name
+	 * @param version the bundle version
+	 * @param isSourceBundle <code>true</code> if it is a source bundle <code>false</code> otherwise
+	 * @return the bundle info or <code>null</code> if not found
+	 */
+	public static BundleInfo findBundle(String symbolicName, Version version, boolean isSourceBundle) {
+		Assert.isLegal(symbolicName != null);
+		Assert.isLegal(version != null);
+
+		return findBundle(symbolicName, new VersionRange(version, true, version, true), isSourceBundle);
+	}
+
+	/**
+	 * Finds the bundle info for the given arguments.
+	 * <p>
+	 * The first match will be returned if more than one bundle matches the arguments.
+	 * </p>
+	 * 
+	 * @param symbolicName the symbolic name
+	 * @param versionRange the version range for the bundle version
+	 * @param isSourceBundle <code>true</code> if it is a source bundle <code>false</code> otherwise
+	 * @return the bundle info or <code>null</code> if not found
+	 */
+	public static BundleInfo findBundle(String symbolicName, VersionRange versionRange, boolean isSourceBundle) {
+		Assert.isLegal(symbolicName != null);
+		Assert.isLegal(versionRange != null);
+
+		SimpleConfiguratorManipulator manipulator= (SimpleConfiguratorManipulator)JUnitCorePlugin.getDefault().getService(SimpleConfiguratorManipulator.class.getName());
+		if (manipulator == null)
+			return null;
+
+		BundleInfo bestMatch= null;
+		Version bestVersion= null;
+
+		// A null bundleInfoPath means load the bundles.info according to the BundleContext property "org.eclipse.equinox.simpleconfigurator.configUrl"
+		String bundleInfoPath= null;
+		if (isSourceBundle)
+			bundleInfoPath= SimpleConfiguratorManipulator.SOURCE_INFO;
+
+		BundleContext context= JUnitCorePlugin.getDefault().getBundle().getBundleContext();
+		BundleInfo bundles[]= null;
+		try {
+			bundles= manipulator.loadConfiguration(context, bundleInfoPath);
+		} catch (IOException e) {
+			JUnitCorePlugin.log(e);
+		}
+		
+		if (bundles != null) {
+			for (int j= 0; j < bundles.length; j++) {
+				BundleInfo bundleInfo= bundles[j];
+				if (symbolicName.equals(bundleInfo.getSymbolicName())) {
+					Version version= new Version(bundleInfo.getVersion());
+					if (versionRange.isIncluded(version)) {
+						IPath path= getBundleLocationPath(bundleInfo);
+						if (path.toFile().exists()) {
+							if (bestMatch == null || bestVersion.compareTo(version) < 0) {
+								bestMatch= bundleInfo;
+								bestVersion= version;
+							}
+						}
+					}
+				}
+			}
+		}
+
+		return bestMatch;
+	}
+
+	/**
+	 * Returns the bundle location path.
+	 * 
+	 * @param bundleInfo the bundle info or <code>null</code>
+	 * @return the bundle location or <code>null</code> if it is not possible to convert to a path
+	 */
+	public static IPath getBundleLocationPath(BundleInfo bundleInfo) {
+		if (bundleInfo == null)
+			return null;
+	
+		URI bundleLocation= bundleInfo.getLocation();
+		if (bundleLocation == null)
+			return null;
+		
+		try {
+			String fileStr= FileLocator.toFileURL(URIUtil.toURL(bundleLocation)).getPath();
+			fileStr= URLDecoder.decode(fileStr, "UTF-8"); //$NON-NLS-1$
+			return new Path(fileStr);
+		} catch (IOException e) {
+			JUnitCorePlugin.log(e);
+			return null;
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ContainerComparator.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ContainerComparator.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ContainerComparator.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ContainerComparator.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ITestFinder.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ITestFinder.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ITestFinder.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ITestFinder.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ITestKind.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ITestKind.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/ITestKind.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/ITestKind.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java
new file mode 100644
index 0000000..f492de8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - initial API and implementation
+ *             (bug 102632: [JUnit] Support for JUnit 4.)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.launcher;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IRegion;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaModelException;
+
+import org.eclipse.jdt.internal.junit.JUnitMessages;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
+
+public class JUnit3TestFinder implements ITestFinder {
+
+	public void findTestsInContainer(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
+		if (element == null || result == null) {
+			throw new IllegalArgumentException();
+		}
+
+		if (pm == null)
+			pm= new NullProgressMonitor();
+
+		pm.beginTask(JUnitMessages.TestSearchEngine_message_searching, 10);
+		try {
+			if (element instanceof IType) {
+				if (isTest((IType) element)) {
+					result.add(element);
+				}
+			} else if (element instanceof ICompilationUnit) {
+				IType[] types= ((ICompilationUnit) element).getAllTypes();
+				for (int i= 0; i < types.length; i++) {
+					IType type= types[i];
+					if (isTest(types[i])) {
+						result.add(type);
+					}
+				}
+			} else {
+				findTestCases(element, result, new SubProgressMonitor(pm, 7));
+				if (pm.isCanceled()) {
+					return;
+				}
+				CoreTestSearchEngine.findSuiteMethods(element, result, new SubProgressMonitor(pm, 3));
+			}
+			if (pm.isCanceled()) {
+				return;
+			}
+		} finally {
+			pm.done();
+		}
+	}
+
+	private static void findTestCases(IJavaElement element, Set result, IProgressMonitor pm) throws JavaModelException {
+		IJavaProject javaProject= element.getJavaProject();
+
+		IType testCaseType= javaProject.findType(JUnitCorePlugin.TEST_INTERFACE_NAME);
+		if (testCaseType == null)
+			return;
+
+		IRegion region= CoreTestSearchEngine.getRegion(element);
+		ITypeHierarchy typeHierarchy= javaProject.newTypeHierarchy(testCaseType, region, pm);
+		CoreTestSearchEngine.findTestImplementorClasses(typeHierarchy, testCaseType, region, result);
+	}
+
+	public boolean isTest(IType type) throws JavaModelException {
+		return CoreTestSearchEngine.isAccessibleClass(type) && (CoreTestSearchEngine.hasSuiteMethod(type) || isTestImplementor(type));
+	}
+
+	private static boolean isTestImplementor(IType type) throws JavaModelException {
+		if (!Flags.isAbstract(type.getFlags()) && CoreTestSearchEngine.isTestImplementor(type)) {
+			return true;
+		}
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java
new file mode 100644
index 0000000..216c5da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java
@@ -0,0 +1,256 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   David Saff (saff at mit.edu) - initial API and implementation
+ *             (bug 102632: [JUnit] Support for JUnit 4.)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.launcher;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IRegion;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IAnnotationBinding;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.SearchRequestor;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitMessages;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
+
+
+public class JUnit4TestFinder implements ITestFinder {
+
+	private static class Annotation {
+
+		private static final Annotation RUN_WITH= new Annotation("org.junit.runner.RunWith"); //$NON-NLS-1$
+		private static final Annotation TEST= new Annotation("org.junit.Test"); //$NON-NLS-1$
+
+		private final String fName;
+
+		private Annotation(String name) {
+			fName= name;
+		}
+
+		public String getName() {
+			return fName;
+		}
+
+		private boolean annotates(IAnnotationBinding[] annotations) {
+			for (int i= 0; i < annotations.length; i++) {
+				ITypeBinding annotationType= annotations[i].getAnnotationType();
+				if (annotationType != null && (annotationType.getQualifiedName().equals(fName))) {
+					return true;
+				}
+			}
+			return  false;
+		}
+
+		public boolean annotatesTypeOrSuperTypes(ITypeBinding type) {
+			while (type != null) {
+				if (annotates(type.getAnnotations())) {
+					return true;
+				}
+				type= type.getSuperclass();
+			}
+			return false;
+		}
+
+		public boolean annotatesAtLeastOneMethod(ITypeBinding type) {
+			while (type != null) {
+				IMethodBinding[] declaredMethods= type.getDeclaredMethods();
+				for (int i= 0; i < declaredMethods.length; i++) {
+					IMethodBinding curr= declaredMethods[i];
+					if (annotates(curr.getAnnotations())) {
+						return true;
+					}
+				}
+				type= type.getSuperclass();
+			}
+			return false;
+		}
+	}
+
+	public void findTestsInContainer(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
+		if (element == null || result == null) {
+			throw new IllegalArgumentException();
+		}
+
+		if (element instanceof IType) {
+			if (internalIsTest((IType) element, pm)) {
+				result.add(element);
+				return;
+			}
+		}
+
+		if (pm == null)
+			pm= new NullProgressMonitor();
+
+		try {
+			pm.beginTask(JUnitMessages.JUnit4TestFinder_searching_description, 4);
+
+			IRegion region= CoreTestSearchEngine.getRegion(element);
+			ITypeHierarchy hierarchy= JavaCore.newTypeHierarchy(region, null, new SubProgressMonitor(pm, 1));
+			IType[] allClasses= hierarchy.getAllClasses();
+
+			// search for all types with references to RunWith and Test and all subclasses
+			HashSet candidates= new HashSet(allClasses.length);
+			SearchRequestor requestor= new AnnotationSearchRequestor(hierarchy, candidates);
+
+			IJavaSearchScope scope= SearchEngine.createJavaSearchScope(allClasses, IJavaSearchScope.SOURCES);
+			int matchRule= SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE;
+			SearchPattern runWithPattern= SearchPattern.createPattern(Annotation.RUN_WITH.getName(), IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, matchRule);
+			SearchPattern testPattern= SearchPattern.createPattern(Annotation.TEST.getName(), IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, matchRule);
+
+			SearchPattern annotationsPattern= SearchPattern.createOrPattern(runWithPattern, testPattern);
+			SearchParticipant[] searchParticipants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
+			new SearchEngine().search(annotationsPattern, searchParticipants, scope, requestor, new SubProgressMonitor(pm, 2));
+
+			// find all classes in the region
+			for (Iterator iterator= candidates.iterator(); iterator.hasNext();) {
+				IType curr= (IType) iterator.next();
+				if (CoreTestSearchEngine.isAccessibleClass(curr) && !Flags.isAbstract(curr.getFlags()) && region.contains(curr)) {
+					result.add(curr);
+				}
+			}
+
+			// add all classes implementing JUnit 3.8's Test interface in the region
+			IType testInterface= element.getJavaProject().findType(JUnitCorePlugin.TEST_INTERFACE_NAME);
+			if (testInterface != null) {
+				CoreTestSearchEngine.findTestImplementorClasses(hierarchy, testInterface, region, result);
+			}
+
+			//JUnit 4.3 can also run JUnit-3.8-style public static Test suite() methods:
+			CoreTestSearchEngine.findSuiteMethods(element, result, new SubProgressMonitor(pm, 1));
+		} finally {
+			pm.done();
+		}
+	}
+
+	private static class AnnotationSearchRequestor extends SearchRequestor {
+
+		private final Collection fResult;
+		private final ITypeHierarchy fHierarchy;
+
+		public AnnotationSearchRequestor(ITypeHierarchy hierarchy, Collection result) {
+			fHierarchy= hierarchy;
+			fResult= result;
+		}
+
+		public void acceptSearchMatch(SearchMatch match) throws CoreException {
+			if (match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment()) {
+				Object element= match.getElement();
+				if (element instanceof IType || element instanceof IMethod) {
+					IMember member= (IMember) element;
+					IType type= member.getElementType() == IJavaElement.TYPE ? (IType) member : member.getDeclaringType();
+					addTypeAndSubtypes(type);
+				}
+			}
+		}
+
+		private void addTypeAndSubtypes(IType type) {
+			if (fResult.add(type)) {
+				IType[] subclasses= fHierarchy.getSubclasses(type);
+				for (int i= 0; i < subclasses.length; i++) {
+					addTypeAndSubtypes(subclasses[i]);
+				}
+			}
+		}
+	}
+
+	public boolean isTest(IType type) throws JavaModelException {
+		return internalIsTest(type, null);
+	}
+
+	private boolean internalIsTest(IType type, IProgressMonitor monitor) throws JavaModelException {
+		if (CoreTestSearchEngine.isAccessibleClass(type)) {
+			if (CoreTestSearchEngine.hasSuiteMethod(type)) { // since JUnit 4.3.1
+				return true;
+			}
+			ASTParser parser= ASTParser.newParser(AST.JLS3);
+			/* TODO: When bug 156352 is fixed:
+			parser.setProject(type.getJavaProject());
+			IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, monitor);
+			if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
+				ITypeBinding binding= (ITypeBinding) bindings[0];
+				return isTest(binding);
+			}*/
+
+			if (type.getCompilationUnit() != null) {
+				parser.setSource(type.getCompilationUnit());
+			} else if (!isAvailable(type.getSourceRange())) { // class file with no source
+				parser.setProject(type.getJavaProject());
+				IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, monitor);
+				if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
+					ITypeBinding binding= (ITypeBinding) bindings[0];
+					return isTest(binding);
+				}
+				return false;
+			} else {
+				parser.setSource(type.getClassFile());
+			}
+			parser.setFocalPosition(0);
+			parser.setResolveBindings(true);
+			CompilationUnit root= (CompilationUnit) parser.createAST(monitor);
+			ASTNode node= root.findDeclaringNode(type.getKey());
+			if (node instanceof TypeDeclaration) {
+				ITypeBinding binding= ((TypeDeclaration) node).resolveBinding();
+				if (binding != null) {
+					return isTest(binding);
+				}
+			}
+		}
+		return false;
+
+	}
+
+    private static boolean isAvailable(ISourceRange range) {
+		return range != null && range.getOffset() != -1;
+	}
+
+
+	private boolean isTest(ITypeBinding binding) {
+		if (Modifier.isAbstract(binding.getModifiers()))
+			return false;
+
+		if (Annotation.RUN_WITH.annotatesTypeOrSuperTypes(binding) || Annotation.TEST.annotatesAtLeastOneMethod(binding)) {
+			return true;
+		}
+		return CoreTestSearchEngine.isTestImplementor(binding);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java
new file mode 100644
index 0000000..af5f10d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+
+/**
+ * Attribute keys used by the IJUnitLaunchConfiguration. Note that these constants are not API and
+ * might change in the future.
+ */
+public class JUnitLaunchConfigurationConstants {
+
+	public static final String MODE_RUN_QUIETLY_MODE = "runQuietly"; //$NON-NLS-1$
+	public static final String ID_JUNIT_APPLICATION= "org.eclipse.jdt.junit.launchconfig"; //$NON-NLS-1$
+
+	public static final String ATTR_NO_DISPLAY = JUnitCorePlugin.PLUGIN_ID + ".NO_DISPLAY"; //$NON-NLS-1$
+
+
+
+	public static final String ATTR_PORT= JUnitCorePlugin.PLUGIN_ID+".PORT"; //$NON-NLS-1$
+
+	/**
+	 * The test method, or "" iff running the whole test type.
+	 */
+	public static final String ATTR_TEST_METHOD_NAME= JUnitCorePlugin.PLUGIN_ID+".TESTNAME"; //$NON-NLS-1$
+
+	public static final String ATTR_KEEPRUNNING = JUnitCorePlugin.PLUGIN_ID+ ".KEEPRUNNING_ATTR"; //$NON-NLS-1$
+	/**
+	 * The launch container, or "" iff running a single test type.
+	 */
+	public static final String ATTR_TEST_CONTAINER= JUnitCorePlugin.PLUGIN_ID+".CONTAINER"; //$NON-NLS-1$
+
+	public static final String ATTR_FAILURES_NAMES= JUnitCorePlugin.PLUGIN_ID+".FAILURENAMES"; //$NON-NLS-1$
+
+	public static final String ATTR_TEST_RUNNER_KIND= JUnitCorePlugin.PLUGIN_ID+".TEST_KIND"; //$NON-NLS-1$
+
+	public static ITestKind getTestRunnerKind(ILaunchConfiguration launchConfiguration) {
+		try {
+			String loaderId = launchConfiguration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_RUNNER_KIND, (String) null);
+			if (loaderId != null) {
+				return TestKindRegistry.getDefault().getKind(loaderId);
+			}
+		} catch (CoreException e) {
+		}
+		return  ITestKind.NULL;
+	}
+
+	public static IJavaProject getJavaProject(ILaunchConfiguration configuration) {
+		try {
+			String projectName= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null);
+			if (projectName != null && projectName.length() > 0) {
+				return JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
+			}
+		} catch (CoreException e) {
+		}
+		return null;
+	}
+
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitRuntimeClasspathEntry.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitRuntimeClasspathEntry.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitRuntimeClasspathEntry.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitRuntimeClasspathEntry.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java
new file mode 100644
index 0000000..aef95f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - initial API and implementation
+ *             (bug 102632: [JUnit] Support for JUnit 4.)
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+
+public class TestKind implements ITestKind {
+
+	private final IConfigurationElement fElement;
+	private ITestFinder fFinder;
+
+	public TestKind(IConfigurationElement element) {
+		fElement = element;
+		fFinder= null;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#createFinder()
+	 */
+	public ITestFinder getFinder() {
+		if (fFinder == null) {
+			try {
+				fFinder= (ITestFinder) fElement.createExecutableExtension(FINDER_CLASS_NAME);
+			} catch (CoreException e1) {
+				JUnitCorePlugin.log(e1);
+				fFinder= ITestFinder.NULL;
+			}
+		}
+		return fFinder;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getDisplayName()
+	 */
+	public String getDisplayName() {
+		return getAttribute(DISPLAY_NAME);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getFinderClassName()
+	 */
+	public String getFinderClassName() {
+		return getAttribute(FINDER_CLASS_NAME);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getId()
+	 */
+	public String getId() {
+		return getAttribute(ID);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getLoaderClassName()
+	 */
+	public String getLoaderClassName() {
+		return getAttribute(LOADER_CLASS_NAME);
+	}
+
+	public String getLoaderPluginId() {
+		return getAttribute(LOADER_PLUGIN_ID);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getPrecededKindId()
+	 */
+	public String getPrecededKindId() {
+		String attribute= getAttribute(PRECEDES);
+		return attribute == null ? "" : attribute; //$NON-NLS-1$
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#isNull()
+	 */
+	public boolean isNull() {
+		return false;
+	}
+
+	protected String getAttribute(String attributeName) {
+		return fElement.getAttribute(attributeName);
+	}
+
+	boolean precedes(ITestKind otherKind) {
+		final String precededKindId = getPrecededKindId();
+		String[] ids = precededKindId.split(","); //$NON-NLS-1$
+		for (int i = 0; i < ids.length; i++) {
+			if (ids[i].equals(otherKind.getId()))
+				return true;
+		}
+		return false;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getClasspathEntries()
+	 */
+	public JUnitRuntimeClasspathEntry[] getClasspathEntries() {
+		IConfigurationElement[] children= fElement.getChildren(ITestKind.RUNTIME_CLASSPATH_ENTRY);
+		JUnitRuntimeClasspathEntry[] returnThis= new JUnitRuntimeClasspathEntry[children.length];
+		for (int i= 0; i < children.length; i++) {
+			IConfigurationElement element= children[i];
+			String pluginID= element.getAttribute(ITestKind.CLASSPATH_PLUGIN_ID);
+			String pathToJar= element.getAttribute(ITestKind.CLASSPATH_PATH_TO_JAR);
+			returnThis[i]= new JUnitRuntimeClasspathEntry(pluginID, pathToJar);
+		}
+		return returnThis;
+	}
+
+	/*
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return getDisplayName() + " (id: " + getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java
new file mode 100644
index 0000000..498411a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - initial API and implementation
+ *             (bug 102632: [JUnit] Support for JUnit 4.)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.launcher;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
+
+
+public class TestKindRegistry {
+
+	public static final String JUNIT3_TEST_KIND_ID= "org.eclipse.jdt.junit.loader.junit3"; //$NON-NLS-1$
+	public static final String JUNIT4_TEST_KIND_ID= "org.eclipse.jdt.junit.loader.junit4"; //$NON-NLS-1$
+
+	public static TestKindRegistry getDefault() {
+		if (fgRegistry != null)
+			return fgRegistry;
+
+		fgRegistry= new TestKindRegistry(Platform.getExtensionRegistry().getExtensionPoint(JUnitCorePlugin.ID_EXTENSION_POINT_TEST_KINDS));
+		return fgRegistry;
+	}
+
+	private static TestKindRegistry fgRegistry;
+
+	private final IExtensionPoint fPoint;
+	private ArrayList/*<TestKind>*/ fTestKinds;
+
+	private TestKindRegistry(IExtensionPoint point) {
+		fPoint = point;
+	}
+
+	public ArrayList/*<TestKind>*/ getAllKinds() {
+		loadKinds();
+		return fTestKinds;
+	}
+
+	private void loadKinds() {
+		if (fTestKinds != null)
+			return;
+
+		ArrayList items= new ArrayList();
+		for (Iterator iter= getConfigurationElements().iterator(); iter.hasNext();) {
+			IConfigurationElement element= (IConfigurationElement) iter.next();
+			items.add(new TestKind(element));
+		}
+
+		Collections.sort(items, new Comparator() {
+			public int compare(Object arg0, Object arg1) {
+				TestKind kind0 = (TestKind) arg0;
+				TestKind kind1 = (TestKind) arg1;
+
+				if (kind0.precedes(kind1))
+					return -1;
+				if (kind1.precedes(kind0))
+					return 1;
+				return 0;
+			}
+		});
+		fTestKinds= items;
+	}
+
+	public ArrayList/*<String>*/ getDisplayNames() {
+		ArrayList result = new ArrayList();
+		ArrayList testTypes = getAllKinds();
+		for (Iterator iter = testTypes.iterator(); iter.hasNext();) {
+			ITestKind type = (ITestKind) iter.next();
+			result.add(type.getDisplayName());
+		}
+		return result;
+	}
+
+	/**
+	 * @param testKindId an id, can be <code>null</code>
+	 * @return a TestKind, ITestKind.NULL if not available
+	 */
+	public ITestKind getKind(String testKindId) {
+		if (testKindId != null) {
+			for (Iterator iter= getAllKinds().iterator(); iter.hasNext();) {
+				TestKind kind= (TestKind) iter.next();
+				if (testKindId.equals(kind.getId()))
+					return kind;
+			}
+		}
+		return ITestKind.NULL;
+	}
+
+	public static String getContainerTestKindId(IJavaElement element) {
+		if (element != null) {
+			IJavaProject project= element.getJavaProject();
+			if (CoreTestSearchEngine.is50OrHigher(project) && CoreTestSearchEngine.hasTestAnnotation(project)) {
+				return JUNIT4_TEST_KIND_ID;
+			}
+		}
+		return JUNIT3_TEST_KIND_ID;
+	}
+
+	public static ITestKind getContainerTestKind(IJavaElement element) {
+		return getDefault().getKind(getContainerTestKindId(element));
+	}
+
+	private ArrayList getConfigurationElements() {
+		ArrayList items= new ArrayList();
+		IExtension[] extensions= fPoint.getExtensions();
+		for (int i= 0; i < extensions.length; i++) {
+			IExtension extension= extensions[i];
+			IConfigurationElement[] elements= extension.getConfigurationElements();
+			for (int j= 0; j < elements.length; j++) {
+				IConfigurationElement element= elements[j];
+				items.add(element);
+			}
+		}
+		return items;
+	}
+
+	public String getAllKindIds() {
+		ArrayList allKinds= getAllKinds();
+		String returnThis= ""; //$NON-NLS-1$
+		for (Iterator iter= allKinds.iterator(); iter.hasNext();) {
+			ITestKind kind= (ITestKind) iter.next();
+			returnThis+= "(" + kind.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		return returnThis;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestSearchResult.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestSearchResult.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestSearchResult.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/TestSearchResult.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestRunListener2.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestRunListener2.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestRunListener2.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestRunListener2.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestRunSessionListener.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestRunSessionListener.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestRunSessionListener.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestRunSessionListener.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestSessionListener.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestSessionListener.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ITestSessionListener.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ITestSessionListener.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java
new file mode 100644
index 0000000..49ae717
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au)
+ *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
+ *     Neale Upstone <neale at nealeupstone.com> - [JUnit] JUnit viewer doesn't recognise <skipped/> node - https://bugs.eclipse.org/bugs/show_bug.cgi?id=276068
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+public interface IXMLTags {
+
+	public static final String NODE_TESTRUN= "testrun"; //$NON-NLS-1$
+	public static final String NODE_TESTSUITES= "testsuites"; //$NON-NLS-1$
+	public static final String NODE_TESTSUITE= "testsuite"; //$NON-NLS-1$
+	public static final String NODE_PROPERTIES= "properties"; //$NON-NLS-1$
+	public static final String NODE_PROPERTY= "property"; //$NON-NLS-1$
+	public static final String NODE_TESTCASE= "testcase"; //$NON-NLS-1$
+	public static final String NODE_ERROR= "error"; //$NON-NLS-1$
+	public static final String NODE_FAILURE= "failure"; //$NON-NLS-1$
+	public static final String NODE_EXPECTED= "expected";  //$NON-NLS-1$
+	public static final String NODE_ACTUAL= "actual";  //$NON-NLS-1$
+	public static final String NODE_SYSTEM_OUT= "system-out"; //$NON-NLS-1$
+	public static final String NODE_SYSTEM_ERR= "system-err"; //$NON-NLS-1$
+	public static final String NODE_SKIPPED = "skipped"; //$NON-NLS-1$
+
+	/**
+	 * value: String
+	 */
+	public static final String ATTR_NAME= "name"; //$NON-NLS-1$
+	/**
+	 * value: String
+	 */
+	public static final String ATTR_PROJECT= "project"; //$NON-NLS-1$
+	/**
+	 * value: Integer
+	 */
+	public static final String ATTR_TESTS= "tests"; //$NON-NLS-1$
+	/**
+	 * value: Integer
+	 */
+	public static final String ATTR_STARTED= "started"; //$NON-NLS-1$
+	/**
+	 * value: Integer
+	 */
+	public static final String ATTR_FAILURES= "failures"; //$NON-NLS-1$
+	/**
+	 * value: Integer
+	 */
+	public static final String ATTR_ERRORS= "errors"; //$NON-NLS-1$
+	/**
+	 * value: Boolean
+	 */
+	public static final String ATTR_IGNORED= "ignored"; //$NON-NLS-1$
+	/**
+	 * value: String
+	 */
+	public static final String ATTR_PACKAGE= "package"; //$NON-NLS-1$
+	/**
+	 * value: String
+	 */
+	public static final String ATTR_ID= "id"; //$NON-NLS-1$
+	/**
+	 * value: String
+	 */
+	public static final String ATTR_CLASSNAME= "classname"; //$NON-NLS-1$
+	/**
+	 * value: Boolean
+	 */
+	public static final String ATTR_INCOMPLETE= "incomplete"; //$NON-NLS-1$
+	/**
+	 * value: Double
+	 */
+	public static final String ATTR_TIME= "time"; //$NON-NLS-1$
+//	public static final String ATTR_MESSAGE= "message"; //$NON-NLS-1$
+//	public static final String ATTR_TYPE= "type"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java
new file mode 100644
index 0000000..8861d62
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java
@@ -0,0 +1,569 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.TransformerFactoryConfigurationError;
+import javax.xml.transform.sax.SAXSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import org.eclipse.jdt.junit.TestRunListener;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.Platform;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchListener;
+import org.eclipse.debug.core.ILaunchManager;
+
+import org.eclipse.jdt.core.IJavaProject;
+
+import org.eclipse.jdt.internal.junit.BasicElementLabels;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
+import org.eclipse.jdt.internal.junit.Messages;
+import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
+import org.eclipse.jdt.internal.junit.model.TestElement.Status;
+
+/**
+ * Central registry for JUnit test runs.
+ */
+public final class JUnitModel {
+
+	private final class JUnitLaunchListener implements ILaunchListener {
+
+		/**
+		 * Used to track new launches. We need to do this
+		 * so that we only attach a TestRunner once to a launch.
+		 * Once a test runner is connected, it is removed from the set.
+		 */
+		private HashSet fTrackedLaunches= new HashSet(20);
+
+		/*
+		 * @see ILaunchListener#launchAdded(ILaunch)
+		 */
+		public void launchAdded(ILaunch launch) {
+			fTrackedLaunches.add(launch);
+		}
+
+		/*
+		 * @see ILaunchListener#launchRemoved(ILaunch)
+		 */
+		public void launchRemoved(final ILaunch launch) {
+			fTrackedLaunches.remove(launch);
+			//TODO: story for removing old test runs?
+//			getDisplay().asyncExec(new Runnable() {
+//				public void run() {
+//					TestRunnerViewPart testRunnerViewPart= findTestRunnerViewPartInActivePage();
+//					if (testRunnerViewPart != null && testRunnerViewPart.isCreated() && launch.equals(testRunnerViewPart.getLastLaunch()))
+//						testRunnerViewPart.reset();
+//				}
+//			});
+		}
+
+		/*
+		 * @see ILaunchListener#launchChanged(ILaunch)
+		 */
+		public void launchChanged(final ILaunch launch) {
+			if (!fTrackedLaunches.contains(launch))
+				return;
+
+			ILaunchConfiguration config= launch.getLaunchConfiguration();
+			if (config == null)
+				return;
+
+			final IJavaProject javaProject= JUnitLaunchConfigurationConstants.getJavaProject(config);
+			if (javaProject == null)
+				return;
+
+			// test whether the launch defines the JUnit attributes
+			String portStr= launch.getAttribute(JUnitLaunchConfigurationConstants.ATTR_PORT);
+			if (portStr == null)
+				return;
+			try {
+				final int port= Integer.parseInt(portStr);
+				fTrackedLaunches.remove(launch);
+				connectTestRunner(launch, javaProject, port);
+			} catch (NumberFormatException e) {
+				return;
+			}
+		}
+
+		private void connectTestRunner(ILaunch launch, IJavaProject javaProject, int port) {
+			TestRunSession testRunSession= new TestRunSession(launch, javaProject, port);
+			addTestRunSession(testRunSession);
+			
+			Object[] listeners= JUnitCorePlugin.getDefault().getNewTestRunListeners().getListeners();
+			for (int i= 0; i < listeners.length; i++) {
+				((TestRunListener) listeners[i]).sessionLaunched(testRunSession);
+			}
+		}
+	}
+
+	/**
+	 * @deprecated to prevent deprecation warnings
+	 */
+	private static final class LegacyTestRunSessionListener implements ITestRunSessionListener {
+		private TestRunSession fActiveTestRunSession;
+		private ITestSessionListener fTestSessionListener;
+
+		public void sessionAdded(TestRunSession testRunSession) {
+			// Only serve one legacy ITestRunListener at a time, since they cannot distinguish between different concurrent test sessions:
+			if (fActiveTestRunSession != null)
+				return;
+
+			fActiveTestRunSession= testRunSession;
+
+			fTestSessionListener= new ITestSessionListener() {
+				public void testAdded(TestElement testElement) {
+				}
+
+				public void sessionStarted() {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testRunStarted(fActiveTestRunSession.getTotalCount());
+					}
+				}
+				public void sessionTerminated() {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testRunTerminated();
+					}
+					sessionRemoved(fActiveTestRunSession);
+				}
+				public void sessionStopped(long elapsedTime) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testRunStopped(elapsedTime);
+					}
+					sessionRemoved(fActiveTestRunSession);
+				}
+				public void sessionEnded(long elapsedTime) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testRunEnded(elapsedTime);
+					}
+					sessionRemoved(fActiveTestRunSession);
+				}
+				public void runningBegins() {
+					// ignore
+				}
+				public void testStarted(TestCaseElement testCaseElement) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testStarted(testCaseElement.getId(), testCaseElement.getTestName());
+					}
+				}
+
+				public void testFailed(TestElement testElement, Status status, String trace, String expected, String actual) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testFailed(status.getOldCode(), testElement.getId(), testElement.getTestName(), trace);
+					}
+				}
+
+				public void testEnded(TestCaseElement testCaseElement) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testEnded(testCaseElement.getId(), testCaseElement.getTestName());
+					}
+				}
+
+				public void testReran(TestCaseElement testCaseElement, Status status, String trace, String expectedResult, String actualResult) {
+					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitCorePlugin.getDefault().getTestRunListeners();
+					for (int i= 0; i < testRunListeners.length; i++) {
+						testRunListeners[i].testReran(testCaseElement.getId(), testCaseElement.getClassName(), testCaseElement.getTestMethodName(), status.getOldCode(), trace);
+					}
+				}
+
+				public boolean acceptsSwapToDisk() {
+					return true;
+				}
+			};
+			fActiveTestRunSession.addTestSessionListener(fTestSessionListener);
+		}
+
+		public void sessionRemoved(TestRunSession testRunSession) {
+			if (fActiveTestRunSession == testRunSession) {
+				fActiveTestRunSession.removeTestSessionListener(fTestSessionListener);
+				fTestSessionListener= null;
+				fActiveTestRunSession= null;
+			}
+		}
+	}
+
+	private final ListenerList fTestRunSessionListeners= new ListenerList();
+	/**
+	 * Active test run sessions, youngest first.
+	 */
+	private final LinkedList/*<TestRunSession>*/ fTestRunSessions= new LinkedList();
+	private final ILaunchListener fLaunchListener= new JUnitLaunchListener();
+
+	/**
+	 * Starts the model (called by the {@link JUnitCorePlugin} on startup).
+	 */
+	public void start() {
+		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
+		launchManager.addLaunchListener(fLaunchListener);
+
+/*
+ * TODO: restore on restart:
+ * - only import headers!
+ * - only import last n sessions; remove all other files in historyDirectory
+ */
+//		File historyDirectory= JUnitPlugin.getHistoryDirectory();
+//		File[] swapFiles= historyDirectory.listFiles();
+//		if (swapFiles != null) {
+//			Arrays.sort(swapFiles, new Comparator() {
+//				public int compare(Object o1, Object o2) {
+//					String name1= ((File) o1).getName();
+//					String name2= ((File) o2).getName();
+//					return name1.compareTo(name2);
+//				}
+//			});
+//			for (int i= 0; i < swapFiles.length; i++) {
+//				final File file= swapFiles[i];
+//				SafeRunner.run(new ISafeRunnable() {
+//					public void run() throws Exception {
+//						importTestRunSession(file );
+//					}
+//					public void handleException(Throwable exception) {
+//						JUnitPlugin.log(exception);
+//					}
+//				});
+//			}
+//		}
+
+		addTestRunSessionListener(new LegacyTestRunSessionListener());
+	}
+
+	/**
+	 * Stops the model (called by the {@link JUnitCorePlugin} on shutdown).
+	 */
+	public void stop() {
+		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
+		launchManager.removeLaunchListener(fLaunchListener);
+
+		File historyDirectory= JUnitCorePlugin.getHistoryDirectory();
+		File[] swapFiles= historyDirectory.listFiles();
+		if (swapFiles != null) {
+			for (int i= 0; i < swapFiles.length; i++) {
+				swapFiles[i].delete();
+			}
+		}
+
+//		for (Iterator iter= fTestRunSessions.iterator(); iter.hasNext();) {
+//			final TestRunSession session= (TestRunSession) iter.next();
+//			SafeRunner.run(new ISafeRunnable() {
+//				public void run() throws Exception {
+//					session.swapOut();
+//				}
+//				public void handleException(Throwable exception) {
+//					JUnitPlugin.log(exception);
+//				}
+//			});
+//		}
+	}
+
+
+	public void addTestRunSessionListener(ITestRunSessionListener listener) {
+		fTestRunSessionListeners.add(listener);
+	}
+
+	public void removeTestRunSessionListener(ITestRunSessionListener listener) {
+		fTestRunSessionListeners.remove(listener);
+	}
+
+
+	/**
+	 * @return a list of active {@link TestRunSession}s. The list is a copy of
+	 *         the internal data structure and modifications do not affect the
+	 *         global list of active sessions. The list is sorted by age, youngest first.
+	 */
+	public synchronized List getTestRunSessions() {
+		return new ArrayList(fTestRunSessions);
+	}
+
+	/**
+	 * Adds the given {@link TestRunSession} and notifies all registered
+	 * {@link ITestRunSessionListener}s.
+	 *
+	 * @param testRunSession the session to add
+	 */
+	public void addTestRunSession(TestRunSession testRunSession) {
+		Assert.isNotNull(testRunSession);
+		ArrayList toRemove= new ArrayList();
+		
+		synchronized (this) {
+			Assert.isLegal(! fTestRunSessions.contains(testRunSession));
+			fTestRunSessions.addFirst(testRunSession);
+			
+			int maxCount = Platform.getPreferencesService().getInt(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.MAX_TEST_RUNS, 10, null);
+			int size= fTestRunSessions.size();
+			if (size > maxCount) {
+				List excess= fTestRunSessions.subList(maxCount, size);
+				for (Iterator iter= excess.iterator(); iter.hasNext();) {
+					TestRunSession oldSession= (TestRunSession) iter.next();
+					if (!(oldSession.isStarting() || oldSession.isRunning() || oldSession.isKeptAlive())) {
+						toRemove.add(oldSession);
+						iter.remove();
+					}
+				}
+			}
+		}
+		
+		for (int i= 0; i < toRemove.size(); i++) {
+			TestRunSession oldSession= (TestRunSession) toRemove.get(i);
+			notifyTestRunSessionRemoved(oldSession);
+		}
+		notifyTestRunSessionAdded(testRunSession);
+	}
+
+	/**
+	 * Imports a test run session from the given file.
+	 *
+	 * @param file a file containing a test run session transcript
+	 * @return the imported test run session
+	 * @throws CoreException if the import failed
+	 */
+	public static TestRunSession importTestRunSession(File file) throws CoreException {
+		try {
+			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+//			parserFactory.setValidating(true); // TODO: add DTD and debug flag
+			SAXParser parser= parserFactory.newSAXParser();
+			TestRunHandler handler= new TestRunHandler();
+			parser.parse(file, handler);
+			TestRunSession session= handler.getTestRunSession();
+			JUnitCorePlugin.getModel().addTestRunSession(session);
+			return session;
+		} catch (ParserConfigurationException e) {
+			throwImportError(file, e);
+		} catch (SAXException e) {
+			throwImportError(file, e);
+		} catch (IOException e) {
+			throwImportError(file, e);
+		}
+		return null; // does not happen
+	}
+
+	/**
+	 * Imports a test run session from the given URL.
+	 *
+	 * @param url an URL to a test run session transcript
+	 * @param monitor a progress monitor for cancellation
+	 * @return the imported test run session
+	 * @throws InvocationTargetException wrapping a CoreException if the import failed
+	 * @throws InterruptedException if the import was cancelled
+	 * @since 3.6
+	 */
+	public static TestRunSession importTestRunSession(final String url, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+		monitor.beginTask(ModelMessages.JUnitModel_importing_from_url, IProgressMonitor.UNKNOWN);
+		final TestRunHandler handler= new TestRunHandler();
+		
+		final CoreException[] exception= { null };
+		final TestRunSession[] session= { null };
+		
+		Thread importThread= new Thread("JUnit URL importer") { //$NON-NLS-1$
+			public void run() {
+				try {
+					SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+//					parserFactory.setValidating(true); // TODO: add DTD and debug flag
+					SAXParser parser= parserFactory.newSAXParser();
+					parser.parse(url, handler);
+					session[0]= handler.getTestRunSession();
+				} catch (ParserConfigurationException e) {
+					storeImportError(e);
+				} catch (SAXException e) {
+					storeImportError(e);
+				} catch (IOException e) {
+					storeImportError(e);
+				}
+			}
+			private void storeImportError(Exception e) {
+				exception[0]= new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
+						JUnitCorePlugin.getPluginId(), ModelMessages.JUnitModel_could_not_import, e));
+			}
+		};
+		importThread.start();
+		
+		while (session[0] == null && exception[0] == null && !monitor.isCanceled()) {
+			try {
+				Thread.sleep(100);
+			} catch (InterruptedException e) {
+				// that's OK
+			}
+		}
+		if (session[0] == null) {
+			if (exception[0] != null) {
+				throw new InvocationTargetException(exception[0]);
+			} else {
+				importThread.interrupt(); // have to kill the thread since we don't control URLConnection and XML parsing
+				throw new InterruptedException();
+			}
+		}
+		
+		JUnitCorePlugin.getModel().addTestRunSession(session[0]);
+		monitor.done();
+		return session[0];
+	}
+
+	public static void importIntoTestRunSession(File swapFile, TestRunSession testRunSession) throws CoreException {
+		try {
+			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
+//			parserFactory.setValidating(true); // TODO: add DTD and debug flag
+			SAXParser parser= parserFactory.newSAXParser();
+			TestRunHandler handler= new TestRunHandler(testRunSession);
+			parser.parse(swapFile, handler);
+		} catch (ParserConfigurationException e) {
+			throwImportError(swapFile, e);
+		} catch (SAXException e) {
+			throwImportError(swapFile, e);
+		} catch (IOException e) {
+			throwImportError(swapFile, e);
+		}
+	}
+
+	/**
+	 * Exports the given test run session.
+	 *
+	 * @param testRunSession the test run session
+	 * @param file the destination
+	 * @throws CoreException if an error occurred
+	 */
+	public static void exportTestRunSession(TestRunSession testRunSession, File file) throws CoreException {
+		FileOutputStream out= null;
+		try {
+			out= new FileOutputStream(file);
+            exportTestRunSession(testRunSession, out);
+
+		} catch (IOException e) {
+			throwExportError(file, e);
+		} catch (TransformerConfigurationException e) {
+			throwExportError(file, e);
+		} catch (TransformerException e) {
+			throwExportError(file, e);
+		} finally {
+			if (out != null) {
+				try {
+					out.close();
+				} catch (IOException e2) {
+					JUnitCorePlugin.log(e2);
+				}
+			}
+		}
+	}
+
+	public static void exportTestRunSession(TestRunSession testRunSession, OutputStream out)
+			throws TransformerFactoryConfigurationError, TransformerException {
+
+		Transformer transformer= TransformerFactory.newInstance().newTransformer();
+		InputSource inputSource= new InputSource();
+		SAXSource source= new SAXSource(new TestRunSessionSerializer(testRunSession), inputSource);
+		StreamResult result= new StreamResult(out);
+		transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
+		transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
+		/*
+		 * Bug in Xalan: Only indents if proprietary property
+		 * org.apache.xalan.templates.OutputProperties.S_KEY_INDENT_AMOUNT is set.
+		 *
+		 * Bug in Xalan as shipped with J2SE 5.0:
+		 * Does not read the indent-amount property at all >:-(.
+		 */
+		try {
+			transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2"); //$NON-NLS-1$ //$NON-NLS-2$
+		} catch (IllegalArgumentException e) {
+			// no indentation today...
+		}
+		transformer.transform(source, result);
+	}
+
+	private static void throwExportError(File file, Exception e) throws CoreException {
+		throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
+				JUnitCorePlugin.getPluginId(),
+				Messages.format(ModelMessages.JUnitModel_could_not_write, BasicElementLabels.getPathLabel(file)),
+				e));
+	}
+
+	private static void throwImportError(File file, Exception e) throws CoreException {
+		throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
+				JUnitCorePlugin.getPluginId(),
+				Messages.format(ModelMessages.JUnitModel_could_not_read, BasicElementLabels.getPathLabel(file)),
+				e));
+	}
+
+	/**
+	 * Removes the given {@link TestRunSession} and notifies all registered
+	 * {@link ITestRunSessionListener}s.
+	 *
+	 * @param testRunSession the session to remove
+	 */
+	public void removeTestRunSession(TestRunSession testRunSession) {
+		boolean existed;
+		synchronized (this) {
+			existed= fTestRunSessions.remove(testRunSession);
+		}
+		if (existed) {
+			notifyTestRunSessionRemoved(testRunSession);
+		}
+		testRunSession.removeSwapFile();
+	}
+
+	private void notifyTestRunSessionRemoved(TestRunSession testRunSession) {
+		testRunSession.stopTestRun();
+		ILaunch launch= testRunSession.getLaunch();
+		if (launch != null) {
+			ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
+			launchManager.removeLaunch(launch);
+		}
+
+		Object[] listeners = fTestRunSessionListeners.getListeners();
+		for (int i = 0; i < listeners.length; ++i) {
+			((ITestRunSessionListener) listeners[i]).sessionRemoved(testRunSession);
+		}
+	}
+
+	private void notifyTestRunSessionAdded(TestRunSession testRunSession) {
+		Object[] listeners = fTestRunSessionListeners.getListeners();
+		for (int i = 0; i < listeners.length; ++i) {
+			((ITestRunSessionListener) listeners[i]).sessionAdded(testRunSession);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java
new file mode 100644
index 0000000..301a5ff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ModelMessages extends NLS {
+	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.junit.model.ModelMessages"; //$NON-NLS-1$
+	public static String JUnitModel_could_not_import;
+	public static String JUnitModel_could_not_read;
+	public static String JUnitModel_could_not_write;
+	public static String JUnitModel_importing_from_url;
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, ModelMessages.class);
+	}
+
+	private ModelMessages() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties
new file mode 100644
index 0000000..6c01aff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties
@@ -0,0 +1,14 @@
+###############################################################################
+# Copyright (c) 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+JUnitModel_could_not_import=Test run could not be imported.
+JUnitModel_could_not_write=The test run could not be written to file ''{0}''.
+JUnitModel_could_not_read=The test run could not be imported from file ''{0}''.
+JUnitModel_importing_from_url=Importing from URL...
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java
new file mode 100644
index 0000000..59e9004
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java
@@ -0,0 +1,552 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Julien Ruaux: jruaux at octo.com
+ * 	   Vincent Massol: vmassol at octo.com
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.model;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketException;
+
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
+
+import org.eclipse.jdt.internal.junit.runner.MessageIds;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+/**
+ * The client side of the RemoteTestRunner. Handles the
+ * marshaling of the different messages.
+ */
+public class RemoteTestRunnerClient {
+	public abstract class ListenerSafeRunnable implements ISafeRunnable {
+		public void handleException(Throwable exception) {
+			JUnitCorePlugin.log(exception);
+		}
+	}
+	/**
+	 * A simple state machine to process requests from the RemoteTestRunner
+	 */
+	abstract class ProcessingState {
+	    abstract ProcessingState readMessage(String message);
+	}
+
+	class DefaultProcessingState extends ProcessingState {
+	    ProcessingState readMessage(String message) {
+	        if (message.startsWith(MessageIds.TRACE_START)) {
+	        	fFailedTrace.setLength(0);
+	            return fTraceState;
+	        }
+	        if (message.startsWith(MessageIds.EXPECTED_START)) {
+	            fExpectedResult.setLength(0);
+	            return fExpectedState;
+	        }
+	        if (message.startsWith(MessageIds.ACTUAL_START)) {
+	            fActualResult.setLength(0);
+	            return fActualState;
+	        }
+	        if (message.startsWith(MessageIds.RTRACE_START)) {
+	            fFailedRerunTrace.setLength(0);
+	            return fRerunState;
+	        }
+	        String arg= message.substring(MessageIds.MSG_HEADER_LENGTH);
+	        if (message.startsWith(MessageIds.TEST_RUN_START)) {
+	            // version < 2 format: count
+	            // version >= 2 format: count+" "+version
+	            int count= 0;
+	            int v= arg.indexOf(' ');
+	            if (v == -1) {
+	                fVersion= "v1"; //$NON-NLS-1$
+	                count= Integer.parseInt(arg);
+	            } else {
+	                fVersion= arg.substring(v+1);
+	                String sc= arg.substring(0, v);
+	                count= Integer.parseInt(sc);
+	            }
+	            notifyTestRunStarted(count);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_START)) {
+	            notifyTestStarted(arg);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_END)) {
+	            notifyTestEnded(arg);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_ERROR)) {
+	            extractFailure(arg, ITestRunListener2.STATUS_ERROR);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_FAILED)) {
+	            extractFailure(arg, ITestRunListener2.STATUS_FAILURE);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_RUN_END)) {
+	            long elapsedTime = Long.parseLong(arg);
+	            testRunEnded(elapsedTime);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_STOPPED)) {
+	            long elapsedTime = Long.parseLong(arg);
+	            notifyTestRunStopped(elapsedTime);
+	            shutDown();
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_TREE)) {
+	            notifyTestTreeEntry(arg);
+	            return this;
+	        }
+	        if (message.startsWith(MessageIds.TEST_RERAN)) {
+	            if (hasTestId())
+	                scanReranMessage(arg);
+	            else
+	                scanOldReranMessage(arg);
+	            return this;
+	        }
+	        return this;
+	    }
+	}
+
+	/**
+	 * Base class for states in which messages are appended to an internal
+	 * string buffer until an end message is read.
+	 */
+	class AppendingProcessingState extends ProcessingState {
+		private final StringBuffer fBuffer;
+		private String fEndString;
+
+		AppendingProcessingState(StringBuffer buffer, String endString) {
+			this.fBuffer= buffer;
+			this.fEndString = endString;
+		}
+
+		ProcessingState readMessage(String message) {
+			if (message.startsWith(fEndString)) {
+				entireStringRead();
+				return fDefaultState;
+			}
+			fBuffer.append(message);
+			fBuffer.append('\n');
+			return this;
+		}
+
+		/**
+		 * subclasses can override to do special things when end message is read
+		 */
+		void entireStringRead() {
+		}
+	}
+
+	class TraceProcessingState extends AppendingProcessingState {
+		TraceProcessingState() {
+			super(fFailedTrace, MessageIds.TRACE_END);
+		}
+
+		void entireStringRead() {
+            notifyTestFailed();
+            fExpectedResult.setLength(0);
+            fActualResult.setLength(0);
+		}
+
+	    ProcessingState readMessage(String message) {
+	        if (message.startsWith(MessageIds.TRACE_END)) {
+	            notifyTestFailed();
+	            fFailedTrace.setLength(0);
+	            fActualResult.setLength(0);
+	            fExpectedResult.setLength(0);
+	            return fDefaultState;
+	        }
+	        fFailedTrace.append(message).append('\n');
+	        return this;
+	    }
+	}
+
+	/**
+	 * The failed trace that is currently reported from the RemoteTestRunner
+	 */
+	private final StringBuffer fFailedTrace = new StringBuffer();
+	/**
+	 * The expected test result
+	 */
+	private final StringBuffer fExpectedResult = new StringBuffer();
+	/**
+	 * The actual test result
+	 */
+	private final StringBuffer fActualResult = new StringBuffer();
+	/**
+	 * The failed trace of a reran test
+	 */
+	private final StringBuffer fFailedRerunTrace = new StringBuffer();
+
+
+	ProcessingState fDefaultState= new DefaultProcessingState();
+	ProcessingState fTraceState= new TraceProcessingState();
+	ProcessingState fExpectedState= new AppendingProcessingState(fExpectedResult, MessageIds.EXPECTED_END);
+	ProcessingState fActualState= new AppendingProcessingState(fActualResult, MessageIds.ACTUAL_END);
+	ProcessingState fRerunState= new AppendingProcessingState(fFailedRerunTrace, MessageIds.RTRACE_END);
+	ProcessingState fCurrentState= fDefaultState;
+
+	/**
+	 * An array of listeners that are informed about test events.
+	 */
+	private ITestRunListener2[] fListeners;
+
+	/**
+	 * The server socket
+	 */
+	private ServerSocket fServerSocket;
+	private Socket fSocket;
+	private int fPort= -1;
+	private PrintWriter fWriter;
+	private BufferedReader fBufferedReader;
+	/**
+	 * The protocol version
+	 */
+	private String fVersion;
+	/**
+	 * The failed test that is currently reported from the RemoteTestRunner
+	 */
+	private String fFailedTest;
+	/**
+	 * The Id of the failed test
+	 */
+	private String fFailedTestId;
+	/**
+	 * The kind of failure of the test that is currently reported as failed
+	 */
+	private int fFailureKind;
+
+	private boolean fDebug= false;
+
+	/**
+	 * Reads the message stream from the RemoteTestRunner
+	 */
+	private class ServerConnection extends Thread {
+		int fServerPort;
+
+		public ServerConnection(int port) {
+			super("ServerConnection"); //$NON-NLS-1$
+			fServerPort= port;
+		}
+
+		public void run() {
+			try {
+				if (fDebug)
+					System.out.println("Creating server socket "+fServerPort); //$NON-NLS-1$
+				fServerSocket= new ServerSocket(fServerPort);
+				fSocket= fServerSocket.accept();
+				try {
+				    fBufferedReader= new BufferedReader(new InputStreamReader(fSocket.getInputStream(), "UTF-8")); //$NON-NLS-1$
+				} catch (UnsupportedEncodingException e) {
+				    fBufferedReader= new BufferedReader(new InputStreamReader(fSocket.getInputStream()));
+				}
+				try {
+				    fWriter= new PrintWriter(new OutputStreamWriter(fSocket.getOutputStream(), "UTF-8"), true); //$NON-NLS-1$
+	            } catch (UnsupportedEncodingException e1) {
+	                fWriter= new PrintWriter(new OutputStreamWriter(fSocket.getOutputStream()), true);
+	            }
+				String message;
+				while(fBufferedReader != null && (message= readMessage(fBufferedReader)) != null)
+					receiveMessage(message);
+			} catch (SocketException e) {
+				notifyTestRunTerminated();
+			} catch (IOException e) {
+				JUnitCorePlugin.log(e);
+				// fall through
+			}
+			shutDown();
+		}
+	}
+
+	/**
+	 * Start listening to a test run. Start a server connection that
+	 * the RemoteTestRunner can connect to.
+	 *
+	 * @param listeners listeners to inform
+	 * @param port port on which the server socket will be opened
+	 */
+	public synchronized void startListening(ITestRunListener2[] listeners, int port) {
+		fListeners= listeners;
+		fPort= port;
+		ServerConnection connection= new ServerConnection(port);
+		connection.start();
+	}
+
+	/**
+	 * Requests to stop the remote test run.
+	 */
+	public synchronized void stopTest() {
+		if (isRunning()) {
+			fWriter.println(MessageIds.TEST_STOP);
+			fWriter.flush();
+		}
+	}
+
+	public synchronized void stopWaiting() {
+		if (fServerSocket != null  && ! fServerSocket.isClosed() && fSocket == null) {
+			shutDown(); // will throw a SocketException in Threads that wait in ServerSocket#accept()
+		}
+	}
+
+	private synchronized void shutDown() {
+		if (fDebug)
+			System.out.println("shutdown "+fPort); //$NON-NLS-1$
+
+		if (fWriter != null) {
+			fWriter.close();
+			fWriter= null;
+		}
+		try {
+			if (fBufferedReader != null) {
+				fBufferedReader.close();
+				fBufferedReader= null;
+			}
+		} catch(IOException e) {
+		}
+		try {
+			if (fSocket != null) {
+				fSocket.close();
+				fSocket= null;
+			}
+		} catch(IOException e) {
+		}
+		try{
+			if (fServerSocket != null) {
+				fServerSocket.close();
+				fServerSocket= null;
+			}
+		} catch(IOException e) {
+		}
+	}
+
+	public boolean isRunning() {
+		return fSocket != null;
+	}
+
+	private String readMessage(BufferedReader in) throws IOException {
+		return in.readLine();
+	}
+
+	private void receiveMessage(String message) {
+	    fCurrentState= fCurrentState.readMessage(message);
+	}
+
+	private void scanOldReranMessage(String arg) {
+		// OLD V1 format
+		// format: className" "testName" "status
+		// status: FAILURE, ERROR, OK
+		int c= arg.indexOf(" "); //$NON-NLS-1$
+		int t= arg.indexOf(" ", c+1); //$NON-NLS-1$
+		String className= arg.substring(0, c);
+		String testName= arg.substring(c+1, t);
+		String status= arg.substring(t+1);
+		String testId = className+testName;
+		notifyTestReran(testId, className, testName, status);
+	}
+
+	private void scanReranMessage(String arg) {
+		// format: testId" "className" "testName" "status
+		// status: FAILURE, ERROR, OK
+		int i= arg.indexOf(' ');
+		int c= arg.indexOf(' ', i+1);
+		int t= arg.indexOf(' ', c+1);
+		String testId= arg.substring(0, i);
+		String className= arg.substring(i+1, c);
+		String testName= arg.substring(c+1, t);
+		String status= arg.substring(t+1);
+		notifyTestReran(testId, className, testName, status);
+	}
+
+	private void notifyTestReran(String testId, String className, String testName, String status) {
+		int statusCode= ITestRunListener2.STATUS_OK;
+		if (status.equals("FAILURE")) //$NON-NLS-1$
+			statusCode= ITestRunListener2.STATUS_FAILURE;
+		else if (status.equals("ERROR")) //$NON-NLS-1$
+			statusCode= ITestRunListener2.STATUS_ERROR;
+
+		String trace= ""; //$NON-NLS-1$
+		if (statusCode != ITestRunListener2.STATUS_OK)
+			trace = fFailedRerunTrace.toString();
+		// assumption a rerun trace was sent before
+		notifyTestReran(testId, className, testName, statusCode, trace);
+	}
+
+	private void extractFailure(String arg, int status) {
+		String s[]= extractTestId(arg);
+		fFailedTestId= s[0];
+		fFailedTest= s[1];
+		fFailureKind= status;
+	}
+
+	/**
+	 * @param arg test name
+	 * @return an array with two elements. The first one is the testId, the second one the testName.
+	 */
+	String[] extractTestId(String arg) {
+		String[] result= new String[2];
+		if (!hasTestId()) {
+			result[0]= arg; // use the test name as the test Id
+			result[1]= arg;
+			return result;
+		}
+		int i= arg.indexOf(',');
+		result[0]= arg.substring(0, i);
+		result[1]= arg.substring(i+1, arg.length());
+		return result;
+	}
+
+	private boolean hasTestId() {
+		if (fVersion == null) // TODO fix me
+			return true;
+		return fVersion.equals("v2"); //$NON-NLS-1$
+	}
+
+	private void notifyTestReran(final String testId, final String className, final String testName, final int statusCode, final String trace) {
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					listener.testReran(testId,
+								className, testName, statusCode, trace,
+								fExpectedResult.toString(), fActualResult.toString());
+				}
+			});
+		}
+	}
+
+	private void notifyTestTreeEntry(final String treeEntry) {
+		for (int i= 0; i < fListeners.length; i++) {
+			ITestRunListener2 listener= fListeners[i];
+			if (!hasTestId())
+				listener.testTreeEntry(fakeTestId(treeEntry));
+			else
+				listener.testTreeEntry(treeEntry);
+		}
+	}
+
+	private String fakeTestId(String treeEntry) {
+		// extract the test name and add it as the testId
+		int index0= treeEntry.indexOf(',');
+		String testName= treeEntry.substring(0, index0).trim();
+		return testName+","+treeEntry; //$NON-NLS-1$
+	}
+
+	private void notifyTestRunStopped(final long elapsedTime) {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					listener.testRunStopped(elapsedTime);
+				}
+			});
+		}
+	}
+
+	private void testRunEnded(final long elapsedTime) {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					listener.testRunEnded(elapsedTime);
+				}
+			});
+		}
+	}
+
+	private void notifyTestEnded(final String test) {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					String s[]= extractTestId(test);
+					listener.testEnded(s[0], s[1]);
+				}
+			});
+		}
+	}
+
+	private void notifyTestStarted(final String test) {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					String s[]= extractTestId(test);
+					listener.testStarted(s[0], s[1]);
+				}
+			});
+		}
+	}
+
+	private void notifyTestRunStarted(final int count) {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					listener.testRunStarted(count);
+				}
+			});
+		}
+	}
+
+	private void notifyTestFailed() {
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+			        listener.testFailed(fFailureKind, fFailedTestId,
+			        		fFailedTest, fFailedTrace.toString(), fExpectedResult.toString(), fActualResult.toString());
+				}
+			});
+		}
+	}
+
+	private void notifyTestRunTerminated() {
+		// fix for 77771 RemoteTestRunnerClient doing work after junit shutdown [JUnit]
+		if (JUnitCorePlugin.isStopped())
+			return;
+		for (int i= 0; i < fListeners.length; i++) {
+			final ITestRunListener2 listener= fListeners[i];
+			SafeRunner.run(new ListenerSafeRunnable() {
+				public void run() {
+					listener.testRunTerminated();
+				}
+			});
+		}
+	}
+
+	public void rerunTest(String testId, String className, String testName) {
+		if (isRunning()) {
+			fActualResult.setLength(0);
+			fExpectedResult.setLength(0);
+			fWriter.println(MessageIds.TEST_RERUN+testId+" "+className+" "+testName); //$NON-NLS-1$ //$NON-NLS-2$
+			fWriter.flush();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java
new file mode 100644
index 0000000..54b8a91
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+import org.eclipse.jdt.junit.model.ITestCaseElement;
+
+import org.eclipse.core.runtime.Assert;
+
+
+public class TestCaseElement extends TestElement implements ITestCaseElement {
+
+	private boolean fIgnored;
+
+	public TestCaseElement(TestSuiteElement parent, String id, String testName) {
+		super(parent, id, testName);
+		Assert.isNotNull(parent);
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * @see org.eclipse.jdt.junit.model.ITestCaseElement#getTestMethodName()
+	 * @see org.eclipse.jdt.internal.junit.runner.MessageIds#TEST_IDENTIFIER_MESSAGE_FORMAT
+	 * @see org.eclipse.jdt.internal.junit.runner.MessageIds#IGNORED_TEST_PREFIX
+	 */
+	public String getTestMethodName() {
+		String testName= getTestName();
+		int index= testName.indexOf('(');
+		if (index > 0)
+			return testName.substring(0, index);
+		index= testName.indexOf('@');
+		if (index > 0)
+			return testName.substring(0, index);
+		return testName;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 * @see org.eclipse.jdt.junit.model.ITestCaseElement#getTestClassName()
+	 */
+	public String getTestClassName() {
+		return getClassName();
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.junit.model.TestElement#getTestResult(boolean)
+	 * @since 3.6
+	 */
+	public Result getTestResult(boolean includeChildren) {
+		if (fIgnored)
+			return Result.IGNORED;
+		else
+			return super.getTestResult(includeChildren);
+	}
+	
+	public void setIgnored(boolean ignored) {
+		fIgnored= ignored;
+	}
+
+	public boolean isIgnored() {
+		return fIgnored;
+	}
+
+	public String toString() {
+		return "TestCase: " + getTestClassName() + "." + getTestMethodName() + " : " + super.toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestElement.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestElement.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestElement.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRoot.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRoot.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRoot.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRoot.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java
new file mode 100644
index 0000000..d0f5831
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java
@@ -0,0 +1,269 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au)
+ *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
+ *     Neale Upstone <neale at nealeupstone.com> - [JUnit] JUnit viewer doesn't recognise <skipped/> node - https://bugs.eclipse.org/bugs/show_bug.cgi?id=276068
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+import java.util.Stack;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jdt.core.IJavaModel;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.junit.model.TestElement.Status;
+
+public class TestRunHandler extends DefaultHandler {
+
+	/*
+	 * TODO: validate (currently assumes correct XML)
+	 */
+
+	private int fId;
+
+	private TestRunSession fTestRunSession;
+	private TestSuiteElement fTestSuite;
+	private TestCaseElement fTestCase;
+	private Stack/*<Boolean>*/ fNotRun= new Stack();
+
+	private StringBuffer fFailureBuffer;
+	private boolean fInExpected;
+	private boolean fInActual;
+	private StringBuffer fExpectedBuffer;
+	private StringBuffer fActualBuffer;
+
+	private Locator fLocator;
+
+	private Status fStatus;
+
+	public TestRunHandler() {
+
+	}
+
+	public TestRunHandler(TestRunSession testRunSession) {
+		fTestRunSession= testRunSession;
+	}
+
+	public void setDocumentLocator(Locator locator) {
+		fLocator= locator;
+	}
+
+	public void startDocument() throws SAXException {
+	}
+
+	public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+		if (qName.equals(IXMLTags.NODE_TESTRUN)) {
+			if (fTestRunSession == null) {
+				String name= attributes.getValue(IXMLTags.ATTR_NAME);
+				String project= attributes.getValue(IXMLTags.ATTR_PROJECT);
+				IJavaProject javaProject= null;
+				if (project != null) {
+					IJavaModel javaModel= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
+					javaProject= javaModel.getJavaProject(project);
+					if (! javaProject.exists())
+						javaProject= null;
+				}
+				fTestRunSession= new TestRunSession(name, javaProject);
+				//TODO: read counts?
+
+			} else {
+				fTestRunSession.reset();
+			}
+			fTestSuite= fTestRunSession.getTestRoot();
+
+		} else if (qName.equals(IXMLTags.NODE_TESTSUITES)) {
+			// support Ant's 'junitreport' task; create suite from NODE_TESTSUITE
+
+		} else if (qName.equals(IXMLTags.NODE_TESTSUITE)) {
+			String name= attributes.getValue(IXMLTags.ATTR_NAME);
+
+			if (fTestRunSession == null) {
+				// support standalone suites and Ant's 'junitreport' task:
+				fTestRunSession= new TestRunSession(name, null);
+				fTestSuite= fTestRunSession.getTestRoot();
+			}
+
+			String pack= attributes.getValue(IXMLTags.ATTR_PACKAGE);
+			String suiteName= pack == null ? name : pack + "." + name; //$NON-NLS-1$
+			fTestSuite= (TestSuiteElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), suiteName, true, 0);
+			readTime(fTestSuite, attributes);
+			fNotRun.push(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_INCOMPLETE)));
+
+		} else if (qName.equals(IXMLTags.NODE_PROPERTIES) || qName.equals(IXMLTags.NODE_PROPERTY)) {
+			// not interested
+
+		} else if (qName.equals(IXMLTags.NODE_TESTCASE)) {
+			String name= attributes.getValue(IXMLTags.ATTR_NAME);
+			String classname= attributes.getValue(IXMLTags.ATTR_CLASSNAME);
+			fTestCase= (TestCaseElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), name + '(' + classname + ')', false, 0);
+			fNotRun.push(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_INCOMPLETE)));
+			fTestCase.setIgnored(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_IGNORED)).booleanValue());
+			readTime(fTestCase, attributes);
+
+		} else if (qName.equals(IXMLTags.NODE_ERROR)) {
+			//TODO: multiple failures: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125296
+			fStatus= Status.ERROR;
+			fFailureBuffer= new StringBuffer();
+
+		} else if (qName.equals(IXMLTags.NODE_FAILURE)) {
+			//TODO: multiple failures: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125296
+			fStatus= Status.FAILURE;
+			fFailureBuffer= new StringBuffer();
+
+		} else if (qName.equals(IXMLTags.NODE_EXPECTED)) {
+			fInExpected= true;
+			fExpectedBuffer= new StringBuffer();
+
+		} else if (qName.equals(IXMLTags.NODE_ACTUAL)) {
+			fInActual= true;
+			fActualBuffer= new StringBuffer();
+
+		} else if (qName.equals(IXMLTags.NODE_SYSTEM_OUT) || qName.equals(IXMLTags.NODE_SYSTEM_ERR)) {
+			// not interested
+
+		} else if (qName.equals(IXMLTags.NODE_SKIPPED)) {
+			// not an Ant JUnit tag, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276068
+			fTestCase.setIgnored(true);
+
+		} else {
+			throw new SAXParseException("unknown node '" + qName + "'", fLocator);  //$NON-NLS-1$//$NON-NLS-2$
+		}
+	}
+
+	private void readTime(TestElement testElement, Attributes attributes) {
+		String timeString= attributes.getValue(IXMLTags.ATTR_TIME);
+		if (timeString != null) {
+			try {
+				testElement.setElapsedTimeInSeconds(Double.parseDouble(timeString));
+			} catch (NumberFormatException e) {
+			}
+		}
+	}
+
+	public void characters(char[] ch, int start, int length) throws SAXException {
+		if (fInExpected) {
+			fExpectedBuffer.append(ch, start, length);
+
+		} else if (fInActual) {
+			fActualBuffer.append(ch, start, length);
+
+		} else if (fFailureBuffer != null) {
+			fFailureBuffer.append(ch, start, length);
+		}
+	}
+
+	public void endElement(String uri, String localName, String qName) throws SAXException {
+		if (qName.equals(IXMLTags.NODE_TESTRUN)) {
+			// OK
+
+		} else if (qName.equals(IXMLTags.NODE_TESTSUITES)) {
+			// OK
+
+		} else if (qName.equals(IXMLTags.NODE_TESTSUITE)) {
+			handleTestElementEnd(fTestSuite);
+			fTestSuite= fTestSuite.getParent();
+			//TODO: end suite: compare counters?
+
+		} else if (qName.equals(IXMLTags.NODE_PROPERTIES) || qName.equals(IXMLTags.NODE_PROPERTY)) {
+			// OK
+
+		} else if (qName.equals(IXMLTags.NODE_TESTCASE)) {
+			handleTestElementEnd(fTestCase);
+			fTestCase= null;
+
+		} else if (qName.equals(IXMLTags.NODE_FAILURE) || qName.equals(IXMLTags.NODE_ERROR)) {
+			TestElement testElement= fTestCase;
+			if (testElement == null)
+				testElement= fTestSuite;
+			handleFailure(testElement);
+
+		} else if (qName.equals(IXMLTags.NODE_EXPECTED)) {
+			fInExpected= false;
+			if (fFailureBuffer != null) {
+				// skip whitespace from before <expected> and <actual> nodes
+				fFailureBuffer.setLength(0);
+			}
+
+		} else if (qName.equals(IXMLTags.NODE_ACTUAL)) {
+			fInActual= false;
+			if (fFailureBuffer != null) {
+				// skip whitespace from before <expected> and <actual> nodes
+				fFailureBuffer.setLength(0);
+			}
+
+		} else if (qName.equals(IXMLTags.NODE_SYSTEM_OUT) || qName.equals(IXMLTags.NODE_SYSTEM_ERR)) {
+			// OK
+
+		} else if (qName.equals(IXMLTags.NODE_SKIPPED)) {
+			// OK
+
+		} else {
+
+			handleUnknownNode(qName);
+		}
+	}
+
+	private void handleTestElementEnd(TestElement testElement) {
+		boolean completed= fNotRun.pop() != Boolean.TRUE;
+		fTestRunSession.registerTestEnded(testElement, completed);
+	}
+
+	private void handleFailure(TestElement testElement) {
+		if (fFailureBuffer != null) {
+			fTestRunSession.registerTestFailureStatus(testElement, fStatus, fFailureBuffer.toString(), toString(fExpectedBuffer), toString(fActualBuffer));
+			fFailureBuffer= null;
+			fExpectedBuffer= null;
+			fActualBuffer= null;
+			fStatus= null;
+		}
+	}
+
+	private String toString(StringBuffer buffer) {
+		return buffer != null ? buffer.toString() : null;
+	}
+
+	private void handleUnknownNode(String qName) throws SAXException {
+		//TODO: just log if debug option is enabled?
+		String msg= "unknown node '" + qName + "'"; //$NON-NLS-1$//$NON-NLS-2$
+		if (fLocator != null) {
+			msg += " at line " + fLocator.getLineNumber() + ", column " + fLocator.getColumnNumber();  //$NON-NLS-1$//$NON-NLS-2$
+		}
+		throw new SAXException(msg);
+	}
+
+	public void error(SAXParseException e) throws SAXException {
+		throw e;
+	}
+
+	public void warning(SAXParseException e) throws SAXException {
+		throw e;
+	}
+
+	private String getNextId() {
+		return Integer.toString(fId++);
+	}
+
+	/**
+	 * @return the parsed test run session, or <code>null</code>
+	 */
+	public TestRunSession getTestRunSession() {
+		return fTestRunSession;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java
new file mode 100644
index 0000000..34f9ed8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.model;
+
+import org.eclipse.jdt.junit.TestRunListener;
+import org.eclipse.jdt.junit.model.ITestCaseElement;
+
+import org.eclipse.jdt.internal.junit.model.TestElement.Status;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+
+/**
+ * Notifier for the callback listener API {@link TestRunListener}.
+ */
+public class TestRunListenerAdapter implements ITestSessionListener {
+
+	private final TestRunSession fSession;
+
+	public TestRunListenerAdapter(TestRunSession session) {
+		fSession= session;
+	}
+
+	private Object[] getListeners() {
+		return JUnitCorePlugin.getDefault().getNewTestRunListeners().getListeners();
+	}
+
+	private void fireSessionStarted() {
+		Object[] listeners= getListeners();
+		for (int i= 0; i < listeners.length; i++) {
+			((TestRunListener) listeners[i]).sessionStarted(fSession);
+		}
+	}
+
+	private void fireSessionFinished() {
+		Object[] listeners= getListeners();
+		for (int i= 0; i < listeners.length; i++) {
+			((TestRunListener) listeners[i]).sessionFinished(fSession);
+		}
+	}
+
+	private void fireTestCaseStarted(ITestCaseElement testCaseElement) {
+		Object[] listeners= getListeners();
+		for (int i= 0; i < listeners.length; i++) {
+			((TestRunListener) listeners[i]).testCaseStarted(testCaseElement);
+		}
+	}
+
+	private void fireTestCaseFinished(ITestCaseElement testCaseElement) {
+		Object[] listeners= getListeners();
+		for (int i= 0; i < listeners.length; i++) {
+			((TestRunListener) listeners[i]).testCaseFinished(testCaseElement);
+		}
+	}
+
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionStarted()
+	 */
+	public void sessionStarted() {
+		// wait until all test are added
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionEnded(long)
+	 */
+	public void sessionEnded(long elapsedTime) {
+		fireSessionFinished();
+		fSession.swapOut();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionStopped(long)
+	 */
+	public void sessionStopped(long elapsedTime) {
+		fireSessionFinished();
+		fSession.swapOut();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionTerminated()
+	 */
+	public void sessionTerminated() {
+		fSession.swapOut();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testAdded(org.eclipse.jdt.internal.junit.model.TestElement)
+	 */
+	public void testAdded(TestElement testElement) {
+		// do nothing
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#runningBegins()
+	 */
+	public void runningBegins() {
+		fireSessionStarted();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testStarted(org.eclipse.jdt.internal.junit.model.TestCaseElement)
+	 */
+	public void testStarted(TestCaseElement testCaseElement) {
+		fireTestCaseStarted(testCaseElement);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testEnded(org.eclipse.jdt.internal.junit.model.TestCaseElement)
+	 */
+	public void testEnded(TestCaseElement testCaseElement) {
+		fireTestCaseFinished(testCaseElement);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testFailed(org.eclipse.jdt.internal.junit.model.TestElement, org.eclipse.jdt.internal.junit.model.TestElement.Status, java.lang.String, java.lang.String, java.lang.String)
+	 */
+	public void testFailed(TestElement testElement, Status status, String trace, String expected, String actual) {
+		// ignore
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testReran(org.eclipse.jdt.internal.junit.model.TestCaseElement, org.eclipse.jdt.internal.junit.model.TestElement.Status, java.lang.String, java.lang.String, java.lang.String)
+	 */
+	public void testReran(TestCaseElement testCaseElement, Status status, String trace, String expectedResult, String actualResult) {
+		// ignore
+	}
+
+	public boolean acceptsSwapToDisk() {
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java
new file mode 100644
index 0000000..d469250
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java
@@ -0,0 +1,826 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.model;
+
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.jdt.junit.model.ITestElement;
+import org.eclipse.jdt.junit.model.ITestElementContainer;
+import org.eclipse.jdt.junit.model.ITestRunSession;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ListenerList;
+
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.ILaunchesListener2;
+
+import org.eclipse.jdt.core.IJavaProject;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitMessages;
+import org.eclipse.jdt.internal.junit.Messages;
+import org.eclipse.jdt.internal.junit.launcher.ITestKind;
+import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
+import org.eclipse.jdt.internal.junit.model.TestElement.Status;
+import org.eclipse.jdt.internal.junit.runner.MessageIds;
+
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+
+
+/**
+ * A test run session holds all information about a test run, i.e.
+ * launch configuration, launch, test tree (including results).
+ */
+public class TestRunSession implements ITestRunSession {
+
+	/**
+	 * The launch, or <code>null</code> iff this session was run externally.
+	 */
+	private final ILaunch fLaunch;
+	private final String fTestRunName;
+	/**
+	 * Java project, or <code>null</code>.
+	 */
+	private final IJavaProject fProject;
+
+	private final ITestKind fTestRunnerKind;
+
+	/**
+	 * Test runner client or <code>null</code>.
+	 */
+	private RemoteTestRunnerClient fTestRunnerClient;
+
+	private final ListenerList/*<ITestSessionListener>*/ fSessionListeners;
+
+	/**
+	 * The model root, or <code>null</code> if swapped to disk.
+	 */
+	private TestRoot fTestRoot;
+
+	/**
+	 * The test run session's cached result, or <code>null</code> if <code>fTestRoot != null</code>.
+	 */
+	private Result fTestResult;
+
+	/**
+	 * Map from testId to testElement.
+	 */
+	private HashMap/*<String, TestElement>*/ fIdToTest;
+
+	/**
+	 * The TestSuites for which additional children are expected.
+	 */
+	private List/*<IncompleteTestSuite>*/ fIncompleteTestSuites;
+
+	/**
+	 * Suite for unrooted test case elements, or <code>null</code>.
+	 */
+	private TestSuiteElement fUnrootedSuite;
+
+ 	/**
+ 	 * Number of tests started during this test run.
+ 	 */
+	volatile int fStartedCount;
+	/**
+	 * Number of tests ignored during this test run.
+	 */
+	volatile int fIgnoredCount;
+	/**
+	 * Number of errors during this test run.
+	 */
+	volatile int fErrorCount;
+	/**
+	 * Number of failures during this test run.
+	 */
+	volatile int fFailureCount;
+	/**
+	 * Total number of tests to run.
+	 */
+	volatile int fTotalCount;
+	/**
+	 * <ul>
+	 * <li>If > 0: Start time in millis</li>
+	 * <li>If < 0: Unique identifier for imported test run</li>
+	 * <li>If = 0: Session not started yet</li>
+	 * </ul>
+	 */
+	volatile long fStartTime;
+	volatile boolean fIsRunning;
+
+	volatile boolean fIsStopped;
+
+
+	/**
+	 * Creates a test run session.
+	 *
+	 * @param testRunName name of the test run
+	 * @param project may be <code>null</code>
+	 */
+	public TestRunSession(String testRunName, IJavaProject project) {
+		//TODO: check assumptions about non-null fields
+
+		fLaunch= null;
+		fProject= project;
+		fStartTime= -System.currentTimeMillis();
+
+		Assert.isNotNull(testRunName);
+		fTestRunName= testRunName;
+		fTestRunnerKind= ITestKind.NULL; //TODO
+
+		fTestRoot= new TestRoot(this);
+		fIdToTest= new HashMap();
+
+		fTestRunnerClient= null;
+
+		fSessionListeners= new ListenerList();
+	}
+
+
+	public TestRunSession(ILaunch launch, IJavaProject project, int port) {
+		Assert.isNotNull(launch);
+
+		fLaunch= launch;
+		fProject= project;
+
+		ILaunchConfiguration launchConfiguration= launch.getLaunchConfiguration();
+		if (launchConfiguration != null) {
+			fTestRunName= launchConfiguration.getName();
+			fTestRunnerKind= JUnitLaunchConfigurationConstants.getTestRunnerKind(launchConfiguration);
+		} else {
+			fTestRunName= project.getElementName();
+			fTestRunnerKind= ITestKind.NULL;
+		}
+
+		fTestRoot= new TestRoot(this);
+		fIdToTest= new HashMap();
+
+		fTestRunnerClient= new RemoteTestRunnerClient();
+		fTestRunnerClient.startListening(new ITestRunListener2[] { new TestSessionNotifier() }, port);
+
+		final ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
+		launchManager.addLaunchListener(new ILaunchesListener2() {
+			public void launchesTerminated(ILaunch[] launches) {
+				if (Arrays.asList(launches).contains(fLaunch)) {
+					if (fTestRunnerClient != null) {
+						fTestRunnerClient.stopWaiting();
+					}
+					launchManager.removeLaunchListener(this);
+				}
+			}
+			public void launchesRemoved(ILaunch[] launches) {
+				if (Arrays.asList(launches).contains(fLaunch)) {
+					if (fTestRunnerClient != null) {
+						fTestRunnerClient.stopWaiting();
+					}
+					launchManager.removeLaunchListener(this);
+				}
+			}
+			public void launchesChanged(ILaunch[] launches) {
+			}
+			public void launchesAdded(ILaunch[] launches) {
+			}
+		});
+
+		fSessionListeners= new ListenerList();
+		addTestSessionListener(new TestRunListenerAdapter(this));
+	}
+
+	void reset() {
+		fStartedCount= 0;
+		fFailureCount= 0;
+		fErrorCount= 0;
+		fIgnoredCount= 0;
+		fTotalCount= 0;
+
+		fTestRoot= new TestRoot(this);
+		fTestResult= null;
+		fIdToTest= new HashMap();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.ITestRunSession#getProgressState()
+	 */
+	public ProgressState getProgressState() {
+		if (isRunning()) {
+			return ProgressState.RUNNING;
+		}
+		if (isStopped()) {
+			return ProgressState.STOPPED;
+		}
+		return ProgressState.COMPLETED;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElement#getTestResult(boolean)
+	 */
+	public Result getTestResult(boolean includeChildren) {
+		if (fTestRoot != null) {
+			return fTestRoot.getTestResult(true);
+		} else {
+			return fTestResult;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElementContainer#getChildren()
+	 */
+	public ITestElement[] getChildren() {
+		return getTestRoot().getChildren();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElement#getFailureTrace()
+	 */
+	public FailureTrace getFailureTrace() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElement#getParentContainer()
+	 */
+	public ITestElementContainer getParentContainer() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElement#getTestRunSession()
+	 */
+	public ITestRunSession getTestRunSession() {
+		return this;
+	}
+
+
+	public synchronized TestRoot getTestRoot() {
+		swapIn(); //TODO: TestRoot should stay (e.g. for getTestRoot().getStatus())
+		return fTestRoot;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.junit.model.ITestRunSession#getJavaProject()
+	 */
+	public IJavaProject getLaunchedProject() {
+		return fProject;
+	}
+
+	public ITestKind getTestRunnerKind() {
+		return fTestRunnerKind;
+	}
+
+
+	/**
+	 * @return the launch, or <code>null</code> iff this session was run externally
+	 */
+	public ILaunch getLaunch() {
+		return fLaunch;
+	}
+
+	public String getTestRunName() {
+		return fTestRunName;
+	}
+
+	public int getErrorCount() {
+		return fErrorCount;
+	}
+
+	public int getFailureCount() {
+		return fFailureCount;
+	}
+
+	public int getStartedCount() {
+		return fStartedCount;
+	}
+
+	public int getIgnoredCount() {
+		return fIgnoredCount;
+	}
+
+	public int getTotalCount() {
+		return fTotalCount;
+	}
+
+	public long getStartTime() {
+		return fStartTime;
+	}
+
+	/**
+	 * @return <code>true</code> iff the session has been stopped or terminated
+	 */
+	public boolean isStopped() {
+		return fIsStopped;
+	}
+
+	public synchronized void addTestSessionListener(ITestSessionListener listener) {
+		swapIn();
+		fSessionListeners.add(listener);
+	}
+
+	public void removeTestSessionListener(ITestSessionListener listener) {
+		fSessionListeners.remove(listener);
+	}
+
+	public synchronized void swapOut() {
+		if (fTestRoot == null)
+			return;
+		if (isRunning() || isStarting() || isKeptAlive())
+			return;
+
+		Object[] listeners= fSessionListeners.getListeners();
+		for (int i= 0; i < listeners.length; ++i) {
+			ITestSessionListener registered= (ITestSessionListener) listeners[i];
+			if (! registered.acceptsSwapToDisk())
+				return;
+		}
+
+		try {
+			File swapFile= getSwapFile();
+
+			JUnitModel.exportTestRunSession(this, swapFile);
+			fTestResult= fTestRoot.getTestResult(true);
+			fTestRoot= null;
+			fTestRunnerClient= null;
+			fIdToTest= new HashMap();
+			fIncompleteTestSuites= null;
+			fUnrootedSuite= null;
+
+		} catch (IllegalStateException e) {
+			JUnitCorePlugin.log(e);
+		} catch (CoreException e) {
+			JUnitCorePlugin.log(e);
+		}
+	}
+
+	public boolean isStarting() {
+		return getStartTime() == 0 && fLaunch != null && ! fLaunch.isTerminated();
+	}
+
+
+	public void removeSwapFile() {
+		File swapFile= getSwapFile();
+		if (swapFile.exists())
+			swapFile.delete();
+	}
+
+	private File getSwapFile() throws IllegalStateException {
+		File historyDir= JUnitCorePlugin.getHistoryDirectory();
+		String isoTime= new SimpleDateFormat("yyyyMMdd-HHmmss.SSS").format(new Date(getStartTime())); //$NON-NLS-1$
+		String swapFileName= isoTime + ".xml"; //$NON-NLS-1$
+		return new File(historyDir, swapFileName);
+	}
+
+
+	public synchronized void swapIn() {
+		if (fTestRoot != null)
+			return;
+
+		try {
+			JUnitModel.importIntoTestRunSession(getSwapFile(), this);
+		} catch (IllegalStateException e) {
+			JUnitCorePlugin.log(e);
+			fTestRoot= new TestRoot(this);
+			fTestResult= null;
+		} catch (CoreException e) {
+			JUnitCorePlugin.log(e);
+			fTestRoot= new TestRoot(this);
+			fTestResult= null;
+		}
+	}
+
+	public void stopTestRun() {
+		if (isRunning() || ! isKeptAlive())
+			fIsStopped= true;
+		if (fTestRunnerClient != null)
+			fTestRunnerClient.stopTest();
+	}
+
+	/**
+	 * @return <code>true</code> iff the runtime VM of this test session is still alive
+	 */
+	public boolean isKeptAlive() {
+		if (fTestRunnerClient != null
+				&& fLaunch != null
+				&& fTestRunnerClient.isRunning()
+				&& ILaunchManager.DEBUG_MODE.equals(fLaunch.getLaunchMode())) {
+			ILaunchConfiguration config= fLaunch.getLaunchConfiguration();
+			try {
+				return config != null
+				&& config.getAttribute(JUnitLaunchConfigurationConstants.ATTR_KEEPRUNNING, false);
+			} catch (CoreException e) {
+				return false;
+			}
+
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * @return <code>true</code> iff this session has been started, but not ended nor stopped nor terminated
+	 */
+	public boolean isRunning() {
+		return fIsRunning;
+	}
+
+	/**
+	 * Reruns the given test method.
+	 *
+	 * @param testId test id
+	 * @param className test class name
+	 * @param testName test method name
+	 * @param launchMode launch mode, see {@link ILaunchManager}
+	 * @param buildBeforeLaunch whether a build should be done before launch 
+	 * @return <code>false</code> iff the rerun could not be started
+	 * @throws CoreException if the launch fails
+	 */
+	public boolean rerunTest(String testId, String className, String testName, String launchMode, boolean buildBeforeLaunch) throws CoreException {
+		if (isKeptAlive()) {
+			Status status= ((TestCaseElement) getTestElement(testId)).getStatus();
+			if (status == Status.ERROR) {
+				fErrorCount--;
+			} else if (status == Status.FAILURE) {
+				fFailureCount--;
+			}
+			fTestRunnerClient.rerunTest(testId, className, testName);
+			return true;
+
+		} else if (fLaunch != null) {
+			// run the selected test using the previous launch configuration
+			ILaunchConfiguration launchConfiguration= fLaunch.getLaunchConfiguration();
+			if (launchConfiguration != null) {
+
+				String name= className;
+				if (testName != null)
+					name+= "."+testName; //$NON-NLS-1$
+				String configName= Messages.format(JUnitMessages.TestRunnerViewPart_configName, name);
+				ILaunchConfigurationWorkingCopy tmp= launchConfiguration.copy(configName);
+				// fix for bug: 64838  junit view run single test does not use correct class [JUnit]
+				tmp.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, className);
+				// reset the container
+				tmp.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER, ""); //$NON-NLS-1$
+				if (testName != null) {
+					tmp.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, testName);
+					//	String args= "-rerun "+testId;
+					//	tmp.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
+				}
+				tmp.launch(launchMode, null, buildBeforeLaunch);
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	public TestElement getTestElement(String id) {
+		return (TestElement) fIdToTest.get(id);
+	}
+
+	private TestElement addTreeEntry(String treeEntry) {
+		// format: testId","testName","isSuite","testcount
+		int index0= treeEntry.indexOf(',');
+		String id= treeEntry.substring(0, index0);
+
+		StringBuffer testNameBuffer= new StringBuffer(100);
+		int index1= scanTestName(treeEntry, index0 + 1, testNameBuffer);
+		String testName= testNameBuffer.toString().trim();
+
+		int index2= treeEntry.indexOf(',', index1 + 1);
+		boolean isSuite= treeEntry.substring(index1 + 1, index2).equals("true"); //$NON-NLS-1$
+
+		int testCount= Integer.parseInt(treeEntry.substring(index2 + 1));
+
+		if (fIncompleteTestSuites.isEmpty()) {
+			return createTestElement(fTestRoot, id, testName, isSuite, testCount);
+		} else {
+			int suiteIndex= fIncompleteTestSuites.size() - 1;
+			IncompleteTestSuite openSuite= (IncompleteTestSuite) fIncompleteTestSuites.get(suiteIndex);
+			openSuite.fOutstandingChildren--;
+			if (openSuite.fOutstandingChildren <= 0)
+				fIncompleteTestSuites.remove(suiteIndex);
+			return createTestElement(openSuite.fTestSuiteElement, id, testName, isSuite, testCount);
+		}
+	}
+
+	public TestElement createTestElement(TestSuiteElement parent, String id, String testName, boolean isSuite, int testCount) {
+		TestElement testElement;
+		if (isSuite) {
+			TestSuiteElement testSuiteElement= new TestSuiteElement(parent, id, testName, testCount);
+			testElement= testSuiteElement;
+			if (testCount > 0)
+				fIncompleteTestSuites.add(new IncompleteTestSuite(testSuiteElement, testCount));
+		} else {
+			testElement= new TestCaseElement(parent, id, testName);
+		}
+		fIdToTest.put(id, testElement);
+		return testElement;
+	}
+
+	/**
+	 * Append the test name from <code>s</code> to <code>testName</code>.
+	 *
+	 * @param s the string to scan
+	 * @param start the offset of the first character in <code>s</code>
+	 * @param testName the result
+	 *
+	 * @return the index of the next ','
+	 */
+	private int scanTestName(String s, int start, StringBuffer testName) {
+		boolean inQuote= false;
+		int i= start;
+		for (; i < s.length(); i++) {
+			char c= s.charAt(i);
+			if (c == '\\' && !inQuote) {
+				inQuote= true;
+				continue;
+			} else if (inQuote) {
+				inQuote= false;
+				testName.append(c);
+			} else if (c == ',')
+				break;
+			else
+				testName.append(c);
+		}
+		return i;
+	}
+
+	/**
+	 * An {@link ITestRunListener2} that listens to events from the
+	 * {@link RemoteTestRunnerClient} and translates them into high-level model
+	 * events (broadcasted to {@link ITestSessionListener}s).
+	 */
+	private class TestSessionNotifier implements ITestRunListener2 {
+
+		public void testRunStarted(int testCount) {
+			fIncompleteTestSuites= new ArrayList();
+
+			fStartedCount= 0;
+			fIgnoredCount= 0;
+			fFailureCount= 0;
+			fErrorCount= 0;
+			fTotalCount= testCount;
+
+			fStartTime= System.currentTimeMillis();
+			fIsRunning= true;
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).sessionStarted();
+			}
+		}
+
+		public void testRunEnded(long elapsedTime) {
+			fIsRunning= false;
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).sessionEnded(elapsedTime);
+			}
+		}
+
+		public void testRunStopped(long elapsedTime) {
+			fIsRunning= false;
+			fIsStopped= true;
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).sessionStopped(elapsedTime);
+			}
+		}
+
+		public void testRunTerminated() {
+			fIsRunning= false;
+			fIsStopped= true;
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).sessionTerminated();
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testTreeEntry(java.lang.String)
+		 */
+		public void testTreeEntry(String description) {
+			TestElement testElement= addTreeEntry(description);
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).testAdded(testElement);
+			}
+		}
+
+		private TestElement createUnrootedTestElement(String testId, String testName) {
+			TestSuiteElement unrootedSuite= getUnrootedSuite();
+			TestElement testElement= createTestElement(unrootedSuite, testId, testName, false, 1);
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).testAdded(testElement);
+			}
+
+			return testElement;
+		}
+
+		private TestSuiteElement getUnrootedSuite() {
+			if (fUnrootedSuite == null) {
+				fUnrootedSuite= (TestSuiteElement) createTestElement(fTestRoot, "-2", JUnitMessages.TestRunSession_unrootedTests, true, 0);  //$NON-NLS-1$
+			}
+			return fUnrootedSuite;
+		}
+
+		public void testStarted(String testId, String testName) {
+			if (fStartedCount == 0) {
+				Object[] listeners= fSessionListeners.getListeners();
+				for (int i= 0; i < listeners.length; ++i) {
+					((ITestSessionListener) listeners[i]).runningBegins();
+				}
+			}
+			TestElement testElement= getTestElement(testId);
+			if (testElement == null) {
+				testElement= createUnrootedTestElement(testId, testName);
+			} else if (! (testElement instanceof TestCaseElement)) {
+				logUnexpectedTest(testId, testElement);
+				return;
+			}
+			TestCaseElement testCaseElement= (TestCaseElement) testElement;
+			setStatus(testCaseElement, Status.RUNNING);
+
+			fStartedCount++;
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).testStarted(testCaseElement);
+			}
+		}
+
+		public void testEnded(String testId, String testName) {
+			TestElement testElement= getTestElement(testId);
+			if (testElement == null) {
+				testElement= createUnrootedTestElement(testId, testName);
+			} else if (! (testElement instanceof TestCaseElement)) {
+				logUnexpectedTest(testId, testElement);
+				return;
+			}
+			TestCaseElement testCaseElement= (TestCaseElement) testElement;
+			if (testName.startsWith(MessageIds.IGNORED_TEST_PREFIX)) {
+				testCaseElement.setIgnored(true);
+				fIgnoredCount++;
+			}
+
+			if (testCaseElement.getStatus() == Status.RUNNING)
+				setStatus(testCaseElement, Status.OK);
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).testEnded(testCaseElement);
+			}
+		}
+
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testFailed(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+		 */
+		public void testFailed(int statusCode, String testId, String testName, String trace, String expected, String actual) {
+			TestElement testElement= getTestElement(testId);
+			if (testElement == null) {
+				testElement= createUnrootedTestElement(testId, testName);
+			}
+
+			Status status= Status.convert(statusCode);
+			registerTestFailureStatus(testElement, status, trace, nullifyEmpty(expected), nullifyEmpty(actual));
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				((ITestSessionListener) listeners[i]).testFailed(testElement, status, trace, expected, actual);
+			}
+		}
+
+		private String nullifyEmpty(String string) {
+			int length= string.length();
+			if (length == 0)
+				return null;
+			else if (string.charAt(length - 1) == '\n')
+				return string.substring(0, length - 1);
+			else
+				return string;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testReran(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)
+		 */
+		public void testReran(String testId, String className, String testName, int statusCode, String trace, String expectedResult, String actualResult) {
+			TestElement testElement= getTestElement(testId);
+			if (testElement == null) {
+				testElement= createUnrootedTestElement(testId, testName);
+			} else if (! (testElement instanceof TestCaseElement)) {
+				logUnexpectedTest(testId, testElement);
+				return;
+			}
+			TestCaseElement testCaseElement= (TestCaseElement) testElement;
+
+			Status status= Status.convert(statusCode);
+			registerTestFailureStatus(testElement, status, trace, nullifyEmpty(expectedResult), nullifyEmpty(actualResult));
+
+			Object[] listeners= fSessionListeners.getListeners();
+			for (int i= 0; i < listeners.length; ++i) {
+				//TODO: post old & new status?
+				((ITestSessionListener) listeners[i]).testReran(testCaseElement, status, trace, expectedResult, actualResult);
+			}
+		}
+
+		private void logUnexpectedTest(String testId, TestElement testElement) {
+			JUnitCorePlugin.log(new Exception("Unexpected TestElement type for testId '" + testId + "': " + testElement)); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	private static class IncompleteTestSuite {
+		public TestSuiteElement fTestSuiteElement;
+		public int fOutstandingChildren;
+
+		public IncompleteTestSuite(TestSuiteElement testSuiteElement, int outstandingChildren) {
+			fTestSuiteElement= testSuiteElement;
+			fOutstandingChildren= outstandingChildren;
+		}
+	}
+
+	public void registerTestFailureStatus(TestElement testElement, Status status, String trace, String expected, String actual) {
+		testElement.setStatus(status, trace, expected, actual);
+		if (status.isError()) {
+			fErrorCount++;
+		} else if (status.isFailure()) {
+			fFailureCount++;
+		}
+	}
+
+	public void registerTestEnded(TestElement testElement, boolean completed) {
+		if (testElement instanceof TestCaseElement) {
+			fTotalCount++;
+			if (! completed) {
+				return;
+			}
+			fStartedCount++;
+			if (((TestCaseElement) testElement).isIgnored()) {
+				fIgnoredCount++;
+			}
+			if (! testElement.getStatus().isErrorOrFailure())
+				setStatus(testElement, Status.OK);
+		}
+	}
+
+	private void setStatus(TestElement testElement, Status status) {
+		testElement.setStatus(status);
+	}
+
+	public TestElement[] getAllFailedTestElements() {
+		ArrayList failures= new ArrayList();
+		addFailures(failures, getTestRoot());
+		return (TestElement[]) failures.toArray(new TestElement[failures.size()]);
+	}
+
+	private void addFailures(ArrayList failures, ITestElement testElement) {
+		Result testResult= testElement.getTestResult(true);
+		if (testResult == Result.ERROR || testResult == Result.FAILURE) {
+			failures.add(testElement);
+		}
+		if (testElement instanceof TestSuiteElement) {
+			TestSuiteElement testSuiteElement= (TestSuiteElement) testElement;
+			ITestElement[] children= testSuiteElement.getChildren();
+			for (int i= 0; i < children.length; i++) {
+				addFailures(failures, children[i]);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.model.ITestElement#getElapsedTimeInSeconds()
+	 */
+	public double getElapsedTimeInSeconds() {
+		if (fTestRoot == null)
+			return Double.NaN;
+
+		return fTestRoot.getElapsedTimeInSeconds();
+	}
+
+	public String toString() {
+		return fTestRunName + " " + DateFormat.getDateTimeInstance().format(new Date(fStartTime)); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java
new file mode 100644
index 0000000..6952f14
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java
@@ -0,0 +1,262 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au)
+ *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit.model;
+
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.DTDHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.AttributesImpl;
+
+import org.eclipse.jdt.junit.model.ITestElement;
+import org.eclipse.jdt.junit.model.ITestElement.FailureTrace;
+import org.eclipse.jdt.junit.model.ITestElement.ProgressState;
+import org.eclipse.jdt.junit.model.ITestElement.Result;
+
+import org.eclipse.core.runtime.Assert;
+
+import org.eclipse.jdt.core.IJavaProject;
+
+public class TestRunSessionSerializer implements XMLReader {
+
+	private static final String EMPTY= ""; //$NON-NLS-1$
+	private static final String CDATA= "CDATA"; //$NON-NLS-1$
+	private static final Attributes NO_ATTS= new AttributesImpl();
+
+
+	private final TestRunSession fTestRunSession;
+	private ContentHandler fHandler;
+	private ErrorHandler fErrorHandler;
+
+	private final NumberFormat timeFormat= new DecimalFormat("0.0##", new DecimalFormatSymbols(Locale.US)); //$NON-NLS-1$ // not localized, parseable by Double.parseDouble(..)
+
+	/**
+	 * @param testRunSession the test run session to serialize
+	 */
+	public TestRunSessionSerializer(TestRunSession testRunSession) {
+		Assert.isNotNull(testRunSession);
+		fTestRunSession= testRunSession;
+	}
+
+	public void parse(InputSource input) throws IOException, SAXException {
+		if (fHandler == null)
+			throw new SAXException("ContentHandler missing"); //$NON-NLS-1$
+
+		fHandler.startDocument();
+		handleTestRun();
+		fHandler.endDocument();
+	}
+
+	private void handleTestRun() throws SAXException {
+		AttributesImpl atts= new AttributesImpl();
+		addCDATA(atts, IXMLTags.ATTR_NAME, fTestRunSession.getTestRunName());
+		IJavaProject project= fTestRunSession.getLaunchedProject();
+		if (project != null)
+			addCDATA(atts, IXMLTags.ATTR_PROJECT, project.getElementName());
+		addCDATA(atts, IXMLTags.ATTR_TESTS, fTestRunSession.getTotalCount());
+		addCDATA(atts, IXMLTags.ATTR_STARTED, fTestRunSession.getStartedCount());
+		addCDATA(atts, IXMLTags.ATTR_FAILURES, fTestRunSession.getFailureCount());
+		addCDATA(atts, IXMLTags.ATTR_ERRORS, fTestRunSession.getErrorCount());
+		addCDATA(atts, IXMLTags.ATTR_IGNORED, fTestRunSession.getIgnoredCount());
+		startElement(IXMLTags.NODE_TESTRUN, atts);
+
+		TestRoot testRoot= fTestRunSession.getTestRoot();
+		ITestElement[] topSuites= testRoot.getChildren();
+		for (int i= 0; i < topSuites.length; i++) {
+			handleTestElement(topSuites[i]);
+		}
+
+		endElement(IXMLTags.NODE_TESTRUN);
+	}
+
+	private void handleTestElement(ITestElement testElement) throws SAXException {
+		if (testElement instanceof TestSuiteElement) {
+			TestSuiteElement testSuiteElement= (TestSuiteElement) testElement;
+
+			AttributesImpl atts= new AttributesImpl();
+			addCDATA(atts, IXMLTags.ATTR_NAME, testSuiteElement.getSuiteTypeName());
+			if (! Double.isNaN(testSuiteElement.getElapsedTimeInSeconds()))
+				addCDATA(atts, IXMLTags.ATTR_TIME, timeFormat.format(testSuiteElement.getElapsedTimeInSeconds()));
+			if (testElement.getProgressState() != ProgressState.COMPLETED || testElement.getTestResult(false) != Result.UNDEFINED)
+				addCDATA(atts, IXMLTags.ATTR_INCOMPLETE, Boolean.TRUE.toString());
+
+			startElement(IXMLTags.NODE_TESTSUITE, atts);
+			addFailure(testElement);
+
+			ITestElement[] children= testSuiteElement.getChildren();
+			for (int i= 0; i < children.length; i++) {
+				handleTestElement(children[i]);
+			}
+			endElement(IXMLTags.NODE_TESTSUITE);
+
+		} else if (testElement instanceof TestCaseElement) {
+			TestCaseElement testCaseElement= (TestCaseElement) testElement;
+
+			AttributesImpl atts= new AttributesImpl();
+			addCDATA(atts, IXMLTags.ATTR_NAME, testCaseElement.getTestMethodName());
+			addCDATA(atts, IXMLTags.ATTR_CLASSNAME, testCaseElement.getClassName());
+			if (! Double.isNaN(testCaseElement.getElapsedTimeInSeconds()))
+				addCDATA(atts, IXMLTags.ATTR_TIME, timeFormat.format(testCaseElement.getElapsedTimeInSeconds()));
+			if (testElement.getProgressState() != ProgressState.COMPLETED)
+				addCDATA(atts, IXMLTags.ATTR_INCOMPLETE, Boolean.TRUE.toString());
+			if (testCaseElement.isIgnored())
+				addCDATA(atts, IXMLTags.ATTR_IGNORED, Boolean.TRUE.toString());
+
+			startElement(IXMLTags.NODE_TESTCASE, atts);
+			addFailure(testElement);
+
+			endElement(IXMLTags.NODE_TESTCASE);
+
+		} else {
+			throw new IllegalStateException(String.valueOf(testElement));
+		}
+
+	}
+
+	private void addFailure(ITestElement testElement) throws SAXException {
+		FailureTrace failureTrace= testElement.getFailureTrace();
+		if (failureTrace != null) {
+			AttributesImpl failureAtts= new AttributesImpl();
+//				addCDATA(failureAtts, IXMLTags.ATTR_MESSAGE, xx);
+//				addCDATA(failureAtts, IXMLTags.ATTR_TYPE, xx);
+			String failureKind= testElement.getTestResult(false) == Result.ERROR ? IXMLTags.NODE_ERROR : IXMLTags.NODE_FAILURE;
+			startElement(failureKind, failureAtts);
+			String expected= failureTrace.getExpected();
+			String actual= failureTrace.getActual();
+			if (expected != null) {
+				startElement(IXMLTags.NODE_EXPECTED, NO_ATTS);
+				addCharacters(expected);
+				endElement(IXMLTags.NODE_EXPECTED);
+			}
+			if (actual != null) {
+				startElement(IXMLTags.NODE_ACTUAL, NO_ATTS);
+				addCharacters(actual);
+				endElement(IXMLTags.NODE_ACTUAL);
+			}
+			String trace= failureTrace.getTrace();
+			addCharacters(trace);
+			endElement(failureKind);
+		}
+	}
+
+	private void startElement(String name, Attributes atts) throws SAXException {
+		fHandler.startElement(EMPTY, name, name, atts);
+	}
+
+	private void endElement(String name) throws SAXException {
+		fHandler.endElement(EMPTY, name, name);
+	}
+
+	private static void addCDATA(AttributesImpl atts, String name, int value) {
+		addCDATA(atts, name, Integer.toString(value));
+	}
+
+	private static void addCDATA(AttributesImpl atts, String name, String value) {
+		atts.addAttribute(EMPTY, EMPTY, name, CDATA, value);
+	}
+
+	private void addCharacters(String string) throws SAXException {
+		string= escapeNonUnicodeChars(string);
+		fHandler.characters(string.toCharArray(), 0, string.length());
+	}
+	
+	/**
+	 * Replaces all non-Unicode characters in the given string.
+	 * 
+	 * @param string a string
+	 * @return string with Java-escapes
+	 * @since 3.6
+	 */
+	private static String escapeNonUnicodeChars(String string) {
+		StringBuffer buf= null;
+		for (int i= 0; i < string.length(); i++) {
+			char ch= string.charAt(i);
+			if (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32)) {
+				if (buf == null) {
+					buf= new StringBuffer(string.substring(0, i));
+				}
+				buf.append("\\u"); //$NON-NLS-1$
+				String hex= Integer.toHexString(ch);
+				for (int j= hex.length(); j < 4; j++)
+					buf.append('0');
+				buf.append(hex);
+			} else if (buf != null) {
+				buf.append(ch);
+			}
+		}
+		if (buf != null) {
+			return buf.toString();
+		}
+		return string;
+	}
+
+	public void setContentHandler(ContentHandler handler) {
+		this.fHandler= handler;
+	}
+
+	public ContentHandler getContentHandler() {
+		return fHandler;
+	}
+
+	public void setErrorHandler(ErrorHandler handler) {
+		fErrorHandler= handler;
+	}
+
+	public ErrorHandler getErrorHandler() {
+		return fErrorHandler;
+	}
+
+	// ignored:
+
+	public void parse(String systemId) throws IOException, SAXException {
+	}
+
+	public void setDTDHandler(DTDHandler handler) {
+	}
+
+	public DTDHandler getDTDHandler() {
+		return null;
+	}
+
+	public void setEntityResolver(EntityResolver resolver) {
+	}
+
+	public EntityResolver getEntityResolver() {
+		return null;
+	}
+
+	public void setProperty(java.lang.String name, java.lang.Object value) {
+	}
+
+	public Object getProperty(java.lang.String name) {
+		return null;
+	}
+
+	public void setFeature(java.lang.String name, boolean value) {
+	}
+
+	public boolean getFeature(java.lang.String name) {
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/model/TestSuiteElement.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/CoreTestSearchEngine.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/CoreTestSearchEngine.java
new file mode 100644
index 0000000..f5ac897
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/CoreTestSearchEngine.java
@@ -0,0 +1,255 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.util;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IRegion;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchMatch;
+import org.eclipse.jdt.core.search.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.SearchRequestor;
+
+import org.eclipse.jdt.internal.junit.launcher.ITestKind;
+import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+
+
+/**
+ * Custom Search engine for suite() methods
+ */
+public class CoreTestSearchEngine {
+
+	public static boolean isTestOrTestSuite(IType declaringType) throws CoreException {
+		ITestKind testKind= TestKindRegistry.getContainerTestKind(declaringType);
+		return testKind.getFinder().isTest(declaringType);
+	}
+
+	public static boolean isAccessibleClass(IType type) throws JavaModelException {
+		int flags= type.getFlags();
+		if (Flags.isInterface(flags)) {
+			return false;
+		}
+		IJavaElement parent= type.getParent();
+		while (true) {
+			if (parent instanceof ICompilationUnit || parent instanceof IClassFile) {
+				return true;
+			}
+			if (!(parent instanceof IType) || !Flags.isStatic(flags) || !Flags.isPublic(flags)) {
+				return false;
+			}
+			flags= ((IType) parent).getFlags();
+			parent= parent.getParent();
+		}
+	}
+
+	public static boolean isAccessibleClass(ITypeBinding type) {
+		if (type.isInterface()) {
+			return false;
+		}
+		int modifiers= type.getModifiers();
+		while (true) {
+			if (type.getDeclaringMethod() != null) {
+				return false;
+			}
+			ITypeBinding declaringClass= type.getDeclaringClass();
+			if (declaringClass == null) {
+				return true;
+			}
+			if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
+				return false;
+			}
+			modifiers= declaringClass.getModifiers();
+			type= declaringClass;
+		}
+	}
+
+	public static boolean hasTestCaseType(IJavaProject javaProject) {
+		try {
+			return javaProject != null && javaProject.findType(JUnitCorePlugin.TEST_SUPERCLASS_NAME) != null;
+		} catch (JavaModelException e) {
+			// not available
+		}
+		return false;
+	}
+
+	public static boolean hasTestAnnotation(IJavaProject project) {
+		try {
+			return project != null && project.findType(JUnitCorePlugin.JUNIT4_ANNOTATION_NAME) != null;
+		} catch (JavaModelException e) {
+			// not available
+		}
+		return false;
+	}
+
+	public static boolean isTestImplementor(IType type) throws JavaModelException {
+		ITypeHierarchy typeHier= type.newSupertypeHierarchy(null);
+		IType[] superInterfaces= typeHier.getAllInterfaces();
+		for (int i= 0; i < superInterfaces.length; i++) {
+			if (JUnitCorePlugin.TEST_INTERFACE_NAME.equals(superInterfaces[i].getFullyQualifiedName('.'))) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public static boolean isTestImplementor(ITypeBinding type) {
+		ITypeBinding superType= type.getSuperclass();
+		if (superType != null && isTestImplementor(superType)) {
+			return true;
+		}
+		ITypeBinding[] interfaces= type.getInterfaces();
+		for (int i= 0; i < interfaces.length; i++) {
+			ITypeBinding curr= interfaces[i];
+			if (JUnitCorePlugin.TEST_INTERFACE_NAME.equals(curr.getQualifiedName()) || isTestImplementor(curr)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public static boolean hasSuiteMethod(IType type) throws JavaModelException {
+		IMethod method= type.getMethod("suite", new String[0]); //$NON-NLS-1$
+		if (!method.exists())
+			return false;
+
+		if (!Flags.isStatic(method.getFlags()) || !Flags.isPublic(method.getFlags())) {
+			return false;
+		}
+		if (!Signature.getSimpleName(Signature.toString(method.getReturnType())).equals(JUnitCorePlugin.SIMPLE_TEST_INTERFACE_NAME)) {
+			return false;
+		}
+		return true;
+	}
+
+	public static IRegion getRegion(IJavaElement element) throws JavaModelException {
+		IRegion result= JavaCore.newRegion();
+		if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
+			// for projects only add the contained source folders
+			IPackageFragmentRoot[] roots= ((IJavaProject) element).getPackageFragmentRoots();
+			for (int i= 0; i < roots.length; i++) {
+				if (!roots[i].isArchive()) {
+					result.add(roots[i]);
+				}
+			}
+		} else {
+			result.add(element);
+		}
+		return result;
+	}
+
+	public static void findTestImplementorClasses(ITypeHierarchy typeHierarchy, IType testInterface, IRegion region, Set result)
+			throws JavaModelException {
+		IType[] subtypes= typeHierarchy.getAllSubtypes(testInterface);
+		for (int i= 0; i < subtypes.length; i++) {
+			IType type= subtypes[i];
+			int cachedFlags= typeHierarchy.getCachedFlags(type);
+			if (!Flags.isInterface(cachedFlags) && !Flags.isAbstract(cachedFlags) // do the cheaper tests first
+					&& region.contains(type) && CoreTestSearchEngine.isAccessibleClass(type)) {
+				result.add(type);
+			}
+		}
+	}
+
+	private static class SuiteMethodTypesCollector extends SearchRequestor {
+
+		private Collection fResult;
+
+		public SuiteMethodTypesCollector(Collection result) {
+			fResult= result;
+		}
+
+		public void acceptSearchMatch(SearchMatch match) throws CoreException {
+			Object enclosingElement= match.getElement();
+			if (!(enclosingElement instanceof IMethod))
+				return;
+
+			IMethod method= (IMethod) enclosingElement;
+			if (!Flags.isStatic(method.getFlags()) || !Flags.isPublic(method.getFlags())) {
+				return;
+			}
+
+			IType declaringType= ((IMethod) enclosingElement).getDeclaringType();
+			if (!CoreTestSearchEngine.isAccessibleClass(declaringType)) {
+				return;
+			}
+			fResult.add(declaringType);
+		}
+	}
+
+	public static void findSuiteMethods(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
+		// fix for bug 36449 JUnit should constrain tests to selected project
+		// [JUnit]
+		IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { element }, IJavaSearchScope.SOURCES);
+
+		SearchRequestor requestor= new SuiteMethodTypesCollector(result);
+		int matchRule= SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH;
+		SearchPattern suitePattern= SearchPattern.createPattern("suite() Test", IJavaSearchConstants.METHOD, IJavaSearchConstants.DECLARATIONS, matchRule); //$NON-NLS-1$
+		SearchParticipant[] participants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
+		new SearchEngine().search(suitePattern, participants, scope, requestor, pm);
+	}
+
+	
+// --- copied from org.eclipse.jdt.internal.corext.util.JavaModelUtil: ---
+	/**
+	 * @param version1 the first version
+	 * @param version2 the second version
+	 * @return <code>true</code> iff version1 is less than version2
+	 */
+	public static boolean isVersionLessThan(String version1, String version2) {
+		if (JavaCore.VERSION_CLDC_1_1.equals(version1)) {
+			version1= JavaCore.VERSION_1_1 + 'a';
+		}
+		if (JavaCore.VERSION_CLDC_1_1.equals(version2)) {
+			version2= JavaCore.VERSION_1_1 + 'a';
+		}
+		return version1.compareTo(version2) < 0;
+	}
+
+
+	public static boolean is50OrHigher(String compliance) {
+		return !isVersionLessThan(compliance, JavaCore.VERSION_1_5);
+	}
+
+	/**
+	 * Checks if the given project or workspace has source compliance 5.0 or greater.
+	 *
+	 * @param project the project to test or <code>null</code> to test the workspace settings
+	 * @return <code>true</code> if the given project or workspace has source compliance 5.0 or greater.
+	 */
+	public static boolean is50OrHigher(IJavaProject project) {
+		String source= project != null ? project.getOption(JavaCore.COMPILER_SOURCE, true) : JavaCore.getOption(JavaCore.COMPILER_SOURCE);
+		return is50OrHigher(source);
+	}
+// ---
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/IJUnitStatusConstants.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/IJUnitStatusConstants.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/IJUnitStatusConstants.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/util/IJUnitStatusConstants.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/ITestRunListener.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/ITestRunListener.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/ITestRunListener.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/ITestRunListener.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/JUnitCore.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/JUnitCore.java
new file mode 100644
index 0000000..1e997be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/JUnitCore.java
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.junit;
+
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IType;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder;
+
+/**
+ * Class for accessing JUnit support; all functionality is provided by
+ * static methods.
+ * <p>
+ * This class is not intended to be subclassed or instantiated by clients.
+ * </p>
+ *
+ * @since 2.1
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class JUnitCore {
+
+	/**
+	 * ID of the JUnit {@linkplain IClasspathContainer classpath container}.
+	 * The general format of classpath entries using this container is unspecified.
+	 * 
+	 * @see #JUNIT3_CONTAINER_PATH
+	 * @see #JUNIT4_CONTAINER_PATH
+	 * @since 3.6
+	 */
+	public static final String JUNIT_CONTAINER_ID= "org.eclipse.jdt.junit.JUNIT_CONTAINER"; //$NON-NLS-1$
+	
+	/**
+	 * Path of the JUnit 3 {@linkplain IClasspathContainer classpath container}.
+	 * 
+	 * @since 3.6
+	 */
+	public final static IPath JUNIT3_CONTAINER_PATH= new Path(JUNIT_CONTAINER_ID).append("3"); //$NON-NLS-1$
+	
+	/**
+	 * Path of the JUnit 4 {@linkplain IClasspathContainer classpath container}.
+	 * 
+	 * @since 3.6
+	 */
+	public final static IPath JUNIT4_CONTAINER_PATH= new Path(JUNIT_CONTAINER_ID).append("4"); //$NON-NLS-1$
+
+	/**
+	 * Adds a listener for test runs.
+	 *
+	 * @param listener listener to be added
+	 * @deprecated As of 3.3, replaced by {@link #addTestRunListener(TestRunListener)}
+	 */
+	public static void addTestRunListener(ITestRunListener listener) {
+		JUnitCorePlugin.getDefault().addTestRunListener(listener);
+	}
+
+	/**
+	 * Removes a listener for test runs.
+	 *
+	 * @param listener listener to be removed
+	 * @deprecated As of 3.3, replaced by {@link #removeTestRunListener(TestRunListener)}
+	 */
+	public static void removeTestRunListener(ITestRunListener listener) {
+		JUnitCorePlugin.getDefault().removeTestRunListener(listener);
+	}
+
+	/**
+	 * Adds a listener for test runs.
+	 * <p>
+	 * <strong>Note:</strong> If your plug-in should be loaded when a test run starts,
+	 * please contribute to the <code>org.eclipse.jdt.junit.testRunListeners</code> extension point instead.
+	 * </p>
+	 *
+	 * @param listener the listener to be added
+	 * @since 3.3
+	 */
+	public static void addTestRunListener(TestRunListener listener) {
+		JUnitCorePlugin.getDefault().getNewTestRunListeners().add(listener);
+	}
+
+	/**
+	 * Removes a listener for test runs.
+	 *
+	 * @param listener the listener to be removed
+	 * @since 3.3
+	 */
+	public static void removeTestRunListener(TestRunListener listener) {
+		JUnitCorePlugin.getDefault().getNewTestRunListeners().remove(listener);
+	}
+
+	/**
+	 * Finds types that contain JUnit tests in the given container.
+	 * 
+	 * @param container the container
+	 * @param monitor the progress monitor used to report progress and request cancelation,
+	 *   or <code>null</code> if none
+	 * @return test types inside the given container
+	 * @throws CoreException when a problem occurs while accessing <code>container</code> or its children
+	 * @throws OperationCanceledException if the operation has been canceled
+	 * 
+	 * @since 3.5
+	 */
+	public static IType[] findTestTypes(IJavaElement container, IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+		final Set result= new HashSet();
+		JUnit4TestFinder finder= new JUnit4TestFinder();
+		finder.findTestsInContainer(container, result, monitor);
+
+		return (IType[])result.toArray(new IType[result.size()]);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/TestRunListener.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/TestRunListener.java
new file mode 100644
index 0000000..4d54e14
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/TestRunListener.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.junit;
+
+import org.eclipse.jdt.junit.model.ITestCaseElement;
+import org.eclipse.jdt.junit.model.ITestRunSession;
+
+/**
+ * A test run listener that can be registered at {@link JUnitCore#addTestRunListener(TestRunListener)}
+ * or as a contribution to the <code>org.eclipse.jdt.junit.testRunListeners</code> extension point.
+ * The latter approach has the advantage that the contributing plug-in is automatically loaded when a test run starts.
+ * <p>
+ * A test run starts with the call to {@link #sessionLaunched(ITestRunSession)} and 
+ * {@link #sessionStarted(ITestRunSession)}, followed by calls to
+ * {@link #testCaseStarted(ITestCaseElement)} and {@link #testCaseFinished(ITestCaseElement)}
+ * for all test cases contained in the tree.
+ * </p>
+ * <p>
+ * A test run session is ended with the call to {@link #sessionFinished(ITestRunSession)}. After that
+ * call, no references must be kept to the session or any of the test cases or suites.
+ * </p>
+ *
+ * @since 3.3
+ */
+public abstract class TestRunListener {
+	
+	/**
+	 * A test run session has been launched. The test tree is not available yet.
+	 * <p>
+	 * Important: The implementor of this method must not keep a reference to the session element
+	 * after {@link #sessionFinished(ITestRunSession)} has finished.
+	 * </p>
+	 *
+	 * @param session the session that has just been launched
+	 * @since 3.6
+	 */
+	public void sessionLaunched(ITestRunSession session) {
+	}
+	
+	/**
+	 * A test run session has started. The test tree can be accessed through the session element.
+	 * <p>
+	 * Important: The implementor of this method must not keep a reference to the session element
+	 * after {@link #sessionFinished(ITestRunSession)} has finished.
+	 * </p>
+	 *
+	 * @param session the session that has just started.
+	 */
+	public void sessionStarted(ITestRunSession session) {
+	}
+
+	/**
+	 * A test run session has finished. The test tree can be accessed through the session element.
+	 *
+	 * <p>
+	 * Important: The implementor of this method must not keep the session element when the method is finished.
+	 * </p>
+	 *
+	 * @param session the test
+	 */
+	public void sessionFinished(ITestRunSession session) {
+	}
+
+	/**
+	 * A test case has started. The result can be accessed from the element.
+	 * <p>
+	 * Important: The implementor of this method must not keep a reference to the test case element
+	 * after {@link #sessionFinished(ITestRunSession)} has finished.
+	 * </p>
+	 * @param testCaseElement the test that has started to run
+	 */
+	public void testCaseStarted(ITestCaseElement testCaseElement) {
+	}
+
+	/**
+	 * A test case has ended. The result can be accessed from the element.
+	 * <p>
+	 * Important: The implementor of this method must not keep a reference to the test case element
+	 * after {@link #sessionFinished(ITestRunSession)} has finished.
+	 * </p>
+	 *
+	 * @param testCaseElement the test that has finished running
+	 */
+	public void testCaseFinished(ITestCaseElement testCaseElement) {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java
new file mode 100644
index 0000000..dee50ce
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java
@@ -0,0 +1,456 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *     Robert Konigsberg <konigsberg at google.com> - [JUnit] Leverage AbstractJavaLaunchConfigurationDelegate.getMainTypeName in JUnitLaunchConfigurationDelegate - https://bugs.eclipse.org/bugs/show_bug.cgi?id=280114
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *******************************************************************************/
+package org.eclipse.jdt.junit.launcher;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.framework.Bundle;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchManager;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitMessages;
+import org.eclipse.jdt.internal.junit.Messages;
+import org.eclipse.jdt.internal.junit.launcher.ITestKind;
+import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
+import org.eclipse.jdt.internal.junit.launcher.JUnitRuntimeClasspathEntry;
+import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
+import org.eclipse.jdt.internal.junit.util.IJUnitStatusConstants;
+
+import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
+import org.eclipse.jdt.launching.ExecutionArguments;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IVMRunner;
+import org.eclipse.jdt.launching.SocketUtil;
+import org.eclipse.jdt.launching.VMRunnerConfiguration;
+
+
+/**
+ * Launch configuration delegate for a JUnit test as a Java application.
+ *
+ * <p>
+ * Clients can instantiate and extend this class.
+ * </p>
+ * @since 3.3
+ */
+public class JUnitLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
+
+	private boolean fKeepAlive= false;
+	private int fPort;
+	private IMember[] fTestElements;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public synchronized void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		if (monitor == null) {
+			monitor = new NullProgressMonitor();
+		}
+
+		monitor.beginTask(MessageFormat.format("{0}...", new String[]{configuration.getName()}), 5); //$NON-NLS-1$
+		// check for cancellation
+		if (monitor.isCanceled()) {
+			return;
+		}
+
+		try {
+			if (mode.equals(JUnitLaunchConfigurationConstants.MODE_RUN_QUIETLY_MODE)) {
+				launch.setAttribute(JUnitLaunchConfigurationConstants.ATTR_NO_DISPLAY, "true"); //$NON-NLS-1$
+				mode = ILaunchManager.RUN_MODE;
+			}
+
+			monitor.subTask(JUnitMessages.JUnitLaunchConfigurationDelegate_verifying_attriburtes_description);
+
+			try {
+				preLaunchCheck(configuration, launch, new SubProgressMonitor(monitor, 2));
+			} catch (CoreException e) {
+				if (e.getStatus().getSeverity() == IStatus.CANCEL) {
+					monitor.setCanceled(true);
+					return;
+				}
+				throw e;
+			}
+			// check for cancellation
+			if (monitor.isCanceled()) {
+				return;
+			}
+
+			fKeepAlive= mode.equals(ILaunchManager.DEBUG_MODE) && configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_KEEPRUNNING, false);
+			fPort= evaluatePort();
+			launch.setAttribute(JUnitLaunchConfigurationConstants.ATTR_PORT, String.valueOf(fPort));
+
+			fTestElements= evaluateTests(configuration, new SubProgressMonitor(monitor, 1));
+
+			String mainTypeName= verifyMainTypeName(configuration);
+			IVMRunner runner= getVMRunner(configuration, mode);
+
+			File workingDir = verifyWorkingDirectory(configuration);
+			String workingDirName = null;
+			if (workingDir != null) {
+				workingDirName= workingDir.getAbsolutePath();
+			}
+
+			// Environment variables
+			String[] envp= getEnvironment(configuration);
+
+			ArrayList vmArguments= new ArrayList();
+			ArrayList programArguments= new ArrayList();
+			collectExecutionArguments(configuration, vmArguments, programArguments);
+
+			// VM-specific attributes
+			Map vmAttributesMap= getVMSpecificAttributesMap(configuration);
+
+			// Classpath
+			String[] classpath= getClasspath(configuration);
+
+			// Create VM config
+			VMRunnerConfiguration runConfig= new VMRunnerConfiguration(mainTypeName, classpath);
+			runConfig.setVMArguments((String[]) vmArguments.toArray(new String[vmArguments.size()]));
+			runConfig.setProgramArguments((String[]) programArguments.toArray(new String[programArguments.size()]));
+			runConfig.setEnvironment(envp);
+			runConfig.setWorkingDirectory(workingDirName);
+			runConfig.setVMSpecificAttributesMap(vmAttributesMap);
+
+			// Bootpath
+			runConfig.setBootClassPath(getBootpath(configuration));
+
+			// check for cancellation
+			if (monitor.isCanceled()) {
+				return;
+			}
+
+			// done the verification phase
+			monitor.worked(1);
+
+			monitor.subTask(JUnitMessages.JUnitLaunchConfigurationDelegate_create_source_locator_description);
+			// set the default source locator if required
+			setDefaultSourceLocator(launch, configuration);
+			monitor.worked(1);
+
+			// Launch the configuration - 1 unit of work
+			runner.run(runConfig, launch, monitor);
+
+			// check for cancellation
+			if (monitor.isCanceled()) {
+				return;
+			}
+		} finally {
+			fTestElements= null;
+			monitor.done();
+		}
+	}
+
+	private int evaluatePort() throws CoreException {
+		int port= SocketUtil.findFreePort();
+		if (port == -1) {
+			abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_no_socket, null, IJavaLaunchConfigurationConstants.ERR_NO_SOCKET_AVAILABLE);
+		}
+		return port;
+	}
+
+	/**
+	 * Performs a check on the launch configuration's attributes. If an attribute contains an invalid value, a {@link CoreException}
+	 * with the error is thrown.
+	 *
+	 * @param configuration the launch configuration to verify
+	 * @param launch the launch to verify
+	 * @param monitor the progress monitor to use
+	 * @throws CoreException an exception is thrown when the verification fails
+	 */
+	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		try {
+			IJavaProject javaProject= getJavaProject(configuration);
+			if ((javaProject == null) || !javaProject.exists()) {
+				abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_invalidproject, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
+			}
+			if (!CoreTestSearchEngine.hasTestCaseType(javaProject)) {
+				abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junitnotonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
+			}
+
+			ITestKind testKind= getTestRunnerKind(configuration);
+			boolean isJUnit4Configuration= TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId());
+			if (isJUnit4Configuration && ! CoreTestSearchEngine.hasTestAnnotation(javaProject)) {
+				abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junit4notonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	private ITestKind getTestRunnerKind(ILaunchConfiguration configuration) {
+		ITestKind testKind= JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
+		if (testKind.isNull()) {
+			testKind= TestKindRegistry.getDefault().getKind(TestKindRegistry.JUNIT3_TEST_KIND_ID); // backward compatible for launch configurations with no runner
+		}
+		return testKind;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException {
+		return "org.eclipse.jdt.internal.junit.runner.RemoteTestRunner"; //$NON-NLS-1$
+	}
+
+	/**
+	 * Evaluates all test elements selected by the given launch configuration. The elements are of type
+	 * {@link IType} or {@link IMethod}. At the moment it is only possible to run a single method or a set of types, but not
+	 * mixed or more than one method at a time.
+	 *
+	 * @param configuration the launch configuration to inspect
+	 * @param monitor the progress monitor
+	 * @return returns all types or methods that should be ran
+	 * @throws CoreException an exception is thrown when the search for tests failed
+	 */
+	protected IMember[] evaluateTests(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		IJavaProject javaProject= getJavaProject(configuration);
+
+		IJavaElement testTarget= getTestTarget(configuration, javaProject);
+		String testMethodName= configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, ""); //$NON-NLS-1$
+		if (testMethodName.length() > 0) {
+			if (testTarget instanceof IType) {
+				return new IMember[] { ((IType) testTarget).getMethod(testMethodName, new String[0]) };
+			}
+		}
+		HashSet result= new HashSet();
+		ITestKind testKind= getTestRunnerKind(configuration);
+		testKind.getFinder().findTestsInContainer(testTarget, result, monitor);
+		if (result.isEmpty()) {
+			String msg= Messages.format(JUnitMessages.JUnitLaunchConfigurationDelegate_error_notests_kind, testKind.getDisplayName());
+			abort(msg, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
+		}
+		return (IMember[]) result.toArray(new IMember[result.size()]);
+	}
+
+	/**
+	 * Collects all VM and program arguments. Implementors can modify and add arguments.
+	 *
+	 * @param configuration the configuration to collect the arguments for
+	 * @param vmArguments a {@link List} of {@link String} representing the resulting VM arguments
+	 * @param programArguments a {@link List} of {@link String} representing the resulting program arguments
+	 * @exception CoreException if unable to collect the execution arguments
+	 */
+	protected void collectExecutionArguments(ILaunchConfiguration configuration, List/*String*/ vmArguments, List/*String*/ programArguments) throws CoreException {
+
+		// add program & VM arguments provided by getProgramArguments and getVMArguments
+		String pgmArgs= getProgramArguments(configuration);
+		String vmArgs= getVMArguments(configuration);
+		ExecutionArguments execArgs= new ExecutionArguments(vmArgs, pgmArgs);
+		vmArguments.addAll(Arrays.asList(execArgs.getVMArgumentsArray()));
+		programArguments.addAll(Arrays.asList(execArgs.getProgramArgumentsArray()));
+
+		String testFailureNames= configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_FAILURES_NAMES, ""); //$NON-NLS-1$
+
+		programArguments.add("-version"); //$NON-NLS-1$
+		programArguments.add("3"); //$NON-NLS-1$
+
+		programArguments.add("-port"); //$NON-NLS-1$
+		programArguments.add(String.valueOf(fPort));
+
+		if (fKeepAlive)
+			programArguments.add(0, "-keepalive"); //$NON-NLS-1$
+
+		ITestKind testRunnerKind= getTestRunnerKind(configuration);
+
+		programArguments.add("-testLoaderClass"); //$NON-NLS-1$
+		programArguments.add(testRunnerKind.getLoaderClassName());
+		programArguments.add("-loaderpluginname"); //$NON-NLS-1$
+		programArguments.add(testRunnerKind.getLoaderPluginId());
+
+		IMember[] testElements = fTestElements;
+
+		// a test name was specified just run the single test
+		if (testElements.length == 1) {
+			if (testElements[0] instanceof IMethod) {
+				IMethod method= (IMethod) testElements[0];
+				programArguments.add("-test"); //$NON-NLS-1$
+				programArguments.add(method.getDeclaringType().getFullyQualifiedName()+':'+method.getElementName());
+			} else if (testElements[0] instanceof IType) {
+				IType type= (IType) testElements[0];
+				programArguments.add("-classNames"); //$NON-NLS-1$
+				programArguments.add(type.getFullyQualifiedName());
+			} else {
+				abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_wrong_input, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
+			}
+		} else if (testElements.length > 1) {
+			String fileName= createTestNamesFile(testElements);
+			programArguments.add("-testNameFile"); //$NON-NLS-1$
+			programArguments.add(fileName);
+		}
+		if (testFailureNames.length() > 0) {
+			programArguments.add("-testfailures"); //$NON-NLS-1$
+			programArguments.add(testFailureNames);
+		}
+	}
+
+	private String createTestNamesFile(IMember[] testElements) throws CoreException {
+		try {
+			File file= File.createTempFile("testNames", ".txt"); //$NON-NLS-1$ //$NON-NLS-2$
+			file.deleteOnExit();
+			BufferedWriter bw= null;
+			try {
+				bw= new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
+				for (int i= 0; i < testElements.length; i++) {
+					if (testElements[i] instanceof IType) {
+						IType type= (IType) testElements[i];
+						String testName= type.getFullyQualifiedName();
+						bw.write(testName);
+						bw.newLine();
+					} else {
+						abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_wrong_input, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
+					}
+				}
+			} finally {
+				if (bw != null) {
+					bw.close();
+				}
+			}
+			return file.getAbsolutePath();
+		} catch (IOException e) {
+			throw new CoreException(new Status(IStatus.ERROR, JUnitCorePlugin.CORE_PLUGIN_ID, IStatus.ERROR, "", e)); //$NON-NLS-1$
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getClasspath(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
+		String[] cp= super.getClasspath(configuration);
+
+		ITestKind kind= getTestRunnerKind(configuration);
+		List junitEntries = new ClasspathLocalizer(Platform.inDevelopmentMode()).localizeClasspath(kind);
+
+		String[] classPath= new String[cp.length + junitEntries.size()];
+		Object[] jea= junitEntries.toArray();
+		System.arraycopy(cp, 0, classPath, 0, cp.length);
+		System.arraycopy(jea, 0, classPath, cp.length, jea.length);
+		return classPath;
+	}
+
+	private static class ClasspathLocalizer {
+
+		private boolean fInDevelopmentMode;
+
+		public ClasspathLocalizer(boolean inDevelopmentMode) {
+			fInDevelopmentMode = inDevelopmentMode;
+		}
+
+		public List localizeClasspath(ITestKind kind) {
+			JUnitRuntimeClasspathEntry[] entries= kind.getClasspathEntries();
+			List junitEntries= new ArrayList();
+
+			for (int i= 0; i < entries.length; i++) {
+				try {
+					addEntry(junitEntries, entries[i]);
+				} catch (IOException e) {
+					Assert.isTrue(false, entries[i].getPluginId() + " is available (required JAR)"); //$NON-NLS-1$
+				}
+			}
+			return junitEntries;
+		}
+
+		private void addEntry(List junitEntries, final JUnitRuntimeClasspathEntry entry) throws IOException, MalformedURLException {
+			String entryString= entryString(entry);
+			if (entryString != null)
+				junitEntries.add(entryString);
+		}
+
+		private String entryString(final JUnitRuntimeClasspathEntry entry) throws IOException, MalformedURLException {
+			if (inDevelopmentMode()) {
+				try {
+					return localURL(entry.developmentModeEntry());
+				} catch (IOException e3) {
+					// fall through and try default
+				}
+			}
+			return localURL(entry);
+		}
+
+		private boolean inDevelopmentMode() {
+			return fInDevelopmentMode;
+		}
+
+		private String localURL(JUnitRuntimeClasspathEntry jar) throws IOException, MalformedURLException {
+			Bundle bundle= JUnitCorePlugin.getDefault().getBundle(jar.getPluginId());
+			URL url;
+			if (jar.getPluginRelativePath() == null)
+				url= bundle.getEntry("/"); //$NON-NLS-1$
+			else
+				url= bundle.getEntry(jar.getPluginRelativePath());
+			if (url == null)
+				throw new IOException();
+			return FileLocator.toFileURL(url).getFile();
+		}
+	}
+
+	private final IJavaElement getTestTarget(ILaunchConfiguration configuration, IJavaProject javaProject) throws CoreException {
+		String containerHandle = configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER, ""); //$NON-NLS-1$
+		if (containerHandle.length() != 0) {
+			 IJavaElement element= JavaCore.create(containerHandle);
+			 if (element == null || !element.exists()) {
+				 abort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
+			 }
+			 return element;
+		}
+		String testTypeName= getMainTypeName(configuration);
+		if (testTypeName != null && testTypeName.length() != 0) {
+			IType type= javaProject.findType(testTypeName);
+			if (type != null && type.exists()) {
+				return type;
+			}
+		}
+		abort(JUnitMessages.JUnitLaunchConfigurationDelegate_input_type_does_not_exist, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
+		return null; // not reachable
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.launcher.ITestFindingAbortHandler#abort(java.lang.String, java.lang.Throwable, int)
+	 */
+	protected void abort(String message, Throwable exception, int code) throws CoreException {
+		throw new CoreException(new Status(IStatus.ERROR, JUnitCorePlugin.CORE_PLUGIN_ID, code, message, exception));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/package.html b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/package.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/package.html
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/launcher/package.html
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestCaseElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestCaseElement.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestCaseElement.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestCaseElement.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestElement.java
new file mode 100644
index 0000000..ebc7514
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestElement.java
@@ -0,0 +1,190 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak (brockj at tpg.com.au)
+ *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
+ *******************************************************************************/
+package org.eclipse.jdt.junit.model;
+
+
+/**
+ * Common protocol for test elements.
+ * This set consists of {@link ITestCaseElement} , {@link ITestSuiteElement} and {@link ITestRunSession}
+ *
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ *
+ *
+ * @since 3.3
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface ITestElement {
+
+	/**
+	 * Running states of a test.
+	 */
+	public static final class ProgressState {
+		/** state that describes that the test element has not started */
+		public static final ProgressState NOT_STARTED= new ProgressState("Not Started"); //$NON-NLS-1$
+		/** state that describes that the test element has is running */
+		public static final ProgressState RUNNING= new ProgressState("Running"); //$NON-NLS-1$
+		/** state that describes that the test element has been stopped before being completed */
+		public static final ProgressState STOPPED= new ProgressState("Stopped"); //$NON-NLS-1$
+		/** state that describes that the test element has completed */
+		public static final ProgressState COMPLETED= new ProgressState("Completed"); //$NON-NLS-1$
+
+		private String fName;
+		private ProgressState(String name) {
+			fName= name;
+		}
+		public String toString() {
+			return fName;
+		}
+	}
+
+	/**
+	 * Result states of a test.
+	 */
+	public static final class Result {
+		/** state that describes that the test result is undefined */
+		public static final Result UNDEFINED= new Result("Undefined"); //$NON-NLS-1$
+		/** state that describes that the test result is 'OK' */
+		public static final Result OK= new Result("OK"); //$NON-NLS-1$
+		/** state that describes that the test result is 'Error' */
+		public static final Result ERROR= new Result("Error"); //$NON-NLS-1$
+		/** state that describes that the test result is 'Failure' */
+		public static final Result FAILURE= new Result("Failure"); //$NON-NLS-1$
+		/** state that describes that the test result is 'Ignored' */
+		public static final Result IGNORED= new Result("Ignored"); //$NON-NLS-1$
+
+		private String fName;
+		private Result(String name) {
+			fName= name;
+		}
+		public String toString() {
+			return fName;
+		}
+	}
+
+	/**
+	 * A failure trace of a test.
+	 *
+	 * This class is not intended to be instantiated or extended by clients.
+	 */
+	public static final class FailureTrace {
+		private final String fActual;
+		private final String fExpected;
+		private final String fTrace;
+
+		public FailureTrace(String trace, String expected, String actual) {
+			fActual= actual;
+			fExpected= expected;
+			fTrace= trace;
+		}
+
+		/**
+		 * Returns the failure stack trace.
+		 *
+		 * @return the failure stack trace
+		 */
+		public String getTrace() {
+			return fTrace;
+		}
+
+		/**
+		 * Returns the expected result or <code>null</code> if the trace is not a comparison failure.
+		 *
+		 * @return the expected result or <code>null</code> if the trace is not a comparison failure.
+		 */
+		public String getExpected() {
+			return fExpected;
+		}
+
+		/**
+		 * Returns the actual result or <code>null</code> if the trace is not a comparison failure.
+		 *
+		 * @return the actual result or <code>null</code> if the trace is not a comparison failure.
+		 */
+		public String getActual() {
+			return fActual;
+		}
+	}
+
+	/**
+	 * Returns the progress state of this test element.
+	 * <dl>
+	 * <li>{@link ITestElement.ProgressState#NOT_STARTED}: the test has not yet started</li>
+	 * <li>{@link ITestElement.ProgressState#RUNNING}: the test is currently running</li>
+	 * <li>{@link ITestElement.ProgressState#STOPPED}: the test has stopped before being completed</li>
+	 * <li>{@link ITestElement.ProgressState#COMPLETED}: the test (and all its children) has completed</li>
+	 * </dl>
+	 * @return returns one of {@link ITestElement.ProgressState#NOT_STARTED}, {@link ITestElement.ProgressState#RUNNING},
+	 * {@link ITestElement.ProgressState#STOPPED} or {@link ITestElement.ProgressState#COMPLETED}.
+	 */
+	public ProgressState getProgressState();
+
+	/**
+	 * Returns the result of the test element.
+	 * <dl>
+	 * <li>{@link ITestElement.Result#UNDEFINED}: the result is not yet evaluated</li>
+	 * <li>{@link ITestElement.Result#OK}: the test has succeeded</li>
+	 * <li>{@link ITestElement.Result#ERROR}: the test has returned an error</li>
+	 * <li>{@link ITestElement.Result#FAILURE}: the test has returned an failure</li>
+	 * <li>{@link ITestElement.Result#IGNORED}: the test has been ignored (skipped)</li>
+	 * </dl>
+	 * @param includeChildren if <code>true</code>, the returned result is the combined
+	 * result of the test and its children (if it has any). If <code>false</code>,
+	 * only the test's result is returned.
+	 *
+	 * @return returns one of {@link ITestElement.Result#UNDEFINED}, {@link ITestElement.Result#OK}, {@link ITestElement.Result#ERROR},
+	 * {@link ITestElement.Result#FAILURE} or {@link ITestElement.Result#IGNORED}. Clients should also prepare for other, new values.
+	 */
+	public Result getTestResult(boolean includeChildren);
+
+	/**
+	 * Returns the failure trace of this test element or <code>null</code> if the test has not resulted in an error or failure.
+	 *
+	 * @return the failure trace of this test or <code>null</code>.
+	 */
+	public FailureTrace getFailureTrace();
+
+	/**
+	 * Returns the parent test element container or <code>null</code> if the test element is the test run session.
+	 *
+	 * @return the parent test suite
+	 */
+	public ITestElementContainer getParentContainer();
+
+	/**
+	 * Returns the test run session.
+	 *
+	 * @return the parent test run session.
+	 */
+	public ITestRunSession getTestRunSession();
+
+	/**
+	 * Returns the estimated total time elapsed in seconds while executing this test element. The
+	 * total time for a test suite includes the time used for all tests in that suite. The total
+	 * time for a test session includes the time used for all tests in that session.
+	 * <p>
+	 * <strong>Note:</strong> The elapsed time is only valid for
+	 * {@link ITestElement.ProgressState#COMPLETED} test elements.
+	 * </p>
+	 * 
+	 * @return total execution time for the test element in seconds, or {@link Double#NaN}</code> if
+	 *         the state of the element is not {@link ITestElement.ProgressState#COMPLETED}
+	 * 
+	 * @since 3.4
+	 */
+	public double getElapsedTimeInSeconds();
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestElementContainer.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestElementContainer.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestElementContainer.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestElementContainer.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestRunSession.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestRunSession.java
new file mode 100644
index 0000000..1bcd7bd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestRunSession.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.junit.model;
+
+import org.eclipse.jdt.core.IJavaProject;
+
+/**
+ * Represents a test run session.
+ * <p>
+ * This interface is not intended to be implemented by clients.
+ * </p>
+ *
+ * @since 3.3
+ *
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface ITestRunSession extends ITestElementContainer {
+
+	/**
+	 * Returns the name of the test run. The name is the name of the launch configuration use to run this test.
+	 *
+	 * @return returns the test run name
+	 */
+	public String getTestRunName();
+
+	/**
+	 * Returns the Java project from which this test run session has been launched, or <code>null</code> if not available.
+	 * 
+	 * @return the launched project, or <code>null</code> is not available.
+	 * @since 3.6
+	 */
+	public abstract IJavaProject getLaunchedProject();
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestSuiteElement.java b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestSuiteElement.java
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestSuiteElement.java
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/ITestSuiteElement.java
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/package.html b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/package.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/package.html
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/model/package.html
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/package.html b/eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/package.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/package.html
rename to eclipse/plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/junit/package.html
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.classpath b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.classpath
index 5133fc0..36e9463 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.classpath
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src/"/>
+	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.3"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs
index 86799d7..4983ea6 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Nov 28 09:49:27 CET 2008
+#Tue Dec 01 14:34:54 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -16,16 +16,16 @@ org.eclipse.jdt.core.codeComplete.localSuffixes=
 org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=fg
 org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.compliance=1.3
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=error
@@ -34,7 +34,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.pde.prefs
index ac9eea9..b944fa9 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/.settings/org.eclipse.pde.prefs
@@ -1,15 +1,26 @@
-#Mon Jan 29 10:51:35 CET 2007
+#Tue Nov 24 20:26:45 CET 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=0
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=1
+compilers.p.missing-version-require-bundle=1
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
+compilers.p.unknown-class=1
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF
index b3b8396..90202b7 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/META-INF/MANIFEST.MF
@@ -2,10 +2,10 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.junit.runtime;singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.4.200.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Export-Package: org.eclipse.jdt.internal.junit.runner;x-friends:="org.eclipse.jdt.junit,org.eclipse.jdt.junit4.runtime,org.eclipse.pde.junit.runtime",
+Export-Package: org.eclipse.jdt.internal.junit.runner;x-friends:="org.eclipse.jdt.junit.core,org.eclipse.jdt.junit4.runtime,org.eclipse.pde.junit.runtime",
  org.eclipse.jdt.internal.junit.runner.junit3;x-internal:=true
-Require-Bundle: org.junit;bundle-version="[3.8.2,3.9)"
+Require-Bundle: org.junit;bundle-version="3.8.2"
 Bundle-RequiredExecutionEnvironment: J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/build.properties b/eclipse/plugins/org.eclipse.jdt.junit.runtime/build.properties
index bb2d17c..efaa780 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,3 +16,4 @@ bin.includes = about.html,\
                META-INF/
 
 src.includes = about.html
+jars.extra.classpath = compatibility.jar
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/plugin.properties b/eclipse/plugins/org.eclipse.jdt.junit.runtime/plugin.properties
index 29e231f..fa3b933 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,5 +8,5 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-pluginName=Java Development Tools JUnit runtime support
+pluginName=Java Development Tools JUnit Runtime Support
 providerName=Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java b/eclipse/plugins/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
index b842460..d42fa52 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit.runtime/src/org/eclipse/jdt/internal/junit/runner/RemoteTestRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ package org.eclipse.jdt.internal.junit.runner;
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileReader;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
@@ -333,7 +333,7 @@ public class RemoteTestRunner implements MessageSender, IVisitsTestTrees {
 	}
 
 	private void readTestNames(String testNameFile) throws IOException {
-		BufferedReader br= new BufferedReader(new FileReader(new File(testNameFile)));
+		BufferedReader br= new BufferedReader(new InputStreamReader(new FileInputStream(new File(testNameFile)), "UTF-8")); //$NON-NLS-1$
 		try {
 			String line;
 			Vector list= new Vector();
@@ -354,7 +354,7 @@ public class RemoteTestRunner implements MessageSender, IVisitsTestTrees {
 	}
 
 	private void readFailureNames(String testFailureFile) throws IOException {
-		BufferedReader br= new BufferedReader(new FileReader(new File(testFailureFile)));
+		BufferedReader br= new BufferedReader(new InputStreamReader(new FileInputStream(new File(testFailureFile)), "UTF-8")); //$NON-NLS-1$
 		try {
 			String line;
 			Vector list= new Vector();
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/.classpath b/eclipse/plugins/org.eclipse.jdt.junit/.classpath
index ce73933..b7c5443 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/.classpath
+++ b/eclipse/plugins/org.eclipse.jdt.junit/.classpath
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="internal compatibility"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.junit/META-INF/MANIFEST.MF
index d74ae5f..decdafe 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.junit/META-INF/MANIFEST.MF
@@ -2,22 +2,18 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.junit;singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.junit.ui.JUnitPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-Export-Package: org.eclipse.jdt.internal.junit;x-internal:=true,
- org.eclipse.jdt.internal.junit.buildpath;x-internal:=true,
+Export-Package: org.eclipse.jdt.internal.junit.buildpath;x-internal:=true,
  org.eclipse.jdt.internal.junit.launcher;x-internal:=true,
- org.eclipse.jdt.internal.junit.model;x-internal:=true,
  org.eclipse.jdt.internal.junit.refactoring;x-internal:=true,
  org.eclipse.jdt.internal.junit.ui;x-internal:=true,
  org.eclipse.jdt.internal.junit.util;x-internal:=true,
  org.eclipse.jdt.internal.junit.wizards;x-internal:=true,
- org.eclipse.jdt.junit,
  org.eclipse.jdt.junit.launcher,
- org.eclipse.jdt.junit.model,
  org.eclipse.jdt.junit.wizards
 Require-Bundle: 
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
@@ -39,8 +35,6 @@ Require-Bundle:
  org.eclipse.compare;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
- org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.100,4.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)"
- 
+ org.eclipse.ltk.ui.refactoring;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.junit.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/build.properties b/eclipse/plugins/org.eclipse.jdt.junit/build.properties
index f50b9dd..1b054dc 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,7 +15,8 @@ bin.includes = plugin.xml,\
                .,\
                META-INF/
 
-source.. = src/
+source.. = src/,\
+               internal compatibility/
 
 src.includes = about.html,\
                schema/
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/internal compatibility/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.junit/internal compatibility/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java
new file mode 100644
index 0000000..dfa40de
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit/internal compatibility/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java	
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.launcher;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.viewers.LabelProvider;
+
+import org.eclipse.ui.dialogs.TwoPaneElementSelector;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+
+import org.eclipse.jdt.ui.JavaElementLabelProvider;
+import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
+
+
+/**
+ * A dialog to select a test class or a test suite from a list of types.
+ * <p>
+ * DO NOT REMOVE, used in a product.</p>
+ * @deprecated As of 3.6, replaced by {@link org.eclipse.jdt.ui.JavaUI#createTypeDialog(Shell, IRunnableContext, IJavaSearchScope, int, boolean, String, TypeSelectionExtension)}
+ */
+public class TestSelectionDialog extends TwoPaneElementSelector {
+
+	private final IType[] fTypes;
+
+	private static class PackageRenderer extends LabelProvider {
+
+		private JavaElementLabelProvider fBaseLabelProvider;
+
+		public PackageRenderer() {
+			fBaseLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT);
+		}
+
+		public Image getImage(Object element) {
+			return fBaseLabelProvider.getImage(((IType)element).getPackageFragment());
+		}
+
+		public String getText(Object element) {
+			return fBaseLabelProvider.getText(((IType)element).getPackageFragment());
+		}
+
+		public void dispose() {
+			fBaseLabelProvider.dispose();
+		}
+
+	}
+
+	public TestSelectionDialog(Shell shell, IType[] types) {
+		super(shell, new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS),
+				new PackageRenderer());
+		fTypes= types;
+	}
+
+	/**
+	 * @see org.eclipse.jface.window.Window#configureShell(Shell)
+	 */
+	protected void configureShell(Shell newShell) {
+		super.configureShell(newShell);
+		//PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, new Object[] { IJavaHelpContextIds.MAINTYPE_SELECTION_DIALOG });
+	}
+
+	/*
+	 * @see Window#open()
+	 */
+	public int open() {
+		setElements(fTypes);
+		return super.open();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/plugin.properties b/eclipse/plugins/org.eclipse.jdt.junit/plugin.properties
index 7c7cfb4..de44686 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ RunJUnitLaunchShortcut.description=Runs a set of JUnit tests
 DebugJUnitLaunchShortcut.description=Debugs a set of JUnit tests
 
 preferenceKeywords.general=Java JUnit filter stack trace stacktrace
+preferenceKeywords.wizards.java=Java
 
 View.label= JUnit
 Launch.label= JUnit
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/plugin.xml b/eclipse/plugins/org.eclipse.jdt.junit/plugin.xml
index 04d3f21..2bdf15a 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.junit/plugin.xml
@@ -2,9 +2,7 @@
 <?eclipse version="3.0"?>
 <plugin>
 
-   <extension-point id="testRunListeners" name="%testRunListeners.name" schema="schema/testRunListeners.exsd"/>
    <extension-point id="junitLaunchConfigs" name="%junitLaunchConfigs.name" schema="schema/junitLaunchConfigs.exsd"/>
-   <extension-point id="internal_testKinds" name="%testKinds.name" schema="schema/internal_testKinds.exsd"/>
 
    <extension
          point="org.eclipse.ui.views">
@@ -62,28 +60,9 @@
       <keyword
             id="org.eclipse.jdt.junit.JUnit"
             label="%preferenceKeywords.general"/>
-   </extension>
-   <extension
-         point="org.eclipse.debug.core.launchConfigurationTypes">
-      <launchConfigurationType
-            name="%Launch.label"
-            delegateDescription="%JUnitLaunchDelegate.description"
-            delegateName="%JUnitLaunchDelegate.name"
-            delegate="org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate"
-            modes="run, debug"
-            id="org.eclipse.jdt.junit.launchconfig"
-            sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"
-            migrationDelegate="org.eclipse.jdt.internal.junit.launcher.JUnitMigrationDelegate">
-      </launchConfigurationType>
-   </extension>
-   <extension
-         point="org.eclipse.debug.core.launchConfigurationComparators">
-      <launchConfigurationComparator
-            attribute="org.eclipse.jdt.junit.CONTAINER"
-            class="org.eclipse.jdt.internal.junit.launcher.ContainerComparator"
-            id="org.eclipse.jdt.junit.containerComparator">
-      </launchConfigurationComparator>
+     <keyword
+            id="org.eclipse.jdt.junit.wizards.java"
+            label="%preferenceKeywords.wizards.java"/>
    </extension>
    <extension
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
@@ -134,6 +113,7 @@
          <description>
             %TestWizard.description
          </description>
+         <keywordReference id="org.eclipse.jdt.junit.wizards.java"/>
       </wizard>
       <wizard
             name="%TestSuiteWizard.name"
@@ -144,6 +124,7 @@
          <description>
             %SuiteWizard.description
          </description>
+         <keywordReference id="org.eclipse.jdt.junit.wizards.java"/>
       </wizard>
    </extension>
    <extension
@@ -266,22 +247,6 @@
    </extension>
    
    <extension
-         point="org.eclipse.jdt.core.classpathVariableInitializer">
-      <classpathVariableInitializer
-            variable="JUNIT_HOME"
-            class="org.eclipse.jdt.internal.junit.buildpath.JUnitHomeInitializer"
-            deprecated="%classpathVariableInitializer.deprecated.JUNIT_HOME"
-            readOnly="true">
-      </classpathVariableInitializer>
-      <classpathVariableInitializer
-            variable="JUNIT_SRC_HOME"
-            class="org.eclipse.jdt.internal.junit.buildpath.JUnitHomeInitializer"
-            deprecated="%classpathVariableInitializer.deprecated.JUNIT_SRC_HOME"
-            readOnly="true">
-      </classpathVariableInitializer>
-   </extension>
-   
-   <extension
          point="org.eclipse.jdt.ui.quickFixProcessors">
       <quickFixProcessor
             name="%junitQuickFixProcessor"
@@ -318,16 +283,6 @@
    </extension>
    
    <extension
-         point="org.eclipse.core.expressions.propertyTesters">
-      <propertyTester
-            properties="isTest,canLaunchAsJUnit"
-            namespace="org.eclipse.jdt.junit"
-            type="org.eclipse.core.runtime.IAdaptable"
-            class="org.eclipse.jdt.internal.junit.JUnitPropertyTester"
-            id="org.eclipse.jdt.junit.JUnitPropertyTester">
-      </propertyTester>
-   </extension>
-   <extension
          point="org.eclipse.ltk.core.refactoring.renameParticipants">
       <renameParticipant
             name="%RenameTypeParticipant.name"
@@ -435,21 +390,8 @@
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
    </extension>
    
-   <extension
-         point="org.eclipse.core.runtime.preferences">
-      <initializer class="org.eclipse.jdt.internal.junit.ui.JunitPreferenceInitializer"/>
-   </extension>
-   
     <!-- JUnit Container -->
-   
-   <extension
-      point="org.eclipse.jdt.core.classpathContainerInitializer">
-      <classpathContainerInitializer
-            class="org.eclipse.jdt.internal.junit.buildpath.JUnitContainerInitializer"
-            id="org.eclipse.jdt.junit.JUNIT_CONTAINER">
-      </classpathContainerInitializer>
-   </extension>
-   
+      
    <extension
          point="org.eclipse.jdt.ui.classpathContainerPage">
       <classpathContainerPage
@@ -458,34 +400,6 @@
             id="org.eclipse.jdt.junit.JUNIT_CONTAINER">
       </classpathContainerPage>
    </extension>
-   
-   <extension
-         point="org.eclipse.jdt.junit.internal_testKinds">
-      <kind
-            id="org.eclipse.jdt.junit.loader.junit3"
-            displayName="%testKind.junit3"
-            finderClass="org.eclipse.jdt.internal.junit.launcher.JUnit3TestFinder"
-            loaderPluginId="org.eclipse.jdt.junit.runtime"
-            loaderClass="org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader">
-         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit"/>     	
-         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.runtime"/>     	
-      </kind>
-   </extension>
-   <extension
-         point="org.eclipse.jdt.junit.internal_testKinds">
-      <kind
-            id="org.eclipse.jdt.junit.loader.junit4"
-            displayName="%testKind.junit4" 
-            finderClass="org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder"
-            loaderPluginId="org.eclipse.jdt.junit4.runtime"
-            loaderClass="org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader">
-         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit4.runtime" />
-         <!-- TODO: do we need these? -->
-         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit" />     	
-         <runtimeClasspathEntry pluginId="org.eclipse.jdt.junit.runtime"/>     	
-         <!-- END : do we need these? -->
-      </kind>
-   </extension>
 
    <extension
          point="org.eclipse.ui.editors">
@@ -500,30 +414,38 @@
          </contentTypeBinding>
       </editor>
    </extension>
+   <extension
+         point="org.eclipse.debug.core.statusHandlers">
+      <statusHandler
+            class="org.eclipse.jdt.internal.junit.launcher.LaunchErrorStatusHandler"
+            code="101"
+            id="org.eclipse.jdt.junit.launch.ERR_UNSPECIFIED_MAIN_TYPE"
+            plugin="org.eclipse.jdt.junit.core">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.jdt.internal.junit.launcher.LaunchErrorStatusHandler"
+            code="118"
+            id="org.eclipse.jdt.junit.launch.ERR_NO_SOCKET_AVAILABLE"
+            plugin="org.eclipse.jdt.junit.core">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.jdt.internal.junit.launcher.LaunchErrorStatusHandler"
+            code="107"
+            id="org.eclipse.jdt.junit.launch.ERR_NOT_A_JAVA_PROJECT"
+            plugin="org.eclipse.jdt.junit.core">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.jdt.internal.junit.launcher.LaunchErrorStatusHandler"
+            code="10004"
+            id="org.eclipse.jdt.junit.launch.ERR_JUNIT_NOT_ON_PATH"
+            plugin="org.eclipse.jdt.junit.core">
+      </statusHandler>
+   </extension>
    
    <extension
-         point="org.eclipse.core.contenttype.contentTypes">
-      <content-type
-            base-type="org.eclipse.core.runtime.xml"
-            file-extensions="xml"
-            id="JUnitResult"
-            name="%JUnitTestResult.content-type.name"
-            priority="high">
-         <describer
-               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
-            <parameter
-                  name="element"
-                  value="testrun">
-            </parameter>
-            <parameter
-                  name="element"
-                  value="testsuite">
-            </parameter>
-            <parameter
-                  name="element"
-                  value="testsuites">
-            </parameter>
-         </describer>
-      </content-type>
-   </extension>   
+         point="org.eclipse.jdt.junit.testRunListeners">
+      <testRunListener
+            class="org.eclipse.jdt.internal.junit.ui.UITestRunListener">
+      </testRunListener>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/schema/testRunListeners.exsd b/eclipse/plugins/org.eclipse.jdt.junit/schema/testRunListeners.exsd
deleted file mode 100644
index 689c378..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/schema/testRunListeners.exsd
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jdt.junit">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.eclipse.jdt.junit" id="testRunListeners" name="Test Run Listeners"/>
-      </appInfo>
-      <documentation>
-         Extension point to register additional test run listeners. A test run listener is notified about the execution of a test run.
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <annotation>
-         <appInfo>
-            <meta.element deprecated="true"/>
-         </appInfo>
-         <documentation>
-            a fully qualified identifier of the target extension point
-         </documentation>
-      </annotation>
-      <complexType>
-         <sequence>
-            <element ref="testRunListener"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  a fully qualified identifier of the target extension point
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="testRunListener">
-      <annotation>
-         <documentation>
-            Deprecated: Register the new test run listener directly at JUnitCore
-         </documentation>
-      </annotation>
-      <complexType>
-         <attribute name="class" type="string" use="required">
-            <annotation>
-               <documentation>
-                  Test run class implementing org.eclipse.jdt.junit.ITestRunListener
-               </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.jdt.junit.ITestRunListener"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         2.1
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
-         The following is an example of a test run listener contribution:
-
-<p>
-<pre>
- <extension point="org.eclipse.jdt.junit.testRunListeners">
-  <testRunListener class="com.example.SampleTestRunListener"/>
- </extension>
-</pre>
-</p>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         Test run listeners must must implement the org.eclipse.jdt.junit.ITestRunListener interface.
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="copyright"/>
-      </appInfo>
-      <documentation>
-         Copyright (c) 2004 IBM Corporation and others.
-All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java
deleted file mode 100644
index 9b81e61..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/BasicElementLabels.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit;
-
-import java.io.File;
-
-import org.eclipse.osgi.util.TextProcessor;
-
-import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.core.resources.IResource;
-
-import org.eclipse.jdt.ui.JavaElementLabels;
-
-
-/**
- * A label provider for basic elements like paths. The label provider will make sure that the labels are correctly
- * shown in RTL environments.
- *
- * @since 3.4
- */
-public class BasicElementLabels {
-
-	private BasicElementLabels(){}
-
-	/**
-	 * Adds special marks so that that the given string is readable in a BIDI environment.
-	 *
-	 * @param string the string
-	 * @param delimiters the additional delimiters
-	 * @return the processed styled string
-	 */
-	private static String markLTR(String string, String delimiters) {
-		return TextProcessor.process(string, delimiters);
-	}
-
-	/**
-	 * Returns the label of a path.
-	 *
-	 * @param path the path
-	 * @param isOSPath if <code>true</code>, the path represents an OS path, if <code>false</code> it is a workspace path.
-	 * @return the label of the path to be used in the UI.
-	 */
-	public static String getPathLabel(IPath path, boolean isOSPath) {
-		String label;
-		if (isOSPath) {
-			label= path.toOSString();
-		} else {
-			label= path.makeRelative().toString();
-		}
-		return markLTR(label, "/\\:."); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the label of the path of a file.
-	 *
-	 * @param file the file
-	 * @return the label of the file path to be used in the UI.
-	 */
-	public static String getPathLabel(File file) {
-		return markLTR(file.getAbsolutePath(), "/\\:.");  //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the label for a file pattern like '*.java'
-	 *
-	 * @param name the pattern
-	 * @return the label of the pattern.
-	 */
-	public static String getFilePattern(String name) {
-		return markLTR(name, "*.?/\\:."); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns the label for a URL, URI or URL part. Example is 'http://www.x.xom/s.html#1'
-	 *
-	 * @param name the URL string
-	 * @return the label of the URL.
-	 */
-	public static String getURLPart(String name) {
-		return markLTR(name, ":@?-#/\\:."); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns a label for a resource name.
-	 *
-	 * @param resource the resource
-	 * @return the label of the resource name.
-	 */
-	public static String getResourceName(IResource resource) {
-		return markLTR(resource.getName(), ":."); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns a label for a resource name.
-	 *
-	 * @param resourceName the resource name
-	 * @return the label of the resource name.
-	 */
-	public static String getResourceName(String resourceName) {
-		return markLTR(resourceName, ":."); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns a label for a version name. Example is '1.4.1'
-	 *
-	 * @param name the version string
-	 * @return the version label
-	 */
-	public static String getVersionName(String name) {
-		return markLTR(name, ":.");  //$NON-NLS-1$
-	}
-
-
-	/**
-	 * Returns a label for Java element name. Example is 'new Test<? extends List>() { ...}'.
-	 * This method should only be used for simple element names. Use
-	 * {@link JavaElementLabels} to create a label from a Java element.
-	 *
-	 * @param name the Java element name.
-	 * @return the label for the Java element
-	 */
-	public static String getJavaElementName(String name) {
-		return markLTR(name, "<>()?,{}.:"); //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java
deleted file mode 100644
index d5cbc37..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/JUnitPropertyTester.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit;
-
-import org.eclipse.core.expressions.PropertyTester;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.core.resources.IResource;
-
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
-
-/**
- * JUnitPropertyTester provides propertyTester(s) for IResource types
- * for use in XML Expression Language syntax.
- */
-public class JUnitPropertyTester extends PropertyTester {
-
-	private static final String PROPERTY_IS_TEST= "isTest";	 //$NON-NLS-1$
-
-	private static final String PROPERTY_CAN_LAUNCH_AS_JUNIT_TEST= "canLaunchAsJUnit"; //$NON-NLS-1$
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.corext.refactoring.participants.properties.IPropertyEvaluator#test(java.lang.Object, java.lang.String, java.lang.String)
-	 */
-	public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
-		if (!(receiver instanceof IAdaptable)) {
-			throw new IllegalArgumentException("Element must be of type 'IAdaptable', is " + receiver == null ? "null" : receiver.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-
-		IJavaElement element;
-		if (receiver instanceof IJavaElement) {
-			element= (IJavaElement) receiver;
-		} else if (receiver instanceof IResource) {
-			element = JavaCore.create((IResource) receiver);
-			if (element == null) {
-				return false;
-			}
-		} else { // is IAdaptable
-			element= (IJavaElement) ((IAdaptable) receiver).getAdapter(IJavaElement.class);
-			if (element == null) {
-				IResource resource= (IResource) ((IAdaptable) receiver).getAdapter(IResource.class);
-				element = JavaCore.create(resource);
-				if (element == null) {
-					return false;
-				}
-			}
-		}
-		if (PROPERTY_IS_TEST.equals(property)) {
-			return isJUnitTest(element);
-		} else if (PROPERTY_CAN_LAUNCH_AS_JUNIT_TEST.equals(property)) {
-			return canLaunchAsJUnitTest(element);
-		}
-		throw new IllegalArgumentException("Unknown test property '" + property + "'"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	private boolean canLaunchAsJUnitTest(IJavaElement element) {
-		try {
-			switch (element.getElementType()) {
-				case IJavaElement.JAVA_PROJECT:
-				case IJavaElement.PACKAGE_FRAGMENT_ROOT:
-					return true; // can run, let test runner detect if there are tests
-				case IJavaElement.PACKAGE_FRAGMENT:
-					return ((IPackageFragment) element).hasChildren();
-				case IJavaElement.COMPILATION_UNIT:
-				case IJavaElement.CLASS_FILE:
-				case IJavaElement.TYPE:
-				case IJavaElement.METHOD:
-					return isJUnitTest(element);
-				default:
-					return false;
-			}
-		} catch (JavaModelException e) {
-			return false;
-		}
-	}
-
-	/*
-	 * Return whether the target resource is a JUnit test.
-	 */
-	private boolean isJUnitTest(IJavaElement element) {
-		try {
-			IType testType= null;
-			if (element instanceof ICompilationUnit) {
-				testType= (((ICompilationUnit) element)).findPrimaryType();
-			} else if (element instanceof IClassFile) {
-				testType= (((IClassFile) element)).getType();
-			} else if (element instanceof IType) {
-				testType= (IType) element;
-			} else if (element instanceof IMember) {
-				testType= ((IMember) element).getDeclaringType();
-			}
-			if (testType != null && testType.exists()) {
-				return TestSearchEngine.isTestOrTestSuite(testType);
-			}
-		} catch (CoreException e) {
-			// ignore, return false
-		}
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java
deleted file mode 100644
index eb35522..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.buildpath;
-
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.osgi.framework.Version;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.osgi.service.resolver.VersionRange;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.URIUtil;
-
-import org.eclipse.jdt.core.IAccessRule;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.ui.JUnitPreferencesConstants;
-
-
-public class BuildPathSupport {
-
-	
-	public static class JUnitPluginDescription {
-		
-		private final String bundleId;
-		private final VersionRange versionRange;
-		private final String sourceBundleId;
-		private final String bundleRoot;
-		private final String repositorySource;
-		private final String javadocPreferenceKey;
-
-		public JUnitPluginDescription(String bundleId, VersionRange versionRange, String bundleRoot, String sourceBundleId, String repositorySource, String javadocPreferenceKey) {
-			this.bundleId= bundleId;
-			this.versionRange= versionRange;
-			this.sourceBundleId= sourceBundleId;
-			this.bundleRoot= bundleRoot;
-			this.repositorySource= repositorySource;
-			this.javadocPreferenceKey= javadocPreferenceKey;
-		}
-		
-		public IPath getBundleLocation() {
-			return P2Utils.getBundleLocationPath(P2Utils.findBundle(bundleId, versionRange, false));
-		}
-		
-		public IPath getSourceBundleLocation() {
-			return getSourceLocation(P2Utils.findBundle(bundleId, versionRange, false));
-		}
-		
-		//XXX: Official API has been requested for the provisional p2 APIs: https://bugs.eclipse.org/bugs/show_bug.cgi?id=269496
-		
-		public IClasspathEntry getLibraryEntry() {
-			BundleInfo bundleInfo= P2Utils.findBundle(bundleId, versionRange, false);
-			IPath bundleLocation= P2Utils.getBundleLocationPath(bundleInfo);
-			if (bundleLocation != null) {
-				
-				IPath bundleRootLocation= bundleLocation;
-				if (bundleRoot != null)
-					bundleRootLocation= bundleLocation.append(bundleRoot);
-				
-				IPath srcLocation= getSourceLocation(bundleInfo);
-				
-				IAccessRule[] accessRules= { };
-
-				String javadocLocation= JUnitPlugin.getDefault().getPreferenceStore().getString(javadocPreferenceKey);
-				IClasspathAttribute[] attributes;
-				if (javadocLocation.length() == 0) {
-					attributes= new IClasspathAttribute[0];
-				} else {
-					attributes= new IClasspathAttribute[] { JavaCore.newClasspathAttribute(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME, javadocLocation) };
-				}
-				
-				return JavaCore.newLibraryEntry(bundleRootLocation, srcLocation, null, accessRules, attributes, false);
-			}
-			return null;
-		}
-
-		private IPath getSourceLocation(BundleInfo bundleInfo) {
-			if (bundleInfo == null)
-				return null;
-			
-			IPath srcLocation= null;
-			if (repositorySource != null) {
-				// Try source in workspace (from repository)
-				try {
-					URL bundleUrl= FileLocator.toFileURL(URIUtil.toURL(bundleInfo.getLocation()));
-					File bundleFile= new File(bundleUrl.getFile());
-					if (bundleFile.isDirectory()) {
-						File srcFile= new File(bundleFile, repositorySource);
-						if (srcFile.exists()) {
-							srcLocation= new Path(srcFile.getPath());
-							if (srcFile.isDirectory()) {
-								srcLocation= srcLocation.addTrailingSeparator();
-							}
-						}
-					}
-				} catch (MalformedURLException e) {
-					//continue
-				} catch (IOException e) {
-					//continue
-				}
-			}
-			
-			if (srcLocation == null) {
-				// Try exact version
-				BundleInfo sourceBundleInfo= P2Utils.findBundle(sourceBundleId, new Version(bundleInfo.getVersion()), true);
-				if (sourceBundleInfo == null) {
-					// Try version range
-					sourceBundleInfo= P2Utils.findBundle(sourceBundleId, versionRange, true);
-				}
-				srcLocation= P2Utils.getBundleLocationPath(sourceBundleInfo);
-			}
-			return srcLocation;
-		}
-	}
-
-	
-	public static final JUnitPluginDescription JUNIT3_PLUGIN= new JUnitPluginDescription(
-			"org.junit", new VersionRange("[3.8.2,3.9)"), "junit.jar", "org.junit.source", "source-bundle/", JUnitPreferencesConstants.JUNIT3_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-	
-	private static final JUnitPluginDescription JUNIT4_PLUGIN= new JUnitPluginDescription(
-			"org.junit4", new VersionRange("[4.5.0,5.0.0)"), "junit.jar", "org.junit4.source", "junitsrc.zip", JUnitPreferencesConstants.JUNIT4_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-	
-	private static final JUnitPluginDescription HAMCREST_CORE_PLUGIN= new JUnitPluginDescription(
-			"org.hamcrest.core", new VersionRange("[1.1.0,2.0.0)"), null, "org.hamcrest.core.source", "source-bundle/", JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
-	/**
-	 * @return the JUnit3 classpath container
-	 */
-	public static IClasspathEntry getJUnit3ClasspathEntry() {
-		return JavaCore.newContainerEntry(JUnitContainerInitializer.JUNIT3_PATH);
-	}
-
-	/**
-	 * @return the JUnit4 classpath container
-	 */
-	public static IClasspathEntry getJUnit4ClasspathEntry() {
-		return JavaCore.newContainerEntry(JUnitContainerInitializer.JUNIT4_PATH);
-	}
-
-	/**
-	 * @return the org.junit library
-	 */
-	public static IClasspathEntry getJUnit3LibraryEntry() {
-		return JUNIT3_PLUGIN.getLibraryEntry();
-	}
-
-	/**
-	 * @return the org.junit4 library
-	 */
-	public static IClasspathEntry getJUnit4LibraryEntry() {
-		return JUNIT4_PLUGIN.getLibraryEntry();
-	}
-
-	/**
-	 * @return the org.hamcrest.core library
-	 */
-	public static IClasspathEntry getHamcrestCoreLibraryEntry() {
-		return HAMCREST_CORE_PLUGIN.getLibraryEntry();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/ClasspathVariableMarkerResolutionGenerator.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/ClasspathVariableMarkerResolutionGenerator.java
index 1ec3515..17a2a2b 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/ClasspathVariableMarkerResolutionGenerator.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/ClasspathVariableMarkerResolutionGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
 import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
 
@@ -55,8 +56,8 @@ public class ClasspathVariableMarkerResolutionGenerator implements IMarkerResolu
 			String[] arguments= CorrectionEngine.getProblemArguments(marker);
 			if (arguments == null || arguments.length == 0)
 				return false;
-			if (arguments[0].startsWith(JUnitPlugin.JUNIT_HOME + IPath.SEPARATOR)
-					|| arguments[0].startsWith(JUnitPlugin.JUNIT_SRC_HOME + IPath.SEPARATOR))
+			if (arguments[0].startsWith(JUnitCorePlugin.JUNIT_HOME + IPath.SEPARATOR)
+					|| arguments[0].startsWith(JUnitCorePlugin.JUNIT_SRC_HOME + IPath.SEPARATOR))
 				return true;
 		}
 		return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java
deleted file mode 100644
index 670075f..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerInitializer.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.buildpath;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.ui.JUnitPreferencesConstants;
-
-public class JUnitContainerInitializer extends ClasspathContainerInitializer {
-
-	public static final String JUNIT_CONTAINER_ID= "org.eclipse.jdt.junit.JUNIT_CONTAINER"; //$NON-NLS-1$
-
-	private static final IStatus NOT_SUPPORTED= new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED, new String(), null);
-	private static final IStatus READ_ONLY= new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, ClasspathContainerInitializer.ATTRIBUTE_READ_ONLY, new String(), null);
-
-	/**
-	 * @deprecated just for compatibility
-	 */
-	private final static String JUNIT3_8_1= "3.8.1"; //$NON-NLS-1$
-	private final static String JUNIT3= "3"; //$NON-NLS-1$
-	private final static String JUNIT4= "4"; //$NON-NLS-1$
-
-	public final static IPath JUNIT3_PATH= new Path(JUNIT_CONTAINER_ID).append(JUNIT3);
-	public final static IPath JUNIT4_PATH= new Path(JUNIT_CONTAINER_ID).append(JUNIT4);
-
-	private static class JUnitContainer implements IClasspathContainer {
-
-		private final IClasspathEntry[] fEntries;
-		private final IPath fPath;
-
-		public JUnitContainer(IPath path, IClasspathEntry[] entries) {
-			fPath= path;
-			fEntries= entries;
-		}
-
-		public IClasspathEntry[] getClasspathEntries() {
-			return fEntries;
-		}
-
-		public String getDescription() {
-			if (JUNIT4_PATH.equals(fPath)) {
-				return JUnitMessages.JUnitContainerInitializer_description_junit4;
-			}
-			return JUnitMessages.JUnitContainerInitializer_description_junit3;
-		}
-
-		public int getKind() {
-			return IClasspathContainer.K_APPLICATION;
-		}
-
-		public IPath getPath() {
-			return fPath;
-		}
-
-	}
-
-
-	public JUnitContainerInitializer() {
-	}
-
-	public void initialize(IPath containerPath, IJavaProject project) throws CoreException {
-		if (isValidJUnitContainerPath(containerPath)) {
-			JUnitContainer container= getNewContainer(containerPath);
-			JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, 	new IClasspathContainer[] { container }, null);
-		}
-
-	}
-
-	private static JUnitContainer getNewContainer(IPath containerPath) {
-		IClasspathEntry entry= null;
-		IClasspathEntry entry2= null;
-		String version= containerPath.segment(1);
-		if (JUNIT3_8_1.equals(version) || JUNIT3.equals(version)) {
-			entry= BuildPathSupport.getJUnit3LibraryEntry();
-		} else if (JUNIT4.equals(version)) {
-			entry= BuildPathSupport.getJUnit4LibraryEntry();
-			entry2= BuildPathSupport.getHamcrestCoreLibraryEntry();
-		}
-		IClasspathEntry[] entries;
-		if (entry == null) {
-			entries= new IClasspathEntry[] { };
-		} else if (entry2 == null) {
-			entries= new IClasspathEntry[] { entry };
-		} else {
-			entries= new IClasspathEntry[] { entry, entry2 };
-		}
-		return new JUnitContainer(containerPath, entries);
-	}
-
-
-	private static boolean isValidJUnitContainerPath(IPath path) {
-		return path != null && path.segmentCount() == 2 && JUNIT_CONTAINER_ID.equals(path.segment(0));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
-	 */
-	public boolean canUpdateClasspathContainer(IPath containerPath, IJavaProject project) {
-		return true;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAccessRulesStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
-	 */
-	public IStatus getAccessRulesStatus(IPath containerPath, IJavaProject project) {
-		return NOT_SUPPORTED;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getSourceAttachmentStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
-	 */
-	public IStatus getSourceAttachmentStatus(IPath containerPath, IJavaProject project) {
-		return READ_ONLY;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAttributeStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, java.lang.String)
-	 */
-	public IStatus getAttributeStatus(IPath containerPath, IJavaProject project, String attributeKey) {
-		if (attributeKey.equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
-			return Status.OK_STATUS;
-		}
-		return NOT_SUPPORTED;
-	}
-
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#requestClasspathContainerUpdate(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathContainer)
-	 */
-	public void requestClasspathContainerUpdate(IPath containerPath, IJavaProject project, IClasspathContainer containerSuggestion) throws CoreException {
-		IPreferenceStore preferenceStore= JUnitPlugin.getDefault().getPreferenceStore();
-		
-		IClasspathEntry[] entries= containerSuggestion.getClasspathEntries();
-		if (entries.length >= 1 && isValidJUnitContainerPath(containerPath)) {
-			String version= containerPath.segment(1);
-			
-			// only modifiable entry is Javadoc location
-			for (int i= 0; i < entries.length; i++) {
-				IClasspathEntry entry= entries[i];
-				String preferenceKey= getPreferenceKey(entry, version);
-				
-				IClasspathAttribute[] extraAttributes= entry.getExtraAttributes();
-				if (extraAttributes.length == 0) {
-					// Revert to default
-					if (!preferenceStore.isDefault(preferenceKey)) {
-						preferenceStore.setToDefault(preferenceKey);
-					}
-					
-					/* 
-					 * The following would be correct, but would not allow to revert to the default.
-					 * There's no concept of "default value" for a classpath attribute, see
-					 * org.eclipse.jdt.internal.ui.preferences.JavadocConfigurationBlock.performDefaults()
-					 */
-					// preferenceStore.setValue(preferenceKey, "");
-				} else {
-					for (int j= 0; j < extraAttributes.length; j++) {
-						IClasspathAttribute attrib= extraAttributes[j];
-						if (attrib.getName().equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
-							if (preferenceKey != null) {
-								preferenceStore.setValue(preferenceKey, attrib.getValue());
-							}
-							break;
-						}
-					}
-				}
-			}
-			rebindClasspathEntries(project.getJavaModel(), containerPath);
-		}
-	}
-
-	private String getPreferenceKey(IClasspathEntry entry, String version) {
-		if (JUNIT3.equals(version)) {
-			return JUnitPreferencesConstants.JUNIT3_JAVADOC;
-		} else if (JUNIT4.equals(version)) {
-			if (entry.getPath().lastSegment().indexOf("junit") != -1) { //$NON-NLS-1$
-				return JUnitPreferencesConstants.JUNIT4_JAVADOC;
-			} else {
-				return JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC;
-			}
-		}
-		return null;
-	}
-
-	private static void rebindClasspathEntries(IJavaModel model, IPath containerPath) throws JavaModelException {
-		ArrayList affectedProjects= new ArrayList();
-
-		IJavaProject[] projects= model.getJavaProjects();
-		for (int i= 0; i < projects.length; i++) {
-			IJavaProject project= projects[i];
-			IClasspathEntry[] entries= project.getRawClasspath();
-			for (int k= 0; k < entries.length; k++) {
-				IClasspathEntry curr= entries[k];
-				if (curr.getEntryKind() == IClasspathEntry.CPE_CONTAINER && containerPath.equals(curr.getPath())) {
-					affectedProjects.add(project);
-				}
-			}
-		}
-		if (!affectedProjects.isEmpty()) {
-			IJavaProject[] affected= (IJavaProject[]) affectedProjects.toArray(new IJavaProject[affectedProjects.size()]);
-			IClasspathContainer[] containers= new IClasspathContainer[affected.length];
-			for (int i= 0; i < containers.length; i++) {
-				containers[i]= getNewContainer(containerPath);
-			}
-			JavaCore.setClasspathContainer(containerPath, affected, containers, null);
-		}
-	}
-
-	/**
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getDescription(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
-	 */
-	public String getDescription(IPath containerPath, IJavaProject project) {
-		if (isValidJUnitContainerPath(containerPath)) {
-			String version= containerPath.segment(1);
-			if (JUNIT3_8_1.equals(version) || JUNIT3.equals(version)) {
-				return JUnitMessages.JUnitContainerInitializer_description_initializer_junit3;
-			} else if (JUNIT4.equals(version)) {
-				return JUnitMessages.JUnitContainerInitializer_description_initializer_junit4;
-			}
-		}
-		return JUnitMessages.JUnitContainerInitializer_description_initializer_unresolved;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.ClasspathContainerInitializer#getComparisonID(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
-	 */
-	public Object getComparisonID(IPath containerPath, IJavaProject project) {
-		return containerPath;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerWizardPage.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerWizardPage.java
index f349159..161325d 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitContainerWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.buildpath;
 
+import org.eclipse.jdt.junit.JUnitCore;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -61,7 +63,7 @@ public class JUnitContainerWizardPage extends NewElementWizardPage implements IC
 		setDescription(JUnitMessages.JUnitContainerWizardPage_wizard_description);
 		setImageDescriptor(JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY);
 
-		fContainerEntryResult= JavaCore.newContainerEntry(JUnitContainerInitializer.JUNIT3_PATH);
+		fContainerEntryResult= JavaCore.newContainerEntry(JUnitCore.JUNIT3_CONTAINER_PATH);
 	}
 
 	public static IJavaProject getPlaceholderProject() {
@@ -120,7 +122,7 @@ public class JUnitContainerWizardPage extends NewElementWizardPage implements IC
 		data.widthHint= converter.convertWidthInCharsToPixels(15);
 		fVersionCombo.setLayoutData(data);
 
-		if (fContainerEntryResult != null && JUnitContainerInitializer.JUNIT4_PATH.equals(fContainerEntryResult.getPath())) {
+		if (fContainerEntryResult != null && JUnitCore.JUNIT4_CONTAINER_PATH.equals(fContainerEntryResult.getPath())) {
 			fVersionCombo.select(1);
 		} else {
 			fVersionCombo.select(0);
@@ -164,16 +166,16 @@ public class JUnitContainerWizardPage extends NewElementWizardPage implements IC
 		IClasspathEntry libEntry;
 		IPath containerPath;
 		if (fVersionCombo != null && fVersionCombo.getSelectionIndex() == 1) {
-			containerPath= JUnitContainerInitializer.JUNIT4_PATH;
+			containerPath= JUnitCore.JUNIT4_CONTAINER_PATH;
 			libEntry= BuildPathSupport.getJUnit4LibraryEntry();
 		} else {
-			containerPath= JUnitContainerInitializer.JUNIT3_PATH;
+			containerPath= JUnitCore.JUNIT3_CONTAINER_PATH;
 			libEntry= BuildPathSupport.getJUnit3LibraryEntry();
 		}
 
 		if (libEntry == null) {
 			status.setError(JUnitMessages.JUnitContainerWizardPage_error_version_not_available);
-		} else if (JUnitContainerInitializer.JUNIT4_PATH.equals(containerPath)) {
+		} else if (JUnitCore.JUNIT4_CONTAINER_PATH.equals(containerPath)) {
 			if (fProject != null && !JUnitStubUtility.is50OrHigher(fProject)) {
 				status.setWarning(JUnitMessages.JUnitContainerWizardPage_warning_java5_required);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java
deleted file mode 100644
index c19a1fb..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/JUnitHomeInitializer.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.buildpath;
-
-
-import org.eclipse.core.runtime.IPath;
-
-import org.eclipse.jdt.core.ClasspathVariableInitializer;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-public class JUnitHomeInitializer extends ClasspathVariableInitializer {
-
-	/*
-	 * @see ClasspathVariableInitializer#initialize(String)
-	 */
-	public void initialize(String variable) {
-		if (JUnitPlugin.JUNIT_HOME.equals(variable)) {
-			initializeHome();
-		} else if (JUnitPlugin.JUNIT_SRC_HOME.equals(variable)) {
-			initializeSource();
-		}
-	}
-
-	private void initializeHome() {
-		try {
-			IPath location= BuildPathSupport.JUNIT3_PLUGIN.getBundleLocation();
-			if (location != null) {
-				JavaCore.setClasspathVariable(JUnitPlugin.JUNIT_HOME, location, null);
-			} else {
-				JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);
-			}
-		} catch (JavaModelException e1) {
-			JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_HOME, null);
-		}
-	}
-
-	private void initializeSource() {
-		try {
-			IPath sourceLocation= BuildPathSupport.JUNIT3_PLUGIN.getSourceBundleLocation();
-			if (sourceLocation != null) {
-				JavaCore.setClasspathVariable(JUnitPlugin.JUNIT_SRC_HOME, sourceLocation, null);
-			} else {
-				JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_SRC_HOME, null);
-			}
-		} catch (JavaModelException e1) {
-			JavaCore.removeClasspathVariable(JUnitPlugin.JUNIT_SRC_HOME, null);
-		}
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
deleted file mode 100644
index 78bfcbb..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/buildpath/P2Utils.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Patrick Higgins <patrick133t at yahoo.com> - [JUnit] JUnit not found when JDT installed as dropin - https://bugs.eclipse.org/bugs/show_bug.cgi?id=297663
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.buildpath;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.osgi.framework.Version;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.resolver.VersionRange;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.URIUtil;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-
-/**
- * Utilities to read and write bundle and source information files.
- * <p>
- * This class currently uses provisional p2 API for which official API has been requested:
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=269496
- * </p>
- * 
- * @since 3.5
- */
-class P2Utils {
-
-	private static final String SRC_INFO_FOLDER = "org.eclipse.equinox.source"; //$NON-NLS-1$
-	private static final String SRC_INFO_PATH= SRC_INFO_FOLDER + File.separator + "source.info"; //$NON-NLS-1$
-
-	private static final String BUNDLE_INFO_FOLDER= "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-	private static final String BUNDLE_INFO_PATH = BUNDLE_INFO_FOLDER + File.separator + "bundles.info"; //$NON-NLS-1$
-
-
-	/**
-	 * Finds the bundle info for the given arguments.
-	 * <p>
-	 * The first match will be returned if more than one bundle matches the arguments.
-	 * </p>
-	 * 
-	 * @param symbolicName the symbolic name
-	 * @param version the bundle version
-	 * @param isSourceBundle <code>true</code> if it is a source bundle <code>false</code> otherwise
-	 * @return the bundle info or <code>null</code> if not found
-	 */
-	public static BundleInfo findBundle(String symbolicName, Version version, boolean isSourceBundle) {
-		Assert.isLegal(symbolicName != null);
-		Assert.isLegal(version != null);
-
-		return findBundle(symbolicName, new VersionRange(version, true, version, true), isSourceBundle);
-	}
-
-	/**
-	 * Adds the directories (as <code>java.io.File</code>) for the given location and all of its parents to the given list.
-	 * 
-	 * @param locations the list to add the URLs to
-	 * @param location the location
-	 * @param useParent <code>true</code> if location's parent directory should be used <code>false</code> otherwise
-	 */
-	private static void addLocationDirs(List locations, Location location, boolean useParent) {
-		while (location != null) {
-			URL url= location.getURL();
-			if (url != null) {
-				try {
-					File dir = new File(FileLocator.toFileURL(url).getPath());
-					if (useParent)
-						dir = dir.getParentFile();
-					if (!locations.contains(dir))
-						locations.add(dir);
-				} catch (IOException e) {
-					JUnitPlugin.log(e);
-				}
-			}
-			location= location.getParentLocation();
-		}
-	}
-
-	/**
-	 * Finds the bundle info for the given arguments.
-	 * <p>
-	 * The first match will be returned if more than one bundle matches the arguments.
-	 * </p>
-	 * 
-	 * @param symbolicName the symbolic name
-	 * @param versionRange the version range for the bundle version
-	 * @param isSourceBundle <code>true</code> if it is a source bundle <code>false</code> otherwise
-	 * @return the bundle info or <code>null</code> if not found
-	 */
-	public static BundleInfo findBundle(String symbolicName, VersionRange versionRange, boolean isSourceBundle) {
-		Assert.isLegal(symbolicName != null);
-		Assert.isLegal(versionRange != null);
-
-		SimpleConfiguratorManipulator manipulator= (SimpleConfiguratorManipulator)JUnitPlugin.getDefault().getService(SimpleConfiguratorManipulator.class.getName());
-		if (manipulator == null)
-			return null;
-
-		List bundleLocations = new ArrayList();
-		addLocationDirs(bundleLocations, Platform.getConfigurationLocation(), true);
-		addLocationDirs(bundleLocations, Platform.getInstallLocation(), false);
-
-		for (Location configLocation= Platform.getConfigurationLocation(); configLocation != null; configLocation= configLocation.getParentLocation()) {
-			URL configUrl= configLocation.getURL();
-			if (configUrl == null)
-				continue;
-
-			try {
-				String bundleInfoPath= null;
-				if (isSourceBundle)
-					bundleInfoPath= SRC_INFO_PATH;
-				else
-					bundleInfoPath= BUNDLE_INFO_PATH;
-
-				URL bundlesTxt = new URL(configUrl.getProtocol(), configUrl.getHost(), new File(configUrl.getPath(), bundleInfoPath).getAbsolutePath());
-
-				for (Iterator i= bundleLocations.iterator(); i.hasNext(); ) {
-					File home= (File) i.next();
-					BundleInfo bundles[]= manipulator.loadConfiguration(bundlesTxt, home);
-					if (bundles != null) {
-						for (int j= 0; j < bundles.length; j++) {
-							BundleInfo bundle= bundles[j];
-							if (symbolicName.equals(bundle.getSymbolicName()) && versionRange.isIncluded(new Version(bundle.getVersion()))) {
-								IPath path= getBundleLocationPath(bundle);
-								if (path.toFile().exists())
-									return bundle;
-							}
-						}
-					}
-				}
-			} catch (MalformedURLException e) {
-				JUnitPlugin.log(e);
-			} catch (IOException e) {
-				JUnitPlugin.log(e);
-			}
-		}
-		
-		return null;
-	}
-
-	/**
-	 * Returns the bundle location path.
-	 * 
-	 * @param bundleInfo the bundle info or <code>null</code>
-	 * @return the bundle location or <code>null</code> if it is not possible to convert to a path
-	 */
-	public static IPath getBundleLocationPath(BundleInfo bundleInfo) {
-		if (bundleInfo == null)
-			return null;
-	
-		URI bundleLocation= bundleInfo.getLocation();
-		if (bundleLocation == null)
-			return null;
-		
-		try {
-			String fileStr= FileLocator.toFileURL(URIUtil.toURL(bundleLocation)).getPath();
-			fileStr= URLDecoder.decode(fileStr, "UTF-8"); //$NON-NLS-1$
-			return new Path(fileStr);
-		} catch (IOException e) {
-			JUnitPlugin.log(e);
-			return null;
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/AssertionVMArg.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/AssertionVMArg.java
index d6cb686..74b4e94 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/AssertionVMArg.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/AssertionVMArg.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,14 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.launcher;
 
-import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.ui.JUnitPreferencesConstants;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
 
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 
@@ -80,13 +81,11 @@ public class AssertionVMArg {
 	}
 
 	public static boolean getEnableAssertionsPreference() {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		return store.getBoolean(JUnitPreferencesConstants.ENABLE_ASSERTIONS);
+		return Platform.getPreferencesService().getBoolean(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.ENABLE_ASSERTIONS, false, null);
 	}
 
 	public static void setEnableAssertionsPreference(boolean preference) {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		store.setValue(JUnitPreferencesConstants.ENABLE_ASSERTIONS, preference);
+		new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).putBoolean(JUnitPreferencesConstants.ENABLE_ASSERTIONS, preference);
 	}
 
 	/* not needed unless you're manipulating already entered configurations
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java
deleted file mode 100644
index 189db65..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit3TestFinder.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Saff (saff at mit.edu) - initial API and implementation
- *             (bug 102632: [JUnit] Support for JUnit 4.)
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.launcher;
-
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IRegion;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
-
-public class JUnit3TestFinder implements ITestFinder {
-
-	public void findTestsInContainer(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
-		if (element == null || result == null) {
-			throw new IllegalArgumentException();
-		}
-
-		if (pm == null)
-			pm= new NullProgressMonitor();
-
-		pm.beginTask(JUnitMessages.TestSearchEngine_message_searching, 10);
-		try {
-			if (element instanceof IType) {
-				if (isTest((IType) element)) {
-					result.add(element);
-				}
-			} else if (element instanceof ICompilationUnit) {
-				IType[] types= ((ICompilationUnit) element).getAllTypes();
-				for (int i= 0; i < types.length; i++) {
-					IType type= types[i];
-					if (isTest(types[i])) {
-						result.add(type);
-					}
-				}
-			} else {
-				findTestCases(element, result, new SubProgressMonitor(pm, 7));
-				if (pm.isCanceled()) {
-					return;
-				}
-				TestSearchEngine.findSuiteMethods(element, result, new SubProgressMonitor(pm, 3));
-			}
-			if (pm.isCanceled()) {
-				return;
-			}
-		} finally {
-			pm.done();
-		}
-	}
-
-	private static void findTestCases(IJavaElement element, Set result, IProgressMonitor pm) throws JavaModelException {
-		IJavaProject javaProject= element.getJavaProject();
-
-		IType testCaseType= javaProject.findType(JUnitPlugin.TEST_INTERFACE_NAME);
-		if (testCaseType == null)
-			return;
-
-		IRegion region= TestSearchEngine.getRegion(element);
-		ITypeHierarchy typeHierarchy= javaProject.newTypeHierarchy(testCaseType, region, pm);
-		TestSearchEngine.findTestImplementorClasses(typeHierarchy, testCaseType, region, result);
-	}
-
-	public boolean isTest(IType type) throws JavaModelException {
-		return TestSearchEngine.isAccessibleClass(type) && (TestSearchEngine.hasSuiteMethod(type) || isTestImplementor(type));
-	}
-
-	private static boolean isTestImplementor(IType type) throws JavaModelException {
-		if (!Flags.isAbstract(type.getFlags()) && TestSearchEngine.isTestImplementor(type)) {
-			return true;
-		}
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java
deleted file mode 100644
index 7cf4a18..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnit4TestFinder.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   David Saff (saff at mit.edu) - initial API and implementation
- *             (bug 102632: [JUnit] Support for JUnit 4.)
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.launcher;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IRegion;
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.IAnnotationBinding;
-import org.eclipse.jdt.core.dom.IBinding;
-import org.eclipse.jdt.core.dom.IMethodBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.jdt.core.dom.Modifier;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
-
-
-public class JUnit4TestFinder implements ITestFinder {
-
-	private static class Annotation {
-
-		private static final Annotation RUN_WITH= new Annotation("org.junit.runner.RunWith"); //$NON-NLS-1$
-		private static final Annotation TEST= new Annotation("org.junit.Test"); //$NON-NLS-1$
-
-		private final String fName;
-
-		private Annotation(String name) {
-			fName= name;
-		}
-
-		public String getName() {
-			return fName;
-		}
-
-		private boolean annotates(IAnnotationBinding[] annotations) {
-			for (int i= 0; i < annotations.length; i++) {
-				ITypeBinding annotationType= annotations[i].getAnnotationType();
-				if (annotationType != null && (annotationType.getQualifiedName().equals(fName))) {
-					return true;
-				}
-			}
-			return  false;
-		}
-
-		public boolean annotatesTypeOrSuperTypes(ITypeBinding type) {
-			while (type != null) {
-				if (annotates(type.getAnnotations())) {
-					return true;
-				}
-				type= type.getSuperclass();
-			}
-			return false;
-		}
-
-		public boolean annotatesAtLeastOneMethod(ITypeBinding type) {
-			while (type != null) {
-				IMethodBinding[] declaredMethods= type.getDeclaredMethods();
-				for (int i= 0; i < declaredMethods.length; i++) {
-					IMethodBinding curr= declaredMethods[i];
-					if (annotates(curr.getAnnotations())) {
-						return true;
-					}
-				}
-				type= type.getSuperclass();
-			}
-			return false;
-		}
-	}
-
-	public void findTestsInContainer(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
-		if (element == null || result == null) {
-			throw new IllegalArgumentException();
-		}
-
-		if (element instanceof IType) {
-			if (internalIsTest((IType) element, pm)) {
-				result.add(element);
-				return;
-			}
-		}
-
-		if (pm == null)
-			pm= new NullProgressMonitor();
-
-		try {
-			pm.beginTask(JUnitMessages.JUnit4TestFinder_searching_description, 4);
-
-			IRegion region= TestSearchEngine.getRegion(element);
-			ITypeHierarchy hierarchy= JavaCore.newTypeHierarchy(region, null, new SubProgressMonitor(pm, 1));
-			IType[] allClasses= hierarchy.getAllClasses();
-
-			// search for all types with references to RunWith and Test and all subclasses
-			HashSet candidates= new HashSet(allClasses.length);
-			SearchRequestor requestor= new AnnotationSearchRequestor(hierarchy, candidates);
-
-			IJavaSearchScope scope= SearchEngine.createJavaSearchScope(allClasses, IJavaSearchScope.SOURCES);
-			int matchRule= SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE;
-			SearchPattern runWithPattern= SearchPattern.createPattern(Annotation.RUN_WITH.getName(), IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, matchRule);
-			SearchPattern testPattern= SearchPattern.createPattern(Annotation.TEST.getName(), IJavaSearchConstants.ANNOTATION_TYPE, IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE, matchRule);
-
-			SearchPattern annotationsPattern= SearchPattern.createOrPattern(runWithPattern, testPattern);
-			SearchParticipant[] searchParticipants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
-			new SearchEngine().search(annotationsPattern, searchParticipants, scope, requestor, new SubProgressMonitor(pm, 2));
-
-			// find all classes in the region
-			for (Iterator iterator= candidates.iterator(); iterator.hasNext();) {
-				IType curr= (IType) iterator.next();
-				if (TestSearchEngine.isAccessibleClass(curr) && !Flags.isAbstract(curr.getFlags()) && region.contains(curr)) {
-					result.add(curr);
-				}
-			}
-
-			// add all classes implementing JUnit 3.8's Test interface in the region
-			IType testInterface= element.getJavaProject().findType(JUnitPlugin.TEST_INTERFACE_NAME);
-			if (testInterface != null) {
-				TestSearchEngine.findTestImplementorClasses(hierarchy, testInterface, region, result);
-			}
-
-			//JUnit 4.3 can also run JUnit-3.8-style public static Test suite() methods:
-			TestSearchEngine.findSuiteMethods(element, result, new SubProgressMonitor(pm, 1));
-		} finally {
-			pm.done();
-		}
-	}
-
-	private static class AnnotationSearchRequestor extends SearchRequestor {
-
-		private final Collection fResult;
-		private final ITypeHierarchy fHierarchy;
-
-		public AnnotationSearchRequestor(ITypeHierarchy hierarchy, Collection result) {
-			fHierarchy= hierarchy;
-			fResult= result;
-		}
-
-		public void acceptSearchMatch(SearchMatch match) throws CoreException {
-			if (match.getAccuracy() == SearchMatch.A_ACCURATE && !match.isInsideDocComment()) {
-				Object element= match.getElement();
-				if (element instanceof IType || element instanceof IMethod) {
-					IMember member= (IMember) element;
-					if (member.getNameRange().getOffset() > match.getOffset()) {
-						IType type= member.getElementType() == IJavaElement.TYPE ? (IType) member : member.getDeclaringType();
-						addTypeAndSubtypes(type);
-					}
-				}
-			}
-		}
-
-		private void addTypeAndSubtypes(IType type) {
-			if (fResult.add(type)) {
-				IType[] subclasses= fHierarchy.getSubclasses(type);
-				for (int i= 0; i < subclasses.length; i++) {
-					addTypeAndSubtypes(subclasses[i]);
-				}
-			}
-		}
-	}
-
-	public boolean isTest(IType type) throws JavaModelException {
-		return internalIsTest(type, null);
-	}
-
-	private boolean internalIsTest(IType type, IProgressMonitor monitor) throws JavaModelException {
-		if (TestSearchEngine.isAccessibleClass(type)) {
-			if (TestSearchEngine.hasSuiteMethod(type)) { // since JUnit 4.3.1
-				return true;
-			}
-			ASTParser parser= ASTParser.newParser(AST.JLS3);
-			/* TODO: When bug 156352 is fixed:
-			parser.setProject(type.getJavaProject());
-			IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, monitor);
-			if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
-				ITypeBinding binding= (ITypeBinding) bindings[0];
-				return isTest(binding);
-			}*/
-
-			if (type.getCompilationUnit() != null) {
-				parser.setSource(type.getCompilationUnit());
-			} else if (!isAvailable(type.getSourceRange())) { // class file with no source
-				parser.setProject(type.getJavaProject());
-				IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, monitor);
-				if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
-					ITypeBinding binding= (ITypeBinding) bindings[0];
-					return isTest(binding);
-				}
-				return false;
-			} else {
-				parser.setSource(type.getClassFile());
-			}
-			parser.setFocalPosition(0);
-			parser.setResolveBindings(true);
-			CompilationUnit root= (CompilationUnit) parser.createAST(monitor);
-			ASTNode node= root.findDeclaringNode(type.getKey());
-			if (node instanceof TypeDeclaration) {
-				ITypeBinding binding= ((TypeDeclaration) node).resolveBinding();
-				if (binding != null) {
-					return isTest(binding);
-				}
-			}
-		}
-		return false;
-
-	}
-
-    private static boolean isAvailable(ISourceRange range) {
-		return range != null && range.getOffset() != -1;
-	}
-
-
-	private boolean isTest(ITypeBinding binding) {
-		if (Modifier.isAbstract(binding.getModifiers()))
-			return false;
-
-		if (Annotation.RUN_WITH.annotatesTypeOrSuperTypes(binding) || Annotation.TEST.annotatesAtLeastOneMethod(binding)) {
-			return true;
-		}
-		return TestSearchEngine.isTestImplementor(binding);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java
deleted file mode 100644
index d36d2d4..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchConfigurationConstants.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-
-/**
- * Attribute keys used by the IJUnitLaunchConfiguration. Note that these constants are not API and
- * might change in the future.
- */
-public class JUnitLaunchConfigurationConstants {
-
-	public static final String MODE_RUN_QUIETLY_MODE = "runQuietly"; //$NON-NLS-1$
-	public static final String ID_JUNIT_APPLICATION= "org.eclipse.jdt.junit.launchconfig"; //$NON-NLS-1$
-
-	public static final String ATTR_NO_DISPLAY = JUnitPlugin.PLUGIN_ID + ".NO_DISPLAY"; //$NON-NLS-1$
-
-
-
-	public static final String ATTR_PORT= JUnitPlugin.PLUGIN_ID+".PORT"; //$NON-NLS-1$
-
-	/**
-	 * The test method, or "" iff running the whole test type.
-	 */
-	public static final String ATTR_TEST_METHOD_NAME= JUnitPlugin.PLUGIN_ID+".TESTNAME"; //$NON-NLS-1$
-
-	public static final String ATTR_KEEPRUNNING = JUnitPlugin.PLUGIN_ID+ ".KEEPRUNNING_ATTR"; //$NON-NLS-1$
-	/**
-	 * The launch container, or "" iff running a single test type.
-	 */
-	public static final String ATTR_TEST_CONTAINER= JUnitPlugin.PLUGIN_ID+".CONTAINER"; //$NON-NLS-1$
-
-	public static final String ATTR_FAILURES_NAMES= JUnitPlugin.PLUGIN_ID+".FAILURENAMES"; //$NON-NLS-1$
-
-	public static final String ATTR_TEST_RUNNER_KIND= JUnitPlugin.PLUGIN_ID+".TEST_KIND"; //$NON-NLS-1$
-
-	public static ITestKind getTestRunnerKind(ILaunchConfiguration launchConfiguration) {
-		try {
-			String loaderId = launchConfiguration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_RUNNER_KIND, (String) null);
-			if (loaderId != null) {
-				return TestKindRegistry.getDefault().getKind(loaderId);
-			}
-		} catch (CoreException e) {
-		}
-		return  ITestKind.NULL;
-	}
-
-	public static IJavaProject getJavaProject(ILaunchConfiguration configuration) {
-		try {
-			String projectName= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null);
-			if (projectName != null && projectName.length() > 0) {
-				return JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName));
-			}
-		} catch (CoreException e) {
-		}
-		return null;
-	}
-
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/LaunchErrorStatusHandler.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/LaunchErrorStatusHandler.java
new file mode 100644
index 0000000..53a41a9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/LaunchErrorStatusHandler.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.launcher;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.debug.core.IStatusHandler;
+
+import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
+import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
+
+public class LaunchErrorStatusHandler implements IStatusHandler {
+
+	public Object handleStatus(final IStatus status, Object source) throws CoreException {
+		final Boolean[] success= new Boolean[] { Boolean.FALSE };
+		getDisplay().syncExec(
+				new Runnable() {
+					public void run() {
+						Shell shell= JUnitPlugin.getActiveWorkbenchShell();
+						if (shell == null)
+							shell= getDisplay().getActiveShell();
+						if (shell != null) {
+							MessageDialog.openInformation(shell, JUnitMessages.JUnitLaunchConfigurationDelegate_dialog_title, status.getMessage());
+							success[0]= Boolean.TRUE;
+						}
+					}
+				}
+		);
+		if (success[0] == Boolean.TRUE) {
+			return null;
+		}
+		throw new CoreException(status);
+	}
+
+	private Display getDisplay() {
+		Display display;
+		display= Display.getCurrent();
+		if (display == null)
+			display= Display.getDefault();
+		return display;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java
deleted file mode 100644
index fa50100..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKind.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Saff (saff at mit.edu) - initial API and implementation
- *             (bug 102632: [JUnit] Support for JUnit 4.)
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-
-public class TestKind implements ITestKind {
-
-	private final IConfigurationElement fElement;
-	private ITestFinder fFinder;
-
-	public TestKind(IConfigurationElement element) {
-		fElement = element;
-		fFinder= null;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#createFinder()
-	 */
-	public ITestFinder getFinder() {
-		if (fFinder == null) {
-			try {
-				fFinder= (ITestFinder) fElement.createExecutableExtension(FINDER_CLASS_NAME);
-			} catch (CoreException e1) {
-				JUnitPlugin.log(e1);
-				fFinder= ITestFinder.NULL;
-			}
-		}
-		return fFinder;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getDisplayName()
-	 */
-	public String getDisplayName() {
-		return getAttribute(DISPLAY_NAME);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getFinderClassName()
-	 */
-	public String getFinderClassName() {
-		return getAttribute(FINDER_CLASS_NAME);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getId()
-	 */
-	public String getId() {
-		return getAttribute(ID);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getLoaderClassName()
-	 */
-	public String getLoaderClassName() {
-		return getAttribute(LOADER_CLASS_NAME);
-	}
-
-	public String getLoaderPluginId() {
-		return getAttribute(LOADER_PLUGIN_ID);
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getPrecededKindId()
-	 */
-	public String getPrecededKindId() {
-		String attribute= getAttribute(PRECEDES);
-		return attribute == null ? "" : attribute; //$NON-NLS-1$
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#isNull()
-	 */
-	public boolean isNull() {
-		return false;
-	}
-
-	protected String getAttribute(String attributeName) {
-		return fElement.getAttribute(attributeName);
-	}
-
-	boolean precedes(ITestKind otherKind) {
-		final String precededKindId = getPrecededKindId();
-		String[] ids = precededKindId.split(","); //$NON-NLS-1$
-		for (int i = 0; i < ids.length; i++) {
-			if (ids[i].equals(otherKind.getId()))
-				return true;
-		}
-		return false;
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestKind#getClasspathEntries()
-	 */
-	public JUnitRuntimeClasspathEntry[] getClasspathEntries() {
-		IConfigurationElement[] children= fElement.getChildren(ITestKind.RUNTIME_CLASSPATH_ENTRY);
-		JUnitRuntimeClasspathEntry[] returnThis= new JUnitRuntimeClasspathEntry[children.length];
-		for (int i= 0; i < children.length; i++) {
-			IConfigurationElement element= children[i];
-			String pluginID= element.getAttribute(ITestKind.CLASSPATH_PLUGIN_ID);
-			String pathToJar= element.getAttribute(ITestKind.CLASSPATH_PATH_TO_JAR);
-			returnThis[i]= new JUnitRuntimeClasspathEntry(pluginID, pathToJar);
-		}
-		return returnThis;
-	}
-
-	/*
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		return getDisplayName() + " (id: " + getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java
deleted file mode 100644
index 8927abe..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestKindRegistry.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Saff (saff at mit.edu) - initial API and implementation
- *             (bug 102632: [JUnit] Support for JUnit 4.)
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.launcher;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-
-import org.eclipse.jdt.core.IJavaElement;
-
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
-
-public class TestKindRegistry {
-
-	public static final String JUNIT3_TEST_KIND_ID= "org.eclipse.jdt.junit.loader.junit3"; //$NON-NLS-1$
-	public static final String JUNIT4_TEST_KIND_ID= "org.eclipse.jdt.junit.loader.junit4"; //$NON-NLS-1$
-
-	public static TestKindRegistry getDefault() {
-		if (fgRegistry != null)
-			return fgRegistry;
-
-		fgRegistry= new TestKindRegistry(Platform.getExtensionRegistry().getExtensionPoint(JUnitPlugin.ID_EXTENSION_POINT_TEST_KINDS));
-		return fgRegistry;
-	}
-
-	private static TestKindRegistry fgRegistry;
-
-	private final IExtensionPoint fPoint;
-	private ArrayList/*<TestKind>*/ fTestKinds;
-
-	private TestKindRegistry(IExtensionPoint point) {
-		fPoint = point;
-	}
-
-	public ArrayList/*<TestKind>*/ getAllKinds() {
-		loadKinds();
-		return fTestKinds;
-	}
-
-	private void loadKinds() {
-		if (fTestKinds != null)
-			return;
-
-		ArrayList items= new ArrayList();
-		for (Iterator iter= getConfigurationElements().iterator(); iter.hasNext();) {
-			IConfigurationElement element= (IConfigurationElement) iter.next();
-			items.add(new TestKind(element));
-		}
-
-		Collections.sort(items, new Comparator() {
-			public int compare(Object arg0, Object arg1) {
-				TestKind kind0 = (TestKind) arg0;
-				TestKind kind1 = (TestKind) arg1;
-
-				if (kind0.precedes(kind1))
-					return -1;
-				if (kind1.precedes(kind0))
-					return 1;
-				return 0;
-			}
-		});
-		fTestKinds= items;
-	}
-
-	public ArrayList/*<String>*/ getDisplayNames() {
-		ArrayList result = new ArrayList();
-		ArrayList testTypes = getAllKinds();
-		for (Iterator iter = testTypes.iterator(); iter.hasNext();) {
-			ITestKind type = (ITestKind) iter.next();
-			result.add(type.getDisplayName());
-		}
-		return result;
-	}
-
-	/**
-	 * @param testKindId an id, can be <code>null</code>
-	 * @return a TestKind, ITestKind.NULL if not available
-	 */
-	public ITestKind getKind(String testKindId) {
-		if (testKindId != null) {
-			for (Iterator iter= getAllKinds().iterator(); iter.hasNext();) {
-				TestKind kind= (TestKind) iter.next();
-				if (testKindId.equals(kind.getId()))
-					return kind;
-			}
-		}
-		return ITestKind.NULL;
-	}
-
-	public static String getContainerTestKindId(IJavaElement element) {
-		return element != null && TestSearchEngine.hasTestAnnotation(element.getJavaProject()) ? JUNIT4_TEST_KIND_ID : JUNIT3_TEST_KIND_ID;
-	}
-
-	public static ITestKind getContainerTestKind(IJavaElement element) {
-		return getDefault().getKind(getContainerTestKindId(element));
-	}
-
-	private ArrayList getConfigurationElements() {
-		ArrayList items= new ArrayList();
-		IExtension[] extensions= fPoint.getExtensions();
-		for (int i= 0; i < extensions.length; i++) {
-			IExtension extension= extensions[i];
-			IConfigurationElement[] elements= extension.getConfigurationElements();
-			for (int j= 0; j < elements.length; j++) {
-				IConfigurationElement element= elements[j];
-				items.add(element);
-			}
-		}
-		return items;
-	}
-
-	public String getAllKindIds() {
-		ArrayList allKinds= getAllKinds();
-		String returnThis= ""; //$NON-NLS-1$
-		for (Iterator iter= allKinds.iterator(); iter.hasNext();) {
-			ITestKind kind= (ITestKind) iter.next();
-			returnThis+= "(" + kind.getId() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		return returnThis;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java
deleted file mode 100644
index 0ff6231..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/TestSelectionDialog.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.launcher;
-
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.viewers.LabelProvider;
-
-import org.eclipse.ui.dialogs.TwoPaneElementSelector;
-
-import org.eclipse.jdt.core.IType;
-
-import org.eclipse.jdt.ui.JavaElementLabelProvider;
-
-/**
- * A dialog to select a test class or a test suite from a list of types.
- */
-public class TestSelectionDialog extends TwoPaneElementSelector {
-
-	private final IType[] fTypes;
-
-	private static class PackageRenderer extends LabelProvider {
-
-		private JavaElementLabelProvider fBaseLabelProvider;
-
-		public PackageRenderer() {
-			fBaseLabelProvider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_PARAMETERS | JavaElementLabelProvider.SHOW_POST_QUALIFIED | JavaElementLabelProvider.SHOW_ROOT);
-		}
-
-		public Image getImage(Object element) {
-			return fBaseLabelProvider.getImage(((IType)element).getPackageFragment());
-		}
-
-		public String getText(Object element) {
-			return fBaseLabelProvider.getText(((IType)element).getPackageFragment());
-		}
-
-		public void dispose() {
-			fBaseLabelProvider.dispose();
-		}
-
-	}
-
-	public TestSelectionDialog(Shell shell, IType[] types) {
-		super(shell, new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_BASICS | JavaElementLabelProvider.SHOW_OVERLAY_ICONS),
-				new PackageRenderer());
-		fTypes= types;
-	}
-
-	/**
-	 * @see org.eclipse.jface.window.Window#configureShell(Shell)
-	 */
-	protected void configureShell(Shell newShell) {
-		super.configureShell(newShell);
-		//PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, new Object[] { IJavaHelpContextIds.MAINTYPE_SELECTION_DIALOG });
-	}
-
-	/*
-	 * @see Window#open()
-	 */
-	public int open() {
-		setElements(fTypes);
-		return super.open();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java
deleted file mode 100644
index a7f2d5a..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/IXMLTags.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au)
- *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-public interface IXMLTags {
-
-	public static final String NODE_TESTRUN= "testrun"; //$NON-NLS-1$
-	public static final String NODE_TESTSUITES= "testsuites"; //$NON-NLS-1$
-	public static final String NODE_TESTSUITE= "testsuite"; //$NON-NLS-1$
-	public static final String NODE_PROPERTIES= "properties"; //$NON-NLS-1$
-	public static final String NODE_PROPERTY= "property"; //$NON-NLS-1$
-	public static final String NODE_TESTCASE= "testcase"; //$NON-NLS-1$
-	public static final String NODE_ERROR= "error"; //$NON-NLS-1$
-	public static final String NODE_FAILURE= "failure"; //$NON-NLS-1$
-	public static final String NODE_EXPECTED= "expected";  //$NON-NLS-1$
-	public static final String NODE_ACTUAL= "actual";  //$NON-NLS-1$
-	public static final String NODE_SYSTEM_OUT= "system-out"; //$NON-NLS-1$
-	public static final String NODE_SYSTEM_ERR= "system-err"; //$NON-NLS-1$
-
-	/**
-	 * value: String
-	 */
-	public static final String ATTR_NAME= "name"; //$NON-NLS-1$
-	/**
-	 * value: String
-	 */
-	public static final String ATTR_PROJECT= "project"; //$NON-NLS-1$
-	/**
-	 * value: Integer
-	 */
-	public static final String ATTR_TESTS= "tests"; //$NON-NLS-1$
-	/**
-	 * value: Integer
-	 */
-	public static final String ATTR_STARTED= "started"; //$NON-NLS-1$
-	/**
-	 * value: Integer
-	 */
-	public static final String ATTR_FAILURES= "failures"; //$NON-NLS-1$
-	/**
-	 * value: Integer
-	 */
-	public static final String ATTR_ERRORS= "errors"; //$NON-NLS-1$
-	/**
-	 * value: Boolean
-	 */
-	public static final String ATTR_IGNORED= "ignored"; //$NON-NLS-1$
-	/**
-	 * value: String
-	 */
-	public static final String ATTR_PACKAGE= "package"; //$NON-NLS-1$
-	/**
-	 * value: String
-	 */
-	public static final String ATTR_ID= "id"; //$NON-NLS-1$
-	/**
-	 * value: String
-	 */
-	public static final String ATTR_CLASSNAME= "classname"; //$NON-NLS-1$
-	/**
-	 * value: Boolean
-	 */
-	public static final String ATTR_INCOMPLETE= "incomplete"; //$NON-NLS-1$
-	/**
-	 * value: Double
-	 */
-	public static final String ATTR_TIME= "time"; //$NON-NLS-1$
-//	public static final String ATTR_MESSAGE= "message"; //$NON-NLS-1$
-//	public static final String ATTR_TYPE= "type"; //$NON-NLS-1$
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java
deleted file mode 100644
index f8694c8..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/JUnitModel.java
+++ /dev/null
@@ -1,543 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PartInitException;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchListener;
-import org.eclipse.debug.core.ILaunchManager;
-
-import org.eclipse.jdt.core.IJavaProject;
-
-import org.eclipse.jdt.internal.junit.BasicElementLabels;
-import org.eclipse.jdt.internal.junit.Messages;
-import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
-import org.eclipse.jdt.internal.junit.model.TestElement.Status;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.ui.JUnitPreferencesConstants;
-import org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart;
-
-/**
- * Central registry for JUnit test runs.
- */
-public final class JUnitModel {
-
-	private final class JUnitLaunchListener implements ILaunchListener {
-
-		/**
-		 * Used to track new launches. We need to do this
-		 * so that we only attach a TestRunner once to a launch.
-		 * Once a test runner is connected, it is removed from the set.
-		 */
-		private HashSet fTrackedLaunches= new HashSet(20);
-
-		/*
-		 * @see ILaunchListener#launchAdded(ILaunch)
-		 */
-		public void launchAdded(ILaunch launch) {
-			fTrackedLaunches.add(launch);
-		}
-
-		/*
-		 * @see ILaunchListener#launchRemoved(ILaunch)
-		 */
-		public void launchRemoved(final ILaunch launch) {
-			fTrackedLaunches.remove(launch);
-			//TODO: story for removing old test runs?
-//			getDisplay().asyncExec(new Runnable() {
-//				public void run() {
-//					TestRunnerViewPart testRunnerViewPart= findTestRunnerViewPartInActivePage();
-//					if (testRunnerViewPart != null && testRunnerViewPart.isCreated() && launch.equals(testRunnerViewPart.getLastLaunch()))
-//						testRunnerViewPart.reset();
-//				}
-//			});
-		}
-
-		/*
-		 * @see ILaunchListener#launchChanged(ILaunch)
-		 */
-		public void launchChanged(final ILaunch launch) {
-			if (!fTrackedLaunches.contains(launch))
-				return;
-
-			ILaunchConfiguration config= launch.getLaunchConfiguration();
-			if (config == null)
-				return;
-
-			final IJavaProject javaProject= JUnitLaunchConfigurationConstants.getJavaProject(config);
-			if (javaProject == null)
-				return;
-
-			// test whether the launch defines the JUnit attributes
-			String portStr= launch.getAttribute(JUnitLaunchConfigurationConstants.ATTR_PORT);
-			if (portStr == null)
-				return;
-			try {
-				final int port= Integer.parseInt(portStr);
-				fTrackedLaunches.remove(launch);
-				getDisplay().asyncExec(new Runnable() {
-					public void run() {
-						connectTestRunner(launch, javaProject, port);
-					}
-				});
-			} catch (NumberFormatException e) {
-				return;
-			}
-		}
-
-		private void connectTestRunner(ILaunch launch, IJavaProject javaProject, int port) {
-			showTestRunnerViewPartInActivePage(findTestRunnerViewPartInActivePage());
-
-			//TODO: Do notifications have to be sent in UI thread?
-			// Check concurrent access to fTestRunSessions (no problem inside asyncExec())
-			int maxCount= JUnitPlugin.getDefault().getPreferenceStore().getInt(JUnitPreferencesConstants.MAX_TEST_RUNS);
-			int toDelete= fTestRunSessions.size() - maxCount;
-			while (toDelete > 0) {
-				toDelete--;
-				TestRunSession session= (TestRunSession) fTestRunSessions.removeLast();
-				notifyTestRunSessionRemoved(session);
-			}
-
-			TestRunSession testRunSession= new TestRunSession(launch, javaProject, port);
-			addTestRunSession(testRunSession);
-		}
-
-		private TestRunnerViewPart showTestRunnerViewPartInActivePage(TestRunnerViewPart testRunner) {
-			IWorkbenchPart activePart= null;
-			IWorkbenchPage page= null;
-			try {
-				// TODO: have to force the creation of view part contents
-				// otherwise the UI will not be updated
-				if (testRunner != null && testRunner.isCreated())
-					return testRunner;
-				page= JUnitPlugin.getActivePage();
-				if (page == null)
-					return null;
-				activePart= page.getActivePart();
-				//	show the result view if it isn't shown yet
-				return (TestRunnerViewPart) page.showView(TestRunnerViewPart.NAME);
-			} catch (PartInitException pie) {
-				JUnitPlugin.log(pie);
-				return null;
-			} finally{
-				//restore focus stolen by the creation of the result view
-				if (page != null && activePart != null)
-					page.activate(activePart);
-			}
-		}
-
-		private TestRunnerViewPart findTestRunnerViewPartInActivePage() {
-			IWorkbenchPage page= JUnitPlugin.getActivePage();
-			if (page == null)
-				return null;
-			return (TestRunnerViewPart) page.findView(TestRunnerViewPart.NAME);
-		}
-
-		private Display getDisplay() {
-//			Shell shell= getActiveWorkbenchShell();
-//			if (shell != null) {
-//				return shell.getDisplay();
-//			}
-			Display display= Display.getCurrent();
-			if (display == null) {
-				display= Display.getDefault();
-			}
-			return display;
-		}
-	}
-
-	/**
-	 * @deprecated to prevent deprecation warnings
-	 */
-	private static final class LegacyTestRunSessionListener implements ITestRunSessionListener {
-		private TestRunSession fActiveTestRunSession;
-		private ITestSessionListener fTestSessionListener;
-
-		public void sessionAdded(TestRunSession testRunSession) {
-			// Only serve one legacy ITestRunListener at a time, since they cannot distinguish between different concurrent test sessions:
-			if (fActiveTestRunSession != null)
-				return;
-
-			fActiveTestRunSession= testRunSession;
-
-			fTestSessionListener= new ITestSessionListener() {
-				public void testAdded(TestElement testElement) {
-				}
-
-				public void sessionStarted() {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testRunStarted(fActiveTestRunSession.getTotalCount());
-					}
-				}
-				public void sessionTerminated() {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testRunTerminated();
-					}
-					sessionRemoved(fActiveTestRunSession);
-				}
-				public void sessionStopped(long elapsedTime) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testRunStopped(elapsedTime);
-					}
-					sessionRemoved(fActiveTestRunSession);
-				}
-				public void sessionEnded(long elapsedTime) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testRunEnded(elapsedTime);
-					}
-					sessionRemoved(fActiveTestRunSession);
-				}
-				public void runningBegins() {
-					// ignore
-				}
-				public void testStarted(TestCaseElement testCaseElement) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testStarted(testCaseElement.getId(), testCaseElement.getTestName());
-					}
-				}
-
-				public void testFailed(TestElement testElement, Status status, String trace, String expected, String actual) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testFailed(status.getOldCode(), testElement.getId(), testElement.getTestName(), trace);
-					}
-				}
-
-				public void testEnded(TestCaseElement testCaseElement) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testEnded(testCaseElement.getId(), testCaseElement.getTestName());
-					}
-				}
-
-				public void testReran(TestCaseElement testCaseElement, Status status, String trace, String expectedResult, String actualResult) {
-					org.eclipse.jdt.junit.ITestRunListener[] testRunListeners= JUnitPlugin.getDefault().getTestRunListeners();
-					for (int i= 0; i < testRunListeners.length; i++) {
-						testRunListeners[i].testReran(testCaseElement.getId(), testCaseElement.getClassName(), testCaseElement.getTestMethodName(), status.getOldCode(), trace);
-					}
-				}
-
-				public boolean acceptsSwapToDisk() {
-					return true;
-				}
-			};
-			fActiveTestRunSession.addTestSessionListener(fTestSessionListener);
-		}
-
-		public void sessionRemoved(TestRunSession testRunSession) {
-			if (fActiveTestRunSession == testRunSession) {
-				fActiveTestRunSession.removeTestSessionListener(fTestSessionListener);
-				fTestSessionListener= null;
-				fActiveTestRunSession= null;
-			}
-		}
-	}
-
-	private final ListenerList fTestRunSessionListeners= new ListenerList();
-	/**
-	 * Active test run sessions, youngest first.
-	 */
-	private final LinkedList/*<TestRunSession>*/ fTestRunSessions= new LinkedList();
-	private final ILaunchListener fLaunchListener= new JUnitLaunchListener();
-
-	/**
-	 * Starts the model (called by the {@link JUnitPlugin} on startup).
-	 */
-	public void start() {
-		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
-		launchManager.addLaunchListener(fLaunchListener);
-
-/*
- * TODO: restore on restart:
- * - only import headers!
- * - only import last n sessions; remove all other files in historyDirectory
- */
-//		File historyDirectory= JUnitPlugin.getHistoryDirectory();
-//		File[] swapFiles= historyDirectory.listFiles();
-//		if (swapFiles != null) {
-//			Arrays.sort(swapFiles, new Comparator() {
-//				public int compare(Object o1, Object o2) {
-//					String name1= ((File) o1).getName();
-//					String name2= ((File) o2).getName();
-//					return name1.compareTo(name2);
-//				}
-//			});
-//			for (int i= 0; i < swapFiles.length; i++) {
-//				final File file= swapFiles[i];
-//				SafeRunner.run(new ISafeRunnable() {
-//					public void run() throws Exception {
-//						importTestRunSession(file );
-//					}
-//					public void handleException(Throwable exception) {
-//						JUnitPlugin.log(exception);
-//					}
-//				});
-//			}
-//		}
-
-		addTestRunSessionListener(new LegacyTestRunSessionListener());
-	}
-
-	/**
-	 * Stops the model (called by the {@link JUnitPlugin} on shutdown).
-	 */
-	public void stop() {
-		ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
-		launchManager.removeLaunchListener(fLaunchListener);
-
-		File historyDirectory= JUnitPlugin.getHistoryDirectory();
-		File[] swapFiles= historyDirectory.listFiles();
-		if (swapFiles != null) {
-			for (int i= 0; i < swapFiles.length; i++) {
-				swapFiles[i].delete();
-			}
-		}
-
-//		for (Iterator iter= fTestRunSessions.iterator(); iter.hasNext();) {
-//			final TestRunSession session= (TestRunSession) iter.next();
-//			SafeRunner.run(new ISafeRunnable() {
-//				public void run() throws Exception {
-//					session.swapOut();
-//				}
-//				public void handleException(Throwable exception) {
-//					JUnitPlugin.log(exception);
-//				}
-//			});
-//		}
-	}
-
-
-	public void addTestRunSessionListener(ITestRunSessionListener listener) {
-		fTestRunSessionListeners.add(listener);
-	}
-
-	public void removeTestRunSessionListener(ITestRunSessionListener listener) {
-		fTestRunSessionListeners.remove(listener);
-	}
-
-
-	/**
-	 * @return a list of active {@link TestRunSession}s. The list is a copy of
-	 *         the internal data structure and modifications do not affect the
-	 *         global list of active sessions. The list is sorted by age, youngest first.
-	 */
-	public List getTestRunSessions() {
-		return new ArrayList(fTestRunSessions);
-	}
-
-	/**
-	 * Adds the given {@link TestRunSession} and notifies all registered
-	 * {@link ITestRunSessionListener}s.
-	 * <p>
-	 * <b>To be called in the UI thread only!</b>
-	 * </p>
-	 *
-	 * @param testRunSession the session to add
-	 */
-	public void addTestRunSession(TestRunSession testRunSession) {
-		Assert.isNotNull(testRunSession);
-		Assert.isLegal(! fTestRunSessions.contains(testRunSession));
-		fTestRunSessions.addFirst(testRunSession);
-		notifyTestRunSessionAdded(testRunSession);
-	}
-
-	/**
-	 * Imports a test run session from the given file.
-	 *
-	 * @param file a file containing a test run session transcript
-	 * @return the imported test run session
-	 * @throws CoreException if the import failed
-	 */
-	public static TestRunSession importTestRunSession(File file) throws CoreException {
-		try {
-			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
-//			parserFactory.setValidating(true); // TODO: add DTD and debug flag
-			SAXParser parser= parserFactory.newSAXParser();
-			TestRunHandler handler= new TestRunHandler();
-			parser.parse(file, handler);
-			TestRunSession session= handler.getTestRunSession();
-			JUnitPlugin.getModel().addTestRunSession(session);
-			return session;
-		} catch (ParserConfigurationException e) {
-			throwImportError(file, e);
-		} catch (SAXException e) {
-			throwImportError(file, e);
-		} catch (IOException e) {
-			throwImportError(file, e);
-		}
-		return null; // does not happen
-	}
-
-	public static void importIntoTestRunSession(File swapFile, TestRunSession testRunSession) throws CoreException {
-		try {
-			SAXParserFactory parserFactory= SAXParserFactory.newInstance();
-//			parserFactory.setValidating(true); // TODO: add DTD and debug flag
-			SAXParser parser= parserFactory.newSAXParser();
-			TestRunHandler handler= new TestRunHandler(testRunSession);
-			parser.parse(swapFile, handler);
-		} catch (ParserConfigurationException e) {
-			throwImportError(swapFile, e);
-		} catch (SAXException e) {
-			throwImportError(swapFile, e);
-		} catch (IOException e) {
-			throwImportError(swapFile, e);
-		}
-	}
-
-	/**
-	 * Exports the given test run session.
-	 *
-	 * @param testRunSession the test run session
-	 * @param file the destination
-	 * @throws CoreException if an error occurred
-	 */
-	public static void exportTestRunSession(TestRunSession testRunSession, File file) throws CoreException {
-		FileOutputStream out= null;
-		try {
-			out= new FileOutputStream(file);
-            exportTestRunSession(testRunSession, out);
-
-		} catch (IOException e) {
-			throwExportError(file, e);
-		} catch (TransformerConfigurationException e) {
-			throwExportError(file, e);
-		} catch (TransformerException e) {
-			throwExportError(file, e);
-		} finally {
-			if (out != null) {
-				try {
-					out.close();
-				} catch (IOException e2) {
-					JUnitPlugin.log(e2);
-				}
-			}
-		}
-	}
-
-	public static void exportTestRunSession(TestRunSession testRunSession, OutputStream out)
-			throws TransformerFactoryConfigurationError, TransformerException {
-
-		Transformer transformer= TransformerFactory.newInstance().newTransformer();
-		InputSource inputSource= new InputSource();
-		SAXSource source= new SAXSource(new TestRunSessionSerializer(testRunSession), inputSource);
-		StreamResult result= new StreamResult(out);
-		transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
-		transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
-		/*
-		 * Bug in Xalan: Only indents if proprietary property
-		 * org.apache.xalan.templates.OutputProperties.S_KEY_INDENT_AMOUNT is set.
-		 *
-		 * Bug in Xalan as shipped with J2SE 5.0:
-		 * Does not read the indent-amount property at all >:-(.
-		 */
-		try {
-			transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "2"); //$NON-NLS-1$ //$NON-NLS-2$
-		} catch (IllegalArgumentException e) {
-			// no indentation today...
-		}
-		transformer.transform(source, result);
-	}
-
-	private static void throwExportError(File file, Exception e) throws CoreException {
-		throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
-				JUnitPlugin.getPluginId(),
-				Messages.format(ModelMessages.JUnitModel_could_not_write, BasicElementLabels.getPathLabel(file)),
-				e));
-	}
-
-	private static void throwImportError(File file, Exception e) throws CoreException {
-		throw new CoreException(new org.eclipse.core.runtime.Status(IStatus.ERROR,
-				JUnitPlugin.getPluginId(),
-				Messages.format(ModelMessages.JUnitModel_could_not_read, BasicElementLabels.getPathLabel(file)),
-				e));
-	}
-
-	/**
-	 * Removes the given {@link TestRunSession} and notifies all registered
-	 * {@link ITestRunSessionListener}s.
-	 * <p>
-	 * <b>To be called in the UI thread only!</b>
-	 * </p>
-	 *
-	 * @param testRunSession the session to remove
-	 */
-	public void removeTestRunSession(TestRunSession testRunSession) {
-		boolean existed= fTestRunSessions.remove(testRunSession);
-		if (existed) {
-			notifyTestRunSessionRemoved(testRunSession);
-		}
-		testRunSession.removeSwapFile();
-	}
-
-	private void notifyTestRunSessionRemoved(TestRunSession testRunSession) {
-		testRunSession.stopTestRun();
-		ILaunch launch= testRunSession.getLaunch();
-		if (launch != null) {
-			ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
-			launchManager.removeLaunch(launch);
-		}
-
-		Object[] listeners = fTestRunSessionListeners.getListeners();
-		for (int i = 0; i < listeners.length; ++i) {
-			((ITestRunSessionListener) listeners[i]).sessionRemoved(testRunSession);
-		}
-	}
-
-	private void notifyTestRunSessionAdded(TestRunSession testRunSession) {
-		Object[] listeners = fTestRunSessionListeners.getListeners();
-		for (int i = 0; i < listeners.length; ++i) {
-			((ITestRunSessionListener) listeners[i]).sessionAdded(testRunSession);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java
deleted file mode 100644
index d96f85b..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-import org.eclipse.osgi.util.NLS;
-
-public class ModelMessages extends NLS {
-	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.junit.model.ModelMessages"; //$NON-NLS-1$
-	public static String JUnitModel_could_not_read;
-	public static String JUnitModel_could_not_write;
-	static {
-		// initialize resource bundle
-		NLS.initializeMessages(BUNDLE_NAME, ModelMessages.class);
-	}
-
-	private ModelMessages() {
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties
deleted file mode 100644
index b3d394e..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/ModelMessages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-JUnitModel_could_not_write=The test run could not be written to file ''{0}''.
-JUnitModel_could_not_read=The test run could not be imported from file ''{0}''.
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java
deleted file mode 100644
index 642e116..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/RemoteTestRunnerClient.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Julien Ruaux: jruaux at octo.com
- * 	   Vincent Massol: vmassol at octo.com
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.model;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.SafeRunner;
-
-import org.eclipse.jdt.internal.junit.runner.MessageIds;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-/**
- * The client side of the RemoteTestRunner. Handles the
- * marshaling of the different messages.
- */
-public class RemoteTestRunnerClient {
-	public abstract class ListenerSafeRunnable implements ISafeRunnable {
-		public void handleException(Throwable exception) {
-			JUnitPlugin.log(exception);
-		}
-	}
-	/**
-	 * A simple state machine to process requests from the RemoteTestRunner
-	 */
-	abstract class ProcessingState {
-	    abstract ProcessingState readMessage(String message);
-	}
-
-	class DefaultProcessingState extends ProcessingState {
-	    ProcessingState readMessage(String message) {
-	        if (message.startsWith(MessageIds.TRACE_START)) {
-	        	fFailedTrace.setLength(0);
-	            return fTraceState;
-	        }
-	        if (message.startsWith(MessageIds.EXPECTED_START)) {
-	            fExpectedResult.setLength(0);
-	            return fExpectedState;
-	        }
-	        if (message.startsWith(MessageIds.ACTUAL_START)) {
-	            fActualResult.setLength(0);
-	            return fActualState;
-	        }
-	        if (message.startsWith(MessageIds.RTRACE_START)) {
-	            fFailedRerunTrace.setLength(0);
-	            return fRerunState;
-	        }
-	        String arg= message.substring(MessageIds.MSG_HEADER_LENGTH);
-	        if (message.startsWith(MessageIds.TEST_RUN_START)) {
-	            // version < 2 format: count
-	            // version >= 2 format: count+" "+version
-	            int count= 0;
-	            int v= arg.indexOf(' ');
-	            if (v == -1) {
-	                fVersion= "v1"; //$NON-NLS-1$
-	                count= Integer.parseInt(arg);
-	            } else {
-	                fVersion= arg.substring(v+1);
-	                String sc= arg.substring(0, v);
-	                count= Integer.parseInt(sc);
-	            }
-	            notifyTestRunStarted(count);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_START)) {
-	            notifyTestStarted(arg);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_END)) {
-	            notifyTestEnded(arg);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_ERROR)) {
-	            extractFailure(arg, ITestRunListener2.STATUS_ERROR);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_FAILED)) {
-	            extractFailure(arg, ITestRunListener2.STATUS_FAILURE);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_RUN_END)) {
-	            long elapsedTime = Long.parseLong(arg);
-	            testRunEnded(elapsedTime);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_STOPPED)) {
-	            long elapsedTime = Long.parseLong(arg);
-	            notifyTestRunStopped(elapsedTime);
-	            shutDown();
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_TREE)) {
-	            notifyTestTreeEntry(arg);
-	            return this;
-	        }
-	        if (message.startsWith(MessageIds.TEST_RERAN)) {
-	            if (hasTestId())
-	                scanReranMessage(arg);
-	            else
-	                scanOldReranMessage(arg);
-	            return this;
-	        }
-	        return this;
-	    }
-	}
-
-	/**
-	 * Base class for states in which messages are appended to an internal
-	 * string buffer until an end message is read.
-	 */
-	class AppendingProcessingState extends ProcessingState {
-		private final StringBuffer fBuffer;
-		private String fEndString;
-
-		AppendingProcessingState(StringBuffer buffer, String endString) {
-			this.fBuffer= buffer;
-			this.fEndString = endString;
-		}
-
-		ProcessingState readMessage(String message) {
-			if (message.startsWith(fEndString)) {
-				entireStringRead();
-				return fDefaultState;
-			}
-			fBuffer.append(message);
-			fBuffer.append('\n');
-			return this;
-		}
-
-		/**
-		 * subclasses can override to do special things when end message is read
-		 */
-		void entireStringRead() {
-		}
-	}
-
-	class TraceProcessingState extends AppendingProcessingState {
-		TraceProcessingState() {
-			super(fFailedTrace, MessageIds.TRACE_END);
-		}
-
-		void entireStringRead() {
-            notifyTestFailed();
-            fExpectedResult.setLength(0);
-            fActualResult.setLength(0);
-		}
-
-	    ProcessingState readMessage(String message) {
-	        if (message.startsWith(MessageIds.TRACE_END)) {
-	            notifyTestFailed();
-	            fFailedTrace.setLength(0);
-	            fActualResult.setLength(0);
-	            fExpectedResult.setLength(0);
-	            return fDefaultState;
-	        }
-	        fFailedTrace.append(message).append('\n');
-	        return this;
-	    }
-	}
-
-	/**
-	 * The failed trace that is currently reported from the RemoteTestRunner
-	 */
-	private final StringBuffer fFailedTrace = new StringBuffer();
-	/**
-	 * The expected test result
-	 */
-	private final StringBuffer fExpectedResult = new StringBuffer();
-	/**
-	 * The actual test result
-	 */
-	private final StringBuffer fActualResult = new StringBuffer();
-	/**
-	 * The failed trace of a reran test
-	 */
-	private final StringBuffer fFailedRerunTrace = new StringBuffer();
-
-
-	ProcessingState fDefaultState= new DefaultProcessingState();
-	ProcessingState fTraceState= new TraceProcessingState();
-	ProcessingState fExpectedState= new AppendingProcessingState(fExpectedResult, MessageIds.EXPECTED_END);
-	ProcessingState fActualState= new AppendingProcessingState(fActualResult, MessageIds.ACTUAL_END);
-	ProcessingState fRerunState= new AppendingProcessingState(fFailedRerunTrace, MessageIds.RTRACE_END);
-	ProcessingState fCurrentState= fDefaultState;
-
-	/**
-	 * An array of listeners that are informed about test events.
-	 */
-	private ITestRunListener2[] fListeners;
-
-	/**
-	 * The server socket
-	 */
-	private ServerSocket fServerSocket;
-	private Socket fSocket;
-	private int fPort= -1;
-	private PrintWriter fWriter;
-	private BufferedReader fBufferedReader;
-	/**
-	 * The protocol version
-	 */
-	private String fVersion;
-	/**
-	 * The failed test that is currently reported from the RemoteTestRunner
-	 */
-	private String fFailedTest;
-	/**
-	 * The Id of the failed test
-	 */
-	private String fFailedTestId;
-	/**
-	 * The kind of failure of the test that is currently reported as failed
-	 */
-	private int fFailureKind;
-
-	private boolean fDebug= false;
-
-	/**
-	 * Reads the message stream from the RemoteTestRunner
-	 */
-	private class ServerConnection extends Thread {
-		int fServerPort;
-
-		public ServerConnection(int port) {
-			super("ServerConnection"); //$NON-NLS-1$
-			fServerPort= port;
-		}
-
-		public void run() {
-			try {
-				if (fDebug)
-					System.out.println("Creating server socket "+fServerPort); //$NON-NLS-1$
-				fServerSocket= new ServerSocket(fServerPort);
-				fSocket= fServerSocket.accept();
-				try {
-				    fBufferedReader= new BufferedReader(new InputStreamReader(fSocket.getInputStream(), "UTF-8")); //$NON-NLS-1$
-				} catch (UnsupportedEncodingException e) {
-				    fBufferedReader= new BufferedReader(new InputStreamReader(fSocket.getInputStream()));
-				}
-				try {
-				    fWriter= new PrintWriter(new OutputStreamWriter(fSocket.getOutputStream(), "UTF-8"), true); //$NON-NLS-1$
-	            } catch (UnsupportedEncodingException e1) {
-	                fWriter= new PrintWriter(new OutputStreamWriter(fSocket.getOutputStream()), true);
-	            }
-				String message;
-				while(fBufferedReader != null && (message= readMessage(fBufferedReader)) != null)
-					receiveMessage(message);
-			} catch (SocketException e) {
-				notifyTestRunTerminated();
-			} catch (IOException e) {
-				JUnitPlugin.log(e);
-				// fall through
-			}
-			shutDown();
-		}
-	}
-
-	/**
-	 * Start listening to a test run. Start a server connection that
-	 * the RemoteTestRunner can connect to.
-	 *
-	 * @param listeners listeners to inform
-	 * @param port port on which the server socket will be opened
-	 */
-	public synchronized void startListening(ITestRunListener2[] listeners, int port) {
-		fListeners= listeners;
-		fPort= port;
-		ServerConnection connection= new ServerConnection(port);
-		connection.start();
-	}
-
-	/**
-	 * Requests to stop the remote test run.
-	 */
-	public synchronized void stopTest() {
-		if (isRunning()) {
-			fWriter.println(MessageIds.TEST_STOP);
-			fWriter.flush();
-		}
-	}
-
-	public synchronized void stopWaiting() {
-		if (fServerSocket != null  && ! fServerSocket.isClosed() && fSocket == null) {
-			shutDown(); // will throw a SocketException in Threads that wait in ServerSocket#accept()
-		}
-	}
-
-	private synchronized void shutDown() {
-		if (fDebug)
-			System.out.println("shutdown "+fPort); //$NON-NLS-1$
-
-		if (fWriter != null) {
-			fWriter.close();
-			fWriter= null;
-		}
-		try {
-			if (fBufferedReader != null) {
-				fBufferedReader.close();
-				fBufferedReader= null;
-			}
-		} catch(IOException e) {
-		}
-		try {
-			if (fSocket != null) {
-				fSocket.close();
-				fSocket= null;
-			}
-		} catch(IOException e) {
-		}
-		try{
-			if (fServerSocket != null) {
-				fServerSocket.close();
-				fServerSocket= null;
-			}
-		} catch(IOException e) {
-		}
-	}
-
-	public boolean isRunning() {
-		return fSocket != null;
-	}
-
-	private String readMessage(BufferedReader in) throws IOException {
-		return in.readLine();
-	}
-
-	private void receiveMessage(String message) {
-	    fCurrentState= fCurrentState.readMessage(message);
-	}
-
-	private void scanOldReranMessage(String arg) {
-		// OLD V1 format
-		// format: className" "testName" "status
-		// status: FAILURE, ERROR, OK
-		int c= arg.indexOf(" "); //$NON-NLS-1$
-		int t= arg.indexOf(" ", c+1); //$NON-NLS-1$
-		String className= arg.substring(0, c);
-		String testName= arg.substring(c+1, t);
-		String status= arg.substring(t+1);
-		String testId = className+testName;
-		notifyTestReran(testId, className, testName, status);
-	}
-
-	private void scanReranMessage(String arg) {
-		// format: testId" "className" "testName" "status
-		// status: FAILURE, ERROR, OK
-		int i= arg.indexOf(' ');
-		int c= arg.indexOf(' ', i+1);
-		int t= arg.indexOf(' ', c+1);
-		String testId= arg.substring(0, i);
-		String className= arg.substring(i+1, c);
-		String testName= arg.substring(c+1, t);
-		String status= arg.substring(t+1);
-		notifyTestReran(testId, className, testName, status);
-	}
-
-	private void notifyTestReran(String testId, String className, String testName, String status) {
-		int statusCode= ITestRunListener2.STATUS_OK;
-		if (status.equals("FAILURE")) //$NON-NLS-1$
-			statusCode= ITestRunListener2.STATUS_FAILURE;
-		else if (status.equals("ERROR")) //$NON-NLS-1$
-			statusCode= ITestRunListener2.STATUS_ERROR;
-
-		String trace= ""; //$NON-NLS-1$
-		if (statusCode != ITestRunListener2.STATUS_OK)
-			trace = fFailedRerunTrace.toString();
-		// assumption a rerun trace was sent before
-		notifyTestReran(testId, className, testName, statusCode, trace);
-	}
-
-	private void extractFailure(String arg, int status) {
-		String s[]= extractTestId(arg);
-		fFailedTestId= s[0];
-		fFailedTest= s[1];
-		fFailureKind= status;
-	}
-
-	/**
-	 * @param arg test name
-	 * @return an array with two elements. The first one is the testId, the second one the testName.
-	 */
-	String[] extractTestId(String arg) {
-		String[] result= new String[2];
-		if (!hasTestId()) {
-			result[0]= arg; // use the test name as the test Id
-			result[1]= arg;
-			return result;
-		}
-		int i= arg.indexOf(',');
-		result[0]= arg.substring(0, i);
-		result[1]= arg.substring(i+1, arg.length());
-		return result;
-	}
-
-	private boolean hasTestId() {
-		if (fVersion == null) // TODO fix me
-			return true;
-		return fVersion.equals("v2"); //$NON-NLS-1$
-	}
-
-	private void notifyTestReran(final String testId, final String className, final String testName, final int statusCode, final String trace) {
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					listener.testReran(testId,
-								className, testName, statusCode, trace,
-								fExpectedResult.toString(), fActualResult.toString());
-				}
-			});
-		}
-	}
-
-	private void notifyTestTreeEntry(final String treeEntry) {
-		for (int i= 0; i < fListeners.length; i++) {
-			ITestRunListener2 listener= fListeners[i];
-			if (!hasTestId())
-				listener.testTreeEntry(fakeTestId(treeEntry));
-			else
-				listener.testTreeEntry(treeEntry);
-		}
-	}
-
-	private String fakeTestId(String treeEntry) {
-		// extract the test name and add it as the testId
-		int index0= treeEntry.indexOf(',');
-		String testName= treeEntry.substring(0, index0).trim();
-		return testName+","+treeEntry; //$NON-NLS-1$
-	}
-
-	private void notifyTestRunStopped(final long elapsedTime) {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					listener.testRunStopped(elapsedTime);
-				}
-			});
-		}
-	}
-
-	private void testRunEnded(final long elapsedTime) {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					listener.testRunEnded(elapsedTime);
-				}
-			});
-		}
-	}
-
-	private void notifyTestEnded(final String test) {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					String s[]= extractTestId(test);
-					listener.testEnded(s[0], s[1]);
-				}
-			});
-		}
-	}
-
-	private void notifyTestStarted(final String test) {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					String s[]= extractTestId(test);
-					listener.testStarted(s[0], s[1]);
-				}
-			});
-		}
-	}
-
-	private void notifyTestRunStarted(final int count) {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					listener.testRunStarted(count);
-				}
-			});
-		}
-	}
-
-	private void notifyTestFailed() {
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-			        listener.testFailed(fFailureKind, fFailedTestId,
-			        		fFailedTest, fFailedTrace.toString(), fExpectedResult.toString(), fActualResult.toString());
-				}
-			});
-		}
-	}
-
-	private void notifyTestRunTerminated() {
-		// fix for 77771 RemoteTestRunnerClient doing work after junit shutdown [JUnit]
-		if (JUnitPlugin.isStopped())
-			return;
-		for (int i= 0; i < fListeners.length; i++) {
-			final ITestRunListener2 listener= fListeners[i];
-			SafeRunner.run(new ListenerSafeRunnable() {
-				public void run() {
-					listener.testRunTerminated();
-				}
-			});
-		}
-	}
-
-	public void rerunTest(String testId, String className, String testName) {
-		if (isRunning()) {
-			fActualResult.setLength(0);
-			fExpectedResult.setLength(0);
-			fWriter.println(MessageIds.TEST_RERUN+testId+" "+className+" "+testName); //$NON-NLS-1$ //$NON-NLS-2$
-			fWriter.flush();
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java
deleted file mode 100644
index bf7e3b4..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestCaseElement.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-import org.eclipse.jdt.junit.model.ITestCaseElement;
-
-import org.eclipse.core.runtime.Assert;
-
-
-public class TestCaseElement extends TestElement implements ITestCaseElement {
-
-	private boolean fIgnored;
-
-	public TestCaseElement(TestSuiteElement parent, String id, String testName) {
-		super(parent, id, testName);
-		Assert.isNotNull(parent);
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * @see org.eclipse.jdt.junit.model.ITestCaseElement#getTestMethodName()
-	 * @see org.eclipse.jdt.internal.junit.runner.MessageIds#TEST_IDENTIFIER_MESSAGE_FORMAT
-	 * @see org.eclipse.jdt.internal.junit.runner.MessageIds#IGNORED_TEST_PREFIX
-	 */
-	public String getTestMethodName() {
-		String testName= getTestName();
-		int index= testName.indexOf('(');
-		if (index > 0)
-			return testName.substring(0, index);
-		index= testName.indexOf('@');
-		if (index > 0)
-			return testName.substring(0, index);
-		return testName;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 * @see org.eclipse.jdt.junit.model.ITestCaseElement#getTestClassName()
-	 */
-	public String getTestClassName() {
-		return getClassName();
-	}
-
-	public void setIgnored(boolean ignored) {
-		fIgnored= ignored;
-	}
-
-	public boolean isIgnored() {
-		return fIgnored;
-	}
-
-	public String toString() {
-		return "TestCase: " + getTestClassName() + "." + getTestMethodName() + " : " + super.toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java
deleted file mode 100644
index a97b562..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au)
- *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-import java.util.Stack;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.internal.junit.model.TestElement.Status;
-
-public class TestRunHandler extends DefaultHandler {
-
-	/*
-	 * TODO: validate (currently assumes correct XML)
-	 */
-
-	private int fId;
-
-	private TestRunSession fTestRunSession;
-	private TestSuiteElement fTestSuite;
-	private TestCaseElement fTestCase;
-	private Stack/*<Boolean>*/ fNotRun= new Stack();
-
-	private StringBuffer fFailureBuffer;
-	private boolean fInExpected;
-	private boolean fInActual;
-	private StringBuffer fExpectedBuffer;
-	private StringBuffer fActualBuffer;
-
-	private Locator fLocator;
-
-	private Status fStatus;
-
-	public TestRunHandler() {
-
-	}
-
-	public TestRunHandler(TestRunSession testRunSession) {
-		fTestRunSession= testRunSession;
-	}
-
-	public void setDocumentLocator(Locator locator) {
-		fLocator= locator;
-	}
-
-	public void startDocument() throws SAXException {
-	}
-
-	public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-		if (qName.equals(IXMLTags.NODE_TESTRUN)) {
-			if (fTestRunSession == null) {
-				String name= attributes.getValue(IXMLTags.ATTR_NAME);
-				String project= attributes.getValue(IXMLTags.ATTR_PROJECT);
-				IJavaProject javaProject= null;
-				if (project != null) {
-					IJavaModel javaModel= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
-					javaProject= javaModel.getJavaProject(project);
-					if (! javaProject.exists())
-						javaProject= null;
-				}
-				fTestRunSession= new TestRunSession(name, javaProject);
-				//TODO: read counts?
-
-			} else {
-				fTestRunSession.reset();
-			}
-			fTestSuite= fTestRunSession.getTestRoot();
-
-		} else if (qName.equals(IXMLTags.NODE_TESTSUITES)) {
-			// support Ant's 'junitreport' task; create suite from NODE_TESTSUITE
-
-		} else if (qName.equals(IXMLTags.NODE_TESTSUITE)) {
-			String name= attributes.getValue(IXMLTags.ATTR_NAME);
-
-			if (fTestRunSession == null) {
-				// support standalone suites and Ant's 'junitreport' task:
-				fTestRunSession= new TestRunSession(name, null);
-				fTestSuite= fTestRunSession.getTestRoot();
-			}
-
-			String pack= attributes.getValue(IXMLTags.ATTR_PACKAGE);
-			String suiteName= pack == null ? name : pack + "." + name; //$NON-NLS-1$
-			fTestSuite= (TestSuiteElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), suiteName, true, 0);
-			readTime(fTestSuite, attributes);
-			fNotRun.push(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_INCOMPLETE)));
-
-		} else if (qName.equals(IXMLTags.NODE_PROPERTIES) || qName.equals(IXMLTags.NODE_PROPERTY)) {
-			// not interested
-
-		} else if (qName.equals(IXMLTags.NODE_TESTCASE)) {
-			String name= attributes.getValue(IXMLTags.ATTR_NAME);
-			String classname= attributes.getValue(IXMLTags.ATTR_CLASSNAME);
-			fTestCase= (TestCaseElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), name + '(' + classname + ')', false, 0);
-			fNotRun.push(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_INCOMPLETE)));
-			fTestCase.setIgnored(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_IGNORED)).booleanValue());
-			readTime(fTestCase, attributes);
-
-		} else if (qName.equals(IXMLTags.NODE_ERROR)) {
-			//TODO: multiple failures: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125296
-			fStatus= Status.ERROR;
-			fFailureBuffer= new StringBuffer();
-
-		} else if (qName.equals(IXMLTags.NODE_FAILURE)) {
-			//TODO: multiple failures: https://bugs.eclipse.org/bugs/show_bug.cgi?id=125296
-			fStatus= Status.FAILURE;
-			fFailureBuffer= new StringBuffer();
-
-		} else if (qName.equals(IXMLTags.NODE_EXPECTED)) {
-			fInExpected= true;
-			fExpectedBuffer= new StringBuffer();
-
-		} else if (qName.equals(IXMLTags.NODE_ACTUAL)) {
-			fInActual= true;
-			fActualBuffer= new StringBuffer();
-
-		} else if (qName.equals(IXMLTags.NODE_SYSTEM_OUT) || qName.equals(IXMLTags.NODE_SYSTEM_ERR)) {
-			// not interested
-
-		} else {
-			throw new SAXParseException("unknown node '" + qName + "'", fLocator);  //$NON-NLS-1$//$NON-NLS-2$
-		}
-	}
-
-	private void readTime(TestElement testElement, Attributes attributes) {
-		String timeString= attributes.getValue(IXMLTags.ATTR_TIME);
-		if (timeString != null) {
-			try {
-				testElement.setElapsedTimeInSeconds(Double.parseDouble(timeString));
-			} catch (NumberFormatException e) {
-			}
-		}
-	}
-
-	public void characters(char[] ch, int start, int length) throws SAXException {
-		if (fInExpected) {
-			fExpectedBuffer.append(ch, start, length);
-
-		} else if (fInActual) {
-			fActualBuffer.append(ch, start, length);
-
-		} else if (fFailureBuffer != null) {
-			fFailureBuffer.append(ch, start, length);
-		}
-	}
-
-	public void endElement(String uri, String localName, String qName) throws SAXException {
-		if (qName.equals(IXMLTags.NODE_TESTRUN)) {
-			// OK
-
-		} else if (qName.equals(IXMLTags.NODE_TESTSUITES)) {
-			// OK
-
-		} else if (qName.equals(IXMLTags.NODE_TESTSUITE)) {
-			handleTestElementEnd(fTestSuite);
-			fTestSuite= fTestSuite.getParent();
-			//TODO: end suite: compare counters?
-
-		} else if (qName.equals(IXMLTags.NODE_PROPERTIES) || qName.equals(IXMLTags.NODE_PROPERTY)) {
-			// OK
-
-		} else if (qName.equals(IXMLTags.NODE_TESTCASE)) {
-			handleTestElementEnd(fTestCase);
-			fTestCase= null;
-
-		} else if (qName.equals(IXMLTags.NODE_FAILURE) || qName.equals(IXMLTags.NODE_ERROR)) {
-			TestElement testElement= fTestCase;
-			if (testElement == null)
-				testElement= fTestSuite;
-			handleFailure(testElement);
-
-		} else if (qName.equals(IXMLTags.NODE_EXPECTED)) {
-			fInExpected= false;
-
-		} else if (qName.equals(IXMLTags.NODE_ACTUAL)) {
-			fInActual= false;
-
-		} else if (qName.equals(IXMLTags.NODE_SYSTEM_OUT) || qName.equals(IXMLTags.NODE_SYSTEM_ERR)) {
-			// OK
-
-		} else {
-
-			handleUnknownNode(qName);
-		}
-	}
-
-	private void handleTestElementEnd(TestElement testElement) {
-		boolean completed= fNotRun.pop() != Boolean.TRUE;
-		fTestRunSession.registerTestEnded(testElement, completed);
-	}
-
-	private void handleFailure(TestElement testElement) {
-		if (fFailureBuffer != null) {
-			fTestRunSession.registerTestFailureStatus(testElement, fStatus, fFailureBuffer.toString(), toString(fExpectedBuffer), toString(fActualBuffer));
-			fFailureBuffer= null;
-			fExpectedBuffer= null;
-			fActualBuffer= null;
-			fStatus= null;
-		}
-	}
-
-	private String toString(StringBuffer buffer) {
-		return buffer != null ? buffer.toString() : null;
-	}
-
-	private void handleUnknownNode(String qName) throws SAXException {
-		//TODO: just log if debug option is enabled?
-		String msg= "unknown node '" + qName + "'"; //$NON-NLS-1$//$NON-NLS-2$
-		if (fLocator != null) {
-			msg += " at line " + fLocator.getLineNumber() + ", column " + fLocator.getColumnNumber();  //$NON-NLS-1$//$NON-NLS-2$
-		}
-		throw new SAXException(msg);
-	}
-
-	public void error(SAXParseException e) throws SAXException {
-		throw e;
-	}
-
-	public void warning(SAXParseException e) throws SAXException {
-		throw e;
-	}
-
-	private String getNextId() {
-		return Integer.toString(fId++);
-	}
-
-	/**
-	 * @return the parsed test run session, or <code>null</code>
-	 */
-	public TestRunSession getTestRunSession() {
-		return fTestRunSession;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java
deleted file mode 100644
index d455c93..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunListenerAdapter.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.model;
-
-import org.eclipse.jdt.junit.TestRunListener;
-import org.eclipse.jdt.junit.model.ITestCaseElement;
-
-import org.eclipse.jdt.internal.junit.model.TestElement.Status;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-
-/**
- * Notifier for the callback listener API {@link TestRunListener}.
- */
-public class TestRunListenerAdapter implements ITestSessionListener {
-
-	private final TestRunSession fSession;
-
-	public TestRunListenerAdapter(TestRunSession session) {
-		fSession= session;
-	}
-
-	private Object[] getListeners() {
-		return JUnitPlugin.getDefault().getNewTestRunListeners().getListeners();
-	}
-
-	private void fireSessionStarted() {
-		Object[] listeners= getListeners();
-		for (int i= 0; i < listeners.length; i++) {
-			((TestRunListener) listeners[i]).sessionStarted(fSession);
-		}
-	}
-
-	private void fireSessionFinished() {
-		Object[] listeners= getListeners();
-		for (int i= 0; i < listeners.length; i++) {
-			((TestRunListener) listeners[i]).sessionFinished(fSession);
-		}
-	}
-
-	private void fireTestCaseStarted(ITestCaseElement testCaseElement) {
-		Object[] listeners= getListeners();
-		for (int i= 0; i < listeners.length; i++) {
-			((TestRunListener) listeners[i]).testCaseStarted(testCaseElement);
-		}
-	}
-
-	private void fireTestCaseFinished(ITestCaseElement testCaseElement) {
-		Object[] listeners= getListeners();
-		for (int i= 0; i < listeners.length; i++) {
-			((TestRunListener) listeners[i]).testCaseFinished(testCaseElement);
-		}
-	}
-
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionStarted()
-	 */
-	public void sessionStarted() {
-		// wait until all test are added
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionEnded(long)
-	 */
-	public void sessionEnded(long elapsedTime) {
-		fireSessionFinished();
-		fSession.swapOut();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionStopped(long)
-	 */
-	public void sessionStopped(long elapsedTime) {
-		fireSessionFinished();
-		fSession.swapOut();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#sessionTerminated()
-	 */
-	public void sessionTerminated() {
-		fSession.swapOut();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testAdded(org.eclipse.jdt.internal.junit.model.TestElement)
-	 */
-	public void testAdded(TestElement testElement) {
-		// do nothing
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#runningBegins()
-	 */
-	public void runningBegins() {
-		fireSessionStarted();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testStarted(org.eclipse.jdt.internal.junit.model.TestCaseElement)
-	 */
-	public void testStarted(TestCaseElement testCaseElement) {
-		fireTestCaseStarted(testCaseElement);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testEnded(org.eclipse.jdt.internal.junit.model.TestCaseElement)
-	 */
-	public void testEnded(TestCaseElement testCaseElement) {
-		fireTestCaseFinished(testCaseElement);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testFailed(org.eclipse.jdt.internal.junit.model.TestElement, org.eclipse.jdt.internal.junit.model.TestElement.Status, java.lang.String, java.lang.String, java.lang.String)
-	 */
-	public void testFailed(TestElement testElement, Status status, String trace, String expected, String actual) {
-		// ignore
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.model.ITestSessionListener#testReran(org.eclipse.jdt.internal.junit.model.TestCaseElement, org.eclipse.jdt.internal.junit.model.TestElement.Status, java.lang.String, java.lang.String, java.lang.String)
-	 */
-	public void testReran(TestCaseElement testCaseElement, Status status, String trace, String expectedResult, String actualResult) {
-		// ignore
-	}
-
-	public boolean acceptsSwapToDisk() {
-		return true;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java
deleted file mode 100644
index 72cafc0..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSession.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.model;
-
-import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jdt.junit.model.ITestElement;
-import org.eclipse.jdt.junit.model.ITestElementContainer;
-import org.eclipse.jdt.junit.model.ITestRunSession;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.ListenerList;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchesListener2;
-
-import org.eclipse.jdt.core.IJavaProject;
-
-import org.eclipse.jdt.internal.junit.Messages;
-import org.eclipse.jdt.internal.junit.launcher.ITestKind;
-import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
-import org.eclipse.jdt.internal.junit.model.TestElement.Status;
-import org.eclipse.jdt.internal.junit.runner.MessageIds;
-import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-
-
-/**
- * A test run session holds all information about a test run, i.e.
- * launch configuration, launch, test tree (including results).
- */
-public class TestRunSession implements ITestRunSession {
-
-	/**
-	 * The launch, or <code>null</code> iff this session was run externally.
-	 */
-	private final ILaunch fLaunch;
-	private final String fTestRunName;
-	/**
-	 * Java project, or <code>null</code>.
-	 */
-	private final IJavaProject fProject;
-
-	private final ITestKind fTestRunnerKind;
-
-	/**
-	 * Test runner client or <code>null</code>.
-	 */
-	private RemoteTestRunnerClient fTestRunnerClient;
-
-	private final ListenerList/*<ITestSessionListener>*/ fSessionListeners;
-
-	/**
-	 * The model root, or <code>null</code> if swapped to disk.
-	 */
-	private TestRoot fTestRoot;
-
-	/**
-	 * The test run session's cached result, or <code>null</code> if <code>fTestRoot != null</code>.
-	 */
-	private Result fTestResult;
-
-	/**
-	 * Map from testId to testElement.
-	 */
-	private HashMap/*<String, TestElement>*/ fIdToTest;
-
-	/**
-	 * The TestSuites for which additional children are expected.
-	 */
-	private List/*<IncompleteTestSuite>*/ fIncompleteTestSuites;
-
-	/**
-	 * Suite for unrooted test case elements, or <code>null</code>.
-	 */
-	private TestSuiteElement fUnrootedSuite;
-
- 	/**
- 	 * Number of tests started during this test run.
- 	 */
-	volatile int fStartedCount;
-	/**
-	 * Number of tests ignored during this test run.
-	 */
-	volatile int fIgnoredCount;
-	/**
-	 * Number of errors during this test run.
-	 */
-	volatile int fErrorCount;
-	/**
-	 * Number of failures during this test run.
-	 */
-	volatile int fFailureCount;
-	/**
-	 * Total number of tests to run.
-	 */
-	volatile int fTotalCount;
-	/**
-	 * Start time in millis.
-	 */
-	volatile long fStartTime;
-	volatile boolean fIsRunning;
-
-	volatile boolean fIsStopped;
-
-
-	/**
-	 * Creates a test run session.
-	 *
-	 * @param testRunName name of the test run
-	 * @param project may be <code>null</code>
-	 */
-	public TestRunSession(String testRunName, IJavaProject project) {
-		//TODO: check assumptions about non-null fields
-
-		fLaunch= null;
-		fProject= project;
-
-		Assert.isNotNull(testRunName);
-		fTestRunName= testRunName;
-		fTestRunnerKind= ITestKind.NULL; //TODO
-
-		fTestRoot= new TestRoot(this);
-		fIdToTest= new HashMap();
-
-		fTestRunnerClient= null;
-
-		fSessionListeners= new ListenerList();
-	}
-
-
-	public TestRunSession(ILaunch launch, IJavaProject project, int port) {
-		Assert.isNotNull(launch);
-
-		fLaunch= launch;
-		fProject= project;
-
-		ILaunchConfiguration launchConfiguration= launch.getLaunchConfiguration();
-		if (launchConfiguration != null) {
-			fTestRunName= launchConfiguration.getName();
-			fTestRunnerKind= JUnitLaunchConfigurationConstants.getTestRunnerKind(launchConfiguration);
-		} else {
-			fTestRunName= project.getElementName();
-			fTestRunnerKind= ITestKind.NULL;
-		}
-
-		fTestRoot= new TestRoot(this);
-		fIdToTest= new HashMap();
-
-		fTestRunnerClient= new RemoteTestRunnerClient();
-		fTestRunnerClient.startListening(new ITestRunListener2[] { new TestSessionNotifier() }, port);
-
-		final ILaunchManager launchManager= DebugPlugin.getDefault().getLaunchManager();
-		launchManager.addLaunchListener(new ILaunchesListener2() {
-			public void launchesTerminated(ILaunch[] launches) {
-				if (Arrays.asList(launches).contains(fLaunch)) {
-					if (fTestRunnerClient != null) {
-						fTestRunnerClient.stopWaiting();
-					}
-					launchManager.removeLaunchListener(this);
-				}
-			}
-			public void launchesRemoved(ILaunch[] launches) {
-				if (Arrays.asList(launches).contains(fLaunch)) {
-					if (fTestRunnerClient != null) {
-						fTestRunnerClient.stopWaiting();
-					}
-					launchManager.removeLaunchListener(this);
-				}
-			}
-			public void launchesChanged(ILaunch[] launches) {
-			}
-			public void launchesAdded(ILaunch[] launches) {
-			}
-		});
-
-		fSessionListeners= new ListenerList();
-		addTestSessionListener(new TestRunListenerAdapter(this));
-	}
-
-	void reset() {
-		fStartedCount= 0;
-		fFailureCount= 0;
-		fErrorCount= 0;
-		fIgnoredCount= 0;
-		fTotalCount= 0;
-
-		fTestRoot= new TestRoot(this);
-		fTestResult= null;
-		fIdToTest= new HashMap();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.ITestRunSession#getProgressState()
-	 */
-	public ProgressState getProgressState() {
-		if (isRunning()) {
-			return ProgressState.RUNNING;
-		}
-		if (isStopped()) {
-			return ProgressState.STOPPED;
-		}
-		return ProgressState.COMPLETED;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElement#getTestResult(boolean)
-	 */
-	public Result getTestResult(boolean includeChildren) {
-		if (fTestRoot != null) {
-			return fTestRoot.getTestResult(true);
-		} else {
-			return fTestResult;
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElementContainer#getChildren()
-	 */
-	public ITestElement[] getChildren() {
-		return getTestRoot().getChildren();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElement#getFailureTrace()
-	 */
-	public FailureTrace getFailureTrace() {
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElement#getParentContainer()
-	 */
-	public ITestElementContainer getParentContainer() {
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElement#getTestRunSession()
-	 */
-	public ITestRunSession getTestRunSession() {
-		return this;
-	}
-
-
-	public TestRoot getTestRoot() {
-		swapIn(); //TODO: TestRoot should stay (e.g. for getTestRoot().getStatus())
-		return fTestRoot;
-	}
-
-	/**
-	 * @return the Java project, or <code>null</code>
-	 */
-	public IJavaProject getLaunchedProject() {
-		return fProject;
-	}
-
-	public ITestKind getTestRunnerKind() {
-		return fTestRunnerKind;
-	}
-
-
-	/**
-	 * @return the launch, or <code>null</code> iff this session was run externally
-	 */
-	public ILaunch getLaunch() {
-		return fLaunch;
-	}
-
-	public String getTestRunName() {
-		return fTestRunName;
-	}
-
-	public int getErrorCount() {
-		return fErrorCount;
-	}
-
-	public int getFailureCount() {
-		return fFailureCount;
-	}
-
-	public int getStartedCount() {
-		return fStartedCount;
-	}
-
-	public int getIgnoredCount() {
-		return fIgnoredCount;
-	}
-
-	public int getTotalCount() {
-		return fTotalCount;
-	}
-
-	public long getStartTime() {
-		return fStartTime;
-	}
-
-	/**
-	 * @return <code>true</code> iff the session has been stopped or terminated
-	 */
-	public boolean isStopped() {
-		return fIsStopped;
-	}
-
-	public void addTestSessionListener(ITestSessionListener listener) {
-		swapIn();
-		fSessionListeners.add(listener);
-	}
-
-	public void removeTestSessionListener(ITestSessionListener listener) {
-		fSessionListeners.remove(listener);
-	}
-
-	public void swapOut() {
-		if (fTestRoot == null)
-			return;
-		if (isRunning() || isStarting() || isKeptAlive())
-			return;
-
-		Object[] listeners= fSessionListeners.getListeners();
-		for (int i= 0; i < listeners.length; ++i) {
-			ITestSessionListener registered= (ITestSessionListener) listeners[i];
-			if (! registered.acceptsSwapToDisk())
-				return;
-		}
-
-		try {
-			File swapFile= getSwapFile();
-
-			JUnitModel.exportTestRunSession(this, swapFile);
-			fTestResult= fTestRoot.getTestResult(true);
-			fTestRoot= null;
-			fTestRunnerClient= null;
-			fIdToTest= new HashMap();
-			fIncompleteTestSuites= null;
-			fUnrootedSuite= null;
-
-		} catch (IllegalStateException e) {
-			JUnitPlugin.log(e);
-		} catch (CoreException e) {
-			JUnitPlugin.log(e);
-		}
-	}
-
-	public boolean isStarting() {
-		return getStartTime() == 0 && fLaunch != null && ! fLaunch.isTerminated();
-	}
-
-
-	public void removeSwapFile() {
-		File swapFile= getSwapFile();
-		if (swapFile.exists())
-			swapFile.delete();
-	}
-
-	private File getSwapFile() throws IllegalStateException {
-		File historyDir= JUnitPlugin.getHistoryDirectory();
-		String isoTime= new SimpleDateFormat("yyyyMMdd-HHmmss.SSS").format(new Date(getStartTime())); //$NON-NLS-1$
-		String swapFileName= isoTime + ".xml"; //$NON-NLS-1$
-		return new File(historyDir, swapFileName);
-	}
-
-
-	public void swapIn() {
-		if (fTestRoot != null)
-			return;
-
-		try {
-			JUnitModel.importIntoTestRunSession(getSwapFile(), this);
-		} catch (IllegalStateException e) {
-			JUnitPlugin.log(e);
-			fTestRoot= new TestRoot(this);
-			fTestResult= null;
-		} catch (CoreException e) {
-			JUnitPlugin.log(e);
-			fTestRoot= new TestRoot(this);
-			fTestResult= null;
-		}
-	}
-
-	public void stopTestRun() {
-		if (isRunning() || ! isKeptAlive())
-			fIsStopped= true;
-		if (fTestRunnerClient != null)
-			fTestRunnerClient.stopTest();
-	}
-
-	/**
-	 * @return <code>true</code> iff the runtime VM of this test session is still alive
-	 */
-	public boolean isKeptAlive() {
-		if (fTestRunnerClient != null
-				&& fLaunch != null
-				&& fTestRunnerClient.isRunning()
-				&& ILaunchManager.DEBUG_MODE.equals(fLaunch.getLaunchMode())) {
-			ILaunchConfiguration config= fLaunch.getLaunchConfiguration();
-			try {
-				return config != null
-				&& config.getAttribute(JUnitLaunchConfigurationConstants.ATTR_KEEPRUNNING, false);
-			} catch (CoreException e) {
-				return false;
-			}
-
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * @return <code>true</code> iff this session has been started, but not ended nor stopped nor terminated
-	 */
-	public boolean isRunning() {
-		return fIsRunning;
-	}
-
-	/**
-	 * Reruns the given test method.
-	 *
-	 * @param testId test id
-	 * @param className test class name
-	 * @param testName test method name
-	 * @param launchMode launch mode, see {@link ILaunchManager}
-	 * @return <code>false</code> iff the rerun could not be started
-	 * @throws CoreException if the launch fails
-	 */
-	public boolean rerunTest(String testId, String className, String testName, String launchMode) throws CoreException {
-		if (isKeptAlive()) {
-			Status status= ((TestCaseElement) getTestElement(testId)).getStatus();
-			if (status == Status.ERROR) {
-				fErrorCount--;
-			} else if (status == Status.FAILURE) {
-				fFailureCount--;
-			}
-			fTestRunnerClient.rerunTest(testId, className, testName);
-			return true;
-
-		} else if (fLaunch != null) {
-			// run the selected test using the previous launch configuration
-			ILaunchConfiguration launchConfiguration= fLaunch.getLaunchConfiguration();
-			if (launchConfiguration != null) {
-
-				String name= className;
-				if (testName != null)
-					name+= "."+testName; //$NON-NLS-1$
-				String configName= Messages.format(JUnitMessages.TestRunnerViewPart_configName, name);
-				ILaunchConfigurationWorkingCopy tmp= launchConfiguration.copy(configName);
-				// fix for bug: 64838  junit view run single test does not use correct class [JUnit]
-				tmp.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, className);
-				// reset the container
-				tmp.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER, ""); //$NON-NLS-1$
-				if (testName != null) {
-					tmp.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, testName);
-					//	String args= "-rerun "+testId;
-					//	tmp.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
-				}
-				tmp.launch(launchMode, null);
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	public TestElement getTestElement(String id) {
-		return (TestElement) fIdToTest.get(id);
-	}
-
-	private TestElement addTreeEntry(String treeEntry) {
-		// format: testId","testName","isSuite","testcount
-		int index0= treeEntry.indexOf(',');
-		String id= treeEntry.substring(0, index0);
-
-		StringBuffer testNameBuffer= new StringBuffer(100);
-		int index1= scanTestName(treeEntry, index0 + 1, testNameBuffer);
-		String testName= testNameBuffer.toString().trim();
-
-		int index2= treeEntry.indexOf(',', index1 + 1);
-		boolean isSuite= treeEntry.substring(index1 + 1, index2).equals("true"); //$NON-NLS-1$
-
-		int testCount= Integer.parseInt(treeEntry.substring(index2 + 1));
-
-		if (fIncompleteTestSuites.isEmpty()) {
-			return createTestElement(fTestRoot, id, testName, isSuite, testCount);
-		} else {
-			int suiteIndex= fIncompleteTestSuites.size() - 1;
-			IncompleteTestSuite openSuite= (IncompleteTestSuite) fIncompleteTestSuites.get(suiteIndex);
-			openSuite.fOutstandingChildren--;
-			if (openSuite.fOutstandingChildren <= 0)
-				fIncompleteTestSuites.remove(suiteIndex);
-			return createTestElement(openSuite.fTestSuiteElement, id, testName, isSuite, testCount);
-		}
-	}
-
-	public TestElement createTestElement(TestSuiteElement parent, String id, String testName, boolean isSuite, int testCount) {
-		TestElement testElement;
-		if (isSuite) {
-			TestSuiteElement testSuiteElement= new TestSuiteElement(parent, id, testName, testCount);
-			testElement= testSuiteElement;
-			if (testCount > 0)
-				fIncompleteTestSuites.add(new IncompleteTestSuite(testSuiteElement, testCount));
-		} else {
-			testElement= new TestCaseElement(parent, id, testName);
-		}
-		fIdToTest.put(id, testElement);
-		return testElement;
-	}
-
-	/**
-	 * Append the test name from <code>s</code> to <code>testName</code>.
-	 *
-	 * @param s the string to scan
-	 * @param start the offset of the first character in <code>s</code>
-	 * @param testName the result
-	 *
-	 * @return the index of the next ','
-	 */
-	private int scanTestName(String s, int start, StringBuffer testName) {
-		boolean inQuote= false;
-		int i= start;
-		for (; i < s.length(); i++) {
-			char c= s.charAt(i);
-			if (c == '\\' && !inQuote) {
-				inQuote= true;
-				continue;
-			} else if (inQuote) {
-				inQuote= false;
-				testName.append(c);
-			} else if (c == ',')
-				break;
-			else
-				testName.append(c);
-		}
-		return i;
-	}
-
-	/**
-	 * An {@link ITestRunListener2} that listens to events from the
-	 * {@link RemoteTestRunnerClient} and translates them into high-level model
-	 * events (broadcasted to {@link ITestSessionListener}s).
-	 */
-	private class TestSessionNotifier implements ITestRunListener2 {
-
-		public void testRunStarted(int testCount) {
-			fIncompleteTestSuites= new ArrayList();
-
-			fStartedCount= 0;
-			fIgnoredCount= 0;
-			fFailureCount= 0;
-			fErrorCount= 0;
-			fTotalCount= testCount;
-
-			fStartTime= System.currentTimeMillis();
-			fIsRunning= true;
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).sessionStarted();
-			}
-		}
-
-		public void testRunEnded(long elapsedTime) {
-			fIsRunning= false;
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).sessionEnded(elapsedTime);
-			}
-		}
-
-		public void testRunStopped(long elapsedTime) {
-			fIsRunning= false;
-			fIsStopped= true;
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).sessionStopped(elapsedTime);
-			}
-		}
-
-		public void testRunTerminated() {
-			fIsRunning= false;
-			fIsStopped= true;
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).sessionTerminated();
-			}
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testTreeEntry(java.lang.String)
-		 */
-		public void testTreeEntry(String description) {
-			TestElement testElement= addTreeEntry(description);
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).testAdded(testElement);
-			}
-		}
-
-		private TestElement createUnrootedTestElement(String testId, String testName) {
-			TestSuiteElement unrootedSuite= getUnrootedSuite();
-			TestElement testElement= createTestElement(unrootedSuite, testId, testName, false, 1);
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).testAdded(testElement);
-			}
-
-			return testElement;
-		}
-
-		private TestSuiteElement getUnrootedSuite() {
-			if (fUnrootedSuite == null) {
-				fUnrootedSuite= (TestSuiteElement) createTestElement(fTestRoot, "-2", JUnitMessages.TestRunSession_unrootedTests, true, 0);  //$NON-NLS-1$
-			}
-			return fUnrootedSuite;
-		}
-
-		public void testStarted(String testId, String testName) {
-			if (fStartedCount == 0) {
-				Object[] listeners= fSessionListeners.getListeners();
-				for (int i= 0; i < listeners.length; ++i) {
-					((ITestSessionListener) listeners[i]).runningBegins();
-				}
-			}
-			TestElement testElement= getTestElement(testId);
-			if (testElement == null) {
-				testElement= createUnrootedTestElement(testId, testName);
-			} else if (! (testElement instanceof TestCaseElement)) {
-				logUnexpectedTest(testId, testElement);
-				return;
-			}
-			TestCaseElement testCaseElement= (TestCaseElement) testElement;
-			setStatus(testCaseElement, Status.RUNNING);
-
-			fStartedCount++;
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).testStarted(testCaseElement);
-			}
-		}
-
-		public void testEnded(String testId, String testName) {
-			TestElement testElement= getTestElement(testId);
-			if (testElement == null) {
-				testElement= createUnrootedTestElement(testId, testName);
-			} else if (! (testElement instanceof TestCaseElement)) {
-				logUnexpectedTest(testId, testElement);
-				return;
-			}
-			TestCaseElement testCaseElement= (TestCaseElement) testElement;
-			if (testName.startsWith(MessageIds.IGNORED_TEST_PREFIX)) {
-				testCaseElement.setIgnored(true);
-				fIgnoredCount++;
-			}
-
-			if (testCaseElement.getStatus() == Status.RUNNING)
-				setStatus(testCaseElement, Status.OK);
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).testEnded(testCaseElement);
-			}
-		}
-
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testFailed(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-		 */
-		public void testFailed(int statusCode, String testId, String testName, String trace, String expected, String actual) {
-			TestElement testElement= getTestElement(testId);
-			if (testElement == null) {
-				testElement= createUnrootedTestElement(testId, testName);
-				return;
-			}
-
-			Status status= Status.convert(statusCode);
-			registerTestFailureStatus(testElement, status, trace, nullifyEmpty(expected), nullifyEmpty(actual));
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				((ITestSessionListener) listeners[i]).testFailed(testElement, status, trace, expected, actual);
-			}
-		}
-
-		private String nullifyEmpty(String string) {
-			int length= string.length();
-			if (length == 0)
-				return null;
-			else if (string.charAt(length - 1) == '\n')
-				return string.substring(0, length - 1);
-			else
-				return string;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.jdt.internal.junit.model.ITestRunListener2#testReran(java.lang.String, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)
-		 */
-		public void testReran(String testId, String className, String testName, int statusCode, String trace, String expectedResult, String actualResult) {
-			TestElement testElement= getTestElement(testId);
-			if (testElement == null) {
-				testElement= createUnrootedTestElement(testId, testName);
-			} else if (! (testElement instanceof TestCaseElement)) {
-				logUnexpectedTest(testId, testElement);
-				return;
-			}
-			TestCaseElement testCaseElement= (TestCaseElement) testElement;
-
-			Status status= Status.convert(statusCode);
-			registerTestFailureStatus(testElement, status, trace, nullifyEmpty(expectedResult), nullifyEmpty(actualResult));
-
-			Object[] listeners= fSessionListeners.getListeners();
-			for (int i= 0; i < listeners.length; ++i) {
-				//TODO: post old & new status?
-				((ITestSessionListener) listeners[i]).testReran(testCaseElement, status, trace, expectedResult, actualResult);
-			}
-		}
-
-		private void logUnexpectedTest(String testId, TestElement testElement) {
-			JUnitPlugin.log(new Exception("Unexpected TestElement type for testId '" + testId + "': " + testElement)); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-
-	private static class IncompleteTestSuite {
-		public TestSuiteElement fTestSuiteElement;
-		public int fOutstandingChildren;
-
-		public IncompleteTestSuite(TestSuiteElement testSuiteElement, int outstandingChildren) {
-			fTestSuiteElement= testSuiteElement;
-			fOutstandingChildren= outstandingChildren;
-		}
-	}
-
-	public void registerTestFailureStatus(TestElement testElement, Status status, String trace, String expected, String actual) {
-		testElement.setStatus(status, trace, expected, actual);
-		if (status.isError()) {
-			fErrorCount++;
-		} else if (status.isFailure()) {
-			fFailureCount++;
-		}
-	}
-
-	public void registerTestEnded(TestElement testElement, boolean completed) {
-		if (testElement instanceof TestCaseElement) {
-			fTotalCount++;
-			if (! completed) {
-				return;
-			}
-			fStartedCount++;
-			if (((TestCaseElement) testElement).isIgnored()) {
-				fIgnoredCount++;
-			}
-			if (! testElement.getStatus().isErrorOrFailure())
-				setStatus(testElement, Status.OK);
-		}
-	}
-
-	private void setStatus(TestElement testElement, Status status) {
-		testElement.setStatus(status);
-	}
-
-	public TestElement[] getAllFailedTestElements() {
-		ArrayList failures= new ArrayList();
-		addFailures(failures, getTestRoot());
-		return (TestElement[]) failures.toArray(new TestElement[failures.size()]);
-	}
-
-	private void addFailures(ArrayList failures, ITestElement testElement) {
-		Result testResult= testElement.getTestResult(true);
-		if (testResult == Result.ERROR || testResult == Result.FAILURE) {
-			failures.add(testElement);
-		}
-		if (testElement instanceof TestSuiteElement) {
-			TestSuiteElement testSuiteElement= (TestSuiteElement) testElement;
-			ITestElement[] children= testSuiteElement.getChildren();
-			for (int i= 0; i < children.length; i++) {
-				addFailures(failures, children[i]);
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.model.ITestElement#getElapsedTimeInSeconds()
-	 */
-	public double getElapsedTimeInSeconds() {
-		if (fTestRoot == null)
-			return Double.NaN;
-
-		return fTestRoot.getElapsedTimeInSeconds();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java
deleted file mode 100644
index 72cfe48..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/model/TestRunSessionSerializer.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au)
- *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
- *******************************************************************************/
-
-package org.eclipse.jdt.internal.junit.model;
-
-import java.io.IOException;
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-import java.text.NumberFormat;
-import java.util.Locale;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.AttributesImpl;
-
-import org.eclipse.jdt.junit.model.ITestElement;
-import org.eclipse.jdt.junit.model.ITestElement.FailureTrace;
-import org.eclipse.jdt.junit.model.ITestElement.ProgressState;
-import org.eclipse.jdt.junit.model.ITestElement.Result;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.jdt.core.IJavaProject;
-
-public class TestRunSessionSerializer implements XMLReader {
-
-	private static final String EMPTY= ""; //$NON-NLS-1$
-	private static final String CDATA= "CDATA"; //$NON-NLS-1$
-	private static final Attributes NO_ATTS= new AttributesImpl();
-
-
-	private final TestRunSession fTestRunSession;
-	private ContentHandler fHandler;
-	private ErrorHandler fErrorHandler;
-
-	private final NumberFormat timeFormat= new DecimalFormat("0.0##", new DecimalFormatSymbols(Locale.US)); //$NON-NLS-1$ // not localized, parseable by Double.parseDouble(..)
-
-	/**
-	 * @param testRunSession the test run session to serialize
-	 */
-	public TestRunSessionSerializer(TestRunSession testRunSession) {
-		Assert.isNotNull(testRunSession);
-		fTestRunSession= testRunSession;
-	}
-
-	public void parse(InputSource input) throws IOException, SAXException {
-		if (fHandler == null)
-			throw new SAXException("ContentHandler missing"); //$NON-NLS-1$
-
-		fHandler.startDocument();
-		handleTestRun();
-		fHandler.endDocument();
-	}
-
-	private void handleTestRun() throws SAXException {
-		AttributesImpl atts= new AttributesImpl();
-		addCDATA(atts, IXMLTags.ATTR_NAME, fTestRunSession.getTestRunName());
-		IJavaProject project= fTestRunSession.getLaunchedProject();
-		if (project != null)
-			addCDATA(atts, IXMLTags.ATTR_PROJECT, project.getElementName());
-		addCDATA(atts, IXMLTags.ATTR_TESTS, fTestRunSession.getTotalCount());
-		addCDATA(atts, IXMLTags.ATTR_STARTED, fTestRunSession.getStartedCount());
-		addCDATA(atts, IXMLTags.ATTR_FAILURES, fTestRunSession.getFailureCount());
-		addCDATA(atts, IXMLTags.ATTR_ERRORS, fTestRunSession.getErrorCount());
-		addCDATA(atts, IXMLTags.ATTR_IGNORED, fTestRunSession.getIgnoredCount());
-		startElement(IXMLTags.NODE_TESTRUN, atts);
-
-		TestRoot testRoot= fTestRunSession.getTestRoot();
-		ITestElement[] topSuites= testRoot.getChildren();
-		for (int i= 0; i < topSuites.length; i++) {
-			handleTestElement(topSuites[i]);
-		}
-
-		endElement(IXMLTags.NODE_TESTRUN);
-	}
-
-	private void handleTestElement(ITestElement testElement) throws SAXException {
-		if (testElement instanceof TestSuiteElement) {
-			TestSuiteElement testSuiteElement= (TestSuiteElement) testElement;
-
-			AttributesImpl atts= new AttributesImpl();
-			addCDATA(atts, IXMLTags.ATTR_NAME, testSuiteElement.getSuiteTypeName());
-			if (! Double.isNaN(testSuiteElement.getElapsedTimeInSeconds()))
-				addCDATA(atts, IXMLTags.ATTR_TIME, timeFormat.format(testSuiteElement.getElapsedTimeInSeconds()));
-			if (testElement.getProgressState() != ProgressState.COMPLETED || testElement.getTestResult(false) != Result.UNDEFINED)
-				addCDATA(atts, IXMLTags.ATTR_INCOMPLETE, Boolean.TRUE.toString());
-
-			startElement(IXMLTags.NODE_TESTSUITE, atts);
-			addFailure(testElement);
-
-			ITestElement[] children= testSuiteElement.getChildren();
-			for (int i= 0; i < children.length; i++) {
-				handleTestElement(children[i]);
-			}
-			endElement(IXMLTags.NODE_TESTSUITE);
-
-		} else if (testElement instanceof TestCaseElement) {
-			TestCaseElement testCaseElement= (TestCaseElement) testElement;
-
-			AttributesImpl atts= new AttributesImpl();
-			addCDATA(atts, IXMLTags.ATTR_NAME, testCaseElement.getTestMethodName());
-			addCDATA(atts, IXMLTags.ATTR_CLASSNAME, testCaseElement.getClassName());
-			if (! Double.isNaN(testCaseElement.getElapsedTimeInSeconds()))
-				addCDATA(atts, IXMLTags.ATTR_TIME, timeFormat.format(testCaseElement.getElapsedTimeInSeconds()));
-			if (testElement.getProgressState() != ProgressState.COMPLETED)
-				addCDATA(atts, IXMLTags.ATTR_INCOMPLETE, Boolean.TRUE.toString());
-			if (testCaseElement.isIgnored())
-				addCDATA(atts, IXMLTags.ATTR_IGNORED, Boolean.TRUE.toString());
-
-			startElement(IXMLTags.NODE_TESTCASE, atts);
-			addFailure(testElement);
-
-			endElement(IXMLTags.NODE_TESTCASE);
-
-		} else {
-			throw new IllegalStateException(String.valueOf(testElement));
-		}
-
-	}
-
-	private void addFailure(ITestElement testElement) throws SAXException {
-		FailureTrace failureTrace= testElement.getFailureTrace();
-		if (failureTrace != null) {
-			AttributesImpl failureAtts= new AttributesImpl();
-//				addCDATA(failureAtts, IXMLTags.ATTR_MESSAGE, xx);
-//				addCDATA(failureAtts, IXMLTags.ATTR_TYPE, xx);
-			String failureKind= testElement.getTestResult(false) == Result.ERROR ? IXMLTags.NODE_ERROR : IXMLTags.NODE_FAILURE;
-			startElement(failureKind, failureAtts);
-			String expected= failureTrace.getExpected();
-			String actual= failureTrace.getActual();
-			if (expected != null) {
-				startElement(IXMLTags.NODE_EXPECTED, NO_ATTS);
-				fHandler.characters(expected.toCharArray(), 0, expected.length());
-				endElement(IXMLTags.NODE_EXPECTED);
-			}
-			if (actual != null) {
-				startElement(IXMLTags.NODE_ACTUAL, NO_ATTS);
-				fHandler.characters(actual.toCharArray(), 0, actual.length());
-				endElement(IXMLTags.NODE_ACTUAL);
-			}
-			String trace= failureTrace.getTrace();
-			fHandler.characters(trace.toCharArray(), 0, trace.length());
-			endElement(failureKind);
-		}
-	}
-
-	private void startElement(String name, Attributes atts) throws SAXException {
-		fHandler.startElement(EMPTY, name, name, atts);
-	}
-
-	private void endElement(String name) throws SAXException {
-		fHandler.endElement(EMPTY, name, name);
-	}
-
-	private static void addCDATA(AttributesImpl atts, String name, int value) {
-		addCDATA(atts, name, Integer.toString(value));
-	}
-
-	private static void addCDATA(AttributesImpl atts, String name, String value) {
-		atts.addAttribute(EMPTY, EMPTY, name, CDATA, value);
-	}
-
-	public void setContentHandler(ContentHandler handler) {
-		this.fHandler= handler;
-	}
-
-	public ContentHandler getContentHandler() {
-		return fHandler;
-	}
-
-	public void setErrorHandler(ErrorHandler handler) {
-		fErrorHandler= handler;
-	}
-
-	public ErrorHandler getErrorHandler() {
-		return fErrorHandler;
-	}
-
-	// ignored:
-
-	public void parse(String systemId) throws IOException, SAXException {
-	}
-
-	public void setDTDHandler(DTDHandler handler) {
-	}
-
-	public DTDHandler getDTDHandler() {
-		return null;
-	}
-
-	public void setEntityResolver(EntityResolver resolver) {
-	}
-
-	public EntityResolver getEntityResolver() {
-		return null;
-	}
-
-	public void setProperty(java.lang.String name, java.lang.Object value) {
-	}
-
-	public Object getProperty(java.lang.String name) {
-		return null;
-	}
-
-	public void setFeature(java.lang.String name, boolean value) {
-	}
-
-	public boolean getFeature(java.lang.String name) {
-		return false;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/refactoring/TypeRenameParticipant.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/refactoring/TypeRenameParticipant.java
index 38b42f7..d244dc9 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/refactoring/TypeRenameParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/refactoring/TypeRenameParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,11 @@ import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.jdt.core.IType;
 
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
 
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 
+
 public class TypeRenameParticipant extends JUnitRenameParticipant {
 
 	private IType fType;
@@ -29,7 +30,7 @@ public class TypeRenameParticipant extends JUnitRenameParticipant {
 
 	protected boolean isTestOrTestSuite() {
 		try {
-			return TestSearchEngine.isTestOrTestSuite(fType);
+			return CoreTestSearchEngine.isTestOrTestSuite(fType);
 		} catch (CoreException e) {
 			return false;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java
index 63a3222..90ece2e 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/EnableStackFilterAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,8 @@ import org.eclipse.jface.action.Action;
 
 import org.eclipse.ui.PlatformUI;
 
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
+
 /**
  * Action to enable/disable stack trace filtering.
  */
@@ -33,14 +35,14 @@ public class EnableStackFilterAction extends Action {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJUnitHelpContextIds.ENABLEFILTER_ACTION);
 
 		fView= view;
-		setChecked(JUnitPreferencePage.getFilterStack());
+		setChecked(JUnitPreferencesConstants.getFilterStack());
 	}
 
 	/*
 	 * @see Action#actionPerformed
 	 */
 	public void run() {
-		JUnitPreferencePage.setFilterStack(isChecked());
+		JUnitPreferencesConstants.setFilterStack(isChecked());
 		fView.refresh();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTrace.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTrace.java
index c520017..5e57509 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTrace.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/FailureTrace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.jface.util.IOpenEventListener;
 import org.eclipse.jface.util.OpenStrategy;
 
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
 import org.eclipse.jdt.internal.junit.model.TestElement;
 
 /**
@@ -185,8 +186,8 @@ public class FailureTrace implements IMenuListener {
 	}
 
 	private String[] getFilterPatterns() {
-		if (JUnitPreferencePage.getFilterStack())
-			return JUnitPreferencePage.getFilterPatterns();
+		if (JUnitPreferencesConstants.getFilterStack())
+			return JUnitPreferencesConstants.getFilterPatterns();
 		return new String[0];
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitAddLibraryProposal.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitAddLibraryProposal.java
index 2e97497..b9ac79d 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitAddLibraryProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitAddLibraryProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@ import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaModelException;
 
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.buildpath.BuildPathSupport;
 
 import org.eclipse.jdt.ui.ISharedImages;
@@ -109,7 +110,7 @@ public final class JUnitAddLibraryProposal implements IJavaCompletionProposal {
 				}
 			} else if (curr.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
 				IPath path= curr.getPath();
-				if (path.segmentCount() > 0 && JUnitPlugin.JUNIT_HOME.equals(path.segment(0))) {
+				if (path.segmentCount() > 0 && JUnitCorePlugin.JUNIT_HOME.equals(path.segment(0))) {
 					if (!added) {
 						curr= entry; // replace
 						added= true;
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitClasspathFixProcessor.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitClasspathFixProcessor.java
index 8c0aaa6..c31dc78 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitClasspathFixProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitClasspathFixProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.ltk.core.refactoring.NullChange;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.buildpath.BuildPathSupport;
 import org.eclipse.jdt.internal.junit.util.JUnitStubUtility;
 
@@ -83,7 +84,7 @@ public class JUnitClasspathFixProcessor extends ClasspathFixProcessor {
 						}
 					} else if (curr.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
 						IPath path= curr.getPath();
-						if (path.segmentCount() > 0 && JUnitPlugin.JUNIT_HOME.equals(path.segment(0))) {
+						if (path.segmentCount() > 0 && JUnitCorePlugin.JUNIT_HOME.equals(path.segment(0))) {
 							if (!added) {
 								curr= entry; // replace
 								added= true;
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.java
index a20844a..9e61ef4 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *     Robert Konigsberg <konigsberg at google.com> - [JUnit] Improve discoverability of the ability to run a single method under JUnit Tests - https://bugs.eclipse.org/bugs/show_bug.cgi?id=285637
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.ui;
 
@@ -51,8 +52,6 @@ public final class JUnitMessages extends NLS {
 	public static String GotoReferencedTestAction_dialog_title;
 	public static String GotoReferencedTestAction_selectdialog_title;
 
-	public static String JUnit4TestFinder_searching_description;
-
 	public static String JUnitAddLibraryProposa_junit4_label;
 
 	public static String JUnitAddLibraryProposal_info;
@@ -62,19 +61,6 @@ public final class JUnitMessages extends NLS {
 	public static String JUnitAddLibraryProposal_junit4_info;
 	public static String JUnitAddLibraryProposal_label;
 
-	public static String JUnitBaseLaunchConfiguration_error_notests;
-	public static String JUnitBaseLaunchConfiguration_error_novmrunner;
-
-	public static String JUnitContainerInitializer_description_initializer_junit3;
-
-	public static String JUnitContainerInitializer_description_initializer_junit4;
-
-	public static String JUnitContainerInitializer_description_initializer_unresolved;
-
-	public static String JUnitContainerInitializer_description_junit3;
-
-	public static String JUnitContainerInitializer_description_junit4;
-
 	public static String JUnitContainerWizardPage_combo_label;
 
 	public static String JUnitContainerWizardPage_error_problem_configuring_container;
@@ -103,30 +89,8 @@ public final class JUnitMessages extends NLS {
 
 	public static String JUnitContainerWizardPage_wizard_title;
 
-	public static String JUnitLaunchConfigurationDelegate_create_source_locator_description;
-
 	public static String JUnitLaunchConfigurationDelegate_dialog_title;
 
-	public static String JUnitLaunchConfigurationDelegate_erro_unknowtestrunner;
-
-	public static String JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist;
-
-	public static String JUnitLaunchConfigurationDelegate_error_invalidproject;
-
-	public static String JUnitLaunchConfigurationDelegate_error_junit4notonpath;
-
-	public static String JUnitLaunchConfigurationDelegate_error_junitnotonpath;
-
-	public static String JUnitLaunchConfigurationDelegate_error_no_socket;
-
-	public static String JUnitLaunchConfigurationDelegate_error_notests_kind;
-
-	public static String JUnitLaunchConfigurationDelegate_error_wrong_input;
-
-	public static String JUnitLaunchConfigurationDelegate_input_type_does_not_exist;
-
-	public static String JUnitLaunchConfigurationDelegate_verifying_attriburtes_description;
-
 	public static String JUnitLaunchConfigurationTab_error_invalidProjectName;
 
 	public static String JUnitLaunchConfigurationTab_error_JDK15_required;
@@ -141,6 +105,8 @@ public final class JUnitMessages extends NLS {
 
 	public static String JUnitLaunchConfigurationTab_error_test_class_not_found;
 
+	public static String JUnitLaunchConfigurationTab_error_test_method_not_found;
+
 	public static String JUnitLaunchConfigurationTab_error_testannotationnotonpath;
 
 	public static String JUnitLaunchConfigurationTab_error_testcasenotonpath;
@@ -165,6 +131,15 @@ public final class JUnitMessages extends NLS {
 
 	public static String JUnitLaunchConfigurationTab_label_search;
 
+	public static String JUnitLaunchConfigurationTab_label_search_method;
+
+	public static String JUnitLaunchConfigurationTab_method_text_decoration;
+
+	public static String JUnitLaunchConfigurationTab_select_method_header;
+	public static String JUnitLaunchConfigurationTab_select_method_title;
+
+	public static String JUnitLaunchConfigurationTab_all_methods_text;
+
 	public static String JUnitLaunchConfigurationTab_label_test;
 
 	public static String JUnitLaunchConfigurationTab_projectdialog_message;
@@ -198,26 +173,20 @@ public final class JUnitMessages extends NLS {
 	public static String JUnitLaunchShortcut_message_selectTestToRun;
 	public static String JUnitMainTab_label_defaultpackage;
 	public static String JUnitPreferencePage_addfilterbutton_label;
-	public static String JUnitPreferencePage_addfilterbutton_tooltip;
 	public static String JUnitPreferencePage_addpackagebutton_label;
-	public static String JUnitPreferencePage_addpackagebutton_tooltip;
 	public static String JUnitPreferencePage_addpackagedialog_message;
 	public static String JUnitPreferencePage_addpackagedialog_title;
 	public static String JUnitPreferencePage_addtypebutton_label;
-	public static String JUnitPreferencePage_addtypebutton_tooltip;
 	public static String JUnitPreferencePage_addtypedialog_error_message;
 	public static String JUnitPreferencePage_addtypedialog_message;
 	public static String JUnitPreferencePage_addtypedialog_title;
 	public static String JUnitPreferencePage_description;
 	public static String JUnitPreferencePage_disableallbutton_label;
-	public static String JUnitPreferencePage_disableallbutton_tooltip;
 	public static String JUnitPreferencePage_enableallbutton_label;
-	public static String JUnitPreferencePage_enableallbutton_tooltip;
 	public static String JUnitPreferencePage_filter_label;
 
 	public static String JUnitPreferencePage_invalidstepfilterreturnescape;
 	public static String JUnitPreferencePage_removefilterbutton_label;
-	public static String JUnitPreferencePage_removefilterbutton_tooltip;
 
 	public static String JUnitPreferencePage_enableassertionscheckbox_label;
 
@@ -284,6 +253,12 @@ public final class JUnitMessages extends NLS {
 	public static String TestRunnerViewPart_ImportTestRunSessionAction_name;
 
 	public static String TestRunnerViewPart_ImportTestRunSessionAction_title;
+	public static String TestRunnerViewPart_ImportTestRunSessionFromURLAction_import_from_url;
+
+	public static String TestRunnerViewPart_ImportTestRunSessionFromURLAction_invalid_url;
+
+	public static String TestRunnerViewPart_ImportTestRunSessionFromURLAction_url;
+
 	public static String TestRunnerViewPart_jobName;
 	public static String TestRunnerViewPart_label_failure;
 	public static String TestRunnerViewPart_Launching;
@@ -316,10 +291,6 @@ public final class JUnitMessages extends NLS {
 	public static String TestRunnerViewPart_show_failures_only;
 	public static String TestRunnerViewPart_hierarchical_layout;
 
-	public static String TestRunSession_unrootedTests;
-
-	public static String TestSearchEngine_message_searching;
-
 	public static String TestSessionLabelProvider_testName_elapsedTimeInSeconds;
 
 	public static String TestSessionLabelProvider_testName_JUnitVersion;
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.properties b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.properties
index 2215b0b..82dca4a 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#     Robert Konigsberg <konigsberg at google.com> - [JUnit] Improve discoverability of the ability to run a single method under JUnit Tests - https://bugs.eclipse.org/bugs/show_bug.cgi?id=285637
 ###############################################################################
 CopyTrace_action_label=Copy Trace
 CopyTraceAction_problem=Problem Copying to Clipboard
@@ -33,20 +34,12 @@ ScrollLockAction_action_tooltip=Scroll Lock
 
 JUnitPreferencePage_description=JUnit settings (changes only apply to new test runs):
 JUnitPreferencePage_addfilterbutton_label=Add &Filter
-JUnitPreferencePage_addfilterbutton_tooltip=Type the Name of a New Stack Filter
 JUnitPreferencePage_addtypebutton_label=Add &Class...
-JUnitPreferencePage_addtypebutton_tooltip=Choose a Java Type and Add It to Stack Filters
 JUnitPreferencePage_addpackagebutton_label=Add &Packages...
-JUnitPreferencePage_addpackagebutton_tooltip=Choose Package(s) to Add to Stack Filters
 JUnitPreferencePage_removefilterbutton_label=&Remove
-JUnitPreferencePage_removefilterbutton_tooltip=Remove All Selected Stack Filters
 JUnitPreferencePage_enableallbutton_label=&Enable All
-JUnitPreferencePage_enableallbutton_tooltip=Enables All Stack Filters
 JUnitContainerWizardPage_wizard_description=Select the JUnit version to use in this project.
-JUnitContainerInitializer_description_junit4=JUnit 4
-JUnitContainerInitializer_description_junit3=JUnit 3
 JUnitPreferencePage_disableallbutton_label=Disa&ble All
-JUnitPreferencePage_disableallbutton_tooltip=Disables All Stack Filters
 JUnitPreferencePage_filter_label=&Stack trace filter patterns:
 JUnitPreferencePage_invalidstepfilterreturnescape=Invalid stack filter. Press Enter to continue editing or Escape to cancel.
 JUnitPreferencePage_addtypedialog_title=Add Class to Stack Filters
@@ -86,6 +79,9 @@ TestRunnerViewPart_rerunFailedFirstLaunchConfigName={0} (Failed Tests first)
 TestRunnerViewPart_ImportTestRunSessionAction_name=&Import...
 TestRunnerViewPart_ImportTestRunSessionAction_title=Import Test Run
 TestRunnerViewPart_ImportTestRunSessionAction_error_title=Import Test Run
+TestRunnerViewPart_ImportTestRunSessionFromURLAction_import_from_url=Import from &URL...
+TestRunnerViewPart_ImportTestRunSessionFromURLAction_invalid_url=Invalid URL: 
+TestRunnerViewPart_ImportTestRunSessionFromURLAction_url=&URL of test run file:
 TestRunnerViewPart_ExportTestRunSessionAction_name=&Export...
 TestRunnerViewPart_ExportTestRunSessionAction_title=Export Test Run
 TestRunnerViewPart_ExportTestRunSessionAction_error_title=Export Test Run
@@ -104,11 +100,10 @@ TestRunnerViewPart_configName=Rerun {0}
 TestRunnerViewPart_layout_menu=&Layout
 TestRunnerViewPart_Launching=Launching {0}...
 TestRunnerViewPart_test_runs=Test Runs
-TestRunSession_unrootedTests=Unrooted Tests
-TestRunnerViewPart_toggle_vertical_label=&Vertical View Orientation
-TestRunnerViewPart_toggle_horizontal_label=&Horizontal View Orientation
+TestRunnerViewPart_toggle_automatic_label=&Automatic
+TestRunnerViewPart_toggle_horizontal_label=&Horizontal
+TestRunnerViewPart_toggle_vertical_label=&Vertical
 TestRunnerViewPart_activate_on_failure_only=Activate on &Error/Failure Only
-TestRunnerViewPart_toggle_automatic_label=&Automatic View Orientation
 TestRunnerViewPart_terminate_title=Rerun Test
 TestRunnerViewPart_terminate_message=Terminate currently running tests?
 TestRunnerViewPart_test_run_history=Test Run History...
@@ -122,35 +117,29 @@ TestSessionLabelProvider_testName_JUnitVersion={0} [Runner: {1}]
 TestSessionLabelProvider_testMethodName_className={0} - {1}
 
 JUnitLaunchConfigurationDelegate_dialog_title=Problems Launching JUnit Tests
-JUnitLaunchConfigurationDelegate_error_invalidproject=Invalid project specified.
-JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist=The input element of the launch configuration does not exist
-JUnitLaunchConfigurationDelegate_verifying_attriburtes_description=Verifying launch attributes...
-JUnitLaunchConfigurationDelegate_create_source_locator_description=Creating source locator...
-JUnitBaseLaunchConfiguration_error_novmrunner=Internal error: JRE {0} does not specify a VM Runner
-JUnitBaseLaunchConfiguration_error_notests=No tests found.
-JUnitLaunchConfigurationDelegate_error_notests_kind=No tests found with test runner ''{0}''.
-JUnitLaunchConfigurationDelegate_error_wrong_input=Can only run types or single method
-JUnitLaunchConfigurationDelegate_error_junitnotonpath=Cannot find 'junit.framework.TestCase' on project build path. JUnit 3 tests can only be run if JUnit is on the build path.
-JUnitLaunchConfigurationDelegate_error_junit4notonpath=Cannot find 'org.junit.Test' on project build path. JUnit 4 tests can only be run if JUnit 4 is on the build path.
-JUnitLaunchConfigurationDelegate_erro_unknowtestrunner=Could not evaluate test runner
 JUnitLaunchConfigurationTab_error_test_class_not_found=Can not find test class ''{0}'' in project ''{1}''
+JUnitLaunchConfigurationTab_error_test_method_not_found=Can not find test method {0}.{1} in project {2}
 JUnitLaunchConfigurationTab_error_testannotationnotonpath=Cannot find class 'org.junit.Test' on project build path.
-JUnitLaunchConfigurationDelegate_input_type_does_not_exist=The input type of the launch configuration does not exist
 JUnitLaunchConfigurationTab_label_oneTest=Run a s&ingle test
 JUnitLaunchConfigurationTab_label_project=&Project:
 JUnitClasspathFixProcessor_progress_desc=Adding JUnit library
 JUnitLaunchConfigurationTab_label_browse=&Browse...
 JUnitLaunchConfigurationTab_label_test=T&est class:
 JUnitLaunchConfigurationTab_label_search=&Search...
+JUnitLaunchConfigurationTab_label_search_method=Searc&h...
+JUnitLaunchConfigurationTab_method_text_decoration=Omit the method name to run all tests.
+JUnitLaunchConfigurationTab_select_method_header=Choose a test method for ''{0}'':
+JUnitLaunchConfigurationTab_select_method_title=Test Method Selection
+JUnitLaunchConfigurationTab_all_methods_text=(all methods)
 JUnitLaunchConfigurationTab_label_containerTest=Run &all tests in the selected project, package or source folder:
 JUnitLaunchConfigurationTab_label_keeprunning=&Keep JUnit running after a test run when debugging
 JUnitLaunchConfigurationTab_testdialog_title=Test Selection
 JUnitLaunchConfigurationTab_testdialog_message=Choose a test case or test suite:
 JUnitLaunchConfigurationTab_projectdialog_title=Project Selection
-JUnitLaunchConfigurationTab_projectdialog_message=Choose a project to constrain the search for main types:
+JUnitLaunchConfigurationTab_projectdialog_message=Choose a project to constrain the search for test classes:
 JUnitLaunchConfigurationTab_tab_label=Test
 JUnitMainTab_label_defaultpackage=(default package)
-JUnitLaunchConfigurationTab_label_method=Test method: 
+JUnitLaunchConfigurationTab_label_method=Test &method:
 JUnitLaunchConfigurationTab_Test_Loader=&Test runner:
 JUnitLaunchConfigurationTab_folderdialog_title=Folder Selection
 JUnitLaunchConfigurationTab_folderdialog_message=Choose a Project, Source Folder or Package:
@@ -169,7 +158,6 @@ JUnitContainerWizardPage_option_junit4=JUnit 4
 JUnitContainerWizardPage_resolved_label=Current location:
 JUnitLaunchShortcut_message_launchfailed=Launching of JUnit tests unexpectedly failed. Check log for details.
 JUnitLaunchConfigurationTab_error_noContainer=No project, source folder or package is specified
-TestSearchEngine_message_searching=Searching for tests and suites...
 JUnitLaunchShortcut_dialog_title=JUnit Launch
 JUnitLaunchShortcut_message_notests=No JUnit tests found.
 JUnitLaunchShortcut_dialog_title2=Test Selection
@@ -179,7 +167,6 @@ LaunchConfigSetAttributeChange_name=Update attribute ''{0}'' on launch configura
 LaunchConfigRenameChange_name=Rename launch configuration ''{0}'' to ''{1}''
 JUnitLaunchShortcut_message_selectTestToDebug=Select Test to debug
 JUnitLaunchShortcut_message_selectConfiguration=Select a Test Configuration
-JUnitLaunchConfigurationDelegate_error_no_socket=No socket available
 JUnitLaunchShortcut_message_selectDebugConfiguration=Select JUnit configuration to debug
 JUnitLaunchShortcut_message_selectRunConfiguration=Select JUnit configuration to run
 ShowNextFailureAction_label=Next Failure
@@ -216,7 +203,6 @@ JUnitQuickFixProcessor_add_assert_description=Add static import ''{0}''
 JUnitQuickFixProcessor_apply_problem_description=Problem executing the JUnit quick fix.
 JUnitQuickFixProcessor_apply_problem_title=JUnit Quick Fix
 JUnitQuickFixProcessor_add_assert_info=Adds a static import ''{0}''.
-JUnit4TestFinder_searching_description=Searching for JUnit 4 tests...
 
 JUnitAddLibraryProposal_info=Adds the JUnit 3 library to the build path.
 JUnitAddLibraryProposa_junit4_label=Add JUnit 4 library to the build path
@@ -244,9 +230,6 @@ JUnitContainerWizardPage_error_problem_configuring_container=Problem while confi
 JUnitContainerWizardPage_lib_not_found=Not found
 JUnitContainerWizardPage_source_location_label=Source location:
 JUnitContainerWizardPage_source_not_found=Not found
-JUnitContainerInitializer_description_initializer_junit3=JUnit 3
-JUnitContainerInitializer_description_initializer_junit4=JUnit 4
-JUnitContainerInitializer_description_initializer_unresolved=Unresolved JUnit container
 JUnitViewEditorLauncher_dialog_title=Import Test Run
 JUnitViewEditorLauncher_error_occurred=An error occurred while opening a test run file.
 ClasspathVariableMarkerResolutionGenerator_use_JUnit3=Use the JUnit 3 library
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java
index 563d7f3..5bd5be0 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java
@@ -7,16 +7,15 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *   Julien Ruaux: jruaux at octo.com
- * 	 Vincent Massol: vmassol at octo.com
+ *     Julien Ruaux: jruaux at octo.com
+ * 	   Vincent Massol: vmassol at octo.com
  *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.ui;
 
-import java.io.File;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.osgi.framework.Bundle;
@@ -25,16 +24,14 @@ import org.osgi.framework.ServiceReference;
 import org.osgi.service.packageadmin.PackageAdmin;
 
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
@@ -46,10 +43,9 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 
-import org.eclipse.jdt.internal.junit.model.JUnitModel;
-
 /**
  * The plug-in runtime class for the JUnit plug-in.
  */
@@ -61,42 +57,9 @@ public class JUnitPlugin extends AbstractUIPlugin {
 	private static JUnitPlugin fgPlugin= null;
 
 	public static final String PLUGIN_ID= "org.eclipse.jdt.junit"; //$NON-NLS-1$
-	public static final String ID_EXTENSION_POINT_TESTRUN_LISTENERS= PLUGIN_ID + "." + "testRunListeners"; //$NON-NLS-1$ //$NON-NLS-2$
 	public static final String ID_EXTENSION_POINT_JUNIT_LAUNCHCONFIGS= PLUGIN_ID + "." + "junitLaunchConfigs"; //$NON-NLS-1$ //$NON-NLS-2$
-	public static final String ID_EXTENSION_POINT_TEST_KINDS= PLUGIN_ID + "." + "internal_testKinds"; //$NON-NLS-1$ //$NON-NLS-2$
-
-	public final static String TEST_SUPERCLASS_NAME= "junit.framework.TestCase"; //$NON-NLS-1$
-	public final static String TEST_INTERFACE_NAME= "junit.framework.Test"; //$NON-NLS-1$
-
-	public final static String JUNIT4_ANNOTATION_NAME= "org.junit.Test"; //$NON-NLS-1$
-	public static final String SIMPLE_TEST_INTERFACE_NAME= "Test"; //$NON-NLS-1$
-
-	/**
-	 * The class path variable referring to the junit home location
-	 */
-	public final static String JUNIT_HOME= "JUNIT_HOME"; //$NON-NLS-1$
-
-	/**
-	 * The class path variable referring to the junit source location
-     * @since 3.2
-	 */
-	public static final String JUNIT_SRC_HOME= "JUNIT_SRC_HOME";  //$NON-NLS-1$
 
 	private static final IPath ICONS_PATH= new Path("$nl$/icons/full"); //$NON-NLS-1$
-	private static final String HISTORY_DIR_NAME= "history"; //$NON-NLS-1$
-
-	private final JUnitModel fJUnitModel= new JUnitModel();
-
-
-	/**
-	 * List storing the registered test run listeners
-	 */
-	private List/*<ITestRunListener>*/ fLegacyTestRunListeners;
-
-	/**
-	 * List storing the registered test run listeners
-	 */
-	private ListenerList/*<TestRunListener>*/ fNewTestRunListeners;
 
 	/**
 	 * List storing the registered JUnit launch configuration types
@@ -110,7 +73,6 @@ public class JUnitPlugin extends AbstractUIPlugin {
 
 	public JUnitPlugin() {
 		fgPlugin= this;
-		fNewTestRunListeners= new ListenerList();
 	}
 
 	public static JUnitPlugin getDefault() {
@@ -231,7 +193,6 @@ public class JUnitPlugin extends AbstractUIPlugin {
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
 		fBundleContext= context;
-		fJUnitModel.start();
 	}
 
 	/**
@@ -239,11 +200,7 @@ public class JUnitPlugin extends AbstractUIPlugin {
 	 */
 	public void stop(BundleContext context) throws Exception {
 		fIsStopped= true;
-		try {
-			fJUnitModel.stop();
-		} finally {
-			super.stop(context);
-		}
+		super.stop(context);
 		fBundleContext= null;
 	}
 
@@ -261,38 +218,6 @@ public class JUnitPlugin extends AbstractUIPlugin {
 		return fBundleContext.getService(reference);
 	}
 
-	public static JUnitModel getModel() {
-		return getDefault().fJUnitModel;
-	}
-
-	/**
-	 * Initializes TestRun Listener extensions
-	 * @deprecated to avoid deprecation warning
-	 */
-	private void loadTestRunListeners() {
-		fLegacyTestRunListeners= new ArrayList();
-		IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ID_EXTENSION_POINT_TESTRUN_LISTENERS);
-		if (extensionPoint == null) {
-			return;
-		}
-		IConfigurationElement[] configs= extensionPoint.getConfigurationElements();
-		MultiStatus status= new MultiStatus(PLUGIN_ID, IStatus.OK, "Could not load some testRunner extension points", null); //$NON-NLS-1$
-
-		for (int i= 0; i < configs.length; i++) {
-			try {
-				Object testRunListener= configs[i].createExecutableExtension("class"); //$NON-NLS-1$
-				if (testRunListener instanceof org.eclipse.jdt.junit.ITestRunListener) {
-					fLegacyTestRunListeners.add(testRunListener);
-				}
-			} catch (CoreException e) {
-				status.add(e.getStatus());
-			}
-		}
-		if (!status.isOK()) {
-			JUnitPlugin.log(status);
-		}
-	}
-
 	/**
 	 * Loads the registered JUnit launch configurations
 	 */
@@ -311,17 +236,6 @@ public class JUnitPlugin extends AbstractUIPlugin {
 	}
 
 	/**
-	 * @return an array of all TestRun listeners
-	 * @deprecated to avoid deprecation warnings
-	 */
-	public org.eclipse.jdt.junit.ITestRunListener[] getTestRunListeners() {
-		if (fLegacyTestRunListeners == null) {
-			loadTestRunListeners();
-		}
-		return (org.eclipse.jdt.junit.ITestRunListener[]) fLegacyTestRunListeners.toArray(new org.eclipse.jdt.junit.ITestRunListener[fLegacyTestRunListeners.size()]);
-	}
-
-	/**
 	 * @return a list of all JUnit launch configuration types
 	 */
 	public List/*<String>*/ getJUnitLaunchConfigTypeIDs() {
@@ -367,40 +281,6 @@ public class JUnitPlugin extends AbstractUIPlugin {
 		return null;
 	}
 
-	/**
-	 * Adds a TestRun listener to the collection of listeners
-	 * @param newListener the listener to add
-	 * @deprecated to avoid deprecation warnings
-	 */
-	public void addTestRunListener(org.eclipse.jdt.junit.ITestRunListener newListener) {
-		if (fLegacyTestRunListeners == null)
-			loadTestRunListeners();
-
-		for (Iterator iter= fLegacyTestRunListeners.iterator(); iter.hasNext();) {
-			Object o= iter.next();
-			if (o == newListener)
-				return;
-		}
-		fLegacyTestRunListeners.add(newListener);
-	}
-
-	/**
-	 * Removes a TestRun listener to the collection of listeners
-	 * @param newListener the listener to remove
-	 * @deprecated to avoid deprecation warnings
-	 */
-	public void removeTestRunListener(org.eclipse.jdt.junit.ITestRunListener newListener) {
-		if (fLegacyTestRunListeners != null)
-			fLegacyTestRunListeners.remove(newListener);
-	}
-
-	/**
-	 * @return a <code>ListenerList</code> of all <code>TestRunListener</code>s
-	 */
-	public ListenerList/*<TestRunListener>*/ getNewTestRunListeners() {
-		return fNewTestRunListeners;
-	}
-
 	public static boolean isStopped() {
 		return fIsStopped;
 	}
@@ -413,13 +293,44 @@ public class JUnitPlugin extends AbstractUIPlugin {
 		}
 		return section;
 	}
+	
+	public static void asyncShowTestRunnerViewPart() {
+		getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				showTestRunnerViewPartInActivePage();
+			}
+		});
+	}
 
-	public static File getHistoryDirectory() throws IllegalStateException {
-		File historyDir= getDefault().getStateLocation().append(HISTORY_DIR_NAME).toFile();
-		if (! historyDir.isDirectory()) {
-			historyDir.mkdir();
+	public static TestRunnerViewPart showTestRunnerViewPartInActivePage() {
+		try {
+			// Have to force the creation of view part contents
+			// otherwise the UI will not be updated
+			IWorkbenchPage page= JUnitPlugin.getActivePage();
+			if (page == null)
+				return null;
+			TestRunnerViewPart view= (TestRunnerViewPart) page.findView(TestRunnerViewPart.NAME);
+			if (view == null) {
+				// create and show the result view if it isn't created yet.
+				return (TestRunnerViewPart) page.showView(TestRunnerViewPart.NAME, null, IWorkbenchPage.VIEW_VISIBLE);
+			} else {
+				return view;
+			}
+		} catch (PartInitException pie) {
+			JUnitPlugin.log(pie);
+			return null;
 		}
-		return historyDir;
 	}
-
+	
+	private static Display getDisplay() {
+//			Shell shell= getActiveWorkbenchShell();
+//			if (shell != null) {
+//				return shell.getDisplay();
+//			}
+		Display display= Display.getCurrent();
+		if (display == null) {
+			display= Display.getDefault();
+		}
+		return display;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java
index 3b157c3..f597da5 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java
@@ -15,7 +15,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
-import java.util.StringTokenizer;
 
 import org.eclipse.osgi.util.TextProcessor;
 
@@ -40,9 +39,10 @@ import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 
+import org.eclipse.core.runtime.preferences.InstanceScope;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -66,6 +66,7 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.preferences.ScopedPreferenceStore;
 import org.eclipse.ui.progress.IProgressService;
 
 import org.eclipse.jdt.core.IJavaElement;
@@ -74,6 +75,8 @@ import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
 import org.eclipse.jdt.internal.junit.launcher.AssertionVMArg;
 import org.eclipse.jdt.internal.junit.util.ExceptionHandler;
 import org.eclipse.jdt.internal.junit.util.LayoutUtil;
@@ -316,7 +319,7 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 	public JUnitPreferencePage() {
 		super();
 		setDescription(JUnitMessages.JUnitPreferencePage_description);
-		setPreferenceStore(JUnitPlugin.getDefault().getPreferenceStore());
+		setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(),JUnitCorePlugin.CORE_PLUGIN_ID));
 	}
 
 	protected Control createContents(Composite parent) {
@@ -422,7 +425,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fAddFilterButton= new Button(buttonContainer, SWT.PUSH);
 		fAddFilterButton.setText(JUnitMessages.JUnitPreferencePage_addfilterbutton_label);
-		fAddFilterButton.setToolTipText(JUnitMessages.JUnitPreferencePage_addfilterbutton_tooltip);
 		gd= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
 		fAddFilterButton.setLayoutData(gd);
 		LayoutUtil.setButtonDimensionHint(fAddFilterButton);
@@ -434,7 +436,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fAddTypeButton= new Button(buttonContainer, SWT.PUSH);
 		fAddTypeButton.setText(JUnitMessages.JUnitPreferencePage_addtypebutton_label);
-		fAddTypeButton.setToolTipText(JUnitMessages.JUnitPreferencePage_addtypebutton_tooltip);
 		gd= getButtonGridData(fAddTypeButton);
 		fAddTypeButton.setLayoutData(gd);
 		LayoutUtil.setButtonDimensionHint(fAddTypeButton);
@@ -446,7 +447,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fAddPackageButton= new Button(buttonContainer, SWT.PUSH);
 		fAddPackageButton.setText(JUnitMessages.JUnitPreferencePage_addpackagebutton_label);
-		fAddPackageButton.setToolTipText(JUnitMessages.JUnitPreferencePage_addpackagebutton_tooltip);
 		gd= getButtonGridData(fAddPackageButton);
 		fAddPackageButton.setLayoutData(gd);
 		SWTUtil.setButtonDimensionHint(fAddPackageButton);
@@ -458,7 +458,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fRemoveFilterButton= new Button(buttonContainer, SWT.PUSH);
 		fRemoveFilterButton.setText(JUnitMessages.JUnitPreferencePage_removefilterbutton_label);
-		fRemoveFilterButton.setToolTipText(JUnitMessages.JUnitPreferencePage_removefilterbutton_tooltip);
 		gd= getButtonGridData(fRemoveFilterButton);
 		fRemoveFilterButton.setLayoutData(gd);
 		SWTUtil.setButtonDimensionHint(fRemoveFilterButton);
@@ -471,7 +470,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fEnableAllButton= new Button(buttonContainer, SWT.PUSH);
 		fEnableAllButton.setText(JUnitMessages.JUnitPreferencePage_enableallbutton_label);
-		fEnableAllButton.setToolTipText(JUnitMessages.JUnitPreferencePage_enableallbutton_tooltip);
 		gd= getButtonGridData(fEnableAllButton);
 		fEnableAllButton.setLayoutData(gd);
 		SWTUtil.setButtonDimensionHint(fEnableAllButton);
@@ -483,7 +481,6 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 
 		fDisableAllButton= new Button(buttonContainer, SWT.PUSH);
 		fDisableAllButton.setText(JUnitMessages.JUnitPreferencePage_disableallbutton_label);
-		fDisableAllButton.setToolTipText(JUnitMessages.JUnitPreferencePage_disableallbutton_tooltip);
 		gd= getButtonGridData(fDisableAllButton);
 		fDisableAllButton.setLayoutData(gd);
 		SWTUtil.setButtonDimensionHint(fDisableAllButton);
@@ -746,7 +743,7 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 	 * @return list
 	 */
 	protected List createActiveStackFiltersList() {
-		return Arrays.asList(getFilterPatterns());
+		return Arrays.asList(JUnitPreferencesConstants.getFilterPatterns());
 	}
 
 	/**
@@ -756,7 +753,7 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 	 */
 	protected List createInactiveStackFiltersList() {
 		String[] strings=
-			JUnitPreferencePage.parseList(getPreferenceStore().getString(JUnitPreferencesConstants.PREF_INACTIVE_FILTERS_LIST));
+			JUnitPreferencesConstants.parseList(getPreferenceStore().getString(JUnitPreferencesConstants.PREF_INACTIVE_FILTERS_LIST));
 		return Arrays.asList(strings);
 	}
 
@@ -768,30 +765,4 @@ public class JUnitPreferencePage extends PreferencePage implements IWorkbenchPre
 		fEnableAllButton.setEnabled(enabled);
 		fDisableAllButton.setEnabled(enabled);
 	}
-
-	public static String[] getFilterPatterns() {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		return JUnitPreferencePage.parseList(store.getString(JUnitPreferencesConstants.PREF_ACTIVE_FILTERS_LIST));
-	}
-
-	public static boolean getFilterStack() {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		return store.getBoolean(JUnitPreferencesConstants.DO_FILTER_STACK);
-	}
-
-	public static void setFilterStack(boolean filter) {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		store.setValue(JUnitPreferencesConstants.DO_FILTER_STACK, filter);
-	}
-
-	/*
-	 * Parses the comma separated string into an array of strings
-	 */
-	private static String[] parseList(String listString) {
-		List list= new ArrayList(10);
-		StringTokenizer tokenizer= new StringTokenizer(listString, ","); //$NON-NLS-1$
-		while (tokenizer.hasMoreTokens())
-			list.add(tokenizer.nextToken());
-		return (String[]) list.toArray(new String[list.size()]);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencesConstants.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencesConstants.java
deleted file mode 100644
index 4af67e5..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencesConstants.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.ui;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Defines constants which are used to refer to values in the plugin's preference store.
- */
-public class JUnitPreferencesConstants {
-	/**
-	 * Boolean preference controlling whether the failure stack should be
-	 * filtered.
-	 */
-	public static final String DO_FILTER_STACK= JUnitPlugin.PLUGIN_ID + ".do_filter_stack"; //$NON-NLS-1$
-
-	/**
-	 * Boolean preference controlling whether the JUnit view should be shown on
-	 * errors only.
-	 */
-	public static final String SHOW_ON_ERROR_ONLY= JUnitPlugin.PLUGIN_ID + ".show_on_error"; //$NON-NLS-1$
-
-	/**
-	 * Boolean preference controlling whether the JUnit view should be shown on
-	 * errors only.
-	 */
-	public static final String ENABLE_ASSERTIONS= JUnitPlugin.PLUGIN_ID + ".enable_assertions"; //$NON-NLS-1$
-
-	/**
-	 * List of active stack filters. A String containing a comma separated list
-	 * of fully qualified type names/patterns.
-	 */
-	public static final String PREF_ACTIVE_FILTERS_LIST = JUnitPlugin.PLUGIN_ID + ".active_filters"; //$NON-NLS-1$
-
-	/**
-	 * List of inactive stack filters. A String containing a comma separated
-	 * list of fully qualified type names/patterns.
-	 */
-	public static final String PREF_INACTIVE_FILTERS_LIST = JUnitPlugin.PLUGIN_ID + ".inactive_filters"; //$NON-NLS-1$
-
-	/**
-	 * Maximum number of remembered test runs.
-	 */
-	public static final String MAX_TEST_RUNS= JUnitPlugin.PLUGIN_ID + ".max_test_runs"; //$NON-NLS-1$
-
-	/**
-	 * Javadoc location for JUnit 3
-	 */
-	public static final String JUNIT3_JAVADOC= JUnitPlugin.PLUGIN_ID + ".junit3.javadoclocation"; //$NON-NLS-1$
-
-
-	/**
-	 * Javadoc location for JUnit 4
-	 */
-	public static final String JUNIT4_JAVADOC= JUnitPlugin.PLUGIN_ID + ".junit4.javadoclocation"; //$NON-NLS-1$
-
-	/**
-	 * Javadoc location for org.hamcrest.core (JUnit 4)
-	 */
-	public static final String HAMCREST_CORE_JAVADOC= JUnitPlugin.PLUGIN_ID + ".junit4.hamcrest.core.javadoclocation"; //$NON-NLS-1$
-	
-
-	private static final String[] fgDefaultFilterPatterns= new String[] {
-		"org.eclipse.jdt.internal.junit.runner.*", //$NON-NLS-1$
-		"org.eclipse.jdt.internal.junit4.runner.*", //$NON-NLS-1$
-		"org.eclipse.jdt.internal.junit.ui.*", //$NON-NLS-1$
-		"junit.framework.TestCase", //$NON-NLS-1$
-		"junit.framework.TestResult", //$NON-NLS-1$
-		"junit.framework.TestResult$1", //$NON-NLS-1$
-		"junit.framework.TestSuite", //$NON-NLS-1$
-		"junit.framework.Assert", //$NON-NLS-1$
-		"org.junit.*", //$NON-NLS-1$ //TODO: filter all these?
-		"java.lang.reflect.Method.invoke", //$NON-NLS-1$
-		"sun.reflect.*", //$NON-NLS-1$
-	};
-
-	private JUnitPreferencesConstants() {
-		// no instance
-	}
-
-	/**
-	 * Returns the default list of active stack filters.
-	 *
-	 * @return list
-	 */
-	public static List createDefaultStackFiltersList() {
-		return Arrays.asList(fgDefaultFilterPatterns);
-	}
-
-	/**
-	 * Serializes the array of strings into one comma
-	 * separated string.
-	 *
-	 * @param list array of strings
-	 * @return a single string composed of the given list
-	 */
-	public static String serializeList(String[] list) {
-		if (list == null)
-			return ""; //$NON-NLS-1$
-
-		StringBuffer buffer= new StringBuffer();
-		for (int i= 0; i < list.length; i++) {
-			if (i > 0)
-				buffer.append(',');
-
-			buffer.append(list[i]);
-		}
-		return buffer.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitQuickFixProcessor.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitQuickFixProcessor.java
index 3702b33..abbbb54 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitQuickFixProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitQuickFixProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,7 +41,6 @@ import org.eclipse.ltk.core.refactoring.CompositeChange;
 import org.eclipse.ltk.core.refactoring.PerformChangeOperation;
 import org.eclipse.ltk.core.refactoring.RefactoringCore;
 import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.ui.refactoring.RefactoringUI;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaProject;
@@ -58,6 +57,7 @@ import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 
 import org.eclipse.jdt.internal.junit.BasicElementLabels;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.Messages;
 import org.eclipse.jdt.internal.junit.util.ExceptionHandler;
 import org.eclipse.jdt.internal.junit.util.JUnitStubUtility;
@@ -192,7 +192,7 @@ public class JUnitQuickFixProcessor implements IQuickFixProcessor {
 				IAnnotationBinding[] annotations= binding.getAnnotations();
 				for (int i= 0; i < annotations.length; i++) {
 					final ITypeBinding annotationType= annotations[i].getAnnotationType();
-					if (annotationType != null && JUnitPlugin.JUNIT4_ANNOTATION_NAME.equals(annotationType.getQualifiedName()))
+					if (annotationType != null && JUnitCorePlugin.JUNIT4_ANNOTATION_NAME.equals(annotationType.getQualifiedName()))
 						return true;
 				}
 			}
@@ -233,7 +233,7 @@ public class JUnitQuickFixProcessor implements IQuickFixProcessor {
 						try {
 							Change change= createChange();
 							change.initializeValidationData(new NullProgressMonitor());
-							PerformChangeOperation op= RefactoringUI.createUIAwareChangeOperation(change);
+							PerformChangeOperation op= new PerformChangeOperation(change);
 							op.setUndoManager(RefactoringCore.getUndoManager(), getDisplayString());
 							op.setSchedulingRule(fJavaProject.getProject().getWorkspace().getRoot());
 							op.run(monitor);
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JunitPreferenceInitializer.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JunitPreferenceInitializer.java
deleted file mode 100644
index 3eaafdd..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JunitPreferenceInitializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Sebastian Davids <sdavids at gmx.de> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.junit.ui;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * Default preference value initialization for the
- * <code>org.eclipse.jdt.junit</code> plug-in.
- */
-public class JunitPreferenceInitializer extends AbstractPreferenceInitializer {
-
-	/** {@inheritDoc} */
-	public void initializeDefaultPreferences() {
-		IPreferenceStore prefs= JUnitPlugin.getDefault().getPreferenceStore();
-
-		prefs.setDefault(JUnitPreferencesConstants.DO_FILTER_STACK, true);
-
-		prefs.setDefault(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, false);
-		prefs.setDefault(JUnitPreferencesConstants.ENABLE_ASSERTIONS, false);
-
-		List defaults= JUnitPreferencesConstants.createDefaultStackFiltersList();
-		String[] filters= (String[]) defaults.toArray(new String[defaults.size()]);
-		String active= JUnitPreferencesConstants.serializeList(filters);
-		prefs.setDefault(JUnitPreferencesConstants.PREF_ACTIVE_FILTERS_LIST, active);
-		prefs.setDefault(JUnitPreferencesConstants.PREF_INACTIVE_FILTERS_LIST, ""); //$NON-NLS-1$
-		prefs.setDefault(JUnitPreferencesConstants.MAX_TEST_RUNS, 10);
-
-		// see http://sourceforge.net/tracker/index.php?func=detail&aid=1877429&group_id=15278&atid=115278
-		prefs.setDefault(JUnitPreferencesConstants.JUNIT3_JAVADOC, "http://www.junit.org/junit/javadoc/3.8.1"); //$NON-NLS-1$
-		prefs.setDefault(JUnitPreferencesConstants.JUNIT4_JAVADOC, "http://www.junit.org/junit/javadoc/4.5"); //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/OpenEditorAction.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/OpenEditorAction.java
index b141999..76bf2da 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/OpenEditorAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/OpenEditorAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.ui.texteditor.ITextEditor;
@@ -65,7 +66,7 @@ public abstract class OpenEditorAction extends Action {
 	 * @see IAction#run()
 	 */
 	public void run() {
-		ITextEditor textEditor= null;
+		IEditorPart editor= null;
 		try {
 			IJavaElement element= findElement(getLaunchedProject(), fClassName);
 			if (element == null) {
@@ -73,16 +74,16 @@ public abstract class OpenEditorAction extends Action {
 					JUnitMessages.OpenEditorAction_error_cannotopen_title, JUnitMessages.OpenEditorAction_error_cannotopen_message);
 				return;
 			}
-			textEditor= (ITextEditor) JavaUI.openInEditor(element, fActivate, false);
+			editor= JavaUI.openInEditor(element, fActivate, false);
 		} catch (CoreException e) {
 			ErrorDialog.openError(getShell(), JUnitMessages.OpenEditorAction_error_dialog_title, JUnitMessages.OpenEditorAction_error_dialog_message, e.getStatus());
 			return;
 		}
-		if (textEditor == null) {
+		if (!(editor instanceof ITextEditor)) {
 			fTestRunner.registerInfoMessage(JUnitMessages.OpenEditorAction_message_cannotopen);
 			return;
 		}
-		reveal(textEditor);
+		reveal((ITextEditor)editor);
 	}
 
 	protected Shell getShell() {
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestMethodSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestMethodSelectionDialog.java
index 3d20d10..9215e74 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestMethodSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestMethodSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@ import org.eclipse.jdt.core.search.SearchPattern;
 import org.eclipse.jdt.core.search.SearchRequestor;
 
 import org.eclipse.jdt.internal.junit.BasicElementLabels;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
@@ -113,7 +114,7 @@ public class TestMethodSelectionDialog extends ElementListSelectionDialog {
 	}
 
 	private IType findTestType() {
-		String qualifiedName= JUnitPlugin.TEST_INTERFACE_NAME;
+		String qualifiedName= JUnitCorePlugin.TEST_INTERFACE_NAME;
 		IJavaProject[] projects;
 		Set result= new HashSet();
 		try {
@@ -129,7 +130,7 @@ public class TestMethodSelectionDialog extends ElementListSelectionDialog {
 			return null;
 		}
 		if (result.size() == 0) {
-			String msg= Messages.format(JUnitMessages.TestMethodSelectionDialog_test_not_found, BasicElementLabels.getJavaElementName(JUnitPlugin.TEST_INTERFACE_NAME));
+			String msg= Messages.format(JUnitMessages.TestMethodSelectionDialog_test_not_found, BasicElementLabels.getJavaElementName(JUnitCorePlugin.TEST_INTERFACE_NAME));
 			MessageDialog.openError(getParentShell(), JUnitMessages.TestMethodSelectionDialog_select_dialog_title, msg);
 			return null;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
index 7814225..0ceb5aa 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,19 @@
  *     Sebastian Davids: sdavids at gmx.de 35762 JUnit View wasting a lot of screen space [JUnit]
  *     Brock Janiczak (brockj at tpg.com.au)
  *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
+ *     Achim Demelt <a.demelt at exxcellent.de> - [junit] Separate UI from non-UI code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=278844
+ *     Andrew Eisenberg <andrew at eisenberg.as> - [JUnit] Rerun failed first does not work with JUnit4 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140392
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.ui;
 
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URL;
 import java.text.DateFormat;
 import java.text.MessageFormat;
 import java.text.NumberFormat;
@@ -35,6 +41,12 @@ import org.eclipse.swt.custom.CLabel;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.custom.ViewForm;
 import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.DropTargetAdapter;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.graphics.Image;
@@ -42,6 +54,7 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Layout;
@@ -56,9 +69,11 @@ import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.ILock;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.preferences.InstanceScope;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
@@ -69,9 +84,12 @@ import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ImageDescriptor;
 
 import org.eclipse.ui.IActionBars;
@@ -96,12 +114,14 @@ import org.eclipse.ui.part.PageSwitcher;
 import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.progress.UIJob;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 
 import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
 
 import org.eclipse.jdt.core.ElementChangedEvent;
 import org.eclipse.jdt.core.IElementChangedListener;
@@ -111,10 +131,11 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 
 import org.eclipse.jdt.internal.junit.BasicElementLabels;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
+import org.eclipse.jdt.internal.junit.JUnitPreferencesConstants;
 import org.eclipse.jdt.internal.junit.Messages;
 import org.eclipse.jdt.internal.junit.launcher.ITestKind;
 import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
-import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
 import org.eclipse.jdt.internal.junit.model.ITestRunSessionListener;
 import org.eclipse.jdt.internal.junit.model.ITestSessionListener;
 import org.eclipse.jdt.internal.junit.model.JUnitModel;
@@ -255,6 +276,11 @@ public class TestRunnerViewPart extends ViewPart {
 	 */
 	static final String PREF_LAST_PATH= "lastImportExportPath"; //$NON-NLS-1$
 
+	/**
+	 * @since 3.6
+	 */
+	static final String PREF_LAST_URL= "lastImportURL"; //$NON-NLS-1$
+	
 	//orientations
 	static final int VIEW_ORIENTATION_VERTICAL= 0;
 	static final int VIEW_ORIENTATION_HORIZONTAL= 1;
@@ -337,7 +363,7 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		public List getHistoryEntries() {
-			return JUnitPlugin.getModel().getTestRunSessions();
+			return JUnitCorePlugin.getModel().getTestRunSessions();
 		}
 
 		public Object getCurrentEntry() {
@@ -353,10 +379,10 @@ public class TestRunnerViewPart extends ViewPart {
 		public void setHistoryEntries(List remainingEntries, Object activeEntry) {
 			setActiveTestRunSession((TestRunSession) activeEntry);
 
-			List testRunSessions= JUnitPlugin.getModel().getTestRunSessions();
+			List testRunSessions= JUnitCorePlugin.getModel().getTestRunSessions();
 			testRunSessions.removeAll(remainingEntries);
 			for (Iterator iter= testRunSessions.iterator(); iter.hasNext();) {
-				JUnitPlugin.getModel().removeTestRunSession((TestRunSession) iter.next());
+				JUnitCorePlugin.getModel().removeTestRunSession((TestRunSession) iter.next());
 			}
 			for (Iterator iter= remainingEntries.iterator(); iter.hasNext();) {
 				TestRunSession remaining= (TestRunSession) iter.next();
@@ -386,7 +412,7 @@ public class TestRunnerViewPart extends ViewPart {
 		public String getText(Object element) {
 			TestRunSession session= (TestRunSession) element;
 			String testRunLabel= BasicElementLabels.getJavaElementName(session.getTestRunName());
-			if (session.getStartTime() == 0) {
+			if (session.getStartTime() <= 0) {
 				return testRunLabel;
 			} else {
 				String startTime= DateFormat.getDateTimeInstance().format(new Date(session.getStartTime()));
@@ -396,6 +422,7 @@ public class TestRunnerViewPart extends ViewPart {
 
 		public void addMenuEntries(MenuManager manager) {
 			manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new ImportTestRunSessionAction(fParent.getShell()));
+			manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new ImportTestRunSessionFromURLAction(fParent.getShell()));
 			if (fTestRunSession != null)
 				manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new ExportTestRunSessionAction(fParent.getShell(), fTestRunSession));
 		}
@@ -405,13 +432,11 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		public int getMaxEntries() {
-			IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-			return store.getInt(JUnitPreferencesConstants.MAX_TEST_RUNS);
+			return Platform.getPreferencesService().getInt(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.MAX_TEST_RUNS, 10, null);
 		}
 
 		public void setMaxEntries(int maxEntries) {
-			IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-			store.setValue(JUnitPreferencesConstants.MAX_TEST_RUNS, maxEntries);
+			new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).putInt(JUnitPreferencesConstants.MAX_TEST_RUNS, maxEntries);
 		}
 	}
 
@@ -447,6 +472,69 @@ public class TestRunnerViewPart extends ViewPart {
 			}
 		}
 	}
+	
+	private static class ImportTestRunSessionFromURLAction extends Action {
+		private static class URLValidator implements IInputValidator {
+			public String isValid(String newText) {
+				if (newText.length() == 0)
+					return null;
+				try {
+					new URL(newText);
+					return null;
+				} catch (MalformedURLException e) {
+					return JUnitMessages.TestRunnerViewPart_ImportTestRunSessionFromURLAction_invalid_url + e.getLocalizedMessage();
+				}
+			}
+		}
+
+		private static final String DIALOG_SETTINGS= "ImportTestRunSessionFromURLAction"; //$NON-NLS-1$
+		
+		private final Shell fShell;
+		
+		public ImportTestRunSessionFromURLAction(Shell shell) {
+			super(JUnitMessages.TestRunnerViewPart_ImportTestRunSessionFromURLAction_import_from_url);
+			fShell= shell;
+		}
+		
+		public void run() {
+			String title= JUnitMessages.TestRunnerViewPart_ImportTestRunSessionAction_title;
+			String message= JUnitMessages.TestRunnerViewPart_ImportTestRunSessionFromURLAction_url;
+			
+			final IDialogSettings dialogSettings= JUnitPlugin.getDefault().getDialogSettings();
+			String url= dialogSettings.get(PREF_LAST_URL);
+			
+			IInputValidator validator= new URLValidator();
+			
+			InputDialog inputDialog= new InputDialog(fShell, title, message, url, validator) {
+				protected Control createDialogArea(Composite parent) {
+					Control dialogArea2= super.createDialogArea(parent);
+					Object layoutData= getText().getLayoutData();
+					if (layoutData instanceof GridData) {
+						GridData gd= (GridData)layoutData;
+						gd.widthHint= convertWidthInCharsToPixels(150);
+					}
+					return dialogArea2;
+				}
+				protected IDialogSettings getDialogBoundsSettings() {
+					IDialogSettings settings= dialogSettings.getSection(DIALOG_SETTINGS);
+					if (settings == null) {
+						settings= dialogSettings.addNewSection(DIALOG_SETTINGS);
+					}
+					return settings;
+				}
+				protected boolean isResizable() {
+					return true;
+				}
+			};
+			
+			int res= inputDialog.open();
+			if (res == IDialogConstants.OK_ID) {
+				url= inputDialog.getValue();
+				dialogSettings.put(PREF_LAST_URL, url);
+				importTestRunSession(url);
+			}
+		}
+	}
 
 	private static class ExportTestRunSessionAction extends Action {
 		private final TestRunSession fTestRunSession;
@@ -486,7 +574,7 @@ public class TestRunnerViewPart extends ViewPart {
 		private String getFileName() {
 			String testRunName= fTestRunSession.getTestRunName();
 			long startTime= fTestRunSession.getStartTime();
-			if (startTime == 0)
+			if (startTime <= 0)
 				return testRunName;
 
 			String isoTime= new SimpleDateFormat("yyyyMMdd-HHmmss").format(new Date(startTime)); //$NON-NLS-1$
@@ -495,33 +583,44 @@ public class TestRunnerViewPart extends ViewPart {
 	}
 
 	private class TestRunSessionListener implements ITestRunSessionListener {
-		public void sessionAdded(TestRunSession testRunSession) {
-			if (getSite().getWorkbenchWindow() == JUnitPlugin.getActiveWorkbenchWindow()) {
-				TestRunSession deactivatedSession= setActiveTestRunSession(testRunSession);
-				if (deactivatedSession != null)
-					deactivatedSession.swapOut();
-				String testRunLabel= BasicElementLabels.getJavaElementName(fTestRunSession.getTestRunName());
-				String msg;
-				if (testRunSession.getLaunch() != null) {
-					msg= Messages.format(JUnitMessages.TestRunnerViewPart_Launching, new Object[]{ testRunLabel });
-				} else {
-					msg= testRunLabel;
+		public void sessionAdded(final TestRunSession testRunSession) {
+			getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					if (getSite().getWorkbenchWindow() == JUnitPlugin.getActiveWorkbenchWindow()) {
+						if (fInfoMessage == null) {
+							String testRunLabel= BasicElementLabels.getJavaElementName(testRunSession.getTestRunName());
+							String msg;
+							if (testRunSession.getLaunch() != null) {
+								msg= Messages.format(JUnitMessages.TestRunnerViewPart_Launching, new Object[]{ testRunLabel });
+							} else {
+								msg= testRunLabel;
+							}
+							registerInfoMessage(msg);
+						}
+						
+						TestRunSession deactivatedSession= setActiveTestRunSession(testRunSession);
+						if (deactivatedSession != null)
+							deactivatedSession.swapOut();
+					}
 				}
-				setContentDescription(msg);
-			}
+			});
 		}
-		public void sessionRemoved(TestRunSession testRunSession) {
-			if (testRunSession.equals(fTestRunSession)) {
-				List testRunSessions= JUnitPlugin.getModel().getTestRunSessions();
-				TestRunSession deactivatedSession;
-				if (! testRunSessions.isEmpty()) {
-					deactivatedSession= setActiveTestRunSession((TestRunSession) testRunSessions.get(0));
-				} else {
-					deactivatedSession= setActiveTestRunSession(null);
+		public void sessionRemoved(final TestRunSession testRunSession) {
+			getDisplay().asyncExec(new Runnable() {
+				public void run() {
+					if (testRunSession.equals(fTestRunSession)) {
+						List testRunSessions= JUnitCorePlugin.getModel().getTestRunSessions();
+						TestRunSession deactivatedSession;
+						if (! testRunSessions.isEmpty()) {
+							deactivatedSession= setActiveTestRunSession((TestRunSession) testRunSessions.get(0));
+						} else {
+							deactivatedSession= setActiveTestRunSession(null);
+						}
+						if (deactivatedSession != null)
+							deactivatedSession.swapOut();
+					}
 				}
-				if (deactivatedSession != null)
-					deactivatedSession.swapOut();
-			}
+			});
 		}
 	}
 
@@ -537,6 +636,8 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		public void sessionEnded(long elapsedTime){
+			deregisterTestSessionListener(false);
+			
 			fTestViewer.registerAutoScrollTarget(null);
 
 			String[] keys= {elapsedTimeAsString(elapsedTime)};
@@ -564,6 +665,8 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		public void sessionStopped(final long elapsedTime) {
+			deregisterTestSessionListener(false);
+			
 			fTestViewer.registerAutoScrollTarget(null);
 
 			registerInfoMessage(JUnitMessages.TestRunnerViewPart_message_stopped);
@@ -571,6 +674,8 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		public void sessionTerminated() {
+			deregisterTestSessionListener(true);
+			
 			fTestViewer.registerAutoScrollTarget(null);
 
 			registerInfoMessage(JUnitMessages.TestRunnerViewPart_message_terminated);
@@ -674,7 +779,7 @@ public class TestRunnerViewPart extends ViewPart {
 			setText(JUnitMessages.TestRunnerViewPart_clear_history_label);
 
 			boolean enabled= false;
-			List testRunSessions= JUnitPlugin.getModel().getTestRunSessions();
+			List testRunSessions= JUnitCorePlugin.getModel().getTestRunSessions();
 			for (Iterator iter= testRunSessions.iterator(); iter.hasNext();) {
 				TestRunSession testRunSession= (TestRunSession) iter.next();
 				if (! testRunSession.isRunning() && ! testRunSession.isStarting()) {
@@ -692,7 +797,7 @@ public class TestRunnerViewPart extends ViewPart {
 		}
 
 		private List getRunningSessions() {
-			List testRunSessions= JUnitPlugin.getModel().getTestRunSessions();
+			List testRunSessions= JUnitCorePlugin.getModel().getTestRunSessions();
 			for (Iterator iter= testRunSessions.iterator(); iter.hasNext();) {
 				TestRunSession testRunSession= (TestRunSession) iter.next();
 				if (! testRunSession.isRunning() && ! testRunSession.isStarting()) {
@@ -876,8 +981,7 @@ public class TestRunnerViewPart extends ViewPart {
 		public void run() {
 			boolean checked= isChecked();
 			fShowOnErrorOnly= checked;
-			IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-			store.setValue(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, checked);
+			new InstanceScope().getNode(JUnitCorePlugin.CORE_PLUGIN_ID).putBoolean(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, checked);
 		}
 	}
 
@@ -1145,7 +1249,7 @@ public class TestRunnerViewPart extends ViewPart {
 			TestElement[] failures= fTestRunSession.getAllFailedTestElements();
 			BufferedWriter bw= null;
 			try {
-				bw= new BufferedWriter(new FileWriter(file));
+				bw= new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")); //$NON-NLS-1$
 				for (int i= 0; i < failures.length; i++) {
 					TestElement testElement= failures[i];
 					bw.write(testElement.getTestName());
@@ -1270,10 +1374,7 @@ action enablement
 		if (fTestRunSession == testRunSession)
 			return null;
 
-		if (fTestRunSession != null && fTestSessionListener != null) {
-			fTestRunSession.removeTestSessionListener(fTestSessionListener);
-			fTestSessionListener= null;
-		}
+		deregisterTestSessionListener(true);
 
 		TestRunSession deactivatedSession= fTestRunSession;
 
@@ -1299,9 +1400,13 @@ action enablement
 			fRerunLastTestAction.setEnabled(false);
 
 		} else {
-			fTestSessionListener= new TestSessionListener();
-			fTestRunSession.addTestSessionListener(fTestSessionListener);
-
+			if (fTestRunSession.isStarting() || fTestRunSession.isRunning() || fTestRunSession.isKeptAlive()) {
+				fTestSessionListener= new TestSessionListener();
+				fTestRunSession.addTestSessionListener(fTestSessionListener);
+			}
+			if (!fTestRunSession.isStarting() && !fShowOnErrorOnly)
+				showTestResultsView();
+			
 			setTitleToolTip();
 
 			clearStatus();
@@ -1326,18 +1431,18 @@ action enablement
 		return deactivatedSession;
 	}
 
+	private void deregisterTestSessionListener(boolean force) {
+		if (fTestRunSession != null && fTestSessionListener != null && (force || !fTestRunSession.isKeptAlive())) {
+			fTestRunSession.removeTestSessionListener(fTestSessionListener);
+			fTestSessionListener= null;
+		}
+	}
+
 	private void updateRerunFailedFirstAction() {
-		boolean state= isJUnit3() && hasErrorsOrFailures() && fTestRunSession.getLaunch() != null;
+		boolean state= hasErrorsOrFailures() && fTestRunSession.getLaunch() != null;
 	    fRerunFailedFirstAction.setEnabled(state);
     }
 
-    private boolean isJUnit3() {
-	    if (fTestRunSession == null)
-	    	return true; // optimistic
-
-	    return TestKindRegistry.JUNIT3_TEST_KIND_ID.equals(fTestRunSession.getTestRunnerKind().getId());
-    }
-
     /**
      * @return the display name of the current test run sessions kind, or <code>null</code>
      */
@@ -1362,7 +1467,7 @@ action enablement
 	public synchronized void dispose(){
 		fIsDisposed= true;
 		if (fTestRunSessionListener != null)
-			JUnitPlugin.getModel().removeTestRunSessionListener(fTestRunSessionListener);
+			JUnitCorePlugin.getModel().removeTestRunSessionListener(fTestRunSessionListener);
 
 		IHandlerService handlerService= (IHandlerService) getSite().getWorkbenchWindow().getService(IHandlerService.class);
 		handlerService.deactivateHandler(fRerunLastActivation);
@@ -1463,7 +1568,7 @@ action enablement
 				testRunner= (TestRunnerViewPart)page.findView(TestRunnerViewPart.NAME);
 				if(testRunner == null) {
 					IWorkbenchPart activePart= page.getActivePart();
-					testRunner= (TestRunnerViewPart)page.showView(TestRunnerViewPart.NAME);
+					testRunner= (TestRunnerViewPart)page.showView(TestRunnerViewPart.NAME, null, IWorkbenchPage.VIEW_VISIBLE);
 					//restore focus
 					page.activate(activePart);
 				} else {
@@ -1550,6 +1655,7 @@ action enablement
 		fCopyAction = new JUnitCopyAction(fFailureTrace, fClipboard);
 		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fCopyAction);
 		initPageSwitcher();
+		addDropAdapter(parent);
 
 		fOriginalViewImage= getTitleImage();
 		fProgressImages= new ProgressImages();
@@ -1565,7 +1671,39 @@ action enablement
 		fMemento= null;
 
 		fTestRunSessionListener= new TestRunSessionListener();
-		JUnitPlugin.getModel().addTestRunSessionListener(fTestRunSessionListener);
+		JUnitCorePlugin.getModel().addTestRunSessionListener(fTestRunSessionListener);
+		
+		// always show youngest test run in view. simulate "sessionAdded" event to do that
+		List testRunSessions= JUnitCorePlugin.getModel().getTestRunSessions();
+		if (!testRunSessions.isEmpty()) {
+			fTestRunSessionListener.sessionAdded((TestRunSession)testRunSessions.get(0));
+		}
+	}
+
+	private void addDropAdapter(Composite parent) {
+		DropTarget dropTarget = new DropTarget(parent, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK | DND.DROP_DEFAULT);
+		dropTarget.setTransfer(new Transfer[] { TextTransfer.getInstance() });
+		class DropAdapter extends DropTargetAdapter {
+		    public void dragEnter(DropTargetEvent event) {
+		        event.detail = DND.DROP_COPY;
+		        event.feedback = DND.FEEDBACK_NONE;
+		    }
+		    public void dragOver(DropTargetEvent event) {
+		        event.detail = DND.DROP_COPY;
+		        event.feedback = DND.FEEDBACK_NONE;
+		    }
+		    public void dragOperationChanged(DropTargetEvent event) {
+		        event.detail = DND.DROP_COPY;
+		        event.feedback = DND.FEEDBACK_NONE;
+		    }
+		    public void drop(final DropTargetEvent event) {
+		        if (TextTransfer.getInstance().isSupportedType(event.currentDataType)) {
+					String url= (String) event.data;
+					importTestRunSession(url);
+		        }
+		    }
+		}
+		dropTarget.addDropListener(new DropAdapter());
 	}
 
 	private void initPageSwitcher() {
@@ -1811,14 +1949,10 @@ action enablement
 			getDisplay().asyncExec(r);
 	}
 
-	public boolean isCreated() {
-		return fCounterPanel != null;
-	}
-
 	public void rerunTest(String testId, String className, String testName, String launchMode) {
-		DebugUITools.saveAndBuildBeforeLaunch();
+		boolean buildBeforeLaunch= Platform.getPreferencesService().getBoolean(IDebugUIConstants.PLUGIN_ID, IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH, false, null);
 		try {
-			boolean couldLaunch= fTestRunSession.rerunTest(testId, className, testName, launchMode);
+			boolean couldLaunch= fTestRunSession.rerunTest(testId, className, testName, launchMode, buildBeforeLaunch);
 			if (! couldLaunch) {
 				MessageDialog.openInformation(getSite().getShell(),
 						JUnitMessages.TestRunnerViewPart_cannotrerun_title,
@@ -1875,9 +2009,23 @@ action enablement
 			layout.numColumns= 1;
 	}
 
-	private static boolean getShowOnErrorOnly() {
-		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
-		return store.getBoolean(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY);
+	static boolean getShowOnErrorOnly() {
+		return Platform.getPreferencesService().getBoolean(JUnitCorePlugin.CORE_PLUGIN_ID, JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY, false, null);
+	}
+
+	static void importTestRunSession(final String url) {
+		try {
+			PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
+				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+					JUnitModel.importTestRunSession(url, monitor);
+				}
+			});
+		} catch (InterruptedException e) {
+			// cancelled
+		} catch (InvocationTargetException e) {
+			CoreException ce= (CoreException) e.getCause();
+			StatusManager.getManager().handle(ce.getStatus(), StatusManager.SHOW | StatusManager.LOG);
+		}
 	}
 
 	public FailureTrace getFailureTrace() {
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/UITestRunListener.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/UITestRunListener.java
new file mode 100644
index 0000000..2347c81
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/UITestRunListener.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.junit.ui;
+
+import org.eclipse.jdt.junit.TestRunListener;
+import org.eclipse.jdt.junit.model.ITestRunSession;
+
+/**
+ * This test run listener is the entry point that makes sure the org.eclipse.jdt.junit
+ * plug-in gets loaded when a JUnit launch configuration is launched.
+ *
+ * @since 3.6
+ */
+public class UITestRunListener extends TestRunListener {
+	/*
+	 * @see org.eclipse.jdt.junit.TestRunListener#sessionLaunched(org.eclipse.jdt.junit.model.ITestRunSession)
+	 * @since 3.6
+	 */
+	public void sessionLaunched(ITestRunSession session) {
+		JUnitPlugin.asyncShowTestRunnerViewPart();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/JUnitStubUtility.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/JUnitStubUtility.java
index 0bffc58..c1e6343 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/JUnitStubUtility.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/JUnitStubUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.junit.util;
 
 import org.eclipse.core.runtime.CoreException;
@@ -287,16 +286,12 @@ public class JUnitStubUtility {
 		return (pack != null && otherpack != null && pack.getElementName().equals(otherpack.getElementName()));
 	}
 
-	private static boolean isVersionLessThan(String version1, String version2) {
-		return version1.compareTo(version2) < 0;
-	}
-
 	public static boolean is50OrHigher(IJavaProject project) {
-		return is50OrHigher(project.getOption(JavaCore.COMPILER_COMPLIANCE, true));
+		return CoreTestSearchEngine.is50OrHigher(project);
 	}
 
 	public static boolean is50OrHigher(String compliance) {
-		return !isVersionLessThan(compliance, JavaCore.VERSION_1_5);
+		return CoreTestSearchEngine.is50OrHigher(compliance);
 	}
 
 	public static String[] getParameterTypeNamesForSeeTag(IMethod overridden) {
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/Resources.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/Resources.java
index 2e8cbf9..c921330 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/Resources.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/Resources.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public class Resources {
 		}
 		if (result != null)
 			return result;
-		return new Status(IStatus.OK, JUnitPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
@@ -108,7 +108,7 @@ public class Resources {
 				readOnlyFiles.add(resource);
 		}
 		if (readOnlyFiles.size() == 0)
-			return new Status(IStatus.OK, JUnitPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 
 		Map oldTimeStamps= createModificationStampMap(readOnlyFiles);
 		IStatus status= ResourcesPlugin.getWorkspace().validateEdit(
@@ -125,7 +125,7 @@ public class Resources {
 		}
 		if (modified != null)
 			return modified;
-		return new Status(IStatus.OK, JUnitPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	private static Map createModificationStampMap(List files){
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
index 8126634..21ca88a 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.jdt.internal.junit.util;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -21,43 +20,17 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IRegion;
 import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.dom.ITypeBinding;
-import org.eclipse.jdt.core.dom.Modifier;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
 
 import org.eclipse.jdt.internal.junit.launcher.ITestKind;
-import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
+
 
 /**
  * Custom Search engine for suite() methods
+ * @see CoreTestSearchEngine
  */
-public class TestSearchEngine {
-
-	public static boolean isTestOrTestSuite(IType declaringType) throws CoreException {
-		ITestKind testKind= TestKindRegistry.getContainerTestKind(declaringType);
-		return testKind.getFinder().isTest(declaringType);
-	}
-
+public class TestSearchEngine extends CoreTestSearchEngine {
 
 	public static IType[] findTests(IRunnableContext context, final IJavaElement element, final ITestKind testKind) throws InvocationTargetException, InterruptedException {
 		final Set result= new HashSet();
@@ -75,168 +48,4 @@ public class TestSearchEngine {
 		return (IType[]) result.toArray(new IType[result.size()]);
 	}
 
-	public static boolean isAccessibleClass(IType type) throws JavaModelException {
-		int flags= type.getFlags();
-		if (Flags.isInterface(flags)) {
-			return false;
-		}
-		IJavaElement parent= type.getParent();
-		while (true) {
-			if (parent instanceof ICompilationUnit || parent instanceof IClassFile) {
-				return true;
-			}
-			if (!(parent instanceof IType) || !Flags.isStatic(flags) || !Flags.isPublic(flags)) {
-				return false;
-			}
-			flags= ((IType) parent).getFlags();
-			parent= parent.getParent();
-		}
-	}
-
-	public static boolean isAccessibleClass(ITypeBinding type) {
-		if (type.isInterface()) {
-			return false;
-		}
-		int modifiers= type.getModifiers();
-		while (true) {
-			if (type.getDeclaringMethod() != null) {
-				return false;
-			}
-			ITypeBinding declaringClass= type.getDeclaringClass();
-			if (declaringClass == null) {
-				return true;
-			}
-			if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
-				return false;
-			}
-			modifiers= declaringClass.getModifiers();
-			type= declaringClass;
-		}
-	}
-
-	public static boolean hasTestCaseType(IJavaProject javaProject) {
-		try {
-			return javaProject != null && javaProject.findType(JUnitPlugin.TEST_SUPERCLASS_NAME) != null;
-		} catch (JavaModelException e) {
-			// not available
-		}
-		return false;
-	}
-
-	public static boolean hasTestAnnotation(IJavaProject project) {
-		try {
-			return project != null && project.findType(JUnitPlugin.JUNIT4_ANNOTATION_NAME) != null;
-		} catch (JavaModelException e) {
-			// not available
-		}
-		return false;
-	}
-
-	public static boolean isTestImplementor(IType type) throws JavaModelException {
-		ITypeHierarchy typeHier= type.newSupertypeHierarchy(null);
-		IType[] superInterfaces= typeHier.getAllInterfaces();
-		for (int i= 0; i < superInterfaces.length; i++) {
-			if (JUnitPlugin.TEST_INTERFACE_NAME.equals(superInterfaces[i].getFullyQualifiedName('.'))) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public static boolean isTestImplementor(ITypeBinding type) {
-		ITypeBinding superType= type.getSuperclass();
-		if (superType != null && isTestImplementor(superType)) {
-			return true;
-		}
-		ITypeBinding[] interfaces= type.getInterfaces();
-		for (int i= 0; i < interfaces.length; i++) {
-			ITypeBinding curr= interfaces[i];
-			if (JUnitPlugin.TEST_INTERFACE_NAME.equals(curr.getQualifiedName()) || isTestImplementor(curr)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	public static boolean hasSuiteMethod(IType type) throws JavaModelException {
-		IMethod method= type.getMethod("suite", new String[0]); //$NON-NLS-1$
-		if (!method.exists())
-			return false;
-
-		if (!Flags.isStatic(method.getFlags()) || !Flags.isPublic(method.getFlags())) {
-			return false;
-		}
-		if (!Signature.getSimpleName(Signature.toString(method.getReturnType())).equals(JUnitPlugin.SIMPLE_TEST_INTERFACE_NAME)) {
-			return false;
-		}
-		return true;
-	}
-
-	public static IRegion getRegion(IJavaElement element) throws JavaModelException {
-		IRegion result= JavaCore.newRegion();
-		if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
-			// for projects only add the contained source folders
-			IPackageFragmentRoot[] roots= ((IJavaProject) element).getPackageFragmentRoots();
-			for (int i= 0; i < roots.length; i++) {
-				if (!roots[i].isArchive()) {
-					result.add(roots[i]);
-				}
-			}
-		} else {
-			result.add(element);
-		}
-		return result;
-	}
-
-	public static void findTestImplementorClasses(ITypeHierarchy typeHierarchy, IType testInterface, IRegion region, Set result)
-			throws JavaModelException {
-		IType[] subtypes= typeHierarchy.getAllSubtypes(testInterface);
-		for (int i= 0; i < subtypes.length; i++) {
-			IType type= subtypes[i];
-			int cachedFlags= typeHierarchy.getCachedFlags(type);
-			if (!Flags.isInterface(cachedFlags) && !Flags.isAbstract(cachedFlags) // do the cheaper tests first
-					&& region.contains(type) && TestSearchEngine.isAccessibleClass(type)) {
-				result.add(type);
-			}
-		}
-	}
-
-	private static class SuiteMethodTypesCollector extends SearchRequestor {
-
-		private Collection fResult;
-
-		public SuiteMethodTypesCollector(Collection result) {
-			fResult= result;
-		}
-
-		public void acceptSearchMatch(SearchMatch match) throws CoreException {
-			Object enclosingElement= match.getElement();
-			if (!(enclosingElement instanceof IMethod))
-				return;
-
-			IMethod method= (IMethod) enclosingElement;
-			if (!Flags.isStatic(method.getFlags()) || !Flags.isPublic(method.getFlags())) {
-				return;
-			}
-
-			IType declaringType= ((IMethod) enclosingElement).getDeclaringType();
-			if (!TestSearchEngine.isAccessibleClass(declaringType)) {
-				return;
-			}
-			fResult.add(declaringType);
-		}
-	}
-
-	public static void findSuiteMethods(IJavaElement element, Set result, IProgressMonitor pm) throws CoreException {
-		// fix for bug 36449 JUnit should constrain tests to selected project
-		// [JUnit]
-		IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { element }, IJavaSearchScope.SOURCES);
-
-		SearchRequestor requestor= new SuiteMethodTypesCollector(result);
-		int matchRule= SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE | SearchPattern.R_ERASURE_MATCH;
-		SearchPattern suitePattern= SearchPattern.createPattern("suite() Test", IJavaSearchConstants.METHOD, IJavaSearchConstants.DECLARATIONS, matchRule); //$NON-NLS-1$
-		SearchParticipant[] participants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
-		new SearchEngine().search(suitePattern, participants, scope, requestor, pm);
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizard.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizard.java
index c659d96..67e3b36 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizard.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestCaseCreationWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,6 +57,7 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
 
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
 
 import org.eclipse.jdt.ui.text.java.ClasspathFixProcessor;
@@ -100,11 +101,11 @@ public class NewTestCaseCreationWizard extends JUnitWizard {
 		IRunnableWithProgress runnable= fPage1.getRunnable();
 		try {
 			if (fPage1.isJUnit4()) {
-				if (project.findType(JUnitPlugin.JUNIT4_ANNOTATION_NAME) == null) {
+				if (project.findType(JUnitCorePlugin.JUNIT4_ANNOTATION_NAME) == null) {
 					runnable= addJUnitToClasspath(project, runnable, true);
 				}
 			} else {
-				if (project.findType(JUnitPlugin.TEST_SUPERCLASS_NAME) == null) {
+				if (project.findType(JUnitCorePlugin.TEST_SUPERCLASS_NAME) == null) {
 					runnable= addJUnitToClasspath(project, runnable, false);
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java
index 08a5641..05a7ab1 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/SuiteClassesContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,9 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.junit.wizards;
 
+import java.util.Collections;
 import java.util.HashSet;
+import java.util.Set;
 
 import org.eclipse.core.runtime.CoreException;
 
@@ -30,13 +32,17 @@ public class SuiteClassesContentProvider implements IStructuredContentProvider {
 		IPackageFragment pack= (IPackageFragment) parent;
 		if (! pack.exists())
 			return new Object[0];
+		return getTests(pack).toArray();
+	}
+
+	public Set getTests(IPackageFragment pack) {
 		try {
 			HashSet result= new HashSet();
 			new JUnit3TestFinder().findTestsInContainer(pack, result, null);
-			return result.toArray();
+			return result;
 		} catch (CoreException e) {
 			JUnitPlugin.log(e);
-			return new Object[0];
+			return Collections.EMPTY_SET;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java
index 67a784e..4cf570d 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/UpdateTestSuite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.jdt.internal.junit.wizards;
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.Set;
 
 import org.eclipse.jdt.junit.wizards.NewTestSuiteWizardPage;
 
@@ -30,7 +31,6 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.window.Window;
 
@@ -130,7 +130,7 @@ public class UpdateTestSuite implements IObjectActionDelegate {
 	 */
 	public void run(IAction action) {
 		ILabelProvider lprovider= new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT);
-		IStructuredContentProvider cprovider= new SuiteClassesContentProvider();
+		SuiteClassesContentProvider cprovider= new SuiteClassesContentProvider();
 
 		/* find TestClasses already in Test Suite */
 		IType testSuiteType= fTestSuite.findPrimaryType();
@@ -146,7 +146,9 @@ public class UpdateTestSuite implements IObjectActionDelegate {
 				dialog.setValidator(new UpdateAllTestsValidator());
 				dialog.setTitle(WizardMessages.UpdateAllTests_title);
 				dialog.setMessage(WizardMessages.UpdateAllTests_message);
-				dialog.setInitialSelections(cprovider.getElements(fPack));
+				Set elements= cprovider.getTests(fPack);
+				elements.remove(testSuiteType);
+				dialog.setInitialSelections(elements.toArray());
 				dialog.setSize(60, 25);
 				dialog.setInput(fPack);
 				if (dialog.open() == Window.OK) {
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.java
index f71fa67..36cd4a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,8 +25,6 @@ public final class WizardMessages extends NLS {
 	public static String NewTestCaseWizardPageOne_junit3_radio_label;
 	public static String NewTestCaseWizardPageOne_junit4_radio_label;
 	public static String NewTestCaseWizardPageOne_linkedtext_java5required;
-	public static String NewTestCaseWizardPageOne_linkedtext_junit3_notonbuildpath;
-	public static String NewTestCaseWizardPageOne_linkedtext_junit4_notonbuildpath;
 	public static String NewTestCaseWizardPageOne_methodStub_setUpBeforeClass;
 	public static String NewTestCaseWizardPageOne_methodStub_tearDownAfterClass;
 	public static String NewTestCaseWizardPageOne_not_yet_implemented_string;
@@ -55,7 +53,6 @@ public final class WizardMessages extends NLS {
 	public static String NewTestCaseCreationWizard_fix_selection_junit3_description;
 	public static String NewTestCaseCreationWizard_fix_selection_junit4_description;
 	public static String NewTestCaseCreationWizard_fix_selection_open_build_path_dialog;
-	public static String NewTestCaseCreationWizard_fix_selection_problem_updating_classpath;
 	public static String NewTestCaseCreationWizard_fix_selection_invoke_fix;
 	public static String NewTestCaseCreationWizard_create_progress;
 	public static String NewTestCaseCreationWizard_fix_selection_not_now;
@@ -88,6 +85,7 @@ public final class WizardMessages extends NLS {
 	public static String NewTestSuiteWizPage_typeName_error_name_not_valid;
 	public static String NewTestSuiteWizPage_typeName_error_name_name_discouraged;
 	public static String NewTestSuiteWizPage_typeName_warning_already_exists;
+	public static String NewTestSuiteWizPage_typeName_error_filtered;
 	public static String NewTestSuiteWizPage_cannotUpdateDialog_title;
 	public static String NewTestSuiteWizPage_cannotUpdateDialog_message;
 	public static String NewTestClassWizPage_treeCaption_classSelected;
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.properties b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.properties
index f3d3de5..0f983f7 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/WizardMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -44,17 +44,14 @@ NewTestCaseWizardPageOne_error_java5required=JUnit 4 requires a project with 1.5
 NewTestCaseWizardPageOne_error_class_to_test_not_valid=Class under test is not valid.
 NewTestCaseWizardPageOne_error_class_to_test_not_exist=Class under test does not exist in current project.
 NewTestCaseWizardPageOne_warning_class_to_test_is_interface=Warning: Class under test ''{0}'' is an interface.
-NewTestCaseWizardPageOne_warning_class_to_test_not_visible=''{1}'' is not visible.
-NewTestCaseWizardPageOne_linkedtext_junit4_notonbuildpath=JUnit 4 is not on the build path of project ''{0}''. <a href="a4">Click here</a> to add JUnit 4 to the build path and open the build path dialog.
-NewTestCaseWizardPageOne_linkedtext_junit3_notonbuildpath=JUnit 3 is not on the build path of project ''{0}''. <a href="a3">Click here</a> to add JUnit 3 to the build path and open the build path dialog.
+NewTestCaseWizardPageOne_warning_class_to_test_not_visible=''{0}'' is not visible.
 NewTestCaseWizardPageOne_comment_class_to_test=Test method for {0}.
-NewTestCaseCreationWizard_fix_selection_invoke_fix=Perform the following action:
+NewTestCaseCreationWizard_fix_selection_invoke_fix=&Perform the following action:
 NewTestCaseCreationWizard_fix_selection_junit3_description=JUnit 3 is not on the build path. Do you want to add it?
 NewTestCaseCreationWizard_fix_selection_junit4_description=JUnit 4 is not on the build path. Do you want to add it?
 NewTestCaseCreationWizard_create_progress=Creating JUnit test case...
-NewTestCaseCreationWizard_fix_selection_not_now=Not now
-NewTestCaseCreationWizard_fix_selection_open_build_path_dialog=Open the build path property page
-NewTestCaseCreationWizard_fix_selection_problem_updating_classpath=Problem updating the build path.
+NewTestCaseCreationWizard_fix_selection_not_now=&Not now
+NewTestCaseCreationWizard_fix_selection_open_build_path_dialog=&Open the build path property page
 NewTestCaseWizardPageOne_error_junitNotOnbuildpath=JUnit 3 is not on the project's build path.
 
 NewTestCaseWizardPageTwo_selected_methods_label_one={0} method selected.
@@ -92,6 +89,7 @@ NewTestSuiteWizPage_typeName_error_name_qualified=Test suite name must not be qu
 NewTestSuiteWizPage_typeName_error_name_not_valid=Test suite name is not valid.
 NewTestSuiteWizPage_typeName_error_name_name_discouraged=Warning: Test suite name is discouraged.
 NewTestSuiteWizPage_typeName_warning_already_exists=Warning: Test suite already exists. suite() method will be replaced.
+NewTestSuiteWizPage_typeName_error_filtered= This type is hidden in the workspace due to resource filters.
 NewTestSuiteWizPage_cannotUpdateDialog_title=Cannot update suite() method
 NewTestSuiteWizPage_cannotUpdateDialog_message=The code in suite() that the wizard replaces must start with {0} and end with {1}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/JUnitCore.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/JUnitCore.java
deleted file mode 100644
index 9f49541..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/JUnitCore.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jdt.junit;
-
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-
-import org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-
-/**
- * Class for accessing JUnit support; all functionality is provided by
- * static methods.
- * <p>
- * This class is not intended to be subclassed or instantiated by clients.
- * </p>
- *
- * @since 2.1
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class JUnitCore {
-
-	/**
-	 * Adds a listener for test runs.
-	 *
-	 * @param listener listener to be added
-	 * @deprecated As of 3.3, replaced by {@link #addTestRunListener(TestRunListener)}
-	 */
-	public static void addTestRunListener(ITestRunListener listener) {
-		JUnitPlugin.getDefault().addTestRunListener(listener);
-	}
-
-	/**
-	 * Removes a listener for test runs.
-	 *
-	 * @param listener listener to be removed
-	 * @deprecated As of 3.3, replaced by {@link #removeTestRunListener(TestRunListener)}
-	 */
-	public static void removeTestRunListener(ITestRunListener listener) {
-		JUnitPlugin.getDefault().removeTestRunListener(listener);
-	}
-
-	/**
-	 * Adds a listener for test runs.
-	 *
-	 * @param listener the listener to be added
-	 * @since 3.3
-	 */
-	public static void addTestRunListener(TestRunListener listener) {
-		JUnitPlugin.getDefault().getNewTestRunListeners().add(listener);
-	}
-
-	/**
-	 * Removes a listener for test runs.
-	 *
-	 * @param listener the listener to be removed
-	 * @since 3.3
-	 */
-	public static void removeTestRunListener(TestRunListener listener) {
-		JUnitPlugin.getDefault().getNewTestRunListeners().remove(listener);
-	}
-
-	/**
-	 * Finds types that contain JUnit tests in the given container.
-	 * 
-	 * @param container the container
-	 * @param monitor the progress monitor used to report progress and request cancelation,
-	 *   or <code>null</code> if none
-	 * @return test types inside the given container
-	 * @throws CoreException when a problem occurs while accessing <code>container</code> or its children
-	 * @throws OperationCanceledException if the operation has been canceled
-	 * 
-	 * @since 3.5
-	 */
-	public static IType[] findTestTypes(IJavaElement container, IProgressMonitor monitor) throws CoreException, OperationCanceledException {
-		final Set result= new HashSet();
-		JUnit4TestFinder finder= new JUnit4TestFinder();
-		finder.findTestsInContainer(container, result, monitor);
-
-		return (IType[])result.toArray(new IType[result.size()]);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/TestRunListener.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/TestRunListener.java
deleted file mode 100644
index dafdca2..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/TestRunListener.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.junit;
-
-import org.eclipse.jdt.junit.model.ITestCaseElement;
-import org.eclipse.jdt.junit.model.ITestRunSession;
-
-/**
- * A test run listener that can be registered at {@link JUnitCore#addTestRunListener(TestRunListener)}.
- * <p>
- * A test run starts with the call to {@link #sessionStarted(ITestRunSession)} followed by calls to
- * {@link #testCaseStarted(ITestCaseElement)} and {@link #testCaseFinished(ITestCaseElement)}
- * for all test cases contained in the tree.
- * </p>
- * <p>
- * A test run session is ended with the call to {@link #sessionFinished(ITestRunSession)}. After that
- * call, no references must be kept to the session or any of the test cases or suites.
- * </p>
- *
- * @since 3.3
- */
-public abstract class TestRunListener {
-
-	/**
-	 * A test run session has started. The test tree can be accessed through the session element.
-	 * <p>
-	 * Important: The implementor of this method must not keep a reference to the session element longer
-	 * after {@link #sessionFinished(ITestRunSession)} has finished.
-	 * </p>
-	 *
-	 * @param session the session that has just started.
-	 */
-	public void sessionStarted(ITestRunSession session) {
-	}
-
-	/**
-	 * A test run session has finished. The test tree can be accessed through the session element.
-	 *
-	 * <p>
-	 * Important: The implementor of this method must not keep the session element when the method is finished.
-	 * </p>
-	 *
-	 * @param session the test
-	 */
-	public void sessionFinished(ITestRunSession session) {
-	}
-
-	/**
-	 * A test case has started. The result can be accessed from the element.
-	 * <p>
-	 * Important: The implementor of this method must not keep a reference to the test case element
-	 * after {@link #sessionFinished(ITestRunSession)} has finished.
-	 * </p>
-	 * @param testCaseElement the test that has started to run
-	 */
-	public void testCaseStarted(ITestCaseElement testCaseElement) {
-	}
-
-	/**
-	 * A test case has ended. The result can be accessed from the element.
-	 * <p>
-	 * Important: The implementor of this method must not keep a reference to the test case element
-	 * after {@link #sessionFinished(ITestRunSession)} has finished.
-	 * </p>
-	 *
-	 * @param testCaseElement the test that has finished running
-	 */
-	public void testCaseFinished(ITestCaseElement testCaseElement) {
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java
deleted file mode 100644
index 7fe41e9..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
- *******************************************************************************/
-package org.eclipse.jdt.junit.launcher;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import org.osgi.framework.Bundle;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.core.variables.VariablesPlugin;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.internal.junit.Messages;
-import org.eclipse.jdt.internal.junit.launcher.ITestKind;
-import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants;
-import org.eclipse.jdt.internal.junit.launcher.JUnitRuntimeClasspathEntry;
-import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
-import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
-import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
-import org.eclipse.jdt.internal.junit.util.IJUnitStatusConstants;
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
-
-import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate;
-import org.eclipse.jdt.launching.ExecutionArguments;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IVMRunner;
-import org.eclipse.jdt.launching.SocketUtil;
-import org.eclipse.jdt.launching.VMRunnerConfiguration;
-
-
-/**
- * Launch configuration delegate for a JUnit test as a Java application.
- *
- * <p>
- * Clients can instantiate and extend this class.
- * </p>
- * @since 3.3
- */
-public class JUnitLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
-
-	private boolean fKeepAlive= false;
-	private int fPort;
-	private IMember[] fTestElements;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public synchronized void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		if (monitor == null) {
-			monitor = new NullProgressMonitor();
-		}
-
-		monitor.beginTask(MessageFormat.format("{0}...", new String[]{configuration.getName()}), 5); //$NON-NLS-1$
-		// check for cancellation
-		if (monitor.isCanceled()) {
-			return;
-		}
-
-		try {
-			if (mode.equals(JUnitLaunchConfigurationConstants.MODE_RUN_QUIETLY_MODE)) {
-				launch.setAttribute(JUnitLaunchConfigurationConstants.ATTR_NO_DISPLAY, "true"); //$NON-NLS-1$
-				mode = ILaunchManager.RUN_MODE;
-			}
-
-			monitor.subTask(JUnitMessages.JUnitLaunchConfigurationDelegate_verifying_attriburtes_description);
-
-			try {
-				preLaunchCheck(configuration, launch, new SubProgressMonitor(monitor, 2));
-			} catch (CoreException e) {
-				if (e.getStatus().getSeverity() == IStatus.CANCEL) {
-					monitor.setCanceled(true);
-					return;
-				}
-				throw e;
-			}
-			// check for cancellation
-			if (monitor.isCanceled()) {
-				return;
-			}
-
-			fKeepAlive= mode.equals(ILaunchManager.DEBUG_MODE) && configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_KEEPRUNNING, false);
-			fPort= evaluatePort();
-			launch.setAttribute(JUnitLaunchConfigurationConstants.ATTR_PORT, String.valueOf(fPort));
-
-			fTestElements= evaluateTests(configuration, new SubProgressMonitor(monitor, 1));
-
-			String mainTypeName= verifyMainTypeName(configuration);
-			IVMRunner runner= getVMRunner(configuration, mode);
-
-			File workingDir = verifyWorkingDirectory(configuration);
-			String workingDirName = null;
-			if (workingDir != null) {
-				workingDirName= workingDir.getAbsolutePath();
-			}
-
-			// Environment variables
-			String[] envp= getEnvironment(configuration);
-
-			ArrayList vmArguments= new ArrayList();
-			ArrayList programArguments= new ArrayList();
-			collectExecutionArguments(configuration, vmArguments, programArguments);
-
-			// VM-specific attributes
-			Map vmAttributesMap= getVMSpecificAttributesMap(configuration);
-
-			// Classpath
-			String[] classpath= getClasspath(configuration);
-
-			// Create VM config
-			VMRunnerConfiguration runConfig= new VMRunnerConfiguration(mainTypeName, classpath);
-			runConfig.setVMArguments((String[]) vmArguments.toArray(new String[vmArguments.size()]));
-			runConfig.setProgramArguments((String[]) programArguments.toArray(new String[programArguments.size()]));
-			runConfig.setEnvironment(envp);
-			runConfig.setWorkingDirectory(workingDirName);
-			runConfig.setVMSpecificAttributesMap(vmAttributesMap);
-
-			// Bootpath
-			runConfig.setBootClassPath(getBootpath(configuration));
-
-			// check for cancellation
-			if (monitor.isCanceled()) {
-				return;
-			}
-
-			// done the verification phase
-			monitor.worked(1);
-
-			monitor.subTask(JUnitMessages.JUnitLaunchConfigurationDelegate_create_source_locator_description);
-			// set the default source locator if required
-			setDefaultSourceLocator(launch, configuration);
-			monitor.worked(1);
-
-			// Launch the configuration - 1 unit of work
-			runner.run(runConfig, launch, monitor);
-
-			// check for cancellation
-			if (monitor.isCanceled()) {
-				return;
-			}
-		} finally {
-			fTestElements= null;
-			monitor.done();
-		}
-	}
-
-	private int evaluatePort() throws CoreException {
-		int port= SocketUtil.findFreePort();
-		if (port == -1) {
-			informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_no_socket, null, IJavaLaunchConfigurationConstants.ERR_NO_SOCKET_AVAILABLE);
-		}
-		return port;
-	}
-
-	/**
-	 * Performs a check on the launch configuration's attributes. If an attribute contains an invalid value, a {@link CoreException}
-	 * with the error is thrown.
-	 *
-	 * @param configuration the launch configuration to verify
-	 * @param launch the launch to verify
-	 * @param monitor the progress monitor to use
-	 * @throws CoreException an exception is thrown when the verification fails
-	 */
-	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		try {
-			IJavaProject javaProject= getJavaProject(configuration);
-			if ((javaProject == null) || !javaProject.exists()) {
-				informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_invalidproject, null, IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT);
-			}
-			if (!TestSearchEngine.hasTestCaseType(javaProject)) {
-				informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junitnotonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
-			}
-
-			ITestKind testKind= getTestRunnerKind(configuration);
-			boolean isJUnit4Configuration= TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId());
-			if (isJUnit4Configuration && ! TestSearchEngine.hasTestAnnotation(javaProject)) {
-				informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_junit4notonpath, null, IJUnitStatusConstants.ERR_JUNIT_NOT_ON_PATH);
-			}
-		} finally {
-			monitor.done();
-		}
-	}
-
-	private ITestKind getTestRunnerKind(ILaunchConfiguration configuration) {
-		ITestKind testKind= JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
-		if (testKind.isNull()) {
-			testKind= TestKindRegistry.getDefault().getKind(TestKindRegistry.JUNIT3_TEST_KIND_ID); // backward compatible for launch configurations with no runner
-		}
-		return testKind;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException {
-		return "org.eclipse.jdt.internal.junit.runner.RemoteTestRunner"; //$NON-NLS-1$
-	}
-
-	/**
-	 * Evaluates all test elements selected by the given launch configuration. The elements are of type
-	 * {@link IType} or {@link IMethod}. At the moment it is only possible to run a single method or a set of types, but not
-	 * mixed or more than one method at a time.
-	 *
-	 * @param configuration the launch configuration to inspect
-	 * @param monitor the progress monitor
-	 * @return returns all types or methods that should be ran
-	 * @throws CoreException an exception is thrown when the search for tests failed
-	 */
-	protected IMember[] evaluateTests(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		IJavaProject javaProject= getJavaProject(configuration);
-
-		IJavaElement testTarget= getTestTarget(configuration, javaProject);
-		String testMethodName= configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, ""); //$NON-NLS-1$
-		if (testMethodName.length() > 0) {
-			if (testTarget instanceof IType) {
-				return new IMember[] { ((IType) testTarget).getMethod(testMethodName, new String[0]) };
-			}
-		}
-		HashSet result= new HashSet();
-		ITestKind testKind= getTestRunnerKind(configuration);
-		testKind.getFinder().findTestsInContainer(testTarget, result, monitor);
-		if (result.isEmpty()) {
-			String msg= Messages.format(JUnitMessages.JUnitLaunchConfigurationDelegate_error_notests_kind, testKind.getDisplayName());
-			informAndAbort(msg, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
-		}
-		return (IMember[]) result.toArray(new IMember[result.size()]);
-	}
-
-	private void informAndAbort(String message, Throwable exception, int code) throws CoreException {
-		IStatus status= new Status(IStatus.INFO, JUnitPlugin.PLUGIN_ID, code, message, exception);
-		if (showStatusMessage(status)) {
-			// Status message successfully shown
-			// -> Abort with INFO exception
-			// -> Worker.run() will not write to log
-			throw new CoreException(status);
-		} else {
-			// Status message could not be shown
-			// -> Abort with original exception
-			// -> Will write WARNINGs and ERRORs to log
-			abort(message, exception, code);
-		}
-	}
-
-	/**
-	 * Collects all VM and program arguments. Implementors can modify and add arguments.
-	 *
-	 * @param configuration the configuration to collect the arguments for
-	 * @param vmArguments a {@link List} of {@link String} representing the resulting VM arguments
-	 * @param programArguments a {@link List} of {@link String} representing the resulting program arguments
-	 * @exception CoreException if unable to collect the execution arguments
-	 */
-	protected void collectExecutionArguments(ILaunchConfiguration configuration, List/*String*/ vmArguments, List/*String*/ programArguments) throws CoreException {
-
-		// add program & VM arguments provided by getProgramArguments and getVMArguments
-		String pgmArgs= getProgramArguments(configuration);
-		String vmArgs= getVMArguments(configuration);
-		ExecutionArguments execArgs= new ExecutionArguments(vmArgs, pgmArgs);
-		vmArguments.addAll(Arrays.asList(execArgs.getVMArgumentsArray()));
-		programArguments.addAll(Arrays.asList(execArgs.getProgramArgumentsArray()));
-
-		String testFailureNames= configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_FAILURES_NAMES, ""); //$NON-NLS-1$
-
-		programArguments.add("-version"); //$NON-NLS-1$
-		programArguments.add("3"); //$NON-NLS-1$
-
-		programArguments.add("-port"); //$NON-NLS-1$
-		programArguments.add(String.valueOf(fPort));
-
-		if (fKeepAlive)
-			programArguments.add(0, "-keepalive"); //$NON-NLS-1$
-
-		ITestKind testRunnerKind= getTestRunnerKind(configuration);
-
-		programArguments.add("-testLoaderClass"); //$NON-NLS-1$
-		programArguments.add(testRunnerKind.getLoaderClassName());
-		programArguments.add("-loaderpluginname"); //$NON-NLS-1$
-		programArguments.add(testRunnerKind.getLoaderPluginId());
-
-		IMember[] testElements = fTestElements;
-
-		// a test name was specified just run the single test
-		if (testElements.length == 1) {
-			if (testElements[0] instanceof IMethod) {
-				IMethod method= (IMethod) testElements[0];
-				programArguments.add("-test"); //$NON-NLS-1$
-				programArguments.add(method.getDeclaringType().getFullyQualifiedName()+':'+method.getElementName());
-			} else if (testElements[0] instanceof IType) {
-				IType type= (IType) testElements[0];
-				programArguments.add("-classNames"); //$NON-NLS-1$
-				programArguments.add(type.getFullyQualifiedName());
-			} else {
-				informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_wrong_input, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
-			}
-		} else if (testElements.length > 1) {
-			String fileName= createTestNamesFile(testElements);
-			programArguments.add("-testNameFile"); //$NON-NLS-1$
-			programArguments.add(fileName);
-		}
-		if (testFailureNames.length() > 0) {
-			programArguments.add("-testfailures"); //$NON-NLS-1$
-			programArguments.add(testFailureNames);
-		}
-	}
-
-	private String createTestNamesFile(IMember[] testElements) throws CoreException {
-		try {
-			File file= File.createTempFile("testNames", ".txt"); //$NON-NLS-1$ //$NON-NLS-2$
-			file.deleteOnExit();
-			BufferedWriter bw= null;
-			try {
-				bw= new BufferedWriter(new FileWriter(file));
-				for (int i= 0; i < testElements.length; i++) {
-					if (testElements[i] instanceof IType) {
-						IType type= (IType) testElements[i];
-						String testName= type.getFullyQualifiedName();
-						bw.write(testName);
-						bw.newLine();
-					} else {
-						informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_wrong_input, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
-					}
-				}
-			} finally {
-				if (bw != null) {
-					bw.close();
-				}
-			}
-			return file.getAbsolutePath();
-		} catch (IOException e) {
-			throw new CoreException(new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, IStatus.ERROR, "", e)); //$NON-NLS-1$
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getClasspath(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
-		String[] cp= super.getClasspath(configuration);
-
-		ITestKind kind= getTestRunnerKind(configuration);
-		List junitEntries = new ClasspathLocalizer(Platform.inDevelopmentMode()).localizeClasspath(kind);
-
-		String[] classPath= new String[cp.length + junitEntries.size()];
-		Object[] jea= junitEntries.toArray();
-		System.arraycopy(cp, 0, classPath, 0, cp.length);
-		System.arraycopy(jea, 0, classPath, cp.length, jea.length);
-		return classPath;
-	}
-
-	private static class ClasspathLocalizer {
-
-		private boolean fInDevelopmentMode;
-
-		public ClasspathLocalizer(boolean inDevelopmentMode) {
-			fInDevelopmentMode = inDevelopmentMode;
-		}
-
-		public List localizeClasspath(ITestKind kind) {
-			JUnitRuntimeClasspathEntry[] entries= kind.getClasspathEntries();
-			List junitEntries= new ArrayList();
-
-			for (int i= 0; i < entries.length; i++) {
-				try {
-					addEntry(junitEntries, entries[i]);
-				} catch (IOException e) {
-					Assert.isTrue(false, entries[i].getPluginId() + " is available (required JAR)"); //$NON-NLS-1$
-				}
-			}
-			return junitEntries;
-		}
-
-		private void addEntry(List junitEntries, final JUnitRuntimeClasspathEntry entry) throws IOException, MalformedURLException {
-			String entryString= entryString(entry);
-			if (entryString != null)
-				junitEntries.add(entryString);
-		}
-
-		private String entryString(final JUnitRuntimeClasspathEntry entry) throws IOException, MalformedURLException {
-			if (inDevelopmentMode()) {
-				try {
-					return localURL(entry.developmentModeEntry());
-				} catch (IOException e3) {
-					// fall through and try default
-				}
-			}
-			return localURL(entry);
-		}
-
-		private boolean inDevelopmentMode() {
-			return fInDevelopmentMode;
-		}
-
-		private String localURL(JUnitRuntimeClasspathEntry jar) throws IOException, MalformedURLException {
-			Bundle bundle= JUnitPlugin.getDefault().getBundle(jar.getPluginId());
-			URL url;
-			if (jar.getPluginRelativePath() == null)
-				url= bundle.getEntry("/"); //$NON-NLS-1$
-			else
-				url= bundle.getEntry(jar.getPluginRelativePath());
-			if (url == null)
-				throw new IOException();
-			return FileLocator.toFileURL(url).getFile();
-		}
-	}
-
-	private final IJavaElement getTestTarget(ILaunchConfiguration configuration, IJavaProject javaProject) throws CoreException {
-		String containerHandle = configuration.getAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER, ""); //$NON-NLS-1$
-		if (containerHandle.length() != 0) {
-			 IJavaElement element= JavaCore.create(containerHandle);
-			 if (element == null || !element.exists()) {
-				 informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_error_input_element_deosn_not_exist, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
-			 }
-			 return element;
-		}
-		String testTypeName= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ""); //$NON-NLS-1$
-		if (testTypeName.length() != 0) {
-			testTypeName= performStringSubstitution(testTypeName);
-			IType type= javaProject.findType(testTypeName);
-			if (type != null && type.exists()) {
-				return type;
-			}
-		}
-		informAndAbort(JUnitMessages.JUnitLaunchConfigurationDelegate_input_type_does_not_exist, null, IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_MAIN_TYPE);
-		return null; // not reachable
-	}
-
-	private final String performStringSubstitution(String testTypeName) throws CoreException {
-		return VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(testTypeName);
-	}
-
-	private boolean showStatusMessage(final IStatus status) {
-		final boolean[] success= new boolean[] { false };
-		getDisplay().syncExec(
-				new Runnable() {
-					public void run() {
-						Shell shell= JUnitPlugin.getActiveWorkbenchShell();
-						if (shell == null)
-							shell= getDisplay().getActiveShell();
-						if (shell != null) {
-							MessageDialog.openInformation(shell, JUnitMessages.JUnitLaunchConfigurationDelegate_dialog_title, status.getMessage());
-							success[0]= true;
-						}
-					}
-				}
-		);
-		return success[0];
-	}
-
-	private Display getDisplay() {
-		Display display;
-		display= Display.getCurrent();
-		if (display == null)
-			display= Display.getDefault();
-		return display;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.launcher.ITestFindingAbortHandler#abort(java.lang.String, java.lang.Throwable, int)
-	 */
-	protected void abort(String message, Throwable exception, int code) throws CoreException {
-		throw new CoreException(new Status(IStatus.ERROR, JUnitPlugin.PLUGIN_ID, code, message, exception));
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationTab.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationTab.java
index 4cd2170..9f1823b 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationTab.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchConfigurationTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,11 +9,15 @@
  *     IBM Corporation - initial API and implementation
  *     Sebastian Davids: sdavids at gmx.de bug: 26293, 27889
  *     David Saff (saff at mit.edu) - bug 102632: [JUnit] Support for JUnit 4.
+ *     Robert Konigsberg <konigsberg at google.com> - [JUnit] Improve discoverability of the ability to run a single method under JUnit Tests - https://bugs.eclipse.org/bugs/show_bug.cgi?id=285637
  *******************************************************************************/
 package org.eclipse.jdt.junit.launcher;
 
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -68,15 +72,21 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 
 import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
 
+import org.eclipse.jdt.core.IAnnotation;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.ISourceReference;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
 
 import org.eclipse.jdt.internal.junit.BasicElementLabels;
 import org.eclipse.jdt.internal.junit.Messages;
@@ -85,12 +95,12 @@ import org.eclipse.jdt.internal.junit.launcher.JUnitLaunchConfigurationConstants
 import org.eclipse.jdt.internal.junit.launcher.JUnitMigrationDelegate;
 import org.eclipse.jdt.internal.junit.launcher.TestKind;
 import org.eclipse.jdt.internal.junit.launcher.TestKindRegistry;
-import org.eclipse.jdt.internal.junit.launcher.TestSelectionDialog;
 import org.eclipse.jdt.internal.junit.ui.IJUnitHelpContextIds;
 import org.eclipse.jdt.internal.junit.ui.JUnitMessages;
 import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
 import org.eclipse.jdt.internal.junit.util.JUnitStubUtility;
 import org.eclipse.jdt.internal.junit.util.LayoutUtil;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
 import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
 
 import org.eclipse.jdt.launching.AbstractVMInstall;
@@ -98,13 +108,19 @@ import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
 import org.eclipse.jdt.ui.JavaElementComparator;
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
+import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoFilterExtension;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoRequestor;
+import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
 
 import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
 import org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter;
 
+
 /**
  * The launch configuration tab for JUnit.
  * <p>
@@ -128,6 +144,8 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 	private final Image fTestIcon= createImage("obj16/test.gif"); //$NON-NLS-1$
 	private String fOriginalTestMethodName;
 	private Label fTestMethodLabel;
+	private Text fTestMethodText;
+	private Button fTestMethodSearchButton;
 	private Text fContainerText;
 	private IJavaElement fContainerElement;
 	private final ILabelProvider fJavaElementLabelProvider= new JavaElementLabelProvider();
@@ -141,6 +159,11 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 
 	private ILaunchConfiguration fLaunchConfiguration;
 
+	private boolean fIsValid= true;
+	
+	private Set/*<String>*/ fMethodsCache;
+	private String fMethodsCacheKey;
+	
 	/**
 	 * Creates a JUnit launch configuration tab.
 	 */
@@ -160,12 +183,12 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		comp.setLayout(topLayout);
 
 		createSingleTestSection(comp);
+		createSpacer(comp);
+		
 		createTestContainerSelectionGroup(comp);
-
 		createSpacer(comp);
 
 		createTestLoaderGroup(comp);
-
 		createSpacer(comp);
 
 		createKeepAliveGroup(comp);
@@ -256,6 +279,7 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		fTestText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		fTestText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent evt) {
+				fTestMethodSearchButton.setEnabled(fTestText.getText().length() > 0);
 				validatePage();
 				updateLaunchConfigurationDialog();
 			}
@@ -271,14 +295,36 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		});
 		setButtonGridData(fSearchButton);
 
-		new Label(comp, SWT.NONE);
-
-		fTestMethodLabel= new Label(comp, SWT.NONE);
-		fTestMethodLabel.setText("");  //$NON-NLS-1$
-		gd= new GridData();
-		gd.horizontalSpan = 2;
+		fTestMethodLabel = new Label(comp, SWT.NONE);
+		gd = new GridData();
+		gd.horizontalIndent = 25;
 		fTestMethodLabel.setLayoutData(gd);
+		fTestMethodLabel.setText(JUnitMessages.JUnitLaunchConfigurationTab_label_method);
+
+		
+		fTestMethodText= new Text(comp, SWT.SINGLE | SWT.BORDER);
+		gd= new GridData(GridData.FILL_HORIZONTAL);
+		fTestMethodText.setLayoutData(gd);
+
+		fTestMethodText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent evt) {
+				validatePage();
+				updateLaunchConfigurationDialog();
+			}
+		});
+		fTestMethodText.setMessage(JUnitMessages.JUnitLaunchConfigurationTab_all_methods_text);
+
 
+		fTestMethodSearchButton = new Button(comp, SWT.PUSH);
+		fTestMethodSearchButton.setEnabled(fTestText.getText().length() > 0);
+		fTestMethodSearchButton.setText(JUnitMessages.JUnitLaunchConfigurationTab_label_search_method);
+		fTestMethodSearchButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent evt) {
+				handleTestMethodSearchButtonSelected();
+			}
+		});
+
+		setButtonGridData(fTestMethodSearchButton);
 	}
 
 	private void createTestContainerSelectionGroup(Composite comp) {
@@ -420,15 +466,7 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		fTestContainerRadioButton.setSelection(false);
 		fTestText.setText(testTypeName);
 		fContainerText.setText(""); //$NON-NLS-1$
-		setTestMethodLabel(fOriginalTestMethodName);
-	}
-
-	private void setTestMethodLabel(String testMethodName) {
-		if (!"".equals(testMethodName)) { //$NON-NLS-1$
-			fTestMethodLabel.setText(JUnitMessages.JUnitLaunchConfigurationTab_label_method+fOriginalTestMethodName);
-		} else {
-			fTestMethodLabel.setText(""); //$NON-NLS-1$
-		}
+		fTestMethodText.setText(fOriginalTestMethodName);
 	}
 
 	private void updateTestContainerFromConfig(ILaunchConfiguration config) {
@@ -467,7 +505,7 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
 			config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, fTestText.getText());
 			config.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_CONTAINER, ""); //$NON-NLS-1$
-			config.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, fOriginalTestMethodName);
+			config.setAttribute(JUnitLaunchConfigurationConstants.ATTR_TEST_METHOD_NAME, fTestMethodText.getText());
 		}
 		config.setAttribute(JUnitLaunchConfigurationConstants.ATTR_KEEPRUNNING, fKeepRunning.getSelection());
 		try {
@@ -531,7 +569,39 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 			fTestContainerRadioButton.setSelection(radioSetting[1]);
 		}
 
-		SelectionDialog dialog = new TestSelectionDialog(shell, types);
+		final HashSet typeLookup= new HashSet();
+		for (int i= 0; i < types.length; i++) {
+			IType type= types[i];
+			typeLookup.add(type.getPackageFragment().getElementName() + '/' + type.getTypeQualifiedName('.'));
+		}
+		SelectionDialog dialog= null;
+		try {
+			dialog= JavaUI.createTypeDialog(shell,
+					getLaunchConfigurationDialog(),
+					SearchEngine.createJavaSearchScope(new IJavaElement[] { javaProject }, IJavaSearchScope.SOURCES),
+					IJavaElementSearchConstants.CONSIDER_ALL_TYPES,
+					false,
+					"**", //$NON-NLS-1$
+					new TypeSelectionExtension() {
+						public ITypeInfoFilterExtension getFilterExtension() {
+							return new ITypeInfoFilterExtension() {
+								public boolean select(ITypeInfoRequestor requestor) {
+									StringBuffer buf= new StringBuffer();
+									buf.append(requestor.getPackageName()).append('/');
+									String enclosingName= requestor.getEnclosingName();
+									if (enclosingName.length() > 0)
+										buf.append(enclosingName).append('.');
+									buf.append(requestor.getTypeName());
+									return typeLookup.contains(buf.toString());
+								}
+							};
+						}
+					});
+		} catch (JavaModelException e) {
+			JUnitPlugin.log(e);
+			return;
+		}
+		
 		dialog.setTitle(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_title);
 		dialog.setMessage(JUnitMessages.JUnitLaunchConfigurationTab_testdialog_message);
 		if (dialog.open() == Window.CANCEL) {
@@ -566,6 +636,104 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		fProjText.setText(projectName);
 	}
 
+	private void handleTestMethodSearchButtonSelected() {
+		try {
+			IJavaProject javaProject = getJavaProject();
+			IType testType= javaProject.findType(fTestText.getText());
+			Set methodNames= getMethodsForType(javaProject, testType, getSelectedTestKind());
+			String methodName= chooseMethodName(methodNames);
+			
+			if (methodName != null) {
+				fTestMethodText.setText(methodName);
+				validatePage();
+				updateLaunchConfigurationDialog();
+			}
+		} catch (JavaModelException e) {
+			JUnitPlugin.log(e.getStatus());
+		}
+	}
+
+	private Set getMethodsForType(IJavaProject javaProject, IType type, TestKind testKind) throws JavaModelException {
+		if (javaProject == null || type == null || testKind == null)
+			return Collections.EMPTY_SET;
+		
+		String methodsCacheKey= javaProject.getElementName() + '\n' + type.getFullyQualifiedName() + '\n' + testKind.getId();
+		if (methodsCacheKey.equals(fMethodsCacheKey))
+			return fMethodsCache;
+		
+		Set methodNames= new HashSet();
+		fMethodsCache= methodNames;
+		fMethodsCacheKey= methodsCacheKey;
+
+		boolean isJUnit4= TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId());
+
+		while (type != null) {
+			IMethod[] methods= type.getMethods();
+			for (int i= 0; i < methods.length; i++) {
+				IMethod method= methods[i];
+				int flags= method.getFlags();
+				// Only include public, non-static, no-arg methods that return void and start with "test":
+				if (Modifier.isPublic(flags) && !Modifier.isStatic(flags) &&
+						method.getNumberOfParameters() == 0 && Signature.SIG_VOID.equals(method.getReturnType()) &&
+						method.getElementName().startsWith("test")) { //$NON-NLS-1$
+					methodNames.add(method.getElementName());
+				}
+				if (isJUnit4) {
+					IAnnotation annotation= method.getAnnotation("Test"); //$NON-NLS-1$
+					if (annotation.exists()) {
+						methodNames.add(method.getElementName());
+					}
+				}
+			}
+			String superclassName= type.getSuperclassName();
+			if (superclassName != null) {
+				int pos= superclassName.indexOf('<');
+				if (pos != -1) 
+					superclassName= superclassName.substring(0, pos);
+				String[][] resolvedSupertype= type.resolveType(superclassName);
+				if (resolvedSupertype != null && resolvedSupertype.length > 0) {
+					String[] superclass= resolvedSupertype[0];
+					type= javaProject.findType(superclass[0], superclass[1]);
+				} else {
+					type= null;
+				}
+			} else {
+				type= null;
+			}
+		}
+		return methodNames;
+	}
+
+	private String chooseMethodName(Set methodNames) {
+		Shell shell= getShell();
+
+		ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new LabelProvider());
+		dialog.setMessage(Messages.format(JUnitMessages.JUnitLaunchConfigurationTab_select_method_header, fTestText.getText()));
+		dialog.setTitle(JUnitMessages.JUnitLaunchConfigurationTab_select_method_title);
+
+		int methodCount= methodNames.size();
+		String[] elements= new String[methodCount + 1];
+		methodNames.toArray(elements);
+		elements[methodCount]= JUnitMessages.JUnitLaunchConfigurationTab_all_methods_text;
+
+		dialog.setElements(elements);
+
+		String methodName= fTestMethodText.getText();
+
+		if (methodNames.contains(methodName)) {
+			dialog.setInitialSelections(new String[] { methodName });
+		}
+
+		dialog.setAllowDuplicates(false);
+		dialog.setMultipleSelection(false);
+		if (dialog.open() == Window.OK) {
+			String result= (String)dialog.getFirstResult();
+			return (result == null || result.equals(JUnitMessages.JUnitLaunchConfigurationTab_all_methods_text))
+					? "" : result; //$NON-NLS-1$
+		}
+		return null;
+	}
+	
 	/*
 	 * Realize a Java Project selection dialog and return the first selected project,
 	 * or null if there was none.
@@ -627,7 +795,7 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 	 */
 	public boolean isValid(ILaunchConfiguration config) {
 		validatePage();
-		return getErrorMessage() == null;
+		return fIsValid;
 	}
 
 	private void testModeChanged() {
@@ -645,6 +813,15 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		validatePage();
 		updateLaunchConfigurationDialog();
 	}
+	
+	/*
+	 * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#setErrorMessage(java.lang.String)
+	 * @since 3.6
+	 */
+	protected void setErrorMessage(String errorMessage) {
+		fIsValid= errorMessage == null;
+		super.setErrorMessage(errorMessage);
+	}
 
 	private void validatePage() {
 
@@ -690,10 +867,19 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 				setErrorMessage(JUnitMessages.JUnitLaunchConfigurationTab_error_testnotdefined);
 				return;
 			}
-			if (javaProject.findType(className) == null) {
+			IType type= javaProject.findType(className);
+			if (type == null) {
 				setErrorMessage(Messages.format(JUnitMessages.JUnitLaunchConfigurationTab_error_test_class_not_found, new String[] { className, projectName }));
 				return;
 			}
+			String methodName = fTestMethodText.getText();
+			if (methodName.length() > 0) {
+				Set methodsForType= getMethodsForType(javaProject, type, getSelectedTestKind());
+				if (!methodsForType.contains(methodName)) {
+					super.setErrorMessage(Messages.format(JUnitMessages.JUnitLaunchConfigurationTab_error_test_method_not_found, new String[] { className, methodName, projectName }));
+					return;
+				}
+			}
 
 
 		} catch (CoreException e) {
@@ -704,13 +890,13 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 	}
 
 	private void validateJavaProject(IJavaProject javaProject) {
-		if (! TestSearchEngine.hasTestCaseType(javaProject)) {
+		if (! CoreTestSearchEngine.hasTestCaseType(javaProject)) {
 			setErrorMessage(JUnitMessages.JUnitLaunchConfigurationTab_error_testcasenotonpath);
 			return;
 		}
 		TestKind testKind = getSelectedTestKind();
 		if (testKind != null && TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId())) {
-			if (! TestSearchEngine.hasTestAnnotation(javaProject)) {
+			if (! CoreTestSearchEngine.hasTestAnnotation(javaProject)) {
 				setErrorMessage(JUnitMessages.JUnitLaunchConfigurationTab_error_testannotationnotonpath);
 				return;
 			}
@@ -751,8 +937,11 @@ public class JUnitLaunchConfigurationTab extends AbstractLaunchConfigurationTab
 		fProjButton.setEnabled(enabled);
 		fTestLabel.setEnabled(enabled);
 		fTestText.setEnabled(enabled);
-		fSearchButton.setEnabled(enabled && fProjText.getText().length() > 0);
+		boolean projectTextHasContents= fProjText.getText().length() > 0;
+		fSearchButton.setEnabled(enabled && projectTextHasContents);
 		fTestMethodLabel.setEnabled(enabled);
+		fTestMethodText.setEnabled(enabled);
+		fTestMethodSearchButton.setEnabled(enabled && projectTextHasContents &&  fTestText.getText().length() > 0);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchShortcut.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchShortcut.java
index e83302c..2d38ad6 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/launcher/JUnitLaunchShortcut.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,6 +76,7 @@ import org.eclipse.jdt.ui.JavaUI;
 
 import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
 
+
 /**
  * The launch shortcut to launch JUnit tests.
  *
@@ -329,7 +330,7 @@ public class JUnitLaunchShortcut implements ILaunchShortcut2 {
 		String testKindId= TestKindRegistry.getContainerTestKindId(element);
 
 		ILaunchConfigurationType configType= getLaunchManager().getLaunchConfigurationType(getLaunchConfigurationTypeId());
-		ILaunchConfigurationWorkingCopy wc= configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom(testName));
+		ILaunchConfigurationWorkingCopy wc= configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(testName));
 
 		wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, mainTypeQualifiedName);
 		wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, element.getJavaProject().getElementName());
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestElement.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestElement.java
deleted file mode 100644
index 9b93f7b..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestElement.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Brock Janiczak (brockj at tpg.com.au)
- *         - https://bugs.eclipse.org/bugs/show_bug.cgi?id=102236: [JUnit] display execution time next to each test
- *******************************************************************************/
-package org.eclipse.jdt.junit.model;
-
-
-/**
- * Common protocol for test elements.
- * This set consists of {@link ITestCaseElement} , {@link ITestSuiteElement} and {@link ITestRunSession}
- *
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- *
- * @since 3.3
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITestElement {
-
-	/**
-	 * Running states of a test.
-	 */
-	public static final class ProgressState {
-		/** state that describes that the test element has not started */
-		public static final ProgressState NOT_STARTED= new ProgressState("Not Started"); //$NON-NLS-1$
-		/** state that describes that the test element has is running */
-		public static final ProgressState RUNNING= new ProgressState("Running"); //$NON-NLS-1$
-		/** state that describes that the test element has been stopped before being completed */
-		public static final ProgressState STOPPED= new ProgressState("Stopped"); //$NON-NLS-1$
-		/** state that describes that the test element has completed */
-		public static final ProgressState COMPLETED= new ProgressState("Completed"); //$NON-NLS-1$
-
-		private String fName;
-		private ProgressState(String name) {
-			fName= name;
-		}
-		public String toString() {
-			return fName;
-		}
-	}
-
-	/**
-	 * Result states of a test.
-	 */
-	public static final class Result {
-		/** state that describes that the test result is undefined */
-		public static final Result UNDEFINED= new Result("Undefined"); //$NON-NLS-1$
-		/** state that describes that the test result is 'OK' */
-		public static final Result OK= new Result("OK"); //$NON-NLS-1$
-		/** state that describes that the test result is 'Error' */
-		public static final Result ERROR= new Result("Error"); //$NON-NLS-1$
-		/** state that describes that the test result is 'Failure' */
-		public static final Result FAILURE= new Result("Failure"); //$NON-NLS-1$
-		/** state that describes that the test result is 'Ignored' */
-		public static final Result IGNORED= new Result("Ignored"); //$NON-NLS-1$
-
-		private String fName;
-		private Result(String name) {
-			fName= name;
-		}
-		public String toString() {
-			return fName;
-		}
-	}
-
-	/**
-	 * A failure trace of a test.
-	 *
-	 * This class is not intended to be instantiated or extended by clients.
-	 */
-	public static final class FailureTrace {
-		private final String fActual;
-		private final String fExpected;
-		private final String fTrace;
-
-		public FailureTrace(String trace, String expected, String actual) {
-			fActual= actual;
-			fExpected= expected;
-			fTrace= trace;
-		}
-
-		/**
-		 * Returns the failure stack trace.
-		 *
-		 * @return the failure stack trace
-		 */
-		public String getTrace() {
-			return fTrace;
-		}
-
-		/**
-		 * Returns the expected result or <code>null</code> if the trace is not a comparison failure.
-		 *
-		 * @return the expected result or <code>null</code> if the trace is not a comparison failure.
-		 */
-		public String getExpected() {
-			return fExpected;
-		}
-
-		/**
-		 * Returns the actual result or <code>null</code> if the trace is not a comparison failure.
-		 *
-		 * @return the actual result or <code>null</code> if the trace is not a comparison failure.
-		 */
-		public String getActual() {
-			return fActual;
-		}
-	}
-
-	/**
-	 * Returns the progress state of this test element.
-	 * <dl>
-	 * <li>{@link ITestElement.ProgressState#NOT_STARTED}: the test has not yet started</li>
-	 * <li>{@link ITestElement.ProgressState#RUNNING}: the test is currently running</li>
-	 * <li>{@link ITestElement.ProgressState#STOPPED}: the test has stopped before being completed</li>
-	 * <li>{@link ITestElement.ProgressState#COMPLETED}: the test (and all its children) has completed</li>
-	 * </dl>
-	 * @return returns one of {@link ITestElement.ProgressState#NOT_STARTED}, {@link ITestElement.ProgressState#RUNNING},
-	 * {@link ITestElement.ProgressState#STOPPED} or {@link ITestElement.ProgressState#COMPLETED}.
-	 */
-	public ProgressState getProgressState();
-
-	/**
-	 * Returns the result of the test element.
-	 * <dl>
-	 * <li>{@link ITestElement.Result#UNDEFINED}: the result is not yet evaluated</li>
-	 * <li>{@link ITestElement.Result#OK}: the test has succeeded</li>
-	 * <li>{@link ITestElement.Result#ERROR}: the test has returned an error</li>
-	 * <li>{@link ITestElement.Result#FAILURE}: the test has returned an failure</li>
-	 * <li>{@link ITestElement.Result#IGNORED}: the test has been ignored (skipped)</li>
-	 * </dl>
-	 * @param includeChildren if <code>true</code>, the returned result is the combined
-	 * result of the test and its children (if it has any). If <code>false</code>,
-	 * only the test's result is returned.
-	 *
-	 * @return returns one of {@link ITestElement.Result#UNDEFINED}, {@link ITestElement.Result#OK}, {@link ITestElement.Result#ERROR},
-	 * {@link ITestElement.Result#FAILURE} or {@link ITestElement.Result#IGNORED}. Clients should also prepare for other, new values.
-	 */
-	public Result getTestResult(boolean includeChildren);
-
-	/**
-	 * Returns the failure trace of this test element or <code>null</code> if the test has not resulted in an error or failure.
-	 *
-	 * @return the failure trace of this test or <code>null</code>.
-	 */
-	public FailureTrace getFailureTrace();
-
-	/**
-	 * Returns the parent test element container or <code>null</code> if the test element is the test run session.
-	 *
-	 * @return the parent test suite
-	 */
-	public ITestElementContainer getParentContainer();
-
-	/**
-	 * Returns the test run session.
-	 *
-	 * @return the parent test run session.
-	 */
-	public ITestRunSession getTestRunSession();
-
-	/**
-	 * Returns the estimated total time elapsed in seconds while executing this test element.
-	 * The total time for a test suite includes the time used for all tests in that suite.
-	 * The total time for a test session includes the time used for all tests in that session.
-	 * <p>
-	 * <strong>NOTE</strong>: The elapsed time is only valid for {@link ITestElement.ProgressState#COMPLETED}
-	 * test elements.
-	 * </p>
-	 *
-	 * @return total execution time for the test element in seconds, or {@link Double#NaN}</code>
-	 * if the state of the element is not {@link ITestElement.ProgressState#COMPLETED}
-	 *
-	 * @since 3.4
-	 */
-	public double getElapsedTimeInSeconds();
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestRunSession.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestRunSession.java
deleted file mode 100644
index aa77c37..0000000
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/model/ITestRunSession.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.junit.model;
-
-/**
- * Represents a test run session.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 3.3
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface ITestRunSession extends ITestElementContainer {
-
-	/**
-	 * Returns the name of the test run. The name is the name of the launch configuration use to run this test.
-	 *
-	 * @return returns the test run name
-	 */
-	public String getTestRunName();
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseWizardPageOne.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseWizardPageOne.java
index 1168f37..8d98583 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseWizardPageOne.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestCaseWizardPageOne.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,14 +64,15 @@ import org.eclipse.jdt.core.search.SearchEngine;
 
 import org.eclipse.jdt.internal.corext.util.JavaConventionsUtil;
 import org.eclipse.jdt.internal.junit.BasicElementLabels;
+import org.eclipse.jdt.internal.junit.JUnitCorePlugin;
 import org.eclipse.jdt.internal.junit.Messages;
 import org.eclipse.jdt.internal.junit.buildpath.BuildPathSupport;
 import org.eclipse.jdt.internal.junit.ui.IJUnitHelpContextIds;
 import org.eclipse.jdt.internal.junit.ui.JUnitPlugin;
+import org.eclipse.jdt.internal.junit.util.CoreTestSearchEngine;
 import org.eclipse.jdt.internal.junit.util.JUnitStatus;
 import org.eclipse.jdt.internal.junit.util.JUnitStubUtility;
 import org.eclipse.jdt.internal.junit.util.LayoutUtil;
-import org.eclipse.jdt.internal.junit.util.TestSearchEngine;
 import org.eclipse.jdt.internal.junit.util.JUnitStubUtility.GenStubSettings;
 import org.eclipse.jdt.internal.junit.wizards.MethodStubsSelectionButtonGroup;
 import org.eclipse.jdt.internal.junit.wizards.WizardMessages;
@@ -85,6 +86,7 @@ import org.eclipse.jdt.ui.wizards.NewTypeWizardPage;
 import org.eclipse.jdt.internal.ui.refactoring.contentassist.ControlContentAssistHelper;
 import org.eclipse.jdt.internal.ui.refactoring.contentassist.JavaTypeCompletionProcessor;
 
+
 /**
  * The class <code>NewTestCaseWizardPageOne</code> contains controls and validation routines
  * for the first page of the  'New JUnit TestCase Wizard'.
@@ -226,7 +228,7 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 			}
 			if (classToTest != null) {
 				try {
-					if (!TestSearchEngine.isTestImplementor(classToTest)) {
+					if (!CoreTestSearchEngine.isTestImplementor(classToTest)) {
 						setClassUnderTest(classToTest.getFullyQualifiedName('.'));
 					}
 				} catch (JavaModelException e) {
@@ -240,10 +242,9 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 		boolean isJunit4= false;
 		if (element != null && element.getElementType() != IJavaElement.JAVA_MODEL) {
 			IJavaProject project= element.getJavaProject();
-			try {
-				isJunit4= project.findType(JUnitPlugin.JUNIT4_ANNOTATION_NAME) != null;
-			} catch (JavaModelException e) {
-				// ignore
+			isJunit4= CoreTestSearchEngine.hasTestAnnotation(project);
+			if (!isJunit4 && !CoreTestSearchEngine.hasTestCaseType(project) && JUnitStubUtility.is50OrHigher(project)) {
+				isJunit4= true;
 			}
 		}
 		setJUnit4(isJunit4, true);
@@ -289,7 +290,7 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 		if (fIsJunit4) {
 			setSuperClass("java.lang.Object", false); //$NON-NLS-1$
 		} else {
-			setSuperClass(JUnitPlugin.TEST_SUPERCLASS_NAME, true);
+			setSuperClass(JUnitCorePlugin.TEST_SUPERCLASS_NAME, true);
 		}
 		handleFieldChanged(JUNIT4TOGGLE);
 	}
@@ -909,7 +910,7 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 				appendMethodComment(buffer, method);
 			}
 			if (isJUnit4()) {
-				buffer.append('@').append(imports.addImport(JUnitPlugin.JUNIT4_ANNOTATION_NAME)).append(getLineDelimiter());
+				buffer.append('@').append(imports.addImport(JUnitCorePlugin.JUNIT4_ANNOTATION_NAME)).append(getLineDelimiter());
 			}
 
 			buffer.append("public ");//$NON-NLS-1$
@@ -1056,12 +1057,12 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 							status.setError(WizardMessages.NewTestCaseWizardPageOne_error_java5required);
 							return status;
 						}
-						if (project.findType(JUnitPlugin.JUNIT4_ANNOTATION_NAME) == null) {
+						if (project.findType(JUnitCorePlugin.JUNIT4_ANNOTATION_NAME) == null) {
 							status.setWarning(WizardMessages.NewTestCaseWizardPageOne__error_junit4NotOnbuildpath);
 							return status;
 						}
 					} else {
-						if (project.findType(JUnitPlugin.TEST_SUPERCLASS_NAME) == null) {
+						if (project.findType(JUnitCorePlugin.TEST_SUPERCLASS_NAME) == null) {
 							status.setWarning(WizardMessages.NewTestCaseWizardPageOne_error_junitNotOnbuildpath);
 							return status;
 						}
@@ -1099,8 +1100,8 @@ public class NewTestCaseWizardPageOne extends NewTypeWizardPage {
 					status.setError(WizardMessages.NewTestCaseWizardPageOne_error_superclass_is_interface);
 					return status;
 				}
-				if (!TestSearchEngine.isTestImplementor(type)) { // TODO: expensive!
-					status.setError(Messages.format(WizardMessages.NewTestCaseWizardPageOne_error_superclass_not_implementing_test_interface, BasicElementLabels.getJavaElementName(JUnitPlugin.TEST_INTERFACE_NAME)));
+				if (!CoreTestSearchEngine.isTestImplementor(type)) { // TODO: expensive!
+					status.setError(Messages.format(WizardMessages.NewTestCaseWizardPageOne_error_superclass_not_implementing_test_interface, BasicElementLabels.getJavaElementName(JUnitCorePlugin.TEST_INTERFACE_NAME)));
 					return status;
 				}
 			} catch (JavaModelException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java
index 272c4dc..cb6a179 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.SubProgressMonitor;
 
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.CheckStateChangedEvent;
@@ -327,16 +330,15 @@ public class NewTestSuiteWizardPage extends NewTypeWizardPage {
 	 */
 	protected void createTypeMembers(IType type, ImportsManager imports, IProgressMonitor monitor) throws CoreException {
 		writeImports(imports);
-		type.createMethod(getSuiteMethodString(), null, false, null);
+		type.createMethod(getSuiteMethodString(type), null, false, null);
 	}
 
 	/*
 	 * Returns the string content for creating a new suite() method.
 	 */
-	private String getSuiteMethodString() {
-		IPackageFragment pack= getPackageFragment();
-		String packName= pack.getElementName();
-		StringBuffer suite= new StringBuffer("public static Test suite () {TestSuite suite= new TestSuite(\"Test for "+((packName.equals(""))?"default package":packName)+"\");\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	private String getSuiteMethodString(IType type) {
+		String typeName= type.getElementName();
+		StringBuffer suite= new StringBuffer("public static Test suite () {TestSuite suite= new TestSuite(" + typeName + ".class.getName());\n"); //$NON-NLS-1$ //$NON-NLS-2$ 
 		suite.append(getUpdatableString());
 		suite.append("\nreturn suite;}"); //$NON-NLS-1$
 		return suite.toString();
@@ -399,7 +401,7 @@ public class NewTestSuiteWizardPage extends NewTypeWizardPage {
 				MessageDialog.openError(getShell(), WizardMessages.NewTestSuiteWizPage_createType_updateErrorDialog_title, WizardMessages.NewTestSuiteWizPage_createType_updateErrorDialog_message);
 			}
 		} else {
-			suiteType.createMethod(getSuiteMethodString(), null, true, monitor);
+			suiteType.createMethod(getSuiteMethodString(suiteType), null, true, monitor);
 			String originalContent= cu.getSource();
 			monitor.worked(2);
 			String formattedContent= JUnitStubUtility.formatCompilationUnit(cu.getJavaProject(), originalContent, lineDelimiter);
@@ -471,6 +473,11 @@ public class NewTestSuiteWizardPage extends NewTypeWizardPage {
 				status.setWarning(WizardMessages.NewTestSuiteWizPage_typeName_warning_already_exists);
 				return status;
 			}
+			IResource resource= cu.getResource();
+			if (resource != null && !ResourcesPlugin.getWorkspace().validateFiltered(resource).isOK()) {
+				status.setError(WizardMessages.NewTestSuiteWizPage_typeName_error_filtered);
+				return status;
+			}
 		}
 		return status;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF
index 71d8634..fe09d40 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/META-INF/MANIFEST.MF
@@ -3,9 +3,9 @@ Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.jdt.junit4.runtime;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.1.100.qualifier
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jdt.internal.junit4.runner;x-internal:=true
-Require-Bundle: org.junit4;bundle-version="[4.4.0,5.0.0)",
+Require-Bundle: org.junit;bundle-version="4.7.0",
  org.eclipse.jdt.junit.runtime;bundle-version="[3.4.100,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/plugin.properties b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/plugin.properties
index 5d9a852..8508537 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,5 +8,5 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-pluginName=Java Development Tools JUnit4 runtime support
+pluginName=Java Development Tools JUnit4 Runtime Support
 providerName=Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/FailuresFirstSorter.java b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/FailuresFirstSorter.java
new file mode 100644
index 0000000..d60a77f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/FailuresFirstSorter.java
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2009 SpringSource and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Andrew Eisenberg - initial API and implementation
+ *     Andrew Eisenberg <andrew at eisenberg.as> - [JUnit] Rerun failed first does not work with JUnit4 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140392
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.junit4.runner;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.runner.Description;
+
+/**
+ * Comparator for descriptions to sort according to inclusion in a failure list.
+ * A description is considered to have failures if its name or one of its transitive
+ * children's names are in the failures list.
+ * If neither or both have failures, returns 0.
+ * 
+ * @since 3.6
+ */
+public class FailuresFirstSorter implements Comparator<Description> {
+
+	private final Set<String> failuresList;
+	
+	/**
+	 * Creates a sorter.
+	 * 
+	 * @param failuresList list of failed tests based on the description's display string
+	 */
+	public FailuresFirstSorter(String[] failuresList) {
+		this.failuresList = new HashSet<String>(Arrays.asList(failuresList));
+	}
+
+	/**
+	 * Compares two descriptions based on the failure list.
+	 * @param d1 the first Description to compare with
+	 * @param d2 the second Description to compare with
+	 * @return -1 if only d1 has failures, 1 if only d2 has failures, 0 otherwise 
+	 */
+	public int compare(Description d1, Description d2) {
+		boolean d1HasFailures = hasFailures(d1);
+		boolean d2HasFailures = hasFailures(d2);
+		
+		if (d1HasFailures) {
+			return -1;
+		} else if (d2HasFailures) {
+			return 1;
+		} else { // ((d1HasFailures && d2HasFailures) || (!d1HasFailures && !d2HasFailures))
+			return 0;
+		}
+	}
+
+	private boolean hasFailures(Description d) {
+		if (failuresList.contains(d.getDisplayName())) {
+			return true;
+		} else {
+			for (Description child : d.getChildren()) {
+				if (hasFailures(child)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestClassReference.java b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestClassReference.java
index 64ea351..8eee1ca 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestClassReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestClassReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ import org.eclipse.jdt.internal.junit.runner.IVisitsTestTrees;
 public class JUnit4TestClassReference extends JUnit4TestReference {
 	protected final Class<?> fClass;
 
-	public JUnit4TestClassReference(Class<?> clazz) {
-		super(Request.aClass(clazz));
+	public JUnit4TestClassReference(Class<?> clazz, String[] failureNames) {
+		super(Request.aClass(clazz), failureNames);
 		fClass= clazz;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java
index 0f866d2..a267432 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestLoader.java
@@ -1,25 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *   David Saff (saff at mit.edu) - initial API and implementation
+ *     David Saff (saff at mit.edu) - initial API and implementation
  *             (bug 102632: [JUnit] Support for JUnit 4.)
+ *     Andrew Eisenberg <andrew at eisenberg.as> - [JUnit] Rerun failed first does not work with JUnit4 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140392
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.junit4.runner;
 
 import org.eclipse.jdt.internal.junit.runner.ITestLoader;
 import org.eclipse.jdt.internal.junit.runner.ITestReference;
 import org.eclipse.jdt.internal.junit.runner.RemoteTestRunner;
 
+
 public class JUnit4TestLoader implements ITestLoader {
 
 	public ITestReference[] loadTests(
-			@SuppressWarnings("unchecked") Class[] testClasses, // https://bugs.eclipse.org/bugs/show_bug.cgi?id=164472
+			@SuppressWarnings("rawtypes") Class[] testClasses, // https://bugs.eclipse.org/bugs/show_bug.cgi?id=164472
 			String testName,
 			String[] failureNames,
 			RemoteTestRunner listener) {
@@ -27,17 +28,17 @@ public class JUnit4TestLoader implements ITestLoader {
 		ITestReference[] refs= new ITestReference[testClasses.length];
 		for (int i= 0; i < testClasses.length; i++) {
 			Class<?> clazz= testClasses[i];
-			ITestReference ref= createTest(clazz, testName);
+			ITestReference ref= createTest(clazz, testName, failureNames);
 			refs[i]= ref;
 		}
 		return refs;
 	}
 
-	private ITestReference createTest(Class<?> clazz, String testName) {
+	private ITestReference createTest(Class<?> clazz, String testName, String[] failureNames) {
 		if (clazz == null)
 			return null;
 		if (testName == null)
-			return new JUnit4TestClassReference(clazz);
-		return new JUnit4TestMethodReference(clazz, testName);
+			return new JUnit4TestClassReference(clazz, failureNames);
+		return new JUnit4TestMethodReference(clazz, testName, failureNames);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestMethodReference.java b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestMethodReference.java
index 9b8efd1..25b5ac0 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestMethodReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestMethodReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ import org.eclipse.jdt.internal.junit.runner.IVisitsTestTrees;
 public class JUnit4TestMethodReference extends JUnit4TestReference {
 	private final Description fDescription;
 
-	public JUnit4TestMethodReference(Class<?> clazz, String methodName) {
-		super(Request.method(clazz, methodName));
+	public JUnit4TestMethodReference(Class<?> clazz, String methodName, String[] failureNames) {
+		super(Request.method(clazz, methodName), failureNames);
 		fDescription = Description.createTestDescription(clazz, methodName);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestReference.java b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestReference.java
index e0748bb..da15611 100644
--- a/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestReference.java
+++ b/eclipse/plugins/org.eclipse.jdt.junit4.runtime/src/org/eclipse/jdt/internal/junit4/runner/JUnit4TestReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,10 @@ import org.eclipse.jdt.internal.junit.runner.TestExecution;
 public abstract class JUnit4TestReference implements ITestReference {
 	protected Runner fRunner;
 
-	public JUnit4TestReference(Request request) {
+	public JUnit4TestReference(Request request, String[] failureNames) {
+		if (failureNames != null) {
+			request= request.sortWith(new FailuresFirstSorter(failureNames));
+		}
 		fRunner= request.getRunner();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
index 09ec0a9..4078a56 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.launching.macosx; singleton:=true
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.launching.macosx.MacOSXLaunchingPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLauncherMessages.properties b/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLauncherMessages.properties
index 2a099ef..0dbf90c 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLauncherMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXLauncherMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2002, 2005 IBM Corporation and others.
+# Copyright (c) 2002, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,10 +7,11 @@
 #
 # Contributors:
 #    Andre Weinand - Initial implementation
+#    Ralf Ebert ralf at ralfebert.de - fix for #307109
 ###############################################################################
 			
 MacOSXVMType.jvmName= JVM {0}
 MacOSXVMType.jvmDefaultName= JVM {0} (MacOS X Default)
 MacOSXVMType.error.notRoot=Not a JDK Root; MacOS X executable was not found
 MacOSXVMType.name=MacOS X VM
-
+MacOSXVMType.error.jvmDirectoryNotFound=Java VM default location "{0}" not found, JVMs were not scanned.
diff --git a/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java b/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
index 28a36d7..0148213 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching.macosx/macosx/org/eclipse/jdt/internal/launching/macosx/MacOSXVMInstallType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jeff Myers myersj at gmail.com - fix for #75201
+ *     Ralf Ebert ralf at ralfebert.de - fix for #307109
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching.macosx;
 
@@ -22,14 +23,13 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
-
 import org.eclipse.jdt.internal.launching.LaunchingPlugin;
 import org.eclipse.jdt.internal.launching.LibraryInfo;
 import org.eclipse.jdt.internal.launching.StandardVMType;
-
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jdt.launching.VMStandin;
+import org.eclipse.osgi.util.NLS;
 
 /**
  * This plugins into the org.eclipse.jdt.launching.vmInstallTypes extension point
@@ -58,10 +58,11 @@ public class MacOSXVMInstallType extends StandardVMType {
 	
 	/** The OS keeps all the JVM versions in this directory */
 	private static final String JVM_VERSION_LOC= "/System/Library/Frameworks/JavaVM.framework/Versions/";	//$NON-NLS-1$
+	private static final File JVM_VERSIONS_FOLDER= new File(JVM_VERSION_LOC);
 	/** The name of a Unix link to MacOS X's default VM */
-	private static final String CURRENT_JVM= "CurrentJDK";	//$NON-NLS-1$
+	private static final String CURRENT_JDK= "CurrentJDK";	//$NON-NLS-1$
 	/** The root of a JVM */
-	private static final String JVM_ROOT= "Home";	//$NON-NLS-1$
+	private static final String JVM_HOME= "Home";	//$NON-NLS-1$
 	/** The doc (for all JVMs) lives here (if the developer kit has been expanded)*/
 	private static final String JAVADOC_LOC= "/Developer/Documentation/Java/Reference/";	//$NON-NLS-1$
 	/** The doc for 1.4.1 is kept in a sub directory of the above. */ 
@@ -85,53 +86,42 @@ public class MacOSXVMInstallType extends StandardVMType {
 		if (javaVMName == null) {
 			return null;
 		}
+
+		if (!JVM_VERSIONS_FOLDER.exists() || !JVM_VERSIONS_FOLDER.isDirectory()) {
+			String message= NLS.bind(MacOSXLaunchingPlugin.getString("MacOSXVMType.error.jvmDirectoryNotFound"), JVM_VERSIONS_FOLDER);  //$NON-NLS-1$
+			LaunchingPlugin.log(message);
+			return null;
+		}
+
 		// find all installed VMs
 		File defaultLocation= null;
-		File versionDir= new File(JVM_VERSION_LOC);
-		if (versionDir.exists() && versionDir.isDirectory()) {
-			File currentJDK= new File(versionDir, CURRENT_JVM);
-			try {
-				currentJDK= currentJDK.getCanonicalFile();
-			} catch (IOException ex) {
-				// NeedWork
-			}
-			File[] versions= versionDir.listFiles();
-			for (int i= 0; i < versions.length; i++) {
-				String version= versions[i].getName();
-				File home= new File(versions[i], JVM_ROOT);
-				if (home.exists()) {
-					boolean isDefault= currentJDK.equals(versions[i]);
-					IVMInstall install= findVMInstall(version);
-					if (install == null && !CURRENT_JVM.equals(version)) {
-						VMStandin vm= new VMStandin(this, version);
-						vm.setInstallLocation(home);
-						String format= MacOSXLaunchingPlugin.getString(isDefault
-													? "MacOSXVMType.jvmDefaultName"		//$NON-NLS-1$
-													: "MacOSXVMType.jvmName");				//$NON-NLS-1$
-						vm.setName(MessageFormat.format(format, new Object[] { version } ));
-						vm.setLibraryLocations(getDefaultLibraryLocations(home));
-						URL doc= getDefaultJavadocLocation(home);
-						if (doc != null)
-							vm.setJavadocLocation(doc);
-						
-						IVMInstall rvm= vm.convertToRealVM();					
-						if (isDefault) {
-							defaultLocation= home;
-							try {
-								JavaRuntime.setDefaultVMInstall(rvm, null);
-							} catch (CoreException e) {
-								LaunchingPlugin.log(e);
-							}
-						}
-					} else {
-						if (isDefault) {
-							defaultLocation= home;
-							try {
-								JavaRuntime.setDefaultVMInstall(install, null);
-							} catch (CoreException e) {
-								LaunchingPlugin.log(e);
-							}
-						}
+		File[] versions= getAllVersions();
+		File currentJDK= getCurrentJDK();
+		for (int i= 0; i < versions.length; i++) {
+			File versionFile= versions[i];
+			String version= versionFile.getName();
+			File home= new File(versionFile, JVM_HOME);
+			if (home.exists()) {
+				boolean isDefault= currentJDK.equals(versionFile);
+				IVMInstall install= findVMInstall(version);
+				if (install == null) {
+					VMStandin vm= new VMStandin(this, version);
+					vm.setInstallLocation(home);
+					String format= MacOSXLaunchingPlugin.getString(isDefault
+												? "MacOSXVMType.jvmDefaultName"		//$NON-NLS-1$
+												: "MacOSXVMType.jvmName");				//$NON-NLS-1$
+					vm.setName(MessageFormat.format(format, new Object[] { version } ));
+					vm.setLibraryLocations(getDefaultLibraryLocations(home));
+					vm.setJavadocLocation(getDefaultJavadocLocation(home));
+					
+					install= vm.convertToRealVM();
+				}
+				if (isDefault) {
+					defaultLocation= home;
+					try {
+						JavaRuntime.setDefaultVMInstall(install, null);
+					} catch (CoreException e) {
+						LaunchingPlugin.log(e);
 					}
 				}
 			}
@@ -139,6 +129,26 @@ public class MacOSXVMInstallType extends StandardVMType {
 		return defaultLocation;
 	}
 
+	private File[] getAllVersions() {
+		File[] versionFiles= JVM_VERSIONS_FOLDER.listFiles();
+		for (int i= 0; i < versionFiles.length; i++) {
+			versionFiles[i]= resolveSymbolicLinks(versionFiles[i]);
+		}
+		return versionFiles;
+	}
+
+	private File getCurrentJDK() {
+		return resolveSymbolicLinks(new File(JVM_VERSIONS_FOLDER, CURRENT_JDK));
+	}
+	
+	private File resolveSymbolicLinks(File file) {
+		try {
+			return file.getCanonicalFile();
+		} catch (IOException ex) {
+			return file;
+		}
+	}
+
 	/**
 	 * Returns default library info for the given install location.
 	 * 
@@ -156,17 +166,17 @@ public class MacOSXVMInstallType extends StandardVMType {
 		File lib = new File(installLocation, "lib"); //$NON-NLS-1$
 		File extDir = new File(lib, "ext"); //$NON-NLS-1$
 		String[] dirs = null;
-		if (extDir == null)
-			dirs = new String[0];
-		else
+		if (extDir.exists())
 			dirs = new String[] {extDir.getAbsolutePath()};
+		else
+			dirs = new String[0];
 
 		File endDir = new File(lib, "endorsed"); //$NON-NLS-1$
 		String[] endDirs = null;
-		if (endDir == null)
-			endDirs = new String[0]; 
-		else
+		if (endDir.exists())
 			endDirs = new String[] {endDir.getAbsolutePath()};
+		else
+			endDirs = new String[0]; 
 		
 		return new LibraryInfo("???", libs, dirs, endDirs);		 //$NON-NLS-1$
 	}
@@ -174,7 +184,7 @@ public class MacOSXVMInstallType extends StandardVMType {
 	protected IPath getDefaultSystemLibrarySource(File libLocation) {
 		File parent= libLocation.getParentFile();
 		while (parent != null) {
-			File home= new File(parent, JVM_ROOT);
+			File home= new File(parent, JVM_HOME);
 			File parentsrc= new File(home, "src.jar"); //$NON-NLS-1$
 			if (parentsrc.isFile()) {
 				setDefaultRootPath("src");//$NON-NLS-1$
@@ -210,7 +220,7 @@ public class MacOSXVMInstallType extends StandardVMType {
 		// try in local filesystem
 		String id= null;	
 		try {
-			String post= File.separator + JVM_ROOT;
+			String post= File.separator + JVM_HOME;
 			String path= installLocation.getCanonicalPath();
 			if (path.startsWith(JVM_VERSION_LOC) && path.endsWith(post))
 				id= path.substring(JVM_VERSION_LOC.length(), path.length()-post.length());
diff --git a/eclipse/plugins/org.eclipse.jdt.launching.ui.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.launching.ui.macosx/META-INF/MANIFEST.MF
index a9c21cf..45c7325 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching.ui.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.launching.ui.macosx/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.launching.ui.macosx;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/.classpath b/eclipse/plugins/org.eclipse.jdt.launching/.classpath
index 913dd6c..08cb99e 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/.classpath
+++ b/eclipse/plugins/org.eclipse.jdt.launching/.classpath
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="launching"/>
-	<classpathentry kind="src" path="support"/>
+	<classpathentry kind="src" output="support_bin" path="support"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.core.prefs
index a5e6659..51006c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.jdt.core.prefs
@@ -1,99 +1,101 @@
-#Thu Feb 26 08:16:14 CST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+#Thu Oct 15 15:00:01 CDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.pde.prefs
index a5a2312..f96e448 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.jdt.launching/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:39:13 CST 2007
+#Mon Dec 14 12:08:03 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=0
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
index 8ea8f12..8092512 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.launching; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.5.200.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.launching.LaunchingPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -17,7 +17,7 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.jdt.debug;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
 Bundle-ActivationPolicy: lazy
 Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/build.properties b/eclipse/plugins/org.eclipse.jdt.launching/build.properties
index 4057fd4..96ec213 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.launching/build.properties
@@ -23,5 +23,6 @@ src.includes = about.html,\
                schema/
 
 jars.compile.order=.,lib/launchingsupport.jar
+output.. = bin/
+output.lib/launchingsupport.jar = support_bin/
 
-customBuildCallbacks=scripts/customBuild.xml
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
index 77cdad0..8c74989 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JREContainerInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,6 +80,45 @@ public class JREContainerInitializer extends ClasspathContainerInitializer {
 	}
 	
 	/**
+	 * Sets the specified class path container for all of the given projects.
+	 *  
+	 * @param containerPath JRE container path
+	 * @param projects projects set the container on
+	 * @throws CoreException on failure
+	 */
+	public void initialize(IPath containerPath, IJavaProject[] projects) throws CoreException {
+		int size = containerPath.segmentCount();
+		if (size > 0) {
+			if (containerPath.segment(0).equals(JavaRuntime.JRE_CONTAINER)) {
+				int length = projects.length;
+				IVMInstall vm = resolveVM(containerPath);
+				IClasspathContainer[] containers = new JREContainer[length];
+				if (vm != null) {
+					if (JREContainer.DEBUG_JRE_CONTAINER) {
+						System.out.println("\tResolved VM: " + vm.getName()); //$NON-NLS-1$
+					}
+					for (int i=0; i<length; i++) {
+						containers[i] = new JREContainer(vm, containerPath, projects[i]);
+					}
+				} else {
+					if (JREContainer.DEBUG_JRE_CONTAINER) {
+						System.out.println("\t*** FAILED RESOLVE VM ***"); //$NON-NLS-1$
+					}
+				}
+				JavaCore.setClasspathContainer(containerPath, projects, containers, null);
+			} else {
+				if (JREContainer.DEBUG_JRE_CONTAINER) {
+					System.out.println("\t*** INVALID JRE CONTAINER PATH ***"); //$NON-NLS-1$
+				}	
+			}
+		} else {
+			if (JREContainer.DEBUG_JRE_CONTAINER) {
+				System.out.println("\t*** NO SEGMENTS IN CONTAINER PATH ***"); //$NON-NLS-1$
+			}
+		}
+	}
+	
+	/**
 	 * Returns the VM install associated with the container path, or <code>null</code>
 	 * if it does not exist.
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
index 76468c0..60dee55 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/JavaSourceLookupUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,6 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Kelly Campbell - Bug 285607
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
index c26abac..ffb4253 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -50,8 +51,8 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.debug.core.DebugEvent;
@@ -131,6 +132,20 @@ public class LaunchingPlugin extends Plugin implements Preferences.IPropertyChan
 	private static Map fgLibraryInfoMap = null;
 	
 	/**
+	 * Mapping of the last time the directory of a given SDK was modified.
+	 * <br><br>
+	 * Mapping: <code>Map<String,Long></code>
+	 * @since 3.7
+	 */
+	private static Map fgInstallTimeMap = null;
+	/**
+	 * Mutex for checking the time stamp of an install location
+	 * 
+	 * @since 3.7
+	 */
+	private static Object installLock = new Object();
+	
+	/**
 	 * Whether changes in VM preferences are being batched. When being batched
 	 * the plug-in can ignore processing and changes.
 	 */
@@ -272,7 +287,9 @@ public class LaunchingPlugin extends Plugin implements Preferences.IPropertyChan
 			monitor.worked(1);
 														
 			// re-bind all container entries
-			for (int i = 0; i < projects.length; i++) {
+			int length = projects.length;
+			Map projectsMap = new HashMap();
+			for (int i = 0; i < length; i++) {
 				IJavaProject project = projects[i];
 				IClasspathEntry[] entries = project.getRawClasspath();
 				boolean replace = false;
@@ -292,10 +309,14 @@ public class LaunchingPlugin extends Plugin implements Preferences.IPropertyChan
 										newBinding = renamed;
 									}
 								}
-								JREContainerInitializer initializer = new JREContainerInitializer();
 								if (newBinding == null){
 									// re-bind old path
-									initializer.initialize(reference, project);
+									// @see bug 310789 - batch updates by common container paths
+									List projectsList = (List) projectsMap.get(reference);
+									if (projectsList == null) {
+										projectsMap.put(reference, projectsList = new ArrayList(length));
+									}
+									projectsList.add(project);
 								} else {
 									// replace old class path entry with a new one
 									IClasspathEntry newEntry = JavaCore.newContainerEntry(newBinding, entry.isExported());
@@ -313,7 +334,16 @@ public class LaunchingPlugin extends Plugin implements Preferences.IPropertyChan
 				}
 				monitor.worked(1);
 			}
-
+			Iterator references = projectsMap.keySet().iterator();
+			while (references.hasNext()) {
+				IPath reference = (IPath) references.next();
+				List projectsList = (List) projectsMap.get(reference);
+				IJavaProject[] referenceProjects = new IJavaProject[projectsList.size()];
+				projectsList.toArray(referenceProjects);
+				// re-bind old path
+				JREContainerInitializer initializer = new JREContainerInitializer();
+				initializer.initialize(reference, referenceProjects);
+			}
 		}
 
 	}
@@ -904,6 +934,137 @@ public class LaunchingPlugin extends Plugin implements Preferences.IPropertyChan
 	}
 	
 	/**
+	 * Checks to see if the time stamp of the file describe by the given location string
+	 * has been modified since the last recorded time stamp. If there is no last recorded 
+	 * time stamp we assume it has changed.
+	 * 
+	 * @param location the location of the SDK we want to check the time stamp for 
+	 * @return <code>true</code> if the time stamp has changed compared to the cached one or if there is
+	 * no recorded time stamp, <code>false</code> otherwise.
+	 * 
+	 * @since 3.6.2
+	 * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266651
+	 */
+	public static boolean timeStampChanged(String location) {
+		synchronized (installLock) {
+			File file = new File(location);
+			if(file.exists()) {
+				if(fgInstallTimeMap == null) {
+					readInstallInfo();
+				}
+				Long stamp = (Long) fgInstallTimeMap.get(location);
+				long fstamp = file.lastModified();
+				if(stamp != null) {
+					if(stamp.longValue() == fstamp) {
+						return false;
+					}
+				}
+				//if there is no recorded stamp we have to assume it is new
+				stamp = new Long(fstamp);
+				fgInstallTimeMap.put(location, stamp);
+				writeInstallInfo();
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Reads the file of saved time stamps and populates the {@link #fgInstallTimeMap}
+	 * 
+	 * @since 3.6.2
+	 * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266651
+	 */
+	private static void readInstallInfo() {
+		fgInstallTimeMap = new HashMap();
+		IPath libPath = getDefault().getStateLocation();
+		libPath = libPath.append(".install.xml"); //$NON-NLS-1$
+		File file = libPath.toFile();
+		if (file.exists()) {
+			try {
+				InputStream stream = new BufferedInputStream(new FileInputStream(file));
+				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				parser.setErrorHandler(new DefaultHandler());
+				Element root = parser.parse(new InputSource(stream)).getDocumentElement();
+				if(root.getNodeName().equalsIgnoreCase("dirs")) { //$NON-NLS-1$
+					NodeList nodes = root.getChildNodes();
+					Node node = null;
+					Element element = null;
+					for (int i = 0; i < nodes.getLength(); i++) {
+						node = nodes.item(i);
+						if(node.getNodeType() == Node.ELEMENT_NODE) {
+							element = (Element) node;
+							if(element.getNodeName().equalsIgnoreCase("entry")) { //$NON-NLS-1$
+								String loc = element.getAttribute("loc"); //$NON-NLS-1$
+								String stamp = element.getAttribute("stamp"); //$NON-NLS-1$
+								try {
+									Long l = new Long(stamp);
+									fgInstallTimeMap.put(loc, l);
+								}
+								catch(NumberFormatException nfe) {
+								//do nothing	
+								}
+							}
+						}
+					}
+				}
+			} catch (IOException e) {
+				log(e);
+			} catch (ParserConfigurationException e) {
+				log(e);
+			} catch (SAXException e) {
+				log(e);
+			}
+		}
+	}
+	
+	/**
+	 * Writes out the mappings of SDK install time stamps to disk.
+	 * 
+	 * @since 3.6.2
+	 * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266651
+	 */
+	private static synchronized void writeInstallInfo() {
+		if(fgInstallTimeMap != null) {
+			OutputStream stream= null;
+			try {
+				Document doc = DebugPlugin.newDocument();
+				Element root = doc.createElement("dirs");    //$NON-NLS-1$
+				doc.appendChild(root);
+				Entry entry = null;
+				Element e = null;
+				for(Iterator i = fgInstallTimeMap.entrySet().iterator(); i.hasNext();) {
+					entry = (Entry) i.next();
+					e = doc.createElement("entry"); //$NON-NLS-1$
+					root.appendChild(e);
+					e.setAttribute("loc", entry.getKey().toString()); //$NON-NLS-1$
+					e.setAttribute("stamp", entry.getValue().toString()); //$NON-NLS-1$
+				}
+				String xml = DebugPlugin.serializeDocument(doc);
+				IPath libPath = getDefault().getStateLocation();
+				libPath = libPath.append(".install.xml"); //$NON-NLS-1$
+				File file = libPath.toFile();
+				if (!file.exists()) {
+					file.createNewFile();
+				}
+				stream = new BufferedOutputStream(new FileOutputStream(file));
+				stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$
+			} catch (IOException e) {
+				log(e);
+			}  catch (CoreException e) {
+				log(e);
+			} finally {
+				if (stream != null) {
+					try {
+						stream.close();
+					} catch (IOException e1) {
+					}
+				}
+			}
+		}
+	}
+	
+	/**
 	 * Returns paths stored in XML
 	 * @param lib
 	 * @param pathType
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/RuntimeClasspathEntry.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/RuntimeClasspathEntry.java
index 260cc33..b7cc083 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/RuntimeClasspathEntry.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/RuntimeClasspathEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -411,7 +411,7 @@ public class RuntimeClasspathEntry implements IRuntimeClasspathEntry {
 	}
 
 	/**
-	 * @see IRuntimeClasspathEntry#setClasspathProperty(int)
+	 * @see IRuntimeClasspathEntry#getClasspathProperty(int)
 	 */
 	public int getClasspathProperty() {
 		return fClasspathProperty;
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index 7e21abb..d5bbdbb 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Michael Allman - Bug 211648, Bug 156343 - Standard VM not supported on MacOS
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching;
 
 
+import com.ibm.icu.text.MessageFormat;
+
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -30,18 +33,20 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+
+import org.eclipse.jdt.core.JavaCore;
+
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.core.Launch;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.debug.core.model.IStreamsProxy;
+
 import org.eclipse.jdt.launching.AbstractVMInstallType;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.LibraryLocation;
 import org.eclipse.osgi.service.environment.Constants;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * A VM install type for VMs the conform to the standard
  * JDK installation layout.
@@ -112,12 +117,10 @@ public class StandardVMType extends AbstractVMInstallType {
 	 * executable.
 	 */
 	protected synchronized LibraryInfo getLibraryInfo(File javaHome, File javaExecutable) {
-		
-		// See if we already know the information for the requested VM.  If not, generate it.
 		String installPath = javaHome.getAbsolutePath();
 		LibraryInfo info = LaunchingPlugin.getLibraryInfo(installPath);
-		if (info == null) {
-			info= (LibraryInfo)fgFailedInstallPath.get(installPath);
+		if (info == null || LaunchingPlugin.timeStampChanged(installPath)) {
+			info = (LibraryInfo)fgFailedInstallPath.get(installPath);
 			if (info == null) {
 				info = generateLibraryInfo(javaHome, javaExecutable);
 				if (info == null) {
@@ -442,18 +445,14 @@ public class StandardVMType extends AbstractVMInstallType {
 	 */
 	public IStatus validateInstallLocation(File javaHome) {
 		IStatus status = null;
-		if (Platform.getOS().equals(Constants.OS_MACOSX)) {
-			status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_Standard_VM_not_supported_on_MacOS__1, null); 
+		File javaExecutable = findJavaExecutable(javaHome);
+		if (javaExecutable == null) {
+			status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_Not_a_JDK_Root__Java_executable_was_not_found_1, null); //			
 		} else {
-			File javaExecutable = findJavaExecutable(javaHome);
-			if (javaExecutable == null) {
-				status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_Not_a_JDK_Root__Java_executable_was_not_found_1, null); //			
+			if (canDetectDefaultSystemLibraries(javaHome, javaExecutable)) {
+				status = new Status(IStatus.OK, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_ok_2, null); 
 			} else {
-				if (canDetectDefaultSystemLibraries(javaHome, javaExecutable)) {
-					status = new Status(IStatus.OK, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_ok_2, null); 
-				} else {
-					status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_Not_a_JDK_root__System_library_was_not_found__1, null); 
-				}
+				status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), 0, LaunchingMessages.StandardVMType_Not_a_JDK_root__System_library_was_not_found__1, null); 
 			}
 		}
 		return status;		
@@ -613,15 +612,17 @@ public class StandardVMType extends AbstractVMInstallType {
 	 */
 	public static URL getDefaultJavadocLocation(String version) {
 		try {
-			if (version.startsWith("1.6")) { //$NON-NLS-1$
+			if (version.startsWith(JavaCore.VERSION_1_7)) {
+				return new URL("http://java.sun.com/javase/7/docs/api/"); //$NON-NLS-1$
+			} else if (version.startsWith(JavaCore.VERSION_1_6)) {
 				return new URL("http://java.sun.com/javase/6/docs/api/"); //$NON-NLS-1$
-			} else if (version.startsWith("1.5")) { //$NON-NLS-1$
+			} else if (version.startsWith(JavaCore.VERSION_1_5)) {
 				return new URL("http://java.sun.com/j2se/1.5.0/docs/api/"); //$NON-NLS-1$
-			} else if (version.startsWith("1.4")) { //$NON-NLS-1$
+			} else if (version.startsWith(JavaCore.VERSION_1_4)) {
 				return new URL("http://java.sun.com/j2se/1.4.2/docs/api/"); //$NON-NLS-1$
-			} else if (version.startsWith("1.3")) { //$NON-NLS-1$
+			} else if (version.startsWith(JavaCore.VERSION_1_3)) {
 				return new URL("http://java.sun.com/j2se/1.3/docs/api/"); //$NON-NLS-1$
-			} else if (version.startsWith("1.2")) { //$NON-NLS-1$
+			} else if (version.startsWith(JavaCore.VERSION_1_2)) {
 				return new URL("http://java.sun.com/products/jdk/1.2/docs/api"); //$NON-NLS-1$
 			}
 		} catch (MalformedURLException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
index 5f93f1f..a71d53f 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/DefaultAccessRuleParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -54,7 +54,8 @@ public class DefaultAccessRuleParticipant implements IAccessRuleParticipant {
 				for (int i = 0; i < packages.length; i++) {
 					packageRules[i] = JavaCore.newAccessRule(new Path(packages[i].replace('.', IPath.SEPARATOR)), IAccessRule.K_ACCESSIBLE);
 				}
-				packageRules[packages.length] = JavaCore.newAccessRule(new Path("**/*"), IAccessRule.K_NON_ACCESSIBLE); //$NON-NLS-1$
+				// add IGNORE_IF_BETTER flag in case another explicit entry allows access (see bug 228488)
+				packageRules[packages.length] = JavaCore.newAccessRule(new Path("**/*"), IAccessRule.K_NON_ACCESSIBLE | IAccessRule.IGNORE_IF_BETTER); //$NON-NLS-1$
 			} else {
 				packageRules = new IAccessRule[0];
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
index 8f7fbcf..5c5ed8e 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
  */
 public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyzerDelegate {
 	
+	private static final String JavaSE_1_7 = "JavaSE-1.7"; //$NON-NLS-1$
 	private static final String JavaSE_1_6 = "JavaSE-1.6"; //$NON-NLS-1$
 	private static final String J2SE_1_5 = "J2SE-1.5"; //$NON-NLS-1$
 	private static final String J2SE_1_4 = "J2SE-1.4"; //$NON-NLS-1$
@@ -68,6 +69,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
 		mappings.put(J2SE_1_4, new String[] {J2SE_1_3, CDC_FOUNDATION_1_1, OSGI_MINIMUM_1_2});
 		mappings.put(J2SE_1_5, new String[] {J2SE_1_4});
 		mappings.put(JavaSE_1_6, new String[] {J2SE_1_5});
+		mappings.put(JavaSE_1_7, new String[] {JavaSE_1_6});
 	}
 	public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
 		ArrayList result = new ArrayList();
@@ -81,7 +83,6 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
 				types = getTypes(eeId);
 			}
 		}
-		boolean strictMatch = true;
 		if (types == null) {
 			String javaVersion = vm2.getJavaVersion();
 			if (javaVersion == null) {
@@ -92,8 +93,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
 					types = getTypes(CDC_FOUNDATION_1_1);
 			} else {
 				if (javaVersion.startsWith("1.7")) { //$NON-NLS-1$
-					types = getTypes(JavaSE_1_6); // there is no 1.7 EE defined yet
-					strictMatch = false; // 1.7 is not a strict match for 1.6
+					types = getTypes(JavaSE_1_7);
 				} else if (javaVersion.startsWith("1.6")) //$NON-NLS-1$
 					types = getTypes(JavaSE_1_6);
 				else if (javaVersion.startsWith("1.5")) //$NON-NLS-1$
@@ -118,7 +118,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
 
 		if (types != null) {
 			for (int i=0; i < types.size(); i++)
-				addEnvironment(result, (String) types.get(i), strictMatch && i ==0);
+				addEnvironment(result, (String) types.get(i), i ==0);
 		}
 		return (CompatibleEnvironment[])result.toArray(new CompatibleEnvironment[result.size()]);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
index 0a94b33..0d7c5c4 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMInstall.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -211,7 +211,7 @@ public abstract class AbstractVMInstall implements IVMInstall, IVMInstall2, IVMI
 			return;
 		}
 		if (url != null && fJavadocLocation != null) {
-			if (url.equals(fJavadocLocation)) {
+			if (url.toExternalForm().equals(fJavadocLocation.toExternalForm())) {
 				// no change
 				return;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
index aec9449..28668da 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/AbstractVMRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,10 +18,13 @@ import java.util.Map;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.model.IProcess;
 import org.eclipse.jdt.internal.launching.LaunchingMessages;
+import org.eclipse.jdt.internal.launching.LaunchingPlugin;
 
 /**
  * Abstract implementation of a VM runner.
@@ -131,6 +134,15 @@ public abstract class AbstractVMRunner implements IVMRunner {
 		if (vmVMArgs == null || vmVMArgs.length == 0) {
 			return launchVMArgs;
 		}
+		// string substitution
+		IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+		for (int i = 0; i < vmVMArgs.length; i++) {
+			try {
+				vmVMArgs[i] = manager.performStringSubstitution(vmVMArgs[i], false);
+			} catch (CoreException e) {
+				LaunchingPlugin.log(e.getStatus());
+			}
+		}
 		String[] allVMArgs = new String[launchVMArgs.length + vmVMArgs.length];
 		System.arraycopy(launchVMArgs, 0, allVMArgs, 0, launchVMArgs.length);
 		System.arraycopy(vmVMArgs, 0, allVMArgs, launchVMArgs.length, vmVMArgs.length);
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
index feed5dd..7aaaef5 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
+++ b/eclipse/plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,10 +31,18 @@ import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
 
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
+import com.ibm.icu.text.MessageFormat;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -47,16 +55,23 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.core.runtime.preferences.BundleDefaultsScope;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+
 import org.eclipse.jdt.core.IClasspathAttribute;
 import org.eclipse.jdt.core.IClasspathContainer;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
+
 import org.eclipse.jdt.internal.launching.CompositeId;
 import org.eclipse.jdt.internal.launching.DefaultEntryResolver;
 import org.eclipse.jdt.internal.launching.DefaultProjectClasspathEntry;
@@ -75,20 +90,14 @@ import org.eclipse.jdt.internal.launching.VMDefinitionsContainer;
 import org.eclipse.jdt.internal.launching.VMListener;
 import org.eclipse.jdt.internal.launching.VariableClasspathEntry;
 import org.eclipse.jdt.internal.launching.environments.EnvironmentsManager;
+
 import org.eclipse.jdt.launching.environments.ExecutionEnvironmentDescription;
 import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
 import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import com.ibm.icu.text.MessageFormat;
 
 /**
  * The central access point for launching support. This class manages
- * the registered VM types contributed through the 
+ * the registered VM types contributed through the
  * <code>"org.eclipse.jdt.launching.vmType"</code> extension point.
  * As well, this class provides VM install change notification,
  * and computes class paths and source lookup paths for launch
@@ -115,7 +124,7 @@ public final class JavaRuntime {
 	/**
 	 * Classpath variable name used for the default JRE's library source root
 	 * (value <code>"JRE_SRCROOT"</code>).
-	 */	
+	 */
 	public static final String JRESRCROOT_VARIABLE= "JRE_SRCROOT"; //$NON-NLS-1$
 	
 	/**
@@ -124,7 +133,7 @@ public final class JavaRuntime {
 	 * 
 	 * @since 2.0
 	 */
-	public static final String EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS= "runtimeClasspathEntryResolvers";	 //$NON-NLS-1$	
+	public static final String EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS= "runtimeClasspathEntryResolvers";	 //$NON-NLS-1$
 	
 	/**
 	 * Simple identifier constant (value <code>"classpathProviders"</code>) for the
@@ -132,7 +141,7 @@ public final class JavaRuntime {
 	 * 
 	 * @since 2.0
 	 */
-	public static final String EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS= "classpathProviders";	 //$NON-NLS-1$		
+	public static final String EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS= "classpathProviders";	 //$NON-NLS-1$
 	
 	/**
 	 * Simple identifier constant (value <code>"executionEnvironments"</code>) for the
@@ -148,7 +157,7 @@ public final class JavaRuntime {
 	 * 
 	 * @since 3.2
 	 */
-	public static final String EXTENSION_POINT_VM_INSTALLS = "vmInstalls";	 //$NON-NLS-1$		
+	public static final String EXTENSION_POINT_VM_INSTALLS = "vmInstalls";	 //$NON-NLS-1$
 		
 	/**
 	 * Classpath container used for a project's JRE
@@ -216,7 +225,7 @@ public final class JavaRuntime {
 	 * 
 	 * @since 3.5
 	 */
-	public static final String PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE = LaunchingPlugin.getUniqueIdentifier() + ".PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE"; //$NON-NLS-1$	
+	public static final String PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE = LaunchingPlugin.getUniqueIdentifier() + ".PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE"; //$NON-NLS-1$
 	
 	/**
 	 * Unique identifier constant (value <code>"org.eclipse.jdt.launching"</code>)
@@ -252,7 +261,7 @@ public final class JavaRuntime {
 	 * <p>
 	 * The factory methods <code>newLibraryPathsAttribute(String[])</code>
 	 * and <code>getLibraryPaths(IClasspathAttribute)</code> should be used to
-	 * encode and decode the attribute value. 
+	 * encode and decode the attribute value.
 	 * </p>
 	 * <p>
 	 * Each string is used to create an <code>IPath</code> using the constructor
@@ -260,7 +269,7 @@ public final class JavaRuntime {
 	 * Variable substitution is performed on the string prior to constructing
 	 * a path from the string.
 	 * If the resulting <code>IPath</code> is a relative path, it is interpreted
-	 * as relative to the workspace location. If the path is absolute, it is 
+	 * as relative to the workspace location. If the path is absolute, it is
 	 * interpreted as an absolute path in the local file system.
 	 * </p>
 	 * @since 3.1
@@ -326,13 +335,13 @@ public final class JavaRuntime {
 	private static void initializeVMTypeExtensions() {
 		IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(LaunchingPlugin.ID_PLUGIN, "vmInstallTypes"); //$NON-NLS-1$
 		if(extensionPoint != null) {
-			IConfigurationElement[] configs = extensionPoint.getConfigurationElements(); 
+			IConfigurationElement[] configs = extensionPoint.getConfigurationElements();
 			MultiStatus status = new MultiStatus(LaunchingPlugin.getUniqueIdentifier(), IStatus.OK, "Exceptions occurred", null);  //$NON-NLS-1$
 			fgVMTypes = new HashSet();
 			for (int i= 0; i < configs.length; i++) {
 				try {
 					fgVMTypes.add(configs[i].createExecutableExtension("class")); //$NON-NLS-1$
-				} 
+				}
 				catch (CoreException e) {status.add(e.getStatus());}
 			}
 			if (!status.isOK()) {
@@ -385,7 +394,7 @@ public final class JavaRuntime {
 	}
 	
 	/**
-	 * Returns the VM install type with the given unique id. 
+	 * Returns the VM install type with the given unique id.
 	 * @param id the VM install type unique id
 	 * @return	The VM install type for the given id, or <code>null</code> if no
 	 * 			VM install type with the given id is registered.
@@ -404,19 +413,19 @@ public final class JavaRuntime {
 	 * Sets a VM as the system-wide default VM, and notifies registered VM install
 	 * change listeners of the change.
 	 * 
-	 * @param vm	The vm to make the default. May be <code>null</code> to clear 
+	 * @param vm	The vm to make the default. May be <code>null</code> to clear
 	 * 				the default.
 	 * @param monitor progress monitor or <code>null</code>
 	 */
 	public static void setDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
 		setDefaultVMInstall(vm, monitor, true);
-	}	
+	}
 	
 	/**
 	 * Sets a VM as the system-wide default VM, and notifies registered VM install
 	 * change listeners of the change.
 	 * 
-	 * @param vm	The vm to make the default. May be <code>null</code> to clear 
+	 * @param vm	The vm to make the default. May be <code>null</code> to clear
 	 * 				the default.
 	 * @param monitor progress monitor or <code>null</code>
 	 * @param savePreference If <code>true</code>, update workbench preferences to reflect
@@ -443,8 +452,8 @@ public final class JavaRuntime {
 	
 	/**
 	 * Sets a VM connector as the system-wide default VM. This setting is persisted when
-	 * saveVMConfiguration is called. 
-	 * @param	connector The connector to make the default. May be <code>null</code> to clear 
+	 * saveVMConfiguration is called.
+	 * @param	connector The connector to make the default. May be <code>null</code> to clear
 	 * 				the default.
 	 * @param monitor The progress monitor to use
 	 * @since 2.0
@@ -453,7 +462,7 @@ public final class JavaRuntime {
 	public static void setDefaultVMConnector(IVMConnector connector, IProgressMonitor monitor) throws CoreException {
 		fgDefaultVMConnectorId= connector.getIdentifier();
 		saveVMConfiguration();
-	}		
+	}
 	
 	/**
 	 * Return the default VM set with <code>setDefaultVM()</code>.
@@ -497,7 +506,7 @@ public final class JavaRuntime {
 			connector = new SocketAttachConnector();
 		}
 		return connector;
-	}	
+	}
 	
 	/**
 	 * Returns the list of registered VM types. VM types are registered via
@@ -508,7 +517,7 @@ public final class JavaRuntime {
 	 */
 	public static IVMInstallType[] getVMInstallTypes() {
 		initializeVMs();
-		return (IVMInstallType[]) fgVMTypes.toArray(new IVMInstallType[fgVMTypes.size()]); 
+		return (IVMInstallType[]) fgVMTypes.toArray(new IVMInstallType[fgVMTypes.size()]);
 	}
 	
 	/**
@@ -527,9 +536,9 @@ public final class JavaRuntime {
 	private static String getDefaultVMConnectorId() {
 		initializeVMs();
 		return fgDefaultVMConnectorId;
-	}	
+	}
 	
-	/** 
+	/**
 	 * Returns a String that uniquely identifies the specified VM across all VM types.
 	 * 
 	 * @param vm the instance of IVMInstallType to be identified
@@ -548,7 +557,7 @@ public final class JavaRuntime {
 	
 	/**
 	 * Return the VM corresponding to the specified composite Id.  The id uniquely
-	 * identifies a VM across all vm types.  
+	 * identifies a VM across all vm types.
 	 * 
 	 * @param idString the composite id that specifies an instance of IVMInstall
 	 * 
@@ -583,7 +592,7 @@ public final class JavaRuntime {
 	
 	/**
 	 * Returns a new runtime classpath entry containing the default classpath
-	 * for the specified Java project. 
+	 * for the specified Java project.
 	 * 
 	 * @param project Java project
 	 * @return runtime classpath entry
@@ -591,7 +600,7 @@ public final class JavaRuntime {
 	 */
 	public static IRuntimeClasspathEntry newDefaultProjectClasspathEntry(IJavaProject project) {
 		return new DefaultProjectClasspathEntry(project);
-	}	
+	}
 	
 	/**
 	 * Returns a new runtime classpath entry for the given project.
@@ -632,7 +641,7 @@ public final class JavaRuntime {
 	 * Returns a new runtime classpath entry for the classpath
 	 * variable with the given path.
 	 * 
-	 * @param path variable path; first segment is the name of the variable; 
+	 * @param path variable path; first segment is the name of the variable;
 	 * 	trailing segments are appended to the resolved variable value
 	 * @return runtime classpath entry
 	 * @since 2.0
@@ -674,7 +683,7 @@ public final class JavaRuntime {
 		RuntimeClasspathEntry entry = new RuntimeClasspathEntry(JavaCore.newContainerEntry(path), classpathProperty);
 		entry.setJavaProject(project);
 		return entry;
-	}	
+	}
 		
 	/**
 	 * Returns a runtime classpath entry constructed from the given memento.
@@ -713,9 +722,9 @@ public final class JavaRuntime {
 			}
 			return entry;
 		} catch (SAXException e) {
-			abort(LaunchingMessages.JavaRuntime_32, e); 
+			abort(LaunchingMessages.JavaRuntime_32, e);
 		} catch (IOException e) {
-			abort(LaunchingMessages.JavaRuntime_32, e); 
+			abort(LaunchingMessages.JavaRuntime_32, e);
 		}
 		return null;
 	}
@@ -731,7 +740,7 @@ public final class JavaRuntime {
 	 */
 	private static IRuntimeClasspathEntry newRuntimeClasspathEntry(IClasspathEntry entry) {
 		return new RuntimeClasspathEntry(entry);
-	}	
+	}
 			
 	/**
 	 * Computes and returns the default unresolved runtime classpath for the
@@ -757,11 +766,11 @@ public final class JavaRuntime {
 								break;
 							case IClasspathContainer.K_DEFAULT_SYSTEM:
 								classpathEntries.add(newRuntimeContainerClasspathEntry(container.getPath(), IRuntimeClasspathEntry.STANDARD_CLASSES, project));
-								break;	
+								break;
 							case IClasspathContainer.K_SYSTEM:
 								classpathEntries.add(newRuntimeContainerClasspathEntry(container.getPath(), IRuntimeClasspathEntry.BOOTSTRAP_CLASSES, project));
 								break;
-						}						
+						}
 					}
 					break;
 				case IClasspathEntry.CPE_VARIABLE:
@@ -804,7 +813,7 @@ public final class JavaRuntime {
 	 */
 	public static IRuntimeClasspathEntry[] resolveSourceLookupPath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException {
 		return getSourceLookupPathProvider(configuration).resolveClasspath(entries, configuration);
-	}	
+	}
 	
 	/**
 	 * Returns the classpath provider for the given launch configuration.
@@ -822,11 +831,11 @@ public final class JavaRuntime {
 		} else {
 			provider = (IRuntimeClasspathProvider)getClasspathProviders().get(providerId);
 			if (provider == null) {
-				abort(MessageFormat.format(LaunchingMessages.JavaRuntime_26, new String[]{providerId}), null); 
+				abort(MessageFormat.format(LaunchingMessages.JavaRuntime_26, new String[]{providerId}), null);
 			}
 		}
 		return provider;
-	}	
+	}
 		
 	/**
 	 * Returns the source lookup path provider for the given launch configuration.
@@ -844,11 +853,11 @@ public final class JavaRuntime {
 		} else {
 			provider = (IRuntimeClasspathProvider)getClasspathProviders().get(providerId);
 			if (provider == null) {
-				abort(MessageFormat.format(LaunchingMessages.JavaRuntime_27, new String[]{providerId}), null); 
+				abort(MessageFormat.format(LaunchingMessages.JavaRuntime_27, new String[]{providerId}), null);
 			}
 		}
 		return provider;
-	}	
+	}
 		
 	/**
 	 * Returns resolved entries for the given entry in the context of the given
@@ -880,7 +889,7 @@ public final class JavaRuntime {
 				if (resource instanceof IProject) {
 					IProject p = (IProject)resource;
 					IJavaProject project = JavaCore.create(p);
-					if (project == null || !p.isOpen() || !project.exists()) { 
+					if (project == null || !p.isOpen() || !project.exists()) {
 						return new IRuntimeClasspathEntry[0];
 					}
 					IRuntimeClasspathEntry[] entries = resolveOutputLocations(project, entry.getClasspathProperty());
@@ -889,34 +898,34 @@ public final class JavaRuntime {
 					}
 				} else {
 					// could not resolve project
-					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_project___0__3, new String[]{entry.getPath().lastSegment()}), null); 
+					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_project___0__3, new String[]{entry.getPath().lastSegment()}), null);
 				}
 				break;
 			case IRuntimeClasspathEntry.VARIABLE:
 				IRuntimeClasspathEntryResolver resolver = getVariableResolver(entry.getVariableName());
 				if (resolver == null) {
 					IRuntimeClasspathEntry[] resolved = resolveVariableEntry(entry, null, configuration);
-					if (resolved != null) { 
+					if (resolved != null) {
 						return resolved;
 					}
 					break;
-				} 
-				return resolver.resolveRuntimeClasspathEntry(entry, configuration);				
+				}
+				return resolver.resolveRuntimeClasspathEntry(entry, configuration);
 			case IRuntimeClasspathEntry.CONTAINER:
 				resolver = getContainerResolver(entry.getVariableName());
 				if (resolver == null) {
 					return computeDefaultContainerEntries(entry, configuration);
-				} 
+				}
 				return resolver.resolveRuntimeClasspathEntry(entry, configuration);
 			case IRuntimeClasspathEntry.ARCHIVE:
 				// verify the archive exists
 				String location = entry.getLocation();
 				if (location == null) {
-					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_archive___0__4, new String[]{entry.getPath().toString()}), null); 
+					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_archive___0__4, new String[]{entry.getPath().toString()}), null);
 				}
 				File file = new File(location);
 				if (!file.exists()) {
-					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_archive___0__4, new String[]{entry.getPath().toString()}), null); 
+					abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Classpath_references_non_existant_archive___0__4, new String[]{entry.getPath().toString()}), null);
 				}
 				break;
 			case IRuntimeClasspathEntry.OTHER:
@@ -957,10 +966,10 @@ public final class JavaRuntime {
 							srcPath = srcPath.append(srcVar.removeFirstSegments(1));
 						}
 						if (srcRootVar != null && !srcRootVar.isEmpty()) {
-							srcRootPath = JavaCore.getClasspathVariable(srcRootVar.segment(0));	
+							srcRootPath = JavaCore.getClasspathVariable(srcRootVar.segment(0));
 							if (srcRootPath != null) {
 								if (srcRootVar.segmentCount() > 1) {
-									srcRootPath = srcRootPath.append(srcRootVar.removeFirstSegments(1));					
+									srcRootPath = srcRootPath.append(srcRootVar.removeFirstSegments(1));
 								}
 							}
 						}
@@ -972,9 +981,9 @@ public final class JavaRuntime {
 				runtimeArchEntry.setClasspathProperty(entry.getClasspathProperty());
 				if (configuration == null) {
 					return resolveRuntimeClasspathEntry(runtimeArchEntry, project);
-				} 
+				}
 				return resolveRuntimeClasspathEntry(runtimeArchEntry, configuration);
-			}		
+			}
 		}
 		return null;
 	}
@@ -1004,12 +1013,12 @@ public final class JavaRuntime {
 			}
 		}
 		if (nonDefault.isEmpty()) {
-			return null; 
-		} 
+			return null;
+		}
 		// add the default location if not already included
 		IPath def = project.getOutputLocation();
 		if (!nonDefault.contains(def)) {
-			nonDefault.add(def);						
+			nonDefault.add(def);
 		}
 		IRuntimeClasspathEntry[] locations = new IRuntimeClasspathEntry[nonDefault.size()];
 		for (int i = 0; i < locations.length; i++) {
@@ -1017,7 +1026,7 @@ public final class JavaRuntime {
 			locations[i] = new RuntimeClasspathEntry(newEntry);
 			locations[i].setClasspathProperty(classpathProperty);
 		}
-		return locations;						
+		return locations;
 	}
 	
 	/**
@@ -1032,7 +1041,7 @@ public final class JavaRuntime {
 	 * If the given entry is a variable entry, and a resolver is not registered,
 	 * the entry itself is returned. If the given entry is a container, and a
 	 * resolver is not registered, resolved runtime classpath entries are calculated
-	 * from the associated container classpath entries, in the context of the 
+	 * from the associated container classpath entries, in the context of the
 	 * given project.
 	 * </p>
 	 * @param entry runtime classpath entry
@@ -1059,31 +1068,31 @@ public final class JavaRuntime {
 						return new IRuntimeClasspathEntry[0];
 					}
 				}
-				break;			
+				break;
 			case IRuntimeClasspathEntry.VARIABLE:
 				IRuntimeClasspathEntryResolver resolver = getVariableResolver(entry.getVariableName());
 				if (resolver == null) {
 					IRuntimeClasspathEntry[] resolved = resolveVariableEntry(entry, project, null);
-					if (resolved != null) { 
+					if (resolved != null) {
 						return resolved;
 					}
 					break;
-				} 
-				return resolver.resolveRuntimeClasspathEntry(entry, project);				
+				}
+				return resolver.resolveRuntimeClasspathEntry(entry, project);
 			case IRuntimeClasspathEntry.CONTAINER:
 				resolver = getContainerResolver(entry.getVariableName());
 				if (resolver == null) {
 					return computeDefaultContainerEntries(entry, project);
-				} 
+				}
 				return resolver.resolveRuntimeClasspathEntry(entry, project);
 			case IRuntimeClasspathEntry.OTHER:
 				resolver = getContributedResolver(((IRuntimeClasspathEntry2)entry).getTypeId());
-				return resolver.resolveRuntimeClasspathEntry(entry, project);				
+				return resolver.resolveRuntimeClasspathEntry(entry, project);
 			default:
 				break;
 		}
 		return new IRuntimeClasspathEntry[] {entry};
-	}	
+	}
 		
 	/**
 	 * Performs default resolution for a container entry.
@@ -1105,13 +1114,13 @@ public final class JavaRuntime {
 		if (project == null || entry == null) {
 			// cannot resolve without entry or project context
 			return new IRuntimeClasspathEntry[0];
-		} 
+		}
 		IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
 		if (container == null) {
-			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Could_not_resolve_classpath_container___0__1, new String[]{entry.getPath().toString()}), null); 
+			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Could_not_resolve_classpath_container___0__1, new String[]{entry.getPath().toString()}), null);
 			// execution will not reach here - exception will be thrown
 			return null;
-		} 
+		}
 		IClasspathEntry[] cpes = container.getClasspathEntries();
 		int property = -1;
 		switch (container.getKind()) {
@@ -1120,11 +1129,11 @@ public final class JavaRuntime {
 				break;
 			case IClasspathContainer.K_DEFAULT_SYSTEM:
 				property = IRuntimeClasspathEntry.STANDARD_CLASSES;
-				break;	
+				break;
 			case IClasspathContainer.K_SYSTEM:
 				property = IRuntimeClasspathEntry.BOOTSTRAP_CLASSES;
 				break;
-		}			
+		}
 		List resolved = new ArrayList(cpes.length);
 		List projects = (List) fgProjects.get();
 		Integer count = (Integer) fgEntryCount.get();
@@ -1203,7 +1212,7 @@ public final class JavaRuntime {
 	 */
 	public static IRuntimeClasspathEntry[] resolveRuntimeClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException {
 		return getClasspathProvider(configuration).resolveClasspath(entries, configuration);
-	}	
+	}
 	
 	/**
 	 * Return the <code>IJavaProject</code> referenced in the specified configuration or
@@ -1216,13 +1225,13 @@ public final class JavaRuntime {
 		String projectName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
 		if ((projectName == null) || (projectName.trim().length() < 1)) {
 			return null;
-		}			
+		}
 		IJavaProject javaProject = getJavaModel().getJavaProject(projectName);
 		if (javaProject != null && javaProject.getProject().exists() && !javaProject.getProject().isOpen()) {
-			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_28, new String[] {configuration.getName(), projectName}), IJavaLaunchConfigurationConstants.ERR_PROJECT_CLOSED, null); 
+			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_28, new String[] {configuration.getName(), projectName}), IJavaLaunchConfigurationConstants.ERR_PROJECT_CLOSED, null);
 		}
 		if ((javaProject == null) || !javaProject.exists()) {
-			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Launch_configuration__0__references_non_existing_project__1___1, new String[] {configuration.getName(), projectName}), IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT, null); 
+			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Launch_configuration__0__references_non_existing_project__1___1, new String[] {configuration.getName(), projectName}), IJavaLaunchConfigurationConstants.ERR_NOT_A_JAVA_PROJECT, null);
 		}
 		return javaProject;
 	}
@@ -1288,7 +1297,7 @@ public final class JavaRuntime {
 	}
 	/**
 	 * Returns the VM of the given type with the specified name.
-	 *  
+	 * 
 	 * @param type vm type identifier
 	 * @param name vm name
 	 * @return vm install
@@ -1299,20 +1308,20 @@ public final class JavaRuntime {
 		IVMInstallType vt = getVMInstallType(type);
 		if (vt == null) {
 			// error type does not exist
-			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Specified_VM_install_type_does_not_exist___0__2, new String[] {type}), null); 
+			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Specified_VM_install_type_does_not_exist___0__2, new String[] {type}), null);
 		}
 		IVMInstall vm = null;
 		// look for a name
 		if (name == null) {
 			// error - type specified without a specific install (could be an old config that specified a VM ID)
-			// log the error, but choose the default VM.  
+			// log the error, but choose the default VM.
 			LaunchingPlugin.log(new Status(IStatus.WARNING, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_UNSPECIFIED_VM_INSTALL, MessageFormat.format("VM not fully specified in launch configuration {0} - missing VM name. Reverting to default VM.", new String[] {configuration.getName()}), null));  //$NON-NLS-1$
 			return getDefaultVMInstall();
-		} 
+		}
 		vm = vt.findVMInstallByName(name);
 		if (vm == null) {
 			// error - install not found
-			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Specified_VM_install_not_found__type__0___name__1__2, new String[] {vt.getName(), name}), null);					 
+			abort(MessageFormat.format(LaunchingMessages.JavaRuntime_Specified_VM_install_not_found__type__0___name__1__2, new String[] {vt.getName(), name}), null);
 		} else {
 			return vm;
 		}
@@ -1329,7 +1338,7 @@ public final class JavaRuntime {
 	 */
 	private static void abort(String message, Throwable exception) throws CoreException {
 		abort(message, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, exception);
-	}	
+	}
 		
 		
 	/**
@@ -1343,10 +1352,10 @@ public final class JavaRuntime {
 	 */
 	private static void abort(String message, int code, Throwable exception) throws CoreException {
 		throw new CoreException(new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), code, message, exception));
-	}	
+	}
 		
 	/**
-	 * Computes the default application classpath entries for the given 
+	 * Computes the default application classpath entries for the given
 	 * project.
 	 * 
 	 * @param	jproject The project to compute the classpath for
@@ -1365,13 +1374,13 @@ public final class JavaRuntime {
 				for (int j = 0; j < entries.length; j++) {
 					String location = entries[j].getLocation();
 					if (location != null) {
-						resolved.add(location); 
+						resolved.add(location);
 					}
 				}
 			}
 		}
 		return (String[])resolved.toArray(new String[resolved.size()]);
-	}	
+	}
 		
 	/**
 	 * Saves the VM configuration information to the preferences. This includes
@@ -1390,7 +1399,7 @@ public final class JavaRuntime {
 		}
 		String xml = getVMsAsXML();
 		getPreferences().setValue(PREF_VM_XML, xml);
-		savePreferences(); 
+		savePreferences();
 	}
 	
 	/**
@@ -1399,9 +1408,9 @@ public final class JavaRuntime {
 	 * @throws CoreException
 	 */
 	private static String getVMsAsXML() throws CoreException {
-		VMDefinitionsContainer container = new VMDefinitionsContainer();	
+		VMDefinitionsContainer container = new VMDefinitionsContainer();
 		container.setDefaultVMInstallCompositeID(getDefaultVMId());
-		container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId());	
+		container.setDefaultVMInstallConnectorTypeID(getDefaultVMConnectorId());
 		IVMInstallType[] vmTypes = getVMInstallTypes();
 		IVMInstall[] vms = null;
 		for (int i = 0; i < vmTypes.length; ++i) {
@@ -1433,19 +1442,19 @@ public final class JavaRuntime {
 				return false;
 			} catch (IOException ioe) {
 				LaunchingPlugin.log(ioe);
-			}			
-		} else {			
+			}
+		} else {
 			// Otherwise, look for the old file that previously held the VM definitions
 			IPath stateLocation= LaunchingPlugin.getDefault().getStateLocation();
 			IPath stateFile= stateLocation.append("vmConfiguration.xml"); //$NON-NLS-1$
 			File file = new File(stateFile.toOSString());
 			
-			if (file.exists()) {        
+			if (file.exists()) {
 				// If file exists, load VM definitions from it into memory and write the definitions to
 				// the preference store WITHOUT triggering any processing of the new value
 				InputStream fileInputStream = new BufferedInputStream(new FileInputStream(file));
-				VMDefinitionsContainer.parseXMLIntoContainer(fileInputStream, vmDefs);			
-			}		
+				VMDefinitionsContainer.parseXMLIntoContainer(fileInputStream, vmDefs);
+			}
 		}
 		return true;
 	}
@@ -1488,7 +1497,7 @@ public final class JavaRuntime {
 						if (home == null) {
 							abort(MessageFormat.format("vmInstall {0} contributed by {1} missing required attribute home", //$NON-NLS-1$
 									new String[]{id, element.getContributor().getName()}), null);
-						}		
+						}
 						String javadoc = element.getAttribute("javadocURL"); //$NON-NLS-1$
 						String vmArgs = element.getAttribute("vmArgs"); //$NON-NLS-1$
 						VMStandin standin = null;
@@ -1588,7 +1597,7 @@ public final class JavaRuntime {
      * Performs string substitution on the given expression.
      * 
      * @param expression
-     * @return expression after string substitution 
+     * @return expression after string substitution
      * @throws CoreException
      * @since 3.2
      */
@@ -1622,7 +1631,7 @@ public final class JavaRuntime {
 		URL[] javadocLocations;
 		LibraryLocation[] locations= vm.getLibraryLocations();
 		if (locations == null) {
-            URL defJavaDocLocation = vm.getJavadocLocation(); 
+            URL defJavaDocLocation = vm.getJavadocLocation();
 			File installLocation = vm.getInstallLocation();
 			if (installLocation == null) {
 				return new LibraryLocation[0];
@@ -1656,7 +1665,7 @@ public final class JavaRuntime {
 			sourcePaths = new IPath[locations.length];
 			sourceRootPaths = new IPath[locations.length];
 			javadocLocations= new URL[locations.length];
-			for (int i = 0; i < locations.length; i++) {			
+			for (int i = 0; i < locations.length; i++) {
 				libraryPaths[i]= locations[i].getSystemLibraryPath();
 				sourcePaths[i]= locations[i].getSystemLibrarySourcePath();
 				sourceRootPaths[i]= locations[i].getPackageRootPath();
@@ -1690,14 +1699,14 @@ public final class JavaRuntime {
 					}
 					if (vmFile.isFile()){
 						// Make sure the VM id is unique
-						long unique = System.currentTimeMillis();	
+						long unique = System.currentTimeMillis();
 						while (vmTypes[i].findVMInstall(String.valueOf(unique)) != null) {
 							unique++;
 						}
 
 						// Create a standin for the detected VM and add it to the result collector
 						String vmID = String.valueOf(unique);
-						try{ 
+						try{
 							return createVMFromDefinitionFile(vmFile, "", vmID); //$NON-NLS-1$
 						} catch (CoreException e){
 							// The file was not a valid ee file, continue the detection process
@@ -1713,7 +1722,7 @@ public final class JavaRuntime {
 			if (detectedLocation != null) {
 				
 				// Make sure the VM id is unique
-				long unique = System.currentTimeMillis();	
+				long unique = System.currentTimeMillis();
 				IVMInstallType vmType = vmTypes[i];
 				while (vmType.findVMInstall(String.valueOf(unique)) != null) {
 					unique++;
@@ -1727,7 +1736,7 @@ public final class JavaRuntime {
 				if (vmType instanceof AbstractVMInstallType) {
 				    AbstractVMInstallType abs = (AbstractVMInstallType)vmType;
 				    URL url = abs.getDefaultJavadocLocation(detectedLocation);
-				    detectedVMStandin.setJavadocLocation(url);	
+				    detectedVMStandin.setJavadocLocation(url);
 				    String arguments = abs.getDefaultVMArguments(detectedLocation);
 					if (arguments != null) {
 						detectedVMStandin.setVMArgs(arguments);
@@ -1740,17 +1749,28 @@ public final class JavaRuntime {
 	}
 	
 	/**
-	 * Returns whether the specified option is the same in both option maps.
+	 * Returns whether the specified option is the same in the given
+	 * map and preference store.
+	 * 
+	 * <p>
+	 * Notes:
+	 * <ul>
+	 * <li>Returns <code>false</code> if the option is only contained in one map</li>
+	 * <li>Returns <code>true</code> if the option is not contained in either map</li>
+	 * </ul> 
+	 * </p>
 	 * 
 	 * @param optionName name of option to test
-	 * @param defaultOptions map of default options
-	 * @param options map of other options
+	 * @param options map of options
+	 * @param prefStore preferences node
 	 * @return whether the options are the same in both maps
 	 */
-	private static boolean equals(String optionName, Map defaultOptions, Map options) {
-		if (defaultOptions.containsKey(optionName)) {
+	private static boolean equals(String optionName, Map options, org.osgi.service.prefs.Preferences prefStore) {
+		String dummy= new String();
+		String prefValue= prefStore.get(optionName, dummy);
+		if (prefValue != null && prefValue != dummy) {
 			return options.containsKey(optionName) &&
-				equals(defaultOptions.get(optionName), options.get(optionName));
+				equals(prefValue, options.get(optionName));
 		} else {
 			return !options.containsKey(optionName);
 		}
@@ -1806,21 +1826,21 @@ public final class JavaRuntime {
 	 */
 	public static IClasspathEntry getDefaultJREContainerEntry() {
 		return JavaCore.newContainerEntry(newDefaultJREContainerPath());
-	}	
+	}
 	
 	/**
-	 * Returns a path for the JRE classpath container identifying the 
+	 * Returns a path for the JRE classpath container identifying the
 	 * default VM install.
 	 * 
 	 * @return classpath container path
 	 * @since 3.2
-	 */	
+	 */
 	public static IPath newDefaultJREContainerPath() {
 		return new Path(JRE_CONTAINER);
 	}
 	
 	/**
-	 * Returns a path for the JRE classpath container identifying the 
+	 * Returns a path for the JRE classpath container identifying the
 	 * specified VM install by type and name.
 	 * 
 	 * @param vm vm install
@@ -1832,23 +1852,23 @@ public final class JavaRuntime {
 	}
 	
 	/**
-	 * Returns a path for the JRE classpath container identifying the 
+	 * Returns a path for the JRE classpath container identifying the
 	 * specified VM install by type and name.
 	 * 
 	 * @param typeId vm install type identifier
 	 * @param name vm install name
 	 * @return classpath container path
 	 * @since 3.2
-	 */	
+	 */
 	public static IPath newJREContainerPath(String typeId, String name) {
 		IPath path = newDefaultJREContainerPath();
 		path = path.append(typeId);
 		path = path.append(name);
-		return path;		
+		return path;
 	}
 	
 	/**
-	 * Returns a path for the JRE classpath container identifying the 
+	 * Returns a path for the JRE classpath container identifying the
 	 * specified execution environment.
 	 * 
 	 * @param environment execution environment
@@ -1856,16 +1876,16 @@ public final class JavaRuntime {
 	 * @since 3.2
 	 */
 	public static IPath newJREContainerPath(IExecutionEnvironment environment) {
-		IPath path = newDefaultJREContainerPath(); 
+		IPath path = newDefaultJREContainerPath();
 		path = path.append(StandardVMType.ID_STANDARD_VM_TYPE);
 		path = path.append(JREContainerInitializer.encodeEnvironmentId(environment.getId()));
 		return path;
-	}	
+	}
 	
 	/**
 	 * Returns the JRE referenced by the specified JRE classpath container
 	 * path or <code>null</code> if none.
-	 *  
+	 * 
 	 * @param jreContainerPath
 	 * @return JRE referenced by the specified JRE classpath container
 	 *  path or <code>null</code>
@@ -1908,7 +1928,7 @@ public final class JavaRuntime {
 	/**
 	 * Returns the execution environment identifier in the following JRE
 	 * classpath container path, or <code>null</code> if none.
-	 *  
+	 * 
 	 * @param jreContainerPath classpath container path
 	 * @return execution environment identifier or <code>null</code>
 	 * @since 3.2
@@ -1992,7 +2012,7 @@ public final class JavaRuntime {
 						if (resolver.isVMInstallReference(entry)) {
 							return newRuntimeClasspathEntry(entry);
 						}
-					}					
+					}
 					break;
 				case IClasspathEntry.CPE_CONTAINER:
 					resolver = getContainerResolver(entry.getPath().segment(0));
@@ -2016,7 +2036,7 @@ public final class JavaRuntime {
 			
 		}
 		return null;
-	}	
+	}
 	
 	/**
 	 * Returns whether the given runtime classpath entry refers to a vm install.
@@ -2034,7 +2054,7 @@ public final class JavaRuntime {
 					if (resolver != null) {
 						return resolver.isVMInstallReference(classpathEntry);
 					}
-					break;					
+					break;
 				case IClasspathEntry.CPE_CONTAINER:
 					resolver = getContainerResolver(classpathEntry.getPath().segment(0));
 					if (resolver != null) {
@@ -2066,7 +2086,7 @@ public final class JavaRuntime {
 	 */
 	public static IVMConnector[] getVMConnectors() {
 		return LaunchingPlugin.getDefault().getVMConnectors();
-	}	
+	}
 	
 	/**
 	 * Returns the preference store for the launching plug-in.
@@ -2109,7 +2129,7 @@ public final class JavaRuntime {
 	public static void addContainerResolver(IRuntimeClasspathEntryResolver resolver, String containerIdentifier) {
 		Map map = getContainerResolvers();
 		map.put(containerIdentifier, resolver);
-	}	
+	}
 	
 	/**
 	 * Returns all registered variable resolvers.
@@ -2139,7 +2159,7 @@ public final class JavaRuntime {
 			initializeResolvers();
 		}
 		return fgRuntimeClasspathEntryResolvers;
-	}	
+	}
 
 	/**
 	 * Initializes the listing of runtime classpath entry resolvers
@@ -2164,7 +2184,7 @@ public final class JavaRuntime {
 			if (entryId != null) {
 				fgRuntimeClasspathEntryResolvers.put(entryId, res);
 			}
-		}		
+		}
 	}
 
 	/**
@@ -2187,7 +2207,7 @@ public final class JavaRuntime {
 		for (int i = 0; i < extensions.length; i++) {
 			RuntimeClasspathProvider res = new RuntimeClasspathProvider(extensions[i]);
 			fgPathProviders.put(res.getIdentifier(), res);
-		}		
+		}
 	}
 		
 	/**
@@ -2209,7 +2229,7 @@ public final class JavaRuntime {
 	 * @param containerId the container to determine the resolver for
 	 * @return the resolver registered for the given container id, or
 	 * <code>null</code> if none
-	 */	
+	 */
 	private static IRuntimeClasspathEntryResolver2 getContainerResolver(String containerId) {
 		return (IRuntimeClasspathEntryResolver2)getContainerResolvers().get(containerId);
 	}
@@ -2220,14 +2240,14 @@ public final class JavaRuntime {
 	 * 
 	 * @param typeId the id of the contributed classpath entry
 	 * @return the resolver registered for the given classpath entry
-	 */	
+	 */
 	private static IRuntimeClasspathEntryResolver getContributedResolver(String typeId) {
 		IRuntimeClasspathEntryResolver resolver = (IRuntimeClasspathEntryResolver)getEntryResolvers().get(typeId);
 		if (resolver == null) {
 			return new DefaultEntryResolver();
 		}
 		return resolver;
-	}	
+	}
 	
 	/**
 	 * Adds the given listener to the list of registered VM install changed
@@ -2249,7 +2269,7 @@ public final class JavaRuntime {
 	 */
 	public static void removeVMInstallChangedListener(IVMInstallChangedListener listener) {
 		fgVMListeners.remove(listener);
-	}	
+	}
 	
 	/**
 	 * Notifies registered listeners that the default VM has changed
@@ -2275,7 +2295,7 @@ public final class JavaRuntime {
 		for (int i = 0; i < listeners.length; i++) {
 			IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
 			listener.vmChanged(event);
-		}		
+		}
 	}
 	
 	/**
@@ -2292,7 +2312,7 @@ public final class JavaRuntime {
 				listener.vmAdded(vm);
 			}
 		}
-	}	
+	}
 	
 	/**
 	 * Notifies all VM install changed listeners of the VM removal
@@ -2305,8 +2325,8 @@ public final class JavaRuntime {
 		for (int i = 0; i < listeners.length; i++) {
 			IVMInstallChangedListener listener = (IVMInstallChangedListener)listeners[i];
 			listener.vmRemoved(vm);
-		}		
-	}		
+		}
+	}
 	
 	/**
 	 * Return the String representation of the default output directory of the
@@ -2331,10 +2351,10 @@ public final class JavaRuntime {
 							return path.makeRelative().toString();
 						}
 					}
-				} 
+				}
 			}
 		} catch (CoreException ce) {
-		} 
+		}
 		return null;
 	}
 	
@@ -2401,7 +2421,7 @@ public final class JavaRuntime {
 	 * projects.
 	 * 
 	 * @param project project to gather entries for
-	 * @param requiredProjects whether to consider required projects 
+	 * @param requiredProjects whether to consider required projects
 	 * @param visited projects already considered
 	 * @param entries collection to add library entries to
 	 * @throws CoreException if unable to gather classpath entries
@@ -2434,7 +2454,7 @@ public final class JavaRuntime {
 	 * Adds all java library path extra classpath entry values to the given entries collection
 	 * specified on the given project's classpath, and returns a collection of required
 	 * projects, or <code>null</code>.
-	 *  
+	 * 
 	 * @param project project being processed
 	 * @param collectRequired whether to collect required projects
 	 * @param classpathEntries the project's raw classpath
@@ -2517,11 +2537,11 @@ public final class JavaRuntime {
 	 * for an associated {@link IClasspathEntry}, or <code>null</code> if the
 	 * given attribute is not a <code>CLASSPATH_ATTR_LIBRARY_PATH_ENTRY</code>.
 	 * Each string is used to create an <code>IPath</code> using the constructor
-	 * <code>Path(String)</code>, and may contain <code>IStringVariable</code>'s. 
+	 * <code>Path(String)</code>, and may contain <code>IStringVariable</code>'s.
 	 * <p>
 	 * The factory methods <code>newLibraryPathsAttribute(String[])</code>
 	 * and <code>getLibraryPaths(IClasspathAttribute)</code> should be used to
-	 * encode and decode the attribute value. 
+	 * encode and decode the attribute value.
 	 * </p>
 	 * @param attribute a <code>CLASSPATH_ATTR_LIBRARY_PATH_ENTRY</code> classpath attribute
 	 * @return an array of strings referencing shared libraries that should
@@ -2531,7 +2551,7 @@ public final class JavaRuntime {
 	 * Each string is used to create an <code>IPath</code> using the constructor
 	 * <code>Path(String)</code>, and may contain <code>IStringVariable</code>'s.
 	 * @since 3.1
-	 */	
+	 */
 	public static String[] getLibraryPaths(IClasspathAttribute attribute) {
 		if (CLASSPATH_ATTR_LIBRARY_PATH_ENTRY.equals(attribute.getName())) {
 			String value = attribute.getValue();
@@ -2641,7 +2661,7 @@ public final class JavaRuntime {
 						while (vmListIterator.hasNext()) {
 							VMStandin vmStandin = (VMStandin) vmListIterator.next();
 							vmStandin.convertToRealVM();
-						}						
+						}
 						
 
 					} catch (IOException e) {
@@ -2696,18 +2716,20 @@ public final class JavaRuntime {
             	} else if (javaVersion.startsWith(JavaCore.VERSION_1_6)) {
             		compliance = JavaCore.VERSION_1_6;
             	} else if (javaVersion.startsWith(JavaCore.VERSION_1_7)) {
-            		// set compliance to 1.6 when 1.7 is detected - @see bug 209833
+            		// since 1.7 compliance options are not yet supported, default to 1.6 compliance when running on 1.7
             		compliance = JavaCore.VERSION_1_6;
             	}
             	if (compliance != null) {
-	                Hashtable defaultOptions = JavaCore.getDefaultOptions();
-	                Hashtable options = JavaCore.getOptions();
+	                Hashtable options= JavaCore.getOptions();
+
+	                org.osgi.service.prefs.Preferences bundleDefaults = new BundleDefaultsScope().getNode(JavaCore.PLUGIN_ID);
+
 	                boolean isDefault =
-	                	equals(JavaCore.COMPILER_COMPLIANCE, defaultOptions, options) &&
-	                	equals(JavaCore.COMPILER_SOURCE, defaultOptions, options) &&
-	                	equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, defaultOptions, options) &&
-	                	equals(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, defaultOptions, options) &&
-	                	equals(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, defaultOptions, options);
+	                	equals(JavaCore.COMPILER_COMPLIANCE, options, bundleDefaults) &&
+	                	equals(JavaCore.COMPILER_SOURCE, options, bundleDefaults) &&
+	                	equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, options, bundleDefaults) &&
+	                	equals(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, options, bundleDefaults) &&
+	                	equals(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, options, bundleDefaults);
 	                // only update the compliance settings if they are default settings, otherwise the
 	                // settings have already been modified by a tool or user
 	                if (isDefault) {
@@ -2716,18 +2738,18 @@ public final class JavaRuntime {
 	                }
             	}
             }
-        }		
+        }
 	}
 	
 	/**
-	 * Creates a new VM based on the attributes specified in the given execution 
+	 * Creates a new VM based on the attributes specified in the given execution
 	 * environment description file. The format of the file is defined by
 	 * <code>http://wiki.eclipse.org/Execution_Environment_Descriptions</code>.
 	 * 
 	 * @param eeFile VM definition file
 	 * @param name name for the VM, or <code>null</code> if a default name should be assigned
 	 * @param id id to assign to the new VM
-	 * @return VM standin 
+	 * @return VM standin
 	 * @exception CoreException if unable to create a VM from the given definition file
 	 * @since 3.4
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/plugin.properties b/eclipse/plugins/org.eclipse.jdt.launching/plugin.properties
index eb204a6..5836465 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.launching/plugin.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2000, 2008 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
@@ -53,5 +53,6 @@ environment.description.6 = Java 2 Platform, Standard Edition 5.0
 environment.description.7 = CDC 1.0, Foundation 1.0
 environment.description.8 = CDC 1.1, Foundation 1.1
 environment.description.9 = Java Platform, Standard Edition 6.0
+environment.description.11 = Java Platform, Standard Edition 7.0
 
 classpathVariableInitializer.deprecated = Use the JRE System Library instead
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/plugin.xml b/eclipse/plugins/org.eclipse.jdt.launching/plugin.xml
index 6dfe687..dc0b959 100644
--- a/eclipse/plugins/org.eclipse.jdt.launching/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.launching/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -270,6 +271,10 @@
             description="%environment.description.9"
             id="JavaSE-1.6"
             ruleParticipant="org.eclipse.jdt.internal.launching.environments.DefaultAccessRuleParticipant"/>
+      <environment
+            description="%environment.description.11"
+            id="JavaSE-1.7"
+            ruleParticipant="org.eclipse.jdt.internal.launching.environments.DefaultAccessRuleParticipant"/>            
       <analyzer
             class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"
             id="org.eclipse.jdt.launching.eeAnalyzer"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.launching/scripts/customBuild.xml b/eclipse/plugins/org.eclipse.jdt.launching/scripts/customBuild.xml
deleted file mode 100644
index 15882bf..0000000
--- a/eclipse/plugins/org.eclipse.jdt.launching/scripts/customBuild.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
-         IBM Corporation - initial API and implementation
- -->
-
-<project name="Custom Build Launching Support JAR">
-	
-	<property name="tempSource" value="${bundleJavacSource}"/>
-	<property name="tempTarget" value="${bundleJavacTarget}"/>
-
-    <target name="pre.lib/launchingsupport.jar" description="Set source and target levels to 1.1">
-        <property name="bundleJavacSource" value="1.1"/>
-    	<property name="bundleJavacTarget" value="1.1"/>
-    </target>
-	
-    <target name="post.lib/launchingsupport.jar" description="Restore source and target levels">
-    	<property name="bundleJavacSource" value="${tempSource}"/>
-    	<property name="bundleJavacTarget" value="${tempTarget}"/>
-    </target>	
-
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/.classpath b/eclipse/plugins/org.eclipse.jdt.ui/.classpath
index d714eb2..bcbef41 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/.classpath
+++ b/eclipse/plugins/org.eclipse.jdt.ui/.classpath
@@ -5,6 +5,7 @@
 	<classpathentry kind="src" path="core refactoring"/>
 	<classpathentry kind="src" path="core extension"/>
 	<classpathentry kind="src" output="bin-jar-in-jar-loader" path="jar in jar loader"/>
+	<classpathentry kind="src" path="internal compatibility"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/.externalToolBuilders/Build Jar in Jar Loader.launch b/eclipse/plugins/org.eclipse.jdt.ui/.externalToolBuilders/Build Jar in Jar Loader.launch
index a2ed064..4298d47 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/.externalToolBuilders/Build Jar in Jar Loader.launch	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/.externalToolBuilders/Build Jar in Jar Loader.launch	
@@ -1,9 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
 <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="dummy_clean,"/>
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.jdt.ui" type="4"/>
</launchConfigurationWorkingSet>}"/>
+<booleanAttribute key="org.eclipse.debug.core.ATTR_REFRESH_RECURSIVE" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/org.eclipse.jdt.ui" type="4"/>
</resources>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 <listEntry value="/org.eclipse.jdt.ui/scripts/build_jar-in-jar-loader.xml"/>
 </listAttribute>
@@ -17,7 +18,7 @@
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.ui"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet editPageId="org.eclipse.ui.resourceWorkingSetPage" factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.jdt.ui/jar in jar loader" type="2"/>
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.jdt.ui/scripts/buildExtraJAR.xml" type="1"/>
</launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/org.eclipse.jdt.ui/jar in jar loader" type="2"/>
<item path="/org.eclipse.jdt.ui/scripts/buildExtraJAR.xml" type="1"/>
</resources>}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.jdt.ui/scripts/build_jar-in-jar-loader.xml}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/.settings/.api_filters b/eclipse/plugins/org.eclipse.jdt.ui/.settings/.api_filters
index 3d3a527..50aeb84 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.jdt.ui/.settings/.api_filters
@@ -16,6 +16,14 @@
             </message_arguments>
         </filter>
     </resource>
+    <resource path="internal compatibility/org/eclipse/jdt/internal/corext/SourceRange.java" type="org.eclipse.jdt.internal.corext.SourceRange">
+        <filter id="574619656">
+            <message_arguments>
+                <message_argument value="ISourceRange"/>
+                <message_argument value="SourceRange"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullPushCheckboxTableViewer.java" type="org.eclipse.jdt.internal.ui.refactoring.PullPushCheckboxTableViewer">
         <filter id="571473929">
             <message_arguments>
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/JavadocHoverStyleSheet.css b/eclipse/plugins/org.eclipse.jdt.ui/JavadocHoverStyleSheet.css
index 549f9a1..9cea29c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/JavadocHoverStyleSheet.css
+++ b/eclipse/plugins/org.eclipse.jdt.ui/JavadocHoverStyleSheet.css
@@ -12,10 +12,10 @@ h4           { margin-top: 2em; margin-bottom: 0.3em; }
 h5           { margin-top: 0px; margin-bottom: 0px; }
 p            { margin-top: 1em; margin-bottom: 1em; }
 pre          { margin-left: 0.6em; }
-ul	         { margin-top: 0px; margin-bottom: 1em; }
+ul	         { margin-top: 0px; margin-bottom: 1em; margin-left: 1em; padding-left: 1em;}
 li	         { margin-top: 0px; margin-bottom: 0px; } 
 li p	     { margin-top: 0px; margin-bottom: 0px; } 
-ol	         { margin-top: 0px; margin-bottom: 1em; }
+ol	         { margin-top: 0px; margin-bottom: 1em; margin-left: 1em; padding-left: 1em; }
 dl	         { margin-top: 0px; margin-bottom: 1em; }
 dt	         { margin-top: 0px; margin-bottom: 0px; font-weight: bold; }
 dd	         { margin-top: 0px; margin-bottom: 0px; }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/JavadocViewStyleSheet.css b/eclipse/plugins/org.eclipse.jdt.ui/JavadocViewStyleSheet.css
index 00a9aff..fdee9a8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/JavadocViewStyleSheet.css
+++ b/eclipse/plugins/org.eclipse.jdt.ui/JavadocViewStyleSheet.css
@@ -15,10 +15,10 @@ h4           { margin-top: 2em; margin-bottom: 0.3em; }
 h5           { margin-top: 0px; margin-bottom: 0px; }
 p            { margin-top: 1em; margin-bottom: 1em; }
 pre          { margin-left: 0.6em; }
-ul	         { margin-top: 0px; margin-bottom: 1em; }
+ul	         { margin-top: 0px; margin-bottom: 1em; margin-left: 1em; padding-left: 1em; }
 li	         { margin-top: 0px; margin-bottom: 0px; } 
 li p	     { margin-top: 0px; margin-bottom: 0px; } 
-ol	         { margin-top: 0px; margin-bottom: 1em; }
+ol	         { margin-top: 0px; margin-bottom: 1em; margin-left: 1em; padding-left: 1em; }
 dl	         { margin-top: 0px; margin-bottom: 1em; }
 dt	         { margin-top: 0px; margin-bottom: 0px; font-weight: bold; }
 dd	         { margin-top: 0px; margin-bottom: 0px; }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
index 361575c..b0fba75 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.ui; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Activator: org.eclipse.jdt.internal.ui.JavaPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
@@ -115,7 +115,7 @@ Require-Bundle:
  org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.2.200,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.search;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.5.0,4.0.0)",
@@ -130,12 +130,12 @@ Require-Bundle:
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.views;bundle-version="[3.3.100,4.0.0)",
  org.eclipse.ui.editors;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.100,4.0.0)",
+ org.eclipse.ltk.ui.refactoring;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ui.navigator;bundle-version="[3.3.200,4.0.0)",
  org.eclipse.ui.navigator.resources;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.jdt.core.manipulation;bundle-version="[1.3.0,2.0.0)",
- com.ibm.icu
+ com.ibm.icu;bundle-version="3.4.4"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/build.properties b/eclipse/plugins/org.eclipse.jdt.ui/build.properties
index 8e35cd4..dd8d112 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -26,7 +26,8 @@ src.includes = about.html,\
                dictionaries/,\
                about_files/
 source.. = core refactoring/,\
-                 ui/,\
-                 ui refactoring/,\
-                 core extension/
+               ui/,\
+               ui refactoring/,\
+               core extension/,\
+               internal compatibility/
 jars.compile.order = .
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.java
index a24308f..d884318 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,9 +29,6 @@ public final class CorextMessages extends NLS {
 	public static String JavaDocLocations_error_readXML;
 	public static String JavaDocLocations_migratejob_name;
 
-	public static String AllTypesCache_searching;
-	public static String AllTypesCache_checking_type_cache;
-
 	public static String History_error_serialize;
 	public static String History_error_read;
 	public static String TypeInfoHistory_consistency_check;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.properties
index 76e5a36..084c316 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/CorextMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,9 +18,6 @@ JavaDocLocations_error_readXML=Problems while reading the Javadoc locations from
 JavaDocLocations_migratejob_name=Migrate Javadoc locations to build path attributes
 JavaModelUtil_applyedit_operation=Applying changes
 
-AllTypesCache_searching=Searching...
-AllTypesCache_checking_type_cache=Checking types cache...
-
 History_error_serialize= Problems serializing information to XML ''{0}''
 TypeInfoHistory_consistency_check=Checking consistency of type history...
 History_error_read=Problems reading information from XML ''{0}''
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRange.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRange.java
deleted file mode 100644
index 5ac393a..0000000
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRange.java	
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.corext;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.compiler.IProblem;
-import org.eclipse.jdt.core.dom.ASTNode;
-
-public class SourceRange implements ISourceRange { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88265 (Allow implementation of ISourceRange)
-
-	private final int fOffset;
-	private final int fLength;
-
-	public SourceRange(int offset, int length){
-		fLength= length;
-		fOffset= offset;
-	}
-
-	public SourceRange(ASTNode node) {
-		this(node.getStartPosition(), node.getLength());
-	}
-
-	public SourceRange(IProblem problem) {
-		this(problem.getSourceStart(), problem.getSourceEnd() - problem.getSourceStart() + 1);
-	}
-
-	/*
-	 * @see ISourceRange#getLength()
-	 */
-	public int getLength() {
-		return fLength;
-	}
-
-	/*
-	 * @see ISourceRange#getOffset()
-	 */
-	public int getOffset() {
-		return fOffset;
-	}
-
-	public int getEndExclusive() {
-		return getOffset() + getLength();
-	}
-
-	public int getEndInclusive() {
-		return getEndExclusive() - 1;
-	}
-
-	/*non java doc
-	 * for debugging only
-	 */
-	public String toString(){
-		return "<offset: " + fOffset +" length: " + fLength + "/>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-
-	/**
-	 * Sorts the given ranges by offset (backwards).
-	 * Note: modifies the parameter.
-	 * @param ranges the ranges to sort
-	 * @return the sorted ranges, which are identical to the parameter ranges
-	 */
-	public static ISourceRange[] reverseSortByOffset(ISourceRange[] ranges){
-		Comparator comparator= new Comparator(){
-			public int compare(Object o1, Object o2){
-				return ((ISourceRange)o2).getOffset() - ((ISourceRange)o1).getOffset();
-			}
-		};
-		Arrays.sort(ranges, comparator);
-		return ranges;
-	}
-
-    /*
-     * @see Object#equals(Object)
-     */
-    public boolean equals(Object obj) {
-    	if (! (obj instanceof ISourceRange))
-	        return false;
-	    return ((ISourceRange)obj).getOffset() == fOffset && ((ISourceRange)obj).getLength() == fLength;
-    }
-
-    /*
-     * @see Object#hashCode()
-     */
-    public int hashCode() {
-        return fLength ^ fOffset;
-    }
-
-    public boolean covers(ASTNode node) {
-    	return covers(new SourceRange(node));
-    }
-
-    public boolean covers(SourceRange range) {
-    	return    getOffset() <= range.getOffset()
-    	       	&& getEndInclusive() >= range.getEndInclusive();
-    }
-
-    /**
-     * Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=130161
-     * (Java Model returns ISourceRanges [-1, 0] if source not available).
-     *
-     * @param range a source range, can be <code>null</code>
-     * @return <code>true</code> iff range is not null and range.getOffset() is not -1
-     */
-    public static boolean isAvailable(ISourceRange range) {
-    		return range != null && range.getOffset() != -1;
-    }
-}
-
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRangeFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRangeFactory.java
new file mode 100644
index 0000000..e7e72bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/SourceRangeFactory.java	
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext;
+
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.SourceRange;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.dom.ASTNode;
+
+
+public class SourceRangeFactory {
+
+	public static ISourceRange create(ASTNode node) {
+		return new SourceRange(node.getStartPosition(), node.getLength());
+	}
+
+	public static ISourceRange create(IProblem problem) {
+		return new SourceRange(problem.getSourceStart(), problem.getSourceEnd() - problem.getSourceStart() + 1);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallerMethodWrapper.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallerMethodWrapper.java
index bd083fd..74718c2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallerMethodWrapper.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/CallerMethodWrapper.java	
@@ -109,12 +109,8 @@ public class CallerMethodWrapper extends MethodWrapper {
 				type= (IType) member.getParent();
 			}
 			if (type != null) {
-				if (! type.isAnonymous()) {
-					pattern= SearchPattern.createPattern(type.getFullyQualifiedName('.'),
-							IJavaSearchConstants.CONSTRUCTOR,
-							IJavaSearchConstants.REFERENCES,
-							SearchUtils.GENERICS_AGNOSTIC_MATCH_RULE);
-				} else {
+				if (type.isAnonymous()) {
+					// search engine does not find reference to anonymous, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=207774
 					CallSearchResultCollector resultCollector= new CallSearchResultCollector();
 					IJavaElement parent= type.getParent();
 					if (parent instanceof IMember) {
@@ -125,6 +121,16 @@ public class CallerMethodWrapper extends MethodWrapper {
 						resultCollector.addMember(type, parentMember, start, start + len);
 						return resultCollector.getCallers();
 					}
+				} else if (type.getParent() instanceof IMethod) {
+					// good enough for local types (does not find super(..) references in subtype constructors):
+					pattern= SearchPattern.createPattern(type,
+							IJavaSearchConstants.CLASS_INSTANCE_CREATION_TYPE_REFERENCE,
+							SearchUtils.GENERICS_AGNOSTIC_MATCH_RULE);
+				} else {
+					pattern= SearchPattern.createPattern(type.getFullyQualifiedName('.'),
+							IJavaSearchConstants.CONSTRUCTOR,
+							IJavaSearchConstants.REFERENCES,
+							SearchUtils.GENERICS_AGNOSTIC_MATCH_RULE);
 				}
 			}
 			if (pattern == null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java
index 3bbadc3..5310540 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/callhierarchy/MethodWrapper.java	
@@ -355,4 +355,14 @@ public abstract class MethodWrapper extends PlatformObject {
             progressMonitor.worked(1);
         }
     }
+
+	/**
+	 * Removes the given method call from the cache.
+	 *
+	 * @since 3.6
+	 */
+	public void removeFromCache() {
+		fElements= null;
+		fMethodCache.remove(getMethodCall().getKey());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java
index 530f47d..cb52174 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddCustomConstructorOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,11 +36,10 @@ import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
-import org.eclipse.jdt.ui.CodeStyleConfiguration;
-
 /**
  * Workspace runnable to add custom constructors initializing fields.
  *
@@ -160,7 +159,7 @@ public final class AddCustomConstructorOperation implements IWorkspaceRunnable {
 			ICompilationUnit cu= (ICompilationUnit) fASTRoot.getTypeRoot();
 
 			ASTRewrite astRewrite= ASTRewrite.create(fASTRoot.getAST());
-			ImportRewrite importRewrite= CodeStyleConfiguration.createImportRewrite(fASTRoot, true);
+			ImportRewrite importRewrite= StubUtility.createImportRewrite(fASTRoot, true);
 
 			ListRewrite listRewriter= null;
 
@@ -172,7 +171,8 @@ public final class AddCustomConstructorOperation implements IWorkspaceRunnable {
 			}
 
 			if (listRewriter != null) {
-				MethodDeclaration stub= StubUtility2.createConstructorStub(cu, astRewrite, importRewrite, fParentType, fOmitSuper ? null : fConstructorBinding, fFieldBindings, fVisibility, fSettings);
+				ImportRewriteContext context= new ContextSensitiveImportRewriteContext(typeDecl, importRewrite);
+				MethodDeclaration stub= StubUtility2.createConstructorStub(cu, astRewrite, importRewrite, context, fParentType, fOmitSuper ? null : fConstructorBinding, fFieldBindings, fVisibility, fSettings);
 				if (stub != null) {
 					ASTNode insertion= StubUtility2.getNodeToInsertBefore(listRewriter, fInsert);
 					if (insertion != null && insertion.getParent() == typeDecl) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java
index ae08023..6286873 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddDelegateMethodsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.codemanipulation;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.core.runtime.Assert;
@@ -40,10 +42,9 @@ import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.util.DelegateEntryComparator;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
-import org.eclipse.jdt.ui.CodeStyleConfiguration;
-
 /**
  * Workspace runnable to add delegate methods.
  *
@@ -155,7 +156,7 @@ public final class AddDelegateMethodsOperation implements IWorkspaceRunnable {
 			ICompilationUnit cu= (ICompilationUnit) fASTRoot.getTypeRoot();
 
 			ASTRewrite astRewrite= ASTRewrite.create(fASTRoot.getAST());
-			ImportRewrite importRewrite= CodeStyleConfiguration.createImportRewrite(fASTRoot, true);
+			ImportRewrite importRewrite= StubUtility.createImportRewrite(fASTRoot, true);
 
 			ITypeBinding parentType= fDelegatesToCreate[0].field.getDeclaringClass();
 
@@ -173,6 +174,8 @@ public final class AddDelegateMethodsOperation implements IWorkspaceRunnable {
 
 				ContextSensitiveImportRewriteContext context= new ContextSensitiveImportRewriteContext(fASTRoot, typeDecl.getStartPosition(), importRewrite);
 
+				Arrays.sort(fDelegatesToCreate, new DelegateEntryComparator());
+
 				for (int i= 0; i < fDelegatesToCreate.length; i++) {
 					IMethodBinding delegateMethod= fDelegatesToCreate[i].delegateMethod;
 					IVariableBinding field= fDelegatesToCreate[i].field;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java
index 2f0218f..c9b5c42 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,14 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.codemanipulation;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -40,13 +45,13 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.formatter.CodeFormatter;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.CodeFormatterUtil;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
@@ -179,9 +184,9 @@ public final class AddGetterSetterOperation implements IWorkspaceRunnable {
 
 	/**
 	 * Generates a new setter method for the specified field
-	 *
+	 * 
 	 * @param field the field
-	 * @param astRewrite
+	 * @param astRewrite the AST rewrite to use
 	 * @param rewrite the list rewrite to use
 	 * @throws CoreException if an error occurs
 	 * @throws OperationCanceledException if the operation has been cancelled
@@ -190,7 +195,7 @@ public final class AddGetterSetterOperation implements IWorkspaceRunnable {
 		final IType type= field.getDeclaringType();
 		final String name= GetterSetterUtil.getSetterName(field, null);
 		final IMethod existing= JavaModelUtil.findMethod(name, new String[] { field.getTypeSignature()}, false, type);
-		if (existing == null || querySkipExistingMethods(existing)) {
+		if (existing == null || !querySkipExistingMethods(existing)) {
 			IJavaElement sibling= null;
 			if (existing != null) {
 				sibling= StubUtility.findNextSibling(existing);
@@ -308,28 +313,39 @@ public final class AddGetterSetterOperation implements IWorkspaceRunnable {
 			}
 
 			fSkipAllExisting= (fSkipExistingQuery == null);
+			
+			Set accessors = new HashSet(Arrays.asList(fAccessorFields));
+			Set getters = new HashSet(Arrays.asList(fGetterFields));
+			Set setters= new HashSet(Arrays.asList(fSetterFields));
+			IField[] fields= fType.getFields(); // generate methods in order of field declarations
 			if (!fSort) {
-				for (int index= 0; index < fAccessorFields.length; index++) {
-					generateGetterMethod(fAccessorFields[index], listRewriter);
-					generateSetterMethod(fAccessorFields[index], astRewrite, listRewriter);
+				for (int i= 0; i < fields.length; i++) {
+					if (accessors.contains(fields[i])) {
+						generateGetterMethod(fields[i], listRewriter);
+						generateSetterMethod(fields[i], astRewrite, listRewriter);
+						monitor.worked(1);
+						if (monitor.isCanceled()) {
+							throw new OperationCanceledException();
+						}
+					}
+				}
+			}
+			for (int i= 0; i < fields.length; i++) {
+				if (getters.contains(fields[i])) {
+					generateGetterMethod(fields[i], listRewriter);
 					monitor.worked(1);
 					if (monitor.isCanceled()) {
 						throw new OperationCanceledException();
 					}
 				}
 			}
-			for (int index= 0; index < fGetterFields.length; index++) {
-				generateGetterMethod(fGetterFields[index], listRewriter);
-				monitor.worked(1);
-				if (monitor.isCanceled()) {
-					throw new OperationCanceledException();
-				}
-			}
-			for (int index= 0; index < fSetterFields.length; index++) {
-				generateSetterMethod(fSetterFields[index], astRewrite, listRewriter);
-				monitor.worked(1);
-				if (monitor.isCanceled()) {
-					throw new OperationCanceledException();
+			for (int i= 0; i < fields.length; i++) {
+				if (setters.contains(fields[i])) {
+					generateSetterMethod(fields[i], astRewrite, listRewriter);
+					monitor.worked(1);
+					if (monitor.isCanceled()) {
+						throw new OperationCanceledException();
+					}
 				}
 			}
 			fEdit= astRewrite.rewriteAST();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java
index c5951fe..5a072bc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,7 @@ import org.eclipse.jdt.core.dom.MarkerAnnotation;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.QualifiedType;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -59,7 +60,6 @@ import org.eclipse.jdt.core.search.SearchPattern;
 import org.eclipse.jdt.core.search.TypeNameMatch;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.JavaConventionsUtil;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -72,6 +72,7 @@ import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 import org.eclipse.jdt.internal.ui.text.correction.SimilarElementsRequestor;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Add imports to a compilation unit.
  * The input is an array of full qualified type names. No elimination of unnecessary
@@ -149,8 +150,9 @@ public class AddImportsOperation implements IWorkspaceRunnable {
 
 	/**
 	 * Runs the operation.
+	 * 
 	 * @param monitor The progress monitor
-	 * @throws CoreException
+	 * @throws CoreException if accessing the CU or rewritting the imports fails
 	 * @throws OperationCanceledException Runtime error thrown when operation is canceled.
 	 */
 	public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
@@ -249,9 +251,15 @@ public class AddImportsOperation implements IWorkspaceRunnable {
 						return null;
 					}
 
-					String res= importRewrite.addImport(typeBinding);
+					ImportRewriteContext context= new ContextSensitiveImportRewriteContext(root, simpleNameStart, importRewrite);
+					String res= importRewrite.addImport(typeBinding, context);
 					if (containerName.length() > 0 && !res.equals(simpleName)) {
 						// adding import failed
+						fStatus= JavaUIStatus.createError(IStatus.ERROR, CodeGenerationMessages.AddImportsOperation_error_importclash, null);
+						return null;
+					}
+					if (containerName.length() == 0 && res.equals(simpleName)) {
+						// no change necessary
 						return null;
 					}
 					return new ReplaceEdit(qualifierStart, simpleNameStart - qualifierStart, new String());
@@ -339,7 +347,8 @@ public class AddImportsOperation implements IWorkspaceRunnable {
 		} else {
 			chosen= types[0];
 		}
-		importRewrite.addImport(chosen.getFullyQualifiedName());
+		ImportRewriteContext context= root == null ? null : new ContextSensitiveImportRewriteContext(root, simpleNameStart, importRewrite);
+		importRewrite.addImport(chosen.getFullyQualifiedName(), context);
 		return new ReplaceEdit(qualifierStart, simpleNameStart - qualifierStart, ""); //$NON-NLS-1$
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddJavaDocStubOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddJavaDocStubOperation.java
index 0ae5a05..b03e6c9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddJavaDocStubOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddJavaDocStubOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.codemanipulation;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -20,7 +21,6 @@ import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 
 import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
 
 import org.eclipse.core.filebuffers.FileBuffers;
 import org.eclipse.core.filebuffers.ITextFileBufferManager;
@@ -63,7 +63,7 @@ public class AddJavaDocStubOperation implements IWorkspaceRunnable {
 	private IMember[] fMembers;
 
 	public AddJavaDocStubOperation(IMember[] members) {
-		super();
+		Assert.isLegal(members.length > 0);
 		fMembers= members;
 	}
 
@@ -94,20 +94,16 @@ public class AddJavaDocStubOperation implements IWorkspaceRunnable {
 	 * @return Returns the scheduling rule for this operation
 	 */
 	public ISchedulingRule getScheduleRule() {
-		return ResourcesPlugin.getWorkspace().getRoot();
+		return fMembers[0].getResource();
 	}
 
-	/**
-	 * Runs the operation.
-	 * @throws OperationCanceledException Runtime error thrown when operation is cancelled.
+	/*
+	 * @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
-		if (monitor == null) {
+		if (monitor == null)
 			monitor= new NullProgressMonitor();
-		}
-		if (fMembers.length == 0) {
-			return;
-		}
+
 		try {
 			monitor.beginTask(CodeGenerationMessages.AddJavaDocStubOperation_description, fMembers.length + 2);
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedConstructorsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedConstructorsOperation.java
index 355e402..441f17d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedConstructorsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedConstructorsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,7 @@ import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
@@ -228,7 +229,8 @@ public final class AddUnimplementedConstructorsOperation implements IWorkspaceRu
 			for (int i= 0; i < toImplement.length; i++) {
 				IMethodBinding curr= toImplement[i];
 				if (!curr.isDeprecated() || createDeprecated) {
-					MethodDeclaration stub= StubUtility2.createConstructorStub(cu, astRewrite, importRewrite, curr, currTypeBinding.getName(), fVisibility, fOmitSuper, true, settings);
+					ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, importRewrite);
+					MethodDeclaration stub= StubUtility2.createConstructorStub(cu, astRewrite, importRewrite, context, curr, currTypeBinding.getName(), fVisibility, fOmitSuper, true, settings);
 					if (stub != null) {
 						fCreatedMethods.add(curr.getKey());
 						if (insertion != null)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedMethodsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedMethodsOperation.java
index b5f5a81..1f00386 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedMethodsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddUnimplementedMethodsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.codemanipulation;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
@@ -41,6 +43,7 @@ import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.corext.util.MethodsSourcePositionComparator;
 
 import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 
@@ -193,6 +196,8 @@ public final class AddUnimplementedMethodsOperation implements IWorkspaceRunnabl
 				methodsToImplement= StubUtility2.getUnimplementedMethods(currTypeBinding);
 			}
 
+			Arrays.sort(methodsToImplement, new MethodsSourcePositionComparator(fType));
+
 			ImportRewriteContext context= null;
 			int insertionPosition= fInsertPos;
 			if (insertionPosition == -1 && fASTRoot.types().size() > 0) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.java
index 666c487..e71e1fb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.java	
@@ -33,7 +33,6 @@ public final class CodeGenerationMessages extends NLS {
 	public static String OrganizeImportsOperation_description;
 	public static String AddJavaDocStubOperation_description;
 	public static String AddDelegateMethodsOperation_monitor_message;
-	public static String ImportsStructure_operation_description;
 	public static String GenerateHashCodeEqualsOperation_description;
 
 	static {
@@ -52,8 +51,6 @@ public final class CodeGenerationMessages extends NLS {
 	public static String GenerateToStringOperation_objectIdentityHashCodeVariableDescription;
 	public static String GenerateToStringOperation_objectSuperToStringVariableDescription;
 	public static String GenerateToStringOperation_description;
-	public static String GenerateToStringOperation_error_dialog_title;
-	public static String GenerateToStringOperation_invalid_message;
 	public static String GenerateToStringOperation_memberNameParenthesesVariableDescription;
 	public static String GenerateToStringOperation_memberNameVariableDescription;
 	public static String GenerateToStringOperation_memberValueVariableDescription;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.properties
index c56dfdb..889df53 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/CodeGenerationMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,9 +15,9 @@ AddGetterSetterOperation_error_input_type_not_found=Could not find the selected
 
 AddImportsOperation_description=Adding import...
 AddImportsOperation_error_notresolved_message=Type ''{0}'' could not be found or is not visible.
-AddImportsOperation_error_importclash=Import would conflict with an other import declaration.
+AddImportsOperation_error_importclash=Import would conflict with an other import declaration or visible type.
 AddImportsOperation_error_invalid_selection=Invalid selection
-AddImportsOperation_error_not_visible_class=''{0}'' is not visible in the current context. Can add import statement.
+AddImportsOperation_error_not_visible_class=''{0}'' is not visible in the current context. Cannot add import statement.
 AddUnimplementedMethodsOperation_description=Adding unimplemented methods...
 
 AddCustomConstructorOperation_description=Adding new constructor...
@@ -28,8 +28,6 @@ AddJavaDocStubOperation_description=Create Javadoc stub...
 
 AddDelegateMethodsOperation_monitor_message=Adding delegate methods...
 
-ImportsStructure_operation_description=Updating imports...
-
 GenerateHashCodeEqualsOperation_description=Adding hashCode() and equals() methods...
 GenerateHashCodeEqualsOperation_hash_code_comment=Returns a hash code value for the array
 GenerateHashCodeEqualsOperation_tag_param=@param
@@ -49,8 +47,6 @@ GenerateToStringOperation_memberValueVariableDescription=Inserts the first membe
 GenerateToStringOperation_otherFieldsVariableDescription=Inserts the remaining members. For each member, the template fragment between the first and the last ${member.*} variable is evaluated and appended to the result. The characters between the last ${member.*} and ${otherMembers} define the separator that is inserted between members (${otherMembers} must stand after the last ${member.*} variable).
 
 GenerateToStringOperation_description=Adding toString() method...
-GenerateToStringOperation_error_dialog_title=Problem with toString() generation
-GenerateToStringOperation_invalid_message=The extension ''{0}'' has become invalid.
 GenerateToStringOperation_string_format_style_name=String.format/MessageFormat
 GenerateToStringOperation_StringBuilder_chained_style_name=StringBuilder/StringBuffer - chained calls
 GenerateToStringOperation_stringBuilder_style_name=StringBuilder/StringBuffer
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ContextSensitiveImportRewriteContext.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ContextSensitiveImportRewriteContext.java
index 4794fe3..c5f2931 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ContextSensitiveImportRewriteContext.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/ContextSensitiveImportRewriteContext.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IBinding;
@@ -36,6 +37,9 @@ import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 /**
  * This <code>ImportRewriteContext</code> is aware of all the types visible in
  * <code>compilationUnit</code> at <code>position</code>.
+ * <p>
+ * <b>Note:</b> This context only works if the AST was created with bindings!
+ * </p>
  */
 public class ContextSensitiveImportRewriteContext extends ImportRewriteContext {
 
@@ -45,6 +49,25 @@ public class ContextSensitiveImportRewriteContext extends ImportRewriteContext {
 	private Name[] fImportedNames;
 	private final ImportRewrite fImportRewrite;
 
+	/**
+	 * Creates an import rewrite context at the given node's start position.
+	 * 
+	 * @param node the node to use as context
+	 * @param importRewrite the import rewrite
+	 * 
+	 * @since 3.6
+	 */
+	public ContextSensitiveImportRewriteContext(ASTNode node, ImportRewrite importRewrite) {
+		this((CompilationUnit)node.getRoot(), node.getStartPosition(), importRewrite);
+	}
+	
+	/**
+	 * Creates an import rewrite context at the given start position.
+	 * 
+	 * @param compilationUnit the root
+	 * @param position the context position
+	 * @param importRewrite the import rewrite
+	 */
 	public ContextSensitiveImportRewriteContext(CompilationUnit compilationUnit, int position, ImportRewrite importRewrite) {
 		fCompilationUnit= compilationUnit;
 		fPosition= position;
@@ -54,10 +77,6 @@ public class ContextSensitiveImportRewriteContext extends ImportRewriteContext {
 	}
 
 	public int findInContext(String qualifier, String name, int kind) {
-		int defaultResult= fImportRewrite.getDefaultImportRewriteContext().findInContext(qualifier, name, kind);
-		if (defaultResult != ImportRewriteContext.RES_NAME_UNKNOWN)
-			return defaultResult;
-
 		IBinding[] declarationsInScope= getDeclarationsInScope();
 		for (int i= 0; i < declarationsInScope.length; i++) {
 			if (declarationsInScope[i] instanceof ITypeBinding) {
@@ -139,7 +158,7 @@ public class ContextSensitiveImportRewriteContext extends ImportRewriteContext {
 			}
 		}
 
-		return RES_NAME_UNKNOWN;
+		return fImportRewrite.getDefaultImportRewriteContext().findInContext(qualifier, name, kind);
 	}
 
 	private boolean isConflicting(String name, String importt) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java
index 2db8279..daa2e03 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/GenerateHashCodeEqualsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,11 +47,13 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.IfStatement;
 import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.InfixExpression.Operator;
 import org.eclipse.jdt.core.dom.InstanceofExpression;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.PostfixExpression;
@@ -67,8 +69,7 @@ import org.eclipse.jdt.core.dom.ThisExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
-import org.eclipse.jdt.core.dom.InfixExpression.Operator;
-import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
@@ -205,6 +206,9 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 	/** <code>true</code> to use blocks for then */
 	private boolean fUseBlocksForThen;
 
+	/** The import rewrite context, only initialized in {@link #run(IProgressMonitor)}. */
+	private ImportRewriteContext fImportRewriteContext;
+
 	/**
 	 * Creates a new add hash code equals operation.
 	 *
@@ -294,9 +298,10 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 				ASTNode insertion= StubUtility2.getNodeToInsertBefore(rewriter, fInsert);
 
 				// equals(..)
-				ITypeBinding[] objectAsParam= { declaration.getAST().resolveWellKnownType("java.lang.Object") }; //$NON-NLS-1$
+				ITypeBinding[] objectAsParam= { declaration.getAST().resolveWellKnownType(JAVA_LANG_OBJECT) };
 				BodyDeclaration oldEquals= fForce ? findMethodToReplace(list, METHODNAME_EQUALS, objectAsParam) : null;
 
+				fImportRewriteContext= new ContextSensitiveImportRewriteContext(declaration, fRewrite.getImportRewrite());
 				MethodDeclaration equalsMethod= createEqualsMethod();
 				addMethod(rewriter, insertion, equalsMethod, oldEquals);
 
@@ -326,7 +331,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 					}
 				}
 
-				fEdit= fRewrite.createChange().getEdit();
+				fEdit= fRewrite.createChange(true).getEdit();
 				if (fApply)
 					JavaModelUtil.applyEdit(cu, fEdit, fSave, monitor);
 			}
@@ -769,7 +774,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 
 		List parameters= equalsMethodDeclaration.parameters();
 		SingleVariableDeclaration equalsParam= fAst.newSingleVariableDeclaration();
-		equalsParam.setType(fAst.newSimpleType(fAst.newSimpleName("Object"))); //$NON-NLS-1$
+		equalsParam.setType(fRewrite.getImportRewrite().addImport(fAst.resolveWellKnownType(JAVA_LANG_OBJECT), fAst, fImportRewriteContext));
 		equalsParam.setName(fAst.newSimpleName(VARIABLE_NAME_EQUALS_PARAM));
 		parameters.add(equalsParam);
 
@@ -806,7 +811,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 			// if (!(obj instanceof Type)) return false;
 			InstanceofExpression expression= fAst.newInstanceofExpression();
 			expression.setLeftOperand(fAst.newSimpleName(VARIABLE_NAME_EQUALS_PARAM));
-			expression.setRightOperand(fRewrite.getImportRewrite().addImport(fType, fAst));
+			expression.setRightOperand(fRewrite.getImportRewrite().addImport(fType, fAst, fImportRewriteContext));
 
 			PrefixExpression notExpression= fAst.newPrefixExpression();
 			notExpression.setOperator(org.eclipse.jdt.core.dom.PrefixExpression.Operator.NOT);
@@ -848,7 +853,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 		}
 
 		for (int i= 0; i < fFields.length; i++) {
-			if (fFields[i].getType().isPrimitive())
+			if (fFields[i].getType().isPrimitive() || fFields[i].getType().isEnum())
 				body.statements().add(createSimpleComparison(fFields[i]));
 			else if (fFields[i].getType().isArray())
 				body.statements().add(createArrayComparison(fFields[i].getName()));
@@ -1023,7 +1028,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 	private boolean needsNoSuperCall(ITypeBinding typeBinding, String name, ITypeBinding[] parameters) {
 		Assert.isNotNull(typeBinding);
 		IMethodBinding binding= Bindings.findMethodInHierarchy(typeBinding.getSuperclass(), name, parameters);
-		if (binding != null) {
+		if (binding != null && !Modifier.isAbstract(binding.getModifiers())) {
 			ITypeBinding declaring= binding.getDeclaringClass();
 			return declaring.getQualifiedName().equals(JAVA_LANG_OBJECT);
 		}
@@ -1067,7 +1072,7 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
 	}
 
 	private Name getQualifiedName(String name) {
-		String importedType= fRewrite.getImportRewrite().addImport(name);
+		String importedType= fRewrite.getImportRewrite().addImport(name, fImportRewriteContext);
 		return ASTNodeFactory.newName(fAst, importedType);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java
index bd2bcab..2bca6a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,7 @@ import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
@@ -55,7 +56,6 @@ import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.TypeNameMatch;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.ScopeAnalyzer;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility.java
index 5661ee8..230ee0b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1450,8 +1450,27 @@ public class StubUtility {
 		return CodeStyleConfiguration.createImportRewrite(cu, restoreExistingImports);
 	}
 
+	/**
+	 * Returns a {@link ImportRewrite} using {@link ImportRewrite#create(CompilationUnit, boolean)} and
+	 * configures the rewriter with the settings as specified in the JDT UI preferences.
+	 * <p>
+	 * This method sets {@link ImportRewrite#setUseContextToFilterImplicitImports(boolean)} to <code>true</code>
+	 * iff the given AST has been resolved with bindings. Clients should always supply a context
+	 * when they call one of the <code>addImport(...)</code> methods.
+	 * </p>
+	 *
+	 * @param astRoot the AST root to create the rewriter on
+	 * @param restoreExistingImports specifies if the existing imports should be kept or removed.
+	 * @return the new rewriter configured with the settings as specified in the JDT UI preferences.
+	 *
+	 * @see ImportRewrite#create(CompilationUnit, boolean)
+	 */
 	public static ImportRewrite createImportRewrite(CompilationUnit astRoot, boolean restoreExistingImports) {
-		return CodeStyleConfiguration.createImportRewrite(astRoot, restoreExistingImports);
+		ImportRewrite rewrite= CodeStyleConfiguration.createImportRewrite(astRoot, restoreExistingImports);
+		if (astRoot.getAST().hasResolvedBindings()) {
+			rewrite.setUseContextToFilterImplicitImports(true);
+		}
+		return rewrite;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java
index 92cf149..47419d3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility2.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public final class StubUtility2 {
 		}
 	}
 
-	public static MethodDeclaration createConstructorStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, IMethodBinding binding, String type, int modifiers, boolean omitSuperForDefConst, boolean todo, CodeGenerationSettings settings) throws CoreException {
+	public static MethodDeclaration createConstructorStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, ImportRewriteContext context, IMethodBinding binding, String type, int modifiers, boolean omitSuperForDefConst, boolean todo, CodeGenerationSettings settings) throws CoreException {
 		AST ast= rewrite.getAST();
 		MethodDeclaration decl= ast.newMethodDeclaration();
 		decl.modifiers().addAll(ASTNodeFactory.newModifiers(ast, modifiers & ~Modifier.ABSTRACT & ~Modifier.NATIVE));
@@ -97,18 +97,18 @@ public final class StubUtility2 {
 			if (typeBounds.length != 1 || !"java.lang.Object".equals(typeBounds[0].getQualifiedName())) {//$NON-NLS-1$
 				List newTypeBounds= newTypeParam.typeBounds();
 				for (int k= 0; k < typeBounds.length; k++) {
-					newTypeBounds.add(imports.addImport(typeBounds[k], ast));
+					newTypeBounds.add(imports.addImport(typeBounds[k], ast, context));
 				}
 			}
 			typeParameters.add(newTypeParam);
 		}
 
-		List parameters= createParameters(unit.getJavaProject(), imports, null, ast, binding, decl);
+		List parameters= createParameters(unit.getJavaProject(), imports, context, ast, binding, decl);
 
 		List thrownExceptions= decl.thrownExceptions();
 		ITypeBinding[] excTypes= binding.getExceptionTypes();
 		for (int i= 0; i < excTypes.length; i++) {
-			String excTypeName= imports.addImport(excTypes[i]);
+			String excTypeName= imports.addImport(excTypes[i], context);
 			thrownExceptions.add(ASTNodeFactory.newName(ast, excTypeName));
 		}
 
@@ -148,7 +148,7 @@ public final class StubUtility2 {
 		return decl;
 	}
 
-	public static MethodDeclaration createConstructorStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, ITypeBinding typeBinding, IMethodBinding superConstructor, IVariableBinding[] variableBindings, int modifiers, CodeGenerationSettings settings) throws CoreException {
+	public static MethodDeclaration createConstructorStub(ICompilationUnit unit, ASTRewrite rewrite, ImportRewrite imports, ImportRewriteContext context, ITypeBinding typeBinding, IMethodBinding superConstructor, IVariableBinding[] variableBindings, int modifiers, CodeGenerationSettings settings) throws CoreException {
 		AST ast= rewrite.getAST();
 
 		MethodDeclaration decl= ast.newMethodDeclaration();
@@ -168,18 +168,18 @@ public final class StubUtility2 {
 				if (typeBounds.length != 1 || !"java.lang.Object".equals(typeBounds[0].getQualifiedName())) {//$NON-NLS-1$
 					List newTypeBounds= newTypeParam.typeBounds();
 					for (int k= 0; k < typeBounds.length; k++) {
-						newTypeBounds.add(imports.addImport(typeBounds[k], ast));
+						newTypeBounds.add(imports.addImport(typeBounds[k], ast, context));
 					}
 				}
 				typeParameters.add(newTypeParam);
 			}
 
-			createParameters(unit.getJavaProject(), imports, null, ast, superConstructor, decl);
+			createParameters(unit.getJavaProject(), imports, context, ast, superConstructor, decl);
 
 			List thrownExceptions= decl.thrownExceptions();
 			ITypeBinding[] excTypes= superConstructor.getExceptionTypes();
 			for (int i= 0; i < excTypes.length; i++) {
-				String excTypeName= imports.addImport(excTypes[i]);
+				String excTypeName= imports.addImport(excTypes[i], context);
 				thrownExceptions.add(ASTNodeFactory.newName(ast, excTypeName));
 			}
 		}
@@ -207,7 +207,7 @@ public final class StubUtility2 {
 		String[] excluded= null;
 		for (int i= 0; i < variableBindings.length; i++) {
 			SingleVariableDeclaration var= ast.newSingleVariableDeclaration();
-			var.setType(imports.addImport(variableBindings[i].getType(), ast));
+			var.setType(imports.addImport(variableBindings[i].getType(), ast, context));
 			excluded= new String[list.size()];
 			list.toArray(excluded);
 			param= suggestParameterName(unit, variableBindings[i], excluded);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/tostringgeneration/GenerateToStringOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/tostringgeneration/GenerateToStringOperation.java
index ede4b8d..9f50df6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/tostringgeneration/GenerateToStringOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/tostringgeneration/GenerateToStringOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Mateusz Matela and others.
+ * Copyright (c) 2010 Mateusz Matela and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -100,7 +100,7 @@ public class GenerateToStringOperation implements IWorkspaceRunnable {
 					}
 				}
 
-				JavaModelUtil.applyEdit((ICompilationUnit)fUnit.getJavaElement(), fRewrite.createChange().getEdit(), false, monitor);
+				JavaModelUtil.applyEdit((ICompilationUnit)fUnit.getJavaElement(), fRewrite.createChange(true).getEdit(), false, monitor);
 			}
 
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodeFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodeFactory.java
index dab59ce..0485e3a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodeFactory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodeFactory.java	
@@ -23,6 +23,7 @@ import org.eclipse.jdt.core.dom.InfixExpression;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java
index d874913..a18e10d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,7 @@ import org.eclipse.jdt.core.dom.DoStatement;
 import org.eclipse.jdt.core.dom.EnhancedForStatement;
 import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
 import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.ForStatement;
 import org.eclipse.jdt.core.dom.IBinding;
@@ -66,7 +67,9 @@ import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.QualifiedType;
@@ -91,6 +94,7 @@ import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.preferences.MembersOrderPreferenceCache;
+import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 
 public class ASTNodes {
 
@@ -478,27 +482,65 @@ public class ASTNodes {
 	}
 
 	/**
-	 * Returns whether an inlined variable initializer needs an explicit cast.
+	 * Returns the type to which an inlined variable initializer should be cast, or
+	 * <code>null</code> if no cast is necessary.
 	 * 
-	 * @param initializerType the type of the initializer expression of the variable to inline 
-	 * @param referenceType the type of the reference to the variable (which is to be inlined)
-	 * @return <code>true</code> iff an explicit cast is necessary
-	 * @since 3.5
+	 * @param initializer the initializer expression of the variable to inline 
+	 * @param reference the reference to the variable (which is to be inlined)
+	 * @return a type binding to which the initializer should be cast, or <code>null</code> iff no cast is necessary
+	 * @since 3.6
 	 */
-	public static boolean needsExplicitCast(ITypeBinding initializerType, ITypeBinding referenceType) {
+	public static ITypeBinding getExplicitCast(Expression initializer, Expression reference) {
+		ITypeBinding initializerType= initializer.resolveTypeBinding();
+		ITypeBinding referenceType= reference.resolveTypeBinding();
 		if (initializerType == null || referenceType == null)
-			return false;
+			return null;
 		
 		if (initializerType.isPrimitive() && referenceType.isPrimitive() && ! referenceType.isEqualTo(initializerType))
-			return true;
-		else if (initializerType.isPrimitive() && ! referenceType.isPrimitive()) // reference was autoboxed
-			return true;
-		else if (! TypeRules.canAssign(initializerType, referenceType))
+			return referenceType;
+		else if (initializerType.isPrimitive() && ! referenceType.isPrimitive()) { // initializer is autoboxed
+			ITypeBinding unboxedReferenceType= Bindings.getUnboxedTypeBinding(referenceType, reference.getAST());
+			if (unboxedReferenceType != initializerType)
+				return unboxedReferenceType;
+			else if (needsExplicitBoxing(reference))
+				return referenceType;
+		} else if (! TypeRules.canAssign(initializerType, referenceType))
+			return referenceType;
+		
+		return null;
+	}
+
+	/**
+	 * Returns whether an expression at the given location needs explicit boxing.
+	 * 
+	 * @param expression the expression
+	 * @return <code>true</code> iff an expression at the given location needs explicit boxing
+	 * @since 3.6
+	 */
+	private static boolean needsExplicitBoxing(Expression expression) {
+		StructuralPropertyDescriptor locationInParent= expression.getLocationInParent();
+		if (locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY)
+			return needsExplicitBoxing((ParenthesizedExpression) expression.getParent());
+		
+		if (locationInParent == ClassInstanceCreation.EXPRESSION_PROPERTY
+				|| locationInParent == FieldAccess.EXPRESSION_PROPERTY
+				|| locationInParent == MethodInvocation.EXPRESSION_PROPERTY)
 			return true;
 		
 		return false;
 	}
 
+	/**
+	 * Returns the closest ancestor of <code>node</code> that is an instance of <code>parentClass</code>, or <code>null</code> if none.
+	 * <p>
+	 * <b>Warning:</b> This method does not stop at any boundaries like parentheses, statements, body declarations, etc.
+	 * The resulting node may be in a totally different scope than the given node.
+	 * Consider using one of the {@link ASTResolving}<code>.find(..)</code> methods instead.
+	 * </p>
+	 * @param node the node
+	 * @param parentClass the class of the sought ancestor node
+	 * @return the closest ancestor of <code>node</code> that is an instance of <code>parentClass</code>, or <code>null</code> if none
+	 */
 	public static ASTNode getParent(ASTNode node, Class parentClass) {
 		do {
 			node= node.getParent();
@@ -506,6 +548,17 @@ public class ASTNodes {
 		return node;
 	}
 
+	/**
+	 * Returns the closest ancestor of <code>node</code> whose type is <code>nodeType</code>, or <code>null</code> if none.
+	 * <p>
+	 * <b>Warning:</b> This method does not stop at any boundaries like parentheses, statements, body declarations, etc.
+	 * The resulting node may be in a totally different scope than the given node.
+	 * Consider using one of the {@link ASTResolving}<code>.find(..)</code> methods instead.
+	 * </p>
+	 * @param node the node
+	 * @param nodeType the node type constant from {@link ASTNode}
+	 * @return the closest ancestor of <code>node</code> whose type is <code>nodeType</code>, or <code>null</code> if none
+	 */
 	public static ASTNode getParent(ASTNode node, int nodeType) {
 		do {
 			node= node.getParent();
@@ -548,6 +601,14 @@ public class ASTNodes {
 		return current;
 	}
 
+	/**
+	 * Returns <code>true</code> iff <code>parent</code> is a true ancestor of <code>node</code>
+	 * (i.e. returns <code>false</code> if <code>parent == node</code>).
+	 * 
+	 * @param node node to test
+	 * @param parent assumed parent
+	 * @return <code>true</code> iff <code>parent</code> is a true ancestor of <code>node</code>
+	 */
 	public static boolean isParent(ASTNode node, ASTNode parent) {
 		Assert.isNotNull(parent);
 		do {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java
index 299fceb..76535e6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1041,7 +1041,8 @@ public class Bindings {
 	}
 
 	/**
-	 * Returns the type binding of the node's type context or null if the node is an annotation, type parameter or super type declaration of a top level type.
+	 * Returns the type binding of the node's type context or null if the node is inside
+	 * an annotation, type parameter, super type declaration, or Javadoc of a top level type.
 	 * The result of this method is equal to the result of {@link #getBindingOfParentType(ASTNode)} for nodes in the type's body.
 	 * 
 	 * @param node an AST node
@@ -1053,7 +1054,8 @@ public class Bindings {
 		while (node != null) {
 			if (node instanceof AbstractTypeDeclaration) {
 				AbstractTypeDeclaration decl= (AbstractTypeDeclaration) node;
-				if (lastLocation == decl.getBodyDeclarationsProperty()) {
+				if (lastLocation == decl.getBodyDeclarationsProperty()
+						|| lastLocation == decl.getJavadocProperty()) {
 					return decl.resolveBinding();
 				} else if (decl instanceof EnumDeclaration && lastLocation == EnumDeclaration.ENUM_CONSTANTS_PROPERTY) {
 					return decl.resolveBinding();
@@ -1288,6 +1290,55 @@ public class Bindings {
 	}
 
 	/**
+	 * Returns the unboxed type binding according to JLS3 5.1.7, or the original binding if
+	 * the given type is not a boxed type.
+	 *
+	 * @param type a type binding
+	 * @param ast an AST to resolve the unboxed type
+	 * @return the unboxed type, or the original type if no unboxed type found
+	 */
+	public static ITypeBinding getUnboxedTypeBinding(ITypeBinding type, AST ast) {
+		if (!type.isClass())
+			return type;
+		String unboxedTypeName= getUnboxedTypeName(type.getQualifiedName());
+		if (unboxedTypeName == null)
+			return type;
+		ITypeBinding unboxed= ast.resolveWellKnownType(unboxedTypeName);
+		if (unboxed == null)
+			return type;
+		return unboxed;
+	}
+	
+	private static String getUnboxedTypeName(String boxedName) {
+		if ("java.lang.Long".equals(boxedName)) //$NON-NLS-1$
+			return "long"; //$NON-NLS-1$
+		
+		else if ("java.lang.Integer".equals(boxedName)) //$NON-NLS-1$
+			return "int"; //$NON-NLS-1$
+		
+		else if ("java.lang.Short".equals(boxedName)) //$NON-NLS-1$
+			return "short"; //$NON-NLS-1$
+		
+		else if ("java.lang.Character".equals(boxedName)) //$NON-NLS-1$
+			return "char"; //$NON-NLS-1$
+		
+		else if ("java.lang.Byte".equals(boxedName)) //$NON-NLS-1$
+			return "byte"; //$NON-NLS-1$
+		
+		else if ("java.lang.Boolean".equals(boxedName)) //$NON-NLS-1$
+			return "boolean"; //$NON-NLS-1$
+		
+		else if ("java.lang.Float".equals(boxedName)) //$NON-NLS-1$
+			return "float"; //$NON-NLS-1$
+		
+		else if ("java.lang.Double".equals(boxedName)) //$NON-NLS-1$
+			return "double"; //$NON-NLS-1$
+		
+		else
+			return null;
+	}
+	
+	/**
 	 * Resolve the binding (<em>not</em> the type binding) for the expression or a nested expression
 	 * (e.g. nested in parentheses, cast, ...).
 	 * 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java
index 6591074..f9db707 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.LabeledStatement;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 
 
@@ -97,6 +98,7 @@ public class LinkedNodeFinder  {
 			case IProblem.UndefinedLabel:
 				return LABEL;
 			case IProblem.UndefinedName:
+			case IProblem.UnresolvedVariable:
 				return NAME;
 			case IProblem.UndefinedType:
 				return TYPE;
@@ -148,7 +150,7 @@ public class LinkedNodeFinder  {
 			if (probStart > bodyStart && probEnd < bodyEnd) {
 				int currKind= getProblemKind(curr);
 				if ((nameNodeKind & currKind) != 0) {
-					ASTNode node= NodeFinder.perform(parent, probStart, probEnd - probStart);
+					ASTNode node= NodeFinder.perform(parent, probStart, (probEnd - probStart));
 					if (node instanceof SimpleName && name.equals(((SimpleName) node).getIdentifier())) {
 						res.add(node);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/NodeFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/NodeFinder.java
deleted file mode 100644
index ce40398..0000000
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/NodeFinder.java	
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.corext.dom;
-
-import org.eclipse.jdt.core.IBuffer;
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.ITypeRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.ToolFactory;
-import org.eclipse.jdt.core.compiler.IScanner;
-import org.eclipse.jdt.core.compiler.ITerminalSymbols;
-import org.eclipse.jdt.core.compiler.InvalidInputException;
-import org.eclipse.jdt.core.dom.ASTNode;
-/**
- * For a give range finds the node covered and the node covering.
- *
- * @since		2.1
- */
-public class NodeFinder extends GenericVisitor {
-
-	/**
-	 * A visitor that maps a selection to a given ASTNode. The result node is
-	 * determined as follows:
-	 * <ul>
-	 *   <li>first the visitor tries to find a node with the exact start and length</li>
-	 * 	 <li>if no such node exists than the node that encloses the range defined by
-	 *       start and end is returned.</li>
-	 *   <li>if the length is zero than also nodes are considered where the node's
-	 *       start or end position matches <code>start</code>.</li>
-	 *   <li>otherwise <code>null</code> is returned.</li>
-	 * </ul>
-	 *
-	 * @param root the root node from which the search starts
-	 * @param start the start offset
-	 * @param length the length
-	 *
-	 * @return the result node
-	 *
-	 * @since		2.1
-	 */
-	public static ASTNode perform(ASTNode root, int start, int length) {
-		NodeFinder finder= new NodeFinder(start, length);
-		root.accept(finder);
-		ASTNode result= finder.getCoveredNode();
-		if (result == null || result.getStartPosition() != start || result.getLength() != length) {
-			return finder.getCoveringNode();
-		}
-		return result;
-	}
-
-	public static ASTNode perform(ASTNode root, ISourceRange range) {
-		return perform(root, range.getOffset(), range.getLength());
-	}
-
-	/**
-	 * A visitor that maps a selection to a given ASTNode. The result node is
-	 * determined as follows:
-	 * <ul>
-	 *   <li>first the visitor tries to find a node that is covered by <code>start</code> and
-	 *       <code>length</code> where either <code>start</code> and <code>length</code> exactly
-	 *       matches the node or where the text covered before and after the node only consists
-	 *       of white spaces or comments.</li>
-	 * 	 <li>if no such node exists than the node that encloses the range defined by
-	 *       start and end is returned.</li>
-	 *   <li>if the length is zero than also nodes are considered where the node's
-	 *       start or end position matches <code>start</code>.</li>
-	 *   <li>otherwise <code>null</code> is returned.</li>
-	 * </ul>
-	 *
-	 * @param root the root node from which the search starts
-	 * @param start the start offset
-	 * @param length the length
-	 * @param source the source of the compilation unit
-	 *
-	 * @return the result node
-	 * @throws JavaModelException if an error occurs in the Java model
-	 *
-	 * @since		3.0
-	 */
-	public static ASTNode perform(ASTNode root, int start, int length, ITypeRoot source) throws JavaModelException {
-		NodeFinder finder= new NodeFinder(start, length);
-		root.accept(finder);
-		ASTNode result= finder.getCoveredNode();
-		if (result == null)
-			return null;
-		Selection selection= Selection.createFromStartLength(start, length);
-		if (selection.covers(result)) {
-			IBuffer buffer= source.getBuffer();
-			if (buffer != null) {
-				IScanner scanner= ToolFactory.createScanner(false, false, false, false);
-				scanner.setSource(buffer.getText(start, length).toCharArray());
-				try {
-					int token= scanner.getNextToken();
-					if (token != ITerminalSymbols.TokenNameEOF) {
-						int tStart= scanner.getCurrentTokenStartPosition();
-						if (tStart == result.getStartPosition() - start) {
-							scanner.resetTo(tStart + result.getLength(), length - 1);
-							token= scanner.getNextToken();
-							if (token == ITerminalSymbols.TokenNameEOF)
-								return result;
-						}
-					}
-				} catch (InvalidInputException e) {
-				}
-			}
-		}
-		return finder.getCoveringNode();
-	}
-
-	private int fStart;
-	private int fEnd;
-
-	private ASTNode fCoveringNode;
-	private ASTNode fCoveredNode;
-
-	public NodeFinder(int offset, int length) {
-		super(true); // include Javadoc tags
-		fStart= offset;
-		fEnd= offset + length;
-	}
-
-	protected boolean visitNode(ASTNode node) {
-		int nodeStart= node.getStartPosition();
-		int nodeEnd= nodeStart + node.getLength();
-		if (nodeEnd < fStart || fEnd < nodeStart) {
-			return false;
-		}
-		if (nodeStart <= fStart && fEnd <= nodeEnd) {
-			fCoveringNode= node;
-		}
-		if (fStart <= nodeStart && nodeEnd <= fEnd) {
-			if (fCoveringNode == node) { // nodeStart == fStart && nodeEnd == fEnd
-				fCoveredNode= node;
-				return true; // look further for node with same length as parent
-			} else if (fCoveredNode == null) { // no better found
-				fCoveredNode= node;
-			}
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * Returns the covered node. If more than one nodes are covered by the selection, the
-	 * returned node is first covered node found in a top-down traversal of the AST
-	 * @return ASTNode
-	 */
-	public ASTNode getCoveredNode() {
-		return fCoveredNode;
-	}
-
-	/**
-	 * Returns the covering node. If more than one nodes are covering the selection, the
-	 * returned node is last covering node found in a top-down traversal of the AST
-	 * @return ASTNode
-	 */
-	public ASTNode getCoveringNode() {
-		return fCoveringNode;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ScopeAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ScopeAnalyzer.java
index c6976ca..f6f6385 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ScopeAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ScopeAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -129,9 +129,9 @@ public class ScopeAnalyzer {
 
 	}
 
-	private HashSet fTypesVisited;
+	private final HashSet fTypesVisited;
 
-	private CompilationUnit fRoot;
+	private final CompilationUnit fRoot;
 
 	public ScopeAnalyzer(CompilationUnit root) {
 		fTypesVisited= new HashSet();
@@ -490,8 +490,7 @@ public class ScopeAnalyzer {
 	}
 
 	public IBinding[] getDeclarationsInScope(int offset, int flags) {
-		NodeFinder finder= new NodeFinder(offset, 0);
-		fRoot.accept(finder);
+		org.eclipse.jdt.core.dom.NodeFinder finder= new org.eclipse.jdt.core.dom.NodeFinder(fRoot, offset, 0);
 		ASTNode node= finder.getCoveringNode();
 		if (node == null) {
 			return NO_BINDING;
@@ -599,8 +598,7 @@ public class ScopeAnalyzer {
 
 	public IBinding[] getDeclarationsAfter(int offset, int flags) {
 		try {
-			NodeFinder finder= new NodeFinder(offset, 0);
-			fRoot.accept(finder);
+			org.eclipse.jdt.core.dom.NodeFinder finder= new org.eclipse.jdt.core.dom.NodeFinder(fRoot, offset, 0);
 			ASTNode node= finder.getCoveringNode();
 			if (node == null) {
 				return null;
@@ -627,8 +625,8 @@ public class ScopeAnalyzer {
 
 	private class ScopeAnalyzerVisitor extends HierarchicalASTVisitor {
 
-		private int fPosition;
-		private int fFlags;
+		private final int fPosition;
+		private final int fFlags;
 		private final IBindingRequestor fRequestor;
 		private boolean fBreak;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java
index 01e2475..fb04a0e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/ASTFragmentFactory.java	
@@ -13,12 +13,13 @@ package org.eclipse.jdt.internal.corext.dom.fragments;
 import org.eclipse.core.runtime.Assert;
 
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.InfixExpression;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
@@ -73,7 +74,7 @@ public class ASTFragmentFactory {
 	 * 							AST subtree identified by <code>scope</code>.
 	 * @throws JavaModelException
 	 */
-	public static IASTFragment createFragmentForSourceRange(SourceRange range, ASTNode scope, ICompilationUnit cu) throws JavaModelException {
+	public static IASTFragment createFragmentForSourceRange(ISourceRange range, ASTNode scope, ICompilationUnit cu) throws JavaModelException {
 		SelectionAnalyzer sa= new SelectionAnalyzer(Selection.createFromStartLength(range.getOffset(), range.getLength()), false);
 		scope.accept(sa);
 
@@ -87,15 +88,16 @@ public class ASTFragmentFactory {
 	/////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
-	private static boolean isEmptySelectionCoveredByANode(SourceRange range, SelectionAnalyzer sa) {
+	private static boolean isEmptySelectionCoveredByANode(ISourceRange range, SelectionAnalyzer sa) {
 		return range.getLength() == 0 && sa.getFirstSelectedNode() == null && sa.getLastCoveringNode() != null;
 	}
 
-	private static boolean isSingleNodeSelected(SelectionAnalyzer sa, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+	private static boolean isSingleNodeSelected(SelectionAnalyzer sa, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 		return sa.getSelectedNodes().length == 1 && !rangeIncludesNonWhitespaceOutsideNode(range, sa.getFirstSelectedNode(), cu);
 	}
-	private static boolean rangeIncludesNonWhitespaceOutsideNode(SourceRange range, ASTNode node, ICompilationUnit cu) throws JavaModelException {
-		return Util.rangeIncludesNonWhitespaceOutsideRange(range, new SourceRange(node), cu.getBuffer());
+
+	private static boolean rangeIncludesNonWhitespaceOutsideNode(ISourceRange range, ASTNode node, ICompilationUnit cu) throws JavaModelException {
+		return Util.rangeIncludesNonWhitespaceOutsideRange(range, SourceRangeFactory.create(node), cu.getBuffer());
 	}
 
 
@@ -104,7 +106,7 @@ public class ASTFragmentFactory {
 	 * the node, do not correspond to a valid node-sub-part
 	 * fragment.
 	 */
-	private static IASTFragment createFragmentForSubPartBySourceRange(ASTNode node, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+	private static IASTFragment createFragmentForSubPartBySourceRange(ASTNode node, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 		return FragmentForSubPartBySourceRangeFactory.createFragmentFor(node, range, cu);
 	}
 
@@ -135,12 +137,12 @@ public class ASTFragmentFactory {
 		}
 	}
 	private static class FragmentForSubPartBySourceRangeFactory extends FragmentFactory {
-		private SourceRange fRange;
+		private ISourceRange fRange;
 		private ICompilationUnit fCu;
 
 		private JavaModelException javaModelException= null;
 
-		public static IASTFragment createFragmentFor(ASTNode node, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+		public static IASTFragment createFragmentFor(ASTNode node, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 			return new FragmentForSubPartBySourceRangeFactory().createFragment(node, range, cu);
 		}
 
@@ -158,7 +160,7 @@ public class ASTFragmentFactory {
 			return false;
 		}
 
-		protected IASTFragment createFragment(ASTNode node, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+		protected IASTFragment createFragment(ASTNode node, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 			fRange= range;
 			fCu= cu;
 			IASTFragment result= createFragment(node);
@@ -167,7 +169,7 @@ public class ASTFragmentFactory {
 			return result;
 		}
 
-		private static IExpressionFragment createInfixExpressionSubPartFragmentBySourceRange(InfixExpression node, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+		private static IExpressionFragment createInfixExpressionSubPartFragmentBySourceRange(InfixExpression node, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 			return AssociativeInfixExpressionFragment.createSubPartFragmentBySourceRange(node, range, cu);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/AssociativeInfixExpressionFragment.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/AssociativeInfixExpressionFragment.java
index 639796e..9c81b6d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/AssociativeInfixExpressionFragment.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/AssociativeInfixExpressionFragment.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,9 @@ import org.eclipse.core.runtime.Assert;
 import org.eclipse.text.edits.TextEditGroup;
 
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Expression;
@@ -29,7 +31,7 @@ import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
 import org.eclipse.jdt.internal.corext.dom.JdtASTMatcher;
@@ -39,11 +41,11 @@ class AssociativeInfixExpressionFragment extends ASTFragment implements IExpress
 	private final List/*<Expression>*/ fOperands;
 	private final InfixExpression fGroupRoot;
 
-	public static IExpressionFragment createSubPartFragmentBySourceRange(InfixExpression node, SourceRange range, ICompilationUnit cu) throws JavaModelException {
+	public static IExpressionFragment createSubPartFragmentBySourceRange(InfixExpression node, ISourceRange range, ICompilationUnit cu) throws JavaModelException {
 		Assert.isNotNull(node);
 		Assert.isNotNull(range);
-		Assert.isTrue(!range.covers(node));
-		Assert.isTrue(new SourceRange(node).covers(range));
+		Assert.isTrue(!Util.covers(range, node));
+		Assert.isTrue(Util.covers(SourceRangeFactory.create(node), range));
 
 		if(!isAssociativeInfix(node))
 			return null;
@@ -89,7 +91,7 @@ class AssociativeInfixExpressionFragment extends ASTFragment implements IExpress
 		return node;
 	}
 
-	private static List findSubGroupForSourceRange(List/*<Expression>*/ group, SourceRange range) {
+	private static List findSubGroupForSourceRange(List/*<Expression>*/group, ISourceRange range) {
 		Assert.isTrue(!group.isEmpty());
 
 		List subGroup= new ArrayList();
@@ -114,7 +116,7 @@ class AssociativeInfixExpressionFragment extends ASTFragment implements IExpress
 			}
 		}
 		ASTNode lastGroupMember= (ASTNode)group.get(group.size() - 1);
-		if(range.getEndExclusive() == new SourceRange(lastGroupMember).getEndExclusive()) {
+		if (Util.getEndExclusive(range) == Util.getEndExclusive(SourceRangeFactory.create(lastGroupMember))) {
 			subGroup.add(lastGroupMember);
 			exited= true;
 		}
@@ -124,23 +126,24 @@ class AssociativeInfixExpressionFragment extends ASTFragment implements IExpress
 		return subGroup;
 	}
 
-	private static boolean rangeStartsBetween(SourceRange range, ASTNode first, ASTNode next) {
+
+	private static boolean rangeStartsBetween(ISourceRange range, ASTNode first, ASTNode next) {
 		int pos= range.getOffset();
 		return    first.getStartPosition() + first.getLength() <= pos
 		        && pos <= next.getStartPosition();
 	}
 
-	private static boolean rangeEndsBetween(SourceRange range, ASTNode first, ASTNode next) {
-		int pos= range.getEndExclusive();
+	private static boolean rangeEndsBetween(ISourceRange range, ASTNode first, ASTNode next) {
+		int pos= Util.getEndExclusive(range);
 		return    first.getStartPosition() + first.getLength() <= pos
 		        && pos <= next.getStartPosition();
 	}
 
-	private static boolean rangeIncludesExtraNonWhitespace(SourceRange range, List/*<Expression>*/ operands, ICompilationUnit cu) throws JavaModelException {
+	private static boolean rangeIncludesExtraNonWhitespace(ISourceRange range, List/*<Expression>*/operands, ICompilationUnit cu) throws JavaModelException {
 		return Util.rangeIncludesNonWhitespaceOutsideRange(range, getRangeOfOperands(operands), cu.getBuffer());
 	}
 
-	private static SourceRange getRangeOfOperands(List/*<Expression>*/ operands) {
+	private static ISourceRange getRangeOfOperands(List/*<Expression>*/operands) {
 		Expression first= (Expression) operands.get(0);
 		Expression last= (Expression) operands.get(operands.size() - 1);
 		return new SourceRange(first.getStartPosition(), last.getStartPosition() + last.getLength() - first.getStartPosition());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/Util.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/Util.java
index dccf186..1afc037 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/Util.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/fragments/Util.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,15 @@ package org.eclipse.jdt.internal.corext.dom.fragments;
 import org.eclipse.core.runtime.Assert;
 
 import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ToolFactory;
 import org.eclipse.jdt.core.compiler.IScanner;
 import org.eclipse.jdt.core.compiler.ITerminalSymbols;
 import org.eclipse.jdt.core.compiler.InvalidInputException;
+import org.eclipse.jdt.core.dom.ASTNode;
+
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 
 /**
  * This class houses a collection of static methods which do not refer to,
@@ -28,8 +31,8 @@ import org.eclipse.jdt.internal.corext.SourceRange;
  * they could be moved to some less specialized package.
  */
 class Util {
-	static boolean rangeIncludesNonWhitespaceOutsideRange(SourceRange selection, SourceRange nodes, IBuffer buffer) {
-		if(!selection.covers(nodes))
+	static boolean rangeIncludesNonWhitespaceOutsideRange(ISourceRange selection, ISourceRange nodes, IBuffer buffer) {
+		if (!covers(selection, nodes))
 			return false;
 
 		//TODO: skip leading comments. Consider that leading line comment must be followed by newline!
@@ -62,4 +65,22 @@ class Util {
 			}
 		}
 	}
+
+	public static int getEndExclusive(ISourceRange sourceRange) {
+		return sourceRange.getOffset() + sourceRange.getLength();
+	}
+
+	public static int getEndInclusive(ISourceRange sourceRange) {
+		return getEndExclusive(sourceRange) - 1;
+	}
+
+	public static boolean covers(ISourceRange sourceRange, ASTNode astNode) {
+		return covers(sourceRange, SourceRangeFactory.create(astNode));
+	}
+
+	public static boolean covers(ISourceRange thisRange, ISourceRange otherRange) {
+		return thisRange.getOffset() <= otherRange.getOffset()
+				&& getEndInclusive(thisRange) >= getEndInclusive(otherRange);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java
index cbfb71d..e07bca9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/AddUnimplementedMethodsOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
  *******************************************************************************/
 
 package org.eclipse.jdt.internal.corext.fix;
 
+import java.util.Arrays;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 
@@ -36,6 +39,7 @@ import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
 import org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFix.CompilationUnitRewriteOperation;
 import org.eclipse.jdt.internal.corext.refactoring.structure.CompilationUnitRewrite;
 import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.corext.util.MethodsSourcePositionComparator;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
 
@@ -114,7 +118,11 @@ public class AddUnimplementedMethodsOperation extends CompilationUnitRewriteOper
 		IMethodBinding[] methodsToOverride= getMethodsToImplement();
 		StringBuffer buf= new StringBuffer();
 		buf.append("<b>"); //$NON-NLS-1$
-		buf.append(Messages.format(CorrectionMessages.UnimplementedMethodsCorrectionProposal_info, String.valueOf(methodsToOverride.length)));
+		if (methodsToOverride.length == 1) {
+			buf.append(CorrectionMessages.UnimplementedMethodsCorrectionProposal_info_singular);
+		} else {
+			buf.append(Messages.format(CorrectionMessages.UnimplementedMethodsCorrectionProposal_info_plural, String.valueOf(methodsToOverride.length)));
+		}
 		buf.append("</b><ul>"); //$NON-NLS-1$
 		for (int i= 0; i < methodsToOverride.length; i++) {
 			buf.append("<li>"); //$NON-NLS-1$
@@ -153,6 +161,8 @@ public class AddUnimplementedMethodsOperation extends CompilationUnitRewriteOper
 		if (binding == null)
 			return new IMethodBinding[0];
 
-		return StubUtility2.getUnimplementedMethods(binding, implementAbstractsOfInput);
+		IMethodBinding[] unimplementedMethods= StubUtility2.getUnimplementedMethods(binding, implementAbstractsOfInput);
+		Arrays.sort(unimplementedMethods, new MethodsSourcePositionComparator(binding));
+		return unimplementedMethods;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpConstants.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpConstants.java
index 9f86f6c..95d1a8b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpConstants.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -197,15 +197,13 @@ public class CleanUpConstants {
 	/**
 	 * Adds a 'this' qualifier to field accesses.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     int fField;
 	 *                     void foo() {fField= 10;} -> void foo() {this.fField= 10;}
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_NON_STATIC_FIELD_USE_THIS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -221,15 +219,13 @@ public class CleanUpConstants {
 	/**
 	 * Removes 'this' qualifier to field accesses.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     int fField;
 	 *                     void foo() {this.fField= 10;} -> void foo() {fField= 10;}
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_NON_STATIC_FIELD_USE_THIS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -260,15 +256,13 @@ public class CleanUpConstants {
 	/**
 	 * Adds a 'this' qualifier to method accesses.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     int method(){};
 	 *                     void foo() {method()} -> void foo() {this.method();}
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_NON_STATIC_METHOD_USE_THIS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -282,17 +276,15 @@ public class CleanUpConstants {
 	public static final String MEMBER_ACCESSES_NON_STATIC_METHOD_USE_THIS_ALWAYS= "cleanup.always_use_this_for_non_static_method_access"; //$NON-NLS-1$
 
 	/**
-	 * Removes 'this' qualifier to field accesses.
+	 * Removes 'this' qualifier from field accesses.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     int fField;
 	 *                     void foo() {this.fField= 10;} -> void foo() {fField= 10;}
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_NON_STATIC_METHOD_USE_THIS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -325,15 +317,13 @@ public class CleanUpConstants {
 	/**
 	 * Qualify static field accesses with declaring type.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   class E {
 	 *                     public static int i;
 	 *                     void foo() {i= 10;} -> void foo() {E.i= 10;}
 	 *                   }
-	 * </code>
 	 * </pre>
 	 * 
 	 * <br>
@@ -352,18 +342,15 @@ public class CleanUpConstants {
 	/**
 	 * Qualifies static method accesses with declaring type.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   class E {
 	 *                     public static int m();
 	 *                     void foo() {m();} -> void foo() {E.m();}
 	 *                   }
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -379,18 +366,15 @@ public class CleanUpConstants {
 	/**
 	 * Changes indirect accesses to static members to direct ones.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   class E {public static int i;}
 	 *                   class ESub extends E {
 	 *                     void foo() {ESub.i= 10;} -> void foo() {E.i= 10;}
 	 *                   }
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -406,18 +390,15 @@ public class CleanUpConstants {
 	/**
 	 * Changes non static accesses to static members to static accesses.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   class E {
 	 *                     public static int i;
 	 *                     void foo() {(new E()).i= 10;} -> void foo() {E.i= 10;}
 	 *                   }
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -448,15 +429,12 @@ public class CleanUpConstants {
 	/**
 	 * Adds block to control statement body if the body is not a block.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   	 if (b) foo(); -> if (b) {foo();}
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #CONTROL_STATEMENTS_USE_BLOCKS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -473,15 +451,12 @@ public class CleanUpConstants {
 	 * Remove unnecessary blocks in control statement bodies if they contain a single return or
 	 * throw statement.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     if (b) {return;} -> if (b) return;
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #CONTROL_STATEMENTS_USE_BLOCKS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -497,15 +472,12 @@ public class CleanUpConstants {
 	/**
 	 * Remove unnecessary blocks in control statement bodies.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                     if (b) {foo();} -> if (b) foo();
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #CONTROL_STATEMENTS_USE_BLOCKS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -521,16 +493,12 @@ public class CleanUpConstants {
 	/**
 	 * Convert for loops to enhanced for loops.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   for (int i = 0; i < array.length; i++) {} -> for (int element : array) {}
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
-	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
 	 * 
 	 * <br>
@@ -542,7 +510,7 @@ public class CleanUpConstants {
 	public static final String CONTROL_STATMENTS_CONVERT_FOR_LOOP_TO_ENHANCED= "cleanup.convert_to_enhanced_for_loop"; //$NON-NLS-1$
 
 	/**
-	 * Controls the usage of parenthesis in expressions. For detailed settings use<br>
+	 * Controls the usage of parentheses in expressions. For detailed settings use<br>
 	 * {@link #EXPRESSIONS_USE_PARENTHESES_ALWAYS}<br> {@link #EXPRESSIONS_USE_PARENTHESES_NEVER}<br>
 	 * <br>
 	 * <br>
@@ -557,18 +525,16 @@ public class CleanUpConstants {
 	public static final String EXPRESSIONS_USE_PARENTHESES= "cleanup.use_parentheses_in_expressions"; //$NON-NLS-1$
 
 	/**
-	 * Add paranoic parenthesis around conditional expressions.
+	 * Add paranoiac parentheses around conditional expressions.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   boolean b= i > 10 && i < 100 || i > 20;
 	 *                   ->
 	 *                   boolean b= ((i > 10) && (i < 100)) || (i > 20);
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #EXPRESSIONS_USE_PARENTHESES} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -584,16 +550,14 @@ public class CleanUpConstants {
 	/**
 	 * Remove unnecessary parenthesis around conditional expressions.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   boolean b= ((i > 10) && (i < 100)) || (i > 20);
 	 *                   ->
 	 *                   boolean b= i > 10 && i < 100 || i > 20;
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #EXPRESSIONS_USE_PARENTHESES} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -626,12 +590,9 @@ public class CleanUpConstants {
 	 * Add a final modifier to private fields where possible i.e.:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   private int field= 0; -> private final int field= 0;
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #VARIABLE_DECLARATIONS_USE_FINAL} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -648,12 +609,9 @@ public class CleanUpConstants {
 	 * Add a final modifier to method parameters where possible i.e.:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   void foo(int i) {} -> void foo(final int i) {}
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #VARIABLE_DECLARATIONS_USE_FINAL} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -670,12 +628,9 @@ public class CleanUpConstants {
 	 * Add a final modifier to local variables where possible i.e.:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   int i= 0; -> final int i= 0;
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Only has an effect if {@link #VARIABLE_DECLARATIONS_USE_FINAL} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -691,15 +646,12 @@ public class CleanUpConstants {
 	/**
 	 * Adds type parameters to raw type references.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   List l; -> List<Object> l;
-	 * </code>
 	 * </pre>
 	 * 
-	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
 	 * Default value: Not set<br>
 	 * <br>
@@ -823,12 +775,10 @@ public class CleanUpConstants {
 	/**
 	 * Remove unnecessary '$NON-NLS$' tags.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 * String s; //$NON-NLS-1$ -> String s;
-	 * </code>
 	 * </pre>
 	 * 
 	 * <br>
@@ -860,17 +810,15 @@ public class CleanUpConstants {
 	/**
 	 * Add '@Override' annotation in front of overriding methods.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   class E1 {void foo();}
 	 *                   class E2 extends E1 {
 	 *                   	 void foo(); ->  @Override void foo();
 	 *                   }
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #ADD_MISSING_ANNOTATIONS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -884,12 +832,36 @@ public class CleanUpConstants {
 	public static final String ADD_MISSING_ANNOTATIONS_OVERRIDE= "cleanup.add_missing_override_annotations"; //$NON-NLS-1$
 
 	/**
+	 * Add '@Override' annotation in front of methods that override or implement a superinterface method.
+	 * <p>
+	 * Example:
+	 * 
+	 * <pre>
+	 *                   interface I {void foo();}
+	 *                   class E implements I {
+	 *                   	 void foo(); ->  @Override void foo();
+	 *                   }
+	 * </pre>
+	 * 
+	 * Only has an effect if {@link #ADD_MISSING_ANNOTATIONS} and {@link #ADD_MISSING_ANNOTATIONS_OVERRIDE} are TRUE and
+	 * the compiler compliance is 1.6 or higher.<br>
+	 * <br>
+	 * Possible values: {TRUE, FALSE}<br>
+	 * 
+	 * <br>
+	 * 
+	 * @see CleanUpOptions#TRUE
+	 * @see CleanUpOptions#FALSE
+	 * @since 3.6
+	 */
+	public static final String ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION= "cleanup.add_missing_override_annotations_interface_methods"; //$NON-NLS-1$
+	
+	/**
 	 * Add '@Deprecated' annotation in front of deprecated members.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                         /**@deprecated* /
 	 *                        int i;
 	 *                    ->
@@ -898,7 +870,6 @@ public class CleanUpConstants {
 	 *                        int i;
 	 * </pre>
 	 * 
-	 * </code> <br>
 	 * Only has an effect if {@link #ADD_MISSING_ANNOTATIONS} is TRUE <br>
 	 * <br>
 	 * Possible values: {TRUE, FALSE}<br>
@@ -965,12 +936,10 @@ public class CleanUpConstants {
 	/**
 	 * Add '$NON-NLS$' tags to non externalized strings.
 	 * <p>
-	 * i.e.:
+	 * Example:
 	 * 
 	 * <pre>
-	 * <code>
 	 *                   	 String s= ""; -> String s= ""; //$NON-NLS-1$
-	 * </code>
 	 * </pre>
 	 * 
 	 * <br>
@@ -1056,9 +1025,7 @@ public class CleanUpConstants {
 	 * Following code snippet can load the profiles:
 	 * 
 	 * <pre>
-	 * <code>
 	 * List profiles= new ProfileStore(CLEANUP_PROFILES, new CleanUpVersioner()).readProfiles(new InstanceScope());
-	 * </code>
 	 * </pre>
 	 * 
 	 * @since 3.3
@@ -1185,6 +1152,7 @@ public class CleanUpConstants {
 		//Missing Code
 		options.setOption(ADD_MISSING_ANNOTATIONS, CleanUpOptions.TRUE);
 		options.setOption(ADD_MISSING_ANNOTATIONS_OVERRIDE, CleanUpOptions.TRUE);
+		options.setOption(ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION, CleanUpOptions.TRUE);
 		options.setOption(ADD_MISSING_ANNOTATIONS_DEPRECATED, CleanUpOptions.TRUE);
 
 		options.setOption(ADD_MISSING_SERIAL_VERSION_ID, CleanUpOptions.FALSE);
@@ -1264,6 +1232,7 @@ public class CleanUpConstants {
 		//Missing Code
 		options.setOption(ADD_MISSING_ANNOTATIONS, CleanUpOptions.TRUE);
 		options.setOption(ADD_MISSING_ANNOTATIONS_OVERRIDE, CleanUpOptions.TRUE);
+		options.setOption(ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION, CleanUpOptions.TRUE);
 		options.setOption(ADD_MISSING_ANNOTATIONS_DEPRECATED, CleanUpOptions.TRUE);
 
 		options.setOption(ADD_MISSING_SERIAL_VERSION_ID, CleanUpOptions.FALSE);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpPostSaveListener.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpPostSaveListener.java
index c26243c..418f7bd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpPostSaveListener.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CleanUpPostSaveListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.core.filebuffers.ITextFileBuffer;
 import org.eclipse.core.filebuffers.ITextFileBufferManager;
 import org.eclipse.core.filebuffers.LocationKind;
 
+import org.eclipse.text.edits.MalformedTreeException;
 import org.eclipse.text.edits.TextEdit;
 import org.eclipse.text.edits.UndoEdit;
 
@@ -147,41 +148,69 @@ public class CleanUpPostSaveListener implements IPostSaveListener {
 			try {
 				manager.connect(fFile.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(pm, 1));
 				buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE);
-				IDocument document= buffer.getDocument();
-
-				long oldFileValue= fFile.getModificationStamp();
-				long oldDocValue;
-				if (document instanceof IDocumentExtension4) {
-					oldDocValue= ((IDocumentExtension4)document).getModificationStamp();
+				
+				final IDocument document= buffer.getDocument();
+				final long oldFileValue= fFile.getModificationStamp();
+				final LinkedList undoEditCollector= new LinkedList();
+				final long[] oldDocValue= new long[1];
+				final boolean[] setContentStampSuccess= { false };
+				
+				if (! buffer.isSynchronizationContextRequested()) {
+					performEdit(document, oldFileValue, undoEditCollector, oldDocValue, setContentStampSuccess);
+					
 				} else {
-					oldDocValue= oldFileValue;
-				}
-
-				// perform the changes
-				LinkedList list= new LinkedList();
-				for (int index= 0; index < fUndos.length; index++) {
-					UndoEdit edit= fUndos[index];
-					UndoEdit redo= edit.apply(document, TextEdit.CREATE_UNDO);
-					list.addFirst(redo);
-				}
-
-				boolean stampSetted= false;
-
-				if (document instanceof IDocumentExtension4 && fDocumentStamp != IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP) {
-					try {
-						((IDocumentExtension4)document).replace(0, 0, "", fDocumentStamp); //$NON-NLS-1$
-						stampSetted= true;
-					} catch (BadLocationException e) {
-						throw wrapBadLocationException(e);
+					ITextFileBufferManager fileBufferManager= FileBuffers.getTextFileBufferManager();
+					
+					class UIRunnable implements Runnable {
+						public boolean fDone;
+						public Exception fException;
+						
+						public void run() {
+							synchronized (this) {
+								try {
+									performEdit(document, oldFileValue, undoEditCollector, oldDocValue, setContentStampSuccess);
+								} catch (BadLocationException e) {
+									fException= e;
+								} catch (MalformedTreeException e) {
+									fException= e;
+								} catch (CoreException e) {
+									fException= e;
+								} finally {
+									fDone= true;
+									notifyAll();
+								}
+							}
+						}
+					}
+					UIRunnable runnable= new UIRunnable();
+					
+					synchronized (runnable) {
+						fileBufferManager.execute(runnable);
+						while (! runnable.fDone) {
+							try {
+								runnable.wait(500);
+							} catch (InterruptedException x) {
+							}
+						}
+					}
+					
+					if (runnable.fException != null) {
+						if (runnable.fException instanceof BadLocationException) {
+							throw (BadLocationException) runnable.fException;
+						} else if (runnable.fException instanceof MalformedTreeException) {
+							throw (MalformedTreeException) runnable.fException;
+						} else if (runnable.fException instanceof CoreException) {
+							throw (CoreException) runnable.fException;
+						}
 					}
 				}
 
 				buffer.commit(pm, false);
-				if (!stampSetted) {
+				if (!setContentStampSuccess[0]) {
 					fFile.revertModificationStamp(fFileStamp);
 				}
 
-				return new CleanUpSaveUndo(getName(), fFile, ((UndoEdit[]) list.toArray(new UndoEdit[list.size()])), oldDocValue, oldFileValue);
+				return new CleanUpSaveUndo(getName(), fFile, ((UndoEdit[]) undoEditCollector.toArray(new UndoEdit[undoEditCollector.size()])), oldDocValue[0], oldFileValue);
 			} catch (BadLocationException e) {
 				throw wrapBadLocationException(e);
 			} finally {
@@ -189,6 +218,30 @@ public class CleanUpPostSaveListener implements IPostSaveListener {
 					manager.disconnect(fFile.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(pm, 1));
 			}
 		}
+
+		private void performEdit(IDocument document, long oldFileValue, LinkedList editCollector, long[] oldDocValue, boolean[] setContentStampSuccess) throws MalformedTreeException, BadLocationException, CoreException {
+			if (document instanceof IDocumentExtension4) {
+				oldDocValue[0]= ((IDocumentExtension4)document).getModificationStamp();
+			} else {
+				oldDocValue[0]= oldFileValue;
+			}
+
+			// perform the changes
+			for (int index= 0; index < fUndos.length; index++) {
+				UndoEdit edit= fUndos[index];
+				UndoEdit redo= edit.apply(document, TextEdit.CREATE_UNDO);
+				editCollector.addFirst(redo);
+			}
+
+			if (document instanceof IDocumentExtension4 && fDocumentStamp != IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP) {
+				try {
+					((IDocumentExtension4)document).replace(0, 0, "", fDocumentStamp); //$NON-NLS-1$
+					setContentStampSuccess[0]= true;
+				} catch (BadLocationException e) {
+					throw wrapBadLocationException(e);
+				}
+			}
+		}
 	}
 
 	private static final class SlowCleanUpWarningDialog extends OptionalMessageDialog {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CodeStyleFix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CodeStyleFix.java
index e84f5e6..84e5603 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CodeStyleFix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/CodeStyleFix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,6 +65,7 @@ import org.eclipse.jdt.internal.corext.util.Messages;
 import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
 import org.eclipse.jdt.ui.text.java.IProblemLocation;
 
+import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 import org.eclipse.jdt.internal.ui.text.correction.ProblemLocation;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
@@ -466,14 +467,16 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 		}
 
 		private void extractQualifier(Expression qualifier, CompilationUnitRewrite cuRewrite, TextEditGroup group) {
+			Statement statement= ASTResolving.findParentStatement(qualifier);
+			if (statement == null)
+				return;
+			
 			ASTRewrite astRewrite= cuRewrite.getASTRewrite();
 			AST ast= cuRewrite.getAST();
 
 			Expression expression= (Expression) astRewrite.createMoveTarget(qualifier);
 			ExpressionStatement newStatement= ast.newExpressionStatement(expression);
 
-			Statement statement= (Statement) ASTNodes.getParent(qualifier, Statement.class);
-
 			if (statement.getParent() instanceof Block) {
 				Block block= (Block) statement.getParent();
 				ListRewrite listRewrite= astRewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY);
@@ -512,7 +515,7 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 		if (!isNonStaticAccess(problem))
 			return null;
 
-		ToStaticAccessOperation operations[]= createToStaticAccessOperations(compilationUnit, new HashMap(), problem);
+		ToStaticAccessOperation operations[]= createToStaticAccessOperations(compilationUnit, new HashMap(), problem, false);
 		if (operations == null)
 			return null;
 
@@ -543,7 +546,7 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 		if (!isIndirectStaticAccess(problem))
 			return null;
 
-		ToStaticAccessOperation operations[]= createToStaticAccessOperations(compilationUnit, new HashMap(), problem);
+		ToStaticAccessOperation operations[]= createToStaticAccessOperations(compilationUnit, new HashMap(), problem, false);
 		if (operations == null)
 			return null;
 
@@ -628,7 +631,7 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 			boolean isNonStaticAccess= changeNonStaticAccessToStatic && isNonStaticAccess(problem);
 			boolean isIndirectStaticAccess= changeIndirectStaticAccessToDirect && isIndirectStaticAccess(problem);
 			if (isNonStaticAccess || isIndirectStaticAccess) {
-				ToStaticAccessOperation[] nonStaticAccessInformation= createToStaticAccessOperations(compilationUnit, createdBlocks, problem);
+				ToStaticAccessOperation[] nonStaticAccessInformation= createToStaticAccessOperations(compilationUnit, createdBlocks, problem, true);
 				if (nonStaticAccessInformation != null) {
 					ToStaticAccessOperation op= nonStaticAccessInformation[0];
 
@@ -667,7 +670,7 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 				|| problem.getProblemId() == IProblem.NonStaticAccessToStaticMethod);
 	}
 
-	private static ToStaticAccessOperation[] createToStaticAccessOperations(CompilationUnit astRoot, HashMap createdBlocks, IProblemLocation problem) {
+	private static ToStaticAccessOperation[] createToStaticAccessOperations(CompilationUnit astRoot, HashMap createdBlocks, IProblemLocation problem, boolean conservative) {
 		ASTNode selectedNode= problem.getCoveringNode(astRoot);
 		if (selectedNode == null) {
 			return null;
@@ -702,6 +705,9 @@ public class CodeStyleFix extends CompilationUnitRewriteOperationsFix {
 		}
 
 		if (accessBinding != null && qualifier != null) {
+			if (conservative && ASTResolving.findParentStatement(qualifier) == null)
+				return null;
+			
 			ToStaticAccessOperation declaring= null;
 			ITypeBinding declaringTypeBinding= getDeclaringTypeBinding(accessBinding);
 			if (declaringTypeBinding != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java
index 1cdf243..dd750ce 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -534,7 +534,7 @@ public final class ConvertIterableLoopOperation extends ConvertLoopOperation {
 								}
 							}
 						}
-						return false;
+						return true;
 					}
 
 					public final boolean visit(final VariableDeclarationFragment node) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ExpressionsFix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ExpressionsFix.java
index 856e1e8..5493a37 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ExpressionsFix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ExpressionsFix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@ import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
 import org.eclipse.jdt.internal.corext.refactoring.code.OperatorPrecedence;
 import org.eclipse.jdt.internal.corext.refactoring.structure.CompilationUnitRewrite;
+import org.eclipse.jdt.internal.corext.refactoring.util.NoCommentSourceRangeComputer;
 
 import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
 
@@ -304,6 +305,7 @@ public class ExpressionsFix extends CompilationUnitRewriteOperationsFix {
 			TextEditGroup group= createTextEditGroup(FixMessages.ExpressionsFix_removeUnnecessaryParenthesis_description, cuRewrite);
 
 			ASTRewrite rewrite= cuRewrite.getASTRewrite();
+			rewrite.setTargetSourceRangeComputer(new NoCommentSourceRangeComputer());
 
 			while (fExpressions.size() > 0) {
 				ParenthesizedExpression parenthesizedExpression= (ParenthesizedExpression)fExpressions.iterator().next();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.java
index 0bdeadb..9a639f3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.java	
@@ -18,7 +18,6 @@ public final class FixMessages extends NLS {
 	private FixMessages() {
 	}
 
-	public static String CleanUpPostSaveListener_exception_error;
 	public static String CleanUpPostSaveListener_name;
 	public static String CleanUpPostSaveListener_SaveAction_ChangeName;
 	public static String CleanUpPostSaveListener_SlowCleanUpDialog_link;
@@ -55,16 +54,17 @@ public final class FixMessages extends NLS {
 	public static String Java50Fix_add_type_parameters_change_name;
 	public static String PotentialProgrammingProblemsFix_add_id_change_name;
 
-	public static String PotentialProgrammingProblemsFix_calculatingUIDFailed_binding;
 	public static String PotentialProgrammingProblemsFix_calculatingUIDFailed_exception;
 	public static String PotentialProgrammingProblemsFix_calculatingUIDFailed_unknown;
 	public static String SortMembersFix_Change_description;
 	public static String SortMembersFix_Fix_description;
 	public static String UnusedCodeFix_change_name;
-	public static String UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview;
+	public static String UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_singular;
+	public static String UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_plural;
 
 	public static String UnusedCodeFix_RemoveFieldOrLocal_description;
-	public static String UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview;
+	public static String UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_singular;
+	public static String UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_plural;
 	public static String UnusedCodeFix_RemoveFieldOrLocalWithInitializer_description;
 	public static String UnusedCodeFix_RemoveMethod_description;
 	public static String UnusedCodeFix_RemoveConstructor_description;
@@ -81,7 +81,6 @@ public final class FixMessages extends NLS {
 	public static String Java50Fix_AddDeprecated_description;
 	public static String Java50Fix_AddOverride_description;
 	public static String Java50Fix_ConvertToEnhancedForLoop_description;
-	public static String Java50Fix_ParametrizeTypeReference_description;
 	public static String Java50Fix_AddTypeArguments_description;
 	public static String Java50Fix_SerialVersion_default_description;
 	public static String Java50Fix_SerialVersion_hash_description;
@@ -93,7 +92,6 @@ public final class FixMessages extends NLS {
 	public static String StringFix_RemoveNonNls_description;
 
 	public static String CodeStyleFix_ChangeAccessToStatic_description;
-	public static String CodeStyleFix_AddThisQualifier_description;
 	public static String CodeStyleFix_QualifyWithThis_description;
 	public static String CodeStyleFix_ChangeAccessToStaticUsingInstanceType_description;
 	public static String CodeStyleFix_ChangeStaticAccess_description;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.properties
index ef1709d..d7ce3a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/FixMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ CleanUpRefactoring_could_not_retrive_profile=Could not retrieve profile for proj
 CleanUpRefactoring_ProcessingCompilationUnit_message=Processing compilation unit {0} of {1} ({2})
 CleanUpRefactoring_checkingPostConditions_message=Checking post conditions
 
-CleanUpRegistry_ErrorTabPage_description=An error occured while creating this page:\n{0}\n\nSee the error log for details.
+CleanUpRegistry_ErrorTabPage_description=An error occurred while creating this page:\n{0}\n\nSee the error log for details.
 CleanUpRegistry_ErrorTabPage_preview=No preview available
 CleanUpRegistry_UnknownInitializerKind_errorMessage=The cleanUpOptionsInitializer contributed by ''{0}'' specified a wrong clean up kind: ''{1}''.
 CleanUpRegistry_WrongKindForConfigurationUI_error=The cleanUpConfigurationUI ''{0}'' contributed by ''{1}'' specified a wrong clean up kind: ''{2}''.
@@ -25,8 +25,10 @@ CleanUpRegistry_cleanUpAlwaysEnabled_error=The clean up ''{0}'' contributed by '
 CleanUpRegistry_cleanUpCreation_error=The clean up ''{0}'' contributed by ''{1}'' has been disabled because it failed during initialization.
 UnusedCodeFix_RemoveFieldOrLocal_description=Remove ''{0}'', keep side-effect assignments
 UnusedCodeFix_RemoveFieldOrLocalWithInitializer_description=Remove ''{0}'' and all assignments
-UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview=<br>removing <b>{0}</b> assignment(s)
-UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview=<br>modifying <b>{0}</b> assignment(s)
+UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_singular=<br>removing <b>1</b> assignment
+UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_plural=<br>removing <b>{0}</b> assignments
+UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_singular=<br>modifying <b>1</b> assignment
+UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_plural=<br>modifying <b>{0}</b> assignments
 UnusedCodeFix_RemoveUnusedConstructor_description=Remove unused private constructor
 UnusedCodeFix_RemoveUnusedPrivateMethod_description=Remove unused private method
 UnusedCodeFix_RemoveUnusedVariabl_description=Remove unused local variable
@@ -44,7 +46,6 @@ Java50Fix_SerialVersion_default_description=Add default serial version ID
 Java50Fix_AddTypeArguments_description=Add type arguments to ''{0}''
 Java50Fix_SerialVersion_hash_description=Add generated serial version ID
 Java50Fix_ConvertToEnhancedForLoop_description=Convert to enhanced for loop
-Java50Fix_ParametrizeTypeReference_description=Parameterize Raw Type Reference
 Java50Fix_SerialVersion_CalculateHierarchy_description=Calculate Type Hierarchy for {0}
 Java50Fix_InitializeSerialVersionId_subtask_description=Searching for types with missing serial version ID
 Java50Fix_AddDeprecated_description=Add missing @Deprecated annotation
@@ -61,7 +62,6 @@ CodeStyleFix_ChangeControlToBlock_description=Change control statement body to b
 CodeStyleFix_ChangeStaticAccess_description=Change static access to ''{0}''
 CodeStyleFix_ChangeIfToBlock_desription=Change 'if' statement body to block
 CodeStyleFix_ChangeElseToBlock_description=Change 'else' statement body to block
-CodeStyleFix_AddThisQualifier_description=Add 'this' qualifier
 CodeStyleFix_QualifyWithThis_description=Qualify ''{0}'' with ''{1}''
 CodeStyleFix_QualifyMethodWithDeclClass_description=Qualify method call with declaring type
 CodeStyleFix_QualifyFieldWithDeclClass_description=Qualify field access with declaring type
@@ -83,7 +83,6 @@ VariableDeclarationFix_changeModifierOfUnknownToFinal_description=Change modifie
 VariableDeclarationFix_add_final_change_name=Add final
 VariableDeclarationFix_ChangeMidifiersToFinalWherPossible_description=Change modifiers to final where possible
 
-PotentialProgrammingProblemsFix_calculatingUIDFailed_binding=Could not calculate a serial version id for {0}. The type will be ignored. Reason: Could not resolve binding.
 PotentialProgrammingProblemsFix_calculatingUIDFailed_unknown=Could not calculate a serial version id for {0}. The type will be ignored.
 PotentialProgrammingProblemsFix_add_id_change_name=Add Serial Version ID
 PotentialProgrammingProblemsFix_calculatingUIDFailed_exception=Could not calculate serial version ids for serializable types in project {0}. The types will be ignored. Reason: {1}.
@@ -94,7 +93,6 @@ ConvertIterableLoopOperation_RemoveUpdateExpressions_Warning=The expressions in
 ImportsFix_OrganizeImports_Description=Organize Imports
 
 CleanUpPostSaveListener_name=Code Clean Up
-CleanUpPostSaveListener_exception_error=An exception occurred on ''{0}''.
 CleanUpPostSaveListener_SaveAction_ChangeName=Save Actions
 CleanUpPostSaveListener_SlowCleanUpDialog_link=If this happens again we recommend to disabled the corresponding save actions on the <a>Save Actions Preference Page</a>.
 CleanUpPostSaveListener_SlowCleanUpDialog_title=Slow Save Actions
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/Java50Fix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/Java50Fix.java
index 986ea54..334a593 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/Java50Fix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/Java50Fix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -151,31 +151,31 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 	}
 
 	public static Java50Fix createAddOverrideAnnotationFix(CompilationUnit compilationUnit, IProblemLocation problem) {
-		if (problem.getProblemId() != IProblem.MissingOverrideAnnotation)
+		if (!isMissingOverrideAnnotationProblem(problem.getProblemId()))
 			return null;
 
 		return createFix(compilationUnit, problem, OVERRIDE, FixMessages.Java50Fix_AddOverride_description);
 	}
 
+	public static boolean isMissingOverrideAnnotationInterfaceProblem(int id) {
+		return id == IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation;
+	}
+	
+	public static boolean isMissingOverrideAnnotationProblem(int id) {
+		return id == IProblem.MissingOverrideAnnotation || id == IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation;
+	}
+
 	public static Java50Fix createAddDeprectatedAnnotation(CompilationUnit compilationUnit, IProblemLocation problem) {
-		if (!isMissingDeprecationProblem(problem))
+		if (!isMissingDeprecationProblem(problem.getProblemId()))
 			return null;
 
 		return createFix(compilationUnit, problem, DEPRECATED, FixMessages.Java50Fix_AddDeprecated_description);
 	}
 
-	public static boolean isMissingDeprecationProblem(IProblemLocation problem) {
-		int id= problem.getProblemId();
-		if (id == IProblem.FieldMissingDeprecatedAnnotation)
-			return true;
-
-		if (id == IProblem.MethodMissingDeprecatedAnnotation)
-			return true;
-
-		if (id == IProblem.TypeMissingDeprecatedAnnotation)
-			return true;
-
-		return false;
+	public static boolean isMissingDeprecationProblem(int id) {
+		return id == IProblem.FieldMissingDeprecatedAnnotation
+				|| id == IProblem.MethodMissingDeprecatedAnnotation
+				|| id == IProblem.TypeMissingDeprecatedAnnotation;
 	}
 
 	private static Java50Fix createFix(CompilationUnit compilationUnit, IProblemLocation problem, String annotation, String label) {
@@ -209,6 +209,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 
 	public static ICleanUpFix createCleanUp(CompilationUnit compilationUnit,
 			boolean addOverrideAnnotation,
+			boolean addOverrideInterfaceAnnotation,
 			boolean addDeprecatedAnnotation,
 			boolean rawTypeReference) {
 
@@ -228,7 +229,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 		}
 
 		if (addOverrideAnnotation)
-			createAddOverrideAnnotationOperations(compilationUnit, locations, operations);
+			createAddOverrideAnnotationOperations(compilationUnit, addOverrideInterfaceAnnotation, locations, operations);
 
 		if (addDeprecatedAnnotation)
 			createAddDeprecatedAnnotationOperations(compilationUnit, locations, operations);
@@ -252,6 +253,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 
 	public static ICleanUpFix createCleanUp(CompilationUnit compilationUnit, IProblemLocation[] problems,
 			boolean addOverrideAnnotation,
+			boolean addOverrideInterfaceAnnotation,
 			boolean addDeprecatedAnnotation,
 			boolean rawTypeReferences) {
 
@@ -265,7 +267,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 		List/*<CompilationUnitRewriteOperation>*/ operations= new ArrayList();
 
 		if (addOverrideAnnotation)
-			createAddOverrideAnnotationOperations(compilationUnit, problems, operations);
+			createAddOverrideAnnotationOperations(compilationUnit, addOverrideInterfaceAnnotation, problems, operations);
 
 		if (addDeprecatedAnnotation)
 			createAddDeprecatedAnnotationOperations(compilationUnit, problems, operations);
@@ -283,14 +285,9 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 
 	private static void createAddDeprecatedAnnotationOperations(CompilationUnit compilationUnit, IProblemLocation[] locations, List result) {
 		for (int i= 0; i < locations.length; i++) {
-			int id= locations[i].getProblemId();
-
-			if (id == IProblem.FieldMissingDeprecatedAnnotation ||
-				id == IProblem.MethodMissingDeprecatedAnnotation ||
-				id == IProblem.TypeMissingDeprecatedAnnotation) {
-
-				IProblemLocation problem= locations[i];
+			IProblemLocation problem= locations[i];
 
+			if (isMissingDeprecationProblem(problem.getProblemId())) {
 				ASTNode selectedNode= problem.getCoveringNode(compilationUnit);
 				if (selectedNode != null) {
 
@@ -305,21 +302,22 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 		}
 	}
 
-	private static void createAddOverrideAnnotationOperations(CompilationUnit compilationUnit, IProblemLocation[] locations, List result) {
+	private static void createAddOverrideAnnotationOperations(CompilationUnit compilationUnit, boolean addOverrideInterfaceAnnotation, IProblemLocation[] locations, List result) {
 		for (int i= 0; i < locations.length; i++) {
-
-			if (locations[i].getProblemId() == IProblem.MissingOverrideAnnotation) {
-
-				IProblemLocation problem= locations[i];
-
-				ASTNode selectedNode= problem.getCoveringNode(compilationUnit);
-				if (selectedNode != null) {
-
-					ASTNode declaringNode= getDeclaringNode(selectedNode);
-					if (declaringNode instanceof BodyDeclaration) {
-						BodyDeclaration declaration= (BodyDeclaration) declaringNode;
-						AnnotationRewriteOperation operation= new AnnotationRewriteOperation(declaration, OVERRIDE);
-						result.add(operation);
+			IProblemLocation problem= locations[i];
+			int problemId= problem.getProblemId();
+			
+			if (isMissingOverrideAnnotationProblem(problemId)) {
+				if (!isMissingOverrideAnnotationInterfaceProblem(problemId) || addOverrideInterfaceAnnotation) {
+					ASTNode selectedNode= problem.getCoveringNode(compilationUnit);
+					if (selectedNode != null) {
+	
+						ASTNode declaringNode= getDeclaringNode(selectedNode);
+						if (declaringNode instanceof BodyDeclaration) {
+							BodyDeclaration declaration= (BodyDeclaration) declaringNode;
+							AnnotationRewriteOperation operation= new AnnotationRewriteOperation(declaration, OVERRIDE);
+							result.add(operation);
+						}
 					}
 				}
 			}
@@ -334,7 +332,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 		for (int i= 0; i < locations.length; i++) {
 			IProblemLocation problem= locations[i];
 
-			if (isRawTypeReference(problem)) {
+			if (isRawTypeReferenceProblem(problem.getProblemId())) {
 				ASTNode node= problem.getCoveredNode(compilationUnit);
 				if (node instanceof ClassInstanceCreation) {
 					ASTNode rawReference= (ASTNode)node.getStructuralProperty(ClassInstanceCreation.TYPE_PROPERTY);
@@ -344,7 +342,8 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 				} else if (node instanceof SimpleName) {
 					ASTNode rawReference= node.getParent();
 					if (isRawTypeReference(rawReference)) {
-						if (!(rawReference.getParent() instanceof ArrayType))
+						ASTNode parent= rawReference.getParent();
+						if (!(parent instanceof ArrayType || parent instanceof ParameterizedType))
 							result.add(rawReference);
 					}
 				} else if (node instanceof MethodInvocation) {
@@ -402,8 +401,7 @@ public class Java50Fix extends CompilationUnitRewriteOperationsFix {
 		return false;
 	}
 
-	public static boolean isRawTypeReference(IProblemLocation problem) {
-		int id= problem.getProblemId();
+	public static boolean isRawTypeReferenceProblem(int id) {
 		return id == IProblem.UnsafeTypeConversion || id == IProblem.RawTypeReference || id == IProblem.UnsafeRawMethodInvocation;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/StringFix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/StringFix.java
index e59ed05..428f4c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/StringFix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/StringFix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ import org.eclipse.jdt.internal.ui.text.correction.ProblemLocation;
  * 		Remove unnecessary $NON-NLS$ tag
  *
  */
-public class StringFix implements ICleanUpFix, IProposableFix {
+public class StringFix implements IProposableFix {
 
 	private final TextEditGroup[] fEditGroups;
 	private final String fName;
@@ -104,6 +104,9 @@ public class StringFix implements ICleanUpFix, IProposableFix {
 
 	private static ICleanUpFix createCleanUp(CompilationUnit compilationUnit, boolean addNLSTag, boolean removeNLSTag, IProblemLocation[] problems) throws CoreException, JavaModelException {
 		ICompilationUnit cu= (ICompilationUnit)compilationUnit.getJavaElement();
+		if (!cu.isStructureKnown())
+			return null; //[clean up] 'Remove unnecessary $NLS-TAGS$' removes necessary ones in case of syntax errors: https://bugs.eclipse.org/bugs/show_bug.cgi?id=285814 : 
+		
 		List result= new ArrayList();
 
 		List missingNLSProblems= new ArrayList();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java
index 6b6ae69..ec7a8af 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/UnusedCodeFix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,7 @@ import org.eclipse.jdt.core.dom.ImportDeclaration;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.PostfixExpression;
 import org.eclipse.jdt.core.dom.PrefixExpression;
@@ -63,7 +64,6 @@ import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.structure.CompilationUnitRewrite;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
@@ -383,11 +383,15 @@ public class UnusedCodeFix extends CompilationUnitRewriteOperationsFix {
 
 		public String getAdditionalInfo() {
 			StringBuffer sb=new StringBuffer();
-			if (fRemovedAssignmentsCount>0){
-				sb.append(Messages.format(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview,String.valueOf(fRemovedAssignmentsCount)));
+			if (fRemovedAssignmentsCount == 1) {
+				sb.append(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_singular);
+			} else if (fRemovedAssignmentsCount > 1) {
+				sb.append(Messages.format(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_RemovedAssignments_preview_plural, String.valueOf(fRemovedAssignmentsCount)));
 			}
-			if (fAlteredAssignmentsCount>0){
-				sb.append(Messages.format(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview,String.valueOf(fAlteredAssignmentsCount)));
+			if (fAlteredAssignmentsCount == 1) {
+				sb.append(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_singular);
+			} else if (fAlteredAssignmentsCount > 1) {
+				sb.append(Messages.format(FixMessages.UnusedCodeFix_RemoveFieldOrLocal_AlteredAssignments_preview_plural, String.valueOf(fAlteredAssignmentsCount)));
 			}
 			if (sb.length()>0) {
 				return sb.toString();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/VariableDeclarationFix.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/VariableDeclarationFix.java
index 1943c26..1837daf 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/VariableDeclarationFix.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/VariableDeclarationFix.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Chris West (Faux) <eclipse at goeswhere.com> - [clean up] "Use modifier 'final' where possible" can introduce compile errors - https://bugs.eclipse.org/bugs/show_bug.cgi?id=272532
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.fix;
 
@@ -15,12 +16,14 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.text.edits.TextEditGroup;
 
 import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.Assignment;
 import org.eclipse.jdt.core.dom.Block;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -34,6 +37,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Statement;
@@ -91,6 +95,14 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 		}
 	}
 
+	private static class ReturnFinder extends ASTVisitor {
+		boolean foundOne;
+		public boolean visit(ReturnStatement node) {
+			foundOne= true;
+			return super.visit(node);
+		}
+	}
+
 	private static class VariableDeclarationFinder extends GenericVisitor {
 
 		private final List fResult;
@@ -196,7 +208,7 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 			if (toChange.size() == 0)
 				return false;
 
-			ModifierChangeOperation op= new ModifierChangeOperation(declaration, toChange, Modifier.FINAL, Modifier.VOLATILE);
+			ModifierChangeOperation op= new ModifierChangeOperation(declaration, toChange, Modifier.FINAL, Modifier.NONE);
 			fResult.add(op);
 			return false;
 		}
@@ -233,6 +245,9 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 	            if (writingConstructors.contains(constructor))//variable is written twice or more in constructor
 	            	return false;
 
+	            if (canReturn(constructor))
+	            	return false;
+
 	            writingConstructors.add(constructor);
 	            IMethodBinding constructorBinding= constructor.resolveBinding();
 	            if (constructorBinding == null)
@@ -243,7 +258,7 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 
 			for (int i= 0; i < writingConstructors.size(); i++) {
 	            MethodDeclaration constructor= (MethodDeclaration)writingConstructors.get(i);
-	            if (callsWrittingConstructor(constructor, writingConstructorBindings))//writing constructor calls other writing constructor
+	            if (callsWritingConstructor(constructor, writingConstructorBindings))//writing constructor calls other writing constructor
 	            	return false;
             }
 
@@ -260,7 +275,7 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 	            		return false;
 
 	            	if (!writingConstructorBindings.contains(methodBinding)) {
-	            		if (!callsWrittingConstructor(methods[i], writingConstructorBindings))//non writing constructor does not call a writing constructor
+	            		if (!callsWritingConstructor(methods[i], writingConstructorBindings))//non writing constructor does not call a writing constructor
 	            			return false;
 	            	}
 	            }
@@ -269,7 +284,19 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 	        return true;
         }
 
-		private boolean callsWrittingConstructor(MethodDeclaration methodDeclaration, HashSet writingConstructorBindings) {
+		private boolean canReturn(MethodDeclaration constructor) {
+			final ReturnFinder retFinder= new ReturnFinder();
+			constructor.accept(retFinder);
+			return retFinder.foundOne;
+		}
+
+		private boolean callsWritingConstructor(MethodDeclaration methodDeclaration, HashSet writingConstructorBindings) {
+			HashSet visitedMethodDeclarations= new HashSet();
+			visitedMethodDeclarations.add(methodDeclaration);
+			return callsWritingConstructor(methodDeclaration, writingConstructorBindings, visitedMethodDeclarations);
+		}
+
+		private boolean callsWritingConstructor(MethodDeclaration methodDeclaration, HashSet writingConstructorBindings, Set visitedMethodDeclarations) {
 			Block body= methodDeclaration.getBody();
 			if (body == null)
 				return false;
@@ -294,9 +321,13 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 				if (!(declaration instanceof MethodDeclaration))
 					return false;
 
-				return callsWrittingConstructor((MethodDeclaration)declaration, writingConstructorBindings);
+				if (visitedMethodDeclarations.contains(declaration)) {
+					return false;
+				}
+				visitedMethodDeclarations.add(methodDeclaration);
+				return callsWritingConstructor((MethodDeclaration)declaration, writingConstructorBindings, visitedMethodDeclarations);
 			}
-        }
+		}
 
 		private boolean isWrittenInTypeConstructors(ArrayList writes, ITypeBinding declaringClass) {
 
@@ -505,18 +536,18 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 			return null;
 
 		if (decl instanceof SingleVariableDeclaration) {
-			return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.VOLATILE);
+			return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.NONE);
 		} else if (decl instanceof VariableDeclarationExpression) {
-			return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.VOLATILE);
+			return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.NONE);
 		} else if (decl instanceof VariableDeclarationFragment){
 			VariableDeclarationFragment frag= (VariableDeclarationFragment)decl;
 			decl= decl.getParent();
 			if (decl instanceof FieldDeclaration || decl instanceof VariableDeclarationStatement) {
 				List list= new ArrayList();
 				list.add(frag);
-				return new ModifierChangeOperation(decl, list, Modifier.FINAL, Modifier.VOLATILE);
+				return new ModifierChangeOperation(decl, list, Modifier.FINAL, Modifier.NONE);
 			} else if (decl instanceof VariableDeclarationExpression) {
-				return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.VOLATILE);
+				return new ModifierChangeOperation(decl, new ArrayList(), Modifier.FINAL, Modifier.NONE);
 			}
 		}
 
@@ -528,14 +559,15 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 			return false;
 
 		IVariableBinding varbinding= (IVariableBinding)binding;
-		if (Modifier.isFinal(varbinding.getModifiers()))
+		int modifiers= varbinding.getModifiers();
+		if (Modifier.isFinal(modifiers) || Modifier.isVolatile(modifiers) || Modifier.isTransient(modifiers))
 			return false;
 
 		ASTNode parent= ASTNodes.getParent(declNode, VariableDeclarationExpression.class);
 		if (parent != null && ((VariableDeclarationExpression)parent).fragments().size() > 1)
 			return false;
 
-		if (varbinding.isField() && !Modifier.isPrivate(varbinding.getModifiers()))
+		if (varbinding.isField() && !Modifier.isPrivate(modifiers))
 			return false;
 
 		if (varbinding.isParameter()) {
@@ -547,9 +579,6 @@ public class VariableDeclarationFix extends CompilationUnitRewriteOperationsFix
 			}
 		}
 
-		if (Modifier.isVolatile(varbinding.getModifiers()))
-			return false;
-
 		return true;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocCommentReader.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocCommentReader.java
index 5b96653..5c3f3a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocCommentReader.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocCommentReader.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,15 +17,16 @@ import org.eclipse.jdt.core.formatter.IndentManipulation;
 
 
 /**
- * Reads a java doc comment from a java doc comment. Skips star-character
- * on begin of line
+ * Reads a java doc comment from a java doc comment. Skips star-character on begin of line.
  */
 public class JavaDocCommentReader extends SingleCharReader {
 
 	private IBuffer fBuffer;
 
 	private int fCurrPos;
+
 	private int fStartPos;
+
 	private int fEndPos;
 
 	private boolean fWasNewLine;
@@ -85,6 +86,8 @@ public class JavaDocCommentReader extends SingleCharReader {
 
 	/**
 	 * Returns the offset of the last read character in the passed buffer.
+	 * 
+	 * @return the offset
 	 */
 	public int getOffset() {
 		return fCurrPos;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocLocations.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocLocations.java
index e36f0e5..8bcc611 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocLocations.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/javadoc/JavaDocLocations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import javax.xml.parsers.ParserConfigurationException;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -302,38 +303,24 @@ public class JavaDocLocations {
 		}
 
 		if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
-			IClasspathEntry entry= root.getRawClasspathEntry();
-			if (entry == null) {
-				return null;
+			IClasspathEntry entry= root.getResolvedClasspathEntry();
+			URL javadocLocation= getLibraryJavadocLocation(entry);
+			if (javadocLocation != null) {
+				return getLibraryJavadocLocation(entry);
 			}
-			if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
-				entry= getRealClasspathEntry(root.getJavaProject(), entry.getPath(), root.getPath());
-				if (entry == null) {
+			entry= root.getRawClasspathEntry();
+			switch (entry.getEntryKind()) {
+				case IClasspathEntry.CPE_LIBRARY:
+				case IClasspathEntry.CPE_VARIABLE:
+					return getLibraryJavadocLocation(entry);
+				default:
 					return null;
-				}
 			}
-			return getLibraryJavadocLocation(entry);
 		} else {
 			return getProjectJavadocLocation(root.getJavaProject());
 		}
 	}
 
-	private static IClasspathEntry getRealClasspathEntry(IJavaProject jproject, IPath containerPath, IPath libPath) throws JavaModelException {
-		IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
-		if (container != null) {
-			IClasspathEntry[] entries= container.getClasspathEntries();
-			for (int i= 0; i < entries.length; i++) {
-				IClasspathEntry curr= entries[i];
-				IClasspathEntry resolved= JavaCore.getResolvedClasspathEntry(curr);
-				if (resolved != null && libPath.equals(resolved.getPath())) {
-					return curr; // return the real entry
-				}
-			}
-		}
-		return null; // not found
-	}
-
-
 	// loading for compatibility
 
 	private static JavaUIException createException(Throwable t, String message) {
@@ -426,6 +413,7 @@ public class JavaDocLocations {
 		Element cpElement;
 		try {
 			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
 			cpElement = parser.parse(inputSource).getDocumentElement();
 		} catch (SAXException e) {
 			throw createException(e, CorextMessages.JavaDocLocations_error_readXML);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaTemplateMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaTemplateMessages.properties
index aca01b8..db5a5e1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaTemplateMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaTemplateMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,7 +9,6 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-
 ContextType_error_multiple_cursor_variables=Template has multiple cursor variables.
 
 # Java Only stuff
@@ -35,7 +34,7 @@ JavaContextType_variable_description_todo=Todo task tag
 
 JavaContext_error_title=Template Error
 JavaContext_error_message=Template file incomplete or has errors.  You can load the default templates from the template preferences page (Java>Templates).
-JavaContext_unexpected_error_message=An unexpected error occured while evaluating a template. See the error log for details.
+JavaContext_unexpected_error_message=An unexpected error occurred while evaluating a template. See the error log for details.
 
 CodeTemplateContextType_variable_description_todo=Todo task tag
 CodeTemplateContextType_variable_description_packdeclaration=Package declaration of the new type
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/TemplateSet.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/TemplateSet.java
index ce3ce46..d916a9f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/TemplateSet.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/TemplateSet.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
@@ -76,11 +77,11 @@ public class TemplateSet {
 
 	/**
 	 * Convenience method for reading templates from a file.
-	 *
-	 * @param file
-	 * @param allowDuplicates
+	 * 
+	 * @param file the file
+	 * @param allowDuplicates <code>true</code> if duplicates are allowed
+	 * @throws CoreException if reading fails
 	 * @see #addFromStream(InputStream, boolean)
-	 * @throws CoreException
 	 */
 	public void addFromFile(File file, boolean allowDuplicates) throws CoreException {
 		InputStream stream= null;
@@ -109,15 +110,16 @@ public class TemplateSet {
 
 	/**
 	 * Reads templates from a XML stream and adds them to the templates
-	 *
-	 * @param stream
-	 * @param allowDuplicates
-	 * @throws CoreException
+	 * 
+	 * @param stream the input stream
+	 * @param allowDuplicates <code>true</code> if duplicates are allowed
+	 * @throws CoreException if reading fails
 	 */
 	public void addFromStream(InputStream stream, boolean allowDuplicates) throws CoreException {
 		try {
 			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
 			DocumentBuilder parser= factory.newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
 			Document document= parser.parse(new InputSource(stream));
 
 			NodeList elements= document.getElementsByTagName(getTemplateTag());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/DelegateEntryComparator.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/DelegateEntryComparator.java
new file mode 100644
index 0000000..b8939eb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/DelegateEntryComparator.java	
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
+ *     IBM Corporation - bug fixes
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext.util;
+
+import java.util.Comparator;
+
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+
+import org.eclipse.jdt.internal.corext.codemanipulation.AddDelegateMethodsOperation.DelegateEntry;
+
+/**
+ * A comparator which sorts instances of DelegateEntry according to order in which delegate methods
+ * should be generated in a type. More formally, if <code>T</code> is a class and <code>d1</code>
+ * and <code>d2</code> are two DelegateEntries representing delegate methods which are about to be
+ * added to <code>T</code> then according to this comparator <code>d1</code> is less than
+ * <code>d2</code> iff one of following holds:
+ * <ul>
+ * <li><code>d1</code> and <code>d2</code> represent methods delegated to the same field of
+ * <code>T</code>, that field's type has a source attachment and method of <code>d1</code> appears
+ * in that source before method of <code>d2</code></li>
+ * <li><code>d1</code> and <code>d2</code> represent methods delegated to the same field of
+ * <code>T</code>, that field's type doesn't have a source attachment and name of method of
+ * <code>d1</code> alphabetically precedes name of method of <code>d2</code></li>
+ * <li><code>d1</code> and <code>d2</code> represent methods delegated to different fields
+ * <code>f1</code> and <code>f2</code>; field <code>f1</code> is declared before <code>f2</code> in
+ * type <code>T</code></li>
+ * </ul>
+ */
+public class DelegateEntryComparator implements Comparator {
+
+	public int compare(Object o1, Object o2) {
+		if (!(o1 instanceof DelegateEntry)) {
+			return 0;
+		}
+		if (!(o2 instanceof DelegateEntry)) {
+			return 0;
+		}
+		DelegateEntry firstEntry= (DelegateEntry)o1;
+		DelegateEntry secondEntry= (DelegateEntry)o2;
+		IVariableBinding firstVariable= firstEntry.field;
+		IVariableBinding secondVariable= secondEntry.field;
+
+		if (firstVariable.equals(secondVariable)) {
+			try {
+				IMethod firstMethod= (IMethod)firstEntry.delegateMethod.getJavaElement();
+				IMethod secondMethod= (IMethod)secondEntry.delegateMethod.getJavaElement();
+				ISourceRange firstSourceRange= firstMethod.getSourceRange();
+				ISourceRange secondSourceRange= secondMethod.getSourceRange();
+				if (!SourceRange.isAvailable(firstSourceRange) || !SourceRange.isAvailable(secondSourceRange)) {
+					return firstMethod.getElementName().compareTo(secondMethod.getElementName());
+				} else {
+					return firstSourceRange.getOffset() - secondSourceRange.getOffset();
+				}
+			} catch (JavaModelException e) {
+				return 0;
+			}
+		}
+
+		IField firstField= (IField)firstVariable.getJavaElement();
+		IField secondField= (IField)secondVariable.getJavaElement();
+		try {
+			return firstField.getSourceRange().getOffset() - secondField.getSourceRange().getOffset();
+		} catch (JavaModelException e) {
+			return 0;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/History.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/History.java
index 32a6de5..7fc696b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/History.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/History.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -252,6 +253,7 @@ public abstract class History {
 		Element root;
 		try {
 			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
 			root = parser.parse(inputSource).getDocumentElement();
 		} catch (SAXException e) {
 			throw createException(e, Messages.format(CorextMessages.History_error_read, BasicElementLabels.getResourceName(fFileName)));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java
index 703fd54..e0f57f5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/JavaModelUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,12 @@ import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
  * Utility methods for the Java Model.
  */
 public final class JavaModelUtil {
+	
+	/**
+	 * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=309163
+	 * @since 3.6
+	 */
+	public static final boolean HIDE_VERSION_1_7= true;
 
 	/**
 	 * Only use this suffix for creating new .java files.
@@ -589,6 +595,33 @@ public final class JavaModelUtil {
 	}
 
 	/**
+	 * Returns the classpath entry of the given package fragment root. This is the raw entry, except
+	 * if the root is a referenced library, in which case it's the resolved entry.
+	 * 
+	 * @param root a package fragment root
+	 * @return the corresponding classpath entry
+	 * @throws JavaModelException if accessing the entry failed
+	 * @since 3.6
+	 */
+	public static IClasspathEntry getClasspathEntry(IPackageFragmentRoot root) throws JavaModelException {
+		IClasspathEntry rawEntry= root.getRawClasspathEntry();
+		int rawEntryKind= rawEntry.getEntryKind();
+		switch (rawEntryKind) {
+			case IClasspathEntry.CPE_LIBRARY:
+			case IClasspathEntry.CPE_VARIABLE:
+			case IClasspathEntry.CPE_CONTAINER: // should not happen, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=305037
+				if (root.isArchive() && root.getKind() == IPackageFragmentRoot.K_BINARY) {
+					IClasspathEntry resolvedEntry= root.getResolvedClasspathEntry();
+					if (resolvedEntry.getReferencingEntry() != null)
+						return resolvedEntry;
+					else
+						return rawEntry;
+				}
+		}
+		return rawEntry;
+	}
+
+	/**
 	 * Get all compilation units of a selection.
 	 *
 	 * @param javaElements the selected java elements
@@ -712,13 +745,17 @@ public final class JavaModelUtil {
 		String compliance= getCompilerCompliance((IVMInstall2) vmInstall, null);
 		if (compliance == null)
 			return true; // assume 5.0
-		return compliance.startsWith(JavaCore.VERSION_1_5) || compliance.startsWith(JavaCore.VERSION_1_6);
+		return compliance.startsWith(JavaCore.VERSION_1_5)
+				|| compliance.startsWith(JavaCore.VERSION_1_6)
+				|| compliance.startsWith(JavaCore.VERSION_1_7);
 	}
 
 	public static String getCompilerCompliance(IVMInstall2 vMInstall, String defaultCompliance) {
 		String version= vMInstall.getJavaVersion();
 		if (version == null) {
 			return defaultCompliance;
+		} else if (version.startsWith(JavaCore.VERSION_1_7)) {
+			return HIDE_VERSION_1_7 ? JavaCore.VERSION_1_6 : JavaCore.VERSION_1_7;
 		} else if (version.startsWith(JavaCore.VERSION_1_6)) {
 			return JavaCore.VERSION_1_6;
 		} else if (version.startsWith(JavaCore.VERSION_1_5)) {
@@ -745,8 +782,8 @@ public final class JavaModelUtil {
 		
 		// fallback:
 		String desc= executionEnvironment.getId();
-		if (desc.indexOf(JavaCore.VERSION_1_6) != -1) {
-			return JavaCore.VERSION_1_6;
+		if (desc.indexOf(JavaCore.VERSION_1_7) != -1) {
+			return HIDE_VERSION_1_7 ? JavaCore.VERSION_1_6 : JavaCore.VERSION_1_7;
 		} else if (desc.indexOf(JavaCore.VERSION_1_6) != -1) {
 			return JavaCore.VERSION_1_6;
 		} else if (desc.indexOf(JavaCore.VERSION_1_5) != -1) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/MethodsSourcePositionComparator.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/MethodsSourcePositionComparator.java
new file mode 100644
index 0000000..aed4713
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/MethodsSourcePositionComparator.java	
@@ -0,0 +1,133 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Mateusz Wenus <mateusz.wenus at gmail.com> - [override method] generate in declaration order [code generation] - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140971
+ *     IBM Corporation - bug fixes
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext.util;
+
+import java.util.Comparator;
+
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+
+/**
+ * A comparator which sorts methods (IMethodBinding) of a type passed as constructor argument,
+ * according to their order in source files. More formally, if <code>m1</code> and <code>m2</code>
+ * are methods of type <code>T</code> then according to this comparator <code>m1</code> is less than
+ * <code>m2</code> iff one of following holds:
+ * <ul>
+ * <li><code>m1</code> and <code>m2</code> are defined in the same type (<code>T</code> or any
+ * supertype of <code>T</code>), that type has a source attachment and <code>m1</code> appears
+ * before <code>m2</code> in source of that type</li>
+ * <li><code>m1</code> and <code>m2</code> are defined in the same type (<code>T</code> or any
+ * supertype of <code>T</code>), that type doesn't have a source attachment and name of
+ * <code>m1</code> alphabetically precedes name of <code>m2</code></li>
+ * 
+ * <li><code>m2</code> is defined in <code>T</code> and <code>m1</code> is defined in any supertype
+ * of <code>T</code></li>
+ * <li><code>m2</code> is defined in a superclass of <code>T</code> and <code>m1</code> is defined
+ * in a superinterface of <code>T</code></li>
+ * <li><code>m1</code> and <code>m2</code> are defined in different superclasses of <code>T</code>
+ * and a class which defines <code>m1</code> extends class which defines <code>m2</code>
+ * <li><code>m1</code> and <code>m2</code> are defined in different superinterfaces of
+ * <code>T</code> and an interface which defines <code>m2</code> appears before an interface which
+ * defines <code>m1</code> in <code>implements</code> clause of declaration of type <code>T</code></li>
+ * </ul>
+ */
+public class MethodsSourcePositionComparator implements Comparator {
+
+	private final ITypeBinding fTypeBinding;
+
+	public MethodsSourcePositionComparator(ITypeBinding typeBinding) {
+		if (typeBinding == null) {
+			throw new IllegalArgumentException();
+		}
+		fTypeBinding= typeBinding;
+	}
+
+	public int compare(Object o1, Object o2) {
+		if (!(o1 instanceof IMethodBinding)) {
+			return 0;
+		}
+		if (!(o2 instanceof IMethodBinding)) {
+			return 0;
+		}
+		IMethodBinding firstMethodBinding= (IMethodBinding)o1;
+		IMethodBinding secondMethodBinding= (IMethodBinding)o2;
+		ITypeBinding firstMethodType= firstMethodBinding.getDeclaringClass();
+		ITypeBinding secondMethodType= secondMethodBinding.getDeclaringClass();
+
+		if (firstMethodType.equals(secondMethodType)) {
+			return compareInTheSameType(firstMethodBinding, secondMethodBinding);
+		}
+
+		if (firstMethodType.equals(fTypeBinding)) {
+			return 1;
+		}
+		if (secondMethodType.equals(fTypeBinding)) {
+			return -1;
+		}
+
+		ITypeBinding type= fTypeBinding;
+		int count= 0, firstCount= -1, secondCount= -1;
+		while ((type= type.getSuperclass()) != null) {
+			if (firstMethodType.equals(type)) {
+				firstCount= count;
+			}
+			if (secondMethodType.equals(type)) {
+				secondCount= count;
+			}
+			count++;
+		}
+		if (firstCount != -1 && secondCount != -1) {
+			return (firstCount - secondCount);
+		}
+		if (firstCount != -1 && secondCount == -1) {
+			return 1;
+		}
+		if (firstCount == -1 && secondCount != -1) {
+			return -1;
+		}
+
+		ITypeBinding[] interfaces= fTypeBinding.getInterfaces();
+		for (int i= 0; i < interfaces.length; i++) {
+			if (firstMethodType.equals(interfaces[i])) {
+				return 1;
+			}
+			if (secondMethodType.equals(interfaces[i])) {
+				return -1;
+			}
+		}
+		return 0;
+	}
+
+	private int compareInTheSameType(IMethodBinding firstMethodBinding, IMethodBinding secondMethodBinding) {
+		try {
+			IMethod firstMethod= (IMethod)firstMethodBinding.getJavaElement();
+			IMethod secondMethod= (IMethod)secondMethodBinding.getJavaElement();
+			if (firstMethod == null || secondMethod == null) {
+				return 0;
+			}
+			ISourceRange firstSourceRange= firstMethod.getSourceRange();
+			ISourceRange secondSourceRange= secondMethod.getSourceRange();
+
+			if (!SourceRange.isAvailable(firstSourceRange) || !SourceRange.isAvailable(secondSourceRange)) {
+				return firstMethod.getElementName().compareTo(secondMethod.getElementName());
+			} else {
+				return firstSourceRange.getOffset() - secondSourceRange.getOffset();
+			}
+		} catch (JavaModelException e) {
+			return 0;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/OpenTypeHistory.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/OpenTypeHistory.java
index 20d6bff..e277d54 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/OpenTypeHistory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/OpenTypeHistory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,8 +52,6 @@ import org.eclipse.jdt.core.search.TypeNameMatch;
 
 import org.eclipse.jdt.internal.corext.CorextMessages;
 
-import org.eclipse.jdt.internal.ui.JavaPlugin;
-
 /**
  * History for the open type dialog. Object and keys are both {@link TypeNameMatch}s.
  */
@@ -156,7 +154,7 @@ public class OpenTypeHistory extends History {
 		protected IStatus run(IProgressMonitor monitor) {
 			OpenTypeHistory history= OpenTypeHistory.getInstance();
 			history.internalCheckConsistency(monitor);
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		}
 		public boolean belongsTo(Object family) {
 			return FAMILY.equals(family);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Resources.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Resources.java
index fb2c0f9..22f855d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Resources.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Resources.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,7 +73,7 @@ public class Resources {
 		}
 		if (result != null)
 			return result;
-		return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
@@ -113,7 +113,7 @@ public class Resources {
 				readOnlyFiles.add(resource);
 		}
 		if (readOnlyFiles.size() == 0)
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 
 		Map oldTimeStamps= createModificationStampMap(readOnlyFiles);
 		IStatus status= ResourcesPlugin.getWorkspace().validateEdit(
@@ -130,7 +130,7 @@ public class Resources {
 		}
 		if (modified != null)
 			return modified;
-		return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	private static Map createModificationStampMap(List files){
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java
index f1af01b..602adc1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/Strings.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,16 +41,18 @@ public class Strings {
 	 * </p>
 	 * @since 3.4
 	 */
-	private static final boolean USE_TEXT_PROCESSOR;
+	public static final boolean USE_TEXT_PROCESSOR;
 	static {
 		String testString= "args : String[]"; //$NON-NLS-1$
 		USE_TEXT_PROCESSOR= testString != TextProcessor.process(testString);
 	}
 
+	private static final String JAVA_ELEMENT_DELIMITERS= TextProcessor.getDefaultDelimiters() + "<>(),?{} "; //$NON-NLS-1$
 
+	
 	/**
-	 * Adds special marks so that that the given styled string is readable in a BIDI environment.
-	 *
+	 * Adds special marks so that that the given styled string is readable in a BiDi environment.
+	 * 
 	 * @param styledString the styled string
 	 * @return the processed styled string
 	 * @since 3.4
@@ -72,19 +74,38 @@ public class Strings {
 	}
 
 	/**
-	 * Adds special marks so that that the given styled string is readable in a BIDI environment.
-	 *
+	 * Adds special marks so that that the given styled Java element label is readable in a BiDi
+	 * environment.
+	 * 
+	 * @param styledString the styled string
+	 * @return the processed styled string
+	 * @since 3.6
+	 */
+	public static StyledString markJavaElementLabelLTR(StyledString styledString) {
+		if (!USE_TEXT_PROCESSOR)
+			return styledString;
+
+		String inputString= styledString.getString();
+		String string= TextProcessor.process(inputString, JAVA_ELEMENT_DELIMITERS);
+		if (string != inputString)
+			insertMarks(styledString, inputString, string);
+		return styledString;
+	}
+
+	/**
+	 * Adds special marks so that that the given styled string is readable in a BiDi environment.
+	 * 
 	 * @param styledString the styled string
-	 * @param additionalDelimiters the additional delimiters
+	 * @param delimiters the additional delimiters
 	 * @return the processed styled string
 	 * @since 3.4
 	 */
-	public static StyledString markLTR(StyledString styledString, String additionalDelimiters) {
+	public static StyledString markLTR(StyledString styledString, String delimiters) {
 		if (!USE_TEXT_PROCESSOR)
 			return styledString;
 
 		String inputString= styledString.getString();
-		String string= TextProcessor.process(inputString, TextProcessor.getDefaultDelimiters() + additionalDelimiters);
+		String string= TextProcessor.process(inputString, delimiters);
 		if (string != inputString)
 			insertMarks(styledString, inputString, string);
 		return styledString;
@@ -99,21 +120,26 @@ public class Strings {
 	 * @since 3.5
 	 */
 	private static void insertMarks(StyledString styledString, String originalString, String processedString) {
-		int i= 0;
-		char orig= originalString.charAt(0);
-		int processedStringLength= originalString.length();
-		for (int processedIndex= 0; processedIndex < processedStringLength; processedIndex++) {
-			char processed= processedString.charAt(processedIndex);
-			if (orig == processed)
-				orig= originalString.charAt(++i);
-			else
-				styledString.insert(processed, processedIndex);
+		int originalLength= originalString.length();
+		int processedStringLength= processedString.length();
+		char orig= originalLength > 0 ? originalString.charAt(0) : '\0';
+		for (int o= 0, p= 0; p < processedStringLength; p++) {
+			char processed= processedString.charAt(p);
+			if (o < originalLength) {
+				if (orig == processed) {
+					o++;
+					if (o < originalLength)
+						orig= originalString.charAt(o);
+					continue;
+				}
+			}
+			styledString.insert(processed, p);
 		}
 	}
 
 	/**
-	 * Adds special marks so that that the given string is readable in a BIDI environment.
-	 *
+	 * Adds special marks so that that the given string is readable in a BiDi environment.
+	 * 
 	 * @param string the string
 	 * @return the processed styled string
 	 * @since 3.4
@@ -126,18 +152,33 @@ public class Strings {
 	}
 
 	/**
-	 * Adds special marks so that that the given string is readable in a BIDI environment.
-	 *
+	 * Adds special marks so that that the given string is readable in a BiDi environment.
+	 * 
 	 * @param string the string
-	 * @param additionalDelimiters the additional delimiters
+	 * @param delimiters the delimiters
 	 * @return the processed styled string
 	 * @since 3.4
 	 */
-	public static String markLTR(String string, String additionalDelimiters) {
+	public static String markLTR(String string, String delimiters) {
+		if (!USE_TEXT_PROCESSOR)
+			return string;
+
+		return TextProcessor.process(string, delimiters);
+	}
+
+	/**
+	 * Adds special marks so that that the given Java element label is readable in a BiDi
+	 * environment.
+	 * 
+	 * @param string the string
+	 * @return the processed styled string
+	 * @since 3.6
+	 */
+	public static String markJavaElementLabelLTR(String string) {
 		if (!USE_TEXT_PROCESSOR)
 			return string;
 
-		return TextProcessor.process(string, TextProcessor.getDefaultDelimiters() + additionalDelimiters);
+		return TextProcessor.process(string, JAVA_ELEMENT_DELIMITERS);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/Checks.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/Checks.java
index 814f1ee..5812453 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/Checks.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/Checks.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,6 +70,7 @@ import org.eclipse.jdt.internal.corext.util.Resources;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
 
+import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
 /**
@@ -89,6 +90,11 @@ public class Checks {
 	public static final int NOT_RVALUE_VOID= 2;
 
 	/**
+	 * @since 3.6
+	 */
+	public static final int IS_RVALUE_GUESSED= 3;
+
+	/**
 	 * Checks if method will have a constructor name after renaming.
 	 * @param method
 	 * @param newMethodName
@@ -838,9 +844,10 @@ public class Checks {
 	/**
 	 * @param e
 	 * @return int
-	 *          Checks.IS_RVALUE		if e is an rvalue
-	 *          Checks.NOT_RVALUE_VOID  if e is not an rvalue because its type is void
-	 *          Checks.NOT_RVALUE_MISC  if e is not an rvalue for some other reason
+	 *          Checks.IS_RVALUE			if e is an rvalue
+	 *          Checks.IS_RVALUE_GUESSED	if e is guessed as an rvalue 
+	 *          Checks.NOT_RVALUE_VOID  	if e is not an rvalue because its type is void
+	 *          Checks.NOT_RVALUE_MISC  	if e is not an rvalue for some other reason
 	 */
 	public static int checkExpressionIsRValue(Expression e) {
 		if(e instanceof Name) {
@@ -850,12 +857,17 @@ public class Checks {
 		}
 
 		ITypeBinding tb= e.resolveTypeBinding();
+		boolean guessingRequired= false;
+		if (tb == null) {
+			guessingRequired= true;
+			tb= ASTResolving.guessBindingForReference(e);
+		}
 		if (tb == null)
 			return NOT_RVALUE_MISC;
 		else if (tb.getName().equals("void")) //$NON-NLS-1$
 			return NOT_RVALUE_VOID;
 
-		return IS_RVALUE;
+		return guessingRequired ? IS_RVALUE_GUESSED : IS_RVALUE;
 	}
 
 	public static boolean isDeclaredIn(VariableDeclaration tempDeclaration, Class astNodeClass) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ExceptionInfo.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ExceptionInfo.java
index e14b69f..16c0dea 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ExceptionInfo.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ExceptionInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,12 +12,14 @@ package org.eclipse.jdt.internal.corext.refactoring;
 
 import org.eclipse.core.runtime.Assert;
 
+import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeParameter;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 
 
 public class ExceptionInfo {
-	private final IType fType;
+	private final IJavaElement fElement;
 	private final ITypeBinding fTypeBinding;
 	private int fKind;
 
@@ -25,15 +27,16 @@ public class ExceptionInfo {
 	public static final int ADDED= 1;
 	public static final int DELETED= 2;
 
-	public ExceptionInfo(IType type, int kind, ITypeBinding binding) {
-		Assert.isNotNull(type);
-		fType= type;
+	public ExceptionInfo(IJavaElement element, int kind, ITypeBinding binding) {
+		Assert.isNotNull(element);
+		Assert.isTrue(element instanceof IType || element instanceof ITypeParameter);
+		fElement= element;
 		fKind= kind;
 		fTypeBinding= binding;
 	}
 
-	public static ExceptionInfo createInfoForOldException(IType type, ITypeBinding binding){
-		return new ExceptionInfo(type, OLD, binding);
+	public static ExceptionInfo createInfoForOldException(IJavaElement element, ITypeBinding binding){
+		return new ExceptionInfo(element, OLD, binding);
 	}
 	public static ExceptionInfo createInfoForAddedException(IType type){
 		return new ExceptionInfo(type, ADDED, null);
@@ -61,8 +64,12 @@ public class ExceptionInfo {
 		return fKind == OLD;
 	}
 
-	public IType getType() {
-		return fType;
+	public IJavaElement getElement() {
+		return fElement;
+	}
+	
+	public String getFullyQualifiedName() {
+		return fElement instanceof IType ? ((IType) fElement).getFullyQualifiedName('.') : fElement.getElementName();
 	}
 
 	public int getKind() {
@@ -83,10 +90,10 @@ public class ExceptionInfo {
 			case ADDED : result.append("ADDED: "); break; //$NON-NLS-1$
 			case DELETED : result.append("DELETED: "); break; //$NON-NLS-1$
 		}
-		if (fType == null)
+		if (fElement == null)
 			result.append("null"); //$NON-NLS-1$
 		else
-			result.append(fType.toString());
+			result.append(fElement.toString());
 		return result.toString();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringAvailabilityTester.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringAvailabilityTester.java
index c398475..60de26d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringAvailabilityTester.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringAvailabilityTester.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,20 +44,20 @@ import org.eclipse.jdt.core.ITypeParameter;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.ExpressionStatement;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
 import org.eclipse.jdt.core.dom.SuperMethodInvocation;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.rename.MethodChecks;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils;
@@ -246,9 +246,7 @@ public final class RefactoringAvailabilityTester {
 			return false;
 		if (element instanceof IPackageFragmentRoot) {
 			IPackageFragmentRoot root= (IPackageFragmentRoot) element;
-			if (root.isExternal() || Checks.isClasspathDelete(root)) // TODO
-				// rename
-				// isClasspathDelete
+			if (root.isExternal() || Checks.isClasspathDelete(root)) // TODO: rename isClasspathDelete
 				return false;
 
 			if (root.getResource().equals(root.getJavaProject().getProject()))
@@ -809,7 +807,7 @@ public final class RefactoringAvailabilityTester {
 	}
 
 	public static boolean isMoveInnerAvailable(final IType type) throws JavaModelException {
-		return Checks.isAvailable(type) && !Checks.isAnonymous(type) && !Checks.isTopLevel(type) && !Checks.isInsideLocalType(type);
+		return Checks.isAvailable(type) && !Checks.isAnonymous(type) && !JavaElementUtil.isMainType(type) && !Checks.isInsideLocalType(type);
 	}
 
 	public static boolean isMoveInnerAvailable(final JavaTextSelection selection) throws JavaModelException {
@@ -820,7 +818,7 @@ public final class RefactoringAvailabilityTester {
 	}
 
 	public static boolean isMoveMethodAvailable(final IMethod method) throws JavaModelException {
-		return method.exists() && !method.isConstructor() && !method.isBinary() && !method.getDeclaringType().isAnnotation() && !method.isReadOnly() && !JdtFlags.isStatic(method);
+		return method.exists() && !method.isConstructor() && !method.isBinary() && !method.getDeclaringType().isInterface() && !method.isReadOnly() && !JdtFlags.isStatic(method);
 	}
 
 	public static boolean isMoveMethodAvailable(final IStructuredSelection selection) throws JavaModelException {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java
index 4ed485f..e9e88a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringCoreMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Extract method and continue https://bugs.eclipse.org/bugs/show_bug.cgi?id=48056
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring;
 
@@ -14,16 +15,8 @@ import org.eclipse.osgi.util.NLS;
 
 public final class RefactoringCoreMessages extends NLS {
 
-	public static String AbstractDeleteChange_deleting;
-
 	public static String AbstractRenameChange_Renaming;
 
-	public static String AddToClasspathChange_add;
-
-	public static String Assert_assertion_failed;
-
-	public static String Assert_null_argument;
-
 	public static String ASTData_update_imports;
 
 	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.corext.refactoring.refactoring";//$NON-NLS-1$
@@ -52,14 +45,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String Change_does_not_exist;
 
-	public static String Change_has_modifications;
-
-	public static String Change_is_read_only;
-
-	public static String Change_is_unsaved;
-
-	public static String Change_same_read_only;
-
 	public static String ChangeSignatureRefactoring_add_constructor;
 
 	public static String ChangeSignatureRefactoring_add_super_call;
@@ -156,10 +141,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ChangeTypeRefactoring_arraysNotSupported;
 
-	public static String ChangeTypeRefactoring_cantDoIt;
-
-	public static String ChangeTypeRefactoring_changes;
-
 	public static String ChangeTypeRefactoring_checking_preconditions;
 
 	public static String ChangeTypeRefactoring_descriptor_description;
@@ -168,16 +149,10 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ChangeTypeRefactoring_enumsNotSupported;
 
-	public static String ChangeTypeRefactoring_failedToSelectType;
-
-	public static String ChangeTypeRefactoring_Generalize_Type;
-
 	public static String ChangeTypeRefactoring_insideLocalTypesNotSupported;
 
 	public static String ChangeTypeRefactoring_invalidSelection;
 
-	public static String ChangeTypeRefactoring_javaLangObject;
-
 	public static String ChangeTypeRefactoring_localTypesNotSupported;
 
 	public static String ChangeTypeRefactoring_multiDeclarationsNotSupported;
@@ -206,8 +181,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ChangeTypeRefactoring_typeParametersNotSupported;
 
-	public static String ChangeTypeRefactoring_unhandledSearchException;
-
 	public static String Checks_all_excluded;
 
 	public static String Checks_cannot_be_parsed;
@@ -280,8 +253,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ConvertAnonymousToNestedRefactoring_descriptor_description_short;
 
-	public static String ConvertAnonymousToNestedRefactoring_edit_name;
-
 	public static String ConvertAnonymousToNestedRefactoring_extends_local_class;
 
 	public static String ConvertAnonymousToNestedRefactoring_name;
@@ -314,8 +285,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String CopyRefactoring_resource_copyOfMore;
 
-	public static String CopyRefactoring_searching;
-
 	public static String CopyRefactoring_update_ref;
 
 	public static String CopyResourceString_copy;
@@ -354,6 +323,10 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String DelegateMethodCreator_keep_original_moved_singular;
 
+	public static String DelegateMethodCreator_keep_original_moved_plural_member;
+
+	public static String DelegateMethodCreator_keep_original_moved_singular_member;
+
 	public static String DelegateMethodCreator_keep_original_renamed_plural;
 
 	public static String DelegateMethodCreator_keep_original_renamed_singular;
@@ -362,12 +335,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String DeleteChangeCreator_1;
 
-	public static String DeleteFileChange_1;
-
-	public static String DeleteFolderChange_0;
-
-	public static String DeleteFromClassPathChange_remove;
-
 	public static String DeletePackageFragmentRootChange_delete;
 
 	public static String DeletePackageFragmentRootChange_restore_file;
@@ -376,7 +343,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String DeleteRefactoring_2;
 
-	public static String DeleteRefactoring_3;
+	public static String DeleteRefactoring_3_singular;
+
+	public static String DeleteRefactoring_3_plural;
 
 	public static String DeleteRefactoring_4;
 
@@ -392,8 +361,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String DeleteSourceManipulationChange_0;
 
-	public static String DeleteSourceManipulationChange_1;
-
 	public static String DynamicValidationRefactoringChange_fatal_error;
 
 	public static String DynamicValidationStateChange_workspace_changed;
@@ -404,8 +371,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractClassRefactoring_change_name;
 
-	public static String ExtractClassRefactoring_comment_enclosing_type;
-
 	public static String ExtractClassRefactoring_comment_extracted_class;
 
 	public static String ExtractClassRefactoring_comment_field_renamed;
@@ -504,8 +469,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractConstantRefactoring_select_expression;
 
-	public static String ExtractConstantRefactoring_syntax_error;
-
 	public static String ExtractConstantRefactoring_visibility_pattern;
 
 	public static String ExtractInterfaceProcessor_add_comment;
@@ -558,6 +521,10 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractMethodAnalyzer_assignments_to_local;
 
+	public static String ExtractMethodAnalyzer_branch_break_mismatch;
+
+	public static String ExtractMethodAnalyzer_branch_continue_mismatch;
+
 	public static String ExtractMethodAnalyzer_branch_mismatch;
 
 	public static String ExtractMethodAnalyzer_cannot_determine_return_type;
@@ -634,6 +601,8 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractMethodRefactoring_organize_imports;
 
+	public static String ExtractMethodRefactoring_replace_continue;
+
 	public static String ExtractMethodRefactoring_replace_occurrences;
 
 	public static String ExtractMethodRefactoring_substitute_with_call;
@@ -662,8 +631,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractSupertypeProcessor_subtypes_pattern;
 
-	public static String ExtractSupertypeProcessor_unexpected_exception;
-
 	public static String ExtractSupertypeProcessor_unexpected_exception_on_layer;
 
 	public static String ExtractTempRefactoring_another_variable;
@@ -696,8 +663,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractTempRefactoring_expression_pattern;
 
-	public static String ExtractTempRefactoring_extract_temp;
-
 	public static String ExtractTempRefactoring_for_initializer_updater;
 
 	public static String ExtractTempRefactoring_name;
@@ -712,8 +677,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractTempRefactoring_null_literals;
 
-	public static String ExtractTempRefactoring_preview;
-
 	public static String ExtractTempRefactoring_refers_to_for_variable;
 
 	public static String ExtractTempRefactoring_replace;
@@ -722,10 +685,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ExtractTempRefactoring_select_expression;
 
-	public static String ExtractTempRefactoring_syntax_error;
-
-	public static String ExtractTempRefactoring_update_imports;
-
 	public static String FlowAnalyzer_execution_flow;
 
 	public static String HierarchyRefactoring_add_member;
@@ -806,8 +765,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String InlineConstantRefactoring_local_anonymous_unsupported;
 
-	public static String InlineConstantRefactoring_members_declared_in_anonymous;
-
 	public static String InlineConstantRefactoring_name;
 
 	public static String InlineConstantRefactoring_original_pattern;
@@ -818,8 +775,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String InlineConstantRefactoring_replace_references;
 
-	public static String InlineConstantRefactoring_source_code_unavailable;
-
 	public static String InlineConstantRefactoring_static_final_field;
 
 	public static String InlineConstantRefactoring_syntax_errors;
@@ -906,8 +861,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String InlineTempRefactoring_select_temp;
 
-	public static String InlineTempRefactoring_syntax_errors;
-
 	public static String InlineTemRefactoring_error_message_fieldsCannotBeInlined;
 
 	public static String InlineTemRefactoring_error_message_nulLiteralsCannotBeInlined;
@@ -1118,7 +1071,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String JavaDeleteProcessor_description_singular;
 
-	public static String JavaDeleteProcessor_header;
+	public static String JavaDeleteProcessor_header_singular;
+
+	public static String JavaDeleteProcessor_header_plural;
 
 	public static String JavaDeleteProcessor_project_pattern;
 
@@ -1132,8 +1087,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String JavaRefactoringDescriptor_inferred_setting_pattern;
 
-	public static String JavaRefactoringDescriptor_initialization_error;
-
 	public static String JavaRefactoringDescriptor_keep_original;
 
 	public static String JavaRefactoringDescriptor_keep_original_deprecated;
@@ -1196,10 +1149,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MemberVisibilityAdjustor_adjustments_name;
 
-	public static String MemberVisibilityAdjustor_binary_outgoing_project;
-
-	public static String MemberVisibilityAdjustor_binary_outgoing_resource;
-
 	public static String MemberVisibilityAdjustor_change_visibility;
 
 	public static String MemberVisibilityAdjustor_change_visibility_default;
@@ -1222,8 +1171,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MethodChecks_overrides;
 
-	public static String MoveCompilationUnitChange_default_package;
-
 	public static String MoveCompilationUnitChange_name;
 
 	public static String MoveCuUpdateCreator_searching;
@@ -1238,14 +1185,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveInnerToTopRefactoring_change_qualifier;
 
-	public static String MoveInnerToTopRefactoring_change_visibility;
-
-	public static String MoveInnerToTopRefactoring_change_visibility_constructor_warning;
-
-	public static String MoveInnerToTopRefactoring_change_visibility_field_warning;
-
-	public static String MoveInnerToTopRefactoring_change_visibility_method_warning;
-
 	public static String MoveInnerToTopRefactoring_change_visibility_type_warning;
 
 	public static String MoveInnerToTopRefactoring_compilation_Unit_exists;
@@ -1288,28 +1227,16 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveInstanceMethodProcessor_creating;
 
-	public static String MoveInstanceMethodProcessor_deprecate_delegator_message;
-
-	public static String MoveInstanceMethodProcessor_deprecate_delegator_method;
-
 	public static String MoveInstanceMethodProcessor_descriptor_description;
 
 	public static String MoveInstanceMethodProcessor_descriptor_description_short;
 
-	public static String MoveInstanceMethodProcessor_inline_binary_project;
-
-	public static String MoveInstanceMethodProcessor_inline_binary_resource;
-
 	public static String MoveInstanceMethodProcessor_inline_inaccurate;
 
 	public static String MoveInstanceMethodProcessor_inline_method_invocation;
 
 	public static String MoveInstanceMethodProcessor_inline_overridden;
 
-	public static String MoveInstanceMethodProcessor_javadoc_binary_project;
-
-	public static String MoveInstanceMethodProcessor_javadoc_binary_resource;
-
 	public static String MoveInstanceMethodProcessor_method_already_exists;
 
 	public static String MoveInstanceMethodProcessor_method_name_pattern;
@@ -1352,8 +1279,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveInstanceMethodProcessor_remove_original_method;
 
-	public static String MoveInstanceMethodProcessor_replace_body_with_delegation;
-
 	public static String MoveInstanceMethodProcessor_single_implementation;
 
 	public static String MoveInstanceMethodProcessor_target_element_pattern;
@@ -1376,8 +1301,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveMembersRefactoring_binary;
 
-	public static String MoveMembersRefactoring_check_availability;
-
 	public static String MoveMembersRefactoring_checking;
 
 	public static String MoveMembersRefactoring_compile_errors;
@@ -1430,8 +1353,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveRefactoring_scanning_qualified_names;
 
-	public static String MoveResourceChange_move;
-
 	public static String MoveStaticMemberAnalyzer_nonStatic;
 
 	public static String MoveStaticMembersProcessor_description_descriptor_short_multi;
@@ -1452,8 +1373,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String OverwriteHelper_3;
 
-	public static String ProcessorBasedRefactoring_error_unsupported_initialization;
-
 	public static String PromoteTempToFieldRefactoring_cannot_promote;
 
 	public static String PromoteTempToFieldRefactoring_declare_final;
@@ -1496,8 +1415,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String PromoteTempToFieldRefactoring_uses_type_declared_locally;
 
-	public static String PromoteTempToFieldRefactoring_uses_types_declared_locally;
-
 	public static String PromoteTempToFieldRefactoring_visibility_pattern;
 
 	public static String PullUpRefactoring_add_abstract_method;
@@ -1676,8 +1593,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String RenameCompilationUnitRefactoring_same_name;
 
-	public static String RenameEnumConstProcessor_change_name;
-
 	public static String RenameEnumConstProcessor_descriptor_description;
 
 	public static String RenameEnumConstProcessor_descriptor_description_short;
@@ -1698,8 +1613,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String RenameFieldRefactoring_another_name2;
 
-	public static String RenameFieldRefactoring_change_name;
-
 	public static String RenameFieldRefactoring_checking;
 
 	public static String RenameFieldRefactoring_declared_in_supertype;
@@ -1848,24 +1761,8 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String RenamePrivateMethodRefactoring_update;
 
-	public static String RenameResourceChange_descriptor_description;
-
-	public static String RenameResourceChange_descriptor_description_short;
-
 	public static String RenameResourceChange_does_not_exist;
 
-	public static String RenameResourceChange_name;
-
-	public static String RenameResourceChange_rename_resource;
-
-	public static String RenameResourceProcessor_name;
-
-	public static String RenameResourceRefactoring_alread_exists;
-
-	public static String RenameResourceRefactoring_Internal_Error;
-
-	public static String RenameResourceRefactoring_invalidName;
-
 	public static String RenameSourceFolderChange_descriptor_description;
 
 	public static String RenameSourceFolderChange_descriptor_description_short;
@@ -1934,8 +1831,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String RenameTypeProcessor_cannot_rename_fields_same_new_name;
 
-	public static String RenameTypeProcessor_cannot_rename_locals_same_new_name;
-
 	public static String RenameTypeProcessor_cannot_rename_methods_same_new_name;
 
 	public static String RenameTypeProcessor_change_name;
@@ -2056,7 +1951,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_copy_description_singular;
 
-	public static String ReorgPolicyFactory_copy_elements_header;
+	public static String ReorgPolicyFactory_copy_elements_header_singular;
+
+	public static String ReorgPolicyFactory_copy_elements_header_plural;
 
 	public static String ReorgPolicyFactory_copy_elements_plural;
 
@@ -2074,7 +1971,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_copy_folders;
 
-	public static String ReorgPolicyFactory_copy_header;
+	public static String ReorgPolicyFactory_copy_header_singular;
+
+	public static String ReorgPolicyFactory_copy_header_plural;
 
 	public static String ReorgPolicyFactory_copy_import;
 
@@ -2098,11 +1997,15 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_copy_package_singular;
 
-	public static String ReorgPolicyFactory_copy_packages_header;
+	public static String ReorgPolicyFactory_copy_packages_header_singular;
+
+	public static String ReorgPolicyFactory_copy_packages_header_plural;
 
 	public static String ReorgPolicyFactory_copy_packages_plural;
 
-	public static String ReorgPolicyFactory_copy_roots_header;
+	public static String ReorgPolicyFactory_copy_roots_header_singular;
+
+	public static String ReorgPolicyFactory_copy_roots_header_plural;
 
 	public static String ReorgPolicyFactory_copy_roots_plural;
 
@@ -2138,7 +2041,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_move_description_singular;
 
-	public static String ReorgPolicyFactory_move_elements_header;
+	public static String ReorgPolicyFactory_move_elements_header_singular;
+
+	public static String ReorgPolicyFactory_move_elements_header_plural;
 
 	public static String ReorgPolicyFactory_move_elements_plural;
 
@@ -2156,7 +2061,9 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_move_folders;
 
-	public static String ReorgPolicyFactory_move_header;
+	public static String ReorgPolicyFactory_move_header_singular;
+
+	public static String ReorgPolicyFactory_move_header_plural;
 
 	public static String ReorgPolicyFactory_move_import_containers;
 
@@ -2178,13 +2085,17 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReorgPolicyFactory_move_package_declarations;
 
-	public static String ReorgPolicyFactory_move_packages_header;
+	public static String ReorgPolicyFactory_move_packages_header_singular;
+
+	public static String ReorgPolicyFactory_move_packages_header_plural;
 
 	public static String ReorgPolicyFactory_move_packages_plural;
 
 	public static String ReorgPolicyFactory_move_packages_singular;
 
-	public static String ReorgPolicyFactory_move_roots_header;
+	public static String ReorgPolicyFactory_move_roots_header_singular;
+
+	public static String ReorgPolicyFactory_move_roots_header_plural;
 
 	public static String ReorgPolicyFactory_move_roots_plural;
 
@@ -2286,8 +2197,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String ReplaceInvocationsRefactoring_select_method_to_apply;
 
-	public static String RippleMethodFinder_analizing_hierarchy;
-
 	public static String SelfEncapsulateField_AccessAnalyzer_cannot_convert_postfix_expression;
 
 	public static String SelfEncapsulateField_AccessAnalyzer_encapsulate_postfix_access;
@@ -2402,8 +2311,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String SurroundWithTryCatchAnalyzer_doesNotCover;
 
-	public static String SurroundWithTryCatchAnalyzer_noUncaughtExceptions;
-
 	public static String SurroundWithTryCatchAnalyzer_onlyStatements;
 
 	public static String SurroundWithTryCatchRefactoring_name;
@@ -2442,8 +2349,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String TypeContextChecker_return_type_not_empty;
 
-	public static String UndoCompilationUnitChange_no_resource;
-
 	public static String UndoDeleteResourceChange_already_exists;
 
 	public static String UndoDeleteResourceChange_cannot_restore;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/TypeContextChecker.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/TypeContextChecker.java
index aaa399e..e3ac639 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/TypeContextChecker.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/TypeContextChecker.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,7 @@ import org.eclipse.jdt.core.dom.ImportDeclaration;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.QualifiedName;
@@ -73,7 +74,6 @@ import org.eclipse.jdt.core.search.TypeNameMatch;
 import org.eclipse.jdt.internal.corext.dom.ASTFlattener;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
@@ -740,8 +740,7 @@ public class TypeContextChecker {
 			try {
 				wc.getBuffer().setContents(cuString.toString());
 				CompilationUnit compilationUnit= new RefactoringASTParser(AST.JLS3).parse(wc, true);
-				ASTNode type= NodeFinder.perform(compilationUnit, superClassContext.getBeforeString().length(),
-						superclass.length());
+				ASTNode type= NodeFinder.perform(compilationUnit, superClassContext.getBeforeString().length(), superclass.length());
 				if (type instanceof Type) {
 					return handleBug84585(((Type) type).resolveBinding());
 				} else if (type instanceof Name) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/base/JavaStatusContext.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/base/JavaStatusContext.java
index ce89d1f..029cb61 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/base/JavaStatusContext.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/base/JavaStatusContext.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,10 +20,10 @@ import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java
index 890674b..81f727f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,8 +81,10 @@ import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.Corext;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -749,7 +751,8 @@ public class CallInliner {
 	}
 
 	private VariableDeclarationStatement createLocalDeclaration(ITypeBinding type, String name, Expression initializer) {
-		String typeName= fImportRewrite.addImport(type);
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(fTargetNode, fImportRewrite);
+		String typeName= fImportRewrite.addImport(type, context);
 		VariableDeclarationStatement decl= (VariableDeclarationStatement)ASTNodeFactory.newStatement(
 			fInvocation.getAST(), typeName + " " + name + ";"); //$NON-NLS-1$ //$NON-NLS-2$
 		((VariableDeclarationFragment)decl.fragments().get(0)).setInitializer(initializer);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ConvertAnonymousToNestedRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ConvertAnonymousToNestedRefactoring.java
index b5928ff..f954143 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ConvertAnonymousToNestedRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ConvertAnonymousToNestedRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,6 +65,7 @@ import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -89,7 +90,6 @@ import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.fix.LinkedProposalModel;
 import org.eclipse.jdt.internal.corext.fix.LinkedProposalPositionGroup;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java
index f3beb8b..b2ffc89 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.NamingConventions;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
@@ -63,6 +64,8 @@ import org.eclipse.jdt.core.dom.SwitchCase;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
@@ -71,7 +74,8 @@ import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.Corext;
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
@@ -238,7 +242,7 @@ public class ExtractConstantRefactoring extends Refactoring {
 			try {
 				Expression expression= getSelectedExpression().getAssociatedExpression();
 				if (expression != null) {
-					ITypeBinding binding= expression.resolveTypeBinding();
+					ITypeBinding binding= guessBindingForReference(expression);
 					fGuessedConstNames= StubUtility.getVariableNameSuggestions(NamingConventions.VK_STATIC_FINAL_FIELD, fCu.getJavaProject(), binding, expression, Arrays.asList(getExcludedVariableNames()));
 				}
 			} catch (JavaModelException e) {
@@ -344,6 +348,7 @@ public class ExtractConstantRefactoring extends Refactoring {
 				return RefactoringStatus.createStatus(RefactoringStatus.FATAL, RefactoringCoreMessages.ExtractConstantRefactoring_select_expression, null, Corext.getPluginId(), RefactoringStatusCodes.EXPRESSION_NOT_RVALUE, null);
 			case Checks.NOT_RVALUE_VOID:
 				return RefactoringStatus.createStatus(RefactoringStatus.FATAL, RefactoringCoreMessages.ExtractConstantRefactoring_no_void, null, Corext.getPluginId(), RefactoringStatusCodes.EXPRESSION_NOT_RVALUE_VOID, null);
+			case Checks.IS_RVALUE_GUESSED:
 			case Checks.IS_RVALUE:
 				return new RefactoringStatus();
 			default:
@@ -351,6 +356,14 @@ public class ExtractConstantRefactoring extends Refactoring {
 		}
 	}
 
+	private ITypeBinding guessBindingForReference(Expression expression) {
+		ITypeBinding binding= expression.resolveTypeBinding();
+		if (binding == null) {
+			binding= ASTResolving.guessBindingForReference(expression);
+		}
+		return binding;
+	}
+
 	//	 !!! -- same as in ExtractTempRefactoring
 	private boolean isLiteralNodeSelected() throws JavaModelException {
 		IExpressionFragment fragment= getSelectedExpression();
@@ -465,7 +478,7 @@ public class ExtractConstantRefactoring extends Refactoring {
 		for (int i= 0; i < newProblems.length; i++) {
 			IProblem problem= newProblems[i];
 			if (problem.isError())
-				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, new SourceRange(problem))));
+				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, SourceRangeFactory.create(problem))));
 		}
 	}
 
@@ -522,7 +535,7 @@ public class ExtractConstantRefactoring extends Refactoring {
 			LinkedProposalPositionGroup typeGroup= fLinkedProposalModel.getPositionGroup(KEY_TYPE, true);
 			typeGroup.addPosition(rewrite.track(type), true);
 
-			ITypeBinding typeBinding= fragment.getAssociatedExpression().resolveTypeBinding();
+			ITypeBinding typeBinding= guessBindingForReference(fragment.getAssociatedExpression());
 			if (typeBinding != null) {
 				ITypeBinding[] relaxingTypes= ASTResolving.getNarrowingTypes(ast, typeBinding);
 				for (int i= 0; i < relaxingTypes.length; i++) {
@@ -537,10 +550,12 @@ public class ExtractConstantRefactoring extends Refactoring {
 	private Type getConstantType() throws JavaModelException {
 		if (fConstantTypeCache == null) {
 			IExpressionFragment fragment= getSelectedExpression();
-			ITypeBinding typeBinding= fragment.getAssociatedExpression().resolveTypeBinding();
+			ITypeBinding typeBinding= guessBindingForReference(fragment.getAssociatedExpression());
 			AST ast= fCuRewrite.getAST();
 			typeBinding= Bindings.normalizeForDeclarationUse(typeBinding, ast);
-			fConstantTypeCache= fCuRewrite.getImportRewrite().addImport(typeBinding, ast);
+			ImportRewrite importRewrite= fCuRewrite.getImportRewrite();
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(fCuRewrite.getRoot(), fSelectionStart, importRewrite);
+			fConstantTypeCache= importRewrite.addImport(typeBinding, ast, context);
 		}
 		return fConstantTypeCache;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodAnalyzer.java
index 070effb..6e37f6e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Extract method and continue https://bugs.eclipse.org/bugs/show_bug.cgi?id=48056
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Name ambiguous return value in error message - https://bugs.eclipse.org/bugs/show_bug.cgi?id=50607
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.code;
 
@@ -15,6 +17,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import com.ibm.icu.text.MessageFormat;
+
 import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.jface.text.IRegion;
@@ -25,14 +29,18 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.compiler.ITerminalSymbols;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
 import org.eclipse.jdt.core.dom.Assignment;
 import org.eclipse.jdt.core.dom.Block;
 import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.BreakStatement;
 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.ConstructorInvocation;
+import org.eclipse.jdt.core.dom.ContinueStatement;
 import org.eclipse.jdt.core.dom.DoStatement;
+import org.eclipse.jdt.core.dom.EnhancedForStatement;
 import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.ForStatement;
@@ -40,12 +48,14 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Initializer;
+import org.eclipse.jdt.core.dom.LabeledStatement;
 import org.eclipse.jdt.core.dom.Message;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
 import org.eclipse.jdt.core.dom.SwitchCase;
@@ -55,8 +65,11 @@ import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
@@ -72,7 +85,10 @@ import org.eclipse.jdt.internal.corext.refactoring.code.flow.InputFlowAnalyzer;
 import org.eclipse.jdt.internal.corext.refactoring.util.CodeAnalyzer;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
+import org.eclipse.jdt.ui.JavaElementLabels;
+
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
+import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 
 /* package */ class ExtractMethodAnalyzer extends CodeAnalyzer {
 
@@ -110,7 +126,8 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
 	private boolean fForceStatic;
 	private boolean fIsLastStatementSelected;
-
+	private SimpleName fEnclosingLoopLabel;
+	
 	public ExtractMethodAnalyzer(ICompilationUnit unit, Selection selection) throws CoreException {
 		super(unit, selection, false);
 	}
@@ -245,7 +262,8 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 					} else {
 						ITypeBinding normalizedBinding= Bindings.normalizeForDeclarationUse(fExpressionBinding, ast);
 						if (normalizedBinding != null) {
-							fReturnType= rewriter.addImport(normalizedBinding, ast);
+							ImportRewriteContext context= new ContextSensitiveImportRewriteContext(fEnclosingBodyDeclaration, rewriter);
+							fReturnType= rewriter.addImport(normalizedBinding, ast, context);
 							fReturnTypeBinding= normalizedBinding;
 						}
 					}
@@ -314,9 +332,12 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 		fInputFlowInfo= flowAnalyzer.perform(getSelectedNodes());
 
 		if (fInputFlowInfo.branches()) {
-			status.addFatalError(RefactoringCoreMessages.ExtractMethodAnalyzer_branch_mismatch, JavaStatusContext.create(fCUnit, getSelection()));
-			fReturnKind= ERROR;
-			return status;
+			String canHandleBranchesProblem= canHandleBranches();
+			if (canHandleBranchesProblem != null) {
+				status.addFatalError(canHandleBranchesProblem, JavaStatusContext.create(fCUnit, getSelection()));
+				fReturnKind= ERROR;
+				return status;
+			}
 		}
 		if (fInputFlowInfo.isValueReturn()) {
 			fReturnKind= RETURN_STATEMENT_VALUE;
@@ -341,6 +362,88 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 		return status;
 	}
 
+	private String canHandleBranches() {
+		if (fReturnValue != null)
+			return RefactoringCoreMessages.ExtractMethodAnalyzer_branch_mismatch;
+		
+		ASTNode[] selectedNodes= getSelectedNodes();
+		final ASTNode lastSelectedNode= selectedNodes[selectedNodes.length - 1];
+		Statement body= getParentLoopBody(lastSelectedNode.getParent());
+		if (!(body instanceof Block))
+			return RefactoringCoreMessages.ExtractMethodAnalyzer_branch_mismatch;
+		
+		if (body != lastSelectedNode) {
+			Block block= (Block)body;
+			List statements= block.statements();
+			ASTNode lastStatementInLoop= (ASTNode)statements.get(statements.size() - 1);
+			if (lastSelectedNode != lastStatementInLoop)
+				return RefactoringCoreMessages.ExtractMethodAnalyzer_branch_mismatch;
+		}
+		
+		final String continueMatchesLoopProblem[]= { null };
+		for (int i= 0; i < selectedNodes.length; i++) {
+			final ASTNode astNode= selectedNodes[i];
+			astNode.accept(new ASTVisitor() {
+				ArrayList fLocalLoopLabels= new ArrayList();
+				
+				public boolean visit(BreakStatement node) {
+					SimpleName label= node.getLabel();
+					if (label != null && !fLocalLoopLabels.contains(label.getIdentifier())) {
+						continueMatchesLoopProblem[0]= Messages.format(
+								RefactoringCoreMessages.ExtractMethodAnalyzer_branch_break_mismatch,
+								new Object[] { ("break " + label.getIdentifier()) }); //$NON-NLS-1$
+					}
+					return false;
+				}
+				
+				public boolean visit(LabeledStatement node) {
+					SimpleName label= node.getLabel();
+					if (label != null)
+						fLocalLoopLabels.add(label.getIdentifier());
+					return true;
+				}
+				
+				public void endVisit(ContinueStatement node) {
+					SimpleName label= node.getLabel();
+					if (label != null && !fLocalLoopLabels.contains(label.getIdentifier())) {
+						if (fEnclosingLoopLabel == null || ! label.getIdentifier().equals(fEnclosingLoopLabel.getIdentifier())) {
+							continueMatchesLoopProblem[0]= Messages.format(
+									RefactoringCoreMessages.ExtractMethodAnalyzer_branch_continue_mismatch,
+									new Object[] { "continue " + label.getIdentifier() }); //$NON-NLS-1$
+						}
+					}
+				}
+			});
+		}
+		return continueMatchesLoopProblem[0];
+	}
+
+	private Statement getParentLoopBody(ASTNode node) {
+		Statement stmt= null;
+		ASTNode start= node;
+		while (start != null
+				&& !(start instanceof ForStatement)
+				&& !(start instanceof DoStatement)
+				&& !(start instanceof WhileStatement)
+				&& !(start instanceof EnhancedForStatement)) {
+			start= start.getParent();
+		}
+		if (start instanceof ForStatement) {
+			stmt= ((ForStatement)start).getBody();
+		} else if (start instanceof DoStatement) {
+			stmt= ((DoStatement)start).getBody();
+		} else if (start instanceof WhileStatement) {
+			stmt= ((WhileStatement)start).getBody();
+		} else if (start instanceof EnhancedForStatement) {
+			stmt= ((EnhancedForStatement)start).getBody();
+		}
+		if (start.getParent() instanceof LabeledStatement) {
+			LabeledStatement labeledStatement= (LabeledStatement)start.getParent();
+			fEnclosingLoopLabel= labeledStatement.getLabel();
+		}
+		return stmt;
+	}
+
 	private boolean isVoidMethod() {
 		// if we have an initializer
 		if (fEnclosingMethodBinding == null)
@@ -427,21 +530,21 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 		IRegion region= getSelectedNodeRange();
 		Selection selection= Selection.createFromStartLength(region.getOffset(), region.getLength());
 
-		int counter= 0;
+		List localReads= new ArrayList();
 		flowContext.setComputeMode(FlowContext.ARGUMENTS);
 		FlowInfo argInfo= new InputFlowAnalyzer(flowContext, selection, true).perform(fEnclosingBodyDeclaration);
 		IVariableBinding[] reads= argInfo.get(flowContext, FlowInfo.READ | FlowInfo.READ_POTENTIAL | FlowInfo.UNKNOWN);
-		outer: for (int i= 0; i < returnValues.length && counter <= 1; i++) {
+		outer: for (int i= 0; i < returnValues.length && localReads.size() < returnValues.length; i++) {
 			IVariableBinding binding= returnValues[i];
 			for (int x= 0; x < reads.length; x++) {
 				if (reads[x] == binding) {
-					counter++;
+					localReads.add(binding);
 					fReturnValue= binding;
 					continue outer;
 				}
 			}
 		}
-		switch (counter) {
+		switch (localReads.size()) {
 			case 0:
 				fReturnValue= null;
 				break;
@@ -449,7 +552,17 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 				break;
 			default:
 				fReturnValue= null;
-				status.addFatalError(RefactoringCoreMessages.ExtractMethodAnalyzer_assignments_to_local, JavaStatusContext.create(fCUnit, getSelection()));
+				StringBuffer affectedLocals= new StringBuffer();
+				for (int i= 0; i < localReads.size(); i++) {
+					IVariableBinding binding= (IVariableBinding)localReads.get(i);
+					String bindingName= BindingLabelProvider.getBindingLabel(binding, BindingLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.F_PRE_TYPE_SIGNATURE);
+					affectedLocals.append(bindingName);
+					if (i != localReads.size() - 1) {
+						affectedLocals.append('\n');
+					}
+				}
+				String message= MessageFormat.format(RefactoringCoreMessages.ExtractMethodAnalyzer_assignments_to_local, new Object[] { affectedLocals.toString() });
+				status.addFatalError(message, JavaStatusContext.create(fCUnit, getSelection()));
 				return;
 		}
 		List callerLocals= new ArrayList(5);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java
index 4e86a91..1b0e0bc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractMethodRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,9 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Does not replace similar code in parent class of anonymous class - https://bugs.eclipse.org/bugs/show_bug.cgi?id=160853
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Extract method and continue https://bugs.eclipse.org/bugs/show_bug.cgi?id=48056
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] should declare method static if extracted from anonymous in static method - https://bugs.eclipse.org/bugs/show_bug.cgi?id=152004
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.code;
 
@@ -15,6 +18,7 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -53,16 +57,21 @@ import org.eclipse.jdt.core.dom.Block;
 import org.eclipse.jdt.core.dom.BodyDeclaration;
 import org.eclipse.jdt.core.dom.ChildListPropertyDescriptor;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ContinueStatement;
+import org.eclipse.jdt.core.dom.DoStatement;
+import org.eclipse.jdt.core.dom.EnhancedForStatement;
 import org.eclipse.jdt.core.dom.EnumDeclaration;
 import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.ExpressionStatement;
 import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ForStatement;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.Javadoc;
+import org.eclipse.jdt.core.dom.LabeledStatement;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
@@ -70,21 +79,25 @@ import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.ExtractMethodDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -505,6 +518,7 @@ public class ExtractMethodRefactoring extends Refactoring {
 			}
 
 			replaceDuplicates(result);
+			replaceBranches(result);
 
 			if (fImportRewriter.hasRecordedChanges()) {
 				TextEdit edit= fImportRewriter.rewriteImports(null);
@@ -522,6 +536,79 @@ public class ExtractMethodRefactoring extends Refactoring {
 
 	}
 
+	private void replaceBranches(final CompilationUnitChange result) {
+		ASTNode[] selectedNodes= fAnalyzer.getSelectedNodes();
+		for (int i= 0; i < selectedNodes.length; i++) {
+			ASTNode astNode= selectedNodes[i];
+			astNode.accept(new ASTVisitor() {
+				private LinkedList fOpenLoopLabels= new LinkedList();
+
+				private void registerLoopLabel(Statement node) {
+					String identifier;
+					if (node.getParent() instanceof LabeledStatement) {
+						LabeledStatement labeledStatement= (LabeledStatement)node.getParent();
+						identifier= labeledStatement.getLabel().getIdentifier();
+					} else {
+						identifier= null;
+					}
+					fOpenLoopLabels.add(identifier);
+				}
+				
+				public boolean visit(ForStatement node) {
+					registerLoopLabel(node);
+					return super.visit(node);
+				}
+
+				public void endVisit(ForStatement node) {
+					fOpenLoopLabels.removeLast();
+				}
+
+				public boolean visit(WhileStatement node) {
+					registerLoopLabel(node);
+					return super.visit(node);
+				}
+
+				public void endVisit(WhileStatement node) {
+					fOpenLoopLabels.removeLast();
+				}
+
+				public boolean visit(EnhancedForStatement node) {
+					registerLoopLabel(node);
+					return super.visit(node);
+				}
+
+				public void endVisit(EnhancedForStatement node) {
+					fOpenLoopLabels.removeLast();
+				}
+
+				public boolean visit(DoStatement node) {
+					registerLoopLabel(node);
+					return super.visit(node);
+				}
+
+				public void endVisit(DoStatement node) {
+					fOpenLoopLabels.removeLast();
+				}
+
+				public void endVisit(ContinueStatement node) {
+					final SimpleName label= node.getLabel();
+					if (fOpenLoopLabels.isEmpty() || (label != null && !fOpenLoopLabels.contains(label.getIdentifier()))) {
+						TextEditGroup description= new TextEditGroup(RefactoringCoreMessages.ExtractMethodRefactoring_replace_continue);
+						result.addTextEditGroup(description);
+
+						ReturnStatement rs= fAST.newReturnStatement();
+						IVariableBinding returnValue= fAnalyzer.getReturnValue();
+						if (returnValue != null) {
+							rs.setExpression(fAST.newSimpleName(getName(returnValue)));
+						}
+
+						fRewriter.replace(node, rs, description);
+					}
+				}
+			});
+		}
+	}
+
 	private ExtractMethodDescriptor getRefactoringDescriptor() {
 		final Map arguments= new HashMap();
 		String project= null;
@@ -662,7 +749,7 @@ public class ExtractMethodRefactoring extends Refactoring {
 
 	private void initializeDuplicates() {
 		ASTNode start= fAnalyzer.getEnclosingBodyDeclaration();
-		while(!(start instanceof AbstractTypeDeclaration) && !(start instanceof AnonymousClassDeclaration)) {
+		while (!(start instanceof AbstractTypeDeclaration)) {
 			start= start.getParent();
 		}
 
@@ -678,7 +765,7 @@ public class ExtractMethodRefactoring extends Refactoring {
 		if (decl instanceof MethodDeclaration || decl instanceof Initializer || decl instanceof FieldDeclaration) {
 			ITypeBinding binding= ASTNodes.getEnclosingType(current);
 			ASTNode next= getNextParent(current);
-			while (next != null && binding != null && binding.isNested() && !Modifier.isStatic(binding.getDeclaredModifiers())) {
+			while (next != null && binding != null && binding.isNested()) {
 				result.add(next);
 				current= next;
 				binding= ASTNodes.getEnclosingType(current);
@@ -798,12 +885,22 @@ public class ExtractMethodRefactoring extends Refactoring {
 		for (int d= 0; d < fDuplicates.length; d++) {
 			SnippetFinder.Match duplicate= fDuplicates[d];
 			if (!duplicate.isMethodBody()) {
-				ASTNode[] callNodes= createCallNodes(duplicate);
-				new StatementRewrite(fRewriter, duplicate.getNodes()).replace(callNodes, description);
+				if (isDestinationReachable(duplicate.getEnclosingMethod())) {
+					ASTNode[] callNodes= createCallNodes(duplicate);
+					new StatementRewrite(fRewriter, duplicate.getNodes()).replace(callNodes, description);
+				}
 			}
 		}
 	}
 
+	private boolean isDestinationReachable(MethodDeclaration methodDeclaration) {
+		ASTNode start= methodDeclaration;
+		while (start != null && start != fDestination) {
+			start= start.getParent();
+		}
+		return start == fDestination;
+	}
+
 	private MethodDeclaration createNewMethod(ASTNode[] selectedNodes, String lineDelimiter, TextEditGroup substitute) throws CoreException {
 		MethodDeclaration result= createNewMethodDeclaration();
 		result.setBody(createMethodBody(selectedNodes, substitute));
@@ -823,8 +920,16 @@ public class ExtractMethodRefactoring extends Refactoring {
 		MethodDeclaration result= fAST.newMethodDeclaration();
 
 		int modifiers= fVisibility;
-		if (Modifier.isStatic(fAnalyzer.getEnclosingBodyDeclaration().getModifiers()) || fAnalyzer.getForceStatic()) {
-			modifiers|= Modifier.STATIC;
+		ASTNode enclosingBodyDeclaration= fAnalyzer.getEnclosingBodyDeclaration();
+		while (enclosingBodyDeclaration != null && enclosingBodyDeclaration.getParent() != fDestination) {
+			enclosingBodyDeclaration= enclosingBodyDeclaration.getParent();
+		}
+		if (enclosingBodyDeclaration instanceof BodyDeclaration) { // should always be the case
+			int enclosingModifiers= ((BodyDeclaration)enclosingBodyDeclaration).getModifiers();
+			boolean shouldBeStatic= Modifier.isStatic(enclosingModifiers) || fAnalyzer.getForceStatic();
+			if (shouldBeStatic) {
+				modifiers|= Modifier.STATIC;
+			}
 		}
 
 		ITypeBinding[] typeVariables= computeLocalTypeVariables();
@@ -853,9 +958,10 @@ public class ExtractMethodRefactoring extends Refactoring {
 
 		List exceptions= result.thrownExceptions();
 		ITypeBinding[] exceptionTypes= fAnalyzer.getExceptions(fThrowRuntimeExceptions);
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(enclosingBodyDeclaration, fImportRewriter);
 		for (int i= 0; i < exceptionTypes.length; i++) {
 			ITypeBinding exceptionType= exceptionTypes[i];
-			exceptions.add(ASTNodeFactory.newName(fAST, fImportRewriter.addImport(exceptionType)));
+			exceptions.add(ASTNodeFactory.newName(fAST, fImportRewriter.addImport(exceptionType, context)));
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java
index a02633b..c152795 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.NamingConventions;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
@@ -69,6 +70,7 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.IfStatement;
 import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
@@ -87,8 +89,9 @@ import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
-import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
@@ -96,7 +99,8 @@ import org.eclipse.jdt.core.refactoring.descriptors.ExtractLocalDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.Corext;
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
@@ -454,6 +458,7 @@ public class ExtractTempRefactoring extends Refactoring {
 				return RefactoringStatus.createStatus(RefactoringStatus.FATAL, RefactoringCoreMessages.ExtractTempRefactoring_select_expression, null, Corext.getPluginId(), RefactoringStatusCodes.EXPRESSION_NOT_RVALUE, null);
 			case Checks.NOT_RVALUE_VOID:
 				return RefactoringStatus.createStatus(RefactoringStatus.FATAL, RefactoringCoreMessages.ExtractTempRefactoring_no_void, null, Corext.getPluginId(), RefactoringStatusCodes.EXPRESSION_NOT_RVALUE_VOID, null);
+			case Checks.IS_RVALUE_GUESSED:
 			case Checks.IS_RVALUE:
 				return new RefactoringStatus();
 			default:
@@ -462,6 +467,14 @@ public class ExtractTempRefactoring extends Refactoring {
 		}
 	}
 
+	private ITypeBinding guessBindingForReference(Expression expression) {
+		ITypeBinding binding= expression.resolveTypeBinding();
+		if (binding == null) {
+			binding= ASTResolving.guessBindingForReference(expression);
+		}
+		return binding;
+	}
+
 	public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException {
 		try {
 			pm.beginTask(RefactoringCoreMessages.ExtractTempRefactoring_checking_preconditions, 4);
@@ -543,7 +556,7 @@ public class ExtractTempRefactoring extends Refactoring {
 		for (int i= 0; i < newProblems.length; i++) {
 			IProblem problem= newProblems[i];
 			if (problem.isError())
-				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, new SourceRange(problem))));
+				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, SourceRangeFactory.create(problem))));
 		}
 	}
 
@@ -866,7 +879,9 @@ public class ExtractTempRefactoring extends Refactoring {
 			}
 			if (typeBinding != null) {
 				typeBinding= Bindings.normalizeForDeclarationUse(typeBinding, ast);
-				resultingType= fCURewrite.getImportRewrite().addImport(typeBinding, ast);
+				ImportRewrite importRewrite= fCURewrite.getImportRewrite();
+				ImportRewriteContext context= new ContextSensitiveImportRewriteContext(expression, importRewrite);
+				resultingType= importRewrite.addImport(typeBinding, ast, context);
 			} else {
 				resultingType= ast.newSimpleType(ast.newSimpleName("Object")); //$NON-NLS-1$
 			}
@@ -900,7 +915,7 @@ public class ExtractTempRefactoring extends Refactoring {
 			try {
 				Expression expression= getSelectedExpression().getAssociatedExpression();
 				if (expression != null) {
-					ITypeBinding binding= expression.resolveTypeBinding();
+					ITypeBinding binding= guessBindingForReference(expression);
 					fGuessedTempNames= StubUtility.getVariableNameSuggestions(NamingConventions.VK_LOCAL, fCu.getJavaProject(), binding, expression, Arrays.asList(getExcludedVariableNames()));
 				}
 			} catch (JavaModelException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java
index 18b96cb..930fac7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,6 +72,7 @@ import org.eclipse.jdt.core.dom.ImportDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -83,6 +84,7 @@ import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.InlineConstantDescriptor;
@@ -93,11 +95,11 @@ import org.eclipse.jdt.core.search.SearchPattern;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.Corext;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.ImportReferencesCollector;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory;
 import org.eclipse.jdt.internal.corext.dom.fragments.IExpressionFragment;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
@@ -196,6 +198,7 @@ public class InlineConstantRefactoring extends Refactoring {
 			private final Expression fNewLocation;
 			private final HashSet fStaticImportsInReference;
 			private final CompilationUnitRewrite fNewLocationCuRewrite;
+			private final ImportRewriteContext fNewLocationContext;
 
 			public InitializerTraversal(Expression initializer, HashSet staticImportsInInitializer, Expression newLocation, HashSet staticImportsInReference, CompilationUnitRewrite newLocationCuRewrite) {
 				fInitializer= initializer;
@@ -205,6 +208,7 @@ public class InlineConstantRefactoring extends Refactoring {
 				fNewLocation= newLocation;
 				fStaticImportsInReference= staticImportsInReference;
 				fNewLocationCuRewrite= newLocationCuRewrite;
+				fNewLocationContext= new ContextSensitiveImportRewriteContext(fNewLocation, fNewLocationCuRewrite.getImportRewrite());
 
 				perform(initializer);
 			}
@@ -263,10 +267,18 @@ public class InlineConstantRefactoring extends Refactoring {
 						ITypeBinding[] typeArguments= methodBinding.getTypeArguments();
 						ListRewrite typeArgsRewrite= fInitializerRewrite.getListRewrite(invocation, Invocations.getTypeArgumentsProperty(invocation));
 						for (int i= 0; i < typeArguments.length; i++) {
-							Type typeArgument= fNewLocationCuRewrite.getImportRewrite().addImport(typeArguments[i], fNewLocationCuRewrite.getAST());
+							Type typeArgument= fNewLocationCuRewrite.getImportRewrite().addImport(typeArguments[i], fNewLocationCuRewrite.getAST(), fNewLocationContext);
 							fNewLocationCuRewrite.getImportRemover().registerAddedImports(typeArgument);
 							typeArgsRewrite.insertLast(typeArgument, null);
 						}
+						
+						if (invocation instanceof MethodInvocation) {
+							Expression expression= ((MethodInvocation)invocation).getExpression();
+							if (expression == null) {
+								expression= fNewLocationCuRewrite.getAST().newName(fNewLocationCuRewrite.getImportRewrite().addImport(methodBinding.getDeclaringClass().getTypeDeclaration(), fNewLocationContext));
+								fInitializerRewrite.set(invocation, MethodInvocation.EXPRESSION_PROPERTY, expression, null);
+							}
+						}
 					}
 				}
 			}
@@ -300,7 +312,7 @@ public class InlineConstantRefactoring extends Refactoring {
 				}
 
 				if (leftmostBinding instanceof ITypeBinding) {
-					String addedImport= fNewLocationCuRewrite.getImportRewrite().addImport((ITypeBinding) leftmostBinding);
+					String addedImport= fNewLocationCuRewrite.getImportRewrite().addImport((ITypeBinding)leftmostBinding, fNewLocationContext);
 					fNewLocationCuRewrite.getImportRemover().registerAddedImport(addedImport);
 				}
 
@@ -375,7 +387,7 @@ public class InlineConstantRefactoring extends Refactoring {
 				if (declaringClass == null)
 					return;
 
-				Type newQualification= fNewLocationCuRewrite.getImportRewrite().addImport(declaringClass, fInitializerRewrite.getAST());
+				Type newQualification= fNewLocationCuRewrite.getImportRewrite().addImport(declaringClass, fInitializerRewrite.getAST(), fNewLocationContext);
 				fNewLocationCuRewrite.getImportRemover().registerAddedImports(newQualification);
 
 				SimpleName newToQualify= (SimpleName) fInitializerRewrite.createMoveTarget(toQualify);
@@ -465,7 +477,7 @@ public class InlineConstantRefactoring extends Refactoring {
 
 			removeConstantDeclarationIfNecessary();
 
-			return fCuRewrite.createChange();
+			return fCuRewrite.createChange(true);
 		}
 
 		private void inlineReference(Expression reference) throws CoreException {
@@ -484,22 +496,24 @@ public class InlineConstantRefactoring extends Refactoring {
 			Expression newReference;
 			boolean isStringPlaceholder= false;
 
-			ITypeBinding referenceType= reference.resolveTypeBinding();
-			if (ASTNodes.needsExplicitCast(fInitializer.resolveTypeBinding(), referenceType)) {
-				CastExpression cast= fCuRewrite.getAST().newCastExpression();
+			AST ast= fCuRewrite.getAST();
+			ITypeBinding explicitCast= ASTNodes.getExplicitCast(fInitializer, reference);
+			if (explicitCast != null) {
+				CastExpression cast= ast.newCastExpression();
 				Expression modifiedInitializerExpr= (Expression) fCuRewrite.getASTRewrite().createStringPlaceholder(modifiedInitializer, reference.getNodeType());
 				if (ASTNodes.substituteMustBeParenthesized(fInitializer, cast)) {
-					ParenthesizedExpression parenthesized= fCuRewrite.getAST().newParenthesizedExpression();
+					ParenthesizedExpression parenthesized= ast.newParenthesizedExpression();
 					parenthesized.setExpression(modifiedInitializerExpr);
 					modifiedInitializerExpr= parenthesized;
 				}
 				cast.setExpression(modifiedInitializerExpr);
-				cast.setType(fCuRewrite.getImportRewrite().addImport(referenceType, fCuRewrite.getAST()));
+				ImportRewriteContext context= new ContextSensitiveImportRewriteContext(reference, fCuRewrite.getImportRewrite());
+				cast.setType(fCuRewrite.getImportRewrite().addImport(explicitCast, ast, context));
 				newReference= cast;
 				
 			} else if (fInitializer instanceof ArrayInitializer) {
-				ArrayCreation arrayCreation= fCuRewrite.getAST().newArrayCreation();
-				ArrayType arrayType= (ArrayType) ASTNodeFactory.newType(fCuRewrite.getAST(), fOriginalDeclaration);
+				ArrayCreation arrayCreation= ast.newArrayCreation();
+				ArrayType arrayType= (ArrayType) ASTNodeFactory.newType(ast, fOriginalDeclaration);
 				arrayCreation.setType(arrayType);
 
 				ArrayInitializer newArrayInitializer= (ArrayInitializer) fCuRewrite.getASTRewrite().createStringPlaceholder(modifiedInitializer,
@@ -508,7 +522,8 @@ public class InlineConstantRefactoring extends Refactoring {
 				newReference= arrayCreation;
 
 				ITypeBinding typeToAddToImport= ASTNodes.getType(fOriginalDeclaration).resolveBinding();
-				fCuRewrite.getImportRewrite().addImport(typeToAddToImport);
+				ImportRewriteContext context= new ContextSensitiveImportRewriteContext(reference, fCuRewrite.getImportRewrite());
+				fCuRewrite.getImportRewrite().addImport(typeToAddToImport, context);
 				fCuRewrite.getImportRemover().registerAddedImport(typeToAddToImport.getName());
 				
 			} else {
@@ -517,7 +532,7 @@ public class InlineConstantRefactoring extends Refactoring {
 			}
 
 			if (ASTNodes.substituteMustBeParenthesized((isStringPlaceholder ? fInitializer : newReference), reference)) {
-				ParenthesizedExpression parenthesized= fCuRewrite.getAST().newParenthesizedExpression();
+				ParenthesizedExpression parenthesized= ast.newParenthesizedExpression();
 				parenthesized.setExpression(newReference);
 				newReference= parenthesized;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java
index c069b5d..193096e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,8 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
+import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ArrayCreation;
 import org.eclipse.jdt.core.dom.ArrayInitializer;
@@ -58,6 +60,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
@@ -74,7 +77,6 @@ import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.InlineLocalVariableDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
@@ -351,36 +353,33 @@ public class InlineTempRefactoring extends Refactoring {
 						|| referenceContext instanceof SingleVariableDeclaration
 						|| referenceContext instanceof Assignment)) {
 					IMethodBinding methodBinding= Invocations.resolveBinding(initializer);
-					ITypeBinding[] typeArguments= methodBinding.getTypeArguments();
-					Type[] typeArgumentNodes= new Type[typeArguments.length];
-					for (int i= 0; i < typeArguments.length; i++) {
-						typeArgumentNodes[i]= rewrite.getImportRewrite().addImport(typeArguments[i], rewrite.getAST());
+					if (methodBinding != null) {
+						String newSource= createParameterizedInvocation(initializer, methodBinding, rewrite);
+						return (Expression) rewrite.getASTRewrite().createStringPlaceholder(newSource, initializer.getNodeType());
 					}
-					String newSource= createParameterizedInvocation(initializer, typeArgumentNodes);
-					return (Expression) rewrite.getASTRewrite().createStringPlaceholder(newSource, initializer.getNodeType());
 				}
 			}
 		}
 		
 		Expression copy= (Expression) rewrite.getASTRewrite().createCopyTarget(initializer);
 		
-		ITypeBinding initializerType= initializer.resolveTypeBinding();
-		ITypeBinding referenceType= reference.resolveTypeBinding();
-		if (ASTNodes.needsExplicitCast(initializerType, referenceType)) {
-			CastExpression cast= rewrite.getAST().newCastExpression();
+		AST ast= rewrite.getAST();
+		ITypeBinding explicitCast= ASTNodes.getExplicitCast(initializer, reference);
+		if (explicitCast != null) {
+			CastExpression cast= ast.newCastExpression();
 			if (ASTNodes.substituteMustBeParenthesized(copy, cast)) {
-				ParenthesizedExpression parenthesized= rewrite.getAST().newParenthesizedExpression();
+				ParenthesizedExpression parenthesized= ast.newParenthesizedExpression();
 				parenthesized.setExpression(copy);
 				copy= parenthesized;
 			}
 			cast.setExpression(copy);
-			cast.setType(rewrite.getImportRewrite().addImport(referenceType, rewrite.getAST()));
+			cast.setType(rewrite.getImportRewrite().addImport(explicitCast, ast));
 			copy= cast;
 			
 		} else if (initializer instanceof ArrayInitializer && ASTNodes.getDimensions(varDecl) > 0) {
-			ArrayType newType= (ArrayType) ASTNodeFactory.newType(rewrite.getAST(), varDecl);
+			ArrayType newType= (ArrayType) ASTNodeFactory.newType(ast, varDecl);
 
-			ArrayCreation newArrayCreation= rewrite.getAST().newArrayCreation();
+			ArrayCreation newArrayCreation= ast.newArrayCreation();
 			newArrayCreation.setType(newType);
 			newArrayCreation.setInitializer((ArrayInitializer) copy);
 			return newArrayCreation;
@@ -388,11 +387,26 @@ public class InlineTempRefactoring extends Refactoring {
 		return copy;
 	}
 
-	private String createParameterizedInvocation(Expression invocation, Type[] typeArgumentNodes) throws JavaModelException {
+	private String createParameterizedInvocation(Expression invocation, IMethodBinding methodBinding, CompilationUnitRewrite cuRewrite) throws JavaModelException {
 		ASTRewrite rewrite= ASTRewrite.create(invocation.getAST());
 		ListRewrite typeArgsRewrite= rewrite.getListRewrite(invocation, Invocations.getTypeArgumentsProperty(invocation));
-		for (int i= 0; i < typeArgumentNodes.length; i++) {
-			typeArgsRewrite.insertLast(typeArgumentNodes[i], null);
+		
+		ITypeBinding[] typeArguments= methodBinding.getTypeArguments();
+		for (int i= 0; i < typeArguments.length; i++) {
+			Type typeArgumentNode= cuRewrite.getImportRewrite().addImport(typeArguments[i], cuRewrite.getAST());
+			typeArgsRewrite.insertLast(typeArgumentNode, null);
+		}
+		
+		if (invocation instanceof MethodInvocation) {
+			Expression expression= ((MethodInvocation)invocation).getExpression();
+			if (expression == null) {
+				if (Modifier.isStatic(methodBinding.getModifiers())) {
+					expression= cuRewrite.getAST().newName(cuRewrite.getImportRewrite().addImport(methodBinding.getDeclaringClass().getTypeDeclaration()));
+				} else {
+					expression= invocation.getAST().newThisExpression();
+				}
+				rewrite.set(invocation, MethodInvocation.EXPRESSION_PROPERTY, expression, null);
+			}
 		}
 
 		IDocument document= new Document(fCu.getBuffer().getContents());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java
index ac43bd0..dd8e80a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,7 @@ import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.MethodRef;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -71,8 +72,8 @@ import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
-import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.IntroduceFactoryDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.search.IJavaSearchConstants;
@@ -86,7 +87,6 @@ import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -451,7 +451,7 @@ public class IntroduceFactoryRefactoring extends Refactoring {
 			SearchResultGroup	rg=   groups[i];
 			ICompilationUnit	unit= rg.getCompilationUnit();
 
-			if (unit != null)	// Ignore hits within a binary unit
+			if (unit != null) // ignore hits within a binary unit
 				result.add(rg);
 			else
 				fCallSitesInBinaryUnits= true;
@@ -830,8 +830,9 @@ public class IntroduceFactoryRefactoring extends Refactoring {
 
 		factoryMethodCall.setName(ast.newSimpleName(fNewMethodName));
 
-		for (int i=0; i < actualCtorArgs.getRewrittenList().size(); i++) {
-			Expression actualCtorArg= (Expression) actualCtorArgs.getRewrittenList().get(i);
+		List actualCtorArgsList= actualCtorArgs.getRewrittenList();
+		for (int i=0; i < actualCtorArgsList.size(); i++) {
+			Expression actualCtorArg= (Expression) actualCtorArgsList.get(i);
 			
 			ASTNode movedArg;
 			if (ASTNodes.isExistingNode(actualCtorArg)) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java
index eb99d05..7e5adb7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceIndirectionRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,6 +60,7 @@ import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.ReturnStatement;
@@ -71,6 +72,7 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.IntroduceIndirectionDescriptor;
@@ -81,11 +83,11 @@ import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchPattern;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -783,6 +785,9 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 		AST ast= imRewrite.getAST();
 		MethodDeclaration intermediary= ast.newMethodDeclaration();
 
+		// Intermediary class is non-anonymous
+		AbstractTypeDeclaration type= (AbstractTypeDeclaration)typeToDeclaration(fIntermediaryClass, imRewrite.getRoot());
+
 		// Name
 		intermediary.setName(ast.newSimpleName(fIntermediaryMethodName));
 
@@ -794,10 +799,11 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 		// Parameters
 		String targetParameterName= StubUtility.suggestArgumentName(getProject(), fIntermediaryFirstParameterType.getName(), fTargetMethod.getParameterNames());
 
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(type, imRewrite.getImportRewrite());
 		if (!isStaticTarget()) {
 			// Add first param
 			SingleVariableDeclaration parameter= imRewrite.getAST().newSingleVariableDeclaration();
-			Type t= imRewrite.getImportRewrite().addImport(fIntermediaryFirstParameterType, imRewrite.getAST());
+			Type t= imRewrite.getImportRewrite().addImport(fIntermediaryFirstParameterType, imRewrite.getAST(), context);
 			if (fIntermediaryFirstParameterType.isGenericType()) {
 				ParameterizedType parameterized= imRewrite.getAST().newParameterizedType(t);
 				ITypeBinding[] typeParameters= fIntermediaryFirstParameterType.getTypeParameters();
@@ -820,7 +826,7 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 		copyTypeParameters(intermediary, imRewrite);
 
 		// Return type
-		intermediary.setReturnType2(imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getReturnType(), ast));
+		intermediary.setReturnType2(imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getReturnType(), ast, context));
 
 		// Exceptions
 		copyExceptions(intermediary, imRewrite);
@@ -829,8 +835,8 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 		MethodInvocation invocation= imRewrite.getAST().newMethodInvocation();
 		invocation.setName(imRewrite.getAST().newSimpleName(fTargetMethod.getElementName()));
 		if (isStaticTarget()) {
-			Type type= imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getDeclaringClass(), ast);
-			invocation.setExpression(ASTNodeFactory.newName(ast, ASTNodes.asString(type)));
+			Type importedType= imRewrite.getImportRewrite().addImport(fTargetMethodBinding.getDeclaringClass(), ast, context);
+			invocation.setExpression(ASTNodeFactory.newName(ast, ASTNodes.asString(importedType)));
 		} else {
 			invocation.setExpression(imRewrite.getAST().newSimpleName(targetParameterName));
 		}
@@ -852,9 +858,6 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 		}
 
 		// Add the completed method to the intermediary type:
-
-		// Intermediary class is non-anonymous
-		AbstractTypeDeclaration type= (AbstractTypeDeclaration) typeToDeclaration(fIntermediaryClass, imRewrite.getRoot());
 		ChildListPropertyDescriptor typeBodyDeclarationsProperty= typeToBodyDeclarationProperty(fIntermediaryClass, imRewrite.getRoot());
 
 		ListRewrite bodyDeclarationsListRewrite= imRewrite.getASTRewrite().getListRewrite(type, typeBodyDeclarationsProperty);
@@ -1127,7 +1130,7 @@ public class IntroduceIndirectionRefactoring extends Refactoring {
 	private void createChangeAndDiscardRewrite(ICompilationUnit compilationUnit) throws CoreException {
 		CompilationUnitRewrite rewrite= (CompilationUnitRewrite) fRewrites.get(compilationUnit);
 		if (rewrite != null) {
-			fTextChangeManager.manage(compilationUnit, rewrite.createChange());
+			fTextChangeManager.manage(compilationUnit, rewrite.createChange(true));
 			fRewrites.remove(compilationUnit);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java
index c280297..2894575 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ArrayInitializer;
 import org.eclipse.jdt.core.dom.Assignment;
@@ -52,6 +53,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -61,11 +63,9 @@ import org.eclipse.jdt.core.refactoring.descriptors.IntroduceParameterDescriptor
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.Corext;
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.ScopeAnalyzer;
 import org.eclipse.jdt.internal.corext.dom.fragments.ASTFragmentFactory;
 import org.eclipse.jdt.internal.corext.dom.fragments.IASTFragment;
@@ -374,6 +374,7 @@ public class IntroduceParameterRefactoring extends Refactoring implements IDeleg
 	// !! +/- same as in ExtractConstantRefactoring & ExtractTempRefactoring
 	private RefactoringStatus checkExpressionFragmentIsRValue() {
 		switch(Checks.checkExpressionIsRValue(fSelectedExpression)) {
+			case Checks.IS_RVALUE_GUESSED:
 			case Checks.NOT_RVALUE_MISC:
 				return RefactoringStatus.createStatus(RefactoringStatus.FATAL, RefactoringCoreMessages.IntroduceParameterRefactoring_select, null, Corext.getPluginId(), RefactoringStatusCodes.EXPRESSION_NOT_RVALUE, null);
 			case Checks.NOT_RVALUE_VOID:
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ReplaceInvocationsRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ReplaceInvocationsRefactoring.java
index 4709e36..a7d3f8d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ReplaceInvocationsRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ReplaceInvocationsRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,7 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
@@ -68,7 +69,6 @@ import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java
index 2e51916..79bbd37 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SnippetFinder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] extracting return value results in compile error - https://bugs.eclipse.org/bugs/show_bug.cgi?id=264606
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.code;
 
@@ -25,10 +26,14 @@ import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
 import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
 import org.eclipse.jdt.core.dom.Assignment;
 import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.FieldAccess;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SuperFieldAccess;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -164,8 +169,28 @@ import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
 	}
 
 	private static boolean isLeftHandSideOfAssignment(ASTNode node) {
-		ASTNode parent= node.getParent();
-		return parent != null && parent.getNodeType() == ASTNode.ASSIGNMENT && ((Assignment)parent).getLeftHandSide() == node;
+		Assignment assignment= (Assignment)ASTNodes.getParent(node, ASTNode.ASSIGNMENT);
+		if (assignment != null) {
+			Expression leftHandSide= assignment.getLeftHandSide();
+			if (leftHandSide == node) {
+				return true;
+			}
+			if (ASTNodes.isParent(node, leftHandSide)) {
+				switch (leftHandSide.getNodeType()) {
+					case ASTNode.SIMPLE_NAME:
+						return true;
+					case ASTNode.FIELD_ACCESS:
+						return node == ((FieldAccess)leftHandSide).getName();
+					case ASTNode.QUALIFIED_NAME:
+						return node == ((QualifiedName)leftHandSide).getName();
+					case ASTNode.SUPER_FIELD_ACCESS:
+						return node == ((SuperFieldAccess)leftHandSide).getName();
+					default:
+						return false;
+				}
+			}
+		}
+		return false;
 	}
 
 	public boolean visit(TypeDeclaration node) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java
index 52f5891..e09970a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,7 +72,9 @@ import org.eclipse.jdt.core.dom.ThisExpression;
 import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.CodeScopeBuilder;
@@ -438,21 +440,22 @@ public class SourceProvider {
 		List implicitReceivers= fAnalyzer.getImplicitReceivers();
 		for (Iterator iter= implicitReceivers.iterator(); iter.hasNext();) {
 			ASTNode node= (ASTNode)iter.next();
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(node, context.importer);
 			if (node instanceof MethodInvocation) {
 				final MethodInvocation inv= (MethodInvocation)node;
-				rewriter.set(inv, MethodInvocation.EXPRESSION_PROPERTY, createReceiver(rewriter, context, (IMethodBinding)inv.getName().resolveBinding()), null);
+				rewriter.set(inv, MethodInvocation.EXPRESSION_PROPERTY, createReceiver(rewriter, context, (IMethodBinding)inv.getName().resolveBinding(), importRewriteContext), null);
 			} else if (node instanceof ClassInstanceCreation) {
 				final ClassInstanceCreation inst= (ClassInstanceCreation)node;
-				rewriter.set(inst, ClassInstanceCreation.EXPRESSION_PROPERTY, createReceiver(rewriter, context, inst.resolveConstructorBinding()), null);
+				rewriter.set(inst, ClassInstanceCreation.EXPRESSION_PROPERTY, createReceiver(rewriter, context, inst.resolveConstructorBinding(), importRewriteContext), null);
 			} else if (node instanceof ThisExpression) {
 				rewriter.replace(node, rewriter.createStringPlaceholder(context.receiver, ASTNode.METHOD_INVOCATION), null);
 			} else if (node instanceof FieldAccess) {
 				final FieldAccess access= (FieldAccess)node;
-				rewriter.set(access, FieldAccess.EXPRESSION_PROPERTY, createReceiver(rewriter, context, access.resolveFieldBinding()), null);
+				rewriter.set(access, FieldAccess.EXPRESSION_PROPERTY, createReceiver(rewriter, context, access.resolveFieldBinding(), importRewriteContext), null);
 			} else if (node instanceof SimpleName && ((SimpleName)node).resolveBinding() instanceof IVariableBinding) {
 				IVariableBinding vb= (IVariableBinding)((SimpleName)node).resolveBinding();
 				if (vb.isField()) {
-					Expression receiver= createReceiver(rewriter, context, vb);
+					Expression receiver= createReceiver(rewriter, context, vb, importRewriteContext);
 					if (receiver != null) {
 						FieldAccess access= node.getAST().newFieldAccess();
 						ASTNode target= rewriter.createMoveTarget(node);
@@ -501,21 +504,21 @@ public class SourceProvider {
 
 	}
 
-	private Expression createReceiver(ASTRewrite rewriter, CallContext context, IMethodBinding method) {
-		String receiver= getReceiver(context, method.getModifiers());
+	private Expression createReceiver(ASTRewrite rewriter, CallContext context, IMethodBinding method, ImportRewriteContext importRewriteContext) {
+		String receiver= getReceiver(context, method.getModifiers(), importRewriteContext);
 		if (receiver == null)
 			return null;
 		return (Expression)rewriter.createStringPlaceholder(receiver, ASTNode.METHOD_INVOCATION);
 	}
 
-	private Expression createReceiver(ASTRewrite rewriter, CallContext context, IVariableBinding field) {
-		String receiver= getReceiver(context, field.getModifiers());
+	private Expression createReceiver(ASTRewrite rewriter, CallContext context, IVariableBinding field, ImportRewriteContext importRewriteContext) {
+		String receiver= getReceiver(context, field.getModifiers(), importRewriteContext);
 		if (receiver == null)
 			return null;
 		return (Expression)rewriter.createStringPlaceholder(receiver, ASTNode.SIMPLE_NAME);
 	}
 
-	private String getReceiver(CallContext context, int modifiers) {
+	private String getReceiver(CallContext context, int modifiers, ImportRewriteContext importRewriteContext) {
 		String receiver= context.receiver;
 		ITypeBinding invocationType= ASTNodes.getEnclosingType(context.invocation);
 		ITypeBinding sourceType= fDeclaration.resolveBinding().getDeclaringClass();
@@ -523,7 +526,7 @@ public class SourceProvider {
 			if ("this".equals(receiver) && invocationType != null && Bindings.equals(invocationType, sourceType)) { //$NON-NLS-1$
 				receiver= null;
 			} else {
-				receiver= context.importer.addImport(sourceType);
+				receiver= context.importer.addImport(sourceType, importRewriteContext);
 			}
 		}
 		return receiver;
@@ -602,7 +605,7 @@ public class SourceProvider {
 				if (node.getNodeType() == ASTNode.RETURN_STATEMENT) {
 					rs= (ReturnStatement)node;
 				} else {
-					result.add(new Region(node.getStartPosition(), node.getLength()));
+					result.add(createRange(node, node));
 				}
 				break;
 			default: {
@@ -618,24 +621,27 @@ public class SourceProvider {
 		}
 		if (rs != null) {
 			Expression exp= rs.getExpression();
-			result.add(new Region(exp.getStartPosition(), exp.getLength()));
+			result.add(createRange(exp, exp));
 		}
 		return result;
 	}
 
 	private IRegion createRange(List statements, int end) {
 		ASTNode first= (ASTNode)statements.get(0);
+		ASTNode last= (ASTNode)statements.get(end);
+		return createRange(first, last);
+	}
+
+	private IRegion createRange(ASTNode first, ASTNode last) {
 		ASTNode root= first.getRoot();
 		if (root instanceof CompilationUnit) {
 			CompilationUnit unit= (CompilationUnit)root;
 			int start= unit.getExtendedStartPosition(first);
-			ASTNode last= (ASTNode)statements.get(end);
 			int length = unit.getExtendedStartPosition(last) - start + unit.getExtendedLength(last);
 			IRegion range= new Region(start, length);
 			return range;
 		} else {
 			int start= first.getStartPosition();
-			ASTNode last= (ASTNode)statements.get(end);
 			int length = last.getStartPosition() - start + last.getLength();
 			IRegion range= new Region(start, length);
 			return range;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/TargetProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/TargetProvider.java
index f048e98..de2e87d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/TargetProvider.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/TargetProvider.java	
@@ -32,11 +32,13 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTVisitor;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.Block;
 import org.eclipse.jdt.core.dom.BodyDeclaration;
 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.ConstructorInvocation;
@@ -56,7 +58,6 @@ import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchPattern;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.refactoring.CollectingSearchRequestor;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
@@ -254,61 +255,60 @@ abstract class TargetProvider {
 			return visitType();
 		}
 		public void endVisit(TypeDeclaration node) {
-			endVisitType();
+			endVisitBodyDeclaration();
 		}
 		public boolean visit(EnumDeclaration node) {
 			return visitType();
 		}
 		public void endVisit(EnumDeclaration node) {
-			endVisitType();
+			endVisitBodyDeclaration();
 		}
 		public boolean visit(AnnotationTypeDeclaration node) {
 			return visitType();
 		}
 		public void endVisit(AnnotationTypeDeclaration node) {
-			endVisitType();
+			endVisitBodyDeclaration();
 		}
 		private boolean visitType() {
 			fBodies.add(fCurrent);
 			fCurrent= null;
 			return true;
 		}
-		private void endVisitType() {
-			fCurrent= (BodyData)fBodies.remove(fBodies.size() - 1);
-		}
-		public boolean visit(FieldDeclaration node) {
+		protected boolean visitNonTypeBodyDeclaration() {
 			fBodies.add(fCurrent);
 			fCurrent= new BodyData();
 			return true;
 		}
+		protected void endVisitBodyDeclaration() {
+			fCurrent= (BodyData)fBodies.remove(fBodies.size() - 1);
+		}
+		public boolean visit(FieldDeclaration node) {
+			return visitNonTypeBodyDeclaration();
+		}
 		public void endVisit(FieldDeclaration node) {
 			if (fCurrent.hasInvocations()) {
 				result.put(node, fCurrent);
 			}
-			endVisitType();
+			endVisitBodyDeclaration();
 		}
 		public boolean visit(MethodDeclaration node) {
-			fBodies.add(fCurrent);
-			fCurrent= new BodyData();
-			return true;
+			return visitNonTypeBodyDeclaration();
 		}
 		public void endVisit(MethodDeclaration node) {
 			if (fCurrent.hasInvocations()) {
 				result.put(node, fCurrent);
 			}
-			endVisitType();
+			endVisitBodyDeclaration();
 
 		}
 		public boolean visit(Initializer node) {
-			fBodies.add(fCurrent);
-			fCurrent= new BodyData();
-			return true;
+			return visitNonTypeBodyDeclaration();
 		}
 		public void endVisit(Initializer node) {
 			if (fCurrent.hasInvocations()) {
 				result.put(node, fCurrent);
 			}
-			endVisitType();
+			endVisitBodyDeclaration();
 		}
 		private boolean matches(IBinding binding) {
 			if (!(binding instanceof IMethodBinding))
@@ -328,9 +328,28 @@ abstract class TargetProvider {
 			fDeclaration= declaration;
 		}
 		public void initialize() {
-			InvocationFinder finder= new InvocationFinder(fDeclaration.resolveBinding());
+			IMethodBinding methodBinding= fDeclaration.resolveBinding();
+			InvocationFinder finder;
 			ASTNode type= ASTNodes.getParent(fDeclaration, AbstractTypeDeclaration.class);
-			type.accept(finder);
+			if (methodBinding.getDeclaringClass().isAnonymous()) {
+				finder= new InvocationFinder(methodBinding);
+				type.accept(finder);
+			} else {
+				//scope of local class is enclosing block
+				ASTNode block= type.getParent().getParent();
+				finder= new InvocationFinder(methodBinding) {
+					public boolean visit(Block node) {
+						return visitNonTypeBodyDeclaration();
+					}
+					public void endVisit(Block node) {
+						if (fCurrent.hasInvocations()) {
+							result.put(ASTNodes.getParent(node, BodyDeclaration.class), fCurrent);
+						}
+						endVisitBodyDeclaration();
+					}
+				};
+				block.accept(finder);
+			}
 			fBodies= finder.result;
 		}
 		public ICompilationUnit[] getAffectedCompilationUnits(RefactoringStatus status, ReferencesInBinaryContext binaryRefs, IProgressMonitor pm) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowInfo.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowInfo.java
index f1fa5ca..d3fafb8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowInfo.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] missing return type when code can throw exception - https://bugs.eclipse.org/bugs/show_bug.cgi?id=97413
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.code.flow;
 
@@ -76,10 +77,10 @@ public abstract class FlowInfo {
 	/* NOT_POSSIBLE */		{ NOT_POSSIBLE,		NOT_POSSIBLE,	NOT_POSSIBLE, 	NOT_POSSIBLE,	NOT_POSSIBLE,	NOT_POSSIBLE,	NOT_POSSIBLE	},
 	/* UNDEFINED */			{ NOT_POSSIBLE,		UNDEFINED,		NO_RETURN,		PARTIAL_RETURN,	VOID_RETURN,	VALUE_RETURN,	THROW			},
 	/* NO_RETURN */			{ NOT_POSSIBLE,		NO_RETURN,		NO_RETURN,		PARTIAL_RETURN,	VOID_RETURN,	VALUE_RETURN,	THROW			},
-	/* PARTIAL_RETURN */	{ NOT_POSSIBLE,		PARTIAL_RETURN,	PARTIAL_RETURN,	PARTIAL_RETURN,	VOID_RETURN,	VALUE_RETURN,	THROW			},
+	/* PARTIAL_RETURN */	{ NOT_POSSIBLE,		PARTIAL_RETURN,	PARTIAL_RETURN,	PARTIAL_RETURN,	VOID_RETURN,	VALUE_RETURN,	VALUE_RETURN	},
 	/* VOID_RETURN */		{ NOT_POSSIBLE,		VOID_RETURN,	VOID_RETURN,	PARTIAL_RETURN,	VOID_RETURN,	NOT_POSSIBLE,	NOT_POSSIBLE	},
 	/* VALUE_RETURN */		{ NOT_POSSIBLE,		VALUE_RETURN,	VALUE_RETURN,	PARTIAL_RETURN,	NOT_POSSIBLE,	VALUE_RETURN,	NOT_POSSIBLE	},
-	/* THROW */				{ NOT_POSSIBLE,		THROW,			THROW,			PARTIAL_RETURN,	VOID_RETURN,	VALUE_RETURN,	THROW			}
+	/* THROW */				{ NOT_POSSIBLE,		THROW,			THROW,			VALUE_RETURN,	VOID_RETURN,	VALUE_RETURN,	THROW			}
 	};
 
 	protected static final String UNLABELED = "@unlabeled"; //$NON-NLS-1$
@@ -118,14 +119,14 @@ public abstract class FlowInfo {
 
 	protected void mergeConditional(FlowInfo info, FlowContext context) {
 		mergeAccessModeConditional(info, context);
-		mergeExecutionFlowConditional(info, context);
-		mergeTypeVariablesConditional(info, context);
+		mergeExecutionFlowConditional(info);
+		mergeTypeVariablesConditional(info);
 	}
 
 	protected void mergeSequential(FlowInfo info, FlowContext context) {
 		mergeAccessModeSequential(info, context);
-		mergeExecutionFlowSequential(info, context);
-		mergeTypeVariablesSequential(info, context);
+		mergeExecutionFlowSequential(info);
+		mergeTypeVariablesSequential(info);
 	}
 
 	//---- Return Kind ------------------------------------------------------------------
@@ -212,7 +213,7 @@ public abstract class FlowInfo {
 		List catchClauses= node.catchClauses();
 		if (catchClauses.isEmpty())
 			return;
-		// Make sure we have a copy since we are modifing the fExceptions list
+		// Make sure we have a copy since we are modifying the fExceptions list
 		ITypeBinding[] exceptions= (ITypeBinding[]) fExceptions.toArray(new ITypeBinding[fExceptions.size()]);
 		for (int i= 0; i < exceptions.length; i++) {
 			handleException(catchClauses, exceptions[i]);
@@ -251,36 +252,36 @@ public abstract class FlowInfo {
 		fTypeVariables.add(typeParameter);
 	}
 
-	private void mergeTypeVariablesSequential(FlowInfo otherInfo, FlowContext context) {
+	private void mergeTypeVariablesSequential(FlowInfo otherInfo) {
 		fTypeVariables= mergeSets(fTypeVariables, otherInfo.fTypeVariables);
 	}
 
-	private void mergeTypeVariablesConditional(FlowInfo otherInfo, FlowContext context) {
+	private void mergeTypeVariablesConditional(FlowInfo otherInfo) {
 		fTypeVariables= mergeSets(fTypeVariables, otherInfo.fTypeVariables);
 	}
 
 	//---- Execution flow -------------------------------------------------------------------
 
-	private void mergeExecutionFlowSequential(FlowInfo otherInfo, FlowContext context) {
+	private void mergeExecutionFlowSequential(FlowInfo otherInfo) {
 		int other= otherInfo.fReturnKind;
 		if (branches() && other == VALUE_RETURN)
 			other= PARTIAL_RETURN;
 		fReturnKind= RETURN_KIND_SEQUENTIAL_TABLE[fReturnKind][other];
-		mergeBranches(otherInfo, context);
-		mergeExceptions(otherInfo, context);
+		mergeBranches(otherInfo);
+		mergeExceptions(otherInfo);
 	}
 
-	private void mergeExecutionFlowConditional(FlowInfo otherInfo, FlowContext context) {
+	private void mergeExecutionFlowConditional(FlowInfo otherInfo) {
 		fReturnKind= RETURN_KIND_CONDITIONAL_TABLE[fReturnKind][otherInfo.fReturnKind];
-		mergeBranches(otherInfo, context);
-		mergeExceptions(otherInfo, context);
+		mergeBranches(otherInfo);
+		mergeExceptions(otherInfo);
 	}
 
-	private void mergeBranches(FlowInfo otherInfo, FlowContext context) {
+	private void mergeBranches(FlowInfo otherInfo) {
 		fBranches= mergeSets(fBranches, otherInfo.fBranches);
 	}
 
-	private void mergeExceptions(FlowInfo otherInfo, FlowContext context) {
+	private void mergeExceptions(FlowInfo otherInfo) {
 		fExceptions= mergeSets(fExceptions, otherInfo.fExceptions);
 	}
 
@@ -325,6 +326,10 @@ public abstract class FlowInfo {
 	/**
 	 * Checks whether the given local variable binding has the given access
 	 * mode.
+	 * 
+	 * @param context the flow context used during flow analysis
+	 * @param local local variable of interest
+	 * @param mode the access mode of the local variable
 	 *
 	 * @return <code>true</code> if the binding has the given access mode.
 	 * 	<code>False</code> otherwise
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/InputFlowAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/InputFlowAnalyzer.java
index 6e74823..9e449a6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/InputFlowAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/InputFlowAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *     Dmitry Stalnov (dstalnov at fusionone.com) - contributed fix for
  *       o inline call that is used in a field initializer
  *         (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38137)
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Missing return value, while extracting code out of a loop - https://bugs.eclipse.org/bugs/show_bug.cgi?id=213519
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.code.flow;
 
@@ -172,7 +173,7 @@ public class InputFlowAnalyzer extends FlowAnalyzer {
 	}
 
 	private void createLoopReentranceVisitor(ASTNode node) {
-		if (fLoopReentranceVisitor == null && fDoLoopReentrance)
+		if (fLoopReentranceVisitor == null && fDoLoopReentrance && fSelection.coveredBy(node))
 			fLoopReentranceVisitor= new LoopReentranceVisitor(fFlowContext, fSelection, node);
 	}
 
@@ -257,7 +258,7 @@ public class InputFlowAnalyzer extends FlowAnalyzer {
 	}
 
 	private void handleLoopReentrance(ASTNode node) {
-		if (!fSelection.coveredBy(node) || fLoopReentranceVisitor == null || fLoopReentranceVisitor.getLoopNode() != node)
+		if (fLoopReentranceVisitor == null || fLoopReentranceVisitor.getLoopNode() != node)
 			return;
 
 		fLoopReentranceVisitor.process(node);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsRefactoring.java
index 77512c4..0fbe488 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.corext.refactoring.generics;
 
 import java.util.ArrayList;
@@ -65,7 +64,7 @@ import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.InferTypeArgumentsDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -198,7 +197,7 @@ public class InferTypeArgumentsRefactoring extends Refactoring {
 										if (problems[p].isError()) {
 											String cuName= JavaElementLabels.getElementLabel(source, JavaElementLabels.CU_QUALIFIED);
 											String msg= Messages.format(RefactoringCoreMessages.InferTypeArgumentsRefactoring_error_in_cu_skipped, new Object[] {cuName});
-											result.addError(msg, JavaStatusContext.create(source, new SourceRange(problems[p])));
+											result.addError(msg, JavaStatusContext.create(source, SourceRangeFactory.create(problems[p])));
 											return;
 										}
 									}
@@ -318,7 +317,7 @@ public class InferTypeArgumentsRefactoring extends Refactoring {
 				rewriteCastVariable(castCv, rewrite, fTCModel);
 			}
 
-			CompilationUnitChange change= rewrite.createChange();
+			CompilationUnitChange change= rewrite.createChange(true);
 			if (change != null) {
 				fChangeManager.manage(cu, change);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java
index c61e1cc..3a5517d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -612,10 +612,12 @@ public class InferTypeArgumentsTCModel {
 				}
 				if (referenceTypeArgument.isTypeVariable()) {
 					CollectionElementVariable2 referenceTypeArgumentCv= getElementVariable(expressionCv, (TypeVariable) referenceTypeArgument);
-					setElementVariable(expressionCv, referenceTypeArgumentCv, typeParameter);
-				} else {
-					makeElementVariable(expressionCv, typeParameter, CollectionElementVariable2.NOT_DECLARED_TYPE_VARIABLE_INDEX);
+					if (referenceTypeArgumentCv != null) {
+						setElementVariable(expressionCv, referenceTypeArgumentCv, typeParameter);
+						continue;
+					}
 				}
+				makeElementVariable(expressionCv, typeParameter, CollectionElementVariable2.NOT_DECLARED_TYPE_VARIABLE_INDEX);
 			}
 		}
 		makeElementVariablesFromSupertypes(expressionCv, supertype);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java
index 63d7151..57a808e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSHintHelper.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,6 +54,8 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SimpleType;
 import org.eclipse.jdt.core.dom.StringLiteral;
@@ -61,7 +63,6 @@ import org.eclipse.jdt.core.dom.TypeLiteral;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
 import org.eclipse.jdt.ui.SharedASTProvider;
@@ -93,15 +94,32 @@ public class NLSHintHelper {
 	 * @return the accessor class reference or <code>null</code> if this element is not a nls'ed entry
 	 */
 	public static AccessorClassReference getAccessorClassReference(CompilationUnit astRoot, IRegion region) {
+		return getAccessorClassReference(astRoot, region, false);
+	}
+
+	/**
+	 * Returns the accessor binding info or <code>null</code> if this element is not a nls'ed entry
+	 * 
+	 * @param astRoot the ast root
+	 * @param region the text region
+	 * @param usedFullyQualifiedName boolean flag to indicate that fully qualified name is used to
+	 *            refer a NLS key string constant
+	 * @return the accessor class reference or <code>null</code> if this element is not a nls'ed
+	 *         entry
+	 */
+	public static AccessorClassReference getAccessorClassReference(CompilationUnit astRoot, IRegion region, boolean usedFullyQualifiedName) {
 		ASTNode nlsStringLiteral= NodeFinder.perform(astRoot, region.getOffset(), region.getLength());
 		if (nlsStringLiteral == null)
 			return null; // not found
 
 		ASTNode parent= nlsStringLiteral.getParent();
+		if (usedFullyQualifiedName) {
+			parent= parent.getParent();
+		}
 
 		ITypeBinding accessorBinding= null;
 
-		if (nlsStringLiteral instanceof SimpleName) {
+		if (!usedFullyQualifiedName && nlsStringLiteral instanceof SimpleName && nlsStringLiteral.getLocationInParent() == QualifiedName.NAME_PROPERTY) {
 			SimpleName name= (SimpleName)nlsStringLiteral;
 
 			IBinding binding= name.resolveBinding();
@@ -117,8 +135,8 @@ public class NLSHintHelper {
 			if (parent instanceof MethodInvocation) {
 				MethodInvocation methodInvocation= (MethodInvocation) parent;
 				List args= methodInvocation.arguments();
-				if (args.indexOf(nlsStringLiteral) != 0) {
-					return null; // must be first argument in lookup method
+				if (args.size() != 1 && args.indexOf(nlsStringLiteral) != 0) {
+					return null; // must be the only argument in lookup method
 				}
 
 				Expression firstArgument= (Expression)args.get(0);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSMessages.properties
index 5fe26b7..bdb2718 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ NLSRefactoring_checking=Checking preconditions...
 NLSRefactoring_pattern_empty=Code pattern is empty
 NLSRefactoring_pattern_does_not_contain=Code pattern does not contain ''{0}''
 NLSAccessorFieldRenameParticipant_changeDescription=Rename key from ''{0}'' to ''{1}''
-NLSAccessorFieldRenameParticipant_error_description=The NLS accessor field rename participant caused an exception. See the error Log for details.
+NLSAccessorFieldRenameParticipant_error_description=The NLS accessor field rename participant caused an exception. See the error log for details.
 NLSAccessorFieldRenameParticipant_participantName=Rename NLS Field
 NLSRefactoring_Only_the_first_occurrence_of=Only the first occurrence of ''{0}'' will be substituted
 NLSRefactoring_null=Key must not be null
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSRefactoring.java
index b858ccd..e04a753 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSRefactoring.java	
@@ -37,9 +37,9 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.base.JavaStringStatusContext;
 import org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSScanner.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSScanner.java
index b82b483..1cd0462 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSScanner.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSScanner.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,8 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.ToolFactory;
 import org.eclipse.jdt.core.compiler.IScanner;
@@ -35,16 +37,25 @@ public class NLSScanner {
 	}
 
 	public static NLSLine[] scan(ICompilationUnit cu) throws JavaModelException, BadLocationException, InvalidInputException {
-		return scan(cu.getBuffer().getCharacters());
+		IJavaProject javaProject= cu.getJavaProject();
+		IScanner scanner= null;
+		if (javaProject != null) {
+			String complianceLevel= javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true);
+			String sourceLevel= javaProject.getOption(JavaCore.COMPILER_SOURCE, true);
+			scanner= ToolFactory.createScanner(true, true, true, sourceLevel, complianceLevel);
+		} else {
+			scanner= ToolFactory.createScanner(true, true, false, true);
+		}
+		return scan(scanner, cu.getBuffer().getCharacters());
 	}
 
 	public static NLSLine[] scan(String s) throws InvalidInputException, BadLocationException {
-		return scan(s.toCharArray());
+		IScanner scanner= ToolFactory.createScanner(true, true, false, true);
+		return scan(scanner, s.toCharArray());
 	}
 
-	private static NLSLine[] scan(char[] content) throws InvalidInputException, BadLocationException {
+	private static NLSLine[] scan(IScanner scanner, char[] content) throws InvalidInputException, BadLocationException {
 		List lines= new ArrayList();
-		IScanner scanner= ToolFactory.createScanner(true, true, false, true);
 		scanner.setSource(content);
 		int token= scanner.getNextToken();
 		int currentLineNr= -1;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/PropertyFileDocumentModel.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/PropertyFileDocumentModel.java
index 66fe8ed..6b32420 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/PropertyFileDocumentModel.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/PropertyFileDocumentModel.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -132,8 +132,7 @@ public class PropertyFileDocumentModel {
     	for (Iterator iter = fKeyValuePairs.iterator(); iter.hasNext();) {
             KeyValuePairModell keyValuePair = (KeyValuePairModell) iter.next();
             if (keyValuePair.fKey.equals(key)) {
-            	KeyValuePairModell next = (KeyValuePairModell) iter.next();
-            	return new DeleteEdit(keyValuePair.fOffset, next.fOffset - keyValuePair.fOffset);
+            	return new DeleteEdit(keyValuePair.fOffset, keyValuePair.getLength());
             }
         }
         return null;
@@ -144,9 +143,7 @@ public class PropertyFileDocumentModel {
             KeyValuePairModell keyValuePair = (KeyValuePairModell) iter.next();
             if (keyValuePair.fKey.equals(toReplace.getKey())) {
                 String newText= new KeyValuePairModell(replaceWith).getKeyValueText();
-                KeyValuePairModell next = (KeyValuePairModell) iter.next();
-                int range = next.fOffset - keyValuePair.fOffset;
-            	return new ReplaceEdit(keyValuePair.fOffset, range, newText);
+                return new ReplaceEdit(keyValuePair.fOffset, keyValuePair.getLength(), newText);
             }
         }
         return null;
@@ -335,10 +332,14 @@ public class PropertyFileDocumentModel {
             fLeadingWhiteSpaces = leadingWhiteSpaces;
         }
 
-        public KeyValuePairModell(KeyValuePair keyValuePair) {
+		public KeyValuePairModell(KeyValuePair keyValuePair) {
             super(keyValuePair.fKey, keyValuePair.fValue);
         }
 
+		public int getLength() {
+			return fKey.length() + 1 + fValue.length();
+		}
+		
         private String getKeyValueText() {
 			return fKey + '=' + fValue;
         }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.java
index 80cc1e4..2b6274e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,6 @@ public final class NLSChangesMessages extends NLS {
 
 	public static String createFile_creating_resource;
 	public static String createFile_Create_file;
-	public static String deleteFile_deleting_resource;
-	public static String deleteFile_Delete_File;
 
 	public static String CreateFileChange_error_exists;
 	public static String CreateFileChange_error_unknownLocation;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.properties
index 83b6db9..6d33678 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/changes/NLSChangesMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,7 +10,5 @@
 ###############################################################################
 createFile_creating_resource=Creating file...
 createFile_Create_file=Create file {0}
-deleteFile_deleting_resource=Deleting file...
-deleteFile_Delete_File=Delete File
 CreateFileChange_error_exists=File ''{0}'' already exists
 CreateFileChange_error_unknownLocation=The location for file ''{0}'' is unknown
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/refactoring.properties b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/refactoring.properties
index 4e3eb4a..be3b8c5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/refactoring.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/refactoring.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,16 +7,13 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Extract method and continue https://bugs.eclipse.org/bugs/show_bug.cgi?id=48056
+#     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] Name ambiguous return value in error message - https://bugs.eclipse.org/bugs/show_bug.cgi?id=50607
 ###############################################################################
 # NLS properties for the Refactoring Core
 
 #######################################
 # org.eclipse.jdt.internal.core.refactoring
-Assert_assertion_failed=assertion failed;
-Assert_null_argument=null argument;
-
-ProcessorBasedRefactoring_error_unsupported_initialization=The refactoring processor ''{0}'' has no support for refactoring scripts.
-
 InitializableRefactoring_argument_not_exist=The refactoring script argument ''{0}'' is missing in the refactoring script.
 InitializableRefactoring_input_not_exists=The refactoring ''{1}'' ({2}) cannot be performed, since its input ''{0}'' does not exist.
 InitializableRefactoring_inputs_do_not_exist=The refactoring ''{0}'' ({1}) cannot be performed, since its input does not exist.
@@ -49,13 +46,8 @@ Checks_validateEdit= Team provider refused file modification.
 # org.eclipse.jdt.internal.core.refactoring.base
 #######################################
 
-Change_is_unsaved={0} is unsaved.
-Change_is_read_only={0} is read only.
-Change_has_modifications={0} has been modified since the refactoring got executed.
 Change_does_not_exist=''{0}'' does not exist anymore.
-Change_same_read_only= The read only state of {0} has changed.
 
-UndoCompilationUnitChange_no_resource= Compilation unit ''{0}'' does not have an underlying file.
 UndoDeleteResourceChange_change_name=Restore ''{0}''
 UndoDeleteResourceChange_cannot_restore=There is not enough information to create or restore ''{0}''.
 UndoDeleteResourceChange_already_exists=Cannot create or restore ''{0}'' because it already exists.
@@ -70,16 +62,9 @@ Refactoring_unknown_structure={0} - unknown structure
 #######################################
 AbstractRenameChange_Renaming=Renaming...
 
-RenameResourceChange_rename_resource=rename resource
-RenameResourceChange_name=Rename ''{0}'' to ''{1}''
 RenameResourceChange_does_not_exist=''{0}'' does not exist
-RenameResourceChange_descriptor_description=Rename resource ''{0}'' to ''{1}''
-RenameResourceChange_descriptor_description_short=Rename resource ''{0}''
-
-DeleteFromClassPathChange_remove=Remove entry from classpath of Java project:
 
 MovePackageChange_move=Move package ''{0}'' to ''{1}''
-MoveResourceChange_move=Move resource ''{0}'' to ''{1}''
 
 RenameJavaProjectChange_rename=Rename Java project ''{0}'' to ''{1}''
 RenameJavaProjectChange_update=Updating classpaths
@@ -92,13 +77,9 @@ RenameSourceFolderChange_descriptor_description_short=Rename source folder ''{0}
 RenameSourceFolderChange_error_underlying_resource_not_existing=The underlying folder for ''{0}'' does not exist
 RenameSourceFolderChange_rename_linked=Cannot rename linked source folder ''{0}''
 
-AbstractDeleteChange_deleting=deleting
-
 CreatePackageChange_Creating_package=Creating package
 CreatePackageChange_Create_package=Create package
 
-AddToClasspathChange_add=Add entry to classpath of Java project:
-
 CopyCompilationUnitChange_copy=Copy ''{0}'' to ''{1}''
 
 CopyPackageChange_copy=Copy package ''{0}'' to ''{1}''
@@ -107,7 +88,6 @@ RenamePackageChange_checking_change=Checking change for: {0}
 RenamePackageChange_name_with_subpackages=Rename package ''{0}'' and subpackages to ''{1}''
 RenamePackageChange_name=Rename package ''{0}'' to ''{1}''
 
-MoveCompilationUnitChange_default_package=(default package)
 MoveCompilationUnitChange_name=Move compilation unit ''{0}'' to ''{1}''
 
 RenameCompilationUnitChange_name=Rename compilation unit ''{0}'' to ''{1}''
@@ -122,12 +102,14 @@ LocalTypeAnalyzer_local_type_referenced_outside=A local type declared in the sel
 
 FlowAnalyzer_execution_flow=Selected statements contain a return statement but not all possible execution flows end in a return. Semantics may not be preserved if you proceed.
 
-ExtractMethodAnalyzer_assignments_to_local=Ambiguous return value: selected block contains more than one assignment to local variable.
+ExtractMethodAnalyzer_assignments_to_local=Ambiguous return value: Selected block contains more than one assignment to local variables. Affected variables are:\n\n{0}
 ExtractMethodAnalyzer_only_method_body=Cannot extract new method from selection. Only statements from a method body can be extracted.
 ExtractMethodAnalyzer_after_do_keyword=Selection may not start immediately after the \'do\' keyword.
 ExtractMethodAnalyzer_super_or_this=Cannot extract super or this call from constructor.
 ExtractMethodAnalyzer_cannot_determine_return_type=Cannot determine expression's return type. Using void instead.
-ExtractMethodAnalyzer_branch_mismatch=Selection contains branch statement but corresponding branch target is not selected.
+ExtractMethodAnalyzer_branch_break_mismatch=Selection contains ''{0}'', but corresponding branch target is not selected.
+ExtractMethodAnalyzer_branch_continue_mismatch=Selection contains ''{0}'', but corresponding branch target (or its complete loop body) is not selected.
+ExtractMethodAnalyzer_branch_mismatch=Selection contains branch statement but corresponding branch target (or the complete loop body) is not selected.
 ExtractMethodAnalyzer_parent_mismatch=Not all selected statements are enclosed by the same parent statement.
 ExtractMethodAnalyzer_cannot_extract_anonymous_type=Cannot extract the body of a anonymous type declaration. Select whole declaration.
 ExtractMethodAnalyzer_cannot_extract_variable_declaration_fragment=Cannot extract a variable declaration fragment. Select whole declaration statement.
@@ -140,17 +122,17 @@ ExtractMethodAnalyzer_cannot_extract_method_name_reference=Cannot extract a sing
 ExtractMethodAnalyzer_cannot_extract_part_of_qualified_name=Can not extract part of a qualified name
 ExtractMethodAnalyzer_cannot_extract_name_in_declaration=Cannot extract the name part of a declaration.
 ExtractMethodAnalyzer_compile_errors_no_parent_binding=The selection cannot cannot be analyzed because of compilation errors in the enclosing type. To perform the operation you will need to fix the errors.
-ExtractMethodAnalyzer_ambiguous_return_value=Ambiguous return value: expression, access to local or return statement extracted.
+ExtractMethodAnalyzer_ambiguous_return_value=Ambiguous return value: Expression, access to local or return statement extracted.
 ExtractMethodAnalyzer_compile_errors=The method''s body cannot be analyzed because of compilation errors in method ''{0}''. To perform the operation you will need to fix the errors.
 ExtractMethodAnalyzer_leftHandSideOfAssignment=Cannot extract the left-hand side of an assignment.
 ExtractMethodAnalyzer_single_expression_or_set=Can only extract a single expression or a set of statements.
 ExtractMethodAnalyzer_cannot_extract_null_type=Cannot extract null expression.
 
 ExtractMethodRefactoring_name=Extract Method
-ExtractMethodRefactoring_add_method=Create new method ''{0}'' from selected statement(s)
+ExtractMethodRefactoring_add_method=Create new method ''{0}'' from selected statements
 ExtractMethodRefactoring_checking_new_name=Checking new method name
 ExtractMethodRefactoring_no_set_of_statements=Selection does not mark a set of statements. Only statements from a method body can be extracted.
-ExtractMethodRefactoring_substitute_with_call=Substitute statement(s) with call to {0}
+ExtractMethodRefactoring_substitute_with_call=Substitute statements with call to {0}
 ExtractMethodRefactoring_change_name=Extract Method
 ExtractMethodRefactoring_name_pattern=Method name: ''{0}''
 ExtractMethodRefactoring_organize_imports=Organize Imports
@@ -160,6 +142,7 @@ ExtractMethodRefactoring_generate_comment=Generate method comment
 ExtractMethodRefactoring_error_nameInUse=''{0}'' is already used as a name in the selected code
 ExtractMethodRefactoring_error_sameParameter=A parameter ''{0}'' already exists
 ExtractMethodRefactoring_visibility_pattern=Declared visibility: ''{0}''
+ExtractMethodRefactoring_replace_continue=Replace continue with return
 ExtractMethodRefactoring_replace_occurrences=Replace occurrences of statements with method
 ExtractMethodRefactoring_error_vararg_ordering=The variable arity parameter ''{0}'' cannot be followed by another parameter
 ExtractMethodRefactoring_descriptor_description=Extract method ''{0}'' from ''{1}'' to ''{2}''
@@ -256,7 +239,6 @@ SelfEncapsulateField_add_getter=Add Getter method
 
 #-- inline temp ------------------------------------------------------
 InlineTempRefactoring_name=Inline Local Variable
-InlineTempRefactoring_syntax_errors=This compilation unit contains syntax errors. To perform the operation you will need to fix the errors.
 InlineTempRefactoring_select_temp=A local variable declaration or reference must be selected to activate this refactoring.
 InlineTempRefactoring_method_parameter=Cannot inline method parameters.
 InlineTempRefactoring_exceptions_declared=Cannot inline exceptions declared in \'catch\' clauses.
@@ -274,7 +256,6 @@ InlineTempRefactoring_original_pattern=Original element: ''{0}''
 #-- extract temp ------------------------------------------------------
 ExtractTempRefactoring_name=Extract Local Variable
 ExtractTempRefactoring_select_expression=An expression must be selected to activate this refactoring.
-ExtractTempRefactoring_syntax_error=This file contains syntax errors. To perform this operation you will need to fix the errors.
 ExtractTempRefactoring_explicit_constructor=Code from explicit constructor calls cannot be extracted to a variable.
 ExtractTempRefactoring_expression_pattern=Variable expression: ''{0}''
 ExtractTempRefactoring_expr_in_method_or_initializer=An expression used in a method or in an initializer must be selected to activate this refactoring.
@@ -286,9 +267,6 @@ ExtractTempRefactoring_another_variable=A variable with name ''{0}'' is already
 ExtractTempRefactoring_assignment=Cannot extract assignment that is part of another expression.
 ExtractTempRefactoring_convention=This name is discouraged. According to convention, names of local variables should start with a lowercase letter.
 ExtractTempRefactoring_checking_preconditions=Checking preconditions...
-ExtractTempRefactoring_preview=Checking preconditions...
-ExtractTempRefactoring_extract_temp=Extract Local Variable
-ExtractTempRefactoring_update_imports=Update imports
 ExtractTempRefactoring_declare_local_variable=Add variable declaration
 ExtractTempRefactoring_descriptor_description=Extract local variable ''{0}'' from expression ''{1}''
 ExtractTempRefactoring_descriptor_description_short=Extract local variable ''{0}''
@@ -324,7 +302,6 @@ ExtractClassRefactoring_group_replace_read=Replace read accesses
 ExtractClassRefactoring_group_remove_field=Remove Fields
 ExtractClassRefactoring_comment_move_field=Moved fields:
 ExtractClassRefactoring_progress_create_change=Creating change
-ExtractClassRefactoring_comment_enclosing_type=Enclosing type: ''{0}''
 ExtractClassRefactoring_progress_final_conditions=Checking final conditions
 ExtractClassRefactoring_progress_msg_check_initial_condition=Checking initial conditions
 ExtractClassRefactoring_fatal_error_cannot_resolve_binding=Can not resolve binding for field ''{0}''
@@ -348,7 +325,6 @@ ExtractConstantRefactoring_select_expression=An expression must be selected to a
 ExtractConstantRefactoring_visibility_pattern=Declared visibility: ''{0}''
 ExtractConstantRefactoring_replace_occurrences=Replace occurrences of expression with constant
 ExtractConstantRefactoring_qualify_references=Qualify references to constant
-ExtractConstantRefactoring_syntax_error=This file contains syntax errors. To perform this operation you will need to fix the errors.
 ExtractConstantRefactoring_declare_constant=Add constant declaration
 ExtractConstantRefactoring_default_visibility=(default)
 ExtractConstantRefactoring_replace=Replace expression with constant reference
@@ -393,7 +369,6 @@ RenameEnumConstRefactoring_another_name=Choose another name.
 RenameEnumConstRefactoring_const_already_defined=Enum constant with this name is already defined.
 RenameEnumConstProcessor_descriptor_description=Rename enum constant ''{0}'' of ''{1}'' to ''{2}''
 RenameEnumConstProcessor_descriptor_description_short=Rename enum constant ''{0}''
-RenameEnumConstProcessor_change_name=Rename Enum Constant
 
 RenameFieldRefactoring_name=Rename Field
 RenameFieldRefactoring_searching=Searching for references...
@@ -407,7 +382,6 @@ RenameFieldRefactoring_field_already_defined2=A field with name ''{0}'' is alrea
 RenameFieldRefactoring_deleted=The selected field has been deleted from ''{0}''
 RenameFieldRefactoring_already_exists=Method ''{0}'' already exists in ''{1}''
 RenameFieldRefactoring_overridden=Method ''{0}'' is overridden or overrides another method
-RenameFieldRefactoring_change_name=Rename Field
 RenameFieldRefactoring_overridden_or_overrides=Method ''{0}'' is overridden or overrides another method
 RenameFieldRefactoring_Update_getter_occurrence=Update getter occurrence
 RenameFieldRefactoring_Update_setter_occurrence=Update setter occurrence
@@ -434,7 +408,7 @@ RenameTypeParameterRefactoring_searching=Searching for references...
 RenameTypeParameterRefactoring_checking=Checking preconditions...
 RenameTypeParameterRefactoring_update_type_parameter_declaration=Update type variable declaration
 RenameTypeParameterRefactoring_update_type_parameter_reference=Update type variable reference
-RenameTypeParameterRefactoring_type_parameter_inner_class_clash=The new type variable name conflicts with the name of the inner class ''{0}''.
+RenameTypeParameterRefactoring_type_parameter_inner_class_clash=The new type variable name conflicts with the name of the class ''{0}''.
 
 RenamePackageRefactoring_another_name=Choose another name.
 RenamePackageRefactoring_checking=Checking preconditions...
@@ -515,7 +489,6 @@ RenameTypeProcessor_changeCategory_fields_description=Changes to rename similarl
 RenameTypeProcessor_checking_similarly_named_declarations_refactoring_conditions=Checking preconditions for similarly named elements...
 RenameTypeProcessor_cannot_rename_methods_same_new_name=The two methods ''{0}'' and ''{1}'' in type ''{2}'' cannot be renamed to the same new name ''{3}''.
 RenameTypeProcessor_cannot_rename_fields_same_new_name=The two fields ''{0}'' and ''{1}'' in type ''{2}'' cannot be renamed to the same new name ''{3}''.
-RenameTypeProcessor_cannot_rename_locals_same_new_name=The two local variables ''{0}'' and ''{1}'' in ''{2}'' (type ''{3}'') may clash if renamed to the same new name ''{4}''.
 
 RenameTypeRefactoring_name_conflict1=Name conflict with type ''{0}'' in ''{1}''
 RenameTypeRefactoring_searching_text=searching for textual occurrences
@@ -534,8 +507,6 @@ TextMatchUpdater_textualMatches_description=Changes to textual occurrences in co
 QualifiedNameFinder_qualifiedNames_name=Qualified Name Changes
 QualifiedNameFinder_qualifiedNames_description=Changes to qualified names in non-Java files
 
-RippleMethodFinder_analizing_hierarchy=analyzing hierarchy
-
 RefactoringAnalyzeUtil_name_collision=Name collision with name ''{0}''
 
 RefactoringSearchEngine_binary_match_ungrouped=An occurrence in a binary type in project ''{0}'' has been found. These occurrences will not be updated, which may lead to compile errors if you proceed.
@@ -583,20 +554,12 @@ RenamePackageProcessor_descriptor_description_short=Rename package ''{0}''
 RenamePackageRefactoring_contains_type=Package ''{0}'' already contains a type named ''{1}''
 RenamePackageRefactoring_change_name=Rename Package
 
-RenameResourceRefactoring_Internal_Error=Internal Error
-RenameResourceRefactoring_alread_exists=A file or folder with this name already exists
-RenameResourceRefactoring_invalidName=This is an invalid name for a file or folder
-
 RenameSourceFolderRefactoring_blank=Name must not start or end with a blank
 RenameSourceFolderRefactoring_invalid_name=This is an invalid name for a file or folder
 RenameSourceFolderRefactoring_already_exists=An element with this name already exists
 RenameSourceFolderRefactoring_alread_exists=An element with this name already exists
 RenameSourceFolderRefactoring_rename=Rename Source Folder
 
-################ Rename Processors #########################################
-
-RenameResourceProcessor_name=Rename Resource
-
 #######################################
 # org.eclipse.jdt.internal.core.refactoring.reorg
 #######################################
@@ -630,7 +593,6 @@ ExtractSupertypeProcessor_preparing=Preparing refactoring...
 ExtractSupertypeProcessor_category_name=Extract Superclass Changes
 ExtractSupertypeProcessor_add_supertype=Add extracted type
 ExtractSupertypeProcessor_unexpected_exception_on_layer=An unexpected exception occurred while creating working copies. See the error log for more details.
-ExtractSupertypeProcessor_unexpected_exception=An unexpected exception occurred while creating a change. See the error log for more details.
 
 PullUpRefactoring_Pull_Up=Pull Up
 PullUpRefactoring_no_java_lang_Object=Pull up is not available on members declared in 'java.lang.Object'.
@@ -687,7 +649,6 @@ MoveMembersRefactoring_deleteMembers= Delete members
 MoveMembersRefactoring_addMembers= Add members
 MoveMembersRefactoring_referenceUpdate= Update reference to moved member
 MoveMembersRefactoring_static_declaration=Static members can be declared only in top level or static types.
-MoveMembersRefactoring_check_availability=Check availability of members after move
 MoveMembersRefactoring_multi_var_fields=Only field declarations with single variable declaration fragments can be moved.
 MoveMembersRefactoring_only_public_static=Only 'public static' types and 'public static final' fields with variable initializers can be moved to an interface.
 MoveMembersRefactoring_Object=Move is not allowed on members declared in 'java.lang.Object'.
@@ -733,7 +694,6 @@ IntroduceParameterObjectRefactoring_descriptor_fields=Create fields for:
 SurroundWithTryCatchRefactoring_name=Surround with try/catch Block
 SurroundWithTryCatchAnalyzer_doesNotCover=Selection does not cover a set of statements. Extend selection to a valid range using the \'Expand Selection To\' actions from the \'Edit\' menu.
 SurroundWithTryCatchAnalyzer_doesNotContain=Selection does not contain statements from a method body or static initializer.
-SurroundWithTryCatchAnalyzer_noUncaughtExceptions=No uncaught exceptions are thrown by the selected code.
 SurroundWithTryCatchAnalyzer_onlyStatements=Only statements can be surrounded with try/catch blocks.
 SurroundWithTryCatchAnalyzer_cannotHandleSuper=Cannot surround a super constructor call.
 SurroundWithTryCatchAnalyzer_cannotHandleThis=Cannot surround a constructor invocation.
@@ -771,7 +731,6 @@ CopyResourceString_copy=Copy resource ''{0}'' to ''{1}''
 RenameAnalyzeUtil_shadows=Problem in ''{0}''. Another name will shadow access to the renamed element
 RenameAnalyzeUtil_reference_shadowed=Problem in ''{0}''. The reference to ''{1}'' will be shadowed by a renamed declaration
 CopyRefactoring_update_ref=Update type reference
-CopyRefactoring_searching=Searching
 CodeRefactoringUtil_error_message=The body of the method ''{0}'' cannot be analyzed because of compilation errors in that method. To perform the operation you will need to fix the errors.
 InlineTemRefactoring_error_message_nulLiteralsCannotBeInlined=Null literals cannot be inlined
 InlineTemRefactoring_error_message_fieldsCannotBeInlined=Cannot inline fields
@@ -866,19 +825,15 @@ MoveInnerToTopRefactoring_names_start_lowercase=This name is discouraged. Accord
 MoveInnerToTopRefactoring_already_declared=A field named ''{0}'' is already declared in type ''{1}''
 MoveInnerToTopRefactoring_compilation_Unit_exists=A compilation unit named ''{0}'' already exists in package ''{1}''
 MoveInnerToTopRefactoring_name_used=Name ''{0}'' is used as a parameter name in one of the constructors of type ''{1}''
-MoveInnerToTopRefactoring_name=Convert Member Type to Top Level
+MoveInnerToTopRefactoring_name=Move Type to New File
 MoveInnerToTopRefactoring_creating_change=Creating change
 MoveInnerToTopRefactoring_update_type_reference=Update type reference
-MoveInnerToTopRefactoring_descriptor_description=Convert member type ''{0}'' in ''{1}'' to top level type
-MoveInnerToTopRefactoring_descriptor_description_short=Convert member type ''{0}'' to top level
+MoveInnerToTopRefactoring_descriptor_description=Move type ''{0}'' in ''{1}'' to new file
+MoveInnerToTopRefactoring_descriptor_description_short=Move type ''{0}'' to new file
 MoveInnerToTopRefactoring_update_constructor_reference=Update constructor occurrence
-MoveInnerToTopRefactoring_move_to_Top=Convert Member Type to Top Level
-MoveInnerToTopRefactoring_change_visibility=Change visibility to default
+MoveInnerToTopRefactoring_move_to_Top=Move Type to New File
 MoveInnerToTopRefactoring_parameter_pattern=Parameter name: ''{0}''
 MoveInnerToTopRefactoring_change_visibility_type_warning=The visibility of type ''{0}'' will be changed to default.
-MoveInnerToTopRefactoring_change_visibility_method_warning=The visibility of method ''{0}'' will be changed to default.
-MoveInnerToTopRefactoring_change_visibility_constructor_warning=The visibility of constructor ''{0}'' will be changed to default.
-MoveInnerToTopRefactoring_change_visibility_field_warning=The visibility of field ''{0}'' will be changed to default.
 MoveInnerToTopRefactoring_change_qualifier=Qualify class name
 MoveInnerToTopRefactoring_type_exists=Type named ''{0}'' already exists in package ''{1}''
 
@@ -919,20 +874,13 @@ MoveInstanceMethodProcessor_no_resolved_target=The target of the method could no
 MoveInstanceMethodProcessor_no_null_argument=The method invocation ''{0}'' cannot be updated, since it uses ''null'' as argument.
 MoveInstanceMethodProcessor_target_name_already_used=The name of the target conflicts with the method parameter ''{0}''.
 MoveInstanceMethodProcessor_target_element_pattern=Target element: ''{0}''
-MoveInstanceMethodProcessor_replace_body_with_delegation=Create delegate method
 MoveInstanceMethodProcessor_present_type_parameter_warning=The type parameter ''{0}'' is already present in the target type ''{1}'' and will be removed from the method.
 MoveInstanceMethodProcessor_remove_original_method=Remove method declaration
 MoveInstanceMethodProcessor_inline_method_invocation=Update method invocation
-MoveInstanceMethodProcessor_deprecate_delegator_method=Deprecate delegate method
-MoveInstanceMethodProcessor_deprecate_delegator_message=Use {0} instead
 MoveInstanceMethodProcessor_add_moved_method=Add method declaration
-MoveInstanceMethodProcessor_inline_binary_project=The method invocations to the moved method in project ''{0}'' cannot be updated, since the project is binary.
-MoveInstanceMethodProcessor_inline_binary_resource=The method invocations to the moved method in resource ''{0}'' cannot be updated.
-MoveInstanceMethodProcessor_javadoc_binary_project=Javadoc references to the moved method in project ''{0}'' cannot be updated, since the project is binary.
 MoveInstanceMethodProcessor_descriptor_description=Move method ''{0}'' to ''{1}''
 MoveInstanceMethodProcessor_parameter_name_pattern=Parameter name: ''{0}''
 MoveInstanceMethodProcessor_descriptor_description_short=Move method ''{0}''
-MoveInstanceMethodProcessor_javadoc_binary_resource=Javadoc references to the moved method in resource ''{0}'' cannot be updated.
 MoveInstanceMethodProcessor_inline_inaccurate=A method invocation to the original method in ''{0}'' could not be fully resolved.
 MoveInstanceMethodProcessor_inline_overridden=The method invocations to ''{0}'' cannot be updated, since the original method is used polymorphically.
 MoveInstanceMethodProcessor_method_already_exists=A method with name ''{0}'' already exists in the target type ''{1}''.
@@ -966,8 +914,6 @@ ExtractInterfaceProcessor_creating=Checking preconditions...
 ExtractInterfaceProcessor_checking=Checking preconditions...
 
 #Begin - Do not remove
-MemberVisibilityAdjustor_binary_outgoing_project=The elements in project ''{0}'' referenced from ''{1}'' cannot be updated, since the project is binary.
-MemberVisibilityAdjustor_binary_outgoing_resource=The elements in resource ''{0}'' referenced from ''{1}'' cannot be updated.
 MemberVisibilityAdjustor_change_visibility_type_warning=The visibility of type ''{0}'' will be changed to {1}.
 MemberVisibilityAdjustor_change_visibility_method_warning=The visibility of method ''{0}'' will be changed to {1}.
 MemberVisibilityAdjustor_change_visibility_field_warning=The visibility of field ''{0}'' will be changed to {1}.
@@ -1003,6 +949,8 @@ DelegateMethodCreator_text_edit_group_field=Keep original method as delegate
 DelegateMethodCreator_keep_original_renamed_plural=&Keep original methods as delegates to renamed methods
 DelegateMethodCreator_keep_original_moved_plural=&Keep original methods as delegates to moved methods
 DelegateMethodCreator_keep_original_moved_singular=&Keep original method as delegate to moved method
+DelegateMethodCreator_keep_original_moved_plural_member=&Keep original members as delegates to moved members
+DelegateMethodCreator_keep_original_moved_singular_member=&Keep original member as delegate to moved member
 DelegateMethodCreator_keep_original_renamed_singular=&Keep original method as delegate to renamed method
 DelegateFieldCreator_text_edit_group_label=Keep original field as delegate
 DelegateFieldCreator_keep_original_renamed_plural=&Keep original fields as delegates to renamed fields
@@ -1019,7 +967,6 @@ PromoteTempToFieldRefactoring_method_parameters=Cannot convert method parameters
 PromoteTempToFieldRefactoring_original_pattern=Original element: ''{0}''
 PromoteTempToFieldRefactoring_initialize_method=Initialize field in method
 PromoteTempToFieldRefactoring_exceptions=Cannot convert exceptions declared in catch clauses to fields.
-PromoteTempToFieldRefactoring_uses_types_declared_locally=Cannot convert this local variable to a field because it uses types or variables declared locally in the method.
 PromoteTempToFieldRefactoring_cannot_promote=Cannot convert this local variable to a field.
 PromoteTempToFieldRefactoring_declare_static=Declare field 'static'
 PromoteTempToFieldRefactoring_uses_type_declared_locally=Cannot convert this local variable to a field because it uses a type declared locally in the method.
@@ -1046,14 +993,12 @@ ConvertAnonymousToNestedRefactoring_anonymous_field_access=Class accesses fields
 ConvertAnonymousToNestedRefactoring_descriptor_description=Convert anonymous class ''{0}'' in ''{1}'' to nested class
 ConvertAnonymousToNestedRefactoring_descriptor_description_short=Convert anonymous class to nested
 ConvertAnonymousToNestedRefactoring_declare_final_static=Declare class \'final\' and \'static\'
-ConvertAnonymousToNestedRefactoring_edit_name=Convert anonymous class to nested class
 ConvertAnonymousToNestedRefactoring_extends_local_class=Cannot convert this anonymous class to a nested class since it extends a local class.
 ConvertAnonymousToNestedRefactoring_class_name_pattern=Class name: ''{0}''
 ConvertAnonymousToNestedRefactoring_visibility_pattern=Declared visibility: ''{0}''
 ConvertAnonymousToNestedRefactoring_default_visibility=(default)
 ConvertAnonymousToNestedRefactoring_original_pattern=Original element: ''{0}''
 
-InlineConstantRefactoring_members_declared_in_anonymous=Cannot inline since the initializer to be inlined refers to members declared in an anonymous class scope (not supported).
 InlineConstantRefactoring_Inline=Inline Constant
 InlineConstantRefactoring_syntax_errors=This file contains syntax errors. To perform this operation you will need to fix the errors.
 InlineConstantRefactoring_local_anonymous_unsupported=Inlining of constants defined in local or anonymous classes is not supported.
@@ -1066,16 +1011,10 @@ InlineConstantRefactoring_remove_declaration=Remove constant declaration
 InlineConstantRefactoring_original_pattern=Original element: ''{0}''
 InlineConstantRefactoring_replace_references=Replace all references to constant with expression
 InlineConstantRefactoring_name=Inline Constant
-InlineConstantRefactoring_source_code_unavailable=References in ''{0}'' cannot be inlined since source code is not available
 InlineConstantRefactoring_descriptor_description=Inline constant ''{0}'' in ''{1}''
 InlineConstantRefactoring_descriptor_description_short=Inline constant ''{0}''
 
-DeleteFileChange_1=Delete file ''{0}''
-
-DeleteFolderChange_0=Delete folder ''{0}''
-
 DeleteSourceManipulationChange_0=Delete ''{0}''
-DeleteSourceManipulationChange_1=(default package)
 
 JavaCopyProcessor_changeName=Copy
 JavaMoveProcessor_change_name=Move
@@ -1096,7 +1035,7 @@ ReadOnlyResourceFinder_3=The selected elements contain read-only resources. Do y
 
 MoveInnerToTopRefactoring_creating_preview=Creating preview
 MoveInnerToTopRefactoring_original_pattern=Original element: ''{0}''
-MoveInnerToTopRefactoring_change_label=Convert Member Type to Top Level
+MoveInnerToTopRefactoring_change_label=Move Type to New File
 MoveInnerToTopRefactoring_field_pattern=Field name: ''{0}''
 MoveInnerToTopRefactoring_declare_final=Declare field 'final'
 
@@ -1119,11 +1058,13 @@ ReorgPolicyFactory_inaccessible=The selected destination is not accessible
 ReorgPolicyFactory_not_this_resource=The selected resource cannot be used as a destination
 ReorgPolicyFactory_no_java_element=A Java element cannot be the destination for the selected elements.
 ReorgPolicyFactory_copy_roots_plural=Copy source folders
-ReorgPolicyFactory_copy_roots_header=Copy {0} source folder(s) to ''{1}''
+ReorgPolicyFactory_copy_roots_header_singular=Copy source folder ''{0}'' to ''{1}''
+ReorgPolicyFactory_copy_roots_header_plural=Copy {0} source folders to ''{1}''
 ReorgPolicyFactory_copy_initializers=Copy initializers
 ReorgPolicyFactory_copy_initializer=Copy initializer
 ReorgPolicyFactory_move_roots_plural=Move source folders
-ReorgPolicyFactory_move_roots_header=Move {0} source folder(s) to ''{1}''
+ReorgPolicyFactory_move_roots_header_singular=Move source folder ''{0}'' to ''{1}''
+ReorgPolicyFactory_move_roots_header_plural=Move {0} source folders to ''{1}''
 ReorgPolicyFactory_move_initializers=Move initializers
 ReorgPolicyFactory_move_initializer=Move initializer
 ReorgPolicyFactory_copy_description_plural=Copy elements
@@ -1136,9 +1077,11 @@ ReorgPolicyFactory_copy_compilation_unit=Copy compilation unit
 ReorgPolicyFactory_copy_elements_singular=Copy element
 ReorgPolicyFactory_copy_compilation_units=Copy compilation units
 ReorgPolicyFactory_copy_import_containers=Copy import sections
-ReorgPolicyFactory_copy_packages_header=Copy {0} package(s) to ''{1}''
+ReorgPolicyFactory_copy_packages_header_singular=Copy package ''{0}'' to ''{1}''
+ReorgPolicyFactory_copy_packages_header_plural=Copy {0} packages to ''{1}''
 ReorgPolicyFactory_copy_elements_plural=Copy elements
-ReorgPolicyFactory_copy_elements_header=Copy {0} element(s) to ''{1}''
+ReorgPolicyFactory_copy_elements_header_singular=Copy element ''{0}'' to ''{1}''
+ReorgPolicyFactory_copy_elements_header_plural=Copy {0} elements to ''{1}''
 ReorgPolicyFactory_copy_description_singular=Copy element
 ReorgPolicyFactory_cannot_move_source_to_parent=A source folder cannot be moved to its own parent.
 ReorgPolicyFactory_cannot_move_package_to_parent=A package cannot be moved to its own parent.
@@ -1154,15 +1097,18 @@ ReorgPolicyFactory_invalidDestinationKind=The selected element cannot be the des
 ReorgPolicyFactory_move_roots_singular=Move source folder
 ReorgPolicyFactory_move_import_section=Move import section
 ReorgPolicyFactory_move_packages_plural=Move packages
-ReorgPolicyFactory_move_packages_header=Move {0} package(s) to ''{1}''
+ReorgPolicyFactory_move_packages_header_singular=Move package ''{0}'' to ''{1}''
+ReorgPolicyFactory_move_packages_header_plural=Move {0} packages to ''{1}''
 ReorgPolicyFactory_move_elements_plural=Move elements
-ReorgPolicyFactory_move_elements_header=Move {0} element(s) to ''{1}''
+ReorgPolicyFactory_move_elements_header_singular=Move element ''{0}'' to ''{1}''
+ReorgPolicyFactory_move_elements_header_plural=Move {0} elements to ''{1}''
 ReorgPolicyFactory_move_compilation_unit=Move compilation unit
 ReorgPolicyFactory_move_description_singular=Move element
 ReorgPolicyFactory_move_import_declarations=Move import declarations
 ReorgPolicyFactory_linked=Linked resources can only be copied to projects
 ReorgPolicyFactory_no_resource=A resource cannot be the destination for the selected elements.
-ReorgPolicyFactory_copy_header=Copy {0} elements(s) to ''{1}''
+ReorgPolicyFactory_copy_header_singular=Copy element ''{0}'' to ''{1}''
+ReorgPolicyFactory_copy_header_plural=Copy {0} elements to ''{1}''
 ReorgPolicyFactory_copy_folders=Copy folders
 ReorgPolicyFactory_copy_methods=Copy methods
 ReorgPolicyFactory_copy_imports=Copy import declarations
@@ -1176,7 +1122,8 @@ ReorgPolicyFactory_copy_method=Copy method
 ReorgPolicyFactory_copy_import=Copy import declaration
 ReorgPolicyFactory_copy_file=Copy file
 ReorgPolicyFactory_copy_type=Copy type
-ReorgPolicyFactory_move_header=Move {0} elements(s) to ''{1}''
+ReorgPolicyFactory_move_header_singular=Move element ''{0}'' to ''{1}''
+ReorgPolicyFactory_move_header_plural=Move {0} elements to ''{1}''
 ReorgPolicyFactory_move_folders=Move folders
 ReorgPolicyFactory_move_methods=Move methods
 ReorgPolicyFactory_move_files=Move files
@@ -1229,7 +1176,8 @@ DeleteChangeCreator_1=Delete elements
 
 DeleteRefactoring_1=Analyzing...
 DeleteRefactoring_2=Confirm Referenced Archive Delete
-DeleteRefactoring_3=Archive file ''{0}'' is referenced by the following project(s). Do you still want to delete it?
+DeleteRefactoring_3_singular=Archive file ''{0}'' is referenced by the following project. Do you still want to delete it?
+DeleteRefactoring_3_plural=Archive file ''{0}'' is referenced by the following projects. Do you still want to delete it?
 DeleteRefactoring_4=Confirm Folder Delete
 DeleteRefactoring_5=Folder ''{0}'' contains a Java source folder. Deleting it will delete the source folder as well. Do you still wish to delete it?
 DeleteRefactoring_7=Delete
@@ -1241,13 +1189,13 @@ JavaDeleteProcessor_description_singular=Delete element
 JavaDeleteProcessor_description_plural=Delete elements
 JavaDeleteProcessor_project_pattern=project ''{0}''
 JavaDeleteProcessor_workspace=workspace
-JavaDeleteProcessor_header=Delete {0} element(s) from {1}
+JavaDeleteProcessor_header_singular=Delete element from {0}
+JavaDeleteProcessor_header_plural=Delete {0} elements from {1}
 JavaDeleteProcessor_delete_subpackages=Delete subpackages
 JavaDeleteProcessor_delete_accessors=Delete getters and setters
 JavaDeleteProcessor_confirm_linked_folder_delete=Confirm Linked Folder Delete
 JavaDeleteProcessor_delete_linked_folder_question=Are you sure you want to delete the linked package ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.
 
-JavaRefactoringDescriptor_initialization_error=The refactoring ''{0}'' cannot be initialized, since it does not implement the interface ''IScriptableRefactoring''.
 JavaRefactoringDescriptor_update_references=Update references to refactored element
 JavaRefactoringDescriptor_rename_similar=Rename similarly named elements
 JavaRefactoringDescriptor_qualified_names=Update fully qualified names in non-Java files
@@ -1313,21 +1261,15 @@ IntroduceFactoryRefactoring_declare_private=Declare original constructor 'privat
 IntroduceFactory_constructorInEnum=Introduce Factory is not supported for constructors of enumerated types.
 
 #--- Generalize Declared Type
-ChangeTypeRefactoring_Generalize_Type=Generalize Declared Type
 ChangeTypeRefactoring_checking_preconditions=Checking preconditions...
-ChangeTypeRefactoring_changes=Computing changes
 ChangeTypeRefactoring_name=Generalize Declared Type
-ChangeTypeRefactoring_cantDoIt=Type of selected declaration cannot be changed
 ChangeTypeRefactoring_notSupportedOnNodeType=Generalize Declared Type is only supported on declarations of variables, parameters, and fields, and on method return types.
 ChangeTypeRefactoring_notSupportedOnBinary=Generalize Declared Type is not allowed on return types and parameters of methods that override binary methods.
 ChangeTypeRefactoring_invalidSelection=Invalid selection for Generalize Declared Type.
 ChangeTypeRefactoring_multiDeclarationsNotSupported=Multi-declarations currently not handled.
 ChangeTypeRefactoring_noMatchingConstraintVariable=No constraint variable matches the selected ASTNode.
-ChangeTypeRefactoring_unhandledSearchException=exception occurred during search:
 ChangeTypeRefactoring_original_element_pattern=Original element: ''{0}''
-ChangeTypeRefactoring_failedToSelectType=failed to select type:
 ChangeTypeMessages_CreateChangesForChangeType=Creating changes for Generalize Declared Type...
-ChangeTypeRefactoring_javaLangObject=java.lang.Object
 ChangeTypeRefactoring_arraysNotSupported=Generalize Declared Type is not supported on array types.
 ChangeTypeRefactoring_localTypesNotSupported=Generalize Declared Type is not supported on local types.
 ChangeTypeRefactoring_primitivesNotSupported=Generalize Declared Type is not supported on primitive types.
@@ -1378,7 +1320,7 @@ IntroduceIndirectionRefactoring_call_warning_static_expression_access=The target
 IntroduceIndirectionRefactoring_group_description_replace_call=Replace method invocation
 IntroduceIndirectionRefactoring_call_warning_declaring_type_not_found=The declaring type of a method invocation in ''{0}'' in type ''{1}'' could not be found. This occurrence will not be updated.
 IntroduceIndirectionRefactoring_call_warning_anonymous_cannot_qualify=The declaring type of a method invocation in ''{0}'' in type ''{1}'' is anonymous and therefore cannot be qualified. This occurrence will not be updated.
-IntroduceIndirectionRefactoring_cannot_update_binary_target_visibility=A visibility update is needed for the member ''{0}'' or an enclosing type, but the member is not writeable. Refactoring will introduce compile errors.
+IntroduceIndirectionRefactoring_cannot_update_binary_target_visibility=A visibility update is needed for the member ''{0}'' or an enclosing type, but the member is not writable. Refactoring will introduce compile errors.
 IntroduceIndirectionRefactoring_cannot_run_without_intermediary_type=Cannot run Introduce Indirection without a target class.
 
 #--- Infer Type Arguments
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java
index ed2ff32..38e2f46 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RefactoringAnalyzeUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,12 +28,12 @@ import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.Block;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
 import org.eclipse.jdt.internal.corext.refactoring.base.JavaStringStatusContext;
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -57,7 +57,7 @@ public class RefactoringAnalyzeUtil {
 	public static RefactoringStatus reportProblemNodes(String modifiedWorkingCopySource, SimpleName[] problemNodes) {
 		RefactoringStatus result= new RefactoringStatus();
 		for (int i= 0; i < problemNodes.length; i++) {
-			RefactoringStatusContext context= new JavaStringStatusContext(modifiedWorkingCopySource, new SourceRange(problemNodes[i]));
+			RefactoringStatusContext context= new JavaStringStatusContext(modifiedWorkingCopySource, SourceRangeFactory.create(problemNodes[i]));
 			result.addError(Messages.format(RefactoringCoreMessages.RefactoringAnalyzeUtil_name_collision, BasicElementLabels.getJavaElementName(problemNodes[i].getIdentifier())), context);
 		}
 		return result;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java
index 59f4016..0e36552 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameAnalyzeUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ISourceReference;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.WorkingCopyOwner;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.AST;
@@ -51,15 +52,15 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.search.FieldDeclarationMatch;
 import org.eclipse.jdt.core.search.MethodDeclarationMatch;
 import org.eclipse.jdt.core.search.SearchMatch;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
 import org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup;
 import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
@@ -405,17 +406,17 @@ class RenameAnalyzeUtil {
 	 * @param analyzePackages the LocalAnalyzePackages containing the information about the local renames
 	 * @param cuChange the TextChange containing all local variable changes to be applied.
 	 * @param oldCUNode the fully (incl. bindings) resolved AST node of the original compilation unit
-	 * @param statementsRecovery whether statements recovery should be performed when parsing the changed CU
+	 * @param recovery whether statements and bindings recovery should be performed when parsing the changed CU
 	 * @return a RefactoringStatus containing errors if compile errors or wrongly renamed nodes are found
 	 * @throws CoreException thrown if there was an error greating the preview content of the change
 	 */
-	public static RefactoringStatus analyzeLocalRenames(LocalAnalyzePackage[] analyzePackages, TextChange cuChange, CompilationUnit oldCUNode, boolean statementsRecovery) throws CoreException {
+	public static RefactoringStatus analyzeLocalRenames(LocalAnalyzePackage[] analyzePackages, TextChange cuChange, CompilationUnit oldCUNode, boolean recovery) throws CoreException {
 
 		RefactoringStatus result= new RefactoringStatus();
 		ICompilationUnit compilationUnit= (ICompilationUnit) oldCUNode.getJavaElement();
 
 		String newCuSource= cuChange.getPreviewContent(new NullProgressMonitor());
-		CompilationUnit newCUNode= new RefactoringASTParser(AST.JLS3).parse(newCuSource, compilationUnit, true, statementsRecovery, null);
+		CompilationUnit newCUNode= new RefactoringASTParser(AST.JLS3).parse(newCuSource, compilationUnit, true, recovery, null);
 
 		result.merge(analyzeCompileErrors(newCuSource, newCUNode, oldCUNode));
 		if (result.hasError())
@@ -463,7 +464,8 @@ class RenameAnalyzeUtil {
 		for (int i= 0; i < newProblems.length; i++) {
 			IProblem problem= newProblems[i];
 			if (problem.isError())
-				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, new SourceRange(problem))));
+				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource,
+						SourceRangeFactory.create(problem))));
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java
index 5f10c4b..e3634f4 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameFieldProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -729,7 +729,7 @@ public class RenameFieldProcessor extends JavaRenameProcessor implements IRefere
 		if (getSetter() != null && fRenameSetter)
 			addMethodDelegate(getSetter(), getNewSetterName(), rewrite);
 
-		final CompilationUnitChange change= rewrite.createChange();
+		final CompilationUnitChange change= rewrite.createChange(true);
 		if (change != null) {
 			change.setKeepPreviewEdits(true);
 			fChangeManager.manage(fField.getCompilationUnit(), change);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java
index fe76d00..06b8efc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameLocalVariableProcessor.java	
@@ -42,13 +42,13 @@ import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java
index 0aadffa..4ae93ec 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameMethodProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -786,7 +786,7 @@ public abstract class RenameMethodProcessor extends JavaRenameProcessor implemen
 					}
 					// Need to handle all delegates first as this
 					// creates a completely new change object.
-					TextChange changeForThisCu= rewrite.createChange();
+					TextChange changeForThisCu= rewrite.createChange(true);
 					changeForThisCu.setKeepPreviewEdits(true);
 					manager.manage(cu, changeForThisCu);
 				}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameNonVirtualMethodProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameNonVirtualMethodProcessor.java
index 7443504..6fec4e2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameNonVirtualMethodProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameNonVirtualMethodProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,7 +154,7 @@ public class RenameNonVirtualMethodProcessor extends RenameMethodProcessor {
 			creator.setNewElementName(getNewElementName());
 			creator.prepareDelegate();
 			creator.createEdit();
-			CompilationUnitChange cuChange= rewrite.createChange();
+			CompilationUnitChange cuChange= rewrite.createChange(true);
 			if (cuChange != null) {
 				cuChange.setKeepPreviewEdits(true);
 				manager.manage(getDeclaringCU(), cuChange);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java
index 406fec1..5b51aef 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenamePackageProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,8 +17,8 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
@@ -35,6 +35,8 @@ import org.eclipse.text.edits.MalformedTreeException;
 import org.eclipse.text.edits.ReplaceEdit;
 import org.eclipse.text.edits.TextEdit;
 
+import org.eclipse.jface.util.Util;
+
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
 import org.eclipse.ltk.core.refactoring.IResourceMapper;
@@ -312,24 +314,11 @@ public class RenamePackageProcessor extends JavaRenameProcessor implements
 				for (int i= 0; i < oldParameterTypes.length; i++) {
 					newparams[i]= oldParameterTypes[i];
 					for (int j= 0; j < possibleOldSigs.length; j++) {
-						newparams[i]= replaceAll(newparams[i], possibleOldSigs[j], possibleNewSigs[j]);
+						newparams[i]= Util.replaceAll(newparams[i], possibleOldSigs[j], possibleNewSigs[j]);
 					}
 				}
 				return newparams;
 			}
-
-		    private String replaceAll(final String source, final String replaceFrom, final String replaceTo) {
-				final StringBuffer buf= new StringBuffer(source.length());
-				int currentIndex= 0;
-				int matchIndex;
-				while ((matchIndex= source.indexOf(replaceFrom, currentIndex)) != -1) {
-					buf.append(source.substring(currentIndex, matchIndex));
-					buf.append(replaceTo);
-					currentIndex= matchIndex + replaceFrom.length();
-				}
-				buf.append(source.substring(currentIndex));
-				return buf.toString();
-			}
 		}.transplantHandle(original);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java
index 55a4d1e..38b640a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/RenameTypeParameterProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,21 +33,17 @@ import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeParameter;
 import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.EnumDeclaration;
 import org.eclipse.jdt.core.dom.IBinding;
-import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.SourceRange;
-import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
+import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -73,12 +69,12 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 /**
  * Rename processor to rename type parameters.
  */
-public final class RenameTypeParameterProcessor extends JavaRenameProcessor implements IReferenceUpdating {
+public class RenameTypeParameterProcessor extends JavaRenameProcessor implements IReferenceUpdating {
 
 	/**
 	 * AST visitor which searches for occurrences of the type parameter.
 	 */
-	public final class RenameTypeParameterVisitor extends ASTVisitor {
+	private class RenameTypeParameterVisitor extends HierarchicalASTVisitor {
 
 		/** The binding of the type parameter */
 		private final IBinding fBinding;
@@ -102,8 +98,7 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		 * @param status
 		 *            the status to update
 		 */
-		public RenameTypeParameterVisitor(final CompilationUnitRewrite rewrite, final ISourceRange range, final RefactoringStatus status) {
-			super(true);
+		public RenameTypeParameterVisitor(CompilationUnitRewrite rewrite, ISourceRange range, RefactoringStatus status) {
 			Assert.isNotNull(rewrite);
 			Assert.isNotNull(range);
 			Assert.isNotNull(status);
@@ -120,45 +115,33 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		 * @throws CoreException
 		 *             if the change could not be created
 		 */
-		public final Change getResult() throws CoreException {
-			return fRewrite.createChange();
+		public Change getResult() throws CoreException {
+			return fRewrite.createChange(true);
 		}
 
-		public final boolean visit(final AnnotationTypeDeclaration node) {
-			final String name= node.getName().getIdentifier();
-			if (name.equals(getNewElementName())) {
-				fStatus.addError(Messages.format(RefactoringCoreMessages.RenameTypeParameterRefactoring_type_parameter_inner_class_clash, BasicElementLabels.getJavaElementName(name)), JavaStatusContext.create(fTypeParameter.getDeclaringMember().getCompilationUnit(), new SourceRange(node)));
-				return false;
-			}
-			return true;
-		}
-
-		public final boolean visit(final EnumDeclaration node) {
-			final String name= node.getName().getIdentifier();
-			if (name.equals(getNewElementName())) {
-				fStatus.addError(Messages.format(RefactoringCoreMessages.RenameTypeParameterRefactoring_type_parameter_inner_class_clash, BasicElementLabels.getJavaElementName(name)), JavaStatusContext.create(fTypeParameter.getDeclaringMember().getCompilationUnit(), new SourceRange(node)));
-				return false;
-			}
-			return true;
-		}
-
-		public final boolean visit(final SimpleName node) {
-			final ITypeBinding binding= node.resolveTypeBinding();
-			if (binding != null && binding.isTypeVariable() && Bindings.equals(binding, fBinding) && node.getIdentifier().equals(fName.getIdentifier())) {
+		public boolean visit(SimpleName node) {
+			IBinding binding= node.resolveBinding();
+			if (fBinding == binding) {
+				String groupDescription= null;
 				if (node != fName) {
-					if (fUpdateReferences)
-						fRewrite.getASTRewrite().set(node, SimpleName.IDENTIFIER_PROPERTY, getNewElementName(), fRewrite.createGroupDescription(RefactoringCoreMessages.RenameTypeParameterRefactoring_update_type_parameter_reference));
-				} else
-					fRewrite.getASTRewrite().set(node, SimpleName.IDENTIFIER_PROPERTY, getNewElementName(), fRewrite.createGroupDescription(RefactoringCoreMessages.RenameTypeParameterRefactoring_update_type_parameter_declaration));
+					if (fUpdateReferences) {
+						groupDescription= RefactoringCoreMessages.RenameTypeParameterRefactoring_update_type_parameter_reference;
+					}
+				} else {
+					groupDescription= RefactoringCoreMessages.RenameTypeParameterRefactoring_update_type_parameter_declaration;
+				}
+				if (groupDescription != null) {
+					fRewrite.getASTRewrite().set(node, SimpleName.IDENTIFIER_PROPERTY, getNewElementName(), fRewrite.createGroupDescription(groupDescription));
+				}
 			}
 			return true;
 		}
 
-		public final boolean visit(final TypeDeclaration node) {
-			final String name= node.getName().getIdentifier();
+		public boolean visit(AbstractTypeDeclaration node) {
+			String name= node.getName().getIdentifier();
 			if (name.equals(getNewElementName())) {
-				fStatus.addError(Messages.format(RefactoringCoreMessages.RenameTypeParameterRefactoring_type_parameter_inner_class_clash, new String[] { name}), JavaStatusContext.create(fTypeParameter.getDeclaringMember().getCompilationUnit(), new SourceRange(node)));
-				return false;
+				fStatus.addError(Messages.format(RefactoringCoreMessages.RenameTypeParameterRefactoring_type_parameter_inner_class_clash, new String[] { name}), JavaStatusContext.create(fTypeParameter.getDeclaringMember().getCompilationUnit(), SourceRangeFactory.create(node)));
+				return true;
 			}
 			return true;
 		}
@@ -184,7 +167,7 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 	 * @param parameter
 	 *            the type parameter to rename, or <code>null</code> if invoked by scripting
 	 */
-	public RenameTypeParameterProcessor(final ITypeParameter parameter) {
+	public RenameTypeParameterProcessor(ITypeParameter parameter) {
 		fTypeParameter= parameter;
 		if (parameter != null)
 			setNewElementName(parameter.getElementName());
@@ -209,10 +192,10 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return RefactoringSaveHelper.SAVE_NOTHING;
 	}
 
-	protected final RefactoringStatus doCheckFinalConditions(final IProgressMonitor monitor, final CheckConditionsContext context) throws CoreException, OperationCanceledException {
+	protected RefactoringStatus doCheckFinalConditions(IProgressMonitor monitor, CheckConditionsContext context) throws CoreException, OperationCanceledException {
 		Assert.isNotNull(monitor);
 		Assert.isNotNull(context);
-		final RefactoringStatus status= new RefactoringStatus();
+		RefactoringStatus status= new RefactoringStatus();
 		try {
 			monitor.beginTask("", 5); //$NON-NLS-1$
 			monitor.setTaskName(RefactoringCoreMessages.RenameTypeParameterRefactoring_checking);
@@ -234,28 +217,28 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return status;
 	}
 
-	public final RefactoringStatus checkInitialConditions(final IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+	public RefactoringStatus checkInitialConditions(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
 		Assert.isNotNull(monitor);
 		if (!fTypeParameter.exists())
 			return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.RenameTypeParameterRefactoring_deleted, BasicElementLabels.getFileName(fTypeParameter.getDeclaringMember().getCompilationUnit())));
 		return Checks.checkIfCuBroken(fTypeParameter.getDeclaringMember());
 	}
 
-	public final RefactoringStatus checkNewElementName(final String name) throws CoreException {
+	public RefactoringStatus checkNewElementName(String name) throws CoreException {
 		Assert.isNotNull(name);
-		final RefactoringStatus result= Checks.checkTypeParameterName(name, fTypeParameter);
+		RefactoringStatus result= Checks.checkTypeParameterName(name, fTypeParameter);
 		if (Checks.startsWithLowerCase(name))
 			result.addWarning(RefactoringCoreMessages.RenameTypeParameterRefactoring_should_start_lowercase);
 		if (Checks.isAlreadyNamed(fTypeParameter, name))
 			result.addFatalError(RefactoringCoreMessages.RenameTypeParameterRefactoring_another_name);
 
-		final IMember member= fTypeParameter.getDeclaringMember();
+		IMember member= fTypeParameter.getDeclaringMember();
 		if (member instanceof IType) {
-			final IType type= (IType) member;
+			IType type= (IType) member;
 			if (type.getTypeParameter(name).exists())
 				result.addFatalError(RefactoringCoreMessages.RenameTypeParameterRefactoring_class_type_parameter_already_defined);
 		} else if (member instanceof IMethod) {
-			final IMethod method= (IMethod) member;
+			IMethod method= (IMethod) member;
 			if (method.getTypeParameter(name).exists())
 				result.addFatalError(RefactoringCoreMessages.RenameTypeParameterRefactoring_method_type_parameter_already_defined);
 		} else {
@@ -265,7 +248,7 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return result;
 	}
 
-	public final Change createChange(final IProgressMonitor monitor) throws CoreException, OperationCanceledException {
+	public Change createChange(IProgressMonitor monitor) throws CoreException, OperationCanceledException {
 		Assert.isNotNull(monitor);
 		try {
 			Change change= fChange;
@@ -274,10 +257,10 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 				IJavaProject javaProject= fTypeParameter.getJavaProject();
 				if (javaProject != null)
 					project= javaProject.getElementName();
-				final String description= Messages.format(RefactoringCoreMessages.RenameTypeParameterProcessor_descriptor_description_short, BasicElementLabels.getJavaElementName(fTypeParameter.getElementName()));
-				final String header= Messages.format(RefactoringCoreMessages.RenameTypeParameterProcessor_descriptor_description, new String[] { BasicElementLabels.getJavaElementName(fTypeParameter.getElementName()), JavaElementLabels.getElementLabel(fTypeParameter.getDeclaringMember(), JavaElementLabels.ALL_FULLY_QUALIFIED), BasicElementLabels.getJavaElementName(getNewElementName())});
-				final String comment= new JDTRefactoringDescriptorComment(project, this, header).asString();
-				final RenameJavaElementDescriptor descriptor= RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_TYPE_PARAMETER);
+				String description= Messages.format(RefactoringCoreMessages.RenameTypeParameterProcessor_descriptor_description_short, BasicElementLabels.getJavaElementName(fTypeParameter.getElementName()));
+				String header= Messages.format(RefactoringCoreMessages.RenameTypeParameterProcessor_descriptor_description, new String[] { BasicElementLabels.getJavaElementName(fTypeParameter.getElementName()), JavaElementLabels.getElementLabel(fTypeParameter.getDeclaringMember(), JavaElementLabels.ALL_FULLY_QUALIFIED), BasicElementLabels.getJavaElementName(getNewElementName())});
+				String comment= new JDTRefactoringDescriptorComment(project, this, header).asString();
+				RenameJavaElementDescriptor descriptor= RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_TYPE_PARAMETER);
 				descriptor.setProject(project);
 				descriptor.setDescription(description);
 				descriptor.setComment(comment);
@@ -303,15 +286,15 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 	 * @throws CoreException
 	 *             if the change could not be generated
 	 */
-	private RefactoringStatus createRenameChanges(final IProgressMonitor monitor) throws CoreException {
+	private RefactoringStatus createRenameChanges(IProgressMonitor monitor) throws CoreException {
 		Assert.isNotNull(monitor);
-		final RefactoringStatus status= new RefactoringStatus();
+		RefactoringStatus status= new RefactoringStatus();
 		try {
 			monitor.beginTask(RefactoringCoreMessages.RenameTypeParameterRefactoring_searching, 2);
-			final ICompilationUnit cu= fTypeParameter.getDeclaringMember().getCompilationUnit();
-			final CompilationUnit root= RefactoringASTParser.parseWithASTProvider(cu, true, null);
-			final CompilationUnitRewrite rewrite= new CompilationUnitRewrite(cu, root);
-			final IMember member= fTypeParameter.getDeclaringMember();
+			ICompilationUnit cu= fTypeParameter.getDeclaringMember().getCompilationUnit();
+			CompilationUnit root= RefactoringASTParser.parseWithASTProvider(cu, true, null);
+			CompilationUnitRewrite rewrite= new CompilationUnitRewrite(cu, root);
+			IMember member= fTypeParameter.getDeclaringMember();
 			ASTNode declaration= null;
 			if (member instanceof IMethod) {
 				declaration= ASTNodeSearchUtil.getMethodDeclarationNode((IMethod) member, root);
@@ -322,7 +305,7 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 				Assert.isTrue(false);
 			}
 			monitor.worked(1);
-			final RenameTypeParameterVisitor visitor= new RenameTypeParameterVisitor(rewrite, fTypeParameter.getNameRange(), status);
+			RenameTypeParameterVisitor visitor= new RenameTypeParameterVisitor(rewrite, fTypeParameter.getNameRange(), status);
 			if (declaration != null)
 				declaration.accept(visitor);
 			fChange= visitor.getResult();
@@ -332,29 +315,29 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return status;
 	}
 
-	protected final String[] getAffectedProjectNatures() throws CoreException {
+	protected String[] getAffectedProjectNatures() throws CoreException {
 		return JavaProcessors.computeAffectedNatures(fTypeParameter);
 	}
 
-	public final String getCurrentElementName() {
+	public String getCurrentElementName() {
 		return fTypeParameter.getElementName();
 	}
 
-	public final Object[] getElements() {
+	public Object[] getElements() {
 		return new Object[] { fTypeParameter};
 	}
 
-	public final String getIdentifier() {
+	public String getIdentifier() {
 		return IDENTIFIER;
 	}
 
-	public final Object getNewElement() throws CoreException {
-		final IMember member= fTypeParameter.getDeclaringMember();
+	public Object getNewElement() throws CoreException {
+		IMember member= fTypeParameter.getDeclaringMember();
 		if (member instanceof IType) {
-			final IType type= (IType) member;
+			IType type= (IType) member;
 			return type.getTypeParameter(getNewElementName());
 		} else if (member instanceof IMethod) {
-			final IMethod method= (IMethod) member;
+			IMethod method= (IMethod) member;
 			return method.getTypeParameter(getNewElementName());
 		} else {
 			JavaPlugin.logErrorMessage("Unexpected sub-type of IMember: " + member.getClass().getName()); //$NON-NLS-1$
@@ -363,21 +346,21 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return null;
 	}
 
-	public final String getProcessorName() {
+	public String getProcessorName() {
 		return RefactoringCoreMessages.RenameTypeParameterProcessor_name;
 	}
 
-	public final boolean getUpdateReferences() {
+	public boolean getUpdateReferences() {
 		return fUpdateReferences;
 	}
 
-	private final RefactoringStatus initialize(JavaRefactoringArguments extended) {
-		final String parameter= extended.getAttribute(ATTRIBUTE_PARAMETER);
+	private RefactoringStatus initialize(JavaRefactoringArguments extended) {
+		String parameter= extended.getAttribute(ATTRIBUTE_PARAMETER);
 		if (parameter == null || "".equals(parameter)) //$NON-NLS-1$
 			return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_PARAMETER));
-		final String handle= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);
+		String handle= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);
 		if (handle != null) {
-			final IJavaElement element= JavaRefactoringDescriptorUtil.handleToElement(extended.getProject(), handle, false);
+			IJavaElement element= JavaRefactoringDescriptorUtil.handleToElement(extended.getProject(), handle, false);
 			if (element == null || !element.exists())
 				return JavaRefactoringDescriptorUtil.createInputFatalStatus(element, getProcessorName(), IJavaRefactorings.RENAME_TYPE_PARAMETER);
 			else {
@@ -393,12 +376,12 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 			}
 		} else
 			return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT));
-		final String name= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME);
+		String name= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME);
 		if (name != null && !"".equals(name)) //$NON-NLS-1$
 			setNewElementName(name);
 		else
 			return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME));
-		final String references= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_REFERENCES);
+		String references= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_REFERENCES);
 		if (references != null) {
 			fUpdateReferences= Boolean.valueOf(references).booleanValue();
 		} else
@@ -406,11 +389,11 @@ public final class RenameTypeParameterProcessor extends JavaRenameProcessor impl
 		return new RefactoringStatus();
 	}
 
-	public final boolean isApplicable() throws CoreException {
+	public boolean isApplicable() throws CoreException {
 		return RefactoringAvailabilityTester.isRenameAvailable(fTypeParameter);
 	}
 
-	public final void setUpdateReferences(final boolean update) {
+	public void setUpdateReferences(boolean update) {
 		fUpdateReferences= update;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java
index 95fede3..0146186 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/IReorgPolicy.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,9 +60,7 @@ public interface IReorgPolicy extends IReorgDestinationValidator {
 	/**
 	 * @return the save mode required for this reorg policy
 	 *
-	 * @see RefactoringSaveHelper#SAVE_ALL
-	 * @see RefactoringSaveHelper#SAVE_JAVA_ONLY_UPDATES
-	 * @see RefactoringSaveHelper#SAVE_NON_JAVA_UPDATES
+	 * @see RefactoringSaveHelper
 	 */
 	public int getSaveMode();
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaDeleteProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaDeleteProcessor.java
index 84b6d8a..5c99dc5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaDeleteProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaDeleteProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -450,15 +450,14 @@ public final class JavaDeleteProcessor extends DeleteProcessor {
 		// Remove resources in deleted folders
 		final List/* <IResource> */resources= new ArrayList();
 		for (int i= 0; i < fResources.length; i++) {
-			IResource parent= fResources[i];
-			if (parent.getType() == IResource.FILE)
-				parent= parent.getParent();
+			IResource resource= fResources[i];
+			IContainer parent= resource.getParent();
 			if (!deletedChildren.contains(parent))
-				resources.add(fResources[i]);
+				resources.add(resource);
 		}
 
 		fJavaElements= (IJavaElement[]) javaElements.toArray(new IJavaElement[javaElements.size()]);
-		fResources= (IResource[]) resources.toArray(new IResource[resources.size()]);
+		fResources= (IResource[])resources.toArray(new IResource[resources.size()]);
 	}
 
 	/**
@@ -558,7 +557,9 @@ public final class JavaDeleteProcessor extends DeleteProcessor {
 	private static boolean skipDeletingReferencedRoot(IConfirmQuery query, IPackageFragmentRoot root, List referencingProjects) throws OperationCanceledException {
 		if (referencingProjects.isEmpty() || root == null || ! root.exists() ||! root.isArchive())
 			return false;
-		String question= Messages.format(RefactoringCoreMessages.DeleteRefactoring_3, JavaElementLabels.getElementLabel(root, JavaElementLabels.ALL_DEFAULT));
+		String label= JavaElementLabels.getElementLabel(root, JavaElementLabels.ALL_DEFAULT);
+		String question= referencingProjects.size() == 1 ? Messages.format(RefactoringCoreMessages.DeleteRefactoring_3_singular, label) : Messages.format(
+				RefactoringCoreMessages.DeleteRefactoring_3_plural, label);
 		return ! query.confirm(question, referencingProjects.toArray());
 	}
 
@@ -617,7 +618,8 @@ public final class JavaDeleteProcessor extends DeleteProcessor {
 			final IProject resource= getSingleProject();
 			final String project= resource != null ? resource.getName() : null;
 			final String source= project != null ? Messages.format(RefactoringCoreMessages.JavaDeleteProcessor_project_pattern, BasicElementLabels.getJavaElementName(project)) : RefactoringCoreMessages.JavaDeleteProcessor_workspace;
-			final String header= Messages.format(RefactoringCoreMessages.JavaDeleteProcessor_header, new String[] { String.valueOf(fElements.length), source});
+			final String header= fElements.length == 1 ? Messages.format(RefactoringCoreMessages.JavaDeleteProcessor_header_singular, source) : Messages.format(
+					RefactoringCoreMessages.JavaDeleteProcessor_header_plural, new String[] { String.valueOf(fElements.length), source });
 			int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
 			final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
 			if (fDeleteSubPackages)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java
index c445b25..292e8df 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/JavaMoveProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,6 +94,15 @@ public final class JavaMoveProcessor extends MoveProcessor implements IQualified
 		return fMovePolicy.canUpdateJavaReferences();
 	}
 
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/299631 .
+	 * @return <code>true</code> iff <b>Java</b> references to the moved element can be updated
+	 * @deprecated since 3.5, replaced by {@link #canUpdateJavaReferences()}
+	 */
+	public boolean canUpdateReferences() {
+		return canUpdateJavaReferences();
+	}
+	
 	public RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext context) throws CoreException {
 		try {
 			Assert.isNotNull(fReorgQueries);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ParentChecker.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ParentChecker.java
index c5ffbf8..f6e36f1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ParentChecker.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ParentChecker.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.Assert;
 
 import org.eclipse.core.resources.IResource;
 
+import org.eclipse.jdt.core.IJarEntryResource;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.JavaCore;
 
@@ -24,12 +25,19 @@ import org.eclipse.jdt.core.JavaCore;
 public class ParentChecker {
 	private IResource[] fResources;
 	private IJavaElement[] fJavaElements;
+	private IJarEntryResource[] fJarResources;
 
 	public ParentChecker(IResource[] resources, IJavaElement[] javaElements) {
+		this(resources, javaElements, new IJarEntryResource[0]);
+	}
+
+	public ParentChecker(IResource[] resources, IJavaElement[] javaElements, IJarEntryResource[] jarResources) {
 		Assert.isNotNull(resources);
 		Assert.isNotNull(javaElements);
+		Assert.isNotNull(jarResources);
 		fResources= resources;
 		fJavaElements= javaElements;
+		fJarResources= jarResources;
 	}
 
 	public boolean haveCommonParent() {
@@ -37,11 +45,13 @@ public class ParentChecker {
 	}
 
 	public Object getCommonParent(){
-		if (fJavaElements.length == 0 && fResources.length == 0)
+		if (fJavaElements.length == 0 && fResources.length == 0 && fJarResources.length == 0)
 			return null;
-		if (! resourcesHaveCommonParent() || ! javaElementsHaveCommonParent())
+		if (! resourcesHaveCommonParent() || ! javaElementsHaveCommonParent() || ! jarResourcesHaveCommonParent())
 			return null;
-		if (fJavaElements.length == 0){
+		if (fJavaElements.length == 0 && fResources.length == 0)
+			return getCommonJarResourceParent();
+		if (fJavaElements.length == 0 && fJarResources.length == 0) {
 			IResource commonResourceParent= getCommonResourceParent();
 			Assert.isNotNull(commonResourceParent);
 			IJavaElement convertedToJava= JavaCore.create(commonResourceParent);
@@ -50,19 +60,46 @@ public class ParentChecker {
 			else
 				return commonResourceParent;
 		}
-		if (fResources.length == 0)
+		if (fResources.length == 0 && fJarResources.length == 0)
 			return getCommonJavaElementParent();
 
-		IResource commonResourceParent= getCommonResourceParent();
-		IJavaElement commonJavaElementParent= getCommonJavaElementParent();
-		Assert.isNotNull(commonJavaElementParent);
-		Assert.isNotNull(commonResourceParent);
-		IJavaElement convertedToJava= JavaCore.create(commonResourceParent);
-		if (convertedToJava == null ||
-			! convertedToJava.exists() ||
-			! commonJavaElementParent.equals(convertedToJava))
-			return null;
-		return commonJavaElementParent;
+		IJavaElement convertedToJava= null;
+		IJavaElement commonJavaElementParent= null;
+		Object commonJarResourcesParent= null;
+		Object commonParent= null;
+		if (fResources.length != 0) {
+			IResource commonResourceParent= getCommonResourceParent();
+			Assert.isNotNull(commonResourceParent);
+			convertedToJava= JavaCore.create(commonResourceParent);
+			if (convertedToJava == null || !convertedToJava.exists())
+				return null;
+		}
+		if (fJavaElements.length != 0) {
+			commonJavaElementParent= getCommonJavaElementParent();
+			Assert.isNotNull(commonJavaElementParent);
+			if (convertedToJava != null && !commonJavaElementParent.equals(convertedToJava))
+				return null;
+		}
+		commonParent= convertedToJava == null ? commonJavaElementParent : convertedToJava;
+		if (fJarResources.length != 0) {
+			commonJarResourcesParent= getCommonJarResourceParent();
+			Assert.isNotNull(commonJarResourcesParent);			
+			if (!commonJarResourcesParent.equals(commonParent))
+				return null;
+		}
+		return commonParent;
+	}
+
+	/**
+	 * Return the common parent for the jar resources.
+	 * 
+	 * @return the common parent for the jar resources
+	 * @since 3.6
+	 */
+	private Object getCommonJarResourceParent() {
+		Assert.isNotNull(fJarResources);
+		Assert.isTrue(fJarResources.length > 0);//safe - checked before
+		return fJarResources[0].getParent();
 	}
 
 	private IJavaElement getCommonJavaElementParent() {
@@ -101,6 +138,25 @@ public class ParentChecker {
 		return true;
 	}
 
+	/**
+	 * Checks whether the jar resources have the same parent.
+	 * 
+	 * @return <code>true</code> if the jar resources have the same parent, <code>false</code>
+	 *         otherwise
+	 * @since 3.6
+	 */
+	private boolean jarResourcesHaveCommonParent() {
+		if (fJarResources.length == 0)
+			return true;
+		Object firstParent= fJarResources[0].getParent();
+		Assert.isNotNull(firstParent);
+		for (int i= 1; i < fJarResources.length; i++) {
+			if (! firstParent.equals(fJarResources[i].getParent()))
+				return false;
+		}
+		return true;
+	}
+
 	public IResource[] getResources(){
 		return fResources;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java
index 5bcddbf..11712b5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgPolicyFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Carsten Pfeiffer <carsten.pfeiffer at gebit.de> - [ccp] ReorgPolicies' canEnable() methods return true too often - https://bugs.eclipse.org/bugs/show_bug.cgi?id=303698
  *******************************************************************************/
 package org.eclipse.jdt.internal.corext.refactoring.reorg;
 
@@ -97,12 +98,14 @@ import org.eclipse.jdt.core.dom.SwitchStatement;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -326,8 +329,12 @@ public final class ReorgPolicyFactory {
 			return getDestinationAsContainer();
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_copy_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -437,8 +444,12 @@ public final class ReorgPolicyFactory {
 			return RefactoringCoreMessages.ReorgPolicyFactory_copy_roots_singular;
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_copy_roots_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_roots_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_roots_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -558,8 +569,12 @@ public final class ReorgPolicyFactory {
 			return RefactoringCoreMessages.ReorgPolicyFactory_copy_package_singular;
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_copy_packages_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_packages_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_packages_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -698,8 +713,12 @@ public final class ReorgPolicyFactory {
 			}
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_copy_elements_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_elements_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_copy_elements_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -842,13 +861,27 @@ public final class ReorgPolicyFactory {
 			return fCus;
 		}
 
+		private final String getSingleElementName() {
+			switch (getContentKind()) {
+				case ONLY_FOLDERS:
+					return fFolders[0].getName();
+				case ONLY_FILES:
+					return fFiles[0].getName();
+				case ONLY_CUS:
+					return fCus[0].getElementName();
+			}
+			return null;
+		}
+
 		public final ChangeDescriptor getDescriptor() {
 			final Map arguments= new HashMap();
 			final int length= fFiles.length + fFolders.length + fCus.length;
 			final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
 			final IProject resource= getSingleProject();
 			final String project= resource != null ? resource.getName() : null;
-			final String header= Messages.format(getHeaderPattern(), new String[] { String.valueOf(length), getDestinationLabel()});
+			final String header= length == 1 ? Messages.format(getHeaderPatternSingular(), new String[] { getSingleElementName(), getDestinationLabel() }) : Messages.format(
+					getHeaderPatternPlural(),
+					new String[] { String.valueOf(length), getDestinationLabel() });
 			int flags= JavaRefactoringDescriptor.JAR_MIGRATION | JavaRefactoringDescriptor.JAR_REFACTORING | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
 			final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
 			arguments.put(ATTRIBUTE_POLICY, getPolicyId());
@@ -1414,8 +1447,12 @@ public final class ReorgPolicyFactory {
 			return fFilePatterns;
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_move_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -1620,7 +1657,7 @@ public final class ReorgPolicyFactory {
 						return false;
 				}
 			}
-			return true;
+			return roots.length > 0;
 		}
 
 		public RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext context, IReorgQueries reorgQueries) throws CoreException {
@@ -1685,8 +1722,12 @@ public final class ReorgPolicyFactory {
 			return RefactoringCoreMessages.ReorgPolicyFactory_move_roots_singular;
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_move_roots_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_roots_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_roots_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -1922,8 +1963,12 @@ public final class ReorgPolicyFactory {
 			return RefactoringCoreMessages.ReorgPolicyFactory_move_packages_singular;
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_move_packages_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_packages_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_packages_header_plural;
 		}
 
 		protected RefactoringModifications getModifications() throws CoreException {
@@ -2178,8 +2223,12 @@ public final class ReorgPolicyFactory {
 			}
 		}
 
-		protected String getHeaderPattern() {
-			return RefactoringCoreMessages.ReorgPolicyFactory_move_elements_header;
+		protected String getHeaderPatternSingular() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_elements_header_singular;
+		}
+
+		protected String getHeaderPatternPlural() {
+			return RefactoringCoreMessages.ReorgPolicyFactory_move_elements_header_plural;
 		}
 
 		protected String getProcessorId() {
@@ -2497,7 +2546,11 @@ public final class ReorgPolicyFactory {
 			return null;
 		}
 
-		protected String getHeaderPattern() {
+		protected String getHeaderPatternSingular() {
+			return UNUSED_STRING;
+		}
+
+		protected String getHeaderPatternPlural() {
 			return UNUSED_STRING;
 		}
 
@@ -2568,7 +2621,11 @@ public final class ReorgPolicyFactory {
 			return null;
 		}
 
-		protected String getHeaderPattern() {
+		protected String getHeaderPatternSingular() {
+			return UNUSED_STRING;
+		}
+
+		protected String getHeaderPatternPlural() {
 			return UNUSED_STRING;
 		}
 
@@ -2715,7 +2772,7 @@ public final class ReorgPolicyFactory {
 		}
 
 		public boolean canEnable() throws JavaModelException {
-			if (!super.canEnable())
+			if (!super.canEnable() || fPackageFragmentRoots.length == 0)
 				return false;
 			for (int i= 0; i < fPackageFragmentRoots.length; i++) {
 				IPackageFragmentRoot root= fPackageFragmentRoots[i];
@@ -2753,7 +2810,8 @@ public final class ReorgPolicyFactory {
 			final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
 			final IProject resource= getSingleProject();
 			final String project= resource != null ? resource.getName() : null;
-			final String header= Messages.format(getHeaderPattern(), new String[] { String.valueOf(length), getDestinationLabel()});
+			final String header= length == 1 ? Messages.format(getHeaderPatternSingular(), new String[] { fPackageFragmentRoots[0].getElementName(), getDestinationLabel() }) : Messages.format(
+					getHeaderPatternPlural(), new String[] { String.valueOf(length), getDestinationLabel() });
 			int flags= RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
 			final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
 			arguments.put(ATTRIBUTE_POLICY, getPolicyId());
@@ -2932,6 +2990,8 @@ public final class ReorgPolicyFactory {
 		}
 
 		public boolean canEnable() throws JavaModelException {
+			if (fPackageFragments.length == 0)
+				return false;
 			for (int i= 0; i < fPackageFragments.length; i++) {
 				if (JavaElementUtil.isDefaultPackage(fPackageFragments[i]) || fPackageFragments[i].isReadOnly())
 					return false;
@@ -2967,7 +3027,9 @@ public final class ReorgPolicyFactory {
 			final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
 			final IProject resource= getSingleProject();
 			final String project= resource != null ? resource.getName() : null;
-			final String header= Messages.format(getHeaderPattern(), new String[] { String.valueOf(length), getDestinationLabel()});
+			final String header= length == 1
+					? Messages.format(getHeaderPatternSingular(), new String[] { (fPackageFragments[0]).getElementName(), getDestinationLabel() })
+					: Messages.format(getHeaderPatternPlural(), new String[] { String.valueOf(length), getDestinationLabel() });
 			int flags= JavaRefactoringDescriptor.JAR_REFACTORING | JavaRefactoringDescriptor.JAR_MIGRATION | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
 			final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
 			arguments.put(ATTRIBUTE_POLICY, getPolicyId());
@@ -3207,7 +3269,7 @@ public final class ReorgPolicyFactory {
 				if (!element.exists())
 					return false;
 			}
-			return true;
+			return resources.length > 0 || javaElements.length > 0;
 		}
 
 		/**
@@ -3248,7 +3310,9 @@ public final class ReorgPolicyFactory {
 			return JavaElementLabels.getTextLabel(destination, JavaElementLabels.ALL_FULLY_QUALIFIED);
 		}
 
-		protected abstract String getHeaderPattern();
+		protected abstract String getHeaderPatternSingular();
+
+		protected abstract String getHeaderPatternPlural();
 
 		public final IJavaElement getJavaElementDestination() {
 			if (!(fDestination instanceof JavaElementDestination))
@@ -3410,7 +3474,7 @@ public final class ReorgPolicyFactory {
 	private static abstract class SubCuElementReorgPolicy extends ReorgPolicy {
 
 		protected static CompilationUnitChange createCompilationUnitChange(CompilationUnitRewrite rewrite) throws CoreException {
-			CompilationUnitChange change= rewrite.createChange();
+			CompilationUnitChange change= rewrite.createChange(true);
 			if (change != null)
 				change.setSaveMode(TextFileChange.KEEP_SAVE_STATE);
 
@@ -3463,7 +3527,7 @@ public final class ReorgPolicyFactory {
 		}
 
 		public boolean canEnable() throws JavaModelException {
-			if (!super.canEnable())
+			if (!super.canEnable() || fJavaElements.length == 0)
 				return false;
 
 			for (int i= 0; i < fJavaElements.length; i++) {
@@ -3526,7 +3590,7 @@ public final class ReorgPolicyFactory {
 			IJavaElement javaElementDestination= getJavaElementDestination();
 			ASTNode nodeDestination= getDestinationNode(javaElementDestination, targetCuNode);
 			ASTNode destinationContainer;
-			if (getLocation() == IReorgDestination.LOCATION_ON && javaElementDestination instanceof IType) {
+			if (getLocation() == IReorgDestination.LOCATION_ON && (javaElementDestination instanceof IType || javaElementDestination instanceof ICompilationUnit)) {
 				destinationContainer= nodeDestination;
 			} else {
 				destinationContainer= nodeDestination.getParent();
@@ -3560,8 +3624,10 @@ public final class ReorgPolicyFactory {
 
 			if (!(member instanceof IInitializer)) {
 				BodyDeclaration decl= ASTNodeSearchUtil.getBodyDeclarationNode(member, sourceCuNode);
-				if (decl != null)
-					ImportRewriteUtil.addImports(targetRewriter, decl, new HashMap(), new HashMap(), false);
+				if (decl != null) {
+					ImportRewriteContext context= new ContextSensitiveImportRewriteContext(destinationContainer, targetRewriter.getImportRewrite());
+					ImportRewriteUtil.addImports(targetRewriter, context, decl, new HashMap(), new HashMap(), false);
+				}
 			}
 		}
 
@@ -3583,6 +3649,12 @@ public final class ReorgPolicyFactory {
 					} else {
 						return ASTNodeSearchUtil.getAbstractTypeDeclarationNode(typeDestination, target);
 					}
+				case IJavaElement.COMPILATION_UNIT:
+					IType mainType= JavaElementUtil.getMainType((ICompilationUnit) destination);
+					if (mainType != null) {
+						return ASTNodeSearchUtil.getAbstractTypeDeclarationNode(mainType, target);
+					}
+					//$FALL-THROUGH$
 				default:
 					return null;
 			}
@@ -3704,7 +3776,9 @@ public final class ReorgPolicyFactory {
 			final String description= length == 1 ? getDescriptionSingular() : getDescriptionPlural();
 			final IProject resource= getSingleProject();
 			final String project= resource != null ? resource.getName() : null;
-			final String header= Messages.format(getHeaderPattern(), new String[] { String.valueOf(length), getDestinationLabel()});
+			final String header= length == 1 ? Messages.format(getHeaderPatternSingular(), new String[] {
+					JavaElementLabels.getTextLabel(fJavaElements[0].getElementName(), JavaElementLabels.ALL_FULLY_QUALIFIED), getDestinationLabel() }) : Messages.format(getHeaderPatternPlural(),
+					new String[] { String.valueOf(length), getDestinationLabel() });
 			int flags= JavaRefactoringDescriptor.JAR_REFACTORING | JavaRefactoringDescriptor.JAR_MIGRATION | RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE;
 			final JDTRefactoringDescriptorComment comment= new JDTRefactoringDescriptorComment(project, this, header);
 			arguments.put(ATTRIBUTE_POLICY, getPolicyId());
@@ -3802,8 +3876,10 @@ public final class ReorgPolicyFactory {
 						return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_cannot);
 
 					int[] types0= new int[] {IJavaElement.TYPE, IJavaElement.PACKAGE_DECLARATION, IJavaElement.IMPORT_CONTAINER, IJavaElement.IMPORT_DECLARATION};
-					if (!ReorgUtils.hasOnlyElementsOfType(getJavaElements(), types0))
-						return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_cannot);
+					if (!ReorgUtils.hasOnlyElementsOfType(getJavaElements(), types0)) {
+						if (JavaElementUtil.getMainType(destinationCu) == null || !ReorgUtils.hasOnlyElementsOfType(getJavaElements(), new int[] {IJavaElement.FIELD, IJavaElement.INITIALIZER, IJavaElement.METHOD, IJavaElement.TYPE}))
+							return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ReorgPolicyFactory_cannot);
+					}
 
 					break;
 				case IJavaElement.PACKAGE_DECLARATION: //drop nothing
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java
index 90bcd1c..e21358d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/reorg/ReorgUtils.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import org.eclipse.ui.IWorkingSet;
 
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJarEntryResource;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
@@ -42,8 +43,8 @@ import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
 import org.eclipse.jdt.internal.corext.refactoring.util.JavaElementUtil;
 import org.eclipse.jdt.internal.corext.refactoring.util.ResourceUtil;
@@ -254,6 +255,23 @@ public class ReorgUtils {
 		return (IJavaElement[]) resources.toArray(new IJavaElement[resources.size()]);
 	}
 
+	/**
+	 * Returns the jar entry resources from the list of elements.
+	 * 
+	 * @param elements the list of elements
+	 * @return the array of jar entry resources
+	 * @since 3.6
+	 */
+	public static IJarEntryResource[] getJarEntryResources(List elements) {
+		List resources= new ArrayList(elements.size());
+		for (Iterator iter= elements.iterator(); iter.hasNext();) {
+			Object element= iter.next();
+			if (element instanceof IJarEntryResource)
+				resources.add(element);
+		}
+		return (IJarEntryResource[]) resources.toArray(new IJarEntryResource[resources.size()]);
+	}
+
 	public static IWorkingSet[] getWorkingSets(List elements) {
 		List result= new ArrayList(1);
 		for (Iterator iter= elements.iterator(); iter.hasNext();) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/AccessAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/AccessAnalyzer.java
index d762f54..ea5f3b7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/AccessAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/AccessAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
@@ -205,7 +205,7 @@ class AccessAnalyzer extends ASTVisitor {
 		ASTNode parent= node.getParent();
 		if (!(parent instanceof ExpressionStatement)) {
 			fStatus.addError(RefactoringCoreMessages.SelfEncapsulateField_AccessAnalyzer_cannot_convert_postfix_expression,
-				JavaStatusContext.create(fCUnit, new SourceRange(node)));
+				JavaStatusContext.create(fCUnit, SourceRangeFactory.create(node)));
 			return false;
 		}
 		fRewriter.replace(node,
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/SelfEncapsulateFieldRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/SelfEncapsulateFieldRefactoring.java
index ad98269..d19ce17 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/SelfEncapsulateFieldRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/sef/SelfEncapsulateFieldRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,6 +69,7 @@ import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.Message;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Type;
@@ -88,8 +89,7 @@ import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
+import org.eclipse.jdt.internal.corext.dom.VariableDeclarationRewrite;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -252,7 +252,6 @@ public class SelfEncapsulateFieldRefactoring extends Refactoring {
 			return result;
 		}
 		computeUsedNames();
-		fRewriter= ASTRewrite.create(fRoot.getAST());
 		return result;
 	}
 
@@ -328,10 +327,13 @@ public class SelfEncapsulateFieldRefactoring extends Refactoring {
 	}
 
 	public RefactoringStatus checkFinalConditions(IProgressMonitor pm) throws CoreException {
-		RefactoringStatus result= new RefactoringStatus();
-		fChangeManager.clear();
 		pm.beginTask(NO_NAME, 12);
 		pm.setTaskName(RefactoringCoreMessages.SelfEncapsulateField_checking_preconditions);
+		
+		RefactoringStatus result= new RefactoringStatus();
+		fRewriter= ASTRewrite.create(fRoot.getAST());
+		fChangeManager.clear();
+		
 		boolean usingLocalGetter=isUsingLocalGetter();
 		boolean usingLocalSetter=isUsingLocalSetter();
 		result.merge(checkMethodNames(usingLocalGetter,usingLocalSetter));
@@ -587,20 +589,11 @@ public class SelfEncapsulateFieldRefactoring extends Refactoring {
 	}
 
 	private TextEditGroup makeDeclarationPrivate(ASTRewrite rewriter, FieldDeclaration decl) {
-		AST ast= rewriter.getAST();
 		TextEditGroup description= new TextEditGroup(RefactoringCoreMessages.SelfEncapsulateField_change_visibility);
-		if (decl.fragments().size() > 1) {
-			//TODO: doesn't work for cases like this:  int field1, field2= field1, field3= field2; // keeping refs to field
-			rewriter.remove(fFieldDeclaration, description);
-			ChildListPropertyDescriptor descriptor= getBodyDeclarationsProperty(decl.getParent());
-			VariableDeclarationFragment newField= (VariableDeclarationFragment) rewriter.createCopyTarget(fFieldDeclaration);
-			FieldDeclaration fieldDecl= ast.newFieldDeclaration(newField);
-			fieldDecl.setType((Type)rewriter.createCopyTarget(decl.getType()));
-			fieldDecl.modifiers().addAll(ASTNodeFactory.newModifiers(ast, Modifier.PRIVATE));
-			rewriter.getListRewrite(decl.getParent(), descriptor).insertAfter(fieldDecl, decl, description);
-		} else {
-			ModifierRewrite.create(rewriter, decl).setVisibility(Modifier.PRIVATE, description);
-		}
+		VariableDeclarationFragment[] vdfs= new VariableDeclarationFragment[] { fFieldDeclaration };
+		int includedModifiers= Modifier.PRIVATE;
+		int excludedModifiers= Modifier.PROTECTED | Modifier.PUBLIC;
+		VariableDeclarationRewrite.rewriteModifiers(decl, vdfs, includedModifiers, excludedModifiers, rewriter, description);
 		return description;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ASTNodeSearchUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ASTNodeSearchUtil.java
index a48f1a1..1992dd3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ASTNodeSearchUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ASTNodeSearchUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@ import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.ImportDeclaration;
 import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
@@ -49,7 +50,6 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.search.SearchMatch;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
@@ -239,8 +239,7 @@ public class ASTNodeSearchUtil {
 	}
 
 	private static ASTNode findNode(ISourceRange range, CompilationUnit cuNode){
-		NodeFinder nodeFinder= new NodeFinder(range.getOffset(), range.getLength());
-		cuNode.accept(nodeFinder);
+		NodeFinder nodeFinder= new NodeFinder(cuNode, range.getOffset(), range.getLength());
 		ASTNode coveredNode= nodeFinder.getCoveredNode();
 		if (coveredNode != null)
 			return coveredNode;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java
index 4d7eaf8..c2ac92b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,6 +76,7 @@ import org.eclipse.jdt.core.dom.MethodRef;
 import org.eclipse.jdt.core.dom.MethodRefParameter;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -102,14 +103,14 @@ import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchPattern;
 
+import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.Corext;
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
@@ -154,6 +155,7 @@ import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 public class ChangeSignatureProcessor extends RefactoringProcessor implements IDelegateUpdating {
 
 	private static final String ATTRIBUTE_RETURN= "return"; //$NON-NLS-1$
@@ -199,7 +201,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 	/**
 	 * Creates a new change signature refactoring.
 	 * @param method the method, or <code>null</code> if invoked by scripting framework
-	 * @throws JavaModelException
+	 * @throws JavaModelException if something's wrong with the given method
 	 */
 	public ChangeSignatureProcessor(IMethod method) throws JavaModelException {
 		fMethod= method;
@@ -428,9 +430,8 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 	/**
 	 * @return true if the new method cannot coexist with the old method since
 	 *         the signatures are too much alike
-	 * @throws JavaModelException
 	 */
-	public boolean isSignatureClashWithInitial() throws JavaModelException {
+	public boolean isSignatureClashWithInitial() {
 
 		if (!isMethodNameSameAsInitial())
 			return false; // name has changed.
@@ -779,8 +780,8 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 					ITypeBinding typeBinding= name.resolveTypeBinding();
 					if (typeBinding == null)
 						return RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.ChangeSignatureRefactoring_no_exception_binding);
-					IType type= (IType) typeBinding.getJavaElement();
-					result.add(ExceptionInfo.createInfoForOldException(type, typeBinding));
+					IJavaElement element= typeBinding.getJavaElement();
+					result.add(ExceptionInfo.createInfoForOldException(element, typeBinding));
 				}
 				fExceptionInfos= result;
 			} catch (JavaModelException e) {
@@ -932,7 +933,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		for (Iterator iter= fExceptionInfos.iterator(); iter.hasNext(); ) {
 			ExceptionInfo info= (ExceptionInfo) iter.next();
 			if (! info.isDeleted()) {
-				buff.append(info.getType().getElementName());
+				buff.append(info.getElement().getElementName());
 				buff.append(", "); //$NON-NLS-1$
 			}
 		}
@@ -948,7 +949,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		for (Iterator iter= fExceptionInfos.iterator(); iter.hasNext(); ) {
 			ExceptionInfo info= (ExceptionInfo) iter.next();
 			if (! info.isAdded()) {
-				buff.append(info.getType().getElementName());
+				buff.append(info.getElement().getElementName());
 				buff.append(", "); //$NON-NLS-1$
 			}
 		}
@@ -998,7 +999,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		for (int i= 0; i < problems.length; i++) {
 			IProblem problem= problems[i];
 			if (shouldReport(problem, newCUNode))
-				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, new SourceRange(problem))));
+				result.addEntry(new RefactoringStatusEntry((problem.isError() ? RefactoringStatus.ERROR : RefactoringStatus.WARNING), problem.getMessage(), new JavaStringStatusContext(newCuSource, SourceRangeFactory.create(problem))));
 		}
 		return result;
 	}
@@ -1220,7 +1221,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 			ExceptionInfo ei= (ExceptionInfo) exceptionInfos.get(i);
 			if (!ei.isDeleted()) {
 				int oldIndex= ei.isAdded() ? -1 : i;
-				String qualifiedTypeName= ei.getType().getFullyQualifiedName('.');
+				String qualifiedTypeName= ei.getFullyQualifiedName();
 				String newTypeSig= Signature.createTypeSignature(qualifiedTypeName, true);
 				exceptionList.add(new ThrownException(oldIndex, newTypeSig));
 			}
@@ -1251,7 +1252,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 			final String description= Messages.format(RefactoringCoreMessages.ChangeSignatureRefactoring_descriptor_description_short, BasicElementLabels.getJavaElementName(fMethod.getElementName()));
 			final String header= Messages.format(RefactoringCoreMessages.ChangeSignatureRefactoring_descriptor_description, new String[] { getOldMethodSignature(), getNewMethodSignature()});
 			final JDTRefactoringDescriptorComment comment= createComment(project, header);
-			descriptor= new ChangeMethodSignatureDescriptor(project, description, comment.asString(), arguments, getDescriptorFlags());
+			descriptor= RefactoringSignatureDescriptorFactory.createChangeMethodSignatureDescriptor(project, description, comment.asString(), arguments, getDescriptorFlags());
 			arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT, JavaRefactoringDescriptorUtil.elementToHandle(project,fMethod));
 			arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME, fMethodName);
 			arguments.put(ATTRIBUTE_DELEGATE, Boolean.valueOf(fDelegateUpdating).toString());
@@ -1300,7 +1301,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 			count= 1;
 			for (final Iterator iterator= fExceptionInfos.iterator(); iterator.hasNext();) {
 				final ExceptionInfo info= (ExceptionInfo) iterator.next();
-				arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + count, JavaRefactoringDescriptorUtil.elementToHandle(project,info.getType()));
+				arguments.put(JavaRefactoringDescriptorUtil.ATTRIBUTE_ELEMENT + count, JavaRefactoringDescriptorUtil.elementToHandle(project,info.getElement()));
 				arguments.put(ATTRIBUTE_KIND + count, new Integer(info.getKind()).toString());
 				count++;
 			}
@@ -1361,9 +1362,9 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		for (final Iterator iterator= fExceptionInfos.iterator(); iterator.hasNext();) {
 			final ExceptionInfo info= (ExceptionInfo) iterator.next();
 			if (info.isAdded())
-				added.add(info.getType().getElementName());
+				added.add(info.getElement().getElementName());
 			else if (info.isDeleted())
-				deleted.add(info.getType().getElementName());
+				deleted.add(info.getElement().getElementName());
 		}
 		if (!added.isEmpty())
 			comment.addSetting(JDTRefactoringDescriptorComment.createCompositeSetting(RefactoringCoreMessages.ChangeSignatureRefactoring_added_exceptions, (String[]) added.toArray(new String[added.size()])));
@@ -1427,7 +1428,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 						modifyImplicitCallsToNoArgConstructor(subtypeNode, cuRewrite);
 				}
 			}
-			TextChange change= cuRewrite.createChange();
+			TextChange change= cuRewrite.createChange(true);
 			if (change != null)
 				fChangeManager.manage(cu, change);
 		}
@@ -1827,7 +1828,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		}
 
 		/**
-		 * @param info
+		 * @param info TODO
 		 * @param parameterInfos TODO
 		 * @param nodes TODO
 		 * @return a new method parameter or argument, or <code>null</code> for an empty vararg argument
@@ -2149,7 +2150,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 				 // if (Bindings.isSuperType(typeToRemove, currentType))
 				if (currentType == null)
 					continue; // newly added or unresolvable type
-				if (Bindings.equals(currentType, typeToRemove) || toRemove.getType().getElementName().equals(currentType.getName())) {
+				if (Bindings.equals(currentType, typeToRemove) || toRemove.getElement().getElementName().equals(currentType.getName())) {
 					getASTRewrite().remove(currentName, fDescription);
 					registerImportRemoveNode(currentName);
 				}
@@ -2157,7 +2158,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 		}
 
 		private void addExceptionToNodeList(ExceptionInfo exceptionInfo, ListRewrite exceptionListRewrite) {
-			String fullyQualified= exceptionInfo.getType().getFullyQualifiedName('.');
+			String fullyQualified= exceptionInfo.getFullyQualifiedName();
 			for (Iterator iter= exceptionListRewrite.getOriginalList().iterator(); iter.hasNext(); ) {
 				Name exName= (Name) iter.next();
 				//XXX: existing superclasses of the added exception are redundant and could be removed
@@ -2167,7 +2168,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 				if (typeBinding.getQualifiedName().equals(fullyQualified))
 					return; // don't add it again
 			}
-			String importedType= getImportRewrite().addImport(exceptionInfo.getType().getFullyQualifiedName('.'));
+			String importedType= getImportRewrite().addImport(exceptionInfo.getFullyQualifiedName());
 			getImportRemover().registerAddedImport(importedType);
 			ASTNode exNode= getASTRewrite().createStringPlaceholder(importedType, ASTNode.SIMPLE_NAME);
 			exceptionListRewrite.insertLast(exNode, fDescription);
@@ -2309,7 +2310,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 								final ITypeBinding infoBinding= info.getTypeBinding();
 								if (infoBinding != null && Bindings.equals(infoBinding, nameBinding))
 									remove= true;
-								else if (info.getType().getElementName().equals(nameBinding.getName()))
+								else if (info.getElement().getElementName().equals(nameBinding.getName()))
 									remove= true;
 								if (remove) {
 									getASTRewrite().remove(tag, fDescription);
@@ -2331,7 +2332,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 					if (info.isAdded()) {
 						if (!isTopOfRipple)
 							continue;
-						TagElement excptNode= createExceptionTag(info.getType().getElementName());
+						TagElement excptNode= createExceptionTag(info.getElement().getElementName());
 						insertTag(excptNode, previousTag, tagsRewrite);
 						previousTag= excptNode;
 					} else {
@@ -2344,7 +2345,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 								final ITypeBinding infoBinding= info.getTypeBinding();
 								if (infoBinding != null && Bindings.equals(infoBinding, nameBinding))
 									process= true;
-								else if (info.getType().getElementName().equals(nameBinding.getName()))
+								else if (info.getElement().getElementName().equals(nameBinding.getName()))
 									process= true;
 								if (process) {
 									tagIter.remove();
@@ -2728,7 +2729,7 @@ public class ChangeSignatureProcessor extends RefactoringProcessor implements ID
 					return JavaRefactoringDescriptorUtil.createInputFatalStatus(element, getProcessorName(), IJavaRefactorings.CHANGE_METHOD_SIGNATURE);
 				else {
 					try {
-						info= new ExceptionInfo((IType) element, Integer.valueOf(kind).intValue(), null);
+						info= new ExceptionInfo(element, Integer.valueOf(kind).intValue(), null);
 					} catch (NumberFormatException exception) {
 						return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { kind, ATTRIBUTE_KIND }));
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java
index aef71dc..7b901fb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeTypeRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -75,7 +76,6 @@ import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatur
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.CollectingSearchRequestor;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/CompilationUnitRewrite.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/CompilationUnitRewrite.java
index 49f288c..dbbea57 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/CompilationUnitRewrite.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/CompilationUnitRewrite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -177,17 +177,40 @@ public class CompilationUnitRewrite {
 	 * Creates a compilation unit change based on the events recorded by this compilation unit
 	 * rewrite.
 	 * 
+	 * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code> otherwise
 	 * @return a {@link CompilationUnitChange}, or <code>null</code> for an empty change
 	 * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails
 	 * @throws IllegalArgumentException when the AST rewrite encounters problems
+	 * @since 3.6
 	 */
-	public CompilationUnitChange createChange() throws CoreException {
-		return createChange(true, null);
+	public CompilationUnitChange createChange(boolean generateGroups) throws CoreException {
+		return createChange(generateGroups, null);
 	}
 
 	/**
-	 * Creates a compilation unit change based on the events recorded by this compilation unit rewrite.
-	 * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code> otherwise
+	 * Creates a compilation unit change based on the events recorded by this compilation unit
+	 * rewrite.
+	 * <p>
+	 * DO NOT REMOVE, used in a product.</p>
+	 * 
+	 * @return a {@link org.eclipse.jdt.core.refactoring.CompilationUnitChange}, or <code>null</code> for an empty change
+	 * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails
+	 * @throws IllegalArgumentException when the AST rewrite encounters problems
+	 * @deprecated since 3.5, replaced by {@link #createChange(boolean)}
+	 */
+	public org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange createChange() throws CoreException {
+		CompilationUnitChange change= createChange(true);
+		if (change == null)
+			return null;
+		return new org.eclipse.jdt.internal.corext.refactoring.changes.CompilationUnitChange(change);
+	}
+
+	/**
+	 * Creates a compilation unit change based on the events recorded by this compilation unit
+	 * rewrite.
+	 * 
+	 * @param generateGroups <code>true</code> to generate text edit groups, <code>false</code>
+	 *            otherwise
 	 * @param monitor the progress monitor or <code>null</code>
 	 * @return a {@link CompilationUnitChange}, or <code>null</code> for an empty change
 	 * @throws CoreException when text buffer acquisition or import rewrite text edit creation fails
@@ -315,7 +338,10 @@ public class CompilationUnitRewrite {
 		if (fImportRewrite == null) {
 			// lazily initialized to avoid lengthy processing in checkInitialConditions(..)
 			try {
-				if (fRoot == null) {
+				/* If bindings are to be resolved, then create the AST, so that
+				 * ImportRewrite#setUseContextToFilterImplicitImports(boolean) will be set to true
+				 * and ContextSensitiveImportRewriteContext etc. can be used. */
+				if (fRoot == null && ! fResolveBindings) {
 					fImportRewrite= StubUtility.createImportRewrite(fCu, true);
 				} else {
 					fImportRewrite= StubUtility.createImportRewrite(getRoot(), true);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractClassRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractClassRefactoring.java
index 89bf573..fb80b42 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractClassRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractClassRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -83,7 +84,6 @@ import org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.TypeBindingVisitor;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java
index f242f42..ea2d6be 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractInterfaceProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,6 +78,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Type;
@@ -95,7 +96,6 @@ import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -128,6 +128,7 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Refactoring processor to extract interfaces.
  */
@@ -171,6 +172,9 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 	/** Should extracted methods be declared as abstract? */
 	private boolean fAbstract= true;
 
+	/** Should override annotations be generated? */
+	private boolean fAnnotations= false;
+
 	/** The text edit based change manager */
 	private TextEditBasedChangeManager fChangeManager= null;
 
@@ -425,7 +429,7 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 				if (fReplace)
 					rewriteTypeOccurrences(manager, sourceRewrite, copy, replacements, status, new SubProgressMonitor(monitor, 220));
 				createMethodComments(sourceRewrite, replacements);
-				manager.manage(fSubType.getCompilationUnit(), sourceRewrite.createChange());
+				manager.manage(fSubType.getCompilationUnit(), sourceRewrite.createChange(true));
 			}
 			return manager;
 		} finally {
@@ -592,14 +596,25 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 	protected final void createMethodComments(final CompilationUnitRewrite sourceRewrite, final Set replacements) throws CoreException {
 		Assert.isNotNull(sourceRewrite);
 		Assert.isNotNull(replacements);
-		if (fComments && fMembers.length > 0) {
-			final IJavaProject project= fSubType.getJavaProject();
-			final boolean javadoc= project.getOption(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, true).equals(JavaCore.ENABLED);
+		if (fMembers.length > 0 && (fAnnotations || fComments)) {
+			IJavaProject project= fSubType.getJavaProject();
+			boolean annotations= fAnnotations && !JavaModelUtil.isVersionLessThan(project.getOption(JavaCore.COMPILER_SOURCE, true), JavaCore.VERSION_1_6);
+			boolean javadoc= project.getOption(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, true).equals(JavaCore.ENABLED);
 			IMember member= null;
 			for (int index= 0; index < fMembers.length; index++) {
 				member= fMembers[index];
-				if (member instanceof IMethod)
-					createMethodComment(sourceRewrite, ASTNodeSearchUtil.getMethodDeclarationNode((IMethod) member, sourceRewrite.getRoot()), replacements, javadoc);
+				if (member instanceof IMethod) {
+					MethodDeclaration declaration= ASTNodeSearchUtil.getMethodDeclarationNode((IMethod) member, sourceRewrite.getRoot());
+					if (annotations) {
+						ASTRewrite rewrite= sourceRewrite.getASTRewrite();
+						AST ast= rewrite.getAST();
+						Annotation marker= ast.newMarkerAnnotation();
+						marker.setTypeName(ast.newSimpleName("Override")); //$NON-NLS-1$
+						rewrite.getListRewrite(declaration, MethodDeclaration.MODIFIERS2_PROPERTY).insertFirst(marker, null);
+					}
+					if (fComments)
+						createMethodComment(sourceRewrite, declaration, replacements, javadoc);
+				}
 			}
 		}
 	}
@@ -841,6 +856,15 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 		return fSuperName;
 	}
 
+	/**
+	 * Should override annotations be generated?
+	 * 
+	 * @return <code>true</code> if annotations should be generated, <code>false</code> otherwise
+	 */
+	public final boolean isAnnotations() {
+		return fAnnotations;
+	}
+
 	private RefactoringStatus initialize(JavaRefactoringArguments extended) {
 		String handle= extended.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);
 		if (handle != null) {
@@ -998,7 +1022,7 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 				}
 			}
 			if (!isSubUnit) {
-				final TextChange change= currentRewrite.createChange();
+				final TextChange change= currentRewrite.createChange(true);
 				if (change != null)
 					manager.manage(unit, change);
 			}
@@ -1132,6 +1156,15 @@ public final class ExtractInterfaceProcessor extends SuperTypeRefactoringProcess
 	}
 
 	/**
+	 * Determines whether override annotations should be generated.
+	 * 
+	 * @param annotations <code>true</code> to generate override annotations, <code>false</code> otherwise
+	 */
+	public final void setAnnotations(final boolean annotations) {
+		fAnnotations= annotations;
+	}
+
+	/**
 	 * Determines whether comments should be generated.
 	 *
 	 * @param comments
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java
index 874be81..a017e9c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ExtractSupertypeProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,14 +73,16 @@ import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.formatter.CodeFormatter;
-import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.ExtractSuperclassDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
@@ -106,6 +108,7 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Refactoring processor for the extract supertype refactoring.
  *
@@ -392,7 +395,7 @@ public final class ExtractSupertypeProcessor extends PullUpRefactoringProcessor
 			final CompilationUnitRewrite rewrite= new CompilationUnitRewrite(fOwner, unit, root);
 			createTypeSignature(rewrite, subDeclaration, extractedType, extractedBinding, new NullProgressMonitor());
 			final Document document= new Document(unit.getBuffer().getContents());
-			final CompilationUnitChange change= rewrite.createChange();
+			final CompilationUnitChange change= rewrite.createChange(true);
 			if (change != null) {
 				fLayerChanges.put(unit.getPrimary(), change);
 				final TextEdit edit= change.getEdit();
@@ -450,7 +453,9 @@ public final class ExtractSupertypeProcessor extends PullUpRefactoringProcessor
 						if (!curr.isDeprecated() || createDeprecated) {
 							MethodDeclaration stub;
 							try {
-								stub= StubUtility2.createConstructorStub(targetRewrite.getCu(), targetRewrite.getASTRewrite(), targetRewrite.getImportRewrite(), curr, binding.getName(), Modifier.PUBLIC, false, false, fSettings);
+								ImportRewriteContext context= new ContextSensitiveImportRewriteContext(targetDeclaration, targetRewrite.getImportRewrite());
+								stub= StubUtility2.createConstructorStub(targetRewrite.getCu(), targetRewrite.getASTRewrite(), targetRewrite.getImportRewrite(), context, curr, binding.getName(),
+										Modifier.PUBLIC, false, false, fSettings);
 								if (stub != null)
 									rewrite.insertLast(stub, null);
 							} catch (CoreException exception) {
@@ -613,7 +618,7 @@ public final class ExtractSupertypeProcessor extends PullUpRefactoringProcessor
 			createTypeParameters(targetRewrite, superType, declaringDeclaration, targetDeclaration);
 			createTypeSignature(targetRewrite, superType, declaringDeclaration, targetDeclaration);
 			createNecessaryConstructors(targetRewrite, superType, targetDeclaration, status);
-			final TextEdit edit= targetRewrite.createChange().getEdit();
+			final TextEdit edit= targetRewrite.createChange(true).getEdit();
 			try {
 				edit.apply(document, TextEdit.UPDATE_REGIONS);
 			} catch (MalformedTreeException exception) {
@@ -1100,7 +1105,7 @@ public final class ExtractSupertypeProcessor extends PullUpRefactoringProcessor
 				if (unit.equals(extractedUnit)) {
 					rewrite= (CompilationUnitRewrite) fCompilationUnitRewrites.get(unit);
 					if (rewrite != null) {
-						CompilationUnitChange change= rewrite.createChange();
+						CompilationUnitChange change= rewrite.createChange(true);
 
 						if (change != null) {
 							final TextEdit edit= ((TextChange) change).getEdit();
@@ -1122,7 +1127,7 @@ public final class ExtractSupertypeProcessor extends PullUpRefactoringProcessor
 					rewrite= (CompilationUnitRewrite) fCompilationUnitRewrites.get(unit);
 					if (rewrite != null) {
 						final CompilationUnitChange layerChange= (CompilationUnitChange) fLayerChanges.get(unit.getPrimary());
-						final CompilationUnitChange rewriteChange= rewrite.createChange();
+						final CompilationUnitChange rewriteChange= rewrite.createChange(true);
 						if (rewriteChange != null && layerChange != null) {
 							final MultiStateCompilationUnitChange change= new MultiStateCompilationUnitChange(rewriteChange.getName(), unit);
 							change.addChange(layerChange);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ImportRewriteUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ImportRewriteUtil.java
index 7c5a005..7a510e9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ImportRewriteUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ImportRewriteUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.ImportReferencesCollector;
 
@@ -41,26 +42,28 @@ public final class ImportRewriteUtil {
 	 * Adds the necessary imports for an AST node to the specified compilation unit.
 	 *
 	 * @param rewrite the compilation unit rewrite whose compilation unit's imports should be updated
+	 * @param context the import rewrite context, or <code>null</code> if none available
 	 * @param node the AST node specifying the element for which imports should be added
 	 * @param typeImports the map of name nodes to strings (element type: Map <Name, String>).
 	 * @param staticImports the map of name nodes to strings (element type: Map <Name, String>).
 	 * @param declarations <code>true</code> if method declarations are treated as abstract, <code>false</code> otherwise
 	 */
-	public static void addImports(final CompilationUnitRewrite rewrite, final ASTNode node, final Map typeImports, final Map staticImports, final boolean declarations) {
-		addImports(rewrite, node, typeImports, staticImports, null, declarations);
+	public static void addImports(final CompilationUnitRewrite rewrite, ImportRewriteContext context, final ASTNode node, final Map typeImports, final Map staticImports, final boolean declarations) {
+		addImports(rewrite, context, node, typeImports, staticImports, null, declarations);
 	}
 
 	/**
 	 * Adds the necessary imports for an AST node to the specified compilation unit.
 	 *
 	 * @param rewrite the compilation unit rewrite whose compilation unit's imports should be updated
+	 * @param context the import rewrite context, or <code>null</code> if none available
 	 * @param node the AST node specifying the element for which imports should be added
 	 * @param typeImports the map of name nodes to strings (element type: Map <Name, String>).
 	 * @param staticImports the map of name nodes to strings (element type: Map <Name, String>).
 	 * @param excludeBindings the set of bindings to exclude (element type: Set <IBinding>).
 	 * @param declarations <code>true</code> if method declarations are treated as abstract, <code>false</code> otherwise
 	 */
-	public static void addImports(final CompilationUnitRewrite rewrite, final ASTNode node, final Map typeImports, final Map staticImports, final Collection excludeBindings, final boolean declarations) {
+	public static void addImports(final CompilationUnitRewrite rewrite, ImportRewriteContext context, final ASTNode node, final Map typeImports, final Map staticImports, final Collection excludeBindings, final boolean declarations) {
 		Assert.isNotNull(rewrite);
 		Assert.isNotNull(node);
 		Assert.isNotNull(typeImports);
@@ -80,7 +83,7 @@ public final class ImportRewriteUtil {
 			if (binding instanceof ITypeBinding) {
 				final ITypeBinding type= (ITypeBinding) binding;
 				if (excludeBindings == null || !excludeBindings.contains(type)) {
-					typeImports.put(name, rewriter.addImport(type));
+					typeImports.put(name, rewriter.addImport(type, context));
 					remover.registerAddedImport(((SimpleName)name).getIdentifier());
 				}
 			}
@@ -92,14 +95,14 @@ public final class ImportRewriteUtil {
 				final IVariableBinding variable= (IVariableBinding) binding;
 				final ITypeBinding declaring= variable.getDeclaringClass();
 				if (declaring != null && (excludeBindings == null || !excludeBindings.contains(variable))) {
-					staticImports.put(name, rewriter.addStaticImport(variable));
+					staticImports.put(name, rewriter.addStaticImport(variable, context));
 					remover.registerAddedStaticImport(declaring.getQualifiedName(), variable.getName(), true);
 				}
 			} else if (binding instanceof IMethodBinding) {
 				final IMethodBinding method= (IMethodBinding) binding;
 				final ITypeBinding declaring= method.getDeclaringClass();
 				if (declaring != null && (excludeBindings == null || !excludeBindings.contains(method))) {
-					staticImports.put(name, rewriter.addStaticImport(method));
+					staticImports.put(name, rewriter.addStaticImport(method, context));
 					remover.registerAddedStaticImport(declaring.getQualifiedName(), method.getName(), false);
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IntroduceParameterObjectProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IntroduceParameterObjectProcessor.java
index cac0ef9..f95c492 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IntroduceParameterObjectProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IntroduceParameterObjectProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,6 +56,7 @@ import org.eclipse.jdt.core.dom.Message;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
@@ -68,14 +69,15 @@ import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.descriptors.IntroduceParameterObjectDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.IntroduceParameterObjectDescriptor.Parameter;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.TypeBindingVisitor;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
@@ -100,6 +102,7 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 			ClassInstanceCreation classCreation= ast.newClassInstanceCreation();
 
 			int startPosition= enclosingMethod != null ? enclosingMethod.getStartPosition() : cuRewrite.getRoot().getStartPosition();
+			ContextSensitiveImportRewriteContext context= fParameterObjectFactory.createParameterClassAwareContext(fCreateAsTopLevel, cuRewrite, startPosition);
 			classCreation.setType(fParameterObjectFactory.createType(fCreateAsTopLevel, cuRewrite, startPosition));
 			List constructorArguments= classCreation.arguments();
 			for (Iterator iter= parameterInfos.iterator(); iter.hasNext();) {
@@ -107,10 +110,10 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 				if (isValidField(pi)) {
 					if (pi.isOldVarargs()) {
 						boolean isLastParameter= !iter.hasNext();
-						constructorArguments.addAll(computeVarargs(invocationArguments, pi, isLastParameter, cuRewrite));
+						constructorArguments.addAll(computeVarargs(invocationArguments, pi, isLastParameter, cuRewrite, context));
 					} else {
 						Expression exp= (Expression) invocationArguments.get(pi.getOldIndex());
-						importNodeTypes(exp, cuRewrite);
+						importNodeTypes(exp, cuRewrite, context);
 						constructorArguments.add(moveNode(exp, rewrite));
 					}
 				}
@@ -139,7 +142,7 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 			return true;
 		}
 
-		private List computeVarargs(List invocationArguments, ParameterInfo varArgPI, boolean isLastParameter, CompilationUnitRewrite cuRewrite) {
+		private List computeVarargs(List invocationArguments, ParameterInfo varArgPI, boolean isLastParameter, CompilationUnitRewrite cuRewrite, ContextSensitiveImportRewriteContext context) {
 			boolean isEmptyVarArg= varArgPI.getOldIndex() >= invocationArguments.size();
 			ASTRewrite rewrite= cuRewrite.getASTRewrite();
 			AST ast= cuRewrite.getAST();
@@ -157,7 +160,7 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 				// copy all varargs
 				for (int i= varArgPI.getOldIndex(); i < invocationArguments.size(); i++) {
 					ASTNode node= (ASTNode) invocationArguments.get(i);
-					importNodeTypes(node, cuRewrite);
+					importNodeTypes(node, cuRewrite, context);
 					constructorArguments.add(moveNode(node, rewrite));
 				}
 			} else { // new signature would be String...args, int
@@ -166,12 +169,12 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 					constructorArguments.add(moveNode(nullLiteral, rewrite));
 				} else {
 					ArrayCreation creation= ast.newArrayCreation();
-					creation.setType((ArrayType) importBinding(varArgPI.getNewTypeBinding(), cuRewrite));
+					creation.setType((ArrayType) importBinding(varArgPI.getNewTypeBinding(), cuRewrite, context));
 					ArrayInitializer initializer= ast.newArrayInitializer();
 					List expressions= initializer.expressions();
 					for (int i= varArgPI.getOldIndex(); i < invocationArguments.size(); i++) {
 						ASTNode node= (ASTNode) invocationArguments.get(i);
-						importNodeTypes(node, cuRewrite);
+						importNodeTypes(node, cuRewrite, context);
 						expressions.add(moveNode(node, rewrite));
 					}
 					if (expressions.isEmpty())
@@ -184,16 +187,16 @@ public class IntroduceParameterObjectProcessor extends ChangeSignatureProcessor
 			return constructorArguments;
 		}
 
-		public Type importBinding(ITypeBinding newTypeBinding, CompilationUnitRewrite cuRewrite) {
-			Type type= cuRewrite.getImportRewrite().addImport(newTypeBinding, cuRewrite.getAST());
+		public Type importBinding(ITypeBinding newTypeBinding, CompilationUnitRewrite cuRewrite, ImportRewriteContext context) {
+			Type type= cuRewrite.getImportRewrite().addImport(newTypeBinding, cuRewrite.getAST(), context);
 			cuRewrite.getImportRemover().registerAddedImports(type);
 			return type;
 		}
 
-		private void importNodeTypes(ASTNode node, final CompilationUnitRewrite cuRewrite) {
+		private void importNodeTypes(ASTNode node, final CompilationUnitRewrite cuRewrite, final ImportRewriteContext context) {
 			ASTResolving.visitAllBindings(node, new TypeBindingVisitor() {
 				public boolean visit(ITypeBinding nodeBinding) {
-					importBinding(nodeBinding, cuRewrite);
+					importBinding(nodeBinding, cuRewrite, context);
 					return false;
 				}
 			});
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java
index 1bb790e..d8bf706 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -512,7 +512,7 @@ public final class MemberVisibilityAdjustor {
 		final ModifierKeyword threshold= getVisibilityThreshold(element, referencedMovedElement, monitor);
 		int flags= referencedMovedElement.getFlags();
 		IType declaring= referencedMovedElement.getDeclaringType();
-		if (declaring.isInterface() || referencedMovedElement instanceof IField && Flags.isEnum(referencedMovedElement.getFlags()))
+		if (declaring != null && declaring.isInterface() || referencedMovedElement instanceof IField && Flags.isEnum(referencedMovedElement.getFlags()))
 			return;
 		if (hasLowerVisibility(flags, threshold == null ? Modifier.NONE : threshold.toFlagValue()) && needsVisibilityAdjustment(referencedMovedElement, threshold))
 			fAdjustments.put(referencedMovedElement, new IncomingMemberVisibilityAdjustment(referencedMovedElement, threshold, RefactoringStatus.createStatus(fVisibilitySeverity, Messages.format(getMessage(referencedMovedElement), new String[] { getLabel(referencedMovedElement), getLabel(threshold)}), JavaStatusContext.create(referencedMovedElement), null, RefactoringStatusEntry.NO_CODE, null)));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java
index 3d71b75..a1ae0c6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInnerToTopRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,6 +71,7 @@ import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.QualifiedName;
@@ -86,7 +87,6 @@ import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
-import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
@@ -136,6 +136,7 @@ import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 
+
 public final class MoveInnerToTopRefactoring extends Refactoring {
 
 	private static final String ATTRIBUTE_FIELD= "field"; //$NON-NLS-1$
@@ -523,7 +524,7 @@ public final class MoveInnerToTopRefactoring extends Refactoring {
 		fQualifiedTypeName= JavaModelUtil.concatenateName(fType.getPackageFragment().getElementName(), fType.getElementName());
 		fEnclosingInstanceFieldName= getInitialNameForEnclosingInstanceField();
 		fSourceRewrite= new CompilationUnitRewrite(fType.getCompilationUnit());
-		fIsInstanceFieldCreationPossible= !(JdtFlags.isStatic(fType) || fType.isAnnotation() || fType.isEnum());
+		fIsInstanceFieldCreationPossible= !(JdtFlags.isStatic(fType) || fType.isAnnotation() || fType.isEnum() || (fType.getDeclaringType() == null && !JavaElementUtil.isMainType(fType)));
 		fIsInstanceFieldCreationMandatory= fIsInstanceFieldCreationPossible && isInstanceFieldCreationMandatory();
 		fCreateInstanceField= fIsInstanceFieldCreationMandatory;
 	}
@@ -732,8 +733,9 @@ public final class MoveInnerToTopRefactoring extends Refactoring {
 
 	private RefactoringStatus checkTypeNameInPackage() throws JavaModelException {
 		IType type= Checks.findTypeInPackage(fType.getPackageFragment(), fType.getElementName());
-		if (type == null || !type.exists())
+		if (type == null || !type.exists() || fType.equals(type)) {
 			return null;
+		}
 		String message= Messages.format(RefactoringCoreMessages.MoveInnerToTopRefactoring_type_exists, new String[] { BasicElementLabels.getJavaElementName(fType.getElementName()), JavaElementLabels.getElementLabel(fType.getPackageFragment(), JavaElementLabels.ALL_DEFAULT)});
 		return RefactoringStatus.createErrorStatus(message);
 	}
@@ -834,7 +836,7 @@ public final class MoveInnerToTopRefactoring extends Refactoring {
 					createCompilationUnitRewrite(bindings, targetRewrite, typeReferences, constructorReferences, adjustor.getAdjustments().containsKey(fType), inputCU, unit, true, status, monitor);
 				}
 				adjustor.rewriteVisibility(targetRewrite.getCu(), new SubProgressMonitor(monitor, 1));
-				manager.manage(unit, targetRewrite.createChange());
+				manager.manage(unit, targetRewrite.createChange(true));
 			}
 			if (fNewSourceOfInputType == null) {
 				fNewSourceOfInputType= createNewSource(fSourceRewrite, inputCU);
@@ -1022,7 +1024,7 @@ public final class MoveInnerToTopRefactoring extends Refactoring {
 	private String createNewSource(final CompilationUnitRewrite targetRewrite, final ICompilationUnit unit) throws CoreException, JavaModelException {
 		Assert.isNotNull(targetRewrite);
 		Assert.isNotNull(unit);
-		TextChange change= targetRewrite.createChange();
+		TextChange change= targetRewrite.createChange(true);
 		if (change == null)
 			change= new CompilationUnitChange("", unit); //$NON-NLS-1$
 		final String source= change.getPreviewContent(new NullProgressMonitor());
@@ -1060,7 +1062,10 @@ public final class MoveInnerToTopRefactoring extends Refactoring {
 			monitor.beginTask("", 2); //$NON-NLS-1$
 			final String separator= StubUtility.getLineDelimiterUsed(fType.getJavaProject());
 			final String block= getAlignedSourceBlock(unit, fNewSourceOfInputType);
-			String content= CodeGeneration.getCompilationUnitContent(unit, null, block, separator);
+			String fileComment= null;
+			if (StubUtility.doAddComments(unit.getJavaProject()))
+				fileComment= CodeGeneration.getFileComment(unit, separator);
+			String content= CodeGeneration.getCompilationUnitContent(unit, fileComment, null, block, separator);
 			if (content == null || block.startsWith("/*") || block.startsWith("//")) { //$NON-NLS-1$//$NON-NLS-2$
 				final StringBuffer buffer= new StringBuffer();
 				if (!fType.getPackageFragment().isDefaultPackage()) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java
index 8875e75..a7ce694 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveInstanceMethodProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,7 @@ import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeHierarchy;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTVisitor;
@@ -113,7 +114,6 @@ import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchPattern;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
@@ -153,6 +153,7 @@ import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 
+
 /**
  * Refactoring processor to move instance methods.
  */
@@ -1189,7 +1190,10 @@ public final class MoveInstanceMethodProcessor extends MoveProcessor implements
 			IMethod method= null;
 			for (int index= 0; index < methods.length; index++) {
 				method= methods[index];
-				if (method.getElementName().equals(fMethodName) && method.getParameterTypes().length == fMethod.getParameterTypes().length - 1)
+				int newParamCount= fMethod.getParameterTypes().length;
+				if (needsTargetNode())
+					newParamCount--;
+				if (method.getElementName().equals(fMethodName) && method.getParameterTypes().length == newParamCount)
 					status.merge(RefactoringStatus.createErrorStatus(Messages.format(RefactoringCoreMessages.MoveInstanceMethodProcessor_method_already_exists, new String[] { BasicElementLabels.getJavaElementName(fMethodName), BasicElementLabels.getJavaElementName(fTargetType.getElementName()) }), JavaStatusContext.create(method)));
 				monitor.worked(1);
 			}
@@ -1809,7 +1813,7 @@ public final class MoveInstanceMethodProcessor extends MoveProcessor implements
 			for (final Iterator iterator= rewrites.keySet().iterator(); iterator.hasNext();) {
 				unit= (ICompilationUnit) iterator.next();
 				rewrite= (CompilationUnitRewrite) rewrites.get(unit);
-				manager.manage(unit, rewrite.createChange());
+				manager.manage(unit, rewrite.createChange(true));
 			}
 			return manager;
 		} finally {
@@ -2385,7 +2389,7 @@ public final class MoveInstanceMethodProcessor extends MoveProcessor implements
 		monitor.beginTask("", 1); //$NON-NLS-1$
 		monitor.setTaskName(RefactoringCoreMessages.MoveInstanceMethodProcessor_creating);
 		try {
-			ImportRewriteUtil.addImports(rewrite, declaration, new HashMap(), new HashMap(), false);
+			ImportRewriteUtil.addImports(rewrite, null, declaration, new HashMap(), new HashMap(), false);
 		} finally {
 			monitor.done();
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMemberAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMemberAnalyzer.java
index 30fc01c..1dc04a6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMemberAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMemberAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,9 @@ import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTFlattener;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -73,7 +75,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 
 	protected void rewrite(SimpleName node, ITypeBinding type) {
 		AST ast= node.getAST();
-		Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, fCuRewrite.getImportRewrite());
+		Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 		fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 		Name dummy= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 		QualifiedName name= ast.newQualifiedName(dummy, ast.newSimpleName(node.getIdentifier()));
@@ -91,7 +94,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 	protected void rewrite(FieldAccess node, ITypeBinding type) {
 		Expression exp= node.getExpression();
 		if (exp == null) {
-			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, fCuRewrite.getImportRewrite());
+			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 			fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 			exp= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 			fCuRewrite.getASTRewrite().set(node, FieldAccess.EXPRESSION_PROPERTY, exp,  fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
@@ -107,7 +111,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 	protected void rewrite(MethodInvocation node, ITypeBinding type) {
 		Expression exp= node.getExpression();
 		if (exp == null) {
-			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, fCuRewrite.getImportRewrite());
+			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 			fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 			exp= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 			fCuRewrite.getASTRewrite().set(node, MethodInvocation.EXPRESSION_PROPERTY, exp, fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
@@ -123,7 +128,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 	protected void rewrite(MemberRef node, ITypeBinding type) {
 		Name qualifier= node.getQualifier();
 		if (qualifier == null) {
-			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, fCuRewrite.getImportRewrite());
+			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 			fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 			qualifier= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 			fCuRewrite.getASTRewrite().set(node, MemberRef.QUALIFIER_PROPERTY, qualifier, fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
@@ -137,7 +143,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 	protected void rewrite(MethodRef node, ITypeBinding type) {
 		Name qualifier= node.getQualifier();
 		if (qualifier == null) {
-			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(node, fCuRewrite.getImportRewrite());
+			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 			fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 			qualifier= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 			fCuRewrite.getASTRewrite().set(node, MethodRef.QUALIFIER_PROPERTY, qualifier, fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
@@ -163,7 +170,8 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 				fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
 			fCuRewrite.getImportRemover().registerRemovedNode(name);
 		} else {
-			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST());
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(name, fCuRewrite.getImportRewrite());
+			Type result= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
 			fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 			Name n= ASTNodeFactory.newName(fCuRewrite.getAST(), ASTFlattener.asString(result));
 			fCuRewrite.getASTRewrite().replace(
@@ -176,7 +184,9 @@ import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 	}
 
 	private void rewriteExpression(ASTNode node, Expression exp, ITypeBinding type) {
-		fCuRewrite.getASTRewrite().replace(exp, fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST()), fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(exp, fCuRewrite.getImportRewrite());
+		Type typeNode= fCuRewrite.getImportRewrite().addImport(type, fCuRewrite.getAST(), context);
+		fCuRewrite.getASTRewrite().replace(exp, typeNode, fCuRewrite.createGroupDescription(REFERENCE_UPDATE));
 		fCuRewrite.getImportRemover().registerAddedImport(type.getQualifiedName());
 		fCuRewrite.getImportRemover().registerRemovedNode(exp);
 		fNeedsImport= true;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMembersProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMembersProcessor.java
index cc58872..83604a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMembersProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/MoveStaticMembersProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,12 +74,14 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.MoveStaticMembersDescriptor;
@@ -90,9 +92,9 @@ import org.eclipse.jdt.core.search.SearchPattern;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.CollectingSearchRequestor;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
@@ -126,6 +128,7 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 public final class MoveStaticMembersProcessor extends MoveProcessor implements IDelegateUpdating {
 
 	private static final String ATTRIBUTE_DELEGATE="delegate"; //$NON-NLS-1$
@@ -793,13 +796,13 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 					return;
 				}
 				if (!(fSource.getCu().equals(unit) || fTarget.getCu().equals(unit)))
-					fChange.add(rewrite.createChange());
+					fChange.add(rewrite.createChange(true));
 			}
 			status.merge(moveMembers(fMemberDeclarations, memberSources));
-			fChange.add(fSource.createChange());
+			fChange.add(fSource.createChange(true));
 			modifiedCus.add(fSource.getCu());
 			if (!fSource.getCu().equals(fTarget.getCu())) {
-				fChange.add(fTarget.createChange());
+				fChange.add(fTarget.createChange(true));
 				modifiedCus.add(fTarget.getCu());
 			}
 			monitor.worked(1);
@@ -850,6 +853,14 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 		return new CompilationUnitRewrite(unit);
 	}
 
+	private AbstractTypeDeclaration getDestinationNode() throws JavaModelException {
+		AbstractTypeDeclaration destination= (AbstractTypeDeclaration)
+				ASTNodes.getParent(
+						NodeFinder.perform(fTarget.getRoot(), fDestinationType.getNameRange()),
+						AbstractTypeDeclaration.class);
+		return destination;
+	}
+
 	private ITypeBinding getDestinationBinding() throws JavaModelException {
 		ASTNode node= NodeFinder.perform(fTarget.getRoot(), fDestinationType.getNameRange());
 		if (!(node instanceof SimpleName))
@@ -897,13 +908,14 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 				}
 			}
 		}
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(getDestinationNode(), fTarget.getImportRewrite());
 		for (int i= 0; i < members.length; i++) {
 			BodyDeclaration declaration= members[i];
 			if (isSourceNotTarget)
 				typeRefs.addAll(TypeReferenceFinder.perform(declaration));
 			MovedMemberAnalyzer analyzer= new MovedMemberAnalyzer(fSource, fMemberBindings, fSourceBinding, target);
 			declaration.accept(analyzer);
-			ImportRewriteUtil.addImports(fTarget, declaration, new HashMap(), new HashMap(), exclude, false);
+			ImportRewriteUtil.addImports(fTarget, context, declaration, new HashMap(), new HashMap(), exclude, false);
 			if (getDeclaringType().isInterface() && !fDestinationType.isInterface()) {
 				if (declaration instanceof FieldDeclaration) {
 					FieldDeclaration fieldDecl= (FieldDeclaration) declaration;
@@ -926,12 +938,12 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 		}
 		// Adjust imports
 		if (targetNeedsSourceImport && isSourceNotTarget) {
-			fTarget.getImportRewrite().addImport(fSourceBinding);
+			fTarget.getImportRewrite().addImport(fSourceBinding, context);
 		}
 		if (isSourceNotTarget) {
 			for (Iterator iter= typeRefs.iterator(); iter.hasNext();) {
 				ITypeBinding binding= (ITypeBinding) iter.next();
-				fTarget.getImportRewrite().addImport(binding);
+				fTarget.getImportRewrite().addImport(binding, context);
 			}
 		}
 		// extract updated members
@@ -953,10 +965,7 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 
 	private RefactoringStatus moveMembers(BodyDeclaration[] members, String[] sources) throws CoreException {
 		RefactoringStatus result= new RefactoringStatus();
-		AbstractTypeDeclaration destination= (AbstractTypeDeclaration)
-		ASTNodes.getParent(
-			NodeFinder.perform(fTarget.getRoot(), fDestinationType.getNameRange()),
-			AbstractTypeDeclaration.class);
+		AbstractTypeDeclaration destination= getDestinationNode();
 		ListRewrite containerRewrite= fTarget.getASTRewrite().getListRewrite(destination, destination.getBodyDeclarationsProperty());
 
 		TextEditGroup delete= fSource.createGroupDescription(RefactoringCoreMessages.MoveMembersRefactoring_deleteMembers);
@@ -1104,8 +1113,8 @@ public final class MoveStaticMembersProcessor extends MoveProcessor implements I
 
 	public String getDelegateUpdatingTitle(boolean plural) {
 		if (plural)
-			return RefactoringCoreMessages.DelegateMethodCreator_keep_original_moved_plural;
+			return RefactoringCoreMessages.DelegateMethodCreator_keep_original_moved_plural_member;
 		else
-			return RefactoringCoreMessages.DelegateMethodCreator_keep_original_moved_singular;
+			return RefactoringCoreMessages.DelegateMethodCreator_keep_original_moved_singular_member;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ParameterObjectFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ParameterObjectFactory.java
index 361ad09..77250a7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ParameterObjectFactory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ParameterObjectFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,6 +62,7 @@ import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
@@ -458,20 +459,37 @@ public class ParameterObjectFactory {
 	}
 
 	public Type createType(boolean asTopLevelClass, CompilationUnitRewrite cuRewrite, int position) {
-		String concatenateName= null;
-		if (asTopLevelClass) {
-			concatenateName= JavaModelUtil.concatenateName(fPackage, fClassName);
-		} else {
-			concatenateName= JavaModelUtil.concatenateName(fEnclosingType, fClassName);
-		}
+		String qualifier= asTopLevelClass ? fPackage : fEnclosingType;
+		String concatenateName= JavaModelUtil.concatenateName(qualifier, fClassName);
+		
 		ImportRewrite importRewrite= cuRewrite.getImportRewrite();
-		ContextSensitiveImportRewriteContext context= new ContextSensitiveImportRewriteContext(cuRewrite.getRoot(), position, importRewrite);
+		ContextSensitiveImportRewriteContext context= createParameterClassAwareContext(asTopLevelClass, cuRewrite, position);
 		String addedImport= importRewrite.addImport(concatenateName, context);
 		cuRewrite.getImportRemover().registerAddedImport(addedImport);
 		AST ast= cuRewrite.getAST();
 		return ast.newSimpleType(ast.newName(addedImport));
 	}
 
+	ContextSensitiveImportRewriteContext createParameterClassAwareContext(final boolean asTopLevelClass, final CompilationUnitRewrite cuRewrite, int position) {
+		ContextSensitiveImportRewriteContext context= new ContextSensitiveImportRewriteContext(cuRewrite.getRoot(), position, cuRewrite.getImportRewrite()) {
+			public int findInContext(String qualifier, String name, int kind) {
+				String parameterClassName= getClassName();
+				if (kind == ImportRewriteContext.KIND_TYPE && parameterClassName.equals(name)) {
+					String parameterClassQualifier= asTopLevelClass ? getPackage() : getEnclosingType();
+					if (super.findInContext(qualifier, "", kind) == ImportRewriteContext.RES_NAME_FOUND) { //$NON-NLS-1$ // TODO: should be "*", not " "!
+						if (parameterClassQualifier.equals(qualifier)) {
+							return ImportRewriteContext.RES_NAME_FOUND;
+						} else {
+							return ImportRewriteContext.RES_NAME_CONFLICT;
+						}
+					}
+				}
+				return super.findInContext(qualifier, name, kind);
+			}
+		};
+		return context;
+	}
+
 	public String getClassName() {
 		return fClassName;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java
index aca639d..737b705 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PullUpRefactoringProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,6 +81,7 @@ import org.eclipse.jdt.core.dom.MarkerAnnotation;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SuperFieldAccess;
@@ -90,20 +91,21 @@ import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
-import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
+import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.PullUpDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.ModifierRewrite;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -500,7 +502,8 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 		copyParameters(rewriter.getASTRewrite(), getDeclaringType().getCompilationUnit(), methodToCreateStubFor, newMethod, mapping);
 		copyThrownExceptions(methodToCreateStubFor, newMethod);
 		newMethod.setJavadoc(createJavadocForStub(typeToCreateStubIn.getName().getIdentifier(), methodToCreateStubFor, newMethod, newCu, rewriter.getASTRewrite()));
-		ImportRewriteUtil.addImports(rewriter, newMethod, new HashMap(), new HashMap(), false);
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(typeToCreateStubIn, rewriter.getImportRewrite());
+		ImportRewriteUtil.addImports(rewriter, context, newMethod, new HashMap(), new HashMap(), false);
 		rewriter.getASTRewrite().getListRewrite(typeToCreateStubIn, typeToCreateStubIn.getBodyDeclarationsProperty()).insertAt(newMethod, ASTNodes.getInsertionIndex(newMethod, typeToCreateStubIn.bodyDeclarations()), rewriter.createCategorizedGroupDescription(RefactoringCoreMessages.PullUpRefactoring_add_method_stub, SET_PULL_UP));
 	}
 
@@ -1016,7 +1019,8 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 		copyReturnType(targetRewrite.getASTRewrite(), getDeclaringType().getCompilationUnit(), oldMethod, newMethod, mapping);
 		copyParameters(targetRewrite.getASTRewrite(), getDeclaringType().getCompilationUnit(), oldMethod, newMethod, mapping);
 		copyThrownExceptions(oldMethod, newMethod);
-		ImportRewriteUtil.addImports(targetRewrite, newMethod, new HashMap(), new HashMap(), false);
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(destination, targetRewrite.getImportRewrite());
+		ImportRewriteUtil.addImports(targetRewrite, context, newMethod, new HashMap(), new HashMap(), false);
 		targetRewrite.getASTRewrite().getListRewrite(destination, destination.getBodyDeclarationsProperty()).insertAt(newMethod, ASTNodes.getInsertionIndex(newMethod, destination.bodyDeclarations()), targetRewrite.createCategorizedGroupDescription(RefactoringCoreMessages.PullUpRefactoring_add_abstract_method, SET_PULL_UP));
 	}
 
@@ -1111,6 +1115,7 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 						final TypeVariableMaplet[] mapping= TypeVariableUtil.subTypeToSuperType(getDeclaringType(), destination);
 						final IProgressMonitor subsub= new SubProgressMonitor(sub, 1);
 						final AbstractTypeDeclaration declaration= ASTNodeSearchUtil.getAbstractTypeDeclarationNode(destination, rewrite.getRoot());
+						ImportRewriteContext context= new ContextSensitiveImportRewriteContext(declaration, rewrite.getImportRewrite());
 						fMembersToMove= JavaElementUtil.sortByOffset(fMembersToMove);
 						subsub.beginTask(RefactoringCoreMessages.PullUpRefactoring_checking, fMembersToMove.length);
 						IMember member= null;
@@ -1136,7 +1141,7 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 										flags|= Flags.AccFinal;
 									final FieldDeclaration newField= createNewFieldDeclarationNode(rewriter, root, (IField) member, oldField, mapping, new SubProgressMonitor(subsub, 1), status, flags);
 									rewriter.getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newField, ASTNodes.getInsertionIndex(newField, declaration.bodyDeclarations()), rewrite.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PULL_UP));
-									ImportRewriteUtil.addImports(rewrite, oldField.getParent(), new HashMap(), new HashMap(), false);
+									ImportRewriteUtil.addImports(rewrite, context, oldField.getParent(), new HashMap(), new HashMap(), false);
 								}
 							} else if (member instanceof IMethod) {
 								final MethodDeclaration oldMethod= ASTNodeSearchUtil.getMethodDeclarationNode((IMethod) member, root);
@@ -1145,14 +1150,14 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 										status.merge(RefactoringStatus.createErrorStatus(Messages.format(RefactoringCoreMessages.PullUpRefactoring_moving_static_method_to_interface, new String[] { JavaElementLabels.getTextLabel(member, JavaElementLabels.ALL_FULLY_QUALIFIED)}), JavaStatusContext.create(member)));
 									final MethodDeclaration newMethod= createNewMethodDeclarationNode(sourceRewriter, rewrite, ((IMethod) member), oldMethod, mapping, adjustments, new SubProgressMonitor(subsub, 1), status);
 									rewriter.getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newMethod, ASTNodes.getInsertionIndex(newMethod, declaration.bodyDeclarations()), rewrite.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PULL_UP));
-									ImportRewriteUtil.addImports(rewrite, oldMethod, new HashMap(), new HashMap(), false);
+									ImportRewriteUtil.addImports(rewrite, context, oldMethod, new HashMap(), new HashMap(), false);
 								}
 							} else if (member instanceof IType) {
 								final AbstractTypeDeclaration oldType= ASTNodeSearchUtil.getAbstractTypeDeclarationNode((IType) member, root);
 								if (oldType != null) {
 									final BodyDeclaration newType= createNewTypeDeclarationNode(((IType) member), oldType, root, mapping, rewriter);
 									rewriter.getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newType, ASTNodes.getInsertionIndex(newType, declaration.bodyDeclarations()), rewrite.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PULL_UP));
-									ImportRewriteUtil.addImports(rewrite, oldType, new HashMap(), new HashMap(), false);
+									ImportRewriteUtil.addImports(rewrite, context, oldType, new HashMap(), new HashMap(), false);
 								}
 							} else
 								Assert.isTrue(false);
@@ -1201,7 +1206,7 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 					ICompilationUnit unit= (ICompilationUnit) iterator.next();
 					CompilationUnitRewrite rewrite= (CompilationUnitRewrite) fCompilationUnitRewrites.get(unit);
 					if (rewrite != null) {
-						final CompilationUnitChange change= rewrite.createChange(false, null);
+						final CompilationUnitChange change= rewrite.createChange(false);
 						if (change != null)
 							manager.manage(unit, change);
 					}
@@ -1431,7 +1436,9 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 		final IType[] allSubtypes= getDestinationTypeHierarchy(monitor).getAllSubtypes(getDestinationType());
 		final Set result= new HashSet(allSubtypes.length);
 		for (int i= 0; i < allSubtypes.length; i++) {
-			result.add(allSubtypes[i].getCompilationUnit());
+			ICompilationUnit cu= allSubtypes[i].getCompilationUnit();
+			if (cu != null)
+				result.add(cu);
 		}
 		result.add(getDestinationType().getCompilationUnit());
 		return (ICompilationUnit[]) result.toArray(new ICompilationUnit[result.size()]);
@@ -1799,7 +1806,7 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 			unit= (ICompilationUnit) iterator.next();
 			rewrite= (CompilationUnitRewrite) fCompilationUnitRewrites.get(unit);
 			if (rewrite != null) {
-				final CompilationUnitChange change= rewrite.createChange();
+				final CompilationUnitChange change= rewrite.createChange(true);
 				if (change != null)
 					manager.manage(unit, change);
 			}
@@ -1862,7 +1869,7 @@ public class PullUpRefactoringProcessor extends HierarchyProcessor {
 				}
 			}
 			if (!isTouched) {
-				final TextChange change= currentRewrite.createChange();
+				final TextChange change= currentRewrite.createChange(true);
 				if (change != null)
 					manager.manage(unit, change);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java
index 1d4865c..568f17a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,6 +65,7 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.PushDownDescriptor;
@@ -74,6 +75,7 @@ import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchPattern;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -103,6 +105,7 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Refactoring processor for the push down refactoring.
  *
@@ -619,6 +622,7 @@ public final class PushDownRefactoringProcessor extends HierarchyProcessor {
 					IMember member= null;
 					MemberVisibilityAdjustor adjustor= null;
 					AbstractTypeDeclaration declaration= ASTNodeSearchUtil.getAbstractTypeDeclarationNode(type, unitRewriter.getRoot());
+					ImportRewriteContext context= new ContextSensitiveImportRewriteContext(declaration, unitRewriter.getImportRewrite());
 					for (int offset= infos.length - 1; offset >= 0; offset--) {
 						member= infos[offset].getMember();
 						adjustor= new MemberVisibilityAdjustor(type, member);
@@ -641,14 +645,14 @@ public final class PushDownRefactoringProcessor extends HierarchyProcessor {
 							if (oldField != null) {
 								FieldDeclaration newField= createNewFieldDeclarationNode(infos[offset], sourceRewriter.getRoot(), mapping, unitRewriter.getASTRewrite(), oldField);
 								unitRewriter.getASTRewrite().getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newField, ASTNodes.getInsertionIndex(newField, declaration.bodyDeclarations()), unitRewriter.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PUSH_DOWN));
-								ImportRewriteUtil.addImports(unitRewriter, oldField.getParent(), new HashMap(), new HashMap(), false);
+								ImportRewriteUtil.addImports(unitRewriter, context, oldField.getParent(), new HashMap(), new HashMap(), false);
 							}
 						} else {
 							final MethodDeclaration oldMethod= ASTNodeSearchUtil.getMethodDeclarationNode((IMethod) infos[offset].getMember(), sourceRewriter.getRoot());
 							if (oldMethod != null) {
 								MethodDeclaration newMethod= createNewMethodDeclarationNode(infos[offset], mapping, unitRewriter, oldMethod);
 								unitRewriter.getASTRewrite().getListRewrite(declaration, declaration.getBodyDeclarationsProperty()).insertAt(newMethod, ASTNodes.getInsertionIndex(newMethod, declaration.bodyDeclarations()), unitRewriter.createCategorizedGroupDescription(RefactoringCoreMessages.HierarchyRefactoring_add_member, SET_PUSH_DOWN));
-								ImportRewriteUtil.addImports(unitRewriter, oldMethod, new HashMap(), new HashMap(), false);
+								ImportRewriteUtil.addImports(unitRewriter, context, oldMethod, new HashMap(), new HashMap(), false);
 							}
 						}
 					}
@@ -769,7 +773,7 @@ public final class PushDownRefactoringProcessor extends HierarchyProcessor {
 				unit= (ICompilationUnit) iterator.next();
 				rewrite= (CompilationUnitRewrite) rewrites.get(unit);
 				if (rewrite != null)
-					manager.manage(unit, rewrite.createChange());
+					manager.manage(unit, rewrite.createChange(true));
 			}
 			return manager;
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java
index 94d8ea5..ab247f8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/UseSuperTypeProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,12 +44,12 @@ import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.JavaRefactoringDescriptor;
 import org.eclipse.jdt.core.refactoring.descriptors.UseSupertypeDescriptor;
 
 import org.eclipse.jdt.internal.core.refactoring.descriptors.RefactoringSignatureDescriptorFactory;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.Checks;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.JavaRefactoringArguments;
@@ -72,6 +72,7 @@ import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Refactoring processor to replace type occurrences by a super type.
  */
@@ -294,7 +295,7 @@ public final class UseSuperTypeProcessor extends SuperTypeRefactoringProcessor {
 										solveSuperTypeConstraints(subRewrite.getCu(), subRewrite.getRoot(), fSubType, subBinding, superBinding, new SubProgressMonitor(monitor, 100), status);
 										if (!status.hasFatalError()) {
 											rewriteTypeOccurrences(manager, this, subRewrite, subRewrite.getCu(), subRewrite.getRoot(), new HashSet(), status, new SubProgressMonitor(monitor, 200));
-											final TextChange change= subRewrite.createChange();
+											final TextChange change= subRewrite.createChange(true);
 											if (change != null)
 												manager.manage(subRewrite.getCu(), change);
 										}
@@ -447,7 +448,7 @@ public final class UseSuperTypeProcessor extends SuperTypeRefactoringProcessor {
 						subMonitor.worked(10);
 					}
 					if (!sourceUnit.equals(unit)) {
-						final TextChange change= currentRewrite.createChange();
+						final TextChange change= currentRewrite.createChange(true);
 						if (change != null)
 							manager.manage(unit, change);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsCreator.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsCreator.java
index 9937776..b307896 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsCreator.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsCreator.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import java.util.Stack;
 
 import org.eclipse.core.runtime.Assert;
 
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
@@ -63,7 +64,6 @@ import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor;
 import org.eclipse.jdt.internal.corext.refactoring.typeconstraints.CompilationUnitRange;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsModel.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsModel.java
index 90ac28c..5d0da70 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsModel.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsModel.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -384,6 +384,8 @@ public final class SuperTypeConstraintsModel {
 	 */
 	public final ConstraintVariable2 createMethodParameterVariable(final IMethodBinding method, final int index) {
 		final ITypeBinding[] parameters= method.getParameterTypes();
+		if (parameters.length < 1)
+			return null;
 		ITypeBinding binding= parameters[Math.min(index, parameters.length - 1)];
 		if (binding.isArray())
 			binding= binding.getElementType();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java
index d775839..c01c9ae 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeRefactoringProcessor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -67,6 +67,7 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
@@ -87,7 +88,6 @@ import org.eclipse.jdt.core.search.SearchPattern;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.JDTRefactoringDescriptorComment;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringScopeFactory;
@@ -883,7 +883,7 @@ public abstract class SuperTypeRefactoringProcessor extends RefactoringProcessor
 					if (binding != null) {
 						node= target.findDeclaringNode(binding.getKey());
 						if (node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
-							node= NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
+							node= NodeFinder.perform(target, (node.getStartPosition() + node.getLength() - delta), 0);
 							if (node instanceof SimpleName)
 								rewriteTypeOccurrence(estimate, rewrite, node, group);
 						}
@@ -902,7 +902,7 @@ public abstract class SuperTypeRefactoringProcessor extends RefactoringProcessor
 					if (binding != null) {
 						node= target.findDeclaringNode(binding.getKey());
 						if (node instanceof SimpleName || node instanceof MethodDeclaration || node instanceof VariableDeclarationFragment) {
-							node= NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
+							node= NodeFinder.perform(target, (node.getStartPosition() + node.getLength() - delta), 0);
 							if (node instanceof SimpleName)
 								rewriteTypeOccurrence(estimate, rewrite, node, group);
 						}
@@ -917,7 +917,7 @@ public abstract class SuperTypeRefactoringProcessor extends RefactoringProcessor
 					binding= ((MethodDeclaration) node).resolveBinding();
 					node= target.findDeclaringNode(binding.getKey());
 					if (node instanceof MethodDeclaration) {
-						node= NodeFinder.perform(target, node.getStartPosition() + node.getLength() - delta, 0);
+						node= NodeFinder.perform(target, (node.getStartPosition() + node.getLength() - delta), 0);
 						if (node instanceof CastExpression)
 							rewriteTypeOccurrence(estimate, rewrite, ((CastExpression) node).getType(), group);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java
index 565d798..91b47da 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,8 +51,10 @@ import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.CodeScopeBuilder;
@@ -209,9 +211,10 @@ public class SurroundWithTryCatchRefactoring extends Refactoring {
 		List result= new ArrayList(1);
 		TryStatement tryStatement= getAST().newTryStatement();
 		ITypeBinding[] exceptions= fAnalyzer.getExceptions();
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(fAnalyzer.getEnclosingBodyDeclaration(), fImportRewrite);
 		for (int i= 0; i < exceptions.length; i++) {
 			ITypeBinding exception= exceptions[i];
-			String type= fImportRewrite.addImport(exception);
+			String type= fImportRewrite.addImport(exception, context);
 			CatchClause catchClause= getAST().newCatchClause();
 			tryStatement.catchClauses().add(catchClause);
 			SingleVariableDeclaration decl= getAST().newSingleVariableDeclaration();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/CompilationUnitRange.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/CompilationUnitRange.java
index 6f545c9..10fb6d0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/CompilationUnitRange.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/CompilationUnitRange.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,9 +16,9 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.NodeFinder;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
+import org.eclipse.jdt.internal.corext.SourceRangeFactory;
 
 public final class CompilationUnitRange {
 
@@ -33,7 +33,7 @@ public final class CompilationUnitRange {
 	}
 
 	public CompilationUnitRange(ICompilationUnit unit, ASTNode node) {
-		this(unit, new SourceRange(node));
+		this(unit, SourceRangeFactory.create(node));
 	}
 
 	public ICompilationUnit getCompilationUnit() {
@@ -46,8 +46,7 @@ public final class CompilationUnitRange {
 
 	//rootNode must be the ast root for fCompilationUnit
 	public ASTNode getNode(CompilationUnit rootNode) {
-		NodeFinder finder= new NodeFinder(fSourceRange.getOffset(), fSourceRange.getLength());
-		rootNode.accept(finder);
+		NodeFinder finder= new NodeFinder(rootNode, fSourceRange.getOffset(), fSourceRange.getLength());
 		ASTNode result= finder.getCoveringNode();
 		if (result != null)
 			return result;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ConstraintCollector.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ConstraintCollector.java
index 93d04b4..378c831 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ConstraintCollector.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/ConstraintCollector.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,8 +48,10 @@ import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.InstanceofExpression;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.LabeledStatement;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.NormalAnnotation;
 import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.NumberLiteral;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
@@ -61,6 +63,7 @@ import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.StringLiteral;
 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
@@ -359,6 +362,12 @@ public final class ConstraintCollector extends ASTVisitor {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MarkerAnnotation)
+	 */
+	public boolean visit(MarkerAnnotation node) {
+		return false;
+	}
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MethodDeclaration)
 	 */
 	public boolean visit(MethodDeclaration node) {
@@ -373,7 +382,12 @@ public final class ConstraintCollector extends ASTVisitor {
 		add(fCreator.create(node));
 		return true;
 	}
-
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.NormalAnnotation)
+	 */
+	public boolean visit(NormalAnnotation node) {
+		return false;
+	}
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.NullLiteral)
 	 */
@@ -463,6 +477,13 @@ public final class ConstraintCollector extends ASTVisitor {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleMemberAnnotation)
+	 */
+	public boolean visit(SingleMemberAnnotation node) {
+		return false;
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleVariableDeclaration)
 	 */
 	public boolean visit(SingleVariableDeclaration node) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java
index 2024f8a..a240099 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/typeconstraints/FullConstraintCreator.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,7 @@ import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.refactoring.rename.MethodChecks;
 
+
 /**
  * Default implementation of the creator. Creates all or nearly all constraints for program constructs.
  * Subclasses can provide additional checks to avoid creating constraints that are not useful for their purposes.
@@ -523,27 +524,28 @@ public class FullConstraintCreator extends ConstraintCreator{
 		return (ITypeConstraint[]) result.toArray(new ITypeConstraint[result.size()]);
 	}
 
-	private Collection getConstraintsForOverriding(IMethodBinding overriddingMethod) {
+	private Collection getConstraintsForOverriding(IMethodBinding overridingMethod) {
 		Collection result= new ArrayList();
-		Set declaringSupertypes= getDeclaringSuperTypes(overriddingMethod);
+		Set declaringSupertypes= getDeclaringSuperTypes(overridingMethod);
 		for (Iterator iter= declaringSupertypes.iterator(); iter.hasNext();) {
 			ITypeBinding superType= (ITypeBinding) iter.next();
-			IMethodBinding overriddenMethod= findMethod(overriddingMethod, superType);
+			IMethodBinding overriddenMethod= findMethod(overridingMethod, superType);
 			Assert.isNotNull(overriddenMethod);//because we asked for declaring types
-			if (Bindings.equals(overriddingMethod, overriddenMethod)) continue;
+			if (Bindings.equals(overridingMethod, overriddenMethod))
+				continue;
 			ITypeConstraint[] returnTypeConstraint= fTypeConstraintFactory.createEqualsConstraint(
 					fConstraintVariableFactory.makeReturnTypeVariable(overriddenMethod),
-					fConstraintVariableFactory.makeReturnTypeVariable(overriddingMethod));
+					fConstraintVariableFactory.makeReturnTypeVariable(overridingMethod));
 			result.addAll(Arrays.asList(returnTypeConstraint));
-			Assert.isTrue(overriddenMethod.getParameterTypes().length == overriddingMethod.getParameterTypes().length);
+			Assert.isTrue(overriddenMethod.getParameterTypes().length == overridingMethod.getParameterTypes().length);
 			for (int i= 0, n= overriddenMethod.getParameterTypes().length; i < n; i++) {
 				ITypeConstraint[] parameterTypeConstraint= fTypeConstraintFactory.createEqualsConstraint(
 						fConstraintVariableFactory.makeParameterTypeVariable(overriddenMethod, i),
-						fConstraintVariableFactory.makeParameterTypeVariable(overriddingMethod, i));
+						fConstraintVariableFactory.makeParameterTypeVariable(overridingMethod, i));
 				result.addAll(Arrays.asList(parameterTypeConstraint));
 			}
 			ITypeConstraint[] declaringTypeConstraint= fTypeConstraintFactory.createStrictSubtypeConstraint(
-					fConstraintVariableFactory.makeDeclaringTypeVariable(overriddingMethod),
+					fConstraintVariableFactory.makeDeclaringTypeVariable(overridingMethod),
 					fConstraintVariableFactory.makeDeclaringTypeVariable(overriddenMethod));
 			result.addAll(Arrays.asList(declaringTypeConstraint));
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/JavaElementUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/JavaElementUtil.java
index 15fd9f9..59c311a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/JavaElementUtil.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/JavaElementUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,13 +35,14 @@ import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.SourceRange;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 public class JavaElementUtil {
 
 	//no instances
@@ -144,12 +145,14 @@ public class JavaElementUtil {
 	}
 
 	/**
-	 * @param root
-	 * @return array of projects that have the specified root on their classpaths
-	 * @throws JavaModelException
+	 * @param root the package fragment root
+	 * @return array of projects that have the specified root on their classpath
+	 * @throws JavaModelException if getting the raw classpath or all Java projects fails
 	 */
 	public static IJavaProject[] getReferencingProjects(IPackageFragmentRoot root) throws JavaModelException {
 		IClasspathEntry cpe= root.getRawClasspathEntry();
+		if (cpe.getEntryKind() == IClasspathEntry.CPE_LIBRARY)
+			cpe= root.getResolvedClasspathEntry();
 		IJavaProject[] allJavaProjects= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
 		List result= new ArrayList(allJavaProjects.length);
 		for (int i= 0; i < allJavaProjects.length; i++) {
@@ -184,7 +187,7 @@ public class JavaElementUtil {
 	/**
 	 * @param pack a package fragment
 	 * @return an array containing the given package and all subpackages
-	 * @throws JavaModelException
+	 * @throws JavaModelException if getting the all sibling packages fails
 	 */
 	public static IPackageFragment[] getPackageAndSubpackages(IPackageFragment pack) throws JavaModelException {
 		if (pack.isDefaultPackage())
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/RefactoringASTParser.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/RefactoringASTParser.java
index 1279854..05cf0f2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/RefactoringASTParser.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/RefactoringASTParser.java	
@@ -68,13 +68,14 @@ public class RefactoringASTParser {
 	 * @param newCuSource the source
 	 * @param originalCu the compilation unit to get the name and project from
 	 * @param resolveBindings whether bindings are to be resolved
-	 * @param statementsRecovery whether statements recovery should be enabled
+	 * @param recovery whether statements and binding recovery should be enabled
 	 * @param pm an {@link IProgressMonitor}, or <code>null</code>
 	 * @return the parsed CompilationUnit
 	 */
-	public CompilationUnit parse(String newCuSource, ICompilationUnit originalCu, boolean resolveBindings, boolean statementsRecovery, IProgressMonitor pm) {
+	public CompilationUnit parse(String newCuSource, ICompilationUnit originalCu, boolean resolveBindings, boolean recovery, IProgressMonitor pm) {
 		fParser.setResolveBindings(resolveBindings);
-		fParser.setStatementsRecovery(statementsRecovery);
+		fParser.setStatementsRecovery(recovery);
+		fParser.setBindingsRecovery(recovery);
 		fParser.setSource(newCuSource.toCharArray());
 		fParser.setUnitName(originalCu.getElementName());
 		fParser.setProject(originalCu.getJavaProject());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/SelectionAwareSourceRangeComputer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/SelectionAwareSourceRangeComputer.java
index 314fc43..969ed82 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/SelectionAwareSourceRangeComputer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/SelectionAwareSourceRangeComputer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,17 +28,17 @@ import org.eclipse.jdt.internal.corext.dom.TokenScanner;
 public class SelectionAwareSourceRangeComputer extends TargetSourceRangeComputer {
 
 	private ASTNode[] fSelectedNodes;
-	private IBuffer fBuffer;
 	private int fSelectionStart;
 	private int fSelectionLength;
 
 	private Map/*<ASTNode, SourceRange>*/ fRanges;
+	private String fDocumentPortionToScan;
 
 	public SelectionAwareSourceRangeComputer(ASTNode[] selectedNodes, IBuffer buffer, int selectionStart, int selectionLength) {
 		fSelectedNodes= selectedNodes;
-		fBuffer= buffer;
 		fSelectionStart= selectionStart;
 		fSelectionLength= selectionLength;
+		fDocumentPortionToScan= buffer.getText(fSelectionStart, fSelectionLength);
 	}
 
 	public SourceRange computeSourceRange(ASTNode node) {
@@ -66,8 +66,10 @@ public class SelectionAwareSourceRangeComputer extends TargetSourceRangeComputer
 		fRanges.put(fSelectedNodes[last], super.computeSourceRange(fSelectedNodes[last]));
 
 		IScanner scanner= ToolFactory.createScanner(true, false, false, false);
-		String documentPortionToScan= fBuffer.getText(fSelectionStart, fSelectionLength);
-		scanner.setSource(documentPortionToScan.toCharArray());
+		char[] source= fDocumentPortionToScan.toCharArray();
+		scanner.setSource(source);
+		fDocumentPortionToScan= null; // initializeRanges() is only called once
+
 		TokenScanner tokenizer= new TokenScanner(scanner);
 		int pos= tokenizer.getNextStartOffset(0, false);
 
@@ -90,7 +92,7 @@ public class SelectionAwareSourceRangeComputer extends TargetSourceRangeComputer
 		}
 		if (token == ITerminalSymbols.TokenNameCOMMENT_LINE) {
 			int index= pos - 1;
-			while(index >= 0 && IndentManipulation.isLineDelimiterChar(documentPortionToScan.charAt(index))) {
+			while (index >= 0 && IndentManipulation.isLineDelimiterChar(source[index])) {
 				pos--;
 				index--;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/StatementAnalyzer.java b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/StatementAnalyzer.java
index ae32706..0a04e8f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/StatementAnalyzer.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/util/StatementAnalyzer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.ltk.core.refactoring.RefactoringStatusContext;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CatchClause;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -33,7 +34,6 @@ import org.eclipse.jdt.core.dom.SynchronizedStatement;
 import org.eclipse.jdt.core.dom.TryStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_GB.dictionary b/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_GB.dictionary
index da97a1e..f9f6206 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_GB.dictionary
+++ b/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_GB.dictionary
@@ -49819,3 +49819,5 @@ Sat
 Sun
 initially
 I
+formatter:off
+formatter:on
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_US.dictionary b/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_US.dictionary
index 111164d..510edb0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_US.dictionary
+++ b/eclipse/plugins/org.eclipse.jdt.ui/dictionaries/en_US.dictionary
@@ -49753,3 +49753,5 @@ Sat
 Sun
 initially
 I
+formatter:off
+formatter:on
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/dlcl16/external_browser.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/dlcl16/open_browser.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.ui/icons/full/dlcl16/external_browser.gif
copy to eclipse/plugins/org.eclipse.jdt.ui/icons/full/dlcl16/open_browser.gif
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/dtool16/newjworkingSet_wiz.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/dtool16/newjworkingSet_wiz.gif
deleted file mode 100644
index c00d7c1..0000000
Binary files a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/dtool16/newjworkingSet_wiz.gif and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/elcl16/external_browser.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/elcl16/open_browser.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.jdt.ui/icons/full/elcl16/external_browser.gif
copy to eclipse/plugins/org.eclipse.jdt.ui/icons/full/elcl16/open_browser.gif
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newjworkingSet_wiz.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newjworkingSet_wiz.gif
index eb1f1c7..e49d4a8 100644
Binary files a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newjworkingSet_wiz.gif and b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/etool16/newjworkingSet_wiz.gif differ
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/obj16/correction_multi_fix.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/obj16/correction_multi_fix.gif
new file mode 100644
index 0000000..af02bf5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/obj16/correction_multi_fix.gif differ
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/icons/full/ovr16/error_co_buildpath.gif b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/ovr16/error_co_buildpath.gif
new file mode 100644
index 0000000..e861399
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jdt.ui/icons/full/ovr16/error_co_buildpath.gif differ
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/SourceRange.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/SourceRange.java
new file mode 100644
index 0000000..a7dee8e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/SourceRange.java	
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext;
+
+import java.util.Arrays;
+import java.util.Comparator;
+
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.dom.ASTNode;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.6, replaced by {@link org.eclipse.jdt.core.SourceRange}
+ */
+public class SourceRange implements ISourceRange { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=88265 (Allow implementation of ISourceRange)
+
+	private final int fOffset;
+	private final int fLength;
+
+	public SourceRange(int offset, int length){
+		fLength= length;
+		fOffset= offset;
+	}
+
+	public SourceRange(ASTNode node) {
+		this(node.getStartPosition(), node.getLength());
+	}
+
+	public SourceRange(IProblem problem) {
+		this(problem.getSourceStart(), problem.getSourceEnd() - problem.getSourceStart() + 1);
+	}
+
+	/*
+	 * @see ISourceRange#getLength()
+	 */
+	public int getLength() {
+		return fLength;
+	}
+
+	/*
+	 * @see ISourceRange#getOffset()
+	 */
+	public int getOffset() {
+		return fOffset;
+	}
+
+	public int getEndExclusive() {
+		return getOffset() + getLength();
+	}
+
+	public int getEndInclusive() {
+		return getEndExclusive() - 1;
+	}
+
+	/*non java doc
+	 * for debugging only
+	 */
+	public String toString(){
+		return "<offset: " + fOffset +" length: " + fLength + "/>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+
+	/**
+	 * Sorts the given ranges by offset (backwards).
+	 * Note: modifies the parameter.
+	 * @param ranges the ranges to sort
+	 * @return the sorted ranges, which are identical to the parameter ranges
+	 */
+	public static ISourceRange[] reverseSortByOffset(ISourceRange[] ranges){
+		Comparator comparator= new Comparator(){
+			public int compare(Object o1, Object o2){
+				return ((ISourceRange)o2).getOffset() - ((ISourceRange)o1).getOffset();
+			}
+		};
+		Arrays.sort(ranges, comparator);
+		return ranges;
+	}
+
+    /*
+     * @see Object#equals(Object)
+     */
+    public boolean equals(Object obj) {
+    	if (! (obj instanceof ISourceRange))
+	        return false;
+	    return ((ISourceRange)obj).getOffset() == fOffset && ((ISourceRange)obj).getLength() == fLength;
+    }
+
+    /*
+     * @see Object#hashCode()
+     */
+    public int hashCode() {
+        return fLength ^ fOffset;
+    }
+
+    public boolean covers(ASTNode node) {
+    	return covers(new SourceRange(node));
+    }
+
+    public boolean covers(SourceRange range) {
+    	return    getOffset() <= range.getOffset()
+    	       	&& getEndInclusive() >= range.getEndInclusive();
+    }
+
+    /**
+     * Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=130161
+     * (Java Model returns ISourceRanges [-1, 0] if source not available).
+     *
+     * @param range a source range, can be <code>null</code>
+     * @return <code>true</code> iff range is not null and range.getOffset() is not -1
+     */
+    public static boolean isAvailable(ISourceRange range) {
+    		return range != null && range.getOffset() != -1;
+    }
+}
+
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/dom/NodeFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/dom/NodeFinder.java
new file mode 100644
index 0000000..e92be3a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/dom/NodeFinder.java	
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext.dom;
+
+import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.compiler.IScanner;
+import org.eclipse.jdt.core.compiler.ITerminalSymbols;
+import org.eclipse.jdt.core.compiler.InvalidInputException;
+import org.eclipse.jdt.core.dom.ASTNode;
+
+
+/**
+ * For a give range finds the node covered and the node covering.
+ * <p>
+ * DO NOT REMOVE, used in a product.</p>
+ * @since 2.1
+ * @deprecated As of 3.6, replaced by {@link org.eclipse.jdt.core.dom.NodeFinder}
+ */
+public class NodeFinder extends GenericVisitor {
+
+	/**
+	 * A visitor that maps a selection to a given ASTNode. The result node is
+	 * determined as follows:
+	 * <ul>
+	 *   <li>first the visitor tries to find a node with the exact start and length</li>
+	 * 	 <li>if no such node exists than the node that encloses the range defined by
+	 *       start and end is returned.</li>
+	 *   <li>if the length is zero than also nodes are considered where the node's
+	 *       start or end position matches <code>start</code>.</li>
+	 *   <li>otherwise <code>null</code> is returned.</li>
+	 * </ul>
+	 *
+	 * @param root the root node from which the search starts
+	 * @param start the start offset
+	 * @param length the length
+	 *
+	 * @return the result node
+	 *
+	 * @since		2.1
+	 */
+	public static ASTNode perform(ASTNode root, int start, int length) {
+		NodeFinder finder= new NodeFinder(start, length);
+		root.accept(finder);
+		ASTNode result= finder.getCoveredNode();
+		if (result == null || result.getStartPosition() != start || result.getLength() != length) {
+			return finder.getCoveringNode();
+		}
+		return result;
+	}
+
+	public static ASTNode perform(ASTNode root, ISourceRange range) {
+		return perform(root, range.getOffset(), range.getLength());
+	}
+
+	/**
+	 * A visitor that maps a selection to a given ASTNode. The result node is
+	 * determined as follows:
+	 * <ul>
+	 *   <li>first the visitor tries to find a node that is covered by <code>start</code> and
+	 *       <code>length</code> where either <code>start</code> and <code>length</code> exactly
+	 *       matches the node or where the text covered before and after the node only consists
+	 *       of white spaces or comments.</li>
+	 * 	 <li>if no such node exists than the node that encloses the range defined by
+	 *       start and end is returned.</li>
+	 *   <li>if the length is zero than also nodes are considered where the node's
+	 *       start or end position matches <code>start</code>.</li>
+	 *   <li>otherwise <code>null</code> is returned.</li>
+	 * </ul>
+	 *
+	 * @param root the root node from which the search starts
+	 * @param start the start offset
+	 * @param length the length
+	 * @param source the source of the compilation unit
+	 *
+	 * @return the result node
+	 * @throws JavaModelException if an error occurs in the Java model
+	 *
+	 * @since		3.0
+	 */
+	public static ASTNode perform(ASTNode root, int start, int length, ITypeRoot source) throws JavaModelException {
+		NodeFinder finder= new NodeFinder(start, length);
+		root.accept(finder);
+		ASTNode result= finder.getCoveredNode();
+		if (result == null)
+			return null;
+		Selection selection= Selection.createFromStartLength(start, length);
+		if (selection.covers(result)) {
+			IBuffer buffer= source.getBuffer();
+			if (buffer != null) {
+				IScanner scanner= ToolFactory.createScanner(false, false, false, false);
+				scanner.setSource(buffer.getText(start, length).toCharArray());
+				try {
+					int token= scanner.getNextToken();
+					if (token != ITerminalSymbols.TokenNameEOF) {
+						int tStart= scanner.getCurrentTokenStartPosition();
+						if (tStart == result.getStartPosition() - start) {
+							scanner.resetTo(tStart + result.getLength(), length - 1);
+							token= scanner.getNextToken();
+							if (token == ITerminalSymbols.TokenNameEOF)
+								return result;
+						}
+					}
+				} catch (InvalidInputException e) {
+				}
+			}
+		}
+		return finder.getCoveringNode();
+	}
+
+	private int fStart;
+	private int fEnd;
+
+	private ASTNode fCoveringNode;
+	private ASTNode fCoveredNode;
+
+	public NodeFinder(int offset, int length) {
+		super(true); // include Javadoc tags
+		fStart= offset;
+		fEnd= offset + length;
+	}
+
+	protected boolean visitNode(ASTNode node) {
+		int nodeStart= node.getStartPosition();
+		int nodeEnd= nodeStart + node.getLength();
+		if (nodeEnd < fStart || fEnd < nodeStart) {
+			return false;
+		}
+		if (nodeStart <= fStart && fEnd <= nodeEnd) {
+			fCoveringNode= node;
+		}
+		if (fStart <= nodeStart && nodeEnd <= fEnd) {
+			if (fCoveringNode == node) { // nodeStart == fStart && nodeEnd == fEnd
+				fCoveredNode= node;
+				return true; // look further for node with same length as parent
+			} else if (fCoveredNode == null) { // no better found
+				fCoveredNode= node;
+			}
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Returns the covered node. If more than one nodes are covered by the selection, the
+	 * returned node is first covered node found in a top-down traversal of the AST
+	 * @return ASTNode
+	 */
+	public ASTNode getCoveredNode() {
+		return fCoveredNode;
+	}
+
+	/**
+	 * Returns the covering node. If more than one nodes are covering the selection, the
+	 * returned node is last covering node found in a top-down traversal of the AST
+	 * @return ASTNode
+	 */
+	public ASTNode getCoveringNode() {
+		return fCoveringNode;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/refactoring/changes/CompilationUnitChange.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/refactoring/changes/CompilationUnitChange.java
new file mode 100644
index 0000000..d3b51dc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/corext/refactoring/changes/CompilationUnitChange.java	
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.corext.refactoring.changes;
+
+import org.eclipse.text.edits.TextEdit;
+
+import org.eclipse.ltk.core.refactoring.TextEditBasedChangeGroup;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+
+
+/**
+ * A {@link TextFileChange} that operates on an {@link ICompilationUnit}.
+ * <p>
+ * DO NOT REMOVE, used in a product.</p>
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.jdt.core.refactoring.CompilationUnitChange}
+ */
+public class CompilationUnitChange extends org.eclipse.jdt.core.refactoring.CompilationUnitChange {
+
+	/**
+	 * Creates a new <code>CompilationUnitChange</code>.
+	 *
+	 * @param name the change's name, mainly used to render the change in the UI
+	 * @param cunit the compilation unit this change works on
+	 */
+	public CompilationUnitChange(String name, ICompilationUnit cunit) {
+		super(name, cunit);
+	}
+
+	/**
+	 * @param change the change
+	 * @since 3.6
+	 */
+	public CompilationUnitChange(org.eclipse.jdt.core.refactoring.CompilationUnitChange change) {
+		super(change.getName(), change.getCompilationUnit());
+		setDescriptor(change.getDescriptor());
+		TextEdit edit= change.getEdit();
+		if (edit != null) {
+			setEdit(edit);
+		}
+		setEnabledShallow(change.isEnabled());
+		setKeepPreviewEdits(change.getKeepPreviewEdits());
+		setSaveMode(change.getSaveMode());
+		setTextType(change.getTextType());
+		TextEditBasedChangeGroup[] groups= change.getChangeGroups();
+		for (int i= 0; i < groups.length; i++)
+			addChangeGroup(groups[i]);
+	}
+}
+
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeInfoViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeInfoViewer.java
new file mode 100644
index 0000000..7e4e3a8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeInfoViewer.java	
@@ -0,0 +1,1589 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.dialogs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MenuAdapter;
+import org.eclipse.swt.events.MenuEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.ProgressMonitorWrapper;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+import org.eclipse.ui.progress.UIJob;
+
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeNameMatch;
+import org.eclipse.jdt.core.search.TypeNameMatchRequestor;
+import org.eclipse.jdt.core.search.TypeNameRequestor;
+
+import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.corext.util.OpenTypeHistory;
+import org.eclipse.jdt.internal.corext.util.Strings;
+import org.eclipse.jdt.internal.corext.util.TypeFilter;
+import org.eclipse.jdt.internal.corext.util.TypeInfoFilter;
+import org.eclipse.jdt.internal.corext.util.TypeInfoRequestorAdapter;
+
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.LibraryLocation;
+
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoFilterExtension;
+import org.eclipse.jdt.ui.dialogs.ITypeInfoImageProvider;
+
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.JavaUIMessages;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.ui.dialogs.FilteredItemsSelectionDialog}
+ */
+public class TypeInfoViewer {
+	
+	private static class SearchRequestor extends TypeNameMatchRequestor {
+		private volatile boolean fStop;
+		
+		private Set fHistory;
+
+		private TypeInfoFilter fFilter;
+		private List fResult;
+		
+		public SearchRequestor(TypeInfoFilter filter) {
+			super();
+			fResult= new ArrayList(2048);
+			fFilter= filter;
+		}
+		public TypeNameMatch[] getResult() {
+			return (TypeNameMatch[])fResult.toArray(new TypeNameMatch[fResult.size()]);
+		}
+		public void cancel() {
+			fStop= true;
+		}
+		public void setHistory(Set history) {
+			fHistory= history;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.core.search.TypeNameMatchRequestor#acceptTypeNameMatch(org.eclipse.jdt.core.search.TypeNameMatch)
+		 */
+		public void acceptTypeNameMatch(TypeNameMatch match) {
+			if (fStop)
+				return;
+			if (TypeFilter.isFiltered(match))
+				return;
+			if (fHistory.contains(match))
+				return;
+			if (fFilter.matchesFilterExtension(match))
+				fResult.add(match);
+		}
+	}
+	
+	protected static class TypeInfoComparator implements Comparator {
+		private TypeInfoLabelProvider fLabelProvider;
+		private TypeInfoFilter fFilter;
+		public TypeInfoComparator(TypeInfoLabelProvider labelProvider, TypeInfoFilter filter) {
+			fLabelProvider= labelProvider;
+			fFilter= filter;
+		}
+	    public int compare(Object left, Object right) {
+	    	TypeNameMatch leftInfo= (TypeNameMatch)left;
+	    	TypeNameMatch rightInfo= (TypeNameMatch)right;
+	     	int leftCategory= getCamelCaseCategory(leftInfo);
+	     	int rightCategory= getCamelCaseCategory(rightInfo);
+	     	if (leftCategory < rightCategory)
+	     		return -1;
+	     	if (leftCategory > rightCategory)
+	     		return +1;
+	     	int result= compareName(leftInfo.getSimpleTypeName(), rightInfo.getSimpleTypeName());
+	     	if (result != 0)
+	     		return result;
+	     	result= compareTypeContainerName(leftInfo.getTypeContainerName(), rightInfo.getTypeContainerName());
+	     	if (result != 0)
+	     		return result;
+	     	
+	     	leftCategory= getElementTypeCategory(leftInfo);
+	     	rightCategory= getElementTypeCategory(rightInfo);
+	     	if (leftCategory < rightCategory)
+	     		return -1;
+	     	if (leftCategory > rightCategory)
+	     		return +1;
+	     	return compareContainerName(leftInfo, rightInfo);
+	    }
+		private int compareName(String leftString, String rightString) {
+			int result= leftString.compareToIgnoreCase(rightString);
+			if (result != 0 || rightString.length() == 0) {
+				return result;
+			} else if (Strings.isLowerCase(leftString.charAt(0)) &&
+				!Strings.isLowerCase(rightString.charAt(0))) {
+	     		return +1;
+			} else if (Strings.isLowerCase(rightString.charAt(0)) &&
+	     		!Strings.isLowerCase(leftString.charAt(0))) {
+	     		return -1;
+			} else {
+				return leftString.compareTo(rightString);
+			}
+		}
+		private int compareTypeContainerName(String leftString, String rightString) {
+			int leftLength= leftString.length();
+			int rightLength= rightString.length();
+			if (leftLength == 0 && rightLength > 0)
+				return -1;
+			if (leftLength == 0 && rightLength == 0)
+				return 0;
+			if (leftLength > 0 && rightLength == 0)
+				return +1;
+			return compareName(leftString, rightString);
+		}
+		private int compareContainerName(TypeNameMatch leftType, TypeNameMatch rightType) {
+			return fLabelProvider.getContainerName(leftType).compareTo(
+				fLabelProvider.getContainerName(rightType));
+		}
+		private int getCamelCaseCategory(TypeNameMatch type) {
+			if (fFilter == null)
+				return 0;
+			if (!fFilter.isCamelCasePattern())
+				return 0;
+			return fFilter.matchesRawNamePattern(type) ? 0 : 1;
+		}
+		private int getElementTypeCategory(TypeNameMatch type) {
+			try {
+				if (type.getPackageFragmentRoot().getKind() == IPackageFragmentRoot.K_SOURCE)
+					return 0;
+			} catch (JavaModelException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			return 1;
+		}
+	}
+	
+	protected static class TypeInfoLabelProvider {
+
+		private ITypeInfoImageProvider fProviderExtension;
+		private TypeInfoRequestorAdapter fAdapter= new TypeInfoRequestorAdapter();
+		
+		private Map fLib2Name= new HashMap();
+		private String[] fInstallLocations;
+		private String[] fVMNames;
+
+		private boolean fFullyQualifyDuplicates;
+		
+		public TypeInfoLabelProvider(ITypeInfoImageProvider extension) {
+			fProviderExtension= extension;
+			List locations= new ArrayList();
+			List labels= new ArrayList();
+			IVMInstallType[] installs= JavaRuntime.getVMInstallTypes();
+			for (int i= 0; i < installs.length; i++) {
+				processVMInstallType(installs[i], locations, labels);
+			}
+			fInstallLocations= (String[])locations.toArray(new String[locations.size()]);
+			fVMNames= (String[])labels.toArray(new String[labels.size()]);
+			
+		}
+		public void setFullyQualifyDuplicates(boolean value) {
+			fFullyQualifyDuplicates= value;
+		}
+		private void processVMInstallType(IVMInstallType installType, List locations, List labels) {
+			if (installType != null) {
+				IVMInstall[] installs= installType.getVMInstalls();
+				boolean isMac= Platform.OS_MACOSX.equals(Platform.getOS());
+				final String HOME_SUFFIX= "/Home"; //$NON-NLS-1$
+				for (int i= 0; i < installs.length; i++) {
+					String label= getFormattedLabel(installs[i].getName());
+					LibraryLocation[] libLocations= installs[i].getLibraryLocations();
+					if (libLocations != null) {
+						processLibraryLocation(libLocations, label);
+					} else {
+						String filePath= installs[i].getInstallLocation().getAbsolutePath();
+						// on MacOS X install locations end in an additional "/Home" segment; remove it
+						if (isMac && filePath.endsWith(HOME_SUFFIX))
+							filePath= filePath.substring(0, filePath.length()- HOME_SUFFIX.length() + 1);
+						locations.add(filePath);
+						labels.add(label);
+					}
+				}
+			}
+		}
+		private void processLibraryLocation(LibraryLocation[] libLocations, String label) {
+			for (int l= 0; l < libLocations.length; l++) {
+				LibraryLocation location= libLocations[l];
+				fLib2Name.put(location.getSystemLibraryPath().toString(), label);
+			}
+		}
+		private String getFormattedLabel(String name) {
+			return Messages.format(JavaUIMessages.TypeInfoViewer_library_name_format, name);
+		}
+		public String getText(Object element) {
+			return ((TypeNameMatch)element).getSimpleTypeName();
+		}
+		public String getQualifiedText(TypeNameMatch type) {
+			StringBuffer result= new StringBuffer();
+			result.append(type.getSimpleTypeName());
+			String containerName= type.getTypeContainerName();
+			result.append(JavaElementLabels.CONCAT_STRING);
+			if (containerName.length() > 0) {
+				result.append(containerName);
+			} else {
+				result.append(JavaUIMessages.TypeInfoViewer_default_package);
+			}
+			return result.toString();
+		}
+		public String getFullyQualifiedText(TypeNameMatch type) {
+			StringBuffer result= new StringBuffer();
+			result.append(type.getSimpleTypeName());
+			String containerName= type.getTypeContainerName();
+			if (containerName.length() > 0) {
+				result.append(JavaElementLabels.CONCAT_STRING);
+				result.append(containerName);
+			}
+			result.append(JavaElementLabels.CONCAT_STRING);
+			result.append(getContainerName(type));
+			return result.toString();
+		}
+		public String getText(TypeNameMatch last, TypeNameMatch current, TypeNameMatch next) {
+			StringBuffer result= new StringBuffer();
+			int qualifications= 0;
+			String currentTN= current.getSimpleTypeName();
+			result.append(currentTN);
+			String currentTCN= getTypeContainerName(current);
+			if (last != null) {
+				String lastTN= last.getSimpleTypeName();
+				String lastTCN= getTypeContainerName(last);
+				if (currentTCN.equals(lastTCN)) {
+					if (currentTN.equals(lastTN)) {
+						result.append(JavaElementLabels.CONCAT_STRING);
+						result.append(currentTCN);
+						result.append(JavaElementLabels.CONCAT_STRING);
+						result.append(getContainerName(current));
+						return result.toString();
+					}
+				} else if (currentTN.equals(lastTN)) {
+					qualifications= 1;
+				}
+			}
+			if (next != null) {
+				String nextTN= next.getSimpleTypeName();
+				String nextTCN= getTypeContainerName(next);
+				if (currentTCN.equals(nextTCN)) {
+					if (currentTN.equals(nextTN)) {
+						result.append(JavaElementLabels.CONCAT_STRING);
+						result.append(currentTCN);
+						result.append(JavaElementLabels.CONCAT_STRING);
+						result.append(getContainerName(current));
+						return result.toString();
+					}
+				} else if (currentTN.equals(nextTN)) {
+					qualifications= 1;
+				}
+			}
+			if (qualifications > 0) {
+				result.append(JavaElementLabels.CONCAT_STRING);
+				result.append(currentTCN);
+				if (fFullyQualifyDuplicates) {
+					result.append(JavaElementLabels.CONCAT_STRING);
+					result.append(getContainerName(current));
+				}
+			}
+			return result.toString();
+		}
+		public String getQualificationText(TypeNameMatch type) {
+			StringBuffer result= new StringBuffer();
+			String containerName= type.getTypeContainerName();
+			if (containerName.length() > 0) {
+				result.append(containerName);
+				result.append(JavaElementLabels.CONCAT_STRING);
+			}
+			result.append(getContainerName(type));
+			return result.toString();
+		}
+		
+		private boolean isInnerType(TypeNameMatch match) {
+			return match.getTypeQualifiedName().indexOf('.') != -1;
+		}
+		
+		public ImageDescriptor getImageDescriptor(Object element) {
+			TypeNameMatch type= (TypeNameMatch)element;
+			if (fProviderExtension != null) {
+				fAdapter.setMatch(type);
+				ImageDescriptor descriptor= fProviderExtension.getImageDescriptor(fAdapter);
+				if (descriptor != null)
+					return descriptor;
+			}
+			return JavaElementImageProvider.getTypeImageDescriptor(
+				isInnerType(type), false, type.getModifiers(), false);
+		}
+		
+		private String getTypeContainerName(TypeNameMatch info) {
+			String result= info.getTypeContainerName();
+			if (result.length() > 0)
+				return result;
+			return JavaUIMessages.TypeInfoViewer_default_package;
+		}
+		
+		private String getContainerName(TypeNameMatch type) {
+			IPackageFragmentRoot root= type.getPackageFragmentRoot();
+			if (root.isExternal()) {
+				String name= root.getPath().toOSString();
+				for (int i= 0; i < fInstallLocations.length; i++) {
+					if (name.startsWith(fInstallLocations[i])) {
+						return fVMNames[i];
+					}
+				}
+				String lib= (String)fLib2Name.get(name);
+				if (lib != null)
+					return lib;
+			}
+			StringBuffer buf= new StringBuffer();
+			JavaElementLabels.getPackageFragmentRootLabel(root, JavaElementLabels.ROOT_QUALIFIED | JavaElementLabels.ROOT_VARIABLE, buf);
+			return buf.toString();
+		}
+	}
+
+	private static class ProgressUpdateJob extends UIJob {
+		private TypeInfoViewer fViewer;
+		private boolean fStopped;
+		public ProgressUpdateJob(Display display, TypeInfoViewer viewer) {
+			super(display, JavaUIMessages.TypeInfoViewer_progressJob_label);
+			fViewer= viewer;
+		}
+		public void stop() {
+			fStopped= true;
+			cancel();
+		}
+		public IStatus runInUIThread(IProgressMonitor monitor) {
+			if (stopped())
+				return new Status(IStatus.CANCEL, JavaPlugin.getPluginId(), IStatus.CANCEL, "", null); //$NON-NLS-1$
+			fViewer.updateProgressMessage();
+			if (!stopped())
+				schedule(300);
+			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		}
+		private boolean stopped() {
+			return fStopped || fViewer.getTable().isDisposed();
+		}
+	}
+	
+	private static class ProgressMonitor extends ProgressMonitorWrapper {
+		private TypeInfoViewer fViewer;
+		private String fName;
+		private int fTotalWork;
+		private double fWorked;
+		private boolean fDone;
+		
+		public ProgressMonitor(IProgressMonitor monitor, TypeInfoViewer viewer) {
+			super(monitor);
+			fViewer= viewer;
+		}
+		public void setTaskName(String name) {
+			super.setTaskName(name);
+			fName= name;
+		}
+		public void beginTask(String name, int totalWork) {
+			super.beginTask(name, totalWork);
+			if (fName == null)
+				fName= name;
+			fTotalWork= totalWork;
+		}
+		public void worked(int work) {
+			super.worked(work);
+			internalWorked(work);
+		}
+		public void done() {
+			fDone= true;
+			fViewer.setProgressMessage(""); //$NON-NLS-1$
+			super.done();
+		}
+		public void internalWorked(double work) {
+			fWorked= fWorked + work;
+			fViewer.setProgressMessage(getMessage());
+		}
+		private String getMessage() {
+			if (fDone) {
+				return ""; //$NON-NLS-1$
+			} else if (fTotalWork == 0) {
+				return fName;
+			} else {
+				return Messages.format(
+					JavaUIMessages.TypeInfoViewer_progress_label,
+					new Object[] { fName, new Integer((int)((fWorked * 100) / fTotalWork)) });
+			}
+		}
+	}
+
+	private static abstract class AbstractJob extends Job {
+		protected TypeInfoViewer fViewer;
+		protected AbstractJob(String name, TypeInfoViewer viewer) {
+			super(name);
+			fViewer= viewer;
+			setSystem(true);
+		}
+		protected final IStatus run(IProgressMonitor parent) {
+			ProgressMonitor monitor= new ProgressMonitor(parent, fViewer);
+			try {
+				fViewer.scheduleProgressUpdateJob();
+				return doRun(monitor);
+			} finally {
+				fViewer.stopProgressUpdateJob();
+			}
+		}
+		protected abstract IStatus doRun(ProgressMonitor monitor);
+	}
+	
+	private static abstract class AbstractSearchJob extends AbstractJob {
+		private int fMode;
+		
+		protected int fTicket;
+		protected TypeInfoLabelProvider fLabelProvider;
+		
+		protected TypeInfoFilter fFilter;
+		protected OpenTypeHistory fHistory;
+		
+		protected AbstractSearchJob(int ticket, TypeInfoViewer viewer, TypeInfoFilter filter, OpenTypeHistory history, int numberOfVisibleItems, int mode) {
+			super(JavaUIMessages.TypeInfoViewer_job_label, viewer);
+			fMode= mode;
+			fTicket= ticket;
+			fViewer= viewer;
+			fLabelProvider= fViewer.getLabelProvider();
+			fFilter= filter;
+			fHistory= history;
+		}
+		public void stop() {
+			cancel();
+		}
+		protected IStatus doRun(ProgressMonitor monitor) {
+			try {
+				if (VIRTUAL) {
+					internalRunVirtual(monitor);
+				} else {
+					internalRun(monitor);
+				}
+			} catch (CoreException e) {
+				fViewer.searchJobFailed(fTicket, e);
+				return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, JavaUIMessages.TypeInfoViewer_job_error, e);
+			} catch (InterruptedException e) {
+				return canceled(e, true);
+			} catch (OperationCanceledException e) {
+				return canceled(e, false);
+			}
+			fViewer.searchJobDone(fTicket);
+			return ok();
+		}
+		protected abstract TypeNameMatch[] getSearchResult(Set matchIdsInHistory, ProgressMonitor monitor) throws CoreException;
+		
+		private void internalRun(ProgressMonitor monitor) throws CoreException, InterruptedException {
+			if (monitor.isCanceled())
+				throw new OperationCanceledException();
+			
+			fViewer.clear(fTicket);
+
+			// local vars to speed up rendering
+			TypeNameMatch last= null;
+			TypeNameMatch type= null;
+			TypeNameMatch next= null;
+			List elements= new ArrayList();
+			List imageDescriptors= new ArrayList();
+			List labels= new ArrayList();
+			Set filteredMatches= new HashSet();
+			
+			TypeNameMatch[] matchingTypes= fHistory.getFilteredTypeInfos(fFilter);
+			if (matchingTypes.length > 0) {
+				Arrays.sort(matchingTypes, new TypeInfoComparator(fLabelProvider, fFilter));
+				type= matchingTypes[0];
+				int i= 1;
+				while(type != null) {
+					next= (i == matchingTypes.length) ? null : matchingTypes[i];
+					elements.add(type);
+					filteredMatches.add(type);
+					imageDescriptors.add(fLabelProvider.getImageDescriptor(type));
+					labels.add(fLabelProvider.getText(last, type, next));
+					last= type;
+					type= next;
+					i++;
+				}
+			}
+			matchingTypes= null;
+			fViewer.fExpectedItemCount= elements.size();
+			fViewer.addHistory(fTicket, elements, imageDescriptors, labels);
+			
+			if ((fMode & INDEX) == 0) {
+				return;
+			}
+			TypeNameMatch[] result= getSearchResult(filteredMatches, monitor);
+			fViewer.fExpectedItemCount+= result.length;
+			if (result.length == 0) {
+				return;
+			}
+			if (monitor.isCanceled())
+				throw new OperationCanceledException();
+			int processed= 0;
+			int nextIndex= 1;
+			type= result[0];
+			if (!filteredMatches.isEmpty()) {
+				fViewer.addDashLineAndUpdateLastHistoryEntry(fTicket, type);
+			}
+			while (true) {
+				long startTime= System.currentTimeMillis();
+				elements.clear();
+				imageDescriptors.clear();
+				labels.clear();
+	            int delta = Math.min(nextIndex == 1 ? fViewer.getNumberOfVisibleItems() : 10, result.length - processed);
+				if (delta == 0)
+					break;
+				processed= processed + delta;
+				while(delta > 0) {
+					next= (nextIndex == result.length) ? null : result[nextIndex];
+					elements.add(type);
+					labels.add(fLabelProvider.getText(last, type, next));
+					imageDescriptors.add(fLabelProvider.getImageDescriptor(type));
+					last= type;
+					type= next;
+					nextIndex++;
+					delta--;
+				}
+				fViewer.addAll(fTicket, elements, imageDescriptors, labels);
+				long sleep= 100 - (System.currentTimeMillis() - startTime);
+				
+				if (sleep > 0)
+					Thread.sleep(sleep);
+				
+				if (monitor.isCanceled())
+					throw new OperationCanceledException();
+			}
+		}
+		private void internalRunVirtual(ProgressMonitor monitor) throws CoreException, InterruptedException {
+			if (monitor.isCanceled())
+				throw new OperationCanceledException();
+			
+			fViewer.clear(fTicket);
+
+			TypeNameMatch[] matchingTypes= fHistory.getFilteredTypeInfos(fFilter);
+			fViewer.setHistoryResult(fTicket, matchingTypes);
+			if ((fMode & INDEX) == 0)
+				return;
+				
+			Set filteredMatches= new HashSet(matchingTypes.length * 2);
+			for (int i= 0; i < matchingTypes.length; i++) {
+				filteredMatches.add(matchingTypes[i]);
+			}
+			
+			TypeNameMatch[] result= getSearchResult(filteredMatches, monitor);
+			if (monitor.isCanceled())
+				throw new OperationCanceledException();
+			
+			fViewer.setSearchResult(fTicket, result);
+		}
+		private IStatus canceled(Exception e, boolean removePendingItems) {
+			fViewer.searchJobCanceled(fTicket, removePendingItems);
+			return new Status(IStatus.CANCEL, JavaPlugin.getPluginId(), IStatus.CANCEL, JavaUIMessages.TypeInfoViewer_job_cancel, e);
+		}
+		private IStatus ok() {
+			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		}
+	}
+	
+	private static class SearchEngineJob extends AbstractSearchJob {
+		private IJavaSearchScope fScope;
+		private int fElementKind;
+		private SearchRequestor fReqestor;
+		
+		public SearchEngineJob(int ticket, TypeInfoViewer viewer, TypeInfoFilter filter, OpenTypeHistory history, int numberOfVisibleItems, int mode,
+				IJavaSearchScope scope, int elementKind) {
+			super(ticket, viewer, filter, history, numberOfVisibleItems, mode);
+			fScope= scope;
+			fElementKind= elementKind;
+			fReqestor= new SearchRequestor(filter);
+		}
+		public void stop() {
+			fReqestor.cancel();
+			super.stop();
+		}
+		protected TypeNameMatch[] getSearchResult(Set matchIdsInHistory, ProgressMonitor monitor) throws CoreException {
+			long start= System.currentTimeMillis();
+			fReqestor.setHistory(matchIdsInHistory);
+			// consider primary working copies during searching
+			SearchEngine engine= new SearchEngine((WorkingCopyOwner)null);
+			String packPattern= fFilter.getPackagePattern();
+			monitor.setTaskName(JavaUIMessages.TypeInfoViewer_searchJob_taskName);
+			engine.searchAllTypeNames(
+				packPattern == null ? null : packPattern.toCharArray(),
+				fFilter.getPackageFlags(),
+				fFilter.getNamePattern().toCharArray(),
+				fFilter.getSearchFlags(),
+				fElementKind,
+				fScope,
+				fReqestor,
+				IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
+				monitor);
+			if (DEBUG)
+				System.out.println("Time needed until search has finished: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$
+			TypeNameMatch[] result= fReqestor.getResult();
+			Arrays.sort(result, new TypeInfoComparator(fLabelProvider, fFilter));
+			if (DEBUG)
+				System.out.println("Time needed until sort has finished: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$
+			fViewer.rememberResult(fTicket, result);
+			return result;
+		}
+	}
+	
+	private static class CachedResultJob extends AbstractSearchJob {
+		private TypeNameMatch[] fLastResult;
+		public CachedResultJob(int ticket, TypeNameMatch[] lastResult, TypeInfoViewer viewer, TypeInfoFilter filter, OpenTypeHistory history, int numberOfVisibleItems, int mode) {
+			super(ticket, viewer, filter, history, numberOfVisibleItems, mode);
+			fLastResult= lastResult;
+		}
+		protected TypeNameMatch[] getSearchResult(Set filteredHistory, ProgressMonitor monitor) throws CoreException {
+			List result= new ArrayList(2048);
+			for (int i= 0; i < fLastResult.length; i++) {
+				TypeNameMatch type= fLastResult[i];
+				if (filteredHistory.contains(type))
+					continue;
+				if (fFilter.matchesCachedResult(type))
+					result.add(type);
+			}
+			// we have to sort if the filter is a camel case filter.
+			TypeNameMatch[] types= (TypeNameMatch[])result.toArray(new TypeNameMatch[result.size()]);
+			if (fFilter.isCamelCasePattern()) {
+				Arrays.sort(types, new TypeInfoComparator(fLabelProvider, fFilter));
+			}
+			return types;
+		}
+	}
+	
+	private static class SyncJob extends AbstractJob {
+		public SyncJob(TypeInfoViewer viewer) {
+			super(JavaUIMessages.TypeInfoViewer_syncJob_label, viewer);
+		}
+		public void stop() {
+			cancel();
+		}
+		protected IStatus doRun(ProgressMonitor monitor) {
+			try {
+				monitor.setTaskName(JavaUIMessages.TypeInfoViewer_syncJob_taskName);
+				new SearchEngine().searchAllTypeNames(
+					null,
+					0,
+					// make sure we search a concrete name. This is faster according to Kent
+					"_______________".toCharArray(), //$NON-NLS-1$
+					SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE,
+					IJavaSearchConstants.ENUM,
+					SearchEngine.createWorkspaceScope(),
+					new TypeNameRequestor() {},
+					IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
+					monitor);
+			} catch (JavaModelException e) {
+				JavaPlugin.log(e);
+				return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, JavaUIMessages.TypeInfoViewer_job_error, e);
+			} catch (OperationCanceledException e) {
+				return new Status(IStatus.CANCEL, JavaPlugin.getPluginId(), IStatus.CANCEL, JavaUIMessages.TypeInfoViewer_job_cancel, e);
+			} finally {
+				fViewer.syncJobDone();
+			}
+			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		}
+	}
+	
+	private static class DashLine {
+		private int fSeparatorWidth;
+		private String fMessage;
+		private int fMessageLength;
+		public String getText(int width) {
+			StringBuffer dashes= new StringBuffer();
+			int chars= (((width - fMessageLength) / fSeparatorWidth) / 2) -2;
+			for (int i= 0; i < chars; i++) {
+				dashes.append(SEPARATOR);
+			}
+			StringBuffer result= new StringBuffer();
+			result.append(dashes);
+			result.append(fMessage);
+			result.append(dashes);
+			return result.toString();
+		}
+		public void initialize(GC gc) {
+			fSeparatorWidth= gc.getAdvanceWidth(SEPARATOR);
+			fMessage= " " + JavaUIMessages.TypeInfoViewer_separator_message + " ";  //$NON-NLS-1$ //$NON-NLS-2$
+			fMessageLength= gc.textExtent(fMessage).x;
+		}
+	}
+	
+	private static class ImageManager {
+		private Map fImages= new HashMap(20);
+		
+		public Image get(ImageDescriptor descriptor) {
+			if (descriptor == null)
+				descriptor= ImageDescriptor.getMissingImageDescriptor();
+			
+			Image result= (Image)fImages.get(descriptor);
+			if (result != null)
+				return result;
+			result= descriptor.createImage();
+			if (result != null)
+				fImages.put(descriptor, result);
+			return result;
+		}
+		
+		public void dispose() {
+			for (Iterator iter= fImages.values().iterator(); iter.hasNext(); ) {
+				Image image= (Image)iter.next();
+				image.dispose();
+			}
+			fImages.clear();
+		}
+	}
+	
+	private Display fDisplay;
+	
+	private String fProgressMessage;
+	private Label fProgressLabel;
+	private int fProgressCounter;
+	private ProgressUpdateJob fProgressUpdateJob;
+	
+	private OpenTypeHistory fHistory;
+
+	/* non virtual table */
+	private int fNextElement;
+	private List fItems;
+	
+	/* virtual table */
+	private TypeNameMatch[] fHistoryMatches;
+	private TypeNameMatch[] fSearchMatches;
+	
+	private int fNumberOfVisibleItems;
+	private int fExpectedItemCount;
+	private Color fDashLineColor;
+	private int fScrollbarWidth;
+	private int fTableWidthDelta;
+	private int fDashLineIndex= -1;
+	private Image fSeparatorIcon;
+	private DashLine fDashLine= new DashLine();
+	
+	private boolean fFullyQualifySelection;
+	/* remembers the last selection to restore unqualified labels */
+	private TableItem[] fLastSelection;
+	private String[] fLastLabels;
+	
+	private TypeInfoLabelProvider fLabelProvider;
+	private ImageManager fImageManager;
+	
+	private Table fTable;
+	
+	private SyncJob fSyncJob;
+	
+	private TypeInfoFilter fTypeInfoFilter;
+	private ITypeInfoFilterExtension fFilterExtension;
+	private TypeNameMatch[] fLastCompletedResult;
+	private TypeInfoFilter fLastCompletedFilter;
+	
+	private int fSearchJobTicket;
+	protected int fElementKind;
+	protected IJavaSearchScope fSearchScope;
+	
+	private AbstractSearchJob fSearchJob;
+
+	private static final int HISTORY= 1;
+	private static final int INDEX= 2;
+	private static final int FULL= HISTORY | INDEX;
+	
+	private static final char SEPARATOR= '-';
+	
+	private static final boolean DEBUG= false;
+	private static final boolean VIRTUAL= false;
+	
+	private static final TypeNameMatch[] EMTPY_TYPE_INFO_ARRAY= new TypeNameMatch[0];
+	// only needed when in virtual table mode
+	
+	private static final TypeNameMatch DASH_LINE= SearchEngine.createTypeNameMatch(null, 0);
+		
+
+	public TypeInfoViewer(Composite parent, int flags, Label progressLabel,
+			IJavaSearchScope scope, int elementKind, String initialFilter,
+			ITypeInfoFilterExtension filterExtension, ITypeInfoImageProvider imageExtension) {
+		Assert.isNotNull(scope);
+		fDisplay= parent.getDisplay();
+		fProgressLabel= progressLabel;
+		fSearchScope= scope;
+		fElementKind= elementKind;
+		fFilterExtension= filterExtension;
+		fFullyQualifySelection= (flags & SWT.MULTI) != 0;
+		if (VIRTUAL)
+			flags|= SWT.VIRTUAL;
+		fTable= new Table(parent, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.FLAT | flags);
+		fTable.setFont(parent.getFont());
+		fLabelProvider= new TypeInfoLabelProvider(imageExtension);
+		fItems= new ArrayList(500);
+		fTable.setHeaderVisible(false);
+		addPopupMenu();
+		fTable.addControlListener(new ControlAdapter() {
+			public void controlResized(ControlEvent event) {
+				int itemHeight= fTable.getItemHeight();
+				Rectangle clientArea= fTable.getClientArea();
+				fNumberOfVisibleItems= (clientArea.height / itemHeight) + 1;
+			}
+		});
+		fTable.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					deleteHistoryEntry();
+				} else if (e.keyCode == SWT.ARROW_DOWN) {
+					int index= fTable.getSelectionIndex();
+					if (index == fDashLineIndex - 1) {
+						e.doit= false;
+						setTableSelection(index + 2);
+					}
+				} else if (e.keyCode == SWT.ARROW_UP) {
+					int index= fTable.getSelectionIndex();
+					if (fDashLineIndex != -1 && index == fDashLineIndex + 1) {
+						e.doit= false;
+						setTableSelection(index - 2);
+					}
+				}
+			}
+		});
+		fTable.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				if (fLastSelection != null) {
+					for (int i= 0; i < fLastSelection.length; i++) {
+						TableItem item= fLastSelection[i];
+						// could be disposed by deleting element from
+						// type info history
+						if (!item.isDisposed())
+							item.setText(fLastLabels[i]);
+					}
+				}
+				TableItem[] items= fTable.getSelection();
+				fLastSelection= new TableItem[items.length];
+				fLastLabels= new String[items.length];
+				for (int i= 0; i < items.length; i++) {
+					TableItem item= items[i];
+					fLastSelection[i]= item;
+					fLastLabels[i]= item.getText();
+					Object data= item.getData();
+					if (data instanceof TypeNameMatch) {
+						String qualifiedText= getQualifiedText((TypeNameMatch)data);
+						if (qualifiedText.length() > fLastLabels[i].length())
+							item.setText(qualifiedText);
+					}
+				}
+			}
+		});
+		fTable.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				stop(true, true);
+				fDashLineColor.dispose();
+				fSeparatorIcon.dispose();
+				fImageManager.dispose();
+				if (fProgressUpdateJob != null) {
+					fProgressUpdateJob.stop();
+					fProgressUpdateJob= null;
+				}
+			}
+		});
+		if (VIRTUAL) {
+			fHistoryMatches= EMTPY_TYPE_INFO_ARRAY;
+			fSearchMatches= EMTPY_TYPE_INFO_ARRAY;
+			fTable.addListener(SWT.SetData, new Listener() {
+				public void handleEvent(Event event) {
+					TableItem item= (TableItem)event.item;
+					setData(item);
+				}
+			});
+		}
+		
+		fDashLineColor= computeDashLineColor();
+		fScrollbarWidth= computeScrollBarWidth();
+		fTableWidthDelta= fTable.computeTrim(0, 0, 0, 0).width - fScrollbarWidth;
+		fSeparatorIcon= JavaPluginImages.DESC_OBJS_TYPE_SEPARATOR.createImage(fTable.getDisplay());
+		// Use a new image manager since an extension can provide its own
+		// image descriptors. To avoid thread problems with SWT the registry
+		// must be created in the UI thread.
+		fImageManager= new ImageManager();
+		
+		fHistory= OpenTypeHistory.getInstance();
+		if (initialFilter != null && initialFilter.length() > 0)
+			fTypeInfoFilter= createTypeInfoFilter(initialFilter);
+		GC gc= null;
+		try {
+			gc= new GC(fTable);
+			gc.setFont(fTable.getFont());
+			fDashLine.initialize(gc);
+		} finally {
+			gc.dispose();
+		}
+		// If we do have a type info filter then we are
+		// scheduling a search job in startup. So no
+		// need to sync the search indices.
+		if (fTypeInfoFilter == null) {
+			scheduleSyncJob();
+		}
+	}
+	
+	/* package */ void startup() {
+		if (fTypeInfoFilter == null) {
+			reset();
+		} else {
+			scheduleSearchJob(FULL);
+		}
+	}
+
+	public Table getTable() {
+		return fTable;
+	}
+	
+	/* package */ TypeInfoLabelProvider getLabelProvider() {
+		return fLabelProvider;
+	}
+	
+	private int getNumberOfVisibleItems() {
+		return fNumberOfVisibleItems;
+	}
+	
+	public void setFocus() {
+		fTable.setFocus();
+	}
+	
+	
+	public void setQualificationStyle(boolean value) {
+		if (fFullyQualifySelection == value)
+			return;
+		fFullyQualifySelection= value;
+		if (fLastSelection != null) {
+			for (int i= 0; i < fLastSelection.length; i++) {
+				TableItem item= fLastSelection[i];
+				Object data= item.getData();
+				if (data instanceof TypeNameMatch) {
+					item.setText(getQualifiedText((TypeNameMatch)data));
+				}
+			}
+		}
+	}
+	
+	public TypeNameMatch[] getSelection() {
+		TableItem[] items= fTable.getSelection();
+		List result= new ArrayList(items.length);
+		for (int i= 0; i < items.length; i++) {
+			Object data= items[i].getData();
+			if (data instanceof TypeNameMatch) {
+				result.add(data);
+			}
+		}
+		return (TypeNameMatch[])result.toArray(new TypeNameMatch[result.size()]);
+	}
+	
+	public void stop() {
+		stop(true, false);
+	}
+	
+	public void stop(boolean stopSyncJob, boolean dispose) {
+		if (fSyncJob != null && stopSyncJob) {
+			fSyncJob.stop();
+			fSyncJob= null;
+		}
+		if (fSearchJob != null) {
+			fSearchJob.stop();
+			fSearchJob= null;
+		}
+	}
+	
+	public void forceSearch() {
+		stop(false, false);
+		if (fTypeInfoFilter == null) {
+			reset();
+		} else {
+			// clear last results
+			fLastCompletedFilter= null;
+			fLastCompletedResult= null;
+			scheduleSearchJob(isSyncJobRunning() ? HISTORY : FULL);
+		}
+	}
+	
+	public void setSearchPattern(String text) {
+		stop(false, false);
+		if (text.length() == 0 || "*".equals(text)) { //$NON-NLS-1$
+			fTypeInfoFilter= null;
+			reset();
+		} else {
+			fTypeInfoFilter= createTypeInfoFilter(text);
+			scheduleSearchJob(isSyncJobRunning() ? HISTORY : FULL);
+		}
+	}
+	
+	public void setSearchScope(IJavaSearchScope scope, boolean refresh) {
+		fSearchScope= scope;
+		if (!refresh)
+			return;
+		stop(false, false);
+		fLastCompletedFilter= null;
+		fLastCompletedResult= null;
+		if (fTypeInfoFilter == null) {
+			reset();
+		} else {
+			scheduleSearchJob(isSyncJobRunning() ? HISTORY : FULL);
+		}
+	}
+
+	public void setFullyQualifyDuplicates(boolean value, boolean refresh) {
+		fLabelProvider.setFullyQualifyDuplicates(value);
+		if (!refresh)
+			return;
+		stop(false, false);
+		if (fTypeInfoFilter == null) {
+			reset();
+		} else {
+			scheduleSearchJob(isSyncJobRunning() ? HISTORY : FULL);
+		}
+	}
+	
+	public void reset() {
+		fLastSelection= null;
+		fLastLabels= null;
+		fExpectedItemCount= 0;
+		fDashLineIndex= -1;
+		TypeInfoFilter filter= (fTypeInfoFilter != null)
+			? fTypeInfoFilter
+			: new TypeInfoFilter("*", fSearchScope, fElementKind, fFilterExtension); //$NON-NLS-1$
+		if (VIRTUAL) {
+			fHistoryMatches= fHistory.getFilteredTypeInfos(filter);
+			fExpectedItemCount= fHistoryMatches.length;
+			fTable.setItemCount(fHistoryMatches.length);
+			// bug under windows.
+			if (fHistoryMatches.length == 0) {
+				fTable.redraw();
+			}
+			fTable.clear(0, fHistoryMatches.length - 1);
+		} else {
+			fNextElement= 0;
+			TypeNameMatch[] historyItems= fHistory.getFilteredTypeInfos(filter);
+			if (historyItems.length == 0) {
+				shortenTable();
+				return;
+			}
+			fExpectedItemCount= historyItems.length;
+			int lastIndex= historyItems.length - 1;
+			TypeNameMatch last= null;
+			TypeNameMatch type= historyItems[0];
+			for (int i= 0; i < historyItems.length; i++) {
+				TypeNameMatch next= i == lastIndex ? null : historyItems[i + 1];
+				addSingleElement(type,
+					fLabelProvider.getImageDescriptor(type),
+					fLabelProvider.getText(last, type, next));
+				last= type;
+				type= next;
+			}
+			shortenTable();
+		}
+	}
+	
+	protected TypeInfoFilter createTypeInfoFilter(String text) {
+		if ("**".equals(text)) //$NON-NLS-1$
+			text= "*"; //$NON-NLS-1$
+		return new TypeInfoFilter(text, fSearchScope, fElementKind, fFilterExtension);
+	}
+	
+	private void addPopupMenu() {
+		Menu menu= new Menu(fTable.getShell(), SWT.POP_UP);
+		fTable.setMenu(menu);
+		final MenuItem remove= new MenuItem(menu, SWT.NONE);
+		remove.setText(JavaUIMessages.TypeInfoViewer_remove_from_history);
+		menu.addMenuListener(new MenuAdapter() {
+			public void menuShown(MenuEvent e) {
+				TableItem[] selection= fTable.getSelection();
+				remove.setEnabled(canEnable(selection));
+			}
+		});
+		remove.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				deleteHistoryEntry();
+			}
+		});
+	}
+	
+	private boolean canEnable(TableItem[] selection) {
+		if (selection.length == 0)
+			return false;
+		for (int i= 0; i < selection.length; i++) {
+			TableItem item= selection[i];
+			Object data= item.getData();
+			if (!(data instanceof TypeNameMatch))
+				return false;
+			if (!(fHistory.contains((TypeNameMatch)data)))
+				return false;
+		}
+		return true;
+	}
+	
+	//---- History management -------------------------------------------------------
+	
+	private void deleteHistoryEntry() {
+		int index= fTable.getSelectionIndex();
+		if (index == -1)
+			return;
+		TableItem item= fTable.getItem(index);
+		Object element= item.getData();
+		if (!(element instanceof TypeNameMatch))
+			return;
+		if (fHistory.remove(element) != null) {
+			item.dispose();
+			fItems.remove(index);
+			int count= fTable.getItemCount();
+			if (count > 0) {
+				item= fTable.getItem(0);
+				if (item.getData() instanceof DashLine) {
+					item.dispose();
+					fItems.remove(0);
+					fDashLineIndex= -1;
+					if (count > 1) {
+						setTableSelection(0);
+					}
+				} else {
+					if (index >= count) {
+						index= count - 1;
+					}
+					setTableSelection(index);
+				}
+			} else {
+				// send dummy selection
+				fTable.notifyListeners(SWT.Selection, new Event());
+			}
+		}
+	}
+	
+	//-- Search result updating ----------------------------------------------------
+	
+	private void clear(int ticket) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				fNextElement= 0;
+				fDashLineIndex= -1;
+				fLastSelection= null;
+				fLastLabels= null;
+				fExpectedItemCount= 0;
+			}
+		});
+	}
+	
+	private void rememberResult(int ticket, final TypeNameMatch[] result) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				if (fLastCompletedResult == null) {
+					fLastCompletedFilter= fTypeInfoFilter;
+					fLastCompletedResult= result;
+				}
+			}
+		});
+	}
+
+	private void addHistory(int ticket, final List elements, final List imageDescriptors, final List labels) {
+		addAll(ticket, elements, imageDescriptors, labels);
+	}
+	
+	private void addAll(int ticket, final List elements, final List imageDescriptors, final List labels) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				int size= elements.size();
+				for(int i= 0; i < size; i++) {
+					addSingleElement(elements.get(i),
+						(ImageDescriptor)imageDescriptors.get(i),
+						(String)labels.get(i));
+				}
+			}
+		});
+	}
+	
+	private void addDashLineAndUpdateLastHistoryEntry(int ticket, final TypeNameMatch next) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				if (fNextElement > 0) {
+					TableItem item= fTable.getItem(fNextElement - 1);
+					String label= item.getText();
+					String newLabel= fLabelProvider.getText(null, (TypeNameMatch)item.getData(), next);
+					if (newLabel.length() != label.length())
+						item.setText(newLabel);
+					if (fLastSelection != null && fLastSelection.length > 0) {
+						TableItem last= fLastSelection[fLastSelection.length - 1];
+						if (last == item) {
+							fLastLabels[fLastLabels.length - 1]= newLabel;
+						}
+					}
+				}
+				fDashLineIndex= fNextElement;
+				addDashLine();
+			}
+		});
+	}
+	
+	private void addDashLine() {
+		TableItem item= null;
+		if (fItems.size() > fNextElement) {
+			item= (TableItem)fItems.get(fNextElement);
+		} else {
+			item= new TableItem(fTable, SWT.NONE);
+			fItems.add(item);
+		}
+		fillDashLine(item);
+		fNextElement++;
+	}
+	
+	private void addSingleElement(Object element, ImageDescriptor imageDescriptor, String label) {
+		TableItem item= null;
+		Object old= null;
+		if (fItems.size() > fNextElement) {
+			item= (TableItem)fItems.get(fNextElement);
+			old= item.getData();
+			item.setForeground(null);
+		} else {
+			item= new TableItem(fTable, SWT.NONE);
+			fItems.add(item);
+		}
+		item.setData(element);
+		item.setImage(fImageManager.get(imageDescriptor));
+		if (fNextElement == 0) {
+			if (needsSelectionChange(old, element) || fLastSelection != null) {
+				item.setText(label);
+				fTable.setSelection(0);
+	            fTable.notifyListeners(SWT.Selection, new Event());
+			} else {
+				fLastSelection= new TableItem[] { item };
+				fLastLabels= new String[] { label };
+			}
+		} else {
+			item.setText(label);
+		}
+		fNextElement++;
+	}
+	
+	private boolean needsSelectionChange(Object oldElement, Object newElement) {
+		int[] selected= fTable.getSelectionIndices();
+		if (selected.length != 1)
+			return true;
+		if (selected[0] != 0)
+			return true;
+		if (oldElement == null)
+			return true;
+		return !oldElement.equals(newElement);
+	}
+	
+	private void scheduleSearchJob(int mode) {
+		fSearchJobTicket++;
+		if (fLastCompletedFilter != null && fTypeInfoFilter.isSubFilter(fLastCompletedFilter.getText())) {
+			fSearchJob= new CachedResultJob(fSearchJobTicket, fLastCompletedResult, this, fTypeInfoFilter,
+				fHistory, fNumberOfVisibleItems,
+				mode);
+		} else {
+			fLastCompletedFilter= null;
+			fLastCompletedResult= null;
+			fSearchJob= new SearchEngineJob(fSearchJobTicket, this, fTypeInfoFilter,
+				fHistory, fNumberOfVisibleItems,
+				mode, fSearchScope, fElementKind);
+		}
+		fSearchJob.schedule();
+	}
+	
+	private void searchJobDone(int ticket) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				shortenTable();
+				checkEmptyList();
+				fSearchJob= null;
+			}
+		});
+	}
+	
+	private void searchJobCanceled(int ticket, final boolean removePendingItems) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				if (removePendingItems) {
+					shortenTable();
+					checkEmptyList();
+				}
+				fSearchJob= null;
+			}
+		});
+	}
+	
+	private synchronized void searchJobFailed(int ticket, CoreException e) {
+		searchJobDone(ticket);
+		JavaPlugin.log(e);
+	}
+	
+	//-- virtual table support -------------------------------------------------------
+	
+	private void setHistoryResult(int ticket, final TypeNameMatch[] types) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				fExpectedItemCount= types.length;
+				int lastHistoryLength= fHistoryMatches.length;
+				fHistoryMatches= types;
+				int length= fHistoryMatches.length + fSearchMatches.length;
+				int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
+				fTable.setItemCount(length + dash);
+				if (length == 0) {
+					// bug under windows.
+					fTable.redraw();
+					return;
+				}
+				int update= Math.max(lastHistoryLength, fHistoryMatches.length);
+				if (update > 0) {
+					fTable.clear(0, update + dash - 1);
+				}
+			}
+		});
+	}
+	
+	private void setSearchResult(int ticket, final TypeNameMatch[] types) {
+		syncExec(ticket, new Runnable() {
+			public void run() {
+				fExpectedItemCount+= types.length;
+				fSearchMatches= types;
+				int length= fHistoryMatches.length + fSearchMatches.length;
+				int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
+				fTable.setItemCount(length + dash);
+				if (length == 0) {
+					// bug under windows.
+					fTable.redraw();
+					return;
+				}
+				if (fHistoryMatches.length == 0) {
+					fTable.clear(0, length + dash - 1);
+				} else {
+					fTable.clear(fHistoryMatches.length - 1, length + dash - 1);
+				}
+			}
+		});
+	}
+	
+	private void setData(TableItem item) {
+		int index= fTable.indexOf(item);
+		TypeNameMatch type= getTypeInfo(index);
+		if (type == DASH_LINE) {
+			item.setData(fDashLine);
+			fillDashLine(item);
+		} else {
+			item.setData(type);
+			item.setImage(fImageManager.get(fLabelProvider.getImageDescriptor(type)));
+			item.setText(fLabelProvider.getText(
+				getTypeInfo(index - 1),
+				type,
+				getTypeInfo(index + 1)));
+			item.setForeground(null);
+		}
+	}
+	
+	private TypeNameMatch getTypeInfo(int index) {
+		if (index < 0)
+			return null;
+		if (index < fHistoryMatches.length) {
+			return fHistoryMatches[index];
+		}
+		int dash= (fHistoryMatches.length > 0 && fSearchMatches.length > 0) ? 1 : 0;
+		if (index == fHistoryMatches.length && dash == 1) {
+			return DASH_LINE;
+		}
+		index= index - fHistoryMatches.length - dash;
+		if (index >= fSearchMatches.length)
+			return null;
+		return fSearchMatches[index];
+	}
+	
+	//-- Sync Job updates ------------------------------------------------------------
+	
+	private void scheduleSyncJob() {
+		fSyncJob= new SyncJob(this);
+		fSyncJob.schedule();
+	}
+	
+	private void syncJobDone() {
+		syncExec(new Runnable() {
+			public void run() {
+				fSyncJob= null;
+				if (fTypeInfoFilter != null) {
+					scheduleSearchJob(FULL);
+				}
+			}
+		});
+	}
+
+	private boolean isSyncJobRunning() {
+		return fSyncJob != null;
+	}
+	
+	//-- progress monitor updates -----------------------------------------------------
+	
+	private void scheduleProgressUpdateJob() {
+		syncExec(new Runnable() {
+			public void run() {
+				if (fProgressCounter == 0) {
+					clearProgressMessage();
+					fProgressUpdateJob= new ProgressUpdateJob(fDisplay, TypeInfoViewer.this);
+					fProgressUpdateJob.schedule(300);
+				}
+				fProgressCounter++;
+			}
+		});
+	}
+	
+	private void stopProgressUpdateJob() {
+		syncExec(new Runnable() {
+			public void run() {
+				fProgressCounter--;
+				if (fProgressCounter == 0 && fProgressUpdateJob != null) {
+					fProgressUpdateJob.stop();
+					fProgressUpdateJob= null;
+					clearProgressMessage();
+				}
+			}
+		});
+	}
+	
+	private void setProgressMessage(String message) {
+		fProgressMessage= message;
+	}
+	
+	private void clearProgressMessage() {
+		fProgressMessage= ""; //$NON-NLS-1$
+		fProgressLabel.setText(fProgressMessage);
+	}
+	
+	private void updateProgressMessage() {
+		fProgressLabel.setText(fProgressMessage);
+	}
+	
+	//-- Helper methods --------------------------------------------------------------
+
+	private void syncExec(final Runnable runnable) {
+		if (fDisplay.isDisposed())
+			return;
+		fDisplay.syncExec(new Runnable() {
+			public void run() {
+				if (fTable.isDisposed())
+					return;
+				runnable.run();
+			}
+		});
+	}
+	
+	private void syncExec(final int ticket, final Runnable runnable) {
+		if (fDisplay.isDisposed())
+			return;
+		fDisplay.syncExec(new Runnable() {
+			public void run() {
+				if (fTable.isDisposed() || ticket != fSearchJobTicket)
+					return;
+				runnable.run();
+			}
+		});
+	}
+	
+	private void fillDashLine(TableItem item) {
+		Rectangle bounds= item.getImageBounds(0);
+		Rectangle area= fTable.getBounds();
+		boolean willHaveScrollBar= fExpectedItemCount + 1 > fNumberOfVisibleItems;
+		item.setText(fDashLine.getText(area.width - bounds.x - bounds.width - fTableWidthDelta -
+			(willHaveScrollBar ? fScrollbarWidth : 0)));
+		item.setImage(fSeparatorIcon);
+		item.setForeground(fDashLineColor);
+		item.setData(fDashLine);
+	}
+
+	private void shortenTable() {
+		if (VIRTUAL)
+			return;
+        if (fNextElement < fItems.size()) {
+            fTable.setRedraw(false);
+            fTable.remove(fNextElement, fItems.size() - 1);
+            fTable.setRedraw(true);
+        }
+		for (int i= fItems.size() - 1; i >= fNextElement; i--) {
+			fItems.remove(i);
+		}
+	}
+	
+	private void checkEmptyList() {
+		if (fTable.getItemCount() == 0) {
+			fTable.notifyListeners(SWT.Selection, new Event());
+		}
+	}
+	
+	private void setTableSelection(int index) {
+		fTable.setSelection(index);
+		fTable.notifyListeners(SWT.Selection, new Event());
+	}
+	
+	private Color computeDashLineColor() {
+		Color fg= fTable.getForeground();
+		int fGray= (int)(0.3*fg.getRed() + 0.59*fg.getGreen() + 0.11*fg.getBlue());
+		Color bg= fTable.getBackground();
+		int bGray= (int)(0.3*bg.getRed() + 0.59*bg.getGreen() + 0.11*bg.getBlue());
+		int gray= (int)((fGray + bGray) * 0.66);
+		return new Color(fDisplay, gray, gray, gray);
+	}
+	
+	private int computeScrollBarWidth() {
+		Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL);
+		int result= t.computeTrim(0, 0, 0, 0).width;
+		t.dispose();
+		return result;
+	}
+
+	private String getQualifiedText(TypeNameMatch type) {
+		return fFullyQualifySelection
+			? fLabelProvider.getFullyQualifiedText(type)
+			: fLabelProvider.getQualifiedText(type);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java
new file mode 100644
index 0000000..e0bceea
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionComponent.java	
@@ -0,0 +1,445 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.dialogs;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.custom.ViewForm;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.TypeNameMatch;
+
+import org.eclipse.jdt.internal.corext.util.Strings;
+
+import org.eclipse.jdt.ui.dialogs.ITypeSelectionComponent;
+import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
+
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.JavaUIMessages;
+import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
+import org.eclipse.jdt.internal.ui.util.PixelConverter;
+import org.eclipse.jdt.internal.ui.util.SWTUtil;
+import org.eclipse.jdt.internal.ui.util.TypeNameMatchLabelProvider;
+import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.ui.dialogs.FilteredItemsSelectionDialog}
+ */
+public class TypeSelectionComponent extends Composite implements ITypeSelectionComponent {
+	
+	private IDialogSettings fSettings;
+	private boolean fMultipleSelection;
+	private ITitleLabel fTitleLabel;
+	
+	private ToolBar fToolBar;
+	private ToolItem fToolItem;
+	private MenuManager fMenuManager;
+	private WorkingSetFilterActionGroup fFilterActionGroup;
+	
+	private TypeSelectionExtension fTypeSelectionExtension;
+	private Text fFilter;
+	private String fInitialFilterText;
+	private IJavaSearchScope fScope;
+	private TypeInfoViewer fViewer;
+	private ViewForm fForm;
+	private CLabel fLabel;
+	
+	public static final int NONE= 0;
+	public static final int CARET_BEGINNING= 1;
+	public static final int FULL_SELECTION= 2;
+	
+	private static final String DIALOG_SETTINGS= "org.eclipse.jdt.internal.ui.dialogs.TypeSelectionComponent"; //$NON-NLS-1$
+	private static final String SHOW_STATUS_LINE= "show_status_line"; //$NON-NLS-1$
+	private static final String FULLY_QUALIFY_DUPLICATES= "fully_qualify_duplicates"; //$NON-NLS-1$
+	private static final String WORKINGS_SET_SETTINGS= "workingset_settings"; //$NON-NLS-1$
+	
+	private class ToggleStatusLineAction extends Action {
+		public ToggleStatusLineAction() {
+			super(JavaUIMessages.TypeSelectionComponent_show_status_line_label, IAction.AS_CHECK_BOX);
+		}
+		public void run() {
+			if (fForm == null)
+				return;
+			GridData gd= (GridData)fForm.getLayoutData();
+			boolean checked= isChecked();
+			gd.exclude= !checked;
+			fForm.setVisible(checked);
+			fSettings.put(SHOW_STATUS_LINE, checked);
+			TypeSelectionComponent.this.layout();
+		}
+	}
+	
+	private class FullyQualifyDuplicatesAction extends Action {
+		public FullyQualifyDuplicatesAction() {
+			super(JavaUIMessages.TypeSelectionComponent_fully_qualify_duplicates_label, IAction.AS_CHECK_BOX);
+		}
+		public void run() {
+			boolean checked= isChecked();
+			fViewer.setFullyQualifyDuplicates(checked, true);
+			fSettings.put(FULLY_QUALIFY_DUPLICATES, checked);
+		}
+	}
+	
+	/**
+	 * Special interface to access a title lable in
+	 * a generic fashion.
+	 */
+	public interface ITitleLabel {
+		/**
+		 * Sets the title to the given text
+		 * 
+		 * @param text the title text
+		 */
+		public void setText(String text);
+	}
+	
+	public TypeSelectionComponent(Composite parent, int style, String message, boolean multi,
+			IJavaSearchScope scope, int elementKind, String initialFilter, ITitleLabel titleLabel,
+			TypeSelectionExtension extension) {
+		super(parent, style);
+		setFont(parent.getFont());
+		fMultipleSelection= multi;
+		fScope= scope;
+		fInitialFilterText= initialFilter;
+		fTitleLabel= titleLabel;
+		fTypeSelectionExtension= extension;
+		IDialogSettings settings= JavaPlugin.getDefault().getDialogSettings();
+		fSettings= settings.getSection(DIALOG_SETTINGS);
+		if (fSettings == null) {
+			fSettings= new DialogSettings(DIALOG_SETTINGS);
+			settings.addSection(fSettings);
+		}
+		if (fSettings.get(SHOW_STATUS_LINE) == null) {
+			fSettings.put(SHOW_STATUS_LINE, true);
+		}
+		createContent(message, elementKind);
+	}
+	
+	public void triggerSearch() {
+		fViewer.forceSearch();
+	}
+	
+	public TypeNameMatch[] getSelection() {
+		return fViewer.getSelection();
+	}
+	
+	public IJavaSearchScope getScope() {
+		return fScope;
+	}
+	
+	private void createContent(final String message, int elementKind) {
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.marginWidth= 0; layout.marginHeight= 0;
+		setLayout(layout);
+		Font font= getFont();
+		
+		Control header= createHeader(this, font, message);
+		GridData gd= new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan= 2;
+		header.setLayoutData(gd);
+		
+		fFilter= new Text(this, SWT.BORDER | SWT.FLAT);
+		fFilter.setFont(font);
+		if (fInitialFilterText != null) {
+			fFilter.setText(fInitialFilterText);
+		}
+		gd= new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan= 2;
+		fFilter.setLayoutData(gd);
+		fFilter.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				patternChanged((Text)e.widget);
+			}
+		});
+		fFilter.addKeyListener(new KeyListener() {
+			public void keyReleased(KeyEvent e) {
+			}
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.ARROW_DOWN) {
+					fViewer.setFocus();
+				}
+			}
+		});
+		fFilter.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result= Strings.removeMnemonicIndicator(message);
+			}
+		});
+		TextFieldNavigationHandler.install(fFilter);
+		
+		Label label= new Label(this, SWT.NONE);
+		label.setFont(font);
+		label.setText(JavaUIMessages.TypeSelectionComponent_label);
+		label.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent e) {
+				if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit) {
+					e.detail= SWT.TRAVERSE_NONE;
+					fViewer.setFocus();
+				}
+			}
+		});
+		label= new Label(this, SWT.RIGHT);
+		label.setFont(font);
+		gd= new GridData(GridData.FILL_HORIZONTAL);
+		label.setLayoutData(gd);
+		fViewer= new TypeInfoViewer(this, fMultipleSelection ? SWT.MULTI : SWT.NONE, label,
+			fScope, elementKind, fInitialFilterText,
+			fTypeSelectionExtension != null ? fTypeSelectionExtension.getFilterExtension() : null,
+			fTypeSelectionExtension != null ? fTypeSelectionExtension.getImageProvider() : null);
+		gd= new GridData(GridData.FILL_BOTH);
+		final Table table= fViewer.getTable();
+		PixelConverter converter= new PixelConverter(table);
+		gd.widthHint= converter.convertWidthInCharsToPixels(70);
+		gd.heightHint= SWTUtil.getTableHeightHint(table, 10);
+		gd.horizontalSpan= 2;
+		table.setLayoutData(gd);
+		table.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				if (table.getSelectionCount() == 0) {
+					e.result= Strings.removeMnemonicIndicator(JavaUIMessages.TypeSelectionComponent_label);
+				}
+			}
+		});
+		fViewer.setFullyQualifyDuplicates(fSettings.getBoolean(FULLY_QUALIFY_DUPLICATES), false);
+		if (fTypeSelectionExtension != null) {
+			Control addition= fTypeSelectionExtension.createContentArea(this);
+			if (addition != null) {
+				addition.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+			}
+		}
+		if (!fMultipleSelection) {
+			fForm= new ViewForm(this, SWT.BORDER | SWT.FLAT);
+			fForm.setFont(font);
+			gd= new GridData(GridData.FILL_HORIZONTAL);
+			gd.horizontalSpan= 2;
+			boolean showStatusLine= fSettings.getBoolean(SHOW_STATUS_LINE);
+			gd.exclude= !showStatusLine;
+			fForm.setVisible(showStatusLine);
+			fForm.setLayoutData(gd);
+			fLabel= new CLabel(fForm, SWT.FLAT);
+			fLabel.setFont(fForm.getFont());
+			fForm.setContent(fLabel);
+			table.addSelectionListener(new SelectionAdapter() {
+				private TypeNameMatchLabelProvider fLabelProvider= new TypeNameMatchLabelProvider(
+					TypeNameMatchLabelProvider.SHOW_TYPE_CONTAINER_ONLY + TypeNameMatchLabelProvider.SHOW_ROOT_POSTFIX);
+				public void widgetSelected(SelectionEvent event) {
+					TypeNameMatch[] selection= fViewer.getSelection();
+					if (selection.length != 1) {
+						fLabel.setText(""); //$NON-NLS-1$
+						fLabel.setImage(null);
+					} else {
+						TypeNameMatch type= selection[0];
+						fLabel.setText(fViewer.getLabelProvider().getQualificationText(type));
+						fLabel.setImage(fLabelProvider.getImage(type));
+					}
+				}
+			});
+		}
+		addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent event) {
+				disposeComponent();
+			}
+		});
+		if (fTypeSelectionExtension != null) {
+			fTypeSelectionExtension.initialize(this);
+		}
+	}
+
+	public void addSelectionListener(SelectionListener listener) {
+		fViewer.getTable().addSelectionListener(listener);
+	}
+	
+	public void populate(int selectionMode) {
+		if (fInitialFilterText != null) {
+			switch(selectionMode) {
+				case CARET_BEGINNING:
+					fFilter.setSelection(0, 0);
+					break;
+				case FULL_SELECTION:
+					fFilter.setSelection(0, fInitialFilterText.length());
+					break;
+			}
+		}
+		fFilter.setFocus();
+		fViewer.startup();
+	}
+	
+	private void patternChanged(Text text) {
+		fViewer.setSearchPattern(text.getText());
+	}
+	
+	private Control createHeader(Composite parent, Font font, String message) {
+		Composite header= new Composite(parent, SWT.NONE);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.marginWidth= 0; layout.marginHeight= 0;
+		header.setLayout(layout);
+		header.setFont(font);
+		Label label= new Label(header, SWT.NONE);
+		label.setText(message);
+		label.setFont(font);
+		label.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent e) {
+				if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit) {
+					e.detail= SWT.TRAVERSE_NONE;
+					fFilter.setFocus();
+				}
+			}
+		});
+		GridData gd= new GridData(GridData.FILL_HORIZONTAL);
+		label.setLayoutData(gd);
+		
+		createViewMenu(header);
+		return header;
+	}
+	
+	private void createViewMenu(Composite parent) {
+		fToolBar= new ToolBar(parent, SWT.FLAT);
+		fToolItem= new ToolItem(fToolBar, SWT.PUSH, 0);
+
+		GridData data= new GridData();
+		data.horizontalAlignment= GridData.END;
+		fToolBar.setLayoutData(data);
+
+		fToolItem.setImage(JavaPluginImages.get(JavaPluginImages.IMG_ELCL_VIEW_MENU));
+		fToolItem.setDisabledImage(JavaPluginImages.get(JavaPluginImages.IMG_DLCL_VIEW_MENU));
+		fToolItem.setToolTipText(JavaUIMessages.TypeSelectionComponent_menu);
+		fToolItem.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				showViewMenu();
+			}
+		});
+		
+		fMenuManager= new MenuManager();
+		fillViewMenu(fMenuManager);
+
+		// ICommandService commandService= (ICommandService)PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+		// IHandlerService handlerService= (IHandlerService)PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
+	}
+	
+	private void showViewMenu() {
+		Menu menu = fMenuManager.createContextMenu(getShell());
+		Rectangle bounds = fToolItem.getBounds();
+		Point topLeft = new Point(bounds.x, bounds.y + bounds.height);
+		topLeft = fToolBar.toDisplay(topLeft);
+		menu.setLocation(topLeft.x, topLeft.y);
+		menu.setVisible(true);
+	}
+	
+	private void fillViewMenu(IMenuManager viewMenu) {
+		if (!fMultipleSelection) {
+			ToggleStatusLineAction showStatusLineAction= new ToggleStatusLineAction();
+			showStatusLineAction.setChecked(fSettings.getBoolean(SHOW_STATUS_LINE));
+			viewMenu.add(showStatusLineAction);
+		}
+		FullyQualifyDuplicatesAction fullyQualifyDuplicatesAction= new FullyQualifyDuplicatesAction();
+		fullyQualifyDuplicatesAction.setChecked(fSettings.getBoolean(FULLY_QUALIFY_DUPLICATES));
+		viewMenu.add(fullyQualifyDuplicatesAction);
+		if (fScope == null) {
+			fFilterActionGroup= new WorkingSetFilterActionGroup(getShell(),
+				JavaPlugin.getActivePage(),
+				new IPropertyChangeListener() {
+					public void propertyChange(PropertyChangeEvent event) {
+						IWorkingSet ws= (IWorkingSet)event.getNewValue();
+						if (ws == null || (ws.isAggregateWorkingSet() && ws.isEmpty())) {
+							fScope= SearchEngine.createWorkspaceScope();
+							fTitleLabel.setText(null);
+						} else {
+							fScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(ws, true);
+							fTitleLabel.setText(ws.getLabel());
+						}
+						fViewer.setSearchScope(fScope, true);
+					}
+				});
+			String setting= fSettings.get(WORKINGS_SET_SETTINGS);
+			if (setting != null) {
+				try {
+					IMemento memento= XMLMemento.createReadRoot(new StringReader(setting));
+					fFilterActionGroup.restoreState(memento);
+				} catch (WorkbenchException e) {
+				}
+			}
+			IWorkingSet ws= fFilterActionGroup.getWorkingSet();
+			if (ws == null || (ws.isAggregateWorkingSet() && ws.isEmpty())) {
+				fScope= SearchEngine.createWorkspaceScope();
+				fTitleLabel.setText(null);
+			} else {
+				fScope= JavaSearchScopeFactory.getInstance().createJavaSearchScope(ws, true);
+				fTitleLabel.setText(ws.getLabel());
+			}
+			fFilterActionGroup.fillViewMenu(viewMenu);
+		}
+	}
+
+	private void disposeComponent() {
+		if (fFilterActionGroup != null) {
+			XMLMemento memento= XMLMemento.createWriteRoot("workingSet"); //$NON-NLS-1$
+			fFilterActionGroup.saveState(memento);
+			fFilterActionGroup.dispose();
+			StringWriter writer= new StringWriter();
+			try {
+				memento.save(writer);
+				fSettings.put(WORKINGS_SET_SETTINGS, writer.getBuffer().toString());
+			} catch (IOException e) {
+				// don't do anything. Simply don't store the settings
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog2.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog2.java
new file mode 100644
index 0000000..6c790b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog2.java	
@@ -0,0 +1,342 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.dialogs;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.Job;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ISelection;
+
+import org.eclipse.jface.text.ITextSelection;
+
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.ISelectionStatusValidator;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeNameMatch;
+import org.eclipse.jdt.core.search.TypeNameRequestor;
+
+import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.corext.util.OpenTypeHistory;
+
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.dialogs.TypeSelectionExtension;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaUIMessages;
+import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.ui.dialogs.FilteredItemsSelectionDialog}
+ */
+public class TypeSelectionDialog2 extends SelectionStatusDialog {
+
+	private String fTitle;
+	
+	private boolean fMultipleSelection;
+	private IRunnableContext fRunnableContext;
+	private IJavaSearchScope fScope;
+	private int fElementKind;
+	
+	private String fInitialFilter;
+	private int fSelectionMode;
+	private ISelectionStatusValidator fValidator;
+	private TypeSelectionComponent fContent;
+	private TypeSelectionExtension fExtension;
+	
+	public static final int NONE= TypeSelectionComponent.NONE;
+	public static final int CARET_BEGINNING= TypeSelectionComponent.CARET_BEGINNING;
+	public static final int FULL_SELECTION= TypeSelectionComponent.FULL_SELECTION;
+	
+	private static boolean fgFirstTime= true; 
+	
+	private class TitleLabel implements TypeSelectionComponent.ITitleLabel {
+		public void setText(String text) {
+			if (text == null || text.length() == 0) {
+				getShell().setText(fTitle);
+			} else {
+				getShell().setText(Messages.format(
+					JavaUIMessages.TypeSelectionDialog2_title_format,
+					new String[] { fTitle, text}));
+			}
+		}
+	}
+	
+	public TypeSelectionDialog2(Shell parent, boolean multi, IRunnableContext context, 
+			IJavaSearchScope scope, int elementKinds) {
+		this(parent, multi, context, scope, elementKinds, null);
+	}
+	
+	public TypeSelectionDialog2(Shell parent, boolean multi, IRunnableContext context, 
+			IJavaSearchScope scope, int elementKinds, TypeSelectionExtension extension) {
+		super(parent);
+		setShellStyle(getShellStyle() | SWT.RESIZE);
+		fMultipleSelection= multi;
+		fRunnableContext= context;
+		fScope= scope;
+		fElementKind= elementKinds;
+		fSelectionMode= NONE;
+		fExtension= extension;
+		if (fExtension != null) {
+			fValidator= fExtension.getSelectionValidator();
+		}
+	}
+	
+	public void setFilter(String filter) {
+		setFilter(filter, FULL_SELECTION);
+	}
+	
+	public void setFilter(String filter, int selectionMode) {
+		fInitialFilter= filter;
+		fSelectionMode= selectionMode;
+	}
+	
+	public void setValidator(ISelectionStatusValidator validator) {
+		fValidator= validator;
+	}
+	
+	protected TypeNameMatch[] getSelectedTypes() {
+		if (fContent == null || fContent.isDisposed())
+			return null;
+		return fContent.getSelection();
+	}
+	
+	public void create() {
+		super.create();
+		fContent.populate(fSelectionMode);
+		getOkButton().setEnabled(fContent.getSelection().length > 0);
+	}
+	
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IJavaHelpContextIds.TYPE_SELECTION_DIALOG2);
+	}
+	
+	protected Control createDialogArea(Composite parent) {
+		Composite area= (Composite)super.createDialogArea(parent);
+		fContent= new TypeSelectionComponent(area, SWT.NONE, getMessage(), 
+			fMultipleSelection, fScope, fElementKind, fInitialFilter,
+			new TitleLabel(), fExtension);
+		GridData gd= new GridData(GridData.FILL_BOTH);
+		fContent.setLayoutData(gd);
+		fContent.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				handleDefaultSelected(fContent.getSelection());
+			}
+			public void widgetSelected(SelectionEvent e) {
+				handleWidgetSelected(fContent.getSelection());
+			}
+		});
+		return area;
+	}
+	
+	protected void handleDefaultSelected(TypeNameMatch[] selection) {
+		if (selection.length == 0)
+			return;
+		okPressed();
+	}
+	
+	protected void handleWidgetSelected(TypeNameMatch[] selection) {
+		IStatus status= null;
+		if (selection.length == 0) {
+	    	status= new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR, "",null); //$NON-NLS-1$
+	    } else {
+		    if (fValidator != null) {
+				List jElements= new ArrayList();
+				for (int i= 0; i < selection.length; i++) {
+					IType type= selection[i].getType();
+					if (type != null) {
+						jElements.add(type);
+					} else {
+			    		status= new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.ERROR,
+			    			Messages.format(JavaUIMessages.TypeSelectionDialog_error_type_doesnot_exist, selection[i].getFullyQualifiedName()),
+			    			null);
+			    		break;
+					}
+				}
+				if (status == null) {
+					status= fValidator.validate(jElements.toArray());
+				}
+			} else {
+				status= new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "",null); //$NON-NLS-1$
+			}
+	    }
+    	updateStatus(status);
+	}
+	
+	public int open() {
+		try {
+			ensureConsistency();
+		} catch (InvocationTargetException e) {
+			ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); 
+			return CANCEL;
+		} catch (InterruptedException e) {
+			// cancelled by user
+			return CANCEL;
+		}
+		if (fInitialFilter == null) {
+			IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow();
+			if (window != null) {
+				ISelection selection= window.getSelectionService().getSelection();
+				if (selection instanceof ITextSelection) {
+					String text= ((ITextSelection)selection).getText();
+					if (text != null) {
+						text= text.trim();
+						if (text.length() > 0 && JavaConventions.validateJavaTypeName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3).isOK()) {
+							fInitialFilter= text;
+							fSelectionMode= FULL_SELECTION;
+						}
+					}
+				}
+			}
+		}
+		return super.open();
+	}
+	
+	public boolean close() {
+		boolean result;
+		try {
+			if (getReturnCode() == OK) {
+				OpenTypeHistory.getInstance().save();
+			}
+		} finally {
+			result= super.close();
+		}
+		return result;
+	}
+	
+	public void setTitle(String title) {
+		super.setTitle(title);
+		fTitle= title;
+	}
+	
+	protected void computeResult() {
+		TypeNameMatch[] selected= fContent.getSelection();
+		if (selected == null || selected.length == 0) {
+			setResult(null);
+			return;
+		}
+		
+		// If the scope is null then it got computed by the type selection component.
+		if (fScope == null) {
+			fScope= fContent.getScope();
+		}
+		
+		OpenTypeHistory history= OpenTypeHistory.getInstance();
+		List result= new ArrayList(selected.length);
+		for (int i= 0; i < selected.length; i++) {
+			TypeNameMatch typeInfo= selected[i];
+			IType type= typeInfo.getType();
+			if (!type.exists()) {
+				String title= JavaUIMessages.TypeSelectionDialog_errorTitle; 
+				IPackageFragmentRoot root= typeInfo.getPackageFragmentRoot();
+				String containerName= JavaElementLabels.getElementLabel(root, JavaElementLabels.ROOT_QUALIFIED);
+				String message= Messages.format(JavaUIMessages.TypeSelectionDialog_dialogMessage, new String[] { typeInfo.getFullyQualifiedName(), containerName }); 
+				MessageDialog.openError(getShell(), title, message);
+				history.remove(typeInfo);
+				setResult(null);
+			} else {
+				history.accessed(typeInfo);
+				result.add(type);
+			}
+		}
+		setResult(result);
+	}
+	
+	private void ensureConsistency() throws InvocationTargetException, InterruptedException {
+		// we only have to ensure history consistency here since the search engine
+		// takes care of working copies.
+		class ConsistencyRunnable implements IRunnableWithProgress {
+			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+				if (fgFirstTime) {
+					// Join the initialize after load job.
+					IJobManager manager= Job.getJobManager();
+					manager.join(JavaUI.ID_PLUGIN, monitor);
+				}
+				OpenTypeHistory history= OpenTypeHistory.getInstance();
+				if (fgFirstTime || history.isEmpty()) {
+					monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 100);
+					if (history.needConsistencyCheck()) {
+						refreshSearchIndices(new SubProgressMonitor(monitor, 90));
+						history.checkConsistency(new SubProgressMonitor(monitor, 10));
+					} else {
+						refreshSearchIndices(monitor);
+					}
+					monitor.done();
+					fgFirstTime= false;
+				} else {
+					history.checkConsistency(monitor);
+				}
+			}
+			public boolean needsExecution() {
+				OpenTypeHistory history= OpenTypeHistory.getInstance();
+				return fgFirstTime || history.isEmpty() || history.needConsistencyCheck(); 
+			}
+			private void refreshSearchIndices(IProgressMonitor monitor) throws InvocationTargetException {
+				try {
+					new SearchEngine().searchAllTypeNames(
+						null,
+						0,
+						// make sure we search a concrete name. This is faster according to Kent  
+						"_______________".toCharArray(), //$NON-NLS-1$
+						SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE, 
+						IJavaSearchConstants.ENUM,
+						SearchEngine.createWorkspaceScope(), 
+						new TypeNameRequestor() {}, 
+						IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, 
+						monitor);
+				} catch (JavaModelException e) {
+					throw new InvocationTargetException(e);
+				}
+			}
+		}
+		ConsistencyRunnable runnable= new ConsistencyRunnable();
+		if (!runnable.needsExecution())
+			return;
+		IRunnableContext context= fRunnableContext != null 
+			? fRunnableContext 
+			: PlatformUI.getWorkbench().getProgressService();
+		context.run(true, true, runnable);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java
new file mode 100644
index 0000000..7fd3b65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/refactoring/RefactoringSaveHelper.java	
@@ -0,0 +1,236 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.refactoring;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.GlobalBuildAction;
+import org.eclipse.ui.dialogs.ListDialog;
+
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper}
+ */
+public class RefactoringSaveHelper {
+
+	private boolean fFilesSaved;
+	private final int fSaveMode;
+
+	/**
+	 * Save mode to save all dirty editors (always ask).
+	 */
+	public static final int SAVE_ALL_ALWAYS_ASK= 1;
+
+	/**
+	 * Save mode to save all dirty editors.
+	 */
+	public static final int SAVE_ALL= 2;
+
+	/**
+	 * Save mode to save all unknown editors, i.e. those that don't work on
+	 * resources, don't use file buffers, or are otherwise suspect.
+	 *
+	 * Used for refactorings with participants or qualified name updating.
+	 */
+	public static final int SAVE_NON_JAVA_UPDATES= 3;
+
+	/**
+	 * Save mode to save only dirty editors on compilation units that are not in
+	 * working copy mode.
+	 *
+	 * Used for refactorings without participants or qualified name updating.
+	 */
+	public static final int SAVE_JAVA_ONLY_UPDATES= 4;
+
+	/**
+	 * Save mode to not save save any editors.
+	 */
+	public static final int SAVE_NOTHING= 5;
+
+	/**
+	 * @param saveMode one of the SAVE_* constants
+	 */
+	public RefactoringSaveHelper(int saveMode) {
+		Assert.isTrue(saveMode == SAVE_ALL_ALWAYS_ASK
+				|| saveMode == SAVE_ALL
+				|| saveMode == SAVE_NON_JAVA_UPDATES
+				|| saveMode == SAVE_JAVA_ONLY_UPDATES
+				|| saveMode == SAVE_NOTHING);
+		fSaveMode= saveMode;
+	}
+
+	/**
+	 * @param shell
+	 * @return <code>true</code> if save was successful and refactoring can proceed;
+	 * 		false if the refactoring must be cancelled
+	 */
+	public boolean saveEditors(Shell shell) {
+		final IEditorPart[] dirtyEditors;
+		switch (fSaveMode) {
+			case SAVE_ALL_ALWAYS_ASK:
+			case SAVE_ALL:
+				dirtyEditors= EditorUtility.getDirtyEditors(true);
+				break;
+
+			case SAVE_NON_JAVA_UPDATES:
+				dirtyEditors= EditorUtility.getDirtyEditorsToSave(false); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=175495
+				break;
+
+			case SAVE_JAVA_ONLY_UPDATES:
+				dirtyEditors= EditorUtility.getDirtyEditorsToSave(false);
+				break;
+
+			case SAVE_NOTHING:
+				return true;
+
+			default:
+				throw new IllegalStateException(Integer.toString(fSaveMode));
+		}
+		if (dirtyEditors.length == 0)
+			return true;
+		if (! askSaveAllDirtyEditors(shell, dirtyEditors))
+			return false;
+		try {
+			// Save isn't cancelable.
+			IWorkspace workspace= ResourcesPlugin.getWorkspace();
+			IWorkspaceDescription description= workspace.getDescription();
+			boolean autoBuild= description.isAutoBuilding();
+			description.setAutoBuilding(false);
+			workspace.setDescription(description);
+			try {
+				if (fSaveMode == SAVE_ALL_ALWAYS_ASK || fSaveMode == SAVE_ALL
+						|| RefactoringSavePreferences.getSaveAllEditors()) {
+					if (!JavaPlugin.getActiveWorkbenchWindow().getWorkbench().saveAllEditors(false))
+						return false;
+				} else {
+					IRunnableWithProgress runnable= new IRunnableWithProgress() {
+						public void run(IProgressMonitor pm) throws InterruptedException {
+							int count= dirtyEditors.length;
+							pm.beginTask("", count); //$NON-NLS-1$
+							for (int i= 0; i < count; i++) {
+								IEditorPart editor= dirtyEditors[i];
+								editor.doSave(new SubProgressMonitor(pm, 1));
+								if (pm.isCanceled())
+									throw new InterruptedException();
+							}
+							pm.done();
+						}
+					};
+					try {
+						PlatformUI.getWorkbench().getProgressService().runInUI(JavaPlugin.getActiveWorkbenchWindow(), runnable, null);
+					} catch (InterruptedException e) {
+						return false;
+					} catch (InvocationTargetException e) {
+						ExceptionHandler.handle(e, shell,
+								RefactoringMessages.RefactoringStarter_saving, RefactoringMessages.RefactoringStarter_unexpected_exception);
+						return false;
+					}
+				}
+				fFilesSaved= true;
+			} finally {
+				description.setAutoBuilding(autoBuild);
+				workspace.setDescription(description);
+			}
+			return true;
+		} catch (CoreException e) {
+			ExceptionHandler.handle(e, shell,
+				RefactoringMessages.RefactoringStarter_saving, RefactoringMessages.RefactoringStarter_unexpected_exception);
+			return false;
+		}
+	}
+
+	public void triggerBuild() {
+		if (fFilesSaved && ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding()) {
+			new GlobalBuildAction(JavaPlugin.getActiveWorkbenchWindow(), IncrementalProjectBuilder.INCREMENTAL_BUILD).run();
+		}
+	}
+
+	private boolean askSaveAllDirtyEditors(Shell shell, IEditorPart[] dirtyEditors) {
+		final boolean canSaveAutomatically= fSaveMode != SAVE_ALL_ALWAYS_ASK;
+		if (canSaveAutomatically && RefactoringSavePreferences.getSaveAllEditors()) //must save everything
+			return true;
+		ListDialog dialog= new ListDialog(shell) {
+			{
+				setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL);
+			}
+			protected Control createDialogArea(Composite parent) {
+				Composite result= (Composite) super.createDialogArea(parent);
+				if (canSaveAutomatically) {
+					final Button check= new Button(result, SWT.CHECK);
+					check.setText(RefactoringMessages.RefactoringStarter_always_save);
+					check.setSelection(RefactoringSavePreferences.getSaveAllEditors());
+					check.addSelectionListener(new SelectionAdapter() {
+						public void widgetSelected(SelectionEvent e) {
+							RefactoringSavePreferences.setSaveAllEditors(check.getSelection());
+						}
+					});
+					applyDialogFont(result);
+				}
+				return result;
+			}
+		};
+		dialog.setTitle(RefactoringMessages.RefactoringStarter_save_all_resources);
+		dialog.setAddCancelButton(true);
+		dialog.setLabelProvider(createDialogLabelProvider());
+		dialog.setMessage(RefactoringMessages.RefactoringStarter_must_save);
+		dialog.setContentProvider(new ArrayContentProvider());
+		dialog.setInput(Arrays.asList(dirtyEditors));
+		return dialog.open() == Window.OK;
+	}
+
+	public boolean hasFilesSaved() {
+		return fFilesSaved;
+	}
+
+	private ILabelProvider createDialogLabelProvider() {
+		return new LabelProvider() {
+			public Image getImage(Object element) {
+				return ((IEditorPart) element).getTitleImage();
+			}
+			public String getText(Object element) {
+				return ((IEditorPart) element).getTitle();
+			}
+		};
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/util/PixelConverter.java b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/util/PixelConverter.java
new file mode 100644
index 0000000..128ed4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/internal compatibility/org/eclipse/jdt/internal/ui/util/PixelConverter.java	
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.util;
+
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
+
+import org.eclipse.jface.dialogs.Dialog;
+
+
+/**
+ * DO NOT REMOVE, used in a product.
+ * @deprecated As of 3.5, replaced by {@link org.eclipse.jface.layout.PixelConverter}
+ */
+public class PixelConverter {
+
+	private final FontMetrics fFontMetrics;
+
+	public PixelConverter(Control control) {
+		this(control.getFont());
+	}
+
+	public PixelConverter(Font font) {
+		GC gc = new GC(font.getDevice());
+		gc.setFont(font);
+		fFontMetrics= gc.getFontMetrics();
+		gc.dispose();
+	}
+
+	/*
+	 * see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int)
+	 */
+	public int convertHeightInCharsToPixels(int chars) {
+		return Dialog.convertHeightInCharsToPixels(fFontMetrics, chars);
+	}
+
+	/*
+	 * see org.eclipse.jface.dialogs.DialogPage#convertHorizontalDLUsToPixels(int)
+	 */
+	public int convertHorizontalDLUsToPixels(int dlus) {
+		return Dialog.convertHorizontalDLUsToPixels(fFontMetrics, dlus);
+	}
+
+	/*
+	 * see org.eclipse.jface.dialogs.DialogPage#convertVerticalDLUsToPixels(int)
+	 */
+	public int convertVerticalDLUsToPixels(int dlus) {
+		return Dialog.convertVerticalDLUsToPixels(fFontMetrics, dlus);
+	}
+
+	/*
+	 * see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int)
+	 */
+	public int convertWidthInCharsToPixels(int chars) {
+		return Dialog.convertWidthInCharsToPixels(fFontMetrics, chars);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JIJConstants.java b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JIJConstants.java
new file mode 100644
index 0000000..25be8bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JIJConstants.java	
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
+ *******************************************************************************/
+package org.eclipse.jdt.internal.jarinjarloader;
+
+
+/**
+ * Constants used in the Jar-in-Jar loader.
+ * 
+ * Some of these are duplicated in JIJConstants in the source for the Runnable Jar File Export Wizard:
+ * {@link org.eclipse.jdt.internal.ui.jarpackagerfat}.
+ * 
+ * @since 3.6
+ */
+final class JIJConstants {
+	
+	static final String REDIRECTED_CLASS_PATH_MANIFEST_NAME  = "Rsrc-Class-Path";  //$NON-NLS-1$
+	static final String REDIRECTED_MAIN_CLASS_MANIFEST_NAME  = "Rsrc-Main-Class";  //$NON-NLS-1$
+	static final String DEFAULT_REDIRECTED_CLASSPATH         = "";  //$NON-NLS-1$
+	static final String MAIN_METHOD_NAME                     = "main";  //$NON-NLS-1$
+	static final String JAR_INTERNAL_URL_PROTOCOL_WITH_COLON = "jar:rsrc:";  //$NON-NLS-1$
+	static final String JAR_INTERNAL_SEPARATOR               = "!/";  //$NON-NLS-1$
+	static final String INTERNAL_URL_PROTOCOL_WITH_COLON     = "rsrc:";  //$NON-NLS-1$
+	static final String INTERNAL_URL_PROTOCOL                = "rsrc";  //$NON-NLS-1$
+	static final String PATH_SEPARATOR                       = "/";  //$NON-NLS-1$
+	static final String CURRENT_DIR                          = "./";  //$NON-NLS-1$
+	static final String UTF8_ENCODING                        = "UTF-8";  //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.java b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.java
index bb72c58..7a51acd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/JarRsrcLoader.java	
@@ -9,6 +9,7 @@
  *     Ferenc Hechler - initial API and implementation
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262746 [jar exporter] Create a builder for jar-in-jar-loader.zip
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.jarinjarloader;
 
@@ -22,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.List;
 import java.util.jar.Attributes;
+import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 
 /**
@@ -44,21 +46,21 @@ public class JarRsrcLoader {
 		URL[] rsrcUrls = new URL[mi.rsrcClassPath.length];
 		for (int i = 0; i < mi.rsrcClassPath.length; i++) {
 			String rsrcPath = mi.rsrcClassPath[i];
-			if (rsrcPath.endsWith("/")) //$NON-NLS-1$
-				rsrcUrls[i] = new URL("rsrc:" + rsrcPath); //$NON-NLS-1$
+			if (rsrcPath.endsWith(JIJConstants.PATH_SEPARATOR)) 
+				rsrcUrls[i] = new URL(JIJConstants.INTERNAL_URL_PROTOCOL_WITH_COLON + rsrcPath); 
 			else
-				rsrcUrls[i] = new URL("jar:rsrc:" + rsrcPath+ "!/");  //$NON-NLS-1$//$NON-NLS-2$
+				rsrcUrls[i] = new URL(JIJConstants.JAR_INTERNAL_URL_PROTOCOL_WITH_COLON + rsrcPath + JIJConstants.JAR_INTERNAL_SEPARATOR);    
 		}
 		ClassLoader jceClassLoader = new URLClassLoader(rsrcUrls, null);
 		Thread.currentThread().setContextClassLoader(jceClassLoader);
 		Class c = Class.forName(mi.rsrcMainClass, true, jceClassLoader);
-		Method main = c.getMethod("main", new Class[]{args.getClass()}); //$NON-NLS-1$
+		Method main = c.getMethod(JIJConstants.MAIN_METHOD_NAME, new Class[]{args.getClass()}); 
 		main.invoke((Object)null, new Object[]{args});
 	}
 
 	private static ManifestInfo getManifestInfo() throws IOException {
 		Enumeration resEnum;
-		resEnum = Thread.currentThread().getContextClassLoader().getResources("META-INF/MANIFEST.MF"); //$NON-NLS-1$
+		resEnum = Thread.currentThread().getContextClassLoader().getResources(JarFile.MANIFEST_NAME); 
 		while (resEnum.hasMoreElements()) {
 			try {
 				URL url = (URL)resEnum.nextElement();
@@ -67,12 +69,12 @@ public class JarRsrcLoader {
 					ManifestInfo result = new ManifestInfo();
 					Manifest manifest = new Manifest(is);
 					Attributes mainAttribs = manifest.getMainAttributes();
-					result.rsrcMainClass = mainAttribs.getValue("Rsrc-Main-Class"); //$NON-NLS-1$
-					String rsrcCP = mainAttribs.getValue("Rsrc-Class-Path"); //$NON-NLS-1$
+					result.rsrcMainClass = mainAttribs.getValue(JIJConstants.REDIRECTED_MAIN_CLASS_MANIFEST_NAME); 
+					String rsrcCP = mainAttribs.getValue(JIJConstants.REDIRECTED_CLASS_PATH_MANIFEST_NAME); 
 					if (rsrcCP == null)
-						rsrcCP = ""; //$NON-NLS-1$
+						rsrcCP = JIJConstants.DEFAULT_REDIRECTED_CLASSPATH; 
 					result.rsrcClassPath = splitSpaces(rsrcCP);
-					if ((result.rsrcMainClass != null) && !result.rsrcMainClass.trim().equals(""))  //$NON-NLS-1$
+					if ((result.rsrcMainClass != null) && !result.rsrcMainClass.trim().equals(""))    //$NON-NLS-1$
 							return result;
 				}
 			}
@@ -80,7 +82,7 @@ public class JarRsrcLoader {
 				// Silently ignore wrong manifests on classpath?
 			}
 		}
-		System.err.println("Missing attributes for RsrcLoader in Manifest (Rsrc-Main-Class, Rsrc-Class-Path)"); //$NON-NLS-1$
+		System.err.println("Missing attributes for JarRsrcLoader in Manifest ("+JIJConstants.REDIRECTED_MAIN_CLASS_MANIFEST_NAME+", "+JIJConstants.REDIRECTED_CLASS_PATH_MANIFEST_NAME+")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.java b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.java
index 23ddad8..e817da6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLConnection.java	
@@ -9,6 +9,7 @@
  *     Ferenc Hechler - initial API and implementation
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262746 [jar exporter] Create a builder for jar-in-jar-loader.zip
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.jarinjarloader;
 
@@ -39,7 +40,7 @@ public class RsrcURLConnection extends URLConnection {
 	}
 
 	public InputStream getInputStream() throws IOException {
-		String file= URLDecoder.decode(url.getFile(), "UTF-8"); //$NON-NLS-1$
+		String file= URLDecoder.decode(url.getFile(), JIJConstants.UTF8_ENCODING);
 		InputStream result= classLoader.getResourceAsStream(file);
 		if (result == null) {
 			throw new MalformedURLException("Could not open InputStream for URL '" + url + "'"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java
index df478ad..891904d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandler.java	
@@ -9,6 +9,7 @@
  *     Ferenc Hechler - initial API and implementation
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262746 [jar exporter] Create a builder for jar-in-jar-loader.zip
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.jarinjarloader;
 
@@ -39,15 +40,15 @@ public class RsrcURLStreamHandler extends java.net.URLStreamHandler {
 
     protected void parseURL(URL url, String spec, int start, int limit) {
     	String file;
-    	if (spec.startsWith("rsrc:"))  //$NON-NLS-1$
+    	if (spec.startsWith(JIJConstants.INTERNAL_URL_PROTOCOL_WITH_COLON))  
     		file = spec.substring(5);
-    	else if (url.getFile().equals("./")) //$NON-NLS-1$
+    	else if (url.getFile().equals(JIJConstants.CURRENT_DIR))
     		file = spec;
-    	else if (url.getFile().endsWith("/")) //$NON-NLS-1$
+    	else if (url.getFile().endsWith(JIJConstants.PATH_SEPARATOR)) 
     		file = url.getFile() + spec;
     	else 
     		file = spec;
-    	setURL(url, "rsrc", "", -1, null, null, file, null, null);	 //$NON-NLS-1$ //$NON-NLS-2$
+    	setURL(url, JIJConstants.INTERNAL_URL_PROTOCOL, "", -1, null, null, file, null, null);	 //$NON-NLS-1$ 
     }
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.java
index fdb9489..cd6d717 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/jar in jar loader/org/eclipse/jdt/internal/jarinjarloader/RsrcURLStreamHandlerFactory.java	
@@ -9,6 +9,7 @@
  *     Ferenc Hechler - initial API and implementation
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262746 [jar exporter] Create a builder for jar-in-jar-loader.zip
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.jarinjarloader;
 
@@ -31,7 +32,7 @@ public class RsrcURLStreamHandlerFactory implements URLStreamHandlerFactory {
 	}
 
 	public URLStreamHandler createURLStreamHandler(String protocol) {
-		if ("rsrc".equals(protocol)) //$NON-NLS-1$
+		if (JIJConstants.INTERNAL_URL_PROTOCOL.equals(protocol)) 
 			return new RsrcURLStreamHandler(classLoader);
 		if (chainFac != null)
 			return chainFac.createURLStreamHandler(protocol);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/plugin.properties b/eclipse/plugins/org.eclipse.jdt.ui/plugin.properties
index 8816862..b056a7d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 #     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 83258 [jar exporter] Deploy java application as executable jar
+#     Troy Bishop <tjbishop at ca.ibm.com> - Add support for importing/exporting Java Code Style preferences - https://bugs.eclipse.org/bugs/show_bug.cgi?id=304395
 ###############################################################################
 
 pluginName= Java Development Tools UI
@@ -70,7 +71,7 @@ typeHierarchy.perspective.description=This perspective is designed to support Ja
 
 viewCategoryName=Java
 packagesViewName= Package Explorer
-hierarchyViewName=Hierarchy
+hierarchyViewName=Type Hierarchy
 newWizardCategoryName=Java
 commonNavigatorContentName=Java Elements
 
@@ -104,7 +105,7 @@ preferenceKeywords.codetemplates=Java comment code getter setter Javadoc codesty
 preferenceKeywords.organizeimports=Java static imports order codestyle project specific packages
 preferenceKeywords.compliance=Java compliance level identifier assert enum debug compatibility jdk 1.1 1.2 1.3 1.4 1.5 5.0 1.6 6.0 CLDC J2SE5 classfile compiler project specific projectspecific
 preferenceKeywords.building=Java build path buildpath problem exclusion inclusion pattern folder outputfolder filtered resource output compiler 1.5 5.0 J2SE5 project specific projectspecific strictly compatible JRE execution environment
-preferenceKeywords.severities=Java errors warnings ignore compiler options nls externalize string severity severities jdk 5.0 1.5 J2SE5 deprecated static access member serializable serialVersionUID assignment effect finally empty char array catch shadowing package visible interface object method deprecated forbidden discouraged reference unused code unnecessary import imports private cast instanceof local variable parameter thrown exception final type bound generic vararg boxing unboxing autoboxing annotation @Override @Deprecated @SuppressWarnings enum constants switch project specific projectspecific raw null synchronized problem identical equals hashcode dead code
+preferenceKeywords.severities=Java errors warnings ignore compiler options nls externalize string severity severities jdk 5.0 1.5 J2SE5 deprecated static access member serializable serialVersionUID assignment effect finally empty char array catch shadowing package visible interface object method deprecated forbidden discouraged reference unused code unnecessary import imports private cast instanceof local variable parameter thrown exception final type bound generic vararg boxing unboxing autoboxing annotation @Override @Deprecated @SuppressWarnings enum constants switch project specific projectspecific raw null synchronized problem identical equals hashcode dead code missing
 preferenceKeywords.javadocproblems=Java tag problem missing deprecated non visible severity severities level comment compiler project specific projectspecific
 preferenceKeywords.todo=Java case sensitive task tag todo xxx fix fixme compiler project specific projectspecific comments
 preferenceKeywords.javaeditor=Java java editor quick assist appearance navigation colors light bulb smart caret positioning highlight matching bracket foreground background show selected only save action participant clean up
@@ -121,6 +122,16 @@ preferenceKeywords.propertieseditor=Java editor colors properties nls externaliz
 preferenceKeywords.saveparticipant=Java editor save cleanup participants organize imports format
 preferenceKeywords.classpathcontainer=Java classpath container buildpath jre
 
+preferenceKeywords.wizards.java=Java
+preferenceKeywords.jarpackager=Java archive application
+
+preferenceTransfer.java.compiler.name= Java Compiler Preferences
+preferenceTransfer.java.compiler.description= Java > Compiler preferences.
+preferenceTransfer.java.appearance.name= Java Appearance Preferences
+preferenceTransfer.java.appearance.description= Java > Appearance preferences.
+preferenceTransfer.java.codestyle.name= Java Code Style Preferences
+preferenceTransfer.java.codestyle.description= Java > Code Style preferences
+
 sourceAttachmentPageName=Java Source Attachment
 ClassFileViewerName=Class File Viewer
 jarDescEditorName=JAR Export Wizard
@@ -296,7 +307,7 @@ Refactoring.renameAction.label=Re&name...
 Refactoring.moveAction.label=&Move...
 Refactoring.modifyParametersAction.label=&Change Method Signature...
 Refactoring.convertAnonymousToNestedAction.label=C&onvert Anonymous Class to Nested...
-Refactoring.convertNestedToTopAction.label=Con&vert Member Type to Top Level...
+Refactoring.convertNestedToTopAction.label=Mo&ve Type to New File...
 
 Refactoring.pushDownAction.label=Push &Down...
 Refactoring.pullUpAction.label=Pull &Up...
@@ -390,10 +401,13 @@ GoToPackageAction.label=&Package...
 OpenAction.label=&Open
 OpenAction.tooltip=Open an Editor on the Selected Element
 
+OpenImplementationAction.label=O&pen Implementation
+OpenImplementationAction.tooltip=Opens the Implementations of a Method in its Hierarchy
+
 OpenSuperImplementationAction.label=Open &Super Implementation
-OpenSuperImplementationAction.tooltip=Opens the Implementation of the Method in a Super Class, when Super Class Exists.
+OpenSuperImplementationAction.tooltip=Opens the Implementation of the Method in a Super Class, when Super Class Exists
 
-OpenExternalJavadocAction.label=Open External &Javadoc
+OpenAttachedJavadocAction.label=Open Attached &Javadoc
 
 OpenTypeHierarchyAction.label=Ope&n Type Hierarchy
 
@@ -707,8 +721,8 @@ ActionDefinition.externalizeStrings.description=Finds all strings that are not e
 ActionDefinition.findNLSProblems.name= Find Broken Externalized Strings
 ActionDefinition.findNLSProblems.description=Finds undefined, duplicate and unused externalized string keys in property files
 
-ActionDefinition.indent.name= Indent Line
-ActionDefinition.indent.description=Indents the current line
+ActionDefinition.indent.name= Correct Indentation
+ActionDefinition.indent.description=Corrects the indentation of the selected lines
 
 ActionDefinition.corrections.renameInFile.name=Quick Assist - Rename in file
 ActionDefinition.corrections.renameInFile.description=Invokes quick assist and selects 'Rename in file'
@@ -831,8 +845,8 @@ ActionDefinition.extractSupertype.description= Extract a set of members into a n
 ActionDefinition.changeType.name= Generalize Declared Type
 ActionDefinition.changeType.description= Change the declaration of a selected variable to a more general type consistent with usage
 
-ActionDefinition.convertNestedToTopLevel.name= Convert Member Type to Top Level
-ActionDefinition.convertNestedToTopLevel.description= Convert member type to top level
+ActionDefinition.convertNestedToTopLevel.name= Move Type to New File
+ActionDefinition.convertNestedToTopLevel.description= Move Type to New File
 
 ActionDefinition.useSupertype.name= Use Supertype Where Possible
 ActionDefinition.useSupertype.description= Change occurrences of a type to use a supertype instead
@@ -878,11 +892,14 @@ ActionDefinition.gotoType.description= Go to Type
 ActionDefinition.openEditor.name= Open Declaration
 ActionDefinition.openEditor.description= Open an editor on the selected element
 
+ActionDefinition.openImplementation.name= Open Implementation
+ActionDefinition.openImplementation.description= Opens the Implementations of a method in its hierarchy
+
 ActionDefinition.openSuperImplementation.name= Open Super Implementation
 ActionDefinition.openSuperImplementation.description= Open the Implementation in the Super Type
 
-ActionDefinition.openExternalJavadoc.name= Open External Javadoc
-ActionDefinition.openExternalJavadoc.description= Open the Javadoc of the selected element in an external browser
+ActionDefinition.openAttachedJavadoc.name= Open Attached Javadoc
+ActionDefinition.openAttachedJavadoc.description= Open the attached Javadoc of the selected element in a browser
 
 ActionDefinition.openTypeHierarchy.name= Open Type Hierarchy
 ActionDefinition.openTypeHierarchy.description= Open a type hierarchy on the selected element
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/plugin.xml b/eclipse/plugins/org.eclipse.jdt.ui/plugin.xml
index fe4b5ff..bd8f3e3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.jdt.ui/plugin.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?>
 <!-- ====================================================================== -->
-<!-- Copyright (c) 2000, 2009 IBM Corporation and others.                   -->
+<!-- Copyright (c) 2000, 2010 IBM Corporation and others.                   -->
 <!-- All rights reserved. This program and the accompanying materials       -->
 <!-- are made available under the terms of the Eclipse Public License v1.0  -->
 <!-- which accompanies this distribution, and is available at               -->
@@ -10,6 +10,7 @@
 <!-- Contributors:                                                          -->
 <!--     IBM Corporation - initial API and implementation                   -->
 <!--     Francis Upton IV, Oakland Software <francisu at ieee.org> - Add support for Go Into with the ProjectExplorer - https://bugs.eclipse.org/bugs/show_bug.cgi?id=262091 -->
+<!--     Troy Bishop <tjbishop at ca.ibm.com> - Add support for importing/exporting Java Code Style preferences - https://bugs.eclipse.org/bugs/show_bug.cgi?id=304395 -->
 <!-- ====================================================================== -->
 <plugin>
 
@@ -548,34 +549,27 @@
       </perspectiveExtension>
 
       <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
-         <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
-         <perspectiveShortcut id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
          <showInPart id="org.eclipse.jdt.ui.PackageExplorer"/>
          <showInPart id="org.eclipse.team.ui.GenericHistoryView"/>
          <showInPart id="org.eclipse.ui.views.ResourceNavigator"/>
-         <viewShortcut id="org.eclipse.pde.runtime.LogView"/>
+         <showInPart id="org.eclipse.ui.navigator.ProjectExplorer"/>
       </perspectiveExtension>
       
       <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaBrowsingPerspective">
-         <perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
-         <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
          <showInPart id="org.eclipse.jdt.ui.PackageExplorer"/>
          <showInPart id="org.eclipse.team.ui.GenericHistoryView"/>
          <showInPart id="org.eclipse.ui.views.ResourceNavigator"/>
-         <viewShortcut id="org.eclipse.pde.runtime.LogView"/>
+         <showInPart id="org.eclipse.ui.navigator.ProjectExplorer"/>
       </perspectiveExtension>
       
       <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaHierarchyPerspective">
-         <perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
-         <perspectiveShortcut id="org.eclipse.jdt.ui.JavaBrowsingPerspective"/>
-         <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
          <showInPart id="org.eclipse.jdt.ui.PackageExplorer"/>
-         <showInPart id="org.eclipse.team.ui.GenericHistoryView"/>        
+         <showInPart id="org.eclipse.team.ui.GenericHistoryView"/>
          <showInPart id="org.eclipse.ui.views.ResourceNavigator"/>
-         <viewShortcut id="org.eclipse.pde.runtime.LogView"/>
+         <showInPart id="org.eclipse.ui.navigator.ProjectExplorer"/>
       </perspectiveExtension>
-            
    </extension>
+   
    <extension
          point="org.eclipse.ui.ide.projectNatureImages">
       <image
@@ -623,6 +617,7 @@
          <description>
             %NewJavaProject.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewJavaPackage.label"
@@ -633,6 +628,7 @@
          <description>
             %NewJavaPackage.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewJavaClass.label"
@@ -645,6 +641,7 @@
          <description>
             %NewJavaClass.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewJavaInterface.label"
@@ -657,6 +654,7 @@
          <description>
             %NewJavaInterface.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewSourceFolderCreationWizard.label"
@@ -667,6 +665,7 @@
          <description>
             %NewSourceFolderCreationWizard.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewEnumType.label"
@@ -679,6 +678,7 @@
          <description>
             %NewEnumType.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewAnnotationType.label"
@@ -691,10 +691,11 @@
          <description>
             %NewAnnotationType.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>
       <wizard
             name="%NewJavaWorkingSetWizard.label"
-            icon="$nl$/icons/full/obj16/jworkingSet_obj.gif"
+            icon="$nl$/icons/full/etool16/newjworkingSet_wiz.gif"
             category="org.eclipse.jdt.ui.java"
             class="org.eclipse.jdt.internal.ui.wizards.NewJavaWorkingSetWizard"
             preferredPerspectives="org.eclipse.jdt.ui.JavaPerspective,org.eclipse.jdt.ui.JavaBrowsingPerspective,org.eclipse.jdt.ui.JavaHierarchyPerspective"
@@ -702,6 +703,7 @@
          <description>
             %NewJavaWorkingSetWizard.description
          </description>
+         <keywordReference id="org.eclipse.jdt.ui.wizards.java"/>
       </wizard>      
       
    </extension>
@@ -1693,6 +1695,13 @@
      <keyword
             label="%preferenceKeywords.classpathcontainer"
             id="org.eclipse.jdt.ui.classpathcontainer"/>
+            
+     <keyword
+            label="%preferenceKeywords.wizards.java"
+            id="org.eclipse.jdt.ui.wizards.java"/>
+     <keyword
+            label="%preferenceKeywords.jarpackager"
+            id="org.eclipse.jdt.ui.jarpackager"/>
    </extension>  
 <!-- =========================================================================== -->
 <!-- Work in Progress                                                            -->
@@ -1746,6 +1755,16 @@
          </action>
       </actionSet>
    </extension>
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="*">
+         <hiddenToolBarItem
+               id="org.eclipse.jdt.ui.actions.OpenProjectWizard">
+         </hiddenToolBarItem>
+      </perspectiveExtension>
+   </extension>
+   
 <!-- =========================================================================== -->
 <!-- Java Search Page                                                            -->
 <!-- =========================================================================== -->
@@ -2035,6 +2054,7 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference id="org.eclipse.jdt.ui.jarpackager"/>
       </wizard>
       <wizard
             name="%fatJarExportWizard.label"
@@ -2048,6 +2068,7 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference id="org.eclipse.jdt.ui.jarpackager"/>
       </wizard>
    </extension>
    <extension
@@ -2339,7 +2360,7 @@
 <!-- =========================================================================== -->
          <action
                definitionId="org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"
-               label="%OpenExternalJavadocAction.label"
+               label="%OpenAttachedJavadocAction.label"
                retarget="true"
                allowLabelUpdate="true"
                menubarPath="navigate/open.ext"
@@ -2354,6 +2375,14 @@
                id="org.eclipse.jdt.ui.actions.OpenSuperImplementation">
          </action>
          <action
+               definitionId="org.eclipse.jdt.ui.edit.text.java.open.implementation"
+               label="%OpenImplementationAction.label"
+               tooltip="%OpenImplementationAction.tooltip"
+               retarget="true"
+               menubarPath="navigate/open.ext"
+               id="org.eclipse.jdt.ui.actions.OpenImplementation">
+         </action>
+         <action
                definitionId="org.eclipse.jdt.ui.navigate.gotopackage"
                label="%GoToPackageAction.label"
                retarget="true"
@@ -2440,13 +2469,6 @@
          
 <!-- reorg group 2 -->
          <action
-               definitionId="org.eclipse.jdt.ui.edit.text.java.promote.local.variable"
-               label="%Refactoring.convertLocalToFieldAction.label"
-               retarget="true"
-               menubarPath="org.eclipse.jdt.ui.refactoring.menu/reorgGroup2"
-               id="org.eclipse.jdt.ui.actions.ConvertLocalToField">
-         </action>
-         <action
                definitionId="org.eclipse.jdt.ui.edit.text.java.move.inner.to.top.level"
                label="%Refactoring.convertNestedToTopAction.label"
                retarget="true"
@@ -2460,6 +2482,13 @@
                menubarPath="org.eclipse.jdt.ui.refactoring.menu/reorgGroup2"
                id="org.eclipse.jdt.ui.actions.ConvertAnonymousToNested">
          </action>
+         <action
+               definitionId="org.eclipse.jdt.ui.edit.text.java.promote.local.variable"
+               label="%Refactoring.convertLocalToFieldAction.label"
+               retarget="true"
+               menubarPath="org.eclipse.jdt.ui.refactoring.menu/reorgGroup2"
+               id="org.eclipse.jdt.ui.actions.ConvertLocalToField">
+         </action>    
          
          
          
@@ -3900,14 +3929,20 @@
             id="org.eclipse.jdt.ui.edit.text.java.open.editor">
       </command>
       <command
+            name="%ActionDefinition.openImplementation.name"
+            description="%ActionDefinition.openImplementation.description"
+            categoryId="org.eclipse.ui.category.navigate"
+            id="org.eclipse.jdt.ui.edit.text.java.open.implementation">
+      </command>
+      <command
             name="%ActionDefinition.openSuperImplementation.name"
             description="%ActionDefinition.openSuperImplementation.description"
             categoryId="org.eclipse.ui.category.navigate"
             id="org.eclipse.jdt.ui.edit.text.java.open.super.implementation">
       </command>
       <command
-            name="%ActionDefinition.openExternalJavadoc.name"
-            description="%ActionDefinition.openExternalJavadoc.description"
+            name="%ActionDefinition.openAttachedJavadoc.name"
+            description="%ActionDefinition.openAttachedJavadoc.description"
             categoryId="org.eclipse.ui.category.navigate"
             id="org.eclipse.jdt.ui.edit.text.java.open.external.javadoc">
       </command>
@@ -5899,7 +5934,7 @@
 		        class="org.eclipse.jdt.internal.ui.filters.EnumFilter"
 		        name="%HideEnum.label"
 		        description="%HideEnum.description"
-		        id="org.eclipse.jdt.java.ui.filters.HideAnnotations"/>
+		        id="org.eclipse.jdt.java.ui.filters.HideEnums"/>
   		<commonFilter 
 		        class="org.eclipse.jdt.internal.ui.filters.InterfaceFilter"
 		        name="%HideInterface.label"
@@ -6605,4 +6640,95 @@
       </cleanUp>
    </extension>
 
+  <extension
+         point="org.eclipse.ui.preferenceTransfer">
+       <transfer
+            id="org.eclipse.jdt.internal.core.transfer.compiler"
+            icon="$nl$/icons/full/eview16/jperspective.gif"
+            name="%preferenceTransfer.java.compiler.name">
+            <mapping scope="instance">
+               <entry node="org.eclipse.jdt.core">
+                  <key name="org.eclipse.jdt.core.compiler." match="prefix"/>
+                  <key name="org.eclipse.jdt.core.builder." match="prefix"/>
+                  <key name="org.eclipse.jdt.core.classpath." match="prefix"/>
+                  <key name="org.eclipse.jdt.core.circularClasspath"/>
+                  <key name="org.eclipse.jdt.core.incompatibleJDKLevel"/>
+                  <key name="org.eclipse.jdt.core.incompleteClasspath"/>
+               </entry>
+               <entry node="org.eclipse.jdt.launching">
+                  <key name="org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE"/>
+               </entry>
+            </mapping>
+            <description>
+               %preferenceTransfer.java.compiler.description
+            </description>
+      </transfer>
+       <transfer
+            id="org.eclipse.jdt.internal.ui.transfer.appearance"
+            icon="$nl$/icons/full/eview16/jperspective.gif"
+            name="%preferenceTransfer.java.appearance.name">
+            <mapping scope="instance">
+               <entry node="org.eclipse.jdt.ui">
+                  <key name="org.eclipse.jdt.ui.typefilter." match="prefix"/>
+                  <key name="org.eclipse.jdt.ui.category"/>
+                  <key name="org.eclipse.jdt.ui.compresspackagenames"/>
+                  <key name="org.eclipse.jdt.ui.flatPackagesInPackageExplorer"/>
+                  <key name="org.eclipse.jdt.ui.methodreturntype"/>
+                  <key name="org.eclipse.jdt.ui.methodtypeparametesr"/>
+                  <key name="PackagesView.pkgNamePatternForPackagesView"/>
+                  <key name="org.eclipse.jdt.ui.packages.cuchildren"/>
+                  <key name="org.eclipse.jdt.ui.browsing.stackVertically"/>
+                  <key name="org.eclipse.jdt.ui.visibility.order"/>
+                  <key name="org.eclipse.jdt.ui.enable.visibility.order"/>
+                  <key name="outlinesortoption"/>
+                  <key name="org.eclipse.jdt.ui.abbreviatepackagenames"/>
+                  <key name="org.eclipse.jdt.ui.pkgNameAbbreviationPatternForPackagesView"/>
+               </entry>
+            </mapping>
+            <description>
+               %preferenceTransfer.java.appearance.description
+            </description>
+      </transfer>
+       <transfer
+             id="org.eclipse.jdt.internal.ui.transfer.codestyle"
+             icon="$nl$/icons/full/eview16/jperspective.gif"
+             name="%preferenceTransfer.java.codestyle.name">
+          <mapping scope="instance">
+             <entry node="org.eclipse.jdt.ui">
+                <key name="org.eclipse.jdt.ui.keywordthis" />
+                <key name="org.eclipse.jdt.ui.gettersetter.use.is" />
+                <key name="org.eclipse.jdt.ui.exception.name" />
+                <key name="org.eclipse.jdt.ui.overrideannotation" />
+                <key name="cleanup." match="prefix" />
+                <key name="org.eclipse.jdt.ui.cleanupprofiles" />
+                <key name="cleanup_profile" />
+                <key name="cleanup_settings_version" />
+                <key name="org.eclipse.jdt.ui.importorder" />
+                <key name="org.eclipse.jdt.ui.ondemandthreshold" />
+                <key name="org.eclipse.jdt.ui.staticondemandthreshold" />
+                <key name="org.eclipse.jdt.ui.ignorelowercasenames" />
+                <key name="formatter_profile" />
+                <key name="formatter_settings_version" />
+                <key name="org.eclipse.jdt.ui.formatterprofiles" match="prefix" />
+                <key name="org.eclipse.jdt.ui.text.custom_code_templates" />
+                <key name="org.eclipse.jdt.ui.javadoc" />
+             </entry>
+             <entry node="org.eclipse.jdt.core">
+                <key name="org.eclipse.jdt.core.codeComplete.fieldPrefixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.fieldSuffixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.staticFieldPrefixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.staticFieldSuffixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.argumentPrefixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.argumentSuffixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.localPrefixes" />
+                <key name="org.eclipse.jdt.core.codeComplete.localSuffixes" />
+             </entry>
+          </mapping>
+          <description>
+             %preferenceTransfer.java.codestyle.description
+          </description>
+       </transfer>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/templates/default-codetemplates.xml b/eclipse/plugins/org.eclipse.jdt.ui/templates/default-codetemplates.xml
index 5121ec6..22faa1f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/templates/default-codetemplates.xml
+++ b/eclipse/plugins/org.eclipse.jdt.ui/templates/default-codetemplates.xml
@@ -2,7 +2,7 @@
 
 <!--
 /*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * Copyright (c) 2000, 2006 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionsControl.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionsControl.java
index 1b7a7df..414913a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionsControl.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ChangeExceptionsControl.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -102,7 +102,7 @@ public class ChangeExceptionsControl extends Composite {
 		}
 		public String getColumnText(Object element, int columnIndex) {
 			ExceptionInfo info= (ExceptionInfo) element;
-			return BasicElementLabels.getJavaElementName(info.getType().getFullyQualifiedName('.'));
+			return BasicElementLabels.getJavaElementName(info.getFullyQualifiedName());
 		}
 	}
 
@@ -282,7 +282,7 @@ public class ChangeExceptionsControl extends Composite {
 	private ExceptionInfo findExceptionInfo(IType exception) {
 		for (Iterator iter= fExceptionInfos.iterator(); iter.hasNext(); ) {
 			ExceptionInfo info= (ExceptionInfo) iter.next();
-			if (info.getType().equals(exception))
+			if (info.getElement().equals(exception))
 				return info;
 		}
 		return null;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractClassWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractClassWizard.java
index fb8e990..f429767 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractClassWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractClassWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -289,6 +289,7 @@ public class ExtractClassWizard extends RefactoringWizard {
 			tv.refresh(true);
 			gridData= new GridData(GridData.FILL_BOTH);
 			gridData.heightHint= SWTUtil.getTableHeightHint(table, Math.max(fields.length,5));
+			gridData.widthHint= convertWidthInCharsToPixels(50);
 			layoutComposite.setLayoutData(gridData);
 			Composite controls= new Composite(result, SWT.NONE);
 			gridData= new GridData(GridData.FILL, GridData.FILL, false, false);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractInterfaceWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractInterfaceWizard.java
index 948d4a6..6d8718c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractInterfaceWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ExtractInterfaceWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,12 +77,14 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 		private Button fReplaceAllCheckbox;
 		private Button fDeclarePublicCheckbox;
 		private Button fDeclareAbstractCheckbox;
+		private Button fGenerateAnnotationsCheckbox;
 		private Button fGenerateCommentsCheckbox;
 		private Button fInstanceofCheckbox;
 		private CheckboxTableViewer fTableViewer;
 		private static final String DESCRIPTION = RefactoringMessages.ExtractInterfaceInputPage_description;
 		private static final String SETTING_PUBLIC= 		"Public";//$NON-NLS-1$
 		private static final String SETTING_ABSTRACT= 		"Abstract";//$NON-NLS-1$
+		private static final String SETTING_ANNOTATIONS= 		"Annotations";//$NON-NLS-1$
 		private static final String SETTING_REPLACE= "Replace"; //$NON-NLS-1$
 		private static final String SETTING_COMMENTS= "Comments"; //$NON-NLS-1$
 		private static final String SETTING_INSTANCEOF= "InstanceOf"; //$NON-NLS-1$
@@ -121,6 +123,7 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 			});
 			addDeclareAsPublicCheckbox(result);
 			addDeclareAsAbstractCheckbox(result);
+			addGenerateAnnotationsCheckbox(result);
 
 			Label separator= new Label(result, SWT.NONE);
 			GridData gd= new GridData();
@@ -142,6 +145,17 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 			PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.EXTRACT_INTERFACE_WIZARD_PAGE);
 		}
 
+		private void addGenerateAnnotationsCheckbox(Composite result) {
+			String title= RefactoringMessages.ExtractInterfaceWizard_generate_annotations;
+			fGenerateAnnotationsCheckbox= createCheckbox(result,  title, false);
+			fProcessor.setAnnotations(fGenerateAnnotationsCheckbox.getSelection());
+			fGenerateAnnotationsCheckbox.addSelectionListener(new SelectionAdapter(){
+				public void widgetSelected(SelectionEvent e) {
+					fProcessor.setAnnotations(fGenerateAnnotationsCheckbox.getSelection());
+				}
+			});		
+		}
+
 		private void addGenerateCommentsCheckbox(Composite result) {
 			String title= RefactoringMessages.ExtractInterfaceWizard_generate_comments;
 			fGenerateCommentsCheckbox= createCheckbox(result,  title, false);
@@ -219,6 +233,7 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 			final boolean enabled= containsMethods(checked);
 			fDeclarePublicCheckbox.setEnabled(enabled);
 			fDeclareAbstractCheckbox.setEnabled(enabled);
+			fGenerateAnnotationsCheckbox.setEnabled(enabled);
 			fGenerateCommentsCheckbox.setEnabled(enabled);
 			fInstanceofCheckbox.setEnabled(fReplaceAllCheckbox.getSelection());
 			fSelectAllButton.setEnabled(checked.length < extractable.length);
@@ -378,6 +393,7 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 			fProcessor.setExtractedMembers(getCheckedMembers());
 			fProcessor.setAbstract(fDeclareAbstractCheckbox.getSelection());
 			fProcessor.setPublic(fDeclarePublicCheckbox.getSelection());
+			fProcessor.setAnnotations(fGenerateAnnotationsCheckbox.getSelection());
 			fProcessor.setComments(fGenerateCommentsCheckbox.getSelection());
 			fProcessor.setInstanceOf(fInstanceofCheckbox.getSelection());
 		}
@@ -398,6 +414,7 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 		private void initializeCheckboxes() {
 			initializeCheckBox(fDeclarePublicCheckbox, SETTING_PUBLIC, true);
 			initializeCheckBox(fDeclareAbstractCheckbox, SETTING_ABSTRACT, true);
+			initializeCheckBox(fGenerateAnnotationsCheckbox, SETTING_ANNOTATIONS, true);				
 			initializeCheckBox(fReplaceAllCheckbox, SETTING_REPLACE, true);
 			initializeCheckBox(fGenerateCommentsCheckbox, SETTING_COMMENTS, true);
 			initializeCheckBox(fInstanceofCheckbox, SETTING_INSTANCEOF, false);
@@ -415,6 +432,7 @@ public class ExtractInterfaceWizard extends RefactoringWizard {
 			final IDialogSettings settings= JavaPlugin.getDefault().getDialogSettings();
 			settings.put(SETTING_PUBLIC, fDeclarePublicCheckbox.getSelection());
 			settings.put(SETTING_ABSTRACT, fDeclareAbstractCheckbox.getSelection());
+			settings.put(SETTING_ANNOTATIONS, fGenerateAnnotationsCheckbox.getSelection());
 			settings.put(SETTING_REPLACE, fReplaceAllCheckbox.getSelection());
 			settings.put(SETTING_COMMENTS, fGenerateCommentsCheckbox.getSelection());
 			settings.put(SETTING_INSTANCEOF, fInstanceofCheckbox.getSelection());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/IntroduceIndirectionInputPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/IntroduceIndirectionInputPage.java
index 61e933a..70ccd93 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/IntroduceIndirectionInputPage.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/IntroduceIndirectionInputPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -165,7 +165,7 @@ public class IntroduceIndirectionInputPage extends UserInputWizardPage {
 				if (intermediaryType == null)
 					return;
 
-				fIntermediaryTypeName.setText(intermediaryType.getFullyQualifiedName());
+				fIntermediaryTypeName.setText(intermediaryType.getFullyQualifiedName('.'));
 			}
 		});
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/MoveMembersWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/MoveMembersWizard.java
index f0e2bcc..e94619a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/MoveMembersWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/MoveMembersWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -102,9 +102,12 @@ public class MoveMembersWizard extends RefactoringWizard {
 
 		public void setVisible(boolean visible){
 			if (visible){
-				String message= Messages.format(RefactoringMessages.MoveMembersInputPage_descriptionKey,
-					new String[]{new Integer(getMoveProcessor().getMembersToMove().length).toString(),
-								    JavaElementLabels.getElementLabel(getMoveProcessor().getDeclaringType(), JavaElementLabels.ALL_FULLY_QUALIFIED)});
+				IMember[] membersToMove= getMoveProcessor().getMembersToMove();
+				int membersToMoveCount= membersToMove.length;
+				String label= JavaElementLabels.getElementLabel(getMoveProcessor().getDeclaringType(), JavaElementLabels.ALL_FULLY_QUALIFIED);
+				String message= membersToMoveCount == 1 ? Messages.format(RefactoringMessages.MoveMembersInputPage_descriptionKey_singular, new String[] {
+						JavaElementLabels.getTextLabel(membersToMove[0], JavaElementLabels.ALL_FULLY_QUALIFIED), label }) : Messages.format(
+						RefactoringMessages.MoveMembersInputPage_descriptionKey_plural, new String[] { new Integer(membersToMoveCount).toString(), label });
 				setDescription(message);
 			}
 			super.setVisible(visible);
@@ -299,7 +302,7 @@ public class MoveMembersWizard extends RefactoringWizard {
 				return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, Messages.format(RefactoringMessages.MoveMembersInputPage_not_found, BasicElementLabels.getJavaElementName(typeName)), null);
 			if (type.isBinary())
 				return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, RefactoringMessages.MoveMembersInputPage_no_binary, null);
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		}
 
 		private MoveStaticMembersProcessor getMoveProcessor() {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java
index 17834d6..11e9f1c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/ParameterEditDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -181,7 +181,7 @@ public class ParameterEditDialog extends StatusDialog {
 				return;
 			}
 		}
-		updateStatus(createOkStatus());
+		updateStatus(Status.OK_STATUS);
 	}
 
 	private IStatus validateType() {
@@ -191,7 +191,7 @@ public class ParameterEditDialog extends StatusDialog {
 
 		RefactoringStatus status= TypeContextChecker.checkParameterTypeSyntax(type, fContext.getCuHandle().getJavaProject());
 		if (status == null || status.isOK())
-			return createOkStatus();
+			return Status.OK_STATUS;
 		if (status.hasError())
 			return createErrorStatus(status.getEntryWithHighestSeverity().getMessage());
 		else
@@ -211,7 +211,7 @@ public class ParameterEditDialog extends StatusDialog {
 			return status;
 		if (! Checks.startsWithLowerCase(text))
 			return createWarningStatus(RefactoringCoreMessages.ExtractTempRefactoring_convention);
-		return createOkStatus();
+		return Status.OK_STATUS;
 	}
 
 	private IStatus validateDefaultValue() {
@@ -221,16 +221,12 @@ public class ParameterEditDialog extends StatusDialog {
 		if (defaultValue.length() == 0)
 			return createErrorStatus(RefactoringMessages.ParameterEditDialog_defaultValue_error);
 		if (ChangeSignatureProcessor.isValidExpression(defaultValue))
-			return createOkStatus();
+			return Status.OK_STATUS;
 		String msg= Messages.format(RefactoringMessages.ParameterEditDialog_defaultValue_invalid, new String[]{defaultValue});
 		return createErrorStatus(msg);
 
 	}
 
-	private Status createOkStatus() {
-		return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
-	}
-
 	private Status createWarningStatus(String message) {
 		return new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.WARNING, message, null);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java
index 214e6d5..6da1236 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMemberPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,6 +79,7 @@ import org.eclipse.jdt.internal.corext.util.JdtFlags;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
+import org.eclipse.jdt.ui.JavaElementLabels;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
@@ -700,8 +701,12 @@ public class PullUpMemberPage extends UserInputWizardPage {
 
 		final ISelection preserved= fTableViewer.getSelection();
 		try {
+			MemberActionInfo[] selectedMembers= getSelectedMembers();
 			final String shellTitle= RefactoringMessages.PullUpInputPage1_Edit_members;
-			final String labelText= RefactoringMessages.PullUpInputPage1_Mark_selected_members;
+			final String labelText= selectedMembers.length == 1
+					? Messages.format(RefactoringMessages.PullUpInputPage1_Mark_selected_members_singular, JavaElementLabels.getElementLabel(selectedMembers[0].getMember(),
+							JavaElementLabels.M_PARAMETER_TYPES))
+					: Messages.format(RefactoringMessages.PullUpInputPage1_Mark_selected_members_plural, String.valueOf(selectedMembers.length));
 			final Map stringMapping= createStringMappingForSelectedMembers();
 			final String[] keys= (String[]) stringMapping.keySet().toArray(new String[stringMapping.keySet().size()]);
 			Arrays.sort(keys);
@@ -711,7 +716,7 @@ public class PullUpMemberPage extends UserInputWizardPage {
 			if (dialog.open() == Window.CANCEL)
 				return;
 			final int action= ((Integer) stringMapping.get(dialog.getSelectedString())).intValue();
-			setActionForInfos(getSelectedMembers(), action);
+			setActionForInfos(selectedMembers, action);
 		} finally {
 			updateWizardPage(preserved, true);
 		}
@@ -794,24 +799,47 @@ public class PullUpMemberPage extends UserInputWizardPage {
 	}
 
 	private IMember[] getMembersForAction(final int action) {
-		final MemberActionInfo[] infos= getTableInput();
-		final List result= new ArrayList(infos.length);
-		for (int index= 0; index < infos.length; index++) {
-			if (infos[index].getAction() == action)
-				result.add(infos[index].getMember());
-		}
+		List result= new ArrayList();
+		getMembersForAction(action, false, result);
 		return (IMember[]) result.toArray(new IMember[result.size()]);
 	}
 
 	private IMethod[] getMethodsForAction(final int action) {
+		List result= new ArrayList();
+		getMembersForAction(action, true, result);
+		return (IMethod[]) result.toArray(new IMethod[result.size()]);
+	}
+
+	private void getMembersForAction(int action, boolean onlyMethods, List result) {
+		boolean isDestinationInterface= isDestinationInterface();
 		final MemberActionInfo[] infos= getTableInput();
-		final List list= new ArrayList(infos.length);
 		for (int index= 0; index < infos.length; index++) {
-			if (infos[index].isMethodInfo() && infos[index].getAction() == action) {
-				list.add(infos[index].getMember());
+			MemberActionInfo info= infos[index];
+			int infoAction= info.getAction();
+			boolean isMethodInfo= info.isMethodInfo();
+			if (!isMethodInfo && onlyMethods)
+				continue;
+			if (isMethodInfo && isDestinationInterface) {
+				if (action == PULL_UP_ACTION)
+					continue; // skip methods pulled up to interface
+				if (action == DECLARE_ABSTRACT_ACTION && infoAction == PULL_UP_ACTION)
+					infoAction= DECLARE_ABSTRACT_ACTION; // method pulled to interface must be declared abstract
 			}
+			if (infoAction == action)
+				result.add(info.getMember());
 		}
-		return (IMethod[]) list.toArray(new IMethod[list.size()]);
+	}
+
+	private boolean isDestinationInterface() {
+		IType destination= getDestinationType();
+		try {
+			if (destination != null && destination.isInterface()) {
+				return true;
+			}
+		} catch (JavaModelException exception) {
+		    JavaPlugin.log(exception);
+		}
+		return false;
 	}
 
 	public IWizardPage getNextPage() {
@@ -819,13 +847,8 @@ public class PullUpMemberPage extends UserInputWizardPage {
 		storeDialogSettings();
 		if (getMethodsForAction(PULL_UP_ACTION).length == 0)
 			return computeSuccessorPage();
-		try {
-	        final IType destination= getDestinationType();
-	        if (destination != null && destination.isInterface())
-	        	return computeSuccessorPage();
-        } catch (JavaModelException exception) {
-	        JavaPlugin.log(exception);
-        }
+        if (isDestinationInterface())
+        	return computeSuccessorPage();
 		return super.getNextPage();
 	}
 
@@ -968,9 +991,11 @@ public class PullUpMemberPage extends UserInputWizardPage {
 	private void updateStatusLine() {
 		if (fStatusLine == null)
 			return;
-		final int selected= fTableViewer.getCheckedElements().length;
-		final String[] keys= { String.valueOf(selected)};
-		final String msg= Messages.format(RefactoringMessages.PullUpInputPage1_status_line, keys);
+		Object[] selectedMembers= fTableViewer.getCheckedElements();
+		final int selected= selectedMembers.length;
+		final String msg= selected == 1 ? Messages.format(RefactoringMessages.PullUpInputPage1_status_line_singular, JavaElementLabels.getElementLabel(
+				((MemberActionInfo)selectedMembers[0]).getMember(), JavaElementLabels.M_PARAMETER_TYPES)) : Messages.format(RefactoringMessages.PullUpInputPage1_status_line_plural, String
+				.valueOf(selected));
 		fStatusLine.setText(msg);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMethodPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMethodPage.java
index c30c7a6..b0e15d2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMethodPage.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PullUpMethodPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,6 +75,7 @@ import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.ui.JavaElementComparator;
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
+import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.PreferenceConstants;
 import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
 
@@ -565,6 +566,11 @@ public class PullUpMethodPage extends UserInputWizardPage {
 	}
 
 	private void updateSelectionLabel() {
-		fSelectionLabel.setText(Messages.format(RefactoringMessages.PullUpInputPage_hierarchyLabal, String.valueOf(getCheckedMethods().length)));
+		IMethod[] methods= getCheckedMethods();
+		int checkedMethodsCount= methods.length;
+		String text= checkedMethodsCount == 1 ? Messages.format(RefactoringMessages.PullUpInputPage_hierarchyLabal_singular, JavaElementLabels.getElementLabel(methods[0],
+				JavaElementLabels.M_PARAMETER_TYPES)) : Messages.format(RefactoringMessages.PullUpInputPage_hierarchyLabal_plural, String.valueOf(checkedMethodsCount));
+		fSelectionLabel.setText(text);
+
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java
index ffa62a6..4b89d6a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/PushDownWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,6 +72,7 @@ import org.eclipse.jdt.internal.corext.refactoring.structure.PushDownRefactoring
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
+import org.eclipse.jdt.ui.JavaElementLabels;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
@@ -424,17 +425,21 @@ public final class PushDownWizard extends RefactoringWizard {
 				return;
 			final ISelection preserved= fTableViewer.getSelection();
 			try {
+				MemberActionInfo[] selectedMembers= getSelectedMemberActionInfos();
+				final String labelText= selectedMembers.length == 1 ? Messages.format(RefactoringMessages.PushDownInputPage_Mark_selected_members_singular, JavaElementLabels.getElementLabel(
+						selectedMembers[0].getMember(), JavaElementLabels.M_PARAMETER_TYPES)) : Messages.format(RefactoringMessages.PushDownInputPage_Mark_selected_members_plural, String
+						.valueOf(selectedMembers.length));
 				final Map stringMapping= createStringMappingForSelectedElements();
 				final String[] keys= (String[]) stringMapping.keySet().toArray(new String[stringMapping.keySet().size()]);
 				Arrays.sort(keys);
 				final int initialSelectionIndex= getInitialSelectionIndexForEditDialog(stringMapping, keys);
 
-				final ComboSelectionDialog dialog= new ComboSelectionDialog(getShell(), RefactoringMessages.PushDownInputPage_Edit_members, RefactoringMessages.PushDownInputPage_Mark_selected_members, keys, initialSelectionIndex);
+				final ComboSelectionDialog dialog= new ComboSelectionDialog(getShell(), RefactoringMessages.PushDownInputPage_Edit_members, labelText, keys, initialSelectionIndex);
 				dialog.setBlockOnOpen(true);
 				if (dialog.open() == Window.CANCEL)
 					return;
 				final int action= ((Integer) stringMapping.get(dialog.getSelectedString())).intValue();
-				setInfoAction(getSelectedMemberActionInfos(), action);
+				setInfoAction(selectedMembers, action);
 			} finally {
 				updateWizardPage(preserved, true);
 			}
@@ -580,9 +585,11 @@ public final class PushDownWizard extends RefactoringWizard {
 		private void updateStatusLine() {
 			if (fStatusLine == null)
 				return;
-			final int selected= fTableViewer.getCheckedElements().length;
-			final String[] keys= { String.valueOf(selected)};
-			final String msg= Messages.format(RefactoringMessages.PushDownInputPage_status_line, keys);
+			Object[] selectedMembers= fTableViewer.getCheckedElements();
+			final int selected= selectedMembers.length;
+			final String msg= selected == 1 ? Messages.format(RefactoringMessages.PushDownInputPage_status_line_singular, JavaElementLabels.getElementLabel(
+					((MemberActionInfo)selectedMembers[0]).getMember(), JavaElementLabels.M_PARAMETER_TYPES)) : Messages.format(RefactoringMessages.PushDownInputPage_status_line_plural, String
+					.valueOf(selected));
 			fStatusLine.setText(msg);
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringMessages.java
index 806fdaa..92b106c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/RefactoringMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -134,10 +134,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ConvertNestedToTopAction_Convert;
 
-	public static String ConvertNestedToTopAction_not_possible;
-
-	public static String ConvertNestedToTopAction_Refactoring;
-
 	public static String ConvertNestedToTopAction_To_activate;
 
 	public static String DelegateCreator_deprecate_delegates;
@@ -148,7 +144,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String DeleteWizard_11;
 
-	public static String DeleteWizard_12;
+	public static String DeleteWizard_12_singular;
+
+	public static String DeleteWizard_12_plural;
 
 	public static String DeleteWizard_2;
 
@@ -170,16 +168,10 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ExtractClassAction_action_text;
 
-	public static String ExtractClassWizard_button_down;
-
 	public static String ExtractClassWizard_button_edit;
 
-	public static String ExtractClassWizard_button_up;
-
 	public static String ExtractClassWizard_checkbox_create_gettersetter;
 
-	public static String ExtractClassWizard_checke_setters;
-
 	public static String ExtractClassWizard_column_name;
 
 	public static String ExtractClassWizard_column_type;
@@ -230,10 +222,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ExtractInterfaceAction_Extract_Interface;
 
-	public static String ExtractInterfaceAction_not_possible;
-
-	public static String ExtractInterfaceAction_Refactoring;
-
 	public static String ExtractInterfaceAction_To_activate;
 
 	public static String ExtractInterfaceInputPage_change_references;
@@ -258,6 +246,8 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ExtractInterfaceWizard_Extract_Interface;
 
+	public static String ExtractInterfaceWizard_generate_annotations;
+
 	public static String ExtractInterfaceWizard_generate_comments;
 
 	public static String ExtractInterfaceWizard_public_label;
@@ -348,14 +338,10 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ExtractTempInputPage_enter_name;
 
-	public static String ExtractTempInputPage_exception;
-
 	public static String ExtractTempInputPage_extract_local;
 
 	public static String ExtractTempInputPage_replace_all;
 
-	public static String ExtractTempInputPage_signature_preview;
-
 	public static String ExtractTempInputPage_variable_name;
 
 	public static String ExtractTempWizard_defaultPageTitle;
@@ -482,8 +468,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String IntroduceIndirectionInputPage_new_method_name;
 
-	public static String IntroduceIndirectionInputPage_select_declaring_class;
-
 	public static String IntroduceIndirectionInputPage_update_references;
 
 	public static String IntroduceParameterAction_dialog_title;
@@ -492,26 +476,12 @@ public final class RefactoringMessages extends NLS {
 
 	public static String IntroduceParameterInputPage_description;
 
-	public static String IntroduceParameterObjectWizard_choosepackage_button;
-
-	public static String IntroduceParameterObjectWizard_choosepackage_label;
-
-	public static String IntroduceParameterObjectWizard_ChoosePackageDialog_description;
-
-	public static String IntroduceParameterObjectWizard_ChoosePackageDialog_empty;
-
-	public static String IntroduceParameterObjectWizard_ChoosePackageDialog_title;
-
 	public static String IntroduceParameterObjectWizard_classnamefield_label;
 
 	public static String IntroduceParameterObjectWizard_createasnestedclass_radio;
 
 	public static String IntroduceParameterObjectWizard_createastoplevel_radio;
 
-	public static String IntroduceParameterObjectWizard_createcomments_checkbox;
-
-	public static String IntroduceParameterObjectWizard_createdelegate_checkbox;
-
 	public static String IntroduceParameterObjectWizard_creategetter_checkbox;
 
 	public static String IntroduceParameterObjectWizard_createsetter_checkbox;
@@ -526,8 +496,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String IntroduceParameterObjectWizard_error_title;
 
-	public static String IntroduceParameterObjectWizard_fieldgroup_text;
-
 	public static String IntroduceParameterObjectWizard_fieldname_message;
 
 	public static String IntroduceParameterObjectWizard_fieldname_title;
@@ -604,10 +572,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String MoveInstanceMethodAction_unexpected_exception;
 
-	public static String MoveInstanceMethodPage_Create_button_name;
-
-	public static String MoveInstanceMethodPage_Deprecate_button_name;
-
 	public static String MoveInstanceMethodPage_invalid_target;
 
 	public static String MoveInstanceMethodPage_Method_name;
@@ -622,17 +586,15 @@ public final class RefactoringMessages extends NLS {
 
 	public static String MoveInstanceMethodWizard_Move_Method;
 
-	public static String MoveMembersAction_error_message;
-
-	public static String MoveMembersAction_error_title;
-
 	public static String MoveMembersAction_unavailable;
 
 	public static String MoveMembersInputPage_browse;
 
 	public static String MoveMembersInputPage_choose_Type;
 
-	public static String MoveMembersInputPage_descriptionKey;
+	public static String MoveMembersInputPage_descriptionKey_singular;
+
+	public static String MoveMembersInputPage_descriptionKey_plural;
 
 	public static String MoveMembersInputPage_destination_multi;
 
@@ -642,24 +604,16 @@ public final class RefactoringMessages extends NLS {
 
 	public static String MoveMembersInputPage_exception;
 
-	public static String MoveMembersInputPage_internal_error;
-
 	public static String MoveMembersInputPage_invalid_name;
 
 	public static String MoveMembersInputPage_Invalid_selection;
 
-	public static String MoveMembersInputPage_lowerListLabel;
-
-	public static String MoveMembersInputPage_move;
-
 	public static String MoveMembersInputPage_move_Member;
 
 	public static String MoveMembersInputPage_no_binary;
 
 	public static String MoveMembersInputPage_not_found;
 
-	public static String MoveMembersInputPage_upperListLabel;
-
 	public static String MoveMembersWizard_page_title;
 
 	public static String NewTextRefactoringAction_exception;
@@ -688,10 +642,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String ParameterEditDialog_type;
 
-	public static String ParameterEditDialog_type_error;
-
-	public static String ParameterEditDialog_type_invalid;
-
 	public static String PromoteTempInputPage_constructors;
 
 	public static String PromoteTempInputPage_Current_method;
@@ -712,7 +662,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PullUpInputPage_exception;
 
-	public static String PullUpInputPage_hierarchyLabal;
+	public static String PullUpInputPage_hierarchyLabal_singular;
+
+	public static String PullUpInputPage_hierarchyLabal_plural;
 
 	public static String PullUpInputPage_pull_Up;
 
@@ -740,7 +692,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PullUpInputPage1_label_use_in_instanceof;
 
-	public static String PullUpInputPage1_Mark_selected_members;
+	public static String PullUpInputPage1_Mark_selected_members_singular;
+
+	public static String PullUpInputPage1_Mark_selected_members_plural;
 
 	public static String PullUpInputPage1_Member;
 
@@ -754,7 +708,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PullUpInputPage1_Specify_actions;
 
-	public static String PullUpInputPage1_status_line;
+	public static String PullUpInputPage1_status_line_singular;
+
+	public static String PullUpInputPage1_status_line_plural;
 
 	public static String PullUpInputPage2_Select;
 
@@ -766,12 +722,8 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PullUpWizard_select_all_label;
 
-	public static String PushDownAction_not_possible;
-
 	public static String PushDownAction_Push_Down;
 
-	public static String PushDownAction_Refactoring;
-
 	public static String PushDownAction_To_activate;
 
 	public static String PushDownInputPage_Action;
@@ -786,7 +738,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PushDownInputPage_leave_abstract;
 
-	public static String PushDownInputPage_Mark_selected_members;
+	public static String PushDownInputPage_Mark_selected_members_singular;
+
+	public static String PushDownInputPage_Mark_selected_members_plural;
 
 	public static String PushDownInputPage_Member;
 
@@ -798,7 +752,9 @@ public final class RefactoringMessages extends NLS {
 
 	public static String PushDownInputPage_Specify_actions;
 
-	public static String PushDownInputPage_status_line;
+	public static String PushDownInputPage_status_line_singular;
+
+	public static String PushDownInputPage_status_line_plural;
 
 	public static String PushDownWizard_defaultPageTitle;
 
@@ -880,14 +836,14 @@ public final class RefactoringMessages extends NLS {
 
 	public static String RenameJavaElementAction_not_available;
 
+	public static String RenameJavaElementAction_started_rename_in_file;
+
 	public static String RenameJavaProject_defaultPageTitle;
 
 	public static String RenameJavaProject_inputPage_description;
 
 	public static String RenameLocalVariableWizard_defaultPageTitle;
 
-	public static String RenameLocalVariableWizard_inputPage_description;
-
 	public static String RenameMethodWizard_defaultPageTitle;
 
 	public static String RenameMethodWizard_inputPage_description;
@@ -900,16 +856,10 @@ public final class RefactoringMessages extends NLS {
 
 	public static String RenameRefactoringWizard_internal_error;
 
-	public static String RenameResourceWizard_defaultPageTitle;
-
-	public static String RenameResourceWizard_inputPage_description;
-
 	public static String RenameSourceFolder_defaultPageTitle;
 
 	public static String RenameSourceFolder_inputPage_description;
 
-	public static String RenameTempAction_exception;
-
 	public static String RenameTypeParameterWizard_defaultPageTitle;
 
 	public static String RenameTypeParameterWizard_inputPage_description;
@@ -1012,18 +962,10 @@ public final class RefactoringMessages extends NLS {
 
 	public static String SurroundWithTryCatchAction_label;
 
-	public static String SurroundWithTryCatchAction_no_exceptions;
-
-	public static String UseSupertypeAction_not_possible;
-
-	public static String UseSupertypeAction_Refactoring;
-
 	public static String UseSupertypeAction_to_activate;
 
 	public static String UseSupertypeAction_use_Supertype;
 
-	public static String UseSupertypeInputPage_Internal_Error;
-
 	public static String UseSupertypeInputPage_no_possible_updates;
 
 	public static String UseSupertypeInputPage_No_updates;
@@ -1038,8 +980,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String UseSupertypeInputPage_Use_in_instanceof;
 
-	public static String UseSupertypeInputPage_Use_Supertype;
-
 	public static String UseSupertypeWizard_10;
 
 	public static String UseSupertypeWizard_Use_Super_Type_Where_Possible;
@@ -1048,10 +988,6 @@ public final class RefactoringMessages extends NLS {
 
 	public static String VisibilityControlUtil_defa_ult_4;
 
-	public static String VisibilityControlUtil_final;
-
-	public static String VisibilityControlUtil_synchronized;
-
 	public static String SelfEncapsulateFieldInputPage_useexistingsetter_label;
 
 	public static String SelfEncapsulateFieldInputPage_useexistinggetter_label;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineMethodAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineMethodAction.java
index f826328..697819d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineMethodAction.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/InlineMethodAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,9 +107,8 @@ public class InlineMethodAction extends SelectionDispatchAction {
 		setEnabled(true);
 	}
 
-	/**
-	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
+	/*
+	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(org.eclipse.jdt.internal.ui.javaeditor.JavaTextSelection)
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
 		try {
@@ -119,11 +118,11 @@ public class InlineMethodAction extends SelectionDispatchAction {
 		}
 	}
 
-	/* (non-Javadoc)
-	 * Method declared on SelectionDispatchAction
+	/*
+	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#run(org.eclipse.jface.text.ITextSelection)
 	 */
 	public void run(ITextSelection selection) {
-		ITypeRoot typeRoot= SelectionConverter.getInputAsTypeRoot(fEditor);
+		ITypeRoot typeRoot= SelectionConverter.getInput(fEditor);
 		if (typeRoot == null)
 			return;
 		if (! JavaElementUtil.isSourceAvailable(typeRoot))
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction.java
index ee00d7a..bca5865 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RenameJavaElementAction.java	
@@ -23,6 +23,8 @@ import org.eclipse.ui.IWorkbenchSite;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.SimpleName;
 
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringAvailabilityTester;
 import org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter;
@@ -39,6 +41,8 @@ import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaTextSelection;
 import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
 import org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode;
+import org.eclipse.jdt.internal.ui.text.correction.CorrectionCommandHandler;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedNamesAssistProposal;
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
 
 public class RenameJavaElementAction extends SelectionDispatchAction {
@@ -105,11 +109,13 @@ public class RenameJavaElementAction extends SelectionDispatchAction {
 	public void selectionChanged(ITextSelection selection) {
 		if (selection instanceof JavaTextSelection) {
 			try {
-				IJavaElement[] elements= ((JavaTextSelection)selection).resolveElementAtOffset();
+				JavaTextSelection javaTextSelection= (JavaTextSelection)selection;
+				IJavaElement[] elements= javaTextSelection.resolveElementAtOffset();
 				if (elements.length == 1) {
 					setEnabled(RefactoringAvailabilityTester.isRenameElementAvailable(elements[0]));
 				} else {
-					setEnabled(false);
+					ASTNode node= javaTextSelection.resolveCoveringNode();
+					setEnabled(node instanceof SimpleName);
 				}
 			} catch (CoreException e) {
 				setEnabled(false);
@@ -136,10 +142,18 @@ public class RenameJavaElementAction extends SelectionDispatchAction {
 
 		try {
 			IJavaElement element= getJavaElementFromEditor();
+			IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
+			boolean lightweight= store.getBoolean(PreferenceConstants.REFACTOR_LIGHTWEIGHT);
 			if (element != null && RefactoringAvailabilityTester.isRenameElementAvailable(element)) {
-				IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
-				run(element, store.getBoolean(PreferenceConstants.REFACTOR_LIGHTWEIGHT));
+				run(element, lightweight);
 				return;
+			} else if (lightweight) {
+				// fall back to local rename:
+				CorrectionCommandHandler handler= new CorrectionCommandHandler(fEditor, LinkedNamesAssistProposal.ASSIST_ID, true);
+				if (handler.doExecute()) {
+					fEditor.setStatusLineErrorMessage(RefactoringMessages.RenameJavaElementAction_started_rename_in_file);
+					return;
+				}
 			}
 		} catch (CoreException e) {
 			ExceptionHandler.handle(e, RefactoringMessages.RenameJavaElementAction_name, RefactoringMessages.RenameJavaElementAction_exception);
@@ -154,7 +168,7 @@ public class RenameJavaElementAction extends SelectionDispatchAction {
 		try {
 			IJavaElement element= getJavaElementFromEditor();
 			if (element == null)
-				return false;
+				return true;
 
 			return RefactoringAvailabilityTester.isRenameElementAvailable(element);
 		} catch (JavaModelException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java
index 68755fe..f4cd8b9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/code/ExtractMethodInputPage.java	
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [extract method] remember selected access modifier - https://bugs.eclipse.org/bugs/show_bug.cgi?id=101233
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.refactoring.code;
 
@@ -18,7 +19,6 @@ import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -84,6 +84,7 @@ public class ExtractMethodInputPage extends UserInputWizardPage {
 	private static final String DESCRIPTION = RefactoringMessages.ExtractMethodInputPage_description;
 	private static final String THROW_RUNTIME_EXCEPTIONS= "ThrowRuntimeExceptions"; //$NON-NLS-1$
 	private static final String GENERATE_JAVADOC= "GenerateJavadoc";  //$NON-NLS-1$
+	private static final String ACCESS_MODIFIER= "AccessModifier"; //$NON-NLS-1$
 
 	public ExtractMethodInputPage() {
 		super(PAGE_NAME);
@@ -127,12 +128,10 @@ public class ExtractMethodInputPage extends UserInputWizardPage {
 			}
 			combo.select(0);
 			combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			combo.addSelectionListener(new SelectionListener() {
+			combo.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent e) {
 					fRefactoring.setDestination(combo.getSelectionIndex());
-				}
-				public void widgetDefaultSelected(SelectionEvent e) {
-					// nothing
+					updatePreview(getText());
 				}
 			});
 		}
@@ -162,7 +161,9 @@ public class ExtractMethodInputPage extends UserInputWizardPage {
 				radio.setSelection(true);
 			radio.addSelectionListener(new SelectionAdapter() {
 				public void widgetSelected(SelectionEvent event) {
-					setVisibility((Integer)event.widget.getData());
+					final Integer selectedModifier= (Integer)event.widget.getData();
+					fSettings.put(ACCESS_MODIFIER, selectedModifier.intValue());
+					setVisibility(selectedModifier);
 				}
 			});
 		}
@@ -348,8 +349,13 @@ public class ExtractMethodInputPage extends UserInputWizardPage {
 			fSettings= getDialogSettings().addNewSection(ExtractMethodWizard.DIALOG_SETTING_SECTION);
 			fSettings.put(THROW_RUNTIME_EXCEPTIONS, false);
 			fSettings.put(GENERATE_JAVADOC, JavaPreferencesSettings.getCodeGenerationSettings(fRefactoring.getCompilationUnit().getJavaProject()).createComments);
+			fSettings.put(ACCESS_MODIFIER, Modifier.PRIVATE);
 		}
 		fRefactoring.setThrowRuntimeExceptions(fSettings.getBoolean(THROW_RUNTIME_EXCEPTIONS));
+		final String accessModifier= fSettings.get(ACCESS_MODIFIER);
+		if (accessModifier != null) {
+			fRefactoring.setVisibility(Integer.parseInt(accessModifier));
+		}
 	}
 
 	//---- Input validation ------------------------------------------------------
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/MultiStateCellEditor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/MultiStateCellEditor.java
index fd26fcf..3d6ca5e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/MultiStateCellEditor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/MultiStateCellEditor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ public class MultiStateCellEditor extends CellEditor {
 	private final int fStateCount;
 
 	/**
+	 * @param parent the parent
 	 * @param stateCount must be > 1
 	 * @param initialValue initialValue
 	 */
@@ -71,7 +72,7 @@ public class MultiStateCellEditor extends CellEditor {
 	 * @see org.eclipse.jface.viewers.CellEditor#doSetFocus()
 	 */
 	protected void doSetFocus() {
-		// Ignore
+		// ignore
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.java
index 4a32214..3228653 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -89,7 +89,6 @@ final class NLSUIMessages extends NLS {
 	public static String ExternalizeWizardPage_value;
 	public static String ExternalizeWizardPage_Edit_key_and_value;
 	public static String ExternalizeWizardPage_accessorclass_label;
-	public static String ExternalizeWizardPage_propertiesfile_label;
 	public static String ExternalizeWizardPage_configure_button;
 	public static String ExternalizeWizardPage_warning_conflicting;
 	public static String ExternalizeWizardPage_warning_keymissing;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.properties
index fbb2871..cf35663 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/NLSUIMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -79,7 +79,6 @@ ExternalizeWizardPage_key=Key
 ExternalizeWizardPage_value=Value
 ExternalizeWizardPage_Edit_key_and_value=E&dit...
 ExternalizeWizardPage_accessorclass_label=&Accessor class:
-ExternalizeWizardPage_propertiesfile_label=Properties file:
 ExternalizeWizardPage_configure_button=&Configure...
 ExternalizeWizardPage_warning_conflicting=Conflicting entries: Same key but different values
 ExternalizeWizardPage_warning_keymissing=Entry is missing in property file.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.java
index ae4d92a..4d86fb5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.ui.refactoring.nls.search;
 
 import org.eclipse.osgi.util.NLS;
 
+
 /**
  * Helper class to get NLSed messages.
  */
@@ -28,6 +29,7 @@ final class NLSSearchMessages extends NLS {
 	public static String NLSSearchQuery_propertiesNotExists;
 	public static String NLSSearchQuery_wrapperNotExists;
 	public static String NLSSearchQuery_xProblemsInScope_description;
+	public static String NLSSearchQuery_error;
 
 	public static String NLSSearchResultCollector_duplicateKeys;
 	public static String NLSSearchResultCollector_unusedKeys;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.properties
index 03ef6c7..5f9dae8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -23,3 +23,4 @@ NLSSearchQuery_wrapperNotExists=Resource bundle accessor class ''{0}'' does not
 NLSSearchQuery_propertiesNotExists=Properties file ''{0}'' does not exist.
 NLSSearchQuery_oneProblemInScope_description=1 problem in {0}
 NLSSearchQuery_xProblemsInScope_description={0} problems in {1}
+NLSSearchQuery_error=Internal error during search.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchQuery.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchQuery.java
index f81adf7..fb52959 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchQuery.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchQuery.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -115,7 +115,7 @@ public class NLSSearchQuery implements ISearchQuery {
 						fResult.addCompilationUnitGroup(groupElement);
 
 				} catch (CoreException e) {
-					JavaPlugin.log(e);
+					return new Status(e.getStatus().getSeverity(), JavaPlugin.getPluginId(), IStatus.OK, NLSSearchMessages.NLSSearchQuery_error, e);
 				}
 			}
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java
index fe71298..e1d72ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import java.util.Set;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 
 import org.eclipse.core.resources.IFile;
 
@@ -36,7 +37,11 @@ import org.eclipse.search.ui.text.Match;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.ISourceReference;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.Signature;
 import org.eclipse.jdt.core.ToolFactory;
 import org.eclipse.jdt.core.compiler.IScanner;
 import org.eclipse.jdt.core.compiler.ITerminalSymbols;
@@ -48,8 +53,10 @@ import org.eclipse.jdt.internal.corext.refactoring.nls.PropertyFileDocumentModel
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.JavaUIStatus;
 import org.eclipse.jdt.internal.ui.util.StringMatcher;
 
+
 class NLSSearchResultRequestor extends SearchRequestor {
 	/*
 	 * Matches are added to fResult. Element (group key) is IJavaElement or FileEntry.
@@ -57,6 +64,13 @@ class NLSSearchResultRequestor extends SearchRequestor {
 
 	private static final StringMatcher fgGetClassNameMatcher= new StringMatcher("*.class.getName()*", false, false);  //$NON-NLS-1$
 
+	/**
+	 * Object to indicate that no key has been found.
+	 * @see #findKey(Position, IJavaElement)
+	 * @since 3.6
+	 */
+	private static final String NO_KEY= new String();
+
 	private NLSSearchResult fResult;
 	private IFile fPropertiesFile;
 	private Properties fProperties;
@@ -119,7 +133,7 @@ class NLSSearchResultRequestor extends SearchRequestor {
 		Position mutableKeyPosition= new Position(offset, length);
 		//TODO: What to do if argument string not found? Currently adds a match with type name.
 		String key= findKey(mutableKeyPosition, javaElement);
-		if (key != null && isKeyDefined(key))
+		if (key == null || isKeyDefined(key))
 			return;
 
 		ICompilationUnit[] allCompilationUnits= JavaModelUtil.getAllCompilationUnits(new IJavaElement[] {javaElement});
@@ -179,11 +193,11 @@ class NLSSearchResultRequestor extends SearchRequestor {
 	 * and adds it to the list of used properties.
 	 *
 	 * @param key the key
-	 * @return <code>true</code> if the key is defined
+	 * @return <code>true</code> if the key is defined, <code>false</code> otherwise
 	 */
 	private boolean isKeyDefined(String key) {
-		if (key == null)
-			return true; // Parse error - don't check key
+		if (key == NO_KEY)
+			return false;
 
 		fUsedPropertyNames.add(key);
 		if (fProperties.getProperty(key) != null) {
@@ -201,12 +215,15 @@ class NLSSearchResultRequestor extends SearchRequestor {
 	}
 
 	/**
-	 * Finds the key defined by the given match. The assumption is that
-	 * the key is the first argument and it is a string i.e. quoted ("...").
-	 *
-	 * @param keyPositionResult reference parameter: will be filled with the position of the found key
+	 * Finds the key defined by the given match. The assumption is that the key is the only argument
+	 * and it is a string literal i.e. quoted ("...") or a string constant i.e. 'static final
+	 * String' defined in the same class.
+	 * 
+	 * @param keyPositionResult reference parameter: will be filled with the position of the found
+	 *            key
 	 * @param enclosingElement enclosing java element
-	 * @return a string denoting the key, null if no key can be found
+	 * @return a string denoting the key, {@link #NO_KEY} if no key can be found and
+	 *         <code>null</code> otherwise
 	 * @throws CoreException if a problem occurs while accessing the <code>enclosingElement</code>
 	 */
 	private String findKey(Position keyPositionResult, IJavaElement enclosingElement) throws CoreException {
@@ -218,7 +235,15 @@ class NLSSearchResultRequestor extends SearchRequestor {
 		if (source == null)
 			return null;
 
-		IScanner scanner= ToolFactory.createScanner(false, false, false, false);
+		IJavaProject javaProject= unit.getJavaProject();
+		IScanner scanner= null;
+		if (javaProject != null) {
+			String complianceLevel= javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true);
+			String sourceLevel= javaProject.getOption(JavaCore.COMPILER_SOURCE, true);
+			scanner= ToolFactory.createScanner(false, false, false, sourceLevel, complianceLevel);
+		} else {
+			scanner= ToolFactory.createScanner(false, false, false, false);
+		}
 		scanner.setSource(source.toCharArray());
 		scanner.resetTo(keyPositionResult.getOffset() + keyPositionResult.getLength(), source.length());
 
@@ -230,27 +255,56 @@ class NLSSearchResultRequestor extends SearchRequestor {
 				return null;
 
 			String src= new String(scanner.getCurrentTokenSource());
-			int keyStart= scanner.getCurrentTokenStartPosition();
-			int keyEnd= scanner.getCurrentTokenEndPosition();
+			int tokenStart= scanner.getCurrentTokenStartPosition();
+			int tokenEnd= scanner.getCurrentTokenEndPosition();
 
 			if (scanner.getNextToken() == ITerminalSymbols.TokenNameLPAREN) {
 				// Old school
-				// next must be key string:
-				if (scanner.getNextToken() != ITerminalSymbols.TokenNameStringLiteral)
+				// next must be key string. Ignore methods which do not take a single String parameter (Bug 295040).
+				int nextToken= scanner.getNextToken();
+				if (nextToken != ITerminalSymbols.TokenNameStringLiteral && nextToken != ITerminalSymbols.TokenNameIdentifier)
+					return null;
+
+				tokenStart= scanner.getCurrentTokenStartPosition();
+				tokenEnd= scanner.getCurrentTokenEndPosition();
+				int token;
+				while ((token= scanner.getNextToken()) == ITerminalSymbols.TokenNameDOT) {
+					if ((nextToken= scanner.getNextToken()) != ITerminalSymbols.TokenNameIdentifier) {
+							return null;
+					}
+					tokenStart= scanner.getCurrentTokenStartPosition();
+					tokenEnd= scanner.getCurrentTokenEndPosition();
+				}
+				if (token != ITerminalSymbols.TokenNameRPAREN)
 					return null;
-				// found it:
-				keyStart= scanner.getCurrentTokenStartPosition() + 1;
-				keyEnd= scanner.getCurrentTokenEndPosition();
-				keyPositionResult.setOffset(keyStart);
-				keyPositionResult.setLength(keyEnd - keyStart);
-				return source.substring(keyStart, keyEnd);
+				
+				if (nextToken == ITerminalSymbols.TokenNameStringLiteral) {
+					keyPositionResult.setOffset(tokenStart + 1);
+					keyPositionResult.setLength(tokenEnd - tokenStart - 1);
+					return source.substring(tokenStart + 1, tokenEnd);
+				} else if (nextToken == ITerminalSymbols.TokenNameIdentifier) {
+					keyPositionResult.setOffset(tokenStart);
+					keyPositionResult.setLength(tokenEnd - tokenStart + 1);
+					IType parentClass= (IType)enclosingElement.getAncestor(IJavaElement.TYPE);
+					IField[] fields= parentClass.getFields();
+					String identifier= source.substring(tokenStart, tokenEnd + 1);
+					for (int i= 0; i < fields.length; i++) {
+						if (fields[i].getElementName().equals(identifier)) {
+							if (!Signature.getSignatureSimpleName(fields[i].getTypeSignature()).equals("String")) //$NON-NLS-1$
+								return null;
+							Object obj= fields[i].getConstant();
+							return obj instanceof String ? ((String)obj).substring(1, ((String)obj).length() - 1) : NO_KEY;
+						}
+					}
+				}
+				return NO_KEY;
 			} else {
-				keyPositionResult.setOffset(keyStart);
-				keyPositionResult.setLength(keyEnd - keyStart + 1);
+				keyPositionResult.setOffset(tokenStart);
+				keyPositionResult.setLength(tokenEnd - tokenStart + 1);
 				return src;
 			}
 		} catch (InvalidInputException e) {
-			return null;
+			throw new CoreException(JavaUIStatus.createError(IStatus.ERROR, e));
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/refactoringui.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/refactoringui.properties
index c7d207d..702ba77 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/refactoringui.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/refactoringui.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -32,7 +32,6 @@ ExtractMethodAction_dialog_title=Extract Method
 SurroundWithTryCatchAction_label=Surround with tr&y/catch Block
 SurroundWithTryCatchAction_dialog_title=Surround with try/catch
 SurroundWithTryCatchAction_exception=An unexpected exception occurred. See the error log for more details.
-SurroundWithTryCatchAction_no_exceptions=No uncaught exceptions are thrown by the selected code. Catch java.lang.RuntimeException ?
 
 RefactoringGroup_modify_Parameters_label=&Change Method Signature...
 RefactoringGroup_pull_Up_label=Pull &Up...
@@ -65,9 +64,9 @@ ExtractMethodInputPage_parameters=&Parameters:
 ExtractMethodInputPage_throwRuntimeExceptions=Declare thrown runtime e&xceptions
 ExtractMethodInputPage_validation_emptyMethodName=Provide a method name
 ExtractMethodInputPage_validation_emptyParameterName=Parameter names cannot be empty
-ExtractMethodInputPage_duplicates_none=&Replace all occurrences of statements with method
-ExtractMethodInputPage_duplicates_single=&Replace 1 occurrence of statements with method
-ExtractMethodInputPage_duplicates_multi=&Replace {0} occurrences of statements with method
+ExtractMethodInputPage_duplicates_none=&Replace additional occurrences of statements with method
+ExtractMethodInputPage_duplicates_single=&Replace 1 additional occurrence of statements with method
+ExtractMethodInputPage_duplicates_multi=&Replace {0} additional occurrences of statements with method
 ExtractMethodInputPage_destination_type=Destination &type:
 ExtractMethodInputPage_anonymous_type_label=new {0}() '{'...}
 ExtractMethodInputPage_generateJavadocComment=Generate method &comment
@@ -108,9 +107,7 @@ ExtractTempInputPage_enter_name=Enter a name for the new local variable
 ExtractTempInputPage_variable_name=&Variable name:
 ExtractTempInputPage_replace_all=&Replace all occurrences of the selected expression with references to the local variable
 ExtractTempInputPage_declare_final=&Declare the local variable as \'final\'
-ExtractTempInputPage_signature_preview=Signature Preview: 
 ExtractTempInputPage_extract_local=Extract local variable
-ExtractTempInputPage_exception=An unexpected exception occurred. See the error log for more details
 
 ExtractConstantInputPage_enter_name=Enter a name for the new constant
 ExtractConstantInputPage_constant_name=&Constant name:
@@ -165,7 +162,8 @@ RenameFieldInputWizardPage_rename_setter_to=Rename &setter: ''{0}'' to ''{1}''
 RenameFieldInputWizardPage_setter_label={0} ({1})
 RenameFieldInputWizardPage_getter_label={0} ({1})
 
-MoveMembersInputPage_descriptionKey={0} member(s) from ''{1}''
+MoveMembersInputPage_descriptionKey_singular=Member ''{0}'' from ''{1}''
+MoveMembersInputPage_descriptionKey_plural={0} members from ''{1}''
 MoveMembersInputPage_destination_single=Destination &type for ''{0}'':
 MoveMembersInputPage_destination_multi=Destination &type for {0} selected elements:
 MoveMembersInputPage_browse=&Browse...
@@ -173,18 +171,15 @@ MoveMembersInputPage_move_Member=Move Member
 MoveMembersInputPage_exception=An unexpected exception occurred. See the error log for more details
 MoveMembersInputPage_choose_Type=Choose Type
 MoveMembersInputPage_dialogMessage=&Choose a type (? = any character, * = any string):
-MoveMembersInputPage_upperListLabel=&Matching types:
-MoveMembersInputPage_lowerListLabel=&Qualifier:
 MoveMembersInputPage_not_found=Destination type does not exist (fully qualified type name expected)
 MoveMembersInputPage_invalid_name=Invalid Type Name
 MoveMembersInputPage_Invalid_selection=Invalid selection
 MoveMembersInputPage_no_binary=Cannot move members to binary types
-MoveMembersInputPage_internal_error=An unexpected exception occurred. See the error log for more details.
-MoveMembersInputPage_move=Move Members
 
 RenameJavaElementAction_exception=An unexpected exception occurred. See the error log for more details
 RenameJavaElementAction_not_available=Operation unavailable on the current selection.\nSelect a Java project, source folder, resource, package, compilation unit, type, field, method, parameter or a local variable
 RenameJavaElementAction_name=Rename
+RenameJavaElementAction_started_rename_in_file=Element could not be resolved, started 'Rename in file'
 
 MoveAction_text=&Move...
 
@@ -193,7 +188,8 @@ QualifiedNameComponent_patterns_description= The patterns are separated by comma
 
 DelegateCreator_deprecate_delegates=Mark as &deprecated
 
-PullUpInputPage_hierarchyLabal={0} method(s) selected
+PullUpInputPage_hierarchyLabal_singular=Method ''{0}'' selected
+PullUpInputPage_hierarchyLabal_plural={0} methods selected
 PullUpInputPage_see_log=An unexpected exception occurred. See the error log for more details
 
 ##Change Signature
@@ -211,15 +207,12 @@ ChangeSignatureInputPage_Internal_Error=An unexpected exception occurred. See th
 ChangeSignatureInputPage_Change_Signature=Change Signature
 ChangeSignatureRefactoring_modify_Parameters=Change Method Signature
 
-RenameTempAction_exception=An unexpected exception occurred. See the error log for more details
 ModifyParametersAction_unavailable=To activate this refactoring, please select the name of a method. Binary methods and annotation elements are not supported.
 OpenRefactoringWizardAction_unavailable=Operation Unavailable
 PullUpAction_unavailable=To activate this refactoring, select a top-level type or the name of a non-binary instance method or field.
 MoveMembersAction_unavailable=To activate this refactoring, please select the name of a non-binary static method or field.
 PullUpInputPage_subtypes=&Subtypes of type ''{0}''
 
-MoveMembersAction_error_title=Refactoring
-MoveMembersAction_error_message=Cannot perform operation.
 RefactoringErrorDialogUtil_okToPerformQuestion={0}\n\nOK to perform the operation on this method?
 
 ChangeParametersControl_table_type=Type
@@ -252,7 +245,6 @@ ParameterEditDialog_message_new=Declaration of parameter:
 ParameterEditDialog_message=Declaration of parameter ''{0}'':
 
 ParameterEditDialog_type=&Type:
-ParameterEditDialog_type_error=Type name must not be empty.
 ParameterEditDialog_name=&Name:
 ParameterEditDialog_name_error= Parameter name must not be empty.
 ParameterEditDialog_defaultValue=&Default value:
@@ -297,6 +289,7 @@ ExtractInterfaceInputPage_Select_All=Select &All
 ExtractInterfaceInputPage_Deselect_All=&Deselect All
 ExtractInterfaceInputPage_change_references=Use the extracted interface &type where possible
 ExtractInterfaceWizard_Extract_Interface=Extract Interface
+ExtractInterfaceWizard_generate_annotations=Generate '@Override' a&nnotations (1.6 or higher)
 ExtractInterfaceWizard_generate_comments=Generate method &comments
 ExtractInterfaceWizard_use_supertype=&Use the extracted interface in \'instanceof\' expressions
 ExtractInterfaceWizard_public_label=&public
@@ -310,7 +303,7 @@ InlineConstantWizard_message=Specify where to inline references to the constant.
 InlineConstantWizard_Inline_Constant=Inline Constant
 InlineConstantWizard_initializer_refers_to_fields=This constant\'s initializer refers to non-final or non-static fields
 
-MoveInnerToTopWizard_Move_Inner=Convert Member Type to Top Level
+MoveInnerToTopWizard_Move_Inner=Move Type to New File
 MoveInnerToToplnputPage_description=Specify a name for the field that will be used to access the enclosing instance
 MoveInnerToToplnputPage_instance_final=&Declare instance field as \'final\'
 MoveInnerToToplnputPage_optional_info=Choose a name to optionally create an enclosing instance field.
@@ -324,13 +317,11 @@ MoveInstanceMethodPage_Method_name=New &method name:
 MoveInstanceMethodPage_New_receiver=&New target for ''{0}'':
 MoveInstanceMethodPage_Name=Name
 MoveInstanceMethodPage_Type=Type
-MoveInstanceMethodPage_Create_button_name=&Keep original method as delegate to moved method
-MoveInstanceMethodPage_Deprecate_button_name=Mark as &deprecated
 MoveInstanceMethodPage_invalid_target=Target ''{0}'' is used in an assignment.
 
 PromoteTempInputPage_Field_declaration=Field decla&ration
 PromoteTempInputPage_Current_method=&Current method
-PromoteTempInputPage_constructors=C&lass constructor(s)
+PromoteTempInputPage_constructors=C&lass constructors
 PromoteTempInputPage_Field_name=F&ield name:
 PromoteTempInputPage_Initialize=Initialize in
 PromoteTempInputPage_declare_static=&Declare field as \'static\'
@@ -340,8 +331,6 @@ UseSupertypeInputPage_Select_supertype=Select the supertype to use
 UseSupertypeInputPage_Use_in_instanceof=&Use the selected supertype in \'instanceof\' expressions
 UseSupertypeInputPage_Select_supertype_to_use=&Select supertype to use instead of ''{0}'':
 UseSupertypeInputPage_No_updates=No updates possible for the selected supertype
-UseSupertypeInputPage_Use_Supertype=Use Supertype
-UseSupertypeInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
 UseSupertypeInputPage_no_possible_updates={0} - no possible updates found
 UseSupertypeInputPage_updates_possible_in_file={0} - updates possible in 1 file
 UseSupertypeInputPage_updates_possible_in_files={0} - updates possible in {1} files
@@ -349,8 +338,6 @@ UseSupertypeWizard_Use_Super_Type_Where_Possible=Use Super Type Where Possible
 
 VisibilityControlUtil_Access_modifier=Access modifier
 VisibilityControlUtil_defa_ult_4=d&efault
-VisibilityControlUtil_final=&final
-VisibilityControlUtil_synchronized=s&ynchronized
 
 PullUpWizard_defaultPageTitle=Pull Up
 PullUpWizard_select_all_label=Select &All
@@ -363,14 +350,16 @@ PullUpInputPage1_Specify_actions=S&pecify actions for members:
 PullUpInputPage1_Edit=Set Act&ion...
 PullUpInputPage1_Add_Required=Add &Required
 PullUpInputPage1_Edit_members=Set Action
-PullUpInputPage1_Mark_selected_members=&Action for selected member(s):
+PullUpInputPage1_Mark_selected_members_singular=&Action for ''{0}'':
+PullUpInputPage1_Mark_selected_members_plural=&Action for {0} selected members:
 PullUpInputPage1_label_use_destination=Use the d&estination type where possible
 PullUpInputPage1_Member=Member
 PullUpInputPage1_Action=Action
 PullUpInputPage1_Select_members_to_pull_up=No members selected to pull up or declare abstract
 PullUpInputPage1_label_use_in_instanceof=&Use the destination type in 'instanceof' expressions
 PullUpInputPage1_page_message=Select the destination type and the members to pull up.
-PullUpInputPage1_status_line={0} member(s) selected.
+PullUpInputPage1_status_line_singular=Member ''{0}'' selected.
+PullUpInputPage1_status_line_plural={0} members selected.
 
 PullUpInputPage2_Select=Restore &Defaults
 PullUpInputPage2_Source=Source
@@ -386,9 +375,11 @@ PushDownInputPage_Add_Required=Add &Required
 PushDownInputPage_Push_Down=Push Down
 PushDownInputPage_Internal_Error=An unexpected exception occurred. See the error log for more details.
 PushDownInputPage_Edit_members=Set Action
-PushDownInputPage_Mark_selected_members=&Action for selected member(s):
+PushDownInputPage_Mark_selected_members_singular=&Action for ''{0}'':
+PushDownInputPage_Mark_selected_members_plural=&Action for {0} selected members:
 PushDownInputPage_Select_members_to_push_down=No members selected to push down or declare abstract
-PushDownInputPage_status_line={0} member(s) selected.
+PushDownInputPage_status_line_singular=Member ''{0}'' selected.
+PushDownInputPage_status_line_plural={0} members selected.
 
 MoveInstanceMethodAction_dialog_title=Move Method
 MoveInstanceMethodAction_Move_Method=Move Method...
@@ -413,13 +404,9 @@ InlineMethodAction_no_method_invocation_or_declaration_selected=No method invoca
 
 UseSupertypeAction_use_Supertype=Use Supertype W&here Possible...
 UseSupertypeAction_to_activate=To activate this refactoring, please select the name of a type.
-UseSupertypeAction_Refactoring=Refactoring
-UseSupertypeAction_not_possible=Cannot perform operation.
 
 PushDownAction_Push_Down=Push &Down...
 PushDownAction_To_activate=To activate this refactoring, please select the name of a non-binary instance method or field.
-PushDownAction_Refactoring=Refactoring
-PushDownAction_not_possible=Cannot perform operation.
 
 MoveAction_Move=Move
 MoveAction_select=Select a static method, a static field or an instance method that can be moved to a component (parameter or field).
@@ -430,23 +417,16 @@ InlineAction_select=Select a method declaration, a method invocation, a static f
 
 ExtractInterfaceAction_Extract_Interface=&Extract Interface...
 ExtractInterfaceAction_To_activate=To activate this refactoring, please select the name of a top level type.
-ExtractInterfaceAction_Refactoring=Refactoring
 ExtractSuperTypeAction_unavailable=To activate this refactoring, please select a non-binary non-inner class or the name of an instance method or field.
-ExtractInterfaceAction_not_possible=Cannot perform operation.
 
-ConvertNestedToTopAction_Convert=Con&vert Member Type to Top Level...
-ConvertNestedToTopAction_To_activate=To activate this refactoring, please select the name of a member type.
-ConvertNestedToTopAction_Refactoring=Refactoring
-ConvertNestedToTopAction_not_possible=Cannot perform operation.
+ConvertNestedToTopAction_Convert=Mo&ve Type to New File...
+ConvertNestedToTopAction_To_activate=To activate this refactoring, please select the name of a member type or a secondary type.
 
 ConvertAnonymousToNestedAction_dialog_title=Convert Anonymous Class to Nested Class
 ConvertAnonymousToNestedAction_Convert_Anonymous=C&onvert Anonymous Class to Nested...
 ConvertAnonymousToNestedAction_wizard_title=Convert Anonymous Class to Nested Class
 
 ######################  Temporary Participant Keys #################################
-RenameResourceWizard_defaultPageTitle=Rename Resource
-RenameResourceWizard_inputPage_description=Enter the new name for this resource.
-
 RenameJavaProject_defaultPageTitle=Rename Java Project
 RenameJavaProject_inputPage_description=Enter the new name for this Java project.
 
@@ -467,11 +447,9 @@ RenameMethodWizard_defaultPageTitle=Rename Method
 RenameMethodWizard_inputPage_description= Enter the new name for this method.
 
 RenameLocalVariableWizard_defaultPageTitle=Rename Local Variable
-RenameLocalVariableWizard_inputPage_description=Enter the new name for this local variable.
 
 ExtractInterfaceWizard_12=Declare interface methods as ''{0}''
 
-ParameterEditDialog_type_invalid=''{0}'' is not a valid parameter type name.
 UseSupertypeWizard_10=No updates are possible for the supertypes
 
 DeleteWizard_1=Confirm Delete
@@ -485,7 +463,8 @@ DeleteWizard_8=Are you sure you want to delete {0}?
 DeleteWizard_9=Are you sure you want to delete these {0} elements?
 DeleteWizard_10=Are you sure you want to delete these {0} elements?\n\nSelection contains linked resources.\nOnly the workspace links will be deleted. Link targets will remain unchanged.
 DeleteWizard_11=Are you sure you want to delete these {0} elements?\n\nSelection contains linked packages.\nOnly the workspace links will be deleted. Link targets will remain unchanged.\n\nNote that all subelements of linked packages and package fragment roots will be removed from the workspace.
-DeleteWizard_12=The selected element(s) do not exist anymore and cannot be deleted.
+DeleteWizard_12_singular=The selected element does not exist anymore and cannot be deleted.
+DeleteWizard_12_plural=The {0} selected elements do not exist anymore and cannot be deleted.
 DeleteWizard_also_delete_sub_packages=Delete &subpackages of selected packages
 
 #####################################
@@ -497,7 +476,7 @@ RenameTypeWizard_unexpected_exception=An unexpected exception occurred. See the
 
 RenameTypeWizardInputPage_description=Enter the new name for this type.
 RenameTypeWizardInputPage_update_similar_elements=Update &similarly named variables and methods
-RenameTypeWizardInputPage_update_similar_elements_configure=<a>&Configure...</a>
+RenameTypeWizardInputPage_update_similar_elements_configure=<a>Configure...</a>
 RenameTypeWizardSimilarElementsPage_name_empty=Please enter a name.
 RenameTypeWizardSimilarElementsPage_rename_to=Rename ''{0}'' to ''{1}''
 RenameTypeWizardSimilarElementsPage_change_element_name=Change Element Name
@@ -539,7 +518,6 @@ IntroduceIndirectionInputPage_browse=&Browse...
 IntroduceIndirectionInputPage_new_method_name=New method &name:
 IntroduceIndirectionInputPage_declaring_class=Declaring &type:
 IntroduceIndirectionInputPage_update_references=&Redirect all method invocations
-IntroduceIndirectionInputPage_select_declaring_class=Please select a declaring type.
 IntroduceIndirectionInputPage_dialog_choose_declaring_class=Choose Type
 IntroduceIndirectionInputPage_dialog_choose_declaring_class_long=&Choose the type where to insert the new method:
 
@@ -565,7 +543,6 @@ IntroduceFactoryInputPage_chooseFactoryClass_message=&Choose the class on which
 #######################################
 IntroduceParameterObjectWizard_wizardpage_name=Introduce Parameter Object
 IntroduceParameterObjectWizard_wizardpage_title=Introduce Parameter Object
-IntroduceParameterObjectWizard_fieldgroup_text=Field
 IntroduceParameterObjectWizard_type_column=Type
 IntroduceParameterObjectWizard_type_group=New parameter object class
 IntroduceParameterObjectWizard_edit_button=&Edit...
@@ -579,19 +556,12 @@ IntroduceParameterObjectWizard_error_description=An unexpected exception occurre
 IntroduceParameterObjectWizard_destination_label=Destination:
 IntroduceParameterObjectWizard_parametername_check_notunique=Parameter name ''{0}'' is not unique
 IntroduceParameterObjectWizard_createasnestedclass_radio=&Nested class in ''{0}''
-IntroduceParameterObjectWizard_ChoosePackageDialog_title=Package Selection
-IntroduceParameterObjectWizard_ChoosePackageDialog_empty=Cannot find packages to select.
 IntroduceParameterObjectWizard_parametername_check_atleastoneparameter=At least one parameter has to be checked
 IntroduceParameterObjectWizard_parametername_check_alreadyexists=A type with name ''{0}'' already exists in ''{1}''
 IntroduceParameterObjectWizard_type_already_exists_in_package_info=A type named ''{0}'' already exists in package ''{1}''
-IntroduceParameterObjectWizard_ChoosePackageDialog_description=&Choose a folder:
-IntroduceParameterObjectWizard_choosepackage_label=Package:
 IntroduceParameterObjectWizard_moventrydown_button=D&own
 IntroduceParameterObjectWizard_wizardpage_description=Introduces a new class that will be used as parameter
 IntroduceParameterObjectWizard_parameterfield_label=&Parameter name:
-IntroduceParameterObjectWizard_choosepackage_button=Choose...
-IntroduceParameterObjectWizard_createdelegate_checkbox=&Keep original method as delegate to changed method
-IntroduceParameterObjectWizard_createcomments_checkbox=Create &comments
 IntroduceParameterObjectWizard_createastoplevel_radio=&Top level class
 IntroduceParameterObjectWizard_signaturepreview_label=Method signature preview:
 IntroduceParameterObjectWizard_fields_selection_label=Select &fields for parameter object class:
@@ -658,16 +628,13 @@ ExtractClassWizard_page_title=Extract Class
 ExtractClassWizard_radio_nested=&Nested class in ''{0}''
 ExtractClassWizard_dialog_title=Edit Field Name
 ExtractClassWizard_not_available=n/a
-ExtractClassWizard_button_down=D&own
 ExtractClassWizard_button_edit=&Edit...
 ExtractClassWizard_column_type=Type
 ExtractClassWizard_column_name=Name
 ExtractClassAction_action_text=Extract Class...
 ExtractClassWizard_label_select_fields=&Select fields for extracted class:
-ExtractClassWizard_checke_setters=Create &setters
 ExtractClassWizard_checkbox_create_gettersetter=Create &getters and setters
 ExtractClassWizard_dialog_message=Field &name:
-ExtractClassWizard_button_up=&Up
 ExtractClassWizard_label_class_name=&Class name:
 ExtractClassWizard_label_destination=Destination:
 ExtractClassWizard_radio_top_level=&Top level class
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/CopyToClipboardAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/CopyToClipboardAction.java
index 59ede24..b2653cb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/CopyToClipboardAction.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/CopyToClipboardAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.eclipse.osgi.util.TextProcessor;
+
 import org.eclipse.swt.SWTError;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
@@ -39,6 +41,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.ResourceTransfer;
 
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJarEntryResource;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IType;
 
@@ -94,10 +97,11 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 		List elements= selection.toList();
 		IResource[] resources= ReorgUtils.getResources(elements);
 		IJavaElement[] javaElements= ReorgUtils.getJavaElements(elements);
-		if (elements.size() != resources.length + javaElements.length)
+		IJarEntryResource[] jarEntryResources= ReorgUtils.getJarEntryResources(elements);
+		if (elements.size() != resources.length + javaElements.length + jarEntryResources.length)
 			setEnabled(false);
 		else
-			setEnabled(canEnable(resources, javaElements));
+			setEnabled(canEnable(resources, javaElements, jarEntryResources));
 	}
 
 	/* (non-Javadoc)
@@ -108,15 +112,16 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 			List elements= selection.toList();
 			IResource[] resources= ReorgUtils.getResources(elements);
 			IJavaElement[] javaElements= ReorgUtils.getJavaElements(elements);
-			if (elements.size() == resources.length + javaElements.length && canEnable(resources, javaElements))
-				doRun(resources, javaElements);
+			IJarEntryResource[] jarEntryResources= ReorgUtils.getJarEntryResources(elements);
+			if (elements.size() == resources.length + javaElements.length + jarEntryResources.length && canEnable(resources, javaElements, jarEntryResources))
+				doRun(resources, javaElements, jarEntryResources);
 		} catch (CoreException e) {
 			ExceptionHandler.handle(e, getShell(), ReorgMessages.CopyToClipboardAction_2, ReorgMessages.CopyToClipboardAction_3);
 		}
 	}
 
-	private void doRun(IResource[] resources, IJavaElement[] javaElements) throws CoreException {
-		ClipboardCopier copier= new ClipboardCopier(resources, javaElements, getShell(), fAutoRepeatOnFailure);
+	private void doRun(IResource[] resources, IJavaElement[] javaElements, IJarEntryResource[] jarEntryResources) throws CoreException {
+		ClipboardCopier copier= new ClipboardCopier(resources, javaElements, jarEntryResources, getShell(), fAutoRepeatOnFailure);
 
 		if (fClipboard != null) {
 			copier.copyToClipboard(fClipboard);
@@ -130,8 +135,8 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 		}
 	}
 
-	private boolean canEnable(IResource[] resources, IJavaElement[] javaElements) {
-		return new CopyToClipboardEnablementPolicy(resources, javaElements).canEnable();
+	private boolean canEnable(IResource[] resources, IJavaElement[] javaElements, IJarEntryResource[] jarEntryResources) {
+		return new CopyToClipboardEnablementPolicy(resources, javaElements, jarEntryResources).canEnable();
 	}
 
 	//----------------------------------------------------------------------------------------//
@@ -140,41 +145,51 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 		private final boolean fAutoRepeatOnFailure;
 		private final IResource[] fResources;
 		private final IJavaElement[] fJavaElements;
+		private final IJarEntryResource[] fJarEntryResources;
 		private final Shell fShell;
 		private final ILabelProvider fLabelProvider;
 
-		private ClipboardCopier(IResource[] resources, IJavaElement[] javaElements, Shell shell, boolean autoRepeatOnFailure) {
+		private ClipboardCopier(IResource[] resources, IJavaElement[] javaElements, IJarEntryResource[] jarEntryResources, Shell shell, boolean autoRepeatOnFailure) {
 			Assert.isNotNull(resources);
 			Assert.isNotNull(javaElements);
+			Assert.isNotNull(jarEntryResources);
 			Assert.isNotNull(shell);
 			fResources= resources;
 			fJavaElements= javaElements;
+			fJarEntryResources= jarEntryResources;
 			fShell= shell;
 			fLabelProvider= createLabelProvider();
 			fAutoRepeatOnFailure= autoRepeatOnFailure;
 		}
 
 		public void copyToClipboard(Clipboard clipboard) throws CoreException {
-			//Set<String> fileNames
-			Set fileNames= new HashSet(fResources.length + fJavaElements.length);
-			StringBuffer namesBuf = new StringBuffer();
-			processResources(fileNames, namesBuf);
-			processJavaElements(fileNames, namesBuf);
-
-			IType[] mainTypes= ReorgUtils.getMainTypes(fJavaElements);
-			ICompilationUnit[] cusOfMainTypes= ReorgUtils.getCompilationUnits(mainTypes);
-			IResource[] resourcesOfMainTypes= ReorgUtils.getResources(cusOfMainTypes);
-			addFileNames(fileNames, resourcesOfMainTypes);
-
-			IResource[] cuResources= ReorgUtils.getResources(getCompilationUnits(fJavaElements));
-			addFileNames(fileNames, cuResources);
-
-			IResource[] resourcesForClipboard= ReorgUtils.union(fResources, ReorgUtils.union(cuResources, resourcesOfMainTypes));
-			IJavaElement[] javaElementsForClipboard= ReorgUtils.union(fJavaElements, cusOfMainTypes);
-
-			TypedSource[] typedSources= TypedSource.createTypedSources(javaElementsForClipboard);
-			String[] fileNameArray= (String[]) fileNames.toArray(new String[fileNames.size()]);
-			copyToClipboard(resourcesForClipboard, fileNameArray, namesBuf.toString(), javaElementsForClipboard, typedSources, 0, clipboard);
+			StringBuffer namesBuf= new StringBuffer();
+			int countOfNonJarResources= fResources.length + fJavaElements.length;
+
+			processJarEntryResources(namesBuf);
+			if (countOfNonJarResources == 0) {
+				copyToClipboard(fResources, new String[0], namesBuf.toString(), fJavaElements, new TypedSource[0], 0, clipboard);
+			} else {
+				//Set<String> fileNames
+				Set fileNames= new HashSet(countOfNonJarResources);
+				processResources(fileNames, namesBuf);
+				processJavaElements(fileNames, namesBuf);
+
+				IType[] mainTypes= ReorgUtils.getMainTypes(fJavaElements);
+				ICompilationUnit[] cusOfMainTypes= ReorgUtils.getCompilationUnits(mainTypes);
+				IResource[] resourcesOfMainTypes= ReorgUtils.getResources(cusOfMainTypes);
+				addFileNames(fileNames, resourcesOfMainTypes);
+
+				IResource[] cuResources= ReorgUtils.getResources(getCompilationUnits(fJavaElements));
+				addFileNames(fileNames, cuResources);
+
+				IResource[] resourcesForClipboard= ReorgUtils.union(fResources, ReorgUtils.union(cuResources, resourcesOfMainTypes));
+				IJavaElement[] javaElementsForClipboard= ReorgUtils.union(fJavaElements, cusOfMainTypes);
+
+				TypedSource[] typedSources= TypedSource.createTypedSources(javaElementsForClipboard);
+				String[] fileNameArray= (String[])fileNames.toArray(new String[fileNames.size()]);
+				copyToClipboard(resourcesForClipboard, fileNameArray, namesBuf.toString(), javaElementsForClipboard, typedSources, 0, clipboard);
+			}
 		}
 
 		private static IJavaElement[] getCompilationUnits(IJavaElement[] javaElements) {
@@ -187,8 +202,8 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 				IResource resource= fResources[i];
 				addFileName(fileNames, resource);
 
-				if (i > 0)
-					namesBuf.append('\n');
+				if (namesBuf.length() > 0 || i > 0)
+					namesBuf.append(System.getProperty("line.separator")); //$NON-NLS-1$
 				namesBuf.append(getName(resource));
 			}
 		}
@@ -208,12 +223,26 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 						break;
 				}
 
-				if (fResources.length > 0 || i > 0)
-					namesBuf.append('\n');
+				if (namesBuf.length() > 0 || i > 0)
+					namesBuf.append(System.getProperty("line.separator")); //$NON-NLS-1$
 				namesBuf.append(getName(element));
 			}
 		}
 
+		/**
+		 * Gets the names of the jar entry resources and adds them to the string buffer.
+		 * 
+		 * @param namesBuf the names buffer
+		 * @since 3.6
+		 */
+		private void processJarEntryResources(StringBuffer namesBuf) {
+			for (int i= 0; i < fJarEntryResources.length; i++) {
+				if (namesBuf.length() > 0 || i > 0)
+					namesBuf.append(System.getProperty("line.separator")); //$NON-NLS-1$
+				namesBuf.append(getName(fJarEntryResources[i]));
+			}
+		}
+
 		private static void addFileNames(Set fileName, IResource[] resources) {
 			for (int i= 0; i < resources.length; i++) {
 				addFileName(fileName, resources[i]);
@@ -287,31 +316,44 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 			);
 		}
 		private String getName(IResource resource){
-			return fLabelProvider.getText(resource);
+			return TextProcessor.deprocess(fLabelProvider.getText(resource));
 		}
 		private String getName(IJavaElement javaElement){
-			return fLabelProvider.getText(javaElement);
+			return TextProcessor.deprocess(fLabelProvider.getText(javaElement));
+		}
+		/**
+		 * Gets the name of the jar entry resource.
+		 * @param resource the jar entry resource
+		 * @return the name of the jar entry resource
+		 * @since 3.6
+		 */
+		private String getName(IJarEntryResource resource) {
+			return TextProcessor.deprocess(fLabelProvider.getText(resource));
 		}
 	}
 
 	private static class CopyToClipboardEnablementPolicy {
 		private final IResource[] fResources;
 		private final IJavaElement[] fJavaElements;
-		public CopyToClipboardEnablementPolicy(IResource[] resources, IJavaElement[] javaElements){
+		private final IJarEntryResource[] fJarEntryResources;
+
+		public CopyToClipboardEnablementPolicy(IResource[] resources, IJavaElement[] javaElements, IJarEntryResource[] jarEntryResources) {
 			Assert.isNotNull(resources);
 			Assert.isNotNull(javaElements);
+			Assert.isNotNull(jarEntryResources);
 			fResources= resources;
 			fJavaElements= javaElements;
+			fJarEntryResources= jarEntryResources;
 		}
 
 		public boolean canEnable() {
-			if (fResources.length + fJavaElements.length == 0)
+			if (fResources.length + fJavaElements.length + fJarEntryResources.length == 0)
 				return false;
 			if (hasProjects() && hasNonProjects())
 				return false;
 			if (! canCopyAllToClipboard())
 				return false;
-			if (! new ParentChecker(fResources, fJavaElements).haveCommonParent())
+			if (! new ParentChecker(fResources, fJavaElements, fJarEntryResources).haveCommonParent())
 				return false;
 			return true;
 		}
@@ -323,6 +365,9 @@ public class CopyToClipboardAction extends SelectionDispatchAction{
 			for (int i= 0; i < fJavaElements.length; i++) {
 				if (! canCopyToClipboard(fJavaElements[i])) return false;
 			}
+			for (int i= 0; i < fJarEntryResources.length; i++) {
+				if (fJarEntryResources[i] == null) return false;
+			}
 			return true;
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/DeleteWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/DeleteWizard.java
index 837ff0a..0376827 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/DeleteWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/DeleteWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,8 +86,9 @@ public class DeleteWizard extends RefactoringWizard {
 		}
 
 		protected String getMessageString() {
+			int numberOfSelectedElements= numberOfSelectedElements();
 			try {
-				if (1 == numberOfSelectedElements()) {
+				if (1 == numberOfSelectedElements) {
 					String pattern= createConfirmationStringForOneElement();
 					String name= getNameOfSingleSelectedElement();
 					return Messages.format(pattern, new String[] { name });
@@ -101,7 +102,8 @@ public class DeleteWizard extends RefactoringWizard {
 					JavaPlugin.log(e);
 				setPageComplete(false);
 				if (e.isDoesNotExist())
-					return RefactoringMessages.DeleteWizard_12;
+					return 1 == numberOfSelectedElements ? RefactoringMessages.DeleteWizard_12_singular : Messages.format(RefactoringMessages.DeleteWizard_12_plural, String
+							.valueOf(numberOfSelectedElements));
 				return RefactoringMessages.DeleteWizard_2;
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/PasteAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/PasteAction.java
index f268280..84bd310 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/PasteAction.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/PasteAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,11 +113,11 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
@@ -266,7 +266,7 @@ public class PasteAction extends SelectionDispatchAction{
 			Paster[] pasters= createEnabledPasters(availableTypes, clipboard);
 			for (int i= 0; i < pasters.length; i++) {
 				try {
-					if (pasters[i].canPasteOn(javaElements, resources, workingSets)) {
+					if (pasters[i].canPasteOn(javaElements, resources, workingSets, elements)) {
 						pasters[i].paste(javaElements, resources, workingSets, availableTypes);
 						return;// one is enough
 					}
@@ -337,7 +337,7 @@ public class PasteAction extends SelectionDispatchAction{
 
 		/**
 		 * Used to be called on selection change, but is only called on execution now (before
-		 * {@link #canPasteOn(IJavaElement[], IResource[], IWorkingSet[])}).
+		 * {@link #canPasteOn(IJavaElement[], IResource[], IWorkingSet[], List)}).
 		 *
 		 * @param availableTypes transfer types
 		 * @return whether the paste action can be enabled
@@ -347,7 +347,7 @@ public class PasteAction extends SelectionDispatchAction{
 		/*
 		 * Only called if {@link #canEnable(TransferData[])} returns <code>true</code>.
 		 */
-		public abstract boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets)  throws JavaModelException;
+		public abstract boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, List selectedElements)  throws JavaModelException;
 
 		/*
 		 * only called if {@link #canPasteOn(IJavaElement[], IResource[], IWorkingSet[])} returns <code>true</code>
@@ -500,7 +500,7 @@ public class PasteAction extends SelectionDispatchAction{
 			return PasteAction.isAvailable(TextTransfer.getInstance(), availableTypes) && ! PasteAction.isAvailable(FileTransfer.getInstance(), availableTypes);
 		}
 
-		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets) throws JavaModelException {
+		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets, List selectedElements) throws JavaModelException {
 			final String text= getClipboardText(fAvailableTypes);
 			
 			IStorage storage= new IEncodedStorage() {
@@ -550,7 +550,10 @@ public class PasteAction extends SelectionDispatchAction{
 			if (javaElements.length == 1) {
 				destination= javaElements[0];
 				javaProject= destination.getJavaProject();
+			} else if (selectedElements.size() != 0) {
+				return false; // e.g. ClassPathContainer
 			}
+			
 			computeLatestVM();
 			parseCUs(javaProject, text);
 
@@ -656,7 +659,8 @@ public class PasteAction extends SelectionDispatchAction{
 				} else if (javaElements.length > 0) {
 					resource= javaElements[0].getResource();
 				}
-				new ApplyPatchOperation(null, fPatchStorage, resource, new CompareConfiguration()).openWizard();
+				// XXX: This will be fixed in 3.7, see https://bugs.eclipse.org/309803
+				new org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation(null, fPatchStorage, resource, new CompareConfiguration()).openWizard();
 				return;
 			}
 			
@@ -1136,7 +1140,7 @@ public class PasteAction extends SelectionDispatchAction{
 			return isAvailable(ResourceTransfer.getInstance(), availableTypes) ||
 				isAvailable(JavaElementTransfer.getInstance(), availableTypes);
 		}
-		public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets) throws JavaModelException {
+		public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, List selectedElements) throws JavaModelException {
 			if (selectedResources.length != 0 || selectedJavaElements.length != 0 || selectedWorkingSets.length != 1)
 				return false;
 			IWorkingSet ws= selectedWorkingSets[0];
@@ -1186,7 +1190,7 @@ public class PasteAction extends SelectionDispatchAction{
 			return (IProject[]) result.toArray(new IProject[result.size()]);
 		}
 
-		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets) {
+		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets, List selectedElements) {
 			return selectedWorkingSets.length == 0; // Can't paste on working sets here
 		}
 
@@ -1235,7 +1239,7 @@ public class PasteAction extends SelectionDispatchAction{
 				return getCommonParent(javaElements, resources);
 		}
 
-		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets) throws JavaModelException {
+		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets, List selectedElements) throws JavaModelException {
 			Object target= getTarget(javaElements, resources);
 			return target != null && canPasteFilesOn(getAsContainer(target)) && selectedWorkingSets.length == 0;
 		}
@@ -1324,7 +1328,7 @@ public class PasteAction extends SelectionDispatchAction{
 			return new ParentChecker(resources, javaElements).getCommonParent();
 		}
 
-		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets) throws JavaModelException {
+		public boolean canPasteOn(IJavaElement[] javaElements, IResource[] resources, IWorkingSet[] selectedWorkingSets, List selectedElements) throws JavaModelException {
 			if (selectedWorkingSets.length != 0)
 				return false;
 			IResource[] clipboardResources= getClipboardResources(fAvailableTypes);
@@ -1355,7 +1359,7 @@ public class PasteAction extends SelectionDispatchAction{
 			return isAvailable(TypedSourceTransfer.getInstance(), availableTypes);
 		}
 
-		public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets) throws JavaModelException {
+		public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, List selectedElements) throws JavaModelException {
 			if (selectedResources.length != 0 || selectedWorkingSets.length != 0)
 				return false;
 			TypedSource[] typedSources= getClipboardTypedSources(fAvailableTypes);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInformationPopup.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInformationPopup.java
index 4b4a0f4..6bc5749 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInformationPopup.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameInformationPopup.java	
@@ -249,6 +249,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 	private final RenameLinkedMode fRenameLinkedMode;
 
 	private int fSnapPosition;
+	private boolean fSnapPositionChanged;
 	private Shell fPopup;
 	private GridLayout fPopupLayout;
 	private Region fRegion;
@@ -275,6 +276,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 			// default:
 			fSnapPosition= SNAP_POSITION_UNDER_LEFT_FIELD;
 		}
+		fSnapPositionChanged= true;
 	}
 
 	private IDialogSettings getDialogSettings() {
@@ -371,7 +373,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 
 		packPopup();
 		Point loc= computePopupLocation(fSnapPosition);
-		if (loc != null) {
+		if (loc != null && ! loc.equals(fPopup.getLocation())) {
 			fPopup.setLocation(loc);
 			// XXX workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=170774
 //			fPopup.moveBelow(fEditor.getSite().getShell().getShells()[0]);
@@ -552,6 +554,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 							if (dist < minDist) {
 								minDist= dist;
 								fSnapPosition= snapPos;
+								fSnapPositionChanged= true;
 								currentRects[1]= DROP_TARGETS[snapPos];
 							}
 						}
@@ -566,6 +569,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 					getDialogSettings().put(SNAP_POSITION_KEY, fSnapPosition);
 				} else {
 					fSnapPosition= originalSnapPosition;
+					fSnapPositionChanged= true;
 				}
 				updatePopupLocation(true);
 				activateEditor();
@@ -574,6 +578,11 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 	}
 
 	private void packPopup() {
+		if (!fSnapPositionChanged) {
+			return;
+		}
+		fSnapPositionChanged= false;
+		
 		boolean isUnderLeft= fSnapPosition == SNAP_POSITION_UNDER_LEFT_FIELD;
 		boolean isOverLeft= fSnapPosition == SNAP_POSITION_OVER_LEFT_FIELD;
 		fPopupLayout.marginTop= isUnderLeft ? HAH : 0;
@@ -774,6 +783,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
 		IAction action= new Action(text, IAction.AS_RADIO_BUTTON) {
 			public void run() {
 				fSnapPosition= snapPosition;
+				fSnapPositionChanged= true;
 				getDialogSettings().put(SNAP_POSITION_KEY, fSnapPosition);
 				updatePopupLocation(true);
 				activateEditor();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameLinkedMode.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameLinkedMode.java
index 2d5c17a..4d5d08d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameLinkedMode.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/RenameLinkedMode.java	
@@ -70,12 +70,12 @@ import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.refactoring.IJavaRefactorings;
 import org.eclipse.jdt.core.refactoring.descriptors.RenameJavaElementDescriptor;
 
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.rename.RenamingNameSuggestor;
 import org.eclipse.jdt.internal.corext.util.JavaConventionsUtil;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
@@ -438,6 +438,9 @@ public class RenameLinkedMode {
 
 		viewer.setSelectedRange(fOriginalSelection.x, fOriginalSelection.y);
 
+		if (newName.length() == 0)
+			return null;
+		
 		RenameJavaElementDescriptor descriptor= createRenameDescriptor(fJavaElement, newName);
 		RenameSupport renameSupport= RenameSupport.create(descriptor);
 		return renameSupport;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.java
index a42c317..7d56a2f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,19 +21,6 @@ public final class ReorgMessages extends NLS {
 	}
 
 	public static String CutAction_text;
-	public static String copyAction_description;
-	public static String copyAction_destination_label;
-	public static String copyAction_name;
-	public static String deleteAction_checkDeletion;
-	public static String deleteAction_confirm_title;
-	public static String deleteAction_confirmReadOnly;
-	public static String deleteAction_description;
-	public static String DestinationRenderer_packages;
-	public static String moveAction_checkMove;
-	public static String moveAction_error_readOnly;
-	public static String moveAction_label;
-	public static String moveAction_name;
-	public static String moveAction_destination_label;
 	public static String PasteAction_projectName;
 	public static String RenameInformationPopup_delayJobName;
 	public static String RenameInformationPopup_EnterNewName;
@@ -49,82 +36,41 @@ public final class ReorgMessages extends NLS {
 	public static String RenameInformationPopup_snap_under_right;
 	public static String RenameInformationPopup_SnapTo;
 	public static String RenameLinkedMode_error_saving_editor;
-	public static String ReorgAction_checkSaveTargets;
-	public static String ReorgAction_checkSaveTargets_title;
-	public static String ReorgAction_exception_saving;
-	public static String ReorgAction_task_saving;
-	public static String ReorgAction_exception;
-	public static String ReorgAction_reorganize;
-	public static String CopyResourcesToClipboardAction_copy;
-	public static String CutSourceReferencesToClipboardAction_cut;
-	public static String DeleteResourceAction_delete;
-	public static String DeleteResourceAction_exception;
-	public static String PasteSourceReferencesFromClipboardAction_paste1;
-	public static String PasteSourceReferencesFromClipboardAction_exception;
-	public static String ReorgExceptionHandler_see_details;
-	public static String ReorgGroup_copy;
-	public static String ReorgGroup_paste;
-	public static String ReorgGroup_pasteAction_description;
-	public static String ReorgGroup_delete;
-	public static String SourceReferenceAction_exception;
-	public static String JdtCopyAction_referenced;
-	public static String JdtCopyAction_update_classpath;
-	public static String JdtCopyAction_Copy;
-	public static String JdtMoveAction_move;
+	public static String JdtMoveAction_update_references_singular;
+	public static String JdtMoveAction_update_references_plural;
+
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * @deprecated As of 3.6
+	 */
 	public static String JdtMoveAction_update_references;
-	public static String JdtMoveAction_preview;
-	public static String JdtMoveAction_exception;
-	public static String JdtMoveAction_referenced;
-	public static String JdtMoveAction_update_classpath;
-	public static String JdtMoveAction_Move;
-	public static String JdtMoveAction_default_package_warning;
-	public static String DeleteSourceReferencesAction_delete_elements;
-	public static String DeleteSourceReferencesAction_exception;
-	public static String DeleteSourceReferencesAction_delete1;
-	public static String DeleteSourceReferencesAction_confirm_gs_delete;
-	public static String DeleteSourceReferencesAction_delete_gs;
-	public static String DeleteSourceReferencesAction_title;
-	public static String DeleteSourceReferencesAction_read_only;
-	public static String DeleteSourceReferencesAction_cu_read_only;
-	public static String DeleteSourceReferencesAction_cu_empty;
-	public static String DeleteSourceReferencesAction_cus_empty;
-	public static String ReorgDestinationAction_duplicate_name;
-	public static String ReorgDestinationAction_error;
-	public static String ReorgDestinationAction_exception;
-	public static String ReorgDestinationAction_duplicate;
-	public static String ReorgDestinationAction_exception_title;
-	public static String ReorgDestinationAction_error_occurred;
+
 	public static String ReorgQueries_enterNewNameQuestion;
 	public static String ReorgQueries_nameConflictMessage;
 	public static String ReorgQueries_resourceWithThisNameAlreadyExists;
 	public static String ReorgQueries_invalidNameMessage;
 	public static String ReorgQueries_packagewithThatNameexistsMassage;
 	public static String ReorgQueries_resourceExistsWithDifferentCaseMassage;
-	public static String ReorgQueries_Confirm_Overwritting;
-	public static String ReorgQueries_exists_read_only;
-	public static String ReorgQueries_exists;
 	public static String ReorgQueries_skip_all;
-	public static String CopyToClipboardProblemDialog_title;
-	public static String CopyToClipboardProblemDialog_message;
-	public static String PasteResourcesFromClipboardAction_error_title;
-	public static String PasteResourcesFromClipboardAction_error_message;
-	public static String ReorgExceptionHandler_error_title;
-	public static String ReorgExceptionHandler_error_message;
-	public static String DeleteSourceReferencesAction_sure;
-	public static String DeleteSourceReferencesAction_sure_elements;
-	public static String DeleteSourceReferenceAction_error_title;
-	public static String DeleteSourceReferenceAction_error_message;
-	public static String DeleteSourceReferenceAction_deleting;
-	public static String DeleteResourcesAction_deleteAction_confirm_message;
-	public static String DeleteResourcesAction_Delete;
-	public static String DeleteResourcesAction_sure_delete;
-	public static String DeleteResourcesAction_sure_delete_resources;
-	public static String DeleteResourcesAction_default_package;
-	public static String DeleteResourcesAction_referenced;
-	public static String DeleteResourcesAction_sure_delete_linked_single;
-	public static String DeleteResourcesAction_sure_delete_linked_single_package_or_pfr;
-	public static String DeleteResourcesAction_sure_delete_linked_multiple;
-	public static String DeleteResourcesAction_sure_delete_linked_multiple_with_packages_or_pfr;
+
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392.
+	 * @deprecated As of 3.6
+	 */
+	public static String ReorgGroup_paste;
+
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392 .
+	 * @deprecated As of 3.6
+	 */
+	public static String ReorgGroup_delete;
+
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392 .
+	 * @deprecated As of 3.6
+	 */
+	public static String CutSourceReferencesToClipboardAction_cut;
+
 	public static String CopyToClipboardAction_text;
 	public static String CopyToClipboardAction_description;
 	public static String CopyToClipboardAction_2;
@@ -139,15 +85,12 @@ public final class ReorgMessages extends NLS {
 	public static String DeleteWorkingSet_Remove;
 	public static String DeleteWorkingSet_single;
 	public static String DeleteWorkingSet_multiple;
-	public static String NewNameQueries_21;
-	public static String NewNameQueries_22;
 	public static String ReorgCopyAction_3;
 	public static String ReorgCopyAction_4;
 	public static String ReorgCopyWizard_1;
 	public static String ReorgMoveAction_3;
 	public static String ReorgMoveAction_4;
 	public static String ReorgMoveWizard_3;
-	public static String ReorgMoveWizard_4;
 	public static String ReorgMoveWizard_textual_move;
 	public static String ReorgMoveWizard_newPackage;
 	public static String ReorgUserInputPage_choose_destination_single;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.properties
index fd1ce4d..3b7d9ad 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.properties	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,77 +11,8 @@
 
 CutAction_text=Cu&t
 
-copyAction_description=Copy the selected elements
-copyAction_destination_label=&Select the copy destination
-copyAction_name=Copy
-
-deleteAction_checkDeletion=Check Deletion
-deleteAction_confirm_title=Confirm Delete
-deleteAction_confirmReadOnly=The selected elements contain read-only resources. Do you still want to delete them?
-deleteAction_description=Delete the selected elements
-DestinationRenderer_packages=packages
-
-moveAction_checkMove=Check Move
-moveAction_error_readOnly=The selected elements contain read-only resources. Do you still want to move them?
-moveAction_label=Mo&ve...
-moveAction_name=Move
-moveAction_destination_label=&Select the move destination:
-
-ReorgAction_checkSaveTargets=These elements contain unsaved changes.\nCheck the elements you want to save before proceeding.
-ReorgAction_checkSaveTargets_title=Save Resources
-ReorgAction_exception_saving=An exception occurred while saving editor contents.
-ReorgAction_task_saving=Saving
-ReorgAction_exception=Unexpected exception. See log for details
-ReorgAction_reorganize=Reorganize
-
-CopyResourcesToClipboardAction_copy=&Copy
-
-CutSourceReferencesToClipboardAction_cut=Cu&t
-
-DeleteResourceAction_delete=Delete
-DeleteResourceAction_exception=Unexpected exception. See log for details
-
-PasteSourceReferencesFromClipboardAction_paste1=Paste
-PasteSourceReferencesFromClipboardAction_exception=Unexpected exception. See log for details
-
-ReorgExceptionHandler_see_details=See details
-ReorgGroup_copy=&Copy
-ReorgGroup_paste=&Paste
-ReorgGroup_pasteAction_description=Pastes elements from the clipboard
-ReorgGroup_delete=&Delete
-
-SourceReferenceAction_exception=Unexpected exception. See log for details
-
-JdtCopyAction_referenced=Package fragment root ''{0}'' is referenced by other projects.
-JdtCopyAction_update_classpath=Do you want to update classpath of the other projects?
-JdtCopyAction_Copy=Copy
-
-JdtMoveAction_move=Move
-JdtMoveAction_update_references=Update &references to the moved element(s)
-JdtMoveAction_preview=Preview...
-JdtMoveAction_exception=Unexpected exception occurred. See log for details
-JdtMoveAction_referenced=Package fragment root ''{0}'' is referenced by other projects.
-JdtMoveAction_update_classpath=Do you want to update classpath of the other projects?
-JdtMoveAction_Move=Move
-JdtMoveAction_default_package_warning=Moving compilation units to or from the default package will not update references.
-
-DeleteSourceReferencesAction_delete_elements=Delete elements
-DeleteSourceReferencesAction_exception=Unexpected exception. See log for details
-DeleteSourceReferencesAction_delete1=Delete
-DeleteSourceReferencesAction_confirm_gs_delete=Confirm Delete of Getters/Setters
-DeleteSourceReferencesAction_delete_gs=Do you also want to delete getters/setters for the selected fields?
-DeleteSourceReferencesAction_title=Delete
-DeleteSourceReferencesAction_read_only=Cannot delete. All selected elements are defined in read-only files.
-DeleteSourceReferencesAction_cu_read_only=Compilation unit ''{0}'' is read-only. Do you still want to delete it?
-DeleteSourceReferencesAction_cu_empty=After the delete operation the compilation unit ''{0}'' contains no types. \nOK to delete this compilation unit?
-DeleteSourceReferencesAction_cus_empty=After the delete operation {0} compilation units contain no types. \nOK to delete these compilation units?
-
-ReorgDestinationAction_duplicate_name=Duplicate Element Name
-ReorgDestinationAction_error=An error occurred while reorganizing resources
-ReorgDestinationAction_exception=Unexpected exception occurred. See log for details
-ReorgDestinationAction_duplicate=Two or more elements named {0} are selected
-ReorgDestinationAction_exception_title=Exception
-ReorgDestinationAction_error_occurred=Error occurred while performing this operation.
+JdtMoveAction_update_references_singular=Update &references to ''{0}''
+JdtMoveAction_update_references_plural=Update &references to {0} moved elements
 
 ReorgQueries_enterNewNameQuestion=Enter a new name for ''{0}'':
 ReorgQueries_nameConflictMessage=Name Conflict
@@ -89,36 +20,8 @@ ReorgQueries_resourceWithThisNameAlreadyExists=Resource with this name already e
 ReorgQueries_invalidNameMessage=Invalid name
 ReorgQueries_packagewithThatNameexistsMassage=Package with that name exists
 ReorgQueries_resourceExistsWithDifferentCaseMassage=Resource exists with different case
-ReorgQueries_Confirm_Overwritting=Confirm Overwriting
-ReorgQueries_exists_read_only=''{0}'' exists and is read-only. Do you wish to overwrite ?
-ReorgQueries_exists=''{0}'' exists. Do you wish to overwrite ?
 ReorgQueries_skip_all=Skip All
 
-CopyToClipboardProblemDialog_title=Problem Copying to Clipboard
-CopyToClipboardProblemDialog_message=There was a problem when accessing the system clipboard. Retry?
-
-PasteResourcesFromClipboardAction_error_title=Paste
-PasteResourcesFromClipboardAction_error_message=Internal error occurred. Please see log for details.
-
-ReorgExceptionHandler_error_title=Problems Deleting
-ReorgExceptionHandler_error_message=Resource {0} is out of synch with the file system. Do you want to delete it anyway?
-
-DeleteSourceReferencesAction_sure=Are you sure you want to delete ''{0}''?
-DeleteSourceReferencesAction_sure_elements=Are you sure you want to delete these {0} elements?
-DeleteSourceReferenceAction_error_title=Delete
-DeleteSourceReferenceAction_error_message=An error occurred while performing this operation. See log for details.
-DeleteSourceReferenceAction_deleting=Deleting
-
-DeleteResourcesAction_deleteAction_confirm_message=The selection includes a folder that contains a Java source folder. Delete this folder?
-DeleteResourcesAction_Delete=Delete
-DeleteResourcesAction_sure_delete=Are you sure you want to delete ''{0}''?
-DeleteResourcesAction_sure_delete_resources=Are you sure you want to delete these {0} resources?
-DeleteResourcesAction_default_package=(default package)
-DeleteResourcesAction_referenced=Package fragment root ''{0}'' is referenced by the following projects. Do you still want to delete it?
-DeleteResourcesAction_sure_delete_linked_single=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.
-DeleteResourcesAction_sure_delete_linked_single_package_or_pfr=Are you sure you want to delete linked resource ''{0}''?\nOnly the workspace link will be deleted. Link target will remain unchanged.\n\nNote that all subelements of the selected linked packages and package fragment roots will be removed from the workspace as well.
-DeleteResourcesAction_sure_delete_linked_multiple=Are you sure you want to delete these {0} resources?\n\nSelection contains linked resources.\nOnly the workspace links will be deleted. Link targets will remain unchanged.
-DeleteResourcesAction_sure_delete_linked_multiple_with_packages_or_pfr=Are you sure you want to delete these {0} resources?\n\nSelection contains linked packages.\nOnly the workspace links will be deleted. Link targets will remain unchanged.\n\nNote that all subelements of linked packages and package fragment roots will be removed from the workspace as well.
 CopyToClipboardAction_text=&Copy
 CopyToClipboardAction_description=Copy the selected elements to the clipboard
 CopyToClipboardAction_2=Copy To Clipboard
@@ -133,15 +36,12 @@ DeleteWorkingSet_removeorhideworkingset_multiple=Do you want to remove these {0}
 DeleteWorkingSet_Remove=&Remove
 DeleteWorkingSet_single=Delete Working Set
 DeleteWorkingSet_multiple=Delete Working Sets
-NewNameQueries_21=Error
-NewNameQueries_22=Internal error occurred. See log for details.
 ReorgCopyAction_3=&Copy...
 ReorgCopyAction_4=Copy the selected elements
 ReorgCopyWizard_1=Copy
 ReorgMoveAction_3=&Move...
 ReorgMoveAction_4=Move the selected elements
 ReorgMoveWizard_3=Move
-ReorgMoveWizard_4=The selected element cannot be the destination of this operation.
 ReorgMoveWizard_textual_move=Textual Move
 ReorgMoveWizard_newPackage=Cr&eate Package...
 ReorgUserInputPage_choose_destination_single=&Choose destination for ''{0}'':
@@ -166,7 +66,7 @@ PasteAction_cannot_no_selection=Cannot paste the clipboard contents.
 PasteAction_snippet_default_package_name=snippet
 PasteAction_snippet_default_type_name=Snippet
 
-RenameLinkedMode_error_saving_editor=An error occurred while saving the editor
+RenameLinkedMode_error_saving_editor=An error occurred while saving the editor.
 
 RenameInformationPopup_SnapTo=&Snap To
 RenameInformationPopup_snap_under_left=&Under Left
@@ -181,3 +81,15 @@ RenameInformationPopup_OpenDialog=&Open Rename Dialog...
 RenameInformationPopup_preferences=&Preferences...
 RenameInformationPopup_EnterNewName=Enter new name, press {0} to refactor
 RenameInformationPopup_delayJobName=delayed RenameInformationPopup
+
+# DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392
+ReorgGroup_paste=&Paste
+
+# DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392
+ReorgGroup_delete=&Delete
+
+# DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297392
+CutSourceReferencesToClipboardAction_cut=Cu&t
+
+# DO NOT REMOVE, used in a product
+JdtMoveAction_update_references=Update &references to the moved element(s)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java
index d7358ab..6413aa3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java	
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/ReorgMoveWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,10 +40,14 @@ import org.eclipse.jdt.internal.corext.refactoring.reorg.ICreateTargetQuery;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgDestinationValidator;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaMoveProcessor;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgDestinationFactory;
+import org.eclipse.jdt.internal.corext.util.Messages;
+
+import org.eclipse.jdt.ui.JavaElementLabels;
 
 import org.eclipse.jdt.internal.ui.refactoring.QualifiedNameComponent;
 import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
 import org.eclipse.jdt.internal.ui.util.SWTUtil;
+import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
 
 public class ReorgMoveWizard extends RefactoringWizard {
@@ -72,6 +76,9 @@ public class ReorgMoveWizard extends RefactoringWizard {
 	private static class MoveInputPage extends ReorgUserInputPage{
 
 		private static final String PAGE_NAME= "MoveInputPage"; //$NON-NLS-1$
+		private static final long LABEL_FLAGS= JavaElementLabels.ALL_DEFAULT
+				| JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.F_PRE_TYPE_SIGNATURE;
+
 		private Button fReferenceCheckbox;
 		private Button fQualifiedNameCheckbox;
 		private QualifiedNameComponent fQualifiedNameComponent;
@@ -142,8 +149,26 @@ public class ReorgMoveWizard extends RefactoringWizard {
 			final JavaMoveProcessor processor= getJavaMoveProcessor();
 			if (! processor.canUpdateJavaReferences())
 				return;
+
+			String text;
+			int resources= getResources().length;
+			int javaElements= getJavaElements().length;
+			if (resources == 0 && javaElements == 1) {
+				text= Messages.format(
+						ReorgMessages.JdtMoveAction_update_references_singular,
+						JavaElementLabels.getElementLabel(getJavaElements()[0], LABEL_FLAGS));
+			} else if (resources == 1 && javaElements == 0) {
+				text= Messages.format(
+						ReorgMessages.JdtMoveAction_update_references_singular,
+						BasicElementLabels.getResourceName(getResources()[0]));
+			} else {
+				text= Messages.format(
+						ReorgMessages.JdtMoveAction_update_references_plural,
+						String.valueOf(resources + javaElements));
+			}
+
 			fReferenceCheckbox= new Button(result, SWT.CHECK);
-			fReferenceCheckbox.setText(ReorgMessages.JdtMoveAction_update_references);
+			fReferenceCheckbox.setText(text);
 			fReferenceCheckbox.setSelection(processor.getUpdateReferences());
 
 			fReferenceCheckbox.addSelectionListener(new SelectionAdapter() {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/EditorInputAdapterFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/EditorInputAdapterFactory.java
index adaf78d..07a15f3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/EditorInputAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/EditorInputAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ public class EditorInputAdapterFactory implements IAdapterFactory {
 
 	public Object getAdapter(Object element, Class key) {
 		updateLazyLoadedAdapters();
-		if (fSearchPageScoreComputer != null && ISearchPageScoreComputer.class.equals(key))
+		if (fSearchPageScoreComputer != null && ISearchPageScoreComputer.class.equals(key) && element instanceof IEditorInput && JavaUI.getEditorInputJavaElement((IEditorInput)element) != null)
 			return fSearchPageScoreComputer;
 
 		if (IJavaElement.class.equals(key) && element instanceof IEditorInput) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java
index 6f62961..00c3d82 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/IJavaHelpContextIds.java
@@ -167,10 +167,17 @@ public interface IJavaHelpContextIds {
 	public static final String MODIFY_PARAMETERS_ACTION= 									PREFIX + "modify_parameters_action"; //$NON-NLS-1$
 	public static final String MOVE_ACTION= 														PREFIX + "move_action"; //$NON-NLS-1$
 	public static final String OPEN_ACTION= 														PREFIX + "open_action"; //$NON-NLS-1$
-	public static final String OPEN_EXTERNAL_JAVADOC_ACTION= 							PREFIX + "open_external_javadoc_action"; //$NON-NLS-1$
+
+	public static final String OPEN_ATTACHED_JAVADOC_ACTION= PREFIX + "open_attached_javadoc_action"; //$NON-NLS-1$
 	public static final String OPEN_INPUT_ACTION= 														PREFIX + "open_input_action"; //$NON-NLS-1$
 	public static final String OPEN_SUPER_IMPLEMENTATION_ACTION= 					PREFIX + "open_super_implementation_action"; //$NON-NLS-1$
 	public static final String PULL_UP_ACTION= 													PREFIX + "pull_up_action"; //$NON-NLS-1$
+	
+	/**
+	 * @since 3.6
+	 */
+	public static final String OPEN_IMPLEMENTATION_ACTION= 					PREFIX + "open_implementation_action"; //$NON-NLS-1$
+	
 	/**
 	 * @since 3.2
 	 */
@@ -431,7 +438,7 @@ public interface IJavaHelpContextIds {
     public static final String CALL_HIERARCHY_FOCUS_ON_SELECTION_ACTION= PREFIX + "call_hierarchy_focus_on_selection_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_HISTORY_ACTION= PREFIX + "call_hierarchy_history_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_HISTORY_DROP_DOWN_ACTION= PREFIX + "call_hierarchy_history_drop_down_action_context"; //$NON-NLS-1$
-    public static final String CALL_HIERARCHY_REFRESH_ACTION= PREFIX + "call_hierarchy_refresh_action_context"; //$NON-NLS-1$
+    public static final String CALL_HIERARCHY_REFRESH_VIEW_ACTION= PREFIX + "call_hierarchy_refresh_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_SEARCH_SCOPE_ACTION= PREFIX + "call_hierarchy_search_scope_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_TOGGLE_CALL_MODE_ACTION= PREFIX + "call_hierarchy_toggle_call_mode_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_TOGGLE_JAVA_LABEL_FORMAT_ACTION= PREFIX + "call_hierarchy_toggle_java_label_format_action_context"; //$NON-NLS-1$
@@ -442,6 +449,12 @@ public interface IJavaHelpContextIds {
     public static final String CALL_HIERARCHY_CANCEL_SEARCH_ACTION= PREFIX + "call_hierarchy_cancel_search_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_EXPAND_WITH_CONSTRUCTORS_ACTION= PREFIX + "call_hierarchy_expand_with_constructors_action_context"; //$NON-NLS-1$
     public static final String CALL_HIERARCHY_EXPAND_WITH_CONSTRUCTORS_DIALOG= PREFIX + "call_hierarchy_expand_with_constructors_dialog_context"; //$NON-NLS-1$
+    public static final String CALL_HIERARCHY_REMOVE_FROM_VIEW_ACTION= PREFIX + "call_hierarchy_remove_from_view_action_context"; //$NON-NLS-1$
+
+    /**
+     * @since 3.6
+     */
+    public static final String CALL_HIERARCHY_REFRESH_SINGLE_ELEMENT_ACTION= PREFIX + "call_hierarchy_refresh_single_element_action_context"; //$NON-NLS-1$
     /**
      * @since 3.2
      */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/InitializeAfterLoadJob.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/InitializeAfterLoadJob.java
index 5250ce5..ebfce72 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/InitializeAfterLoadJob.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/InitializeAfterLoadJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ public class InitializeAfterLoadJob extends UIJob {
 				JavaPlugin.log(e);
 				return e.getStatus();
 			}
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		}
 		public boolean belongsTo(Object family) {
 			return JavaUI.ID_PLUGIN.equals(family);
@@ -53,6 +53,6 @@ public class InitializeAfterLoadJob extends UIJob {
 		Job job = new RealJob(JavaUIMessages.JavaPlugin_initializing_ui);
 		job.setPriority(Job.SHORT);
 		job.schedule();
-		return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaElementAdapterFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaElementAdapterFactory.java
index 5f6ed5a..483dd4c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaElementAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaElementAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,11 +43,12 @@ import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
 import org.eclipse.jdt.internal.ui.search.JavaSearchPageScoreComputer;
 import org.eclipse.jdt.internal.ui.search.SearchUtil;
 
+
 /**
  * Implements basic UI support for Java elements.
  * Implements handle to persistent support for Java elements.
  */
-public class JavaElementAdapterFactory implements IAdapterFactory, IContributorResourceAdapter, IContributorResourceAdapter2 {
+public class JavaElementAdapterFactory implements IAdapterFactory, IContributorResourceAdapter2 {
 
 	private static Class[] PROPERTIES= new Class[] {
 		IPropertySource.class,
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaHierarchyPerspectiveFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaHierarchyPerspectiveFactory.java
index 68d3e12..334b68b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaHierarchyPerspectiveFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaHierarchyPerspectiveFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,8 +42,8 @@ public class JavaHierarchyPerspectiveFactory implements IPerspectiveFactory {
 		folder.addView(JavaUI.ID_TYPE_HIERARCHY);
 		folder.addPlaceholder(IPageLayout.ID_OUTLINE);
 		folder.addPlaceholder(JavaUI.ID_PACKAGES);
-		folder.addPlaceholder(IPageLayout.ID_RES_NAV);
-		folder.addPlaceholder(JavaPerspectiveFactory.ID_PROJECT_EXPLORER);
+		folder.addPlaceholder(JavaPlugin.ID_RES_NAV);
+		folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
 
 		IPlaceholderFolderLayout outputfolder= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
 		outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
@@ -70,11 +70,12 @@ public class JavaHierarchyPerspectiveFactory implements IPerspectiveFactory {
 		// views - standard workbench
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-		layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+		layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
 		layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
-		layout.addShowViewShortcut(JavaPerspectiveFactory.ID_PROJECT_EXPLORER);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
 		layout.addShowViewShortcut(TemplatesView.ID);
+		layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
 
 		layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$
@@ -88,5 +89,11 @@ public class JavaHierarchyPerspectiveFactory implements IPerspectiveFactory {
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+
+		// 'Window' > 'Open Perspective' contributions
+		layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE);
+		layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
+		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java
index 34b8bc9..3f4640a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPerspectiveFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,10 +25,9 @@ import org.eclipse.search.ui.NewSearchUI;
 
 import org.eclipse.jdt.ui.JavaUI;
 
+
 public class JavaPerspectiveFactory implements IPerspectiveFactory {
 
-	// located in 'org.eclipse.ui.navigator.resources (ProjectExplorer)' which we don't need to import at the moment
-	public static final String ID_PROJECT_EXPLORER= "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
 
 	/**
 	 * Constructs a new Default layout engine.
@@ -42,9 +41,9 @@ public class JavaPerspectiveFactory implements IPerspectiveFactory {
 
 		IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$
 		folder.addView(JavaUI.ID_PACKAGES);
-		folder.addView(JavaUI.ID_TYPE_HIERARCHY);
-		folder.addPlaceholder(IPageLayout.ID_RES_NAV);
-		folder.addPlaceholder(ID_PROJECT_EXPLORER);
+		folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
+		folder.addPlaceholder(JavaPlugin.ID_RES_NAV);
+		folder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
 
 		IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$
 		outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
@@ -59,8 +58,6 @@ public class JavaPerspectiveFactory implements IPerspectiveFactory {
 		outlineFolder.addView(IPageLayout.ID_OUTLINE);
 
 		outlineFolder.addPlaceholder(TemplatesView.ID);
-		// XXX: in 3.4 M7 to be replaced by:
-//		outlineFolder.addView(TemplatesView.ID);
 
 		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
 		layout.addActionSet(JavaUI.ID_ACTION_SET);
@@ -83,11 +80,12 @@ public class JavaPerspectiveFactory implements IPerspectiveFactory {
 		// views - standard workbench
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-		layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+		layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
 		layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
-		layout.addShowViewShortcut(ID_PROJECT_EXPLORER);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
 		layout.addShowViewShortcut(TemplatesView.ID);
+		layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
 
 		// new actions - Java project creation wizard
 		layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
@@ -102,5 +100,10 @@ public class JavaPerspectiveFactory implements IPerspectiveFactory {
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+
+		// 'Window' > 'Open Perspective' contributions
+		layout.addPerspectiveShortcut(JavaUI.ID_BROWSING_PERSPECTIVE);
+		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
index 0fd0d84..b8b98f7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,6 +47,7 @@ import org.eclipse.jface.text.templates.TemplateContextType;
 import org.eclipse.jface.text.templates.TemplateVariableResolver;
 import org.eclipse.jface.text.templates.persistence.TemplateStore;
 
+import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
@@ -106,6 +107,7 @@ import org.eclipse.jdt.internal.ui.viewsupport.ImagesOnFileSystemRegistry;
 import org.eclipse.jdt.internal.ui.viewsupport.ProblemMarkerManager;
 import org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathAttributeConfigurationDescriptors;
 
+
 /**
  * Represents the java plug-in. It provides a series of convenience methods such as
  * access to the workbench, keeps track of elements shared by all editors and viewers
@@ -113,6 +115,13 @@ import org.eclipse.jdt.internal.ui.wizards.buildpaths.ClasspathAttributeConfigur
  */
 public class JavaPlugin extends AbstractUIPlugin {
 
+
+	/**
+	 * The view id for the workbench's Resource Navigator standard component.
+	 * @since 3.6
+	 */
+	public static final String ID_RES_NAV= IPageLayout.ID_RES_NAV;
+
 	/**
 	 * The key to store customized templates.
 	 * @since 3.0
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java
index 3ee65d1..a4f0eb9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPluginImages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -360,8 +360,9 @@ public class JavaPluginImages {
     public static final ImageDescriptor DESC_DLCL_COPY_QUALIFIED_NAME= createUnManaged(T_DLCL, "cpyqual_menu.gif"); //$NON-NLS-1$
     public static final ImageDescriptor DESC_ELCL_COPY_QUALIFIED_NAME= createUnManaged(T_ELCL, "cpyqual_menu.gif"); //$NON-NLS-1$
 
-    public static final ImageDescriptor DESC_DLCL_EXTERNAL_BROWSER= createUnManaged(T_DLCL, "external_browser.gif"); //$NON-NLS-1$
-	public static final ImageDescriptor DESC_ELCL_EXTERNAL_BROWSER= createUnManaged(T_ELCL, "external_browser.gif"); //$NON-NLS-1$
+	public static final ImageDescriptor DESC_DLCL_OPEN_BROWSER= createUnManaged(T_DLCL, "open_browser.gif"); //$NON-NLS-1$
+
+	public static final ImageDescriptor DESC_ELCL_OPEN_BROWSER= createUnManaged(T_ELCL, "open_browser.gif"); //$NON-NLS-1$
 
 	public static final ImageDescriptor DESC_OBJ_OVERRIDES= createUnManaged(T_OBJ, "over_co.gif");  					//$NON-NLS-1$
 	public static final ImageDescriptor DESC_OBJ_IMPLEMENTS= createUnManaged(T_OBJ, "implm_co.gif");  				//$NON-NLS-1$
@@ -376,6 +377,7 @@ public class JavaPluginImages {
 	public static final ImageDescriptor DESC_OVR_RUN= createUnManagedCached(T_OVR, "run_co.gif"); 							//$NON-NLS-1$
 	public static final ImageDescriptor DESC_OVR_WARNING= createUnManagedCached(T_OVR, "warning_co.gif"); 					//$NON-NLS-1$
 	public static final ImageDescriptor DESC_OVR_ERROR= createUnManagedCached(T_OVR, "error_co.gif"); 						//$NON-NLS-1$
+	public static final ImageDescriptor DESC_OVR_BUILDPATH_ERROR= createUnManagedCached(T_OVR, "error_co_buildpath.gif"); //$NON-NLS-1$
 	public static final ImageDescriptor DESC_OVR_OVERRIDES= createUnManagedCached(T_OVR, "over_co.gif");  					//$NON-NLS-1$
 	public static final ImageDescriptor DESC_OVR_IMPLEMENTS= createUnManagedCached(T_OVR, "implm_co.gif");  				//$NON-NLS-1$
 	public static final ImageDescriptor DESC_OVR_SYNCH_AND_OVERRIDES= createUnManagedCached(T_OVR, "sync_over.gif");  	//$NON-NLS-1$
@@ -441,7 +443,7 @@ public class JavaPluginImages {
 	public static final ImageDescriptor DESC_ELCL_COLLAPSEALL= createUnManaged(T_ELCL, "collapseall.gif"); //$NON-NLS-1$
 
 	// Keys for correction proposal. We have to put the image into the registry since "code assist" doesn't
-	// have a life cycle. So no change to dispose icons.
+	// have a life cycle. So no chance to dispose icons.
 
 	public static final String IMG_CORRECTION_CHANGE= NAME_PREFIX + "correction_change.gif"; //$NON-NLS-1$
 	public static final String IMG_CORRECTION_MOVE= NAME_PREFIX + "correction_move.gif"; //$NON-NLS-1$
@@ -452,6 +454,7 @@ public class JavaPluginImages {
 	public static final String IMG_CORRECTION_REMOVE= NAME_PREFIX + "remove_correction.gif"; //$NON-NLS-1$
 	public static final String IMG_CORRECTION_ADD= NAME_PREFIX + "add_correction.gif"; //$NON-NLS-1$
 	public static final String IMG_CORRECTION_CAST= NAME_PREFIX + "correction_cast.gif"; //$NON-NLS-1$
+	public static final String IMG_CORRECTION_MULTI_FIX= NAME_PREFIX + "correction_multi_fix.gif"; //$NON-NLS-1$
 
 	static {
 		createManagedFromKey(T_OBJ, IMG_CORRECTION_CHANGE);
@@ -463,6 +466,7 @@ public class JavaPluginImages {
 		createManagedFromKey(T_OBJ, IMG_CORRECTION_REMOVE);
 		createManagedFromKey(T_OBJ, IMG_CORRECTION_ADD);
 		createManagedFromKey(T_OBJ, IMG_CORRECTION_CAST);
+		createManagedFromKey(T_OBJ, IMG_CORRECTION_MULTI_FIX);
 	}
 
 	private static final class CachedImageDescriptor extends ImageDescriptor {
@@ -598,7 +602,7 @@ public class JavaPluginImages {
 	}
 
 	/*
-	 * Creates an image descriptor for the given prefix and name in the JDT UI bundle and let tye descriptor cache the image data.
+	 * Creates an image descriptor for the given prefix and name in the JDT UI bundle and let type descriptor cache the image data.
 	 * If no image could be found, the 'missing image descriptor' is returned.
 	 */
 	private static ImageDescriptor createUnManagedCached(String prefix, String name) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.java
index ad81783..bb3ef1d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *     Mateusz Matela <mateusz.matela at gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
  *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] Template edit dialog has usability issues - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267916
  *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
+ *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] toString() generator: Fields in declaration order - https://bugs.eclipse.org/bugs/show_bug.cgi?id=279924
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui;
 
@@ -49,18 +50,43 @@ public final class JavaUIMessages extends NLS {
 	public static String MultiElementListSelectionDialog_pageInfoMessage;
 	public static String PackageSelectionDialog_progress_findEmpty;
 	public static String PackageSelectionDialog_progress_search;
+	
 
-	public static String TypeSelectionDialog_errorMessage;
+	public static String TypeInfoViewer_job_label;
+	public static String TypeInfoViewer_job_error;
+	public static String TypeInfoViewer_job_cancel;
+	public static String TypeInfoViewer_default_package;
+	public static String TypeInfoViewer_progress_label;
+	public static String TypeInfoViewer_searchJob_taskName;
+	public static String TypeInfoViewer_syncJob_label;
+	public static String TypeInfoViewer_syncJob_taskName;
+	public static String TypeInfoViewer_progressJob_label;
+	public static String TypeInfoViewer_remove_from_history;
+	public static String TypeInfoViewer_separator_message;
+	public static String TypeInfoViewer_library_name_format;
+	public static String TypeSelectionComponent_label;
+	public static String TypeSelectionComponent_menu;
+	public static String TypeSelectionComponent_show_status_line_label;
+	public static String TypeSelectionComponent_fully_qualify_duplicates_label;
+	public static String TypeSelectionDialog2_title_format;
 	public static String TypeSelectionDialog_dialogMessage;
 	public static String TypeSelectionDialog_errorTitle;
-	public static String TypeSelectionDialog_lowerLabel;
-	public static String TypeSelectionDialog_upperLabel;
-	public static String TypeSelectionDialog_notypes_title;
-	public static String TypeSelectionDialog_notypes_message;
+	public static String TypeSelectionDialog_error_type_doesnot_exist;
+
 	public static String TypeSelectionDialog_error3Message;
 	public static String TypeSelectionDialog_error3Title;
 	public static String TypeSelectionDialog_progress_consistency;
-	public static String TypeSelectionDialog_error_type_doesnot_exist;
+	
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * @deprecated As of 3.6
+	 */
+	public static String TypeSelectionDialog_lowerLabel;
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * @deprecated As of 3.6
+	 */
+	public static String TypeSelectionDialog_upperLabel;
 
 	public static String ExceptionDialog_seeErrorLogMessage;
 
@@ -73,8 +99,6 @@ public final class JavaUIMessages extends NLS {
 	public static String PackageSelectionDialog_nopackages_message;
 	public static String ProblemMarkerManager_problem_marker_update_job_description;
 
-	public static String BuildPathDialog_title;
-
 	public static String OverrideMethodDialog_groupMethodsByTypes;
 	public static String OverrideMethodDialog_dialog_title;
 	public static String OverrideMethodDialog_dialog_description;
@@ -83,7 +107,6 @@ public final class JavaUIMessages extends NLS {
 	public static String OverrideMethodDialog_link_message;
 
 	public static String GenerateHashCodeEqualsDialog_dialog_title;
-	public static String GenerateHashCodeEqualsDialog_dialog_description;
 	public static String GenerateHashCodeEqualsDialog_selectioninfo_more;
 	public static String GenerateHashCodeEqualsDialog_no_entries;
 	public static String GenerateHashCodeEqualsDialog_select_at_least_one_field;
@@ -127,6 +150,7 @@ public final class JavaUIMessages extends NLS {
 	public static String GenerateToStringDialog_newTemplateName;
 	public static String GenerateToStringDialog_newTemplateNameArg;
 	public static String GenerateToStringDialog_skip_null_button;
+	public static String GenerateToStringDialog_sort_button;
 	public static String GenerateToStringDialog_template_content;
 	public static String GenerateToStringDialog_template_name;
 	public static String GenerateToStringDialog_templateEdition_NewWindowTitle;
@@ -145,8 +169,6 @@ public final class JavaUIMessages extends NLS {
 	public static String GenerateToStringDialog_teplatesManagerEditButton;
 	public static String GenerateToStringDialog_up_button;
 
-	public static String JavaImageLabelprovider_assert_wrongImage;
-
 	public static String JavaElementLabels_default_package;
 	public static String JavaElementLabels_anonym_type;
 	public static String JavaElementLabels_anonym;
@@ -157,6 +179,7 @@ public final class JavaUIMessages extends NLS {
 	public static String JavaElementLabels_comma_string;
 	public static String JavaElementLabels_declseparator_string;
 	public static String JavaElementLabels_category_separator_string;
+	public static String JavaElementLabels_onClassPathOf;
 
 	public static String StatusBarUpdater_num_elements_selected;
 
@@ -173,7 +196,8 @@ public final class JavaUIMessages extends NLS {
 
 	public static String ResourceTransferDragAdapter_cannot_delete_resource;
 	public static String ResourceTransferDragAdapter_moving_resource;
-	public static String ResourceTransferDragAdapter_cannot_delete_files;
+	public static String ResourceTransferDragAdapter_cannot_delete_files_singular;
+	public static String ResourceTransferDragAdapter_cannot_delete_files_plural;
 
 	public static String Spelling_error_label;
 	public static String Spelling_correct_label;
@@ -193,9 +217,6 @@ public final class JavaUIMessages extends NLS {
 	public static String JavaAnnotationHover_multipleMarkersAtThisLine;
 	public static String JavaEditor_codeassist_noCompletions;
 
-	public static String HTMLTextPresenter_ellipsis;
-	public static String HTML2TextReader_listItemPrefix;
-
 	public static String OptionalMessageDialog_dontShowAgain;
 	public static String ElementValidator_cannotPerform;
 	public static String SelectionListenerWithASTManager_job_title;
@@ -218,30 +239,8 @@ public final class JavaUIMessages extends NLS {
 	public static String FilteredTypeSelectionDialog_showContainerForDuplicatesAction;
 	public static String FilteredTypeSelectionDialog_titleFormat;
 
-	public static String TypeSelectionDialog2_title_format;
-
-	public static String TypeSelectionComponent_label;
-	public static String TypeSelectionComponent_menu;
-	public static String TypeSelectionComponent_show_status_line_label;
-	public static String TypeSelectionComponent_fully_qualify_duplicates_label;
-
-	public static String TypeInfoViewer_job_label;
-	public static String TypeInfoViewer_job_error;
-	public static String TypeInfoViewer_job_cancel;
-	public static String TypeInfoViewer_default_package;
-	public static String TypeInfoViewer_progress_label;
-	public static String TypeInfoViewer_searchJob_taskName;
-	public static String TypeInfoViewer_syncJob_label;
-	public static String TypeInfoViewer_syncJob_taskName;
-	public static String TypeInfoViewer_progressJob_label;
-	public static String TypeInfoViewer_remove_from_history;
-	public static String TypeInfoViewer_separator_message;
-	public static String TypeInfoViewer_library_name_format;
-
 	public static String InitializeAfterLoadJob_starter_job_name;
 
-	public static String SortMembersMessageDialog_configure_preferences_tool_tip;
-
 	static {
 		NLS.initializeMessages(BUNDLE_NAME, JavaUIMessages.class);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties
index 21c3af7..eeb965c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
 #     Mateusz Matela <mateusz.matela at gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
 #     Mateusz Matela <mateusz.matela at gmail.com> - [toString] Template edit dialog has usability issues - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267916
 #     Mateusz Matela <mateusz.matela at gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
+#     Mateusz Matela <mateusz.matela at gmail.com> - [toString] toString() generator: Fields in declaration order - https://bugs.eclipse.org/bugs/show_bug.cgi?id=279924
 ###############################################################################
 
 JavaPlugin_additionalInfo_affordance=Press 'Tab' from proposal table or click for focus
@@ -42,18 +43,19 @@ JavaUI_defaultDialogMessage=Select entries:
 
 MultiElementListSelectionDialog_pageInfoMessage=Page {0} of {1}
 
-TypeSelectionDialog_errorMessage=Problem opening type
 TypeSelectionDialog_dialogMessage=Type ''{0}'' could not be found in ''{1}''. Make sure all workspace resources are refreshed.
 TypeSelectionDialog_errorTitle=Select Type
-TypeSelectionDialog_lowerLabel=&Qualifier:
-TypeSelectionDialog_upperLabel=&Matching types:
-TypeSelectionDialog_notypes_title=Type Selection
-TypeSelectionDialog_notypes_message=No types available.
 TypeSelectionDialog_progress_consistency=Initializing search indices
 TypeSelectionDialog_error_type_doesnot_exist=Type {0} does not exist.
 TypeSelectionDialog_error3Message=Unexpected exception. See log for details.
 TypeSelectionDialog_error3Title=Exception
 
+# DO NOT REMOVE, used in a product.
+TypeSelectionDialog_lowerLabel=&Qualifier:
+
+# DO NOT REMOVE, used in a product.
+TypeSelectionDialog_upperLabel=&Matching types:
+
 ExceptionDialog_seeErrorLogMessage= See error log for more details.
 
 MainTypeSelectionDialog_errorTitle=Error
@@ -67,11 +69,8 @@ PackageSelectionDialog_nopackages_message=No packages available.
 PackageSelectionDialog_progress_findEmpty=Find empty packages
 ProblemMarkerManager_problem_marker_update_job_description=Sending problem marker updates...
 
-BuildPathDialog_title= Java Build Path for {0}
-
 GenerateHashCodeEqualsDialog_blocks_button=Use &blocks in 'if' statements
 GenerateHashCodeEqualsDialog_dialog_title=Generate hashCode() and equals()
-GenerateHashCodeEqualsDialog_dialog_description=Select fields to include for code generation:
 GenerateHashCodeEqualsDialog_selectioninfo_more={0} of {1} selected.
 GenerateHashCodeEqualsDialog_instanceof_button=&Use 'instanceof' to compare types
 GenerateHashCodeEqualsDialog_select_at_least_one_field=Select at least one field.
@@ -129,6 +128,7 @@ GenerateToStringDialog_newTemplateName=New template
 GenerateToStringDialog_newTemplateNameArg=New template ({0})
 GenerateToStringDialog_templatesManagerRemoveButton=&Remove
 GenerateToStringDialog_select_fields_to_include=&Select fields and methods to include in the toString() method:
+GenerateToStringDialog_sort_button=So&rt
 GenerateToStringDialog_templatesManagerTemplatesList=Create, edit or remove &templates:
 GenerateToStringDialog_templatesManagerTitle=Manage toString() Templates
 GenerateToStringDialog_teplatesManagerEditButton=&Edit...
@@ -173,8 +173,6 @@ FilteredTypeSelectionDialog_titleFormat={0} - {1}
 ###########
 ## viewsupport
 ###########
-JavaImageLabelprovider_assert_wrongImage=no image for this Java element type
-
 JavaElementLabels_anonym_type=new {0}() '{'...}
 JavaElementLabels_anonym=new Anonymous
 JavaElementLabels_category=[{0}]
@@ -185,6 +183,7 @@ JavaElementLabels_category_separator_string=\
 JavaElementLabels_default_package=(default package)
 JavaElementLabels_import_container=import declarations
 JavaElementLabels_initializer={...}
+JavaElementLabels_onClassPathOf=\ (from {0} of {1})
 
 StatusBarUpdater_num_elements_selected={0} items selected
 
@@ -207,7 +206,8 @@ JavaUIHelpContext_javaHelpCategory_label= Java help:
 #########
 ResourceTransferDragAdapter_cannot_delete_resource=Cannot delete resources
 ResourceTransferDragAdapter_moving_resource=Moving Resources with Drag and Drop
-ResourceTransferDragAdapter_cannot_delete_files=Cannot delete the following file(s)
+ResourceTransferDragAdapter_cannot_delete_files_singular=Cannot delete the following file
+ResourceTransferDragAdapter_cannot_delete_files_plural=Cannot delete the following {0} files
 
 #########
 # Spelling
@@ -235,9 +235,6 @@ AbstractSpellingDictionary_encodingError= Could not read: ''{0}'', where the bad
 JavaAnnotationHover_multipleMarkersAtThisLine=Multiple markers at this line
 JavaEditor_codeassist_noCompletions=No completions available.
 
-HTMLTextPresenter_ellipsis=...
-HTML2TextReader_listItemPrefix=\t- 
-
 OptionalMessageDialog_dontShowAgain= Do not show this &message again
 
 ElementValidator_cannotPerform= The requested operation cannot be performed.
@@ -255,6 +252,3 @@ RenameSupport_dialog_title=Rename Refactoring
 CoreUtility_job_title=Rebuilding
 CoreUtility_buildall_taskname=Build all...
 CoreUtility_buildproject_taskname=Build project ''{0}''...
-
-SortMembersMessageDialog_configure_preferences_tool_tip=Show the members sort order preferences.
-
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.java
index c4d2b42..e4a3e9e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -89,6 +89,11 @@ public final class ActionMessages extends NLS {
 	public static String OpenSuperImplementationAction_error_message;
 	public static String OpenSuperImplementationAction_not_applicable;
 	public static String OpenSuperImplementationAction_no_super_implementation;
+	public static String OpenImplementationAction_label;
+	public static String OpenImplementationAction_tooltip;
+	public static String OpenImplementationAction_description;
+	public static String OpenImplementationAction_error_title;
+	public static String OpenImplementationAction_not_applicable;
 	public static String OpenTypeHierarchyAction_label;
 	public static String OpenTypeHierarchyAction_tooltip;
 	public static String OpenTypeHierarchyAction_description;
@@ -99,8 +104,6 @@ public final class ActionMessages extends NLS {
 	public static String OpenTypeHierarchyAction_messages_no_types;
 	public static String OpenTypeHierarchyAction_messages_no_valid_java_element;
 	public static String OpenTypeHierarchyAction_messages_unknown_import_decl;
-	public static String OpenExternalBrowserAction_url_label;
-	public static String OpenExternalBrowserAction_url_toolTip;
 	public static String ShowInPackageViewAction_label;
 	public static String ShowInPackageViewAction_description;
 	public static String ShowInPackageViewAction_tooltip;
@@ -135,14 +138,14 @@ public final class ActionMessages extends NLS {
 	public static String AddGetterSetterAction_label;
 	public static String AddGetterSetterAction_description;
 	public static String AddGetterSetterAction_tooltip;
-	public static String AddGetterSetterAction_error_duplicate_methods;
+	public static String AddGetterSetterAction_error_duplicate_methods_singular;
+	public static String AddGetterSetterAction_error_duplicate_methods_plural;
 	public static String AddGetterSetterAction_error_title;
 	public static String AddGetterSetterAction_error_actionfailed;
 	public static String AddGetterSetterAction_not_applicable;
 	public static String AddGetterSetterAction_interface_not_applicable;
 	public static String AddGetterSetterAction_annotation_not_applicable;
 	public static String AddGetterSetterAction_QueryDialog_title;
-	public static String AddGetterSetterAction_SkipSetterForFinalDialog_message;
 	public static String AddGetterSetterAction_SkipExistingDialog_message;
 	public static String AddGetterSetterAction_SkipExistingDialog_skip_label;
 	public static String AddGetterSetterAction_SkipExistingDialog_replace_label;
@@ -236,28 +239,28 @@ public final class ActionMessages extends NLS {
 	public static String AddJavaDocStubsAction_not_applicable;
 	public static String ExternalizeStringsAction_label;
 	public static String ExternalizeStringsAction_dialog_title;
-	public static String ExternalizeStringsAction_dialog_message;
 	public static String FindStringsToExternalizeAction_label;
 	public static String FindStringsToExternalizeAction_dialog_title;
 	public static String FindStringsToExternalizeAction_error_message;
 	public static String FindStringsToExternalizeAction_error_cannotBeParsed;
 	public static String FindStringsToExternalizeAction_foundStrings;
 	public static String FindStringsToExternalizeAction_noStrings;
-	public static String FindStringsToExternalizeAction_non_externalized;
+	public static String FindStringsToExternalizeAction_non_externalized_singular;
+	public static String FindStringsToExternalizeAction_non_externalized_plural;
 	public static String FindStringsToExternalizeAction_button_label;
 	public static String FindStringsToExternalizeAction_find_strings;
-	public static String OpenExternalBrowserAction_javadoc_label;
-	public static String OpenExternalBrowserAction_javadoc_toolTip;
 	public static String OpenExternalJavadocAction_label;
 	public static String OpenExternalJavadocAction_description;
 	public static String OpenExternalJavadocAction_tooltip;
-	public static String OpenExternalJavadocAction_select_element;
-	public static String OpenExternalJavadocAction_libraries_no_location;
-	public static String OpenExternalJavadocAction_source_no_location;
-	public static String OpenExternalJavadocAction_no_entry;
-	public static String OpenExternalJavadocAction_opening_failed;
-	public static String OpenExternalJavadocAction_dialog_title;
-	public static String OpenExternalJavadocAction_code_resolve_failed;
+	public static String OpenAttachedJavadocAction_label;
+	public static String OpenAttachedJavadocAction_description;
+	public static String OpenAttachedJavadocAction_tooltip;
+	public static String OpenAttachedJavadocAction_select_element;
+	public static String OpenAttachedJavadocAction_libraries_no_location;
+	public static String OpenAttachedJavadocAction_source_no_location;
+	public static String OpenAttachedJavadocAction_opening_failed;
+	public static String OpenAttachedJavadocAction_dialog_title;
+	public static String OpenAttachedJavadocAction_code_resolve_failed;
 	public static String SelfEncapsulateFieldAction_label;
 	public static String SelfEncapsulateFieldAction_dialog_title;
 	public static String SelfEncapsulateFieldAction_dialog_unavailable;
@@ -265,20 +268,30 @@ public final class ActionMessages extends NLS {
 	public static String OrganizeImportsAction_label;
 	public static String OrganizeImportsAction_tooltip;
 	public static String OrganizeImportsAction_description;
-	public static String OrganizeImportsAction_multi_op_description;
 	public static String OrganizeImportsAction_multi_error_parse;
 	public static String OrganizeImportsAction_multi_error_unresolvable;
-	public static String OrganizeImportsAction_multi_error_unexpected;
-	public static String OrganizeImportsAction_multi_error_notoncp;
 	public static String OrganizeImportsAction_selectiondialog_title;
 	public static String OrganizeImportsAction_selectiondialog_message;
 	public static String OrganizeImportsAction_error_title;
 	public static String OrganizeImportsAction_error_message;
 	public static String OrganizeImportsAction_single_error_parse;
+	
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/296836 .
+	 * @deprecated As of 3.6, replaced by {@link #OrganizeImportsAction_summary_added_singular} and {@link #OrganizeImportsAction_summary_added_plural} 
+	 */
 	public static String OrganizeImportsAction_summary_added;
+
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/296836 .
+	 * @deprecated As of 3.6, replaced by {@link #OrganizeImportsAction_summary_removed_singular} and {@link #OrganizeImportsAction_summary_removed_plural}
+	 */
 	public static String OrganizeImportsAction_summary_removed;
-	public static String OrganizeImportsAction_multi_status_title;
-	public static String OrganizeImportsAction_multi_status_description;
+
+	public static String OrganizeImportsAction_summary_added_singular;
+	public static String OrganizeImportsAction_summary_added_plural;
+	public static String OrganizeImportsAction_summary_removed_singular;
+	public static String OrganizeImportsAction_summary_removed_plural;
 	public static String OrganizeImportsAction_EmptySelection_description;
 	public static String OrganizeImportsAction_EmptySelection_title;
 
@@ -320,11 +333,7 @@ public final class ActionMessages extends NLS {
 	public static String RefreshAction_label;
 	public static String RefreshAction_toolTip;
 	public static String RefreshAction_progressMessage;
-	public static String RefreshAction_error_title;
-	public static String RefreshAction_error_message;
 	public static String RefreshAction_error_workbenchaction_message;
-	public static String RefreshAction_locationDeleted_title;
-	public static String RefreshAction_locationDeleted_message;
 	public static String RefreshAction_refresh_operation_label;
 	public static String ModifyParameterAction_problem_title;
 	public static String ModifyParameterAction_problem_message;
@@ -355,7 +364,8 @@ public final class ActionMessages extends NLS {
 	public static String AddDelegateMethodsAction_not_applicable;
 	public static String AddDelegateMethodsAction_annotation_not_applicable;
 	public static String AddDelegateMethodsAction_interface_not_applicable;
-	public static String AddDelegateMethodsAction_duplicate_methods;
+	public static String AddDelegateMethodsAction_duplicate_methods_singular;
+	public static String AddDelegateMethodsAction_duplicate_methods_plural;
 	public static String AddDelegateMethodsAction_title;
 	public static String AddDelegateMethodsAction_message;
 	public static String AddDelegateMethodsAction_selectioninfo_more;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.properties
index 92500bb..0aae955 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -47,6 +47,12 @@ OpenSuperImplementationAction_error_message=Opening the super implementation fai
 OpenSuperImplementationAction_not_applicable=The operation is not applicable to the current selection. Select an overriding method.
 OpenSuperImplementationAction_no_super_implementation=The super implementation of method ''{0}'' does not exist.
 
+OpenImplementationAction_label=Open Implementation
+OpenImplementationAction_tooltip=Open the Implementations in the Method's Hierarchy 
+OpenImplementationAction_description=Open the Implementations in the method's hierarchy
+OpenImplementationAction_error_title=Open Implementation
+OpenImplementationAction_not_applicable=The operation is not applicable to the current selection. Select an overridable method.
+
 OpenTypeHierarchyAction_label=Ope&n Type Hierarchy
 OpenNewClassWizardAction_text=Class
 OpenNewEnumWizardAction_text=Enum
@@ -78,7 +84,7 @@ ShowInNavigatorView_error_activation_failed=Cannot activate Resource Navigator
 OverrideMethodsAction_label=O&verride/Implement Methods...
 OverrideMethodsAction_description=Override or implement methods declared in supertypes
 OverrideMethodsAction_tooltip=Override/Implement Methods
-OverrideMethodsAction_error_actionfailed=An error occurred while creating the methods
+OverrideMethodsAction_error_actionfailed=An error occurred while creating the methods.
 
 OverrideMethodsAction_error_title=Override/Implement Methods
 OverrideMethodsAction_error_nothing_found=No methods to override found for this type.
@@ -90,7 +96,8 @@ AddGetterSetterAction_label=Gene&rate Getters and Setters...
 AddGetterSetterAction_description=Generate Getter and Setter methods for type's fields
 AddGetterSetterAction_tooltip=Generate Getter and Setter Methods for the Type's Fields
 
-AddGetterSetterAction_error_duplicate_methods=Possible duplicate method(s) selected
+AddGetterSetterAction_error_duplicate_methods_singular=Possible duplicate method selected
+AddGetterSetterAction_error_duplicate_methods_plural=Possible {0} duplicate methods selected
 AddGetterSetterAction_no_primary_type_title=Add Setter and Getter
 AddGetterSetterAction_no_primary_type_message=No primary type found.
 AddGetterSetterAction_error_title=Generate Getters and Setters
@@ -104,7 +111,6 @@ AddGetterSetterAction_template_link_description=The format of the getters/setter
 AddGetterSetterAction_template_link_tooltip=Show the code templates preferences.
 
 AddGetterSetterAction_QueryDialog_title=Generate Getters and Setters
-AddGetterSetterAction_SkipSetterForFinalDialog_message=Field ''{0}'' is final.\nDo you want to skip the creation of the setter method?
 AddGetterSetterAction_SkipExistingDialog_message=Method ''{0}'' already exists.\nSkip creation?
 AddGetterSetterAction_SkipExistingDialog_skip_label=&Skip
 AddGetterSetterAction_SkipExistingDialog_replace_label=&Replace
@@ -191,7 +197,6 @@ AddJavaDocStubsAction_not_applicable=The operation is not applicable to the curr
 
 ExternalizeStringsAction_label= &Externalize Strings...
 ExternalizeStringsAction_dialog_title= Externalize Strings
-ExternalizeStringsAction_dialog_message=Could not open Externalize String Wizard
 
 FindBreakContinueTargetOccurrencesAction_label=Break/Continue Targets
 FindBreakContinueTargetOccurrencesAction_tooltip=Find All Break/Continue Targets
@@ -201,26 +206,23 @@ FindStringsToExternalizeAction_error_message= Unexpected Exception. See log.
 FindStringsToExternalizeAction_error_cannotBeParsed= Compilation unit ''{0}'' can not be parsed.
 FindStringsToExternalizeAction_foundStrings= {0} in {1}
 FindStringsToExternalizeAction_noStrings= No non-externalized strings found.
-FindStringsToExternalizeAction_non_externalized= {0} &non-externalized string(s) found.
+FindStringsToExternalizeAction_non_externalized_singular= 1 &non-externalized string found.
+FindStringsToExternalizeAction_non_externalized_plural= {0} &non-externalized strings found.
 FindStringsToExternalizeAction_button_label= &Externalize...
 FindStringsToExternalizeAction_find_strings= Finding non-externalized strings...
 
-OpenExternalBrowserAction_javadoc_label=&Open External Javadoc
-OpenExternalBrowserAction_javadoc_toolTip=&Open External Javadoc
-OpenExternalBrowserAction_url_label=&Open in External Browser
-OpenExternalBrowserAction_url_toolTip=Open in External Browser
-
 OpenExternalJavadocAction_label=Open E&xternal Javadoc
 OpenExternalJavadocAction_description=Opens the Javadoc of the selected element in an external browser
-OpenExternalJavadocAction_tooltip=Opens the Javadoc of the Selected Element in an External Browser
-OpenExternalJavadocAction_select_element=&Select or enter the element to open:
-OpenExternalJavadocAction_libraries_no_location=The documentation location for ''{0}'' has not been configured. For elements from libraries specify the Javadoc location URL on the properties page of the parent JAR (''{1}'')
-OpenExternalJavadocAction_source_no_location=The documentation location for ''{0}'' has not been configured. For elements from source specify the Javadoc location URL on the properties page of the parent project (''{1}'')
-OpenExternalJavadocAction_no_entry=The documentation does not contain an entry for ''{0}''.\n(File ''{1}'' does not exist.)
-OpenExternalJavadocAction_opening_failed=Opening Javadoc failed. See log for details
-OpenExternalJavadocAction_dialog_title=Open External Javadoc
-OpenExternalJavadocAction_code_resolve_failed=Could not convert text selection into a Java element
-
+OpenExternalJavadocAction_tooltip=Open Javadoc in an External Browser
+OpenAttachedJavadocAction_label=Open &Attached Javadoc
+OpenAttachedJavadocAction_description=Opens the attached Javadoc of the selected element in a browser
+OpenAttachedJavadocAction_tooltip=Open Attached Javadoc in a Browser
+OpenAttachedJavadocAction_select_element=&Select or enter the element to open:
+OpenAttachedJavadocAction_libraries_no_location=The documentation location for ''{0}'' has not been configured. For elements from libraries specify the Javadoc location URL on the properties page of the parent JAR (''{1}'')
+OpenAttachedJavadocAction_source_no_location=The documentation location for ''{0}'' has not been configured. For elements from source specify the Javadoc location URL on the properties page of the parent project (''{1}'')
+OpenAttachedJavadocAction_opening_failed=Opening Javadoc failed. See log for details
+OpenAttachedJavadocAction_dialog_title=Open Attached Javadoc
+OpenAttachedJavadocAction_code_resolve_failed=Could not convert text selection into a Java element
 SelfEncapsulateFieldAction_label=Encap&sulate Field...
 SelfEncapsulateFieldAction_dialog_title=Encapsulate Field
 SelfEncapsulateFieldAction_dialog_unavailable=The operation is not applicable to the current selection. Select a field of a class or enum.
@@ -240,12 +242,9 @@ CleanUpAction_UnexpectedErrorMessage={0}: Unexpected error. See log for details.
 CleanUpAction_CUNotOnBuildpathMessage={0}: Compilation unit not on build path. No changes applied.
 CleanUpAction_EmptySelection_description=The selection contains no compilation units.
 
-OrganizeImportsAction_multi_op_description=Organizing imports...
 OrganizeImportsAction_EmptySelection_title=Organize Imports
 OrganizeImportsAction_multi_error_parse=Problem while Organize Imports: {0} has parse errors. No changes applied.
 OrganizeImportsAction_multi_error_unresolvable=Problem while Organize Imports: {0} contains ambiguous references. User interaction required.
-OrganizeImportsAction_multi_error_unexpected={0}: Unexpected error. See log for details.
-OrganizeImportsAction_multi_error_notoncp={0}: Compilation unit not on build path. No changes applied.
 
 OrganizeImportsAction_selectiondialog_title=Organize Imports
 OrganizeImportsAction_selectiondialog_message=&Choose type to import:
@@ -255,14 +254,14 @@ OrganizeImportsAction_error_message=Unexpected error in organize imports. See lo
 
 OrganizeImportsAction_single_error_parse=Compilation unit has parse errors: ''{0}''. No changes applied.
 
-OrganizeImportsAction_summary_added={0} import(s) added.
-OrganizeImportsAction_summary_removed={0} import(s) removed.
+OrganizeImportsAction_summary_added_singular=1 import added.
+OrganizeImportsAction_summary_added_plural={0} imports added.
+OrganizeImportsAction_summary_removed_singular=1 import removed.
+OrganizeImportsAction_summary_removed_plural={0} imports removed.
 
-OrganizeImportsAction_multi_status_title=Organize Imports
-OrganizeImportsAction_multi_status_description=Problems while organizing imports on some compilation units. See 'Details' for more information.
 OrganizeImportsAction_EmptySelection_description=The selection contains no compilation units.
 
-FormatAllAction_label=Format
+FormatAllAction_label=&Format
 FormatAllAction_tooltip=Format all selected Java files
 FormatAllAction_description=Format all selected Java files
 
@@ -301,7 +300,7 @@ FindMethodExitOccurrencesAction_tooltip=Find All Method Exits
 NewWizardsActionGroup_new=Ne&w
 
 OpenProjectAction_dialog_title=Open Project
-OpenProjectAction_dialog_message=Select &project(s) to be opened:
+OpenProjectAction_dialog_message=Select the &projects to be opened:
 OpenProjectAction_error_message=Problems while opening projects
 
 OpenJavaPerspectiveAction_dialog_title=Open Java Perspective
@@ -324,18 +323,14 @@ OpenNewSourceFolderWizardAction_tooltip=Opens the new Java source folder wizard
 OpenNewClassWizardAction_description=Opens the new class wizard
 OpenNewInterfaceWizardAction_tooltip=Opens the new interface wizard
 OpenNewSourceFolderWizardAction_text=Source Folder
-OpenNewSourceFolderWizardAction_text2=New Source Folder...
+OpenNewSourceFolderWizardAction_text2=&New Source Folder...
 OpenNewEnumWizardAction_description=Opens the new enum type wizard
 OpenNewJavaProjectWizardAction_text=Java Project
 
 RefreshAction_label= Re&fresh
 RefreshAction_toolTip= Refresh
 RefreshAction_progressMessage= Refreshing...
-RefreshAction_error_title= Refresh Problems
-RefreshAction_error_message= Problems occurred refreshing the selected resources.
 RefreshAction_error_workbenchaction_message=A problem occurred while refreshing the view
-RefreshAction_locationDeleted_title= Project location has been deleted
-RefreshAction_locationDeleted_message= The location for project {0} ({1}) has been deleted.\n Delete {0} from the workspace?
 RefreshAction_refresh_operation_label=Refresh
 
 ModifyParameterAction_problem_title=Refactoring
@@ -375,7 +370,8 @@ AddDelegateMethodsAction_tooltip=Adds Delegates Methods for a Type's Fields
 AddDelegateMethodsAction_not_applicable=The operation is not applicable to the current selection. Select a field which is not declared as type variable or a type that declares such fields.
 AddDelegateMethodsAction_annotation_not_applicable=The Generate Delegate Methods operation is not applicable to annotations.
 AddDelegateMethodsAction_interface_not_applicable=The Generate Delegate Methods operation is not applicable to interfaces.
-AddDelegateMethodsAction_duplicate_methods=Duplicate method(s) selected
+AddDelegateMethodsAction_duplicate_methods_singular=Duplicate method selected
+AddDelegateMethodsAction_duplicate_methods_plural={0} duplicate methods selected
 
 AddDelegateMethodsAction_title=Generate Delegate Methods
 AddDelegateMethodsAction_message=Select &methods to create delegates for:
@@ -447,7 +443,7 @@ FindNLSProblemsAction_ToolTip=Finds undefined, duplicate, and unused NLS keys in
 CopyQualifiedNameAction_ToolTipText=Copy to fully qualified name to the system Clipboard
 CopyQualifiedNameAction_InfoDialogTitel=Copy Qualified Name
 CopyQualifiedNameAction_ErrorDescription=There was a problem when accessing the system clipboard. Retry?
-CopyQualifiedNameAction_ActionName=Copy Qualified Name
+CopyQualifiedNameAction_ActionName=Cop&y Qualified Name
 CopyQualifiedNameAction_ErrorTitle=Problem Copying to Clipboard
 CopyQualifiedNameAction_NoElementToQualify=No Element to qualify found in selection.
 
@@ -465,3 +461,10 @@ IntroduceParameterObjectAction_can_not_run_refactoring_message=Can not run the r
 CollapsAllAction_label= Collapse All
 CollapsAllAction_tooltip= Collapse All
 CollapsAllAction_description= Collapse All
+
+
+# DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/296836
+OrganizeImportsAction_summary_added={0} import(s) added.
+
+# DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/296836
+OrganizeImportsAction_summary_removed={0} import(s) removed.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java
index dcfced7..c78351e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/CopyQualifiedNameAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.osgi.util.TextProcessor;
+
 import org.eclipse.swt.SWTError;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
@@ -39,6 +41,7 @@ import org.eclipse.ui.part.ResourceTransfer;
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IImportDeclaration;
+import org.eclipse.jdt.core.IJarEntryResource;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
@@ -58,14 +61,13 @@ import org.eclipse.jdt.core.dom.MemberValuePair;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PackageDeclaration;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
-
 import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.SharedASTProvider;
@@ -75,11 +77,14 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 
+
 public class CopyQualifiedNameAction extends SelectionDispatchAction {
 
-	private static final long LABEL_FLAGS= new Long(JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.I_FULLY_QUALIFIED | JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.USE_RESOLVED | JavaElementLabels.T_TYPE_PARAMETERS | JavaElementLabels.CU_QUALIFIED | JavaElementLabels.CF_QUALIFIED).longValue();
+	private static final long LABEL_FLAGS= new Long(JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.I_FULLY_QUALIFIED
+			| JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.USE_RESOLVED | JavaElementLabels.T_TYPE_PARAMETERS | JavaElementLabels.CU_QUALIFIED
+			| JavaElementLabels.CF_QUALIFIED).longValue();
 
-    //TODO: Make API
+	//TODO: Make API
 	public static final String ACTION_DEFINITION_ID= "org.eclipse.jdt.ui.edit.text.java.copy.qualified.name"; //$NON-NLS-1$
 
 	//TODO: Make API
@@ -87,8 +92,8 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 
 	private JavaEditor fEditor;
 
-    public CopyQualifiedNameAction(JavaEditor editor) {
-    	this(editor.getSite());
+	public CopyQualifiedNameAction(JavaEditor editor) {
+		this(editor.getSite());
 		fEditor= editor;
 		setEnabled(true);
 	}
@@ -148,6 +153,9 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 		if (element instanceof IJavaProject)
 			return true;
 
+		if (element instanceof IJarEntryResource)
+			return true;
+
 		if (element instanceof IResource)
 			return true;
 
@@ -155,11 +163,11 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 	}
 
 	/* (non-Javadoc)
-     * @see org.eclipse.jface.action.Action#run()
-     */
-    public void run() {
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	public void run() {
 
-    	try {
+		try {
 			Object[] elements= getSelectedElements();
 			if (elements == null) {
 				MessageDialog.openInformation(getShell(), ActionMessages.CopyQualifiedNameAction_InfoDialogTitel, ActionMessages.CopyQualifiedNameAction_NoElementToQualify);
@@ -174,32 +182,34 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 				String qualifiedName= getQualifiedName(element);
 				IResource resource;
 				if (element instanceof IJavaElement)
-					resource= ((IJavaElement) element).getCorrespondingResource();
+					resource= ((IJavaElement)element).getCorrespondingResource();
+				else if (element instanceof IJarEntryResource)
+					resource= null;
 				else
-					resource= (IResource) element;
+					resource= (IResource)element;
 
 				if (resource != null) {
 					IPath location= resource.getLocation();
 					if (location != null) {
-						data= new Object[] {qualifiedName, resource, new String[] {location.toOSString()}};
-						dataTypes= new Transfer[] {TextTransfer.getInstance(), ResourceTransfer.getInstance(), FileTransfer.getInstance()};
+						data= new Object[] { qualifiedName, resource, new String[] { location.toOSString() } };
+						dataTypes= new Transfer[] { TextTransfer.getInstance(), ResourceTransfer.getInstance(), FileTransfer.getInstance() };
 					} else {
-						data= new Object[] {qualifiedName, resource};
-						dataTypes= new Transfer[] {TextTransfer.getInstance(), ResourceTransfer.getInstance()};
+						data= new Object[] { qualifiedName, resource };
+						dataTypes= new Transfer[] { TextTransfer.getInstance(), ResourceTransfer.getInstance() };
 					}
 				} else {
-					data= new Object[] {qualifiedName};
-					dataTypes= new Transfer[] {TextTransfer.getInstance()};
+					data= new Object[] { qualifiedName };
+					dataTypes= new Transfer[] { TextTransfer.getInstance() };
 				}
 			} else {
 				StringBuffer buf= new StringBuffer();
 				buf.append(getQualifiedName(elements[0]));
 				for (int i= 1; i < elements.length; i++) {
 					String qualifiedName= getQualifiedName(elements[i]);
-					buf.append('\r').append('\n').append(qualifiedName);
+					buf.append(System.getProperty("line.separator")).append(qualifiedName); //$NON-NLS-1$
 				}
-				data= new Object[] {buf.toString()};
-				dataTypes= new Transfer[] {TextTransfer.getInstance()};
+				data= new Object[] { buf.toString() };
+				dataTypes= new Transfer[] { TextTransfer.getInstance() };
 			}
 
 			Clipboard clipboard= new Clipboard(getShell().getDisplay());
@@ -218,42 +228,45 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 		} catch (JavaModelException e) {
 			JavaPlugin.log(e);
 		}
-    }
+	}
 
 	private String getQualifiedName(Object element) throws JavaModelException {
 		if (element instanceof IResource)
-			return ((IResource) element).getFullPath().toString();
+			return ((IResource)element).getFullPath().toString();
+
+		if (element instanceof IJarEntryResource)
+			return ((IJarEntryResource)element).getFullPath().toString();
 
-		if (element instanceof IPackageFragmentRoot || element instanceof ITypeRoot) {
-			IResource resource= ((IJavaElement) element).getCorrespondingResource();
+		if (element instanceof IJavaProject || element instanceof IPackageFragmentRoot || element instanceof ITypeRoot) {
+			IResource resource= ((IJavaElement)element).getCorrespondingResource();
 			if (resource != null)
 				return getQualifiedName(resource);
 		}
 
-		return JavaElementLabels.getTextLabel(element, LABEL_FLAGS);
+		return TextProcessor.deprocess(JavaElementLabels.getTextLabel(element, LABEL_FLAGS));
 	}
 
-    private Object[] getSelectedElements() {
-    	if (fEditor != null) {
-    		IJavaElement element= getSelectedElement(fEditor);
-    		if (element == null)
-    			return null;
+	private Object[] getSelectedElements() {
+		if (fEditor != null) {
+			IJavaElement element= getSelectedElement(fEditor);
+			if (element == null)
+				return null;
 
-    		return new IJavaElement[] {element};
-    	}
+			return new IJavaElement[] { element };
+		}
 
-    	ISelection selection= getSelection();
-    	if (!(selection instanceof IStructuredSelection))
-    		return null;
+		ISelection selection= getSelection();
+		if (!(selection instanceof IStructuredSelection))
+			return null;
 
-    	List result= new ArrayList();
-    	for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
+		List result= new ArrayList();
+		for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
 			Object element= iter.next();
 			if (isValidElement(element))
 				result.add(element);
 		}
-    	if (result.isEmpty())
-    		return null;
+		if (result.isEmpty())
+			return null;
 
 		return result.toArray(new Object[result.size()]);
 	}
@@ -275,8 +288,7 @@ public class CopyQualifiedNameAction extends SelectionDispatchAction {
 		if (ast == null)
 			return null;
 
-		NodeFinder finder= new NodeFinder(offset, length);
-		ast.accept(finder);
+		NodeFinder finder= new NodeFinder(ast, offset, length);
 		ASTNode node= finder.getCoveringNode();
 
 		IBinding binding= null;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/JarImportWizardAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/JarImportWizardAction.java
index 6e09d92..35d659e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/JarImportWizardAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/JarImportWizardAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -87,9 +87,9 @@ public class JarImportWizardAction extends Action implements IObjectActionDelega
 					final IPackageFragmentRoot root= (IPackageFragmentRoot) element;
 					try {
 						final IClasspathEntry entry= root.getRawClasspathEntry();
-						if (entry != null) {
-							if (JarImportWizard.isValidClassPathEntry(entry) && JarImportWizard.isValidJavaProject(root.getJavaProject()))
-								fSelection= structured;
+						if (JarImportWizard.isValidClassPathEntry(entry) && JarImportWizard.isValidJavaProject(root.getJavaProject())
+								&& root.getResolvedClasspathEntry().getReferencingEntry() == null) {
+							fSelection= structured;
 						}
 					} catch (JavaModelException exception) {
 						JavaPlugin.log(exception);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBrowserUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBrowserUtil.java
index 76fcb57..170a88b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBrowserUtil.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBrowserUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,23 +15,76 @@ import java.net.URL;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+
 
 public class OpenBrowserUtil {
 
-	public static void open(final URL url, Display display, final String dialogTitle) {
+	/**
+	 * Opens the given url in the browser as choosen in the preferences.
+	 * 
+	 * @param url the URL
+	 * @param display the display
+	 * @since 3.6
+	 */
+	public static void open(final URL url, Display display) {
 		display.syncExec(new Runnable() {
 			public void run() {
-				internalOpen(url, dialogTitle);
+				internalOpen(url, false);
 			}
 		});
 	}
 
-	private static void internalOpen(final URL url, String title) {
+	/**
+	 * Opens the given URL in an external browser.
+	 * 
+	 * @param url the URL
+	 * @param display the display
+	 * @since 3.6
+	 */
+	public static void openExternal(final URL url, Display display) {
+		display.syncExec(new Runnable() {
+			public void run() {
+				internalOpen(url, true);
+			}
+		});
+	}
+
+	private static void internalOpen(final URL url, final boolean useExternalBrowser) {
 		BusyIndicator.showWhile(null, new Runnable() {
 			public void run() {
-				PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(url.toExternalForm() + "?noframes=true"); //$NON-NLS-1$
+				URL helpSystemUrl= PlatformUI.getWorkbench().getHelpSystem().resolve(url.toExternalForm(), true);
+				try {
+					IWorkbenchBrowserSupport browserSupport= PlatformUI.getWorkbench().getBrowserSupport();
+					IWebBrowser browser;
+					if (useExternalBrowser)
+						browser= browserSupport.getExternalBrowser();
+					else
+						browser= browserSupport.createBrowser(null);
+					browser.openURL(helpSystemUrl);
+				} catch (PartInitException ex) {
+					// XXX: show dialog?
+					JavaPlugin.logErrorStatus("Opening Javadoc failed", ex.getStatus()); //$NON-NLS-1$
+				}
 			}
 		});
 	}
+
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * 
+	 * @param url the URL
+	 * @param display the display
+	 * @param title the title
+	 * @deprecated As of 3.6, replaced by {@link #open(URL, Display)}
+	 */
+	public static void open(final URL url, Display display, String title) {
+		open(url, display);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenExternalBrowserAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenExternalBrowserAction.java
deleted file mode 100644
index 9e1d86c..0000000
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenExternalBrowserAction.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.ui.actions;
-
-import java.net.URL;
-
-import org.eclipse.swt.widgets.Display;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.ui.JavaUI;
-
-import org.eclipse.jdt.internal.ui.JavaPlugin;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-
-
-/**
- * Action to open the selection in an external browser. If the
- * selection is a java element its corresponding javadoc is shown
- * if possible. If it is an URL the URL's content is shown.
- *
- * The action is disabled if the selection can not be opened.
- *
- * @since 3.4
- */
-public class OpenExternalBrowserAction extends Action implements ISelectionChangedListener {
-
-	/**
-	 * The display the display this action is working on.
-	 */
-	private final Display fDisplay;
-	/**
-	 * The selection provider.
-	 */
-	private final ISelectionProvider fSelectionProvider;
-
-	/**
-	 * Create a new ShowExternalJavadocAction
-	 *
-	 * @param display the display this action is working on
-	 * @param selectionProvider the selection provider
-	 */
-	public OpenExternalBrowserAction(Display display, ISelectionProvider selectionProvider) {
-		fDisplay= display;
-		fSelectionProvider= selectionProvider;
-
-		setText(ActionMessages.OpenExternalBrowserAction_javadoc_label);
-		setToolTipText(ActionMessages.OpenExternalBrowserAction_javadoc_toolTip);
-
-		setImageDescriptor(JavaPluginImages.DESC_ELCL_EXTERNAL_BROWSER);
-		setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_EXTERNAL_BROWSER);
-	}
-
-	/*
-	 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-	 */
-	public void selectionChanged(SelectionChangedEvent event) {
-		ISelection selection= event.getSelection();
-		if (!(selection instanceof IStructuredSelection))
-			return;
-
-		IStructuredSelection structuredSelection= (IStructuredSelection) selection;
-		if (canEnable(structuredSelection)) {
-			setEnabled(true);
-
-			Object element= structuredSelection.getFirstElement();
-			if (element instanceof URL) {
-				setText(ActionMessages.OpenExternalBrowserAction_url_label);
-				setToolTipText(ActionMessages.OpenExternalBrowserAction_url_toolTip);
-			} else {
-				setText(ActionMessages.OpenExternalBrowserAction_javadoc_label);
-				setToolTipText(ActionMessages.OpenExternalBrowserAction_javadoc_toolTip);
-			}
-		} else {
-			setEnabled(false);
-
-			setText(ActionMessages.OpenExternalBrowserAction_javadoc_label);
-			setToolTipText(ActionMessages.OpenExternalBrowserAction_javadoc_toolTip);
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jface.action.Action#run()
-	 */
-	public void run() {
-		ISelection selection= fSelectionProvider.getSelection();
-		if (!(selection instanceof IStructuredSelection))
-			return;
-
-		IStructuredSelection structuredSelection= (IStructuredSelection) selection;
-		Object element= structuredSelection.getFirstElement();
-		URL url;
-		if (element instanceof IJavaElement) {
-			try {
-				url= JavaUI.getJavadocLocation((IJavaElement) element, true);
-			} catch (JavaModelException e) {
-				JavaPlugin.log(e);
-				return;
-			}
-		} else {
-			url= (URL) element;
-		}
-
-		OpenBrowserUtil.open(url, fDisplay, null);
-	}
-
-	/**
-	 * True if this action can operate on the given selection
-	 *
-	 * @param selection the selection to inspect
-	 * @return <code>true</code> if this action can operate on the selection
-	 */
-	private boolean canEnable(IStructuredSelection selection) {
-		if (selection.size() != 1)
-			return false;
-
-		Object element= selection.getFirstElement();
-		if (element instanceof URL)
-			return true;
-
-		if (!(element instanceof IJavaElement))
-			return false;
-
-		IJavaElement input= (IJavaElement) element;
-
-		try {
-			URL url= JavaUI.getJavadocLocation(input, true);
-			if (url == null)
-				return false;
-		} catch (JavaModelException e) {
-			return false;
-		}
-
-		return true;
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
index 10c74a2..77754b1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
@@ -125,6 +125,13 @@ public class SelectionConverter {
 		return result;
 	}
 
+	/**
+	 * Perform a code resolve at the current selection of an editor
+	 * 
+	 * @param editor the editor
+	 * @return the resolved elements (only from primary working copies)
+	 * @throws JavaModelException when the type root can not be accessed
+	 */
 	public static IJavaElement[] codeResolve(JavaEditor editor) throws JavaModelException {
 		return codeResolve(editor, true);
 	}
@@ -164,6 +171,14 @@ public class SelectionConverter {
 		return EMPTY_RESULT;
 	}
 
+	/**
+	 * Returns the element surrounding the selection of the given editor.
+	 * 
+	 * @param editor the editor
+	 * @return the element surrounding the current selection (only from primary working copies), or <code>null</code> if none
+	 * @throws JavaModelException if the Java type root does not exist or if an exception occurs
+	 *             while accessing its corresponding resource
+	 */
 	public static IJavaElement getElementAtOffset(JavaEditor editor) throws JavaModelException {
 		return getElementAtOffset(editor, true);
 	}
@@ -173,7 +188,7 @@ public class SelectionConverter {
 	 * 
 	 * @param editor the editor
 	 * @param primaryOnly if <code>true</code> only primary working copies will be returned
-	 * @return the element surrounding the current selection
+	 * @return the element surrounding the current selection, or <code>null</code> if none
 	 * @throws JavaModelException if the Java type root does not exist or if an exception occurs
 	 *             while accessing its corresponding resource
 	 * @since 3.2
@@ -196,16 +211,22 @@ public class SelectionConverter {
 		return type;
 	}
 
+	/**
+	 * Returns the input element of the given editor.
+	 *
+	 * @param editor the Java editor
+	 * @return the type root which is the editor input (only primary working copies), or <code>null</code> if none
+	 */
 	public static ITypeRoot getInput(JavaEditor editor) {
 		return getInput(editor, true);
 	}
 
 	/**
-	 * Returns the input element of the given editor
+	 * Returns the input element of the given editor.
 	 *
 	 * @param editor the Java editor
 	 * @param primaryOnly if <code>true</code> only primary working copies will be returned
-	 * @return the type root which is the editor input
+	 * @return the type root which is the editor input, or <code>null</code> if none
 	 * @since 3.2
 	 */
 	private static ITypeRoot getInput(JavaEditor editor, boolean primaryOnly) {
@@ -214,10 +235,6 @@ public class SelectionConverter {
 		return EditorUtility.getEditorInputJavaElement(editor, primaryOnly);
 	}
 
-	public static ITypeRoot getInputAsTypeRoot(JavaEditor editor) {
-		return SelectionConverter.getInput(editor);
-	}
-
 	public static ICompilationUnit getInputAsCompilationUnit(JavaEditor editor) {
 		Object editorInput= SelectionConverter.getInput(editor);
 		if (editorInput instanceof ICompilationUnit)
@@ -271,17 +288,6 @@ public class SelectionConverter {
 		return ref;
 	}
 
-//	public static IJavaElement[] resolveSelectedElements(IJavaElement input, ITextSelection selection) throws JavaModelException {
-//		IJavaElement enclosing= resolveEnclosingElement(input, selection);
-//		if (enclosing == null)
-//			return EMPTY_RESULT;
-//		if (!(enclosing instanceof ISourceReference))
-//			return EMPTY_RESULT;
-//		ISourceRange sr= ((ISourceReference)enclosing).getSourceRange();
-//		if (selection.getOffset() == sr.getOffset() && selection.getLength() == sr.getLength())
-//			return new IJavaElement[] {enclosing};
-//	}
-
 	public static IJavaElement resolveEnclosingElement(JavaEditor editor, ITextSelection selection) throws JavaModelException {
 		ITypeRoot input= getInput(editor);
 		if (input != null)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
index 9c4202b..fd6c6dd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,7 +61,6 @@ import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.INullSelectionListener;
 import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.ISelectionListener;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
@@ -132,7 +131,7 @@ import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
 import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
 
 
-abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISelectionListener, IViewPartInputProvider, INullSelectionListener {
+abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, IViewPartInputProvider, INullSelectionListener {
 
 	private static final String TAG_SELECTED_ELEMENTS= "selectedElements"; //$NON-NLS-1$
 	private static final String TAG_SELECTED_ELEMENT= "selectedElement"; //$NON-NLS-1$
@@ -971,7 +970,7 @@ abstract class JavaBrowsingPart extends ViewPart implements IMenuListener, ISele
 					if (EditorUtility.isOpenInEditor(selectedElement) != null)
 						EditorUtility.openInEditor(selectedElement, true);
 				} catch (PartInitException ex) {
-					// Ignore if no editor input can be found
+					// ignore if no editor input can be found
 				}
 			}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPerspectiveFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPerspectiveFactory.java
index 6b089a3..4fe136a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPerspectiveFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPerspectiveFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.PreferenceConstants;
 
-import org.eclipse.jdt.internal.ui.JavaPerspectiveFactory;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
 
 
 public class JavaBrowsingPerspectiveFactory implements IPerspectiveFactory {
@@ -78,10 +78,11 @@ public class JavaBrowsingPerspectiveFactory implements IPerspectiveFactory {
 		// views - standard workbench
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
-		layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
+		layout.addShowViewShortcut(JavaPlugin.ID_RES_NAV);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
 		layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID);
-		layout.addShowViewShortcut(JavaPerspectiveFactory.ID_PROJECT_EXPLORER);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
+		layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
 
 		// new actions - Java project creation wizard
 		layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$
@@ -96,6 +97,11 @@ public class JavaBrowsingPerspectiveFactory implements IPerspectiveFactory {
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
 		layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
+
+		// 'Window' > 'Open Perspective' contributions
+		layout.addPerspectiveShortcut(JavaUI.ID_PERSPECTIVE);
+		layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
+
 	}
 
 	private void createVerticalLayout(IPageLayout layout) {
@@ -106,8 +112,8 @@ public class JavaBrowsingPerspectiveFactory implements IPerspectiveFactory {
 		placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
 		placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
 		placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
-		placeHolderLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
-		placeHolderLeft.addPlaceholder(JavaPerspectiveFactory.ID_PROJECT_EXPLORER);
+		placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
+		placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
 
 		if (shouldShowProjectsView()) {
 			layout.addView(JavaUI.ID_PROJECTS_VIEW, IPageLayout.LEFT, (float)0.25, IPageLayout.ID_EDITOR_AREA);
@@ -153,8 +159,8 @@ public class JavaBrowsingPerspectiveFactory implements IPerspectiveFactory {
 		placeHolderLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
 		placeHolderLeft.addPlaceholder(IPageLayout.ID_OUTLINE);
 		placeHolderLeft.addPlaceholder(JavaUI.ID_PACKAGES);
-		placeHolderLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
-		placeHolderLeft.addPlaceholder(JavaPerspectiveFactory.ID_PROJECT_EXPLORER);
+		placeHolderLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
+		placeHolderLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
 
 
 		IPlaceholderFolderLayout placeHolderBottom= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
index f530afa..3f33b4c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/PackagesView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,6 @@ import org.eclipse.jface.viewers.Viewer;
 
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -215,7 +214,7 @@ public class PackagesView extends JavaBrowsingPart{
 		if (key == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV  };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
 				}
 			};
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
index 98c91a3..8fcf5ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/ProjectsView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.TreeViewer;
 
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.handlers.CollapseAllHandler;
 import org.eclipse.ui.handlers.IHandlerService;
@@ -51,6 +50,7 @@ import org.eclipse.jdt.internal.ui.actions.CollapseAllAction;
 import org.eclipse.jdt.internal.ui.viewsupport.FilterUpdater;
 import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
 
+
 public class ProjectsView extends JavaBrowsingPart {
 
 	private FilterUpdater fFilterUpdater;
@@ -83,7 +83,7 @@ public class ProjectsView extends JavaBrowsingPart {
 		if (key == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV  };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
 				}
 
 			};
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TypesView.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TypesView.java
index 8317161..a593be9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TypesView.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/TypesView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 
 import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.part.IShowInTargetList;
@@ -38,6 +37,7 @@ import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.PreferenceConstants;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.actions.SelectAllAction;
 import org.eclipse.jdt.internal.ui.filters.NonJavaElementFilter;
 import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
@@ -67,7 +67,7 @@ public class TypesView extends JavaBrowsingPart {
 		if (key == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV  };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
 				}
 
 			};
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java
index 215bbbc..aac1d8a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyContentProvider.java
@@ -49,22 +49,13 @@ public class CallHierarchyContentProvider implements ITreeContentProvider {
 	 * constructors in the Call Hierarchy.
 	 * <p>
 	 * Value is of type <code>String</code>: semicolon separated list of fully qualified type names.
+	 * <strong> It has been replaced in 3.6 by API:
+	 * {@link PreferenceConstants#PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS}</strong>
 	 * </p>
 	 * 
 	 * @since 3.5
 	 */
-	public static final String PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS= "CallHierarchy.defaultExpandWithConstructors"; //$NON-NLS-1$
-
-	/**
-	 * A named preference that controls whether methods from anonymous types are by default expanded
-	 * with constructors in the Call Hierarchy.
-	 * <p>
-	 * Value is of type <code>Boolean</code>.
-	 * </p>
-	 * 
-	 * @since 3.5
-	 */
-	public static final String PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS= "CallHierarchy.anonymousExpandWithConstructors"; //$NON-NLS-1$
+	public static final String OLD_PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS= "CallHierarchy.defaultExpandWithConstructors"; //$NON-NLS-1$
 
 	private final static Object[] EMPTY_ARRAY= new Object[0];
 
@@ -175,14 +166,15 @@ public class CallHierarchyContentProvider implements ITreeContentProvider {
 
 		if (!wrapper.isExpandWithConstructorsSet()) {
 			if (CallHierarchyContentProvider.canExpandWithConstructors(wrapper)) {
-				IType type= wrapper.getMember().getDeclaringType();
+				IMethod method= (IMethod)wrapper.getMember();
+				IType type= method.getDeclaringType();
 				try {
 					boolean withConstructors= false;
 					if (type != null) {
-						boolean anonymousPref= PreferenceConstants.getPreferenceStore().getBoolean(PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
+						boolean anonymousPref= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
 						if (anonymousPref && type.isAnonymous()) {
 							withConstructors= true;
-						} else if (isInTheDefaultExpandWithConstructorList(type)) {
+						} else if (isInTheDefaultExpandWithConstructorList(method)) {
 							withConstructors= true;
 						}
 					}
@@ -217,38 +209,65 @@ public class CallHierarchyContentProvider implements ITreeContentProvider {
 	}
 	
 	/**
-	 * Checks if declaring type matches the pre-defined array of types for default expand with
-	 * constructors.
+	 * Checks if the method or its declaring type matches the pre-defined array of methods and types
+	 * for default expand with constructors.
+	 * 
+	 * @param method the wrapped method
+	 * @return <code>true</code> if method or type matches the pre-defined list, <code>false</code>
+	 *         otherwise
 	 * 
-	 * @param type the declaring type of the caller method wrapper
-	 * @return <code>true</code> if type matches the pre-defined list, <code>false</code> otherwise
 	 * @since 3.5
 	 */
-	static boolean isInTheDefaultExpandWithConstructorList(IType type) {
-		String serializedTypes= PreferenceConstants.getPreferenceStore().getString(PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS);
-		if (serializedTypes.length() == 0)
+	static boolean isInTheDefaultExpandWithConstructorList(IMethod method) {
+		String serializedMembers= PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS);
+		if (serializedMembers.length() == 0)
 			return false;
 		
-		String[] defaultTypes= serializedTypes.split(";"); //$NON-NLS-1$
+		String[] defaultMemberPatterns= serializedMembers.split(";"); //$NON-NLS-1$
 		
-		String typeName= type.getFullyQualifiedName('.');
-		String superClass;
-		String[] superInterfaces;
+		String methodName= method.getElementName();
+		IType declaringType= method.getDeclaringType();
+		String declaringTypeName= declaringType.getFullyQualifiedName('.');
+		String superClassName;
+		String[] superInterfaceNames;
 		try {
-			superClass= type.getSuperclassName();
-			superInterfaces= type.getSuperInterfaceNames();
+			superClassName= declaringType.getSuperclassName();
+			if (superClassName != null) {
+				superClassName= stripTypeArguments(superClassName);
+			}
+			superInterfaceNames= declaringType.getSuperInterfaceNames();
+			for (int i= 0; i < superInterfaceNames.length; i++) {
+				superInterfaceNames[i]= stripTypeArguments(superInterfaceNames[i]);
+			}
 		} catch (JavaModelException e) {
 			return false;
 		}
-		for (int i= 0; i < defaultTypes.length; i++) {
-			String defaultType= defaultTypes[i];
-			if (typeName.equals(defaultType) || (superClass != null && typeNameMatches(superClass, defaultType))) {
+		
+		for (int i= 0; i < defaultMemberPatterns.length; i++) {
+			String defaultMemberPattern= defaultMemberPatterns[i];
+			int pos= defaultMemberPattern.lastIndexOf('.');
+			String defaultTypeName= defaultMemberPattern.substring(0, pos);
+			String defaultMethodName= defaultMemberPattern.substring(pos + 1);
+			
+			if ("*".equals(defaultMethodName)) { //$NON-NLS-1$
+				if (declaringTypeName.equals(defaultTypeName)) {
+					return true;
+				}
+			} else {
+				if (!methodName.equals(defaultMethodName)) {
+					continue;
+				}
+				if (declaringTypeName.equals(defaultTypeName)) {
+					return true;
+				}
+			}
+			if (superClassName != null && typeNameMatches(superClassName, defaultTypeName)) {
 				return true;
 			}
-			if (superInterfaces.length > 0) {
-				for (int j= 0; j < superInterfaces.length; j++) {
-					if (typeNameMatches(superInterfaces[j], defaultType))
-						return true;
+			for (int j= 0; j < superInterfaceNames.length; j++) {
+				String superInterfaceName= superInterfaceNames[j];
+				if (typeNameMatches(superInterfaceName, defaultTypeName)) {
+					return true;
 				}
 			}
 		}
@@ -256,6 +275,21 @@ public class CallHierarchyContentProvider implements ITreeContentProvider {
 	}
 
 	/**
+	 * Strips type arguments from the given type name and returns only erased type name.
+	 * 
+	 * @param typeName the type name
+	 * @return the erased type name
+	 * 
+	 * @since 3.6
+	 */
+	private static String stripTypeArguments(String typeName) {
+		int pos= typeName.indexOf('<');
+		if (pos != -1)
+			return typeName.substring(0, pos);
+		return typeName;
+	}
+
+	/**
 	 * Checks whether the two type names match. They match if they
 	 * are equal, or if could be the same type but one is missing the package.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyLabelProvider.java
index 83f0537..80069bc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -100,10 +100,12 @@ class CallHierarchyLabelProvider extends AppearanceAwareLabelProvider {
 			String decorated= getElementLabel(wrapper);
 			
 			StyledString styledLabel= super.getStyledText(wrapper.getMember());
+			StyledString styledDecorated= StyledCellLabelProvider.styleDecoratedString(decorated, StyledString.COUNTER_STYLER, styledLabel);
 			if (isSpecialConstructorNode(wrapper)) {
 				decorated= Messages.format(CallHierarchyMessages.CallHierarchyLabelProvider_constructor_label, decorated);
+				styledDecorated= StyledCellLabelProvider.styleDecoratedString(decorated, ColoringLabelProvider.INHERITED_STYLER, styledDecorated);
 			}
-			return StyledCellLabelProvider.styleDecoratedString(decorated, ColoringLabelProvider.INHERITED_STYLER, styledLabel);
+			return styledDecorated;
 		}
 		
 		String specialLabel= getSpecialLabel(element);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.java
index 7062cb6..d234a24 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,13 +88,34 @@ public final class CallHierarchyMessages extends NLS {
 	public static String CallHierarchyViewPart_callsFromMembers_3;
 	public static String CallHierarchyViewPart_callsFromMembers_more;
 	public static String CallHierarchyViewPart_callsFromMethod;
+	public static String ExpandWithConstructorsConfigurationBlock_description;
+	public static String ExpandWithConstructorsConfigurationBlock_newType_button;
+	public static String ExpandWithConstructorsConfigurationBlock_newMember_button;
+	public static String ExpandWithConstructorsConfigurationBlock_edit_button;
+	public static String ExpandWithConstructorsConfigurationBlock_remove_button;
+	public static String ExpandWithConstructorsConfigurationBlock_restoreDefaults_button;
+	public static String CallHierarchyTypesOrMembersDialog_member_title;
+	public static String CallHierarchyTypesOrMembersDialog_member_labelText;
+	public static String CallHierarchyTypesOrMembersDialog_type_title;
+	public static String CallHierarchyTypesOrMembersDialog_type_labelText;
+	public static String CallHierarchyTypesOrMembersDialog_browse_button;
+	public static String CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_title;
+	public static String CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_description;
+	public static String CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_error_message;
+	public static String CallHierarchyTypesOrMembersDialog_error_invalidMemberName;
+	public static String CallHierarchyTypesOrMembersDialog_error_invalidTypeName;
+	public static String CallHierarchyTypesOrMembersDialog_error_entryExists;
+	public static String CallHierarchyTypesOrMembersDialog_anonymousTypes_label;
 	public static String FocusOnSelectionAction_focusOnSelection_text;
 	public static String FocusOnSelectionAction_focusOnSelection_description;
 	public static String FocusOnSelectionAction_focusOnSelection_tooltip;
 	public static String FocusOnSelectionAction_focusOn_selected;
 	public static String FocusOnSelectionAction_focusOn_text;
-	public static String RefreshAction_text;
-	public static String RefreshAction_tooltip;
+	public static String RefreshViewAction_text;
+	public static String RefreshViewAction_tooltip;
+	public static String RefreshSingleElementAction_text;
+	public static String RefreshSingleElementAction_tooltip;
+	public static String RefreshSingleElementAction_description;
 	public static String SearchScopeActionGroup_searchScope;
 	public static String SearchScopeActionGroup_hierarchy_text;
 	public static String SearchScopeActionGroup_hierarchy_tooltip;
@@ -107,8 +128,6 @@ public final class CallHierarchyMessages extends NLS {
 	public static String SearchScopeActionGroup_workingset_select_tooltip;
 	public static String WorkingSetScope;
 	public static String SearchUtil_workingSetConcatenation;
-	public static String SelectWorkingSetAction_error_title;
-	public static String SelectWorkingSetAction_error_message;
 	public static String OpenLocationAction_error_title;
 	public static String CallHierarchyUI_open_in_editor_error_message;
 	public static String CallHierarchyUI_open_in_editor_error_messageArgs;
@@ -131,15 +150,15 @@ public final class CallHierarchyMessages extends NLS {
 	public static String LocationViewer_ColumnLine_header;
 	public static String LocationViewer_ColumnInfo_header;
 	public static String LocationLabelProvider_unknown;
+	
+	public static String RemoveFromViewAction_removeFromView_text;
+	public static String RemoveFromViewAction_removeFromView_description;
+	public static String RemoveFromViewAction_removeFromView_tooltip;
 
 	public static String ExpandWithConstructorsAction_expandWithConstructors_text;
 	public static String ExpandWithConstructorsAction_expandWithConstructors_description;
 	public static String ExpandWithConstructorsAction_expandWithConstructors_tooltip;
-	public static String ExpandWithConstructorsDialog_anonymousTypes_label;
-	public static String ExpandWithConstructorsDialog_explanation_label;
-	public static String ExpandWithConstructorsDialog_not_a_valid_type_name;
 	public static String ExpandWithConstructorsDialog_title;
-	public static String ExpandWithConstructorsDialog_typeNames_label;
 	static {
 		NLS.initializeMessages(BUNDLE_NAME, CallHierarchyMessages.class);
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.properties
index b2ba248..7a83204 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -42,18 +42,18 @@ HistoryListDialog_remove_button=&Remove
 
 HistoryListAction_label=History...
 
-ToggleOrientationAction_vertical_label=&Vertical View Orientation
-ToggleOrientationAction_vertical_description=Vertical View Orientation
-ToggleOrientationAction_vertical_tooltip=Vertical View Orientation
-ToggleOrientationAction_horizontal_label=&Horizontal View Orientation
-ToggleOrientationAction_horizontal_tooltip=Horizontal View Orientation
-ToggleOrientationAction_horizontal_description=Horizontal View Orientation
-ToggleOrientationAction_automatic_label=&Automatic View Orientation
-ToggleOrientationAction_automatic_tooltip=Automatic View Orientation
-ToggleOrientationAction_automatic_description=Automatic View Orientation
-ToggleOrientationAction_single_label=Hierarchy View &Only
-ToggleOrientationAction_single_tooltip=Hierarchy View Only
-ToggleOrientationAction_single_description=Hierarchy View Only
+ToggleOrientationAction_vertical_label=&Vertical
+ToggleOrientationAction_vertical_description=Vertical
+ToggleOrientationAction_vertical_tooltip=Vertical
+ToggleOrientationAction_horizontal_label=&Horizontal
+ToggleOrientationAction_horizontal_tooltip=Horizontal
+ToggleOrientationAction_horizontal_description=Horizontal
+ToggleOrientationAction_automatic_label=&Automatic
+ToggleOrientationAction_automatic_tooltip=Automatic
+ToggleOrientationAction_automatic_description=Automatic
+ToggleOrientationAction_single_label=Hierarchy &Only
+ToggleOrientationAction_single_tooltip=Hierarchy Only
+ToggleOrientationAction_single_description=Hierarchy Only
 
 ShowExpandWithConstructorsDialogAction_text=E&xpand with Constructors...
 ShowFilterDialogAction_text= &Filters...
@@ -92,8 +92,11 @@ FocusOnSelectionAction_focusOnSelection_tooltip=Focus On Selection
 FocusOnSelectionAction_focusOn_selected=Foc&us On Selected Elements
 FocusOnSelectionAction_focusOn_text=Fo&cus On ''{0}''
 
-RefreshAction_text=Re&fresh
-RefreshAction_tooltip=Refresh
+RefreshViewAction_text=Re&fresh View
+RefreshViewAction_tooltip=Refresh View
+RefreshSingleElementAction_text= Refre&sh
+RefreshSingleElementAction_tooltip=Refresh
+RefreshSingleElementAction_description=Refresh
 SearchScopeActionGroup_searchScope=&Search Scope
 SearchScopeActionGroup_hierarchy_text=&Hierarchy
 SearchScopeActionGroup_hierarchy_tooltip=Search for Calls in Hierarchy
@@ -108,8 +111,6 @@ WorkingSetScope= Working Set - {0}
 
 SearchUtil_workingSetConcatenation= {0}, {1}
 
-SelectWorkingSetAction_error_title=Select Working Sets Error
-SelectWorkingSetAction_error_message=An error occurred while selecting the working sets.
 OpenLocationAction_error_title=Show Call Location
 CallHierarchyUI_open_in_editor_error_message=An error occurred while opening the editor.
 CallHierarchyUI_open_in_editor_error_messageArgs=An error occurred while opening the editor for ''{0}'': ''{1}''.
@@ -140,11 +141,31 @@ LocationViewer_ColumnInfo_header=Call
 LocationLabelProvider_unknown=?
 LocationCopyAction_copy=&Copy
 
+RemoveFromViewAction_removeFromView_text= Remo&ve from View
+RemoveFromViewAction_removeFromView_description= Remove from View
+RemoveFromViewAction_removeFromView_tooltip= Remove from View
 ExpandWithConstructorsAction_expandWithConstructors_text= &Expand with Constructors
 ExpandWithConstructorsAction_expandWithConstructors_description= Expand with constructors
 ExpandWithConstructorsAction_expandWithConstructors_tooltip= Expand with Constructors
-ExpandWithConstructorsDialog_anonymousTypes_label=&All methods in anonymous types
-ExpandWithConstructorsDialog_explanation_label=Configure the types whose instance methods are expanded with constructors by default.
-ExpandWithConstructorsDialog_not_a_valid_type_name=''{0}'' is not a valid type name
-ExpandWithConstructorsDialog_title=Expand with Constructors
-ExpandWithConstructorsDialog_typeNames_label=Type &names (each on a line):
+ExpandWithConstructorsDialog_title= Expand with Constructors
+
+ExpandWithConstructorsConfigurationBlock_description= De&fine a list of members or types with their fully qualified names. The call hierarchy for these members or members of the types will be expanded with constructors by default.
+ExpandWithConstructorsConfigurationBlock_newType_button= New &Type...
+ExpandWithConstructorsConfigurationBlock_newMember_button= New &Member...
+ExpandWithConstructorsConfigurationBlock_edit_button= &Edit...
+ExpandWithConstructorsConfigurationBlock_remove_button= &Remove 
+ExpandWithConstructorsConfigurationBlock_restoreDefaults_button= Restore &Defaults
+
+CallHierarchyTypesOrMembersDialog_member_title= New Member for Expand With Constructors
+CallHierarchyTypesOrMembersDialog_member_labelText= Enter a fully qualified non-static, non-constructor member (e.g. \'java.lang.Runnable.run\'): 
+CallHierarchyTypesOrMembersDialog_type_title= New Type for Expand With Constructors
+CallHierarchyTypesOrMembersDialog_type_labelText= Enter a fully qualified type (e.g. \'java.lang.Runnable\'):
+CallHierarchyTypesOrMembersDialog_browse_button= &Browse...
+CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_title= Type Selection
+CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_description= Choose type name:
+CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_error_message= A problem occurred while collecting types. See the error log for details.
+CallHierarchyTypesOrMembersDialog_error_invalidTypeName=Not a valid type name.
+CallHierarchyTypesOrMembersDialog_error_invalidMemberName=Not a valid member name.
+CallHierarchyTypesOrMembersDialog_error_entryExists=Entry already exists in list.
+CallHierarchyTypesOrMembersDialog_anonymousTypes_label=&All methods in anonymous types
+
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java
index 7e474eb..84228ef 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyViewPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,11 +34,9 @@ import org.eclipse.swt.dnd.FileTransfer;
 import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 
 import org.eclipse.core.runtime.Assert;
@@ -65,7 +63,6 @@ import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPartListener2;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchPage;
@@ -124,6 +121,7 @@ import org.eclipse.jdt.internal.ui.util.SelectionUtil;
 import org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator;
 import org.eclipse.jdt.internal.ui.viewsupport.StatusBarUpdater;
 
+
 /**
  * This is the main view for the callers plugin. It builds a tree of callers/callees
  * and allows the user to double click an entry to go to the selected method.
@@ -224,13 +222,15 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
     private SelectFieldModeAction[] fToggleFieldModeActions;
     private CallHierarchyFiltersActionGroup fFiltersActionGroup;
     private HistoryDropDownAction fHistoryDropDownAction;
-    private RefreshAction fRefreshAction;
+    private RefreshElementAction fRefreshSingleElementAction;
+    private RefreshViewAction fRefreshViewAction;
     private OpenLocationAction fOpenLocationAction;
 	private LocationCopyAction fLocationCopyAction;
     private FocusOnSelectionAction fFocusOnSelectionAction;
     private CopyCallHierarchyAction fCopyAction;
     private CancelSearchAction fCancelSearchAction;
     private ExpandWithConstructorsAction fExpandWithConstructorsAction;
+    private RemoveFromViewAction fRemoveFromViewAction;
     private CompositeActionGroup fActionGroups;
     private CallHierarchyViewer fCallHierarchyViewer;
     private boolean fShowCallDetails;
@@ -565,11 +565,11 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
 	}
 
     private void showPage(int page) {
-        if (page == PAGE_EMPTY) {
-            fPagebook.showPage(fNoHierarchyShownLabel);
-        } else {
-            fPagebook.showPage(fHierarchyLocationSplitter);
-        }
+		boolean isEmpty= page == PAGE_EMPTY;
+		Control control= isEmpty ? (Control) fNoHierarchyShownLabel : fHierarchyLocationSplitter;
+		fPagebook.showPage(control);
+		if (fRefreshViewAction != null)
+			fRefreshViewAction.setEnabled(!isEmpty);
     }
 
     /**
@@ -811,7 +811,7 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
 		if (adapter == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV  };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
 				}
 			};
 		}
@@ -845,22 +845,12 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
         JavaPlugin.createStandardGroups(menu);
 
         menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fOpenLocationAction);
-        menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshAction);
+		if (fRefreshSingleElementAction.canActionBeAdded()) {
+			menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshSingleElementAction);
+		}
         menu.appendToGroup(IContextMenuConstants.GROUP_REORGANIZE, fLocationCopyAction);
     }
 
-    protected void handleKeyEvent(KeyEvent event) {
-        if (event.stateMask == 0) {
-            if (event.keyCode == SWT.F5) {
-                if ((fRefreshAction != null) && fRefreshAction.isEnabled()) {
-                    fRefreshAction.run();
-
-                    return;
-                }
-            }
-        }
-    }
-
     private IActionBars getActionBars() {
         return getViewSite().getActionBars();
     }
@@ -916,7 +906,6 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
     private void createLocationViewer(Composite parent) {
         fLocationViewer= new LocationViewer(parent);
 
-        fLocationViewer.getControl().addKeyListener(createKeyListener());
 
         fLocationViewer.initContextMenu(new IMenuListener() {
                 public void menuAboutToShow(IMenuManager menu) {
@@ -927,21 +916,20 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
 
     private void createHierarchyLocationSplitter(Composite parent) {
         fHierarchyLocationSplitter = new SashForm(parent, SWT.NONE);
-
-        fHierarchyLocationSplitter.addKeyListener(createKeyListener());
     }
 
     private void createCallHierarchyViewer(Composite parent) {
         fCallHierarchyViewer = new CallHierarchyViewer(parent, this);
 
-        fCallHierarchyViewer.addKeyListener(createKeyListener());
         fCallHierarchyViewer.addSelectionChangedListener(this);
     }
 
     protected void fillCallHierarchyViewerContextMenu(IMenuManager menu) {
         JavaPlugin.createStandardGroups(menu);
 
-        menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshAction);
+		if (fRefreshSingleElementAction.canActionBeAdded()) {
+			menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, fRefreshSingleElementAction);
+		}
         menu.appendToGroup(IContextMenuConstants.GROUP_SHOW, new Separator(GROUP_FOCUS));
 
         if (fFocusOnSelectionAction.canActionBeAdded()) {
@@ -950,7 +938,10 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
         if (fExpandWithConstructorsAction.canActionBeAdded()) {
         	menu.appendToGroup(GROUP_FOCUS, fExpandWithConstructorsAction);
         }
-
+        
+        if (fRemoveFromViewAction.canActionBeAdded()){
+        	menu.appendToGroup(GROUP_FOCUS, fRemoveFromViewAction);
+        }
 
         fActionGroups.setContext(new ActionContext(getSelection()));
         fActionGroups.fillContextMenu(menu);
@@ -963,13 +954,13 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
 
     private void fillActionBars() {
         IActionBars actionBars = getActionBars();
-		actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), fRefreshAction);
+		actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), fRefreshSingleElementAction);
 
         IToolBarManager toolBar = actionBars.getToolBarManager();
 
         fActionGroups.fillActionBars(actionBars);
 
-        toolBar.add(fRefreshAction);
+        toolBar.add(fRefreshViewAction);
         toolBar.add(fCancelSearchAction);
         for (int i = 0; i < fToggleCallModeActions.length; i++) {
             toolBar.add(fToggleCallModeActions[i]);
@@ -977,21 +968,12 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
         toolBar.add(fHistoryDropDownAction);
     }
 
-    private KeyListener createKeyListener() {
-        KeyListener keyListener = new KeyAdapter() {
-                public void keyReleased(KeyEvent event) {
-                    handleKeyEvent(event);
-                }
-            };
-
-        return keyListener;
-    }
-
     /**
      *
      */
     private void makeActions() {
-        fRefreshAction = new RefreshAction(this);
+        fRefreshViewAction = new RefreshViewAction(this);
+        fRefreshSingleElementAction= new RefreshElementAction(fCallHierarchyViewer);
 
 		new CallHierarchyOpenEditorHelper(fLocationViewer);
 		new CallHierarchyOpenEditorHelper(fCallHierarchyViewer);
@@ -1008,6 +990,7 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
         fCancelSearchAction = new CancelSearchAction(this);
         setCancelEnabled(false);
         fExpandWithConstructorsAction= new ExpandWithConstructorsAction(this, fCallHierarchyViewer);
+        fRemoveFromViewAction= new RemoveFromViewAction(this, fCallHierarchyViewer);
         fToggleOrientationActions = new ToggleOrientationAction[] {
                 new ToggleOrientationAction(this, VIEW_ORIENTATION_VERTICAL),
                 new ToggleOrientationAction(this, VIEW_ORIENTATION_HORIZONTAL),
@@ -1208,4 +1191,14 @@ public class CallHierarchyViewPart extends ViewPart implements ICallHierarchyVie
     public CallHierarchyViewer getViewer() {
     	return fCallHierarchyViewer;
     }
+
+	/**
+	 * Returns the location viewer.
+	 * 
+	 * @return the location viewer
+	 * @since 3.6
+	 */
+	protected LocationViewer getLocationViewer() {
+		return fLocationViewer;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CopyCallHierarchyAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CopyCallHierarchyAction.java
index 71fc60e..9c070ee 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CopyCallHierarchyAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CopyCallHierarchyAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,8 @@ import java.io.PrintWriter;
 import java.io.StringReader;
 import java.io.StringWriter;
 
+import org.eclipse.osgi.util.TextProcessor;
+
 import org.eclipse.swt.SWTError;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
@@ -37,10 +39,11 @@ import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.util.SelectionUtil;
 
 class CopyCallHierarchyAction extends Action {
-    private static final char INDENTATION= '\t';
+	private static final char INDENTATION= '\t';
+
+	private CallHierarchyViewPart fView;
 
-    private CallHierarchyViewPart fView;
-    private CallHierarchyViewer fViewer;
+	private CallHierarchyViewer fViewer;
 
 	private final Clipboard fClipboard;
 
@@ -50,37 +53,37 @@ class CopyCallHierarchyAction extends Action {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_COPY_ACTION);
 		fView= view;
 		fClipboard= clipboard;
-        fViewer= viewer;
+		fViewer= viewer;
 	}
 
-    public boolean canActionBeAdded() {
-        Object element = SelectionUtil.getSingleElement(getSelection());
-        return element != null;
-    }
+	public boolean canActionBeAdded() {
+		Object element= SelectionUtil.getSingleElement(getSelection());
+		return element != null;
+	}
 
-    private ISelection getSelection() {
-        ISelectionProvider provider = fView.getSite().getSelectionProvider();
+	private ISelection getSelection() {
+		ISelectionProvider provider= fView.getSite().getSelectionProvider();
 
-        if (provider != null) {
-            return provider.getSelection();
-        }
+		if (provider != null) {
+			return provider.getSelection();
+		}
 
-        return null;
-    }
+		return null;
+	}
 
 	/*
 	 * @see IAction#run()
 	 */
 	public void run() {
-        StringBuffer buf= new StringBuffer();
-        addCalls(fViewer.getTree().getSelection()[0], 0, buf);
+		StringBuffer buf= new StringBuffer();
+		addCalls(fViewer.getTree().getSelection()[0], 0, buf);
 
-		TextTransfer plainTextTransfer = TextTransfer.getInstance();
-		try{
+		TextTransfer plainTextTransfer= TextTransfer.getInstance();
+		try {
 			fClipboard.setContents(
-				new String[]{ convertLineTerminators(buf.toString()) },
-				new Transfer[]{ plainTextTransfer });
-		}  catch (SWTError e){
+					new String[] { convertLineTerminators(buf.toString()) },
+					new Transfer[] { plainTextTransfer });
+		} catch (SWTError e) {
 			if (e.code != DND.ERROR_CANNOT_SET_CLIPBOARD)
 				throw e;
 			if (MessageDialog.openQuestion(fView.getViewSite().getShell(), CallHierarchyMessages.CopyCallHierarchyAction_problem, CallHierarchyMessages.CopyCallHierarchyAction_clipboard_busy))
@@ -90,28 +93,28 @@ class CopyCallHierarchyAction extends Action {
 
 	/**
 	 * Adds the specified {@link TreeItem}'s text to the StringBuffer.
-	 *
+	 * 
 	 * @param item the tree item
 	 * @param indent the indent size
 	 * @param buf the string buffer
 	 */
-    private void addCalls(TreeItem item, int indent, StringBuffer buf) {
-        for (int i= 0; i < indent; i++) {
-            buf.append(INDENTATION);
-        }
-
-        buf.append(item.getText());
-        buf.append('\n');
-
-        if (item.getExpanded()) {
-            TreeItem[] items= item.getItems();
-            for (int i= 0; i < items.length; i++) {
-                addCalls(items[i], indent + 1, buf);
-            }
-        }
-    }
-
-    static String convertLineTerminators(String in) {
+	private void addCalls(TreeItem item, int indent, StringBuffer buf) {
+		for (int i= 0; i < indent; i++) {
+			buf.append(INDENTATION);
+		}
+
+		buf.append(TextProcessor.deprocess(item.getText()));
+		buf.append('\n');
+
+		if (item.getExpanded()) {
+			TreeItem[] items= item.getItems();
+			for (int i= 0; i < items.length; i++) {
+				addCalls(items[i], indent + 1, buf);
+			}
+		}
+	}
+
+	static String convertLineTerminators(String in) {
 		StringWriter stringWriter= new StringWriter();
 		PrintWriter printWriter= new PrintWriter(stringWriter);
 		StringReader stringReader= new StringReader(in);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java
new file mode 100644
index 0000000..21b7eef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsConfigurationBlock.java
@@ -0,0 +1,619 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.ui.callhierarchy;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.window.Window;
+
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.core.search.SearchEngine;
+
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
+import org.eclipse.jdt.ui.JavaUI;
+import org.eclipse.jdt.ui.PreferenceConstants;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
+import org.eclipse.jdt.internal.ui.dialogs.TextFieldNavigationHandler;
+import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
+import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext;
+import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
+import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
+
+/**
+ * Call hierarchy expand with constructors configuration block.
+ *
+ * @since 3.6
+ */
+public class ExpandWithConstructorsConfigurationBlock extends OptionsConfigurationBlock {
+
+	/**
+	 * Call hierarchy expand with constructors dialog for types and members.
+	 */
+	private static class CallHierarchyTypesOrMembersDialog extends StatusDialog {
+
+		/**
+		 * The change listener class for the dialog field and the string button dialog field.
+		 *
+		 */
+		private class StringButtonAdapter implements IDialogFieldListener, IStringButtonAdapter {
+			/*
+			 * @see IDialogFieldListener#dialogFieldChanged(DialogField)
+			 */
+			public void dialogFieldChanged(DialogField field) {
+				doValidation();
+			}
+
+			/*
+			 * @see IStringButtonAdapter#changeControlPressed(DialogField)
+			 */
+			public void changeControlPressed(DialogField field) {
+				doBrowseTypes();
+			}
+		}
+
+		/**
+		 * The name dialog field to hold the default expand with constructors list.
+		 */
+		private StringButtonDialogField fNameDialogField;
+
+		/**
+		 * The list of previously existing entries.
+		 */
+		private List fExistingEntries;
+
+		/**
+		 * Tells whether it is an member or type.
+		 */
+		private final boolean fIsEditingMember;
+
+		/**
+		 * Creates a call hierarchy preference dialog for members or types.
+		 *
+		 * @param parent the parent shell
+		 * @param existingEntries the existing list of types and members
+		 * @param isEditingMember <code>true</code if its a member, <code>false</code> otherwise
+		 */
+		public CallHierarchyTypesOrMembersDialog(Shell parent, List existingEntries, boolean isEditingMember) {
+			super(parent);
+			fIsEditingMember= isEditingMember;
+			fExistingEntries= existingEntries;
+
+			String label, title;
+			if (isEditingMember) {
+				title= CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_member_title;
+				label= CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_member_labelText;
+			} else {
+				title= CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_type_title;
+				label= CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_type_labelText;
+			}
+			setTitle(title);
+
+			StringButtonAdapter adapter= new StringButtonAdapter();
+
+			fNameDialogField= new StringButtonDialogField(adapter);
+			fNameDialogField.setLabelText(label);
+			fNameDialogField.setButtonLabel(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_browse_button);
+			fNameDialogField.setDialogFieldListener(adapter);
+			fNameDialogField.setText(""); //$NON-NLS-1$
+		}
+
+		/*
+		 * @see org.eclipse.jface.dialogs.Dialog#isResizable()		 *
+		 */
+		protected boolean isResizable() {
+			return true;
+		}
+
+		/**
+		 * Sets the initial selection in the name dialog field.
+		 *
+		 * @param editedEntry the edited entry
+		 */
+		public void setInitialSelection(String editedEntry) {
+			Assert.isNotNull(editedEntry);
+			if (editedEntry.length() == 0)
+				fNameDialogField.setText(""); //$NON-NLS-1$
+			else
+				fNameDialogField.setText(editedEntry);
+		}
+
+		/**
+		 * Returns the resulting text from the name dialog field.
+		 *
+		 * @return the resulting text from the name dialog field
+		 */
+		public String getResult() {
+			String val= fNameDialogField.getText();
+			if (!fIsEditingMember)
+				val= val + WILDCARD;
+			return val;
+		}
+
+		/*
+		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+		 */
+		protected Control createDialogArea(Composite parent) {
+			Composite composite= (Composite)super.createDialogArea(parent);
+			initializeDialogUnits(composite);
+
+			GridLayout layout= (GridLayout)composite.getLayout();
+			layout.numColumns= 2;
+
+			fNameDialogField.doFillIntoGrid(composite, 3);
+
+			fNameDialogField.getChangeControl(null).setVisible(!fIsEditingMember);
+
+			LayoutUtil.setHorizontalSpan(fNameDialogField.getLabelControl(null), 2);
+
+			int fieldWidthHint= convertWidthInCharsToPixels(60);
+			Text text= fNameDialogField.getTextControl(null);
+			LayoutUtil.setWidthHint(text, fieldWidthHint);
+			LayoutUtil.setHorizontalGrabbing(text);
+			LayoutUtil.setHorizontalSpan(text, fIsEditingMember ? 2 : 1);
+			TextFieldNavigationHandler.install(text);
+
+			DialogField.createEmptySpace(composite, 1);
+
+			fNameDialogField.postSetFocusOnDialogField(parent.getDisplay());
+
+			applyDialogFont(composite);
+			return composite;
+		}
+
+		/**
+		 * Creates the type hierarchy for type selection.
+		 */
+		private void doBrowseTypes() {
+			IRunnableContext context= new BusyIndicatorRunnableContext();
+			IJavaSearchScope scope= SearchEngine.createWorkspaceScope();
+			int style= IJavaElementSearchConstants.CONSIDER_ALL_TYPES;
+			try {
+				SelectionDialog dialog= JavaUI.createTypeDialog(getShell(), context, scope, style, false, fNameDialogField.getText());
+				dialog.setTitle(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_title);
+				dialog.setMessage(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_description);
+				if (dialog.open() == Window.OK) {
+					IType res= (IType)dialog.getResult()[0];
+					fNameDialogField.setText(res.getFullyQualifiedName('.'));
+				}
+			} catch (JavaModelException e) {
+				ExceptionHandler.handle(e, getShell(), CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_title,
+						CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_ChooseTypeDialog_error_message);
+			}
+		}
+
+		/**
+		 * Validates the entered type or member and updates the status.
+		 */
+		private void doValidation() {
+			StatusInfo status= new StatusInfo();
+			String newText= fNameDialogField.getText();
+			if (newText.length() == 0) {
+				status.setError(""); //$NON-NLS-1$
+			} else {
+				IStatus val= JavaConventions.validateJavaTypeName(newText, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3);
+				if (val.matches(IStatus.ERROR)) {
+					if (fIsEditingMember)
+						status.setError(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_error_invalidMemberName);
+					else
+						status.setError(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_error_invalidTypeName);
+				} else {
+					if (doesExist(newText)) {
+						status.setError(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_error_entryExists);
+					}
+				}
+			}
+			updateStatus(status);
+		}
+
+		/**
+		 * Checks if the entry already exists.
+		 *
+		 * @param name the type or member name
+		 * @return <code>true</code> if it already exists in the list of types and members,
+		 *         <code>false</code> otherwise
+		 */
+		private boolean doesExist(String name) {
+			for (int i= 0; i < fExistingEntries.size(); i++) {
+				String entry= (String)fExistingEntries.get(i);
+				if (name.equals(entry)) {
+					return true;
+				}
+			}
+			return false;
+		}
+
+
+		/*
+		 * @see org.eclipse.jface.window.Window#configureShell(Shell)
+		 */
+		protected void configureShell(Shell newShell) {
+			super.configureShell(newShell);
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.CALL_HIERARCHY_EXPAND_WITH_CONSTRUCTORS_DIALOG);
+		}
+
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#performOk()
+	 */
+	public boolean performOk() {
+		setValue(ANONYMOUS_EXPAND_WITH_CONSTRUCTORS, fIsAnonymous);
+		return super.performOk();
+	}
+
+	/**
+	 * The list label provider class.
+	 */
+	private static class ListLabelProvider extends LabelProvider {
+
+		public final Image MEMBER_ICON;
+
+		private final Image CLASS_ICON;
+
+		/**
+		 * Create the member and class icons.
+		 */
+		public ListLabelProvider() {
+			MEMBER_ICON= JavaElementImageProvider.getDecoratedImage(JavaPluginImages.DESC_MISC_PUBLIC, 0, JavaElementImageProvider.SMALL_SIZE);
+			CLASS_ICON= JavaElementImageProvider.getDecoratedImage(JavaPluginImages.DESC_OBJS_CLASS, 0, JavaElementImageProvider.SMALL_SIZE);
+		}
+
+		/*
+		 * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+		 */
+		public Image getImage(Object element) {
+			return ((String)element).endsWith(WILDCARD) ? CLASS_ICON : MEMBER_ICON;
+		}
+
+		/*
+		 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+		 */
+		public String getText(Object element) {
+			return BasicElementLabels.getJavaElementName((String)element);
+		}
+	}
+
+
+	/**
+	 * The change listener for <code>ListDialogField</code>.
+	 */
+	private class ListAdapter implements IListAdapter, IDialogFieldListener {
+
+		/**
+		 * Checks if field can be edited.
+		 *
+		 * @param field the list dialog field
+		 * @return <code>true</code> if it can be edited, <code>false</code> otherwise
+		 */
+		private boolean canEdit(ListDialogField field) {
+			List selected= field.getSelectedElements();
+			return selected.size() == 1;
+		}
+
+		/*
+		 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#customButtonPressed(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField, int)
+		 */
+		public void customButtonPressed(ListDialogField field, int index) {
+			doButtonPressed(index);
+		}
+
+		/*
+		 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#selectionChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
+		 */
+		public void selectionChanged(ListDialogField field) {
+			fList.enableButton(IDX_EDIT, canEdit(field));
+			fList.enableButton(IDX_REMOVE, canRemove(field));
+		}
+
+		/**
+		 * Checks if the field can be removed.
+		 *
+		 * @param field the list dialog field
+		 * @return <code>true</code> if it can be removed, <code>false</code> otherwise
+		 */
+		private boolean canRemove(ListDialogField field) {
+			List selected= field.getSelectedElements();
+			return selected.size() != 0;
+		}
+
+		/* )
+		 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener#dialogFieldChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField)
+		 */
+		public void dialogFieldChanged(DialogField field) {
+			doDialogFieldChanged(field);
+		}
+
+		/*
+		 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#doubleClicked(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
+		 */
+		public void doubleClicked(ListDialogField field) {
+			if (canEdit(field)) {
+				doButtonPressed(IDX_EDIT);
+			}
+		}
+	}
+
+	private static final String WILDCARD= ".*"; //$NON-NLS-1$
+
+	private static final int IDX_NEW_TYPE= 0;
+	private static final int IDX_NEW_MEMBER= 1;
+	private static final int IDX_EDIT= 2;
+	private static final int IDX_REMOVE= 3;
+	private static final int IDX_RESTORE_DEFAULTS= 4;
+
+	private ListDialogField fList;
+
+	private Button fAnonymousButton;
+
+	protected boolean fIsAnonymous;
+
+	/**
+	 * A key that holds the list of methods or types whose methods are by default expanded with constructors in the Call Hierarchy.
+	 */
+	private static Key DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS= getJDTUIKey(PreferenceConstants.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS);
+
+	/**
+	 * A key that controls whether the methods from anonymous types are by default expanded with constructors in the Call Hierarchy.
+	 */
+	private static Key ANONYMOUS_EXPAND_WITH_CONSTRUCTORS= getJDTUIKey(PreferenceConstants.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
+
+	/**
+	 * Returns all the key values.
+	 *
+	 * @return array of keys
+	 */
+	public static Key[] getAllKeys() {
+		return new Key[] { DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS, ANONYMOUS_EXPAND_WITH_CONSTRUCTORS };
+	}
+
+
+	/**
+	 * Creates the call hierarchy preferences configuration block.
+	 *
+	 * @param context the status
+	 * @param container the preference container
+	 */
+	public ExpandWithConstructorsConfigurationBlock(IStatusChangeListener context, IWorkbenchPreferenceContainer container) {
+		super(context, null, getAllKeys(), container);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createContents(Composite parent) {
+		Composite control= new Composite(parent, SWT.NONE);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.marginWidth= 10;
+		layout.marginHeight= 10;
+		control.setLayout(layout);
+
+		createPreferenceList(control);
+
+		fAnonymousButton= new Button(control, SWT.CHECK);
+		fAnonymousButton.setText(CallHierarchyMessages.CallHierarchyTypesOrMembersDialog_anonymousTypes_label);
+		fIsAnonymous= getBooleanValue(ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
+		fAnonymousButton.setSelection(fIsAnonymous);
+		fAnonymousButton.setLayoutData(new GridData(SWT.LEAD, SWT.TOP, false, false));
+		fAnonymousButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fIsAnonymous= fAnonymousButton.getSelection();
+			}
+
+		});
+
+		initialize();
+
+		Dialog.applyDialogFont(control);
+
+		return control;
+	}
+
+	/**
+	 * Create a list dialog field.
+	 *
+	 * @param parent the composite
+	 */
+	private void createPreferenceList(Composite parent) {
+		String[] buttonLabels= new String[] {
+				CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newType_button,
+				CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_newMember_button,
+				CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_edit_button,
+				CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_remove_button,
+				CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_restoreDefaults_button
+		};
+
+		ListAdapter adapter= new ListAdapter();
+
+		fList= new ListDialogField(adapter, buttonLabels, new ListLabelProvider());
+		fList.setDialogFieldListener(adapter);
+		fList.setLabelText(CallHierarchyMessages.ExpandWithConstructorsConfigurationBlock_description);
+		fList.setRemoveButtonIndex(IDX_REMOVE);
+		fList.enableButton(IDX_EDIT, false);
+		fList.setViewerComparator(new ViewerComparator());
+
+		PixelConverter pixelConverter= new PixelConverter(parent);
+
+		fList.doFillIntoGrid(parent, 3);
+		LayoutUtil.setHorizontalSpan(fList.getLabelControl(null), 2);
+		LayoutUtil.setWidthHint(fList.getLabelControl(null), pixelConverter.convertWidthInCharsToPixels(60));
+		LayoutUtil.setHorizontalGrabbing(fList.getListControl(null));
+
+		Control listControl= fList.getListControl(null);
+		GridData gd= (GridData)listControl.getLayoutData();
+		gd.verticalAlignment= GridData.FILL;
+		gd.grabExcessVerticalSpace= true;
+		gd.heightHint= pixelConverter.convertHeightInCharsToPixels(10);
+	}
+
+	/**
+	 * Initialize the elements of the list dialog field.
+	 */
+	public void initialize() {
+		fList.setElements(Arrays.asList(getDefaultExpandWithConstructorsMembers()));
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#performDefaults()
+	 */
+	public void performDefaults() {
+		String str= PreferenceConstants.getPreferenceStore().getDefaultString(PreferenceConstants.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS);
+		fList.setElements(Arrays.asList(deserializeMembers(str)));
+		fIsAnonymous= PreferenceConstants.getPreferenceStore().getDefaultBoolean(PreferenceConstants.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
+		fAnonymousButton.setSelection(fIsAnonymous);
+		super.performDefaults();
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#getFullBuildDialogStrings(boolean)
+	 */
+	protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
+		return null;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#validateSettings(org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key, java.lang.String, java.lang.String)
+	 */
+	protected void validateSettings(Key changedKey, String oldValue, String newValue) {
+
+	}
+
+	/**
+	 * Perform the 'New' and 'Edit' button operations by opening the respective call hierarchy
+	 * preferences dialog, and 'Restore Defaults' button by restoring to default values for the list dialog.
+	 *
+	 * @param index the index of the button
+	 */
+	private void doButtonPressed(int index) {
+		if (index == IDX_NEW_TYPE || index == IDX_NEW_MEMBER) { // add new
+			List existing= fList.getElements();
+			CallHierarchyTypesOrMembersDialog dialog= new CallHierarchyTypesOrMembersDialog(getShell(), existing, index == IDX_NEW_MEMBER);
+			if (dialog.open() == Window.OK) {
+				fList.addElement(dialog.getResult());
+			}
+		} else if (index == IDX_EDIT) { // edit
+			List selected= fList.getSelectedElements();
+			if (selected.isEmpty())
+				return;
+
+			String editedEntry= (String)selected.get(0);
+
+			List existing= fList.getElements();
+			existing.remove(editedEntry);
+			boolean isType= editedEntry.endsWith(WILDCARD);
+			CallHierarchyTypesOrMembersDialog dialog= new CallHierarchyTypesOrMembersDialog(getShell(), existing, !isType);
+			if (isType)
+				dialog.setInitialSelection(editedEntry.substring(0, editedEntry.length() - 2));
+			else
+				dialog.setInitialSelection(editedEntry);
+
+			if (dialog.open() == Window.OK) {
+				fList.replaceElement(editedEntry, dialog.getResult());
+			}
+		} else if (index == IDX_RESTORE_DEFAULTS){
+			performDefaults();
+		}
+	}
+
+	/**
+	 * Update the key on dialog field change.
+	 *
+	 * @param field the dialog field
+	 */
+	protected final void doDialogFieldChanged(DialogField field) {
+		// set values in working copy
+		if (field == fList) {
+			setValue(DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS, serializeMembers(fList.getElements()));
+		}
+	}
+
+	/**
+	 * Returns the array of strings containing the types or methods for default expand with constructors.
+	 *
+	 * @return the array of strings containing the types or methods for default expand with constructors
+	 */
+	private String[] getDefaultExpandWithConstructorsMembers() {
+		String str= getValue(DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS);
+		if (str != null && str.length() > 0) {
+			return deserializeMembers(str);
+		}
+		return new String[0];
+	}
+
+	/**
+	 * Return the array of types and/or methods after splitting the stored preference string.
+	 *
+	 * @param str the input string
+	 * @return the array of types and/or methods
+	 */
+	private static String[] deserializeMembers(String str) {
+		return str.split(";"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Creates a single output string from the list of strings using a delimiter.
+	 * 
+	 * @param list the input list of types and/or methods
+	 * @return the single output string from the list of strings using a delimiter
+	 */
+	public static String serializeMembers(List list) {
+		int size= list.size();
+		StringBuffer buf= new StringBuffer();
+		for (int i= 0; i < size; i++) {
+			buf.append((String)list.get(i));
+			if (i < size - 1)
+				buf.append(';');
+		}
+		return buf.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsDialog.java
index 14397fc..36ad84d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/ExpandWithConstructorsDialog.java
@@ -10,45 +10,31 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.callhierarchy;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 
 import org.eclipse.core.runtime.IStatus;
 
-import org.eclipse.jface.dialogs.StatusDialog;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.TrayDialog;
 
 import org.eclipse.ui.PlatformUI;
 
-import org.eclipse.jdt.core.JavaConventions;
-import org.eclipse.jdt.core.JavaCore;
-
-import org.eclipse.jdt.internal.corext.util.Messages;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
+import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
 
 /**
  * Configuration dialog for default "Expand with Constructors" behavior.
  * 
  * @since 3.5
  */
-class ExpandWithConstructorsDialog extends StatusDialog {
+class ExpandWithConstructorsDialog extends TrayDialog {
 
-	private static final String LINE_DELIMITER_REGEX= "\\r\\n?|\\n"; //$NON-NLS-1$
+	private Control fConfigurationBlockControl;
+	private ExpandWithConstructorsConfigurationBlock fConfigurationBlock;
 
-	private Button fAnonymousButton;
-	private StyledText fDefaultTypesText;
-	
 	protected ExpandWithConstructorsDialog(Shell parentShell) {
 		super(parentShell);
 	}
@@ -66,49 +52,24 @@ class ExpandWithConstructorsDialog extends StatusDialog {
 	protected void configureShell(Shell newShell) {
 		super.configureShell(newShell);
 		newShell.setText(CallHierarchyMessages.ExpandWithConstructorsDialog_title);
-		setHelpAvailable(false);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.CALL_HIERARCHY_EXPAND_WITH_CONSTRUCTORS_DIALOG);
 	}
 
 	/*
 	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 	 */
-	protected Control createDialogArea(Composite parent) {
-		Composite composite= (Composite)super.createDialogArea(parent);
-		((GridData)composite.getLayoutData()).widthHint= convertWidthInCharsToPixels(60);
-		
-		Label descriptionLabel= new Label(composite, SWT.WRAP);
-		descriptionLabel.setText(CallHierarchyMessages.ExpandWithConstructorsDialog_explanation_label);
-		descriptionLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
-		
-		
-		Label typesLabel= new Label(composite, SWT.WRAP);
-		typesLabel.setText(CallHierarchyMessages.ExpandWithConstructorsDialog_typeNames_label);
-		typesLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
-		
-		fDefaultTypesText= new StyledText(composite, SWT.BORDER | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL);
-		GridData gd= new GridData(SWT.FILL, SWT.FILL, true, true);
-		gd.heightHint= convertHeightInCharsToPixels(10);
-		fDefaultTypesText.setLayoutData(gd);
-		
-		String defaultTypesPref= PreferenceConstants.getPreferenceStore().getString(CallHierarchyContentProvider.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS);
-		String defaultTypesText= defaultTypesPref.replace(';', '\n');
-		fDefaultTypesText.setText(defaultTypesText);
-		fDefaultTypesText.setSelection(fDefaultTypesText.getCharCount());
-		
-		fDefaultTypesText.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				validateInput();
+	protected Control createDialogArea(Composite composite) {
+		fConfigurationBlock= new ExpandWithConstructorsConfigurationBlock(new IStatusChangeListener() {
+			public void statusChanged(IStatus status) {
+				//Do nothing
+
 			}
-		});
-		
-		
-		fAnonymousButton= new Button(composite, SWT.CHECK);
-		fAnonymousButton.setText(CallHierarchyMessages.ExpandWithConstructorsDialog_anonymousTypes_label);
-		boolean anonymousPref= PreferenceConstants.getPreferenceStore().getBoolean(CallHierarchyContentProvider.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS);
-		fAnonymousButton.setSelection(anonymousPref);
-		fAnonymousButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
-		
+		}, null);
+		GridData data= new GridData(GridData.FILL, GridData.FILL, true, true);
+		fConfigurationBlockControl= fConfigurationBlock.createContents(composite);
+		fConfigurationBlockControl.setLayoutData(data);
+
+		Dialog.applyDialogFont(composite);
 		return composite;
 	}
 
@@ -116,31 +77,7 @@ class ExpandWithConstructorsDialog extends StatusDialog {
 	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 	 */
 	protected void okPressed() {
-		PreferenceConstants.getPreferenceStore().setValue(CallHierarchyContentProvider.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS, fAnonymousButton.getSelection());
-		
-		String defaultTypes= fDefaultTypesText.getText().trim();
-		String defaultTypesPref= defaultTypes.replaceAll(LINE_DELIMITER_REGEX, ";"); //$NON-NLS-1$
-		PreferenceConstants.getPreferenceStore().setValue(CallHierarchyContentProvider.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS, defaultTypesPref);
-		
+		fConfigurationBlock.performOk();
 		super.okPressed();
 	}
-
-	private void validateInput() {
-		StatusInfo status= new StatusInfo();
-		
-		String[] defaultTypes= fDefaultTypesText.getText().split(LINE_DELIMITER_REGEX);
-		for (int i= 0; i < defaultTypes.length; i++) {
-			String type= defaultTypes[i];
-			if (type.length() == 0)
-				continue;
-			
-			IStatus typeNameStatus= JavaConventions.validateJavaTypeName(type, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3);
-			if (typeNameStatus.getSeverity() == IStatus.ERROR) {
-				status.setError(Messages.format(CallHierarchyMessages.ExpandWithConstructorsDialog_not_a_valid_type_name, type));
-				break;
-			}
-		}
-		
-		updateStatus(status);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationCopyAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationCopyAction.java
index 1ee9f88..5849055 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationCopyAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationCopyAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@ class LocationCopyAction extends Action {
 
 		setText(CallHierarchyMessages.LocationCopyAction_copy);
 		setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
+		setEnabled(!fLocationViewer.getSelection().isEmpty());
 
 		locationViewer.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/OpenLocationAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/OpenLocationAction.java
index 20950f8..e64a619 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/OpenLocationAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/OpenLocationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,9 @@ import java.util.Iterator;
 
 import org.eclipse.jface.util.OpenStrategy;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
 
 import org.eclipse.ui.IWorkbenchSite;
 
@@ -30,9 +32,17 @@ class OpenLocationAction extends SelectionDispatchAction {
     public OpenLocationAction(CallHierarchyViewPart part, IWorkbenchSite site) {
         super(site);
         fPart= part;
+		LocationViewer viewer= fPart.getLocationViewer();
         setText(CallHierarchyMessages.OpenLocationAction_label);
         setToolTipText(CallHierarchyMessages.OpenLocationAction_tooltip);
-    }
+		setEnabled(!fPart.getSelection().isEmpty());
+
+		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				setEnabled(!event.getSelection().isEmpty());
+			}
+		});
+	}
 
     private boolean checkEnabled(IStructuredSelection selection) {
         if (selection.isEmpty()) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshAction.java
deleted file mode 100644
index 1da540e..0000000
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Jesper Kamstrup Linnet (eclipse at kamstrup-linnet.dk) - initial API and implementation
- * 			(report 36180: Callers/Callees view)
- *******************************************************************************/
-package org.eclipse.jdt.internal.ui.callhierarchy;
-
-import org.eclipse.jface.action.Action;
-
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.PlatformUI;
-
-import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-
-class RefreshAction extends Action {
-    private CallHierarchyViewPart fPart;
-
-	public RefreshAction(CallHierarchyViewPart part) {
-		fPart= part;
-		setText(CallHierarchyMessages.RefreshAction_text);
-		setToolTipText(CallHierarchyMessages.RefreshAction_tooltip);
-		JavaPluginImages.setLocalImageDescriptors(this, "refresh_nav.gif");//$NON-NLS-1$
-		setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REFRESH_ACTION);
-	}
-
-    /**
-     * @see org.eclipse.jface.action.Action#run()
-     */
-    public void run() {
-        fPart.refresh();
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshElementAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshElementAction.java
new file mode 100644
index 0000000..5aa85c9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshElementAction.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.callhierarchy;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+
+import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+
+/**
+ * Action class to refresh a single element in the call hierarchy.
+ *
+ *@since 3.6
+ */
+public class RefreshElementAction extends Action {
+
+	/**
+	 * The call hierarchy viewer.
+	 */
+	private final CallHierarchyViewer fViewer;
+
+	/**
+	 * Creates the action to refresh a single element in the call hierarchy.
+	 *
+	 * @param part the call hierarchy view part
+	 * @param viewer the call hierarchy viewer
+	 */
+	public RefreshElementAction(CallHierarchyViewer viewer) {
+		fViewer= viewer;
+		setText(CallHierarchyMessages.RefreshSingleElementAction_text);
+		setToolTipText(CallHierarchyMessages.RefreshSingleElementAction_tooltip);
+		setDescription(CallHierarchyMessages.RefreshSingleElementAction_description);
+		JavaPluginImages.setLocalImageDescriptors(this, "refresh_nav.gif");//$NON-NLS-1$
+		setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REFRESH_SINGLE_ELEMENT_ACTION);
+		setEnabled(!fViewer.getSelection().isEmpty());
+
+		fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				setEnabled(!fViewer.getSelection().isEmpty());
+			}
+		});
+	}
+
+	/**
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	public void run() {
+		IStructuredSelection selection= (IStructuredSelection)getSelection();
+		List toExpand= new ArrayList();
+		for (Iterator iter= selection.iterator(); iter.hasNext();) {
+			MethodWrapper element= (MethodWrapper)iter.next();
+			boolean isExpanded= fViewer.getExpandedState(element);
+			element.removeFromCache();
+			if (isExpanded) {
+				fViewer.setExpandedState(element, false);
+				toExpand.add(element);
+			}
+			fViewer.refresh(element);
+		}
+		for (Iterator iter= toExpand.iterator(); iter.hasNext();) {
+			MethodWrapper elem= (MethodWrapper)iter.next();
+			fViewer.setExpandedState(elem, true);
+		}
+	}
+
+	/**
+	 * Gets the selection from the call hierarchy view part.
+	 *
+	 * @return the current selection
+	 */
+	private ISelection getSelection() {
+		return fViewer.getSelection();
+	}
+
+	/**
+	 * Returns <code>true</code> if the action can be added to the menu, <code>false</code>
+	 * otherwise.
+	 * 
+	 * @return <code>true</code> if the action can be added to the menu, <code>false</code> otherwise
+	 * @since 3.6
+	 */
+	protected boolean canActionBeAdded() {
+		return fViewer.getSelection().isEmpty() ? false : true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshViewAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshViewAction.java
new file mode 100644
index 0000000..5ead305
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RefreshViewAction.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Jesper Kamstrup Linnet (eclipse at kamstrup-linnet.dk) - initial API and implementation
+ * 			(report 36180: Callers/Callees view)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.callhierarchy;
+
+import org.eclipse.jface.action.Action;
+
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
+
+class RefreshViewAction extends Action {
+    private CallHierarchyViewPart fPart;
+
+	public RefreshViewAction(CallHierarchyViewPart part) {
+		fPart= part;
+		setText(CallHierarchyMessages.RefreshViewAction_text);
+		setToolTipText(CallHierarchyMessages.RefreshViewAction_tooltip);
+		JavaPluginImages.setLocalImageDescriptors(this, "refresh_nav.gif");//$NON-NLS-1$
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REFRESH_VIEW_ACTION);
+		setEnabled(false);
+	}
+
+    /**
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run() {
+        fPart.refresh();
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RemoveFromViewAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RemoveFromViewAction.java
new file mode 100644
index 0000000..ad33fa5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/RemoveFromViewAction.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.callhierarchy;
+
+import java.util.Iterator;
+
+import org.eclipse.swt.widgets.TreeItem;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+
+
+/**
+ * This action removes a single node from the Call Hierarchy view.
+ * 
+ * @since 3.6
+ */
+class RemoveFromViewAction extends Action{
+
+
+	/**
+	 * The Call Hierarchy view part.
+	 */
+	private CallHierarchyViewPart fPart;
+
+	/**
+	 * The Call Hierarchy viewer.
+	 */
+	private CallHierarchyViewer fCallHierarchyViewer;
+
+	/**
+	 * Creates the hide single node action.
+	 *
+	 * @param part the call hierarchy view part
+	 * @param viewer the call hierarchy viewer
+	 */
+	public RemoveFromViewAction(CallHierarchyViewPart part, CallHierarchyViewer viewer) {
+		fPart= part;
+		fCallHierarchyViewer= viewer;
+		setText(CallHierarchyMessages.RemoveFromViewAction_removeFromView_text);
+		setDescription(CallHierarchyMessages.RemoveFromViewAction_removeFromView_description);
+		setToolTipText(CallHierarchyMessages.RemoveFromViewAction_removeFromView_tooltip);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REMOVE_FROM_VIEW_ACTION);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.action.Action#run()
+	 */
+	public void run() {
+		TreeItem[] items= fCallHierarchyViewer.getTree().getSelection();
+		for (int i= 0; i < items.length; i++)
+			items[i].dispose();
+	}
+
+	/**
+	 * Gets the selection from the call hierarchy view part.
+	 * 
+	 * @return the current selection
+	 */
+	private ISelection getSelection() {
+		return fPart.getSelection();
+	}
+
+	/**
+	 * Checks whether this action can be added for the selected element in the call hierarchy.
+	 * 
+	 * @return <code> true</code> if the action can be added, <code>false</code> otherwise
+	 */
+	protected boolean canActionBeAdded() {
+		IStructuredSelection selection= (IStructuredSelection)getSelection();
+		if (selection.isEmpty())
+			return false;
+
+		Iterator iter= selection.iterator();
+		while (iter.hasNext()) {
+			Object element= iter.next();
+			if (!(element instanceof MethodWrapper))//takes care of '...' node
+				return false;
+		}
+
+		TreeItem[] items= fCallHierarchyViewer.getTree().getSelection();
+		for (int k= 0; k < items.length; k++) {
+			if (!checkForChildren(items[k]))
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Checks whether the children are being fetched for a node recursively.
+	 * 
+	 * @param item the parent node
+	 * @return <code>false</code> when children are currently being fetched for a node,
+	 *         <code>true</code> otherwise
+	 */
+	private boolean checkForChildren(TreeItem item) {
+		TreeItem[] children= item.getItems();
+		if (children.length == 1) {
+			Object data= children[0].getData();
+			if (!(data instanceof MethodWrapper) && data != null)
+				return false; // Do not add action if children are still being fetched for that node or if it's only JFace's dummy node.
+		}
+		for (int i= 0; i < children.length; i++) {
+			if (!checkForChildren(children[i]))
+				return false;
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.java
index 38925e3..a709ff3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,6 @@ public final class CompareMessages extends NLS {
 	public static String JavaNode_importDeclarations;
 	public static String JavaNode_initializer;
 	public static String JavaNode_packageDeclaration;
-	public static String PropertiesStructureCreator_error_occurred;
 	public static String PropertyCompareViewer_title;
 	public static String PropertyCompareViewer_malformedEncoding;
 	public static String CompareWithHistory_title;
@@ -43,7 +42,6 @@ public final class CompareMessages extends NLS {
 	public static String AddFromHistory_title;
 	public static String AddFromHistory_internalErrorMessage;
 	public static String AddFromHistory_invalidSelectionMessage;
-	public static String AddFromHistory_noHistoryMessage;
 	public static String Editor_Buffer;
 	public static String Workspace_File;
 	public static String LocalHistoryActionGroup_menu_local_history;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.properties
index fd4770d..218f111 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/CompareMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
 ###############################################################################
 
 #
-# Title of Jar file structure ceator (shown in diff structure viewer)
+# Title of Jar file structure creator (shown in diff structure viewer)
 #
 JarStructureCreator_name= Jar Archive Compare
 
@@ -25,7 +25,7 @@ JavaMergeViewer_title= Java Source Compare
 PropertiesFileMergeViewer_title= Java Properties Compare
 
 #
-# Title of Java structure ceator (shown in diff structure viewer)
+# Title of Java structure creator (shown in diff structure viewer)
 #
 JavaStructureViewer_title= Java Structure Compare
 JavaNode_compilationUnit= Compilation Unit
@@ -38,7 +38,6 @@ JavaNode_packageDeclaration= Package Declaration
 #
 PropertyCompareViewer_title= Property Compare
 PropertyCompareViewer_malformedEncoding=Malformed encoding.
-PropertiesStructureCreator_error_occurred=An error occurred while creating the input structure.
 
 #
 # Compare with Local History action
@@ -61,7 +60,6 @@ ReplaceFromHistory_parsingErrorMessage= Could not parse previous entry in local
 AddFromHistory_title= Restore from Local History
 AddFromHistory_internalErrorMessage= Internal error.
 AddFromHistory_invalidSelectionMessage= Selection is no longer valid.
-AddFromHistory_noHistoryMessage= No local history available for selected compilation unit.
 
 #
 # Title of left pane in Compare/Replace/Restore from local History dialog
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryActionImpl.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryActionImpl.java
index 6ead69d..746f2ae 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryActionImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaHistoryActionImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,10 +63,10 @@ import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java
index 2d8a2bb..e86b1ee 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaMergeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
@@ -55,6 +56,7 @@ import org.eclipse.ui.texteditor.AbstractTextEditor;
 import org.eclipse.ui.texteditor.ChainedPreferenceStore;
 import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.eclipse.ui.texteditor.ITextEditorExtension3;
 
 import org.eclipse.ui.editors.text.EditorsUI;
 
@@ -89,6 +91,8 @@ public class JavaMergeViewer extends TextMergeViewer {
 	private Map /*<CompilationUnitEditorAdapter>*/ fEditor;
 	private ArrayList /*<SourceViewer>*/ fSourceViewer;
 
+	private IWorkbenchPartSite fSite;
+
 
 	public JavaMergeViewer(Composite parent, int styles, CompareConfiguration mp) {
 		super(parent, styles | SWT.LEFT_TO_RIGHT, mp);
@@ -110,6 +114,7 @@ public class JavaMergeViewer extends TextMergeViewer {
 			}
 			fEditor= null;
 		}
+		fSite= null;
 		super.handleDispose(event);
 	}
 
@@ -165,13 +170,15 @@ public class JavaMergeViewer extends TextMergeViewer {
 
 	private void handlePropertyChange(PropertyChangeEvent event) {
 		if (fSourceViewerConfiguration != null) {
-			for (Iterator iterator= fSourceViewerConfiguration.values().iterator(); iterator.hasNext();) {
-				JavaSourceViewerConfiguration configuration= (JavaSourceViewerConfiguration)iterator.next();
+			for (Iterator iterator= fSourceViewerConfiguration.entrySet().iterator(); iterator.hasNext();) {
+				Entry entry= (Entry)iterator.next();
+				JavaSourceViewerConfiguration configuration= (JavaSourceViewerConfiguration)entry.getValue();
 				if (configuration.affectsTextPresentation(event)) {
 					configuration.handlePropertyChangeEvent(event);
+					ITextViewer viewer= (ITextViewer)entry.getKey();
+					viewer.invalidateTextPresentation();
 				}
 			}
-			invalidateTextPresentation();
 		}
 	}
 
@@ -249,8 +256,11 @@ public class JavaMergeViewer extends TextMergeViewer {
 	}
 
 	private IWorkbenchPartSite getSite() {
-		IWorkbenchPart workbenchPart= getCompareConfiguration().getContainer().getWorkbenchPart();
-		return workbenchPart != null ? workbenchPart.getSite() : null;
+		if (fSite == null) {
+			IWorkbenchPart workbenchPart= getCompareConfiguration().getContainer().getWorkbenchPart();
+			fSite= workbenchPart != null ? workbenchPart.getSite() : null;
+		}
+		return fSite;
 	}
 
 	private JavaSourceViewerConfiguration getSourceViewerConfiguration(SourceViewer sourceViewer, IEditorInput editorInput) {
@@ -516,6 +526,21 @@ public class JavaMergeViewer extends TextMergeViewer {
 		}
 	}
 	
+	public Object getAdapter(Class adapter) {
+		if (adapter == ITextEditorExtension3.class) {
+			IEditorInput activeInput= (IEditorInput)super.getAdapter(IEditorInput.class);
+			if (activeInput != null) {
+				for (Iterator iterator= fEditor.values().iterator(); iterator.hasNext();) {
+					CompilationUnitEditorAdapter editor= (CompilationUnitEditorAdapter)iterator.next();
+					if (activeInput.equals(editor.getEditorInput()))
+						return editor;
+				}
+			}
+			return null;
+		}
+		return super.getAdapter(adapter);
+	}
+
 	private class CompilationUnitEditorAdapter extends CompilationUnitEditor {
 		private boolean fInputSet = false;
 		private int fTextOrientation;
@@ -545,7 +570,7 @@ public class JavaMergeViewer extends TextMergeViewer {
 			// else do nothing, we will create actions later, when input is available
 		}
 		public void createPartControl(Composite composite) {
-			SourceViewer sourceViewer= createJavaSourceViewer(composite, new CompositeRuler(), null, false, fTextOrientation | SWT.H_SCROLL | SWT.V_SCROLL, createChainedPreferenceStore(null));
+			SourceViewer sourceViewer= (SourceViewer)createJavaSourceViewer(composite, new CompositeRuler(), null, false, fTextOrientation | SWT.H_SCROLL | SWT.V_SCROLL, createChainedPreferenceStore(null));
 			setSourceViewer(this, sourceViewer);
 			getSelectionProvider().addSelectionChangedListener(getSelectionChangedListener());
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionActionImpl.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionActionImpl.java
index 8f18591..190ed5c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionActionImpl.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaReplaceWithEditionActionImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,16 +47,16 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
 import org.eclipse.jdt.core.dom.BodyDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Resources;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureDiffViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureDiffViewer.java
index 7fffba8..2f4c7d7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureDiffViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/compare/JavaStructureDiffViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,8 @@ import org.eclipse.jdt.core.JavaCore;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
-// XXX: StructuredDiffViewer should allow subclassing, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=258907
+
+// XXX: StructuredDiffViewer should allow subclassing, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=258907
 class JavaStructureDiffViewer extends StructureDiffViewer implements IElementChangedListener {
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java
index d6d7d99..47dbc69 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,6 +74,7 @@ import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
 import org.eclipse.ui.dialogs.ISelectionStatusValidator;
 import org.eclipse.ui.dialogs.PreferencesUtil;
 
+import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaConventions;
@@ -605,7 +606,7 @@ public class FilteredTypesSelectionDialog extends FilteredItemsSelectionDialog i
 			Object[] elements= { type };
 			return fValidator.validate(elements);
 		} else
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 	}
 
 	/**
@@ -1385,6 +1386,11 @@ public class FilteredTypesSelectionDialog extends FilteredItemsSelectionDialog i
 			int result= compareName(leftInfo.getSimpleTypeName(), rightInfo.getSimpleTypeName());
 			if (result != 0)
 				return result;
+			
+			result= compareDeprecation(leftInfo.getModifiers(), rightInfo.getModifiers());
+			if (result != 0)
+				return result;
+			
 			result= compareTypeContainerName(leftInfo.getTypeContainerName(), rightInfo.getTypeContainerName());
 			if (result != 0)
 				return result;
@@ -1410,6 +1416,13 @@ public class FilteredTypesSelectionDialog extends FilteredItemsSelectionDialog i
 				return leftString.compareTo(rightString);
 			}
 		}
+		
+		private int compareDeprecation(int leftType, int rightType) {
+			boolean rightIsDeprecated= Flags.isDeprecated(rightType);
+			if (Flags.isDeprecated(leftType))
+				return rightIsDeprecated ? 0 : +1;
+			return rightIsDeprecated ? -1 : 0;
+		}
 
 		private int compareTypeContainerName(String leftString, String rightString) {
 			int leftLength= leftString.length();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateToStringDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateToStringDialog.java
index 3adc775..bed5668 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateToStringDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/GenerateToStringDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Mateusz Matela and others.
+ * Copyright (c) 2008, 2009 Mateusz Matela and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,14 +9,18 @@
  *     Mateusz Matela <mateusz.matela at gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
  *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] Template edit dialog has usability issues - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267916
  *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
+ *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] toString() generator: Fields in declaration order - https://bugs.eclipse.org/bugs/show_bug.cgi?id=279924
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.dialogs;
 
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Comparator;
 import java.util.List;
 
+import com.ibm.icu.text.Collator;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -70,6 +74,7 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.search.IJavaSearchScope;
@@ -199,6 +204,19 @@ public class GenerateToStringDialog extends SourceActionDialog {
 			tree.refresh();
 		}
 
+		public void sort() {
+			Comparator comparator= new Comparator() {
+				Collator collator= Collator.getInstance();
+				public int compare(Object o1, Object o2) {
+					return collator.compare(((IBinding)o1).getName(), ((IBinding)o2).getName());
+				}
+			};
+			Arrays.sort(fFields, comparator);
+			Arrays.sort(fMethods, comparator);
+			Arrays.sort(fInheritedFields, comparator);
+			Arrays.sort(fInheritedMethods, comparator);
+		}
+
 		/*
 		 * (non-Javadoc)
 		 * 
@@ -1127,6 +1145,8 @@ public class GenerateToStringDialog extends SourceActionDialog {
 	private static final int DOWN_BUTTON= IDialogConstants.CLIENT_ID + 2;
 
 	private static final int UP_BUTTON= IDialogConstants.CLIENT_ID + 1;
+	
+	private static final int SORT_BUTTON= IDialogConstants.CLIENT_ID + 3;
 
 	protected Button[] fButtonControls;
 
@@ -1274,6 +1294,8 @@ public class GenerateToStringDialog extends SourceActionDialog {
 		buttonComposite.setLayout(layout);
 
 		createUpDownButtons(buttonComposite);
+		
+		createButton(buttonComposite, SORT_BUTTON, JavaUIMessages.GenerateToStringDialog_sort_button, false);
 
 		layout.marginHeight= 0;
 		layout.marginWidth= 0;
@@ -1301,6 +1323,13 @@ public class GenerateToStringDialog extends SourceActionDialog {
 				updateOKStatus();
 				break;
 			}
+			case SORT_BUTTON: {
+				GenerateToStringContentProvider contentProvider= (GenerateToStringContentProvider)getTreeViewer().getContentProvider();
+				contentProvider.sort();
+				getTreeViewer().refresh();
+				updateOKStatus();
+				break;
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dnd/ResourceTransferDragAdapter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dnd/ResourceTransferDragAdapter.java
index fd10b97..f7edbfa 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dnd/ResourceTransferDragAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dnd/ResourceTransferDragAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,8 @@ import org.eclipse.ui.part.ResourceTransfer;
 
 import org.eclipse.jdt.core.IJavaElement;
 
+import org.eclipse.jdt.internal.corext.util.Messages;
+
 import org.eclipse.jdt.internal.ui.IJavaStatusConstants;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
@@ -124,12 +126,13 @@ public class ResourceTransferDragAdapter extends DragSourceAdapter implements Tr
 				status.add(e.getStatus());
 			}
 		}
-		if (status.getChildren().length > 0) {
+		int childrenCount= status.getChildren().length;
+		if (childrenCount > 0) {
 			Shell parent= SWTUtil.getShell(event.widget);
 			ErrorDialog error= new ErrorDialog(parent,
-				JavaUIMessages.ResourceTransferDragAdapter_moving_resource,
-				JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files,
-				status, IStatus.ERROR);
+					JavaUIMessages.ResourceTransferDragAdapter_moving_resource,
+					childrenCount == 1 ? JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_singular : Messages.format(
+							JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_plural, String.valueOf(childrenCount)), status, IStatus.ERROR);
 			error.open();
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.java
index 18fe8e2..7f94694 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,6 @@ public final class FilterMessages extends NLS {
 	public static String CustomFiltersDialog_name_filter_pattern_description;
 	public static String OpenCustomFiltersDialogAction_text;
 	public static String FilterDescriptor_filterDescriptionCreationError_message;
-	public static String FilterDescriptor_filterCreationError_title;
 	public static String FilterDescriptor_filterCreationError_message;
 
 	static {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.properties
index e9d0556..d259bba 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/FilterMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,5 +21,4 @@ CustomFiltersDialog_name_filter_pattern_description=Name filter patterns. The pa
 OpenCustomFiltersDialogAction_text= &Filters...
 
 FilterDescriptor_filterDescriptionCreationError_message= One of the extensions for extension-point org.eclipse.jdt.ui.javaElementFilters is incorrect.
-FilterDescriptor_filterCreationError_title= Filter Creation Error
 FilterDescriptor_filterCreationError_message= The org.eclipse.jdt.ui.javaElementFilters plug-in extension "{0}" specifies a viewer filter class which does not exist.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/InnerClassFilesFilter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/InnerClassFilesFilter.java
index 937757b..618beb3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/InnerClassFilesFilter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/InnerClassFilesFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.jface.viewers.ViewerFilter;
 
 import org.eclipse.jdt.core.IClassFile;
 
+
 public class InnerClassFilesFilter extends ViewerFilter {
 
 	public InnerClassFilesFilter() {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/AbstractCleanUp.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/AbstractCleanUp.java
index 2584a7f..75db6ca 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/AbstractCleanUp.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/AbstractCleanUp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,6 @@ public abstract class AbstractCleanUp implements ICleanUp {
 	 */
 	public void setOptions(CleanUpOptions options) {
 		Assert.isLegal(options != null);
-		Assert.isTrue(fOptions == null);
 		fOptions= options;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java
index 19eb7b8..b509088 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ import org.eclipse.jdt.ui.cleanup.CleanUpRequirements;
 import org.eclipse.jdt.ui.cleanup.ICleanUpFix;
 import org.eclipse.jdt.ui.text.java.IProblemLocation;
 
+
 /**
  * Create fixes which can transform pre Java50 code to Java50 code
  * @see org.eclipse.jdt.internal.corext.fix.Java50Fix
@@ -66,8 +67,10 @@ public class Java50CleanUp extends AbstractMultiFix {
 	 */
 	protected ICleanUpFix createFix(CompilationUnit compilationUnit) throws CoreException {
 		boolean addAnotations= isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS);
+		boolean addOverride= isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE);
 		return Java50Fix.createCleanUp(compilationUnit,
-				addAnotations && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE),
+				addAnotations && addOverride,
+				addAnotations && addOverride && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION),
 				addAnotations && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED),
 				isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES));
 	}
@@ -79,16 +82,23 @@ public class Java50CleanUp extends AbstractMultiFix {
 		if (compilationUnit == null)
 			return null;
 
+		boolean addAnnotations= isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS);
+		boolean addOverride= isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE);
 		return Java50Fix.createCleanUp(compilationUnit, problems,
-				isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE),
-				isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED),
+				addAnnotations && addOverride,
+				addAnnotations && addOverride && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION),
+				addAnnotations && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED),
 				isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES));
 	}
 
 	private Map getRequiredOptions() {
 		Map result= new Hashtable();
-		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE))
+		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) {
 			result.put(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION, JavaCore.WARNING);
+			if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION)) {
+				result.put(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION, JavaCore.ENABLED);
+			}
+		}
 
 		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED))
 			result.put(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION, JavaCore.WARNING);
@@ -104,8 +114,12 @@ public class Java50CleanUp extends AbstractMultiFix {
 	 */
 	public String[] getStepDescriptions() {
 		List result= new ArrayList();
-		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE))
+		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) {
 			result.add(MultiFixMessages.Java50MultiFix_AddMissingOverride_description);
+			if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION)) {
+				result.add(MultiFixMessages.Java50MultiFix_AddMissingOverride_description2);
+			}
+		}
 		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED))
 			result.add(MultiFixMessages.Java50MultiFix_AddMissingDeprecated_description);
 		if (isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES))
@@ -128,11 +142,17 @@ public class Java50CleanUp extends AbstractMultiFix {
 		}
 		buf.append("    public void foo() {}\n"); //$NON-NLS-1$
 		buf.append("}\n"); //$NON-NLS-1$
-		buf.append("class ESub extends E {\n"); //$NON-NLS-1$
+		buf.append("class ESub extends E implements Runnable {\n"); //$NON-NLS-1$
 		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) {
 			buf.append("    @Override\n"); //$NON-NLS-1$
 		}
 		buf.append("    public void foo() {}\n"); //$NON-NLS-1$
+		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS)
+				&& isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)
+				&& isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION)) {
+			buf.append("    @Override\n"); //$NON-NLS-1$
+		}
+		buf.append("    public void run() {}\n"); //$NON-NLS-1$
 		buf.append("}\n"); //$NON-NLS-1$
 
 		return buf.toString();
@@ -142,14 +162,19 @@ public class Java50CleanUp extends AbstractMultiFix {
 	 * {@inheritDoc}
 	 */
 	public boolean canFix(ICompilationUnit compilationUnit, IProblemLocation problem) {
-		if (problem.getProblemId() == IProblem.MissingOverrideAnnotation)
-			return isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE);
-
-		if (Java50Fix.isMissingDeprecationProblem(problem))
+		int id= problem.getProblemId();
+		
+		if (Java50Fix.isMissingOverrideAnnotationProblem(id)) {
+			if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) {
+				return ! Java50Fix.isMissingOverrideAnnotationInterfaceProblem(id) || isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION);
+			}
+			
+		} else if (Java50Fix.isMissingDeprecationProblem(id)) {
 			return isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED);
-
-		if (Java50Fix.isRawTypeReference(problem))
+			
+		} else if (Java50Fix.isRawTypeReferenceProblem(id)) {
 			return isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES);
+		}
 
 		return false;
 	}
@@ -159,23 +184,23 @@ public class Java50CleanUp extends AbstractMultiFix {
 	 */
 	public int computeNumberOfFixes(CompilationUnit compilationUnit) {
 		int result= 0;
+		
+		boolean addAnnotations= isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS);
+		boolean addMissingOverride= addAnnotations && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE);
+		boolean addMissingOverrideInterfaceMethods= addMissingOverride && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION);
+		boolean addMissingDeprecated= addAnnotations && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED);
+		boolean useTypeArgs= isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES);
+		
 		IProblem[] problems= compilationUnit.getProblems();
-		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE)) {
-			result+= getNumberOfProblems(problems, IProblem.MissingOverrideAnnotation);
-		}
-		if (isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS) && isEnabled(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED)) {
-			for (int i=0;i<problems.length;i++) {
-				int id= problems[i].getID();
-				if (id == IProblem.FieldMissingDeprecatedAnnotation || id == IProblem.MethodMissingDeprecatedAnnotation || id == IProblem.TypeMissingDeprecatedAnnotation)
+		for (int i= 0; i < problems.length; i++) {
+			int id= problems[i].getID();
+			if (addMissingOverride && Java50Fix.isMissingOverrideAnnotationProblem(id))
+				if (! Java50Fix.isMissingOverrideAnnotationInterfaceProblem(id) || addMissingOverrideInterfaceMethods)
 					result++;
-			}
-		}
-		if (isEnabled(CleanUpConstants.VARIABLE_DECLARATION_USE_TYPE_ARGUMENTS_FOR_RAW_TYPE_REFERENCES)) {
-			for (int i=0;i<problems.length;i++) {
-				int id= problems[i].getID();
-				if (id == IProblem.UnsafeTypeConversion || id == IProblem.RawTypeReference || id == IProblem.UnsafeRawMethodInvocation)
-					result++;
-			}
+			if (addMissingDeprecated && Java50Fix.isMissingDeprecationProblem(id))
+				result++;
+			if (useTypeArgs && Java50Fix.isRawTypeReferenceProblem(id))
+				result++;
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.java
index 4b40ed5..abca470 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.ui.fix;
 
 import org.eclipse.osgi.util.NLS;
 
+
 public class MultiFixMessages extends NLS {
 	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.fix.MultiFixMessages"; //$NON-NLS-1$
 
@@ -22,27 +23,18 @@ public class MultiFixMessages extends NLS {
 	public static String CleanUpRefactoringWizard_CleaningUpN1_Title;
 	public static String CleanUpRefactoringWizard_CleaningUpNN_Title;
 	public static String CleanUpRefactoringWizard_CleanUpConfigurationPage_title;
-	public static String CleanUpRefactoringWizard_code_organizing_tab;
-	public static String CleanUpRefactoringWizard_code_style_tab;
 	public static String CleanUpRefactoringWizard_Configure_Button;
 	public static String CleanUpRefactoringWizard_ConfigureCustomProfile_button;
 	public static String CleanUpRefactoringWizard_CustomCleanUpsDialog_title;
 	public static String CleanUpRefactoringWizard_EmptySelection_message;
 	public static String CleanUpRefactoringWizard_HideWizard_Link;
-	public static String CleanUpRefactoringWizard_member_accesses_tab;
-	public static String CleanUpRefactoringWizard_missing_code_tab;
 	public static String CleanUpRefactoringWizard_Profile_TableHeader;
 	public static String CleanUpRefactoringWizard_Project_TableHeader;
 	public static String CleanUpRefactoringWizard_unknownProfile_Name;
 	public static String CleanUpRefactoringWizard_UnmanagedProfileWithName_Name;
-	public static String CleanUpRefactoringWizard_unnecessary_code_tab;
 	public static String CleanUpRefactoringWizard_use_configured_radio;
 	public static String CleanUpRefactoringWizard_use_custom_radio;
 	public static String CleanUpRefactoringWizard_XofYCleanUpsSelected_message;
-	public static String CleanUpSaveParticipantPreferenceConfiguration_clean_up_preference_link;
-	public static String CleanUpSaveParticipantPreferenceConfiguration_edit_button_label;
-	public static String CleanUpSaveParticipantPreferenceConfiguration_unknown_profile_name;
-	public static String CleanUpSaveParticipantPreferenceConfiguration_use_clean_up_profile_label;
 	public static String CodeFormatCleanUp_correctIndentation_description;
 	public static String CodeFormatCleanUp_RemoveTrailingAll_description;
 	public static String CodeFormatCleanUp_RemoveTrailingNoEmpty_description;
@@ -76,6 +68,7 @@ public class MultiFixMessages extends NLS {
 
 	public static String Java50MultiFix_AddMissingDeprecated_description;
 	public static String Java50MultiFix_AddMissingOverride_description;
+	public static String Java50MultiFix_AddMissingOverride_description2;
 	public static String Java50CleanUp_ConvertToEnhancedForLoop_description;
 	public static String Java50CleanUp_AddTypeParameters_description;
 
@@ -101,11 +94,6 @@ public class MultiFixMessages extends NLS {
 	public static String CodeFormatCleanUp_description;
 	public static String CodeFormatFix_description;
 
-	public static String CommentFormatCleanUp_javadocComments;
-	public static String CommentFormatCleanUp_multiLineComments;
-	public static String CommentFormatCleanUp_singleLineComments;
-	public static String CommentFormatFix_description;
-
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, MultiFixMessages.class);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.properties
index b88fc5b..c8fbb38 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/MultiFixMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
+# Copyright (c) 2005, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -45,20 +45,16 @@ Java50MultiFix_AddMissingDeprecated_description=Add missing '@Deprecated' annota
 Java50CleanUp_ConvertToEnhancedForLoop_description=Convert for loops to enhanced for loops
 Java50CleanUp_AddTypeParameters_description=Add type arguments to raw type references
 Java50MultiFix_AddMissingOverride_description=Add missing '@Override' annotations
+Java50MultiFix_AddMissingOverride_description2=Add missing '@Override' annotations to implementations of interface methods
 SerialVersionCleanUp_Generated_description=Add missing serial version ID (generated)
 
 CleanUpRefactoringWizard_unknownProfile_Name=Unknown
 CleanUpRefactoringWizard_use_configured_radio=&Use configured profiles
-CleanUpRefactoringWizard_unnecessary_code_tab=U&nnecessary Code
 CleanUpRefactoringWizard_EmptySelection_message=Select at least one clean up.
 CleanUpRefactoringWizard_Project_TableHeader=Project
 CleanUpRefactoringWizard_Profile_TableHeader=Profile
-CleanUpRefactoringWizard_member_accesses_tab=Membe&r Accesses
-CleanUpRefactoringWizard_code_organizing_tab=Code &Organizing
 CleanUpRefactoringWizard_Configure_Button=Confi&gure...
 CleanUpRefactoringWizard_use_custom_radio=Use custom &profile
-CleanUpRefactoringWizard_code_style_tab=&Code Style
-CleanUpRefactoringWizard_missing_code_tab=&Missing Code
 CleanUpRefactoringWizard_HideWizard_Link=Go to the <a>Clean Up</a> preference page to hide this wizard in the future
 CleanUpRefactoringWizard_CleaningUp11_Title=Cleaning up 1 file in 1 project
 CleanUpRefactoringWizard_CleaningUpN1_Title=Cleaning up {0} files in 1 project
@@ -78,19 +74,9 @@ CleanUpRefactoringWizard_ConfigureCustomProfile_button=Confi&gure...
 CleanUpRefactoringWizard_XofYCleanUpsSelected_message={0} of {1} clean ups selected
 CleanUpRefactoringWizard_CustomCleanUpsDialog_title=Custom Clean Ups
 
-CommentFormatFix_description=Format comment
-
-CommentFormatCleanUp_multiLineComments=Format multi line comments
-CommentFormatCleanUp_javadocComments=Format Javadoc comments
-CommentFormatCleanUp_singleLineComments=Format single line comments
-
 CodeFormatFix_description=Format code
 CodeFormatCleanUp_description=Format source code
 ImportsCleanUp_OrganizeImports_Description=Organize imports
-CleanUpSaveParticipantPreferenceConfiguration_clean_up_preference_link=The Clean Up profiles can be managed on the <a>Clean Up</a> preference page.
-CleanUpSaveParticipantPreferenceConfiguration_use_clean_up_profile_label=Use Clean &Up profile:
-CleanUpSaveParticipantPreferenceConfiguration_unknown_profile_name=unknown
-CleanUpSaveParticipantPreferenceConfiguration_edit_button_label=&Edit...
 SortMembersCleanUp_AllMembers_description=Sort all members
 SortMembersCleanUp_Excluding_description=Sort members excluding fields, enum constants, and initializers
 SortMembersCleanUp_RemoveMarkersWarning0=The file ''{0}'' in project ''{1}'' contains markers which may be removed by Sort Members
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/PotentialProgrammingProblemsCleanUp.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/PotentialProgrammingProblemsCleanUp.java
index 315db3f..3be5f5b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/PotentialProgrammingProblemsCleanUp.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/PotentialProgrammingProblemsCleanUp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -115,7 +115,7 @@ public class PotentialProgrammingProblemsCleanUp extends AbstractMultiFix {
 	public String getPreview() {
 		StringBuffer buf= new StringBuffer();
 
-		buf.append("class E implements java.io.Serializable{\n"); //$NON-NLS-1$
+		buf.append("class E implements java.io.Serializable {\n"); //$NON-NLS-1$
 		if ((isEnabled(CleanUpConstants.ADD_MISSING_SERIAL_VERSION_ID) && isEnabled(CleanUpConstants.ADD_MISSING_SERIAL_VERSION_ID_GENERATED))) {
 			buf.append("    private static final long serialVersionUID = -391484377137870342L;\n"); //$NON-NLS-1$
 		} else if ((isEnabled(CleanUpConstants.ADD_MISSING_SERIAL_VERSION_ID) && isEnabled(CleanUpConstants.ADD_MISSING_SERIAL_VERSION_ID_DEFAULT))) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.java
index ae49b31..afd234a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,13 +15,7 @@ import org.eclipse.osgi.util.NLS;
 public class SaveParticipantMessages extends NLS {
 	private static final String BUNDLE_NAME= "org.eclipse.jdt.internal.ui.fix.SaveParticipantMessages"; //$NON-NLS-1$
 
-	public static String CleanUpSaveParticipantConfigurationModifyDialog_CodeOrganizing_TabPage;
-	public static String CleanUpSaveParticipantConfigurationModifyDialog_CodeStyle_TabPage;
-	public static String CleanUpSaveParticipantConfigurationModifyDialog_MemberAccesses_TabPage;
-	public static String CleanUpSaveParticipantConfigurationModifyDialog_MissingCode_TabPage;
-
 	public static String CleanUpSaveParticipantConfigurationModifyDialog_SelectAnAction_Error;
-	public static String CleanUpSaveParticipantConfigurationModifyDialog_UnnecessaryCode_TabPage;
 
 	public static String CleanUpSaveParticipantConfigurationModifyDialog_XofYSelected_Label;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.properties
index e2ebc0e..8c18468 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/SaveParticipantMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
+# Copyright (c) 2005, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,12 +16,7 @@ CleanUpSaveParticipantPreferenceConfiguration_AdditionalActions_Checkbox=Addi&ti
 CleanUpSaveParticipantPreferenceConfiguration_Configure_Button=Co&nfigure...
 CleanUpSaveParticipantPreferenceConfiguration_ConfigureFormatter_Link=Configure the formatter settings on the <a>Formatter</a> page.
 CleanUpSaveParticipantPreferenceConfiguration_ConfigureImports_Link=Configure the organize imports settings on the <a>Organize Imports</a> page.
-CleanUpSaveParticipantConfigurationModifyDialog_CodeStyle_TabPage=&Code Style
-CleanUpSaveParticipantConfigurationModifyDialog_MemberAccesses_TabPage=Membe&r Accesses
-CleanUpSaveParticipantConfigurationModifyDialog_UnnecessaryCode_TabPage=&Unnecessary Code
-CleanUpSaveParticipantConfigurationModifyDialog_MissingCode_TabPage=&Missing Code
 CleanUpSaveParticipantConfigurationModifyDialog_SelectAnAction_Error=Select at least one save action.
 CleanUpSaveParticipantConfigurationModifyDialog_XofYSelected_Label={0} of {1} save actions activated
-CleanUpSaveParticipantConfigurationModifyDialog_CodeOrganizing_TabPage=Code &Organizing
 CleanUpSaveParticipantPreferenceConfiguration_CleanUpSaveParticipantConfiguration_Title=Additional Save Actions
 CleanUpSaveParticipantPreferenceConfiguration_SaveActionPreferencePage_OrganizeImports_Checkbox=Organize &imports
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java
index e9b2935..da5ee1b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/StringCleanUp.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 
@@ -135,6 +136,14 @@ public class StringCleanUp extends AbstractMultiFix {
 	 * {@inheritDoc}
 	 */
 	public int computeNumberOfFixes(CompilationUnit compilationUnit) {
+		try {
+			ICompilationUnit cu= (ICompilationUnit)compilationUnit.getJavaElement();
+			if (!cu.isStructureKnown())
+				return 0; //[clean up] 'Remove unnecessary $NLS-TAGS$' removes necessary ones in case of syntax errors: https://bugs.eclipse.org/bugs/show_bug.cgi?id=285814 : 
+		} catch (JavaModelException e) {
+			return 0;
+		}
+		
 		int result= 0;
 		IProblem[] problems= compilationUnit.getProblems();
 		if (isEnabled(CleanUpConstants.ADD_MISSING_NLS_TAGS))
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.java
index 2253c38..fa96bd2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,9 @@ final class InfoViewMessages extends NLS {
 	public static String GotoInputAction_label;
 	public static String GotoInputAction_tooltip;
 	public static String GotoInputAction_description;
+	
+	public static String OpenInBrowserAction_url_label;
+	public static String OpenInBrowserAction_url_toolTip;
 
 	public static String CopyToClipboard_error_title;
 	public static String CopyToClipboard_error_message;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.properties
index 453d707..6d7b5c7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/InfoViewMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,6 +22,9 @@ GotoInputAction_label= Open &Input
 GotoInputAction_tooltip= Open Input
 GotoInputAction_description= Open Input
 
+OpenInBrowserAction_url_label=&Open in Browser
+OpenInBrowserAction_url_toolTip=Open in Browser
+
 CopyToClipboard_error_title= Problem Copying to Clipboard
 CopyToClipboard_error_message= There was a problem when accessing the system clipboard. Retry?
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java
index 2aac032..615e5eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/JavadocView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
@@ -75,6 +76,7 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IDocumentExtension3;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.TextPresentation;
 import org.eclipse.jface.text.TextSelection;
 import org.eclipse.jface.text.TextUtilities;
@@ -86,6 +88,7 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.IWorkbenchSite;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -101,12 +104,15 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.ILocalVariable;
 import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IOpenable;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
@@ -114,11 +120,11 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
 import org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
@@ -131,12 +137,13 @@ import org.eclipse.jdt.ui.PreferenceConstants;
 import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
 import org.eclipse.jdt.ui.actions.JdtActionConstants;
+import org.eclipse.jdt.ui.actions.OpenAttachedJavadocAction;
 import org.eclipse.jdt.ui.text.IJavaPartitions;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jdt.internal.ui.actions.OpenExternalBrowserAction;
+import org.eclipse.jdt.internal.ui.actions.ActionMessages;
 import org.eclipse.jdt.internal.ui.actions.SimpleSelectionProvider;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 import org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover;
@@ -297,9 +304,7 @@ public class JavadocView extends AbstractInfoView {
 
 		public LinkAction() {
 			super(InfoViewMessages.JavadocView_action_toogleLinking_text, SWT.TOGGLE);
-
-			setTitleToolTip(InfoViewMessages.JavadocView_action_toggleLinking_toolTipText);
-
+			setToolTipText(InfoViewMessages.JavadocView_action_toggleLinking_toolTipText);
 			JavaPluginImages.setLocalImageDescriptors(this, "synced.gif"); //$NON-NLS-1$
 			setChecked(isLinkingEnabled());
 		}
@@ -313,6 +318,69 @@ public class JavadocView extends AbstractInfoView {
 	}
 
 	/**
+	 * Action to open the selection in an external browser. If the selection is a java element its
+	 * corresponding javadoc is shown if possible. If it is an URL the URL's content is shown.
+	 * 
+	 * The action is disabled if the selection can not be opened.
+	 * 
+	 * @since 3.6
+	 */
+	private static class OpenInBrowserAction extends OpenAttachedJavadocAction {
+
+		/**
+		 * Create a new ShowExternalJavadocAction
+		 * 
+		 * @param site the site
+		 */
+		public OpenInBrowserAction(IWorkbenchSite site) {
+			super(site);
+		}
+
+		/* (non-Javadoc)
+		 * Method declared on SelectionDispatchAction.
+		 */
+		public void selectionChanged(IStructuredSelection structuredSelection) {
+			super.selectionChanged(structuredSelection);
+			Object element= structuredSelection.getFirstElement();
+			if (element instanceof URL) {
+				setText(InfoViewMessages.OpenInBrowserAction_url_label);
+				setToolTipText(InfoViewMessages.OpenInBrowserAction_url_toolTip);
+			} else {
+				setText(ActionMessages.OpenAttachedJavadocAction_label);
+				setToolTipText(ActionMessages.OpenAttachedJavadocAction_tooltip);
+			}
+		}
+
+		/* (non-Javadoc)
+		 * Method declared on SelectionDispatchAction.
+		 */
+		public void run(IStructuredSelection selection) {
+			if (!canEnableFor(selection))
+				return;
+
+			Object element= selection.getFirstElement();
+			if (element instanceof IJavaElement)
+				super.run(selection);
+			else
+				open((URL)element);
+
+		}
+
+		/*
+		 * @see org.eclipse.jdt.ui.actions.OpenAttachedJavadocAction#canEnableFor(org.eclipse.jface.viewers.IStructuredSelection)
+		 */
+		protected boolean canEnableFor(IStructuredSelection selection) {
+			if (selection.size() != 1)
+				return false;
+
+			Object element= selection.getFirstElement();
+			return element instanceof URL || super.canEnableFor(selection);
+		}
+
+	}
+
+
+	/**
 	 * Preference key for the preference whether to show a dialog
 	 * when the SWT Browser widget is not available.
 	 * @since 3.0
@@ -387,10 +455,11 @@ public class JavadocView extends AbstractInfoView {
 	private LinkAction fToggleLinkAction;
 
 	/**
-	 * Action to show content in external browser
+	 * Action to open the attached Javadoc.
+	 * 
 	 * @since 3.4
 	 */
-	private OpenExternalBrowserAction fOpenExternalBrowserAction;
+	private OpenInBrowserAction fOpenBrowserAction;
 
 	/**
 	 * A selection provider providing the current
@@ -672,9 +741,12 @@ public class JavadocView extends AbstractInfoView {
 		fToggleLinkAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);
 
 		fInputSelectionProvider= new SimpleSelectionProvider();
-		fOpenExternalBrowserAction= new OpenExternalBrowserAction(getSite().getShell().getDisplay(), fInputSelectionProvider);
-		fOpenExternalBrowserAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EXTERNAL_JAVADOC);
-		fInputSelectionProvider.addSelectionChangedListener(fOpenExternalBrowserAction);
+		fOpenBrowserAction= new OpenInBrowserAction(getSite());
+		fOpenBrowserAction.setSpecialSelectionProvider(fInputSelectionProvider);
+		fOpenBrowserAction.setImageDescriptor(JavaPluginImages.DESC_ELCL_OPEN_BROWSER);
+		fOpenBrowserAction.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_OPEN_BROWSER);
+		fOpenBrowserAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_ATTACHED_JAVADOC);
+		fInputSelectionProvider.addSelectionChangedListener(fOpenBrowserAction);
 
 		IJavaElement input= getInput();
 		StructuredSelection selection;
@@ -698,7 +770,7 @@ public class JavadocView extends AbstractInfoView {
 
 		fInputSelectionProvider.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
-				actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_EXTERNAL_JAVA_DOC, fOpenExternalBrowserAction);
+				actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_ATTACHED_JAVA_DOC, fOpenBrowserAction);
 			}
 		});
 
@@ -717,7 +789,7 @@ public class JavadocView extends AbstractInfoView {
 
 		tbm.add(fToggleLinkAction);
 		super.fillToolBar(tbm);
-		tbm.add(fOpenExternalBrowserAction);
+		tbm.add(fOpenBrowserAction);
 	}
 
 	/* (non-Javadoc)
@@ -730,7 +802,7 @@ public class JavadocView extends AbstractInfoView {
 		menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, fBackAction);
 		menu.appendToGroup(IContextMenuConstants.GROUP_GOTO, fForthAction);
 
-		menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenExternalBrowserAction);
+		menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, fOpenBrowserAction);
 	}
 
 	/*
@@ -808,9 +880,9 @@ public class JavadocView extends AbstractInfoView {
 			fFontListener= null;
 		}
 
-		if (fOpenExternalBrowserAction != null) {
-			fInputSelectionProvider.removeSelectionChangedListener(fOpenExternalBrowserAction);
-			fOpenExternalBrowserAction= null;
+		if (fOpenBrowserAction != null) {
+			fInputSelectionProvider.removeSelectionChangedListener(fOpenBrowserAction);
+			fOpenBrowserAction= null;
 		}
 	}
 
@@ -825,6 +897,7 @@ public class JavadocView extends AbstractInfoView {
 	 * @see AbstractInfoView#computeInput(Object)
 	 */
 	protected Object computeInput(Object input) {
+		//TODO: never used?
 		if (getControl() == null || ! (input instanceof IJavaElement))
 			return null;
 
@@ -994,6 +1067,19 @@ public class JavadocView extends AbstractInfoView {
 				}
 
 				HTMLPrinter.addSmallHeader(buffer, getInfoText(member, constantValue, true));
+
+				try {
+					ISourceRange nameRange= ((IMember)curr).getNameRange();
+					if (SourceRange.isAvailable(nameRange)) {
+						ITypeRoot typeRoot= ((IMember)curr).getTypeRoot();
+						Region hoverRegion= new Region(nameRange.getOffset(), nameRange.getLength());
+						buffer.append("<br>"); //$NON-NLS-1$
+						JavadocHover.addAnnotations(buffer, curr, typeRoot, hoverRegion);
+					}
+				} catch (JavaModelException e) {
+					// no annotations this time...
+				}
+				
 				Reader reader;
 				try {
 					String content= JavadocContentAccess2.getHTMLContent(member, true);
@@ -1027,8 +1113,16 @@ public class JavadocView extends AbstractInfoView {
 				if (reader != null) {
 					HTMLPrinter.addParagraph(buffer, reader);
 				}
+
 			} else if (curr.getElementType() == IJavaElement.LOCAL_VARIABLE || curr.getElementType() == IJavaElement.TYPE_PARAMETER) {
 				HTMLPrinter.addSmallHeader(buffer, getInfoText(curr, null, true));
+				if (curr instanceof ILocalVariable) {
+					ISourceRange nameRange= ((ILocalVariable) curr).getNameRange();
+					ITypeRoot typeRoot= ((IMember) curr.getParent()).getTypeRoot();
+					Region hoverRegion= new Region(nameRange.getOffset(), nameRange.getLength());
+					buffer.append("<br>"); //$NON-NLS-1$
+					JavadocHover.addAnnotations(buffer, curr, typeRoot, hoverRegion);
+				}
 			}
 		}
 
@@ -1069,7 +1163,7 @@ public class JavadocView extends AbstractInfoView {
 		}
 
 		StringBuffer buf= new StringBuffer();
-		JavadocHover.addImageAndLabel(buf, imageName, 16, 16, 8, 5, label.toString(), 22, 0);
+		JavadocHover.addImageAndLabel(buf, imageName, 16, 16, label.toString(), 20, 2);
 		return buf.toString();
 	}
 
@@ -1220,6 +1314,8 @@ public class JavadocView extends AbstractInfoView {
 					return null;
 
 				VariableDeclarationFragment fieldDecl= ASTNodeSearchUtil.getFieldDeclarationFragmentNode(constantField, ast);
+				if (fieldDecl == null)
+					return null;
 				Expression initializer= fieldDecl.getInitializer();
 				if (initializer == null)
 					return null;
@@ -1423,7 +1519,7 @@ public class JavadocView extends AbstractInfoView {
 			 * @see org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.ILinkHandler#handleExternalLink(java.net.URL, org.eclipse.swt.widgets.Display)
 			 */
 			public boolean handleExternalLink(final URL url, Display display) {
-				if (fCurrent == null || !url.equals(fCurrent.getInputElement())) {
+				if (fCurrent == null || (fCurrent.getInputElement() instanceof URL && !url.toExternalForm().equals(((URL) fCurrent.getInputElement()).toExternalForm()))) {
 					fCurrent= new URLBrowserInput(fCurrent, url);
 
 					if (fBackAction != null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/TextSelectionConverter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/TextSelectionConverter.java
index e36117e..676022b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/TextSelectionConverter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/TextSelectionConverter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,24 +44,23 @@ class TextSelectionConverter {
 
 	/**
 	 * Finds and returns the Java elements for the given editor selection.
-	 *
+	 * 
 	 * @param editor the Java editor
 	 * @param selection the text selection
-	 * @return	the Java elements for the given editor selection
-	 * @throws JavaModelException
+	 * @return the Java elements for the given editor selection
+	 * @throws JavaModelException if accessing the type root fails
 	 */
 	public static IJavaElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaModelException {
 		return codeResolve(getInput(editor), selection);
 	}
 
 	/**
-	 * Finds and returns the Java element that contains the
-	 * text selection in the given editor.
-	 *
+	 * Finds and returns the Java element that contains the text selection in the given editor.
+	 * 
 	 * @param editor the Java editor
 	 * @param selection the text selection
-	 * @return	the Java elements for the given editor selection
-	 * @throws JavaModelException
+	 * @return the Java elements for the given editor selection
+	 * @throws JavaModelException if accessing the type root fails
 	 */
 	public static IJavaElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaModelException {
 		return getElementAtOffset(getInput(editor), selection);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizard.java
index f316f72..05777f6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizard.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -383,7 +383,8 @@ public final class JarImportWizard extends BinaryRefactoringHistoryWizard implem
 				final IPackageFragmentRoot root= (IPackageFragmentRoot) element;
 				try {
 					final IClasspathEntry entry= root.getRawClasspathEntry();
-					if (isValidClassPathEntry(entry))
+					if (isValidClassPathEntry(entry)
+							&& root.getResolvedClasspathEntry().getReferencingEntry() == null)
 						fImportData.setPackageFragmentRoot(root);
 				} catch (JavaModelException exception) {
 					JavaPlugin.log(exception);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizardPage.java
index 13ef5cd..3e9b3dd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarimport/JarImportWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.ltk.core.refactoring.RefactoringCore;
 
+import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
@@ -199,8 +200,11 @@ public final class JarImportWizardPage extends WizardPage {
 				final Set set= new HashSet();
 				final IPackageFragmentRoot[] roots= project.getPackageFragmentRoots();
 				for (int offset= 0; offset < roots.length; offset++) {
-					if (JarImportWizard.isValidClassPathEntry(roots[offset].getRawClasspathEntry()))
-						set.add(roots[offset]);
+					IPackageFragmentRoot root= roots[offset];
+					IClasspathEntry entry= root.getRawClasspathEntry();
+					if (JarImportWizard.isValidClassPathEntry(entry)
+							&& root.getResolvedClasspathEntry().getReferencingEntry() == null)
+						set.add(root);
 				}
 				return set.toArray();
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
index 42e218d..c819681 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarFileExportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -503,12 +503,31 @@ public class JarFileExportOperation extends WorkspaceModifyOperation implements
 			boolean isOnCP= javaProject.isOnClasspath(container);
 			for (int i= 0; i < children.length; i++) {
 				IResource child= children[i];
-				if (isOnCP || !javaProject.isOnClasspath(child))
+				if (isOnCP || !javaProject.isOnClasspath(child) || isInternalJar(child))
 					exportElement(child, progressMonitor);
 			}
 		}
 	}
 
+	/**
+	 * Tells whether the given resource is an internal JAR.
+	 * 
+	 * @param resource the resource to test
+	 * @return <code>true</code> if it is an internal JAR, <code>false</code> otherwise
+	 * @since 3.6
+	 */
+	private boolean isInternalJar(IResource resource) {
+		if (resource.getType() != IResource.FILE)
+			return false;
+		
+		IJavaElement je= JavaCore.create(resource);
+		if (je == null || je.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT)
+			return false;
+		
+		IPackageFragmentRoot root= (IPackageFragmentRoot)je;
+		return root.isArchive() && !root.isExternal();
+	}
+
 	private IPackageFragmentRoot findPackageFragmentRoot(IJavaProject jProject, IPath path) throws JavaModelException {
 		if (jProject == null || path == null || path.segmentCount() <= 0)
 			return null;
@@ -879,7 +898,7 @@ public class JarFileExportOperation extends WorkspaceModifyOperation implements
 
 	/**
 	 * Handles core exceptions that are thrown by {@link IJarBuilder#writeFile(IFile, IPath)}.
-	 *  
+	 * 
 	 * @param ex the core exception
 	 * @since 3.5
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageReader.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageReader.java
index 1f57596..6d86a39 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageReader.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageReader.java
@@ -27,6 +27,7 @@ import javax.xml.parsers.ParserConfigurationException;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -126,6 +127,7 @@ public class JarPackageReader extends Object implements IJarDescriptionReader {
 		} finally {
 			// Note: Above code is OK since clients are responsible to close the stream
 		}
+		parser.setErrorHandler(new DefaultHandler());
 		Element xmlJarDesc= parser.parse(new InputSource(fInputStream)).getDocumentElement();
 		if (!xmlJarDesc.getNodeName().equals(JarPackagerUtil.DESCRIPTION_EXTENSION)) {
 			throw new IOException(JarPackagerMessages.JarPackageReader_error_badFormat);
@@ -393,7 +395,7 @@ public class JarPackageReader extends Object implements IJarDescriptionReader {
 	 */
 	public IStatus getStatus() {
 		if (fWarnings.getChildren().length == 0)
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		else
 			return fWarnings;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWriter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWriter.java
index 88bb781..797c7ee 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWriter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackageWriter.java
@@ -286,7 +286,7 @@ public class JarPackageWriter extends Object implements IJarDescriptionWriter {
 	 * This writer always returns OK
 	 */
 	public IStatus getStatus() {
-		return new Status(IStatus.OK, JavaPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.java
index be4cacb..9a8c69b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.java
@@ -256,8 +256,6 @@ public final class JarPackagerMessages extends NLS {
 
 	public static String JarPackageReader_error_tagPathNotFound;
 
-	public static String JarPackageReader_error_unknownJarBuilder;
-
 	public static String JarPackageReader_jarPackageReaderWarnings;
 
 	public static String JarPackageReader_warning_javaElementDoesNotExist;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.properties
index 15b9f70..6479529 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackager/JarPackagerMessages.properties
@@ -49,8 +49,8 @@ JarFileExportOperation_javaPackageNotDeterminable= Java package could not be fou
 JarFileExportOperation_coreErrorDuringExport= Unexpected core error during export.
 JarFileExportOperation_errorDuringExport= Error exporting {0}
 JarFileExportOperation_outputContainerNotAccessible= Output container not accessible
-JarFileExportOperation_classFileOnClasspathNotAccessible= class file(s) on classpath not found or not accessible {0}
-JarFileExportOperation_classFileWithoutSourceFileAttribute= Could not find source file attribute for: {0}
+JarFileExportOperation_classFileOnClasspathNotAccessible= Class files on classpath not found or not accessible for: ''{0}''
+JarFileExportOperation_classFileWithoutSourceFileAttribute= Could not find source file attribute for: ''{0}''
 JarFileExportOperation_CloseZipFileError_message=Could not close JAR file ''{0}''. Reason: {1}
 JarFileExportOperation_missingSourceFileAttributeExportedAll= Source name not found in a class file - exported all class files in {0}
 JarFileExportOperation_exportedWithCompileErrors= Exported with compile errors: {0}
@@ -126,7 +126,6 @@ JarPackageReader_jarPackageReaderWarnings= JAR File Reader Warnings
 JarPackageReader_error_illegalValueForBooleanAttribute= Invalid format. The value for a boolean attribute is invalid.
 JarPackageReader_error_tagNameNotFound= Invalid format.  The tag 'name' cannot be found.
 JarPackageReader_error_tagPathNotFound= Invalid format.  The tag 'path' cannot be found.
-JarPackageReader_error_unknownJarBuilder=Jar builder ''{0}'' is unkown
 JarPackageReader_error_tagHandleIdentifierNotFoundOrEmpty= Invalid format: The tag 'handleIdentifier' cannot be found or is empty.
 JarPackageReader_warning_javaElementDoesNotExist= Warning: Java element does not exist in workspace
 JarPackageReader_error_duplicateTag= Invalid format. {0} is a duplicate tag.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties
index 0a9a48c..3270cde 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarPackagerMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007, 2009 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ JarPackageWizardPage_title= Runnable JAR File Specification
 
 FatJarBuilder_error_readingArchiveFile=Could not read archive ''{0}''. Reason: {1}
 
-FatJarPackageWizard_JarExportProblems_message=Jar export finished with problems. See details for additional infos.
+FatJarPackageWizard_JarExportProblems_message=Jar export finished with problems. See details for additional information.
 
 FatJarPackageWizardPage_description=Select a 'Java Application' launch configuration to use to create a runnable JAR.
 FatJarPackageWizardPage_destinationGroupTitle=Export &destination:
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlAntExporter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlAntExporter.java
index 6680e89..1cf8247 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlAntExporter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlAntExporter.java
@@ -10,6 +10,7 @@
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262766 [jar exporter] ANT file for Jar-in-Jar option contains relative path to jar-rsrc-loader.zip
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262763 [jar exporter] remove Built-By attribute in ANT files from Fat JAR Exporter
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.jarpackagerfat;
 
@@ -111,11 +112,11 @@ public class FatJarRsrcUrlAntExporter extends FatJarAntExporter {
 
 		Element attribute= document.createElement("attribute"); //$NON-NLS-1$
 		attribute.setAttribute("name", "Main-Class"); //$NON-NLS-1$ //$NON-NLS-2$s 
-		attribute.setAttribute("value", "org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"); //$NON-NLS-1$ //$NON-NLS-2$ 
+		attribute.setAttribute("value", JIJConstants.LOADER_MAIN_CLASS); //$NON-NLS-1$ 
 		manifest.appendChild(attribute);
 
 		attribute= document.createElement("attribute"); //$NON-NLS-1$
-		attribute.setAttribute("name", "Rsrc-Main-Class"); //$NON-NLS-1$ //$NON-NLS-2$s 
+		attribute.setAttribute("name", JIJConstants.REDIRECTED_MAIN_CLASS_MANIFEST_NAME); //$NON-NLS-1$ 
 		attribute.setAttribute("value", mainClass); //$NON-NLS-1$ 
 		manifest.appendChild(attribute);
 
@@ -125,9 +126,9 @@ public class FatJarRsrcUrlAntExporter extends FatJarAntExporter {
 		manifest.appendChild(attribute);
 
 		attribute= document.createElement("attribute"); //$NON-NLS-1$
-		attribute.setAttribute("name", "Rsrc-Class-Path"); //$NON-NLS-1$ //$NON-NLS-2$s 
+		attribute.setAttribute("name", JIJConstants.REDIRECTED_CLASS_PATH_MANIFEST_NAME); //$NON-NLS-1$ 
 		StringBuffer rsrcClassPath= new StringBuffer();
-		rsrcClassPath.append("./"); //$NON-NLS-1$
+		rsrcClassPath.append(JIJConstants.CURRENT_DIR); 
 		for (int i= 0; i < sourceInfos.length; i++) {
 			SourceInfo sourceInfo= sourceInfos[i];
 			if (sourceInfo.isJar) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlManifestProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlManifestProvider.java
index e7de41f..b44ca04 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlManifestProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/FatJarRsrcUrlManifestProvider.java
@@ -8,9 +8,12 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 219530 [jar application] add Jar-in-Jar ClassLoader option
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.jarpackagerfat;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
@@ -21,6 +24,8 @@ import org.eclipse.jdt.core.IPackageFragmentRoot;
 
 import org.eclipse.jdt.ui.jarpackager.JarPackageData;
 
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+
 /**
  * A manifest provider creates manifest files for a fat jar with a JAR in JAR loader.
  * 
@@ -28,13 +33,6 @@ import org.eclipse.jdt.ui.jarpackager.JarPackageData;
  */
 public class FatJarRsrcUrlManifestProvider extends FatJarManifestProvider {
 
-	private static final String RSRC_MAIN_CLASS_MANIFEST_ATTRIBUTE= "Rsrc-Main-Class"; //$NON-NLS-1$
-	/**
-	 * This is <code>{@link org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader}.class.getName()</code>,
-	 * but that's not visible for the PDE builder.
-	 */
-	private static final String JAR_RSRC_LOADER_MAIN_CLASS= "org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"; //$NON-NLS-1$
-
 	public FatJarRsrcUrlManifestProvider(FatJarRsrcUrlBuilder builder) {
 		super(builder);
 	}
@@ -53,14 +51,19 @@ public class FatJarRsrcUrlManifestProvider extends FatJarManifestProvider {
 			}
 		}
 		String manifestRsrcClasspath= getManifestRsrcClasspath(jarNames);
-		ownManifest.getMainAttributes().putValue("Rsrc-Class-Path", manifestRsrcClasspath); //$NON-NLS-1$
+		ownManifest.getMainAttributes().putValue(JIJConstants.REDIRECTED_CLASS_PATH_MANIFEST_NAME, manifestRsrcClasspath); 
 	}
 
 	public String getManifestRsrcClasspath(Set jarNames) {
 		StringBuffer result= new StringBuffer();
-		result.append("./"); //$NON-NLS-1$
+		result.append(JIJConstants.CURRENT_DIR); 
 		for (Iterator iterator= jarNames.iterator(); iterator.hasNext();) {
 			String jarName= (String) iterator.next();
+			try {
+				jarName= URLEncoder.encode(jarName, "UTF-8"); //$NON-NLS-1$
+			} catch (UnsupportedEncodingException e) {
+				JavaPlugin.log(e); // does not happen
+			}
 			result.append(" ").append(jarName); //$NON-NLS-1$
 		}
 		return result.toString();
@@ -79,8 +82,8 @@ public class FatJarRsrcUrlManifestProvider extends FatJarManifestProvider {
 
 	private void putMainClass(Manifest manifest, JarPackageData jarPackage) {
 		if (jarPackage.getManifestMainClass() != null && jarPackage.getManifestMainClass().getFullyQualifiedName().length() > 0) {
-			manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, JAR_RSRC_LOADER_MAIN_CLASS);
-			manifest.getMainAttributes().putValue(RSRC_MAIN_CLASS_MANIFEST_ATTRIBUTE, jarPackage.getManifestMainClass().getFullyQualifiedName());
+			manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, JIJConstants.LOADER_MAIN_CLASS);
+			manifest.getMainAttributes().putValue(JIJConstants.REDIRECTED_MAIN_CLASS_MANIFEST_NAME, jarPackage.getManifestMainClass().getFullyQualifiedName());
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/JIJConstants.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/JIJConstants.java
new file mode 100644
index 0000000..615e7c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/jarpackagerfat/JIJConstants.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ferenc Hechler, ferenc_hechler at users.sourceforge.net - 262748 [jar exporter] extract constants for string literals in JarRsrcLoader et al.
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.jarpackagerfat;
+
+
+/**
+ * Constants used in the fat Jar packager.
+ * 
+ * Some of these are duplicated in JIJConstants in the source for the jar in jar loader:
+ * {@link org.eclipse.jdt.internal.jarinjarloader}.
+ * 
+ * @since 3.6
+ */
+final class JIJConstants {
+	
+	static final String REDIRECTED_CLASS_PATH_MANIFEST_NAME  = "Rsrc-Class-Path";  //$NON-NLS-1$
+	static final String REDIRECTED_MAIN_CLASS_MANIFEST_NAME  = "Rsrc-Main-Class";  //$NON-NLS-1$
+	static final String CURRENT_DIR                          = "./";  //$NON-NLS-1$
+	
+	/**
+	 * This is <code>{@link org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader}.class.getName()</code>,
+	 * but that's not visible for the PDE builder when building the org.eclipse.jdt.ui plug-in.
+	 */
+	static final String LOADER_MAIN_CLASS                    = "org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader";  //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.java
index dcf33c3..bbba4be 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,11 +69,6 @@ public final class JavadocExportMessages extends NLS {
 	public static String JavadocWizard_updatejavadoclocation_message;
 	public static String JavadocWizard_updatejavadocdialog_label;
 	public static String JavadocWizard_javadocprocess_label;
-	public static String JavadocWizard_saveresourcedialogCE_title;
-	public static String JavadocWizard_saveresourcedialogCE_message;
-	public static String JavadocWizard_saveresourcedialogITE_title;
-	public static String JavadocWizard_saveresourcedialogITE_message;
-	public static String JavadocWizard_savetask_name;
 	public static String JavadocWizard_launchconfig_name;
 	public static String JavadocWizard_error_title;
 	public static String JavadocWizard_launch_error_message;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.properties
index c2f5744..f3dd984 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocExportMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -64,11 +64,6 @@ JavadocWizard_javadocwizard_title=Generate Javadoc
 JavadocWizard_updatejavadoclocation_message=Do you want to update the Javadoc location for ''{0}'' with the chosen destination folder ''{1}''?
 JavadocWizard_updatejavadocdialog_label=Update Javadoc Location
 JavadocWizard_javadocprocess_label=Javadoc Generation
-JavadocWizard_saveresourcedialogCE_title=Save Resources
-JavadocWizard_saveresourcedialogCE_message=Saving resources failed.
-JavadocWizard_saveresourcedialogITE_title=Save Resources
-JavadocWizard_saveresourcedialogITE_message=Saving resources failed.
-JavadocWizard_savetask_name=Saving...
 JavadocWizard_launchconfig_name=Javadoc
 
 JavadocWizard_error_title=Generate Javadoc
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocLinkRef.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocLinkRef.java
index 4f62864..5e00e42 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocLinkRef.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocLinkRef.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,7 +65,7 @@ public class JavadocLinkRef {
 			String location= url != null ? url.toExternalForm() : null;
 			element.setAttribute(CPListElement.JAVADOC, location);
 			String[] changedAttributes= { CPListElement.JAVADOC };
-			BuildPathSupport.modifyClasspathEntry(null, element.getClasspathEntry(), changedAttributes, fProject, fContainerPath, monitor);
+			BuildPathSupport.modifyClasspathEntry(null, element.getClasspathEntry(), changedAttributes, fProject, fContainerPath, fClasspathEntry.getReferencingEntry() != null, monitor);
 			fClasspathEntry= element.getClasspathEntry();
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocReader.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocReader.java
index de41118..6b697d7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocReader.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import javax.xml.parsers.ParserConfigurationException;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -36,8 +37,9 @@ public class JavadocReader extends Object {
 	private InputStream fInputStream;
 
 	/**
-	 * Reads a Javadoc Ant Script from the underlying stream.
-	 * It is the client's responsibility to close the stream.
+	 * Reads a Javadoc Ant Script from the underlying stream. It is the client's responsibility to
+	 * close the stream.
+	 * 
 	 * @param inputStream the input stream to read from
 	 */
 	public JavadocReader(InputStream inputStream) {
@@ -46,10 +48,9 @@ public class JavadocReader extends Object {
 	}
 
 	/**
-	 * Closes this stream.
-	 * It is the clients responsibility to close the stream.
-	 *
-	 * @exception IOException
+	 * Closes this stream. It is the clients responsibility to close the stream.
+	 * 
+	 * @exception IOException if the stream cannot be closed
 	 */
 	public void close() throws IOException {
 		if (fInputStream != null)
@@ -70,6 +71,7 @@ public class JavadocReader extends Object {
 		}
 
 		//find the project associated with the ant script
+		parser.setErrorHandler(new DefaultHandler());
 		Element xmlJavadocDesc= parser.parse(new InputSource(fInputStream)).getDocumentElement();
 
 		NodeList targets= xmlJavadocDesc.getChildNodes();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocSpecificsWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocSpecificsWizardPage.java
index e2507d6..1185992 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocSpecificsWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocSpecificsWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,8 @@ import org.eclipse.jface.dialogs.Dialog;
 
 import org.eclipse.ui.PlatformUI;
 
+import org.eclipse.jdt.core.JavaCore;
+
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
 import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
@@ -141,7 +143,8 @@ public class JavadocSpecificsWizardPage extends JavadocWizardPage {
 		createLabel(inner, SWT.NONE, JavadocExportMessages.JavadocSpecificsWizardPage_sourcecompatibility_label, createGridData(GridData.HORIZONTAL_ALIGN_BEGINNING, 1, 0));
 
 		fSourceCombo= createCombo(inner, SWT.NONE, fStore.getSource(), createGridData(1));
-		String[] versions= { "-", "1.3", "1.4", "1.5", "1.6" };//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		String[] versions= { "-", //$NON-NLS-1$
+				JavaCore.VERSION_1_3, JavaCore.VERSION_1_4, JavaCore.VERSION_1_5, JavaCore.VERSION_1_6, JavaCore.VERSION_1_7 };
 		fSourceCombo.setItems(versions);
 		fSourceCombo.setText(fStore.getSource());
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
index 2c423bd..927078f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWizard.java
@@ -168,12 +168,13 @@ public class JavadocWizard extends Wizard implements IExportWizard {
 			try {
 
 				URL newURL= fDestination.toFile().toURI().toURL();
+				String newExternalForm= newURL.toExternalForm();
 				List projs= new ArrayList();
 				//get javadoc locations for all projects
 				for (int i= 0; i < checkedProjects.length; i++) {
 					IJavaProject curr= checkedProjects[i];
 					URL currURL= JavaUI.getProjectJavadocLocation(curr);
-					if (!newURL.equals(currURL)) { // currURL can be null
+					if (currURL == null || !newExternalForm.equals(currURL.toExternalForm())) {
 						//if not all projects have the same javadoc location ask if you want to change
 						//them to have the same javadoc location
 						projs.add(curr);
@@ -200,7 +201,7 @@ public class JavadocWizard extends Wizard implements IExportWizard {
 						}
 					}
 					File file= fStore.writeXML(javadocXMLElement);
-					IFile[] files= fRoot.findFilesForLocation(Path.fromOSString(file.getPath()));
+					IFile[] files= fRoot.findFilesForLocationURI(file.toURI());
 					if (files != null) {
 						for (int i= 0; i < files.length; i++) {
 							files[i].refreshLocal(IResource.DEPTH_ONE, null);
@@ -413,7 +414,7 @@ public class JavadocWizard extends Wizard implements IExportWizard {
 	}
 
 	private void refresh(IPath path) {
-		IContainer[] containers= fRoot.findContainersForLocation(path);
+		IContainer[] containers= fRoot.findContainersForLocationURI(path.toFile().toURI());
 		try {
 			for (int i= 0; i < containers.length; i++) {
 				containers[i].refreshLocal(IResource.DEPTH_INFINITE, null);
@@ -428,7 +429,7 @@ public class JavadocWizard extends Wizard implements IExportWizard {
 			try {
 				IPath indexFile= fDestination.append("index.html"); //$NON-NLS-1$
 				URL url= indexFile.toFile().toURI().toURL();
-				OpenBrowserUtil.open(url, display, getWindowTitle());
+				OpenBrowserUtil.open(url, display);
 			} catch (MalformedURLException e) {
 				JavaPlugin.log(e);
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
index 6864118..9f71f7f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ASTProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -215,7 +215,7 @@ public final class ASTProvider {
 	private ActivationListener fActivationListener;
 	private Object fReconcileLock= new Object();
 	private Object fWaitLock= new Object();
-	private boolean fIsReconciling;
+	private volatile boolean fIsReconciling;
 	private IWorkbenchPart fActiveEditor;
 
 
@@ -250,7 +250,7 @@ public final class ASTProvider {
 			windows[i].getPartService().addPartListener(fActivationListener);
 	}
 
-	private void activeJavaEditorChanged(IWorkbenchPart editor) {
+	void activeJavaEditorChanged(IWorkbenchPart editor) {
 
 		ITypeRoot javaElement= null;
 		if (editor instanceof JavaEditor)
@@ -314,8 +314,8 @@ public final class ASTProvider {
 			System.out.println(getThreadName() + " - " + DEBUG_PREFIX + "about to reconcile: " + toString(javaElement)); //$NON-NLS-1$ //$NON-NLS-2$
 
 		synchronized (fReconcileLock) {
-			fIsReconciling= true;
 			fReconcilingJavaElement= javaElement;
+			fIsReconciling= true;
 		}
 		cache(null, javaElement);
 	}
@@ -450,10 +450,11 @@ public final class ASTProvider {
 
 				// Wait for AST
 				synchronized (fWaitLock) {
-					if (DEBUG)
-						System.out.println(getThreadName() + " - " + DEBUG_PREFIX + "waiting for AST for: " + input.getElementName()); //$NON-NLS-1$ //$NON-NLS-2$
-
-					fWaitLock.wait();
+					if (isReconciling(input)) {
+						if (DEBUG)
+							System.out.println(getThreadName() + " - " + DEBUG_PREFIX + "waiting for AST for: " + input.getElementName()); //$NON-NLS-1$ //$NON-NLS-2$
+						fWaitLock.wait();
+					}
 				}
 
 				// Check whether active element is still valid
@@ -504,9 +505,7 @@ public final class ASTProvider {
 	 * @return <code>true</code> if reported as currently being reconciled
 	 */
 	private boolean isReconciling(ITypeRoot javaElement) {
-		synchronized (fReconcileLock) {
-			return javaElement != null && javaElement.equals(fReconcilingJavaElement) && fIsReconciling;
-		}
+		return javaElement != null && javaElement.equals(fReconcilingJavaElement) && fIsReconciling;
 	}
 
 	/**
@@ -593,8 +592,15 @@ public final class ASTProvider {
 		}
 	}
 
-	/*
-	 * @see org.eclipse.jdt.internal.ui.text.java.IJavaReconcilingListener#reconciled(org.eclipse.jdt.core.dom.CompilationUnit)
+	/**
+	 * Update internal structures after reconcile.
+	 * 
+	 * @param ast the compilation unit AST or <code>null</code> if the working copy was consistent
+	 *            or reconciliation has been cancelled
+	 * @param javaElement the Java element for which the AST was built
+	 * @param progressMonitor the progress monitor
+	 * @see org.eclipse.jdt.internal.ui.text.java.IJavaReconcilingListener#reconciled(CompilationUnit,
+	 *      boolean, IProgressMonitor)
 	 */
 	void reconciled(CompilationUnit ast, ITypeRoot javaElement, IProgressMonitor progressMonitor) {
 		if (DEBUG)
@@ -613,7 +619,7 @@ public final class ASTProvider {
 
 				return;
 			}
-			fIsReconciling= progressMonitor != null && progressMonitor.isCanceled();
+			fIsReconciling= false;
 			cache(ast, javaElement);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
index 7f90955..77db69c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileDocumentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,13 +10,11 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.javaeditor;
 
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
 
 import org.eclipse.core.resources.IResource;
 
@@ -39,6 +37,7 @@ import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaElementDelta;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
@@ -71,6 +70,8 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 
 		/**
 		 * Default constructor.
+		 * 
+		 * @param input the class file editor input
 		 */
 		public ClassFileSynchronizer(IClassFileEditorInput input) {
 
@@ -106,7 +107,10 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 
 		/**
 		 * Recursively check whether the class file has been deleted.
-		 * Returns true if delta processing can be stopped.
+		 * 
+		 * @param input the package fragment root
+		 * @param delta the Java element delta
+		 * @return <code>true</code> if delta processing can be stopped
 		 */
 		protected boolean check(IPackageFragmentRoot input, IJavaElementDelta delta) {
 			IJavaElement element= delta.getElement();
@@ -310,13 +314,6 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 	}
 
 	/*
-	 * @see AbstractDocumentProvider#doSaveDocument(IProgressMonitor, Object, IDocument)
-	 */
-	protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document) throws CoreException {
-	}
-
-
-	/*
 	 * @see org.eclipse.ui.texteditor.IDocumentProviderExtension3#isSynchronized(java.lang.Object)
 	 * @since 3.0
 	 */
@@ -340,11 +337,43 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 	 * @param input the editor input
 	 */
 	protected void handleDeleted(IClassFileEditorInput input) {
+		if (input == null) {
+			fireElementDeleted(input);
+			return;
+		}
+
+		if (input.exists())
+			return;
+
+		IClassFile cf= input.getClassFile();
+		try {
+			/*
+			 * Let's try to find the class file - maybe the JAR changed
+			 */
+			IType type= cf.getType();
+			IJavaProject project= cf.getJavaProject();
+			if (project != null) {
+				type= project.findType(type.getFullyQualifiedName());
+				if (type != null) {
+					IEditorInput editorInput= EditorUtility.getEditorInput(type.getParent());
+					if (editorInput instanceof IClassFileEditorInput) {
+						fireInputChanged((IClassFileEditorInput)editorInput);
+						return;
+					}
+				}
+			}
+		} catch (JavaModelException x) {
+			// Don't log and fall through: element deleted
+		}
+
 		fireElementDeleted(input);
+
 	}
 
 	/**
 	 * Fires input changes to input change listeners.
+	 * 
+	 * @param input the class file editor input
 	 */
 	protected void fireInputChanged(IClassFileEditorInput input) {
 		List list= new ArrayList(fInputListeners);
@@ -354,6 +383,8 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 
 	/**
 	 * Adds an input change listener.
+	 * 
+	 * @param listener the input change listener
 	 */
 	public void addInputChangeListener(InputChangeListener listener) {
 		fInputListeners.add(listener);
@@ -361,6 +392,8 @@ public class ClassFileDocumentProvider extends FileDocumentProvider {
 
 	/**
 	 * Removes an input change listener.
+	 * 
+	 * @param listener the input change listener
 	 */
 	public void removeInputChangeListener(InputChangeListener listener) {
 		fInputListeners.remove(listener);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
index 2ad3ad5..efaa93e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -215,7 +215,7 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 		private void createSourceAttachmentControls(Composite composite, IPackageFragmentRoot root) throws JavaModelException {
 			IClasspathEntry entry;
 			try {
-				entry= root.getRawClasspathEntry();
+				entry= JavaModelUtil.getClasspathEntry(root);
 			} catch (JavaModelException ex) {
 				if (ex.isDoesNotExist())
 					entry= null;
@@ -282,7 +282,7 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 					try {
 						IClasspathEntry result= BuildPathDialogAccess.configureSourceAttachment(shell, entry);
 						if (result != null) {
-							applySourceAttachment(shell, result, jproject, containerPath);
+							applySourceAttachment(shell, result, jproject, containerPath, entry.getReferencingEntry() != null);
 							verifyInput(getEditorInput());
 						}
 					} catch (CoreException e) {
@@ -296,9 +296,9 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 			};
 		}
 
-		protected void applySourceAttachment(Shell shell, IClasspathEntry newEntry, IJavaProject project, IPath containerPath) {
+		protected void applySourceAttachment(Shell shell, IClasspathEntry newEntry, IJavaProject project, IPath containerPath, boolean isReferencedEntry) {
 			try {
-				IRunnableWithProgress runnable= SourceAttachmentBlock.getRunnable(shell, newEntry, project, containerPath);
+				IRunnableWithProgress runnable= SourceAttachmentBlock.getRunnable(shell, newEntry, project, containerPath, isReferencedEntry);
 				PlatformUI.getWorkbench().getProgressService().run(true, true, runnable);
 
 			} catch (InvocationTargetException e) {
@@ -459,13 +459,13 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 
 			synchronized(this) {
 				if (fPosted) {
-					if (input != null && input.equals(fClassFileEditorInput))
+					if (isEqualInput(input, fClassFileEditorInput))
 						fClassFileEditorInput= input;
 					return;
 				}
 			}
 
-			if (input != null && input.equals(getEditorInput())) {
+			if (isEqualInput(input, getEditorInput())) {
 				ISourceViewer viewer= getSourceViewer();
 				if (viewer != null) {
 					StyledText textWidget= viewer.getTextWidget();
@@ -479,6 +479,10 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 				}
 			}
 		}
+
+		private boolean isEqualInput(IEditorInput input1, IEditorInput input2) {
+			return input1 != null && input1.equals(input2);
+		}
 	}
 
 
@@ -674,6 +678,8 @@ public class ClassFileEditor extends JavaEditor implements ClassFileDocumentProv
 
 		final ITypeRoot inputElement= getInputJavaElement();
 
+		JavaPlugin.getDefault().getASTProvider().activeJavaEditorChanged(this);
+
 		Job job= new Job(JavaEditorMessages.OverrideIndicatorManager_intallJob) {
 			/*
 			 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java
index 5ed6035..ddba67c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public class ClassFileEditorInputFactory implements IElementFactory {
 				 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=83221
 				 */
 				IClassFile cf= (IClassFile)element;
-				IType type= cf.getType(); // this will work, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=154667
+				IType type= cf.getType();
 				IJavaProject project= element.getJavaProject();
 				if (project != null) {
 					type= project.findType(type.getFullyQualifiedName());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
index 5e56ed9..b2b5530 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,6 +78,7 @@ import org.eclipse.jface.text.source.IAnnotationModelListenerExtension;
 import org.eclipse.jface.text.source.IAnnotationPresentation;
 import org.eclipse.jface.text.source.ImageUtilities;
 
+import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.IStorageEditorInput;
@@ -530,8 +531,14 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 			int start= problem.getSourceStart();
 			int end= problem.getSourceEnd();
 
-			if (end == 0 && start == 0)
-				return new Position(0, 0);
+			if (start == -1 && end == -1)
+				return new Position(0);
+
+			if (start == -1)
+				return new Position(end);
+
+			if (end == -1)
+				return new Position(start);
 
 			int length= end - start + 1;
 			if (length < 0)
@@ -691,9 +698,9 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 
 		/**
 		 * Overlays value with problem annotation.
-		 *
+		 * 
 		 * @param value the value
-		 * @param problemAnnotation
+		 * @param problemAnnotation the problem annotation
 		 */
 		private void setOverlay(Object value, ProblemAnnotation problemAnnotation) {
 			if (value instanceof  JavaMarkerAnnotation) {
@@ -1028,6 +1035,8 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 			final IPath documentPath;
 			if (storage instanceof IFileState)
 				documentPath= storagePath.append(Long.toString(((IFileState)storage).getModificationTime()));
+			else if (isFileRevisionEditorInput(editorInput))
+				documentPath= storagePath.append(Long.toString(System.currentTimeMillis()));
 			else
 				documentPath= storagePath;
 
@@ -1098,6 +1107,27 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 	}
 
 	/**
+	 * Tests whether the given editor input is an instance of
+	 * <code>org.eclipse.team.internal.ui.history.FileRevisionEditorInput</code>.
+	 * <p>
+	 * XXX: Workaround for https://bugs.eclipse.org/307756, see comment 2 on how a better solution
+	 * could look like.
+	 * </p>
+	 * 
+	 * @param editorInput the editor input to test
+	 * @return <code>true</code> if it is an instance of
+	 *         <code>org.eclipse.team.internal.ui.history.FileRevisionEditorInput</code>
+	 * @since 3.6
+	 */
+	private static boolean isFileRevisionEditorInput(IEditorInput editorInput) {
+		try {
+			return Class.forName("org.eclipse.team.internal.ui.history.FileRevisionEditorInput").isInstance(editorInput); //$NON-NLS-1$
+		} catch (ClassNotFoundException ex) {
+			return false;
+		}
+	}
+
+	/**
 	 * Creates a fake compilation unit.
 	 *
 	 * @param editorInput the URI editor input
@@ -1109,7 +1139,8 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 			final URI uri= editorInput.getURI();
 			final IFileStore fileStore= EFS.getStore(uri);
 			final IPath path= URIUtil.toPath(uri);
-			if (fileStore.getName() == null || path == null)
+			String fileStoreName= fileStore.getName();
+			if (fileStoreName == null || path == null)
 				return null;
 
 			WorkingCopyOwner woc= new WorkingCopyOwner() {
@@ -1118,7 +1149,7 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 				 * @since 3.2
 				 */
 				public IBuffer createBuffer(ICompilationUnit workingCopy) {
-					return new DocumentAdapter(workingCopy, path);
+					return new DocumentAdapter(workingCopy, fileStore, path);
 				}
 			};
 
@@ -1130,7 +1161,7 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 			if (cpEntries == null || cpEntries.length == 0)
 				cpEntries= new IClasspathEntry[] { JavaRuntime.getDefaultJREContainerEntry() };
 
-			final ICompilationUnit cu= woc.newWorkingCopy(fileStore.getName(), cpEntries, getProgressMonitor());
+			final ICompilationUnit cu= woc.newWorkingCopy(fileStoreName, cpEntries, getProgressMonitor());
 
 			if (!isModifiable(editorInput))
 				JavaModelUtil.reconcile(cu);
@@ -1504,22 +1535,22 @@ public class CompilationUnitDocumentProvider extends TextFileDocumentProvider im
 		return new DefaultLineTracker();
 	}
 
-    /**
-     * Notify post save listeners.
-     * <p>
-     * <strong>Note:</strong> Post save listeners are not
-     * allowed to save the file and they must not assumed to be
-     * called in the UI thread i.e. if they open a dialog they
-     * must ensure it ends up in the UI thread.
-     * </p>
-     * @param info compilation unit info
-     * @param changedRegions
-     * @param listeners the listeners to notify
+	/**
+	 * Notify post save listeners.
+	 * <p>
+	 * <strong>Note:</strong> Post save listeners are not allowed to save the file and they must not
+	 * assumed to be called in the UI thread i.e. if they open a dialog they must ensure it ends up
+	 * in the UI thread.
+	 * </p>
+	 * 
+	 * @param info compilation unit info
+	 * @param changedRegions the array with the changed regions
+	 * @param listeners the listeners to notify
 	 * @param monitor the progress monitor
-     * @throws CoreException
-     * @see IPostSaveListener
-     * @since 3.3
-     */
+	 * @throws CoreException if something goes wrong
+	 * @see IPostSaveListener
+	 * @since 3.3
+	 */
 	protected void notifyPostSaveListeners(final CompilationUnitInfo info, final IRegion[] changedRegions, IPostSaveListener[] listeners, final IProgressMonitor monitor) throws CoreException {
 		final ICompilationUnit unit= info.fCopy;
 		final IBuffer buffer= unit.getBuffer();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
index 5161c9c..aa63096 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1593,7 +1593,7 @@ public class CompilationUnitEditor extends JavaEditor implements IJavaReconcilin
 	/*
 	 * @see org.eclipse.jdt.internal.ui.javaeditor.JavaEditor#createJavaSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, org.eclipse.jface.text.source.IOverviewRuler, boolean, int)
 	 */
-	protected JavaSourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
+	protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
 		return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles, store);
 	}
 
@@ -1618,7 +1618,7 @@ public class CompilationUnitEditor extends JavaEditor implements IJavaReconcilin
 	 */
 	public void reconciled(CompilationUnit ast, boolean forced, IProgressMonitor progressMonitor) {
 
-		// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=58245
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=58245
 		JavaPlugin javaPlugin= JavaPlugin.getDefault();
 		if (javaPlugin == null)
 			return;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ConstructedJavaEditorMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ConstructedJavaEditorMessages.properties
index f01e516..4eee6fb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ConstructedJavaEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ConstructedJavaEditorMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -79,10 +79,6 @@ OpenStructure.label= Open Stru&cture
 OpenStructure.tooltip= Opens Structure of Selected Element
 OpenStructure.description= Opens the structure of the selected element
 
-OpenExternalJavadoc.label=Open External Javadoc
-OpenExternalJavadoc.tooltip=Opens Javadoc in an External Browser for the Element at the Cursor Position
-OpenExternalJavadoc.description=Opens Javadoc in an external browser for the element at the cursor position
-
 Comment.label=Co&mment
 Comment.tooltip=Comment the Selected Lines
 Comment.description=Turn the selected lines into Java comments
@@ -160,7 +156,7 @@ GotoMatchingBracket.description=Go to Matching Bracket
 
 SourceAttachmentDialog.title=Attachments For ''{0}''
 SourceAttachmentDialog.error.title=Error Attaching Source
-SourceAttachmentDialog.error.message=An error occurred while associating the source
+SourceAttachmentDialog.error.message=An error occurred while associating the source.
 
 JavaSelectAnnotationRulerAction.QuickFix.label= &Quick Fix
 JavaSelectAnnotationRulerAction.QuickFix.tooltip= Quick Fix
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DocumentAdapter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DocumentAdapter.java
index 3570cdf..26a13c1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DocumentAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DocumentAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,10 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.javaeditor;
 
-
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -20,6 +18,8 @@ import java.util.Set;
 
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.core.filesystem.IFileStore;
+
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -205,18 +205,16 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 	private Set fLegalLineDelimiters;
 
 	private List fBufferListeners= new ArrayList(3);
-	private IStatus fStatus;
 
-	/*
-	 * @since 3.2
-	 */
+	/** @since 3.2 */
 	private IPath fPath;
 
-	/*
-	 * @since 3.3
-	 */
+	/** @since 3.3 */
 	private LocationKind fLocationKind;
 
+	/** @since 3.6 */
+	private IFileStore fFileStore;
+
 
 	/**
 	 * Constructs a new document adapter.
@@ -227,8 +225,26 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 	 */
 	public DocumentAdapter(IOpenable owner, IPath path) {
 		Assert.isLegal(path != null);
+		fOwner= owner;
+		fPath= path;
+		fLocationKind= LocationKind.NORMALIZE;
+
+		initialize();
+	}
 
+	/**
+	 * Constructs a new document adapter.
+	 * 
+	 * @param owner the owner of this buffer
+	 * @param fileStore the file store of the file that backs the buffer
+	 * @param path the path of the file that backs the buffer
+	 * @since 3.6
+	 */
+	public DocumentAdapter(IOpenable owner, IFileStore fileStore, IPath path) {
+		Assert.isLegal(fileStore != null);
+		Assert.isLegal(path != null);
 		fOwner= owner;
+		fFileStore= fileStore;
 		fPath= path;
 		fLocationKind= LocationKind.NORMALIZE;
 
@@ -242,7 +258,6 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 	 * @param file the <code>IFile</code> that backs the buffer
 	 */
 	public DocumentAdapter(IOpenable owner, IFile file) {
-
 		fOwner= owner;
 		fFile= file;
 		fPath= fFile.getFullPath();
@@ -254,11 +269,15 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 	private void initialize() {
 		ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
 		try {
-			manager.connect(fPath, fLocationKind, new NullProgressMonitor());
-			fTextFileBuffer= manager.getTextFileBuffer(fPath, fLocationKind);
+			if (fFileStore != null) {
+				manager.connectFileStore(fFileStore, new NullProgressMonitor());
+				fTextFileBuffer= manager.getFileStoreTextFileBuffer(fFileStore);
+			} else {
+				manager.connect(fPath, fLocationKind, new NullProgressMonitor());
+				fTextFileBuffer= manager.getTextFileBuffer(fPath, fLocationKind);
+			}
 			fDocument= fTextFileBuffer.getDocument();
 		} catch (CoreException x) {
-			fStatus= x.getStatus();
 			fDocument= manager.createEmptyDocument(fPath, fLocationKind);
 			if (fDocument instanceof ISynchronizable)
 				((ISynchronizable)fDocument).setLockObject(new Object());
@@ -268,19 +287,6 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 	}
 
 	/**
-	 * Returns the status of this document adapter.
-	 *
-	 * @return the status
-	 */
-	public IStatus getStatus() {
-		if (fStatus != null)
-			return fStatus;
-		if (fTextFileBuffer != null)
-			return fTextFileBuffer.getStatus();
-		return null;
-	}
-
-	/**
 	 * Returns the adapted document.
 	 *
 	 * @return the adapted document
@@ -339,7 +345,10 @@ public class DocumentAdapter implements IBuffer, IDocumentListener, ITextEditCap
 		if (fTextFileBuffer != null) {
 			ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
 			try {
-				manager.disconnect(fPath, fLocationKind, new NullProgressMonitor());
+				if (fFileStore != null)
+					manager.disconnectFileStore(fFileStore, new NullProgressMonitor());
+				else
+					manager.disconnect(fPath, fLocationKind, new NullProgressMonitor());
 			} catch (CoreException x) {
 				// ignore
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java
index 2bd880a..bf43eb7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -233,7 +233,7 @@ public class EditorUtility {
 	/*
 	 * Avoid unnecessary loading of Compare plug-in
 	 */
-	private static boolean isCompareEditorInput(IEditorInput input) {
+	public static boolean isCompareEditorInput(IEditorInput input) {
 		return isComparePlugInActivated() && JavaCompareUtilities.isCompareEditorInput(input);
 	}
 
@@ -301,10 +301,14 @@ public class EditorUtility {
 		}
 
 		// Support for non-text editor - try IGotoMarker interface
-		 if (editor instanceof IGotoMarker) {
+		final IGotoMarker gotoMarkerTarget;
+		if (editor instanceof IGotoMarker)
+			gotoMarkerTarget= (IGotoMarker)editor;
+		else
+			gotoMarkerTarget= editor != null ? (IGotoMarker)editor.getAdapter(IGotoMarker.class) : null;
+		if (gotoMarkerTarget != null) {
 			final IEditorInput input= editor.getEditorInput();
 			if (input instanceof IFileEditorInput) {
-				final IGotoMarker gotoMarkerTarget= (IGotoMarker)editor;
 				WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
 					protected void execute(IProgressMonitor monitor) throws CoreException {
 						IMarker marker= null;
@@ -437,11 +441,15 @@ public class EditorUtility {
 		if (editorInput == null)
 			return null;
 
-		ITypeRoot je= JavaUI.getEditorInputTypeRoot(editorInput);
-		if (je != null || primaryOnly)
-			return je;
+		ICompilationUnit cu= JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput, primaryOnly);
+		if (cu != null)
+			return cu;
 
-		return  JavaPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editorInput, false);
+		IJavaElement je= (IJavaElement)editorInput.getAdapter(IJavaElement.class);
+		if (je instanceof ITypeRoot)
+			return (ITypeRoot)je;
+
+		return null;
 	}
 
 	private static IEditorInput getEditorInput(IJavaElement element) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ICompilationUnitDocumentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ICompilationUnitDocumentProvider.java
index 5c55d3d..c4572af 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ICompilationUnitDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ICompilationUnitDocumentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,13 +43,14 @@ public interface ICompilationUnitDocumentProvider extends IDocumentProvider, IDo
 	ICompilationUnit getWorkingCopy(Object element);
 
 	/**
-	 * Saves the content of the given document to the given element. This method has
-	 * only an effect if it is called when directly or indirectly inside <code>saveDocument</code>.
-	 *
+	 * Saves the content of the given document to the given element. This method has only an effect
+	 * if it is called when directly or indirectly inside <code>saveDocument</code>.
+	 * 
 	 * @param monitor the progress monitor
 	 * @param element the element to which to save
 	 * @param document the document to save
 	 * @param overwrite <code>true</code> if the save should be enforced
+	 * @throws CoreException if the document content could not be saved
 	 */
 	void saveDocumentContent(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java
index 06360f9..3bde298 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IJavaAnnotation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,21 +26,33 @@ import org.eclipse.jdt.core.compiler.CategorizedProblem;
 public interface IJavaAnnotation {
 
 	/**
+	 * Returns the type of the annotation.
+	 * 
+	 * @return the type of the annotation
 	 * @see org.eclipse.jface.text.source.Annotation#getType()
 	 */
 	String getType();
 
 	/**
+	 * Returns whether this annotation is persistent.
+	 * 
+	 * @return <code>true</code> if this annotation is persistent, <code>false</code> otherwise
 	 * @see org.eclipse.jface.text.source.Annotation#isPersistent()
 	 */
 	boolean isPersistent();
 
 	/**
+	 * Returns whether this annotation is marked as deleted.
+	 * 
+	 * @return <code>true</code> if annotation is marked as deleted, <code>false</code> otherwise
 	 * @see org.eclipse.jface.text.source.Annotation#isMarkedDeleted()
 	 */
 	boolean isMarkedDeleted();
 
 	/**
+	 * Returns the text associated with this annotation.
+	 * 
+	 * @return the text associated with this annotation or <code>null</code>
 	 * @see org.eclipse.jface.text.source.Annotation#getText()
 	 */
 	String getText();
@@ -93,8 +105,9 @@ public interface IJavaAnnotation {
 	boolean isProblem();
 
 	/**
-	 * Returns the compilation unit corresponding to the document on which the annotation is set
-	 * or <code>null</code> if no corresponding compilation unit exists.
+	 * Returns the compilation unit corresponding to the document on which the annotation.
+	 * 
+	 * @return the compilation unit or <code>null</code> if no corresponding compilation unit exists
 	 */
 	ICompilationUnit getCompilationUnit();
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/InternalClassFileEditorInput.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/InternalClassFileEditorInput.java
index 703f348..06ec8dd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/InternalClassFileEditorInput.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/InternalClassFileEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.javaeditor;
 
 
@@ -18,6 +17,7 @@ import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPersistableElement;
 
 import org.eclipse.jdt.core.IClassFile;
+import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.JavaModelException;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
@@ -108,7 +108,9 @@ public class InternalClassFileEditorInput implements IClassFileEditorInput, IPer
 	public Object getAdapter(Class adapter) {
 		if (adapter == IClassFile.class)
 			return fClassFile;
-		return fClassFile.getAdapter(adapter);
+		else if (adapter == IJavaElement.class)
+			return fClassFile;
+		return null;
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
index c735007..fa8f414 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,6 +150,7 @@ import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
 import org.eclipse.ui.texteditor.IUpdate;
 import org.eclipse.ui.texteditor.MarkerAnnotation;
+import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
 import org.eclipse.ui.texteditor.SourceViewerDecorationSupport;
 import org.eclipse.ui.texteditor.TextNavigationAction;
 import org.eclipse.ui.texteditor.TextOperationAction;
@@ -179,10 +180,10 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 import org.eclipse.jdt.core.util.IModifierConstants;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 
 import org.eclipse.jdt.ui.IContextMenuConstants;
@@ -1534,6 +1535,18 @@ public abstract class JavaEditor extends AbstractDecoratedTextEditor implements
 	 * @since 3.0
 	 */
 	private EditorSelectionChangedListener fEditorSelectionChangedListener;
+
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * @deprecated As of 3.5
+	 */
+	protected AbstractSelectionChangedListener fOutlineSelectionChangedListener= new AbstractSelectionChangedListener() {
+		public void selectionChanged(SelectionChangedEvent event) {
+		}
+		public void install(ISelectionProvider selectionProvider) {
+		}
+	};
+
 	/** The editor's bracket matcher */
 	protected JavaPairMatcher fBracketMatcher= new JavaPairMatcher(BRACKETS);
 	/** This editor's encoding support */
@@ -1829,40 +1842,53 @@ public abstract class JavaEditor extends AbstractDecoratedTextEditor implements
 		editorComposite.setLayout(fillLayout);
 
 		IPreferenceStore store= getPreferenceStore();
-		JavaSourceViewer javaSourceViewer= createJavaSourceViewer(editorComposite, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
+		ISourceViewer sourceViewer= createJavaSourceViewer(editorComposite, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
 
-		JavaUIHelp.setHelp(this, javaSourceViewer.getTextWidget(), IJavaHelpContextIds.JAVA_EDITOR);
+		JavaUIHelp.setHelp(this, sourceViewer.getTextWidget(), IJavaHelpContextIds.JAVA_EDITOR);
 
 		/*
 		 * This is a performance optimization to reduce the computation of
 		 * the text presentation triggered by {@link #setVisibleDocument(IDocument)}
 		 */
-		if (isFoldingEnabled() && (store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
-			javaSourceViewer.prepareDelayedProjection();
-
-		fProjectionSupport= new ProjectionSupport(javaSourceViewer, getAnnotationAccess(), getSharedColors());
-		fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
-		fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
-		fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell shell) {
-				return new SourceViewerInformationControl(shell, false, getOrientation(), EditorsUI.getTooltipAffordanceString());
-			}
-		});
-		fProjectionSupport.setInformationPresenterControlCreator(new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell shell) {
-				return new SourceViewerInformationControl(shell, true, getOrientation(), null);
+		if (sourceViewer instanceof JavaSourceViewer && isFoldingEnabled() && (store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
+			((JavaSourceViewer)sourceViewer).prepareDelayedProjection();
+
+		if (sourceViewer instanceof ProjectionViewer) {
+			fProjectionSupport= new ProjectionSupport((ProjectionViewer)sourceViewer, getAnnotationAccess(), getSharedColors());
+			MarkerAnnotationPreferences markerAnnotationPreferences= (MarkerAnnotationPreferences)getAdapter(MarkerAnnotationPreferences.class);
+			if (markerAnnotationPreferences != null) {
+				Iterator e= markerAnnotationPreferences.getAnnotationPreferences().iterator();
+				while (e.hasNext()) {
+					AnnotationPreference annotationPreference= (AnnotationPreference)e.next();
+					Object annotationType= annotationPreference.getAnnotationType();
+					if (annotationType instanceof String)
+						fProjectionSupport.addSummarizableAnnotationType((String)annotationType);
+				}
+			} else {
+				fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.error"); //$NON-NLS-1$
+				fProjectionSupport.addSummarizableAnnotationType("org.eclipse.ui.workbench.texteditor.warning"); //$NON-NLS-1$
 			}
-		});
-		fProjectionSupport.install();
+			fProjectionSupport.setHoverControlCreator(new IInformationControlCreator() {
+				public IInformationControl createInformationControl(Shell shell) {
+					return new SourceViewerInformationControl(shell, false, getOrientation(), EditorsUI.getTooltipAffordanceString());
+				}
+			});
+			fProjectionSupport.setInformationPresenterControlCreator(new IInformationControlCreator() {
+				public IInformationControl createInformationControl(Shell shell) {
+					return new SourceViewerInformationControl(shell, true, getOrientation(), null);
+				}
+			});
+			fProjectionSupport.install();
 
-		fProjectionModelUpdater= JavaPlugin.getDefault().getFoldingStructureProviderRegistry().getCurrentFoldingProvider();
-		if (fProjectionModelUpdater != null)
-			fProjectionModelUpdater.install(this, javaSourceViewer);
+			fProjectionModelUpdater= JavaPlugin.getDefault().getFoldingStructureProviderRegistry().getCurrentFoldingProvider();
+			if (fProjectionModelUpdater != null)
+				fProjectionModelUpdater.install(this, (ProjectionViewer)sourceViewer);
+		}
 
 		// ensure source viewer decoration support has been created and configured
-		getSourceViewerDecorationSupport(javaSourceViewer);
+		getSourceViewerDecorationSupport(sourceViewer);
 
-		return javaSourceViewer;
+		return sourceViewer;
 	}
 
 	/**
@@ -1979,7 +2005,7 @@ public abstract class JavaEditor extends AbstractDecoratedTextEditor implements
 	 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
 	 * @return the source viewer
 	 */
-	protected JavaSourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
+	protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
 		return new JavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles, store);
 	}
 
@@ -2133,7 +2159,7 @@ public abstract class JavaEditor extends AbstractDecoratedTextEditor implements
 		if (required == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_OUTLINE, IPageLayout.ID_RES_NAV };
+					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_OUTLINE, JavaPlugin.ID_RES_NAV };
 				}
 
 			};
@@ -3569,7 +3595,7 @@ public abstract class JavaEditor extends AbstractDecoratedTextEditor implements
 	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#setStatusLineErrorMessage(java.lang.String)
 	 * @since 3.5
 	 */
-	protected void setStatusLineErrorMessage(String message) {
+	public void setStatusLineErrorMessage(String message) {
 		long now= System.currentTimeMillis();
 		if (message != null || now - fErrorMessageTime > ERROR_MESSAGE_TIMEOUT) {
 			super.setStatusLineErrorMessage(message);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java
index 65f9504..1fc3ff5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,11 +66,13 @@ import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+
 import org.eclipse.jdt.ui.IWorkingCopyProvider;
 import org.eclipse.jdt.ui.JavaElementComparator;
 import org.eclipse.jdt.ui.JavaElementLabels;
-import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
 import org.eclipse.jdt.ui.ProblemsLabelDecorator.ProblemsLabelChangedEvent;
+import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
@@ -612,7 +614,7 @@ public class JavaEditorBreadcrumb extends EditorBreadcrumb {
 				IPackageFragmentRoot[] roots= project.getPackageFragmentRoots();
 				for (int i= 0; i < roots.length; i++) {
 					IPackageFragmentRoot root= roots[i];
-					IClasspathEntry classpathEntry= root.getRawClasspathEntry();
+					IClasspathEntry classpathEntry= JavaModelUtil.getClasspathEntry(root);
 					int entryKind= classpathEntry.getEntryKind();
 					if (entryKind == IClasspathEntry.CPE_CONTAINER) {
 						// all ClassPathContainers are added later
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java
index 9102562..866a68f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java
@@ -63,17 +63,13 @@ final class JavaEditorMessages extends NLS {
 	public static String CompilationUnitDocumentProvider_error_saveParticipantSavedFile;
 	public static String CompilationUnitDocumentProvider_error_saveParticipantFailed;
 	public static String CompilationUnitEditor_error_saving_message1;
-	public static String CompilationUnitEditor_error_saving_message2;
 	public static String CompilationUnitEditor_error_saving_title1;
-	public static String CompilationUnitEditor_error_saving_title2;
 	public static String CompilationUnitEditor_error_saving_editedLines_calculation_message;
 	public static String CompilationUnitEditor_error_saving_editedLines_calculation_link;
 	public static String CompilationUnitEditor_error_saving_editedLines_calculation_property_link;
 	public static String CompilationUnitEditor_error_saving_participant_message;
 	public static String CompilationUnitEditor_error_saving_participant_link;
 	public static String CompilationUnitEditor_error_saving_participant_property_link;
-	public static String CompilationUnitEditor_warning_save_delete;
-	public static String EditorUtility_could_not_find_editorId;
 	public static String EditorUtility_file_must_not_be_null;
 	public static String EditorUtility_no_active_WorkbenchPage;
 	public static String EditorUtility_no_editorInput;
@@ -90,23 +86,7 @@ final class JavaEditorMessages extends NLS {
 	public static String Editor_FoldingMenu_name;
 	public static String CompilationUnitDocumentProvider_saveAsTargetOpenInEditor;
 	public static String ClassFileDocumentProvider_error_createElementInfo;
-	public static String StructureSelect_error_title;
-	public static String StructureSelect_error_message;
-	public static String StructureSelectNext_label;
-	public static String StructureSelectNext_tooltip;
-	public static String StructureSelectNext_description;
-	public static String StructureSelectPrevious_label;
-	public static String StructureSelectPrevious_tooltip;
-	public static String StructureSelectPrevious_description;
-	public static String StructureSelectEnclosing_label;
-	public static String StructureSelectEnclosing_tooltip;
-	public static String StructureSelectEnclosing_description;
-	public static String StructureSelectHistory_label;
-	public static String StructureSelectHistory_tooltip;
-	public static String StructureSelectHistory_description;
 	public static String ExpandSelectionMenu_label;
-	public static String GotoNextMember_label;
-	public static String GotoPreviousMember_label;
 	public static String GotoMatchingBracket_label;
 	public static String GotoMatchingBracket_error_invalidSelection;
 	public static String GotoMatchingBracket_error_noMatchingBracket;
@@ -125,7 +105,6 @@ final class JavaEditorMessages extends NLS {
 	public static String SourceAttachmentForm_error_message;
 	public static String SourceAttachmentForm_attach_error_title;
 	public static String SourceAttachmentForm_attach_error_message;
-	public static String SourceAttachmentForm_message_containerEntry;
 	public static String EditorUtility_concatModifierStrings;
 	public static String OverrideIndicatorManager_implements;
 	public static String OverrideIndicatorManager_intallJob;
@@ -156,7 +135,6 @@ final class JavaEditorMessages extends NLS {
 	public static String SemanticHighlighting_annotations;
 	public static String SemanticHighlighting_typeArguments;
 	public static String JavaEditor_markOccurrences_job_name;
-	public static String JavaEditor_occurrence_tooltip;
 	public static String JavaEditorBreadcrumbActionGroup_go_to_editor_action_label;
 	public static String JavaElementHyperlink_hyperlinkText;
 	public static String JavaElementHyperlink_hyperlinkText_qualified;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties
index daecfd7..1e99e45 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -32,16 +32,13 @@ ClassFileMarkerAnnotationModel_error_isAffected=ClassFileMarkerAnnotationModel.i
 ClassFileMarkerAnnotationModel_error_resourceChanged=ClassFileMarkerAnnotationModel.resourceChanged
 
 CompilationUnitEditor_error_saving_message1=File has been deleted or is not accessible.
-CompilationUnitEditor_error_saving_message2=Could not save file.
 CompilationUnitEditor_error_saving_title1=Cannot Save
-CompilationUnitEditor_error_saving_title2=Save Problems
 CompilationUnitEditor_error_saving_editedLines_calculation_message=The file has been saved but a failure occurred while calculating the edited lines.
 CompilationUnitEditor_error_saving_editedLines_calculation_link=If the problem persists disable to format edited lines on the <a>Save Actions</a> preference page.
 CompilationUnitEditor_error_saving_editedLines_calculation_property_link=If the problem persists disable to format edited lines on the <a>Save Actions</a> property page.
 CompilationUnitEditor_error_saving_participant_message=The file has been saved but one of the save actions failed.
 CompilationUnitEditor_error_saving_participant_link=If the problem persists disable the failing participants on the <a>Save Actions</a> preference page.
 CompilationUnitEditor_error_saving_participant_property_link=If the problem persists disable the failing participants on the <a>Save Actions</a> property page.
-CompilationUnitEditor_warning_save_delete=The original file ''{0}'' has been deleted or is not accessible.
 
 JavaOutlinePage_Sort_label=Sort
 JavaOutlinePage_Sort_tooltip=Sort
@@ -65,34 +62,12 @@ CompilationUnitDocumentProvider_error_saveParticipantProblem=A save participant
 CompilationUnitDocumentProvider_calculatingChangedRegions_message=Calculating changed regions
 CompilationUnitDocumentProvider_error_calculatingChangedRegions=An error occurred while calculating the changed regions. See error log for details.
 CompilationUnitDocumentProvider_error_saveParticipantSavedFile=The save participant ''{0}'' spuriously saved the file.
-CompilationUnitDocumentProvider_error_saveParticipantFailed=The save participant ''{0}'' caused an exception: {1}. See the error Log for details.
+CompilationUnitDocumentProvider_error_saveParticipantFailed=The save participant ''{0}'' caused an exception: {1}. See the error log for details.
 
 ClassFileDocumentProvider_error_createElementInfo=ClassFileDocumentProvider.createElementInfo
 
-StructureSelect_error_title= Expand Selection To
-StructureSelect_error_message= No source code attached to class file. To perform this operation you will need to attach source.
-
-StructureSelectNext_label=&Next Element
-StructureSelectNext_tooltip=Expand Selection to Include Next Sibling
-StructureSelectNext_description=Expand selection to include next sibling
-
-StructureSelectPrevious_label=&Previous Element
-StructureSelectPrevious_tooltip=Expand Selection to Include Previous Sibling
-StructureSelectPrevious_description=Expand selection to include previous sibling
-
-StructureSelectEnclosing_label=&Enclosing Element
-StructureSelectEnclosing_tooltip=Expand Selection to Include Enclosing Element
-StructureSelectEnclosing_description=Expand selection to include enclosing element
-
-StructureSelectHistory_label=&Restore Last Selection
-StructureSelectHistory_tooltip=Restore Last Selection
-StructureSelectHistory_description=Restore last selection
 ExpandSelectionMenu_label=E&xpand Selection To
 
-GotoNextMember_label= N&ext Member
-
-GotoPreviousMember_label= Previ&ous Member
-
 GotoMatchingBracket_label= Matching &Bracket
 GotoMatchingBracket_error_invalidSelection=No bracket selected
 GotoMatchingBracket_error_noMatchingBracket=No matching bracket found
@@ -109,17 +84,14 @@ SourceAttachmentForm_message_pressButtonToChange=You can change the source attac
 SourceAttachmentForm_button_attachSource=&Attach Source...
 SourceAttachmentForm_button_changeAttachedSource=&Change Attached Source...
 SourceAttachmentForm_error_title=Error Opening Source Attachment Form
-SourceAttachmentForm_error_message=An error occurred while opening the source attachment form
+SourceAttachmentForm_error_message=An error occurred while opening the source attachment form.
 SourceAttachmentForm_attach_error_title=Error Attaching Source
-SourceAttachmentForm_attach_error_message=An error occurred while applying the source attachment
-
-SourceAttachmentForm_message_containerEntry=The JAR of this classfile belongs to the container ''{0}''.\nTo configure the source attachment, go directly to the corresponding configuration page\n(For example for JREs go to ''Installed JREs'' page in preferences).
+SourceAttachmentForm_attach_error_message=An error occurred while applying the source attachment.
 
 EditorUtility_concatModifierStrings= {0} + {1}
 EditorUtility_no_editorInput=Could not get an editor input for the given element
 EditorUtility_file_must_not_be_null=File must not be null
 EditorUtility_no_active_WorkbenchPage=No active workbench page
-EditorUtility_could_not_find_editorId=Cannot find an editor ID for the given editor input
 
 OverrideIndicatorManager_implements= implements {0}
 OverrideIndicatorManager_intallJob= Override indicator installation job
@@ -152,7 +124,6 @@ SemanticHighlighting_annotations= Annotations
 SemanticHighlighting_typeArguments= Type arguments
 
 JavaEditor_markOccurrences_job_name= Occurrences Marker
-JavaEditor_occurrence_tooltip=Occurrence of ''{0}''
 JavaEditorBreadcrumbActionGroup_go_to_editor_action_label=&Go to Editor
 
 JavaElementHyperlink_hyperlinkText= Open Declaration
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementHyperlinkImplementationDetector.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementHyperlinkImplementationDetector.java
index 3dc99ad..2609263 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementHyperlinkImplementationDetector.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementHyperlinkImplementationDetector.java
@@ -40,7 +40,7 @@ public class JavaElementHyperlinkImplementationDetector extends JavaElementHyper
 	 */
 	protected IHyperlink createHyperlink(IRegion wordRegion, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, ITextEditor editor) {
 		if (element.getElementType() == IJavaElement.METHOD && canBeOverridden((IMethod)element)) {
-			return new JavaElementImplementationHyperlink(wordRegion, openAction, element, qualify, editor);
+			return new JavaElementImplementationHyperlink(wordRegion, openAction, (IMethod)element, qualify, editor);
 		}
 		return null;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java
index 01435c8..64ba396 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,14 +31,16 @@ import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.ITextOperationTarget;
 import org.eclipse.jface.text.hyperlink.IHyperlink;
 
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.ui.texteditor.ITextEditor;
 
-import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IMethod;
 import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.ITypeHierarchy;
 import org.eclipse.jdt.core.ITypeRoot;
+import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Expression;
@@ -49,6 +51,7 @@ import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SuperMethodInvocation;
 import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.core.search.SearchMatch;
 import org.eclipse.jdt.core.search.SearchParticipant;
@@ -58,6 +61,7 @@ import org.eclipse.jdt.core.search.SearchRequestor;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
 import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.corext.util.MethodOverrideTester;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.SharedASTProvider;
@@ -75,7 +79,7 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 	
 	private final IRegion fRegion;
 	private final SelectionDispatchAction fOpenAction;
-	private final IJavaElement fElement;
+	private final IMethod fMethod;
 	private final boolean fQualify;
 
 	/**
@@ -88,19 +92,19 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 	 * 
 	 * @param region the region of the link
 	 * @param openAction the action to use to open the java elements
-	 * @param element the java element to open
+	 * @param method the method to open
 	 * @param qualify <code>true</code> if the hyperlink text should show a qualified name for
 	 *            element.
 	 * @param editor the active java editor
 	 */
-	public JavaElementImplementationHyperlink(IRegion region, SelectionDispatchAction openAction, IJavaElement element, boolean qualify, ITextEditor editor) {
+	public JavaElementImplementationHyperlink(IRegion region, SelectionDispatchAction openAction, IMethod method, boolean qualify, ITextEditor editor) {
 		Assert.isNotNull(openAction);
 		Assert.isNotNull(region);
-		Assert.isNotNull(element);
+		Assert.isNotNull(method);
 
 		fRegion= region;
 		fOpenAction= openAction;
-		fElement= element;
+		fMethod= method;
 		fQualify= qualify;
 		fEditor= editor;
 	}
@@ -117,8 +121,8 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 	 */
 	public String getHyperlinkText() {
 		if (fQualify) {
-			String elementLabel= JavaElementLabels.getElementLabel(fElement, JavaElementLabels.ALL_FULLY_QUALIFIED);
-			return Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_hyperlinkText_qualified, new Object[] { elementLabel });
+			String methodLabel= JavaElementLabels.getElementLabel(fMethod, JavaElementLabels.ALL_FULLY_QUALIFIED);
+			return Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_hyperlinkText_qualified, new Object[] { methodLabel });
 		} else {
 			return JavaEditorMessages.JavaElementImplementationHyperlink_hyperlinkText;
 		}
@@ -139,15 +143,32 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 	 * </p>
 	 */
 	public void open() {
-		ITypeRoot editorInput= EditorUtility.getEditorInputJavaElement(fEditor, false);
+		openImplementations(fEditor, fRegion, fMethod, fOpenAction);
+	}
+
+	/**
+	 * Finds the implementations for the method.
+	 * <p>
+	 * If there's only one implementor that method is opened in the editor, otherwise the Quick
+	 * Hierarchy is opened.
+	 * </p>
+	 * 
+	 * @param openAction the action to use to open the methods
+	 * @param method the method
+	 * @param region the region of the selection
+	 * @param editor the active java editor
+	 * @since 3.6
+	 */
+	public static void openImplementations(IEditorPart editor, IRegion region, final IMethod method, SelectionDispatchAction openAction) {
+		ITypeRoot editorInput= EditorUtility.getEditorInputJavaElement(editor, false);
 
 		CompilationUnit ast= SharedASTProvider.getAST(editorInput, SharedASTProvider.WAIT_ACTIVE_ONLY, null);
 		if (ast == null) {
-			openQuickHierarchy();
+			openQuickHierarchy(editor);
 			return;
 		}
 
-		ASTNode node= NodeFinder.perform(ast, fRegion.getOffset(), fRegion.getLength());
+		ASTNode node= NodeFinder.perform(ast, region.getOffset(), region.getLength());
 		ITypeBinding parentTypeBinding= null;
 		if (node instanceof SimpleName) {
 			ASTNode parent= node.getParent();
@@ -160,18 +181,19 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 				}
 			} else if (parent instanceof SuperMethodInvocation) {
 				// Directly go to the super method definition
-				fOpenAction.run(new StructuredSelection(fElement));
+				openAction.run(new StructuredSelection(method));
 				return;
 			} else if (parent instanceof MethodDeclaration) {
 				parentTypeBinding= Bindings.getBindingOfParentType(node);
 			}
 		}
-		final IType type= parentTypeBinding != null ? (IType) parentTypeBinding.getJavaElement() : null;
-		if (type == null) {
-			openQuickHierarchy();
+		final IType receiverType= parentTypeBinding != null ? (IType)parentTypeBinding.getJavaElement() : null;
+		if (receiverType == null) {
+			openQuickHierarchy(editor);
 			return;
 		}
 
+		final boolean isMethodAbstract[]= new boolean[1];
 		final String dummyString= new String();
 		final ArrayList links= new ArrayList();
 		IRunnableWithProgress runnable= new IRunnableWithProgress() {
@@ -181,28 +203,43 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 					monitor= new NullProgressMonitor();
 				}
 				try {
-					String methodLabel= JavaElementLabels.getElementLabel(fElement, JavaElementLabels.DEFAULT_QUALIFIED);
-					monitor.beginTask(Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_search_method_implementors, methodLabel), 100);
+					String methodLabel= JavaElementLabels.getElementLabel(method, JavaElementLabels.DEFAULT_QUALIFIED);
+					monitor.beginTask(Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_search_method_implementors, methodLabel), 10);
 					SearchRequestor requestor= new SearchRequestor() {
 						public void acceptSearchMatch(SearchMatch match) throws CoreException {
 							if (match.getAccuracy() == SearchMatch.A_ACCURATE) {
-								IJavaElement element= (IJavaElement)match.getElement();
-								if (element instanceof IMethod && !JdtFlags.isAbstract((IMethod)element)) {
-									links.add(element);
-									if (links.size() > 1) {
-										throw new OperationCanceledException(dummyString);
+								Object element= match.getElement();
+								if (element instanceof IMethod) {
+									IMethod methodFound= (IMethod)element;
+									if (!JdtFlags.isAbstract(methodFound)) {
+										links.add(methodFound);
+										if (links.size() > 1) {
+											throw new OperationCanceledException(dummyString);
+										}
 									}
 								}
 							}
 						}
 					};
+
+					IJavaSearchScope hierarchyScope;
+					if (receiverType.isInterface()) {
+						hierarchyScope= SearchEngine.createHierarchyScope(method.getDeclaringType());
+					} else {
+						if (isFullHierarchyNeeded(new SubProgressMonitor(monitor, 3), method, receiverType))
+							hierarchyScope= SearchEngine.createHierarchyScope(receiverType);
+						else {
+							isMethodAbstract[0]= JdtFlags.isAbstract(method);
+							hierarchyScope= SearchEngine.createStrictHierarchyScope(null, receiverType, true, !isMethodAbstract[0], null);
+						}
+					}
+
 					int limitTo= IJavaSearchConstants.DECLARATIONS | IJavaSearchConstants.IGNORE_DECLARING_TYPE | IJavaSearchConstants.IGNORE_RETURN_TYPE;
-					SearchPattern pattern= SearchPattern.createPattern(fElement, limitTo);
+					SearchPattern pattern= SearchPattern.createPattern(method, limitTo);
 					Assert.isNotNull(pattern);
 					SearchParticipant[] participants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() };
 					SearchEngine engine= new SearchEngine();
-					engine.search(pattern, participants, SearchEngine.createHierarchyScope(type), requestor, new SubProgressMonitor(monitor, 100));
-
+					engine.search(pattern, participants, hierarchyScope, requestor, new SubProgressMonitor(monitor, 7));
 					if (monitor.isCanceled()) {
 						throw new OperationCanceledException();
 					}
@@ -215,11 +252,11 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 		};
 
 		try {
-			IRunnableContext context= fEditor.getSite().getWorkbenchWindow();
+			IRunnableContext context= editor.getSite().getWorkbenchWindow();
 			context.run(true, true, runnable);
 		} catch (InvocationTargetException e) {
 			IStatus status= new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK,
-					Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_error_status_message, fElement.getElementName()), e.getCause());
+					Messages.format(JavaEditorMessages.JavaElementImplementationHyperlink_error_status_message, method.getElementName()), e.getCause());
 			JavaPlugin.log(status);
 			ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
 					JavaEditorMessages.JavaElementImplementationHyperlink_hyperlinkText,
@@ -230,18 +267,38 @@ public class JavaElementImplementationHyperlink implements IHyperlink {
 			}
 		}
 
-		if (links.size() == 1) {
-			fOpenAction.run(new StructuredSelection(links.get(0)));
-		} else {
-			openQuickHierarchy();
-		}
+		if (links.isEmpty() && isMethodAbstract[0])
+			openAction.run(new StructuredSelection(method));
+		else if (links.size() == 1)
+			openAction.run(new StructuredSelection(links.get(0)));
+		else
+			openQuickHierarchy(editor);
+	}
+
+	/**
+	 * Checks whether a full type hierarchy is needed to search for implementors.
+	 * 
+	 * @param monitor the progress monitor
+	 * @param method the method
+	 * @param receiverType the receiver type
+	 * @return <code>true</code> if a full type hierarchy is needed, <code>false</code> otherwise
+	 * @throws JavaModelException if the java element does not exist or if an exception occurs while
+	 *             accessing its corresponding resource
+	 * @since 3.6
+	 */
+	private static boolean isFullHierarchyNeeded(IProgressMonitor monitor, IMethod method, IType receiverType) throws JavaModelException {
+		ITypeHierarchy superTypeHierarchy= receiverType.newSupertypeHierarchy(monitor);
+		MethodOverrideTester methodOverrideTester= new MethodOverrideTester(receiverType, superTypeHierarchy);
+		return methodOverrideTester.findOverriddenMethodInType(receiverType, method) == null;
 	}
 
 	/**
-	 * Opens a quick type hierarchy for the editor's current input.
+	 * Opens the quick type hierarchy for the given editor.
+	 *
+	 * @param editor the editor for which to open the quick hierarchy
 	 */
-	private void openQuickHierarchy() {
-		ITextOperationTarget textOperationTarget= (ITextOperationTarget)fEditor.getAdapter(ITextOperationTarget.class);
+	private static void openQuickHierarchy(IEditorPart editor) {
+		ITextOperationTarget textOperationTarget= (ITextOperationTarget)editor.getAdapter(ITextOperationTarget.class);
 		textOperationTarget.doOperation(JavaSourceViewer.SHOW_HIERARCHY);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTemplatesPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTemplatesPage.java
index 5c31109..bdb07e8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTemplatesPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaTemplatesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 Dakshinamurthy Karra, IBM Corporation and others.
+ * Copyright (c) 2007, 2009 Dakshinamurthy Karra, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -164,7 +164,7 @@ public class JavaTemplatesPage extends AbstractTemplatesPage {
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.texteditor.templates.AbstractTemplatesPage#getTemplateStore()
 	 */
-	protected TemplateStore getTemplateStore() {
+	public TemplateStore getTemplateStore() {
 		return TEMPLATE_STORE;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/NLSKeyHyperlinkDetector.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/NLSKeyHyperlinkDetector.java
index 1576f10..d613268 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/NLSKeyHyperlinkDetector.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/NLSKeyHyperlinkDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,11 +24,11 @@ import org.eclipse.ui.texteditor.ITextEditor;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.StringLiteral;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassReference;
 import org.eclipse.jdt.internal.corext.refactoring.nls.NLSHintHelper;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorImageProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorImageProvider.java
index 49dd800..50122b8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorImageProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorImageProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.javaeditor;
 
 import org.eclipse.swt.graphics.Image;
@@ -21,6 +20,7 @@ import org.eclipse.ui.texteditor.IAnnotationImageProvider;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 
+
 /**
  * Image provider for {@link org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager.OverrideIndicator} annotations.
  *
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingPresenter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingPresenter.java
index b89087e..1bd2fa9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingPresenter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightingPresenter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -698,11 +698,12 @@ public class SemanticHighlightingPresenter implements ITextPresentationListener,
 
 	/**
 	 * Add a position with the given range and highlighting unconditionally, only from UI thread.
-	 * The position will also be registered on the document. The text presentation is not invalidated.
-	 *
+	 * The position will also be registered on the document. The text presentation is not
+	 * invalidated.
+	 * 
 	 * @param offset The range offset
 	 * @param length The range length
-	 * @param highlighting
+	 * @param highlighting the highlighting
 	 */
 	private void addPositionFromUI(int offset, int length, Highlighting highlighting) {
 		Position position= createHighlightedPosition(offset, length, highlighting);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
index 8263c7b..4796f9d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/SemanticHighlightings.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1359,7 +1359,8 @@ public class SemanticHighlightings {
 			SimpleName name= token.getNode();
 			ASTNode node= name.getParent();
 			int nodeType= node.getNodeType();
-			if (nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode.QUALIFIED_TYPE && nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.ENUM_DECLARATION)
+			if (nodeType != ASTNode.METHOD_INVOCATION && nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode.QUALIFIED_TYPE && nodeType != ASTNode.QUALIFIED_NAME
+					&& nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.ENUM_DECLARATION)
 				return false;
 			while (nodeType == ASTNode.QUALIFIED_NAME) {
 				node= node.getParent();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ToggleCommentAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ToggleCommentAction.java
index db87814..739b8cb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ToggleCommentAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ToggleCommentAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -195,14 +195,18 @@ public final class ToggleCommentAction extends TextEditorAction {
 
 		try {
 
-			int startLine= document.getLineOfOffset(region.getOffset());
+			final int startLine= document.getLineOfOffset(region.getOffset());
 
 			int offset= document.getLineOffset(startLine);
 			if (offset >= region.getOffset())
 				return startLine;
 
-			offset= document.getLineOffset(startLine + 1);
-			return (offset > region.getOffset() + region.getLength() ? -1 : startLine + 1);
+			final int nextLine= startLine + 1;
+			if (nextLine == document.getNumberOfLines())
+				return -1;
+
+			offset= document.getLineOffset(nextLine);
+			return (offset > region.getOffset() + region.getLength() ? -1 : nextLine);
 
 		} catch (BadLocationException x) {
 			// should not happen
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/BreadcrumbViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/BreadcrumbViewer.java
index f5bd7ce..95654a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/BreadcrumbViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/breadcrumb/BreadcrumbViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.util.List;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.MenuDetectEvent;
 import org.eclipse.swt.events.MenuDetectListener;
 import org.eclipse.swt.events.TraverseEvent;
@@ -123,11 +122,6 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
 				}
 			}
 		});
-		fContainer.addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-				fGradientBackground.dispose();
-			}
-		});
 
 		hookControl(fContainer);
 
@@ -802,4 +796,29 @@ public abstract class BreadcrumbViewer extends StructuredViewer {
 		return new Color(display, blend);
 	}
 
+	/*
+	 * @see org.eclipse.jface.viewers.StructuredViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
+	 * @since 3.6.1
+	 */
+	protected void handleDispose(DisposeEvent event) {
+		if (fGradientBackground != null) {
+			fGradientBackground.dispose();
+			fGradientBackground= null;
+		}
+
+		if (fToolTipLabelProvider != null) {
+			fToolTipLabelProvider.dispose();
+			fToolTipLabelProvider= null;
+		}
+
+		if (fBreadcrumbItems != null) {
+			Iterator iterator= fBreadcrumbItems.iterator();
+			while (iterator.hasNext()) {
+				BreadcrumbItem item= (BreadcrumbItem)iterator.next();
+				item.dispose();
+			}
+		}
+
+		super.handleDispose(event);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.java
index 3bd0012..d7b0583 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,6 @@ final class SaveParticipantMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String SaveParticipantRegistry_participantNotFound;
 	public static String SaveParticipantRegistry_needsChangedRegionCausedException;
 	public static String SaveParticipantRegistry_needsChangedRegionFailed;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.properties
index db0d274..a4e5634 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/saveparticipant/SaveParticipantMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2007 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,6 +9,5 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-SaveParticipantRegistry_participantNotFound= The ''{0}'' save participant could not be found and will be disabled.
-SaveParticipantRegistry_needsChangedRegionCausedException=The save participant ''{0}'' caused an exception: {1}. See the error Log for details.
+SaveParticipantRegistry_needsChangedRegionCausedException=The save participant ''{0}'' caused an exception: {1}. See the error log for details.
 SaveParticipantRegistry_needsChangedRegionFailed= A save participant failed while querying whether changed regions are needed.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/GoToNextPreviousMemberAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/GoToNextPreviousMemberAction.java
index a544e6c..3a534ad 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/GoToNextPreviousMemberAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/GoToNextPreviousMemberAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,13 +32,12 @@ import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ISourceReference;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.ToolFactory;
 import org.eclipse.jdt.core.compiler.IScanner;
 import org.eclipse.jdt.core.compiler.ITerminalSymbols;
 import org.eclipse.jdt.core.compiler.InvalidInputException;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
-
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectionAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectionAction.java
index d95a659..1974672 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectionAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/selectionactions/StructureSelectionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,11 +24,11 @@ import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ISourceReference;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
 
-import org.eclipse.jdt.internal.corext.SourceRange;
 import org.eclipse.jdt.internal.corext.dom.Selection;
 import org.eclipse.jdt.internal.corext.dom.SelectionAnalyzer;
 
@@ -114,11 +114,12 @@ public abstract class StructureSelectionAction extends Action {
 
 	/**
 	 * Subclasses determine the actual new selection.
+	 * 
 	 * @param oldSourceRange the selected range
 	 * @param sr the current type root
 	 * @param selAnalyzer the selection analyzer
 	 * @return return the new selection range
-	 * @throws JavaModelException
+	 * @throws JavaModelException if getting the source range fails
 	 */
 	abstract ISourceRange internalGetNewSelectionRange(ISourceRange oldSourceRange, ISourceReference sr, SelectionAnalyzer selAnalyzer) throws JavaModelException;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/model/JavaModelLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/model/JavaModelLabelProvider.java
index de6ed67..29c78b5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/model/JavaModelLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/model/JavaModelLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.jdt.internal.ui.model;
 import org.eclipse.swt.graphics.Image;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.core.resources.IFolder;
 
@@ -21,6 +22,8 @@ import org.eclipse.ltk.core.refactoring.history.RefactoringHistory;
 import org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryControlConfiguration;
 import org.eclipse.ltk.ui.refactoring.history.RefactoringHistoryLabelProvider;
 
+import org.eclipse.jdt.core.JavaCore;
+
 import org.eclipse.jdt.ui.JavaElementLabels;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
@@ -90,6 +93,8 @@ public final class JavaModelLabelProvider extends AppearanceAwareLabelProvider {
 	public Image getImage(final Object element) {
 		if (element instanceof IFolder) {
 			final IFolder folder= (IFolder) element;
+			if (!isInJavaProject(folder))
+				return null;
 			if (folder.getName().equals(NAME_SETTINGS_FOLDER)) {
 				if (fSettingsImage == null || fSettingsImage.isDisposed())
 					fSettingsImage= JavaPluginImages.DESC_OBJS_PROJECT_SETTINGS.createImage();
@@ -113,6 +118,8 @@ public final class JavaModelLabelProvider extends AppearanceAwareLabelProvider {
 	public String getText(final Object element) {
 		if (element instanceof IFolder) {
 			final IFolder folder= (IFolder) element;
+			if (!isInJavaProject(folder))
+				return null;
 			if (folder.getName().equals(NAME_SETTINGS_FOLDER))
 				return decorateText(fPreferencesLabel, element);
 		}
@@ -126,4 +133,19 @@ public final class JavaModelLabelProvider extends AppearanceAwareLabelProvider {
 		}
 		return text;
 	}
+
+	/**
+	 * Tells whether the folder's project is a Java project.
+	 * 
+	 * @param folder the folder
+	 * @return <code>true</code> if the folder is in a Java project
+	 * @since 3.6
+	 */
+	private static boolean isInJavaProject(IFolder folder) {
+		try {
+			return folder.getProject().getNature(JavaCore.NATURE_ID) != null;
+		} catch (CoreException e) {
+			return false;
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaDropAdapterAssistant.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaDropAdapterAssistant.java
index 5c5aadf..2a7ec57 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaDropAdapterAssistant.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaDropAdapterAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,13 +40,13 @@ import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
+import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.ICopyPolicy;
+import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.IMovePolicy;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.JavaMoveProcessor;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgDestinationFactory;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgPolicyFactory;
 import org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils;
-import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.ICopyPolicy;
-import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.IMovePolicy;
 
 import org.eclipse.jdt.internal.ui.packageview.PackagesMessages;
 import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
@@ -63,10 +63,11 @@ public class JavaDropAdapterAssistant extends CommonDropAdapterAssistant {
 	private int fCanCopyElements;
 
 	public IStatus handleDrop(CommonDropAdapter dropAdapter, DropTargetEvent dropTargetEvent, Object target) {
+		int currentOperation= dropAdapter.getCurrentOperation();
 		if (LocalSelectionTransfer.getInstance().isSupportedType(dropAdapter.getCurrentTransfer())) {
 			try {
 				target= getActualTarget(target);
-				switch (dropAdapter.getCurrentOperation()) {
+				switch (currentOperation) {
 					case DND.DROP_MOVE :
 						handleDropMove(target);
 						dropTargetEvent.detail= DND.DROP_NONE;
@@ -92,7 +93,7 @@ public class JavaDropAdapterAssistant extends CommonDropAdapterAssistant {
 
 				getShell().forceActive();
 				final Object data= FileTransfer.getInstance().nativeToJava(dropAdapter.getCurrentTransfer());
-				new CopyFilesAndFoldersOperation(getShell()).copyFiles((String[]) data, targetContainer);
+				new CopyFilesAndFoldersOperation(getShell()).copyOrLinkFiles((String[])data, targetContainer, currentOperation);
 			} catch (JavaModelException e) {
 				String title = PackagesMessages.DropAdapter_errorTitle;
 				String message = PackagesMessages.DropAdapter_errorMessage;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaNavigatorContentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaNavigatorContentProvider.java
index b30984b..9ebf8ef 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaNavigatorContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/JavaNavigatorContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -324,6 +324,13 @@ public class JavaNavigatorContentProvider extends
 
 
 	protected void postRefresh(final List toRefresh, final boolean updateLabels, Collection runnables) {
+		int size= toRefresh.size();
+		for (int i= 0; i < size; i++) {
+			Object element= toRefresh.get(i);
+			if (element instanceof IJavaProject) {
+				toRefresh.set(i, ((IJavaProject) element).getProject());
+			}
+		}
 		for (Iterator iter = toRefresh.iterator(); iter.hasNext();) {
 			Object element = iter.next();
 			if (element instanceof IJavaModel) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/OpenAndExpand.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/OpenAndExpand.java
index 144e3f2..babd958 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/OpenAndExpand.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/navigator/OpenAndExpand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -261,9 +261,7 @@ public class OpenAndExpand extends SelectionDispatchAction {
 	}
 
 	private void expand(Object target) {
-		if (! fOpenAction.isEnabled())
+		if (! fOpenAction.isEnabled() && target != null)
 			fViewer.setExpandedState(target, !fViewer.getExpandedState(target));
 	}
-
-
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDropAdapter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDropAdapter.java
index 2f2552b..1673b80 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDropAdapter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/FileTransferDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -109,9 +109,9 @@ public class FileTransferDropAdapter extends JdtViewerDropAdapter implements Tra
 	 */
 	public boolean performDrop(final Object data) {
 		try {
-			int operation= getCurrentOperation();
+			final int currentOperation= getCurrentOperation();
 
-			if (data == null || !(data instanceof String[]) || operation != DND.DROP_COPY)
+			if (data == null || !(data instanceof String[]) || currentOperation != DND.DROP_COPY)
 				return false;
 
 			final IContainer target= getActualTarget(getCurrentTarget());
@@ -124,7 +124,7 @@ public class FileTransferDropAdapter extends JdtViewerDropAdapter implements Tra
 			Display.getCurrent().asyncExec(new Runnable() {
 				public void run() {
 					getShell().forceActive();
-					new CopyFilesAndFoldersOperation(getShell()).copyFiles((String[]) data, target);
+					new CopyFilesAndFoldersOperation(getShell()).copyOrLinkFiles((String[])data, target, currentOperation);
 				}
 			});
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
index 3e5421c..099b837 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -641,11 +641,10 @@ public class PackageExplorerContentProvider extends StandardJavaElementContentPr
 					postRefresh(parent, PARENT, element, runnables);
 				return true;
 				
-			} else if (element instanceof IPackageFragmentRoot
-					&& ((IPackageFragmentRoot)element).getKind() != IPackageFragmentRoot.K_SOURCE) {
+			} else if (element instanceof IPackageFragmentRoot) {
 				// libs and class folders can show up twice (in library container and as resource at original location)
 				IResource resource= element.getResource();
-				if (resource != null)
+				if (resource != null && !resource.exists())
 					postRemove(resource, runnables);
 			}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
index 86863d0..cc57096 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,7 +70,6 @@ import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPartListener2;
 import org.eclipse.ui.IStorageEditorInput;
 import org.eclipse.ui.IViewPart;
@@ -139,11 +138,11 @@ import org.eclipse.jdt.internal.ui.workingsets.ConfigureWorkingSetAction;
 import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup;
 import org.eclipse.jdt.internal.ui.workingsets.WorkingSetModel;
 
+
 /**
- * The ViewPart for the ProjectExplorer. It listens to part activation events.
- * When selection linking with the editor is enabled the view selection tracks
- * the active editor page. Similarly when a resource is selected in the packages
- * view the corresponding editor is activated.
+ * The ViewPart for the Package Explorer. It listens to part activation events. When selection
+ * linking with the editor is enabled the view selection tracks the active editor page. Similarly
+ * when a resource is selected in the packages view the corresponding editor is activated.
  */
 
 public class PackageExplorerPart extends ViewPart
@@ -206,7 +205,8 @@ public class PackageExplorerPart extends ViewPart
 		public void partHidden(IWorkbenchPartReference partRef) {}
 		public void partOpened(IWorkbenchPartReference partRef) {}
 		public void partInputChanged(IWorkbenchPartReference partRef) {
-			if (partRef instanceof IEditorReference) {
+			IWorkbenchPage activePage= JavaPlugin.getActivePage();
+			if (partRef instanceof IEditorReference && activePage != null && activePage.getActivePartReference() == partRef) {
 				editorActivated(((IEditorReference) partRef).getEditor(true));
 			}
 		}
@@ -679,7 +679,7 @@ public class PackageExplorerPart extends ViewPart
 		if (key == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { IPageLayout.ID_RES_NAV };
+					return new String[] { JavaPlugin.ID_RES_NAV };
 				}
 
 			};
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerProblemsDecorator.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerProblemsDecorator.java
index 48121db..7d16763 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerProblemsDecorator.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerProblemsDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,16 @@ import org.eclipse.jdt.internal.ui.viewsupport.TreeHierarchyLayoutProblemsDecora
 
 public class PackageExplorerProblemsDecorator extends TreeHierarchyLayoutProblemsDecorator {
 
+	/**
+	 * Use of this constant is <b>FORBIDDEN</b> for external clients.
+	 * <p>
+	 * TODO: Make API in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=308672
+	 * 
+	 * @see JavaElementImageDescriptor#BUILDPATH_ERROR
+	 * @since 3.6
+	 */
+	public final static int BUILDPATH_ERROR= 0x2000;
+
 	public PackageExplorerProblemsDecorator() {
 		super();
 	}
@@ -39,11 +49,14 @@ public class PackageExplorerProblemsDecorator extends TreeHierarchyLayoutProblem
 		for (int i= 0; i < elements.length; i++) {
 			IAdaptable element= elements[i];
 			int flags= super.computeAdornmentFlags(element);
-			if ((flags & JavaElementImageDescriptor.ERROR) != 0)
-				return JavaElementImageDescriptor.ERROR;
-			if ((flags & JavaElementImageDescriptor.WARNING) != 0)
-				result= JavaElementImageDescriptor.WARNING;
+			if ((flags & PackageExplorerProblemsDecorator.BUILDPATH_ERROR) != 0)
+				return PackageExplorerProblemsDecorator.BUILDPATH_ERROR;
+			result|= flags;
 		}
-		return result;
+		if ((result & JavaElementImageDescriptor.ERROR) != 0)
+			return JavaElementImageDescriptor.ERROR;
+		else if ((result & JavaElementImageDescriptor.WARNING) != 0)
+			return JavaElementImageDescriptor.WARNING;
+		return 0;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.java
index e986859..22d9326 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,21 +21,12 @@ public final class PackagesMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String BuildGroup_buildProject;
-	public static String BuildGroup_rebuildProject;
 	public static String DragAdapter_deleting;
 	public static String DragAdapter_problem;
 	public static String DragAdapter_problemTitle;
 	public static String DragAdapter_refreshing;
-	public static String DropAdapter_alreadyExists;
-	public static String DropAdapter_errorSame;
-	public static String DropAdapter_errorSubfolder;
 	public static String DropAdapter_errorTitle;
 	public static String DropAdapter_errorMessage;
-	public static String DropAdapter_question;
-	public static String FilterSelectionAction_apply_label;
-	public static String FilterSelectionAction_apply_toolTip;
-	public static String FilterSelectionAction_dialog_title;
 	public static String GotoPackage_action_label;
 	public static String GotoPackage_dialog_message;
 	public static String GotoPackage_dialog_title;
@@ -52,33 +43,12 @@ public final class PackagesMessages extends NLS {
 	public static String GotoResource_dialog_title;
 	public static String LayoutActionGroup_show_libraries_in_group;
 	public static String LibraryContainer_name;
-	public static String OpenResource_action_description;
-	public static String OpenResource_action_label;
-	public static String OpenResource_error_message;
-	public static String OpenResource_error_messageArgs;
-	public static String OpenResource_error_messageProblems;
-	public static String OpenResource_error_title;
 	public static String PackageExplorerPart_notFoundSepcific;
 	public static String PackageExplorerPart_removeFiltersSpecific;
-	public static String Sorter_expectPackage;
-	public static String ShowLibraries_hideReferencedLibs;
-	public static String ShowLibraries_showReferencedLibs;
-	public static String ShowBinaries_hideBinaryProjects;
-	public static String ShowBinaries_showBinaryProjects;
-	public static String ShowInNavigator_description;
-	public static String ShowInNavigator_error;
-	public static String ShowInNavigator_label;
-	public static String PackageExplorer_filters;
-	public static String PackageExplorer_gotoTitle;
-	public static String PackageExplorer_openPerspective;
-	public static String PackageExplorer_refactoringTitle;
-	public static String PackageExplorer_referencedLibs;
-	public static String PackageExplorer_binaryProjects;
 	public static String PackageExplorer_title;
 	public static String PackageExplorer_toolTip;
 	public static String PackageExplorer_toolTip2;
 	public static String PackageExplorer_toolTip3;
-	public static String PackageExplorer_openWith;
 	public static String PackageExplorer_element_not_present;
 	public static String PackageExplorer_filteredDialog_title;
 	public static String PackageExplorer_notFound;
@@ -86,9 +56,6 @@ public final class PackagesMessages extends NLS {
 	public static String PackageExplorerContentProvider_update_job_description;
 	public static String SelectionTransferDropAdapter_error_title;
 	public static String SelectionTransferDropAdapter_error_message;
-	public static String SelectionTransferDropAdapter_dialog_title;
-	public static String SelectionTransferDropAdapter_dialog_preview_label;
-	public static String SelectionTransferDropAdapter_dialog_question;
 	public static String LayoutActionGroup_label;
 	public static String LayoutActionGroup_flatLayoutAction_label;
 	public static String LayoutActionGroup_hierarchicalLayoutAction_label;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.properties
index 764c4e3..3b97fd2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackagesMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,24 +10,13 @@
 #     Eric Rizzo - Removed unused messages for old Collapse All action
 ###############################################################################
 
-BuildGroup_buildProject=&Build Project
-BuildGroup_rebuildProject=Rebuild Pro&ject
-
 DragAdapter_deleting=Deleting ...
 DragAdapter_problem=Problem while moving or copying files.
 DragAdapter_problemTitle=Drag & Drop
 DragAdapter_refreshing=Refreshing...
 
-DropAdapter_alreadyExists={0} already exists. Would you like to overwrite it?
-DropAdapter_errorSame=Cannot copy {0}: the destination folder is the same as the source folder.
-DropAdapter_errorSubfolder=Cannot copy {0}: the destination folder is a subfolder of the source folder.
 DropAdapter_errorTitle=Drag & Drop
 DropAdapter_errorMessage=Error while moving or copying files.
-DropAdapter_question=Question
-
-FilterSelectionAction_apply_label=Select &filters to apply (matching files will be hidden):
-FilterSelectionAction_apply_toolTip=Apply the defined filters
-FilterSelectionAction_dialog_title=Package Explorer Filters
 
 GotoPackage_action_label=&Package...
 GotoPackage_dialog_message=&Choose a package (? = any character, * = any string):
@@ -47,36 +36,10 @@ GotoType_error_message=An exception occurred while searching for types
 GotoResource_action_label=&Resource...
 GotoResource_dialog_title= Go to Resource
 
-OpenResource_action_description=Open the selected file in an editor.
-OpenResource_action_label=&Open
-OpenResource_error_message=Cannot open Java editor.
-OpenResource_error_messageArgs=Cannot open Java editor on {0}. {1}
-OpenResource_error_messageProblems=Problems Opening Editor.
-OpenResource_error_title=Open Resource
-
-Sorter_expectPackage=expects a PackageFragment or PackageFragmentRoot
-
-ShowLibraries_hideReferencedLibs=Hide referenced libraries
-ShowLibraries_showReferencedLibs=Show referenced libraries
-
-ShowBinaries_hideBinaryProjects=Hide library projects
-ShowBinaries_showBinaryProjects=Show library projects
-
-ShowInNavigator_description=Show the selected object(s) in the navigator
-ShowInNavigator_error=Cannot open navigator
-ShowInNavigator_label=Show in &Navigator
-
-PackageExplorer_filters=&Filters...
-PackageExplorer_gotoTitle=G&o To
-PackageExplorer_openPerspective=Open &Perspective
-PackageExplorer_refactoringTitle=&Refactor
-PackageExplorer_referencedLibs=Show Referenced &Libraries
-PackageExplorer_binaryProjects=Show Library Projects
 PackageExplorer_title=Package Explorer
 PackageExplorer_toolTip= Working Set: {0}
 PackageExplorer_toolTip2= {0} - Working Set: {1}
 PackageExplorer_toolTip3= {0}/{1}
-PackageExplorer_openWith=Open Wit&h
 
 PackageExplorer_element_not_present=Cannot reveal {0} in Package Explorer.  The element may be hidden by a filter or an active working set.
 
@@ -92,9 +55,6 @@ PackageExplorerPart_removeFiltersSpecific=Cannot reveal ''{0}''. Do you want to
 
 SelectionTransferDropAdapter_error_title=Drag and drop
 SelectionTransferDropAdapter_error_message=Unexpected exception. See log for details
-SelectionTransferDropAdapter_dialog_title=Move
-SelectionTransferDropAdapter_dialog_preview_label=Pre&view
-SelectionTransferDropAdapter_dialog_question=Do you want to update references to the moved element(s)? Click 'Preview' to see the preview of the reference updates.
 
 LayoutActionGroup_label= &Package Presentation
 LayoutActionGroup_flatLayoutAction_label= &Flat
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/AppearancePreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/AppearancePreferencePage.java
index fa02827..3cb6abc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/AppearancePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/AppearancePreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.preferences;
 
@@ -15,6 +16,7 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
 
 import org.eclipse.core.runtime.IStatus;
 
@@ -34,12 +36,14 @@ import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
 import org.eclipse.jdt.internal.ui.dialogs.StatusUtil;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.LayoutUtil;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.Separator;
 import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.TextBoxDialogField;
 
 public class AppearancePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
@@ -47,7 +51,9 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 	private static final String PREF_METHOD_RETURNTYPE= PreferenceConstants.APPEARANCE_METHOD_RETURNTYPE;
 	private static final String PREF_METHOD_TYPEPARAMETERS= PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS;
 	private static final String PREF_COMPRESS_PACKAGE_NAMES= PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES;
+	private static final String PREF_ABBREVIATE_PACKAGE_NAMES= JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES;
 	private static final String PREF_PKG_NAME_PATTERN_FOR_PKG_VIEW= PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW;
+	private static final String PREF_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW= JavaElementLabelComposer.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW;
 	private static final String STACK_BROWSING_VIEWS_VERTICALLY= PreferenceConstants.BROWSING_STACK_VERTICALLY;
 	private static final String PREF_FOLD_PACKAGES_IN_PACKAGE_EXPLORER= PreferenceConstants.APPEARANCE_FOLD_PACKAGES_IN_PACKAGE_EXPLORER;
 	private static final String PREF_CATEGORY= PreferenceConstants.APPEARANCE_CATEGORY;
@@ -55,9 +61,11 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 	private SelectionButtonDialogField fShowMethodReturnType;
 	private SelectionButtonDialogField fShowCategory;
 	private SelectionButtonDialogField fCompressPackageNames;
+	private SelectionButtonDialogField fAbbreviatePackageNames;
 	private SelectionButtonDialogField fStackBrowsingViewsVertically;
 	private SelectionButtonDialogField fShowMembersInPackageView;
 	private StringDialogField fPackageNamePattern;
+	private StringDialogField fAbbreviatePackageNamePattern;
 	private SelectionButtonDialogField fFoldPackagesInPackageExplorer;
 	private SelectionButtonDialogField fShowMethodTypeParameters;
 
@@ -102,6 +110,14 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		fPackageNamePattern= new StringDialogField();
 		fPackageNamePattern.setDialogFieldListener(listener);
 		fPackageNamePattern.setLabelText(PreferencesMessages.AppearancePreferencePage_pkgNamePattern_label);
+
+		fAbbreviatePackageNames= new SelectionButtonDialogField(SWT.CHECK);
+		fAbbreviatePackageNames.setDialogFieldListener(listener);
+		fAbbreviatePackageNames.setLabelText(PreferencesMessages.AppearancePreferencePage_pkgNamePatternAbbreviateEnable_label);
+		
+		fAbbreviatePackageNamePattern= new TextBoxDialogField();
+		fAbbreviatePackageNamePattern.setDialogFieldListener(listener);
+		fAbbreviatePackageNamePattern.setLabelText(PreferencesMessages.AppearancePreferencePage_pkgNamePatternAbbreviate_label);
 	}
 
 	private void initFields() {
@@ -114,6 +130,10 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		fPackageNamePattern.setText(prefs.getString(PREF_PKG_NAME_PATTERN_FOR_PKG_VIEW));
 		fCompressPackageNames.setSelection(prefs.getBoolean(PREF_COMPRESS_PACKAGE_NAMES));
 		fPackageNamePattern.setEnabled(fCompressPackageNames.isSelected());
+		fAbbreviatePackageNamePattern.setText(prefs.getString(PREF_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW));
+		fAbbreviatePackageNames.setSelection(prefs.getBoolean(PREF_ABBREVIATE_PACKAGE_NAMES));
+		doDialogFieldChanged(fAbbreviatePackageNames);
+		fAbbreviatePackageNamePattern.setEnabled(fAbbreviatePackageNames.isSelected());
 		fFoldPackagesInPackageExplorer.setSelection(prefs.getBoolean(PREF_FOLD_PACKAGES_IN_PACKAGE_EXPLORER));
 	}
 
@@ -151,10 +171,24 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 
 		fCompressPackageNames.doFillIntoGrid(result, nColumns);
 		fPackageNamePattern.doFillIntoGrid(result, 2);
-		LayoutUtil.setHorizontalGrabbing(fPackageNamePattern.getTextControl(null));
+		LayoutUtil.setHorizontalIndent(fPackageNamePattern.getLabelControl(null), AbstractConfigurationBlock.INDENT);
+		Text packageNamePatternControl= fPackageNamePattern.getTextControl(null);
+		LayoutUtil.setHorizontalIndent(packageNamePatternControl, AbstractConfigurationBlock.INDENT);
+		LayoutUtil.setHorizontalGrabbing(packageNamePatternControl);
 		LayoutUtil.setWidthHint(fPackageNamePattern.getLabelControl(null), convertWidthInCharsToPixels(65));
 
 		new Separator().doFillIntoGrid(result, nColumns);
+		fAbbreviatePackageNames.doFillIntoGrid(result, nColumns);
+		fAbbreviatePackageNamePattern.doFillIntoGrid(result, 2);
+		LayoutUtil.setHorizontalIndent(fAbbreviatePackageNamePattern.getLabelControl(null), AbstractConfigurationBlock.INDENT);
+		Text abbreviatePackageNamePatternControl= fAbbreviatePackageNamePattern.getTextControl(null);
+		LayoutUtil.setHorizontalIndent(abbreviatePackageNamePatternControl, AbstractConfigurationBlock.INDENT);
+		LayoutUtil.setHorizontalGrabbing(abbreviatePackageNamePatternControl);
+		LayoutUtil.setWidthHint(fAbbreviatePackageNamePattern.getLabelControl(null), convertWidthInCharsToPixels(65));
+		LayoutUtil.setVerticalGrabbing(abbreviatePackageNamePatternControl);
+		LayoutUtil.setHeightHint(abbreviatePackageNamePatternControl, convertHeightInCharsToPixels(3));
+
+		new Separator().doFillIntoGrid(result, nColumns);
 		fStackBrowsingViewsVertically.doFillIntoGrid(result, nColumns);
 
 		String noteTitle= PreferencesMessages.AppearancePreferencePage_note;
@@ -162,6 +196,7 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		Composite noteControl= createNoteComposite(JFaceResources.getDialogFont(), result, noteTitle, noteMessage);
 		GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
 		gd.horizontalSpan= 2;
+		gd.horizontalIndent= AbstractConfigurationBlock.INDENT;
 		noteControl.setLayoutData(gd);
 
 		initFields();
@@ -174,14 +209,22 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		if (field == fCompressPackageNames)
 			fPackageNamePattern.setEnabled(fCompressPackageNames.isSelected());
 
+		if (field == fAbbreviatePackageNames)
+			fAbbreviatePackageNamePattern.setEnabled(fAbbreviatePackageNames.isSelected());
+
 		updateStatus(getValidationStatus());
 	}
 
-	private IStatus getValidationStatus(){
+	private IStatus getValidationStatus() {
+		if (fAbbreviatePackageNames.isSelected()
+				&& JavaElementLabelComposer.parseAbbreviationPattern(fAbbreviatePackageNamePattern.getText()) == null) {
+			return new StatusInfo(IStatus.ERROR, PreferencesMessages.AppearancePreferencePage_packageNameAbbreviationPattern_error_isInvalid);
+		}
+
 		if (fCompressPackageNames.isSelected() && fPackageNamePattern.getText().equals("")) //$NON-NLS-1$
 			return new StatusInfo(IStatus.ERROR, PreferencesMessages.AppearancePreferencePage_packageNameCompressionPattern_error_isEmpty);
-		else
-			return new StatusInfo();
+
+		return new StatusInfo();
 	}
 
 	private void updateStatus(IStatus status) {
@@ -207,6 +250,8 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		prefs.setValue(STACK_BROWSING_VIEWS_VERTICALLY, fStackBrowsingViewsVertically.isSelected());
 		prefs.setValue(PREF_PKG_NAME_PATTERN_FOR_PKG_VIEW, fPackageNamePattern.getText());
 		prefs.setValue(PREF_COMPRESS_PACKAGE_NAMES, fCompressPackageNames.isSelected());
+		prefs.setValue(PREF_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW, fAbbreviatePackageNamePattern.getText());
+		prefs.setValue(PREF_ABBREVIATE_PACKAGE_NAMES, fAbbreviatePackageNames.isSelected());
 		prefs.setValue(PREF_FOLD_PACKAGES_IN_PACKAGE_EXPLORER, fFoldPackagesInPackageExplorer.isSelected());
 		JavaPlugin.getDefault().savePluginPreferences();
 		return super.performOk();
@@ -224,6 +269,8 @@ public class AppearancePreferencePage extends PreferencePage implements IWorkben
 		fStackBrowsingViewsVertically.setSelection(prefs.getDefaultBoolean(STACK_BROWSING_VIEWS_VERTICALLY));
 		fPackageNamePattern.setText(prefs.getDefaultString(PREF_PKG_NAME_PATTERN_FOR_PKG_VIEW));
 		fCompressPackageNames.setSelection(prefs.getDefaultBoolean(PREF_COMPRESS_PACKAGE_NAMES));
+		fAbbreviatePackageNamePattern.setText(prefs.getDefaultString(PREF_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW));
+		fAbbreviatePackageNames.setSelection(prefs.getDefaultBoolean(PREF_ABBREVIATE_PACKAGE_NAMES));
 		fFoldPackagesInPackageExplorer.setSelection(prefs.getDefaultBoolean(PREF_FOLD_PACKAGES_IN_PACKAGE_EXPLORER));
 		super.performDefaults();
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/BulletListBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/BulletListBlock.java
index 00859b4..89fb9b9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/BulletListBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/BulletListBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,7 +50,9 @@ public class BulletListBlock extends Composite {
 		fStyledText.setEditable(false);
 		Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
 		fStyledText.setCursor(arrowCursor);
-		fStyledText.setCaret(null);
+
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
+//		fStyledText.setCaret(null);
 
 		final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
 		fStyledText.setLayoutData(data);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
index f293ddc..91d0c05 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistConfigurationBlock.java
@@ -163,9 +163,13 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
 		label= PreferencesMessages.JavaEditorPreferencePage_automaticallyAddImportInsteadOfQualifiedName;
 		Button master= addCheckBox(composite, label, PREF_CODEASSIST_ADDIMPORT, trueFalse, 0);
 
-		label= PreferencesMessages.JavaEditorPreferencePage_suggestStaticImports;
-		Button slave= addCheckBox(composite, label, PREF_CODEASSIST_SUGGEST_STATIC_IMPORTS, enabledDisabled, 20);
-		createSelectionDependency(master, slave);
+		label= PreferencesMessages.JavaEditorPreferencePage_suggestStaticImports; //TODO: &Use <a>static imports</a> (only 1.5 or higher)
+		Button slave= addCheckBoxWithLink(composite, label, PREF_CODEASSIST_SUGGEST_STATIC_IMPORTS, enabledDisabled, 20, SWT.DEFAULT, new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				openStaticImportFavoritesPage();
+			}
+		});
+		createSelectionDependency(master, slave.getParent());
 
 
 		label= PreferencesMessages.JavaEditorPreferencePage_fillArgumentsOnMethodCompletion;
@@ -204,6 +208,14 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
 		createSelectionDependency(master, fInsertBestGuessRadioButton);
 	}
 
+	protected final void openStaticImportFavoritesPage() {
+		if (getPreferenceContainer() != null) {
+			getPreferenceContainer().openPage(CodeAssistFavoritesPreferencePage.PAGE_ID, null);
+		} else {
+			PreferencesUtil.createPreferenceDialogOn(getShell(), CodeAssistFavoritesPreferencePage.PAGE_ID, null, null).open();
+		}
+	}
+
 	/**
 	 * Creates a selection dependency between a master and a slave control.
 	 *
@@ -214,15 +226,20 @@ class CodeAssistConfigurationBlock extends OptionsConfigurationBlock {
 	 *                   selected
 	 */
 	protected static void createSelectionDependency(final Button master, final Control slave) {
-
-		master.addSelectionListener(new SelectionListener() {
-
-			public void widgetDefaultSelected(SelectionEvent event) {
-				// Do nothing
+		master.addSelectionListener(new SelectionAdapter() {
+			
+			public void widgetSelected(SelectionEvent event) {
+				deepSetEnabled(slave, master.getSelection());
 			}
 
-			public void widgetSelected(SelectionEvent event) {
-				slave.setEnabled(master.getSelection());
+			private void deepSetEnabled(final Control control, boolean enabled) {
+				control.setEnabled(enabled);
+				if (control instanceof Composite) {
+					Control[] children= ((Composite)control).getChildren();
+					for (int i= 0; i < children.length; i++) {
+						deepSetEnabled(children[i], enabled);
+					}
+				}
 			}
 		});
 		slave.setEnabled(master.getSelection());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesConfigurationBlock.java
index e7bce52..cc8f46c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesConfigurationBlock.java
@@ -16,7 +16,6 @@ import java.util.List;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -98,17 +97,17 @@ class CodeAssistFavoritesConfigurationBlock extends OptionsConfigurationBlock {
 		private List fExistingEntries;
 		private final boolean fIsEditingMember;
 
-		public FavoriteStaticMemberInputDialog(Shell parent, List existingEntries, boolean isEditingMember) {
+		public FavoriteStaticMemberInputDialog(Shell parent, List existingEntries, boolean isMember, boolean isNew) {
 			super(parent);
-			fIsEditingMember= isEditingMember;
+			fIsEditingMember= isMember;
 			fExistingEntries= existingEntries;
 
 			String label, title;
-			if (isEditingMember) {
-				title= PreferencesMessages.FavoriteStaticMemberInputDialog_member_title;
+			if (isMember) {
+				title= isNew ? PreferencesMessages.FavoriteStaticMemberInputDialog_member_new_title : PreferencesMessages.FavoriteStaticMemberInputDialog_member_edit_title;
 				label= PreferencesMessages.FavoriteStaticMemberInputDialog_member_labelText;
 			} else {
-				title= PreferencesMessages.FavoriteStaticMemberInputDialog_type_title;
+				title= isNew ? PreferencesMessages.FavoriteStaticMemberInputDialog_type_new_title : PreferencesMessages.FavoriteStaticMemberInputDialog_type_edit_title;
 				label= PreferencesMessages.FavoriteStaticMemberInputDialog_type_labelText;
 			}
 			setTitle(title);
@@ -352,11 +351,6 @@ class CodeAssistFavoritesConfigurationBlock extends OptionsConfigurationBlock {
 		LayoutUtil.setHorizontalSpan(fList.getLabelControl(null), 2);
 		LayoutUtil.setWidthHint(fList.getLabelControl(null), pixelConverter.convertWidthInCharsToPixels(60));
 		LayoutUtil.setHorizontalGrabbing(fList.getListControl(null));
-
-		Control listControl= fList.getListControl(null);
-		GridData gd= (GridData)listControl.getLayoutData();
-		gd.verticalAlignment= GridData.BEGINNING;
-		gd.heightHint= pixelConverter.convertHeightInCharsToPixels(7);
 	}
 
 	public void initialize() {
@@ -416,7 +410,7 @@ class CodeAssistFavoritesConfigurationBlock extends OptionsConfigurationBlock {
 	private void doButtonPressed(int index) {
 		if (index == IDX_NEW_TYPE || index == IDX_NEW_MEMBER) { // add new
 			List existing= fList.getElements();
-			FavoriteStaticMemberInputDialog dialog= new FavoriteStaticMemberInputDialog(getShell(), existing, index == IDX_NEW_MEMBER);
+			FavoriteStaticMemberInputDialog dialog= new FavoriteStaticMemberInputDialog(getShell(), existing, index == IDX_NEW_MEMBER, true);
 			if (dialog.open() == Window.OK) {
 				fList.addElement(dialog.getResult());
 			}
@@ -430,7 +424,7 @@ class CodeAssistFavoritesConfigurationBlock extends OptionsConfigurationBlock {
 			List existing= fList.getElements();
 			existing.remove(editedEntry);
 			boolean isType= editedEntry.endsWith(WILDCARD);
-			FavoriteStaticMemberInputDialog dialog= new FavoriteStaticMemberInputDialog(getShell(), existing, !isType);
+			FavoriteStaticMemberInputDialog dialog= new FavoriteStaticMemberInputDialog(getShell(), existing, !isType, false);
 			if (isType)
 				dialog.setInitialSelection(editedEntry.substring(0, editedEntry.length() - 2));
 			else
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesPreferencePage.java
index cad3afc..427c78d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeAssistFavoritesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,13 @@ import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
  */
 public class CodeAssistFavoritesPreferencePage extends PropertyAndPreferencePage {
 
+	/**
+	 * The ID of this preference page.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PAGE_ID= "org.eclipse.jdt.ui.preferences.CodeAssistPreferenceFavorites"; //$NON-NLS-1$
+
 	private CodeAssistFavoritesConfigurationBlock fConfigurationBlock;
 
 	public void createControl(Composite parent) {
@@ -50,7 +57,7 @@ public class CodeAssistFavoritesPreferencePage extends PropertyAndPreferencePage
 	}
 
 	protected String getPreferencePageID() {
-		return "org.eclipse.jdt.ui.preferences.CodeAssistStaticMembersPreferencePage"; //$NON-NLS-1$
+		return PAGE_ID;
 	}
 
 	protected String getPropertyPageID() {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
index 55647b1..086da3e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeTemplateBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -395,7 +395,9 @@ public class CodeTemplateBlock extends OptionsConfigurationBlock {
 		viewer.setEditable(false);
 		Cursor arrowCursor= viewer.getTextWidget().getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
 		viewer.getTextWidget().setCursor(arrowCursor);
-		viewer.getTextWidget().setCaret(null);
+
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
+//		viewer.getTextWidget().setCaret(null);
 
 		viewer.setDocument(document);
 
@@ -535,7 +537,9 @@ public class CodeTemplateBlock extends OptionsConfigurationBlock {
 
 	private void export(TemplatePersistenceData[] templates) {
 		FileDialog dialog= new FileDialog(getShell(), SWT.SAVE);
-		dialog.setText(Messages.format(PreferencesMessages.CodeTemplateBlock_export_title, String.valueOf(templates.length)));
+		String text= templates.length == 1 ? PreferencesMessages.CodeTemplateBlock_export_title_singular : Messages.format(PreferencesMessages.CodeTemplateBlock_export_title_plural, String
+				.valueOf(templates.length));
+		dialog.setText(text);
 		dialog.setFilterExtensions(new String[] {PreferencesMessages.CodeTemplateBlock_export_extension});
 		dialog.setFileName(PreferencesMessages.CodeTemplateBlock_export_filename);
 		String path= dialog.open();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
index d326424..3f03404 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ComplianceConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,12 @@ package org.eclipse.jdt.internal.ui.preferences;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 
+import org.osgi.service.prefs.Preferences;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -27,15 +30,19 @@ import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.preferences.BundleDefaultsScope;
 
 import org.eclipse.core.resources.IProject;
 
 import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.JFaceResources;
 
 import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
@@ -65,7 +72,7 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 
 	/**
 	 * Key for the "Compiler compliance follows EE" setting.
-	 * <br>Only applicable if <code>fProject != null</code>. 
+	 * <br>Only applicable if <code>fProject != null</code>.
 	 * <p>Values are { {@link #DEFAULT_CONF}, {@link #USER_CONF}, or {@link #DISABLED} }.
 	 */
 	private static final Key INTR_COMPLIANCE_FOLLOWS_EE= getLocalKey("internal.compliance.follows.ee"); //$NON-NLS-1$
@@ -106,9 +113,11 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 	private static final String VERSION_1_1= JavaCore.VERSION_1_1;
 	private static final String VERSION_1_2= JavaCore.VERSION_1_2;
 	private static final String VERSION_1_3= JavaCore.VERSION_1_3;
+
 	private static final String VERSION_1_4= JavaCore.VERSION_1_4;
 	private static final String VERSION_1_5= JavaCore.VERSION_1_5;
 	private static final String VERSION_1_6= JavaCore.VERSION_1_6;
+	private static final String VERSION_1_7= JavaCore.VERSION_1_7;
 
 	private static final String ERROR= JavaCore.ERROR;
 	private static final String WARNING= JavaCore.WARNING;
@@ -159,6 +168,7 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 	private IStatus fComplianceStatus;
 
 	private Link fJRE50InfoText;
+	private Label fJRE50InfoImage;
 	private Composite fControlsComposite;
 	private ControlEnableState fBlockEnableState;
 
@@ -241,14 +251,21 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 
 	private Composite createComplianceTabContent(Composite folder) {
 
+		boolean hide_1_7= JavaModelUtil.HIDE_VERSION_1_7 &&
+				!(VERSION_1_7.equals(getValue(PREF_COMPLIANCE)) || VERSION_1_7.equals(getValue(PREF_CODEGEN_TARGET_PLATFORM)));
 
-		String[] values3456= new String[] { VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6 };
+		String[] values3456= new String[] { VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7 };
 		String[] values3456Labels= new String[] {
 			PreferencesMessages.ComplianceConfigurationBlock_version13,
 			PreferencesMessages.ComplianceConfigurationBlock_version14,
 			PreferencesMessages.ComplianceConfigurationBlock_version15,
-			PreferencesMessages.ComplianceConfigurationBlock_version16
+			PreferencesMessages.ComplianceConfigurationBlock_version16,
+			PreferencesMessages.ComplianceConfigurationBlock_version17
 		};
+		if (hide_1_7) {
+			values3456= removeLast(values3456);
+			values3456Labels= removeLast(values3456Labels);
+		}
 
 		final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
 		Composite composite= sc1.getBody();
@@ -311,7 +328,7 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 		
 		int indent= fPixelConverter.convertWidthInCharsToPixels(2);
 
-		String[] versions= new String[] { VERSION_CLDC_1_1, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6 };
+		String[] versions= new String[] { VERSION_CLDC_1_1, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7 };
 		String[] versionsLabels= new String[] {
 			PreferencesMessages.ComplianceConfigurationBlock_versionCLDC11,
 			PreferencesMessages.ComplianceConfigurationBlock_version11,
@@ -319,8 +336,13 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 			PreferencesMessages.ComplianceConfigurationBlock_version13,
 			PreferencesMessages.ComplianceConfigurationBlock_version14,
 			PreferencesMessages.ComplianceConfigurationBlock_version15,
-			PreferencesMessages.ComplianceConfigurationBlock_version16
+			PreferencesMessages.ComplianceConfigurationBlock_version16,
+			PreferencesMessages.ComplianceConfigurationBlock_version17
 		};
+		if (hide_1_7) {
+			versions= removeLast(versions);
+			versionsLabels= removeLast(versionsLabels);
+		}
 
 		label= PreferencesMessages.ComplianceConfigurationBlock_codegen_targetplatform_label;
 		addComboBox(group, label, PREF_CODEGEN_TARGET_PLATFORM, versions, versionsLabels, indent);
@@ -373,8 +395,17 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 
 		label= PreferencesMessages.ComplianceConfigurationBlock_codegen_inline_jsr_bytecode_label;
 		addCheckBox(group, label, PREF_CODEGEN_INLINE_JSR_BYTECODE, enableDisableValues, 0);
-
-		fJRE50InfoText= new Link(composite, SWT.WRAP);
+		
+		Composite infoComposite= new Composite(fControlsComposite, SWT.NONE);
+		infoComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+		infoComposite.setLayout(new GridLayout(2, false));
+		
+		fJRE50InfoImage= new Label(infoComposite, SWT.NONE);
+		fJRE50InfoImage.setImage(JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
+		GridData gd= new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false);
+		fJRE50InfoImage.setLayoutData(gd);
+		
+		fJRE50InfoText= new Link(infoComposite, SWT.WRAP);
 		fJRE50InfoText.setFont(composite.getFont());
 		// set a text: not the real one, just for layouting
 		fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info_project, new String[] { getVersionLabel(VERSION_1_3), getVersionLabel(VERSION_1_3) }));
@@ -393,7 +424,7 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 				widgetDefaultSelected(e);
 			}
 		});
-		GridData gd= new GridData(GridData.FILL, GridData.FILL, true, true);
+		gd= new GridData(GridData.FILL, GridData.FILL, true, true);
 		gd.widthHint= fPixelConverter.convertWidthInCharsToPixels(50);
 		fJRE50InfoText.setLayoutData(gd);
 		validateComplianceStatus();
@@ -401,6 +432,12 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 		return sc1;
 	}
 
+	private static String[] removeLast(String[] versions) {
+		String[] reduced= new String[versions.length - 1];
+		System.arraycopy(versions, 0, reduced, 0, reduced.length);
+		return reduced;
+	}
+
 	protected final void openBuildPathPropertyPage() {
 		if (getPreferenceContainer() != null) {
 			Map data= new HashMap();
@@ -524,7 +561,7 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 				updateComplianceEnableState();
 				validateComplianceStatus();
 			}
-		}			
+		}
 	}
 
 	private void validateComplianceStatus() {
@@ -551,9 +588,17 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 						fJRE50InfoText.setText(Messages.format(PreferencesMessages.ComplianceConfigurationBlock_jrecompliance_info_project, args));
 					}
 					isVisible= true;
+					if (JavaModelUtil.HIDE_VERSION_1_7 && VERSION_1_7.equals(compliance)) {
+						String javaVersion= ((IVMInstall2) install).getJavaVersion();
+						if (javaVersion != null && javaVersion.startsWith(VERSION_1_7)) {
+							isVisible= false;
+						}
+					}
 				}
 			}
 			fJRE50InfoText.setVisible(isVisible);
+			fJRE50InfoImage.setImage(isVisible ? JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING) : null);
+			fJRE50InfoImage.getParent().layout();
 		}
 	}
 
@@ -766,6 +811,11 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 					enumAsId= ERROR;
 					source= VERSION_1_6;
 					target= VERSION_1_6;
+				} else if (VERSION_1_7.equals(complianceLevel)) {
+					assertAsId= ERROR;
+					enumAsId= ERROR;
+					source= VERSION_1_7;
+					target= VERSION_1_7;
 				} else {
 					assertAsId= IGNORE;
 					enumAsId= IGNORE;
@@ -821,7 +871,12 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 				&& ERROR.equals(getValue(PREF_PB_ASSERT_AS_IDENTIFIER))
 				&& ERROR.equals(getValue(PREF_PB_ENUM_AS_IDENTIFIER))
 				&& VERSION_1_6.equals(getValue(PREF_SOURCE_COMPATIBILITY))
-				&& VERSION_1_6.equals(getValue(PREF_CODEGEN_TARGET_PLATFORM)))) {
+				&& VERSION_1_6.equals(getValue(PREF_CODEGEN_TARGET_PLATFORM)))
+			|| (VERSION_1_7.equals(complianceLevel)
+				&& ERROR.equals(getValue(PREF_PB_ASSERT_AS_IDENTIFIER))
+				&& ERROR.equals(getValue(PREF_PB_ENUM_AS_IDENTIFIER))
+				&& VERSION_1_7.equals(getValue(PREF_SOURCE_COMPATIBILITY))
+				&& VERSION_1_7.equals(getValue(PREF_CODEGEN_TARGET_PLATFORM)))) {
 			return DEFAULT_CONF;
 		}
 		return USER_CONF;
@@ -886,13 +941,14 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 	}
 
 	/**
-	 * Sets the default compiler compliance options based on the current default JRE in the workspace.
-	 *  
+	 * Sets the default compiler compliance options based on the current default JRE in the
+	 * workspace.
+	 * 
 	 * @since 3.5
 	 */
 	private void setDefaultCompilerComplianceValues() {
 		IVMInstall defaultVMInstall= JavaRuntime.getDefaultVMInstall();
-		if (defaultVMInstall instanceof IVMInstall2) {
+		if (defaultVMInstall instanceof IVMInstall2 && isOriginalDefaultCompliance()) {
 			String complianceLevel= JavaModelUtil.getCompilerCompliance((IVMInstall2)defaultVMInstall, JavaCore.VERSION_1_4);
 			Map complianceOptions= new HashMap();
 			JavaModelUtil.setComplianceOptions(complianceOptions, complianceLevel);
@@ -904,4 +960,50 @@ public class ComplianceConfigurationBlock extends OptionsConfigurationBlock {
 		}
 	}
 
+	/**
+	 * Tells whether the compliance option is the same as the original default.
+	 * 
+	 * @return <code>true</code> if the compliance is the same as the original default
+	 * @since 3.6
+	 */
+	private static final boolean isOriginalDefaultCompliance() {
+		Hashtable options= JavaCore.getDefaultOptions();
+		Preferences bundleDefaults= new BundleDefaultsScope().getNode(JavaCore.PLUGIN_ID);
+
+		return equals(JavaCore.COMPILER_COMPLIANCE, bundleDefaults, options)
+				&& equals(JavaCore.COMPILER_SOURCE, bundleDefaults, options)
+				&& equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, bundleDefaults, options)
+				&& equals(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, bundleDefaults, options)
+				&& equals(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, bundleDefaults, options);
+	}
+
+	/**
+	 * Returns whether the option for the given key is the same in the map and the preferences.
+	 * 
+	 * @param key the key of option to test
+	 * @param preferences the preferences
+	 * @param map the map
+	 * @return <code>true</code> if the options are the same in both maps
+	 * @since 3.6
+	 */
+	private static boolean equals(String key, Preferences preferences, Map map) {
+		String dummy= new String();
+		String defaultValue= preferences.get(key, dummy);
+		return defaultValue != null && defaultValue != dummy
+				? map.containsKey(key) && equals(defaultValue, map.get(key))
+				: !map.containsKey(key);
+	}
+
+	/**
+	 * Returns whether the objects are equal.
+	 * 
+	 * @param o1 an object
+	 * @param o2 an object
+	 * @return <code>true</code> if the two objects are equal
+	 * @since 3.6
+	 */
+	private static boolean equals(Object o1, Object o2) {
+		return o1 == null ? o2 == null : o1.equals(o2);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
index 62f9d5d..ac53c10 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/EditTemplateDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,11 +93,12 @@ import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
 import org.eclipse.jdt.internal.ui.text.template.preferences.TemplateVariableProcessor;
 import org.eclipse.jdt.internal.ui.util.SWTUtil;
 
+
 /**
  * Dialog to edit a template.
  * <p>
  * <strong>Note:</strong> This is a copy of org.eclipse.ui.texteditor.templates.TemplatePreferencePage.EditTemplateDialog
- * which we should try to eliminate (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=208865).
+ * which we should try to eliminate (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=208865).
  * </p>
  */
 public class EditTemplateDialog extends StatusDialog {
@@ -591,14 +592,35 @@ public class EditTemplateDialog extends StatusDialog {
 		} else if (fNameText != null && !isValidTemplateName(fNameText.getText())) {
 			status= new StatusInfo();
 			status.setError(PreferencesMessages.EditTemplateDialog_error_invalidName);
+		} else if (!isValidPattern(fPatternEditor.getDocument().get())) {
+			status= new StatusInfo();
+			status.setError(PreferencesMessages.EditTemplateDialog_error_invalidPattern);
 		}
 		updateStatus(status);
 	}
 
 	/**
-	 * Checks whether the given string is a valid
-	 * template name.
-	 *
+	 * Validates the pattern.
+	 * <p>
+	 * This implementation rejects invalid XML characters.
+	 * </p>
+	 * 
+	 * @param pattern the pattern to verify
+	 * @return <code>true</code> if the pattern is valid
+	 * @since 3.6
+	 */
+	private boolean isValidPattern(String pattern) {
+		for (int i= 0; i < pattern.length(); i++) {
+			char ch= pattern.charAt(i);
+			if (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Checks whether the given string is a valid template name.
+	 * 
 	 * @param name the string to test
 	 * @return <code>true</code> if the name is valid
 	 * @since 3.3.1
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizeConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizeConfigurationBlock.java
index c8abe8f..35ca2a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizeConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizeConfigurationBlock.java
@@ -373,7 +373,7 @@ public class ImportOrganizeConfigurationBlock extends OptionsConfigurationBlock
 		FileDialog dialog= new FileDialog(getShell(), SWT.SAVE);
 		dialog.setText(PreferencesMessages.ImportOrganizeConfigurationBlock_saveDialog_title);
 		dialog.setFilterExtensions(new String[] {"*.importorder", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$
-		dialog.setFileName("example.importorder"); //$NON-NLS-1$
+		dialog.setFileName("example"); //$NON-NLS-1$
 		String lastPath= dialogSettings.get(DIALOGSETTING_LASTSAVEPATH);
 		if (lastPath != null) {
 			dialog.setFilterPath(lastPath);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
index e164e18..80b330a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaBasePreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@ import org.eclipse.jdt.internal.ui.refactoring.RefactoringSavePreferences;
 import org.eclipse.jdt.internal.ui.util.SWTUtil;
 
 /*
- * The page for setting general java plugin preferences.
+ * The page for setting general Java plug-in preferences.
  * See PreferenceConstants to access or change these values through public API.
  */
 public class JavaBasePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorAppearanceConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorAppearanceConfigurationBlock.java
index b44831b..3aa03f3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorAppearanceConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorAppearanceConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.List;
@@ -41,6 +42,8 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
 
+import org.eclipse.jdt.internal.ui.text.java.hover.SourceViewerInformationControl;
+
 
 /**
  * Configures Java Editor hover preferences.
@@ -396,7 +399,10 @@ class JavaEditorAppearanceConfigurationBlock extends AbstractConfigurationBlock
 	 */
 	private void initializeDefaultColors() {
 		if (getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
-			RGB rgb= fAppearanceColorList.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
+			Display display= fAppearanceColorList.getDisplay();
+			RGB rgb= SourceViewerInformationControl.getVisibleBackgroundColor(display);
+			if (rgb == null)
+				rgb= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
 			PreferenceConverter.setValue(getPreferenceStore(), PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR, rgb);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java
index 467986f..8db9f77 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorColoringConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,8 +78,8 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
 import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlighting;
 import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager;
-import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightings;
 import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingManager.HighlightedRange;
+import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightings;
 import org.eclipse.jdt.internal.ui.text.JavaColorManager;
 import org.eclipse.jdt.internal.ui.text.PreferencesAdapter;
 import org.eclipse.jdt.internal.ui.text.SimpleJavaSourceViewerConfiguration;
@@ -806,7 +806,9 @@ class JavaEditorColoringConfigurationBlock extends AbstractConfigurationBlock {
 		fPreviewViewer.setEditable(false);
 		Cursor arrowCursor= fPreviewViewer.getTextWidget().getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
 		fPreviewViewer.getTextWidget().setCursor(arrowCursor);
-		fPreviewViewer.getTextWidget().setCaret(null);
+
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
+//		fPreviewViewer.getTextWidget().setCaret(null);
 
 		String content= loadPreviewContentFromFile("ColorSettingPreviewCode.txt"); //$NON-NLS-1$
 		IDocument document= new Document(content);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaElementInfoPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaElementInfoPage.java
deleted file mode 100644
index d07f44d..0000000
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaElementInfoPage.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jdt.internal.ui.preferences;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-import org.eclipse.core.resources.IResource;
-
-import org.eclipse.jface.dialogs.Dialog;
-
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-
-import org.eclipse.jdt.internal.corext.util.Resources;
-
-import org.eclipse.jdt.ui.JavaElementLabels;
-
-import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
-
-
-/**
- * This is a dummy PropertyPage for JavaElements.
- * Copied from the ResourceInfoPage
- */
-public class JavaElementInfoPage extends PropertyPage {
-
-	/*
-	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
-	 */
-	public void createControl(Composite parent) {
-		super.createControl(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.JAVA_ELEMENT_INFO_PAGE);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
-	 */
-	protected Control createContents(Composite parent) {
-		// ensure the page has no special buttons
-		noDefaultAndApplyButton();
-
-		IJavaElement element= (IJavaElement)getElement();
-
-		IResource resource= element.getResource();
-
-		Composite composite= new Composite(parent, SWT.NONE);
-		GridLayout layout= new GridLayout();
-		layout.numColumns= 2;
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
-		Label nameLabel= new Label(composite, SWT.NONE);
-		nameLabel.setText(PreferencesMessages.JavaElementInfoPage_nameLabel);
-
-		Label nameValueLabel= new Label(composite, SWT.NONE);
-		nameValueLabel.setText(element.getElementName());
-
-		if (resource != null) {
-			// path label
-			Label pathLabel= new Label(composite, SWT.NONE);
-			pathLabel.setText(PreferencesMessages.JavaElementInfoPage_resource_path);
-
-			// path value label
-			Label pathValueLabel= new Label(composite, SWT.NONE);
-			pathValueLabel.setText(BasicElementLabels.getPathLabel(resource.getFullPath(), false));
-		}
-		if (element instanceof ICompilationUnit) {
-			ICompilationUnit unit= (ICompilationUnit)element;
-			Label packageLabel= new Label(composite, SWT.NONE);
-			packageLabel.setText(PreferencesMessages.JavaElementInfoPage_package);
-			Label packageName= new Label(composite, SWT.NONE);
-			packageName.setText(JavaElementLabels.getTextLabel(unit.getParent(), JavaElementLabels.ALL_DEFAULT));
-
-		} else if (element instanceof IPackageFragment) {
-			IPackageFragment packageFragment= (IPackageFragment)element;
-			Label packageContents= new Label(composite, SWT.NONE);
-			packageContents.setText(PreferencesMessages.JavaElementInfoPage_package_contents);
-			Label packageContentsType= new Label(composite, SWT.NONE);
-			try {
-				if (packageFragment.getKind() == IPackageFragmentRoot.K_SOURCE)
-					packageContentsType.setText(PreferencesMessages.JavaElementInfoPage_source);
-				else
-					packageContentsType.setText(PreferencesMessages.JavaElementInfoPage_binary);
-			} catch (JavaModelException e) {
-				packageContentsType.setText(PreferencesMessages.JavaElementInfoPage_not_present);
-			}
-		} else if (element instanceof IPackageFragmentRoot) {
-			Label rootContents= new Label(composite, SWT.NONE);
-			rootContents.setText(PreferencesMessages.JavaElementInfoPage_classpath_entry_kind);
-			Label rootContentsType= new Label(composite, SWT.NONE);
-			try {
-				IClasspathEntry entry= ((IPackageFragmentRoot)element).getRawClasspathEntry();
-				if (entry != null) {
-					switch (entry.getEntryKind()) {
-						case IClasspathEntry.CPE_SOURCE:
-							rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_source); break;
-						case IClasspathEntry.CPE_PROJECT:
-							rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_project); break;
-						case IClasspathEntry.CPE_LIBRARY:
-							rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_library); break;
-						case IClasspathEntry.CPE_VARIABLE:
-							rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_variable);
-							Label varPath= new Label(composite, SWT.NONE);
-							varPath.setText(PreferencesMessages.JavaElementInfoPage_variable_path);
-							Label varPathVar= new Label(composite, SWT.NONE);
-							varPathVar.setText(BasicElementLabels.getPathLabel(entry.getPath(), false));
-							break;
-					}
-				} else {
-					rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_not_present);
-				}
-			} catch (JavaModelException e) {
-				rootContentsType.setText(PreferencesMessages.JavaElementInfoPage_not_present);
-			}
-		} else if (element instanceof IJavaProject) {
-			Label packageLabel= new Label(composite, SWT.NONE);
-			packageLabel.setText(PreferencesMessages.JavaElementInfoPage_location);
-			String location= Resources.getLocationString(((IJavaProject)element).getProject());
-			if (location != null) {
-				Label packageName= new Label(composite, SWT.NONE);
-				packageName.setText(BasicElementLabels.getURLPart(location));
-			}
-		}
-		Dialog.applyDialogFont(composite);
-		return composite;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationBlock.java
index 8f1e983..9531b2a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationBlock.java
@@ -15,6 +15,8 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.util.ArrayList;
@@ -35,6 +37,7 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.URIUtil;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
@@ -340,12 +343,14 @@ public class JavadocConfigurationBlock {
 				}
 			} catch (MalformedURLException e) {
 				MessageDialog.openWarning(fShell, fTitle, fUnable);
+			} catch (URISyntaxException e) {
+				MessageDialog.openWarning(fShell, fTitle, fUnable);
 			}
 
 		}
 
 		public void spawnInBrowser(URL url) {
-			OpenBrowserUtil.open(url, fShell.getDisplay(), fTitle);
+			OpenBrowserUtil.openExternal(url, fShell.getDisplay());
 		}
 
 		private void validateFile(URL location) throws MalformedURLException {
@@ -363,13 +368,13 @@ public class JavadocConfigurationBlock {
 			MessageDialog.openWarning(fShell, fTitle, fInvalidMessage);
 		}
 
-		private void validateURL(URL location) throws MalformedURLException {
-			IPath path= new Path(location.toExternalForm());
-			IPath index = path.append("index.html"); //$NON-NLS-1$
-			IPath packagelist = path.append("package-list"); //$NON-NLS-1$
-			URL indexURL = new URL(index.toString());
-			URL packagelistURL = new URL(packagelist.toString());
-
+		private void validateURL(URL location) throws MalformedURLException, URISyntaxException {
+			URI path= URIUtil.toURI(location);
+			URI index = URIUtil.append(path, "index.html"); //$NON-NLS-1$
+			URI packagelist = URIUtil.append(path, "package-list"); //$NON-NLS-1$
+			URL indexURL = URIUtil.toURL(index);
+			URL packagelistURL = URIUtil.toURL(packagelist);
+			
 			boolean suc= checkURLConnection(indexURL) && checkURLConnection(packagelistURL);
 			if (suc) {
 				showConfirmValidationDialog(indexURL);
@@ -408,7 +413,9 @@ public class JavadocConfigurationBlock {
 					is.close();
 			}
 		} catch (IllegalArgumentException e) {
-			return false; // bug 91072
+			return false; // workaround for bug 91072
+		} catch (NullPointerException e) {
+			return false; // workaround for http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6536522
 		} catch (IOException e) {
 			return false;
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
index 93200cd..cb0bc64 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocConfigurationPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,7 +86,7 @@ public class JavadocConfigurationPropertyPage extends PropertyPage implements IS
 			if (elem instanceof IPackageFragmentRoot && ((IPackageFragmentRoot) elem).getKind() == IPackageFragmentRoot.K_BINARY) {
 				IPackageFragmentRoot root= (IPackageFragmentRoot) elem;
 
-				IClasspathEntry entry= root.getRawClasspathEntry();
+				IClasspathEntry entry= JavaModelUtil.getClasspathEntry(root);
 				if (entry == null) {
 					fIsValidElement= false;
 					setDescription(PreferencesMessages.JavadocConfigurationPropertyPage_IsIncorrectElement_description);
@@ -206,7 +206,8 @@ public class JavadocConfigurationPropertyPage extends PropertyPage implements IS
 	public boolean performOk() {
 		if (fJavadocConfigurationBlock != null) {
 			URL javadocLocation= fJavadocConfigurationBlock.getJavadocLocation();
-			if (javadocLocation == null && fInitalLocation == null || javadocLocation != null && javadocLocation.equals(fInitalLocation)) {
+			if (javadocLocation == null && fInitalLocation == null
+					|| javadocLocation != null && fInitalLocation != null && javadocLocation.toExternalForm().equals(fInitalLocation.toExternalForm())) {
 				return true; // no change
 			}
 
@@ -240,7 +241,7 @@ public class JavadocConfigurationPropertyPage extends PropertyPage implements IS
 						cpElem.setAttribute(CPListElement.JAVADOC, loc);
 						IClasspathEntry newEntry= cpElem.getClasspathEntry();
 						String[] changedAttributes= { CPListElement.JAVADOC };
-						BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, project, containerPath, monitor);
+						BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, project, containerPath, entry.getReferencingEntry() != null, monitor);
 					} else {
 						JavaUI.setProjectJavadocLocation(project, javadocLocation);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java
index eb0b655..a680828 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 package org.eclipse.jdt.internal.ui.preferences;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.custom.StyledText;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -20,12 +22,15 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.core.resources.IProject;
 
 import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.layout.GridDataFactory;
 import org.eclipse.jface.layout.PixelConverter;
 
 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
 
 import org.eclipse.jdt.core.JavaCore;
 
+import org.eclipse.jdt.internal.corext.util.Messages;
+
 import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
 import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
 
@@ -79,7 +84,7 @@ public class JavadocProblemsConfigurationBlock extends OptionsConfigurationBlock
 		fBlockEnableState= null;
 	}
 
-	private static Key[] getKeys() {
+	public static Key[] getKeys() {
 		Key[] keys= new Key[] {
 				PREF_JAVADOC_SUPPORT,
 				PREF_PB_INVALID_JAVADOC, PREF_PB_INVALID_JAVADOC_TAGS_VISIBILITY, PREF_PB_INVALID_JAVADOC_TAGS,
@@ -147,25 +152,38 @@ public class JavadocProblemsConfigurationBlock extends OptionsConfigurationBlock
 		layout.marginWidth= 0;
 		outer.setLayout(layout);
 
+		StyledText widget= new StyledText(outer, SWT.READ_ONLY | SWT.WRAP);
+		widget.setText(Messages.format(PreferencesMessages.JavadocProblemsConfigurationBlock_note_message, PreferencesMessages.JavadocProblemsConfigurationBlock_note_title));
+		widget.setBackground(outer.getBackground());
+		widget.setLeftMargin(0);
+		widget.setEnabled(false);
+		StyleRange styleRange= new StyleRange();
+		styleRange.start= 0;
+		styleRange.length= PreferencesMessages.JavadocProblemsConfigurationBlock_note_title.length();
+		styleRange.fontStyle= SWT.BOLD;
+		widget.setStyleRange(styleRange);
+		GridDataFactory.generate(widget, nColumns, 1);
+
+		Composite spacer= new Composite(outer, SWT.NONE);
+		GridDataFactory.fillDefaults().span(nColumns, 1).hint(1, 5).applyTo(spacer);
+
 		String label= PreferencesMessages.JavadocProblemsConfigurationBlock_pb_javadoc_support_label;
 		addCheckBox(outer, label, PREF_JAVADOC_SUPPORT, enabledDisabled, 0);
 
 		layout = new GridLayout();
 		layout.numColumns= nColumns;
 		layout.marginHeight= 0;
-		//layout.marginWidth= 0;
 
 		Composite composite= new Composite(outer, SWT.NONE);
 		composite.setLayout(layout);
 		composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, true));
 
 		fJavadocComposite= composite;
-
+		
 		Label description= new Label(composite, SWT.WRAP);
 		description.setText(PreferencesMessages.JavadocProblemsConfigurationBlock_javadoc_description);
 		GridData gd= new GridData();
 		gd.horizontalSpan= nColumns;
-		//gd.widthHint= fPixelConverter.convertWidthInCharsToPixels(60);
 		description.setLayoutData(gd);
 
 		int indent= fPixelConverter.convertWidthInCharsToPixels(2);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsPreferencePage.java
index 14c817c..6adc272 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavadocProblemsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,8 +45,8 @@ public class JavadocProblemsPreferencePage extends PropertyAndPreferencePage {
 
 	public JavadocProblemsPreferencePage() {
 		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
-		//setDescription(PreferencesMessages.getString("JavadocProblemsPreferencePage.description")); //$NON-NLS-1$
-
+//		setDescription("Note: Disabling Javadoc processing will also ignore references in Javadoc comments for search, refactorings, content assist, organize imports, etc.");
+		
 		// only used when page is shown programmatically
 		setTitle(PreferencesMessages.JavadocProblemsPreferencePage_title);
 	}
@@ -141,8 +141,8 @@ public class JavadocProblemsPreferencePage extends PropertyAndPreferencePage {
 	 * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#setElement(org.eclipse.core.runtime.IAdaptable)
 	 */
 	public void setElement(IAdaptable element) {
+		//TODO: remove
 		super.setElement(element);
-		setDescription(null); // no description for property page
 	}
 
 	/* (non-Javadoc)
@@ -152,9 +152,11 @@ public class JavadocProblemsPreferencePage extends PropertyAndPreferencePage {
 		super.applyData(data);
 		if (data instanceof Map && fConfigurationBlock != null) {
 			Map map= (Map) data;
-			Boolean useProjectSpecific= (Boolean) map.get(DATA_USE_PROJECT_SPECIFIC_OPTIONS);
-			if (useProjectSpecific != null) {
-				enableProjectSpecificSettings(useProjectSpecific.booleanValue());
+			if (isProjectPreferencePage()) {
+				Boolean useProjectSpecific= (Boolean) map.get(DATA_USE_PROJECT_SPECIFIC_OPTIONS);
+				if (useProjectSpecific != null) {
+					enableProjectSpecificSettings(useProjectSpecific.booleanValue());
+				}
 			}
 
 			Object key= map.get(DATA_SELECT_OPTION_KEY);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java
index 7f846b5..0d6632f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/NativeLibrariesPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,7 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 	private boolean fIsValidElement;
 	private IClasspathEntry fEntry;
 	private IPath fContainerPath;
+	private String fInitialNativeLibPath;
 
 	/**
 	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
@@ -74,7 +75,7 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 			if (elem instanceof IPackageFragmentRoot) {
 				IPackageFragmentRoot root= (IPackageFragmentRoot) elem;
 
-				IClasspathEntry entry= root.getRawClasspathEntry();
+				IClasspathEntry entry= JavaModelUtil.getClasspathEntry(root);
 				if (entry == null) {
 					fIsValidElement= false;
 					setDescription(PreferencesMessages.NativeLibrariesPropertyPage_invalidElementSelection_desription);
@@ -133,15 +134,15 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 		if (elem == null)
 			return new Composite(parent, SWT.NONE);
 
-		String nativeLibPath= null;
+		fInitialNativeLibPath= null;
 		IClasspathAttribute[] extraAttributes= fEntry.getExtraAttributes();
 		for (int i= 0; i < extraAttributes.length; i++) {
 			if (extraAttributes[i].getName().equals(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY)) {
-				nativeLibPath= extraAttributes[i].getValue();
+				fInitialNativeLibPath= extraAttributes[i].getValue();
 				break;
 			}
 		}
-		fConfigurationBlock= new NativeLibrariesConfigurationBlock(this, getShell(), nativeLibPath, fEntry);
+		fConfigurationBlock= new NativeLibrariesConfigurationBlock(this, getShell(), fInitialNativeLibPath, fEntry);
 		Control control= fConfigurationBlock.createContents(parent);
 
 		Dialog.applyDialogFont(control);
@@ -172,13 +173,14 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 	public boolean performOk() {
 		if (fConfigurationBlock != null) {
 			String nativeLibraryPath= fConfigurationBlock.getNativeLibraryPath();
-			if (nativeLibraryPath == null) {
-				return true;//no change
+			if (nativeLibraryPath == null && fInitialNativeLibPath == null
+					|| nativeLibraryPath != null && fInitialNativeLibPath != null && nativeLibraryPath.equals(fInitialNativeLibPath)) {
+				return true; //no change
 			}
 
 			IJavaElement elem= getJavaElement();
 			try {
-				IRunnableWithProgress runnable= getRunnable(getShell(), elem, nativeLibraryPath, fEntry, fContainerPath);
+				IRunnableWithProgress runnable= getRunnable(getShell(), elem, nativeLibraryPath, fEntry, fContainerPath, fEntry.getReferencingEntry() != null);
 				PlatformUI.getWorkbench().getProgressService().run(true, true, runnable);
 			} catch (InvocationTargetException e) {
 				String title= PreferencesMessages.NativeLibrariesPropertyPage_errorAttaching_title;
@@ -193,7 +195,7 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 		return true;
 	}
 
-	private static IRunnableWithProgress getRunnable(final Shell shell, final IJavaElement elem, final String nativeLibraryPath, final IClasspathEntry entry, final IPath containerPath) {
+	private static IRunnableWithProgress getRunnable(final Shell shell, final IJavaElement elem, final String nativeLibraryPath, final IClasspathEntry entry, final IPath containerPath, final boolean isReferencedEntry) {
 		return new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) throws InvocationTargetException {
 				try {
@@ -203,7 +205,7 @@ public class NativeLibrariesPropertyPage extends PropertyPage implements IStatus
 						cpElem.setAttribute(CPListElement.NATIVE_LIB_PATH, nativeLibraryPath);
 						IClasspathEntry newEntry= cpElem.getClasspathEntry();
 						String[] changedAttributes= { CPListElement.NATIVE_LIB_PATH };
-						BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, project, containerPath, monitor);
+						BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, project, containerPath, isReferencedEntry,  monitor);
 					}
 				} catch (CoreException e) {
 					throw new InvocationTargetException(e);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java
index 77b6d50..9da7591 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java
@@ -20,6 +20,8 @@ import java.util.StringTokenizer;
 import org.osgi.service.prefs.BackingStoreException;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.MouseAdapter;
@@ -27,6 +29,8 @@ import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -47,6 +51,7 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ProjectScope;
 
+import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -407,7 +412,7 @@ public abstract class OptionsConfigurationBlock {
 		return checkBox;
 	}
 
-	protected Button addCheckBoxWithLink(Composite parent, String label, Key key, String[] values, int indent, int widthHint, SelectionListener listener) {
+	protected Button addCheckBoxWithLink(Composite parent, final String label, Key key, String[] values, int indent, int widthHint, SelectionListener listener) {
 		LinkControlData data= new LinkControlData(key, values);
 
 		GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false);
@@ -427,6 +432,11 @@ public abstract class OptionsConfigurationBlock {
 		checkBox.setData(data);
 		checkBox.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
 		checkBox.addSelectionListener(getSelectionListener());
+		checkBox.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result = LegacyActionTools.removeMnemonics(label.replaceAll("</?[aA][^>]*>", "")); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		});
 
 		gd= new GridData(GridData.FILL, GridData.CENTER, true, false);
 		gd.widthHint= widthHint;
@@ -460,6 +470,17 @@ public abstract class OptionsConfigurationBlock {
 				}
 			}
 		});
+		link.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent e) {
+				if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit == true) {
+					e.detail= SWT.TRAVERSE_NONE;
+					checkBox.setSelection(!checkBox.getSelection());
+					checkBox.setFocus();
+					linkSelected[0]= false;
+					controlChanged(checkBox);
+				}
+			}
+		});
 
 		makeScrollableCompositeAware(link);
 		makeScrollableCompositeAware(checkBox);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
index b7f5a32..21eebbe 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *     John Kaplan, johnkaplantech at gmail.com - 108071 [code templates] template for body of newly created class
  *     Sebastian Davids, sdavids at gmx.de - 187316 [preferences] Mark Occurences Pref Page; Link to
  *     Benjamin Muskalla <b.muskalla at gmx.net> - [preferences] Add preference for new compiler warning: MissingSynchronizedModifierInInheritedMethod - https://bugs.eclipse.org/bugs/show_bug.cgi?id=245240
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.preferences;
 
@@ -24,8 +25,6 @@ public final class PreferencesMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String BuildPathDialog_error_title;
-	public static String BuildPathDialog_error_message;
 	public static String BuildPathsPropertyPage_error_message;
 	public static String BuildPathsPropertyPage_error_title;
 	public static String BuildPathsPropertyPage_job_title;
@@ -57,15 +56,10 @@ public final class PreferencesMessages extends NLS {
 	public static String CodeAssistAdvancedConfigurationBlock_parameterNameFromAttachedJavadoc_timeout_emptyInput;
 	public static String CodeAssistAdvancedConfigurationBlock_parameterNameFromAttachedJavadoc_timeout_invalidInput;
 	public static String CodeAssistAdvancedConfigurationBlock_parameterNameFromAttachedJavadoc_timeout_invalidRange;
-	public static String ImportOrganizeConfigurationBlock_emptylines_between_groups_label;
-	public static String ImportOrganizeConfigurationBlock_error_invalidnumberofemptylines;
-	public static String ImportOrganizePreferencePage_description;
 	public static String ImportOrganizePreferencePage_title;
 	public static String ImportOrganizeConfigurationBlock_order_label;
 	public static String ImportOrganizeConfigurationBlock_other_static;
-	public static String ImportOrganizeConfigurationBlock_other_static_label;
 	public static String ImportOrganizeConfigurationBlock_other_normal;
-	public static String ImportOrganizeConfigurationBlock_other_normal_label;
 	public static String ImportOrganizeConfigurationBlock_order_add_button;
 	public static String ImportOrganizeConfigurationBlock_order_edit_button;
 	public static String ImportOrganizeConfigurationBlock_order_up_button;
@@ -74,7 +68,6 @@ public final class PreferencesMessages extends NLS {
 	public static String ImportOrganizeConfigurationBlock_order_add_static_button;
 	public static String ImportOrganizeConfigurationBlock_order_load_button;
 	public static String ImportOrganizeConfigurationBlock_order_save_button;
-	public static String ImportOrganizeConfigurationBlock_other_description;
 	public static String ImportOrganizeConfigurationBlock_ignoreLowerCase_label;
 	public static String ImportOrganizeConfigurationBlock_threshold_label;
 	public static String ImportOrganizeConfigurationBlock_error_invalidthreshold;
@@ -95,7 +88,6 @@ public final class PreferencesMessages extends NLS {
 	public static String ImportOrganizeInputDialog_ChooseTypeDialog_title;
 	public static String ImportOrganizeInputDialog_ChooseTypeDialog_description;
 	public static String ImportOrganizeInputDialog_ChooseTypeDialog_error_message;
-	public static String ImportOrganizeInputDialog_error_enterName;
 	public static String ImportOrganizeInputDialog_error_invalidName;
 	public static String ImportOrganizeInputDialog_error_entryExists;
 	public static String ImportOrganizeInputDialog_name_group_label;
@@ -137,7 +129,6 @@ public final class PreferencesMessages extends NLS {
 	public static String NewJavaProjectPreferencePage_folders_error_invalidbinname;
 	public static String NewJavaProjectPreferencePage_folders_error_invalidcp;
 	public static String NewJavaProjectPreferencePage_error_decode;
-	public static String JavaEditorPreferencePage_showQuickFixables;
 	public static String JavaEditorPreferencePage_analyseAnnotationsWhileTyping;
 	public static String JavaEditorPreferencePage_multiLineComment;
 	public static String JavaEditorPreferencePage_singleLineComment;
@@ -152,11 +143,7 @@ public final class PreferencesMessages extends NLS {
 	public static String JavaEditorPreferencePage_javaDocHtmlTags;
 	public static String JavaEditorPreferencePage_javaDocLinks;
 	public static String JavaEditorPreferencePage_javaDocOthers;
-	public static String JavaEditorPreferencePage_backgroundColor;
 	public static String JavaEditorPreferencePage_systemDefault;
-	public static String JavaEditorPreferencePage_custom;
-	public static String JavaEditorPreferencePage_semanticHighlighting_option;
-	public static String JavaEditorPreferencePage_foreground;
 	public static String JavaEditorPreferencePage_color;
 	public static String JavaEditorPreferencePage_bold;
 	public static String JavaEditorPreferencePage_italic;
@@ -164,13 +151,7 @@ public final class PreferencesMessages extends NLS {
 	public static String JavaEditorPreferencePage_underline;
 	public static String JavaEditorPreferencePage_enable;
 	public static String JavaEditorPreferencePage_preview;
-	public static String JavaEditorPreferencePage_displayedTabWidth;
-	public static String JavaEditorPreferencePage_insertSpaceForTabs;
-	public static String JavaEditorPreferencePage_showOverviewRuler;
 	public static String JavaEditorPreferencePage_highlightMatchingBrackets;
-	public static String JavaEditorPreferencePage_highlightCurrentLine;
-	public static String JavaEditorPreferencePage_showPrintMargin;
-	public static String JavaEditorPreferencePage_printMarginColumn;
 	public static String JavaEditorPreferencePage_insertSingleProposalsAutomatically;
 	public static String JavaEditorPreferencePage_showOnlyProposalsVisibleInTheInvocationContext;
 	public static String JavaEditorPreferencePage_presentProposalsInAlphabeticalOrder;
@@ -197,14 +178,9 @@ public final class PreferencesMessages extends NLS {
 	public static String JavaEditorPreferencePage_colors;
 	public static String JavaEditorPreferencePage_empty_input;
 	public static String JavaEditorPreferencePage_invalid_input;
-	public static String JavaEditorPreferencePage_showLineNumbers;
-	public static String JavaEditorPreferencePage_lineNumberForegroundColor;
 	public static String JavaEditorPreferencePage_matchingBracketsHighlightColor2;
-	public static String JavaEditorPreferencePage_currentLineHighlighColor;
-	public static String JavaEditorPreferencePage_printMarginColor2;
 	public static String JavaEditorPreferencePage_appearanceOptions;
 	public static String JavaEditorPreferencePage_typing_tabTitle;
-	public static String JavaEditorPreferencePage_typing_description;
 	public static String JavaEditorPreferencePage_closeStrings;
 	public static String JavaEditorPreferencePage_closeBrackets;
 	public static String JavaEditorPreferencePage_closeBraces;
@@ -221,18 +197,14 @@ public final class PreferencesMessages extends NLS {
 	public static String JavaEditorPreferencePage_typing_smartOpeningBrace;
 	public static String JavaEditorPreferencePage_typing_smartTab;
 	public static String JavaEditorPreferencePage_hoverTab_title;
-	public static String JavaEditorPreferencePage_showEditorBreadcrumb;
 	public static String JavaEditorColoringConfigurationBlock_link;
 	public static String JavaBasePreferencePage_openTypeHierarchy;
 	public static String JavaBasePreferencePage_inView;
 	public static String JavaBasePreferencePage_inPerspective;
 	public static String JavaEditorPreferencePage_quickassist_lightbulb;
 	public static String JavaEditorPreferencePage_showJavaElementOnly;
-	public static String JavaEditorPreferencePage_accessibility_disableCustomCarets;
-	public static String JavaEditorPreferencePage_accessibility_wideCaret;
 	public static String JavaEditorHoverConfigurationBlock_annotationRollover;
 	public static String JavaEditorHoverConfigurationBlock_hoverPreferences;
-	public static String JavaEditorHoverConfigurationBlock_enabled;
 	public static String JavaEditorHoverConfigurationBlock_keyModifier;
 	public static String JavaEditorHoverConfigurationBlock_description;
 	public static String JavaEditorHoverConfigurationBlock_modifierIsNotValid;
@@ -309,7 +281,6 @@ public final class PreferencesMessages extends NLS {
 	public static String SourceAttachmentPropertyPage_error_message;
 	public static String SourceAttachmentPropertyPage_invalid_container;
 	public static String SourceAttachmentPropertyPage_noarchive_message;
-	public static String SourceAttachmentPropertyPage_containerentry_message;
 	public static String NativeLibrariesPropertyPage_invalidElementSelection_desription;
 	public static String NativeLibrariesPropertyPage_errorAttaching_title;
 	public static String NativeLibrariesPropertyPage_errorAttaching_message;
@@ -319,14 +290,16 @@ public final class PreferencesMessages extends NLS {
 	public static String AppearancePreferencePage_methodtypeparams_label;
 	public static String AppearancePreferencePage_pkgNamePatternEnable_label;
 	public static String AppearancePreferencePage_pkgNamePattern_label;
+	public static String AppearancePreferencePage_pkgNamePatternAbbreviateEnable_label;
+	public static String AppearancePreferencePage_pkgNamePatternAbbreviate_label;
 	public static String AppearancePreferencePage_showMembersInPackagesView;
 	public static String AppearancePreferencePage_stackViewsVerticallyInTheJavaBrowsingPerspective;
 	public static String AppearancePreferencePage_note;
 	public static String AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives;
 	public static String AppearancePreferencePage_packageNameCompressionPattern_error_isEmpty;
+	public static String AppearancePreferencePage_packageNameAbbreviationPattern_error_isInvalid;
 	public static String AppearancePreferencePage_foldEmptyPackages;
 	public static String CodeFormatterPreferencePage_title;
-	public static String CodeFormatterPreferencePage_description;
 	public static String SourceAttachmentPropertyPage_not_supported;
 	public static String SourceAttachmentPropertyPage_read_only;
 	public static String TodoTaskPreferencePage_title;
@@ -360,10 +333,8 @@ public final class PreferencesMessages extends NLS {
 	public static String PropertyAndPreferencePage_showprojectspecificsettings_label;
 	public static String PropertyAndPreferencePage_useprojectsettings_label;
 	public static String JavaBuildPreferencePage_title;
-	public static String JavaBuildPreferencePage_description;
 	public static String JavaBuildConfigurationBlock_section_general;
 	public static String JavaBuildConfigurationBlock_section_output_folder;
-	public static String JavaBuildConfigurationBlock_section_access_rules;
 	public static String JavaBuildConfigurationBlock_section_build_path_problems;
 	public static String JavaBuildConfigurationBlock_error;
 	public static String JavaBuildConfigurationBlock_warning;
@@ -394,7 +365,6 @@ public final class PreferencesMessages extends NLS {
 	public static String ProblemSeveritiesConfigurationBlock_ignore;
 	public static String ProblemSeveritiesConfigurationBlock_section_potential_programming_problems;
 	public static String ProblemSeveritiesConfigurationBlock_section_unnecessary_code;
-	public static String ProblemSeveritiesConfigurationBlock_section_nls;
 	public static String ProblemSeveritiesConfigurationBlock_section_code_style;
 	public static String ProblemSeveritiesConfigurationBlock_section_deprecations;
 	public static String ProblemSeveritiesConfigurationBlock_section_name_shadowing;
@@ -431,6 +401,7 @@ public final class PreferencesMessages extends NLS {
 	public static String ProblemSeveritiesConfigurationBlock_pb_unused_local_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label;
+	public static String ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_unused_private_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_non_externalized_strings_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_dead_code;
@@ -445,11 +416,13 @@ public final class PreferencesMessages extends NLS {
 	public static String ProblemSeveritiesConfigurationBlock_pb_autoboxing_problem_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_char_array_in_concat_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_comparing_identical;
+	public static String ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_for_interface_method_implementations_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_missing_deprecated_annotation_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_annotation_super_interface_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_type_parameter_hiding_label;
 	public static String ProblemSeveritiesConfigurationBlock_pb_unused_label_label;
+	public static String ProblemSeveritiesConfigurationBlock_pb_unused_object_allocation_label;
 	public static String JavadocProblemsPreferencePage_title;
 	public static String JavadocProblemsConfigurationBlock_allStandardTags;
 	public static String JavadocProblemsConfigurationBlock_public;
@@ -459,6 +432,8 @@ public final class PreferencesMessages extends NLS {
 	public static String JavadocProblemsConfigurationBlock_error;
 	public static String JavadocProblemsConfigurationBlock_warning;
 	public static String JavadocProblemsConfigurationBlock_ignore;
+	public static String JavadocProblemsConfigurationBlock_note_title;
+	public static String JavadocProblemsConfigurationBlock_note_message;
 	public static String JavadocProblemsConfigurationBlock_needsbuild_title;
 	public static String JavadocProblemsConfigurationBlock_needsfullbuild_message;
 	public static String JavadocProblemsConfigurationBlock_needsprojectbuild_message;
@@ -478,7 +453,6 @@ public final class PreferencesMessages extends NLS {
 	public static String JavadocProblemsConfigurationBlock_pb_missing_tag_description;
 	public static String JavadocProblemsConfigurationBlock_returnTag;
 	public static String CompliancePreferencePage_title;
-	public static String CompliancePreferencePage_description;
 	public static String ComplianceConfigurationBlock_error;
 	public static String ComplianceConfigurationBlock_warning;
 	public static String ComplianceConfigurationBlock_ignore;
@@ -506,9 +480,6 @@ public final class PreferencesMessages extends NLS {
 	public static String ComplianceConfigurationBlock_compliance_follows_EE_with_EE_label;
 	public static String ComplianceConfigurationBlock_compliance_group_label;
 	public static String ComplianceConfigurationBlock_classfiles_group_label;
-	public static String OptionsConfigurationBlock_job_title;
-	public static String OptionsConfigurationBlock_buildall_taskname;
-	public static String OptionsConfigurationBlock_buildproject_taskname;
 	public static String CodeStylePreferencePage_title;
 	public static String CodeTemplatesPreferencePage_title;
 	public static String JavaCategoryPropertyPage_text;
@@ -559,7 +530,6 @@ public final class PreferencesMessages extends NLS {
 	public static String MembersOrderPreferencePage_protected_label;
 	public static String MembersOrderPreferencePage_default_label;
 	public static String MembersOrderPreferencePage_usevisibilitysort_label;
-	public static String CodeTemplateBlock_link_tooltip;
 	public static String CodeTemplateBlock_templates_comment_node;
 	public static String CodeTemplateBlock_templates_code_node;
 	public static String CodeTemplateBlock_catchblock_label;
@@ -590,7 +560,8 @@ public final class PreferencesMessages extends NLS {
 	public static String CodeTemplateBlock_preview;
 	public static String CodeTemplateBlock_import_title;
 	public static String CodeTemplateBlock_import_extension;
-	public static String CodeTemplateBlock_export_title;
+	public static String CodeTemplateBlock_export_title_singular;
+	public static String CodeTemplateBlock_export_title_plural;
 	public static String CodeTemplateBlock_export_filename;
 	public static String CodeTemplateBlock_export_extension;
 	public static String CodeTemplateBlock_export_exists_title;
@@ -621,8 +592,6 @@ public final class PreferencesMessages extends NLS {
 	public static String TypeFilterInputDialog_error_entryExists;
 	public static String TypeFilterInputDialog_choosepackage_label;
 	public static String TypeFilterInputDialog_choosepackage_description;
-	public static String JavaEditorPreferencePage_selectionBackgroundColor;
-	public static String JavaEditorPreferencePage_selectionForegroundColor;
 	public static String SpellingPreferencePage_empty_threshold;
 	public static String SpellingPreferencePage_invalid_threshold;
 	public static String SpellingPreferencePage_ignore_digits_label;
@@ -644,10 +613,6 @@ public final class PreferencesMessages extends NLS {
 	public static String SpellingPreferencePage_dictionary_none;
 	public static String SpellingPreferencePage_locale_error;
 	public static String SpellingPreferencePage_filedialog_title;
-	public static String SpellingPreferencePage_filter_dictionary_extension;
-	public static String SpellingPreferencePage_filter_all_extension;
-	public static String SpellingPreferencePage_filter_dictionary_label;
-	public static String SpellingPreferencePage_filter_all_label;
 	public static String SpellingPreferencePage_enable_contentassist_label;
 	public static String SpellingPreferencePage_group_user;
 	public static String SpellingPreferencePage_group_dictionary;
@@ -655,8 +620,6 @@ public final class PreferencesMessages extends NLS {
 	public static String SpellingPreferencePage_group_advanced;
 	public static String SpellingPreferencePage_user_dictionary_description;
 	public static String SpellingPreferencePage_variables;
-	public static String BuildPathPreferencePage_title;
-	public static String BuildPathPreferencePage_description;
 	public static String UserLibraryPreferencePage_title;
 	public static String UserLibraryPreferencePage_description;
 	public static String UserLibraryPreferencePage_libraries_label;
@@ -708,6 +671,7 @@ public final class PreferencesMessages extends NLS {
 	public static String UserLibraryPreferencePage_LoadSaveDialog_load_replace_title;
 	public static String EditTemplateDialog_error_noname;
 	public static String EditTemplateDialog_error_invalidName;
+	public static String EditTemplateDialog_error_invalidPattern;
 	public static String EditTemplateDialog_title_new;
 	public static String EditTemplateDialog_title_edit;
 	public static String EditTemplateDialog_name;
@@ -739,7 +703,6 @@ public final class PreferencesMessages extends NLS {
 	public static String PropertiesFileEditorPreferencePage_italic;
 	public static String PropertiesFileEditorPreferencePage_strikethrough;
 	public static String PropertiesFileEditorPreferencePage_underline;
-	public static String PropertiesFileEditorPreferencePage_enable;
 	public static String PropertiesFileEditorPreferencePage_preview;
 	public static String PropertiesFileEditorPreferencePage_link;
 	public static String PropertiesFileEditorPreferencePage_link_tooltip;
@@ -754,8 +717,6 @@ public final class PreferencesMessages extends NLS {
 	public static String SmartTypingConfigurationBlock_tabs_message_tabsAndSpaces;
 	public static String SmartTypingConfigurationBlock_pasting_title;
 	public static String SmartTypingConfigurationBlock_strings_title;
-	public static String WorkingSetPropertyPage_ReadOnlyWizard_description;
-	public static String WorkingSetPropertyPage_ReadOnlyWizard_title;
 	public static String CodeAssistConfigurationBlock_typeFilters_link;
 	public static String CodeAssistConfigurationBlock_sortingSection_title;
 	public static String CodeAssistConfigurationBlock_autoactivationSection_title;
@@ -791,6 +752,7 @@ public final class PreferencesMessages extends NLS {
 	public static String JavaBasePreferencePage_do_not_hide_dialog_message;
 	public static String CodeAssistConfigurationBlock_matchCamelCase_label;
 	public static String ComplianceConfigurationBlock_version16;
+	public static String ComplianceConfigurationBlock_version17;
 	public static String ComplianceConfigurationBlock_versionCLDC11;
 	public static String ComplianceConfigurationBlock_src_greater_compliance;
 	public static String ComplianceConfigurationBlock_classfile_greater_compliance;
@@ -808,15 +770,16 @@ public final class PreferencesMessages extends NLS {
 	public static String CodeAssistStaticMembersConfigurationBlock_edit_button;
 	public static String CodeAssistStaticMembersConfigurationBlock_remove_button;
 
-	public static String FavoriteStaticMemberInputDialog_member_title;
+	public static String FavoriteStaticMemberInputDialog_member_new_title;
+	public static String FavoriteStaticMemberInputDialog_member_edit_title;
 	public static String FavoriteStaticMemberInputDialog_member_labelText;
-	public static String FavoriteStaticMemberInputDialog_type_title;
+	public static String FavoriteStaticMemberInputDialog_type_new_title;
+	public static String FavoriteStaticMemberInputDialog_type_edit_title;
 	public static String FavoriteStaticMemberInputDialog_type_labelText;
 	public static String FavoriteStaticMemberInputDialog_browse_button;
 	public static String FavoriteStaticMemberInputDialog_ChooseTypeDialog_title;
 	public static String FavoriteStaticMemberInputDialog_ChooseTypeDialog_description;
 	public static String FavoriteStaticMemberInputDialog_ChooseTypeDialog_error_message;
-	public static String FavoriteStaticMemberInputDialog_error_enterName;
 	public static String FavoriteStaticMemberInputDialog_error_invalidMemberName;
 	public static String FavoriteStaticMemberInputDialog_error_invalidTypeName;
 	public static String FavoriteStaticMemberInputDialog_error_entryExists;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
index 2d1289d..739ed81 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,12 +10,10 @@
 #     John Kaplan, johnkaplantech at gmail.com - 108071 [code templates] template for body of newly created class
 #     Sebastian Davids, sdavids at gmx.de - 187316 [preferences] Mark Occurrences Pref Page; Link to
 #     Benjamin Muskalla <b.muskalla at gmx.net> - [preferences] Add preference for new compiler warning: MissingSynchronizedModifierInInheritedMethod - https://bugs.eclipse.org/bugs/show_bug.cgi?id=245240
+#     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
 ###############################################################################
 
-BuildPathDialog_error_message=An error occurred while setting the build path
-BuildPathDialog_error_title=Error Setting Build Path
-
-BuildPathsPropertyPage_error_message=An error occurred while setting the build path
+BuildPathsPropertyPage_error_message=An error occurred while setting the build path.
 BuildPathsPropertyPage_error_title=Error Setting Build Path
 BuildPathsPropertyPage_job_title=Setting build path
 BuildPathsPropertyPage_no_java_project_message=Not a Java project.
@@ -35,14 +33,11 @@ Non modifiable classpath variables are set internally (for example, JRE_LIB, JRE
 ClasspathVariablesPreferencePage_savechanges_title=Classpath Variables
 ClasspathVariablesPreferencePage_savechanges_message=Do you want to apply the changes to the class path variables now? Your changes will be lost if another page modifies the classpath variables as well.
 
-ImportOrganizePreferencePage_description=Preferences used by the Organize Imports action:
 ImportOrganizePreferencePage_title=Organize Imports
 
 ImportOrganizeConfigurationBlock_order_label=Define the sorting order of im&port statements. A package or type name prefix (e.g. 'org.eclipse') is a valid entry. An import is always added to the most specific group.
 ImportOrganizeConfigurationBlock_other_static=* - all unmatched static imports
-ImportOrganizeConfigurationBlock_other_static_label=Enable 'Other static' group
 ImportOrganizeConfigurationBlock_other_normal=* - all unmatched type imports
-ImportOrganizeConfigurationBlock_other_normal_label=Enable 'Other' group
 ImportOrganizeConfigurationBlock_order_add_button=&New...
 ImportOrganizeConfigurationBlock_order_edit_button=&Edit...
 ImportOrganizeConfigurationBlock_order_up_button=&Up
@@ -51,11 +46,9 @@ ImportOrganizeConfigurationBlock_order_remove_button=&Remove
 ImportOrganizeConfigurationBlock_order_add_static_button=New Stati&c...
 ImportOrganizeConfigurationBlock_order_load_button=I&mport...
 ImportOrganizeConfigurationBlock_order_save_button=E&xport...
-ImportOrganizeConfigurationBlock_other_description=Group all import not covered by all other groups:
 ImportOrganizeConfigurationBlock_ignoreLowerCase_label=Do not create imports for &types starting with a lowercase letter
 ImportOrganizeConfigurationBlock_threshold_label=Number of &imports needed for .* (e.g. 'org.eclipse.*'):
 ImportOrganizeConfigurationBlock_error_invalidthreshold=Invalid import number.
-ImportOrganizeConfigurationBlock_error_invalidnumberofemptylines=Invalid number of empty lines between groups
 ImportOrganizeConfigurationBlock_loadDialog_title=Load Import Order from File
 ImportOrganizeConfigurationBlock_loadDialog_error_title=Load Import Order
 ImportOrganizeConfigurationBlock_loadDialog_error_message=Importing failed. Not a valid import order file.
@@ -63,7 +56,6 @@ ImportOrganizeConfigurationBlock_saveDialog_title=Save Import Order to File
 ImportOrganizeConfigurationBlock_saveDialog_error_title=Save Import Order
 ImportOrganizeConfigurationBlock_staticthreshold_label=Number of &static imports needed for .* (e.g. 'java.lang.Math.*'):
 ImportOrganizeConfigurationBlock_saveDialog_error_message=Exporting import order file failed.
-ImportOrganizeConfigurationBlock_emptylines_between_groups_label=Empt&y lines between import groups:
 ImportOrganizeInputDialog_title=Import Group
 ImportOrganizeInputDialog_browse_packages_button=&Packages...
 ImportOrganizeInputDialog_browse_types_label=&Types...
@@ -75,7 +67,6 @@ ImportOrganizeInputDialog_ChooseTypeDialog_title=Type Selection
 ImportOrganizeInputDialog_ChooseTypeDialog_description=Choose type name:
 ImportOrganizeInputDialog_ChooseTypeDialog_error_message=A problem occurred while collecting types. Check log for more details.
 
-ImportOrganizeInputDialog_error_enterName=Enter a name or prefix.
 ImportOrganizeInputDialog_error_invalidName=Not a valid type or package name.
 ImportOrganizeInputDialog_error_entryExists=Entry already exists in list.
 ImportOrganizeInputDialog_name_group_label=&Enter a prefix (e.g. 'org.eclipse') or '*' to match all imports:
@@ -117,8 +108,6 @@ NewJavaProjectPreferencePage_folders_error_invalidcp=Settings will result in an
 
 NewJavaProjectPreferencePage_error_decode=Error while decoding JRE entry
 
-JavaEditorPreferencePage_showEditorBreadcrumb=&Show editor breadcrumb
-JavaEditorPreferencePage_showQuickFixables= Indicate annotations solvable with &Quick Fix in vertical ruler
 JavaEditorPreferencePage_analyseAnnotationsWhileTyping= Report &problems as you type
 JavaEditorPreferencePage_multiLineComment=Multi-line comment
 JavaEditorPreferencePage_singleLineComment=Single-line comment
@@ -133,11 +122,7 @@ JavaEditorPreferencePage_javaDocKeywords=Tags
 JavaEditorPreferencePage_javaDocHtmlTags=HTML markup
 JavaEditorPreferencePage_javaDocLinks=Links
 JavaEditorPreferencePage_javaDocOthers=Others
-JavaEditorPreferencePage_backgroundColor=Background color
 JavaEditorPreferencePage_systemDefault=&System Default
-JavaEditorPreferencePage_custom=C&ustom:
-JavaEditorPreferencePage_semanticHighlighting_option= &Enable advanced coloring
-JavaEditorPreferencePage_foreground=Ele&ment:
 JavaEditorPreferencePage_color=C&olor:
 JavaEditorPreferencePage_bold=&Bold
 JavaEditorPreferencePage_italic=&Italic
@@ -145,20 +130,14 @@ JavaEditorPreferencePage_strikethrough=&Strikethrough
 JavaEditorPreferencePage_underline=&Underline
 JavaEditorPreferencePage_enable=Enab&le
 JavaEditorPreferencePage_preview=Previe&w:
-JavaEditorPreferencePage_displayedTabWidth=Displayed &tab width:
-JavaEditorPreferencePage_insertSpaceForTabs=Ins&ert spaces for tab (see Code Formatter preference page)
-JavaEditorPreferencePage_showOverviewRuler=Show overview &ruler
 JavaEditorPreferencePage_highlightMatchingBrackets=Highlight &matching brackets
-JavaEditorPreferencePage_highlightCurrentLine=Highlight &current line
-JavaEditorPreferencePage_showPrintMargin=Sho&w print margin
-JavaEditorPreferencePage_printMarginColumn=&Print margin column:
 JavaEditorPreferencePage_insertSingleProposalsAutomatically=Insert single &proposals automatically
 JavaEditorPreferencePage_showOnlyProposalsVisibleInTheInvocationContext=Hide proposals not visible in the in&vocation context
 JavaEditorPreferencePage_presentProposalsInAlphabeticalOrder=&Sort proposals
 JavaEditorPreferencePage_coloring_element=&Element:
 JavaEditorPreferencePage_enableAutoActivation=&Enable auto activation
 JavaEditorPreferencePage_automaticallyAddImportInsteadOfQualifiedName=Add import instead of qua&lified name
-JavaEditorPreferencePage_suggestStaticImports=&Use static imports (only 1.5 or higher)
+JavaEditorPreferencePage_suggestStaticImports=&Use <a>static imports</a> (only 1.5 or higher)
 JavaEditorPreferencePage_completionInserts=Completion inser&ts
 JavaEditorPreferencePage_completionOverwrites=Completion over&writes
 JavaEditorPreferencePage_completionToggleHint=Press 'Ctrl' to toggle while content assist is active
@@ -180,15 +159,10 @@ JavaEditorPreferencePage_general=Appeara&nce
 JavaEditorPreferencePage_colors=Synta&x
 JavaEditorPreferencePage_empty_input=Empty input
 JavaEditorPreferencePage_invalid_input=''{0}'' is not a valid input.
-JavaEditorPreferencePage_showLineNumbers=Show lin&e numbers
-JavaEditorPreferencePage_lineNumberForegroundColor=Line number foreground
 JavaEditorPreferencePage_matchingBracketsHighlightColor2=Matching brackets highlight
-JavaEditorPreferencePage_currentLineHighlighColor=Current line highlight
-JavaEditorPreferencePage_printMarginColor2=Print margin
 JavaEditorPreferencePage_appearanceOptions=Appearance co&lor options:
 
 JavaEditorPreferencePage_typing_tabTitle=T&yping
-JavaEditorPreferencePage_typing_description= Enable these typing aids in Smart Insert mode:
 JavaEditorPreferencePage_closeStrings= "&Strings"
 JavaEditorPreferencePage_closeBrackets= (Parentheses), [square] and <angle> brac&kets
 JavaEditorPreferencePage_closeBraces= {B&races}
@@ -219,12 +193,8 @@ JavaBasePreferencePage_inPerspective=Open a new Type Hierarchy &Perspective
 JavaEditorPreferencePage_quickassist_lightbulb=L&ight bulb for quick assists
 JavaEditorPreferencePage_showJavaElementOnly= O&nly show the selected Java element
 
-JavaEditorPreferencePage_accessibility_disableCustomCarets= &Use custom caret
-JavaEditorPreferencePage_accessibility_wideCaret= Enable thic&k caret
-
 JavaEditorHoverConfigurationBlock_annotationRollover= &Expand vertical ruler icons upon hovering (does not affect open editors)
 JavaEditorHoverConfigurationBlock_hoverPreferences= Text &Hover key modifier preferences:
-JavaEditorHoverConfigurationBlock_enabled= &Enabled
 JavaEditorHoverConfigurationBlock_keyModifier= Pressed key &modifier while hovering:
 JavaEditorHoverConfigurationBlock_description= Descriptio&n:
 JavaEditorHoverConfigurationBlock_modifierIsNotValid= Modifier ''{0}'' is not valid.
@@ -274,7 +244,7 @@ JavadocConfigurationPropertyPage_IsPackageFragmentRoot_description=Specify the l
 JavadocConfigurationBlock_workspace_archive_selection_dialog_title=Javadoc Archive Selection Dialog
 JavadocConfigurationBlock_workspace_archive_selection_dialog_description=&Choose the archive containing the documentation:
 JavadocConfigurationPropertyPage_IsIncorrectElement_description=Javadoc location can only be attached to Java projects or archives and class folders in Java projects. Source folders use the location specified at their project.
-JavadocConfigurationPropertyPage_IsJavaProject_description=Specify the location of the project\'s Javadoc documentation. This location is used by the Javadoc export wizard as the default value and by the \'Open External Javadoc\' action. For example: \'file:/c:/myworkspace/myproject/doc\'.
+JavadocConfigurationPropertyPage_IsJavaProject_description=Specify the location of the project\'s Javadoc documentation. This location is used by the Javadoc export wizard as the default value and by the \'Open Attached Javadoc\' action. For example: \'file:/c:/myworkspace/myproject/doc\'.
 JavadocConfigurationPropertyPage_invalid_container=The current class path entry belongs to container ''{0}'' which can not be configured.
 JavadocConfigurationPropertyPage_not_supported=The current class path entry belongs to container ''{0}'' which does not support the attachment of Javadoc to its entries.
 
@@ -311,31 +281,31 @@ JavadocConfigurationBlock_error_dialog_title=Generate Javadoc
 
 SourceAttachmentPropertyPage_error_title=Error Attaching Source
 SourceAttachmentPropertyPage_read_only=The current class path entry belongs to container ''{0}'' which does not allow user modifications to source attachments on its entries.
-SourceAttachmentPropertyPage_error_message=An error occurred while associating the source
+SourceAttachmentPropertyPage_error_message=An error occurred while associating the source.
 SourceAttachmentPropertyPage_not_supported=The current class path entry belongs to container ''{0}'' which does not support the attachment of sources to its entries.
 SourceAttachmentPropertyPage_noarchive_message=Source can only be attached to archive and class folders in Java projects.
 SourceAttachmentPropertyPage_invalid_container=The current class path entry belongs to container ''{0}'' which can not be configured.
-SourceAttachmentPropertyPage_containerentry_message=JAR belongs to the container ''{0}''.\nTo configure the source attachment, go directly to the corresponding configuration page (For example for JREs go to ''Installed JREs'' page in the preferences).
 
 NativeLibrariesPropertyPage_invalidElementSelection_desription=Native libraries can not be attached to the selected element.
-NativeLibrariesPropertyPage_errorAttaching_message=An error occurred while associating the library
+NativeLibrariesPropertyPage_errorAttaching_message=An error occurred while associating the library.
 
 AppearancePreferencePage_description= Appearance of Java elements in viewers:
 AppearancePreferencePage_methodreturntype_label= Show &method return types
 AppearancePreferencePage_methodtypeparams_label=Show method type pa&rameters
-AppearancePreferencePage_showCategory_label=Show categ&ories
+AppearancePreferencePage_showCategory_label=Sh&ow categories
 AppearancePreferencePage_pkgNamePatternEnable_label= &Compress all package name segments, except the final segment
-AppearancePreferencePage_pkgNamePattern_label= Com&pression pattern (e.g. given package name 'org.eclipse.jdt' pattern '.' will compress it to '..jdt',  '0' to 'jdt', '1~.' to 'o~.e~.jdt'):
+AppearancePreferencePage_pkgNamePattern_label= Com&pression pattern (e.g. given package name 'org.eclipse.jdt', pattern '.' will compress it to '..jdt', '0' to 'jdt', '1~.' to 'o~.e~.jdt'):
+AppearancePreferencePage_pkgNamePatternAbbreviateEnable_label= A&bbreviate package names
+AppearancePreferencePage_pkgNamePatternAbbreviate_label= &Newline separated 'package_name=abbreviation' style abbreviation rules (e.g. rule 'org.eclipse.jdt={JDT}' will abbreviate 'org.eclipse.jdt.ui' to '{JDT}.ui').\nUse '#' at beginning to disable a rule:
 AppearancePreferencePage_showMembersInPackagesView=S&how members in Package Explorer
 AppearancePreferencePage_stackViewsVerticallyInTheJavaBrowsingPerspective=&Stack views vertically in the Java Browsing perspective
 AppearancePreferencePage_note=Note:
 AppearancePreferencePage_preferenceOnlyEffectiveForNewPerspectives=This preference will only take effect on new perspectives
 AppearancePreferencePage_packageNameCompressionPattern_error_isEmpty=Enter a package name compression pattern
+AppearancePreferencePage_packageNameAbbreviationPattern_error_isInvalid=Enter a valid package name abbreviation pattern
 AppearancePreferencePage_foldEmptyPackages= &Fold empty packages in hierarchical layout in Package and Project Explorer
 
 CodeFormatterPreferencePage_title=Code Formatter
-CodeFormatterPreferencePage_description=Sele&ct a profile:
-
 
 TodoTaskPreferencePage_title=Task Tags
 TodoTaskPreferencePage_description=&Strings indicating tasks in Java comments. The entry marked as default will be used in the code templates.
@@ -373,11 +343,9 @@ PropertyAndPreferencePage_showprojectspecificsettings_label=Configure Project Sp
 PropertyAndPreferencePage_useprojectsettings_label=Enable pr&oject specific settings
 
 JavaBuildPreferencePage_title=Builder
-JavaBuildPreferencePage_description=Options for the Java compiler:\nNote that a full rebuild is required for changes to take effect.
 
 JavaBuildConfigurationBlock_section_general=&General
 JavaBuildConfigurationBlock_section_output_folder=Out&put folder
-JavaBuildConfigurationBlock_section_access_rules=A&ccess rule severities
 JavaBuildConfigurationBlock_section_build_path_problems=&Build path problems
 
 
@@ -387,7 +355,7 @@ JavaBuildConfigurationBlock_ignore=Ignore
 
 JavaBuildConfigurationBlock_needsbuild_title=Building Settings Changed
 JavaBuildConfigurationBlock_needsfullbuild_message=The Building settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
-ProblemSeveritiesConfigurationBlock_treat_optional_as_fatal=Treat errors like &fatal compiler errors (make compiled code not executable)
+ProblemSeveritiesConfigurationBlock_treat_optional_as_fatal=Treat optional errors like &fatal compiler errors (make compiled code not executable)
 JavaBuildConfigurationBlock_needsprojectbuild_message=The Building settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
 
 JavaBuildConfigurationBlock_resource_filter_description=Filtered resources are not copied to the output folder during a build. List is comma separated (e.g. '*.doc, plugin.xml, scripts/')
@@ -419,7 +387,6 @@ ProblemSeveritiesConfigurationBlock_ignore=Ignore
 
 ProblemSeveritiesConfigurationBlock_section_potential_programming_problems=&Potential programming problems
 ProblemSeveritiesConfigurationBlock_section_unnecessary_code=&Unnecessary code
-ProblemSeveritiesConfigurationBlock_section_nls=String e&xternalization
 ProblemSeveritiesConfigurationBlock_section_code_style=&Code style
 ProblemSeveritiesConfigurationBlock_section_generics=&Generic types
 ProblemSeveritiesConfigurationBlock_section_deprecations=D&eprecated and restricted API
@@ -461,6 +428,7 @@ ProblemSeveritiesConfigurationBlock_pb_unused_imports_label=Unused &import:
 ProblemSeveritiesConfigurationBlock_pb_unused_local_label=&Local variable is never read:
 ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label=Parameter is never read:
 ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label=Ignore in overriding and implementing methods
+ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label=Suppress optional errors with '@SuppressWarnings'
 ProblemSeveritiesConfigurationBlock_pb_unused_private_label=Unused local or private member:
 ProblemSeveritiesConfigurationBlock_pb_parameter_assignment=Parameter assignment:
 ProblemSeveritiesConfigurationBlock_pb_redundant_null_check=Redundant null check:
@@ -481,6 +449,7 @@ ProblemSeveritiesConfigurationBlock_pb_synth_access_emul_label=Access to a non-a
 ProblemSeveritiesConfigurationBlock_pb_autoboxing_problem_label=Boxing and unboxing conversions:
 ProblemSeveritiesConfigurationBlock_pb_char_array_in_concat_label=Using a char array in string concatenation:
 ProblemSeveritiesConfigurationBlock_pb_comparing_identical=Comparing identical values ('x == x'):
+ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_for_interface_method_implementations_label=Include implementations of interface methods (1.6 or higher)
 ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_label=Missing '@Override' annotation:
 ProblemSeveritiesConfigurationBlock_pb_enable_surpresswarning_annotation=Enable '@SuppressWarnings' annotations
 ProblemSeveritiesConfigurationBlock_pb_missing_deprecated_annotation_label=Missing '@Deprecated' annotation:
@@ -489,6 +458,7 @@ ProblemSeveritiesConfigurationBlock_ignore_documented_unused_exceptions=Ignore e
 ProblemSeveritiesConfigurationBlock_ignore_documented_unused_parameters=Ignore parameters documented with '@param' tag
 ProblemSeveritiesConfigurationBlock_pb_type_parameter_hiding_label=Type parameter hides another type:
 ProblemSeveritiesConfigurationBlock_pb_unused_label_label=Unused 'break' or 'continue' label:
+ProblemSeveritiesConfigurationBlock_pb_unused_object_allocation_label=Unused object allocation:
 ProblemSeveritiesConfigurationBlock_unused_suppresswarnings_token=Unused '@SuppressWarnings' token:
 JavadocProblemsPreferencePage_title=Javadoc Comments
 
@@ -502,6 +472,9 @@ JavadocProblemsConfigurationBlock_error=Error
 JavadocProblemsConfigurationBlock_warning=Warning
 JavadocProblemsConfigurationBlock_ignore=Ignore
 
+# The argument is replaced by the NLSed string for JavadocProblemsConfigurationBlock_note_title
+JavadocProblemsConfigurationBlock_note_message={0} This also affects features like search, refactoring, content assist and missing/unused imports.
+JavadocProblemsConfigurationBlock_note_title=Note:
 JavadocProblemsConfigurationBlock_needsbuild_title=Javadoc Settings Changed
 JavadocProblemsConfigurationBlock_needsfullbuild_message=The Javadoc settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
 JavadocProblemsConfigurationBlock_needsprojectbuild_message=The Javadoc settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
@@ -525,7 +498,6 @@ JavadocProblemsConfigurationBlock_returnTag=Validate @return tags
 
 
 CompliancePreferencePage_title=Compiler
-CompliancePreferencePage_description=Options for the Java compiler:\nNote that a full rebuild is required for changes to take effect.
 
 ComplianceConfigurationBlock_error=Error
 ComplianceConfigurationBlock_warning=Warning
@@ -537,6 +509,7 @@ ComplianceConfigurationBlock_version13=1.3
 ComplianceConfigurationBlock_version14=1.4
 ComplianceConfigurationBlock_version15=1.5
 ComplianceConfigurationBlock_version16=1.6
+ComplianceConfigurationBlock_version17=1.7
 ComplianceConfigurationBlock_versionCLDC11=CLDC 1.1
 
 ComplianceConfigurationBlock_needsbuild_title=Compiler Settings Changed
@@ -555,22 +528,17 @@ ComplianceConfigurationBlock_source_compatibility_label=Source co&mpatibility:
 ComplianceConfigurationBlock_codegen_targetplatform_label=Ge&nerated .class files compatibility:
 ComplianceConfigurationBlock_pb_assert_as_identifier_label=Disallow identifie&rs called 'assert':
 ComplianceConfigurationBlock_pb_enum_as_identifier_label=Disallo&w identifiers called 'enum':
-ComplianceConfigurationBlock_compliance_follows_EE_label=Use compliance from execution environment on the <a>Java Build Path</a>
-ComplianceConfigurationBlock_compliance_follows_EE_with_EE_label=Use compliance from execution environment ''{0}'' on the <a>Java Build Path</a>
+ComplianceConfigurationBlock_compliance_follows_EE_label=&Use compliance from execution environment on the <a>Java Build Path</a>
+ComplianceConfigurationBlock_compliance_follows_EE_with_EE_label=&Use compliance from execution environment ''{0}'' on the <a>Java Build Path</a>
 ComplianceConfigurationBlock_compliance_group_label=JDK Compliance
 ComplianceConfigurationBlock_classfiles_group_label=Classfile Generation
 ComplianceConfigurationBlock_classfile_greater_compliance=Classfile compatibility must be equal or less than compliance level.
-ComplianceConfigurationBlock_classfile_greater_source=Classfile compatibility must be greater or equal than source compatibility.
+ComplianceConfigurationBlock_classfile_greater_source=Classfile compatibility must be equal or greater than source compatibility.
 
 ComplianceConfigurationBlock_jrecompliance_info=When selecting {0} compliance, make sure to have a compatible JRE installed and activated (currently {1}). <a href="1" >Configure...</a>
 ComplianceConfigurationBlock_cldc11_requires_source13_compliance_se14=CLDC 1.1 requires source level 1.3 and compliance 1.4 or less
 ComplianceConfigurationBlock_jrecompliance_info_project=When selecting {0} compliance, make sure to have a compatible JRE installed and activated (currently {1}). Configure the <a href="1" >Installed JREs</a> and <a href="2" >Execution Environments</a>, or change the JRE on the <a href="3" >Java build path</a>.
 
-OptionsConfigurationBlock_job_title=Rebuilding
-
-OptionsConfigurationBlock_buildall_taskname=Build all...
-OptionsConfigurationBlock_buildproject_taskname=Build project ''{0}''...
-
 CodeStylePreferencePage_title=Code Style
 CodeTemplatesPreferencePage_title=Code Templates
 
@@ -672,7 +640,6 @@ CodeTemplateBlock_templates_import_button=I&mport...
 CodeTemplateBlock_templates_export_button=E&xport...
 CodeTemplateBlock_templates_exportall_button=Ex&port All...
 
-CodeTemplateBlock_link_tooltip=Show code style settings
 CodeTemplateBlock_createcomment_label=Automatically add comments &for new methods and types
 CodeTemplateBlock_templates_label=&Configure generated code and comments:
 CodeTemplateBlock_preview=Pa&ttern:
@@ -680,7 +647,8 @@ CodeTemplateBlock_preview=Pa&ttern:
 CodeTemplateBlock_import_title=Import Templates
 CodeTemplateBlock_import_extension=*.xml
 
-CodeTemplateBlock_export_title=Export {0} Code Template(s)
+CodeTemplateBlock_export_title_singular=Export 1 Code Template
+CodeTemplateBlock_export_title_plural=Export {0} Code Templates
 CodeTemplateBlock_export_filename=codetemplates.xml
 CodeTemplateBlock_export_extension=*.xml
 
@@ -720,9 +688,6 @@ TypeFilterInputDialog_error_entryExists=Entry already exists.
 TypeFilterInputDialog_choosepackage_label=Package Selection
 TypeFilterInputDialog_choosepackage_description=&Choose packages to filter:
 
-JavaEditorPreferencePage_selectionBackgroundColor= Selection background color
-JavaEditorPreferencePage_selectionForegroundColor= Selection foreground color
-
 SpellingPreferencePage_empty_threshold= A positive integer must be specified.
 SpellingPreferencePage_invalid_threshold=''{0}'' is not a valid positive integer.
 SpellingPreferencePage_ignore_digits_label=Ignore &words with digits
@@ -744,10 +709,6 @@ SpellingPreferencePage_dictionary_none=none
 SpellingPreferencePage_encoding_label=En&coding:
 SpellingPreferencePage_locale_error=There is no dictionary available for this language.
 SpellingPreferencePage_filedialog_title=Select User Dictionary
-SpellingPreferencePage_filter_dictionary_extension=*.dictionary
-SpellingPreferencePage_filter_all_extension=*.*
-SpellingPreferencePage_filter_dictionary_label=Dictionary Files
-SpellingPreferencePage_filter_all_label=All Files
 SpellingPreferencePage_enable_contentassist_label=Ma&ke dictionary available to content assist
 SpellingPreferencePage_group_user=Options
 SpellingPreferencePage_group_dictionary=Dictionary
@@ -756,9 +717,6 @@ SpellingPreferencePage_group_advanced=Advanced
 SpellingPreferencePage_variables=Variab&les...
 SpellingPreferencePage_user_dictionary_description=The user dictionary is a text file with one word on each line
 
-BuildPathPreferencePage_title=Build Path
-BuildPathPreferencePage_description=Build path settings:
-
 UserLibraryPreferencePage_title=User Libraries
 UserLibraryPreferencePage_description=User libraries can be added to a Java Build path and bundle a number of external archives. System libraries will be added to the boot class path when launched.
 
@@ -822,6 +780,7 @@ UserLibraryPreferencePage_LoadSaveDialog_load_replace_title=Import User Librarie
 # edit template dialog
 EditTemplateDialog_error_noname=Template name cannot be empty.
 EditTemplateDialog_error_invalidName=Template name contains invalid characters.
+EditTemplateDialog_error_invalidPattern=Template pattern contains invalid characters.
 EditTemplateDialog_title_new=New Template
 EditTemplateDialog_title_edit=Edit Template
 
@@ -860,7 +819,6 @@ PropertiesFileEditorPreferencePage_bold= &Bold
 PropertiesFileEditorPreferencePage_italic= &Italic
 PropertiesFileEditorPreferencePage_strikethrough=&Strikethrough
 PropertiesFileEditorPreferencePage_underline=&Underline
-PropertiesFileEditorPreferencePage_enable= Enab&le
 PropertiesFileEditorPreferencePage_preview= Previe&w:
 PropertiesFileEditorPreferencePage_link= Properties file editor preferences. Note that some preferences may be set on the <a>Text Editors</a> preference page.
 PropertiesFileEditorPreferencePage_link_tooltip= Show the shared text editor preferences
@@ -890,7 +848,7 @@ CodeAssistConfigurationBlock_autoactivationSection_title=Auto-Activation
 # do not translate the href argument (org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage)
 CodeAssistConfigurationBlock_restricted_link=Proposals with <a href="org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage">access restrictions</a>:
 # do not translate the href argument (org.eclipse.jdt.ui.preferences.TypeFilterPreferencePage)
-CodeAssistConfigurationBlock_typeFilters_link=Types along with its members can be filtered using <a href="org.eclipse.jdt.ui.preferences.TypeFilterPreferencePage">type filters</a>.
+CodeAssistConfigurationBlock_typeFilters_link=Types along with their members can be filtered using <a href="org.eclipse.jdt.ui.preferences.TypeFilterPreferencePage">type filters</a>.
 CodeAssistConfigurationBlock_hideForbidden_label=Hide fo&rbidden references
 CodeAssistConfigurationBlock_hideDiscouraged_label=Hide dis&couraged references
 CodeAssistConfigurationBlock_hideDeprecated_label=&Hide deprecated references
@@ -923,22 +881,20 @@ CodeAssistStaticMembersConfigurationBlock_newMember_button= New &Member...
 CodeAssistStaticMembersConfigurationBlock_edit_button= &Edit...
 CodeAssistStaticMembersConfigurationBlock_remove_button= &Remove
 
-FavoriteStaticMemberInputDialog_member_title= New Member Favorite
+FavoriteStaticMemberInputDialog_member_new_title= New Member Favorite
+FavoriteStaticMemberInputDialog_member_edit_title= Edit Member Favorite
 FavoriteStaticMemberInputDialog_member_labelText= Enter a fully qualified static member (e.g. \'java.lang.Math.sqrt\'): 
-FavoriteStaticMemberInputDialog_type_title= New Type Favorite 
+FavoriteStaticMemberInputDialog_type_new_title= New Type Favorite
+FavoriteStaticMemberInputDialog_type_edit_title= Edit Type Favorite 
 FavoriteStaticMemberInputDialog_type_labelText= Enter a fully qualified type (e.g. \'java.lang.Math\'):
 FavoriteStaticMemberInputDialog_browse_button= &Browse...
 FavoriteStaticMemberInputDialog_ChooseTypeDialog_title= Type Selection
 FavoriteStaticMemberInputDialog_ChooseTypeDialog_description= Choose type name:
-FavoriteStaticMemberInputDialog_ChooseTypeDialog_error_message= A problem occurred while collecting types. See the error Log for details.
-FavoriteStaticMemberInputDialog_error_enterName=Enter a name or prefix.
+FavoriteStaticMemberInputDialog_ChooseTypeDialog_error_message= A problem occurred while collecting types. See the error log for details.
 FavoriteStaticMemberInputDialog_error_invalidTypeName=Not a valid type name.
 FavoriteStaticMemberInputDialog_error_invalidMemberName=Not a valid member name.
 FavoriteStaticMemberInputDialog_error_entryExists=Entry already exists in list.
 
-WorkingSetPropertyPage_ReadOnlyWizard_description=This is a read only working set. Its content can not be changed.
-WorkingSetPropertyPage_ReadOnlyWizard_title=Read only Working Set
-
 # coloring
 JavaEditorPreferencePage_coloring_category_java=Java
 JavaEditorPreferencePage_coloring_category_javadoc=Javadoc
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java
index f1301ff..2403dd2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -96,17 +96,20 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 	private static final Key PREF_15_PB_AUTOBOXING_PROBLEM= getJDTCoreKey(JavaCore.COMPILER_PB_AUTOBOXING);
 
 	private static final Key PREF_15_PB_MISSING_OVERRIDE_ANNOTATION= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION);
+	private static final Key PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION);
 	private static final Key PREF_15_PB_ANNOTATION_SUPER_INTERFACE= getJDTCoreKey(JavaCore.COMPILER_PB_ANNOTATION_SUPER_INTERFACE);
 	private static final Key PREF_15_PB_TYPE_PARAMETER_HIDING= getJDTCoreKey(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING);
 	private static final Key PREF_15_PB_INCOMPLETE_ENUM_SWITCH= getJDTCoreKey(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH);
 	private static final Key PREF_15_PB_RAW_TYPE_REFERENCE= getJDTCoreKey(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE);
 
 	private static final Key PREF_PB_SUPPRESS_WARNINGS= getJDTCoreKey(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS);
+	private static final Key PREF_PB_SUPPRESS_OPTIONAL_ERRORS= getJDTCoreKey(JavaCore.COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS);
 	private static final Key PREF_PB_UNHANDLED_WARNING_TOKEN= getJDTCoreKey(JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN);
 	private static final Key PREF_PB_FATAL_OPTIONAL_ERROR= getJDTCoreKey(JavaCore.COMPILER_PB_FATAL_OPTIONAL_ERROR);
 
 	private static final Key PREF_PB_MISSING_HASHCODE_METHOD= getJDTCoreKey(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD);
 	private static final Key PREF_PB_DEAD_CODE= getJDTCoreKey(JavaCore.COMPILER_PB_DEAD_CODE);
+	private static final Key PREF_PB_UNUSED_OBJECT_ALLOCATION= getJDTCoreKey(JavaCore.COMPILER_PB_UNUSED_OBJECT_ALLOCATION);
 
 	
 	// values
@@ -150,12 +153,15 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 				PREF_PB_REDUNDANT_NULL_CHECK, PREF_PB_FALLTHROUGH_CASE, PREF_PB_REDUNDANT_SUPERINTERFACE,
 				PREF_PB_UNUSED_WARNING_TOKEN,
 				PREF_15_PB_UNCHECKED_TYPE_OPERATION, PREF_15_PB_FINAL_PARAM_BOUND, PREF_15_PB_VARARGS_ARGUMENT_NEED_CAST,
-				PREF_15_PB_AUTOBOXING_PROBLEM, PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, PREF_15_PB_ANNOTATION_SUPER_INTERFACE,
+				PREF_15_PB_AUTOBOXING_PROBLEM, PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION,
+				PREF_15_PB_ANNOTATION_SUPER_INTERFACE,
 				PREF_15_PB_TYPE_PARAMETER_HIDING, PREF_15_PB_INCOMPLETE_ENUM_SWITCH, PREF_PB_MISSING_DEPRECATED_ANNOTATION,
 				PREF_15_PB_RAW_TYPE_REFERENCE, PREF_PB_FATAL_OPTIONAL_ERROR,
-				PREF_PB_FORBIDDEN_REFERENCE, PREF_PB_DISCOURRAGED_REFERENCE, PREF_PB_SUPPRESS_WARNINGS, PREF_PB_UNHANDLED_WARNING_TOKEN,
+				PREF_PB_FORBIDDEN_REFERENCE, PREF_PB_DISCOURRAGED_REFERENCE,
+				PREF_PB_SUPPRESS_WARNINGS, PREF_PB_SUPPRESS_OPTIONAL_ERRORS,
+				PREF_PB_UNHANDLED_WARNING_TOKEN,
 				PREF_PB_COMPARING_IDENTICAL, PREF_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD, PREF_PB_MISSING_HASHCODE_METHOD,
-				PREF_PB_DEAD_CODE
+				PREF_PB_DEAD_CODE, PREF_PB_UNUSED_OBJECT_ALLOCATION
 			};
 	}
 
@@ -213,7 +219,7 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 		int indentStep=  fPixelConverter.convertWidthInCharsToPixels(1);
 
 		int defaultIndent= indentStep * 0;
-		int extraIndent= indentStep * 2;
+		int extraIndent= indentStep * 3;
 		String label;
 		ExpandableComposite excomposite;
 		Composite inner;
@@ -313,6 +319,9 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_dead_code;
 		addComboBox(inner, label, PREF_PB_DEAD_CODE, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
 		
+		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unused_object_allocation_label;
+		addComboBox(inner, label, PREF_PB_UNUSED_OBJECT_ALLOCATION, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
+
 		// --- name_shadowing
 
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_section_name_shadowing;
@@ -457,6 +466,9 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_label;
 		addComboBox(inner, label, PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
 
+		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_missing_override_annotation_for_interface_method_implementations_label;
+		addCheckBox(inner, label, PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION, enabledDisabled, extraIndent);
+		
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_missing_deprecated_annotation_label;
 		addComboBox(inner, label, PREF_PB_MISSING_DEPRECATED_ANNOTATION, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
 
@@ -466,12 +478,15 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unhandled_surpresswarning_tokens;
 		addComboBox(inner, label, PREF_PB_UNHANDLED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
 
-		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_unused_suppresswarnings_token;
-		addComboBox(inner, label, PREF_PB_UNUSED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
-
 		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_enable_surpresswarning_annotation;
 		addCheckBox(inner, label, PREF_PB_SUPPRESS_WARNINGS, enabledDisabled, 0);
 
+		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_unused_suppresswarnings_token;
+		addComboBox(inner, label, PREF_PB_UNUSED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, extraIndent);
+		
+		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label;
+		addCheckBox(inner, label, PREF_PB_SUPPRESS_OPTIONAL_ERRORS, enabledDisabled, extraIndent);
+		
 		new Label(composite, SWT.NONE);
 
 		String[] enableDisableValues= new String[] { ENABLED, DISABLED };
@@ -498,7 +513,9 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 			if (PREF_PB_UNUSED_PARAMETER.equals(changedKey) ||
 					PREF_PB_DEPRECATION.equals(changedKey) ||
 					PREF_PB_LOCAL_VARIABLE_HIDING.equals(changedKey) ||
-					PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION.equals(changedKey)) {
+					PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION.equals(changedKey) ||
+					PREF_15_PB_MISSING_OVERRIDE_ANNOTATION.equals(changedKey) ||
+					PREF_PB_SUPPRESS_WARNINGS.equals(changedKey)) {
 				updateEnableStates();
 			} else if (PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING.equals(changedKey)) {
 				// merging the two options
@@ -528,6 +545,13 @@ public class ProblemSeveritiesConfigurationBlock extends OptionsConfigurationBlo
 
 		boolean enableHiding= !checkValue(PREF_PB_LOCAL_VARIABLE_HIDING, IGNORE);
 		getCheckBox(PREF_PB_SPECIAL_PARAMETER_HIDING_FIELD).setEnabled(enableHiding);
+		
+		boolean enablemissingOverrideAnnotation= !checkValue(PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, IGNORE);
+		getCheckBox(PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION).setEnabled(enablemissingOverrideAnnotation);
+		
+		boolean enableSuppressWarnings= checkValue(PREF_PB_SUPPRESS_WARNINGS, ENABLED);
+		getCheckBox(PREF_PB_SUPPRESS_OPTIONAL_ERRORS).setEnabled(enableSuppressWarnings);
+		setComboEnabled(PREF_PB_UNUSED_WARNING_TOKEN, enableSuppressWarnings);
 	}
 
 	protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesPreferencePage.java
index 60d2216..46c1e22 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jdt.internal.ui.preferences;
 
 import java.util.Map;
 
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 
@@ -64,6 +65,8 @@ public class ProblemSeveritiesPreferencePage extends PropertyAndPreferencePage {
 		} else {
 			PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.PROBLEM_SEVERITIES_PREFERENCE_PAGE);
 		}
+		
+		setSize(new Point(10, 10)); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=294763
 	}
 
 	protected Control createPreferenceContent(Composite composite) {
@@ -144,9 +147,11 @@ public class ProblemSeveritiesPreferencePage extends PropertyAndPreferencePage {
 		super.applyData(data);
 		if (data instanceof Map && fConfigurationBlock != null) {
 			Map map= (Map) data;
-			Boolean useProjectOptions= (Boolean) map.get(USE_PROJECT_SPECIFIC_OPTIONS);
-			if (useProjectOptions != null) {
-				enableProjectSpecificSettings(useProjectOptions.booleanValue());
+			if (isProjectPreferencePage()) {
+				Boolean useProjectOptions= (Boolean) map.get(USE_PROJECT_SPECIFIC_OPTIONS);
+				if (useProjectOptions != null) {
+					enableProjectSpecificSettings(useProjectOptions.booleanValue());
+				}
 			}
 
 			Object key= map.get(DATA_SELECT_OPTION_KEY);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
index ca5b765..f98a0e8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SourceAttachmentPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
@@ -96,30 +95,24 @@ public class SourceAttachmentPropertyPage extends PropertyPage implements IStatu
 
 			IPath containerPath= null;
 			IJavaProject jproject= fRoot.getJavaProject();
-			IClasspathEntry entry= fRoot.getRawClasspathEntry();
-			if (entry == null) {
-				// use a dummy entry to use for initialization
-				entry= JavaCore.newLibraryEntry(fRoot.getPath(), null, null);
-			} else {
-				if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
-					containerPath= entry.getPath();
-					ClasspathContainerInitializer initializer= JavaCore.getClasspathContainerInitializer(containerPath.segment(0));
-					IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
-					if (initializer == null || container == null) {
-						return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_invalid_container, BasicElementLabels.getPathLabel(containerPath, false)));
-					}
-					String containerName= container.getDescription();
-
-					IStatus status= initializer.getSourceAttachmentStatus(containerPath, jproject);
-					if (status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED) {
-						return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_not_supported, containerName));
-					}
-					if (status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_READ_ONLY) {
-						return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_read_only, containerName));
-					}
-					entry= JavaModelUtil.findEntryInContainer(container, fRoot.getPath());
-					Assert.isNotNull(entry);
+			IClasspathEntry entry= JavaModelUtil.getClasspathEntry(fRoot);
+			if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+				containerPath= entry.getPath();
+				ClasspathContainerInitializer initializer= JavaCore.getClasspathContainerInitializer(containerPath.segment(0));
+				IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
+				if (initializer == null || container == null) {
+					return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_invalid_container, BasicElementLabels.getPathLabel(containerPath, false)));
 				}
+				String containerName= container.getDescription();
+
+				IStatus status= initializer.getSourceAttachmentStatus(containerPath, jproject);
+				if (status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED) {
+					return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_not_supported, containerName));
+				}
+				if (status.getCode() == ClasspathContainerInitializer.ATTRIBUTE_READ_ONLY) {
+					return createMessageContent(composite, Messages.format(PreferencesMessages.SourceAttachmentPropertyPage_read_only, containerName));
+				}
+				entry= JavaModelUtil.findEntryInContainer(container, fRoot.getPath());
 			}
 			fContainerPath= containerPath;
 			fEntry= entry;
@@ -161,7 +154,7 @@ public class SourceAttachmentPropertyPage extends PropertyPage implements IStatu
 					return true; // no change
 				}
 
-				IRunnableWithProgress runnable= SourceAttachmentBlock.getRunnable(getShell(), entry, fRoot.getJavaProject(), fContainerPath);
+				IRunnableWithProgress runnable= SourceAttachmentBlock.getRunnable(getShell(), entry, fRoot.getJavaProject(), fContainerPath, fEntry.getReferencingEntry() != null);
 				PlatformUI.getWorkbench().getProgressService().run(true, true, runnable);
 			} catch (InvocationTargetException e) {
 				String title= PreferencesMessages.SourceAttachmentPropertyPage_error_title;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TodoTaskPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TodoTaskPreferencePage.java
index f57d8cd..7f914d5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TodoTaskPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/TodoTaskPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,8 +13,6 @@ package org.eclipse.jdt.internal.ui.preferences;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 
-import org.eclipse.core.runtime.IAdaptable;
-
 import org.eclipse.core.resources.IProject;
 
 import org.eclipse.ui.PlatformUI;
@@ -135,13 +133,4 @@ public class TodoTaskPreferencePage extends PropertyAndPreferencePage {
 		super.dispose();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#setElement(org.eclipse.core.runtime.IAdaptable)
-	 */
-	public void setElement(IAdaptable element) {
-		super.setElement(element);
-		setDescription(null); // no description for property page
-	}
-
-
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java
index d4e6bcf..617d719 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/UserLibraryPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -651,6 +652,7 @@ public class UserLibraryPreferencePage extends PreferencePage implements IWorkbe
 			Element cpElement;
 			try {
 				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				parser.setErrorHandler(new DefaultHandler());
 				cpElement = parser.parse(new InputSource(stream)).getDocumentElement();
 			} catch (SAXException e) {
 				throw new IOException(PreferencesMessages.UserLibraryPreferencePage_LoadSaveDialog_load_badformat);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.java
index 4dbae01..47a5578 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -83,6 +83,8 @@ public class CleanUpMessages extends NLS {
 	public static String MissingCodeTabPage_CheckboxName_AddMissingAnnotations;
 	public static String MissingCodeTabPage_CheckboxName_AddMissingDeprecatedAnnotations;
 	public static String MissingCodeTabPage_CheckboxName_AddMissingOverrideAnnotations;
+
+	public static String MissingCodeTabPage_CheckboxName_AddMissingOverrideInterfaceAnnotations;
 	public static String MissingCodeTabPage_CheckboxName_AddMethods;
 	public static String MissingCodeTabPage_CheckboxName_AddSUID;
 	public static String MissingCodeTabPage_GroupName_Annotations;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.properties
index 8541b7c..4f78468 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2008 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ CodeStyleTabPage_CheckboxName_ConvertForLoopToEnhanced=Conver&t for loops to enh
 CodeStyleTabPage_GroupName_ControlStatments=Control statements
 CodeStyleTabPage_RadioName_UseBlocksSpecial=Always &except for single 'return' or 'throw' statements
 CodeStyleTabPage_CheckboxName_UseParentheses=Use parent&heses in expressions
-ContributedCleanUpTabPage_ErrorPage_message=An error occured while creating this page. See the error log for details
+ContributedCleanUpTabPage_ErrorPage_message=An error occurred while creating this page. See the error log for details
 
 MemberAccessesTabPage_GroupName_NonStaticAccesses=Non static accesses
 MemberAccessesTabPage_CheckboxName_FieldQualifier=Use '&this' qualifier for field accesses
@@ -68,10 +68,11 @@ MissingCodeTabPage_GroupName_UnimplementedCode=Unimplemented code
 MissingCodeTabPage_GroupName_PotentialProgrammingProblems=Potential programming problems
 MissingCodeTabPage_CheckboxName_AddMissingAnnotations=Add missing &Annotations
 MissingCodeTabPage_CheckboxName_AddMissingOverrideAnnotations='@Overr&ide'
+MissingCodeTabPage_CheckboxName_AddMissingOverrideInterfaceAnnotations=Implemen&tations of interface methods (1.6 or higher)
 MissingCodeTabPage_CheckboxName_AddMissingDeprecatedAnnotations='@&Deprecated'
 MissingCodeTabPage_CheckboxName_AddMethods=Add u&nimplemented methods
 MissingCodeTabPage_CheckboxName_AddSUID=Add &serial version ID
-MissingCodeTabPage_Label_CodeTemplatePreferencePage=The settings for the method stub to insert can be configured on the Code Template preference page.
+MissingCodeTabPage_Label_CodeTemplatePreferencePage=The settings for the method stub to insert can be configured on the Code Templates preference page.
 MissingCodeTabPage_RadioName_AddGeneratedSUID=&Generated
 MissingCodeTabPage_RadioName_AddDefaultSUID=Default (&1L)
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpTabPage.java
index 29269eb..62dae59 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/CleanUpTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -118,43 +118,67 @@ public abstract class CleanUpTabPage extends ModifyDialogTabPage implements ICle
 	}
 
 	protected void registerSlavePreference(final CheckboxPreference master, final CheckboxPreference[] slaves) {
+		registerSlavePreference(master, slaves, null);
+	}
+
+	/**
+	 * Connects master and slave checkboxes.
+	 * 
+	 * @param master the master
+	 * @param slaves direct slaves of the master
+	 * @param subSlaves indirect slaves, i.e. a slave is a master of its subSlave).
+	 * 		First index into array is the subSlave's master's index. subSlaves can also be <code>null</code>.
+	 */
+	protected void registerSlavePreference(final CheckboxPreference master, final CheckboxPreference[] slaves, final CheckboxPreference[][] subSlaves) {
+		if (subSlaves != null) {
+			// Need to add subSlave observers before registering slaves below, since java.util.Observable notifies in wrong order!
+			for (int i= 0; i < slaves.length; i++) {
+				final CheckboxPreference slave= slaves[i];
+				for (int j= 0; j < subSlaves[i].length; j++) {
+					final CheckboxPreference subSlave= subSlaves[i][j];
+					master.addObserver(new Observer() {
+						public void update(Observable o, Object arg) {
+							boolean enabled= slave.getEnabled() && slave.getChecked();
+							subSlave.setEnabled(enabled);
+						}
+					});
+				}
+			}
+		}
+		
 		internalRegisterSlavePreference(master, slaves);
 		fCount+= slaves.length;
-
+		
 		master.addObserver(new Observer() {
 			public void update(Observable o, Object arg) {
-				if (master.getChecked()) {
-					for (int i= 0; i < slaves.length; i++) {
-						if (slaves[i].getChecked()) {
-							setSelectedCleanUpCount(fSelectedCount + 1);
-						}
-					}
-				} else {
-					for (int i= 0; i < slaves.length; i++) {
-						if (slaves[i].getChecked()) {
-							setSelectedCleanUpCount(fSelectedCount - 1);
+				boolean masterChecked= master.getChecked();
+				for (int i= 0; i < slaves.length; i++) {
+					if (slaves[i].getChecked()) {
+						setSelectedCleanUpCount(fSelectedCount + (masterChecked ? 1 : -1));
+						if (subSlaves != null) {
+							for (int j= 0; j < subSlaves[i].length; j++) {
+								if (subSlaves[i][j].getChecked()) {
+									setSelectedCleanUpCount(fSelectedCount + (masterChecked ? 1 : -1));
+								}
+							}
 						}
 					}
 				}
 			}
 		});
-
+		
 		for (int i= 0; i < slaves.length; i++) {
 			final CheckboxPreference slave= slaves[i];
 			slave.addObserver(new Observer() {
 				public void update(Observable o, Object arg) {
-					if (slave.getChecked()) {
-						setSelectedCleanUpCount(fSelectedCount + 1);
-					} else {
-						setSelectedCleanUpCount(fSelectedCount - 1);
-					}
+					setSelectedCleanUpCount(fSelectedCount + (slave.getChecked() ? 1 : -1));
 				}
 			});
 		}
-
+		
 		if (master.getChecked()) {
 			for (int i= 0; i < slaves.length; i++) {
-				if (slaves[i].getChecked()) {
+				if (slaves[i].getChecked() && master.getEnabled()) {
 					setSelectedCleanUpCount(fSelectedCount + 1);
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/MissingCodeTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/MissingCodeTabPage.java
index 09f086f..07a0973 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/MissingCodeTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/cleanup/MissingCodeTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,12 +38,21 @@ public final class MissingCodeTabPage extends AbstractCleanUpTabPage {
 
     	Group annotationsGroup= createGroup(numColumns, composite, CleanUpMessages.MissingCodeTabPage_GroupName_Annotations);
 
-    	final CheckboxPreference annotationsPref= createCheckboxPref(annotationsGroup, numColumns, CleanUpMessages.MissingCodeTabPage_CheckboxName_AddMissingAnnotations, CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpModifyDialog.FALSE_TRUE);
-    	intent(annotationsGroup);
+		final CheckboxPreference annotationsPref= createCheckboxPref(annotationsGroup, numColumns, CleanUpMessages.MissingCodeTabPage_CheckboxName_AddMissingAnnotations, CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpModifyDialog.FALSE_TRUE);
+		
+		intent(annotationsGroup);
 		final CheckboxPreference overridePref= createCheckboxPref(annotationsGroup, numColumns - 1, CleanUpMessages.MissingCodeTabPage_CheckboxName_AddMissingOverrideAnnotations, CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE, CleanUpModifyDialog.FALSE_TRUE);
 		intent(annotationsGroup);
+		intent(annotationsGroup);
+		final CheckboxPreference overrideInterfacePref= createCheckboxPref(annotationsGroup, numColumns - 2, CleanUpMessages.MissingCodeTabPage_CheckboxName_AddMissingOverrideInterfaceAnnotations, CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION, CleanUpModifyDialog.FALSE_TRUE);
+		
+		intent(annotationsGroup);
 		final CheckboxPreference deprecatedPref= createCheckboxPref(annotationsGroup, numColumns - 1, CleanUpMessages.MissingCodeTabPage_CheckboxName_AddMissingDeprecatedAnnotations, CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED, CleanUpModifyDialog.FALSE_TRUE);
-		registerSlavePreference(annotationsPref, new CheckboxPreference[] {overridePref, deprecatedPref});
+		
+		registerSlavePreference(annotationsPref, new CheckboxPreference[] {overridePref, deprecatedPref}, new CheckboxPreference[][] {{overrideInterfacePref}, {}});
+		registerSlavePreference(overridePref, new CheckboxPreference[] {overrideInterfacePref});
+		
+		overrideInterfacePref.setEnabled(overridePref.getEnabled() && overridePref.getChecked());
 
 		if (!isSaveAction()) {
 			Group pppGroup= createGroup(numColumns, composite, CleanUpMessages.MissingCodeTabPage_GroupName_PotentialProgrammingProblems);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/AlreadyExistsDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/AlreadyExistsDialog.java
index 1eacfeb..b5b6d50 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/AlreadyExistsDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/AlreadyExistsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Martin Monperrus <martin.monperrus at gmail.com> - AlreadyExistsDialog.initializeComposite clones Dialog.createDialogArea - https://bugs.eclipse.org/bugs/show_bug.cgi?id=296781
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.preferences.formatter;
 
@@ -26,7 +27,6 @@ import org.eclipse.swt.widgets.Text;
 
 import org.eclipse.core.runtime.IStatus;
 
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.StatusDialog;
 
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -71,7 +71,8 @@ public class AlreadyExistsDialog extends StatusDialog {
 
 	public Control createDialogArea(Composite parent) {
 
-		initializeComposite(parent);
+		fComposite = (Composite) super.createDialogArea(parent);
+		((GridLayout) fComposite.getLayout()).numColumns= NUM_COLUMNS;
 
 		createLabel(Messages.format(FormatterMessages.AlreadyExistsDialog_dialog_label, fProfile.getName()));
 
@@ -119,19 +120,6 @@ public class AlreadyExistsDialog extends StatusDialog {
 		return fComposite;
 	}
 
-	private void initializeComposite(Composite parent) {
-		fComposite= new Composite(parent, SWT.NULL);
-
-		final GridLayout layout= new GridLayout();
-		layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
-		layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-		layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-		layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-		layout.numColumns= NUM_COLUMNS;
-
-		fComposite.setLayout(layout);
-	}
-
 	private Label createLabel(String text) {
 		final GridData gd= new GridData(GridData.FILL_HORIZONTAL);
 		gd.horizontalSpan= NUM_COLUMNS;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/BracesTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/BracesTabPage.java
index 399970f..d28f4c9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/BracesTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/BracesTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,15 +20,8 @@ import org.eclipse.swt.widgets.Group;
 
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
-public class BracesTabPage extends FormatterTabPage {
 
-	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
+public class BracesTabPage extends FormatterTabPage {
 
 	private final String PREVIEW=
 	createPreviewHeader(FormatterMessages.BracesTabPage_preview_header) +
@@ -97,9 +90,10 @@ public class BracesTabPage extends FormatterTabPage {
 
 
 	/**
-	 * Create a new BracesTabPage.
-	 * @param modifyDialog
-	 * @param workingValues
+	 * Creates a new BracesTabPage.
+	 * 
+	 * @param modifyDialog the modify dialog
+	 * @param workingValues the working values
 	 */
 	public BracesTabPage(ModifyDialog modifyDialog, Map workingValues) {
 		super(modifyDialog, workingValues);
@@ -130,10 +124,6 @@ public class BracesTabPage extends FormatterTabPage {
 		updateOptionEnablement(arrayInitOption, arrayInitCheckBox);
 	}
 
-	/**
-	 * @param arrayInitOption
-	 * @param arrayInitCheckBox
-	 */
 	protected final void updateOptionEnablement(ComboPreference arrayInitOption, CheckboxPreference arrayInitCheckBox) {
 		arrayInitCheckBox.setEnabled(!arrayInitOption.hasValue(DefaultCodeFormatterConstants.END_OF_LINE));
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java
index d8206f0..63a63eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CommentsTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,12 +17,12 @@ import java.util.Map;
 import java.util.Observable;
 import java.util.Observer;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Group;
 
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 
@@ -31,31 +31,6 @@ import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
  */
 public class CommentsTabPage extends FormatterTabPage {
 
-	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
-	
-	/**
-	 * Constant array for boolean selection.
-	 * @since 3.5
-	 */
-	private static String[] TRUE_FALSE = {
-		DefaultCodeFormatterConstants.TRUE,
-		DefaultCodeFormatterConstants.FALSE
-	};
-
-    /**
-     * Constant array for insert / not_insert.
-     */
-    private static String[] DO_NOT_INSERT_INSERT = {
-        JavaCore.DO_NOT_INSERT,
-        JavaCore.INSERT
-    };
-
 	private static abstract class Controller implements Observer {
 
 		private final Collection fMasters;
@@ -115,28 +90,25 @@ public class CommentsTabPage extends FormatterTabPage {
 		" * This is the comment for the example interface.\n" + //$NON-NLS-1$
 		" */\n" + //$NON-NLS-1$
 		" interface Example {\n" + //$NON-NLS-1$
-		"// This is a long comment that should be split in multiple line comments in case the line comment formatting is enabled\n" + //$NON-NLS-1$
+		"// This is a long comment    with\twhitespace     that should be split in multiple line comments in case the line comment formatting is enabled\n" + //$NON-NLS-1$
 		"int foo3();\n" + //$NON-NLS-1$
-		"/*\n" + //$NON-NLS-1$
-		"*\n" + //$NON-NLS-1$
-		"* These possibilities include:\n" + //$NON-NLS-1$
-		"* <ul><li>Formatting of header comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + //$NON-NLS-1$
-		"*/\n" + //$NON-NLS-1$
-		"int foo4();\n" + //$NON-NLS-1$
-		" /**\n" + //$NON-NLS-1$
-		" *\n" + //$NON-NLS-1$
-		" * These possibilities include:\n" + //$NON-NLS-1$
-		" * <ul><li>Formatting of header comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + //$NON-NLS-1$
-		" */\n" + //$NON-NLS-1$
+		" \n" + //$NON-NLS-1$
+		"//\tvoid commented() {\n" +  //$NON-NLS-1$
+		"//\t\t\tSystem.out.println(\"indented\");\n" +  //$NON-NLS-1$
+		"//\t}\n" +  //$NON-NLS-1$
+		"\n" +  //$NON-NLS-1$
+		"\t//\tvoid indentedCommented() {\n" +  //$NON-NLS-1$
+		"\t//\t\t\tSystem.out.println(\"indented\");\n" +  //$NON-NLS-1$
+		"\t//\t}\n" +  //$NON-NLS-1$
+		"\n" + //$NON-NLS-1$
+		"/* block comment          on first column*/\n" + //$NON-NLS-1$
 		" int bar();\n" + //$NON-NLS-1$
-		" /*\n" + //$NON-NLS-1$
-		" *\n" + //$NON-NLS-1$
-		" * These possibilities include:\n" + //$NON-NLS-1$
-		" * <ul><li>Formatting of header comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + //$NON-NLS-1$
-		" */\n" + //$NON-NLS-1$
-		" int bar2();" + //$NON-NLS-1$
-		" // This is a long comment that should be split in multiple line comments in case the line comment formatting is enabled\n" + //$NON-NLS-1$
-		" int foo2();" + //$NON-NLS-1$
+		"\t/*\n" + //$NON-NLS-1$
+		"\t*\n" + //$NON-NLS-1$
+		"\t* These possibilities include:\n" + //$NON-NLS-1$
+		"\t* <ul><li>Formatting of header comments.</li><li>Formatting of Javadoc tags</li></ul>\n" + //$NON-NLS-1$
+		"\t*/\n" + //$NON-NLS-1$
+		" int bar2(); // This is a long comment that should be split in multiple line comments in case the line comment formatting is enabled\n" + //$NON-NLS-1$
 		" /**\n" + //$NON-NLS-1$
 		" * The following is some sample code which illustrates source formatting within javadoc comments:\n" + //$NON-NLS-1$
 		" * <pre>public class Example {final int a= 1;final boolean b= true;}</pre>\n" + //$NON-NLS-1$
@@ -156,13 +128,19 @@ public class CommentsTabPage extends FormatterTabPage {
 	}
 
 	protected void doCreatePreferences(Composite composite, int numColumns) {
+		final int indent= fPixelConverter.convertWidthInCharsToPixels(4);
 
 		// global group
 		final Group globalGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group1_title);
 		final CheckboxPreference javadoc= createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.commentsTabPage_enable_javadoc_comment_formatting, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT, false);
 		final CheckboxPreference blockComment= createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_enable_block_comment_formatting, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_BLOCK_COMMENT, false);
 		final CheckboxPreference singleLineComments= createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_enable_line_comment_formatting, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT, false);
+		final CheckboxPreference singleLineCommentsOnFirstColumn= createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_format_line_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN, false);
+		((GridData)singleLineCommentsOnFirstColumn.getControl().getLayoutData()).horizontalIndent= indent;
 		final CheckboxPreference header= createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_format_header, DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_HEADER, false);
+		GridData spacerData= new GridData(0, 0);
+		spacerData.horizontalSpan= numColumns;
+		new Composite(globalGroup, SWT.NONE).setLayoutData(spacerData);
 		createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_block_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_BLOCK_COMMENTS_ON_FIRST_COLUMN, false);
 		createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_never_indent_line_comments_on_first_column, DefaultCodeFormatterConstants.FORMATTER_NEVER_INDENT_LINE_COMMENTS_ON_FIRST_COLUMN, false);
 		createPrefFalseTrue(globalGroup, numColumns, FormatterMessages.CommentsTabPage_do_not_join_lines, DefaultCodeFormatterConstants.FORMATTER_JOIN_LINES_IN_COMMENTS, true);
@@ -174,17 +152,34 @@ public class CommentsTabPage extends FormatterTabPage {
 		final CheckboxPreference blankJavadoc= createPrefInsert(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_blank_line_before_javadoc_tags, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INSERT_EMPTY_LINE_BEFORE_ROOT_TAGS);
 		final CheckboxPreference indentJavadoc= createPrefFalseTrue(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_indent_javadoc_tags, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_ROOT_TAGS, false);
 		final CheckboxPreference indentDesc= createPrefFalseTrue(settingsGroup, numColumns , FormatterMessages.CommentsTabPage_indent_description_after_param, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION, false);
-		((GridData)indentDesc.getControl().getLayoutData()).horizontalIndent= fPixelConverter.convertWidthInCharsToPixels(4);
+		((GridData)indentDesc.getControl().getLayoutData()).horizontalIndent= indent;
 		final CheckboxPreference nlParam= createPrefInsert(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_new_line_after_param_tags, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INSERT_NEW_LINE_FOR_PARAMETER);
+		final CheckboxPreference nlBoundariesJavadoc= createPrefFalseTrue(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_new_lines_at_javadoc_boundaries, DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_JAVADOC_BOUNDARIES, false);
 		final CheckboxPreference blankLinesJavadoc= createPrefFalseTrue(settingsGroup, numColumns, FormatterMessages.CommentsTabPage_clear_blank_lines, DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT, false);
 
 		// block comment settings
 		final Group blockSettingsGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group4_title);
+		final CheckboxPreference nlBoundariesBlock= createPrefFalseTrue(blockSettingsGroup, numColumns, FormatterMessages.CommentsTabPage_new_lines_at_comment_boundaries, DefaultCodeFormatterConstants.FORMATTER_COMMENT_NEW_LINES_AT_BLOCK_BOUNDARIES, false);
 		final CheckboxPreference blankLinesBlock= createPrefFalseTrue(blockSettingsGroup, numColumns, FormatterMessages.CommentsTabPage_remove_blank_block_comment_lines, DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT, false);
 
+		// line width settings
 		final Group widthGroup= createGroup(numColumns, composite, FormatterMessages.CommentsTabPage_group3_title);
 		final NumberPreference lineWidth= createNumberPref(widthGroup, numColumns, FormatterMessages.CommentsTabPage_line_width, DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_LENGTH, 0, 9999);
 
+
+		ArrayList lineFirstColumnMasters= new ArrayList();
+		lineFirstColumnMasters.add(singleLineComments);
+
+		ArrayList lineFirstColumnSlaves= new ArrayList();
+		lineFirstColumnSlaves.add(singleLineCommentsOnFirstColumn);
+
+		new Controller(lineFirstColumnMasters, lineFirstColumnSlaves) {
+			protected boolean areSlavesEnabled() {
+				return singleLineComments.getChecked();
+            }
+		}.update(null, null);
+
+
 		ArrayList javaDocMaster= new ArrayList();
 		javaDocMaster.add(javadoc);
 		javaDocMaster.add(header);
@@ -196,10 +191,12 @@ public class CommentsTabPage extends FormatterTabPage {
 		javaDocSlaves.add(blankJavadoc);
 		javaDocSlaves.add(indentJavadoc);
 		javaDocSlaves.add(nlParam);
+		javaDocSlaves.add(nlBoundariesJavadoc);
 		javaDocSlaves.add(blankLinesJavadoc);
 
 		new OrController(javaDocMaster, javaDocSlaves);
 
+
 		ArrayList indentMasters= new ArrayList();
 		indentMasters.add(javadoc);
 		indentMasters.add(header);
@@ -214,16 +211,19 @@ public class CommentsTabPage extends FormatterTabPage {
             }
 		}.update(null, null);
 
+
 		ArrayList blockMasters= new ArrayList();
 		blockMasters.add(blockComment);
 		blockMasters.add(header);
 
 		ArrayList blockSlaves= new ArrayList();
 		blockSlaves.add(blockSettingsGroup);
+		blockSlaves.add(nlBoundariesBlock);
 		blockSlaves.add(blankLinesBlock);
 
 		new OrController(blockMasters, blockSlaves);
 
+
 		ArrayList lineWidthMasters= new ArrayList();
 		lineWidthMasters.add(javadoc);
 		lineWidthMasters.add(blockComment);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ControlStatementsTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ControlStatementsTabPage.java
index 9925fd4..4427ff6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ControlStatementsTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ControlStatementsTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,29 +20,11 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 
 public class ControlStatementsTabPage extends FormatterTabPage {
 
-	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
-
-    /**
-     * Constant array for insert / not_insert.
-     */
-    private static String[] DO_NOT_INSERT_INSERT = {
-        JavaCore.DO_NOT_INSERT,
-        JavaCore.INSERT
-    };
-
-
 	private final String PREVIEW=
 	createPreviewHeader(FormatterMessages.ControlStatementsTabPage_preview_header) +
 	"class Example {" +	//$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CreateProfileDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CreateProfileDialog.java
index 2748a4e..597d353 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CreateProfileDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/CreateProfileDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,6 @@ import org.eclipse.swt.widgets.Text;
 
 import org.eclipse.core.runtime.IStatus;
 
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.StatusDialog;
 
@@ -88,19 +87,11 @@ public class CreateProfileDialog extends StatusDialog {
 
 		final int numColumns= 2;
 
-		GridData gd;
-
-		final GridLayout layout= new GridLayout(numColumns, false);
-		layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
-		layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-		layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-		layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-
-		final Composite composite= new Composite(parent, SWT.NONE);
-		composite.setLayout(layout);
-
+		final Composite composite= (Composite) super.createDialogArea(parent);
+		((GridLayout) composite.getLayout()).numColumns= numColumns;
+		
 		// Create "Profile name:" label
-		gd = new GridData(GridData.FILL_HORIZONTAL);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
 		gd.horizontalSpan = numColumns;
 		gd.widthHint= convertWidthInCharsToPixels(60);
 		final Label nameLabel = new Label(composite, SWT.WRAP);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
index 61b0d86..36c9dcd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     istvan at benedek-home.de - 103706 [formatter] indent empty lines
  *     Aaron Luchko, aluchko at redhat.com - 105926 [Formatter] Exporting Unnamed profile fails silently
+ *     Brock Janiczak <brockj at tpg.com.au> - [formatter] Add  option: "add new line after label" - https://bugs.eclipse.org/bugs/show_bug.cgi?id=150741
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.preferences.formatter;
 
@@ -26,6 +27,8 @@ final class FormatterMessages extends NLS {
 	}
 
 	public static String CommentsTabPage_remove_blank_block_comment_lines;
+	public static String CommentsTabPage_new_lines_at_comment_boundaries;
+	public static String CommentsTabPage_new_lines_at_javadoc_boundaries;
 	public static String FormatterTabPage_ShowInvisibleCharacters_label;
 	public static String ModifyDialog_BuiltIn_Status;
 	public static String ModifyDialog_Duplicate_Status;
@@ -259,6 +262,7 @@ final class FormatterMessages extends NLS {
 	public static String WhiteSpaceOptions_return_with_parenthesized_expression;
 	public static String WhiteSpaceOptions_throw_with_parenthesized_expression;
 	public static String LineWrappingTabPage_compact_if_else;
+	public static String LineWrappingTabPage_declaration;
 	public static String LineWrappingTabPage_extends_clause;
 	public static String LineWrappingTabPage_enum_constant_arguments;
 	public static String LineWrappingTabPage_enum_constants;
@@ -286,7 +290,6 @@ final class FormatterMessages extends NLS {
 	public static String LineWrappingTabPage_wrapping_policy_label_text;
 	public static String LineWrappingTabPage_indentation_policy_label_text;
 	public static String LineWrappingTabPage_force_split_checkbox_text;
-	public static String LineWrappingTabPage_force_split_checkbox_multi_text;
 	public static String LineWrappingTabPage_line_width_for_preview_label_text;
 	public static String LineWrappingTabPage_group;
 	public static String LineWrappingTabPage_multi_group;
@@ -307,7 +310,9 @@ final class FormatterMessages extends NLS {
 	public static String LineWrappingTabPage_enum_superinterfaces;
 	public static String LineWrappingTabPage_assignment_alignment;
 	public static String LineWrappingTabPage_binary_expression_wrap_operator;
-	public static String LineWrappingTabPage_binary_expression;
+	public static String LineWrappingTabPage_annotations;
+	public static String LineWrappingTabPage_annotations_arguments;
+	public static String LineWrappingTabPage_wrap_outer_expressions_when_nested;
 
 	public static String BlankLinesTabPage_preview_header;
 	public static String BlankLinesTabPage_compilation_unit_group_title;
@@ -354,6 +359,7 @@ final class FormatterMessages extends NLS {
 	public static String CommentsTabPage_format_header;
 	public static String CommentsTabPage_format_html;
 	public static String CommentsTabPage_format_code_snippets;
+	public static String CommentsTabPage_format_line_comments_on_first_column;
 	public static String CommentsTabPage_group2_title;
 	public static String CommentsTabPage_clear_blank_lines;
 	public static String CommentsTabPage_blank_line_before_javadoc_tags;
@@ -362,7 +368,6 @@ final class FormatterMessages extends NLS {
 	public static String CommentsTabPage_new_line_after_param_tags;
 	public static String CommentsTabPage_group3_title;
 	public static String CommentsTabPage_group4_title;
-	public static String CommentsTabPage_group5_title;
 	public static String CommentsTabPage_line_width;
 	public static String CommentsTabPage_never_indent_block_comments_on_first_column;
 	public static String CommentsTabPage_never_indent_line_comments_on_first_column;
@@ -402,6 +407,13 @@ final class FormatterMessages extends NLS {
 	public static String IndentationTabPage_switch_group_option_indent_break_statements;
     public static String IndentationTabPage_indent_empty_lines;
 	public static String IndentationTabPage_use_tabs_only_for_leading_indentations;
+	
+	public static String  OffOnTagsTabPage_description;
+	public static String  OffOnTagsTabPage_enableOffOnTags;
+	public static String  OffOnTagsTabPage_disableTag;
+	public static String  OffOnTagsTabPage_enableTag;
+	public static String  OffOnTagsTabPage_error_startsWithWhitespace;
+	public static String  OffOnTagsTabPage_error_endsWithWhitespace;
 
 	public static String ModifyDialog_tabpage_braces_title;
 	public static String ModifyDialog_tabpage_indentation_title;
@@ -411,6 +423,7 @@ final class FormatterMessages extends NLS {
 	public static String ModifyDialog_tabpage_control_statements_title;
 	public static String ModifyDialog_tabpage_line_wrapping_title;
 	public static String ModifyDialog_tabpage_comments_title;
+	public static String ModifyDialog_tabpage_OffOnTags_title;
 
 	public static String NewLinesTabPage_preview_header;
 	public static String NewLinesTabPage_newlines_group_title;
@@ -422,6 +435,7 @@ final class FormatterMessages extends NLS {
 	public static String NewLinesTabPage_newlines_group_option_empty_method_body;
 	public static String NewLinesTabPage_newlines_group_option_empty_block;
 	public static String NewLinesTabPage_newlines_group_option_empty_end_of_file;
+	public static String NewLinesTabPage_newlines_group_option_empty_label;
 	public static String NewLinesTabPage_empty_statement_group_title;
 	public static String NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line;
 	public static String NewLinesTabPage_arrayInitializer_group_title;
@@ -456,11 +470,16 @@ final class FormatterMessages extends NLS {
 	public static String CodingStyleConfigurationBlock_load_profile_error_too_new_message;
 	public static String CodingStyleConfigurationBlock_save_profile_overwrite_title;
 	public static String CodingStyleConfigurationBlock_save_profile_overwrite_message;
+	public static String CodingStyleConfigurationBlock_export_all_button_desc;
+	public static String CodingStyleConfigurationBlock_export_profiles_dialog_title;
+	public static String CodingStyleConfigurationBlock_export_profiles_error_title;
+	public static String CodingStyleConfigurationBlock_export_profiles_error_message;
+	public static String CodingStyleConfigurationBlock_export_profiles_overwrite_title;
+	public static String CodingStyleConfigurationBlock_export_profiles_overwrite_message;
 	public static String CodingStyleConfigurationBlock_edit_button_desc;
 	public static String CodingStyleConfigurationBlock_remove_button_desc;
 	public static String CodingStyleConfigurationBlock_new_button_desc;
 	public static String CodingStyleConfigurationBlock_load_button_desc;
-	public static String CodingStyleConfigurationBlock_save_button_desc;
 	public static String CodingStyleConfigurationBlock_preview_label_text;
 	public static String CodingStyleConfigurationBlock_error_reading_xml_message;
 	public static String CodingStyleConfigurationBlock_error_serializing_xml_message;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
index 26e2407..88299ba 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
 #     IBM Corporation - initial API and implementation
 #     istvan at benedek-home.de - 103706 [formatter] indent empty lines
 #     Aaron Luchko, aluchko at redhat.com - 105926 [Formatter] Exporting Unnamed profile fails silently
+#     Brock Janiczak <brockj at tpg.com.au> - [formatter] Add  option: "add new line after label" - https://bugs.eclipse.org/bugs/show_bug.cgi?id=150741
 ###############################################################################
 
 WhiteSpaceTabPage_assignments=Assignments
@@ -296,6 +297,7 @@ WhiteSpaceTabPage_insert_space=&Insert space:
 
 
 LineWrappingTabPage_compact_if_else=Compact 'if else'
+LineWrappingTabPage_declaration=Declaration
 LineWrappingTabPage_extends_clause='extends' clause
 LineWrappingTabPage_enum_constant_arguments=Constant arguments
 LineWrappingTabPage_enum_constants=Constants
@@ -322,16 +324,15 @@ LineWrappingTabPage_statements=Statements
 LineWrappingTabPage_enum_decls='enum' declaration
 LineWrappingTabPage_wrapping_policy_label_text=Line wrapping poli&cy:
 LineWrappingTabPage_indentation_policy_label_text=Indent&ation policy:
-LineWrappingTabPage_force_split_checkbox_text=&Force split
-LineWrappingTabPage_force_split_checkbox_multi_text=&Force split
+LineWrappingTabPage_force_split_checkbox_text=&Force split, even if line shorter than maximum line width
 LineWrappingTabPage_line_width_for_preview_label_text=&Set line width for preview window:
 LineWrappingTabPage_group=Settings for {0}
 LineWrappingTabPage_multi_group=Settings for {0} ({1} items)
 LineWrappingTabPage_multiple_selections=Settings for multiple selections ({0} items)
 LineWrappingTabPage_occurences={0} ({1} of {2})
 LineWrappingTabPage_splitting_do_not_split=Do not wrap
-LineWrappingTabPage_splitting_wrap_when_necessary=Wrap only when necessary
-LineWrappingTabPage_splitting_always_wrap_first_others_when_necessary=Always wrap first element, others when necessary
+LineWrappingTabPage_splitting_wrap_when_necessary=Wrap where necessary
+LineWrappingTabPage_splitting_always_wrap_first_others_when_necessary=Wrap first element, others where necessary
 LineWrappingTabPage_splitting_wrap_always=Wrap all elements, every element on a new line
 LineWrappingTabPage_splitting_wrap_always_indent_all_but_first=Wrap all elements, indent all but the first element
 LineWrappingTabPage_splitting_wrap_always_except_first_only_if_necessary=Wrap all elements, except first element if not necessary
@@ -339,18 +340,20 @@ LineWrappingTabPage_general_settings=General settings
 LineWrappingTabPage_width_indent_option_max_line_width=Max&imum line width:
 LineWrappingTabPage_width_indent_option_default_indent_wrapped=Defa&ult indentation for wrapped lines:
 LineWrappingTabPage_width_indent_option_default_indent_array=Default indentation for arra&y initializers:
-LineWrappingTabPage_do_not_join_lines=Never join lin&es
+LineWrappingTabPage_do_not_join_lines=Never join already wrapped lin&es
 LineWrappingTabPage_error_invalid_value=The key ''{0}'' contained an invalid value; resetting to defaults.
 LineWrappingTabPage_enum_superinterfaces='implements' clause
 LineWrappingTabPage_assignment_alignment=Assignments
+LineWrappingTabPage_annotations=Annotations
+LineWrappingTabPage_annotations_arguments=Element-value pairs
+LineWrappingTabPage_wrap_outer_expressions_when_nested=Prefer wrapping &outer expressions (keep nested expression on one line)
 
-LineWrappingTabPage_binary_expression = Binary Expression settings
 LineWrappingTabPage_binary_expression_wrap_operator=Wrap &before operator
 
 BlankLinesTabPage_preview_header=Blank Lines
 BlankLinesTabPage_compilation_unit_group_title=Blank lines in compilation unit
 BlankLinesTabPage_compilation_unit_option_before_package=Before p&ackage declaration:
-BlankLinesTabPage_compilation_unit_option_after_package=Af&ter package declaration:
+BlankLinesTabPage_compilation_unit_option_after_package=After package declaration:
 BlankLinesTabPage_compilation_unit_option_before_import=&Before import declaration:
 BlankLinesTabPage_compilation_unit_option_after_import=After import de&claration:
 BlankLinesTabPage_compilation_unit_option_between_import_groups=Between imp&ort groups:
@@ -392,25 +395,26 @@ CommentsTabPage_group1_title=General settings
 commentsTabPage_enable_javadoc_comment_formatting=Enable &Javadoc comment formatting
 CommentsTabPage_enable_line_comment_formatting=Enable line &comment formatting
 CommentsTabPage_enable_block_comment_formatting=Enable &block comment formatting
-CommentsTabPage_remove_blank_block_comment_lines=Rem&ove blank lines
+CommentsTabPage_remove_blank_block_comment_lines=Remove blank lines
 CommentsTabPage_format_header=Enable &header comment formatting
-CommentsTabPage_format_html=Format HTML ta&gs
-CommentsTabPage_format_code_snippets=Format &Java code snippets inside 'pre' tags
-
-CommentsTabPage_group2_title=Javadoc comment settings
-CommentsTabPage_clear_blank_lines=Remove blank l&ines
-CommentsTabPage_blank_line_before_javadoc_tags=Blan&k line before Javadoc tags
-CommentsTabPage_indent_javadoc_tags=Indent Javadoc tag&s
-CommentsTabPage_indent_description_after_param=Indent description a&fter @param
-CommentsTabPage_new_line_after_param_tags=New line &after @param tags
+CommentsTabPage_format_html=Format HTML tags
+CommentsTabPage_format_code_snippets=Format Java code snippets inside 'pre' tags
+CommentsTabPage_format_line_comments_on_first_column=Format l&ine comments on first column
+
+CommentsTabPage_group2_title=J&avadoc comment settings
+CommentsTabPage_clear_blank_lines=Remove blank lines
+CommentsTabPage_blank_line_before_javadoc_tags=Blank line before Javadoc tags
+CommentsTabPage_indent_javadoc_tags=Indent Javadoc tags
+CommentsTabPage_indent_description_after_param=Indent description after @param
+CommentsTabPage_new_line_after_param_tags=New line after @param tags
 CommentsTabPage_group3_title=Line width
-CommentsTabPage_line_width=Ma&ximum line width for comments:
+CommentsTabPage_line_width=Maximum line width &for comments:
 
-CommentsTabPage_group4_title=Block comment settings
-
-CommentsTabPage_group5_title=Indentation settings
+CommentsTabPage_group4_title=Bl&ock comment settings
+CommentsTabPage_new_lines_at_comment_boundaries=/* and */ on separate lines
+CommentsTabPage_new_lines_at_javadoc_boundaries=/** and */ on separate lines
 CommentsTabPage_never_indent_block_comments_on_first_column=Never indent block comments on first col&umn
-CommentsTabPage_never_indent_line_comments_on_first_column=Never indent line &comments on first column
+CommentsTabPage_never_indent_line_comments_on_first_column=Never indent line comment&s on first column
 CommentsTabPage_do_not_join_lines=Never join lin&es
 ControlStatementsTabPage_preview_header=If...else
 ControlStatementsTabPage_general_group_title=General
@@ -437,7 +441,7 @@ IndentationTabPage_general_group_option_tab_size=Tab &size:
 IndentationTabPage_general_group_option_indent_size=&Indentation size:
 
 IndentationTabPage_field_alignment_group_title=Alignment of fields in class declarations
-IndentationTabPage_field_alignment_group_align_fields_in_columns=&Align fields in columns
+IndentationTabPage_field_alignment_group_align_fields_in_columns=Align &fields in columns
 
 IndentationTabPage_indent_group_title=Indent
 
@@ -450,7 +454,7 @@ IndentationTabPage_block_group_option_indent_statements_compare_to_block=Stateme
 IndentationTabPage_indent_empty_lines=Empty lines
 
 IndentationTabPage_switch_group_option_indent_statements_within_switch_body=Statements wit&hin 'switch' body
-IndentationTabPage_switch_group_option_indent_statements_within_case_body=Statements within 'case' bo&dy
+IndentationTabPage_switch_group_option_indent_statements_within_case_body=St&atements within 'case' body
 IndentationTabPage_switch_group_option_indent_break_statements='brea&k' statements
 
 IndentationTabPage_use_tabs_only_for_leading_indentations=Use spaces to indent wrapped lines
@@ -465,6 +469,7 @@ ModifyDialog_tabpage_new_lines_title=New &Lines
 ModifyDialog_tabpage_control_statements_title=Con&trol Statements
 ModifyDialog_tabpage_line_wrapping_title=Line Wrappin&g
 ModifyDialog_tabpage_comments_title=Co&mments
+ModifyDialog_tabpage_OffOnTags_title=Off&/On Tags
 
 NewLinesTabPage_preview_header=New Lines
 NewLinesTabPage_newlines_group_title=Insert new line
@@ -477,6 +482,7 @@ NewLinesTabPage_newlines_group_option_empty_enum_constant=in empty en&um constan
 NewLinesTabPage_newlines_group_option_empty_method_body=in empt&y method body
 NewLinesTabPage_newlines_group_option_empty_block=in empty bloc&k
 NewLinesTabPage_newlines_group_option_empty_end_of_file=at end of &file
+NewLinesTabPage_newlines_group_option_empty_label=after labels
 NewLinesTabPage_empty_statement_group_title=Empty statements
 NewLinesTabPage_emtpy_statement_group_option_empty_statement_on_new_line=Put empty &statement on new line
 
@@ -486,9 +492,19 @@ NewLinesTabPage_array_group_option_before_closing_brace_of_array_initializer=Ins
 
 NewLinesTabPage_annotations_group_local_variables=Insert new line after ann&otations on local variables
 NewLinesTabPage_annotations_group_members=&Insert new line after annotations on members
-NewLinesTabPage_annotations_group_paramters=Insert new line after annotations on &parameters
+NewLinesTabPage_annotations_group_paramters=Insert new line after annotations on parameters
 NewLinesTabPage_annotations_group_title=Annotations
 
+OffOnTagsTabPage_description=Off/On tags can be used in any comments to turn the formatter off and on in a source file.\n\
+- At the beginning of each file, the formatter is enabled.\n\
+- Each time the formatter sees an off tag, it disables formatting for that comment and the source after it.\n\
+- Each time the formatter sees an on tag, it enables formatting for the source after that comment.\n
+OffOnTagsTabPage_enableOffOnTags=&Enable Off/On tags
+OffOnTagsTabPage_disableTag=O&ff tag:
+OffOnTagsTabPage_enableTag=&On tag:
+OffOnTagsTabPage_error_startsWithWhitespace=This value must not start with a white space.
+OffOnTagsTabPage_error_endsWithWhitespace=This value must not end with a white space.
+
 ProfileManager_default_profile_name=Eclipse 2.1 [built-in]
 ProfileManager_eclipse_profile_name=Eclipse [built-in]
 ProfileManager_java_conventions_profile_name=Java Conventions [built-in]
@@ -518,11 +534,16 @@ default values and newer settings are ignored. Please note \
 that upgrading profiles from older to newer builds is fully supported.
 CodingStyleConfigurationBlock_save_profile_overwrite_title=Export Profile
 CodingStyleConfigurationBlock_save_profile_overwrite_message=The file ''{0}'' already exists.\nDo you want to replace it?
+CodingStyleConfigurationBlock_export_all_button_desc=E&xport All...
+CodingStyleConfigurationBlock_export_profiles_dialog_title= Export Profiles
+CodingStyleConfigurationBlock_export_profiles_error_title=Export Profiles
+CodingStyleConfigurationBlock_export_profiles_error_message=Could not export the profiles.
+CodingStyleConfigurationBlock_export_profiles_overwrite_title= Export Profiles
+CodingStyleConfigurationBlock_export_profiles_overwrite_message=The file ''{0}'' already exists.\nDo you want to replace it?
 CodingStyleConfigurationBlock_edit_button_desc=&Edit...
 CodingStyleConfigurationBlock_remove_button_desc=&Remove
 CodingStyleConfigurationBlock_new_button_desc=Ne&w...
 CodingStyleConfigurationBlock_load_button_desc=I&mport...
-CodingStyleConfigurationBlock_save_button_desc=E&xport...
 CodingStyleConfigurationBlock_preview_label_text=Prev&iew:
 CodingStyleConfigurationBlock_error_reading_xml_message=Problems reading profiles from XML
 CodingStyleConfigurationBlock_error_serializing_xml_message=Problems serializing the profiles to XML
@@ -543,15 +564,15 @@ ModifyDialog_Duplicate_Status=A profile with this name already exists.
 ModifyDialog_BuiltIn_Status=This is a built-in profile, change the name to create a new profile.
 ModifyDialog_Shared_Status=This is an unmanaged profile, change the name to create a new profile.
 ModifyDialog_EmptyName_Status=Profile name is empty.
-ModifyDialogTabPage_preview_label_text=Preview:
 
 ProfileManager_unmanaged_profile=Unmanaged profile
 ProfileManager_unmanaged_profile_with_name=Unmanaged profile ''{0}''
 
+ModifyDialogTabPage_preview_label_text=Preview:
 ModifyDialogTabPage_error_msg_values_text_unassigned=Values and text must be assigned.
 ModifyDialogTabPage_error_msg_values_items_text_unassigned=Values, items and text must be assigned.
-
 ModifyDialogTabPage_NumberPreference_error_invalid_key=The key {0} does not yield a valid integer value.
 ModifyDialogTabPage_NumberPreference_error_invalid_value=Invalid value: Please enter a number between {0} and {1}.
+
 ProfileConfigurationBlock_load_profile_wrong_profile_message=Import failed. This is not a valid profile: Expected ''{0}'' but encountered ''{1}''.
 FormatterTabPage_ShowInvisibleCharacters_label=Show in&visible characters
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
index 64c72dd..6279785 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterModifyDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,14 +17,15 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile;
 
+
 public class FormatterModifyDialog extends ModifyDialog {
 
-    public FormatterModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
+	public FormatterModifyDialog(Shell parentShell, Profile profile, ProfileManager profileManager, ProfileStore profileStore, boolean newProfile, String dialogPreferencesKey, String lastSavePathKey) {
 		super(parentShell, profile, profileManager, profileStore, newProfile, dialogPreferencesKey, lastSavePathKey);
 	}
 
 	protected void addPages(Map values) {
-	    addTabPage(FormatterMessages.ModifyDialog_tabpage_indentation_title, new IndentationTabPage(this, values));
+		addTabPage(FormatterMessages.ModifyDialog_tabpage_indentation_title, new IndentationTabPage(this, values));
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_braces_title, new BracesTabPage(this, values));
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_whitespace_title, new WhiteSpaceTabPage(this, values));
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_blank_lines_title, new BlankLinesTabPage(this, values));
@@ -32,11 +33,12 @@ public class FormatterModifyDialog extends ModifyDialog {
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_control_statements_title, new ControlStatementsTabPage(this, values));
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_line_wrapping_title, new LineWrappingTabPage(this, values));
 		addTabPage(FormatterMessages.ModifyDialog_tabpage_comments_title, new CommentsTabPage(this, values));
-    }
+		addTabPage(FormatterMessages.ModifyDialog_tabpage_OffOnTags_title, new OffOnTagsTabPage(this, values));
+	}
 
 	/**
 	 * {@inheritDoc}
-	 *
+	 * 
 	 * @since 3.5
 	 */
 	protected String getHelpContextId() {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterTabPage.java
index fae8a7d..8729e48 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,14 +21,35 @@ import org.eclipse.swt.widgets.Composite;
 
 import org.eclipse.jface.dialogs.IDialogSettings;
 
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
+
 import org.eclipse.jdt.ui.JavaUI;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 
+
 public abstract class FormatterTabPage extends ModifyDialogTabPage {
 
 	private final static String SHOW_INVISIBLE_PREFERENCE_KEY= JavaUI.ID_PLUGIN + ".formatter_page.show_invisible_characters"; //$NON-NLS-1$
 
+	/**
+	 * Constant array for boolean false/true selection.
+	 */
+	protected static String[] FALSE_TRUE= { DefaultCodeFormatterConstants.FALSE, DefaultCodeFormatterConstants.TRUE };
+
+	/**
+	 * Constant array for boolean true/false selection.
+	 * 
+	 * @since 3.5
+	 */
+	protected static String[] TRUE_FALSE= { DefaultCodeFormatterConstants.TRUE, DefaultCodeFormatterConstants.FALSE };
+
+	/**
+	 * Constant array for insert / not_insert.
+	 */
+	protected static String[] DO_NOT_INSERT_INSERT= { JavaCore.DO_NOT_INSERT, JavaCore.INSERT };
+
 	private JavaPreview fPreview;
 	private final IDialogSettings fDialogSettings;
 	private Button fShowInvisibleButton;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/IndentationTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/IndentationTabPage.java
index 578f1c2..50275cc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/IndentationTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/IndentationTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,14 +27,6 @@ import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 public class IndentationTabPage extends FormatterTabPage {
 
-	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
-
 	private final String PREVIEW=
 	createPreviewHeader(FormatterMessages.IndentationTabPage_preview_header) +
 	"class Example {" +	//$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/JavaPreview.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/JavaPreview.java
index 18e37a5..1e1b740 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/JavaPreview.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/JavaPreview.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -121,7 +121,9 @@ public abstract class JavaPreview {
 		fSourceViewer.setEditable(false);
 		Cursor arrowCursor= fSourceViewer.getTextWidget().getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
 		fSourceViewer.getTextWidget().setCursor(arrowCursor);
-		fSourceViewer.getTextWidget().setCaret(null);
+
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
+//		fSourceViewer.getTextWidget().setCaret(null);
 
 		fViewerConfiguration= new SimpleJavaSourceViewerConfiguration(tools.getColorManager(), fPreferenceStore, null, IJavaPartitions.JAVA_PARTITIONING, true);
 		fSourceViewer.configure(fViewerConfiguration);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
index 2c29eda..bfb3d44 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/LineWrappingTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,21 +61,6 @@ import org.eclipse.jdt.internal.ui.util.SWTUtil;
  */
 public class LineWrappingTabPage extends FormatterTabPage {
 	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
-
-	/**
-	 * Constant array for boolean selection.
-	 * 
-	 * @since 3.5
-	 */
-	private static String[] TRUE_FALSE= { DefaultCodeFormatterConstants.TRUE, DefaultCodeFormatterConstants.FALSE };
-
-    /**
      * Represents a line wrapping category. All members are final.
      */
 	private final static class Category {
@@ -341,7 +326,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
                 fForceSplit.setSelection(nrOfTrue.intValue() > nrOfFalse.intValue());
 
             int max= getMax(nrOfTrue, nrOfFalse);
-            String label= FormatterMessages.LineWrappingTabPage_force_split_checkbox_multi_text;
+            String label= FormatterMessages.LineWrappingTabPage_force_split_checkbox_text;
             fForceSplit.setText(getLabelText(label, max, fElements.size()));
         }
 
@@ -433,6 +418,12 @@ public class LineWrappingTabPage extends FormatterTabPage {
 	    FormatterMessages.LineWrappingTabPage_parameters
 	);
 
+	private final Category fMethodDeclarationsCategory= new Category(
+	    DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_METHOD_DECLARATION,
+	    "class Example {public final synchronized java.lang.String a_method_with_a_long_name() {}}", //$NON-NLS-1$
+	    FormatterMessages.LineWrappingTabPage_declaration
+	);
+
 	private final Category fMethodDeclarationsParametersCategory= new Category(
 	    DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
 	    "class Example {void foo(int arg1, int arg2, int arg3, int arg4, int arg5, int arg6) {}}", //$NON-NLS-1$
@@ -441,7 +432,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
 
 	private final Category fMessageSendArgumentsCategory= new Category(
 	    DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
-			"class Example {void foo() {Other.bar( 100,\n200,\n300,\n400,\n500,\n600,\n700,\n800,\n900 );}}", //$NON-NLS-1$
+			"class Example {void foo() {Other.bar( 100,\nnested(200,\n300,\n400,\n500,\n600,\n700,\n800,\n900 ));}}", //$NON-NLS-1$
 	    FormatterMessages.LineWrappingTabPage_arguments
 	);
 
@@ -509,6 +500,13 @@ public class LineWrappingTabPage extends FormatterTabPage {
 	    FormatterMessages.LineWrappingTabPage_binary_exprs
 	);
 
+	private final Category fAnnotationArgumentsCategory= new Category(
+	    DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ANNOTATION,
+			"@MyAnnotation(value1 = \"this is an example\", value2 = \"of an annotation\", value3 = \"with several arguments\", value4 = \"which may need to be wrapped\")\n" + //$NON-NLS-1$
+			"class Example {}", //$NON-NLS-1$
+	    FormatterMessages.LineWrappingTabPage_annotations_arguments
+	);
+
 	private final Category fEnumConstArgumentsCategory= new Category(
 	    DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_ENUM_CONSTANT,
 	    "enum Example {" + //$NON-NLS-1$
@@ -628,6 +626,9 @@ public class LineWrappingTabPage extends FormatterTabPage {
 	 */
 	protected List createCategories() {
 
+		final Category annotations = new Category(FormatterMessages.LineWrappingTabPage_annotations);
+		annotations.children.add(fAnnotationArgumentsCategory);
+
 		final Category classDeclarations= new Category(FormatterMessages.LineWrappingTabPage_class_decls);
 		classDeclarations.children.add(fTypeDeclarationSuperclassCategory);
 		classDeclarations.children.add(fTypeDeclarationSuperinterfacesCategory);
@@ -637,6 +638,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
 		constructorDeclarations.children.add(fConstructorThrowsClauseCategory);
 
 		final Category methodDeclarations= new Category(null, null, FormatterMessages.LineWrappingTabPage_method_decls);
+		methodDeclarations.children.add(fMethodDeclarationsCategory);
 		methodDeclarations.children.add(fMethodDeclarationsParametersCategory);
 		methodDeclarations.children.add(fMethodThrowsClauseCategory);
 
@@ -662,6 +664,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
 		statements.children.add(fCompactIfCategory);
 
 		final List root= new ArrayList();
+		root.add(annotations);
 		root.add(classDeclarations);
 		root.add(constructorDeclarations);
 		root.add(methodDeclarations);
@@ -683,6 +686,7 @@ public class LineWrappingTabPage extends FormatterTabPage {
 		createNumberPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_width_indent_option_default_indent_wrapped, DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION, 0, 9999);
 		createNumberPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_width_indent_option_default_indent_array, DefaultCodeFormatterConstants.FORMATTER_CONTINUATION_INDENTATION_FOR_ARRAY_INITIALIZER, 0, 9999);
 		createCheckboxPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_do_not_join_lines, DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES, TRUE_FALSE);
+		createCheckboxPref(lineWidthGroup, numColumns, FormatterMessages.LineWrappingTabPage_wrap_outer_expressions_when_nested, DefaultCodeFormatterConstants.FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED, FALSE_TRUE);
 
 		fCategoriesViewer= new TreeViewer(composite /*categoryGroup*/, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL );
 		fCategoriesViewer.setContentProvider(new ITreeContentProvider() {
@@ -719,31 +723,31 @@ public class LineWrappingTabPage extends FormatterTabPage {
 		fWrappingStyleCombo.setItems(WRAPPING_NAMES);
 		fWrappingStyleCombo.setLayoutData(createGridData(numColumns, GridData.HORIZONTAL_ALIGN_FILL, 0));
 
-		// label "Select indentation style:"
-		fIndentStylePolicy= createLabel(numColumns, fOptionsGroup, FormatterMessages.LineWrappingTabPage_indentation_policy_label_text);
-
-		// combo SplitStyleCombo
-		fIndentStyleCombo= new Combo(fOptionsGroup, SWT.SINGLE | SWT.READ_ONLY);
-		SWTUtil.setDefaultVisibleItemCount(fIndentStyleCombo);
-		fIndentStyleCombo.setItems(INDENT_NAMES);
-		fIndentStyleCombo.setLayoutData(createGridData(numColumns, GridData.HORIZONTAL_ALIGN_FILL, 0));
-
+		// button "Force split"
+		fForceSplit= new Button(fOptionsGroup, SWT.CHECK);
+		String label= FormatterMessages.LineWrappingTabPage_force_split_checkbox_text;
+		fForceSplit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, numColumns - 1, 1));
+		fForceSplit.setText(label);
+		
+		// button "Wrap before operator"
 		Preference expressionWrapPositionPreference= createCheckboxPref(fOptionsGroup, 1, FormatterMessages.LineWrappingTabPage_binary_expression_wrap_operator, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, FALSE_TRUE);
 		Control control= expressionWrapPositionPreference.getControl();
 		control.setVisible(false);
 		GridData layoutData= (GridData)control.getLayoutData();
 		layoutData.exclude= true;
 		layoutData.horizontalAlignment= SWT.BEGINNING;
+		layoutData.horizontalSpan= numColumns - 1;
 		layoutData.grabExcessHorizontalSpace= false;
 		fBinaryExpressionCategory.addPreference(expressionWrapPositionPreference);
+		
+		// label "Select indentation style:"
+		fIndentStylePolicy= createLabel(numColumns, fOptionsGroup, FormatterMessages.LineWrappingTabPage_indentation_policy_label_text);
 
-		// button "Force split"
-		fForceSplit= new Button(fOptionsGroup, SWT.CHECK);
-		String label= FormatterMessages.LineWrappingTabPage_force_split_checkbox_text;
-		GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false);
-		gridData.horizontalSpan= numColumns - 1;
-		fForceSplit.setLayoutData(gridData);
-		fForceSplit.setText(label);
+		// combo IndentStyleCombo
+		fIndentStyleCombo= new Combo(fOptionsGroup, SWT.SINGLE | SWT.READ_ONLY);
+		SWTUtil.setDefaultVisibleItemCount(fIndentStyleCombo);
+		fIndentStyleCombo.setItems(INDENT_NAMES);
+		fIndentStyleCombo.setLayoutData(createGridData(numColumns, GridData.HORIZONTAL_ALIGN_FILL, 0));
 
 		// selection state object
 		fSelectionState= new SelectionState();
@@ -754,8 +758,11 @@ public class LineWrappingTabPage extends FormatterTabPage {
 	protected Composite doCreatePreviewPane(Composite composite, int numColumns) {
 
 		super.doCreatePreviewPane(composite, numColumns);
-
-		final NumberPreference previewLineWidth= new NumberPreference(composite, numColumns / 2, fPreviewPreferences, LINE_SPLIT,
+		
+		Composite previewLineWidthContainer= new Composite(composite, SWT.NONE);
+		previewLineWidthContainer.setLayout(createGridLayout(2, false));
+		
+		final NumberPreference previewLineWidth= new NumberPreference(previewLineWidthContainer, 2, fPreviewPreferences, LINE_SPLIT,
 		    0, 9999, FormatterMessages.LineWrappingTabPage_line_width_for_preview_label_text);
 		fDefaultFocusManager.add(previewLineWidth);
 		previewLineWidth.addObserver(fUpdater);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java
index d63f39d..4ba5bc3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ModifyDialogTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,6 +47,7 @@ import org.eclipse.core.runtime.Status;
 
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.layout.PixelConverter;
 
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -59,6 +60,7 @@ import org.eclipse.jdt.internal.ui.util.SWTUtil;
 
 public abstract class ModifyDialogTabPage implements IModifyDialogTabPage {
 
+
 	/**
 	 * This is the default listener for any of the Preference
 	 * classes. It is added by the respective factory methods and
@@ -454,6 +456,146 @@ public abstract class ModifyDialogTabPage implements IModifyDialogTabPage {
 
 
 	/**
+	 * Wrapper around a text field which requests a string input.
+	 * 
+	 * @since 3.6
+	 */
+	protected final class StringPreference extends Preference {
+
+		/**
+		 * Validates the input.
+		 * <p>
+		 * The default implementation declares all non-<code>null</code> values as valid.
+		 * </p>
+		 * 
+		 * @since 3.6
+		 */
+		protected class Validator {
+			boolean isValid(String input) {
+				return input != null;
+			}
+		}
+
+		private final Label fLabel;
+
+		private final Text fText;
+
+		private IInputValidator fInputValidator;
+
+		protected String fSelected;
+
+		protected String fOldSelected;
+
+		/**
+		 * Creates a new <code>StringPreference</code>.
+		 * 
+		 * @param composite the composite on which the SWT widgets are added.
+		 * @param numColumns the number of columns in the composite's {@link GridLayout}
+		 * @param preferences the map to store the values.
+		 * @param key the key to store the values.
+		 * @param text the label text for this Preference.
+		 * @param inputValidator the input validator or <code>null</code> if none
+		 */
+		public StringPreference(Composite composite, int numColumns, Map preferences, String key, String text, IInputValidator inputValidator) {
+			super(preferences, key);
+
+			fInputValidator= inputValidator;
+
+			fLabel= new Label(composite, SWT.NONE);
+			fLabel.setFont(composite.getFont());
+			fLabel.setText(text);
+
+			fLabel.setLayoutData(createGridData(numColumns - 1, GridData.HORIZONTAL_ALIGN_BEGINNING, SWT.DEFAULT));
+
+			fText= new Text(composite, SWT.SINGLE | SWT.BORDER);
+			fText.setFont(composite.getFont());
+
+			final int length= 30;
+			fText.setLayoutData(createGridData(1, GridData.HORIZONTAL_ALIGN_BEGINNING, fPixelConverter.convertWidthInCharsToPixels(length)));
+
+			updateWidget();
+
+			fText.addFocusListener(new FocusListener() {
+				public void focusGained(FocusEvent e) {
+					StringPreference.this.focusGained();
+				}
+
+				public void focusLost(FocusEvent e) {
+					StringPreference.this.focusLost();
+				}
+			});
+
+			fText.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					fieldModified();
+				}
+			});
+		}
+
+		private IStatus createErrorStatus(String errorText) {
+			return new Status(IStatus.ERROR, JavaPlugin.getPluginId(), 0, errorText, null);
+
+		}
+
+		protected void focusGained() {
+			fOldSelected= fSelected;
+			fText.setSelection(0, fText.getCharCount());
+		}
+
+		protected void focusLost() {
+			updateStatus(null);
+			final String input= fText.getText();
+			if (fInputValidator != null && fInputValidator.isValid(input) != null)
+				fSelected= fOldSelected;
+			else
+				fSelected= input;
+			if (fSelected != fOldSelected) {
+				saveSelected();
+				fText.setText(fSelected);
+			}
+		}
+
+
+		protected void fieldModified() {
+			final String text= fText.getText();
+			final String errorText= fInputValidator != null ? fInputValidator.isValid(text) : null;
+			if (errorText == null) {
+				updateStatus(null);
+				if (fSelected != text) {
+					fSelected= text;
+					saveSelected();
+				}
+			} else
+				updateStatus(createErrorStatus(errorText));
+		}
+
+		private void saveSelected() {
+			getPreferences().put(getKey(), fSelected);
+			setChanged();
+			notifyObservers();
+		}
+
+		protected void updateWidget() {
+			final boolean hasKey= getKey() != null;
+
+			fLabel.setEnabled(hasKey && getEnabled());
+			fText.setEnabled(hasKey && getEnabled());
+
+			if (hasKey) {
+				fSelected= (String)getPreferences().get(getKey());
+				fText.setText(fSelected);
+			} else {
+				fText.setText(""); //$NON-NLS-1$
+			}
+		}
+
+		public Control getControl() {
+			return fText;
+		}
+	}
+
+
+	/**
 	 * This class provides the default way to preserve and re-establish the focus
 	 * over multiple modify sessions. Each ModifyDialogTabPage has its own instance,
 	 * and it should add all relevant controls upon creation, always in the same sequence.
@@ -638,13 +780,16 @@ public abstract class ModifyDialogTabPage implements IModifyDialogTabPage {
 	}
 
 	/**
-	 * Create the contents of this tab page. Subclasses cannot override this,
-	 * instead they must implement <code>doCreatePreferences</code>. <code>doCreatePreview</code> may also
-	 * be overridden as necessary.
+	 * Create the contents of this tab page.
+	 * <p>
+	 * Subclasses should implement <code>doCreatePreferences</code> and <code>doCreatePreview</code>
+	 * may also be overridden as necessary.
+	 * </p>
+	 * 
 	 * @param parent The parent composite
 	 * @return Created content control
 	 */
-	public final Composite createContents(Composite parent) {
+	public Composite createContents(Composite parent) {
 		final int numColumns= 4;
 
 		if (fPixelConverter == null) {
@@ -892,6 +1037,18 @@ public abstract class ModifyDialogTabPage implements IModifyDialogTabPage {
 	}
 
 	/*
+	 * Convenience method to create a StringPreference. The widget is registered as
+	 * a potential focus holder, and the default updater is added.
+	 * @since 3.6
+	 */
+	protected StringPreference createStringPref(Composite composite, int numColumns, String name, String key, IInputValidator inputValidator) {
+		StringPreference pref= new StringPreference(composite, numColumns, fWorkingValues, key, name, inputValidator);
+		fDefaultFocusManager.add(pref);
+		pref.addObserver(fUpdater);
+		return pref;
+	}
+
+	/*
 	 * Convenience method to create a ComboPreference. The widget is registered as
 	 * a potential focus holder, and the default updater is added.
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java
index 8de1bb0..67f9612 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/NewLinesTabPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Brock Janiczak <brockj at tpg.com.au> - [formatter] Add  option: "add new line after label" - https://bugs.eclipse.org/bugs/show_bug.cgi?id=150741
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.preferences.formatter;
 
@@ -15,30 +16,11 @@ import java.util.Map;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 
-
 public class NewLinesTabPage extends FormatterTabPage {
 
-	/**
-	 * Constant array for boolean selection
-	 */
-	private static String[] FALSE_TRUE = {
-		DefaultCodeFormatterConstants.FALSE,
-		DefaultCodeFormatterConstants.TRUE
-	};
-
-    /**
-     * Constant array for insert / not_insert.
-     */
-    private static String[] DO_NOT_INSERT_INSERT = {
-        JavaCore.DO_NOT_INSERT,
-        JavaCore.INSERT
-    };
-
-
 	private final String PREVIEW=
 	createPreviewHeader(FormatterMessages.NewLinesTabPage_preview_header) +
 	"public class Empty {}\n" + //$NON-NLS-1$
@@ -50,6 +32,7 @@ public class NewLinesTabPage extends FormatterTabPage {
 	"  public void\nbar\n(@SuppressWarnings(\"unused\")\n int i)\n {\n at SuppressWarnings(\"unused\") int k;\n}\n" + //$NON-NLS-1$
 	"  void foo() {" + //$NON-NLS-1$
 	"    ;;" + //$NON-NLS-1$
+	"    label:" + //$NON-NLS-1$
 	"    do {} while (false);" + //$NON-NLS-1$
 	"    for (;;) {}" + //$NON-NLS-1$
 	"  }" + //$NON-NLS-1$
@@ -77,6 +60,7 @@ public class NewLinesTabPage extends FormatterTabPage {
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_anonymous_class_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANONYMOUS_TYPE_DECLARATION, DO_NOT_INSERT_INSERT);
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_method_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_METHOD_BODY, DO_NOT_INSERT_INSERT);
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_block, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_BLOCK, DO_NOT_INSERT_INSERT);
+		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_label, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, DO_NOT_INSERT_INSERT);
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_declaration, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_DECLARATION, DO_NOT_INSERT_INSERT);
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_enum_constant, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ENUM_CONSTANT, DO_NOT_INSERT_INSERT);
 		createPref(newlinesGroup, numColumns, FormatterMessages.NewLinesTabPage_newlines_group_option_empty_annotation_decl_body, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_ANNOTATION_DECLARATION, DO_NOT_INSERT_INSERT);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java
new file mode 100644
index 0000000..69113bf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/OffOnTagsTabPage.java
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.preferences.formatter;
+
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.layout.PixelConverter;
+
+import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
+
+
+/**
+ * Tab page for the on/off formatter tags.
+ * 
+ * @since 3.6
+ */
+public class OffOnTagsTabPage extends FormatterTabPage {
+
+	public OffOnTagsTabPage(ModifyDialog modifyDialog, Map workingValues) {
+		super(modifyDialog, workingValues);
+	}
+
+	protected void doCreatePreferences(Composite composite, int numColumns) {
+		createLabel(numColumns, composite, FormatterMessages.OffOnTagsTabPage_description);
+
+		// Add some vertical space
+		Label separator= new Label(composite, SWT.NONE);
+		separator.setVisible(false);
+		GridData data= new GridData(GridData.FILL, GridData.FILL, false, false, numColumns, 1);
+		data.heightHint= fPixelConverter.convertHeightInCharsToPixels(1) / 3;
+		separator.setLayoutData(data);
+
+		final CheckboxPreference enablePref= createCheckboxPref(composite, numColumns, FormatterMessages.OffOnTagsTabPage_enableOffOnTags, DefaultCodeFormatterConstants.FORMATTER_USE_ON_OFF_TAGS,
+				FALSE_TRUE);
+
+
+		IInputValidator inputValidator= new IInputValidator() {
+			/*
+			 * @see org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage.StringPreference.Validator#isValid(java.lang.String)
+			 * @since 3.6
+			 */
+			public String isValid(String input) {
+				if (input.length() == 0)
+					return null;
+
+				if (Character.isWhitespace(input.charAt(0)))
+					return FormatterMessages.OffOnTagsTabPage_error_startsWithWhitespace;
+
+				if (Character.isWhitespace(input.charAt(input.length() - 1)))
+					return FormatterMessages.OffOnTagsTabPage_error_endsWithWhitespace;
+
+				return null;
+			}
+		};
+
+		Composite tagComposite= new Composite(composite, SWT.NONE);
+		final int indent= fPixelConverter.convertWidthInCharsToPixels(4);
+		GridLayout layout= new GridLayout(numColumns, false);
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		layout.marginLeft= indent;
+		tagComposite.setLayout(layout);
+
+		final StringPreference disableTagPref= createStringPref(tagComposite, numColumns, FormatterMessages.OffOnTagsTabPage_disableTag, DefaultCodeFormatterConstants.FORMATTER_DISABLING_TAG,
+				inputValidator);
+		final StringPreference enableTagPref= createStringPref(tagComposite, numColumns, FormatterMessages.OffOnTagsTabPage_enableTag, DefaultCodeFormatterConstants.FORMATTER_ENABLING_TAG,
+				inputValidator);
+
+		enablePref.getControl().addListener(SWT.Selection, new Listener() {
+			public void handleEvent(Event event) {
+				boolean enabled= enablePref.getChecked();
+				enableTagPref.setEnabled(enabled);
+				disableTagPref.setEnabled(enabled);
+			}
+		});
+
+		boolean enabled= enablePref.getChecked();
+		enableTagPref.setEnabled(enabled);
+		disableTagPref.setEnabled(enabled);
+
+	}
+
+	public final Composite createContents(Composite parent) {
+		if (fPixelConverter == null)
+			fPixelConverter= new PixelConverter(parent);
+
+		Composite composite= new Composite(parent, SWT.NONE);
+		composite.setLayoutData(new GridData());
+
+		final int numColumns= 2;
+		GridLayout layout= new GridLayout(numColumns, false);
+		layout.verticalSpacing= (int)(1.5 * fPixelConverter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING));
+		layout.horizontalSpacing= fPixelConverter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		layout.marginHeight= fPixelConverter.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth= fPixelConverter.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		composite.setLayout(layout);
+		doCreatePreferences(composite, numColumns);
+
+		return composite;
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage#initializePage()
+	 */
+	protected void initializePage() {
+		// Nothing to do.
+	}
+
+	protected void doUpdatePreview() {
+		// Nothing to do since this page has no preview.
+	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.preferences.formatter.ModifyDialogTabPage#doCreateJavaPreview(org.eclipse.swt.widgets.Composite)
+	 */
+	protected JavaPreview doCreateJavaPreview(Composite parent) {
+		return null; // This method won't be called.
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileConfigurationBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileConfigurationBlock.java
index e7a48a8..6bd3522 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileConfigurationBlock.java
@@ -13,6 +13,7 @@ package org.eclipse.jdt.internal.ui.preferences.formatter;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Observable;
 import java.util.Observer;
@@ -32,6 +33,8 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
@@ -58,6 +61,7 @@ import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.CustomPr
 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileManager.Profile;
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
 import org.eclipse.jdt.internal.ui.util.SWTUtil;
+import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
 
 public abstract class ProfileConfigurationBlock {
@@ -146,6 +150,7 @@ public abstract class ProfileConfigurationBlock {
 			fEditButton.addSelectionListener(this);
 			fDeleteButton.addSelectionListener(this);
 			fLoadButton.addSelectionListener(this);
+			fExportAllButton.addSelectionListener(this);
 			update(fProfileManager, null);
 		}
 
@@ -165,6 +170,47 @@ public abstract class ProfileConfigurationBlock {
 				newButtonPressed();
 			else if (button == fLoadButton)
 				loadButtonPressed();
+			else if(button == fExportAllButton)
+				exportAllButtonPressed();
+		}
+
+		/**
+		 * Exports all the profiles to a file.
+		 * 
+		 * @since 3.6
+		 */
+		private void exportAllButtonPressed() {
+			final FileDialog dialog= new FileDialog(fComposite.getShell(), SWT.SAVE);
+			dialog.setText(FormatterMessages.CodingStyleConfigurationBlock_export_profiles_dialog_title);
+			dialog.setFilterExtensions(new String [] {"*.xml"}); //$NON-NLS-1$
+			final String lastPath= JavaPlugin.getDefault().getDialogSettings().get(fLastSaveLoadPathKey + ".loadpath"); //$NON-NLS-1$
+			if (lastPath != null) {
+				dialog.setFilterPath(lastPath);
+			}
+			final String path= dialog.open();
+			if (path == null)
+				return;
+
+			JavaPlugin.getDefault().getDialogSettings().put(fLastSaveLoadPathKey + ".savepath", dialog.getFilterPath()); //$NON-NLS-1$
+
+			final File file= new File(path);
+			if (file.exists() && !MessageDialog.openQuestion(fComposite.getShell(), FormatterMessages.CodingStyleConfigurationBlock_export_profiles_overwrite_title, Messages.format(FormatterMessages.CodingStyleConfigurationBlock_export_profiles_overwrite_message, BasicElementLabels.getPathLabel(file)))) {
+				return;
+			}
+			String encoding= ProfileStore.ENCODING;
+			final IContentType type= Platform.getContentTypeManager().getContentType("org.eclipse.core.runtime.xml"); //$NON-NLS-1$
+			if (type != null)
+				encoding= type.getDefaultCharset();
+			final Collection profiles= new ArrayList();
+			profiles.addAll(fProfileManager.getSortedProfiles());
+			try {
+				fProfileStore.writeProfilesToFile(profiles, file, encoding);
+			} catch (CoreException e) {
+				final String title= FormatterMessages.CodingStyleConfigurationBlock_export_profiles_error_title;
+				final String message= FormatterMessages.CodingStyleConfigurationBlock_export_profiles_error_message;
+				ExceptionHandler.handle(e, fComposite.getShell(), title, message);
+			}
+
 		}
 
 		public void widgetDefaultSelected(SelectionEvent e) {
@@ -218,29 +264,32 @@ public abstract class ProfileConfigurationBlock {
 			}
 			if (profiles == null || profiles.isEmpty())
 				return;
+			Iterator iter=profiles.iterator();
+			while (iter.hasNext()) {
+				final CustomProfile profile= (CustomProfile)iter.next();
+
+				if (!fProfileVersioner.getProfileKind().equals(profile.getKind())) {
+					final String title= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_title;
+					final String message= Messages.format(FormatterMessages.ProfileConfigurationBlock_load_profile_wrong_profile_message, new String[] { fProfileVersioner.getProfileKind(),
+							profile.getKind() });
+					MessageDialog.openError(fComposite.getShell(), title, message);
+					return;
+				}
 
-			final CustomProfile profile= (CustomProfile)profiles.iterator().next();
-
-			if (!fProfileVersioner.getProfileKind().equals(profile.getKind())) {
-				final String title= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_title;
-				final String message= Messages.format(FormatterMessages.ProfileConfigurationBlock_load_profile_wrong_profile_message, new String[] {fProfileVersioner.getProfileKind(), profile.getKind()});
-				MessageDialog.openError(fComposite.getShell(), title, message);
-				return;
-			}
-
-			if (profile.getVersion() > fProfileVersioner.getCurrentVersion()) {
-				final String title= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_too_new_title;
-				final String message= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_too_new_message;
-				MessageDialog.openWarning(fComposite.getShell(), title, message);
-			}
+				if (profile.getVersion() > fProfileVersioner.getCurrentVersion()) {
+					final String title= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_too_new_title;
+					final String message= FormatterMessages.CodingStyleConfigurationBlock_load_profile_error_too_new_message;
+					MessageDialog.openWarning(fComposite.getShell(), title, message);
+				}
 
-			if (fProfileManager.containsName(profile.getName())) {
-				final AlreadyExistsDialog aeDialog= new AlreadyExistsDialog(fComposite.getShell(), profile, fProfileManager);
-				if (aeDialog.open() != Window.OK)
-					return;
+				if (fProfileManager.containsName(profile.getName())) {
+					final AlreadyExistsDialog aeDialog= new AlreadyExistsDialog(fComposite.getShell(), profile, fProfileManager);
+					if (aeDialog.open() != Window.OK)
+						return;
+				}
+				fProfileVersioner.update(profile);
+				fProfileManager.addProfile(profile);
 			}
-			fProfileVersioner.update(profile);
-			fProfileManager.addProfile(profile);
 		}
 	}
 
@@ -253,6 +302,7 @@ public abstract class ProfileConfigurationBlock {
 	private Button fDeleteButton;
 	private Button fNewButton;
 	private Button fLoadButton;
+	private Button fExportAllButton;
 
 	private PixelConverter fPixConv;
 	/**
@@ -316,6 +366,11 @@ public abstract class ProfileConfigurationBlock {
 
 	}
 
+	/**
+	 * Notifies that a preference has been changed.
+	 * 
+	 * @param event the preference change event
+	 */
 	protected void preferenceChanged(PreferenceChangeEvent event) {
 
 	}
@@ -365,6 +420,7 @@ public abstract class ProfileConfigurationBlock {
 
 		fNewButton= createButton(fComposite, FormatterMessages.CodingStyleConfigurationBlock_new_button_desc, GridData.HORIZONTAL_ALIGN_BEGINNING);
 		fLoadButton= createButton(fComposite, FormatterMessages.CodingStyleConfigurationBlock_load_button_desc, GridData.HORIZONTAL_ALIGN_END);
+		fExportAllButton= createButton(fComposite, FormatterMessages.CodingStyleConfigurationBlock_export_all_button_desc, GridData.HORIZONTAL_ALIGN_BEGINNING);
 		createLabel(fComposite, "", 3); //$NON-NLS-1$
 
 		configurePreview(fComposite, numColumns, fProfileManager);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java
index bf5fd53..c5d32f8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.SourceViewerConfiguration;
 
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.IShowInTargetList;
 
@@ -142,7 +141,7 @@ public class PropertiesFileEditor extends TextEditor {
 		if (adapter == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV };
 				}
 
 			};
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.java
index e048cf3..8801e2b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,13 +43,10 @@ final class PropertiesFileEditorMessages extends NLS {
 
 	public static String OpenAction_label;
 	public static String OpenAction_tooltip;
-	public static String OpenAction_select_element;
 	public static String OpenAction_error_title;
 	public static String OpenAction_error_message;
 	public static String OpenAction_error_messageArgs;
 	public static String OpenAction_error_messageProblems;
-	public static String OpenAction_error_messageBadSelection;
-	public static String OpenAction_error_messageErrorResolvingSelection;
 	public static String OpenAction_error_messageErrorSearchingKey;
 	public static String OpenAction_error_messageNoResult;
 	public static String OpenAction_hyperlinkText;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.properties
index 93ddec3..04aaa07 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileEditorMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,14 +11,11 @@
 
 OpenAction_label= &Open
 OpenAction_tooltip= Open an Editor on the Selected Properties Key
-OpenAction_select_element= &Select or enter the file to open:
 
 OpenAction_error_title= Open
 OpenAction_error_message= Cannot open default editor.
 OpenAction_error_messageArgs= Cannot open default editor on {0}: \n{1}
 OpenAction_error_messageProblems= Problems Opening Editor
-OpenAction_error_messageBadSelection= Current text selection does not resolve to a properties key
-OpenAction_error_messageErrorResolvingSelection= Error resolving current text selection
 OpenAction_error_messageErrorSearchingKey= Error searching references to the selected properties key
 OpenAction_error_messageNoResult= Found no references to the selected properties key
 OpenAction_hyperlinkText= Search for usages of ''{0}''
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java
index 8963563..7c24326 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/propertiesfileeditor/PropertiesFileSourceViewerConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -193,7 +193,7 @@ public class PropertiesFileSourceViewerConfiguration extends TextSourceViewerCon
 	 */
 	public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
 		if (IDocument.DEFAULT_CONTENT_TYPE.equals(contentType))
-			return new PartitionDoubleClickSelector(getConfiguredDocumentPartitioning(sourceViewer), 1, 1);
+			return new PartitionDoubleClickSelector(getConfiguredDocumentPartitioning(sourceViewer), 0, 0, 0);
 		if (IPropertiesFilePartitions.COMMENT.equals(contentType))
 			return new PartitionDoubleClickSelector(getConfiguredDocumentPartitioning(sourceViewer), 0, 0);
 		if (IPropertiesFilePartitions.PROPERTY_VALUE.equals(contentType))
@@ -309,7 +309,7 @@ public class PropertiesFileSourceViewerConfiguration extends TextSourceViewerCon
 			}
 		};
 
-		MonoReconciler reconciler= new MonoReconciler(strategy, true);
+		MonoReconciler reconciler= new MonoReconciler(strategy, false);
 		reconciler.setDelay(500);
 		return reconciler;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/BreakContinueTargetFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/BreakContinueTargetFinder.java
index 2f7e200..c382d49 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/BreakContinueTargetFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/BreakContinueTargetFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,12 +27,12 @@ import org.eclipse.jdt.core.dom.ForStatement;
 import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.LabeledStatement;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SwitchStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.dom.TokenScanner;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ExceptionOccurrencesFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ExceptionOccurrencesFinder.java
index c4bf823..f95ebfb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ExceptionOccurrencesFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ExceptionOccurrencesFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
@@ -41,7 +42,6 @@ import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ImplementOccurrencesFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ImplementOccurrencesFinder.java
index 21b17b1..35931e0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ImplementOccurrencesFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/ImplementOccurrencesFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
 import org.eclipse.jdt.core.dom.Type;
@@ -31,7 +32,6 @@ import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaMatchFilter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaMatchFilter.java
index 4d6f23f..f240b05 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaMatchFilter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaMatchFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,9 +43,10 @@ abstract class JavaMatchFilter extends MatchFilter {
 	public abstract boolean filters(JavaElementMatch match);
 
 	/**
-	 * Returns whether this filter is applicable for this query
-	 * @param query
-	 * @return returns <code>true</code> if this match filter is applicable for the given query
+	 * Returns whether this filter is applicable for this query.
+	 * 
+	 * @param query the query
+	 * @return <code>true</code> if this match filter is applicable for the given query
 	 */
 	public abstract boolean isApplicable(JavaSearchQuery query);
 
@@ -63,7 +64,7 @@ abstract class JavaMatchFilter extends MatchFilter {
 
 	public static MatchFilter[] getLastUsedFilters() {
 		String string= JavaPlugin.getDefault().getDialogSettings().get(SETTINGS_LAST_USED_FILTERS);
-		if (string != null && string.length() > 0) {
+		if (string != null) {
 			return decodeFiltersString(string);
 		}
 		return getDefaultFilters();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
index 08a239e..57d218c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -368,6 +368,10 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 		if (searchFor != FIELD && (limitTo == READ_ACCESSES || limitTo == WRITE_ACCESSES)) {
 			limitTo= REFERENCES;
 		}
+		
+		if (searchFor != TYPE /*&& searchFor != FIELD*/ && searchFor != METHOD && limitTo == SPECIFIC_REFERENCES) {
+			limitTo= REFERENCES;
+		}
 		fillLimitToGroup(searchFor, limitTo);
 		return limitTo;
 	}
@@ -501,7 +505,7 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 
 		Composite result= new Composite(parent, SWT.NONE);
 
-		GridLayout layout= new GridLayout(2, false);
+		GridLayout layout= new GridLayout(2, true);
 		layout.horizontalSpacing= 10;
 		result.setLayout(layout);
 
@@ -617,8 +621,9 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 	}
 
 	final void updateOKStatus() {
-		boolean isValid= isValidSearchPattern();
-		getContainer().setPerformActionEnabled(isValid);
+		boolean isValidPattern= isValidSearchPattern();
+		boolean isValidMask= getIncludeMask() != 0;
+		getContainer().setPerformActionEnabled(isValidPattern && isValidMask);
 	}
 
 	private boolean isValidSearchPattern() {
@@ -733,6 +738,12 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 		if (searchFor == FIELD) {
 			buttons.add(createButton(fLimitToGroup, SWT.RADIO, SearchMessages.SearchPage_limitTo_readReferences, READ_ACCESSES, limitTo == READ_ACCESSES));
 			buttons.add(createButton(fLimitToGroup, SWT.RADIO, SearchMessages.SearchPage_limitTo_writeReferences, WRITE_ACCESSES, limitTo == WRITE_ACCESSES));
+			
+//			buttons.add(createMethodLocationRadio(limitTo == SPECIFIC_REFERENCES));
+		}
+
+		if (searchFor == METHOD) {
+			buttons.add(createMethodLocationRadio(limitTo == SPECIFIC_REFERENCES));
 		}
 
 		fLimitTo= (Button[]) buttons.toArray(new Button[buttons.size()]);
@@ -748,6 +759,8 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 		Dialog.applyDialogFont(fLimitToGroup); // re-apply font as we disposed the previous widgets
 
 		fLimitToGroup.layout();
+//		// searchFor == FIELD needs one more row than the others
+//		fLimitToGroup.getShell().layout(new Control[] { fLimitToGroup.getChildren()[0] });
 	}
 
 
@@ -824,6 +837,16 @@ public class JavaSearchPage extends DialogPage implements ISearchPage {
 			createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_jre, JavaSearchScopeFactory.JRE, false),
 			createButton(result, SWT.CHECK, SearchMessages.SearchPage_searchIn_libraries, JavaSearchScopeFactory.LIBS, true),
 		};
+
+		SelectionAdapter listener= new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateOKStatus();
+			}
+		};
+		for (int i= 0; i < fIncludeMasks.length; i++) {
+			fIncludeMasks[i].addSelectionListener(listener);
+		}
+
 		return result;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPageScoreComputer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPageScoreComputer.java
index 1b42148..91b2295 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPageScoreComputer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPageScoreComputer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,10 +10,14 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.search;
 
+import org.eclipse.ui.IEditorInput;
+
 import org.eclipse.search.ui.ISearchPageScoreComputer;
 
 import org.eclipse.jdt.core.IJavaElement;
 
+import org.eclipse.jdt.ui.JavaUI;
+
 import org.eclipse.jdt.internal.ui.browsing.LogicalPackage;
 import org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput;
 
@@ -24,7 +28,8 @@ public class JavaSearchPageScoreComputer implements ISearchPageScoreComputer {
 			// Can't decide
 			return ISearchPageScoreComputer.UNKNOWN;
 
-		if (element instanceof IJavaElement || element instanceof IClassFileEditorInput || element instanceof LogicalPackage)
+		if (element instanceof IJavaElement || element instanceof IClassFileEditorInput || element instanceof LogicalPackage
+				|| (element instanceof IEditorInput && JavaUI.getEditorInputJavaElement((IEditorInput)element) != null))
 			return 90;
 
 		return ISearchPageScoreComputer.LOWEST;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
index 54d430f..120d17c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,6 @@ import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.dialogs.PreferencesUtil;
@@ -87,6 +86,7 @@ import org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
 import org.eclipse.jdt.internal.ui.viewsupport.ProblemTableViewer;
 import org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer;
 
+
 public class JavaSearchResultPage extends AbstractTextSearchViewPage implements IAdaptable {
 
 	public static class DecoratorIgnoringViewerSorter extends ViewerComparator {
@@ -151,7 +151,7 @@ public class JavaSearchResultPage extends AbstractTextSearchViewPage implements
 
 	private int fCurrentGrouping;
 
-	private static final String[] SHOW_IN_TARGETS= new String[] { JavaUI.ID_PACKAGES , IPageLayout.ID_RES_NAV };
+	private static final String[] SHOW_IN_TARGETS= new String[] { JavaUI.ID_PACKAGES , JavaPlugin.ID_RES_NAV };
 	public static final IShowInTargetList SHOW_IN_TARGET_LIST= new IShowInTargetList() {
 		public String[] getShowInTargetIds() {
 			return SHOW_IN_TARGETS;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/LevelTreeContentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/LevelTreeContentProvider.java
index 5e25840..7b1b1b3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/LevelTreeContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/LevelTreeContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Carsten Pfeiffer <carsten.pfeiffer at gebit.de> - [search] Custom search results not shown hierarchically in the java search results view - https://bugs.eclipse.org/bugs/show_bug.cgi?id=303705
  *******************************************************************************/
 
 package org.eclipse.jdt.internal.ui.search;
@@ -17,6 +18,8 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
+import org.eclipse.core.runtime.IAdaptable;
+
 import org.eclipse.core.resources.IResource;
 
 import org.eclipse.jface.viewers.AbstractTreeViewer;
@@ -56,7 +59,20 @@ public class LevelTreeContentProvider extends JavaSearchContentProvider implemen
 	private int fCurrentLevel;
 	static class FastJavaElementProvider extends StandardJavaElementContentProvider {
 		public Object getParent(Object element) {
-			return internalGetParent(element);
+			Object parent= internalGetParent(element);
+			if (parent == null && element instanceof IAdaptable) {
+				IAdaptable adaptable = (IAdaptable)element;
+				Object javaElement= adaptable.getAdapter(IJavaElement.class);
+				if (javaElement != null) {
+					parent= internalGetParent(javaElement);
+				} else {
+					Object resource= adaptable.getAdapter(IResource.class);
+					if (resource != null) {
+						parent= internalGetParent(resource);
+					}
+				}
+			}
+			return parent;
 		}
 	}
 
@@ -179,8 +195,10 @@ public class LevelTreeContentProvider extends JavaSearchContentProvider implemen
 	}
 
 	/**
-	 * @param element
-	 * @param parent
+	 * Tries to remove the given element from the list of stored siblings.
+	 * 
+	 * @param element potential child
+	 * @param parent potential parent
 	 * @return returns true if it really was a remove (i.e. element was a child of parent).
 	 */
 	private boolean removeFromSiblings(Object element, Object parent) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MatchLocations.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MatchLocations.java
index 1db45aa..acb0683 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MatchLocations.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MatchLocations.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,7 +125,9 @@ public class MatchLocations {
 		private void createMethodFieldMatchLocationsControls(Composite contents) {
 
 			Composite composite= new Composite(contents, SWT.NONE);
-			composite.setLayoutData(new GridData(SWT.LEFT, SWT.BEGINNING, true, true, 2, 1));
+			GridData gd= new GridData(SWT.LEFT, SWT.BEGINNING, true, true, 2, 1);
+			gd.minimumWidth= convertHorizontalDLUsToPixels(200);
+			composite.setLayoutData(gd);
 			GridLayout blayout= new GridLayout(1, false);
 			blayout.marginWidth= 0;
 			blayout.marginHeight= 0;
@@ -144,15 +146,17 @@ public class MatchLocations {
 			group.setLayout(new GridLayout(1, false));
 			group.setText(SearchMessages.MatchLocations_declaration_group_label);
 
-			int superTypes= IJavaSearchConstants.SUPERTYPE_TYPE_REFERENCE;
-			createButton(group, SearchMessages.MatchLocations_super_types_label, superTypes);
+			createButton(group, SearchMessages.MatchLocations_imports_label, IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE);
+			createButton(group, SearchMessages.MatchLocations_super_types_label, IJavaSearchConstants.SUPERTYPE_TYPE_REFERENCE);
 			addSeparator(group);
+			
 			createButton(group, SearchMessages.MatchLocations_annotations_label , IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE);
 			addSeparator(group);
 
 			createButton(group, SearchMessages.MatchLocations_field_types_label, IJavaSearchConstants.FIELD_DECLARATION_TYPE_REFERENCE);
 			createButton(group, SearchMessages.MatchLocations_local_types_label, IJavaSearchConstants.LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE);
 			addSeparator(group);
+			
 			createButton(group, SearchMessages.MatchLocations_method_types_label, IJavaSearchConstants.RETURN_TYPE_REFERENCE);
 			createButton(group, SearchMessages.MatchLocations_parameter_types_label, IJavaSearchConstants.PARAMETER_DECLARATION_TYPE_REFERENCE);
 			createButton(group, SearchMessages.MatchLocations_thrown_exceptions_label, IJavaSearchConstants.THROWS_CLAUSE_TYPE_REFERENCE);
@@ -168,7 +172,7 @@ public class MatchLocations {
 			createButton(ptGroup, SearchMessages.MatchLocations_type_arguments_label, IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE);
 
 			Group statementGroup= new Group(contents, SWT.NONE);
-			statementGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+			statementGroup.setLayoutData(new GridData(SWT.FILL, SWT.END, true, false));
 			statementGroup.setLayout(new GridLayout(1, false));
 			statementGroup.setText(SearchMessages.MatchLocations_expression_group_label);
 
@@ -254,6 +258,9 @@ public class MatchLocations {
 			return SearchMessages.MatchLocations_match_locations_description;
 		}
 		ArrayList args= new ArrayList(3);
+		if (isSet(locations, IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE)) {
+			args.add(SearchMessages.MatchLocations_imports_description);
+		}
 		if (isSet(locations, IJavaSearchConstants.SUPERTYPE_TYPE_REFERENCE)) {
 			args.add(SearchMessages.MatchLocations_super_types_description);
 		}
@@ -327,7 +334,7 @@ public class MatchLocations {
 
 	public static int getTotalNumberOfSettings(int searchFor) {
 		if (searchFor == IJavaSearchConstants.TYPE) {
-			return 14;
+			return 15;
 		} else if (searchFor == IJavaSearchConstants.METHOD || searchFor == IJavaSearchConstants.FIELD) {
 			return 4;
 		}
@@ -338,6 +345,9 @@ public class MatchLocations {
 		int count= 0;
 		if (searchFor == IJavaSearchConstants.TYPE) {
 
+			if (isSet(locations, IJavaSearchConstants.IMPORT_DECLARATION_TYPE_REFERENCE)) {
+				count++;
+			}
 			if (isSet(locations, IJavaSearchConstants.SUPERTYPE_TYPE_REFERENCE)) {
 				count++;
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MethodExitsFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MethodExitsFinder.java
index e468fc0..1b6f72a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MethodExitsFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/MethodExitsFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.Statement;
@@ -43,7 +44,6 @@ import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.dom.LocalVariableIndex;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.code.flow.FlowContext;
 import org.eclipse.jdt.internal.corext.refactoring.code.flow.FlowInfo;
 import org.eclipse.jdt.internal.corext.refactoring.code.flow.InOutFlowAnalyzer;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesFinder.java
index 306ce3f..d726e9b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/OccurrencesFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.jdt.core.dom.ImportDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.ParameterizedType;
 import org.eclipse.jdt.core.dom.PostfixExpression;
 import org.eclipse.jdt.core.dom.PrefixExpression;
@@ -44,7 +45,6 @@ import org.eclipse.jdt.core.dom.PrefixExpression.Operator;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.java
index ef59805..40a8269 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -285,6 +285,8 @@ public final class SearchMessages extends NLS {
 	public static String MatchLocations_implicit_this_description;
 	public static String MatchLocations_implicit_this_label;
 
+	public static String MatchLocations_imports_description;
+	public static String MatchLocations_imports_label;
 	public static String MatchLocations_local_types_description;
 	public static String MatchLocations_local_types_label;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.properties
index c512a5f..7c02d3c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/SearchMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ Search_Error_search_title=Search Error
 Search_Error_search_message=The search operation has reported problems
 Search_Error_search_notsuccessful_message=The search operation has reported problems
 Search_Error_javaElementAccess_title=Search Error
-Search_Error_javaElementAccess_message=An error occurred while accessing a Java element
+Search_Error_javaElementAccess_message=An error occurred while accessing a Java element.
 
 Search_Error_search_notsuccessful_title=Search
 
@@ -247,7 +247,7 @@ JavaSearchScopeFactory_undefined_projects=empty scope
 JavaSearchQuery_singularReferencesWithMatchLocations=''{0}'' in ''{2}'' - 1 reference in {1}
 JavaSearchQuery_status_ok_message=Found {0} matches.
 
-JavaSearchQuery_error_participant_estimate=An error occurred while estimating progress data
+JavaSearchQuery_error_participant_estimate=An error occurred while estimating progress data.
 JavaSearchScopeFactory_undefined_selection=empty scope
 JavaSearchQuery_error_element_does_not_exist=Element ''{0}'' does not exist anymore
 JavaSearchScopeFactory_undefined_workingsets=empty scope
@@ -324,7 +324,9 @@ MatchLocations_class_instance_label=Class &instance creations
 MatchLocations_expression_group_label=In expressions
 MatchLocations_field_types_description=field types
 MatchLocations_implicit_this_description=implicit this reference
-MatchLocations_implicit_this_label=Implicit this references
+MatchLocations_implicit_this_label=&Implicit 'this' references
+MatchLocations_imports_description=imports
+MatchLocations_imports_label=I&mports
 MatchLocations_local_types_description=local variable types
 MatchLocations_local_types_label=&Local variable types
 
@@ -345,13 +347,13 @@ MatchLocations_method_types_label=Method &return types
 MatchLocations_parameter_types_description=parameter types
 MatchLocations_parameter_types_label=Method &parameter types
 MatchLocations_qualified_description=qualified reference
-MatchLocations_qualified_label=Qualified references
-MatchLocations_super_description=super reference
-MatchLocations_super_label=Super references
+MatchLocations_qualified_label=&Qualified references
+MatchLocations_super_description=super references
+MatchLocations_super_label='s&uper' references
 MatchLocations_super_types_description=super type declarations
 MatchLocations_super_types_label=Super &type declarations
-MatchLocations_this_description=this reference
-MatchLocations_this_label=This reference
+MatchLocations_this_description=this references
+MatchLocations_this_label='&this' references
 MatchLocations_thrown_exceptions_description=thrown exceptions
 MatchLocations_thrown_exceptions_label=Thrown e&xception declarations
 MatchLocations_type_arguments_description=type arguments
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaWordFinder.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaWordFinder.java
index 85f4696..ed33e9e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaWordFinder.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaWordFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 package org.eclipse.jdt.internal.ui.text;
 
 
+import com.ibm.icu.text.UTF16;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -29,8 +31,20 @@ public class JavaWordFinder {
 
 			while (pos >= 0) {
 				c= document.getChar(pos);
-				if (!Character.isJavaIdentifierPart(c))
-					break;
+				if (!Character.isJavaIdentifierPart(c)) {
+					// Check for surrogates
+					if (UTF16.isSurrogate(c)) {
+						/*
+						 * XXX: Here we should create the code point and test whether
+						 * it is a Java identifier part. Currently this is not possible
+						 * because java.lang.Character in 1.4 does not support surrogates
+						 * and because com.ibm.icu.lang.UCharacter.isJavaIdentifierPart(int)
+						 * is not correctly implemented.
+						 */
+					} else {
+						break;
+					}
+				}
 				--pos;
 			}
 			start= pos;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.java
index 91ad7ca..bee9d4c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,10 +23,6 @@ final class TextMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String AbstractInformationControl_viewMenu_toolTipText;
-	public static String AbstractInformationControl_viewMenu_move_label;
-	public static String AbstractInformationControl_viewMenu_resize_label;
-	public static String AbstractInformationControl_viewMenu_remember_label;
 	public static String JavaOutlineInformationControl_SortByDefiningTypeAction_label;
 	public static String JavaOutlineInformationControl_SortByDefiningTypeAction_tooltip;
 	public static String JavaOutlineInformationControl_SortByDefiningTypeAction_description;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.properties
index 736411b..8155b0e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/TextMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,11 +10,6 @@
 ###############################################################################
 
 
-AbstractInformationControl_viewMenu_toolTipText= Menu
-AbstractInformationControl_viewMenu_move_label= &Move
-AbstractInformationControl_viewMenu_resize_label= &Resize
-AbstractInformationControl_viewMenu_remember_label= R&emember Size and Location
-
 JavaOutlineInformationControl_SortByDefiningTypeAction_label= Sort by the Defining &Type
 JavaOutlineInformationControl_SortByDefiningTypeAction_tooltip= Sort Members by the Defining Type
 JavaOutlineInformationControl_SortByDefiningTypeAction_description= Sort members by the defining type
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
index 7ce98bf..0e2d0a5 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
@@ -940,8 +940,13 @@ public class ASTResolving {
 		res.add(type);
 		if (type.isArray()) {
 			res.add(ast.resolveWellKnownType("java.lang.Object")); //$NON-NLS-1$
-			res.add(ast.resolveWellKnownType("java.io.Serializable")); //$NON-NLS-1$
-			res.add(ast.resolveWellKnownType("java.lang.Cloneable")); //$NON-NLS-1$
+			// The following two types are not available in some j2me implementations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=288060 :
+			ITypeBinding serializable= ast.resolveWellKnownType("java.io.Serializable"); //$NON-NLS-1$
+			if (serializable != null)
+				res.add(serializable);
+			ITypeBinding cloneable= ast.resolveWellKnownType("java.lang.Cloneable"); //$NON-NLS-1$
+			if (cloneable != null)
+				res.add(cloneable);
 		} else if (type.isPrimitive()) {
 			Code code= PrimitiveType.toCode(type.getName());
 			boolean found= false;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java
index 1454a83..43417d0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AdvancedQuickAssistProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.IfStatement;
 import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.InfixExpression.Operator;
 import org.eclipse.jdt.core.dom.InstanceofExpression;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
@@ -71,11 +72,12 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
-import org.eclipse.jdt.core.dom.InfixExpression.Operator;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
@@ -87,7 +89,6 @@ import org.eclipse.jdt.internal.corext.refactoring.code.OperatorPrecedence;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
-import org.eclipse.jdt.ui.CodeStyleConfiguration;
 import org.eclipse.jdt.ui.cleanup.CleanUpOptions;
 import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
@@ -138,7 +139,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		if (coveringNode != null) {
 			ArrayList coveredNodes= getFullyCoveredNodes(context, coveringNode);
 			ArrayList resultingCollections= new ArrayList();
-			if (noErrorsAtLocation(locations)) {
+			if (QuickAssistProcessor.noErrorsAtLocation(locations)) {
 				getInverseIfProposals(context, coveringNode, resultingCollections);
 				getIfReturnIntoIfElseAtEndOfVoidMethodProposals(context, coveringNode, resultingCollections);
 				getInverseIfContinueIntoIfThenInLoopsProposals(context, coveringNode, resultingCollections);
@@ -170,17 +171,6 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		return null;
 	}
 
-	private static boolean noErrorsAtLocation(IProblemLocation[] locations) {
-		if (locations != null) {
-			for (int i= 0; i < locations.length; i++) {
-				if (locations[i].isError()) {
-					return false;
-				}
-			}
-		}
-		return true;
-	}
-
 	private static boolean getIfReturnIntoIfElseAtEndOfVoidMethodProposals(IInvocationContext context, ASTNode covering, Collection resultingCollections) {
 		if (!(covering instanceof IfStatement)) {
 			return false;
@@ -265,7 +255,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		Statement elseStatement= ifStatement.getElseStatement();
 
 		// prepare original nodes
-		Expression inversedExpression= getInversedBooleanExpression(rewrite, ifStatement.getExpression());
+		Expression inversedExpression= getInversedExpression(rewrite, ifStatement.getExpression());
 
 		Statement newElseStatement= (Statement) rewrite.createMoveTarget(thenStatement);
 		Statement newThenStatement= (Statement) rewrite.createMoveTarget(elseStatement);
@@ -315,7 +305,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		AST ast= covering.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 		// create inverted 'if' statement
-		Expression inversedExpression= getInversedBooleanExpression(rewrite, ifStatement.getExpression());
+		Expression inversedExpression= getInversedExpression(rewrite, ifStatement.getExpression());
 		IfStatement newIf= ast.newIfStatement();
 		newIf.setExpression(inversedExpression);
 		// prepare 'then' for new 'if'
@@ -367,7 +357,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		AST ast= covering.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 		// create inverted 'if' statement
-		Expression inversedExpression= getInversedBooleanExpression(rewrite, ifStatement.getExpression());
+		Expression inversedExpression= getInversedExpression(rewrite, ifStatement.getExpression());
 		IfStatement newIf= ast.newIfStatement();
 		newIf.setExpression(inversedExpression);
 		newIf.setThenStatement(ast.newContinueStatement());
@@ -430,7 +420,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 			ASTNode covered= (ASTNode) iter.next();
 			Expression coveredExpression= getBooleanExpression(covered);
 			if (coveredExpression != null) {
-				Expression inversedExpression= getInversedBooleanExpression(rewrite, coveredExpression);
+				Expression inversedExpression= getInversedExpression(rewrite, coveredExpression);
 				rewrite.replace(coveredExpression, inversedExpression, null);
 				hasChanges= true;
 			}
@@ -450,8 +440,8 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		return true;
 	}
 
-	private static Expression getInversedBooleanExpression(ASTRewrite rewrite, Expression expression) {
-		return getInversedBooleanExpression(rewrite, expression, null);
+	private static Expression getInversedExpression(ASTRewrite rewrite, Expression expression) {
+		return getInversedExpression(rewrite, expression, null);
 	}
 	private interface SimpleNameRenameProvider {
 		SimpleName getRenamed(SimpleName name);
@@ -470,10 +460,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		return (Expression) rewrite.createCopyTarget(expression);
 	}
 
-	private static Expression getInversedBooleanExpression(ASTRewrite rewrite, Expression expression, SimpleNameRenameProvider provider) {
-		if (!isBoolean(expression)) {
-			return (Expression) rewrite.createCopyTarget(expression);
-		}
+	private static Expression getInversedExpression(ASTRewrite rewrite, Expression expression, SimpleNameRenameProvider provider) {
 		AST ast= rewrite.getAST();
 		//
 		if (expression instanceof BooleanLiteral) {
@@ -483,22 +470,22 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 			InfixExpression infixExpression= (InfixExpression) expression;
 			InfixExpression.Operator operator= infixExpression.getOperator();
 			if (operator == InfixExpression.Operator.LESS) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.GREATER_EQUALS, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.GREATER_EQUALS, provider);
 			}
 			if (operator == InfixExpression.Operator.GREATER) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.LESS_EQUALS, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.LESS_EQUALS, provider);
 			}
 			if (operator == InfixExpression.Operator.LESS_EQUALS) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.GREATER, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.GREATER, provider);
 			}
 			if (operator == InfixExpression.Operator.GREATER_EQUALS) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.LESS, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.LESS, provider);
 			}
 			if (operator == InfixExpression.Operator.EQUALS) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.NOT_EQUALS, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.NOT_EQUALS, provider);
 			}
 			if (operator == InfixExpression.Operator.NOT_EQUALS) {
-				return getInversedInfixBooleanExpression(rewrite, infixExpression, InfixExpression.Operator.EQUALS, provider);
+				return getInversedInfixExpression(rewrite, infixExpression, InfixExpression.Operator.EQUALS, provider);
 			}
 			if (operator == InfixExpression.Operator.CONDITIONAL_AND) {
 				return getInversedAndOrExpression(rewrite, infixExpression, InfixExpression.Operator.CONDITIONAL_OR, provider);
@@ -534,10 +521,10 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 				innerExpression= ((ParenthesizedExpression) innerExpression).getExpression();
 			}
 			if (innerExpression instanceof InstanceofExpression) {
-				return getInversedBooleanExpression(rewrite, innerExpression, provider);
+				return getInversedExpression(rewrite, innerExpression, provider);
 			}
 			parenthesizedExpression= ast.newParenthesizedExpression();
-			parenthesizedExpression.setExpression(getInversedBooleanExpression(rewrite, innerExpression, provider));
+			parenthesizedExpression.setExpression(getInversedExpression(rewrite, innerExpression, provider));
 			return parenthesizedExpression;
 		}
 		//
@@ -548,14 +535,17 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 	}
 
 	private static boolean isBoolean(Expression expression) {
-		return expression.resolveTypeBinding() == expression.getAST().resolveWellKnownType("boolean"); //$NON-NLS-1$
+		ITypeBinding typeBinding= expression.resolveTypeBinding();
+		AST ast= expression.getAST();
+		return typeBinding == ast.resolveWellKnownType("boolean") //$NON-NLS-1$
+				|| typeBinding == ast.resolveWellKnownType("java.lang.Boolean"); //$NON-NLS-1$
 	}
 
-	private static Expression getInversedInfixBooleanExpression(ASTRewrite rewrite, InfixExpression expression, InfixExpression.Operator newOperator, SimpleNameRenameProvider provider) {
+	private static Expression getInversedInfixExpression(ASTRewrite rewrite, InfixExpression expression, InfixExpression.Operator newOperator, SimpleNameRenameProvider provider) {
 		InfixExpression newExpression= rewrite.getAST().newInfixExpression();
 		newExpression.setOperator(newOperator);
-		newExpression.setLeftOperand(getInversedBooleanExpression(rewrite, expression.getLeftOperand(), provider));
-		newExpression.setRightOperand(getInversedBooleanExpression(rewrite, expression.getRightOperand(), provider));
+		newExpression.setLeftOperand(getRenamedNameCopy(provider, rewrite, expression.getLeftOperand()));
+		newExpression.setRightOperand(getRenamedNameCopy(provider, rewrite, expression.getRightOperand()));
 		return newExpression;
 	}
 
@@ -572,16 +562,16 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 
 		int newOperatorPrecedence= OperatorPrecedence.getOperatorPrecedence(newOperator);
 		//
-		Expression leftOperand= getInversedBooleanExpression(rewrite, infixExpression.getLeftOperand(), provider);
+		Expression leftOperand= getInversedExpression(rewrite, infixExpression.getLeftOperand(), provider);
 		newExpression.setLeftOperand(parenthesizeIfRequired(leftOperand, newOperatorPrecedence));
 
-		Expression rightOperand= getInversedBooleanExpression(rewrite, infixExpression.getRightOperand(), provider);
+		Expression rightOperand= getInversedExpression(rewrite, infixExpression.getRightOperand(), provider);
 		newExpression.setRightOperand(parenthesizeIfRequired(rightOperand, newOperatorPrecedence));
 
 		List extraOperands= infixExpression.extendedOperands();
 		List newExtraOperands= newExpression.extendedOperands();
 		for (int i= 0; i < extraOperands.size(); i++) {
-			Expression extraOperand= getInversedBooleanExpression(rewrite, (Expression) extraOperands.get(i), provider);
+			Expression extraOperand= getInversedExpression(rewrite, (Expression) extraOperands.get(i), provider);
 			newExtraOperands.add(parenthesizeIfRequired(extraOperand, newOperatorPrecedence));
 		}
 		return newExpression;
@@ -1066,7 +1056,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 		// prepare new conditional expression
 		ConditionalExpression newExpression= ast.newConditionalExpression();
-		newExpression.setExpression(getInversedBooleanExpression(rewrite, expression.getExpression()));
+		newExpression.setExpression(getInversedExpression(rewrite, expression.getExpression()));
 		newExpression.setThenExpression((Expression) rewrite.createCopyTarget(expression.getElseExpression()));
 		newExpression.setElseExpression((Expression) rewrite.createCopyTarget(expression.getThenExpression()));
 		// replace old expression with new
@@ -1543,8 +1533,9 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 			ITypeBinding elseBinding= elseExpression.resolveTypeBinding();
 			if (thenBinding != null && elseBinding != null && exprBinding != null && !elseBinding.isAssignmentCompatible(thenBinding)) {
 				CastExpression castException= ast.newCastExpression();
-				proposal.createImportRewrite(context.getASTRoot());
-				castException.setType(proposal.getImportRewrite().addImport(exprBinding, ast));
+				ImportRewrite importRewrite= proposal.createImportRewrite(context.getASTRoot());
+				ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(node, importRewrite);
+				castException.setType(importRewrite.addImport(exprBinding, ast, importRewriteContext));
 				castException.setExpression(elseCopy);
 				elseCopy= castException;
 			}
@@ -1762,7 +1753,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 						return null;
 					}
 				};
-				Expression inversedExpression= getInversedBooleanExpression(rewrite, expression, provider);
+				Expression inversedExpression= getInversedExpression(rewrite, expression, provider);
 				// if any name was not renamed during expression inverting, we can not already rename it, so fail to create assist
 				for (Iterator iter= overlapNames.iterator(); iter.hasNext();) {
 					Object o= iter.next();
@@ -1794,7 +1785,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 				VariableDeclarationFragment vdf= (VariableDeclarationFragment) name.getParent();
 				Expression expression= vdf.getInitializer();
 				if (expression != null) {
-					rewrite.replace(expression, getInversedBooleanExpression(rewrite, expression), null);
+					rewrite.replace(expression, getInversedExpression(rewrite, expression), null);
 				}
 				// set new name
 				rewrite.replace(name, newName, null);
@@ -1840,7 +1831,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		final AST ast= covering.getAST();
 		final ASTRewrite rewrite= ASTRewrite.create(ast);
 		// prepared inverted expression
-		Expression inversedExpression= getInversedBooleanExpression(rewrite, parenthesizedExpression.getExpression());
+		Expression inversedExpression= getInversedExpression(rewrite, parenthesizedExpression.getExpression());
 		// check, may be we should keep parentheses
 		boolean keepParentheses= false;
 		if (negationExpression.getParent() instanceof Expression) {
@@ -1916,7 +1907,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		AST ast= expression.getAST();
 		final ASTRewrite rewrite= ASTRewrite.create(ast);
 		// prepared inverted expression
-		Expression inversedExpression= getInversedBooleanExpression(rewrite, expression);
+		Expression inversedExpression= getInversedExpression(rewrite, expression);
 		// prepare ParenthesizedExpression
 		ParenthesizedExpression parenthesizedExpression= ast.newParenthesizedExpression();
 		parenthesizedExpression.setExpression(inversedExpression);
@@ -2010,7 +2001,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		//
 		final AST ast= covering.getAST();
 		final ASTRewrite rewrite= ASTRewrite.create(ast);
-		final ImportRewrite importRewrite= CodeStyleConfiguration.createImportRewrite(context.getASTRoot(), true);
+		final ImportRewrite importRewrite= StubUtility.createImportRewrite(context.getASTRoot(), true);
 		//
 		SwitchStatement switchStatement= (SwitchStatement) covering;
 		IfStatement firstIfStatement= null;
@@ -2023,7 +2014,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		int caseCount= 0;
 
 		ArrayList allBlocks= new ArrayList();
-		//
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(ASTResolving.findParentBodyDeclaration(covering), importRewrite);
 		for (Iterator iter= switchStatement.statements().iterator(); iter.hasNext();) {
 			Statement statement= (Statement) iter.next();
 			if (statement instanceof SwitchCase) {
@@ -2049,7 +2040,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 					return false;
 				}
 				// prepare condition
-				InfixExpression switchCaseCondition= createSwitchCaseCondition(ast, rewrite, importRewrite, switchStatement, switchCase);
+				InfixExpression switchCaseCondition= createSwitchCaseCondition(ast, rewrite, importRewrite, importRewriteContext, switchStatement, switchCase);
 				if (currentCondition == null) {
 					currentCondition= switchCaseCondition;
 				} else {
@@ -2125,7 +2116,8 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		return true;
 	}
 
-	private static InfixExpression createSwitchCaseCondition(AST ast, ASTRewrite rewrite, ImportRewrite importRewrite, SwitchStatement switchStatement, SwitchCase switchCase) {
+	private static InfixExpression createSwitchCaseCondition(AST ast, ASTRewrite rewrite, ImportRewrite importRewrite, ImportRewriteContext importRewriteContext, SwitchStatement switchStatement,
+			SwitchCase switchCase) {
 		InfixExpression condition= ast.newInfixExpression();
 		condition.setOperator(InfixExpression.Operator.EQUALS);
 		//
@@ -2137,7 +2129,7 @@ public class AdvancedQuickAssistProcessor implements IQuickAssistProcessor {
 		if (expression instanceof SimpleName && ((SimpleName) expression).resolveBinding() instanceof IVariableBinding) {
 			IVariableBinding binding= (IVariableBinding) ((SimpleName) expression).resolveBinding();
 			if (binding.isEnumConstant()) {
-				String qualifiedName= importRewrite.addImport(binding.getDeclaringClass()) + '.' + binding.getName();
+				String qualifiedName= importRewrite.addImport(binding.getDeclaringClass(), importRewriteContext) + '.' + binding.getName();
 				rightExpression= ast.newName(qualifiedName);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssistContext.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssistContext.java
index 02d45e9..07ad4ca 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssistContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AssistContext.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.text.correction;
 
+import org.eclipse.core.runtime.Assert;
+
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.TextInvocationContext;
 
@@ -18,8 +20,7 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
-
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.NodeFinder;
 
 import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jdt.ui.text.java.IInvocationContext;
@@ -32,16 +33,22 @@ public class AssistContext extends TextInvocationContext implements IInvocationC
 
 	private CompilationUnit fASTRoot;
 	private final SharedASTProvider.WAIT_FLAG fWaitFlag;
+	/**
+	 * The cached node finder, can be null.
+	 * @since 3.6
+	 */
+	private NodeFinder fNodeFinder;
 
 
 	/*
 	 * @since 3.5
 	 */
-	public AssistContext(ICompilationUnit cu, ISourceViewer sourceViewer, IEditorPart editor, int offset, int length, SharedASTProvider.WAIT_FLAG waitFlag) {
+	private AssistContext(ICompilationUnit cu, ISourceViewer sourceViewer, IEditorPart editor, int offset, int length, SharedASTProvider.WAIT_FLAG waitFlag) {
 		super(sourceViewer, offset, length);
+		Assert.isLegal(cu != null);
+		Assert.isLegal(waitFlag != null);
 		fCompilationUnit= cu;
 		fEditor= editor;
-		fASTRoot= null;
 		fWaitFlag= waitFlag;
 	}
 	
@@ -130,18 +137,20 @@ public class AssistContext extends TextInvocationContext implements IInvocationC
 	 * @see org.eclipse.jdt.ui.text.java.IInvocationContext#getCoveringNode()
 	 */
 	public ASTNode getCoveringNode() {
-		NodeFinder finder= new NodeFinder(getOffset(), getLength());
-		getASTRoot().accept(finder);
-		return finder.getCoveringNode();
+		if (fNodeFinder == null) {
+			fNodeFinder= new NodeFinder(getASTRoot(), getOffset(), getLength());
+		}
+		return fNodeFinder.getCoveringNode();
 	}
 
 	/*(non-Javadoc)
 	 * @see org.eclipse.jdt.ui.text.java.IInvocationContext#getCoveredNode()
 	 */
 	public ASTNode getCoveredNode() {
-		NodeFinder finder= new NodeFinder(getOffset(), getLength());
-		getASTRoot().accept(finder);
-		return finder.getCoveredNode();
+		if (fNodeFinder == null) {
+			fNodeFinder= new NodeFinder(getASTRoot(), getOffset(), getLength());
+		}
+		return fNodeFinder.getCoveredNode();
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionCommandHandler.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionCommandHandler.java
index 2ffb81a..41cc6fd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionCommandHandler.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionCommandHandler.java
@@ -65,19 +65,31 @@ public class CorrectionCommandHandler extends AbstractHandler {
 	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
 	public Object execute(ExecutionEvent event) throws ExecutionException {
+		doExecute();
+		return null;
+	}
+
+	/**
+	 * Try to execute the correction command.
+	 * 
+	 * @return <code>true</code> iff the correction could be started
+	 * @since 3.6
+	 */
+	public boolean doExecute() {
 		ISelection selection= fEditor.getSelectionProvider().getSelection();
 		ICompilationUnit cu= JavaUI.getWorkingCopyManager().getWorkingCopy(fEditor.getEditorInput());
 		IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(fEditor.getEditorInput());
 		if (selection instanceof ITextSelection && cu != null && model != null) {
 			if (! ActionUtil.isEditable(fEditor)) {
-				return null;
+				return false;
 			}
 			ICompletionProposal proposal= findCorrection(fId, fIsAssist, (ITextSelection) selection, cu, model);
 			if (proposal != null) {
 				invokeProposal(proposal, ((ITextSelection) selection).getOffset());
+				return true;
 			}
 		}
-		return null;
+		return false;
 	}
 
 	private ICompletionProposal findCorrection(String id, boolean isAssist, ITextSelection selection, ICompilationUnit cu, IAnnotationModel model) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java
index b0c1e1b..9f1dbf1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,8 +45,6 @@ public final class CorrectionMessages extends NLS {
 	public static String QuickAssistProcessor_inline_local_description;
 	public static String QuickAssistProcessor_name_extension_from_class;
 	public static String QuickAssistProcessor_name_extension_from_interface;
-	public static String SelfEncapsulateFieldAction_dialog_cannot_perform;
-	public static String SelfEncapsulateFieldAction_dialog_title;
 	public static String SerialVersionHashOperation_computing_id;
 	public static String SerialVersionHashOperation_error_classnotfound;
 	public static String SerialVersionHashOperation_save_caption;
@@ -69,7 +67,6 @@ public final class CorrectionMessages extends NLS {
 	public static String ReorgCorrectionsSubProcessor_renamecu_description;
 	public static String ReorgCorrectionsSubProcessor_movecu_default_description;
 	public static String ReorgCorrectionsSubProcessor_movecu_description;
-	public static String ReorgCorrectionsSubProcessor_unusedimport_description;
 	public static String ReorgCorrectionsSubProcessor_organizeimports_description;
 	public static String ReorgCorrectionsSubProcessor_addcp_project_description;
 	public static String ReorgCorrectionsSubProcessor_addcp_archive_description;
@@ -86,15 +83,9 @@ public final class CorrectionMessages extends NLS {
 	public static String LocalCorrectionsSubProcessor_unnecessaryinstanceof_description;
 	public static String LocalCorrectionsSubProcessor_unnecessarythrow_description;
 	public static String LocalCorrectionsSubProcessor_classtointerface_description;
-	public static String LocalCorrectionsSubProcessor_unqualifiedfieldaccess_description;
 	public static String LocalCorrectionsSubProcessor_externalizestrings_description;
-	public static String LocalCorrectionsSubProcessor_externalizestrings_dialog_title;
 	public static String LocalCorrectionsSubProcessor_extendstoimplements_description;
-	public static String LocalCorrectionsSubProcessor_addnon_nls_description;
-	public static String LocalCorrectionsSubProcessor_changeaccesstostatic_description;
-	public static String LocalCorrectionsSubProcessor_changeaccesstostaticdefining_description;
 	public static String LocalCorrectionsSubProcessor_setparenteses_bitop_description;
-	public static String LocalCorrectionsSubProcessor_indirectaccesstostatic_description;
 	public static String LocalCorrectionsSubProcessor_uninitializedvariable_description;
 	public static String LocalCorrectionsSubProcessor_removesemicolon_description;
 	public static String LocalCorrectionsSubProcessor_removeunreachablecode_description;
@@ -108,7 +99,6 @@ public final class CorrectionMessages extends NLS {
 	public static String LocalCorrectionsSubProcessor_setparenteses_instanceof_description;
 	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments;
 	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments_description;
-	public static String TypeMismatchSubProcessor_0;
 	public static String TypeMismatchSubProcessor_addcast_description;
 	public static String TypeMismatchSubProcessor_changecast_description;
 	public static String TypeMismatchSubProcessor_changereturntype_description;
@@ -154,7 +144,8 @@ public final class CorrectionMessages extends NLS {
 	public static String TypeArgumentMismatchSubProcessor_removeTypeArguments;
 	public static String UnimplementedMethodsCorrectionProposal_description;
 	public static String UnimplementedMethodsCorrectionProposal_enum_info;
-	public static String UnimplementedMethodsCorrectionProposal_info;
+	public static String UnimplementedMethodsCorrectionProposal_info_singular;
+	public static String UnimplementedMethodsCorrectionProposal_info_plural;
 
 	public static String UnimplementedCodeFix_DependenciesErrorMessage;
 	public static String UnimplementedCodeFix_DependenciesStatusMessage;
@@ -263,7 +254,6 @@ public final class CorrectionMessages extends NLS {
 	public static String QuickAssistProcessor_invertequals_description;
 	public static String QuickAssistProcessor_typetoarrayInitializer_description;
 	public static String QuickAssistProcessor_createmethodinsuper_description;
-	public static String QuickAssistProcessor_forLoop_description;
 	public static String LinkedNamesAssistProposal_proposalinfo;
 	public static String LinkedNamesAssistProposal_description;
 	public static String QuickTemplateProcessor_surround_label;
@@ -302,10 +292,8 @@ public final class CorrectionMessages extends NLS {
 	public static String AdvancedQuickAssistProcessor_exchangeInnerAndOuterIfConditions_description;
 	public static String AdvancedQuickAssistProcessor_inverseConditions_description;
 	public static String AdvancedQuickAssistProcessor_inverseConditionalExpression_description;
-	public static String AdvancedQuickAssistProcessor_removeParenthesis_description;
 	public static String AdvancedQuickAssistProcessor_replaceIfWithConditional;
 	public static String AdvancedQuickAssistProcessor_replaceConditionalWithIf;
-	public static String AdvancedQuickAssistProcessor_addParethesis_description;
 	public static String AdvancedQuickAssistProcessor_joinWithOuter_description;
 	public static String AdvancedQuickAssistProcessor_joinWithInner_description;
 	public static String AdvancedQuickAssistProcessor_splitAndCondition_description;
@@ -319,8 +307,6 @@ public final class CorrectionMessages extends NLS {
 		NLS.initializeMessages(BUNDLE_NAME, CorrectionMessages.class);
 	}
 
-	public static String ModifierCorrectionSubProcessor_addoverrideannotation;
-	public static String ModifierCorrectionSubProcessor_adddeprecatedannotation;
 	public static String LocalCorrectionsSubProcessor_externalizestrings_additional_info;
 	public static String LocalCorrectionsSubProcessor_generate_hashCode_equals_additional_info;
 	public static String LocalCorrectionsSubProcessor_generate_hashCode_equals_description;
@@ -331,7 +317,6 @@ public final class CorrectionMessages extends NLS {
 	public static String ReorgCorrectionsSubProcessor_50_compliance_changeworkspace_description;
 	public static String ReorgCorrectionsSubProcessor_50_compliance_changeproject_description;
 	public static String GetterSetterCorrectionSubProcessor_creategetterunsingencapsulatefield_description;
-	public static String GetterSetterCorrectionSubProcessor_createsetterusingencapsulatefield_description;
 	public static String GetterSetterCorrectionSubProcessor_encapsulate_field_error_message;
 	public static String GetterSetterCorrectionSubProcessor_additional_info;
 	public static String GetterSetterCorrectionSubProcessor_encapsulate_field_error_title;
@@ -352,24 +337,22 @@ public final class CorrectionMessages extends NLS {
 	public static String ReorgCorrectionsSubProcessor_project_seup_fix_description;
 	public static String ReorgCorrectionsSubProcessor_project_seup_fix_info;
 	public static String UnresolvedElementsSubProcessor_change_full_type_description;
-	public static String LocalCorrectionsSubProcessor_remove_nls_tag_description;
+	public static String LocalCorrectionsSubProcessor_remove_allocated_description;
 	public static String LocalCorrectionsSubProcessor_remove_redundant_superinterface;
+	public static String LocalCorrectionsSubProcessor_return_allocated_description;
 	public static String LocalCorrectionsSubProcessor_qualify_left_hand_side_description;
 	public static String LocalCorrectionsSubProcessor_LocalCorrectionsSubProcessor_qualify_right_hand_side_description;
-	public static String CorrectionMessages_add_type_parameters_to_instantiation;
 	public static String UnresolvedElementsSubProcessor_UnresolvedElementsSubProcessor_changetoattribute_description;
 	public static String UnresolvedElementsSubProcessor_UnresolvedElementsSubProcessor_createattribute_description;
 	public static String MissingAnnotationAttributesProposal_add_missing_attributes_label;
 	public static String FixCorrectionProposal_ErrorAdditionalProposalInfo;
-	public static String FixCorrectionProposal_1;
 	public static String FixCorrectionProposal_MultiFixChange_label;
 	public static String FixCorrectionProposal_HitCtrlEnter_description;
 	public static String FixCorrectionProposal_hitCtrlEnter_variable_description;
-	public static String CorrectionMarkerResolutionGenerator__multiFixErrorDialog_Titel;
-	public static String CorrectionMarkerResolutionGenerator_multiFixErrorDialog_description;
 	public static String LocalCorrectionsSubProcessor_insert_break_statement;
 	public static String LocalCorrectionsSubProcessor_insert_fall_through;
 	public static String LocalCorrectionsSubProcessor_override_hashCode_description;
+	public static String LocalCorrectionsSubProcessor_throw_allocated_description;
 	public static String SuppressWarningsSubProcessor_fix_suppress_token_label;
 	public static String SuppressWarningsSubProcessor_remove_annotation_label;
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.properties
index 41dbe8e..511ae62 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ SerialVersionHashOperation_error_classnotfound=Could not find class file. Make s
 
 SerialVersionDefaultProposal_message_default_info=Adds a default serial version ID to the selected type.<p></p><p>Use this option to add a user-defined ID in combination with custom serialization code if the type did undergo structural changes since its first release.</p>
 SerialVersionHashProposal_message_generated_info=Adds a generated serial version ID to the selected type.<p></p><p>Use this option to add a compiler-generated ID if the type did not undergo structural changes since its first release.</p>
-SelfEncapsulateFieldAction_dialog_cannot_perform=
 
 SerialVersionHashOperation_computing_id=Computing serial version ID...
 SerialVersionHashOperation_save_caption=Quick Fix
@@ -33,8 +32,6 @@ CorrectPackageDeclarationProposal_name=Correct package declaration
 CorrectPackageDeclarationProposal_remove_description=Remove package declaration ''package {0}''
 CorrectPackageDeclarationProposal_add_description=Add package declaration ''{0};''
 CorrectPackageDeclarationProposal_change_description=Change package declaration to ''{0}''
-CorrectionMessages_add_type_parameters_to_instantiation=Add ''{0}'' to ''{1}'' instantiation
-CorrectionMarkerResolutionGenerator__multiFixErrorDialog_Titel=Error
 
 # ------ JavaCorrectionProcessor
 
@@ -51,7 +48,6 @@ ReorgCorrectionsSubProcessor_movecu_default_description=Move ''{0}'' to the defa
 ReorgCorrectionsSubProcessor_movecu_description=Move ''{0}'' to package ''{1}''
 ReorgCorrectionsSubProcessor_no_50jre_title=Change To 1.5 Quick Fix
 ReorgCorrectionsSubProcessor_no_50jre_message=The compiler compliance has been changed to 1.5, but no 1.5 JRE could be found in the installed JRE's. You have to manually set the correct JRE or add a new JRE in the preferences (Java - Installed JRE's).
-ReorgCorrectionsSubProcessor_unusedimport_description=Remove import
 ReorgCorrectionsSubProcessor_50_compliance_operation=Updating to new JRE
 ReorgCorrectionsSubProcessor_accessrules_description=Configure access rules...
 ReorgCorrectionsSubProcessor_organizeimports_description=Organize imports
@@ -81,23 +77,17 @@ LocalCorrectionsSubProcessor_addadditionalcatch_description=Add catch clause to
 LocalCorrectionsSubProcessor_unnecessaryinstanceof_description=Replace with null check
 LocalCorrectionsSubProcessor_unnecessarythrow_description=Remove thrown exception
 LocalCorrectionsSubProcessor_classtointerface_description=Change ''{0}'' to interface
-LocalCorrectionsSubProcessor_unqualifiedfieldaccess_description=Qualify with ''{0}''
 
 LocalCorrectionsSubProcessor_externalizestrings_description=Open the 'Externalize Strings' wizard
-LocalCorrectionsSubProcessor_externalizestrings_dialog_title=Externalize Strings
 LocalCorrectionsSubProcessor_extendstoimplements_description=Change 'extends' to 'implements'
-LocalCorrectionsSubProcessor_addnon_nls_description=Add '$NON-NLS$' tag
-LocalCorrectionsSubProcessor_changeaccesstostatic_description=Change access to static using ''{0}'' (instance type)
-LocalCorrectionsSubProcessor_changeaccesstostaticdefining_description=Change access to static using ''{0}'' (declaring type)
 LocalCorrectionsSubProcessor_LocalCorrectionsSubProcessor_qualify_right_hand_side_description=Qualify right hand side
 LocalCorrectionsSubProcessor_setparenteses_bitop_description=Put bit operations in parentheses
 LocalCorrectionsSubProcessor_externalizestrings_additional_info=Open the 'Externalize Strings' wizard
 LocalCorrectionsSubProcessor_generate_hashCode_equals_additional_info=Open the 'Generate hashCode() and equals()' wizard
 LocalCorrectionsSubProcessor_generate_hashCode_equals_description=Generate hashCode() and equals()...
-LocalCorrectionsSubProcessor_indirectaccesstostatic_description=Change static access to ''{0}''
 LocalCorrectionsSubProcessor_uninitializedvariable_description=Initialize variable
 LocalCorrectionsSubProcessor_removesemicolon_description=Remove semicolon
-LocalCorrectionsSubProcessor_remove_nls_tag_description=Remove '$NON-NLS$' tag
+LocalCorrectionsSubProcessor_remove_allocated_description=Remove
 LocalCorrectionsSubProcessor_remove_redundant_superinterface=Remove super interface
 LocalCorrectionsSubProcessor_renaming_duplicate_method=Rename method ''{0}''
 LocalCorrectionsSubProcessor_removeunreachablecode_description=Remove
@@ -117,7 +107,8 @@ LocalCorrectionsSubProcessor_override_hashCode_description=Override hashCode()
 LocalCorrectionsSubProcessor_setparenteses_instanceof_description=Put 'instanceof' in parentheses
 LocalCorrectionsSubProcessor_qualify_left_hand_side_description=Qualify left hand side
 LocalCorrectionsSubProcessor_replacefieldaccesswithmethod_description=Replace with ''{0}''
-TypeMismatchSubProcessor_0=boolean
+LocalCorrectionsSubProcessor_return_allocated_description=Return the allocated object
+LocalCorrectionsSubProcessor_throw_allocated_description=Throw the allocated object
 TypeMismatchSubProcessor_addcast_description=Add cast to ''{0}''
 TypeMismatchSubProcessor_changecast_description=Change cast to ''{0}''
 TypeMismatchSubProcessor_changereturntype_description=Change method return type to ''{0}''
@@ -127,7 +118,7 @@ TypeMismatchSubProcessor_removeexceptions_description=Remove exceptions from ''{
 TypeArgumentMismatchSubProcessor_removeTypeArguments=Remove type arguments
 TypeMismatchSubProcessor_addexceptions_description=Add exceptions to ''{0}.{1}(..)''
 TypeMismatchSubProcessor_incompatible_for_each_type_description=Change type of ''{0}'' to ''{1}''
-TypeMismatchSubProcessor_insertnullcheck_description=Insert null check
+TypeMismatchSubProcessor_insertnullcheck_description=Insert '!= null' check
 
 RemoveDeclarationCorrectionProposal_removeunusedfield_description=Remove declaration of ''{0}'' and assignments without possible side effects
 RemoveDeclarationCorrectionProposal_removeunusedmethod_description=Remove method ''{0}''
@@ -138,7 +129,7 @@ RenameRefactoringProposal_additionalInfo=Start the Rename refactoring
 RenameRefactoringProposal_name=Rename in workspace
 
 ModifierCorrectionSubProcessor_changemodifiertostatic_description=Change modifier of ''{0}'' to ''static''
-ModifierCorrectionSubProcessor_changemodifiertostaticfinal_description=Change modfier to 'static final'
+ModifierCorrectionSubProcessor_changemodifiertostaticfinal_description=Change modifier to 'static final'
 ModifierCorrectionSubProcessor_changemodifiertononstatic_description=Remove ''static'' modifier of ''{0}''
 ModifierCorrectionSubProcessor_changemodifiertofinal_description=Change modifier of ''{0}'' to final
 ModifierCorrectionSubProcessor_addstatictoparenttype_description=Add 'static' modifier to parent type
@@ -154,8 +145,6 @@ ModifierCorrectionSubProcessor_removebody_description=Remove method body
 ModifierCorrectionSubProcessor_remove_override=Remove '@Override' annotation
 ModifierCorrectionSubProcessor_default=default
 ModifierCorrectionSubProcessor_addabstract_description=Make type ''{0}'' abstract
-ModifierCorrectionSubProcessor_addoverrideannotation=Add '@Override' annotation
-ModifierCorrectionSubProcessor_adddeprecatedannotation=Add '@Deprecated' annotation
 SuppressWarningsSubProcessor_suppress_warnings_label=Add @SuppressWarnings ''{0}'' to ''{1}''
 ModifierCorrectionSubProcessor_removenative_description=Remove 'native' modifier
 ModifierCorrectionSubProcessor_removefinal_description=Remove 'final' modifier
@@ -283,7 +272,8 @@ NewCUCompletionUsingWizardProposal_createannotation_info=Opens the new annotatio
 
 UnimplementedMethodsCorrectionProposal_description=Add unimplemented methods
 UnimplementedMethodsCorrectionProposal_enum_info=Adding all method required in enum constant declarations.
-UnimplementedMethodsCorrectionProposal_info={0} method(s) to implement:
+UnimplementedMethodsCorrectionProposal_info_singular=1 method to implement:
+UnimplementedMethodsCorrectionProposal_info_plural={0} methods to implement:
 
 UnimplementedCodeFix_DependenciesErrorMessage=The quick fix could not resolve the error.
 UnimplementedCodeFix_DependenciesStatusMessage=Can not implement the missing methods, either due to compile errors or the projects build path does not resolve all dependencies.
@@ -335,8 +325,6 @@ QuickAssistProcessor_convert_to_message_format=Use 'MessageFormat' for string co
 QuickAssistProcessor_convert_to_string_buffer_description=Use ''{0}'' for string concatenation
 QuickAssistProcessor_createmethodinsuper_description=Create ''{1}()'' in super type ''{0}''
 
-QuickAssistProcessor_forLoop_description=Convert to enhanced for loop
-
 LinkedNamesAssistProposal_proposalinfo=Link all references for a local rename (does not change references in other files)
 LinkedNamesAssistProposal_description=Rename in file
 
@@ -378,10 +366,8 @@ AdvancedQuickAssistProcessor_inverseIfToContinue_description=Invert 'if' stateme
 AdvancedQuickAssistProcessor_exchangeInnerAndOuterIfConditions_description=Exchange conditions for inner and outer 'if' statements
 AdvancedQuickAssistProcessor_inverseConditions_description=Invert conditions
 AdvancedQuickAssistProcessor_inverseConditionalExpression_description=Invert conditional expression
-AdvancedQuickAssistProcessor_removeParenthesis_description=Remove extra parenthesis
 AdvancedQuickAssistProcessor_replaceIfWithConditional=Replace 'if-else' with conditional ('c ? x : y') 
 AdvancedQuickAssistProcessor_replaceConditionalWithIf=Replace conditional with 'if-else'
-AdvancedQuickAssistProcessor_addParethesis_description=Add paranoiac parenthesis for conditions
 AdvancedQuickAssistProcessor_joinWithOuter_description=Join 'if' statement with outer 'if' statement
 AdvancedQuickAssistProcessor_joinWithInner_description=Join 'if' statement with inner 'if' statement
 AdvancedQuickAssistProcessor_splitAndCondition_description=Split && condition
@@ -391,7 +377,6 @@ AdvancedQuickAssistProcessor_exchangeOperands_description=Exchange left and righ
 
 AddTypeParameterProposal_method_label=Add type parameter ''{0}'' to ''{1}''
 AddTypeParameterProposal_type_label=Add type parameter ''{0}'' to ''{1}''
-FixCorrectionProposal_1=The proposal did not change anything
 FixCorrectionProposal_MultiFixChange_label=Multi Fix
 
 FixCorrectionProposal_ErrorAdditionalProposalInfo=Error: 
@@ -399,11 +384,7 @@ FixCorrectionProposal_HitCtrlEnter_description=Press 'Ctrl+Enter' to fix all pro
 FixCorrectionProposal_hitCtrlEnter_variable_description=Press ''Ctrl+Enter'' to fix {0} problems of same category in file
 FixCorrectionProposal_WarningAdditionalProposalInfo=Warning: 
 
-CorrectionMarkerResolutionGenerator_multiFixErrorDialog_description=A problem occurred while applying the quick fixes.
-
 SuppressWarningsSubProcessor_fix_suppress_token_label=Change to ''{0}''
 SuppressWarningsSubProcessor_remove_annotation_label=Remove ''{0}'' token 
 ModifierCorrectionSubProcessor_changefieldmodifiertononstatic_description=Remove ''static'' modifier of ''{0}''
 GetterSetterCorrectionSubProcessor_creategetterunsingencapsulatefield_description=Create getter and setter for ''{0}''
-GetterSetterCorrectionSubProcessor_createsetterusingencapsulatefield_description=Create setter for ''{0}''
-SelfEncapsulateFieldAction_dialog_title=
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/GetterSetterCorrectionSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/GetterSetterCorrectionSubProcessor.java
index bef5abb..66f60d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/GetterSetterCorrectionSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/GetterSetterCorrectionSubProcessor.java
@@ -78,6 +78,7 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeCorrectionPro
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 public class GetterSetterCorrectionSubProcessor {
 
 	public static final String SELF_ENCAPSULATE_FIELD_ID= "org.eclipse.jdt.ui.correction.encapsulateField.assist"; //$NON-NLS-1$
@@ -298,6 +299,8 @@ public class GetterSetterCorrectionSubProcessor {
 		ITypeBinding returnType= context.variableBinding.getType();
 		String getterName= GetterSetterUtil.getGetterName(context.variableBinding, context.compilationUnit.getJavaProject(), null, isBoolean(context));
 		ITypeBinding declaringType= context.variableBinding.getDeclaringClass();
+		if (declaringType == null)
+			return null;
 		IMethodBinding getter= Bindings.findMethodInHierarchy(declaringType, getterName, new ITypeBinding[0]);
 		if (getter != null && getter.getReturnType().isAssignmentCompatible(returnType) && Modifier.isStatic(getter.getModifiers()) == Modifier.isStatic(context.variableBinding.getModifiers()))
 			return getter;
@@ -337,6 +340,9 @@ public class GetterSetterCorrectionSubProcessor {
 		boolean isBoolean= isBoolean(context);
 		String setterName= GetterSetterUtil.getSetterName(context.variableBinding, context.compilationUnit.getJavaProject(), null, isBoolean);
 		ITypeBinding declaringType= context.variableBinding.getDeclaringClass();
+		if (declaringType == null)
+			return null;
+
 		IMethodBinding method= Bindings.findMethodInHierarchy(declaringType, setterName, new ITypeBinding[] { context.variableBinding.getType() });
 		if (method != null && Bindings.isVoidType(method.getReturnType()) && (Modifier.isStatic(method.getModifiers()) == Modifier.isStatic(context.variableBinding.getModifiers()))) {
 			Expression assignedValue= getAssignedValue(context);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
index 12c5c03..0a1bccc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionProcessor.java
@@ -51,7 +51,6 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jdt.ui.text.java.CompletionProposalComparator;
 import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
@@ -228,7 +227,7 @@ public class JavaCorrectionProcessor implements org.eclipse.jface.text.quickassi
 		IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(part.getEditorInput());
 
 		int length= viewer != null ? viewer.getSelectedRange().y : 0;
-		AssistContext context= new AssistContext(cu, viewer, part, documentOffset, length, SharedASTProvider.WAIT_YES);
+		AssistContext context= new AssistContext(cu, viewer, part, documentOffset, length);
 
 		Annotation[] annotations= fAssistant.getAnnotationsAtOffset();
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
index 985b40e..f9d1907 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavadocTagsSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,8 +61,10 @@ import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.VariableDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.util.Strings;
@@ -691,7 +693,8 @@ public class JavadocTagsSubProcessor {
 		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 5, image);
 
 		ImportRewrite importRewrite= proposal.createImportRewrite(context.getASTRoot());
-		String importedType= importRewrite.addImport(outerClass);
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(node, importRewrite);
+		String importedType= importRewrite.addImport(outerClass, importRewriteContext);
 		if (importedType.equals(outerClass.getName())) {
 			rewrite.replace(name, ast.newName(typeQualifiedName), null);
 		} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
index 42cee5d..409e8ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LocalCorrectionsSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,12 +75,14 @@ import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.Name;
 import org.eclipse.jdt.core.dom.ParenthesizedExpression;
 import org.eclipse.jdt.core.dom.PrefixExpression;
+import org.eclipse.jdt.core.dom.ReturnStatement;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
 import org.eclipse.jdt.core.dom.SwitchCase;
 import org.eclipse.jdt.core.dom.SwitchStatement;
+import org.eclipse.jdt.core.dom.ThrowStatement;
 import org.eclipse.jdt.core.dom.TryStatement;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
@@ -88,8 +90,8 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
-import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
+import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
@@ -111,6 +113,7 @@ import org.eclipse.jdt.internal.corext.fix.UnusedCodeFix;
 import org.eclipse.jdt.internal.corext.refactoring.surround.ExceptionAnalyzer;
 import org.eclipse.jdt.internal.corext.refactoring.surround.SurroundWithTryCatchRefactoring;
 import org.eclipse.jdt.internal.corext.refactoring.util.NoCommentSourceRangeComputer;
+import org.eclipse.jdt.internal.corext.refactoring.util.TightSourceRangeComputer;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
@@ -135,6 +138,9 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.ASTRewriteCorrectio
 import org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.ChangeDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.InsertDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.RemoveDescription;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ConstructorFromSuperclassProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.FixCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal;
@@ -142,9 +148,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedNamesAssistPr
 import org.eclipse.jdt.internal.ui.text.correction.proposals.MissingAnnotationAttributesProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.NewVariableCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ReplaceCorrectionProposal;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.ChangeDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.InsertDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.RemoveDescription;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
 /**
@@ -213,6 +216,7 @@ public class LocalCorrectionsSubProcessor {
 			LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 7, image);
 
 			ImportRewrite imports= proposal.createImportRewrite(context.getASTRoot());
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(decl, imports);
 
 			AST ast= astRoot.getAST();
 			ListRewrite clausesRewrite= rewrite.getListRewrite(surroundingTry, TryStatement.CATCH_CLAUSES_PROPERTY);
@@ -221,7 +225,7 @@ public class LocalCorrectionsSubProcessor {
 				String varName= StubUtility.getExceptionVariableName(cu.getJavaProject());
 				SingleVariableDeclaration var= ast.newSingleVariableDeclaration();
 				var.setName(ast.newSimpleName(varName));
-				var.setType(imports.addImport(excBinding, ast));
+				var.setType(imports.addImport(excBinding, ast, importRewriteContext));
 				CatchClause newClause= ast.newCatchClause();
 				newClause.setException(var);
 				String catchBody = StubUtility.getCatchBodyContent(cu, excBinding.getName(), varName, selectedNode, String.valueOf('\n'));
@@ -992,6 +996,67 @@ public class LocalCorrectionsSubProcessor {
 		proposals.add(proposal);
 	}
 
+	public static void getUnusedObjectAllocationProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
+		CompilationUnit root= context.getASTRoot();
+		AST ast= root.getAST();
+		ASTNode selectedNode= problem.getCoveringNode(root);
+		if (selectedNode == null) {
+			return;
+		}
+		
+		ASTNode parent= selectedNode.getParent();
+		
+		if (parent instanceof ExpressionStatement) {
+			ExpressionStatement expressionStatement= (ExpressionStatement) parent;
+			Expression expr= expressionStatement.getExpression();
+			ITypeBinding exprType= expr.resolveTypeBinding();
+			
+			if (exprType != null && Bindings.isSuperType(ast.resolveWellKnownType("java.lang.Throwable"), exprType)) { //$NON-NLS-1$
+				ASTRewrite rewrite= ASTRewrite.create(ast);
+				TightSourceRangeComputer sourceRangeComputer= new TightSourceRangeComputer();
+				rewrite.setTargetSourceRangeComputer(sourceRangeComputer);
+				
+				ThrowStatement throwStatement= ast.newThrowStatement();
+				throwStatement.setExpression((Expression) rewrite.createMoveTarget(expr));
+				sourceRangeComputer.addTightSourceNode(expressionStatement);
+				rewrite.replace(expressionStatement, throwStatement, null);
+
+				String label= CorrectionMessages.LocalCorrectionsSubProcessor_throw_allocated_description;
+				Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
+				ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 8, image);
+				proposals.add(proposal);
+			}
+			
+			MethodDeclaration method= ASTResolving.findParentMethodDeclaration(selectedNode);
+			if (method != null) {
+				ASTRewrite rewrite= ASTRewrite.create(ast);
+				TightSourceRangeComputer sourceRangeComputer= new TightSourceRangeComputer();
+				rewrite.setTargetSourceRangeComputer(sourceRangeComputer);
+				
+				ReturnStatement returnStatement= ast.newReturnStatement();
+				returnStatement.setExpression((Expression) rewrite.createMoveTarget(expr));
+				sourceRangeComputer.addTightSourceNode(expressionStatement);
+				rewrite.replace(expressionStatement, returnStatement, null);
+
+				String label= CorrectionMessages.LocalCorrectionsSubProcessor_return_allocated_description;
+				Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
+				ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 7, image);
+				proposals.add(proposal);
+			}
+			
+			{
+				ASTRewrite rewrite= ASTRewrite.create(ast);
+				rewrite.remove(parent, null);
+				
+				String label= CorrectionMessages.LocalCorrectionsSubProcessor_remove_allocated_description;
+				Image image= JavaPlugin.getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_DELETE);
+				ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 2, image);
+				proposals.add(proposal);
+			}
+			
+		}
+	}
+
 	public static void getAssignmentHasNoEffectProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
 		CompilationUnit root= context.getASTRoot();
 		ASTNode selectedNode= problem.getCoveringNode(root);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
index 92e2a13..b950a08 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
@@ -149,8 +149,15 @@ public class ModifierCorrectionSubProcessor {
 		String name;
 		IBinding bindingDecl;
 		boolean isLocalVar= false;
+		if (binding instanceof IVariableBinding && problem.getProblemId() == IProblem.NotVisibleType) {
+			binding= ((IVariableBinding) binding).getType();
+		}
 		if (binding instanceof IMethodBinding) {
 			IMethodBinding methodDecl= (IMethodBinding) binding;
+			if (methodDecl.isDefaultConstructor()) {
+				UnresolvedElementsSubProcessor.getConstructorProposals(context, problem, proposals);
+				return;
+			}
 			bindingDecl= methodDecl.getMethodDeclaration();
 			typeBinding= methodDecl.getDeclaringClass();
 			name= BasicElementLabels.getJavaElementName(methodDecl.getName() + "()"); //$NON-NLS-1$
@@ -690,7 +697,8 @@ public class ModifierCorrectionSubProcessor {
 			Map options= new Hashtable();
 			options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpOptions.TRUE);
 			options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE, CleanUpOptions.TRUE);
-			FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 5, image, context);
+			options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS_OVERRIDE_FOR_INTERFACE_METHOD_IMPLEMENTATION, CleanUpOptions.TRUE);
+			FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 15, image, context);
 			proposals.add(proposal);
 		}
 	}
@@ -702,7 +710,7 @@ public class ModifierCorrectionSubProcessor {
 			Map options= new Hashtable();
 			options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS, CleanUpOptions.TRUE);
 			options.put(CleanUpConstants.ADD_MISSING_ANNOTATIONS_DEPRECATED, CleanUpOptions.TRUE);
-			FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 5, image, context);
+			FixCorrectionProposal proposal= new FixCorrectionProposal(fix, new Java50CleanUp(options), 15, image, context);
 			proposals.add(proposal);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java
index 4f85c08..68a0207 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ProblemLocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,8 +15,7 @@ import org.eclipse.jdt.core.compiler.CategorizedProblem;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
-
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.NodeFinder;
 
 import org.eclipse.jdt.ui.text.java.IProblemLocation;
 
@@ -37,7 +36,8 @@ public class ProblemLocation implements IProblemLocation {
 
 	public ProblemLocation(int offset, int length, IJavaAnnotation annotation) {
 		fId= annotation.getId();
-		fArguments= annotation.getArguments();
+		String[] arguments= annotation.getArguments();
+		fArguments= arguments != null ? arguments : new String[0];
 		fOffset= offset;
 		fLength= length;
 		fIsError= JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE.equals(annotation.getType());
@@ -112,8 +112,7 @@ public class ProblemLocation implements IProblemLocation {
 	 * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getCoveringNode(org.eclipse.jdt.core.dom.CompilationUnit)
 	 */
 	public ASTNode getCoveringNode(CompilationUnit astRoot) {
-		NodeFinder finder= new NodeFinder(fOffset, fLength);
-		astRoot.accept(finder);
+		NodeFinder finder= new NodeFinder(astRoot, fOffset, fLength);
 		return finder.getCoveringNode();
 	}
 
@@ -122,8 +121,7 @@ public class ProblemLocation implements IProblemLocation {
 	 * @see org.eclipse.jdt.internal.ui.text.correction.IProblemLocation#getCoveredNode(org.eclipse.jdt.core.dom.CompilationUnit)
 	 */
 	public ASTNode getCoveredNode(CompilationUnit astRoot) {
-		NodeFinder finder= new NodeFinder(fOffset, fLength);
-		astRoot.accept(finder);
+		NodeFinder finder= new NodeFinder(astRoot, fOffset, fLength);
 		return finder.getCoveredNode();
 	}
 
@@ -132,11 +130,9 @@ public class ProblemLocation implements IProblemLocation {
 		buf.append("Id: ").append(getErrorCode(fId)).append('\n'); //$NON-NLS-1$
 		buf.append('[').append(fOffset).append(", ").append(fLength).append(']').append('\n'); //$NON-NLS-1$
 		String[] arg= fArguments;
-		if (arg != null) {
-			for (int i= 0; i < arg.length; i++) {
-				buf.append(arg[i]);
-				buf.append('\n');
-			}
+		for (int i= 0; i < arg.length; i++) {
+			buf.append(arg[i]);
+			buf.append('\n');
 		}
 		return buf.toString();
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
index 98731d4..ce08cbc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Sebastian Davids <sdavids at gmx.de> - Bug 37432 getInvertEqualsProposal
  *     Benjamin Muskalla <b.muskalla at gmx.net> - Bug 36350 convertToStringBufferPropsal
+ *     Chris West (Faux) <eclipse at goeswhere.com> - [quick assist] "Use 'StringBuilder' for string concatenation" could fix existing misuses - https://bugs.eclipse.org/bugs/show_bug.cgi?id=282755
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.text.correction;
 
@@ -24,19 +25,26 @@ import java.util.Map;
 import org.eclipse.swt.graphics.Image;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 
 import org.eclipse.core.resources.IFile;
 
+import org.eclipse.text.edits.InsertEdit;
+
 import org.eclipse.ui.IEditorPart;
 
 import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
 import org.eclipse.ltk.core.refactoring.TextChange;
 import org.eclipse.ltk.core.refactoring.TextFileChange;
 
 import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.NamingConventions;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.dom.AST;
@@ -89,6 +97,7 @@ import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
@@ -235,11 +244,17 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 		return null;
 	}
 
-	private boolean noErrorsAtLocation(IProblemLocation[] locations) {
+	static boolean noErrorsAtLocation(IProblemLocation[] locations) {
 		if (locations != null) {
 			for (int i= 0; i < locations.length; i++) {
-				if (locations[i].isError()) {
-					return false;
+				IProblemLocation location= locations[i];
+				if (location.isError()) {
+					if (IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER.equals(location.getMarkerType())
+							&& JavaCore.getOptionForConfigurableSeverity(location.getProblemId()) != null) {
+						// continue (only drop out for severe (non-optional) errors)
+					} else {
+						return false;
+					}
 				}
 			}
 		}
@@ -393,12 +408,22 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 
 		final ICompilationUnit cu= context.getCompilationUnit();
 		final ConvertAnonymousToNestedRefactoring refactoring= new ConvertAnonymousToNestedRefactoring(anonymTypeDecl);
-		String extTypeName= BasicElementLabels.getJavaElementName(ASTNodes.getSimpleNameIdentifier((Name) node));
-		if (anonymTypeDecl.resolveBinding().getInterfaces().length == 0) {
-			refactoring.setClassName(Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_interface, extTypeName));
+		
+		String extTypeName= ASTNodes.getSimpleNameIdentifier((Name) node);
+		ITypeBinding anonymTypeBinding= anonymTypeDecl.resolveBinding();
+		String className;
+		if (anonymTypeBinding.getInterfaces().length == 0) {
+			className= Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_interface, extTypeName);
 		} else {
-			refactoring.setClassName(Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_class, extTypeName));
+			className= Messages.format(CorrectionMessages.QuickAssistProcessor_name_extension_from_class, extTypeName);
 		}
+		String[][] existingTypes= ((IType) anonymTypeBinding.getJavaElement()).resolveType(className);
+		int i= 1;
+		while (existingTypes != null) {
+			i++;
+			existingTypes= ((IType) anonymTypeBinding.getJavaElement()).resolveType(className + i);
+		}
+		refactoring.setClassName(i == 1 ? className : className + i);
 
 		if (refactoring.checkInitialConditions(new NullProgressMonitor()).isOK()) {
 			LinkedProposalModel linkedProposalModel= new LinkedProposalModel();
@@ -602,7 +627,7 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 		AST ast= node.getAST();
 		ITypeBinding stringBinding= ast.resolveWellKnownType("java.lang.String"); //$NON-NLS-1$
 
-		if (node instanceof StringLiteral || node instanceof SimpleName) {
+		if (node instanceof Expression && !(node instanceof InfixExpression)) {
 			node= node.getParent();
 		}
 		if (node instanceof VariableDeclarationFragment) {
@@ -649,89 +674,182 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
-		String label= Messages.format(CorrectionMessages.QuickAssistProcessor_convert_to_string_buffer_description, BasicElementLabels.getJavaElementName(bufferOrBuilderName));
+		SimpleName existingBuffer= getEnclosingAppendBuffer(oldInfixExpression);
+		
+		String mechanismName= BasicElementLabels.getJavaElementName(existingBuffer == null ? bufferOrBuilderName : existingBuffer.getIdentifier());
+		String label= Messages.format(CorrectionMessages.QuickAssistProcessor_convert_to_string_buffer_description, mechanismName);
 		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
 		LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 1, image);
 		proposal.setCommandId(CONVERT_TO_STRING_BUFFER_ID);
 
-		// create buffer
-		VariableDeclarationFragment frag= ast.newVariableDeclarationFragment();
-		// check if name is already in use and provide alternative
-		List fExcludedVariableNames= Arrays.asList(ASTResolving.getUsedVariableNames(oldInfixExpression));
+		Statement insertAfter;
+		String bufferName;
 
-		SimpleType bufferType= ast.newSimpleType(ast.newName(bufferOrBuilderName));
-		ClassInstanceCreation newBufferExpression= ast.newClassInstanceCreation();
+		String groupID= "nameId"; //$NON-NLS-1$
+		ListRewrite listRewrite;
 
-		String[] newBufferNames= StubUtility.getVariableNameSuggestions(NamingConventions.VK_LOCAL, cu.getJavaProject(), bufferOrBuilderName, 0, fExcludedVariableNames, true);
-		String newBufferName= newBufferNames[0];
+		Statement enclosingStatement= ASTResolving.findParentStatement(oldInfixExpression);
 
-		SimpleName bufferNameDeclaration= ast.newSimpleName(newBufferName);
-		frag.setName(bufferNameDeclaration);
+		if (existingBuffer != null) {
+			if (ASTNodes.isControlStatementBody(enclosingStatement.getLocationInParent())) {
+				Block newBlock= ast.newBlock();
+				listRewrite= rewrite.getListRewrite(newBlock, Block.STATEMENTS_PROPERTY);
+				insertAfter= null;
+				rewrite.replace(enclosingStatement, newBlock, null);
+			} else {
+				listRewrite= rewrite.getListRewrite(enclosingStatement.getParent(), (ChildListPropertyDescriptor) enclosingStatement.getLocationInParent());
+				insertAfter= enclosingStatement;
+			}
 
-		String groupID= "nameId"; //$NON-NLS-1$
+			bufferName= existingBuffer.getIdentifier();
 
-		proposal.addLinkedPosition(rewrite.track(bufferNameDeclaration), true, groupID);
-		for (int i= 0; i < newBufferNames.length; i++) {
-			proposal.addLinkedPositionProposal(groupID, newBufferNames[i], null);
-		}
+		} else {
+			// create buffer
+			VariableDeclarationFragment frag= ast.newVariableDeclarationFragment();
+			// check if name is already in use and provide alternative
+			List fExcludedVariableNames= Arrays.asList(ASTResolving.getUsedVariableNames(oldInfixExpression));
 
-		newBufferExpression.setType(bufferType);
-		frag.setInitializer(newBufferExpression);
+			SimpleType bufferType= ast.newSimpleType(ast.newName(bufferOrBuilderName));
+			ClassInstanceCreation newBufferExpression= ast.newClassInstanceCreation();
 
-		VariableDeclarationStatement bufferDeclaration= ast.newVariableDeclarationStatement(frag);
-		bufferDeclaration.setType(ast.newSimpleType(ast.newName(bufferOrBuilderName)));
+			String[] newBufferNames= StubUtility.getVariableNameSuggestions(NamingConventions.VK_LOCAL, cu.getJavaProject(), bufferOrBuilderName, 0, fExcludedVariableNames, true);
+			bufferName= newBufferNames[0];
 
-		Statement statement= ASTResolving.findParentStatement(oldInfixExpression);
-		ListRewrite listRewrite;
-		if (ASTNodes.isControlStatementBody(statement.getLocationInParent())) {
-			Block newBlock= ast.newBlock();
-			listRewrite= rewrite.getListRewrite(newBlock, Block.STATEMENTS_PROPERTY);
-			listRewrite.insertFirst(bufferDeclaration, null);
-			listRewrite.insertLast(rewrite.createMoveTarget(statement), null);
-			rewrite.replace(statement, newBlock, null);
-		} else {
-			listRewrite= rewrite.getListRewrite(statement.getParent(), (ChildListPropertyDescriptor) statement.getLocationInParent());
-			listRewrite.insertBefore(bufferDeclaration, statement, null);
-		}
+			SimpleName bufferNameDeclaration= ast.newSimpleName(bufferName);
+			frag.setName(bufferNameDeclaration);
 
-		// collect operands
-		List operands= new ArrayList();
-		operands.add(rewrite.createCopyTarget(oldInfixExpression.getLeftOperand()));
-		operands.add(rewrite.createCopyTarget(oldInfixExpression.getRightOperand()));
-		for (int i= 0; i < oldInfixExpression.extendedOperands().size(); i++) {
-			ASTNode extNode= (ASTNode) oldInfixExpression.extendedOperands().get(i);
-			operands.add(rewrite.createCopyTarget(extNode));
+			proposal.addLinkedPosition(rewrite.track(bufferNameDeclaration), true, groupID);
+			for (int i= 0; i < newBufferNames.length; i++) {
+				proposal.addLinkedPositionProposal(groupID, newBufferNames[i], null);
+			}
+
+
+			newBufferExpression.setType(bufferType);
+			frag.setInitializer(newBufferExpression);
+
+
+			VariableDeclarationStatement bufferDeclaration= ast.newVariableDeclarationStatement(frag);
+			bufferDeclaration.setType(ast.newSimpleType(ast.newName(bufferOrBuilderName)));
+			insertAfter= bufferDeclaration;
+
+			Statement statement= ASTResolving.findParentStatement(oldInfixExpression);
+			if (ASTNodes.isControlStatementBody(statement.getLocationInParent())) {
+				Block newBlock= ast.newBlock();
+				listRewrite= rewrite.getListRewrite(newBlock, Block.STATEMENTS_PROPERTY);
+				listRewrite.insertFirst(bufferDeclaration, null);
+				listRewrite.insertLast(rewrite.createMoveTarget(statement), null);
+				rewrite.replace(statement, newBlock, null);
+			} else {
+				listRewrite= rewrite.getListRewrite(statement.getParent(), (ChildListPropertyDescriptor) statement.getLocationInParent());
+				listRewrite.insertBefore(bufferDeclaration, statement, null);
+			}
 		}
 
-		Statement lastAppend= bufferDeclaration;
+		List operands= new ArrayList();
+		collectInfixPlusOperands(oldInfixExpression, operands);
+		
+		Statement lastAppend= insertAfter;
 		for (Iterator iter= operands.iterator(); iter.hasNext();) {
 			Expression operand= (Expression) iter.next();
 
 			MethodInvocation appendIncovationExpression= ast.newMethodInvocation();
 			appendIncovationExpression.setName(ast.newSimpleName("append")); //$NON-NLS-1$
-			SimpleName bufferNameReference= ast.newSimpleName(newBufferName);
-			proposal.addLinkedPosition(rewrite.track(bufferNameReference), true, groupID);
+			SimpleName bufferNameReference= ast.newSimpleName(bufferName);
+
+			// If there was an existing name, don't offer to rename it
+			if (existingBuffer == null) {
+				proposal.addLinkedPosition(rewrite.track(bufferNameReference), true, groupID);
+			}
+
 			appendIncovationExpression.setExpression(bufferNameReference);
-			appendIncovationExpression.arguments().add(operand);
+			appendIncovationExpression.arguments().add(rewrite.createCopyTarget(operand));
 
 			ExpressionStatement appendExpressionStatement= ast.newExpressionStatement(appendIncovationExpression);
-			listRewrite.insertAfter(appendExpressionStatement, lastAppend, null);
+			if (lastAppend == null) {
+				listRewrite.insertFirst(appendExpressionStatement, null);
+			} else {
+				listRewrite.insertAfter(appendExpressionStatement, lastAppend, null);
+			}
 			lastAppend= appendExpressionStatement;
 		}
 
-		// replace old expression with toString
-		MethodInvocation bufferToString= ast.newMethodInvocation();
-		bufferToString.setName(ast.newSimpleName("toString")); //$NON-NLS-1$
-		SimpleName bufferNameReference= ast.newSimpleName(newBufferName);
-		bufferToString.setExpression(bufferNameReference);
-		proposal.addLinkedPosition(rewrite.track(bufferNameReference), true, groupID);
+		if (existingBuffer != null) {
+			proposal.setEndPosition(rewrite.track(lastAppend));
+			if (insertAfter != null) {
+				rewrite.remove(enclosingStatement, null);
+			}
+		} else {
+			// replace old expression with toString
+			MethodInvocation bufferToString= ast.newMethodInvocation();
+			bufferToString.setName(ast.newSimpleName("toString")); //$NON-NLS-1$
+			SimpleName bufferNameReference= ast.newSimpleName(bufferName);
+			bufferToString.setExpression(bufferNameReference);
+			proposal.addLinkedPosition(rewrite.track(bufferNameReference), true, groupID);
 
-		rewrite.replace(oldInfixExpression, bufferToString, null);
-		proposal.setEndPosition(rewrite.track(bufferToString));
+			rewrite.replace(oldInfixExpression, bufferToString, null);
+			proposal.setEndPosition(rewrite.track(bufferToString));
+		}
 
 		return proposal;
 	}
 
+	private static void collectInfixPlusOperands(Expression expression, List collector) {
+		if (expression instanceof InfixExpression && ((InfixExpression)expression).getOperator() == InfixExpression.Operator.PLUS) {
+			InfixExpression infixExpression= (InfixExpression)expression;
+			
+			collectInfixPlusOperands(infixExpression.getLeftOperand(), collector);
+			collectInfixPlusOperands(infixExpression.getRightOperand(), collector);
+			List extendedOperands= infixExpression.extendedOperands();
+			for (Iterator iter= extendedOperands.iterator(); iter.hasNext();) {
+				collectInfixPlusOperands((Expression)iter.next(), collector);
+			}
+			
+		} else {
+			collector.add(expression);
+		}
+	}
+
+	/**
+	 * Checks
+	 * <ul>
+	 * <li>whether the given infix expression is the argument of a StringBuilder#append() or
+	 * StringBuffer#append() invocation, and</li>
+	 * <li>the append method is called on a simple variable, and</li>
+	 * <li>the invocation occurs in a statement (not as nested expression)</li>
+	 * </ul>
+	 *
+	 * @param infixExpression the infix expression
+	 * @return the name of the variable we were appending to, or <code>null</code> if not matching
+	 */
+	private static SimpleName getEnclosingAppendBuffer(InfixExpression infixExpression) {
+		if (infixExpression.getLocationInParent() == MethodInvocation.ARGUMENTS_PROPERTY) {
+			MethodInvocation methodInvocation= (MethodInvocation)infixExpression.getParent();
+
+			// ..not in an expression.. (e.g. not sb.append("high" + 5).append(6);)
+			if (methodInvocation.getParent() instanceof Statement) {
+
+				// ..of a function called append:
+				if ("append".equals(methodInvocation.getName().getIdentifier())) { //$NON-NLS-1$
+					Expression expression= methodInvocation.getExpression();
+
+					// ..and the append is being called on a Simple object:
+					if (expression instanceof SimpleName) {
+						IBinding binding= ((SimpleName)expression).resolveBinding();
+						if (binding instanceof IVariableBinding) {
+							String typeName= ((IVariableBinding)binding).getType().getQualifiedName();
+	
+							// And the object's type is a StringBuilder or StringBuffer:
+							if ("java.lang.StringBuilder".equals(typeName) || "java.lang.StringBuffer".equals(typeName)) { //$NON-NLS-1$ //$NON-NLS-2$
+								return (SimpleName)expression;
+							}
+						}
+					}
+				}
+			}
+		}
+		return null;
+	}
+	
 	private static ASTRewriteCorrectionProposal getConvertToMessageFormatProposal(IInvocationContext context, AST ast, InfixExpression oldInfixExpression) {
 
 		ICompilationUnit cu= context.getCompilationUnit();
@@ -739,17 +857,12 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 		CompilationUnit root= context.getASTRoot();
-		ImportRewrite importRewrite= ImportRewrite.create(root, true);
-		ContextSensitiveImportRewriteContext importContext= new ContextSensitiveImportRewriteContext(context.getASTRoot(), oldInfixExpression.getStartPosition(), importRewrite);
+		ImportRewrite importRewrite= StubUtility.createImportRewrite(root, true);
+		ContextSensitiveImportRewriteContext importContext= new ContextSensitiveImportRewriteContext(root, oldInfixExpression.getStartPosition(), importRewrite);
 
 		// collect operands
 		List operands= new ArrayList();
-		operands.add(oldInfixExpression.getLeftOperand());
-		operands.add(oldInfixExpression.getRightOperand());
-		for (int i= 0; i < oldInfixExpression.extendedOperands().size(); i++) {
-			ASTNode extNode= (ASTNode) oldInfixExpression.extendedOperands().get(i);
-			operands.add(extNode);
-		}
+		collectInfixPlusOperands(oldInfixExpression, operands);
 
 		List formatArguments= new ArrayList();
 		String formatString= ""; //$NON-NLS-1$
@@ -1583,7 +1696,8 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 		LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image);
 
 		ImportRewrite imports= proposal.createImportRewrite(context.getASTRoot());
-		String typeName= imports.addImport(typeBinding);
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(node, imports);
+		String typeName= imports.addImport(typeBinding, importRewriteContext);
 
 		ArrayCreation creation= ast.newArrayCreation();
 		creation.setInitializer((ArrayInitializer) rewrite.createMoveTarget(initializer));
@@ -1828,6 +1942,7 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 
 	private static class RefactoringCorrectionProposal extends CUCorrectionProposal {
 		private final Refactoring fRefactoring;
+		private RefactoringStatus fRefactoringStatus;
 
 		public RefactoringCorrectionProposal(String name, ICompilationUnit cu, Refactoring refactoring, int relevance, Image image) {
 			super(name, cu, null, relevance, image);
@@ -1845,10 +1960,24 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
 
 		protected TextChange createTextChange() throws CoreException {
 			init(fRefactoring);
-			if (fRefactoring.checkFinalConditions(new NullProgressMonitor()).hasFatalError()) {
-				return new TextFileChange("fatal error", (IFile) getCompilationUnit().getResource()); //$NON-NLS-1$
+			fRefactoringStatus= fRefactoring.checkFinalConditions(new NullProgressMonitor());
+			if (fRefactoringStatus.hasFatalError()) {
+				TextFileChange dummyChange= new TextFileChange("fatal error", (IFile) getCompilationUnit().getResource()); //$NON-NLS-1$
+				dummyChange.setEdit(new InsertEdit(0, "")); //$NON-NLS-1$
+				return dummyChange;
 			}
 			return (TextChange) fRefactoring.createChange(new NullProgressMonitor());
 		}
+		
+		/*
+		 * @see org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal#getAdditionalProposalInfo(org.eclipse.core.runtime.IProgressMonitor)
+		 * @since 3.6
+		 */
+		public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
+			if (fRefactoringStatus != null && fRefactoringStatus.hasFatalError()) {
+				return fRefactoringStatus.getEntryWithHighestSeverity().getMessage();
+			}
+			return super.getAdditionalProposalInfo(monitor);
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
index 8cd251f..8480a31 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickFixProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,6 +51,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 			case IProblem.MethodButWithConstructorName:
 			case IProblem.UndefinedField:
 			case IProblem.UndefinedName:
+			case IProblem.UnresolvedVariable:
 			case IProblem.PublicClassMustMatchFileName:
 			case IProblem.PackageIsNotExpectedPackage:
 			case IProblem.UndefinedType:
@@ -189,6 +190,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 			case IProblem.MethodMissingDeprecatedAnnotation:
 			case IProblem.TypeMissingDeprecatedAnnotation:
 			case IProblem.MissingOverrideAnnotation:
+			case IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation:
 			case IProblem.MethodMustOverride:
 			case IProblem.MethodMustOverrideOrImplement:
 			case IProblem.IsClassPathCorrect:
@@ -209,12 +211,10 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 			case IProblem.IncompatibleTypesInForeach:
 			case IProblem.MissingEnumConstantCase:
 			case IProblem.MissingSynchronizedModifierInInheritedMethod:
+			case IProblem.UnusedObjectAllocation:
 				return true;
 			default:
-				if (JavaModelUtil.is50OrHigher(cu.getJavaProject())) {
-					return SuppressWarningsSubProcessor.hasSuppressWarningsProposal(problemId);
-				}
-				return false;
+				return SuppressWarningsSubProcessor.hasSuppressWarningsProposal(cu.getJavaProject(), problemId);
 		}
 	}
 
@@ -291,6 +291,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 				break;
 			case IProblem.UndefinedField:
 			case IProblem.UndefinedName:
+			case IProblem.UnresolvedVariable:
 				UnresolvedElementsSubProcessor.getVariableProposals(context, problem, null, proposals);
 				break;
 			case IProblem.AmbiguousType:
@@ -551,6 +552,7 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 				TypeArgumentMismatchSubProcessor.removeMismatchedArguments(context, problem, proposals);
 				break;
 			case IProblem.MissingOverrideAnnotation:
+			case IProblem.MissingOverrideAnnotationForInterfaceMethodImplementation:
 				ModifierCorrectionSubProcessor.addOverrideAnnotationProposal(context, problem, proposals);
 				break;
 			case IProblem.MethodMustOverride:
@@ -596,6 +598,9 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 			case IProblem.MissingSynchronizedModifierInInheritedMethod:
 				ModifierCorrectionSubProcessor.addSynchronizedMethodProposal(context, problem, proposals);
 				break;
+			case IProblem.UnusedObjectAllocation:
+				LocalCorrectionsSubProcessor.getUnusedObjectAllocationProposals(context, problem, proposals);
+				break;
 			default:
 		}
 		if (JavaModelUtil.is50OrHigher(context.getCompilationUnit().getJavaProject())) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java
index ce033cf..a3f1de3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,9 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -157,7 +159,8 @@ public class ReturnTypeSubProcessor {
 				Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
 				LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 6, image);
 				ImportRewrite imports= proposal.createImportRewrite(astRoot);
-				Type newReturnType= imports.addImport(binding, ast);
+				ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(methodDeclaration, imports);
+				Type newReturnType= imports.addImport(binding, ast, importRewriteContext);
 
 				if (methodDeclaration.isConstructor()) {
 					rewrite.set(methodDeclaration, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
@@ -230,8 +233,8 @@ public class ReturnTypeSubProcessor {
 			LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 6, image);
 
 			ImportRewrite imports= proposal.createImportRewrite(astRoot);
-
-			Type type= imports.addImport(typeBinding, ast);
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(decl, imports);
+			Type type= imports.addImport(typeBinding, ast, importRewriteContext);
 
 			rewrite.set(methodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, type, null);
 			rewrite.set(methodDeclaration, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java
index 0659f16..836a7a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.ui.ISharedImages;
 
 import org.eclipse.jdt.core.CorrectionEngine;
 import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
@@ -38,7 +39,6 @@ import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.ImportDeclaration;
-import org.eclipse.jdt.core.dom.Initializer;
 import org.eclipse.jdt.core.dom.MemberValuePair;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.NormalAnnotation;
@@ -46,12 +46,14 @@ import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.StringLiteral;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.text.java.IInvocationContext;
@@ -69,13 +71,20 @@ public class SuppressWarningsSubProcessor {
 
 	private static final String ADD_SUPPRESSWARNINGS_ID= "org.eclipse.jdt.ui.correction.addSuppressWarnings"; //$NON-NLS-1$
 
-	public static final boolean hasSuppressWarningsProposal(int problemId) {
-		return CorrectionEngine.getWarningToken(problemId) != null; // Suppress warning annotations
+	public static final boolean hasSuppressWarningsProposal(IJavaProject javaProject, int problemId) {
+		if (CorrectionEngine.getWarningToken(problemId) != null && JavaModelUtil.is50OrHigher(javaProject)) {
+			String optionId= JavaCore.getOptionForConfigurableSeverity(problemId);
+			if (optionId != null) {
+				String optionValue= javaProject.getOption(optionId, true);
+				return JavaCore.WARNING.equals(optionValue);
+			}
+		}
+		return false;
 	}
 
 
 	public static void addSuppressWarningsProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
-		if (problem.isError()) {
+		if (problem.isError() && ! JavaCore.ENABLED.equals(context.getCompilationUnit().getJavaProject().getOption(JavaCore.COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS, true))) {
 			return;
 		}
 		if (JavaCore.DISABLED.equals(context.getCompilationUnit().getJavaProject().getOption(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS, true))) {
@@ -97,34 +106,22 @@ public class SuppressWarningsSubProcessor {
 		if (node == null) {
 			return;
 		}
-		if (node.getLocationInParent() == VariableDeclarationFragment.NAME_PROPERTY) {
-			ASTNode parent= node.getParent();
-			if (parent.getLocationInParent() == VariableDeclarationStatement.FRAGMENTS_PROPERTY) {
-				addSuppressWarningsProposal(context.getCompilationUnit(), parent.getParent(), warningToken, -2, proposals);
+		
+		ASTNode target= node;
+		int relevance= -2;
+		do {
+			relevance= addSuppressWarningsProposalIfPossible(context.getCompilationUnit(), target, warningToken, relevance, proposals);
+			if (relevance == 0)
 				return;
+			target= target.getParent();
+		} while (target != null);
+		
+		ASTNode importStatement= ASTNodes.getParent(node, ImportDeclaration.class);
+		if (importStatement != null && !context.getASTRoot().types().isEmpty()) {
+			target= (ASTNode) context.getASTRoot().types().get(0);
+			if (target != null) {
+				addSuppressWarningsProposalIfPossible(context.getCompilationUnit(), target, warningToken, -2, proposals);
 			}
-		} else if (node.getLocationInParent() == SingleVariableDeclaration.NAME_PROPERTY) {
-			addSuppressWarningsProposal(context.getCompilationUnit(), node.getParent(), warningToken, -2, proposals);
-			return;
-		} else if (node.getLocationInParent() == VariableDeclarationFragment.INITIALIZER_PROPERTY) {
-			node= ASTResolving.findParentBodyDeclaration(node);
-			if (node instanceof FieldDeclaration) {
-				node= node.getParent();
-			}
-		}
-
-		ASTNode target= ASTResolving.findParentBodyDeclaration(node);
-		if (target instanceof Initializer) {
-			target= ASTResolving.findParentBodyDeclaration(target.getParent());
-		}
-		if (target == null) {
-			ASTNode importStatement= ASTNodes.getParent(node, ImportDeclaration.class);
-			if (importStatement != null && !context.getASTRoot().types().isEmpty()) {
-				target= (ASTNode) context.getASTRoot().types().get(0);
-			}
-		}
-		if (target != null) {
-			addSuppressWarningsProposal(context.getCompilationUnit(), target, warningToken, -3, proposals);
 		}
 	}
 
@@ -245,18 +242,38 @@ public class SuppressWarningsSubProcessor {
 		}
 	}
 
-	private static void addSuppressWarningsProposal(ICompilationUnit cu, ASTNode node, String warningToken, int relevance, Collection proposals) {
+	/**
+	 * Adds a SuppressWarnings proposal if possible and returns whether parent nodes should be processed or not (and with what relevance).
+	 * 
+	 * @param cu the compilation unit
+	 * @param node the node on which to add a SuppressWarning token
+	 * @param warningToken the warning token to add
+	 * @param relevance the proposal's relevance
+	 * @param proposals collector to which the proposal should be added
+	 * @return <code>0</code> if no further proposals should be added to parent nodes, or the relevance of the next proposal
+	 * 
+	 * @since 3.6
+	 */
+	private static int addSuppressWarningsProposalIfPossible(ICompilationUnit cu, ASTNode node, String warningToken, int relevance, Collection proposals) {
 
-		ChildListPropertyDescriptor property= null;
+		ChildListPropertyDescriptor property;
 		String name;
+		boolean isLocalVariable= false;
 		switch (node.getNodeType()) {
 			case ASTNode.SINGLE_VARIABLE_DECLARATION:
 				property= SingleVariableDeclaration.MODIFIERS2_PROPERTY;
 				name= ((SingleVariableDeclaration) node).getName().getIdentifier();
+				isLocalVariable= true;
 				break;
 			case ASTNode.VARIABLE_DECLARATION_STATEMENT:
 				property= VariableDeclarationStatement.MODIFIERS2_PROPERTY;
 				name= getFirstFragmentName(((VariableDeclarationStatement) node).fragments());
+				isLocalVariable= true;
+				break;
+			case ASTNode.VARIABLE_DECLARATION_EXPRESSION:
+				property= VariableDeclarationExpression.MODIFIERS2_PROPERTY;
+				name= getFirstFragmentName(((VariableDeclarationExpression) node).fragments());
+				isLocalVariable= true;
 				break;
 			case ASTNode.TYPE_DECLARATION:
 				property= TypeDeclaration.MODIFIERS2_PROPERTY;
@@ -274,10 +291,7 @@ public class SuppressWarningsSubProcessor {
 				property= FieldDeclaration.MODIFIERS2_PROPERTY;
 				name= getFirstFragmentName(((FieldDeclaration) node).fragments());
 				break;
-			case ASTNode.INITIALIZER:
-				property= Initializer.MODIFIERS2_PROPERTY;
-				name= CorrectionMessages.SuppressWarningsSubProcessor_suppress_warnings_initializer_label;
-				break;
+			// case ASTNode.INITIALIZER: not used, because Initializer cannot have annotations
 			case ASTNode.METHOD_DECLARATION:
 				property= MethodDeclaration.MODIFIERS2_PROPERTY;
 				name= ((MethodDeclaration) node).getName().getIdentifier() + "()"; //$NON-NLS-1$
@@ -291,14 +305,14 @@ public class SuppressWarningsSubProcessor {
 				name= ((EnumConstantDeclaration) node).getName().getIdentifier();
 				break;
 			default:
-				JavaPlugin.logErrorMessage("SuppressWarning quick fix: wrong node kind: " + node.getNodeType()); //$NON-NLS-1$
-				return;
+				return relevance;
 		}
 
 		String label= Messages.format(CorrectionMessages.SuppressWarningsSubProcessor_suppress_warnings_label, new String[] { warningToken, BasicElementLabels.getJavaElementName(name) });
 		ASTRewriteCorrectionProposal proposal= new SuppressWarningsProposal(warningToken, label, cu, node, property, relevance);
 
 		proposals.add(proposal);
+		return isLocalVariable ? relevance - 1 : 0;
 	}
 
 	/**
@@ -331,6 +345,7 @@ public class SuppressWarningsSubProcessor {
 				proposals.add(proposal);
 			}
 		}
+		addRemoveUnusedSuppressWarningProposals(context, problem, proposals);
 	}
 
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SurroundWith.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SurroundWith.java
index f8e0f8d..1555b35 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SurroundWith.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SurroundWith.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,8 +40,10 @@ import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.GenericVisitor;
@@ -226,8 +228,9 @@ public abstract class SurroundWith {
 		moveToBlock(selectedStatements, inserted, accessedAfter, readInside, rewrite);
 		if (fIsNewContext) {
 			ImportRewrite importRewrite= StubUtility.createImportRewrite((CompilationUnit)selectedStatements[0].getRoot(), false);
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(selectedStatements[0], importRewrite);
 			for (int i= 0; i < selectedStatements.length; i++) {
-				qualifyThisExpressions(selectedStatements[i], rewrite, importRewrite);
+				qualifyThisExpressions(selectedStatements[i], rewrite, importRewrite, importRewriteContext);
 			}
 		}
 
@@ -494,7 +497,7 @@ public abstract class SurroundWith {
 		}
 	}
 
-	private void qualifyThisExpressions(ASTNode node, final ASTRewrite rewrite, final ImportRewrite importRewrite) {
+	private void qualifyThisExpressions(ASTNode node, final ASTRewrite rewrite, final ImportRewrite importRewrite, final ImportRewriteContext importRewriteContext) {
 		node.accept(new GenericVisitor() {
 			/**
 			 * {@inheritDoc}
@@ -503,7 +506,7 @@ public abstract class SurroundWith {
 				if (thisExpr.getQualifier() == null) {
 					ITypeBinding typeBinding= thisExpr.resolveTypeBinding();
 					if (typeBinding != null) {
-						String typeName= importRewrite.addImport(typeBinding.getTypeDeclaration());
+						String typeName= importRewrite.addImport(typeBinding.getTypeDeclaration(), importRewriteContext);
 						SimpleName simpleName= thisExpr.getAST().newSimpleName(typeName);
 						rewrite.set(thisExpr, ThisExpression.QUALIFIER_PROPERTY, simpleName, null);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java
index 48c6106..e671bc1 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [quick fix] proposes wrong cast from Object to primitive int - https://bugs.eclipse.org/bugs/show_bug.cgi?id=100593
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [quick fix] "Add exceptions to..." quickfix does nothing - https://bugs.eclipse.org/bugs/show_bug.cgi?id=107924
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.text.correction;
 
@@ -43,9 +45,12 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
@@ -56,12 +61,12 @@ import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ASTRewriteCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.CastCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ImplementInterfaceProposal;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.TypeChangeCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.ChangeDescription;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.InsertDescription;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.RemoveDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ImplementInterfaceProposal;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.TypeChangeCorrectionProposal;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 
@@ -124,15 +129,23 @@ public class TypeMismatchSubProcessor {
 			return;
 		}
 
+		ITypeBinding currBinding= nodeToCast.resolveTypeBinding();
+		
 		if (!(nodeToCast instanceof ArrayInitializer)) {
-			ITypeBinding binding= nodeToCast.resolveTypeBinding();
-			if (binding == null || binding.isCastCompatible(castTypeBinding) || nodeToCast instanceof CastExpression) {
-				proposals.add(createCastProposal(context, castTypeBinding, nodeToCast, 7));
+			ITypeBinding castFixType= null;
+			if (currBinding == null || castTypeBinding.isCastCompatible(currBinding) || nodeToCast instanceof CastExpression) {
+				castFixType= castTypeBinding;
+			} else if (JavaModelUtil.is50OrHigher(cu.getJavaProject())) {
+				ITypeBinding boxUnboxedTypeBinding= boxUnboxPrimitives(castTypeBinding, currBinding, ast);
+				if (boxUnboxedTypeBinding != castTypeBinding && boxUnboxedTypeBinding.isCastCompatible(currBinding)) {
+					castFixType= boxUnboxedTypeBinding;
+				}
+			}
+			if (castFixType != null) {
+				proposals.add(createCastProposal(context, castFixType, nodeToCast, 7));
 			}
 		}
 
-		ITypeBinding currBinding= nodeToCast.resolveTypeBinding();
-
 		boolean nullOrVoid= currBinding == null || "void".equals(currBinding.getName()); //$NON-NLS-1$
 
 		// change method return statement to actual type
@@ -157,8 +170,9 @@ public class TypeMismatchSubProcessor {
 				LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, cu, rewrite, 6, image);
 
 				ImportRewrite imports= proposal.createImportRewrite(astRoot);
+				ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(decl, imports);
 
-				Type newReturnType= imports.addImport(currBinding, ast);
+				Type newReturnType= imports.addImport(currBinding, ast, importRewriteContext);
 				rewrite.replace(methodDeclaration.getReturnType2(), newReturnType, null);
 
 				String returnKey= "return"; //$NON-NLS-1$
@@ -184,7 +198,7 @@ public class TypeMismatchSubProcessor {
 
 		addChangeSenderTypeProposals(context, nodeToCast, castTypeBinding, false, 5, proposals);
 
-		if (castTypeBinding == ast.resolveWellKnownType(CorrectionMessages.TypeMismatchSubProcessor_0) && currBinding != null && !currBinding.isPrimitive() && !Bindings.isVoidType(currBinding)) {
+		if (castTypeBinding == ast.resolveWellKnownType("boolean") && currBinding != null && !currBinding.isPrimitive() && !Bindings.isVoidType(currBinding)) { //$NON-NLS-1$
 			String label= CorrectionMessages.TypeMismatchSubProcessor_insertnullcheck_description;
 			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
@@ -200,6 +214,22 @@ public class TypeMismatchSubProcessor {
 
 	}
 
+	public static ITypeBinding boxUnboxPrimitives(ITypeBinding castType, ITypeBinding toCast, AST ast) {
+		/*
+		 * e.g:
+		 * 	void m(toCast var) {
+		 * 		castType i= var;
+		 * 	}
+		 */
+		if (castType.isPrimitive() && !toCast.isPrimitive()) {
+			return Bindings.getBoxedTypeBinding(castType, ast);
+		} else if (!castType.isPrimitive() && toCast.isPrimitive()) {
+			return Bindings.getUnboxedTypeBinding(castType, ast);
+		} else {
+			return castType;
+		}
+	}
+
 	public static void addChangeSenderTypeProposals(IInvocationContext context, Expression nodeToCast, ITypeBinding castTypeBinding, boolean isAssignedNode, int relevance, Collection proposals) throws JavaModelException {
 		IBinding callerBinding= Bindings.resolveExpressionBinding(nodeToCast, false);
 
@@ -355,7 +385,7 @@ public class TypeMismatchSubProcessor {
 		}
 
 		ITypeBinding declaringType= overridden.getDeclaringClass();
-		ICompilationUnit targetCu= cu;
+		ICompilationUnit targetCu= null;
 		if (declaringType.isFromSource()) {
 			targetCu= ASTResolving.findCompilationUnitForBinding(cu, astRoot, declaringType);
 		}
@@ -421,7 +451,8 @@ public class TypeMismatchSubProcessor {
 		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 5, image);
 
 		ImportRewrite importRewrite= proposal.createImportRewrite(astRoot);
-		Type newType= importRewrite.addImport(expectedBinding, ast);
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(ASTResolving.findParentBodyDeclaration(selectedNode), importRewrite);
+		Type newType= importRewrite.addImport(expectedBinding, ast, importRewriteContext);
 		rewrite.replace(parameter.getType(), newType, null);
 
 		proposals.add(proposal);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
index b9928a2..c5fb5ab 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,7 +72,9 @@ import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -97,6 +99,11 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.AddTypeParameterPro
 import org.eclipse.jdt.internal.ui.text.correction.proposals.CUCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.CastCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.ChangeDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.EditDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.InsertDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.RemoveDescription;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.SwapDescription;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.LinkedCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.NewAnnotationMemberProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.NewCUUsingWizardProposal;
@@ -104,11 +111,6 @@ import org.eclipse.jdt.internal.ui.text.correction.proposals.NewMethodCorrection
 import org.eclipse.jdt.internal.ui.text.correction.proposals.NewVariableCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.RenameNodeCorrectionProposal;
 import org.eclipse.jdt.internal.ui.text.correction.proposals.ReplaceCorrectionProposal;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.ChangeDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.EditDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.InsertDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.RemoveDescription;
-import org.eclipse.jdt.internal.ui.text.correction.proposals.ChangeMethodSignatureProposal.SwapDescription;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
@@ -630,7 +632,8 @@ public class UnresolvedElementsSubProcessor {
 		String packName= Signature.getQualifier(fullName);
 		if (packName.length() > 0) { // no imports for primitive types, type variables
 			importRewrite= StubUtility.createImportRewrite((CompilationUnit) node.getRoot(), true);
-			simpleName= importRewrite.addImport(fullName);
+			ImportRewriteContext context= new ContextSensitiveImportRewriteContext(ASTResolving.findParentBodyDeclaration(node), importRewrite);
+			simpleName= importRewrite.addImport(fullName, context);
 		}
 
 		if (!isLikelyTypeName(simpleName)) {
@@ -1289,16 +1292,27 @@ public class UnresolvedElementsSubProcessor {
 			}
 			if (castType != null) {
 				ITypeBinding binding= nodeToCast.resolveTypeBinding();
-				if (binding == null || binding.isCastCompatible(castType)) {
-					ASTRewriteCorrectionProposal proposal= TypeMismatchSubProcessor.createCastProposal(context, castType, nodeToCast, 6);
-					String castTypeName= BindingLabelProvider.getBindingLabel(castType, JavaElementLabels.ALL_DEFAULT);
+				ITypeBinding castFixType= null;
+				if (binding == null || castType.isCastCompatible(binding)) {
+					castFixType= castType;
+				} else if (JavaModelUtil.is50OrHigher(cu.getJavaProject())) {
+					ITypeBinding boxUnboxedTypeBinding= TypeMismatchSubProcessor.boxUnboxPrimitives(castType, binding, nodeToCast.getAST());
+					if (boxUnboxedTypeBinding != castType && boxUnboxedTypeBinding.isCastCompatible(binding)) {
+						castFixType= boxUnboxedTypeBinding;
+					}
+				}
+				if (castFixType != null) {
+					ASTRewriteCorrectionProposal proposal= TypeMismatchSubProcessor.createCastProposal(context, castFixType, nodeToCast, 6);
+					String castTypeName= BindingLabelProvider.getBindingLabel(castFixType, JavaElementLabels.ALL_DEFAULT);
 					String[] arg= new String[] { getArgumentName(arguments, idx), castTypeName};
 					proposal.setDisplayName(Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_addargumentcast_description, arg));
 					proposals.add(proposal);
 				}
+				
 				TypeMismatchSubProcessor.addChangeSenderTypeProposals(context, nodeToCast, castType, false, 5, proposals);
 			}
 		}
+		
 		if (nDiffs == 2) { // try to swap
 			int idx1= indexOfDiff[0];
 			int idx2= indexOfDiff[1];
@@ -1452,9 +1466,10 @@ public class UnresolvedElementsSubProcessor {
 		ASTRewriteCorrectionProposal proposal= new ASTRewriteCorrectionProposal(label, context.getCompilationUnit(), rewrite, 8, image);
 
 		ImportRewrite imports= proposal.createImportRewrite(context.getASTRoot());
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(invocationNode, imports);
 		AST ast= invocationNode.getAST();
 
-		String qualifier= imports.addImport(currType);
+		String qualifier= imports.addImport(currType, importRewriteContext);
 		Name name= ASTNodeFactory.newName(ast, qualifier);
 
 		Expression newExpression;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/AddTypeParameterProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/AddTypeParameterProposal.java
index 0ab47d8..04c2714 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/AddTypeParameterProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/AddTypeParameterProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,8 +31,10 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
@@ -87,8 +89,9 @@ public class AddTypeParameterProposal extends LinkedCorrectionProposal {
 		newTypeParam.setName(ast.newSimpleName(fTypeParamName));
 		if (fBounds != null && fBounds.length > 0) {
 			List typeBounds= newTypeParam.typeBounds();
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(declNode, getImportRewrite());
 			for (int i= 0; i < fBounds.length; i++) {
-				Type newBound= getImportRewrite().addImport(fBounds[i], ast);
+				Type newBound= getImportRewrite().addImport(fBounds[i], ast, importRewriteContext);
 				typeBounds.add(newBound);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java
index 5a29ce6..632de79 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <bmuskalla at eclipsesource.com> - [quick fix] proposes wrong cast from Object to primitive int - https://bugs.eclipse.org/bugs/show_bug.cgi?id=100593
  *******************************************************************************/
 
 package org.eclipse.jdt.internal.ui.text.correction.proposals;
@@ -31,7 +32,6 @@ import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
-import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
@@ -40,16 +40,18 @@ public class CastCorrectionProposal extends LinkedCorrectionProposal {
 
 	public static final String ADD_CAST_ID= "org.eclipse.jdt.ui.correction.addCast"; //$NON-NLS-1$
 
-	private Expression fNodeToCast;
-	private final Object fCastType; // String or ITypeBinding or null: Should become ITypeBinding
-
-	public CastCorrectionProposal(String label, ICompilationUnit targetCU, Expression nodeToCast, String castType, int relevance) {
-		super(label, targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CAST));
-		fNodeToCast= nodeToCast;
-		fCastType= castType;
-		setCommandId(ADD_CAST_ID);
-	}
-
+	private final Expression fNodeToCast;
+	private final ITypeBinding fCastType;
+
+	/**
+	 * Creates a cast correction proposal.
+	 * 
+	 * @param label the display name of the proposal
+	 * @param targetCU the compilation unit that is modified
+	 * @param nodeToCast the node to cast
+	 * @param castType the type to cast to, may be <code>null</code>
+	 * @param relevance the relevance of this proposal
+	 */
 	public CastCorrectionProposal(String label, ICompilationUnit targetCU, Expression nodeToCast, ITypeBinding castType, int relevance) {
 		super(label, targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CAST));
 		fNodeToCast= nodeToCast;
@@ -63,12 +65,7 @@ public class CastCorrectionProposal extends LinkedCorrectionProposal {
 		ImportRewriteContext context= new ContextSensitiveImportRewriteContext((CompilationUnit) fNodeToCast.getRoot(), fNodeToCast.getStartPosition(), importRewrite);
 
 		if (fCastType != null) {
-			if (fCastType instanceof ITypeBinding) {
-				return importRewrite.addImport((ITypeBinding) fCastType, ast, context);
-			} else {
-				String string= importRewrite.addImport((String) fCastType, context);
-				return ASTNodeFactory.newType(ast, string);
-			}
+			return importRewrite.addImport(fCastType, ast,context);
 		}
 
 		ASTNode node= fNodeToCast;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
index 5549f6c..3c9a32f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
@@ -10,8 +10,14 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.text.correction.proposals;
 
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -19,6 +25,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
 
+import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.StyledCellLabelProvider;
 import org.eclipse.jface.viewers.StyledString;
 
@@ -57,6 +64,8 @@ import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
  */
 public class ChangeCorrectionProposal implements IJavaCompletionProposal, ICommandAccess, ICompletionProposalExtension5, ICompletionProposalExtension6 {
 
+	private static final NullChange COMPUTING_CHANGE= new NullChange("ChangeCorrectionProposal computing..."); //$NON-NLS-1$
+	
 	private Change fChange;
 	private String fName;
 	private int fRelevance;
@@ -105,6 +114,9 @@ public class ChangeCorrectionProposal implements IJavaCompletionProposal, IComma
 	 * @throws CoreException Thrown when the invocation of the change failed.
 	 */
 	protected void performChange(IEditorPart activeEditor, IDocument document) throws CoreException {
+		StyledText disabledStyledText= null;
+		TraverseListener traverseBlocker= null;
+		
 		Change change= null;
 		IRewriteTarget rewriteTarget= null;
 		try {
@@ -118,6 +130,31 @@ public class ChangeCorrectionProposal implements IJavaCompletionProposal, IComma
 					if (rewriteTarget != null) {
 						rewriteTarget.beginCompoundChange();
 					}
+					/*
+					 * Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=195834#c7 :
+					 * During change execution, an EventLoopProgressMonitor can process the event queue while the text
+					 * widget has focus. When that happens and the user e.g. pressed a key, the event is prematurely
+					 * delivered to the text widget and screws up the document. Change execution fails or performs
+					 * wrong changes.
+					 * 
+					 * The fix is to temporarily disable the text widget.
+					 */
+					Object control= activeEditor.getAdapter(Control.class);
+					if (control instanceof StyledText) {
+						disabledStyledText= (StyledText) control;
+						if (disabledStyledText.getEditable()) {
+							disabledStyledText.setEditable(false);
+							traverseBlocker= new TraverseListener() {
+								public void keyTraversed(TraverseEvent e) {
+									e.doit= true;
+									e.detail= SWT.TRAVERSE_NONE;
+								}
+							};
+							disabledStyledText.addTraverseListener(traverseBlocker);
+						} else {
+							disabledStyledText= null;
+						}
+					}
 				}
 
 				change.initializeValidationData(new NullProgressMonitor());
@@ -144,6 +181,10 @@ public class ChangeCorrectionProposal implements IJavaCompletionProposal, IComma
 				}
 			}
 		} finally {
+			if (disabledStyledText != null) {
+				disabledStyledText.setEditable(true);
+				disabledStyledText.removeTraverseListener(traverseBlocker);
+			}
 			if (rewriteTarget != null) {
 				rewriteTarget.endCompoundChange();
 			}
@@ -259,9 +300,63 @@ public class ChangeCorrectionProposal implements IJavaCompletionProposal, IComma
 	 * @return returns the change for this proposal.
 	 * @throws CoreException thrown when the change could not be created
 	 */
-	public synchronized final Change getChange() throws CoreException {
-		if (fChange == null) {
-			fChange= createChange();
+	public final Change getChange() throws CoreException {
+		if (Util.isGtk()) {
+			// workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=293995 :
+			// [Widgets] Deadlock while UI thread displaying/computing a change proposal and non-UI thread creating image
+			
+			// Solution is to create the change outside a 'synchronized' block.
+			// Synchronization is achieved by polling fChange, using "fChange == COMPUTING_CHANGE" as barrier.
+			// Timeout of 10s for safety reasons (should not be reached).
+			long end= System.currentTimeMillis() + 10000;
+			do {
+				boolean computing;
+				synchronized (this) {
+					computing= fChange == COMPUTING_CHANGE;
+				}
+				if (computing) {
+					try {
+						Display display= Display.getCurrent();
+						if (display != null) {
+							while (! display.isDisposed() && display.readAndDispatch()) {
+							}
+							display.sleep();
+						} else {
+							Thread.sleep(100);
+						}
+					} catch (InterruptedException e) {
+						//continue
+					}
+				} else {
+					synchronized (this) {
+						if (fChange == COMPUTING_CHANGE) {
+							continue;
+						} else if (fChange != null) {
+							return fChange;
+						} else {
+							fChange= COMPUTING_CHANGE;
+						}
+					}
+					Change change= createChange();
+					synchronized (this) {
+						fChange= change;
+					}
+					return change;
+				}
+			} while (System.currentTimeMillis() < end);
+			
+			synchronized (this) {
+				if (fChange == COMPUTING_CHANGE) {
+					return null; //failed
+				}
+			}
+			
+		} else {
+			synchronized (this) {
+				if (fChange == null) {
+					fChange= createChange();
+				}
+			}
 		}
 		return fChange;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeMethodSignatureProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeMethodSignatureProposal.java
index fee7e07..4d5140d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeMethodSignatureProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ChangeMethodSignatureProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,9 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -147,6 +149,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 		}
 
 		ImportRewrite imports= getImportRewrite();
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(methodDecl, imports);
 		ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY);
 
 		List parameters= methodDecl.parameters(); // old parameters
@@ -162,7 +165,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 			} else if (curr instanceof InsertDescription) {
 				InsertDescription desc= (InsertDescription) curr;
 				SingleVariableDeclaration newNode= ast.newSingleVariableDeclaration();
-				newNode.setType(imports.addImport(desc.type, ast));
+				newNode.setType(imports.addImport(desc.type, ast, context));
 				newNode.setName(ast.newSimpleName("x")); //$NON-NLS-1$
 
 				// remember to set name later
@@ -206,7 +209,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 					rewrite.set(decl, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
 				}
 
-				Type newType= imports.addImport(newTypeBinding, ast);
+				Type newType= imports.addImport(newTypeBinding, ast, context);
 				rewrite.replace(decl.getType(), newType, null);
 				rewrite.set(decl, SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
 
@@ -359,6 +362,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 		AST ast= methodDecl.getAST();
 
 		ImportRewrite imports= getImportRewrite();
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(methodDecl, imports);
 		ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);
 
 		List exceptions= methodDecl.thrownExceptions(); // old exceptions
@@ -371,7 +375,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 				k++;
 			} else if (curr instanceof InsertDescription) {
 				InsertDescription desc= (InsertDescription) curr;
-				String type= imports.addImport(desc.type);
+				String type= imports.addImport(desc.type, context);
 				ASTNode newNode= ASTNodeFactory.newName(ast, type);
 
 				listRewrite.insertAt(newNode, i, null);
@@ -380,7 +384,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 				addLinkedPosition(rewrite.track(newNode), false, key);
 
 				Javadoc javadoc= methodDecl.getJavadoc();
-				if (javadoc != null) {
+				if (javadoc != null && JavadocTagsSubProcessor.findThrowsTag(javadoc, type) == null) {
 					TagElement newTagElement= ast.newTagElement();
 					newTagElement.setTagName(TagElement.TAG_THROWS);
 					ASTNode newRef= ASTNodeFactory.newName(ast, type);
@@ -406,7 +410,7 @@ public class ChangeMethodSignatureProposal extends LinkedCorrectionProposal {
 
 				Name oldNode= (Name) exceptions.get(k);
 
-				String type= imports.addImport(desc.type);
+				String type= imports.addImport(desc.type, context);
 				ASTNode newNode= ASTNodeFactory.newName(ast, type);
 
 				listRewrite.replace(oldNode, newNode, null);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ConstructorFromSuperclassProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ConstructorFromSuperclassProposal.java
index 1c4d907..754a019 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ConstructorFromSuperclassProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ConstructorFromSuperclassProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,8 +32,10 @@ import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
@@ -104,8 +106,9 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 		if (!settings.createComments) {
 			settings= null;
 		}
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(fTypeNode, getImportRewrite());
 
-		MethodDeclaration newMethodDecl= createNewMethodDeclaration(ast, fSuperConstructor, rewrite, settings);
+		MethodDeclaration newMethodDecl= createNewMethodDeclaration(ast, fSuperConstructor, rewrite, importRewriteContext, settings);
 		rewrite.getListRewrite(fTypeNode, TypeDeclaration.BODY_DECLARATIONS_PROPERTY).insertFirst(newMethodDecl, null);
 
 		addLinkedRanges(rewrite, newMethodDecl);
@@ -123,7 +126,7 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 		}
 	}
 
-	private MethodDeclaration createNewMethodDeclaration(AST ast, IMethodBinding binding, ASTRewrite rewrite, CodeGenerationSettings commentSettings) throws CoreException {
+	private MethodDeclaration createNewMethodDeclaration(AST ast, IMethodBinding binding, ASTRewrite rewrite, ImportRewriteContext importRewriteContext, CodeGenerationSettings commentSettings) throws CoreException {
 		String name= fTypeNode.getName().getIdentifier();
 		MethodDeclaration decl= ast.newMethodDeclaration();
 		decl.setConstructor(true);
@@ -138,7 +141,7 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 
 		ITypeBinding enclosingInstance= getEnclosingInstance();
 		if (enclosingInstance != null) {
-			invocation= addEnclosingInstanceAccess(rewrite, parameters, paramNames, enclosingInstance);
+			invocation= addEnclosingInstanceAccess(rewrite, importRewriteContext, parameters, paramNames, enclosingInstance);
 		}
 
 		if (binding == null) {
@@ -149,7 +152,7 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 			ITypeBinding[] params= binding.getParameterTypes();
 			for (int i= 0; i < params.length; i++) {
 				SingleVariableDeclaration var= ast.newSingleVariableDeclaration();
-				var.setType(getImportRewrite().addImport(params[i], ast));
+				var.setType(getImportRewrite().addImport(params[i], ast, importRewriteContext));
 				var.setName(ast.newSimpleName(paramNames[i]));
 				parameters.add(var);
 			}
@@ -157,7 +160,7 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 			List thrownExceptions= decl.thrownExceptions();
 			ITypeBinding[] excTypes= binding.getExceptionTypes();
 			for (int i= 0; i < excTypes.length; i++) {
-				String excTypeName= getImportRewrite().addImport(excTypes[i]);
+				String excTypeName= getImportRewrite().addImport(excTypes[i], importRewriteContext);
 				thrownExceptions.add(ASTNodeFactory.newName(ast, excTypeName));
 			}
 
@@ -189,12 +192,12 @@ public class ConstructorFromSuperclassProposal extends LinkedCorrectionProposal
 		return decl;
 	}
 
-	private SuperConstructorInvocation addEnclosingInstanceAccess(ASTRewrite rewrite, List parameters, String[] paramNames, ITypeBinding enclosingInstance) {
+	private SuperConstructorInvocation addEnclosingInstanceAccess(ASTRewrite rewrite, ImportRewriteContext importRewriteContext, List parameters, String[] paramNames, ITypeBinding enclosingInstance) {
 		AST ast= rewrite.getAST();
 		SuperConstructorInvocation invocation= ast.newSuperConstructorInvocation();
 
 		SingleVariableDeclaration var= ast.newSingleVariableDeclaration();
-		var.setType(getImportRewrite().addImport(enclosingInstance, ast));
+		var.setType(getImportRewrite().addImport(enclosingInstance, ast, importRewriteContext));
 		String[] enclosingArgNames= StubUtility.getArgumentNameSuggestions(getCompilationUnit().getJavaProject(), enclosingInstance.getTypeDeclaration().getName(), 0, paramNames);
 		String firstName= enclosingArgNames[0];
 		var.setName(ast.newSimpleName(firstName));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/FixCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/FixCorrectionProposal.java
index 229b17d..17c8ae0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/FixCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/FixCorrectionProposal.java
@@ -247,12 +247,7 @@ public class FixCorrectionProposal extends CUCorrectionProposal implements IComp
 		if (fCleanUp == null)
 			return null;
 
-		int count;
-		if (fCleanUp instanceof IMultiFix) {
-			count= ((IMultiFix)fCleanUp).computeNumberOfFixes(fCompilationUnit);
-		} else {
-			count= -1;
-		}
+		int count= computeNumberOfFixesForCleanUp(fCleanUp);
 
 		if (count == -1) {
 			return CorrectionMessages.FixCorrectionProposal_HitCtrlEnter_description;
@@ -262,4 +257,15 @@ public class FixCorrectionProposal extends CUCorrectionProposal implements IComp
 			return Messages.format(CorrectionMessages.FixCorrectionProposal_hitCtrlEnter_variable_description, new Integer(count));
 		}
 	}
+
+	/**
+	 * Compute the number of problems that can be fixed by the clean up in a compilation unit.
+	 * 
+	 * @param cleanUp the clean up
+	 * @return the maximum number of fixes or -1 if unknown
+	 * @since 3.6
+	 */
+	public int computeNumberOfFixesForCleanUp(ICleanUp cleanUp) {
+		return cleanUp instanceof IMultiFix ? ((IMultiFix)cleanUp).computeNumberOfFixes(fCompilationUnit) : -1;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ImplementInterfaceProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ImplementInterfaceProposal.java
index a280d17..4347924 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ImplementInterfaceProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/ImplementInterfaceProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,8 +23,10 @@ import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
@@ -68,7 +70,8 @@ public class ImplementInterfaceProposal extends LinkedCorrectionProposal {
 			AST ast= declNode.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
-			Type newInterface= imports.addImport(fNewInterface, ast);
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(declNode, imports);
+			Type newInterface= imports.addImport(fNewInterface, ast, importRewriteContext);
 			ListRewrite listRewrite= rewrite.getListRewrite(declNode, TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY);
 			listRewrite.insertLast(newInterface, null);
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java
index 90cfb41..d1a6cde 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/LinkedNamesAssistProposal.java
@@ -42,10 +42,10 @@ import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;
 
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.SharedASTProvider;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/MissingAnnotationAttributesProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/MissingAnnotationAttributesProposal.java
index cdb0921..d8a909d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/MissingAnnotationAttributesProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/MissingAnnotationAttributesProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.CoreException;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.Annotation;
 import org.eclipse.jdt.core.dom.ArrayInitializer;
 import org.eclipse.jdt.core.dom.CompilationUnit;
@@ -32,8 +33,12 @@ import org.eclipse.jdt.core.dom.NormalAnnotation;
 import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
+
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 import org.eclipse.jdt.internal.ui.text.correction.CorrectionMessages;
 
 public class MissingAnnotationAttributesProposal extends LinkedCorrectionProposal {
@@ -85,6 +90,11 @@ public class MissingAnnotationAttributesProposal extends LinkedCorrectionProposa
 		}
 		ASTRewrite rewriter= listRewriter.getASTRewrite();
 		AST ast= rewriter.getAST();
+		ImportRewriteContext context= null;
+		ASTNode bodyDeclaration= ASTResolving.findParentBodyDeclaration(listRewriter.getParent());
+		if (bodyDeclaration != null) {
+			context= new ContextSensitiveImportRewriteContext(bodyDeclaration, getImportRewrite());
+		}
 
 		IMethodBinding[] declaredMethods= binding.getDeclaredMethods();
 		for (int i= 0; i < declaredMethods.length; i++) {
@@ -92,7 +102,7 @@ public class MissingAnnotationAttributesProposal extends LinkedCorrectionProposa
 			if (!implementedAttribs.contains(curr.getName()) && curr.getDefaultValue() == null) {
 				MemberValuePair pair= ast.newMemberValuePair();
 				pair.setName(ast.newSimpleName(curr.getName()));
-				pair.setValue(newDefaultExpression(ast, curr.getReturnType()));
+				pair.setValue(newDefaultExpression(ast, curr.getReturnType(), context));
 				listRewriter.insertLast(pair, null);
 
 				addLinkedPosition(rewriter.track(pair.getName()), false, "val_name_" + i); //$NON-NLS-1$
@@ -101,7 +111,7 @@ public class MissingAnnotationAttributesProposal extends LinkedCorrectionProposa
 		}
 	}
 
-	private Expression newDefaultExpression(AST ast, ITypeBinding type) {
+	private Expression newDefaultExpression(AST ast, ITypeBinding type, ImportRewriteContext context) {
 		if (type.isPrimitive()) {
 			String name= type.getName();
 			if ("boolean".equals(name)) { //$NON-NLS-1$
@@ -115,12 +125,12 @@ public class MissingAnnotationAttributesProposal extends LinkedCorrectionProposa
 		}
 		if (type.isArray()) {
 			ArrayInitializer initializer= ast.newArrayInitializer();
-			initializer.expressions().add(newDefaultExpression(ast, type.getElementType()));
+			initializer.expressions().add(newDefaultExpression(ast, type.getElementType(), context));
 			return initializer;
 		}
 		if (type.isAnnotation()) {
 			MarkerAnnotation annotation= ast.newMarkerAnnotation();
-			annotation.setTypeName(ast.newName(getImportRewrite().addImport(type)));
+			annotation.setTypeName(ast.newName(getImportRewrite().addImport(type, context)));
 			return annotation;
 		}
 		return ast.newNullLiteral();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewAnnotationMemberProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewAnnotationMemberProposal.java
index c2d3e28..b6f1e42 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewAnnotationMemberProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewAnnotationMemberProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,8 +29,10 @@ import org.eclipse.jdt.core.dom.MemberValuePair;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 
@@ -109,7 +111,8 @@ public class NewAnnotationMemberProposal extends LinkedCorrectionProposal {
 			binding= ((Expression) fInvocationNode).resolveTypeBinding();
 		}
 		if (binding != null) {
-			newTypeNode= getImportRewrite().addImport(binding, ast);
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(fInvocationNode, getImportRewrite());
+			newTypeNode= getImportRewrite().addImport(binding, ast, importRewriteContext);
 		}
 		if (newTypeNode == null) {
 			newTypeNode= ast.newSimpleType(ast.newSimpleName("String")); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewMethodCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewMethodCorrectionProposal.java
index 1d80b7a..1b7e114 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewMethodCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewMethodCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,7 +40,9 @@ import org.eclipse.jdt.core.dom.SuperMethodInvocation;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
@@ -167,12 +169,13 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 		Type newTypeNode= null;
 		ITypeBinding[] otherProposals= null;
 
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(node, getImportRewrite());
 		if (node.getParent() instanceof MethodInvocation) {
 			MethodInvocation parent= (MethodInvocation) node.getParent();
 			if (parent.getExpression() == node) {
 				ITypeBinding[] bindings= ASTResolving.getQualifierGuess(node.getRoot(), parent.getName().getIdentifier(), parent.arguments(), getSenderBinding());
 				if (bindings.length > 0) {
-					newTypeNode= getImportRewrite().addImport(bindings[0], ast);
+					newTypeNode= getImportRewrite().addImport(bindings[0], ast, importRewriteContext);
 					otherProposals= bindings;
 				}
 			}
@@ -183,7 +186,7 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 				binding= ASTResolving.normalizeWildcardType(binding, false, ast);
 			}
 			if (binding != null) {
-				newTypeNode= getImportRewrite().addImport(binding, ast);
+				newTypeNode= getImportRewrite().addImport(binding, ast, importRewriteContext);
 			} else {
 				ASTNode parent= node.getParent();
 				if (parent instanceof ExpressionStatement) {
@@ -214,6 +217,7 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 		AST ast= rewrite.getAST();
 
 		List arguments= fArguments;
+		ImportRewriteContext context= new ContextSensitiveImportRewriteContext(ASTResolving.findParentBodyDeclaration(getInvocationNode()), getImportRewrite());
 
 		for (int i= 0; i < arguments.size(); i++) {
 			Expression elem= (Expression) arguments.get(i);
@@ -221,7 +225,7 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 
 			// argument type
 			String argTypeKey= "arg_type_" + i; //$NON-NLS-1$
-			Type type= evaluateParameterType(ast, elem, argTypeKey);
+			Type type= evaluateParameterType(ast, elem, argTypeKey, context);
 			param.setType(type);
 
 			// argument name
@@ -236,7 +240,7 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 		}
 	}
 
-	private Type evaluateParameterType(AST ast, Expression elem, String key) {
+	private Type evaluateParameterType(AST ast, Expression elem, String key, ImportRewriteContext context) {
 		ITypeBinding binding= Bindings.normalizeTypeBinding(elem.resolveTypeBinding());
 		if (binding != null && binding.isWildcardType()) {
 			binding= ASTResolving.normalizeWildcardType(binding, true, ast);
@@ -246,7 +250,7 @@ public class NewMethodCorrectionProposal extends AbstractMethodCorrectionProposa
 			for (int i= 0; i < typeProposals.length; i++) {
 				addLinkedPositionProposal(key, typeProposals[i]);
 			}
-			return getImportRewrite().addImport(binding, ast);
+			return getImportRewrite().addImport(binding, ast, context);
 		}
 		return ast.newSimpleType(ast.newSimpleName("Object")); //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewVariableCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewVariableCorrectionProposal.java
index a35fe9e..9c58ccb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewVariableCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/NewVariableCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,8 +58,10 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
+import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
 import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
@@ -127,17 +129,16 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
 			ImportRewrite imports= createImportRewrite((CompilationUnit) decl.getRoot());
+			ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(decl, imports);
 
 			SingleVariableDeclaration newDecl= ast.newSingleVariableDeclaration();
-			newDecl.setType(evaluateVariableType(ast, imports, methodDeclaration.resolveBinding()));
+			newDecl.setType(evaluateVariableType(ast, imports, importRewriteContext, methodDeclaration.resolveBinding()));
 			newDecl.setName(ast.newSimpleName(node.getIdentifier()));
 
 			ListRewrite listRewriter= rewrite.getListRewrite(decl, MethodDeclaration.PARAMETERS_PROPERTY);
 			listRewriter.insertLast(newDecl, null);
 
-			addLinkedPosition(rewrite.track(newDecl.getType()), false, KEY_TYPE);
 			addLinkedPosition(rewrite.track(node), true, KEY_NAME);
-			addLinkedPosition(rewrite.track(newDecl.getName()), false, KEY_NAME);
 
 			// add javadoc tag
 			Javadoc javadoc= methodDeclaration.getJavadoc();
@@ -155,12 +156,15 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 				TextElement commentStart= ast.newTextElement();
 				newTagElement.fragments().add(commentStart);
 
-				addLinkedPosition(rewrite.track(newTagRef), true, KEY_NAME);
+				addLinkedPosition(rewrite.track(newTagRef), false, KEY_NAME);
 				addLinkedPosition(rewrite.track(commentStart), false, "comment_start"); //$NON-NLS-1$
 
 				ListRewrite tagsRewriter= rewrite.getListRewrite(javadoc, Javadoc.TAGS_PROPERTY);
 				JavadocTagsSubProcessor.insertTag(tagsRewriter, newTagElement, leadingNames);
 			}
+			
+			addLinkedPosition(rewrite.track(newDecl.getType()), false, KEY_TYPE);
+			addLinkedPosition(rewrite.track(newDecl.getName()), false, KEY_NAME);
 
 			return rewrite;
 		}
@@ -209,6 +213,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
 		ImportRewrite imports= createImportRewrite((CompilationUnit) decl.getRoot());
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(decl, imports);
 
 		SimpleName[] names= getAllReferences(body);
 		ASTNode dominant= getDominantNode(names);
@@ -228,7 +233,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 			// and replace the assignment with an VariableDeclarationExpression
 			VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();
 			VariableDeclarationExpression newDecl= ast.newVariableDeclarationExpression(newDeclFrag);
-			newDecl.setType(evaluateVariableType(ast, imports, targetContext));
+			newDecl.setType(evaluateVariableType(ast, imports, importRewriteContext, targetContext));
 
 			Expression placeholder= (Expression) rewrite.createCopyTarget(assignment.getRightHandSide());
 			newDeclFrag.setInitializer(placeholder);
@@ -251,7 +256,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 			frag.setName(ast.newSimpleName(node.getIdentifier()));
 			Expression placeholder= (Expression) rewrite.createCopyTarget(assignment.getRightHandSide());
 			frag.setInitializer(placeholder);
-			expression.setType(evaluateVariableType(ast, imports, targetContext));
+			expression.setType(evaluateVariableType(ast, imports, importRewriteContext, targetContext));
 
 			rewrite.replace(assignment, expression, null);
 
@@ -268,7 +273,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 		VariableDeclarationStatement newDecl= ast.newVariableDeclarationStatement(newDeclFrag);
 
 		newDeclFrag.setName(ast.newSimpleName(node.getIdentifier()));
-		newDecl.setType(evaluateVariableType(ast, imports, targetContext));
+		newDecl.setType(evaluateVariableType(ast, imports, importRewriteContext, targetContext));
 //		newDeclFrag.setInitializer(ASTNodeFactory.newDefaultExpression(ast, newDecl.getType(), 0));
 
 		addLinkedPosition(rewrite.track(newDecl.getType()), false, KEY_TYPE);
@@ -351,6 +356,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 			isInDifferentCU= true;
 		}
 		ImportRewrite imports= createImportRewrite(astRoot);
+		ImportRewriteContext importRewriteContext= new ContextSensitiveImportRewriteContext(ASTResolving.findParentBodyDeclaration(node), imports);
 
 		if (newTypeDecl != null) {
 			AST ast= newTypeDecl.getAST();
@@ -360,7 +366,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 			VariableDeclarationFragment fragment= ast.newVariableDeclarationFragment();
 			fragment.setName(ast.newSimpleName(node.getIdentifier()));
 
-			Type type= evaluateVariableType(ast, imports, fSenderBinding);
+			Type type= evaluateVariableType(ast, imports, importRewriteContext, fSenderBinding);
 
 			FieldDeclaration newDecl= ast.newFieldDeclaration(fragment);
 			newDecl.setType(type);
@@ -409,7 +415,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 		return ASTNodes.getInsertionIndex(newDecl, decls);
 	}
 
-	private Type evaluateVariableType(AST ast, ImportRewrite imports, IBinding targetContext) {
+	private Type evaluateVariableType(AST ast, ImportRewrite imports, ImportRewriteContext importRewriteContext, IBinding targetContext) {
 		if (fOriginalNode.getParent() instanceof MethodInvocation) {
 			MethodInvocation parent= (MethodInvocation) fOriginalNode.getParent();
 			if (parent.getExpression() == fOriginalNode) {
@@ -419,7 +425,7 @@ public class NewVariableCorrectionProposal extends LinkedCorrectionProposal {
 					for (int i= 0; i < bindings.length; i++) {
 						addLinkedPositionProposal(KEY_TYPE, bindings[i]);
 					}
-					return imports.addImport(bindings[0], ast);
+					return imports.addImport(bindings[0], ast, importRewriteContext);
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RemoveDeclarationCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RemoveDeclarationCorrectionProposal.java
index 9c5f719..4edf739 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RemoveDeclarationCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RemoveDeclarationCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.PostfixExpression;
 import org.eclipse.jdt.core.dom.PrefixExpression;
 import org.eclipse.jdt.core.dom.QualifiedName;
@@ -45,7 +46,6 @@ import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.SharedASTProvider;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RenameNodeCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RenameNodeCorrectionProposal.java
index c922ceb..ddd70a8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RenameNodeCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/RenameNodeCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,11 +20,10 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 
 import org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
-
 import org.eclipse.jdt.ui.SharedASTProvider;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/TypeChangeCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/TypeChangeCorrectionProposal.java
index 5b634ef..db87110 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/TypeChangeCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/proposals/TypeChangeCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,8 +25,12 @@ import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.PrimitiveType;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.TagElement;
+import org.eclipse.jdt.core.dom.TextElement;
 import org.eclipse.jdt.core.dom.Type;
 import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
@@ -45,6 +49,7 @@ import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 import org.eclipse.jdt.internal.ui.text.correction.CorrectionMessages;
+import org.eclipse.jdt.internal.ui.text.correction.JavadocTagsSubProcessor;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider;
 
@@ -102,8 +107,27 @@ public class TypeChangeCorrectionProposal extends LinkedCorrectionProposal {
 
 			if (declNode instanceof MethodDeclaration) {
 				MethodDeclaration methodDecl= (MethodDeclaration) declNode;
+				Type origReturnType= methodDecl.getReturnType2();
 				rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE2_PROPERTY, type, null);
 				rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
+				// add javadoc tag
+				Javadoc javadoc= methodDecl.getJavadoc();
+				if (javadoc != null && origReturnType != null && origReturnType.isPrimitiveType()
+						&& ((PrimitiveType) origReturnType).getPrimitiveTypeCode() == PrimitiveType.VOID) {
+					
+					TagElement returnTag= JavadocTagsSubProcessor.findTag(javadoc, TagElement.TAG_RETURN, null);
+					if (returnTag == null) {
+						returnTag= ast.newTagElement();
+						returnTag.setTagName(TagElement.TAG_RETURN);
+						TextElement commentStart= ast.newTextElement();
+						returnTag.fragments().add(commentStart);
+						addLinkedPosition(rewrite.track(commentStart), false, "comment_start"); //$NON-NLS-1$
+						
+						ListRewrite tagsRewriter= rewrite.getListRewrite(javadoc, Javadoc.TAGS_PROPERTY);
+						JavadocTagsSubProcessor.insertTag(tagsRewriter, returnTag, null);
+					}
+				}
+
 			} else if (declNode instanceof AnnotationTypeMemberDeclaration) {
 				AnnotationTypeMemberDeclaration methodDecl= (AnnotationTypeMemberDeclaration) declNode;
 				rewrite.set(methodDecl, AnnotationTypeMemberDeclaration.TYPE_PROPERTY, type, null);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
index f6f3983..18cbab7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,11 +52,13 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.IPositionUpdater;
 import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextPresentationListener;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension2;
+import org.eclipse.jface.text.ITextViewerExtension4;
 import org.eclipse.jface.text.ITextViewerExtension5;
 import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextPresentation;
 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension;
 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;
 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3;
@@ -66,10 +68,14 @@ import org.eclipse.jface.text.contentassist.IContextInformation;
 import org.eclipse.jface.text.link.ILinkedModeListener;
 import org.eclipse.jface.text.link.LinkedModeModel;
 import org.eclipse.jface.text.link.LinkedModeUI;
-import org.eclipse.jface.text.link.LinkedPosition;
-import org.eclipse.jface.text.link.LinkedPositionGroup;
 import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags;
 import org.eclipse.jface.text.link.LinkedModeUI.IExitPolicy;
+import org.eclipse.jface.text.link.LinkedPosition;
+import org.eclipse.jface.text.link.LinkedPositionGroup;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchSite;
 
 import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;
 
@@ -238,6 +244,12 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 	 */
 	private boolean fIsValidated= true;
 
+	/**
+	 * The text presentation listener.
+	 * @since 3.6
+	 */
+	private ITextPresentationListener fTextPresentationListener;
+
 	protected AbstractJavaCompletionProposal() {
 		fInvocationContext= null;
 	}
@@ -345,11 +357,6 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 		}
 
 		try {
-			// patch replacement length
-			int delta= offset - (getReplacementOffset() + getReplacementLength());
-			if (delta > 0)
-				setReplacementLength(getReplacementLength() + delta);
-
 			boolean isSmartTrigger= isSmartTrigger(trigger);
 
 			String replacement;
@@ -898,31 +905,70 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 
 	private void repairPresentation(ITextViewer viewer) {
 		if (fRememberedStyleRange != null) {
-			 if (viewer instanceof ITextViewerExtension2) {
-			 	// attempts to reduce the redraw area
-			 	ITextViewerExtension2 viewer2= (ITextViewerExtension2) viewer;
-
-			 	if (viewer instanceof ITextViewerExtension5) {
-
-			 		ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
-			 		IRegion modelRange= extension.widgetRange2ModelRange(new Region(fRememberedStyleRange.start, fRememberedStyleRange.length));
-			 		if (modelRange != null)
-			 			viewer2.invalidateTextPresentation(modelRange.getOffset(), modelRange.getLength());
-
-			 	} else {
-					viewer2.invalidateTextPresentation(fRememberedStyleRange.start + viewer.getVisibleRegion().getOffset(), fRememberedStyleRange.length);
-			 	}
-
+			if (viewer instanceof ITextViewerExtension2) {
+				// attempts to reduce the redraw area
+				ITextViewerExtension2 viewer2= (ITextViewerExtension2)viewer;
+				viewer2.invalidateTextPresentation(fRememberedStyleRange.start, fRememberedStyleRange.length);
 			} else
 				viewer.invalidateTextPresentation();
 		}
 	}
 
 	private void updateStyle(ITextViewer viewer) {
+		StyledText text= viewer.getTextWidget();
+		int widgetOffset= getWidgetOffset(viewer, fRememberedStyleRange.start);
+		StyleRange range= new StyleRange(fRememberedStyleRange);
+		range.start= widgetOffset;
+		range.length= fRememberedStyleRange.length;
+		StyleRange currentRange= text.getStyleRangeAtOffset(widgetOffset);
+		if (currentRange != null) {
+			range.strikeout= currentRange.strikeout;
+			range.underline= currentRange.underline;
+			range.fontStyle= currentRange.fontStyle;
+		}
+
+		// http://dev.eclipse.org/bugs/show_bug.cgi?id=34754
+		try {
+			text.setStyleRange(range);
+		} catch (IllegalArgumentException x) {
+			// catching exception as offset + length might be outside of the text widget
+			fRememberedStyleRange= null;
+		}
+	}
+
+	/**
+	 * Convert a document offset to the corresponding widget offset.
+	 * 
+	 * @param viewer the text viewer
+	 * @param documentOffset the document offset
+	 * @return widget offset
+	 * @since 3.6
+	 */
+	private int getWidgetOffset(ITextViewer viewer, int documentOffset) {
+		if (viewer instanceof ITextViewerExtension5) {
+			ITextViewerExtension5 extension= (ITextViewerExtension5)viewer;
+			return extension.modelOffset2WidgetOffset(documentOffset);
+		}
+		IRegion visible= viewer.getVisibleRegion();
+		int widgetOffset= documentOffset - visible.getOffset();
+		if (widgetOffset > visible.getLength()) {
+			return -1;
+		}
+		return widgetOffset;
+	}
 
+
+	/**
+	 * Creates a style range for the text viewer.
+	 * 
+	 * @param viewer the text viewer
+	 * @return the new style range for the text viewer or <code>null</code>
+	 * @since 3.6
+	 */
+	private StyleRange createStyleRange(ITextViewer viewer) {
 		StyledText text= viewer.getTextWidget();
 		if (text == null || text.isDisposed())
-			return;
+			return null;
 
 		int widgetCaret= text.getCaretOffset();
 
@@ -935,45 +981,48 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 			modelCaret= widgetCaret + visibleRegion.getOffset();
 		}
 
-		if (modelCaret >= getReplacementOffset() + getReplacementLength()) {
-			repairPresentation(viewer);
-			return;
-		}
+		if (modelCaret >= getReplacementOffset() + getReplacementLength())
+			return null;
 
-		int offset= widgetCaret;
 		int length= getReplacementOffset() + getReplacementLength() - modelCaret;
 
 		Color foreground= getForegroundColor();
 		Color background= getBackgroundColor();
 
-		StyleRange range= text.getStyleRangeAtOffset(offset);
-		int fontStyle= range != null ? range.fontStyle : SWT.NORMAL;
-
-		repairPresentation(viewer);
-		fRememberedStyleRange= new StyleRange(offset, length, foreground, background, fontStyle);
-		if (range != null) {
-			fRememberedStyleRange.strikeout= range.strikeout;
-			fRememberedStyleRange.underline= range.underline;
-		}
-
-		// http://dev.eclipse.org/bugs/show_bug.cgi?id=34754
-		try {
-			text.setStyleRange(fRememberedStyleRange);
-		} catch (IllegalArgumentException x) {
-			// catching exception as offset + length might be outside of the text widget
-			fRememberedStyleRange= null;
-		}
+		return new StyleRange(modelCaret, length, foreground, background);
 	}
 
 	/*
 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(ITextViewer, boolean)
 	 */
-	public void selected(ITextViewer viewer, boolean smartToggle) {
-		if (!insertCompletion() ^ smartToggle)
-			updateStyle(viewer);
-		else {
-			repairPresentation(viewer);
-			fRememberedStyleRange= null;
+	public void selected(final ITextViewer viewer, boolean smartToggle) {
+		repairPresentation(viewer);
+		fRememberedStyleRange= null;
+
+		if (!insertCompletion() ^ smartToggle) {
+			StyleRange range= createStyleRange(viewer);
+			if (range == null)
+				return;
+			
+			fRememberedStyleRange= range;
+
+			if (viewer instanceof ITextViewerExtension4) {
+				if (fTextPresentationListener == null) {
+					fTextPresentationListener= new ITextPresentationListener() {
+						/* (non-Javadoc)
+						 * @see org.eclipse.jface.text.ITextPresentationListener#applyTextPresentation(org.eclipse.jface.text.TextPresentation)
+						 */
+						public void applyTextPresentation(TextPresentation textPresentation) {
+							fRememberedStyleRange= createStyleRange(viewer);
+							if (fRememberedStyleRange != null)
+								textPresentation.mergeStyleRange(fRememberedStyleRange);
+						}
+					};
+					((ITextViewerExtension4)viewer).addTextPresentationListener(fTextPresentationListener);
+				}
+				repairPresentation(viewer);
+			} else
+				updateStyle(viewer);
 		}
 	}
 
@@ -981,6 +1030,10 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(ITextViewer)
 	 */
 	public void unselected(ITextViewer viewer) {
+		if (fTextPresentationListener != null) {
+			((ITextViewerExtension4)viewer).removeTextPresentationListener(fTextPresentationListener);
+			fTextPresentationListener= null;
+		}
 		repairPresentation(viewer);
 		fRememberedStyleRange= null;
 	}
@@ -996,14 +1049,24 @@ public abstract class AbstractJavaCompletionProposal implements IJavaCompletionP
 		if (fCreator == null) {
 			/*
 			 * FIXME: Take control creators (and link handling) out of JavadocHover,
-			 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=232024
+			 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=232024
 			 */
-			JavadocHover.PresenterControlCreator presenterControlCreator= new JavadocHover.PresenterControlCreator();
+			JavadocHover.PresenterControlCreator presenterControlCreator= new JavadocHover.PresenterControlCreator(getSite());
 			fCreator= new JavadocHover.HoverControlCreator(presenterControlCreator, true);
 		}
 		return fCreator;
 	}
 
+	private IWorkbenchSite getSite() {
+		IWorkbenchPage page= JavaPlugin.getActivePage();
+		if (page != null) {
+			IWorkbenchPart part= page.getActivePart();
+			if (part != null)
+				return part.getSite();
+		}
+		return null;
+	}
+
 	public String getSortString() {
 		return fSortString;
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
index eda0075..e5f69bf 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/AnonymousTypeCompletionProposal.java
@@ -52,6 +52,7 @@ import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
@@ -61,7 +62,6 @@ import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.CodeFormatterUtil;
 import org.eclipse.jdt.internal.corext.util.Strings;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistHistory.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistHistory.java
index 1eb2627..484e614 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistHistory.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ContentAssistHistory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -123,6 +124,7 @@ public final class ContentAssistHistory {
 			Element root;
 			try {
 				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+				parser.setErrorHandler(new DefaultHandler());
 				root = parser.parse(source).getDocumentElement();
 			} catch (SAXException e) {
 				throw createException(e, JavaTextMessages.ContentAssistHistory_deserialize_error);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GetterSetterCompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GetterSetterCompletionProposal.java
index a4dda1e..ac1a30b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GetterSetterCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/GetterSetterCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,13 +57,20 @@ public class GetterSetterCompletionProposal extends JavaTypeCompletionProposal i
 			IField curr= fields[i];
 			if (!JdtFlags.isEnum(curr)) {
 				String getterName= GetterSetterUtil.getGetterName(curr, null);
-				if (Strings.startsWithIgnoreCase(getterName, prefix) && !hasMethod(methods, getterName) && suggestedMethods.add(getterName)) {
-					result.add(new GetterSetterCompletionProposal(curr, offset, length, true, relevance));
+				if (Strings.startsWithIgnoreCase(getterName, prefix) && !hasMethod(methods, getterName)) {
+					suggestedMethods.add(getterName);
+					int getterRelevance= relevance;
+					if (JdtFlags.isStatic(curr) && JdtFlags.isFinal(curr))
+						getterRelevance= relevance - 1;
+					result.add(new GetterSetterCompletionProposal(curr, offset, length, true, getterRelevance));
 				}
 
-				String setterName= GetterSetterUtil.getSetterName(curr, null);
-				if (Strings.startsWithIgnoreCase(setterName, prefix) && !hasMethod(methods, setterName) && suggestedMethods.add(setterName)) {
-					result.add(new GetterSetterCompletionProposal(curr, offset, length, false, relevance));
+				if (!JdtFlags.isFinal(curr)) {
+					String setterName= GetterSetterUtil.getSetterName(curr, null);
+					if (Strings.startsWithIgnoreCase(setterName, prefix) && !hasMethod(methods, setterName)) {
+						suggestedMethods.add(setterName);
+						result.add(new GetterSetterCompletionProposal(curr, offset, length, false, relevance));
+					}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
index bc437e9..7c51a51 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,17 +50,18 @@ import org.eclipse.jdt.core.dom.DoStatement;
 import org.eclipse.jdt.core.dom.Expression;
 import org.eclipse.jdt.core.dom.ForStatement;
 import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.Statement;
 import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.CodeFormatterUtil;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
 import org.eclipse.jdt.ui.text.IJavaPartitions;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
 import org.eclipse.jdt.internal.ui.text.FastJavaPartitionScanner;
 import org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner;
 import org.eclipse.jdt.internal.ui.text.JavaIndenter;
@@ -647,7 +648,8 @@ public class JavaAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
 				return;
 			int peerOffset= getPeerPosition(document, command);
 			peerOffset= indenter.findReferencePosition(peerOffset);
-			refOffset= Math.min(refOffset, peerOffset);
+			if (peerOffset != JavaHeuristicScanner.NOT_FOUND)
+				refOffset= Math.min(refOffset, peerOffset);
 
 			// eat any WS before the insertion to the beginning of the line
 			int firstLine= 1; // don't format the first line per default, as it has other content before it
@@ -1270,6 +1272,10 @@ public class JavaAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy {
 			if (part instanceof ITextEditorExtension3) {
 				ITextEditorExtension3 extension= (ITextEditorExtension3) part;
 				return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
+			} else if (part != null && EditorUtility.isCompareEditorInput(part.getEditorInput())) {
+				ITextEditorExtension3 extension = (ITextEditorExtension3)part.getAdapter(ITextEditorExtension3.class);
+				if (extension != null)
+					return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
 			}
 		}
 		return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.java
index bf19be6..867d71f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,7 +35,6 @@ final class JavaTextMessages extends NLS {
 	public static String ContentAssistProcessor_all_disabled_title;
 	public static String FilledArgumentNamesMethodProposal_error_msg;
 	public static String ParameterGuessingProposal_error_msg;
-	public static String ProposalInfo_more_to_come;
 	public static String GetterSetterCompletionProposal_getter_label;
 	public static String GetterSetterCompletionProposal_setter_label;
 	public static String MethodCompletionProposal_constructor_label;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.properties
index e27a5ca..ccd55cd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTextMessages.properties
@@ -41,8 +41,6 @@ ProposalSorterHandle_blame= Found a problem with the ''{0}'' ({1}) extension to
 FilledArgumentNamesMethodProposal_error_msg=Error inserting parameters
 ParameterGuessingProposal_error_msg=Error guessing parameters
 
-ProposalInfo_more_to_come=\ ...
-
 GetterSetterCompletionProposal_getter_label=Getter for ''{0}''
 GetterSetterCompletionProposal_setter_label=Setter for ''{0}''
 MethodCompletionProposal_constructor_label=Default constructor
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyGenericTypeProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyGenericTypeProposal.java
index 0f2b91d..eaeef0f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyGenericTypeProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyGenericTypeProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,7 +54,9 @@ import org.eclipse.jdt.core.dom.ASTRequestor;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 
+import org.eclipse.jdt.internal.corext.dom.Bindings;
 import org.eclipse.jdt.internal.corext.template.java.SignatureUtil;
+import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
 
@@ -126,7 +128,7 @@ public final class LazyGenericTypeProposal extends LazyJavaTypeCompletionProposa
 					if (i < proposals.length - 1)
 						buf.append(", "); //$NON-NLS-1$
 				}
-				return buf.toString();
+				return Strings.markJavaElementLabelLTR(buf.toString());
 
 			} catch (JavaModelException e) {
 				return null;
@@ -403,7 +405,7 @@ public final class LazyGenericTypeProposal extends LazyJavaTypeCompletionProposa
 	 * @see #computeTypeProposal(ITypeParameter)
 	 */
 	private TypeArgumentProposal computeTypeProposal(ITypeBinding binding, ITypeParameter parameter) throws JavaModelException {
-		final String name= binding.getName();
+		final String name= Bindings.getTypeQualifiedName(binding);
 		if (binding.isWildcardType()) {
 
 			if (binding.isUpperbound()) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaTypeCompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaTypeCompletionProposal.java
index 4f08ad6..5141c8b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaTypeCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaTypeCompletionProposal.java
@@ -97,6 +97,11 @@ public class LazyJavaTypeCompletionProposal extends LazyJavaCompletionProposal {
 			 return getSimpleTypeName();
 
 		String qualifiedTypeName= getQualifiedTypeName();
+
+		// Type in package info must be fully qualified.
+		if (fCompilationUnit != null && JavaModelUtil.isPackageInfo(fCompilationUnit))
+			return qualifiedTypeName;
+
  		if (qualifiedTypeName.indexOf('.') == -1)
  			// default package - no imports needed
  			return qualifiedTypeName;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/OverrideCompletionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/OverrideCompletionProposal.java
index 701685c..9d729f4 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/OverrideCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/OverrideCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
@@ -49,8 +50,6 @@ import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRe
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
-
 import org.eclipse.jdt.ui.SharedASTProvider;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/PartitionDoubleClickSelector.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/PartitionDoubleClickSelector.java
index ece2a67..af7806e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/PartitionDoubleClickSelector.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/PartitionDoubleClickSelector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ public class PartitionDoubleClickSelector extends DefaultTextDoubleClickStrategy
 
 	int fLeftBorder;
 	int fRightBorder;
+	int fHitDelta;
 
 
 	/**
@@ -41,9 +42,24 @@ public class PartitionDoubleClickSelector extends DefaultTextDoubleClickStrategy
 	 * @param rightBorder number of characters to ignore from the right border of the partition
 	 */
 	public PartitionDoubleClickSelector(String partitioning, int leftBorder, int rightBorder) {
+		this(partitioning, leftBorder, rightBorder, 1);
+	}
+
+	/**
+	 * Creates a new partition double click selector for the given document partitioning.
+	 * 
+	 * @param partitioning the document partitioning
+	 * @param leftBorder number of characters to ignore from the left border of the partition
+	 * @param rightBorder number of characters to ignore from the right border of the partition
+	 * @param hitDeltaOffset character offset delta relative to partition borders used to define the
+	 *            trigger character
+	 * @since 3.6
+	 */
+	public PartitionDoubleClickSelector(String partitioning, int leftBorder, int rightBorder, int hitDeltaOffset) {
 		fPartitioning= partitioning;
 		fLeftBorder= leftBorder;
 		fRightBorder= rightBorder;
+		fHitDelta= hitDeltaOffset;
 	}
 
 	/*
@@ -57,7 +73,7 @@ public class PartitionDoubleClickSelector extends DefaultTextDoubleClickStrategy
 
 		try {
 			ITypedRegion region= TextUtilities.getPartition(document, fPartitioning, offset, true);
-			if (offset == region.getOffset() + 1 || offset == region.getOffset() + region.getLength() - 1) {
+			if (offset == region.getOffset() + fHitDelta || offset == region.getOffset() + region.getLength() - fHitDelta) {
 				if (fLeftBorder == 0 && fRightBorder == 0)
 					return region;
 				if (fRightBorder == -1) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java
index 7dbcdf0..471eb89 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AbstractAnnotationHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,9 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.text.java.hover;
 
+import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
@@ -62,6 +64,7 @@ import org.eclipse.jface.text.IInformationControlExtension2;
 import org.eclipse.jface.text.IInformationControlExtension4;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.IRewriteTarget;
+import org.eclipse.jface.text.ITextHoverExtension2;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension;
 import org.eclipse.jface.text.Position;
@@ -88,6 +91,7 @@ import org.eclipse.jdt.internal.corext.util.Messages;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaAnnotationIterator;
+import org.eclipse.jdt.internal.ui.text.correction.proposals.FixCorrectionProposal;
 
 
 /**
@@ -359,19 +363,24 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 
 			Composite composite= new Composite(scrolledComposite, SWT.NONE);
 			composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-			GridLayout layout= new GridLayout(3, false);
+			GridLayout layout= new GridLayout(2, false);
+			layout.marginLeft= 5;
 			layout.verticalSpacing= 2;
 			composite.setLayout(layout);
-
-			final Link[] links= new Link[proposals.length];
+			
+			List list= new ArrayList();
 			for (int i= 0; i < proposals.length; i++) {
-				Label indent= new Label(composite, SWT.NONE);
-				GridData gridData1= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
-				gridData1.widthHint= 0;
-				indent.setLayoutData(gridData1);
+				list.add(createCompletionProposalLink(composite, proposals[i], 1));// Original link for single fix, hence pass 1 for count
 
-				links[i]= createCompletionProposalLink(composite, proposals[i]);
+				if (proposals[i] instanceof FixCorrectionProposal) {
+					FixCorrectionProposal proposal= (FixCorrectionProposal)proposals[i];
+					int count= proposal.computeNumberOfFixesForCleanUp(proposal.getCleanUp());
+					if (count > 1) {
+						list.add(createCompletionProposalLink(composite, proposals[i], count));
+					}
+				}
 			}
+			final Link[] links= (Link[])list.toArray(new Link[list.size()]);
 
 			scrolledComposite.setContent(composite);
 			setColorAndFont(scrolledComposite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont());
@@ -441,10 +450,20 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 			}
 		}
 
-		private Link createCompletionProposalLink(Composite parent, final ICompletionProposal proposal) {
+		private Link createCompletionProposalLink(Composite parent, final ICompletionProposal proposal, int count) {
+			final boolean isMultiFix= count > 1;
+			if (isMultiFix) {
+				new Label(parent, SWT.NONE); // spacer to fill image cell
+				parent= new Composite(parent, SWT.NONE); // indented composite for multi-fix
+				GridLayout layout= new GridLayout(2, false);
+				layout.marginWidth= 0;
+				layout.marginHeight= 0;
+				parent.setLayout(layout);
+			}
+			
 			Label proposalImage= new Label(parent, SWT.NONE);
 			proposalImage.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
-			Image image= proposal.getImage();
+			Image image= isMultiFix ? JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_MULTI_FIX) : proposal.getImage();
 			if (image != null) {
 				proposalImage.setImage(image);
 
@@ -458,7 +477,7 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 
 					public void mouseUp(MouseEvent e) {
 						if (e.button == 1) {
-							apply(proposal, fInput.viewer, fInput.position.offset);
+							apply(proposal, fInput.viewer, fInput.position.offset, isMultiFix);
 						}
 					}
 
@@ -466,21 +485,27 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 			}
 
 			Link proposalLink= new Link(parent, SWT.WRAP);
-			proposalLink.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
-			proposalLink.setText("<a>" + proposal.getDisplayString() + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
+			GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
+			String linkText;
+			if (isMultiFix) {
+				linkText= Messages.format(JavaHoverMessages.AbstractAnnotationHover_multifix_variable_description, new Integer(count));
+			} else {
+				linkText= proposal.getDisplayString();
+			}
+			proposalLink.setText("<a>" + linkText + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
+			proposalLink.setLayoutData(layoutData);
 			proposalLink.addSelectionListener(new SelectionAdapter() {
 				/*
 				 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
 				 */
 				public void widgetSelected(SelectionEvent e) {
-					apply(proposal, fInput.viewer, fInput.position.offset);
+					apply(proposal, fInput.viewer, fInput.position.offset, isMultiFix);
 				}
 			});
-
 			return proposalLink;
 		}
 
-		private void apply(ICompletionProposal p, ITextViewer viewer, int offset) {
+		private void apply(ICompletionProposal p, ITextViewer viewer, int offset, boolean isMultiFix) {
 			//Focus needs to be in the text viewer, otherwise linked mode does not work
 			dispose();
 
@@ -498,7 +523,7 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 
 				if (p instanceof ICompletionProposalExtension2) {
 					ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p;
-					e.apply(viewer, (char) 0, SWT.NONE, offset);
+					e.apply(viewer, (char) 0, isMultiFix ? SWT.CONTROL : SWT.NONE, offset);
 				} else if (p instanceof ICompletionProposalExtension) {
 					ICompletionProposalExtension e= (ICompletionProposalExtension) p;
 					e.apply(document, (char) 0, offset);
@@ -630,7 +655,8 @@ public abstract class AbstractAnnotationHover extends AbstractJavaEditorTextHove
 		fAllAnnotations= allAnnotations;
 	}
 
-	/*
+	/**
+	 * @deprecated As of 3.4, replaced by {@link ITextHoverExtension2#getHoverInfo2(ITextViewer, IRegion)}
 	 * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
 	 */
 	public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java
index 33a6cd1..db3b56c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationExpansionControl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -241,7 +241,7 @@ public class AnnotationExpansionControl implements IInformationControl, IInforma
 
 		/*
 		 * Using mouseDown as mouseUp isn't fired on some Platforms, for
-		 * details see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=165533
+		 * details see https://bugs.eclipse.org/bugs/show_bug.cgi?id=165533
 		 *
 		 * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
 		 */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/BestMatchHover.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/BestMatchHover.java
index a53ab8e..a89b0f0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/BestMatchHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/BestMatchHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -67,24 +67,32 @@ public class BestMatchHover extends AbstractJavaEditorTextHover {
 	}
 
 	private void checkTextHovers() {
-		if (fTextHoverSpecifications.size() == 0)
+		if (fTextHoverSpecifications == null)
 			return;
 
-		for (Iterator iterator= new ArrayList(fTextHoverSpecifications).iterator(); iterator.hasNext(); ) {
+		boolean done= true;
+		int i= -1;
+		for (Iterator iterator= fTextHoverSpecifications.iterator(); iterator.hasNext();) {
+			i++;
 			JavaEditorTextHoverDescriptor spec= (JavaEditorTextHoverDescriptor) iterator.next();
+			if (spec == null)
+				continue;
+
+			done= false;
 
 			IJavaEditorTextHover hover= spec.createTextHover();
 			if (hover != null) {
 				hover.setEditor(getEditor());
-				addTextHover(hover);
-				fTextHoverSpecifications.remove(spec);
+				fTextHoverSpecifications.set(i, null);
 			}
-		}
-	}
+			if (i == fInstantiatedTextHovers.size())
+				fInstantiatedTextHovers.add(i, hover);
+			else
+				fInstantiatedTextHovers.set(i, hover);
 
-	protected void addTextHover(ITextHover hover) {
-		if (!fInstantiatedTextHovers.contains(hover))
-			fInstantiatedTextHovers.add(hover);
+		}
+		if (done)
+			fTextHoverSpecifications= null;
 	}
 
 	/*
@@ -100,6 +108,8 @@ public class BestMatchHover extends AbstractJavaEditorTextHover {
 
 		for (Iterator iterator= fInstantiatedTextHovers.iterator(); iterator.hasNext(); ) {
 			ITextHover hover= (ITextHover)iterator.next();
+			if (hover == null)
+				continue;
 
 			String s= hover.getHoverInfo(textViewer, hoverRegion);
 			if (s != null && s.trim().length() > 0) {
@@ -124,6 +134,8 @@ public class BestMatchHover extends AbstractJavaEditorTextHover {
 
 		for (Iterator iterator= fInstantiatedTextHovers.iterator(); iterator.hasNext(); ) {
 			ITextHover hover= (ITextHover)iterator.next();
+			if (hover == null)
+				continue;
 
 			if (hover instanceof ITextHoverExtension2) {
 				Object info= ((ITextHoverExtension2) hover).getHoverInfo2(textViewer, hoverRegion);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.java
index c4f8e01..e3447c6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.java
@@ -27,10 +27,10 @@ final class JavaHoverMessages extends NLS {
 	public static String AbstractAnnotationHover_action_configureAnnotationPreferences;
 	public static String AbstractAnnotationHover_message_singleQuickFix;
 	public static String AbstractAnnotationHover_message_multipleQuickFix;
+	public static String AbstractAnnotationHover_multifix_variable_description;
 
 	public static String JavadocHover_back;
 	public static String JavadocHover_back_toElement_toolTip;
-	public static String JavadocHover_back_toolTip;
 	public static String JavadocHover_noAttachments;
 	public static String JavadocHover_noAttachedJavadoc;
 	public static String JavadocHover_noAttachedSource;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.properties
index 42c2cb2..2db5bf0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavaHoverMessages.properties
@@ -12,7 +12,7 @@
 AbstractAnnotationHover_action_configureAnnotationPreferences= Configure Annotation Preferences
 AbstractAnnotationHover_message_singleQuickFix= 1 quick fix available:
 AbstractAnnotationHover_message_multipleQuickFix= {0} quick fixes available:
-
+AbstractAnnotationHover_multifix_variable_description=Fix {0} problems of same category in file
 JavaTextHover_createTextHover= Could not create Java text hover
 
 NoBreakpointAnnotation_addBreakpoint= Add a breakpoint
@@ -22,7 +22,6 @@ NLSStringHover_NLSStringHover_missingKeyWarning= <b>Warning:</b> The key is miss
 NLSStringHover_open_in_properties_file=Open in Properties File
 JavadocHover_back= Back
 JavadocHover_back_toElement_toolTip=Back to {0}
-JavadocHover_back_toolTip=Back
 JavadocHover_noAttachments= <em>Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.</em>
 JavadocHover_noAttachedSource= <em>Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.</em>
 JavadocHover_noAttachedJavadoc= <em>Note: This element has no attached Javadoc and the Javadoc could not be found in the attached source.</em>
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
index 42a77d0..ea2b4de 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.StringReader;
+import java.net.URISyntaxException;
 import java.net.URL;
 
 import org.osgi.framework.Bundle;
@@ -25,6 +26,7 @@ import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Platform;
 
 import org.eclipse.jface.action.Action;
@@ -45,12 +47,16 @@ import org.eclipse.jface.text.IInputChangedListener;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.ITextViewer;
 
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.ui.editors.text.EditorsUI;
 
+import org.eclipse.jdt.core.IAnnotatable;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaProject;
@@ -60,14 +66,30 @@ import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.CharacterLiteral;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ConstructorInvocation;
+import org.eclipse.jdt.core.dom.IAnnotationBinding;
 import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.IMemberValuePairBinding;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
+import org.eclipse.jdt.core.dom.ParameterizedType;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.QualifiedType;
 import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
+import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.javadoc.JavaDocLocations;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
 import org.eclipse.jdt.internal.corext.util.Messages;
@@ -76,11 +98,11 @@ import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.PreferenceConstants;
 import org.eclipse.jdt.ui.SharedASTProvider;
+import org.eclipse.jdt.ui.actions.OpenAttachedJavadocAction;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.actions.OpenBrowserUtil;
-import org.eclipse.jdt.internal.ui.actions.OpenExternalBrowserAction;
 import org.eclipse.jdt.internal.ui.actions.SimpleSelectionProvider;
 import org.eclipse.jdt.internal.ui.infoviews.JavadocView;
 import org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2;
@@ -243,6 +265,18 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 	 */
 	public static final class PresenterControlCreator extends AbstractReusableInformationControlCreator {
 
+		private IWorkbenchSite fSite;
+
+		/**
+		 * Creates a new PresenterControlCreator.
+		 * 
+		 * @param site the site or <code>null</code> if none
+		 * @since 3.6
+		 */
+		public PresenterControlCreator(IWorkbenchSite site) {
+			fSite= site;
+		}
+
 		/*
 		 * @see org.eclipse.jdt.internal.ui.text.java.hover.AbstractReusableInformationControlCreator#doCreateInformationControl(org.eclipse.swt.widgets.Shell)
 		 */
@@ -265,10 +299,15 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 				tbm.add(openDeclarationAction);
 
 				final SimpleSelectionProvider selectionProvider= new SimpleSelectionProvider();
-				OpenExternalBrowserAction openExternalJavadocAction= new OpenExternalBrowserAction(parent.getDisplay(), selectionProvider);
-				selectionProvider.addSelectionChangedListener(openExternalJavadocAction);
-				selectionProvider.setSelection(new StructuredSelection());
-				tbm.add(openExternalJavadocAction);
+				if (fSite != null) {
+					OpenAttachedJavadocAction openAttachedJavadocAction= new OpenAttachedJavadocAction(fSite);
+					openAttachedJavadocAction.setSpecialSelectionProvider(selectionProvider);
+					openAttachedJavadocAction.setImageDescriptor(JavaPluginImages.DESC_ELCL_OPEN_BROWSER);
+					openAttachedJavadocAction.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_OPEN_BROWSER);
+					selectionProvider.addSelectionChangedListener(openAttachedJavadocAction);
+					selectionProvider.setSelection(new StructuredSelection());
+					tbm.add(openAttachedJavadocAction);
+				}
 
 				IInputChangedListener inputChangeListener= new IInputChangedListener() {
 					public void inputChanged(Object newInput) {
@@ -404,10 +443,23 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 	 */
 	public IInformationControlCreator getInformationPresenterControlCreator() {
 		if (fPresenterControlCreator == null)
-			fPresenterControlCreator= new PresenterControlCreator();
+			fPresenterControlCreator= new PresenterControlCreator(getSite());
 		return fPresenterControlCreator;
 	}
 
+	private IWorkbenchSite getSite() {
+		IEditorPart editor= getEditor();
+		if (editor == null) {
+			IWorkbenchPage page= JavaPlugin.getActivePage();
+			if (page != null)
+				editor= page.getActiveEditor();
+		}
+		if (editor != null)
+			return editor.getSite();
+
+		return null;
+	}
+
 	/*
 	 * @see ITextHoverExtension#getHoverControlCreator()
 	 * @since 3.2
@@ -439,7 +491,7 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 			 * @see org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.ILinkHandler#handleInlineJavadocLink(org.eclipse.jdt.core.IJavaElement)
 			 */
 			public void handleInlineJavadocLink(IJavaElement linkTarget) {
-				JavadocBrowserInformationControlInput hoverInfo= getHoverInfo(new IJavaElement[] { linkTarget }, null, (JavadocBrowserInformationControlInput) control.getInput());
+				JavadocBrowserInformationControlInput hoverInfo= getHoverInfo(new IJavaElement[] { linkTarget }, null, null, (JavadocBrowserInformationControlInput) control.getInput());
 				if (control.hasDelayedInputChangeListener())
 					control.notifyDelayedInputChange(hoverInfo);
 				else
@@ -469,8 +521,8 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 				control.notifyDelayedInputChange(null);
 				control.dispose(); //FIXME: should have protocol to hide, rather than dispose
 
-				// open external links in real browser:
-				OpenBrowserUtil.open(url, display, ""); //$NON-NLS-1$
+				// Open attached Javadoc links
+				OpenBrowserUtil.open(url, display);
 
 				return true;
 			}
@@ -500,28 +552,20 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 		if (elements == null || elements.length == 0)
 			return null;
 
-		String constantValue;
-		if (elements.length == 1 && elements[0].getElementType() == IJavaElement.FIELD) {
-			constantValue= getConstantValue((IField) elements[0], hoverRegion);
-			if (constantValue != null)
-				constantValue= HTMLPrinter.convertToHTMLContent(constantValue);
-		} else {
-			constantValue= null;
-		}
-
-		return getHoverInfo(elements, constantValue, null);
+		return getHoverInfo(elements, getEditorInputJavaElement(), hoverRegion, null);
 	}
 
 	/**
 	 * Computes the hover info.
 	 *
 	 * @param elements the resolved elements
-	 * @param constantValue a constant value iff result contains exactly 1 constant field, or <code>null</code>
+	 * @param editorInputElement the editor input, or <code>null</code>
+	 * @param hoverRegion the text range of the hovered word, or <code>null</code>
 	 * @param previousInput the previous input, or <code>null</code>
 	 * @return the HTML hover info for the given element(s) or <code>null</code> if no information is available
 	 * @since 3.4
 	 */
-	private static JavadocBrowserInformationControlInput getHoverInfo(IJavaElement[] elements, String constantValue, JavadocBrowserInformationControlInput previousInput) {
+	private static JavadocBrowserInformationControlInput getHoverInfo(IJavaElement[] elements, ITypeRoot editorInputElement, IRegion hoverRegion, JavadocBrowserInformationControlInput previousInput) {
 		int nResults= elements.length;
 		StringBuffer buffer= new StringBuffer();
 		boolean hasContents= false;
@@ -536,8 +580,16 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 				HTMLPrinter.startBulletList(buffer);
 				IJavaElement curr= elements[i];
 				if (curr instanceof IMember || curr.getElementType() == IJavaElement.LOCAL_VARIABLE) {
-					//FIXME: provide links
-					HTMLPrinter.addBullet(buffer, getInfoText(curr, constantValue, false));
+					String label= JavaElementLabels.getElementLabel(curr, getHeaderFlags(curr));
+					String link;
+					try {
+						String uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, curr);
+						link= JavaElementLinks.createLink(uri, label);
+					} catch (URISyntaxException e) {
+						JavaPlugin.log(e);
+						link= label;
+					}
+					HTMLPrinter.addBullet(buffer, link);
 					hasContents= true;
 				}
 				HTMLPrinter.endBulletList(buffer);
@@ -547,8 +599,10 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 
 			element= elements[0];
 			if (element instanceof IMember) {
+				HTMLPrinter.addSmallHeader(buffer, getInfoText(element, editorInputElement, hoverRegion, true));
+				buffer.append("<br>"); //$NON-NLS-1$
+				addAnnotations(buffer, element, editorInputElement, hoverRegion);
 				IMember member= (IMember) element;
-				HTMLPrinter.addSmallHeader(buffer, getInfoText(member, constantValue, true));
 				Reader reader;
 				try {
 //					reader= JavadocContentAccess.getHTMLContentReader(member, true, true);
@@ -587,7 +641,8 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 				hasContents= true;
 
 			} else if (element.getElementType() == IJavaElement.LOCAL_VARIABLE || element.getElementType() == IJavaElement.TYPE_PARAMETER) {
-				HTMLPrinter.addSmallHeader(buffer, getInfoText(element, constantValue, true));
+				addAnnotations(buffer, element, editorInputElement, hoverRegion);
+				HTMLPrinter.addSmallHeader(buffer, getInfoText(element, editorInputElement, hoverRegion, true));
 				hasContents= true;
 			}
 			leadingImageWidth= 20;
@@ -609,22 +664,14 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 		return null;
 	}
 
-	private static String getInfoText(IJavaElement element, String constantValue, boolean allowImage) {
-		long flags;
-		switch (element.getElementType()) {
-			case IJavaElement.LOCAL_VARIABLE:
-				flags= LOCAL_VARIABLE_FLAGS;
-				break;
-			case IJavaElement.TYPE_PARAMETER:
-				flags= TYPE_PARAMETER_FLAGS;
-				break;
-			default:
-				flags= LABEL_FLAGS;
-				break;
-		}
+	private static String getInfoText(IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion, boolean allowImage) {
+		long flags= getHeaderFlags(element);
 		StringBuffer label= new StringBuffer(JavaElementLinks.getElementLabel(element, flags));
+		
 		if (element.getElementType() == IJavaElement.FIELD) {
+			String constantValue= getConstantValue((IField) element, editorInputElement, hoverRegion);
 			if (constantValue != null) {
+				constantValue= HTMLPrinter.convertToHTMLContent(constantValue);
 				IJavaProject javaProject= element.getJavaProject();
 				if (JavaCore.INSERT.equals(javaProject.getOption(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ASSIGNMENT_OPERATOR, true)))
 					label.append(' ');
@@ -634,6 +681,11 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 				label.append(constantValue);
 			}
 		}
+		
+//		if (element.getElementType() == IJavaElement.METHOD) {
+//			IMethod method= (IMethod)element;
+//			//TODO: add default value for annotation type members, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=249016
+//		}
 
 		String imageName= null;
 		if (allowImage) {
@@ -644,10 +696,21 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 		}
 
 		StringBuffer buf= new StringBuffer();
-		addImageAndLabel(buf, imageName, 16, 16, 2, 2, label.toString(), 20, 2);
+		addImageAndLabel(buf, element, imageName, 16, 16, label.toString(), 20, 2);
 		return buf.toString();
 	}
 
+	private static long getHeaderFlags(IJavaElement element) {
+		switch (element.getElementType()) {
+			case IJavaElement.LOCAL_VARIABLE:
+				return LOCAL_VARIABLE_FLAGS;
+			case IJavaElement.TYPE_PARAMETER:
+				return TYPE_PARAMETER_FLAGS;
+			default:
+				return LABEL_FLAGS;
+		}
+	}
+
 	/*
 	 * @since 3.4
 	 */
@@ -664,26 +727,21 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 	 * Returns the constant value for the given field.
 	 *
 	 * @param field the field
-	 * @param hoverRegion the hover region
+	 * @param editorInputElement the editor input element
+	 * @param hoverRegion the hover region in the editor
 	 * @return the constant value for the given field or <code>null</code> if none
 	 * @since 3.4
 	 */
-	private String getConstantValue(IField field, IRegion hoverRegion) {
+	private static String getConstantValue(IField field, ITypeRoot editorInputElement, IRegion hoverRegion) {
 		if (!isStaticFinal(field))
 			return null;
 
-		ITypeRoot typeRoot= getEditorInputJavaElement();
-		if (typeRoot == null)
+		ASTNode node= getHoveredASTNode(editorInputElement, hoverRegion);
+		if (node == null)
 			return null;
-
+		
 		Object constantValue= null;
-
-		CompilationUnit unit= SharedASTProvider.getAST(typeRoot, SharedASTProvider.WAIT_ACTIVE_ONLY, null);
-		if (unit == null)
-			return null;
-
-		ASTNode node= NodeFinder.perform(unit, hoverRegion.getOffset(),	hoverRegion.getLength());
-		if (node != null && node.getNodeType() == ASTNode.SIMPLE_NAME) {
+		if (node.getNodeType() == ASTNode.SIMPLE_NAME) {
 			IBinding binding= ((SimpleName)node).resolveBinding();
 			if (binding != null && binding.getKind() == IBinding.VARIABLE) {
 				IVariableBinding variableBinding= (IVariableBinding)binding;
@@ -696,20 +754,10 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 			return null;
 
 		if (constantValue instanceof String) {
-			StringBuffer result= new StringBuffer();
-			result.append('"');
-			String stringConstant= (String)constantValue;
-			if (stringConstant.length() > 80) {
-				result.append(stringConstant.substring(0, 80));
-				result.append(JavaElementLabels.ELLIPSIS_STRING);
-			} else {
-				result.append(stringConstant);
-			}
-			result.append('"');
-			return result.toString();
+			return getEscapedStringLiteral((String) constantValue);
 
 		} else if (constantValue instanceof Character) {
-			String constantResult= '\'' + constantValue.toString() + '\'';
+			String constantResult= getEscapedCharacterLiteral(((Character) constantValue).charValue());
 
 			char charValue= ((Character) constantValue).charValue();
 			String hexString= Integer.toHexString(charValue);
@@ -741,6 +789,34 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 		}
 	}
 
+	private static ASTNode getHoveredASTNode(ITypeRoot editorInputElement, IRegion hoverRegion) {
+		if (editorInputElement == null)
+			return null;
+
+		CompilationUnit unit= SharedASTProvider.getAST(editorInputElement, SharedASTProvider.WAIT_ACTIVE_ONLY, null);
+		if (unit == null)
+			return null;
+		
+		return NodeFinder.perform(unit, hoverRegion.getOffset(),	hoverRegion.getLength());
+	}
+
+	private static String getEscapedStringLiteral(String stringValue) {
+		StringLiteral stringLiteral= AST.newAST(AST.JLS3).newStringLiteral();
+		stringLiteral.setLiteralValue(stringValue);
+		String stringConstant= stringLiteral.getEscapedValue();
+		if (stringConstant.length() > 80) {
+			return stringConstant.substring(0, 80) + JavaElementLabels.ELLIPSIS_STRING;
+		} else {
+			return stringConstant;
+		}
+	}
+
+	private static String getEscapedCharacterLiteral(char ch) {
+		CharacterLiteral characterLiteral= AST.newAST(AST.JLS3).newCharacterLiteral();
+		characterLiteral.setCharValue(ch);
+		return characterLiteral.getEscapedValue();
+	}
+	
 	/**
 	 * Creates and returns a formatted message for the given
 	 * constant with its hex value.
@@ -805,35 +881,225 @@ public class JavadocHover extends AbstractJavaEditorTextHover {
 		return null;
 	}
 
-	public static void addImageAndLabel(StringBuffer buf, String imageName, int imageWidth, int imageHeight, int imageLeft, int imageTop, String label, int labelLeft, int labelTop) {
+	public static void addImageAndLabel(StringBuffer buf, String imageSrcPath, int imageWidth, int imageHeight, String label, int labelLeft, int labelTop) {
+		addImageAndLabel(buf, null, imageSrcPath, imageWidth, imageHeight, label, labelLeft, labelTop);
+	}
+	
+	public static void addImageAndLabel(StringBuffer buf, IJavaElement element, String imageSrcPath, int imageWidth, int imageHeight, String label, int labelLeft, int labelTop) {
+		buf.append("<div style='word-wrap: break-word; position: relative; "); //$NON-NLS-1$
+		
+		if (imageSrcPath != null) {
+			buf.append("margin-left: ").append(labelLeft).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
+			buf.append("padding-top: ").append(labelTop).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
+		}
 
-		if (imageName != null) {
-			StringBuffer imageStyle= new StringBuffer("position: absolute; "); //$NON-NLS-1$
+		buf.append("'>"); //$NON-NLS-1$
+		if (imageSrcPath != null) {
+			if (element != null) {
+				try {
+					String uri= JavaElementLinks.createURI(JavaElementLinks.OPEN_LINK_SCHEME, element);
+					buf.append("<a href='").append(uri).append("'>");  //$NON-NLS-1$//$NON-NLS-2$
+				} catch (URISyntaxException e) {
+					element= null; // no link
+				}
+			}
+			StringBuffer imageStyle= new StringBuffer("border:none; position: absolute; "); //$NON-NLS-1$
 			imageStyle.append("width: ").append(imageWidth).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
 			imageStyle.append("height: ").append(imageHeight).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
-			imageStyle.append("top: ").append(imageTop).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
-			imageStyle.append("left: ").append(imageLeft).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
+			imageStyle.append("left: ").append(- labelLeft - 1).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
 
+			// hack for broken transparent PNG support in IE 6, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=223900 :
 			buf.append("<!--[if lte IE 6]><![if gte IE 5.5]>\n"); //$NON-NLS-1$
-			buf.append("<span style=\"").append(imageStyle).append("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='").append(imageName).append("')\"></span>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			String tooltip= JavaHoverMessages.JavadocHover_openDeclaration;
+			buf.append("<span alt='").append(tooltip).append("' style=\"").append(imageStyle). //$NON-NLS-1$ //$NON-NLS-2$
+					append("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='").append(imageSrcPath).append("')\"></span>\n"); //$NON-NLS-1$ //$NON-NLS-2$
 			buf.append("<![endif]><![endif]-->\n"); //$NON-NLS-1$
 
 			buf.append("<!--[if !IE]>-->\n"); //$NON-NLS-1$
-			buf.append("<img style='").append(imageStyle).append("' src='").append(imageName).append("'/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			buf.append("<img alt='").append(tooltip).append("' style='").append(imageStyle).append("' src='").append(imageSrcPath).append("'/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			buf.append("<!--<![endif]-->\n"); //$NON-NLS-1$
 			buf.append("<!--[if gte IE 7]>\n"); //$NON-NLS-1$
-			buf.append("<img style='").append(imageStyle).append("' src='").append(imageName).append("'/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			buf.append("<img alt='").append(tooltip).append("' style='").append(imageStyle).append("' src='").append(imageSrcPath).append("'/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 			buf.append("<![endif]-->\n"); //$NON-NLS-1$
+			if (element != null) {
+				buf.append("</a>"); //$NON-NLS-1$
+			}
 		}
-
-		buf.append("<div style='word-wrap:break-word;"); //$NON-NLS-1$
-		if (imageName != null) {
-			buf.append("margin-left: ").append(labelLeft).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
-			buf.append("margin-top: ").append(labelTop).append("px; "); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		buf.append("'>"); //$NON-NLS-1$
+		
 		buf.append(label);
+		
 		buf.append("</div>"); //$NON-NLS-1$
 	}
 
+	public static void addAnnotations(StringBuffer buf, IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion) {
+		if (element instanceof IAnnotatable) {
+			try {
+				String annotationString= getAnnotations(element, editorInputElement, hoverRegion);
+				if (annotationString != null) {
+					buf.append("<div style='margin-bottom: 5px;'>"); //$NON-NLS-1$
+					buf.append(annotationString);
+					buf.append("</div>"); //$NON-NLS-1$
+				}
+			} catch (JavaModelException e) {
+				// no annotations this time...
+				buf.append("<br>"); //$NON-NLS-1$
+			} catch (URISyntaxException e) {
+				// no annotations this time...
+				buf.append("<br>"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	private static String getAnnotations(IJavaElement element, ITypeRoot editorInputElement, IRegion hoverRegion) throws URISyntaxException, JavaModelException {
+		if (!(element instanceof IAnnotatable))
+			return null;
+		
+		if (((IAnnotatable)element).getAnnotations().length == 0)
+			return null;
+		
+		IBinding binding;
+		ASTNode node= getHoveredASTNode(editorInputElement, hoverRegion);
+		
+		if (node == null) {
+			ASTParser p= ASTParser.newParser(AST.JLS3);
+			p.setProject(element.getJavaProject());
+			try {
+				binding= p.createBindings(new IJavaElement[] { element }, null)[0];
+			} catch (OperationCanceledException e) {
+				return null;
+			}
+			
+		} else {
+			binding= resolveBinding(node);
+		}
+		
+		if (binding == null)
+			return null;
+		
+		IAnnotationBinding[] annotations= binding.getAnnotations();
+		if (annotations.length == 0)
+			return null;
+		
+		StringBuffer buf= new StringBuffer();
+		for (int i= 0; i < annotations.length; i++) {
+			//TODO: skip annotations that don't have an @Documented annotation?
+			addAnnotation(buf, element, annotations[i]);
+			buf.append("<br>"); //$NON-NLS-1$
+		}
+		
+		return buf.toString();
+	}
+
+	private static IBinding resolveBinding(ASTNode node) {
+		if (node instanceof SimpleName) {
+			// workaround for https://bugs.eclipse.org/62605 (constructor name resolves to type, not method)
+			SimpleName simpleName= (SimpleName) node;
+			StructuralPropertyDescriptor loc= simpleName.getLocationInParent();
+			while (loc == QualifiedType.NAME_PROPERTY || loc == QualifiedName.NAME_PROPERTY|| loc == SimpleType.NAME_PROPERTY || loc == ParameterizedType.TYPE_PROPERTY) {
+				node= node.getParent();
+				loc= node.getLocationInParent();
+			}
+			if (loc == ClassInstanceCreation.TYPE_PROPERTY) {
+				ClassInstanceCreation cic= (ClassInstanceCreation) node.getParent();
+				IMethodBinding constructorBinding= cic.resolveConstructorBinding();
+				if (constructorBinding == null)
+					return null;
+				ITypeBinding declaringClass= constructorBinding.getDeclaringClass();
+				if (!declaringClass.isAnonymous())
+					return constructorBinding;
+				ITypeBinding superTypeDeclaration= declaringClass.getSuperclass().getTypeDeclaration();
+				return resolveSuperclassConstructor(superTypeDeclaration, constructorBinding);
+			}
+			return simpleName.resolveBinding();
+			
+		} else if (node instanceof SuperConstructorInvocation) {
+			return ((SuperConstructorInvocation) node).resolveConstructorBinding();
+		} else if (node instanceof ConstructorInvocation) {
+			return ((ConstructorInvocation) node).resolveConstructorBinding();
+		} else {
+			return null;
+		}
+	}
+
+	private static IBinding resolveSuperclassConstructor(ITypeBinding superClassDeclaration, IMethodBinding constructor) {
+		IMethodBinding[] methods= superClassDeclaration.getDeclaredMethods();
+		for (int i= 0; i < methods.length; i++) {
+			IMethodBinding method= methods[i];
+			if (method.isConstructor() && constructor.isSubsignature(method))
+				return method;
+		}
+		return null;
+	}
+
+	private static void addAnnotation(StringBuffer buf, IJavaElement element, IAnnotationBinding annotation) throws URISyntaxException {
+		String uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, annotation.getAnnotationType().getJavaElement());
+		buf.append('@');
+		addLink(buf, uri, annotation.getName());
+		
+		IMemberValuePairBinding[] mvPairs= annotation.getDeclaredMemberValuePairs();
+		if (mvPairs.length > 0) {
+			buf.append('(');
+			for (int j= 0; j < mvPairs.length; j++) {
+				if (j > 0) {
+					buf.append(JavaElementLabels.COMMA_STRING);
+				}
+				IMemberValuePairBinding mvPair= mvPairs[j];
+				String memberURI= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, mvPair.getMethodBinding().getJavaElement());
+				addLink(buf, memberURI, mvPair.getName());
+				buf.append('=');
+				addValue(buf, element, mvPair.getValue());
+			}
+			buf.append(')');
+		}
+	}
+
+	private static void addValue(StringBuffer buf, IJavaElement element, Object value) throws URISyntaxException {
+		if (value instanceof ITypeBinding) {
+			ITypeBinding typeBinding= (ITypeBinding)value;
+			IJavaElement type= typeBinding.getJavaElement();
+			if (type == null) {
+				buf.append(typeBinding.getName());
+			} else {
+				String uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, type);
+				String name= type.getElementName();
+				addLink(buf, uri, name);
+			}
+			buf.append(".class"); //$NON-NLS-1$
+			
+		} else if (value instanceof IVariableBinding) { // only enum constants
+			IVariableBinding variableBinding= (IVariableBinding)value;
+			IJavaElement variable= variableBinding.getJavaElement();
+			String uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, variable);
+			String name= variable.getElementName();
+			addLink(buf, uri, name);
+				
+		} else if (value instanceof IAnnotationBinding) {
+			IAnnotationBinding annotationBinding= (IAnnotationBinding)value;
+			addAnnotation(buf, element, annotationBinding);
+			
+		} else if (value instanceof String) {
+			buf.append(getEscapedStringLiteral((String)value));
+			
+		} else if (value instanceof Character) {
+			buf.append(getEscapedCharacterLiteral(((Character)value).charValue()));
+			
+		} else if (value instanceof Object[]) {
+			Object[] values= (Object[])value;
+			buf.append('{');
+			for (int i= 0; i < values.length; i++) {
+				if (i > 0) {
+					buf.append(JavaElementLabels.COMMA_STRING);
+				}
+				addValue(buf, element, values[i]);
+			}
+			buf.append('}');
+			
+		} else { // primitive types (except char) or null
+			buf.append(String.valueOf(value));
+		}
+	}
+
+	private static StringBuffer addLink(StringBuffer buf, String uri, String label) {
+		return buf.append(JavaElementLinks.createLink(uri, label));
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/NLSStringHover.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/NLSStringHover.java
index b269bba..ae73876 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/NLSStringHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/NLSStringHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,15 +36,20 @@ import org.eclipse.ui.IEditorPart;
 
 import org.eclipse.ui.editors.text.EditorsUI;
 
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.ITypeRoot;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.Signature;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.QualifiedName;
 import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
 
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.nls.AccessorClassReference;
 import org.eclipse.jdt.internal.corext.refactoring.nls.NLSHintHelper;
 
@@ -53,6 +58,7 @@ import org.eclipse.jdt.ui.SharedASTProvider;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 import org.eclipse.jdt.internal.ui.javaeditor.NLSKeyHyperlink;
+import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
 
 
 /**
@@ -135,7 +141,20 @@ public class NLSStringHover extends AbstractJavaEditorTextHover {
 		if (node.getLocationInParent() == QualifiedName.QUALIFIER_PROPERTY)
 			return null;
 
-		AccessorClassReference ref= NLSHintHelper.getAccessorClassReference(ast, hoverRegion);
+		boolean usedFullyQualifiedName= false;
+		IBinding containingClassBinding= null;
+		ASTNode containingClass= ASTResolving.findParentType(node);
+		if (containingClass instanceof TypeDeclaration) {
+			containingClassBinding= ((TypeDeclaration)containingClass).resolveBinding();
+			ASTNode parentNode= node.getParent();
+			if (parentNode instanceof QualifiedName) {
+				IBinding qualifierBinding= (((QualifiedName)parentNode).getQualifier()).resolveBinding();
+				if (qualifierBinding != null && containingClassBinding != null) {
+					usedFullyQualifiedName= qualifierBinding.getKey().equals(containingClassBinding.getKey());
+				}
+			}
+		}
+		AccessorClassReference ref= NLSHintHelper.getAccessorClassReference(ast, hoverRegion, usedFullyQualifiedName);
 		if (ref == null)
 			return null;
 
@@ -158,8 +177,24 @@ public class NLSStringHover extends AbstractJavaEditorTextHover {
 		String identifier= null;
 		if (node instanceof StringLiteral) {
 			identifier= ((StringLiteral)node).getLiteralValue();
-		} else {
+		} else if (!usedFullyQualifiedName && node.getLocationInParent() == QualifiedName.NAME_PROPERTY) {
 			identifier= ((SimpleName)node).getIdentifier();
+		} else {
+			try {
+				if (containingClassBinding == null)
+					return null;
+				IType parentType= (IType)containingClassBinding.getJavaElement();
+				if (parentType == null)
+					return null;
+				String varName= ((SimpleName)node).getIdentifier();
+				IField field= parentType.getField(varName);
+				if (!Signature.getSignatureSimpleName(field.getTypeSignature()).equals("String")) //$NON-NLS-1$
+					return null;
+				Object obj= field.getConstant();
+				identifier= obj instanceof String ? ((String)obj).substring(1, ((String)obj).length() - 1) : null;
+			} catch (JavaModelException e) {
+				return null;
+			}
 		}
 		if (identifier == null)
 			return null;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ProblemHover.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ProblemHover.java
index d587e43..480b41b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ProblemHover.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/ProblemHover.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,21 +60,23 @@ import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.dialogs.OptionalMessageDialog;
 import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
 import org.eclipse.jdt.internal.ui.javaeditor.IJavaAnnotation;
+import org.eclipse.jdt.internal.ui.preferences.JavadocProblemsConfigurationBlock;
 import org.eclipse.jdt.internal.ui.preferences.JavadocProblemsPreferencePage;
 import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
 import org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesConfigurationBlock;
 import org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesPreferencePage;
+import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock.Key;
 import org.eclipse.jdt.internal.ui.text.correction.AssistContext;
 import org.eclipse.jdt.internal.ui.text.correction.JavaCorrectionProcessor;
 import org.eclipse.jdt.internal.ui.text.correction.ProblemLocation;
 
+
 /**
  * This annotation hover shows the description of the
  * selected java annotation.
  *
- * XXX: Currently this problem hover only works for
- *		Java and spelling problems.
- *		see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=62081
+ * XXX: Currently this problem hover only works for Java and spelling problems,
+ *		see https://bugs.eclipse.org/bugs/show_bug.cgi?id=62081
  *
  * @since 3.0
  */
@@ -172,7 +174,8 @@ public class ProblemHover extends AbstractAnnotationHover {
 		}
 
 		private boolean hasProjectSpecificOptions() {
-			return OptionsConfigurationBlock.hasProjectSpecificOptions(fProject.getProject(), ProblemSeveritiesConfigurationBlock.getKeys(), null);
+			Key[] keys= fIsJavadocOption ? JavadocProblemsConfigurationBlock.getKeys() : ProblemSeveritiesConfigurationBlock.getKeys();
+			return OptionsConfigurationBlock.hasProjectSpecificOptions(fProject.getProject(), keys, null);
 		}
 	}
 
@@ -203,6 +206,8 @@ public class ProblemHover extends AbstractAnnotationHover {
 		private ICompletionProposal[] getJavaAnnotationFixes(IJavaAnnotation javaAnnotation) {
 			ProblemLocation location= new ProblemLocation(position.getOffset(), position.getLength(), javaAnnotation);
 			ICompilationUnit cu= javaAnnotation.getCompilationUnit();
+			if (cu == null)
+				return NO_PROPOSALS;
 
 			ISourceViewer sourceViewer= null;
 			if (viewer instanceof ISourceViewer)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
index 6a576d5..d8e6661 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/SourceViewerInformationControl.java
@@ -48,6 +48,8 @@ import org.eclipse.jface.text.IInformationControlExtension5;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.SourceViewer;
 
+import org.eclipse.ui.texteditor.AbstractTextEditor;
+
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.PreferenceConstants;
 import org.eclipse.jdt.ui.text.IJavaColorConstants;
@@ -93,6 +95,7 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
 	private Font fStatusTextFont;
 	/**
 	 * The color of the optional status text label or <code>null</code> if none.
+	 * 
 	 * @since 3.6
 	 */
 	private Color fStatusTextForegroundColor;
@@ -242,7 +245,13 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
 	}
 	
 	private void initializeColors() {
-		RGB bgRGB= getHoverBackgroundColorRGB();
+		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
+		RGB bgRGB;
+		if (store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
+			bgRGB= getVisibleBackgroundColor(fShell.getDisplay());
+		} else {
+			bgRGB= PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+		}
 		if (bgRGB != null) {
 			fBackgroundColor= new Color(fShell.getDisplay(), bgRGB);
 			fIsSystemBackgroundColor= false;
@@ -252,11 +261,30 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
 		}
 	}
 
-	private RGB getHoverBackgroundColorRGB() {
-		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
-		return store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)
-			? null
-			: PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+	/**
+	 * Returns <code>null</code> if {@link SWT#COLOR_INFO_BACKGROUND} is visibly distinct from the
+	 * default Java source text color. Otherwise, returns the editor background color.
+	 * 
+	 * @param display the display
+	 * @return an RGB or <code>null</code>
+	 * @since 3.6.1
+	 */
+	public static RGB getVisibleBackgroundColor(Display display) {
+		float[] infoBgHSB= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB().getHSB();
+		
+		Color javaDefaultColor= JavaUI.getColorManager().getColor(IJavaColorConstants.JAVA_DEFAULT);
+		RGB javaDefaultRGB= javaDefaultColor != null ? javaDefaultColor.getRGB() : new RGB(255, 255, 255);
+		float[] javaDefaultHSB= javaDefaultRGB.getHSB();
+		
+		if (Math.abs(infoBgHSB[2] - javaDefaultHSB[2]) < 0.5f) {
+			// workaround for dark tooltip background color, see https://bugs.eclipse.org/309334
+			IPreferenceStore preferenceStore= JavaPlugin.getDefault().getCombinedPreferenceStore();
+			boolean useDefault= preferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
+			if (useDefault)
+				return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
+			return PreferenceConverter.getColor(preferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
+		}
+		return null;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
index 17425ed..896a5f2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@ import org.eclipse.jdt.ui.IWorkingCopyManager;
 import org.eclipse.jdt.ui.PreferenceConstants;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
 
 
 /**
@@ -374,6 +375,10 @@ public class JavaDocAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
 			if (part instanceof ITextEditorExtension3) {
 				ITextEditorExtension3 extension= (ITextEditorExtension3) part;
 				return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
+			} else if (EditorUtility.isCompareEditorInput(part.getEditorInput())) {
+				ITextEditorExtension3 extension= (ITextEditorExtension3)part.getAdapter(ITextEditorExtension3.class);
+				if (extension != null)
+					return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
 			}
 		}
 		return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.java
index bb3f828..47d4f32 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ final class JavaDocMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String CompletionEvaluator_default_package;
 	public static String JavaDoc2HTMLTextReader_parameters_section;
 	public static String JavaDoc2HTMLTextReader_returns_section;
 	public static String JavaDoc2HTMLTextReader_throws_section;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.properties
index e2bb1b8..e957e8e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,8 +9,6 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-CompletionEvaluator_default_package=(default package)
-
 JavaDoc2HTMLTextReader_parameters_section=Parameters:
 JavaDoc2HTMLTextReader_returns_section=Returns:
 JavaDoc2HTMLTextReader_throws_section=Throws:
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAccess2.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAccess2.java
index 49eb569..5059f20 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAccess2.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocContentAccess2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.resources.IResource;
 
 import org.eclipse.jdt.core.IBuffer;
+import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IMethod;
@@ -38,28 +39,35 @@ import org.eclipse.jdt.core.ITypeHierarchy;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.Signature;
+import org.eclipse.jdt.core.SourceRange;
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.ASTParser;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.IVariableBinding;
 import org.eclipse.jdt.core.dom.Javadoc;
 import org.eclipse.jdt.core.dom.MemberRef;
 import org.eclipse.jdt.core.dom.MethodRef;
 import org.eclipse.jdt.core.dom.MethodRefParameter;
 import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.StringLiteral;
 import org.eclipse.jdt.core.dom.TagElement;
 import org.eclipse.jdt.core.dom.TextElement;
 
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.corext.util.JdtFlags;
 import org.eclipse.jdt.internal.corext.util.MethodOverrideTester;
 import org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jdt.ui.JavadocContentAccess;
+import org.eclipse.jdt.ui.SharedASTProvider;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks;
@@ -393,7 +401,7 @@ public class JavadocContentAccess2 {
 
 	private final IMember fMember;
 	/**
-	 * The method, or <code>null</code> if {@link #fMember} is not a method where {@inheritDoc} could work.
+	 * The method, or <code>null</code> if {@link #fMember} is not a method where @inheritDoc could work.
 	 */
 	private final IMethod fMethod;
 	private final Javadoc fJavadoc;
@@ -1020,14 +1028,26 @@ public class JavadocContentAccess2 {
 		return null;
 	}
 
+		
 	private void handleContentElements(List nodes) {
+		handleContentElements(nodes, false);
+	}
+	
+	private void handleContentElements(List nodes, boolean skipLeadingWhitespace) {
 		ASTNode previousNode= null;
 		for (Iterator iter= nodes.iterator(); iter.hasNext(); ) {
 			ASTNode child= (ASTNode) iter.next();
 			if (previousNode != null) {
 				int previousEnd= previousNode.getStartPosition() + previousNode.getLength();
 				int childStart= child.getStartPosition();
-				if (previousEnd != childStart) {
+				if (previousEnd > childStart) {
+					// should never happen, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=304826
+					Exception exception= new Exception("Illegal ASTNode positions: previousEnd=" + previousEnd //$NON-NLS-1$
+							+ ", childStart=" + childStart //$NON-NLS-1$
+							+ ", member=" + fMember.getHandleIdentifier() //$NON-NLS-1$
+							+ ", Javadoc:\n" + fSource); //$NON-NLS-1$
+					JavaPlugin.log(exception);
+				} else if (previousEnd != childStart) {
 					// Need to preserve whitespace before a node that's not
 					// directly following the previous node (e.g. on a new line)
 					// due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=206518 :
@@ -1038,7 +1058,11 @@ public class JavadocContentAccess2 {
 			}
 			previousNode= child;
 			if (child instanceof TextElement) {
-				handleText(((TextElement) child).getText());
+				String text= ((TextElement) child).getText();
+				if (skipLeadingWhitespace) {
+					text= text.replaceFirst("^\\s+", ""); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				handleText(text);
 			} else if (child instanceof TagElement) {
 				handleInlineTagElement((TagElement) child);
 			} else {
@@ -1096,9 +1120,10 @@ public class JavadocContentAccess2 {
 	}
 
 	private void handleInlineTagElement(TagElement node) {
-		//TODO: TagElement.TAG_VALUE
-
 		String name= node.getTagName();
+		
+		if (TagElement.TAG_VALUE.equals(name) && handleValueTag(node))
+			return;
 
 		boolean isLink= TagElement.TAG_LINK.equals(name);
 		boolean isLinkplain= TagElement.TAG_LINKPLAIN.equals(name);
@@ -1113,7 +1138,7 @@ public class JavadocContentAccess2 {
 		if (isLink || isLinkplain)
 			handleLink(node.fragments());
 		else if (isCode || isLiteral)
-			handleContentElements(node.fragments());
+			handleContentElements(node.fragments(), true);
 		else if (handleInheritDoc(node)) {
 			// handled
 		} else if (handleDocRoot(node)) {
@@ -1132,6 +1157,86 @@ public class JavadocContentAccess2 {
 
 	}
 
+	private boolean handleValueTag(TagElement node) {
+		
+		List fragments= node.fragments();
+		try {
+			if (fragments.isEmpty()) {
+				if (fMember instanceof IField && JdtFlags.isStatic(fMember) && JdtFlags.isFinal(fMember)) {
+					IField field= (IField) fMember;
+					return handleConstantValue(field, false);
+				}
+			} else if (fragments.size() == 1) {
+				Object first= fragments.get(0);
+				if (first instanceof MemberRef) {
+					MemberRef memberRef= (MemberRef) first;
+					if (memberRef.getQualifier() == null) {
+						SimpleName name= memberRef.getName();
+						IField field= fMember.getDeclaringType().getField(name.getIdentifier());
+						if (field != null && field.exists() && JdtFlags.isStatic(field) && JdtFlags.isFinal(field))
+							return handleConstantValue(field, true);
+					}
+				}
+			}
+		} catch (JavaModelException e) {
+			JavaPlugin.log(e);
+		}
+		
+		return false;
+	}
+
+	private boolean handleConstantValue(IField field, boolean link) throws JavaModelException {
+		String text= null;
+		
+		ISourceRange nameRange= field.getNameRange();
+		if (SourceRange.isAvailable(nameRange)) {
+			CompilationUnit cuNode= SharedASTProvider.getAST(field.getTypeRoot(), SharedASTProvider.WAIT_ACTIVE_ONLY, null);
+			if (cuNode != null) {
+				ASTNode nameNode= NodeFinder.perform(cuNode, nameRange);
+				if (nameNode instanceof SimpleName) {
+					IBinding binding= ((SimpleName) nameNode).resolveBinding();
+					if (binding instanceof IVariableBinding) {
+						IVariableBinding variableBinding= (IVariableBinding) binding;
+						Object constantValue= variableBinding.getConstantValue();
+						if (constantValue != null) {
+							if (constantValue instanceof String) {
+								StringLiteral stringLiteral= AST.newAST(AST.JLS3).newStringLiteral();
+								stringLiteral.setLiteralValue((String) constantValue);
+								text= stringLiteral.getEscapedValue();
+							} else {
+								text= constantValue.toString(); // Javadoc tool is even worse for chars...
+							}
+						}
+					}
+				}
+			}
+		}
+		
+		if (text == null) {
+			Object constant= field.getConstant();
+			if (constant != null) {
+				text= constant.toString();
+			}
+		}
+		
+		if (text != null) {
+			if (link) {
+				String uri;
+				try {
+					uri= JavaElementLinks.createURI(JavaElementLinks.JAVADOC_SCHEME, field);
+					fBuf.append(JavaElementLinks.createLink(uri, text));
+				} catch (URISyntaxException e) {
+					JavaPlugin.log(e);
+					return false;
+				}
+			} else {
+				handleText(text);
+			}
+			return true;
+		}
+		return false;
+	}
+
 	private boolean handleDocRoot(TagElement node) {
 		if (!TagElement.TAG_DOCROOT.equals(node.getTagName()))
 			return false;
@@ -1442,18 +1547,8 @@ public class JavadocContentAccess2 {
 					JavaPlugin.log(e);
 				}
 				fBuf.append("'>"); //$NON-NLS-1$
-				if (fs > 1) {
-					//TODO:
-					// - Set fLiteralContent for label? Check spec.
-					// - Javadoc of java.util.regex.Pattern has a space in front of link in <pre>
-//					if (fs == 2 && fragments.get(1) instanceof TextElement) {
-//						String text= removeLeadingWhitespace(((TextElement) fragments.get(1)).getText());
-//						if (text.length() != 0)
-//							handleText(text);
-//						else
-//							//throws
-//					}
-					handleContentElements(fragments.subList(1, fs));
+				if (fs > 1 && !(fs == 2 && isWhitespaceTextElement(fragments.get(1)))) {
+					handleContentElements(fragments.subList(1, fs), true);
 				} else {
 					fBuf.append(refTypeName);
 					if (refMemberName != null) {
@@ -1485,6 +1580,14 @@ public class JavadocContentAccess2 {
 		}
 	}
 
+	private static boolean isWhitespaceTextElement(Object fragment) {
+		if (!(fragment instanceof TextElement))
+			return false;
+		
+		TextElement textElement= (TextElement) fragment;
+		return textElement.getText().trim().length() == 0;
+	}
+
 	private boolean containsOnlyNull(List parameterNames) {
 		for (Iterator iter= parameterNames.iterator(); iter.hasNext(); ) {
 			if (iter.next() != null)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java
index 2719472..857ce74 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/AddWordProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,6 @@ import org.eclipse.ui.texteditor.spelling.SpellingProblem;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
@@ -48,7 +47,7 @@ public class AddWordProposal implements IJavaCompletionProposal {
 	private static final String PREF_KEY_DO_NOT_ASK= "do_not_ask_to_install_user_dictionary"; //$NON-NLS-1$
 
 	/** The invocation context */
-	private final IInvocationContext fContext;
+	private final IQuickAssistInvocationContext fContext;
 
 	/** The word to add */
 	private final String fWord;
@@ -62,7 +61,7 @@ public class AddWordProposal implements IJavaCompletionProposal {
 	 * @param context
 	 *                   The invocation context
 	 */
-	public AddWordProposal(final String word, final IInvocationContext context) {
+	public AddWordProposal(final String word, final IQuickAssistInvocationContext context) {
 		fContext= context;
 		fWord= word;
 	}
@@ -78,14 +77,10 @@ public class AddWordProposal implements IJavaCompletionProposal {
 		if (checker == null)
 			return;
 
-		IQuickAssistInvocationContext quickAssistContext= null;
-		if (fContext instanceof IQuickAssistInvocationContext)
-			quickAssistContext= (IQuickAssistInvocationContext)fContext;
-
 		if (!checker.acceptsWords()) {
 			final Shell shell;
-			if (quickAssistContext != null && quickAssistContext.getSourceViewer() != null)
-				shell= quickAssistContext.getSourceViewer().getTextWidget().getShell();
+			if (fContext != null && fContext.getSourceViewer() != null)
+				shell= fContext.getSourceViewer().getTextWidget().getShell();
 			else
 				shell= JavaPlugin.getActiveWorkbenchShell();
 
@@ -98,16 +93,15 @@ public class AddWordProposal implements IJavaCompletionProposal {
 
 		if (checker.acceptsWords()) {
 			checker.addWord(fWord);
-			if (quickAssistContext != null && quickAssistContext.getSourceViewer() != null)
-				SpellingProblem.removeAll(quickAssistContext.getSourceViewer(), fWord);
+			if (fContext != null && fContext.getSourceViewer() != null)
+				SpellingProblem.removeAll(fContext.getSourceViewer(), fWord);
 		}
 	}
 
 	/**
-	 * Asks the user whether he wants to configure
-	 * a user dictionary.
-	 *
-	 * @param shell
+	 * Asks the user whether he wants to configure a user dictionary.
+	 * 
+	 * @param shell the shell
 	 * @return <code>true</code> if the user wants to configure the user dictionary
 	 * @since 3.3
 	 */
@@ -175,6 +169,6 @@ public class AddWordProposal implements IJavaCompletionProposal {
 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
 	 */
 	public final Point getSelection(final IDocument document) {
-		return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
+		return new Point(fContext.getOffset(), fContext.getLength());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/ChangeCaseProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/ChangeCaseProposal.java
index e355fb8..d168324 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/ChangeCaseProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/ChangeCaseProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@ package org.eclipse.jdt.internal.ui.text.spelling;
 
 import java.util.Locale;
 
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
 
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
 
@@ -26,19 +26,14 @@ public class ChangeCaseProposal extends WordCorrectionProposal {
 
 	/**
 	 * Creates a new change case proposal.
-	 *
-	 * @param arguments
-	 *                   The problem arguments associated with the spelling problem
-	 * @param offset
-	 *                   The offset in the document where to apply the proposal
-	 * @param length
-	 *                   The lenght in the document to apply the proposal
-	 * @param context
-	 *                   The invocation context for this proposal
-	 * @param locale
-	 *                   The locale to use for the case change
+	 * 
+	 * @param arguments The problem arguments associated with the spelling problem
+	 * @param offset The offset in the document where to apply the proposal
+	 * @param length The length in the document to apply the proposal
+	 * @param context The invocation context for this proposal
+	 * @param locale The locale to use for the case change
 	 */
-	public ChangeCaseProposal(final String[] arguments, final int offset, final int length, final IInvocationContext context, final Locale locale) {
+	public ChangeCaseProposal(final String[] arguments, final int offset, final int length, final IQuickAssistInvocationContext context, final Locale locale) {
 		super(Character.isLowerCase(arguments[0].charAt(0)) ? Character.toUpperCase(arguments[0].charAt(0)) + arguments[0].substring(1) : arguments[0], arguments, offset, length, context, Integer.MAX_VALUE);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java
index f79b2ed..d27805c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/DisableSpellCheckingProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,12 +17,12 @@ import org.eclipse.jface.preference.IPreferenceStore;
 
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
 
 import org.eclipse.ui.texteditor.spelling.SpellingService;
 
 import org.eclipse.ui.editors.text.EditorsUI;
 
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
@@ -37,14 +37,14 @@ import org.eclipse.jdt.internal.ui.JavaUIMessages;
 public class DisableSpellCheckingProposal implements IJavaCompletionProposal {
 
 	/** The invocation context */
-	private IInvocationContext fContext;
+	private IQuickAssistInvocationContext fContext;
 
 	/**
 	 * Creates a new proposal.
 	 *
 	 * @param context the invocation context
 	 */
-	public DisableSpellCheckingProposal(IInvocationContext context) {
+	public DisableSpellCheckingProposal(IQuickAssistInvocationContext context) {
 		fContext= context;
 	}
 
@@ -94,6 +94,6 @@ public class DisableSpellCheckingProposal implements IJavaCompletionProposal {
 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
 	 */
 	public final Point getSelection(final IDocument document) {
-		return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
+		return new Point(fContext.getOffset(), fContext.getLength());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingEngine.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingEngine.java
index f98c143..0e98393 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,9 +63,9 @@ public class JavaSpellingEngine extends SpellingEngine {
 				}
 			}
 		} catch (BadLocationException x) {
-			// Ignore: the document has been changed in another thread and will be checked again
+			// ignore: the document has been changed in another thread and will be checked again
 		} catch (AssertionFailedException x) {
-			// Ignore: the document has been changed in another thread and will be checked again
+			// ignore: the document has been changed in another thread and will be checked again
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingProblem.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingProblem.java
index 92d88cb..6c02e1b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingProblem.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingProblem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,17 +21,16 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.source.TextInvocationContext;
 
 import org.eclipse.ui.texteditor.spelling.SpellingProblem;
 
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
 
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
-import org.eclipse.jdt.internal.ui.text.correction.AssistContext;
 import org.eclipse.jdt.internal.ui.text.javadoc.IHtmlTagConstants;
 import org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine;
 import org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker;
@@ -104,7 +103,7 @@ public class JavaSpellingProblem extends SpellingProblem {
 	 * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getProposals(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext)
 	 * @since 3.4
 	 */
-	public ICompletionProposal[] getProposals(IQuickAssistInvocationContext originalContext) {
+	public ICompletionProposal[] getProposals(IQuickAssistInvocationContext context) {
 		String[] arguments= getArguments();
 		if (arguments == null)
 			return new ICompletionProposal[0];
@@ -129,11 +128,10 @@ public class JavaSpellingProblem extends SpellingProblem {
 
 		if (checker != null) {
 
-			IInvocationContext context;
-			if (originalContext == null)
-				context= new AssistContext(null, getOffset(), getLength());
+			if (context == null)
+				context= new TextInvocationContext(null, getOffset(), getLength());
 			else
-				context= new AssistContext(null, originalContext.getSourceViewer(), getOffset(), getLength());
+				context= new TextInvocationContext(context.getSourceViewer(), getOffset(), getLength());
 
 			// FIXME: this is a pretty ugly hack
 			fixed= arguments[0].charAt(0) == IHtmlTagConstants.HTML_TAG_PREFIX
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingReconcileStrategy.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingReconcileStrategy.java
index 216fe21..20ed3b4 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingReconcileStrategy.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/JavaSpellingReconcileStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.text.spelling;
 
 import org.eclipse.core.runtime.Platform;
@@ -35,6 +34,7 @@ import org.eclipse.jdt.core.IProblemRequestor;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.compiler.IProblem;
 
+
 /**
  * Reconcile strategy for spell checking comments.
  *
@@ -64,7 +64,7 @@ public class JavaSpellingReconcileStrategy extends SpellingReconcileStrategy {
 						dictionaryMatch= ((JavaSpellingProblem)problem).isDictionaryMatch();
 						sentenceStart= ((JavaSpellingProblem) problem).isSentenceStart();
 					}
-					// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=81514
+					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=81514
 					IEditorInput editorInput= fEditor.getEditorInput();
 					if (editorInput != null) {
 						CoreSpellingProblem iProblem= new CoreSpellingProblem(problem.getOffset(), problem.getOffset() + problem.getLength() - 1, line, problem.getMessage(), word, dictionaryMatch, sentenceStart, getDocument(), editorInput.getName());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/PropertiesFileSpellingEngine.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/PropertiesFileSpellingEngine.java
index f108416..5b2ac9d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/PropertiesFileSpellingEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/PropertiesFileSpellingEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,9 +81,9 @@ public class PropertiesFileSpellingEngine extends SpellingEngine {
 				}
 			}
 		} catch (BadLocationException x) {
-			// Ignore: the document has been changed in another thread and will be checked again
+			// ignore: the document has been changed in another thread and will be checked again
 		} catch (AssertionFailedException x) {
-			// Ignore: the document has been changed in another thread and will be checked again
+			// ignore: the document has been changed in another thread and will be checked again
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckEngine.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckEngine.java
index 23e9037..f98ac3d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckEngine.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,10 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 
+import org.eclipse.ui.texteditor.spelling.SpellingService;
+
+import org.eclipse.ui.editors.text.EditorsUI;
+
 import org.eclipse.jdt.ui.PreferenceConstants;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
@@ -225,7 +229,7 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 	 *
 	 * @return The singleton instance of the spell check engine
 	 */
-	public static final synchronized ISpellCheckEngine getInstance() {
+	public static synchronized final ISpellCheckEngine getInstance() {
 
 		if (fgEngine == null)
 			fgEngine= new SpellCheckEngine();
@@ -236,7 +240,7 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 	/**
 	 * Shuts down the singleton instance of the spell check engine.
 	 */
-	public static final synchronized void shutdownInstance() {
+	public static synchronized final void shutdownInstance() {
 		if (fgEngine != null) {
 			fgEngine.shutdown();
 			fgEngine= null;
@@ -284,12 +288,13 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 		}
 
 		JavaPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
+		EditorsUI.getPreferenceStore().addPropertyChangeListener(this);
 	}
 
 	/*
 	 * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#getSpellChecker()
 	 */
-	public final synchronized ISpellChecker getSpellChecker() throws IllegalStateException {
+	public synchronized final ISpellChecker getSpellChecker() throws IllegalStateException {
 		if (fGlobalDictionaries == null)
 			throw new IllegalStateException("spell checker has been shut down"); //$NON-NLS-1$
 
@@ -367,6 +372,13 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 			resetUserDictionary();
 			return;
 		}
+
+		if (event.getProperty().equals(SpellingService.PREFERENCE_SPELLING_ENABLED) && !EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
+			if (this == fgEngine)
+				SpellCheckEngine.shutdownInstance();
+			else
+				shutdown();
+		}
 	}
 
 	/**
@@ -385,7 +397,12 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 
 		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
 		String filePath= store.getString(PreferenceConstants.SPELLING_USER_DICTIONARY);
-		IStringVariableManager variableManager= VariablesPlugin.getDefault().getStringVariableManager();
+
+		VariablesPlugin variablesPlugin= VariablesPlugin.getDefault();
+		if (variablesPlugin == null)
+			return;
+
+		IStringVariableManager variableManager= variablesPlugin.getStringVariableManager();
 		try {
 			filePath= variableManager.performStringSubstitution(filePath);
 		} catch (CoreException e) {
@@ -438,6 +455,7 @@ public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListe
 	public synchronized final void shutdown() {
 
 		JavaPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
+		EditorsUI.getPreferenceStore().removePropertyChangeListener(this);
 
 		ISpellDictionary dictionary= null;
 		for (final Iterator iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckIterator.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckIterator.java
index 0e6c745..0bd1024 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckIterator.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckIterator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,13 @@ import org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckIterator;
  */
 public class SpellCheckIterator implements ISpellCheckIterator {
 
+	/**
+	 * The token that denotes whitespace.
+	 * 
+	 * @since 3.6
+	 */
+	private static final int WHITE_SPACE_TOKEN= -1;
+
 	/** The content of the region */
 	protected final String fContent;
 
@@ -353,7 +360,7 @@ public class SpellCheckIterator implements ISpellCheckIterator {
 			} else if (!isWhitespace(fPrevious, fNext) && isAlphaNumeric(fPrevious, fNext)) {
 
 				if (isUrlToken(fPrevious))
-					skipTokens(fPrevious, ' ');
+					skipTokens(fPrevious, WHITE_SPACE_TOKEN);
 				else if (isToken(IJavaDocTagConstants.JAVADOC_PARAM_TAGS))
 					fLastToken= null;
 				else if (isToken(IJavaDocTagConstants.JAVADOC_REFERENCE_TAGS)) {
@@ -392,12 +399,15 @@ public class SpellCheckIterator implements ISpellCheckIterator {
 	 * @param begin the begin index
 	 * @param stop the stop character
 	 */
-	protected final void skipTokens(final int begin, final char stop) {
-
+	protected final void skipTokens(final int begin, final int stop) {
+		final boolean isStoppingOnWhiteSpace= stop == WHITE_SPACE_TOKEN;
 		int end= begin;
-
-		while (end < fContent.length() && fContent.charAt(end) != stop)
+		while (end < fContent.length()) {
+			char ch= fContent.charAt(end);
+			if (ch == stop || isStoppingOnWhiteSpace && Character.isWhitespace(ch))
+				break;
 			end++;
+		}
 
 		if (end < fContent.length()) {
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordCorrectionProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordCorrectionProposal.java
index 923ad69..aecf5b0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordCorrectionProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordCorrectionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,10 +17,10 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
 
 import org.eclipse.jdt.internal.corext.util.Messages;
 
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
@@ -61,7 +61,7 @@ public class WordCorrectionProposal implements IJavaCompletionProposal {
 	}
 
 	/** The invocation context */
-	private final IInvocationContext fContext;
+	private final IQuickAssistInvocationContext fContext;
 
 	/** The length in the document */
 	private final int fLength;
@@ -88,7 +88,7 @@ public class WordCorrectionProposal implements IJavaCompletionProposal {
 	 * @param context the invocation context for this proposal
 	 * @param relevance the relevance of this proposal
 	 */
-	public WordCorrectionProposal(final String word, final String[] arguments, final int offset, final int length, final IInvocationContext context, final int relevance) {
+	public WordCorrectionProposal(final String word, final String[] arguments, final int offset, final int length, final IQuickAssistInvocationContext context, final int relevance) {
 
 		fWord= Character.isUpperCase(arguments[0].charAt(0)) ? Character.toUpperCase(word.charAt(0)) + word.substring(1) : word;
 
@@ -161,8 +161,8 @@ public class WordCorrectionProposal implements IJavaCompletionProposal {
 	 */
 	public final Point getSelection(final IDocument document) {
 
-		int offset= fContext.getSelectionOffset();
-		int length= fContext.getSelectionLength();
+		int offset= fContext.getOffset();
+		int length= fContext.getLength();
 
 		final int delta= fWord.length() - fLength;
 		if (offset <= fOffset && offset + length >= fOffset)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java
index 286514a..1e4d817 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordIgnoreProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ import org.eclipse.ui.texteditor.spelling.SpellingProblem;
 
 import org.eclipse.jdt.internal.corext.util.Messages;
 
-import org.eclipse.jdt.ui.text.java.IInvocationContext;
 import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
 
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
@@ -39,7 +38,7 @@ import org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker;
 public class WordIgnoreProposal implements IJavaCompletionProposal {
 
 	/** The invocation context */
-	private IInvocationContext fContext;
+	private IQuickAssistInvocationContext fContext;
 
 	/** The word to ignore */
 	private String fWord;
@@ -52,7 +51,7 @@ public class WordIgnoreProposal implements IJavaCompletionProposal {
 	 * @param context
 	 *                   The invocation context
 	 */
-	public WordIgnoreProposal(final String word, final IInvocationContext context) {
+	public WordIgnoreProposal(final String word, final IQuickAssistInvocationContext context) {
 		fWord= word;
 		fContext= context;
 	}
@@ -67,11 +66,9 @@ public class WordIgnoreProposal implements IJavaCompletionProposal {
 
 		if (checker != null) {
 			checker.ignoreWord(fWord);
-			if (fContext instanceof IQuickAssistInvocationContext) {
-				ISourceViewer sourceViewer= ((IQuickAssistInvocationContext)fContext).getSourceViewer();
-				if (sourceViewer != null)
-					SpellingProblem.removeAll(sourceViewer, fWord);
-			}
+			ISourceViewer sourceViewer= fContext.getSourceViewer();
+			if (sourceViewer != null)
+				SpellingProblem.removeAll(sourceViewer, fWord);
 		}
 	}
 
@@ -113,6 +110,6 @@ public class WordIgnoreProposal implements IJavaCompletionProposal {
 	 * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
 	 */
 	public final Point getSelection(final IDocument document) {
-		return new Point(fContext.getSelectionOffset(), fContext.getSelectionLength());
+		return new Point(fContext.getOffset(), fContext.getLength());
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordQuickFixProcessor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordQuickFixProcessor.java
index a9b36e8..889832d 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordQuickFixProcessor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/WordQuickFixProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,10 @@ import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
 
+import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.TextInvocationContext;
+
 import org.eclipse.jdt.core.ICompilationUnit;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
@@ -46,7 +50,7 @@ public class WordQuickFixProcessor implements IQuickFixProcessor {
 	/*
 	 * @see org.eclipse.jdt.ui.text.java.IQuickFixProcessor#getCorrections(org.eclipse.jdt.ui.text.java.IInvocationContext,org.eclipse.jdt.ui.text.java.IProblemLocation[])
 	 */
-	public IJavaCompletionProposal[] getCorrections(IInvocationContext context, IProblemLocation[] locations) throws CoreException {
+	public IJavaCompletionProposal[] getCorrections(IInvocationContext invocationContext, IProblemLocation[] locations) throws CoreException {
 
 		final int threshold= PreferenceConstants.getPreferenceStore().getInt(PreferenceConstants.SPELLING_PROPOSAL_THRESHOLD);
 
@@ -68,8 +72,13 @@ public class WordQuickFixProcessor implements IQuickFixProcessor {
 		if (checker != null) {
 
 			for (int index= 0; index < locations.length; index++) {
-
 				location= locations[index];
+				
+				ISourceViewer sourceViewer= null;
+				if (invocationContext instanceof IQuickAssistInvocationContext)
+					sourceViewer= ((IQuickAssistInvocationContext)invocationContext).getSourceViewer();
+				IQuickAssistInvocationContext context= new TextInvocationContext(sourceViewer, location.getOffset(), location.getLength());
+				
 				if (location.getProblemId() == JavaSpellingReconcileStrategy.SPELLING_PROBLEM_ID) {
 
 					arguments= location.getProblemArguments();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
index 157f25f..1d85c90 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/AbstractSpellDictionary.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.text.spelling.engine;
 
 import java.io.BufferedReader;
@@ -16,6 +15,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.charset.Charset;
@@ -23,6 +23,7 @@ import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CodingErrorAction;
 import java.nio.charset.MalformedInputException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -43,6 +44,7 @@ import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 
+
 /**
  * Partial implementation of a spell dictionary.
  *
@@ -50,6 +52,56 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
  */
 public abstract class AbstractSpellDictionary implements ISpellDictionary {
 
+	/**
+	 * Byte array wrapper
+	 * @since 3.6
+	 */
+	private static class ByteArrayWrapper {
+
+		private static int hashCode(byte[] array) {
+			int prime= 31;
+			if (array == null)
+				return 0;
+			int result= 1;
+			for (int index= 0; index < array.length; index++) {
+				result= prime * result + array[index];
+			}
+			return result;
+		}
+
+		private byte[] byteArray;
+
+		public ByteArrayWrapper(byte[] byteArray) {
+			this.byteArray= byteArray;
+		}
+		public int hashCode() {
+			final int prime= 31;
+			int result= 1;
+			result= prime * result + ByteArrayWrapper.hashCode(byteArray);
+			return result;
+		}
+
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null)
+				return false;
+			if (!(obj instanceof ByteArrayWrapper))
+				return false;
+			ByteArrayWrapper other= (ByteArrayWrapper)obj;
+			if (!Arrays.equals(byteArray, other.byteArray))
+				return false;
+			return true;
+		}
+	}
+
+	
+	/**
+	 * Canonical name for UTF-8 encoding
+	 * @since 3.6
+	 */
+	private static final String UTF_8= "UTF-8"; //$NON-NLS-1$
+
 	/** The bucket capacity */
 	protected static final int BUCKET_CAPACITY= 4;
 
@@ -59,14 +111,17 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 	/** The distance threshold */
 	protected static final int DISTANCE_THRESHOLD= 160;
 
-	/** The hash capacity */
-	protected static final int HASH_CAPACITY= 22 * 1024;
+	/**
+	 * The hash load factor
+	 * @since 3.6
+	 */
+	protected static final float LOAD_FACTOR= 0.85f;
 
 	/** The phonetic distance algorithm */
 	private IPhoneticDistanceAlgorithm fDistanceAlgorithm= new DefaultPhoneticDistanceAlgorithm();
 
 	/** The mapping from phonetic hashes to word lists */
-	private final Map fHashBuckets= new HashMap(HASH_CAPACITY);
+	private final Map fHashBuckets= new HashMap(getInitialSize(), LOAD_FACTOR);
 
 	/** The phonetic hash provider */
 	private IPhoneticHashProvider fHashProvider= new DefaultPhoneticHashProvider();
@@ -86,6 +141,16 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 	boolean fIsStrippingNonLetters= true;
 
 	/**
+	 * Returns the initial size of dictionary.
+	 * 
+	 * @return The initial size of dictionary.
+	 * @since 3.6
+	 */
+	protected int getInitialSize() {
+		return 32;
+	}
+
+	/**
 	 * Returns all candidates with the same phonetic hash.
 	 *
 	 * @param hash
@@ -93,7 +158,14 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 	 * @return Array of candidates for the phonetic hash
 	 */
 	protected final Object getCandidates(final String hash) {
-		return fHashBuckets.get(hash);
+		ByteArrayWrapper hashBytes;
+		try {
+			hashBytes= new ByteArrayWrapper(hash.getBytes(UTF_8));
+		} catch (UnsupportedEncodingException e) {
+			JavaPlugin.log(e);
+			return null;
+		}
+		return fHashBuckets.get(hashBytes);
 	}
 
 	/**
@@ -124,8 +196,14 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 			final Object candidates= getCandidates(hash);
 			if (candidates == null)
 				continue;
-			else if (candidates instanceof String) {
-				String candidate= (String)candidates;
+			else if (candidates instanceof byte[]) {
+				String candidate;
+				try {
+					candidate= new String((byte[])candidates, UTF_8);
+				} catch (UnsupportedEncodingException e) {
+					JavaPlugin.log(e);
+					return result;
+				}
 				distance= fDistanceAlgorithm.getDistance(word, candidate);
 				if (distance < DISTANCE_THRESHOLD) {
 					buffer.setLength(0);
@@ -138,10 +216,16 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 			}
 
 			final ArrayList candidateList= (ArrayList)candidates;
-			int candidateSize= Math.min(500, candidateList.size()); // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=195357
+			int candidateSize= Math.min(500, candidateList.size()); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195357
 			for (int offset= 0; offset < candidateSize; offset++) {
 
-				String candidate= (String)candidateList.get(offset);
+				String candidate;
+				try {
+					candidate= new String((byte[])candidateList.get(offset), UTF_8);
+				} catch (UnsupportedEncodingException e) {
+					JavaPlugin.log(e);
+					return result;
+				}
 				distance= fDistanceAlgorithm.getDistance(word, candidate);
 
 				if (distance < DISTANCE_THRESHOLD) {
@@ -182,8 +266,14 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 		final Object candidates= getCandidates(fHashProvider.getHash(word));
 		if (candidates == null)
 			return;
-		else if (candidates instanceof String) {
-			String candidate= (String)candidates;
+		else if (candidates instanceof byte[]) {
+			String candidate;
+			try {
+				candidate= new String((byte[])candidates, UTF_8);
+			} catch (UnsupportedEncodingException e) {
+				JavaPlugin.log(e);
+				return;
+			}
 			distance= fDistanceAlgorithm.getDistance(word, candidate);
 			buffer.append(candidate);
 			if (sentence)
@@ -196,7 +286,13 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 		final ArrayList matches= new ArrayList(candidateList.size());
 
 		for (int index= 0; index < candidateList.size(); index++) {
-			String candidate= (String)candidateList.get(index);
+			String candidate;
+			try {
+				candidate= new String((byte[])candidateList.get(index), UTF_8);
+			} catch (UnsupportedEncodingException e) {
+				JavaPlugin.log(e);
+				return;
+			}
 			distance= fDistanceAlgorithm.getDistance(word, candidate);
 
 			if (distance <= minimum) {
@@ -377,17 +473,27 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 	protected final void hashWord(final String word) {
 
 		final String hash= fHashProvider.getHash(word);
-		Object bucket= fHashBuckets.get(hash);
+		ByteArrayWrapper hashBytes;
+		byte[] wordBytes;
+		try {
+			hashBytes= new ByteArrayWrapper(hash.getBytes(UTF_8));
+			wordBytes= word.getBytes(UTF_8);
+		} catch (UnsupportedEncodingException e) {
+			JavaPlugin.log(e);
+			return;
+		}
+
+		Object bucket= fHashBuckets.get(hashBytes);
 
 		if (bucket == null) {
-			fHashBuckets.put(hash, word);
+			fHashBuckets.put(hashBytes, wordBytes);
 		} else if (bucket instanceof ArrayList) {
-			((ArrayList)bucket).add(word);
+			((ArrayList)bucket).add(wordBytes);
 		} else {
 			ArrayList list= new ArrayList(BUCKET_CAPACITY);
 			list.add(bucket);
-			list.add(word);
-			fHashBuckets.put(hash, list);
+			list.add(wordBytes);
+			fHashBuckets.put(hashBytes, list);
 		}
 	}
 
@@ -413,16 +519,34 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 		final Object candidates= getCandidates(fHashProvider.getHash(word));
 		if (candidates == null)
 			return false;
-		else if (candidates instanceof String) {
-			String candidate= (String)candidates;
+		else if (candidates instanceof byte[]) {
+			String candidate;
+			try {
+				candidate= new String((byte[])candidates, UTF_8);
+			} catch (UnsupportedEncodingException e) {
+				JavaPlugin.log(e);
+				return false;
+			}
 			if (candidate.equals(word) || candidate.equals(word.toLowerCase()))
 				return true;
 			return false;
 		}
 		final ArrayList candidateList= (ArrayList)candidates;
-		if (candidateList.contains(word) || candidateList.contains(word.toLowerCase()))
-			return true;
-
+		byte[] wordBytes;
+		byte[] lowercaseWordBytes;
+		try {
+			wordBytes= word.getBytes(UTF_8);
+			lowercaseWordBytes= word.toLowerCase().getBytes(UTF_8);
+		} catch (UnsupportedEncodingException e) {
+			JavaPlugin.log(e);
+			return false;
+		}
+		for (int index= 0; index < candidateList.size(); index++) {
+			byte[] candidate= (byte[])candidateList.get(index);
+			if (Arrays.equals(candidate, wordBytes) || Arrays.equals(candidate, lowercaseWordBytes)) {
+				return true;
+			}
+		}
 		return false;
 	}
 
@@ -464,7 +588,7 @@ public abstract class AbstractSpellDictionary implements ISpellDictionary {
 	/*
 	 * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellDictionary#isLoaded()
 	 */
-	public final synchronized boolean isLoaded() {
+	public synchronized final boolean isLoaded() {
 		return fLoaded || fHashBuckets.size() > 0;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/LocaleSensitiveSpellDictionary.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/LocaleSensitiveSpellDictionary.java
index a796f13..43e35ef 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/LocaleSensitiveSpellDictionary.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/engine/LocaleSensitiveSpellDictionary.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,13 +8,13 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jdt.internal.ui.text.spelling.engine;
 
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Locale;
 
+
 /**
  * Platform wide read-only locale sensitive dictionary for spell checking.
  *
@@ -56,4 +56,12 @@ public class LocaleSensitiveSpellDictionary extends AbstractSpellDictionary {
 	protected final URL getURL() throws MalformedURLException {
 		return new URL(fLocation, fLocale.toString() + ".dictionary");  //$NON-NLS-1$
 	}
+
+	/*
+	 * @see org.eclipse.jdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getInitialSize()
+	 * @since 3.6
+	 */
+	protected int getInitialSize() {
+		return 32 * 1024;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SubTypeHierarchyViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SubTypeHierarchyViewer.java
index 347c28c..16d0073 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SubTypeHierarchyViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SubTypeHierarchyViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,17 +29,6 @@ public class SubTypeHierarchyViewer extends TypeHierarchyViewer {
 	}
 
 	/*
-	 * @see TypeHierarchyViewer#getTitle
-	 */
-	public String getTitle() {
-		if (isMethodFiltering()) {
-			return TypeHierarchyMessages.SubTypeHierarchyViewer_filtered_title;
-		} else {
-			return TypeHierarchyMessages.SubTypeHierarchyViewer_title;
-		}
-	}
-
-	/*
 	 * @see TypeHierarchyViewer#updateContent
 	 */
 	public void updateContent(boolean expand) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SuperTypeHierarchyViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SuperTypeHierarchyViewer.java
index 7e4e468..7702e92 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SuperTypeHierarchyViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/SuperTypeHierarchyViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,17 +29,6 @@ public class SuperTypeHierarchyViewer extends TypeHierarchyViewer {
 	}
 
 	/*
-	 * @see TypeHierarchyViewer#getTitle
-	 */
-	public String getTitle() {
-		if (isMethodFiltering()) {
-			return TypeHierarchyMessages.SuperTypeHierarchyViewer_filtered_title;
-		} else {
-			return TypeHierarchyMessages.SuperTypeHierarchyViewer_title;
-		}
-	}
-
-	/*
 	 * @see TypeHierarchyViewer#updateContent
 	 */
 	public void updateContent(boolean expand) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java
index 43bd110..4d3ce1e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TraditionalHierarchyViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,17 +33,6 @@ public class TraditionalHierarchyViewer extends TypeHierarchyViewer {
 	}
 
 	/*
-	 * @see TypeHierarchyViewer#getTitle
-	 */
-	public String getTitle() {
-		if (isMethodFiltering()) {
-			return TypeHierarchyMessages.TraditionalHierarchyViewer_filtered_title;
-		} else {
-			return TypeHierarchyMessages.TraditionalHierarchyViewer_title;
-		}
-	}
-
-	/*
 	 * @see TypeHierarchyViewer#updateContent
 	 */
 	public void updateContent(boolean expand) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
index 2e60938..1883b33 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,7 +58,9 @@ public abstract class TypeHierarchyContentProvider implements ITreeContentProvid
 		fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() {
 			public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchyProvider, IType[] changedTypes) {
 				if (changedTypes == null) {
-					fMethodOverrideTester= null;
+					synchronized (this) {
+						fMethodOverrideTester= null;
+					}
 				}
 			}
 		};
@@ -90,25 +92,29 @@ public abstract class TypeHierarchyContentProvider implements ITreeContentProvid
 	}
 
 	private void addCompatibleMethods(IMethod filterMethod, IType typeToFindIn, List children) throws JavaModelException {
-		boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
-		IMethod[] methods= typeToFindIn.getMethods();
-		for (int i= 0; i < methods.length; i++) {
-			IMethod curr= methods[i];
-			if (isCompatibleMethod(filterMethod, curr, filterMethodOverrides) && !children.contains(curr)) {
-				children.add(curr);
+		synchronized (fTypeHierarchyLifeCycleListener) {
+			boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
+			IMethod[] methods= typeToFindIn.getMethods();
+			for (int i= 0; i < methods.length; i++) {
+				IMethod curr= methods[i];
+				if (isCompatibleMethod(filterMethod, curr, filterMethodOverrides) && !children.contains(curr)) {
+					children.add(curr);
+				}
 			}
 		}
 	}
 
 	private boolean hasCompatibleMethod(IMethod filterMethod, IType typeToFindIn) throws JavaModelException {
-		boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
-		IMethod[] methods= typeToFindIn.getMethods();
-		for (int i= 0; i < methods.length; i++) {
-			if (isCompatibleMethod(filterMethod, methods[i], filterMethodOverrides)) {
-				return true;
+		synchronized (fTypeHierarchyLifeCycleListener) {
+			boolean filterMethodOverrides= initializeMethodOverrideTester(filterMethod, typeToFindIn);
+			IMethod[] methods= typeToFindIn.getMethods();
+			for (int i= 0; i < methods.length; i++) {
+				if (isCompatibleMethod(filterMethod, methods[i], filterMethodOverrides)) {
+					return true;
+				}
 			}
+			return false;
 		}
-		return false;
 	}
 
 	private boolean isCompatibleMethod(IMethod filterMethod, IMethod method, boolean filterOverrides) throws JavaModelException {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
index 255b58e..93a778c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyLifeCycle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,12 +14,19 @@ import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.swt.widgets.Display;
+
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
 
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 
+import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
+
 import org.eclipse.jdt.core.ElementChangedEvent;
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
@@ -37,6 +44,9 @@ import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.corext.util.Messages;
+
+import org.eclipse.jdt.ui.JavaElementLabels;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 
@@ -52,8 +62,37 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 
 	private List fChangeListeners;
 
-	public TypeHierarchyLifeCycle() {
+	/**
+	 * The type hierarchy view part.
+	 *
+	 * @since 3.6
+	 */
+	private TypeHierarchyViewPart fTypeHierarchyViewPart;
+
+	/**
+	 * The job that runs in the background to refresh the type hierarchy.
+	 *
+	 * @since 3.6
+	 */
+	private Job fRefreshHierarchyJob;
+
+	/**
+	 * Indicates whether the refresh job was canceled explicitly.
+	 * 
+	 * @since 3.6
+	 */
+	private boolean fRefreshJobCanceledExplicitly= true;
+
+	/**
+	 * Creates the type hierarchy life cycle.
+	 *
+	 * @param part the type hierarchy view part
+	 * @since 3.6
+	 */
+	public TypeHierarchyLifeCycle(TypeHierarchyViewPart part) {
 		this(false);
+		fTypeHierarchyViewPart= part;
+		fRefreshHierarchyJob= null;
 	}
 
 	public TypeHierarchyLifeCycle(boolean isSuperTypesOnly) {
@@ -79,6 +118,12 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 			fHierarchy= null;
 			fInputElement= null;
 		}
+		synchronized (this) {
+			if (fRefreshHierarchyJob != null) {
+				fRefreshHierarchyJob.cancel();
+				fRefreshHierarchyJob= null;
+			}
+		}
 	}
 
 	public void removeChangedListener(ITypeHierarchyLifeCycleListener listener) {
@@ -98,7 +143,29 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 		}
 	}
 
+	/**
+	 * Refreshes the type hierarchy for the java element if it exists.
+	 *
+	 * @param element the java element for which the type hierarchy is computed
+	 * @param context the runnable context
+	 * @throws InterruptedException thrown from the <code>OperationCanceledException</code> when the monitor is canceled
+	 * @throws InvocationTargetException thrown from the <code>JavaModelException</code> if the java element does not exist or if an exception occurs while accessing its corresponding resource
+	 */
 	public void ensureRefreshedTypeHierarchy(final IJavaElement element, IRunnableContext context) throws InvocationTargetException, InterruptedException {
+		synchronized (this) {
+			if (fRefreshHierarchyJob != null) {
+				fRefreshHierarchyJob.cancel();
+				fRefreshJobCanceledExplicitly= false;
+				try {
+					fRefreshHierarchyJob.join();
+				} catch (InterruptedException e) {
+					// ignore
+				} finally {
+					fRefreshHierarchyJob= null;
+					fRefreshJobCanceledExplicitly= true;
+				}
+			}
+		}
 		if (element == null || !element.exists()) {
 			freeHierarchy();
 			return;
@@ -106,21 +173,97 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 		boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement));
 
 		if (hierachyCreationNeeded || fHierarchyRefreshNeeded) {
+			if (fTypeHierarchyViewPart == null) {
+				IRunnableWithProgress op= new IRunnableWithProgress() {
+					public void run(IProgressMonitor pm) throws InvocationTargetException, InterruptedException {
+						try {
+							doHierarchyRefresh(element, pm);
+						} catch (JavaModelException e) {
+							throw new InvocationTargetException(e);
+						} catch (OperationCanceledException e) {
+							throw new InterruptedException();
+						}
+					}
+				};
+				fHierarchyRefreshNeeded= true;
+				context.run(true, true, op);
+				fHierarchyRefreshNeeded= false;
+			} else {
+				final String label= Messages.format(TypeHierarchyMessages.TypeHierarchyLifeCycle_computeInput, JavaElementLabels.getElementLabel(element, JavaElementLabels.ALL_DEFAULT));
+				synchronized (this) {
+					fRefreshHierarchyJob= new Job(label) {
+						/*
+						 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+						 */
+						public IStatus run(IProgressMonitor pm) {
+							pm.beginTask(label, LONG);
+							try {
+								doHierarchyRefreshBackground(element, pm);
+							} catch (OperationCanceledException e) {
+								if (fRefreshJobCanceledExplicitly) {
+									fTypeHierarchyViewPart.showEmptyViewer();
+								}
+								return Status.CANCEL_STATUS;
+							} catch (JavaModelException e) {
+								return e.getStatus();
+							} finally {
+								fHierarchyRefreshNeeded= true;
+								pm.done();
+							}
+							return Status.OK_STATUS;
+						}
+					};
+					fRefreshHierarchyJob.setUser(true);
+					IWorkbenchSiteProgressService progressService= (IWorkbenchSiteProgressService)fTypeHierarchyViewPart.getSite()
+														.getAdapter(IWorkbenchSiteProgressService.class);
+					progressService.schedule(fRefreshHierarchyJob, 0);
+				}
+			}
+		}
+	}
 
-			IRunnableWithProgress op= new IRunnableWithProgress() {
-				public void run(IProgressMonitor pm) throws InvocationTargetException, InterruptedException {
-					try {
-						doHierarchyRefresh(element, pm);
-					} catch (JavaModelException e) {
-						throw new InvocationTargetException(e);
-					} catch (OperationCanceledException e) {
-						throw new InterruptedException();
+	/**
+	 * Returns <code>true</code> if the refresh job is running, <code>false</code> otherwise.
+	 * 
+	 * @return <code>true</code> if the refresh job is running, <code>false</code> otherwise
+	 * 
+	 * @since 3.6
+	 */
+	public boolean isRefreshJobRunning() {
+		return fRefreshHierarchyJob != null;
+	}
+
+	/**
+	 * Refreshes the hierarchy in the background and updates the hierarchy viewer asynchronously in
+	 * the UI thread.
+	 * 
+	 * @param element the java element on which the hierarchy is computed
+	 * @param pm the progress monitor
+	 * @throws JavaModelException if the java element does not exist or if an exception occurs while
+	 *             accessing its corresponding resource.
+	 * 
+	 * @since 3.6
+	 */
+	protected void doHierarchyRefreshBackground(final IJavaElement element, final IProgressMonitor pm) throws JavaModelException {
+		doHierarchyRefresh(element, pm);
+		if (!pm.isCanceled()) {
+			Display.getDefault().asyncExec(new Runnable() {
+				/*
+				 * @see java.lang.Runnable#run()
+				 */
+				public void run() {
+					synchronized (TypeHierarchyLifeCycle.this) {
+						if (fRefreshHierarchyJob == null) {
+							return;
+						}
+						fRefreshHierarchyJob= null;
 					}
+					if (pm.isCanceled())
+						return;
+					fTypeHierarchyViewPart.setViewersInput();
+					fTypeHierarchyViewPart.updateViewers();
 				}
-			};
-			fHierarchyRefreshNeeded= true;
-			context.run(true, true, op);
-			fHierarchyRefreshNeeded= false;
+			});
 		}
 	}
 
@@ -160,7 +303,7 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 	}
 
 
-	public synchronized void doHierarchyRefresh(IJavaElement element, IProgressMonitor pm) throws JavaModelException {
+	public void doHierarchyRefresh(IJavaElement element, IProgressMonitor pm) throws JavaModelException {
 		boolean hierachyCreationNeeded= (fHierarchy == null || !element.equals(fInputElement));
 		// to ensure the order of the two listeners always remove / add listeners on operations
 		// on type hierarchies
@@ -176,6 +319,8 @@ public class TypeHierarchyLifeCycle implements ITypeHierarchyChangedListener, IE
 			fInputElement= element;
 		} else {
 			fHierarchy.refresh(pm);
+			if (pm != null && pm.isCanceled())
+				throw new OperationCanceledException();
 		}
 		fHierarchy.addTypeHierarchyChangedListener(this);
 		JavaCore.addElementChangedListener(this);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.java
index 90fb979..b8324d9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,12 +60,6 @@ public final class TypeHierarchyMessages extends NLS {
 	public static String SortByDefiningTypeAction_label;
 	public static String SortByDefiningTypeAction_tooltip;
 	public static String SortByDefiningTypeAction_description;
-	public static String SubTypeHierarchyViewer_title;
-	public static String SubTypeHierarchyViewer_filtered_title;
-	public static String SuperTypeHierarchyViewer_title;
-	public static String SuperTypeHierarchyViewer_filtered_title;
-	public static String TraditionalHierarchyViewer_title;
-	public static String TraditionalHierarchyViewer_filtered_title;
 	public static String TypeHierarchyViewPart_createinput;
 	public static String TypeHierarchyViewPart_error_title;
 	public static String TypeHierarchyViewPart_error_message;
@@ -73,12 +67,12 @@ public final class TypeHierarchyMessages extends NLS {
 	public static String TypeHierarchyViewPart_nodecl;
 	public static String TypeHierarchyViewPart_exception_title;
 	public static String TypeHierarchyViewPart_exception_message;
-	public static String TypeHierarchyViewPart_title;
 	public static String TypeHierarchyViewPart_tooltip;
-	public static String TypeHierarchyViewPart_ws_title;
+	public static String TypeHierarchyViewPart_ws_description;
 	public static String TypeHierarchyViewPart_ws_tooltip;
 	public static String TypeHierarchyViewPart_restoreinput;
 	public static String TypeHierarchyViewPart_layout_submenu;
+	public static String TypeHierarchyLifeCycle_computeInput;
 	public static String ToggleViewAction_subtypes_label;
 	public static String ToggleViewAction_subtypes_tooltip;
 	public static String ToggleViewAction_subtypes_description;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.properties
index 6cf712c..56fcbd6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,22 +13,21 @@ EnableMemberFilterAction_label=Members in Hierarchy
 EnableMemberFilterAction_tooltip=Lock View and Show Members in Hierarchy
 EnableMemberFilterAction_description=Lock view and show members in hierarchy
 
-ToggleOrientationAction_horizontal_label=&Horizontal View Orientation
-ToggleOrientationAction_horizontal_tooltip=Horizontal View Orientation
-ToggleOrientationAction_horizontal_description=Horizontal View Orientation
+ToggleOrientationAction_horizontal_label=&Horizontal
+ToggleOrientationAction_horizontal_tooltip=Horizontal
+ToggleOrientationAction_horizontal_description=Horizontal
 
-ToggleOrientationAction_vertical_label=&Vertical View Orientation
-ToggleOrientationAction_vertical_tooltip=Vertical View Orientation
-ToggleOrientationAction_vertical_description=Vertical View Orientation
+ToggleOrientationAction_vertical_label=&Vertical
+ToggleOrientationAction_vertical_tooltip=Vertical
+ToggleOrientationAction_vertical_description=Vertical
 
-ToggleOrientationAction_automatic_label=&Automatic View Orientation
-ToggleOrientationAction_automatic_tooltip=Automatic View Orientation
-ToggleOrientationAction_automatic_description=Automatic View Orientation
+ToggleOrientationAction_automatic_label=&Automatic
+ToggleOrientationAction_automatic_tooltip=Automatic
+ToggleOrientationAction_automatic_description=Automatic
 
-
-ToggleOrientationAction_single_label=Hierarchy View &Only
-ToggleOrientationAction_single_tooltip=Hierarchy View Only
-ToggleOrientationAction_single_description=Hierarchy View Only
+ToggleOrientationAction_single_label=Hierarchy &Only
+ToggleOrientationAction_single_tooltip=Hierarchy Only
+ToggleOrientationAction_single_description=Hierarchy Only
 
 FocusOnSelectionAction_label=Fo&cus On ''{0}''
 FocusOnSelectionAction_tooltip=Focus the Type Hierarchy on the Selected Element
@@ -63,15 +62,7 @@ ShowQualifiedTypeNamesAction_description=Show qualified type names
 SortByDefiningTypeAction_label=Sort by the Defining Type
 SortByDefiningTypeAction_tooltip=Sort Methods by the Defining Type
 SortByDefiningTypeAction_description=Sort methods by the defining type
-
-SubTypeHierarchyViewer_title=Hierarchy
-SubTypeHierarchyViewer_filtered_title=Hierarchy
-
-SuperTypeHierarchyViewer_title=Hierarchy
-SuperTypeHierarchyViewer_filtered_title=Hierarchy
-
-TraditionalHierarchyViewer_title=Hierarchy
-TraditionalHierarchyViewer_filtered_title=Hierarchy
+TypeHierarchyLifeCycle_computeInput=Computing type hierarchy of ''{0}''...
 
 TypeHierarchyViewPart_error_title=Open Type Hierarchy
 TypeHierarchyViewPart_createinput=Creating type hierarchy of ''{0}''...
@@ -82,10 +73,9 @@ TypeHierarchyViewPart_nodecl=All types of the current hierarchy ''{0}'' have bee
 TypeHierarchyViewPart_exception_title=Type Hierarchy
 TypeHierarchyViewPart_exception_message=Creating hierarchy failed. See log for details.
 
-TypeHierarchyViewPart_title={1}
-TypeHierarchyViewPart_tooltip={0} of ''{1}''
-TypeHierarchyViewPart_ws_title={1}, working set: {2}
-TypeHierarchyViewPart_ws_tooltip={0} of {1} - working set: {2}
+TypeHierarchyViewPart_tooltip=Type Hierarchy of ''{0}''
+TypeHierarchyViewPart_ws_description={0}, working set: {1}
+TypeHierarchyViewPart_ws_tooltip=Type Hierarchy of {0} - working set: {1}
 
 TypeHierarchyViewPart_restoreinput=Restoring type hierarchy of ''{0}''...
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
index dfd1017..f6df9cd 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,7 +73,6 @@ import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPartListener2;
 import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchActionConstants;
@@ -242,6 +241,21 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 
 	private OpenAction fOpenAction;
 
+	/**
+	 * Indicates whether the restore job was canceled explicitly.
+	 * 
+	 * @since 3.6
+	 */
+	private boolean fRestoreJobCanceledExplicitly= true;
+
+	/**
+	 * Indicates whether empty viewers should keep showing. If false, replace them with
+	 * fEmptyTypesViewer.
+	 * 
+	 * @since 3.6
+	 */
+	private boolean fKeepShowingEmptyViewers= true;
+
 
 	public TypeHierarchyViewPart() {
 		fSelectedType= null;
@@ -251,7 +265,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		fSelectInEditor= true;
 		fRestoreStateJob= null;
 
-		fHierarchyLifeCycle= new TypeHierarchyLifeCycle();
+		fHierarchyLifeCycle= new TypeHierarchyLifeCycle(this);
 		fTypeHierarchyLifeCycleListener= new ITypeHierarchyLifeCycleListener() {
 			public void typeHierarchyChanged(TypeHierarchyLifeCycle typeHierarchy, IType[] changedTypes) {
 				doTypeHierarchyChanged(typeHierarchy, changedTypes);
@@ -350,7 +364,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		}
 		if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(property)) {
 			updateHierarchyViewer(true);
-			updateTitle();
+			updateToolTipAndDescription();
 		}
 	}
 
@@ -511,6 +525,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		synchronized (this) {
 			if (fRestoreStateJob != null) {
 				fRestoreStateJob.cancel();
+				fRestoreJobCanceledExplicitly= false;
 				try {
 					fRestoreStateJob.join();
 				} catch (InterruptedException e) {
@@ -529,6 +544,11 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		if (inputElement == null) {
 			clearInput();
 		} else {
+			if (!inputElement.equals(prevInput)) {
+				for (int i= 0; i < fAllViewers.length; i++) {
+					fAllViewers[i].setInput(null);
+				}
+			}
 			fInputElement= inputElement;
 			fNoHierarchyShownLabel.setText(Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_createinput, JavaElementLabels.getElementLabel(inputElement, JavaElementLabels.ALL_DEFAULT)));
 			try {
@@ -537,34 +557,47 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 			} catch (InvocationTargetException e) {
 				ExceptionHandler.handle(e, getSite().getShell(), TypeHierarchyMessages.TypeHierarchyViewPart_exception_title, TypeHierarchyMessages.TypeHierarchyViewPart_exception_message);
 				clearInput();
-				return;
+				return;// panic code. This code wont be executed.
 			} catch (InterruptedException e) {
 				fNoHierarchyShownLabel.setText(TypeHierarchyMessages.TypeHierarchyViewPart_empty);
-				return;
+				return;// panic code. This code wont be executed.
 			}
 
 			if (inputElement.getElementType() != IJavaElement.TYPE) {
 				setHierarchyMode(HIERARCHY_MODE_CLASSIC);
 			}
-			// turn off member filtering
-			fSelectInEditor= false;
-			setMemberFilter(null);
-			internalSelectType(null, false); // clear selection
-			fIsEnableMemberFilter= false;
-			if (!inputElement.equals(prevInput)) {
-				updateHierarchyViewer(true);
-			}
-			IType root= getSelectableType(inputElement);
-			internalSelectType(root, true);
-			updateMethodViewer(root);
-			updateToolbarButtons();
-			updateTitle();
-			showMembersInHierarchy(false);
-			fPagebook.showPage(fTypeMethodsSplitter);
-			fSelectInEditor= true;
+			updateViewers();
 		}
 	}
 
+	/**
+	 * Updates the viewers, toolbar buttons and tooltip.
+	 * 
+	 * @since 3.6
+	 */
+	public void updateViewers() {
+		if (fInputElement == null)
+			return;
+		if (!fHierarchyLifeCycle.isRefreshJobRunning()) {
+			setViewersInput();
+		}
+		setViewerVisibility(true);
+		// turn off member filtering
+		fSelectInEditor= false;
+		setMemberFilter(null);
+		internalSelectType(null, false); // clear selection
+		fIsEnableMemberFilter= false;
+		updateHierarchyViewer(true);
+		IType root= getSelectableType(fInputElement);
+		internalSelectType(root, true);
+		updateMethodViewer(root);
+		updateToolbarButtons();
+		updateToolTipAndDescription();
+		showMembersInHierarchy(false);
+		fPagebook.showPage(fTypeMethodsSplitter);		
+		fSelectInEditor= true;		
+	}
+
 	private void processOutstandingEvents() {
 		Display display= getDisplay();
 		if (display != null && !display.isDisposed())
@@ -577,6 +610,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 
 		updateHierarchyViewer(false);
 		updateToolbarButtons();
+		updateToolTipAndDescription();
 	}
 
 	/*
@@ -590,8 +624,11 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 	 * @see IWorkbenchPart#dispose
 	 */
 	public void dispose() {
-		fHierarchyLifeCycle.freeHierarchy();
-		fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener);
+		if (fHierarchyLifeCycle != null) {
+			fHierarchyLifeCycle.freeHierarchy();
+			fHierarchyLifeCycle.removeChangedListener(fTypeHierarchyLifeCycleListener);
+			fHierarchyLifeCycle= null;
+		}
 		fPaneLabelProvider.dispose();
 
 		if (fMethodsViewer != null) {
@@ -624,7 +661,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		if (key == IShowInTargetList.class) {
 			return new IShowInTargetList() {
 				public String[] getShowInTargetIds() {
-					return new String[] { JavaUI.ID_PACKAGES, IPageLayout.ID_RES_NAV  };
+					return new String[] { JavaUI.ID_PACKAGES, JavaPlugin.ID_RES_NAV  };
 				}
 
 			};
@@ -1138,7 +1175,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 				if (!isChildVisible(fViewerbook, getCurrentViewer().getControl())) {
 					setViewerVisibility(true);
 				}
-			} else {
+			} else if (!isKeepShowingEmptyViewers()) {//Show the empty hierarchy viewer till fresh computation is done.
 				fEmptyTypesViewer.setText(Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_nodecl, JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT)));
 				setViewerVisibility(false);
 			}
@@ -1196,7 +1233,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 				}
 				setMemberFilter(memberFilter);
 				updateHierarchyViewer(true);
-				updateTitle();
+				updateToolTipAndDescription();
 				internalSelectType(fSelectedType, true);
 			}
 			if (nSelected == 1 && fSelectInEditor) {
@@ -1270,27 +1307,25 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		return false;
 	}
 
-	private void updateTitle() {
-		String viewerTitle= getCurrentViewer().getTitle();
-
+	private void updateToolTipAndDescription() {
 		String tooltip;
-		String title;
+		String description;
 		if (fInputElement != null) {
 			IWorkingSet workingSet= fWorkingSetActionGroup.getWorkingSet();
+			String elementName= JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT);
 			if (workingSet == null) {
-				String[] args= new String[] { viewerTitle, JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT) };
-				title= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_title, args);
-				tooltip= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_tooltip, args);
+				description= elementName;
+				tooltip= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_tooltip, elementName);
 			} else {
-				String[] args= new String[] { viewerTitle, JavaElementLabels.getElementLabel(fInputElement, JavaElementLabels.ALL_DEFAULT), workingSet.getLabel() };
-				title= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_ws_title, args);
+				String[] args= new String[] { elementName, workingSet.getLabel() };
+				description= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_ws_description, args);
 				tooltip= Messages.format(TypeHierarchyMessages.TypeHierarchyViewPart_ws_tooltip, args);
 			}
 		} else {
-			title= ""; //$NON-NLS-1$
-			tooltip= viewerTitle;
+			description= ""; //$NON-NLS-1$
+			tooltip= getPartName();
 		}
-		setContentDescription(title);
+		setContentDescription(description);
 		setTitleToolTip(tooltip);
 	}
 
@@ -1324,7 +1359,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 					typeSelectionChanged(currSelection);
 				}
 			}
-			updateTitle();
+			updateToolTipAndDescription();
 
 			fDialogSettings.put(DIALOGSTORE_HIERARCHYVIEW, viewerIndex);
 			getCurrentViewer().getTree().setFocus();
@@ -1377,7 +1412,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 				IType methodViewerInput= (IType) fMethodsViewer.getInput();
 				setMemberFilter(null);
 				updateHierarchyViewer(true);
-				updateTitle();
+				updateToolTipAndDescription();
 
 				if (methodViewerInput != null && getCurrentViewer().isElementShown(methodViewerInput)) {
 					// avoid that the method view changes content by selecting the previous input
@@ -1567,6 +1602,9 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 						} catch (JavaModelException e) {
 							return e.getStatus();
 						} catch (OperationCanceledException e) {
+							if (fRestoreJobCanceledExplicitly) {
+								showEmptyViewer();
+							}
 							return Status.CANCEL_STATUS;
 						}
 						return Status.OK_STATUS;
@@ -1580,17 +1618,16 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 	private void doRestoreInBackground(final IMemento memento, final IJavaElement hierarchyInput, IProgressMonitor monitor) throws JavaModelException {
 		fHierarchyLifeCycle.doHierarchyRefresh(hierarchyInput, monitor);
 		final boolean doRestore= !monitor.isCanceled();
-		Display.getDefault().asyncExec(new Runnable() {
-			public void run() {
-				// running async: check first if view still exists
-				if (fPagebook != null && !fPagebook.isDisposed()) {
-					if (doRestore)
+		if (doRestore) {
+			Display.getDefault().asyncExec(new Runnable() {
+				public void run() {
+					// running async: check first if view still exists
+					if (fPagebook != null && !fPagebook.isDisposed()) {
 						doRestoreState(memento, hierarchyInput);
-					else
-						fNoHierarchyShownLabel.setText(TypeHierarchyMessages.TypeHierarchyViewPart_empty);
+					}
 				}
-			}
-		});
+			});
+		}
 	}
 
 
@@ -1603,6 +1640,7 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		}
 
 		fWorkingSetActionGroup.restoreState(memento);
+		setKeepShowingEmptyViewers(false);
 		setInputElement(input);
 
 		Integer viewerIndex= memento.getInteger(TAG_VIEW);
@@ -1732,4 +1770,78 @@ public class TypeHierarchyViewPart extends ViewPart implements ITypeHierarchyVie
 		fNeedRefresh= false;
 	}
 
+	/**
+	 * Sets the empty viewer when the user cancels the computation.
+	 * 
+	 * @since 3.6
+	 */
+	public void showEmptyViewer() {
+		Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				if (isDisposed())
+					return;
+
+				clearInput();
+				setKeepShowingEmptyViewers(true);
+			}
+		});
+	}
+
+	/**
+	 * Checks if the type hierarchy view part has been disposed.
+	 *
+	 * @return <code>true</code> if the type hierarchy view part has been disposed, <code>false</code> otherwise
+	 * @since 3.6
+	 */
+	private boolean isDisposed() {
+		return fHierarchyLifeCycle == null;
+	}
+
+	/**
+	 * Returns the type hierarchy life cycle.
+	 *
+	 * @return the type hierarchy life cycle
+	 *
+	 * @since 3.6
+	 */
+	public TypeHierarchyLifeCycle getTypeHierarchyLifeCycle() {
+		return fHierarchyLifeCycle;
+
+	}
+
+	/**
+	 * Sets the input for all the hierarchy viewers with their respective viewer instances.
+	 *
+	 * @since 3.6
+	 */
+	public void setViewersInput() {
+		for (int i= 0; i < fAllViewers.length; i++) {
+			fAllViewers[i].setInput(fAllViewers[i]);
+		}
+		setKeepShowingEmptyViewers(false);
+	}
+
+	/**
+	 * Sets whether empty viewers should keep showing. If false, replace with fEmptyTypesViewer.
+	 * 
+	 * @param keepShowingEmptyViewers <code>true</code> if the empty viewers can be shown,
+	 *            <code>false otherwise
+	 * 
+	 * @since 3.6
+	 */
+	public void setKeepShowingEmptyViewers(boolean keepShowingEmptyViewers) {
+		fKeepShowingEmptyViewers= keepShowingEmptyViewers;
+	}
+
+	/**
+	 * Returns value that determines whether the empty viewers should keep showing. If false,
+	 * replace with fEmptyTypesViewer.
+	 *
+	 * @return <code>true</code> if the empty viewers can be shown, <code>false otherwise
+	 *
+	 * @since 3.6
+	 */
+	public boolean isKeepShowingEmptyViewers() {
+		return fKeepShowingEmptyViewers;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
index c283aa7..8de301a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -165,12 +165,6 @@ public abstract class TypeHierarchyViewer extends ProblemTreeViewer {
 	 */
 	public abstract void updateContent(boolean doExpand);
 
-	/**
-	 * Returns the title for the current view
-	 * @return the title
-	 */
-	public abstract String getTitle();
-
 	/*
 	 * @see StructuredViewer#setContentProvider
 	 * Content provider must be of type TypeHierarchyContentProvider
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavadocHelpContext.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavadocHelpContext.java
index aa78050..f81886a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavadocHelpContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavadocHelpContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,7 @@ import org.eclipse.jdt.ui.JavadocContentAccess;
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
 import org.eclipse.jdt.internal.ui.actions.ActionUtil;
 
+
 public class JavadocHelpContext implements IContext2 {
 
 
@@ -86,7 +87,7 @@ public class JavadocHelpContext implements IContext2 {
 	private String fTitle;
 
 
-	// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=85721
+	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=85721
 	private static final boolean BUG_85721_FIXED= false;
 
 	public JavadocHelpContext(IContext context, Object[] elements) throws JavaModelException {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TableLayoutComposite.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TableLayoutComposite.java
index d58c707..c8535a2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TableLayoutComposite.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/TableLayoutComposite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ import org.eclipse.jface.viewers.ColumnLayoutData;
 import org.eclipse.jface.viewers.ColumnPixelData;
 import org.eclipse.jface.viewers.ColumnWeightData;
 
+
 /**
  * A special composite to layout columns inside a table. The composite is needed since we have
  * to layout the columns "before" the actual table gets layouted. Hence we can't use a normal
@@ -43,7 +44,7 @@ public class TableLayoutComposite extends Composite {
 	 * To ensure there are N pixels available for the content of the column,
 	 * assign N+COLUMN_TRIM for the column width.
 	 * <p>
-	 * XXX: Should either switch to use {@link org.eclipse.jface.layout.TableColumnLayout} or get API from JFace or SWT, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=218483
+	 * XXX: Should either switch to use {@link org.eclipse.jface.layout.TableColumnLayout} or get API from JFace or SWT, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=218483
 	 * </p>
 	 *
 	 * @since 3.1
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java
index 6afb364..e7cd9d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/AppearanceAwareLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.viewsupport;
 
@@ -63,7 +64,8 @@ public class AppearanceAwareLabelProvider extends JavaUILabelProvider implements
 		if (!store.getBoolean(PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS)) {
 			fTextFlagMask ^= JavaElementLabels.M_APP_TYPE_PARAMETERS;
 		}
-		if (!store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES)) {
+		if (!(store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES)
+				|| store.getBoolean(JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES))) {
 			fTextFlagMask ^= JavaElementLabels.P_COMPRESSED;
 		}
 		if (!store.getBoolean(PreferenceConstants.APPEARANCE_CATEGORY)) {
@@ -82,7 +84,9 @@ public class AppearanceAwareLabelProvider extends JavaUILabelProvider implements
 				|| property.equals(PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS)
 				|| property.equals(PreferenceConstants.APPEARANCE_CATEGORY)
 				|| property.equals(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW)
-				|| property.equals(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES)) {
+				|| property.equals(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES)
+				|| property.equals(JavaElementLabelComposer.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW)
+				|| property.equals(JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES)) {
 			initMasks();
 			LabelProviderChangedEvent lpEvent= new LabelProviderChangedEvent(this, null); // refresh all
 			fireLabelProviderChanged(lpEvent);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BasicElementLabels.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BasicElementLabels.java
index cedb356..fa0f580 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BasicElementLabels.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/BasicElementLabels.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@ package org.eclipse.jdt.internal.ui.viewsupport;
 
 import java.io.File;
 
+import org.eclipse.osgi.util.TextProcessor;
+
 import org.eclipse.core.runtime.IPath;
 
 import org.eclipse.core.resources.IResource;
@@ -32,6 +34,13 @@ import org.eclipse.jdt.ui.JavaElementLabels;
  */
 public class BasicElementLabels {
 
+
+	// TextProcessor delimiters
+	private static final String CODE_DELIMITERS= TextProcessor.getDefaultDelimiters() + "<>()?,{}+-*!%=^|&;[]~"; //$NON-NLS-1$
+	private static final String FILE_PATTERN_DELIMITERS= TextProcessor.getDefaultDelimiters() + "*.?"; //$NON-NLS-1$
+	private static final String URL_DELIMITERS= TextProcessor.getDefaultDelimiters() + ":@?-"; //$NON-NLS-1$
+
+	
 	/**
 	 * Returns the label of a path.
 	 *
@@ -56,7 +65,7 @@ public class BasicElementLabels {
 	 * @return the label of the file path to be used in the UI.
 	 */
 	public static String getPathLabel(File file) {
-		return Strings.markLTR(file.getAbsolutePath(), "");  //$NON-NLS-1$
+		return Strings.markLTR(file.getAbsolutePath());
 	}
 
 	/**
@@ -66,7 +75,7 @@ public class BasicElementLabels {
 	 * @return the label of the pattern.
 	 */
 	public static String getFilePattern(String name) {
-		return Strings.markLTR(name, "*.?"); //$NON-NLS-1$
+		return Strings.markLTR(name, FILE_PATTERN_DELIMITERS);
 	}
 
 	/**
@@ -76,7 +85,7 @@ public class BasicElementLabels {
 	 * @return the label of the URL.
 	 */
 	public static String getURLPart(String name) {
-		return Strings.markLTR(name, ":@?-"); //$NON-NLS-1$
+		return Strings.markLTR(name, URL_DELIMITERS);
 	}
 
 	/**
@@ -119,7 +128,7 @@ public class BasicElementLabels {
 	 * @return the label for the Java element
 	 */
 	public static String getJavaElementName(String name) {
-		return Strings.markLTR(name, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(name);
 	}
 
 	/**
@@ -129,7 +138,7 @@ public class BasicElementLabels {
 	 * @return the label for the Java code snippet
 	 */
 	public static String getJavaCodeString(String string) {
-		return Strings.markLTR(string, "<>()?,{}+-*!%=^|&;[]~"); //$NON-NLS-1$
+		return Strings.markLTR(string, CODE_DELIMITERS);
 	}
 
 	/**
@@ -149,7 +158,7 @@ public class BasicElementLabels {
 	 * @return the label of the working set
 	 */
 	public static String getWorkingSetLabel(IWorkingSet set) {
-		return Strings.markLTR(set.getLabel(), "");  //$NON-NLS-1$
+		return Strings.markLTR(set.getLabel());
 	}
 
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/FilteredElementTreeSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/FilteredElementTreeSelectionDialog.java
index 1cc1210..f6914ea 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/FilteredElementTreeSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/FilteredElementTreeSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,9 +62,9 @@ public class FilteredElementTreeSelectionDialog extends ElementTreeSelectionDial
 			if (patternString != null && patternString.length() > 0) {
 				ArrayList res= new ArrayList();
 				StringTokenizer tok= new StringTokenizer(patternString, ",;"); //$NON-NLS-1$
-				fMatchers= new StringMatcher[tok.countTokens()];
-				for (int i= 0; i < fMatchers.length; i++) {
-					String token= tok.nextToken().trim();
+				int tokenCount= tok.countTokens();
+				for (int i= 0; i < tokenCount; i++) {
+					String token= tok.nextToken();
 					if (token.length() > 0) {
 						res.add(new StringMatcher(token + '*', true, false));
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/HistoryDropDownAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/HistoryDropDownAction.java
index 349104e..152ea58 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/HistoryDropDownAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/HistoryDropDownAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,8 @@ import org.eclipse.ui.IWorkbenchActionConstants;
 		}
 
 		public void run() {
-			fHistory.setActiveEntry(fElement);
+			if (isChecked())
+				fHistory.setActiveEntry(fElement);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabelComposer.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabelComposer.java
index 1953b4b..3a81391 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabelComposer.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabelComposer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,15 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.viewsupport;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.jar.Attributes.Name;
+
 import org.eclipse.core.runtime.IPath;
 
 import org.eclipse.core.resources.IProject;
@@ -39,7 +45,6 @@ import org.eclipse.jdt.core.Signature;
 
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
-import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.ui.PreferenceConstants;
@@ -55,6 +60,24 @@ import org.eclipse.jdt.internal.ui.JavaUIMessages;
 public class JavaElementLabelComposer {
 
 	/**
+	 * Use of this constant is <b>FORBIDDEN</b> for external clients.
+	 * <p>
+	 * TODO: Make API in PreferenceConstants in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=306069
+	 * 
+	 * @see PreferenceConstants#APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW
+	 */
+	public static final String APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW= "org.eclipse.jdt.ui.pkgNameAbbreviationPatternForPackagesView";//$NON-NLS-1$
+
+	/**
+	 * Use of this constant is <b>FORBIDDEN</b> for external clients.
+	 * <p>
+	 * TODO: Make API in PreferenceConstants in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=306069
+	 * 
+	 * @see PreferenceConstants#APPEARANCE_ABBREVIATE_PACKAGE_NAMES
+	 */
+	public static final String APPEARANCE_ABBREVIATE_PACKAGE_NAMES= "org.eclipse.jdt.ui.abbreviatepackagenames";//$NON-NLS-1$
+
+	/**
 	 * An adapter for buffer supported by the label composer.
 	 */
 	public static abstract class FlexibleBuffer {
@@ -156,22 +179,32 @@ public class JavaElementLabelComposer {
 		}
 	}
 
+	private static class PackageNameAbbreviation {
+		private String fPackagePrefix;
+
+		private String fAbbreviation;
+
+		public PackageNameAbbreviation(String packagePrefix, String abbreviation) {
+			fPackagePrefix= packagePrefix;
+			fAbbreviation= abbreviation;
+		}
+
+		public String getPackagePrefix() {
+			return fPackagePrefix;
+		}
+
+		public String getAbbreviation() {
+			return fAbbreviation;
+		}
+	}
 
-	/**
-	 * Additional delimiters used in this class, for use in {@link Strings#markLTR(String, String)}
-	 * or {@link Strings#markLTR(StyledString, String)}.
-	 *
-	 * @since 3.5
-	 */
-	public static final String ADDITIONAL_DELIMITERS= "<>(),?{} "; //$NON-NLS-1$
 
 	private final static long QUALIFIER_FLAGS= JavaElementLabels.P_COMPRESSED | JavaElementLabels.USE_RESOLVED;
 
 	private static final Styler QUALIFIER_STYLE= StyledString.QUALIFIER_STYLER;
 	private static final Styler COUNTER_STYLE= StyledString.COUNTER_STYLER;
 	private static final Styler DECORATIONS_STYLE= StyledString.DECORATIONS_STYLER;
-
-
+	
 	/*
 	 * Package name compression
 	 */
@@ -180,6 +213,12 @@ public class JavaElementLabelComposer {
 	private static String fgPkgNamePostfix;
 	private static int fgPkgNameChars;
 	private static int fgPkgNameLength= -1;
+	
+	/*
+	 * Package name abbreviation
+	 */
+	private static String fgPkgNameAbbreviationPattern= ""; //$NON-NLS-1$
+	private static PackageNameAbbreviation[] fgPkgNameAbbreviation;
 
 	private final FlexibleBuffer fBuffer;
 
@@ -623,39 +662,16 @@ public class JavaElementLabelComposer {
 		try {
 			fBuffer.append(getElementName(typeParameter));
 
-			// ITypeParameter#getSignature() would make things easier here, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=246594
-
-			IMember declaringMember= typeParameter.getDeclaringMember();
-			ITypeParameter[] params= null;
-			String[] paramSigs= null;
-			if (declaringMember instanceof IType) {
-				IType type= (IType)declaringMember;
-				params= type.getTypeParameters();
-				paramSigs= type.getTypeParameterSignatures();
-			} else if (declaringMember instanceof IMethod) {
-				IMethod method= (IMethod)declaringMember;
-				params= method.getTypeParameters();
-				paramSigs= method.getTypeParameterSignatures(); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=246594
-			}
-			if (params != null) {
-				for (int i= 0; i < params.length; i++) {
-					if (params[i].equals(typeParameter)) {
-						if (paramSigs.length > i) {
-							String paramSig= paramSigs[i];
-							String[] bounds= Signature.getTypeParameterBounds(paramSig);
-							if (bounds.length > 0) {
-								if (bounds.length == 1 && "Ljava.lang.Object;".equals(bounds[0])) //$NON-NLS-1$
-									continue;
-								fBuffer.append(" extends "); //$NON-NLS-1$
-								for (int j= 0; j < bounds.length; j++) {
-									if (j > 0) {
-										fBuffer.append(JavaElementLabels.COMMA_STRING);
-									}
-									appendTypeSignatureLabel(typeParameter, bounds[j], flags);
-								}
-							}
+			if (typeParameter.exists()) {
+				String[] bounds= typeParameter.getBoundsSignatures();
+				if (bounds.length > 0 &&
+						! (bounds.length == 1 && "Ljava.lang.Object;".equals(bounds[0]))) { //$NON-NLS-1$
+					fBuffer.append(" extends "); //$NON-NLS-1$
+					for (int j= 0; j < bounds.length; j++) {
+						if (j > 0) {
+							fBuffer.append(JavaElementLabels.COMMA_STRING);
 						}
-						break;
+						appendTypeSignatureLabel(typeParameter, bounds[j], flags);
 					}
 				}
 			}
@@ -663,6 +679,7 @@ public class JavaElementLabelComposer {
 			// post qualification
 			if (getFlag(flags, JavaElementLabels.TP_POST_QUALIFIED)) {
 				fBuffer.append(JavaElementLabels.CONCAT_STRING);
+				IMember declaringMember= typeParameter.getDeclaringMember();
 				appendElementLabel(declaringMember, JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_FULLY_QUALIFIED | JavaElementLabels.T_FULLY_QUALIFIED | (flags & QUALIFIER_FLAGS));
 			}
 
@@ -1009,7 +1026,10 @@ public class JavaElementLabelComposer {
 		if (pack.isDefaultPackage()) {
 			fBuffer.append(JavaElementLabels.DEFAULT_PACKAGE);
 		} else if (getFlag(flags, JavaElementLabels.P_COMPRESSED)) {
-			appendCompressedPackageFragment(pack);
+			if (isPackageNameAbbreviationEnabled())
+				appendAbbreviatedPackageFragment(pack);
+			else
+				appendCompressedPackageFragment(pack);
 		} else {
 			fBuffer.append(pack.getElementName());
 		}
@@ -1024,12 +1044,16 @@ public class JavaElementLabelComposer {
 	}
 
 	private void appendCompressedPackageFragment(IPackageFragment pack) {
+		appendCompressedPackageFragment(pack.getElementName());
+	}
+	
+	private void appendCompressedPackageFragment(String elementName) {
 		refreshPackageNamePattern();
 		if (fgPkgNameLength < 0) {
-			fBuffer.append(pack.getElementName());
+			fBuffer.append(elementName);
 			return;
 		}
-		String name= pack.getElementName();
+		String name= elementName;
 		int start= 0;
 		int dot= name.indexOf('.', start);
 		while (dot > 0) {
@@ -1046,6 +1070,47 @@ public class JavaElementLabelComposer {
 		fBuffer.append(name.substring(start));
 	}
 
+	private void appendAbbreviatedPackageFragment(IPackageFragment pack) {
+		refreshPackageNameAbbreviation();
+
+		String pkgName= pack.getElementName();
+
+		if (fgPkgNameAbbreviation != null && fgPkgNameAbbreviation.length != 0) {
+
+			for (int i= 0; i < fgPkgNameAbbreviation.length; i++) {
+				PackageNameAbbreviation abbr= fgPkgNameAbbreviation[i];
+
+				String abbrPrefix= abbr.getPackagePrefix();
+				if (pkgName.startsWith(abbrPrefix)) {
+					int abbrPrefixLength= abbrPrefix.length();
+					int pkgLength= pkgName.length();
+					if (!(pkgLength == abbrPrefixLength || pkgName.charAt(abbrPrefixLength) == '.'))
+						continue;
+
+					fBuffer.append(abbr.getAbbreviation());
+
+					if (pkgLength > abbrPrefixLength) {
+						fBuffer.append('.');
+
+						String remaining= pkgName.substring(abbrPrefixLength + 1);
+
+						if (isPackageNameCompressionEnabled())
+							appendCompressedPackageFragment(remaining);
+						else
+							fBuffer.append(remaining);
+					}
+
+					return;
+				}
+			}
+		}
+
+		if (isPackageNameCompressionEnabled()) {
+			appendCompressedPackageFragment(pkgName);
+		} else {
+			fBuffer.append(pkgName);
+		}
+	}
 
 	/**
 	 * Appends the label for a package fragment root. Considers the ROOT_* flags.
@@ -1074,7 +1139,11 @@ public class JavaElementLabelComposer {
 	private boolean appendVariableLabel(IPackageFragmentRoot root, long flags) {
 		try {
 			IClasspathEntry rawEntry= root.getRawClasspathEntry();
-			if (rawEntry != null && rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
+			if (rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
+				IClasspathEntry entry= JavaModelUtil.getClasspathEntry(root);
+				if (entry.getReferencingEntry() != null) {
+					return false; // not the variable entry itself, but a referenced entry
+				}
 				IPath path= rawEntry.getPath().makeRelative();
 
 				if (getFlag(flags, JavaElementLabels.REFERENCED_ROOT_POST_QUALIFIED)) {
@@ -1116,10 +1185,11 @@ public class JavaElementLabelComposer {
 
 	private void appendExternalArchiveLabel(IPackageFragmentRoot root, long flags) {
 		IPath path;
+		IClasspathEntry classpathEntry= null;
 		try {
-			IClasspathEntry rawClasspathEntry= root.getRawClasspathEntry();
-			IPath rawPath= rawClasspathEntry.getPath();
-			if (rawClasspathEntry.getEntryKind() != IClasspathEntry.CPE_CONTAINER && !rawPath.isAbsolute())
+			classpathEntry= JavaModelUtil.getClasspathEntry(root);
+			IPath rawPath= classpathEntry.getPath();
+			if (classpathEntry.getEntryKind() != IClasspathEntry.CPE_CONTAINER && !rawPath.isAbsolute())
 				path= rawPath;
 			else
 				path= root.getPath();
@@ -1135,6 +1205,12 @@ public class JavaElementLabelComposer {
 					fBuffer.append(JavaElementLabels.CONCAT_STRING);
 					fBuffer.append(path.removeLastSegments(1).toOSString());
 				}
+				if (classpathEntry != null) {
+					IClasspathEntry referencingEntry= classpathEntry.getReferencingEntry();
+					if (referencingEntry != null) {
+						fBuffer.append(Messages.format(JavaUIMessages.JavaElementLabels_onClassPathOf, new Object[] { Name.CLASS_PATH.toString(), referencingEntry.getPath().lastSegment() }));
+					}
+				}
 				if (getFlag(flags, JavaElementLabels.COLORIZE)) {
 					fBuffer.setStyle(offset, fBuffer.length() - offset, QUALIFIER_STYLE);
 				}
@@ -1149,20 +1225,28 @@ public class JavaElementLabelComposer {
 	private void appendInternalArchiveLabel(IPackageFragmentRoot root, long flags) {
 		IResource resource= root.getResource();
 		boolean rootQualified= getFlag(flags, JavaElementLabels.ROOT_QUALIFIED);
-		boolean referencedQualified= getFlag(flags, JavaElementLabels.REFERENCED_ROOT_POST_QUALIFIED) && isReferenced(root);
 		if (rootQualified) {
 			fBuffer.append(root.getPath().makeRelative().toString());
 		} else {
 			fBuffer.append(root.getElementName());
 			int offset= fBuffer.length();
-			if (referencedQualified) {
+			boolean referencedPostQualified= getFlag(flags, JavaElementLabels.REFERENCED_ROOT_POST_QUALIFIED);
+			if (referencedPostQualified && isReferenced(root)) {
 				fBuffer.append(JavaElementLabels.CONCAT_STRING);
 				fBuffer.append(resource.getParent().getFullPath().makeRelative().toString());
 			} else if (getFlag(flags, JavaElementLabels.ROOT_POST_QUALIFIED)) {
 				fBuffer.append(JavaElementLabels.CONCAT_STRING);
 				fBuffer.append(root.getParent().getPath().makeRelative().toString());
-			} else {
-				return;
+			}
+			if (referencedPostQualified) {
+				try {
+					IClasspathEntry referencingEntry= JavaModelUtil.getClasspathEntry(root).getReferencingEntry();
+					if (referencingEntry != null) {
+						fBuffer.append(Messages.format(JavaUIMessages.JavaElementLabels_onClassPathOf, new Object[] { Name.CLASS_PATH.toString(), referencingEntry.getPath().lastSegment() }));
+					}
+				} catch (JavaModelException e) {
+					// ignore
+				}
 			}
 			if (getFlag(flags, JavaElementLabels.COLORIZE)) {
 				fBuffer.setStyle(offset, fBuffer.length() - offset, QUALIFIER_STYLE);
@@ -1208,7 +1292,7 @@ public class JavaElementLabelComposer {
 
 	/**
 	 * Returns <code>true</code> if the given package fragment root is
-	 * referenced. This means it is own by a different project but is referenced
+	 * referenced. This means it is a descendant of a different project but is referenced
 	 * by the root's parent. Returns <code>false</code> if the given root
 	 * doesn't have an underlying resource.
 	 *
@@ -1256,6 +1340,72 @@ public class JavaElementLabelComposer {
 		fgPkgNamePrefix= pattern;
 		fgPkgNameLength= pattern.length();
 	}
+	
+	private void refreshPackageNameAbbreviation() {
+		String pattern= getPkgNameAbbreviationPatternForPackagesView();
+
+		if (fgPkgNameAbbreviationPattern.equals(pattern))
+			return;
+
+		fgPkgNameAbbreviationPattern= pattern;
+
+		if (pattern == null || pattern.length() == 0) {
+			fgPkgNameAbbreviationPattern= ""; //$NON-NLS-1$
+			fgPkgNameAbbreviation= null;
+			return;
+		}
+
+		PackageNameAbbreviation[] abbrs= parseAbbreviationPattern(pattern);
+
+		if (abbrs == null)
+			abbrs= new PackageNameAbbreviation[0];
+
+		fgPkgNameAbbreviation= abbrs;
+	}
+
+	public static PackageNameAbbreviation[] parseAbbreviationPattern(String pattern) {
+		String[] parts= pattern.split("\\s*(?:\r\n?|\n)\\s*"); //$NON-NLS-1$
+
+		ArrayList result= new ArrayList();
+
+		for (int i= 0; i < parts.length; i++) {
+			String part= parts[i].trim();
+
+			if (part.length() == 0)
+				continue;
+
+			String[] parts2= part.split("\\s*=\\s*", 2); //$NON-NLS-1$
+
+			if (parts2.length != 2)
+				return null;
+
+			String prefix= parts2[0].trim();
+			String abbr= parts2[1].trim();
+
+			if (prefix.startsWith("#")) //$NON-NLS-1$
+				continue;
+
+			PackageNameAbbreviation pkgAbbr= new PackageNameAbbreviation(prefix, abbr);
+
+			result.add(pkgAbbr);
+		}
+
+		Collections.sort(result, new Comparator() {
+			public int compare(Object o1, Object o2) {
+				PackageNameAbbreviation a1= (PackageNameAbbreviation)o1;
+				PackageNameAbbreviation a2= (PackageNameAbbreviation)o2;
+
+				return a2.getPackagePrefix().length() - a1.getPackagePrefix().length();
+			}
+		});
+
+		return (PackageNameAbbreviation[])result.toArray(new PackageNameAbbreviation[0]);
+	}
+	
+	private boolean isPackageNameCompressionEnabled() {
+		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
+		return store.getBoolean(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES);
+	}
 
 	private String getPkgNamePatternForPackagesView() {
 		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
@@ -1264,4 +1414,16 @@ public class JavaElementLabelComposer {
 		return store.getString(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW);
 	}
 
+	private boolean isPackageNameAbbreviationEnabled() {
+		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
+		return store.getBoolean(JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES);
+	}
+
+	private String getPkgNameAbbreviationPatternForPackagesView() {
+		IPreferenceStore store= PreferenceConstants.getPreferenceStore();
+		if (!store.getBoolean(JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES))
+			return ""; //$NON-NLS-1$
+		return store.getString(JavaElementLabelComposer.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLinks.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLinks.java
index 26db65d..198812b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLinks.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLinks.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 
+import org.eclipse.jdt.core.IAnnotation;
 import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.ILocalVariable;
@@ -78,12 +79,12 @@ public class JavaElementLinks {
 		void handleDeclarationLink(IJavaElement target);
 
 		/**
-		 * Handle link to given link to open in external browser
-		 *
+		 * Handle link to given URL to open in browser.
+		 * 
 		 * @param url the url to show
 		 * @param display the current display
-		 * @return <code>true</code> if the handler could open the link
-		 *         <code>false</code> if the browser should follow the link
+		 * @return <code>true</code> if the handler could open the link <code>false</code> if the
+		 *         browser should follow the link
 		 */
 		boolean handleExternalLink(URL url, Display display);
 
@@ -103,7 +104,7 @@ public class JavaElementLinks {
 
 		public String getElementName(IJavaElement element) {
 			String elementName= element.getElementName();
-			if (fElement.equals(element)) { // linking to the member itself would be a no-op
+			if (element.equals(fElement)) { // linking to the member itself would be a no-op
 				return elementName;
 			}
 			if (elementName.length() == 0) { // anonymous
@@ -111,17 +112,13 @@ public class JavaElementLinks {
 			}
 			try {
 				String uri= createURI(JAVADOC_SCHEME, element);
-				return createLink(uri, elementName);
+				return createHeaderLink(uri, elementName);
 			} catch (URISyntaxException e) {
 				JavaPlugin.log(e);
 				return elementName;
 			}
 		}
 
-		private String createLink(String uri, String elementName) {
-			return "<a class='header' href='" + uri + ("'>" + elementName + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		}
-
 		protected String getGT() {
 			return ">"; //$NON-NLS-1$
 		}
@@ -134,7 +131,7 @@ public class JavaElementLinks {
 			String typeName= super.getSimpleTypeName(enclosingElement, typeSig);
 			try {
 				String uri= createURI(JAVADOC_SCHEME, enclosingElement, typeName, null, null);
-				return createLink(uri, typeName);
+				return createHeaderLink(uri, typeName);
 			} catch (URISyntaxException e) {
 				JavaPlugin.log(e);
 				return typeName;
@@ -319,7 +316,10 @@ public class JavaElementLinks {
 					JavaPlugin.log(e);
 				}
 			}
-
+			if (element instanceof IAnnotation) {
+				element= element.getParent();
+			}
+			
 			if (element instanceof ILocalVariable) {
 				element= element.getAncestor(IJavaElement.TYPE);
 			} else if (element instanceof ITypeParameter) {
@@ -459,8 +459,33 @@ public class JavaElementLinks {
 	}
 
 	/**
+	 * Creates a link with the given URI and label text.
+	 * 
+	 * @param uri the URI
+	 * @param label the label
+	 * @return the HTML link
+	 * @since 3.6
+	 */
+	public static String createLink(String uri, String label) {
+		return "<a href='" + uri + "'>" + label + "</a>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	
+	/**
+	 * Creates a header link with the given URI and label text.
+	 * 
+	 * @param uri the URI
+	 * @param label the label
+	 * @return the HTML link
+	 * @since 3.6
+	 */
+	public static String createHeaderLink(String uri, String label) {
+		return "<a class='header' href='" + uri + "'>" + label + "</a>"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	
+	/**
 	 * Returns the label for a Java element with the flags as defined by {@link JavaElementLabels}.
-	 * Referenced element names in the label (except the given element's name) are rendered as Javadoc links.
+	 * Referenced element names in the label (except the given element's name) are rendered as 
+	 * header links.
 	 *
 	 * @param element the element to render
 	 * @param flags the rendering flags
@@ -468,13 +493,29 @@ public class JavaElementLinks {
 	 * @since 3.5
 	 */
 	public static String getElementLabel(IJavaElement element, long flags) {
-		StringBuffer buf= new StringBuffer();
+		return getElementLabel(element, flags, false);
+	}
 
-		new JavaElementLinkedLabelComposer(element, buf).appendElementLabel(element, flags);
-		return Strings.markLTR(buf.toString(), JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+	/**
+	 * Returns the label for a Java element with the flags as defined by {@link JavaElementLabels}.
+	 * Referenced element names in the label are rendered as header links.
+	 * If <code>linkAllNames</code> is <code>false</code>, don't link the name of the given element
+	 *
+	 * @param element the element to render
+	 * @param flags the rendering flags
+	 * @param linkAllNames if <code>true</code>, link all names; if <code>false</code>, link all names except original element's name
+	 * @return the label of the Java element
+	 * @since 3.6
+	 */
+	public static String getElementLabel(IJavaElement element, long flags, boolean linkAllNames) {
+		StringBuffer buf= new StringBuffer();
 
-//		new JavaElementLabelComposer(buf).appendElementLabel(element, flags);
-//		String string= buf.toString().replaceAll("<", "<").replaceAll(">", ">");
-//		return Strings.markLTR(string, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		if (!Strings.USE_TEXT_PROCESSOR) {
+			new JavaElementLinkedLabelComposer(linkAllNames ? null : element, buf).appendElementLabel(element, flags);
+			return Strings.markJavaElementLabelLTR(buf.toString());
+		} else {
+			String label= JavaElementLabels.getElementLabel(element, flags);
+			return label.replaceAll("<", "<").replaceAll(">", ">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
index e0635c8..792bc2e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/ClassPathDetector.java
@@ -43,12 +43,12 @@ import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaConventions;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.core.ToolFactory;
 import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.compiler.IScanner;
-import org.eclipse.jdt.core.compiler.ITerminalSymbols;
-import org.eclipse.jdt.core.compiler.InvalidInputException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
 import org.eclipse.jdt.core.util.IClassFileReader;
 import org.eclipse.jdt.core.util.ISourceAttribute;
 
@@ -285,58 +285,26 @@ public class ClassPathDetector implements IResourceProxyVisitor {
 	private void visitCompilationUnit(IFile file) {
 		ICompilationUnit cu= JavaCore.createCompilationUnitFrom(file);
 		if (cu != null) {
-			ICompilationUnit workingCopy= null;
-			try {
-				workingCopy= cu.getWorkingCopy(null);
-				IPath relPath= getPackagePath(workingCopy.getSource());
-				IPath packPath= file.getParent().getFullPath();
-				String cuName= file.getName();
-				if (relPath == null) {
-					addToMap(fSourceFolders, packPath, new Path(cuName));
-				} else {
-					IPath folderPath= getFolderPath(packPath, relPath);
-					if (folderPath != null) {
-						addToMap(fSourceFolders, folderPath, relPath.append(cuName));
-					}
-				}
-			} catch (JavaModelException e) {
-				// ignore
-			} catch (InvalidInputException e) {
-				// ignore
-			} finally {
-				if (workingCopy != null) {
-					try {
-						workingCopy.discardWorkingCopy();
-					} catch (JavaModelException ignore) {
-					}
+			ASTParser parser= ASTParser.newParser(AST.JLS3);
+			parser.setSource(cu);
+			parser.setFocalPosition(0);
+			CompilationUnit root= (CompilationUnit)parser.createAST(null);
+			PackageDeclaration packDecl= root.getPackage();
+			
+			IPath packPath= file.getParent().getFullPath();
+			String cuName= file.getName();
+			if (packDecl == null) {
+				addToMap(fSourceFolders, packPath, new Path(cuName));
+			} else {
+				IPath relPath= new Path(packDecl.getName().getFullyQualifiedName().replace('.', '/'));
+				IPath folderPath= getFolderPath(packPath, relPath);
+				if (folderPath != null) {
+					addToMap(fSourceFolders, folderPath, relPath.append(cuName));
 				}
 			}
 		}
 	}
 
-	private IPath getPackagePath(String source) throws InvalidInputException {
-		IScanner scanner= ToolFactory.createScanner(false, false, false, false);
-		scanner.setSource(source.toCharArray());
-		scanner.resetTo(0, source.length() - 1);
-		int tok= scanner.getNextToken();
-		if (tok != ITerminalSymbols.TokenNamepackage) {
-			return null;
-		}
-		IPath res= Path.EMPTY;
-		do {
-			tok= scanner.getNextToken();
-			if (tok == ITerminalSymbols.TokenNameIdentifier) {
-				res= res.append(new String(scanner.getCurrentTokenSource()));
-			} else {
-				return res;
-			}
-			tok= scanner.getNextToken();
-		} while (tok == ITerminalSymbols.TokenNameDOT);
-
-		return res;
-	}
-
-
 	private void addToMap(HashMap map, IPath folderPath, IPath relPath) {
 		List list= (List) map.get(folderPath);
 		if (list == null) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewElementWizard.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewElementWizard.java
index 5d34422..030c87f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewElementWizard.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewElementWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,11 +77,12 @@ public abstract class NewElementWizard extends Wizard implements INewWizard {
 	}
 
 	/**
-	 * Subclasses should override to perform the actions of the wizard.
-	 * This method is run in the wizard container's context as a workspace runnable.
-	 * @param monitor
-	 * @throws InterruptedException
-	 * @throws CoreException
+	 * Subclasses should override to perform the actions of the wizard. This method is run in the
+	 * wizard container's context as a workspace runnable.
+	 * 
+	 * @param monitor the progress monitor
+	 * @throws InterruptedException when the operation is cancelled
+	 * @throws CoreException if the element cannot be created
 	 */
 	protected abstract void finishPage(IProgressMonitor monitor) throws InterruptedException, CoreException;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
index ae525f1..4474adc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -317,7 +317,15 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage {
 						fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_NotAFolder);
 						return;
 					}
+					if (res.isVirtual()) {
+						fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_FolderIsVirtual);
+						return;
+					}
 				} else {
+					if (!ResourcesPlugin.getWorkspace().validateFiltered(fWorkspaceRoot.getFolder(path)).isOK()) {
+						fRootStatus.setError(NewWizardMessages.NewSourceFolderWizardPage_error_FolderNameFiltered);
+						return;
+					}
 					URI projLocation= fCurrJProject.getProject().getLocationURI();
 					if (projLocation != null) {
 						try {
@@ -391,7 +399,9 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage {
 					return;
 				}
 				if (!modified.isEmpty()) {
-					fRootStatus.setInfo(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions, String.valueOf(modified.size())));
+					String info= modified.size() == 1 ? Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions_singular, ((IClasspathEntry)(modified.iterator().next()))
+							.getPath()) : Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions_plural, String.valueOf(modified.size()));
+					fRootStatus.setInfo(info);
 					return;
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.java
index 3bdcac2..71edcdf 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,6 +70,7 @@ public final class NewWizardMessages extends NLS {
 	public static String NewContainerWizardPage_error_ContainerDoesNotExist;
 	public static String NewContainerWizardPage_error_NotAFolder;
 	public static String NewContainerWizardPage_error_ProjectClosed;
+	public static String NewContainerWizardPage_error_FolderIsVirtual;
 	public static String NewContainerWizardPage_warning_NotAJavaProject;
 	public static String NewContainerWizardPage_warning_NotInAJavaProject;
 	public static String NewContainerWizardPage_warning_NotOnClassPath;
@@ -85,6 +86,7 @@ public final class NewWizardMessages extends NLS {
 	public static String NewPackageWizardPage_error_PackageExistsDifferentCase;
 	public static String NewPackageWizardPage_error_EnterName;
 	public static String NewPackageWizardPage_error_PackageNotShown;
+	public static String NewPackageWizardPage_error_PackageNameFiltered;
 	public static String NewPackageWizardPage_warning_DiscouragedPackageName;
 	public static String NewPackageWizardPage_title;
 	public static String NewPackageWizardPage_description;
@@ -142,6 +144,9 @@ public final class NewWizardMessages extends NLS {
 	public static String NewTypeWizardPage_error_InvalidSuperInterfaceName;
 	public static String NewTypeWizardPage_error_SuperInterfaceNotParameterized;
 	public static String NewTypeWizardPage_error_ModifiersFinalAndAbstract;
+	public static String NewTypeWizardPage_error_TypeNameFiltered;
+	public static String NewTypeWizardPage_error_PackageNameFiltered;
+	public static String NewTypeWizardPage_error_PackageIsVirtual;
 	public static String NewTypeWizardPage_configure_templates_message;
 	public static String NewTypeWizardPage_configure_templates_title;
 	public static String NewTypeWizardPage_SuperClassDialog_title;
@@ -207,22 +212,18 @@ public final class NewWizardMessages extends NLS {
 	public static String NewJavaProjectWizardPageOne_DetectGroup_differendWorkspaceCC_message;
 	public static String NewJavaProjectWizardPageOne_Message_invalidProjectNameForWorkspaceRoot;
 	public static String NewJavaProjectWizardPageOne_Message_cannotCreateAtExternalLocation;
-	public static String NewJavaProjectWizardPageOne_Message_notExisingProjectOnWorkspaceRoot;
 	public static String NewJavaProjectWizardPageOne_LayoutGroup_option_separateFolders;
 	public static String NewJavaProjectWizardPageOne_LayoutGroup_title;
 	public static String NewJavaProjectWizardPageOne_WorkingSets_group;
-	public static String NewJavaProjectWizardPageOne_LocationGroup_title;
-	public static String NewJavaProjectWizardPageOne_LocationGroup_external_desc;
+	public static String NewJavaProjectWizardPageOne_LocationGroup_location_desc;
 	public static String NewJavaProjectWizardPageOne_LocationGroup_browseButton_desc;
 	public static String NewJavaProjectWizardPageOne_LocationGroup_locationLabel_desc;
-	public static String NewJavaProjectWizardPageOne_LocationGroup_workspace_desc;
 	public static String NewJavaProjectWizardPageOne_NameGroup_label_text;
 	public static String NewJavaProjectWizardPageOne_DetectGroup_jre_message;
 	public static String NewJavaProjectWizardPageOne_DetectGroup_message;
 	public static String NewJavaProjectWizardPageOne_Message_enterLocation;
 	public static String NewJavaProjectWizardPageOne_Message_enterProjectName;
 	public static String NewJavaProjectWizardPageOne_Message_invalidDirectory;
-	public static String NewJavaProjectWizardPageOne_Message_notOnWorkspaceRoot;
 	public static String NewJavaProjectWizardPageOne_Message_projectAlreadyExists;
 	public static String NewJavaProjectWizardPageOne_UnknownDefaultJRE_name;
 	public static String NewJavaProjectWizardPageTwo_error_remove_message;
@@ -238,7 +239,6 @@ public final class NewWizardMessages extends NLS {
 	public static String NewJavaProjectWizardPageTwo_error_title;
 	public static String NewJavaProjectWizardPage_op_desc;
 
-	public static String NewJavaWorkingSetWizard_add_as_root_message;
 	public static String NewJavaWorkingSetWizard_title;
 	public static String NewSourceFolderCreationWizard_title;
 	public static String NewSourceFolderCreationWizard_edit_title;
@@ -264,10 +264,13 @@ public final class NewWizardMessages extends NLS {
 	public static String NewSourceFolderWizardPage_error_InvalidProjectPath;
 	public static String NewSourceFolderWizardPage_error_NotAJavaProject;
 	public static String NewSourceFolderWizardPage_error_ProjectNotExists;
+	public static String NewSourceFolderWizardPage_error_FolderIsVirtual;
+	public static String NewSourceFolderWizardPage_error_FolderNameFiltered;
 	public static String NewSourceFolderWizardPage_warning_ReplaceSFandOL;
 	public static String NewSourceFolderWizardPage_warning_ReplaceOL;
 	public static String NewSourceFolderWizardPage_warning_ReplaceSF;
-	public static String NewSourceFolderWizardPage_warning_AddedExclusions;
+	public static String NewSourceFolderWizardPage_warning_AddedExclusions_singular;
+	public static String NewSourceFolderWizardPage_warning_AddedExclusions_plural;
 	public static String NewSourceFolderWizardPage_ReplaceExistingSourceFolder_label;
 	public static String NewSourceFolderWizardPage_edit_description;
 
@@ -438,7 +441,6 @@ public final class NewWizardMessages extends NLS {
 	public static String NewVariableEntryDialog_vars_label;
 	public static String NewVariableEntryDialog_ExtensionDialog_title;
 	public static String NewVariableEntryDialog_ExtensionDialog_description;
-	public static String NewVariableEntryDialog_info_isfolder;
 	public static String NewVariableEntryDialog_info_notexists;
 	public static String NewVariableEntryDialog_info_noselection;
 	public static String NewVariableEntryDialog_info_selected;
@@ -549,10 +551,13 @@ public final class NewWizardMessages extends NLS {
 	public static String CPListLabelProvider_inclusion_filter_label;
 	public static String CPListLabelProvider_inclusion_filter_separator;
 	public static String CPListLabelProvider_unknown_element_label;
-	public static String CPListLabelProvider_access_rules_enabled;
-	public static String CPListLabelProvider_project_access_rules_combined;
+	public static String CPListLabelProvider_access_rules_enabled_singular;
+	public static String CPListLabelProvider_access_rules_enabled_plural;
+	public static String CPListLabelProvider_project_access_rules_combined_singular;
+	public static String CPListLabelProvider_project_access_rules_combined_plural;
 	public static String CPListLabelProvider_project_access_rules_no_rules;
-	public static String CPListLabelProvider_project_access_rules_not_combined;
+	public static String CPListLabelProvider_project_access_rules_not_combined_singular;
+	public static String CPListLabelProvider_project_access_rules_not_combined_plural;
 	public static String CPListLabelProvider_access_rules_disabled;
 
 	public static String NewSourceFolderDialog_useproject_button;
@@ -696,7 +701,8 @@ public final class NewWizardMessages extends NLS {
 
 	public static String CPListLabelProvider_non_modifiable_attribute;
 	public static String CPListLabelProvider_access_rules_label;
-	public static String CPListLabelProvider_container_access_rules;
+	public static String CPListLabelProvider_container_access_rules_singular;
+	public static String CPListLabelProvider_container_access_rules_plural;
 	public static String CPListLabelProvider_container_no_access_rules;
 	public static String CPListLabelProvider_missing;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.properties
index 62a0af9..d25b07f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewWizardMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ NewContainerWizardPage_error_ContainerIsBinary=''{0}'' is a JAR archive.
 NewContainerWizardPage_error_ContainerDoesNotExist=Folder ''{0}'' does not exist.
 NewContainerWizardPage_error_NotAFolder=''{0}'' must be a project or folder.
 NewContainerWizardPage_error_ProjectClosed=Project ''{0}'' must be accessible.
+NewContainerWizardPage_error_FolderIsVirtual= Source folder cannot be a virtual folder.
 
 NewContainerWizardPage_warning_NotAJavaProject=Source folder is not a Java project.
 NewContainerWizardPage_warning_NotInAJavaProject=Source folder is not in a Java project.
@@ -56,6 +57,7 @@ NewPackageWizardPage_error_PackageExists=Package already exists.
 NewPackageWizardPage_error_PackageExistsDifferentCase=Package already exists with a different case
 NewPackageWizardPage_error_EnterName=Enter a package name.
 NewPackageWizardPage_error_PackageNotShown=Package already exists. Note: Views might filter empty parent packages.
+NewPackageWizardPage_error_PackageNameFiltered= This package is hidden in the workspace due to resource filters.
 NewPackageWizardPage_warning_DiscouragedPackageName=Discouraged package name. {0}
 
 NewPackageWizardPage_title=Java Package
@@ -127,6 +129,9 @@ NewTypeWizardPage_error_InvalidSuperInterfaceName=Extended interface ''{0}'' is
 NewTypeWizardPage_error_SuperInterfaceNotParameterized=Extended interface ''{0}'' cannot be parameterized unless source level is 1.5.
 
 NewTypeWizardPage_error_ModifiersFinalAndAbstract=Class cannot be both final and abstract
+NewTypeWizardPage_error_TypeNameFiltered=This type is hidden in the workspace due to resource filters.
+NewTypeWizardPage_error_PackageNameFiltered= This package is hidden in the workspace due to resource filters.
+NewTypeWizardPage_error_PackageIsVirtual= Package cannot be a virtual folder.
 
 NewTypeWizardPage_configure_templates_message=Can not open the project properties. The wizard page does not yet specify a valid project.
 NewTypeWizardPage_configure_templates_title=Configure Code Templates
@@ -191,7 +196,7 @@ JavaCapabilityConfigurationPage_op_desc_java=Configuring Java project...
 
 JavaProjectWizard_title=New Java Project
 JavaProjectWizard_op_error_title=Error Creating Java Project
-JavaProjectWizard_op_error_create_message=An error occurred while creating the Java project
+JavaProjectWizard_op_error_create_message=An error occurred while creating the Java project.
 
 
 # ------- NewJavaProjectWizardPage-------
@@ -233,7 +238,9 @@ NewSourceFolderWizardPage_error_InvalidRootName=Invalid folder name. {0}
 NewSourceFolderWizardPage_error_NotAFolder=Not a folder.
 NewSourceFolderWizardPage_error_AlreadyExisting=The folder is already a source folder.
 NewSourceFolderWizardPage_error_AlreadyExistingDifferentCase=Folder already exists with a different case
+NewSourceFolderWizardPage_error_FolderNameFiltered= This folder is hidden in the workspace due to resource filters.
 NewSourceFolderWizardPage_ReplaceExistingSourceFolder_label=Replace existing project source folder entry to solve nesting
+NewSourceFolderWizardPage_error_FolderIsVirtual= Source folder cannot be a virtual folder.
 
 NewSourceFolderWizardPage_error_EnterProjectName=Project name must be entered.
 NewSourceFolderWizardPage_error_InvalidProjectPath=Invalid project path.
@@ -244,7 +251,8 @@ NewSourceFolderWizardPage_error_ProjectNotOpen=Project is not open.
 NewSourceFolderWizardPage_warning_ReplaceSFandOL=To avoid overlapping, the existing project source folder entry will be replaced and the output folder set to ''{0}''.
 NewSourceFolderWizardPage_warning_ReplaceOL=An exclusion pattern will be added to the project source folder entry and the output folder will be set to ''{0}''.
 NewSourceFolderWizardPage_warning_ReplaceSF=To avoid overlapping, the existing project source folder entry will be replaced.
-NewSourceFolderWizardPage_warning_AddedExclusions=Exclusion patterns of {0} source folder(s) updated to solve nesting.
+NewSourceFolderWizardPage_warning_AddedExclusions_singular=Exclusion patterns of source folder ''{0}'' updated to solve nesting.
+NewSourceFolderWizardPage_warning_AddedExclusions_plural=Exclusion patterns of {0} source folders updated to solve nesting.
 
 # ------- BuildPathsBlock -------
 
@@ -497,8 +505,7 @@ NewVariableEntryDialog_ExtensionDialog_title=Variable Extension
 NewVariableEntryDialog_ExtensionDialog_description=Choose extensions to ''{0}''.
 
 NewVariableEntryDialog_info_notexists=Variable points to a non-existing location.
-NewVariableEntryDialog_info_isfolder=Variable points to a folder: Use 'Extend...' to select an archive inside the folder.
-NewVariableEntryDialog_info_noselection=Select variable(s) to add to the classpath.
+NewVariableEntryDialog_info_noselection=Select the variables to add to the classpath.
 NewVariableEntryDialog_info_selected={0} variables selected.
 
 # ------- OutputLocationDialog -------
@@ -651,7 +658,8 @@ CPListLabelProvider_none=(None)
 CPListLabelProvider_all=(All)
 CPListLabelProvider_non_modifiable_attribute={0} - non modifiable
 CPListLabelProvider_access_rules_label={0}: {1}
-CPListLabelProvider_container_access_rules=Access rules: {0} rules(s) defined, added to all library child entries
+CPListLabelProvider_container_access_rules_singular=Access rules: 1 rule defined, added to all library child entries
+CPListLabelProvider_container_access_rules_plural=Access rules: {0} rules defined, added to all library child entries
 CPListLabelProvider_container_no_access_rules=Access rules: No rules defined
 CPListLabelProvider_source_attachment_label=Source attachment: {0}
 CPListLabelProvider_output_folder_label=Output folder: {0}
@@ -661,10 +669,13 @@ CPListLabelProvider_exclusion_filter_separator=;
 CPListLabelProvider_inclusion_filter_label=Included: {0}
 CPListLabelProvider_inclusion_filter_separator=;
 CPListLabelProvider_unknown_element_label=unknown element
-CPListLabelProvider_access_rules_enabled=Access rules: {0} rule(s) defined
-CPListLabelProvider_project_access_rules_combined=Access rules: {0} rule(s) defined, added to all project child entries
+CPListLabelProvider_access_rules_enabled_singular=Access rules: 1 rule defined
+CPListLabelProvider_access_rules_enabled_plural=Access rules: {0} rules defined
+CPListLabelProvider_project_access_rules_combined_singular=Access rules: 1 rule defined, added to all project child entries
+CPListLabelProvider_project_access_rules_combined_plural=Access rules: {0} rules defined, added to all project child entries
 CPListLabelProvider_project_access_rules_no_rules=Access rules: No rules defined
-CPListLabelProvider_project_access_rules_not_combined=Access rules: {0} rule(s) defined, added only to project source entries
+CPListLabelProvider_project_access_rules_not_combined_singular=Access rules: 1 rule defined, added only to project source entries
+CPListLabelProvider_project_access_rules_not_combined_plural=Access rules: {0} rules defined, added only to project source entries
 CPListLabelProvider_access_rules_disabled=Access rules: (No restrictions)
 NewSourceFolderDialog_useproject_button=&Project as source folder
 NewSourceFolderDialog_usefolder_button=&Folder as source folder
@@ -859,11 +870,9 @@ ClasspathModifierQueries_confirm_remove_linked_folder_label=Java Build Path
 ClasspathModifierQueries_confirm_remove_linked_folder_message=Are you sure you want to remove folder ''{0}'' from the build path?
 
 NewJavaProjectWizardPageOne_NameGroup_label_text=&Project name:
-NewJavaProjectWizardPageOne_LocationGroup_title=Contents
-NewJavaProjectWizardPageOne_LocationGroup_external_desc=Create project from e&xisting source
+NewJavaProjectWizardPageOne_LocationGroup_location_desc=Use &default location
 NewJavaProjectWizardPageOne_JREGroup_default_compliance=Use def&ault JRE (currently ''{0}'')
-NewJavaProjectWizardPageOne_LocationGroup_workspace_desc=Create new project in &workspace
-NewJavaProjectWizardPageOne_LocationGroup_locationLabel_desc=&Directory:
+NewJavaProjectWizardPageOne_LocationGroup_locationLabel_desc=&Location:
 NewJavaProjectWizardPageOne_LocationGroup_browseButton_desc=B&rowse...
 NewJavaProjectWizardPageOne_LayoutGroup_title=Project layout
 NewJavaProjectWizardPageOne_LayoutGroup_option_separateFolders=&Create separate folders for sources and class files
@@ -879,10 +888,8 @@ NewJavaProjectWizardPageOne_JREGroup_specific_EE=Use an execution en&vironment J
 NewJavaProjectWizardPageOne_Message_enterLocation=Enter a location for the project.
 NewJavaProjectWizardPageOne_UnknownDefaultJRE_name=Unknown
 NewJavaProjectWizardPageOne_Message_invalidDirectory=Invalid project contents directory
-NewJavaProjectWizardPageOne_Message_notOnWorkspaceRoot=Projects located in the workspace folder must be direct sub folders of the workspace folder
 NewJavaProjectWizardPageOne_JREGroup_link_description=<a>Configure JREs...</a>
 NewJavaProjectWizardPageOne_Message_cannotCreateAtExternalLocation=Cannot create project content at the given external location.
-NewJavaProjectWizardPageOne_Message_notExisingProjectOnWorkspaceRoot=The selected existing source location in the workspace root does not exist
 NewJavaProjectWizardPageOne_Message_invalidProjectNameForWorkspaceRoot=The name of the new project must be ''{0}''
 NewJavaProjectWizardPageOne_JREGroup_title=JRE
 NewJavaProjectWizardPageOne_page_title=Create a Java Project
@@ -904,7 +911,6 @@ NewJavaProjectWizardPageTwo_problem_restore_classpath=Problem while restoring ba
 NewJavaProjectWizardPageTwo_DeleteCorruptProjectFile_message=A problem occurred while creating the project from existing source:\n\n''{0}''\n\nThe corrupt project file will be replaced by a valid one.
 NewJavaProjectWizardPageOne_directory_message=Choose a directory for the project contents:
 NewJavaProjectWizardPageOne_WorkingSets_group=Working sets
-NewJavaWorkingSetWizard_add_as_root_message=Do you want to use the new working set as top level element in the Package Explorer?
 NewJavaWorkingSetWizard_title=New Java Working Set
 
 UserLibraryWizardPage_title=User Library
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
index 11bb960..4b711da 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/SuperInterfaceSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -192,7 +192,7 @@ public class SuperInterfaceSelectionDialog extends OpenTypeSelectionDialog {
 			// called, because superclass implementation of this class updates
 			// state of the table.
 
-			updateStatus(new Status(IStatus.OK, JavaPlugin.getPluginId(), IStatus.OK, "", null)); //$NON-NLS-1$
+			updateStatus(Status.OK_STATUS);
 
 			getButton(ADD_ID).setEnabled(false);
 		} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/AddSourceFolderWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/AddSourceFolderWizardPage.java
index 76ab167..5d4a9d8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/AddSourceFolderWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/AddSourceFolderWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -168,6 +168,7 @@ public class AddSourceFolderWizardPage extends NewElementWizardPage {
 		private void handleVariablesButtonPressed() {
 			int variableTypes = IResource.FOLDER;
 			PathVariableSelectionDialog dialog = new PathVariableSelectionDialog(getShell(), variableTypes);
+			dialog.setResource(fParent);
 			if (dialog.open() == IDialogConstants.OK_ID) {
 				String[] variableNames = (String[]) dialog.getResult();
 				if (variableNames != null && variableNames.length == 1) {
@@ -520,7 +521,7 @@ public class AddSourceFolderWizardPage extends NewElementWizardPage {
 				String excl= BasicElementLabels.getPathLabel(fNewElement.getPath(), false);
 				result.setInfo(Messages.format(NewWizardMessages.AddSourceFolderWizardPage_addSinglePattern, new Object[] {excl, changed}));
 			} else {
-				result.setInfo(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions, String.valueOf(modified.size())));
+				result.setInfo(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_warning_AddedExclusions_plural, String.valueOf(modified.size())));
 			}
 			return result;
 		}
@@ -626,12 +627,13 @@ public class AddSourceFolderWizardPage extends NewElementWizardPage {
 		if (folderLocation.isAbsolute())
 			return new StatusInfo(IStatus.ERROR, NewWizardMessages.AddSourceFolderWizardPage_error_NotARelativePathName);
 
-		IFolder folder= fNewElement.getJavaProject().getProject().getFolder(folderLocation);
+		IProject project= fNewElement.getJavaProject().getProject();
+		IFolder folder= project.getFolder(folderLocation);
 		IStatus locationStatus= workspace.validateLinkLocation(folder, path);
 		if (locationStatus.matches(IStatus.ERROR))
 			return locationStatus;
 
-		IPathVariableManager pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
+		IPathVariableManager pathVariableManager= project.getPathVariableManager();
 		IPath path1= Path.fromOSString(fLinkFields.fLinkLocation.getText());
 		IPath resolvedPath= pathVariableManager.resolvePath(path1);
 		// use the resolved link target name
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ArchiveFileFilter.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ArchiveFileFilter.java
index 9ee934e..d183c69 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ArchiveFileFilter.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ArchiveFileFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,7 +64,7 @@ public class ArchiveFileFilter extends ViewerFilter {
 			if (!fRecursive) {
 				return true;
 			}
-			// Ignore closed projects
+			// ignore closed projects
 			if (element instanceof IProject && !((IProject)element).isOpen())
 				return false;
 			try {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java
index 5adeeab..5d16aac 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -192,31 +192,20 @@ public class BuildPathSupport {
 	 * @param changedAttributes The attributes that have changed. See {@link CPListElement} for constants values.
 	 * @param jproject Project where the entry belongs to
 	 * @param containerPath The path of the entry's parent container or <code>null</code> if the entry is not in a container
+	 * @param isReferencedEntry <code>true</code> iff the entry has a {@link IClasspathEntry#getReferencingEntry() referencing entry}
 	 * @param monitor The progress monitor to use
 	 * @throws CoreException if the update failed
 	 */
-	public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, String[] changedAttributes, IJavaProject jproject, IPath containerPath, IProgressMonitor monitor) throws CoreException {
+	public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, String[] changedAttributes, IJavaProject jproject, IPath containerPath, boolean isReferencedEntry, IProgressMonitor monitor) throws CoreException {
 		if (containerPath != null) {
 			updateContainerClasspath(jproject, containerPath, newEntry, changedAttributes, monitor);
+		} else if (isReferencedEntry) {
+			updateReferencedClasspathEntry(jproject, newEntry, changedAttributes, monitor);
 		} else {
 			updateProjectClasspath(shell, jproject, newEntry, changedAttributes, monitor);
 		}
 	}
 
-
-	/**
-	 * Apply a modified classpath entry to the classpath. The classpath entry can also be from a classpath container.
-	 * @param shell If not null and the entry could not be found on the projects classpath, a dialog will ask to put the entry on the classpath
-	 * @param newEntry The modified entry. The entry's kind or path must be unchanged.
-	 * @param jproject Project where the entry belongs to
-	 * @param containerPath The path of the entry's parent container or <code>null</code> if the entry is not in a container
-	 * @param monitor The progress monitor to use
-	 * @throws CoreException if the update failed
-	 */
-	public static void modifyClasspathEntry(Shell shell, IClasspathEntry newEntry, IJavaProject jproject, IPath containerPath, IProgressMonitor monitor) throws CoreException {
-		modifyClasspathEntry(shell, newEntry, null, jproject, containerPath, monitor);
-	}
-
 	private static void updateContainerClasspath(IJavaProject jproject, IPath containerPath, IClasspathEntry newEntry, String[] changedAttributes, IProgressMonitor monitor) throws CoreException {
 		IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, jproject);
 		if (container == null) {
@@ -310,6 +299,39 @@ public class BuildPathSupport {
 	}
 
 	/**
+	 * Apply a modified referenced classpath entry to the classpath.
+	 * @param newReferencedEntry the modified entry. The entry's kind or path must be unchanged.
+	 * @param changedAttributes the attributes that have changed. See {@link CPListElement} for constants values.
+	 * @param jproject project where the entry belongs to
+	 * @param monitor the progress monitor to use
+	 * @throws CoreException if the update failed
+	 */
+	private static void updateReferencedClasspathEntry(IJavaProject jproject, IClasspathEntry newReferencedEntry, String[] changedAttributes, IProgressMonitor monitor) throws CoreException {
+		IClasspathEntry[] oldReferencedClasspath= jproject.getReferencedClasspathEntries();
+		int nEntries= oldReferencedClasspath.length;
+		ArrayList newReferencedEntries= new ArrayList(nEntries + 1);
+		int entryKind= newReferencedEntry.getEntryKind();
+		IPath jarPath= newReferencedEntry.getPath();
+		boolean found= false;
+		for (int i= 0; i < nEntries; i++) {
+			IClasspathEntry curr= oldReferencedClasspath[i];
+			if (curr.getEntryKind() == entryKind && curr.getPath().equals(jarPath)) {
+				// add modified entry
+				newReferencedEntries.add(getUpdatedEntry(curr, newReferencedEntry, changedAttributes, jproject));
+				found= true;
+			} else {
+				newReferencedEntries.add(curr);
+			}
+		}
+		if (!found) {
+			newReferencedEntries.add(newReferencedEntry);
+		}
+		IClasspathEntry[] newReferencedClasspath= (IClasspathEntry[]) newReferencedEntries.toArray(new IClasspathEntry[newReferencedEntries.size()]);
+		
+		jproject.setRawClasspath(jproject.getRawClasspath(), newReferencedClasspath, jproject.getOutputLocation(), monitor);
+	}
+	
+	/**
 	 * Sets the default compiler compliance options iff <code>modifiedClassPathEntries</code>
 	 * contains a classpath container entry that is modified or new and that points to an execution
 	 * environment. Does nothing if the EE or the options could not be resolved.
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
index c38ec50..8d580f0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -747,7 +747,7 @@ public class BuildPathsBlock {
 	 * 
 	 * @param classPathEntries the new classpath entries (list of {@link CPListElement})
 	 * @param outputLocation the output location
-	 * @param javaProject the Java project 
+	 * @param javaProject the Java project
 	 * @param newProjectCompliance compliance to set for a new project, can be <code>null</code>
 	 * @param monitor a progress monitor, or <code>null</code>
 	 * @throws CoreException if flushing failed
@@ -783,7 +783,7 @@ public class BuildPathsBlock {
 					if (folder.members().length == 0) {
 						BuildPathsBlock.removeOldClassfiles(folder);
 					} else {
-						if (BuildPathsBlock.getRemoveOldBinariesQuery(JavaPlugin.getActiveWorkbenchShell()).doQuery(true, oldOutputLocation)) {
+						if (BuildPathsBlock.getRemoveOldBinariesQuery(JavaPlugin.getActiveWorkbenchShell()).doQuery(folder.isDerived(), oldOutputLocation)) {
 							BuildPathsBlock.removeOldClassfiles(folder);
 						}
 					}
@@ -798,7 +798,6 @@ public class BuildPathsBlock {
 			if (!fWorkspaceRoot.exists(outputLocation)) {
 				IFolder folder= fWorkspaceRoot.getFolder(outputLocation);
 				CoreUtility.createDerivedFolder(folder, true, true, new SubProgressMonitor(monitor, 1));
-				folder.setDerived(true);
 			} else {
 				monitor.worked(1);
 			}
@@ -1051,7 +1050,7 @@ public class BuildPathsBlock {
 				if (currPath.equals(entryPath)) {
 					return curr;
 				}
-				// in case there's no full match, look for a similar container (same ID segment): 
+				// in case there's no full match, look for a similar container (same ID segment):
 				if (prefixMatch == null && entryKind == IClasspathEntry.CPE_CONTAINER) {
 					int n= entryPath.segmentCount();
 					if (n > 0) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListLabelProvider.java
index 91b0078..4042e82 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -184,22 +184,34 @@ public class CPListLabelProvider extends LabelProvider {
 				Boolean combined= (Boolean) attrib.getParent().getAttribute(CPListElement.COMBINE_ACCESSRULES);
 				if (nRules > 0) {
 					if (combined.booleanValue()) {
-						return Messages.format(NewWizardMessages.CPListLabelProvider_project_access_rules_combined, String.valueOf(nRules));
+						if (nRules == 1) {
+							return NewWizardMessages.CPListLabelProvider_project_access_rules_combined_singular;
+						} else {
+							return Messages.format(NewWizardMessages.CPListLabelProvider_project_access_rules_combined_plural, String.valueOf(nRules));
+						}
 					} else {
-						return Messages.format(NewWizardMessages.CPListLabelProvider_project_access_rules_not_combined, String.valueOf(nRules));
+						if (nRules == 1) {
+							return NewWizardMessages.CPListLabelProvider_project_access_rules_not_combined_singular;
+						} else {
+							return Messages.format(NewWizardMessages.CPListLabelProvider_project_access_rules_not_combined_plural, String.valueOf(nRules));
+						}
 					}
 				} else {
 					return NewWizardMessages.CPListLabelProvider_project_access_rules_no_rules;
 				}
 			} else if (parentKind == IClasspathEntry.CPE_CONTAINER) {
-				if (nRules > 0) {
-					return Messages.format(NewWizardMessages.CPListLabelProvider_container_access_rules, String.valueOf(nRules));
+				if (nRules > 1) {
+					return Messages.format(NewWizardMessages.CPListLabelProvider_container_access_rules_plural, String.valueOf(nRules));
+				} else if (nRules == 1) {
+					return NewWizardMessages.CPListLabelProvider_container_access_rules_singular;
 				} else {
 					return NewWizardMessages.CPListLabelProvider_container_no_access_rules;
 				}
 			} else {
-				if (nRules > 0) {
-					return Messages.format(NewWizardMessages.CPListLabelProvider_access_rules_enabled, String.valueOf(nRules));
+				if (nRules > 1) {
+					return Messages.format(NewWizardMessages.CPListLabelProvider_access_rules_enabled_plural, String.valueOf(nRules));
+				} else if (nRules == 1) {
+					return NewWizardMessages.CPListLabelProvider_access_rules_enabled_singular;
 				} else {
 					return NewWizardMessages.CPListLabelProvider_access_rules_disabled;
 				}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java
index ff9c629..d4e1817 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/ClasspathFixSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -44,7 +45,6 @@ import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.jface.window.Window;
@@ -54,7 +54,6 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.PerformChangeOperation;
 import org.eclipse.ltk.core.refactoring.RefactoringCore;
-import org.eclipse.ltk.ui.refactoring.RefactoringUI;
 
 import org.eclipse.jdt.core.IJavaProject;
 
@@ -105,7 +104,7 @@ public class ClasspathFixSelectionDialog extends StatusDialog {
 							ClasspathFixProposal fix= dialog.getSelectedClasspathFix();
 							Change change= fix.createChange(new SubProgressMonitor(monitor, 1));
 
-							PerformChangeOperation op= RefactoringUI.createUIAwareChangeOperation(change);
+							PerformChangeOperation op= new PerformChangeOperation(change);
 							op.setUndoManager(RefactoringCore.getUndoManager(), change.getName());
 							op.run(new SubProgressMonitor(monitor, 1));
 						} catch (OperationCanceledException e) {
@@ -168,7 +167,8 @@ public class ClasspathFixSelectionDialog extends StatusDialog {
 
 		ListenerMix listener= new ListenerMix();
 
-		if (fClasspathFixProposals.length == 0) {
+		int count= fClasspathFixProposals.length;
+		if (count == 0) {
 			Link link= createLink(composite, listener);
 			String[] args= {  BasicElementLabels.getJavaElementName(fMissingType), BasicElementLabels.getJavaElementName(fProject.getElementName()) };
 			link.setText(Messages.format(NewWizardMessages.ClasspathFixSelectionDialog_no_proposals_message, args));
@@ -185,17 +185,23 @@ public class ClasspathFixSelectionDialog extends StatusDialog {
 			fFixSelectionTable= new TableViewer(composite, SWT.SINGLE | SWT.BORDER);
 			fFixSelectionTable.setContentProvider(new ArrayContentProvider());
 			fFixSelectionTable.setLabelProvider(new ClasspathFixLabelProvider());
-			fFixSelectionTable.setComparator(new ViewerComparator());
+			fFixSelectionTable.setComparator(new ViewerComparator() {
+				public int category(Object element) {
+					return - ((ClasspathFixProposal) element).getRelevance();
+				}
+			});
 			fFixSelectionTable.addDoubleClickListener(listener);
 			fFixSelectionTable.setInput(fClasspathFixProposals);
-			fFixSelectionTable.setSelection(new StructuredSelection(fClasspathFixProposals[0]));
+			Table table= fFixSelectionTable.getTable();
+			table.select(0);
 			fFixSelectionTable.addSelectionChangedListener(listener);
 
+			Dialog.applyDialogFont(table);
+			
 			GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true);
-			gridData.heightHint= convertHeightInCharsToPixels(4);
+			gridData.heightHint= table.getItemHeight() * Math.max(4, Math.min(10, count));
 			gridData.widthHint= convertWidthInCharsToPixels(50);
-
-			fFixSelectionTable.getControl().setLayoutData(gridData);
+			table.setLayoutData(gridData);
 
 			Link link= createLink(composite, listener);
 			link.setText(Messages.format(NewWizardMessages.ClasspathFixSelectionDialog_open_buld_path_dialog_message, BasicElementLabels.getJavaElementName(fProject.getElementName())));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CreateMultipleSourceFoldersDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CreateMultipleSourceFoldersDialog.java
index 026258a..9efe104 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CreateMultipleSourceFoldersDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CreateMultipleSourceFoldersDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,7 @@ import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.jface.window.Window;
 
@@ -135,7 +136,18 @@ public class CreateMultipleSourceFoldersDialog extends TrayDialog {
 				rejectedElements.add(allProjects[i]);
 			}
 		}
-		ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray());
+		ViewerFilter filter= new TypedViewerFilter(acceptedClasses, rejectedElements.toArray()){
+
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.internal.ui.wizards.TypedViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+			 */
+			public boolean select(Viewer viewer, Object parentElement, Object element) {
+				if (element instanceof IFolder && ((IFolder)element).isVirtual()) {
+					return false;
+				}
+				return super.select(viewer, parentElement, element);
+			}
+		};
 
 		ILabelProvider lp= new WorkbenchLabelProvider();
 		ITreeContentProvider cp= new FakeFolderBaseWorkbenchContentProvider();
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
index 3614f18..f4767bc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -532,7 +532,7 @@ public class LibrariesWorkbookPage extends BuildPathBasePage {
 		try {
 			IWorkspaceRunnable runnable= new IWorkspaceRunnable() {
 				public void run(IProgressMonitor monitor) throws CoreException {
-					BuildPathSupport.modifyClasspathEntry(null, newEntry, changedAttributes, jproject, containerPath, monitor);
+					BuildPathSupport.modifyClasspathEntry(null, newEntry, changedAttributes, jproject, containerPath, false, monitor);
 				}
 			};
 			PlatformUI.getWorkbench().getProgressService().run(true, true, new WorkbenchRunnableAdapter(runnable));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
index d600a93..d439cc0 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -578,14 +578,15 @@ public class SourceAttachmentBlock {
 	 * @param newEntry the new entry
 	 * @param jproject the Java project
 	 * @param containerPath the path of the parent container or <code>null</code> if the element is not in a container
+	 * @param isReferencedEntry <code>true</code> iff the entry has a {@link IClasspathEntry#getReferencingEntry() referencing entry}
 	 * @return return the runnable
 	 */
-	public static IRunnableWithProgress getRunnable(final Shell shell, final IClasspathEntry newEntry, final IJavaProject jproject, final IPath containerPath) {
+	public static IRunnableWithProgress getRunnable(final Shell shell, final IClasspathEntry newEntry, final IJavaProject jproject, final IPath containerPath, final boolean isReferencedEntry) {
 		return new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) throws InvocationTargetException {
 				try {
 					String[] changedAttributes= { CPListElement.SOURCEATTACHMENT };
-					BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, jproject, containerPath, monitor);
+					BuildPathSupport.modifyClasspathEntry(shell, newEntry, changedAttributes, jproject, containerPath, isReferencedEntry, monitor);
 				} catch (CoreException e) {
 					throw new InvocationTargetException(e);
 				}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
index 029e83d..c5c3030 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,8 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.jface.window.Window;
 
+import org.eclipse.ui.PlatformUI;
+
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
@@ -299,7 +301,7 @@ public class VariableBlock {
 			final VariableBlockRunnable runnable= new VariableBlockRunnable(removedVariables, changedElements);
 			final ProgressMonitorDialog dialog= new ProgressMonitorDialog(getShell());
 			try {
-				dialog.run(true, true, runnable);
+				PlatformUI.getWorkbench().getProgressService().runInUI(dialog, runnable, ResourcesPlugin.getWorkspace().getRoot());
 			} catch (InvocationTargetException e) {
 				ExceptionHandler.handle(new InvocationTargetException(new NullPointerException()), getShell(), NewWizardMessages.VariableBlock_variableSettingError_titel, NewWizardMessages.VariableBlock_variableSettingError_message);
 				return false;
@@ -410,8 +412,6 @@ public class VariableBlock {
 				if (name.equals(initSelection)) {
 					initSelectedElement= elem;
 				}
-			} else {
-				JavaPlugin.logErrorMessage("VariableBlock: Classpath variable with null value: " + name); //$NON-NLS-1$
 			}
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java
index 33be986..f10c5ba 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/AddFolderToBuildpathAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -285,10 +285,13 @@ public class AddFolderToBuildpathAction extends BuildpathModifierAction {
 
 					if (ClasspathModifier.isInExternalOrArchive(fragment))
 	                    return false;
+					IResource res;
+					if ((res= fragment.getResource()) != null && res.isVirtual())
+						return false;
 				} else if (element instanceof IFolder) {
 					IProject project= ((IFolder)element).getProject();
 					IJavaProject javaProject= JavaCore.create(project);
-					if (javaProject == null || !javaProject.exists())
+					if (javaProject == null || !javaProject.exists() || ((IFolder)element).isVirtual())
 						return false;
 				} else {
 					return false;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java
index 7146ad2..3fc4d86 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/RemoveFromBuildpathAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,7 @@ import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.corext.buildpath.BuildpathDelta;
 import org.eclipse.jdt.internal.corext.buildpath.CPJavaProject;
 import org.eclipse.jdt.internal.corext.buildpath.ClasspathModifier;
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
@@ -254,10 +255,11 @@ public class RemoveFromBuildpathAction extends BuildpathModifierAction {
 						return false;
 
 				} else if (element instanceof IPackageFragmentRoot) {
-					IClasspathEntry entry= ((IPackageFragmentRoot) element).getRawClasspathEntry();
-					if (entry != null && entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+					IClasspathEntry entry= JavaModelUtil.getClasspathEntry((IPackageFragmentRoot) element);
+					if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER)
+						return false;
+					if (entry.getReferencingEntry() != null)
 						return false;
-					}
 				} else if (element instanceof ClassPathContainer) {
 					return true;
 				} else {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java
index 9efdff2..c81f52b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.internal.ui.wizards.dialogfields;
 
@@ -129,4 +130,17 @@ public class LayoutUtil {
 		}
 	}
 
+	/**
+	 * Sets the vertical grabbing of a control to true. Assumes that GridData is used.
+	 * @since 3.6
+	 */
+	public static void setVerticalGrabbing(Control control) {
+		Object ld= control.getLayoutData();
+		if (ld instanceof GridData) {
+			GridData gd= ((GridData)ld);
+			gd.grabExcessVerticalSpace= true;
+			gd.verticalAlignment= SWT.FILL;
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/StringDialogField.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/StringDialogField.java
index 7e2834a..6978a1b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/StringDialogField.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/StringDialogField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -99,17 +99,18 @@ public class StringDialogField extends DialogField {
 	 * Creates or returns the created text control.
 	 * @param parent The parent composite or <code>null</code> when the widget has
 	 * already been created.
+	 * @return the text control
 	 */
 	public Text getTextControl(Composite parent) {
 		if (fTextControl == null) {
 			assertCompositeNotNull(parent);
 			fModifyListener= new ModifyListener() {
 				public void modifyText(ModifyEvent e) {
-					doModifyText(e);
+					doModifyText();
 				}
 			};
 
-			fTextControl= new Text(parent, SWT.SINGLE | SWT.BORDER);
+			fTextControl= createTextControl(parent);
 			// moved up due to 1GEUNW2
 			fTextControl.setText(fText);
 			fTextControl.setFont(parent.getFont());
@@ -123,7 +124,18 @@ public class StringDialogField extends DialogField {
 		return fTextControl;
 	}
 
-	private void doModifyText(ModifyEvent e) {
+	/**
+	 * Creates and returns a new text control.
+	 * 
+	 * @param parent the parent
+	 * @return the text control
+	 * @since 3.6
+	 */
+	protected Text createTextControl(Composite parent) {
+		return new Text(parent, SWT.SINGLE | SWT.BORDER);
+	}
+
+	private void doModifyText() {
 		if (isOkToUse(fTextControl)) {
 			fText= fTextControl.getText();
 		}
@@ -145,7 +157,7 @@ public class StringDialogField extends DialogField {
 	// ------ text access
 
 	/**
-	 * Gets the text. Can not be <code>null</code>
+	 * @return the text, can not be <code>null</code>
 	 */
 	public String getText() {
 		return fText;
@@ -153,6 +165,7 @@ public class StringDialogField extends DialogField {
 
 	/**
 	 * Sets the text. Triggers a dialog-changed event.
+	 * @param text the new text
 	 */
 	public void setText(String text) {
 		fText= text;
@@ -165,6 +178,7 @@ public class StringDialogField extends DialogField {
 
 	/**
 	 * Sets the text without triggering a dialog-changed event.
+	 * @param text the new text
 	 */
 	public void setTextWithoutUpdate(String text) {
 		fText= text;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TextBoxDialogField.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TextBoxDialogField.java
new file mode 100644
index 0000000..4ce29da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TextBoxDialogField.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
+ *     IBM Corporation - accessibility
+ *******************************************************************************/
+package org.eclipse.jdt.internal.ui.wizards.dialogfields;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Dialog field containing a label and a multi-line text control.
+ */
+public class TextBoxDialogField extends StringDialogField {
+	
+	/*
+	 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.StringDialogField#createTextControl(org.eclipse.swt.widgets.Composite)
+	 * @since 3.6
+	 */
+	protected Text createTextControl(Composite parent) {
+		Text text= new Text(parent, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
+		text.addTraverseListener(new TraverseListener() {
+			public void keyTraversed(TraverseEvent event) {
+				switch (event.detail) {
+					case SWT.TRAVERSE_ESCAPE:
+					case SWT.TRAVERSE_PAGE_NEXT:
+					case SWT.TRAVERSE_PAGE_PREVIOUS:
+						event.doit= true;
+						break;
+					case SWT.TRAVERSE_RETURN:
+					case SWT.TRAVERSE_TAB_NEXT:
+					case SWT.TRAVERSE_TAB_PREVIOUS:
+						if ((event.stateMask & SWT.MODIFIER_MASK) != 0) {
+							event.doit= true;
+						}
+						break;
+				}
+
+			}
+		});
+		return text;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetUpdater.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetUpdater.java
index cb6341a..bb0567f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetUpdater.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/JavaWorkingSetUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,13 @@ import org.eclipse.jdt.core.JavaCore;
 
 public class JavaWorkingSetUpdater implements IWorkingSetUpdater, IElementChangedListener {
 
+	/**
+	 * DO NOT REMOVE, used in a product, see https://bugs.eclipse.org/297529 .
+	 * @deprecated As of 3.5, replaced by {@link IWorkingSetIDs#JAVA}
+	 */
+	public static final String ID= IWorkingSetIDs.JAVA;
+	
+
 	private List fWorkingSets;
 
 	private static class WorkingSetDelta {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
index cbdaaa8..12f935c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetConfigurationDialog.java
@@ -35,9 +35,6 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.core.resources.IProject;
 
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -108,24 +105,8 @@ public class WorkingSetConfigurationDialog extends SelectionDialog {
 	private class Filter extends ViewerFilter {
 
 		public boolean select(Viewer viewer, Object parentElement, Object element) {
-			IWorkingSet ws= (IWorkingSet)element;
-			String id= ws.getId();
-			return IWorkingSetIDs.OTHERS.equals(id) || IWorkingSetIDs.JAVA.equals(id) || IWorkingSetIDs.RESOURCE.equals(id) || isCompatible(ws);
+			return WorkingSetModel.isSupportedAsTopLevelElement((IWorkingSet)element);
 		}
-
-		private boolean isCompatible(IWorkingSet set) {
-			if (!set.isSelfUpdating() || set.isAggregateWorkingSet())
-				return false;
-			IAdaptable[] elements= set.getElements();
-			for (int i= 0; i < elements.length; i++) {
-				IAdaptable element= elements[i];
-				IProject p= (IProject)element.getAdapter(IProject.class);
-				if (p != null && p.exists())
-					return true;
-			}
-			return false;
-		}
-
 	}
 
 	private List fAllWorkingSets;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.java
index d3e463c..0289f59 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.java
@@ -20,10 +20,6 @@ public final class WorkingSetMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String AbstractWorkingSetPage_workingSet_name;
-	public static String AbstractWorkingSetPage_warning_nameMustNotBeEmpty;
-	public static String AbstractWorkingSetPage_warning_workingSetExists;
-	public static String AbstractWorkingSetPage_warning_nameWhitespace;
 	public static String ConfigureWorkingSetAssignementAction_DeselectAll_button;
 	public static String ConfigureWorkingSetAssignementAction_DialogMessage_multi;
 	public static String ConfigureWorkingSetAssignementAction_SelectAll_button;
@@ -48,9 +44,6 @@ public final class WorkingSetMessages extends NLS {
 	public static String JavaWorkingSetPage_warning_workingSetExists;
 	public static String JavaWorkingSetPage_warning_resourceMustBeChecked;
 	public static String JavaWorkingSetPage_warning_nameWhitespace;
-	public static String JavaWorkingSetPage_projectClosedDialog_message;
-	public static String JavaWorkingSetPage_projectClosedDialog_title;
-	public static String OpenCloseWorkingSetAction_error_details;
 
 	public static String SelectWorkingSetAction_text;
 	public static String SelectWorkingSetAction_toolTip;
@@ -68,7 +61,6 @@ public final class WorkingSetMessages extends NLS {
 	public static String ViewActionGroup_show_label;
 	public static String ViewActionGroup_projects_label;
 	public static String ViewActionGroup_workingSets_label;
-	public static String WorkingSetModel_histroy_name;
 	public static String WorkingSetModel_others_name;
 
 	public static String WorkingSetConfigurationDialog_title;
@@ -82,12 +74,6 @@ public final class WorkingSetMessages extends NLS {
 	public static String WorkingSetConfigurationDialog_deselectAll_label;
 	public static String WorkingSetConfigurationDialog_sort_working_sets;
 
-	public static String OpenCloseWorkingSetAction_close_label;
-	public static String OpenCloseWorkingSetAction_close_error_title;
-	public static String OpenCloseWorkingSetAction_close_error_message;
-	public static String OpenCloseWorkingSetAction_open_label;
-	public static String OpenCloseWorkingSetAction_open_error_title;
-	public static String OpenCloseWorkingSetAction_open_error_message;
 	public static String RemoveWorkingSetElementAction_label;
 
 	static {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.properties b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.properties
index 15c0098..2b2b536 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.properties
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetMessages.properties
@@ -9,11 +9,6 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-AbstractWorkingSetPage_workingSet_name= &Working set name:
-AbstractWorkingSetPage_warning_nameMustNotBeEmpty= The name must not be empty.
-AbstractWorkingSetPage_warning_workingSetExists= A working set with that name already exists.
-AbstractWorkingSetPage_warning_nameWhitespace= The name must not have leading or trailing whitespace.
-
 JavaWorkingSetPage_add_button=&Add -->
 JavaWorkingSetPage_addAll_button=A&dd All -->
 JavaWorkingSetPage_remove_button=<-- &Remove
@@ -28,8 +23,6 @@ JavaWorkingSetPage_warning_nameMustNotBeEmpty= The name must not be empty.
 JavaWorkingSetPage_warning_workingSetExists= A working set with that name already exists.
 JavaWorkingSetPage_warning_resourceMustBeChecked= No resources selected.
 JavaWorkingSetPage_warning_nameWhitespace= The name must not have leading or trailing whitespace.
-JavaWorkingSetPage_projectClosedDialog_message= A closed project can not be modified
-JavaWorkingSetPage_projectClosedDialog_title= Working Set Change
 
 SelectWorkingSetAction_text= Select &Working Set...
 SelectWorkingSetAction_toolTip= Select a working set
@@ -48,7 +41,6 @@ ViewActionGroup_projects_label=&Projects
 ViewActionGroup_workingSets_label=&Working Sets
 
 #---- working set model ---------------------------------------------------------------
-WorkingSetModel_histroy_name=History
 WorkingSetModel_others_name=Other Projects
 
 #---- working set configuration dialog ------------------------------------------------
@@ -63,15 +55,6 @@ WorkingSetConfigurationDialog_selectAll_label=Select &All
 WorkingSetConfigurationDialog_deselectAll_label=Dese&lect All
 WorkingSetConfigurationDialog_sort_working_sets=&Sort working sets
 
-#---- open close project action -------------------------------------------------------
-OpenCloseWorkingSetAction_close_label=Clo&se Projects
-OpenCloseWorkingSetAction_error_details=See details for more information
-OpenCloseWorkingSetAction_close_error_title=Close Projects
-OpenCloseWorkingSetAction_close_error_message=Unexpected exception happened during close projects
-OpenCloseWorkingSetAction_open_label=Op&en Projects
-OpenCloseWorkingSetAction_open_error_title=Open Projects
-OpenCloseWorkingSetAction_open_error_message=Unexpected exception happened during open projects
-
 #---- Properties action -------------------------------------------------------
 RemoveWorkingSetElementAction_label=Remo&ve from Working Set
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java
index c26ad79..2dab114 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/workingsets/WorkingSetModel.java
@@ -455,13 +455,15 @@ public class WorkingSetModel {
 
 		// Add new working set to the list of active working sets
 		if (IWorkingSetManager.CHANGE_WORKING_SET_ADD.equals(property)) {
-			IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
 			IWorkingSet workingSet= (IWorkingSet)event.getNewValue();
-			List allWorkingSets= new ArrayList(Arrays.asList(manager.getAllWorkingSets()));
-			if (workingSet.isVisible() && allWorkingSets.contains(workingSet) && !fActiveWorkingSets.contains(workingSet)) {
-				List elements= new ArrayList(fActiveWorkingSets);
-				elements.add(workingSet);
-				setActiveWorkingSets((IWorkingSet[])elements.toArray(new IWorkingSet[elements.size()]));
+			if (isSupportedAsTopLevelElement(workingSet)) {
+				IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
+				List allWorkingSets= new ArrayList(Arrays.asList(manager.getAllWorkingSets()));
+				if (workingSet.isVisible() && allWorkingSets.contains(workingSet) && !fActiveWorkingSets.contains(workingSet)) {
+					List elements= new ArrayList(fActiveWorkingSets);
+					elements.add(workingSet);
+					setActiveWorkingSets((IWorkingSet[])elements.toArray(new IWorkingSet[elements.size()]));
+				}
 			}
 		}
 
@@ -492,6 +494,32 @@ public class WorkingSetModel {
 
 	}
 
+	/**
+	 * Tells whether the given working set is supported as top-level element
+	 * 
+	 * @param workingSet the working set to test
+	 * @return <code>true</code> if the given working set is supported as top-level element
+	 * @since 3.6
+	 */
+	public static boolean isSupportedAsTopLevelElement(IWorkingSet workingSet) {
+		Object id= workingSet.getId();
+		if (IWorkingSetIDs.OTHERS.equals(id) || IWorkingSetIDs.JAVA.equals(id) || IWorkingSetIDs.RESOURCE.equals(id))
+			return true;
+
+		if (!workingSet.isSelfUpdating() || workingSet.isAggregateWorkingSet())
+			return false;
+
+		IAdaptable[] elements= workingSet.getElements();
+		for (int i= 0; i < elements.length; i++) {
+			IAdaptable element= elements[i];
+			IProject p= (IProject)element.getAdapter(IProject.class);
+			if (p != null && p.exists())
+				return true;
+		}
+		return false;
+	}
+
+
 	private void fireEvent(PropertyChangeEvent event) {
 		Object[] listeners= fListeners.getListeners();
 		for (int i= 0; i < listeners.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java
index 530e435..5f4a17a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementImageDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.packageview.PackageExplorerProblemsDecorator;
 
 /**
  * A {@link JavaElementImageDescriptor} consists of a base image and several adornments. The adornments
@@ -85,6 +86,12 @@ public class JavaElementImageDescriptor extends CompositeImageDescriptor {
 	 */
 	public final static int TRANSIENT= 	0x1000;
 
+	/**
+	 * Flag to render the build path error adornment.
+	 * @since 3.6
+	 */
+	//TODO: make API in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=308672
+	final static int BUILDPATH_ERROR= PackageExplorerProblemsDecorator.BUILDPATH_ERROR;
 
 	private ImageDescriptor fBaseImage;
 	private int fFlags;
@@ -291,6 +298,9 @@ public class JavaElementImageDescriptor extends CompositeImageDescriptor {
 		if ((fFlags & ERROR) != 0) {
 			addBottomLeftImage(JavaPluginImages.DESC_OVR_ERROR, pos);
 		}
+		if ((fFlags & PackageExplorerProblemsDecorator.BUILDPATH_ERROR) != 0) {
+			addBottomLeftImage(JavaPluginImages.DESC_OVR_BUILDPATH_ERROR, pos);
+		}
 		if ((fFlags & WARNING) != 0) {
 			addBottomLeftImage(JavaPluginImages.DESC_OVR_WARNING, pos);
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
index 6185829..a459a73 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -479,7 +479,7 @@ public class JavaElementLabels {
 	public static String getElementLabel(IJavaElement element, long flags) {
 		StringBuffer result= new StringBuffer();
 		getElementLabel(element, flags, result);
-		return Strings.markLTR(result.toString(), JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(result.toString());
 	}
 
 	/**
@@ -494,7 +494,7 @@ public class JavaElementLabels {
 	public static StyledString getStyledElementLabel(IJavaElement element, long flags) {
 		StyledString result= new StyledString();
 		getElementLabel(element, flags, result);
-		return Strings.markLTR(result, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(result);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
index c06d5e9..597d8e7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaUI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -268,13 +268,12 @@ public final class JavaUI {
 
 
 	/**
-	 * The class org.eclipse.debug.core.model.IProcess allows attaching
-	 * String properties to processes. The Java UI contributes a property
-	 * page for IProcess that will show the contents of the property
-	 * with this key.
-	 * The intent of this property is to show the command line a process
-	 * was launched with.
-	 * @deprecated
+	 * The class org.eclipse.debug.core.model.IProcess allows attaching String properties to
+	 * processes. The Java UI contributes a property page for IProcess that will show the contents
+	 * of the property with this key. The intent of this property is to show the command line a
+	 * process was launched with.
+	 * 
+	 * @deprecated As of 1.0
 	 */
 	public static final String ATTR_CMDLINE= "org.eclipse.jdt.ui.launcher.cmdLine"; //$NON-NLS-1$
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
index 4022c83..ca823ab 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/OverrideIndicatorLabelDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,10 +29,10 @@ import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.NodeFinder;
 import org.eclipse.jdt.core.dom.SimpleName;
 
 import org.eclipse.jdt.internal.corext.dom.Bindings;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
 import org.eclipse.jdt.internal.corext.util.MethodOverrideTester;
@@ -150,11 +150,11 @@ public class OverrideIndicatorLabelDecorator implements ILabelDecorator, ILightw
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
+	 * 
 	 * @param method The element to decorate
-	 * @return Resulting decorations (combination of JavaElementImageDescriptor.IMPLEMENTS
-	 * and JavaElementImageDescriptor.OVERRIDES)
-	 * @throws JavaModelException
-	 *
+	 * @return Resulting decorations (combination of JavaElementImageDescriptor.IMPLEMENTS and
+	 *         JavaElementImageDescriptor.OVERRIDES)
+	 * @throws JavaModelException if accessing a Java Model element fails
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	protected int getOverrideIndicators(IMethod method) throws JavaModelException {
@@ -201,14 +201,15 @@ public class OverrideIndicatorLabelDecorator implements ILabelDecorator, ILightw
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
+	 * 
 	 * @param type The declaring type of the method to decorate.
 	 * @param hierarchy The type hierarchy of the declaring type.
 	 * @param name The name of the method to find.
 	 * @param paramTypes The parameter types of the method to find.
 	 * @return The resulting decoration.
-	 * @throws JavaModelException
+	 * @throws JavaModelException if accessing a Java Model element fails
 	 * @deprecated Not used anymore. This method is not accurate for methods in generic types.
-	 *
+	 * 
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	protected int findInHierarchy(IType type, ITypeHierarchy hierarchy, String name, String[] paramTypes) throws JavaModelException {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java
index 926eff9..1f8f96f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,11 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse at gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
  *******************************************************************************/
 package org.eclipse.jdt.ui;
 
+import java.util.Arrays;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
@@ -44,12 +46,14 @@ import org.eclipse.jdt.ui.text.IJavaColorConstants;
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIPreferenceInitializer;
 import org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyContentProvider;
+import org.eclipse.jdt.internal.ui.callhierarchy.ExpandWithConstructorsConfigurationBlock;
 import org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightings;
 import org.eclipse.jdt.internal.ui.preferences.NewJavaProjectPreferencePage;
 import org.eclipse.jdt.internal.ui.preferences.formatter.FormatterProfileManager;
 import org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerRegistry;
 import org.eclipse.jdt.internal.ui.text.java.ProposalSorterRegistry;
 import org.eclipse.jdt.internal.ui.text.spelling.SpellCheckEngine;
+import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer;
 
 
 /**
@@ -132,6 +136,31 @@ public class PreferenceConstants {
 	public static final String APPEARANCE_COMPRESS_PACKAGE_NAMES= "org.eclipse.jdt.ui.compresspackagenames";//$NON-NLS-1$
 
 	/**
+	 * A named preference that defines the patterns used for package name abbreviation.
+	 * <p>
+	 * Value is of type <code>String</code>. Value is a newline separated list of
+	 * packagePrefix=abbreviation pairs. For example, a pattern of
+	 * 'javax.management=<JMX>' will abbreviate 'javax.management.monitor' to
+	 * '<JMX>.monitor'. A '#' at the beginning of a line disables an entry.
+	 * </p>
+	 * @since 3.6
+	 */
+	//TODO: make API in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=306069
+	static final String APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW= JavaElementLabelComposer.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW;
+
+	/**
+	 * A named preference that controls if package name abbreviation is turned on or off.
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 *
+	 * @see #APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW
+	 * @since 3.6
+	 */
+	//TODO: make API in 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=306069
+	static final String APPEARANCE_ABBREVIATE_PACKAGE_NAMES= JavaElementLabelComposer.APPEARANCE_ABBREVIATE_PACKAGE_NAMES;
+
+	/**
 	 * A named preference that controls if empty inner packages are folded in
 	 * the hierarchical mode of the package explorer.
 	 * <p>
@@ -3233,6 +3262,29 @@ public class PreferenceConstants {
 	 */
 	public static final String EDITOR_FOLDING_HEADERS= "editor_folding_default_headers"; //$NON-NLS-1$
 
+	/**
+	 * A named preference that holds the methods or types whose methods are by default expanded with
+	 * constructors in the Call Hierarchy.
+	 * <p>
+	 * Value is of type <code>String</code>: semicolon separated list of fully qualified type names
+	 * appended with ".*" or "." + method name.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS= "CallHierarchy.defaultExpandWithConstructorsMembers"; //$NON-NLS-1$
+
+	/**
+	 * A named preference that controls whether methods from anonymous types are by default expanded
+	 * with constructors in the Call Hierarchy.
+	 * <p>
+	 * Value is of type <code>Boolean</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS= "CallHierarchy.anonymousExpandWithConstructors"; //$NON-NLS-1$
+
 
 	//---------- Properties File Editor ----------
 
@@ -3591,6 +3643,8 @@ public class PreferenceConstants {
 		store.setDefault(PreferenceConstants.BROWSING_STACK_VERTICALLY, false);
 		store.setDefault(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW, ""); //$NON-NLS-1$
 		store.setDefault(PreferenceConstants.APPEARANCE_FOLD_PACKAGES_IN_PACKAGE_EXPLORER, true);
+		store.setDefault(PreferenceConstants.APPEARANCE_ABBREVIATE_PACKAGE_NAMES, false);
+		store.setDefault(PreferenceConstants.APPEARANCE_PKG_NAME_ABBREVIATION_PATTERN_FOR_PKG_VIEW, ""); //$NON-NLS-1$
 
 		// ImportOrganizePreferencePage
 		store.setDefault(PreferenceConstants.ORGIMPORTS_IMPORTORDER, "java;javax;org;com"); //$NON-NLS-1$
@@ -3620,7 +3674,7 @@ public class PreferenceConstants {
 		if (store.getBoolean(PreferenceConstants.CODEGEN_USE_GETTERSETTER_PREFIX)) {
 			String prefix= store.getString(PreferenceConstants.CODEGEN_GETTERSETTER_PREFIX);
 			if (prefix.length() > 0) {
-				JavaCore.getPlugin().getPluginPreferences().setValue(JavaCore.CODEASSIST_FIELD_PREFIXES, prefix);
+				new InstanceScope().getNode(JavaCore.PLUGIN_ID).put(JavaCore.CODEASSIST_FIELD_PREFIXES, prefix);
 				store.setToDefault(PreferenceConstants.CODEGEN_USE_GETTERSETTER_PREFIX);
 				store.setToDefault(PreferenceConstants.CODEGEN_GETTERSETTER_PREFIX);
 			}
@@ -3628,7 +3682,7 @@ public class PreferenceConstants {
 		if (store.getBoolean(PreferenceConstants.CODEGEN_USE_GETTERSETTER_SUFFIX)) {
 			String suffix= store.getString(PreferenceConstants.CODEGEN_GETTERSETTER_SUFFIX);
 			if (suffix.length() > 0) {
-				JavaCore.getPlugin().getPluginPreferences().setValue(JavaCore.CODEASSIST_FIELD_SUFFIXES, suffix);
+				new InstanceScope().getNode(JavaCore.PLUGIN_ID).put(JavaCore.CODEASSIST_FIELD_SUFFIXES, suffix);
 				store.setToDefault(PreferenceConstants.CODEGEN_USE_GETTERSETTER_SUFFIX);
 				store.setToDefault(PreferenceConstants.CODEGEN_GETTERSETTER_SUFFIX);
 			}
@@ -3712,13 +3766,7 @@ public class PreferenceConstants {
 		store.setDefault(PreferenceConstants.CODEASSIST_AUTOINSERT, true);
 
 		// Set the value for the deprecated color constants
-		if (PlatformUI.isWorkbenchRunning()) {
-			setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, JFaceResources.getColorRegistry().getRGB(JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR));
-			setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, JFaceResources.getColorRegistry().getRGB(JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR));
-		} else {
-			setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255));
-			setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0));
-		}
+		initializeDeprecatedColorConstants(store);
 
 		store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA, "."); //$NON-NLS-1$
 		store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC, "@#"); //$NON-NLS-1$
@@ -3875,9 +3923,19 @@ public class PreferenceConstants {
 
 		// Colors that are set by the current theme
 		JavaUIPreferenceInitializer.setThemeBasedPreferences(store, false);
-		
-		store.setDefault(CallHierarchyContentProvider.PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS, true);
-		store.setDefault(CallHierarchyContentProvider.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS, "java.lang.Runnable;java.util.concurrent.Callable;org.eclipse.swt.widgets.Listener"); //$NON-NLS-1$
+
+		store.setDefault(PREF_ANONYMOUS_EXPAND_WITH_CONSTRUCTORS, true);
+		store.setDefault(PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS, "java.lang.Runnable.run;java.util.concurrent.Callable.call;org.eclipse.swt.widgets.Listener.handleEvent"); //$NON-NLS-1$
+		// compatibility code
+		String str= store.getString(CallHierarchyContentProvider.OLD_PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS);
+		if (str.length() > 0) {
+			String[] oldPrefStr= str.split(";"); //$NON-NLS-1$
+			for (int i= 0; i < oldPrefStr.length; i++) {
+				oldPrefStr[i]= oldPrefStr[i] + (".*"); //$NON-NLS-1$
+			}
+			store.setValue(PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS, ExpandWithConstructorsConfigurationBlock.serializeMembers(Arrays.asList(oldPrefStr)));
+			store.setToDefault(CallHierarchyContentProvider.OLD_PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS);
+		}
 	}
 
 	/**
@@ -4013,5 +4071,32 @@ public class PreferenceConstants {
 		store.putValue(key, value);
 	}
 
+	/**
+	 * Initializes deprecated color constants.
+	 * 
+	 * @param store the preference store
+	 * @since 3.6
+	 */
+	private static void initializeDeprecatedColorConstants(IPreferenceStore store) {
+		RGB bgRGB= null;
+		RGB fgRGB= null;
+
+		// Don't fail in headless mode
+		if (PlatformUI.isWorkbenchRunning()) {
+			bgRGB= JFaceResources.getColorRegistry().getRGB(JFacePreferences.CONTENT_ASSIST_BACKGROUND_COLOR);
+			fgRGB= JFaceResources.getColorRegistry().getRGB(JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR);
+		}
+
+		// Workaround for https://bugs.eclipse.org/306736
+		if (bgRGB == null)
+			bgRGB= new RGB(255, 255, 255);
+		if (fgRGB == null)
+			fgRGB= new RGB(0, 0, 0);
+
+		setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, bgRGB);
+		setRGBValue(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, fgRGB);
+
+	}
+
 }
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java
index 48af275..adff97a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.core.runtime.ListenerList;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceStatus;
 
@@ -42,12 +43,14 @@ import org.eclipse.ui.texteditor.MarkerAnnotation;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaModelMarker;
 import org.eclipse.jdt.core.ISourceRange;
 import org.eclipse.jdt.core.ISourceReference;
 import org.eclipse.jdt.core.JavaModelException;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
+import org.eclipse.jdt.internal.ui.packageview.PackageExplorerProblemsDecorator;
 import org.eclipse.jdt.internal.ui.viewsupport.IProblemChangedListener;
 import org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry;
 import org.eclipse.jdt.internal.ui.viewsupport.ImageImageDescriptor;
@@ -105,6 +108,14 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
 
 	private static final int ERRORTICK_WARNING= JavaElementImageDescriptor.WARNING;
 	private static final int ERRORTICK_ERROR= JavaElementImageDescriptor.ERROR;
+	private static final int ERRORTICK_BUILDPATH_ERROR= PackageExplorerProblemsDecorator.BUILDPATH_ERROR;
+
+	/**
+	 * JRE container problem marker type (value
+	 * <code>"org.eclipse.jdt.launching.jreContainerMarker"</code>). This can be used to recognize
+	 * those markers in the workspace that flag problems in the JRE container.
+	 */
+	private static final String JRE_CONTAINER_PROBLEM_MARKER= "org.eclipse.jdt.launching.jreContainerMarker"; //$NON-NLS-1$
 
 	private ImageDescriptorRegistry fRegistry;
 	private boolean fUseNewRegistry= false;
@@ -235,6 +246,16 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
 		}
 		int severity= 0;
 		if (sourceElement == null) {
+			if (res instanceof IProject) {
+				severity= res.findMaxProblemSeverity(IJavaModelMarker.BUILDPATH_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+				if (severity == IMarker.SEVERITY_ERROR) {
+					return ERRORTICK_BUILDPATH_ERROR;
+				}
+				severity= res.findMaxProblemSeverity(JRE_CONTAINER_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+				if (severity == IMarker.SEVERITY_ERROR) {
+					return ERRORTICK_BUILDPATH_ERROR;
+				}
+			}
 			severity= res.findMaxProblemSeverity(IMarker.PROBLEM, true, depth);
 		} else {
 			IMarker[] markers= res.findMarkers(IMarker.PROBLEM, true, depth);
@@ -398,6 +419,8 @@ public class ProblemsLabelDecorator implements ILabelDecorator, ILightweightLabe
 		int adornmentFlags= computeAdornmentFlags(element);
 		if (adornmentFlags == ERRORTICK_ERROR) {
 			decoration.addOverlay(JavaPluginImages.DESC_OVR_ERROR);
+		} else if (adornmentFlags == ERRORTICK_BUILDPATH_ERROR) {
+			decoration.addOverlay(JavaPluginImages.DESC_OVR_BUILDPATH_ERROR);
 		} else if (adornmentFlags == ERRORTICK_WARNING) {
 			decoration.addOverlay(JavaPluginImages.DESC_OVR_WARNING);
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
index 89f813c..ac4d92a 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -123,23 +123,26 @@ public class AddDelegateMethodsAction extends SelectionDispatchAction {
 		}
 
 		public IStatus validate(Object[] selection) {
-			StatusInfo info= new StatusInfo();
-			int count= 0;
+			int selectedCount= 0;
+			int duplicateCount= 0;
 			if (selection != null && selection.length > 0) {
 
 				HashSet signatures= new HashSet(selection.length);
 				for (int index= 0; index < selection.length; index++) {
 					if (selection[index] instanceof DelegateEntry) {
 						DelegateEntry delegateEntry= (DelegateEntry) selection[index];
-						if (!signatures.add(getSignature(delegateEntry.delegateMethod))) {
-							return new StatusInfo(IStatus.ERROR, ActionMessages.AddDelegateMethodsAction_duplicate_methods);
-						}
-						count++;
+						if (!signatures.add(getSignature(delegateEntry.delegateMethod)))
+							duplicateCount++;
+						selectedCount++;
 					}
 				}
 			}
-			info= new StatusInfo(IStatus.INFO, Messages.format(ActionMessages.AddDelegateMethodsAction_selectioninfo_more, new Object[] { String.valueOf(count), String.valueOf(fEntries)}));
-			return info;
+			if (duplicateCount > 0) {
+				return new StatusInfo(IStatus.ERROR, duplicateCount == 1
+						? ActionMessages.AddDelegateMethodsAction_duplicate_methods_singular
+						: Messages.format(ActionMessages.AddDelegateMethodsAction_duplicate_methods_plural, String.valueOf(duplicateCount)));
+			}
+			return new StatusInfo(IStatus.INFO, Messages.format(ActionMessages.AddDelegateMethodsAction_selectioninfo_more, new Object[] { String.valueOf(selectedCount), String.valueOf(fEntries) }));
 		}
 
 		private String getSignature(IMethodBinding binding) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
index 28df023..007d385 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
@@ -355,7 +355,8 @@ public class AddGetterSetterAction extends SelectionDispatchAction {
 				map= new HashSet(selection.length);
 			}
 
-			int count= 0;
+			int selectedCount= 0;
+			int possibleDuplicateCount= 0;
 			for (int i= 0; i < selection.length; i++) {
 				try {
 					if (selection[i] instanceof GetterSetterEntry) {
@@ -363,22 +364,27 @@ public class AddGetterSetterAction extends SelectionDispatchAction {
 						IField getsetField= ((GetterSetterEntry) selection[i]).field;
 						if (((GetterSetterEntry) selection[i]).isGetter) {
 							if (!map.add(GetterSetterUtil.getGetterName(getsetField, null)))
-								return new StatusInfo(IStatus.WARNING, ActionMessages.AddGetterSetterAction_error_duplicate_methods);
+								possibleDuplicateCount++;
 						} else {
 							key= createSignatureKey(GetterSetterUtil.getSetterName(getsetField, null), getsetField);
 							if (!map.add(key))
-								return new StatusInfo(IStatus.WARNING, ActionMessages.AddGetterSetterAction_error_duplicate_methods);
+								possibleDuplicateCount++;
 						}
-						count++;
+						selectedCount++;
 					}
 				} catch (JavaModelException e) {
 				}
 			}
 
-			if (count == 0)
+			if (possibleDuplicateCount > 0) {
+				return new StatusInfo(IStatus.WARNING, possibleDuplicateCount == 1
+						? ActionMessages.AddGetterSetterAction_error_duplicate_methods_singular
+						: Messages.format(ActionMessages.AddGetterSetterAction_error_duplicate_methods_plural, String.valueOf(possibleDuplicateCount)));
+			}
+			if (selectedCount == 0)
 				return new StatusInfo(IStatus.ERROR, ""); //$NON-NLS-1$
 			String message= Messages.format(ActionMessages.AddGetterSetterAction_methods_selected,
-					new Object[] { String.valueOf(count), String.valueOf(fEntries)});
+					new Object[] { String.valueOf(selectedCount), String.valueOf(fEntries)});
 			return new StatusInfo(IStatus.INFO, message);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddJavaDocStubAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddJavaDocStubAction.java
index 9248041..3e41f81 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddJavaDocStubAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddJavaDocStubAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.OperationCanceledException;
 
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -123,7 +124,7 @@ public class AddJavaDocStubAction extends SelectionDispatchAction {
 			IEditorPart editor= JavaUI.openInEditor(cu);
 
 			if (ElementValidator.check(members, getShell(), getDialogTitle(), false))
-				run(cu, members);
+				run(members);
 			JavaModelUtil.reconcile(cu);
 			EditorUtility.revealInEditor(editor, members[0]);
 
@@ -163,7 +164,7 @@ public class AddJavaDocStubAction extends SelectionDispatchAction {
 			}
 			IMember[] members= new IMember[] { (IMember)element };
 			if (ElementValidator.checkValidateEdit(members, getShell(), getDialogTitle()))
-				run(members[0].getCompilationUnit(), members);
+				run(members);
 		} catch (CoreException e) {
 			ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.AddJavaDocStubsAction_error_actionFailed);
 		}
@@ -174,14 +175,22 @@ public class AddJavaDocStubAction extends SelectionDispatchAction {
 	/**
 	 * Note this method is for internal use only.
 	 *
-	 * @param cu the compilation unit
 	 * @param members an array of members
-	 *
-	 * @noreference This method is not intended to be referenced by clients.
 	 */
-	public void run(ICompilationUnit cu, IMember[] members) {
+	private void run(IMember[] members) {
+		AddJavaDocStubOperation op= new AddJavaDocStubOperation(members);
+		if (members.length < 11) {
+			try {
+				op.run(null);
+			} catch (CoreException e) {
+				ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.AddJavaDocStubsAction_error_actionFailed);
+			} catch (OperationCanceledException e) {
+				// operation canceled
+			}
+			return;
+		}
+
 		try {
-			AddJavaDocStubOperation op= new AddJavaDocStubOperation(members);
 			PlatformUI.getWorkbench().getProgressService().runInUI(
 				PlatformUI.getWorkbench().getProgressService(),
 				new WorkbenchRunnableAdapter(op, op.getScheduleRule()),
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddUnimplementedConstructorsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddUnimplementedConstructorsAction.java
index 68f08c6..bebac1c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddUnimplementedConstructorsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddUnimplementedConstructorsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,12 +60,12 @@ import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedConstructorsOperation;
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility2;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
 import org.eclipse.jdt.internal.corext.template.java.CodeTemplateContextType;
 import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExternalizeStringsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExternalizeStringsAction.java
index b633a55..85294e3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExternalizeStringsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ExternalizeStringsAction.java
@@ -465,7 +465,9 @@ public class ExternalizeStringsAction extends SelectionDispatchAction {
 			setAddCancelButton(false);
 			setInput(Arrays.asList(input));
 			setTitle(ActionMessages.ExternalizeStringsAction_dialog_title);
-			setMessage(Messages.format(ActionMessages.FindStringsToExternalizeAction_non_externalized, new Object[] {new Integer(count)} ));
+			String message= count == 1 ? ActionMessages.FindStringsToExternalizeAction_non_externalized_singular : Messages.format(
+					ActionMessages.FindStringsToExternalizeAction_non_externalized_plural, new Object[] { new Integer(count) });
+			setMessage(message);
 			setContentProvider(new ArrayContentProvider());
 			setLabelProvider(createLabelProvider());
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindImplementOccurrencesAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindImplementOccurrencesAction.java
index e8f1029..6eef61e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindImplementOccurrencesAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindImplementOccurrencesAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,8 +88,8 @@ public class FindImplementOccurrencesAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindMethodExitOccurrencesAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindMethodExitOccurrencesAction.java
index da802f6..20076f6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindMethodExitOccurrencesAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindMethodExitOccurrencesAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,8 +88,8 @@ public class FindMethodExitOccurrencesAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java
index 25156c8..e427aac 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindOccurrencesInFileAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -197,8 +197,8 @@ public class FindOccurrencesInFileAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
index 1716385..5fd7afb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindStringsToExternalizeAction.java
@@ -359,7 +359,9 @@ public class FindStringsToExternalizeAction extends SelectionDispatchAction {
 			setAddCancelButton(false);
 			setInput(Arrays.asList(input));
 			setTitle(ActionMessages.FindStringsToExternalizeAction_dialog_title);
-			setMessage(Messages.format(ActionMessages.FindStringsToExternalizeAction_non_externalized, new Object[] {new Integer(count)} ));
+			String message= count == 1 ? ActionMessages.FindStringsToExternalizeAction_non_externalized_singular : Messages.format(
+					ActionMessages.FindStringsToExternalizeAction_non_externalized_plural, new Object[] { new Integer(count) });
+			setMessage(message);
 			setContentProvider(new ArrayContentProvider());
 			setLabelProvider(createLabelProvider());
 		}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
index e9d068f..9be2e82 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,7 @@ import org.eclipse.jdt.internal.ui.actions.MultiSortMembersAction;
 import org.eclipse.jdt.internal.ui.javaeditor.AddImportOnSelectionAction;
 import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
 
+
 /**
  * Action group that adds the source and generate actions to a part's context
  * menu and installs handlers for the corresponding global menu actions.
@@ -363,7 +364,7 @@ public class GenerateActionGroup extends ActionGroup {
 			}
 		}
 
-		// FIXME, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213335
+		// FIXME, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=213335
 		//installQuickAccessAction();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateHashCodeEqualsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateHashCodeEqualsAction.java
index fe7c71a..37a7de3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateHashCodeEqualsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateHashCodeEqualsAction.java
@@ -34,6 +34,7 @@ import org.eclipse.jdt.core.dom.Modifier;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.codemanipulation.GenerateHashCodeEqualsOperation;
+import org.eclipse.jdt.internal.corext.dom.TypeRules;
 import org.eclipse.jdt.internal.corext.util.Messages;
 
 import org.eclipse.jdt.ui.JavaElementLabels;
@@ -124,42 +125,53 @@ public final class GenerateHashCodeEqualsAction extends GenerateMethodAbstractAc
 	}
 
 	boolean isMethodAlreadyImplemented(ITypeBinding typeBinding) {
-		HashCodeEqualsInfo info= getTypeInfo(typeBinding);
+		HashCodeEqualsInfo info= getTypeInfo(typeBinding, false);
 		return (info.foundEquals || info.foundHashCode);
 	}
 
-	private HashCodeEqualsInfo getTypeInfo(ITypeBinding someType) {
+	private HashCodeEqualsInfo getTypeInfo(ITypeBinding someType, boolean checkSuperclasses) {
 		HashCodeEqualsInfo info= new HashCodeEqualsInfo();
 		if (someType.isTypeVariable()) {
 			someType= someType.getErasure();
 		}
-
-		IMethodBinding[] declaredMethods= someType.getDeclaredMethods();
-
-		for (int i= 0; i < declaredMethods.length; i++) {
-			if (declaredMethods[i].getName().equals(METHODNAME_EQUALS)) {
-				ITypeBinding[] b= declaredMethods[i].getParameterTypes();
-				if ((b.length == 1) && (b[0].getQualifiedName().equals("java.lang.Object"))) { //$NON-NLS-1$
-					info.foundEquals= true;
+		
+		while (true) {
+			IMethodBinding[] declaredMethods= someType.getDeclaredMethods();
+	
+			for (int i= 0; i < declaredMethods.length; i++) {
+				if (declaredMethods[i].getName().equals(METHODNAME_EQUALS)) {
+					ITypeBinding[] b= declaredMethods[i].getParameterTypes();
+					if ((b.length == 1) && (b[0].getQualifiedName().equals("java.lang.Object"))) { //$NON-NLS-1$
+						info.foundEquals= true;
+						if (Modifier.isFinal(declaredMethods[i].getModifiers()))
+							info.foundFinalEquals= true;
+					}
+				}
+				if (declaredMethods[i].getName().equals(METHODNAME_HASH_CODE) && declaredMethods[i].getParameterTypes().length == 0) {
+					info.foundHashCode= true;
 					if (Modifier.isFinal(declaredMethods[i].getModifiers()))
-						info.foundFinalEquals= true;
+						info.foundFinalHashCode= true;
 				}
+				if (info.foundEquals && info.foundHashCode)
+					break;
 			}
-			if (declaredMethods[i].getName().equals(METHODNAME_HASH_CODE) && declaredMethods[i].getParameterTypes().length == 0) {
-				info.foundHashCode= true;
-				if (Modifier.isFinal(declaredMethods[i].getModifiers()))
-					info.foundFinalHashCode= true;
-			}
-			if (info.foundEquals && info.foundHashCode)
+			if (checkSuperclasses) {
+				someType= someType.getSuperclass();
+				if (someType == null || TypeRules.isJavaLangObject(someType)) {
+					break;
+				}
+			} else {
 				break;
+			}
 		}
+		
 		return info;
 	}
 
 	private RefactoringStatus checkHashCodeEqualsExists(ITypeBinding someType, boolean superClass) {
 
 		RefactoringStatus status= new RefactoringStatus();
-		HashCodeEqualsInfo info= getTypeInfo(someType);
+		HashCodeEqualsInfo info= getTypeInfo(someType, true);
 
 		String concreteTypeWarning= superClass ? ActionMessages.GenerateMethodAbstractAction_super_class : ActionMessages.GenerateHashCodeEqualsAction_field_type;
 		String concreteMethWarning= (someType.isInterface() || Modifier.isAbstract(someType.getModifiers()))
@@ -174,7 +186,7 @@ public final class GenerateHashCodeEqualsAction extends GenerateMethodAbstractAc
 		else if (!info.foundHashCode)
 			concreteHCEWarning= ActionMessages.GenerateHashCodeEqualsAction_hashCode;
 
-		if (!info.foundEquals && !info.foundHashCode)
+		if (!info.foundEquals || !info.foundHashCode)
 			status.addWarning(Messages.format(concreteMethWarning, new String[] {
 					Messages.format(concreteTypeWarning, BindingLabelProvider.getBindingLabel(someType, JavaElementLabels.ALL_FULLY_QUALIFIED)), concreteHCEWarning }),
 					createRefactoringStatusContext(someType.getJavaElement()));
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateMethodAbstractAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateMethodAbstractAction.java
index b3c8d56..89cf8de 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateMethodAbstractAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateMethodAbstractAction.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation 
  *     Mateusz Matela <mateusz.matela at gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
+ *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] toString() generator: Fields in declaration order - https://bugs.eclipse.org/bugs/show_bug.cgi?id=279924
  *******************************************************************************/
 package org.eclipse.jdt.ui.actions;
 
@@ -52,10 +53,10 @@ import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.NodeFinder;
 
 import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
 import org.eclipse.jdt.internal.corext.dom.ASTNodes;
-import org.eclipse.jdt.internal.corext.dom.NodeFinder;
 import org.eclipse.jdt.internal.corext.fix.CleanUpConstants;
 import org.eclipse.jdt.internal.corext.refactoring.base.JavaStatusContext;
 import org.eclipse.jdt.internal.corext.refactoring.util.RefactoringASTParser;
@@ -365,8 +366,9 @@ abstract class GenerateMethodAbstractAction extends SelectionDispatchAction {
 	 * Returns false, if there are no such members and the method cannot
 	 * be generated
 	 * @return true, if the method can be generated (i.e. there are appropriate member fields)
+	 * @throws JavaModelException if an error in java model occurs
 	 */
-	abstract boolean generateCandidates();
+	abstract boolean generateCandidates() throws JavaModelException;
 
 	/**
 	 * 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateToStringAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateToStringAction.java
index 8ba99aa..f08d64b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateToStringAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/GenerateToStringAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Mateusz Matela and others.
+ * Copyright (c) 2008, 2009 Mateusz Matela and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,10 +7,12 @@
  *
  * Contributors:
  *     Mateusz Matela <mateusz.matela at gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
+ *     Mateusz Matela <mateusz.matela at gmail.com> - [toString] toString() generator: Fields in declaration order - https://bugs.eclipse.org/bugs/show_bug.cgi?id=279924
  *******************************************************************************/
 package org.eclipse.jdt.ui.actions;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 
@@ -23,10 +25,13 @@ import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
 
+import org.eclipse.jdt.core.IField;
 import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
@@ -174,53 +179,83 @@ public class GenerateToStringAction extends GenerateMethodAbstractAction {
 		return settings;
 	}
 
-	boolean generateCandidates() {
+	boolean generateCandidates() throws JavaModelException {
 		IVariableBinding[] candidateFields= fTypeBinding.getDeclaredFields();
-		fFields= new ArrayList();
-		fSelectedFields= new ArrayList();
+		HashMap fieldsToBindings= new HashMap();
+		HashMap selectedFieldsToBindings= new HashMap();
 		for (int i= 0; i < candidateFields.length; i++) {
 			if (!Modifier.isStatic(candidateFields[i].getModifiers())) {
-				fFields.add(candidateFields[i]);
+				fieldsToBindings.put(candidateFields[i].getJavaElement(), candidateFields[i]);
 				if (!Modifier.isTransient(candidateFields[i].getModifiers()))
-					fSelectedFields.add(candidateFields[i]);
+					selectedFieldsToBindings.put(candidateFields[i].getJavaElement(), candidateFields[i]);
 			}
 		}
+		IType type= (IType)fTypeBinding.getJavaElement();
+		IField[] allFields= type.getFields();
+		fFields= new ArrayList();
+		populateMembers(fFields, allFields, fieldsToBindings);
+		fSelectedFields= new ArrayList();
+		populateMembers(fSelectedFields, allFields, selectedFieldsToBindings);
 
 		IMethodBinding[] candidateMethods= fTypeBinding.getDeclaredMethods();
-		fMethods= new ArrayList();
+		HashMap methodsToBindings= new HashMap();
 		for (int i= 0; i < candidateMethods.length; i++) {
 			if (!Modifier.isStatic(candidateMethods[i].getModifiers()) && candidateMethods[i].getParameterTypes().length == 0
 					&& !candidateMethods[i].getReturnType().getName().equals("void") && !candidateMethods[i].getName().equals("toString") && !candidateMethods[i].getName().equals("clone")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-				fMethods.add(candidateMethods[i]);
+				methodsToBindings.put(candidateMethods[i].getJavaElement(), candidateMethods[i]);
 			}
 		}
+		fMethods= new ArrayList();
+		populateMembers(fMethods, type.getMethods(), methodsToBindings);
 
 		fInheritedFields= new ArrayList();
 		fInheritedMethods= new ArrayList();
 		ITypeBinding typeBinding= fTypeBinding;
 		while ((typeBinding= typeBinding.getSuperclass()) != null) {
+			type = (IType)typeBinding.getJavaElement();
 			candidateFields= typeBinding.getDeclaredFields();
 			for (int i= 0; i < candidateFields.length; i++) {
 				if (!Modifier.isPrivate(candidateFields[i].getModifiers()) && !Modifier.isStatic(candidateFields[i].getModifiers()) && !contains(fFields, candidateFields[i])
 						&& !contains(fInheritedFields, candidateFields[i])) {
-					fInheritedFields.add(candidateFields[i]);
+					fieldsToBindings.put(candidateFields[i].getJavaElement(), candidateFields[i]);
 				}
 			}
+			populateMembers(fInheritedFields, type.getFields(), fieldsToBindings);
+			
 			candidateMethods= typeBinding.getDeclaredMethods();
 			for (int i= 0; i < candidateMethods.length; i++) {
 				if (!Modifier.isPrivate(candidateMethods[i].getModifiers())
 						&& !Modifier.isStatic(candidateMethods[i].getModifiers())
 						&& candidateMethods[i].getParameterTypes().length == 0
 						&& !candidateMethods[i].getReturnType().getName().equals("void") && !contains(fMethods, candidateMethods[i]) && !contains(fInheritedMethods, candidateMethods[i]) && !candidateMethods[i].getName().equals("clone")) { //$NON-NLS-1$ //$NON-NLS-2$
-					fInheritedMethods.add(candidateMethods[i]);
+					methodsToBindings.put(candidateMethods[i].getJavaElement(), candidateMethods[i]);
 				}
 			}
+			populateMembers(fInheritedMethods, type.getMethods(), methodsToBindings);
 		}
 		
 		return true;
 	}
 
-	private boolean contains(List inheritedFields, Object member) {
+	/**
+	 * Populates <code>result</code> with the bindings from <code>membersToBindings</code>, sorted
+	 * in the order of <code>allMembers</code>.
+	 * 
+	 * @param result list of bindings from membersToBindings, sorted in source order
+	 * @param allMembers all member elements in source order
+	 * @param membersToBindings map from {@link IMember} to {@link IBinding}
+	 * @since 3.6
+	 */
+	private static void populateMembers(List result, IMember[] allMembers, HashMap membersToBindings) {
+		for (int i= 0; i < allMembers.length; i++) {
+			Object memberBinding= membersToBindings.remove(allMembers[i]);
+			if (memberBinding != null) {
+				result.add(memberBinding);
+			}
+		}
+	}
+
+	private static boolean contains(List inheritedFields, Object member) {
 		for (Iterator iterator= inheritedFields.iterator(); iterator.hasNext();) {
 			Object object= iterator.next();
 			if (object instanceof IVariableBinding && member instanceof IVariableBinding)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
index 624babb..c945029 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IJavaEditorActionDefinitionIds.java
@@ -481,18 +481,33 @@ public interface IJavaEditorActionDefinitionIds extends ITextEditorActionDefinit
 	public static final String OPEN_EDITOR= "org.eclipse.jdt.ui.edit.text.java.open.editor"; //$NON-NLS-1$
 
 	/**
+	 * Action definition ID of the navigate -> open implementation action
+	 * (value <code>"org.eclipse.jdt.ui.edit.text.java.open.implementation"</code>).
+	 * @since 3.6
+	 */
+	public static final String OPEN_IMPLEMENTATION= "org.eclipse.jdt.ui.edit.text.java.open.implementation"; //$NON-NLS-1$
+	
+	/**
 	 * Action definition ID of the navigate -> open super implementation action
 	 * (value <code>"org.eclipse.jdt.ui.edit.text.java.open.super.implementation"</code>).
 	 */
 	public static final String OPEN_SUPER_IMPLEMENTATION= "org.eclipse.jdt.ui.edit.text.java.open.super.implementation"; //$NON-NLS-1$
 
 	/**
-	 * Action definition ID of the navigate -> open external javadoc action
-	 * (value <code>"org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"</code>).
+	 * Action definition ID of the navigate -> open external javadoc action (value
+	 * <code>"org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"</code>).
+	 * @deprecated As of 3.6, replaced by {@link #OPEN_ATTACHED_JAVADOC}
 	 */
 	public static final String OPEN_EXTERNAL_JAVADOC= "org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"; //$NON-NLS-1$
 
 	/**
+	 * Action definition ID of the navigate -> open attached javadoc action (value
+	 * <code>"org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"</code>).
+	 * @since 3.6
+	 */
+	public static final String OPEN_ATTACHED_JAVADOC= "org.eclipse.jdt.ui.edit.text.java.open.external.javadoc"; //$NON-NLS-1$
+
+	/**
 	 * Action definition ID of the navigate -> open type hierarchy action
 	 * (value <code>"org.eclipse.jdt.ui.edit.text.java.org.eclipse.jdt.ui.edit.text.java.open.type.hierarchy"</code>).
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InferTypeArgumentsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InferTypeArgumentsAction.java
index 3b63cc9..05508fc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InferTypeArgumentsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InferTypeArgumentsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -83,8 +83,8 @@ public class InferTypeArgumentsAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineAction.java
index 0cb6678..fe5f4e8 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -104,7 +104,7 @@ public class InlineAction extends SelectionDispatchAction {
 		if (!ActionUtil.isEditable(fEditor))
 			return;
 
-		ITypeRoot typeRoot= SelectionConverter.getInputAsTypeRoot(fEditor);
+		ITypeRoot typeRoot= SelectionConverter.getInput(fEditor);
 		if (typeRoot == null)
 			return;
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineTempAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineTempAction.java
index 460ee09..d5454dc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineTempAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/InlineTempAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,8 +79,8 @@ public class InlineTempAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceFactoryAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceFactoryAction.java
index 5299946..91315b9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceFactoryAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceFactoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -121,8 +121,8 @@ public class IntroduceFactoryAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceIndirectionAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceIndirectionAction.java
index 6e0bbef..82a1545 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceIndirectionAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceIndirectionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -103,8 +103,8 @@ public class IntroduceIndirectionAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java
index 10d8c82..862a80c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/IntroduceParameterAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,8 +63,8 @@ public class IntroduceParameterAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/JdtActionConstants.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/JdtActionConstants.java
index f031390..0b35a33 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/JdtActionConstants.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/JdtActionConstants.java
@@ -48,6 +48,13 @@ public class JdtActionConstants {
 	public static final String OPEN= "org.eclipse.jdt.ui.actions.Open"; //$NON-NLS-1$
 
 	/**
+	 * Navigate menu: name of standard Open Implementation global action
+	 * (value <code>"org.eclipse.jdt.ui.actions.OpenImplementation"</code>).
+	 * @since 3.6
+	 */
+	public static final String OPEN_IMPLEMENTATION= "org.eclipse.jdt.ui.actions.OpenImplementation"; //$NON-NLS-1$
+
+	/**
 	 * Navigate menu: name of standard Open Super Implementation global action
 	 * (value <code>"org.eclipse.jdt.ui.actions.OpenSuperImplementation"</code>).
 	 */
@@ -67,12 +74,20 @@ public class JdtActionConstants {
     public static final String OPEN_CALL_HIERARCHY= "org.eclipse.jdt.ui.actions.OpenCallHierarchy"; //$NON-NLS-1$
 
 	/**
-	 * Navigate menu: name of standard Open External Javadoc global action
-	 * (value <code>"org.eclipse.jdt.ui.actions.OpenExternalJavaDoc"</code>).
+	 * Navigate menu: name of standard Open External Javadoc global action (value
+	 * <code>"org.eclipse.jdt.ui.actions.OpenExternalJavaDoc"</code>).
+	 * @deprecated As of 3.6, replaced by {@link #OPEN_ATTACHED_JAVA_DOC}
 	 */
 	public static final String OPEN_EXTERNAL_JAVA_DOC= "org.eclipse.jdt.ui.actions.OpenExternalJavaDoc"; //$NON-NLS-1$
 
 	/**
+	 * Navigate menu: name of standard Open Attached Javadoc global action (value
+	 * <code>"org.eclipse.jdt.ui.actions.OpenExternalJavaDoc"</code>).
+	 * @since 3.6
+	 */
+	public static final String OPEN_ATTACHED_JAVA_DOC= "org.eclipse.jdt.ui.actions.OpenExternalJavaDoc"; //$NON-NLS-1$
+
+	/**
 	 * Navigate menu: name of standard Show in Packages View global action
 	 * (value <code>"org.eclipse.jdt.ui.actions.ShowInPackagesView"</code>).
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ModifyParametersAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ModifyParametersAction.java
index 879b06b..52d9204 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ModifyParametersAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ModifyParametersAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -102,8 +102,8 @@ public class ModifyParametersAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAttachedJavadocAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAttachedJavadocAction.java
new file mode 100644
index 0000000..852fc8f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenAttachedJavadocAction.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.ui.actions;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.CoreException;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.text.ITextSelection;
+
+import org.eclipse.ui.IWorkbenchSite;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+
+import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
+import org.eclipse.jdt.internal.corext.util.Messages;
+
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.jdt.ui.JavaUI;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.actions.ActionMessages;
+import org.eclipse.jdt.internal.ui.actions.ActionUtil;
+import org.eclipse.jdt.internal.ui.actions.OpenBrowserUtil;
+import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+
+/**
+ * This action opens the selected element's Javadoc in a browser as defined by the preferences.
+ * <p>
+ * The action is applicable to selections containing elements of type <code>IJavaElement</code>.
+ * 
+ * @since 3.6
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class OpenAttachedJavadocAction extends SelectionDispatchAction {
+
+	private JavaEditor fEditor;
+
+	private Shell fShell;
+
+	/**
+	 * Creates a new <code>OpenAttachedJavadocAction</code>. The action requires that the selection
+	 * provided by the site's selection provider is of type <code>
+	 * org.eclipse.jface.viewers.IStructuredSelection</code>
+	 * .
+	 * 
+	 * @param site the site providing additional context information for this action
+	 */
+	public OpenAttachedJavadocAction(IWorkbenchSite site) {
+		super(site);
+		setText(ActionMessages.OpenAttachedJavadocAction_label);
+		setDescription(ActionMessages.OpenAttachedJavadocAction_description);
+		setToolTipText(ActionMessages.OpenAttachedJavadocAction_tooltip);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_ATTACHED_JAVADOC_ACTION);
+	}
+
+
+	/**
+	 * Note: This constructor is for internal use only. Clients should not call this constructor.
+	 * 
+	 * @param editor the Java editor
+	 * @noreference This constructor is not intended to be referenced by clients.
+	 */
+	public OpenAttachedJavadocAction(JavaEditor editor) {
+		this(editor.getEditorSite());
+		fEditor= editor;
+		setEnabled(SelectionConverter.canOperateOn(fEditor));
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on SelectionDispatchAction.
+	 */
+	public void selectionChanged(ITextSelection selection) {
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on SelectionDispatchAction.
+	 */
+	public void selectionChanged(IStructuredSelection selection) {
+		setEnabled(canEnableFor(selection));
+	}
+
+	/**
+	 * Tells whether this action can be enabled for the given selection.
+	 * 
+	 * @param selection the structured selection.
+	 * @return <code>true</code> if the action can be enabled, <code>false</code> otherwise
+	 */
+	protected boolean canEnableFor(IStructuredSelection selection) {
+		if (selection.size() != 1)
+			return false;
+		return selection.getFirstElement() instanceof IJavaElement;
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on SelectionDispatchAction.
+	 */
+	public void run(ITextSelection selection) {
+		IJavaElement element= SelectionConverter.getInput(fEditor);
+		if (!ActionUtil.isProcessable(getShell(), element))
+			return;
+
+		try {
+			IJavaElement[] elements= SelectionConverter.codeResolveOrInputForked(fEditor);
+			if (elements == null || elements.length == 0)
+				return;
+			IJavaElement candidate= elements[0];
+			if (elements.length > 1) {
+				candidate= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.OpenAttachedJavadocAction_select_element);
+			}
+			if (candidate != null) {
+				run(candidate);
+			}
+		} catch (InvocationTargetException e) {
+			ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenAttachedJavadocAction_code_resolve_failed);
+		} catch (InterruptedException e) {
+			// cancelled
+		}
+	}
+
+	/* (non-Javadoc)
+	 * Method declared on SelectionDispatchAction.
+	 */
+	public void run(IStructuredSelection selection) {
+		if (!canEnableFor(selection))
+			return;
+		IJavaElement element= (IJavaElement)selection.getFirstElement();
+		if (!ActionUtil.isProcessable(getShell(), element))
+			return;
+		run(element);
+	}
+
+	/**
+	 * Executes this actions with the given Java element.
+	 * 
+	 * @param element the Java element
+	 */
+	protected void run(IJavaElement element) {
+		if (element == null)
+			return;
+		Shell shell= getShell();
+		try {
+			String labelName= JavaElementLabels.getElementLabel(element, JavaElementLabels.ALL_DEFAULT);
+
+			URL baseURL= JavaUI.getJavadocBaseLocation(element);
+			if (baseURL == null) {
+				IPackageFragmentRoot root= JavaModelUtil.getPackageFragmentRoot(element);
+				if (root != null && root.getKind() == IPackageFragmentRoot.K_BINARY) {
+					String message= ActionMessages.OpenAttachedJavadocAction_libraries_no_location;
+					showMessage(shell, Messages.format(message, new String[] { labelName, JavaElementLabels.getElementLabel(root, JavaElementLabels.ALL_DEFAULT) }), false);
+				} else {
+					IJavaElement annotatedElement= element.getJavaProject();
+					String message= ActionMessages.OpenAttachedJavadocAction_source_no_location;
+					showMessage(shell, Messages.format(message, new String[] { labelName, JavaElementLabels.getElementLabel(annotatedElement, JavaElementLabels.ALL_DEFAULT) }), false);
+				}
+				return;
+			}
+			URL url= JavaUI.getJavadocLocation(element, true);
+			if (url != null)
+				open(url);
+		} catch (CoreException e) {
+			JavaPlugin.log(e);
+			showMessage(shell, ActionMessages.OpenAttachedJavadocAction_opening_failed, true);
+		}
+	}
+
+	/**
+	 * Opens the given URL in the browser.
+	 * 
+	 * @param url the URL
+	 */
+	protected void open(URL url) {
+		if (forceExternalBrowser())
+			OpenBrowserUtil.openExternal(url, getShell().getDisplay());
+		else
+			OpenBrowserUtil.open(url, getShell().getDisplay());
+	}
+
+	/**
+	 * Tells whether to use an external browser or the one chosen by the preferences.
+	 * 
+	 * @return <code>true</code> if it should always use the external browser, <code>false</code> to
+	 *         use the browser chosen in the preferences
+	 * @since 3.6
+	 */
+	boolean forceExternalBrowser() {
+		return false;
+	}
+
+	private static void showMessage(final Shell shell, final String message, final boolean isError) {
+		Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				if (isError) {
+					MessageDialog.openError(shell, getTitle(), message);
+				} else {
+					MessageDialog.openInformation(shell, getTitle(), message);
+				}
+			}
+		});
+	}
+
+	private static String getTitle() {
+		return ActionMessages.OpenAttachedJavadocAction_dialog_title;
+	}
+
+	/**
+	 * Note: this method is for internal use only. Clients should not call this method.
+	 *
+	 * @return the dialog default title
+	 *
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected String getDialogTitle() {
+		return getTitle();
+	}
+
+	/**
+	 * Returns the shell provided by the site owning this action.
+	 * 
+	 * @return the site's shell
+	 */
+	public Shell getShell() {
+		if (fShell != null)
+			return fShell;
+		return super.getShell();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenExternalJavadocAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenExternalJavadocAction.java
index 238d99a..b3f859c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenExternalJavadocAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenExternalJavadocAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,65 +10,36 @@
  *******************************************************************************/
 package org.eclipse.jdt.ui.actions;
 
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.core.runtime.CoreException;
-
-import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-import org.eclipse.jface.text.ITextSelection;
 
 import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-
-import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
-import org.eclipse.jdt.internal.corext.util.Messages;
 
-import org.eclipse.jdt.ui.JavaElementLabels;
-import org.eclipse.jdt.ui.JavaUI;
-
-import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.actions.ActionMessages;
-import org.eclipse.jdt.internal.ui.actions.ActionUtil;
-import org.eclipse.jdt.internal.ui.actions.OpenBrowserUtil;
-import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
-import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+
 
 /**
- * This action opens the selected element's Javadoc in an external
- * browser.
+ * This action opens the selected element's Javadoc in an external browser.
  * <p>
- * The action is applicable to selections containing elements of
- * type <code>IJavaElement</code>.
- *
+ * The action is applicable to selections containing elements of type <code>IJavaElement</code>.
+ * 
  * <p>
  * This class may be instantiated; it is not intended to be subclassed.
  * </p>
- *
+ * 
  * @since 2.0
- *
  * @noextend This class is not intended to be subclassed by clients.
+ * @deprecated As of 3.6, replaced by {@link OpenAttachedJavadocAction}
  */
-public class OpenExternalJavadocAction extends SelectionDispatchAction {
-
-	private JavaEditor fEditor;
+public class OpenExternalJavadocAction extends OpenAttachedJavadocAction {
 
 	/**
-	 * Creates a new <code>OpenExternalJavadocAction</code>. The action requires
-	 * that the selection provided by the site's selection provider is of type <code>
-	 * org.eclipse.jface.viewers.IStructuredSelection</code>.
-	 *
+	 * Creates a new <code>OpenExternalJavadocAction</code>. The action requires that the selection
+	 * provided by the site's selection provider is of type <code>
+	 * org.eclipse.jface.viewers.IStructuredSelection</code>
+	 * 
 	 * @param site the site providing additional context information for this action
 	 */
 	public OpenExternalJavadocAction(IWorkbenchSite site) {
@@ -76,96 +47,37 @@ public class OpenExternalJavadocAction extends SelectionDispatchAction {
 		setText(ActionMessages.OpenExternalJavadocAction_label);
 		setDescription(ActionMessages.OpenExternalJavadocAction_description);
 		setToolTipText(ActionMessages.OpenExternalJavadocAction_tooltip);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_EXTERNAL_JAVADOC_ACTION);
 	}
 
 	/**
-	 * Creates a new <code>OpenExternalJavadocAction</code>. The action requires
-	 * that the selection provided by the given selection provider is of type <code>
-	 * org.eclipse.jface.viewers.IStructuredSelection</code>.
-	 *
+	 * Creates a new <code>OpenExternalJavadocAction</code>. The action requires that the selection
+	 * provided by the given selection provider is of type <code>
+	 * org.eclipse.jface.viewers.IStructuredSelection</code>
+	 * .
+	 * 
 	 * @param site the site providing additional context information for this action
-	 * @param provider a special selection provider which is used instead
-	 *  of the site's selection provider or <code>null</code> to use the site's
-	 *  selection provider
-	 *
+	 * @param provider a special selection provider which is used instead of the site's selection
+	 *            provider or <code>null</code> to use the site's selection provider
+	 * 
 	 * @since 3.2
-	 * @deprecated Use {@link #setSpecialSelectionProvider(ISelectionProvider)} instead. This API will be
-	 * removed after 3.2 M5.
-     */
+	 * @deprecated Use {@link #setSpecialSelectionProvider(ISelectionProvider)} instead.
+	 */
     public OpenExternalJavadocAction(IWorkbenchSite site, ISelectionProvider provider) {
         this(site);
         setSpecialSelectionProvider(provider);
     }
 
-
 	/**
 	 * Note: This constructor is for internal use only. Clients should not call this constructor.
+	 * 
 	 * @param editor the Java editor
-	 *
 	 * @noreference This constructor is not intended to be referenced by clients.
 	 */
 	public OpenExternalJavadocAction(JavaEditor editor) {
-		this(editor.getEditorSite());
-		fEditor= editor;
-		setEnabled(SelectionConverter.canOperateOn(fEditor));
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on SelectionDispatchAction.
-	 */
-	public void selectionChanged(ITextSelection selection) {
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on SelectionDispatchAction.
-	 */
-	public void selectionChanged(IStructuredSelection selection) {
-		setEnabled(checkEnabled(selection));
-	}
-
-	private boolean checkEnabled(IStructuredSelection selection) {
-		if (selection.size() != 1)
-			return false;
-		return selection.getFirstElement() instanceof IJavaElement;
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on SelectionDispatchAction.
-	 */
-	public void run(ITextSelection selection) {
-		IJavaElement element= SelectionConverter.getInput(fEditor);
-		if (!ActionUtil.isProcessable(getShell(), element))
-			return;
-
-		try {
-			IJavaElement[] elements= SelectionConverter.codeResolveOrInputForked(fEditor);
-			if (elements == null || elements.length == 0)
-				return;
-			IJavaElement candidate= elements[0];
-			if (elements.length > 1) {
-				candidate= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.OpenExternalJavadocAction_select_element);
-			}
-			if (candidate != null) {
-				run(candidate);
-			}
-		} catch (InvocationTargetException e) {
-			ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenExternalJavadocAction_code_resolve_failed);
-		} catch (InterruptedException e) {
-			// cancelled
-		}
-	}
-
-	/* (non-Javadoc)
-	 * Method declared on SelectionDispatchAction.
-	 */
-	public void run(IStructuredSelection selection) {
-		if (!checkEnabled(selection))
-			return;
-		IJavaElement element= (IJavaElement)selection.getFirstElement();
-		if (!ActionUtil.isProcessable(getShell(), element))
-			return;
-		run(element);
+		super(editor);
+		setText(ActionMessages.OpenExternalJavadocAction_label);
+		setDescription(ActionMessages.OpenExternalJavadocAction_description);
+		setToolTipText(ActionMessages.OpenExternalJavadocAction_tooltip);
 	}
 
 	/*
@@ -173,59 +85,13 @@ public class OpenExternalJavadocAction extends SelectionDispatchAction {
 	 * since the beginning
 	 */
 	public void run(IJavaElement element) {
-		if (element == null)
-			return;
-		Shell shell= getShell();
-		try {
-			String labelName= JavaElementLabels.getElementLabel(element, JavaElementLabels.ALL_DEFAULT);
-
-			URL baseURL= JavaUI.getJavadocBaseLocation(element);
-			if (baseURL == null) {
-				IPackageFragmentRoot root= JavaModelUtil.getPackageFragmentRoot(element);
-				if (root != null && root.getKind() == IPackageFragmentRoot.K_BINARY) {
-					String message= ActionMessages.OpenExternalJavadocAction_libraries_no_location;
-					showMessage(shell, Messages.format(message, new String[] { labelName, JavaElementLabels.getElementLabel(root, JavaElementLabels.ALL_DEFAULT) }), false);
-				} else {
-					IJavaElement annotatedElement= element.getJavaProject();
-					String message= ActionMessages.OpenExternalJavadocAction_source_no_location;
-					showMessage(shell, Messages.format(message, new String[] { labelName, JavaElementLabels.getElementLabel(annotatedElement, JavaElementLabels.ALL_DEFAULT) }), false);
-				}
-				return;
-			}
-			URL url= JavaUI.getJavadocLocation(element, true);
-			if (url != null) {
-				OpenBrowserUtil.open(url, shell.getDisplay(), getTitle());
-			}
-		} catch (CoreException e) {
-			JavaPlugin.log(e);
-			showMessage(shell, ActionMessages.OpenExternalJavadocAction_opening_failed, true);
-		}
-	}
-
-	private static void showMessage(final Shell shell, final String message, final boolean isError) {
-		Display.getDefault().asyncExec(new Runnable() {
-			public void run() {
-				if (isError) {
-					MessageDialog.openError(shell, getTitle(), message);
-				} else {
-					MessageDialog.openInformation(shell, getTitle(), message);
-				}
-			}
-		});
+		super.run(element);
 	}
 
-	private static String getTitle() {
-		return ActionMessages.OpenExternalJavadocAction_dialog_title;
-	}
-
-	/**
-	 * Note: this method is for internal use only. Clients should not call this method.
-	 *
-	 * @return the dialog default title
-	 *
-	 * @noreference This method is not intended to be referenced by clients.
+	/*
+	 * @see org.eclipse.jdt.ui.actions.OpenAttachedJavadocAction#forceExternalBrowser()
 	 */
-	protected String getDialogTitle() {
-		return getTitle();
+	boolean forceExternalBrowser() {
+		return true;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenImplementationAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenImplementationAction.java
new file mode 100644
index 0000000..4211eba
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenImplementationAction.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.ui.actions;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextSelection;
+import org.eclipse.jface.text.Region;
+
+import org.eclipse.ui.IWorkbenchSite;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
+
+import org.eclipse.jdt.internal.corext.util.JdtFlags;
+
+import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
+import org.eclipse.jdt.internal.ui.actions.ActionMessages;
+import org.eclipse.jdt.internal.ui.actions.ActionUtil;
+import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaElementImplementationHyperlink;
+import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
+
+
+/**
+ * The action allows to open the implementation for a method in its hierarchy.
+ * <p>
+ * The action is applicable to selections containing elements of type <code>
+ * IMethod</code>.
+ * </p>
+ * 
+ * @since 3.6
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class OpenImplementationAction extends SelectionDispatchAction {
+
+	/**
+	 * The Java editor.
+	 */
+	private JavaEditor fEditor;
+
+
+	/**
+	 * Creates an <code>OpenImplementationAction</code>.
+	 * 
+	 * @param site the workbench site
+	 */
+	protected OpenImplementationAction(IWorkbenchSite site) {
+		super(site);
+		setText(ActionMessages.OpenImplementationAction_label);
+		setDescription(ActionMessages.OpenImplementationAction_description);
+		setToolTipText(ActionMessages.OpenImplementationAction_tooltip);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_IMPLEMENTATION_ACTION);
+	}
+
+	/**
+	 * Creates an <code>OpenImplementationAction</code>. Note: This constructor is for internal use
+	 * only. Clients should not call this constructor.
+	 * 
+	 * @param editor the editor
+	 * @noreference This constructor is not intended to be referenced by clients.
+	 */
+	public OpenImplementationAction(JavaEditor editor) {
+		this(editor.getEditorSite());
+		fEditor= editor;
+		setEnabled(SelectionConverter.canOperateOn(fEditor) && fEditor.getSelectionProvider().getSelection() instanceof ITextSelection);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(org.eclipse.jface.text.ITextSelection)
+	 */
+	public void selectionChanged(ITextSelection selection) {
+	}
+
+	/*
+	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public void selectionChanged(IStructuredSelection selection) {
+		setEnabled(false);
+	}
+
+	/*
+	 * @see org.eclipse.jdt.ui.actions.SelectionDispatchAction#run(org.eclipse.jface.text.ITextSelection)
+	 */
+	public void run(ITextSelection selection) {
+		if (!ActionUtil.isProcessable(fEditor))
+			return;
+		IJavaElement element= null;
+		try {
+			IJavaElement[] elements= SelectionConverter.codeResolveForked(fEditor, true);
+			if (elements.length == 1)
+				element= elements[0];
+		} catch (InvocationTargetException e) {
+			ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message);
+			return;
+		} catch (InterruptedException e) {
+			return;
+		}
+
+		if (element == null || !((element instanceof IMethod) && canBeOverriddenMethod((IMethod)element))) {
+			MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OpenImplementationAction_not_applicable);
+			return;
+		}
+		if (!ActionUtil.isProcessable(getShell(), element))
+			return;
+		SelectionDispatchAction openAction= (SelectionDispatchAction)fEditor.getAction("OpenEditor"); //$NON-NLS-1$
+		if (openAction == null)
+			return;
+
+		IRegion region= new Region(selection.getOffset(), 0);
+		JavaElementImplementationHyperlink.openImplementations(fEditor, region, (IMethod)element, openAction);
+
+	}
+
+	/**
+	 * Returns the dialog title.
+	 * 
+	 * @return the dialog title
+	 */
+	private String getDialogTitle() {
+		return ActionMessages.OpenImplementationAction_error_title;
+	}
+
+	/**
+	 * Checks whether a method can be overridden.
+	 * 
+	 * @param method the method
+	 * @return <code>true</code> if the method can be overridden, <code>false</code> otherwise
+	 */
+	private boolean canBeOverriddenMethod(IMethod method) {
+		try {
+			return !(JdtFlags.isPrivate(method) || JdtFlags.isFinal(method) || JdtFlags.isStatic(method) ||
+					method.isConstructor() || JdtFlags.isFinal((IMember)method.getParent()));
+		} catch (JavaModelException e) {
+			JavaPlugin.log(e);
+			return false;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
index d0c203f..2ff2ce2 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenSuperImplementationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,7 +53,6 @@ import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
  * </p>
  *
  * @since 2.0
- *
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class OpenSuperImplementationAction extends SelectionDispatchAction {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenTypeHierarchyAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenTypeHierarchyAction.java
index 446a5b1..3cfc86f 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenTypeHierarchyAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenTypeHierarchyAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -234,7 +234,7 @@ public class OpenTypeHierarchyAction extends SelectionDispatchAction {
 	}
 
 	private static IStatus compileCandidates(List result, IJavaElement elem) {
-		IStatus ok= new Status(IStatus.OK, JavaPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+		IStatus ok= Status.OK_STATUS;
 		try {
 			switch (elem.getElementType()) {
 				case IJavaElement.INITIALIZER:
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
index 7a07a94..8753efc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OpenViewActionGroup.java
@@ -57,7 +57,9 @@ public class OpenViewActionGroup extends ActionGroup {
 	private ISelectionProvider fSelectionProvider;
 
 	private OpenSuperImplementationAction fOpenSuperImplementation;
-	private OpenExternalJavadocAction fOpenExternalJavadoc;
+	private OpenImplementationAction fOpenImplementation;
+
+	private OpenAttachedJavadocAction fOpenAttachedJavadoc;
 	private OpenTypeHierarchyAction fOpenTypeHierarchy;
     private OpenCallHierarchyAction fOpenCallHierarchy;
 	private PropertyDialogAction fOpenPropertiesDialog;
@@ -145,22 +147,26 @@ public class OpenViewActionGroup extends ActionGroup {
 	public OpenViewActionGroup(JavaEditor part) {
 		fEditorIsOwner= true;
 		fShowShowInMenu= false;
+		
+		fOpenImplementation= new OpenImplementationAction(part);
+		fOpenImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_IMPLEMENTATION);
+		part.setAction("OpenImplementation", fOpenImplementation); //$NON-NLS-1$
 
 		fOpenSuperImplementation= new OpenSuperImplementationAction(part);
 		fOpenSuperImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_SUPER_IMPLEMENTATION);
 		part.setAction("OpenSuperImplementation", fOpenSuperImplementation); //$NON-NLS-1$
 
-		fOpenExternalJavadoc= new OpenExternalJavadocAction(part);
-		fOpenExternalJavadoc.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EXTERNAL_JAVADOC);
-		part.setAction("OpenExternalJavadoc", fOpenExternalJavadoc); //$NON-NLS-1$
+		fOpenAttachedJavadoc= new OpenAttachedJavadocAction(part);
+		fOpenAttachedJavadoc.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_ATTACHED_JAVADOC);
+		part.setAction("OpenAttachedJavadoc", fOpenAttachedJavadoc); //$NON-NLS-1$
 
 		fOpenTypeHierarchy= new OpenTypeHierarchyAction(part);
 		fOpenTypeHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_TYPE_HIERARCHY);
 		part.setAction("OpenTypeHierarchy", fOpenTypeHierarchy); //$NON-NLS-1$
 
-        fOpenCallHierarchy= new OpenCallHierarchyAction(part);
-        fOpenCallHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
-        part.setAction("OpenCallHierarchy", fOpenCallHierarchy); //$NON-NLS-1$
+		fOpenCallHierarchy= new OpenCallHierarchyAction(part);
+		fOpenCallHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
+		part.setAction("OpenCallHierarchy", fOpenCallHierarchy); //$NON-NLS-1$
 
 		initialize(part.getEditorSite().getSelectionProvider());
 	}
@@ -188,37 +194,42 @@ public class OpenViewActionGroup extends ActionGroup {
 	}
 
 	private void createSiteActions(IWorkbenchSite site, ISelectionProvider specialProvider) {
+		fOpenImplementation= new OpenImplementationAction(site);
+		fOpenImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_IMPLEMENTATION);
+		fOpenImplementation.setSpecialSelectionProvider(specialProvider);
+		
 		fOpenSuperImplementation= new OpenSuperImplementationAction(site);
 		fOpenSuperImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_SUPER_IMPLEMENTATION);
 		fOpenSuperImplementation.setSpecialSelectionProvider(specialProvider);
 
-		fOpenExternalJavadoc= new OpenExternalJavadocAction(site);
-		fOpenExternalJavadoc.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EXTERNAL_JAVADOC);
-		fOpenExternalJavadoc.setSpecialSelectionProvider(specialProvider);
+		fOpenAttachedJavadoc= new OpenAttachedJavadocAction(site);
+		fOpenAttachedJavadoc.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_ATTACHED_JAVADOC);
+		fOpenAttachedJavadoc.setSpecialSelectionProvider(specialProvider);
 
 		fOpenTypeHierarchy= new OpenTypeHierarchyAction(site);
 		fOpenTypeHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_TYPE_HIERARCHY);
 		fOpenTypeHierarchy.setSpecialSelectionProvider(specialProvider);
 
 		fOpenCallHierarchy= new OpenCallHierarchyAction(site);
-        fOpenCallHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
-        fOpenCallHierarchy.setSpecialSelectionProvider(specialProvider);
+		fOpenCallHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
+		fOpenCallHierarchy.setSpecialSelectionProvider(specialProvider);
 
-        ISelectionProvider provider= specialProvider != null ? specialProvider : site.getSelectionProvider();
+		ISelectionProvider provider= specialProvider != null ? specialProvider : site.getSelectionProvider();
 
-        fOpenPropertiesDialog= new PropertyDialogAction(site, provider);
-        fOpenPropertiesDialog.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);
+		fOpenPropertiesDialog= new PropertyDialogAction(site, provider);
+		fOpenPropertiesDialog.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);
 
-        initialize(provider);
+		initialize(provider);
 	}
 
 	private void initialize(ISelectionProvider provider) {
 		fSelectionProvider= provider;
 		ISelection selection= provider.getSelection();
+		fOpenImplementation.update(selection);
 		fOpenSuperImplementation.update(selection);
-		fOpenExternalJavadoc.update(selection);
+		fOpenAttachedJavadoc.update(selection);
 		fOpenTypeHierarchy.update(selection);
-        fOpenCallHierarchy.update(selection);
+		fOpenCallHierarchy.update(selection);
 		if (!fEditorIsOwner) {
 			if (fShowOpenPropertiesAction) {
 				if (selection instanceof IStructuredSelection) {
@@ -227,10 +238,11 @@ public class OpenViewActionGroup extends ActionGroup {
 					fOpenPropertiesDialog.selectionChanged(selection);
 				}
 			}
+			provider.addSelectionChangedListener(fOpenImplementation);
 			provider.addSelectionChangedListener(fOpenSuperImplementation);
-			provider.addSelectionChangedListener(fOpenExternalJavadoc);
+			provider.addSelectionChangedListener(fOpenAttachedJavadoc);
 			provider.addSelectionChangedListener(fOpenTypeHierarchy);
-            provider.addSelectionChangedListener(fOpenCallHierarchy);
+			provider.addSelectionChangedListener(fOpenCallHierarchy);
 			// no need to register the open properties dialog action since it registers itself
 		}
 	}
@@ -282,21 +294,23 @@ public class OpenViewActionGroup extends ActionGroup {
 	 * @see ActionGroup#dispose()
 	 */
 	public void dispose() {
+		fSelectionProvider.removeSelectionChangedListener(fOpenImplementation);
 		fSelectionProvider.removeSelectionChangedListener(fOpenSuperImplementation);
-		fSelectionProvider.removeSelectionChangedListener(fOpenExternalJavadoc);
+		fSelectionProvider.removeSelectionChangedListener(fOpenAttachedJavadoc);
 		fSelectionProvider.removeSelectionChangedListener(fOpenTypeHierarchy);
 		fSelectionProvider.removeSelectionChangedListener(fOpenCallHierarchy);
 		super.dispose();
 	}
 
 	private void setGlobalActionHandlers(IActionBars actionBars) {
+		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_IMPLEMENTATION, fOpenImplementation);
 		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_SUPER_IMPLEMENTATION, fOpenSuperImplementation);
-		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_EXTERNAL_JAVA_DOC, fOpenExternalJavadoc);
+		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_ATTACHED_JAVA_DOC, fOpenAttachedJavadoc);
 		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_TYPE_HIERARCHY, fOpenTypeHierarchy);
-        actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_CALL_HIERARCHY, fOpenCallHierarchy);
+		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN_CALL_HIERARCHY, fOpenCallHierarchy);
 
-        if (!fEditorIsOwner && fShowOpenPropertiesAction)
-        	actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), fOpenPropertiesDialog);
+		if (!fEditorIsOwner && fShowOpenPropertiesAction)
+			actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), fOpenPropertiesDialog);
 	}
 
 	private void appendToGroup(IMenuManager menu, IAction action) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
index e6b6008..76002b6 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -309,9 +309,17 @@ public class OrganizeImportsAction extends SelectionDispatchAction {
 	private String getOrganizeInfo(OrganizeImportsOperation op) {
 		int nImportsAdded= op.getNumberOfImportsAdded();
 		if (nImportsAdded >= 0) {
-			return Messages.format(ActionMessages.OrganizeImportsAction_summary_added, String.valueOf(nImportsAdded));
+			if (nImportsAdded == 1) {
+				return ActionMessages.OrganizeImportsAction_summary_added_singular;
+			} else {
+				return Messages.format(ActionMessages.OrganizeImportsAction_summary_added_plural, String.valueOf(nImportsAdded));
+			}
 		} else {
-			return Messages.format(ActionMessages.OrganizeImportsAction_summary_removed, String.valueOf(-nImportsAdded));
+			if (nImportsAdded == -1) {
+				return ActionMessages.OrganizeImportsAction_summary_removed_singular;
+			} else {
+				return Messages.format(ActionMessages.OrganizeImportsAction_summary_removed_plural, String.valueOf(-nImportsAdded));
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ProjectActionGroup.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ProjectActionGroup.java
index 7e7d577..b3f1e86 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ProjectActionGroup.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ProjectActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -129,7 +129,7 @@ public class ProjectActionGroup extends ActionGroup {
 		int selectionStatus= evaluateSelection(array, openProjects);
 		StructuredSelection sel= new StructuredSelection(openProjects);
 
-		fOpenAction.setEnabled((selectionStatus & CLOSED_PROJECTS_SELECTED) != 0 || (selectionStatus == 0 && hasClosedProjectsInWorkspace()));
+		fOpenAction.setEnabled(hasClosedProjectsInWorkspace());
 		fEnableOpenInContextMenu= (selectionStatus & CLOSED_PROJECTS_SELECTED) != 0
 				|| (selectionStatus == 0 && array.length == 0 && hasClosedProjectsInWorkspace());
 		fCloseAction.selectionChanged(sel);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PullUpAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PullUpAction.java
index 5fca1be..7daa1eb 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PullUpAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PullUpAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -172,8 +172,8 @@ public class PullUpAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PushDownAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PushDownAction.java
index 9466cac..236f683 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PushDownAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/PushDownAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -170,8 +170,8 @@ public class PushDownAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java
index e63f7d1..cd2b9a3 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefactorActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,7 @@ import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaTextSelection;
 import org.eclipse.jdt.internal.ui.refactoring.RefactoringMessages;
 
+
 /**
  * Action group that adds refactor actions (for example 'Rename', 'Move')
  * to a context menu and the global menu bar.
@@ -420,7 +421,7 @@ public class RefactorActionGroup extends ActionGroup {
 
 		stats.endRun();
 
-		// FIXME, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213335
+		// FIXME, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=213335
 		//installQuickAccessAction();
 
 	}
@@ -445,11 +446,11 @@ public class RefactorActionGroup extends ActionGroup {
 	 * Sets actionDefinitionId, updates enablement, adds to fActions,
 	 * and adds selection changed listener if provider is not <code>null</code>.
 	 *
-	 * @param action
+	 * @param action the action 
 	 * @param provider can be <code>null</code>
-	 * @param specialProvider a sepectil selection provider or <code>null</code>
-	 * @param selection
-	 * @param actionDefinitionId
+	 * @param specialProvider a special selection provider or <code>null</code>
+	 * @param selection the selection
+	 * @param actionDefinitionId the action definition id 
 	 */
 	private void initUpdatingAction(SelectionDispatchAction action, ISelectionProvider provider, ISelectionProvider specialProvider, ISelection selection, String actionDefinitionId) {
 		action.setActionDefinitionId(actionDefinitionId);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelfEncapsulateFieldAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelfEncapsulateFieldAction.java
index 4a6a659..0cac17b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelfEncapsulateFieldAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/SelfEncapsulateFieldAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -92,8 +92,8 @@ public class SelfEncapsulateFieldAction extends SelectionDispatchAction {
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInNavigatorViewAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInNavigatorViewAction.java
index 3c08049..d3cb823 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInNavigatorViewAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInNavigatorViewAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@ import org.eclipse.jface.viewers.StructuredSelection;
 
 import org.eclipse.jface.text.ITextSelection;
 
-import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchSite;
@@ -32,12 +31,14 @@ import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
 
 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
+import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.actions.ActionMessages;
 import org.eclipse.jdt.internal.ui.actions.ActionUtil;
 import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
 import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
 
+
 /**
  * Reveals the selected element in the resource navigator view.
  * <p>
@@ -138,7 +139,7 @@ public class ShowInNavigatorViewAction extends SelectionDispatchAction {
 			return;
 		try {
 			IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage();
-			IViewPart view= page.showView(IPageLayout.ID_RES_NAV);
+			IViewPart view= page.showView(JavaPlugin.ID_RES_NAV);
 			if (view instanceof ISetSelectionTarget) {
 				ISelection selection= new StructuredSelection(resource);
 				((ISetSelectionTarget)view).selectReveal(selection);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/UseSupertypeAction.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/UseSupertypeAction.java
index 3e5ea09..105b471 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/UseSupertypeAction.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/UseSupertypeAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -136,8 +136,8 @@ public class UseSupertypeAction extends SelectionDispatchAction{
 
 	/**
 	 * Note: This method is for internal use only. Clients should not call this method.
-	 * @param selection
-	 *
+	 * 
+	 * @param selection the Java text selection
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void selectionChanged(JavaTextSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/RenameSupport.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/RenameSupport.java
index 19f38a8..26e1a5e 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/RenameSupport.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/refactoring/RenameSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,7 +55,6 @@ import org.eclipse.jdt.internal.corext.refactoring.tagging.IReferenceUpdating;
 import org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating;
 import org.eclipse.jdt.internal.corext.util.JdtFlags;
 
-import org.eclipse.jdt.internal.ui.JavaPlugin;
 import org.eclipse.jdt.internal.ui.JavaUIMessages;
 import org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper;
 import org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter;
@@ -101,7 +100,7 @@ public class RenameSupport {
 		if (fPreCheckStatus.hasFatalError())
 			return fPreCheckStatus.getEntryMatchingSeverity(RefactoringStatus.FATAL).toStatus();
 		else
-			return new Status(IStatus.OK, JavaPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java
index d5fdf68..89e1798 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,8 +64,7 @@ import org.eclipse.jdt.core.compiler.IScanner;
 import org.eclipse.jdt.core.compiler.ITerminalSymbols;
 import org.eclipse.jdt.core.compiler.InvalidInputException;
 import org.eclipse.jdt.core.dom.CompilationUnit;
-
-import org.eclipse.jdt.internal.corext.SourceRange;
+import org.eclipse.jdt.core.SourceRange;
 
 import org.eclipse.jdt.ui.PreferenceConstants;
 
@@ -481,12 +480,13 @@ public class DefaultJavaFoldingStructureProvider implements IJavaFoldingStructur
 
 			if (captionLine < lastLine) {
 				int postOffset= document.getLineOffset(captionLine + 1);
-				IRegion postRegion= new Region(postOffset, offset + length - postOffset);
-
-				if (preRegion == null)
-					return new IRegion[] { postRegion };
-
-				return new IRegion[] { preRegion, postRegion };
+				int postLength= offset + length - postOffset;
+				if (postLength > 0) {
+					IRegion postRegion= new Region(postOffset, postLength);
+					if (preRegion == null)
+						return new IRegion[] { postRegion };
+					return new IRegion[] { preRegion, postRegion };
+				}
 			}
 
 			if (preRegion != null)
@@ -612,12 +612,13 @@ public class DefaultJavaFoldingStructureProvider implements IJavaFoldingStructur
 
 			if (captionLine < lastLine) {
 				int postOffset= document.getLineOffset(captionLine + 1);
-				IRegion postRegion= new Region(postOffset, offset + length - postOffset);
-
-				if (preRegion == null)
-					return new IRegion[] { postRegion };
-
-				return new IRegion[] { preRegion, postRegion };
+				int postLength= offset + length - postOffset;
+				if (postLength > 0) {
+					IRegion postRegion= new Region(postOffset, postLength);
+					if (preRegion == null)
+						return new IRegion[] { postRegion };
+					return new IRegion[] { preRegion, postRegion };
+				}
 			}
 
 			if (preRegion != null)
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java
index 402121f..56e02bc 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java
@@ -646,7 +646,7 @@ public class CompletionProposalCollector extends CompletionRequestor {
 				int completionEnd= proposal.getReplaceEnd();
 				int relevance= computeRelevance(proposal);
 
-				GetterSetterCompletionProposal.evaluateProposals(type, prefix, completionStart, completionEnd - completionStart, relevance + 1, fSuggestedMethodNames, fJavaProposals);
+				GetterSetterCompletionProposal.evaluateProposals(type, prefix, completionStart, completionEnd - completionStart, relevance + 2, fSuggestedMethodNames, fJavaProposals);
 				MethodDeclarationCompletionProposal.evaluateProposals(type, prefix, completionStart, completionEnd - completionStart, relevance, fSuggestedMethodNames, fJavaProposals);
 			}
 		} catch (CoreException e) {
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalLabelProvider.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalLabelProvider.java
index dd504a1..788f5d7 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,6 @@ import org.eclipse.jdt.ui.JavaElementLabels;
 import org.eclipse.jdt.internal.ui.JavaPluginImages;
 import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
 import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider;
-import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer;
 
 
 /**
@@ -69,7 +68,7 @@ public class CompletionProposalLabelProvider {
 	 * Examples:
 	 * 
 	 * <pre>
-	 *   "void method(int i, Strings)" -> "int i, String s"
+	 *   "void method(int i, String s)" -> "int i, String s"
 	 *   "? extends Number method(java.lang.String s, ? super Number n)" -> "String s, Number n"
 	 * </pre>
 	 * 
@@ -79,16 +78,20 @@ public class CompletionProposalLabelProvider {
 	 * @return the list of comma-separated parameters suitable for display
 	 */
 	public String createParameterList(CompletionProposal proposal) {
+		String paramList;
 		int kind= proposal.getKind();
 		switch (kind) {
 			case CompletionProposal.METHOD_REF:
 			case CompletionProposal.CONSTRUCTOR_INVOCATION:
-				return appendUnboundedParameterList(new StyledString(), proposal).getString();
+				paramList= appendUnboundedParameterList(new StyledString(), proposal).getString();
+				return Strings.markJavaElementLabelLTR(paramList);
 			case CompletionProposal.TYPE_REF:
-				return appendTypeParameterList(new StyledString(), proposal).getString();
+				paramList= appendTypeParameterList(new StyledString(), proposal).getString();
+				return Strings.markJavaElementLabelLTR(paramList);
 			case CompletionProposal.ANONYMOUS_CLASS_DECLARATION:
 			case CompletionProposal.ANONYMOUS_CLASS_CONSTRUCTOR_INVOCATION:
-				return appendUnboundedParameterList(new StyledString(), proposal).getString();
+				paramList= appendUnboundedParameterList(new StyledString(), proposal).getString();
+				return Strings.markJavaElementLabelLTR(paramList);
 			default:
 				Assert.isLegal(false);
 				return null; // dummy
@@ -290,7 +293,7 @@ public class CompletionProposalLabelProvider {
 
 		declaringType= Signature.getSimpleName(declaringType);
 		nameBuffer.append(declaringType, StyledString.QUALIFIER_STYLER);
-		return Strings.markLTR(nameBuffer, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(nameBuffer);
 	}
 
 	/**
@@ -323,7 +326,7 @@ public class CompletionProposalLabelProvider {
 		declaringType= Signature.getSimpleName(declaringType);
 		nameBuffer.append(declaringType, StyledString.QUALIFIER_STYLER);
 
-		return Strings.markLTR(nameBuffer, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(nameBuffer);
 	}
 
 	StyledString createOverrideMethodProposalLabel(CompletionProposal methodProposal) {
@@ -417,7 +420,7 @@ public class CompletionProposalLabelProvider {
 			buf.append(JavaElementLabels.CONCAT_STRING, StyledString.QUALIFIER_STYLER);
 			buf.append(new String(fullName, 0, qIndex - 1), StyledString.QUALIFIER_STYLER);
 		}
-		return Strings.markLTR(buf, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(buf);
 	}
 
 	StyledString createJavadocTypeProposalLabel(char[] fullName) {
@@ -432,7 +435,7 @@ public class CompletionProposalLabelProvider {
 			buf.append(JavaElementLabels.CONCAT_STRING, StyledString.QUALIFIER_STYLER);
 			buf.append(new String(fullName, 0, qIndex - 1), StyledString.QUALIFIER_STYLER);
 		}
-		return Strings.markLTR(buf, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(buf);
 	}
 
 	private int findSimpleNameStart(char[] array) {
@@ -456,7 +459,7 @@ public class CompletionProposalLabelProvider {
 			buf.append(VAR_TYPE_SEPARATOR);
 			buf.append(typeName);
 		}
-		return Strings.markLTR(buf, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(buf);
 	}
 
 	/**
@@ -493,16 +496,16 @@ public class CompletionProposalLabelProvider {
 			}
 		}
 
-		return Strings.markLTR(buf, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(buf);
 	}
 
 	StyledString createPackageProposalLabel(CompletionProposal proposal) {
 		Assert.isTrue(proposal.getKind() == CompletionProposal.PACKAGE_REF);
-		return Strings.markLTR(new StyledString(String.valueOf(proposal.getDeclarationSignature())), JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(new StyledString(String.valueOf(proposal.getDeclarationSignature())));
 	}
 
 	StyledString createSimpleLabel(CompletionProposal proposal) {
-		return Strings.markLTR(new StyledString(String.valueOf(proposal.getCompletion())), JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(new StyledString(String.valueOf(proposal.getCompletion())));
 	}
 
 	StyledString createAnonymousTypeLabel(CompletionProposal proposal) {
@@ -525,7 +528,7 @@ public class CompletionProposalLabelProvider {
 			}
 		}
 
-		return Strings.markLTR(buffer, JavaElementLabelComposer.ADDITIONAL_DELIMITERS);
+		return Strings.markJavaElementLabelLTR(buffer);
 	}
 
 	/**
@@ -697,7 +700,19 @@ public class CompletionProposalLabelProvider {
 		int flags= proposal.getFlags();
 		int kind= proposal.getKind();
 
-		if (Flags.isDeprecated(flags))
+		boolean deprecated= Flags.isDeprecated(flags);
+		if (!deprecated) {
+			CompletionProposal[] requiredProposals= proposal.getRequiredProposals();
+			if (requiredProposals != null) {
+				for (int i= 0; i < requiredProposals.length; i++) {
+					CompletionProposal requiredProposal= requiredProposals[i];
+					if (requiredProposal.getKind() == CompletionProposal.TYPE_REF) {
+						deprecated |= Flags.isDeprecated(requiredProposal.getFlags());
+					}
+				}
+			}
+		}
+		if (deprecated)
 			adornments |= JavaElementImageDescriptor.DEPRECATED;
 
 		if (kind == CompletionProposal.FIELD_REF || kind == CompletionProposal.METHOD_DECLARATION || kind == CompletionProposal.METHOD_DECLARATION || kind == CompletionProposal.METHOD_NAME_REFERENCE
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/JavaContentAssistInvocationContext.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/JavaContentAssistInvocationContext.java
index b940554..99835fa 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/JavaContentAssistInvocationContext.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/JavaContentAssistInvocationContext.java
@@ -147,13 +147,18 @@ public class JavaContentAssistInvocationContext extends ContentAssistInvocationC
 	 * @return the core completion context if available, <code>null</code> otherwise
 	 */
 	public CompletionContext getCoreContext() {
-		if (fCoreContext == null) {
-			// use the context from the existing collector if it exists, retrieve one ourselves otherwise
-			if (fCollector != null)
-				fCoreContext= fCollector.getContext();
-			if (fCoreContext == null)
-				computeKeywordsAndContext();
+		if (fCollector != null) {
+			CompletionContext context= fCollector.getContext();
+			if (context != null) {
+				if (fCoreContext == null)
+					fCoreContext= context;
+				return context;
+			}
 		}
+
+		if (fCoreContext == null)
+			computeKeywordsAndContext(); // Retrieve the context ourselves
+
 		return fCoreContext;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavadocExportWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavadocExportWizardPage.java
index af33cf2..0d0338b 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavadocExportWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavadocExportWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,8 +24,6 @@ import org.eclipse.jface.operation.IRunnableContext;
 
 import org.eclipse.jdt.core.IJavaElement;
 
-import org.eclipse.jdt.ui.JavaUI;
-
 /**
  * A Javadoc export wizard page allows the user to add an additional page to the
  * Javadoc wizard.
@@ -83,7 +81,7 @@ public abstract class JavadocExportWizardPage {
 	}
 
 
-	private IStatus fPageStatus= new Status(IStatus.OK, JavaUI.ID_PLUGIN, null);
+	private IStatus fPageStatus= Status.OK_STATUS;
 	private IJavadocExportWizardPageContainer fContainer;
 
     /**
@@ -149,9 +147,11 @@ public abstract class JavadocExportWizardPage {
 
 	/**
 	 * Called when the Javadoc ANT script is generated.
-	 *
-	 * @param xmlDocument The XML element for the 'javadoc' node. Clients can add or modify arguments.
-	 * See the <a href="http://ant.apache.org/manual/CoreTasks/javadoc.html">Javadoc ANT task</a> specification for the format of the arguments.
+	 * 
+	 * @param xmlDocument The XML element for the 'javadoc' node. Clients can add or modify
+	 *            arguments. See the <a
+	 *            href="http://ant.apache.org/manual/Tasks/javadoc.html">Javadoc ANT task</a>
+	 *            specification for the format of the arguments.
 	 */
 	public void updateAntScript(Element xmlDocument) {
 	}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
index e86d67a..598b69c 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,7 @@ import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
 import org.eclipse.ui.views.contentoutline.ContentOutline;
 
+import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.jdt.core.IJavaModel;
 import org.eclipse.jdt.core.IJavaProject;
@@ -207,7 +208,13 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
 			try {
 				IJavaProject[] projects= JavaCore.create(getWorkspaceRoot()).getJavaProjects();
 				if (projects.length == 1) {
-					jelem= projects[0];
+					IClasspathEntry[] rawClasspath= projects[0].getRawClasspath();
+					for (int i= 0; i < rawClasspath.length; i++) {
+						if (rawClasspath[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {// add only if the project contains a source folder
+							jelem= projects[0];
+							break;
+						}
+					}
 				}
 			} catch (JavaModelException e) {
 				JavaPlugin.log(e);
@@ -338,6 +345,10 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
 				IJavaProject jproject= JavaCore.create(proj);
 				fCurrRoot= jproject.getPackageFragmentRoot(res);
 				if (res.exists()) {
+					if (res.isVirtual()) {
+						status.setError(NewWizardMessages.NewContainerWizardPage_error_FolderIsVirtual);
+						return status;
+					}
 					try {
 						if (!proj.hasNature(JavaCore.NATURE_ID)) {
 							if (resType == IResource.PROJECT) {
@@ -356,6 +367,8 @@ public abstract class NewContainerWizardPage extends NewElementWizardPage {
 						} else if (!jproject.isOnClasspath(fCurrRoot)) {
 							status.setWarning(Messages.format(NewWizardMessages.NewContainerWizardPage_warning_NotOnClassPath, BasicElementLabels.getPathLabel(path, false)));
 						}
+					} catch (JavaModelException e) {
+						status.setWarning(NewWizardMessages.NewContainerWizardPage_warning_NotOnClassPath);
 					} catch (CoreException e) {
 						status.setWarning(NewWizardMessages.NewContainerWizardPage_warning_NotAJavaProject);
 					}
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java
index eb5fa33..e204ea4 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageOne.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -129,7 +129,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 		public Control createControl(Composite composite) {
 			Composite nameComposite= new Composite(composite, SWT.NONE);
 			nameComposite.setFont(composite.getFont());
-			nameComposite.setLayout(initGridLayout(new GridLayout(2, false), false));
+			nameComposite.setLayout(new GridLayout(2, false));
 
 			fNameField.doFillIntoGrid(nameComposite, 2);
 			LayoutUtil.setHorizontalGrabbing(fNameField.getTextControl(null));
@@ -169,8 +169,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 	 */
 	private final class LocationGroup extends Observable implements Observer, IStringButtonAdapter, IDialogFieldListener {
 
-		protected final SelectionButtonDialogField fWorkspaceRadio;
-		protected final SelectionButtonDialogField fExternalRadio;
+		protected final SelectionButtonDialogField fUseDefaults;
 		protected final StringButtonDialogField fLocation;
 
 		private String fPreviousExternalLocation;
@@ -178,39 +177,31 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 		private static final String DIALOGSTORE_LAST_EXTERNAL_LOC= JavaUI.ID_PLUGIN + ".last.external.project"; //$NON-NLS-1$
 
 		public LocationGroup() {
-			fWorkspaceRadio= new SelectionButtonDialogField(SWT.RADIO);
-			fWorkspaceRadio.setDialogFieldListener(this);
-			fWorkspaceRadio.setLabelText(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_workspace_desc);
-
-			fExternalRadio= new SelectionButtonDialogField(SWT.RADIO);
-			fExternalRadio.setLabelText(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_external_desc);
+			fUseDefaults= new SelectionButtonDialogField(SWT.CHECK);
+			fUseDefaults.setDialogFieldListener(this);
+			fUseDefaults.setLabelText(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_location_desc);
 
 			fLocation= new StringButtonDialogField(this);
 			fLocation.setDialogFieldListener(this);
 			fLocation.setLabelText(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_locationLabel_desc);
 			fLocation.setButtonLabel(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_browseButton_desc);
 
-			fExternalRadio.attachDialogField(fLocation);
-
-			fWorkspaceRadio.setSelection(true);
-			fExternalRadio.setSelection(false);
+			fUseDefaults.setSelection(true);
 
 			fPreviousExternalLocation= ""; //$NON-NLS-1$
 		}
 
 		public Control createControl(Composite composite) {
-			final int numColumns= 3;
+			final int numColumns= 4;
 
-			final Group group= new Group(composite, SWT.NONE);
-			group.setLayout(initGridLayout(new GridLayout(numColumns, false), true));
-			group.setText(NewWizardMessages.NewJavaProjectWizardPageOne_LocationGroup_title);
+			final Composite locationComposite= new Composite(composite, SWT.NONE);
+			locationComposite.setLayout(new GridLayout(numColumns, false));
 
-			fWorkspaceRadio.doFillIntoGrid(group, numColumns);
-			fExternalRadio.doFillIntoGrid(group, numColumns);
-			fLocation.doFillIntoGrid(group, numColumns);
+			fUseDefaults.doFillIntoGrid(locationComposite, numColumns);
+			fLocation.doFillIntoGrid(locationComposite, numColumns);
 			LayoutUtil.setHorizontalGrabbing(fLocation.getTextControl(null));
 
-			return group;
+			return locationComposite;
 		}
 
 		protected void fireEvent() {
@@ -227,37 +218,25 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 		 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
 		 */
 		public void update(Observable o, Object arg) {
-			if (isWorkspaceRadioSelected()) {
+			if (isUseDefaultSelected()) {
 				fLocation.setText(getDefaultPath(fNameGroup.getName()));
 			}
 			fireEvent();
 		}
 
 		public IPath getLocation() {
-			if (isWorkspaceRadioSelected()) {
+			if (isUseDefaultSelected()) {
 				return Platform.getLocation();
 			}
 			return Path.fromOSString(fLocation.getText().trim());
 		}
 
-		public boolean isWorkspaceRadioSelected() {
-			return fWorkspaceRadio.isSelected();
-		}
-
-		/**
-		 * Returns <code>true</code> if the location is in the workspace
-		 *
-		 * @return <code>true</code> if the location is in the workspace
-		 */
-		public boolean isLocationInWorkspace() {
-			final String location= fLocationGroup.getLocation().toOSString();
-			IPath projectPath= Path.fromOSString(location);
-			return Platform.getLocation().isPrefixOf(projectPath);
+		public boolean isUseDefaultSelected() {
+			return fUseDefaults.isSelected();
 		}
 
-
 		public void setLocation(IPath path) {
-			fWorkspaceRadio.setSelection(path == null);
+			fUseDefaults.setSelection(path == null);
 			if (path != null) {
 				fLocation.setText(path.toOSString());
 			} else {
@@ -301,13 +280,15 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 		 * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener#dialogFieldChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField)
 		 */
 		public void dialogFieldChanged(DialogField field) {
-			if (field == fWorkspaceRadio) {
-				final boolean checked= fWorkspaceRadio.isSelected();
+			if (field == fUseDefaults) {
+				final boolean checked= fUseDefaults.isSelected();
 				if (checked) {
 					fPreviousExternalLocation= fLocation.getText();
 					fLocation.setText(getDefaultPath(fNameGroup.getName()));
+					fLocation.setEnabled(false);
 				} else {
 					fLocation.setText(fPreviousExternalLocation);
+					fLocation.setEnabled(true);
 				}
 			}
 			fireEvent();
@@ -623,7 +604,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 					return environments[i].getId();
 			}
 
-			return "J2SE-1.6"; //$NON-NLS-1$
+			return "JavaSE-1.6"; //$NON-NLS-1$
 		}
 
 		private String getDefaultJVMLabel() {
@@ -836,7 +817,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 
 			fIcon= new Label(composite, SWT.LEFT);
 			fIcon.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
-			GridData gridData= new GridData(SWT.LEFT, SWT.CENTER, false, false);
+			GridData gridData= new GridData(SWT.LEFT, SWT.TOP, false, false);
 			fIcon.setLayoutData(gridData);
 
 			fHintText= new Link(composite, SWT.WRAP);
@@ -886,11 +867,6 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 				jvmCompliance= JavaModelUtil.getCompilerCompliance((IVMInstall2) selectedJVM, JavaCore.VERSION_1_4);
 			}
 			if (!selectedCompliance.equals(jvmCompliance) && (JavaModelUtil.is50OrHigher(selectedCompliance) || JavaModelUtil.is50OrHigher(jvmCompliance))) {
-				if (selectedCompliance.equals(JavaCore.VERSION_1_5))
-					selectedCompliance= "5.0"; //$NON-NLS-1$
-				else if (selectedCompliance.equals(JavaCore.VERSION_1_6))
-					selectedCompliance= "6.0"; //$NON-NLS-1$
-
 				fHintText.setText(Messages.format(NewWizardMessages.NewJavaProjectWizardPageOne_DetectGroup_jre_message, new String[] {BasicElementLabels.getVersionName(selectedCompliance), BasicElementLabels.getVersionName(jvmCompliance)}));
 				fHintText.setVisible(true);
 				fIcon.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_WARNING));
@@ -902,7 +878,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 		}
 
 		private boolean computeDetectState() {
-			if (fLocationGroup.isWorkspaceRadioSelected()) {
+			if (fLocationGroup.isUseDefaultSelected()) {
 				String name= fNameGroup.getName();
 				if (name.length() == 0 || JavaPlugin.getWorkspace().getRoot().findMember(name) != null) {
 					return false;
@@ -1036,40 +1012,25 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 				return;
 			}
 
-			IPath projectPath= Path.fromOSString(location);
-
-			if (fLocationGroup.isWorkspaceRadioSelected())
-				projectPath= projectPath.append(fNameGroup.getName());
-
-			if (projectPath.toFile().exists()) {//create from existing source
-				if (Platform.getLocation().isPrefixOf(projectPath)) { //create from existing source in workspace
-					if (!Platform.getLocation().equals(projectPath.removeLastSegments(1))) {
-						setErrorMessage(NewWizardMessages.NewJavaProjectWizardPageOne_Message_notOnWorkspaceRoot);
-						setPageComplete(false);
-						return;
-					}
-
-					if (!projectPath.toFile().exists()) {
-						setErrorMessage(NewWizardMessages.NewJavaProjectWizardPageOne_Message_notExisingProjectOnWorkspaceRoot);
+			IPath projectPath= null;
+			if (!fLocationGroup.isUseDefaultSelected()) {
+				projectPath= Path.fromOSString(location);
+				if (!projectPath.toFile().exists()) {
+					// check non-existing external location
+					if (!canCreate(projectPath.toFile())) {
+						setErrorMessage(NewWizardMessages.NewJavaProjectWizardPageOne_Message_cannotCreateAtExternalLocation);
 						setPageComplete(false);
 						return;
 					}
 				}
-			} else if (!fLocationGroup.isWorkspaceRadioSelected()) {//create at non existing external location
-				if (!canCreate(projectPath.toFile())) {
-					setErrorMessage(NewWizardMessages.NewJavaProjectWizardPageOne_Message_cannotCreateAtExternalLocation);
-					setPageComplete(false);
-					return;
-				}
-
-				// If we do not place the contents in the workspace validate the
-				// location.
-				final IStatus locationStatus= workspace.validateProjectLocation(handle, projectPath);
-				if (!locationStatus.isOK()) {
-					setErrorMessage(locationStatus.getMessage());
-					setPageComplete(false);
-					return;
-				}
+			}
+			
+			// validate the location
+			final IStatus locationStatus= workspace.validateProjectLocation(handle, projectPath);
+			if (!locationStatus.isOK()) {
+				setErrorMessage(locationStatus.getMessage());
+				setPageComplete(false);
+				return;
 			}
 
 			setPageComplete(true);
@@ -1282,7 +1243,7 @@ public class NewJavaProjectWizardPageOne extends WizardPage {
 	 * @return the project location path or its anticipated initial value.
 	 */
 	public URI getProjectLocationURI() {
-		if (fLocationGroup.isLocationInWorkspace()) {
+		if (fLocationGroup.isUseDefaultSelected()) {
 			return null;
 		}
 		return URIUtil.toURI(fLocationGroup.getLocation());
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
index ebe9088..e2c35d4 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewPackageWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
 
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -264,6 +265,11 @@ public class NewPackageWizardPage extends NewContainerWizardPage {
 						status.setError(NewWizardMessages.NewPackageWizardPage_error_PackageNotShown);
 					}
 				} else {
+					IResource resource= pack.getResource();
+					if (resource != null && !ResourcesPlugin.getWorkspace().validateFiltered(resource).isOK()) {
+						status.setError(NewWizardMessages.NewPackageWizardPage_error_PackageNameFiltered);
+						return status;
+					}
 					URI location= pack.getResource().getLocationURI();
 					if (location != null) {
 						IFileStore store= EFS.getStore(location);
diff --git a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
index 017706f..10789f9 100644
--- a/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
+++ b/eclipse/plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@ import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.SubProgressMonitor;
 
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
 
 import org.eclipse.text.edits.TextEdit;
 
@@ -121,7 +122,6 @@ import org.eclipse.jdt.internal.corext.util.Resources;
 import org.eclipse.jdt.internal.corext.util.Strings;
 
 import org.eclipse.jdt.ui.CodeGeneration;
-import org.eclipse.jdt.ui.CodeStyleConfiguration;
 import org.eclipse.jdt.ui.JavaElementLabelProvider;
 
 import org.eclipse.jdt.internal.ui.JavaPlugin;
@@ -182,7 +182,7 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
 		private ImportRewrite fImportsRewrite;
 
 		/* package */ ImportsManager(CompilationUnit astRoot) {
-			fImportsRewrite= CodeStyleConfiguration.createImportRewrite(astRoot, true);
+			fImportsRewrite= StubUtility.createImportRewrite(astRoot, true);
 		}
 
 		/* package */ ICompilationUnit getCompilationUnit() {
@@ -1434,6 +1434,17 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
 			}
 
 			fCurrPackage= root.getPackageFragment(packName);
+			IResource resource= fCurrPackage.getResource();
+			if (resource != null){
+				if (resource.isVirtual()){
+					status.setError(NewWizardMessages.NewTypeWizardPage_error_PackageIsVirtual);
+					return status;
+				}			
+				if (!ResourcesPlugin.getWorkspace().validateFiltered(resource).isOK()) {
+					status.setError(NewWizardMessages.NewTypeWizardPage_error_PackageNameFiltered);
+					return status;
+				}
+			}
 		} else {
 			status.setError(""); //$NON-NLS-1$
 		}
@@ -1600,6 +1611,10 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
 					status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameExists);
 					return status;
 				}
+				if (!ResourcesPlugin.getWorkspace().validateFiltered(resource).isOK()) {
+					status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameFiltered);
+					return status;
+				}
 				URI location= resource.getLocationURI();
 				if (location != null) {
 					try {
@@ -2157,13 +2172,15 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
 	/**
 	 * Uses the New Java file template from the code template page to generate a
 	 * compilation unit with the given type content.
+	 * 
 	 * @param cu The new created compilation unit
 	 * @param typeContent The content of the type, including signature and type
 	 * body.
 	 * @param lineDelimiter The line delimiter to be used.
 	 * @return String Returns the result of evaluating the new file template
 	 * with the given type content.
-	 * @throws CoreException
+	 * @throws CoreException when fetching the file comment fails or fetching the content for the
+	 *             new compilation unit fails
 	 * @since 2.1
 	 */
 	protected String constructCUContent(ICompilationUnit cu, String typeContent, String lineDelimiter) throws CoreException {
@@ -2356,7 +2373,7 @@ public abstract class NewTypeWizardPage extends NewContainerWizardPage {
 	 * @param lineDelimiter the line delimiter to use
 	 * @return the file comment or <code>null</code> if a file comment
 	 * is not desired
-	 * @throws CoreException
+	 * @throws CoreException when fetching the file comment fails
      *
      * @since 3.1
 	 */
diff --git a/eclipse/plugins/org.eclipse.jdt/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jdt/META-INF/MANIFEST.MF
index 6ffeebc..7aa3203 100644
--- a/eclipse/plugins/org.eclipse.jdt/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jdt/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui.intro;bundle-version="[3.2.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.jdt/about.properties b/eclipse/plugins/org.eclipse.jdt/about.properties
index a6b7019..e436179 100644
--- a/eclipse/plugins/org.eclipse.jdt/about.properties
+++ b/eclipse/plugins/org.eclipse.jdt/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Java Development Tools\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/jdt
 
diff --git a/eclipse/plugins/org.eclipse.jdt/plugin.properties b/eclipse/plugins/org.eclipse.jdt/plugin.properties
index ec966fb..28fbccf 100644
--- a/eclipse/plugins/org.eclipse.jdt/plugin.properties
+++ b/eclipse/plugins/org.eclipse.jdt/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,4 +15,4 @@ cheatsheet.category.jdt = Java Development
 cheatsheet.helloworld.name = Create a Hello World application
 cheatsheet.helloworld.desc =  Learn how to create a simple Java application that prints "Hello world!". 
 cheatsheet.helloworld.swt.name = Create a Hello World SWT application
-cheatsheet.helloworld.swt.desc = Learn how to create a standalone SWT Java application that displays a window to the user.
+cheatsheet.helloworld.swt.desc = Learn how to create a stand-alone SWT Java application that displays a window to the user.
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/.settings/.api_filters b/eclipse/plugins/org.eclipse.jface.databinding/.settings/.api_filters
index 2efeca6..12d8818 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.jface.databinding/.settings/.api_filters
@@ -1,33 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.jface.databinding" version="2">
-    <resource path="src/org/eclipse/jface/databinding/viewers/ObservableSetTreeContentProvider.java" type="org.eclipse.jface.databinding.viewers.ObservableSetTreeContentProvider">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.databinding.viewers.ObservableSetTreeContentProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jface/databinding/viewers/ObservableListContentProvider.java" type="org.eclipse.jface.databinding.viewers.ObservableListContentProvider">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.databinding.viewers.ObservableListContentProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jface/databinding/viewers/ObservableSetContentProvider.java" type="org.eclipse.jface.databinding.viewers.ObservableSetContentProvider">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.databinding.viewers.ObservableSetContentProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/jface/databinding/viewers/ObservableListTreeContentProvider.java" type="org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="src/org/eclipse/jface/databinding/viewers/ListeningLabelProvider.java" type="org.eclipse.jface.databinding.viewers.ListeningLabelProvider">
         <filter id="576720909">
             <message_arguments>
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/.settings/org.moreunit.prefs b/eclipse/plugins/org.eclipse.jface.databinding/.settings/org.moreunit.prefs
new file mode 100644
index 0000000..7592747
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/.settings/org.moreunit.prefs
@@ -0,0 +1,5 @@
+#Tue Feb 02 23:25:33 MST 2010
+eclipse.preferences.version=1
+org.moreunit.prefixes=
+org.moreunit.unitsourcefolder=org.eclipse.jface.databinding\:src\:org.eclipse.jface.tests.databinding\:src
+org.moreunit.useprojectsettings=true
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
index 737626c..f9e1507 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jface.databinding/META-INF/MANIFEST.MF
@@ -2,27 +2,27 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface.databinding
-Bundle-Version: 1.3.1.qualifier
+Bundle-Version: 1.4.0.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.jface.databinding.dialog,
+ org.eclipse.jface.databinding.fieldassist,
  org.eclipse.jface.databinding.preference,
  org.eclipse.jface.databinding.swt,
+ org.eclipse.jface.databinding.util,
  org.eclipse.jface.databinding.viewers,
  org.eclipse.jface.databinding.wizard,
- org.eclipse.jface.internal.databinding.provisional.fieldassist;x-internal:=true,
  org.eclipse.jface.internal.databinding.provisional.swt;x-internal:=true,
  org.eclipse.jface.internal.databinding.provisional.viewers;x-internal:=true,
  org.eclipse.jface.internal.databinding.swt;x-internal:=true,
  org.eclipse.jface.internal.databinding.util;x-internal:=true,
- org.eclipse.jface.internal.databinding.viewers;x-internal:=true,
- org.eclipse.jface.databinding.util
-Require-Bundle: org.eclipse.swt;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.jface.internal.databinding.viewers;x-internal:=true
+Require-Bundle: org.eclipse.swt;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jface;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.databinding.observable;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.core.databinding.property;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)",
  org.eclipse.core.databinding;bundle-version="[1.2.0,2.0.0)"
 Import-Package: com.ibm.icu.text
 Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/DialogPageSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/DialogPageSupport.java
index ff86eb2..aa9eca7 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/DialogPageSupport.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/DialogPageSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,13 @@
  *         (through WizardPageSupport.java)
  *     Matthew Hall - initial API and implementation (bug 239900)
  *     Matthew Hall - bugs 237856, 275058, 278550
- *     Ovidio Mallo - bug 237856
+ *     Ovidio Mallo - bugs 237856, 248877
  ******************************************************************************/
 
 package org.eclipse.jface.databinding.dialog;
 
 import java.util.Iterator;
 
-import org.eclipse.core.databinding.AggregateValidationStatus;
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.ValidationStatusProvider;
 import org.eclipse.core.databinding.observable.ChangeEvent;
@@ -35,7 +34,6 @@ import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.observable.value.IValueChangeListener;
 import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
 import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Status;
@@ -70,7 +68,8 @@ public class DialogPageSupport {
 
 	private DialogPage dialogPage;
 	private DataBindingContext dbc;
-	private IObservableValue aggregateStatus;
+	private IValidationMessageProvider messageProvider = new ValidationMessageProvider();
+	private IObservableValue aggregateStatusProvider;
 	private boolean uiChanged = false;
 	private IChangeListener uiChangeListener = new IChangeListener() {
 		public void handleChange(ChangeEvent event) {
@@ -119,6 +118,7 @@ public class DialogPageSupport {
 			}
 		}
 	};
+	private ValidationStatusProvider currentStatusProvider;
 	protected IStatus currentStatus;
 	protected boolean currentStatusStale;
 
@@ -135,6 +135,23 @@ public class DialogPageSupport {
 	}
 
 	/**
+	 * Sets the {@link IValidationMessageProvider} to use for providing the
+	 * message text and message type to display on the dialog page.
+	 * 
+	 * @param messageProvider
+	 *            The {@link IValidationMessageProvider} to use for providing
+	 *            the message text and message type to display on the dialog
+	 *            page.
+	 * 
+	 * @since 1.4
+	 */
+	public void setValidationMessageProvider(
+			IValidationMessageProvider messageProvider) {
+		this.messageProvider = messageProvider;
+		handleStatusChanged();
+	}
+
+	/**
 	 * @return the dialog page
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
@@ -146,35 +163,32 @@ public class DialogPageSupport {
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	protected void init() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				aggregateStatus = new AggregateValidationStatus(dbc
-						.getValidationStatusProviders(),
-						AggregateValidationStatus.MAX_SEVERITY);
-			}
-		});
+		ObservableTracker.setIgnore(true);
+		try {
+			aggregateStatusProvider = new MaxSeverityValidationStatusProvider(
+					dbc);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-		aggregateStatus.addValueChangeListener(new IValueChangeListener() {
-			public void handleValueChange(ValueChangeEvent event) {
-				currentStatus = (IStatus) event.diff.getNewValue();
-				currentStatusStale = aggregateStatus.isStale();
-				handleStatusChanged();
-			}
-		});
+		aggregateStatusProvider
+				.addValueChangeListener(new IValueChangeListener() {
+					public void handleValueChange(ValueChangeEvent event) {
+						statusProviderChanged();
+					}
+				});
 		dialogPage.getShell().addListener(SWT.Dispose, new Listener() {
 			public void handleEvent(Event event) {
 				dispose();
 			}
 		});
-		aggregateStatus.addStaleListener(new IStaleListener() {
+		aggregateStatusProvider.addStaleListener(new IStaleListener() {
 			public void handleStale(StaleEvent staleEvent) {
 				currentStatusStale = true;
 				handleStatusChanged();
 			}
 		});
-		currentStatus = (IStatus) aggregateStatus.getValue();
-		currentStatusStale = aggregateStatus.isStale();
-		handleStatusChanged();
+		statusProviderChanged();
 		dbc.getValidationStatusProviders().addListChangeListener(
 				validationStatusProvidersListener);
 		for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
@@ -190,6 +204,19 @@ public class DialogPageSupport {
 		}
 	}
 
+	private void statusProviderChanged() {
+		currentStatusProvider = (ValidationStatusProvider) aggregateStatusProvider
+				.getValue();
+		if (currentStatusProvider != null) {
+			currentStatus = (IStatus) currentStatusProvider
+					.getValidationStatus().getValue();
+		} else {
+			currentStatus = null;
+		}
+		currentStatusStale = aggregateStatusProvider.isStale();
+		handleStatusChanged();
+	}
+
 	/**
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
@@ -218,43 +245,17 @@ public class DialogPageSupport {
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	protected void handleStatusChanged() {
-		if (currentStatus != null
-				&& currentStatus.getSeverity() == IStatus.ERROR) {
+		String message = messageProvider.getMessage(currentStatusProvider);
+		int type = messageProvider.getMessageType(currentStatusProvider);
+		if (type == IMessageProvider.ERROR) {
 			dialogPage.setMessage(null);
-			dialogPage.setErrorMessage(uiChanged ? currentStatus.getMessage()
-					: null);
-			if (currentStatusHasException()) {
+			dialogPage.setErrorMessage(uiChanged ? message : null);
+			if (currentStatus != null && currentStatusHasException()) {
 				handleStatusException();
 			}
-		} else if (currentStatus != null
-				&& currentStatus.getSeverity() != IStatus.OK) {
-			int severity = currentStatus.getSeverity();
-			int type;
-			switch (severity) {
-			case IStatus.OK:
-				type = IMessageProvider.NONE;
-				break;
-			case IStatus.CANCEL:
-				type = IMessageProvider.NONE;
-				break;
-			case IStatus.INFO:
-				type = IMessageProvider.INFORMATION;
-				break;
-			case IStatus.WARNING:
-				type = IMessageProvider.WARNING;
-				break;
-			case IStatus.ERROR:
-				type = IMessageProvider.ERROR;
-				break;
-			default:
-				Assert.isTrue(false, "incomplete switch statement"); //$NON-NLS-1$
-				return; // unreachable
-			}
-			dialogPage.setErrorMessage(null);
-			dialogPage.setMessage(currentStatus.getMessage(), type);
 		} else {
-			dialogPage.setMessage(null);
 			dialogPage.setErrorMessage(null);
+			dialogPage.setMessage(message, type);
 		}
 	}
 
@@ -310,8 +311,8 @@ public class DialogPageSupport {
 	 * may have attached.
 	 */
 	public void dispose() {
-		if (aggregateStatus != null)
-			aggregateStatus.dispose();
+		if (aggregateStatusProvider != null)
+			aggregateStatusProvider.dispose();
 		if (dbc != null && !uiChanged) {
 			for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
 					.hasNext();) {
@@ -328,7 +329,7 @@ public class DialogPageSupport {
 			dbc.getValidationStatusProviders().removeListChangeListener(
 					validationStatusProvidersListener);
 		}
-		aggregateStatus = null;
+		aggregateStatusProvider = null;
 		dbc = null;
 		uiChangeListener = null;
 		validationStatusProvidersListener = null;
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/IValidationMessageProvider.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/IValidationMessageProvider.java
new file mode 100644
index 0000000..1da2b23
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/IValidationMessageProvider.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 248877)
+ ******************************************************************************/
+
+package org.eclipse.jface.databinding.dialog;
+
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.jface.dialogs.IMessageProvider;
+
+/**
+ * Simple interface to provide a validation message text and a message type for
+ * a given {@link ValidationStatusProvider}.
+ * 
+ * <p>
+ * Can be used in dialogs to display a message text along with an icon
+ * reflecting the validation status.
+ * </p>
+ * 
+ * @since 1.4
+ */
+public interface IValidationMessageProvider {
+
+	/**
+	 * Returns the validation message text for the given validation status
+	 * provider.
+	 * 
+	 * @param statusProvider
+	 *            the {@link ValidationStatusProvider} for which to provide a
+	 *            message text. May be <code>null</code>.
+	 * @return The validation message text for the given
+	 *         <code>validationStatusProvider</code>. May be <code>null</code>.
+	 */
+	public String getMessage(ValidationStatusProvider statusProvider);
+
+	/**
+	 * Returns the validation message type as one of the constants defined in
+	 * {@link IMessageProvider} for the given validation status provider.
+	 * 
+	 * @param statusProvider
+	 *            the {@link ValidationStatusProvider} for which to provide a
+	 *            message type. May be <code>null</code>.
+	 * @return The validation message type for the given
+	 *         <code>validationStatusProvider</code>.
+	 */
+	public int getMessageType(ValidationStatusProvider statusProvider);
+}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/MaxSeverityValidationStatusProvider.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/MaxSeverityValidationStatusProvider.java
new file mode 100644
index 0000000..50fea47
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/MaxSeverityValidationStatusProvider.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 248877)
+ ******************************************************************************/
+
+package org.eclipse.jface.databinding.dialog;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.databinding.observable.value.ComputedValue;
+import org.eclipse.core.runtime.IStatus;
+
+/*package*/ class MaxSeverityValidationStatusProvider extends ComputedValue {
+
+	private Collection validationStatusProviders;
+
+	public MaxSeverityValidationStatusProvider(DataBindingContext dbc) {
+		super(ValidationStatusProvider.class);
+		this.validationStatusProviders = dbc.getValidationStatusProviders();
+	}
+
+	protected Object calculate() {
+		int maxSeverity = IStatus.OK;
+		ValidationStatusProvider maxSeverityProvider = null;
+		for (Iterator it = validationStatusProviders.iterator(); it.hasNext();) {
+			ValidationStatusProvider provider = (ValidationStatusProvider) it
+					.next();
+			IStatus status = (IStatus) provider.getValidationStatus()
+					.getValue();
+			if (status.getSeverity() > maxSeverity) {
+				maxSeverity = status.getSeverity();
+				maxSeverityProvider = provider;
+			}
+		}
+		return maxSeverityProvider;
+	}
+
+	public synchronized void dispose() {
+		validationStatusProviders = null;
+		super.dispose();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/TitleAreaDialogSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/TitleAreaDialogSupport.java
index 1b4b19a..eafba89 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/TitleAreaDialogSupport.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/TitleAreaDialogSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,13 @@
  *     Ben Vitale <bvitale3002 at yahoo.com> - bug 263100
  *     Kai Schlamp - bug 275058
  *     Matthew Hall - bugs 275058, 278550
+ *     Ovidio Mallo - bug 248877
  ******************************************************************************/
 
 package org.eclipse.jface.databinding.dialog;
 
 import java.util.Iterator;
 
-import org.eclipse.core.databinding.AggregateValidationStatus;
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.core.databinding.ValidationStatusProvider;
 import org.eclipse.core.databinding.observable.ChangeEvent;
@@ -34,7 +34,6 @@ import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.observable.value.IValueChangeListener;
 import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
 import org.eclipse.core.databinding.util.Policy;
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Status;
@@ -70,7 +69,8 @@ public class TitleAreaDialogSupport {
 
 	private TitleAreaDialog dialog;
 	private DataBindingContext dbc;
-	private IObservableValue aggregateStatus;
+	private IValidationMessageProvider messageProvider = new ValidationMessageProvider();
+	private IObservableValue aggregateStatusProvider;
 	private boolean uiChanged = false;
 	private IChangeListener uiChangeListener = new IChangeListener() {
 		public void handleChange(ChangeEvent event) {
@@ -119,6 +119,7 @@ public class TitleAreaDialogSupport {
 			}
 		}
 	};
+	private ValidationStatusProvider currentStatusProvider;
 	private IStatus currentStatus;
 
 	private TitleAreaDialogSupport(TitleAreaDialog dialogPage,
@@ -128,29 +129,44 @@ public class TitleAreaDialogSupport {
 		init();
 	}
 
-	private void init() {
-		ObservableTracker.runAndIgnore(new Runnable() {
-			public void run() {
-				aggregateStatus = new AggregateValidationStatus(dbc
-						.getValidationStatusProviders(),
-						AggregateValidationStatus.MAX_SEVERITY);
-			}
-		});
+	/**
+	 * Sets the {@link IValidationMessageProvider} to use for providing the
+	 * message text and message type to display on the title area dialog.
+	 * 
+	 * @param messageProvider
+	 *            The {@link IValidationMessageProvider} to use for providing
+	 *            the message text and message type to display on the title area
+	 *            dialog.
+	 * 
+	 * @since 1.4
+	 */
+	public void setValidationMessageProvider(
+			IValidationMessageProvider messageProvider) {
+		this.messageProvider = messageProvider;
+		handleStatusChanged();
+	}
 
-		aggregateStatus.addValueChangeListener(new IValueChangeListener() {
-			public void handleValueChange(ValueChangeEvent event) {
+	private void init() {
+		ObservableTracker.setIgnore(true);
+		try {
+			aggregateStatusProvider = new MaxSeverityValidationStatusProvider(
+					dbc);
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 
-				currentStatus = (IStatus) event.diff.getNewValue();
-				handleStatusChanged();
-			}
-		});
+		aggregateStatusProvider
+				.addValueChangeListener(new IValueChangeListener() {
+					public void handleValueChange(ValueChangeEvent event) {
+						statusProviderChanged();
+					}
+				});
 		dialog.getShell().addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
 				dispose();
 			}
 		});
-		currentStatus = (IStatus) aggregateStatus.getValue();
-		handleStatusChanged();
+		statusProviderChanged();
 		dbc.getValidationStatusProviders().addListChangeListener(
 				validationStatusProvidersListener);
 		for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
@@ -166,6 +182,18 @@ public class TitleAreaDialogSupport {
 		}
 	}
 
+	private void statusProviderChanged() {
+		currentStatusProvider = (ValidationStatusProvider) aggregateStatusProvider
+				.getValue();
+		if (currentStatusProvider != null) {
+			currentStatus = (IStatus) currentStatusProvider
+					.getValidationStatus().getValue();
+		} else {
+			currentStatus = null;
+		}
+		handleStatusChanged();
+	}
+
 	private void handleUIChanged() {
 		uiChanged = true;
 		if (currentStatus != null) {
@@ -190,43 +218,17 @@ public class TitleAreaDialogSupport {
 	private void handleStatusChanged() {
 		if (dialog.getShell() == null || dialog.getShell().isDisposed())
 			return;
-		if (currentStatus != null
-				&& currentStatus.getSeverity() == IStatus.ERROR) {
+		String message = messageProvider.getMessage(currentStatusProvider);
+		int type = messageProvider.getMessageType(currentStatusProvider);
+		if (type == IMessageProvider.ERROR) {
 			dialog.setMessage(null);
-			dialog.setErrorMessage(uiChanged ? currentStatus.getMessage()
-					: null);
-			if (currentStatusHasException()) {
+			dialog.setErrorMessage(uiChanged ? message : null);
+			if (currentStatus != null && currentStatusHasException()) {
 				handleStatusException();
 			}
-		} else if (currentStatus != null
-				&& currentStatus.getSeverity() != IStatus.OK) {
-			int severity = currentStatus.getSeverity();
-			int type;
-			switch (severity) {
-			case IStatus.OK:
-				type = IMessageProvider.NONE;
-				break;
-			case IStatus.CANCEL:
-				type = IMessageProvider.NONE;
-				break;
-			case IStatus.INFO:
-				type = IMessageProvider.INFORMATION;
-				break;
-			case IStatus.WARNING:
-				type = IMessageProvider.WARNING;
-				break;
-			case IStatus.ERROR:
-				type = IMessageProvider.ERROR;
-				break;
-			default:
-				Assert.isTrue(false, "incomplete switch statement"); //$NON-NLS-1$
-				return; // unreachable
-			}
-			dialog.setErrorMessage(null);
-			dialog.setMessage(currentStatus.getMessage(), type);
 		} else {
-			dialog.setMessage(null);
 			dialog.setErrorMessage(null);
+			dialog.setMessage(message, type);
 		}
 	}
 
@@ -283,8 +285,8 @@ public class TitleAreaDialogSupport {
 	 * it may have attached.
 	 */
 	public void dispose() {
-		if (aggregateStatus != null)
-			aggregateStatus.dispose();
+		if (aggregateStatusProvider != null)
+			aggregateStatusProvider.dispose();
 		if (dbc != null && !uiChanged) {
 			for (Iterator it = dbc.getValidationStatusProviders().iterator(); it
 					.hasNext();) {
@@ -301,7 +303,7 @@ public class TitleAreaDialogSupport {
 			dbc.getValidationStatusProviders().removeListChangeListener(
 					validationStatusProvidersListener);
 		}
-		aggregateStatus = null;
+		aggregateStatusProvider = null;
 		dbc = null;
 		uiChangeListener = null;
 		validationStatusProvidersListener = null;
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/ValidationMessageProvider.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/ValidationMessageProvider.java
new file mode 100644
index 0000000..00fcb10
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/dialog/ValidationMessageProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Ovidio Mallo and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ovidio Mallo - initial API and implementation (bug 248877)
+ ******************************************************************************/
+
+package org.eclipse.jface.databinding.dialog;
+
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.IMessageProvider;
+
+/**
+ * Standard implementation of the {@link IValidationMessageProvider} interface.
+ * 
+ * @since 1.4
+ */
+public class ValidationMessageProvider implements IValidationMessageProvider {
+
+	/**
+	 * Returns the {@link IStatus#getMessage() message} of the
+	 * <code>IStatus</code> contained in the provided
+	 * <code>validationStatusProvider</code> as is or <code>null</code> if the
+	 * <code>validationStatusProvider</code> is itself <code>null</code>.
+	 */
+	public String getMessage(ValidationStatusProvider statusProvider) {
+		if (statusProvider != null) {
+			IStatus status = (IStatus) statusProvider.getValidationStatus()
+					.getValue();
+			return status.getMessage();
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the message type defined in {@link IMessageProvider} which
+	 * naturally maps to the {@link IStatus#getSeverity()} of the
+	 * <code>IStatus</code> contained in the provided
+	 * <code>validationStatusProvider</code>.
+	 */
+	public int getMessageType(ValidationStatusProvider statusProvider) {
+		if (statusProvider == null) {
+			return IMessageProvider.NONE;
+		}
+
+		IStatus status = (IStatus) statusProvider.getValidationStatus()
+				.getValue();
+		int severity = status.getSeverity();
+		switch (severity) {
+		case IStatus.OK:
+			return IMessageProvider.NONE;
+		case IStatus.CANCEL:
+			return IMessageProvider.NONE;
+		case IStatus.INFO:
+			return IMessageProvider.INFORMATION;
+		case IStatus.WARNING:
+			return IMessageProvider.WARNING;
+		case IStatus.ERROR:
+			return IMessageProvider.ERROR;
+		default:
+			Assert.isTrue(false, "incomplete switch statement"); //$NON-NLS-1$
+			return -1; // unreachable
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationSupport.java
new file mode 100644
index 0000000..2541527
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationSupport.java
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 268472)
+ *     Matthew Hall - bug 300953
+ ******************************************************************************/
+
+package org.eclipse.jface.databinding.fieldassist;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.databinding.ValidationStatusProvider;
+import org.eclipse.core.databinding.observable.DisposeEvent;
+import org.eclipse.core.databinding.observable.IDecoratingObservable;
+import org.eclipse.core.databinding.observable.IDisposeListener;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.list.IListChangeListener;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.ListChangeEvent;
+import org.eclipse.core.databinding.observable.list.ListDiffVisitor;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.IValueChangeListener;
+import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.databinding.swt.ISWTObservable;
+import org.eclipse.jface.databinding.viewers.IViewerObservable;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * Decorates the underlying controls of the target observables of a
+ * {@link ValidationStatusProvider} with {@link ControlDecoration}s mirroring
+ * the current validation status. Only those target observables which implement
+ * {@link ISWTObservable} or {@link IViewerObservable} are decorated.
+ * 
+ * @since 1.4
+ */
+public class ControlDecorationSupport {
+	/**
+	 * Creates a ControlDecorationSupport which observes the validation status
+	 * of the specified {@link ValidationStatusProvider}, and displays a
+	 * {@link ControlDecoration} over the underlying SWT control of all target
+	 * observables that implement {@link ISWTObservable} or
+	 * {@link IViewerObservable}.
+	 * 
+	 * @param validationStatusProvider
+	 *            the {@link ValidationStatusProvider} to monitor.
+	 * @param position
+	 *            SWT alignment constant (e.g. SWT.LEFT | SWT.TOP) to use when
+	 *            constructing {@link ControlDecorationSupport}
+	 * @return a ControlDecorationSupport which observes the validation status
+	 *         of the specified {@link ValidationStatusProvider}, and displays a
+	 *         {@link ControlDecoration} over the underlying SWT control of all
+	 *         target observables that implement {@link ISWTObservable} or
+	 *         {@link IViewerObservable}.
+	 */
+	public static ControlDecorationSupport create(
+			ValidationStatusProvider validationStatusProvider, int position) {
+		return create(validationStatusProvider, position, null,
+				new ControlDecorationUpdater());
+	}
+
+	/**
+	 * Creates a ControlDecorationSupport which observes the validation status
+	 * of the specified {@link ValidationStatusProvider}, and displays a
+	 * {@link ControlDecoration} over the underlying SWT control of all target
+	 * observables that implement {@link ISWTObservable} or
+	 * {@link IViewerObservable}.
+	 * 
+	 * @param validationStatusProvider
+	 *            the {@link ValidationStatusProvider} to monitor.
+	 * @param position
+	 *            SWT alignment constant (e.g. SWT.LEFT | SWT.TOP) to use when
+	 *            constructing {@link ControlDecoration} instances.
+	 * @param composite
+	 *            the composite to use when constructing
+	 *            {@link ControlDecoration} instances.
+	 * @return a ControlDecorationSupport which observes the validation status
+	 *         of the specified {@link ValidationStatusProvider}, and displays a
+	 *         {@link ControlDecoration} over the underlying SWT control of all
+	 *         target observables that implement {@link ISWTObservable} or
+	 *         {@link IViewerObservable}.
+	 */
+	public static ControlDecorationSupport create(
+			ValidationStatusProvider validationStatusProvider, int position,
+			Composite composite) {
+		return create(validationStatusProvider, position, composite,
+				new ControlDecorationUpdater());
+	}
+
+	/**
+	 * Creates a ControlDecorationSupport which observes the validation status
+	 * of the specified {@link ValidationStatusProvider}, and displays a
+	 * {@link ControlDecoration} over the underlying SWT control of all target
+	 * observables that implement {@link ISWTObservable} or
+	 * {@link IViewerObservable}.
+	 * 
+	 * @param validationStatusProvider
+	 *            the {@link ValidationStatusProvider} to monitor.
+	 * @param position
+	 *            SWT alignment constant (e.g. SWT.LEFT | SWT.TOP) to use when
+	 *            constructing {@link ControlDecoration} instances.
+	 * @param composite
+	 *            the composite to use when constructing
+	 *            {@link ControlDecoration} instances.
+	 * @param updater
+	 *            custom strategy for updating the {@link ControlDecoration}(s)
+	 *            whenever the validation status changes.
+	 * @return a ControlDecorationSupport which observes the validation status
+	 *         of the specified {@link ValidationStatusProvider}, and displays a
+	 *         {@link ControlDecoration} over the underlying SWT control of all
+	 *         target observables that implement {@link ISWTObservable} or
+	 *         {@link IViewerObservable}.
+	 */
+	public static ControlDecorationSupport create(
+			ValidationStatusProvider validationStatusProvider, int position,
+			Composite composite, ControlDecorationUpdater updater) {
+		return new ControlDecorationSupport(validationStatusProvider, position,
+				composite, updater);
+	}
+
+	private final int position;
+	private final Composite composite;
+	private final ControlDecorationUpdater updater;
+
+	private IObservableValue validationStatus;
+	private IObservableList targets;
+
+	private IDisposeListener disposeListener = new IDisposeListener() {
+		public void handleDispose(DisposeEvent staleEvent) {
+			dispose();
+		}
+	};
+
+	private IValueChangeListener statusChangeListener = new IValueChangeListener() {
+		public void handleValueChange(ValueChangeEvent event) {
+			statusChanged((IStatus) validationStatus.getValue());
+		}
+	};
+
+	private IListChangeListener targetsChangeListener = new IListChangeListener() {
+		public void handleListChange(ListChangeEvent event) {
+			event.diff.accept(new ListDiffVisitor() {
+				public void handleAdd(int index, Object element) {
+					targetAdded((IObservable) element);
+				}
+
+				public void handleRemove(int index, Object element) {
+					targetRemoved((IObservable) element);
+				}
+			});
+			statusChanged((IStatus) validationStatus.getValue());
+		}
+	};
+
+	private static class TargetDecoration {
+		public final IObservable target;
+		public final ControlDecoration decoration;
+
+		TargetDecoration(IObservable target, ControlDecoration decoration) {
+			this.target = target;
+			this.decoration = decoration;
+		}
+	}
+
+	private List targetDecorations;
+
+	private ControlDecorationSupport(
+			ValidationStatusProvider validationStatusProvider, int position,
+			Composite composite, ControlDecorationUpdater updater) {
+		this.position = position;
+		this.composite = composite;
+		this.updater = updater;
+
+		this.validationStatus = validationStatusProvider.getValidationStatus();
+		Assert.isTrue(!this.validationStatus.isDisposed());
+
+		this.targets = validationStatusProvider.getTargets();
+		Assert.isTrue(!this.targets.isDisposed());
+
+		this.targetDecorations = new ArrayList();
+
+		validationStatus.addDisposeListener(disposeListener);
+		validationStatus.addValueChangeListener(statusChangeListener);
+
+		targets.addDisposeListener(disposeListener);
+		targets.addListChangeListener(targetsChangeListener);
+
+		for (Iterator it = targets.iterator(); it.hasNext();)
+			targetAdded((IObservable) it.next());
+
+		statusChanged((IStatus) validationStatus.getValue());
+	}
+
+	private void targetAdded(IObservable target) {
+		Control control = findControl(target);
+		if (control != null)
+			targetDecorations.add(new TargetDecoration(target,
+					new ControlDecoration(control, position, composite)));
+	}
+
+	private void targetRemoved(IObservable target) {
+		for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
+			TargetDecoration targetDecoration = (TargetDecoration) it.next();
+			if (targetDecoration.target == target) {
+				targetDecoration.decoration.dispose();
+				it.remove();
+			}
+		}
+	}
+
+	private Control findControl(IObservable target) {
+		if (target instanceof ISWTObservable) {
+			Widget widget = ((ISWTObservable) target).getWidget();
+			if (widget instanceof Control)
+				return (Control) widget;
+		}
+
+		if (target instanceof IViewerObservable) {
+			Viewer viewer = ((IViewerObservable) target).getViewer();
+			return viewer.getControl();
+		}
+
+		if (target instanceof IDecoratingObservable) {
+			IObservable decorated = ((IDecoratingObservable) target)
+					.getDecorated();
+			Control control = findControl(decorated);
+			if (control != null)
+				return control;
+		}
+
+		if (target instanceof IObserving) {
+			Object observed = ((IObserving) target).getObserved();
+			if (observed instanceof IObservable)
+				return findControl((IObservable) observed);
+		}
+
+		return null;
+	}
+
+	private void statusChanged(IStatus status) {
+		for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
+			TargetDecoration targetDecoration = (TargetDecoration) it.next();
+			ControlDecoration decoration = targetDecoration.decoration;
+			updater.update(decoration, status);
+		}
+	}
+
+	/**
+	 * Disposes this ControlDecorationSupport, including all control decorations
+	 * managed by it. A ControlDecorationSupport is automatically disposed when
+	 * its target ValidationStatusProvider is disposed.
+	 */
+	public void dispose() {
+		if (validationStatus != null) {
+			validationStatus.removeDisposeListener(disposeListener);
+			validationStatus.removeValueChangeListener(statusChangeListener);
+			validationStatus = null;
+		}
+
+		if (targets != null) {
+			targets.removeDisposeListener(disposeListener);
+			targets.removeListChangeListener(targetsChangeListener);
+			targets = null;
+		}
+
+		disposeListener = null;
+		statusChangeListener = null;
+		targetsChangeListener = null;
+
+		if (targetDecorations != null) {
+			for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
+				TargetDecoration targetDecoration = (TargetDecoration) it
+						.next();
+				targetDecoration.decoration.dispose();
+			}
+			targetDecorations.clear();
+			targetDecorations = null;
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationUpdater.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationUpdater.java
new file mode 100644
index 0000000..db2add3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/fieldassist/ControlDecorationUpdater.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 268472)
+ *     Matthew Hall - bug 300953
+ ******************************************************************************/
+
+package org.eclipse.jface.databinding.fieldassist;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.fieldassist.ControlDecoration;
+import org.eclipse.jface.fieldassist.FieldDecoration;
+import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * Controls the appearance of a ControlDecoration managed by a
+ * ControlDecorationSupport.
+ * 
+ * @since 1.4
+ */
+public class ControlDecorationUpdater {
+	/**
+	 * Updates the visibility, image, and description text of the given
+	 * ControlDecoration to represent the given status.
+	 * 
+	 * @param decoration
+	 *            the ControlDecoration to update
+	 * @param status
+	 *            the status to be displayed by the decoration
+	 */
+	protected void update(ControlDecoration decoration, IStatus status) {
+		if (status == null || status.isOK()) {
+			decoration.hide();
+		} else {
+			decoration.setImage(getImage(status));
+			decoration.setDescriptionText(getDescriptionText(status));
+			decoration.show();
+		}
+	}
+
+	/**
+	 * Returns the description text to show in a ControlDecoration for the given
+	 * status. The default implementation of this method returns
+	 * status.getMessage().
+	 * 
+	 * @param status
+	 *            the status object.
+	 * @return the description text to show in a ControlDecoration for the given
+	 *         status.
+	 */
+	protected String getDescriptionText(IStatus status) {
+		return status == null ? "" : status.getMessage(); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns an image to display in a ControlDecoration which is appropriate
+	 * for the given status. The default implementation of this method returns
+	 * an image according to <code>status.getSeverity()</code>:
+	 * <ul>
+	 * <li>IStatus.OK => No image
+	 * <li>IStatus.INFO => FieldDecorationRegistry.DEC_INFORMATION
+	 * <li>IStatus.WARNING => FieldDecorationRegistry.DEC_WARNING
+	 * <li>IStatus.ERROR => FieldDecorationRegistry.DEC_ERROR
+	 * <li>IStatus.CANCEL => FieldDecorationRegistry.DEC_ERROR
+	 * <li>Other => No image
+	 * </ul>
+	 * 
+	 * @param status
+	 *            the status object.
+	 * @return an image to display in a ControlDecoration which is appropriate
+	 *         for the given status.
+	 */
+	protected Image getImage(IStatus status) {
+		if (status == null)
+			return null;
+
+		String fieldDecorationID = null;
+		switch (status.getSeverity()) {
+		case IStatus.INFO:
+			fieldDecorationID = FieldDecorationRegistry.DEC_INFORMATION;
+			break;
+		case IStatus.WARNING:
+			fieldDecorationID = FieldDecorationRegistry.DEC_WARNING;
+			break;
+		case IStatus.ERROR:
+		case IStatus.CANCEL:
+			fieldDecorationID = FieldDecorationRegistry.DEC_ERROR;
+			break;
+		}
+
+		FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
+				.getFieldDecoration(fieldDecorationID);
+		return fieldDecoration == null ? null : fieldDecoration.getImage();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/preference/PreferencePageSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/preference/PreferencePageSupport.java
index 1fd1820..34dca0a 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/preference/PreferencePageSupport.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/preference/PreferencePageSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,12 +24,9 @@ import org.eclipse.jface.preference.PreferencePage;
  * @since 1.3
  */
 public class PreferencePageSupport extends DialogPageSupport {
-	private PreferencePage preferencePage;
-
 	private PreferencePageSupport(PreferencePage preferencePage,
 			DataBindingContext dbc) {
 		super(preferencePage, dbc);
-		this.preferencePage = preferencePage;
 	}
 
 	/**
@@ -59,6 +56,6 @@ public class PreferencePageSupport extends DialogPageSupport {
 		} else if (currentStatus != null) {
 			valid = !currentStatus.matches(IStatus.ERROR | IStatus.CANCEL);
 		}
-		preferencePage.setValid(valid);
+		((PreferencePage) getDialogPage()).setValid(valid);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetValueProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetValueProperty.java
index 38ba16f..00cffa7 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetValueProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetValueProperty.java
@@ -15,14 +15,10 @@ package org.eclipse.jface.databinding.swt;
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.INativePropertyListener;
-import org.eclipse.core.databinding.property.IProperty;
 import org.eclipse.core.databinding.property.ISimplePropertyListener;
-import org.eclipse.core.databinding.property.NativePropertyListener;
 import org.eclipse.core.databinding.property.value.SimpleValueProperty;
 import org.eclipse.jface.internal.databinding.swt.SWTObservableValueDecorator;
-import org.eclipse.jface.internal.databinding.swt.WidgetListenerUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
+import org.eclipse.jface.internal.databinding.swt.WidgetListener;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Widget;
 
@@ -95,77 +91,9 @@ public abstract class WidgetValueProperty extends SimpleValueProperty implements
 
 	public INativePropertyListener adaptListener(
 			ISimplePropertyListener listener) {
-		return changeEvents == null && staleEvents == null ? null
-				: new WidgetListener(this, listener);
-	}
-
-	private class WidgetListener extends NativePropertyListener implements
-			Listener {
-		protected WidgetListener(IProperty property,
-				ISimplePropertyListener listener) {
-			super(property, listener);
-		}
-
-		public void handleEvent(Event event) {
-			if (staleEvents != null)
-				for (int i = 0; i < staleEvents.length; i++)
-					if (event.type == staleEvents[i]) {
-						fireStale(event.widget);
-						break;
-					}
-
-			if (changeEvents != null)
-				for (int i = 0; i < changeEvents.length; i++)
-					if (event.type == changeEvents[i]) {
-						fireChange(event.widget, null);
-						break;
-					}
-		}
-
-		protected void doAddTo(Object source) {
-			Widget widget = (Widget) source;
-			if (changeEvents != null) {
-				for (int i = 0; i < changeEvents.length; i++) {
-					int event = changeEvents[i];
-					if (event != SWT.None) {
-						WidgetListenerUtil
-								.asyncAddListener(widget, event, this);
-					}
-				}
-			}
-			if (staleEvents != null) {
-				for (int i = 0; i < staleEvents.length; i++) {
-					int event = staleEvents[i];
-					if (event != SWT.None) {
-						WidgetListenerUtil
-								.asyncAddListener(widget, event, this);
-					}
-				}
-			}
-		}
-
-		protected void doRemoveFrom(Object source) {
-			Widget widget = (Widget) source;
-			if (!widget.isDisposed()) {
-				if (changeEvents != null) {
-					for (int i = 0; i < changeEvents.length; i++) {
-						int event = changeEvents[i];
-						if (event != SWT.None)
-							WidgetListenerUtil.asyncRemoveListener(widget,
-									event, this);
-					}
-				}
-				if (staleEvents != null) {
-					for (int i = 0; i < staleEvents.length; i++) {
-						int event = staleEvents[i];
-						if (event != SWT.None) {
-							WidgetListenerUtil.asyncRemoveListener(widget,
-									event, this);
-						}
-					}
-				}
-			}
-		}
+		if (changeEvents == null && staleEvents == null)
+			return null;
+		return new WidgetListener(this, listener, changeEvents, staleEvents);
 	}
 
 	public IObservableValue observe(Object source) {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapCellLabelProvider.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapCellLabelProvider.java
index 1313cb2..6ef1d31 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapCellLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapCellLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,8 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Brad Reynolds - bug 164247
- *     Brad Reynolds - bug 164134
+ *     Brad Reynolds - bugs 164247, 164134
+ *     Matthew Hall - bug 302860
  *******************************************************************************/
 
 package org.eclipse.jface.databinding.viewers;
@@ -33,7 +33,13 @@ import org.eclipse.jface.viewers.ViewerCell;
  */
 public class ObservableMapCellLabelProvider extends CellLabelProvider {
 
-	private IObservableMap[] attributeMaps;
+	/**
+	 * Observable maps typically mapping from viewer elements to label values.
+	 * Subclasses may use these maps to provide custom labels.
+	 * 
+	 * @since 1.4
+	 */
+	protected IObservableMap[] attributeMaps;
 
 	private IMapChangeListener mapChangeListener = new IMapChangeListener() {
 		public void handleMapChange(MapChangeEvent event) {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java
index 2d12975..7e7066c 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableMapLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,8 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Brad Reynolds - bug 164247
- *     Brad Reynolds - bug 164134
+ *     Brad Reynolds - bugs 164247, 164134
+ *     Matthew Hall - bug 302860
  *******************************************************************************/
 
 package org.eclipse.jface.databinding.viewers;
@@ -37,7 +37,13 @@ import org.eclipse.swt.graphics.Image;
 public class ObservableMapLabelProvider extends LabelProvider implements
 		ILabelProvider, ITableLabelProvider {
 
-	private final IObservableMap[] attributeMaps;
+	/**
+	 * Observable maps typically mapping from viewer elements to label values.
+	 * Subclasses may reference these maps to provide custom labels.
+	 * 
+	 * @since 1.4
+	 */
+	protected IObservableMap[] attributeMaps;
 
 	private IMapChangeListener mapChangeListener = new IMapChangeListener() {
 		public void handleMapChange(MapChangeEvent event) {
@@ -72,10 +78,12 @@ public class ObservableMapLabelProvider extends LabelProvider implements
 			attributeMaps[i].removeMapChangeListener(mapChangeListener);
 		}
 		super.dispose();
+		this.attributeMaps = null;
+		this.mapChangeListener = null;
 	}
 
 	public Image getImage(Object element) {
-		return null;
+		return getColumnImage(element, 0);
 	}
 
 	public String getText(Object element) {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java
index b27e200..020fbec 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,7 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Matthew Hall - bugs 234496, 284366
+ *     Matthew Hall - bug 234496
  *******************************************************************************/
 
 package org.eclipse.jface.databinding.viewers;
@@ -148,19 +148,25 @@ public abstract class ObservableValueEditingSupport extends EditingSupport {
 	final protected void initializeCellEditorValue(CellEditor cellEditor,
 			ViewerCell cell) {
 		IObservableValue target = doCreateCellEditorObservable(cellEditor);
-		Assert
-				.isNotNull(target,
-						"doCreateCellEditorObservable(...) did not return an observable"); //$NON-NLS-1$
+		Assert.isNotNull(target,
+				"doCreateCellEditorObservable(...) did not return an observable"); //$NON-NLS-1$
 
 		IObservableValue model = doCreateElementObservable(cell.getElement(),
 				cell);
 		Assert.isNotNull(model,
 				"doCreateElementObservable(...) did not return an observable"); //$NON-NLS-1$
 
+		dirty = false;
+
 		Binding binding = createBinding(target, model);
-		Assert
-				.isNotNull(binding,
-						"createBinding(...) did not return a binding"); //$NON-NLS-1$
+
+		target.addChangeListener(new IChangeListener() {
+			public void handleChange(ChangeEvent event) {
+				dirty = true;
+			}
+		});
+
+		Assert.isNotNull(binding, "createBinding(...) did not return a binding"); //$NON-NLS-1$
 
 		editingState = new EditingState(binding, target, model);
 
@@ -199,15 +205,8 @@ public abstract class ObservableValueEditingSupport extends EditingSupport {
 	 */
 	protected Binding createBinding(IObservableValue target,
 			IObservableValue model) {
-		dirty = false;
-		Binding binding = dbc.bindValue(target, model, new UpdateValueStrategy(
+		return dbc.bindValue(target, model, new UpdateValueStrategy(
 				UpdateValueStrategy.POLICY_CONVERT), null);
-		target.addChangeListener(new IChangeListener() {
-			public void handleChange(ChangeEvent event) {
-				dirty = true;
-			}
-		});
-		return binding;
 	}
 
 	boolean dirty = false;
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewerProperties.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewerProperties.java
index b37ff5d..398a72d 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewerProperties.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewerProperties.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bug 264286
+ *     Ovidio Mallo - bug 270494
  ******************************************************************************/
 
 package org.eclipse.jface.databinding.viewers;
@@ -20,6 +21,7 @@ import org.eclipse.jface.internal.databinding.viewers.ViewerInputProperty;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.CheckboxTreeViewer;
 import org.eclipse.jface.viewers.ICheckable;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.Viewer;
@@ -74,7 +76,20 @@ public class ViewerProperties {
 	 *         {@link ISelectionProvider}.
 	 */
 	public static IViewerListProperty multipleSelection() {
-		return new SelectionProviderMultipleSelectionProperty();
+		return new SelectionProviderMultipleSelectionProperty(false);
+	}
+
+	/**
+	 * Returns a list property for observing the multiple <i>post</i> selection
+	 * of an {@link IPostSelectionProvider}.
+	 * 
+	 * @return a list property for observing the multiple <i>post</i> selection
+	 *         of an {@link IPostSelectionProvider}.
+	 * 
+	 * @since 1.4
+	 */
+	public static IViewerListProperty multiplePostSelection() {
+		return new SelectionProviderMultipleSelectionProperty(true);
 	}
 
 	/**
@@ -85,6 +100,19 @@ public class ViewerProperties {
 	 *         {@link ISelectionProvider}.
 	 */
 	public static IViewerValueProperty singleSelection() {
-		return new SelectionProviderSingleSelectionProperty();
+		return new SelectionProviderSingleSelectionProperty(false);
+	}
+
+	/**
+	 * Returns a value property for observing the single <i>post</i> selection
+	 * of a {@link IPostSelectionProvider}.
+	 * 
+	 * @return a value property for observing the single <i>post</i> selection
+	 *         of a {@link IPostSelectionProvider}.
+	 * 
+	 * @since 1.4
+	 */
+	public static IViewerValueProperty singlePostSelection() {
+		return new SelectionProviderSingleSelectionProperty(true);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java
index ea51875..0f36401 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Matthew Hall - bugs 206839, 124684, 239302, 245647, 194734, 195222,
  *                    264286
+ *     Ovidio Mallo - bug 270494
  *******************************************************************************/
 
 package org.eclipse.jface.databinding.viewers;
@@ -21,6 +22,7 @@ import org.eclipse.jface.internal.databinding.viewers.ViewerObservableValueDecor
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.CheckboxTreeViewer;
 import org.eclipse.jface.viewers.ICheckable;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
@@ -82,6 +84,28 @@ public class ViewersObservables {
 	}
 
 	/**
+	 * Returns an observable value that tracks the current <i>post</i> selection
+	 * of the given post selection provider. If the selection provider provides
+	 * selections of type {@link IStructuredSelection}, the observable value
+	 * will be the first element of the structured selection as returned by
+	 * {@link IStructuredSelection#getFirstElement()}.
+	 * 
+	 * @param selectionProvider
+	 *            The selection provider on which to track the <i>post</i>
+	 *            selection.
+	 * @return the observable value tracking the (single) <i>post</i> selection
+	 *         of the given post selection provider
+	 * 
+	 * @since 1.4
+	 */
+	public static IObservableValue observeSinglePostSelection(
+			IPostSelectionProvider selectionProvider) {
+		checkNull(selectionProvider);
+		return ViewerProperties.singlePostSelection()
+				.observe(selectionProvider);
+	}
+
+	/**
 	 * Returns an observable list that tracks the current selection of the given
 	 * selection provider. Assumes that the selection provider provides
 	 * selections of type {@link IStructuredSelection}. Note that the observable
@@ -106,6 +130,33 @@ public class ViewersObservables {
 	}
 
 	/**
+	 * Returns an observable list that tracks the current <i>post</i> selection
+	 * of the given post selection provider. Assumes that the selection provider
+	 * provides selections of type {@link IStructuredSelection}. Note that the
+	 * observable list will not honor the full contract of
+	 * <code>java.util.List</code> in that it may delete or reorder elements
+	 * based on what the selection provider returns from
+	 * {@link ISelectionProvider#getSelection()} after having called
+	 * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)}
+	 * based on the requested change to the observable list. The affected
+	 * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>.
+	 * 
+	 * @param selectionProvider
+	 *            The selection provider on which to track the <i>post</i>
+	 *            selection.
+	 * @return the observable value tracking the (multi) <i>post</i> selection
+	 *         of the given post selection provider
+	 * 
+	 * @since 1.4
+	 */
+	public static IObservableList observeMultiPostSelection(
+			IPostSelectionProvider selectionProvider) {
+		checkNull(selectionProvider);
+		return ViewerProperties.multiplePostSelection().observe(
+				selectionProvider);
+	}
+
+	/**
 	 * Returns an observable value that tracks the current selection of the
 	 * given viewer. If the viewer provides selections of type
 	 * {@link IStructuredSelection}, the observable value will be the first
@@ -124,6 +175,26 @@ public class ViewersObservables {
 	}
 
 	/**
+	 * Returns an observable value that tracks the current <i>post</i> selection
+	 * of the given structured viewer. If the viewer provides selections of type
+	 * {@link IStructuredSelection}, the observable value will be the first
+	 * element of the structured selection as returned by
+	 * {@link IStructuredSelection#getFirstElement()}.
+	 * 
+	 * @param viewer
+	 *            The viewer on which to track the <i>post</i> selection.
+	 * @return the observable value tracking the (single) <i>post</i> selection
+	 *         of the given structured viewer
+	 * 
+	 * @since 1.4
+	 */
+	public static IViewerObservableValue observeSinglePostSelection(
+			StructuredViewer viewer) {
+		checkNull(viewer);
+		return ViewerProperties.singlePostSelection().observe(viewer);
+	}
+
+	/**
 	 * Returns an observable list that tracks the current selection of the given
 	 * viewer. Assumes that the viewer provides selections of type
 	 * {@link IStructuredSelection}. Note that the observable list will not
@@ -146,6 +217,30 @@ public class ViewersObservables {
 	}
 
 	/**
+	 * Returns an observable list that tracks the current <i>post</i> selection
+	 * of the given structured viewer. Assumes that the viewer provides
+	 * selections of type {@link IStructuredSelection}. Note that the observable
+	 * list will not honor the full contract of <code>java.util.List</code> in
+	 * that it may delete or reorder elements based on what the viewer returns
+	 * from {@link ISelectionProvider#getSelection()} after having called
+	 * {@link ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)}
+	 * based on the requested change to the observable list. The affected
+	 * methods are <code>add</code>, <code>addAll</code>, and <code>set</code>.
+	 * 
+	 * @param viewer
+	 *            The viewer on which to track the <i>post</i> selection.
+	 * @return the observable value tracking the (multi) <i>post</i> selection
+	 *         of the given structured viewer
+	 * 
+	 * @since 1.4
+	 */
+	public static IViewerObservableList observeMultiPostSelection(
+			StructuredViewer viewer) {
+		checkNull(viewer);
+		return ViewerProperties.multiplePostSelection().observe(viewer);
+	}
+
+	/**
 	 * Returns an observable value that tracks the input of the given viewer.
 	 * <p>
 	 * The returned observer is blind to changes in the viewer's input unless
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationSupport.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationSupport.java
deleted file mode 100644
index 0112e38..0000000
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationSupport.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Matthew Hall - initial API and implementation (bug 268472
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.fieldassist;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.databinding.ValidationStatusProvider;
-import org.eclipse.core.databinding.observable.DisposeEvent;
-import org.eclipse.core.databinding.observable.IDecoratingObservable;
-import org.eclipse.core.databinding.observable.IDisposeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IObserving;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiffVisitor;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.databinding.swt.ISWTObservable;
-import org.eclipse.jface.databinding.viewers.IViewerObservable;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * <b>EXPERIMENTAL</b>: This class is not API. It is experimental and subject to
- * arbitrary change, including removal. Please provide feedback if you would
- * like to see this become API.
- * <p>
- * Decorates the underlying controls of the target observables of a
- * {@link ValidationStatusProvider} with {@link ControlDecoration}s mirroring
- * the current validation status. Only those target observables which implement
- * {@link ISWTObservable} or {@link IViewerObservable} are decorated.
- * 
- * @since 1.3
- */
-public class ControlDecorationSupport {
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * 
-	 * @param validationStatusProvider
-	 * @param position
-	 * @return .
-	 */
-	public static ControlDecorationSupport create(
-			ValidationStatusProvider validationStatusProvider, int position) {
-		return create(validationStatusProvider, position, null,
-				new ControlDecorationUpdater());
-	}
-
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * 
-	 * @param validationStatusProvider
-	 * @param position
-	 * @param composite
-	 * @return .
-	 */
-	public static ControlDecorationSupport create(
-			ValidationStatusProvider validationStatusProvider, int position,
-			Composite composite) {
-		return create(validationStatusProvider, position, composite,
-				new ControlDecorationUpdater());
-	}
-
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * 
-	 * @param validationStatusProvider
-	 * @param position
-	 * @param composite
-	 * @param updater
-	 * @return .
-	 */
-	public static ControlDecorationSupport create(
-			ValidationStatusProvider validationStatusProvider, int position,
-			Composite composite, ControlDecorationUpdater updater) {
-		return new ControlDecorationSupport(validationStatusProvider, position,
-				composite, updater);
-	}
-
-	private final int position;
-	private final Composite composite;
-	private final ControlDecorationUpdater updater;
-
-	private IObservableValue validationStatus;
-	private IObservableList targets;
-
-	private IDisposeListener disposeListener = new IDisposeListener() {
-		public void handleDispose(DisposeEvent staleEvent) {
-			dispose();
-		}
-	};
-
-	private IValueChangeListener statusChangeListener = new IValueChangeListener() {
-		public void handleValueChange(ValueChangeEvent event) {
-			statusChanged((IStatus) validationStatus.getValue());
-		}
-	};
-
-	private IListChangeListener targetsChangeListener = new IListChangeListener() {
-		public void handleListChange(ListChangeEvent event) {
-			event.diff.accept(new ListDiffVisitor() {
-				public void handleAdd(int index, Object element) {
-					targetAdded((IObservable) element);
-				}
-
-				public void handleRemove(int index, Object element) {
-					targetRemoved((IObservable) element);
-				}
-			});
-			statusChanged((IStatus) validationStatus.getValue());
-		}
-	};
-
-	private static class TargetDecoration {
-		public final IObservable target;
-		public final ControlDecoration decoration;
-
-		TargetDecoration(IObservable target, ControlDecoration decoration) {
-			this.target = target;
-			this.decoration = decoration;
-		}
-	}
-
-	private List targetDecorations;
-
-	private ControlDecorationSupport(
-			ValidationStatusProvider validationStatusProvider, int position,
-			Composite composite, ControlDecorationUpdater updater) {
-		this.position = position;
-		this.composite = composite;
-		this.updater = updater;
-
-		this.validationStatus = validationStatusProvider.getValidationStatus();
-		Assert.isTrue(!this.validationStatus.isDisposed());
-
-		this.targets = validationStatusProvider.getTargets();
-		Assert.isTrue(!this.targets.isDisposed());
-
-		this.targetDecorations = new ArrayList();
-
-		validationStatus.addDisposeListener(disposeListener);
-		validationStatus.addValueChangeListener(statusChangeListener);
-
-		targets.addDisposeListener(disposeListener);
-		targets.addListChangeListener(targetsChangeListener);
-
-		for (Iterator it = targets.iterator(); it.hasNext();)
-			targetAdded((IObservable) it.next());
-
-		statusChanged((IStatus) validationStatus.getValue());
-	}
-
-	private void targetAdded(IObservable target) {
-		Control control = findControl(target);
-		if (control != null)
-			targetDecorations.add(new TargetDecoration(target,
-					new ControlDecoration(control, position, composite)));
-	}
-
-	private void targetRemoved(IObservable target) {
-		for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
-			TargetDecoration targetDecoration = (TargetDecoration) it.next();
-			if (targetDecoration.target == target) {
-				targetDecoration.decoration.dispose();
-				it.remove();
-			}
-		}
-	}
-
-	private Control findControl(IObservable target) {
-		if (target instanceof ISWTObservable) {
-			Widget widget = ((ISWTObservable) target).getWidget();
-			if (widget instanceof Control)
-				return (Control) widget;
-		}
-
-		if (target instanceof IViewerObservable) {
-			Viewer viewer = ((IViewerObservable) target).getViewer();
-			return viewer.getControl();
-		}
-
-		if (target instanceof IDecoratingObservable) {
-			IObservable decorated = ((IDecoratingObservable) target)
-					.getDecorated();
-			Control control = findControl(decorated);
-			if (control != null)
-				return control;
-		}
-
-		if (target instanceof IObserving) {
-			Object observed = ((IObserving) target).getObserved();
-			if (observed instanceof IObservable)
-				return findControl((IObservable) observed);
-		}
-
-		return null;
-	}
-
-	private void statusChanged(IStatus status) {
-		for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
-			TargetDecoration targetDecoration = (TargetDecoration) it.next();
-			ControlDecoration decoration = targetDecoration.decoration;
-			updater.update(decoration, status);
-		}
-	}
-
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * <p>
-	 * Disposes this ControlDecorationSupport, including all control decorations
-	 * managed by it. A ControlDecorationSupport is automatically disposed when
-	 * its target ValidationStatusProvider is disposed.
-	 */
-	public void dispose() {
-		if (validationStatus != null) {
-			validationStatus.removeDisposeListener(disposeListener);
-			validationStatus.removeValueChangeListener(statusChangeListener);
-			validationStatus = null;
-		}
-
-		if (targets != null) {
-			targets.removeDisposeListener(disposeListener);
-			targets.removeListChangeListener(targetsChangeListener);
-			targets = null;
-		}
-
-		disposeListener = null;
-		statusChangeListener = null;
-		targetsChangeListener = null;
-
-		if (targetDecorations != null) {
-			for (Iterator it = targetDecorations.iterator(); it.hasNext();) {
-				TargetDecoration targetDecoration = (TargetDecoration) it
-						.next();
-				targetDecoration.decoration.dispose();
-			}
-			targetDecorations.clear();
-			targetDecorations = null;
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationUpdater.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationUpdater.java
deleted file mode 100644
index 9e2cf9f..0000000
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/fieldassist/ControlDecorationUpdater.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Matthew Hall - initial API and implementation (bug 268472)
- ******************************************************************************/
-
-package org.eclipse.jface.internal.databinding.provisional.fieldassist;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <b>EXPERIMENTAL</b>: This class is not API. It is experimental and subject to
- * arbitrary change, including removal. Please provide feedback if you would
- * like to see this become API.
- * <p>
- * Controls the appearance of a ControlDecoration managed by a
- * ControlDecorationSupport.
- * 
- * @since 1.3
- */
-public class ControlDecorationUpdater {
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * <p>
-	 * Updates the visibility, image, and description text of the given
-	 * ControlDecoration to represent the given status.
-	 * 
-	 * @param decoration
-	 *            the ControlDecoration to update
-	 * @param status
-	 *            the status to be displayed by the decoration
-	 */
-	protected void update(ControlDecoration decoration, IStatus status) {
-		if (status == null || status.isOK()) {
-			decoration.hide();
-		} else {
-			decoration.setImage(getImage(status));
-			decoration.setDescriptionText(getDescriptionText(status));
-			decoration.show();
-		}
-	}
-
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * <p>
-	 * Returns the description text to show in a ControlDecoration for the given
-	 * status. The default implementation of this method returns
-	 * status.getMessage().
-	 * 
-	 * @param status
-	 *            the status object.
-	 * @return the description text to show in a ControlDecoration for the given
-	 *         status.
-	 */
-	protected String getDescriptionText(IStatus status) {
-		return status == null ? "" : status.getMessage(); //$NON-NLS-1$
-	}
-
-	/**
-	 * <b>EXPERIMENTAL</b>: This method is not API. It is experimental and
-	 * subject to arbitrary change, including removal. Please provide feedback
-	 * if you would like to see this become API.
-	 * <p>
-	 * Returns an image to display in a ControlDecoration which is appropriate
-	 * for the given status. The default implementation of this method returns
-	 * an image according to <code>status.getSeverity()</code>:
-	 * <ul>
-	 * <li>IStatus.OK => No image
-	 * <li>IStatus.INFO => FieldDecorationRegistry.DEC_INFORMATION
-	 * <li>IStatus.WARNING => FieldDecorationRegistry.DEC_WARNING
-	 * <li>IStatus.ERROR => FieldDecorationRegistry.DEC_ERROR
-	 * <li>IStatus.CANCEL => FieldDecorationRegistry.DEC_ERROR
-	 * <li>Other => No image
-	 * </ul>
-	 * 
-	 * @param status
-	 *            the status object.
-	 * @return an image to display in a ControlDecoration which is appropriate
-	 *         for the given status.
-	 */
-	protected Image getImage(IStatus status) {
-		if (status == null)
-			return null;
-
-		String fieldDecorationID = null;
-		switch (status.getSeverity()) {
-		case IStatus.INFO:
-			fieldDecorationID = FieldDecorationRegistry.DEC_INFORMATION;
-			break;
-		case IStatus.WARNING:
-			fieldDecorationID = FieldDecorationRegistry.DEC_WARNING;
-			break;
-		case IStatus.ERROR:
-		case IStatus.CANCEL:
-			fieldDecorationID = FieldDecorationRegistry.DEC_ERROR;
-			break;
-		}
-
-		FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
-				.getFieldDecoration(fieldDecorationID);
-		return fieldDecoration == null ? null : fieldDecoration.getImage();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/CompositeUpdater.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/CompositeUpdater.java
index 2927e3d..8ccf7f5 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/CompositeUpdater.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/CompositeUpdater.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Boris Bokowski, IBM Corporation - initial API and implementation
+ *     Matthew Hall - bug 251424
  *******************************************************************************/
 package org.eclipse.jface.internal.databinding.provisional.swt;
 
@@ -29,7 +30,9 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Widget;
 
 /**
- * NON-API - This class can be used to update a composite with automatic dependency tracking.
+ * NON-API - This class can be used to update a composite with automatic
+ * dependency tracking.
+ * 
  * @since 1.1
  * 
  */
@@ -94,10 +97,11 @@ public abstract class CompositeUpdater {
 			}
 		}
 	}
-	
+
 	private class LayoutRunnable implements Runnable {
 		private boolean posted = false;
 		private Set controlsToLayout = new HashSet();
+
 		void add(Control toLayout) {
 			controlsToLayout.add(toLayout);
 			if (!posted) {
@@ -105,18 +109,23 @@ public abstract class CompositeUpdater {
 				theComposite.getDisplay().asyncExec(this);
 			}
 		}
+
 		public void run() {
 			posted = false;
-			theComposite.getShell().layout((Control[])controlsToLayout.toArray(new Control[controlsToLayout.size()]));
+			theComposite.getShell().layout(
+					(Control[]) controlsToLayout
+							.toArray(new Control[controlsToLayout.size()]));
 			controlsToLayout.clear();
 		}
 	}
-	
+
 	private LayoutRunnable layoutRunnable = new LayoutRunnable();
-	
+
 	/**
-	 * To be called from {@link #updateWidget(Widget, Object)} or {@link #createWidget(int)}
-	 * if this updater's composite's layout may need to be updated. 
+	 * To be called from {@link #updateWidget(Widget, Object)} or
+	 * {@link #createWidget(int)} if this updater's composite's layout may need
+	 * to be updated.
+	 * 
 	 * @param control
 	 * @since 1.2
 	 */
@@ -137,7 +146,8 @@ public abstract class CompositeUpdater {
 			for (int i = 0; i < diffs.length; i++) {
 				ListDiffEntry listDiffEntry = diffs[i];
 				if (listDiffEntry.isAddition()) {
-					createChild(listDiffEntry.getElement(), listDiffEntry.getPosition());
+					createChild(listDiffEntry.getElement(), listDiffEntry
+							.getPosition());
 				} else {
 					disposeWidget(listDiffEntry.getPosition());
 				}
@@ -169,15 +179,17 @@ public abstract class CompositeUpdater {
 
 		model.addListChangeListener(privateInterface);
 		theComposite.addDisposeListener(privateInterface);
-		ObservableTracker.runAndIgnore(new Runnable(){
-			public void run() {
-				int index = 0;
-				for (Iterator it = CompositeUpdater.this.model.iterator(); it.hasNext();) {
-					Object element = it.next();
-					createChild(element, index++);
-				}
+		ObservableTracker.setIgnore(true);
+		try {
+			int index = 0;
+			for (Iterator it = CompositeUpdater.this.model.iterator(); it
+					.hasNext();) {
+				Object element = it.next();
+				createChild(element, index++);
 			}
-		});
+		} finally {
+			ObservableTracker.setIgnore(false);
+		}
 	}
 
 	/**
@@ -235,7 +247,8 @@ public abstract class CompositeUpdater {
 
 	void createChild(Object element, int index) {
 		Widget newChild = createWidget(index);
-		final UpdateRunnable updateRunnable = new UpdateRunnable(newChild, element);
+		final UpdateRunnable updateRunnable = new UpdateRunnable(newChild,
+				element);
 		newChild.setData(updateRunnable);
 		updateRunnable.updateIfNecessary();
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboItemsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboItemsProperty.java
index 40d8ca1..2a6de88 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboItemsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboItemsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,7 @@ import org.eclipse.swt.widgets.Control;
  * 
  */
 public class CComboItemsProperty extends ControlStringListProperty {
-	protected void doSetStringList(final Control control, String[] list,
-			ListDiff diff) {
+	protected void doUpdateStringList(final Control control, ListDiff diff) {
 		diff.accept(new ListDiffVisitor() {
 			CCombo combo = (CCombo) control;
 
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboSingleSelectionIndexProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboSingleSelectionIndexProperty.java
index d456899..168c94a 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboSingleSelectionIndexProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/CComboSingleSelectionIndexProperty.java
@@ -18,7 +18,7 @@ import org.eclipse.swt.custom.CCombo;
  * @since 3.3
  * 
  */
-public class CComboSingleSelectionIndexProperty extends WidgetIntValueProperty {
+public class CComboSingleSelectionIndexProperty extends SingleSelectionIndexProperty {
 	/**
 	 * 
 	 */
@@ -31,7 +31,10 @@ public class CComboSingleSelectionIndexProperty extends WidgetIntValueProperty {
 	}
 
 	void doSetIntValue(Object source, int value) {
-		((CCombo) source).select(value);
+		if (value == -1)
+			((CCombo) source).deselectAll();
+		else
+			((CCombo) source).select(value);
 	}
 
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboItemsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboItemsProperty.java
index 9743a35..12c8588 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboItemsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboItemsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,7 @@ import org.eclipse.swt.widgets.Control;
  * 
  */
 public class ComboItemsProperty extends ControlStringListProperty {
-	protected void doSetStringList(final Control control, String[] list,
-			ListDiff diff) {
+	protected void doUpdateStringList(final Control control, ListDiff diff) {
 		diff.accept(new ListDiffVisitor() {
 			Combo combo = (Combo) control;
 
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboSingleSelectionIndexProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboSingleSelectionIndexProperty.java
index 3aa70d4..ab5bc16 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboSingleSelectionIndexProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ComboSingleSelectionIndexProperty.java
@@ -18,7 +18,8 @@ import org.eclipse.swt.widgets.Combo;
  * @since 3.3
  * 
  */
-public class ComboSingleSelectionIndexProperty extends WidgetIntValueProperty {
+public class ComboSingleSelectionIndexProperty extends
+		SingleSelectionIndexProperty {
 	/**
 	 * 
 	 */
@@ -31,7 +32,10 @@ public class ComboSingleSelectionIndexProperty extends WidgetIntValueProperty {
 	}
 
 	void doSetIntValue(Object source, int value) {
-		((Combo) source).select(value);
+		if (value == -1)
+			((Combo) source).deselectAll();
+		else
+			((Combo) source).select(value);
 	}
 
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlFocusedProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlFocusedProperty.java
index 5498f7f..caa5f58 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlFocusedProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlFocusedProperty.java
@@ -12,8 +12,13 @@
 
 package org.eclipse.jface.internal.databinding.swt;
 
+import org.eclipse.core.databinding.observable.Diffs;
+import org.eclipse.core.databinding.property.INativePropertyListener;
+import org.eclipse.core.databinding.property.IProperty;
+import org.eclipse.core.databinding.property.ISimplePropertyListener;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
 
 /**
  * @since 3.3
@@ -24,7 +29,7 @@ public class ControlFocusedProperty extends WidgetBooleanValueProperty {
 	 * 
 	 */
 	public ControlFocusedProperty() {
-		super(new int[] { SWT.FocusIn, SWT.FocusOut });
+		super();
 	}
 
 	public boolean doGetBooleanValue(Object source) {
@@ -36,6 +41,39 @@ public class ControlFocusedProperty extends WidgetBooleanValueProperty {
 			((Control) source).setFocus();
 	}
 
+	public INativePropertyListener adaptListener(
+			ISimplePropertyListener listener) {
+		int[] events = { SWT.FocusIn, SWT.FocusOut };
+		return new ControlFocusListener(this, listener, events, null);
+	}
+
+	private class ControlFocusListener extends WidgetListener {
+		/**
+		 * @param property
+		 * @param listener
+		 * @param changeEvents
+		 * @param staleEvents
+		 */
+		private ControlFocusListener(IProperty property,
+				ISimplePropertyListener listener, int[] changeEvents,
+				int[] staleEvents) {
+			super(property, listener, changeEvents, staleEvents);
+		}
+
+		public void handleEvent(Event event) {
+			switch (event.type) {
+			case SWT.FocusIn:
+				fireChange(event.widget, Diffs.createValueDiff(Boolean.FALSE,
+						Boolean.TRUE));
+				break;
+			case SWT.FocusOut:
+				fireChange(event.widget, Diffs.createValueDiff(Boolean.TRUE,
+						Boolean.FALSE));
+				break;
+			}
+		}
+	}
+
 	public String toString() {
 		return "Control.focus <boolean>"; //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java
index f6ac1a0..b06d8e4 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ControlStringListProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,11 +31,14 @@ public abstract class ControlStringListProperty extends WidgetListProperty {
 	}
 
 	protected void doSetList(Object source, List list, ListDiff diff) {
-		String[] strings = (String[]) list.toArray(new String[list.size()]);
-		doSetStringList((Control) source, strings, diff);
+		doUpdateList(source, diff);
 	}
 
-	abstract void doSetStringList(Control control, String[] list, ListDiff diff);
+	protected void doUpdateList(Object source, ListDiff diff) {
+		doUpdateStringList((Control) source, diff);
+	}
+
+	abstract void doUpdateStringList(Control control, ListDiff diff);
 
 	protected List doGetList(Object source) {
 		String[] list = doGetStringList((Control) source);
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListItemsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListItemsProperty.java
index 335bae9..c5e3035 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListItemsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListItemsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,7 @@ import org.eclipse.swt.widgets.List;
  * 
  */
 public class ListItemsProperty extends ControlStringListProperty {
-	protected void doSetStringList(final Control control, String[] items,
-			ListDiff diff) {
+	protected void doUpdateStringList(final Control control, ListDiff diff) {
 		diff.accept(new ListDiffVisitor() {
 			List list = (List) control;
 
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListSingleSelectionIndexProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListSingleSelectionIndexProperty.java
index 07eecf2..33e9680 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListSingleSelectionIndexProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ListSingleSelectionIndexProperty.java
@@ -18,7 +18,8 @@ import org.eclipse.swt.widgets.List;
  * @since 3.3
  * 
  */
-public class ListSingleSelectionIndexProperty extends WidgetIntValueProperty {
+public class ListSingleSelectionIndexProperty extends
+		SingleSelectionIndexProperty {
 	/**
 	 * 
 	 */
@@ -31,7 +32,10 @@ public class ListSingleSelectionIndexProperty extends WidgetIntValueProperty {
 	}
 
 	void doSetIntValue(Object source, int value) {
-		((List) source).setSelection(value);
+		if (value == -1)
+			((List) source).deselectAll();
+		else
+			((List) source).setSelection(value);
 	}
 
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SWTDelayedObservableValueDecorator.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SWTDelayedObservableValueDecorator.java
index f78b8b2..2f7031b 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SWTDelayedObservableValueDecorator.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SWTDelayedObservableValueDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 Matthew Hall and others.
+ * Copyright (c) 2007, 2009 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SingleSelectionIndexProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SingleSelectionIndexProperty.java
new file mode 100644
index 0000000..742f930
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/SingleSelectionIndexProperty.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation (bug 288642)
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+/**
+ * @since 3.3
+ * 
+ */
+public abstract class SingleSelectionIndexProperty extends
+		WidgetIntValueProperty {
+	/**
+	 * @param events
+	 */
+	public SingleSelectionIndexProperty(int[] events) {
+		super(events);
+	}
+
+	protected void doSetValue(Object source, Object value) {
+		super.doSetValue(source, value == null ? new Integer(-1) : value);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableSingleSelectionIndexProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableSingleSelectionIndexProperty.java
index 30d42f3..1715338 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableSingleSelectionIndexProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/TableSingleSelectionIndexProperty.java
@@ -18,7 +18,8 @@ import org.eclipse.swt.widgets.Table;
  * @since 3.3
  * 
  */
-public class TableSingleSelectionIndexProperty extends WidgetIntValueProperty {
+public class TableSingleSelectionIndexProperty extends
+		SingleSelectionIndexProperty {
 	/**
 	 * 
 	 */
@@ -31,7 +32,10 @@ public class TableSingleSelectionIndexProperty extends WidgetIntValueProperty {
 	}
 
 	void doSetIntValue(Object source, int value) {
-		((Table) source).setSelection(value);
+		if (value == -1)
+			((Table) source).deselectAll();
+		else
+			((Table) source).setSelection(value);
 	}
 
 	public String toString() {
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetListener.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetListener.java
new file mode 100644
index 0000000..6fb036a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/WidgetListener.java
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2009 Matthew Hall and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Matthew Hall - initial API and implementation
+ *         (from WidgetValueProperty.java)
+ *     Matthew Hall - bug 294810
+ ******************************************************************************/
+
+package org.eclipse.jface.internal.databinding.swt;
+
+import org.eclipse.core.databinding.property.IProperty;
+import org.eclipse.core.databinding.property.ISimplePropertyListener;
+import org.eclipse.core.databinding.property.NativePropertyListener;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * @since 3.3
+ */
+public class WidgetListener extends NativePropertyListener implements Listener {
+	private final int[] changeEvents;
+	private final int[] staleEvents;
+
+	/**
+	 * @param property
+	 * @param listener
+	 * @param changeEvents
+	 * @param staleEvents
+	 */
+	public WidgetListener(IProperty property, ISimplePropertyListener listener,
+			int[] changeEvents, int[] staleEvents) {
+		super(property, listener);
+		this.changeEvents = changeEvents;
+		this.staleEvents = staleEvents;
+	}
+
+	public void handleEvent(Event event) {
+		if (staleEvents != null)
+			for (int i = 0; i < staleEvents.length; i++)
+				if (event.type == staleEvents[i]) {
+					fireStale(event.widget);
+					break;
+				}
+
+		if (changeEvents != null)
+			for (int i = 0; i < changeEvents.length; i++)
+				if (event.type == changeEvents[i]) {
+					fireChange(event.widget, null);
+					break;
+				}
+	}
+
+	protected void doAddTo(Object source) {
+		Widget widget = (Widget) source;
+		if (changeEvents != null) {
+			for (int i = 0; i < changeEvents.length; i++) {
+				int event = changeEvents[i];
+				if (event != SWT.None) {
+					WidgetListenerUtil.asyncAddListener(widget, event, this);
+				}
+			}
+		}
+		if (staleEvents != null) {
+			for (int i = 0; i < staleEvents.length; i++) {
+				int event = staleEvents[i];
+				if (event != SWT.None) {
+					WidgetListenerUtil.asyncAddListener(widget, event, this);
+				}
+			}
+		}
+	}
+
+	protected void doRemoveFrom(Object source) {
+		Widget widget = (Widget) source;
+		if (!widget.isDisposed()) {
+			if (changeEvents != null) {
+				for (int i = 0; i < changeEvents.length; i++) {
+					int event = changeEvents[i];
+					if (event != SWT.None)
+						WidgetListenerUtil.asyncRemoveListener(widget, event,
+								this);
+				}
+			}
+			if (staleEvents != null) {
+				for (int i = 0; i < staleEvents.length; i++) {
+					int event = staleEvents[i];
+					if (event != SWT.None) {
+						WidgetListenerUtil.asyncRemoveListener(widget, event,
+								this);
+					}
+				}
+			}
+		}
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/util/JFaceProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/util/JFaceProperty.java
index 5c85e62..3a16be3 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/util/JFaceProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/util/JFaceProperty.java
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Matthew Hall - bug 278314
  *******************************************************************************/
 package org.eclipse.jface.internal.databinding.util;
 
@@ -16,7 +17,7 @@ import java.lang.reflect.Method;
 import org.eclipse.core.databinding.observable.value.IObservableValue;
 import org.eclipse.core.databinding.property.INativePropertyListener;
 import org.eclipse.core.databinding.property.ISimplePropertyListener;
-import org.eclipse.core.databinding.property.SimplePropertyEvent;
+import org.eclipse.core.databinding.property.NativePropertyListener;
 import org.eclipse.core.databinding.property.value.SimpleValueProperty;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
@@ -55,25 +56,19 @@ public class JFaceProperty extends SimpleValueProperty {
 		return fieldName;
 	}
 
-	class Listener implements IPropertyChangeListener, INativePropertyListener {
-		private final ISimplePropertyListener simpleListener;
-
-		/**
-		 * @param listener
-		 */
+	class Listener extends NativePropertyListener implements
+			IPropertyChangeListener {
 		public Listener(ISimplePropertyListener listener) {
-			simpleListener = listener;
+			super(JFaceProperty.this, listener);
 		}
 
 		public void propertyChange(PropertyChangeEvent event) {
 			if (event.getProperty().equals(JFaceProperty.this.property)) {
-				simpleListener.handleEvent(new SimplePropertyEvent(
-						SimplePropertyEvent.CHANGE, event.getSource(),
-						JFaceProperty.this, null));
+				fireChange(event.getSource(), null);
 			}
 		}
 
-		public void addTo(Object model) {
+		protected void doAddTo(Object model) {
 			try {
 				addPropertyListenerMethod.invoke(model, new Object[] { this });
 			} catch (Exception e) {
@@ -81,7 +76,7 @@ public class JFaceProperty extends SimpleValueProperty {
 			}
 		}
 
-		public void removeFrom(Object model) {
+		protected void doRemoveFrom(Object model) {
 			try {
 				removePropertyListenerMethod.invoke(model,
 						new Object[] { this });
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java
index 78a6688..dedb0c1 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckableCheckedElementsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,12 @@
 
 package org.eclipse.jface.internal.databinding.viewers;
 
+import java.util.Iterator;
 import java.util.Set;
 
 import org.eclipse.core.databinding.observable.Realm;
 import org.eclipse.core.databinding.observable.set.IObservableSet;
+import org.eclipse.core.databinding.observable.set.SetDiff;
 import org.eclipse.core.databinding.property.set.SetProperty;
 import org.eclipse.jface.databinding.swt.SWTObservables;
 import org.eclipse.jface.viewers.ICheckable;
@@ -41,6 +43,25 @@ public class CheckableCheckedElementsProperty extends SetProperty {
 		return elementType;
 	}
 
+	protected Set doGetSet(Object source) {
+		throw new UnsupportedOperationException(
+				"Cannot query the checked elements on an ICheckable"); //$NON-NLS-1$
+	}
+
+	protected void doSetSet(Object source, Set set) {
+		throw new UnsupportedOperationException(
+				"Cannot batch replace the checked elements on an ICheckable.  " + //$NON-NLS-1$
+						"Use updateSet(SetDiff) instead"); //$NON-NLS-1$
+	}
+
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		ICheckable checkable = (ICheckable) source;
+		for (Iterator it = diff.getAdditions().iterator(); it.hasNext();)
+			checkable.setChecked(it.next(), true);
+		for (Iterator it = diff.getRemovals().iterator(); it.hasNext();)
+			checkable.setChecked(it.next(), false);
+	}
+
 	public IObservableSet observe(Object source) {
 		if (source instanceof Viewer) {
 			return observe(SWTObservables.getRealm(((Viewer) source)
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTableViewerCheckedElementsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTableViewerCheckedElementsProperty.java
index 9ce7b07..786fac2 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTableViewerCheckedElementsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTableViewerCheckedElementsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,10 @@ public class CheckboxTableViewerCheckedElementsProperty extends
 	}
 
 	protected void doSetSet(Object source, Set set, SetDiff diff) {
+		doSetSet(source, set);
+	}
+
+	protected void doSetSet(Object source, Set set) {
 		CheckboxTableViewer viewer = (CheckboxTableViewer) source;
 		viewer.setCheckedElements(set.toArray());
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTreeViewerCheckedElementsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTreeViewerCheckedElementsProperty.java
index cce5a2c..c54268c 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTreeViewerCheckedElementsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxTreeViewerCheckedElementsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,10 @@ public class CheckboxTreeViewerCheckedElementsProperty extends
 	}
 
 	protected void doSetSet(Object source, Set set, SetDiff diff) {
+		doSetSet(source, set);
+	}
+
+	protected void doSetSet(Object source, Set set) {
 		CheckboxTreeViewer viewer = (CheckboxTreeViewer) source;
 		viewer.setCheckedElements(set.toArray());
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxViewerCheckedElementsProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxViewerCheckedElementsProperty.java
index dd93aac..afb1c3e 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxViewerCheckedElementsProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/CheckboxViewerCheckedElementsProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@
 package org.eclipse.jface.internal.databinding.viewers;
 
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.Set;
 
 import org.eclipse.core.databinding.observable.Diffs;
@@ -50,6 +51,14 @@ public abstract class CheckboxViewerCheckedElementsProperty extends
 		return ViewerElementSet.withComparer(viewer.getComparer());
 	}
 
+	protected void doUpdateSet(Object source, SetDiff diff) {
+		ICheckable checkable = (ICheckable) source;
+		for (Iterator it = diff.getAdditions().iterator(); it.hasNext();)
+			checkable.setChecked(it.next(), true);
+		for (Iterator it = diff.getRemovals().iterator(); it.hasNext();)
+			checkable.setChecked(it.next(), false);
+	}
+
 	public INativePropertyListener adaptListener(
 			ISimplePropertyListener listener) {
 		return new CheckStateListener(this, listener);
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionChangedListener.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionChangedListener.java
index 8f92e4e..3c2d21b 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionChangedListener.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionChangedListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Matthew Hall and others.
+ * Copyright (c) 2009, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 265561)
+ *     Ovidio Mallo - bug 270494
  ******************************************************************************/
 
 package org.eclipse.jface.internal.databinding.viewers;
@@ -14,15 +15,20 @@ package org.eclipse.jface.internal.databinding.viewers;
 import org.eclipse.core.databinding.property.IProperty;
 import org.eclipse.core.databinding.property.ISimplePropertyListener;
 import org.eclipse.core.databinding.property.NativePropertyListener;
+import org.eclipse.jface.viewers.IPostSelectionProvider;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 
 class SelectionChangedListener extends NativePropertyListener implements
 		ISelectionChangedListener {
+
+	private final boolean isPostSelection;
+
 	SelectionChangedListener(IProperty property,
-			ISimplePropertyListener listener) {
+			ISimplePropertyListener listener, boolean isPostSelection) {
 		super(property, listener);
+		this.isPostSelection = isPostSelection;
 	}
 
 	public void selectionChanged(SelectionChangedEvent event) {
@@ -30,10 +36,20 @@ class SelectionChangedListener extends NativePropertyListener implements
 	}
 
 	public void doAddTo(Object source) {
-		((ISelectionProvider) source).addSelectionChangedListener(this);
+		if (isPostSelection) {
+			((IPostSelectionProvider) source)
+					.addPostSelectionChangedListener(this);
+		} else {
+			((ISelectionProvider) source).addSelectionChangedListener(this);
+		}
 	}
 
 	public void doRemoveFrom(Object source) {
-		((ISelectionProvider) source).removeSelectionChangedListener(this);
+		if (isPostSelection) {
+			((IPostSelectionProvider) source)
+					.removePostSelectionChangedListener(this);
+		} else {
+			((ISelectionProvider) source).removeSelectionChangedListener(this);
+		}
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java
index ecbfd1f..88cbb41 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderMultipleSelectionProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bugs 195222, 263413, 265561
+ *     Ovidio Mallo - bug 270494
  ******************************************************************************/
 
 package org.eclipse.jface.internal.databinding.viewers;
@@ -30,6 +31,20 @@ import org.eclipse.jface.viewers.StructuredSelection;
  */
 public class SelectionProviderMultipleSelectionProperty extends
 		ViewerListProperty {
+
+	private final boolean isPostSelection;
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param isPostSelection
+	 *            Whether the post selection or the normal selection is to be
+	 *            observed.
+	 */
+	public SelectionProviderMultipleSelectionProperty(boolean isPostSelection) {
+		this.isPostSelection = isPostSelection;
+	}
+
 	public Object getElementType() {
 		return Object.class;
 	}
@@ -43,16 +58,21 @@ public class SelectionProviderMultipleSelectionProperty extends
 	}
 
 	protected void doSetList(Object source, List list, ListDiff diff) {
+		doSetList(source, list);
+	}
+
+	protected void doSetList(Object source, List list) {
 		((ISelectionProvider) source)
 				.setSelection(new StructuredSelection(list));
 	}
 
 	public INativePropertyListener adaptListener(
 			ISimplePropertyListener listener) {
-		return new SelectionChangedListener(this, listener);
+		return new SelectionChangedListener(this, listener, isPostSelection);
 	}
 
 	public String toString() {
-		return "ISelectionProvider.selection[]"; //$NON-NLS-1$
+		return isPostSelection ? "IPostSelectionProvider.postSelection[]" //$NON-NLS-1$
+				: "ISelectionProvider.selection[]"; //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java
index 6222294..758fa2d 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/SelectionProviderSingleSelectionProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     Matthew Hall - initial API and implementation (bug 194734)
  *     Matthew Hall - bugs 195222, 263413, 265561, 271080
+ *     Ovidio Mallo - bug 270494
  ******************************************************************************/
 
 package org.eclipse.jface.internal.databinding.viewers;
@@ -27,6 +28,20 @@ import org.eclipse.jface.viewers.Viewer;
  */
 public class SelectionProviderSingleSelectionProperty extends
 		ViewerValueProperty {
+
+	private final boolean isPostSelection;
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param isPostSelection
+	 *            Whether the post selection or the normal selection is to be
+	 *            observed.
+	 */
+	public SelectionProviderSingleSelectionProperty(boolean isPostSelection) {
+		this.isPostSelection = isPostSelection;
+	}
+
 	public Object getValueType() {
 		return null;
 	}
@@ -51,10 +66,11 @@ public class SelectionProviderSingleSelectionProperty extends
 
 	public INativePropertyListener adaptListener(
 			ISimplePropertyListener listener) {
-		return new SelectionChangedListener(this, listener);
+		return new SelectionChangedListener(this, listener, isPostSelection);
 	}
 
 	public String toString() {
-		return "ISelectionProvider.selection"; //$NON-NLS-1$
+		return isPostSelection ? "IPostSelectionProvider.postSelection" //$NON-NLS-1$
+				: "ISelectionProvider.selection"; //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java
index cf4bc0c..731ea43 100644
--- a/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java
+++ b/eclipse/plugins/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/viewers/StructuredViewerFiltersProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Matthew Hall and others.
+ * Copyright (c) 2008, 2010 Matthew Hall and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,10 @@ public class StructuredViewerFiltersProperty extends ViewerSetProperty {
 	}
 
 	public void doSetSet(Object source, Set set, SetDiff diff) {
+		doSetSet(source, set);
+	}
+
+	protected void doSetSet(Object source, Set set) {
 		StructuredViewer viewer = (StructuredViewer) source;
 		viewer.getControl().setRedraw(false);
 		try {
diff --git a/eclipse/plugins/org.eclipse.jface.text/.settings/.api_filters b/eclipse/plugins/org.eclipse.jface.text/.settings/.api_filters
index 257c0d3..7d35f4a 100644
--- a/eclipse/plugins/org.eclipse.jface.text/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.jface.text/.settings/.api_filters
@@ -1,13 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.jface.text" version="2">
-    <resource path="src/org/eclipse/jface/text/AbstractInformationControlManager.java" type="org.eclipse.jface.text.AbstractInformationControlManager">
-        <filter id="1142947843">
-            <message_arguments>
-                <message_argument value="3.5.2"/>
-                <message_argument value="canClearDataOnHide()"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="src/org/eclipse/jface/text/TextViewer.java" type="org.eclipse.jface.text.TextViewer">
         <filter id="572522506">
             <message_arguments>
diff --git a/eclipse/plugins/org.eclipse.jface.text/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jface.text/META-INF/MANIFEST.MF
index 28ed3a3..90c54ec 100644
--- a/eclipse/plugins/org.eclipse.jface.text/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jface.text/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface.text
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: 
  org.eclipse.jface.contentassist,
  org.eclipse.jface.contentassist.images,
  org.eclipse.jface.internal.text;x-internal:=true,
- org.eclipse.jface.internal.text.html;x-friends:="org.eclipse.ui.workbench.texteditor, org.eclipse.ui.editors, org.eclipse.jdt.debug.ui, org.eclipse.jdt.ui, org.eclipse.ant.ui, org.eclipse.ltk.ui.refactoring",
+ org.eclipse.jface.internal.text.html;x-friends:="org.eclipse.ui.workbench.texteditor, org.eclipse.ui.editors, org.eclipse.jdt.debug.ui, org.eclipse.jdt.ui, org.eclipse.ant.ui, org.eclipse.ltk.ui.refactoring, org.eclipse.pde.ui",
  org.eclipse.jface.internal.text.link.contentassist;x-internal:=true,
  org.eclipse.jface.internal.text.revisions;x-internal:=true,
  org.eclipse.jface.internal.text.source;x-internal:=true,
@@ -32,6 +32,7 @@ Export-Package:
 Require-Bundle: 
  org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+ org.eclipse.swt;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.5.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
index 36e47d0..fb4cec2 100644
--- a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
+++ b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionAnnotation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -141,11 +141,10 @@ public class ProjectionAnnotation extends Annotation implements IAnnotationPrese
 	private void initializeImages(Display display) {
 		if (fgCollapsedImage == null) {
 
-			ImageDescriptor descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/collapsed.gif"); //$NON-NLS-1$
+			ImageDescriptor descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/collapsed.png"); //$NON-NLS-1$
 			fgCollapsedImage= descriptor.createImage(display);
-			descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/expanded.gif"); //$NON-NLS-1$
+			descriptor= ImageDescriptor.createFromFile(ProjectionAnnotation.class, "images/expanded.png"); //$NON-NLS-1$
 			fgExpandedImage= descriptor.createImage(display);
-
 			display.disposeExec(new DisplayDisposeRunnable());
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
index cf2a41b..6aedcf3 100644
--- a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
+++ b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Eicher (Avaloq Evolution AG) - block selection mode
+ *     Anton Leherbauer <anton.leherbauer at windriver.com> - [projection] Eclipse is too eager to unfold code - http://bugs.eclipse.org/178203
  *******************************************************************************/
 package org.eclipse.jface.text.source.projection;
 
@@ -1383,7 +1384,7 @@ public class ProjectionViewer extends SourceViewer implements ITextViewerExtensi
 					try {
 						int numberOfLines= e.getDocument().getNumberOfLines(e.getOffset(), replaceLength);
 						if (numberOfLines > 1 || fDeletedLines > 1)
-							fProjectionAnnotationModel.expandAll(master.getOffset(), master.getLength());
+							fProjectionAnnotationModel.expandAll(master.getOffset(), replaceLength);
 					} catch (BadLocationException x) {
 					}
 				}
diff --git a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
index e9adbe7..5683bd1 100644
--- a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
+++ b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java
@@ -72,6 +72,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
 	private Font fStatusTextFont;
 	/**
 	 * The color of the optional status text label or <code>null</code> if none.
+	 * 
 	 * @since 3.6
 	 */
 	private Color fStatusTextForegroundColor;
diff --git a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/collapsed.png b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/collapsed.png
new file mode 100644
index 0000000..d02ab90
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/collapsed.png differ
diff --git a/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/expanded.png b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/expanded.png
new file mode 100644
index 0000000..b24d161
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/images/expanded.png differ
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
index 83db9db..2894c7b 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
@@ -402,7 +402,7 @@ public final class SelectionProcessor {
 			for (int offset= 0; offset < lineLength; offset++) {
 				if (startColumn == -1 && visual >= visualStartColumn)
 					startColumn= offset;
-				if (visual == visualEndColumn) {
+				if (visual >= visualEndColumn) {
 					endColumn= offset;
 					break;
 				}
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
index 7276e64..ad33c9e 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,8 +23,6 @@ import org.eclipse.swt.browser.ProgressAdapter;
 import org.eclipse.swt.browser.ProgressEvent;
 import org.eclipse.swt.browser.WindowEvent;
 import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.GC;
@@ -54,21 +52,23 @@ import org.eclipse.jface.text.TextPresentation;
 /**
  * Displays HTML information in a {@link org.eclipse.swt.browser.Browser} widget.
  * <p>
- * This {@link IInformationControlExtension2} expects {@link #setInput(Object)} to be
- * called with an argument of type {@link BrowserInformationControlInput}.
+ * This {@link IInformationControlExtension2} expects {@link #setInput(Object)} to be called with an
+ * argument of type {@link BrowserInformationControlInput}.
  * </p>
  * <p>
- * Moved into this package from <code>org.eclipse.jface.internal.text.revisions</code>.</p>
+ * Moved into this package from <code>org.eclipse.jface.internal.text.revisions</code>.
+ * </p>
  * <p>
- * This class may be instantiated; it is not intended to be subclassed.</p>
+ * This class may be instantiated; it is not intended to be subclassed.
+ * </p>
  * <p>
  * Current problems:
  * <ul>
- * 	<li>the size computation is too small</li>
- * 	<li>focusLost event is not sent - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532</li>
+ * <li>the size computation is too small</li>
+ * <li>focusLost event is not sent - see https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532</li>
  * </ul>
  * </p>
- *
+ * 
  * @since 3.2
  */
 public class BrowserInformationControl extends AbstractInformationControl implements IInformationControlExtension2, IDelayedInputChangeProvider {
@@ -77,7 +77,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	/**
 	 * Tells whether the SWT Browser widget and hence this information
 	 * control is available.
-	 *
+	 * 
 	 * @param parent the parent component used for checking or <code>null</code> if none
 	 * @return <code>true</code> if this control is available
 	 */
@@ -111,6 +111,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	 * @since 3.2
 	 */
 	private static final int MIN_WIDTH= 80;
+
 	private static final int MIN_HEIGHT= 50;
 
 
@@ -118,6 +119,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	 * Availability checking cache.
 	 */
 	private static boolean fgIsAvailable= false;
+
 	private static boolean fgAvailabilityChecked= false;
 
 	/**
@@ -128,10 +130,13 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/** The control's browser widget */
 	private Browser fBrowser;
+
 	/** Tells whether the browser has content */
 	private boolean fBrowserHasContent;
+
 	/** Text layout used to approximate size of content when rendered in browser */
 	private TextLayout fTextLayout;
+
 	/** Bold text style */
 	private TextStyle fBoldStyle;
 
@@ -154,7 +159,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	 * The listeners to be notified when the input changed.
 	 * @since 3.4
 	 */
-	private ListenerList/*<IInputChangedListener>*/ fInputChangeListeners= new ListenerList(ListenerList.IDENTITY);
+	private ListenerList/*<IInputChangedListener>*/fInputChangeListeners= new ListenerList(ListenerList.IDENTITY);
 
 	/**
 	 * The symbolic name of the font used for size computations, or <code>null</code> to use dialog font.
@@ -165,7 +170,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/**
 	 * Creates a browser information control with the given shell as parent.
-	 *
+	 * 
 	 * @param parent the parent shell
 	 * @param symbolicFontName the symbolic name of the font used for size computations
 	 * @param resizable <code>true</code> if the control should be resizable
@@ -179,7 +184,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/**
 	 * Creates a browser information control with the given shell as parent.
-	 *
+	 * 
 	 * @param parent the parent shell
 	 * @param symbolicFontName the symbolic name of the font used for size computations
 	 * @param statusFieldText the text to be used in the optional status field
@@ -194,7 +199,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/**
 	 * Creates a browser information control with the given shell as parent.
-	 *
+	 * 
 	 * @param parent the parent shell
 	 * @param symbolicFontName the symbolic name of the font used for size computations
 	 * @param toolBarManager the manager or <code>null</code> if toolbar is not desired
@@ -212,26 +217,17 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	protected void createContent(Composite parent) {
 		fBrowser= new Browser(parent, SWT.NONE);
 		fBrowser.setJavascriptEnabled(false);
-		
+
 		Display display= getShell().getDisplay();
 		fBrowser.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
 		fBrowser.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-		fBrowser.addKeyListener(new KeyListener() {
 
-			public void keyPressed(KeyEvent e)  {
-				if (e.character == 0x1B) // ESC
-					dispose(); // XXX: Just hide? Would avoid constant recreations.
+		fBrowser.addProgressListener(new ProgressAdapter() {
+			public void completed(ProgressEvent event) {
+				fCompleted= true;
 			}
-
-			public void keyReleased(KeyEvent e) {}
 		});
 
-        fBrowser.addProgressListener(new ProgressAdapter() {
-            public void completed(ProgressEvent event) {
-            	fCompleted= true;
-            }
-        });
-
 		fBrowser.addOpenWindowListener(new OpenWindowListener() {
 			public void open(WindowEvent event) {
 				event.required= true; // Cancel opening of new windows
@@ -300,7 +296,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 		else if (!resizable)
 			//XXX: In IE, "word-wrap: break-word;" causes bogus wrapping even in non-broken words :-(see e.g. Javadoc of String).
 			// Re-check whether we really still need this now that the Javadoc Hover header already sets this style.
-			styles= new String[] { "overflow:hidden;"/*, "word-wrap: break-word;"*/ }; //$NON-NLS-1$
+			styles= new String[] { "overflow:hidden;"/*, "word-wrap: break-word;"*/}; //$NON-NLS-1$
 		else
 			styles= new String[] { "overflow:scroll;" }; //$NON-NLS-1$
 
@@ -343,12 +339,12 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 		 */
 		final Display display= shell.getDisplay();
 
-        // Make sure the display wakes from sleep after timeout:
-        display.timerExec(100, new Runnable() {
-            public void run() {
-                fCompleted= true;
-            }
-        });
+		// Make sure the display wakes from sleep after timeout:
+		display.timerExec(100, new Runnable() {
+			public void run() {
+				fCompleted= true;
+			}
+		});
 
 		while (!fCompleted) {
 			// Drive the event loop to process the events required to load the browser widget's contents:
@@ -368,7 +364,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 		if ("win32".equals(SWT.getPlatform())) //$NON-NLS-1$
 			shell.moveAbove(null);
 
-        super.setVisible(true);
+		super.setVisible(true);
 	}
 
 	/*
@@ -386,7 +382,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	/**
 	 * Creates and initializes the text layout used
 	 * to compute the size hint.
-	 *
+	 * 
 	 * @since 3.2
 	 */
 	private void createTextLayout() {
@@ -402,23 +398,23 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 		// Compute and set tab width
 		fTextLayout.setText("    "); //$NON-NLS-1$
-		int tabWidth = fTextLayout.getBounds().width;
-		fTextLayout.setTabs(new int[] {tabWidth});
-
+		int tabWidth= fTextLayout.getBounds().width;
+		fTextLayout.setTabs(new int[] { tabWidth });
 		fTextLayout.setText(""); //$NON-NLS-1$
 	}
 
 	/*
-	 * @see IInformationControl#dispose()
+	 * @see org.eclipse.jface.text.AbstractInformationControl#handleDispose()
+	 * @since 3.6
 	 */
-	public void dispose() {
+	protected void handleDispose() {
 		if (fTextLayout != null) {
 			fTextLayout.dispose();
 			fTextLayout= null;
 		}
 		fBrowser= null;
 
-		super.dispose();
+		super.handleDispose();
 	}
 
 	/*
@@ -457,7 +453,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 			Rectangle rect= fTextLayout.getLineBounds(i);
 			int lineWidth= rect.x + rect.width;
 			if (i == 0)
-				lineWidth += fInput.getLeadingImageWidth();
+				lineWidth+= fInput.getLeadingImageWidth();
 			textWidth= Math.max(textWidth, lineWidth);
 		}
 		bounds.width= textWidth;
@@ -505,7 +501,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	/**
 	 * Adds the listener to the collection of listeners who will be
 	 * notified when the current location has changed or is about to change.
-	 *
+	 * 
 	 * @param listener the location listener
 	 * @since 3.4
 	 */
@@ -539,7 +535,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	/**
 	 * Adds a listener for input changes to this input change provider.
 	 * Has no effect if an identical listener is already registered.
-	 *
+	 * 
 	 * @param inputChangeListener the listener to add
 	 * @since 3.4
 	 */
@@ -551,7 +547,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 	/**
 	 * Removes the given input change listener from this input change provider.
 	 * Has no effect if an identical listener is not registered.
-	 *
+	 * 
 	 * @param inputChangeListener the listener to remove
 	 * @since 3.4
 	 */
@@ -569,7 +565,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/**
 	 * Tells whether a delayed input change listener is registered.
-	 *
+	 * 
 	 * @return <code>true</code> iff a delayed input change
 	 *         listener is currently registered
 	 * @since 3.4
@@ -580,7 +576,7 @@ public class BrowserInformationControl extends AbstractInformationControl implem
 
 	/**
 	 * Notifies listeners of a delayed input change.
-	 *
+	 * 
 	 * @param newInput the new input, or <code>null</code> to request cancellation
 	 * @since 3.4
 	 */
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
index bf0f061..620829e 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLPrinter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@ import org.eclipse.swt.SWTError;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 
 import org.eclipse.jface.util.Util;
 
@@ -32,7 +34,7 @@ public class HTMLPrinter {
 	private static RGB BG_COLOR_RGB= new RGB(255, 255, 225); // RGB value of info bg color on WindowsXP
 	private static RGB FG_COLOR_RGB= new RGB(0, 0, 0); // RGB value of info fg color on WindowsXP
 	
-	private static final String UNIT; // See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=155993
+	private static final String UNIT; // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=155993
 	static {
 		UNIT= Util.isMac() ? "px" : "pt";   //$NON-NLS-1$//$NON-NLS-2$
 	}
@@ -47,12 +49,12 @@ public class HTMLPrinter {
 					 * @see java.lang.Runnable#run()
 					 */
 					public void run() {
-						BG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
-						FG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB();
+						cacheColors(display);
+						installColorUpdater(display);
 					}
 				});
 			} catch (SWTError err) {
-				// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=45294
+				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=45294
 				if (err.code != SWT.ERROR_DEVICE_DISPOSED)
 					throw err;
 			}
@@ -62,6 +64,19 @@ public class HTMLPrinter {
 	private HTMLPrinter() {
 	}
 
+	private static void cacheColors(Display display) {
+		BG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
+		FG_COLOR_RGB= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB();
+	}
+	
+	private static void installColorUpdater(final Display display) {
+		display.addListener(SWT.Settings, new Listener() {
+			public void handleEvent(Event event) {
+				cacheColors(display);
+			}
+		});
+	}
+	
 	private static String replace(String text, char c, String s) {
 
 		int previous= 0;
@@ -117,7 +132,7 @@ public class HTMLPrinter {
 
 		pageProlog.append("<html>"); //$NON-NLS-1$
 
-		appendStyleSheetURL(pageProlog, styleSheet);
+		appendStyleSheet(pageProlog, styleSheet);
 
 		appendColors(pageProlog, fgRGB, bgRGB);
 
@@ -174,9 +189,17 @@ public class HTMLPrinter {
 		}
 	}
 
-	private static void appendStyleSheetURL(StringBuffer buffer, String styleSheet) {
+	private static void appendStyleSheet(StringBuffer buffer, String styleSheet) {
 		if (styleSheet == null)
 			return;
+		
+		// workaround for https://bugs.eclipse.org/318243
+		StringBuffer fg= new StringBuffer();
+		appendColor(fg, FG_COLOR_RGB);
+		styleSheet= styleSheet.replaceAll("InfoText", fg.toString()); //$NON-NLS-1$
+		StringBuffer bg= new StringBuffer();
+		appendColor(bg, BG_COLOR_RGB);
+		styleSheet= styleSheet.replaceAll("InfoBackground", bg.toString()); //$NON-NLS-1$
 
 		buffer.append("<head><style CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$
 		buffer.append(styleSheet);
@@ -220,7 +243,7 @@ public class HTMLPrinter {
 	}
 
 	public static void addPageEpilog(StringBuffer buffer) {
-		buffer.append("</font></body></html>"); //$NON-NLS-1$
+		buffer.append("</body></html>"); //$NON-NLS-1$
 	}
 
 	public static void startBulletList(StringBuffer buffer) {
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
index 080b43d..6a9ba79 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/CompletionProposalPopup2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
  *******************************************************************************/
 package org.eclipse.jface.internal.text.link.contentassist;
 
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -58,7 +57,6 @@ import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6;
 import org.eclipse.jface.text.contentassist.IContextInformation;
 
 
-
 /**
  * This class is used to present proposals to the user. If additional
  * information exists for a proposal, then selecting that proposal
@@ -698,7 +696,6 @@ class CompletionProposalPopup2 implements IContentAssistListener2 {
 			if (key == 0) {
 				int newSelection= fProposalTable.getSelectionIndex();
 				int visibleRows= (fProposalTable.getSize().y / fProposalTable.getItemHeight()) - 1;
-				boolean smartToggle= false;
 				switch (e.keyCode) {
 
 					case SWT.ARROW_LEFT :
@@ -744,7 +741,7 @@ class CompletionProposalPopup2 implements IContentAssistListener2 {
 						return true;
 				}
 
-				selectProposal(newSelection, smartToggle);
+				selectProposal(newSelection, (e.stateMask & SWT.CTRL) != 0);
 
 				e.doit= false;
 				return false;
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
index b2b4745..9b4c70d 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/link/contentassist/ContextInformationPopup2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -128,9 +128,6 @@ class ContextInformationPopup2 implements IContentAssistListener2 {
 					setContexts(contexts);
 					displayContextSelector();
 					hideContextInfoPopup();
-
-				} else if (!autoActivated) {
-					styledText.getDisplay().beep();
 				}
 			}
 		});
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
index 6335210..f736410 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -295,7 +295,7 @@ public final class RevisionPainter {
 		 */
 		public void handleEvent(Event event) {
 			switch (event.type) {
-				case SWT.MouseWheel:
+				case SWT.MouseVerticalWheel:
 					handleMouseWheel(event);
 					break;
 				case SWT.MouseDown:
@@ -1163,15 +1163,18 @@ public final class RevisionPainter {
 
 	/**
 	 * Handles the selection of a revision and informs listeners.
-	 *
-     * @param revision the selected revision, <code>null</code> for none
-     */
-    void handleRevisionSelected(Revision revision) {
-   		fSelectedRevision= revision;
-    	fRevisionSelectionProvider.revisionSelected(revision);
-		updateOverviewAnnotations();
-    	postRedraw();
-    }
+	 * 
+	 * @param revision the selected revision, <code>null</code> for none
+	 */
+	void handleRevisionSelected(Revision revision) {
+		fSelectedRevision= revision;
+		fRevisionSelectionProvider.revisionSelected(revision);
+
+		if (isConnected())
+			updateOverviewAnnotations();
+
+		postRedraw();
+	}
 
 	/**
 	 * Handles the selection of a revision id and informs listeners
@@ -1277,7 +1280,7 @@ public final class RevisionPainter {
 	 * Uninstalls the mouse wheel handler.
 	 */
 	private void uninstallWheelHandler() {
-		fControl.removeListener(SWT.MouseWheel, fMouseHandler);
+		fControl.removeListener(SWT.MouseVerticalWheel, fMouseHandler);
 		fWheelHandlerInstalled= false;
 	}
 
@@ -1289,7 +1292,7 @@ public final class RevisionPainter {
 			//FIXME: does not work on Windows, because Canvas cannot get focus and therefore does not send out mouse wheel events:
 			//https://bugs.eclipse.org/bugs/show_bug.cgi?id=81189
 			//see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=75766
-			fControl.addListener(SWT.MouseWheel, fMouseHandler);
+			fControl.addListener(SWT.MouseVerticalWheel, fMouseHandler);
 			fWheelHandlerInstalled= true;
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
index 5a0b52d..f136335 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractHoverInformationControlManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -135,7 +135,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
 				fDisplay= fSubjectControl.getDisplay();
 				if (!fDisplay.isDisposed()) {
 					fDisplay.addFilter(SWT.Activate, this);
-					fDisplay.addFilter(SWT.MouseWheel, this);
+					fDisplay.addFilter(SWT.MouseVerticalWheel, this);
 
 					fDisplay.addFilter(SWT.FocusOut, this);
 
@@ -179,7 +179,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
 
 			if (fDisplay != null && !fDisplay.isDisposed()) {
 				fDisplay.removeFilter(SWT.Activate, this);
-				fDisplay.removeFilter(SWT.MouseWheel, this);
+				fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
 
 				fDisplay.removeFilter(SWT.FocusOut, this);
 
@@ -276,7 +276,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
 		public void handleEvent(Event event) {
 			switch (event.type) {
 				case SWT.Activate:
-				case SWT.MouseWheel:
+				case SWT.MouseVerticalWheel:
 					if (!hasInformationControlReplacer())
 						hideInformationControl();
 					else if (!isReplaceInProgress()) {
@@ -287,7 +287,7 @@ abstract public class AbstractHoverInformationControlManager extends AbstractInf
 							IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
 							if (!(iControl5.containsControl(control)))
 								hideInformationControl();
-							else if (event.type == SWT.MouseWheel && cancelReplacingDelay())
+							else if (event.type == SWT.MouseVerticalWheel && cancelReplacingDelay())
 								replaceInformationControl(false);
 						} else if (infoControl != null && infoControl.isFocusControl() && cancelReplacingDelay()) {
 							replaceInformationControl(true);
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
index 462837e..861d2a0 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.jface.text;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
@@ -88,6 +89,7 @@ public abstract class AbstractInformationControl implements IInformationControl,
 	private Font fStatusLabelFont;
 	/**
 	 * Color for the label in the status line or <code>null</code> if none.
+	 * 
 	 * @since 3.6
 	 */
 	private Color fStatusLabelForeground;
@@ -99,7 +101,7 @@ public abstract class AbstractInformationControl implements IInformationControl,
 	/** Listener for shell activation and deactivation. */
 	private Listener fShellListener;
 	/** All focus listeners registered to this information control. */
-	private ListenerList fFocusListeners= new ListenerList(ListenerList.IDENTITY);
+	private final ListenerList fFocusListeners= new ListenerList(ListenerList.IDENTITY);
 
 	/** Size constraints, x is the maxWidth and y is the maxHeight, or <code>null</code> if not set. */
 	private Point fSizeConstraints;
@@ -175,7 +177,7 @@ public abstract class AbstractInformationControl implements IInformationControl,
 		if ((shellStyle & SWT.NO_TRIM) != 0)
 			shellStyle&= ~(SWT.NO_TRIM | SWT.SHELL_TRIM); // make sure we get the OS border but no other trims
 
-		fResizable= (shellStyle & SWT.RESIZE) != 0; // on GTK, Shell removes SWT.RESIZE if SWT.ON_TOP is set
+		fResizable= (shellStyle & SWT.RESIZE) != 0;
 		fShell= new Shell(parentShell, shellStyle);
 		Display display= fShell.getDisplay();
 		Color foreground= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
@@ -194,6 +196,13 @@ public abstract class AbstractInformationControl implements IInformationControl,
 		setColor(fContentComposite, foreground, background);
 
 		createStatusComposite(statusFieldText, toolBarManager, foreground, background);
+		
+		addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				handleDispose();
+			}
+		});
+
 	}
 
 	private void createStatusComposite(final String statusFieldText, final ToolBarManager toolBarManager, Color foreground, Color background) {
@@ -446,16 +455,19 @@ public abstract class AbstractInformationControl implements IInformationControl,
 	 * {@link Composite#getForeground()} from <code>parent</code>.
 	 * </p>
 	 * <p>
-	 * Implementors are expected to consider {@link #isResizable()}: If
-	 * <code>true</code>, they should show scrollbars if their content may
-	 * exceed the size of the information control. If <code>false</code>,
-	 * they should never show scrollbars.
+	 * Implementors must either use the dialog font or override
+	 * {@link #computeSizeConstraints(int, int)}.
 	 * </p>
 	 * <p>
-	 * The given <code>parent</code> comes with a {@link FillLayout}.
-	 * Subclasses may set a different layout.
+	 * Implementors are expected to consider {@link #isResizable()}: If <code>true</code>, they
+	 * should show scrollbars if their content may exceed the size of the information control. If
+	 * <code>false</code>, they should never show scrollbars.
 	 * </p>
-	 *
+	 * <p>
+	 * The given <code>parent</code> comes with a {@link FillLayout}. Subclasses may set a different
+	 * layout.
+	 * </p>
+	 * 
 	 * @param parent the container of the content
 	 */
 	protected abstract void createContent(Composite parent);
@@ -498,12 +510,25 @@ public abstract class AbstractInformationControl implements IInformationControl,
 	 * @see IInformationControl#dispose()
 	 */
 	public void dispose() {
+		if (fShell != null && !fShell.isDisposed())
+			fShell.dispose();
+	}
+
+	/**
+	 * Frees all resources allocated by this information control. Internally called when the
+	 * information control's shell has been disposed.
+	 * 
+	 * @since 3.6
+	 */
+	protected void handleDispose() {
 		if (fStatusLabelFont != null) {
 			fStatusLabelFont.dispose();
 			fStatusLabelFont= null;
 		}
-		if (fShell != null && !fShell.isDisposed())
-			fShell.dispose();
+		if (fStatusLabelForeground != null) {
+			fStatusLabelForeground.dispose();
+			fStatusLabelForeground= null;
+		}
 	}
 
 	/*
@@ -679,10 +704,6 @@ public abstract class AbstractInformationControl implements IInformationControl,
 			fShell.removeListener(SWT.Deactivate, fShellListener);
 			fShellListener= null;
 		}
-		if (fStatusLabelForeground != null) {
-			fStatusLabelForeground.dispose();
-			fStatusLabelForeground= null;
-		}
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
index b670658..e613179 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java
@@ -1243,7 +1243,7 @@ abstract public class AbstractInformationControlManager {
 	 * 
 	 * @return <code>true</code> if data can be cleared on hide
 	 * @see #hideInformationControl()
-	 * @since 3.5.2
+	 * @since 3.6
 	 */
 	protected boolean canClearDataOnHide() {
 		return true;
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
index 90ea283..fa15815 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultInformationControl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -367,7 +367,7 @@ public class DefaultInformationControl extends AbstractInformationControl implem
 	 * @see IInformationControl#computeSizeHint()
 	 */
 	public Point computeSizeHint() {
-		// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=117602
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=117602
 		int widthHint= SWT.DEFAULT;
 		Point constraints= getSizeConstraints();
 		if (constraints != null && fText.getWordWrap())
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
index bd24a6c..0f80aef 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,10 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jface.text;
 
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -55,7 +53,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
  * </p>
  * <p>
  * The usage of {@link org.eclipse.core.runtime.IAdaptable} in the JFace
- * layer has been approved by Platform UI, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=87669#c9
+ * layer has been approved by Platform UI, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=87669#c9
  * </p>
  * <p>
  * This class is not intended to be subclassed.
@@ -786,9 +784,9 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
 	}
 
 	/** Text buffer to collect text which is inserted into the viewer */
-	private StringBuffer fTextBuffer= new StringBuffer();
+	private StringBuffer fTextBuffer;
 	/** Text buffer to collect viewer content which has been replaced */
-	private StringBuffer fPreservedTextBuffer= new StringBuffer();
+	private StringBuffer fPreservedTextBuffer;
 	/** The document modification stamp for undo. */
 	protected long fPreservedUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
 	/** The document modification stamp for redo. */
@@ -1218,6 +1216,8 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
 	public void connect(ITextViewer textViewer) {
 		if (!isConnected() && textViewer != null) {
 			fTextViewer= textViewer;
+			fTextBuffer= new StringBuffer();
+			fPreservedTextBuffer= new StringBuffer();
 		    if (fUndoContext == null)
 		        fUndoContext= new ObjectUndoContext(this);
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapterContentProposalProvider.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapterContentProposalProvider.java
index e0dff95..c06ec31 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapterContentProposalProvider.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapterContentProposalProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.jface.text;
 
 import java.util.ArrayList;
 
+import org.eclipse.jface.fieldassist.ContentProposal;
 import org.eclipse.jface.fieldassist.IContentProposal;
 import org.eclipse.jface.fieldassist.IContentProposalProvider;
 
@@ -39,38 +40,6 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 	 */
 	private static class ProposalComputer {
 
-		private static class Proposal implements IContentProposal {
-
-			private String fContent;
-			private String fLabel;
-			private String fDescription;
-			private int fCursorPosition;
-
-			Proposal(String content, String label, String description, int cursorPosition) {
-				fContent= content;
-				fLabel= label;
-				fDescription= description;
-				fCursorPosition= cursorPosition;
-			}
-
-			public String getContent() {
-				return fContent;
-			}
-
-			public String getLabel() {
-				return fLabel;
-			}
-
-			public String getDescription() {
-				return fDescription;
-			}
-
-			public int getCursorPosition() {
-				return fCursorPosition;
-			}
-		}
-
-
 		/**
 		 * The whole regular expression.
 		 */
@@ -266,7 +235,7 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 		 * @param additionalInfo the additional information
 		 */
 		private void addProposal(String proposal, String displayString, String additionalInfo) {
-			fProposals.add(new Proposal(proposal, displayString, additionalInfo, proposal.length()));
+			fProposals.add(new ContentProposal(proposal, displayString, additionalInfo));
 		}
 
 		/**
@@ -279,7 +248,7 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 		 * @param additionalInfo the additional information
 		 */
 		private void addProposal(String proposal, int cursorPosition, String displayString, String additionalInfo) {
-			fProposals.add(new Proposal(proposal, displayString, additionalInfo, cursorPosition));
+			fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
 		}
 
 		/**
@@ -290,7 +259,7 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 		 * @param additionalInfo the additional information
 		 */
 		private void addPriorityProposal(String proposal, String displayString, String additionalInfo) {
-			fPriorityProposals.add(new Proposal(proposal, displayString, additionalInfo, proposal.length()));
+			fPriorityProposals.add(new ContentProposal(proposal, displayString, additionalInfo));
 		}
 
 		/**
@@ -305,7 +274,7 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 		private void addBracketProposal(String proposal, int cursorPosition, String displayString, String additionalInfo) {
 			String prolog= fExpression.substring(0, fDocumentOffset);
 			if (! fIsEscape && prolog.endsWith("\\") && proposal.startsWith("\\")) { //$NON-NLS-1$//$NON-NLS-2$
-				fProposals.add(new Proposal(proposal, displayString, additionalInfo, cursorPosition));
+				fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
 				return;
 			}
 			for (int i= 1; i <= cursorPosition; i++) {
@@ -314,14 +283,14 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 					String postfix= proposal.substring(cursorPosition);
 					String epilog= fExpression.substring(fDocumentOffset);
 					if (epilog.startsWith(postfix)) {
-						fPriorityProposals.add(new Proposal(proposal.substring(i, cursorPosition), displayString, additionalInfo, cursorPosition-i));
+						fPriorityProposals.add(new ContentProposal(proposal.substring(i, cursorPosition), displayString, additionalInfo, cursorPosition-i));
 					} else {
-						fPriorityProposals.add(new Proposal(proposal.substring(i), displayString, additionalInfo, cursorPosition-i));
+						fPriorityProposals.add(new ContentProposal(proposal.substring(i), displayString, additionalInfo, cursorPosition-i));
 					}
 					return;
 				}
 			}
-			fProposals.add(new Proposal(proposal, displayString, additionalInfo, cursorPosition));
+			fProposals.add(new ContentProposal(proposal, displayString, additionalInfo, cursorPosition));
 		}
 
 		/**
@@ -342,7 +311,7 @@ public class FindReplaceDocumentAdapterContentProposalProvider implements IConte
 			}
 
 			if (fIsEscape) {
-				fPriorityProposals.add(new Proposal(proposal, displayString, additionalInfo, position));
+				fPriorityProposals.add(new ContentProposal(proposal, displayString, additionalInfo, position));
 			} else {
 				addProposal(proposal, position, displayString, additionalInfo);
 			}
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
index 5bf5783..42b75cf 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,10 +81,10 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.Viewer;
 
 import org.eclipse.jface.text.hyperlink.HyperlinkManager;
+import org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY;
 import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
 import org.eclipse.jface.text.hyperlink.IHyperlinkDetectorExtension;
 import org.eclipse.jface.text.hyperlink.IHyperlinkPresenter;
-import org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY;
 import org.eclipse.jface.text.projection.ChildDocument;
 import org.eclipse.jface.text.projection.ChildDocumentManager;
 
@@ -1512,6 +1512,14 @@ public class TextViewer extends Viewer implements
 	 * @since 3.1
 	 */
 	private static final String SELECTION_POSITION_CATEGORY= "_textviewer_selection_category"; //$NON-NLS-1$
+
+	/**
+	 * The shared printer data.
+	 * 
+	 * @since 3.6
+	 */
+	private static PrinterData fgPrinterData= null;
+
 	/** The viewer's text widget */
 	private StyledText fTextWidget;
 	/** The viewer's input document */
@@ -1740,7 +1748,9 @@ public class TextViewer extends Viewer implements
 	 * @return the text widget to be used
 	 */
 	protected StyledText createTextWidget(Composite parent, int styles) {
-		return new StyledText(parent, styles);
+		StyledText styledText= new StyledText(parent, styles);
+		styledText.setLeftMargin(Math.max(styledText.getLeftMargin(), 2));
+		return styledText;
 	}
 
 	/**
@@ -1764,7 +1774,7 @@ public class TextViewer extends Viewer implements
 		fTextWidget= createTextWidget(parent, styles);
 
 		// Support scroll page upon MOD1+MouseWheel
-		fTextWidget.addListener(SWT.MouseWheel, new Listener() {
+		fTextWidget.addListener(SWT.MouseVerticalWheel, new Listener() {
 
 			public void handleEvent(Event event) {
 				if (((event.stateMask & SWT.MOD1) == 0))
@@ -2436,9 +2446,13 @@ public class TextViewer extends Viewer implements
 			if (delta > 0) {
 				// in the middle of a multi-character line delimiter
 				offset= lineEnd;
+				length += delta;
 				String delimiter= document.getLineDelimiter(lineNumber);
-				if (delimiter != null)
-					offset += delimiter.length();
+				if (delimiter != null) {
+					int delimiterLength= delimiter.length();
+					offset += delimiterLength;
+					length -= delimiterLength;
+				}
 			}
 
 			int end= offset + length;
@@ -4502,6 +4516,7 @@ public class TextViewer extends Viewer implements
 		}
 
 		final PrintDialog dialog= new PrintDialog(shell, SWT.PRIMARY_MODAL);
+		dialog.setPrinterData(fgPrinterData);
 		final PrinterData data= dialog.open();
 
 		if (data != null) {
@@ -4515,6 +4530,18 @@ public class TextViewer extends Viewer implements
 				}
 			};
 			printingThread.start();
+
+			/*
+			 * FIXME:
+			 * 	Should copy the printer data to avoid threading issues,
+			 *	but this is currently not possible, see:
+			 *  https://bugs.eclipse.org/bugs/show_bug.cgi?id=297957
+			 */
+			fgPrinterData= data;
+			fgPrinterData.startPage= 1;
+			fgPrinterData.endPage= 1;
+			fgPrinterData.scope= PrinterData.ALL_PAGES;
+			fgPrinterData.copyCount= 1;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
index 0fde9f0..d0364f5 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/AdditionalInfoController.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -112,7 +112,7 @@ class AdditionalInfoController extends AbstractInformationControlManager {
                         	return new Status(IStatus.WARNING, "org.eclipse.jface.text", IStatus.OK, "", x); //$NON-NLS-1$ //$NON-NLS-2$
                         }
 						setInfo((ICompletionProposal) proposal, info);
-					    return new Status(IStatus.OK, "org.eclipse.jface.text", IStatus.OK, "", null); //$NON-NLS-1$ //$NON-NLS-2$
+						return Status.OK_STATUS;
 					}
 				};
 				job.schedule();
@@ -257,7 +257,7 @@ class AdditionalInfoController extends AbstractInformationControlManager {
 		 *
 		 * @param p the new proposal
 		 */
-		public final synchronized void reset(ICompletionProposal p) {
+		public synchronized final void reset(ICompletionProposal p) {
 			if (fCurrentProposal != p) {
 				fCurrentProposal= p;
 				fCurrentInfo= null;
@@ -580,6 +580,8 @@ class AdditionalInfoController extends AbstractInformationControlManager {
 	 */
 	protected void hideInformationControl() {
 		super.hideInformationControl();
+		if (fTimer != null)
+			fTimer.reset(null);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index 9b0f462..acac873 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,6 +70,7 @@ import org.eclipse.jface.util.Geometry;
 import org.eclipse.jface.viewers.StyledString;
 
 import org.eclipse.jface.text.AbstractInformationControlManager;
+import org.eclipse.jface.text.AbstractInformationControlManager.Anchor;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.DocumentEvent;
 import org.eclipse.jface.text.IDocument;
@@ -82,7 +83,6 @@ import org.eclipse.jface.text.IRewriteTarget;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension;
 import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.AbstractInformationControlManager.Anchor;
 
 
 /**
@@ -118,7 +118,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 		static final int SELECT_PREVIOUS= 2;
 
 
-		private int fOperationCode;
+		private final int fOperationCode;
 
 		/**
 		 * Creates a new selection handler.
@@ -262,7 +262,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 	}
 
 	private final class CommandKeyListener extends KeyAdapter {
-		private KeySequence fCommandSequence;
+		private final KeySequence fCommandSequence;
 
 		private CommandKeyListener(KeySequence keySequence) {
 			fCommandSequence= keySequence;
@@ -287,11 +287,11 @@ class CompletionProposalPopup implements IContentAssistListener {
 	/** The associated text viewer. */
 	private ITextViewer fViewer;
 	/** The associated content assistant. */
-	private ContentAssistant fContentAssistant;
+	private final ContentAssistant fContentAssistant;
 	/** The used additional info controller. */
-	private AdditionalInfoController fAdditionalInfoController;
+	private final AdditionalInfoController fAdditionalInfoController;
 	/** The closing strategy for this completion proposal popup. */
-	private PopupCloser fPopupCloser= new PopupCloser();
+	private final PopupCloser fPopupCloser= new PopupCloser();
 	/** The popup shell. */
 	private Shell fProposalShell;
 	/** The proposal table. */
@@ -301,7 +301,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 	/** The key listener to control navigation. */
 	private ProposalSelectionListener fKeyListener;
 	/** List of document events used for filtering proposals. */
-	private List fDocumentEvents= new ArrayList();
+	private final List fDocumentEvents= new ArrayList();
 	/** Listener filling the document event queue. */
 	private IDocumentListener fDocumentListener;
 	/** The filter list of proposals. */
@@ -330,7 +330,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 	 *
 	 * @since 3.0
 	 */
-	private ContentAssistSubjectControlAdapter fContentAssistSubjectControlAdapter;
+	private final ContentAssistSubjectControlAdapter fContentAssistSubjectControlAdapter;
 	/**
 	 * Remembers the size for this completion proposal popup.
 	 * @since 3.0
@@ -633,6 +633,8 @@ class CompletionProposalPopup implements IContentAssistListener {
 				if (fAdditionalInfoController != null) {
 					// reset the cached resize constraints
 					fAdditionalInfoController.setSizeConstraints(50, 10, true, false);
+					fAdditionalInfoController.hideInformationControl();
+					fAdditionalInfoController.handleTableSelectionChanged();
 				}
 
 				fSize= fProposalShell.getSize();
@@ -974,7 +976,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 	 */
 	public boolean hasFocus() {
 		if (Helper.okToUse(fProposalShell)) {
-			if ((fProposalShell.isFocusControl() || fProposalTable.isFocusControl()))
+			if ((fProposalShell.getDisplay().getActiveShell() == fProposalShell))
 				return true;
 			/*
 			 * We have to delegate this query to the additional info controller
@@ -1238,7 +1240,6 @@ class CompletionProposalPopup implements IContentAssistListener {
 			int newSelection= fProposalTable.getSelectionIndex();
 			int visibleRows= (fProposalTable.getSize().y / fProposalTable.getItemHeight()) - 1;
 			int itemCount= fProposalTable.getItemCount();
-			boolean smartToggle= false;
 			switch (e.keyCode) {
 
 				case SWT.ARROW_LEFT :
@@ -1284,7 +1285,7 @@ class CompletionProposalPopup implements IContentAssistListener {
 					return true;
 			}
 
-			selectProposal(newSelection, smartToggle);
+			selectProposal(newSelection, (e.stateMask & SWT.CTRL) != 0);
 
 			e.doit= false;
 			return false;
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
index 5431224..4d472d9 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1123,7 +1123,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
 			}
 
 		} else if (fAutoAssistListener != null) {
-			// For details see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=49212
+			// For details see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49212
 			if (fContentAssistSubjectControlAdapter.supportsVerifyKeyListener())
 				fContentAssistSubjectControlAdapter.removeVerifyKeyListener(fAutoAssistListener);
 			else
@@ -1145,18 +1145,18 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
 	/**
 	 * Sets the delay after which the content assistant is automatically invoked if the cursor is
 	 * behind an auto activation character.
-	 *
-	 * @param delay the auto activation delay
+	 * 
+	 * @param delay the auto activation delay (as of 3.6 a negative argument will be set to 0)
 	 */
 	public void setAutoActivationDelay(int delay) {
-		fAutoActivationDelay= delay;
+		fAutoActivationDelay= Math.max(0, delay);
 	}
 
 	/**
 	 * Gets the delay after which the content assistant is automatically invoked if the cursor is
 	 * behind an auto activation character.
-	 *
-	 * @return the auto activation delay
+	 * 
+	 * @return the auto activation delay (will not be negative)
 	 * @since 3.4
 	 */
 	public int getAutoActivationDelay() {
@@ -1680,15 +1680,17 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
 	 * @since 3.2
 	 */
 	private boolean prepareToShowCompletions(boolean isAutoActivated) {
-		long current= System.currentTimeMillis();
-		int gracePeriod= Math.max(fAutoActivationDelay, 200);
-		if (current < fLastAutoActivation + gracePeriod)
-			return false;
-
-	    promoteKeyListener();
+		if (!isAutoActivated) {
+			int gracePeriod= Math.max(fAutoActivationDelay, 200);
+			if (System.currentTimeMillis() < fLastAutoActivation + gracePeriod) {
+				return false;
+			}
+		}
+		
+		promoteKeyListener();
 		fireSessionBeginEvent(isAutoActivated);
 		return true;
-    }
+	}
 
 	/**
 	 * Callback to signal this content assistant that the presentation of the possible completions
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
index d3354ec..e3dd1c6 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContextInformationPopup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,9 @@ import java.util.Stack;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.custom.VerifyKeyListener;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -35,6 +38,7 @@ import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.jface.contentassist.IContentAssistSubjectControl;
 
 import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITextViewerExtension;
 import org.eclipse.jface.text.TextPresentation;
 
 
@@ -200,6 +204,7 @@ class ContextInformationPopup implements IContentAssistListener {
 					// if any of the proposed context matches any of the contexts on the stack,
 					// assume that one (so, if context info is invoked repeatedly, the current
 					// info is kept)
+					int index= 0;
 					for (int i= 0; i < contexts.length; i++) {
 						IContextInformation info= contexts[i];
 						ContextFrame frame= createContextFrame(info, offset);
@@ -211,8 +216,7 @@ class ContextInformationPopup implements IContentAssistListener {
 						}
 
 						if (isLastFrame(frame)) {
-							internalShowContextInfo(frame);
-							return;
+							index= i;
 						}
 
 						// also check all other contexts
@@ -232,7 +236,7 @@ class ContextInformationPopup implements IContentAssistListener {
 						fLineDelimiter= fContentAssistSubjectControlAdapter.getLineDelimiter();
 
 					createContextSelector();
-					setContexts(contexts);
+					setContexts(contexts, index);
 					displayContextSelector();
 				}
 			}
@@ -505,6 +509,28 @@ class ContextInformationPopup implements IContentAssistListener {
 		fContextSelectorShell.setLayout(layout);
 		fContextSelectorShell.setBackground(control.getDisplay().getSystemColor(SWT.COLOR_BLACK));
 
+		if (fViewer instanceof ITextViewerExtension) {
+			final ITextViewerExtension textViewerExtension= (ITextViewerExtension)fViewer;
+			final StyledText textWidget= fViewer.getTextWidget();
+
+			final VerifyKeyListener verifyListener= new VerifyKeyListener() {
+				public void verifyKey(VerifyEvent event) {
+					if (isActive() && event.keyCode == 13 && event.character == '\r' && event.widget == textWidget) {
+						event.doit= false;
+						insertSelectedContext();
+						hideContextSelector();
+					}
+				}
+			};
+
+			textViewerExtension.prependVerifyKeyListener(verifyListener);
+
+			fContextSelectorShell.addDisposeListener(new DisposeListener() {
+				public void widgetDisposed(DisposeEvent e) {
+					textViewerExtension.removeVerifyKeyListener(verifyListener);
+				}
+			});
+		}
 
 		fContextSelectorTable= new Table(fContextSelectorShell, SWT.H_SCROLL | SWT.V_SCROLL);
 		fContextSelectorTable.setLocation(1, 1);
@@ -574,10 +600,11 @@ class ContextInformationPopup implements IContentAssistListener {
 
 	/**
 	 * Sets the contexts in the context selector to the given set.
-	 *
+	 * 
 	 * @param contexts the possible contexts
+	 * @param selectionIndex the index of the proposal to select
 	 */
-	private void setContexts(IContextInformation[] contexts) {
+	private void setContexts(IContextInformation[] contexts, int selectionIndex) {
 		if (Helper.okToUse(fContextSelectorTable)) {
 
 			fContextSelectorInput= contexts;
@@ -595,7 +622,7 @@ class ContextInformationPopup implements IContentAssistListener {
 				item.setText(t.getContextDisplayString());
 			}
 
-			fContextSelectorTable.select(0);
+			fContextSelectorTable.select(selectionIndex);
 			fContextSelectorTable.setRedraw(true);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/PopupCloser.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/PopupCloser.java
index 821e257..ac45f21 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/PopupCloser.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/PopupCloser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -100,10 +100,9 @@ class PopupCloser extends ShellAdapter implements FocusListener, SelectionListen
 				fScrollbar.addSelectionListener(this);
 
 			fDisplay.addFilter(SWT.Activate, this);
-			fDisplay.addFilter(SWT.MouseWheel, this);
+			fDisplay.addFilter(SWT.MouseVerticalWheel, this);
 
 			fDisplay.addFilter(SWT.Deactivate, this);
-
 			fDisplay.addFilter(SWT.MouseUp, this);
 		}
 	}
@@ -122,10 +121,9 @@ class PopupCloser extends ShellAdapter implements FocusListener, SelectionListen
 			fTable.removeFocusListener(this);
 		if (fDisplay != null && ! fDisplay.isDisposed()) {
 			fDisplay.removeFilter(SWT.Activate, this);
-			fDisplay.removeFilter(SWT.MouseWheel, this);
+			fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
 
 			fDisplay.removeFilter(SWT.Deactivate, this);
-
 			fDisplay.removeFilter(SWT.MouseUp, this);
 		}
 	}
@@ -200,7 +198,7 @@ class PopupCloser extends ShellAdapter implements FocusListener, SelectionListen
 	public void handleEvent(Event event) {
 		switch (event.type) {
 			case SWT.Activate:
-			case SWT.MouseWheel:
+			case SWT.MouseVerticalWheel:
 				if (fAdditionalInfoController == null)
 					return;
 				if (event.widget == fShell || event.widget == fTable || event.widget == fScrollbar)
@@ -216,7 +214,7 @@ class PopupCloser extends ShellAdapter implements FocusListener, SelectionListen
 						IInformationControlExtension5 iControl5= (IInformationControlExtension5) infoControl;
 						if (!(iControl5.containsControl(control)))
 							fAdditionalInfoController.hideInformationControl();
-						else if (event.type == SWT.MouseWheel)
+						else if (event.type == SWT.MouseVerticalWheel)
 							fAdditionalInfoController.getInternalAccessor().replaceInformationControl(false);
 					} else if (infoControl != null && infoControl.isFocusControl()) {
 						fAdditionalInfoController.getInternalAccessor().replaceInformationControl(true);
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
index 56cc459..16dcd85 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/HyperlinkManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.JFaceTextUtil;
 import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.TextEvent;
+import org.eclipse.jface.text.source.ISourceViewer;
 
 
 /**
@@ -46,6 +47,18 @@ import org.eclipse.jface.text.TextEvent;
  */
 public class HyperlinkManager implements ITextListener, Listener, KeyListener, MouseListener, MouseMoveListener, FocusListener, MouseTrackListener {
 
+
+	/**
+	 * Text operation code for requesting to open the hyperlink at the caret position.
+	 * <p>
+	 * FIXME: Not yet implemented. Will be implemented during M7.
+	 * </p>
+	 * @see #openHyperlink()
+	 * @since 3.6
+	 */
+	public static final int OPEN_HYPERLINK= ISourceViewer.QUICK_ASSIST + 1;
+
+
 	/**
 	 * Detection strategy.
 	 */
@@ -527,4 +540,18 @@ public class HyperlinkManager implements ITextListener, Listener, KeyListener, M
 	public void mouseHover(MouseEvent e) {
 	}
 
+	/**
+	 * Opens the hyperlink at the caret location or opens a chooser
+	 * if more than one hyperlink is available.
+	 * <p>
+	 * FIXME: Will be implemented during M7.
+	 * </p>
+	 * 
+	 * @return <code>true</code> if at least one hyperlink has been found at the caret location, <code>false</code> otherwise
+	 * @see #OPEN_HYPERLINK
+	 * @since 3.6
+	 */
+	public boolean openHyperlink() {
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java
index 5839d50..cad1cc5 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/hyperlink/MultipleHyperlinkPresenter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,7 @@ import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -209,6 +210,7 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter {
 			fTable.setHeaderVisible(false);
 			fTable.setForeground(fForegroundColor);
 			fTable.setBackground(fBackgroundColor);
+			fTable.setFont(JFaceResources.getDialogFont());
 
 			if (IS_WIN32) {
 				GridData data= new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
@@ -313,6 +315,9 @@ public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter {
 		 * Opens the currently selected link.
 		 */
 		private void openSelectedLink() {
+			if (fTable.getSelectionCount() < 1)
+				return;
+			
 			TableItem selection= fTable.getSelection()[0];
 			IHyperlink link= (IHyperlink)selection.getData();
 			fManager.hideInformationControl();
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
index 64533a6..3798499 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/link/LinkedModeUI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,7 +52,6 @@ import org.eclipse.jface.text.IPositionUpdater;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.IRewriteTarget;
 import org.eclipse.jface.text.ITextInputListener;
-import org.eclipse.jface.text.ITextOperationTarget;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension;
@@ -812,11 +811,7 @@ public class LinkedModeUI {
 	}
 
 	private void triggerContextInfo() {
-		ITextOperationTarget target= fCurrentTarget.getViewer().getTextOperationTarget();
-		if (target != null) {
-			if (target.canDoOperation(ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION))
-				target.doOperation(ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);
-		}
+		fAssistant.showContextInformation();
 	}
 
 	/** Trigger content assist on choice positions */
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java
index aa409fe..0d5063f 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/presentation/PresentationReconciler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -500,15 +500,15 @@ public class PresentationReconciler implements IPresentationReconciler, IPresent
 				damage= r;
 			} else {
 
+				int damageStart= r.getOffset();
 				int damageEnd= getDamageEndOffset(e);
 
-				int parititionDamageEnd= -1;
-				if (fChangedDocumentPartitions != null)
-					parititionDamageEnd= fChangedDocumentPartitions.getOffset() + fChangedDocumentPartitions.getLength();
-
-				int end= Math.max(damageEnd, parititionDamageEnd);
-
-				damage= end == -1 ? r : new Region(r.getOffset(), end - r.getOffset());
+				if (fChangedDocumentPartitions != null) {
+					damageStart= Math.min(damageStart, fChangedDocumentPartitions.getOffset());
+					damageEnd= Math.max(damageEnd, fChangedDocumentPartitions.getOffset() + fChangedDocumentPartitions.getLength());
+				}
+				
+				damage= damageEnd == -1 ? r : new Region(damageStart, damageEnd - damageStart);
 			}
 
 		} catch (BadLocationException x) {
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java
index 07b6e76..99140ca 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/revisions/RevisionInformation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,8 +119,10 @@ public final class RevisionInformation implements ITextHoverExtension, IInformat
 	}
 
 	/**
-	 * Adjusts the revision information to the given diff information. Any previous diff information is discarded. <strong>Note</strong>: This is an internal framework method and must not be called by clients.
-	 *
+	 * Adjusts the revision information to the given diff information. Any previous diff information
+	 * is discarded. <strong>Note:</strong> This is an internal framework method and must not be
+	 * called by clients.
+	 * 
 	 * @param hunks the diff hunks to adjust the revision information to
 	 * @since 3.3
 	 * @noreference This method is not intended to be referenced by clients.
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java
index ee469dd..6f9bc72 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/DefaultDamagerRepairer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.jface.text.rules;
 
 
@@ -115,8 +114,15 @@ public class DefaultDamagerRepairer implements IPresentationDamager, IPresentati
 		}
 	}
 
-	/*
-	 * @see IPresentationDamager#getDamageRegion(ITypedRegion, DocumentEvent, boolean)
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * This implementation damages entire lines unless clipped by the given partition.
+	 * </p>
+	 * 
+	 * @return the full lines containing the document changes described by the document event,
+	 *         clipped by the given partition. If there was a partitioning change then the whole
+	 *         partition is returned.
 	 */
 	public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent e, boolean documentPartitioningChanged) {
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/PatternRule.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/PatternRule.java
index 957f89f..9dc88ab 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/PatternRule.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/PatternRule.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,6 @@
  *     IBM Corporation - initial API and implementation
  *     Christopher Lenz (cmlenz at gmx.de) - support for line continuation
  *******************************************************************************/
-
 package org.eclipse.jface.text.rules;
 
 import java.util.Arrays;
@@ -18,9 +17,6 @@ import java.util.Comparator;
 import org.eclipse.core.runtime.Assert;
 
 
-
-
-
 /**
  * Standard implementation of <code>IPredicateRule</code>.
  * Is is capable of detecting a pattern which begins with a given start
@@ -225,10 +221,10 @@ public class PatternRule implements IPredicateRule {
 
 		char[][] originalDelimiters= scanner.getLegalLineDelimiters();
 		int count= originalDelimiters.length;
-		if (fLineDelimiters == null || originalDelimiters.length != count) {
+		if (fLineDelimiters == null || fLineDelimiters.length != count) {
 			fSortedLineDelimiters= new char[count][];
 		} else {
-			while (count > 0 && fLineDelimiters[count-1] == originalDelimiters[count-1])
+			while (count > 0 && Arrays.equals(fLineDelimiters[count - 1], originalDelimiters[count - 1]))
 				count--;
 		}
 		if (count != 0) {
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
index 6e864a1..b52a7ea 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,18 +7,16 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Doug Satchwell <doug.satchwell at ymail.com> - [implementation] Performance issue with jface text WordRule - http://bugs.eclipse.org/277299
  *******************************************************************************/
 package org.eclipse.jface.text.rules;
 
-
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.eclipse.core.runtime.Assert;
 
 
-
 /**
  * An implementation of {@link IRule} capable of detecting words. A word rule also allows to
  * associate a token to a word. That is, not only can the rule be used to provide tokens for exact
@@ -107,6 +105,9 @@ public class WordRule implements IRule {
 		Assert.isNotNull(word);
 		Assert.isNotNull(token);
 
+		// If case-insensitive, convert to lower case before adding to the map
+		if (fIgnoreCase)
+			word= word.toLowerCase();
 		fWords.put(word, token);
 	}
 
@@ -140,19 +141,12 @@ public class WordRule implements IRule {
 				scanner.unread();
 
 				String buffer= fBuffer.toString();
+				// If case-insensitive, convert to lower case before accessing the map
+				if (fIgnoreCase)
+					buffer= buffer.toLowerCase();
+				
 				IToken token= (IToken)fWords.get(buffer);
 
-				if (token == null && fIgnoreCase) {
-					Iterator iter= fWords.keySet().iterator();
-					while (iter.hasNext()) {
-						String key= (String)iter.next();
-						if(buffer.equalsIgnoreCase(key)) {
-							token= (IToken)fWords.get(key);
-							break;
-						}
-					}
-				}
-
 				if (token != null)
 					return token;
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
index 25d25ce..da1e975 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationBarHoverManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,10 +46,10 @@ import org.eclipse.jface.text.IInformationControl;
 import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.ITextViewerExtension5;
+import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode;
 import org.eclipse.jface.text.JFaceTextUtil;
 import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode;
 
 
 /**
@@ -130,7 +130,8 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
 				fDisplay= fSubjectControl.getDisplay();
 				if (!fDisplay.isDisposed() && fHideOnMouseWheel) {
 					fHasWheelFilter= true;
-					fDisplay.addFilter(SWT.MouseWheel, this);
+					fDisplay.addFilter(SWT.MouseHorizontalWheel, this);
+					fDisplay.addFilter(SWT.MouseVerticalWheel, this);
 				}
 			}
 		}
@@ -153,8 +154,10 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
 				fSubjectControl.removeKeyListener(this);
 			}
 
-			if (fDisplay != null && !fDisplay.isDisposed() && fHasWheelFilter)
-				fDisplay.removeFilter(SWT.MouseWheel, this);
+			if (fDisplay != null && !fDisplay.isDisposed() && fHasWheelFilter) {
+				fDisplay.removeFilter(SWT.MouseHorizontalWheel, this);
+				fDisplay.removeFilter(SWT.MouseVerticalWheel, this);
+			}
 			fHasWheelFilter= false;
 
 			fDisplay= null;
@@ -204,7 +207,7 @@ public class AnnotationBarHoverManager extends AbstractHoverInformationControlMa
 		 * @since 3.2
 		 */
 		public void handleEvent(Event event) {
-			if (event.type == SWT.MouseWheel)
+			if (event.type == SWT.MouseHorizontalWheel || event.type == SWT.MouseVerticalWheel)
 				hideInformationControl();
 		}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
index 269665b..07f88cc 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Wahlbrink <sw at wahlbrink.eu> - Annotations not painted when length is 0 / at document end - http://bugs.eclipse.org/bugs/show_bug.cgi?id=227534
  *******************************************************************************/
 package org.eclipse.jface.text.source;
 
@@ -1372,7 +1373,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
 			Annotation a= (Annotation)entry.getKey();
 			Decoration pp = (Decoration)entry.getValue();
 			// prune any annotation that is not drawable or does not need drawing
-			if (!(a.isMarkedDeleted() || skip(a) || !pp.fPosition.overlapsWith(vOffset, vLength))) {
+			if (!(a.isMarkedDeleted() || skip(a) || !regionsTouchOrOverlap(pp.fPosition.getOffset(), pp.fPosition.getLength(), vOffset, vLength))) {
 				// ensure sized appropriately
 				for (int i= toBeDrawn.size(); i <= pp.fLayer; i++)
 					toBeDrawn.add(new LinkedList());
@@ -1416,7 +1417,7 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
 				String lineDelimiter= document.getLineDelimiter(i);
 				int delimiterLength= lineDelimiter != null ? lineDelimiter.length() : 0;
 				int paintLength= Math.min(lineOffset + document.getLineLength(i) - delimiterLength, p.getOffset() + p.getLength()) - paintStart;
-				if (paintLength >= 0 && overlapsWith(paintStart, paintLength, clippingOffset, clippingLength)) {
+				if (paintLength >= 0 && regionsTouchOrOverlap(paintStart, paintLength, clippingOffset, clippingLength)) {
 					// otherwise inside a line delimiter
 					IRegion widgetRange= getWidgetRange(paintStart, paintLength);
 					if (widgetRange != null) {
@@ -1510,20 +1511,23 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
 	/**
 	 * Returns the widget region that corresponds to the
 	 * given offset and length in the viewer's document.
+	 * 
+	 * The returned object can be the fReusableRegion and may used
+	 * only to read the return values and must not used to store
+	 * the region.
 	 *
 	 * @param modelOffset the model offset
 	 * @param modelLength the model length
 	 * @return the corresponding widget region
 	 */
 	private IRegion getWidgetRange(int modelOffset, int modelLength) {
-		fReusableRegion.setOffset(modelOffset);
-		fReusableRegion.setLength(modelLength);
-
-		if (fReusableRegion == null || fReusableRegion.getOffset() == Integer.MAX_VALUE)
+		if (modelOffset == Integer.MAX_VALUE)
 			return null;
 
 		if (fSourceViewer instanceof ITextViewerExtension5) {
 			ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
+			fReusableRegion.setOffset(modelOffset);
+			fReusableRegion.setLength(modelLength);
 			return extension.modelRange2WidgetRange(fReusableRegion);
 		}
 
@@ -1531,10 +1535,12 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
 		int offset= region.getOffset();
 		int length= region.getLength();
 
-		if (overlapsWith(fReusableRegion, region)) {
-			int p1= Math.max(offset, fReusableRegion.getOffset());
-			int p2= Math.min(offset + length, fReusableRegion.getOffset() + fReusableRegion.getLength());
-			return new Region(p1 - offset, p2 - p1);
+		if (regionsTouchOrOverlap(modelOffset, modelLength, offset, length)) {
+			int p1= Math.max(offset, modelOffset);
+			int p2= Math.min(offset + length, modelOffset + modelLength);
+			fReusableRegion.setOffset(p1 - offset);
+			fReusableRegion.setLength(p2 - p1);
+			return fReusableRegion;
 		}
 		return null;
 	}
@@ -1562,40 +1568,16 @@ public class AnnotationPainter implements IPainter, PaintListener, IAnnotationMo
 	}
 
 	/**
-	 * Checks whether the intersection of the given text ranges
-	 * is empty or not.
-	 *
-	 * @param range1 the first range to check
-	 * @param range2 the second range to check
-	 * @return <code>true</code> if intersection is not empty
-	 */
-	private boolean overlapsWith(IRegion range1, IRegion range2) {
-		return overlapsWith(range1.getOffset(), range1.getLength(), range2.getOffset(), range2.getLength());
-	}
-
-	/**
-	 * Checks whether the intersection of the given text ranges
-	 * is empty or not.
+	 * Checks whether the two given text regions touch or overlap each other.
 	 *
-	 * @param offset1 offset of the first range
-	 * @param length1 length of the first range
-	 * @param offset2 offset of the second range
-	 * @param length2 length of the second range
-	 * @return <code>true</code> if intersection is not empty
-	 */
-	private boolean overlapsWith(int offset1, int length1, int offset2, int length2) {
-		int end= offset2 + length2;
-		int thisEnd= offset1 + length1;
-
-		if (length2 > 0) {
-			if (length1 > 0)
-				return offset1 < end && offset2 < thisEnd;
-			return  offset2 <= offset1 && offset1 < end;
-		}
-
-		if (length1 > 0)
-			return offset1 <= offset2 && offset2 < thisEnd;
-		return offset1 == offset2;
+	 * @param offset1 offset of the first region
+	 * @param length1 length of the first region
+	 * @param offset2 offset of the second region
+	 * @param length2 length of the second region
+	 * @return <code>true</code> if the regions touch or overlap
+	 */
+	private boolean regionsTouchOrOverlap(int offset1, int length1, int offset2, int length2) {
+		return (offset1 <= offset2+length2) && (offset2 <= offset1+length1);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
index f7be2c2..06d813b 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationRulerColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,8 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.jface.util.Util;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -129,6 +131,13 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul
 		}
 	}
 
+	/**
+	 * <code>true</code> if we're on a Mac, where "new GC(canvas)" is expensive.
+	 * @see <a href="https://bugs.eclipse.org/298936">bug 298936</a>
+	 * @since 3.6
+	 */
+	private static final boolean IS_MAC= Util.isMac();
+
 	/** This column's parent ruler */
 	private CompositeRuler fParentRuler;
 	/** The cached text viewer */
@@ -807,9 +816,14 @@ public class AnnotationRulerColumn implements IVerticalRulerColumn, IVerticalRul
 	 */
 	public void redraw() {
 		if (fCanvas != null && !fCanvas.isDisposed()) {
-			GC gc= new GC(fCanvas);
-			doubleBufferPaint(gc);
-			gc.dispose();
+			if (IS_MAC) {
+				fCanvas.redraw();
+				fCanvas.update();
+			} else {
+				GC gc= new GC(fCanvas);
+				doubleBufferPaint(gc);
+				gc.dispose();
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
index 214e107..0581713 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ChangeRulerColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import org.eclipse.core.runtime.Assert;
 
 import org.eclipse.jface.internal.text.revisions.RevisionPainter;
 import org.eclipse.jface.internal.text.source.DiffPainter;
+import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ISelectionProvider;
 
 import org.eclipse.jface.text.BadLocationException;
@@ -116,6 +117,13 @@ public final class ChangeRulerColumn implements IVerticalRulerColumn, IVerticalR
 	}
 
 	/**
+	 * <code>true</code> if we're on a Mac, where "new GC(canvas)" is expensive.
+	 * @see <a href="https://bugs.eclipse.org/298936">bug 298936</a>
+	 * @since 3.6
+	 */
+	private static final boolean IS_MAC= Util.isMac();
+
+	/**
 	 * The view(port) listener.
 	 */
 	private final InternalListener fInternalListener= new InternalListener();
@@ -333,9 +341,14 @@ public final class ChangeRulerColumn implements IVerticalRulerColumn, IVerticalR
 	public void redraw() {
 
 		if (fCachedTextViewer != null && fCanvas != null && !fCanvas.isDisposed()) {
-			GC gc= new GC(fCanvas);
-			doubleBufferPaint(gc);
-			gc.dispose();
+			if (IS_MAC) {
+				fCanvas.redraw();
+				fCanvas.update();
+			} else {
+				GC gc= new GC(fCanvas);
+				doubleBufferPaint(gc);
+				gc.dispose();
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ContentAssistantFacade.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ContentAssistantFacade.java
index 7ab4341..e399086 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ContentAssistantFacade.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ContentAssistantFacade.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ public final class ContentAssistantFacade {
 	 * @param contentAssistant the content assistant which implements {@link IContentAssistantExtension2} and {@link IContentAssistantExtension4}
 	 */
 	public ContentAssistantFacade(IContentAssistant contentAssistant) {
-		Assert.isLegal(contentAssistant instanceof IContentAssistantExtension4 && contentAssistant instanceof IContentAssistantExtension4);
+		Assert.isLegal(contentAssistant instanceof IContentAssistantExtension2 && contentAssistant instanceof IContentAssistantExtension4);
 		fContentAssistant= contentAssistant;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
index 0afbc88..6c8e26c 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultCharacterPairMatcher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,16 +36,16 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher {
 	private final String fPartitioning;
 
 	/**
-	 * Creates a new character pair matcher that matches the specified
-	 * characters within the specified partitioning.  The specified
-	 * list of characters must have the form
-	 * <blockquote>{ <i>start</i>, <i>end</i>, <i>start</i>, <i>end</i>, ..., <i>start</i>, <i>end</i> }</blockquote>
-	 * For instance:
+	 * Creates a new character pair matcher that matches the specified characters within the
+	 * specified partitioning. The specified list of characters must have the form <blockquote>{
+	 * <i>start</i>, <i>end</i>, <i>start</i>, <i>end</i>, ..., <i>start</i>, <i>end</i>
+	 * }</blockquote> For instance:
+	 * 
 	 * <pre>
 	 * char[] chars = new char[] {'(', ')', '{', '}', '[', ']'};
-	 * new SimpleCharacterPairMatcher(chars, ...);
+	 * new DefaultCharacterPairMatcher(chars, ...);
 	 * </pre>
-	 *
+	 * 
 	 * @param chars a list of characters
 	 * @param partitioning the partitioning to match within
 	 */
@@ -57,16 +57,15 @@ public class DefaultCharacterPairMatcher implements ICharacterPairMatcher {
 	}
 
 	/**
-	 * Creates a new character pair matcher that matches characters
-	 * within the default partitioning.  The specified list of
-	 * characters must have the form
-	 * <blockquote>{ <i>start</i>, <i>end</i>, <i>start</i>, <i>end</i>, ..., <i>start</i>, <i>end</i> }</blockquote>
-	 * For instance:
+	 * Creates a new character pair matcher that matches characters within the default partitioning.
+	 * The specified list of characters must have the form <blockquote>{ <i>start</i>, <i>end</i>,
+	 * <i>start</i>, <i>end</i>, ..., <i>start</i>, <i>end</i> }</blockquote> For instance:
+	 * 
 	 * <pre>
-	 * char[] chars = new char[] {'(', ')', '{', '}', '[', ']'};
-	 * new SimpleCharacterPairMatcher(chars);
+	 * char[] chars= new char[] { '(', ')', '{', '}', '[', ']' };
+	 * new DefaultCharacterPairMatcher(chars);
 	 * </pre>
-	 *
+	 * 
 	 * @param chars a list of characters
 	 */
 	public DefaultCharacterPairMatcher(char[] chars) {
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
index e734155..3310adb 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.Control;
  * </ul></p>
  * <p>
  * Clients may implement this interface or use the default implementation provided
- * by <code>OverviewlRuler</code>.</p>
+ * by <code>OverviewRuler</code>.</p>
  *
  * @see org.eclipse.jface.text.ITextViewer
  * @since 2.1
@@ -52,7 +52,7 @@ public interface IOverviewRuler extends IVerticalRuler {
 	 * overview ruler. Assumes that all annotations are represented using the
 	 * same height.
 	 *
-	 * @return int the visual height of an annotation
+	 * @return the visual height of an annotation
 	 */
 	int getAnnotationHeight();
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java
index 8b003fe..d22f2fe 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/ISourceViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,6 +93,11 @@ public interface ISourceViewer extends ITextViewer {
 	 * @since 3.2
 	 */
 	int QUICK_ASSIST= ITextOperationTarget.STRIP_PREFIX + 10;
+	
+	/*
+	 * XXX: Next free number is HyperlinkManager.OPEN_HYPERLINK + 1
+	 */
+
 
 	/**
 	 * Configures the source viewer using the given configuration. Prior to 3.0 this
@@ -163,9 +168,9 @@ public interface ISourceViewer extends ITextViewer {
 	void setRangeIndicator(Annotation rangeIndicator);
 
 	/**
-	 * Sets the viewers's range indication to the specified range. Its is indicated
-	 * whether the cursor should also be moved to the beginning of the specified range.
-	 *
+	 * Sets the viewers's range indication to the specified range. It is indicated whether the
+	 * cursor should also be moved to the beginning of the specified range.
+	 * 
 	 * @param offset the offset of the range
 	 * @param length the length of the range
 	 * @param moveCursor indicates whether the cursor should be moved to the given offset
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
index 9fae343..3dc1de1 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ import org.eclipse.jface.text.revisions.RevisionInformation;
  *
  * @since 3.0
  */
-public final class LineNumberChangeRulerColumn extends LineNumberRulerColumn implements IVerticalRulerInfo, IVerticalRulerInfoExtension, IChangeRulerColumn, IRevisionRulerColumn, IRevisionRulerColumnExtension {
+public final class LineNumberChangeRulerColumn extends LineNumberRulerColumn implements IChangeRulerColumn, IRevisionRulerColumn, IRevisionRulerColumnExtension {
 	/** The ruler's annotation model. */
 	private IAnnotationModel fAnnotationModel;
 	/** <code>true</code> if changes should be displayed using character indications instead of background colors. */
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
index a620105..8e18566 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberRulerColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,8 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.TypedListener;
 
+import org.eclipse.jface.util.Util;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -167,11 +169,13 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
 				// select line
 				IDocument document= fCachedTextViewer.getDocument();
 				int lineNumber= fParentRuler.getLineOfLastMouseButtonActivity();
-				if (expandExistingSelection && fCachedTextViewer instanceof ITextViewerExtension5
-						&& fCachedTextViewer.getTextWidget() != null) {
+				final StyledText textWidget= fCachedTextViewer.getTextWidget();
+				if (textWidget != null && !textWidget.isFocusControl())
+					textWidget.setFocus();
+				if (expandExistingSelection && fCachedTextViewer instanceof ITextViewerExtension5 && textWidget != null) {
 					ITextViewerExtension5 extension5= ((ITextViewerExtension5)fCachedTextViewer);
-					// Find model curosr position
-					int widgetCaret= fCachedTextViewer.getTextWidget().getCaretOffset();
+					// Find model cursor position
+					int widgetCaret= textWidget.getCaretOffset();
 					int modelCaret= extension5.widgetOffset2ModelOffset(widgetCaret);
 					// Find model selection range
 					Point selection= fCachedTextViewer.getSelectedRange();
@@ -361,6 +365,13 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
 		}
 	}
 
+	/**
+	 * <code>true</code> if we're on a Mac, where "new GC(canvas)" is expensive.
+	 * @see <a href="https://bugs.eclipse.org/298936">bug 298936</a>
+	 * @since 3.6
+	 */
+	private static final boolean IS_MAC= Util.isMac();
+
 	/** This column's parent ruler */
 	private CompositeRuler fParentRuler;
 	/** Cached text viewer */
@@ -840,9 +851,14 @@ public class LineNumberRulerColumn implements IVerticalRulerColumn {
 		}
 
 		if (fCachedTextViewer != null && fCanvas != null && !fCanvas.isDisposed()) {
-			GC gc= new GC(fCanvas);
-			doubleBufferPaint(gc);
-			gc.dispose();
+			if (IS_MAC) {
+				fCanvas.redraw();
+				fCanvas.update();
+			} else {
+				GC gc= new GC(fCanvas);
+				doubleBufferPaint(gc);
+				gc.dispose();
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
index dd322fd..af6a447 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,8 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.jface.util.Util;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -257,11 +259,11 @@ public class OverviewRuler implements IOverviewRuler {
 		}
 
 		private void drawBevelRect(GC gc, int x, int y, int w, int h, Color topLeft, Color bottomRight) {
-			gc.setForeground(topLeft == null ? fSeparatorColor : topLeft);
+			gc.setForeground(topLeft);
 			gc.drawLine(x, y, x + w -1, y);
 			gc.drawLine(x, y, x, y + h -1);
 
-			gc.setForeground(bottomRight == null ? fSeparatorColor : bottomRight);
+			gc.setForeground(bottomRight);
 			gc.drawLine(x + w, y, x + w, y + h);
 			gc.drawLine(x, y + h, x + w, y + h);
 		}
@@ -273,19 +275,45 @@ public class OverviewRuler implements IOverviewRuler {
 			Point s= fHeader.getSize();
 
 			e.gc.setBackground(fIndicatorColor);
-			Rectangle r= new Rectangle(INSET, (s.y - (2*ANNOTATION_HEIGHT)) / 2, s.x - (2*INSET), 2*ANNOTATION_HEIGHT);
+			
+			Rectangle headerBounds= fHeader.getBounds();
+			boolean isOnTop= headerBounds.y + headerBounds.height <= fCanvas.getLocation().y;
+			boolean isTall= s.y > s.x + 2*ANNOTATION_HEIGHT;
+			int y;
+			if (!isOnTop) {
+				// not on top -> attach to bottom
+				y= s.y - 3*ANNOTATION_HEIGHT;
+			} else if (isTall) {
+				// attach to top
+				y= ANNOTATION_HEIGHT;
+			} else {
+				// center
+				y= (s.y - (2*ANNOTATION_HEIGHT)) / 2;
+			}
+			Rectangle r= new Rectangle(INSET, y, s.x - (2*INSET), 2*ANNOTATION_HEIGHT);
 			e.gc.fillRectangle(r);
-			Display d= fHeader.getDisplay();
-			if (d != null)
-//				drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, d.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), d.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
-				drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, null, null);
+
+//			Display d= fHeader.getDisplay();
+//			drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, d.getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW), d.getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));
+			drawBevelRect(e.gc, r.x, r.y, r.width -1, r.height -1, fSeparatorColor, fSeparatorColor);
 
 			e.gc.setForeground(fSeparatorColor);
 			e.gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
-			e.gc.drawLine(0, s.y -1, s.x -1, s.y -1);
+
+			if (!isOnTop || !isTall) {
+				// only draw separator if at bottom or if gap is small
+				e.gc.drawLine(0, s.y -1, s.x -1, s.y -1);
+			}
 		}
 	}
 
+	/**
+	 * <code>true</code> if we're on a Mac, where "new GC(canvas)" is expensive.
+	 * @see <a href="https://bugs.eclipse.org/298936">bug 298936</a>
+	 * @since 3.6
+	 */
+	private static final boolean IS_MAC= Util.isMac();
+
 	private static final int INSET= 2;
 	private static final int ANNOTATION_HEIGHT= 4;
 	private static boolean ANNOTATION_HEIGHT_SCALABLE= true;
@@ -667,6 +695,8 @@ public class OverviewRuler implements IOverviewRuler {
 							gc.setForeground(stroke);
 							r.x= INSET;
 							r.y= yy;
+							if (yy + hh == size.y)
+								r.y--;
 							r.width= size.x - (2 * INSET);
 							r.height= hh;
 							gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
@@ -778,6 +808,8 @@ public class OverviewRuler implements IOverviewRuler {
 							gc.setForeground(stroke);
 							r.x= INSET;
 							r.y= yy;
+							if (yy + hh == size.y)
+								r.y--;
 							r.width= size.x - (2 * INSET);
 							r.height= hh;
 							gc.setLineWidth(0); // NOTE: 0 means width is 1 but with optimized performance
@@ -815,9 +847,14 @@ public class OverviewRuler implements IOverviewRuler {
 			return;
 
 		if (fCanvas != null && !fCanvas.isDisposed()) {
-			GC gc= new GC(fCanvas);
-			doubleBufferPaint(gc);
-			gc.dispose();
+			if (IS_MAC) {
+				fCanvas.redraw();
+				fCanvas.update();
+			} else {
+				GC gc= new GC(fCanvas);
+				doubleBufferPaint(gc);
+				gc.dispose();
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
index 2c1812f..e3c48d1 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/SourceViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Eicher (Avaloq Evolution AG) - block selection mode
+ *     Tom Hofmann (Perspectix AG) - bug 297572
  *******************************************************************************/
 package org.eclipse.jface.text.source;
 
@@ -15,12 +16,14 @@ import java.util.Iterator;
 import java.util.Stack;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Canvas;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.ScrollBar;
 
 import org.eclipse.jface.internal.text.NonDeletingPositionUpdater;
 import org.eclipse.jface.internal.text.StickyHoverManager;
@@ -45,6 +48,7 @@ import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.Region;
 import org.eclipse.jface.text.TextViewer;
 import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension2;
 import org.eclipse.jface.text.contentassist.IContentAssistantExtension4;
 import org.eclipse.jface.text.formatter.FormattingContext;
 import org.eclipse.jface.text.formatter.FormattingContextProperties;
@@ -86,6 +90,12 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 
 		/** The gap between the text viewer and the vertical ruler. */
 		protected int fGap;
+		
+		/**
+		 * Cached arrow heights of the vertical scroll bar: An array containing {topArrowHeight, bottomArrowHeight}.
+		 * @since 3.6
+		 */
+		private int[] fScrollArrowHeights;
 
 		/**
 		 * Creates a new ruler layout with the given gap between text viewer and vertical ruler.
@@ -112,19 +122,20 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 		 */
 		protected void layout(Composite composite, boolean flushCache) {
 			Rectangle clArea= composite.getClientArea();
-			Rectangle trim= getTextWidget().computeTrim(0, 0, 0, 0);
+			StyledText textWidget= getTextWidget();
+			Rectangle trim= textWidget.computeTrim(0, 0, 0, 0);
 			int topTrim= - trim.y;
-			int scrollbarHeight= trim.height - topTrim; // scrollbar is only under the client area
+			int scrollbarHeight= trim.height - topTrim; // horizontal scroll bar is only under the client area
 
 			int x= clArea.x;
 			int width= clArea.width;
 
+			int overviewRulerWidth= -1;
 			if (fOverviewRuler != null && fIsOverviewRulerVisible) {
-				int overviewRulerWidth= fOverviewRuler.getWidth();
-				fOverviewRuler.getControl().setBounds(clArea.x + clArea.width - overviewRulerWidth - 1, clArea.y + scrollbarHeight, overviewRulerWidth, clArea.height - 3*scrollbarHeight);
-				fOverviewRuler.getHeaderControl().setBounds(clArea.x + clArea.width - overviewRulerWidth - 1, clArea.y, overviewRulerWidth, scrollbarHeight);
-
+				overviewRulerWidth= fOverviewRuler.getWidth();
 				width -= overviewRulerWidth + fGap;
+				if (scrollbarHeight <= 0)
+					scrollbarHeight= overviewRulerWidth;
 			}
 
 			if (fVerticalRuler != null && fIsVerticalRulerVisible) {
@@ -139,7 +150,80 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 				width -= verticalRulerWidth + fGap;
 			}
 
-			getTextWidget().setBounds(x, clArea.y, width, clArea.height);
+			textWidget.setBounds(x, clArea.y, width, clArea.height);
+
+			if (overviewRulerWidth != -1) {
+				int bottomOffset= clArea.y + clArea.height - scrollbarHeight;
+				int[] arrowHeights= getVerticalScrollArrowHeights(textWidget, bottomOffset);
+				
+				int overviewRulerX= clArea.x + clArea.width - overviewRulerWidth - 1;
+				fOverviewRuler.getControl().setBounds(overviewRulerX, clArea.y + arrowHeights[0], overviewRulerWidth, clArea.height - arrowHeights[0] - arrowHeights[1] - scrollbarHeight);
+				
+				Control headerControl= fOverviewRuler.getHeaderControl();
+				boolean noArrows= arrowHeights[0] == 0 && arrowHeights[1] == 0;
+				if (noArrows || arrowHeights[0] < arrowHeights[1] && arrowHeights[0] < scrollbarHeight && arrowHeights[1] > scrollbarHeight) {
+					// // not enough space for header at top => move to bottom
+					int headerHeight= noArrows ? scrollbarHeight : arrowHeights[1];
+					headerControl.setBounds(overviewRulerX, clArea.y + clArea.height - arrowHeights[1] - scrollbarHeight, overviewRulerWidth, headerHeight);
+				} else {
+					headerControl.setBounds(overviewRulerX, clArea.y, overviewRulerWidth, arrowHeights[0]);
+				}
+				headerControl.redraw();
+			}
+		}
+
+		/**
+		 * Computes and caches the arrow heights of the vertical scroll bar.
+		 * 
+		 * @param textWidget the StyledText
+		 * @param bottomOffset y-coordinate of the bottom of the overview ruler area
+		 * @return an array containing {topArrowHeight, bottomArrowHeight}
+		 * 
+		 * @since 3.6
+		 */
+		private int[] getVerticalScrollArrowHeights(StyledText textWidget, int bottomOffset) {
+			ScrollBar verticalBar= textWidget.getVerticalBar();
+			if (verticalBar == null)
+				return new int[] { 0, 0 };
+			
+			int[] arrowHeights= computeScrollArrowHeights(textWidget, bottomOffset);
+			if (arrowHeights[0] > 0 || arrowHeights[1] > 0) {
+				fScrollArrowHeights= arrowHeights;
+			} else if (fScrollArrowHeights != null) {
+				return fScrollArrowHeights;
+			} else {
+				// No arrow heights available. Enlarge textWidget and tweak scroll bar to get reasonable values.
+				Point originalSize= textWidget.getSize();
+				try {
+					int fakeHeight= 1000;
+					bottomOffset= bottomOffset - originalSize.y + fakeHeight;
+					textWidget.setSize(originalSize.x, fakeHeight);
+					verticalBar.setValues(0, 0, 1 << 30, 1, 10, 10);
+					arrowHeights= computeScrollArrowHeights(textWidget, bottomOffset);
+					fScrollArrowHeights= arrowHeights;
+				} finally {
+					textWidget.setSize(originalSize); // also resets scroll bar values
+				}
+				return arrowHeights;
+			}
+			return arrowHeights;
+		}
+
+		/**
+		 * Computes the arrow heights of the vertical scroll bar.
+		 * 
+		 * @param textWidget the StyledText
+		 * @param bottomOffset y-coordinate of the bottom of the overview ruler area
+		 * @return an array containing {topArrowHeight, bottomArrowHeight}
+		 * 
+		 * @since 3.6
+		 */
+		private int[] computeScrollArrowHeights(StyledText textWidget, int bottomOffset) {
+			ScrollBar verticalBar= textWidget.getVerticalBar();
+			Rectangle thumbTrackBounds= verticalBar.getThumbTrackBounds();
+			int topArrowHeight= thumbTrackBounds.y;
+			int bottomArrowHeight= bottomOffset - (thumbTrackBounds.y + thumbTrackBounds.height);
+			return new int[] { topArrowHeight, bottomArrowHeight };
 		}
 	}
 
@@ -374,7 +458,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 		fContentAssistant= configuration.getContentAssistant(this);
 		if (fContentAssistant != null) {
 			fContentAssistant.install(this);
-			if (fContentAssistant instanceof IContentAssistantExtension4)
+			if (fContentAssistant instanceof IContentAssistantExtension2 && fContentAssistant instanceof IContentAssistantExtension4)
 				fContentAssistantFacade= new ContentAssistantFacade(fContentAssistant);
 			fContentAssistantInstalled= true;
 		}
@@ -587,7 +671,7 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 	 */
 	public IQuickAssistInvocationContext getQuickAssistInvocationContext() {
 		Point selection= getSelectedRange();
-		return new TextInvocationContext(this, selection.x, selection.x);
+		return new TextInvocationContext(this, selection.x, selection.y);
 	}
 
 	/*
@@ -1103,10 +1187,10 @@ public class SourceViewer extends TextViewer implements ISourceViewer, ISourceVi
 		}
 	}
 
-    /*
-     * @see org.eclipse.jface.text.source.ISourceViewer#getCurrentAnnotationHover()
-     * @since 3.2
-     */
+	/*
+	 * @see org.eclipse.jface.text.source.ISourceViewerExtension3#getCurrentAnnotationHover()
+	 * @since 3.2
+	 */
     public IAnnotationHover getCurrentAnnotationHover() {
     	if (fVerticalRulerHoveringController == null)
     		return null;
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
index 9fef74e..127b5f7 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/source/VerticalRuler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,8 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 
+import org.eclipse.jface.util.Util;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
@@ -85,6 +87,13 @@ public final class VerticalRuler implements IVerticalRuler, IVerticalRulerExtens
 		}
 	}
 
+	/**
+	 * <code>true</code> if we're on a Mac, where "new GC(canvas)" is expensive.
+	 * @see <a href="https://bugs.eclipse.org/298936">bug 298936</a>
+	 * @since 3.6
+	 */
+	private static final boolean IS_MAC= Util.isMac();
+
 	/** The vertical ruler's text viewer */
 	private ITextViewer fTextViewer;
 	/** The ruler's canvas */
@@ -463,9 +472,14 @@ public final class VerticalRuler implements IVerticalRuler, IVerticalRulerExtens
 	 */
 	private void redraw() {
 		if (fCanvas != null && !fCanvas.isDisposed()) {
-			GC gc= new GC(fCanvas);
-			doubleBufferPaint(gc);
-			gc.dispose();
+			if (IS_MAC) {
+				fCanvas.redraw();
+				fCanvas.update();
+			} else {
+				GC gc= new GC(fCanvas);
+				doubleBufferPaint(gc);
+				gc.dispose();
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
index f73a5f2..b0068a8 100644
--- a/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
+++ b/eclipse/plugins/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import javax.xml.transform.stream.StreamResult;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
@@ -148,6 +149,7 @@ public class TemplateReaderWriter {
 
 			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
 			DocumentBuilder parser= factory.newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
 			Document document= parser.parse(source);
 
 			NodeList elements= document.getElementsByTagName(TEMPLATE_ELEMENT);
@@ -276,19 +278,19 @@ public class TemplateReaderWriter {
 
 				if (template != null) {
 					Attr name= document.createAttribute(NAME_ATTRIBUTE);
-					name.setValue(template.getName());
+					name.setValue(validateXML(template.getName()));
 					attributes.setNamedItem(name);
 				}
 
 				if (template != null) {
 					Attr description= document.createAttribute(DESCRIPTION_ATTRIBUTE);
-					description.setValue(template.getDescription());
+					description.setValue(validateXML(template.getDescription()));
 					attributes.setNamedItem(description);
 				}
 
 				if (template != null) {
 					Attr context= document.createAttribute(CONTEXT_ATTRIBUTE);
-					context.setValue(template.getContextTypeId());
+					context.setValue(validateXML(template.getContextTypeId()));
 					attributes.setNamedItem(context);
 				}
 
@@ -307,7 +309,7 @@ public class TemplateReaderWriter {
 				}
 
 				if (template != null) {
-					Text pattern= document.createTextNode(template.getPattern());
+					Text pattern= document.createTextNode(validateXML(template.getPattern()));
 					node.appendChild(pattern);
 				}
 			}
@@ -329,6 +331,23 @@ public class TemplateReaderWriter {
 		}
 	}
 
+	/**
+	 * Validates whether the given string only contains valid XML characters.
+	 * 
+	 * @param string the string to validate
+	 * @return the input string
+	 * @throws IOException when the first invalid character is detected
+	 * @since 3.6
+	 */
+	private static String validateXML(String string) throws IOException {
+		for (int i= 0; i < string.length(); i++) {
+			char ch= string.charAt(i);
+			if (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))
+				throw new IOException("Character reference \"&#" + Integer.toString(ch) + "\" is an invalid XML character."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		return string;
+	}
+
 	private boolean getBooleanValue(NamedNodeMap attributes, String attribute, boolean defaultValue) throws SAXException {
 		Node enabledNode= attributes.getNamedItem(attribute);
 		if (enabledNode == null)
diff --git a/eclipse/plugins/org.eclipse.jface/.settings/.api_filters b/eclipse/plugins/org.eclipse.jface/.settings/.api_filters
deleted file mode 100644
index 1215f8c..0000000
--- a/eclipse/plugins/org.eclipse.jface/.settings/.api_filters
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.jface" version="2">
-    <resource path="src/org/eclipse/jface/dialogs/PopupDialog.java" type="org.eclipse.jface.dialogs.PopupDialog">
-        <filter id="388194388">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.dialogs.PopupDialog"/>
-                <message_argument value="HOVER_SHELLSTYLE"/>
-                <message_argument value="540680"/>
-            </message_arguments>
-        </filter>
-        <filter id="388194388">
-            <message_arguments>
-                <message_argument value="org.eclipse.jface.dialogs.PopupDialog"/>
-                <message_argument value="INFOPOPUP_SHELLSTYLE"/>
-                <message_argument value="8"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.jface/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jface/META-INF/MANIFEST.MF
index 747cbba..9f7a4a9 100644
--- a/eclipse/plugins/org.eclipse.jface/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jface/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jface
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -33,9 +33,9 @@ Export-Package: org.eclipse.jface,
  org.eclipse.jface.window,
  org.eclipse.jface.wizard,
  org.eclipse.jface.wizard.images
-Require-Bundle: org.eclipse.swt;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
+Require-Bundle: org.eclipse.swt;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
  org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)";visibility:=reexport,
- org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4,
  CDC-1.1/Foundation-1.1
 Import-Package: javax.xml.parsers,
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
index 411a573..08176fd 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
@@ -293,6 +293,8 @@ public class CoolBarManager extends ContributionManager implements
             // for 19630
             if ((control != null) && !control.isDisposed()) {
                 item.setControl(null);
+                // we created it, we dispose it, see bug 293433
+            	control.dispose();
             }
             item.dispose();
         }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.java
index 53ae441..0650a59 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/LegacyActionTools.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,9 +15,11 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Util;
+
 /**
  * <p>
  * Some static utility methods for handling labels on actions. This includes
@@ -508,6 +510,14 @@ public final class LegacyActionTools {
 		keyCodes.put("F10", new Integer(SWT.F10)); //$NON-NLS-1$
 		keyCodes.put("F11", new Integer(SWT.F11)); //$NON-NLS-1$
 		keyCodes.put("F12", new Integer(SWT.F12)); //$NON-NLS-1$
+		keyCodes.put("F13", new Integer(SWT.F13)); //$NON-NLS-1$
+		keyCodes.put("F14", new Integer(SWT.F14)); //$NON-NLS-1$
+		keyCodes.put("F15", new Integer(SWT.F15)); //$NON-NLS-1$
+		keyCodes.put("F16", new Integer(SWT.F16)); //$NON-NLS-1$
+		keyCodes.put("F17", new Integer(SWT.F17)); //$NON-NLS-1$
+		keyCodes.put("F18", new Integer(SWT.F18)); //$NON-NLS-1$
+		keyCodes.put("F19", new Integer(SWT.F19)); //$NON-NLS-1$
+		keyCodes.put("F20", new Integer(SWT.F20)); //$NON-NLS-1$
 	}
 
 	/**
@@ -554,6 +564,14 @@ public final class LegacyActionTools {
 		keyStrings.put(new Integer(SWT.F10), JFaceResources.getString("F10")); //$NON-NLS-1$
 		keyStrings.put(new Integer(SWT.F11), JFaceResources.getString("F11")); //$NON-NLS-1$
 		keyStrings.put(new Integer(SWT.F12), JFaceResources.getString("F12")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F13), JFaceResources.getString("F13")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F14), JFaceResources.getString("F14")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F15), JFaceResources.getString("F15")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F16), JFaceResources.getString("F16")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F17), JFaceResources.getString("F17")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F18), JFaceResources.getString("F18")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F19), JFaceResources.getString("F19")); //$NON-NLS-1$
+		keyStrings.put(new Integer(SWT.F20), JFaceResources.getString("F20")); //$NON-NLS-1$
 	}
 
 	/**
@@ -648,6 +666,30 @@ public final class LegacyActionTools {
 		localizedKeyCodes
 				.put(
 						JFaceResources.getString("F12").toUpperCase(), new Integer(SWT.F12)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F13").toUpperCase(), new Integer(SWT.F13)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F14").toUpperCase(), new Integer(SWT.F14)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F15").toUpperCase(), new Integer(SWT.F15)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F16").toUpperCase(), new Integer(SWT.F16)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F17").toUpperCase(), new Integer(SWT.F17)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F18").toUpperCase(), new Integer(SWT.F18)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F19").toUpperCase(), new Integer(SWT.F19)); //$NON-NLS-1$
+		localizedKeyCodes
+				.put(
+						JFaceResources.getString("F20").toUpperCase(), new Integer(SWT.F20)); //$NON-NLS-1$
 	}
 
 	/**
@@ -727,6 +769,20 @@ public final class LegacyActionTools {
 		}
 		return sb.toString();
 	}
+	
+	/**
+	 * Convenience method for escaping all mnemonics in the given string. For
+	 * example, <code>escapeMnemonics("a & b & c")</code> will return
+	 * <code>"a && b && c"</code>.
+	 * 
+	 * @param text
+	 *            the text
+	 * @return the text with mnemonics escaped
+	 * @since 3.6
+	 */
+	public static final String escapeMnemonics(String text) {
+		return Util.replaceAll(text, "&", "&&"); //$NON-NLS-1$//$NON-NLS-2$
+	}
 
 	/**
 	 * This class cannot be instantiated.
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
index bb2dbe2..443017e 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,12 +12,11 @@
 package org.eclipse.jface.action;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.ProgressIndicator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.Util;
+
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.ACC;
+import org.eclipse.swt.accessibility.AccessibleControlAdapter;
+import org.eclipse.swt.accessibility.AccessibleControlEvent;
 import org.eclipse.swt.custom.CLabel;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -37,6 +36,12 @@ import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
 
+import org.eclipse.jface.dialogs.ProgressIndicator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Util;
+
 /**
  * A StatusLine control is a SWT Composite with a horizontal layout which hosts
  * a number of status indication controls. Typically it is situated below the
@@ -71,7 +76,7 @@ import org.eclipse.swt.widgets.ToolItem;
 	protected String fTaskName;
 
 	/** is the task is cancled */
-	protected boolean fIsCanceled;
+	protected volatile boolean fIsCanceled;
 
 	/** the start time of the task */
 	protected long fStartTime;
@@ -256,6 +261,12 @@ import org.eclipse.swt.widgets.ToolItem;
 	 */
 	public StatusLine(Composite parent, int style) {
 		super(parent, style);
+		
+		getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getRole(AccessibleControlEvent e) {
+				e.detail = ACC.ROLE_STATUSBAR;
+			}
+		});
 
 		addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
@@ -633,7 +644,7 @@ import org.eclipse.swt.widgets.ToolItem;
 		if (message == null) {
 			return null;
 		}
-		message = Util.replaceAll(message, "&", "&&"); //$NON-NLS-1$//$NON-NLS-2$
+		message = LegacyActionTools.escapeMnemonics(message);
 		int cr = message.indexOf('\r');
 		int lf = message.indexOf('\n');
 		if (cr == -1 && lf == -1) {
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineContributionItem.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineContributionItem.java
index 6ccc79b..644252c 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineContributionItem.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineContributionItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@
 package org.eclipse.jface.action;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.util.Util;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CLabel;
 import org.eclipse.swt.graphics.FontMetrics;
@@ -21,6 +21,8 @@ import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 
+import org.eclipse.jface.util.Util;
+
 /**
  * A contribution item to be used with status line managers.
  * <p>
@@ -32,6 +34,15 @@ import org.eclipse.swt.widgets.Label;
 public class StatusLineContributionItem extends ContributionItem {
 
 	private final static int DEFAULT_CHAR_WIDTH = 40;
+	
+	/**
+	 * A constant indicating that the contribution should compute its actual
+	 * size depending on the text. It will grab all space necessary to display
+	 * the whole text.
+	 * 
+	 * @since 3.6
+	 */
+	public final static int CALC_TRUE_WIDTH = -1;
 
 	private int charWidth;
 
@@ -69,7 +80,10 @@ public class StatusLineContributionItem extends ContributionItem {
 	 *            the contribution item's id, or <code>null</code> if it is to
 	 *            have no id
 	 * @param charWidth
-	 *            the number of characters to display
+	 *            the number of characters to display. If the value is
+	 *            CALC_TRUE_WIDTH then the contribution will compute the
+	 *            preferred size exactly. Otherwise the size will be based on the
+	 *            average character size * 'charWidth'
 	 */
 	public StatusLineContributionItem(String id, int charWidth) {
 		super(id);
@@ -82,8 +96,15 @@ public class StatusLineContributionItem extends ContributionItem {
 
 		Label sep = new Label(parent, SWT.SEPARATOR);
 		label = new CLabel(statusLine, SWT.SHADOW_NONE);
-
-		if (widthHint < 0) {
+		label.setText(text);		
+		
+		if (charWidth == CALC_TRUE_WIDTH) {
+			// compute the size of the label to get the width hint for the contribution
+			Point preferredSize = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			widthHint = preferredSize.x;
+			heightHint = preferredSize.y;
+		} else if (widthHint < 0) {
+			// Compute the size base on 'charWidth' average char widths
 			GC gc = new GC(statusLine);
 			gc.setFont(statusLine.getFont());
 			FontMetrics fm = gc.getFontMetrics();
@@ -95,7 +116,6 @@ public class StatusLineContributionItem extends ContributionItem {
 		StatusLineLayoutData data = new StatusLineLayoutData();
 		data.widthHint = widthHint;
 		label.setLayoutData(data);
-		label.setText(text);
 
 		data = new StatusLineLayoutData();
 		data.heightHint = heightHint;
@@ -135,7 +155,7 @@ public class StatusLineContributionItem extends ContributionItem {
 	public void setText(String text) {
 		Assert.isNotNull(text);
 
-		this.text = escape(text);
+		this.text = LegacyActionTools.escapeMnemonics(text);
 
 		if (label != null && !label.isDisposed()) {
 			label.setText(this.text);
@@ -151,7 +171,8 @@ public class StatusLineContributionItem extends ContributionItem {
 				}
 			}
 		} else {
-			if (!isVisible()) {
+			// Always update if using 'CALC_TRUE_WIDTH'
+			if (!isVisible() || charWidth == CALC_TRUE_WIDTH) {
 				setVisible(true);
 				IContributionManager contributionManager = getParent();
 
@@ -161,8 +182,4 @@ public class StatusLineContributionItem extends ContributionItem {
 			}
 		}
 	}
-
-	private String escape(String text) {
-		return Util.replaceAll(text, "&", "&&");  //$NON-NLS-1$//$NON-NLS-2$
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineManager.java
index a7a92f5..a17e0fc 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/StatusLineManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -185,11 +185,9 @@ public class StatusLineManager extends ContributionManager implements
              */
             public void setCanceled(boolean value) {
                 //Don't bother updating for disposed status
-                if (statusLine.isDisposed()) {
-					return;
+                if (statusLineExist()) {
+                	progressDelegate.setCanceled(value);
 				}
-                progressDelegate.setCanceled(value);
-
             }
 
             /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java
index 918dd0c..d6db672 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/action/ToolBarManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ public class ToolBarManager extends ContributionManager implements
 	private int itemStyle = SWT.NONE;
 
 	/**
-	 * The tool bat control; <code>null</code> before creation and after
+	 * The tool bar control; <code>null</code> before creation and after
 	 * disposal.
 	 */
 	private ToolBar toolBar = null;
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
index 14fcc18..e1d88ef 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
@@ -2263,19 +2263,31 @@ public final class BindingManager extends HandleObjectManager implements
 	 *            The new array of bindings; may be <code>null</code>. This
 	 *            set is copied into a local data structure.
 	 */
-	public final void setBindings(final Binding[] bindings) {
+	public final void setBindings(Binding[] bindings) {
+		if (bindings != null) {
+			// discard bindings not applicable for this platform
+			List newList = new ArrayList();
+			for (int i = 0; i < bindings.length; i++) {
+				Binding binding = bindings[i];
+				String p = binding.getPlatform();
+				if (p == null) {
+					newList.add(binding);
+				} else if (p.equals(platform)) {
+					newList.add(binding);
+				}
+			}
+			bindings = (Binding[]) newList.toArray(new Binding[newList.size()]);
+		}
+		//Check for equality after the munge
 		if (Arrays.equals(this.bindings, bindings)) {
 			return; // nothing has changed
 		}
-
 		if ((bindings == null) || (bindings.length == 0)) {
 			this.bindings = null;
 			bindingCount = 0;
 		} else {
-			final int bindingsLength = bindings.length;
-			this.bindings = new Binding[bindingsLength];
-			System.arraycopy(bindings, 0, this.bindings, 0, bindingsLength);
-			bindingCount = bindingsLength;
+			this.bindings = bindings;
+			bindingCount = bindings.length;
 		}
 		clearCache();
 	}
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/CachedBindingSet.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/CachedBindingSet.java
index 1da7b67..20eff30 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/CachedBindingSet.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/CachedBindingSet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,10 @@
  *******************************************************************************/
 package org.eclipse.jface.bindings;
 
+import java.util.Collections;
 import java.util.Map;
 
+import org.eclipse.core.commands.util.Tracing;
 import org.eclipse.jface.util.Util;
 
 /**
@@ -343,7 +345,11 @@ final class CachedBindingSet {
 	 */
 	final void setPrefixTable(final Map prefixTable) {
 		if (prefixTable == null) {
-			throw new NullPointerException("Cannot set a null prefix table"); //$NON-NLS-1$
+			this.prefixTable = Collections.EMPTY_MAP;
+			if (BindingManager.DEBUG) {
+				Tracing.printTrace("BINDINGS", "Cannot set a null prefix table, set to EMPTY_MAP"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			return;
 		}
 
 		this.prefixTable = prefixTable;
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/IKeyLookup.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/IKeyLookup.java
index ad057aa..a2bb3db 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/IKeyLookup.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/IKeyLookup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -145,6 +145,41 @@ public interface IKeyLookup {
 	public static final String F15_NAME = "F15"; //$NON-NLS-1$
 
 	/**
+	 * The formal name of the 'F16' key.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String F16_NAME = "F16"; //$NON-NLS-1$
+
+	/**
+	 * The formal name of the 'F17' key.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String F17_NAME = "F17"; //$NON-NLS-1$
+
+	/**
+	 * The formal name of the 'F18' key.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String F18_NAME = "F18"; //$NON-NLS-1$
+
+	/**
+	 * The formal name of the 'F19' key.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String F19_NAME = "F19"; //$NON-NLS-1$
+
+	/**
+	 * The formal name of the 'F20' key.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String F20_NAME = "F20"; //$NON-NLS-1$
+
+	/**
 	 * The formal name of the 'F2' key.
 	 */
 	public static final String F2_NAME = "F2"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/SWTKeyLookup.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/SWTKeyLookup.java
index 3854a6c..72d44d0 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/SWTKeyLookup.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/SWTKeyLookup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -157,6 +157,21 @@ public final class SWTKeyLookup implements IKeyLookup {
 		final Integer f15 = new Integer(SWT.F15);
 		naturalKeyTable.put(F15_NAME, new Integer(SWT.F15));
 		nameTable.put(f15, F15_NAME);
+		final Integer f16 = new Integer(SWT.F16);
+		naturalKeyTable.put(F16_NAME, new Integer(SWT.F16));
+		nameTable.put(f16, F16_NAME);
+		final Integer f17 = new Integer(SWT.F17);
+		naturalKeyTable.put(F17_NAME, new Integer(SWT.F17));
+		nameTable.put(f17, F17_NAME);
+		final Integer f18 = new Integer(SWT.F18);
+		naturalKeyTable.put(F18_NAME, new Integer(SWT.F18));
+		nameTable.put(f18, F18_NAME);
+		final Integer f19 = new Integer(SWT.F19);
+		naturalKeyTable.put(F19_NAME, new Integer(SWT.F19));
+		nameTable.put(f19, F19_NAME);
+		final Integer f20 = new Integer(SWT.F20);
+		naturalKeyTable.put(F20_NAME, new Integer(SWT.F20));
+		nameTable.put(f20, F20_NAME);
 		final Integer ff = new Integer(12); // ASCII 0x0C
 		naturalKeyTable.put(FF_NAME, ff);
 		nameTable.put(ff, FF_NAME);
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/AbstractKeyFormatter.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/AbstractKeyFormatter.properties
index 1949c93..ceb2aec 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/AbstractKeyFormatter.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/AbstractKeyFormatter.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,15 @@ F1=F1
 F10=F10
 F11=F11
 F12=F12
+F13=F13
+F14=F14
+F15=F15
+F16=F16
+F17=F17
+F18=F18
+F19=F19
 F2=F2
+F20=F20
 F3=F3
 F4=F4
 F5=F5
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/NativeKeyFormatter.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/NativeKeyFormatter.java
index 4482009..d6d82b7 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/NativeKeyFormatter.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/bindings/keys/formatting/NativeKeyFormatter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,6 @@ public final class NativeKeyFormatter extends AbstractKeyFormatter {
 		final String carbonDelete = "\u2326"; //$NON-NLS-1$
 		CARBON_KEY_LOOK_UP.put(IKeyLookup.DEL_NAME, carbonDelete);
 		CARBON_KEY_LOOK_UP.put(IKeyLookup.DELETE_NAME, carbonDelete);
-		CARBON_KEY_LOOK_UP.put(IKeyLookup.SPACE_NAME, "\u2423"); //$NON-NLS-1$
 		CARBON_KEY_LOOK_UP.put(IKeyLookup.ALT_NAME, "\u2325"); //$NON-NLS-1$
 		CARBON_KEY_LOOK_UP.put(IKeyLookup.COMMAND_NAME, "\u2318"); //$NON-NLS-1$
 		CARBON_KEY_LOOK_UP.put(IKeyLookup.CTRL_NAME, "\u2303"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
index 22ae5e6..328d78e 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,19 +7,20 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Marc R. Hoffmann <hoffmann at mountainminds.com> - Bug 284265 [JFace] 
+ *                  DialogSettings.save() silently ignores IOException
  *******************************************************************************/
 package org.eclipse.jface.dialogs;
 
 import java.io.BufferedReader;
+import java.io.BufferedWriter;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
 import java.io.Reader;
-import java.io.UnsupportedEncodingException;
 import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -34,13 +35,12 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
 
 /**
  * Concrete implementation of a dialog settings (<code>IDialogSettings</code>)
@@ -362,8 +362,10 @@ public class DialogSettings implements IDialogSettings {
     /* (non-Javadoc)
      * Method declared on IDialogSettings.
      */
-	public void save(Writer writer) {
-    	save(new XMLWriter(writer));
+	public void save(Writer writer) throws IOException {
+    	final XMLWriter xmlWriter = new XMLWriter(writer);
+    	save(xmlWriter);
+    	xmlWriter.flush();
     }
 
     /* (non-Javadoc)
@@ -379,7 +381,7 @@ public class DialogSettings implements IDialogSettings {
     /* (non-Javadoc)
      * Save the settings in the <code>document</code>.
      */
-    private void save(XMLWriter out) {
+    private void save(XMLWriter out) throws IOException {
     	HashMap attributes = new HashMap(2);
     	attributes.put(TAG_NAME, name == null ? "" : name); //$NON-NLS-1$
         out.startTag(TAG_SECTION, attributes);
@@ -420,8 +422,9 @@ public class DialogSettings implements IDialogSettings {
      * A simple XML writer.  Using this instead of the javax.xml.transform classes allows
      * compilation against JCL Foundation (bug 80059).
      */
-    private static class XMLWriter extends PrintWriter {
-    	/** current number of tabs to use for ident */
+    private static class XMLWriter extends BufferedWriter {
+    	
+    	/** current number of tabs to use for indent */
     	protected int tab;
 
     	/** the xml header */
@@ -430,36 +433,41 @@ public class DialogSettings implements IDialogSettings {
     	/**
     	 * Create a new XMLWriter
     	 * @param output the stream to write the output to
-    	 * @throws UnsupportedEncodingException thrown if charset is not supported
+    	 * @throws IOException 
     	 */
-    	public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
-    		super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
-    		tab = 0;
-    		println(XML_VERSION);
+    	public XMLWriter(OutputStream output) throws IOException {
+    		this(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
     	}
 
     	/**
     	 * Create a new XMLWriter
     	 * @param output the write to used when writing to
+    	 * @throws IOException 
     	 */
-    	public XMLWriter(Writer output) {
+    	public XMLWriter(Writer output) throws IOException {
     		super(output);
     		tab = 0;
-    		println(XML_VERSION);
+    		writeln(XML_VERSION);
+    	}
+
+    	private  void writeln(String text) throws IOException {
+    		write(text);
+    		newLine();
     	}
 
     	/**
     	 * write the intended end tag
     	 * @param name the name of the tag to end
+    	 * @throws IOException 
     	 */
-    	public void endTag(String name) {
+    	public void endTag(String name) throws IOException {
     		tab--;
     		printTag("/" + name, null, false); //$NON-NLS-1$
     	}
 
-    	private void printTabulation() {
+    	private void printTabulation() throws IOException {
     		for (int i = 0; i < tab; i++) {
-				super.print('\t');
+				super.write('\t');
 			}
     	}
 
@@ -468,12 +476,13 @@ public class DialogSettings implements IDialogSettings {
     	 * @param name the name of the tag
     	 * @param parameters map of parameters
     	 * @param close should the tag be ended automatically (=> empty tag)
+    	 * @throws IOException 
     	 */
-    	public void printTag(String name, HashMap parameters, boolean close) {
+    	public void printTag(String name, HashMap parameters, boolean close) throws IOException {
     		printTag(name, parameters, true, true, close);
     	}
 
-    	private void printTag(String name, HashMap parameters, boolean shouldTab, boolean newLine, boolean close) {
+    	private void printTag(String name, HashMap parameters, boolean shouldTab, boolean newLine, boolean close) throws IOException {
     		StringBuffer sb = new StringBuffer();
     		sb.append('<');
     		sb.append(name);
@@ -495,9 +504,9 @@ public class DialogSettings implements IDialogSettings {
 				printTabulation();
 			}
     		if (newLine) {
-				println(sb.toString());
+				writeln(sb.toString());
 			} else {
-				print(sb.toString());
+				write(sb.toString());
 			}
     	}
 
@@ -505,13 +514,14 @@ public class DialogSettings implements IDialogSettings {
     	 * start the tag
     	 * @param name the name of the tag
     	 * @param parameters map of parameters
+    	 * @throws IOException 
     	 */
-    	public void startTag(String name, HashMap parameters) {
+    	public void startTag(String name, HashMap parameters) throws IOException {
     		startTag(name, parameters, true);
     		tab++;
     	}
 
-    	private void startTag(String name, HashMap parameters, boolean newLine) {
+    	private void startTag(String name, HashMap parameters, boolean newLine) throws IOException {
     		printTag(name, parameters, true, newLine, false);
     	}
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
index 32d1cda..25159bb 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -294,11 +294,17 @@ public class ErrorDialog extends IconAndMessageDialog {
 	}
 
 	/**
-	 * Create this dialog's drop-down list component.
+	 * Create this dialog's drop-down list component. The list is displayed
+	 * after the user presses details button. It is developer responsibility
+	 * to display details button if and only if there is some content on 
+	 * drop down list. The visibility of the details button is controlled by
+	 * {@link #shouldShowDetailsButton()}, which should also be overridden
+	 * together with this method.
 	 * 
 	 * @param parent
 	 *            the parent composite
 	 * @return the drop-down list component
+	 * @see #shouldShowDetailsButton()
 	 */
 	protected List createDropDownList(Composite parent) {
 		// create the list
@@ -422,11 +428,25 @@ public class ErrorDialog extends IconAndMessageDialog {
 	 * 
 	 * @param listToPopulate
 	 *            The list to fill.
+	 * 
+	 * @see #listContentExists()
 	 */
 	private void populateList(List listToPopulate) {
 		populateList(listToPopulate, status, 0,
 				shouldIncludeTopLevelErrorInDetails);
 	}
+	
+	/**
+	 * This method checks if any content will be placed on the list.
+	 * It mimics the behavior of {@link #populateList(List)}.
+	 * 
+	 * @return true if {@link #populateList(List)} will add anything to a list
+	 * 
+	 * @see #populateList(List)
+	 */
+	private boolean listContentExists() {
+		return listContentExists(status, shouldIncludeTopLevelErrorInDetails);
+	}
 
 	/**
 	 * Populate the list with the messages from the given status. Traverse the
@@ -503,6 +523,58 @@ public class ErrorDialog extends IconAndMessageDialog {
 			populateList(listToPopulate, children[i], nesting, true);
 		}
 	}
+	
+	/**
+	 * This method checks if {@link #populateList(List, IStatus, int, boolean)}
+	 * will add anything to the list.
+	 * 
+	 * @param buildingStatus
+	 *            A status to be considered.
+	 * @param includeStatus
+	 *            This flag indicates if top level status should be placed on a
+	 *            list.
+	 * @return true if any new content will be added to the list.
+	 * @see #listContentExists(IStatus, boolean)
+	 */
+	private boolean listContentExists(IStatus buildingStatus,
+			boolean includeStatus) {
+		
+		if (!buildingStatus.matches(displayMask)) {
+			return false;
+		}
+
+		Throwable t = buildingStatus.getException();
+		boolean isCoreException = t instanceof CoreException;
+
+		if (includeStatus) {
+			return true;
+		}
+
+		if (!isCoreException && t != null) {
+			return true;
+		}
+		
+		boolean result = false;
+
+		// Look for a nested core exception
+		if (isCoreException) {
+			CoreException ce = (CoreException) t;
+			IStatus eStatus = ce.getStatus();
+			// Gets exception message if it is not contained in the
+			// parent message
+			if (message == null || message.indexOf(eStatus.getMessage()) == -1) {
+				result |= listContentExists(eStatus, true);
+			}
+		}
+
+		// Look for child status
+		IStatus[] children = buildingStatus.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			result |= listContentExists(children[i], true);
+		}
+		
+		return result;
+	}
 
 	/**
 	 * Returns whether the given status object should be displayed.
@@ -640,16 +712,16 @@ public class ErrorDialog extends IconAndMessageDialog {
 
 	/**
 	 * Return whether the Details button should be included. This method is
-	 * invoked once when the dialog is built. By default, the Details button is
-	 * only included if the status used when creating the dialog was a
-	 * multi-status or if the status contains an exception. Subclasses may
-	 * override.
+	 * invoked once when the dialog is built. Default implementation is tight to
+	 * default implementation of {@link #createDropDownList(Composite)} and 
+	 * displays details button if there is anything on the display list.
 	 * 
 	 * @return whether the Details button should be included
 	 * @since 3.1
+	 * @see #createDropDownList(Composite)
 	 */
 	protected boolean shouldShowDetailsButton() {
-		return status.isMultiStatus() || status.getException() != null;
+		return listContentExists();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java
index a3a4fd8..dd19c71 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.jface.dialogs;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.layout.GridDataFactory;
 import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.jface.layout.LayoutConstants;
@@ -274,6 +275,12 @@ public abstract class IconAndMessageDialog extends Dialog {
 		}
 		if (shell == null || shell.isDisposed()) {
 			display = Display.getCurrent();
+			// The dialog should be always instantiated in UI thread.
+			// However it was possible to instantiate it in other threads
+			// (the code worked in most cases) so the assertion covers
+			// only the failing scenario. See bug 107082 for details.
+			Assert.isNotNull(display,
+					"The dialog should be created in UI thread"); //$NON-NLS-1$
 		} else {
 			display = shell.getDisplay();
 		}
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java
index 7968cb5..ebb06cd 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java
@@ -27,6 +27,11 @@ import org.eclipse.swt.widgets.Shell;
  * This concrete dialog class can be instantiated as is, or further subclassed
  * as required.
  * </p>
+ * <p>
+ * <strong>Note:</strong> This class does not use button IDs from
+ * IDialogConstants. Instead, the ID is the index of the button in the supplied
+ * array.
+ * </p>
  */
 public class MessageDialog extends IconAndMessageDialog {
     /**
@@ -278,9 +283,11 @@ public class MessageDialog extends IconAndMessageDialog {
      * 
      * @param index
      *            the index of the button in the dialog's button bar
-     * @return a button in the dialog's button bar
+     * @return a button in the dialog's button bar, or <code>null</code> if there's no button with that index
      */
     protected Button getButton(int index) {
+        if (buttons == null || index < 0 || index >= buttons.length)
+            return null;
         return buttons[index];
     }
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
index 09a31ac..c775d7d 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
@@ -325,6 +325,7 @@ public class PopupDialog extends Window {
 
 	/**
 	 * Color to be used for the info area text.
+	 * 
 	 * @since 3.6
 	 */
 	private Color infoColor;
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
index 465bd9f..4b1041e 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/ProgressMonitorDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,7 +152,7 @@ public class ProgressMonitorDialog extends IconAndMessageDialog implements
 	private class ProgressMonitor implements IProgressMonitorWithBlocking {
 		private String fSubTask = "";//$NON-NLS-1$
 
-		private boolean fIsCanceled;
+		private volatile boolean fIsCanceled;
 
 		/**
 		 * is the process forked
@@ -619,7 +619,9 @@ public class ProgressMonitorDialog extends IconAndMessageDialog implements
 	 */
 	protected void setOperationCancelButtonEnabled(boolean b) {
 		operationCancelableState = b;
-		cancel.setEnabled(b);
+		if (cancel != null && !cancel.isDisposed()) {
+			cancel.setEnabled(b);	
+		}
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
index aa940df..25ee01e 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ package org.eclipse.jface.dialogs;
 
 import org.eclipse.jface.resource.JFaceColors;
 import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.window.ToolTip;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -23,6 +24,7 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
@@ -31,7 +33,9 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 
@@ -110,6 +114,10 @@ public class TitleAreaDialog extends TrayDialog {
 
 	private Image titleAreaImage;
 
+	private int xTrim;
+
+	private int yTrim;
+
 	/**
 	 * Instantiate a new title area dialog.
 	 * 
@@ -146,6 +154,18 @@ public class TitleAreaDialog extends TrayDialog {
 		// create the dialog area and button bar
 		dialogArea = createDialogArea(workArea);
 		buttonBar = createButtonBar(workArea);
+		
+		// computing trim for later
+		Rectangle rect = messageLabel.computeTrim(0, 0, 100, 100);
+		xTrim = rect.width - 100;
+		yTrim = rect.height - 100;
+		
+		// need to react to new size of title area
+		getShell().addListener(SWT.Resize, new Listener() {
+			public void handleEvent(Event event) {
+				layoutForNewMessage(true);
+			}
+		});
 		return contents;
 	}
 
@@ -395,13 +415,16 @@ public class TitleAreaDialog extends TrayDialog {
 				setImageLabelVisible(true);
 			}
 		}
-		layoutForNewMessage();
+		layoutForNewMessage(false);
 	}
 
 	/**
 	 * Re-layout the labels for the new message.
+	 * 
+	 * @param forceLayout
+	 *            <code>true</code> to force a layout of the shell
 	 */
-	private void layoutForNewMessage() {
+	private void layoutForNewMessage(boolean forceLayout) {
 		int verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
 		int horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
 		// If there are no images then layout as normal
@@ -445,10 +468,49 @@ public class TitleAreaDialog extends TrayDialog {
 						0, SWT.BOTTOM);
 			messageLabel.setLayoutData(messageLabelData);
 		}
-		// Do not layout before the dialog area has been created
-		// to avoid incomplete calculations.
-		if (dialogArea != null)
-			workArea.getParent().layout(true);
+
+		if (forceLayout) {
+			getShell().layout();
+		} else {
+			// Do not layout before the dialog area has been created
+			// to avoid incomplete calculations.
+			if (dialogArea != null)
+				workArea.getParent().layout(true);
+		}
+		
+		int messageLabelUnclippedHeight = messageLabel.computeSize(messageLabel.getSize().x - xTrim, SWT.DEFAULT, true).y;
+		boolean messageLabelClipped = messageLabelUnclippedHeight > messageLabel.getSize().y - yTrim;
+		if (messageLabel.getData() instanceof ToolTip) {
+			ToolTip toolTip = (ToolTip) messageLabel.getData();
+			toolTip.hide();
+			toolTip.deactivate();
+			messageLabel.setData(null);
+		}
+		if (messageLabelClipped) {
+			ToolTip tooltip = new ToolTip(messageLabel, ToolTip.NO_RECREATE, false) {
+				
+				protected Composite createToolTipContentArea(Event event, Composite parent) {
+					Composite result = new Composite(parent, SWT.NONE);
+					result.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+					result.setLayout(new GridLayout());
+					Text text = new Text(result, SWT.WRAP);
+					text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+					text.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
+					text.setText(messageLabel.getText());
+					GridData gridData = new GridData();
+					gridData.widthHint = messageLabel.getSize().x;
+					text.setLayoutData(gridData);
+					Dialog.applyDialogFont(result);
+					return result;
+				}
+				public Point getLocation(Point tipSize, Event event) {
+					return messageLabel.getShell().toDisplay(messageLabel.getLocation());
+				}
+			};
+			messageLabel.setData(tooltip);
+			tooltip.setPopupDelay(0);
+			tooltip.activate();
+		}
 	}
 
 	/**
@@ -517,13 +579,16 @@ public class TitleAreaDialog extends TrayDialog {
 	 * @param newImage
 	 */
 	private void showMessage(String newMessage, Image newImage) {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=249915
+		if (newMessage == null)
+			newMessage = ""; //$NON-NLS-1$
+		
 		// Any change?
 		if (message.equals(newMessage) && messageImage == newImage) {
 			return;
 		}
 		message = newMessage;
-		if (message == null)
-			message = "";//$NON-NLS-1$
+		
 		// Message string to be shown - if there is an image then add in
 		// a space to the message for layout purposes
 		String shownMessage = (newImage == null) ? message : " " + message; //$NON-NLS-1$  
@@ -533,7 +598,7 @@ public class TitleAreaDialog extends TrayDialog {
 			updateMessage(shownMessage);
 			messageImageLabel.setImage(messageImage);
 			setImageLabelVisible(messageImage != null);
-			layoutForNewMessage();
+			layoutForNewMessage(false);
 		}
 	}
 
@@ -621,4 +686,40 @@ public class TitleAreaDialog extends TrayDialog {
 		childData.bottom = new FormAttachment(100, 0);
 		workArea.setLayoutData(childData);
 	}
+	
+	/**
+	 * Returns the current message text for this dialog.  This message is 
+	 * displayed in the message line of the dialog when the error message
+	 * is <code>null</code>.  If there is a non-null error message, this
+	 * message is not shown, but is stored so that it can be shown in
+	 * the message line whenever {@link #setErrorMessage(String)} is called with
+	 * a <code>null</code> parameter.
+	 * 
+	 * @return the message text, which is never <code>null</code>. 
+	 * 
+	 * @see #setMessage(String)
+	 * @see #setErrorMessage(String)
+	 * 
+	 * @since 3.6
+	 */
+	
+    public String getMessage() {
+    	return message;
+    }
+    
+	/**
+	 * Returns the current error message being shown in the dialog, or 
+	 * <code>null</code> if there is no error message being shown.
+	 * 
+	 * @return the error message, which may be <code>null</code>. 
+	 * 
+	 * @see #setErrorMessage(String)
+	 * @see #setMessage(String)
+	 * 
+	 * @since 3.6
+	 */
+	
+    public String getErrorMessage() {
+    	return errorMessage;
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposal.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposal.java
new file mode 100644
index 0000000..787f17d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposal.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.jface.fieldassist;
+
+import org.eclipse.core.runtime.Assert;
+
+/**
+ * A default implementation of {@link IContentProposal} that allows clients to
+ * specify a content proposal using simple constructors.
+ * 
+ * @since 3.6
+ * 
+ */
+public class ContentProposal implements IContentProposal {
+	private static final String EMPTY = ""; //$NON-NLS-1$
+
+	private String content = EMPTY;
+	private String label = EMPTY;
+	private String description = EMPTY;
+	private int cursorPosition = 0;
+
+	/**
+	 * Create a content proposal whose label and content are the specified
+	 * String. The cursor position will be located at the end of the content.
+	 * 
+	 * @param content
+	 *            the String representing the content. Should not be
+	 *            <code>null</code>.
+	 */
+	public ContentProposal(String content) {
+		this(content, content, null);
+	}
+
+	/**
+	 * Create a content proposal whose content and description are as specified
+	 * in the parameters. The cursor position will be located at the end of the
+	 * content.
+	 * 
+	 * @param content
+	 *            the String representing the content. Should not be
+	 *            <code>null</code>. This string will also be used as the label.
+	 * @param description
+	 *            the String representing the description, or <code>null</code>
+	 *            if there should be no description.
+	 */
+	public ContentProposal(String content, String description) {
+		this(content, content, description);
+	}
+
+	/**
+	 * Create a content proposal whose content, label, and description are as
+	 * specified in the parameters. The cursor position will be located at the
+	 * end of the content.
+	 * 
+	 * @param content
+	 *            the String representing the content. Should not be
+	 *            <code>null</code>.
+	 * @param label
+	 *            the String representing the label. Should not be
+	 *            <code>null</code>.
+	 * 
+	 * @param description
+	 *            the String representing the description, or <code>null</code>
+	 *            if there should be no description.
+	 */
+	public ContentProposal(String content, String label, String description) {
+		this(content, label, description, content.length());
+	}
+
+	/**
+	 * Create a content proposal whose content, label, description, and cursor
+	 * position are as specified in the parameters.
+	 * 
+	 * @param content
+	 *            the String representing the content. Should not be
+	 *            <code>null</code>.
+	 * @param label
+	 *            the String representing the label. Should not be
+	 *            <code>null</code>.
+	 * 
+	 * @param description
+	 *            the String representing the description, or <code>null</code>
+	 *            if there should be no description.
+	 * 
+	 * @param cursorPosition
+	 *            the zero-based index position within the contents where the
+	 *            cursor should be placed after the proposal is accepted. The
+	 *            range of the cursor position is from 0..N where N is the
+	 *            number of characters in the content.
+	 * 
+	 * @exception IllegalArgumentException
+	 *                if the index is not between 0 and the number of characters
+	 *                in the content.
+	 */
+	public ContentProposal(String content, String label, String description,
+			int cursorPosition) {
+		Assert.isNotNull(content);
+		Assert.isNotNull(label);
+		Assert.isLegal(cursorPosition >= 0
+				&& cursorPosition <= content.length());
+		this.content = content;
+		this.label = label;
+		this.description = description;
+		this.cursorPosition = cursorPosition;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.fieldassist.IContentProposal#getContent()
+	 */
+	public String getContent() {
+		return content;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.fieldassist.IContentProposal#getCursorPosition()
+	 */
+	public int getCursorPosition() {
+		return cursorPosition;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.fieldassist.IContentProposal#getDescription()
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.fieldassist.IContentProposal#getLabel()
+	 */
+	public String getLabel() {
+		return label;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
index 389a64c..13ec8e0 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ContentProposalAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Hannes Erven <hannes at erven.at> - Bug 293841 - [FieldAssist] NumLock keyDown event should not close the proposal popup [with patch]
  *******************************************************************************/
 package org.eclipse.jface.fieldassist;
 
@@ -56,7 +57,8 @@ import org.eclipse.jface.viewers.ILabelProvider;
  * is activated, and whether any filtering should be done on the proposals as
  * the user types characters.
  * <p>
- * This class is not intended to be subclassed.
+ * This class provides some overridable methods to allow clients to manually
+ * control the popup. However, most of the implementation remains private.
  * 
  * @since 3.2
  */
@@ -318,7 +320,8 @@ public class ContentProposalAdapter {
 					// Modifier keys are explicitly checked and ignored because
 					// they are not complete yet (no character).
 					default:
-						if (e.keyCode != SWT.CAPS_LOCK && e.keyCode != SWT.MOD1
+						if (e.keyCode != SWT.CAPS_LOCK && e.keyCode != SWT.NUM_LOCK 
+								&& e.keyCode != SWT.MOD1
 								&& e.keyCode != SWT.MOD2
 								&& e.keyCode != SWT.MOD3
 								&& e.keyCode != SWT.MOD4) {
@@ -676,8 +679,7 @@ public class ContentProposalAdapter {
 		 */
 		protected void adjustBounds() {
 			// Get our control's location in display coordinates.
-			Point location = control.getDisplay().map(control.getParent(),
-					null, control.getLocation());
+			Point location = control.getDisplay().map(control.getParent(), null, control.getLocation());			
 			int initialX = location.x + POPUP_OFFSET;
 			int initialY = location.y + control.getSize().y + POPUP_OFFSET;
 			// If we are inserting content, use the cursor position to
@@ -702,7 +704,16 @@ public class ContentProposalAdapter {
 				getShell().pack();
 				popupSize = getShell().getSize();
 			}
-			getShell().setBounds(initialX, initialY, popupSize.x, popupSize.y);
+			
+			// Constrain to the display
+			Rectangle constrainedBounds = getConstrainedShellBounds(new Rectangle(initialX, initialY, popupSize.x, popupSize.y));
+			
+			// If there has been an adjustment causing the popup to overlap 
+			// with the control, then put the popup above the control.
+			if (constrainedBounds.y < initialY)
+				getShell().setBounds(initialX, location.y - popupSize.y, popupSize.x, popupSize.y);
+			else
+				getShell().setBounds(initialX, initialY, popupSize.x, popupSize.y);
 
 			// Now set up a listener to monitor any changes in size.
 			getShell().addListener(SWT.Resize, new Listener() {
@@ -986,6 +997,8 @@ public class ContentProposalAdapter {
 		 */
 		private void recomputeProposals(String filterText) {
 			IContentProposal[] allProposals = getProposals();
+			if (allProposals == null)
+				 allProposals = getEmptyProposalArray();
 			// If the non-filtered proposal list is empty, we should
 			// close the popup.
 			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=147377
@@ -2166,4 +2179,31 @@ public class ContentProposalAdapter {
 		return (autoActivateString != null && autoActivateString.length() > 0) // there are specific autoactivation chars supplied
 		  || (autoActivateString == null && triggerKeyStroke == null);    // we autoactivate on everything
 	}
+	
+	/**
+	 * Sets focus to the proposal popup. If the proposal popup is not opened,
+	 * this method is ignored. If the secondary popup has focus, focus is
+	 * returned to the main proposal popup.
+	 * 
+	 * @since 3.6
+	 */
+	public void setProposalPopupFocus() {
+		if (isValid() && popup != null)
+			popup.getShell().setFocus();
+	}
+	
+	/**
+	 * Answers a boolean indicating whether the main proposal popup is open.
+	 * 
+	 * @return <code>true</code> if the proposal popup is open, and
+	 *         <code>false</code> if it is not.
+	 * 
+	 * @since 3.6
+	 */
+	public boolean isProposalPopupOpen() {
+		if (isValid() && popup != null)
+			return true;
+		return false;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
index dd3e1c5..062499b 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
@@ -71,6 +71,8 @@ import org.eclipse.swt.widgets.Widget;
  * 
  * @see FieldDecoration
  * @see FieldDecorationRegistry
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
  */
 public class ControlDecoration {
 	/**
@@ -1051,9 +1053,17 @@ public class ControlDecoration {
 
 	/*
 	 * Show the specified text in the hover, positioning the hover near the
-	 * specified control.
+	 * specified control. The hover will only be shown if the control is
+	 * visible.
+	 * 
+	 * The caller has already established that the control is not null.
 	 */
 	private void showHoverText(String text, Control hoverNear) {
+		// We do not show the hover if the control is disposed or
+		// invisible.
+		if (control.isDisposed() || !control.isVisible())
+			return;
+
 		// If we aren't to show a hover, don't do anything.
 		if (!showHover) {
 			return;
@@ -1063,25 +1073,21 @@ public class ControlDecoration {
 		if (!visible) {
 			return;
 		}
-		// If there is no text, don't do anything.
-		if (text == null) {
+		// If there is no text, any existing hover should be hidden, and
+		// there is nothing more to do.
+		if (text == null || text.length() == 0) {
 			hideHover();
 			return;
 		}
-
-		// If there is no control, nothing to do
-		if (control == null) {
-			return;
-		}
-		// Create the hover if it's not showing
+		
+		// Now we can hover!
+		// Create the hover if it's not already showing
 		if (hover == null) {
 			hover = new Hover(hoverNear.getShell());
 		}
 		hover.setText(text, getDecorationRectangle(control.getParent()),
 				control);
-		if (control.isVisible()) {
-			  hover.setVisible(true);
-		}
+		hover.setVisible(true);
 	}
 
 	/*
@@ -1226,4 +1232,30 @@ public class ControlDecoration {
 					.println("Removed listener>>>" + listenerType + " from>>>" + widget); //$NON-NLS-1$//$NON-NLS-2$
 		}
 	}
+	
+
+	/**
+	 * Return a boolean indicating whether the decoration is visible. This
+	 * method considers the visibility state of the decoration (
+	 * {@link #hide()} and {@link #show()}), the visibility state of the 
+	 * associated control ({@link Control#isVisible()}), and the focus state 
+	 * of the control if applicable ({@link #setShowOnlyOnFocus(boolean)}. 
+	 * When this method returns <code>true</code>, it means that the decoration 
+	 * should be visible. However, this method does not consider the case where 
+	 * the decoration should be visible, but is obscured by another window or
+	 * control, or positioned off the screen. In these cases, the decoration
+	 * will still be considered visible.
+	 * 
+	 * @return <code>true</code> if the decoration is visible, and
+	 *         <code>false</code> if it is not.
+	 * 
+	 * @see #setShowOnlyOnFocus(boolean)
+	 * @see #hide()
+	 * @see #show()
+     *
+	 * @since 3.6
+	 */
+	public boolean isVisible() {
+		return shouldShowDecoration();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposal.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposal.java
index 538e7f6..76980eb 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposal.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,13 +10,18 @@
  *******************************************************************************/
 package org.eclipse.jface.fieldassist;
 
+
 /**
  * IContentProposal describes a content proposal to be shown. It consists of the
  * content that will be provided if the proposal is accepted, an optional label
  * used to describe the content to the user, and an optional description that
- * further elaborates the meaning of the proposal.
+ * further elaborates the meaning of the proposal. It also includes a a
+ * zero-based index position within the contents where the cursor should be
+ * placed after a proposal is accepted.
  * 
  * @since 3.2
+ * 
+ * @see ContentProposal
  */
 public interface IContentProposal {
 	/**
@@ -31,7 +36,9 @@ public interface IContentProposal {
 	 * placed after the proposal is accepted.
 	 * 
 	 * @return the zero-based index position within the contents where the
-	 *         cursor should be placed after the proposal is accepted.
+	 *         cursor should be placed after the proposal is accepted. The range
+	 *         of the cursor position is from 0..N where N is the number of
+	 *         characters in the contents.
 	 */
 	public int getCursorPosition();
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposalProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposalProvider.java
index 55983e0..0582db4 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposalProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/IContentProposalProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,11 +16,13 @@ package org.eclipse.jface.fieldassist;
  * the current cursor position. 
  * 
  * @since 3.2
+ * 
+ * @see SimpleContentProposalProvider
  */
 public interface IContentProposalProvider {
 
 	/**
-	 * Return an array of Objects representing the valid content proposals for a
+	 * Return an array of content proposals representing the valid proposals for a
 	 * field.
 	 * 
 	 * @param contents
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/SimpleContentProposalProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/SimpleContentProposalProvider.java
index 89819ad..075d5e5 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/SimpleContentProposalProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/fieldassist/SimpleContentProposalProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,7 +71,7 @@ public class SimpleContentProposalProvider implements IContentProposalProvider {
 				if (proposals[i].length() >= contents.length()
 						&& proposals[i].substring(0, contents.length())
 								.equalsIgnoreCase(contents)) {
-					list.add(makeContentProposal(proposals[i]));
+					list.add(new ContentProposal(proposals[i]));
 				}
 			}
 			return (IContentProposal[]) list.toArray(new IContentProposal[list
@@ -80,7 +80,7 @@ public class SimpleContentProposalProvider implements IContentProposalProvider {
 		if (contentProposals == null) {
 			contentProposals = new IContentProposal[proposals.length];
 			for (int i = 0; i < proposals.length; i++) {
-				contentProposals[i] = makeContentProposal(proposals[i]);
+				contentProposals[i] = new ContentProposal(proposals[i]);
 			}
 		}
 		return contentProposals;
@@ -113,27 +113,4 @@ public class SimpleContentProposalProvider implements IContentProposalProvider {
 		// Clear any cached proposals.
 		contentProposals = null;
 	}
-
-	/*
-	 * Make an IContentProposal for showing the specified String.
-	 */
-	private IContentProposal makeContentProposal(final String proposal) {
-		return new IContentProposal() {
-			public String getContent() {
-				return proposal;
-			}
-
-			public String getDescription() {
-				return null;
-			}
-
-			public String getLabel() {
-				return null;
-			}
-
-			public int getCursorPosition() {
-				return proposal.length();
-			}
-		};
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/messages.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/messages.properties
index bcca2c8..0b4f364 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/messages.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -65,6 +65,11 @@ ProgressMonitorDialog.title=Progress Information
 ProgressMonitorDialog.message=Operation in progress...
 
 ##############################################################
+# The Progress Monitor Part
+##############################################################
+ProgressMonitorPart.cancelToolTip=Cancel Operation
+
+##############################################################
 # Preference Dialog
 ##############################################################
 PreferenceDialog.title=Preferences
@@ -172,6 +177,14 @@ F9 = F9
 F10 = F10
 F11 = F11
 F12 = F12
+F13 = F13
+F14 = F14
+F15 = F15
+F16 = F16
+F17 = F17
+F18 = F18
+F19 = F19
+F20 = F20
 
 ##############################################
 # Safe Runnable
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/DirectoryFieldEditor.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/DirectoryFieldEditor.java
index ff489f2..e965da5 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/DirectoryFieldEditor.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/DirectoryFieldEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Baltasar Belyavsky - fix for 300539 - Add ability to specify filter-path     
  *******************************************************************************/
 package org.eclipse.jface.preference;
 
@@ -23,6 +24,11 @@ import org.eclipse.swt.widgets.DirectoryDialog;
  */
 public class DirectoryFieldEditor extends StringButtonFieldEditor {
     /**
+     * Initial path for the Browse dialog.
+     */
+    private File filterPath = null;
+
+    /**
      * Creates a new directory field editor 
      */
     protected DirectoryFieldEditor() {
@@ -87,6 +93,9 @@ public class DirectoryFieldEditor extends StringButtonFieldEditor {
         if (startingDirectory != null) {
 			fileDialog.setFilterPath(startingDirectory.getPath());
 		}
+        else if (filterPath != null) {
+        	fileDialog.setFilterPath(filterPath.getPath());
+        }
         String dir = fileDialog.open();
         if (dir != null) {
             dir = dir.trim();
@@ -97,4 +106,14 @@ public class DirectoryFieldEditor extends StringButtonFieldEditor {
 
         return null;
     }
+
+    /**
+     * Sets the initial path for the Browse dialog.
+     * @param path initial path for the Browse dialog
+     * @since 3.6
+     */
+    public void setFilterPath(File path) {
+    	filterPath = path;
+    }
+    
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/FileFieldEditor.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/FileFieldEditor.java
index 8394cca..77bed24 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/FileFieldEditor.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/FileFieldEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Baltasar Belyavsky - fix for 300539 - Add ability to specify filter-path     
  *******************************************************************************/
 package org.eclipse.jface.preference;
 
@@ -30,6 +31,11 @@ public class FileFieldEditor extends StringButtonFieldEditor {
     private String[] extensions = null;
 
     /**
+     * Initial path for the Browse dialog.
+     */
+    private File filterPath = null;
+
+    /**
      * Indicates whether the path must be absolute;
      * <code>false</code> by default.
      */
@@ -142,9 +148,15 @@ public class FileFieldEditor extends StringButtonFieldEditor {
             return false;
         }
 
-        // OK!
-        clearErrorMessage();
-        return true;
+        if(doCheckState()) { // OK!
+	        clearErrorMessage();
+	        return true;
+        }
+        msg = getErrorMessage(); // subclass might have changed it in the #doCheckState()
+        if (msg != null) {
+            showErrorMessage(msg);
+        }
+    	return false;
     }
 
     /**
@@ -159,6 +171,9 @@ public class FileFieldEditor extends StringButtonFieldEditor {
         if (startingDirectory != null) {
 			dialog.setFileName(startingDirectory.getPath());
 		}
+        else if (filterPath != null) {
+        	dialog.setFilterPath(filterPath.getPath());
+        }
         if (extensions != null) {
 			dialog.setFilterExtensions(extensions);
 		}
@@ -182,4 +197,14 @@ public class FileFieldEditor extends StringButtonFieldEditor {
     public void setFileExtensions(String[] extensions) {
         this.extensions = extensions;
     }
+
+    /**
+     * Sets the initial path for the Browse dialog.
+     * @param path initial path for the Browse dialog
+     * @since 3.6
+     */
+    public void setFilterPath(File path) {
+    	filterPath = path;
+    }
+
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.java
index 29259ba..b7a140f 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Pawel Pogorzelski - <Pawel.Pogorzelski at pl.ibm.com> - fix for bug 289599  
  *******************************************************************************/
 package org.eclipse.jface.preference;
 
@@ -552,6 +553,8 @@ public class PreferenceStore extends EventManager implements
 	 * (non-Javadoc) Method declared on IPreferenceStore.
 	 */
 	public void setToDefault(String name) {
+		if (!properties.containsKey(name))
+			return;
 		Object oldValue = properties.get(name);
 		properties.remove(name);
 		dirty = true;
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java
index affa08e..f097cba 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/URLImageDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,7 +56,7 @@ class URLImageDescriptor extends ImageDescriptor {
 		if (!(o instanceof URLImageDescriptor)) {
 			return false;
 		}
-		return ((URLImageDescriptor) o).url.equals(this.url);
+		return ((URLImageDescriptor) o).url.toExternalForm().equals(this.url.toExternalForm());
 	}
 
 	/*
@@ -105,7 +105,7 @@ class URLImageDescriptor extends ImageDescriptor {
 	 * (non-Javadoc) Method declared on Object.
 	 */
 	public int hashCode() {
-		return url.hashCode();
+		return url.toExternalForm().hashCode();
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts.properties
index 129ec90..0f876f8 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,10 +8,11 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# Generic NLS font file for JFace
+# Generic font file for JFace
 # *.0 is Windows font
 # *.1 is Unix font
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=MS Sans Serif-bold-10
 org.eclipse.jface.bannerfont.1=b&h-lucidabright-regular-10
 
@@ -21,3 +22,4 @@ org.eclipse.jface.headerfont.1=b&h-lucidabright-regular-12
 org.eclipse.jface.textfont.0=Courier New-regular-10
 org.eclipse.jface.textfont.1=Courier-regular-10
 org.eclipse.jface.textfont.2=b&h-lucidabright-regular-9
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_aix.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_aix.properties
index 9254f94..7909770 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_aix.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_aix.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
 ###############################################################################
 # Aix font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=adobe-courier-bold-14
 org.eclipse.jface.headerfont.0=misc-fixed-bold-14
 org.eclipse.jface.textfont.0=adobe-courier-regular-12
+# END NON-TRANSLATABLE
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_hp-ux.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_hp-ux.properties
index 6883353..5dcaa80 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_hp-ux.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_hp-ux.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
 ###############################################################################
 # HP UX font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=adobe-courier-bold-14
 org.eclipse.jface.headerfont.0=adobe-courier-regular-14
 org.eclipse.jface.textfont.0=adobe-courier-regular-14
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux.properties
index 39b6899..93bd854 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
 ###############################################################################
 # Linux font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=adobe-courier-bold-14
 org.eclipse.jface.headerfont.0=misc-fixed-bold-14
 org.eclipse.jface.textfont.0=adobe-courier-regular-12
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux_gtk.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux_gtk.properties
index b743b2e..3486ff4 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux_gtk.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_linux_gtk.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
 ###############################################################################
 # Linux GTK font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=Sans-bold-10
 org.eclipse.jface.headerfont.0=Sans-bold-12
 org.eclipse.jface.textfont.0=Monospace-regular-10
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_macosx.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_macosx.properties
index 6197fa4..300e9bd 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_macosx.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_macosx.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,9 +10,11 @@
 ###############################################################################
 # Carbon font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=Lucida Grande-bold-12
 org.eclipse.jface.headerfont.0=Lucida Grande-bold-14
 
 org.eclipse.jface.textfont.0=Monaco-regular-11
 org.eclipse.jface.textfont.1=Courier-regular-12
 org.eclipse.jface.textfont.2=Courier New-regular-12
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_qnx.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_qnx.properties
index b1c216d..0ceb5ca 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_qnx.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_qnx.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,9 +10,10 @@
 ###############################################################################
 # QNX font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=TextFont-bold-9
 org.eclipse.jface.headerfont.0=TextFont-bold-9
 org.eclipse.jface.textfont.0=TextFont-regular-9
-
+# END NON-TRANSLATABLE
 
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_sunos.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_sunos.properties
index a10c0be..bd38c0c 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_sunos.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_sunos.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
 ###############################################################################
 # Solaris font file for JFace
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=adobe-courier-bold-14
 org.eclipse.jface.headerfont.0=misc-fixed-bold-14
 org.eclipse.jface.textfont.0=adobe-courier-regular-12
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows2000.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows2000.properties
index c152f1c..f8f8050 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows2000.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows2000.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,8 +8,9 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# NLS font file for JFace when running under Windows 2000
+# Font file for JFace when running under Windows 2000
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=Tahoma-bold-10
 
 org.eclipse.jface.headerfont.0=Tahoma-bold-12
@@ -17,3 +18,4 @@ org.eclipse.jface.headerfont.0=Tahoma-bold-12
 org.eclipse.jface.textfont.0=Courier New-regular-10
 org.eclipse.jface.textfont.1=Courier-regular-10
 org.eclipse.jface.textfont.2=Lucida Console-regular-9
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows98.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows98.properties
index 5a23376..3f82586 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows98.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windows98.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,8 +8,9 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# NLS font file for JFace when running under Windows 98
+# Font file for JFace when running under Windows 98
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=MS Sans Serif-bold-10
 
 org.eclipse.jface.headerfont.0=MS Sans Serif-bold-12
@@ -17,3 +18,4 @@ org.eclipse.jface.headerfont.0=MS Sans Serif-bold-12
 org.eclipse.jface.textfont.0=Courier New-regular-10
 org.eclipse.jface.textfont.1=Courier-regular-10
 org.eclipse.jface.textfont.2=Lucida Console-regular-9
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsnt.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsnt.properties
index 41740b0..29eeb02 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsnt.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsnt.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,8 +8,9 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# NLS font file for JFace when running under Windows NT
+# Font file for JFace when running under Windows NT
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=MS Sans Serif-bold-10
 
 org.eclipse.jface.headerfont.0=MS Sans Serif-bold-12
@@ -17,3 +18,4 @@ org.eclipse.jface.headerfont.0=MS Sans Serif-bold-12
 org.eclipse.jface.textfont.0=Courier New-regular-10
 org.eclipse.jface.textfont.1=Courier-regular-10
 org.eclipse.jface.textfont.2=Lucida Console-regular-9
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsxp.properties b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsxp.properties
index 6888654..958e6d8 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsxp.properties
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/resource/jfacefonts_windowsxp.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,8 +8,9 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# NLS font file for JFace when running under Windows XP
+# Font file for JFace when running under Windows XP
 #############################################################
+# START NON-TRANSLATABLE
 org.eclipse.jface.bannerfont.0=Tahoma-bold-10
 
 org.eclipse.jface.headerfont.0=Tahoma-bold-12
@@ -17,3 +18,4 @@ org.eclipse.jface.headerfont.0=Tahoma-bold-12
 org.eclipse.jface.textfont.0=Courier New-regular-10
 org.eclipse.jface.textfont.1=Courier-regular-10
 org.eclipse.jface.textfont.2=Lucida Console-regular-9
+# END NON-TRANSLATABLE
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/util/Util.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/util/Util.java
index b9e7d8f..08dcf5b 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/util/Util.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -458,16 +458,20 @@ public final class Util {
 
 		return defaultString;
 	}
-	
-	/**
-	 * Foundation replacement for String.replaceAll(*).
-	 * 
-	 * @param src the starting string.
-	 * @param find the string to find.
-	 * @param replacement the string to replace.
-	 * @return The new string.
-	 * @since 3.4
-	 */
+
+    /**
+     * Foundation replacement for <code>String#replaceAll(String,
+     * String)</code>, but <strong>without support for regular
+     * expressions</strong>.
+     * 
+     * @param src the original string
+     * @param find the string to find
+     * @param replacement the replacement string
+     * @return the new string, with all occurrences of <code>find</code>
+     *         replaced by <code>replacement</code> (not using regular
+     *         expressions)
+     * @since 3.4
+     */
 	public static final String replaceAll(String src, String find, String replacement) {
 		final int len = src.length();
 		final int findLen = find.length();
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
index b0d51e6..2f29802 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -197,10 +197,9 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 	 * parent element.
 	 * <p>
 	 * EXPERIMENTAL. Not to be used except by JDT. This method was added to
-	 * support JDT's explorations into grouping by working sets, which requires
-	 * viewers to support multiple equal elements. See bug 76482 for more
-	 * details. This support will likely be removed in Eclipse 3.2 in favor of
-	 * proper support for multiple equal elements.
+	 * support JDT's explorations into grouping by working sets. This method
+	 * cannot be removed without breaking binary backwards compatibility, but
+	 * should not be called by clients.
 	 * </p>
 	 *
 	 * @param widget
@@ -627,21 +626,6 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 		return result;
 	}
 
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.jface.viewers.StructuredViewer#getFilteredChildren(java.lang.Object)
-	 */
-	protected Object[] getFilteredChildren(Object parentElementOrTreePath) {
-		Object[] result = getRawChildren(parentElementOrTreePath);
-		ViewerFilter[] filters = getFilters();
-		for (int i = 0; i < filters.length; i++) {
-			ViewerFilter filter = filters[i];
-			result = filter.filter(this, parentElementOrTreePath, result);
-		}
-		return result;
-	}
-
 	/**
 	 * Adds the given child element to this viewer as a child of the given
 	 * parent element. If this viewer does not have a sorter, the element is
@@ -762,6 +746,24 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 	 *            the widget
 	 */
 	protected void createChildren(final Widget widget) {
+		createChildren(widget, true);
+	}
+	
+	/**
+	 * Creates all children for the given widget.
+	 * <p>
+	 * The default implementation of this framework method assumes that
+	 * <code>widget.getData()</code> returns the element corresponding to the
+	 * node. Note: the node is not visually expanded! You may have to call
+	 * <code>parent.setExpanded(true)</code>.
+	 * </p>
+	 *
+	 * @param widget
+	 *            the widget
+	 * @param materialize 
+	 * 			  true if children are expected to be fully materialized
+	 */
+	void createChildren(final Widget widget, boolean materialize) {
 		boolean oldBusy = isBusy();
 		setBusy(true);
 		try {
@@ -1545,10 +1547,13 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 		Item[] items = getChildren(widget);
 		for (int i = 0; i < items.length; i++) {
 			Item item = items[i];
-			if (getExpanded(item)) {
-				result.add(item);
+			// Disregard dummy nodes (see bug 287765)
+			if (item.getData() != null) {
+				if (getExpanded(item)) {
+					result.add(item);
+				}
+				internalCollectExpandedItems(result, item);
 			}
-			internalCollectExpandedItems(result, item);
 		}
 	}
 
@@ -1706,7 +1711,7 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 					&& !isExpandable((Item) widget, null, widget.getData())) {
 				return;
 			}
-			createChildren(widget);
+			createChildren(widget, false);
 			if (widget instanceof Item) {
 				setExpanded((Item) widget, true);
 			}
@@ -1800,10 +1805,9 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 	 * Refreshes the tree starting at the given widget.
 	 * <p>
 	 * EXPERIMENTAL. Not to be used except by JDT. This method was added to
-	 * support JDT's explorations into grouping by working sets, which requires
-	 * viewers to support multiple equal elements. See bug 76482 for more
-	 * details. This support will likely be removed in Eclipse 3.2 in favor of
-	 * proper support for multiple equal elements.
+	 * support JDT's explorations into grouping by working sets. This method
+	 * cannot be removed without breaking binary backwards compatibility, but
+	 * should not be called by clients.
 	 * </p>
 	 *
 	 * @param widget
@@ -1877,10 +1881,9 @@ public abstract class AbstractTreeViewer extends ColumnViewer {
 	 * Removes the given elements from this viewer.
 	 * <p>
 	 * EXPERIMENTAL. Not to be used except by JDT. This method was added to
-	 * support JDT's explorations into grouping by working sets, which requires
-	 * viewers to support multiple equal elements. See bug 76482 for more
-	 * details. This support will likely be removed in Eclipse 3.2 in favor of
-	 * proper support for multiple equal elements.
+	 * support JDT's explorations into grouping by working sets. This method
+	 * cannot be removed without breaking binary backwards compatibility, but
+	 * should not be called by clients.
 	 * </p>
 	 *
 	 * @param elementsOrPaths
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreeContentProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreeContentProvider.java
index fdfc1e6..21cb79b 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreeContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreeContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     John Cortell, Freescale - bug 289409
  *******************************************************************************/
 package org.eclipse.jface.viewers;
 
@@ -26,8 +27,12 @@ public interface ILazyTreeContentProvider extends IContentProvider {
 	 * should also update the child count for any replaced element by calling
 	 * {@link TreeViewer#setChildCount(Object, int)}. If the given current child
 	 * count is already correct, setChildCount does not have to be called since
-	 * a call to replace will not change the child count.
+	 * a call to replace will not change the child count. If the content
+	 * provider doesn't know the child count at this point, and can more
+	 * efficiently determine if the element has <i>any</i> children, then it can
+	 * instead call {@link TreeViewer#setHasChildren(Object, boolean)}.
 	 * 
+	 * <p>
 	 * <strong>NOTE</strong> #updateElement(int index) can be used to determine
 	 * selection values. If TableViewer#replace(Object, int) is not called
 	 * before returning from this method, selections may have missing or stale
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreePathContentProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreePathContentProvider.java
index 32b87e5..20965a7 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreePathContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ILazyTreePathContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     John Cortell, Freescale - bug 289409
  *******************************************************************************/
 package org.eclipse.jface.viewers;
 
@@ -26,7 +27,11 @@ public interface ILazyTreePathContentProvider extends IContentProvider {
 	 * should also update the child count for any replaced element by calling
 	 * {@link TreeViewer#setChildCount(Object, int)}. If the given current child
 	 * count is already correct, setChildCount does not have to be called since
-	 * a call to replace will not change the child count.
+	 * a call to replace will not change the child count. If the content
+	 * provider doesn't know the child count at this point, and can more
+	 * efficiently determine if the element has <i>any</i> children, then it can
+	 * instead call {@link TreeViewer#setHasChildren(Object, boolean)}.
+	 * <p>
 	 * 
 	 * <strong>NOTE</strong> #updateElement(int index) can be used to determine
 	 * selection values. If TableViewer#replace(Object, int) is not called
@@ -35,8 +40,8 @@ public interface ILazyTreePathContentProvider extends IContentProvider {
 	 * for again after replace() has been called.
 	 * 
 	 * @param parentPath
-	 *            The tree path of parent of the element, or if the
-	 *            element to update is a root element, an empty tree path
+	 *            The tree path of parent of the element, or if the element to
+	 *            update is a root element, an empty tree path
 	 * @param index
 	 *            The index of the element to update in the tree
 	 */
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredContentProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredContentProvider.java
index c994e9b..61648aa 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,12 +21,7 @@ public interface IStructuredContentProvider extends IContentProvider {
      * when its input is set to the given element. 
      * These elements can be presented as rows in a table, items in a list, etc.
      * The result is not modified by the viewer.
-     * <p>
-     * <b>NOTE:</b> For instances where the viewer is displaying a tree
-     * containing a single 'root' element it is still necessary that the
-     * 'input' does not return <i>itself</i> from this method. This leads
-     * to recursion issues (see bug 9262).
-     * </p>
+     * 
      * @param inputElement the input element
      * @return the array of elements to display in the viewer
      */
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreeContentProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreeContentProvider.java
index 7b1c0fd..ae66fe5 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreeContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreeContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,18 @@ package org.eclipse.jface.viewers;
  * @see AbstractTreeViewer
  */
 public interface ITreeContentProvider extends IStructuredContentProvider {
+
+	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * <b>NOTE:</b> The returned array must not contain the given
+	 * <code>inputElement</code>, since this leads to recursion issues in
+	 * {@link AbstractTreeViewer} (see
+	 * <a href="https://bugs.eclipse.org/9262">bug 9262</a>).
+	 * </p>
+	 */
+	public Object[] getElements(Object inputElement);
+
     /**
      * Returns the child elements of the given parent element.
      * <p>
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreePathContentProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreePathContentProvider.java
index ce87dab..6d13f97 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreePathContentProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ITreePathContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,7 @@ package org.eclipse.jface.viewers;
 
 /**
  * An interface to content providers for tree-structure-oriented viewers that
- * provides content based on the path of elements in the tree viewer..
+ * provides content based on the path of elements in the tree viewer.
  * 
  * @see AbstractTreeViewer
  * @since 3.2
@@ -21,6 +21,17 @@ package org.eclipse.jface.viewers;
 public interface ITreePathContentProvider extends IStructuredContentProvider {
 
 	/**
+	 * {@inheritDoc}
+	 * <p>
+	 * <b>NOTE:</b> The returned array must not contain the given
+	 * <code>inputElement</code>, since this leads to recursion issues in
+	 * {@link AbstractTreeViewer} (see
+	 * <a href="https://bugs.eclipse.org/9262">bug 9262</a>).
+	 * </p>
+	 */
+	public Object[] getElements(Object inputElement);
+
+	/**
 	 * Returns the child elements of the last element in the given path.
 	 * Implementors may want to use the additional context of the complete path
 	 * of a parent element in order to decide which children to return.
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
index 0a3c18b..d6c638a 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/SWTFocusCellManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -180,20 +180,19 @@ abstract class SWTFocusCellManager {
 						if (row == null)
 							return;
 						
-						Object element = row.getItem().getData();
 						ViewerColumn viewPart = viewer.getViewerColumn(cell
 								.getColumnIndex());
 						
 						if (viewPart == null)
 							return;
 						
-						ColumnLabelProvider labelProvider = (ColumnLabelProvider) viewPart
+						CellLabelProvider labelProvider = viewPart
 								.getLabelProvider();
 						
 						if (labelProvider == null)
 							return;
-						
-						event.result = labelProvider.getText(element);
+						labelProvider.update(cell);
+						event.result = cell.getText();
 					}
 				});
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
index 967ddbe..4dbd861 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,8 +16,8 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.jface.util.IOpenEventListener;
 import org.eclipse.jface.util.OpenStrategy;
 import org.eclipse.jface.util.SafeRunnable;
@@ -730,6 +730,9 @@ public abstract class StructuredViewer extends ContentViewer implements IPostSel
 				}
 				if (add) {
 					filtered.add(elements[i]);
+				} else {
+					if (associateListener != null)
+						associateListener.filteredOut(elements[i]);
 				}
 			}
 			return filtered.toArray();
@@ -773,7 +776,7 @@ public abstract class StructuredViewer extends ContentViewer implements IPostSel
 	 * done by calling <code>doFindInputItem</code>. If it is not found
 	 * there, the widgets are looked up in the internal element map provided
 	 * that this feature has been enabled. If the element map is disabled, the
-	 * widget is found via <code>doFindInputItem</code>.
+	 * widget is found via <code>doFindItem</code>.
 	 * </p>
 	 * 
 	 * @param element
@@ -894,13 +897,40 @@ public abstract class StructuredViewer extends ContentViewer implements IPostSel
 		if (filters != null) {
 			for (Iterator iter = filters.iterator(); iter.hasNext();) {
 				ViewerFilter f = (ViewerFilter) iter.next();
-				result = f.filter(this, parent, result);
+				Object[] filteredResult = f.filter(this, parent, result);
+				if (associateListener != null && filteredResult.length != result.length) {
+					notifyFilteredOut(result, filteredResult);
+				}
+				result = filteredResult;
 			}
 		}
 		return result;
 	}
 
 	/**
+	 * Notifies an AssociateListener of the elements that have been filtered out.
+	 * 
+	 * @param rawResult 
+	 * @param filteredResult  
+	 */
+	private void notifyFilteredOut(Object[] rawResult, Object[] filteredResult) {
+		int rawIndex = 0;
+		int filteredIndex = 0;
+		for (; filteredIndex < filteredResult.length; ) {
+			if (rawResult[rawIndex] != filteredResult[filteredIndex]) {
+				associateListener.filteredOut(rawResult[rawIndex++]);
+				continue;
+			}
+			rawIndex++;
+			filteredIndex++;
+		}
+		for (; rawIndex < rawResult.length; rawIndex++) {
+			associateListener.filteredOut(rawResult[rawIndex]);
+		}
+	}
+	
+	
+	/**
 	 * Returns this viewer's filters.
 	 * 
 	 * @return an array of viewer filters
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java
index 465bc17..2a1b78d 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StructuredViewerInternals.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,14 @@ public class StructuredViewerInternals {
 		 * @param item
 		 */
 		void disassociate(Item item);
+		
+		/**
+		 * Called when an element has been filtered out.
+		 * 
+		 * @since 3.6
+		 * @param element 
+		 */
+		void filteredOut(Object element);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
index 3aa8e24..5547da5 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/StyledCellLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewerFocusCellManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewerFocusCellManager.java
index ec688c9..ea4c7f4 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewerFocusCellManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TableViewerFocusCellManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TextCellEditor.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TextCellEditor.java
index 152b52f..de4ae0a 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TextCellEditor.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TextCellEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tom Eicher <eclipse at tom.eicher.name> - fix minimum width
  *******************************************************************************/
 
 package org.eclipse.jface.viewers;
@@ -35,9 +36,8 @@ import org.eclipse.swt.widgets.Text;
  * A cell editor that manages a text entry field.
  * The cell editor's value is the text string itself.
  * <p>
- * This class may be instantiated; it is not intended to be subclassed.
+ * This class may be instantiated or subclassed.
  * </p>
- * @noextend This class is not intended to be subclassed by clients.
  */
 public class TextCellEditor extends CellEditor {
 
@@ -248,10 +248,6 @@ public class TextCellEditor extends CellEditor {
         Object typedValue = value;
         boolean oldValidState = isValueValid();
         boolean newValidState = isCorrect(typedValue);
-        if (typedValue == null && newValidState) {
-			Assert.isTrue(false,
-                    "Validator isn't limiting the cell editor's type range");//$NON-NLS-1$
-		}
         if (!newValidState) {
             // try to insert the current value into the error message.
             setErrorMessage(MessageFormat.format(getErrorMessage(),
@@ -265,7 +261,9 @@ public class TextCellEditor extends CellEditor {
      * set a minimumSize.
      */
     public LayoutData getLayoutData() {
-        return new LayoutData();
+        LayoutData data = new LayoutData();
+        data.minimumWidth= 0;
+        return data;
     }
 
     /**
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
index 53fbaae..af6753c 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *     Tom Schindl <tom.schindl at bestsolution.at> - concept of ViewerRow,
  *                                                 refactoring (bug 153993), bug 167323, 191468, 205419
  *     Matthew Hall - bug 221988
+ *     Pawel Piech, WindRiver - bug 296573
  *******************************************************************************/
 
 package org.eclipse.jface.viewers;
@@ -609,7 +610,7 @@ public class TreeViewer extends AbstractTreeViewer {
 		}
 	}
 
-	protected void createChildren(Widget widget) {
+	void createChildren(Widget widget, boolean materialize) {
 		if (contentProviderIsLazy) {
 			Object element = widget.getData();
 			if (element == null && widget instanceof TreeItem) {
@@ -631,12 +632,16 @@ public class TreeViewer extends AbstractTreeViewer {
 			// touch all children to make sure they are materialized
 			for (int i = 0; i < children.length; i++) {
 				if (children[i].getData() == null) {
-					virtualLazyUpdateWidget(widget, i);
+					if (materialize) {
+						virtualLazyUpdateWidget(widget, i);
+					} else {
+						((TreeItem)children[i]).clearAll(true);
+					}
 				}
 			}
 			return;
 		}
-		super.createChildren(widget);
+		super.createChildren(widget, materialize);
 	}
 
 	protected void internalAdd(Widget widget, Object parentElement,
@@ -881,11 +886,21 @@ public class TreeViewer extends AbstractTreeViewer {
 							continue;
 						if (index < parentItem.getItemCount()) {
 							TreeItem item = parentItem.getItem(index);
-							if (item.getData() != null) {
+							
+							if (item.getData() == null) {
+								// If getData()==null and index == 0, and the 
+								// parent item is collapsed, then we are
+								// being asked to remove the dummy node. We'll
+								// just ignore the request to remove the dummy
+								// node (bug 292322 and bug 296573).
+								if (index > 0 || parentItem.getExpanded()) {
+									item.dispose();
+								}
+							} else {
 								removedPath = getTreePathFromItem(item);
 								disassociate(item);
+								item.dispose();
 							}
-							item.dispose();
 						}
 					}
 				}
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewerFocusCellManager.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewerFocusCellManager.java
index 4497a89..276088a 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewerFocusCellManager.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/TreeViewerFocusCellManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerColumn.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerColumn.java
index 9b5ed12..dbe10ac 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerColumn.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,14 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Tom Shindl <tom.schindl at bestsolution.at> - initial API and implementation
+ *     Tom Schindl <tom.schindl at bestsolution.at> - initial API and implementation
  * 												  fix for bug 163317, 201905
+ *     Ralf Ebert - bug 294738
  *******************************************************************************/
 
 package org.eclipse.jface.viewers;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.util.Policy;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -142,7 +144,12 @@ public abstract class ViewerColumn {
 	 *            {@link ViewerCell}
 	 */
 	/* package */void refresh(ViewerCell cell) {
-		getLabelProvider().update(cell);
+		CellLabelProvider labelProvider = getLabelProvider();
+		if (labelProvider == null) {
+			Assert.isTrue(false, "Column " + cell.getColumnIndex() + //$NON-NLS-1$
+			" has no label provider."); //$NON-NLS-1$
+		}
+		labelProvider.update(cell);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
index 672f77d..9fc642d 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/window/ToolTip.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.jface.window;
 
 import java.util.HashMap;
 
-import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ColumnViewer;
 import org.eclipse.jface.viewers.ViewerCell;
 import org.eclipse.swt.SWT;
@@ -25,7 +24,6 @@ import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Monitor;
@@ -79,8 +77,6 @@ public abstract class ToolTip {
 
 	private Object currentArea;
 
-	private static final boolean IS_OSX = Util.isCarbon();
-
 	/**
 	 * Create new instance which add TooltipSupport to the widget
 	 * 
@@ -462,51 +458,8 @@ public abstract class ToolTip {
 	private void passOnEvent(Shell tip, Event event) {
 		if (control != null && !control.isDisposed() && event != null
 				&& event.widget != control && event.type == SWT.MouseDown) {
-			final Display display = control.getDisplay();
-			Point newPt = display.map(tip, null, new Point(event.x, event.y));
-
-			final Event newEvent = new Event();
-			newEvent.button = event.button;
-			newEvent.character = event.character;
-			newEvent.count = event.count;
-			newEvent.data = event.data;
-			newEvent.detail = event.detail;
-			newEvent.display = event.display;
-			newEvent.doit = event.doit;
-			newEvent.end = event.end;
-			newEvent.gc = event.gc;
-			newEvent.height = event.height;
-			newEvent.index = event.index;
-			newEvent.item = event.item;
-			newEvent.keyCode = event.keyCode;
-			newEvent.start = event.start;
-			newEvent.stateMask = event.stateMask;
-			newEvent.text = event.text;
-			newEvent.time = event.time;
-			newEvent.type = event.type;
-			newEvent.widget = event.widget;
-			newEvent.width = event.width;
-			newEvent.x = newPt.x;
-			newEvent.y = newPt.y;
-
+			// the following was left in order to fix bug 298770 with minimal change. In 3.7, the complete method should be removed.
 			tip.close();
-			display.asyncExec(new Runnable() {
-				public void run() {
-					if (IS_OSX) {
-						try {
-							Thread.sleep(300);
-						} catch (InterruptedException e) {
-
-						}
-
-						display.post(newEvent);
-						newEvent.type = SWT.MouseUp;
-						display.post(newEvent);
-					} else {
-						display.post(newEvent);
-					}
-				}
-			});
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
index 9347caf..c647e23 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/ProgressMonitorPart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,19 +7,20 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Eugene Ostroukhov <eugeneo at symbian.org> -  Bug 287887 [Wizards] [api] Cancel button has two distinct roles
  *******************************************************************************/
 package org.eclipse.jface.wizard;
 
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ProgressIndicator;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.core.runtime.Assert;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontMetrics;
 import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -28,6 +29,17 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.ProgressIndicator;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
 
 /**
  * A standard implementation of an IProgressMonitor. It consists
@@ -55,7 +67,7 @@ public class ProgressMonitorPart extends Composite implements
     protected Control fCancelComponent;
 
     /** true if canceled */
-    protected boolean fIsCanceled;
+    protected volatile boolean fIsCanceled;
 
     /** current blocked status */
     protected IStatus blockedStatus;
@@ -69,43 +81,81 @@ public class ProgressMonitorPart extends Composite implements
 			}
         }
     };
-
-    /**
-     * Creates a ProgressMonitorPart.
-     * @param parent The SWT parent of the part.
-     * @param layout The SWT grid bag layout used by the part. A client
-     * can supply the layout to control how the progress monitor part
-     * is layed out. If null is passed the part uses its default layout.
-     */
-    public ProgressMonitorPart(Composite parent, Layout layout) {
-        this(parent, layout, SWT.DEFAULT);
-    }
-
-    /**
-     * Creates a ProgressMonitorPart.
-     * @param parent The SWT parent of the part.
-     * @param layout The SWT grid bag layout used by the part. A client
-     * can supply the layout to control how the progress monitor part
-     * is layed out. If null is passed the part uses its default layout.
-     * @param progressIndicatorHeight The height of the progress indicator in pixel.
-     */
-    public ProgressMonitorPart(Composite parent, Layout layout,
-            int progressIndicatorHeight) {
-        super(parent, SWT.NONE);
-        initialize(layout, progressIndicatorHeight);
-    }
-
-    /**
-     * Attaches the progress monitor part to the given cancel
-     * component.
-     * @param cancelComponent the control whose selection will
-     * trigger a cancel
-     */
-    public void attachToCancelComponent(Control cancelComponent) {
-        Assert.isNotNull(cancelComponent);
-        fCancelComponent = cancelComponent;
-        fCancelComponent.addListener(SWT.Selection, fCancelListener);
-    }
+    
+    /** toolbar for managing stop button **/
+    private ToolBar fToolBar;
+
+    /** default tool item for canceling tasks **/
+	private ToolItem fStopButton;
+	
+	/** <code>true</code> if this monitor part should show stop button **/
+	private boolean fHasStopButton = false;
+
+
+	/**
+	 * Creates a <code>ProgressMonitorPart</code> that does not provide a stop button.
+	 * 
+	 * @param parent The SWT parent of the part.
+	 * @param layout The SWT grid layout used by the part. A client can supply the layout to control
+	 *            how the progress monitor part is laid out. If <code>null</code> is passed the part
+	 *            uses its default layout.
+	 */
+	public ProgressMonitorPart(Composite parent, Layout layout) {
+		this(parent, layout, false);
+	}
+
+	/**
+	 * Creates a <code>ProgressMonitorPart</code> that does not provide a stop button.
+	 * 
+	 * @param parent The SWT parent of the part.
+	 * @param layout The SWT grid layout used by the part. A client can supply the layout to control
+	 *            how the progress monitor part is laid out. If <code>null</code> is passed the part
+	 *            uses its default layout.
+	 * @param progressIndicatorHeight The height of the progress indicator in pixels. This value may
+	 *            be SWT.DEFAULT in order to get the default height as calculated by the widget and
+	 *            its layout.
+	 */
+	public ProgressMonitorPart(Composite parent, Layout layout, int progressIndicatorHeight) {
+		super(parent, SWT.NONE);
+		initialize(layout, progressIndicatorHeight);
+	}
+
+	/**
+	 * Creates a <code>ProgressMonitorPart</code>.
+	 * 
+	 * @param parent the SWT parent of the part
+	 * @param layout the SWT grid layout used by the part. A client can supply the layout to control
+	 *            how the progress monitor part is laid out. If <code>null</code> is passed the part
+	 *            uses its default layout.
+	 * @param createStopButton <code>true</code> if the progress indicator should include a stop
+	 *            button that can be used to cancel any currently running task, and
+	 *            <code>false</code> if no such stop button should be created.
+	 * 
+	 * @since 3.6
+	 */
+	public ProgressMonitorPart(Composite parent, Layout layout, boolean createStopButton) {
+		super(parent, SWT.NONE);
+		fHasStopButton= createStopButton;
+		initialize(layout, SWT.DEFAULT);
+	}
+
+	/**
+	 * Attaches the progress monitor part to the given cancel component.
+	 * 
+	 * @param cancelComponent the control whose selection will trigger a cancel. This parameter will
+	 *            be ignored and hence can be <code>null</code> if a stop button was requested upon
+	 *            construction and instead the stop button will enabled and serve as the cancel
+	 *            component.
+	 * @see #ProgressMonitorPart(Composite, Layout, boolean)
+	 */
+	public void attachToCancelComponent(Control cancelComponent) {
+		if (fHasStopButton)
+			setCancelEnabled(true);
+		else {
+			fCancelComponent = cancelComponent;
+			fCancelComponent.addListener(SWT.Selection, fCancelListener);
+		}
+	}
 
     /**
      * Implements <code>IProgressMonitor.beginTask</code>.
@@ -113,12 +163,17 @@ public class ProgressMonitorPart extends Composite implements
      */
     public void beginTask(String name, int totalWork) {
         fTaskName = name;
+        fSubTaskName = ""; //$NON-NLS-1$
         updateLabel();
         if (totalWork == IProgressMonitor.UNKNOWN || totalWork == 0) {
             fProgressIndicator.beginAnimatedTask();
         } else {
             fProgressIndicator.beginTask(totalWork);
         }
+        if (fToolBar != null && !fToolBar.isDisposed()) {
+        	fToolBar.setVisible(true);
+        	fToolBar.setFocus();
+        }
     }
 
     /**
@@ -127,8 +182,11 @@ public class ProgressMonitorPart extends Composite implements
      */
     public void done() {
         fLabel.setText("");//$NON-NLS-1$
+        fSubTaskName = ""; //$NON-NLS-1$
         fProgressIndicator.sendRemainingWork();
         fProgressIndicator.done();
+        if (fToolBar != null && !fToolBar.isDisposed())
+        	fToolBar.setVisible(false);
     }
 
     /**
@@ -167,14 +225,19 @@ public class ProgressMonitorPart extends Composite implements
             GridLayout l = new GridLayout();
             l.marginWidth = 0;
             l.marginHeight = 0;
-            l.numColumns = 1;
             layout = l;
         }
+        int numColumns = 1;
+        if (fHasStopButton)
+        	numColumns++;
         setLayout(layout);
+        
+        if (layout instanceof GridLayout)
+        	((GridLayout)layout).numColumns = numColumns;
 
         fLabel = new Label(this, SWT.LEFT);
-        fLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+        fLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, numColumns, 1));
+		
         if (progressIndicatorHeight == SWT.DEFAULT) {
             GC gc = new GC(fLabel);
             FontMetrics fm = gc.getFontMetrics();
@@ -186,9 +249,44 @@ public class ProgressMonitorPart extends Composite implements
         GridData gd = new GridData();
         gd.horizontalAlignment = GridData.FILL;
         gd.grabExcessHorizontalSpace = true;
-        gd.verticalAlignment = GridData.CENTER;
-        gd.heightHint = progressIndicatorHeight;
+        gd.grabExcessVerticalSpace = false;
+    	gd.verticalAlignment = GridData.CENTER;
+    	gd.heightHint = progressIndicatorHeight;
         fProgressIndicator.setLayoutData(gd);
+
+        if (fHasStopButton) {
+        	fToolBar = new ToolBar(this, SWT.FLAT);
+
+        	gd = new GridData();
+            gd.grabExcessHorizontalSpace = false;
+            gd.grabExcessVerticalSpace = false;
+        	gd.verticalAlignment = GridData.CENTER;
+        	fToolBar.setLayoutData(gd);
+        	fStopButton = new ToolItem(fToolBar, SWT.PUSH);
+        	// It would have been nice to use the fCancelListener, but that
+        	// listener operates on the fCancelComponent which must be a control.
+        	fStopButton.addSelectionListener(new SelectionAdapter() {
+        		public void widgetSelected(SelectionEvent e) {
+        			setCanceled(true);
+        			if (fStopButton != null) {
+        				fStopButton.setEnabled(false);
+        			}
+        		}
+        	});
+        	final Image stopImage = ImageDescriptor.createFromFile(
+        			ProgressMonitorPart.class, "images/stop.gif").createImage(getDisplay()); //$NON-NLS-1$
+        	final Cursor arrowCursor = new Cursor(this.getDisplay(), SWT.CURSOR_ARROW);
+        	fToolBar.setCursor(arrowCursor);
+        	fStopButton.setImage(stopImage);
+        	fStopButton.addDisposeListener(new DisposeListener() {
+        		public void widgetDisposed(DisposeEvent e) {
+        			stopImage.dispose();
+        			arrowCursor.dispose();
+        		}
+        	});
+        	fStopButton.setEnabled(false);
+			fStopButton.setToolTipText(JFaceResources.getString("ProgressMonitorPart.cancelToolTip")); //$NON-NLS-1$
+        }
     }
 
     /**
@@ -207,16 +305,23 @@ public class ProgressMonitorPart extends Composite implements
         return fIsCanceled;
     }
 
-    /**
-     * Detach the progress monitor part from the given cancel
-     * component
-     * @param cc
-     */
-    public void removeFromCancelComponent(Control cc) {
-        Assert.isTrue(fCancelComponent == cc && fCancelComponent != null);
-        fCancelComponent.removeListener(SWT.Selection, fCancelListener);
-        fCancelComponent = null;
-    }
+	/**
+	 * Detach the progress monitor part from the given cancel component.
+	 * 
+	 * @param cancelComponent the control that was previously used as a cancel component. This
+	 *            parameter will be ignored and hence can be <code>null</code> if a stop button was
+	 *            requested upon construction and instead the stop button will be disabled.
+	 * @see #ProgressMonitorPart(Composite, Layout, boolean)
+	 */
+	public void removeFromCancelComponent(Control cancelComponent) {
+		if (fHasStopButton) {
+			setCancelEnabled(false);
+		} else {
+			Assert.isTrue(fCancelComponent == cancelComponent && fCancelComponent != null);
+			fCancelComponent.removeListener(SWT.Selection, fCancelListener);
+			fCancelComponent = null;
+		}
+	}
 
     /**
      * Implements <code>IProgressMonitor.setCanceled</code>.
@@ -315,4 +420,12 @@ public class ProgressMonitorPart extends Composite implements
         updateLabel();
 
     }
+    
+   private void setCancelEnabled(boolean enabled) {
+    	if (fStopButton != null && !fStopButton.isDisposed()) {
+    		fStopButton.setEnabled(enabled);
+    		if (enabled)
+    			fToolBar.setFocus();
+    	}
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
index 97e1a59..a1de24f 100644
--- a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
+++ b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/WizardDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Chris Gross (schtoo at schtoo.com) - patch for bug 16179
+ *     Eugene Ostroukhov <eugeneo at symbian.org> - Bug 287887 [Wizards] [api] Cancel button has two distinct roles
+ *     Paul Adams <padams at ittvis.com> - Bug 202534 - [Dialogs] SWT error in Wizard dialog when help is displayed and "Finish" is pressed
  *******************************************************************************/
 package org.eclipse.jface.wizard;
 
@@ -16,30 +18,14 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.dialogs.IPageChangeProvider;
-import org.eclipse.jface.dialogs.IPageChangedListener;
-import org.eclipse.jface.dialogs.IPageChangingListener;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.PageChangedEvent;
-import org.eclipse.jface.dialogs.PageChangingEvent;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.operation.ModalContext;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.SafeRunnable;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.HelpEvent;
 import org.eclipse.swt.events.HelpListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
 import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
@@ -53,6 +39,26 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.Shell;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
+
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.IPageChangingListener;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.PageChangedEvent;
+import org.eclipse.jface.dialogs.PageChangingEvent;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.operation.ModalContext;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.SafeRunnable;
+
 /**
  * A dialog to show a wizard to the end user.
  * <p>
@@ -95,6 +101,20 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	// The number of long running operation executed from the dialog.
 	private long activeRunningOperations = 0;
 
+	/**
+	 * The time in milliseconds where the last job finished. 'Enter' key presses are ignored for the
+	 * next {@link #RESTORE_ENTER_DELAY} milliseconds.
+	 * <p>
+	 * The value <code>-1</code> indicates that the traverse listener needs to be installed.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	private long timeWhenLastJobFinished= -1;
+
+	// Tells whether a subclass provided the progress monitor part
+	private boolean useCustomProgressMonitorPart= true;
+
 	// The current page message and description
 	private String pageMessage;
 
@@ -137,6 +157,14 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 
 	private static final String FOCUS_CONTROL = "focusControl"; //$NON-NLS-1$
 
+	/**
+	 * A delay in milliseconds that reduces the risk that the user accidentally triggers a
+	 * button by pressing the 'Enter' key immediately after a job has finished.
+	 * 
+	 * @since 3.6
+	 */
+	private static final int RESTORE_ENTER_DELAY= 500;
+
 	private boolean lockedUI = false;
 
 	private ListenerList pageChangedListeners = new ListenerList();
@@ -314,24 +342,53 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 				focusControl = null;
 			}
 			boolean needsProgressMonitor = wizard.needsProgressMonitor();
-			cancelButton.removeSelectionListener(cancelListener);
+			
 			// Set the busy cursor to all shells.
 			Display d = getShell().getDisplay();
 			waitCursor = new Cursor(d, SWT.CURSOR_WAIT);
 			setDisplayCursor(waitCursor);
-			// Set the arrow cursor to the cancel component.
-			arrowCursor = new Cursor(d, SWT.CURSOR_ARROW);
-			cancelButton.setCursor(arrowCursor);
+			
+			if (useCustomProgressMonitorPart) {
+				cancelButton.removeSelectionListener(cancelListener);
+				// Set the arrow cursor to the cancel component.
+				arrowCursor = new Cursor(d, SWT.CURSOR_ARROW);
+				cancelButton.setCursor(arrowCursor);
+			}
+			
 			// Deactivate shell
-			savedState = saveUIState(needsProgressMonitor && enableCancelButton);
+			savedState = saveUIState(useCustomProgressMonitorPart && needsProgressMonitor && enableCancelButton);
 			if (focusControl != null) {
 				savedState.put(FOCUS_CONTROL, focusControl);
 			}
-			// Attach the progress monitor part to the cancel button
+			// Activate cancel behavior.
 			if (needsProgressMonitor) {
-				progressMonitorPart.attachToCancelComponent(cancelButton);
+				if (enableCancelButton || useCustomProgressMonitorPart) {
+					progressMonitorPart.attachToCancelComponent(cancelButton);
+				}
 				progressMonitorPart.setVisible(true);
 			}
+			
+			// Install traverse listener once in order to implement 'Enter' and 'Space' key blocking
+			if (timeWhenLastJobFinished == -1) {
+				timeWhenLastJobFinished= 0;
+				getShell().addTraverseListener(new TraverseListener() {
+					public void keyTraversed(TraverseEvent e) {
+						if (e.detail == SWT.TRAVERSE_RETURN || (e.detail == SWT.TRAVERSE_MNEMONIC && e.keyCode == 32)) {
+							// We want to ignore the keystroke when we detect that it has been received within the
+							// delay period after the last operation has finished.  This prevents the user from accidentally
+							// hitting "Enter" or "Space", intending to cancel an operation, but having it processed exactly
+							// when the operation finished, thus traversing the wizard.  If there is another operation still
+							// running, the UI is locked anyway so we are not in this code.  This listener should fire only
+							// after the UI state is restored (which by definition means all jobs are done.
+							// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=287887
+							if (timeWhenLastJobFinished != 0 && System.currentTimeMillis() - timeWhenLastJobFinished < RESTORE_ENTER_DELAY) {
+								e.doit= false;
+								return;
+							}
+							timeWhenLastJobFinished= 0;
+						}}
+				});
+			}
 		}
 		return savedState;
 	}
@@ -565,9 +622,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 		pageContainer.setLayoutData(gd);
 		pageContainer.setFont(parent.getFont());
 		// Insert a progress monitor
-		GridLayout pmlayout = new GridLayout();
-		pmlayout.numColumns = 1;
-		progressMonitorPart = createProgressMonitorPart(composite, pmlayout);
+		progressMonitorPart= createProgressMonitorPart(composite, new GridLayout());
 		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
 		progressMonitorPart.setLayoutData(gridData);
 		progressMonitorPart.setVisible(false);
@@ -580,15 +635,19 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	}
 
 	/**
-	 * Create the progress monitor part in the receiver.
+	 * Hook method for subclasses to create a custom progress monitor part.
+	 * <p>
+	 * The default implementation creates a progress monitor with a stop button will be created.
+	 * </p>
 	 * 
-	 * @param composite
-	 * @param pmlayout
-	 * @return ProgressMonitorPart
+	 * @param composite the parent composite
+	 * @param pmlayout the layout
+	 * @return ProgressMonitorPart the progress monitor part
 	 */
 	protected ProgressMonitorPart createProgressMonitorPart(
 			Composite composite, GridLayout pmlayout) {
-		return new ProgressMonitorPart(composite, pmlayout, SWT.DEFAULT) {
+		useCustomProgressMonitorPart= false;
+		return new ProgressMonitorPart(composite, pmlayout, true) {
 			String currentTask = null;
 
 			/*
@@ -719,7 +778,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	}
 
 	/**
-	 * Creates and return a new wizard closing dialog without openiong it.
+	 * Creates and return a new wizard closing dialog without opening it.
 	 * 
 	 * @return MessageDalog
 	 */
@@ -804,6 +863,11 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 			// dispose code
 			createdWizard.setContainer(null);
 		}
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=202534
+		// disposing the wizards could cause the image currently set in
+		// this dialog to be disposed.  A subsequent repaint event during
+		// close would then fail.  To prevent this case, we null out the image.
+		setTitleImage(null);
 		return super.close();
 	}
 
@@ -822,7 +886,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	protected void nextPressed() {
 		IWizardPage page = currentPage.getNextPage();
 		if (page == null) {
-			// something must have happend getting the next page
+			// something must have happened getting the next page
 			return;
 		}
 
@@ -945,11 +1009,17 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 					.getDisplay());
 			lockedUI = false;
 		} finally {
-			activeRunningOperations--;
+			// explicitly invoke done() on our progress monitor so that its
+			// label does not spill over to the next invocation, see bug 271530
+			if (getProgressMonitor() != null) {
+				getProgressMonitor().done();
+			}
 			// Stop if this is the last one
 			if (state != null) {
+				timeWhenLastJobFinished= System.currentTimeMillis();
 				stopped(state);
 			}
+			activeRunningOperations--;
 		}
 	}
 
@@ -995,8 +1065,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 		saveEnableStateAndSet(backButton, savedState, "back", false); //$NON-NLS-1$
 		saveEnableStateAndSet(nextButton, savedState, "next", false); //$NON-NLS-1$
 		saveEnableStateAndSet(finishButton, savedState, "finish", false); //$NON-NLS-1$
-		saveEnableStateAndSet(cancelButton, savedState,
-				"cancel", keepCancelEnabled); //$NON-NLS-1$
+		saveEnableStateAndSet(cancelButton, savedState,	"cancel", keepCancelEnabled); //$NON-NLS-1$
 		saveEnableStateAndSet(helpButton, savedState, "help", false); //$NON-NLS-1$
 		if (currentPage != null) {
 			savedState
@@ -1156,8 +1225,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 		if (page.getControl() == null) {
 			page.createControl(pageContainer);
 			// the page is responsible for ensuring the created control is
-			// accessable
-			// via getControl.
+			// accessible via getControl.
 			Assert.isNotNull(page.getControl(), JFaceResources.format(
 					JFaceResources.getString("WizardDialog.missingSetControl"), //$NON-NLS-1$
 					new Object[] { page.getName() }));
@@ -1182,15 +1250,14 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	private void showStartingPage() {
 		currentPage = wizard.getStartingPage();
 		if (currentPage == null) {
-			// something must have happend getting the page
+			// something must have happened getting the page
 			return;
 		}
 		// ensure the page control has been created
 		if (currentPage.getControl() == null) {
 			currentPage.createControl(pageContainer);
 			// the page is responsible for ensuring the created control is
-			// accessable
-			// via getControl.
+			// accessible via getControl.
 			Assert.isNotNull(currentPage.getControl());
 			// we do not need to update the size since the call
 			// to initialize bounds has not been made yet.
@@ -1218,13 +1285,15 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 			}
 			Map state = (Map) savedState;
 			restoreUIState(state);
-			cancelButton.addSelectionListener(cancelListener);
 			setDisplayCursor(null);
-			cancelButton.setCursor(null);
+			if (useCustomProgressMonitorPart) {
+				cancelButton.addSelectionListener(cancelListener);
+				cancelButton.setCursor(null);
+				arrowCursor.dispose();
+				arrowCursor = null;
+			}
 			waitCursor.dispose();
 			waitCursor = null;
-			arrowCursor.dispose();
-			arrowCursor = null;
 			Control focusControl = (Control) state.get(FOCUS_CONTROL);
 			if (focusControl != null && !focusControl.isDisposed()) {
 				focusControl.setFocus();
@@ -1261,7 +1330,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 			nextButton.setEnabled(canFlipToNextPage);
 		}
 		finishButton.setEnabled(canFinish);
-		// finish is default unless it is diabled and next is enabled
+		// finish is default unless it is disabled and next is enabled
 		if (canFlipToNextPage && !canFinish) {
 			getShell().setDefaultButton(nextButton);
 		} else {
@@ -1272,7 +1341,7 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	/**
 	 * Update the message line with the page's description.
 	 * <p>
-	 * A discription is shown only if there is no message or error message.
+	 * A description is shown only if there is no message or error message.
 	 * </p>
 	 */
 	private void updateDescriptionMessage() {
@@ -1320,11 +1389,10 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	}
 
 	/**
-	 * Computes the correct dialog size for the current page and resizes its
-	 * shell if nessessary. Also causes the container to refresh its layout.
+	 * Computes the correct dialog size for the current page and resizes its shell if necessary.
+	 * Also causes the container to refresh its layout.
 	 * 
-	 * @param page
-	 *            the wizard page to use to resize the dialog
+	 * @param page the wizard page to use to resize the dialog
 	 * @since 2.0
 	 */
 	protected void updateSize(IWizardPage page) {
@@ -1345,11 +1413,9 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	}
 
 	/**
-	 * Computes the correct dialog size for the given page and resizes its shell
-	 * if nessessary.
+	 * Computes the correct dialog size for the given page and resizes its shell if necessary.
 	 * 
-	 * @param page
-	 *            the wizard page
+	 * @param page the wizard page
 	 */
 	private void updateSizeForPage(IWizardPage page) {
 		// ensure the page container is large enough
@@ -1364,11 +1430,9 @@ public class WizardDialog extends TitleAreaDialog implements IWizardContainer2,
 	}
 
 	/**
-	 * Computes the correct dialog size for the given wizard and resizes its
-	 * shell if nessessary.
+	 * Computes the correct dialog size for the given wizard and resizes its shell if necessary.
 	 * 
-	 * @param sizingWizard
-	 *            the wizard
+	 * @param sizingWizard the wizard
 	 */
 	private void updateSizeForWizard(IWizard sizingWizard) {
 		Point delta = new Point(0, 0);
diff --git a/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/images/stop.gif b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/images/stop.gif
new file mode 100644
index 0000000..ce5f5d7
Binary files /dev/null and b/eclipse/plugins/org.eclipse.jface/src/org/eclipse/jface/wizard/images/stop.gif differ
diff --git a/eclipse/plugins/org.eclipse.jsch.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jsch.core/META-INF/MANIFEST.MF
index 6747b07..0bf9e09 100644
--- a/eclipse/plugins/org.eclipse.jsch.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jsch.core/META-INF/MANIFEST.MF
@@ -2,13 +2,12 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jsch.core;singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.200.qualifier
 Bundle-Activator: org.eclipse.jsch.internal.core.JSchCorePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
  com.jcraft.jsch;bundle-version="[0.1.28,1.0.0)",
- org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
 Eclipse-LazyStart: true
 Export-Package: org.eclipse.jsch.core,
diff --git a/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java b/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java
index 8f7367f..ce7f29e 100644
--- a/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java
+++ b/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/IConstants.java
@@ -47,5 +47,7 @@ public interface IConstants{
   public final String PREF_PROXY_AUTH="proxyAuth"; //$NON-NLS-1$
 
   public final String PREF_HAS_MIGRATED_SSH2_PREFS="org.eclipse.jsch.core.hasMigratedSsh2Preferences"; //$NON-NLS-1$
-
+  
+  public static final String PREF_PREFERRED_AUTHENTICATION_METHODS="CVSSSH2PreferencePage.PREF_AUTH_METHODS"; //$NON-NLS-1$
+  public static final String PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER="CVSSSH2PreferencePage.PREF_AUTH_METHODS_ORDER"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java b/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java
index b073d69..33b6d96 100644
--- a/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java
+++ b/eclipse/plugins/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Utils.java
@@ -15,7 +15,9 @@ import java.util.Hashtable;
 import org.eclipse.core.net.proxy.IProxyData;
 import org.eclipse.core.net.proxy.IProxyService;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Preferences;
+import org.eclipse.core.runtime.preferences.IPreferencesService;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 
 import com.jcraft.jsch.*;
@@ -25,6 +27,18 @@ import com.jcraft.jsch.*;
  * @since 1.0
  */
 public class Utils{
+  
+  /* should have at least one element */
+  private static final String[] PREFERRED_AUTH_METHODS=new String[] {
+      "gssapi-with-mic", "publickey", "password", "keyboard-interactive"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+  public static String getDefaultAuthMethods(){
+    String defaultValue = PREFERRED_AUTH_METHODS[0];
+    for(int i = 1; i < PREFERRED_AUTH_METHODS.length; i++){
+      defaultValue += "," + PREFERRED_AUTH_METHODS[i]; //$NON-NLS-1$
+    }
+    return defaultValue;
+  }
 
   public static String loadPrivateKeys(JSch jsch, String current_pkeys){
     Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
@@ -78,7 +92,7 @@ public class Utils{
     setProxy(session);
     Hashtable config=new Hashtable();
     config.put("PreferredAuthentications", //$NON-NLS-1$ 
-        "gssapi-with-mic,publickey,password,keyboard-interactive"); //$NON-NLS-1$ 
+        getEnabledPreferredAuthMethods()); 
     session.setConfig(config);
     return session;
   }
@@ -187,5 +201,25 @@ public class Utils{
       ssh2Prefs.remove(IConstants.KEY_OLD_PRIVATEKEY);
     }
   }
+  
+  public static String getEnabledPreferredAuthMethods(){
+    IPreferencesService service = Platform.getPreferencesService();
+    return service.getString(JSchCorePlugin.ID,
+        IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS, getDefaultAuthMethods(), null);
+  }
+
+  public static String getMethodsOrder(){
+    IPreferencesService service = Platform.getPreferencesService();
+    return service.getString(JSchCorePlugin.ID,
+        IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER, getDefaultAuthMethods(), null);
+  }
+  
+  public static void setEnabledPreferredAuthMethods(String methods, String order){
+    IPreferencesService service=Platform.getPreferencesService();
+    service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put(
+        IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS, methods);
+    service.getRootNode().node(InstanceScope.SCOPE).node(JSchCorePlugin.ID).put(
+        IConstants.PREF_PREFERRED_AUTHENTICATION_METHODS_ORDER, order);}
+  
 
 }
diff --git a/eclipse/plugins/org.eclipse.jsch.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.jsch.ui/META-INF/MANIFEST.MF
index bf0cabc..c43daae 100644
--- a/eclipse/plugins/org.eclipse.jsch.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.jsch.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jsch.ui;singleton:=true
-Bundle-Version: 1.1.200.qualifier
+Bundle-Version: 1.1.300.qualifier
 Bundle-Activator: org.eclipse.jsch.internal.ui.JSchUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java
index 06f6b5e..28c6047 100644
--- a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java
+++ b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/Messages.java
@@ -24,6 +24,7 @@ public class Messages extends NLS{
   public static String CVSSSH2ServerConnection_open;
   public static String CVSSSH2PreferencePage_18;
   public static String CVSSSH2PreferencePage_19;
+  public static String CVSSSH2PreferencePage_2;
   public static String CVSSSH2PreferencePage_20;
   public static String CVSSSH2PreferencePage_21;
   public static String CVSSSH2PreferencePage_23;
@@ -31,6 +32,7 @@ public class Messages extends NLS{
   public static String CVSSSH2PreferencePage_25;
   public static String CVSSSH2PreferencePage_26;
   public static String CVSSSH2PreferencePage_27;
+  public static String CVSSSH2PreferencePage_3;
   public static String CVSSSH2PreferencePage_30;
   public static String CVSSSH2PreferencePage_31;
   public static String CVSSSH2PreferencePage_32;
@@ -39,6 +41,7 @@ public class Messages extends NLS{
   public static String CVSSSH2PreferencePage_35;
   public static String CVSSSH2PreferencePage_36;
   public static String CVSSSH2PreferencePage_39;
+  public static String CVSSSH2PreferencePage_4;
   public static String CVSSSH2PreferencePage_41;
   public static String CVSSSH2PreferencePage_42;
   public static String CVSSSH2PreferencePage_43;
@@ -47,6 +50,7 @@ public class Messages extends NLS{
   public static String CVSSSH2PreferencePage_47;
   public static String CVSSSH2PreferencePage_48;
   public static String CVSSSH2PreferencePage_49;
+  public static String CVSSSH2PreferencePage_5;
   public static String CVSSSH2PreferencePage_50;
   public static String CVSSSH2PreferencePage_53;
   public static String CVSSSH2PreferencePage_55;
@@ -81,6 +85,7 @@ public class Messages extends NLS{
   public static String CVSSSH2PreferencePage_134;
   public static String CVSSSH2PreferencePage_135;
   public static String CVSSSH2PreferencePage_136;
+  public static String CVSSSH2PreferencePage_137;
   public static String CVSSSH2PreferencePage_138;
   public static String CVSSSH2PreferencePage_139;
   public static String KeyboardInteractiveDialog_0;
diff --git a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties
index 66feaa6..243e9d9 100644
--- a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties
+++ b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/messages.properties
@@ -14,6 +14,7 @@
 CVSSSH2ServerConnection_open=Connecting via SSH to {0}...
 CVSSSH2PreferencePage_18=Configuration options for SSH2:
 CVSSSH2PreferencePage_19=&General
+CVSSSH2PreferencePage_2=Up
 CVSSSH2PreferencePage_20=&Proxy
 CVSSSH2PreferencePage_21=&Key Management
 CVSSSH2PreferencePage_23=SSH2 &home:
@@ -21,6 +22,7 @@ CVSSSH2PreferencePage_24=&Browse...
 CVSSSH2PreferencePage_25=P&rivate keys:
 CVSSSH2PreferencePage_26=Add Pr&ivate Key...
 CVSSSH2PreferencePage_27=SSH Home:
+CVSSSH2PreferencePage_3=Down
 CVSSSH2PreferencePage_30=&Enable proxy connection
 CVSSSH2PreferencePage_31=Proxy &type:
 CVSSSH2PreferencePage_32=Proxy host add&ress:
@@ -29,6 +31,7 @@ CVSSSH2PreferencePage_34=E&nable proxy authentication
 CVSSSH2PreferencePage_35=Proxy &user name:
 CVSSSH2PreferencePage_36=Proxy pa&ssword:
 CVSSSH2PreferencePage_39=&You can paste this public key into the remote authorized_keys file:
+CVSSSH2PreferencePage_4=Select preferred authentication methods
 CVSSSH2PreferencePage_41=&Fingerprint:
 CVSSSH2PreferencePage_42=&Comment:
 CVSSSH2PreferencePage_43=Passp&hrase:
@@ -37,6 +40,7 @@ CVSSSH2PreferencePage_45=&Save Private Key...
 CVSSSH2PreferencePage_47=The key was not generated.
 CVSSSH2PreferencePage_48=The passphrases entered do not match.
 CVSSSH2PreferencePage_49=Are you sure you want to save this private key without passphrase protection?
+CVSSSH2PreferencePage_5=You must select at least one authentication method.
 CVSSSH2PreferencePage_50={0} does not exist.\nAre you sure you want to create it?
 CVSSSH2PreferencePage_53={0} has already existed.\nAre you sure you want to overwrite it?
 CVSSSH2PreferencePage_55=Successfully saved.
@@ -71,6 +75,7 @@ CVSSSH2PreferencePage_133=Kno&wn Hosts
 CVSSSH2PreferencePage_134=Hostname
 CVSSSH2PreferencePage_135=Type
 CVSSSH2PreferencePage_136=Fingerprint
+CVSSSH2PreferencePage_137=&Authentication Methods
 CVSSSH2PreferencePage_138=&Remove
 CVSSSH2PreferencePage_139=Keys of known hosts:
 UserInfoPrompter_0=SSH2 Message
diff --git a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java
index 9b9a5cc..491345a 100644
--- a/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java
+++ b/eclipse/plugins/org.eclipse.jsch.ui/src/org/eclipse/jsch/internal/ui/preference/PreferencePage.java
@@ -12,30 +12,78 @@
  *******************************************************************************/
 package org.eclipse.jsch.internal.ui.preference;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
 import java.util.Iterator;
+import java.util.Set;
 
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Preferences;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jsch.core.IJSchLocation;
 import org.eclipse.jsch.core.IJSchService;
-import org.eclipse.jsch.internal.core.*;
+import org.eclipse.jsch.internal.core.IConstants;
+import org.eclipse.jsch.internal.core.JSchCorePlugin;
+import org.eclipse.jsch.internal.core.Utils;
 import org.eclipse.jsch.internal.ui.JSchUIPlugin;
 import org.eclipse.jsch.internal.ui.Messages;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.events.*;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-
-import com.jcraft.jsch.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.PlatformUI;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.HostKey;
+import com.jcraft.jsch.HostKeyRepository;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.KeyPair;
+import com.jcraft.jsch.Session;
+import com.jcraft.jsch.SftpATTRS;
+import com.jcraft.jsch.SftpException;
 
 public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
     implements IWorkbenchPreferencePage{
@@ -93,6 +141,10 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
     tabItem=new TabItem(tabFolder, SWT.NONE);
     tabItem.setText(Messages.CVSSSH2PreferencePage_133);
     tabItem.setControl(createHostKeyManagementPage(tabFolder));
+    
+    tabItem=new TabItem(tabFolder, SWT.NONE);
+    tabItem.setText(Messages.CVSSSH2PreferencePage_137);
+    tabItem.setControl(createPreferredAuthenticationPage(tabFolder));
 
     initControls();
 
@@ -715,6 +767,12 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
   private TableViewer viewer;
   private Button removeHostKeyButton;
 
+  Table preferedAuthMethodTable;
+
+  Button up;
+
+  Button down;
+
   class TableLabelProvider extends LabelProvider implements ITableLabelProvider{
     public String getColumnText(Object element, int columnIndex){
       HostKey entry=(HostKey)element;
@@ -840,6 +898,132 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
 
     return group;
   }
+  
+  private Control createPreferredAuthenticationPage(Composite parent){
+    Composite root = new Composite(parent, SWT.NONE);
+    GridLayout layout=new GridLayout();
+    layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+    layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+    layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+    layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+    layout.numColumns = 2;
+    root.setLayout(layout);
+    
+    Label label=new Label(root, SWT.NONE);
+    GridData textLayoutData=new GridData(SWT.BEGINNING, SWT.BEGINNING, true, false);
+    textLayoutData.horizontalSpan = 2;
+    label.setLayoutData(textLayoutData);
+    label.setText(Messages.CVSSSH2PreferencePage_4);
+    
+    preferedAuthMethodTable=new Table(root, SWT.CHECK | SWT.BORDER);
+    GridData layoutData=new GridData(SWT.FILL, SWT.BEGINNING, true, true);
+    layoutData.verticalSpan = 3;
+    preferedAuthMethodTable.setLayoutData(layoutData);
+    layoutData.minimumHeight = 150;
+    layoutData.minimumWidth = 200;
+    populateAuthMethods();
+    
+    up=new Button(root, SWT.PUSH);
+    up.setText(Messages.CVSSSH2PreferencePage_2);
+    up.setEnabled(false);
+    setButtonLayoutData(up);
+    
+    down=new Button(root, SWT.PUSH);
+    down.setText(Messages.CVSSSH2PreferencePage_3);
+    down.setEnabled(false);
+    setButtonLayoutData(down);
+    
+    preferedAuthMethodTable.addSelectionListener(new SelectionAdapter(){
+      
+      public void widgetSelected(SelectionEvent e){
+        boolean anySelected = false;
+        for(int i = 0; i < preferedAuthMethodTable.getItemCount(); i++){
+          anySelected |= preferedAuthMethodTable.getItem(i).getChecked();
+        }
+        
+        if(anySelected){
+          setErrorMessage(null);
+          setValid(true);
+        }
+        else{
+          setErrorMessage(Messages.CVSSSH2PreferencePage_5);
+          setValid(false);
+        }
+        up.setEnabled(preferedAuthMethodTable.getSelectionIndex()>0);
+        down
+            .setEnabled(preferedAuthMethodTable.getSelectionIndex()<preferedAuthMethodTable
+                .getItemCount()-1);
+      }
+      
+    });
+    up.addSelectionListener(new SelectionAdapter(){
+
+      public void widgetSelected(SelectionEvent e){
+        int selectedIndex=preferedAuthMethodTable.getSelectionIndex();
+        if(selectedIndex == 1){ //this is the last possible swap
+          up.setEnabled(false);
+        }
+        down.setEnabled(true);
+        TableItem sourceItem = preferedAuthMethodTable.getItem(selectedIndex);
+        TableItem targetItem = preferedAuthMethodTable.getItem(selectedIndex-1);
+        
+        //switch text
+        String stemp = targetItem.getText();
+        targetItem.setText(sourceItem.getText());
+        sourceItem.setText(stemp);
+        
+        //switch selection
+        boolean btemp = targetItem.getChecked();
+        targetItem.setChecked(sourceItem.getChecked());
+        sourceItem.setChecked(btemp);
+        
+        preferedAuthMethodTable.setSelection(targetItem);
+      }
+    });
+    
+    down.addSelectionListener(new SelectionAdapter(){
+
+      public void widgetSelected(SelectionEvent e){
+        int selectedIndex=preferedAuthMethodTable.getSelectionIndex();
+        if(selectedIndex == preferedAuthMethodTable.getItemCount()-2){ //this is the last possible swap
+          down.setEnabled(false);
+        }
+        up.setEnabled(true);
+        TableItem sourceItem = preferedAuthMethodTable.getItem(selectedIndex);
+        TableItem targetItem = preferedAuthMethodTable.getItem(selectedIndex+1);
+        
+        //switch text
+        String stemp = targetItem.getText();
+        targetItem.setText(sourceItem.getText());
+        sourceItem.setText(stemp);
+        
+        //switch selection
+        boolean btemp = targetItem.getChecked();
+        targetItem.setChecked(sourceItem.getChecked());
+        sourceItem.setChecked(btemp);
+        
+        preferedAuthMethodTable.setSelection(targetItem);
+      }
+    });
+    
+    return root;
+  }
+
+  private void populateAuthMethods(){
+    preferedAuthMethodTable.removeAll();
+    String[] methods = Utils.getEnabledPreferredAuthMethods().split(","); //$NON-NLS-1$
+    Set smethods  = new HashSet(Arrays.asList(methods));
+    
+    String[] order = Utils.getMethodsOrder().split(","); //$NON-NLS-1$
+    
+    for(int i=0; i<order.length; i++){
+      TableItem tableItem= new TableItem(preferedAuthMethodTable, SWT.NONE);
+      tableItem.setText(0, order[i]);
+      if(smethods.contains(order[i])){
+        tableItem.setChecked(true);
+      }
+    }
+  }
 
   void handleSelection(){
     boolean empty=viewer.getSelection().isEmpty();
@@ -953,6 +1137,9 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
     keyPassphrase2Text.setEnabled(enable);
     keyExport.setEnabled(enable);
     saveKeyPair.setEnabled(enable);
+    populateAuthMethods();
+    up.setEnabled(false);
+    down.setEnabled(false);
   }
 
   public void init(IWorkbench workbench){
@@ -975,6 +1162,7 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
 
   public boolean performOk(){
     boolean result=super.performOk();
+    storeAuthenticationMethodSettings();
     if(result){
       setErrorMessage(null);
       String home=ssh2HomeText.getText();
@@ -1003,12 +1191,36 @@ public class PreferencePage extends org.eclipse.jface.preference.PreferencePage
     return result;
   }
 
+  private void storeAuthenticationMethodSettings(){
+    String selected = null;
+    String order = null;
+    for(int i = 0; i < preferedAuthMethodTable.getItemCount(); i++){
+      TableItem item=preferedAuthMethodTable.getItem(i);
+      if(item.getChecked()){
+        if(selected==null){
+          selected=item.getText();
+        }
+        else{
+          selected+=","+item.getText(); //$NON-NLS-1$
+        }
+      }
+      if(order == null){
+        order = item.getText();
+      } else {
+        order += "," + item.getText(); //$NON-NLS-1$
+      }
+    }
+    Utils.setEnabledPreferredAuthMethods(selected, order);
+  }
+
   public void performApply(){
     performOk();
   }
 
   protected void performDefaults(){
     super.performDefaults();
+    Utils.setEnabledPreferredAuthMethods(Utils.getDefaultAuthMethods(), Utils
+        .getDefaultAuthMethods());
     Preferences preferences=JSchCorePlugin.getPlugin().getPluginPreferences();
     ssh2HomeText
         .setText(preferences
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
index a43b01d..2c52c09 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ltk.core.refactoring; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.101.qualifier
 Bundle-Activator: org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Change.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Change.java
index 02aa678..986a24a 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Change.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Change.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Platform;
  * execute a change directly then the following life cycle has to be honored:
  * <ul>
  *   <li>After a single change or a tree of changes has been created, the
- *       method <code>initializeValidationState</code> has to be called.</li>
+ *       method <code>initializeValidationData</code> has to be called.</li>
  *   <li>The method <code>isValid</code> can be used to determine if a change
  *       can still be applied to the workspace. If the method returns a {@link
  *       RefactoringStatus} with a severity of FATAL then the change has to be
@@ -45,8 +45,8 @@ import org.eclipse.core.runtime.Platform;
  *       objects managed by the undo stack are no longer needed. The method
  *       <code>dispose</code> is typically implemented to unregister listeners
  *       registered during the
- *       method <code>initializeValidationState</code>. There is no guarantee
- *       that <code>initializeValidationState</code>, <code>isValid</code>,
+ *       method <code>initializeValidationData</code>. There is no guarantee
+ *       that <code>initializeValidationData</code>, <code>isValid</code>,
  *       or <code>perform</code> has been called before <code>dispose</code>
  *       is called.
  * </ul>
@@ -54,8 +54,8 @@ import org.eclipse.core.runtime.Platform;
  * <pre>
  *   Change change= createChange();
  *   try {
- *     change.initializeValidationState(pm);
- *
+ *     change.initializeValidationData(pm);
+ * 
  *     ....
  *
  *     if (!change.isEnabled())
@@ -65,7 +65,7 @@ import org.eclipse.core.runtime.Platform;
  *         return;
  *     Change undo= change.perform(new SubProgressMonitor(pm, 1));
  *     if (undo != null) {
- *        undo.initializeValidationState(new SubProgressMonitor(pm, 1));
+ *        undo.initializeValidationData(new SubProgressMonitor(pm, 1));
  *        // do something with the undo object
  *     }
  *   } finally {
@@ -89,7 +89,7 @@ import org.eclipse.core.runtime.Platform;
  * <p>
  * Clients may subclass this class.
  * </p>
- *
+ * 
  * @since 3.0
  */
 public abstract class Change implements IAdaptable {
@@ -255,9 +255,9 @@ public abstract class Change implements IAdaptable {
 	public abstract Change perform(IProgressMonitor pm) throws CoreException;
 
 	/**
-	 * Disposes this change. Subclasses that override this method typically
-	 * unregister listeners which got registered during the call to <code>
-	 * initializeValidationState</code>.
+	 * Disposes this change. Subclasses that override this method typically unregister listeners
+	 * which got registered during the call to <code>
+	 * initializeValidationData</code>.
 	 * <p>
 	 * Subclasses may override this method.
 	 * </p>
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/DocumentChange.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/DocumentChange.java
index 46c24af..276a1f6 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/DocumentChange.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/DocumentChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,17 @@ import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+
+import org.eclipse.text.edits.MalformedTreeException;
 import org.eclipse.text.edits.UndoEdit;
 
+import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 
+import org.eclipse.ltk.internal.core.refactoring.Lock;
 import org.eclipse.ltk.internal.core.refactoring.TextChanges;
 import org.eclipse.ltk.internal.core.refactoring.UndoDocumentChange;
 
@@ -101,6 +108,54 @@ public class DocumentChange extends TextChange {
 		//do nothing
 	}
 
+	/*
+	 * @see org.eclipse.ltk.core.refactoring.TextChange#performEdits(org.eclipse.jface.text.IDocument)
+	 * @since 3.6
+	 */
+	protected UndoEdit performEdits(final IDocument document) throws BadLocationException, MalformedTreeException {
+		ITextFileBufferManager fileBufferManager= FileBuffers.getTextFileBufferManager();
+		
+		ITextFileBuffer fileBuffer= fileBufferManager.getTextFileBuffer(document);
+		if (fileBuffer == null || ! fileBuffer.isSynchronizationContextRequested()) {
+			return super.performEdits(document);
+		}
+		
+		/** The lock for waiting for computation in the UI thread to complete. */
+		final Lock completionLock= new Lock();
+		final UndoEdit[] result= new UndoEdit[1];
+		final BadLocationException[] exception= new BadLocationException[1];
+		Runnable runnable= new Runnable() {
+			public void run() {
+				synchronized (completionLock) {
+					try {
+						result[0]= DocumentChange.super.performEdits(document);
+					} catch (BadLocationException e) {
+						exception[0]= e;
+					} finally {
+						completionLock.fDone= true;
+						completionLock.notifyAll();
+					}
+				}
+			}
+		};
+		
+		synchronized (completionLock) {
+			fileBufferManager.execute(runnable);
+			while (! completionLock.fDone) {
+				try {
+					completionLock.wait(500);
+				} catch (InterruptedException x) {
+				}
+			}
+		}
+		
+		if (exception[0] != null) {
+			throw exception[0];
+		}
+		
+		return result[0];
+	}
+	
 	/**
 	 * {@inheritDoc}
 	 */
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Lock.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Lock.java
deleted file mode 100644
index d96661d..0000000
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Lock.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ltk.core.refactoring;
-
-/**
- * A simple lock object with a <em>done</em> flag.
- * 
- * @since 3.5
- */
-/*package*/class Lock {
-	/**
-	 * <code>true</code> iff the operation is done.
-	 */
-	public boolean fDone;
-}
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/MultiStateTextFileChange.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/MultiStateTextFileChange.java
index 1bf4fca..6796a2b 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/MultiStateTextFileChange.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/MultiStateTextFileChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,6 +64,7 @@ import org.eclipse.jface.text.Region;
 import org.eclipse.ltk.internal.core.refactoring.BufferValidationState;
 import org.eclipse.ltk.internal.core.refactoring.Changes;
 import org.eclipse.ltk.internal.core.refactoring.ContentStamps;
+import org.eclipse.ltk.internal.core.refactoring.Lock;
 import org.eclipse.ltk.internal.core.refactoring.MultiStateUndoChange;
 import org.eclipse.ltk.internal.core.refactoring.NonDeletingPositionUpdater;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin;
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/PerformChangeOperation.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/PerformChangeOperation.java
index 3c6a3d1..0a3984f 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/PerformChangeOperation.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/PerformChangeOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -185,15 +185,13 @@ public class PerformChangeOperation implements IWorkspaceRunnable {
 
 	/**
 	 * Sets the scheduling rule used to execute this operation. If
-	 * not set then the workspace root is used. The Change operation
+	 * not set then the workspace root is used. The supplied Change
 	 * must be able to be performed in the provided scheduling rule.
 	 *
-	 * @param rule the Rule to use, not null
+	 * @param rule the rule to use, or <code>null</code> to use no scheduling rule
 	 * @since 3.3
 	 */
 	public void setSchedulingRule(ISchedulingRule rule) {
-		Assert.isNotNull(rule);
-
 		fSchedulingRule= rule;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Refactoring.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Refactoring.java
index ac32251..2263ac8 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Refactoring.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/Refactoring.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,11 +18,11 @@ import org.eclipse.core.runtime.SubProgressMonitor;
 
 /**
  * Abstract super class for all refactorings. Refactorings are used to perform
- * behavior preserving work space transformations. A refactoring offers two
+ * behavior-preserving workspace transformations. A refactoring offers two
  * different kind of methods:
  * <ol>
  *   <li>methods to check conditions to determine if the refactoring can be carried out
- *       in general and if transformation will be behavioral persevering.
+ *       in general and if transformation will be behavior-preserving.
  *       </li>
  *   <li>a method to create a {@link org.eclipse.ltk.core.refactoring.Change} object
  *       that represents the actual work space modifications.
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/TextFileChange.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/TextFileChange.java
index ade124a..289c7d4 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/TextFileChange.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/TextFileChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,7 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.ltk.internal.core.refactoring.BufferValidationState;
 import org.eclipse.ltk.internal.core.refactoring.Changes;
 import org.eclipse.ltk.internal.core.refactoring.ContentStamps;
+import org.eclipse.ltk.internal.core.refactoring.Lock;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/UndoTextFileChange.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/UndoTextFileChange.java
index bb3d1b2..89b7e69 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/UndoTextFileChange.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/core/refactoring/UndoTextFileChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import org.eclipse.jface.text.link.LinkedModeModel;
 import org.eclipse.ltk.internal.core.refactoring.BufferValidationState;
 import org.eclipse.ltk.internal.core.refactoring.Changes;
 import org.eclipse.ltk.internal.core.refactoring.ContentStamps;
+import org.eclipse.ltk.internal.core.refactoring.Lock;
 import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin;
 
 /**
@@ -187,17 +188,14 @@ public class UndoTextFileChange extends Change {
 			manager.connect(fFile.getFullPath(), LocationKind.IFILE, new SubProgressMonitor(pm, 1));
 			buffer= manager.getTextFileBuffer(fFile.getFullPath(), LocationKind.IFILE);
 			IDocument document= buffer.getDocument();
+			ContentStamp currentStamp= ContentStamps.get(fFile, document);
 
-			LinkedModeModel.closeAllModels(document);
+			boolean[] setContentStampSuccess= { false };
+			UndoEdit redo= performEdits(buffer, document, setContentStampSuccess);
 
-			ContentStamp currentStamp= ContentStamps.get(fFile, document);
-			// perform the changes
-			UndoEdit redo= fUndo.apply(document, TextEdit.CREATE_UNDO);
-			// try to restore the document content stamp
-			boolean success= ContentStamps.set(document, fContentStampToRestore);
 			if (needsSaving()) {
 				buffer.commit(pm, false);
-				if (!success) {
+				if (!setContentStampSuccess[0]) {
 					// We weren't able to restore document stamp.
 					// Since we save restore the file stamp instead
 					ContentStamps.set(fFile, fContentStampToRestore);
@@ -225,6 +223,68 @@ public class UndoTextFileChange extends Change {
 		}
 	}
 
+	private UndoEdit performEdits(ITextFileBuffer buffer, final IDocument document, final boolean[] setContentStampSuccess) throws MalformedTreeException, BadLocationException, CoreException {
+		if (! buffer.isSynchronizationContextRequested()) {
+			return doPerformEdits(document, setContentStampSuccess);
+		}
+		
+		ITextFileBufferManager fileBufferManager= FileBuffers.getTextFileBufferManager();
+		
+		/** The lock for waiting for computation in the UI thread to complete. */
+		final Lock completionLock= new Lock();
+		final UndoEdit[] result= new UndoEdit[1];
+		final BadLocationException[] badLocationException= new BadLocationException[1];
+		final MalformedTreeException[] malformedTreeException= new MalformedTreeException[1];
+		final CoreException[] coreException= new CoreException[1];
+		Runnable runnable= new Runnable() {
+			public void run() {
+				synchronized (completionLock) {
+					try {
+						result[0]= doPerformEdits(document, setContentStampSuccess);
+					} catch (BadLocationException e) {
+						badLocationException[0]= e;
+					} catch (MalformedTreeException e) {
+						malformedTreeException[0]= e;
+					} catch (CoreException e) {
+						coreException[0]= e;
+					} finally {
+						completionLock.fDone= true;
+						completionLock.notifyAll();
+					}
+				}
+			}
+		};
+		
+		synchronized (completionLock) {
+			fileBufferManager.execute(runnable);
+			while (! completionLock.fDone) {
+				try {
+					completionLock.wait(500);
+				} catch (InterruptedException x) {
+				}
+			}
+		}
+		
+		if (badLocationException[0] != null) {
+			throw badLocationException[0];
+		} else if (malformedTreeException[0] != null) {
+			throw malformedTreeException[0];
+		} else if (coreException[0] != null) {
+			throw coreException[0];
+		}
+		return result[0];
+	}
+
+	private UndoEdit doPerformEdits(IDocument document, boolean[] setContentStampSuccess) throws MalformedTreeException, BadLocationException, CoreException {
+		// perform the changes
+		LinkedModeModel.closeAllModels(document);
+		UndoEdit redo= fUndo.apply(document, TextEdit.CREATE_UNDO);
+
+		// try to restore the document content stamp
+		setContentStampSuccess[0]= ContentStamps.set(document, fContentStampToRestore);
+		return redo;
+	}
+
 	/**
 	 * {@inheritDoc}
 	 */
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Lock.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Lock.java
new file mode 100644
index 0000000..1625eb1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Lock.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ltk.internal.core.refactoring;
+
+/**
+ * A simple lock object with a <em>done</em> flag.
+ * 
+ * @since 3.5
+ */
+public class Lock {
+	/**
+	 * <code>true</code> iff the operation is done.
+	 */
+	public boolean fDone;
+}
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/ParticipantDescriptor.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/ParticipantDescriptor.java
index 9fd1a6e..9c8bb91 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/ParticipantDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/ParticipantDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,8 +64,7 @@ public class ParticipantDescriptor {
 				Messages.format( RefactoringCoreMessages.ParticipantDescriptor_error_class_missing, getId()),
 				null);
 		}
-		return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK,
-			RefactoringCoreMessages.ParticipantDescriptor_correct, null);
+		return Status.OK_STATUS;
 	}
 
 	public boolean matches(IEvaluationContext context, IParticipantDescriptorFilter filter, RefactoringStatus status) throws CoreException {
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.java
index 710f228..7f8c290 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,8 +32,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String DefaultRefactoringDescriptor_cannot_create_refactoring;
 
-	public static String MoveResourceChange_error_destination_already_exists;
-
 	public static String MoveResourceChange_name;
 
 	public static String MoveResourceChange_progress_delete_destination;
@@ -74,10 +72,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String MoveResourcesProcessor_warning_destination_already_exists;
 
-	public static String DeleteFileOrFolderChange_deleting;
-
-	public static String DeleteFileOrFolderChange_name;
-
 	public static String DeleteResourceChange_deleting;
 
 	public static String DeleteResourceChange_error_resource_not_exists;
@@ -118,8 +112,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String NullChange_name;
 
-	public static String ParticipantDescriptor_correct;
-
 	public static String ParticipantDescriptor_error_class_missing;
 
 	public static String ParticipantDescriptor_error_id_missing;
@@ -248,8 +240,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String TextChanges_error_read_only;
 
-	public static String TextChanges_error_unsaved_changes;
-
 	public static String UndoDeleteResourceChange_already_exists;
 
 	public static String UndoDeleteResourceChange_cannot_restore;
@@ -268,8 +258,6 @@ public final class RefactoringCoreMessages extends NLS {
 
 	public static String UnknownRefactoringDescriptor_cannot_create_refactoring;
 
-	public static String UnknownRefactoringDescriptor_initialization_error;
-
 	public static String ValidateEditChecker_failed;
 
 	static {
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.properties b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.properties
index 7979e74..919a471 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.properties
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/RefactoringCoreMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -40,7 +40,6 @@ NullChange_name= No operation change
 TextChanges_error_existing=The file ''{0}'' already exists in the workspace.
 TextChanges_error_not_existing=''{0}'' does not exist anymore.
 TextChanges_error_content_changed=The content of ''{0}'' has changed.
-TextChanges_error_unsaved_changes=The file ''{0}'' has unsaved changes.
 TextChanges_error_read_only=The file ''{0}'' is read-only.
 TextChanges_error_outOfSync= The file ''{0}'' is out of sync with the underlying file system.
 TextChanges_error_document_content_changed= The content of the document has changed.
@@ -58,7 +57,6 @@ ProcessorBasedRefactoring_final_conditions=Checking preconditions...
 ProcessorBasedRefactoring_create_change=Creating workspace modifications...
 ProcessorBasedRefactoring_prechange_participants_removed=All participants generating preChange actions are being removed because an exception was thrown when the main refactoring was executed.
 
-ParticipantDescriptor_correct=Syntactically correct rename participant element
 ParticipantDescriptor_error_id_missing=Disabling refactoring participant: the id attribute is missing
 ParticipantDescriptor_error_name_missing=Disabling refactoring participant: Refactoring participant ''{0}'' is missing ''name'' attribute.
 ParticipantDescriptor_error_class_missing=Disabling refactoring participant: Refactoring participant ''{0}'' is missing ''class'' attribute.
@@ -73,7 +71,7 @@ RenameResourceChange_name=Rename ''{0}'' to ''{1}''
 RenameResourceChange_progress_description=Rename resource
 RenameResourceDescriptor_error_name_not_defined=The rename resource refactoring can not be performed as the new name is invalid
 RenameResourceDescriptor_error_path_not_set=The rename resource refactoring can not be performed as resource path is not set
-RenameResourceDescriptor_error_resource_not_existing=The rename resource refactoring can not be performed as the resource ''{0}'' doesn not exist
+RenameResourceDescriptor_error_resource_not_existing=The rename resource refactoring can not be performed as the resource ''{0}'' does not exist
 RenameResourceDescriptor_unnamed_descriptor=N/A
 RenameResourceProcessor_comment=Rename resource ''{0}'' to ''{1}''
 RenameResourceProcessor_description=Rename resource ''{0}''
@@ -88,7 +86,6 @@ UndoableOperation2ChangeAdapter_error_message=Change execution failed
 UndoableOperation2ChangeAdapter_no_undo_available=No undo available
 UndoableOperation2ChangeAdapter_no_redo_available=No redo available
 
-UnknownRefactoringDescriptor_initialization_error=Cannot initialize an unknown refactoring.
 UnknownRefactoringDescriptor_cannot_create_refactoring=Cannot create a refactoring from the unknown refactoring descriptor.
 
 UndoManager2_no_change=Top most undoable operation doesn't represent a refactoring change
@@ -111,8 +108,6 @@ RefactoringSessionReader_invalid_contents_at=Invalid contents at line {0} column
 PerformRefactoringHistoryOperation_perform_refactorings=Performing refactorings...
 
 DefaultRefactoringDescriptor_cannot_create_refactoring=Cannot create a refactoring from a default refactoring descriptor
-DeleteFileOrFolderChange_deleting=Deleting resource...
-DeleteFileOrFolderChange_name=Delete ''{0}''
 DeleteResourceChange_deleting=Deleting resources...
 DeleteResourceChange_error_resource_not_exists=Can not delete resource. Resource does not exist.
 DeleteResourceChange_name=Delete ''{0}''
@@ -137,7 +132,6 @@ UndoDeleteResourceChange_change_name=Restore ''{0}''
 UndoDeleteResourceChange_cannot_restore=There is not enough information to create or restore ''{0}''.
 UndoDeleteResourceChange_already_exists=Cannot create or restore ''{0}'' because it already exists.
 UndoDeleteResourceChange_revert_resource=Revert ''{0}''
-MoveResourceChange_error_destination_already_exists=Resource already exists at destination
 MoveResourceChange_name=Move resource ''{0}'' to ''{1}''
 MoveResourceChange_progress_delete_destination=Delete resource at destination
 MoveResourceChange_progress_restore_source=Restore resource at source
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Resources.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Resources.java
index c7024e5..f6fdd86 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Resources.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/Resources.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,7 +64,7 @@ public class Resources {
 		}
 		if (result != null)
 			return result;
-		return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
@@ -104,7 +104,7 @@ public class Resources {
 				readOnlyFiles.add(resource);
 		}
 		if (readOnlyFiles.size() == 0)
-			return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 
 		Map oldTimeStamps= createModificationStampMap(readOnlyFiles);
 		IStatus status= ResourcesPlugin.getWorkspace().validateEdit(
@@ -121,7 +121,7 @@ public class Resources {
 		}
 		if (modified != null)
 			return modified;
-		return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	private static Map createModificationStampMap(List files){
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoDocumentChange.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoDocumentChange.java
index 5d12a31..3fd2bbd 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoDocumentChange.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoDocumentChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,11 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 
+import org.eclipse.core.filebuffers.FileBuffers;
+import org.eclipse.core.filebuffers.ITextFileBuffer;
+import org.eclipse.core.filebuffers.ITextFileBufferManager;
+
+import org.eclipse.text.edits.MalformedTreeException;
 import org.eclipse.text.edits.TextEdit;
 import org.eclipse.text.edits.UndoEdit;
 
@@ -74,11 +79,58 @@ public class UndoDocumentChange extends Change {
 	 */
 	public Change perform(IProgressMonitor pm) throws CoreException {
 		try {
-			UndoEdit redo= fUndo.apply(fDocument, TextEdit.CREATE_UNDO);
+			UndoEdit redo= performEdits();
 			Change result= new UndoDocumentChange(getName(), fDocument, redo);
 			return result;
+		} catch (MalformedTreeException e) {
+			throw Changes.asCoreException(e);
 		} catch (BadLocationException e) {
 			throw Changes.asCoreException(e);
 		}
 	}
+
+	private UndoEdit performEdits() throws BadLocationException, MalformedTreeException {
+		ITextFileBufferManager fileBufferManager= FileBuffers.getTextFileBufferManager();
+		
+		ITextFileBuffer fileBuffer= fileBufferManager.getTextFileBuffer(fDocument);
+		if (fileBuffer == null || ! fileBuffer.isSynchronizationContextRequested()) {
+			return fUndo.apply(fDocument, TextEdit.CREATE_UNDO);
+		}
+		
+		/** The lock for waiting for computation in the UI thread to complete. */
+		final Lock completionLock= new Lock();
+		final UndoEdit[] result= new UndoEdit[1];
+		final BadLocationException[] exception= new BadLocationException[1];
+		Runnable runnable= new Runnable() {
+			public void run() {
+				synchronized (completionLock) {
+					try {
+						result[0]= fUndo.apply(fDocument, TextEdit.CREATE_UNDO);
+					} catch (BadLocationException e) {
+						exception[0]= e;
+					} finally {
+						completionLock.fDone= true;
+						completionLock.notifyAll();
+					}
+				}
+			}
+		};
+		
+		synchronized (completionLock) {
+			fileBufferManager.execute(runnable);
+			while (! completionLock.fDone) {
+				try {
+					completionLock.wait(500);
+				} catch (InterruptedException x) {
+				}
+			}
+		}
+		
+		if (exception[0] != null) {
+			throw exception[0];
+		}
+		
+		return result[0];
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoableOperation2ChangeAdapter.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoableOperation2ChangeAdapter.java
index 102d2d9..4255355 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoableOperation2ChangeAdapter.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/UndoableOperation2ChangeAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -165,7 +165,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 			fUndoChange= result.reverseChange;
 			fActiveChange= fUndoChange;
 			fExecuteChange= null;
-			return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			throw new ExecutionException(e.getStatus().getMessage(), e);
 		}
@@ -193,7 +193,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 			fRedoChange= result.reverseChange;
 			fActiveChange= fRedoChange;
 			fUndoChange= null;
-			return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			throw new ExecutionException(e.getStatus().getMessage(), e);
 		}
@@ -217,7 +217,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 				// return OK in all other cases. This by passes the dialog shown
 				// in the operation approver and allows refactoring to show its
 				// own dialog again inside the runnable.
-				return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+				return Status.OK_STATUS;
 			}
 		} catch (CoreException e) {
 			throw new ExecutionException(e.getStatus().getMessage(), e);
@@ -246,7 +246,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 			fUndoChange= result.reverseChange;
 			fActiveChange= fUndoChange;
 			fRedoChange= null;
-			return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		} catch (CoreException e) {
 			throw new ExecutionException(e.getStatus().getMessage(), e);
 		}
@@ -270,7 +270,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 				// return OK in all other cases. This by passes the dialog shown
 				// in the operation approver and allows refactoring to show its
 				// own dialog again inside the runnable.
-				return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+				return Status.OK_STATUS;
 			}
 		} catch (CoreException e) {
 			throw new ExecutionException(e.getStatus().getMessage(), e);
@@ -363,7 +363,7 @@ public class UndoableOperation2ChangeAdapter implements IUndoableOperation, IAdv
 
 	private IStatus asStatus(RefactoringStatus status) {
 		if (status.isOK()) {
-			return new Status(IStatus.OK, RefactoringCorePlugin.getPluginId(), IStatus.OK, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		} else {
 			return status.getEntryWithHighestSeverity().toStatus();
 		}
diff --git a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryManager.java b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryManager.java
index f7ba2a0..6b71ea9 100644
--- a/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryManager.java
+++ b/eclipse/plugins/org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/history/RefactoringHistoryManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,11 +35,13 @@ import java.util.Set;
 import java.util.TimeZone;
 import java.util.Map.Entry;
 
+import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
@@ -934,7 +936,9 @@ public final class RefactoringHistoryManager {
 	private Document getCachedDocument(final IPath path, final InputStream input) throws SAXException, IOException, ParserConfigurationException {
 		if (path.equals(fCachedPath) && fCachedDocument != null)
 			return fCachedDocument;
-		final Document document= DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(input));
+		DocumentBuilder parser= DocumentBuilderFactory.newInstance().newDocumentBuilder();
+		parser.setErrorHandler(new DefaultHandler());
+		final Document document= parser.parse(new InputSource(input));
 		fCachedDocument= document;
 		fCachedPath= path;
 		return document;
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/META-INF/MANIFEST.MF
index b95cf4a..ba6838e 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ltk.ui.refactoring; singleton:=true
-Bundle-Version: 3.4.101.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Activator: org.eclipse.ltk.internal.ui.refactoring.RefactoringUIPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringStatusDialog.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringStatusDialog.java
index 36160a1..a2db454 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringStatusDialog.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringStatusDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import org.eclipse.swt.custom.ViewForm;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
@@ -63,19 +62,16 @@ public class RefactoringStatusDialog extends Dialog {
 	}
 
 	protected Control createDialogArea(Composite parent) {
-		Composite result= new Composite(parent, SWT.NONE);
-		initializeDialogUnits(result);
-		GridLayout layout= new GridLayout();
-		result.setLayout(layout);
-		GridData gd= new GridData(GridData.FILL_BOTH);
+		Composite result= (Composite) super.createDialogArea(parent);
+		GridData gd= (GridData) result.getLayoutData();
 		gd.widthHint= 600;
 		gd.heightHint= 400;
-		result.setLayoutData(gd);
+
 		if (!fLightWeight) {
 			Color background= parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND);
 			ViewForm messagePane= new ViewForm(result, SWT.BORDER | SWT.FLAT);
-			messagePane.marginWidth= layout.marginWidth;
-			messagePane.marginHeight= layout.marginHeight;
+			messagePane.marginWidth= 3;
+			messagePane.marginHeight= 3;
 			gd= new GridData(GridData.FILL_HORIZONTAL);
 			// XXX http://bugs.eclipse.org/bugs/show_bug.cgi?id=27572
 			Rectangle rect= messagePane.computeTrim(0, 0, 0, convertHeightInCharsToPixels(2) + messagePane.marginHeight * 2);
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.java
index 7299fb5..165900d 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,8 +68,6 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String DeleteResourcesWizard_label_single_project;
 
-	public static String DeleteResourcesWizard_outOfSync;
-
 	public static String DeleteResourcesWizard_page_title;
 
 	public static String DeleteResourcesWizard_project_deleteContents;
@@ -196,19 +194,13 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String RefactoringHistoryLabelProvider_day_format;
 
-	public static String RefactoringHistoryLabelProvider_label_country;
-
-	public static String RefactoringHistoryLabelProvider_label_language;
-
-	public static String RefactoringHistoryLabelProvider_label_variant;
-
-	public static String RefactoringHistoryLabelProvider_last_month_format;
+	public static String RefactoringHistoryLabelProvider_last_month_format2;
 
 	public static String RefactoringHistoryLabelProvider_last_week_format;
 
-	public static String RefactoringHistoryLabelProvider_month_format;
+	public static String RefactoringHistoryLabelProvider_month_format2;
 
-	public static String RefactoringHistoryLabelProvider_this_month_format;
+	public static String RefactoringHistoryLabelProvider_this_month_format2;
 
 	public static String RefactoringHistoryLabelProvider_this_week_format;
 
@@ -218,8 +210,6 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String RefactoringHistoryMerger_error_auto_merge;
 
-	public static String RefactoringHistoryOverviewPage_description;
-
 	public static String RefactoringHistoryOverviewPage_title;
 
 	public static String RefactoringHistoryPreviewPage_apply_error;
@@ -252,10 +242,6 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String RefactoringHistoryWizard_internal_error_title;
 
-	public static String RefactoringHistoryWizard_no_refactorings_error;
-
-	public static String RefactoringHistoryWizard_no_refactorings_message;
-
 	public static String RefactoringHistoryWizard_one_refactoring_undone;
 
 	public static String RefactoringHistoryWizard_preparing_changes;
@@ -280,17 +266,19 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String RefactoringModelMerger_workspace_caption;
 
+	public static String RefactoringDescriptorDeleteQuery_confirm_deletion_singular;
+
+	public static String RefactoringDescriptorDeleteQuery_confirm_deletion_plural;
+
 	public static String RefactoringPropertyPage_confirm_delete_all_caption;
 
 	public static String RefactoringPropertyPage_confirm_delete_all_pattern;
 
 	public static String RefactoringPropertyPage_confirm_delete_caption;
 
-	public static String RefactoringPropertyPage_confirm_delete_pattern;
+	public static String RefactoringPropertyPage_confirm_delete_pattern_singular;
 
-	public static String RefactoringPropertyPage_edit_caption;
-
-	public static String RefactoringPropertyPage_edit_message;
+	public static String RefactoringPropertyPage_confirm_delete_pattern_plural;
 
 	public static String RefactoringPropertyPage_project_pattern;
 
@@ -354,8 +342,6 @@ public final class RefactoringUIMessages extends NLS {
 
 	public static String ShowRefactoringHistoryControl_delete_label;
 
-	public static String ShowRefactoringHistoryControl_edit_label;
-
 	public static String UndoManagerAction_internal_error_message;
 
 	public static String UndoManagerAction_internal_error_title;
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.properties b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.properties
index 1abd213..e0ab7b6 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.properties
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringUIMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -97,31 +97,25 @@ RefactoringHistoryWizard_several_refactorings_undone=There are {0,number} refact
 RefactoringHistoryWizard_internal_error_description=The following problems occurred while undoing the refactoring.
 RefactoringHistoryWizard_error_instantiate_refactoring=Could not instantiate refactoring ''{0}''
 RefactoringHistoryWizard_preparing_refactoring=Preparing refactoring...
-RefactoringHistoryWizard_no_refactorings_error=A fatal error occurred while preparing refactoring.
 RefactoringHistoryWizard_undo_message_pattern={0}
 RefactoringHistoryWizard_internal_error_title=Error Undoing Refactoring
 RefactoringHistoryWizard_preparing_refactorings=Preparing refactorings...
 RefactoringHistoryWizard_one_refactoring_undone=There is one refactoring which has been performed.
-RefactoringHistoryWizard_no_refactorings_message=There are no refactorings which need to be performed.
 RefactoringHistoryWizard_undo_message_explanation=\n\nCanceling this wizard will undo all refactorings to prevent your workspace from being in an inconsistent state.
 
-## These keys are used to render day names of refactoring histories in the corresponding language (ISO-639)
-## The country, language and variant codes need to be changed to match the final local of the translated property file
-RefactoringHistoryLabelProvider_label_country=US
-RefactoringHistoryLabelProvider_label_language=en
+## These properties are date format patterns for the en_US locale.
+## Do *not* localize the characters. These strings must stay valid com.ibm.icu.text.SimpleDateFormat patterns.
 RefactoringHistoryLabelProvider_this_week_format=w
 RefactoringHistoryLabelProvider_last_week_format=w
-RefactoringHistoryLabelProvider_this_month_format=MMMMM yyyy
-RefactoringHistoryLabelProvider_last_month_format=MMMMM yyyy
-RefactoringHistoryLabelProvider_label_variant=
+RefactoringHistoryLabelProvider_this_month_format2=MMMM yyyy
+RefactoringHistoryLabelProvider_last_month_format2=MMMM yyyy
 RefactoringHistoryLabelProvider_week_format=w
 RefactoringHistoryLabelProvider_year_format=yyyy
-RefactoringHistoryLabelProvider_month_format=MMMMM
+RefactoringHistoryLabelProvider_month_format2=MMMM
 RefactoringHistoryLabelProvider_day_format=EEEE
 ## end
 
 RefactoringHistoryOverviewPage_title=Refactoring
-RefactoringHistoryOverviewPage_description=The following refactorings are going to be performed.
 RefactoringHistoryPreviewPage_description=The following changes are necessary to perform the refactoring.
 RefactoringHistoryPreviewPage_apply_error=The following problems occurred while applying the change.
 RefactoringHistoryPreviewPage_no_changes=No changes to be performed
@@ -177,7 +171,6 @@ RefactoringUI_cannot_execute=The operation cannot be performed due to the follow
 ValidationCheckResultQuery_error_message= The operation cannot be performed due to the following problem:\n\n{0}
 
 ShowRefactoringHistoryControl_delete_label=&Remove
-ShowRefactoringHistoryControl_edit_label=&Edit...
 ShowRefactoringHistoryControl_delete_all_label=Remo&ve All
 
 SelectRefactoringHistoryControl_select_all_label=Select &All
@@ -189,10 +182,11 @@ RefactoringPropertyPage_confirm_delete_all_caption=Confirm History Delete
 RefactoringPropertyPage_confirm_delete_all_pattern=Are you sure you want to delete the refactoring history of project ''{0}''?\n\nNote: This will only delete refactorings exclusively associated with ''{0}''.
 RefactoringPropertyPage_sharing_refactoring_history=Sharing refactoring history...
 RefactoringPropertyPage_confirm_delete_caption=Confirm Refactoring Delete
-RefactoringPropertyPage_confirm_delete_pattern=Are you sure you want to delete {0} refactoring(s) from the refactoring history of project ''{1}''?\n\nNote: This may also affect refactoring histories of other projects.
+RefactoringPropertyPage_confirm_delete_pattern_singular=Are you sure you want to delete the refactoring from the refactoring history of project ''{0}''?\n\nNote: This may also affect refactoring histories of other projects.
+RefactoringPropertyPage_confirm_delete_pattern_plural=Are you sure you want to delete {0} refactorings from the refactoring history of project ''{1}''?\n\nNote: This may also affect refactoring histories of other projects.
+RefactoringDescriptorDeleteQuery_confirm_deletion_singular=Are you sure you want to delete the refactoring from the workspace refactoring history?\n\nNote: This may also affect refactoring histories of projects.
+RefactoringDescriptorDeleteQuery_confirm_deletion_plural=Are you sure you want to delete {0} refactorings from the workspace refactoring history?\n\nNote: This may also affect refactoring histories of projects.
 RefactoringPropertyPage_unsharing_refactoring_history=Unsharing refactoring history...
-RefactoringPropertyPage_edit_caption=Edit Details
-RefactoringPropertyPage_edit_message=Details of refactoring ''{0}'':
 RenameResourceHandler_title=Rename Resource
 RenameResourceWizard_name_field_label=New na&me:
 RenameResourceWizard_page_title=Rename Resource
@@ -209,7 +203,6 @@ DeleteResourcesWizard_label_single_linked=Are you sure you want to delete linked
 DeleteResourcesWizard_label_multi_projects=Are you sure you want to remove these {0} projects from the workspace?
 DeleteResourcesWizard_label_single_project=Are you sure you want to remove project ''{0}'' from the workspace?
 
-DeleteResourcesWizard_outOfSync=Delete out of sync files
 DeleteResourcesWizard_page_title=Delete Resources
 DeleteResourcesWizard_project_deleteContents=&Delete project contents on disk (cannot be undone)
 DeleteResourcesWizard_window_title=Delete Resources
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringWizardDialog2.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringWizardDialog2.java
index 41d6913..1cb771d 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringWizardDialog2.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringWizardDialog2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -199,7 +199,7 @@ public class RefactoringWizardDialog2 extends Dialog implements IWizardContainer
 
 	private void saveSize() {
 		if (fCurrentPage instanceof PreviewWizardPage) {
-			Control control= fCurrentPage.getControl().getParent();
+			Control control= fPageContainer.getTopPage();
 			Point size = control.getSize();
 			fSettings.put(WIDTH, size.x);
 			fSettings.put(HEIGHT, size.y);
@@ -357,12 +357,13 @@ public class RefactoringWizardDialog2 extends Dialog implements IWizardContainer
 			boolean hasProgressMonitor= fProgressMonitorPart != null;
 
 			// Deactivate shell
-			savedState= saveUIState(hasProgressMonitor && cancelable);
+			savedState= saveUIState(false);
 			if (focusControl != null)
 				savedState.put("focus", focusControl); //$NON-NLS-1$
 
 			if (hasProgressMonitor) {
-				fProgressMonitorPart.attachToCancelComponent(cancelButton);
+				if (cancelable)
+					fProgressMonitorPart.attachToCancelComponent(cancelButton);
 				fStatusContainer.showPage(fProgressMonitorPart);
 			}
 			// Update the status container since we are blocking the event loop right now.
@@ -642,7 +643,7 @@ public class RefactoringWizardDialog2 extends Dialog implements IWizardContainer
 		GridLayout pmlayout= new GridLayout();
 		pmlayout.numColumns= 1;
 		pmlayout.marginHeight= 0;
-		fProgressMonitorPart= new ProgressMonitorPart(fStatusContainer, pmlayout);
+		fProgressMonitorPart= new ProgressMonitorPart(fStatusContainer, pmlayout, true);
 	}
 
 	private void createMessageBox() {
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/history/RefactoringDescriptorDeleteQuery.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/history/RefactoringDescriptorDeleteQuery.java
index 62f8901..6a1b21c 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/history/RefactoringDescriptorDeleteQuery.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/history/RefactoringDescriptorDeleteQuery.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,6 @@ import org.eclipse.ltk.internal.ui.refactoring.BasicElementLabels;
 import org.eclipse.ltk.internal.ui.refactoring.Messages;
 import org.eclipse.ltk.internal.ui.refactoring.RefactoringUIMessages;
 import org.eclipse.ltk.internal.ui.refactoring.RefactoringUIPlugin;
-import org.eclipse.ltk.internal.ui.refactoring.scripting.ScriptingMessages;
 
 /**
  * Default implementation of a refactoring descriptor delete query.
@@ -92,10 +91,21 @@ public final class RefactoringDescriptorDeleteQuery implements IRefactoringDescr
 						if (!fShell.isDisposed()) {
 							final String count= new Integer(fCount).toString();
 							String message= null;
-							if (fProject != null)
-								message= Messages.format(RefactoringUIMessages.RefactoringPropertyPage_confirm_delete_pattern, new String[] { count, BasicElementLabels.getResourceName(fProject)});
-							else
-								message= Messages.format(ScriptingMessages.ShowRefactoringHistoryWizard_confirm_deletion, count);
+							if (fProject != null) {
+								if (fCount == 1) {
+									message= Messages.format(RefactoringUIMessages.RefactoringPropertyPage_confirm_delete_pattern_singular, BasicElementLabels.getResourceName(fProject));
+								} else {
+									message= Messages.format(RefactoringUIMessages.RefactoringPropertyPage_confirm_delete_pattern_plural, new String[] { count,
+											BasicElementLabels.getResourceName(fProject) });
+								}
+							}
+							else {
+								if (fCount == 1) {
+									message= RefactoringUIMessages.RefactoringDescriptorDeleteQuery_confirm_deletion_singular;
+								} else {
+									message= Messages.format(RefactoringUIMessages.RefactoringDescriptorDeleteQuery_confirm_deletion_plural, count);
+								}
+							}
 							final MessageDialogWithToggle dialog= MessageDialogWithToggle.openYesNoQuestion(fShell, RefactoringUIMessages.RefactoringPropertyPage_confirm_delete_caption, message, RefactoringUIMessages.RefactoringHistoryWizard_do_not_show_message, store.getBoolean(PREFERENCE_DO_NOT_WARN_DELETE), null, null);
 							store.setValue(PREFERENCE_DO_NOT_WARN_DELETE, dialog.getToggleState());
 							fReturnCode= dialog.getReturnCode();
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.java
index fccc25f..b39d99b 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,8 +86,6 @@ public final class ScriptingMessages extends NLS {
 
 	public static String ShowRefactoringHistoryWizard_caption;
 
-	public static String ShowRefactoringHistoryWizard_confirm_deletion;
-
 	public static String ShowRefactoringHistoryWizard_description;
 
 	public static String ShowRefactoringHistoryWizard_title;
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.properties b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.properties
index 260a33d..14ac568 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.properties
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/scripting/ScriptingMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
+# Copyright (c) 2005, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -52,4 +52,3 @@ ShowRefactoringHistoryWizard_title=Refactoring
 ShowRefactoringHistoryWizard_caption=Refactoring History
 ShowRefactoringHistoryWizard_description=Browse and edit the workspace refactoring history.
 ShowRefactoringHistoryWizard_workspace_caption=Refactoring history of workspace:
-ShowRefactoringHistoryWizard_confirm_deletion=Are you sure you want to delete {0} refactoring(s) from the workspace refactoring history?\n\nNote: This may also affect refactoring histories of projects.
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/util/Strings.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/util/Strings.java
index f94cc13..35dc73e 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/util/Strings.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/util/Strings.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,11 @@
  *******************************************************************************/
 package org.eclipse.ltk.internal.ui.refactoring.util;
 
+
 /**
  * Utility class for string-related functions.
+ * 
+ * @since 3.0
  */
 public final class Strings {
 
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizard.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizard.java
index 98b169b..8b7a883 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizard.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -157,6 +157,8 @@ public abstract class RefactoringWizard extends Wizard {
 	private boolean fForcePreviewReview;
 	private boolean fPreviewShown;
 
+	private IRunnableContext fRunnableContext;
+
 	/**
 	 * Creates a new refactoring wizard for the given refactoring.
 	 *
@@ -398,11 +400,25 @@ public abstract class RefactoringWizard extends Wizard {
 		if (hasUserInput())
 			return super.getStartingPage();
 
+		IRunnableContext context= fRunnableContext != null ? fRunnableContext : PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 		/*
 		 * XXX: Can return null if there's no user input page and change creation has been cancelled.
-		 * The only way to avoid this would be setChangeCreationCancelable(true).
+		 * The only way to avoid this would be setChangeCreationCancelable(false).
 		 */
-		return computeUserInputSuccessorPage(null, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+		return computeUserInputSuccessorPage(null, context);
+	}
+
+	/**
+	 * Sets the runnable context that will be used to computing refactoring conditions and change
+	 * while the refactoring dialog is not yet shown. The default is to use the active workbench
+	 * window.
+	 * 
+	 * @param context a runnable context, or <code>null</code> to re-set the default
+	 * 
+	 * @since 3.5
+	 */
+	public void setInitialComputationContext(IRunnableContext context) {
+		fRunnableContext= context;
 	}
 
 	/**
@@ -616,6 +632,15 @@ public abstract class RefactoringWizard extends Wizard {
 
 	//---- Re-implementation of Wizard methods --------------------------------------------
 
+	/**
+	 * Calls {@link RefactoringWizardPage#performFinish()} on the currently active wizard page.
+	 * Clients are not expected to extend this method to do lengthy processing
+	 * (the {@link Refactoring} class should implement analysis and {@link Change} creation).
+     *
+     * @return <code>true</code> to indicate the finish request
+     *   was accepted, and <code>false</code> to indicate
+     *   that the finish request was refused
+	 */
 	public boolean performFinish() {
 		RefactoringWizardPage page= (RefactoringWizardPage)getContainer().getCurrentPage();
 		return page.performFinish();
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizardOpenOperation.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizardOpenOperation.java
index 33f6d4f..4401e42 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizardOpenOperation.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/RefactoringWizardOpenOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.IWizardContainer;
 
@@ -111,6 +112,42 @@ public class RefactoringWizardOpenOperation {
 	 *  the user.
 	 */
 	public int run(final Shell parent, final String dialogTitle) throws InterruptedException {
+		return run(parent, dialogTitle, null);
+	}
+	
+	/**
+	 * Opens the refactoring dialog for the refactoring wizard passed to the constructor.
+	 * The method first checks the initial conditions of the refactoring. If the condition
+	 * checking returns a status with a severity of {@link RefactoringStatus#FATAL} then
+	 * a message dialog is opened containing the corresponding status message. No wizard
+	 * dialog is opened in this situation. If the condition checking passes then the
+	 * refactoring dialog is opened.
+	 * <p>
+	 * The methods ensures that the workspace lock is held while the condition checking,
+	 * change creation and change execution is performed. Clients can't make any assumption
+	 * about the thread in which these steps are executed. However the framework ensures
+	 * that the workspace lock is transfered to the thread in which the execution of the
+	 * steps takes place.
+	 * </p>
+	 * @param parent the parent shell for the dialog or <code>null</code> if the dialog
+	 *  is a top level dialog
+	 * @param dialogTitle the dialog title of the message box presenting the failed
+	 *  condition check (if any)
+	 * @param context the runnable context to use for conditions checking before the
+	 *  refactoring wizard dialog is visible. If <code>null</code>, the workbench window's
+	 *  progress service is used.  
+	 *
+	 * @return {@link #INITIAL_CONDITION_CHECKING_FAILED} if the initial condition checking
+	 *  failed and no wizard dialog was presented. Otherwise either {@link IDialogConstants#OK_ID}
+	 *  or {@link IDialogConstants#CANCEL_ID} is returned depending on whether the user
+	 *  has pressed the OK or cancel button on the wizard dialog.
+	 *
+	 * @throws InterruptedException if the initial condition checking got canceled by
+	 *  the user.
+	 *  
+	 * @since 3.5
+	 */
+	public int run(final Shell parent, final String dialogTitle, final IRunnableContext context) throws InterruptedException {
 		Assert.isNotNull(dialogTitle);
 		final Refactoring refactoring= fWizard.getRefactoring();
 		final IJobManager manager= Job.getJobManager();
@@ -123,7 +160,7 @@ public class RefactoringWizardOpenOperation {
 					manager.beginRule(ResourcesPlugin.getWorkspace().getRoot(), null);
 
 					refactoring.setValidationContext(parent);
-					fInitialConditions= checkInitialConditions(refactoring, parent, dialogTitle);
+					fInitialConditions= checkInitialConditions(refactoring, parent, dialogTitle, context);
 					if (fInitialConditions.hasFatalError()) {
 						String message= fInitialConditions.getMessageMatchingSeverity(RefactoringStatus.FATAL);
 						MessageDialog.openInformation(parent, dialogTitle, message);
@@ -160,11 +197,17 @@ public class RefactoringWizardOpenOperation {
 
 	//---- private helper methods -----------------------------------------------------------------
 
-	private RefactoringStatus checkInitialConditions(Refactoring refactoring, Shell parent, String title) throws InterruptedException {
+	private RefactoringStatus checkInitialConditions(Refactoring refactoring, Shell parent, String title, IRunnableContext context) throws InterruptedException {
 		try {
 			CheckConditionsOperation cco= new CheckConditionsOperation(refactoring, CheckConditionsOperation.INITIAL_CONDITONS);
-			IProgressService service= PlatformUI.getWorkbench().getProgressService();
-			service.busyCursorWhile(new WorkbenchRunnableAdapter(cco, ResourcesPlugin.getWorkspace().getRoot()));
+			WorkbenchRunnableAdapter workbenchRunnableAdapter= new WorkbenchRunnableAdapter(cco, ResourcesPlugin.getWorkspace().getRoot());
+			if (context == null) {
+				PlatformUI.getWorkbench().getProgressService().busyCursorWhile(workbenchRunnableAdapter);
+			} else if (context instanceof IProgressService) {
+				((IProgressService) context).busyCursorWhile(workbenchRunnableAdapter);
+			} else {
+				context.run(true, true, workbenchRunnableAdapter);
+			}
 			return cco.getStatus();
 		} catch (InvocationTargetException e) {
 			ExceptionHandler.handle(e, parent, title,
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/history/RefactoringHistoryLabelProvider.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/history/RefactoringHistoryLabelProvider.java
index 11fff18..dbf7345 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/history/RefactoringHistoryLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/history/RefactoringHistoryLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.ltk.ui.refactoring.history;
 
 import java.text.Format;
 import java.util.Date;
-import java.util.Locale;
 
 import com.ibm.icu.text.DateFormat;
 import com.ibm.icu.text.SimpleDateFormat;
@@ -65,9 +64,6 @@ public class RefactoringHistoryLabelProvider extends LabelProvider {
 	/** The control configuration to use */
 	private final RefactoringHistoryControlConfiguration fControlConfiguration;
 
-	/** The current locale to use */
-	private final Locale fCurrentLocale;
-
 	/** The cached date format, or <code>null</code> */
 	private DateFormat fDateFormat= null;
 
@@ -96,7 +92,6 @@ public class RefactoringHistoryLabelProvider extends LabelProvider {
 		fContainerImage= RefactoringPluginImages.DESC_OBJS_REFACTORING_DATE.createImage();
 		fElementImage= RefactoringPluginImages.DESC_OBJS_REFACTORING_TIME.createImage();
 		fCollectionImage= RefactoringPluginImages.DESC_OBJS_REFACTORING_COLL.createImage();
-		fCurrentLocale= new Locale(RefactoringUIMessages.RefactoringHistoryLabelProvider_label_language, RefactoringUIMessages.RefactoringHistoryLabelProvider_label_country, RefactoringUIMessages.RefactoringHistoryLabelProvider_label_variant);
 	}
 
 	/**
@@ -221,48 +216,48 @@ public class RefactoringHistoryLabelProvider extends LabelProvider {
 						switch (kind) {
 							case RefactoringHistoryNode.THIS_WEEK:
 								pattern= fControlConfiguration.getThisWeekPattern();
-								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_this_week_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_this_week_format);
 								break;
 							case RefactoringHistoryNode.LAST_WEEK:
 								pattern= fControlConfiguration.getLastWeekPattern();
-								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_last_week_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_last_week_format);
 								break;
 							case RefactoringHistoryNode.WEEK:
 								pattern= fControlConfiguration.getWeekPattern();
-								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_week_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_week_format);
 								break;
 							case RefactoringHistoryNode.YEAR:
 								pattern= fControlConfiguration.getYearPattern();
-								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_year_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_year_format);
 								break;
 							case RefactoringHistoryNode.THIS_MONTH:
 								pattern= fControlConfiguration.getThisMonthPattern();
-								format= new java.text.SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_this_month_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_this_month_format2);
 								break;
 							case RefactoringHistoryNode.LAST_MONTH:
 								pattern= fControlConfiguration.getLastMonthPattern();
-								format= new java.text.SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_last_month_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_last_month_format2);
 								break;
 							case RefactoringHistoryNode.MONTH:
 								pattern= fControlConfiguration.getMonthPattern();
-								format= new java.text.SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_month_format, fCurrentLocale);
+								format= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_month_format2);
 								break;
 							case RefactoringHistoryNode.DAY:
 								pattern= fControlConfiguration.getDayPattern();
 								final int type= node.getParent().getKind();
 								if (type == RefactoringHistoryNode.THIS_WEEK || type == RefactoringHistoryNode.LAST_WEEK) {
-									final SimpleDateFormat simple= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_day_format, fCurrentLocale);
+									final SimpleDateFormat simple= new SimpleDateFormat(RefactoringUIMessages.RefactoringHistoryLabelProvider_day_format);
 									buffer.append(Messages.format(RefactoringUIMessages.RefactoringHistoryControlConfiguration_day_detailed_pattern, new String[] { simple.format(stamp), DateFormat.getDateInstance().format(stamp)}));
 								} else
-									format= DateFormat.getDateInstance();
+									format= DateFormat.getDateInstance(DateFormat.DEFAULT);
 								break;
 							case RefactoringHistoryNode.YESTERDAY:
 								pattern= fControlConfiguration.getYesterdayPattern();
-								format= DateFormat.getDateInstance();
+								format= DateFormat.getDateInstance(DateFormat.DEFAULT);
 								break;
 							case RefactoringHistoryNode.TODAY:
 								pattern= fControlConfiguration.getTodayPattern();
-								format= DateFormat.getDateInstance();
+								format= DateFormat.getDateInstance(DateFormat.DEFAULT);
 								break;
 						}
 						if (format != null)
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/model/AbstractResourceMappingMerger.java b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/model/AbstractResourceMappingMerger.java
index b553101..45d7d22 100644
--- a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/model/AbstractResourceMappingMerger.java
+++ b/eclipse/plugins/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/ui/refactoring/model/AbstractResourceMappingMerger.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,6 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 
-import org.eclipse.ltk.core.refactoring.RefactoringCore;
 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy;
 import org.eclipse.ltk.core.refactoring.history.RefactoringHistory;
@@ -248,7 +247,7 @@ public abstract class AbstractResourceMappingMerger extends ResourceMappingMerge
 		} finally {
 			monitor.done();
 		}
-		return new Status(IStatus.OK, RefactoringCore.ID_PLUGIN, 0, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
@@ -408,7 +407,7 @@ public abstract class AbstractResourceMappingMerger extends ResourceMappingMerge
 	 */
 	public IStatus merge(final IMergeContext context, IProgressMonitor monitor) throws CoreException {
 		Assert.isNotNull(context);
-		IStatus status= new Status(IStatus.OK, RefactoringCore.ID_PLUGIN, 0, "", null); //$NON-NLS-1$
+		IStatus status= Status.OK_STATUS;
 		if (monitor == null)
 			monitor= new NullProgressMonitor();
 		try {
@@ -449,7 +448,7 @@ public abstract class AbstractResourceMappingMerger extends ResourceMappingMerge
 		Assert.isNotNull(monitor);
 		try {
 			monitor.beginTask(RefactoringUIMessages.RefactoringModelMerger_merge_message, 1);
-			return new Status(IStatus.OK, RefactoringCore.ID_PLUGIN, 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		} finally {
 			monitor.done();
 		}
diff --git a/eclipse/plugins/org.eclipse.osgi.services/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.osgi.services/META-INF/MANIFEST.MF
index 071042a..e8090ec 100644
--- a/eclipse/plugins/org.eclipse.osgi.services/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.osgi.services/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %osgiServices
 Bundle-SymbolicName: org.eclipse.osgi.services
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
 Bundle-Description: %osgiServicesDes
 Bundle-Localization: plugin
 Bundle-Vendor: %eclipse.org
@@ -22,6 +22,18 @@ Export-Package: org.osgi.service.cm; version="1.2.1",
  org.osgi.service.useradmin; version="1.1",
  org.osgi.service.wireadmin; version="1.0"
 Import-Package: org.osgi.framework; version=1.2,
+ org.osgi.service.cm; version="[1.2.1, 1.3)",
+ org.osgi.service.component; version="[1.1, 1.2)",
+ org.osgi.service.device; version="[1.1, 1.2)",
+ org.osgi.service.event; version="[1.2, 1.3)",
+ org.osgi.service.http; version="[1.2.1, 1.3)",
+ org.osgi.service.io; version="[1.0, 1.1)",
+ org.osgi.service.log; version="[1.3, 1.4)",
+ org.osgi.service.metatype; version="[1.1, 1.2)",
+ org.osgi.service.provisioning; version="[1.2, 1.3)",
+ org.osgi.service.upnp; version="[1.1, 1.2)",
+ org.osgi.service.useradmin; version="[1.1, 1.2)",
+ org.osgi.service.wireadmin; version="[1.0, 1.1)",
  javax.servlet; resolution:="optional",
  javax.servlet.http; resolution:="optional"
 DynamicImport-Package: javax.servlet,
diff --git a/eclipse/plugins/org.eclipse.osgi.util/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.osgi.util/META-INF/MANIFEST.MF
index 3e1c9be..e8a692a 100644
--- a/eclipse/plugins/org.eclipse.osgi.util/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.osgi.util/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %osgiUtil
 Bundle-SymbolicName: org.eclipse.osgi.util
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
 Bundle-Description: %osgiUtilDes
 Bundle-Vendor: %eclipse.org
 Bundle-Localization: plugin
@@ -13,7 +13,10 @@ Export-Package: org.osgi.util.measurement; version="1.0.1",
  org.osgi.util.position; version="1.0.1",
  org.osgi.util.xml; version="1.0.1"
 Import-Package: org.osgi.framework; version=1.1,
- javax.xml.parsers; resolution:=optional
+ javax.xml.parsers; resolution:=optional,
+ org.osgi.util.measurement; version="[1.0.1, 1.2)",
+ org.osgi.util.position; version="[1.0.1, 1.2)",
+ org.osgi.util.xml; version="[1.0.1, 1.2)"
 Bundle-RequiredExecutionEnvironment: OSGi/Minimum-1.2,
  CDC-1.1/Foundation-1.1,
  J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.osgi/.options b/eclipse/plugins/org.eclipse.osgi/.options
index c79a025..4fb0632 100644
--- a/eclipse/plugins/org.eclipse.osgi/.options
+++ b/eclipse/plugins/org.eclipse.osgi/.options
@@ -22,10 +22,15 @@ org.eclipse.osgi/debug/packageadmin=false
 org.eclipse.osgi/debug/bundleTime=false
 # Debug the loading of message bundles
 org.eclipse.osgi/debug/messageBundles=false
+# Debug the object pool additions
+org.eclipse.osgi/debug/objectPool/adds=false
+# Debug the object pool duplications
+org.eclipse.osgi/debug/objectPool/dups=false
 
 # Eclipse adaptor options
 org.eclipse.osgi/eclipseadaptor/debug = false
 org.eclipse.osgi/eclipseadaptor/debug/location = false
+org.eclipse.osgi/eclipseadaptor/debug/cachedmanifest = false
 org.eclipse.osgi/eclipseadaptor/debug/platformadmin=false
 org.eclipse.osgi/eclipseadaptor/debug/platformadmin/resolver=false
 org.eclipse.osgi/eclipseadaptor/converter/debug = false
diff --git a/eclipse/plugins/org.eclipse.osgi/.settings/.api_filters b/eclipse/plugins/org.eclipse.osgi/.settings/.api_filters
index 1231aab..a6308bc 100644
--- a/eclipse/plugins/org.eclipse.osgi/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.osgi/.settings/.api_filters
@@ -1,681 +1,683 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.osgi" version="2">
-<resource path="osgi/src/org/osgi/util/tracker/BundleTrackerCustomizer.java" type="org.osgi.util.tracker.BundleTrackerCustomizer">
-<filter id="1108344834">
-<message_arguments>
-<message_argument value="1.4"/>
-<message_argument value="3.5"/>
-<message_argument value="org.osgi.util.tracker.BundleTrackerCustomizer"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/Bundle.java" type="org.osgi.framework.Bundle">
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="getSignerCertificates(int)"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Bundle"/>
-<message_argument value="SIGNERS_TRUSTED"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Bundle"/>
-<message_argument value="SIGNERS_ALL"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="SIGNERS_TRUSTED"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.framework.Bundle"/>
-<message_argument value="getSignerCertificates(int)"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.framework.Bundle"/>
-<message_argument value="getVersion()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="SIGNERS_ALL"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="getVersion()"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/ServiceException.java" type="org.osgi.framework.ServiceException">
-<filter id="1108344834">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="org.osgi.framework.ServiceException"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/PackagePermission.java" type="org.osgi.framework.PackagePermission">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="PackagePermission(String, Bundle, String)"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="EXPORTONLY"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/ServicePermission.java" type="org.osgi.framework.ServicePermission">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="ServicePermission(ServiceReference, String)"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/ServiceEvent.java" type="org.osgi.framework.ServiceEvent">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="MODIFIED_ENDMATCH"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionUpdate.java" type="org.osgi.service.condpermadmin.ConditionalPermissionUpdate">
-<filter id="1108344834">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionUpdate"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/hooks/service/ListenerHook.java" type="org.osgi.framework.hooks.service.ListenerHook">
-<filter id="1110441988">
-<message_arguments>
-<message_argument value="org.osgi.framework.hooks.service.ListenerHook"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.java" type="org.osgi.service.condpermadmin.ConditionalPermissionAdmin">
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
-<message_argument value="newConditionalPermissionUpdate()"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
-<message_argument value="newConditionalPermissionInfo(String, ConditionInfo[], PermissionInfo[], String)"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="newConditionalPermissionUpdate()"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
-<message_argument value="newConditionalPermissionInfo(String)"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="newConditionalPermissionInfo(String, ConditionInfo[], PermissionInfo[], String)"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="newConditionalPermissionInfo(String)"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/BundleReference.java" type="org.osgi.framework.BundleReference">
-<filter id="1108344834">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="org.osgi.framework.BundleReference"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/Constants.java" type="org.osgi.framework.Constants">
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_LIBRARY_EXTENSIONS"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_FRAMEWORK"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_SECURITY"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_STORAGE"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_TRUST_REPOSITORIES"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_SECURITY_OSGI"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_EXT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_SECURITY_OSGI"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="SERVICE_TYPE"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_SYSTEMPACKAGES_EXTRA"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BEGINNING_STARTLEVEL"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_FRAMEWORK"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_APP"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_TRUST_REPOSITORIES"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_SECURITY"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_STORAGE"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="SERVICE_TYPE"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BEGINNING_STARTLEVEL"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_APP"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_EXECPERMISSION"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_LIBRARY_EXTENSIONS"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_STORAGE_CLEAN"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_BOOT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_SYSTEMPACKAGES_EXTRA"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_WINDOWSYSTEM"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_BOOT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_STORAGE_CLEAN"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_EXECPERMISSION"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="FRAMEWORK_BUNDLE_PARENT_EXT"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.framework.Constants"/>
-<message_argument value="FRAMEWORK_WINDOWSYSTEM"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java" type="org.eclipse.osgi.service.debug.DebugOptions">
-<filter id="403853384">
-<message_arguments>
-<message_argument value="org.eclipse.osgi.service.debug.DebugOptions"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/util/tracker/BundleTracker.java" type="org.osgi.util.tracker.BundleTracker">
-<filter id="1108344834">
-<message_arguments>
-<message_argument value="1.4"/>
-<message_argument value="3.5"/>
-<message_argument value="org.osgi.util.tracker.BundleTracker"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/FrameworkEvent.java" type="org.osgi.framework.FrameworkEvent">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="WAIT_TIMEDOUT"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="STOPPED"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="STOPPED_BOOTCLASSPATH_MODIFIED"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="STOPPED_UPDATE"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/hooks/service/FindHook.java" type="org.osgi.framework.hooks.service.FindHook">
-<filter id="1110441988">
-<message_arguments>
-<message_argument value="org.osgi.framework.hooks.service.FindHook"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/hooks/service/EventHook.java" type="org.osgi.framework.hooks.service.EventHook">
-<filter id="1110441988">
-<message_arguments>
-<message_argument value="org.osgi.framework.hooks.service.EventHook"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionInfo.java" type="org.osgi.service.condpermadmin.ConditionalPermissionInfo">
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="equals(Object)"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="toString()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="getAccessDecision()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="DENY"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="getEncoded()"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="equals(Object)"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="hashCode()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="getEncoded()"/>
-</message_arguments>
-</filter>
-<filter id="403804204">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="getAccessDecision()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="ALLOW"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="DENY"/>
-</message_arguments>
-</filter>
-<filter id="403767336">
-<message_arguments>
-<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
-<message_argument value="ALLOW"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="hashCode()"/>
-</message_arguments>
-</filter>
-<filter id="1209008130">
-<message_arguments>
-<message_argument value="1.1"/>
-<message_argument value="3.5"/>
-<message_argument value="toString()"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/BundleException.java" type="org.osgi.framework.BundleException">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="DUPLICATE_BUNDLE_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="STATECHANGE_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="NATIVECODE_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="SECURITY_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="UNSUPPORTED_OPERATION"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="INVALID_OPERATION"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="MANIFEST_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="BundleException(String, int)"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="RESOLVE_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="ACTIVATOR_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="START_TRANSIENT_ERROR"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="getType()"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="BundleException(String, int, Throwable)"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="UNSPECIFIED"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/launch/Framework.java" type="org.osgi.framework.launch.Framework">
-<filter id="1110441988">
-<message_arguments>
-<message_argument value="org.osgi.framework.launch.Framework"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/FrameworkUtil.java" type="org.osgi.framework.FrameworkUtil">
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="matchDistinguishedNameChain(String, List)"/>
-</message_arguments>
-</filter>
-<filter id="1141899266">
-<message_arguments>
-<message_argument value="1.5"/>
-<message_argument value="3.5"/>
-<message_argument value="getBundle(Class)"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="osgi/src/org/osgi/framework/launch/FrameworkFactory.java" type="org.osgi.framework.launch.FrameworkFactory">
-<filter id="1110441988">
-<message_arguments>
-<message_argument value="org.osgi.framework.launch.FrameworkFactory"/>
-</message_arguments>
-</filter>
-</resource>
-</component>
+<?xml version="1.0" encoding="UTF-8"?>
+<component id="org.eclipse.osgi" version="2">
+<resource path="osgi/src/org/osgi/framework/Bundle.java" type="org.osgi.framework.Bundle">
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Bundle"/>
+<message_argument value="SIGNERS_TRUSTED"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Bundle"/>
+<message_argument value="SIGNERS_ALL"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.framework.Bundle"/>
+<message_argument value="getVersion()"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.framework.Bundle"/>
+<message_argument value="getSignerCertificates(int)"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="getSignerCertificates(int)"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="SIGNERS_TRUSTED"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="SIGNERS_ALL"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="getVersion()"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/BundleException.java" type="org.osgi.framework.BundleException">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="DUPLICATE_BUNDLE_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="STATECHANGE_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="NATIVECODE_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="SECURITY_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="UNSUPPORTED_OPERATION"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="INVALID_OPERATION"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="MANIFEST_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="BundleException(String, int)"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="RESOLVE_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="ACTIVATOR_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="START_TRANSIENT_ERROR"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="getType()"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="BundleException(String, int, Throwable)"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="UNSPECIFIED"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/BundleReference.java" type="org.osgi.framework.BundleReference">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="org.osgi.framework.BundleReference"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/Constants.java" type="org.osgi.framework.Constants">
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_LIBRARY_EXTENSIONS"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_SECURITY"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_TRUST_REPOSITORIES"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_EXT"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_SECURITY_OSGI"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_FRAMEWORK"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_STORAGE"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="SERVICE_TYPE"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_APP"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BEGINNING_STARTLEVEL"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_SYSTEMPACKAGES_EXTRA"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_BOOT"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_STORAGE_CLEAN"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_EXECPERMISSION"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.framework.Constants"/>
+<message_argument value="FRAMEWORK_WINDOWSYSTEM"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_FRAMEWORK"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_STORAGE"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_SECURITY_OSGI"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_SYSTEMPACKAGES_EXTRA"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="SERVICE_TYPE"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BEGINNING_STARTLEVEL"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_TRUST_REPOSITORIES"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_SECURITY"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_APP"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_EXECPERMISSION"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_LIBRARY_EXTENSIONS"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_STORAGE_CLEAN"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_BOOT"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_WINDOWSYSTEM"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="FRAMEWORK_BUNDLE_PARENT_EXT"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/FrameworkEvent.java" type="org.osgi.framework.FrameworkEvent">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="WAIT_TIMEDOUT"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="STOPPED"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="STOPPED_BOOTCLASSPATH_MODIFIED"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="STOPPED_UPDATE"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/FrameworkUtil.java" type="org.osgi.framework.FrameworkUtil">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="matchDistinguishedNameChain(String, List)"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="getBundle(Class)"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/PackagePermission.java" type="org.osgi.framework.PackagePermission">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="PackagePermission(String, Bundle, String)"/>
+</message_arguments>
+</filter>
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="EXPORTONLY"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/ServiceEvent.java" type="org.osgi.framework.ServiceEvent">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="MODIFIED_ENDMATCH"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/ServiceException.java" type="org.osgi.framework.ServiceException">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="org.osgi.framework.ServiceException"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/ServicePermission.java" type="org.osgi.framework.ServicePermission">
+<filter id="1141899266">
+<message_arguments>
+<message_argument value="1.5"/>
+<message_argument value="3.5"/>
+<message_argument value="ServicePermission(ServiceReference, String)"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/hooks/service/EventHook.java" type="org.osgi.framework.hooks.service.EventHook">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.osgi.framework.hooks.service.EventHook"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/hooks/service/FindHook.java" type="org.osgi.framework.hooks.service.FindHook">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.osgi.framework.hooks.service.FindHook"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/hooks/service/ListenerHook.java" type="org.osgi.framework.hooks.service.ListenerHook">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.osgi.framework.hooks.service.ListenerHook"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/launch/Framework.java" type="org.osgi.framework.launch.Framework">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.osgi.framework.launch.Framework"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/framework/launch/FrameworkFactory.java" type="org.osgi.framework.launch.FrameworkFactory">
+<filter id="1110441988">
+<message_arguments>
+<message_argument value="org.osgi.framework.launch.FrameworkFactory"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.java" type="org.osgi.service.condpermadmin.ConditionalPermissionAdmin">
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
+<message_argument value="newConditionalPermissionUpdate()"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
+<message_argument value="newConditionalPermissionInfo(String, ConditionInfo[], PermissionInfo[], String)"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionAdmin"/>
+<message_argument value="newConditionalPermissionInfo(String)"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="newConditionalPermissionUpdate()"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="newConditionalPermissionInfo(String, ConditionInfo[], PermissionInfo[], String)"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="newConditionalPermissionInfo(String)"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionInfo.java" type="org.osgi.service.condpermadmin.ConditionalPermissionInfo">
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="DENY"/>
+</message_arguments>
+</filter>
+<filter id="403767336">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="ALLOW"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="toString()"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="getEncoded()"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="equals(Object)"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="hashCode()"/>
+</message_arguments>
+</filter>
+<filter id="403804204">
+<message_arguments>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionInfo"/>
+<message_argument value="getAccessDecision()"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="equals(Object)"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="getAccessDecision()"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="DENY"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="getEncoded()"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="ALLOW"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="hashCode()"/>
+</message_arguments>
+</filter>
+<filter id="1209008130">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="toString()"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/service/condpermadmin/ConditionalPermissionUpdate.java" type="org.osgi.service.condpermadmin.ConditionalPermissionUpdate">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.5"/>
+<message_argument value="org.osgi.service.condpermadmin.ConditionalPermissionUpdate"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/util/tracker/BundleTracker.java" type="org.osgi.util.tracker.BundleTracker">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.4"/>
+<message_argument value="3.5"/>
+<message_argument value="org.osgi.util.tracker.BundleTracker"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="osgi/src/org/osgi/util/tracker/BundleTrackerCustomizer.java" type="org.osgi.util.tracker.BundleTrackerCustomizer">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.4"/>
+<message_argument value="3.5"/>
+<message_argument value="org.osgi.util.tracker.BundleTrackerCustomizer"/>
+</message_arguments>
+</filter>
+</resource>
+<resource path="supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java" type="org.eclipse.osgi.service.localization.LocaleProvider">
+<filter id="1108344834">
+<message_arguments>
+<message_argument value="1.1"/>
+<message_argument value="3.6"/>
+<message_argument value="org.eclipse.osgi.service.localization.LocaleProvider"/>
+</message_arguments>
+</filter>
+</resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs
index 1f488fa..5a56c43 100644
--- a/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,9 @@
-#Tue Feb 24 16:31:16 CST 2009
+#Mon May 03 08:45:46 CDT 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
 org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
 org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.circularClasspath=error
 org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
@@ -37,8 +38,11 @@ org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
@@ -46,10 +50,12 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
 org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -65,6 +71,7 @@ org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
@@ -81,6 +88,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverridin
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
diff --git a/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.launching.prefs b/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..7754db2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,3 @@
+#Mon May 03 08:45:46 CDT 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/eclipse/plugins/org.eclipse.osgi/JavaSE-1.7.profile b/eclipse/plugins/org.eclipse.osgi/JavaSE-1.7.profile
new file mode 100644
index 0000000..192b46e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/JavaSE-1.7.profile
@@ -0,0 +1,198 @@
+###############################################################################
+# Copyright (c) 2009, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+org.osgi.framework.system.packages = \
+ javax.accessibility,\
+ javax.activation,\
+ javax.activity,\
+ javax.annotation,\
+ javax.annotation.processing,\
+ javax.crypto,\
+ javax.crypto.interfaces,\
+ javax.crypto.spec,\
+ javax.imageio,\
+ javax.imageio.event,\
+ javax.imageio.metadata,\
+ javax.imageio.plugins.bmp,\
+ javax.imageio.plugins.jpeg,\
+ javax.imageio.spi,\
+ javax.imageio.stream,\
+ javax.jws,\
+ javax.jws.soap,\
+ javax.lang.model,\
+ javax.lang.model.element,\
+ javax.lang.model.type,\
+ javax.lang.model.util,\
+ javax.management,\
+ javax.management.event,\
+ javax.management.loading,\
+ javax.management.modelmbean,\
+ javax.management.monitor,\
+ javax.management.namespace,\
+ javax.management.openmbean,\
+ javax.management.relation,\
+ javax.management.remote,\
+ javax.management.remote.rmi,\
+ javax.management.timer,\
+ javax.naming,\
+ javax.naming.directory,\
+ javax.naming.event,\
+ javax.naming.ldap,\
+ javax.naming.spi,\
+ javax.net,\
+ javax.net.ssl,\
+ javax.print,\
+ javax.print.attribute,\
+ javax.print.attribute.standard,\
+ javax.print.event,\
+ javax.rmi,\
+ javax.rmi.CORBA,\
+ javax.rmi.ssl,\
+ javax.script,\
+ javax.security.auth,\
+ javax.security.auth.callback,\
+ javax.security.auth.kerberos,\
+ javax.security.auth.login,\
+ javax.security.auth.spi,\
+ javax.security.auth.x500,\
+ javax.security.cert,\
+ javax.security.sasl,\
+ javax.sound.midi,\
+ javax.sound.midi.spi,\
+ javax.sound.sampled,\
+ javax.sound.sampled.spi,\
+ javax.sql,\
+ javax.sql.rowset,\
+ javax.sql.rowset.serial,\
+ javax.sql.rowset.spi,\
+ javax.swing,\
+ javax.swing.border,\
+ javax.swing.colorchooser,\
+ javax.swing.event,\
+ javax.swing.filechooser,\
+ javax.swing.plaf,\
+ javax.swing.plaf.basic,\
+ javax.swing.plaf.metal,\
+ javax.swing.plaf.multi,\
+ javax.swing.plaf.nimbus,\
+ javax.swing.plaf.synth,\
+ javax.swing.table,\
+ javax.swing.text,\
+ javax.swing.text.html,\
+ javax.swing.text.html.parser,\
+ javax.swing.text.rtf,\
+ javax.swing.tree,\
+ javax.swing.undo,\
+ javax.tools,\
+ javax.transaction,\
+ javax.transaction.xa,\
+ javax.xml,\
+ javax.xml.bind,\
+ javax.xml.bind.annotation,\
+ javax.xml.bind.annotation.adapters,\
+ javax.xml.bind.attachment,\
+ javax.xml.bind.helpers,\
+ javax.xml.bind.util,\
+ javax.xml.crypto,\
+ javax.xml.crypto.dom,\
+ javax.xml.crypto.dsig,\
+ javax.xml.crypto.dsig.dom,\
+ javax.xml.crypto.dsig.keyinfo,\
+ javax.xml.crypto.dsig.spec,\
+ javax.xml.datatype,\
+ javax.xml.namespace,\
+ javax.xml.parsers,\
+ javax.xml.soap,\
+ javax.xml.stream,\
+ javax.xml.stream.events,\
+ javax.xml.stream.util,\
+ javax.xml.transform,\
+ javax.xml.transform.dom,\
+ javax.xml.transform.sax,\
+ javax.xml.transform.stax,\
+ javax.xml.transform.stream,\
+ javax.xml.validation,\
+ javax.xml.ws,\
+ javax.xml.ws.handler,\
+ javax.xml.ws.handler.soap,\
+ javax.xml.ws.http,\
+ javax.xml.ws.soap,\
+ javax.xml.ws.spi,\
+ javax.xml.ws.wsaddressing,\
+ javax.xml.xpath,\
+ org.ietf.jgss,\
+ org.omg.CORBA,\
+ org.omg.CORBA_2_3,\
+ org.omg.CORBA_2_3.portable,\
+ org.omg.CORBA.DynAnyPackage,\
+ org.omg.CORBA.ORBPackage,\
+ org.omg.CORBA.portable,\
+ org.omg.CORBA.TypeCodePackage,\
+ org.omg.CosNaming,\
+ org.omg.CosNaming.NamingContextExtPackage,\
+ org.omg.CosNaming.NamingContextPackage,\
+ org.omg.Dynamic,\
+ org.omg.DynamicAny,\
+ org.omg.DynamicAny.DynAnyFactoryPackage,\
+ org.omg.DynamicAny.DynAnyPackage,\
+ org.omg.IOP,\
+ org.omg.IOP.CodecFactoryPackage,\
+ org.omg.IOP.CodecPackage,\
+ org.omg.Messaging,\
+ org.omg.PortableInterceptor,\
+ org.omg.PortableInterceptor.ORBInitInfoPackage,\
+ org.omg.PortableServer,\
+ org.omg.PortableServer.CurrentPackage,\
+ org.omg.PortableServer.POAManagerPackage,\
+ org.omg.PortableServer.POAPackage,\
+ org.omg.PortableServer.portable,\
+ org.omg.PortableServer.ServantLocatorPackage,\
+ org.omg.SendingContext,\
+ org.omg.stub.java.rmi,\
+ org.w3c.dom,\
+ org.w3c.dom.bootstrap,\
+ org.w3c.dom.css,\
+ org.w3c.dom.events,\
+ org.w3c.dom.html,\
+ org.w3c.dom.ls,\
+ org.w3c.dom.ranges,\
+ org.w3c.dom.stylesheets,\
+ org.w3c.dom.traversal,\
+ org.w3c.dom.views,\
+ org.w3c.dom.xpath,\
+ org.xml.sax,\
+ org.xml.sax.ext,\
+ org.xml.sax.helpers
+org.osgi.framework.bootdelegation = \
+ javax.*,\
+ org.ietf.jgss,\
+ org.omg.*,\
+ org.w3c.*,\
+ org.xml.*,\
+ sun.*,\
+ com.sun.*
+org.osgi.framework.executionenvironment = \
+ OSGi/Minimum-1.0,\
+ OSGi/Minimum-1.1,\
+ OSGi/Minimum-1.2,\
+ JRE-1.1,\
+ J2SE-1.2,\
+ J2SE-1.3,\
+ J2SE-1.4,\
+ J2SE-1.5,\
+ JavaSE-1.6,\
+ JavaSE-1.7
+osgi.java.profile.name = JavaSE-1.7
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/eclipse/plugins/org.eclipse.osgi/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.osgi/META-INF/MANIFEST.MF
index 7696d37..9452d1d 100644
--- a/eclipse/plugins/org.eclipse.osgi/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.osgi/META-INF/MANIFEST.MF
@@ -1,16 +1,16 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Export-Package: org.eclipse.osgi.event;version="1.0",
- org.eclipse.osgi.framework.console;version="1.0",
+ org.eclipse.osgi.framework.console;version="1.1",
  org.eclipse.osgi.framework.eventmgr;version="1.2",
  org.eclipse.osgi.framework.log;version="1.0",
  org.eclipse.osgi.launch; version="1.0",
- org.eclipse.osgi.service.datalocation;version="1.2",
- org.eclipse.osgi.service.debug;version="1.1",
- org.eclipse.osgi.service.environment;version="1.2",
- org.eclipse.osgi.service.localization;version="1.0",
+ org.eclipse.osgi.service.datalocation;version="1.3",
+ org.eclipse.osgi.service.debug;version="1.2",
+ org.eclipse.osgi.service.environment;version="1.3",
+ org.eclipse.osgi.service.localization;version="1.1",
  org.eclipse.osgi.service.pluginconversion;version="1.0",
- org.eclipse.osgi.service.resolver;version="1.3",
+ org.eclipse.osgi.service.resolver;version="1.4",
  org.eclipse.osgi.service.runnable;version="1.1",
  org.eclipse.osgi.service.security; version="1.0",
  org.eclipse.osgi.service.urlconversion;version="1.0",
@@ -68,7 +68,7 @@ Bundle-Activator: org.eclipse.osgi.framework.internal.core.SystemBundleActivator
 Bundle-Description: %systemBundle
 Bundle-Copyright: %copyright
 Bundle-Vendor: %eclipse.org
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Localization: systembundle
 Bundle-DocUrl: http://www.eclipse.org
 Eclipse-ExtensibleAPI: true
@@ -76,3 +76,4 @@ Eclipse-SystemBundle: true
 Main-Class: org.eclipse.core.runtime.adaptor.EclipseStarter
 Bundle-RequiredExecutionEnvironment: J2SE-1.5,
  OSGi/Minimum-1.2
+Eclipse-BundleShape: jar
diff --git a/eclipse/plugins/org.eclipse.osgi/build.properties b/eclipse/plugins/org.eclipse.osgi/build.properties
index 0cbe080..d21ae37 100644
--- a/eclipse/plugins/org.eclipse.osgi/build.properties
+++ b/eclipse/plugins/org.eclipse.osgi/build.properties
@@ -34,4 +34,6 @@ jre.compilation.profile = CDC-1.1/Foundation-1.1
 bootClasspath=osgi/exceptions.jar;osgi/xmlParserAPIs.jar;${CDC-1.1/Foundation-1.1}
 
 javacSource=1.3
-javacTarget=1.2
\ No newline at end of file
+javacTarget=1.2
+
+javacWarnings..=-deadCode
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleManager.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleManager.java
index 777b1c3..c487509 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,45 +10,146 @@
  *******************************************************************************/
 package org.eclipse.osgi.framework.internal.core;
 
-import org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMsg;
+import java.io.*;
+import java.lang.reflect.Method;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.Hashtable;
+import org.eclipse.osgi.framework.console.CommandProvider;
+import org.eclipse.osgi.framework.console.ConsoleSession;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+public class ConsoleManager implements ServiceTrackerCustomizer {
+	/**
+	 * ConsoleSocketGetter - provides a Thread that listens on the port
+	 * for FrameworkConsole.
+	 */
+	class ConsoleSocketGetter implements Runnable {
+
+		/** The ServerSocket to accept connections from */
+		private final ServerSocket server;
+		private volatile boolean shutdown = false;
+
+		/**
+		 * Constructor - sets the server and starts the thread to
+		 * listen for connections.
+		 *
+		 * @param server a ServerSocket to accept connections from
+		 */
+		ConsoleSocketGetter(ServerSocket server) {
+			this.server = server;
+			try {
+				Method reuseAddress = server.getClass().getMethod("setReuseAddress", new Class[] {boolean.class}); //$NON-NLS-1$
+				reuseAddress.invoke(server, new Object[] {Boolean.TRUE});
+			} catch (Exception ex) {
+				// try to set the socket re-use property, it isn't a problem if it can't be set
+			}
+			Thread t = new Thread(this, "ConsoleSocketGetter"); //$NON-NLS-1$
+			t.setDaemon(false);
+			t.start();
+		}
+
+		public void run() {
+			// Print message containing port console actually bound to..
+			System.out.println(NLS.bind(ConsoleMsg.CONSOLE_LISTENING_ON_PORT, Integer.toString(server.getLocalPort())));
+			while (!shutdown) {
+				try {
+					Socket socket = server.accept();
+					if (socket == null)
+						throw new IOException("No socket available.  Probably caused by a shutdown."); //$NON-NLS-1$
+					FrameworkConsoleSession session = new FrameworkConsoleSession(socket.getInputStream(), socket.getOutputStream(), socket);
+					framework.getSystemBundleContext().registerService(ConsoleSession.class.getName(), session, null);
+				} catch (Exception e) {
+					if (!shutdown)
+						e.printStackTrace();
+				}
+
+			}
+		}
+
+		public void shutdown() {
+			if (shutdown)
+				return;
+			shutdown = true;
+			try {
+				server.close();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+		}
+	}
 
-public class ConsoleManager {
 	public static final String PROP_CONSOLE = "osgi.console"; //$NON-NLS-1$
+	private static final String PROP_SYSTEM_IN_OUT = "console.systemInOut"; //$NON-NLS-1$
 	private static final String CONSOLE_NAME = "OSGi Console"; //$NON-NLS-1$
-	private FrameworkConsole console;
-
-	public static ConsoleManager startConsole(Framework equinox) {
-		String consolePort = FrameworkProperties.getProperty(PROP_CONSOLE);
-		if (consolePort != null) {
-			ConsoleManager consoleMgr = new ConsoleManager();
-			consoleMgr.startConsole(equinox, new String[0], consolePort);
-			return consoleMgr;
-		}
+	private final Framework framework;
+	private final ServiceTracker cpTracker;
+	private final ServiceTracker sessions;
+	private final String consolePort;
+	private FrameworkCommandProvider fwkCommands;
+	private ServiceRegistration builtinSession;
+	private ConsoleSocketGetter scsg;
 
-		return null;
+	public ConsoleManager(Framework framework, String consolePort) {
+		this.framework = framework;
+		this.consolePort = consolePort != null ? consolePort.trim() : consolePort;
+		this.cpTracker = new ServiceTracker(framework.getSystemBundleContext(), CommandProvider.class.getName(), null);
+		this.sessions = new ServiceTracker(framework.getSystemBundleContext(), ConsoleSession.class.getName(), this);
 	}
 
-	/**
-	 *  Invokes the OSGi Console on another thread
-	 *
-	 * @param equinox The current OSGi instance for the console to attach to
-	 * @param consoleArgs An String array containing commands from the command line
-	 * for the console to execute
-	 * @param consolePort the port on which to run the console.  Empty string implies the default port.
-	 */
-	public void startConsole(Framework equinox, String[] consoleArgs, String consolePort) {
+	public static ConsoleManager startConsole(Framework framework) {
+		ConsoleManager consoleManager = new ConsoleManager(framework, FrameworkProperties.getProperty(PROP_CONSOLE));
+		consoleManager.startConsole();
+		return consoleManager;
+	}
+
+	private void startConsole() {
+		if ("none".equals(consolePort)) //$NON-NLS-1$
+			return; // disables all console sessions
+		this.cpTracker.open();
+		this.sessions.open();
+		fwkCommands = new FrameworkCommandProvider(framework);
+		fwkCommands.start();
+		if (consolePort == null)
+			return;
+		int port = -1;
 		try {
-			if (consolePort.length() == 0)
-				console = new FrameworkConsole(equinox, consoleArgs);
-			else
-				console = new FrameworkConsole(equinox, Integer.parseInt(consolePort), consoleArgs);
-			Thread t = new Thread(console, CONSOLE_NAME);
-			t.setDaemon(false);
-			t.start();
-		} catch (NumberFormatException nfe) {
-			// TODO log or something other than write on System.err
-			System.err.println(NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_INVALID_PORT, consolePort));
+			if (consolePort.length() > 0)
+				port = Integer.parseInt(consolePort);
+		} catch (NumberFormatException e) {
+			// do nothing;
+		}
+		if (port < 0) {
+			InputStream in = new FilterInputStream(System.in) {
+				public void close() throws IOException {
+					// We don't want to close System.in
+				}
+			};
+			OutputStream out = new FilterOutputStream(System.out) {
+				public void close() throws IOException {
+					// We don't want to close System.out
+				}
+
+				public void write(byte[] var0, int var1, int var2) throws IOException {
+					this.out.write(var0, var1, var2);
+				}
+
+			};
+			FrameworkConsoleSession session = new FrameworkConsoleSession(in, out, null);
+			Hashtable props = null;
+			props = new Hashtable(1);
+			props.put(PROP_SYSTEM_IN_OUT, Boolean.TRUE);
+			builtinSession = framework.getSystemBundleContext().registerService(ConsoleSession.class.getName(), session, props);
+		} else {
+			try {
+				scsg = new ConsoleManager.ConsoleSocketGetter(new ServerSocket(port));
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
 		}
 	}
 
@@ -57,8 +158,41 @@ public class ConsoleManager {
 	 *
 	 */
 	public void stopConsole() {
-		if (console == null)
-			return;
-		console.shutdown();
+		if (builtinSession != null)
+			try {
+				builtinSession.unregister();
+			} catch (IllegalStateException e) {
+				// ignore; this can happen if the session was closed manually (bug 314343)
+			}
+		sessions.close();
+		cpTracker.close();
+		if (scsg != null)
+			scsg.shutdown();
+		if (fwkCommands != null)
+			fwkCommands.stop();
+	}
+
+	public Object addingService(ServiceReference reference) {
+		FrameworkConsole console = null;
+
+		Boolean isSystemInOut = (Boolean) reference.getProperty(PROP_SYSTEM_IN_OUT);
+		if (isSystemInOut == null)
+			isSystemInOut = Boolean.FALSE;
+
+		ConsoleSession session = (ConsoleSession) framework.getSystemBundleContext().getService(reference);
+		console = new FrameworkConsole(framework.getSystemBundleContext(), session, isSystemInOut.booleanValue(), cpTracker);
+
+		Thread t = new Thread(console, CONSOLE_NAME);
+		t.setDaemon(false);
+		t.start();
+		return console;
+	}
+
+	public void modifiedService(ServiceReference reference, Object service) {
+		// nothing
+	}
+
+	public void removedService(ServiceReference reference, Object service) {
+		((FrameworkConsole) service).shutdown();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMessages.properties b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMessages.properties
index 3d2d7f4..f461a3c 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMessages.properties
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMessages.properties
@@ -54,7 +54,6 @@ CONSOLE_HELP_PACKAGES_COMMAND_DESCRIPTION=display imported/exported package deta
 CONSOLE_HELP_BUNDLES_COMMAND_DESCRIPTION=display details for all installed bundles
 CONSOLE_HELP_BUNDLE_COMMAND_DESCRIPTION=display details for the specified bundle(s)
 CONSOLE_HELP_HEADERS_COMMAND_DESCRIPTION=print bundle headers
-CONSOLE_HELP_LOG_COMMAND_DESCRIPTION=display log entries
 CONSOLE_HELP_EXTRAS_HEADER=Extras
 CONSOLE_HELP_EXEC_COMMAND_DESCRIPTION=execute a command in a separate process and wait
 CONSOLE_HELP_FORK_COMMAND_DESCRIPTION=execute a command in a separate process
@@ -94,11 +93,6 @@ CONSOLE_EXPORTED_PACKAGES_MESSAGE=Exported packages
 CONSOLE_IMPORTED_PACKAGES_MESSAGE=Imported packages
 CONSOLE_EXPORTED_REMOVAL_PENDING_MESSAGE=[exported(removal pending)]
 CONSOLE_EXPORTED_MESSAGE=[exported]
-CONSOLE_DEBUG_MESSAGE=Debug
-CONSOLE_INFO_MESSAGE=Info
-CONSOLE_WARNING_MESSAGE=Warn
-CONSOLE_ERROR_MESSAGE=Error
-CONSOLE_LOGSERVICE_NOT_REGISTERED_MESSAGE=The LogReaderService is not registered.
 CONSOLE_TOTAL_MEMORY_MESSAGE=Total memory:
 CONSOLE_FREE_MEMORY_BEFORE_GARBAGE_COLLECTION_MESSAGE=Free memory before GC:
 CONSOLE_FREE_MEMORY_AFTER_GARBAGE_COLLECTION_MESSAGE=Free memory after GC:
@@ -119,9 +113,6 @@ CONSOLE_THREADGROUP_TITLE=ThreadGroupType:   Name:                 ParentGroup:
 CONSOLE_THREADTYPE_TITLE=ThreadType:        Name:                 ThreadGroup:   Prio:
 CONSOLE_CANNOT_FIND_BUNDLE_ERROR=Cannot find bundle {0}
 CONSOLE_LISTENING_ON_PORT=Listening on port {0} ... 
-CONSOLE_TELNET_CONNECTION_REFUSED=Connection refused.
-CONSOLE_TELNET_CURRENTLY_USED=Telnet is currently being used.
-CONSOLE_TELNET_ONE_CLIENT_ONLY=Only one client can access at a time.
 STARTLEVEL_HELP_HEADING=Controlling Start Level
 STARTLEVEL_HELP_SL=display the start level for the specified bundle, or for the framework if no bundle specified
 STARTLEVEL_HELP_SETFWSL=set the framework start level
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMsg.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMsg.java
index d4491b3..020f216 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMsg.java
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/ConsoleMsg.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,10 +37,6 @@ public class ConsoleMsg extends NLS {
 	public static String CONSOLE_LISTENING_ON_PORT;
 	public static String CONSOLE_PROMPT;
 
-	public static String CONSOLE_TELNET_CONNECTION_REFUSED;
-	public static String CONSOLE_TELNET_CURRENTLY_USED;
-	public static String CONSOLE_TELNET_ONE_CLIENT_ONLY;
-
 	public static String CONSOLE_HELP_CONTROLLING_FRAMEWORK_HEADER;
 	public static String CONSOLE_HELP_LAUNCH_COMMAND_DESCRIPTION;
 	public static String CONSOLE_HELP_SHUTDOWN_COMMAND_DESCRIPTION;
@@ -68,7 +64,6 @@ public class ConsoleMsg extends NLS {
 	public static String CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION;
 	public static String CONSOLE_HELP_BUNDLE_COMMAND_DESCRIPTION;
 	public static String CONSOLE_HELP_HEADERS_COMMAND_DESCRIPTION;
-	public static String CONSOLE_HELP_LOG_COMMAND_DESCRIPTION;
 	public static String CONSOLE_HELP_EXTRAS_HEADER;
 	public static String CONSOLE_HELP_COMMAND_ARGUMENT_DESCRIPTION;
 	public static String CONSOLE_HELP_GETPROP_COMMAND_DESCRIPTION;
@@ -126,11 +121,6 @@ public class ConsoleMsg extends NLS {
 	public static String CONSOLE_PROVIDED_MESSAGE;
 	public static String CONSOLE_REQUIRED_BUNDLES_MESSAGE;
 	public static String CONSOLE_NO_REQUIRED_BUNDLES_MESSAGE;
-	public static String CONSOLE_DEBUG_MESSAGE;
-	public static String CONSOLE_INFO_MESSAGE;
-	public static String CONSOLE_WARNING_MESSAGE;
-	public static String CONSOLE_ERROR_MESSAGE;
-	public static String CONSOLE_LOGSERVICE_NOT_REGISTERED_MESSAGE;
 	public static String CONSOLE_TOTAL_MEMORY_MESSAGE;
 	public static String CONSOLE_FREE_MEMORY_BEFORE_GARBAGE_COLLECTION_MESSAGE;
 	public static String CONSOLE_FREE_MEMORY_AFTER_GARBAGE_COLLECTION_MESSAGE;
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandInterpreter.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandInterpreter.java
index ee23bcf..a54f2d8 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandInterpreter.java
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandInterpreter.java
@@ -136,7 +136,7 @@ public class FrameworkCommandInterpreter implements CommandInterpreter {
 			return retval;
 		}
 		// handle "disconnect" command here
-		if (cmd.equalsIgnoreCase("disconnect") && con.getUseSocketStream()) { //$NON-NLS-1$
+		if (cmd.equalsIgnoreCase("disconnect")) { //$NON-NLS-1$
 			try {
 				_disconnect();
 			} catch (Exception e) {
@@ -330,7 +330,7 @@ public class FrameworkCommandInterpreter implements CommandInterpreter {
 		while (keysEnum.hasMoreElements()) {
 			keys[i++] = (String) keysEnum.nextElement();
 		}
-		Util.sort(keys);
+		Util.sortByString(keys);
 
 		if (title != null) {
 			println(title);
@@ -403,12 +403,10 @@ public class FrameworkCommandInterpreter implements CommandInterpreter {
 		help.append(tab);
 		help.append("more - "); //$NON-NLS-1$
 		help.append(ConsoleMsg.CONSOLE_HELP_MORE);
-		if (con.getUseSocketStream()) {
-			help.append(newline);
-			help.append(tab);
-			help.append("disconnect - "); //$NON-NLS-1$
-			help.append(ConsoleMsg.CONSOLE_HELP_DISCONNECT);
-		}
+		help.append(newline);
+		help.append(tab);
+		help.append("disconnect - "); //$NON-NLS-1$
+		help.append(ConsoleMsg.CONSOLE_HELP_DISCONNECT);
 		help.append(newline);
 		return help.toString();
 	}
@@ -428,7 +426,7 @@ public class FrameworkCommandInterpreter implements CommandInterpreter {
 
 	private void _disconnect() throws Exception {
 		if (confirm(ConsoleMsg.CONSOLE_CONFIRM_DISCONNECT, true)) {
-			con.disconnect();
+			con.shutdown();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandProvider.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandProvider.java
index 420fc19..da34820 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandProvider.java
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkCommandProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.osgi.framework.internal.core;
 
 import java.io.*;
 import java.lang.reflect.Field;
-import java.lang.reflect.Method;
 import java.net.URL;
 import java.security.ProtectionDomain;
 import java.util.*;
@@ -25,6 +24,7 @@ import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 import org.osgi.service.condpermadmin.ConditionalPermissionInfo;
+import org.osgi.service.condpermadmin.ConditionalPermissionUpdate;
 import org.osgi.service.packageadmin.PackageAdmin;
 import org.osgi.service.packageadmin.RequiredBundle;
 
@@ -60,8 +60,6 @@ import org.osgi.service.packageadmin.RequiredBundle;
  ss - display installed bundles (short status)
  status - display installed bundles and registered services
  threads - display threads and thread groups
- ---Log Commands---
- log {(<id>|<location>)} - display log entries
  ---Extras---
  exec <command> - execute a command in a separate process and wait
  fork <command> - execute a command in a separate process
@@ -79,17 +77,17 @@ import org.osgi.service.packageadmin.RequiredBundle;
 public class FrameworkCommandProvider implements CommandProvider, SynchronousBundleListener {
 
 	/** An instance of the OSGi framework */
-	private Framework framework;
+	private final Framework framework;
 	/** The system bundle context */
-	private org.osgi.framework.BundleContext context;
+	private final BundleContext context;
 	/** The start level implementation */
-	private StartLevelManager slImpl;
-	private SecurityAdmin securityAdmin;
-	private PlatformAdmin platAdmin;
+	private final StartLevelManager slImpl;
+	private final SecurityAdmin securityAdmin;
+	private ServiceRegistration providerReg;
 
 	/** Strings used to format other strings */
-	private String tab = "\t"; //$NON-NLS-1$
-	private String newline = "\r\n"; //$NON-NLS-1$
+	private final static String tab = "\t"; //$NON-NLS-1$
+	private final static String newline = "\r\n"; //$NON-NLS-1$
 
 	/** this list contains the bundles known to be lazily awaiting activation */
 	private final List lazyActivation = new ArrayList();
@@ -109,20 +107,22 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 	}
 
 	/**
-	 *  Intialize this CommandProvider.
+	 *  Starts this CommandProvider.
 	 *
 	 *  Registers this object as a CommandProvider with the highest ranking possible.
 	 *  Adds this object as a SynchronousBundleListener.
-	 *
-	 *	@return this
 	 */
-	public FrameworkCommandProvider intialize() {
+	void start() {
 		Dictionary props = new Hashtable();
 		props.put(Constants.SERVICE_RANKING, new Integer(Integer.MAX_VALUE));
-		context.registerService(CommandProvider.class.getName(), this, props);
-
+		providerReg = context.registerService(CommandProvider.class.getName(), this, props);
 		context.addBundleListener(this);
-		return this;
+	}
+
+	void stop() {
+		context.removeBundleListener(this);
+		if (providerReg != null)
+			providerReg.unregister();
 	}
 
 	/**
@@ -156,7 +156,6 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 		addCommand("bundles", ConsoleMsg.CONSOLE_HELP_STATE_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_BUNDLES_COMMAND_DESCRIPTION, help); //$NON-NLS-1$ 
 		addCommand("bundle", ConsoleMsg.CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_BUNDLE_COMMAND_DESCRIPTION, help); //$NON-NLS-1$ 
 		addCommand("headers", ConsoleMsg.CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_HEADERS_COMMAND_DESCRIPTION, help); //$NON-NLS-1$ 
-		addCommand("log", ConsoleMsg.CONSOLE_HELP_IDLOCATION_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_LOG_COMMAND_DESCRIPTION, help); //$NON-NLS-1$ 
 		addHeader(ConsoleMsg.CONSOLE_HELP_EXTRAS_HEADER, help);
 		addCommand("exec", ConsoleMsg.CONSOLE_HELP_COMMAND_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_EXEC_COMMAND_DESCRIPTION, help); //$NON-NLS-1$ 
 		addCommand("fork", ConsoleMsg.CONSOLE_HELP_COMMAND_ARGUMENT_DESCRIPTION, ConsoleMsg.CONSOLE_HELP_FORK_COMMAND_DESCRIPTION, help); //$NON-NLS-1$
@@ -431,6 +430,8 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 		int stateFilter = -1;
 		if (option != null && option.equals("-s")) { //$NON-NLS-1$
 			String searchedState = intp.nextArgument();
+			if (searchedState == null)
+				searchedState = ""; //$NON-NLS-1$
 			StringTokenizer tokens = new StringTokenizer(searchedState, ","); //$NON-NLS-1$
 			while (tokens.hasMoreElements()) {
 				String desiredState = (String) tokens.nextElement();
@@ -812,8 +813,70 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 							}
 							title = true;
 							if (desc != null) {
-								ExportPackageDescription[] imports = desc.getContainingState().getStateHelper().getVisiblePackages(desc, StateHelper.VISIBLE_INCLUDE_EE_PACKAGES);
+								ArrayList fragmentsImportPackages = new ArrayList();
+
+								// Get bundle' fragments imports
+								BundleDescription[] fragments = desc.getFragments();
+								for (int i = 0; i < fragments.length; i++) {
+									ImportPackageSpecification[] fragmentImports = fragments[i].getImportPackages();
+									for (int j = 0; j < fragmentImports.length; j++) {
+										fragmentsImportPackages.add(fragmentImports[j]);
+									}
+								}
+
+								// Get all bundle imports
+								ImportPackageSpecification[] importPackages;
+								if (fragmentsImportPackages.size() > 0) {
+									ImportPackageSpecification[] directImportPackages = desc.getImportPackages();
+									importPackages = new ImportPackageSpecification[directImportPackages.length + fragmentsImportPackages.size()];
+
+									for (int i = 0; i < directImportPackages.length; i++) {
+										importPackages[i] = directImportPackages[i];
+									}
+
+									int offset = directImportPackages.length;
+									for (int i = 0; i < fragmentsImportPackages.size(); i++) {
+										importPackages[offset + i] = (ImportPackageSpecification) fragmentsImportPackages.get(i);
+									}
+								} else {
+									importPackages = desc.getImportPackages();
+								}
+
+								// Get all resolved imports
+								ExportPackageDescription[] imports = null;
+								imports = desc.getContainingState().getStateHelper().getVisiblePackages(desc, StateHelper.VISIBLE_INCLUDE_EE_PACKAGES | StateHelper.VISIBLE_INCLUDE_ALL_HOST_WIRES);
+
+								// Get the unresolved optional and dynamic imports
+								ArrayList unresolvedImports = new ArrayList();
+
+								for (int i = 0; i < importPackages.length; i++) {
+									if (importPackages[i].getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL)) {
+										if (importPackages[i].getSupplier() == null) {
+											unresolvedImports.add(importPackages[i]);
+										}
+									} else if (importPackages[i].getDirective(org.osgi.framework.Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC)) {
+										boolean isResolvable = false;
+
+										// Check if the dynamic import can be resolved by any of the wired imports, 
+										// and if not - add it to the list of unresolved imports
+										for (int j = 0; j < imports.length; j++) {
+											if (importPackages[i].isSatisfiedBy(imports[j])) {
+												isResolvable = true;
+											}
+										}
+
+										if (isResolvable == false) {
+											unresolvedImports.add(importPackages[i]);
+										}
+									}
+								}
+
 								title = printImportedPackages(imports, intp, title);
+
+								if (desc.isResolved() && (unresolvedImports.isEmpty() == false)) {
+									printUnwiredDynamicImports(unresolvedImports, intp);
+									title = false;
+								}
 							}
 
 							if (title) {
@@ -824,7 +887,7 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 							PackageAdmin packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
 							if (packageAdmin != null) {
 								intp.print("  "); //$NON-NLS-1$
-								if ((packageAdmin.getBundleType(bundle) & PackageAdminImpl.BUNDLE_TYPE_FRAGMENT) > 0) {
+								if ((packageAdmin.getBundleType(bundle) & PackageAdmin.BUNDLE_TYPE_FRAGMENT) > 0) {
 									org.osgi.framework.Bundle[] hosts = packageAdmin.getHosts(bundle);
 									if (hosts != null) {
 										intp.println(ConsoleMsg.CONSOLE_HOST_MESSAGE);
@@ -951,128 +1014,21 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 		return title;
 	}
 
-	/**
-	 *  Handle the log command's abbreviation.  Invoke _log()
-	 *
-	 *  @param intp A CommandInterpreter object containing the command and it's arguments.
-	 */
-	public void _l(CommandInterpreter intp) throws Exception {
-		_log(intp);
-	}
-
-	/**
-	 *  Handle the log command.  Display log entries.
-	 *
-	 *  @param intp A CommandInterpreter object containing the command and it's arguments.
-	 */
-	public void _log(CommandInterpreter intp) throws Exception {
-		long logid = -1;
-		String token = intp.nextArgument();
-		if (token != null) {
-			AbstractBundle bundle = getBundleFromToken(intp, token, false);
-
-			if (bundle == null) {
-				try {
-					logid = Long.parseLong(token);
-				} catch (NumberFormatException e) {
-					return;
-				}
-			} else {
-				logid = bundle.getBundleId();
-			}
-		}
-
-		org.osgi.framework.ServiceReference logreaderRef = context.getServiceReference("org.osgi.service.log.LogReaderService"); //$NON-NLS-1$
-		if (logreaderRef != null) {
-			Object logreader = context.getService(logreaderRef);
-			if (logreader != null) {
-				try {
-					Enumeration logs = (Enumeration) (logreader.getClass().getMethod("getLog", null).invoke(logreader, null)); //$NON-NLS-1$
-					ArrayList entriesList = new ArrayList();
-					while (logs.hasMoreElements())
-						entriesList.add(0, logs.nextElement());
-					Object[] entries = entriesList.toArray();
-					if (entries.length == 0)
-						return;
-					Class clazz = entries[0].getClass();
-					Method getBundle = clazz.getMethod("getBundle", null); //$NON-NLS-1$
-					Method getLevel = clazz.getMethod("getLevel", null); //$NON-NLS-1$
-					Method getMessage = clazz.getMethod("getMessage", null); //$NON-NLS-1$
-					Method getServiceReference = clazz.getMethod("getServiceReference", null); //$NON-NLS-1$
-					Method getException = clazz.getMethod("getException", null); //$NON-NLS-1$
-
-					for (int i = 0; i < entries.length; i++) {
-						Object logentry = entries[i];
-						AbstractBundle bundle = (AbstractBundle) getBundle.invoke(logentry, null);
-
-						if ((logid == -1) || ((bundle != null) && (logid == bundle.getBundleId()))) {
-							Integer level = (Integer) getLevel.invoke(logentry, null);
-							switch (level.intValue()) {
-								case 4 :
-									intp.print(">"); //$NON-NLS-1$
-									intp.print(ConsoleMsg.CONSOLE_DEBUG_MESSAGE);
-									intp.print(" "); //$NON-NLS-1$
-									break;
-								case 3 :
-									intp.print(">"); //$NON-NLS-1$
-									intp.print(ConsoleMsg.CONSOLE_INFO_MESSAGE);
-									intp.print(" "); //$NON-NLS-1$
-									break;
-								case 2 :
-									intp.print(">"); //$NON-NLS-1$
-									intp.print(ConsoleMsg.CONSOLE_WARNING_MESSAGE);
-									intp.print(" "); //$NON-NLS-1$
-									break;
-								case 1 :
-									intp.print(">"); //$NON-NLS-1$
-									intp.print(ConsoleMsg.CONSOLE_ERROR_MESSAGE);
-									intp.print(" "); //$NON-NLS-1$
-									break;
-								default :
-									intp.print(">"); //$NON-NLS-1$
-									intp.print(level);
-									intp.print(" "); //$NON-NLS-1$
-									break;
-							}
-
-							if (bundle != null) {
-								intp.print("["); //$NON-NLS-1$
-								intp.print(new Long(bundle.getBundleId()));
-								intp.print("] "); //$NON-NLS-1$
-							}
-
-							intp.print(getMessage.invoke(logentry, null));
-							intp.print(" "); //$NON-NLS-1$
-
-							ServiceReference svcref = (ServiceReference) getServiceReference.invoke(logentry, null);
-							if (svcref != null) {
-								intp.print("{"); //$NON-NLS-1$
-								intp.print(Constants.SERVICE_ID);
-								intp.print("="); //$NON-NLS-1$
-								intp.print(svcref.getProperty(Constants.SERVICE_ID).toString());
-								intp.println("}"); //$NON-NLS-1$
-							} else {
-								if (bundle != null) {
-									intp.println(bundle.getLocation());
-								} else {
-									intp.println();
-								}
-							}
-
-							Throwable t = (Throwable) getException.invoke(logentry, null);
-							if (t != null) {
-								intp.printStackTrace(t);
-							}
-						}
-					}
-				} finally {
-					context.ungetService(logreaderRef);
-				}
-				return;
-			}
+	private void printUnwiredDynamicImports(ArrayList dynamicImports, CommandInterpreter intp) {
+		for (int i = 0; i < dynamicImports.size(); i++) {
+			ImportPackageSpecification importPackage = (ImportPackageSpecification) dynamicImports.get(i);
+			intp.print("    "); //$NON-NLS-1$
+			intp.print(importPackage.getName());
+			intp.print("; version=\""); //$NON-NLS-1$
+			intp.print(importPackage.getVersionRange());
+			intp.print("\""); //$NON-NLS-1$
+			intp.print("<"); //$NON-NLS-1$
+			intp.print("unwired"); //$NON-NLS-1$
+			intp.print(">"); //$NON-NLS-1$
+			intp.print("<"); //$NON-NLS-1$
+			intp.print(importPackage.getDirective(org.osgi.framework.Constants.RESOLUTION_DIRECTIVE));
+			intp.println(">"); //$NON-NLS-1$
 		}
-
-		intp.println(ConsoleMsg.CONSOLE_LOGSERVICE_NOT_REGISTERED_MESSAGE);
 	}
 
 	/**
@@ -1142,6 +1098,9 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 			if (permLocations != null)
 				for (int i = 0; i < permLocations.length; i++)
 					securityAdmin.setPermissions(permLocations[i], null);
+			ConditionalPermissionUpdate update = securityAdmin.newConditionalPermissionUpdate();
+			update.getConditionalPermissionInfos().clear();
+			update.commit();
 		}
 		// clear the permissions from conditional permission admin
 		if (securityAdmin != null)
@@ -1431,12 +1390,12 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 	public void _threads(CommandInterpreter intp) throws Exception {
 
 		ThreadGroup[] threadGroups = getThreadGroups();
-		Util.sort(threadGroups);
+		Util.sortByString(threadGroups);
 
 		ThreadGroup tg = getTopThreadGroup();
 		Thread[] threads = new Thread[tg.activeCount()];
 		int count = tg.enumerate(threads, true);
-		Util.sort(threads);
+		Util.sortByString(threads);
 
 		StringBuffer sb = new StringBuffer(120);
 		intp.println();
@@ -1664,7 +1623,7 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 			return;
 		PlatformAdmin platformAdmin = (PlatformAdmin) context.getService(ref);
 		try {
-			ExportPackageDescription[] exports = platformAdmin.getStateHelper().getVisiblePackages(bundle.getBundleDescription(), StateHelper.VISIBLE_INCLUDE_EE_PACKAGES);
+			ExportPackageDescription[] exports = platformAdmin.getStateHelper().getVisiblePackages(bundle.getBundleDescription(), StateHelper.VISIBLE_INCLUDE_EE_PACKAGES | StateHelper.VISIBLE_INCLUDE_ALL_HOST_WIRES);
 			for (int i = 0; i < exports.length; i++) {
 				intp.println(exports[i] + ": " + platformAdmin.getStateHelper().getAccessCode(bundle.getBundleDescription(), exports[i])); //$NON-NLS-1$
 			}
@@ -1813,7 +1772,7 @@ public class FrameworkCommandProvider implements CommandProvider, SynchronousBun
 		try {
 			platformAdminRef = context.getServiceReference(PlatformAdmin.class.getName());
 			if (platformAdminRef != null) {
-				platAdmin = (PlatformAdmin) context.getService(platformAdminRef);
+				PlatformAdmin platAdmin = (PlatformAdmin) context.getService(platformAdminRef);
 				if (platAdmin != null) {
 					State state = platAdmin.getState(false);
 					BundleDescription bundleDesc = state.getBundle(bundle.getBundleId());
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
index c1ddb0e..317e2bb 100644
--- a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsole.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,9 @@
 package org.eclipse.osgi.framework.internal.core;
 
 import java.io.*;
-import java.lang.reflect.Method;
-import java.net.*;
 import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.osgi.framework.console.ConsoleSession;
+import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 
@@ -28,124 +26,29 @@ import org.osgi.util.tracker.ServiceTracker;
  */
 public class FrameworkConsole implements Runnable {
 	/** The stream to receive commands on  */
-	protected BufferedReader in;
+	private final BufferedReader in;
 	/** The stream to write command results to */
-	protected PrintWriter out;
+	private final PrintWriter out;
 	/** The current bundle context */
-	protected final org.osgi.framework.BundleContext context;
-	/** The command line arguments passed at launch time*/
-	protected final String[] args;
-	/** The OSGi Command Provider */
-	protected final CommandProvider osgicp;
+	private final BundleContext context;
 	/** A tracker containing the service object of all registered command providers */
-	protected final ServiceTracker cptracker;
-
+	private final ServiceTracker cptracker;
+	private final ConsoleSession consoleSession;
+	private final boolean isSystemInOut;
 	/** Default code page which must be supported by all JVMs */
 	static final String defaultEncoding = "iso8859-1"; //$NON-NLS-1$
 	/** The current setting for code page */
 	static final String encoding = FrameworkProperties.getProperty("osgi.console.encoding", FrameworkProperties.getProperty("file.encoding", defaultEncoding)); //$NON-NLS-1$ //$NON-NLS-2$
-
-	/** set to true if accepting commands from port */
-	protected final boolean useSocketStream;
-	protected boolean disconnect = false;
-	protected final int port;
-	protected ConsoleSocketGetter scsg = null;
-	protected Socket s;
-	boolean blockOnready = FrameworkProperties.getProperty("osgi.dev") != null || FrameworkProperties.getProperty("osgi.console.blockOnReady") != null; //$NON-NLS-1$ //$NON-NLS-2$
+	private static final boolean blockOnready = FrameworkProperties.getProperty("osgi.dev") != null || FrameworkProperties.getProperty("osgi.console.blockOnReady") != null; //$NON-NLS-1$ //$NON-NLS-2$
 	volatile boolean shutdown = false;
 
-	/**
-	 Constructor for FrameworkConsole.
-	 It creates a service tracker to track CommandProvider registrations.
-	 The console InputStream is set to System.in and the console PrintStream is set to System.out.
-	 @param framework - an instance of an osgi framework
-	 @param args - any arguments passed on the command line when Launcher is started.
-	 */
-	public FrameworkConsole(Framework framework, String[] args) {
-		this(framework, args, 0, false);
-	}
-
-	/**
-	 Constructor for FrameworkConsole.
-	 It creates a service tracker to track CommandProvider registrations.
-	 The console InputStream is set to System.in and the console PrintStream is set to System.out.
-	 @param framework - an instance of an osgi framework
-	 @param args - any arguments passed on the command line when Launcher is started.
-	 */
-	public FrameworkConsole(Framework framework, int port, String[] args) {
-		this(framework, args, port, true);
-	}
-
-	private FrameworkConsole(Framework framework, String[] args, int port, boolean useSocketStream) {
-		this.args = args;
-		this.useSocketStream = useSocketStream;
-		this.port = port;
-		this.context = framework.systemBundle.getContext();
-
-		// set up a service tracker to track CommandProvider registrations
-		this.cptracker = new ServiceTracker(context, CommandProvider.class.getName(), null);
-		this.cptracker.open();
-
-		// register the OSGi command provider
-		this.osgicp = new FrameworkCommandProvider(framework).intialize();
-	}
-
-	/**
-	 *  Open streams for system.in and system.out
-	 */
-	private void getDefaultStreams() {
-		InputStream is = new FilterInputStream(System.in) {
-			public void close() throws IOException {
-				// We don't want to close System.in
-			}
-		};
-		in = createBufferedReader(is);
-
-		OutputStream os = new FilterOutputStream(System.out) {
-			public void close() throws IOException {
-				// We don't want to close System.out
-			}
-
-			public void write(byte[] var0, int var1, int var2) throws IOException {
-				this.out.write(var0, var1, var2);
-			}
-
-		};
-		out = createPrintWriter(os);
-		disconnect = false;
-	}
-
-	/**
-	 *  Open a socket and create input and output streams
-	 */
-	private boolean getSocketStream() {
-		try {
-			synchronized (this) {
-				if (scsg == null)
-					scsg = new ConsoleSocketGetter(new ServerSocket(port));
-				scsg.setAcceptConnections(true);
-			}
-
-			// Print message containing port console actually bound to..
-			System.out.println(NLS.bind(ConsoleMsg.CONSOLE_LISTENING_ON_PORT, Integer.toString(scsg.getLocalPort())));
-
-			// get socket outside of sync block
-			Socket temp = scsg.getSocket();
-			if (temp == null)
-				return false;
-			synchronized (this) {
-				s = temp;
-				in = createBufferedReader(s.getInputStream());
-				out = createPrintWriter(s.getOutputStream());
-				disconnect = false;
-			}
-			return true;
-		} catch (UnknownHostException uhe) {
-			uhe.printStackTrace();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return false;
+	public FrameworkConsole(BundleContext context, ConsoleSession consoleSession, boolean isSystemInOut, ServiceTracker cptracker) {
+		this.context = context;
+		this.cptracker = cptracker;
+		this.isSystemInOut = isSystemInOut;
+		this.consoleSession = consoleSession;
+		in = createBufferedReader(consoleSession.getInput());
+		out = createPrintWriter(consoleSession.getOutput());
 	}
 
 	/**
@@ -154,7 +57,7 @@ public class FrameworkConsole implements Runnable {
 	 * @param _in An InputStream to wrap with a BufferedReader
 	 * @return a BufferedReader
 	 */
-	private BufferedReader createBufferedReader(InputStream _in) {
+	static BufferedReader createBufferedReader(InputStream _in) {
 		BufferedReader reader;
 		try {
 			reader = new BufferedReader(new InputStreamReader(_in, encoding));
@@ -171,12 +74,12 @@ public class FrameworkConsole implements Runnable {
 	 * @param _out An OutputStream to wrap with a PrintWriter
 	 * @return a PrintWriter
 	 */
-	PrintWriter createPrintWriter(OutputStream _out) {
+	static PrintWriter createPrintWriter(OutputStream _out) {
 		PrintWriter writer;
 		try {
 			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(_out, encoding)), true);
 		} catch (UnsupportedEncodingException uee) {
-			// if the encoding is not supported by the jvm, punt and use whatever encodiing there is
+			// if the encoding is not supported by the jvm, punt and use whatever encoding there is
 			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(_out)), true);
 		}
 		return writer;
@@ -191,99 +94,49 @@ public class FrameworkConsole implements Runnable {
 	}
 
 	/**
-	 *  Return the current input BufferedReader
-	 * @return The currently active BufferedReader
-	 */
-	public BufferedReader getReader() {
-		return in;
-	}
-
-	/**
-	 *  Return if the SocketSteam (telnet to the console) is being used 
-	 * @return Return if the SocketSteam is being used 
-	 */
-	public boolean getUseSocketStream() {
-		return useSocketStream;
-	}
-
-	/**
-	 * Begin doing the active part of the class' code. Starts up the console.
-	 */
-	public void run() {
-		// always grab the default streams
-		getDefaultStreams();
-		try {
-			// process any arguments from the command line
-			console(args);
-		} catch (IOException e) {
-			e.printStackTrace(out);
-		}
-		while (!shutdown) {
-			if (useSocketStream && !getSocketStream())
-				return;
-			console();
-		}
-	}
-
-	/**
 	 * Command Line Interface for OSGi. The method processes the initial commands
 	 * and then reads and processes commands from the console InputStream.
 	 * Command output is written to the console PrintStream. The method will
 	 * loop reading commands from the console InputStream until end-of-file
 	 * is reached. This method will then return.
-	 *
-	 * @param args Initial set of commands to execute.
-	 * @throws IOException
 	 */
-	public void console(String args[]) throws IOException {
-		// first handle any args passed in from launch
-		if (args != null) {
-			for (int i = 0; i < args.length; i++) {
-				docommand(args[i]);
-			}
+	public void run() {
+		try {
+			runConsole();
+		} finally {
+			// ensure the console is shutdown before exiting the thread
+			shutdown();
 		}
 	}
 
-	/**
-	 * Command Line Interface for OSGi. The method processes the initial commands
-	 * and then reads and processes commands from the console InputStream.
-	 * Command output is written to the console PrintStream. The method will
-	 * loop reading commands from the console InputStream until end-of-file
-	 * is reached. This method will then return.
-	 * @throws IOException
-	 */
-	protected void console() {
+	private void runConsole() {
 		// wait to receive commands from console and handle them
-		BufferedReader br = in;
 		//cache the console prompt String
 		String consolePrompt = "\r\n" + ConsoleMsg.CONSOLE_PROMPT; //$NON-NLS-1$
-		while (!disconnected()) {
+		while (!shutdown) {
 			out.print(consolePrompt);
 			out.flush();
 
 			String cmdline = null;
 			try {
-				if (blockOnready && !useSocketStream) {
+				if (blockOnready && isSystemInOut) {
 					// bug 40066: avoid waiting on input stream - apparently generates contention with other native calls 
 					try {
-						while (!br.ready())
+						while (!in.ready())
 							Thread.sleep(300);
-						cmdline = br.readLine();
+						cmdline = in.readLine();
 					} catch (InterruptedException e) {
 						// do nothing; probably got disconnected
 					}
 				} else
-					cmdline = br.readLine();
+					cmdline = in.readLine();
 			} catch (IOException ioe) {
 				if (!shutdown)
 					ioe.printStackTrace(out);
 			}
-			if (cmdline == null) {
-				if (!useSocketStream)
-					// better shutdown; the standard console has failed us.  Don't want to get in an endless loop (bug 212313) (bug 226053)
-					shutdown();
+			if (cmdline == null)
+				// we assume the session is done and break out of the loop.
 				break;
-			}
 			if (!shutdown)
 				docommand(cmdline);
 		}
@@ -306,40 +159,6 @@ public class FrameworkConsole implements Runnable {
 	}
 
 	/**
-	 * Disconnects from console if useSocketStream is set to true.  This
-	 * will cause the console to close from a telnet session.
-	 */
-	public synchronized void disconnect() {
-		if (!disconnect) {
-			disconnect = true;
-			// We don't want to close System.in and System.out
-			if (useSocketStream) {
-				if (s != null)
-					try {
-						s.close();
-					} catch (IOException ioe) {
-						// do nothing
-					}
-				if (out != null)
-					out.close();
-				if (in != null)
-					try {
-						in.close();
-					} catch (IOException ioe) {
-						// do nothing
-					}
-			}
-		}
-	}
-
-	/**
-	 * @return are we still connected?
-	 */
-	private synchronized boolean disconnected() {
-		return disconnect;
-	}
-
-	/**
 	 * Reads a string from standard input until user hits the Enter key.
 	 *
 	 * @return	The string read from the standard input without the newline character.
@@ -382,115 +201,10 @@ public class FrameworkConsole implements Runnable {
 	 * Stops the console so the thread can be GC'ed
 	 */
 	public synchronized void shutdown() {
+		if (shutdown)
+			return;
 		shutdown = true;
-		cptracker.close();
-		disconnect();
-		if (scsg != null)
-			try {
-				scsg.shutdown();
-			} catch (IOException e) {
-				System.err.println(e.getMessage());
-			}
-	}
-
-	/**
-	 * ConsoleSocketGetter - provides a Thread that listens on the port
-	 * for FrameworkConsole.  If acceptConnections is set to true then
-	 * the thread will notify the getSocket method to return the socket.
-	 * If acceptConnections is set to false then the client is notified
-	 * that connections are not currently accepted and closes the socket.
-	 */
-	class ConsoleSocketGetter implements Runnable {
-
-		/** The ServerSocket to accept connections from */
-		private final ServerSocket server;
-		/** The current socket to be returned by getSocket */
-		private Socket socket;
-		/** if set to true then allow the socket to be returned by getSocket */
-		private boolean acceptConnections = true;
-		/** Lock object to synchronize returning of the socket */
-		private final Object lock = new Object();
-
-		/**
-		 * Constructor - sets the server and starts the thread to
-		 * listen for connections.
-		 *
-		 * @param server a ServerSocket to accept connections from
-		 */
-		ConsoleSocketGetter(ServerSocket server) {
-			this.server = server;
-			try {
-				Method reuseAddress = server.getClass().getMethod("setReuseAddress", new Class[] {boolean.class}); //$NON-NLS-1$
-				reuseAddress.invoke(server, new Object[] {Boolean.TRUE});
-			} catch (Exception ex) {
-				// try to set the socket re-use property, it isn't a problem if it can't be set
-			}
-			Thread t = new Thread(this, "ConsoleSocketGetter"); //$NON-NLS-1$
-			t.setDaemon(true);
-			t.start();
-		}
-
-		/**
-		 * Returns the local port used for the server socket
-		 * @return
-		 */
-		public int getLocalPort() {
-			return server.getLocalPort();
-		}
-
-		public void run() {
-			while (!shutdown) {
-				try {
-					socket = server.accept();
-					if (!acceptConnections) {
-						PrintWriter o = createPrintWriter(socket.getOutputStream());
-						o.println(ConsoleMsg.CONSOLE_TELNET_CONNECTION_REFUSED);
-						o.println(ConsoleMsg.CONSOLE_TELNET_CURRENTLY_USED);
-						o.println(ConsoleMsg.CONSOLE_TELNET_ONE_CLIENT_ONLY);
-						o.close();
-						socket.close();
-					} else {
-						synchronized (lock) {
-							lock.notify();
-						}
-					}
-				} catch (Exception e) {
-					if (!shutdown)
-						e.printStackTrace();
-				}
-
-			}
-		}
-
-		/**
-		 * Method to get a socket connection from a client.
-		 *
-		 * @return - Socket from a connected client
-		 */
-		public Socket getSocket() throws InterruptedException {
-			// wait for a socket to get assigned from the accepter thread
-			synchronized (lock) {
-				lock.wait(); //TODO spurious wakeup not handled
-			}
-			setAcceptConnections(false);
-			return shutdown ? null : socket;
-		}
-
-		/**
-		 * Method to indicate if connections are accepted or not.  If set
-		 * to false then the clients will be notified that connections
-		 * are not accepted.
-		 */
-		public void setAcceptConnections(boolean acceptConnections) {
-			this.acceptConnections = acceptConnections;
-		}
-
-		public void shutdown() throws IOException {
-			server.close();
-			synchronized (lock) {
-				lock.notify();
-			}
-		}
+		consoleSession.close();
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsoleSession.java b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsoleSession.java
new file mode 100644
index 0000000..91b7c24
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/console/src/org/eclipse/osgi/framework/internal/core/FrameworkConsoleSession.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.osgi.framework.internal.core;
+
+import java.io.*;
+import java.net.Socket;
+import org.eclipse.osgi.framework.console.ConsoleSession;
+
+public class FrameworkConsoleSession extends ConsoleSession {
+	private final Socket s;
+	private final InputStream in;
+	private final OutputStream out;
+
+	public FrameworkConsoleSession(InputStream in, OutputStream out, Socket s) {
+		this.in = in;
+		this.out = out;
+		this.s = s;
+	}
+
+	public synchronized InputStream getInput() {
+		return in;
+	}
+
+	public synchronized OutputStream getOutput() {
+		return out;
+	}
+
+	public void doClose() {
+		if (s != null)
+			try {
+				s.close();
+			} catch (IOException ioe) {
+				// do nothing
+			}
+		if (out != null)
+			try {
+				out.close();
+			} catch (IOException e) {
+				// do nothing
+			}
+		if (in != null)
+			try {
+				in.close();
+			} catch (IOException ioe) {
+				// do nothing
+			}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleProtectionDomain.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleProtectionDomain.java
index 24be0f9..f9a23f7 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleProtectionDomain.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/BundleProtectionDomain.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,8 +11,9 @@
 
 package org.eclipse.osgi.framework.adaptor;
 
-import java.security.PermissionCollection;
-import java.security.ProtectionDomain;
+import java.security.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleReference;
 
 /**
  * 
@@ -22,15 +23,49 @@ import java.security.ProtectionDomain;
  * </p>
  * @since 3.1
  */
-public abstract class BundleProtectionDomain extends ProtectionDomain {
+public class BundleProtectionDomain extends ProtectionDomain implements BundleReference {
+
+	private volatile Bundle bundle;
 
 	/**
 	 * Constructs a special ProtectionDomain for a bundle.
 	 * 
 	 * @param permCollection
 	 *            the PermissionCollection for the Bundle
+	 * @deprecated use {@link #BundleProtectionDomain(PermissionCollection, CodeSource, Bundle)}
 	 */
 	public BundleProtectionDomain(PermissionCollection permCollection) {
-		super(null, permCollection);
+		this(permCollection, null, null);
+	}
+
+	/**
+	 * Constructs a special ProtectionDomain for a bundle.
+	 * 
+	 * @param permCollection
+	 *            the PermissionCollection for the Bundle
+	 * @param codeSource
+	 *            the code source for this domain, may be null
+	 * @param bundle
+	 *            the bundle associated with this domain, may be null
+	 */
+	public BundleProtectionDomain(PermissionCollection permCollection, CodeSource codeSource, Bundle bundle) {
+		super(codeSource, permCollection);
+		this.bundle = bundle;
+	}
+
+	/**
+	 * Sets the bundle object associated with this protection domain.
+	 * The bundle can only be set once with either this method or with 
+	 * the constructor.
+	 * @param bundle the bundle object associated with this protection domain
+	 */
+	public void setBundle(Bundle bundle) {
+		if (this.bundle != null || bundle == null)
+			return;
+		this.bundle = bundle;
+	}
+
+	public Bundle getBundle() {
+		return bundle;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegate.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegate.java
index c7b6c95..997cadc 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegate.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.osgi.framework.adaptor;
 import java.io.IOException;
 import java.net.URL;
 import java.util.Enumeration;
+import org.osgi.framework.BundleException;
 
 /**
  * A ClassLoaderDelegate is used by the BundleClassLoader in a similar
@@ -25,6 +26,7 @@ import java.util.Enumeration;
  * <p>
  * This interface is not intended to be implemented by clients.
  * </p>
+ * @noimplement This interface is not intended to be implemented by clients.
  * @since 3.1
  */
 public interface ClassLoaderDelegate {
@@ -89,4 +91,22 @@ public interface ClassLoaderDelegate {
 	 */
 	public String findLibrary(String libraryname);
 
+	/**
+	 * Returns true if the lazy trigger has been set for this 
+	 * delegate.  The lazy trigger is set when a bundle has been 
+	 * marked for lazy activation due to a successful class load.
+	 * @return true if the lazy trigger has been set
+	 * @since 3.6
+	 */
+	public boolean isLazyTriggerSet();
+
+	/**
+	 * Sets the lazy trigger for this delegate.  This will activate
+	 * the bundle if the bundle has been started with the activation
+	 * policy and the bundle's start level is met.
+	 * @throws BundleException if an error occurred while activating the bundle
+	 * @see ClassLoaderDelegate#isLazyTriggerSet()
+	 * @since 3.6
+	 */
+	public void setLazyTrigger() throws BundleException;
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegateHook.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegateHook.java
index 6e38cc1..e77e76d 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegateHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/adaptor/ClassLoaderDelegateHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,7 +119,6 @@ public interface ClassLoaderDelegateHook {
 	 * @param classLoader the bundle class loader
 	 * @param data the bundle data
 	 * @return the library found by this hook or null if normal delegation should continue
-	 * @throws FileNotFoundException to terminate the delegation
 	 */
 	public String postFindLibrary(String name, BundleClassLoader classLoader, BundleData data);
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/util/ObjectPool.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/util/ObjectPool.java
new file mode 100644
index 0000000..e80bd1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/framework/util/ObjectPool.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osgi.framework.util;
+
+import java.lang.ref.WeakReference;
+import java.util.Map;
+import java.util.WeakHashMap;
+import org.eclipse.osgi.framework.debug.Debug;
+import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
+
+public class ObjectPool {
+	private static String OPTION_DEBUG_OBJECTPOOL_ADDS = Debug.ECLIPSE_OSGI + "/debug/objectPool/adds"; //$NON-NLS-1$
+	private static String OPTION_DEBUG_OBJECTPOOL_DUPS = Debug.ECLIPSE_OSGI + "/debug/objectPool/dups"; //$NON-NLS-1$
+	private static final boolean DEBUG_OBJECTPOOL_ADDS;
+	private static final boolean DEBUG_OBJECTPOOL_DUPS;
+	private static Map objectCache = new WeakHashMap();
+	static {
+		FrameworkDebugOptions dbgOptions = FrameworkDebugOptions.getDefault();
+		if (dbgOptions != null) {
+			DEBUG_OBJECTPOOL_ADDS = dbgOptions.getBooleanOption(OPTION_DEBUG_OBJECTPOOL_ADDS, false);
+			DEBUG_OBJECTPOOL_DUPS = dbgOptions.getBooleanOption(OPTION_DEBUG_OBJECTPOOL_DUPS, false);
+		} else {
+			DEBUG_OBJECTPOOL_ADDS = false;
+			DEBUG_OBJECTPOOL_DUPS = false;
+		}
+	}
+
+	public static Object intern(Object obj) {
+		synchronized (objectCache) {
+			WeakReference ref = (WeakReference) objectCache.get(obj);
+			if (ref != null) {
+				Object refValue = ref.get();
+				if (refValue != null) {
+					obj = refValue;
+					if (DEBUG_OBJECTPOOL_DUPS)
+						Debug.println("[ObjectPool] Found duplicate object: " + getObjectString(obj)); //$NON-NLS-1$
+				}
+			} else {
+				objectCache.put(obj, new WeakReference(obj));
+				if (DEBUG_OBJECTPOOL_ADDS)
+					Debug.println("[ObjectPool] Added unique object to pool: " + getObjectString(obj) + " Pool size: " + objectCache.size()); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		return obj;
+	}
+
+	private static String getObjectString(Object obj) {
+		return "[(" + obj.getClass().getName() + ") " + obj.toString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/NativeCodeDescription.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
index 854aa80..c788a99 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/NativeCodeDescription.java
@@ -63,13 +63,14 @@ public interface NativeCodeDescription extends BaseDescription, Comparable {
 	public Filter getFilter();
 
 	/**
-	 * Native code descriptions are sorted in by the following preferences
+	 * Native code descriptions are sorted with the following preferences:
 	 * <ul>
 	 * <li>The minimum version of the os version ranges</li>
 	 * <li>The language<li>
 	 * </ul>
-	 * @param other
-	 * @return
+	 * @param other the native code description to be compared
+	 * @return a negative integer, zero, or a positive integer as this natve
+	 * code description is less than, equal to, or greater than the specified object.
 	 */
 	public int compareTo(Object other);
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateHelper.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateHelper.java
index 78b6a69..a5156eb 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateHelper.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,12 +33,25 @@ public interface StateHelper {
 
 	/**
 	 * An option to include packages available from the execution environment when 
-	 * getting the visible packages of a bundle.
+	 * getting the visible packages of a bundle.  For example, when running on a 
+	 * J2SE 1.4 VM the system bundle will export the javax.xml.parsers package as part of the 
+	 * execution environment.  When this option is used then any packages from the execution
+	 * environment which the bundle is wired to will be included.
 	 * @see StateHelper#getVisiblePackages(BundleDescription, int)
 	 */
 	public static int VISIBLE_INCLUDE_EE_PACKAGES = 0x01;
 
 	/**
+	 * An option to get all visible packages that a host bundle is currently wired to.  This 
+	 * includes packages wired to as a result of a dynamic import and packages wired to as a 
+	 * result of additional constraints specified by a fragment bundle.  Using this option 
+	 * with a fragment will cause an empty array to be returned.
+	 * @see StateHelper#getVisiblePackages(BundleDescription, int)
+	 * @since 3.6
+	 */
+	public static int VISIBLE_INCLUDE_ALL_HOST_WIRES = 0x02;
+
+	/**
 	 * Returns all bundles in the state depending on the given bundles. The given bundles
 	 * appear in the returned array.
 	 * 
@@ -158,23 +171,10 @@ public interface StateHelper {
 
 	/**
 	 * Returns a list of all packages that the specified bundle has access to which are
-	 * exported by other bundles.  This takes into account all constraint specifications
-	 * from the specified bundle (Import-Package, Require-Bundle etc).  A deep dependancy
-	 * search is done for all packages which are available through the required bundles and 
-	 * any bundles which are reexported.  This method also takes into account all directives
-	 * which may be specified on the constraint specifications (e.g. uses, x-friends etc.)
-	 * <p>
-	 * The returned list will not include any packages which are exported by the system bundle 
-	 * on the behave of the running execution environment.  For example, when running on a 
-	 * 1.4.2 JRE the system bundle will export the javax.xml.parsers package.  These types of 
-	 * system packages will are not included in the returned list.
-	 * <p>
-	 * Note that only the constraints declared by the specified bundle are taken into
-	 * account.  In the case of fragment bundles, the constraints declared by the host are 
-	 * not included in the list of visible packages.
+	 * exported by other bundles.
 	 * <p>
 	 * Same as calling getVisiblePackages(bundle, 0)
-	 * 
+	 * </p>
 	 * @param bundle a bundle to get the list of packages for.
 	 * @return a list of all packages that the specified bundle has access to which are
 	 * exported by other bundles.
@@ -184,20 +184,17 @@ public interface StateHelper {
 	/**
 	 * Returns a list of all packages that the specified bundle has access to which are
 	 * exported by other bundles.  This takes into account all constraint specifications
-	 * from the specified bundle (Import-Package, Require-Bundle etc).  A deep dependancy
-	 * search is done for all packages which are available through the required bundles and 
-	 * any bundles which are reexported.  This method also takes into account all directives
+	 * (Import-Package, Require-Bundle etc).  A deep dependency search is done for all 
+	 * packages which are available through the required bundles and any bundles which 
+	 * are reexported.  This method also takes into account all directives
 	 * which may be specified on the constraint specifications (e.g. uses, x-friends etc.)
-	 * <p>
-	 * Note that only the constraints declared by the specified bundle are taken into
-	 * account.  In the case of fragment bundles, the constraints declared by the host are 
-	 * not included in the list of visible packages.
 	 * 
 	 * @param bundle a bundle to get the list of packages for.
 	 * @param options the options for selecting the visible packages
 	 * @return a list of all packages that the specified bundle has access to which are
 	 * exported by other bundles.
 	 * @see StateHelper#VISIBLE_INCLUDE_EE_PACKAGES
+	 * @see StateHelper#VISIBLE_INCLUDE_ALL_HOST_WIRES
 	 * @since 3.3
 	 */
 	public ExportPackageDescription[] getVisiblePackages(BundleDescription bundle, int options);
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateObjectFactory.java b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateObjectFactory.java
index 3499de7..37cc205 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateObjectFactory.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/StateObjectFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,7 +54,8 @@ public interface StateObjectFactory {
 	/**
 	 * Creates a new state that is a copy of the given state. The returned state 
 	 * will contain copies of all bundle descriptions in the given state. No data 
-	 * pertaining to resolution is copied.
+	 * pertaining to resolution is copied.  The returned state will have a 
+	 * new resolver attached to it.
 	 *  
 	 * @param state a state to be copied
 	 * @return the created state
diff --git a/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/package.html b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/package.html
new file mode 100644
index 0000000..04babd0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the Equinox resolver API.
+<h2>
+Package Specification</h2>
+This package specifies the API for Equinox resolver.
+<p>
+Clients that need access to the Equinox runtime resolver will likely be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/CommandInterpreter.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/CommandInterpreter.java
index 213b814..4289fea 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/CommandInterpreter.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/CommandInterpreter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,18 +26,19 @@ import org.osgi.framework.Bundle;
  */
 public interface CommandInterpreter {
 	/**
-	 *	Get the next argument in the input.
-	 *	
-	 *	E.g. if the commandline is hello world, the _hello method
-	 *	will get "world" as the first argument.
+	 * Get the next argument in the input.  If no arguments are left then null is returned.
+	 *
+	 * E.g. if the commandline is hello world, the _hello method
+	 * will get "world" as the first argument.
+	 * @return the next argument or null if no arguments are left.
 	 */
 	public String nextArgument();
 
 	/**
-	 *	Execute a command line as if it came from the end user
-	 *	and return the result.
-	 *           
-	 *          Throws any exceptions generated by the command that executed.
+	 * Execute a command line as if it came from the end user
+	 * and return the result.
+	 * @param cmd The command line to execute.
+	 * @return the result of the command.
 	 */
 	public Object execute(String cmd);
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java
new file mode 100644
index 0000000..bb43b14
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/ConsoleSession.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osgi.framework.console;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import org.osgi.framework.*;
+
+/**
+ * A console session service provides the input and output to a single console session.
+ * The input will be used by the console to read in console commands.  The output will
+ * be used to print the results of console commands. 
+ * <p>
+ * The console session must be registered as an OSGi service in order to be associated 
+ * with a console instance. The console implementation will discover any console session 
+ * services and will create a new console instance using the console session for input and 
+ * output.  When a session is closed then the console session service will be unregistered 
+ * and the console instance will terminate and be disposed of.  The console instance will 
+ * also terminate if the console session service is unregistered for any reason.
+ * </p>
+ * @since 3.6
+ */
+public abstract class ConsoleSession implements ServiceFactory {
+	private volatile ServiceRegistration sessionRegistration;
+
+	/**
+	 * Called by the console implementation to free resources associated
+	 * with this console session.  This method will result in the console
+	 * session service being unregistered from the service registry.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public final void close() {
+		doClose();
+		ServiceRegistration current = sessionRegistration;
+		if (current != null) {
+			sessionRegistration = null;
+			try {
+				current.unregister();
+			} catch (IllegalStateException e) {
+				// This can happen if the service is in the process of being 
+				// unregistered or if another thread unregistered the service.
+				// Ignoring the exception.
+			}
+		}
+	}
+
+	/**
+	 * Called by the {@link #close()} method to free resources associated 
+	 * with this console session.  For example, closing the streams 
+	 * associated with the input and output for this session.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected abstract void doClose();
+
+	/**
+	 * Returns the input for this console session.  This input will be used
+	 * to read console commands from the user of the session.
+	 * @return the input for this console session
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public abstract InputStream getInput();
+
+	/**
+	 * Returns the output for this console session.  This output will be 
+	 * used to write the results of console commands.
+	 * @return the output for this console session.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public abstract OutputStream getOutput();
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public final Object getService(Bundle bundle, ServiceRegistration registration) {
+		if (sessionRegistration == null)
+			sessionRegistration = registration;
+		return this;
+	}
+
+	/**
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public final void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
+		// do nothing
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/package.html b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/package.html
new file mode 100644
index 0000000..d140bf5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/console/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides services related to the Equinox console.
+<h2>
+Package Specification</h2>
+This package specifies the API for services related to the Equinox console.
+<p>
+Clients which provide commands or provide sessions to the Equinox console 
+will likely be interested in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/eventmgr/package.html b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/eventmgr/package.html
new file mode 100644
index 0000000..41e344c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/eventmgr/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the event manager API.
+<h2>
+Package Specification</h2>
+This package specifies the API for the event manager.
+<p>
+Clients which implement an event bus to deliver synchronous and/or asynchronous
+events to listeners will likely be interested in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/AbstractBundle.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/AbstractBundle.java
index f9e1f2f..4e33972 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/AbstractBundle.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/AbstractBundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ import org.eclipse.osgi.framework.util.KeyedElement;
 import org.eclipse.osgi.internal.composite.CompositeImpl;
 import org.eclipse.osgi.internal.composite.SurrogateImpl;
 import org.eclipse.osgi.internal.loader.BundleLoader;
-import org.eclipse.osgi.internal.permadmin.EquinoxProtectionDomain;
 import org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.ResolverError;
@@ -48,7 +47,7 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 	/** Internal object used for state change synchronization */
 	protected Object statechangeLock = new Object();
 	/** ProtectionDomain for the bundle */
-	protected EquinoxProtectionDomain domain;
+	protected BundleProtectionDomain domain;
 
 	volatile protected ManifestLocalization manifestLocalization = null;
 
@@ -196,6 +195,11 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 		return ((state & (ACTIVE | STARTING)) != 0);
 	}
 
+	boolean isLazyStart() {
+		int status = bundledata.getStatus();
+		return (status & Constants.BUNDLE_ACTIVATION_POLICY) != 0 && (status & Constants.BUNDLE_LAZY_START) != 0;
+	}
+
 	/**
 	 * Return true if the bundle is resolved.
 	 *  
@@ -1290,7 +1294,7 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 	public BundleException getResolutionFailureException() {
 		BundleDescription bundleDescription = getBundleDescription();
 		if (bundleDescription == null)
-			return new BundleException(Msg.BUNDLE_UNRESOLVED_EXCEPTION, BundleException.RESOLVE_ERROR);
+			return new BundleException(NLS.bind(Msg.BUNDLE_UNRESOLVED_EXCEPTION, this.toString()), BundleException.RESOLVE_ERROR);
 		// just a sanity check - this would be an inconsistency between the framework and the state
 		if (bundleDescription.isResolved())
 			return new BundleException(Msg.BUNDLE_UNRESOLVED_STATE_CONFLICT, BundleException.RESOLVE_ERROR);
@@ -1300,7 +1304,7 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 	private BundleException getResolverError(BundleDescription bundleDesc) {
 		ResolverError[] errors = framework.adaptor.getState().getResolverErrors(bundleDesc);
 		if (errors == null || errors.length == 0)
-			return new BundleException(Msg.BUNDLE_UNRESOLVED_EXCEPTION, BundleException.RESOLVE_ERROR);
+			return new BundleException(NLS.bind(Msg.BUNDLE_UNRESOLVED_EXCEPTION, this.toString()), BundleException.RESOLVE_ERROR);
 		StringBuffer message = new StringBuffer();
 		int errorType = BundleException.RESOLVE_ERROR;
 		for (int i = 0; i < errors.length; i++) {
@@ -1310,7 +1314,7 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 			if (i < errors.length - 1)
 				message.append(", "); //$NON-NLS-1$
 		}
-		return new BundleException(NLS.bind(Msg.BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION, message.toString()), errorType);
+		return new BundleException(NLS.bind(Msg.BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION, this.toString(), message.toString()), errorType);
 	}
 
 	public int getKeyHashCode() {
@@ -1379,11 +1383,14 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 		if (filePattern != null)
 			try {
 				// create a file pattern filter with 'filename' as the key
-				patternFilter = FilterImpl.newInstance("(filename=" + filePattern + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+				patternFilter = FilterImpl.newInstance("(filename=" + sanitizeFilterInput(filePattern) + ")"); //$NON-NLS-1$ //$NON-NLS-2$
 				// create a single hashtable to be shared during the recursive search
 				patternProps = new Hashtable(2);
 			} catch (InvalidSyntaxException e) {
-				// cannot happen
+				// something unexpected happened; log error and return nothing
+				Bundle b = framework.systemBundle;
+				framework.publishFrameworkEvent(FrameworkEvent.ERROR, b, e);
+				return null;
 			}
 		// find the local entries of this bundle
 		findLocalEntryPaths(path, patternFilter, patternProps, recurse, pathList);
@@ -1446,6 +1453,46 @@ public abstract class AbstractBundle implements Bundle, Comparable, KeyedElement
 		};
 	}
 
+	private String sanitizeFilterInput(String filePattern) throws InvalidSyntaxException {
+		StringBuffer buffer = null;
+		boolean foundEscape = false;
+		for (int i = 0; i < filePattern.length(); i++) {
+			char c = filePattern.charAt(i);
+			switch (c) {
+				case '\\' :
+					// we either used the escape found or found a new escape.
+					foundEscape = foundEscape ? false : true;
+					if (buffer != null)
+						buffer.append(c);
+					break;
+				case '(' :
+				case ')' :
+					if (!foundEscape) {
+						if (buffer == null) {
+							buffer = new StringBuffer(filePattern.length() + 16);
+							buffer.append(filePattern.substring(0, i));
+						}
+						// must escape with '\'
+						buffer.append('\\');
+					} else {
+						foundEscape = false; // used the escape found
+					}
+					if (buffer != null)
+						buffer.append(c);
+					break;
+				default :
+					// if we found an escape it has been used
+					foundEscape = false;
+					if (buffer != null)
+						buffer.append(c);
+					break;
+			}
+		}
+		if (foundEscape)
+			throw new InvalidSyntaxException("Trailing escape characters must be escaped.", filePattern); //$NON-NLS-1$
+		return buffer == null ? filePattern : buffer.toString();
+	}
+
 	protected void findLocalEntryPaths(String path, Filter patternFilter, Hashtable patternProps, boolean recurse, List pathList) {
 		Enumeration entryPaths = bundledata.getEntryPaths(path);
 		if (entryPaths == null)
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleFragment.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleFragment.java
index 5be67f3..453360a 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleFragment.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleFragment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -178,7 +178,7 @@ public class BundleFragment extends AbstractBundle {
 			try {
 				framework.checkAdminPermission(this, AdminPermission.CLASS);
 			} catch (SecurityException e) {
-				throw new ClassNotFoundException();
+				throw new ClassNotFoundException(name, e);
 			}
 			checkValid();
 		}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleHost.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleHost.java
index 2a4a522..4e40f9b 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleHost.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/BundleHost.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 
 public class BundleHost extends AbstractBundle {
+	public static final int LAZY_TRIGGER = 0x40000000;
 	/** 
 	 * The BundleLoader proxy; a lightweight object that acts as a proxy
 	 * to the BundleLoader and allows lazy creation of the BundleLoader object
@@ -221,7 +222,7 @@ public class BundleHost extends AbstractBundle {
 			try {
 				framework.checkAdminPermission(this, AdminPermission.CLASS);
 			} catch (SecurityException e) {
-				throw new ClassNotFoundException();
+				throw new ClassNotFoundException(name, e);
 			}
 		}
 		BundleLoader loader = checkLoader();
@@ -235,7 +236,7 @@ public class BundleHost extends AbstractBundle {
 			if (!(e instanceof StatusException) && (bundledata.getStatus() & Constants.BUNDLE_LAZY_START) != 0 && !testStateChanging(Thread.currentThread()))
 				try {
 					// only start the bundle if this is a simple CNFE
-					framework.secureAction.start(this, START_TRANSIENT);
+					loader.setLazyTrigger();
 				} catch (BundleException be) {
 					framework.adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.WARNING, 0, be.getMessage(), 0, be, null));
 				}
@@ -303,14 +304,8 @@ public class BundleHost extends AbstractBundle {
 		}
 		if (!framework.active || (state & ACTIVE) != 0)
 			return;
-
-		if (state == INSTALLED) {
-			if (!framework.packageAdmin.resolveBundles(new Bundle[] {this}))
-				throw getResolutionFailureException();
-		}
-
 		if (getStartLevel() > framework.startLevelManager.getStartLevel()) {
-			if ((options & START_TRANSIENT) != 0) {
+			if ((options & LAZY_TRIGGER) == 0 && (options & START_TRANSIENT) != 0) {
 				// throw exception if this is a transient start
 				String msg = NLS.bind(Msg.BUNDLE_TRANSIENT_START_ERROR, this);
 				// Use a StatusException to indicate to the lazy starter that this should result in a warning
@@ -318,6 +313,12 @@ public class BundleHost extends AbstractBundle {
 			}
 			return;
 		}
+
+		if (state == INSTALLED) {
+			if (!framework.packageAdmin.resolveBundles(new Bundle[] {this}))
+				throw getResolutionFailureException();
+		}
+
 		if ((options & START_ACTIVATION_POLICY) != 0 && (bundledata.getStatus() & Constants.BUNDLE_LAZY_START) != 0) {
 			// the bundle must use the activation policy here.
 			if ((state & RESOLVED) != 0) {
@@ -334,6 +335,23 @@ public class BundleHost extends AbstractBundle {
 			Debug.println("Bundle: Active sl = " + framework.startLevelManager.getStartLevel() + "; Bundle " + getBundleId() + " sl = " + getStartLevel()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		}
 
+		if ((options & LAZY_TRIGGER) != 0) {
+			if ((state & RESOLVED) != 0) {
+				// Should publish the lazy activation event here before the starting event
+				// This can happen if another bundle in the same start-level causes a class load from the lazy start bundle.
+				state = STARTING;
+				// release the state change lock before sending lazy activation event (bug 258659)
+				completeStateChange();
+				framework.publishBundleEvent(BundleEvent.LAZY_ACTIVATION, this);
+				beginStateChange();
+				if (state != STARTING) {
+					// while firing the LAZY_ACTIVATION event some one else caused the bundle to transition
+					// out of STARTING.  This could have happened because some listener called start on the bundle
+					// or another class load could have caused the start trigger to get fired again.
+					return;
+				}
+			}
+		}
 		state = STARTING;
 		framework.publishBundleEvent(BundleEvent.STARTING, this);
 		context = getContext();
@@ -408,11 +426,13 @@ public class BundleHost extends AbstractBundle {
 		// Return false if the bundle is not persistently marked for start
 		if ((status & Constants.BUNDLE_STARTED) == 0)
 			return false;
-		if ((status & Constants.BUNDLE_ACTIVATION_POLICY) == 0 || (status & Constants.BUNDLE_LAZY_START) == 0)
+		if ((status & Constants.BUNDLE_ACTIVATION_POLICY) == 0 || (status & Constants.BUNDLE_LAZY_START) == 0 || isLazyTriggerSet())
 			return true;
-		if (!isResolved())
-			// should never transition from UNRESOLVED -> STARTING
-			return false;
+		if (!isResolved()) {
+			if (framework.getAdaptor().getState().isResolved() || !framework.packageAdmin.resolveBundles(new Bundle[] {this}))
+				// should never transition from UNRESOLVED -> STARTING
+				return false;
+		}
 		// now we can publish the LAZY_ACTIVATION event
 		state = STARTING;
 		// release the state change lock before sending lazy activation event (bug 258659)
@@ -421,6 +441,13 @@ public class BundleHost extends AbstractBundle {
 		return false;
 	}
 
+	private synchronized boolean isLazyTriggerSet() {
+		if (proxy == null)
+			return false;
+		BundleLoader loader = proxy.getBasicBundleLoader();
+		return loader != null ? loader.isLazyTriggerSet() : false;
+	}
+
 	/**
 	 * Create a BundleContext for this bundle.
 	 *
@@ -626,4 +653,20 @@ public class BundleHost extends AbstractBundle {
 		bundleDescription.setUserObject(proxy);
 		return proxy;
 	}
+
+	/**
+	 * Gets the class loader for the host bundle.  This may end up 
+	 * creating the bundle class loader if it was not already created.
+	 * A null value may be returned if the bundle is not resolved.
+	 * @return the bundle class loader or null if the bundle is not resolved.
+	 */
+	public ClassLoader getClassLoader() {
+		SecurityManager sm = System.getSecurityManager();
+		if (sm != null)
+			sm.checkPermission(new RuntimePermission("getClassLoader")); //$NON-NLS-1$
+		BundleLoaderProxy curProxy = getLoaderProxy();
+		BundleLoader loader = curProxy == null ? null : curProxy.getBundleLoader();
+		BundleClassLoader bcl = loader == null ? null : loader.createClassLoader();
+		return (bcl instanceof ClassLoader) ? (ClassLoader) bcl : null;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/FilterImpl.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/FilterImpl.java
index 66b0c24..19180a2 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/FilterImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/FilterImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
index ff32d77..01aaee3 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -184,8 +184,7 @@ public class Framework implements EventDispatcher, EventPublisher, Runnable {
 		try {
 			adaptor.initializeStorage();
 		} catch (IOException e) /* fatal error */{
-			e.printStackTrace();
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 		if (Profile.PROFILE && Profile.STARTUP)
 			Profile.logTime("Framework.initialze()", "adapter storage initialized"); //$NON-NLS-1$//$NON-NLS-2$
@@ -201,7 +200,7 @@ public class Framework implements EventDispatcher, EventPublisher, Runnable {
 			securityAdmin = new SecurityAdmin(null, this, adaptor.getPermissionStorage());
 		} catch (IOException e) /* fatal error */{
 			e.printStackTrace();
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 		if (Profile.PROFILE && Profile.STARTUP)
 			Profile.logTime("Framework.initialze()", "done init props & new PermissionAdminImpl"); //$NON-NLS-1$//$NON-NLS-2$
@@ -281,7 +280,7 @@ public class Framework implements EventDispatcher, EventPublisher, Runnable {
 			systemBundle.getBundleData().setBundle(systemBundle);
 		} catch (BundleException e) { // fatal error
 			e.printStackTrace();
-			throw new RuntimeException(NLS.bind(Msg.OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION, e.getMessage()));
+			throw new RuntimeException(NLS.bind(Msg.OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION, e.getMessage()), e);
 		}
 	}
 
@@ -475,7 +474,8 @@ public class Framework implements EventDispatcher, EventPublisher, Runnable {
 				StringTokenizer st = new StringTokenizer(javaSpecVersion, " _-"); //$NON-NLS-1$
 				javaSpecVersion = st.nextToken();
 				String javaSpecName = properties.getProperty("java.specification.name"); //$NON-NLS-1$
-				if ("J2ME Foundation Specification".equals(javaSpecName)) //$NON-NLS-1$
+				// See bug 291269 we check for Foundation Specification and Foundation Profile Specification
+				if (javaSpecName != null && (javaSpecName.indexOf("Foundation Specification") >= 0 || javaSpecName.indexOf("Foundation Profile Specification") >= 0)) //$NON-NLS-1$ //$NON-NLS-2$
 					vmProfile = "CDC-" + javaSpecVersion + "_Foundation-" + javaSpecVersion; //$NON-NLS-1$ //$NON-NLS-2$
 				else {
 					// look for JavaSE if 1.6 or greater; otherwise look for J2SE
@@ -817,12 +817,6 @@ public class Framework implements EventDispatcher, EventPublisher, Runnable {
 	/**
 	 * Install a bundle from an InputStream.
 	 * 
-	 * <p>
-	 * This method performs all the steps listed in
-	 * {@link #installBundle(java.lang.String)}, except the bundle's content
-	 * will be read from the InputStream. The location identifier specified
-	 * will be used as the identity of the bundle.
-	 * 
 	 * @param location
 	 *            The location identifier of the bundle to install.
 	 * @param in
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/InternalSystemBundle.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/InternalSystemBundle.java
index b9e3f9c..1890cc5 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/InternalSystemBundle.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/InternalSystemBundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -212,7 +212,7 @@ public class InternalSystemBundle extends BundleHost implements org.osgi.framewo
 				Debug.printStackTrace(be.getNestedException() == null ? be : be.getNestedException());
 			}
 			framework.publishFrameworkEvent(FrameworkEvent.ERROR, framework.systemBundle, be);
-			throw new RuntimeException(be.getMessage());
+			throw new RuntimeException(be.getMessage(), be);
 		}
 
 	}
@@ -377,4 +377,7 @@ public class InternalSystemBundle extends BundleHost implements org.osgi.framewo
 		return framework.waitForStop(timeout);
 	}
 
+	public ClassLoader getClassLoader() {
+		return getClass().getClassLoader();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
index b01ca97..a286644 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -421,7 +421,7 @@ public class PackageAdminImpl implements PackageAdmin {
 		}
 		AbstractBundle[] refresh = (AbstractBundle[]) bundlesList.toArray(new AbstractBundle[bundlesList.size()]);
 		// first sort by id/start-level order
-		Util.sort(refresh);
+		Util.sort(refresh, 0, refresh.length);
 		// then sort by dependency order
 		framework.startLevelManager.sortByDependency(refresh);
 		boolean[] previouslyResolved = new boolean[refresh.length];
@@ -632,7 +632,20 @@ public class PackageAdminImpl implements PackageAdmin {
 		return ((AbstractBundle) bundle).isFragment() ? PackageAdmin.BUNDLE_TYPE_FRAGMENT : 0;
 	}
 
-	protected void cleanup() { //This is only called when the framework is shutting down
+	protected void cleanup() {
+		//This is only called when the framework is shutting down
+		synchronized (removalPendings) {
+			for (Iterator pendings = removalPendings.values().iterator(); pendings.hasNext();) {
+				List removals = (List) pendings.next();
+				for (Iterator iRemovals = removals.iterator(); iRemovals.hasNext();)
+					try {
+						((BundleData) iRemovals.next()).close();
+					} catch (IOException e) {
+						// ignore
+					}
+			}
+			removalPendings.clear();
+		}
 	}
 
 	protected void setResolvedBundles(InternalSystemBundle systemBundle) {
@@ -687,7 +700,7 @@ public class PackageAdminImpl implements PackageAdmin {
 			}
 		} catch (BundleException e) /* fatal error */{
 			e.printStackTrace();
-			throw new RuntimeException(NLS.bind(Msg.OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION, e.getMessage()));
+			throw new RuntimeException(NLS.bind(Msg.OSGI_SYSTEMBUNDLE_CREATE_EXCEPTION, e.getMessage()), e);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java
index 2836cfc..96e0c20 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/StartLevelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,6 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 	/** An object used to lock the active startlevel while it is being referenced */
 	private final Object lock = new Object();
 	private final Framework framework;
-	volatile private boolean settingStartLevel = false;
 
 	/** This constructor is called by the Framework */
 	protected StartLevelManager(Framework framework) {
@@ -224,7 +223,6 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 	 */
 	void doSetStartLevel(int newSL) {
 		synchronized (lock) {
-			settingStartLevel = true;
 			ClassLoader previousTCCL = Thread.currentThread().getContextClassLoader();
 			ClassLoader contextFinder = framework.getContextFinder();
 			if (contextFinder == previousTCCL)
@@ -235,19 +233,17 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 				int tempSL = activeSL;
 				if (newSL > tempSL) {
 					boolean launching = tempSL == 0;
-					if (launching) {
-						// TODO this technically should be done just before firing the STARTED event for the system bundle; 
-						// TODO State is set to ACTIVE here because some depend on the the system bundle being in the ACTIVE state when they are starting 
-						framework.systemBundle.state = Bundle.ACTIVE;
-					}
 					for (int i = tempSL; i < newSL; i++) {
 						if (Debug.DEBUG && Debug.DEBUG_STARTLEVEL) {
 							Debug.println("sync - incrementing Startlevel from " + tempSL); //$NON-NLS-1$
 						}
 						tempSL++;
+						// Note that we must get a new list of installed bundles each time;
+						// this is because additional bundles could have been installed from the previous start-level
 						incFWSL(i + 1, getInstalledBundles(framework.bundles, false));
 					}
 					if (launching) {
+						framework.systemBundle.state = Bundle.ACTIVE;
 						framework.publishBundleEvent(BundleEvent.STARTED, framework.systemBundle);
 						framework.publishFrameworkEvent(FrameworkEvent.STARTED, framework.systemBundle, null);
 					}
@@ -273,7 +269,6 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 			} finally {
 				if (contextFinder != null)
 					Thread.currentThread().setContextClassLoader(previousTCCL);
-				settingStartLevel = false;
 			}
 		}
 	}
@@ -461,7 +456,7 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 		// save the startlevel
 		saveActiveStartLevel(incToSL);
 		// resume all bundles at the startlevel
-		resumeBundles(launchBundles);
+		resumeBundles(launchBundles, incToSL);
 	}
 
 	/**
@@ -539,22 +534,31 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 	}
 
 	/**
-	 *  Resume all bundles in the launch list
+	 *  Resume all bundles in the launch list at the specified start-level
 	 * @param launch a list of Bundle Objects to launch
+	 * @param currentSL the current start-level that the bundles must meet to be resumed
 	 */
-	private void resumeBundles(AbstractBundle[] launch) {
-		/* Resume all bundles that were previously started and whose startlevel is <= the active startlevel */
-		int fwsl = getStartLevel();
+	private void resumeBundles(AbstractBundle[] launch, int currentSL) {
+		// Resume all bundles that were previously started and whose startlevel is <= the active startlevel
+		// first resume the lazy activated bundles
+		resumeBundles(launch, true, currentSL);
+		// now resume all non lazy bundles
+		resumeBundles(launch, false, currentSL);
+	}
+
+	private void resumeBundles(AbstractBundle[] launch, boolean lazyOnly, int currentSL) {
 		for (int i = 0; i < launch.length && !framework.isForcedRestart(); i++) {
 			int bsl = launch[i].getStartLevel();
-			if (bsl < fwsl) {
+			if (bsl < currentSL) {
 				// skip bundles who should have already been started
 				continue;
-			} else if (bsl == fwsl) {
+			} else if (bsl == currentSL) {
 				if (Debug.DEBUG && Debug.DEBUG_STARTLEVEL) {
-					Debug.println("SLL: Active sl = " + fwsl + "; Bundle " + launch[i].getBundleId() + " sl = " + bsl); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					Debug.println("SLL: Active sl = " + currentSL + "; Bundle " + launch[i].getBundleId() + " sl = " + bsl); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				}
-				framework.resumeBundle(launch[i]);
+				boolean isLazyStart = launch[i].isLazyStart();
+				if (lazyOnly ? isLazyStart : !isLazyStart)
+					framework.resumeBundle(launch[i]);
 			} else {
 				// can stop resuming bundles since any remaining bundles have a greater startlevel than the framework active startlevel
 				break;
@@ -696,8 +700,4 @@ public class StartLevelManager implements EventDispatcher, EventListener, StartL
 			}
 		}
 	}
-
-	public boolean isSettingStartLevel() {
-		return settingStartLevel;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Util.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Util.java
index cff8686..de5683c 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Util.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ public class Util {
 	 *
 	 * @param array	The array of objects to sort
 	 */
-	public static void sort(Object[] array) {
-		qsort(array, 0, array.length - 1);
+	public static void sortByString(Object[] array) {
+		qSortByString(array, 0, array.length - 1);
 	}
 
 	/**
@@ -39,7 +39,7 @@ public class Util {
 	 * @exception	ArrayIndexOutOfBoundsException when <code>start < 0</code>
 	 *				or <code>end >= array.length</code>
 	 */
-	public static void qsort(Object[] array, int start, int stop) {
+	public static void qSortByString(Object[] array, int start, int stop) {
 		if (start >= stop)
 			return;
 
@@ -71,11 +71,11 @@ public class Util {
 		}
 		// sort the left partition, if the right index has not reached the left side of array
 		if (start < right) {
-			qsort(array, start, right);
+			qSortByString(array, start, right);
 		}
 		// sort the right partition, if the left index has not reached the right side of array
 		if (left < stop) {
-			qsort(array, left, stop);
+			qSortByString(array, left, stop);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/ContentHandlerFactory.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/ContentHandlerFactory.java
index f667aab..5e296dd 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/ContentHandlerFactory.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/ContentHandlerFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -147,7 +147,7 @@ public class ContentHandlerFactory extends MultiplexingFactory implements java.n
 			return (ContentHandler) createInternalContentHandlerMethod.invoke(factory, new Object[] {contentType});
 		} catch (Exception e) {
 			adaptor.getFrameworkLog().log(new FrameworkLogEntry(ContentHandlerFactory.class.getName(), "findAuthorizedContentHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingFactory.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingFactory.java
index 68dba2c..1761141 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingFactory.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2006, 2010 Cognos Incorporated, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public abstract class MultiplexingFactory {
 	private ServiceTracker packageAdminTracker;
 
 	// used to get access to the protected SecurityManager#getClassContext method
-	private static class InternalSecurityManager extends SecurityManager {
+	static class InternalSecurityManager extends SecurityManager {
 		public Class[] getClassContext() {
 			return super.getClassContext();
 		}
@@ -48,14 +48,11 @@ public abstract class MultiplexingFactory {
 
 	abstract public Object getParentFactory();
 
-	public synchronized boolean isMultiplexing() {
-		return factories != null;
+	public boolean isMultiplexing() {
+		return getFactories() != null;
 	}
 
-	public synchronized void register(Object factory) {
-		if (factories == null)
-			factories = new LinkedList();
-
+	public void register(Object factory) {
 		// set parent for each factory so they can do proper delegation
 		try {
 			Class clazz = factory.getClass();
@@ -63,15 +60,13 @@ public abstract class MultiplexingFactory {
 			setParentFactory.invoke(factory, new Object[] {getParentFactory()});
 		} catch (Exception e) {
 			adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "register", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
-		factories.add(factory);
+		addFactory(factory);
 	}
 
-	public synchronized void unregister(Object factory) {
-		factories.remove(factory);
-		if (factories.isEmpty())
-			factories = null;
+	public void unregister(Object factory) {
+		removeFactory(factory);
 		// close the service tracker
 		try {
 			// this is brittle; if class does not directly extend MultplexingFactory then this method will not exist, but we do not want a public method here
@@ -80,27 +75,33 @@ public abstract class MultiplexingFactory {
 			closeTracker.invoke(factory, null);
 		} catch (Exception e) {
 			adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "unregister", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 	}
 
-	public synchronized Object designateSuccessor() {
-		Object parentFactory = getParentFactory();
-		if (factories == null || factories.isEmpty())
-			return parentFactory;
-
-		Object successor = factories.remove(0);
+	public Object designateSuccessor() {
+		List released = releaseFactories();
+		// Note that we do this outside of the sync block above.
+		// This is only possible because we do additional locking outside of
+		// this class to ensure no other threads are trying to manipulate the
+		// list of registered factories.  See Framework class the following methods:
+		// Framework.installURLStreamHandlerFactory(BundleContext, FrameworkAdaptor)
+		// Framework.installContentHandlerFactory(BundleContext, FrameworkAdaptor)
+		// Framework.uninstallURLStreamHandlerFactory
+		// Framework.uninstallContentHandlerFactory()
+		if (released == null || released.isEmpty())
+			return getParentFactory();
+		Object successor = released.remove(0);
 		try {
 			Class clazz = successor.getClass();
 			Method register = clazz.getMethod("register", new Class[] {Object.class}); //$NON-NLS-1$		
-			for (Iterator it = factories.iterator(); it.hasNext();) {
+			for (Iterator it = released.iterator(); it.hasNext();) {
 				register.invoke(successor, new Object[] {it.next()});
 			}
 		} catch (Exception e) {
 			adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "designateSuccessor", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
-		factories = null;
 		closePackageAdminTracker(); // close tracker
 		return successor;
 	}
@@ -109,7 +110,8 @@ public abstract class MultiplexingFactory {
 		packageAdminTracker.close();
 	}
 
-	public synchronized Object findAuthorizedFactory(List ignoredClasses) {
+	public Object findAuthorizedFactory(List ignoredClasses) {
+		List current = getFactories();
 		Class[] classStack = internalSecurityManager.getClassContext();
 		for (int i = 0; i < classStack.length; i++) {
 			Class clazz = classStack[i];
@@ -117,9 +119,9 @@ public abstract class MultiplexingFactory {
 				continue;
 			if (hasAuthority(clazz))
 				return this;
-			if (factories == null)
+			if (current == null)
 				continue;
-			for (Iterator it = factories.iterator(); it.hasNext();) {
+			for (Iterator it = current.iterator(); it.hasNext();) {
 				Object factory = it.next();
 				try {
 					Method hasAuthorityMethod = factory.getClass().getMethod("hasAuthority", new Class[] {Class.class}); //$NON-NLS-1$
@@ -128,7 +130,7 @@ public abstract class MultiplexingFactory {
 					}
 				} catch (Exception e) {
 					adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "findAuthorizedURLStreamHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-					throw new RuntimeException(e.getMessage());
+					throw new RuntimeException(e.getMessage(), e);
 				}
 			}
 		}
@@ -142,4 +144,29 @@ public abstract class MultiplexingFactory {
 		}
 		return false;
 	}
+
+	private synchronized List getFactories() {
+		return factories;
+	}
+
+	private synchronized List releaseFactories() {
+		if (factories == null)
+			return null;
+
+		List released = new LinkedList(factories);
+		factories = null;
+		return released;
+	}
+
+	private synchronized void addFactory(Object factory) {
+		List updated = (factories == null) ? new LinkedList() : new LinkedList(factories);
+		updated.add(factory);
+		factories = updated;
+	}
+
+	private synchronized void removeFactory(Object factory) {
+		List updated = new LinkedList(factories);
+		updated.remove(factory);
+		factories = updated.isEmpty() ? null : updated;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingURLStreamHandler.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingURLStreamHandler.java
index e14228b..b7dadfc 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingURLStreamHandler.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/MultiplexingURLStreamHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2006, 2010 Cognos Incorporated, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -97,7 +97,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "openConnection", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new MalformedURLException();
@@ -112,7 +112,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "equals", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -127,7 +127,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "getDefaultPort", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -142,7 +142,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "hashCode", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -157,7 +157,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "hashCode", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -172,7 +172,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "hostsEqual", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -190,7 +190,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "parseURL", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -205,7 +205,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "sameFile", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -223,7 +223,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "setURL", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
@@ -238,7 +238,7 @@ public class MultiplexingURLStreamHandler extends URLStreamHandler {
 				throw (RuntimeException) e.getTargetException();
 			} catch (Exception e) {
 				factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), "toExternalForm", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-				throw new RuntimeException(e.getMessage());
+				throw new RuntimeException(e.getMessage(), e);
 			}
 		}
 		throw new IllegalStateException();
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.java
index 46cd55e..10c5d03 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/StreamHandlerFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,6 +50,7 @@ public class StreamHandlerFactory extends MultiplexingFactory implements URLStre
 	}
 	private Hashtable proxies;
 	private URLStreamHandlerFactory parentFactory;
+	private ThreadLocal creatingProtocols = new ThreadLocal();
 
 	/**
 	 * Create the factory.
@@ -97,26 +98,49 @@ public class StreamHandlerFactory extends MultiplexingFactory implements URLStre
 	 * @return a URLStreamHandler for the specific protocol.
 	 */
 	public URLStreamHandler createURLStreamHandler(String protocol) {
-		//first check for built in handlers
-		String builtInHandlers = secureAction.getProperty(PROTOCOL_HANDLER_PKGS);
-		Class clazz = getBuiltIn(protocol, builtInHandlers, false);
-		if (clazz != null)
-			return null; // let the VM handle it
-		URLStreamHandler result = null;
-		if (isMultiplexing()) {
-			if (findAuthorizedURLStreamHandler(protocol) != null)
-				result = new MultiplexingURLStreamHandler(protocol, this);
-		} else {
-			result = createInternalURLStreamHandler(protocol);
+		// Check if we are recursing
+		if (isRecursive(protocol))
+			return null;
+		try {
+			//first check for built in handlers
+			String builtInHandlers = secureAction.getProperty(PROTOCOL_HANDLER_PKGS);
+			Class clazz = getBuiltIn(protocol, builtInHandlers, false);
+			if (clazz != null)
+				return null; // let the VM handle it
+			URLStreamHandler result = null;
+			if (isMultiplexing()) {
+				if (findAuthorizedURLStreamHandler(protocol) != null)
+					result = new MultiplexingURLStreamHandler(protocol, this);
+			} else {
+				result = createInternalURLStreamHandler(protocol);
+			}
+			// if parent is present do parent lookup
+			if (result == null && parentFactory != null)
+				result = parentFactory.createURLStreamHandler(protocol);
+			return result; //result may be null; let the VM handle it (consider sun.net.protocol.www.*)
+		} finally {
+			releaseRecursive(protocol);
 		}
-		// if parent is present do parent lookup
-		if (result == null && parentFactory != null)
-			result = parentFactory.createURLStreamHandler(protocol);
-		return result; //result may be null; let the VM handle it (consider sun.net.protocol.www.*)
 	}
 
-	public URLStreamHandler createInternalURLStreamHandler(String protocol) {
+	private boolean isRecursive(String protocol) {
+		List protocols = (List) creatingProtocols.get();
+		if (protocols == null) {
+			protocols = new ArrayList(1);
+			creatingProtocols.set(protocols);
+		}
+		if (protocols.contains(protocol))
+			return true;
+		protocols.add(protocol);
+		return false;
+	}
+
+	private void releaseRecursive(String protocol) {
+		List protocols = (List) creatingProtocols.get();
+		protocols.remove(protocol);
+	}
 
+	public URLStreamHandler createInternalURLStreamHandler(String protocol) {
 		//internal protocol handlers
 		String internalHandlerPkgs = secureAction.getProperty(Constants.INTERNAL_HANDLER_PKGS);
 		internalHandlerPkgs = internalHandlerPkgs == null ? INTERNAL_PROTOCOL_HANDLER_PKG : internalHandlerPkgs + '|' + INTERNAL_PROTOCOL_HANDLER_PKG;
@@ -179,7 +203,7 @@ public class StreamHandlerFactory extends MultiplexingFactory implements URLStre
 			return (URLStreamHandler) createInternalURLStreamHandlerMethod.invoke(factory, new Object[] {protocol});
 		} catch (Exception e) {
 			adaptor.getFrameworkLog().log(new FrameworkLogEntry(StreamHandlerFactory.class.getName(), "findAuthorizedURLStreamHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/URLStreamHandlerFactoryProxyFor15.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/URLStreamHandlerFactoryProxyFor15.java
index ed8fe4f..48b9f73 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/URLStreamHandlerFactoryProxyFor15.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/protocol/URLStreamHandlerFactoryProxyFor15.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class URLStreamHandlerFactoryProxyFor15 extends URLStreamHandlerProxy {
 			throw (RuntimeException) e.getTargetException();
 		} catch (Exception e) {
 			// expected on JRE < 1.5
-			throw new UnsupportedOperationException();
+			throw (UnsupportedOperationException) new UnsupportedOperationException().initCause(e);
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/BundleLoader.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/BundleLoader.java
index ae867f2..bdc8720 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/BundleLoader.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/BundleLoader.java
@@ -20,12 +20,12 @@ import java.util.*;
 import org.eclipse.osgi.framework.adaptor.*;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.internal.core.*;
+import org.eclipse.osgi.framework.internal.core.Constants;
 import org.eclipse.osgi.framework.util.KeyedHashSet;
 import org.eclipse.osgi.internal.loader.buddy.PolicyHandler;
 import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.*;
 
 /**
  * This object is responsible for all classloader delegation for a bundle.
@@ -41,6 +41,7 @@ public class BundleLoader implements ClassLoaderDelegate {
 	public final static byte FLAG_HASDYNAMICIMPORTS = 0x02;
 	public final static byte FLAG_HASDYNAMICEIMPORTALL = 0x04;
 	public final static byte FLAG_CLOSED = 0x08;
+	public final static byte FLAG_LAZYTRIGGER = 0x10;
 
 	public final static ClassContext CLASS_CONTEXT = (ClassContext) AccessController.doPrivileged(new PrivilegedAction() {
 		public Object run() {
@@ -253,6 +254,17 @@ public class BundleLoader implements ClassLoaderDelegate {
 		return importedSources;
 	}
 
+	public synchronized boolean isLazyTriggerSet() {
+		return (loaderFlags & FLAG_LAZYTRIGGER) != 0;
+	}
+
+	public void setLazyTrigger() throws BundleException {
+		synchronized (this) {
+			loaderFlags |= FLAG_LAZYTRIGGER;
+		}
+		BundleLoaderProxy.secureAction.start(bundle, Bundle.START_TRANSIENT | BundleHost.LAZY_TRIGGER);
+	}
+
 	final PackageSource createExportPackageSource(ExportPackageDescription export, KeyedHashSet visited) {
 		BundleLoaderProxy exportProxy = getLoaderProxy(export.getExporter());
 		if (exportProxy == null)
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/SystemBundleLoader.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
index 4968454..0408149 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/SystemBundleLoader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,14 @@ package org.eclipse.osgi.internal.loader;
 
 import java.io.IOException;
 import java.net.URL;
+import java.security.ProtectionDomain;
 import java.util.Enumeration;
 import java.util.HashSet;
-import org.eclipse.osgi.framework.adaptor.BundleData;
+import org.eclipse.osgi.framework.adaptor.*;
 import org.eclipse.osgi.framework.internal.core.BundleFragment;
 import org.eclipse.osgi.framework.internal.core.BundleHost;
 import org.eclipse.osgi.service.resolver.ExportPackageDescription;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
 
 /**
@@ -188,4 +190,57 @@ public class SystemBundleLoader extends BundleLoader {
 	public boolean isEEPackage(String pkgName) {
 		return eePackages.contains(pkgName);
 	}
+
+	BundleClassLoader createBCL(BundleProtectionDomain pd, String[] cp) {
+		return new BundleClassLoader() {
+
+			public Bundle getBundle() {
+				return SystemBundleLoader.this.getBundle();
+			}
+
+			public Class loadClass(String name) throws ClassNotFoundException {
+				return SystemBundleLoader.this.loadClass(name);
+			}
+
+			public void initialize() {
+				// nothing
+			}
+
+			public Enumeration getResources(String name) throws IOException {
+				return findLocalResources(name);
+			}
+
+			public URL getResource(String name) {
+				return SystemBundleLoader.this.findLocalResource(name);
+			}
+
+			public ClassLoader getParent() {
+				return SystemBundleLoader.this.classLoader.getParent();
+			}
+
+			public ClassLoaderDelegate getDelegate() {
+				return SystemBundleLoader.this;
+			}
+
+			public Enumeration findLocalResources(String resource) {
+				return SystemBundleLoader.this.findLocalResources(resource);
+			}
+
+			public URL findLocalResource(String resource) {
+				return getResource(resource);
+			}
+
+			public Class findLocalClass(String classname) throws ClassNotFoundException {
+				return SystemBundleLoader.this.findLocalClass(classname);
+			}
+
+			public void close() {
+				// nothing
+			}
+
+			public void attachFragment(BundleData bundledata, ProtectionDomain domain, String[] classpath) {
+				// nothing
+			}
+		};
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
index 7b9a6ce..04d12f1 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/loader/buddy/SystemPolicy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ public class SystemPolicy implements IBuddyPolicy {
 
 	private static class ParentClassLoader extends ClassLoader {
 		protected ParentClassLoader() {
-			super(null);
+			super(Object.class.getClassLoader());
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/EquinoxProtectionDomain.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/EquinoxProtectionDomain.java
deleted file mode 100644
index 685f208..0000000
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/EquinoxProtectionDomain.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osgi.internal.permadmin;
-
-import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
-import org.osgi.framework.Bundle;
-
-public class EquinoxProtectionDomain extends BundleProtectionDomain {
-
-	public EquinoxProtectionDomain(BundlePermissions bundlePermissions) {
-		super(bundlePermissions);
-	}
-
-	public Bundle getBundle() {
-		return ((BundlePermissions) getPermissions()).getBundle();
-	}
-
-	public void clearPermissionCache() {
-		((BundlePermissions) getPermissions()).clearPermissionCache();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
index 98d2900..cbea15e 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionInfoCollection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,20 +53,28 @@ public final class PermissionInfoCollection extends PermissionCollection {
 	public boolean implies(Permission perm) {
 		if (hasAllPermission)
 			return true;
+		Class permClass = perm.getClass();
 		PermissionCollection collection;
 		synchronized (cachedPermissionCollections) {
-			Class permClass = perm.getClass();
 			collection = (PermissionCollection) cachedPermissionCollections.get(permClass);
-			if (collection == null) {
-				collection = perm.newPermissionCollection();
-				if (collection == null)
-					collection = new PermissionsHash();
-				try {
-					addPermissions(collection, permClass);
-				} catch (Exception e) {
-					throw new SecurityException("Exception creating permissions: " + e.getClass().getName() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-				cachedPermissionCollections.put(permClass, collection);
+		}
+		// must populate the collection outside of the lock to prevent class loader deadlock
+		if (collection == null) {
+			collection = perm.newPermissionCollection();
+			if (collection == null)
+				collection = new PermissionsHash();
+			try {
+				addPermissions(collection, permClass);
+			} catch (Exception e) {
+				throw (SecurityException) new SecurityException("Exception creating permissions: " + e.getClass().getName() + ": " + e.getMessage()).initCause(e); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			synchronized (cachedPermissionCollections) {
+				// check to see if another thread beat this thread at adding the collection
+				PermissionCollection exists = (PermissionCollection) cachedPermissionCollections.get(permClass);
+				if (exists != null)
+					collection = exists;
+				else
+					cachedPermissionCollections.put(permClass, collection);
 			}
 		}
 		return collection.implies(perm);
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
index 4fd3086..cc369b1 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/SecurityAdmin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.net.URL;
 import java.security.*;
 import java.security.cert.*;
 import java.util.*;
+import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
 import org.eclipse.osgi.framework.adaptor.PermissionStorage;
 import org.eclipse.osgi.framework.internal.core.*;
 import org.eclipse.osgi.framework.internal.core.Constants;
@@ -290,23 +291,22 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
 	private ConditionalPermissionInfo setConditionalPermissionInfo(String name, ConditionInfo[] conds, PermissionInfo[] perms, boolean firstTry) {
 		ConditionalPermissionUpdate update = newConditionalPermissionUpdate();
 		List rows = update.getConditionalPermissionInfos();
-		ConditionalPermissionInfo infoBase = newConditionalPermissionInfo(name, conds, perms, ConditionalPermissionInfo.ALLOW);
+		ConditionalPermissionInfo newInfo = newConditionalPermissionInfo(name, conds, perms, ConditionalPermissionInfo.ALLOW);
 		int index = -1;
-		if (name == null) {
-			rows.add(infoBase);
-			index = rows.size() - 1;
-		} else {
+		if (name != null) {
 			for (int i = 0; i < rows.size() && index < 0; i++) {
 				ConditionalPermissionInfo info = (ConditionalPermissionInfo) rows.get(i);
 				if (name.equals(info.getName())) {
-					rows.set(i, infoBase);
 					index = i;
 				}
 			}
-			if (index < 0) {
-				rows.add(infoBase);
-				index = rows.size() - 1;
-			}
+		}
+		if (index < 0) {
+			// must always add to the beginning (bug 303930)
+			rows.add(0, newInfo);
+			index = 0;
+		} else {
+			rows.set(index, newInfo);
 		}
 		synchronized (lock) {
 			if (!update.commit()) {
@@ -354,16 +354,16 @@ public final class SecurityAdmin implements PermissionAdmin, ConditionalPermissi
 		return "generated_" + Long.toString(nextID++); //$NON-NLS-1$;
 	}
 
-	public EquinoxProtectionDomain createProtectionDomain(Bundle bundle) {
+	public BundleProtectionDomain createProtectionDomain(Bundle bundle) {
 		return createProtectionDomain(bundle, this);
 	}
 
-	private EquinoxProtectionDomain createProtectionDomain(Bundle bundle, SecurityAdmin sa) {
+	private BundleProtectionDomain createProtectionDomain(Bundle bundle, SecurityAdmin sa) {
 		PermissionInfoCollection impliedPermissions = getImpliedPermission(bundle);
 		PermissionInfo[] restrictedInfos = getFileRelativeInfos(SecurityAdmin.getPermissionInfos(bundle.getEntry("OSGI-INF/permissions.perm"), framework), bundle); //$NON-NLS-1$
 		PermissionInfoCollection restrictedPermissions = restrictedInfos == null ? null : new PermissionInfoCollection(restrictedInfos);
 		BundlePermissions bundlePermissions = new BundlePermissions(bundle, sa, impliedPermissions, restrictedPermissions);
-		return new EquinoxProtectionDomain(bundlePermissions);
+		return new BundleProtectionDomain(bundlePermissions, null, bundle);
 	}
 
 	private PermissionInfoCollection getImpliedPermission(Bundle bundle) {
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
index 5cfa1ca..787759e 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistrationImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,7 +60,7 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 	 * List<BundleContextImpl>.
 	 * */
 	/* @GuardedBy("registrationLock") */
-	private List contextsUsing;
+	private final List contextsUsing;
 
 	/** properties for this registration. */
 	/* @GuardedBy("registrationLock") */
@@ -78,7 +78,7 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 
 	/** The registration state */
 	/* @GuardedBy("registrationLock") */
-	private int state = REGISTERED;
+	private int state;
 	private static final int REGISTERED = 0x00;
 	private static final int UNREGISTERING = 0x01;
 	private static final int UNREGISTERED = 0x02;
@@ -96,9 +96,10 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 		this.clazzes = clazzes; /* must be set before calling createProperties. */
 		this.service = service;
 		this.serviceid = registry.getNextServiceId(); /* must be set before calling createProperties. */
+		this.contextsUsing = new ArrayList(10);
 
 		synchronized (registrationLock) {
-			this.contextsUsing = null;
+			this.state = REGISTERED;
 			/* We leak this from the constructor here, but it is ok
 			 * because the ServiceReferenceImpl constructor only
 			 * stores the value in a final field without
@@ -156,7 +157,7 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 		final ServiceProperties previousProperties;
 		synchronized (registry) {
 			synchronized (registrationLock) {
-				if (state != REGISTERED) { /* in the process of unregistering */
+				if (state != REGISTERED) { /* in the process of unregisterING */
 					throw new IllegalStateException(Msg.SERVICE_ALREADY_UNREGISTERED_EXCEPTION);
 				}
 
@@ -230,15 +231,12 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 			/* we have published the ServiceEvent, now mark the service fully unregistered */
 			state = UNREGISTERED;
 
-			if (contextsUsing != null) {
-				size = contextsUsing.size();
-
-				if (size > 0) {
-					if (Debug.DEBUG && Debug.DEBUG_SERVICES) {
-						Debug.println("unregisterService: releasing users"); //$NON-NLS-1$
-					}
-					users = (BundleContextImpl[]) contextsUsing.toArray(new BundleContextImpl[size]);
+			size = contextsUsing.size();
+			if (size > 0) {
+				if (Debug.DEBUG && Debug.DEBUG_SERVICES) {
+					Debug.println("unregisterService: releasing users"); //$NON-NLS-1$
 				}
+				users = (BundleContextImpl[]) contextsUsing.toArray(new BundleContextImpl[size]);
 			}
 		}
 
@@ -248,7 +246,7 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 		}
 
 		synchronized (registrationLock) {
-			contextsUsing = null;
+			contextsUsing.clear();
 
 			reference = null; /* mark registration dead */
 		}
@@ -427,10 +425,10 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 					use = new ServiceUse(user, this);
 					added = true;
 					synchronized (registrationLock) {
-						servicesInUse.put(this, use);
-						if (contextsUsing == null) {
-							contextsUsing = new ArrayList(10);
+						if (state == UNREGISTERED) { /* service unregistered */
+							return null;
 						}
+						servicesInUse.put(this, use);
 						contextsUsing.add(user);
 					}
 				}
@@ -536,10 +534,7 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 				if (use == null) {
 					return;
 				}
-				// contextsUsing may have been nulled out by use.releaseService() if the registrant bundle
-				// is listening for events and unregisters the service
-				if (contextsUsing != null)
-					contextsUsing.remove(user);
+				contextsUsing.remove(user);
 			}
 		}
 		synchronized (use) {
@@ -557,9 +552,6 @@ public class ServiceRegistrationImpl implements ServiceRegistration, Comparable
 			if (state == UNREGISTERED) /* service unregistered */
 				return null;
 
-			if (contextsUsing == null)
-				return null;
-
 			int size = contextsUsing.size();
 			if (size == 0)
 				return null;
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
index 812647f..86ab5f0 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -369,9 +369,9 @@ public class ServiceRegistry {
 	 * <p>
 	 * A bundle's use of a service is tracked by the bundle's use count of that
 	 * service. Each time a service's service object is returned by
-	 * {@link #getService(ServiceReference)} the context bundle's use count for
+	 * {@link #getService(BundleContextImpl, ServiceReferenceImpl)} the context bundle's use count for
 	 * that service is incremented by one. Each time the service is released by
-	 * {@link #ungetService(ServiceReference)} the context bundle's use count
+	 * {@link #ungetService(BundleContextImpl, ServiceReferenceImpl)} the context bundle's use count
 	 * for that service is decremented by one.
 	 * <p>
 	 * When a bundle's use count for a service drops to zero, the bundle should
@@ -420,7 +420,7 @@ public class ServiceRegistry {
 	 *         and the Java Runtime Environment supports permissions.
 	 * @throws java.lang.IllegalStateException If this BundleContext is no
 	 *         longer valid.
-	 * @see #ungetService(ServiceReference)
+	 * @see #ungetService(BundleContextImpl, ServiceReferenceImpl)
 	 * @see ServiceFactory
 	 */
 	public Object getService(BundleContextImpl context, ServiceReferenceImpl reference) {
@@ -900,7 +900,14 @@ public class ServiceRegistry {
 
 		for (Iterator iter = result.iterator(); iter.hasNext();) {
 			ServiceRegistrationImpl registration = (ServiceRegistrationImpl) iter.next();
-			if (!filter.match(registration.getReferenceImpl())) {
+			ServiceReferenceImpl reference;
+			try {
+				reference = registration.getReferenceImpl();
+			} catch (IllegalStateException e) {
+				iter.remove(); /* service was unregistered after we left the synchronized block above */
+				continue;
+			}
+			if (!filter.match(reference)) {
 				iter.remove();
 			}
 		}
@@ -941,7 +948,14 @@ public class ServiceRegistry {
 	private static List changeRegistrationsToReferences(List result) {
 		for (ListIterator iter = result.listIterator(); iter.hasNext();) {
 			ServiceRegistrationImpl registration = (ServiceRegistrationImpl) iter.next();
-			iter.set(registration.getReferenceImpl()); /* replace the registration with its reference */
+			ServiceReferenceImpl reference;
+			try {
+				reference = registration.getReferenceImpl();
+			} catch (IllegalStateException e) {
+				iter.remove(); /* service was unregistered after we were called */
+				continue;
+			}
+			iter.set(reference); /* replace the registration with its reference */
 		}
 		return result;
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceUse.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceUse.java
index b67baf9..11f3a54 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceUse.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/serviceregistry/ServiceUse.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -138,7 +138,7 @@ public class ServiceUse {
 			}
 
 			ServiceException se = new ServiceException(NLS.bind(Msg.SERVICE_OBJECT_NULL_EXCEPTION, factory.getClass().getName()), ServiceException.FACTORY_ERROR);
-			context.getFramework().publishFrameworkEvent(FrameworkEvent.ERROR, registration.getBundle(), se);
+			context.getFramework().publishFrameworkEvent(FrameworkEvent.WARNING, registration.getBundle(), se);
 			return null;
 		}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/Equinox.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/Equinox.java
index d4e317f..3d6e280 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/Equinox.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/Equinox.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.net.URLClassLoader;
+import java.net.*;
 import java.security.*;
 import java.util.*;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
+import org.eclipse.osgi.framework.util.Headers;
+import org.eclipse.osgi.internal.baseadaptor.DevClassPathHelper;
+import org.eclipse.osgi.util.ManifestElement;
 import org.osgi.framework.*;
 import org.osgi.framework.launch.Framework;
 
@@ -39,7 +41,7 @@ public class Equinox implements Framework {
 		if (sm != null)
 			sm.checkPermission(new AllPermission());
 		useSeparateCL = FrameworkProperties.inUse();
-		this.configuration = configuration;
+		this.configuration = configuration == null ? Collections.EMPTY_MAP : new HashMap(configuration);
 	}
 
 	private Framework createImpl() {
@@ -60,13 +62,13 @@ public class Equinox implements Framework {
 		} catch (ClassNotFoundException e) {
 			throw new NoClassDefFoundError(implName);
 		} catch (IllegalAccessException e) {
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		} catch (NoSuchMethodException e) {
 			throw new NoSuchMethodError(e.getMessage());
 		} catch (InstantiationException e) {
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		} catch (InvocationTargetException e) {
-			throw new RuntimeException(e.getMessage());
+			throw new RuntimeException(e.getMessage(), e);
 		}
 	}
 
@@ -74,11 +76,96 @@ public class Equinox implements Framework {
 		ClassLoader thisCL = this.getClass().getClassLoader();
 		if (!(useSeparateCL && (thisCL instanceof URLClassLoader)))
 			return Class.forName(implName);
-		URL[] cp = ((URLClassLoader) thisCL).getURLs();
+		URL[] cp = getFrameworkURLs((URLClassLoader) thisCL);
 		EquinoxFWClassLoader fwCL = new EquinoxFWClassLoader(cp, thisCL);
 		return fwCL.loadClass(implName);
 	}
 
+	private URL[] getFrameworkURLs(URLClassLoader frameworkLoader) {
+		// use the classpath of the framework class loader
+		URL[] cp = frameworkLoader.getURLs();
+		ArrayList result = new ArrayList(cp.length);
+		for (int i = 0; i < cp.length; i++) {
+			// need to add only the urls for the framework and any framework fragments
+			InputStream manifest = null;
+			try {
+				if (cp[i].getFile().endsWith("/")) { //$NON-NLS-1$
+					manifest = new URL(cp[i], org.eclipse.osgi.framework.internal.core.Constants.OSGI_BUNDLE_MANIFEST).openStream();
+				} else {
+					manifest = new URL("jar:" + cp[i].toExternalForm() + "!/" + org.eclipse.osgi.framework.internal.core.Constants.OSGI_BUNDLE_MANIFEST).openStream(); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+				Map headers = ManifestElement.parseBundleManifest(manifest, new Headers(10));
+				String bsnSpec = getValue(headers, Constants.BUNDLE_SYMBOLICNAME);
+				if (bsnSpec == null)
+					continue;
+				String internalBSN = org.eclipse.osgi.framework.internal.core.Constants.getInternalSymbolicName();
+				if (internalBSN.equals(bsnSpec)) {
+					// this is the framework
+					addDevClassPaths(cp[i], bsnSpec, result);
+					result.add(cp[i]);
+				} else {
+					if (!isFrameworkFragment(headers, internalBSN))
+						continue;
+					// this is for a framework extension
+					addDevClassPaths(cp[i], bsnSpec, result);
+					result.add(cp[i]);
+				}
+			} catch (IOException e) {
+				continue; // no manifest;
+			} catch (BundleException e) {
+				continue; // bad manifest;
+			} finally {
+				if (manifest != null)
+					try {
+						manifest.close();
+					} catch (IOException e) {
+						// ignore
+					}
+			}
+		}
+		return (URL[]) result.toArray(new URL[result.size()]);
+	}
+
+	private void addDevClassPaths(URL cp, String bsn, ArrayList result) {
+		if (!cp.getPath().endsWith("/")) //$NON-NLS-1$
+			return;
+		String[] devPaths = DevClassPathHelper.getDevClassPath(bsn);
+		if (devPaths == null)
+			return;
+		for (int i = 0; i < devPaths.length; i++)
+			try {
+				char lastChar = devPaths[i].charAt(devPaths[i].length() - 1);
+				URL url;
+				if ((devPaths[i].endsWith(".jar") || (lastChar == '/' || lastChar == '\\'))) //$NON-NLS-1$
+					url = new URL(cp, devPaths[i]);
+				else
+					url = new URL(cp, devPaths[i] + "/"); //$NON-NLS-1$
+				result.add(url);
+			} catch (MalformedURLException e) {
+				continue;
+			}
+	}
+
+	private boolean isFrameworkFragment(Map headers, String internalBSN) {
+		String hostBSN = getValue(headers, Constants.FRAGMENT_HOST);
+		return internalBSN.equals(hostBSN) || Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(hostBSN);
+	}
+
+	private String getValue(Map headers, String key) {
+		String headerSpec = (String) headers.get(key);
+		if (headerSpec == null)
+			return null;
+		ManifestElement[] elements;
+		try {
+			elements = ManifestElement.parseHeader(key, headerSpec);
+		} catch (BundleException e) {
+			return null;
+		}
+		if (elements == null)
+			return null;
+		return elements[0].getValue();
+	}
+
 	private synchronized Framework getImpl() {
 		if (impl == null)
 			impl = createImpl();
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/EquinoxFWClassLoader.java b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/EquinoxFWClassLoader.java
index 090a94f..01fd48b 100644
--- a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/EquinoxFWClassLoader.java
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/EquinoxFWClassLoader.java
@@ -15,8 +15,8 @@ import java.net.URLClassLoader;
 
 class EquinoxFWClassLoader extends URLClassLoader {
 
-	private static final String[] DELEGATE_PARENT = {"java.", "org.osgi.", "org.eclipse.osgi.launch.", "org.eclipse.osgi.service.", "org.eclipse.osgi.framework.log", "org.eclipse.osgi.framework.adaptor", "org.eclipse.osgi.framework.internal.core.ReferenceInputStream"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-	private static final String[] SKIP_PARENT = new String[0]; // nothing right now is skipped
+	private static final String[] DELEGATE_PARENT_FIRST = {"java.", "org.osgi.", "org.eclipse.osgi.launch.", "org.eclipse.osgi.service.", "org.eclipse.osgi.framework.log", "org.eclipse.osgi.framework.adaptor", "org.eclipse.osgi.framework.internal.core.ReferenceInputStream"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+	private static final String[] DELEGATE_CHILD_FIRST = new String[0]; // nothing right now is skipped
 
 	private final ClassLoader parent;
 
@@ -59,11 +59,11 @@ class EquinoxFWClassLoader extends URLClassLoader {
 	}
 
 	private boolean childFirst(String name) {
-		for (int i = SKIP_PARENT.length - 1; i >= 0; i--)
-			if (name.startsWith(SKIP_PARENT[i]))
+		for (int i = DELEGATE_CHILD_FIRST.length - 1; i >= 0; i--)
+			if (name.startsWith(DELEGATE_CHILD_FIRST[i]))
 				return true;
-		for (int i = DELEGATE_PARENT.length - 1; i >= 0; i--)
-			if (name.startsWith(DELEGATE_PARENT[i]))
+		for (int i = DELEGATE_PARENT_FIRST.length - 1; i >= 0; i--)
+			if (name.startsWith(DELEGATE_PARENT_FIRST[i]))
 				return false;
 		return true;
 
diff --git a/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/package.html b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/package.html
new file mode 100644
index 0000000..b2d671b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/core/framework/org/eclipse/osgi/launch/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the Equinox framework launch API.
+<h2>
+Package Specification</h2>
+This package specifies the Equinox framework launch API.
+<p>
+Clients that want to launch an embedded instance of Equinox 
+will likely be interested in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseAdaptor.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseAdaptor.java
index 64249e8..324ff1c 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseAdaptor.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseAdaptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -67,14 +67,7 @@ public class BaseAdaptor implements FrameworkAdaptor {
 		}
 		// default to boot classloader
 		if (bundleClassLoaderParent == null)
-			bundleClassLoaderParent = new ParentClassLoader();
-	}
-
-	// Empty parent classloader.  This is used by default as the BundleClassLoader parent.
-	private static class ParentClassLoader extends ClassLoader {
-		protected ParentClassLoader() {
-			super(null);
-		}
+			bundleClassLoaderParent = new ClassLoader(Object.class.getClassLoader()) {/* boot class loader*/};
 	}
 
 	private EventPublisher eventPublisher;
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseData.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseData.java
index 93fcc8e..808474e 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseData.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/BaseData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -393,7 +393,7 @@ public class BaseData implements BundleData {
 			try {
 				bundleFile = adaptor.createBundleFile(null, this);
 			} catch (IOException e) {
-				throw new IllegalArgumentException(e.getMessage());
+				throw (IllegalArgumentException) new IllegalArgumentException(e.getMessage()).initCause(e);
 			}
 		return bundleFile;
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
index 23d5a6e..08b0aac 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
 import org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook;
 import org.eclipse.osgi.baseadaptor.hooks.ClassLoadingStatsHook;
 import org.eclipse.osgi.framework.adaptor.BundleData;
+import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.internal.baseadaptor.AdaptorMsg;
@@ -262,6 +263,9 @@ public class ClasspathManager {
 	private ClasspathEntry createClassPathEntry(BundleFile bundlefile, ProtectionDomain cpDomain, BaseData data) {
 		ClasspathEntry entry = classloader.createClassPathEntry(bundlefile, cpDomain);
 		entry.setBaseData(data);
+		Object domain = entry.getDomain();
+		if (domain instanceof BundleProtectionDomain)
+			((BundleProtectionDomain) domain).setBundle(data.getBundle());
 		return entry;
 	}
 
@@ -507,7 +511,7 @@ public class ClasspathManager {
 					lockingThread = classNameLocks.get(classname);
 				} catch (InterruptedException e) {
 					current.interrupt();
-					throw new ClassNotFoundException(classname);
+					throw new ClassNotFoundException(classname, e);
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/core/BundleResourceHandler.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/core/BundleResourceHandler.java
index 71191c0..ac7ae6e 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/core/BundleResourceHandler.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/core/BundleResourceHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -160,7 +160,7 @@ public abstract class BundleResourceHandler extends URLStreamHandler implements
 		try {
 			bundleID = getBundleID(host);
 		} catch (NumberFormatException nfe) {
-			throw new MalformedURLException(NLS.bind(AdaptorMsg.URL_INVALID_BUNDLE_ID, host));
+			throw (MalformedURLException) new MalformedURLException(NLS.bind(AdaptorMsg.URL_INVALID_BUNDLE_ID, host)).initCause(nfe);
 		}
 		bundle = adaptor == null ? null : (AbstractBundle) adaptor.getContext().getBundle(bundleID);
 		if (bundle == null)
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/protocol/reference/ReferenceURLConnection.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/protocol/reference/ReferenceURLConnection.java
index ff246c3..4c8ecc1 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/protocol/reference/ReferenceURLConnection.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/framework/internal/protocol/reference/ReferenceURLConnection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,20 +34,58 @@ public class ReferenceURLConnection extends URLConnection {
 			// TODO assumes that reference URLs are always based on file: URLs.
 			// There are not solid usecases to the contrary. Yet.
 			// Construct the ref URL carefully so as to preserve UNC paths etc.
-			File file = new File(url.getPath().substring(5));
+			String path = url.getPath().substring(5);
+			File file = new File(path);
+
 			URL ref;
 			if (!file.isAbsolute()) {
 				String installPath = getInstallPath();
 				if (installPath != null)
 					file = makeAbsolute(installPath, file);
 			}
+
+			// Pre-check if file exists, if not, and it contains escape characters,
+			// try decoding the absolute path generated by makeAbsolute
+			if (!file.exists() && path.indexOf('%') >= 0) {
+				String decodePath = FrameworkProperties.decode(file.getAbsolutePath());
+				File f = new File(decodePath);
+				if (f.exists())
+					file = f;
+			}
+
 			ref = file.toURL();
-			if (!file.exists())
-				throw new FileNotFoundException(file.toString());
+			checkRead(file);
+
 			reference = ref;
 		}
 	}
 
+	private void checkRead(File file) throws IOException {
+		if (!file.exists())
+			throw new FileNotFoundException(file.toString());
+		if (file.isFile()) {
+			// Try to open the file to ensure that this is possible: see bug 260217
+			// If access is denied, a FileNotFoundException with (access denied) message is thrown
+			// Here file.canRead() cannot be used, because on Windows it does not 
+			// return correct values - bug 6203387 in Sun's bug database
+			InputStream is = new FileInputStream(file);
+			is.close();
+		} else if (file.isDirectory()) {
+			// There is no straightforward way to check if a directory
+			// has read permissions - same issues for File.canRead() as above; 
+			// try to list the files in the directory
+			File[] files = file.listFiles();
+			// File.listFiles() returns null if the directory does not exist 
+			// (which is not the current case, because we check that it exists and is directory),
+			// or if an IO error occurred during the listing of the files, including if the
+			// access is denied 
+			if (files == null)
+				throw new FileNotFoundException(file.toString() + " (probably access denied)"); //$NON-NLS-1$
+		} else {
+			// TODO not sure if we can get here.
+		}
+	}
+
 	public boolean getDoInput() {
 		return true;
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
index 4827728..3185ff2 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorMsg.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,8 @@ public class AdaptorMsg extends NLS {
 	public static String ADAPTOR_EXTENSION_NATIVECODE_ERROR;
 	public static String ADAPTOR_EXTENSION_REQUIRE_ERROR;
 	public static String ADAPTOR_STORAGE_EXCEPTION;
+	public static String ADAPTOR_STORAGE_INIT_FAILED_MSG;
+	public static String ADAPTOR_STORAGE_INIT_FAILED_TITLE;
 	public static String ADAPTOR_URL_CREATE_EXCEPTION;
 
 	public static String BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION;
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorUtil.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorUtil.java
index 658ba70..e998e76 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorUtil.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/AdaptorUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.osgi.baseadaptor.BaseData;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.internal.core.Constants;
 import org.eclipse.osgi.framework.util.Headers;
+import org.eclipse.osgi.framework.util.ObjectPool;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 
@@ -159,7 +160,8 @@ public class AdaptorUtil {
 	public static Version loadVersion(DataInputStream in) throws IOException {
 		String versionString = readString(in, false);
 		try {
-			return Version.parseVersion(versionString);
+			//return Version.parseVersion(versionString);
+			return (Version) ObjectPool.intern(Version.parseVersion(versionString));
 		} catch (IllegalArgumentException e) {
 			return new InvalidVersion(versionString);
 		}
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
index 1c3d317..5d197d5 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -207,7 +207,7 @@ public class BaseStorage implements SynchronousBundleListener {
 		StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER = options.getBooleanOption(OPTION_PLATFORM_ADMIN_RESOLVER, false);
 	}
 
-	protected StorageManager initFileManager(File baseDir, String lockMode, boolean readOnly) {
+	protected StorageManager initFileManager(File baseDir, String lockMode, boolean readOnly) throws IOException {
 		StorageManager sManager = new StorageManager(baseDir, lockMode, readOnly);
 		try {
 			sManager.open(!readOnly);
@@ -219,6 +219,10 @@ public class BaseStorage implements SynchronousBundleListener {
 			String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FILEMANAGER_OPEN_ERROR, ex.getMessage());
 			FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, ex, null);
 			adaptor.getFrameworkLog().log(logEntry);
+			FrameworkProperties.setProperty(EclipseStarter.PROP_EXITCODE, "15"); //$NON-NLS-1$
+			String errorDialog = "<title>" + AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_TITLE + "</title>" + NLS.bind(AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_MSG, baseDir) + "\n" + ex.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, errorDialog);
+			throw ex;
 		}
 		return sManager;
 	}
@@ -336,7 +340,15 @@ public class BaseStorage implements SynchronousBundleListener {
 	}
 
 	public BaseData[] getInstalledBundles() {
-		return readBundleDatas();
+		try {
+			return readBundleDatas();
+		} catch (Throwable t) {
+			// be safe here and throw out the results and start over
+			// otherwise this would result in a failed launch
+			FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "Error loading bundle datas.  Recalculating cache.", 0, t, null); //$NON-NLS-1$
+			adaptor.getFrameworkLog().log(logEntry);
+			return null;
+		}
 	}
 
 	private BaseData[] readBundleDatas() {
@@ -421,6 +433,8 @@ public class BaseStorage implements SynchronousBundleListener {
 	}
 
 	private void saveAllData(boolean shutdown) {
+		if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+			Debug.println("Saving framework data ..."); //$NON-NLS-1$
 		if (storageManagerClosed)
 			try {
 				storageManager.open(!LocationManager.getConfigurationLocation().isReadOnly());
@@ -485,6 +499,8 @@ public class BaseStorage implements SynchronousBundleListener {
 	private void savePermissionStorage() {
 		if (permissionStorage == null || isReadOnly() || !permissionStorage.isDirty())
 			return;
+		if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+			Debug.println("About to save permission data ..."); //$NON-NLS-1$
 		try {
 			ManagedOutputStream fmos = storageManager.getOutputStream(PERM_DATA_FILE);
 			DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos));
@@ -536,6 +552,8 @@ public class BaseStorage implements SynchronousBundleListener {
 		// the cache and the state match
 		if (stateManager == null || isReadOnly() || (timeStamp == stateManager.getSystemState().getTimeStamp() && !stateManager.saveNeeded()))
 			return;
+		if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+			Debug.println("Saving bundle data ..."); //$NON-NLS-1$
 		try {
 			ManagedOutputStream fmos = storageManager.getOutputStream(LocationManager.BUNDLE_DATA_FILE);
 			DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos));
@@ -589,6 +607,8 @@ public class BaseStorage implements SynchronousBundleListener {
 			stateManager.getSystemState().setTimeStamp(stateManager.getSystemState().getTimeStamp() + 1);
 		if (stateManager == null || isReadOnly() || !stateManager.saveNeeded())
 			return;
+		if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+			Debug.println("Saving resolver state data ..."); //$NON-NLS-1$
 		File stateTmpFile = null;
 		File lazyTmpFile = null;
 		try {
@@ -917,9 +937,9 @@ public class BaseStorage implements SynchronousBundleListener {
 
 	private void cleanOSGiCache() {
 		File osgiConfig = LocationManager.getOSGiConfigurationDir();
-		if (!AdaptorUtil.rm(osgiConfig)) {
-			// TODO log error?
-		}
+		if (!AdaptorUtil.rm(osgiConfig))
+			adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, "The -clean (osgi.clean) option was not successful. Unable to clean the storage area: " + osgiConfig.getAbsolutePath(), 0, null, null)); //$NON-NLS-1$
+
 	}
 
 	/**
@@ -1148,25 +1168,33 @@ public class BaseStorage implements SynchronousBundleListener {
 	}
 
 	private class StateSaver implements Runnable {
-		private long delay_interval = 30000; // 30 seconds.
-		private long max_total_delay_interval = 1800000; // 30 minutes.
+		private final long delay_interval;
+		private final long max_total_delay_interval;
 		private boolean shutdown = false;
 		private long lastSaveTime = 0;
 		private Thread runningThread = null;
+		private Thread shutdownHook = null;
 
 		StateSaver() {
 			String prop = FrameworkProperties.getProperty("eclipse.stateSaveDelayInterval"); //$NON-NLS-1$
+			long delayValue = 30000; // 30 seconds.
+			long maxDelayValue = 1800000; // 30 minutes.
 			if (prop != null) {
 				try {
 					long val = Long.parseLong(prop);
 					if (val >= 1000 && val <= 1800000) {
-						delay_interval = val;
-						max_total_delay_interval = val * 60;
+						delayValue = val;
+						maxDelayValue = val * 60;
+					} else if (val == 0) {
+						delayValue = 0;
+						maxDelayValue = 0;
 					}
 				} catch (NumberFormatException e) {
 					// ignore
 				}
 			}
+			delay_interval = delayValue;
+			max_total_delay_interval = maxDelayValue;
 		}
 
 		public void run() {
@@ -1200,6 +1228,12 @@ public class BaseStorage implements SynchronousBundleListener {
 					// Continue the loop if Saver is asked again during saving State data to file.
 				} while (!shutdown && curSaveTime < lastSaveTime);
 				runningThread = null; // clear runningThread
+				try {
+					Runtime.getRuntime().removeShutdownHook(shutdownHook);
+				} catch (IllegalStateException e) {
+					// avoid exception if shutdown is in progress
+				}
+				shutdownHook = null;
 			}
 		}
 
@@ -1212,9 +1246,14 @@ public class BaseStorage implements SynchronousBundleListener {
 				systemState.notifyAll(); // To wakeup sleeping thread.
 			}
 			try {
-				if (joinWith != null)
+				if (joinWith != null) {
+					if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+						Debug.println("About to join saving thread"); //$NON-NLS-1$
 					// There should be no deadlock when 'shutdown' is true.
 					joinWith.join();
+					if (Debug.DEBUG && Debug.DEBUG_GENERAL)
+						Debug.println("Joined with saving thread"); //$NON-NLS-1$
+				}
 			} catch (InterruptedException ie) {
 				if (Debug.DEBUG && Debug.DEBUG_GENERAL) {
 					Debug.println("Error shutdowning StateSaver: " + ie.getMessage()); //$NON-NLS-1$
@@ -1224,14 +1263,28 @@ public class BaseStorage implements SynchronousBundleListener {
 		}
 
 		void requestSave() {
-			State systemState = adaptor.getState();
+			final State systemState = adaptor.getState();
 			synchronized (systemState) {
 				if (shutdown)
 					return; // do not start another thread if we have already shutdown
+				if (delay_interval == 0) // all saves are atomic
+					saveAllData(false);
 				lastSaveTime = System.currentTimeMillis();
 				if (runningThread == null) {
+					shutdownHook = new Thread(new Runnable() {
+						public void run() {
+							// Synchronize with JVM shutdown hook, because
+							// saveAllData creates a temp file with delete on 
+							// exit is true. The temp file will be removed in the
+							// shutdown hook. This prevents that the remove temp files
+							// in the shutdown hook is earlier handled then adding new
+							// temp file in saveAllData.
+							shutdown();
+						}
+					});
 					runningThread = new Thread(this, "State Saver"); //$NON-NLS-1$
 					runningThread.start();
+					Runtime.getRuntime().addShutdownHook(shutdownHook);
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorageHook.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorageHook.java
index 03f932e..23d2e37 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorageHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/BaseStorageHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -363,6 +363,11 @@ public class BaseStorageHook implements StorageHook, AdaptorHook {
 	}
 
 	public URLConnection mapLocationToURLConnection(String location) throws IOException {
+		// take into account that initial@ is special (bug 268563)
+		if (location.startsWith("initial@")) { //$NON-NLS-1$
+			location = location.substring(8);
+			return new URL(location).openConnection();
+		}
 		// see if this is an existing location
 		Bundle[] bundles = storage.getAdaptor().getContext().getBundles();
 		AbstractBundle bundle = null;
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
index 9368d71..327b7bc 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,12 +17,12 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.*;
 import java.security.cert.Certificate;
+import java.util.Collections;
 import java.util.Enumeration;
 import org.eclipse.osgi.baseadaptor.BaseData;
 import org.eclipse.osgi.baseadaptor.bundlefile.*;
 import org.eclipse.osgi.baseadaptor.loader.*;
-import org.eclipse.osgi.framework.adaptor.BundleData;
-import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate;
+import org.eclipse.osgi.framework.adaptor.*;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.signedcontent.SignedContent;
@@ -45,13 +45,15 @@ public class DefaultClassLoader extends ClassLoader implements ParallelClassLoad
 	private final static String CLASS_LOADER_TYPE_PARALLEL = "parallel"; //$NON-NLS-1$
 	private static final boolean CLASS_CERTIFICATE;
 	private static final boolean PARALLEL_CAPABLE;
+	private static final Enumeration EMPTY_ENUMERATION = Collections.enumeration(Collections.EMPTY_LIST);
+
 	static {
 		CLASS_CERTIFICATE = Boolean.valueOf(FrameworkProperties.getProperty(CLASS_CERTIFICATE_SUPPORT, "true")).booleanValue(); //$NON-NLS-1$
 		AllPermission allPerm = new AllPermission();
 		ALLPERMISSIONS = allPerm.newPermissionCollection();
 		if (ALLPERMISSIONS != null)
 			ALLPERMISSIONS.add(allPerm);
-		boolean typeParallel = CLASS_LOADER_TYPE_PARALLEL.equals(FrameworkProperties.getProperty(CLASS_LOADER_TYPE));
+		boolean typeParallel = CLASS_LOADER_TYPE_PARALLEL.equals(FrameworkProperties.getProperty(CLASS_LOADER_TYPE, CLASS_LOADER_TYPE_PARALLEL));
 		boolean parallelCapable = false;
 		try {
 			if (typeParallel) {
@@ -157,7 +159,10 @@ public class DefaultClassLoader extends ClassLoader implements ParallelClassLoad
 	 * @throws IOException 
 	 */
 	protected Enumeration findResources(String name) throws IOException {
-		return (delegate.findResources(name));
+		Enumeration result = delegate.findResources(name);
+		if (result == null)
+			return EMPTY_ENUMERATION;
+		return result;
 	}
 
 	/**
@@ -253,7 +258,7 @@ public class DefaultClassLoader extends ClassLoader implements ParallelClassLoad
 				if (signers.length > 0)
 					certs = signers[0].getCertificateChain();
 			}
-			return new ProtectionDomain(new CodeSource(bundlefile.getBaseFile().toURL(), certs), permissions);
+			return new BundleProtectionDomain(permissions, new CodeSource(bundlefile.getBaseFile().toURL(), certs), null);
 		} catch (MalformedURLException e) {
 			// Failed to create our own domain; just return the baseDomain
 			return baseDomain;
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DevClassLoadingHook.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DevClassLoadingHook.java
index ec3fb44..e008b5a 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DevClassLoadingHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/DevClassLoadingHook.java
@@ -26,6 +26,7 @@ import org.eclipse.osgi.framework.util.KeyedElement;
 public class DevClassLoadingHook implements ClassLoadingHook, HookConfigurator, KeyedElement {
 	public static final String KEY = DevClassLoadingHook.class.getName();
 	public static final int HASHCODE = KEY.hashCode();
+	private static final String FRAGMENT = "@fragment@"; //$NON-NLS-1$
 
 	public byte[] processClass(String name, byte[] classbytes, ClasspathEntry classpathEntry, BundleEntry entry, ClasspathManager manager) {
 		// Do nothing
@@ -47,11 +48,17 @@ public class DevClassLoadingHook implements ClassLoadingHook, HookConfigurator,
 			else {
 				// if in dev mode, try using the cp as an absolute path
 				// we assume absolute entries come from fragments.  Find the source
-				BaseData fragData = findFragmentSource(sourcedata, devClassPath[i], hostmanager);
-				ClasspathEntry entry = hostmanager.getExternalClassPath(devClassPath[i], fragData, sourcedomain);
-				if (entry != null) {
-					cpEntries.add(entry);
-					result = true;
+				String devCP = devClassPath[i];
+				boolean fromFragment = devCP.endsWith(FRAGMENT);
+				if (fromFragment)
+					devCP = devCP.substring(0, devCP.length() - FRAGMENT.length());
+				BaseData fragData = findFragmentSource(sourcedata, devCP, hostmanager, fromFragment);
+				if (fragData != null) {
+					ClasspathEntry entry = hostmanager.getExternalClassPath(devCP, fragData, sourcedomain);
+					if (entry != null) {
+						cpEntries.add(entry);
+						result = true;
+					}
 				}
 			}
 		}
@@ -62,9 +69,10 @@ public class DevClassLoadingHook implements ClassLoadingHook, HookConfigurator,
 		return result;
 	}
 
-	private BaseData findFragmentSource(BaseData hostData, String cp, ClasspathManager manager) {
+	private BaseData findFragmentSource(BaseData hostData, String cp, ClasspathManager manager, boolean fromFragment) {
 		if (hostData != manager.getBaseData())
 			return hostData;
+
 		File file = new File(cp);
 		if (!file.isAbsolute())
 			return hostData;
@@ -75,7 +83,7 @@ public class DevClassLoadingHook implements ClassLoadingHook, HookConfigurator,
 			if (fragFile != null && file.getPath().startsWith(fragFile.getPath()))
 				return fragCP[i].getBundleData();
 		}
-		return hostData;
+		return fromFragment ? null : hostData;
 	}
 
 	public String findLibrary(BaseData data, String libName) {
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
index 36c8620..d83e889 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/ExternalMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2009 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@
 #External Messages for EN locale
 
 ADAPTOR_STORAGE_EXCEPTION=The FrameworkAdaptor object could not perform the operation
+ADAPTOR_STORAGE_INIT_FAILED_MSG=Locking is not possible in the directory \"{0}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing \"-Dosgi.locking=none\" as a VM argument. 
+ADAPTOR_STORAGE_INIT_FAILED_TITLE =Invalid Configuration Location
 ADAPTOR_URL_CREATE_EXCEPTION=\"{0}\" is an invalid URL
 ADAPTOR_DIRECTORY_CREATE_EXCEPTION=The directory \"{0}\" could not be created
 ADAPTOR_DIRECTORY_EXCEPTION=The file \"{0}\" is not a directory
diff --git a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
index 2045260..c61c6c5 100644
--- a/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/internal/baseadaptor/StateManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ package org.eclipse.osgi.internal.baseadaptor;
 import java.io.File;
 import java.io.IOException;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
+import org.eclipse.osgi.internal.loader.BundleLoader;
+import org.eclipse.osgi.internal.loader.BundleLoaderProxy;
 import org.eclipse.osgi.internal.resolver.*;
 import org.eclipse.osgi.service.resolver.*;
 import org.osgi.framework.BundleContext;
@@ -103,12 +105,22 @@ public class StateManager implements PlatformAdmin, Runnable {
 	 */
 	public void shutdown(File stateFile, File lazyFile) throws IOException {
 		BundleDescription[] removalPendings = systemState.getRemovalPendings();
-		if (removalPendings.length > 0)
-			systemState.resolve(removalPendings);
+		cleanRemovalPendings(removalPendings);
 		writeState(systemState, stateFile, lazyFile);
 		stopDataManager();
 	}
 
+	private void cleanRemovalPendings(BundleDescription[] removalPendings) {
+		if (removalPendings.length == 0)
+			return;
+		systemState.resolve(removalPendings);
+		for (int i = 0; i < removalPendings.length; i++) {
+			Object userObject = removalPendings[i].getUserObject();
+			if (userObject instanceof BundleLoaderProxy)
+				BundleLoader.closeBundleLoader((BundleLoaderProxy) userObject);
+		}
+	}
+
 	/**
 	 * Update the given target files with the state data in memory.
 	 * @param stateFile
@@ -125,7 +137,8 @@ public class StateManager implements PlatformAdmin, Runnable {
 			state.resolve(false);
 		}
 		writeState(state, stateFile, lazyFile);
-		lastTimeStamp = state.getTimeStamp();
+		// Need to use the timestamp of the original state here
+		lastTimeStamp = systemState.getTimeStamp();
 		// TODO consider updating the state files for lazy loading
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseLog.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseLog.java
index 5de78bd..65e8f76 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseLog.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseLog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -70,7 +70,7 @@ public class EclipseLog implements FrameworkLog {
 		String s = System.getProperty("line.separator"); //$NON-NLS-1$
 		LINE_SEPARATOR = s == null ? "\n" : s; //$NON-NLS-1$
 	}
-	private static final SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());;
+	private static final SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
 
 	/** Indicates if the console messages should be printed to the console (System.out) */
 	protected boolean consoleLog = false;
@@ -335,7 +335,7 @@ public class EclipseLog implements FrameworkLog {
 			backupIdx = 0;
 		}
 		setOutput(newFile, null, append);
-		FrameworkProperties.setProperty(EclipseStarter.PROP_LOGFILE, newFile.getAbsolutePath());
+		FrameworkProperties.setProperty(EclipseStarter.PROP_LOGFILE, newFile == null ? "" : newFile.getAbsolutePath()); //$NON-NLS-1$
 	}
 
 	public synchronized File getFile() {
@@ -593,7 +593,7 @@ public class EclipseLog implements FrameworkLog {
 
 		boolean isBackupOK = true;
 		if (outFile != null) {
-			if ((outFile.length() >> 10) > maxLogSize) { // Use KB as file size unit.
+			if ((secureAction.length(outFile) >> 10) > maxLogSize) { // Use KB as file size unit.
 				String logFilename = outFile.getAbsolutePath();
 
 				// Delete old backup file that will be replaced.
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
index 17910e0..4a4a7e0 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -183,11 +183,9 @@ public class EclipseStarter {
 				endSplashHandler.run();
 			// may use startupFailed to understand where the error happened
 			FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, startupFailed ? EclipseAdaptorMsg.ECLIPSE_STARTUP_STARTUP_ERROR : EclipseAdaptorMsg.ECLIPSE_STARTUP_APP_ERROR, 1, e, null);
-			if (log != null) {
+			if (log != null)
 				log.log(logEntry);
-				if (context != null) // this can be null if OSGi failed to launch (bug 151413)
-					logUnresolvedBundles(context.getBundles());
-			} else
+			else
 				// TODO desperate measure - ideally, we should write this to disk (a la Main.log)
 				e.printStackTrace();
 		} finally {
@@ -216,8 +214,10 @@ public class EclipseStarter {
 			}
 		}
 		// we only get here if an error happened
-		FrameworkProperties.setProperty(PROP_EXITCODE, "13"); //$NON-NLS-1$
-		FrameworkProperties.setProperty(PROP_EXITDATA, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_CHECK_LOG, log == null ? null : log.getFile().getPath()));
+		if (FrameworkProperties.getProperty(PROP_EXITCODE) == null) {
+			FrameworkProperties.setProperty(PROP_EXITCODE, "13"); //$NON-NLS-1$
+			FrameworkProperties.setProperty(PROP_EXITDATA, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_CHECK_LOG, log == null ? null : log.getFile().getPath()));
+		}
 		return null;
 	}
 
@@ -357,17 +357,23 @@ public class EclipseStarter {
 		// if we are just initializing, do not run the application just return.
 		if (initialize)
 			return new Integer(0);
-		if (appLauncher == null) {
-			boolean launchDefault = Boolean.valueOf(FrameworkProperties.getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")).booleanValue(); //$NON-NLS-1$
-			// create the ApplicationLauncher and register it as a service
-			appLauncher = new EclipseAppLauncher(context, Boolean.valueOf(FrameworkProperties.getProperty(PROP_ALLOW_APPRELAUNCH)).booleanValue(), launchDefault, log);
-			appLauncherRegistration = context.registerService(ApplicationLauncher.class.getName(), appLauncher, null);
-			// must start the launcher AFTER service restration because this method 
-			// blocks and runs the application on the current thread.  This method 
-			// will return only after the application has stopped.
-			return appLauncher.start(argument);
+		try {
+			if (appLauncher == null) {
+				boolean launchDefault = Boolean.valueOf(FrameworkProperties.getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")).booleanValue(); //$NON-NLS-1$
+				// create the ApplicationLauncher and register it as a service
+				appLauncher = new EclipseAppLauncher(context, Boolean.valueOf(FrameworkProperties.getProperty(PROP_ALLOW_APPRELAUNCH)).booleanValue(), launchDefault, log);
+				appLauncherRegistration = context.registerService(ApplicationLauncher.class.getName(), appLauncher, null);
+				// must start the launcher AFTER service restration because this method 
+				// blocks and runs the application on the current thread.  This method 
+				// will return only after the application has stopped.
+				return appLauncher.start(argument);
+			}
+			return appLauncher.reStart(argument);
+		} catch (Exception e) {
+			if (log != null && context != null) // context can be null if OSGi failed to launch (bug 151413)
+				logUnresolvedBundles(context.getBundles());
+			throw e;
 		}
-		return appLauncher.reStart(argument);
 	}
 
 	/**
@@ -699,11 +705,10 @@ public class EclipseStarter {
 	private static boolean refreshPackages(Bundle[] bundles) {
 		ServiceReference packageAdminRef = context.getServiceReference(PackageAdmin.class.getName());
 		PackageAdmin packageAdmin = null;
-		if (packageAdminRef != null) {
+		if (packageAdminRef != null)
 			packageAdmin = (PackageAdmin) context.getService(packageAdminRef);
-			if (packageAdmin == null)
-				return false;
-		}
+		if (packageAdmin == null)
+			return false;
 		// TODO this is such a hack it is silly.  There are still cases for race conditions etc
 		// but this should allow for some progress...
 		final Semaphore semaphore = new Semaphore(0);
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
index bfcb158..354863e 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -73,6 +73,8 @@ public class LocationManager {
 	private static final String USER_HOME = "@user.home"; //$NON-NLS-1$
 	private static final String USER_DIR = "@user.dir"; //$NON-NLS-1$
 
+	private static final String INSTANCE_DATA_AREA_PREFIX = ".metadata/.plugins/"; //$NON-NLS-1$
+
 	/**
 	 * Builds a URL with the given specification
 	 * @param spec the URL specification
@@ -103,34 +105,35 @@ public class LocationManager {
 	public static void initializeLocations() {
 		// do install location initialization first since others may depend on it
 		// assumes that the property is already set
-		installLocation = buildLocation(PROP_INSTALL_AREA, null, "", true, false); //$NON-NLS-1$
+		installLocation = buildLocation(PROP_INSTALL_AREA, null, "", true, false, null); //$NON-NLS-1$
 
-		Location temp = buildLocation(PROP_USER_AREA_DEFAULT, null, "", false, false); //$NON-NLS-1$
+		// TODO not sure what the data area prefix should be here for the user area
+		Location temp = buildLocation(PROP_USER_AREA_DEFAULT, null, "", false, false, null); //$NON-NLS-1$
 		URL defaultLocation = temp == null ? null : temp.getURL();
 		if (defaultLocation == null)
 			defaultLocation = buildURL(new File(FrameworkProperties.getProperty(PROP_USER_HOME), "user").getAbsolutePath(), true); //$NON-NLS-1$
-		userLocation = buildLocation(PROP_USER_AREA, defaultLocation, "", false, false); //$NON-NLS-1$
+		userLocation = buildLocation(PROP_USER_AREA, defaultLocation, "", false, false, null); //$NON-NLS-1$
 
-		temp = buildLocation(PROP_INSTANCE_AREA_DEFAULT, null, "", false, false); //$NON-NLS-1$
+		temp = buildLocation(PROP_INSTANCE_AREA_DEFAULT, null, "", false, false, INSTANCE_DATA_AREA_PREFIX); //$NON-NLS-1$
 		defaultLocation = temp == null ? null : temp.getURL();
 		if (defaultLocation == null)
 			defaultLocation = buildURL(new File(FrameworkProperties.getProperty(PROP_USER_DIR), "workspace").getAbsolutePath(), true); //$NON-NLS-1$
-		instanceLocation = buildLocation(PROP_INSTANCE_AREA, defaultLocation, "", false, false); //$NON-NLS-1$
+		instanceLocation = buildLocation(PROP_INSTANCE_AREA, defaultLocation, "", false, false, INSTANCE_DATA_AREA_PREFIX); //$NON-NLS-1$
 
 		mungeConfigurationLocation();
 		// compute a default but it is very unlikely to be used since main will have computed everything
-		temp = buildLocation(PROP_CONFIG_AREA_DEFAULT, null, "", false, false); //$NON-NLS-1$
+		temp = buildLocation(PROP_CONFIG_AREA_DEFAULT, null, "", false, false, null); //$NON-NLS-1$
 		defaultLocation = temp == null ? null : temp.getURL();
 		if (defaultLocation == null && FrameworkProperties.getProperty(PROP_CONFIG_AREA) == null)
 			// only compute the default if the configuration area property is not set
 			defaultLocation = buildURL(computeDefaultConfigurationLocation(), true);
-		configurationLocation = buildLocation(PROP_CONFIG_AREA, defaultLocation, "", false, false); //$NON-NLS-1$
+		configurationLocation = buildLocation(PROP_CONFIG_AREA, defaultLocation, "", false, false, null); //$NON-NLS-1$
 		// get the parent location based on the system property. This will have been set on the 
 		// way in either by the caller/user or by main.  There will be no parent location if we are not 
 		// cascaded.
 		URL parentLocation = computeSharedConfigurationLocation();
 		if (parentLocation != null && !parentLocation.equals(configurationLocation.getURL())) {
-			Location parent = new BasicLocation(null, parentLocation, true);
+			Location parent = new BasicLocation(null, parentLocation, true, null);
 			((BasicLocation) configurationLocation).setParent(parent);
 		}
 		initializeDerivedConfigurationLocations();
@@ -144,7 +147,7 @@ public class LocationManager {
 		// if eclipse.home.location is not set then default to osgi.install.area
 		if (FrameworkProperties.getProperty(PROP_HOME_LOCATION_AREA) == null && FrameworkProperties.getProperty(PROP_INSTALL_AREA) != null)
 			FrameworkProperties.setProperty(PROP_HOME_LOCATION_AREA, FrameworkProperties.getProperty(PROP_INSTALL_AREA));
-		eclipseHomeLocation = buildLocation(PROP_HOME_LOCATION_AREA, null, "", true, true); //$NON-NLS-1$
+		eclipseHomeLocation = buildLocation(PROP_HOME_LOCATION_AREA, null, "", true, true, null); //$NON-NLS-1$
 	}
 
 	private static String getEclipseHomeLocation(String launcher) {
@@ -174,7 +177,7 @@ public class LocationManager {
 		return launcherParent == null ? null : new File(launcherParent);
 	}
 
-	private static Location buildLocation(String property, URL defaultLocation, String userDefaultAppendage, boolean readOnlyDefault, boolean computeReadOnly) {
+	private static Location buildLocation(String property, URL defaultLocation, String userDefaultAppendage, boolean readOnlyDefault, boolean computeReadOnly, String dataAreaPrefix) {
 		String location = FrameworkProperties.clearProperty(property);
 		// the user/product may specify a non-default readOnly setting   
 		String userReadOnlySetting = FrameworkProperties.getProperty(property + READ_ONLY_AREA_SUFFIX);
@@ -182,12 +185,12 @@ public class LocationManager {
 		// if the instance location is not set, predict where the workspace will be and 
 		// put the instance area inside the workspace meta area.
 		if (location == null)
-			return new BasicLocation(property, defaultLocation, userReadOnlySetting != null || !computeReadOnly ? readOnly : !canWrite(defaultLocation));
+			return new BasicLocation(property, defaultLocation, userReadOnlySetting != null || !computeReadOnly ? readOnly : !canWrite(defaultLocation), dataAreaPrefix);
 		String trimmedLocation = location.trim();
 		if (trimmedLocation.equalsIgnoreCase(NONE))
 			return null;
 		if (trimmedLocation.equalsIgnoreCase(NO_DEFAULT))
-			return new BasicLocation(property, null, readOnly);
+			return new BasicLocation(property, null, readOnly, dataAreaPrefix);
 		if (trimmedLocation.startsWith(USER_HOME)) {
 			String base = substituteVar(location, USER_HOME, PROP_USER_HOME);
 			location = new File(base, userDefaultAppendage).getAbsolutePath();
@@ -198,7 +201,7 @@ public class LocationManager {
 		URL url = buildURL(location, true);
 		BasicLocation result = null;
 		if (url != null) {
-			result = new BasicLocation(property, null, userReadOnlySetting != null || !computeReadOnly ? readOnly : !canWrite(url));
+			result = new BasicLocation(property, null, userReadOnlySetting != null || !computeReadOnly ? readOnly : !canWrite(url), dataAreaPrefix);
 			result.setURL(url, false);
 		}
 		return result;
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/CachedManifest.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/CachedManifest.java
index bc1a971..3d4fbd8 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/CachedManifest.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/CachedManifest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.osgi.framework.adaptor.BundleData;
 import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor;
 import org.eclipse.osgi.framework.internal.core.Constants;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
+import org.eclipse.osgi.framework.util.Headers;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.Version;
@@ -25,6 +26,7 @@ import org.osgi.framework.Version;
  */
 public class CachedManifest extends Dictionary {
 	static final String SERVICE_COMPONENT = "Service-Component"; //$NON-NLS-1$
+	static boolean DEBUG = false;
 	private Dictionary manifest = null;
 	private EclipseStorageHook storageHook;
 
@@ -35,6 +37,8 @@ public class CachedManifest extends Dictionary {
 	public Dictionary getManifest() {
 		if (manifest == null)
 			try {
+				if (DEBUG)
+					System.out.println("Reading manifest for: " + storageHook.getBaseData()); //$NON-NLS-1$
 				manifest = storageHook.createCachedManifest(true);
 			} catch (BundleException e) {
 				final String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CACHEDMANIFEST_UNEXPECTED_EXCEPTION, storageHook.getBaseData().getLocation());
@@ -42,11 +46,16 @@ public class CachedManifest extends Dictionary {
 				storageHook.getAdaptor().getFrameworkLog().log(entry);
 				return null;
 			}
+		if (manifest == null) {
+			Headers empty = new Headers(0);
+			empty.setReadOnly();
+			manifest = empty;
+			return empty;
+		}
 		return manifest;
 	}
 
 	public int size() {
-		//TODO: getManifest may return null
 		return getManifest().size();
 	}
 
@@ -55,12 +64,10 @@ public class CachedManifest extends Dictionary {
 	}
 
 	public Enumeration elements() {
-		//TODO: getManifest may return null		
 		return getManifest().elements();
 	}
 
 	public Enumeration keys() {
-		//TODO: getManifest may return null		
 		return getManifest().keys();
 	}
 
@@ -133,16 +140,16 @@ public class CachedManifest extends Dictionary {
 		if (SERVICE_COMPONENT.equals(keyString))
 			return storageHook.getServiceComponent();
 		Dictionary result = getManifest();
+		if (DEBUG)
+			System.out.println("Manifest read because of header: " + key); //$NON-NLS-1$
 		return result == null ? null : result.get(key);
 	}
 
 	public Object remove(Object key) {
-		//TODO: getManifest may return null		
 		return getManifest().remove(key);
 	}
 
 	public Object put(Object key, Object value) {
-		//TODO: getManifest may return null		
 		return getManifest().put(key, value);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/ContextFinder.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/ContextFinder.java
index b8fc302..ae2a38d 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/ContextFinder.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/ContextFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction {
 
 	public ContextFinder(ClassLoader contextClassLoader) {
 		super(contextClassLoader);
-		this.parentContextClassLoader = contextClassLoader != null ? contextClassLoader : new ClassLoader(null) {/*parentless classloader*/};
+		this.parentContextClassLoader = contextClassLoader != null ? contextClassLoader : new ClassLoader(Object.class.getClassLoader()) {/*boot classloader*/};
 	}
 
 	// Return a list of all classloaders on the stack that are neither the 
@@ -153,7 +153,7 @@ public class ContextFinder extends ClassLoader implements PrivilegedAction {
 	protected Enumeration findResources(String arg0) throws IOException {
 		//Shortcut cycle
 		if (startLoading(arg0) == false)
-			return null;
+			return Collections.enumeration(Collections.EMPTY_LIST);
 		try {
 			ArrayList toConsult = findClassLoaders();
 			for (Iterator loaders = toConsult.iterator(); loaders.hasNext();) {
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
index f930135..51ecaec 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/DefaultStartupMonitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,10 +34,10 @@ public class DefaultStartupMonitor implements StartupMonitor {
 		try {
 			updateMethod = splashHandler.getClass().getMethod("updateSplash", null); //$NON-NLS-1$
 		} catch (SecurityException e) {
-			throw new IllegalStateException(e.getMessage());
+			throw (IllegalStateException) new IllegalStateException(e.getMessage()).initCause(e);
 		} catch (NoSuchMethodException e) {
 			//TODO maybe we could do something else in the update method in this case, like print something to the console?
-			throw new IllegalStateException(e.getMessage());
+			throw (IllegalStateException) new IllegalStateException(e.getMessage()).initCause(e);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorHook.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorHook.java
index 5ddb552..cb29c6f 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,8 @@ import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor;
 import org.eclipse.osgi.framework.console.CommandProvider;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
+import org.eclipse.osgi.framework.internal.core.BundleHost;
+import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 import org.eclipse.osgi.internal.baseadaptor.AdaptorUtil;
@@ -40,6 +42,8 @@ public class EclipseAdaptorHook implements AdaptorHook, HookConfigurator {
 	private static final String RUNTIME_ADAPTOR = FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME + "/eclipseadaptor"; //$NON-NLS-1$
 	private static final String OPTION_CONVERTER = RUNTIME_ADAPTOR + "/converter/debug"; //$NON-NLS-1$
 	private static final String OPTION_LOCATION = RUNTIME_ADAPTOR + "/debug/location"; //$NON-NLS-1$
+	private static final String OPTION_CACHEDMANIFEST = RUNTIME_ADAPTOR + "/debug/cachedmanifest"; //$NON-NLS-1$
+	static final boolean SET_TCCL_XMLFACTORY = "true".equals(FrameworkProperties.getProperty("eclipse.parsers.setTCCL", "true"));//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 
 	private BaseAdaptor adaptor;
 	private boolean noXML = false;
@@ -93,9 +97,9 @@ public class EclipseAdaptorHook implements AdaptorHook, HookConfigurator {
 	private void registerEndorsedXMLParser(BundleContext bc) {
 		try {
 			Class.forName(SAXFACTORYNAME);
-			registrations.add(bc.registerService(SAXFACTORYNAME, new SaxParsingService(), new Hashtable()));
+			registrations.add(bc.registerService(SAXFACTORYNAME, new ParsingService(true), null));
 			Class.forName(DOMFACTORYNAME);
-			registrations.add(bc.registerService(DOMFACTORYNAME, new DomParsingService(), new Hashtable()));
+			registrations.add(bc.registerService(DOMFACTORYNAME, new ParsingService(false), null));
 		} catch (ClassNotFoundException e) {
 			noXML = true;
 			if (Debug.DEBUG && Debug.DEBUG_ENABLED) {
@@ -105,18 +109,42 @@ public class EclipseAdaptorHook implements AdaptorHook, HookConfigurator {
 		}
 	}
 
-	private class SaxParsingService implements ServiceFactory {
-		public Object getService(Bundle bundle, ServiceRegistration registration) {
-			return SAXParserFactory.newInstance();
-		}
+	private static class ParsingService implements ServiceFactory {
+		private final boolean isSax;
 
-		public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
-			// Do nothing.
+		public ParsingService(boolean isSax) {
+			this.isSax = isSax;
 		}
-	}
 
-	private class DomParsingService implements ServiceFactory {
 		public Object getService(Bundle bundle, ServiceRegistration registration) {
+			BundleHost host = (bundle instanceof BundleHost) ? (BundleHost) bundle : null;
+			if (!SET_TCCL_XMLFACTORY || bundle == null)
+				return createService();
+			/*
+			 * Set the TCCL while creating jaxp factory instances to the
+			 * requesting bundles class loader.  This is needed to 
+			 * work around bug 285505.  There are issues if multiple 
+			 * xerces implementations are available on the bundles class path
+			 * 
+			 * The real issue is that the ContextFinder will only delegate
+			 * to the framework class loader in this case.  This class
+			 * loader forces the requesting bundle to be delegated to for
+			 * TCCL loads.
+			 */
+			final ClassLoader savedClassLoader = Thread.currentThread().getContextClassLoader();
+			try {
+				ClassLoader cl = host.getClassLoader();
+				if (cl != null)
+					Thread.currentThread().setContextClassLoader(cl);
+				return createService();
+			} finally {
+				Thread.currentThread().setContextClassLoader(savedClassLoader);
+			}
+		}
+
+		private Object createService() {
+			if (isSax)
+				return SAXParserFactory.newInstance();
 			return DocumentBuilderFactory.newInstance();
 		}
 
@@ -186,6 +214,7 @@ public class EclipseAdaptorHook implements AdaptorHook, HookConfigurator {
 			return;
 		PluginConverterImpl.DEBUG = options.getBooleanOption(OPTION_CONVERTER, false);
 		BasicLocation.DEBUG = options.getBooleanOption(OPTION_LOCATION, false);
+		CachedManifest.DEBUG = options.getBooleanOption(OPTION_CACHEDMANIFEST, false);
 	}
 
 	public void addHooks(HookRegistry hookRegistry) {
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseClassLoadingHook.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseClassLoadingHook.java
index aad589f..87c862d 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseClassLoadingHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseClassLoadingHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,12 +23,14 @@ import org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook;
 import org.eclipse.osgi.baseadaptor.loader.*;
 import org.eclipse.osgi.framework.adaptor.BundleProtectionDomain;
 import org.eclipse.osgi.framework.adaptor.ClassLoaderDelegate;
+import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.internal.baseadaptor.BaseClassLoadingHook;
 import org.eclipse.osgi.internal.baseadaptor.BaseStorageHook;
 
 public class EclipseClassLoadingHook implements ClassLoadingHook, HookConfigurator {
 	private static String[] NL_JAR_VARIANTS = buildNLJarVariants(EclipseEnvironmentInfo.getDefault().getNL());
 	private static boolean DEFINE_PACKAGES;
+	private final static boolean DEFINE_PACKAGE_ATTRIBUTES = !"noattributes".equals(FrameworkProperties.getProperty("osgi.classloader.define.packages")); //$NON-NLS-1$ //$NON-NLS-2$
 	private static String[] LIB_VARIANTS = buildLibraryVariants();
 	private Object pkgLock = new Object();
 
@@ -75,40 +77,44 @@ public class EclipseClassLoadingHook implements ClassLoadingHook, HookConfigurat
 
 		// get info about the package from the classpath entry's manifest.
 		String specTitle = null, specVersion = null, specVendor = null, implTitle = null, implVersion = null, implVendor = null;
-		ClasspathManifest cpm = (ClasspathManifest) classpathEntry.getUserObject(ClasspathManifest.KEY);
-		if (cpm == null) {
-			cpm = new ClasspathManifest();
-			classpathEntry.addUserObject(cpm);
-		}
-		Manifest mf = cpm.getManifest(classpathEntry, manager);
-		if (mf != null) {
-			Attributes mainAttributes = mf.getMainAttributes();
-			String dirName = packageName.replace('.', '/') + '/';
-			Attributes packageAttributes = mf.getAttributes(dirName);
-			boolean noEntry = false;
-			if (packageAttributes == null) {
-				noEntry = true;
-				packageAttributes = mainAttributes;
+
+		if (DEFINE_PACKAGE_ATTRIBUTES) {
+			ClasspathManifest cpm = (ClasspathManifest) classpathEntry.getUserObject(ClasspathManifest.KEY);
+			if (cpm == null) {
+				cpm = new ClasspathManifest();
+				classpathEntry.addUserObject(cpm);
+			}
+			Manifest mf = cpm.getManifest(classpathEntry, manager);
+			if (mf != null) {
+				Attributes mainAttributes = mf.getMainAttributes();
+				String dirName = packageName.replace('.', '/') + '/';
+				Attributes packageAttributes = mf.getAttributes(dirName);
+				boolean noEntry = false;
+				if (packageAttributes == null) {
+					noEntry = true;
+					packageAttributes = mainAttributes;
+				}
+				specTitle = packageAttributes.getValue(Attributes.Name.SPECIFICATION_TITLE);
+				if (specTitle == null && !noEntry)
+					specTitle = mainAttributes.getValue(Attributes.Name.SPECIFICATION_TITLE);
+				specVersion = packageAttributes.getValue(Attributes.Name.SPECIFICATION_VERSION);
+				if (specVersion == null && !noEntry)
+					specVersion = mainAttributes.getValue(Attributes.Name.SPECIFICATION_VERSION);
+				specVendor = packageAttributes.getValue(Attributes.Name.SPECIFICATION_VENDOR);
+				if (specVendor == null && !noEntry)
+					specVendor = mainAttributes.getValue(Attributes.Name.SPECIFICATION_VENDOR);
+				implTitle = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_TITLE);
+				if (implTitle == null && !noEntry)
+					implTitle = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_TITLE);
+				implVersion = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
+				if (implVersion == null && !noEntry)
+					implVersion = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
+				implVendor = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_VENDOR);
+				if (implVendor == null && !noEntry)
+					implVendor = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VENDOR);
 			}
-			specTitle = packageAttributes.getValue(Attributes.Name.SPECIFICATION_TITLE);
-			if (specTitle == null && !noEntry)
-				specTitle = mainAttributes.getValue(Attributes.Name.SPECIFICATION_TITLE);
-			specVersion = packageAttributes.getValue(Attributes.Name.SPECIFICATION_VERSION);
-			if (specVersion == null && !noEntry)
-				specVersion = mainAttributes.getValue(Attributes.Name.SPECIFICATION_VERSION);
-			specVendor = packageAttributes.getValue(Attributes.Name.SPECIFICATION_VENDOR);
-			if (specVendor == null && !noEntry)
-				specVendor = mainAttributes.getValue(Attributes.Name.SPECIFICATION_VENDOR);
-			implTitle = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_TITLE);
-			if (implTitle == null && !noEntry)
-				implTitle = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_TITLE);
-			implVersion = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
-			if (implVersion == null && !noEntry)
-				implVersion = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
-			implVendor = packageAttributes.getValue(Attributes.Name.IMPLEMENTATION_VENDOR);
-			if (implVendor == null && !noEntry)
-				implVendor = mainAttributes.getValue(Attributes.Name.IMPLEMENTATION_VENDOR);
 		}
+
 		// The package is not defined yet define it before we define the class.
 		// TODO still need to seal packages.
 		synchronized (pkgLock) {
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseEnvironmentInfo.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseEnvironmentInfo.java
index bbaf086..90a5371 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseEnvironmentInfo.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseEnvironmentInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -193,7 +193,7 @@ public class EclipseEnvironmentInfo implements EnvironmentInfo {
 		if (os.equals(Constants.OS_LINUX))
 			return Constants.WS_GTK;
 		if (os.equals(Constants.OS_MACOSX))
-			return Constants.WS_CARBON;
+			return Constants.WS_COCOA;
 		if (os.equals(Constants.OS_HPUX))
 			return Constants.WS_MOTIF;
 		if (os.equals(Constants.OS_AIX))
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLazyStarter.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLazyStarter.java
index 75fefdb..d9a4df6 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLazyStarter.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/EclipseLazyStarter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.core.runtime.internal.adaptor;
 import java.io.IOException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.security.AccessController;
 import java.util.*;
 import org.eclipse.osgi.baseadaptor.*;
 import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
@@ -26,20 +25,16 @@ import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor;
 import org.eclipse.osgi.framework.adaptor.StatusException;
 import org.eclipse.osgi.framework.debug.Debug;
 import org.eclipse.osgi.framework.internal.core.*;
+import org.eclipse.osgi.framework.internal.core.Constants;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
-import org.eclipse.osgi.framework.util.SecureAction;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.StateHelper;
 import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
-import org.osgi.service.startlevel.StartLevel;
 
 public class EclipseLazyStarter implements ClassLoadingStatsHook, AdaptorHook, HookConfigurator {
 	private static final boolean throwErrorOnFailedStart = "true".equals(FrameworkProperties.getProperty("osgi.compatibility.errorOnFailedStart", "true")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
-	private static final SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
-	private StartLevelManager startLevelService;
-	private ServiceReference slRef;
 	private BaseAdaptor adaptor;
 	// holds the current activation trigger class and the ClasspathManagers that need to be activated
 	private ThreadLocal activationStack = new ThreadLocal();
@@ -102,14 +97,15 @@ public class EclipseLazyStarter implements ClassLoadingStatsHook, AdaptorHook, H
 					throw (TerminatingClassNotFoundException) errors.get(managers[i]);
 				continue;
 			}
-			AbstractBundle bundle = (AbstractBundle) managers[i].getBaseData().getBundle();
+
 			// The bundle must be started.
 			// Note that another thread may already be starting this bundle;
 			// In this case we will timeout after 5 seconds and record the BundleException
 			try {
 				// do not persist the start of this bundle
-				secureAction.start(bundle, Bundle.START_TRANSIENT);
+				managers[i].getBaseClassLoader().getDelegate().setLazyTrigger();
 			} catch (BundleException e) {
+				Bundle bundle = managers[i].getBaseData().getBundle();
 				Throwable cause = e.getCause();
 				if (cause != null && cause instanceof StatusException) {
 					StatusException status = (StatusException) cause;
@@ -148,6 +144,8 @@ public class EclipseLazyStarter implements ClassLoadingStatsHook, AdaptorHook, H
 	private boolean shouldActivateFor(String className, BaseData bundledata, EclipseStorageHook storageHook, ClasspathManager manager) throws ClassNotFoundException {
 		if (!isLazyStartable(className, bundledata, storageHook))
 			return false;
+		//if (manager.getBaseClassLoader().getDelegate().isLazyTriggerSet())
+		//	return false;
 		// Don't activate non-starting bundles
 		if (bundledata.getBundle().getState() == Bundle.RESOLVED) {
 			if (throwErrorOnFailedStart) {
@@ -155,8 +153,7 @@ public class EclipseLazyStarter implements ClassLoadingStatsHook, AdaptorHook, H
 				if (error != null)
 					throw error;
 			}
-			StartLevelManager sl = startLevelService;
-			return sl != null && ((sl.getStartLevel() == bundledata.getStartLevel() && sl.isSettingStartLevel()));
+			return (bundledata.getStatus() & Constants.BUNDLE_STARTED) != 0;
 		}
 		return true;
 	}
@@ -203,16 +200,11 @@ public class EclipseLazyStarter implements ClassLoadingStatsHook, AdaptorHook, H
 	}
 
 	public void frameworkStart(BundleContext context) throws BundleException {
-		slRef = context.getServiceReference(StartLevel.class.getName());
-		if (slRef != null)
-			startLevelService = (StartLevelManager) context.getService(slRef);
+		// nothing
 	}
 
 	public void frameworkStop(BundleContext context) throws BundleException {
-		if (slRef != null) {
-			context.ungetService(slRef);
-			startLevelService = null;
-		}
+		// nothing
 	}
 
 	public void frameworkStopping(BundleContext context) {
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/MessageHelper.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/MessageHelper.java
index ef4bb4b..f09b4ef 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/MessageHelper.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/MessageHelper.java
@@ -13,6 +13,7 @@ package org.eclipse.core.runtime.internal.adaptor;
 import java.util.Date;
 import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.NLS;
+import org.osgi.framework.Constants;
 
 /**
  * @since 3.3
@@ -21,15 +22,19 @@ public class MessageHelper {
 	public static String getResolutionFailureMessage(VersionConstraint unsatisfied) {
 		if (unsatisfied.isResolved())
 			throw new IllegalArgumentException();
-		if (unsatisfied instanceof ImportPackageSpecification)
+		if (unsatisfied instanceof ImportPackageSpecification) {
+			if (ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(((ImportPackageSpecification) unsatisfied).getDirective(Constants.RESOLUTION_DIRECTIVE)))
+				return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_OPTIONAL_IMPORTED_PACKAGE, toString(unsatisfied));
+			if (ImportPackageSpecification.RESOLUTION_DYNAMIC.equals(((ImportPackageSpecification) unsatisfied).getDirective(Constants.RESOLUTION_DIRECTIVE)))
+				return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_DYNAMIC_IMPORTED_PACKAGE, toString(unsatisfied));
 			return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_IMPORTED_PACKAGE, toString(unsatisfied));
-		else if (unsatisfied instanceof BundleSpecification)
+		}
+		if (unsatisfied instanceof BundleSpecification) {
 			if (((BundleSpecification) unsatisfied).isOptional())
 				return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE, toString(unsatisfied));
-			else
-				return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_REQUIRED_BUNDLE, toString(unsatisfied));
-		else
-			return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_HOST, toString(unsatisfied));
+			return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_REQUIRED_BUNDLE, toString(unsatisfied));
+		}
+		return NLS.bind(EclipseAdaptorMsg.ECLIPSE_MISSING_HOST, toString(unsatisfied));
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java
index 1eb42c2..531766a 100644
--- a/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,10 @@
 package org.eclipse.core.runtime.internal.adaptor;
 
 import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.*;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.adaptor.*;
+import org.eclipse.core.runtime.adaptor.LocationManager;
 import org.eclipse.osgi.framework.adaptor.FrameworkAdaptor;
 import org.eclipse.osgi.framework.internal.core.Constants;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
@@ -55,6 +53,7 @@ public class PluginConverterImpl implements PluginConverter {
 	private BufferedWriter out;
 	private IPluginInfo pluginInfo;
 	private File pluginManifestLocation;
+	private ZipFile pluginZip;
 	private Dictionary generatedManifest;
 	private byte manifestType;
 	private Version target;
@@ -92,6 +91,7 @@ public class PluginConverterImpl implements PluginConverter {
 		out = null;
 		pluginInfo = null;
 		pluginManifestLocation = null;
+		pluginZip = null;
 		generatedManifest = new Hashtable(10);
 		manifestType = MANIFEST_TYPE_UNKNOWN;
 		target = null;
@@ -102,10 +102,25 @@ public class PluginConverterImpl implements PluginConverter {
 		pluginManifestLocation = pluginBaseLocation;
 		if (pluginManifestLocation == null)
 			throw new IllegalArgumentException();
-		URL pluginFile = findPluginManifest(pluginBaseLocation);
-		if (pluginFile == null)
-			throw new PluginConversionException(NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_FILENOTFOUND, pluginBaseLocation.getAbsolutePath()));
-		pluginInfo = parsePluginInfo(pluginFile);
+		InputStream pluginFile = null;
+		try {
+			try {
+				pluginFile = findPluginManifest(pluginBaseLocation);
+			} catch (IOException e) {
+				throw new PluginConversionException(NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_FILENOTFOUND, pluginBaseLocation.getAbsolutePath()), e);
+			}
+			if (pluginFile == null)
+				throw new PluginConversionException(NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_FILENOTFOUND, pluginBaseLocation.getAbsolutePath()));
+			pluginInfo = parsePluginInfo(pluginFile);
+		} finally {
+			if (pluginZip != null)
+				try {
+					pluginZip.close();
+					pluginZip = null;
+				} catch (IOException e) {
+					// ignore
+				}
+		}
 		String validation = pluginInfo.validateForm();
 		if (validation != null)
 			throw new PluginConversionException(validation);
@@ -150,59 +165,48 @@ public class PluginConverterImpl implements PluginConverter {
 		return found;
 	}
 
-	private URL findPluginManifest(File baseLocation) {
+	private InputStream findPluginManifest(File baseLocation) throws IOException {
 		//Here, we can not use the bundlefile because it may explode the jar and returns a location from which we will not be able to derive the jars location 
-		URL xmlFileLocation;
-		InputStream stream = null;
-		URL baseURL = null;
-		try {
-			if (!baseLocation.isDirectory()) {
-				baseURL = new URL("jar:file:" + baseLocation.toString() + "!/"); //$NON-NLS-1$ //$NON-NLS-2$
-				manifestType |= MANIFEST_TYPE_JAR;
-			} else {
-				baseURL = baseLocation.toURL();
-			}
-		} catch (MalformedURLException e1) {
-			//this can't happen since we are building the urls ourselves from a file
-		}
-		try {
-			xmlFileLocation = new URL(baseURL, PLUGIN_MANIFEST);
-			stream = xmlFileLocation.openStream();
-			manifestType |= MANIFEST_TYPE_PLUGIN;
-			return xmlFileLocation;
-		} catch (MalformedURLException e) {
-			FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null);
-			adaptor.getFrameworkLog().log(entry);
-			return null;
-		} catch (IOException ioe) {
-			//ignore
-		} finally {
+		if (pluginZip != null)
 			try {
-				if (stream != null)
-					stream.close();
+				pluginZip.close();
 			} catch (IOException e) {
-				//ignore
+				// ignore
 			}
+		pluginZip = null;
+		if (!baseLocation.isDirectory()) {
+			manifestType |= MANIFEST_TYPE_JAR;
+			pluginZip = new ZipFile(baseLocation);
 		}
-		try {
-			xmlFileLocation = new URL(baseURL, FRAGMENT_MANIFEST);
-			stream = xmlFileLocation.openStream();
-			manifestType |= MANIFEST_TYPE_FRAGMENT;
-			return xmlFileLocation;
-		} catch (MalformedURLException e) {
-			FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null);
-			adaptor.getFrameworkLog().log(entry);
-			return null;
-		} catch (IOException ioe) {
-			// Ignore
-		} finally {
-			try {
-				if (stream != null)
-					stream.close();
-			} catch (IOException e) {
-				//ignore
+
+		if (pluginZip != null) {
+			ZipEntry manifestEntry = pluginZip.getEntry(PLUGIN_MANIFEST);
+			if (manifestEntry != null) {
+				manifestType |= MANIFEST_TYPE_PLUGIN;
+				return pluginZip.getInputStream(manifestEntry);
+			}
+		} else {
+			File manifestFile = new File(baseLocation, PLUGIN_MANIFEST);
+			if (manifestFile.exists()) {
+				manifestType |= MANIFEST_TYPE_PLUGIN;
+				return new FileInputStream(manifestFile);
 			}
 		}
+
+		if (pluginZip != null) {
+			ZipEntry manifestEntry = pluginZip.getEntry(FRAGMENT_MANIFEST);
+			if (manifestEntry != null) {
+				manifestType |= MANIFEST_TYPE_PLUGIN;
+				return pluginZip.getInputStream(manifestEntry);
+			}
+		} else {
+			File manifestFile = new File(baseLocation, FRAGMENT_MANIFEST);
+			if (manifestFile.exists()) {
+				manifestType |= MANIFEST_TYPE_FRAGMENT;
+				return new FileInputStream(manifestFile);
+			}
+		}
+
 		return null;
 	}
 
@@ -582,10 +586,10 @@ public class PluginConverterImpl implements PluginConverter {
 	 * the plug-in version - runtime/libraries entries - the plug-in class -
 	 * the master plugin (for a fragment)
 	 */
-	private IPluginInfo parsePluginInfo(URL pluginLocation) throws PluginConversionException {
+	private IPluginInfo parsePluginInfo(InputStream pluginLocation) throws PluginConversionException {
 		InputStream input = null;
 		try {
-			input = new BufferedInputStream(pluginLocation.openStream());
+			input = new BufferedInputStream(pluginLocation);
 			return new PluginParser(adaptor, context, target).parsePlugin(input);
 		} catch (Exception e) {
 			String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_ERROR_PARSING_PLUGIN_MANIFEST, pluginManifestLocation);
diff --git a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
index c512a68..da2f540 100644
--- a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
+++ b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/PackagePermission.java
@@ -56,7 +56,7 @@ import java.util.Map;
  * which is deprecated, implies the <code>import</code> action.
  * 
  * @ThreadSafe
- * @version $Revision: 7318 $
+ * @version $Revision: 7189 $
  */
 
 public final class PackagePermission extends BasicPermission {
@@ -166,8 +166,8 @@ public final class PackagePermission extends BasicPermission {
 	 * @param actions <code>exportonly</code>,<code>import</code> (canonical
 	 *        order).
 	 * @throws IllegalArgumentException If the specified name is a filter
-	 *        expression and either the specified action is not
-	 *        <code>import</code> or the filter has an invalid syntax.
+	 *         expression and either the specified action is not
+	 *         <code>import</code> or the filter has an invalid syntax.
 	 */
 	public PackagePermission(String name, String actions) {
 		this(name, parseActions(actions));
@@ -189,7 +189,7 @@ public final class PackagePermission extends BasicPermission {
 	 * @param exportingBundle The bundle exporting the requested package.
 	 * @param actions The action <code>import</code>.
 	 * @throws IllegalArgumentException If the specified action is not
-	 *        <code>import</code> or the name is a filter expression.
+	 *         <code>import</code> or the name is a filter expression.
 	 * @since 1.5
 	 */
 	public PackagePermission(String name, Bundle exportingBundle, String actions) {
diff --git a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
index e63e01f..d2f3c31 100644
--- a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
+++ b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/ServicePermission.java
@@ -51,7 +51,7 @@ import java.util.Map;
  * <code>ServicePermission</code> to get the specific service.
  * 
  * @ThreadSafe
- * @version $Revision: 7318 $
+ * @version $Revision: 7189 $
  */
 
 public final class ServicePermission extends BasicPermission {
@@ -167,8 +167,8 @@ public final class ServicePermission extends BasicPermission {
 	 * @param name The service class name
 	 * @param actions <code>get</code>,<code>register</code> (canonical order)
 	 * @throws IllegalArgumentException If the specified name is a filter
-	 *        expression and either the specified action is not <code>get</code>
-	 *        or the filter has an invalid syntax.
+	 *         expression and either the specified action is not
+	 *         <code>get</code> or the filter has an invalid syntax.
 	 */
 	public ServicePermission(String name, String actions) {
 		this(name, parseActions(actions));
@@ -189,7 +189,7 @@ public final class ServicePermission extends BasicPermission {
 	 * @param reference The requested service.
 	 * @param actions The action <code>get</code>.
 	 * @throws IllegalArgumentException If the specified action is not
-	 *        <code>get</code> or reference is <code>null</code>.
+	 *         <code>get</code> or reference is <code>null</code>.
 	 * @since 1.5
 	 */
 	public ServicePermission(ServiceReference reference, String actions) {
diff --git a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
index cf1f52a..1249493 100644
--- a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/EventHook.java
@@ -28,7 +28,7 @@ import org.osgi.framework.ServiceEvent;
  * (register, modify, and unregister service) operations.
  * 
  * @ThreadSafe
- * @version $Revision: 7318 $
+ * @version $Revision: 6967 $
  */
 
 public interface EventHook {
diff --git a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
index 5bc878e..0de1f0b 100644
--- a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/FindHook.java
@@ -28,7 +28,7 @@ import org.osgi.framework.BundleContext;
  * (get service references) operations.
  * 
  * @ThreadSafe
- * @version $Revision: 7318 $
+ * @version $Revision: 6967 $
  */
 
 public interface FindHook {
diff --git a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
index 192c06b..5934c0c 100644
--- a/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/osgi/src/org/osgi/framework/hooks/service/ListenerHook.java
@@ -28,7 +28,7 @@ import org.osgi.framework.BundleContext;
  * addition and removal.
  * 
  * @ThreadSafe
- * @version $Revision: 7318 $
+ * @version $Revision: 6967 $
  */
 
 public interface ListenerHook {
diff --git a/eclipse/plugins/org.eclipse.osgi/profile.list b/eclipse/plugins/org.eclipse.osgi/profile.list
index bef1eb5..30dab6d 100644
--- a/eclipse/plugins/org.eclipse.osgi/profile.list
+++ b/eclipse/plugins/org.eclipse.osgi/profile.list
@@ -9,6 +9,7 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 java.profiles = \
+ JavaSE-1.7.profile,\
  JavaSE-1.6.profile,\
  J2SE-1.5.profile,\
  J2SE-1.4.profile,\
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
index a0522d0..30c5963 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2004, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -10,6 +10,7 @@ package org.eclipse.osgi.internal.module;
 
 import java.util.*;
 import org.eclipse.osgi.service.resolver.BundleSpecification;
+import org.eclipse.osgi.service.resolver.ExportPackageDescription;
 
 /*
  * The GroupingChecker checks the 'uses' directive on exported packages for consistency
@@ -36,11 +37,16 @@ public class GroupingChecker {
 				isConsistentInternal(bundle, selectedSupplier, new ArrayList(1), true, null);
 		}
 		// process all imports
-		ResolverImport[] imports = bundle.getImportPackages();
-		for (int j = 0; j < imports.length; j++) {
-			ResolverExport selectedSupplier = (ResolverExport) imports[j].getSelectedSupplier();
-			if (selectedSupplier != null)
-				isConsistentInternal(bundle, selectedSupplier, true, null);
+		// must check resolved imports to get any dynamically resolved imports
+		ExportPackageDescription[] imports = bundle.getBundle().getResolvedImports();
+		for (int i = 0; i < imports.length; i++) {
+			ExportPackageDescription importPkg = imports[i];
+			Object[] exports = bundle.getResolver().getResolverExports().get(importPkg.getName());
+			for (int j = 0; j < exports.length; j++) {
+				ResolverExport export = (ResolverExport) exports[j];
+				if (export.getExportPackageDescription() == importPkg)
+					isConsistentInternal(bundle, export, true, null);
+			}
 		}
 	}
 
@@ -137,14 +143,30 @@ public class GroupingChecker {
 			return null;
 		visited.add(bundle); // prevent endless cycles
 		// check imports
-		ResolverImport imported = bundle.getImport(packageName);
-		if (imported != null && imported.getSelectedSupplier() != null) {
-			// make sure we are not resolved to our own import
-			ResolverExport selectedExport = (ResolverExport) imported.getSelectedSupplier();
-			if (selectedExport.getExporter() != bundle) {
-				// found resolved import; get the roots from the resolved exporter;
-				// this is all the roots if the package is imported
-				return getPackageRoots(selectedExport.getExporter(), packageName, visited);
+		if (bundle.getBundle().isResolved()) {
+			// must check resolved imports to get any dynamically resolved imports 
+			ExportPackageDescription[] imports = bundle.getBundle().getResolvedImports();
+			for (int i = 0; i < imports.length; i++) {
+				ExportPackageDescription importPkg = imports[i];
+				if (importPkg.getExporter() == bundle.getBundle() || !importPkg.getName().equals(packageName))
+					continue;
+				Object[] exports = bundle.getResolver().getResolverExports().get(packageName);
+				for (int j = 0; j < exports.length; j++) {
+					ResolverExport export = (ResolverExport) exports[j];
+					if (export.getExportPackageDescription() == importPkg)
+						return getPackageRoots(export.getExporter(), packageName, visited);
+				}
+			}
+		} else {
+			ResolverImport imported = bundle.getImport(packageName);
+			if (imported != null && imported.getSelectedSupplier() != null) {
+				// make sure we are not resolved to our own import
+				ResolverExport selectedExport = (ResolverExport) imported.getSelectedSupplier();
+				if (selectedExport.getExporter() != bundle) {
+					// found resolved import; get the roots from the resolved exporter;
+					// this is all the roots if the package is imported
+					return getPackageRoots(selectedExport.getExporter(), packageName, visited);
+				}
 			}
 		}
 		// check if the bundle exports the package
@@ -159,7 +181,7 @@ public class GroupingChecker {
 			if (supplier.getExport(packageName) != null) {
 				// the required bundle exports the package; get the package roots from it
 				PackageRoots requiredRoots = getPackageRoots(supplier, packageName, visited);
-				if (requiredRoots != null)
+				if (requiredRoots != nullPackageRoots)
 					roots.add(requiredRoots);
 			} else {
 				// the bundle does not export the package; but it may reexport another bundle that does
@@ -171,7 +193,7 @@ public class GroupingChecker {
 					if (reexported.getExport(packageName) != null) {
 						// the reexported bundle exports the package; get the package roots from it
 						PackageRoots reExportedRoots = getPackageRoots(reexported, packageName, visited);
-						if (reexported != null)
+						if (reExportedRoots != nullPackageRoots)
 							roots.add(reExportedRoots);
 					}
 				}
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java
index 46e4afd..ade618a 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/MappedList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,18 +22,17 @@ public class MappedList {
 	protected HashMap internal = new HashMap();
 
 	public void put(Object key, Object value) {
-		Object[] existing = (Object[]) internal.get(key);
+		Object existing = internal.get(key);
 		if (existing == null) {
-			existing = new Object[1]; // be optimistic; start small
-			existing[0] = value;
-			internal.put(key, existing);
+			internal.put(key, value);
 		} else {
+			Object[] existingValues = existing.getClass().isArray() ? (Object[]) existing : new Object[] {existing};
 			// insert the new value
-			int index = insertionIndex(existing, value);
-			Object[] newValues = new Object[existing.length + 1];
-			System.arraycopy(existing, 0, newValues, 0, index);
+			int index = insertionIndex(existingValues, value);
+			Object[] newValues = new Object[existingValues.length + 1];
+			System.arraycopy(existingValues, 0, newValues, 0, index);
 			newValues[index] = value;
-			System.arraycopy(existing, index, newValues, index + 1, existing.length - index);
+			System.arraycopy(existingValues, index, newValues, index + 1, existingValues.length - index);
 			internal.put(key, newValues); // overwrite the old values in the map
 		}
 	}
@@ -56,8 +55,10 @@ public class MappedList {
 
 	// gets all values with the specified and optionally removes them
 	private Object[] get(Object key, boolean remove) {
-		Object[] result = (Object[]) (remove ? internal.remove(key) : internal.get(key));
-		return result == null ? new Object[0] : result;
+		Object result = remove ? internal.remove(key) : internal.get(key);
+		if (result != null && result.getClass().isArray())
+			return (Object[]) result;
+		return result == null ? new Object[0] : new Object[] {result};
 	}
 
 	// returns the number of keyed lists
@@ -72,9 +73,13 @@ public class MappedList {
 		ArrayList results = new ArrayList(getSize());
 		Iterator iter = internal.values().iterator();
 		while (iter.hasNext()) {
-			Object[] values = (Object[]) iter.next();
-			for (int i = 0; i < values.length; i++)
-				results.add(values[i]);
+			Object value = iter.next();
+			if (value.getClass().isArray()) {
+				Object[] values = (Object[]) iter.next();
+				for (int i = 0; i < values.length; i++)
+					results.add(values[i]);
+			} else
+				results.add(value);
 		}
 		return results.toArray();
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
index b692b11..85acb74 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverConstraint.java
@@ -64,10 +64,6 @@ public abstract class ResolverConstraint {
 	// returns whether this constraint is optional
 	abstract boolean isOptional();
 
-	public void setPossibleSuppliers(VersionSupplier[] possibleSuppliers) {
-		this.possibleSuppliers = possibleSuppliers;
-	}
-
 	void addPossibleSupplier(VersionSupplier supplier) {
 		if (supplier == null)
 			return;
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 560b5bf..24b650a 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2004, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -46,7 +46,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 	private static int MAX_MULTIPLE_SUPPLIERS_MERGE = 10;
 	private static int MAX_USES_TIME_BASE = 30000; // 30 seconds
 	private static int MAX_USES_TIME_LIMIT = 90000; // 90 seconds
-	private static final SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
+	static final SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
 
 	private String[][] CURRENT_EES;
 
@@ -72,6 +72,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 	private GroupingChecker groupingChecker;
 	private Comparator selectionPolicy;
 	private boolean developmentMode = false;
+	private boolean usesCalculationTimeout = false;
 	private volatile CompositeResolveHelperRegistry compositeHelpers;
 
 	public ResolverImpl(BundleContext context, boolean checkPermissions) {
@@ -388,6 +389,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 		}
 		// attempt to resolve all unresolved bundles
 		ResolverBundle[] bundles = (ResolverBundle[]) unresolvedBundles.toArray(new ResolverBundle[unresolvedBundles.size()]);
+		usesCalculationTimeout = false;
 		resolveBundles(bundles, platformProperties, rejectedSingletons);
 		if (selectSingletons(bundles, rejectedSingletons)) {
 			// a singleton was unresolved as a result of selecting a different version
@@ -397,7 +399,15 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 		}
 		for (Iterator rejected = rejectedSingletons.iterator(); rejected.hasNext();) {
 			BundleDescription reject = (BundleDescription) rejected.next();
-			BundleDescription sameName = state.getBundle(reject.getSymbolicName(), null);
+			// need to do a bit of work to figure out which bundle got selected
+			BundleDescription[] sameNames = state.getBundles(reject.getSymbolicName());
+			BundleDescription sameName = reject;
+			for (int i = 0; i < sameNames.length; i++) {
+				if (sameNames[i] != reject && sameNames[i].isSingleton() && !rejectedSingletons.contains(sameNames[i])) {
+					sameName = sameNames[i]; // we know this one got selected
+					break;
+				}
+			}
 			state.addResolverError(reject, ResolverError.SINGLETON_SELECTION, sameName.toString(), null);
 		}
 		if (resolveOptional)
@@ -565,7 +575,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 	}
 
 	private void checkUsesConstraints(ResolverBundle[] bundles, Dictionary[] platformProperties, ArrayList rejectedSingletons) {
-		ArrayList conflictingConstraints = findBestCombination(bundles);
+		ArrayList conflictingConstraints = findBestCombination(bundles, platformProperties);
 		if (conflictingConstraints == null)
 			return;
 		Set conflictedBundles = null;
@@ -611,17 +621,21 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 		resolveBundles0((ResolverBundle[]) remainingUnresolved.toArray(new ResolverBundle[remainingUnresolved.size()]), platformProperties, rejectedSingletons);
 	}
 
-	private ArrayList findBestCombination(ResolverBundle[] bundles) {
-		String usesMode = secureAction.getProperty("osgi.resolver.usesMode"); //$NON-NLS-1$
-		if ("ignore".equals(usesMode)) //$NON-NLS-1$
+	private ArrayList findBestCombination(ResolverBundle[] bundles, Dictionary[] platformProperties) {
+		Object usesMode = platformProperties.length == 0 ? null : platformProperties[0].get("osgi.resolver.usesMode"); //$NON-NLS-1$
+		if (usesMode == null)
+			usesMode = secureAction.getProperty("osgi.resolver.usesMode"); //$NON-NLS-1$
+		if ("ignore".equals(usesMode) || developmentMode) //$NON-NLS-1$
 			return null;
 		HashSet bundleConstraints = new HashSet();
 		HashSet packageConstraints = new HashSet();
 		// first try out the initial selections
 		ArrayList initialConflicts = getConflicts(bundles, packageConstraints, bundleConstraints);
-		if (initialConflicts == null || "tryFirst".equals(usesMode)) { //$NON-NLS-1$
+		if (initialConflicts == null || "tryFirst".equals(usesMode) || usesCalculationTimeout) { //$NON-NLS-1$
 			groupingChecker.clear();
-			// the first combination have no conflicts or we only are trying the first combination; return without iterating over all combinations
+			// the first combination have no conflicts or 
+			// we only are trying the first combination or
+			// we have timed out the calculation; return without iterating over all combinations
 			return initialConflicts;
 		}
 		ResolverConstraint[][] multipleSuppliers = getMultipleSuppliers(bundles, packageConstraints, bundleConstraints);
@@ -656,7 +670,13 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 		long timeLimit = Math.min(MAX_USES_TIME_BASE + (bundles.length * 30), MAX_USES_TIME_LIMIT);
 		int bestConflictCount = getConflictCount(bestConflicts);
 		ResolverBundle[] bestConflictBundles = getConflictedBundles(bestConflicts);
-		while (bestConflictCount != 0 && (System.currentTimeMillis() - initialTime) < timeLimit && getNextCombination(multipleSuppliers)) {
+		while (bestConflictCount != 0 && getNextCombination(multipleSuppliers)) {
+			if ((System.currentTimeMillis() - initialTime) > timeLimit) {
+				if (DEBUG_USES)
+					System.out.println("Uses constraint check has timedout.  Using the best solution found so far."); //$NON-NLS-1$
+				usesCalculationTimeout = true;
+				break;
+			}
 			if (DEBUG_USES)
 				printCombination(getCombination(multipleSuppliers, new int[multipleSuppliers.length]));
 			// first count the conflicts for the bundles with conflicts from the best combination
@@ -1558,7 +1578,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 					resolverImports[j].setName(null);
 					if (!found) {
 						// not found or there was a conflict; reset the suppliers and return null
-						resolverImports[j].setPossibleSuppliers(null);
+						resolverImports[j].clearPossibleSuppliers();
 						return null;
 					}
 					// If the import resolved then return it's matching export
@@ -1568,7 +1588,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
 					// If it is a wildcard import then clear the wire, so other
 					// exported packages can be found for it
 					if (importName.endsWith("*")) //$NON-NLS-1$
-						resolverImports[j].setPossibleSuppliers(null);
+						resolverImports[j].clearPossibleSuppliers();
 					return matchingExport;
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java
index ee69379..05f18f3 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,12 @@ package org.eclipse.osgi.internal.module;
 import java.util.*;
 
 public class VersionHashMap extends MappedList implements Comparator {
-	private ResolverImpl resolver;
+	private final ResolverImpl resolver;
+	private final boolean preferSystemPackages;
 
 	public VersionHashMap(ResolverImpl resolver) {
 		this.resolver = resolver;
+		preferSystemPackages = Boolean.valueOf(ResolverImpl.secureAction.getProperty("osgi.resolver.preferSystemPackages", "true")).booleanValue(); //$NON-NLS-1$//$NON-NLS-2$
 	}
 
 	// assumes existing array is sorted
@@ -42,20 +44,28 @@ public class VersionHashMap extends MappedList implements Comparator {
 	}
 
 	private VersionSupplier contains(VersionSupplier vs, boolean remove) {
-		Object[] existing = (Object[]) internal.get(vs.getName());
+		Object existing = internal.get(vs.getName());
 		if (existing == null)
 			return null;
-		for (int i = 0; i < existing.length; i++)
-			if (existing[i] == vs) {
+		if (existing == vs) {
+			if (remove)
+				internal.remove(vs.getName());
+			return vs;
+		}
+		if (!existing.getClass().isArray())
+			return null;
+		Object[] existingValues = (Object[]) existing;
+		for (int i = 0; i < existingValues.length; i++)
+			if (existingValues[i] == vs) {
 				if (remove) {
-					if (existing.length == 1) {
-						internal.remove(vs.getName());
+					if (existingValues.length == 2) {
+						internal.put(vs.getName(), existingValues[i == 0 ? 1 : 0]);
 						return vs;
 					}
-					Object[] newExisting = new Object[existing.length - 1];
-					System.arraycopy(existing, 0, newExisting, 0, i);
-					if (i + 1 < existing.length)
-						System.arraycopy(existing, i + 1, newExisting, i, existing.length - i - 1);
+					Object[] newExisting = new Object[existingValues.length - 1];
+					System.arraycopy(existingValues, 0, newExisting, 0, i);
+					if (i + 1 < existingValues.length)
+						System.arraycopy(existingValues, i + 1, newExisting, i, existingValues.length - i - 1);
 					internal.put(vs.getName(), newExisting);
 				}
 				return vs;
@@ -76,10 +86,10 @@ public class VersionHashMap extends MappedList implements Comparator {
 	// from the resolved bundles are ahead of those from unresolved bundles
 	void reorder() {
 		for (Iterator it = internal.values().iterator(); it.hasNext();) {
-			Object[] existing = (Object[]) it.next();
-			if (existing.length <= 1)
+			Object existing = it.next();
+			if (!existing.getClass().isArray())
 				continue;
-			Arrays.sort(existing, this);
+			Arrays.sort((Object[]) existing, this);
 		}
 	}
 
@@ -96,11 +106,13 @@ public class VersionHashMap extends MappedList implements Comparator {
 		// if the selection policy is set then use that
 		if (resolver.getSelectionPolicy() != null)
 			return resolver.getSelectionPolicy().compare(vs1.getBaseDescription(), vs2.getBaseDescription());
-		String systemBundle = resolver.getSystemBundle();
-		if (systemBundle.equals(vs1.getBundle().getSymbolicName()) && !systemBundle.equals(vs2.getBundle().getSymbolicName()))
-			return -1;
-		else if (!systemBundle.equals(vs1.getBundle().getSymbolicName()) && systemBundle.equals(vs2.getBundle().getSymbolicName()))
-			return 1;
+		if (preferSystemPackages) {
+			String systemBundle = resolver.getSystemBundle();
+			if (systemBundle.equals(vs1.getBundle().getSymbolicName()) && !systemBundle.equals(vs2.getBundle().getSymbolicName()))
+				return -1;
+			else if (!systemBundle.equals(vs1.getBundle().getSymbolicName()) && systemBundle.equals(vs2.getBundle().getSymbolicName()))
+				return 1;
+		}
 		if (vs1.getBundle().isResolved() != vs2.getBundle().isResolved())
 			return vs1.getBundle().isResolved() ? -1 : 1;
 		int versionCompare = -(vs1.getVersion().compareTo(vs2.getVersion()));
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
index bc3c653..26e6d15 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -570,7 +570,7 @@ public final class BundleDescriptionImpl extends BaseDescriptionImpl implements
 				reader.fullyLoad(this);
 				return this.lazyData;
 			} catch (IOException e) {
-				throw new RuntimeException(e.getMessage()); // TODO not sure what to do here!!
+				throw new RuntimeException(e.getMessage(), e); // TODO not sure what to do here!!
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
index 4ad1f68..a4d3d18 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -385,10 +385,10 @@ class StateBuilder {
 					} catch (ClassNotFoundException e) {
 						// oh well cannot support; just use string
 						putValue = value;
-					} catch (Exception e) { // got some reflection exception
-						if (e instanceof RuntimeException)
-							throw (RuntimeException) e;
-						throw new RuntimeException(e.getMessage());
+					} catch (RuntimeException e) { // got some reflection exception
+						throw e;
+					} catch (Exception e) {
+						throw new RuntimeException(e.getMessage(), e);
 					}
 				else if (ATTR_TYPE_VERSION.equals(type))
 					putValue = new Version(value);
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
index b218a3c..e4ee07b 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateHelperImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -322,9 +322,9 @@ public final class StateHelperImpl implements StateHelper {
 		Set pkgSet = new HashSet();
 		Set importList = new HashSet(); // list of package names which are directly imported
 		// get the list of directly imported packages first.
-		ImportPackageSpecification[] imports = bundle.getImportPackages();
-		for (int i = 0; i < imports.length; i++) {
-			ExportPackageDescription pkgSupplier = (ExportPackageDescription) imports[i].getSupplier();
+		ImportsHolder imports = new ImportsHolder(bundle, options);
+		for (int i = 0; i < imports.getSize(); i++) {
+			ExportPackageDescription pkgSupplier = imports.getSupplier(i);
 			if (pkgSupplier == null || pkgSupplier.getExporter() == host) // do not return the bundle'sr own imports
 				continue;
 			if (!isSystemExport(pkgSupplier, options) && !pkgSet.contains(pkgSupplier)) {
@@ -336,20 +336,21 @@ public final class StateHelperImpl implements StateHelper {
 			Set visited = new HashSet();
 			visited.add(bundle); // always add self to prevent recursing into self
 			Set importNames = new HashSet(1);
-			importNames.add(imports[i].getName());
+			importNames.add(imports.getName(i));
 			for (int j = 0; j < requires.length; j++) {
 				BundleDescription bundleSupplier = (BundleDescription) requires[j].getSupplier();
 				if (bundleSupplier != null)
 					getPackages(bundleSupplier, bundle.getSymbolicName(), importList, orderedPkgList, pkgSet, visited, strict, importNames, options);
 			}
-			importList.add(imports[i].getName()); // be sure to add to direct import list
+			importList.add(imports.getName(i)); // be sure to add to direct import list
+
 		}
 		// now find all the packages that are visible from required bundles
-		BundleSpecification[] requires = bundle.getRequiredBundles();
-		Set visited = new HashSet(requires.length);
+		RequiresHolder requires = new RequiresHolder(bundle, options);
+		Set visited = new HashSet(requires.getSize());
 		visited.add(bundle); // always add self to prevent recursing into self
-		for (int i = 0; i < requires.length; i++) {
-			BundleDescription bundleSupplier = (BundleDescription) requires[i].getSupplier();
+		for (int i = 0; i < requires.getSize(); i++) {
+			BundleDescription bundleSupplier = requires.getSupplier(i);
 			if (bundleSupplier != null)
 				getPackages(bundleSupplier, bundle.getSymbolicName(), importList, orderedPkgList, pkgSet, visited, strict, null, options);
 		}
@@ -396,17 +397,17 @@ public final class StateHelperImpl implements StateHelper {
 				}
 			}
 		// now look for exports from the required bundle.
-		BundleSpecification[] requiredBundles = requiredBundle.getRequiredBundles();
-		for (int i = 0; i < requiredBundles.length; i++) {
-			if (requiredBundles[i].getSupplier() == null)
+		RequiresHolder requiredBundles = new RequiresHolder(requiredBundle, options);
+		for (int i = 0; i < requiredBundles.getSize(); i++) {
+			if (requiredBundles.getSupplier(i) == null)
 				continue;
-			if (requiredBundles[i].isExported()) {
+			if (requiredBundles.isExported(i)) {
 				// looking for a specific package and that package is exported by this bundle or adding all packages from a reexported bundle
-				getPackages((BundleDescription) requiredBundles[i].getSupplier(), symbolicName, importList, orderedPkgList, pkgSet, visited, strict, pkgNames, options);
+				getPackages(requiredBundles.getSupplier(i), symbolicName, importList, orderedPkgList, pkgSet, visited, strict, pkgNames, options);
 			} else if (exportNames.size() > 0) {
 				// adding any exports from required bundles which we also export
 				Set tmpVisited = new HashSet();
-				getPackages((BundleDescription) requiredBundles[i].getSupplier(), symbolicName, importList, orderedPkgList, pkgSet, tmpVisited, strict, exportNames, options);
+				getPackages(requiredBundles.getSupplier(i), symbolicName, importList, orderedPkgList, pkgSet, tmpVisited, strict, exportNames, options);
 			}
 		}
 	}
@@ -440,4 +441,133 @@ public final class StateHelperImpl implements StateHelper {
 	public static StateHelper getInstance() {
 		return instance;
 	}
+
+}
+
+/*
+ * This class is used to encapsulate the import packages of a bundle used by getVisiblePackages(). If the method is called with the option 
+ * VISIBLE_INCLUDE_ALL_HOST_WIRES, it uses resolved import packages to find all visible packages by a bundle. Called without this option, 
+ * it uses imported packages instead of resolved imported packages and does not consider resolved dynamic imports. 
+ * ImportsHolder serves to hide which of these is used, so that the body of getVisiblePackages() does not become full of checks.
+ * 
+ */
+class ImportsHolder {
+	private final ImportPackageSpecification[] importedPackages;
+	private final ExportPackageDescription[] resolvedImports;
+	private final boolean isUsingResolved;
+
+	// Depending on the options used, either importedPackages or resolvedImports is initialize, but not both. 
+	ImportsHolder(BundleDescription bundle, int options) {
+		isUsingResolved = (options & StateHelper.VISIBLE_INCLUDE_ALL_HOST_WIRES) != 0;
+		if (isUsingResolved) {
+			importedPackages = null;
+			resolvedImports = bundle.getResolvedImports();
+		} else {
+			importedPackages = bundle.getImportPackages();
+			resolvedImports = null;
+		}
+	}
+
+	ExportPackageDescription getSupplier(int index) {
+		if (isUsingResolved)
+			return resolvedImports[index];
+		return (ExportPackageDescription) importedPackages[index].getSupplier();
+	}
+
+	String getName(int index) {
+		if (isUsingResolved)
+			return resolvedImports[index].getName();
+		return importedPackages[index].getName();
+	}
+
+	int getSize() {
+		if (isUsingResolved)
+			return resolvedImports.length;
+		return importedPackages.length;
+	}
+}
+
+/*
+ * This class is used to encapsulate the required bundles by a bundle, used by getVisiblePackages(). If the method is called with the option 
+ * VISIBLE_INCLUDE_ALL_HOST_WIRES, it uses resolved required bundles to find all visible packages by a bundle. Called without this option, 
+ * it uses required bundles instead of resolved required bundles and does not consider the constraints from fragments. 
+ * RequiresHolder serves to hide which of these is used.  
+ */
+class RequiresHolder {
+	private final BundleSpecification[] requiredBundles;
+	private final BundleDescription[] resolvedRequires;
+	private final boolean isUsingResolved;
+	private final Map resolvedBundlesExported;
+
+	// Depending on the options used, either requiredBundles or resolvedRequires is initialize, but not both.
+	RequiresHolder(BundleDescription bundle, int options) {
+		isUsingResolved = (options & StateHelper.VISIBLE_INCLUDE_ALL_HOST_WIRES) != 0;
+		if (isUsingResolved) {
+			requiredBundles = null;
+			resolvedBundlesExported = new HashMap();
+			resolvedRequires = bundle.getResolvedRequires();
+			determineRequiresVisibility(bundle);
+		} else {
+			requiredBundles = bundle.getRequiredBundles();
+			resolvedBundlesExported = null;
+			resolvedRequires = null;
+		}
+	}
+
+	BundleDescription getSupplier(int index) {
+		if (isUsingResolved)
+			return resolvedRequires[index];
+		return (BundleDescription) requiredBundles[index].getSupplier();
+	}
+
+	boolean isExported(int index) {
+		if (isUsingResolved)
+			return ((Boolean) resolvedBundlesExported.get(resolvedRequires[index])).booleanValue();
+		return requiredBundles[index].isExported();
+	}
+
+	int getSize() {
+		if (isUsingResolved)
+			return resolvedRequires.length;
+		return requiredBundles.length;
+	}
+
+	/*
+	 * This method determines for all resolved required bundles if they are reexported.
+	 * Fragment bundles are also considered.
+	 */
+	private void determineRequiresVisibility(BundleDescription bundle) {
+		BundleSpecification[] required = bundle.getRequiredBundles();
+		HashSet resolved = new HashSet();
+
+		for (int i = 0; i < resolvedRequires.length; i++) {
+			resolved.add(resolvedRequires[i]);
+		}
+
+		// Get the visibility of all directly required bundles
+		for (int i = 0; i < required.length; i++) {
+			if (required[i].getSupplier() != null) {
+				resolvedBundlesExported.put(required[i].getSupplier(), new Boolean(required[i].isExported()));
+				resolved.remove(required[i].getSupplier());
+			}
+		}
+
+		BundleDescription[] fragments = bundle.getFragments();
+
+		// Get the visibility of resolved required bundles, which come from fragments
+		if (resolved.size() > 0) {
+			for (int i = 0; i < fragments.length; i++) {
+				BundleSpecification[] fragmentRequiredBundles = fragments[i].getRequiredBundles();
+				for (int j = 0; j < fragmentRequiredBundles.length; j++) {
+					if (resolved.contains(fragmentRequiredBundles[j].getSupplier())) {
+						resolvedBundlesExported.put(fragmentRequiredBundles[j].getSupplier(), new Boolean(fragmentRequiredBundles[j].isExported()));
+						resolved.remove(fragmentRequiredBundles[j].getSupplier());
+					}
+				}
+				if (resolved.size() == 0) {
+					break;
+				}
+			}
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
index b64c027..327c258 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateImpl.java
@@ -805,9 +805,19 @@ public abstract class StateImpl implements State {
 		return symbolicName != null ? symbolicName : Constants.getInternalSymbolicName();
 	}
 
+	/**
+	 * Returns the latest versions BundleDescriptions which have old removal pending versions.
+	 * @return the BundleDescriptions that have removal pending versions.
+	 */
 	public BundleDescription[] getRemovalPendings() {
 		synchronized (this.monitor) {
-			return (BundleDescription[]) removalPendings.toArray(new BundleDescription[removalPendings.size()]);
+			Iterator removed = removalPendings.iterator();
+			BundleDescription[] result = new BundleDescription[removalPendings.size()];
+			int i = 0;
+			while (removed.hasNext())
+				// we return the latest version of the description if it is still contained in the state (bug 287636)
+				result[i++] = getBundle(((BundleDescription) removed.next()).getBundleId());
+			return result;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
index 2774976..c279938 100644
--- a/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/eclipse/plugins/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,11 +12,11 @@
 package org.eclipse.osgi.internal.resolver;
 
 import java.io.*;
-import java.lang.ref.WeakReference;
 import java.lang.reflect.Constructor;
 import java.security.AccessController;
 import java.util.*;
 import java.util.Map.Entry;
+import org.eclipse.osgi.framework.util.ObjectPool;
 import org.eclipse.osgi.framework.util.SecureAction;
 import org.eclipse.osgi.service.resolver.*;
 import org.osgi.framework.InvalidSyntaxException;
@@ -40,8 +40,6 @@ final class StateReader {
 	// cached state.
 	final Map objectTable = Collections.synchronizedMap(new HashMap());
 
-	private final Map stringCache = Collections.synchronizedMap(new WeakHashMap());
-
 	private volatile File stateFile;
 	private volatile File lazyFile;
 
@@ -420,10 +418,10 @@ final class StateReader {
 					value = constructor.newInstance(new Object[] {value});
 				} catch (ClassNotFoundException e) {
 					// oh well cannot support; just use the string
-				} catch (Exception e) { // got some reflection exception
-					if (e instanceof RuntimeException)
-						throw (RuntimeException) e;
-					throw new RuntimeException(e.getMessage());
+				} catch (RuntimeException e) { // got some reflection exception
+					throw e;
+				} catch (Exception e) {
+					throw new RuntimeException(e.getMessage(), e);
 				}
 			}
 			result.put(key, value);
@@ -583,7 +581,8 @@ final class StateReader {
 		int minorComponent = in.readInt();
 		int serviceComponent = in.readInt();
 		String qualifierComponent = readString(in, false);
-		Version result = new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent);
+		Version result = (Version) ObjectPool.intern(new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent));
+		//Version result = new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent);
 		return result;
 	}
 
@@ -618,19 +617,9 @@ final class StateReader {
 		byte type = in.readByte();
 		if (type == NULL)
 			return null;
-		String result;
 		if (intern)
-			result = in.readUTF().intern();
-		else
-			result = in.readUTF();
-		WeakReference ref = (WeakReference) stringCache.get(result);
-		if (ref != null) {
-			String refString = (String) ref.get();
-			if (refString != null)
-				result = refString;
-		} else
-			stringCache.put(result, new WeakReference(result));
-		return result;
+			return in.readUTF().intern();
+		return (String) ObjectPool.intern(in.readUTF());
 	}
 
 	private byte readTag(DataInputStream in) throws IOException {
@@ -663,7 +652,7 @@ final class StateReader {
 			for (int i = 0; i < numBundles; i++)
 				readBundleDescriptionLazyData(in, 0);
 		} catch (IOException ioe) {
-			throw new RuntimeException(); // TODO need error message here
+			throw new RuntimeException(ioe.getMessage(), ioe); // TODO need error message here
 		} finally {
 			if (in != null)
 				try {
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
index 96cd4f6..83fdd36 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/service/security/KeyStoreTrustEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,13 +79,22 @@ public class KeyStoreTrustEngine extends TrustEngine {
 
 	/**
 	 * Return the KeyStore managed
-	 * @return keystore - the KeyStore instance, initialized and loaded
+	 * @return The KeyStore instance, initialized and loaded
 	 * @throws KeyStoreException
 	 */
 	private synchronized KeyStore getKeyStore() throws IOException, GeneralSecurityException {
 		if (null == keyStore) {
 			keyStore = KeyStore.getInstance(getType());
-			loadStore(keyStore, getInputStream());
+			final InputStream in = getInputStream();
+			try {
+				loadStore(keyStore, in);
+			} finally {
+				try {
+					in.close();
+				} catch (IOException e) {
+					//ignore secondary failure
+				}
+			}
 		}
 
 		if (keyStore == null)
@@ -137,7 +146,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				}
 			}
 		} catch (KeyStoreException e) {
-			throw new IOException(e.getMessage());
+			throw (IOException) new IOException(e.getMessage()).initCause(e);
 		} catch (GeneralSecurityException e) {
 			SignedBundleHook.log(e.getMessage(), FrameworkLogEntry.WARNING, e);
 			return null;
@@ -174,10 +183,15 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				if (null != oldCert)
 					throw new CertificateException(SignedContentMessages.Default_Trust_Existing_Alias);
 				store.setCertificateEntry(alias, cert);
-				saveStore(store, getOutputStream());
+				final OutputStream out = getOutputStream();
+				try {
+					saveStore(store, out);
+				} finally {
+					safeClose(out);
+				}
 			}
 		} catch (KeyStoreException ke) {
-			throw new CertificateException(ke.getMessage());
+			throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke);
 		}
 		return alias;
 	}
@@ -198,7 +212,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				removeTrustAnchor(alias);
 			}
 		} catch (KeyStoreException ke) {
-			throw new CertificateException(ke.getMessage());
+			throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke);
 		}
 	}
 
@@ -214,10 +228,15 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				if (oldCert == null)
 					throw new CertificateException(SignedContentMessages.Default_Trust_Cert_Not_Found);
 				store.deleteEntry(alias);
-				saveStore(store, getOutputStream());
+				final OutputStream out = getOutputStream();
+				try {
+					saveStore(store, out);
+				} finally {
+					safeClose(out);
+				}
 			}
 		} catch (KeyStoreException ke) {
-			throw new CertificateException(ke.getMessage());
+			throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke);
 		}
 	}
 
@@ -233,7 +252,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				return store.getCertificate(alias);
 			}
 		} catch (KeyStoreException ke) {
-			throw new CertificateException(ke.getMessage());
+			throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke);
 		}
 	}
 
@@ -251,7 +270,7 @@ public class KeyStoreTrustEngine extends TrustEngine {
 				}
 			}
 		} catch (KeyStoreException ke) {
-			throw new CertificateException(ke.getMessage());
+			throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke);
 		}
 		return (String[]) returnList.toArray(new String[] {});
 	}
@@ -271,6 +290,20 @@ public class KeyStoreTrustEngine extends TrustEngine {
 	}
 
 	/**
+	 * Closes a stream and ignores any resulting exception. This is useful
+	 * when doing stream cleanup in a finally block where secondary exceptions
+	 * are not worth logging.
+	 */
+	private void safeClose(OutputStream out) {
+		try {
+			if (out != null)
+				out.close();
+		} catch (IOException e) {
+			//ignore
+		}
+	}
+
+	/**
 	 * Get an input stream for the KeyStore managed
 	 * @return inputstream - the stream
 	 * @throws KeyStoreException
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/LegacyVerifierFactory.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/LegacyVerifierFactory.java
index 4718a81..bbd7ac9 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/LegacyVerifierFactory.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/LegacyVerifierFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -54,9 +54,9 @@ public class LegacyVerifierFactory implements CertificateVerifierFactory {
 				try {
 					entries[i].verify();
 				} catch (InvalidContentException e) {
-					throw new SecurityException(e.getMessage());
+					throw (SecurityException) new SecurityException(e.getMessage()).initCause(e);
 				} catch (IOException e) {
-					throw new SecurityException(e.getMessage());
+					throw (SecurityException) new SecurityException(e.getMessage()).initCause(e);
 				}
 			}
 			SignerInfo[] infos = signedContent.getSignerInfos();
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
index 5591b07..c42e675 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/PKCS7Processor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -201,7 +201,7 @@ public class PKCS7Processor implements SignedContentConstants {
 				dateFormt.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
 				signingTime = dateFormt.parse(dateString);
 			} catch (ParseException e) {
-				throw new SignatureException(SignedContentMessages.PKCS7_Parse_Signing_Time);
+				throw (SignatureException) new SignatureException(SignedContentMessages.PKCS7_Parse_Signing_Time).initCause(e);
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
index 993d9b8..5b90453 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedBundleHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@ import org.eclipse.osgi.service.security.TrustEngine;
 import org.eclipse.osgi.signedcontent.SignedContent;
 import org.eclipse.osgi.signedcontent.SignedContentFactory;
 import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.osgi.util.NLS;
 import org.osgi.framework.*;
 import org.osgi.framework.Constants;
 import org.osgi.util.tracker.ServiceTracker;
@@ -242,7 +243,19 @@ public class SignedBundleHook implements AdaptorHook, BundleFileWrapperFactoryHo
 		else
 			contentBundleFile = new ZipBundleFile(content, null);
 		SignedBundleFile result = new SignedBundleFile(null, VERIFY_ALL);
-		result.setBundleFile(contentBundleFile);
+		try {
+			result.setBundleFile(contentBundleFile);
+		} catch (InvalidKeyException e) {
+			throw (InvalidKeyException) new InvalidKeyException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
+		} catch (SignatureException e) {
+			throw (SignatureException) new SignatureException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
+		} catch (CertificateException e) {
+			throw (CertificateException) new CertificateException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
+		} catch (NoSuchAlgorithmException e) {
+			throw (NoSuchAlgorithmException) new NoSuchAlgorithmException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
+		} catch (NoSuchProviderException e) {
+			throw (NoSuchProviderException) new NoSuchProviderException(NLS.bind(SignedContentMessages.Factory_SignedContent_Error, content)).initCause(e);
+		}
 		return new SignedContentFile(result.getSignedContent());
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.java
index 6fdccd9..28cab18 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,8 @@ public class SignedContentMessages extends NLS {
 	// Security Exceptions
 	public static String Algorithm_Not_Supported;
 
+	public static String Factory_SignedContent_Error;
+
 	public static String Default_Trust_Keystore_Load_Failed;
 	public static String Default_Trust_Read_Only;
 	public static String Default_Trust_Cert_Not_Found;
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.properties b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.properties
index d0d9d98..47dace8 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.properties
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedContentMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2008 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -26,6 +26,9 @@ PKCS7_Parse_Signing_Time = The time stamp in the pkcs7 file cannot be parsed pro
 # Security Exceptions
 Algorithm_Not_Supported = {0} digest algorithm is not supported!
 
+# SignedContentFactory exception
+Factory_SignedContent_Error = An error occurred while processing the signatures for the file: {0}
+
 # Default Trust Engine
 Default_Trust_Keystore_Load_Failed = Failed to load the keystore from: {0}
 Default_Trust_Read_Only=This trust engine is read only.
diff --git a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
index ab7f8d9..e544e79 100644
--- a/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
+++ b/eclipse/plugins/org.eclipse.osgi/security/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2006, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -152,7 +152,7 @@ public class SignedStorageHook implements StorageHook {
 				try {
 					certBytes = certs[i].getEncoded();
 				} catch (CertificateEncodingException e) {
-					throw new IOException(e.getMessage());
+					throw (IOException) new IOException(e.getMessage()).initCause(e);
 				}
 				os.writeInt(certBytes.length);
 				os.write(certBytes);
@@ -175,7 +175,7 @@ public class SignedStorageHook implements StorageHook {
 			try {
 				certs[i] = PKCS7Processor.certFact.generateCertificate(new ByteArrayInputStream(certBytes));
 			} catch (CertificateException e) {
-				throw new IOException(e.getMessage());
+				throw (IOException) new IOException(e.getMessage()).initCause(e);
 			}
 		}
 		int anchorIdx = is.readInt();
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/.project b/eclipse/plugins/org.eclipse.osgi/supplement/.project
index 7b841ae..64f3ba8 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/.project
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
 	</natures>
 </projectDescription>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
index b7b924d..0a72e47 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.equinox.supplement
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.3.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: org.eclipse.osgi.framework.log;version="1.0",
- org.eclipse.osgi.service.datalocation;version="1.2",
- org.eclipse.osgi.service.debug;version="1.0",
- org.eclipse.osgi.service.environment;version="1.2",
- org.eclipse.osgi.service.localization;version="1.0",
+ org.eclipse.osgi.service.datalocation;version="1.3",
+ org.eclipse.osgi.service.debug;version="1.1",
+ org.eclipse.osgi.service.environment;version="1.3",
+ org.eclipse.osgi.service.localization;version="1.1",
  org.eclipse.osgi.service.runnable;version="1.1",
  org.eclipse.osgi.service.urlconversion;version="1.0",
  org.eclipse.osgi.storagemanager;version="1.0",
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
index 7dba75f..d73ef47 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,7 @@ public class BasicLocation implements Location {
 	private Location parent;
 	final private URL defaultValue;
 	final private String property;
+	final private String dataAreaPrefix;
 
 	// locking related fields
 	private File lockFile;
@@ -84,11 +85,12 @@ public class BasicLocation implements Location {
 
 	}
 
-	public BasicLocation(String property, URL defaultValue, boolean isReadOnly) {
+	public BasicLocation(String property, URL defaultValue, boolean isReadOnly, String dataAreaPrefix) {
 		super();
 		this.property = property;
 		this.defaultValue = defaultValue;
 		this.isReadOnly = isReadOnly;
+		this.dataAreaPrefix = dataAreaPrefix == null ? "" : dataAreaPrefix; //$NON-NLS-1$
 	}
 
 	public boolean allowsDefault() {
@@ -238,8 +240,21 @@ public class BasicLocation implements Location {
 	}
 
 	public Location createLocation(Location parentLocation, URL defaultLocation, boolean readonly) {
-		BasicLocation result = new BasicLocation(null, defaultLocation, readonly);
+		BasicLocation result = new BasicLocation(null, defaultLocation, readonly, dataAreaPrefix);
 		result.setParent(parentLocation);
 		return result;
 	}
+
+	public URL getDataArea(String filename) throws IOException {
+		URL base = getURL();
+		if (base == null)
+			throw new IOException(EclipseAdaptorMsg.location_notSet);
+		String prefix = base.toExternalForm();
+		if (prefix.length() > 0 && prefix.charAt(prefix.length() - 1) != '/')
+			prefix += '/';
+		filename = filename.replace('\\', '/');
+		if (filename.length() > 0 && filename.charAt(0) == '/')
+			filename.substring(1);
+		return new URL(prefix + dataAreaPrefix + filename);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
index 50577ee..ecb3dba 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMessages.properties
@@ -65,6 +65,8 @@ ECLIPSE_CONSOLE_DISABLED_BUNDLE_REASON2=\t\t{0} (policy={1})
 ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE=Missing optionally required bundle {0}.
 ECLIPSE_MISSING_REQUIRED_BUNDLE=Missing required bundle {0}.
 ECLIPSE_MISSING_IMPORTED_PACKAGE=Missing imported package {0}.
+ECLIPSE_MISSING_OPTIONAL_IMPORTED_PACKAGE=Missing optionally imported package {0}.
+ECLIPSE_MISSING_DYNAMIC_IMPORTED_PACKAGE=Missing dynamically imported package {0}.
 ECLIPSE_MISSING_HOST=Missing host {0}.
 
 #Conversion messages
@@ -106,7 +108,7 @@ fileManager_illegalInReadOnlyMode = Cannot perform operation while in read-only
 fileManager_notOpen = Manager is not opened.
 
 #Location messages
-location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing {2} as a VM argument.
+location_cannotLockNIO = An error occurred while locking file \"{0}\": \"{1}\". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking by passing {2} as a VM argument.
 location_cannotLock = An error occurred while locking file \"{0}\".
 location_folderReadOnly = The folder \"{0}\" is read-only.
 location_notSet = The location has not been set.
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
index c741274..a89a25a 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg.java
@@ -16,6 +16,8 @@ public class EclipseAdaptorMsg extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMessages"; //$NON-NLS-1$
 
 	public static String ECLIPSE_MISSING_IMPORTED_PACKAGE;
+	public static String ECLIPSE_MISSING_OPTIONAL_IMPORTED_PACKAGE;
+	public static String ECLIPSE_MISSING_DYNAMIC_IMPORTED_PACKAGE;
 	public static String ECLIPSE_MISSING_OPTIONAL_REQUIRED_BUNDLE;
 	public static String ECLIPSE_MISSING_REQUIRED_BUNDLE;
 	public static String ECLIPSE_MISSING_HOST;
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
index e069c68..3009b12 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/Locker_JavaNio.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,8 @@
 package org.eclipse.core.runtime.internal.adaptor;
 
 import java.io.*;
-import java.nio.channels.*;
+import java.nio.channels.FileLock;
+import java.nio.channels.OverlappingFileLockException;
 import org.eclipse.osgi.util.NLS;
 
 /**
@@ -85,7 +86,15 @@ public class Locker_JavaNio implements Locker {
 				 * fix for bug http://bugs.sun.com/view_bug.do?bug_id=6628575 and
 				 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=44735#c17
 				 */
-				tempLock = temp.getChannel().tryLock(0, 1, false);
+				try {
+					tempLock = temp.getChannel().tryLock(0, 1, false);
+				} catch (IOException ioe) {
+					if (BasicLocation.DEBUG)
+						System.out.println(NLS.bind(EclipseAdaptorMsg.location_cannotLock, lockFile));
+					// produce a more specific message for clients
+					String specificMessage = NLS.bind(EclipseAdaptorMsg.location_cannotLockNIO, new Object[] {lockFile, ioe.getMessage(), "\"-D" + BasicLocation.PROP_OSGI_LOCKING + "=none\""}); //$NON-NLS-1$ //$NON-NLS-2$
+					throw new IOException(specificMessage);
+				}
 				if (tempLock != null) {
 					tempLock.release(); // allow IOException to propagate because that would mean it is still locked
 					return false;
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
index 8a93649..b1f89c9 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/EclipseDebugTrace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,90 +12,90 @@ package org.eclipse.osgi.framework.debug;
 
 import java.io.*;
 import java.security.AccessController;
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import org.eclipse.osgi.framework.util.SecureAction;
-import org.eclipse.osgi.service.debug.DebugOptions;
 import org.eclipse.osgi.service.debug.DebugTrace;
 
 /**
  * The DebugTrace implementation for Eclipse.
- * <p>
- * Clients may extend this class.
- * </p>
- * @since 3.5
  */
-public class EclipseDebugTrace implements DebugTrace {
+class EclipseDebugTrace implements DebugTrace {
 
 	/** The system property used to specify size a trace file can grow before it is rotated */
-	public static final String PROP_TRACE_SIZE_MAX = "eclipse.trace.size.max"; //$NON-NLS-1$
+	private static final String PROP_TRACE_SIZE_MAX = "eclipse.trace.size.max"; //$NON-NLS-1$
 	/** The system property used to specify the maximum number of backup trace files to use */
-	public static final String PROP_TRACE_FILE_MAX = "eclipse.trace.backup.max"; //$NON-NLS-1$
+	private static final String PROP_TRACE_FILE_MAX = "eclipse.trace.backup.max"; //$NON-NLS-1$
 	/** The trace message for a thread stack dump */
-	protected final static String MESSAGE_THREAD_DUMP = "Thread Stack dump: "; //$NON-NLS-1$
+	private final static String MESSAGE_THREAD_DUMP = "Thread Stack dump: "; //$NON-NLS-1$
 	/** The trace message for a method completing with a return value */
-	protected final static String MESSAGE_EXIT_METHOD_WITH_RESULTS = "Exiting method with result: "; //$NON-NLS-1$
+	private final static String MESSAGE_EXIT_METHOD_WITH_RESULTS = "Exiting method {0}with result: "; //$NON-NLS-1$
 	/** The trace message for a method completing with no return value */
-	protected final static String MESSAGE_EXIT_METHOD_NO_RESULTS = "Exiting method with a void return"; //$NON-NLS-1$
+	private final static String MESSAGE_EXIT_METHOD_NO_RESULTS = "Exiting method {0}with a void return"; //$NON-NLS-1$
 	/** The trace message for a method starting with a set of arguments */
-	protected final static String MESSAGE_ENTER_METHOD_WITH_PARAMS = "Entering method with parameters: ("; //$NON-NLS-1$
+	private final static String MESSAGE_ENTER_METHOD_WITH_PARAMS = "Entering method {0}with parameters: ("; //$NON-NLS-1$
 	/** The trace message for a method starting with no arguments */
-	protected final static String MESSAGE_ENTER_METHOD_NO_PARAMS = "Entering method with no parameters"; //$NON-NLS-1$
-	/** The version attribute written to the header of the trace file */
-	protected final static String TRACE_FILE_VERSION_COMMENT = "version: "; //$NON-NLS-1$
-	/** The version value written to the header of the trace file */
-	protected final static String TRACE_FILE_VERSION = "1.0"; //$NON-NLS-1$
+	private final static String MESSAGE_ENTER_METHOD_NO_PARAMS = "Entering method {0}with no parameters"; //$NON-NLS-1$
+	/** The version attribute written in the header of a new session */
+	private final static String TRACE_FILE_VERSION_COMMENT = "version: "; //$NON-NLS-1$
+	/** The verbose attribute written in the header of a new session */
+	private final static String TRACE_FILE_VERBOSE_COMMENT = "verbose: "; //$NON-NLS-1$
+	/** The version value written in the header of a new session */
+	private final static String TRACE_FILE_VERSION = "1.1"; //$NON-NLS-1$
 	/** The new session identifier to be written whenever a new session starts */
-	protected final static String TRACE_NEW_SESSION = "!SESSION "; //$NON-NLS-1$
+	private final static String TRACE_NEW_SESSION = "!SESSION "; //$NON-NLS-1$
 	/** The date attribute written to the header of the trace file to show when this file was created */
-	protected final static String TRACE_FILE_DATE = "Time of creation: "; //$NON-NLS-1$
+	private final static String TRACE_FILE_DATE = "Time of creation: "; //$NON-NLS-1$
 	/** Trace date formatter using the pattern: yyyy-MM-dd HH:mm:ss.SSS  */
-	protected final static SimpleDateFormat TRACE_FILE_DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
+	private final static SimpleDateFormat TRACE_FILE_DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$
 	/** The comment character used by the trace file */
-	protected final static String TRACE_COMMENT = "#"; //$NON-NLS-1$
+	private final static String TRACE_COMMENT = "#"; //$NON-NLS-1$
 	/** The delimiter used to separate trace elements such as the time stamp, message, etc */
-	protected final static String TRACE_ELEMENT_DELIMITER = "|"; //$NON-NLS-1$
+	private final static String TRACE_ELEMENT_DELIMITER = "|"; //$NON-NLS-1$
+	/** The string written in place of the {@link EclipseDebugTrace#TRACE_TRACE_ELEMENT_DELIMITER} in entries */
+	private final static String TRACE_ELEMENT_DELIMITER_ENCODED = "|"; //$NON-NLS-1$
 	/** OS-specific line separator */
-	protected static final String LINE_SEPARATOR;
+	private static final String LINE_SEPARATOR;
 	static {
 		String s = System.getProperty("line.separator"); //$NON-NLS-1$
 		LINE_SEPARATOR = s == null ? "\n" : s; //$NON-NLS-1$
 	}
 	/** The value written to the trace file if a null object is being traced */
-	public final static String NULL_VALUE = "<null>"; //$NON-NLS-1$
+	private final static String NULL_VALUE = "<null>"; //$NON-NLS-1$
 	/**  */
 	private final static SecureAction secureAction = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
 	/** A lock object used to synchronize access to the trace file */
-	protected final static Object writeLock = new Object();
+	private final static Object writeLock = new Object();
 
 	/******************* Tracing file attributes **************************/
 	/** The default size a trace file can grow before it is rotated */
-	public static final int DEFAULT_TRACE_FILE_SIZE = 1000; // The value is in KB.
+	private static final int DEFAULT_TRACE_FILE_SIZE = 1000; // The value is in KB.
 	/** The default number of backup trace files */
-	public static final int DEFAULT_TRACE_FILES = 10;
+	private static final int DEFAULT_TRACE_FILES = 10;
 	/** The minimum size limit for trace file rotation */
-	public static final int DEFAULT_TRACE_FILE_MIN_SIZE = 10;
+	private static final int DEFAULT_TRACE_FILE_MIN_SIZE = 10;
 	/** The extension used for log files */
-	public static final String TRACE_FILE_EXTENSION = ".trace"; //$NON-NLS-1$
+	private static final String TRACE_FILE_EXTENSION = ".trace"; //$NON-NLS-1$
 	/** The extension markup to use for backup log files*/
-	public static final String BACKUP_MARK = ".bak_"; //$NON-NLS-1$
+	private static final String BACKUP_MARK = ".bak_"; //$NON-NLS-1$
 	/** The maximum size that a trace file should grow (0 = unlimited) */
-	protected int maxTraceFileSize = DEFAULT_TRACE_FILE_SIZE; // The value is in KB.
+	private int maxTraceFileSize = DEFAULT_TRACE_FILE_SIZE; // The value is in KB.
 	/** The maximum number of trace files that should be saved */
-	protected int maxTraceFiles = DEFAULT_TRACE_FILES;
+	private int maxTraceFiles = DEFAULT_TRACE_FILES;
 	/** The index of the currently backed-up trace file */
-	protected int backupTraceFileIndex = 0;
+	private int backupTraceFileIndex = 0;
 
 	/** An optional argument to specify the name of the class used by clients to trace messages.  If no trace class is specified
 	 * then the class calling this API is assumed to be the class being traced.
 	*/
-	protected Class traceClass = null;
+	private String traceClass = null;
 	/** The symbolic name of the bundle being traced */
-	protected String bundleSymbolicName = null;
+	private String bundleSymbolicName = null;
 	/** A flag to determine if the message being written is done to a new file (i.e. should the header information be written) */
-	protected static boolean newSession = true;
+	static boolean newSession = true;
 	/** DebugOptions are used to determine if the specified bundle symbolic name + option-path has debugging enabled */
-	protected DebugOptions debugOptions = null;
+	private FrameworkDebugOptions debugOptions = null;
 
 	/**
 	 * Construct a new EclipseDebugTrace for the specified bundle symbolic name and write messages to the specified
@@ -104,7 +104,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param bundleSymbolicName The symbolic name of the bundle being traced
 	 * @param debugOptions Used to determine if the specified bundle symbolic name + option-path has tracing enabled
 	 */
-	public EclipseDebugTrace(final String bundleSymbolicName, final DebugOptions debugOptions) {
+	EclipseDebugTrace(final String bundleSymbolicName, final FrameworkDebugOptions debugOptions) {
 
 		this(bundleSymbolicName, debugOptions, null);
 	}
@@ -117,9 +117,9 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param debugOptions Used to determine if the specified bundle symbolic name + option-path has tracing enabled
 	 * @param traceClass The class that the client is using to perform trace API calls
 	 */
-	public EclipseDebugTrace(final String bundleSymbolicName, final DebugOptions debugOptions, final Class traceClass) {
+	EclipseDebugTrace(final String bundleSymbolicName, final FrameworkDebugOptions debugOptions, final Class traceClass) {
 
-		this.traceClass = traceClass;
+		this.traceClass = traceClass != null ? traceClass.getName() : null;
 		this.debugOptions = debugOptions;
 		this.bundleSymbolicName = bundleSymbolicName;
 		readLogProperties();
@@ -131,7 +131,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param optionPath The <i>option-path</i>
 	 * @return Returns true if debugging is enabled for the specified option-path on this bundle; Otherwise false.
 	 */
-	protected final boolean isDebuggingEnabled(final String optionPath) {
+	private final boolean isDebuggingEnabled(final String optionPath) {
 		if (optionPath == null)
 			return true;
 		boolean debugEnabled = false;
@@ -173,7 +173,8 @@ public class EclipseDebugTrace implements DebugTrace {
 	public void traceEntry(final String optionPath) {
 
 		if (isDebuggingEnabled(optionPath)) {
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, EclipseDebugTrace.MESSAGE_ENTER_METHOD_NO_PARAMS, traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, EclipseDebugTrace.MESSAGE_ENTER_METHOD_NO_PARAMS);
 			writeRecord(record);
 		}
 	}
@@ -205,12 +206,15 @@ public class EclipseDebugTrace implements DebugTrace {
 					} else {
 						messageBuffer.append(EclipseDebugTrace.NULL_VALUE);
 					}
-					messageBuffer.append(" "); //$NON-NLS-1$
 					i++;
+					if (i < methodArguments.length) {
+						messageBuffer.append(" "); //$NON-NLS-1$
+					}
 				}
 				messageBuffer.append(")"); //$NON-NLS-1$
 			}
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, messageBuffer.toString(), traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, messageBuffer.toString());
 			writeRecord(record);
 		}
 	}
@@ -222,7 +226,8 @@ public class EclipseDebugTrace implements DebugTrace {
 	public void traceExit(final String optionPath) {
 
 		if (isDebuggingEnabled(optionPath)) {
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, EclipseDebugTrace.MESSAGE_EXIT_METHOD_NO_RESULTS, traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, EclipseDebugTrace.MESSAGE_EXIT_METHOD_NO_RESULTS);
 			writeRecord(record);
 		}
 	}
@@ -240,7 +245,8 @@ public class EclipseDebugTrace implements DebugTrace {
 			} else {
 				messageBuffer.append(result.toString());
 			}
-			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, messageBuffer.toString(), traceClass);
+			final FrameworkDebugTraceEntry record = new FrameworkDebugTraceEntry(bundleSymbolicName, optionPath, null, traceClass);
+			setMessage(record, messageBuffer.toString());
 			writeRecord(record);
 		}
 	}
@@ -273,13 +279,36 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
+	 * Set the trace message for the specified record to include class and method information
+	 * if verbose debugging is disabled.
+	 *  
+	 * @param record The {@link FrameworkDebugTraceEntry} containing the information to persist to the trace file.
+	 * @param originalMessage The original tracing message
+	 */
+	private final void setMessage(final FrameworkDebugTraceEntry record, final String originalMessage) {
+
+		String argument = null;
+		if (!debugOptions.isVerbose()) {
+			final StringBuffer classMethodName = new StringBuffer(record.getClassName());
+			classMethodName.append("#"); //$NON-NLS-1$
+			classMethodName.append(record.getMethodName());
+			classMethodName.append(" "); //$NON-NLS-1$
+			argument = classMethodName.toString();
+		} else {
+			argument = ""; //$NON-NLS-1$
+		}
+		String newMessage = MessageFormat.format(originalMessage, new Object[] {argument});
+		record.setMessage(newMessage);
+	}
+
+	/**
 	 * Utility method to convert an array of StackTraceElement objects to form a String representation of a stack dump
 	 * 
 	 * @param elements
 	 *            The array of StackTraceElement objects
 	 * @return A String of the stack dump produced by the list of elements
 	 */
-	protected final String convertStackTraceElementsToString(final StackTraceElement[] elements) {
+	private final String convertStackTraceElementsToString(final StackTraceElement[] elements) {
 
 		final StringBuffer buffer = new StringBuffer();
 		if (elements != null) {
@@ -303,7 +332,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * 
 	 * @param entry The FrameworkTraceEntry to write to the log file.
 	 */
-	protected void writeRecord(final FrameworkDebugTraceEntry entry) {
+	private void writeRecord(final FrameworkDebugTraceEntry entry) {
 
 		if (entry != null) {
 			synchronized (EclipseDebugTrace.writeLock) {
@@ -311,11 +340,11 @@ public class EclipseDebugTrace implements DebugTrace {
 				Writer traceWriter = null;
 				try {
 					// check to see if the file should be rotated
-					checkTraceFileSize(tracingFile);
+					checkTraceFileSize(tracingFile, entry.getTimestamp());
 					// open the trace file
 					traceWriter = openWriter(tracingFile);
 					if (EclipseDebugTrace.newSession) {
-						writeSession(traceWriter);
+						writeSession(traceWriter, entry.getTimestamp());
 						EclipseDebugTrace.newSession = false;
 					}
 					writeMessage(traceWriter, entry);
@@ -338,7 +367,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	/**
 	 * Reads the PROP_TRACE_SIZE_MAX and PROP_TRACE_FILE_MAX properties.
 	 */
-	protected void readLogProperties() {
+	private void readLogProperties() {
 
 		String newMaxTraceFileSize = secureAction.getProperty(PROP_TRACE_SIZE_MAX);
 		if (newMaxTraceFileSize != null) {
@@ -364,9 +393,10 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * Checks the trace file size.  If the file size reaches the limit then the trace file is rotated. 
 	 * 
 	 * @param traceFile The tracing file
+	 * @param timestamp the timestamp for the session; this is the same timestamp as the first entry
 	 * @return false if an error occurred trying to rotate the trace file
 	 */
-	protected boolean checkTraceFileSize(final File traceFile) {
+	private boolean checkTraceFileSize(final File traceFile, long timestamp) {
 
 		// 0 file size means there is no size limit
 		boolean isBackupOK = true;
@@ -410,7 +440,9 @@ public class EclipseDebugTrace implements DebugTrace {
 					try {
 						traceWriter = openWriter(traceFile);
 						writeComment(traceWriter, "This is a continuation of trace file " + backupFile.getAbsolutePath()); //$NON-NLS-1$
-						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_DATE + EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(System.currentTimeMillis())));
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERSION_COMMENT + EclipseDebugTrace.TRACE_FILE_VERSION);
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERBOSE_COMMENT + debugOptions.isVerbose());
+						writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_DATE + getFormattedDate(timestamp));
 						traceWriter.flush();
 					} catch (IOException ioEx) {
 						ioEx.printStackTrace();
@@ -433,7 +465,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param comment the comment to be written to the trace file
 	 * @throws IOException If an error occurs while writing the comment
 	 */
-	protected void writeComment(final Writer traceWriter, final String comment) throws IOException {
+	private void writeComment(final Writer traceWriter, final String comment) throws IOException {
 
 		StringBuffer commentText = new StringBuffer(EclipseDebugTrace.TRACE_COMMENT);
 		commentText.append(" "); //$NON-NLS-1$
@@ -443,35 +475,53 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
-	 * Accessor to retrieve the current date and time in a formatted manner.
+	 * Accessor to retrieve the time stamp in a formatted manner.
 	 * 
 	 * @return A formatted time stamp based on the {@link EclipseDebugTrace#TRACE_FILE_DATE_FORMATTER} formatter
 	 */
-	protected final String getFormattedDate() {
+	private final String getFormattedDate(long timestamp) {
 
-		return this.getFormattedDate(System.currentTimeMillis());
+		return EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(timestamp));
 	}
 
 	/**
-	 * Accessor to retrieve the time stamp in a formatted manner.
+	 * Accessor to retrieve the text of a {@link Throwable} in a formatted manner so that it can be written to the
+	 * trace file. 
 	 * 
-	 * @return A formatted time stamp based on the {@link EclipseDebugTrace#TRACE_FILE_DATE_FORMATTER} formatter
+	 * @param error The {@lnk Throwable} to format
+	 * @return The complete text of a {@link Throwable} as a {@link String} or null if the input error is null.
 	 */
-	protected final String getFormattedDate(long timestamp) {
+	private final String getFormattedThrowable(Throwable error) {
 
-		return EclipseDebugTrace.TRACE_FILE_DATE_FORMATTER.format(new Date(timestamp));
+		String result = null;
+		if (error != null) {
+			PrintStream throwableStream = null;
+			try {
+				ByteArrayOutputStream throwableByteOutputStream = new ByteArrayOutputStream();
+				throwableStream = new PrintStream(throwableByteOutputStream, false);
+				error.printStackTrace(throwableStream);
+				result = encodeText(throwableByteOutputStream.toString());
+			} finally {
+				if (throwableStream != null) {
+					throwableStream.close();
+				}
+			}
+		}
+		return result;
 	}
 
 	/**
 	 * Writes header information to a new trace file
 	 * 
 	 * @param traceWriter the trace writer
+	 * @param timestamp the timestamp for the session; this is the same timestamp as the first entry
 	 * @throws IOException If an error occurs while writing this session information 
 	 */
-	protected void writeSession(final Writer traceWriter) throws IOException {
+	private void writeSession(final Writer traceWriter, long timestamp) throws IOException {
 
-		writeComment(traceWriter, EclipseDebugTrace.TRACE_NEW_SESSION + this.getFormattedDate());
+		writeComment(traceWriter, EclipseDebugTrace.TRACE_NEW_SESSION + this.getFormattedDate(timestamp));
 		writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERSION_COMMENT + EclipseDebugTrace.TRACE_FILE_VERSION);
+		writeComment(traceWriter, EclipseDebugTrace.TRACE_FILE_VERBOSE_COMMENT + debugOptions.isVerbose());
 		writeComment(traceWriter, "The following option strings are specified for this debug session:"); //$NON-NLS-1$ 
 		final String[] allOptions = FrameworkDebugOptions.getDefault().getAllOptions();
 		for (int i = 0; i < allOptions.length; i++) {
@@ -488,43 +538,53 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param entry The trace entry object to write to the trace file
 	 * @throws IOException If an error occurs while writing this message
 	 */
-	protected void writeMessage(final Writer traceWriter, final FrameworkDebugTraceEntry entry) throws IOException {
+	private void writeMessage(final Writer traceWriter, final FrameworkDebugTraceEntry entry) throws IOException {
 
-		// format the trace entry
-		StringBuffer message = new StringBuffer(entry.getThreadName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(this.getFormattedDate(entry.getTimestamp()));
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getBundleSymbolicName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getOptionPath());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+		final StringBuffer message = new StringBuffer(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getClassName());
+		message.append(encodeText(entry.getThreadName()));
 		message.append(" "); //$NON-NLS-1$
 		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getMethodName());
-		message.append(" "); //$NON-NLS-1$
-		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
-		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getLineNumber());
+		message.append(this.getFormattedDate(entry.getTimestamp()));
 		message.append(" "); //$NON-NLS-1$
 		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(" "); //$NON-NLS-1$
-		message.append(entry.getMessage());
+		if (!debugOptions.isVerbose()) {
+			// format the trace entry for quiet tracing: only the thread name, timestamp, trace message, and exception (if necessary)
+			message.append(encodeText(entry.getMessage()));
+		} else {
+			// format the trace entry for verbose tracing
+			message.append(entry.getBundleSymbolicName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(encodeText(entry.getOptionPath()));
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getClassName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getMethodName());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(entry.getLineNumber());
+			message.append(" "); //$NON-NLS-1$
+			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
+			message.append(" "); //$NON-NLS-1$
+			message.append(encodeText(entry.getMessage()));
+		}
 		if (entry.getThrowable() != null) {
+			message.append(" "); //$NON-NLS-1$
 			message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 			message.append(" "); //$NON-NLS-1$
-			message.append(entry.getThrowable());
+			message.append(this.getFormattedThrowable(entry.getThrowable()));
 		}
+		message.append(" "); //$NON-NLS-1$
+		message.append(EclipseDebugTrace.TRACE_ELEMENT_DELIMITER);
 		message.append(EclipseDebugTrace.LINE_SEPARATOR);
 		// write the message
 		if ((traceWriter != null) && (message != null)) {
@@ -533,11 +593,35 @@ public class EclipseDebugTrace implements DebugTrace {
 	}
 
 	/**
+	 * Encodes the specified string to replace any occurrence of the {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER}
+	 * string with the {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER_ENCODED}
+	 * string.  This can be used to ensure that the delimiter character does not break parsing when
+	 * the entry text contains the delimiter character. 
+	 * 
+	 * @param inputString The original string to be written to the trace file. 
+	 * @return The original input string with all occurrences of
+	 * {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER} replaced with 
+	 * {@link EclipseDebugTrace#TRACE_ELEMENT_DELIMITER_ENCODED}. A <code>null</code> value will be
+	 * returned if the input string is <code>null</code>.
+	 */
+	private static String encodeText(final String inputString) {
+		if (inputString == null || inputString.indexOf(TRACE_ELEMENT_DELIMITER) < 0)
+			return inputString;
+		final StringBuffer tempBuffer = new StringBuffer(inputString);
+		int currentIndex = tempBuffer.indexOf(TRACE_ELEMENT_DELIMITER);
+		while (currentIndex >= 0) {
+			tempBuffer.replace(currentIndex, currentIndex + TRACE_ELEMENT_DELIMITER.length(), TRACE_ELEMENT_DELIMITER_ENCODED);
+			currentIndex = tempBuffer.indexOf(TRACE_ELEMENT_DELIMITER);
+		}
+		return tempBuffer.toString();
+	}
+
+	/**
 	 * Returns a Writer for the given OutputStream
 	 * @param output an OutputStream to use for the Writer
 	 * @return A Writer for the given OutputStream
 	 */
-	protected Writer logForStream(OutputStream output) {
+	private Writer logForStream(OutputStream output) {
 
 		try {
 			return new BufferedWriter(new OutputStreamWriter(output, "UTF-8")); //$NON-NLS-1$
@@ -553,7 +637,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * @param traceFile The tracing file
 	 * @return Returns a new Writer object  
 	 */
-	protected Writer openWriter(final File traceFile) {
+	private Writer openWriter(final File traceFile) {
 
 		Writer traceWriter = null;
 		if (traceFile != null) {
@@ -573,7 +657,7 @@ public class EclipseDebugTrace implements DebugTrace {
 	 * 
 	 * @param traceWriter The trace writer
 	 */
-	protected void closeWriter(Writer traceWriter) {
+	private void closeWriter(Writer traceWriter) {
 
 		if (traceWriter != null) {
 			try {
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
index dd9dc4b..445ad49 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.service.debug.*;
 import org.osgi.framework.*;
@@ -30,9 +31,14 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
 public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustomizer {
 
 	private static final String OSGI_DEBUG = "osgi.debug"; //$NON-NLS-1$
+	private static final String OSGI_DEBUG_VERBOSE = "osgi.debug.verbose"; //$NON-NLS-1$
 	public static final String PROP_TRACEFILE = "osgi.tracefile"; //$NON-NLS-1$
-	/** A map of all the options specified for the product */
+	/** monitor used to lock the options maps */
+	private final Object lock = new Object();
+	/** A current map of all the options with values set */
 	private Properties options = null;
+	/** A map of all the disabled options with values set at the time debug was disabled */
+	private Properties disabledOptions = null;
 	/** The singleton object of this class */
 	private static FrameworkDebugOptions singleton = null;
 	/** The default name of the .options file if loading when the -debug command-line argument is used */
@@ -41,6 +47,8 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	protected final static Map debugTraceCache = new HashMap();
 	/** The File object to store messages.  This value may be null. */
 	protected File outFile = null;
+	/** Is verbose debugging enabled?  Changing this value causes a new tracing session to start. */
+	protected boolean verboseDebug = true;
 	private volatile BundleContext context;
 	private volatile ServiceTracker listenerTracker;
 
@@ -48,8 +56,50 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * Internal constructor to create a <code>FrameworkDebugOptions</code> singleton object. 
 	 */
 	private FrameworkDebugOptions() {
-		super();
-		loadOptions();
+		// check if verbose debugging was set during initialization.  This needs to be set even if debugging is disabled
+		this.verboseDebug = Boolean.valueOf(FrameworkProperties.getProperty(OSGI_DEBUG_VERBOSE, Boolean.TRUE.toString())).booleanValue();
+		// if no debug option was specified, don't even bother to try.
+		// Must ensure that the options slot is null as this is the signal to the
+		// platform that debugging is not enabled.
+		String debugOptionsFilename = FrameworkProperties.getProperty(OSGI_DEBUG);
+		if (debugOptionsFilename == null)
+			return;
+		options = new Properties();
+		URL optionsFile;
+		if (debugOptionsFilename.length() == 0) {
+			// default options location is user.dir (install location may be r/o so
+			// is not a good candidate for a trace options that need to be updatable by
+			// by the user)
+			String userDir = FrameworkProperties.getProperty("user.dir").replace(File.separatorChar, '/'); //$NON-NLS-1$
+			if (!userDir.endsWith("/")) //$NON-NLS-1$
+				userDir += "/"; //$NON-NLS-1$
+			debugOptionsFilename = new File(userDir, OPTIONS).toString();
+		}
+		optionsFile = buildURL(debugOptionsFilename, false);
+		if (optionsFile == null) {
+			System.out.println("Unable to construct URL for options file: " + debugOptionsFilename); //$NON-NLS-1$
+			return;
+		}
+		System.out.print("Debug options:\n    " + optionsFile.toExternalForm()); //$NON-NLS-1$
+		try {
+			InputStream input = optionsFile.openStream();
+			try {
+				options.load(input);
+				System.out.println(" loaded"); //$NON-NLS-1$
+			} finally {
+				input.close();
+			}
+		} catch (FileNotFoundException e) {
+			System.out.println(" not found"); //$NON-NLS-1$
+		} catch (IOException e) {
+			System.out.println(" did not parse"); //$NON-NLS-1$
+			e.printStackTrace(System.out);
+		}
+		// trim off all the blanks since properties files don't do that.
+		for (Iterator i = options.keySet().iterator(); i.hasNext();) {
+			Object key = i.next();
+			options.put(key, ((String) options.get(key)).trim());
+		}
 	}
 
 	public void start(BundleContext bc) {
@@ -110,47 +160,26 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 */
 	public boolean getBooleanOption(String option, boolean defaultValue) {
 		String optionValue = getOption(option);
-		return (optionValue != null && optionValue.equalsIgnoreCase("true")) || defaultValue; //$NON-NLS-1$
-	}
-
-	public String[] getOptionsForBundle(String bundleName) {
-
-		List optionsList = null;
-		if (options != null) {
-			optionsList = new ArrayList();
-			final Iterator entrySetIterator = options.entrySet().iterator();
-			int i = 0;
-			String key = null;
-			while (entrySetIterator.hasNext()) {
-				Map.Entry entry = (Map.Entry) entrySetIterator.next();
-				key = (String) entry.getKey();
-				int firstOptionPathIndex = key.indexOf("/"); //$NON-NLS-1$
-				if (key.substring(0, firstOptionPathIndex).equals(bundleName)) {
-					optionsList.add(((String) entry.getKey()) + "=" + ((String) entry.getValue())); //$NON-NLS-1$
-					i++;
-				}
-			}
-		}
-		if (optionsList == null) {
-			optionsList = Collections.EMPTY_LIST;
-		}
-		// convert the list to an array
-		final String[] optionsArray = (String[]) optionsList.toArray(new String[optionsList.size()]);
-		return optionsArray;
+		return optionValue != null ? optionValue.equalsIgnoreCase("true") : defaultValue; //$NON-NLS-1$
 	}
 
 	/**
 	 * @see DebugOptions#getOption(String)
 	 */
 	public String getOption(String option) {
-		return options != null ? options.getProperty(option) : null;
+		return getOption(option, null);
 	}
 
 	/**
 	 * @see DebugOptions#getOption(String, String)
 	 */
 	public String getOption(String option, String defaultValue) {
-		return options != null ? options.getProperty(option, defaultValue) : defaultValue;
+		synchronized (lock) {
+			if (options != null) {
+				return options.getProperty(option, defaultValue);
+			}
+		}
+		return defaultValue;
 	}
 
 	/**
@@ -165,6 +194,17 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 		}
 	}
 
+	public Map getOptions() {
+		Properties snapShot = new Properties();
+		synchronized (lock) {
+			if (options != null)
+				snapShot.putAll(options);
+			else if (disabledOptions != null)
+				snapShot.putAll(disabledOptions);
+		}
+		return snapShot;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#getAllOptions()
@@ -172,18 +212,20 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	String[] getAllOptions() {
 
 		String[] optionsArray = null;
-		if (options != null) {
-			optionsArray = new String[options.size()];
-			final Iterator entrySetIterator = options.entrySet().iterator();
-			int i = 0;
-			while (entrySetIterator.hasNext()) {
-				Map.Entry entry = (Map.Entry) entrySetIterator.next();
-				optionsArray[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue()); //$NON-NLS-1$
-				i++;
+		synchronized (lock) {
+			if (options != null) {
+				optionsArray = new String[options.size()];
+				final Iterator entrySetIterator = options.entrySet().iterator();
+				int i = 0;
+				while (entrySetIterator.hasNext()) {
+					Map.Entry entry = (Map.Entry) entrySetIterator.next();
+					optionsArray[i] = ((String) entry.getKey()) + "=" + ((String) entry.getValue()); //$NON-NLS-1$
+					i++;
+				}
 			}
 		}
 		if (optionsArray == null) {
-			optionsArray = new String[1];
+			optionsArray = new String[1]; // TODO this is strange; null is the only element so we can print null in writeSession
 		}
 		return optionsArray;
 	}
@@ -193,12 +235,17 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#removeOption(java.lang.String)
 	 */
 	public void removeOption(String option) {
-
-		if (option != null) {
-			this.options.remove(option);
-			final int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
-			final String symbolicName = option.substring(0, firstSlashIndex);
-			this.optionsChanged(symbolicName);
+		if (option == null)
+			return;
+		String fireChangedEvent = null;
+		synchronized (lock) {
+			if (options != null && options.remove(option) != null) {
+				fireChangedEvent = getSymbolicName(option);
+			}
+		}
+		// Send the options change event outside the sync block
+		if (fireChangedEvent != null) {
+			optionsChanged(fireChangedEvent);
 		}
 	}
 
@@ -207,74 +254,88 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#setOption(java.lang.String, java.lang.String)
 	 */
 	public void setOption(String option, String value) {
-		if (options != null) {
-			// get the current value
-			String currentValue = options.getProperty(option);
-			boolean optionValueHasChanged = false;
-			if (currentValue != null) {
-				if (!currentValue.equals(value)) {
-					optionValueHasChanged = true;
+
+		if (option == null || value == null) {
+			throw new IllegalArgumentException("The option and value must not be null."); //$NON-NLS-1$
+		}
+		String fireChangedEvent = null;
+		value = value != null ? value.trim() : null;
+		synchronized (lock) {
+			if (options != null) {
+				// get the current value
+				String currentValue = options.getProperty(option);
+
+				if (currentValue != null) {
+					if (!currentValue.equals(value)) {
+						fireChangedEvent = getSymbolicName(option);
+					}
+				} else {
+					if (value != null) {
+						fireChangedEvent = getSymbolicName(option);
+					}
 				}
-			} else {
-				if (value != null) {
-					optionValueHasChanged = true;
+				if (fireChangedEvent != null) {
+					options.put(option, value);
 				}
 			}
-			if (optionValueHasChanged) {
-				options.put(option, value.trim());
-				final int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
-				final String symbolicName = option.substring(0, firstSlashIndex);
-				this.optionsChanged(symbolicName);
-			}
 		}
+		// Send the options change event outside the sync block
+		if (fireChangedEvent != null) {
+			optionsChanged(fireChangedEvent);
+		}
+	}
 
+	private String getSymbolicName(String option) {
+		int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$
+		if (firstSlashIndex > 0)
+			return option.substring(0, firstSlashIndex);
+		return null;
 	}
 
-	private void loadOptions() {
-		// if no debug option was specified, don't even bother to try.
-		// Must ensure that the options slot is null as this is the signal to the
-		// platform that debugging is not enabled.
-		String debugOptionsFilename = FrameworkProperties.getProperty(OSGI_DEBUG);
-		if (debugOptionsFilename == null)
-			return;
-		options = new Properties();
-		URL optionsFile;
-		if (debugOptionsFilename.length() == 0) {
-			// default options location is user.dir (install location may be r/o so
-			// is not a good candidate for a trace options that need to be updatable by
-			// by the user)
-			String userDir = FrameworkProperties.getProperty("user.dir").replace(File.separatorChar, '/'); //$NON-NLS-1$
-			if (!userDir.endsWith("/")) //$NON-NLS-1$
-				userDir += "/"; //$NON-NLS-1$
-			debugOptionsFilename = new File(userDir, OPTIONS).toString();
+	public void setOptions(Map ops) {
+		if (ops == null)
+			throw new IllegalArgumentException("The options must not be null."); //$NON-NLS-1$
+		Properties newOptions = new Properties();
+		for (Iterator entries = ops.entrySet().iterator(); entries.hasNext();) {
+			Entry entry = (Entry) entries.next();
+			if (!(entry.getKey() instanceof String) || !(entry.getValue() instanceof String))
+				throw new IllegalArgumentException("Option keys and values must be of type String: " + entry.getKey() + "=" + entry.getValue()); //$NON-NLS-1$ //$NON-NLS-2$
+			newOptions.put(entry.getKey(), ((String) entry.getValue()).trim());
 		}
-		optionsFile = buildURL(debugOptionsFilename, false);
-		if (optionsFile == null) {
-			System.out.println("Unable to construct URL for options file: " + debugOptionsFilename); //$NON-NLS-1$
-			return;
-		}
-		System.out.print("Debug options:\n    " + optionsFile.toExternalForm()); //$NON-NLS-1$
-		try {
-			InputStream input = optionsFile.openStream();
-			try {
-				options.load(input);
-				System.out.println(" loaded"); //$NON-NLS-1$
-			} finally {
-				input.close();
+		Set fireChangesTo = null;
+
+		synchronized (lock) {
+			if (options == null) {
+				disabledOptions = newOptions;
+				// no events to fire
+				return;
 			}
-		} catch (FileNotFoundException e) {
-			System.out.println(" not found"); //$NON-NLS-1$
-		} catch (IOException e) {
-			System.out.println(" did not parse"); //$NON-NLS-1$
-			e.printStackTrace(System.out);
-		}
-		// trim off all the blanks since properties files don't do that.
-		for (Iterator i = options.keySet().iterator(); i.hasNext();) {
-			Object key = i.next();
-			options.put(key, ((String) options.get(key)).trim());
+			fireChangesTo = new HashSet();
+			// first check for removals
+			for (Iterator keys = options.keySet().iterator(); keys.hasNext();) {
+				String key = (String) keys.next();
+				if (!newOptions.containsKey(key)) {
+					String symbolicName = getSymbolicName(key);
+					if (symbolicName != null)
+						fireChangesTo.add(symbolicName);
+				}
+			}
+			// now check for changes to existing values
+			for (Iterator newEntries = newOptions.entrySet().iterator(); newEntries.hasNext();) {
+				Entry entry = (Entry) newEntries.next();
+				String existingValue = (String) options.get(entry.getKey());
+				if (!entry.getValue().equals(existingValue)) {
+					String symbolicName = getSymbolicName((String) entry.getKey());
+					if (symbolicName != null)
+						fireChangesTo.add(symbolicName);
+				}
+			}
+			// finally set the actual options
+			options = newOptions;
 		}
-		if (options.size() == 0)
-			options = null;
+		if (fireChangesTo != null)
+			for (Iterator iChanges = fireChangesTo.iterator(); iChanges.hasNext();)
+				optionsChanged((String) iChanges.next());
 	}
 
 	/*
@@ -282,9 +343,9 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#isDebugEnabled()
 	 */
 	public boolean isDebugEnabled() {
-
-		//return options != null;
-		return (FrameworkProperties.getProperty(OSGI_DEBUG) != null);
+		synchronized (lock) {
+			return options != null;
+		}
 	}
 
 	/*
@@ -292,18 +353,41 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 	 * @see org.eclipse.osgi.service.debug.DebugOptions#setDebugEnabled()
 	 */
 	public void setDebugEnabled(boolean enabled) {
-		if (enabled) {
-			if (!this.isDebugEnabled()) {
+		boolean fireChangedEvent = false;
+		synchronized (lock) {
+			if (enabled) {
+				if (options != null)
+					return;
 				// notify the trace that a new session is started
 				EclipseDebugTrace.newSession = true;
+
+				// enable platform debugging - there is no .options file
+				FrameworkProperties.setProperty(OSGI_DEBUG, ""); //$NON-NLS-1$
+				if (disabledOptions != null) {
+					options = disabledOptions;
+					disabledOptions = null;
+					// fire changed event to indicate some options were re-enabled
+					fireChangedEvent = true;
+				} else {
+					options = new Properties();
+				}
+			} else {
+				if (options == null)
+					return;
+				// disable platform debugging.
+				FrameworkProperties.clearProperty(OSGI_DEBUG);
+				if (options.size() > 0) {
+					// Save the current options off in case debug is re-enabled
+					disabledOptions = options;
+					// fire changed event to indicate some options were disabled
+					fireChangedEvent = true;
+				}
+				options = null;
 			}
-			// enable platform debugging - there is no .options file
-			FrameworkProperties.setProperty(OSGI_DEBUG, ""); //$NON-NLS-1$
-			if (this.options == null)
-				this.options = new Properties();
-		} else {
-			// disable platform debugging.
-			FrameworkProperties.clearProperty(OSGI_DEBUG);
+		}
+		if (fireChangedEvent) {
+			// (Bug 300911) need to fire event to listeners that options have been disabled
+			optionsChanged("*"); //$NON-NLS-1$
 		}
 	}
 
@@ -354,6 +438,26 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
 		EclipseDebugTrace.newSession = true;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.osgi.service.debug.DebugOptions#getVerbose()
+	 */
+	boolean isVerbose() {
+
+		return this.verboseDebug;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.osgi.service.debug.DebugOptions#setVerbose(boolean)
+	 */
+	public synchronized void setVerbose(final boolean verbose) {
+
+		this.verboseDebug = verbose;
+		// the verbose flag changed so start a new session
+		EclipseDebugTrace.newSession = true;
+	}
+
 	/**
 	 * Notifies the trace listener for the specified bundle that its option-path has changed.
 	 * @param bundleSymbolicName The bundle of the owning trace listener to notify.
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
index 0703fef..0fca678 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugTraceEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,7 @@ public class FrameworkDebugTraceEntry {
 	/**
 	 * The method being traced
 	 */
-	private String methodName = null;
+	private final String methodName;
 
 	/**
 	 * The line number
@@ -56,7 +56,7 @@ public class FrameworkDebugTraceEntry {
 	/**
 	 * The trace message
 	 */
-	private final String message;
+	private String message;
 
 	/**
 	 * The trace exception
@@ -75,7 +75,7 @@ public class FrameworkDebugTraceEntry {
 	 * @param traceClass
 	 *            The class that calls the trace API
 	 */
-	public FrameworkDebugTraceEntry(final String bundleSymbolicName, final String optionPath, final String message, final Class traceClass) {
+	public FrameworkDebugTraceEntry(final String bundleSymbolicName, final String optionPath, final String message, final String traceClass) {
 		this(bundleSymbolicName, optionPath, message, null, traceClass);
 	}
 
@@ -93,7 +93,7 @@ public class FrameworkDebugTraceEntry {
 	 * @param traceClass
 	 *            The class that calls the trace API 
 	 */
-	public FrameworkDebugTraceEntry(String bundleSymbolicName, final String optionPath, final String message, final Throwable error, final Class traceClass) {
+	public FrameworkDebugTraceEntry(String bundleSymbolicName, final String optionPath, final String message, final Throwable error, final String traceClass) {
 		threadName = Thread.currentThread().getName();
 		if (optionPath == null) {
 			this.optionPath = FrameworkDebugTraceEntry.DEFAULT_OPTION_PATH;
@@ -122,7 +122,7 @@ public class FrameworkDebugTraceEntry {
 				 * stack element is not that class, then we assume this stack element
 				 * is the caller of the trace API. 
 				 */
-				if ((traceClass == null) || !fullClassName.equals(traceClass.getName())) {
+				if ((traceClass == null) || !fullClassName.equals(traceClass)) {
 					determineClassName = stackElements[i].getClassName();
 					determineMethodName = stackElements[i].getMethodName();
 					determineLineNumber = stackElements[i].getLineNumber();
@@ -264,4 +264,13 @@ public class FrameworkDebugTraceEntry {
 
 		return lineNumber;
 	}
+
+	/**
+	 * 
+	 * @param newMessage
+	 */
+	void setMessage(final String newMessage) {
+
+		message = newMessage;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
index c814fce..1c73f44 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/internal/core/ExternalMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -25,9 +25,9 @@ BUNDLE_STATE_CHANGE_EXCEPTION=State change in progress for bundle \"{0}\" by thr
 BUNDLE_REFRESH_FAILURE=PackageAdmin.refreshPackages failed to complete
 BUNDLE_ACTIVATOR_EXCEPTION=Exception in {0}.{1}() of bundle {2}.
 BUNDLE_INVALID_ACTIVATOR_EXCEPTION=The activator {0} for bundle {1} is invalid
-BUNDLE_UNRESOLVED_EXCEPTION=The bundle could not be resolved
+BUNDLE_UNRESOLVED_EXCEPTION=The bundle \"{0}\" could not be resolved
 BUNDLE_UNRESOLVED_STATE_CONFLICT=The state indicates the bundle is resolved
-BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION=The bundle could not be resolved. Reason: {0}
+BUNDLE_UNRESOLVED_UNSATISFIED_CONSTRAINT_EXCEPTION=The bundle \"{0}\" could not be resolved. Reason: {1}
 BUNDLE_SYSTEMBUNDLE_UNINSTALL_EXCEPTION=The System Bundle cannot be uninstalled
 BUNDLE_READ_EXCEPTION=An error occurred trying to read the bundle
 BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION=The Bundle-ClassPath entry \"{0}\" was not found in the bundle: {1}
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/package.html
new file mode 100644
index 0000000..a4db43c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/log/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>FrameworkLog</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>FrameworkLog</tt> service.
+<p>
+Clients needing to log entries to the eclipse log will likely be interested 
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
index d13a683..7a25fb5 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/util/SecureAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.*;
 import java.net.*;
 import java.security.*;
 import java.util.Properties;
+import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.osgi.framework.*;
@@ -31,9 +32,7 @@ public class SecureAction {
 	// This ClassLoader is used in loadSystemClass if System.getClassLoader() returns null
 	static final ClassLoader bootClassLoader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
 		public Object run() {
-			return new ClassLoader(null) {
-				// parentless ClassLoader
-			};
+			return new ClassLoader(Object.class.getClassLoader()) { /* boot class loader */};
 		}
 	});
 
@@ -247,18 +246,28 @@ public class SecureAction {
 	 * @throws IOException if an error occured
 	 */
 	public ZipFile getZipFile(final File file) throws IOException {
-		if (System.getSecurityManager() == null)
-			return new ZipFile(file);
 		try {
-			return (ZipFile) AccessController.doPrivileged(new PrivilegedExceptionAction() {
-				public Object run() throws IOException {
-					return new ZipFile(file);
-				}
-			}, controlContext);
-		} catch (PrivilegedActionException e) {
-			if (e.getException() instanceof IOException)
-				throw (IOException) e.getException();
-			throw (RuntimeException) e.getException();
+			if (System.getSecurityManager() == null)
+				return new ZipFile(file);
+			try {
+				return (ZipFile) AccessController.doPrivileged(new PrivilegedExceptionAction() {
+					public Object run() throws IOException {
+						return new ZipFile(file);
+					}
+				}, controlContext);
+			} catch (PrivilegedActionException e) {
+				if (e.getException() instanceof IOException)
+					throw (IOException) e.getException();
+				throw (RuntimeException) e.getException();
+			}
+		} catch (ZipException e) {
+			ZipException zipNameException = new ZipException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
+			zipNameException.initCause(e);
+			throw zipNameException;
+		} catch (IOException e) {
+			IOException fileNameException = new IOException("Exception in opening zip file: " + file.getPath()); //$NON-NLS-1$
+			fileNameException.initCause(e);
+			throw fileNameException;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/datalocation/Location.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/datalocation/Location.java
index 29e5236..8ae3658 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/datalocation/Location.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/datalocation/Location.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -199,4 +199,27 @@ public interface Location {
 	 * @since 3.4
 	 */
 	public Location createLocation(Location parent, URL defaultValue, boolean readonly);
+
+	/**
+	 * Returns a URL to the specified path within this location.  The path 
+	 * of the returned URL may not exist yet.  It is the responsibility of the 
+	 * client to create the content of the data area returned if it does not exist.
+	 * <p>
+	 * This method can be used to obtain a private area within the given location. 
+	 * For example use the symbolic name of a bundle to obtain a data area specific 
+	 * to that bundle.
+	 * </p>
+	 * <p>
+	 * Clients should check if the location is read only before writing anything
+	 * to the returned data area.  An <code>IOException</code> will be thrown if
+	 * this method is called and the location URL has not been set and there is
+	 * no default value for this location.
+	 * </p>
+	 * 
+	 * @param path the name of the path to get from this location
+	 * @return the URL to the data area with the specified path.
+	 * @throws IOException if the location URL is not already set
+	 * @since 3.6
+	 */
+	public URL getDataArea(String path) throws IOException;
 }
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
index 11e7af8..9e6b3bd 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.osgi.service.debug;
 
 import java.io.File;
+import java.util.Map;
 
 /**
  * Used to get debug options settings and creating a new {@link DebugTrace} instance for
@@ -31,10 +32,13 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option as a boolean value.  The specified
-	 * defaultValue is returned if no such option is found.   Options are specified
-	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
+	 * defaultValue is returned if no such option is found or if debug is not enabled.   
+	 * 
+	 * <p>
+	 * Options are specified in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -43,11 +47,15 @@ public interface DebugOptions {
 	public abstract boolean getBooleanOption(String option, boolean defaultValue);
 
 	/**
-	 * Returns the identified option.  <code>null</code>
-	 * is returned if no such option is found.   Options are specified
+	 * Returns the identified option.  A <code>null</code> value
+	 * is returned if no such option is found or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 *</p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @return the value of the requested debug option or <code>null</code>
 	 */
@@ -55,11 +63,14 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option.  The specified defaultValue is 
-	 * returned if no such option is found or if a NumberFormatException is thrown 
-	 * while converting the option value to an integer.   Options are specified
+	 * returned if no such option is found or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -69,10 +80,16 @@ public interface DebugOptions {
 
 	/**
 	 * Returns the identified option as an int value.  The specified
-	 * defaultValue is returned if no such option is found.   Options are specified
+	 * defaultValue is returned if no such option is found or if a 
+	 * NumberFormatException is thrown while converting the option value 
+	 * to an integer or if debug is not enabled.
+	 * 
+	 * <p>
+	 * Options are specified
 	 * in the general form <i><Bundle-SymbolicName>/<option-path></i>.  
 	 * For example, <code>org.eclipse.core.runtime/debug</code>
-	 *
+	 * </p>
+	 * 
 	 * @param option the name of the option to lookup
 	 * @param defaultValue the value to return if no such option is found
 	 * @return the value of the requested debug option or the
@@ -81,30 +98,71 @@ public interface DebugOptions {
 	public abstract int getIntegerOption(String option, int defaultValue);
 
 	/**
-	 * Sets the identified option to the identified value.
+	 * Returns a snapshot of the current options.  All 
+	 * keys and values are of type <code>String</code>.  If no
+	 * options are set then an empty map is returned.
+	 * <p>
+	 * If debug is not enabled then the snapshot of the current disabled 
+	 * values is returned. See {@link DebugOptions#setDebugEnabled(boolean)}.
+	 * </p>
+	 * @return a snapshot of the current options.
+	 * @since 3.6
+	 */
+	public Map /*<String, String>*/getOptions();
+
+	/**
+	 * Sets the identified option to the identified value.  If debug is 
+	 * not enabled then the specified option is not changed.
 	 * @param option the name of the option to set
 	 * @param value the value of the option to set
 	 */
 	public abstract void setOption(String option, String value);
 
 	/**
-	 * Removes the identified option
+	 * Sets the current option key/value pairs to the specified options.
+	 * The specified map replaces all keys and values of the current debug options.
+	 * An <code>IllegalArgumentException</code> is thrown if any key or value 
+	 * in the specified map is not of type <code>String</code>.
+	 * <p>
+	 * If debug is not enabled then the specified options are saved as
+	 * the disabled values and no notifications will be sent. 
+	 * See {@link DebugOptions#setDebugEnabled(boolean)}.
+	 * If debug is enabled then notifications will be sent to the 
+	 * listeners which have options that have been changed, added or removed.
+	 * </p>
+
+	 * @param options the new set of options
+	 * @since 3.6
+	 */
+	public abstract void setOptions(Map /*<String, String>*/options);
+
+	/**
+	 * Removes the identified option.  If debug is not enabled then
+	 * the specified option is not removed.
 	 * @param option the name of the option to remove
 	 * @since 3.5
 	 */
 	public abstract void removeOption(String option);
 
 	/**
-	 * Accessor to determine if debugging/tracing is enabled for the product.
-	 * @return true if debugging/tracing is enabled;  Otherwise false is returned.
+	 * Returns true if debugging/tracing is currently enabled.
+	 * @return true if debugging/tracing is currently enabled;  Otherwise false is returned.
 	 * @since 3.5
 	 */
 	public abstract boolean isDebugEnabled();
 
 	/**
-	 * Enables or disables debug tracing for the entire application.
-	 * @param value If <code>true</code>, debugging is enabled, otherwise
-	 * debugging is disabled
+	 * Enables or disables debugging/tracing.
+	 * <p>
+	 * When debug is disabled all debug options are unset.
+	 * When disabling debug the current debug option values are
+	 * stored in memory as disabled values.  If debug is re-enabled the
+	 * disabled values will be set back and enabled.  The disabled values 
+	 * are only stored in memory and if the framework is restarted then 
+	 * the disabled option values will be lost.
+	 * </p>
+	 * @param value If <code>true</code>, debug is enabled, otherwise
+	 * debug is disabled.
 	 * @since 3.5
 	 */
 	public abstract void setDebugEnabled(boolean value);
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
index 592bc2d..ac6ca3c 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugOptionsListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,9 @@ import java.util.EventListener;
  * <p>
  * The {@link DebugOptionsListener#optionsChanged(DebugOptions)} method will automatically 
  * be called upon registration of the debug options listener service.  This allows the 
- * listener to obtain the initial debug options.
+ * listener to obtain the initial debug options.  This initial call to the listener 
+ * will happen even if debug is not enabled at the time of registration 
+ * ({@link DebugOptions#isDebugEnabled()} will return false in this case).
  * </p>
  * A debug options listener allows a bundle to cache trace option values in boolean fields for performance
  * and code cleanliness. For example:
@@ -55,7 +57,7 @@ public interface DebugOptionsListener extends EventListener {
 	 * Notifies this listener that an option-path for its plug-in has changed.
 	 * This method is also called initially by the DebugOptions implementation 
 	 * when the listener is registered as a service.  This allows the listener
-	 * to obtain the initial set of debug options with out the need to 
+	 * to obtain the initial set of debug options without the need to 
 	 * acquire the debug options service.
 	 * @param options a reference to the DebugOptions
 	 */
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
index 33c3e9d..a6768b7 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/DebugTrace.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,11 @@ package org.eclipse.osgi.service.debug;
  * of "/debug/parser", the trace will only be printed if the option "com.acme.bundle/debug/parser"
  * has a value of "true".
  * </p>
+ * <p>
+ * Note that the pipe character ("|") is reserved for internal use. If this character 
+ * happens to occur in any of the thread name, the option, the message or an Exception
+ * message, it will be escaped to the corresponding HTML representation ("&amp#124;").   
+ * </p>
  *  
  * @since 3.5
  * @noimplement This interface is not intended to be implemented by clients.
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/package.html
new file mode 100644
index 0000000..8c32c76
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/debug/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>DebugOptions</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>DebugOptions</tt> service.
+<p>
+Clients accessing debug and trace options will likely be interested 
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java
index bfb6526..4b017cd 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java
@@ -117,6 +117,13 @@ public interface Constants {
 	public static final String ARCH_PPC = "ppc";//$NON-NLS-1$
 
 	/**
+	 * Constant string (value "ppc64") indicating the platform is running on an
+	 * PowerPC-based 64-bit architecture.
+	 * @since 3.6
+	 */
+	public static final String ARCH_PPC64 = "ppc64";//$NON-NLS-1$
+
+	/**
 	 * Constant string (value "sparc") indicating the platform is running on an
 	 * Sparc-based architecture.
 	 */
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/package.html
new file mode 100644
index 0000000..ef6f904
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/package.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the <tt>EnvironmentInfo</tt> service.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>EnvironmentInfo</tt> service.
+<p>
+Clients accessing the command line used to start the running framework 
+as well as information about the environment will likely be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java
new file mode 100644
index 0000000..2dde516
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/LocaleProvider.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osgi.service.localization;
+
+import java.util.Locale;
+
+/**
+ * A service that is used to determine what the current locale is for a 
+ * particular context or session.  If no <code>LocaleProvider</code> 
+ * service is available then the locale must be determined by other 
+ * means, for example, by calling {@link Locale#getDefault()}.
+ * <p>
+ * More advanced environments can support multiple locales within a 
+ * single system.  For example, a server may support multiple users, 
+ * each needing a different locale.  In such an environment a 
+ * <code>LocaleProvider</code> service must be registered that can 
+ * determine the current locale for the context of the call to the 
+ * {@link #getLocale()} method.
+ * </p>
+ * @since 1.1
+ */
+public interface LocaleProvider {
+
+	/**
+	 * Determines the current locale for the context of the call to 
+	 * this method.  For environments that support a single system wide 
+	 * locale, this is equivalent to calling {@link Locale#getDefault()}.
+	 * <p>
+	 * The result of this method should not be retained or passed to other 
+	 * threads.  The current locale can change any time and may be 
+	 * different for each thread.
+	 * </p>
+	 * @return The current locale.
+	 */
+	public Locale getLocale();
+
+}
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/package.html
new file mode 100644
index 0000000..07ddb00
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/localization/package.html
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides bundle localization and local provider service APIs.
+<h2>
+Package Specification</h2>
+This package specifies the API for the <tt>BundleLocalization</tt> and
+<tt>LocalePrivder</tt> services.
+<p>
+Clients accessing the localization resource bundles use to localize 
+OSGi bundle manifests will likely be interested in the types provided 
+by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
index b1be943..85128c9 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationLauncher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,10 @@ package org.eclipse.osgi.service.runnable;
  * <p>
  * This interface is not intended to be implemented by clients.
  * </p>
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * 
  * @since 3.2
  * @noimplement This interface is not intended to be implemented by clients.
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
index c01f2ec..1d9efee 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ApplicationRunnable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,10 @@ package org.eclipse.osgi.service.runnable;
 
 /**
  * A parameterized runnable that can be stopped.
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * @since 3.2
  */
 public interface ApplicationRunnable extends ParameterizedRunnable {
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
index 2489dbd..e75c891 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/ParameterizedRunnable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,10 @@ package org.eclipse.osgi.service.runnable;
  * <p>
  * Clients may implement this interface.
  * </p>
+ * <p>
+ * This class is for internal use by the platform-related plug-ins.
+ * Clients outside of the base platform should not reference or subclass this class.
+ * </p>
  * @since 3.0
  */
 public interface ParameterizedRunnable {
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/package.html
new file mode 100644
index 0000000..03dbe8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/runnable/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides API for monitoring and running code on the main thread.
+<h2>
+Package Specification</h2>
+This package specifies the API for monitoring and running code on the main thread.
+<p>
+Clients that monitor the startup sequence will likely be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
index cf23f27..3ebfe71 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/StorageManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -87,12 +87,14 @@ public final class StorageManager {
 	private static final int FILETYPE_STANDARD = 0;
 	private static final int FILETYPE_RELIABLEFILE = 1;
 	private static final SecureAction secure = (SecureAction) AccessController.doPrivileged(SecureAction.createSecureAction());
-	private static boolean tempCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanTempFiles")).booleanValue(); //$NON-NLS-1$
-	private static boolean openCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnOpen")).booleanValue(); //$NON-NLS-1$
+	private static final boolean tempCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanTempFiles")).booleanValue(); //$NON-NLS-1$
+	private static final boolean openCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnOpen")).booleanValue(); //$NON-NLS-1$
 	private static final String MANAGER_FOLDER = ".manager"; //$NON-NLS-1$
 	private static final String TABLE_FILE = ".fileTable"; //$NON-NLS-1$
 	private static final String LOCK_FILE = ".fileTableLock"; //$NON-NLS-1$
 	private static final int MAX_LOCK_WAIT = 5000; // 5 seconds 
+	// this should be static but the tests expect to be able to create new managers after changing this setting dynamically
+	private final boolean useReliableFiles = Boolean.valueOf(secure.getProperty("osgi.useReliableFiles")).booleanValue(); //$NON-NLS-1$
 
 	private class Entry {
 		int readId;
@@ -130,24 +132,23 @@ public final class StorageManager {
 		}
 	}
 
-	private File base; //The folder managed
-	private File managerRoot; //The folder that will contain all the file related to the functionning of the manager (typically a subdir of base)
+	private final File base; //The folder managed
+	private final File managerRoot; //The folder that will contain all the file related to the functionning of the manager (typically a subdir of base)
 
-	private String lockMode = null;
-	private File tableFile = null;
-	private File lockFile; // The lock file for the table (this file is the same for all the instances)
+	private final String lockMode;
+	private final File tableFile;
+	private final File lockFile; // The lock file for the table (this file is the same for all the instances)
 	private Locker locker; // The locker for the lock
 
-	private File instanceFile = null; //The file reprensenting the running instance. It is created when the table file is read.
+	private File instanceFile; //The file representing the running instance. It is created when the table file is read.
 	private Locker instanceLocker = null; //The locker for the instance file.
-	private boolean readOnly; // Whether this storage manager is in read-only mode
+	private final boolean readOnly; // Whether this storage manager is in read-only mode
 	private boolean open; // Whether this storage manager is open for use
 
 	// locking related fields
 	private int tableStamp = -1;
 
-	private Properties table = new Properties();
-	private boolean useReliableFiles = Boolean.valueOf(secure.getProperty("osgi.useReliableFiles")).booleanValue(); //$NON-NLS-1$
+	private final Properties table = new Properties();
 
 	/**
 	 * Returns a new storage manager for the area identified by the given base
@@ -174,8 +175,6 @@ public final class StorageManager {
 		this.base = base;
 		this.lockMode = lockMode;
 		this.managerRoot = new File(base, MANAGER_FOLDER);
-		if (!readOnly)
-			this.managerRoot.mkdirs();
 		this.tableFile = new File(managerRoot, TABLE_FILE);
 		this.lockFile = new File(managerRoot, LOCK_FILE);
 		this.readOnly = readOnly;
@@ -677,12 +676,15 @@ public final class StorageManager {
 	 * This methods opens the storage manager. 
 	 * This method must be called before any operation on the storage manager.
 	 * @param wait indicates if the open operation must wait in case of contention on the lock file.
-	 * @throws IOException if an error occured opening the storage manager
+	 * @throws IOException if an error occurred opening the storage manager
 	 */
 	public void open(boolean wait) throws IOException {
 		if (openCleanup)
 			cleanup();
 		if (!readOnly) {
+			managerRoot.mkdirs();
+			if (!managerRoot.exists())
+				throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);
 			boolean locked = lock(wait);
 			if (!locked && wait)
 				throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/package.html b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/package.html
new file mode 100644
index 0000000..6607759
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/storagemanager/package.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Provides the storage manager API.
+<h2>
+Package Specification</h2>
+This package specifies the API for managing a group of files that are related to each other.
+<p>
+Clients that manage groups of files that are closely related to each other may be interested  
+in the types provided by this package.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
index ad48d85..17e0c48 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/ManifestElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,19 +22,22 @@ import org.osgi.framework.BundleException;
  * This class represents a single manifest element.  A manifest element must consist of a single
  * {@link String} value.  The {@link String} value may be split up into component values each
  * separated by a semi-colon (';').  A manifest element may optionally have a set of 
- * attribute values associated with it. The general syntax of a manifest element is as follows:
+ * attribute and directive values associated with it. The general syntax of a manifest element is as follows:
  * <p>
  * <pre>
- * ManifestElement ::= headervalues (';' attribute)*
- * headervalues ::= headervalue (';' headervalue)*
- * headervalue ::= <any string value that does not have ';'>
- * attribute ::= key '=' value
- * key ::= token
- * value ::= token | quoted-string
+ * ManifestElement ::= component (';' component)* (';' parameter)*
+ * component ::= ([^;,:="\#x0D#x0A#x00])+ | quoted-string
+ * quoted-string::= '"' ( [^"\#x0D#x0A#x00] | '\"'| '\\')* '"'
+ * parameter ::= directive | attribute 
+ * directive ::= token ':=' argument
+ * attribute ::= token '=' argument
+ * argument ::= extended  | quoted-string
+ * token ::= ( alphanum | '_' | '-' )+ 
+ * extended ::= ( alphanum | '_' | '-' | '.' )+ 
  * </pre>
  * </p>
  * <p>
- * For example, The following is an example of a manifest element to the <tt>Export-Package</tt> header:
+ * For example, the following is an example of a manifest element to the <tt>Export-Package</tt> header:
  * </p>
  * <p>
  * <pre>
@@ -60,6 +63,18 @@ import org.osgi.framework.BundleException;
  * components: <tt>code1.jar</tt>, <tt>code2.jar</tt>, and <tt>code3.jar</tt>.
  * </p>
  * <p>
+ * If components contain delimiter characters (e.g ';', ',' ':' "=") then it must be
+ * a quoted string.  For example, the following is an example of a manifest element 
+ * that has multiple components containing delimiter characters:
+ * </p>
+ * <pre>
+ * "component ; 1"; "component , 2"; "component : 3"; attr1=value1; attr2=value2; attr3=value3
+ * </pre>
+ * <p>
+ * This manifest element has a value of <tt>"component ; 1"; "component , 2"; "component : 3"</tt>.  
+ * This value has three components: <tt>"component ; 1"</tt>, <tt>"component , 2"</tt>, <tt>"component : 3"</tt>.
+ * </p>
+ * <p>
  * This class is not intended to be subclassed by clients.
  * </p>
  * 
@@ -97,7 +112,7 @@ public class ManifestElement {
 
 	/**
 	 * Returns the value of the manifest element.  The value returned is the
-	 * complete value up to the first attribute.  For example, the 
+	 * complete value up to the first attribute or directive.  For example, the 
 	 * following manifest element: 
 	 * <p>
 	 * <pre>
@@ -117,8 +132,8 @@ public class ManifestElement {
 	/**
 	 * Returns the value components of the manifest element. The value
 	 * components returned are the complete list of value components up to 
-	 * the first attribute.  
-	 * For example, the folowing manifest element: 
+	 * the first attribute or directive.  
+	 * For example, the following manifest element: 
 	 * <p>
 	 * <pre>
 	 * test1.jar;test2.jar;test3.jar;selection-filter="(os.name=Windows XP)"
@@ -395,7 +410,7 @@ public class ManifestElement {
 						manifestElement.addAttribute(next, val);
 					directive = false;
 				} catch (Exception e) {
-					throw new BundleException(NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, header, value), BundleException.MANIFEST_ERROR);
+					throw new BundleException(NLS.bind(Msg.MANIFEST_INVALID_HEADER_EXCEPTION, header, value), BundleException.MANIFEST_ERROR, e);
 				}
 				c = tokenizer.getChar();
 				if (c == ';') /* more */{
diff --git a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
index 71769d8..058e4a1 100644
--- a/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
+++ b/eclipse/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/util/NLS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.*;
 import org.eclipse.osgi.framework.debug.Debug;
+import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
 import org.eclipse.osgi.framework.log.FrameworkLog;
 import org.eclipse.osgi.framework.log.FrameworkLogEntry;
 
@@ -54,6 +55,10 @@ public abstract class NLS {
 	private static final Object[] EMPTY_ARGS = new Object[0];
 	private static final String EXTENSION = ".properties"; //$NON-NLS-1$
 	private static String[] nlSuffixes;
+	private static final String PROP_WARNINGS = "osgi.nls.warnings"; //$NON-NLS-1$
+	private static final String IGNORE = "ignore"; //$NON-NLS-1$
+	private static final boolean ignoreWarnings = IGNORE.equals(FrameworkProperties.getProperty(PROP_WARNINGS));
+
 	/*
 	 * NOTE do not change the name of this field; it is set by the Framework using reflection
 	 */
@@ -168,7 +173,7 @@ public abstract class NLS {
 					try {
 						number = Integer.parseInt(message.substring(i, index));
 					} catch (NumberFormatException e) {
-						throw new IllegalArgumentException();
+						throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);
 					}
 					if (number == 0 && argZero != null)
 						buffer.append(argZero);
@@ -333,6 +338,8 @@ public abstract class NLS {
 	 * @param e - exception to log
 	 */
 	static void log(int severity, String message, Exception e) {
+		if (severity == SEVERITY_WARNING && ignoreWarnings)
+			return; // ignoring warnings; bug 292980
 		if (frameworkLog != null) {
 			frameworkLog.log(new FrameworkLogEntry("org.eclipse.osgi", severity, 1, message, 0, e, null)); //$NON-NLS-1$
 			return;
@@ -406,7 +413,10 @@ public abstract class NLS {
 				// we know we have a public static non-final field. If we do get an exception, silently
 				// log it and continue. This means that the field will (most likely) be un-initialized and
 				// will fail later in the code and if so then we will see both the NPE and this error.
-				field.set(null, value);
+
+				// Extra care is taken to be sure we create a String with its own backing char[] (bug 287183)
+				// This is to ensure we do not keep the key chars in memory.
+				field.set(null, new String(((String) value).toCharArray()));
 			} catch (Exception e) {
 				log(SEVERITY_ERROR, "Exception setting field value.", e); //$NON-NLS-1$
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10/META-INF/MANIFEST.MF
index 787d3ec..6b497eb 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10/META-INF/MANIFEST.MF
@@ -4,7 +4,7 @@ Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.cdcfoundation10
 Bundle-Version: 1.0.0.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentcdcfoundation10
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11/META-INF/MANIFEST.MF
index f4e034a..d816336 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.cdcfoundation11
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentcdcfoundation11
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se12/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se12/META-INF/MANIFEST.MF
index db68da1..845661b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se12/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se12/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.j2se12
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentj2se12
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se13/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se13/META-INF/MANIFEST.MF
index d3f3e59..fb94a9b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se13/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se13/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.j2se13
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentj2se13
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se14/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se14/META-INF/MANIFEST.MF
index cfc8a64..877141e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se14/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se14/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.j2se14
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentj2se14
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se15/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se15/META-INF/MANIFEST.MF
index c810963..c195340 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se15/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.j2se15/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.j2se15
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentj2se15
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.javase16/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.javase16/META-INF/MANIFEST.MF
index 6ebd095..90bc313 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.javase16/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.javase16/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.javase16
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentjavase16
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.jre11/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.jre11/META-INF/MANIFEST.MF
index 9bf3e1c..48ae7dd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.jre11/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.jre11/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.jre11
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentjre11
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10/META-INF/MANIFEST.MF
index 054c66c..dc15733 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.osgiminimum10
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentosgiminimum10
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11/META-INF/MANIFEST.MF
index 399f6c3..095ef72 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.osgiminimum11
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.1.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentosgiminimum11
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12/META-INF/MANIFEST.MF
index df4ffd1..d05c067 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ee.osgiminimum12
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.3.qualifier
 Bundle-Vendor: %providerName
-Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.100"
+Fragment-Host: org.eclipse.pde.api.tools;bundle-version="1.0.201"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Localization: fragmentosgiminimum12
 Eclipse-BundleShape: dir
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.jdt.core.prefs
index 885225e..6512711 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon May 04 15:12:50 EDT 2009
+#Mon Jul 06 12:42:12 CDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
@@ -28,7 +28,7 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
@@ -53,7 +53,7 @@ org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
 org.eclipse.jdt.core.compiler.problem.nullReference=ignore
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
@@ -62,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.pde.prefs
index ab58b06..a695748 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/.settings/org.eclipse.pde.prefs
@@ -1,16 +1,28 @@
-#Mon Feb 04 11:11:05 CST 2008
+#Mon Dec 14 12:08:27 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
 compilers.p.missing-bundle-classpath-entries=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=0
 compilers.p.unknown-attribute=1
 compilers.p.unknown-class=1
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
index 79e2e45..d77af7b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.api.tools.ui; singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.201.qualifier
 Bundle-Localization: plugin
 Eclipse-LazyStart: true
 Bundle-ActivationPolicy: lazy
@@ -23,7 +23,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="3.4.100",
- org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)"
+ org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.debug.ui;bundle-version="[3.4.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-Activator: org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin
 Export-Package: org.eclipse.pde.api.tools.ui.internal;x-friends:="org.eclipse.pde.api.tools.tests",
@@ -33,6 +35,7 @@ Export-Package: org.eclipse.pde.api.tools.ui.internal;x-friends:="org.eclipse.pd
  org.eclipse.pde.api.tools.ui.internal.preferences;x-friends:="org.eclipse.pde.api.tools.tests",
  org.eclipse.pde.api.tools.ui.internal.properties;x-friends:="org.eclipse.pde.api.tools.tests",
  org.eclipse.pde.api.tools.ui.internal.refactoring;x-internal:=true,
+ org.eclipse.pde.api.tools.ui.internal.use;x-internal:=true,
  org.eclipse.pde.api.tools.ui.internal.views;x-internal:=true,
  org.eclipse.pde.api.tools.ui.internal.wizards;x-friends:="org.eclipse.pde.api.tools.tests"
 Import-Package: com.ibm.icu.text;version="3.6.1"
diff --git a/eclipse/plugins/org.eclipse.ltk.ui.refactoring/icons/full/obj16/text_edit.gif b/eclipse/plugins/org.eclipse.pde.api.tools.ui/icons/full/elcl16/text_edit.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ltk.ui.refactoring/icons/full/obj16/text_edit.gif
copy to eclipse/plugins/org.eclipse.pde.api.tools.ui/icons/full/elcl16/text_edit.gif
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.properties
index b55085d..d9c3411 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.properties
@@ -10,22 +10,7 @@
 ###############################################################################
 pluginName = API Tools UI
 providerName = Eclipse.org
-apiToolsUISet = API Tools
-menuLabel = &API Tools
-refExtractLabel = &Extract References
-refExtractToolTip = Extract External References from a project
-collectlApiLabel = &Collect APIs
-collectApiToolTip = Collect API information into repository
-compareApiLabel = C&ompare APIs
-compareApiToolTip = Compare API information with a repository
-collectUsersLabel = Collect Users
-collectUsersToolTip = Collect the users of the given class 
-collectReferencesLabel = Collect References
-collectReferencesToolTip = Collect the referenced classes of the given class 
-repositoryName = API Tools
-referenceSearchLabel = Reference-Search Results
-userSearchLabel = User-Search Results
-apiToolsMenuLabel = API Tools
+
 ApiProfilesPreferencePage.name = API Baselines
 ApiProfilesPreferencePage.keywords = API SPI profile baseline 
 ApiErrorsWarningsPreferencePage.name = API Errors/Warnings
@@ -49,4 +34,6 @@ Apitoolingview.category.name=API Tooling
 FilterDeleteParticipant.name = API Problem Filter Delete Participant
 FilterRenameParticipant.name = API Problem Filter Rename Participant
 FilterMoveParticipant.name = API Problem Filter Move Participant
-CompareWithMenu.label=Compare With
\ No newline at end of file
+CompareWithMenu.label=Compare With
+LaunchConfigurationType.name=API Use Report
+LaunchConfigurationTabGroup.name=Creates an API use scan report
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.xml b/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.xml
index 208be38..4b39e46 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
<!--
-    Copyright (c) 2009 IBM Corporation and others.
+<?eclipse version="3.2"?>
+<!--
+    Copyright (c) 2009, 2010 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
@@ -235,6 +236,9 @@
          <markerTypeReference
                id="org.eclipse.pde.api.tools.unused_filters">
          </markerTypeReference>
+         <markerTypeReference
+               id="org.eclipse.pde.api.tools.fatal_problem">
+         </markerTypeReference>
       </markerTypeCategory>
    </extension>
     <extension
@@ -268,6 +272,10 @@
              defaultGroupingEntry="org.eclipse.pde.api.tools.jdt_category"
              markerType="org.eclipse.pde.api.tools.unused_filters">
        </markerAttributeGrouping>
+       <markerAttributeGrouping
+             defaultGroupingEntry="org.eclipse.pde.api.tools.jdt_category"
+             markerType="org.eclipse.pde.api.tools.fatal_problem">
+       </markerAttributeGrouping>
     </extension>
    <extension
          point="org.eclipse.ui.ide.markerResolution">
@@ -459,4 +467,33 @@
          </enablement>
       </deleteParticipant>
    </extension>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            category="org.eclipse.ui.externaltools"
+            delegate="org.eclipse.pde.api.tools.ui.internal.use.ApiUseLaunchDelegate"
+            delegateName="%LaunchConfigurationType.name"
+            id="org.eclipse.pde.api.tools.usescan"
+            modes="run"
+            name="%LaunchConfigurationType.name"
+            public="true">
+      </launchConfigurationType>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+      <launchConfigurationTabGroup
+            class="org.eclipse.pde.api.tools.ui.internal.use.ApiUseTabGroup"
+            description="%LaunchConfigurationTabGroup.name"
+            id="org.eclipse.pde.api.tools.usescan.tabgroup"
+            type="org.eclipse.pde.api.tools.usescan">
+      </launchConfigurationTabGroup>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+      <launchConfigurationTypeImage
+            configTypeID="org.eclipse.pde.api.tools.usescan"
+            icon="$nl$/icons/full/obj16/category_menu.gif"
+            id="org.eclipse.pde.api.tools.usescan.image">
+      </launchConfigurationTypeImage>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiToolsLabelProvider.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiToolsLabelProvider.java
index 1739af9..ad134a2 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiToolsLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiToolsLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,10 +93,9 @@ public class ApiToolsLabelProvider extends BaseLabelProvider implements ILabelPr
 		if(element instanceof IApiProblemFilter) {
 			IApiProblemFilter filter = (IApiProblemFilter) element;
 			IApiProblem problem = filter.getUnderlyingProblem();
-			Image image = getApiProblemElementImage(problem);
-			int flags = (problem.getSeverity() == ApiPlugin.SEVERITY_ERROR ? CompositeApiImageDescriptor.ERROR : CompositeApiImageDescriptor.WARNING);
-			CompositeApiImageDescriptor desc = new CompositeApiImageDescriptor(image, flags);
-			return ApiUIPlugin.getImage(desc);
+			/*int flags = (problem.getSeverity() == ApiPlugin.SEVERITY_ERROR ? CompositeApiImageDescriptor.ERROR : CompositeApiImageDescriptor.WARNING);
+			CompositeApiImageDescriptor desc = new CompositeApiImageDescriptor(image, flags);*/
+			return getApiProblemElementImage(problem);/*ApiUIPlugin.getImage(desc);*/
 		}
 		return null;
 	}
@@ -117,7 +116,7 @@ public class ApiToolsLabelProvider extends BaseLabelProvider implements ILabelPr
 				case IDelta.FIELD_ELEMENT_TYPE: return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_FIELD_PUBLIC);
 				case IDelta.METHOD_ELEMENT_TYPE: return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PUBLIC);
 				case IDelta.TYPE_PARAMETER_ELEMENT_TYPE: return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_CUNIT);
-				case IDelta.API_PROFILE_ELEMENT_TYPE: return getBaselineImage();
+				case IDelta.API_BASELINE_ELEMENT_TYPE: return getBaselineImage();
 				case IDelta.API_COMPONENT_ELEMENT_TYPE: {
 					IPath path = new Path(problem.getResourcePath());
 					//try to find the component via the resource handle
@@ -179,46 +178,45 @@ public class ApiToolsLabelProvider extends BaseLabelProvider implements ILabelPr
 	 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
 	 */
 	public String getText(Object element) {
-		try {
-			if (element instanceof IApiComponent) {
-				IApiComponent comp = (IApiComponent) element;
-				return MessageFormat.format(Messages.ApiToolsLabelProvider_0, new String[]{comp.getId(), comp.getVersion()});
-			}
-			if (element instanceof File) {
-				try {
-					return ((File)element).getCanonicalPath();
-				} catch (IOException e) {
-					return ((File)element).getName();
-				}
-			}
-			if(element instanceof IApiBaseline) {
-				IApiBaseline baseline  = (IApiBaseline) element;
-				StringBuffer buffer = new StringBuffer();
-				buffer.append(baseline.getName());
-				if(isDefaultBaseline(baseline)) {
-					buffer.append(NLS.bind(Messages.ApiToolsLabelProvider_default_baseline_place_holder, Messages.ApiToolsLabelProvider_default_baseline));
-				}
-				return buffer.toString();
-			}
-			if(element instanceof EEEntry) {
-				return ((EEEntry)element).toString();
-			}
-			if(element instanceof IApiProblemFilter) {
-				IApiProblemFilter filter = (IApiProblemFilter) element;
-				return filter.getUnderlyingProblem().getMessage();
+		if (element instanceof IApiComponent) {
+			IApiComponent comp = (IApiComponent) element;
+			return MessageFormat.format(Messages.ApiToolsLabelProvider_0, new String[]{comp.getSymbolicName(), comp.getVersion()});
+		}
+		if (element instanceof File) {
+			try {
+				return ((File)element).getCanonicalPath();
+			} catch (IOException e) {
+				return ((File)element).getName();
 			}
-			if(element instanceof IResource) {
-				IResource resource = (IResource) element;
-				IPath path = resource.getProjectRelativePath();
-				StringBuffer buffer = new StringBuffer();
-				buffer.append(path.removeFileExtension().lastSegment());
-				buffer.append(" ("); //$NON-NLS-1$
-				buffer.append(path.removeLastSegments(1));
-				buffer.append(")"); //$NON-NLS-1$
-				return buffer.toString();
+		}
+		if(element instanceof IApiBaseline) {
+			IApiBaseline baseline  = (IApiBaseline) element;
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(baseline.getName());
+			if(isDefaultBaseline(baseline)) {
+				buffer.append(NLS.bind(Messages.ApiToolsLabelProvider_default_baseline_place_holder, Messages.ApiToolsLabelProvider_default_baseline));
 			}
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
+			return buffer.toString();
+		}
+		if(element instanceof EEEntry) {
+			return ((EEEntry)element).toString();
+		}
+		if(element instanceof IApiProblemFilter) {
+			IApiProblemFilter filter = (IApiProblemFilter) element;
+			return filter.getUnderlyingProblem().getMessage();
+		}
+		if(element instanceof IResource) {
+			IResource resource = (IResource) element;
+			IPath path = resource.getProjectRelativePath();
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(path.removeFileExtension().lastSegment());
+			buffer.append(" ("); //$NON-NLS-1$
+			buffer.append(path.removeLastSegments(1));
+			buffer.append(")"); //$NON-NLS-1$
+			return buffer.toString();
+		}
+		if(element instanceof String) {
+			return (String) element;
 		}
 		return "<unknown>"; //$NON-NLS-1$
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java
index 465d74c..322e85f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/ApiUIPlugin.java
@@ -120,16 +120,18 @@ public class ApiUIPlugin extends AbstractUIPlugin {
 	 *  if the image descriptor can't create the requested image.
 	 */
 	public static Image getImage(ImageDescriptor descriptor) {
-		if (descriptor == null)
-			descriptor= ImageDescriptor.getMissingImageDescriptor();
-			
-		Image result= (Image)fCompositeImages.get(descriptor);
-		if (result != null)
+		ImageDescriptor ldesc = descriptor;
+		if (ldesc == null) {
+			ldesc = ImageDescriptor.getMissingImageDescriptor();
+		}
+		Image result = (Image)fCompositeImages.get(ldesc);
+		if (result != null) {
 			return result;
-	 
-		result= descriptor.createImage();
-		if (result != null)
-			fCompositeImages.put(descriptor, result);
+		}
+		result = ldesc.createImage();
+		if (result != null) {
+			fCompositeImages.put(ldesc, result);
+		}
 		return result;
 	}
 	
@@ -294,7 +296,8 @@ public class ApiUIPlugin extends AbstractUIPlugin {
 		declareRegistryImage(reg, IApiToolsConstants.IMG_OBJ_FRAGMENT, OBJECT + "frgmt_obj.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_OBJ_ECLIPSE_PROFILE, OBJECT + "eclipse_profile.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_OBJ_BUNDLE_VERSION, OBJECT + "bundleversion.gif"); //$NON-NLS-1$
-
+		declareRegistryImage(reg, IApiToolsConstants.IMG_ELCL_SETUP_APITOOLS, OBJECT + "category_menu.gif"); //$NON-NLS-1$
+		
 		// overlays
 		declareRegistryImage(reg, IApiToolsConstants.IMG_OVR_ERROR, OVR + "error_ovr.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_OVR_WARNING, OVR + "warning_ovr.gif"); //$NON-NLS-1$
@@ -312,6 +315,7 @@ public class ApiUIPlugin extends AbstractUIPlugin {
 		declareRegistryImage(reg, IApiToolsConstants.IMG_ELCL_NEXT_NAV, ELCL + "next_nav.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_ELCL_PREV_NAV, ELCL + "prev_nav.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_ELCL_EXPANDALL, ELCL + "expandall.gif"); //$NON-NLS-1$
+		declareRegistryImage(reg, IApiToolsConstants.IMG_ELCL_TEXT_EDIT, ELCL + "text_edit.gif"); //$NON-NLS-1$
 		// disabled images
 		declareRegistryImage(reg, IApiToolsConstants.IMG_DLCL_EXPORT, DLCL + "export.gif"); //$NON-NLS-1$
 		declareRegistryImage(reg, IApiToolsConstants.IMG_DLCL_NEXT_NAV, DLCL + "next_nav.gif"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsConstants.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsConstants.java
index 69d7468..6d25377 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsConstants.java
@@ -61,7 +61,10 @@ public interface IApiToolsConstants {
 	 * Key for filter resolution image
 	 */
 	public static final String IMG_ELCL_FILTER = "IMG_ELCL_FILTER"; //$NON-NLS-1$
-	
+	/**
+	 * Key for the PDE Tools menu item for setting up API Tools
+	 */
+	public static final String IMG_ELCL_SETUP_APITOOLS = "IMG_ELCL_SETUP_APITOOLS"; //$NON-NLS-1$
 	/**
 	 * Key for the open page image
 	 */
@@ -73,6 +76,11 @@ public interface IApiToolsConstants {
 	public static final String IMG_ELCL_REMOVE = "IMG_ELCL_REMOVE"; //$NON-NLS-1$
 	
 	/**
+	 * key for text edit image
+	 */
+	public static final String IMG_ELCL_TEXT_EDIT = "IMG_ELCL_TEXT_EDIT"; //$NON-NLS-1$
+	
+	/**
 	 * Key for API component image.
 	 */
 	public static final String IMG_OBJ_API_COMPONENT = "IMG_OBJ_API_COMPONENT"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsHelpContextIds.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsHelpContextIds.java
index 9d8b514..fd20819 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsHelpContextIds.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/IApiToolsHelpContextIds.java
@@ -10,16 +10,20 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.ui.internal;
 
-import org.eclipse.pde.api.tools.ui.internal.views.APIToolingView;
-import org.eclipse.pde.api.tools.ui.internal.wizards.ApiBaselineWizardPage;
-import org.eclipse.pde.api.tools.ui.internal.wizards.CompareToBaselineWizard;
 import org.eclipse.pde.api.tools.ui.internal.actions.ExportDialog;
 import org.eclipse.pde.api.tools.ui.internal.preferences.ApiBaselinePreferencePage;
 import org.eclipse.pde.api.tools.ui.internal.preferences.ApiErrorsWarningsPreferencePage;
 import org.eclipse.pde.api.tools.ui.internal.preferences.ProjectSelectionDialog;
 import org.eclipse.pde.api.tools.ui.internal.properties.ApiErrorsWarningsPropertyPage;
 import org.eclipse.pde.api.tools.ui.internal.properties.ApiFiltersPropertyPage;
+import org.eclipse.pde.api.tools.ui.internal.use.ArchivePatternPage;
+import org.eclipse.pde.api.tools.ui.internal.use.DescriptionPatternPage;
+import org.eclipse.pde.api.tools.ui.internal.use.PatternSelectionPage;
+import org.eclipse.pde.api.tools.ui.internal.use.ReportPatternPage;
+import org.eclipse.pde.api.tools.ui.internal.views.APIToolingView;
+import org.eclipse.pde.api.tools.ui.internal.wizards.ApiBaselineWizardPage;
 import org.eclipse.pde.api.tools.ui.internal.wizards.ApiToolingSetupWizardPage;
+import org.eclipse.pde.api.tools.ui.internal.wizards.CompareToBaselineWizard;
 /**
  * Listing of ids used a help context ids
  * @since 1.0.0
@@ -67,5 +71,26 @@ public interface IApiToolsHelpContextIds {
 	 * Constant representing the help id for the {@link ExportDialog}
 	 */
 	public static final String API_COMPARE_EXPORT_DIALOG = PREFIX + "api_compare_export_dialog"; //$NON-NLS-1$
+	/**
+	 * Constant representing the help id for the {@link ArchivePatternPage}
+	 */
+	public static final String APITOOLS_ARCHIVE_PATTERN_WIZARD_PAGE = PREFIX + "apitools_archive_pattern_wizard_page"; //$NON-NLS-1$
+	/**
+	 * Constant representing the help id for the {@link ReportPatternPage}
+	 */
+	public static final String APITOOLS_REPORT_PATTERN_WIZARD_PAGE = PREFIX + "apitools_report_pattern_wizard_page"; //$NON-NLS-1$
+	/**
+	 * Constant representing the help id for the {@link DescriptionPatternPage}
+	 */
+	public static final String APITOOLS_DESCRIPTION_PATTERN_WIZARD_PAGE = PREFIX + "apitools_description_pattern_wizard_page"; //$NON-NLS-1$
+	/**
+	 * Constant representing the help id for the {@link PatternSelectionPage}
+	 */
+	public static final String APITOOLS_PATTERN_SELECTION_WIZARD_PAGE = PREFIX + "apitools_pattern_selection_wizard_page"; //$NON-NLS-1$
+	
+	//LAUNCH CONFIGS
+	
+	public static final String API_USE_PATTERN_TAB = PREFIX + "api_use_pattern_tab"; //$NON-NLS-1$
+	public static final String API_USE_SCAN_TAB = PREFIX + "api_use_main_tab"; //$NON-NLS-1$
 	
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java
index ce172d7..e79ddd3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ActionMessages.java
@@ -20,10 +20,8 @@ public class ActionMessages extends NLS {
 	public static String ApiToolingSetupObjectContribution_0;
 	public static String SelectABaseline;
 	public static String SetAsDefault;
-	public static String EnterFileName;
 	public static String SelectFileName;
 	public static String Browse;
-	public static String ConvertToHtml;
 	public static String CompareDialogTitle;
 	public static String CompareDialogCollectingElementTaskName;
 	public static String CompareDialogComputeDeltasTaskName;
@@ -42,10 +40,9 @@ public class ActionMessages extends NLS {
 	public static String SelectSessionAction_label;
 	public static String SelectSessionAction_tooltip;
 	public static String SelectSessionActionEntry_label;
-	public static String DeltaDetailsDialogTitle;
+	public static String ExportSessionAction_failed_to_create_parent_folders;
 	public static String ExportSessionAction_label;
 	public static String ExportSessionAction_tooltip;
-	public static String EnterFileNameForExport;
 	public static String ExportActionTitle;
 	public static String ExportDialogDescription;
 	public static String PropertyPackageVisibility;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java
index 622ed68..c932c32 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/DeltaSession.java
@@ -19,6 +19,7 @@ import java.util.Map;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jdt.core.Flags;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
 import org.eclipse.pde.api.tools.internal.provisional.ISession;
 import org.eclipse.pde.api.tools.internal.provisional.ITreeModel;
@@ -435,7 +436,7 @@ public class DeltaSession implements ISession {
 					if (apiComponent != null && (kind == IDelta.REMOVED)) {
 						// need to handle reexported types
 						IApiTypeRoot typeRoot = null;
-						String id = apiComponent.getId();
+						String id = apiComponent.getSymbolicName();
 						switch(delta.getFlags()) {
 							case IDelta.REEXPORTED_TYPE :
 							case IDelta.REEXPORTED_API_TYPE :
@@ -451,7 +452,7 @@ public class DeltaSession implements ISession {
 								while (typeRoot == null && index < providers.length) {
 									IApiComponent p = providers[index];
 									if (!p.equals(apiComponent)) {
-										String id2 = p.getId();
+										String id2 = p.getSymbolicName();
 										if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
 											typeRoot = p.findTypeRoot(typeName);
 										} else {
@@ -470,7 +471,9 @@ public class DeltaSession implements ISession {
 						}
 						if (typeRoot != null) {
 							IApiType structure = typeRoot.getStructure();
-							modifiers = structure.getModifiers();
+							if(structure != null) {
+								modifiers = structure.getModifiers();
+							}
 						}
 					}
 				}
@@ -481,7 +484,7 @@ public class DeltaSession implements ISession {
 						IApiComponent apiComponent = baseline.getApiComponent(componentID);
 						if (apiComponent != null) {
 							IApiTypeRoot typeRoot = null;
-							String id = apiComponent.getId();
+							String id = apiComponent.getSymbolicName();
 							switch(delta.getFlags()) {
 								case IDelta.REEXPORTED_TYPE :
 								case IDelta.REEXPORTED_API_TYPE :
@@ -497,7 +500,7 @@ public class DeltaSession implements ISession {
 									while (typeRoot == null && index < providers.length) {
 										IApiComponent p = providers[index];
 										if (!p.equals(apiComponent)) {
-											String id2 = p.getId();
+											String id2 = p.getSymbolicName();
 											if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
 												typeRoot = p.findTypeRoot(typeName);
 											} else {
@@ -533,6 +536,6 @@ public class DeltaSession implements ISession {
 	}
 	
 	public String getDescription() {
-		return ActionMessages.bind(ActionMessages.SessionDescription, new String[] { this.timestamp, this.description });
+		return NLS.bind(ActionMessages.SessionDescription, new String[] { this.timestamp, this.description });
 	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportSessionAction.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportSessionAction.java
index d6e3944..4ff833b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportSessionAction.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/ExportSessionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ import org.eclipse.pde.api.tools.ui.internal.views.APIToolingView;
  * Drop-down action to select the active session.
  */
 public class ExportSessionAction extends Action {
-	private static final String DELTAS_XSLT_TRANSFORM_PATH = "/xslt/compare.xsl"; //$NON-NLS-1$
+	private static final String DELTAS_XSLT_TRANSFORM_PATH = "/compare.xsl"; //$NON-NLS-1$
 	private static final String XML_FILE_EXTENSION = ".xml"; //$NON-NLS-1$
 	private static final String HTML_FILE_EXTENSION = ".html"; //$NON-NLS-1$
 	APIToolingView view;
@@ -93,16 +93,21 @@ public class ExportSessionAction extends Action {
 					File reportFile = new File(reportFileName);
 					try {
 						progress.worked(25);
-						Util.checkCanceled(progress);
+						Util.updateMonitor(progress);
 						BufferedWriter writer = null;
 						try {
 							if (isHtmlFile) {
-								xmlOutputFile = File.createTempFile(String.valueOf(System.currentTimeMillis()), XML_FILE_EXTENSION);
+								xmlOutputFile = Util.createTempFile(String.valueOf(System.currentTimeMillis()), XML_FILE_EXTENSION);
 							} else {
 								xmlOutputFile = reportFile;
 							}
 							if (xmlOutputFile.exists()) {
 								xmlOutputFile.delete();
+							} else {
+								File parent = xmlOutputFile.getParentFile();
+								if(!parent.exists() && !parent.mkdirs()) {
+									return new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, ActionMessages.ExportSessionAction_failed_to_create_parent_folders);
+								}
 							}
 							writer = new BufferedWriter(new FileWriter(xmlOutputFile));
 							DeltaXmlVisitor visitor = new DeltaXmlVisitor();
@@ -110,7 +115,7 @@ public class ExportSessionAction extends Action {
 							if (data instanceof IDelta) {
 								IDelta delta = (IDelta) data;
 								progress.worked(25);
-								Util.checkCanceled(progress);
+								Util.updateMonitor(progress);
 								delta.accept(visitor);
 								writer.write(visitor.getXML());
 								writer.flush();
@@ -131,11 +136,19 @@ public class ExportSessionAction extends Action {
 						}
 						if(isHtmlFile) {
 							// remaining part is to convert the xml file to html using XSLT
-							Util.checkCanceled(progress);
+							Util.updateMonitor(progress);
 							Source xmlSource = new StreamSource(xmlOutputFile);
 							InputStream stream = ApiPlugin.class.getResourceAsStream(DELTAS_XSLT_TRANSFORM_PATH);
 							Source xsltSource = new StreamSource(stream);
 							try {
+								if (reportFile.exists()) {
+									reportFile.delete();
+								} else {
+									File parent = reportFile.getParentFile();
+									if(!parent.exists() && !parent.mkdirs()) {
+										return new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, ActionMessages.ExportSessionAction_failed_to_create_parent_folders);
+									}
+								}
 								writer = new BufferedWriter(new FileWriter(reportFile));
 								Result result = new StreamResult(writer);
 								// create an instance of TransformerFactory
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties
index dd183b6..11ae231 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/actions/actionmessages.properties
@@ -11,10 +11,8 @@
 ApiToolingSetupObjectContribution_0=Set up API tooling
 SelectABaseline=&Baseline:
 SetAsDefault={0} (default)
-EnterFileName=Report &location:
 SelectFileName=Select a report location
 Browse=Bro&wse...
-ConvertToHtml=Con&vert to html
 CompareDialogTitle=Compare With Baseline
 CompareDialogCollectingElementTaskName=Collecting elements to compare
 CompareDialogComputeDeltasTaskName=Computing deltas...
@@ -35,10 +33,9 @@ SelectSessionAction_tooltip=Select Session
 # {0} int value
 # {1} timestamp
 SelectSessionActionEntry_label=Session {0} ({1})
-DeltaDetailsDialogTitle=Delta Details
+ExportSessionAction_failed_to_create_parent_folders=Failed to create report directory structure.
 ExportSessionAction_label=Export Session
 ExportSessionAction_tooltip=Export Session
-EnterFileNameForExport=Enter a file name for export:
 ExportActionTitle=Export Active Session
 
 PropertyMessageKey=localized message
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
index fa69a9a..1063bb4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/completion/APIToolsJavadocCompletionProposalComputer.java
@@ -65,7 +65,7 @@ public class APIToolsJavadocCompletionProposalComputer implements IJavaCompletio
 	private String fErrorMessage = null;
 	private Image fImageHandle = null;
 	private ASTParser fParser = null;
-	private HashSet fExistingTags = null;
+	HashSet fExistingTags = null;
 	
 	/**
 	 * Collects all of the existing API Tools Javadoc tags form a given Javadoc node
@@ -230,11 +230,12 @@ public class APIToolsJavadocCompletionProposalComputer implements IJavaCompletio
 	 * @throws JavaModelException
 	 */
 	private int getType(IJavaElement element) throws JavaModelException {
-		while (element != null && element.getElementType() != IJavaElement.TYPE) {
-			element = element.getParent();
+		IJavaElement lelement = element;
+		while (lelement != null && lelement.getElementType() != IJavaElement.TYPE) {
+			lelement = lelement.getParent();
 		}
-		if (element instanceof IType) {
-			IType type = (IType) element;
+		if (lelement instanceof IType) {
+			IType type = (IType) lelement;
 			if(type.isAnnotation()) {
 				return IApiJavadocTag.TYPE_ANNOTATION;
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagOperation.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagOperation.java
deleted file mode 100644
index 4a1f5f1..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagOperation.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.ui.internal.markers;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.BodyDeclaration;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.Javadoc;
-import org.eclipse.jdt.core.dom.TagElement;
-import org.eclipse.jdt.core.dom.TextElement;
-import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
-import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.pde.api.tools.internal.ApiJavadocTag;
-import org.eclipse.pde.api.tools.internal.JavadocTagManager;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.IApiJavadocTag;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.ui.PartInitException;
-
-/**
- * Operation to add a no reference tag to a member (method or field)
- * 
- * @since 1.0.0
- */
-public class AddNoReferenceTagOperation extends JavadocTagOperation {
-
-	/**
-	 * Constructor
-	 * @param marker
-	 */
-	public AddNoReferenceTagOperation(IMarker marker) {
-		super(marker);
-	}
-	
-	/**
-	 * Runs the operation
-	 * @param monitor
-	 */
-	public void run(IProgressMonitor monitor) {
-		if(monitor != null && monitor.isCanceled()) {
-			return;
-		}
-		IProgressMonitor localMonitor = SubMonitor.convert(monitor, MarkerMessages.RemoveUnsupportedTagOperation_removeing_unsupported_tag, 5);
-		// retrieve the AST node compilation unit
-		IResource resource = getMarker().getResource();
-		IJavaElement javaElement = JavaCore.create(resource);
-		try {
-			if (javaElement != null && javaElement.getElementType() == IJavaElement.COMPILATION_UNIT) {
-				ICompilationUnit cunit = (ICompilationUnit) javaElement;
-				if (!cunit.isWorkingCopy()) {
-					// open an editor of the corresponding unit to "show" the quick-fix change
-					JavaUI.openInEditor(cunit);
-				}
-				updateMonitor(localMonitor, 1);
-				int focalpos = getFocalPosition();
-				final CompilationUnit unit = createAST(cunit);
-				NodeFinder finder = new NodeFinder(focalpos);
-				unit.accept(finder);
-				updateMonitor(localMonitor, 1);
-				BodyDeclaration node = finder.getNode();
-				if (node != null) {
-					JavadocTagManager jtm = ApiPlugin.getJavadocTagManager();
-					ApiJavadocTag tag = (ApiJavadocTag) jtm.getTag(IApiJavadocTag.NO_REFERENCE_TAG_ID);
-					if(tag == null) {
-						return;
-					}
-					unit.recordModifications();
-					AST ast = unit.getAST();
-					ASTRewrite rewrite = ASTRewrite.create(ast);
-					Javadoc docnode = node.getJavadoc();
-					if (docnode == null) {
-						docnode = ast.newJavadoc();
-						//we do not want to create a new empty Javadoc node in
-						//the AST if there are no missing tags
-						rewrite.set(node, node.getJavadocProperty(), docnode, null);
-					}  
-					ListRewrite lrewrite = rewrite.getListRewrite(docnode, Javadoc.TAGS_PROPERTY);
-					// check the existing tags list
-					TagElement newtag = ast.newTagElement();
-					newtag.setTagName(tag.getTagName());
-					TextElement textElement = ast.newTextElement();
-					textElement.setText(tag.getTagComment(getParentKind(node), isConstructor(node) ? IApiJavadocTag.MEMBER_CONSTRUCTOR : IApiJavadocTag.MEMBER_METHOD));
-					newtag.fragments().add(textElement);
-					lrewrite.insertLast(newtag, null);
-					try {
-						TextEdit edit = rewrite.rewriteAST();
-						cunit.applyTextEdit(edit, monitor);
-						updateMonitor(localMonitor, 1);
-					}
-					finally {
-						cunit.reconcile(ICompilationUnit.NO_AST, false, null, null);
-						localMonitor.done();
-					}
-				}
-			}
-		}
-		catch(JavaModelException jme) {} 
-		catch (PartInitException e) {}
-	}
-	
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagResolution.java
deleted file mode 100644
index 5823369..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/AddNoReferenceTagResolution.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.ui.internal.markers;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.ui.ISharedImages;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * Marker resolution for adding an @noreference tag to a method that leaks a 
- * non-API type via a parameter
- */
-public class AddNoReferenceTagResolution implements IMarkerResolution2 {
-
-	private IMarker fBackingMarker = null;
-	
-	/**
-	 * Constructor
-	 * @param marker
-	 */
-	public AddNoReferenceTagResolution(IMarker marker) {
-		fBackingMarker = marker;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IMarkerResolution2#getDescription()
-	 */
-	public String getDescription() {
-		return getLabel();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IMarkerResolution2#getImage()
-	 */
-	public Image getImage() {
-		return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_JAVADOCTAG);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IMarkerResolution#getLabel()
-	 */
-	public String getLabel() {
-		try {
-			String arg = (String) fBackingMarker.getAttribute(IApiMarkerConstants.MARKER_ATTR_MESSAGE_ARGUMENTS);
-			String[] args = arg.split("#"); //$NON-NLS-1$
-			return NLS.bind(MarkerMessages.AddNoReferenceTagResolution_add_noreference_tag, new String[] {args[2]});
-		} 
-		catch (CoreException e) {}
-		return null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.IMarkerResolution#run(org.eclipse.core.resources.IMarker)
-	 */
-	public void run(IMarker marker) {
-		UIJob job  = new UIJob(getLabel()) {
-			public IStatus runInUIThread(IProgressMonitor monitor) {
-				AddNoReferenceTagOperation op = new AddNoReferenceTagOperation(fBackingMarker);
-				op.run(monitor);
-				return Status.OK_STATUS;
-			}
-		};
-		job.setSystem(true);
-		job.schedule();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
index 5c672dd..ac7ac3d 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/ApiMarkerResolutionGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
-import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
@@ -51,32 +50,18 @@ public class ApiMarkerResolutionGenerator implements IMarkerResolutionGenerator2
 			return NO_RESOLUTIONS;
 		}
 		switch(marker.getAttribute(IApiMarkerConstants.API_MARKER_ATTR_ID, -1)) {
-			case IApiMarkerConstants.API_USAGE_MARKER_ID : {
-				int problemid = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, -1);
-				int flags  = ApiProblemFactory.getProblemFlags(problemid);
-				switch(ApiProblemFactory.getProblemKind(problemid)) {
-					case IApiProblem.API_LEAK: {
-						if(flags == IApiProblem.LEAK_METHOD_PARAMETER || 
-						 flags == IApiProblem.LEAK_CONSTRUCTOR_PARAMETER ||
-						 flags == IApiProblem.LEAK_RETURN_TYPE) {
-							return new IMarkerResolution[] {new FilterProblemResolution(marker), new AddNoReferenceTagResolution(marker)};
-						}
-						break;
-					}
-				}
-				return new IMarkerResolution[] {new FilterProblemResolution(marker)};
-			}
+			case IApiMarkerConstants.API_USAGE_MARKER_ID : 
 			case IApiMarkerConstants.COMPATIBILITY_MARKER_ID : {
-				return new IMarkerResolution[] {new FilterProblemResolution(marker)};
+				return new IMarkerResolution[] {new FilterProblemResolution(marker), new FilterProblemWithCommentResolution(marker)};
 			}
 			case IApiMarkerConstants.DEFAULT_API_BASELINE_MARKER_ID : {
 				return new IMarkerResolution[] {new DefaultApiProfileResolution()};
 			}
 			case IApiMarkerConstants.SINCE_TAG_MARKER_ID : {
-				return new IMarkerResolution[] {new SinceTagResolution(marker), new FilterProblemResolution(marker)};
+				return new IMarkerResolution[] {new SinceTagResolution(marker), new FilterProblemResolution(marker), new FilterProblemWithCommentResolution(marker)};
 			}
 			case IApiMarkerConstants.VERSION_NUMBERING_MARKER_ID : {
-				return new IMarkerResolution[] {new VersionNumberingResolution(marker), new FilterProblemResolution(marker)};
+				return new IMarkerResolution[] {new VersionNumberingResolution(marker), new FilterProblemResolution(marker), new FilterProblemWithCommentResolution(marker)};
 			}
 			case IApiMarkerConstants.UNSUPPORTED_TAG_MARKER_ID: {
 				return new IMarkerResolution[] {new UnsupportedTagResolution(marker)};
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/CreateApiFilterOperation.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/CreateApiFilterOperation.java
index f03b310..6a77bcc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/CreateApiFilterOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/CreateApiFilterOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.Set;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
@@ -25,14 +24,18 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
+import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.progress.UIJob;
 
 /**
@@ -47,6 +50,7 @@ import org.eclipse.ui.progress.UIJob;
 public class CreateApiFilterOperation extends UIJob {
 
 	private IMarker[] fMarkers = null;
+	private boolean fAddingComment = false;
 	
 	/**
 	 * Constructor
@@ -55,9 +59,10 @@ public class CreateApiFilterOperation extends UIJob {
 	 * 
 	 * @see IApiProblemFilter#getKinds()
 	 */
-	public CreateApiFilterOperation(IMarker[] markers) {
+	public CreateApiFilterOperation(IMarker[] markers, boolean addingcomments) {
 		super(MarkerMessages.CreateApiFilterOperation_0);
 		fMarkers = markers;
+		this.fAddingComment = addingcomments;
 	}
 
 	/* (non-Javadoc)
@@ -68,10 +73,25 @@ public class CreateApiFilterOperation extends UIJob {
 			HashMap map = new HashMap(fMarkers.length);
 			IResource resource = null;
 			IProject project = null;
-			
+			String comment = null;
+			HashSet projects = new HashSet();
+			if(fAddingComment) {
+				InputDialog dialog = new InputDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), 
+						MarkerMessages.CreateApiFilterOperation_add_filter_comment, 
+						MarkerMessages.CreateApiFilterOperation_filter_comment, 
+						null, 
+						null);
+				if(dialog.open() == IDialogConstants.OK_ID) {
+					comment = dialog.getValue();
+					if(comment != null && comment.length() < 1) {
+						comment = null;
+					}
+				}
+			}
 			IMarker marker = null;
 			IApiProblem problem = null;
-			HashSet problems = null;
+			HashSet filters = null;
+			IApiComponent component = null;
 			for (int i = 0; i < fMarkers.length; i++) {
 				marker = fMarkers[i];
 				resource = marker.getResource();
@@ -79,10 +99,15 @@ public class CreateApiFilterOperation extends UIJob {
 				if(project == null) {
 					return Status.CANCEL_STATUS;
 				}
-				problems = (HashSet) map.get(project);
-				if(problems == null) {
-					problems = new HashSet();
-					map.put(project, problems);
+				component = ApiPlugin.getDefault().getApiBaselineManager().getWorkspaceBaseline().getApiComponent(project);
+				if(component == null) {
+					return Status.CANCEL_STATUS;
+				}
+				projects.add(project);
+				filters = (HashSet) map.get(component);
+				if(filters == null) {
+					filters = new HashSet();
+					map.put(component, filters);
 				}
 				String typeNameFromMarker = Util.getTypeNameFromMarker(marker);
 				problem = ApiProblemFactory.newApiProblem(resource.getProjectRelativePath().toPortableString(),
@@ -94,27 +119,20 @@ public class CreateApiFilterOperation extends UIJob {
 						marker.getAttribute(IMarker.CHAR_START, -1),
 						marker.getAttribute(IMarker.CHAR_END, -1), 
 						marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0));
-				problems.add(problem);
+				filters.add(ApiProblemFactory.newProblemFilter(component.getSymbolicName(), problem, comment));
 				Util.touchCorrespondingResource(project, resource, typeNameFromMarker);
-				
 			}
-			IApiComponent component = null;
-			Set pjs = map.keySet();
-			for (Iterator iter = pjs.iterator(); iter.hasNext();) {
-				project = (IProject) iter.next();
-				component = ApiPlugin.getDefault().getApiBaselineManager().getWorkspaceBaseline().getApiComponent(project);
-				if(component == null) {
-					return Status.CANCEL_STATUS;
-				}
+			for (Iterator iter = map.keySet().iterator(); iter.hasNext();) {
+				component = (IApiComponent) iter.next();
 				IApiFilterStore store = component.getFilterStore();
-				problems = (HashSet) map.get(project);
-				if(problems == null) {
+				filters = (HashSet) map.get(component);
+				if(filters == null) {
 					continue;
 				}
-				store.addFiltersFor((IApiProblem[]) problems.toArray(new IApiProblem[problems.size()]));
+				store.addFilters((IApiProblemFilter[]) filters.toArray(new IApiProblemFilter[filters.size()]));
 			}
 			if(!ResourcesPlugin.getWorkspace().isAutoBuilding()) {
-				Util.getBuildJob((IProject[]) pjs.toArray(new IProject[pjs.size()]), IncrementalProjectBuilder.INCREMENTAL_BUILD).schedule();
+				Util.getBuildJob((IProject[]) projects.toArray(new IProject[projects.size()]), IncrementalProjectBuilder.INCREMENTAL_BUILD).schedule();
 			}
 			return Status.OK_STATUS;
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemResolution.java
index f84b614..3c1069c 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,7 +154,7 @@ public class FilterProblemResolution extends WorkbenchMarkerResolution {
 	 * @see org.eclipse.ui.views.markers.WorkbenchMarkerResolution#run(org.eclipse.core.resources.IMarker[], org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public void run(IMarker[] markers, IProgressMonitor monitor) {
-		CreateApiFilterOperation op = new CreateApiFilterOperation(markers);
+		CreateApiFilterOperation op = new CreateApiFilterOperation(markers, false);
 		op.setSystem(true);
 		op.schedule();
 	}
@@ -172,9 +172,15 @@ public class FilterProblemResolution extends WorkbenchMarkerResolution {
 	public IMarker[] findOtherMarkers(IMarker[] markers) {
 		HashSet mset = new HashSet(markers.length);
 		for (int i = 0; i < markers.length; i++) {
-			if(Util.isApiProblemMarker(markers[i]) &&
-					!fBackingMarker.equals(markers[i])) {
-				mset.add(markers[i]);
+			try {
+				if(Util.isApiProblemMarker(markers[i]) &&
+						!fBackingMarker.equals(markers[i]) &&
+						!markers[i].getType().equals(IApiMarkerConstants.UNUSED_FILTER_PROBLEM_MARKER)) {
+					mset.add(markers[i]);
+				}
+			}
+			catch(CoreException ce) {
+				//do nothing just don't add the filter
 			}
 		}
 		int size = mset.size();
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemWithCommentResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemWithCommentResolution.java
new file mode 100644
index 0000000..9d4c1c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/FilterProblemWithCommentResolution.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.markers;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.ui.JavaElementLabels;
+import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
+
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Problem resolution that creates an {@link IApiProblemFilter} with a comment
+ * 
+ * @since 1.1
+ */
+public class FilterProblemWithCommentResolution extends FilterProblemResolution {
+
+	/**
+	 * Constructor
+	 * @param marker
+	 */
+	public FilterProblemWithCommentResolution(IMarker marker) {
+		super(marker);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.markers.FilterProblemResolution#getLabel()
+	 */
+	public String getLabel() {
+		if(plural) {
+			return MarkerMessages.FilterProblemWithCommentResolution_create_commented_filters;
+		}
+		else {
+			IJavaElement element = resolveElementFromMarker();
+			if(element != null) {
+				return MessageFormat.format(MarkerMessages.FilterProblemWithCommentResolution_create_commented_filter, new String[] {JavaElementLabels.getTextLabel(element, JavaElementLabels.M_PARAMETER_TYPES), resolveCategoryName()});
+			}
+			else {
+				IResource res = fBackingMarker.getResource();
+				return MessageFormat.format(MarkerMessages.FilterProblemWithCommentResolution_create_commented_filter, new String[] {res.getFullPath().removeFileExtension().lastSegment(), resolveCategoryName()});
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.markers.FilterProblemResolution#run(org.eclipse.core.resources.IMarker[], org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void run(IMarker[] markers, IProgressMonitor monitor) {
+		CreateApiFilterOperation op = new CreateApiFilterOperation(markers, true);
+		op.setSystem(true);
+		op.schedule();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
index 9f2fbbb..b1cd2b8 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/MarkerMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,9 +16,10 @@ import org.eclipse.osgi.util.NLS;
  */
 public class MarkerMessages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.ui.internal.markers.markermessages"; //$NON-NLS-1$
-	public static String AddNoReferenceTagResolution_add_noreference_tag;
 	public static String ApiMarkerResolutionGenerator_api_problem_filters;
 	public static String CreateApiFilterOperation_0;
+	public static String CreateApiFilterOperation_add_filter_comment;
+	public static String CreateApiFilterOperation_filter_comment;
 	public static String DefaultApiProfileResolution_0;
 	public static String DefaultApiProfileResolution_1;
 	public static String DefaultApiProfileResolution_2;
@@ -31,6 +32,8 @@ public class MarkerMessages extends NLS {
 	public static String FilterProblemResolution_usage;
 	public static String FilterProblemResolution_version_number;
 	public static String FilterProblemResolution_api_component;
+	public static String FilterProblemWithCommentResolution_create_commented_filter;
+	public static String FilterProblemWithCommentResolution_create_commented_filters;
 	public static String OpenPropertyPageResolution_element_cannot_be_null;
 	public static String OpenPropertyPageResolution_open_the_property_page;
 	public static String OpenPropertyPageResolution_opening_property_page_job_name;
@@ -38,7 +41,6 @@ public class MarkerMessages extends NLS {
 	public static String OpenPropertyPageResolution_page_id_cannot_be_null;
 	public static String OpenPropertyPageResolution_the_page_name_cannot_be_null;
 	public static String RemoveFilterProblemResolution_remove_unused_filter;
-	public static String RemoveFilterProblemResolution_remove_unused_filter_job_name;
 	public static String RemoveFilterProblemResolution_remove_unused_filters;
 	public static String RemoveFilterProblemResolution_removes_selected_problem_filter;
 	public static String RemoveUnsupportedTagOperation_removeing_unsupported_tag;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/OpenPropertyPageResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/OpenPropertyPageResolution.java
index 879c1d1..01f617e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/OpenPropertyPageResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/OpenPropertyPageResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,12 +40,12 @@ public class OpenPropertyPageResolution implements IMarkerResolution2 {
 	/**
 	 * The id of the property page to open
 	 */
-	private String fPageId = null;
+	String fPageId = null;
 	
 	/**
 	 * The element the page is to be opened on
 	 */
-	private IAdaptable fElement = null;
+	IAdaptable fElement = null;
 	
 	/**
 	 * Constructor
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/RemoveFilterProblemResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/RemoveFilterProblemResolution.java
index dd21e4e..7ee88c2 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/RemoveFilterProblemResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/RemoveFilterProblemResolution.java
@@ -10,7 +10,10 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.ui.internal.markers;
 
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map.Entry;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
@@ -22,7 +25,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
@@ -88,39 +91,62 @@ public class RemoveFilterProblemResolution extends WorkbenchMarkerResolution {
 	 * @see org.eclipse.ui.views.markers.WorkbenchMarkerResolution#run(org.eclipse.core.resources.IMarker[], org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public void run(IMarker[] markers, IProgressMonitor monitor) {
-		SubMonitor localmonitor = SubMonitor.convert(monitor, getLabel(), markers.length);
+		SubMonitor localmonitor = SubMonitor.convert(monitor, getLabel(), (markers.length*2)+1);
 		try {
-			HashSet pjs = new HashSet(markers.length);
 			IApiProblemFilter filter = fFilter;
 			IApiComponent component = null;
+			HashMap map = new HashMap();
+			HashSet filters = null;
+			HashSet resources = new HashSet(markers.length);
+			IResource resource = null;
+			//collate the filters by IApiComponent
 			for (int i = 0; i < markers.length; i++) {
-				if(!fMarker.equals(markers[i])) {
-					filter = ApiMarkerResolutionGenerator.resolveFilter(markers[i]);
-				}
+				Util.updateMonitor(localmonitor, 1);
+				filter = ApiMarkerResolutionGenerator.resolveFilter(markers[i]);
 				if(filter == null) {
-					localmonitor.worked(1);
 					continue;
 				}
-				IResource resource = markers[i].getResource();
-				IProject project = resource.getProject();
-				component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(project);
-				if(component instanceof PluginProjectApiComponent) {
-					try {
-						IApiFilterStore store = component.getFilterStore();
-						store.removeFilters(new IApiProblemFilter[] {filter});
-						Util.touchCorrespondingResource(project, resource, Util.getTypeNameFromMarker(markers[i]));
-						pjs.add(project);
-					}
-					catch(CoreException ce) {
-						ApiPlugin.log(ce);
+				resource = markers[i].getResource();
+				component = ApiBaselineManager.getManager().getWorkspaceBaseline().getApiComponent(resource.getProject());
+				if(component instanceof ProjectComponent) {
+					filters = (HashSet) map.get(component);
+					if(filters == null) {
+						filters = new HashSet();
+						map.put(component, filters);
 					}
+					filters.add(filter);
+					resources.add(resource);
+				}
+			}
+			//batch remove the filters
+			localmonitor.setWorkRemaining(map.size());
+			Entry entry = null;
+			for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
+				try {
+					entry = (Entry) iter.next();
+					component = (IApiComponent) entry.getKey();
+					filters = (HashSet) entry.getValue();
+					IApiFilterStore store = component.getFilterStore();
+					store.removeFilters((IApiProblemFilter[]) filters.toArray(new IApiProblemFilter[filters.size()]));
+				}
+				catch(CoreException ce) {
+					ApiPlugin.log(ce);
+				}
+				Util.updateMonitor(localmonitor, 1);
+			}	
+			//touch resources to mark them as needing build
+			HashSet pjs = new HashSet();
+			for (Iterator iter = resources.iterator(); iter.hasNext();) {
+				try {
+					resource = (IResource) iter.next();
+					pjs.add(resource.getProject());
+					(resource).touch(localmonitor.newChild(1));
 				}
-				localmonitor.worked(1);
+				catch(CoreException ce) {}
 			}
-			//build affected projects
 			if(pjs.size() > 0) {
 				if(!ResourcesPlugin.getWorkspace().isAutoBuilding()) {
-					IProject[] projects = (IProject[]) pjs.toArray(new IProject[pjs.size()]);
+					IProject[] projects = (IProject[]) pjs.toArray(new IProject[map.size()]);
 					Util.getBuildJob(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD).schedule();
 				}
 			}
@@ -144,7 +170,7 @@ public class RemoveFilterProblemResolution extends WorkbenchMarkerResolution {
 		HashSet mset = new HashSet(markers.length);
 		for (int i = 0; i < markers.length; i++) {
 			try {
-				if(markers[i].getType() == IApiMarkerConstants.UNUSED_FILTER_PROBLEM_MARKER &&
+				if(markers[i].getType().equals(IApiMarkerConstants.UNUSED_FILTER_PROBLEM_MARKER) &&
 						!fMarker.equals(markers[i])) {
 					mset.add(markers[i]);
 				}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/SinceTagResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/SinceTagResolution.java
index 6c64fdb..b2a8fbd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/SinceTagResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/SinceTagResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.ui.progress.UIJob;
  * @since 1.0.0
  */
 public class SinceTagResolution implements IMarkerResolution2 {
-	private int kind;
-	private String newVersionValue;
+	int kind;
+	String newVersionValue;
 	
 	public SinceTagResolution(IMarker marker) {
 		this.kind = ApiProblemFactory.getProblemKind(marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0));
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateProjectSettingsOperation.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateProjectSettingsOperation.java
index 0ccbfc3..57aaeb1 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateProjectSettingsOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/UpdateProjectSettingsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes;
@@ -47,7 +48,7 @@ public class UpdateProjectSettingsOperation extends UIJob {
 	 * @see IApiProblemFilter#getKinds()
 	 */
 	public UpdateProjectSettingsOperation(IMarker marker) {
-		super(MarkerMessages.bind(MarkerMessages.UpdateProjectSettingsOperation_0, PreferenceMessages.ReportApiComponentResolutionFailureDescription));
+		super(NLS.bind(MarkerMessages.UpdateProjectSettingsOperation_0, PreferenceMessages.ReportApiComponentResolutionFailureDescription));
 		fBackingMarker = marker;
 	}
 
@@ -59,7 +60,7 @@ public class UpdateProjectSettingsOperation extends UIJob {
 		if (notNull && monitor.isCanceled()) return Status.CANCEL_STATUS;
 		if (notNull) {
 			monitor.beginTask(
-					MarkerMessages.bind(MarkerMessages.UpdateProjectSettingsOperation_title, PreferenceMessages.ReportApiComponentResolutionFailureDescription),
+					NLS.bind(MarkerMessages.UpdateProjectSettingsOperation_title, PreferenceMessages.ReportApiComponentResolutionFailureDescription),
 					3);
 		}
 		try{
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java
index 5b644d4..d0d4259 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/VersionNumberingResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ import org.eclipse.ui.progress.UIJob;
  * @since 1.0.0
  */
 public class VersionNumberingResolution implements IMarkerResolution2 {
-	private String newVersionValue;
+	String newVersionValue;
 	// major or minor version
 	private int kind;
 	private String description;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
index 8cbd979..1a1aabc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/markers/markermessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,9 +8,10 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-AddNoReferenceTagResolution_add_noreference_tag=Add @noreference tag to {0}
 ApiMarkerResolutionGenerator_api_problem_filters=API Problem Filters
 CreateApiFilterOperation_0=Create new API problem filter
+CreateApiFilterOperation_add_filter_comment=Add Filter Comment
+CreateApiFilterOperation_filter_comment=&Filter comment:
 DefaultApiProfileResolution_0=Navigates users to the profiles preference page to select or create an API baseline
 DefaultApiProfileResolution_1=Select or create an API baseline
 DefaultApiProfileResolution_2=Fixing API baseline
@@ -23,6 +24,8 @@ FilterProblemResolution_api_component=API component
 FilterProblemResolution_since_tag=since tag
 FilterProblemResolution_usage=usage
 FilterProblemResolution_version_number=version number
+FilterProblemWithCommentResolution_create_commented_filter=Create a commented {1} problem filter for ''{0}''
+FilterProblemWithCommentResolution_create_commented_filters=Create commented filters for the selected problems
 OpenPropertyPageResolution_element_cannot_be_null=The given element cannot be null
 OpenPropertyPageResolution_open_the_property_page=Open the {0} property page
 OpenPropertyPageResolution_opening_property_page_job_name=Opening property page
@@ -30,7 +33,6 @@ OpenPropertyPageResolution_opens_the_property_page=Opens the {0} property page
 OpenPropertyPageResolution_page_id_cannot_be_null=The given page id cannot be null
 OpenPropertyPageResolution_the_page_name_cannot_be_null=The name for the page cannot be null
 RemoveFilterProblemResolution_remove_unused_filter=Remove unused problem filter
-RemoveFilterProblemResolution_remove_unused_filter_job_name=Remove unused API problem filter
 RemoveFilterProblemResolution_remove_unused_filters=Remove unused problem filters
 RemoveFilterProblemResolution_removes_selected_problem_filter=Removes the unused API problem filter for: {0}
 RemoveUnsupportedTagOperation_removeing_unsupported_tag=Removing Unsupported API Javadoc tag
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
index 3568407..6b2c805 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinePreferencePage.java
@@ -79,19 +79,23 @@ public class ApiBaselinePreferencePage extends PreferencePage implements
 		}
 	}
 
-	private IApiBaselineManager manager = ApiPlugin.getDefault()
+	IApiBaselineManager manager = ApiPlugin.getDefault()
 			.getApiBaselineManager();
 
 	private static HashSet removed = new HashSet(8);
-	private CheckboxTableViewer tableviewer = null;
-	private ArrayList backingcollection = new ArrayList(8);
-	private String newdefault = null;
-	private Button newbutton = null, removebutton = null, editbutton = null;
+	CheckboxTableViewer tableviewer = null;
+	ArrayList backingcollection = new ArrayList(8);
+	String newdefault = null;
+	private Button newbutton = null;
+
+	Button removebutton = null;
+
+	Button editbutton = null;
 	protected static int rebuildcount = 0;
-	private String origdefault = null;
-	private boolean dirty = false;
+	String origdefault = null;
+	boolean dirty = false;
 	private boolean defaultcontentchanged = false;
-	private boolean defaultchanged = false;
+	boolean defaultchanged = false;
 
 	/**
 	 * The main configuration block for the page
@@ -214,11 +218,10 @@ public class ApiBaselinePreferencePage extends PreferencePage implements
 			tableviewer.setCheckedElements(new Object[] {baseline});
 		}
 		origdefault = newdefault = (baseline == null ? null : baseline.getName());
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IApiToolsHelpContextIds.APIBASELINE_PREF_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IApiToolsHelpContextIds.APIBASELINE_PREF_PAGE);
 
 		block = new ApiBaselinesConfigurationBlock((IWorkbenchPreferenceContainer)getContainer());
 		block.createControl(comp, this);
-		SWTFactory.createVerticalSpacer(parent, 1);
 		Dialog.applyDialogFont(comp);
 		return comp;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
index 8756a79..65203d3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiBaselinesConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public class ApiBaselinesConfigurationBlock {
 	 * Provides data information for created controls
 	 */
 	protected static class ControlData {
-		private Key key;
+		Key key;
 		private String[] values;
 		
 		/**
@@ -235,12 +235,12 @@ public class ApiBaselinesConfigurationBlock {
 	/**
 	 * The context of settings locations to search for values in
 	 */
-	private IScopeContext[] fLookupOrder = null;
+	IScopeContext[] fLookupOrder = null;
 	
 	/**
 	 * the working copy manager to work with settings
 	 */
-	private IWorkingCopyManager fManager = null;
+	IWorkingCopyManager fManager = null;
 	
 	/**
 	 * The main composite for the configuration block, used for enabling/disabling the block 
@@ -256,7 +256,7 @@ public class ApiBaselinesConfigurationBlock {
 	/**
 	 * Flag used to know if the page needs saving or not
 	 */
-	private boolean fDirty = false;
+	boolean fDirty = false;
 	
 	/**
 	 * The parent this block has been added to 
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java
index a5d09c2..83b9421 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -409,20 +409,28 @@ public class ApiErrorsWarningsConfigurationBlock {
 
 	private static final Key KEY_REPORT_RESOLUTION_ERRORS_API_COMPONENT = 
 		getApiToolsKey(IApiProblemTypes.REPORT_RESOLUTION_ERRORS_API_COMPONENT);
+	/**
+	 * @since 1.1
+	 */
+	private static final Key KEY_AUTOMATICALLY_REMOVE_PROBLEM_FILTERS = 
+		getApiToolsKey(IApiProblemTypes.AUTOMATICALLY_REMOVE_UNUSED_PROBLEM_FILTERS);
 
 	private static final int API_SCANNING_USAGE_PAGE_ID = 0;
 	private static final int COMPATIBILITY_PAGE_ID = 1;
 	private static final int VERSION_MANAGEMENT_PAGE_ID = 2;
 	private static final int API_COMPONENT_RESOLUTION_PAGE_ID = 3;
 
-	private static Key[] fgAllApiComponentResolutionKeys = {
+	static Key[] fgAllApiComponentResolutionKeys = {
 		KEY_REPORT_RESOLUTION_ERRORS_API_COMPONENT,
-		KEY_UNUSED_PROBLEM_FILTERS
+		KEY_UNUSED_PROBLEM_FILTERS,
+		KEY_AUTOMATICALLY_REMOVE_PROBLEM_FILTERS
 	};
 
-	private static Key[] fgAllCompatibilityKeys = {
+	static Key[] fgAllCompatibilityKeys = {
 		KEY_API_COMPONENT_REMOVED_API_TYPE,
 		KEY_API_COMPONENT_REMOVED_TYPE,
+		KEY_API_COMPONENT_REMOVED_REEXPORTED_API_TYPE,
+		KEY_API_COMPONENT_REMOVED_REEXPORTED_TYPE,
 		KEY_ANNOTATION_REMOVED_FIELD,
 		KEY_ANNOTATION_REMOVED_METHOD,
 		KEY_ANNOTATION_REMOVED_TYPE_MEMBER,
@@ -491,7 +499,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 		KEY_TYPE_PARAMETER_REMOVED_INTERFACE_BOUND,
 	};
 
-	private static Key[] fgAllApiScanningKeys = {
+	static Key[] fgAllApiScanningKeys = {
 		KEY_NOIMPLEMENT,
 		KEY_NOEXTEND,
 		KEY_NOREFERENCE,
@@ -506,7 +514,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 		KEY_INVALID_REFERENCE_IN_SYSTEM_LIBRARIES,
 	};
 
-	private static Key[] fgAllVersionManagementKeys = {
+	static Key[] fgAllVersionManagementKeys = {
 		KEY_MISSING_SINCE_TAG,
 		KEY_MALFORMED_SINCE_TAG,
 		KEY_INVALID_SINCE_TAG_VERSION,
@@ -532,6 +540,8 @@ public class ApiErrorsWarningsConfigurationBlock {
 		KEY_UNUSED_PROBLEM_FILTERS,
 		KEY_API_COMPONENT_REMOVED_API_TYPE,
 		KEY_API_COMPONENT_REMOVED_TYPE,
+		KEY_API_COMPONENT_REMOVED_REEXPORTED_API_TYPE,
+		KEY_API_COMPONENT_REMOVED_REEXPORTED_TYPE,
 		KEY_ANNOTATION_REMOVED_FIELD,
 		KEY_ANNOTATION_REMOVED_METHOD,
 		KEY_ANNOTATION_REMOVED_TYPE_MEMBER,
@@ -606,6 +616,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 		KEY_INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MAJOR_WITHOUT_BREAKING_CHANGE,
 		KEY_REPORT_API_BREAKAGE_WHEN_MAJOR_VERSION_INCREMENTED,
 		KEY_REPORT_RESOLUTION_ERRORS_API_COMPONENT,
+		KEY_AUTOMATICALLY_REMOVE_PROBLEM_FILTERS
 	};
 
 	/**
@@ -632,6 +643,15 @@ public class ApiErrorsWarningsConfigurationBlock {
 	};
 	
 	/**
+	 * Default value set for check box controls
+	 * @since 1.1
+	 */
+	private static final String[] CHECKBOX_VALUES = {
+		ApiPlugin.VALUE_ENABLED,
+		ApiPlugin.VALUE_DISABLED
+	};
+	
+	/**
 	 * Default selection listener for controls on the page
 	 */
 	private SelectionListener selectionlistener = new SelectionAdapter() {
@@ -890,7 +910,16 @@ public class ApiErrorsWarningsConfigurationBlock {
 		checkBox.setLayoutData(gd);
 		checkBox.addSelectionListener(this.selectionlistener);
 		
-		String currValue= key.getStoredValue(fLookupOrder, false, fManager);
+		String currValue = null;
+		//https://bugs.eclipse.org/bugs/show_bug.cgi?id=280619
+		//only look up the project and default scopes if the project
+		//already contains project-specific settings
+		if(hasProjectSpecificSettings(fProject)) {
+			currValue = key.getStoredValue(new IScopeContext[] {new ProjectScope(fProject), new DefaultScope()}, false, fManager);
+		}
+		else {
+			currValue = key.getStoredValue(fLookupOrder, false, fManager);
+		}
 		checkBox.setSelection(data.getSelection(currValue) == 0);
 		fCheckBoxes.add(checkBox);
 		return checkBox;
@@ -996,13 +1025,13 @@ public class ApiErrorsWarningsConfigurationBlock {
 					vcomp,
 					PreferenceMessages.VersionManagementReportInvalidApiComponentVersionIncludeMinorWithoutApiChange,
 					KEY_INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MINOR_WITHOUT_API_CHANGE,
-					new String[] { ApiPlugin.VALUE_DISABLED, ApiPlugin.VALUE_ENABLED },
+					CHECKBOX_VALUES,
 					2);
 				addCheckBox(
 					vcomp,
 					PreferenceMessages.VersionManagementReportInvalidApiComponentVersionIncludeMajorWithoutBreakingChange,
 					KEY_INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MAJOR_WITHOUT_BREAKING_CHANGE,
-					new String[] { ApiPlugin.VALUE_DISABLED, ApiPlugin.VALUE_ENABLED },
+					CHECKBOX_VALUES,
 					2);
 				break;
 			}
@@ -1011,13 +1040,18 @@ public class ApiErrorsWarningsConfigurationBlock {
 				initializeComboControls(vcomp,
 					new String[] {
 						PreferenceMessages.ReportApiComponentResolutionFailure,
-						PreferenceMessages.ApiErrorsWarningsConfigurationBlock_unused_problem_filters
+						PreferenceMessages.ApiErrorsWarningsConfigurationBlock_unused_problem_filters,
 					},
 					new Key[] {
 						KEY_REPORT_RESOLUTION_ERRORS_API_COMPONENT,
 						KEY_UNUSED_PROBLEM_FILTERS
 					}
 				);
+				addCheckBox(vcomp, 
+						PreferenceMessages.ApiErrorsWarningsConfigurationBlock_automatically_remove_problem_filters, 
+						KEY_AUTOMATICALLY_REMOVE_PROBLEM_FILTERS, 
+						CHECKBOX_VALUES, 
+						0);
 				break;
 			}
 			case COMPATIBILITY_PAGE_ID : {
@@ -1027,7 +1061,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 					vcomp,
 					PreferenceMessages.CompatibilityReportApiBreakageWhenMajorVersionIncremented,
 					KEY_REPORT_API_BREAKAGE_WHEN_MAJOR_VERSION_INCREMENTED,
-					new String[] { ApiPlugin.VALUE_ENABLED, ApiPlugin.VALUE_DISABLED },
+					CHECKBOX_VALUES,
 					2);
 				ScrolledComposite scomp = new ScrolledComposite(page, SWT.H_SCROLL | SWT.V_SCROLL);
 				scomp.setExpandHorizontal(true);
@@ -1365,7 +1399,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 	 * @param obj
 	 * @return
 	 */
-	private ScrolledComposite getScrollingParent(Object obj) {
+	ScrolledComposite getScrollingParent(Object obj) {
 		if(obj instanceof ExpandableComposite) {
 			ExpandableComposite ecomp = (ExpandableComposite) obj;
 			Composite parent = ecomp.getParent();
@@ -1385,7 +1419,7 @@ public class ApiErrorsWarningsConfigurationBlock {
 	/**
 	 * Handles one of the expandable composites being expanded 
 	 */
-	private void handleExpand(ScrolledComposite composite) {
+	void handleExpand(ScrolledComposite composite) {
 		if(composite == null) {
 			return;
 		}
@@ -1598,9 +1632,9 @@ public class ApiErrorsWarningsConfigurationBlock {
 	}
 	
 	/**
-	 * returns if this block has fProject specific settings
-	 * @param fProject
-	 * @return true if there are fProject specific settings, false otherwise
+	 * returns if this block has project specific settings
+	 * @param project
+	 * @return true if there are project specific settings, false otherwise
 	 */
 	public boolean hasProjectSpecificSettings(IProject project) {
 		if (project != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsPreferencePage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsPreferencePage.java
index 0491d60..2fba6bd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ApiErrorsWarningsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public class ApiErrorsWarningsPreferencePage extends PreferencePage implements I
 	/**
 	 * The main configuration block for the page
 	 */
-	private ApiErrorsWarningsConfigurationBlock block = null;
+	ApiErrorsWarningsConfigurationBlock block = null;
 	private Link link = null;
 	
 	private HashMap fPageData = null;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
index ea69b0c..a8b28ba 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/PreferenceMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ public class PreferenceMessages extends NLS {
 	public static String ApiErrorsWarningsConfigurationBlock_0;
 	public static String ApiErrorsWarningsConfigurationBlock_1;
 	public static String ApiErrorsWarningsConfigurationBlock_2;
+	public static String ApiErrorsWarningsConfigurationBlock_automatically_remove_problem_filters;
 	public static String ApiErrorsWarningsPreferencePage_0;
 	public static String ApiErrorsWarningsPreferencePage_1;
 	public static String ApiProblemSeveritiesConfigurationBlock_3;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
index fe724ed..ff38749 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/ProjectSelectionDialog.java
@@ -84,7 +84,7 @@ public class ProjectSelectionDialog extends SelectionStatusDialog {
 	
 	// the visual selection widget group
 	private TableViewer fTableViewer;
-	private Set fProjectsWithSpecifics;
+	Set fProjectsWithSpecifics;
 
 	// sizing constants
 	private final static int SIZING_SELECTION_WIDGET_HEIGHT= 250;
@@ -175,7 +175,7 @@ public class ProjectSelectionDialog extends SelectionStatusDialog {
 	 * Handles the change in selection of the viewer and updates the status of the dialog at the same time
 	 * @param objects
 	 */
-	private void doSelectionChanged(Object[] objects) {
+	void doSelectionChanged(Object[] objects) {
 		if (objects.length != 1) {
 			updateStatus(new Status(IStatus.ERROR, ApiUIPlugin.getPluginIdentifier(), "")); //$NON-NLS-1$
 			setSelectionResult(null);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
index 24a3c4b..0f3fbc9 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/preferences/preferencemessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 ApiErrorsWarningsConfigurationBlock_0=Error and warning settings have changed. A full build is required for the changes to take effect.\n\nDo a full build now?
 ApiErrorsWarningsConfigurationBlock_1=Error and warning settings have changed. A rebuild of the project is required for the changes to take effect.\n\nRebuild {0} now?
 ApiErrorsWarningsConfigurationBlock_2=Settings Changed
+ApiErrorsWarningsConfigurationBlock_automatically_remove_problem_filters=Automatically &remove unused API problem filters
 ApiErrorsWarningsPreferencePage_0=API Tools
 ApiErrorsWarningsPreferencePage_1=<A>Configure Project Specific Settings...</A>
 ApiProblemSeveritiesConfigurationBlock_3=Select the severity level for the following API use options:
@@ -29,27 +30,27 @@ ApiProfilesPreferencePage_4=&Edit...
 ApiProfilesPreferencePage_6=Baseline Changed
 ApiProfilesPreferencePage_7=The default API baseline has been changed. A full build is required for the changes to take effect.\n\n Do a full build now?
 ApiToolingNotificationsBlock_0=API &Use
-ApiToolingNotificationsBlock_1=&API Compatibility
+ApiToolingNotificationsBlock_1=A&PI Compatibility
 ApiToolingNotificationsBlock_2=&Version Management
 ApiToolingNotificationsBlock_3=A&nalysis Options
-CompatibilityAPIComponentElement=Bundle
-CompatibilityAnnotationElement=Annotation
-CompatibilityInterfaceElement=Interface
-CompatibilityClassElement=Class
-CompatibilityEnumElement=Enum
-CompatibilityFieldElement=Field
-CompatibilityMethodElement=Method
-CompatibilityConstructorElement=Constructor
-CompatibilityTypeParameterElement=Type Parameter
+CompatibilityAPIComponentElement=&Bundle
+CompatibilityAnnotationElement=Annotati&on
+CompatibilityInterfaceElement=In&terface
+CompatibilityClassElement=&Class
+CompatibilityEnumElement=Enu&m
+CompatibilityFieldElement=&Field
+CompatibilityMethodElement=Met&hod
+CompatibilityConstructorElement=Con&structor
+CompatibilityTypeParameterElement=T&ype Parameter
 ProjectSelectionDialog_title=Project Specific Configuration
 ProjectSelectionDialog_message=&Select the project to configure:
 ProjectSelectionDialog_checkbox_text=Show only &projects with project specific settings
 ApiProfilesConfigurationBlock_options_group_title=Options
 ApiProfilesConfigurationBlock_missing_default_api_profile_message=Mi&ssing API baseline:
 ApiErrorsWarningsConfigurationBlock_setAllto=Set All As
-CompatibilityReportApiBreakageWhenMajorVersionIncremented=Report API breakage even if authorized by major version increment
+CompatibilityReportApiBreakageWhenMajorVersionIncremented=&Report API breakage even if authorized by major version increment
 
-ReportApiComponentResolutionFailure=Bundle missing required constraint/prerequisite:
+ReportApiComponentResolutionFailure=Bundle mi&ssing required constraint/prerequisite:
 # same as above without the ':'
 ReportApiComponentResolutionFailureDescription=Bundle missing required constraint/prerequisite
 
@@ -136,7 +137,7 @@ ApiErrorsWarningsConfigurationBlock_error=Error
 ApiErrorsWarningsConfigurationBlock_error_button=&Error
 ApiErrorsWarningsConfigurationBlock_extend_non_api_class=Extends a non-API class:
 ApiErrorsWarningsConfigurationBlock_field_decl_non_api=Field with a non-API type:
-ApiErrorsWarningsConfigurationBlock_general=General
+ApiErrorsWarningsConfigurationBlock_general=&General
 ApiErrorsWarningsConfigurationBlock_warning=Warning
 ApiErrorsWarningsConfigurationBlock_warning_button=&Warning
 ApiErrorsWarningsConfigurationBlock_ignore=Ignore
@@ -144,19 +145,19 @@ ApiErrorsWarningsConfigurationBlock_ignore_button=&Ignore
 ApiErrorsWarningsConfigurationBlock_implement_non_api=Implements a non-API interface:
 ApiErrorsWarningsConfigurationBlock_invalid_tag_use=Unsupported use of API Javadoc tags:
 ApiErrorsWarningsConfigurationBlock_invalid_reference_to_system_libraries=Invalid references to system libraries:
-ApiErrorsWarningsConfigurationBlock_leaks=Leaks
+ApiErrorsWarningsConfigurationBlock_leaks=&Leaks
 ApiErrorsWarningsConfigurationBlock_override_tagged_method=Overriding a method tagged '@nooverride':
 ApiErrorsWarningsConfigurationBlock_parameter_non_api=Method with a non-API parameter type:
-ApiErrorsWarningsConfigurationBlock_restrictions=Restrictions
+ApiErrorsWarningsConfigurationBlock_restrictions=&Restrictions
 ApiErrorsWarningsConfigurationBlock_return_type_non_api=Method with a non-API return type:
-ApiErrorsWarningsConfigurationBlock_unused_problem_filters=Unused API problem filters:
+ApiErrorsWarningsConfigurationBlock_unused_problem_filters=Unused API problem &filters:
 
-VersionManagementReportMissingSinceTag=Report missing '@since' tags:
-VersionManagementReportInvalidApiComponentVersion=Report incompatible bundle version:
-VersionManagementReportMalformedSinceTags=Report malformed '@since' tags:
-VersionManagementReportInvalidSinceTagVersion=Report invalid '@since' tag version:
-VersionManagementReportInvalidApiComponentVersionIncludeMinorWithoutApiChange=Ignore minor version increment without API changes
-VersionManagementReportInvalidApiComponentVersionIncludeMajorWithoutBreakingChange=Ignore major version increment without API breakage
+VersionManagementReportMissingSinceTag=Report mi&ssing '@since' tags:
+VersionManagementReportInvalidApiComponentVersion=Report in&compatible bundle version:
+VersionManagementReportMalformedSinceTags=Report ma&lformed '@since' tags:
+VersionManagementReportInvalidSinceTagVersion=Report invalid '@since' ta&g version:
+VersionManagementReportInvalidApiComponentVersionIncludeMinorWithoutApiChange=Ignore minor version increment without API c&hanges
+VersionManagementReportInvalidApiComponentVersionIncludeMajorWithoutBreakingChange=Ignore major version increment without API b&reakage
 ApiProblemSeveritiesConfigurationBlock_checkable_ees=Supported Environments:
 ApiProblemSeveritiesConfigurationBlock_checkable_ees_tooltip=Click to install one or more environment descriptions
 ApiErrorsWarningsConfigurationBlock_no_ees_installed=There are no execution descriptions installed.
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiErrorsWarningsPropertyPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiErrorsWarningsPropertyPage.java
index bbedf48..80f93dc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiErrorsWarningsPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiErrorsWarningsPropertyPage.java
@@ -45,9 +45,9 @@ public class ApiErrorsWarningsPropertyPage extends PropertyPage {
 	 */
 	private HashMap fPageData = null;
 	
-	private	ApiErrorsWarningsConfigurationBlock block = null;
-	private Button pspecific = null;
-	private Link link = null;
+	ApiErrorsWarningsConfigurationBlock block = null;
+	Button pspecific = null;
+	Link link = null;
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiFiltersPropertyPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiFiltersPropertyPage.java
index d41cb9a..67442d5 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiFiltersPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/ApiFiltersPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,8 @@ import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -35,14 +37,18 @@ import org.eclipse.jface.viewers.TreeSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.pde.api.tools.internal.ApiFilterStore;
+import org.eclipse.pde.api.tools.internal.problems.ApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.eclipse.pde.api.tools.ui.internal.ApiToolsLabelProvider;
 import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
 import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
 import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
 import org.eclipse.swt.SWT;
@@ -54,6 +60,7 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
 import org.eclipse.ui.PlatformUI;
@@ -70,6 +77,33 @@ import com.ibm.icu.text.MessageFormat;
 public class ApiFiltersPropertyPage extends PropertyPage {
 	
 	/**
+	 * Holds an edit change so it can be reverted if cancel is pressed
+	 * 
+	 * @since 1.1
+	 */
+	class CommentChange {
+		IApiProblemFilter filter = null;
+		String comment = null;
+		public CommentChange(IApiProblemFilter filter, String orig) {
+			this.filter = filter;
+			this.comment = orig;
+		}
+		
+		/* (non-Javadoc)
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			return this.filter.equals(obj);
+		}
+		/* (non-Javadoc)
+		 * @see java.lang.Object#hashCode()
+		 */
+		public int hashCode() {
+			return this.filter.hashCode();
+		}
+	}
+	
+	/**
 	 * Comparator for the viewer to group filters by {@link IElementDescriptor} type
 	 */
 	static class ApiFilterComparator extends WorkbenchViewerComparator {
@@ -107,9 +141,6 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 		 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
 		 */
 		public boolean hasChildren(Object element) {
-			if(element instanceof IApiProblemFilter) {
-				return false;
-			}
 			if(element instanceof IResource) {
 				try {
 					return getFilterStore().getFilters((IResource) element).length > 0;
@@ -134,22 +165,26 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
 	}
 	
-	private TreeViewer fViewer = null;
-	private Button fRemoveButton;
+	TreeViewer fViewer = null;
+	Button fRemoveButton;
+	Button fEditButton = null;
+	Text fCommentText = null;
 	private IProject fProject = null;
-	private ArrayList fChangeset = new ArrayList();
+	ArrayList fDeleteSet = new ArrayList();
+	ArrayList fEditSet = new ArrayList();
 	private ArrayList fInputset = null;
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
 	 */
 	protected Control createContents(Composite parent) {
+		noDefaultAndApplyButton();
 		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
 		SWTFactory.createWrapLabel(comp, PropertiesMessages.ApiFiltersPropertyPage_55, 2);
 		Tree tree = new Tree(comp, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
 		GridData gd = new GridData(GridData.FILL_BOTH);
-		gd.widthHint = 275;
-		gd.heightHint = 300;
+		gd.widthHint = 300;
+		gd.heightHint = 200;
 		tree.setLayoutData(gd);
 		tree.addKeyListener(new KeyAdapter() {
 			public void keyPressed(KeyEvent e) {
@@ -159,13 +194,12 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 			}
 		});
 		fViewer = new TreeViewer(tree);
-		fViewer.setAutoExpandLevel(2);
 		fViewer.setContentProvider(new TreeContentProvider());
 		fViewer.setLabelProvider(new ApiToolsLabelProvider());
 		fViewer.setComparator(new ApiFilterComparator());
 		fViewer.addFilter(new ViewerFilter() {
 			public boolean select(Viewer viewer, Object parentElement, Object element) {
-				return !fChangeset.contains(element);
+				return !fDeleteSet.contains(element);
 			}
 		});
 		try {
@@ -181,7 +215,30 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 		fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
 				IStructuredSelection ss = (IStructuredSelection) event.getSelection();
-				fRemoveButton.setEnabled(ss.size() > 0);
+				int size = ss.size();
+				fRemoveButton.setEnabled(size > 0);
+				if(size == 1) {
+					Object element = ss.getFirstElement();
+					if(element instanceof IApiProblemFilter) {
+						IApiProblemFilter filter = (IApiProblemFilter) element;
+						String comment = filter.getComment();
+						fEditButton.setEnabled(true);
+						if(comment != null) {
+							fCommentText.setText(comment);
+						}
+						else {
+							fCommentText.setText(IApiToolsConstants.EMPTY_STRING);
+						}
+					}
+					else {
+						fEditButton.setEnabled(false);
+						fCommentText.setText(IApiToolsConstants.EMPTY_STRING);
+					}
+				}
+				else {
+					fEditButton.setEnabled(false);
+					fCommentText.setText(IApiToolsConstants.EMPTY_STRING);
+				}
 			}
 		});
 		fViewer.addDoubleClickListener(new IDoubleClickListener() {
@@ -190,9 +247,24 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 				if(fViewer.isExpandable(o)) {
 					fViewer.setExpandedState(o, !fViewer.getExpandedState(o));
 				}
+				else {
+					if(o instanceof IApiProblemFilter) {
+						IApiProblemFilter filter = (IApiProblemFilter) o;
+						handleEdit(filter);
+					}
+				}
 			}
 		});
+		
 		Composite bcomp = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_VERTICAL, 0, 0);
+		fEditButton = SWTFactory.createPushButton(bcomp, PropertiesMessages.ApiFiltersPropertyPage_edit_button, null, SWT.LEFT);
+		fEditButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				IStructuredSelection ss = (IStructuredSelection) fViewer.getSelection();
+				handleEdit((IApiProblemFilter) ss.getFirstElement());
+			}
+		});
+		fEditButton.setEnabled(false);
 		fRemoveButton = SWTFactory.createPushButton(bcomp, PropertiesMessages.ApiFiltersPropertyPage_57, null, SWT.LEFT);
 		fRemoveButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
@@ -201,24 +273,78 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 			}
 		});
 		fRemoveButton.setEnabled(false);
+		
+		SWTFactory.createLabel(comp, PropertiesMessages.ApiFiltersPropertyPage_comment, 2);
+		fCommentText = SWTFactory.createText(comp, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL, 2, 200, 100, GridData.FILL_HORIZONTAL);
+		fCommentText.setEditable(false);
+		
+		//do initial selections
+		if(tree.getItemCount() > 0) {
+			TreeItem item = tree.getItem(0);
+			fViewer.setSelection(new StructuredSelection(item.getData()), true);
+			fViewer.expandToLevel(item.getData(), 1);
+		}
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IApiToolsHelpContextIds.APITOOLS_FILTERS_PROPERTY_PAGE);
 		return comp;
-	}	
-
+	}
+	
+	/**
+	 * Handles the edit button being pressed
+	 * @param selection
+	 * @since 1.1
+	 */
+	void handleEdit(IApiProblemFilter filter) {
+		String orignal = filter.getComment();
+		String comment = orignal;
+		InputDialog dialog = new InputDialog(getShell(), PropertiesMessages.ApiFiltersPropertyPage_edit_comment, PropertiesMessages.ApiFiltersPropertyPage_edit_filter_comment, comment, null);
+		if(dialog.open() == IDialogConstants.OK_ID) {
+			comment = dialog.getValue();
+			if(comment != null && comment.length() < 1) {
+				comment = null;
+			}
+			((ApiProblemFilter)filter).setComment(comment);
+			CommentChange change = new CommentChange(filter, orignal);
+			int idx = fEditSet.indexOf(change);
+			if(idx < 0) {
+				fEditSet.add(change);
+			}
+			fViewer.refresh(filter, true);
+			fViewer.setSelection(fViewer.getSelection(), true);
+		}
+	}
+	
 	/**
 	 * Performs the remove
 	 * @param selection
 	 */
-	private void handleRemove(IStructuredSelection selection) {
-		HashSet deletions = collectDeletions(selection);
+	void handleRemove(IStructuredSelection selection) {
+		ArrayList comments = new ArrayList();
+		HashSet deletions = collectDeletions(selection, comments);
+		boolean refresh = false;
 		if(deletions.size() > 0) {
-			fChangeset.addAll(deletions);
+			fDeleteSet.addAll(deletions);
 			int[] indexes = getIndexes(selection);
 			fViewer.remove(deletions.toArray());
 			updateParents();
-			fViewer.refresh();
+			refresh = true;
 			updateSelection(indexes);
 		}
+		if(comments.size() > 0) {
+			for (int i = 0; i < comments.size(); i++) {
+				ApiProblemFilter filter = (ApiProblemFilter) comments.get(i);
+				CommentChange change = new CommentChange(filter, filter.getComment());
+				int idx = fEditSet.indexOf(filter);
+				if(idx < 0) {
+					fEditSet.add(change);
+				}
+				filter.setComment(null);
+				refresh = true;
+			}
+		}
+		if(refresh) {
+			fViewer.refresh(true);
+			fViewer.setSelection(fViewer.getSelection(), true);
+		}
 	}
 	
 	/**
@@ -294,9 +420,10 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 	/**
 	 * Collects all of the elements to be deleted
 	 * @param selection
+	 * @param comments a collector for filters that will have their comments removed
 	 * @return the set of elements to be added to the change set for deletion
 	 */
-	private HashSet collectDeletions(IStructuredSelection selection) {
+	private HashSet collectDeletions(IStructuredSelection selection, ArrayList comments) {
 		HashSet filters = new HashSet();
 		Object node = null;
 		Object[] children = null;
@@ -307,9 +434,15 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 				filters.addAll(Arrays.asList(children));
 				fInputset.remove(node);
 			}
-			else {
+			else if(node instanceof IApiProblemFilter){
 				filters.add(node);
 			}
+			else if(node instanceof String) {
+				TreeItem item = (TreeItem) fViewer.testFindItem(node);
+				if(item != null) {
+					comments.add(item.getParentItem().getData());
+				}
+			}
 		}
 		return filters;
 	}
@@ -329,7 +462,7 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 	 * @return the {@link IApiFilterStore} from the backing project
 	 * @throws CoreException
 	 */
-	private IApiFilterStore getFilterStore() throws CoreException {
+	IApiFilterStore getFilterStore() throws CoreException {
 		IProject project  = getProject();
 		IApiFilterStore store = null;
 		if(project != null) {
@@ -340,12 +473,18 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 		}
 		return store;
 	}
-
+	
 	/* (non-Javadoc)
-	 * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+	 * @see org.eclipse.jface.preference.PreferencePage#performCancel()
 	 */
-	protected void performDefaults() {
-		super.performDefaults();
+	public boolean performCancel() {
+		//revert changes
+		for (int i = 0; i < fEditSet.size(); i++) {
+			CommentChange change = (CommentChange) fEditSet.get(i);
+			((ApiProblemFilter)change.filter).setComment(change.comment);
+		}
+		fEditSet.clear();
+		return super.performCancel();
 	}
 	
 	/* (non-Javadoc)
@@ -353,9 +492,9 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 	 */
 	public boolean performOk() {
 		try {
-			if(fChangeset.size() > 0) {
-				IWorkspace workspace = ResourcesPlugin.getWorkspace();
-				IApiProblemFilter[] apiProblemFilters = (IApiProblemFilter[]) fChangeset.toArray(new IApiProblemFilter[fChangeset.size()]);
+			boolean needsbuild = false;
+			if(fDeleteSet.size() > 0) {
+				IApiProblemFilter[] apiProblemFilters = (IApiProblemFilter[]) fDeleteSet.toArray(new IApiProblemFilter[fDeleteSet.size()]);
 				getFilterStore().removeFilters(apiProblemFilters);
 				// we want to make sure that we rebuild only applicable types
 				for (int i = 0, max = apiProblemFilters.length; i < max; i++) {
@@ -371,6 +510,14 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 						}
 					}
 				}
+				needsbuild = true;
+			} else if(fEditSet.size() > 0) {
+				ApiFilterStore store = (ApiFilterStore) getFilterStore();
+				store.needsSaving();
+				store.persistApiFilters();
+			}
+			if(needsbuild) {
+				IWorkspace workspace = ResourcesPlugin.getWorkspace();
 				if (!workspace.isAutoBuilding()) {
 					if(MessageDialog.openQuestion(getShell(), PropertiesMessages.ApiFiltersPropertyPage_58, 
 							MessageFormat.format(PropertiesMessages.ApiFiltersPropertyPage_59, new String[] {fProject.getName()}))) {
@@ -378,7 +525,8 @@ public class ApiFiltersPropertyPage extends PropertyPage {
 					}
 				}
 			}
-			fChangeset.clear();
+			fEditSet.clear();
+			fDeleteSet.clear();
 		}
 		catch(CoreException e) {
 			ApiUIPlugin.log(e);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/PropertiesMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/PropertiesMessages.java
index f17eb32..3e6f546 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/PropertiesMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/PropertiesMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,10 @@ public class PropertiesMessages extends NLS {
 	public static String ApiFiltersPropertyPage_57;
 	public static String ApiFiltersPropertyPage_58;
 	public static String ApiFiltersPropertyPage_59;
+	public static String ApiFiltersPropertyPage_comment;
+	public static String ApiFiltersPropertyPage_edit_button;
+	public static String ApiFiltersPropertyPage_edit_comment;
+	public static String ApiFiltersPropertyPage_edit_filter_comment;
 	
 	static {
 		// initialize resource bundle
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/propertiesmessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/propertiesmessages.properties
index 1d875d0..d6e1361 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/propertiesmessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/properties/propertiesmessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -14,3 +14,7 @@ ApiFiltersPropertyPage_55=The following problems are &filtered from the workspac
 ApiFiltersPropertyPage_57=&Remove
 ApiFiltersPropertyPage_58=API Problem Filter Changed
 ApiFiltersPropertyPage_59=API problem filtering has been changed. A rebuild of the project is required for the changes to take effect.\n\nRebuild {0} now?
+ApiFiltersPropertyPage_comment=&Comment:
+ApiFiltersPropertyPage_edit_button=&Edit...
+ApiFiltersPropertyPage_edit_comment=Edit Comment
+ApiFiltersPropertyPage_edit_filter_comment=&Edit filter comment
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/refactoring/RefactoringUtils.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/refactoring/RefactoringUtils.java
index 49de54f..8aae86e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/refactoring/RefactoringUtils.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/refactoring/RefactoringUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,9 @@ public class RefactoringUtils {
 			IResource resource = type.getUnderlyingResource();
 			if(resource != null) {
 				IApiFilterStore store = resolveFilterStore(resource.getProject());
+				if(store == null) {
+					return null;
+				}
 				IApiProblemFilter[] filters = store.getFilters(resource);
 				if(filters.length != 0) {
 					CompositeChange cchange = new CompositeChange(RefactoringMessages.RefactoringUtils_remove_usused_filters);
@@ -70,6 +73,9 @@ public class RefactoringUtils {
 			IResource resource = fragment.getUnderlyingResource();
 			if(resource != null) {
 				IApiFilterStore store = resolveFilterStore(resource.getProject());
+				if(store == null) {
+					return null;
+				}
 				IApiProblemFilter[] filters = collectAllAffectedFilters(store, collectAffectedTypes(fragment));
 				if(filters.length != 0) {
 					CompositeChange cchange = new CompositeChange(RefactoringMessages.RefactoringUtils_remove_usused_filters);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseLaunchDelegate.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseLaunchDelegate.java
new file mode 100644
index 0000000..34d5148
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseLaunchDelegate.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+
+/**
+ * Delegate to launch an API use scan
+ */
+public class ApiUseLaunchDelegate extends LaunchConfigurationDelegate {
+	
+	/**
+	 * The source of bundles being searched - one of target definition, API baseline, or installation path.
+	 */
+	public static final String TARGET_KIND = ApiUIPlugin.PLUGIN_ID + ".TARGET_KIND"; //$NON-NLS-1$
+	
+	/**
+	 * Sources of bundles (possible values for BUNDLE_SOURCE).
+	 */
+	public static final int KIND_TARGET_DEFINITION = 1;
+	public static final int KIND_API_BASELINE = 2;
+	public static final int KIND_INSTALL_PATH = 3;
+	public static final int KIND_HTML_ONLY = 4;
+	
+	/**
+	 * Target definition handle
+	 */
+	public static final String TARGET_HANDLE = ApiUIPlugin.PLUGIN_ID + ".TARGET_HANDLE"; //$NON-NLS-1$
+	public static final String BASELINE_NAME = ApiUIPlugin.PLUGIN_ID + ".BASELINE_NAME"; //$NON-NLS-1$
+	public static final String INSTALL_PATH = ApiUIPlugin.PLUGIN_ID + ".INSTALL_PATH"; //$NON-NLS-1$
+	
+	/**
+	 * Addition/overrides to API descriptions. Lists of package patterns to indicate
+	 * internal or API references. 
+	 */
+	public static final String INTERNAL_PATTERNS_LIST = ApiUIPlugin.PLUGIN_ID + ".INTERNAL_PATTERNS_LIST"; //$NON-NLS-1$
+	public static final String API_PATTERNS_LIST = ApiUIPlugin.PLUGIN_ID + ".API_PATTERNS_LIST"; //$NON-NLS-1$
+	public static final String JAR_PATTERNS_LIST = ApiUIPlugin.PLUGIN_ID + ".JAR_PATTERNS_LIST"; //$NON-NLS-1$
+	public static final String REPORT_PATTERNS_LIST = ApiUIPlugin.PLUGIN_ID + ".REPORT_PATTERNS_LIST"; //$NON-NLS-1$
+	public static final String REPORT_TO_PATTERNS_LIST = ApiUIPlugin.PLUGIN_ID + ".TO_PATTERNS_LIST"; //$NON-NLS-1$
+	/**
+	 * Scope of bundles to search - a regular expression to match against bundle symbolic names.
+	 * Unspecified indicates all bundles in the bundle source.
+	 */
+	public static final String SEARCH_SCOPE = ApiUIPlugin.PLUGIN_ID + ".SEARCH_SCOPE"; //$NON-NLS-1$
+	
+	/**
+	 * Scope of bundles to search for references to. Unspecified indicates all bundles.
+	 */
+	public static final String TARGET_SCOPE = ApiUIPlugin.PLUGIN_ID + ".TARGET_SCOPE"; //$NON-NLS-1$
+	
+	/**
+	 * Search modifiers
+	 */
+	public static final String SEARCH_MODIFIERS = ApiUIPlugin.PLUGIN_ID + ".SEARCH_MODIFIERS"; //$NON-NLS-1$
+	
+	/**
+	 * Path to root directory of XML reports
+	 */
+	public static final String REPORT_PATH = ApiUIPlugin.PLUGIN_ID + ".XML_PATH"; //$NON-NLS-1$
+	
+	/**
+	 * Human-readable description of the report
+	 */
+	public static final String DESCRIPTION = ApiUIPlugin.PLUGIN_ID + ".DESCRIPTION"; //$NON-NLS-1$
+	
+	/**
+	 * Search modifiers
+	 */
+	public static final int MOD_API_REFERENCES			= 1;
+	public static final int MOD_INTERNAL_REFERENCES		= 1 << 1;
+	public static final int MOD_ILLEGAL_USE				= 1 << 6;
+	public static final int CLEAN_XML					= 1 << 2;
+	public static final int CLEAN_HTML					= 1 << 3;
+	public static final int CREATE_HTML					= 1 << 4;
+	public static final int DISPLAY_REPORT				= 1 << 5;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		ApiUseScanJob job = new ApiUseScanJob(configuration);
+		job.schedule();
+		DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
+		return false;
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUsePatternTab.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUsePatternTab.java
new file mode 100644
index 0000000..b223a2b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUsePatternTab.java
@@ -0,0 +1,395 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TreeSet;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ColumnLayoutData;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Tab that allows users to specify patterns that can be used to augment the search
+ * to override API description settings for what is and what is not API.
+ *<br><br>
+ * For example a bundle manifest could say that a.b.c.provisional.package is
+ * API and using this tab a user could provide a pattern a\.\.c\.provisional.* saying that
+ * this should be treated as internal code use
+ * 
+ * @since 1.1
+ */
+public class ApiUsePatternTab extends AbstractLaunchConfigurationTab {
+
+	class Labels extends LabelProvider implements ITableLabelProvider {
+		public Image getColumnImage(Object element, int columnIndex) {return null;}
+		public String getColumnText(Object element, int columnIndex) {
+			Pattern pattern = (Pattern) element;
+			switch(columnIndex) {
+				case 0: {
+					return pattern.pattern;
+				}
+				case 1: {
+					switch(pattern.kind) {
+						case Pattern.API: {
+							return Messages.ApiUsePatternTab_API;
+						}
+						case Pattern.INTERNAL: {
+							return Messages.ApiUsePatternTab_internal;
+						}
+						case Pattern.JAR: {
+							return Messages.ApiUsePatternTab_archive;
+						}
+						case Pattern.REPORT: {
+							return Messages.ApiUsePatternTab_report;
+						}
+						case Pattern.REPORT_TO: {
+							return Messages.ApiUsePatternTab_report_to;
+						}
+					}
+				}
+			}
+			return null;
+		}
+	}
+	
+	class RegexValidator implements IInputValidator {
+		public String isValid(String newText) {
+			if(IApiToolsConstants.EMPTY_STRING.equals(newText)) {
+				return Messages.ApiUsePatternTab_provide_regex;
+			}
+			try {
+				java.util.regex.Pattern.compile(newText);
+			}
+			catch(PatternSyntaxException pse) {
+				return pse.getDescription(); 
+			}
+			return null;
+		}
+	}
+	
+	class Pattern {
+		static final int API = 1, INTERNAL = 2, JAR = 3, REPORT = 4, REPORT_TO = 5;
+		String pattern = null;
+		int kind = -1;
+		public Pattern(String pattern, int kind) {
+			this.pattern = pattern;
+			this.kind = kind;
+		}
+		/* (non-Javadoc)
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return this.pattern;
+		}
+	}
+	
+	TreeSet patterns = new TreeSet(new Comparator() {
+		public int compare(Object o1, Object o2) {
+			return ((Pattern)o1).pattern.compareTo(((Pattern)o2).pattern);
+		}
+	});
+	TableViewer viewer = null;
+	Image image = null;
+	Button addbutton = null, editbutton = null, removebutton = null;
+	ColumnLayoutData[] columndata = {
+			new ColumnWeightData(80), 
+			new ColumnWeightData(20)}; 
+	String[] columnnames = {
+			"Pattern", //$NON-NLS-1$
+			"Kind"}; //$NON-NLS-1$
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
+		SWTFactory.createLabel(comp, Messages.ApiUsePatternTab_patterns, 2);
+		Composite tcomp = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_BOTH, 0, 0);
+		GridData gd = (GridData) tcomp.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		Table table = new Table(tcomp, SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
+		table.setHeaderVisible(true);
+		TableLayout layout = new TableLayout();
+		for (int i = 0; i < columndata.length; i++) {
+			layout.addColumnData(columndata[i]);
+		}
+		table.setLayout(layout);
+		gd = new GridData(GridData.FILL_BOTH);
+		gd.grabExcessHorizontalSpace = true;
+		gd.widthHint = 250;
+		table.setLayoutData(gd);
+		this.viewer = new TableViewer(table);
+		this.viewer.setColumnProperties(columnnames);
+		this.viewer.setComparator(new ViewerComparator() {
+			public int category(Object element) {
+				return ((Pattern)element).kind;
+			}
+		});
+		this.viewer.setLabelProvider(new Labels());
+		this.viewer.setContentProvider(new ArrayContentProvider());
+		this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				updateButtons((IStructuredSelection) event.getSelection());
+			}
+		});
+		this.viewer.addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				doEdit();
+			}
+		});
+		TableColumn column = null;
+		for (int i = 0; i < columnnames.length; i++) {
+			column = new TableColumn(table, SWT.NONE);
+			column.setResizable(false);
+			column.setMoveable(false);
+			column.setText(columnnames[i]);
+		}
+		this.viewer.setInput(this.patterns);
+		table.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent event) {
+				if (event.character == SWT.DEL && event.stateMask == 0) {
+					doRemove();
+				}
+			}
+		});
+		
+		Composite bcomp = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_VERTICAL, 0, 0);
+		this.addbutton = SWTFactory.createPushButton(bcomp, Messages.ApiUsePatternTab_add, null);
+		this.addbutton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				PatternWizard wizard = new PatternWizard(null, -1);
+				WizardDialog dialog = new WizardDialog(getShell(), wizard);
+				if(dialog.open() == IDialogConstants.OK_ID) {
+					addPattern(wizard.getPattern(), wizard.getKind());
+					ApiUsePatternTab.this.viewer.refresh(true, true);
+					updateLaunchConfigurationDialog();
+				}
+			}
+		});
+		this.editbutton = SWTFactory.createPushButton(bcomp, Messages.ApiUsePatternTab_edit, null);
+		this.editbutton.setEnabled(false);
+		this.editbutton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				doEdit();
+			}
+		});
+		this.removebutton = SWTFactory.createPushButton(bcomp, Messages.ApiUsePatternTab_remove, null);
+		this.removebutton.setEnabled(false);
+		this.removebutton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				doRemove();
+			}
+		});
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IApiToolsHelpContextIds.API_USE_PATTERN_TAB);
+		setControl(comp);
+	}
+
+	/**
+	 * Removes the selected elements from the table
+	 */
+	void doRemove() {
+		IStructuredSelection selection = (IStructuredSelection) ApiUsePatternTab.this.viewer.getSelection();
+		for (Iterator iter = selection.iterator(); iter.hasNext();) {
+			removePattern((Pattern) iter.next());
+		}
+		this.viewer.refresh();
+		updateLaunchConfigurationDialog();
+	}
+	
+	/**
+	 * handles editing a selected pattern
+	 */
+	void doEdit() {
+		IStructuredSelection selection = (IStructuredSelection) ApiUsePatternTab.this.viewer.getSelection();
+		Pattern pattern = (Pattern) selection.getFirstElement();
+		PatternWizard wizard = new PatternWizard(pattern.pattern, pattern.kind);
+		WizardDialog dialog = new WizardDialog(getShell(), wizard);
+		if(dialog.open() == IDialogConstants.OK_ID) {
+			pattern.pattern = wizard.getPattern();
+			pattern.kind = wizard.getKind();
+			ApiUsePatternTab.this.viewer.refresh(pattern, true, true);
+			updateLaunchConfigurationDialog();
+		}
+	}
+	
+	/**
+	 * Updates the buttons based on the selection in the viewer
+	 * @param selection
+	 */
+	void updateButtons(IStructuredSelection selection) {
+		int size = selection.size();
+		this.editbutton.setEnabled(size == 1);
+		this.removebutton.setEnabled(size > 0);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+	 */
+	public String getName() {
+		return Messages.ApiUsePatternTab_patterns_title;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getImage()
+	 */
+	public Image getImage() {
+		return ApiUIPlugin.getSharedImage(IApiToolsConstants.IMG_ELCL_TEXT_EDIT);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void initializeFrom(ILaunchConfiguration configuration) {
+		try {
+			this.patterns.clear();
+			List pats = configuration.getAttribute(ApiUseLaunchDelegate.API_PATTERNS_LIST, (List)null);
+			if(pats != null) {
+				for (Iterator iter = pats.iterator(); iter.hasNext();) {
+					addPattern((String) iter.next(), Pattern.API);
+				}
+			}
+			pats = configuration.getAttribute(ApiUseLaunchDelegate.INTERNAL_PATTERNS_LIST, (List)null);
+			if(pats != null) {
+				for (Iterator iter = pats.iterator(); iter.hasNext();) {
+					addPattern((String) iter.next(), Pattern.INTERNAL);
+				}
+			}
+			pats = configuration.getAttribute(ApiUseLaunchDelegate.JAR_PATTERNS_LIST, (List)null);
+			if(pats != null) {
+				for (Iterator iter = pats.iterator(); iter.hasNext();) {
+					addPattern((String) iter.next(), Pattern.JAR);
+				}
+			}
+			pats = configuration.getAttribute(ApiUseLaunchDelegate.REPORT_PATTERNS_LIST, (List)null);
+			if(pats != null) {
+				for (Iterator iter = pats.iterator(); iter.hasNext();) {
+					addPattern((String) iter.next(), Pattern.REPORT);
+				}
+			}
+			pats = configuration.getAttribute(ApiUseLaunchDelegate.REPORT_TO_PATTERNS_LIST, (List)null);
+			if(pats != null) {
+				for (Iterator iter = pats.iterator(); iter.hasNext();) {
+					addPattern((String) iter.next(), Pattern.REPORT_TO);
+				}
+			}
+			this.viewer.refresh();
+		}
+		catch(CoreException ce) {
+			ApiUIPlugin.log(ce);
+		}
+	}
+
+	/**
+	 * Adds a new pattern to the list
+	 * @param pattern
+	 * @param kind
+	 * @return
+	 */
+	boolean addPattern(String pattern, int kind) {
+		return this.patterns.add(new Pattern(pattern, kind));
+	}
+	
+	/**
+	 * Removes the pattern from the listing
+	 * @param pattern
+	 * @return
+	 */
+	boolean removePattern(Pattern pattern) {
+		return this.patterns.remove(pattern);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+		ArrayList api = new ArrayList();
+		ArrayList internal = new ArrayList();
+		ArrayList jar = new ArrayList();
+		ArrayList report = new ArrayList();
+		ArrayList reportto = new ArrayList();
+		Pattern pattern = null;
+		for (Iterator iter = this.patterns.iterator(); iter.hasNext();) {
+			pattern = (Pattern) iter.next();
+			switch(pattern.kind) {
+				case Pattern.API: {
+					api.add(pattern.pattern);
+					break;
+				}
+				case Pattern.INTERNAL: {
+					internal.add(pattern.pattern);
+					break;
+				}
+				case Pattern.JAR: {
+					jar.add(pattern.pattern);
+					break;
+				}
+				case Pattern.REPORT: {
+					report.add(pattern.pattern);
+					break;
+				}
+				case Pattern.REPORT_TO: {
+					reportto.add(pattern.pattern);
+					break;
+				}
+			}
+		}
+		configuration.setAttribute(ApiUseLaunchDelegate.API_PATTERNS_LIST, api.size() > 0 ? api : (List)null);
+		configuration.setAttribute(ApiUseLaunchDelegate.INTERNAL_PATTERNS_LIST, internal.size() > 0 ? internal : (List)null);
+		configuration.setAttribute(ApiUseLaunchDelegate.JAR_PATTERNS_LIST, jar.size() > 0 ? jar : (List)null);
+		configuration.setAttribute(ApiUseLaunchDelegate.REPORT_PATTERNS_LIST, report.size() > 0 ? report : (List)null);
+		configuration.setAttribute(ApiUseLaunchDelegate.REPORT_TO_PATTERNS_LIST, reportto.size() > 0 ? reportto : (List)null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+		//do nothing, default is no patterns
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanJob.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanJob.java
new file mode 100644
index 0000000..11a8ef6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanJob.java
@@ -0,0 +1,523 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.osgi.service.resolver.ResolverError;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
+import org.eclipse.pde.api.tools.internal.model.ApiModelFactory;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.search.ApiSearchEngine;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
+import org.eclipse.pde.api.tools.internal.search.ApiDescriptionModifier;
+import org.eclipse.pde.api.tools.internal.search.SkippedComponent;
+import org.eclipse.pde.api.tools.internal.search.UseMetadata;
+import org.eclipse.pde.api.tools.internal.search.UseReportConverter;
+import org.eclipse.pde.api.tools.internal.search.UseSearchRequestor;
+import org.eclipse.pde.api.tools.internal.search.XmlSearchReporter;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
+import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
+import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
+import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.progress.UIJob;
+
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.text.MessageFormat;
+
+/**
+ * Job that performs a API use scan.
+ */
+public class ApiUseScanJob extends Job {
+	
+	/**
+	 * Associated launch configuration
+	 */
+	private ILaunchConfiguration configuration = null;
+
+	/**
+	 * List of components that were not searched
+	 */
+	Set notsearched = null;
+	
+	/**
+	 * @param name
+	 */
+	public ApiUseScanJob(ILaunchConfiguration configuration) {
+		super(MessageFormat.format(Messages.ApiUseScanJob_api_use_report, new String[]{configuration.getName()}));
+		this.configuration = configuration;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		// Build API baseline
+		SubMonitor localmonitor = SubMonitor.convert(monitor);
+		try {
+			IPath rootpath = null;
+			String xmlPath = this.configuration.getAttribute(ApiUseLaunchDelegate.REPORT_PATH, (String)null);
+			if (xmlPath == null) {
+				abort(Messages.ApiUseScanJob_missing_xml_loc);
+			}
+			rootpath = new Path(xmlPath); 
+			int kind = this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_KIND, 0);
+			if(kind != ApiUseLaunchDelegate.KIND_HTML_ONLY) {
+				localmonitor.setTaskName(Messages.ApiUseScanJob_preparing_for_scan);
+				localmonitor.setWorkRemaining((isSpecified(ApiUseLaunchDelegate.CREATE_HTML) ? 14 : 13));
+				// create baseline
+				IApiBaseline baseline = createApiBaseline(kind, localmonitor.newChild(1));
+				Set ids = new HashSet();
+				TreeSet scope = new TreeSet(Util.componentsorter);	
+				getContext(baseline, ids, scope, localmonitor.newChild(2));
+				int kinds = 0;
+				if (isSpecified(ApiUseLaunchDelegate.MOD_API_REFERENCES)) {
+					kinds |= IApiSearchRequestor.INCLUDE_API;
+				}
+				if (isSpecified(ApiUseLaunchDelegate.MOD_INTERNAL_REFERENCES)) {
+					kinds |= IApiSearchRequestor.INCLUDE_INTERNAL;
+				}
+				if(isSpecified(ApiUseLaunchDelegate.MOD_ILLEGAL_USE)) {
+					kinds |= IApiSearchRequestor.INCLUDE_ILLEGAL_USE;
+				}
+				UseSearchRequestor requestor = new UseSearchRequestor(ids, (IApiElement[]) scope.toArray(new IApiElement[scope.size()]), kinds);
+				List jars = this.configuration.getAttribute(ApiUseLaunchDelegate.JAR_PATTERNS_LIST, (List)null);
+				String[] sjars = getStrings(jars);
+				requestor.setJarPatterns(sjars);
+				List api = this.configuration.getAttribute(ApiUseLaunchDelegate.API_PATTERNS_LIST, (List)null);
+				String[] sapi = getStrings(api);
+				List internal = this.configuration.getAttribute(ApiUseLaunchDelegate.INTERNAL_PATTERNS_LIST, (List)null);
+				String[] sinternal = getStrings(internal);
+				if (sapi != null || sinternal != null) {
+					// modify API descriptions
+					IApiComponent[] components = baseline.getApiComponents();
+					ApiDescriptionModifier visitor = new ApiDescriptionModifier(sinternal, sapi);
+					for (int i = 0; i < components.length; i++) {
+						IApiComponent component = components[i];
+						if (!component.isSystemComponent() && !component.isSourceComponent()) {
+							visitor.setApiDescription(component.getApiDescription());
+							component.getApiDescription().accept(visitor, null);
+						}
+					}
+				}
+				xmlPath = rootpath.append("xml").toOSString(); //$NON-NLS-1$
+				if(isSpecified(ApiUseLaunchDelegate.CLEAN_XML)) {
+					localmonitor.setTaskName(Messages.ApiUseScanJob_cleaning_xml_loc);
+					scrubReportLocation(new File(xmlPath), localmonitor.newChild(1));
+				}
+				UseMetadata data = new UseMetadata(
+						kinds, 
+						this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, (String)null), 
+						this.configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, (String)null), 
+						baseline.getLocation(), 
+						xmlPath, 
+						sapi, 
+						sinternal, 
+						sjars,
+						DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()),
+						this.configuration.getAttribute(ApiUseLaunchDelegate.DESCRIPTION, (String)null));
+				IApiSearchReporter reporter = new XmlSearchReporter(
+						xmlPath, 
+						false);
+				try {
+					ApiSearchEngine engine = new ApiSearchEngine();
+					engine.search(baseline, requestor, reporter, localmonitor.newChild(6));
+				}
+				finally {
+					reporter.reportNotSearched((IApiElement[]) ApiUseScanJob.this.notsearched.toArray(new IApiElement[ApiUseScanJob.this.notsearched.size()]));
+					reporter.reportMetadata(data);
+					// Dispose the baseline if it's not managed (it's temporary)
+					ApiBaselineManager apiManager = ApiBaselineManager.getManager();
+					IApiBaseline[] baselines = apiManager.getApiBaselines();
+					boolean dispose = true;
+					for (int i = 0; i < baselines.length; i++) {
+						if (baseline.equals(baselines[i])) {
+							dispose = false;
+							break;
+						}
+					}
+					if (dispose) {
+						baseline.dispose();
+					}
+				}
+			}
+			else {
+				localmonitor.setWorkRemaining(10);
+			}
+			if(isSpecified(ApiUseLaunchDelegate.CREATE_HTML)) {
+				localmonitor.setTaskName(Messages.ApiUseScanJob_generating_html_reports);
+				String htmlPath = rootpath.append("html").toOSString(); //$NON-NLS-1$
+				performReportCreation(
+						isSpecified(ApiUseLaunchDelegate.CLEAN_HTML),
+						htmlPath,
+						xmlPath,
+						isSpecified(ApiUseLaunchDelegate.DISPLAY_REPORT),
+						getStrings(this.configuration.getAttribute(ApiUseLaunchDelegate.REPORT_TO_PATTERNS_LIST, (List)null)),
+						getStrings(this.configuration.getAttribute(ApiUseLaunchDelegate.REPORT_PATTERNS_LIST, (List)null)),
+						localmonitor.newChild(10));
+			}
+			
+		} catch (CoreException e) {
+			return e.getStatus();
+		}
+		finally {
+			localmonitor.done();
+		}
+		return Status.OK_STATUS;
+	}
+	
+	private String[] getStrings(List list) {
+		if (list == null || list.isEmpty()) {
+			return null;
+		}
+		return (String[]) list.toArray(new String[list.size()]);
+	}
+	
+	/**
+	 * Throws a new {@link CoreException} with the given message
+	 * @param message
+	 * @throws CoreException
+	 */
+	void abort(String message) throws CoreException {
+		throw new CoreException(new Status(IStatus.ERROR, ApiUIPlugin.PLUGIN_ID, message));
+	}
+
+	/**
+	 * Creates a new {@link IApiBaseline} from the location set in the backing launch configuration
+	 * @param kind
+	 * @param monitor
+	 * @return the new {@link IApiBaseline}
+	 * @throws CoreException
+	 */
+	private IApiBaseline createApiBaseline(int kind, IProgressMonitor monitor) throws CoreException {
+		ApiBaselineManager bmanager = ApiBaselineManager.getManager();
+		switch (kind) {
+			case ApiUseLaunchDelegate.KIND_API_BASELINE:
+				String name = this.configuration.getAttribute(ApiUseLaunchDelegate.BASELINE_NAME, (String)null);
+				if (name == null) {
+					abort(Messages.ApiUseScanJob_baseline_name_missing);
+				}
+				IApiBaseline baseline = bmanager.getApiBaseline(name);
+				if (baseline == null) {
+					abort(MessageFormat.format(Messages.ApiUseScanJob_baseline_does_not_exist, new String[]{name}));
+				}
+				return baseline;
+			case ApiUseLaunchDelegate.KIND_INSTALL_PATH:
+				String path = this.configuration.getAttribute(ApiUseLaunchDelegate.INSTALL_PATH, (String)null);
+				if (path == null) {
+					abort(Messages.ApiUseScanJob_unspecified_install_path);
+				}
+				File file = new File(path);
+				if (!file.exists() || !file.isDirectory()) {
+					abort(MessageFormat.format(Messages.ApiUseScanJob_intall_dir_does_no_exist, new String[]{path}));
+				}
+				return createBaseline(new Path(file.getAbsolutePath()), monitor);
+			case ApiUseLaunchDelegate.KIND_TARGET_DEFINITION:
+				String memento = this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_HANDLE, (String)null);
+				if (memento == null) {
+					abort(Messages.ApiUseScanJob_target_unspecified);
+				}
+				ITargetPlatformService service = getTargetService();
+				ITargetHandle handle = service.getTarget(memento);
+				ITargetDefinition definition = handle.getTargetDefinition();
+				return createBaseline(definition, monitor);
+			default:
+				abort(Messages.ApiUseScanJob_target_api_unspecified);
+		}
+		return null;
+	}
+		
+	/**
+	 * Returns the target service or <code>null</code>
+	 * 
+	 * @return service or <code>null</code>
+	 */
+	private ITargetPlatformService getTargetService() {
+		return (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+	}
+	
+	/**
+	 * Collects the context of reference ids and scope elements in one pass
+	 * @param baseline the baseline to check components from
+	 * @param ids the reference ids to consider
+	 * @param scope the scope of elements to search
+	 * @param monitor
+	 * @throws CoreException
+	 */
+	private void getContext(IApiBaseline baseline, Set ids, Set scope, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiUseScanJob_collecting_target_components, 10);
+		this.notsearched = new TreeSet(Util.componentsorter);
+		String regex = this.configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, (String)null);
+		Pattern pattern = getPattern(regex);
+		regex = this.configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, (String)null);
+		Pattern pattern2 = getPattern(regex);
+		IApiComponent[] components = baseline.getApiComponents();
+		localmonitor.setWorkRemaining(components.length);
+		for (int i = 0; i < components.length; i++) {
+			IApiComponent component = components[i];
+			localmonitor.subTask(NLS.bind(Messages.ApiUseScanJob_checking_component, component.getSymbolicName()));
+			Util.updateMonitor(localmonitor, 1);
+			if (acceptComponent(component, pattern, true)) {
+				ids.add(component.getSymbolicName());
+			}
+			if (acceptComponent(component, pattern2, false)) {
+				scope.add(component);
+			}
+			else {
+				localmonitor.subTask(NLS.bind(Messages.ApiUseScanJob_skipping_component, component.getSymbolicName()));
+				this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), null));
+			}
+		}
+	}
+	
+	/**
+	 * Returns a pattern for the given regular expression or <code>null</code> if none.
+	 * 
+	 * @param regex expression, <code>null</code> or empty
+	 * @return associated pattern or <code>null</code>
+	 */
+	private Pattern getPattern(String regex) {
+		if (regex == null) {
+			return null;
+		}
+		if (regex.trim().length() == 0) {
+			return null;
+		}
+		return Pattern.compile(regex);
+	}
+	
+	/**
+	 * Returns if we should add the given component to our search scope
+	 * @param component
+	 * @param pattern
+	 * @param allowresolve
+	 * @return
+	 * @throws CoreException
+	 */
+	boolean acceptComponent(IApiComponent component, Pattern pattern, boolean allowresolve) throws CoreException {
+		if(!allowresolve) {
+			ResolverError[] errors = component.getErrors();
+			if(errors != null) {
+				this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), errors)); 
+				return false;
+			}
+		}
+		if(component.isSystemComponent()) {
+			return false;
+		}
+		if(pattern != null) {
+			return pattern.matcher(component.getSymbolicName()).matches();
+		}
+		return true;
+	}
+	
+	
+	
+	/**
+	 * Returns if the given search modifier is set in the backing {@link ILaunchConfiguration}
+	 * @param modifier
+	 * @return true if the modifier is set, false otherwise
+	 * @throws CoreException
+	 */
+	private boolean isSpecified(int modifier) throws CoreException {
+		int modifiers = configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_MODIFIERS, 0);
+		return (modifiers & modifier) > 0;
+	}
+	
+	/**
+	 * Performs the report creation
+	 * @param cleanh
+	 * @param hlocation
+	 * @param rlocation
+	 * @param openhtml
+	 * @param monitor
+	 * @throws OperationCanceledException
+	 */
+	void performReportCreation(boolean cleanh, 
+			String hlocation, 
+			String rlocation, 
+			boolean openhtml,
+			String[] topatterns,
+			String[] frompatterns,
+			IProgressMonitor monitor) {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiUseScanJob_creating_html_reports, 10);
+		if(cleanh) {
+			cleanReportLocation(hlocation, localmonitor.newChild(5));
+		}
+		try {
+			UseReportConverter converter = new UseReportConverter(hlocation, rlocation, topatterns, frompatterns);
+			converter.convert(null, localmonitor.newChild(5));
+			if(openhtml) {
+				final File index = converter.getReportIndex();
+				if(index != null) {
+					UIJob ujob = new UIJob(Util.EMPTY_STRING){
+						public IStatus runInUIThread(IProgressMonitor monitor) {
+							IEditorDescriptor edesc = null;
+							try {
+								edesc = IDE.getEditorDescriptor(index.getName());
+								IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+								IDE.openEditor(window.getActivePage(), 
+										index.toURI(), 
+										edesc.getId(), 
+										true);
+							} catch (PartInitException e) {
+								e.printStackTrace();
+							}
+							return Status.OK_STATUS;
+						}
+					};
+					ujob.setPriority(Job.INTERACTIVE);
+					ujob.setSystem(true);
+					ujob.schedule();
+				}
+			}
+		}
+		catch (OperationCanceledException oce) {
+			//re-throw
+			throw oce;
+		}
+		catch(Exception e) {
+			ApiPlugin.log(e);
+		}
+	}
+	
+	/**
+	 * Cleans the report location specified by the parameter reportLocation
+	 * @param monitor
+	 */
+	void cleanReportLocation(String location, IProgressMonitor monitor) {
+		File file = new File(location);
+		SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiUseScanJob_deleting_old_reports, IProgressMonitor.UNKNOWN);
+		if(file.exists()) {
+			Util.updateMonitor(localmonitor, 0);
+			scrubReportLocation(file, localmonitor);
+			localmonitor.subTask(NLS.bind(Messages.ApiUseScanJob_deleting_root_folder, file.getName()));
+		}
+	}
+	
+	/**
+	 * Cleans the location if it exists
+	 * @param file
+	 * @param monitor
+	 */
+	void scrubReportLocation(File file, IProgressMonitor monitor) {
+		if(file.exists() && file.isDirectory()) {
+			File[] files = file.listFiles();
+			for (int i = 0; i < files.length; i++) {
+				monitor.subTask(NLS.bind(Messages.ApiUseScanJob_deleteing_file, files[i].getPath()));
+				Util.updateMonitor(monitor, 0);
+				if(files[i].isDirectory()) {
+					scrubReportLocation(files[i], monitor);
+				}
+				else {
+					files[i].delete();
+				}
+			}
+			file.delete();
+		}
+	}	
+	
+	/**
+	 * Creates an API baseline from a target definition.
+	 * 
+	 * @param definition
+	 * @param monitor progress monitor
+	 */
+	private IApiBaseline createBaseline(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiUseScanJob_reading_target, 10);
+		definition.resolve(localmonitor.newChild(2));
+		Util.updateMonitor(localmonitor, 1);
+		IResolvedBundle[] bundles = definition.getBundles();
+		List components = new ArrayList();
+		IApiBaseline profile = ApiModelFactory.newApiBaseline(definition.getName());
+		localmonitor.setWorkRemaining(bundles.length);
+		for (int i = 0; i < bundles.length; i++) {
+			Util.updateMonitor(localmonitor, 1);
+			if (bundles[i].getStatus().isOK() && !bundles[i].isSourceBundle()) {
+				IApiComponent component = ApiModelFactory.newApiComponent(profile, URIUtil.toFile(bundles[i].getBundleInfo().getLocation()).getAbsolutePath());
+				if (component != null) {
+					components.add(component);
+				}
+			}
+		}
+		profile.addApiComponents((IApiComponent[]) components.toArray(new IApiComponent[components.size()]));
+		return profile;
+	}	
+	
+	/**
+	 * Creates a baseline at an install location, as a plain directory (does not treat as an install).
+	 * 
+	 * @param path
+	 * @param monitor
+	 */
+	private IApiBaseline createBaseline(IPath path, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, Messages.ApiUseScanJob_scanning, 10);
+		ITargetPlatformService service = (ITargetPlatformService) ApiUIPlugin.getDefault().acquireService(ITargetPlatformService.class.getName());
+		IBundleContainer container = service.newDirectoryContainer(path.toOSString());
+		// treat as an installation, if that fails, try plug-ins directory
+		ITargetDefinition definition = service.newTarget();
+		container.resolve(definition, localmonitor.newChild(1));
+		Util.updateMonitor(localmonitor, 1);
+		IResolvedBundle[] bundles = container.getBundles();
+		List components = new ArrayList();
+		IApiBaseline profile = ApiModelFactory.newApiBaseline(this.configuration.getName());
+		Util.updateMonitor(localmonitor, 1);
+		if (bundles.length > 0) {
+			localmonitor.setWorkRemaining(bundles.length);
+			for (int i = 0; i < bundles.length; i++) {
+				Util.updateMonitor(localmonitor, 1);
+				if (bundles[i].getStatus().isOK() && !bundles[i].isSourceBundle()) {
+					IApiComponent component = ApiModelFactory.newApiComponent(profile, URIUtil.toFile(bundles[i].getBundleInfo().getLocation()).getAbsolutePath());
+					if (component != null) {
+						components.add(component);
+					}
+				}
+			}
+		} else {
+			abort(MessageFormat.format(Messages.ApiUseScanJob_no_bundles, new String[]{path.toOSString()}));
+		}
+		profile.addApiComponents((IApiComponent[]) components.toArray(new IApiComponent[components.size()]));
+		return profile;
+	}	
+	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanTab.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanTab.java
new file mode 100644
index 0000000..f46ebf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseScanTab.java
@@ -0,0 +1,749 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
+import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Tab for an API use scan
+ * @since 1.1
+ */
+public class ApiUseScanTab extends AbstractLaunchConfigurationTab {
+	
+	static final String[] EXTENSIONS = new String[] {"*.txt"}; //$NON-NLS-1$
+	
+	/**
+	 * Default selection adapter for updating the launch dialog
+	 */
+	SelectionAdapter selectionadapter = new SelectionAdapter() {
+		public void widgetSelected(SelectionEvent e) {
+			updateDialog();
+		};
+	};
+	
+	/**
+	 * Default modify adapter for updating the launch dialog
+	 */
+	ModifyListener modifyadapter = new ModifyListener() {
+		public void modifyText(ModifyEvent e) {
+			updateDialog();
+		}
+	};
+	
+	boolean initializing = false;
+	Combo baseline, targetCombo;
+	Button radioBaseline = null, 
+		   radioTarget = null, 
+		   radioInstall = null,
+		   radioReportOnly = null,
+		   baselinesButton = null, 
+		   targetsButton = null, 
+		   installButton = null,
+		   considerapi = null,
+		   considerinternal = null,
+		   consideruse = null,
+		   createhtml = null,
+		   openreport = null,
+		   cleanreportlocation = null,
+		   cleanhtmllocation = null;
+	ITargetHandle[] targetHandles = new ITargetHandle[0];
+	Text installLocation = null,
+		 searchScope = null,
+		 targetScope = null,
+		 reportlocation = null,
+		 description = null;
+	Group searchForGroup = null,
+		  searchInGroup = null;
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL);
+		GridLayout layout = (GridLayout) comp.getLayout();
+		layout.makeColumnsEqualWidth = true;
+		
+		Group group = SWTFactory.createGroup(comp, Messages.ApiUseScanTab_analuze, 3, 3, GridData.FILL_HORIZONTAL);
+		this.radioBaseline = SWTFactory.createRadioButton(group, Messages.ApiUseScanTab_api_baseline);
+		this.radioBaseline.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateTarget();
+			}
+		});
+		this.baseline = SWTFactory.createCombo(group, 
+				SWT.BORDER | SWT.FLAT | SWT.READ_ONLY, 
+				1, 
+				GridData.BEGINNING | GridData.FILL_HORIZONTAL, 
+				null);
+		GridData gd = (GridData) this.baseline.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		this.baseline.addSelectionListener(selectionadapter);
+		this.baselinesButton = SWTFactory.createPushButton(group, Messages.ApiUseScanTab_baselines, null);
+		this.baselinesButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				int bef = ApiUseScanTab.this.baseline.getSelectionIndex();
+				String name = null;
+				if (bef >= 0) {
+					name = ApiUseScanTab.this.baseline.getItem(bef);
+				}
+				SWTFactory.showPreferencePage(getTabShell(), "org.eclipse.pde.api.tools.ui.apiprofiles.prefpage", null); //$NON-NLS-1$
+				updateAvailableBaselines();
+				if (name != null) {
+					String[] items = ApiUseScanTab.this.baseline.getItems();
+					for (int i = 0; i < items.length; i++) {
+						if (name.equals(items[i])) {
+							ApiUseScanTab.this.baseline.select(i);
+							break;
+						}
+					}
+				}
+				updateDialog();
+			}
+		});
+		
+		this.radioTarget = SWTFactory.createRadioButton(group, Messages.ApiUseScanTab_target_definitions);
+		this.radioTarget.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateTarget();
+			}
+		});
+		this.targetCombo = SWTFactory.createCombo(group, 
+				SWT.BORDER | SWT.FLAT | SWT.READ_ONLY, 
+				1, 
+				GridData.BEGINNING | GridData.FILL_HORIZONTAL, 
+				null);
+		gd = (GridData) this.targetCombo.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		this.targetCombo.addSelectionListener(selectionadapter);
+		this.targetsButton = SWTFactory.createPushButton(group, Messages.ApiUseScanTab_targets, null);
+		this.targetsButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				int index = ApiUseScanTab.this.targetCombo.getSelectionIndex();
+				ITargetHandle handle = null;
+				if (index >= 0) {
+					handle = ApiUseScanTab.this.targetHandles[index];
+				}
+				SWTFactory.showPreferencePage(getTabShell(), "org.eclipse.pde.ui.TargetPlatformPreferencePage", null); //$NON-NLS-1$
+				updateAvailableTargets();
+				if (handle != null) {
+					for (int i = 0; i < targetHandles.length; i++) {
+						if (handle.equals(targetHandles[i])) {
+							targetCombo.select(i);
+							break;
+						}
+					}
+				}
+				updateDialog();
+			}
+		});
+		
+		this.radioInstall = SWTFactory.createRadioButton(group, Messages.ApiUseScanTab_install_location);
+		this.radioInstall.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateTarget();
+			}
+		});
+		this.installLocation = SWTFactory.createText(group, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL);
+		gd = (GridData) this.installLocation.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		this.installButton = SWTFactory.createPushButton(group, Messages.ApiUseScanTab_browse, null);
+		this.installButton.addSelectionListener(new SelectionAdapter(){
+			public void widgetSelected(SelectionEvent e) {
+				handleFolderBrowse(ApiUseScanTab.this.installLocation, Messages.ApiUseScanTab_select_install_location);
+				updateDialog();
+			}
+		});
+		this.radioReportOnly = SWTFactory.createRadioButton(group, Messages.ApiUseScanTab_generate_html_only);
+		gd = (GridData)this.radioReportOnly.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		gd.horizontalSpan = 2;
+		this.radioReportOnly.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				updateTarget();
+			}
+		});
+		
+		searchForGroup = SWTFactory.createGroup(comp, Messages.ApiUseScanTab_search_for, 2, 1, GridData.FILL_HORIZONTAL);
+		SWTFactory.createLabel(searchForGroup, Messages.ApiUseScanTab_references_to, 1);
+		this.targetScope = SWTFactory.createText(searchForGroup, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL);
+		this.targetScope.addModifyListener(modifyadapter);		
+		this.considerapi = SWTFactory.createCheckButton(searchForGroup, Messages.ApiUseScanTab_api_references, null, true, 2);
+		this.considerapi.addSelectionListener(selectionadapter);
+		this.considerinternal = SWTFactory.createCheckButton(searchForGroup, Messages.ApiUseScanTab_internal_references, null, true, 2);
+		this.considerinternal.addSelectionListener(selectionadapter);		
+		this.consideruse = SWTFactory.createCheckButton(searchForGroup, Messages.ApiUseScanTab_illegal_api_use, null, true, 2);
+		this.consideruse.addSelectionListener(selectionadapter);
+		
+		searchInGroup = SWTFactory.createGroup(comp, Messages.ApiUseScanTab_search_in, 2, 1, GridData.FILL_HORIZONTAL);
+		gd = (GridData)searchInGroup.getLayoutData();
+		gd.verticalAlignment = SWT.FILL;
+		SWTFactory.createLabel(searchInGroup, Messages.ApiUseScanTab_bundles_matching, 1);
+		this.searchScope = SWTFactory.createText(searchInGroup, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL);
+		this.searchScope.addModifyListener(modifyadapter);
+		
+		group = SWTFactory.createGroup(comp, Messages.ApiUseScanTab_reporting, 2, 2, GridData.FILL_HORIZONTAL);
+		SWTFactory.createLabel(group, Messages.ApiUseScanTab_report_location, 2);
+		this.reportlocation = SWTFactory.createText(group, SWT.SINGLE | SWT.FLAT | SWT.BORDER, 1, GridData.FILL_HORIZONTAL);
+		this.reportlocation.addModifyListener(modifyadapter);
+		gd = (GridData) this.reportlocation.getLayoutData();
+		gd.grabExcessHorizontalSpace = true;
+		Button browse = SWTFactory.createPushButton(group, Messages.ApiUseScanTab_brows_e_, null);
+		browse.addSelectionListener(new SelectionAdapter(){
+			public void widgetSelected(SelectionEvent e) {
+				handleFolderBrowse(ApiUseScanTab.this.reportlocation, "Select the location to write the report to"); //$NON-NLS-1$
+			}
+		});
+		this.cleanreportlocation = SWTFactory.createCheckButton(group, Messages.ApiUseScanTab_clean_report_dir, null, false, 2);
+		gd = (GridData) this.cleanreportlocation.getLayoutData();
+		this.cleanreportlocation.addSelectionListener(selectionadapter);
+		gd.horizontalIndent = 10;
+		
+		this.createhtml = SWTFactory.createCheckButton(group, Messages.ApiUseScanTab_create_html_report, null, false, 2);
+		this.createhtml.addSelectionListener(new SelectionAdapter(){
+			public void widgetSelected(SelectionEvent e) {
+				updateReportOptions();
+				updateDialog();
+			}
+		});
+		this.cleanhtmllocation = SWTFactory.createCheckButton(group, Messages.ApiUseScanTab_clean_html_report_dir, null, false, 2);
+		gd = (GridData) this.cleanhtmllocation.getLayoutData();
+		gd.horizontalIndent = 10;
+		this.cleanhtmllocation.addSelectionListener(selectionadapter);
+		this.openreport = SWTFactory.createCheckButton(group, Messages.ApiUseScanTab_open_report, null, false, 2);
+		gd = (GridData) this.openreport.getLayoutData();
+		gd.horizontalIndent = 10;
+		this.openreport.setEnabled(false);
+		this.openreport.addSelectionListener(selectionadapter);
+		SWTFactory.createLabel(group, Messages.ApiUseScanTab_description, 1);
+		this.description = SWTFactory.createText(group, SWT.BORDER | SWT.V_SCROLL | SWT.WRAP, 2, GridData.FILL_HORIZONTAL);
+		gd = (GridData) this.description.getLayoutData();
+		gd.heightHint = 40;
+		this.description.addModifyListener(modifyadapter);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IApiToolsHelpContextIds.API_USE_SCAN_TAB);
+		setControl(comp);
+	}
+	
+	/**
+	 * Avoid synthetic accessor
+	 */
+	void updateDialog() {
+		updateLaunchConfigurationDialog();
+	}
+	
+	/**
+	 * Avoid synthetic accessor
+	 */
+	Shell getTabShell() {
+		return getShell();
+	}
+	
+	/**
+	 * The selected target has changed (radio selection). Update control enabled state and dialog.
+	 */
+	void updateTarget() {
+		switch (getTargetKind()) {
+			case ApiUseLaunchDelegate.KIND_API_BASELINE: {
+				baseline.setEnabled(true);
+				baselinesButton.setEnabled(true);
+				targetCombo.setEnabled(false);
+				targetsButton.setEnabled(false);
+				installLocation.setEnabled(false);
+				installButton.setEnabled(false);
+				this.createhtml.setEnabled(true);
+				this.cleanreportlocation.setEnabled(true);
+				this.description.setEnabled(true);
+				setGroupEnablement(this.searchForGroup, true);
+				setGroupEnablement(this.searchInGroup, true);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_TARGET_DEFINITION: {
+				baseline.setEnabled(false);
+				baselinesButton.setEnabled(false);
+				targetCombo.setEnabled(true);
+				targetsButton.setEnabled(true);
+				installLocation.setEnabled(false);
+				installButton.setEnabled(false);
+				this.createhtml.setEnabled(true);
+				this.cleanreportlocation.setEnabled(true);
+				this.description.setEnabled(true);
+				setGroupEnablement(this.searchForGroup, true);
+				setGroupEnablement(this.searchInGroup, true);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_INSTALL_PATH: {
+				baseline.setEnabled(false);
+				baselinesButton.setEnabled(false);
+				targetCombo.setEnabled(false);
+				targetsButton.setEnabled(false);
+				installLocation.setEnabled(true);
+				installButton.setEnabled(true);
+				this.createhtml.setEnabled(true);
+				this.cleanreportlocation.setEnabled(true);
+				this.description.setEnabled(true);
+				setGroupEnablement(this.searchForGroup, true);
+				setGroupEnablement(this.searchInGroup, true);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_HTML_ONLY: {
+				baseline.setEnabled(false);
+				baselinesButton.setEnabled(false);
+				targetCombo.setEnabled(false);
+				targetsButton.setEnabled(false);
+				installLocation.setEnabled(false);
+				installButton.setEnabled(false);
+				this.createhtml.setSelection(true);
+				this.createhtml.setEnabled(false);
+				this.cleanreportlocation.setEnabled(false);
+				this.description.setEnabled(false);
+				setGroupEnablement(this.searchForGroup, false);
+				setGroupEnablement(this.searchInGroup, false);
+				break;
+			}
+		}
+		updateReportOptions();
+		updateLaunchConfigurationDialog();
+	}
+	
+	/**
+	 * Updates the report options
+	 */
+	void updateReportOptions() {
+		boolean enabled = this.createhtml.getSelection();
+		this.openreport.setEnabled(enabled);
+		this.cleanhtmllocation.setEnabled(enabled);
+	}
+	
+	/**
+	 * Sets the enabled state of all of the child of the given group
+	 * @param group
+	 * @param enabled
+	 */
+	void setGroupEnablement(Group group, boolean enabled) {
+		Control[] children = group.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			children[i].setEnabled(enabled);
+		}
+	}
+	
+	/**
+	 * @return the kind of target selected for the scan
+	 */
+	private int getTargetKind() {
+		if (this.radioBaseline.getSelection()) {
+			return ApiUseLaunchDelegate.KIND_API_BASELINE;
+		} else if (this.radioTarget.getSelection()) {
+			return ApiUseLaunchDelegate.KIND_TARGET_DEFINITION;
+		} else if (this.radioInstall.getSelection()) {
+			return ApiUseLaunchDelegate.KIND_INSTALL_PATH;
+		} else if(this.radioReportOnly.getSelection()) {
+			return ApiUseLaunchDelegate.KIND_HTML_ONLY;
+		} else {
+			return -1;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
+	 */
+	public String getName() {
+		return Messages.ApiUseScanTab_api_use_report;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#getImage()
+	 */
+	public Image getImage() {
+		return ApiUIPlugin.getSharedImage(IApiToolsConstants.IMG_ELCL_SETUP_APITOOLS);
+	}
+	
+	/**
+	 * Updates available target definitions.
+	 */
+	void updateAvailableTargets() {
+		List names = new ArrayList();
+		ITargetPlatformService service = getTargetService();
+		if (service != null) {
+			ITargetHandle[] handles = service.getTargets(null);
+			List defs = new ArrayList();
+			for (int i = 0; i < handles.length; i++) {
+				try {
+					defs.add(handles[i].getTargetDefinition());
+				} catch (CoreException e) {
+					// Suppress
+				}
+			}
+			Collections.sort(defs, new Comparator() {
+				public int compare(Object o1, Object o2) {
+					ITargetDefinition d1 = (ITargetDefinition) o1;
+					ITargetDefinition d2 = (ITargetDefinition) o2;
+					
+					final String name1 = d1.getName();
+					final String name2 = d2.getName();
+					if (name1 == null) {
+						if (name2 == null) {
+							return d1.getHandle().toString().compareTo(d2.getHandle().toString());
+						}
+						return -1;
+					} else if (name2 == null) {
+						return 1;
+					}
+					return name1.compareTo(name2);
+				}
+			});
+			targetHandles = new ITargetHandle[defs.size()];
+			for (int i = 0; i < defs.size(); i++) {
+				ITargetDefinition def = (ITargetDefinition) defs.get(i);
+				final ITargetHandle handle = def.getHandle();
+				targetHandles[i] = handle;
+				final String name = def.getName();
+				names.add(name == null ? handle.toString() : name);
+			}
+		}
+		this.targetCombo.setItems((String[]) names.toArray(new String[names.size()]));
+	}
+
+	/**
+	 * Returns the target service or <code>null</code>
+	 * 
+	 * @return service or <code>null</code>
+	 */
+	private ITargetPlatformService getTargetService() {
+		return (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+	}
+
+	/**
+	 * Updates available baselines.
+	 */
+	void updateAvailableBaselines() {
+		HashSet ids = new HashSet();
+		IApiBaseline[] baselines = ApiPlugin.getDefault().getApiBaselineManager().getApiBaselines();
+		for (int i = 0; i < baselines.length; i++) {
+			ids.add(baselines[i].getName());
+		}
+		this.baseline.setItems((String[]) ids.toArray(new String[ids.size()]));
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void initializeFrom(ILaunchConfiguration configuration) {
+		this.initializing = true;
+		try {
+			updateAvailableBaselines();
+			updateAvailableTargets();
+			updateRadioButtons(configuration);
+			restoreComboSelection(this.baseline, configuration.getAttribute(ApiUseLaunchDelegate.BASELINE_NAME, (String)null));
+			String memento = configuration.getAttribute(ApiUseLaunchDelegate.TARGET_HANDLE, (String)null);
+			if (memento != null) {
+				ITargetPlatformService service = getTargetService();
+				if (service != null) {
+					ITargetHandle handle = service.getTarget(memento);
+					for (int i = 0; i < this.targetHandles.length; i++) {
+						if (handle.equals(this.targetHandles[i])) {
+							this.targetCombo.select(i);
+							break;
+						}
+					}
+				}
+			}
+			if(this.targetCombo.getSelectionIndex() < 0) {
+				this.targetCombo.select(0);
+			}
+			this.installLocation.setText(configuration.getAttribute(ApiUseLaunchDelegate.INSTALL_PATH, IApiToolsConstants.EMPTY_STRING)); 
+			this.considerapi.setSelection(isSpecified(ApiUseLaunchDelegate.MOD_API_REFERENCES, configuration));
+			this.considerinternal.setSelection(isSpecified(ApiUseLaunchDelegate.MOD_INTERNAL_REFERENCES, configuration));
+			this.consideruse.setSelection(isSpecified(ApiUseLaunchDelegate.MOD_ILLEGAL_USE, configuration));
+			this.reportlocation.setText(configuration.getAttribute(ApiUseLaunchDelegate.REPORT_PATH, IApiToolsConstants.EMPTY_STRING)); 
+			this.cleanreportlocation.setSelection(isSpecified(ApiUseLaunchDelegate.CLEAN_XML, configuration));
+			boolean enabled = isSpecified(ApiUseLaunchDelegate.CREATE_HTML, configuration);
+			this.createhtml.setSelection(enabled);
+			this.openreport.setEnabled(enabled);
+			this.cleanhtmllocation.setEnabled(enabled);
+			this.openreport.setSelection(isSpecified(ApiUseLaunchDelegate.DISPLAY_REPORT, configuration));
+			this.cleanhtmllocation.setSelection(isSpecified(ApiUseLaunchDelegate.CLEAN_HTML, configuration));
+			this.searchScope.setText(configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, IApiToolsConstants.EMPTY_STRING)); 
+			this.targetScope.setText(configuration.getAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, IApiToolsConstants.EMPTY_STRING)); 
+			this.description.setText(configuration.getAttribute(ApiUseLaunchDelegate.DESCRIPTION, IApiToolsConstants.EMPTY_STRING)); 
+			updateTarget();
+		} catch (CoreException e) {
+			setErrorMessage(e.getStatus().getMessage());
+		}
+		finally {
+			this.initializing = false;
+		}
+	}
+	
+	/**
+	 * Updates the radio button group in {@link #initializeFrom(ILaunchConfiguration)} to ensure
+	 * the radio group stays up-to-date when a revert is performed
+	 * 
+	 * @param configuration
+	 */
+	void updateRadioButtons(ILaunchConfiguration configuration) throws CoreException {
+		int kind = configuration.getAttribute(ApiUseLaunchDelegate.TARGET_KIND, 0);
+		switch (kind) {
+			case ApiUseLaunchDelegate.KIND_API_BASELINE: {
+				radioBaseline.setSelection(true);
+				radioTarget.setSelection(false);
+				radioInstall.setSelection(false);
+				radioReportOnly.setSelection(false);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_TARGET_DEFINITION: {
+				radioBaseline.setSelection(false);
+				radioTarget.setSelection(true);
+				radioInstall.setSelection(false);
+				radioReportOnly.setSelection(false);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_INSTALL_PATH: {
+				radioBaseline.setSelection(false);
+				radioTarget.setSelection(false);
+				radioInstall.setSelection(true);
+				radioReportOnly.setSelection(false);
+				break;
+			}
+			case ApiUseLaunchDelegate.KIND_HTML_ONLY: {
+				radioBaseline.setSelection(false);
+				radioTarget.setSelection(false);
+				radioInstall.setSelection(false);
+				radioReportOnly.setSelection(true);
+				break;
+			}
+			default: {
+				radioBaseline.setSelection(true);
+				radioTarget.setSelection(false);
+				radioInstall.setSelection(false);
+				radioReportOnly.setSelection(false);
+			}
+		}
+	}
+	
+	/**
+	 * Returns <code>true</code> if the given modifier is set in the configuration
+	 * @param modifier
+	 * @param configuration
+	 * @return
+	 * @throws CoreException
+	 */
+	private boolean isSpecified(int modifier, ILaunchConfiguration configuration) throws CoreException {
+		int modifiers = configuration.getAttribute(ApiUseLaunchDelegate.SEARCH_MODIFIERS, 0);
+		return (modifiers & modifier) > 0;
+	}
+	
+	/**
+	 * Restores the selected item for the given combo based on the stored value from the 
+	 * configuration
+	 * 
+	 * @param combo
+	 * @param value
+	 * @param settings
+	 */
+	private void restoreComboSelection(Combo combo, String value) {
+		int idx = -1;
+		if(value != null) {
+			idx = combo.indexOf(value);
+			if(idx > -1) {
+				combo.select(idx);
+			}
+			else {
+				combo.select(0);
+			}
+		}
+		else {
+			combo.select(0);
+		}
+	}	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+		configuration.setAttribute(ApiUseLaunchDelegate.TARGET_KIND, getTargetKind());
+		configuration.setAttribute(ApiUseLaunchDelegate.BASELINE_NAME, this.baseline.getText().trim());
+		configuration.setAttribute(ApiUseLaunchDelegate.INSTALL_PATH, this.installLocation.getText().trim());
+		configuration.setAttribute(ApiUseLaunchDelegate.TARGET_HANDLE, getTargetMemento());
+		int modifiers = 0;
+		modifiers = consider(this.openreport, ApiUseLaunchDelegate.DISPLAY_REPORT, modifiers);
+		modifiers = consider(this.cleanhtmllocation, ApiUseLaunchDelegate.CLEAN_HTML, modifiers);
+		modifiers = consider(this.cleanreportlocation, ApiUseLaunchDelegate.CLEAN_XML, modifiers);
+		modifiers = consider(this.considerapi, ApiUseLaunchDelegate.MOD_API_REFERENCES, modifiers);
+		modifiers = consider(this.considerinternal, ApiUseLaunchDelegate.MOD_INTERNAL_REFERENCES, modifiers);
+		modifiers = consider(this.consideruse, ApiUseLaunchDelegate.MOD_ILLEGAL_USE, modifiers);
+		modifiers = consider(this.createhtml, ApiUseLaunchDelegate.CREATE_HTML, modifiers);
+		configuration.setAttribute(ApiUseLaunchDelegate.SEARCH_MODIFIERS, modifiers);
+		IPath path = new Path(this.reportlocation.getText().trim());
+		configuration.setAttribute(ApiUseLaunchDelegate.REPORT_PATH, path.toPortableString());
+		configuration.setAttribute(ApiUseLaunchDelegate.SEARCH_SCOPE, this.searchScope.getText().trim());
+		configuration.setAttribute(ApiUseLaunchDelegate.TARGET_SCOPE, this.targetScope.getText().trim());
+		configuration.setAttribute(ApiUseLaunchDelegate.DESCRIPTION, this.description.getText().trim());
+	}
+	
+	/**
+	 * Returns the memento for the selected target definition or <code>null</code> if none.
+	 * 
+	 * @return memento or <code>null</code>
+	 */
+	private String getTargetMemento() {
+		ITargetHandle handle = getTargetHandle();
+		if (handle == null) {
+			return null;
+		}
+		try {
+			return handle.getMemento();
+		} catch (CoreException e) {
+			setErrorMessage(e.getMessage());
+			return null;
+		}
+	}
+	
+	/**
+	 * Returns the handle of the selected target or <code>null</code> if none.
+	 * 
+	 * @return target handle or <code>null</code>
+	 */
+	private ITargetHandle getTargetHandle() {
+		int index = this.targetCombo.getSelectionIndex();
+		if (index >= 0) {
+			return this.targetHandles[index];
+		}
+		return null;
+	}
+	
+	private int consider(Button button, int mask, int modifiers) {
+		if (button.getSelection()) {
+			return modifiers | mask;
+		}
+		return modifiers;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+	 */
+	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+		int modifiers = ApiUseLaunchDelegate.MOD_INTERNAL_REFERENCES;
+		configuration.setAttribute(ApiUseLaunchDelegate.SEARCH_MODIFIERS, modifiers);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#isValid(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public boolean isValid(ILaunchConfiguration launchConfig) {
+		if(this.initializing) {
+			return true;
+		}
+		setErrorMessage(null);
+		
+		String text = this.reportlocation.getText().trim();
+		if(IApiToolsConstants.EMPTY_STRING.equals(text)) {
+			setErrorMessage(Messages.ApiUseScanTab_enter_report_location);
+			return false;
+		}
+		if(!this.considerapi.getSelection() && !this.considerinternal.getSelection() && !this.consideruse.getSelection()) {
+			setErrorMessage(Messages.ApiUseScanTab_must_search_something);
+			return false;
+		}
+		text = this.searchScope.getText().trim();
+		try {
+			Pattern.compile(text);
+		}
+		catch(PatternSyntaxException pse) {
+			setErrorMessage(NLS.bind(Messages.ApiUseScanTab_regex_problem, pse.getPattern()));
+			return false;
+		}
+		text = this.targetScope.getText().trim();
+		try {
+			Pattern.compile(text);
+		}
+		catch(PatternSyntaxException pse) {
+			setErrorMessage(NLS.bind(Messages.ApiUseScanTab_regex_problem, pse.getPattern()));
+			return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Handles browsing for a file with a given set of valid extensions
+	 * @param text
+	 * @param message
+	 */
+	void handleFileBrowse(Text text, String message, String[] extensions) {
+		FileDialog dialog = new FileDialog(getShell());
+		dialog.setFilterExtensions(extensions);
+		String loctext = text.getText().trim();
+		if (loctext.length() > 0) {
+			dialog.setFilterPath(loctext);
+		}
+		String newpath = dialog.open();
+		if(newpath != null) {
+			text.setText(newpath);
+		}
+	}
+	
+	/**
+	 * Handles the Browse... button being selected
+	 * @param text
+	 */
+	void handleFolderBrowse(Text text, String message) {
+		DirectoryDialog dialog = new DirectoryDialog(getShell());
+		dialog.setMessage(message);
+		String loctext = text.getText().trim();
+		if (loctext.length() > 0) {
+			dialog.setFilterPath(loctext);
+		}
+		String newpath = dialog.open();
+		if(newpath != null) {
+			text.setText(newpath);
+		}
+	}	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseTabGroup.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseTabGroup.java
new file mode 100644
index 0000000..8eae9a9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ApiUseTabGroup.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+
+/**
+ * The tab group for API use scanning
+ * 
+ * @since 1.0
+ */
+public class ApiUseTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
+	 */
+	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+		setTabs(new ILaunchConfigurationTab[]{
+				new ApiUseScanTab(),
+				new ApiUsePatternTab(),
+				new CommonTab()
+				});
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ArchivePatternPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ArchivePatternPage.java
new file mode 100644
index 0000000..f5e744c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ArchivePatternPage.java
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.pde.api.tools.ui.internal.use.ApiUsePatternTab.Pattern;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Wizard page for creating a pattern to exclude nested jars from 
+ * the scan.
+ * 
+ * @since 1.0.1
+ */
+public class ArchivePatternPage extends UsePatternPage {
+
+	static final String PAGE_NAME = "archive"; //$NON-NLS-1$
+	
+	private Text bundletext = null, patterntext = null;
+	private String bundle = null, archive = null;
+	
+	/**
+	 * Constructor
+	 * @param pattern
+	 */
+	protected ArchivePatternPage(String pattern) {
+		super(PAGE_NAME, Messages.ArchivePatternPage_nested_archive_pattern, null);
+		if(pattern != null) {
+			String[] parts = pattern.split(":"); //$NON-NLS-1$
+			if(parts.length == 2) {
+				this.bundle = parts[0];
+				this.archive = parts[1];
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_HORIZONTAL);
+		SWTFactory.createLabel(comp, Messages.ArchivePatternPage_bundle_name, 1);
+		this.bundletext = SWTFactory.createSingleText(comp, 1);
+		if(this.bundle != null) {
+			this.bundletext.setText(this.bundle);
+		}
+		this.bundletext.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				setDirty();
+				setPageComplete(isPageComplete());
+			}
+		});
+		SWTFactory.createLabel(comp, Messages.ArchivePatternPage_archive_name, 1);
+		this.patterntext = SWTFactory.createSingleText(comp, 1);
+		if(this.archive != null) {
+			this.patterntext.setText(this.archive);
+		}
+		this.patterntext.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				setDirty();
+				setPageComplete(isPageComplete());
+			}
+		});
+		setControl(comp);
+		this.bundletext.setFocus();
+		this.bundletext.selectAll();
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_ARCHIVE_PATTERN_WIZARD_PAGE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+	 */
+	public boolean isPageComplete() {
+		if(this.bundletext.getText().trim().length() == 0) {
+			if(pageDirty()) {
+				setErrorMessage(Messages.ArchivePatternPage_enter_bundle_name);
+			}
+			else {
+				setMessage(Messages.ArchivePatternPage_enter_bundle_name);
+			}
+			return false;
+		}
+		if(this.patterntext.getText().trim().length() == 0) {
+			if(pageDirty()) {
+				setErrorMessage(Messages.ArchivePatternPage_enter_a_pattern);
+			}
+			else {
+				setMessage(Messages.ArchivePatternPage_enter_a_pattern); 
+			}
+			return false;
+		}
+		resetMessage(this.bundle != null);
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#resetMessage(boolean)
+	 */
+	protected void resetMessage(boolean isediting) {
+		setErrorMessage(null);
+		if(isediting) {
+			setMessage(Messages.ArchivePatternPage_edit_acrhive_eclusion_pattern);
+		}
+		else {
+			setMessage(Messages.ArchivePatternPage_create_nested_pattern);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getPattern()
+	 */
+	public String getPattern() {
+		return this.bundletext.getText().trim()+':'+this.patterntext.getText().trim();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getKind()
+	 */
+	public int getKind() {
+		return Pattern.JAR;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
+	 */
+	public IWizardPage getNextPage() {
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/DescriptionPatternPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/DescriptionPatternPage.java
new file mode 100644
index 0000000..2bb9cd7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/DescriptionPatternPage.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.pde.api.tools.ui.internal.use.ApiUsePatternTab.Pattern;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Wizard page for creating a RegEx pattern for augmenting 
+ * a given page name in an API description.
+ * 
+ *   @since 1.0.1
+ */
+public class DescriptionPatternPage extends UsePatternPage {
+
+	static final String PAGE_NAME = "description"; //$NON-NLS-1$
+	
+	private int kind = -1;
+	private Button kbutton = null;
+	private Text patterntext = null;
+	private String pattern = null;
+	
+	/**
+	 * Constructor
+	 * @param pattern
+	 * @param kind
+	 */
+	public DescriptionPatternPage(String pattern, int kind) {
+		super(PAGE_NAME, Messages.DescriptionPatternPage_package_name_pattern, null);
+		this.pattern = pattern;
+		resetMessage(this.pattern != null);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_HORIZONTAL);
+		SWTFactory.createLabel(comp, Messages.DescriptionPatternPage_patetern, 1);
+		this.patterntext = SWTFactory.createSingleText(comp, 1);
+		this.patterntext.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				setDirty();
+				setPageComplete(isPageComplete());
+			}
+		});
+		if(this.pattern != null) {
+			this.patterntext.setText(this.pattern);
+		}
+		this.patterntext.selectAll();
+		this.patterntext.setFocus();
+		this.kbutton = SWTFactory.createCheckButton(comp, Messages.DescriptionPatternPage_api_pattern, null, this.kind == Pattern.API || this.kind == -1, 1);
+		setControl(comp);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_DESCRIPTION_PATTERN_WIZARD_PAGE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+	 */
+	public boolean isPageComplete() {
+		String newtext = this.patterntext.getText().trim();
+		if(IApiToolsConstants.EMPTY_STRING.equals(newtext)) {
+			if(pageDirty()) {
+				setErrorMessage(Messages.DescriptionPatternPage_provide_regex);
+			}
+			else {
+				setMessage(Messages.DescriptionPatternPage_provide_regex);
+			}
+			return false;
+		}
+		try {
+			java.util.regex.Pattern.compile(newtext);
+		}
+		catch(PatternSyntaxException pse) {
+			setErrorMessage(pse.getDescription());
+			return false;
+		}
+		resetMessage(this.pattern != null);
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#resetMessage(boolean)
+	 */
+	protected void resetMessage(boolean isediting) {
+		setErrorMessage(null);
+		if(isediting) {
+			setMessage(Messages.DescriptionPatternPage_edit_package_pattern);
+		}
+		else {
+			setMessage(Messages.DescriptionPatternPage_create_package__pattern);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
+	 */
+	public IWizardPage getNextPage() {
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getKind()
+	 */
+	public int getKind() {
+		return this.kbutton.getSelection() ? Pattern.API : Pattern.INTERNAL;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getPattern()
+	 */
+	public String getPattern() {
+		return this.patterntext.getText().trim();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/Messages.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/Messages.java
new file mode 100644
index 0000000..4fa9941
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/Messages.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * 
+ */
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.ui.internal.use.messages"; //$NON-NLS-1$
+	public static String ApiUsePatternTab_add;
+	public static String ApiUsePatternTab_archive;
+	public static String ApiUsePatternTab_API;
+	public static String ApiUsePatternTab_edit;
+	public static String ApiUsePatternTab_internal;
+	public static String ApiUsePatternTab_patterns;
+	public static String ApiUsePatternTab_patterns_title;
+	public static String ApiUsePatternTab_provide_regex;
+	public static String ApiUsePatternTab_remove;
+	public static String ApiUsePatternTab_report;
+	public static String ApiUsePatternTab_report_to;
+	public static String ApiUseScanJob_api_use_report;
+	public static String ApiUseScanJob_baseline_does_not_exist;
+	public static String ApiUseScanJob_baseline_name_missing;
+	public static String ApiUseScanJob_checking_component;
+	public static String ApiUseScanJob_cleaning_xml_loc;
+	public static String ApiUseScanJob_collecting_target_components;
+	public static String ApiUseScanJob_creating_html_reports;
+	public static String ApiUseScanJob_deleteing_file;
+	public static String ApiUseScanJob_deleting_old_reports;
+	public static String ApiUseScanJob_deleting_root_folder;
+	public static String ApiUseScanJob_generating_html_reports;
+	public static String ApiUseScanJob_intall_dir_does_no_exist;
+	public static String ApiUseScanJob_missing_xml_loc;
+	public static String ApiUseScanJob_no_bundles;
+	public static String ApiUseScanJob_preparing_for_scan;
+	public static String ApiUseScanJob_reading_target;
+	public static String ApiUseScanJob_scanning;
+	public static String ApiUseScanJob_skipping_component;
+	public static String ApiUseScanJob_target_api_unspecified;
+	public static String ApiUseScanJob_target_unspecified;
+	public static String ApiUseScanJob_unspecified_install_path;
+	public static String ApiUseScanTab_analuze;
+	public static String ApiUseScanTab_api_baseline;
+	public static String ApiUseScanTab_api_references;
+	public static String ApiUseScanTab_api_use_report;
+	public static String ApiUseScanTab_baselines;
+	public static String ApiUseScanTab_brows_e_;
+	public static String ApiUseScanTab_browse;
+	public static String ApiUseScanTab_bundles_matching;
+	public static String ApiUseScanTab_clean_html_report_dir;
+	public static String ApiUseScanTab_clean_report_dir;
+	public static String ApiUseScanTab_create_html_report;
+	public static String ApiUseScanTab_description;
+	public static String ApiUseScanTab_enter_report_location;
+	public static String ApiUseScanTab_generate_html_only;
+	public static String ApiUseScanTab_illegal_api_use;
+	public static String ApiUseScanTab_install_location;
+	public static String ApiUseScanTab_internal_references;
+	public static String ApiUseScanTab_must_search_something;
+	public static String ApiUseScanTab_open_report;
+	public static String ApiUseScanTab_references_to;
+	public static String ApiUseScanTab_regex_problem;
+	public static String ApiUseScanTab_report_location;
+	public static String ApiUseScanTab_reporting;
+	public static String ApiUseScanTab_search_for;
+	public static String ApiUseScanTab_search_in;
+	public static String ApiUseScanTab_select_install_location;
+	public static String ApiUseScanTab_target_definitions;
+	public static String ApiUseScanTab_targets;
+	public static String ArchivePatternPage_archive_name;
+	public static String ArchivePatternPage_bundle_name;
+	public static String ArchivePatternPage_create_nested_pattern;
+	public static String ArchivePatternPage_edit_acrhive_eclusion_pattern;
+	public static String ArchivePatternPage_enter_a_pattern;
+	public static String ArchivePatternPage_enter_bundle_name;
+	public static String ArchivePatternPage_nested_archive_pattern;
+	public static String DescriptionPatternPage_api_pattern;
+	public static String DescriptionPatternPage_create_package__pattern;
+	public static String DescriptionPatternPage_edit_package_pattern;
+	public static String DescriptionPatternPage_package_name_pattern;
+	public static String DescriptionPatternPage_patetern;
+	public static String DescriptionPatternPage_provide_regex;
+	public static String PatternSelectionPage_archive_pattern;
+	public static String PatternSelectionPage_archive_pattern_desc;
+	public static String PatternSelectionPage_description;
+	public static String PatternSelectionPage_must_select_type;
+	public static String PatternSelectionPage_no_desc;
+	public static String PatternSelectionPage_package_pattern;
+	public static String PatternSelectionPage_package_pattern_desc;
+	public static String PatternSelectionPage_pattern_types;
+	public static String PatternSelectionPage_report_conversion_pattern;
+	public static String PatternSelectionPage_report_conversion_pattern_desc;
+	public static String PatternSelectionPage_select_pattern;
+	public static String PatternSelectionPage_select_type;
+	public static String PatternWizard_use_scan_patterns;
+	public static String ReportPatternPage_create_conversion_pattern;
+	public static String ReportPatternPage_edit_conversion_pattern;
+	public static String ReportPatternPage_enter_conversion_pattern;
+	public static String ReportPatternPage_filter_from_pattern;
+	public static String ReportPatternPage_filter_to_pattern;
+	public static String ReportPatternPage_pattern;
+	public static String ReportPatternPage_report_conversion_pattern;
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternSelectionPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternSelectionPage.java
new file mode 100644
index 0000000..7859fc4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternSelectionPage.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.pde.api.tools.ui.internal.ApiUIPlugin;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Wizard page used to select the kind of pattern to create
+ * 
+ * @since 1.0.1
+ */
+public class PatternSelectionPage extends WizardPage {
+	
+	class PatternElement {
+		String name = null, desc = null, imgid = null, pname = null;
+		public PatternElement(String name, String desc, String imgid, String pname) {
+			this.name = name;
+			this.desc = desc;
+			this.imgid = imgid;
+			this.pname = pname;
+		}
+	}
+	
+	class LP extends LabelProvider {
+		public String getText(Object element) {
+			return ((PatternElement)element).name;
+		}
+		public Image getImage(Object element) {
+			PatternElement pelement = (PatternElement) element;
+			if(pelement.imgid != null) {
+				return ApiUIPlugin.getSharedImage(pelement.imgid);
+			}
+			return null; 
+		}
+	}
+	
+	static final String PAGE_NAME = "select"; //$NON-NLS-1$
+	
+	final PatternElement[] fgelements = {
+		new PatternElement(Messages.PatternSelectionPage_package_pattern, Messages.PatternSelectionPage_package_pattern_desc, null, DescriptionPatternPage.PAGE_NAME),
+		new PatternElement(Messages.PatternSelectionPage_archive_pattern, Messages.PatternSelectionPage_archive_pattern_desc, null, ArchivePatternPage.PAGE_NAME),
+		new PatternElement(Messages.PatternSelectionPage_report_conversion_pattern, Messages.PatternSelectionPage_report_conversion_pattern_desc, null, ReportPatternPage.PAGE_NAME)
+	};
+	
+	TableViewer viewer = null;
+	Text description = null;
+	
+	/**
+	 * Constructor
+	 */
+	protected PatternSelectionPage() {
+		super(PAGE_NAME, Messages.PatternSelectionPage_select_pattern, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 1, 2, GridData.FILL_BOTH);
+		SWTFactory.createWrapLabel(comp, Messages.PatternSelectionPage_pattern_types, 1);
+		this.viewer = new TableViewer(new Table(comp, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION));
+		this.viewer.setLabelProvider(new LP());
+		this.viewer.setContentProvider(new ArrayContentProvider());
+		this.viewer.setInput(fgelements);
+		this.viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				String desc = getSelectedElement().desc;
+				PatternSelectionPage.this.description.setText((desc == null ? Messages.PatternSelectionPage_no_desc : desc));
+				setPageComplete(isPageComplete());
+			}
+		});
+		this.viewer.setComparator(new ViewerComparator() {
+			public int compare(Viewer viewer, Object e1, Object e2) {
+				return ((PatternElement)e1).name.compareTo(((PatternElement)e2).name);
+			}
+		});
+		
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.heightHint = 100;
+		this.viewer.getTable().setLayoutData(gd);
+		SWTFactory.createHorizontalSpacer(comp, 1);
+		SWTFactory.createWrapLabel(comp, Messages.PatternSelectionPage_description, 1);
+		this.description = new Text(comp, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
+		this.description.setEnabled(false);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.heightHint = 50;
+		this.description.setLayoutData(gd);
+		if(fgelements != null && fgelements.length > 0) {
+			this.viewer.setSelection(new StructuredSelection(this.viewer.getElementAt(0)), true);
+		}
+		setControl(comp);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_PATTERN_SELECTION_WIZARD_PAGE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+	 */
+	public boolean isPageComplete() {
+		if(this.viewer.getSelection().isEmpty()) {
+			setErrorMessage(Messages.PatternSelectionPage_must_select_type);
+			return false;
+		}
+		setErrorMessage(null);
+		setMessage(Messages.PatternSelectionPage_select_type);
+		return true;
+	}
+	
+	/**
+	 * @return the selected element in the table
+	 */
+	PatternElement getSelectedElement() {
+		IStructuredSelection ss = (IStructuredSelection) this.viewer.getSelection();
+		return (PatternElement) ss.getFirstElement();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#getNextPage()
+	 */
+	public IWizardPage getNextPage() {
+		return getWizard().getPage(nextPage());
+	}
+	
+	/**
+	 * @return the id of the next page to show based on the selection on this page
+	 */
+	public String nextPage() {
+		PatternElement element = getSelectedElement();
+		if(element != null) {
+			return element.pname;
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternWizard.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternWizard.java
new file mode 100644
index 0000000..09d236e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/PatternWizard.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.pde.api.tools.ui.internal.use.ApiUsePatternTab.Pattern;
+
+/**
+ * Wizard for creating patterns
+ * 
+ * @since 1.0.1
+ */
+public class PatternWizard extends Wizard {
+	
+	private String pattern = null;
+	private int kind = -1;
+
+	/**
+	 * Constructor
+	 * @param pattern
+	 * @param kind
+	 */
+	public PatternWizard(String pattern, int kind) {
+		setWindowTitle(Messages.PatternWizard_use_scan_patterns);
+		this.pattern = pattern;
+		this.kind = kind;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#addPages()
+	 */
+	public void addPages() {
+		if(this.pattern == null) {
+			addPage(new PatternSelectionPage());
+			addPage(new DescriptionPatternPage(null, -1));
+			addPage(new ArchivePatternPage(null));
+			addPage(new ReportPatternPage(null, -1));
+		}
+		else {
+			switch(this.kind) {
+				case Pattern.API:
+				case Pattern.INTERNAL: {
+					addPage(new DescriptionPatternPage(this.pattern, this.kind));
+					break;
+				}
+				case Pattern.JAR: {
+					addPage(new ArchivePatternPage(this.pattern));
+					break;
+				}
+				case Pattern.REPORT_TO:
+				case Pattern.REPORT: {
+					addPage(new ReportPatternPage(this.pattern, this.kind));
+					break;
+				}
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#performFinish()
+	 */
+	public boolean performFinish() {
+		IWizardPage page = getStartingPage();
+		UsePatternPage upage = null;
+		if(page instanceof PatternSelectionPage) {
+			upage = (UsePatternPage) getPage(((PatternSelectionPage)page).nextPage());
+		}
+		else {
+			upage = (UsePatternPage) page;
+		}
+		this.pattern = upage.getPattern();
+		this.kind = upage.getKind();
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#canFinish()
+	 */
+	public boolean canFinish() {
+		String name = getStartingPage().getName();
+		if(!name.equals(PatternSelectionPage.PAGE_NAME)) {
+			return getStartingPage().isPageComplete();
+		}
+		IWizardPage page = getStartingPage().getNextPage();
+		if(page != null) {
+			return page.isPageComplete();
+		}
+		return false;
+	}
+	
+	/**
+	 * @return the pattern
+	 */
+	public String getPattern() {
+		return this.pattern;
+	}
+	
+	/**
+	 * @return the pattern kind
+	 */
+	public int getKind() {
+		return this.kind;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ReportPatternPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ReportPatternPage.java
new file mode 100644
index 0000000..fc7b7e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/ReportPatternPage.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsConstants;
+import org.eclipse.pde.api.tools.ui.internal.IApiToolsHelpContextIds;
+import org.eclipse.pde.api.tools.ui.internal.SWTFactory;
+import org.eclipse.pde.api.tools.ui.internal.use.ApiUsePatternTab.Pattern;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ *
+ */
+public class ReportPatternPage extends UsePatternPage {
+
+	static final String PAGE_NAME = "report"; //$NON-NLS-1$
+	
+	private Text patterntext = null;
+	int kind = Pattern.REPORT_TO;
+	Button to = null;
+	Button from = null;
+	String pattern = null;
+	
+	/**
+	 * Constructor
+	 * @param pattern
+	 */
+	public ReportPatternPage(String pattern, int kind) {
+		super(PAGE_NAME, Messages.ReportPatternPage_report_conversion_pattern, null);
+		this.pattern = pattern;
+		this.kind = kind;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getKind()
+	 */
+	public int getKind() {
+		return this.kind;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#getPattern()
+	 */
+	public String getPattern() {
+		return this.patterntext.getText().trim();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_HORIZONTAL);
+		this.to = SWTFactory.createRadioButton(comp, Messages.ReportPatternPage_filter_to_pattern);
+		this.to.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				ReportPatternPage.this.kind = Pattern.REPORT_TO;
+			}
+		});
+		this.from = SWTFactory.createRadioButton(comp, Messages.ReportPatternPage_filter_from_pattern);
+		this.from.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				ReportPatternPage.this.kind = Pattern.REPORT;
+			}
+		});
+		if(this.kind == Pattern.REPORT) {
+			this.from.setSelection(true);
+		}
+		else {
+			this.to.setSelection(true);
+			this.kind = Pattern.REPORT_TO;
+		}
+		SWTFactory.createLabel(comp, Messages.ReportPatternPage_pattern, 1);
+		this.patterntext = SWTFactory.createSingleText(comp, 1);
+		if(this.pattern != null) {
+			this.patterntext.setText(this.pattern);
+		}
+		this.patterntext.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				setDirty();
+				setPageComplete(isPageComplete());
+			}
+		});
+		this.patterntext.selectAll();
+		this.patterntext.setFocus();
+		setControl(comp);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IApiToolsHelpContextIds.APITOOLS_REPORT_PATTERN_WIZARD_PAGE);
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+	 */
+	public boolean isPageComplete() {
+		String newtext = this.patterntext.getText().trim();
+		if(IApiToolsConstants.EMPTY_STRING.equals(newtext)) {
+			if(pageDirty()) {
+				setErrorMessage(Messages.ReportPatternPage_enter_conversion_pattern);
+			}
+			else {
+				setMessage(Messages.ReportPatternPage_enter_conversion_pattern);
+			}
+			return false;
+		}
+		try {
+			java.util.regex.Pattern.compile(newtext);
+		}
+		catch(PatternSyntaxException pse) {
+			setErrorMessage(pse.getMessage());
+			return false;
+		}
+		resetMessage(this.pattern != null);
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.ui.internal.use.UsePatternPage#resetMessage(boolean)
+	 */
+	protected void resetMessage(boolean isediting) {
+		setErrorMessage(null);
+		if(isediting) {
+			setMessage(Messages.ReportPatternPage_edit_conversion_pattern);
+		}
+		else {
+			setMessage(Messages.ReportPatternPage_create_conversion_pattern);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/UsePatternPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/UsePatternPage.java
new file mode 100644
index 0000000..c509eae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/UsePatternPage.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.ui.internal.use;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.pde.api.tools.ui.internal.use.ApiUsePatternTab.Pattern;
+
+/**
+ * Abstract page that describes a page for creating {@link Pattern}s
+ * 
+ * @since 1.0.1
+ */
+public abstract class UsePatternPage extends WizardPage {
+
+	boolean dirty = false;
+	
+	/**
+	 * Constructor
+	 * @param pageName
+	 * @param title
+	 * @param titleImage
+	 */
+	protected UsePatternPage(String pageName, String title, ImageDescriptor titleImage) {
+		super(pageName, title, titleImage);
+	}
+
+	protected boolean pageDirty() {
+		return this.dirty;
+	}
+	
+	protected void setDirty() {
+		this.dirty = true;
+	}
+	
+	protected void resetMessage(boolean isediting) {
+		//do nothing by default
+	}
+	
+	/**
+	 * @return the kind of the pattern
+	 * @see Pattern for pattern kinds
+	 */
+	public abstract int getKind();
+	
+	/**
+	 * @return the pattern itself
+	 */
+	public abstract String getPattern();
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/messages.properties b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/messages.properties
new file mode 100644
index 0000000..9e83264
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/use/messages.properties
@@ -0,0 +1,104 @@
+###############################################################################
+# Copyright (c) 2009, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+ApiUsePatternTab_add=A&dd...
+ApiUsePatternTab_archive=archive
+ApiUsePatternTab_API=API
+ApiUsePatternTab_edit=&Edit
+ApiUsePatternTab_internal=internal
+ApiUsePatternTab_patterns=Specify name &patterns to be considered as API / internal or to filter nested JAR files from certain bundles:
+ApiUsePatternTab_patterns_title=Patterns
+ApiUsePatternTab_provide_regex=You must provide a regular expression.
+ApiUsePatternTab_remove=&Remove
+ApiUsePatternTab_report=report - from
+ApiUsePatternTab_report_to=report - to
+ApiUseScanJob_api_use_report=API Use Report: {0}
+ApiUseScanJob_baseline_does_not_exist=API baseline {0} does not exist
+ApiUseScanJob_baseline_name_missing=API baseline name unspecified
+ApiUseScanJob_checking_component=checking component: {0}
+ApiUseScanJob_cleaning_xml_loc=Cleaning existing XML location
+ApiUseScanJob_collecting_target_components=Collecting components for scan
+ApiUseScanJob_creating_html_reports=Creating HTML reports...
+ApiUseScanJob_deleteing_file=deleting file: {0}
+ApiUseScanJob_deleting_old_reports=Deleting old reports:
+ApiUseScanJob_deleting_root_folder=deleting root folder: {0}
+ApiUseScanJob_generating_html_reports=Generating HTML reports
+ApiUseScanJob_intall_dir_does_no_exist=Install location is does not exist or is not a directory: {0}
+ApiUseScanJob_missing_xml_loc=Missing XML report location
+ApiUseScanJob_no_bundles=No bundles found in directory: {0}
+ApiUseScanJob_preparing_for_scan=Preparing for use scan
+ApiUseScanJob_reading_target=Reading target definition...
+ApiUseScanJob_scanning=Scanning directoy for bundles...
+ApiUseScanJob_skipping_component=skipping component: {0}
+ApiUseScanJob_target_api_unspecified=Target for API search unspecified
+ApiUseScanJob_target_unspecified=Target definition unspecified
+ApiUseScanJob_unspecified_install_path=Install path unspecified
+ApiUseScanTab_analuze=Analyze
+ApiUseScanTab_api_baseline=&API baseline:
+ApiUseScanTab_api_references=A&PI references
+ApiUseScanTab_api_use_report=API Use Report
+ApiUseScanTab_baselines=Baseli&nes...
+ApiUseScanTab_brows_e_=Brows&e...
+ApiUseScanTab_browse=Bro&wse...
+ApiUseScanTab_bundles_matching=Bun&dles matching:
+ApiUseScanTab_clean_html_report_dir=Clean &HTML report location
+ApiUseScanTab_clean_report_dir=Clean report director&y before reporting new results
+ApiUseScanTab_create_html_report=Create HT&ML reports
+ApiUseScanTab_description=De&scription:
+ApiUseScanTab_enter_report_location=You must enter a report location
+ApiUseScanTab_generate_html_only=Generate HTML report for e&xisting use scan
+ApiUseScanTab_illegal_api_use=Illegal API &Use
+ApiUseScanTab_install_location=D&irectory:
+ApiUseScanTab_internal_references=Internal referen&ces
+ApiUseScanTab_must_search_something=You must search for at least one of API, internal or illegal use references
+ApiUseScanTab_open_report=Open report when searc&h completes
+ApiUseScanTab_references_to=Re&ferences to:
+#{0} in this case is the invalid regular expression the user entered
+ApiUseScanTab_regex_problem=The regular expression is not valid: {0}
+ApiUseScanTab_report_location=Report &Output Location:
+ApiUseScanTab_reporting=Reporting
+ApiUseScanTab_search_for=Search For
+ApiUseScanTab_search_in=Search In
+ApiUseScanTab_select_install_location=Select the install location
+ApiUseScanTab_target_definitions=&Target definition:
+ApiUseScanTab_targets=Tar&gets...
+ArchivePatternPage_archive_name=A&rchive Name:
+ArchivePatternPage_bundle_name=B&undle Name:
+ArchivePatternPage_create_nested_pattern=Create a nested archive exclusion pattern
+ArchivePatternPage_edit_acrhive_eclusion_pattern=Edit the nested archive exclusion pattern
+ArchivePatternPage_enter_a_pattern=You must enter an archive path
+ArchivePatternPage_enter_bundle_name=You must enter a bundle name
+ArchivePatternPage_nested_archive_pattern=Nested Archive Pattern
+DescriptionPatternPage_api_pattern=&API pattern
+DescriptionPatternPage_create_package__pattern=Create a new package pattern
+DescriptionPatternPage_edit_package_pattern=Edit the package pattern
+DescriptionPatternPage_package_name_pattern=Package Name Pattern
+DescriptionPatternPage_patetern=&Pattern:
+DescriptionPatternPage_provide_regex=You must provide a regular expression
+PatternSelectionPage_archive_pattern=Archive Pattern
+PatternSelectionPage_archive_pattern_desc=Allows you to specify nested archives that should be skipped during a scan
+PatternSelectionPage_description=&Description:
+PatternSelectionPage_must_select_type=You must select a kind of pattern to create
+PatternSelectionPage_no_desc=No Description
+PatternSelectionPage_package_pattern=Package Pattern
+PatternSelectionPage_package_pattern_desc=Allows you to specify packages that should be API or internal without having to update your bundle manifest
+PatternSelectionPage_pattern_types=&Pattern types:
+PatternSelectionPage_report_conversion_pattern=Report Conversion Pattern
+PatternSelectionPage_report_conversion_pattern_desc=Allows you to create a package name pattern to filter the references that will be reported. References are filtered based on their fully qualified package name.
+PatternSelectionPage_select_pattern=Select Pattern Type
+PatternSelectionPage_select_type=Select the type of pattern to create
+PatternWizard_use_scan_patterns=Use Scan Patterns
+ReportPatternPage_create_conversion_pattern=Create a report generation pattern
+ReportPatternPage_edit_conversion_pattern=Edit the report generation pattern
+ReportPatternPage_enter_conversion_pattern=You must enter a report conversion pattern
+ReportPatternPage_filter_from_pattern=Filter references &from this pattern
+ReportPatternPage_filter_to_pattern=Filter references &to this pattern
+ReportPatternPage_pattern=&Pattern:
+ReportPatternPage_report_conversion_pattern=Report Conversion Pattern
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/views/APIToolingView.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/views/APIToolingView.java
index 272680b..a593011 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/views/APIToolingView.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/views/APIToolingView.java
@@ -77,16 +77,16 @@ public class APIToolingView extends ViewPart implements ISessionListener {
 	public static final String ID = "org.eclipse.pde.api.tools.ui.views.apitooling.views.apitoolingview"; //$NON-NLS-1$
 
 	public TreeViewer viewer;
-	private Label sessionDescription = null;
-	private IAction removeActiveSessionAction;
-	private IAction removeAllSessionsAction;
-	private IAction selectSessionAction;
-	private Action doubleClickAction;
-	private ExportSessionAction exportSessionAction;
-	private NavigateAction nextAction;
-	private NavigateAction previousAction;
-	private ExpandAllAction expandallAction;
-	private CollapseAllAction collapseallAction;
+	Label sessionDescription = null;
+	IAction removeActiveSessionAction;
+	IAction removeAllSessionsAction;
+	IAction selectSessionAction;
+	Action doubleClickAction;
+	ExportSessionAction exportSessionAction;
+	NavigateAction nextAction;
+	NavigateAction previousAction;
+	ExpandAllAction expandallAction;
+	CollapseAllAction collapseallAction;
 	private IPropertySheetPage page;
 
 	class ViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
@@ -243,7 +243,7 @@ public class APIToolingView extends ViewPart implements ISessionListener {
 					}
 				}
 				case IDelta.TYPE_PARAMETER_ELEMENT_TYPE : return JavaUI.getSharedImages().getImage(org.eclipse.jdt.ui.ISharedImages.IMG_OBJS_PUBLIC);
-				case IDelta.API_PROFILE_ELEMENT_TYPE :
+				case IDelta.API_BASELINE_ELEMENT_TYPE :
 				case IDelta.API_COMPONENT_ELEMENT_TYPE : {
 					String componentVersionId = delta.getComponentVersionId();
 					IApiComponent component = null;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage.java
index c1688ac..6f63e9a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiBaselineWizardPage.java
@@ -314,13 +314,13 @@ public class ApiBaselineWizardPage extends WizardPage {
 		}
 	}
 	
-	private IApiBaseline fProfile = null;
+	IApiBaseline fProfile = null;
 	private String originalname = null;
 	/**
 	 * Flag to know if the baselines' content has actually changed, or just some other attribute
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=267875
 	 */
-	private boolean contentchange = false;
+	boolean contentchange = false;
 	
 	/**
 	 * We need to know if we are initializing the page to not respond to changed events
@@ -335,7 +335,7 @@ public class ApiBaselineWizardPage extends WizardPage {
 	 */
 	private Text nametext = null;
 	private TreeViewer treeviewer = null;
-	private Combo locationcombo = null;
+	Combo locationcombo = null;
 	private Button browsebutton = null,
 				   reloadbutton = null;
 	/**
@@ -425,7 +425,7 @@ public class ApiBaselineWizardPage extends WizardPage {
 		
 		SWTFactory.createWrapLabel(comp, WizardMessages.ApiProfileWizardPage_13, 4);
 		Tree tree = new Tree(comp, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		GridData gd = new GridData(GridData.FILL_BOTH);
 		gd.heightHint = 250;
 		gd.horizontalSpan = 4;
 		tree.setLayoutData(gd);
@@ -643,7 +643,7 @@ public class ApiBaselineWizardPage extends WizardPage {
 	}
 	
 	/**
-	 * Cleans up the working copy if the page is cancelled
+	 * Cleans up the working copy if the page is canceled
 	 */
 	public void cancel() {
 		if(fProfile != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage.java
index db8d25b..2d3a6b9 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ApiToolingSetupWizardPage.java
@@ -28,8 +28,8 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jface.dialogs.IDialogSettings;
@@ -175,11 +175,11 @@ public class ApiToolingSetupWizardPage extends UserInputWizardPage {
 	private static final String SETTINGS_SECTION = "ApiToolingSetupWizardPage"; //$NON-NLS-1$
 	private static final String SETTINGS_REMOVECXML = "remove_componentxml"; //$NON-NLS-1$
 	
-	private CheckboxTableViewer tableviewer = null;
-	private HashSet checkedset = new HashSet();
-	private Button removecxml = null;
-	private UpdateJob updatejob = new UpdateJob();
-	private StringFilter filter = new StringFilter();
+	CheckboxTableViewer tableviewer = null;
+	HashSet checkedset = new HashSet();
+	Button removecxml = null;
+	UpdateJob updatejob = new UpdateJob();
+	StringFilter filter = new StringFilter();
 	private Text checkcount = null;
 	
 	/**
@@ -404,7 +404,7 @@ public class ApiToolingSetupWizardPage extends UserInputWizardPage {
 	 * @param project
 	 * @param cxml
 	 */
-	private void createTagChanges(CompositeChange projectchange, IJavaProject project, File cxml) {
+	void createTagChanges(CompositeChange projectchange, IJavaProject project, File cxml) {
 		try {
 			HashMap map = new HashMap();
 			ApiDescriptionProcessor.collectTagUpdates(project, cxml, map);
@@ -443,16 +443,14 @@ public class ApiToolingSetupWizardPage extends UserInputWizardPage {
 	 * @return the mapping of text edits to the IFile they occur on
 	 */
 	private void collectChanges() {
+		final ApiToolingSetupRefactoring refactoring = (ApiToolingSetupRefactoring) getRefactoring();
 		IRunnableWithProgress op = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
 				Object[] projects = checkedset.toArray(new IProject[checkedset.size()]);
 				IProject project = null;
-				if(monitor == null) {
-					monitor = new NullProgressMonitor();
-				}
-				monitor.beginTask(IApiToolsConstants.EMPTY_STRING, projects.length);
-				monitor.setTaskName(WizardMessages.ApiToolingSetupWizardPage_7);
-				ApiToolingSetupRefactoring refactoring = (ApiToolingSetupRefactoring) getRefactoring();
+				SubMonitor localmonitor = SubMonitor.convert(monitor);
+				localmonitor.beginTask(IApiToolsConstants.EMPTY_STRING, projects.length);
+				localmonitor.setTaskName(WizardMessages.ApiToolingSetupWizardPage_7);
 				refactoring.resetRefactoring();
 				boolean remove = removecxml.getSelection();
 				CompositeChange pchange = null;
@@ -461,7 +459,7 @@ public class ApiToolingSetupWizardPage extends UserInputWizardPage {
 					pchange = new CompositeChange(project.getName());
 					refactoring.addChange(pchange);
 					pchange.add(new ProjectUpdateChange(project));
-					monitor.subTask(MessageFormat.format(WizardMessages.ApiToolingSetupWizardPage_4, new String[] {project.getName()}));
+					localmonitor.subTask(MessageFormat.format(WizardMessages.ApiToolingSetupWizardPage_4, new String[] {project.getName()}));
 					IResource cxml = project.findMember(IApiCoreConstants.COMPONENT_XML_NAME);
 					if(cxml != null) {
 						//collect the changes for doc
@@ -470,10 +468,7 @@ public class ApiToolingSetupWizardPage extends UserInputWizardPage {
 							pchange.add(new DeleteResourceChange(cxml.getFullPath(), true));
 						}
 					}
-					if(monitor.isCanceled()) {
-						break;
-					}
-					monitor.worked(1);
+					Util.updateMonitor(localmonitor, 1);
 				}
 			}
 		};
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareOperation.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareOperation.java
index 956616c..99ff865 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareOperation.java
@@ -169,7 +169,7 @@ public class CompareOperation extends Job {
 						case IJavaElement.JAVA_PROJECT:
 							IApiComponent apiComponent = workspaceBaseline.getApiComponent(javaProject.getElementName());
 							if (apiComponent != null) {
-								scope.add(apiComponent);
+								scope.addElement(apiComponent);
 							}
 							break;
 					}
@@ -225,7 +225,7 @@ public class CompareOperation extends Job {
 		try {
 			IApiTypeRoot typeRoot = apiComponent.findTypeRoot(classFile.getType().getFullyQualifiedName());
 			if (typeRoot != null) {
-				scope.add(typeRoot);
+				scope.addElement(typeRoot);
 			}
 		} catch (CoreException e) {
 			ApiPlugin.log(e);
@@ -238,7 +238,7 @@ public class CompareOperation extends Job {
 			try {
 				IApiTypeRoot typeRoot = component.findTypeRoot(types[i].getFullyQualifiedName());
 				if (typeRoot != null) {
-					scope.add(typeRoot);
+					scope.addElement(typeRoot);
 				}
 			} catch (CoreException e) {
 				ApiPlugin.log(e);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareToBaselineWizardPage.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareToBaselineWizardPage.java
index 1ea611d..a001449 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareToBaselineWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/CompareToBaselineWizardPage.java
@@ -55,7 +55,7 @@ public class CompareToBaselineWizardPage extends WizardPage {
 	
 	private IStructuredSelection selection = null;
 	private Combo baselinecombo = null;
-	private String baselineName = null;
+	String baselineName = null;
 	private Link link = null;
 	
 	/**
@@ -126,7 +126,7 @@ public class CompareToBaselineWizardPage extends WizardPage {
 	/**
 	 * Initialize the page controls, etc
 	 */
-	private void initialize() {
+	void initialize() {
 		IApiBaselineManager apiBaselineManager = ApiPlugin.getDefault().getApiBaselineManager();
 		IApiBaseline defaultBaseline = apiBaselineManager.getDefaultApiBaseline();
 		String defaultBaselineName = defaultBaseline != null ? defaultBaseline.getName() : null;
@@ -193,7 +193,7 @@ public class CompareToBaselineWizardPage extends WizardPage {
 	 * @param selection
 	 * @return the {@link IAdaptable} for the current selection context
 	 */
-	private IAdaptable getAdaptable() {
+	IAdaptable getAdaptable() {
 		Object o = this.selection.getFirstElement();
 		if(o instanceof IAdaptable) {
 			IAdaptable adapt = (IAdaptable) o;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ProjectUpdateChange.java b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ProjectUpdateChange.java
index 78d3c41..83cdda9 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ProjectUpdateChange.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/ProjectUpdateChange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,9 +15,9 @@ import org.eclipse.core.resources.IProjectDescription;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.ltk.core.refactoring.Change;
@@ -81,21 +81,19 @@ public class ProjectUpdateChange extends Change {
 	 * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public Change perform(IProgressMonitor pm) throws CoreException {
-		if(pm == null) {
-			pm = new NullProgressMonitor();
-		}
-		pm.beginTask(IApiToolsConstants.EMPTY_STRING, 1);
-		pm.setTaskName(WizardMessages.ProjectUpdateChange_adding_nature_and_builder);
+		SubMonitor localmonitor = SubMonitor.convert(pm);
+		localmonitor.beginTask(IApiToolsConstants.EMPTY_STRING, 1);
+		localmonitor.setTaskName(WizardMessages.ProjectUpdateChange_adding_nature_and_builder);
 		IProjectDescription description = this.fProject.getDescription();
 		String[] prevNatures = description.getNatureIds();
 		String[] newNatures = new String[prevNatures.length + 1];
 		System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
 		newNatures[prevNatures.length] = ApiPlugin.NATURE_ID;
 		description.setNatureIds(newNatures);
-		this.fProject.setDescription(description, pm);
+		this.fProject.setDescription(description, localmonitor);
 		IJavaProject javaProject = JavaCore.create(this.fProject);
 		// make sure we get rid of the previous api description file
-		ApiDescriptionManager.getDefault().clean(javaProject, true, true);
+		ApiDescriptionManager.getManager().clean(javaProject, true, true);
 		// we want a full build of the converted project next time a build is triggered
 		if (ResourcesPlugin.getWorkspace().isAutoBuilding()) {
 			Util.getBuildJob(new IProject[] { this.fProject }).schedule();
@@ -106,9 +104,7 @@ public class ProjectUpdateChange extends Change {
 			 */
 			BuildState.setLastBuiltState(this.fProject, null);
 		}
-		if(!pm.isCanceled()) {
-			pm.worked(1);
-		}
+		Util.updateMonitor(localmonitor, 1);
 		return null;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/.externalToolBuilders/Build Api Tools Ant Support Jar.launch b/eclipse/plugins/org.eclipse.pde.api.tools/.externalToolBuilders/Build Api Tools Ant Support Jar.launch
index 1c0bcba..956bdbf 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/.externalToolBuilders/Build Api Tools Ant Support Jar.launch	
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/.externalToolBuilders/Build Api Tools Ant Support Jar.launch	
@@ -1,6 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_CLEAN_TARGETS" value="clean,"/>
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/org.eclipse.pde.api.tools/lib" type="2"/>
</resources>}"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 <listEntry value="/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml"/>
 </listAttribute>
@@ -11,8 +14,8 @@
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
 <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.pde.api.tools"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="workingSet" name="workingSet">
<item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.pde.api.tools/src_ant" type="2"/>
</launchConfigurationWorkingSet>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/org.eclipse.pde.api.tools/src_ant" type="2"/>
</resources>}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
 <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
\ No newline at end of file
+</launchConfiguration>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/.options b/eclipse/plugins/org.eclipse.pde.api.tools/.options
index 20d36c1..43e39ba 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/.options
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/.options
@@ -33,3 +33,9 @@ org.eclipse.pde.api.tools/debug/apifilterstore=false
 
 #for api analyzer
 org.eclipse.pde.api.tools/debug/apianalyzer=false
+
+#for api descriptions
+org.eclipse.pde.api.tools/debug/apidescription=false
+
+#for our workspace delta processor
+org.eclipse.pde.api.tools/debug/workspacedeltaprocessor=false
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/.project b/eclipse/plugins/org.eclipse.pde.api.tools/.project
index a50b460..7d79f35 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/.project
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/.project
@@ -22,7 +22,6 @@
 		</buildCommand>
 		<buildCommand>
 			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<triggers>full,incremental,</triggers>
 			<arguments>
 				<dictionary>
 					<key>LaunchConfigHandle</key>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.jdt.core.prefs
index a293dd0..6bce50b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Nov 28 09:54:01 EST 2008
+#Mon Jul 06 12:16:02 CDT 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
@@ -28,14 +28,14 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
 org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
@@ -51,9 +51,9 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warni
 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
@@ -62,7 +62,7 @@ org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
@@ -81,7 +81,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.pde.prefs
index ff9cc10..292d035 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/.settings/org.eclipse.pde.prefs
@@ -1,18 +1,35 @@
-#Tue Apr 15 11:13:36 EDT 2008
-compilers.p.unresolved-ex-points=0
+#Wed Jun 02 08:55:19 EDT 2010
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=1
+compilers.p.build.output.library=2
+compilers.p.build.source.library=2
+compilers.p.build.src.includes=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-bundle-classpath-entries=2
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=0
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
 compilers.p.unknown-element=1
-compilers.p.unknown-resource=1
-compilers.p.discouraged-class=1
 compilers.p.unknown-identifier=1
-compilers.p.unknown-class=1
-compilers.incompatible-environment=1
-compilers.p.unknown-attribute=1
-compilers.p.no-required-att=0
-compilers.p.missing-bundle-classpath-entries=2
-eclipse.preferences.version=1
-compilers.p.build=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
-compilers.p.not-externalized-att=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
index 03152c3..29484e4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.api.tools;singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.202.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.osgi;bundle-version="[3.4.0,4.0.0)",
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.osgi;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.text;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.filebuffers;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ant.core;bundle-version="[3.1.300,4.0.0)",
- org.objectweb.asm;bundle-version="[3.1.0,4.0.0)",
+ org.objectweb.asm;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.team.core;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="1.2.0"
 Export-Package: org.eclipse.pde.api.tools.internal;x-friends:="org.eclipse.pde.api.tools.tests,org.eclipse.pde.api.tools.ui",
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/build.properties b/eclipse/plugins/org.eclipse.pde.api.tools/build.properties
index a76c27b..cc76619 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/build.properties
@@ -17,10 +17,16 @@ bin.includes = .,\
                about.html,\
                META-INF/,\
                plugin.xml,\
-               lib/apitooling-ant.jar
+               lib/apitooling-ant.jar,\
+               scripts/
 jars.extra.classpath=platform:/plugin/org.apache.ant/lib/ant.jar,platform:/plugin/org.objectweb.asm
 jars.compile.order = .,\
                      lib/apitooling-ant.jar
 source.lib/apitooling-ant.jar = src_ant/
 output.lib/apitooling-ant.jar = bin_ant/
-src.includes = about.html
+src.includes = about.html,\
+               xml/,\
+               scripts/,\
+               report/,\
+               doc/
+bin.excludes = scripts/buildApiToolsAntSupportJar.xml
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/buildnotes_api_tools.html b/eclipse/plugins/org.eclipse.pde.api.tools/buildnotes_api_tools.html
index cfc7c8a..9ad574a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/buildnotes_api_tools.html
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/buildnotes_api_tools.html
@@ -4,21 +4,45 @@
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Author" content="IBM">
    <meta name="GENERATOR" content="Mozilla/4.75 [en] (WinNT; U) [Netscape]">
-   <title>PDE API Tools 3.5.1 Release Notes</title>
+   <title>Eclipse 3.6 API Tools Build Notes</title>
 </head>
 <body>
-<h1> Eclipse API Tools 3.5.1 Build Notes</h1>
+<h1>Eclipse 3.6 API Tools Build Notes</h1>
 
 <h2>Summary of API changes</h2>
 <p>None.</p>
 <!-- NEW -->
+<h2>October 27, 2009</h2>
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293157">Bug 293157</a>: OSGi/J2SE-1.5 profile is missing method AbstractTableModel.getValueAt(int, int)
 
-<h2>July 9, 2009</h2>
+<h2>July 31, 2009</h2>
 <h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279552">Bug 279552</a>: NPE running API use scan<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279524">Bug 279524</a>: API compare for jar in PDE classpath container<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285122">Bug 285122</a>: NPE during build in MethodLeakDetector.matchesSourceApiRestrictions<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=285050">Bug 285050</a>: TVT35:TCT335: CHS: Duplicate Mnemonic Keys<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=284898">Bug 284898</a>: IllegalArgumentException visiting type instruction with a type name that is one char<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282803">Bug 282803</a>: [Update] NPE in ReferenceExtractor.visitMethod(ReferenceExtractor.java:1164)
+
+<h2>July 28, 2009</h2>
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=275020">Bug 275020</a>: Reverting workspace only works for compatibility tests<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=283573">Bug 283573</a>: ReferenceExtractor is failing to lookup method signatures (caching problem)<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=281206">Bug 281206</a>: Not able to export as html from API Tooling view<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282803">Bug 282803</a>: NPE in ReferenceExtractor.visitMethod(ReferenceExtractor.java:1164)<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282923">Bug 282923</a>: Unused strings in plugin.properties for api tools UI<br>
 <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282739">Bug 282739</a>: performance hit on workspace start to build problem detectors<br>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279697">Bug 279697</a>: ArrayIndexOutOfBoundsException running use scan<br>
+
+<h2>July 6, 2009</h2>
+<h3>Problem Reports Fixed</h3>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=282052">Bug 282052</a>: API search engine could continue searching when an error occurs<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=276114">Bug 276114</a>: API tools code has a lot of JDT warnings<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280288">Bug 280288</a>: Default API use search requestor does too much work configuring backing scope<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=277925">Bug 277925</a>: Delta engine could report deprecation changes<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279524">Bug 279524</a>: API compare for jar in PDE classpath container<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279945">Bug 279945</a>: API tools wastes memory re-creating API types<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279552">Bug 279552</a>: NPE running API use scan<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=279729">Bug 279729</a>: ZipException scanning bundle with other entries on bundle classpath<br>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=280286">Bug 280286</a>: Search engine should report results after a threshold 
 
 <p>
     <a href="http://validator.w3.org/check?uri=referer"><img
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/plugin.properties b/eclipse/plugins/org.eclipse.pde.api.tools/plugin.properties
index cbaa9de..8953214 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2007, 2008 IBM Corporation and others.
+# Copyright (c) 2007, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,4 +19,5 @@ markerApiProfile.name = Default API Baseline Problem
 markerSinceTags.name = @since tag problem
 markerUnsupportedTags.name = Unsupported Tag Problem
 markerApiComponentResolution.name = Resolution Problem
+markerFatalProblem.name = Fatal Problem
 markerUnusedFilters.name = Unused API Problem Filter Problem
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/plugin.xml b/eclipse/plugins/org.eclipse.pde.api.tools/plugin.xml
index fd8e428..49c87d4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/plugin.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
 <!--
-    Copyright (c) 2009 IBM Corporation and others.
+    Copyright (c) 2009, 2010 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
@@ -49,6 +49,23 @@
     <attribute name="apiMarkerID"/>
  </extension>
  <extension
+       id="org.eclipse.pde.api.tools.fatal_problem"
+       name="%markerFatalProblem.name"
+       point="org.eclipse.core.resources.markers">
+    <super
+          type="org.eclipse.core.resources.problemmarker">
+    </super>
+    <persistent
+          value="true">
+    </persistent>
+    <attribute
+          name="kind">
+    </attribute>
+    <attribute
+          name="apiMarkerID">
+    </attribute>
+ </extension>
+ <extension
        id="org.eclipse.pde.api.tools.version_numbering"
        name="%markerVersionNumbering.name"
        point="org.eclipse.core.resources.markers">
@@ -112,6 +129,49 @@
 	<!-- Extension: API preferences                                         -->
 	<!-- ================================================================== -->
  <extension
+       id="org.eclipse.pde.api.tools.unused_filters"
+       name="%markerUnusedFilters.name"
+       point="org.eclipse.core.resources.markers">
+    <super
+          type="org.eclipse.core.resources.problemmarker">
+    </super>
+    <super
+          type="org.eclipse.core.resources.textmarker">
+    </super>
+    <persistent
+          value="true">
+    </persistent>
+    <attribute
+          name="kind">
+    </attribute>
+    <attribute
+          name="apiMarkerID">
+    </attribute>
+ </extension>
+ <extension
+       id="org.eclipse.pde.api.tools.unsupported_tags"
+       name="%markerUnsupportedTags.name"
+       point="org.eclipse.core.resources.markers">
+    <super
+          type="org.eclipse.core.resources.problemmarker">
+    </super>
+    <super
+          type="org.eclipse.core.resources.textmarker">
+    </super>
+    <persistent
+          value="true">
+    </persistent>
+    <attribute
+          name="flags">
+    </attribute>
+    <attribute
+          name="kind">
+    </attribute>
+    <attribute
+          name="apiMarkerID">
+    </attribute>
+ </extension>
+ <extension
        point="org.eclipse.core.runtime.preferences">
     <initializer
           class="org.eclipse.pde.api.tools.internal.ApiPluginPreferenceInitializer">
@@ -164,60 +224,32 @@
           name="apitooling.apiuse_reportconversion">
     </antTask>
     <antTask
-          class="org.eclipse.pde.api.tools.internal.tasks.PluggableApiUseTask"
+          class="org.eclipse.pde.api.tools.internal.tasks.ApiMigrationTask"
+          library="lib/apitooling-ant.jar"
+          name="apitooling.apimigration">
+    </antTask>
+    <antTask
+          class="org.eclipse.pde.api.tools.internal.tasks.ApiMigrationReportConversionTask"
+          library="lib/apitooling-ant.jar"
+          name="apitooling.apimigration_reportconversion">
+    </antTask>
+    <antTask
+          class="org.eclipse.pde.api.tools.internal.tasks.APIDeprecationTask"
           library="lib/apitooling-ant.jar"
-          name="apitooling.pluggableapiuse">
+          name="apitooling.apideprecation">
+    </antTask>
+    <antTask
+          class="org.eclipse.pde.api.tools.internal.tasks.APIDeprecationReportConversionTask"
+          library="lib/apitooling-ant.jar"
+          name="apitooling.apideprecation_reportconversion">
     </antTask>
 
  </extension>
  <extension
-       id="org.eclipse.pde.api.tools.unsupported_tags"
-       name="%markerUnsupportedTags.name"
-       point="org.eclipse.core.resources.markers">
-    <super
-          type="org.eclipse.core.resources.problemmarker">
-    </super>
-    <super
-          type="org.eclipse.core.resources.textmarker">
-    </super>
-    <persistent
-          value="true">
-    </persistent>
-    <attribute
-          name="flags">
-    </attribute>
-    <attribute
-          name="kind">
-    </attribute>
-    <attribute
-          name="apiMarkerID">
-    </attribute>
- </extension>
- <extension
        point="org.eclipse.team.core.fileTypes">
     <fileTypes
           extension="api_filters"
           type="text">
     </fileTypes>
  </extension>
- <extension
-       id="org.eclipse.pde.api.tools.unused_filters"
-       name="%markerUnusedFilters.name"
-       point="org.eclipse.core.resources.markers">
-    <super
-          type="org.eclipse.core.resources.problemmarker">
-    </super>
-    <super
-          type="org.eclipse.core.resources.textmarker">
-    </super>
-    <persistent
-          value="true">
-    </persistent>
-    <attribute
-          name="kind">
-    </attribute>
-    <attribute
-          name="apiMarkerID">
-    </attribute>
- </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.properties b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.properties
index 7b931b3..b4303ae 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.properties
@@ -14,6 +14,7 @@ apifreeze=org.eclipse.pde.api.tools.internal.tasks.APIFreezeTask
 apifreeze_reportcoversion=org.eclipse.pde.api.tools.internal.tasks.APIFreezeReportConversionTask
 apianalysis=org.eclipse.pde.api.tools.internal.tasks.APIToolsAnalysisTask
 apianalysis_reportconversion=org.eclipse.pde.api.tools.internal.tasks.AnalysisReportConversionTask
+apimigration=org.eclipse.pde.api.tools.internal.tasks.ApiMigrationTask
+apimigration_reportconversion=org.eclipse.pde.api.tools.internal.tasks.ApiMigrationReportConversionTask
 apifile_generation=org.eclipse.pde.api.tools.internal.tasks.ApiFileGenerationTask
-pluggable_usetask=org.eclipse.pde.api.tools.internal.tasks.PluggableApiUseTask
 comparetask=org.eclipse.pde.api.tools.internal.tasks.CompareTask
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.xml b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.xml
index 7d1ae09..6591397 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.xml
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/api-tasks.xml
@@ -15,8 +15,9 @@
 	- 'apifreeze_reportcoversion' from org.eclipse.pde.api.tools.internal.tasks.APIFreezeReportConversionTask
 	- 'apianalysis from org.eclipse.pde.api.tools.internal.tasks.APIToolsAnalysisTask
 	- 'apianalysis_reportconversion' from org.eclipse.pde.api.tools.internal.tasks.AnalysisReportConversionTask
+	- 'apimigration' from org.eclipse.pde.api.tools.internal.tasks.ApiMigrationTask
+	- 'apimigration_reportconversion' org.eclipse.pde.api.tools.internal.tasks.ApiMigrationReportConversionTask
 	- 'apifile_generation' from org.eclipse.pde.api.tools.internal.tasks.ApiFileGenerationTask
-	- 'pluggable_usetask' from org.eclipse.pde.api.tools.internal.tasks.PluggableApiUseTask
 	- 'comparetask' from org.eclipse.pde.api.tools.internal.tasks.CompareTask
 -->
 <project name="apitask" basedir="." default="run">
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml
index 8f5c173..0d1aaa3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/scripts/buildApiToolsAntSupportJar.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-	Copyright (c) IBM Corporation and others 2008, 2009 This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
+	Copyright (c) IBM Corporation and others 2008, 2010 This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
 	
 	All Platform Debug contexts, those for org.eclipse.debug.ui, are located in this file
 	All contexts are grouped by their relation, with all relations grouped alphabetically.
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiAccess.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiAccess.java
index d7bca78..4316968 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiAccess.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiAccess.java
@@ -23,7 +23,7 @@ public class ApiAccess implements IApiAccess {
 
 	public static final IApiAccess NORMAL_ACCESS = new NormalAccess();
 	
-	private static class NormalAccess implements IApiAccess {
+	static class NormalAccess implements IApiAccess {
 		/* (non-Javadoc)
 		 * @see org.eclipse.pde.api.tools.internal.provisional.IApiAccess#getAccessLevel()
 		 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiBaselineManager.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiBaselineManager.java
index 8737caa..fb1eedf 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiBaselineManager.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiBaselineManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,20 +23,15 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
 import org.eclipse.core.resources.ISaveContext;
 import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
@@ -47,17 +42,11 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.pde.api.tools.internal.model.ApiBaseline;
+import org.eclipse.pde.api.tools.internal.model.ApiModelCache;
 import org.eclipse.pde.api.tools.internal.model.ApiModelFactory;
 import org.eclipse.pde.api.tools.internal.model.StubApiComponent;
+import org.eclipse.pde.api.tools.internal.model.WorkspaceBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiBaselineManager;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
@@ -65,6 +54,7 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.DependencyManager;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -79,7 +69,7 @@ import org.xml.sax.helpers.DefaultHandler;
  * @since 1.0.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
-public final class ApiBaselineManager implements IApiBaselineManager, ISaveParticipant, IElementChangedListener, IResourceChangeListener {
+public final class ApiBaselineManager implements IApiBaselineManager, ISaveParticipant {
 	
 	/**
 	 * Constant used for controlling tracing in the API tool builder
@@ -143,7 +133,7 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	private IPath savelocation = null;
 	
 	/**
-	 * If the cache of profiles needs to be saved or not.
+	 * If the cache of baselines needs to be saved or not.
 	 */
 	private boolean fNeedsSaving = false;
 	
@@ -158,8 +148,6 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	private ApiBaselineManager(boolean framework) {
 		if(framework) {
 			ApiPlugin.getDefault().addSaveParticipant(this);
-			JavaCore.addElementChangedListener(this, ElementChangedEvent.POST_CHANGE);
-			ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_BUILD);
 			savelocation = ApiPlugin.getDefault().getStateLocation().append(".api_profiles").addTrailingSeparator(); //$NON-NLS-1$
 		}
 	}
@@ -206,14 +194,14 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.IApiBaselineManager#removeApiProfile(java.lang.String)
+	 * @see org.eclipse.pde.api.tools.IApiBaselineManager#removeApiBaseline(java.lang.String)
 	 */
 	public synchronized boolean removeApiBaseline(String name) {
 		if(name != null) {
 			initializeStateCache();
-			IApiBaseline profile = (IApiBaseline) baselinecache.remove(name);
-			if(profile != null) {
-				profile.dispose();
+			IApiBaseline baseline = (IApiBaseline) baselinecache.remove(name);
+			if(baseline != null) {
+				baseline.dispose();
 				boolean success = true;
 				if(savelocation == null) {
 					return success;
@@ -224,6 +212,9 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 					success &= file.delete();
 				}
 				fNeedsSaving = true;
+				
+				//flush the model cache
+				ApiModelCache.getCache().removeElementInfo(baseline);
 				return success;
 			}
 		}
@@ -232,8 +223,8 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	
 	/**
 	 * Loads the infos for the given baseline from persisted storage (the *.profile file)
-	 * @param baseline
-	 * @throws CoreException
+	 * @param baseline the given baseline
+	 * @throws CoreException if an exception occurs while loading baseline infos
 	 */
 	public void loadBaselineInfos(IApiBaseline baseline) throws CoreException {
 		initializeStateCache();
@@ -265,7 +256,7 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	}
 	
 	/**
-	 * Initializes the profile cache lazily. Only performs work
+	 * Initializes the baseline cache lazily. Only performs work
 	 * if the current cache has not been created yet
 	 * @throws FactoryConfigurationError 
 	 * @throws ParserConfigurationException 
@@ -314,7 +305,7 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	
 	/**
 	 * Persists all of the cached elements to individual xml files named 
-	 * with the id of the API profile
+	 * with the id of the API baseline
 	 * @throws IOException 
 	 */
 	private void persistStateCache() throws CoreException, IOException {
@@ -350,6 +341,8 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 				try {
 					fout = new FileOutputStream(file);
 					writeBaselineDescription(baseline, fout);
+					// need to save the api baseline state in order to be able to reload it later
+					handlecache.put(baseline.getName(), file.getAbsolutePath());
 					fout.flush();
 				}
 				finally {
@@ -377,29 +370,29 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	}
 
 	/**
-	 * Returns an XML description of the given profile.
+	 * Returns an XML description of the given baseline.
 	 * 
-	 * @param profile API profile
-	 * @return XML
-	 * @throws CoreException
+	 * @param baseline the given API baseline
+	 * @return XML string representation of the given baseline
+	 * @throws CoreException if an exception occurs while retrieving the xml string representation
 	 */
-	private String getProfileXML(IApiBaseline profile) throws CoreException {
+	private String getProfileXML(IApiBaseline baseline) throws CoreException {
 		Document document = Util.newDocument();
 		Element root = document.createElement(IApiXmlConstants.ELEMENT_APIPROFILE);
 		document.appendChild(root);
-		root.setAttribute(IApiXmlConstants.ATTR_NAME, profile.getName());
+		root.setAttribute(IApiXmlConstants.ATTR_NAME, baseline.getName());
 		root.setAttribute(IApiXmlConstants.ATTR_VERSION, IApiXmlConstants.API_PROFILE_CURRENT_VERSION);
-		String location = profile.getLocation();
+		String location = baseline.getLocation();
 		if (location != null) {
 			root.setAttribute(IApiXmlConstants.ATTR_LOCATION, location);
 		}
 		Element celement = null;
-		IApiComponent[] components = profile.getApiComponents();
+		IApiComponent[] components = baseline.getApiComponents();
 		for(int i = 0, max = components.length; i < max; i++) {
 			IApiComponent comp = components[i];
 			if (!comp.isSystemComponent()) {
 				celement = document.createElement(IApiXmlConstants.ELEMENT_APICOMPONENT);
-				celement.setAttribute(IApiXmlConstants.ATTR_ID, comp.getId());
+				celement.setAttribute(IApiXmlConstants.ATTR_ID, comp.getSymbolicName());
 				celement.setAttribute(IApiXmlConstants.ATTR_VERSION, comp.getVersion());
 				celement.setAttribute(IApiXmlConstants.ATTR_LOCATION, new Path(comp.getLocation()).toPortableString());
 				root.appendChild(celement);
@@ -421,11 +414,11 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	}	
 	
 	/**
-	 * Constructs and returns a profile from the given input stream (persisted profile).
+	 * Restore a baseline from the given input stream (persisted baseline).
 	 * 
-	 * @param stream input stream
-	 * @return API profile
-	 * @throws CoreException if unable to restore the profile
+	 * @param baseline the given baseline to restore
+	 * @param stream the given input stream
+	 * @throws CoreException if unable to restore the baseline
 	 */
 	private void restoreBaseline(IApiBaseline baseline, InputStream stream) throws CoreException {
 		long start = System.currentTimeMillis();
@@ -501,10 +494,10 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 			}
 		}
 		if (baseline == null) {
-			abort("Invalid profile description", null); //$NON-NLS-1$
+			abort("Invalid baseline description", null); //$NON-NLS-1$
 		}
 		if(DEBUG) {
-			System.out.println("Time to restore a persisted profile : " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("Time to restore a persisted baseline : " + (System.currentTimeMillis() - start) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 	
@@ -542,9 +535,9 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	}
 	
 	/**
-	 * Returns if the given name is an existing profile name
+	 * Returns if the given name is an existing baseline name
 	 * @param name
-	 * @return true if the given name is an existing profile name, false otherwise
+	 * @return true if the given name is an existing baseline name, false otherwise
 	 */
 	public boolean isExistingProfileName(String name) {
 		if(baselinecache == null) {
@@ -559,10 +552,10 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 	public void stop() {
 		try {
 			if(baselinecache != null) {
-				// we should first dispose all existing profiles
+				// we should first dispose all existing baselines
 				for (Iterator iterator = this.baselinecache.values().iterator(); iterator.hasNext();) {
-					IApiBaseline profile = (IApiBaseline) iterator.next();
-					profile.dispose();
+					IApiBaseline baseline = (IApiBaseline) iterator.next();
+					baseline.dispose();
 				}
 				this.baselinecache.clear();
 			}
@@ -582,8 +575,6 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 		finally {
 			if(ApiPlugin.isRunningInFramework()) {
 				ApiPlugin.getDefault().removeSaveParticipant(this);
-				JavaCore.removeElementChangedListener(this);
-				ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
 			}
 		}
 	}
@@ -635,21 +626,19 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 		}
 		return null;
 	}	
-	
+
 	/**
-	 * Disposes the workspace profile such that a new one will be created
+	 * Disposes the workspace baseline such that a new one will be created
 	 * on the next request.
 	 */
-	private synchronized void disposeWorkspaceBaseline(IProject project) {
+	synchronized void disposeWorkspaceBaseline() {
 		if (workspacebaseline != null) {
-			if (acceptProject(project) || workspacebaseline.getApiComponent(project) != null) {
-				if(DEBUG) {
-					System.out.println("disposing workspace baseline"); //$NON-NLS-1$
-				}
-				workspacebaseline.dispose();
-				StubApiComponent.disposeAllCaches();
-				workspacebaseline = null;
+			if(DEBUG) {
+				System.out.println("disposing workspace baseline"); //$NON-NLS-1$
 			}
+			workspacebaseline.dispose();
+			StubApiComponent.disposeAllCaches();
+			workspacebaseline = null;
 		}
 	}
 
@@ -661,14 +650,19 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 		long time = System.currentTimeMillis();
 		IApiBaseline baseline = null; 
 		try {
-			baseline = ApiModelFactory.newApiBaseline(ApiBaselineManager.WORKSPACE_API_BASELINE_ID);
+			baseline = new WorkspaceBaseline();
 			// populate it with only projects that are API aware
-			IPluginModelBase[] models = PluginRegistry.getActiveModels();
-			List componentsList = new ArrayList(models.length);
+			Set ids = DependencyManager.getSelfandDependencies(PluginRegistry.getWorkspaceModels(), null);
+			List componentsList = new ArrayList(ids.size());
 			IApiComponent apiComponent = null;
-			for (int i = 0, length = models.length; i < length; i++) {
+			IPluginModelBase model = null;
+			for (Iterator iter = ids.iterator(); iter.hasNext();) {
+				model = PluginRegistry.findModel((String) iter.next());
+				if(model == null) {
+					continue;
+				}
 				try {
-					apiComponent = ApiModelFactory.newApiComponent(baseline, models[i]);
+					apiComponent = ApiModelFactory.newApiComponent(baseline, model);
 					if (apiComponent != null) {
 						componentsList.add(apiComponent);
 					}
@@ -679,189 +673,20 @@ public final class ApiBaselineManager implements IApiBaselineManager, ISaveParti
 			baseline.addApiComponents((IApiComponent[]) componentsList.toArray(new IApiComponent[componentsList.size()]));
 		} finally {
 			if (DEBUG) {
-				System.out.println("Time to create a workspace profile : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.println("Time to create a workspace baseline : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
 		return baseline;
 	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
-	 */
-	public void elementChanged(ElementChangedEvent event) {
-		if(!ApiPlugin.isRunningInFramework()) {
-			return;
-		}
-		Object obj = event.getSource();
-		if(obj instanceof IJavaElementDelta) {
-			processJavaElementDeltas(((IJavaElementDelta)obj).getAffectedChildren(), null);
-		}
-	}
-	
-	/**
-	 * Processes the java element deltas of interest
-	 * @param deltas
-	 */
-	private synchronized void processJavaElementDeltas(IJavaElementDelta[] deltas, IJavaProject project) {
-		try {
-			for(int i = 0; i < deltas.length; i++) {
-				IJavaElementDelta delta = deltas[i];
-				switch(delta.getElement().getElementType()) {
-					case IJavaElement.JAVA_PROJECT: {
-						IJavaProject proj = (IJavaProject) delta.getElement();
-						IProject pj = proj.getProject();
-						int flags = delta.getFlags();
-						switch (delta.getKind()) {
-							case IJavaElementDelta.CHANGED: {
-								if( (flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0 ||
-									(flags & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0 ||
-									(flags & IJavaElementDelta.F_CLOSED) != 0 ||
-									(flags & IJavaElementDelta.F_OPENED) != 0) {
-										if(DEBUG) {
-											System.out.println("--> processing CLASSPATH CHANGE/CLOSE/OPEN project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-										}
-										disposeWorkspaceBaseline(pj);
-								}
-								if (!acceptProject(pj)) {
-									return;
-								}
-								if((flags & IJavaElementDelta.F_CHILDREN) != 0) {
-									if(DEBUG) {
-										System.out.println("--> processing child deltas of project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-									}
-									processJavaElementDeltas(delta.getAffectedChildren(), proj);
-								} else {
-									IResourceDelta[] resourcedeltas = delta.getResourceDeltas();
-									if(resourcedeltas != null) {
-										IResourceDelta rdelta = null;
-										for (int j = 0; j < resourcedeltas.length; j++) {
-											rdelta = resourcedeltas[j].findMember(new Path(Util.MANIFEST_NAME));
-											if(rdelta!= null && rdelta.getKind() == IResourceDelta.CHANGED && (rdelta.getFlags() & IResourceDelta.CONTENT) > 0) {
-												if(DEBUG) {
-													System.out.println("--> processing manifest delta"); //$NON-NLS-1$
-												}
-												disposeWorkspaceBaseline(pj);
-												break;
-											}
-										}
-									}
-								}
-								break;
-							}
-							case IJavaElementDelta.REMOVED: {
-								if((flags & IJavaElementDelta.F_MOVED_TO) != 0) {
-									if(DEBUG) {
-										System.out.println("--> processing PROJECT RENAME: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-									}
-									disposeWorkspaceBaseline(pj);
-								}
-								break;
-							}
-						}
-						break;
-					}
-					case IJavaElement.PACKAGE_FRAGMENT_ROOT: {
-						IPackageFragmentRoot root = (IPackageFragmentRoot) delta.getElement();
-						if(DEBUG) {
-							System.out.println("processed package fragment root delta: ["+root.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-						}
-						switch(delta.getKind()) {
-							case IJavaElementDelta.CHANGED: {
-								if(DEBUG) {
-									System.out.println("processed children of CHANGED package fragment root: ["+root.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-								}
-								processJavaElementDeltas(delta.getAffectedChildren(), project);
-								break;
-							}
-						}
-						break;
-					}
-					case IJavaElement.PACKAGE_FRAGMENT: {
-						IPackageFragment fragment = (IPackageFragment) delta.getElement();
-						if(delta.getKind() == IJavaElementDelta.REMOVED) {
-							handlePackageRemoval(project.getProject(), fragment);
-						}
-						break;
-					}
-				}
-			}
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
-		}
-	}
-		
-	/**
-	 * Handles the specified {@link IPackageFragment} being removed.
-	 * When a packaged is removed, we:
-	 * <ol>
-	 * <li>Remove the package from the cache of resolved providers
-	 * 	of that package (in the API baseline)</li>
-	 * </ol>
-	 * @param project
-	 * @param fragment
-	 * @throws CoreException
-	 */
-	private void handlePackageRemoval(IProject project, IPackageFragment fragment) throws CoreException {
-		if(DEBUG) {
-			System.out.println("processed package fragment REMOVE delta: ["+fragment.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		((ApiBaseline)getWorkspaceBaseline()).clearPackage(fragment.getElementName());
-	}
-	
-	/**
-	 * Returns if we should care about the specified project
-	 * @param project
-	 * @return true if the project is an 'API aware' project, false otherwise
-	 */
-	private boolean acceptProject(IProject project) {
-		try {
-			return project.isAccessible() && project.hasNature(ApiPlugin.NATURE_ID);
-		}
-		catch(CoreException e) {
-			return false;
-		}
-	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiBaselineManager#getWorkspaceComponent(java.lang.String)
 	 */
-	public void resourceChanged(IResourceChangeEvent event) {
-		if(!ApiPlugin.isRunningInFramework()) {
-			return;
-		}
-		// clean all API errors when a project description changes
-		IResourceDelta delta = event.getDelta();
-		if (delta != null) {
-			IResourceDelta[] children = delta.getAffectedChildren(IResourceDelta.CHANGED);
-			boolean dispose = false;
-			IResource resource = null;
-			IProject modifiedProject = null;
-			for (int i = 0; i < children.length; i++) {
-				resource = children[i].getResource();
-				if (children[i].getResource().getType() == IResource.PROJECT) {
-					if ((children[i].getFlags() & IResourceDelta.DESCRIPTION) != 0) {
-						IProject project = (IProject)resource;
-						if (project.isAccessible()) {
-							try {
-								if (!project.getDescription().hasNature(ApiPlugin.NATURE_ID)) {
-									IJavaProject jp = JavaCore.create(project);
-									if (jp.exists()) {
-										ApiDescriptionManager.getDefault().clean(jp, true, true);
-									}
-								}
-							} catch (CoreException e) {
-								ApiPlugin.log(e.getStatus());
-							}
-							modifiedProject = project;
-							dispose = true;
-						}
-					}
-				}
-			}
-			if(dispose) {
-				disposeWorkspaceBaseline(modifiedProject);
-			}
+	public synchronized IApiComponent getWorkspaceComponent(String symbolicName) {
+		IApiBaseline baseline = getWorkspaceBaseline();
+		if (baseline != null) {
+			return baseline.getApiComponent(symbolicName);
 		}
+		return null;
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescription.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescription.java
index 18d22c7..5adde2b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescription.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.pde.api.tools.internal.descriptors.ElementDescriptorImpl;
@@ -54,7 +55,14 @@ public class ApiDescription implements IApiDescription {
 	/**
 	 * Debug flag
 	 */
-	protected static final boolean DEBUG = Util.DEBUG;
+	static boolean DEBUG = Util.DEBUG;
+	
+	/**
+	 * Method used for initializing tracing for API descriptions
+	 */
+	public static void setDebug(boolean debugValue) {
+		DEBUG = debugValue || Util.DEBUG;
+	}
 	
 	/**
 	 * API component identifier of the API component that owns this
@@ -164,6 +172,9 @@ public class ApiDescription implements IApiDescription {
 		 * @return true if this node has API visibility false otherwise
 		 */
 		protected boolean hasApiVisibility(ManifestNode node) {
+			if(DEBUG) {
+				System.out.println("Checking node for API visibility:"+node); //$NON-NLS-1$
+			}
 			if(node != null) {
 				if(VisibilityModifiers.isAPI(node.visibility)) {
 					return true;
@@ -185,6 +196,9 @@ public class ApiDescription implements IApiDescription {
 		 * @return up to date node, or <code>null</code> if no longer exists
 		 */
 		protected ManifestNode refresh() {
+			if(DEBUG) {
+				System.out.println("Refreshing manifest node: "+this); //$NON-NLS-1$
+			}
 			return this;
 		}
 		
@@ -262,28 +276,42 @@ public class ApiDescription implements IApiDescription {
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.IApiManifest#visit(org.eclipse.pde.api.tools.ApiManifestVisitor)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#accept(org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor, org.eclipse.core.runtime.IProgressMonitor)
 	 */
-	public void accept(ApiDescriptionVisitor visitor) {
-		visitChildren(visitor, fPackageMap);
+	public void accept(ApiDescriptionVisitor visitor, IProgressMonitor monitor) {
+		visitChildren(visitor, fPackageMap, monitor);
 	}
 	/**
 	 * Visits all children nodes in the given children map.
 	 * 
 	 * @param visitor visitor to visit
 	 * @param childrenMap map of element name to manifest nodes
+	 * @param monitor
 	 */
-	protected void visitChildren(ApiDescriptionVisitor visitor, Map childrenMap) {
+	protected void visitChildren(ApiDescriptionVisitor visitor, Map childrenMap, IProgressMonitor monitor) {
 		List elements = new ArrayList(childrenMap.keySet());
 		Collections.sort(elements);
 		Iterator iterator = elements.iterator();
 		while (iterator.hasNext()) {
+			Util.updateMonitor(monitor);
 			IElementDescriptor element = (IElementDescriptor) iterator.next();
 			ManifestNode node = (ManifestNode) childrenMap.get(element);
 			visitNode(visitor, node);
 		}
 	}
 	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#accept(org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor, org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public boolean accept(ApiDescriptionVisitor visitor, IElementDescriptor element, IProgressMonitor monitor) {
+		ManifestNode node = findNode(element, false);
+		if (node != null) {
+			visitNode(visitor, node);
+			return true;
+		}
+		return false;
+	}
+	
 	/**
 	 * Compares the given version against the embedded version that has been 
 	 * read from the API description
@@ -343,7 +371,7 @@ public class ApiDescription implements IApiDescription {
 		IApiAnnotations desc = new ApiAnnotations(vis, node.restrictions);
 		boolean visitChildren = visitor.visitElement(node.element, desc);
 		if (visitChildren && !node.children.isEmpty()) {
-			visitChildren(visitor, node.children);
+			visitChildren(visitor, node.children, null);
 		}
 		visitor.endVisitElement(node.element, desc);
 	}
@@ -358,6 +386,12 @@ public class ApiDescription implements IApiDescription {
 	 * @return manifest node or <code>null</code>
 	 */
 	protected ManifestNode findNode(IElementDescriptor element, boolean write) {
+		if(DEBUG) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("Looking up manifest node for element: "); //$NON-NLS-1$
+			buffer.append(element);
+			System.out.println(buffer.toString());
+		}
 		IElementDescriptor[] path = element.getPath();
 		Map map = fPackageMap;
 		ManifestNode parentNode = null;
@@ -375,6 +409,14 @@ public class ApiDescription implements IApiDescription {
 						return null;
 					}
 				} else {
+					if(DEBUG) {
+						StringBuffer buffer = new StringBuffer();
+						buffer.append("Returning parent manifest node: "); //$NON-NLS-1$
+						buffer.append(parentNode);
+						buffer.append(" when looking for element"); //$NON-NLS-1$
+						buffer.append(element);
+						System.out.println(buffer.toString()); 
+					}
 					return parentNode;
 				}
 			}
@@ -383,6 +425,14 @@ public class ApiDescription implements IApiDescription {
 				map = node.children;
 			}
 		}
+		if(DEBUG) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("Manifest node found: "); //$NON-NLS-1$
+			buffer.append(node);
+			buffer.append(" when looking for element"); //$NON-NLS-1$
+			buffer.append(element);
+			System.out.println(buffer.toString());
+		}
 		return node;
 	}
  	
@@ -394,27 +444,56 @@ public class ApiDescription implements IApiDescription {
 		if (node != null) {
 			return resolveAnnotations(node, element);
 		}
+		else if(DEBUG){
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("Tried to resolve annotations for manifest node: "); //$NON-NLS-1$
+			buffer.append(node);
+			buffer.append(" but the node could not be found."); //$NON-NLS-1$
+			System.out.println(buffer.toString());
+		}
 		return null;
 	}
 	
 	/**
-	 * Resolves annotations based on inheritance for the given node and element.
+	 * Returns the visibility of the given node, walking up the tree if needed
+	 * to resolve inherited visibility.
 	 * 
-	 * @param node manifest node
-	 * @param element the element annotations are being resolved for
-	 * @return annotations
+	 * @param node
+	 * @return visibility modifier
 	 */
-	protected IApiAnnotations resolveAnnotations(ManifestNode node, IElementDescriptor element) {
+	protected int resolveVisibility(ManifestNode node) {
 		ManifestNode visNode = node;
 		int vis = visNode.visibility;
 		while (vis == VISIBILITY_INHERITED) {
 			visNode = visNode.parent;
 			vis = visNode.visibility;
 		}
+		return vis;
+	}
+	
+	/**
+	 * Resolves annotations based on inheritance for the given node and element.
+	 * 
+	 * @param node manifest node
+	 * @param element the element annotations are being resolved for
+	 * @return annotations
+	 */
+	protected IApiAnnotations resolveAnnotations(ManifestNode node, IElementDescriptor element) {
+		int vis = resolveVisibility(node);
 		int res = RestrictionModifiers.NO_RESTRICTIONS;
 		if (node.element.equals(element)) {
 			res = node.restrictions;
 		}
+		if(DEBUG) {
+			StringBuffer stringBuffer = new StringBuffer();
+			stringBuffer.append("Resolved annotations for manifest node: "); //$NON-NLS-1$
+			stringBuffer.append(node);
+			stringBuffer.append(" to be: "); //$NON-NLS-1$
+			stringBuffer.append(VisibilityModifiers.getVisibilityName(vis));
+			stringBuffer.append(" "); //$NON-NLS-1$
+			stringBuffer.append(RestrictionModifiers.getRestrictionText(res));
+			System.out.println(stringBuffer.toString());
+		}
 		return new ApiAnnotations(vis, res);
 	}
 	
@@ -423,6 +502,9 @@ public class ApiDescription implements IApiDescription {
 	 */
 	protected void clearPackages() {
 		if(fPackageMap != null) {
+			if(DEBUG) {
+				System.out.println("Clearing package map"); //$NON-NLS-1$
+			}
 			fPackageMap.clear();
 		}
 	}
@@ -443,6 +525,14 @@ public class ApiDescription implements IApiDescription {
 		if (element.getElementType() == IElementDescriptor.PACKAGE) {
 			vis = VisibilityModifiers.API;
 		}
+		if(DEBUG) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("Creating new manifest node for element: "); //$NON-NLS-1$
+			buffer.append(element);
+			buffer.append(" and adding it to parent node: "); //$NON-NLS-1$
+			buffer.append(parentNode);
+			System.out.println(buffer.toString());
+		}
 		return new ManifestNode(parentNode, element, vis, RestrictionModifiers.NO_RESTRICTIONS);
 	}
 	
@@ -452,6 +542,14 @@ public class ApiDescription implements IApiDescription {
 	public IStatus setRestrictions(IElementDescriptor element, int restrictions) {
 		ManifestNode node = findNode(element, true);
 		if(node != null) {
+			if(DEBUG) {
+				StringBuffer buffer = new StringBuffer();
+				buffer.append("Setting restrictions for manifest node: "); //$NON-NLS-1$
+				buffer.append(node);
+				buffer.append(" to be "); //$NON-NLS-1$
+				buffer.append(RestrictionModifiers.getRestrictionText(restrictions));
+				System.out.println(buffer.toString());
+			}
 			modified();
 			node.restrictions = restrictions;
 			return Status.OK_STATUS;
@@ -467,6 +565,14 @@ public class ApiDescription implements IApiDescription {
 	public IStatus setVisibility(IElementDescriptor element, int visibility) {
 		ManifestNode node = findNode(element, true);
 		if(node != null) {
+			if(DEBUG) {
+				StringBuffer buffer = new StringBuffer();
+				buffer.append("Setting visibility for manifest node: "); //$NON-NLS-1$
+				buffer.append(node);
+				buffer.append(" to be "); //$NON-NLS-1$
+				buffer.append(VisibilityModifiers.getVisibilityName(visibility));
+				System.out.println(buffer.toString());
+			}
 			modified();
 			node.visibility = visibility;
 			return Status.OK_STATUS;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionManager.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionManager.java
index cc313f4..a3f0efc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionManager.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,10 +28,8 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IType;
@@ -39,12 +37,14 @@ import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.api.tools.internal.ApiDescription.ManifestNode;
 import org.eclipse.pde.api.tools.internal.ProjectApiDescription.TypeNode;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ApiModelCache;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.Factory;
 import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.scanner.ScannerMessages;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.w3c.dom.Element;
@@ -59,7 +59,7 @@ import com.ibm.icu.text.MessageFormat;
  * 
  * @since 1.0
  */
-public final class ApiDescriptionManager implements IElementChangedListener, ISaveParticipant {
+public final class ApiDescriptionManager implements ISaveParticipant {
 	
 	/**
 	 * Singleton
@@ -82,7 +82,6 @@ public final class ApiDescriptionManager implements IElementChangedListener, ISa
 	 * Constructs an API description manager.
 	 */
 	private ApiDescriptionManager() {
-		JavaCore.addElementChangedListener(this, ElementChangedEvent.POST_CHANGE);
 		ApiPlugin.getDefault().addSaveParticipant(this);
 	}
 
@@ -91,7 +90,6 @@ public final class ApiDescriptionManager implements IElementChangedListener, ISa
 	 */
 	public static void shutdown() {
 		if (fgDefault != null) {
-			JavaCore.removeElementChangedListener(fgDefault);
 			ApiPlugin.getDefault().removeSaveParticipant(fgDefault);
 		}
 	}
@@ -101,7 +99,7 @@ public final class ApiDescriptionManager implements IElementChangedListener, ISa
 	 * 
 	 * @return API description manager
 	 */
-	public synchronized static ApiDescriptionManager getDefault() {
+	public synchronized static ApiDescriptionManager getManager() {
 		if (fgDefault == null) {
 			fgDefault = new ApiDescriptionManager();
 		}
@@ -115,24 +113,23 @@ public final class ApiDescriptionManager implements IElementChangedListener, ISa
 	 * @param project Java project
 	 * @return API description
 	 */
-	public synchronized IApiDescription getApiDescription(PluginProjectApiComponent component, BundleDescription bundle) {
+	public synchronized IApiDescription getApiDescription(ProjectComponent component, BundleDescription bundle) {
 		IJavaProject project = component.getJavaProject();
 		ProjectApiDescription description = (ProjectApiDescription) fDescriptions.get(project);
 		if (description == null) {
 			if (Util.isApiProject(project)) {
-				description = new ProjectApiDescription(component);
+				description = new ProjectApiDescription(project);
 			} else {
-				description = new NonApiProjectDescription(component);
+				description = new NonApiProjectDescription(project);
 			}
 			try {
 				restoreDescription(project, description);
 			} catch (CoreException e) {
 				ApiPlugin.log(e.getStatus());
-				description = new ProjectApiDescription(component);
+				description = new ProjectApiDescription(project);
 			}
 			fDescriptions.put(project, description);
 		}
-		description.connect(bundle);
 		return description;
 	}
 	/**
@@ -189,101 +186,35 @@ public final class ApiDescriptionManager implements IElementChangedListener, ISa
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
-	 */
-	public void elementChanged(ElementChangedEvent event) {
-		IJavaElementDelta delta = event.getDelta();
-		processJavaElementDeltas(delta.getAffectedChildren(), null);
-	}
-	
 	/**
-	 * Remove projects that get closed or removed.
-	 * 
-	 * @param deltas
+	 * Flushes the changed element from the model cache
+	 * @param element
 	 */
-	private synchronized boolean processJavaElementDeltas(IJavaElementDelta[] deltas, IJavaProject proj) {
-		IJavaElementDelta delta = null;
-		for(int i = 0; i < deltas.length; i++) {
-			delta = deltas[i];
-			switch(delta.getElement().getElementType()) {
-				case IJavaElement.JAVA_PROJECT: {
-					proj = (IJavaProject) delta.getElement();
-					switch (delta.getKind()) {
-						case IJavaElementDelta.CHANGED:
-							int flags = delta.getFlags();
-							if((flags & IJavaElementDelta.F_CLOSED) != 0) {
-								clean(proj, false, true);
-							} else if((flags & (IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED
-									| IJavaElementDelta.F_CLASSPATH_CHANGED)) != 0) {
-								if (proj != null) {
-									projectClasspathChanged(proj);
-								}
-							} else if((flags & IJavaElementDelta.F_CONTENT) != 0) {
-								if (proj != null) {
-									projectChanged(proj);
-								}
-							} else if ((flags & IJavaElementDelta.F_CHILDREN) != 0) {
-								processJavaElementDeltas(delta.getAffectedChildren(), proj);
-							}
-							break;
-						case IJavaElementDelta.REMOVED:
-							clean(proj, true, true);
-							break;
-					}
-					break;
-				}
-				case IJavaElement.PACKAGE_FRAGMENT : {
-					int flags = delta.getFlags();
-					if ((flags & IJavaElementDelta.F_CHILDREN) != 0) {
-						if (processJavaElementDeltas(delta.getAffectedChildren(), proj)) {
-							return true;
-						}
-					}
-					break;
-				}
-				case IJavaElement.PACKAGE_FRAGMENT_ROOT : {
-					int flags = delta.getFlags();
-					if ((flags & (IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED
-							| IJavaElementDelta.F_ADDED_TO_CLASSPATH
-							| IJavaElementDelta.F_REMOVED_FROM_CLASSPATH)) != 0) {
-						projectClasspathChanged(proj);
-						return true;
-					} else if ((flags & IJavaElementDelta.F_CHILDREN) != 0) {
-						if (processJavaElementDeltas(delta.getAffectedChildren(), proj)) {
-							return true;
-						}
-					}
-					break;
-				}
-				case IJavaElement.COMPILATION_UNIT : {
-					int flags = delta.getFlags();
-					switch (delta.getKind()) {
-						case IJavaElementDelta.CHANGED: {
-							if ((flags & (IJavaElementDelta.F_CONTENT | 
-											IJavaElementDelta.F_FINE_GRAINED | 
-											IJavaElementDelta.F_PRIMARY_RESOURCE)) != 0){
-								if (proj != null) {
-									projectChanged(proj);
-									return true;
-								}
-							}
-							break;
-						}
-						case IJavaElementDelta.ADDED :
-						case IJavaElementDelta.REMOVED : {
-							if (proj != null) {
-								projectChanged(proj);
-								return true;
-							}
-						}
-					}
+	void flushElementCache(IJavaElement element) {
+		switch(element.getElementType()) {
+			case IJavaElement.COMPILATION_UNIT: {
+				ICompilationUnit unit = (ICompilationUnit) element;
+				IType type = unit.findPrimaryType();
+				if(type != null) {
+					ApiModelCache.getCache().removeElementInfo(
+							ApiBaselineManager.WORKSPACE_API_BASELINE_ID,
+							element.getJavaProject().getElementName(), 
+							type.getFullyQualifiedName(), 
+							IApiElement.TYPE);
 				}
+				break;
+			}
+			case IJavaElement.JAVA_PROJECT: {
+				ApiModelCache.getCache().removeElementInfo(
+						ApiBaselineManager.WORKSPACE_API_BASELINE_ID,
+						element.getElementName(), 
+						null, 
+						IApiElement.COMPONENT);
+				break;
 			}
 		}
-		return false;
 	}
-
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionProcessor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionProcessor.java
index cb370d9..f423fbd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionProcessor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionProcessor.java
@@ -502,7 +502,7 @@ public class ApiDescriptionProcessor {
 		annotateApiSettings(project, description, serializeComponentXml(componentxml));
 		//visit the types
 		DescriptionVisitor visitor = new DescriptionVisitor(project, description, collector);
-		description.accept(visitor);
+		description.accept(visitor, null);
 		IStatus status = visitor.getStatus();
 		if (!status.isOK()) {
 			throw new CoreException(status);
@@ -520,7 +520,7 @@ public class ApiDescriptionProcessor {
 	 * @throws CoreException
 	 * @throws BadLocationException
 	 */
-	private static void processTagUpdates(IType type, IReferenceTypeDescriptor desc, IApiDescription description, List members, Map collector) throws CoreException, BadLocationException {
+	static void processTagUpdates(IType type, IReferenceTypeDescriptor desc, IApiDescription description, List members, Map collector) throws CoreException, BadLocationException {
 		ASTParser parser = ASTParser.newParser(AST.JLS3);
 		ICompilationUnit cunit = type.getCompilationUnit();
 		if(cunit != null) {
@@ -713,12 +713,13 @@ public class ApiDescriptionProcessor {
 	 */
 	private static int annotateRestriction(Element element, String name, int flag, int res) {
 		String value = element.getAttribute(name);
+		int lres = res;
 		if (value.length() > 0) {
 			if (!Boolean.valueOf(value).booleanValue()) {
-				res = res | flag;
+				lres = res | flag;
 			}
 		}
-		return res;
+		return lres;
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionXmlCreator.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionXmlCreator.java
index a3d5fdf..377a826 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionXmlCreator.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiDescriptionXmlCreator.java
@@ -72,7 +72,7 @@ public class ApiDescriptionXmlCreator extends ApiDescriptionVisitor {
 	 * @throws CoreException if unable to construct the visitor
 	 */
 	public ApiDescriptionXmlCreator(IApiComponent component) throws CoreException {
-		this(component.getName(), component.getId());
+		this(component.getName(), component.getSymbolicName());
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiFilterStore.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiFilterStore.java
index 19744ca..d603c8b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiFilterStore.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiFilterStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,9 +38,9 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
@@ -60,6 +60,7 @@ import org.w3c.dom.NodeList;
  * @since 1.0.0
  */
 public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener {
+	
 	/**
 	 * Constant representing the name of the .settings folder
 	 */
@@ -69,7 +70,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	/**
 	 * Constant used for controlling tracing in the plug-in workspace component
 	 */
-	private static boolean DEBUG = Util.DEBUG;
+	static boolean DEBUG = Util.DEBUG;
 	
 	/**
 	 * Method used for initializing tracing in the plug-in workspace component
@@ -98,10 +99,10 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	/**
 	 * The backing {@link IJavaProject}
 	 */
-	private IJavaProject fProject = null;
+	IJavaProject fProject = null;
 	
-	private boolean fNeedsSaving = false;
-	private boolean fTriggeredChange = false;
+	boolean fNeedsSaving = false;
+	boolean fTriggeredChange = false;
 	
 	/**
 	 * Constructor
@@ -117,19 +118,18 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	 * Saves the .api_filters file for the component
 	 * @throws IOException 
 	 */
-	private void persistApiFilters() {
+	public void persistApiFilters() {
 		if(!fNeedsSaving) {
 			return;
 		}
+		final Map filters = new HashMap(fFilterMap);
 		WorkspaceJob job = new WorkspaceJob(Util.EMPTY_STRING) {
 			public IStatus runInWorkspace(IProgressMonitor monitor)	throws CoreException {
 				if(DEBUG) {
 					System.out.println("persisting api filters for plugin project component ["+fProject.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				try {
-					if(monitor == null) {
-						monitor = new NullProgressMonitor();
-					}
+					SubMonitor localmonitor = SubMonitor.convert(monitor);
 					IProject project = fProject.getProject();
 					if(!project.isAccessible()) {
 						if(DEBUG) {
@@ -137,15 +137,18 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 						}
 						return Status.CANCEL_STATUS;
 					}
-					String xml = getStoreAsXml();
+					String xml = getStoreAsXml(filters);
 					IFile file = project.getFile(getFilterFilePath(false));
 					if(xml == null) {
+						if(DEBUG) {
+							System.out.println("no XML to persist for plugin project component ["+fProject.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
 						// no filters - delete the file if it exists
 						if (file.isAccessible()) {
 							IFolder folder = (IFolder) file.getParent();
-							file.delete(true, monitor);
+							file.delete(true, localmonitor);
 							if(folder.members().length == 0 && folder.isAccessible()) {
-								folder.delete(true, monitor);
+								folder.delete(true, localmonitor);
 							}
 							fTriggeredChange = true;
 						}
@@ -156,15 +159,17 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 						return Status.CANCEL_STATUS;
 					}
 					try {
-						if(!file.exists()) {
-							IFolder folder = (IFolder) file.getParent();
-							if(!folder.exists()) {
-								folder.create(true, true, monitor);
+						if(file.getProject().isAccessible()) {
+							if(!file.exists()) {
+								IFolder folder = (IFolder) file.getParent();
+								if(!folder.exists()) {
+									folder.create(true, true, localmonitor);
+								}
+								file.create(xstream, true, localmonitor);
+							}
+							else {
+								file.setContents(xstream, true, false, localmonitor);
 							}
-							file.create(xstream, true, monitor);
-						}
-						else {
-							file.setContents(xstream, true, false, monitor);
 						}
 					}
 					finally {
@@ -186,7 +191,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		job.setPriority(Job.INTERACTIVE);
 		job.schedule();
 	}
-
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore#addFilters(org.eclipse.pde.api.tools.internal.provisional.IApiProblemFilter[])
 	 */
@@ -230,9 +235,9 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		}
 		persistApiFilters();
 	}
-	
+
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore#addFilters(org.eclipse.pde.api.tools.internal.provisional.IApiProblem[])
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore#addFiltersFor(org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem[])
 	 */
 	public synchronized void addFiltersFor(IApiProblem[] problems) {
 		if(problems == null) {
@@ -248,7 +253,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 			return;
 		}
 		initializeApiFilters();
-		internalAddFilters(problems, true);
+		internalAddFilters(problems, null, true);
 	}
 
 	/* (non-Javadoc)
@@ -312,6 +317,9 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore#dispose()
 	 */
 	public void dispose() {
+		//if the store is about to be disposed and has pending changes save them asynchronously
+		//https://bugs.eclipse.org/bugs/show_bug.cgi?id=299319
+		persistApiFilters();
 		clearFilters();
 		if(fUnusedFilters != null) {
 			fUnusedFilters.clear();
@@ -319,7 +327,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		}
  		ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore#getResources()
 	 */
@@ -386,15 +394,23 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	}
 	
 	/**
-	 * Converts the information contained in this filter store to an xml string
-	 * @return an xml string representation of this filter store
+	 * Converts the information contained in the given map to an XML string
+	 * 
+	 * @param filtermap the mapping of filters to convert to XML
+	 * @return an XML string representation of the given mapping of filters
 	 * @throws CoreException
 	 */
-	private synchronized String getStoreAsXml() throws CoreException {
-		if(fFilterMap == null) {
+	synchronized String getStoreAsXml(Map filtermap) throws CoreException {
+		if(filtermap == null) {
+			if(DEBUG) {
+				System.out.println("no filter map returning null XML for project ["+fProject.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
 			return null;
 		}
-		if(fFilterMap.isEmpty()) {
+		if(filtermap.isEmpty()) {
+			if(DEBUG) {
+				System.out.println("empty filter map returning null XML for project ["+fProject.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
 			return null;
 		}
 		Document document = Util.newDocument();
@@ -402,15 +418,15 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		document.appendChild(root);
 		root.setAttribute(IApiXmlConstants.ATTR_ID, fProject.getElementName());
 		root.setAttribute(IApiXmlConstants.ATTR_VERSION, IApiXmlConstants.API_FILTER_STORE_CURRENT_VERSION);
-		Set allFiltersEntrySet = fFilterMap.entrySet();
+		Set allFiltersEntrySet = filtermap.entrySet();
 		List allFiltersEntries = new ArrayList(allFiltersEntrySet.size());
 		allFiltersEntries.addAll(allFiltersEntrySet);
 		Collections.sort(allFiltersEntries, new Comparator() {
 			public int compare(Object o1, Object o2) {
 				Map.Entry entry1 = (Map.Entry) o1;
 				Map.Entry entry2 = (Map.Entry) o2;
-				String path1 = ((IResource) entry1.getKey()).getProjectRelativePath().toOSString();
-				String path2 = ((IResource) entry2.getKey()).getProjectRelativePath().toOSString();
+				String path1 = ((IResource) entry1.getKey()).getFullPath().toOSString();
+				String path2 = ((IResource) entry2.getKey()).getFullPath().toOSString();
 				return path1.compareTo(path2);
 			}
 		});
@@ -453,16 +469,39 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 				filtersList.addAll(filters);
 				Collections.sort(filtersList, new Comparator(){
 					public int compare(Object o1, Object o2) {
-						int problem1Id = ((IApiProblemFilter) o1).getUnderlyingProblem().getId();
-						int problem2Id = ((IApiProblemFilter) o2).getUnderlyingProblem().getId();
-						return problem1Id - problem2Id;
+						IApiProblem p1 = ((IApiProblemFilter) o1).getUnderlyingProblem();
+						IApiProblem p2 = ((IApiProblemFilter) o2).getUnderlyingProblem();
+						int problem1Id = p1.getId();
+						int problem2Id = p2.getId();
+						int ids = problem1Id - problem2Id;
+						if(ids == 0) {
+							//if we have the same ids further sort by message args 
+							//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304509
+							String[] args1 = p1.getMessageArguments();
+							String[] args2 = p2.getMessageArguments();
+							int length = (args1.length < args2.length ? args1.length : args2.length);
+							for (int i = 0; i < length; i++) {
+								int args = args1[i].compareTo(args2[i]);
+								if(args != 0) {
+									//return when they are not equal
+									return args;
+								}
+							}
+							return args1.length - args2.length;
+						}
+						return ids;
 					}
 				});
 				for(Iterator iterator2 = filtersList.iterator(); iterator2.hasNext(); ) {
-					IApiProblem problem = ((IApiProblemFilter) iterator2.next()).getUnderlyingProblem();
+					IApiProblemFilter filter = (IApiProblemFilter) iterator2.next();
+					IApiProblem problem = filter.getUnderlyingProblem();
 					typeName = problem.getTypeName();
 					Element filterElement = document.createElement(IApiXmlConstants.ELEMENT_FILTER);
 					filterElement.setAttribute(IApiXmlConstants.ATTR_ID, Integer.toString(problem.getId()));
+					String comment = filter.getComment();
+					if(comment != null) {
+						filterElement.setAttribute(IApiXmlConstants.ATTR_COMMENT, comment);
+					}
 					String[] messageArguments = problem.getMessageArguments();
 					int length = messageArguments.length;
 					if(length > 0) {
@@ -566,6 +605,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		}
 		NodeList resources = root.getElementsByTagName(IApiXmlConstants.ELEMENT_RESOURCE);
 		ArrayList newfilters = new ArrayList();
+		ArrayList comments = new ArrayList();
 		for(int i = 0; i < resources.getLength(); i++) {
 			Element element = (Element) resources.item(i);
 			String path = element.getAttribute(IApiXmlConstants.ATTR_PATH);
@@ -602,25 +642,30 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 					Element messageArgument = (Element) arguments.item(k);
 					messageargs[k] = messageArgument.getAttribute(IApiXmlConstants.ATTR_VALUE);
 				}
+				String comment = element.getAttribute(IApiXmlConstants.ATTR_COMMENT);
+				comments.add((comment.length() < 1 ? null : comment));
 				newfilters.add(ApiProblemFactory.newApiProblem(resource.getProjectRelativePath().toPortableString(),
 						typeName,
 						messageargs, null, null, -1, -1, -1, id));
 			}
 		}
-		internalAddFilters((IApiProblem[]) newfilters.toArray(new IApiProblem[newfilters.size()]), false);
+		internalAddFilters((IApiProblem[]) newfilters.toArray(new IApiProblem[newfilters.size()]), 
+				(String[]) comments.toArray(new String[comments.size()]), 
+				false);
 		newfilters.clear();
 	}
 	
 	/**
 	 * Internal use method that allows auto-persisting of the filter file to be turned on or off
 	 * @param problems the problems to add the the store
+	 * @param comments the comments associated with each problem
 	 * @param persist if the filters should be auto-persisted after they are added
 	 */
-	private synchronized void internalAddFilters(IApiProblem[] problems, boolean persist) {
+	private synchronized void internalAddFilters(IApiProblem[] problems, String[] comments, boolean persist) {
 		Set filters = null;
 		for(int i = 0; i < problems.length; i++) {
 			IApiProblem problem = problems[i];
-			IApiProblemFilter filter = new ApiProblemFilter(fProject.getElementName(), problem);
+			IApiProblemFilter filter = new ApiProblemFilter(fProject.getElementName(), problem, (comments == null ? null : comments[i]));
 			String resourcePath = problem.getResourcePath();
 			if (resourcePath == null) {
 				continue;
@@ -651,7 +696,22 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		if(persist) {
 			persistApiFilters();
 		}
+		else {
+			//need to reset the flag during initialization if we are not going to persist
+			//the filters, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=309635
+			fNeedsSaving = false;
+		}
+	}
+	
+	/**
+	 * Callback hook to tell the filter store it needs to be saved on the next cycle
+	 * 
+	 * @since 1.1
+	 */
+	public void needsSaving() {
+		fNeedsSaving = true;
 	}
+	
 	/**
 	 * Loads the specified integer attribute from the given xml element
 	 * @param element
@@ -673,7 +733,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	/**
 	 * @return the {@link IPath} to the filters file
 	 */
-	private IPath getFilterFilePath(boolean includeproject) {
+	IPath getFilterFilePath(boolean includeproject) {
 		if(includeproject) {
 			IPath path = fProject.getPath();
 			return path.append(SETTINGS_FOLDER).append(IApiCoreConstants.API_FILTERS_XML_NAME);
@@ -720,9 +780,13 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 	/**
 	 * Returns all of the unused filters for this store at the moment in time this
 	 * method is called.
+	 * @param the resource the filter applies to
+	 * @param typeName the name of the type the filter appears on
+	 * @param categories the collection of {@link IApiProblem} categories to ignore 
+	 * @see {@link IApiProblem#getCategory()}
 	 * @return the listing of currently unused filters or an empty list, never <code>null</code>
 	 */
-	public IApiProblemFilter[] getUnusedFilters(IResource resource, String typeName) {
+	public IApiProblemFilter[] getUnusedFilters(IResource resource, String typeName, int[] categories) {
 		if(fUnusedFilters != null) {
 			Set unused = new HashSet();
 			Set set = null;
@@ -730,7 +794,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 				// add any unused filters for the resource
 				set = (Set) fUnusedFilters.get(resource);
 				if (set != null) {
-					collectFilterFor(set, typeName, unused);
+					collectFilterFor(set, typeName, unused, categories);
 				}
 				if(Util.isManifest(resource.getProjectRelativePath())) {
 					//we need to add any filters that are cached for resources
@@ -746,7 +810,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 							continue;
 						}
 						set = (Set)fUnusedFilters.get(res);
-						collectFilterFor(set, typeName, unused);
+						collectFilterFor(set, typeName, unused, categories);
 					}
 				}
 			}
@@ -767,11 +831,25 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		return NO_FILTERS;
 	}
 	
-	private void collectFilterFor(Set filters, String typename, Set collector) {
+	/**
+	 * Collects the complete set of problem filters from the given set whose
+	 * underlying problem categories do not match any from the given array and whose
+	 * type name matches the underlying problem type name.
+	 *   
+	 * @param filters
+	 * @param typename
+	 * @param collector
+	 * @param categories
+	 */
+	private void collectFilterFor(Set filters, String typename, Set collector, int[] categories) {
+		ApiProblemFilter filter = null;
 		for (Iterator iter = filters.iterator(); iter.hasNext();) {
-			ApiProblemFilter filter = (ApiProblemFilter) iter.next();
+			filter = (ApiProblemFilter) iter.next();
 			IApiProblem underlyingProblem = filter.getUnderlyingProblem();
 			if (underlyingProblem != null) {
+				if(matchesCategory(underlyingProblem, categories)) {
+					continue;
+				}
 				String underlyingTypeName = underlyingProblem.getTypeName();
 				if (underlyingTypeName != null && (typename == null || underlyingTypeName.equals(typename))) {
 					collector.add(filter);
@@ -780,6 +858,27 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 		}
 	}
 	
+	/**
+	 * Returns if the category of the given problem matches one of the categories
+	 * given in the collection. If the collection of categories is <code>null</code>
+	 * the problem does not match.
+	 * @param problem
+	 * @param categories
+	 * @return true if the given collection contains the given problems' category, false otherwise
+	 * @since 1.1
+	 */
+	private boolean matchesCategory(IApiProblem problem, int[] categories) {
+		if(categories != null) {
+			int cat = problem.getCategory();
+			for (int i = 0; i < categories.length; i++) {
+				if(cat == categories[i]) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
 	/* (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */
@@ -797,7 +896,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 			//see https://bugs.eclipse.org/bugs/show_bug.cgi?id=222442
 			fTriggeredChange = false;
 			if(DEBUG) {
-				System.out.println("ignoring trigered change"); //$NON-NLS-1$
+				System.out.println("ignoring triggered change"); //$NON-NLS-1$
 			}
 			return;
 		}
@@ -814,7 +913,7 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 				}
 				if(fFilterMap != null) {
 					fFilterMap.clear();
-					needsbuild = true;
+					needsbuild = fProject.getProject().isAccessible();
 				}
 			}
 			else if(leafdelta.getKind() == IResourceDelta.ADDED || 
@@ -835,12 +934,12 @@ public class ApiFilterStore implements IApiFilterStore, IResourceChangeListener
 							initializeApiFilters();
 						}
 						finally {
-							needsbuild = true;
+							needsbuild = fProject.getProject().isAccessible();
 						}
 					}
 				}
 			}
-			if(needsbuild && ResourcesPlugin.getWorkspace().isAutoBuilding()) {
+			if(needsbuild && !ResourcesPlugin.getWorkspace().isAutoBuilding()) {
 				Util.getBuildJob(new IProject[] {fProject.getProject()}, IncrementalProjectBuilder.INCREMENTAL_BUILD).schedule();
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
index 17cdd5f..ac9fc92 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ApiPluginPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,7 @@ public class ApiPluginPreferenceInitializer extends AbstractPreferenceInitialize
 		node.put(IApiProblemTypes.INVALID_JAVADOC_TAG, ApiPlugin.VALUE_IGNORE);
 		node.put(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES, ApiPlugin.VALUE_IGNORE);
 		node.put(IApiProblemTypes.UNUSED_PROBLEM_FILTERS, ApiPlugin.VALUE_WARNING);
+		node.put(IApiProblemTypes.FATAL_PROBLEMS, ApiPlugin.VALUE_ERROR);
 		
 		// compatibilities
 		for (int i = 0, max = ApiPlugin.AllCompatibilityKeys.length; i < max; i++) {
@@ -67,6 +68,7 @@ public class ApiPluginPreferenceInitializer extends AbstractPreferenceInitialize
 
 		// api component resolution
 		node.put(IApiProblemTypes.REPORT_RESOLUTION_ERRORS_API_COMPONENT, ApiPlugin.VALUE_WARNING);
+		node.putBoolean(IApiProblemTypes.AUTOMATICALLY_REMOVE_UNUSED_PROBLEM_FILTERS, false);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CRCVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CRCVisitor.java
new file mode 100644
index 0000000..20ec70a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CRCVisitor.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal;
+
+import java.util.zip.CRC32;
+
+import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+
+/**
+ * Builds a CRC code for a type's API annotations
+ */
+public class CRCVisitor extends ApiDescriptionVisitor {
+	
+	private CRC32 fCrc = new CRC32();
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor#visitElement(org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor, org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations)
+	 */
+	public boolean visitElement(IElementDescriptor element, IApiAnnotations description) {
+		String signature = null;
+		String name = null;
+		switch (element.getElementType()) {
+			case IElementDescriptor.TYPE:
+				signature = ((IReferenceTypeDescriptor)element).getSignature();
+				break;
+			case IElementDescriptor.METHOD:
+				signature = ((IMethodDescriptor)element).getSignature();
+				name = ((IMethodDescriptor)element).getName();
+				break;
+			case IElementDescriptor.FIELD:
+				name = ((IFieldDescriptor)element).getName();
+				break;
+			default:
+				break;
+		}
+		if (signature != null) {
+			fCrc.update(signature.getBytes());
+		}
+		if (name != null) {
+			fCrc.update(name.getBytes());
+		}
+		fCrc.update(description.getRestrictions());
+		fCrc.update(description.getVisibility());
+		return true;
+	}
+	
+	public long getValue() {
+		return fCrc.getValue();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CompositeApiDescription.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CompositeApiDescription.java
index 8d5fa1c..4787df7 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CompositeApiDescription.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CompositeApiDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal;
 
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
 import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
@@ -42,11 +42,23 @@ public class CompositeApiDescription implements IApiDescription {
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#accept(org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor)
 	 */
-	public void accept(ApiDescriptionVisitor visitor) {
+	public void accept(ApiDescriptionVisitor visitor, IProgressMonitor monitor) {
 		for (int i = 0; i < fDescriptions.length; i++) {
-			fDescriptions[i].accept(visitor);
+			fDescriptions[i].accept(visitor, monitor);
 		}
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#accept(org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor, org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public boolean accept(ApiDescriptionVisitor visitor, IElementDescriptor element, IProgressMonitor monitor) {
+		for (int i = 0; i < fDescriptions.length; i++) {
+			if (fDescriptions[i].accept(visitor, element, monitor)) {
+				return true;
+			}
+		}
+		return false;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#resolveAnnotations(java.lang.String, org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor)
@@ -104,24 +116,6 @@ public class CompositeApiDescription implements IApiDescription {
 		return Status.CANCEL_STATUS;
 	}	
 
-	/**
-	 * Disconnects an underlying API description from the given bundle.
-	 * 
-	 * @param bundle
-	 */
-	public void disconnect(BundleDescription bundle) {
-		for (int i = 0; i < fDescriptions.length; i++) {
-			IApiDescription description = fDescriptions[i];
-			if (description instanceof ProjectApiDescription) {
-				ProjectApiDescription pad = (ProjectApiDescription) description;
-				if (bundle.equals(pad.getConnection())) {
-					pad.disconnect(bundle);
-					return;
-				}
-			}
-		}
-	}
-
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#setAccessLevel(org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor, org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor, int)
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CoreMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CoreMessages.java
index 344deff..cada45b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CoreMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/CoreMessages.java
@@ -23,6 +23,7 @@ public class CoreMessages extends NLS {
 	public static String ApiBaseline_3;
 	public static String ApiBaseline_4;
 	public static String ApiBaseline_5;
+	public static String ProjectComponent_could_not_locate_model;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, CoreMessages.class);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiCoreConstants.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiCoreConstants.java
index 9b229bb..75e3d2b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiCoreConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiCoreConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,7 +60,7 @@ public interface IApiCoreConstants {
 	public static final String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle"; //$NON-NLS-1$
 	
 	/**
-	 * Constant representing the name of the {@link IApiProfile} used in headless ant builds.
+	 * Constant representing the name of the {@link IApiBaseline} used in headless ant builds.
 	 * Value is: <code>ant_build_profile</code>
 	 */
 	public static final String ANT_BUILD_PROFILE_NAME = "ant_build_profile"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiXmlConstants.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiXmlConstants.java
index 6bb7dbf..e4113cd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiXmlConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/IApiXmlConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,12 @@ public interface IApiXmlConstants {
 	 */
 	public static final String ATTR_ELEMENT_KIND = "elementkind"; //$NON-NLS-1$
 	/**
+	 * Constant representing the element attribute for a comment.
+	 * value is: <code>comment</code>
+	 * @since 1.1
+	 */
+	public static final String ATTR_COMMENT = "comment"; //$NON-NLS-1$
+	/**
 	 * Constant representing the element severity attribute of an {@link IApiProblem} in xml.
 	 * Value is: <code>severity</code>
 	 */
@@ -311,6 +317,13 @@ public interface IApiXmlConstants {
 	 * Value is: <code>type</code>
 	 */
 	public static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$
+	
+	/**
+	 * Constant representing a target element node in xml.
+	 * Value is: <code>target</code> 
+	 */
+	public static final String ELEMENT_TARGET = "target";  //$NON-NLS-1$
+	
 	/**
 	 * Constant representing an api problems element node in xml.
 	 * Value is: <code>api_problems</code>
@@ -393,7 +406,13 @@ public interface IApiXmlConstants {
 	public static final String ATTR_REFEREE = "referee"; //$NON-NLS-1$
 	public static final String ATTR_REFERENCE_COUNT = "reference_count"; //$NON-NLS-1$
 	public static final String ATTR_REFERENCE_VISIBILITY = "reference_visibility"; //$NON-NLS-1$
-	public static final String NO_API_DESCRIPTION = "no_description"; //$NON-NLS-1$
-	public static final String RESOLUTION_ERRORS = "resolution_errors"; //$NON-NLS-1$
+	public static final String SKIPPED_DETAILS = "details"; //$NON-NLS-1$
 	public static final String EXCLUDED = "excluded"; //$NON-NLS-1$
+	public static final String ATTR_MEMBER_NAME = "member"; //$NON-NLS-1$
+	
+	/**
+	 * Constant representing an alternate API component in which references were
+	 * resolved. Value is: <code>alternate</code>
+	 */
+	public static final String ATTR_ALTERNATE = "alternate"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/NonApiProjectDescription.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/NonApiProjectDescription.java
index dfeda36..25cd873 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/NonApiProjectDescription.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/NonApiProjectDescription.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal;
 
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 
 /**
@@ -24,10 +24,10 @@ public class NonApiProjectDescription extends ProjectApiDescription {
 	/**
 	 * Constructs API description for the given project.
 	 * 
-	 * @param component
+	 * @param project
 	 */
-	public NonApiProjectDescription(PluginProjectApiComponent component) {
-		super(component);
+	public NonApiProjectDescription(IJavaProject project) {
+		super(project);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ProjectApiDescription.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ProjectApiDescription.java
index 740f187..149fcb1 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ProjectApiDescription.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/ProjectApiDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.pde.api.tools.internal;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -19,11 +18,12 @@ import java.util.Map;
 import java.util.Set;
 import java.util.jar.JarFile;
 
-import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.ICompilationUnit;
@@ -33,10 +33,9 @@ import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
 import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.pde.api.tools.internal.model.BundleApiComponent;
-import org.eclipse.pde.api.tools.internal.model.FolderApiTypeContainer;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.builder.BuildStamps;
+import org.eclipse.pde.api.tools.internal.model.BundleComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.Factory;
@@ -46,6 +45,7 @@ import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
 import org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner;
 import org.eclipse.pde.api.tools.internal.util.Util;
@@ -58,17 +58,11 @@ import org.w3c.dom.Element;
  * @since 1.0
  */
 public class ProjectApiDescription extends ApiDescription {
-		
-	/**
-	 * Associated API component.
-	 */
-	private PluginProjectApiComponent fComponent;
 	
 	/**
-	 * Only valid when connected to a bundle. Used to initialize
-	 * package exports.
+	 * Associated Java project
 	 */
-	private BundleDescription fBundle;
+	private IJavaProject fProject;
 	
 	/**
 	 * Time stamp at which package information was created
@@ -86,14 +80,6 @@ public class ProjectApiDescription extends ApiDescription {
 	public IFile fManifestFile;
 	
 	/**
-	 * Class file container cache used for tag scanning.
-	 * Maps output locations to containers.
-	 * 
-	 * TODO: these could become out of date with class path changes.
-	 */
-	private Map fClassFileContainers;
-	
-	/**
 	 * Whether this API description is in synch with its project. Becomes
 	 * false if anything in a project changes. When true, visiting can
 	 * be performed by traversing the cached nodes, rather than traversing
@@ -106,7 +92,7 @@ public class ProjectApiDescription extends ApiDescription {
 	 */
 	class PackageNode extends ManifestNode {
 
-		private IPackageFragment[] fFragments;
+		IPackageFragment[] fFragments;
 		/**
 		 * Constructs a new node.
 		 * 
@@ -181,10 +167,10 @@ public class ProjectApiDescription extends ApiDescription {
 	class TypeNode extends ManifestNode {
 		
 		long fTimeStamp = -1L;
-		
+		long fBuildStamp = -1L;
 		private boolean fRefreshing = false;
 		
-		private IType fType;
+		IType fType;
 
 		/**
 		 * Constructs a node for a reference type.
@@ -200,6 +186,7 @@ public class ProjectApiDescription extends ApiDescription {
 			fType = type;
 			if (parent instanceof TypeNode) {
 				fTimeStamp = ((TypeNode)parent).fTimeStamp;
+				fBuildStamp = ((TypeNode)parent).fBuildStamp;
 			}
 		}
 
@@ -208,44 +195,108 @@ public class ProjectApiDescription extends ApiDescription {
 		 */
 		protected synchronized ManifestNode refresh() {
 			if (fRefreshing) {
+				if(DEBUG) {
+					StringBuffer buffer = new StringBuffer();
+					buffer.append("Refreshing manifest node: "); //$NON-NLS-1$
+					buffer.append(this);
+					buffer.append(" aborted because a refresh is already in progress"); //$NON-NLS-1$
+					System.out.println(buffer.toString());
+				}
 				return this;
 			}
 			try {
 				fRefreshing = true;
-				ICompilationUnit unit = fType.getCompilationUnit();
-				if (unit != null) {
-					IResource resource = null;
-					try {
-						resource = unit.getUnderlyingResource();
-					} catch (JavaModelException e) {
-						// exception if the resource does not exist
-						if (!e.getJavaModelStatus().isDoesNotExist()) {
-							ApiPlugin.log(e.getStatus());
-							return this;
-						}
-					}
-					if (resource != null && resource.exists()) {
-						long stamp = resource.getModificationStamp();
-						if (stamp != fTimeStamp) {
-							modified();
-							children.clear();
-							restrictions = RestrictionModifiers.NO_RESTRICTIONS;
-							fTimeStamp = resource.getModificationStamp();
-							try {
-								TagScanner.newScanner().scan(unit, ProjectApiDescription.this,
-									getApiTypeContainer((IPackageFragmentRoot) fType.getPackageFragment().getParent()));
-							} catch (CoreException e) {
+				int parentVis = resolveVisibility(parent);
+				if (VisibilityModifiers.isAPI(parentVis)) {
+					ICompilationUnit unit = fType.getCompilationUnit();
+					if (unit != null) {
+						IResource resource = null;
+						try {
+							resource = unit.getUnderlyingResource();
+						} catch (JavaModelException e) {
+							if(DEBUG) {
+								StringBuffer buffer = new StringBuffer();
+								buffer.append("Failed to get underlying resource for compilation unit: "); //$NON-NLS-1$
+								buffer.append(unit);
+								System.out.println(buffer.toString());
+							}
+							// exception if the resource does not exist
+							if (!e.getJavaModelStatus().isDoesNotExist()) {
 								ApiPlugin.log(e.getStatus());
+								return this;
+							}
+						}
+						if (resource != null && resource.exists()) {
+							long stamp = resource.getModificationStamp();
+							if (stamp != fTimeStamp) {
+								// compute current CRC
+								CRCVisitor visitor = new CRCVisitor();
+								visitType(this, visitor);
+								long crc = visitor.getValue();
+								if(DEBUG) {
+									StringBuffer buffer = new StringBuffer();
+									buffer.append("Resource has changed for type manifest node: "); //$NON-NLS-1$
+									buffer.append(this);
+									buffer.append(" tag scanning the new type"); //$NON-NLS-1$
+									buffer.append(" (CRC "); //$NON-NLS-1$
+									buffer.append(crc);
+									buffer.append(')');
+									System.out.println(buffer.toString());
+								}
+								modified();
+								children.clear();
+								restrictions = RestrictionModifiers.NO_RESTRICTIONS;
+								fTimeStamp = resource.getModificationStamp();
+								try {
+									TagScanner.newScanner().scan(unit, ProjectApiDescription.this,
+										getApiTypeContainer((IPackageFragmentRoot) fType.getPackageFragment().getParent()), null);
+								} catch (CoreException e) {
+									ApiPlugin.log(e.getStatus());
+								}
+								// see if the description changed
+								visitor = new CRCVisitor();
+								visitType(this, visitor);
+								long crc2 = visitor.getValue();
+								if (crc != crc2) {
+									// update relative build time stamp
+									fBuildStamp = BuildStamps.getBuildStamp(resource.getProject());
+									if(DEBUG) {
+										StringBuffer buffer = new StringBuffer();
+										buffer.append("CRC changed for type manifest node: "); //$NON-NLS-1$
+										buffer.append(this);
+										buffer.append(" (CRC "); //$NON-NLS-1$
+										buffer.append(crc2);
+										buffer.append(')');
+										System.out.println(buffer.toString());
+									}
+								}
+							}
+						} else {
+							if(DEBUG) {
+								StringBuffer buffer = new StringBuffer();
+								buffer.append("Underlying resource for the type manifest node: "); //$NON-NLS-1$
+								buffer.append(this);
+								buffer.append(" does not exist or is null"); //$NON-NLS-1$
+								System.out.println(buffer.toString());
 							}
+							// element has been removed
+							modified();
+							parent.children.remove(element);
+							return null;
 						}
 					} else {
-						// element has been removed
-						modified();
-						parent.children.remove(element);
-						return null;
+						if(DEBUG) {
+							StringBuffer buffer = new StringBuffer();
+							buffer.append("Failed to look up compilation unit for "); //$NON-NLS-1$
+							buffer.append(fType);
+							buffer.append(" refreshing type manifest node: "); //$NON-NLS-1$
+							buffer.append(this);
+							System.out.println(buffer.toString());
+						}
+						// TODO: binary type
 					}
 				} else {
-					// TODO: binary type
+					// don't scan internal types
 				}
 			} finally {
 				fRefreshing = false;
@@ -289,18 +340,18 @@ public class ProjectApiDescription extends ApiDescription {
 	 * 
 	 * @param component
 	 */
-	public ProjectApiDescription(PluginProjectApiComponent component) {
-		super(component.getJavaProject().getElementName());
-		fComponent = component;
+	public ProjectApiDescription(IJavaProject project) {
+		super(project.getElementName());
+		fProject = project;
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiDescription#accept(org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor)
 	 */
-	public synchronized void accept(ApiDescriptionVisitor visitor) {
+	public synchronized void accept(ApiDescriptionVisitor visitor, IProgressMonitor monitor) {
 		boolean completeVisit = true;
 		if (fInSynch) {
-			super.accept(visitor);
+			super.accept(visitor, monitor);
 		} else {
 			try {
 				IPackageFragment[] fragments = getLocalPackageFragments();
@@ -357,15 +408,19 @@ public class ProjectApiDescription extends ApiDescription {
 		IElementDescriptor element = getElementDescriptor(type);
 		ManifestNode typeNode = findNode(element, false);
 		if (typeNode != null) {
-			IApiAnnotations annotations = resolveAnnotations(typeNode, element);
-			if (visitor.visitElement(element, annotations)) {
-				// children
-				if (typeNode.children != null) {
-					visitChildren(visitor, typeNode.children);
-				}
+			visitType(typeNode, visitor);
+		}
+	}
+	
+	void visitType(ManifestNode node, ApiDescriptionVisitor visitor) {
+		IApiAnnotations annotations = resolveAnnotations(node, node.element);
+		if (visitor.visitElement(node.element, annotations)) {
+			// children
+			if (node.children != null) {
+				visitChildren(visitor, node.children, null);
 			}
-			visitor.endVisitElement(element, annotations);
 		}
+		visitor.endVisitElement(node.element, annotations);
 	}
 	
 	/* (non-Javadoc)
@@ -512,8 +567,15 @@ public class ProjectApiDescription extends ApiDescription {
 	/**
 	 * Refreshes package nodes if required.
 	 */
-	private synchronized void refreshPackages() {
+	synchronized void refreshPackages() {
 		if (fRefreshingInProgress) {
+			if(DEBUG) {
+				StringBuffer buffer = new StringBuffer();
+				buffer.append("Refreshing manifest node: "); //$NON-NLS-1$
+				buffer.append(this);
+				buffer.append(" aborted because a refresh is already in progress"); //$NON-NLS-1$
+				System.out.println(buffer.toString());
+			}
 			return;
 		}
 		// check if in synch
@@ -536,7 +598,8 @@ public class ProjectApiDescription extends ApiDescription {
 						for (int i = 0; i < fragments.length; i++) {
 							names.add(fragments[i].getElementName());
 						}
-						BundleApiComponent.initializeApiDescription(this, fBundle, names);
+						ProjectComponent component = getApiComponent();
+						BundleComponent.initializeApiDescription(this, component.getBundleDescription(), names);
 						fPackageTimeStamp = fManifestFile.getModificationStamp();
 					} catch (CoreException e) {
 						ApiPlugin.log(e.getStatus());
@@ -565,31 +628,20 @@ public class ProjectApiDescription extends ApiDescription {
 	 * @return associated Java project
 	 */
 	private IJavaProject getJavaProject() {
-		return fComponent.getJavaProject();
+		return fProject;
 	}
 
 	/**
-	 * Returns a class file container for the given package fragment root, or <code>null</code>
-	 * if none.
+	 * Returns a class file container for the given package fragment root.
 	 * 
 	 * @param root package fragment root
-	 * @return class file container or <code>null</code> if none
+	 * @return class file container
+	 * @exception CoreException if container cannot be located
 	 */
-	private synchronized IApiTypeContainer getApiTypeContainer(IPackageFragmentRoot root) throws CoreException {
-		if (fClassFileContainers == null) {
-			fClassFileContainers = new HashMap(8);
-		}
-		IPath location = root.getRawClasspathEntry().getOutputLocation();
-		if (location == null) {
-			location = root.getJavaProject().getOutputLocation();
-		}
-		IApiTypeContainer container = (IApiTypeContainer) fClassFileContainers.get(location);
+	synchronized IApiTypeContainer getApiTypeContainer(IPackageFragmentRoot root) throws CoreException {
+		IApiTypeContainer container  = getApiComponent().getTypeContainer(root);
 		if (container == null) {
-			IContainer folder = root.getJavaProject().getProject().getWorkspace().getRoot().getFolder(location);
-			if (folder.exists()) {
-				container = new FolderApiTypeContainer(fComponent, folder);
-				fClassFileContainers.put(location, container);
-			}
+			throw new CoreException(new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, "Unable to resolve type conatiner for package fragment root"));  //$NON-NLS-1$
 		}
 		return container;
 	}
@@ -621,40 +673,6 @@ public class ProjectApiDescription extends ApiDescription {
 	}
 	
 	/**
-	 * Connects this API description to the given bundle.
-	 * 
-	 * @param bundle bundle description
-	 */
-	public synchronized void connect(BundleDescription bundle) {
-		if (fBundle != null && fBundle != bundle) {
-			throw new IllegalStateException("Already connected to a bundle"); //$NON-NLS-1$
-		}
-		fBundle = bundle;
-	}
-	
-	/**
-	 * Returns the bundle this description is connected to or <code>null</code>
-	 * 
-	 * @return connected bundle or <code>null</code>
-	 */
-	BundleDescription getConnection() {
-		return fBundle;
-	}
-	
-	/**
-	 * Disconnects this API description from the given bundle.
-	 * 
-	 * @param bundle bundle description
-	 */
-	public synchronized void disconnect(BundleDescription bundle) {
-		if (bundle.equals(fBundle)) {
-			fBundle = null;
-		} else if (fBundle != null) {
-			throw new IllegalStateException("Not connected to same bundle"); //$NON-NLS-1$
-		}
-	}
-	
-	/**
 	 * Returns this API description as XML.
 	 * 
 	 * @throws CoreException
@@ -722,4 +740,35 @@ public class ProjectApiDescription extends ApiDescription {
 		buffer.append("Project API description for: ").append(getJavaProject().getElementName()); //$NON-NLS-1$
 		return buffer.toString();
 	}
+	
+	/**
+	 * Returns the API component associated with this API description
+	 * 
+	 * @return API component
+	 * @exception CoreException if the API component cannot be located
+	 */
+	private ProjectComponent getApiComponent() throws CoreException {
+		IApiBaseline baseline = ApiBaselineManager.getManager().getWorkspaceBaseline();
+		ProjectComponent component = (ProjectComponent) baseline.getApiComponent(getJavaProject().getProject());
+		if (component == null) {
+			throw new CoreException(new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, "Unable to resolve project API component for API description"));  //$NON-NLS-1$
+		}
+		return component;
+	}
+	
+	/**
+	 * Resolves annotations based on inheritance for the given node and element.
+	 * 
+	 * @param node manifest node
+	 * @param element the element annotations are being resolved for
+	 * @return annotations
+	 */
+	protected IApiAnnotations resolveAnnotations(ManifestNode node, IElementDescriptor element) {
+		IApiAnnotations ann = super.resolveAnnotations(node, element);
+		if (node instanceof TypeNode) {
+			return new TypeAnnotations(ann, ((TypeNode)node).fBuildStamp);
+		}
+		return ann;
+		
+	}	
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/TypeAnnotations.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/TypeAnnotations.java
new file mode 100644
index 0000000..2262195
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/TypeAnnotations.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal;
+
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
+
+/**
+ * Extends annotations with relative build time stamp
+ */
+public class TypeAnnotations implements IApiAnnotations {
+	
+	private IApiAnnotations fAnnotations;
+	private long fBuildStamp;
+
+	/**
+	 * @param visibility
+	 * @param restrictions
+	 */
+	public TypeAnnotations(IApiAnnotations annotations, long stamp) {
+		fAnnotations = annotations;
+		fBuildStamp = stamp;
+	}
+	
+	public long getBuildStamp() {
+		return fBuildStamp;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations#getVisibility()
+	 */
+	public int getVisibility() {
+		return fAnnotations.getVisibility();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations#getRestrictions()
+	 */
+	public int getRestrictions() {
+		return fAnnotations.getRestrictions();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/WorkspaceDeltaProcessor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/WorkspaceDeltaProcessor.java
new file mode 100644
index 0000000..1a5cd1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/WorkspaceDeltaProcessor.java
@@ -0,0 +1,275 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.IElementChangedListener;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaElementDelta;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.pde.api.tools.internal.model.ApiBaseline;
+import org.eclipse.pde.api.tools.internal.util.Util;
+
+/**
+ * Standard delta processor for us to track element state changes in the workspace
+ * using {@link IJavaElementDelta}s and {@link IResourceDelta}s
+ * 
+ * @since 1.1
+ */
+public class WorkspaceDeltaProcessor implements IElementChangedListener, IResourceChangeListener {
+
+	/**
+	 * Constant used for controlling tracing in the API tool builder
+	 */
+	private static boolean DEBUG = Util.DEBUG;
+	
+	/**
+	 * Method used for initializing tracing in the API tool builder
+	 */
+	public static void setDebug(boolean debugValue) {
+		DEBUG = debugValue || Util.DEBUG;
+	}
+	
+	ApiBaselineManager bmanager = ApiBaselineManager.getManager();
+	ApiDescriptionManager dmanager = ApiDescriptionManager.getManager();
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
+	 */
+	public void elementChanged(ElementChangedEvent event) {
+		processJavaElementDeltas(event.getDelta().getAffectedChildren(), null);
+	}
+
+	/**
+	 * Processes the java element deltas of interest
+	 * @param deltas
+	 */
+	void processJavaElementDeltas(IJavaElementDelta[] deltas, IJavaProject project) {
+		for(int i = 0; i < deltas.length; i++) {
+			IJavaElementDelta delta = deltas[i];
+			switch(delta.getElement().getElementType()) {
+				case IJavaElement.JAVA_PROJECT: {
+					IJavaProject proj = (IJavaProject) delta.getElement();
+					int flags = delta.getFlags();
+					switch (delta.getKind()) {
+						case IJavaElementDelta.CHANGED: {
+							if(!Util.isApiProject(proj)) {
+								if(DEBUG) {
+									System.out.println("--> skipped processing CHANGED delta for project: "+proj.getElementName()); //$NON-NLS-1$
+								}
+								continue;
+							}
+							if((flags & IJavaElementDelta.F_OPENED) != 0) {
+								if(DEBUG) {
+									System.out.println("--> processing OPEN project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+								}
+								bmanager.disposeWorkspaceBaseline();
+							}
+							else if( (flags & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0 ||
+								(flags & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0) {
+									if(DEBUG) {
+										System.out.println("--> processing CLASSPATH CHANGE project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+									}
+									bmanager.disposeWorkspaceBaseline();
+									dmanager.projectClasspathChanged(proj);
+									dmanager.flushElementCache(delta.getElement());
+							}
+							else if((flags & IJavaElementDelta.F_CHILDREN) != 0) {
+								if(DEBUG) {
+									System.out.println("--> processing CHILDREN delta of project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+								}
+								processJavaElementDeltas(delta.getAffectedChildren(), proj);
+							} 
+							else if((flags & IJavaElementDelta.F_CONTENT) != 0) {
+								if (proj != null) {
+									if(DEBUG) {
+										System.out.println("--> processing child CONTENT of project: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+									}
+									IResourceDelta[] resourcedeltas = delta.getResourceDeltas();
+									if(resourcedeltas != null) {
+										IResourceDelta rdelta = null;
+										for (int j = 0; j < resourcedeltas.length; j++) {
+											rdelta = resourcedeltas[j].findMember(new Path(Util.MANIFEST_NAME));
+											if(rdelta!= null && rdelta.getKind() == IResourceDelta.CHANGED && (rdelta.getFlags() & IResourceDelta.CONTENT) > 0) {
+												if(DEBUG) {
+													System.out.println("--> processing manifest delta"); //$NON-NLS-1$
+												}
+												bmanager.disposeWorkspaceBaseline();
+												break;
+											}
+										}
+									}
+								}
+								else {
+									if(DEBUG) {
+										System.out.println("--> ignoring child CONTENT project context is null");  //$NON-NLS-1$
+									}
+								}
+							}
+							break;
+						}
+						case IJavaElementDelta.ADDED: {
+							if(!Util.isApiProject(proj)) {
+								if(DEBUG) {
+									System.out.println("--> skipped processing ADDED delta for project: "+proj.getElementName()); //$NON-NLS-1$
+								}
+								continue;
+							}
+							if((flags & IJavaElementDelta.F_MOVED_FROM) != 0) {
+								if(DEBUG) {
+									System.out.println("--> processing PROJECT RENAME from: ["+delta.getMovedFromElement().getJavaProject().getElementName()+"] to: ["+proj.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+								}
+								bmanager.disposeWorkspaceBaseline();
+							}
+							break;
+						}
+					}
+					break;
+				}
+				case IJavaElement.PACKAGE_FRAGMENT_ROOT: {
+					IPackageFragmentRoot root = (IPackageFragmentRoot) delta.getElement();
+					int flags = delta.getFlags();
+					if ((flags & (IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED
+							| IJavaElementDelta.F_ADDED_TO_CLASSPATH
+							| IJavaElementDelta.F_REMOVED_FROM_CLASSPATH)) != 0) {
+						if(DEBUG) {
+							System.out.println("processed CLASSPATH CHANGED for package fragment root: ["+root.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						dmanager.projectClasspathChanged(project);
+					} 
+					if ((flags & IJavaElementDelta.F_CHILDREN) != 0) {
+						if(DEBUG) {
+							System.out.println("processed CHILDREN for package fragment root: ["+root.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						processJavaElementDeltas(delta.getAffectedChildren(), project);
+					}
+					break;
+				}
+				case IJavaElement.PACKAGE_FRAGMENT: {
+					IPackageFragment fragment = (IPackageFragment) delta.getElement();
+					if(delta.getKind() == IJavaElementDelta.REMOVED) {
+						if(DEBUG) {
+							System.out.println("processed REMOVED delta for package fragment: ["+fragment.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						((ApiBaseline)bmanager.getWorkspaceBaseline()).clearPackage(fragment.getElementName());
+					}
+					int flags = delta.getFlags();
+					if ((flags & IJavaElementDelta.F_CHILDREN) != 0) {
+						if(DEBUG) {
+							System.out.println("processed CHILDREN delta for package fragment: ["+fragment.getElementName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						processJavaElementDeltas(delta.getAffectedChildren(), project);
+					}
+					break;
+				}
+				case IJavaElement.COMPILATION_UNIT : {
+					int flags = delta.getFlags();
+					switch (delta.getKind()) {
+						case IJavaElementDelta.CHANGED: {
+							if ((flags & (IJavaElementDelta.F_CONTENT | 
+											IJavaElementDelta.F_FINE_GRAINED | 
+											IJavaElementDelta.F_PRIMARY_RESOURCE)) != 0){
+								if (project != null) {
+									if(DEBUG) {
+										System.out.println("processed CONTENT / FINE_GRAINED / PRIMARY_RESOURCE delta for: ["+delta.getElement().getElementName()+"]");  //$NON-NLS-1$//$NON-NLS-2$
+									}
+									dmanager.projectChanged(project);
+									dmanager.flushElementCache(delta.getElement());
+									continue;
+								}
+							}
+							break;
+						}
+						case IJavaElementDelta.ADDED :
+						case IJavaElementDelta.REMOVED : {
+							if (project != null) {
+								if(DEBUG) {
+									if(delta.getKind() == IJavaElementDelta.ADDED) {
+										System.out.println("processed ADDED delta for: ["+delta.getElement().getElementName()+"]");  //$NON-NLS-1$//$NON-NLS-2$
+									}
+									else {
+										System.out.println("processed REMOVED delta for: ["+delta.getElement().getElementName()+"]");  //$NON-NLS-1$//$NON-NLS-2$
+									}
+								}
+								dmanager.projectChanged(project);
+								dmanager.flushElementCache(delta.getElement());
+								continue;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+	 */
+	public void resourceChanged(IResourceChangeEvent event) {
+		IResource resource = event.getResource();
+		switch(event.getType()) {
+			case IResourceChangeEvent.PRE_BUILD: {
+				if(DEBUG) {
+					if (resource == null) {
+						System.out.println("processed PRE_BUILD delta for workspace."); //$NON-NLS-1$
+					} else {
+						System.out.println("processed PRE_BUILD delta for project: ["+resource.getName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+				}
+				IResourceDelta delta = event.getDelta();
+				if (delta != null) {
+					IResourceDelta[] children = delta.getAffectedChildren(IResourceDelta.CHANGED);
+					for (int i = 0; i < children.length; i++) {
+						resource = children[i].getResource();
+						if (children[i].getResource().getType() == IResource.PROJECT && Util.isApiProject((IProject) resource)) {
+							if ((children[i].getFlags() & IResourceDelta.DESCRIPTION) != 0) {
+								IJavaProject jp = (IJavaProject) JavaCore.create(resource);
+								dmanager.clean(jp, true, true);
+								bmanager.disposeWorkspaceBaseline();
+								break;
+							}
+						}
+					}
+				}
+				break;
+			}
+			case IResourceChangeEvent.PRE_CLOSE: 
+			case IResourceChangeEvent.PRE_DELETE:{
+				if(resource.getType() == IResource.PROJECT && Util.isApiProject((IProject) resource)) {
+					if(DEBUG) {
+						if(event.getType() == IResourceChangeEvent.PRE_CLOSE) {
+							System.out.println("processed PRE_CLOSE delta for project: ["+resource.getName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						else {
+							if(DEBUG) {
+								System.out.println("processed PRE_DELETE delta for project: ["+resource.getName()+"]"); //$NON-NLS-1$ //$NON-NLS-2$
+							}
+						}
+					}
+					bmanager.disposeWorkspaceBaseline();
+					IJavaProject project = (IJavaProject) JavaCore.create(resource);
+					dmanager.clean(project, false, true);
+					dmanager.flushElementCache(project);
+				}
+				break;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalMethodReference.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalMethodReference.java
index 0f64ee8..66340df 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalMethodReference.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalMethodReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.pde.api.tools.internal.builder;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.api.tools.internal.model.MethodKey;
 import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
@@ -48,7 +47,7 @@ public abstract class AbstractIllegalMethodReference extends AbstractProblemDete
 	 * @param componentId the component the type is located in
 	 */
 	void addIllegalMethod(IMethodDescriptor method, String componentId) {
-		fIllegalMethods.put(new MethodKey(method.getName(), method.getSignature()), method);
+		fIllegalMethods.put(new MethodKey(method.getEnclosingType().getQualifiedName(), method.getName(), method.getSignature(), true), method);
 		fMethodComponents.put(method, componentId);
 	}	
 
@@ -56,7 +55,7 @@ public abstract class AbstractIllegalMethodReference extends AbstractProblemDete
 	 * @see org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector#considerReference(org.eclipse.pde.api.tools.internal.provisional.builder.IReference)
 	 */
 	public boolean considerReference(IReference reference) {
-		if (fIllegalMethods.containsKey(new MethodKey(reference.getReferencedMemberName(), reference.getReferencedSignature()))) {
+		if (super.considerReference(reference) && fIllegalMethods.containsKey(new MethodKey(reference.getReferencedTypeName(), reference.getReferencedMemberName(), reference.getReferencedSignature(), true))) {
 			retainReference(reference);
 			return true;
 		}
@@ -70,14 +69,10 @@ public abstract class AbstractIllegalMethodReference extends AbstractProblemDete
 		if(!super.isProblem(reference)) {
 			return false;
 		}
-		try {
-			IApiMember method = reference.getResolvedReference();
-			String componentId = (String) fMethodComponents.get(method.getHandle());
-			// TODO: would it be faster to store component objects and use identity instead of equals?
-			return componentId != null && method.getApiComponent().getId().equals(componentId);
-		} catch (CoreException e) {
-			return false;
-		}
+		IApiMember method = reference.getResolvedReference();
+		String componentId = (String) fMethodComponents.get(method.getHandle());
+		// TODO: would it be faster to store component objects and use identity instead of equals?
+		return isReferenceFromComponent(reference, componentId);
 	}
 	
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalTypeReference.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalTypeReference.java
index bf2f6ff..7b4683b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalTypeReference.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractIllegalTypeReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,7 +54,7 @@ public abstract class AbstractIllegalTypeReference extends AbstractProblemDetect
 	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector#considerReference(org.eclipse.pde.api.tools.internal.provisional.model.IReference)
 	 */
 	public boolean considerReference(IReference reference) {
-		if (fIllegalTypes.containsKey(reference.getReferencedTypeName())) {
+		if (super.considerReference(reference) && fIllegalTypes.containsKey(reference.getReferencedTypeName())) {
 			retainReference(reference);
 			return true;
 		}
@@ -77,13 +77,9 @@ public abstract class AbstractIllegalTypeReference extends AbstractProblemDetect
 		if(!super.isProblem(reference)) {
 			return false;
 		}
-		try {
-			IApiMember type = reference.getResolvedReference();
-			Object componentId = fIllegalTypes.get(type.getName());
-			return componentId != null && type.getApiComponent().getId().equals(componentId);
-		} catch (CoreException e) {
-			return false;
-		}
+		IApiMember type = reference.getResolvedReference();
+		Object componentId = fIllegalTypes.get(type.getName());
+		return isReferenceFromComponent(reference, componentId);
 	}
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.search.AbstractProblemDetector#getSourceRange(org.eclipse.jdt.core.IType, org.eclipse.jface.text.IDocument, org.eclipse.pde.api.tools.internal.provisional.model.IReference)
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractProblemDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractProblemDetector.java
index 28720b4..5d33188 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractProblemDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractProblemDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ import org.eclipse.jdt.core.Signature;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.Position;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
@@ -87,6 +87,13 @@ public abstract class AbstractProblemDetector implements IApiProblemDetector {
 		return fPotentialProblems;
 	}
 	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IApiProblemDetector#considerReference(org.eclipse.pde.api.tools.internal.provisional.builder.IReference)
+	 */
+	public boolean considerReference(IReference reference) {
+		return reference != null && (reference.getReferenceKind() & getReferenceKinds()) > 0;
+	}
+	
 	/**
 	 * Creates a problem for a specific reference in the workspace
 	 * 
@@ -368,8 +375,8 @@ public abstract class AbstractProblemDetector implements IApiProblemDetector {
 					try {
 						IApiProblem problem = null;
 						IApiComponent component = reference.getMember().getApiComponent();
-						if (component instanceof PluginProjectApiComponent) {
-							PluginProjectApiComponent ppac = (PluginProjectApiComponent) component;
+						if (component instanceof ProjectComponent) {
+							ProjectComponent ppac = (ProjectComponent) component;
 							IJavaProject project = ppac.getJavaProject();
 							problem = createProblem(reference, project);
 						} else {
@@ -411,7 +418,23 @@ public abstract class AbstractProblemDetector implements IApiProblemDetector {
 		}
 		return true;
 	}
-	
+	protected boolean isReferenceFromComponent(IReference reference,
+			Object componentId) {
+		if (componentId != null) {
+			final IApiComponent apiComponent = reference.getResolvedReference().getApiComponent();
+			// API component is either component id itself or one of its fragment
+			if (apiComponent.getSymbolicName().equals(componentId)) {
+				return true;
+			}
+			try {
+				final IApiComponent host = apiComponent.getHost();
+				return host != null && host.getSymbolicName().equals(componentId);
+			} catch (CoreException e) {
+				ApiPlugin.log(e);
+			}
+		}
+		return false;
+	}
 	/**
 	 * Tries to find the given {@link IApiMethod} in the given {@link IType}. If a matching method is not
 	 * found <code>null</code> is returned 
@@ -619,10 +642,13 @@ public abstract class AbstractProblemDetector implements IApiProblemDetector {
 		}
 		return null;
 	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.search.AbstractProblemDetector#createProblem(org.eclipse.pde.api.tools.internal.provisional.model.IReference)
+	
+	/**
+	 * @param reference
+	 * @return
+	 * @throws CoreException
 	 */
-	protected IApiProblem createProblem(IReference reference) throws CoreException {
+	public IApiProblem createProblem(IReference reference) throws CoreException {
 		int lineNumber = reference.getLineNumber();
 		if (lineNumber > 0) {
 			lineNumber--;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractTypeLeakDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractTypeLeakDetector.java
index 138ba22..793285a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractTypeLeakDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/AbstractTypeLeakDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public abstract class AbstractTypeLeakDetector extends AbstractLeakProblemDetect
 	public boolean considerReference(IReference reference) {
 		// consider the reference if the location the reference is made from is visible:
 		// i.e. a public or protected class in an API package
-		if (isNonAPIReference(reference)) {
+		if (super.considerReference(reference) && isNonAPIReference(reference)) {
 			IApiMember member = reference.getMember();
 			int modifiers = member.getModifiers();
 			if (((Flags.AccPublic | Flags.AccProtected) & modifiers) > 0) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java
index e383dd5..4774f6a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,12 +29,15 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.IClasspathAttribute;
 import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaModelMarker;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.jdt.internal.core.JavaModelManager;
@@ -135,6 +138,7 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 		cleanupUsageMarkers(resource);
 		cleanupCompatibilityMarkers(resource);
 		cleanupUnsupportedTagMarkers(resource);
+		cleanupFatalMarkers(resource);
 	}
 	
 	/**
@@ -143,10 +147,12 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	 */
 	void cleanupUnsupportedTagMarkers(IResource resource) {
 		try {
-			if(DEBUG) {
-				System.out.println("cleaning unsupported tag problems"); //$NON-NLS-1$
+			if(resource != null && resource.isAccessible()) {
+				if(DEBUG) {
+					System.out.println("cleaning unsupported tag problems"); //$NON-NLS-1$
+				}
+				resource.deleteMarkers(IApiMarkerConstants.UNSUPPORTED_TAG_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE);
 			}
-			resource.deleteMarkers(IApiMarkerConstants.UNSUPPORTED_TAG_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE);
 		} catch (CoreException e) {
 			ApiPlugin.log(e.getStatus());
 		}
@@ -188,6 +194,20 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	}
 	
 	/**
+	 * cleans up only fatal problem markers from the given {@link IResource}
+	 * @param resource
+	 */
+	void cleanupFatalMarkers(IResource resource) {
+		try {
+			if (resource != null && resource.isAccessible()) {
+				resource.deleteMarkers(IApiMarkerConstants.FATAL_PROBLEM_MARKER, false, IResource.DEPTH_INFINITE);
+			}
+		} catch(CoreException e) {
+			ApiPlugin.log(e.getStatus());
+		}
+	}
+	
+	/**
 	 * Cleans up the unused API filter problems from the given resource
 	 * @param resource
 	 */
@@ -207,18 +227,19 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	 */
 	protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
 		this.currentproject = getProject();
-		if (!this.currentproject.isAccessible() || !this.currentproject.hasNature(ApiPlugin.NATURE_ID) || hasBeenBuilt(this.currentproject)) {
+		if (shouldAbort(this.currentproject)) {
 			return NO_PROJECTS;
 		}
+		// update build time stamp
+		BuildStamps.incBuildStamp(this.currentproject);
 		if (DEBUG) {
 			System.out.println("\nApiAnalysis builder - Starting build of " + this.currentproject.getName() + " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$ //$NON-NLS-2$
 		}
-		Util.updateMonitor(monitor, 0);
 		SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.api_analysis_builder, 8);
 		IApiBaseline wbaseline = ApiPlugin.getDefault().getApiBaselineManager().getWorkspaceBaseline();
 		if (wbaseline == null) {
 			if (DEBUG) {
-				System.err.println("Could not retrieve a workspace profile");  //$NON-NLS-1$
+				System.err.println("Could not retrieve a workspace baseline");  //$NON-NLS-1$
 			}
 			return NO_PROJECTS;
 		}
@@ -296,40 +317,59 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 					}
 				}	
 			}
-			Util.updateMonitor(monitor, 0);
-		} catch(CoreException e) {
+			Util.updateMonitor(localMonitor, 0);
+		
+		}
+		catch (OperationCanceledException oce) {
+			//do nothing, but don't forward it
+			//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304315
+			if(DEBUG) {
+				System.out.println("Trapped OperationCanceledException"); //$NON-NLS-1$
+			}
+		}
+		catch(CoreException e) {
 			IStatus status = e.getStatus();
 			if (status == null || status.getCode() != ApiPlugin.REPORT_BASELINE_IS_DISPOSED) {
 				throw e;
 			}
 			ApiPlugin.log(e);
 		} finally {
-			Util.updateMonitor(monitor, 0);
-			if(this.analyzer != null) {
-				this.analyzer.dispose();
-				this.analyzer = null;
-			}
-			if(projects.length < 1) {
-				//if this build cycle indicates that more projects need to be built do not close 
-				//the baselines yet, they might be re-read by another build cycle
-				if(baseline != null) {
-					baseline.close();
+			try {
+				Util.updateMonitor(localMonitor, 0);
+				if(this.analyzer != null) {
+					this.analyzer.dispose();
+					this.analyzer = null;
 				}
-			}
-			Util.updateMonitor(monitor, 0);
-			if (this.buildstate != null) {
-				for(int i = 0, max = projects.length; i < max; i++) {
-					IProject project = projects[i];
-					if (Util.isApiProject(project)) {
-						this.buildstate.addApiToolingDependentProject(project.getName());
+				if(projects.length < 1) {
+					//if this build cycle indicates that more projects need to be built do not close 
+					//the baselines yet, they might be re-read by another build cycle
+					if(baseline != null) {
+						baseline.close();
 					}
 				}
-				BuildState.saveBuiltState(this.currentproject, this.buildstate);
-				this.buildstate = null;
-				Util.updateMonitor(monitor, 0);
+				Util.updateMonitor(localMonitor, 0);
+				if (this.buildstate != null) {
+					for(int i = 0, max = projects.length; i < max; i++) {
+						IProject project = projects[i];
+						if (Util.isApiProject(project)) {
+							this.buildstate.addApiToolingDependentProject(project.getName());
+						}
+					}
+					this.buildstate.setBuildPathCRC(BuildState.computeBuildPathCRC(this.currentproject));
+					BuildState.saveBuiltState(this.currentproject, this.buildstate);
+					this.buildstate = null;
+					Util.updateMonitor(monitor, 0);
+				}
+				if(localMonitor != null) {
+					localMonitor.done();
+				}
 			}
-			if(monitor != null) {
-				monitor.done();
+			catch(OperationCanceledException oce) {
+				//do nothing, but don't forward it
+				//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304315
+				if(DEBUG) {
+					System.out.println("Trapped OperationCanceledException"); //$NON-NLS-1$
+				}
 			}
 		}
 		if (DEBUG) {
@@ -339,6 +379,57 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	}
 	
 	/**
+	 * Returns if the builder should abort the build of the given project.
+	 * The build decides to abort if one of the following are true:
+	 * <ul>
+	 * <li>The project is not accessible</li>
+	 * <li>The project does not have the API tools nature</li>
+	 * <li>The project has already been built - as decided by the build framework</li>
+	 * <li>The project has fatal JDT errors that prevent the creation of class files</li>
+	 * </ul>
+	 * @param project
+	 * @return true if the builder should abort building the given project, false otherwise
+	 * @throws CoreException
+	 * @see {@link #hasBeenBuilt(IProject)}
+	 * @see {@link #hasFatalProblems(IProject)}
+	 * @since 1.1
+	 */
+	boolean shouldAbort(IProject project) throws CoreException {
+		return !project.isAccessible() || 
+			   !project.hasNature(ApiPlugin.NATURE_ID) || 
+			   hasBeenBuilt(project) ||
+			   hasFatalProblems(project);
+	}
+	
+	/**
+	 * Returns if the project we are about to build has fatal JDT problems that prevent 
+	 * class files from being built
+	 * @param project
+	 * @return true if the given project has fatal JDT problems
+	 * @see 
+	 * @throws CoreException
+	 * @see {@link org.eclipse.jdt.core.IJavaModelMarker#BUILDPATH_PROBLEM_MARKER}
+	 * @since 1.1
+	 */
+	boolean hasFatalProblems(IProject project) throws CoreException {
+		IMarker[] problems = project.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ZERO);
+		if(problems.length > 0) {
+			cleanupMarkers(project);
+			IApiProblem problem = ApiProblemFactory.newFatalProblem(
+					Path.EMPTY.toString(), 
+					new String[] {project.getName()}, 
+					IApiProblem.FATAL_JDT_BUILDPATH_PROBLEM);
+			createMarkerForProblem(
+					IApiProblem.CATEGORY_FATAL_PROBLEM, 
+					IApiMarkerConstants.FATAL_PROBLEM_MARKER, 
+					problem);
+			return true;
+		}
+		cleanupFatalMarkers(project);
+		return false;
+	}
+	
+	/**
 	 * if its worth doing a full build considering the given set if projects
 	 * @param projects projects to check the build state for
 	 * @return true if a full build should take place, false otherwise
@@ -366,10 +457,10 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	 * @param monitor
 	 */
 	void buildAll(IApiBaseline baseline, IApiBaseline wbaseline, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.api_analysis_on_0, 4);
 		try {
 			BuildState.setLastBuiltState(this.currentproject, null);
 			this.buildstate = new BuildState();
-			SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.api_analysis_on_0, 4);
 			localMonitor.subTask(NLS.bind(BuilderMessages.ApiAnalysisBuilder_initializing_analyzer, currentproject.getName()));
 			cleanupMarkers(this.currentproject);
 			IPluginModelBase currentModel = getCurrentModel();
@@ -388,8 +479,8 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 			}
 		}
 		finally {
-			if(monitor != null) {
-				monitor.done();
+			if(localMonitor != null) {
+				localMonitor.done();
 			}
 		}
 	}
@@ -543,6 +634,17 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 		}
 		IResource resource = currentproject.findMember(new Path(resourcePath));
 		if(resource == null) {
+			//might be re-exported try to look it up
+			IJavaProject jp = JavaCore.create(currentproject);
+			try {
+				IType type = jp.findType(problem.getTypeName());
+				if(type != null) {
+					return type.getResource();
+				}
+			}
+			catch(JavaModelException jme) {
+				//do nothing
+			}
 			return null;
 		}
 		if(!resource.isAccessible()) {
@@ -597,7 +699,7 @@ public class ApiAnalysisBuilder extends IncrementalProjectBuilder {
 	 */
 	void cleanupApiDescription(IProject project) {
 		if(project != null && project.exists()) {
-			ApiDescriptionManager.getDefault().clean(JavaCore.create(project), true, false);
+			ApiDescriptionManager.getManager().clean(JavaCore.create(project), true, false);
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
index 691bbd2..c88ee9d 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,9 @@ import java.util.jar.JarFile;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
@@ -60,7 +63,7 @@ import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
 import org.eclipse.pde.api.tools.internal.ApiFilterStore;
 import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
 import org.eclipse.pde.api.tools.internal.comparator.Delta;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFactory;
 import org.eclipse.pde.api.tools.internal.problems.ApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
@@ -104,6 +107,10 @@ import com.ibm.icu.text.MessageFormat;
  */
 public class BaseApiAnalyzer implements IApiAnalyzer {
 	private static final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+	/**
+	 * @since 1.1
+	 */
+	static final String[] NO_TYPES = new String[0];
 	private static class ReexportedBundleVersionInfo {
 		String componentID;
 		int kind;
@@ -169,8 +176,8 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			final IApiComponent component,
 			final IBuildContext context,
 			IProgressMonitor monitor) {
+		SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.BaseApiAnalyzer_analyzing_api, 7);
 		try {
-			SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.BaseApiAnalyzer_analyzing_api, 6);
 			fJavaProject = getJavaProject(component);
 			this.fFilterStore = filterStore;
 			this.fPreferences = preferences;
@@ -195,7 +202,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 						buffer.append(',');
 					}
 					buffer.append(
-						BuilderMessages.bind(
+						NLS.bind(
 								BuilderMessages.reportUnsatisfiedConstraint,
 								new String[] {
 										constraint.getName(),
@@ -219,66 +226,83 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			}
 			boolean checkfilters = false;
 			if(baseline != null) {
-				IApiComponent reference = baseline.getApiComponent(component.getId());
+				IApiComponent reference = baseline.getApiComponent(component.getSymbolicName());
 				this.fBuildState = state;
 				if(fBuildState == null) {
 					fBuildState = getBuildState();
 				}
 				//compatibility checks
 				if(reference != null) {
-					localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_comparing_api_profiles, new String[] {reference.getId(), baseline.getName()}));
-					if(bcontext.hasChangedTypes()) {
+					localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_comparing_api_profiles, new String[] {reference.getSymbolicName(), baseline.getName()}));
+					if(bcontext.hasTypes()) {
 						String[] changedtypes = bcontext.getStructurallyChangedTypes();
-						for(int i = 0; i < changedtypes.length; i++) {
-							if(changedtypes[i] == null) {
-								continue;
-							}
-							checkCompatibility(changedtypes[i], reference, component);
-							updateMonitor(localMonitor);
-						}
+						checkCompatibility(changedtypes, reference, component, localMonitor);
 					} else {
 						// store re-exported bundle into the build state
-						checkCompatibility(reference, component);
-						updateMonitor(localMonitor);
+						checkCompatibility(reference, component, localMonitor.newChild(1));
+						Util.updateMonitor(localMonitor);
 					}
 					this.fBuildState.setReexportedComponents(Util.getReexportedComponents(component));
 				} else {
-					localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_comparing_api_profiles, new String[] {component.getId(), baseline.getName()}));
-					checkCompatibility(null, component);
-					updateMonitor(localMonitor);
+					localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_comparing_api_profiles, new String[] {component.getSymbolicName(), baseline.getName()}));
+					checkCompatibility(null, component, localMonitor.newChild(1));
+					Util.updateMonitor(localMonitor);
 				}
 				//version checks
 				checkApiComponentVersion(reference, component);
-				updateMonitor(localMonitor);
+				Util.updateMonitor(localMonitor);
 				checkfilters = true;
 			}
 			else {
 				//check default baseline
 				checkDefaultBaselineSet();
-				updateMonitor(localMonitor);
+				Util.updateMonitor(localMonitor);
 			}
 			//usage checks
 			checkApiUsage(bcontext, component, localMonitor.newChild(1));
-			updateMonitor(localMonitor);
+			Util.updateMonitor(localMonitor);
 			//tag validation
 			checkTagValidation(bcontext, component, localMonitor.newChild(1));
-			updateMonitor(localMonitor);
+			Util.updateMonitor(localMonitor);
 			if(checkfilters) {
 				//check for unused filters only if the scans have been done
 				checkUnusedProblemFilters(bcontext, component, localMonitor.newChild(1));
 			}
-			updateMonitor(localMonitor);
+			Util.updateMonitor(localMonitor);
 		} catch(CoreException e) {
 			ApiPlugin.log(e);
 		}
-		finally {
-			if(monitor != null) {
-				monitor.done();
+		catch(OperationCanceledException oce) {
+			//do nothing, but don't forward it
+			//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304315
+			if(DEBUG) {
+				System.out.println("Trapped OperationCanceledException"); //$NON-NLS-1$
 			}
 		}
+		finally {
+			localMonitor.done();
+		}
 	}
 
 	/**
+	 * Checks the compatibility of each type.
+	 * 
+	 * @param changedtypes type names, may have <code>null</code> entries
+	 * @param reference API component in the reference baseline
+	 * @param component API component being checked for compatibility
+	 * @param localMonitor
+	 * @throws CoreException
+	 */
+	private void checkCompatibility(String[] changedtypes, IApiComponent reference, IApiComponent component, SubMonitor localMonitor) throws CoreException {
+		for(int i = 0; i < changedtypes.length; i++) {
+			if(changedtypes[i] == null) {
+				continue;
+			}
+			checkCompatibility(changedtypes[i], reference, component, localMonitor.newChild(1));
+			Util.updateMonitor(localMonitor);
+		}
+	}
+	/**
 	 * Checks for unused API problem filters
 	 * @param context the current build context
 	 * @param reference
@@ -289,47 +313,110 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			if(DEBUG) {
 				System.out.println("Ignoring unused problem filter check"); //$NON-NLS-1$
 			}
-			updateMonitor(monitor, 1);
+			Util.updateMonitor(monitor, 1);
 			return;
 		}
 		try {
 			ApiFilterStore store = (ApiFilterStore)reference.getFilterStore();
-			IProject project = fJavaProject.getProject(); 
+			IProject project = fJavaProject.getProject();
+			boolean autoremove = ApiPlugin.getDefault().getEnableState(IApiProblemTypes.AUTOMATICALLY_REMOVE_UNUSED_PROBLEM_FILTERS, project);
+			ArrayList toremove = null;
+			if(autoremove) {
+				toremove = new ArrayList(8);
+			}
+			IApiProblemFilter[] filters = null;
 			if(context.hasTypes()) {
 				IResource resource = null;
-				String[] types = context.getStructurallyChangedTypes();
+				String[] types = getApiUseTypes(context);
 				for (int i = 0; i < types.length; i++) {
 					if(types[i] == null) {
 						continue;
 					}
 					resource = Util.getResource(project, fJavaProject.findType(Signatures.getPrimaryTypeName(types[i])));
 					if(resource != null) {
-						createUnusedApiFilterProblems(store.getUnusedFilters(resource, types[i]));
+						filters = store.getUnusedFilters(resource, types[i], null);
+						if(autoremove) {
+							addToList(toremove, filters);
+							continue;
+						}
+						createUnusedApiFilterProblems(filters);
 					}
 				}
-				types = context.getDependentTypes();
+				/*types = context.getStructuralDependentTypes();
 				for (int i = 0; i < types.length; i++) {
 					if(types[i] == null) {
 						continue;
 					}
 					resource = Util.getResource(project, fJavaProject.findType(Signatures.getPrimaryTypeName(types[i])));
 					if(resource != null) {
-						createUnusedApiFilterProblems(store.getUnusedFilters(resource, types[i]));
+						filters = store.getUnusedFilters(
+								resource, 
+								types[i], 
+								new int[] {IApiProblem.CATEGORY_COMPATIBILITY, IApiProblem.CATEGORY_SINCETAGS, IApiProblem.CATEGORY_VERSION});
+						if(autoremove) {
+							addToList(toremove, filters);
+							continue;
+						}
+						createUnusedApiFilterProblems(filters);
 					}
+				}*/
+				if(autoremove) {
+					removeUnusedProblemFilters(store, toremove, monitor);
 				}
 			} else {
-				//full build, clean up all old markers
-				createUnusedApiFilterProblems(store.getUnusedFilters(null, null));
+				filters = store.getUnusedFilters(null, null, null);
+				if(autoremove) {
+					addToList(toremove, filters);
+					removeUnusedProblemFilters(store, toremove, monitor);
+				}
+				else {
+					//full build, clean up all old markers
+					createUnusedApiFilterProblems(filters);
+				}
 			}
 		}
 		catch(CoreException ce) {
 			//ignore, just don't create problems
 		}
 		finally {
-			updateMonitor(monitor, 1);
+			Util.updateMonitor(monitor, 1);
 		}
 	}
-
+	
+	/**
+	 * Adds all of the non-null elements from the given array to the given list
+	 * @param list
+	 * @param array
+	 * @since 1.1
+	 */
+	void addToList(List list, Object[] array) {
+		for (int i = 0; i < array.length; i++) {
+			if(array[i] != null) {
+				list.add(array[i]);
+			}
+		}
+	}
+	
+	/**
+	 * Removes the given set of {@link IApiProblemFilter}s from the given {@link IApiFilterStore}
+	 * using a workspace runnable to avoid resource notifications
+	 * @param store the store to remove from
+	 * @param filterlist list of filters to batch remove
+	 * @param monitor 
+	 * @throws CoreException
+	 * @since 1.1
+	 */
+	void removeUnusedProblemFilters(final IApiFilterStore store, final List filterlist, final IProgressMonitor monitor) throws CoreException {
+		if(filterlist.size() > 0) {
+			IWorkspaceRunnable runner = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor) throws CoreException {
+					store.removeFilters((IApiProblemFilter[]) filterlist.toArray(new IApiProblemFilter[filterlist.size()]));
+				}
+			};
+			ResourcesPlugin.getWorkspace().run(runner, null, IWorkspace.AVOID_UPDATE, monitor);
+		}
+	}
+	
 	/**
 	 * Creates a new unused {@link IApiProblemFilter} problem
 	 * @param filters the filters to create the problems for
@@ -402,7 +489,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	 * Check the version changes of re-exported bundles to make sure that the given component
 	 * version is modified accordingly.
 	 * 
-	 * @param reference the given reference api profile
+	 * @param reference the given reference API component
 	 * @param component the given component
 	 */
 	private ReexportedBundleVersionInfo checkBundleVersionsOfReexportedBundles(
@@ -577,11 +664,13 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.ILLEGAL_IMPLEMENT, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.ILLEGAL_INSTANTIATE, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.ILLEGAL_REFERENCE, project) == ApiPlugin.SEVERITY_IGNORE;
+		ignore &= plugin.getSeverityLevel(IApiProblemTypes.ILLEGAL_OVERRIDE, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.LEAK_EXTEND, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.LEAK_FIELD_DECL, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.LEAK_IMPLEMENT, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.LEAK_METHOD_PARAM, project) == ApiPlugin.SEVERITY_IGNORE;
 		ignore &= plugin.getSeverityLevel(IApiProblemTypes.LEAK_METHOD_RETURN_TYPE, project) == ApiPlugin.SEVERITY_IGNORE;
+		ignore &= plugin.getSeverityLevel(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES, project) == ApiPlugin.SEVERITY_IGNORE;
 		return ignore;
 	}
 	/**
@@ -592,7 +681,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			// we ignore it for non-OSGi case
 			return false;
 		}
-		return ApiPlugin.getDefault().getEnableState(IApiProblemTypes.REPORT_API_BREAKAGE_WHEN_MAJOR_VERSION_INCREMENTED, fJavaProject.getProject().getProject()).equals(ApiPlugin.VALUE_ENABLED);
+		return ApiPlugin.getDefault().getEnableState(IApiProblemTypes.REPORT_API_BREAKAGE_WHEN_MAJOR_VERSION_INCREMENTED, fJavaProject.getProject().getProject());
 	}
 	
 	/**
@@ -642,14 +731,14 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			// we ignore it for non-OSGi case
 			return true;
 		}
-		return ApiPlugin.getDefault().getEnableState(IApiProblemTypes.INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MINOR_WITHOUT_API_CHANGE, fJavaProject.getProject().getProject()).equals(ApiPlugin.VALUE_DISABLED);
+		return !ApiPlugin.getDefault().getEnableState(IApiProblemTypes.INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MINOR_WITHOUT_API_CHANGE, fJavaProject.getProject().getProject());
 	}
 	private boolean ignoreMajorVersionCheckWithoutBreakingChange() {
 		if (fJavaProject == null) {
 			// we ignore it for non-OSGi case
 			return true;
 		}
-		return ApiPlugin.getDefault().getEnableState(IApiProblemTypes.INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MAJOR_WITHOUT_BREAKING_CHANGE, fJavaProject.getProject().getProject()).equals(ApiPlugin.VALUE_DISABLED);
+		return !ApiPlugin.getDefault().getEnableState(IApiProblemTypes.INCOMPATIBLE_API_COMPONENT_VERSION_INCLUDE_INCLUDE_MAJOR_WITHOUT_BREAKING_CHANGE, fJavaProject.getProject().getProject());
 	}
 	/**
 	 * @return if the invalid tag check should be ignored
@@ -691,7 +780,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 					}
 					localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_scanning_0, typenames[i]));
 					processType(typenames[i]);
-					updateMonitor(localMonitor);
+					Util.updateMonitor(localMonitor);
 				}
 			}
 			else {
@@ -701,7 +790,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 						if(roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
 							localMonitor.subTask(NLS.bind(BuilderMessages.BaseApiAnalyzer_scanning_0, roots[i].getPath().toOSString()));
 							scanSource(roots[i], localMonitor.newChild(1));
-							updateMonitor(localMonitor);
+							Util.updateMonitor(localMonitor);
 						}
 					}
 				}
@@ -709,7 +798,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 					ApiPlugin.log(jme);
 				}
 			}
-			updateMonitor(localMonitor);
+			Util.updateMonitor(localMonitor);
 		} catch(CoreException e) {
 			ApiPlugin.log(e);
 		}
@@ -735,21 +824,21 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 					IJavaElement[] children = parent.getChildren();
 					for (int i = 0; i < children.length; i++) {
 						scanSource(children[i], monitor);
-						updateMonitor(monitor, 0);
+						Util.updateMonitor(monitor, 0);
 					}
 					break;
 				}
 				case IJavaElement.COMPILATION_UNIT: {
 					ICompilationUnit unit = (ICompilationUnit) element;
 					processType(unit);
-					updateMonitor(monitor, 0);
+					Util.updateMonitor(monitor, 0);
 					break;
 				}
 			}
 		}
 		finally {
 			if(monitor != null) {
-				updateMonitor(monitor);
+				Util.updateMonitor(monitor);
 				monitor.done();
 			}
 		}
@@ -805,33 +894,23 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			}
 			return;
 		} 
-		IApiTypeContainer scope = getSearchScope(component, null);
+		IApiTypeContainer scope = null;
 		if(context.hasTypes()) {
-			String[] deptypes = context.getDependentTypes();
-			String[] structtypes = context.getStructurallyChangedTypes();
-			//TODO do any special processing here to prune types prior
-			//to doing the scan
-			HashSet typenames = new HashSet(deptypes.length + structtypes.length);
-			for (int i = 0; i < deptypes.length; i++) {
-				if(deptypes[i] == null) {
-					continue;
-				}
-				typenames.add(deptypes[i]);
-			}
-			for (int i = 0; i < structtypes.length; i++) {
-				if(structtypes[i] == null) {
-					continue;
-				}
-				typenames.add(structtypes[i]);
+			String[] typenames = getApiUseTypes(context);
+			if(typenames.length < 1) {
+				monitor.done();
+				return;
 			}
-			scope = getSearchScope(component, (String[]) typenames.toArray(new String[typenames.size()]));
+			scope = getSearchScope(component, typenames);
+		} else {
+			scope = getSearchScope(component, null); // entire component
 		}
-		SubMonitor localMonitor = SubMonitor.convert(monitor, MessageFormat.format(BuilderMessages.checking_api_usage, new String[] {component.getId()}), 2);
+		SubMonitor localMonitor = SubMonitor.convert(monitor, MessageFormat.format(BuilderMessages.checking_api_usage, new String[] {component.getSymbolicName()}), 2);
 		ReferenceAnalyzer analyzer = new ReferenceAnalyzer();
 		try {
 			long start = System.currentTimeMillis();
-			IApiProblem[] illegal = analyzer.analyze(component, scope, monitor);
-			updateMonitor(localMonitor);
+			IApiProblem[] illegal = analyzer.analyze(component, scope, localMonitor.newChild(2));
+			Util.updateMonitor(localMonitor);
 			long end = System.currentTimeMillis();
 			if (DEBUG) {
 				System.out.println("API usage scan: " + (end- start) + " ms\t" + illegal.length + " problems"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -839,7 +918,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			for (int i = 0; i < illegal.length; i++) {
 				addProblem(illegal[i]);
 			}
-			updateMonitor(localMonitor);
+			Util.updateMonitor(localMonitor);
 		} 
 		catch (CoreException ce) {
 			if(DEBUG) {
@@ -854,15 +933,52 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	}
 	
 	/**
+	 * Returns the collection of type names to be built
+	 * @param context
+	 * @return the complete listing of type names to build or an empty array, never <code>null</code>
+	 * @since 1.1
+	 */
+	String[] getApiUseTypes(IBuildContext context) {
+		if(context.hasTypes()) {
+			String[] deptypes = null;
+			int size = 0;
+			if (context.hasDescriptionDependents()) {
+				// only check dependents if there were description changes
+				deptypes = context.getDescriptionDependentTypes();
+				size += deptypes.length;
+			}
+			String[] structtypes = context.getStructurallyChangedTypes();
+			HashSet typenames = new HashSet(size + structtypes.length); // TODO: better sizing
+			if (deptypes != null) {
+				for (int i = 0; i < deptypes.length; i++) {
+					if(deptypes[i] == null) {
+						continue;
+					}
+					typenames.add(deptypes[i]);
+				}
+			}
+			for (int i = 0; i < structtypes.length; i++) {
+				if(structtypes[i] == null) {
+					continue;
+				}
+				typenames.add(structtypes[i]);
+			}
+			return (String[]) typenames.toArray(new String[typenames.size()]);
+		}
+		return NO_TYPES;
+	}
+	
+	/**
 	 * Compares the given type between the two API components
 	 * @param typeName the type to check in each component
 	 * @param reference 
 	 * @param component
+	 * @param monitor
 	 */
-	private void checkCompatibility(final String typeName, final IApiComponent reference, final IApiComponent component) throws CoreException {
-		String id = component.getId();
+	private void checkCompatibility(final String typeName, final IApiComponent reference, final IApiComponent component, IProgressMonitor monitor) throws CoreException {
+		String id = component.getSymbolicName();
 		if (DEBUG) {
-			System.out.println("comparing profiles ["+reference.getId()+"] and ["+id+"] for type ["+typeName+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			System.out.println("comparing components ["+reference.getSymbolicName()+"] and ["+id+"] for type ["+typeName+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
 		IApiTypeRoot classFile = null;
 		try {
@@ -874,153 +990,197 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 		} catch (CoreException e) {
 			ApiPlugin.log(e);
 		}
-		IDelta delta = null;
-		IApiComponent provider = null;
-		if (classFile == null) {
-			String packageName = Signatures.getPackageName(typeName);
-			// check if the type is provided by a required component (it could have been moved/re-exported)
-			IApiComponent[] providers = component.getBaseline().resolvePackage(component, packageName);
-			int index = 0;
-			while (classFile == null && index < providers.length) {
-				IApiComponent p = providers[index];
-				if (!p.equals(component)) {
-					String id2 = p.getId();
-					if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
-						classFile = p.findTypeRoot(typeName);
-					} else {
-						classFile = p.findTypeRoot(typeName, id2);
-					}
-					if (classFile != null) {
-						provider = p;
+		SubMonitor localmonitor = SubMonitor.convert(monitor, BuilderMessages.BaseApiAnalyzer_checking_compat, 4);
+		try {
+			IDelta delta = null;
+			IApiComponent provider = null;
+			boolean reexported = false;
+			if (classFile == null) {
+				String packageName = Signatures.getPackageName(typeName);
+				// check if the type is provided by a required component (it could have been moved/re-exported)
+				IApiComponent[] providers = component.getBaseline().resolvePackage(component, packageName);
+				int index = 0;
+				while (classFile == null && index < providers.length) {
+					IApiComponent p = providers[index];
+					if (!p.equals(component)) {
+						String id2 = p.getSymbolicName();
+						if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
+							classFile = p.findTypeRoot(typeName);
+						} else {
+							classFile = p.findTypeRoot(typeName, id2);
+						}
+						if (classFile != null) {
+							IRequiredComponentDescription[] components = component.getRequiredComponents();
+							for (int i = 0; i < components.length; i++) {
+								IRequiredComponentDescription description = components[i];
+								if (description.getId().equals(p.getSymbolicName()) && description.isExported()) {
+									reexported = true;
+									break;
+								}
+							}
+							provider = p;
+						}
 					}
+					index++;
 				}
-				index++;
-			}
-		} else {
-			provider = component;
-		}
-		if (classFile == null) {
-			// this indicates a removed type
-			// we should try to get the class file from the reference
-			IApiTypeRoot referenceClassFile = null;
-			try {
-				referenceClassFile = reference.findTypeRoot(typeName);
-			} catch (CoreException e) {
-				ApiPlugin.log(e);
+			} else {
+				provider = component;
 			}
-			if (referenceClassFile != null) {
+			Util.updateMonitor(localmonitor, 1);
+			if (classFile == null) {
+				// this indicates a removed type
+				// we should try to get the class file from the reference
+				IApiTypeRoot referenceClassFile = null;
 				try {
-					IApiType type = referenceClassFile.getStructure();
-					final IApiDescription referenceApiDescription = reference.getApiDescription();
-					IApiAnnotations elementDescription = referenceApiDescription.resolveAnnotations(type.getHandle());
-					int restrictions = RestrictionModifiers.NO_RESTRICTIONS;
-					if (!type.isMemberType() && !type.isAnonymous() && !type.isLocal()) {
-						int visibility = VisibilityModifiers.ALL_VISIBILITIES;
-						// we skip nested types (member, local and anonymous)
-						if (elementDescription != null) {
-							restrictions = elementDescription.getRestrictions();
-							visibility = elementDescription.getVisibility();
-						}
-						// if the visibility is API, we only consider public and protected types
-						if (Util.isDefault(type.getModifiers())
-									|| Flags.isPrivate(type.getModifiers())) {
+					referenceClassFile = reference.findTypeRoot(typeName);
+				} catch (CoreException e) {
+					ApiPlugin.log(e);
+				}
+				if (referenceClassFile != null) {
+					try {
+						IApiType type = referenceClassFile.getStructure();
+						if(type == null) {
 							return;
 						}
-						if (VisibilityModifiers.isAPI(visibility)) {
-							String deltaComponentID = Util.getDeltaComponentVersionsId(reference);
-							delta = new Delta(
-									deltaComponentID,
-									IDelta.API_COMPONENT_ELEMENT_TYPE,
-									IDelta.REMOVED,
-									IDelta.TYPE,
-									restrictions,
-									type.getModifiers(),
-									0,
-									typeName,
-									typeName,
-									new String[] { typeName, Util.getComponentVersionsId(reference)});
+						final IApiDescription referenceApiDescription = reference.getApiDescription();
+						IApiAnnotations elementDescription = referenceApiDescription.resolveAnnotations(type.getHandle());
+						int restrictions = RestrictionModifiers.NO_RESTRICTIONS;
+						if (!type.isMemberType() && !type.isAnonymous() && !type.isLocal()) {
+							int visibility = VisibilityModifiers.ALL_VISIBILITIES;
+							// we skip nested types (member, local and anonymous)
+							if (elementDescription != null) {
+								restrictions = elementDescription.getRestrictions();
+								visibility = elementDescription.getVisibility();
+							}
+							// if the visibility is API, we only consider public and protected types
+							if (Util.isDefault(type.getModifiers())
+										|| Flags.isPrivate(type.getModifiers())) {
+								return;
+							}
+							if (VisibilityModifiers.isAPI(visibility)) {
+								String deltaComponentID = Util.getDeltaComponentVersionsId(reference);
+								delta = new Delta(
+										deltaComponentID,
+										IDelta.API_COMPONENT_ELEMENT_TYPE,
+										IDelta.REMOVED,
+										IDelta.TYPE,
+										restrictions,
+										type.getModifiers(),
+										0,
+										typeName,
+										typeName,
+										new String[] { typeName, Util.getComponentVersionsId(reference)});
+							}
 						}
+					} catch (CoreException e) {
+						ApiPlugin.log(e);
 					}
-				} catch (CoreException e) {
-					ApiPlugin.log(e);
 				}
-			}
-		} else {
-			fBuildState.cleanup(typeName);
-			long time = System.currentTimeMillis();
-			try {
-				delta = ApiComparator.compare(classFile, reference, provider, reference.getBaseline(), provider.getBaseline(), VisibilityModifiers.API);
-			} catch(Exception e) {
-				ApiPlugin.log(e);
-			} finally {
-				if (DEBUG) {
-					System.out.println("Time spent for " + typeName + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				Util.updateMonitor(localmonitor, 1);
+			} else {
+				fBuildState.cleanup(typeName);
+				long time = System.currentTimeMillis();
+				try {
+					IApiComponent exporter = null;
+					if (reexported) {
+						exporter = component;
+					}
+					delta = ApiComparator.compare(classFile, reference, provider, exporter, reference.getBaseline(), provider.getBaseline(), VisibilityModifiers.API, localmonitor.newChild(1));
+				} catch(Exception e) {
+					ApiPlugin.log(e);
+				} finally {
+					if (DEBUG) {
+						System.out.println("Time spent for " + typeName + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					}
+					fPendingDeltaInfos.clear();
 				}
-				fPendingDeltaInfos.clear();
 			}
-		}
-		if (delta == null) {
-			return;
-		}
-		if (delta != ApiComparator.NO_DELTA) {
-			List allDeltas = Util.collectAllDeltas(delta);
-			for (Iterator iterator = allDeltas.iterator(); iterator.hasNext();) {
-				processDelta((IDelta) iterator.next(), reference, component);
+			if (delta == null) {
+				return;
 			}
-			if (!fPendingDeltaInfos.isEmpty()) {
-				for (Iterator iterator = fPendingDeltaInfos.iterator(); iterator.hasNext();) {
-					checkSinceTags((Delta) iterator.next(), component);
+			if (delta != ApiComparator.NO_DELTA) {
+				List allDeltas = Util.collectAllDeltas(delta);
+				localmonitor.subTask(BuilderMessages.BaseApiAnalyzer_processing_deltas);
+				for (Iterator iterator = allDeltas.iterator(); iterator.hasNext();) {
+					processDelta((IDelta) iterator.next(), reference, component);
+				}
+				Util.updateMonitor(localmonitor, 1);
+				if (!fPendingDeltaInfos.isEmpty()) {
+					localmonitor.subTask(BuilderMessages.BaseApiAnalyzer_checking_since_tags);
+					for (Iterator iterator = fPendingDeltaInfos.iterator(); iterator.hasNext();) {
+						checkSinceTags((Delta) iterator.next(), component);
+					}
 				}
+				Util.updateMonitor(localmonitor, 1);
+			}
+			else {
+				Util.updateMonitor(localmonitor, 2);
 			}
 		}
+		finally {
+			localmonitor.done();
+		}
 	}
 	/**
-	 * Compares the two given profiles and generates an {@link IDelta}
+	 * Compares the two given components and generates an {@link IDelta}
 	 * 
 	 * @param jproject
 	 * @param reference
 	 * @param component
+	 * @param monitor
 	 */
-	private void checkCompatibility(final IApiComponent reference, final IApiComponent component) throws CoreException {
+	private void checkCompatibility(final IApiComponent reference, final IApiComponent component, IProgressMonitor monitor) throws CoreException {
 		long time = System.currentTimeMillis();
-		IDelta delta = null;
-		if (reference == null) {
-			delta =
-				new Delta(
-					null,
-					IDelta.API_PROFILE_ELEMENT_TYPE,
-					IDelta.ADDED,
-					IDelta.API_COMPONENT,
-					null,
-					component.getId(),
-					component.getId());
-		} else {
-			try {
-				delta = ApiComparator.compare(reference, component, VisibilityModifiers.API);
-			} catch(Exception e) {
-				ApiPlugin.log(e);
-			} finally {
-				if (DEBUG) {
-					System.out.println("Time spent for " + component.getId() + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		SubMonitor localmonitor = SubMonitor.convert(monitor, BuilderMessages.BaseApiAnalyzer_checking_compat, 3);
+		try {
+			IDelta delta = null;
+			if (reference == null) {
+				delta =
+					new Delta(
+						null,
+						IDelta.API_BASELINE_ELEMENT_TYPE,
+						IDelta.ADDED,
+						IDelta.API_COMPONENT,
+						null,
+						component.getSymbolicName(),
+						component.getSymbolicName());
+				Util.updateMonitor(localmonitor, 5);
+			} else {
+				try {
+					delta = ApiComparator.compare(reference, component, VisibilityModifiers.API, localmonitor.newChild(1));
+				} finally {
+					if (DEBUG) {
+						System.out.println("Time spent for " + component.getSymbolicName() + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					}
+					fPendingDeltaInfos.clear();
 				}
-				fPendingDeltaInfos.clear();
 			}
-		}
-		if (delta == null) {
-			return;
-		}
-		if (delta != ApiComparator.NO_DELTA) {
-			List allDeltas = Util.collectAllDeltas(delta);
-			if (allDeltas.size() != 0) {
-				for (Iterator iterator = allDeltas.iterator(); iterator.hasNext();) {
-					processDelta((IDelta) iterator.next(), reference, component);
-				}
-				if (!fPendingDeltaInfos.isEmpty()) {
-					for (Iterator iterator = fPendingDeltaInfos.iterator(); iterator.hasNext();) {
-						checkSinceTags((Delta) iterator.next(), component);
+			if (delta == null) {
+				return;
+			}
+			if (delta != ApiComparator.NO_DELTA) {
+				List allDeltas = Util.collectAllDeltas(delta);
+				if (allDeltas.size() != 0) {
+					localmonitor.subTask(BuilderMessages.BaseApiAnalyzer_processing_deltas);
+					for (Iterator iterator = allDeltas.iterator(); iterator.hasNext();) {
+						processDelta((IDelta) iterator.next(), reference, component);
+					}
+					Util.updateMonitor(localmonitor, 1);
+					localmonitor.subTask(BuilderMessages.BaseApiAnalyzer_checking_since_tags);
+					if (!fPendingDeltaInfos.isEmpty()) {
+						for (Iterator iterator = fPendingDeltaInfos.iterator(); iterator.hasNext();) {
+							checkSinceTags((Delta) iterator.next(), component);
+						}
 					}
+					Util.updateMonitor(localmonitor, 1);
 				}
 			}
+			else {
+				Util.updateMonitor(localmonitor, 2);
+			}
+		}
+		finally {
+			localmonitor.done();
 		}
 	}
 	
@@ -1320,8 +1480,8 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	 */
 	private void createApiComponentResolutionProblem(final IApiComponent component, final String message) throws CoreException {
 		IApiProblem problem = ApiProblemFactory.newApiComponentResolutionProblem(
-				Path.EMPTY.toPortableString(),
-				new String[] {component.getId(), message },
+				Path.EMPTY.toString(),
+				new String[] {component.getSymbolicName(), message },
 				new String[] {IApiMarkerConstants.API_MARKER_ATTR_ID},
 				new Object[] {new Integer(IApiMarkerConstants.API_COMPONENT_RESOLUTION_MARKER_ID)},
 				IElementDescriptor.RESOURCE,
@@ -1348,7 +1508,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 							IApiTypeRoot typeRoot = null;
 							IApiType type = null;
 							try {
-								String id = component.getId();
+								String id = component.getSymbolicName();
 								if (Util.ORG_ECLIPSE_SWT.equals(id)) {
 									typeRoot = component.findTypeRoot(typeName);
 								} else {
@@ -1362,7 +1522,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 									while (typeRoot == null && index < providers.length) {
 										IApiComponent p = providers[index];
 										if (!p.equals(component)) {
-											String id2 = p.getId();
+											String id2 = p.getSymbolicName();
 											if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
 												typeRoot = p.findTypeRoot(typeName);
 											} else {
@@ -1467,8 +1627,8 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 		Version compversion = new Version(compversionval);
 		Version newversion = null;
 		if (DEBUG) {
-			System.out.println("reference version of " + reference.getId() + " : " + refversion); //$NON-NLS-1$ //$NON-NLS-2$
-			System.out.println("component version of " + component.getId() + " : " + compversion); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("reference version of " + reference.getSymbolicName() + " : " + refversion); //$NON-NLS-1$ //$NON-NLS-2$
+			System.out.println("component version of " + component.getSymbolicName() + " : " + compversion); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		IDelta[] breakingChanges = fBuildState.getBreakingChanges();
 		if (breakingChanges.length != 0) {
@@ -1776,7 +1936,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	}
 	
 	/**
-	 * Checks to see if there is a default API profile set in the workspace,
+	 * Checks to see if there is a default API baseline set in the workspace,
 	 * if not create a marker
 	 */
 	private void checkDefaultBaselineSet() {
@@ -1790,7 +1950,7 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 			System.out.println("Checking if the default api baseline is set"); //$NON-NLS-1$
 		}
 		IApiProblem problem = ApiProblemFactory.newApiBaselineProblem(
-				Path.EMPTY.toPortableString(),
+				Path.EMPTY.toString(),
 				new String[] {IApiMarkerConstants.API_MARKER_ATTR_ID},
 				new Object[] {new Integer(IApiMarkerConstants.DEFAULT_API_BASELINE_MARKER_ID)},
 				IElementDescriptor.RESOURCE,
@@ -1799,31 +1959,6 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	}
 	
 	/**
-	 * Updates the work done on the monitor by 1 tick and polls to see if the monitor has been cancelled
-	 * @param monitor
-	 * @throws OperationCanceledException if the monitor has been cancelled
-	 */
-	private void updateMonitor(IProgressMonitor monitor) throws OperationCanceledException {
-		updateMonitor(monitor, 1);
-	}
-	
-	/**
-	 * Updates the work done on the monitor by 1 tick and polls to see if the monitor has been cancelled
-	 * @param monitor
-	 * @param work
-	 * @throws OperationCanceledException if the monitor has been cancelled
-	 */
-	private void updateMonitor(IProgressMonitor monitor, int work) throws OperationCanceledException {
-		if(monitor != null) {
-			monitor.worked(work);
-			monitor.setTaskName(""); //$NON-NLS-1$
-			if (monitor.isCanceled()) {
-				throw new OperationCanceledException();
-			}
-		}
-	}
-	
-	/**
 	 * Returns the Java project associated with the given API component, or <code>null</code>
 	 * if none.
 	 * 
@@ -1831,8 +1966,8 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 	 * @return Java project or <code>null</code>
 	 */
 	private IJavaProject getJavaProject(IApiComponent component) {
-		if (component instanceof PluginProjectApiComponent) {
-			PluginProjectApiComponent pp = (PluginProjectApiComponent) component;
+		if (component instanceof ProjectComponent) {
+			ProjectComponent pp = (ProjectComponent) component;
 			return pp.getJavaProject();
 		}
 		return null;
@@ -1880,11 +2015,11 @@ public class BaseApiAnalyzer implements IApiAnalyzer {
 		}
 
 		IApiBaselineManager manager = ApiBaselineManager.getManager();
-		IApiBaseline profile = manager.getWorkspaceBaseline();
-		if(profile == null) {
+		IApiBaseline baseline = manager.getWorkspaceBaseline();
+		if(baseline == null) {
 			return false;
 		}
-		IApiComponent component = profile.getApiComponent(project);
+		IApiComponent component = baseline.getApiComponent(project);
 		if(component != null) {
 			try {
 				IApiFilterStore filterStore = component.getFilterStore();
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildContext.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildContext.java
index 8381a62..6aff3dd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildContext.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,9 +22,10 @@ public class BuildContext implements IBuildContext {
 
 	private static final String[] NO_TYPES = new String[0];
 	
-	private StringSet structchanged = null;
-	private StringSet dependents = null;
-	private StringSet removed = null;
+	private StringSet structualChanges = null;
+	private StringSet removedTypes = null;
+	private StringSet descriptionChanges = null;
+	private StringSet descriptionDepedents = null;
 	
 	/**
 	 * Constructor
@@ -35,53 +36,60 @@ public class BuildContext implements IBuildContext {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getStructurallyChangedTypes()
 	 */
 	public String[] getStructurallyChangedTypes() {
-		if(this.structchanged == null) {
+		if(this.structualChanges == null) {
 			return NO_TYPES;
 		}
-		return this.structchanged.values;
+		return this.structualChanges.values;
 	}
-
+	
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getRemovedTypes()
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getDescriptionChangedTypes()
 	 */
-	public String[] getRemovedTypes() {
-		if(this.removed == null) {
+	public String[] getDescriptionChangedTypes() {
+		if (this.descriptionChanges == null) {
 			return NO_TYPES;
 		}
-		return this.removed.values;
+		return this.descriptionChanges.values;
 	}
-	
+
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getDependentTypes()
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getRemovedTypes()
 	 */
-	public String[] getDependentTypes() {
-		if(this.dependents == null) {
+	public String[] getRemovedTypes() {
+		if(this.removedTypes == null) {
 			return NO_TYPES;
 		}
-		return this.dependents.values;
+		return this.removedTypes.values;
 	}
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasChangedTypes()
 	 */
-	public boolean hasChangedTypes() {
-		int count = (this.structchanged == null ? 0 : this.structchanged.elementSize);
-		count += (this.removed == null ? 0 : this.removed.elementSize);
+	public boolean hasStructuralChanges() {
+		int count = (this.structualChanges == null ? 0 : this.structualChanges.elementSize);
+		count += (this.removedTypes == null ? 0 : this.removedTypes.elementSize);
 		return count > 0;
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasDependentTypes()
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasDescriptionChanges()
+	 */
+	public boolean hasDescriptionChanges() {
+		return (this.descriptionChanges == null ? 0 : this.descriptionChanges.elementSize) > 0;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasDescriptionDependents()
 	 */
-	public boolean hasDependentTypes() {
-		return (this.dependents == null ? 0 : this.dependents.elementSize) > 0;
+	public boolean hasDescriptionDependents() {
+		return (this.descriptionDepedents == null ? 0 : this.descriptionDepedents.elementSize) > 0;
 	}
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasRemovedTypes()
 	 */
 	public boolean hasRemovedTypes() {
-		return (this.removed == null ? 0 : this.removed.elementSize) > 0;
+		return (this.removedTypes == null ? 0 : this.removedTypes.elementSize) > 0;
 	}
 	
 	/**
@@ -90,14 +98,14 @@ public class BuildContext implements IBuildContext {
 	 * 
 	 * @param typename
 	 */
-	public void recordStructurallyChangedType(String typename) {
+	public void recordStructuralChange(String typename) {
 		if(typename == null) {
 			return;
 		}
-		if(this.structchanged == null) {
-			this.structchanged = new StringSet(16);
+		if(this.structualChanges == null) {
+			this.structualChanges = new StringSet(16);
 		}
-		this.structchanged.add(typename);
+		this.structualChanges.add(typename.replace('/', '.'));
 	}
 
 	/**
@@ -110,10 +118,26 @@ public class BuildContext implements IBuildContext {
 		if(typename == null) {
 			return;
 		}
-		if(this.removed == null) {
-			this.removed = new StringSet(16);
+		if(this.removedTypes == null) {
+			this.removedTypes = new StringSet(16);
+		}
+		this.removedTypes.add(typename.replace('/', '.'));
+	}
+	
+	/**
+	 * Adds the given type name to the collection of types that have
+	 * had an API description change. Does nothing if <code>null</code>
+	 * is passed in.
+	 * 
+	 * @param typename the type that has an API description change or <code>null</code>
+	 */
+	public void recordDescriptionChanged(String typename) {
+		if (typename != null) {
+			if (this.descriptionChanges == null) {
+				this.descriptionChanges = new StringSet(16);
+			}
+			this.descriptionChanges.add(typename.replace('/', '.'));
 		}
-		this.removed.add(typename);
 	}
 	
 	/**
@@ -122,27 +146,35 @@ public class BuildContext implements IBuildContext {
 	 * 
 	 * @param typename the type to add a dependent of
 	 */
-	public void recordDependentType(String typename) {
+	public void recordDescriptionDependent(String typename) {
 		if(typename == null) {
 			return;
 		}
-		if(this.dependents == null) {
-			this.dependents = new StringSet(32);
+		if(this.descriptionDepedents == null) {
+			this.descriptionDepedents = new StringSet(16);
 		}
-		this.dependents.add(typename);
-	}
+		this.descriptionDepedents.add(typename.replace('/', '.'));
+	}	
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#dispose()
 	 */
 	public void dispose() {
-		if(this.structchanged != null) {
-			this.structchanged.clear();
-			this.structchanged = null;
+		if(this.structualChanges != null) {
+			this.structualChanges.clear();
+			this.structualChanges = null;
+		}
+		if(this.removedTypes != null) {
+			this.removedTypes.clear();
+			this.removedTypes = null;
+		}
+		if(this.descriptionChanges != null) {
+			this.descriptionChanges.clear();
+			this.descriptionChanges = null;
 		}
-		if(this.dependents != null) {
-			this.dependents.clear();
-			this.dependents = null;
+		if(this.descriptionDepedents != null) {
+			this.descriptionDepedents.clear();
+			this.descriptionDepedents = null;
 		}
 	}
 
@@ -150,27 +182,37 @@ public class BuildContext implements IBuildContext {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#hasTypes()
 	 */
 	public boolean hasTypes() {
-		return hasChangedTypes() || hasDependentTypes() || hasRemovedTypes();
+		return hasStructuralChanges() || hasRemovedTypes() || hasDescriptionChanges() || hasDescriptionDependents();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#containsChangedType(java.lang.String)
 	 */
-	public boolean containsChangedType(String typename) {
+	public boolean containsStructuralChange(String typename) {
 		if(typename == null) {
 			return false;
 		}
-		return structchanged != null && structchanged.includes(typename);
+		return structualChanges != null && structualChanges.includes(typename.replace('/', '.'));
 	}
-
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#containsDescriptionChange(java.lang.String)
+	 */
+	public boolean containsDescriptionChange(String typename) {
+		if(typename == null) {
+			return false;
+		}
+		return descriptionChanges != null && descriptionChanges.includes(typename.replace('/', '.'));
+	}
+	
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#containsDependentType(java.lang.String)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#containsDescriptionDependent(java.lang.String)
 	 */
-	public boolean containsDependentType(String typename) {
+	public boolean containsDescriptionDependent(String typename) {
 		if(typename == null) {
 			return false;
 		}
-		return dependents != null && dependents.includes(typename);
+		return descriptionDepedents != null && descriptionDepedents.includes(typename.replace('/', '.'));
 	}
 
 	/* (non-Javadoc)
@@ -180,6 +222,16 @@ public class BuildContext implements IBuildContext {
 		if(typename == null) {
 			return false;
 		}
-		return removed != null && removed.includes(typename);
+		return removedTypes != null && removedTypes.includes(typename.replace('/', '.'));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IBuildContext#getDescriptionDependentTypes()
+	 */
+	public String[] getDescriptionDependentTypes() {
+		if(this.descriptionDepedents == null) {
+			return NO_TYPES;
+		}
+		return this.descriptionDepedents.values;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildStamps.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildStamps.java
new file mode 100644
index 0000000..bce0d54
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildStamps.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.builder;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Stores relative build time stamps for each project. 
+ */
+public class BuildStamps {
+	
+	private static Map fStamps = new HashMap(); 
+
+	/**
+	 * Returns the current build time stamp for the given project.
+	 * 
+	 * @param project project
+	 * @return relative build time stamp
+	 */
+	public static synchronized long getBuildStamp(IProject project) {
+		long[] stamp = (long[]) fStamps.get(project);
+		if (stamp != null) {
+			return stamp[0];
+		};
+		return 0L;
+	}
+	
+	/**
+	 * Increments the build time stamp for the given project. Only to be called 
+	 * by the builder.
+	 * 
+	 * @param project project being built
+	 */
+	public static synchronized void incBuildStamp(IProject project) {
+		long[] stamp = (long[]) fStamps.get(project);
+		if (stamp != null) {
+			stamp[0] = stamp[0]++;
+		} else {
+			fStamps.put(project, new long[]{1L});
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
index f23a741..f65b4f5 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuildState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.zip.CRC32;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
@@ -33,7 +34,10 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.comparator.Delta;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
@@ -49,12 +53,13 @@ import org.eclipse.pde.api.tools.internal.util.Util;
 public class BuildState {
 	private static final IDelta[] EMPTY_DELTAS = new IDelta[0];
 	private static final String[] NO_REEXPORTED_COMPONENTS = new String[0];
-	private static final int VERSION = 0x10;
+	private static final int VERSION = 0x20;
 	
 	private Map compatibleChanges;
 	private Map breakingChanges;
 	private String[] reexportedComponents;
 	private Set apiToolingDependentProjects;
+	private long buildpathCRC = -1L;
 	
 	/**
 	 * Constructor
@@ -86,6 +91,7 @@ public class BuildState {
 		if (in.readBoolean()) {
 			// continue to read
 			BuildState state = new BuildState();
+			state.buildpathCRC = in.readLong();
 			int numberOfCompatibleDeltas = in.readInt();
 			// read all compatible deltas
 			for (int i = 0; i < numberOfCompatibleDeltas; i++) {
@@ -123,6 +129,7 @@ public class BuildState {
 		out.writeUTF("STATE"); //$NON-NLS-1$
 		out.writeInt(VERSION);
 		out.writeBoolean(true);
+		out.writeLong(state.buildpathCRC);
 		IDelta[] compatibleChangesDeltas = state.getCompatibleChanges();
 		int length = compatibleChangesDeltas.length;
 		out.writeInt(length);
@@ -311,17 +318,13 @@ public class BuildState {
 		if (components == null) {
 			return;
 		}
-		try {
-			if (this.reexportedComponents == null) {
-				final int length = components.length;
-				String[] result = new String[length];
-				for (int i = 0; i < length; i++) {
-					result[i] = components[i].getId();
-				}
-				this.reexportedComponents = result;
+		if (this.reexportedComponents == null) {
+			final int length = components.length;
+			String[] result = new String[length];
+			for (int i = 0; i < length; i++) {
+				result[i] = components[i].getSymbolicName();
 			}
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
+			this.reexportedComponents = result;
 		}
 	}
 
@@ -342,6 +345,25 @@ public class BuildState {
 	public Set getApiToolingDependentProjects() {
 		return this.apiToolingDependentProjects == null ? Collections.EMPTY_SET : this.apiToolingDependentProjects;
 	}
+	
+	/**
+	 * Returns a CRC32 code of the project's build path or -1 if unknown.
+	 * 
+	 * @return CRC32 code of the project's build path or -1
+	 */
+	public long getBuildPathCRC() {
+		return buildpathCRC;
+	}
+	
+	/**
+	 * Sets the build path CRC for this project's resolved build path.
+	 * 
+	 * @param crc32 crc32 code
+	 */
+	public void setBuildPathCRC(long crc32) {
+		buildpathCRC = crc32;
+	}
+	
 	/**
 	 * Return the last built state for the given project, or null if none
 	 */
@@ -469,4 +491,25 @@ public class BuildState {
 			System.out.println(NLS.bind(BuilderMessages.build_saveStateComplete, String.valueOf(t))); 
 		}
 	}
+	
+	/**
+	 * Computes and returns a CRC of the projects resolved build path, or -1 if unknown.
+	 * 
+	 * @param project project
+	 * @return build path CRC or -1
+	 */
+	public static long computeBuildPathCRC(IProject project) {
+		IJavaProject jp = JavaCore.create(project);
+		try {
+			IClasspathEntry[] classpath = jp.getResolvedClasspath(true);
+			CRC32 crc32 = new CRC32();
+			for (int i = 0; i < classpath.length; i++) {
+				IClasspathEntry entry = classpath[i];
+				crc32.update(entry.getPath().toPortableString().getBytes());
+			}
+			return crc32.getValue();
+		} catch (JavaModelException e) {
+		}
+		return -1L;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuilderMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuilderMessages.java
index d5b481b..28b6ec9 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuilderMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BuilderMessages.java
@@ -26,8 +26,11 @@ public class BuilderMessages extends NLS {
 	public static String ApiProblemFactory_problem_message_not_found;
 	public static String CleaningAPIDescription;
 	public static String BaseApiAnalyzer_analyzing_api;
+	public static String BaseApiAnalyzer_checking_compat;
+	public static String BaseApiAnalyzer_checking_since_tags;
 	public static String BaseApiAnalyzer_comparing_api_profiles;
 	public static String BaseApiAnalyzer_more_version_problems;
+	public static String BaseApiAnalyzer_processing_deltas;
 	public static String BaseApiAnalyzer_scanning_0;
 	public static String BaseApiAnalyzer_validating_javadoc_tags;
 	public static String build_wrongFileFormat;
@@ -40,6 +43,8 @@ public class BuilderMessages extends NLS {
 	public static String ReferenceAnalyzer_analyzing_api;
 	public static String ReferenceAnalyzer_api_analysis_error;
 	public static String ReferenceAnalyzer_checking_api_used_by;
+	public static String ReferenceExtractor_failed_to_lookup_method;
+	public static String ReferenceExtractor_failed_to_lookup_field;
 	public static String TagValidator_a_class;
 	public static String TagValidator_a_constructor;
 	public static String TagValidator_a_field;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IllegalFieldReferenceDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IllegalFieldReferenceDetector.java
index 2d480d0..d756167 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IllegalFieldReferenceDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IllegalFieldReferenceDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,7 +33,7 @@ import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes;
  * @since 1.1
  */
 public class IllegalFieldReferenceDetector extends AbstractProblemDetector {
-
+	
 	/**
 	 * Map of {@link org.eclipse.pde.api.tools.internal.model.MethodKey} to
 	 * {@link org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor} 
@@ -53,7 +53,7 @@ public class IllegalFieldReferenceDetector extends AbstractProblemDetector {
 	 * @param componentId the component the type is located in
 	 */
 	void addIllegalField(IFieldDescriptor field, String componentId) {
-		fIllegalFields.put(new MethodKey(field.getEnclosingType().getQualifiedName(), field.getName()), field);
+		fIllegalFields.put(new MethodKey(field.getEnclosingType().getQualifiedName(), field.getName(), null, true), field);
 		fFieldComponents.put(field, componentId);
 	}	
 	
@@ -61,7 +61,7 @@ public class IllegalFieldReferenceDetector extends AbstractProblemDetector {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector#considerReference(org.eclipse.pde.api.tools.internal.provisional.model.IReference)
 	 */
 	public boolean considerReference(IReference reference) {
-		if (fIllegalFields.containsKey(new MethodKey(reference.getReferencedTypeName(), reference.getReferencedMemberName()))) {
+		if (super.considerReference(reference) && fIllegalFields.containsKey(new MethodKey(reference.getReferencedTypeName(), reference.getReferencedMemberName(), reference.getReferencedSignature(), true))) {
 			retainReference(reference);
 			return true;
 		}
@@ -143,11 +143,7 @@ public class IllegalFieldReferenceDetector extends AbstractProblemDetector {
 		if(!super.isProblem(reference)) {
 			return false;
 		}
-		try {
-			Object componentId = fFieldComponents.get(reference.getResolvedReference().getHandle());
-			return componentId != null && reference.getResolvedReference().getApiComponent().getId().equals(componentId);
-		} catch (CoreException e) {
-			return false;
-		}
+		Object componentId = fFieldComponents.get(reference.getResolvedReference().getHandle());
+		return isReferenceFromComponent(reference, componentId);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IncrementalApiBuilder.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IncrementalApiBuilder.java
index 0d03d02..ab3e809 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IncrementalApiBuilder.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/IncrementalApiBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,10 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.builder;
 
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
@@ -24,6 +26,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IType;
@@ -33,7 +36,10 @@ import org.eclipse.jdt.internal.core.builder.ReferenceCollection;
 import org.eclipse.jdt.internal.core.builder.State;
 import org.eclipse.jdt.internal.core.builder.StringSet;
 import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.TypeAnnotations;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
@@ -46,23 +52,62 @@ import org.eclipse.pde.core.plugin.IPluginModelBase;
  * @since 3.5
  */
 public class IncrementalApiBuilder {
+	
+	private static final int UNKNOWN = 0;
+	private static final int CLASS_FILE = 1;
+	private static final int JAVA__FILE = 2;
+	
+	// bit mask for kinds of changes
+	private static final int STRUCTURAL = 0x0001;
+	private static final int DESCRIPTION = 0x0002;
+	
+	class Change {
+		int changeKind; // STUCTURAL | DESCRIPTION
+		int fileKind; // JAVA | CLASS
+		int deltaKind; 
+		IProject project;
+		IFile resource;
+		String typeName;
+		
+		/**
+		 * Creates a change of the specified kinds.
+		 * 
+		 * @param kind bit mask of STUCTURAL | DESCRIPTION
+		 * @param deltaKind resource delta kind
+		 * @param resource file that changed
+		 * @param typeName associated qualified type name
+		 * @param fileKind JAVA_FILE or CLASS_FILE
+		 */
+		Change(int kind, int deltaKind, IFile resource, String typeName, int fileKind) {
+			this.changeKind = kind;
+			this.deltaKind = deltaKind;
+			this.resource = resource;
+			this.project = resource.getProject();
+			this.typeName = typeName;
+			this.fileKind = fileKind;
+		}
+		
+		boolean isContained(IProject project, HashSet others) {
+			return this.project.equals(project) || (others != null && others.contains(this.project));
+		}
+	}
 
 	/**
 	 * Visits a resource delta to collect changes that need to be built
 	 */
 	class ResourceDeltaVisitor implements IResourceDeltaVisitor {
-		HashSet projects = null;
-		IProject project = null;
+		List changes = new ArrayList();
+		boolean buildpathChanged = false;
 		
 		/**
-		 * Constructor
-		 * @param project
-		 * @param projects
+		 * Constructs a new visitor, noting whether the build path of the project has changed since the last build.
+		 * 
+		 * @param pathChanged
 		 */
-		public ResourceDeltaVisitor(IProject project, HashSet projects) {
-			this.project = project;
-			this.projects = projects;
+		ResourceDeltaVisitor(boolean pathChanged) {
+			buildpathChanged = pathChanged;
 		}
+		
 		/* (non-Javadoc)
 		 * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
 		 */
@@ -74,17 +119,50 @@ public class IncrementalApiBuilder {
 					return true; 
 				}
 				case IResource.FILE: {
-					IResource resource = delta.getResource();
+					IFile resource = (IFile)delta.getResource();
 					String fileName = resource.getName();
 					if (Util.isClassFile(fileName)) {
-						findAffectedSourceFiles(delta);
+						if (delta.getKind() == IResourceDelta.REMOVED) {
+							String typename = resolveTypeName(resource, CLASS_FILE);
+							if(typename != null) {
+								if (ApiAnalysisBuilder.DEBUG) {
+									System.out.println("Found removed class file " + typename); //$NON-NLS-1$
+								}
+								changes.add(new Change(STRUCTURAL, delta.getKind(), resource, typename, CLASS_FILE));
+							}
+						} else if (buildpathChanged && delta.getKind() == IResourceDelta.CHANGED) {
+							if ((delta.getFlags() & IResourceDelta.CONTENT) > 0) {
+								// re-building due to build path (class path changes, project add/remove, target platform changes)
+								// TODO: for now use structural change, but really, we just need to re-analyze API use in case of
+								//       required bundle API description changes
+								String typename = resolveTypeName(resource, CLASS_FILE);
+								if(typename != null) {
+									changes.add(new Change(STRUCTURAL, delta.getKind(), resource, typename, CLASS_FILE));
+								}
+							}
+						}
+						
 					} else if (Util.isJavaFileName(fileName)) {
-						IProject project = resource.getProject();
-						if (this.project.equals(project)) {
-							addTypeToContext((IFile) resource);
-						} 
-						else if (this.projects != null && this.projects.contains(project)) {
-							addTypeToContext((IFile) resource);
+						String type = resolveTypeName(resource, JAVA__FILE);
+						if(type != null) {
+							Change change = new Change(STRUCTURAL, delta.getKind(), resource, type, JAVA__FILE);
+							changes.add(change);
+							// check if description has changed
+							IApiComponent component = workspaceBaseline.getApiComponent(resource.getProject());
+							if (component != null) {
+								try {
+									IApiAnnotations annotations = component.getApiDescription().resolveAnnotations(Factory.typeDescriptor(type.replace('/', '.')));
+									if (annotations instanceof TypeAnnotations) {
+										TypeAnnotations ta = (TypeAnnotations) annotations;
+										if (ta.getBuildStamp() == BuildStamps.getBuildStamp(resource.getProject())) {
+											// note description change in addition to structure
+											change.changeKind |= DESCRIPTION;
+										}
+									}
+								} catch (CoreException e) {
+									ApiPlugin.log(e);
+								}
+							}
 						}
 					}
 				}
@@ -95,9 +173,7 @@ public class IncrementalApiBuilder {
 
 	ApiAnalysisBuilder builder = null;
 	BuildContext context = null;
-	StringSet typenames = new StringSet(16);
-	StringSet packages = new StringSet(16);
-	
+	IApiBaseline workspaceBaseline = null;
 	
 	/**
 	 * Constructor
@@ -123,6 +199,7 @@ public class IncrementalApiBuilder {
 	 */
 	public void build(IApiBaseline baseline, IApiBaseline wbaseline, IResourceDelta[] deltas, State state, BuildState buildstate, IProgressMonitor monitor) throws CoreException {
 		IProject project = this.builder.getProject();
+		this.workspaceBaseline = wbaseline;
 		SubMonitor localmonitor = SubMonitor.convert(monitor, NLS.bind(BuilderMessages.IncrementalBuilder_builder_for_project, project.getName()), 1);
 		this.context = new BuildContext();
 		try {
@@ -142,25 +219,33 @@ public class IncrementalApiBuilder {
 					}
 				}
 			}
-			
-			ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(project, depprojects);
+			// check if the build path has changed
+			long prev = buildstate.getBuildPathCRC();
+			long curr = BuildState.computeBuildPathCRC(project);
+			ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(curr != prev);
 			for (int i = 0; i < deltas.length; i++) {
 				deltas[i].accept(visitor);
 			}
+			buildContext(project, state, visitor.changes, depprojects);
 			build(project, baseline, wbaseline, state, buildstate, localmonitor.newChild(1));
 		}
+		catch(OperationCanceledException oce) {
+			//do nothing, but don't forward it
+			//https://bugs.eclipse.org/bugs/show_bug.cgi?id=304315
+			if(ApiAnalysisBuilder.DEBUG) {
+				System.out.println("Trapped OperationCanceledException"); //$NON-NLS-1$
+			}
+		}
 		finally {
 			if(!localmonitor.isCanceled()) {
 				localmonitor.done();
 			}
 			this.context.dispose();
-			this.typenames.clear();
-			this.packages.clear();
 		}
 	}
 	
 	/**
-	 * Builds an API delta using the default profile (from the workspace settings and the current
+	 * Builds an API delta using the default baseline (from the workspace settings and the current
 	 * @param project
 	 * @param baseline the baseline to compare to
 	 * @param wbaseline the current workspace baseline
@@ -169,9 +254,8 @@ public class IncrementalApiBuilder {
 	 * @param monitor
 	 */
 	void build(final IProject project, final IApiBaseline baseline, final IApiBaseline wbaseline, final State state, BuildState buildstate, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, BuilderMessages.api_analysis_on_0, 6);
 		try {
-			SubMonitor localmonitor = SubMonitor.convert(monitor, BuilderMessages.api_analysis_on_0, 6);
-			collectAffectedSourceFiles(project, state);
 			Util.updateMonitor(localmonitor, 1);
 			localmonitor.subTask(NLS.bind(BuilderMessages.ApiAnalysisBuilder_finding_affected_source_files, project.getName()));
 			Util.updateMonitor(localmonitor, 0);
@@ -199,52 +283,69 @@ public class IncrementalApiBuilder {
 			}
 		}
 		finally {
-			if(monitor != null) {
-				monitor.done();
+			if(localmonitor != null) {
+				localmonitor.done();
 			}
 		}
 	}
 	
 	/**
-	 * Records the type name from the given IFile as a changed type 
-	 * in the given build context
+	 * Records the type name from the given IFile as a dependent type in the
+	 * given build context
 	 * @param file
+	 * @param kind mask of STRUCTURAL and/or DESCRIPTION
 	 */
-	private void addTypeToContext(IFile file) {
-		String type = resolveTypeName(file);
+	private void addDependentTypeToContext(IFile file, int kind) {
+		String type = resolveTypeName(file, JAVA__FILE);
 		if(type == null) {
 			return;
 		}
-		if(!this.context.containsChangedType(type)) {
-			this.builder.cleanupMarkers(file);
-			//TODO implement detecting description changed types
-			this.context.recordStructurallyChangedType(type);
-			collectInnerTypes(file);
+		if ((STRUCTURAL & kind) > 0) {
+			if(!this.context.containsStructuralChange(type)) {
+				this.builder.cleanupCompatibilityMarkers(file);
+			}
+		}
+		if ((DESCRIPTION & kind) > 0) {
+			if(!this.context.containsDescriptionChange(type) && !this.context.containsDescriptionDependent(type)) {
+				this.builder.cleanupUsageMarkers(file);
+				this.builder.cleanUnusedFilterMarkers(file);
+				this.context.recordDescriptionDependent(type);
+			}
 		}
+		addInnerTypesToDependents(file, kind);
 	}
 	
 	/**
-	 * Records the type name from the given IFile as a dependent type in the
-	 * given build context
+	 * Collects the inner types from the compilation unit
 	 * @param file
+	 * @param mask of STRUCTURAL and/or DESCRIPTION
 	 */
-	private void addDependentTypeToContext(IFile file) {
-		String type = resolveTypeName(file);
-		if(type == null) {
-			return;
+	private void addInnerTypesToDependents(IFile file, int kind) {
+		ICompilationUnit unit = (ICompilationUnit) JavaCore.create(file);
+		IType[] types = null;
+		try {
+			types = unit.getAllTypes();
+			String typename = null;
+			for (int i = 0; i < types.length; i++) {
+				typename = types[i].getFullyQualifiedName('$');
+				if ((DESCRIPTION & kind) > 0) {
+					if (!this.context.containsDescriptionChange(typename) && !this.context.containsDescriptionDependent(typename)) {
+						this.context.recordDescriptionDependent(typename);
+					}
+				}				
+			}
 		}
-		if(!this.context.containsDependentType(type)) {
-			this.builder.cleanupMarkers(file);
-			this.context.recordDependentType(type);
-			collectInnerTypes(file);
+		catch(JavaModelException jme) {
+			//do nothing, just don't consider types
 		}
 	}
 	
 	/**
 	 * Collects the inner types from the compilation unit
 	 * @param file
+	 * @param mask of STRUCTURAL and/or DESCRIPTION
 	 */
-	private void collectInnerTypes(IFile file) {
+	private void addInnerTypes(IFile file, int kind) {
 		ICompilationUnit unit = (ICompilationUnit) JavaCore.create(file);
 		IType[] types = null;
 		try {
@@ -252,33 +353,129 @@ public class IncrementalApiBuilder {
 			String typename = null;
 			for (int i = 0; i < types.length; i++) {
 				typename = types[i].getFullyQualifiedName('$');
-				if(this.context.containsChangedType(typename)) {
-					continue;
+				if ((STRUCTURAL & kind) > 0) {
+					if (!this.context.containsStructuralChange(typename)) {
+						this.context.recordStructuralChange(typename);
+					}
+				}
+				if ((DESCRIPTION & kind) > 0) {
+					if (!this.context.containsDescriptionChange(typename)) {
+						this.context.recordDescriptionChanged(typename);
+					}
 				}
-				this.context.recordDependentType(typename);
 			}
 		}
 		catch(JavaModelException jme) {
 			//do nothing, just don't consider types
 		}
-	}
+	}	
 	
 	/**
-	 * Collects the complete set of affected source files from the current project context based on the current JDT build state.
+	 * Constructs a build context based on the current JDT build state and known changes.
 	 * 
 	 * @param project the current project being built
 	 * @param state the current JDT build state
+	 * @param list of changes
 	 */
-	void collectAffectedSourceFiles(final IProject project, State state) {
+	void buildContext(final IProject project, State state, List changes, HashSet depprojects) {
+		StringSet structural = null;
+		StringSet description = null;
+		Iterator iterator = changes.iterator();
+		while (iterator.hasNext()) {
+			Change change = (Change) iterator.next();
+			boolean contained = change.isContained(project, depprojects);
+			if ((change.changeKind & STRUCTURAL) > 0) {
+				// don't analyze dependents of removed types
+				if (change.deltaKind != IResourceDelta.REMOVED) {
+					if (structural == null) {
+						structural = new StringSet(16);
+					}
+					structural.add(change.typeName);
+				}
+				// only add to structural types if contained in the project being built
+				if (contained) {
+					context.recordStructuralChange(change.typeName);
+					if (change.deltaKind == IResourceDelta.REMOVED) {
+						context.recordRemovedType(change.typeName);
+					}
+				}
+			}
+			if ((change.changeKind & DESCRIPTION) > 0) {
+				if (description == null) {
+					description = new StringSet(16);
+				}
+				description.add(change.typeName);
+				// only add to description changes if contained in the project being built
+				if (contained) {
+					context.recordDescriptionChanged(change.typeName);
+				}
+			}
+			if (contained) {
+				if (change.fileKind == JAVA__FILE) {
+					this.builder.cleanupMarkers(change.resource);
+					addInnerTypes(change.resource, change.changeKind);
+				} else {
+					// look up the source file
+					String path = (String) state.typeLocators.get(change.typeName);
+					if (path != null) {
+						IResource member = this.builder.getProject().findMember(path);
+						if (member != null && member.getType() == IResource.FILE) {
+							IFile source = (IFile) member;
+							this.builder.cleanupMarkers(source);
+							addInnerTypes(source, change.changeKind);
+						}
+					}
+				}
+			}
+		}
+		// only resolve dependents once for case of 1 type changed and is both structural and description
+		if (changes.size() == 1 && structural != null && description != null) {
+			String[] types = structural.values;
+			if (types.length > 0) {
+				addDependents(project, state, types, STRUCTURAL | DESCRIPTION);
+			}
+		} else {
+			if (structural != null) {
+				String[] types = structural.values;
+				if (types.length > 0) {
+					addDependents(project, state, types, STRUCTURAL);
+				}
+			}
+			if (description != null) {
+				String[] types = description.values;
+				if (types.length > 0) {
+					addDependents(project, state, types, DESCRIPTION);
+				}
+			}
+		}
+	}	
+	
+	/**
+	 * Adds the dependent files from the current build context based on the current JDT build state
+	 * to either the structural or description dependents.
+	 * 
+	 * @param project the current project being built
+	 * @param state the current JDT build state
+	 * @param types dot and $ qualified names of base types that changed
+	 * @param kind mask of STRUCTURAL or DESCRIPTION
+	 */
+	private void addDependents(final IProject project, State state, String[] types, int kind) {
+		StringSet packages = new StringSet(16);
+		StringSet typenames = new StringSet(16);
+		for (int i = 0; i < types.length; i++) {
+			if (types[i] != null) {
+				splitName(types[i], packages, typenames);
+			}
+		}
 		// the qualifiedStrings are of the form 'p1/p2' & the simpleStrings are just 'X'
-		char[][][] internedQualifiedNames = ReferenceCollection.internQualifiedNames(this.packages);
+		char[][][] internedQualifiedNames = ReferenceCollection.internQualifiedNames(packages);
 		// if a well known qualified name was found then we can skip over these
-		if (internedQualifiedNames.length < this.packages.elementSize) {
+		if (internedQualifiedNames.length < packages.elementSize) {
 			internedQualifiedNames = null;
 		}
-		char[][] internedSimpleNames = ReferenceCollection.internSimpleNames(this.typenames, true);
+		char[][] internedSimpleNames = ReferenceCollection.internSimpleNames(typenames, true);
 		// if a well known name was found then we can skip over these
-		if (internedSimpleNames.length < this.typenames.elementSize) {
+		if (internedSimpleNames.length < typenames.elementSize) {
 			internedSimpleNames = null;
 		}
 		Object[] keyTable = state.getReferences().keyTable;
@@ -297,69 +494,27 @@ public class IncrementalApiBuilder {
 					if (ApiAnalysisBuilder.DEBUG) {
 						System.out.println("  adding affected source file " + file.getName()); //$NON-NLS-1$
 					}
-					addDependentTypeToContext(file);
+					addDependentTypeToContext(file, kind);
 				}
 			}
 		}
 	}
 	
 	/**
-	 * Finds affected source files for a resource that has changed that either contains class files or is itself a class file
-	 * @param binaryDelta
-	 */
-	void findAffectedSourceFiles(IResourceDelta binaryDelta) {
-		IResource resource = binaryDelta.getResource();
-		if(resource.getType() == IResource.FILE) {
-			String typename = resolveTypeName(resource);
-			if(typename == null) {
-				return;
-			}
-			switch (binaryDelta.getKind()) {
-				case IResourceDelta.REMOVED : {
-					if (ApiAnalysisBuilder.DEBUG) {
-						System.out.println("Found removed class file " + typename); //$NON-NLS-1$
-					}
-					//directly add the removed type
-					this.context.recordStructurallyChangedType(typename);
-					this.context.recordRemovedType(typename);
-				}
-					//$FALL-THROUGH$
-				case IResourceDelta.ADDED : {
-					if (ApiAnalysisBuilder.DEBUG) {
-						System.out.println("Found added class file " + typename); //$NON-NLS-1$
-					}
-					addDependentsOf(typename);
-					return;
-				}
-				case IResourceDelta.CHANGED : {
-					if ((binaryDelta.getFlags() & IResourceDelta.CONTENT) == 0) {
-						return; // skip it since it really isn't changed
-					}
-					if (ApiAnalysisBuilder.DEBUG) {
-						System.out.println("Found changed class file " + typename); //$NON-NLS-1$
-					}
-					addDependentsOf(typename);
-				}
-			}
-			return;
-		}
-	}
-	
-	/**
 	 * Adds a type to search for dependents of in considered projects for an incremental build
 	 * 
 	 * @param path
 	 */
-	void addDependentsOf(String typename) {
+	void splitName(String typename, StringSet packages, StringSet simpleTypes) {
 		// the qualifiedStrings are of the form 'p1/p2' & the simpleStrings are just 'X'
-		int idx = typename.lastIndexOf('.');
+		int idx = typename.lastIndexOf('/');
 		String packageName = (idx < 0 ? Util.EMPTY_STRING : typename.substring(0, idx));
 		String typeName = (idx < 0 ? typename : typename.substring(idx+1, typename.length()));
 		idx = typeName.indexOf('$');
 		if (idx > 0) {
 			typeName = typeName.substring(0, idx);
 		}
-		if (this.typenames.add(typeName) && this.packages.add(packageName) && ApiAnalysisBuilder.DEBUG) {
+		if (simpleTypes.add(typeName) && packages.add(packageName) && ApiAnalysisBuilder.DEBUG) {
 			System.out.println("  will look for dependents of " + typeName + " in " + packageName);  //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
@@ -386,7 +541,7 @@ public class IncrementalApiBuilder {
 				String tname = null; 
 				for (int i = 0; i < markers.length; i++) {
 					tname = Util.getTypeNameFromMarker(markers[i]);
-					if(this.context.containsDependentType(tname) || this.context.containsChangedType(tname)) {
+					if(this.context.containsStructuralChange(tname)) {
 						markers[i].delete();
 					}
 				}
@@ -396,7 +551,7 @@ public class IncrementalApiBuilder {
 				markers = resource.findMarkers(IApiMarkerConstants.UNUSED_FILTER_PROBLEM_MARKER, false, IResource.DEPTH_ZERO);
 				for (int i = 0; i < markers.length; i++) {
 					tname = Util.getTypeNameFromMarker(markers[i]);
-					if(this.context.containsDependentType(tname) || this.context.containsChangedType(tname)) {
+					if(this.context.containsStructuralChange(tname)) {
 						markers[i].delete();
 					}
 				}
@@ -410,16 +565,30 @@ public class IncrementalApiBuilder {
 	/**
 	 * Resolves the java path from the given resource
 	 * @param resource
+	 * @param kind CLASS_FILE, JAVA_FILE, or UNKNOWN
 	 * @return the resolved path or <code>null</code> if the resource is not part of the java model
 	 */
-	String resolveTypeName(IResource resource) {
+	String resolveTypeName(IResource resource, int kind) {
 		IPath typepath = resource.getFullPath();
-		HashSet paths = null;
-		if(Util.isClassFile(resource.getName())) {
-			paths = (HashSet) this.builder.output_locs.get(resource.getProject());
+		int type = kind;
+		if (kind == UNKNOWN) {
+			if(Util.isClassFile(resource.getName())) {
+				type = CLASS_FILE;
+			}
+			else if(Util.isJavaFileName(resource.getName())) {
+				type= JAVA__FILE;
+			}
 		}
-		else if(Util.isJavaFileName(resource.getName())) {
-			paths = (HashSet) this.builder.src_locs.get(resource.getProject());
+		HashSet paths = null;
+		switch (type) {
+			case JAVA__FILE:
+				paths = (HashSet) this.builder.src_locs.get(resource.getProject());
+				break;
+			case CLASS_FILE:
+				paths = (HashSet) this.builder.output_locs.get(resource.getProject());
+				break;
+			default:
+				break;
 		}
 		if(paths != null) {
 			IPath path = null;
@@ -427,7 +596,7 @@ public class IncrementalApiBuilder {
 				path = (IPath) iterator.next();
 				if(path.isPrefixOf(typepath)) {
 					typepath = typepath.removeFirstSegments(path.segmentCount()).removeFileExtension();
-					return typepath.toString().replace('/', '.');
+					return typepath.toString();
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
index e6f2a28..52928ae 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/LeakExtendsProblemDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -153,7 +153,7 @@ public class LeakExtendsProblemDetector extends AbstractTypeLeakDetector {
 		for (int i = 0; i < methods.length; i++) {
 			IApiMethod method = methods[i];
 			if ((method.getModifiers() & modifiers) > 0 && !method.isConstructor() && !method.isSynthetic()) {
-				members.add(new MethodKey(method.getName(), method.getSignature()));
+				members.add(new MethodKey(type.getName(), method.getName(), method.getSignature(), false));
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/MethodLeakDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/MethodLeakDetector.java
index 5aabdd4..2eebd41 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/MethodLeakDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/MethodLeakDetector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,9 +150,9 @@ public abstract class MethodLeakDetector extends AbstractLeakProblemDetector {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiProblemDetector#considerReference(org.eclipse.pde.api.tools.internal.provisional.model.IReference)
 	 */
 	public boolean considerReference(IReference reference) {
-		if (isNonAPIReference(reference)) {
+		if (super.considerReference(reference) && isNonAPIReference(reference)) {
 			IApiMember member = reference.getMember();
-			if (matchesSourceModifiers(member) && matchesSourceApiRestrictions(member)) {
+			if (member != null && matchesSourceModifiers(member) && matchesSourceApiRestrictions(member)) {
 				retainReference(reference);
 				return true;
 			}
@@ -209,11 +209,12 @@ public abstract class MethodLeakDetector extends AbstractLeakProblemDetector {
 	 * @return true if the modifiers match, false otherwise
 	 */
 	protected boolean matchesSourceModifiers(IApiMember member) {
-		while (member != null) {
-			int modifiers = member.getModifiers();
+		IApiMember lmember = member;
+		while (lmember != null) {
+			int modifiers = lmember.getModifiers();
 			if (Flags.isPublic(modifiers) || Flags.isProtected(modifiers)) {
 				try {
-					member = member.getEnclosingType();
+					lmember = lmember.getEnclosingType();
 				} catch (CoreException e) {
 					ApiPlugin.log(e.getStatus());
 					return false;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ProblemDetectorBuilder.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ProblemDetectorBuilder.java
index 08d7b5d..fb4c134 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ProblemDetectorBuilder.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ProblemDetectorBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,8 +16,7 @@ import java.util.List;
 import java.util.Set;
 
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
@@ -39,6 +38,27 @@ import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes;
 public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 
 	/**
+	 * Kind mask bits to allow only certain detectors to be built regardless of 
+	 * the IDE being available
+	 */
+	/**
+	 * All detectors will be added
+	 */
+	public static int K_ALL = 0xFFFFFFFF;
+	/**
+	 * Illegal use detectors will be added
+	 */
+	public static int K_USE = 1;
+	/**
+	 * Leak detectors will be added
+	 */
+	public static int K_LEAK = 1 << 1;
+	/**
+	 * The system detector will be added
+	 */
+	public static int K_SYSTEM = 1 << 2;
+	
+	/**
 	 * Problem detectors
 	 */
 	private IllegalExtendsProblemDetector fIllegalExtends = null;
@@ -48,6 +68,7 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	private IllegalMethodReferenceDetector fIllegalMethodRef = null;
 	private IllegalFieldReferenceDetector fIllegalFieldRef = null;
 	private SystemApiDetector fSystemApiDetector = null;
+	
 	/**
 	 * Cache of non-API package names visited
 	 */
@@ -64,11 +85,18 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	private List fDetectors;
 	
 	/**
+	 * The mask of kinds of detectors to build
+	 */
+	private int fKindMask = 0;
+	
+	/**
 	 * Build problem detectors for a component.
 	 * 
 	 * @param component
+	 * @param kinds the integer mask of the kinds of detectors to create
 	 */
-	public ProblemDetectorBuilder(IApiComponent component) {
+	public ProblemDetectorBuilder(IApiComponent component, int kinds) {
+		fKindMask = kinds;
 		initializeDetectors(component);
 	}
 
@@ -78,38 +106,38 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	public boolean visitElement(IElementDescriptor element, IApiAnnotations description) {
 		int mask = description.getRestrictions();
 		switch (element.getElementType()) {
-			case IElementDescriptor.PACKAGE:
+			case IElementDescriptor.PACKAGE: {
 				if (VisibilityModifiers.isPrivate(description.getVisibility())) {
 					fNonApiPackageNames.add(((IPackageDescriptor)element).getName());
 					return false; // no need to visit types in non-API package
 				}
 				break;
-			default:
-				if (!RestrictionModifiers.isUnrestricted(mask)) {
-					try {
+			}
+			default: {
+				if((fKindMask & K_USE) > 0) {
+					if (!RestrictionModifiers.isUnrestricted(mask)) {
 						if(RestrictionModifiers.isOverrideRestriction(mask) && fIllegalOverride != null) {
-							fIllegalOverride.addIllegalMethod((IMethodDescriptor) element, fComponent.getId());
+							fIllegalOverride.addIllegalMethod((IMethodDescriptor) element, fComponent.getSymbolicName());
 						}
 						if (RestrictionModifiers.isExtendRestriction(mask) && fIllegalExtends != null) {
-							fIllegalExtends.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getId());
+							fIllegalExtends.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getSymbolicName());
 						}
 						if (RestrictionModifiers.isImplementRestriction(mask) && fIllegalImplements != null) {
-							fIllegalImplements.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getId());
+							fIllegalImplements.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getSymbolicName());
 						}
 						if (RestrictionModifiers.isInstantiateRestriction(mask) && fIllegalInstantiate != null) {
-							fIllegalInstantiate.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getId());
+							fIllegalInstantiate.addIllegalType((IReferenceTypeDescriptor) element, fComponent.getSymbolicName());
 						}
 						if (RestrictionModifiers.isReferenceRestriction(mask)) {
 							if (element.getElementType() == IElementDescriptor.METHOD && fIllegalMethodRef != null) {
-								fIllegalMethodRef.addIllegalMethod((IMethodDescriptor) element, fComponent.getId());
+								fIllegalMethodRef.addIllegalMethod((IMethodDescriptor) element, fComponent.getSymbolicName());
 							} else if (element.getElementType() == IElementDescriptor.FIELD && fIllegalFieldRef != null) {
-								fIllegalFieldRef.addIllegalField((IFieldDescriptor) element, fComponent.getId());
+								fIllegalFieldRef.addIllegalField((IFieldDescriptor) element, fComponent.getSymbolicName());
 							}
 						}
-					} catch (CoreException e) {
-						ApiPlugin.log(e);
 					}
 				}
+			}
 		}
 		return true;
 	}
@@ -127,8 +155,8 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	 * if the component is not a {@link PluginProjectApiComponent}
 	 */
 	private IProject getProject(IApiComponent component) {
-		if(component instanceof PluginProjectApiComponent) {
-			PluginProjectApiComponent comp = (PluginProjectApiComponent) component;
+		if(component instanceof ProjectComponent) {
+			ProjectComponent comp = (ProjectComponent) component;
 			return comp.getJavaProject().getProject();
 		}
 		return null;
@@ -141,64 +169,15 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	private void initializeDetectors(IApiComponent component) {
 		fDetectors = new ArrayList();
 		IProject project = getProject(component);
-		if(project != null) {
-			if(!isIgnore(IApiProblemTypes.ILLEGAL_EXTEND, project) && fIllegalExtends == null) {
-				fIllegalExtends = new IllegalExtendsProblemDetector();
-			}
-			if(!isIgnore(IApiProblemTypes.ILLEGAL_IMPLEMENT, project) && fIllegalImplements == null) {
-				fIllegalImplements = new IllegalImplementsProblemDetector();
-			}
-			if(!isIgnore(IApiProblemTypes.ILLEGAL_INSTANTIATE, project) && fIllegalInstantiate == null) {
-				fIllegalInstantiate = new IllegalInstantiateProblemDetector();
-			}
-			if(!isIgnore(IApiProblemTypes.ILLEGAL_OVERRIDE, project) && fIllegalOverride == null) {
-				fIllegalOverride = new IllegalOverrideProblemDetector();
-			}
-			if(!isIgnore(IApiProblemTypes.ILLEGAL_REFERENCE, project) && fIllegalMethodRef == null) {
-				fIllegalMethodRef = new IllegalMethodReferenceDetector();
-				fIllegalFieldRef = new IllegalFieldReferenceDetector();
-			}
-		}
-		else {
-			//add all detectors by default if we have no preference context
-			fIllegalExtends = new IllegalExtendsProblemDetector();
-			fIllegalImplements = new IllegalImplementsProblemDetector();
-			fIllegalInstantiate = new IllegalInstantiateProblemDetector();
-			fIllegalOverride = new IllegalOverrideProblemDetector();
-			fIllegalMethodRef = new IllegalMethodReferenceDetector();
-			fIllegalFieldRef = new IllegalFieldReferenceDetector();
-		}
-		if (project != null) {
-			if (!isIgnore(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES, project)
-					 && fSystemApiDetector == null) {
-				fSystemApiDetector = new SystemApiDetector();
-			}
-		} else {
-			//add detector by default only outside of the ide if we have no preference context
-			fSystemApiDetector = new SystemApiDetector();
-		}
-		if (fIllegalExtends != null) {
-			fDetectors.add(fIllegalExtends);
+		if((fKindMask & K_USE) > 0) {
+			addUseDetectors(fDetectors, project);
 		}
-		if (fIllegalImplements != null) {
-			fDetectors.add(fIllegalImplements);
+		if((fKindMask & K_SYSTEM) > 0) {
+			addSystemDetector(fDetectors, project);
 		}
-		if (fIllegalInstantiate != null) {
-			fDetectors.add(fIllegalInstantiate);
+		if((fKindMask & K_LEAK) > 0) {
+			addLeakDetectors(fDetectors, project);
 		}
-		if (fIllegalOverride != null) {
-			fDetectors.add(fIllegalOverride);
-		}
-		if (fIllegalMethodRef != null) {
-			fDetectors.add(fIllegalMethodRef);
-		}
-		if (fIllegalFieldRef != null) {
-			fDetectors.add(fIllegalFieldRef);
-		}
-		if (fSystemApiDetector != null) {
-			fDetectors.add(fSystemApiDetector);
-		}
-		addLeakDetectors(fDetectors, component);
 	}
 	
 	/**
@@ -238,17 +217,83 @@ public class ProblemDetectorBuilder extends ApiDescriptionVisitor {
 	 * 
 	 * @return problem detectors
 	 */
-	List getProblemDetectors() {
+	public List getProblemDetectors() {
 		return fDetectors;
 	}
 	
 	/**
+	 * Adds the system detector to the given listing
+	 * @param detectors
+	 * @param project
+	 */
+	private void addSystemDetector(List detectors, IProject project) {
+		if (project != null) {
+			if (!isIgnore(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES, project)
+					 && fSystemApiDetector == null) {
+				fSystemApiDetector = new SystemApiDetector();
+				fDetectors.add(fSystemApiDetector);
+			}
+		} else {
+			//add detector by default only outside of the IDE if we have no preference context
+			fSystemApiDetector = new SystemApiDetector();
+			fDetectors.add(fSystemApiDetector);
+		}
+	}
+	
+	/**
+	 * Adds the use detectors to the listing
+	 * @param detectors
+	 * @param project
+	 */
+	private void addUseDetectors(List detectors, IProject project) {
+		if(project != null) {
+			if(!isIgnore(IApiProblemTypes.ILLEGAL_EXTEND, project) && fIllegalExtends == null) {
+				fIllegalExtends = new IllegalExtendsProblemDetector();
+				detectors.add(fIllegalExtends);
+			}
+			if(!isIgnore(IApiProblemTypes.ILLEGAL_IMPLEMENT, project) && fIllegalImplements == null) {
+				fIllegalImplements = new IllegalImplementsProblemDetector();
+				detectors.add(fIllegalImplements);
+			}
+			if(!isIgnore(IApiProblemTypes.ILLEGAL_INSTANTIATE, project) && fIllegalInstantiate == null) {
+				fIllegalInstantiate = new IllegalInstantiateProblemDetector();
+				detectors.add(fIllegalInstantiate);
+			}
+			if(!isIgnore(IApiProblemTypes.ILLEGAL_OVERRIDE, project) && fIllegalOverride == null) {
+				fIllegalOverride = new IllegalOverrideProblemDetector();
+				detectors.add(fIllegalOverride);
+			}
+			if(!isIgnore(IApiProblemTypes.ILLEGAL_REFERENCE, project) && fIllegalMethodRef == null) {
+				fIllegalMethodRef = new IllegalMethodReferenceDetector();
+				detectors.add(fIllegalMethodRef);
+				fIllegalFieldRef = new IllegalFieldReferenceDetector();
+				detectors.add(fIllegalFieldRef);
+			}
+		}
+		else {
+			//add all detectors by default if we have no preference context
+			fIllegalExtends = new IllegalExtendsProblemDetector();
+			detectors.add(fIllegalExtends);
+			fIllegalImplements = new IllegalImplementsProblemDetector();
+			detectors.add(fIllegalImplements);
+			fIllegalInstantiate = new IllegalInstantiateProblemDetector();
+			detectors.add(fIllegalInstantiate);
+			fIllegalOverride = new IllegalOverrideProblemDetector();
+			detectors.add(fIllegalOverride);
+			fIllegalMethodRef = new IllegalMethodReferenceDetector();
+			detectors.add(fIllegalMethodRef);
+			fIllegalFieldRef = new IllegalFieldReferenceDetector();
+			detectors.add(fIllegalFieldRef);
+		}
+	}
+	
+	/**
 	 * Adds any leak detectors to the listing. If a project context is available we 
 	 * filter out disabled detectors based on project  / workspace preference settings
 	 * @param detectors
+	 * @param project
 	 */
-	private void addLeakDetectors(List detectors, IApiComponent component) {
-		IProject project = getProject(component);
+	private void addLeakDetectors(List detectors, IProject project) {
 		if(project != null) {
 			if(!isIgnore(IApiProblemTypes.LEAK_EXTEND, project)) {
 				detectors.add(new LeakExtendsProblemDetector(fNonApiPackageNames));
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/Reference.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/Reference.java
index 24a5a0b..7d299cf 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/Reference.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/Reference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,14 +10,28 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.builder;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.Flags;
 import org.eclipse.pde.api.tools.internal.model.StubApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
+import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiField;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMethod;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
+import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
+import org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor;
+import org.eclipse.pde.api.tools.internal.search.UseReportConverter;
 import org.eclipse.pde.api.tools.internal.util.Signatures;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
@@ -44,6 +58,11 @@ public class Reference implements IReference {
 	private int fKind;
 	
 	/**
+	 * Flags for the reference
+	 */
+	private int fFlags = 0;
+	
+	/**
 	 * One of the valid type, method, field.
 	 */
 	private int fType;
@@ -73,6 +92,43 @@ public class Reference implements IReference {
 	 */
 	private boolean fStatus = true;
 	
+	/**
+	 * List of problems that have been reported against this problem
+	 */
+	private List fProblems = null;
+	
+	/**
+	 * Adds the given collection of {@link org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem}s
+	 * to the backing listing.
+	 * 
+	 * @param problems the list of problems to add - <code>null</code> is not accepted.
+	 * @return <code>true</code> if the problems were all added, <code>false</code> otherwise
+	 * @since 1.1
+	 */
+	public boolean addProblems(IApiProblem problem) {
+		if(problem == null) {
+			return false;
+		}
+		if(fProblems == null) {
+			fProblems = new ArrayList(2);
+		}
+		if(fProblems.contains(problem)) {
+			return false;
+		}
+		return fProblems.add(problem);
+	}
+	
+	/**
+	 * Returns the complete listing of {@link org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem}s
+	 * recorded for this reference or <code>null</code> if none have been reported.
+	 * 
+	 * @return the listing of {@link org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem}s or <code>null</code>
+	 * @since 1.1
+	 */
+	public List getProblems() {
+		return fProblems;
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IReference#getLineNumber()
 	 */
@@ -95,6 +151,21 @@ public class Reference implements IReference {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.builder.IReference#getReferenceFlags()
+	 */
+	public int getReferenceFlags() {
+		return fFlags;
+	}
+	
+	/**
+	 * OR's the given set of new flags with the current set of flags
+	 * @param newflags
+	 */
+	public void setFlags(int newflags) {
+		fFlags |= newflags;
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IReference#getReferenceType()
 	 */
 	public int getReferenceType() {
@@ -207,9 +278,7 @@ public class Reference implements IReference {
 	}
 	
 	/**
-	 * Resolves this reference in the given profile.
-	 * 
-	 * @param engine search engine resolving the reference
+	 * Resolves this reference
 	 * @throws CoreException
 	 */
 	public void resolve() throws CoreException {
@@ -224,12 +293,16 @@ public class Reference implements IReference {
 						getReferencedTypeName());
 				if(result != null) {
 					IApiType type = result.getStructure();
+					if(type == null) {
+						//cannot resolve a type that is in a bad classfile
+						return;
+					}
 					switch (getReferenceType()) {
 					case IReference.T_TYPE_REFERENCE:
 						fResolved = type;
 						break;
 					case IReference.T_FIELD_REFERENCE:
-						fResolved = type.getField(getReferencedMemberName());
+						resolveField(type, getReferencedMemberName());
 						break;
 					case IReference.T_METHOD_REFERENCE:
 						resolveVirtualMethod(type, getReferencedMemberName(), getReferencedSignature());
@@ -251,11 +324,14 @@ public class Reference implements IReference {
 				getReferencedTypeName());
 		if(result != null) {
 			IApiType type = result.getStructure();
+			if(type == null) {
+				return false;
+			}
 			switch (getReferenceType()) {
 			case IReference.T_TYPE_REFERENCE:
 				return true;
 			case IReference.T_FIELD_REFERENCE:
-				return type.getField(getReferencedMemberName()) != null;
+				return resolveField(type, getReferencedMemberName());
 			case IReference.T_METHOD_REFERENCE:
 				return resolveVirtualMethod0(sourceComponent, type, getReferencedMemberName(), getReferencedSignature());
 			}
@@ -263,6 +339,26 @@ public class Reference implements IReference {
 		return false;
 	}	
 	/**
+	 * Resolves the field in the parent class hierarchy
+	 * @param type the initial type to search
+	 * @param fieldame the name of the field
+	 * @return true if the field resolved
+	 * @throws CoreException
+	 * @since 1.1
+	 */
+	private boolean resolveField(IApiType type, String fieldame) throws CoreException {
+		IApiField field = type.getField(fieldame);
+		if(field != null) {
+			fResolved = field;
+			return true;
+		}
+		IApiType superT = type.getSuperclass();
+		if (superT != null) {
+			return resolveField(superT, fieldame);
+		}
+		return false;
+	}
+	/**
 	 * Resolves a virtual method and returns whether the method lookup was successful.
 	 * We need to resolve the actual type that implements the method - i.e. do the virtual
 	 * method lookup.
@@ -336,7 +432,7 @@ public class Reference implements IReference {
 								new IApiComponent[] { sourceComponent },
 								interfacesNames[i]);
 						IApiType superinterface = classFile.getStructure();
-						if (resolveVirtualMethod0(sourceComponent, superinterface, methodName, methodSignature)) {
+						if (superinterface != null && resolveVirtualMethod0(sourceComponent, superinterface, methodName, methodSignature)) {
 							return true;
 						}
 					}
@@ -350,7 +446,24 @@ public class Reference implements IReference {
 							new IApiComponent[] { sourceComponent },
 							superclassName);
 					IApiType superclass = classFile.getStructure();
-					return resolveVirtualMethod0(sourceComponent, superclass, methodName, methodSignature);
+					boolean resolved = resolveVirtualMethod0(sourceComponent, superclass, methodName, methodSignature);
+					if (resolved) {
+						return resolved;
+					}
+				}
+				if (Flags.isAbstract(type.getModifiers())) {
+					interfacesNames = type.getSuperInterfaceNames();
+					if (interfacesNames != null) {
+						for (int i = 0, max = interfacesNames.length; i < max; i++) {
+							IApiTypeRoot classFile = Util.getClassFile(
+									new IApiComponent[] { sourceComponent },
+									interfacesNames[i]);
+							IApiType superinterface = classFile.getStructure();
+							if (superinterface != null && resolveVirtualMethod0(sourceComponent, superinterface, methodName, methodSignature)) {
+								return true;
+							}
+						}
+					}
 				}
 		}
 		return false;
@@ -372,6 +485,7 @@ public class Reference implements IReference {
 		buf.append("From: "); //$NON-NLS-1$
 		IApiMember member = getMember();
 		buf.append(member.getHandle().toString());
+		buf.append(" [line: ").append(getLineNumber()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
 		if (getResolvedReference() == null) {
 			buf.append("\nUnresolved To: "); //$NON-NLS-1$
 			buf.append(getReferencedTypeName());
@@ -588,4 +702,60 @@ public class Reference implements IReference {
 		}
 		return buffer.toString();
 	}
+	
+	/**
+	 * Builds a reference descriptor from this reference or <code>null</code>.
+	 * 
+	 * @return corresponding reference descriptor or <code>null</code> if unresolved
+	 * @throws CoreException if unable to resolve visibility
+	 */
+	public IReferenceDescriptor getReferenceDescriptor() throws CoreException {
+		IApiMember res = getResolvedReference();
+		if (res == null) {
+			return null;
+		}
+		IApiComponent rcomponent = res.getApiComponent();
+		IApiDescription description = rcomponent.getApiDescription();
+		IApiAnnotations annot = description.resolveAnnotations(getResolvedReference().getHandle());
+		int visibility = -1;
+		IApiComponent mcomponent = getMember().getApiComponent();
+		if(annot != null) {
+			visibility = annot.getVisibility();
+			if(annot.getVisibility() == VisibilityModifiers.PRIVATE) {
+				IApiComponent host = mcomponent.getHost();
+				if(host != null && host.getSymbolicName().equals(rcomponent.getSymbolicName())) {
+					visibility = UseReportConverter.FRAGMENT_PERMISSIBLE;
+				}
+				else {
+					IApiAccess access = description.resolveAccessLevel(
+							Factory.componentDescriptor(mcomponent.getSymbolicName()),  // component descriptors in API description are not version qualified
+							getResolvedReference().getHandle().getPackage());
+					if(access != null && access.getAccessLevel() == IApiAccess.FRIEND) {
+						visibility = VisibilityModifiers.PRIVATE_PERMISSIBLE;
+					}
+				}
+			}
+		}
+		else {
+			//overflow for those references that cannot be resolved
+			visibility = VisibilityModifiers.ALL_VISIBILITIES;
+		}
+		String[] messages = null;
+		if(fProblems != null) {
+			messages = new String[fProblems.size()];
+			for (int i = 0; i < messages.length; i++) {
+				messages[i] = ((IApiProblem)fProblems.get(i)).getMessage();
+			}
+		}
+		return Factory.referenceDescriptor(
+				(IComponentDescriptor)mcomponent.getHandle(),
+				getMember().getHandle(),
+				getLineNumber(),
+				(IComponentDescriptor)rcomponent.getHandle(),
+				res.getHandle(),
+				getReferenceKind(),
+				getReferenceFlags(),
+				visibility,
+				messages);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer.java
index a6915c4..626178f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -90,6 +90,10 @@ public class ReferenceAnalyzer {
 						return;
 					}
 					IApiType type = classFile.getStructure();
+					if(type == null) {
+						//do nothing for bad class files
+						return;
+					}
 					List references = type.extractReferences(fAllReferenceKinds, null);
 					// keep potential matches
 					Iterator iterator = references.iterator();
@@ -121,24 +125,24 @@ public class ReferenceAnalyzer {
 	/**
 	 * Scan status
 	 */
-	private MultiStatus fStatus;	
+	MultiStatus fStatus;	
 	
 	/**
 	 * Bit mask of reference kinds that problem detectors care about.
 	 */
-	private int fAllReferenceKinds = 0;
+	int fAllReferenceKinds = 0;
 	
 	/**
 	 * List of references to consider/resolve.
 	 */
-	private List fReferences = new LinkedList();
+	List fReferences = new LinkedList();
 	
 	/**
 	 * Problem detectors indexed by the log base 2 of each reference kind they
 	 * are interested in. Provides a fast way to hand references off to interested
 	 * problem detectors.
 	 */
-	private IApiProblemDetector[][] fIndexedDetectors;
+	IApiProblemDetector[][] fIndexedDetectors;
 
 	/**
 	 * Method used for initializing tracing
@@ -148,58 +152,6 @@ public class ReferenceAnalyzer {
 	}
 	
 	/**
-	 * Performs the actual reference extraction and analysis.
-	 * 
-	 * @param scope the scope to extract and analyze references from
-	 * @param detectors problem detectors to use
-	 * @param monitor progress monitor
-	 * @return any problems
-	 * @throws CoreException
-	 */
-	private IApiProblem[] analyze(IApiTypeContainer scope, IApiProblemDetector[] detectors, IProgressMonitor monitor) throws CoreException {
-		try {
-			// 1. index problem detectors
-			indexProblemDetectors(detectors);
-			// 2. extract references
-			SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.ReferenceAnalyzer_analyzing_api, 3);
-			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use); 
-			extractReferences(scope, localMonitor);
-			localMonitor.worked(1);
-			if (localMonitor.isCanceled()) {
-				return EMPTY_RESULT;
-			}
-			// 3. resolve problematic references
-			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use);
-			if (fReferences.size() != 0) {
-				ReferenceResolver.resolveReferences(fReferences, localMonitor);
-			}
-			localMonitor.worked(1);
-			if (localMonitor.isCanceled()) {
-				return EMPTY_RESULT;
-			}		
-			// 4. create problems
-			List allProblems = new LinkedList();
-			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use);
-			for (int i = 0; i < detectors.length; i++) {
-				IApiProblemDetector detector = detectors[i];
-				List problems = detector.createProblems();
-				allProblems.addAll(problems);
-				if (localMonitor.isCanceled()) {
-					return EMPTY_RESULT;
-				}
-			}
-			IApiProblem[] array = (IApiProblem[]) allProblems.toArray(new IApiProblem[allProblems.size()]);
-			localMonitor.worked(1);
-			localMonitor.done();
-			return array;
-		} finally {
-			// clean up
-			fIndexedDetectors = null;
-			fReferences.clear();
-		}
-	}
-	
-	/**
 	 * Indexes the problem detectors by the reference kinds they are interested in.
 	 * For example, a detector interested in a
 	 * {@link org.eclipse.pde.api.tools.internal.provisional.search.ReferenceModifiers#REF_INSTANTIATE}
@@ -208,7 +160,7 @@ public class ReferenceAnalyzer {
 	 * 
 	 * @param detectors problem detectors
 	 */
-	private void indexProblemDetectors(IApiProblemDetector[] detectors) {
+	void indexProblemDetectors(IApiProblemDetector[] detectors) {
 		fIndexedDetectors = new IApiProblemDetector[32][];
 		for (int i = 0; i < detectors.length; i++) {
 			IApiProblemDetector detector = detectors[i];
@@ -238,7 +190,7 @@ public class ReferenceAnalyzer {
 	 * @param bitConstant a single bit constant (0x1 << n)
 	 * @return log base 2 of the constant (the power of 2 the constant is equal to)
 	 */
-	private int getLog2(int bitConstant) {
+	int getLog2(int bitConstant) {
 		double logX = Math.log(bitConstant);
 		double pow = logX / LOG2;
 		return (int)Math.round(pow);
@@ -251,7 +203,7 @@ public class ReferenceAnalyzer {
 	 * @param monitor progress monitor
 	 * @exception CoreException if the scan fails
 	 */
-	private void extractReferences(IApiTypeContainer scope, IProgressMonitor monitor) throws CoreException {
+	void extractReferences(IApiTypeContainer scope, IProgressMonitor monitor) throws CoreException {
 		fStatus = new MultiStatus(ApiPlugin.PLUGIN_ID, 0, BuilderMessages.ReferenceAnalyzer_api_analysis_error, null); 
 		String[] packageNames = scope.getPackageNames();
 		SubMonitor localMonitor = SubMonitor.convert(monitor, packageNames.length);
@@ -283,28 +235,88 @@ public class ReferenceAnalyzer {
 	 */
 	public IApiProblem[] analyze(IApiComponent component, IApiTypeContainer scope, IProgressMonitor monitor) throws CoreException {
 		// build problem detectors
-		IApiProblemDetector[] detectors = buildProblemDetectors(component);
+		IApiProblemDetector[] detectors = buildProblemDetectors(component, ProblemDetectorBuilder.K_ALL, monitor);
 		// analyze
-		return analyze(scope, detectors, monitor);
+		try {
+			// 1. extract references
+			SubMonitor localMonitor = SubMonitor.convert(monitor, BuilderMessages.ReferenceAnalyzer_analyzing_api, 3);
+			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use); 
+			extractReferences(scope, localMonitor);
+			localMonitor.worked(1);
+			if (localMonitor.isCanceled()) {
+				return EMPTY_RESULT;
+			}
+			// 2. resolve problematic references
+			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use);
+			if (fReferences.size() != 0) {
+				ReferenceResolver.resolveReferences(fReferences, localMonitor);
+			}
+			localMonitor.worked(1);
+			if (localMonitor.isCanceled()) {
+				return EMPTY_RESULT;
+			}		
+			// 3. create problems
+			List allProblems = new LinkedList();
+			localMonitor.subTask(BuilderMessages.ReferenceAnalyzer_analyzing_api_checking_use);
+			for (int i = 0; i < detectors.length; i++) {
+				IApiProblemDetector detector = detectors[i];
+				List problems = detector.createProblems();
+				allProblems.addAll(problems);
+				if (localMonitor.isCanceled()) {
+					return EMPTY_RESULT;
+				}
+			}
+			IApiProblem[] array = (IApiProblem[]) allProblems.toArray(new IApiProblem[allProblems.size()]);
+			localMonitor.worked(1);
+			localMonitor.done();
+			return array;
+		} finally {
+			// clean up
+			fIndexedDetectors = null;
+			fReferences.clear();
+		}
+	}
+	
+	/**
+	 * Returns the collection of problem detectors for the given reference kind
+	 * @param referencekind
+	 * @return
+	 */
+	public IApiProblemDetector[] getProblemDetectors(int referencekind) {
+		if(fIndexedDetectors != null) {
+			int index = getLog2(referencekind);
+			if(index > -1 && index < fIndexedDetectors.length) {
+				IApiProblemDetector[] detectors = fIndexedDetectors[index];
+				if(detectors != null) {
+					return detectors;
+				}
+			}
+			return NO_PROBLEM_DETECTORS;
+		}
+		return NO_PROBLEM_DETECTORS;
 	}
 	
 	/**
 	 * Builds problem detectors to use when analyzing the given component.
 	 * 
 	 * @param component component to be analyzed
+	 * @param kindmask the kinds of detectors to build. See {@link ProblemDetectorBuilder} for kinds
+	 * @param monitor 
+	 * 
 	 * @return problem detectors
 	 */
-	private IApiProblemDetector[] buildProblemDetectors(IApiComponent component) {
+	public IApiProblemDetector[] buildProblemDetectors(IApiComponent component, int kindmask, IProgressMonitor monitor) {
 		try {
 			long start = System.currentTimeMillis();
 			IApiComponent[] components = component.getBaseline().getPrerequisiteComponents(new IApiComponent[]{component});
-			final ProblemDetectorBuilder visitor = new ProblemDetectorBuilder(component);
+			final ProblemDetectorBuilder visitor = new ProblemDetectorBuilder(component, kindmask);
 			for (int i = 0; i < components.length; i++) {
+				Util.updateMonitor(monitor);
 				IApiComponent prereq = components[i];
 				if (!prereq.equals(component)) {
 					visitor.setOwningComponent(prereq);
 					try {
-						prereq.getApiDescription().accept(visitor);
+						prereq.getApiDescription().accept(visitor, monitor);
 					} catch (CoreException e) {
 						ApiPlugin.log(e.getStatus());
 					}
@@ -328,11 +340,15 @@ public class ReferenceAnalyzer {
 					return false;
 				}
 			};
-			component.getApiDescription().accept(nameVisitor);
+			component.getApiDescription().accept(nameVisitor, null);
 			List detectors = visitor.getProblemDetectors();
 			int size = detectors.size();
-			if (size == 0) return NO_PROBLEM_DETECTORS;
-			return (IApiProblemDetector[]) detectors.toArray(new IApiProblemDetector[size]);
+			if (size == 0) {
+				return NO_PROBLEM_DETECTORS;
+			}
+			IApiProblemDetector[] array = (IApiProblemDetector[]) detectors.toArray(new IApiProblemDetector[size]);
+			indexProblemDetectors(array);
+			return array;
 		} catch (CoreException e) {
 			ApiPlugin.log(e);
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
index 4a48caf..78b78c2 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,9 @@ import java.util.Stack;
 import java.util.TreeSet;
 
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.Signature;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
@@ -30,6 +32,7 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiField;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMethod;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
+import org.eclipse.pde.api.tools.internal.util.Signatures;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.objectweb.asm.ClassAdapter;
 import org.objectweb.asm.ClassReader;
@@ -303,6 +306,9 @@ public class ReferenceExtractor extends ClassAdapter {
 				Reference reference = ReferenceExtractor.this.addFieldReference(Type.getObjectType(owner), name, refType);
 				if (reference != null) {
 					this.linePositionTracker.addLocation(reference);
+					if(refType == IReference.REF_GETFIELD || refType == IReference.REF_PUTFIELD) {
+						ReferenceExtractor.this.fieldtracker.addField(reference);
+					}
 				}
 			}
 		}
@@ -397,6 +403,9 @@ public class ReferenceExtractor extends ClassAdapter {
 				Reference reference = ReferenceExtractor.this.addMethodReference(declaringType, name, desc, kind);
 				if (reference != null) {
 					this.linePositionTracker.addLocation(reference);
+					if(kind == IReference.REF_STATICMETHOD) {
+						ReferenceExtractor.this.fieldtracker.addAccessor(reference);
+					}
 				}
 			}
 			this.stringLiteral = null;
@@ -445,18 +454,15 @@ public class ReferenceExtractor extends ClassAdapter {
 		 * @return Type
 		 */
 		private Type getTypeFromDescription(String desc) {
-			while (desc.charAt(0) == '[') {
-				desc = desc.substring(1);
+			String ldesc = desc;
+			while (ldesc.charAt(0) == '[') {
+				ldesc = ldesc.substring(1);
 			}
 			Type type = null;
-			if (desc.length() == 1 && Signature.getTypeSignatureKind(desc) == Signature.BASE_TYPE_SIGNATURE) {
-				type = Type.getType(desc);
+			if (ldesc.endsWith(";")) { //$NON-NLS-1$
+				type = Type.getType(ldesc);
 			} else {
-				if (desc.endsWith(";")) { //$NON-NLS-1$
-					type = Type.getType(desc);
-				} else {
-					type = Type.getObjectType(desc);
-				}
+				type = Type.getObjectType(ldesc);
 			}
 			return type;
 		}
@@ -465,37 +471,35 @@ public class ReferenceExtractor extends ClassAdapter {
 		 */
 		public void visitTypeInsn(int opcode, String desc) {
 			Type type = this.getTypeFromDescription(desc);
-			if(type.getSort() == Type.OBJECT) {
-				int kind = -1;
-				//we can omit the NEW case as it is caught by the constructor call
-				switch(opcode) {
-					case Opcodes.ANEWARRAY: {
-						kind = IReference.REF_ARRAYALLOC;
-						break;
-					}
-					case Opcodes.CHECKCAST: {
-						kind = IReference.REF_CHECKCAST;
-						break;
-					}
-					case Opcodes.INSTANCEOF: {
-						kind = IReference.REF_INSTANCEOF;
-						break;
-					}
-					case Opcodes.NEW: {
-						//handle it only for anonymous / local types
-						Reference ref = (Reference) fAnonymousTypes.get(processName(type.getInternalName()));
-						if(ref != null) {
-							this.linePositionTracker.addLocation(ref);
-						}
-					}
+			int kind = -1;
+			switch(opcode) {
+				case Opcodes.ANEWARRAY: {
+					kind = IReference.REF_ARRAYALLOC;
+					break;
 				}
-				if(kind != -1) {
-					Reference reference = ReferenceExtractor.this.addTypeReference(type, kind);
-					if (reference != null) {
-						this.linePositionTracker.addLocation(reference);
+				case Opcodes.CHECKCAST: {
+					kind = IReference.REF_CHECKCAST;
+					break;
+				}
+				case Opcodes.INSTANCEOF: {
+					kind = IReference.REF_INSTANCEOF;
+					break;
+				}
+				case Opcodes.NEW: {
+					//we can omit the NEW case as it is caught by the constructor call
+					//handle it only for anonymous / local types
+					Reference ref = (Reference) fAnonymousTypes.get(processName(type.getInternalName()));
+					if(ref != null) {
+						this.linePositionTracker.addLocation(ref);
 					}
 				}
 			}
+			if(kind != -1) {
+				Reference reference = ReferenceExtractor.this.addTypeReference(type, kind);
+				if (reference != null) {
+					this.linePositionTracker.addLocation(reference);
+				}
+			}
 		}
 
 		/* (non-Javadoc)
@@ -575,7 +579,72 @@ public class ReferenceExtractor extends ClassAdapter {
 		
 		
 	}
-
+	
+	/**
+	 * @since 1.1
+	 */
+	static class FieldTracker {
+		HashMap accessors = new HashMap();
+		ArrayList fields = new ArrayList();
+		ReferenceExtractor extractor = null;
+		/**
+		 * Constructor
+		 */
+		public FieldTracker(ReferenceExtractor extractor) {
+			this.extractor = extractor;
+		}
+		
+		/**
+		 * Add a field to be tracked
+		 * @param field
+		 */
+		public void addField(Reference ref) {
+			if(ref != null) {
+				fields.add(ref);
+			}
+		}
+		/**
+		 * Add an accessor to be tracked
+		 * @param accessor
+		 */
+		public void addAccessor(Reference ref) {
+			if(ref != null) {
+				String key = ref.getReferencedMemberName();
+				List refs = (List) accessors.get(key);
+				if(refs == null) {
+					refs = new ArrayList();
+					accessors.put(key, refs);
+				}
+				refs.add(ref);
+			}
+			
+		}
+		/**
+		 * Resolve any synthetic field access to their accessor
+		 */
+		public void resolveSyntheticFields() {
+			Reference accessor = null, field = null;
+			List refs = null;
+			for (int i = 0; i < fields.size(); i++) {
+				field = (Reference) fields.get(i);
+				refs = (List) accessors.get(field.getMember().getName());
+				if(refs != null) {
+					for (Iterator iter = refs.iterator(); iter.hasNext();) {
+						accessor = (Reference) iter.next();
+						Reference refer = Reference.fieldReference(accessor.getMember(), 
+								field.getReferencedTypeName(), 
+								field.getReferencedMemberName(),
+								field.getReferenceKind());
+						refer.setLineNumber(accessor.getLineNumber());
+						this.extractor.collector.add(refer);
+					}
+					//we resolved it, remove it
+					this.extractor.collector.remove(field);
+				}
+			}
+		}
+	}
+	
 	static class LinePositionTracker {
 		List labelsAndLocations;
 		SortedSet lineInfos;
@@ -750,36 +819,36 @@ public class ReferenceExtractor extends ClassAdapter {
 	 * The list we collect references in. Entries in the list are
 	 * of the type {@link org.eclipse.pde.api.tools.internal.provisional.builder.IReference}
 	 */
-	private Set collector = null;
+	Set collector = null;
 	
 	/**
-	 * The full internal name of the class we are extracting refs from
+	 * The full internal name of the class we are extracting references from
 	 */
 	private String classname = null;
 
 	/**
 	 * Current type being visited.
 	 */
-	private IApiType fType;
+	IApiType fType;
 
 	/**
 	 * Stack of members being visited. When a member is entered its
 	 * element descriptor is pushed onto the stack. When a member
 	 * is exited, the stack is popped.
 	 */
-	private Stack fMemberStack = new Stack();
+	Stack fMemberStack = new Stack();
 
 	/**
 	 * Stack of super types *names* (String) being visited. When a type is
 	 * entered, its super type is pushed onto the stack. When a type
 	 * is exited, the stack is popped.
 	 */
-	private Stack fSuperStack = new Stack();
+	Stack fSuperStack = new Stack();
 	
 	/**
 	 * Mapping of anonymous type names to their reference
 	 */
-	private HashMap fAnonymousTypes = new HashMap();
+	HashMap fAnonymousTypes = new HashMap();
 
 	/**
 	 * Whether to extract references to elements within the classfile
@@ -791,6 +860,12 @@ public class ReferenceExtractor extends ClassAdapter {
 	 * Bit mask of {@link ReferenceModifiers} to extract.
 	 */
 	private int fReferenceKinds = 0;
+	
+	/**
+	 * Track synthetic field / accessor
+	 * @since 1.1
+	 */
+	FieldTracker fieldtracker = null;
 
 	/**
 	 * Bit mask that determines if we need to visit members
@@ -809,7 +884,7 @@ public class ReferenceExtractor extends ClassAdapter {
 	 * not within a field).
 	 */
 	private ClassFileSignatureVisitor signaturevisitor = new ClassFileSignatureVisitor();
-	private static int TYPE = 0, FIELD = 1, METHOD = 2;
+	static int TYPE = 0, FIELD = 1, METHOD = 2;
 
 	/**
 	 * Constructor
@@ -822,9 +897,26 @@ public class ReferenceExtractor extends ClassAdapter {
 		fType = type;
 		this.collector = collector;
 		fReferenceKinds = referenceKinds;
-		fIsVisitMembers = (VISIT_MEMBERS_MASK & fReferenceKinds) > 0; 
+		fIsVisitMembers = (VISIT_MEMBERS_MASK & fReferenceKinds) > 0;
+		fieldtracker = new FieldTracker(this);
 	}
 
+	/**
+	 * Constructor
+	 * @param type
+	 * @param collector
+	 * @param referenceKinds
+	 * @param tracker
+	 */
+	protected ReferenceExtractor(IApiType type, Set collector, int referenceKinds, FieldTracker tracker) {
+		super(new ClassNode());
+		fType = type;
+		this.collector = collector;
+		fReferenceKinds = referenceKinds;
+		fIsVisitMembers = (VISIT_MEMBERS_MASK & fReferenceKinds) > 0;
+		fieldtracker = tracker;
+	}
+	
 	/* (non-Javadoc)
 	 * @see java.lang.Object#toString()
 	 */
@@ -855,7 +947,7 @@ public class ReferenceExtractor extends ClassAdapter {
 		}
 		return !(this.classname.equals(owner) || this.classname.startsWith(owner) || "<clinit>".equals(owner) || "this".equals(owner)); //$NON-NLS-1$ //$NON-NLS-2$
 	}
-
+	
 	/**
 	 * Returns whether the specified reference should be
 	 * considered when extracting references. Configured by setting on whether
@@ -865,7 +957,8 @@ public class ReferenceExtractor extends ClassAdapter {
 	 * @return whether to include the reference
 	 */
 	protected boolean consider(Reference ref) {
-		if ((ref.getReferenceKind() & fReferenceKinds) == 0) {
+		int kind = ref.getReferenceKind();
+		if ((kind & fReferenceKinds) == 0) {
 			return false;
 		}
 		if (this.fIncludeLocalRefs) {
@@ -873,7 +966,8 @@ public class ReferenceExtractor extends ClassAdapter {
 		}
 		// don't consider references to anonymous types or elements in them
 		String referencedTypeName = ref.getReferencedTypeName();
-		if (ref.getReferenceKind() == IReference.REF_VIRTUALMETHOD || ref.getReferenceKind() == IReference.REF_OVERRIDE) {
+		if (kind == IReference.REF_VIRTUALMETHOD || kind == IReference.REF_OVERRIDE ||
+				kind == IReference.REF_GETFIELD || kind == IReference.REF_PUTFIELD) {
 			return true;
 		}
 		if (referencedTypeName.startsWith(fType.getName())) {
@@ -1077,6 +1171,9 @@ public class ReferenceExtractor extends ClassAdapter {
 				System.out.println("ending visit of type: ["+typeName+"]"); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		}
+		if(!this.fType.isMemberType()) {
+			fieldtracker.resolveSyntheticFields();
+		}
 	}
 
 	/* (non-Javadoc)
@@ -1086,6 +1183,18 @@ public class ReferenceExtractor extends ClassAdapter {
 		if (fIsVisitMembers) {
 			IApiType owner = (IApiType) this.getMember();
 			IApiField field = owner.getField(name);
+			if(field == null) {
+				ApiPlugin.log(
+						new Status(
+								IStatus.WARNING, 
+								ApiPlugin.PLUGIN_ID, 
+								NLS.bind(BuilderMessages.ReferenceExtractor_failed_to_lookup_field, 
+										new String[] {name, Signatures.getQualifiedTypeSignature(owner)})
+						)
+				);
+				//if we can't find the method there is no point trying to process it
+				return null;
+			}
 			this.enterMember(field);
 			if((access & Opcodes.ACC_SYNTHETIC) == 0) {
 				if(signature != null) {
@@ -1094,6 +1203,9 @@ public class ReferenceExtractor extends ClassAdapter {
 					this.addTypeReference(Type.getType(desc), IReference.REF_FIELDDECL);
 				}
 			}
+			else {
+				fieldtracker.addField(addTypeReference(Type.getType(desc), IReference.REF_FIELDDECL));
+			}
 			this.exitMember();
 		}
 		return null;
@@ -1115,6 +1227,10 @@ public class ReferenceExtractor extends ClassAdapter {
 			AbstractApiTypeRoot root = (AbstractApiTypeRoot) comp.findTypeRoot(pname);
 			if(root != null) {
 				IApiType type = root.getStructure();
+				if(type == null) {
+					//do nothing for a bad classfile
+					return;
+				}
 				Set refs = null;
 				if(type.isAnonymous() || type.isLocal()) {
 					//visit the class files for the dependent anonymous and local inner types
@@ -1143,7 +1259,7 @@ public class ReferenceExtractor extends ClassAdapter {
 	 */
 	private Set processInnerClass(IApiType type, int refkinds) throws CoreException {
 		HashSet refs = new HashSet();
-		ReferenceExtractor extractor = new ReferenceExtractor(type, refs, refkinds);
+		ReferenceExtractor extractor = new ReferenceExtractor(type, refs, refkinds, this.fieldtracker);
 		ClassReader reader = new ClassReader(((AbstractApiTypeRoot)type.getTypeRoot()).getContents());
 		reader.accept(extractor, ClassReader.SKIP_FRAMES);
 		return refs;
@@ -1167,6 +1283,18 @@ public class ReferenceExtractor extends ClassAdapter {
 				}
 			}
 			IApiMethod method = owner.getMethod(name, desc);
+			if(method == null) {
+				ApiPlugin.log(
+						new Status(
+								IStatus.WARNING, 
+								ApiPlugin.PLUGIN_ID, 
+								NLS.bind(BuilderMessages.ReferenceExtractor_failed_to_lookup_method, 
+										new String[] {name, desc, Signatures.getQualifiedTypeSignature(owner)})
+						)
+				);
+				//if we can't find the method there is no point trying to process it
+				return null;
+			}
 			this.enterMember(method);
 			// record potential method override reference
 			if ((access & (Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC)) > 0) {
@@ -1176,8 +1304,8 @@ public class ReferenceExtractor extends ClassAdapter {
 						Reference.methodReference(method, superTypeName, method.getName(), method.getSignature(), IReference.REF_OVERRIDE));
 				}
 			}
-			if((access & Opcodes.ACC_SYNTHETIC) == 0 && !"<clinit>".equals(name)) { //$NON-NLS-1$
-				int argumentcount = 0;
+			int argumentcount = 0;
+			if((access & Opcodes.ACC_SYNTHETIC) == 0) {
 				if(signature != null) {
 					this.processSignature(name, signature, IReference.REF_PARAMETERIZED_METHODDECL, METHOD);
 					argumentcount = this.signaturevisitor.argumentcount;
@@ -1196,10 +1324,10 @@ public class ReferenceExtractor extends ClassAdapter {
 						}
 					}
 				}
-				MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
-				if(mv != null && ((access & (Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT)) == 0)) {
-					return new ClassFileMethodVisitor(mv, name, argumentcount);
-				}
+			}
+			MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);
+			if(mv != null && ((access & (Opcodes.ACC_NATIVE | Opcodes.ACC_ABSTRACT)) == 0)) {
+				return new ClassFileMethodVisitor(mv, name, argumentcount);
 			}
 		}
 		return null;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceResolver.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceResolver.java
index a01a27e..4040190 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceResolver.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceResolver.java
@@ -145,7 +145,7 @@ public final class ReferenceResolver {
 	 */
 	private static String createSignatureKey(IReference reference) throws CoreException {
 		StringBuffer buffer = new StringBuffer();
-		buffer.append(reference.getMember().getApiComponent().getId());
+		buffer.append(reference.getMember().getApiComponent().getSymbolicName());
 		buffer.append("#"); //$NON-NLS-1$
 		buffer.append(reference.getReferencedTypeName());
 		switch (reference.getReferenceType()) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/SystemApiDetector.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/SystemApiDetector.java
index 46aee3e..532d617 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/SystemApiDetector.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/SystemApiDetector.java
@@ -26,8 +26,8 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.Position;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.ImportPackageSpecification;
-import org.eclipse.pde.api.tools.internal.model.BundleApiComponent;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.BundleComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.ProfileModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
@@ -245,7 +245,7 @@ public class SystemApiDetector extends AbstractProblemDetector {
 	 */
 	protected Position getSourceRange(IType type, IDocument document, IReference reference) throws CoreException, BadLocationException {
 		switch(reference.getReferenceType()) {
-			case Reference.T_TYPE_REFERENCE : {
+			case IReference.T_TYPE_REFERENCE : {
 				int linenumber = reference.getLineNumber();
 				if (linenumber > 0) {
 					linenumber--;
@@ -295,7 +295,7 @@ public class SystemApiDetector extends AbstractProblemDetector {
 					return pos;
 				}
 			}
-			case Reference.T_FIELD_REFERENCE : {
+			case IReference.T_FIELD_REFERENCE : {
 				int linenumber = reference.getLineNumber();
 				if (linenumber > 0) {
 					return getFieldNameRange(reference.getReferencedTypeName(), reference.getReferencedMemberName(), document, reference);
@@ -304,7 +304,7 @@ public class SystemApiDetector extends AbstractProblemDetector {
 				IApiField field = (IApiField) reference.getMember();
 				return getSourceRangeForField(type, reference, field);
 			}
-			case Reference.T_METHOD_REFERENCE : {
+			case IReference.T_METHOD_REFERENCE : {
 				if (reference.getLineNumber() >= 0) {
 					String referenceMemberName = reference.getReferencedMemberName();
 					String methodName = null;
@@ -353,8 +353,8 @@ public class SystemApiDetector extends AbstractProblemDetector {
 					 * Make sure that the resolved reference doesn't below to one of the imported package of
 					 * the current component
 					 */
-					if (apiComponent instanceof BundleApiComponent) {
-						BundleDescription bundle = ((BundleApiComponent)apiComponent).getBundleDescription();
+					if (apiComponent instanceof BundleComponent) {
+						BundleDescription bundle = ((BundleComponent)apiComponent).getBundleDescription();
 						ImportPackageSpecification[] importPackages = bundle.getImportPackages();
 						String referencedTypeName = reference.getReferencedTypeName();
 						int index = referencedTypeName.lastIndexOf('.');
@@ -434,8 +434,8 @@ public class SystemApiDetector extends AbstractProblemDetector {
 				try {
 					IApiProblem problem = null;
 					IApiComponent component = reference.getMember().getApiComponent();
-					if (component instanceof PluginProjectApiComponent) {
-						PluginProjectApiComponent ppac = (PluginProjectApiComponent) component;
+					if (component instanceof ProjectComponent) {
+						ProjectComponent ppac = (ProjectComponent) component;
 						IJavaProject project = ppac.getJavaProject();
 						problem = createProblem(reference, project);
 					} else {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TypeScope.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TypeScope.java
index 3a9f622..bcfb317 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TypeScope.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/TypeScope.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -130,7 +130,7 @@ public class TypeScope extends ApiElement implements IApiTypeContainer {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findClassFile(java.lang.String, java.lang.String)
 	 */
 	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
-		if (fComponent.getId().equals(id)) {
+		if (fComponent.getSymbolicName().equals(id)) {
 			return findTypeRoot(qualifiedName);
 		}
 		return null;
@@ -154,4 +154,10 @@ public class TypeScope extends ApiElement implements IApiTypeContainer {
 		return buffer.toString();
 	}
 	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return IApiTypeContainer.COMPONENT;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/buildermessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/buildermessages.properties
index 5839255..f486327 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/buildermessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/buildermessages.properties
@@ -10,7 +10,7 @@
 ###############################################################################
 api_analysis_builder=API Analysis Builder
 api_analysis_on_0=Analyzing API
-building_workspace_profile=Building workspace API profile
+building_workspace_profile=Building workspace API baseline
 checking_api_usage=Checking API use of ''{0}''
 AbstractTypeLeakDetector_vis_type_has_no_api_description=Visible type {0} has no API description
 ApiAnalysisBuilder_builder_for_project=Builder for project: [{0}]
@@ -19,8 +19,11 @@ ApiAnalysisBuilder_initializing_analyzer=Initializing analyzer for ''{0}''
 ApiProblemFactory_problem_message_not_found=Message not found for id: {0}
 CleaningAPIDescription=Cleaning API description for {0}
 BaseApiAnalyzer_analyzing_api=Analyzing API
+BaseApiAnalyzer_checking_compat=Checking API compatibility...
+BaseApiAnalyzer_checking_since_tags=Checking @since tags...
 BaseApiAnalyzer_comparing_api_profiles=Comparing ''{0}'' to API baseline ''{1}''...
 BaseApiAnalyzer_more_version_problems={0} more change(s)...
+BaseApiAnalyzer_processing_deltas=Processing API deltas...
 BaseApiAnalyzer_scanning_0=Scanning ''{0}'' for unsupported API Javadoc tags...
 BaseApiAnalyzer_validating_javadoc_tags=Validating API Javadoc tags
 build_saveStateComplete = Saved in {0} ms
@@ -30,6 +33,8 @@ ReferenceAnalyzer_analyzing_api_checking_use=Analyzing API: Checking API use
 ReferenceAnalyzer_analyzing_api=Analyzing API
 ReferenceAnalyzer_api_analysis_error=API analysis error
 ReferenceAnalyzer_checking_api_used_by=Analyzing API: Checking API used by ''{0}''
+ReferenceExtractor_failed_to_lookup_method=Failed to look up method {0} with signature {1} in type {2}
+ReferenceExtractor_failed_to_lookup_field=Failed to look up field {0} in type {1}
 TagValidator_a_class=a class
 TagValidator_a_constructor=a constructor
 TagValidator_a_field=a field
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
index a633ee4..60cce86 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/ClassFileComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,9 +17,11 @@ import java.util.List;
 import java.util.Set;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.Signature;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
@@ -45,7 +47,7 @@ import org.objectweb.asm.signature.SignatureReader;
 import com.ibm.icu.text.MessageFormat;
 
 /**
- * Compares class files from the workspace to those in the default {@link IApiProfile}
+ * Compares class files from the workspace to those in the default {@link IApiBaseline}
  * 
  * @since 1.0.0
  */
@@ -63,8 +65,8 @@ public class ClassFileComparator {
 		Debug = debugValue || Util.DEBUG;
 	}
 
-	private boolean isCheckedException(IApiBaseline profile, IApiComponent apiComponent, String exceptionName) {
-		if (profile == null) {
+	private boolean isCheckedException(IApiBaseline baseline, IApiComponent apiComponent, String exceptionName) {
+		if (baseline == null) {
 			return true;
 		}
 		try {
@@ -73,21 +75,24 @@ public class ClassFileComparator {
 			}
 			String packageName = Signatures.getPackageName(exceptionName);
 			IApiTypeRoot result = Util.getClassFile(
-					profile.resolvePackage(apiComponent, packageName),
+					baseline.resolvePackage(apiComponent, packageName),
 					exceptionName);
 			if (result != null) {
 				// TODO should this be reported as a checked exception
 				IApiType exception = result.getStructure();
+				if(exception == null) {
+					return false;
+				}
 				while (!Util.isJavaLangObject(exception.getName())) {
 					String superName = exception.getSuperclassName();
 					packageName = Signatures.getPackageName(superName);
 					result = Util.getClassFile(
-							profile.resolvePackage(apiComponent, packageName),
+							baseline.resolvePackage(apiComponent, packageName),
 							superName);
 					if (result == null) {
 						// TODO should we report this failure ?
 						if (Debug) {
-							System.err.println("CHECKED EXCEPTION LOOKUP: Could not find " + superName + " in profile " + profile.getName() + " from component " + apiComponent.getId()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+							System.err.println("CHECKED EXCEPTION LOOKUP: Could not find " + superName + " in baseline " + baseline.getName() + " from component " + apiComponent.getSymbolicName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 						}
 						break;
 					}
@@ -126,8 +131,8 @@ public class ClassFileComparator {
 	 * @param classFile2 the class file from the baseline to compare to
 	 * @param component the API component from the workspace
 	 * @param component2 the API component from the baseline
-	 * @param apiState the workspace API profile
-	 * @param apiState2 the baseline API profile
+	 * @param apiState the workspace API baseline
+	 * @param apiState2 the baseline API baseline
 	 * @param visibilityModifiers any modifiers from the class file
 	 * @throws CoreException if the contents of the specified class files cannot be acquired
 	 */
@@ -147,8 +152,8 @@ public class ClassFileComparator {
 	 * @param classFile2 the class file from the baseline to compare to
 	 * @param component the API component from the workspace
 	 * @param component2 the API component from the baseline
-	 * @param apiState the workspace API profile
-	 * @param apiState2 the baseline API profile
+	 * @param apiState the workspace API baseline
+	 * @param apiState2 the baseline API baseline
 	 * @param visibilityModifiers any modifiers from the class file
 	 * @throws CoreException if the contents of the specified class file cannot be acquired
 	 */
@@ -256,7 +261,7 @@ public class ClassFileComparator {
 	protected void reportStatus(IStatus newstatus) {
 		if(this.status == null) {
 			String msg = MessageFormat.format(ComparatorMessages.ClassFileComparator_0, new String[] {this.type1.getName()});
-			this.status = new MultiStatus(ApiPlugin.PLUGIN_ID, Status.ERROR, msg, null);
+			this.status = new MultiStatus(ApiPlugin.PLUGIN_ID, IStatus.ERROR, msg, null);
 		}
 		this.status.add(newstatus);
 	}
@@ -400,6 +405,9 @@ public class ClassFileComparator {
 							IApiTypeRoot interfaceClassFile = getType(interfaceName, this.component2, this.apiBaseline2);
 							if (interfaceClassFile == null) continue;
 							IApiType type = interfaceClassFile.getStructure();
+							if(type == null) {
+								continue;
+							}
 							IApiMethod[] methods = type.getMethods();
 							int length = methods.length;
 							if (length > 0) {
@@ -565,7 +573,7 @@ public class ClassFileComparator {
 						}
 						IApiTypeRoot memberType2 = this.component2.findTypeRoot(typeMember.getName());
 						ClassFileComparator comparator = new ClassFileComparator(typeMember, memberType2, this.component, this.component2, this.apiBaseline1, this.apiBaseline2, this.visibilityModifiers);
-						IDelta delta2 = comparator.getDelta();
+						IDelta delta2 = comparator.getDelta(null);
 						if (delta2 != null && delta2 != ApiComparator.NO_DELTA) {
 							this.addDelta(delta2);
 						}
@@ -942,8 +950,6 @@ public class ClassFileComparator {
 	 * Recursively collects all of the super-interfaces of the given type descriptor within the scope of 
 	 * the given API component
 	 * @param type
-	 * @param apiComponent
-	 * @param profile
 	 * @param set
 	 */
 	private void collectAllInterfaces(IApiType type, Set set) {
@@ -1007,7 +1013,8 @@ public class ClassFileComparator {
 	 * Returns the change(s) between the type descriptor and its equivalent in the current baseline.
 	 * @return the changes in the type descriptor or <code>null</code>
 	 */
-	public IDelta getDelta() {
+	public IDelta getDelta(IProgressMonitor monitor) {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 10);
 		try {
 			this.delta = createDelta();
 			// check visibility
@@ -1094,6 +1101,31 @@ public class ClassFileComparator {
 				this.initialDescriptorRestrictions |= RestrictionModifiers.NO_EXTEND;
 			}
 
+			if (Flags.isDeprecated(typeAccess)) {
+				if (!Flags.isDeprecated(typeAccess2)) {
+					this.addDelta(
+							getElementType(this.type1),
+							IDelta.REMOVED,
+							IDelta.DEPRECATION,
+							this.currentDescriptorRestrictions,
+							typeAccess,
+							typeAccess2,
+							this.type1,
+							this.type1.getName(),
+							Util.getDescriptorName(type1));
+				}
+			} else if (Flags.isDeprecated(typeAccess2)) {
+				this.addDelta(
+						getElementType(this.type1),
+						IDelta.ADDED,
+						IDelta.DEPRECATION,
+						this.currentDescriptorRestrictions,
+						typeAccess,
+						typeAccess2,
+						this.type1,
+						this.type1.getName(),
+						Util.getDescriptorName(type1));
+			}
 			if (Flags.isProtected(typeAccess)) {
 				if (Flags.isPrivate(typeAccess2) || Util.isDefault(typeAccess2)) {
 					// report delta - decrease access: protected to default or private
@@ -1517,6 +1549,9 @@ public class ClassFileComparator {
 			reportStatus(e);
 			return null;
 		}
+		finally {
+			localmonitor.done();
+		}
 	}
 
 	private void getDeltaForField(IApiField field) {
@@ -1953,6 +1988,32 @@ public class ClassFileComparator {
 					name,
 					new String[] {Util.getDescriptorName(this.type1), name});
 		}
+		if (Flags.isDeprecated(access)) {
+			if (!Flags.isDeprecated(access2)) {
+				this.addDelta(
+						IDelta.FIELD_ELEMENT_TYPE,
+						IDelta.REMOVED,
+						IDelta.DEPRECATION,
+						restrictions,
+						access,
+						access2,
+						this.type1,
+						name,
+						new String[] {Util.getDescriptorName(this.type1), name});
+			}
+		} else if (Flags.isDeprecated(access2)) {
+			// report delta - non-volatile to volatile
+			this.addDelta(
+					IDelta.FIELD_ELEMENT_TYPE,
+					IDelta.ADDED,
+					IDelta.DEPRECATION,
+					restrictions,
+					access,
+					access2,
+					this.type1,
+					name,
+					new String[] {Util.getDescriptorName(this.type1), name});
+		}
 		if (field.getConstantValue() != null) {
 			if (field2.getConstantValue() == null) {
 				if (!changeFinalToNonFinal) {
@@ -2722,6 +2783,32 @@ public class ClassFileComparator {
 					key,
 					new String[] {Util.getDescriptorName(this.type1), methodDisplayName});
 		}
+		if (Flags.isDeprecated(access)) {
+			if (!Flags.isDeprecated(access2)) {
+				this.addDelta(
+						getElementType(method),
+						IDelta.REMOVED,
+						IDelta.DEPRECATION,
+						restrictions,
+						access,
+						access2,
+						this.type1,
+						key,
+						new String[] {Util.getDescriptorName(this.type1), methodDisplayName});
+			}
+		} else if (Flags.isDeprecated(access2)) {
+			// report delta - non-volatile to volatile
+			this.addDelta(
+					getElementType(method),
+					IDelta.ADDED,
+					IDelta.DEPRECATION,
+					restrictions,
+					access,
+					access2,
+					this.type1,
+					key,
+					new String[] {Util.getDescriptorName(this.type1), methodDisplayName});
+		}
 		// check type parameters
 		String signature1 = method.getGenericSignature();
 		String signature2 = method2.getGenericSignature();
@@ -2772,8 +2859,6 @@ public class ClassFileComparator {
 	 * Returns the complete super-interface set for the given type descriptor or null, if it could not be
 	 * computed
 	 * @param type
-	 * @param apiComponent
-	 * @param profile
 	 * @return the complete super-interface set for the given descriptor, or <code>null</code>
 	 */
 	private Set getInterfacesSet(IApiType type) {
@@ -2917,9 +3002,9 @@ public class ClassFileComparator {
 			// we ignore synthetic method
 			return;
 		}
-		if ((this.visibilityModifiers == VisibilityModifiers.API) && component2.hasApiDescription()) {
+		IApiDescription apiDescription = null;
+		if (((this.visibilityModifiers & VisibilityModifiers.API) != 0) && component2.hasApiDescription()) {
 			// check if this method should be removed because it is tagged as @noreference
-			IApiDescription apiDescription = null;
 			int restrictions = RestrictionModifiers.NO_RESTRICTIONS;
 			try {
 				apiDescription = this.component2.getApiDescription();
@@ -2933,7 +3018,7 @@ public class ClassFileComparator {
 				}
 			}
 			// check if this method should be removed because it is tagged as @noreference
-			if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
+			if (this.visibilityModifiers == VisibilityModifiers.API && RestrictionModifiers.isReferenceRestriction(restrictions)) {
 				// such a method is not seen as an API method
 				return;
 			}
@@ -2943,6 +3028,38 @@ public class ClassFileComparator {
 		if (Flags.isFinal(this.type2.getModifiers())) {
 			restrictionsForMethodAddition |= RestrictionModifiers.NO_EXTEND;
 		}
+		if (apiDescription != null) {
+			if (this.type2.isMemberType() && Flags.isProtected(this.type2.getModifiers())) {
+				// protected member - check restriction on the enclosing type
+				IApiType enclosingType = this.type2;
+				try {
+					do {
+						if (enclosingType != null) {
+							final IApiAnnotations memberTypeAnnotations = apiDescription.resolveAnnotations(enclosingType.getHandle());
+							if (memberTypeAnnotations != null) {
+								int restrictions = memberTypeAnnotations.getRestrictions();
+								if (RestrictionModifiers.isReferenceRestriction(restrictions)) {
+									restrictionsForMethodAddition |= RestrictionModifiers.NO_REFERENCE;
+								}
+								if (RestrictionModifiers.isExtendRestriction(restrictions)) {
+									// @noextend on a class that contains a protected member means that it cannot be referenced
+									restrictionsForMethodAddition |= RestrictionModifiers.NO_EXTEND;
+									if (this.visibilityModifiers == VisibilityModifiers.API) {
+										return;
+									}
+								}
+								if (RestrictionModifiers.isImplementRestriction(restrictions)) {
+									restrictionsForMethodAddition |= RestrictionModifiers.NO_IMPLEMENT;
+								}
+							}
+						}
+						enclosingType = enclosingType.getEnclosingType();
+					} while (enclosingType != null);
+				} catch (CoreException e) {
+					reportStatus(e);
+				}
+			}
+		}
 		if (Flags.isPublic(access) || Flags.isProtected(access)) {
 			if (method.isConstructor()) {
 				this.addDelta(
@@ -3135,24 +3252,24 @@ public class ClassFileComparator {
 			&& (Flags.isPublic(access) || Flags.isProtected(access));
 	}
 	
-	private IApiTypeRoot getType(String typeName, IApiComponent component, IApiBaseline profile) throws CoreException {
+	private IApiTypeRoot getType(String typeName, IApiComponent component, IApiBaseline baseline) throws CoreException {
 		String packageName = Signatures.getPackageName(typeName);
-		IApiComponent[] components = profile.resolvePackage(component, packageName);
+		IApiComponent[] components = baseline.resolvePackage(component, packageName);
 		if (components == null) {
-			String msg = MessageFormat.format(ComparatorMessages.ClassFileComparator_1, new String[] {packageName, profile.getName(), component.getId()});
+			String msg = MessageFormat.format(ComparatorMessages.ClassFileComparator_1, new String[] {packageName, baseline.getName(), component.getSymbolicName()});
 			if (Debug) {
 				System.err.println("TYPE LOOKUP: "+msg); //$NON-NLS-1$
 			}
-			reportStatus(new Status(Status.ERROR, component.getId(), msg));
+			reportStatus(new Status(IStatus.ERROR, component.getSymbolicName(), msg));
 			return null;
 		}
 		IApiTypeRoot result = Util.getClassFile(components, typeName); 
 		if (result == null) {
-			String msg = MessageFormat.format(ComparatorMessages.ClassFileComparator_2, new String[] {typeName, profile.getName(), component.getId()});
+			String msg = MessageFormat.format(ComparatorMessages.ClassFileComparator_2, new String[] {typeName, baseline.getName(), component.getSymbolicName()});
 			if (Debug) {
 				System.err.println("TYPE LOOKUP: "+msg); //$NON-NLS-1$
 			}
-			reportStatus(new Status(Status.ERROR, component.getId(), msg));
+			reportStatus(new Status(IStatus.ERROR, component.getSymbolicName(), msg));
 			return null;
 		}
 		return result;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Delta.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Delta.java
index 15a2be7..4163555 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Delta.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Delta.java
@@ -60,8 +60,8 @@ public class Delta implements IDelta {
 			case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
 				writer.print("constructor"); //$NON-NLS-1$
 				break;
-			case IDelta.API_PROFILE_ELEMENT_TYPE :
-				writer.print("API profile"); //$NON-NLS-1$
+			case IDelta.API_BASELINE_ELEMENT_TYPE :
+				writer.print("API baseline"); //$NON-NLS-1$
 				break;
 		}
 		writer.print(", kind : "); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java
index 93aced4..a45d0a3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/Messages.java
@@ -91,11 +91,27 @@ public class Messages extends NLS {
 	private static int getKey(IDelta delta) {
 		switch(delta.getElementType()) {
 			case IDelta.ANNOTATION_ELEMENT_TYPE :
-				if (delta.getKind() == IDelta.ADDED && delta.getFlags() == IDelta.METHOD_WITH_DEFAULT_VALUE) {
-					return 1;
-				}
-				if (delta.getKind() == IDelta.CHANGED && delta.getFlags() == IDelta.DECREASE_ACCESS) {
-					return 101;
+				switch(delta.getKind()) {
+					case IDelta.ADDED :
+						switch(delta.getFlags()) {
+							case IDelta.METHOD_WITH_DEFAULT_VALUE :
+								return 1;
+							case IDelta.DEPRECATION :
+								return 110;
+						}
+						break;
+					case IDelta.CHANGED :
+						switch(delta.getFlags()) {
+							case IDelta.DECREASE_ACCESS :
+								return 101;
+						}
+						break;
+					case IDelta.REMOVED :
+						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 111;
+						}
+						break;
 				}
 				break;
 			case IDelta.API_COMPONENT_ELEMENT_TYPE :
@@ -123,7 +139,7 @@ public class Messages extends NLS {
 						}
 				}
 				break;
-			case IDelta.API_PROFILE_ELEMENT_TYPE :
+			case IDelta.API_BASELINE_ELEMENT_TYPE :
 				switch(delta.getKind()) {
 					case IDelta.ADDED :
 						if (delta.getFlags() == IDelta.API_COMPONENT) {
@@ -135,6 +151,8 @@ public class Messages extends NLS {
 				switch(delta.getKind()) {
 					case IDelta.ADDED :
 						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 110;
 							case IDelta.CLINIT :
 								return 7;
 							case IDelta.CONSTRUCTOR :
@@ -189,6 +207,8 @@ public class Messages extends NLS {
 						break;
 					case IDelta.REMOVED :
 						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 111;
 							case IDelta.CLINIT :
 								return 25;
 							case IDelta.CONSTRUCTOR :
@@ -229,6 +249,8 @@ public class Messages extends NLS {
 								return 36;
 							case IDelta.METHOD :
 								return 37;
+							case IDelta.DEPRECATION :
+								return 110;
 						}
 						break;
 					case IDelta.REMOVED :
@@ -236,6 +258,8 @@ public class Messages extends NLS {
 							case IDelta.CONSTRUCTOR :
 							case IDelta.API_CONSTRUCTOR :
 								return 38;
+							case IDelta.DEPRECATION :
+								return 111;
 						}
 						break;
 					case IDelta.CHANGED :
@@ -253,6 +277,8 @@ public class Messages extends NLS {
 								return 18;
 							case IDelta.VALUE :
 								return 40;
+							case IDelta.DEPRECATION :
+								return 110;
 						}
 						break;
 					case IDelta.CHANGED :
@@ -294,11 +320,14 @@ public class Messages extends NLS {
 							}
 						break;
 					case IDelta.REMOVED :
-						if (delta.getFlags() == IDelta.VALUE) {
-							if (Flags.isProtected(delta.getNewModifiers())) {
-								return 52;
-							}
-							return 53;
+						switch(delta.getFlags()) {
+							case IDelta.VALUE :
+								if (Flags.isProtected(delta.getNewModifiers())) {
+									return 52;
+								}
+								return 53;
+							case IDelta.DEPRECATION :
+								return 111;
 						}
 				}
 				break;
@@ -311,6 +340,8 @@ public class Messages extends NLS {
 				switch(delta.getKind()) {
 					case IDelta.ADDED :
 						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 110;
 							case IDelta.FIELD :
 								return 54;
 							case IDelta.METHOD :
@@ -341,6 +372,8 @@ public class Messages extends NLS {
 								return 60;
 							case IDelta.METHOD_MOVED_UP :
 								return 61;
+							case IDelta.DEPRECATION :
+								return 111;
 						}
 				}
 				break;
@@ -348,6 +381,8 @@ public class Messages extends NLS {
 				switch(delta.getKind()) {
 					case IDelta.ADDED :
 						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 110;
 							case IDelta.ANNOTATION_DEFAULT_VALUE :
 								return 62;
 							case IDelta.CHECKED_EXCEPTION :
@@ -404,6 +439,8 @@ public class Messages extends NLS {
 								return 76;
 							case IDelta.UNCHECKED_EXCEPTION :
 								return 77;
+							case IDelta.DEPRECATION :
+								return 111;
 						}
 					}
 				break;
@@ -411,6 +448,8 @@ public class Messages extends NLS {
 				switch(delta.getKind()) {
 					case IDelta.ADDED :
 						switch(delta.getFlags()) {
+							case IDelta.DEPRECATION :
+								return 110;
 							case IDelta.CHECKED_EXCEPTION :
 								return 85;
 							case IDelta.TYPE_PARAMETERS :
@@ -437,6 +476,8 @@ public class Messages extends NLS {
 								return 90;
 							case IDelta.UNCHECKED_EXCEPTION :
 								return 91;
+							case IDelta.DEPRECATION :
+								return 111;
 						}
 					}
 				break;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/comparatormessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/comparatormessages.properties
index de8aff4..d76582c 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/comparatormessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/comparatormessages.properties
@@ -9,5 +9,5 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 ClassFileComparator_0=Problems encountered comparing class file: {0}
-ClassFileComparator_1=Could not find package {0} in profile {1} from component {2} during type lookup
-ClassFileComparator_2=Could not find type {0} in profile {1} from component {2} during type lookup
\ No newline at end of file
+ClassFileComparator_1=Could not find package {0} in baseline {1} from component {2} during type lookup
+ClassFileComparator_2=Could not find type {0} in baseline {1} from component {2} during type lookup
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
index 7a8d512..705a2a4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/compatible_delta_messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -218,4 +218,8 @@
 # {0} type name
 108 = Restrictions have been added for type {0}
 # {0} type name, {1} component id
-109 = The re-exported type {0} has been added to {1}
\ No newline at end of file
+109 = The re-exported type {0} has been added to {1}
+# {0} given element
+110=The deprecation modifiers has been added to {0}
+# {0} given element
+111=The deprecation modifiers has been removed from {0}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/coremessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/coremessages.properties
index 476b4f3..89a6014 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/coremessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/coremessages.properties
@@ -15,3 +15,4 @@ ApiBaseline_2=Error occurred while binding execution environment
 ApiBaseline_3=Baseline not bound to execution environment
 ApiBaseline_4=Baseline has bundles requiring unavailable execution environments
 ApiBaseline_5={0} is unavailable
+ProjectComponent_could_not_locate_model=Could not locate the plugin model base for project: {0}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/descriptors/ComponentDescriptorImpl.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/descriptors/ComponentDescriptorImpl.java
index 5e475a1..22ed21c 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/descriptors/ComponentDescriptorImpl.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/descriptors/ComponentDescriptorImpl.java
@@ -24,14 +24,17 @@ import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescri
 public class ComponentDescriptorImpl extends NamedElementDescriptorImpl implements IComponentDescriptor {
 
 	private String componentid = null;
+	private String version = null;
 	
 	/**
 	 * Constructor
 	 * @param componentid
 	 */
-	public ComponentDescriptorImpl(String componentid) {
+	public ComponentDescriptorImpl(String componentid, String version) {
 		super(componentid);
 		this.componentid = componentid;
+		this.version = version;
+		
 	}
 	
 	/* (non-Javadoc)
@@ -45,7 +48,11 @@ public class ComponentDescriptorImpl extends NamedElementDescriptorImpl implemen
 	 * @see java.lang.Object#hashCode()
 	 */
 	public int hashCode() {
-		return this.componentid.hashCode();
+		int hc = 0;
+		if (version != null) {
+			hc = version.hashCode();
+		}
+		return this.componentid.hashCode() + hc;
 	}
 	
 	/* (non-Javadoc)
@@ -53,7 +60,13 @@ public class ComponentDescriptorImpl extends NamedElementDescriptorImpl implemen
 	 */
 	public boolean equals(Object obj) {
 		if(obj instanceof IComponentDescriptor) {
-			return this.componentid.equals(((IComponentDescriptor)obj).getId());
+			if (this.componentid.equals(((IComponentDescriptor)obj).getId())) {
+				if (this.version == null) {
+					return ((IComponentDescriptor)obj).getVersion() == null;
+				} else {
+					return this.version.equals(((IComponentDescriptor)obj).getVersion());
+				}
+			}
 		}
 		return false;
 	}
@@ -78,5 +91,12 @@ public class ComponentDescriptorImpl extends NamedElementDescriptorImpl implemen
 	public String toString() {
 		return this.componentid;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor#getVersion()
+	 */
+	public String getVersion() {
+		return version;
+	}
 	
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiComponent.java
deleted file mode 100644
index 4b5c5c8..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiComponent.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.model;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.problems.ApiProblemFilter;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.Factory;
-import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
-import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
-import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
-import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
-import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
-import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
-
-/**
- * Common implementation of an API component as a composite class file container.
- * 
- * @since 1.0.0
- */
-public abstract class AbstractApiComponent extends AbstractApiTypeContainer implements IApiComponent {
-	/**
-	 * API description
-	 */
-	private IApiDescription fApiDescription = null;
-		
-	/**
-	 * Api Filter store
-	 */
-	private IApiFilterStore fFilterStore = null;
-	
-	/**
-	 * Constructs an API component in the given {@link IApiBaseline}.
-	 * 
-	 * @param baseline the parent {@link IApiBaseline}
-	 */
-	public AbstractApiComponent(IApiBaseline baseline) {
-		super(baseline, IApiElement.COMPONENT, null);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.model.component.IClassFileContainer#accept(org.eclipse.pde.api.tools.model.component.ClassFileContainerVisitor)
-	 */
-	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
-		if (visitor.visit(this)) {
-			super.accept(visitor);
-		}
-		visitor.end(this);
-	}	
-		
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getHost()
-	 */
-	public IApiComponent getHost() throws CoreException {
-		return null;
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiComponent#getBaseline()
-	 */
-	public IApiBaseline getBaseline() {
-		return (IApiBaseline) getAncestor(IApiElement.BASELINE);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#dispose()
-	 */
-	public void dispose() {
-		try {
-			close();
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
-		}
-		fApiDescription = null;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.model.ApiElement#getApiComponent()
-	 */
-	public IApiComponent getApiComponent() {
-		return this;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#getApiDescription()
-	 */
-	public synchronized IApiDescription getApiDescription() throws CoreException {
-		if (fApiDescription == null) {
-			fApiDescription = createApiDescription();
-		}
-		return fApiDescription;
-	}
-	
-	/**
-	 * Returns whether this component has created an API description.
-	 * 
-	 * @return whether this component has created an API description
-	 */
-	protected synchronized boolean isApiDescriptionInitialized() {
-		return fApiDescription != null;
-	}
-
-	/**
-	 * Returns if this component has created an API filter store
-	 * 
-	 * @return true if a store has been created, false other wise
-	 */
-	protected synchronized boolean hasApiFilterStore() {
-		return fFilterStore != null;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeContainer#getApiTypeContainers()
-	 */
-	public synchronized IApiTypeContainer[] getApiTypeContainers() throws CoreException {
-		return super.getApiTypeContainers();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeContainer#getApiTypeContainers()
-	 */
-	public synchronized IApiTypeContainer[] getApiTypeContainers(String id) throws CoreException {
-		if (this.hasFragments()) {
-			return super.getApiTypeContainers(id);
-		} else {
-			return super.getApiTypeContainers();
-		}
-	}
-	
-	/**
-	 * Creates and returns the API description for this component.
-	 * 
-	 * @return newly created API description for this component
-	 */
-	protected abstract IApiDescription createApiDescription() throws CoreException;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.IApiComponent#getFilterStore()
-	 */
-	public IApiFilterStore getFilterStore() throws CoreException {
-		if(fFilterStore == null) {
-			fFilterStore = createApiFilterStore();
-		}
-		return fFilterStore;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiComponent#newProblemFilter(org.eclipse.pde.api.tools.internal.provisional.IApiProblem)
-	 */
-	public IApiProblemFilter newProblemFilter(IApiProblem problem) throws CoreException {
-		//TODO either expose a way to make problems or change the method to accept the parts of a problem
-		return new ApiProblemFilter(getId(), problem);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getHandle()
-	 */
-	public IElementDescriptor getHandle() throws CoreException {
-		return Factory.componentDescriptor(this.getId());
-	}
-	
-	/**
-	 * Lazily creates a new {@link IApiFilterStore} when it is requested
-	 * 
-	 * @return the current {@link IApiFilterStore} for this component
-	 * @throws CoreException
-	 */
-	protected abstract IApiFilterStore createApiFilterStore() throws CoreException;	
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
index ecaba78..9d22ffc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeContainer.java
@@ -64,6 +64,9 @@ public abstract class AbstractApiTypeContainer extends ApiElement implements IAp
 		if (fApiTypeContainers == null) {
 			return;
 		}
+		//clean component cache elements
+		ApiModelCache.getCache().removeElementInfo(this);
+		
 		MultiStatus multi = null;
 		IStatus single = null;
 		IApiTypeContainer[] containers = getApiTypeContainers();
@@ -113,7 +116,7 @@ public abstract class AbstractApiTypeContainer extends ApiElement implements IAp
 		for (int i = 0; i < containers.length; i++) {
 			comp = (IApiComponent) containers[i].getAncestor(IApiElement.COMPONENT);
 			if(comp != null) {
-				origin = comp.getId();
+				origin = comp.getSymbolicName();
 			}
 			if (origin == null) {
 				IApiTypeRoot file = containers[i].findTypeRoot(qualifiedName);
@@ -177,7 +180,7 @@ public abstract class AbstractApiTypeContainer extends ApiElement implements IAp
 		IApiTypeContainer container = null;
 		for (Iterator iterator = this.fApiTypeContainers.iterator(); iterator.hasNext(); ) {
 			container = (IApiTypeContainer) iterator.next();
-			origin = ((IApiComponent)container.getAncestor(IApiElement.COMPONENT)).getId();
+			origin = ((IApiComponent)container.getAncestor(IApiElement.COMPONENT)).getSymbolicName();
 			if (origin != null && origin.equals(id)) {
 				containers.add(container);
 			}
@@ -213,5 +216,12 @@ public abstract class AbstractApiTypeContainer extends ApiElement implements IAp
 			fApiTypeContainers.add(containers[i]);
 		}
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return 0;
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeRoot.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeRoot.java
index 77b122c..5e0831f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeRoot.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/AbstractApiTypeRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,12 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.model;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
-import org.eclipse.pde.api.tools.internal.util.Util;
 
 /**
  * Common implementation for {@link IApiTypeRoot}
@@ -40,35 +36,27 @@ public abstract class AbstractApiTypeRoot extends ApiElement implements IApiType
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeRoot#getContents()
 	 */
-	public byte[] getContents() throws CoreException {
-		InputStream inputStream = getInputStream();
-		try {
-			return Util.getInputStreamAsByteArray(inputStream, -1);
-		} catch (IOException e) {
-			abort("Unable to read class file: " + getTypeName(), e); //$NON-NLS-1$
-			return null; // never gets here
-		} finally {
-			try {
-				inputStream.close();
-			} catch(IOException e) {
-				ApiPlugin.log(e);
-			}
-		}
-	}
-	
-	/**
-	 * Returns an input stream for reading this {@link IApiTypeRoot}. Clients are responsible
-	 * for closing the input stream.
-	 * 
-	 * @return input stream
-	 */
-	public abstract InputStream getInputStream() throws CoreException;	
+	public abstract byte[] getContents() throws CoreException;
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeRoot#getStructure()
 	 */
 	public IApiType getStructure() throws CoreException {
-		return TypeStructureBuilder.buildTypeStructure(getContents(), getApiComponent(), this);
+		ApiModelCache cache = ApiModelCache.getCache();
+		IApiComponent comp = getApiComponent();
+		IApiType type = null;
+		if(comp != null) {
+			IApiBaseline baseline = comp.getBaseline();
+			type = (IApiType) cache.getElementInfo(baseline.getName(), comp.getSymbolicName(), this.getTypeName(), IApiElement.TYPE);
+		}
+		if(type == null) {
+			type = TypeStructureBuilder.buildTypeStructure(getContents(), getApiComponent(), this);
+			if(type == null) {
+				return null;
+			}
+			cache.cacheElementInfo(type);
+		}
+		return type;
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
index d7303bd..034a419 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiBaseline.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -254,28 +254,31 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	 */
 	private void initialize(Properties profile, ExecutionEnvironmentDescription description) throws CoreException {
 		String value = profile.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
-		Dictionary dictionary = new Hashtable();
 		String[] systemPackages = null;
 		if (value != null) {
 			systemPackages = value.split(","); //$NON-NLS-1$
-			dictionary.put(Constants.FRAMEWORK_SYSTEMPACKAGES, value);
-		}
-		value = profile.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
-		if (value != null) {
-			dictionary.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, value);
 		}
-		fExecutionEnvironment = profile.getProperty("osgi.java.profile.name"); //$NON-NLS-1$
-		if (fExecutionEnvironment == null) {
-			abort("Profile file missing 'osgi.java.profile.name'" , null); //$NON-NLS-1$
+		if (!(this instanceof WorkspaceBaseline)) {	
+			Dictionary dictionary = new Hashtable();
+			dictionary.put(Constants.FRAMEWORK_SYSTEMPACKAGES, value);
+			value = profile.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
+			if (value != null) {
+				dictionary.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, value);
+			}
+			fExecutionEnvironment = profile.getProperty("osgi.java.profile.name"); //$NON-NLS-1$
+			if (fExecutionEnvironment == null) {
+				abort("Profile file missing 'osgi.java.profile.name'" , null); //$NON-NLS-1$
+			}
+			dictionary.put("osgi.os", ANY_VALUE); //$NON-NLS-1$
+			dictionary.put("osgi.arch", ANY_VALUE); //$NON-NLS-1$
+			dictionary.put("osgi.ws", ANY_VALUE); //$NON-NLS-1$
+			dictionary.put("osgi.nl", ANY_VALUE); //$NON-NLS-1$
+			
+			getState().setPlatformProperties(dictionary);
 		}
-		dictionary.put("osgi.os", ANY_VALUE); //$NON-NLS-1$
-		dictionary.put("osgi.arch", ANY_VALUE); //$NON-NLS-1$
-		dictionary.put("osgi.ws", ANY_VALUE); //$NON-NLS-1$
-		dictionary.put("osgi.nl", ANY_VALUE); //$NON-NLS-1$
-		getState().setPlatformProperties(dictionary);
 		// clean up previous system library
 		if (fSystemLibraryComponent != null && fComponentsById != null) {
-			fComponentsById.remove(fSystemLibraryComponent.getId());
+			fComponentsById.remove(fSystemLibraryComponent.getSymbolicName());
 		}
 		if(fSystemPackageNames != null) {
 			fSystemPackageNames.clear();
@@ -301,16 +304,16 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	 * Adds an {@link IApiComponent} to the fComponentsById mapping
 	 * @param component
 	 */
-	private void addComponent(IApiComponent component) throws CoreException {
+	protected void addComponent(IApiComponent component) throws CoreException {
 		if(component == null) {
 			return;
 		}
 		if(fComponentsById == null) {
 			fComponentsById = new HashMap();
 		}
-		fComponentsById.put(component.getId(), component);
-		if (component instanceof PluginProjectApiComponent) {
-			PluginProjectApiComponent projectApiComponent = (PluginProjectApiComponent) component;
+		fComponentsById.put(component.getSymbolicName(), component);
+		if (component instanceof ProjectComponent) {
+			ProjectComponent projectApiComponent = (ProjectComponent) component;
 			if (this.fComponentsByProjectNames == null) {
 				this.fComponentsByProjectNames = new HashMap();
 			}
@@ -324,7 +327,7 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	public void addApiComponents(IApiComponent[] components) throws CoreException {
 		HashSet ees = new HashSet();
 		for (int i = 0; i < components.length; i++) {
-			BundleApiComponent component = (BundleApiComponent) components[i];
+			BundleComponent component = (BundleComponent) components[i];
 			if (component.isSourceComponent()) {
 				continue;
 			}
@@ -341,7 +344,7 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	 * Resolves and initializes the system library to use based on API component requirements.
 	 * Only works when running in the framework. Has no effect if not running in the framework.
 	 */
-	private void resolveSystemLibrary(HashSet ees) {
+	protected void resolveSystemLibrary(HashSet ees) {
 		if (ApiPlugin.isRunningInFramework() && fAutoResolve) {
 			IStatus error = null;
 			IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
@@ -526,8 +529,8 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	 * @throws CoreException
 	 */
 	private void resolvePackage0(IApiComponent component, String packageName, List componentsList) throws CoreException {
-		if (component instanceof BundleApiComponent) {
-			BundleDescription bundle = ((BundleApiComponent)component).getBundleDescription();
+		if (component instanceof BundleComponent) {
+			BundleDescription bundle = ((BundleComponent)component).getBundleDescription();
 			if (bundle != null) {
 				StateHelper helper = getState().getStateHelper();
 				ExportPackageDescription[] visiblePackages = helper.getVisiblePackages(bundle);
@@ -609,7 +612,7 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	}
 	
 	/**
-	 * @return the OSGi state for this {@link IApiProfile}
+	 * @return the OSGi state for this {@link IApiBaseline}
 	 * @nooverride This method is not intended to be re-implemented or extended by clients.
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
@@ -710,9 +713,18 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 			//already disposed or nothing to dispose
 			return;
 		}
+		doDispose();
+		fState = null;
+	}
+
+	/**
+	 * performs the actual dispose of mappings and cached elements
+	 */
+	protected void doDispose() {
 		if (ApiPlugin.isRunningInFramework()) {
 			JavaRuntime.removeVMInstallChangedListener(this);
 		}
+		clearCachedElements();
 		IApiComponent[] components = getApiComponents();
 		for (int i = 0; i < components.length; i++) {
 			components[i].dispose();
@@ -733,19 +745,27 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 			fSystemLibraryComponent.dispose();
 			fSystemLibraryComponent = null;
 		}
-		fState = null;
 	}
-
+	
 	/**
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline#close()
 	 */
 	public void close() throws CoreException {
+		clearCachedElements();
 		IApiComponent[] components = getApiComponents();
 		for (int i = 0; i < components.length; i++) {
 			components[i].close();
 		}
 	}
 
+	/**
+	 * Clears all element infos from the cache for this baseline
+	 * @since 1.1
+	 */
+	void clearCachedElements() {
+		ApiModelCache.getCache().removeElementInfo(this);
+	}
+	
 	/* (non-Javadoc)
 	 * @see IApiBaseline#getDependentComponents(IApiComponent[])
 	 */
@@ -783,8 +803,8 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 		ArrayList bundles = new ArrayList(components.length);
 		for (int i = 0; i < components.length; i++) {
 			IApiComponent component = components[i];
-			if (component instanceof BundleApiComponent) {
-				bundles.add(((BundleApiComponent)component).getBundleDescription());
+			if (component instanceof BundleComponent) {
+				bundles.add(((BundleComponent)component).getBundleDescription());
 			}
 		}
 		return bundles;
@@ -901,6 +921,10 @@ public class ApiBaseline extends ApiElement implements IApiBaseline, IVMInstallC
 	public void setLocation(String location) {
 		this.fLocation = location;
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline#getApiComponent(org.eclipse.core.resources.IProject)
+	 */
 	public IApiComponent getApiComponent(IProject project) {
 		loadBaselineInfos();
 		if(fComponentsByProjectNames == null) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiElement.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiElement.java
index f2b0d14..7d0707a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiElement.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiElement.java
@@ -101,6 +101,6 @@ public abstract class ApiElement implements IApiElement {
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiElement#getApiComponent()
 	 */
 	public IApiComponent getApiComponent() {
-		return null;
+		return (IApiComponent) getAncestor(COMPONENT);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java
new file mode 100644
index 0000000..a253aec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelCache.java
@@ -0,0 +1,370 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.internal.core.OverflowingLRUCache;
+import org.eclipse.jdt.internal.core.util.LRUCache;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+
+/**
+ * Manages the caches of {@link IApiElement}s
+ * 
+ * @since 1.0.2
+ */
+public final class ApiModelCache {
+
+	/**
+	 * Cache used for {@link IApiElement}s
+	 */
+	class Cache extends OverflowingLRUCache {
+
+		/**
+		 * Constructor
+		 * @param size
+		 * @param overflow
+		 */
+		public Cache(int size, int overflow) {
+			super(size, overflow);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.internal.core.OverflowingLRUCache#close(org.eclipse.jdt.internal.core.util.LRUCache.LRUCacheEntry)
+		 */
+		protected boolean close(LRUCacheEntry entry) {
+			return true;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jdt.internal.core.OverflowingLRUCache#newInstance(int, int)
+		 */
+		protected LRUCache newInstance(int size, int newOverflow) {
+			return new Cache(size, newOverflow);
+		}
+		
+		/**
+		 * Returns if the cache has any elements in it or not
+		 * 
+		 * @return true if the cache has no entries, false otherwise
+		 */
+		public boolean isEmpty() {
+			return !keys().hasMoreElements();
+		}
+	}
+	
+	static final int DEFAULT_CACHE_SIZE = 100;
+	static final int DEFAULT_OVERFLOW = (int)(DEFAULT_CACHE_SIZE * 0.1f);
+	static ApiModelCache fInstance = null;
+	
+	Cache fRootCache = null;
+	Cache fMemberTypeCache = null;
+	
+	/**
+	 * Constructor - no instantiation
+	 */
+	private ApiModelCache() {}
+	
+	/**
+	 * Returns the singleton instance of this cache
+	 * 
+	 * @return the cache
+	 */
+	public static synchronized ApiModelCache getCache() {
+		if(fInstance == null) {
+			fInstance = new ApiModelCache();
+		}
+		return fInstance;
+	}
+	
+	/**
+	 * Returns the key to use in a cache. The key is of the form:
+	 * <code>[baselineid].[componentid].[typename]</code><br>
+	 * 
+	 * @param baseline
+	 * @param component
+	 * @param typename
+	 * @return the member type cache key to use
+	 */
+	private String getCacheKey(String baseline, String component, String typename) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(baseline).append('.').append(component).append('.').append(typename);
+		return buffer.toString();
+	}
+	
+	/**
+	 * Caches the given {@link IApiElement} in the correct cache based on its type.
+	 * 
+	 * @param element the element to cache
+	 * @throws CoreException if there is a problem accessing any of the {@link IApiElement} info
+	 * in order to cache it - pass the exception along.
+	 */
+	public void cacheElementInfo(IApiElement element) throws CoreException {
+		switch(element.getType()) {
+			case IApiElement.TYPE: {
+				if(fRootCache == null) {
+					fRootCache = new Cache(DEFAULT_CACHE_SIZE, DEFAULT_OVERFLOW);
+				}
+				IApiComponent comp = element.getApiComponent();
+				if(comp != null) {
+					IApiBaseline baseline = comp.getBaseline();
+					String id = comp.getSymbolicName();
+					if(id == null) {
+						return;
+					}
+					Cache compcache = (Cache) fRootCache.get(baseline.getName());
+					if(compcache == null) {
+						compcache = new Cache(DEFAULT_CACHE_SIZE, DEFAULT_OVERFLOW);
+						fRootCache.put(baseline.getName(), compcache);
+					}
+					Cache typecache = (Cache) compcache.get(id);
+					if(typecache == null) {
+						typecache = new Cache(DEFAULT_CACHE_SIZE, DEFAULT_OVERFLOW);
+						compcache.put(comp.getSymbolicName(), typecache);
+					}
+					ApiType type = (ApiType) element;
+					if(type.isMemberType() || isMemberType(type.getName()) /*cache even a root type with a '$' in its name here as well*/) {
+						if(this.fMemberTypeCache == null) {
+							this.fMemberTypeCache = new Cache(DEFAULT_CACHE_SIZE, DEFAULT_OVERFLOW);
+						}
+						String key = getCacheKey(baseline.getName(), id, getRootName(type.getName()));
+						Cache mcache = (Cache) this.fMemberTypeCache.get(key);
+						if(mcache == null) {
+							mcache = new Cache(DEFAULT_CACHE_SIZE, DEFAULT_OVERFLOW);
+							this.fMemberTypeCache.put(key, mcache);
+						}
+						mcache.put(type.getName(), type);
+					}
+					else {
+						typecache.put(element.getName(), element);
+					}
+				}
+				break;
+			}
+		}
+	}
+	
+	/**
+	 * Returns the root type name assuming that the '$' char is a member type boundary 
+	 * @param typename
+	 * @return the pruned name or the original name
+	 */
+	private String getRootName(String typename) {
+		int idx = typename.indexOf('$');
+		if(idx > -1) {
+			return typename.substring(0, idx);
+		}
+		return typename;
+	}
+	
+	/**
+	 * Method to see if the type boundary char appears in the type name
+	 * @param typename
+	 * @return true if the type name contains '$' false otherwise
+	 */
+	private boolean isMemberType(String typename) {
+		return typename.indexOf('$') > -1;
+	}
+	
+	/**
+	 * Returns the {@link IApiElement} infos for the element referenced by the given 
+	 * identifier and of the given type.
+	 * 
+	 * @param baselineid the id of the baseline the component + element belongs to
+	 * @param componentid the id of the {@link IApiComponent} the element resides in
+	 * @param identifier for example the qualified name of the type or the id of an API component
+	 * @param type the kind of the element to look for info for
+	 * 
+	 * @return the cached {@link IApiElement} or <code>null</code> if no such element is cached
+	 */
+	public IApiElement getElementInfo(String baselineid, String componentid, String identifier, int type) {
+		if(baselineid == null || componentid == null) {
+			return null;
+		}
+		switch(type) {
+			case IApiElement.TYPE: {
+				if(isMemberType(identifier)) {
+					if(this.fMemberTypeCache != null) {
+						Cache mcache = (Cache) this.fMemberTypeCache.get(getCacheKey(baselineid, componentid, getRootName(identifier)));
+						if(mcache != null) {
+							return (IApiElement) mcache.get(identifier);
+						}
+					}
+				}
+				else {
+					if(this.fRootCache != null) {
+						Cache compcache = (Cache) fRootCache.get(baselineid);
+						if(compcache != null) {
+							Cache typecache = (Cache) compcache.get(componentid);
+							if(typecache != null && identifier != null) {
+								return (IApiElement) typecache.get(identifier);
+							}
+						}
+					}
+				}
+				break;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Removes the {@link IApiElement} from the given component (given its id) with
+	 * the given identifier and of the given type.
+	 * 
+	 * @param componentid the id of the component the element resides in
+	 * @param identifier the id (name) of the element to remove
+	 * @param type the type of the element (TYPE, METHOD, FIELD, etc)
+	 * 
+	 * @return true if the element was removed, false otherwise
+	 */
+	public boolean removeElementInfo(String baselineid, String componentid, String identifier, int type) {
+		if(baselineid == null) {
+			return false;
+		}
+		switch(type) {
+			case IApiElement.TYPE: {
+				if(componentid != null && identifier != null) {
+					boolean removed = true;
+					//clean member type cache
+					if(this.fMemberTypeCache != null) {
+						if(isMemberType(identifier)) {
+							Cache mcache = (Cache) this.fMemberTypeCache.get(getCacheKey(baselineid, componentid, getRootName(identifier)));
+							if(mcache != null) {
+								return mcache.remove(identifier) != null;
+							}
+						}
+						else {
+							this.fMemberTypeCache.remove(getCacheKey(baselineid, componentid, getRootName(identifier)));
+						}
+					}
+					if(fRootCache != null) {
+						Cache compcache = (Cache) fRootCache.get(baselineid);
+						if(compcache != null) {
+							Cache typecache = (Cache) compcache.get(componentid);
+							if(typecache != null) {
+								removed &= typecache.remove(identifier) != null;
+								if(typecache.isEmpty()) {
+									removed &= compcache.remove(componentid) != null;
+								}
+								if(compcache.isEmpty()) {
+									removed &= fRootCache.remove(baselineid) != null;
+								}
+								return removed;
+							}
+							
+						}
+					}
+					else {
+						return false;
+					}
+				}
+				break;
+			}
+			case IApiElement.COMPONENT: {
+				flushMemberCache();
+				if(fRootCache != null && componentid != null) {
+					Cache compcache = (Cache) fRootCache.get(baselineid);
+					if(compcache != null) {
+						boolean removed = compcache.remove(componentid) != null;
+						if(compcache.isEmpty()) {
+							removed &= fRootCache.remove(baselineid) != null;
+						}
+						return removed;
+					}
+				}
+				break;
+			}
+			case IApiElement.BASELINE: {
+				flushMemberCache();
+				if(fRootCache != null) {
+					return fRootCache.remove(baselineid) != null;
+				}
+				break;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Removes the given {@link IApiElement} info from the cache and returns it if present
+	 * @param element
+	 * @return true if the {@link IApiElement} was removed false otherwise
+	 * @throws CoreException if there is a problem accessing any of the {@link IApiElement} info
+	 * in order to remove it from the cache - pass the exception along.
+	 */
+	public boolean removeElementInfo(IApiElement element) {
+		if(element == null) {
+			return false;
+		}
+ 		switch(element.getType()) {
+			case IApiElement.COMPONENT:
+			case IApiElement.TYPE: {
+				if(fRootCache != null) {
+					IApiComponent comp = element.getApiComponent();
+					if(comp != null) {
+						try {
+							IApiBaseline baseline = comp.getBaseline();
+							return removeElementInfo(baseline.getName(), comp.getSymbolicName(), element.getName(), element.getType());
+						}
+						catch(CoreException ce) {}
+					}
+				}
+				break;
+			}
+			case IApiElement.BASELINE: {
+				flushMemberCache();
+				if(fRootCache != null) {
+					IApiBaseline baseline = (IApiBaseline) element;
+					return fRootCache.remove(baseline.getName()) != null;
+				}
+				break;
+			}
+		}
+		return false;
+	}
+	
+	/**
+	 * Clears out all cached information.
+	 */
+	public void flushCaches() {
+		if(fRootCache != null) {
+			fRootCache.flush();
+		}
+		flushMemberCache();
+	}
+	
+	/**
+	 * Flushes the cache of member types
+	 */
+	private void flushMemberCache() {
+		if(this.fMemberTypeCache != null) {
+			this.fMemberTypeCache.flush();
+		}
+	}
+	
+	/**
+	 * Returns if the cache has any elements in it or not
+	 * 
+	 * @return true if the cache has no entries, false otherwise
+	 */
+	public boolean isEmpty() {
+		boolean empty = true;
+		if(fRootCache != null) {
+			empty &= fRootCache.isEmpty();
+		}
+		if(this.fMemberTypeCache != null) {
+			empty &= this.fMemberTypeCache.isEmpty();
+		}
+		return empty;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java
index da06975..3e4e801 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java
@@ -22,7 +22,6 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
 
 /**
  * Utility class for creating new {@link org.eclipse.pde.api.tools.internal.provisional.model.IApiElement}s
@@ -45,35 +44,35 @@ public class ApiModelFactory {
 	}
 	
 	/**
-	 * Creates and returns a new API component for this profile at the specified
+	 * Creates and returns a new API component for this baseline at the specified
 	 * location or <code>null</code> if the location specified does not contain
-	 * a valid API component. The component is not added to the profile.
+	 * a valid API component. The component is not added to the baseline.
 	 * 
 	 * @param location absolute path in the local file system to the API component
 	 * @return API component or <code>null</code> if the location specified does not contain a valid
 	 * 	API component
 	 * @exception CoreException if unable to create the component
 	 */
-	public static IApiComponent newApiComponent(IApiBaseline profile, String location) throws CoreException {
-		BundleApiComponent component = new BundleApiComponent(profile, location);
+	public static IApiComponent newApiComponent(IApiBaseline baseline, String location) throws CoreException {
+		BundleComponent component = new BundleComponent(baseline, location, getBundleID());
 		if(component.isValidBundle()) {
-			component.init(getBundleID());
 			return component;
 		}
 		return null;
 	}
 	
 	/**
-	 * Creates and returns a new API component for this profile based on the given
+	 * Creates and returns a new API component for this baseline based on the given
 	 * model or <code>null</code> if the given model cannot be resolved or does not contain
-	 * a valid API component. The component is not added to the profile.
+	 * a valid API component. The component is not added to the baseline.
 	 *
+	 * @param baseline
 	 * @param model the given model
 	 * @return API component or <code>null</code> if the given model cannot be resolved or does not contain
 	 * a valid API component
 	 * @exception CoreException if unable to create the component
 	 */
-	public static IApiComponent newApiComponent(IApiBaseline profile, IPluginModelBase model) throws CoreException {
+	public static IApiComponent newApiComponent(IApiBaseline baseline, IPluginModelBase model) throws CoreException {
 		BundleDescription bundleDescription = model.getBundleDescription();
 		if (bundleDescription == null) {
 			return null;
@@ -82,46 +81,24 @@ public class ApiModelFactory {
 		if (location == null) {
 			return null;
 		}
-		BundleApiComponent component = null;
-		IPluginModelBase model2 = getProjectModel(location);
-		if (model2 != null && model == model2) {
-			if (isBinaryProject(location)) {
-				component = new BundleApiComponent(profile, location);
-			} else {
-				component = new PluginProjectApiComponent(profile, location, model);
-			}
+		BundleComponent component = null;
+		if (isBinaryProject(location)) {
+			component = new BundleComponent(baseline, location, getBundleID());
 		} else {
-			component = new BundleApiComponent(profile, location);
+			component = new ProjectComponent(baseline, location, model, getBundleID());
 		}
 		if(component.isValidBundle()) {
-			component.init(getBundleID());
 			return component;
 		}
 		return null;
 	}
 	
 	/**
-	 * Returns the plug-in model associated with the project at the specified location
-	 * or <code>null</code> if none (i.e. if its an external model).
-	 * 
-	 * @param project location
-	 * @return plug-in model or <code>null</code> if none
-	 */
-	private static IPluginModelBase getProjectModel(String location) {
-		String projectName = (new Path(location)).lastSegment();
-		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
-		if (project != null) {
-			return PluginRegistry.findModel(project); 
-		}
-		return null;
-	}
-	
-	/**
 	 * Returns if the specified location is an imported binary project.
 	 * <p>
 	 * We accept projects that are plug-ins even if not API enabled (i.e.
 	 * with API nature), as we still need them to make a complete
-	 * API profile without resolution errors.
+	 * API baseline without resolution errors.
 	 * </p> 
 	 * @param location
 	 * @return true if the location is an imported binary project, false otherwise
@@ -130,7 +107,7 @@ public class ApiModelFactory {
 	private static boolean isBinaryProject(String location) throws CoreException {
 		IPath path = new Path(location);
 		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
-		return project != null && Util.isBinaryProject(project);
+		return project != null && (!project.exists() || Util.isBinaryProject(project));
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
index 0a8de42..3ac3c4f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -203,7 +203,7 @@ public class ApiType extends ApiMember implements IApiType {
 			fMethods = new LinkedHashMap();
 		}
 		ApiMethod method = new ApiMethod(this, name, signature, genericSig, modifiers, exceptions);
-		fMethods.put(new MethodKey(name, signature), method);
+		fMethods.put(new MethodKey(getName(), name, signature, true), method);
 		return method;
 	}
 
@@ -230,7 +230,7 @@ public class ApiType extends ApiMember implements IApiType {
 	 */
 	public IApiMethod getMethod(String name, String signature) {
 		if (fMethods != null) {
-			return (IApiMethod) fMethods.get(new MethodKey(name, signature));
+			return (IApiMethod) fMethods.get(new MethodKey(getName(), name, signature, true));
 		}
 		return null;
 	}
@@ -507,10 +507,11 @@ public class ApiType extends ApiMember implements IApiType {
 	 * @see java.lang.Object#hashCode()
 	 */
 	public int hashCode() {
-		if (getApiComponent() == null) {
+		IApiComponent component = getApiComponent();
+		if (component == null) {
 			return getName().hashCode();
 		}
-		return getApiComponent().hashCode() + getName().hashCode();
+		return component.hashCode() + getName().hashCode();
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
index c2948b2..93e5320 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ArchiveApiTypeContainer.java
@@ -25,13 +25,15 @@ import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
+import org.eclipse.core.runtime.CoreException;
+
 /**
  * {@link IApiTypeContainer} container for an archive (jar or zip) file.
  * 
@@ -61,9 +63,9 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 		 */
 		public String getTypeName() {
 			if (fTypeName == null) {
-				fTypeName = getName().replace('/', '.').substring(0, getName().length() - Util.DOT_CLASS_SUFFIX.length()); 
+				fTypeName = getName().replace('/', '.').substring(0, getName().length() - Util.DOT_CLASS_SUFFIX.length());
 			}
-			return fTypeName; 
+			return fTypeName;
 		}
 
 		/* (non-Javadoc)
@@ -91,29 +93,66 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 			return getName().hashCode();
 		}
 
-		/**
-		 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeRoot#getInputStream()
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot#getContents()
 		 */
-		public InputStream getInputStream() throws CoreException {
+		public byte[] getContents() throws CoreException {
 			ArchiveApiTypeContainer archive = (ArchiveApiTypeContainer) getParent();
-			ZipFile zipFile = archive.open();
-			ZipEntry entry = zipFile.getEntry(getName());
-			if (entry != null) {
+			ZipFile zipFile;
+			try {
+				zipFile= new ZipFile(archive.fLocation);
+			} catch (IOException e) {
+				abort("Failed to open archive: " + archive.fLocation, e); //$NON-NLS-1$
+				return null;
+			}
+			try {
+				ZipEntry entry = zipFile.getEntry(getName());
+				InputStream stream = null;
+				if (entry != null) {
+					try {
+						stream = zipFile.getInputStream(entry);
+					} catch (IOException e) {
+						abort("Failed to open class file: " + getTypeName() + " in archive: " + archive.fLocation, e); //$NON-NLS-1$ //$NON-NLS-2$
+						return null;
+					}
+					try {
+						return Util.getInputStreamAsByteArray(stream, -1);
+					}
+					catch(IOException ioe) {
+						abort("Unable to read class file: " + getTypeName(), ioe); //$NON-NLS-1$
+						return null;
+					}
+					finally {
+						try {
+							stream.close();
+						} catch (IOException e) {
+							ApiPlugin.log(e);
+						}
+					}
+				}
+			} finally {
 				try {
-					return zipFile.getInputStream(entry);
+					zipFile.close();
 				} catch (IOException e) {
-					abort("Failed to open class file: " + getTypeName() + " in archive: " + archive.fLocation, e); //$NON-NLS-1$ //$NON-NLS-2$
+					abort("Failed to close class file archive", e); //$NON-NLS-1$
 				}
 			}
 			abort("Class file not found: " + getTypeName() + " in archive: " + archive.fLocation, null); //$NON-NLS-1$ //$NON-NLS-2$
 			return null;
 		}
+		
+		/* (non-Javadoc)
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return getTypeName();
+		}
 	}
 	
 	/**
 	 * Location of the archive in the local file system.
 	 */
-	private String fLocation;
+	String fLocation;
 	
 	/**
 	 * Cache of package names to class file paths in that package,
@@ -126,10 +165,6 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 	 */
 	private String[] fPackageNames;
 	
-	/**
-	 * Open zip file, or <code>null</code> if file is currently closed.
-	 */
-	private ZipFile fZipFile = null;
 
 	/**
 	 * Constructs an {@link IApiTypeContainer} container for the given jar or zip file
@@ -147,30 +182,33 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
 	 */
 	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
-		init();
-		List packages = new ArrayList(fPackages.keySet());
-		Collections.sort(packages);
-		Iterator iterator = packages.iterator();
-		while (iterator.hasNext()) {
-			String pkg = (String) iterator.next();
-			if (visitor.visitPackage(pkg)) {
-				List types = new ArrayList((Set) fPackages.get(pkg));
-				Iterator cfIterator = types.iterator();
-				List classFiles = new ArrayList(types.size());
-				while (cfIterator.hasNext()) {
-					String entryName = (String) cfIterator.next();
-					classFiles.add(new ArchiveApiTypeRoot(this, entryName));
-				}
-				Collections.sort(classFiles);
-				cfIterator = classFiles.iterator();
-				while (cfIterator.hasNext()) {
-					ArchiveApiTypeRoot classFile = (ArchiveApiTypeRoot) cfIterator.next();
-					visitor.visit(pkg, classFile);
-					visitor.end(pkg, classFile);
+		if(visitor.visit(this)) {
+			init();
+			List packages = new ArrayList(fPackages.keySet());
+			Collections.sort(packages);
+			Iterator iterator = packages.iterator();
+			while (iterator.hasNext()) {
+				String pkg = (String) iterator.next();
+				if (visitor.visitPackage(pkg)) {
+					List types = new ArrayList((Set) fPackages.get(pkg));
+					Iterator cfIterator = types.iterator();
+					List classFiles = new ArrayList(types.size());
+					while (cfIterator.hasNext()) {
+						String entryName = (String) cfIterator.next();
+						classFiles.add(new ArchiveApiTypeRoot(this, entryName));
+					}
+					Collections.sort(classFiles);
+					cfIterator = classFiles.iterator();
+					while (cfIterator.hasNext()) {
+						ArchiveApiTypeRoot classFile = (ArchiveApiTypeRoot) cfIterator.next();
+						visitor.visit(pkg, classFile);
+						visitor.end(pkg, classFile);
+					}
 				}
+				visitor.endVisitPackage(pkg);
 			}
-			visitor.endVisitPackage(pkg);
 		}
+		visitor.end(this);
 	}
 
 	/**
@@ -186,14 +224,6 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#close()
 	 */
 	public synchronized void close() throws CoreException {
-		if (fZipFile != null) {
-			try {
-				fZipFile.close();
-				fZipFile = null;
-			} catch (IOException e) {
-				abort("Failed to close class file archive", e); //$NON-NLS-1$
-			}
-		}
 	}
 
 	/**
@@ -239,46 +269,44 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 	 * @throws CoreException
 	 */
 	private synchronized void init() throws CoreException {
-		ZipFile zipFile = open();
 		if (fPackages == null) {
 			fPackages = new HashMap();
-			Enumeration entries = zipFile.entries();
-			while (entries.hasMoreElements()) {
-				ZipEntry entry = (ZipEntry) entries.nextElement();
-				String name = entry.getName();
-				if (name.endsWith(Util.DOT_CLASS_SUFFIX)) {
-					String pkg = Util.DEFAULT_PACKAGE_NAME;
-					int index = name.lastIndexOf('/');
-					if (index >= 0) {
-						pkg = name.substring(0, index).replace('/', '.');
-					}
-					Set fileNames = (Set) fPackages.get(pkg);
-					if (fileNames == null) {
-						fileNames = new HashSet();
-						fPackages.put(pkg, fileNames);
-					}
-					fileNames.add(name);
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Returns an open zip file for this archive.
-	 * 
-	 * @return zip file
-	 * @throws IOException if unable to open the archive
-	 */
-	private synchronized ZipFile open() throws CoreException {
-		if (fZipFile == null) {
+			ZipFile zipFile;
 			try {
-				fZipFile = new ZipFile(fLocation);
+				zipFile= new ZipFile(fLocation);
 			} catch (IOException e) {
 				abort("Failed to open archive: " + fLocation, e); //$NON-NLS-1$
+				return;
+			}
+			try {
+				Enumeration entries= zipFile.entries();
+				while (entries.hasMoreElements()) {
+					ZipEntry entry= (ZipEntry)entries.nextElement();
+					String name= entry.getName();
+					if (name.endsWith(Util.DOT_CLASS_SUFFIX)) {
+						String pkg= Util.DEFAULT_PACKAGE_NAME;
+						int index= name.lastIndexOf('/');
+						if (index >= 0) {
+							pkg= name.substring(0, index).replace('/', '.');
+						}
+						Set fileNames= (Set)fPackages.get(pkg);
+						if (fileNames == null) {
+							fileNames= new HashSet();
+							fPackages.put(pkg, fileNames);
+						}
+						fileNames.add(name);
+					}
+				}
+			} finally {
+				try {
+					zipFile.close();
+				} catch (IOException e) {
+					abort("Failed to close class file archive", e); //$NON-NLS-1$
+				}
 			}
 		}
-		return fZipFile;
 	}
+	
 
 	/* (non-Javadoc)
 	 * @see java.lang.Object#equals(java.lang.Object)
@@ -302,4 +330,11 @@ public class ArchiveApiTypeContainer extends ApiElement implements IApiTypeConta
 	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
 		return findTypeRoot(qualifiedName);
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return ARCHIVE;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleApiComponent.java
deleted file mode 100644
index 945c562..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleApiComponent.java
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.model;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.service.resolver.BundleSpecification;
-import org.eclipse.osgi.service.resolver.ExportPackageDescription;
-import org.eclipse.osgi.service.resolver.HostSpecification;
-import org.eclipse.osgi.service.resolver.ResolverError;
-import org.eclipse.osgi.service.resolver.StateObjectFactory;
-import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
-import org.eclipse.pde.api.tools.internal.ApiDescription;
-import org.eclipse.pde.api.tools.internal.ApiDescriptionProcessor;
-import org.eclipse.pde.api.tools.internal.BundleVersionRange;
-import org.eclipse.pde.api.tools.internal.CompositeApiDescription;
-import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
-import org.eclipse.pde.api.tools.internal.RequiredComponentDescription;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.Factory;
-import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
-import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
-import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
-import org.eclipse.pde.api.tools.internal.provisional.IRequiredComponentDescription;
-import org.eclipse.pde.api.tools.internal.provisional.ProfileModifiers;
-import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
-import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
-import org.eclipse.pde.api.tools.internal.util.SourceDefaultHandler;
-import org.eclipse.pde.api.tools.internal.util.Util;
-import org.eclipse.pde.internal.core.TargetWeaver;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Implementation of an API component based on a bundle in the file system.
- * 
- * @since 1.0.0
- */
-public class BundleApiComponent extends AbstractApiComponent {
-	
-	/**
-	 * Dictionary parsed from MANIFEST.MF
-	 */
-	private Dictionary fManifest;
-	
-	/**
-	 * Manifest headers that are maintained after {@link BundleDescription} creation.
-	 * Only these headers are maintained in the manifest dictionary to reduce footprint.  
-	 */
-	private static final String[] MANIFEST_HEADERS = new String[] {
-		IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE,
-		Constants.BUNDLE_CLASSPATH,
-		Constants.BUNDLE_NAME,
-		Constants.BUNDLE_VERSION
-	};
-	
-	/**
-	 * Whether there is an underlying .api_description file
-	 */
-	private boolean fHasApiDescription = false;
-	
-	/**
-	 * Root location of component in the file system
-	 */
-	private String fLocation;
-	
-	/**
-	 * Underlying bundle description (OSGi model of a bundle)
-	 */
-	private BundleDescription fBundleDescription;
-	
-	/**
-	 * Cached value for the lowest EEs
-	 */
-	private String[] lowestEEs;
-
-	/**
-	 * Constructs a new API component from the specified location in the file system
-	 * in the given profile.
-	 * 
-	 * @param profile owning profile
-	 * @param location directory or jar file
-	 * @exception CoreException if unable to create a component from the specified location
-	 */
-	public BundleApiComponent(IApiBaseline profile, String location) throws CoreException {
-		super(profile);
-		fLocation = location;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.descriptors.AbstractApiComponent#dispose()
-	 */
-	public void dispose() {
-		try {
-			super.dispose();
-		} finally {
-			synchronized(this) {
-				fManifest = null;
-				fBundleDescription = null;
-			}
-		}
-	}
-	
-	/**
-	 * Returns this bundle's manifest as a dictionary.
-	 * 
-	 * @return manifest dictionary
-	 * @exception CoreException if something goes terribly wrong
-	 */
-	protected synchronized Dictionary getManifest() throws CoreException {
-		if(fManifest == null) {
-			try {
-				fManifest = (Dictionary) loadManifest(new File(fLocation));
-			} catch (IOException e) {
-				abort("Unable to load manifest due to IO error", e); //$NON-NLS-1$
-			}
-		}
-		return fManifest;
-	}
-
-	/**
-	 * Reduce the manifest to only contain required headers after {@link BundleDescription} creation.
-	 */
-	protected synchronized void doManifestCompaction() throws CoreException {
-		Dictionary temp = fManifest;
-		fManifest = new Hashtable(MANIFEST_HEADERS.length);
-		for (int i = 0; i < MANIFEST_HEADERS.length; i++) {
-			String header = MANIFEST_HEADERS[i];
-			Object value = temp.get(header);
-			if (value != null) {
-				fManifest.put(header, value);
-			}
-		}
-	}
-	
-	/**
-	 * Returns if the bundle at the specified location is a valid bundle or not.
-	 * Validity is determined via the existence of a readable manifest file
-	 * @param location
-	 * @return true if the bundle at the given location is valid false otherwise
-	 * @throws IOException
-	 */
-	public boolean isValidBundle() throws CoreException {
-		Dictionary manifest = getManifest();
-		return manifest != null && (manifest.get(Constants.BUNDLE_NAME) != null && manifest.get(Constants.BUNDLE_VERSION) != null);
-	}
-	
-	/**
-	 * Initializes component state from the underlying bundle for the given
-	 * state.
-	 * 
-	 * @param state PDE state
-	 * @throws CoreException on failure
-	 */
-	protected synchronized void init(long bundleId) throws CoreException {
-		try {
-			Dictionary manifest = getManifest();
-			if (isBinaryBundle() && ApiBaselineManager.WORKSPACE_API_BASELINE_ID.equals(getBaseline().getName())) {
-				// must account for bundles in development mode - look for class files in output
-				// folders rather than jars
-				TargetWeaver.weaveManifest(manifest);
-			}
-			StateObjectFactory factory = StateObjectFactory.defaultFactory;
-			fBundleDescription = factory.createBundleDescription(((ApiBaseline)getBaseline()).getState(), manifest, fLocation, bundleId);
-			setName((String)getManifest().get(Constants.BUNDLE_NAME));
-		} catch (BundleException e) {
-			abort("Unable to create API component from specified location: " + fLocation, e); //$NON-NLS-1$
-		}
-		// compact manifest after initialization - only keep used headers
-		doManifestCompaction();
-	}
-	
-	/**
-	 * Returns whether this API component represents a binary bundle versus a project bundle.
-	 * 
-	 * @return whether this API component represents a binary bundle
-	 */
-	protected boolean isBinaryBundle() {
-		return true;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.AbstractApiComponent#createApiDescription()
-	 */
-	protected IApiDescription createApiDescription() throws CoreException {
-		BundleDescription[] fragments = getBundleDescription().getFragments();
-		if (fragments.length == 0) {
-			return createLocalApiDescription();
-		}
-		// build a composite description
-		IApiDescription[] descriptions = new IApiDescription[fragments.length + 1];
-		for (int i = 0; i < fragments.length; i++) {
-			BundleDescription fragment = fragments[i];
-			BundleApiComponent component = (BundleApiComponent) getBaseline().getApiComponent(fragment.getSymbolicName());
-			descriptions[i + 1] = component.getApiDescription();
-		}
-		descriptions[0] = createLocalApiDescription();
-		return new CompositeApiDescription(descriptions);
-	}
-
-	/**
-	 * Creates and returns this component's API description based on packages
-	 * supplied by this component, exported packages, and associated directives.
-	 * 
-	 * @return API description
-	 * @throws CoreException if unable to initialize 
-	 */
-	protected IApiDescription createLocalApiDescription() throws CoreException {
-		IApiDescription apiDesc = new ApiDescription(getId());
-		// first mark all packages as internal
-		initializeApiDescription(apiDesc, getBundleDescription(), getLocalPackageNames());
-		try {
-			String xml = loadApiDescription(new File(fLocation));
-			setHasApiDescription(xml != null);
-			if (xml != null) {
-				ApiDescriptionProcessor.annotateApiSettings(null, apiDesc, xml);
-			}
-		} catch (IOException e) {
-			abort("Unable to load .api_description file ", e); //$NON-NLS-1$
-		}
-		return apiDesc;
-	}
-	
-	/**
-	 * Returns the names of all packages that originate from this bundle.
-	 * Does not include packages that originate from fragments or a host.
-	 * 
-	 * @return local package names
-	 * @throws CoreException
-	 */
-	protected Set getLocalPackageNames() throws CoreException {
-		Set names = new HashSet();
-		IApiTypeContainer[] containers = getApiTypeContainers();
-		IApiComponent comp = null;
-		for (int i = 0; i < containers.length; i++) {
-			comp = (IApiComponent) containers[i].getAncestor(IApiElement.COMPONENT);
-			if (comp != null && comp.getId().equals(getId())) {
-				String[] packageNames = containers[i].getPackageNames();
-				for (int j = 0; j < packageNames.length; j++) {
-					names.add(packageNames[j]);
-				}
-			}
-		}
-		return names;
-	}	
-	
-
-	/**
-	 * Initializes the given API description based on package exports in the manifest.
-	 * The API description for a bundle only contains packages that originate from
-	 * this bundle (so a host will not contain API descriptions for packages that
-	 * originate from fragments). However, a host's API description will be represented
-	 * by a proxy that delegates to the host and all of its fragments to provide
-	 * a complete description of the host.
-	 * 
-	 * @param apiDesc API description to initialize
-	 * @param bundle the bundle to load from
-	 * @param packages the complete set of packages names originating from the backing
-	 * 		component
-	 * @throws CoreException if an error occurs
-	 */
-	public static void initializeApiDescription(IApiDescription apiDesc, BundleDescription bundle, Set packages) throws CoreException {
-		Iterator iterator = packages.iterator();
-		while (iterator.hasNext()) {
-			String name = (String) iterator.next();
-			apiDesc.setVisibility(Factory.packageDescriptor(name), VisibilityModifiers.PRIVATE);
-		}
-		// then process exported packages that originate from this bundle
-		// considering host and fragment package exports
-		List supplied = new ArrayList();
-		ExportPackageDescription[] exportPackages = bundle.getExportPackages();
-		addSuppliedPackages(packages, supplied, exportPackages);
-		HostSpecification host = bundle.getHost();
-		if (host != null) {
-			BundleDescription[] hosts = host.getHosts();
-			for (int i = 0; i < hosts.length; i++) {
-				addSuppliedPackages(packages, supplied, hosts[i].getExportPackages());
-			}
-		}
-		BundleDescription[] fragments = bundle.getFragments();
-		for (int i = 0; i < fragments.length; i++) {
-			addSuppliedPackages(packages, supplied, fragments[i].getExportPackages());
-		}
-		
-		annotateExportedPackages(apiDesc, (ExportPackageDescription[]) supplied.toArray(new ExportPackageDescription[supplied.size()]));
-	}
-
-	/**
-	 * Adds package exports to the given list if the associated package originates
-	 * from this bundle.
-	 *   
-	 * @param packages names of packages supplied by this bundle
-	 * @param supplied list to append package exports to
-	 * @param exportPackages package exports to consider
-	 */
-	protected static void addSuppliedPackages(Set packages, List supplied, ExportPackageDescription[] exportPackages) {
-		for (int i = 0; i < exportPackages.length; i++) {
-			ExportPackageDescription pkg = exportPackages[i];
-			String name = pkg.getName();
-			if (name.equals(".")) { //$NON-NLS-1$
-				// translate . to default package
-				name = Util.DEFAULT_PACKAGE_NAME;
-			}
-			if (packages.contains(name)) {
-				supplied.add(pkg);
-			}
-		}
-	}
-	
-	/**
-	 * Annotates the API description with exported packages.
-	 * 
-	 * @param apiDesc description to annotate
-	 * @param exportedPackages packages that are exported
-	 */
-	protected static void annotateExportedPackages(IApiDescription apiDesc, ExportPackageDescription[] exportedPackages) {
-		for(int i = 0; i < exportedPackages.length; i++) {
-			ExportPackageDescription pkg = exportedPackages[i];
-			boolean internal = ((Boolean) pkg.getDirective("x-internal")).booleanValue(); //$NON-NLS-1$
-			String[] friends = (String[]) pkg.getDirective("x-friends"); //$NON-NLS-1$
-			String pkgName = pkg.getName();
-			if (pkgName.equals(".")) { //$NON-NLS-1$
-				// default package
-				pkgName = ""; //$NON-NLS-1$
-			}
-			IPackageDescriptor pkgDesc = Factory.packageDescriptor(pkgName);
-			if(internal) {
-				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.PRIVATE);
-			}
-			if (friends != null) {
-				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.PRIVATE);
-				for(int j = 0; j < friends.length; j++) {
-					//annotate the api description for x-friends access levels
-					apiDesc.setAccessLevel(
-							Factory.componentDescriptor(friends[j]), 
-							Factory.packageDescriptor(pkgName), 
-							IApiAccess.FRIEND);
-				}
-			}
-			if (!internal && friends == null) {
-				//there could have been directives that have nothing to do with
-				//visibility, so we need to add the package as API in that case
-				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.API);
-			}
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.AbstractApiComponent#createApiFilterStore()
-	 */
-	protected IApiFilterStore createApiFilterStore() throws CoreException {
-		//always return a new empty store since we do not support filtering from bundles
-		return null;
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#createApiTypeContainers()
-	 */
-	protected synchronized List createApiTypeContainers() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		List containers = new ArrayList(5);
-		try {
-			List all = new ArrayList();
-			// build the classpath from bundle and all fragments
-			all.add(this);
-			boolean considerFragments = true;
-			if (Util.ORG_ECLIPSE_SWT.equals(getId())) {
-				// if SWT is a project to be built/analyzed don't consider its fragments
-				considerFragments = !isApiEnabled();
-			}
-			if (considerFragments) { 
-				BundleDescription[] fragments = fBundleDescription.getFragments();
-				for (int i = 0; i < fragments.length; i++) {
-					BundleDescription fragment = fragments[i];
-					BundleApiComponent component = (BundleApiComponent) getBaseline().getApiComponent(fragment.getSymbolicName());
-					if (component != null) {
-						// force initialization of the fragment so we can retrieve its class file containers
-						component.getApiTypeContainers();
-						all.add(component);
-					}
-				}
-			}
-			Iterator iterator = all.iterator();
-			Set entryNames = new HashSet(5);
-			BundleApiComponent other = null;
-			while (iterator.hasNext()) {
-				BundleApiComponent component = (BundleApiComponent) iterator.next();
-				String[] paths = getClasspathEntries(component.getManifest());
-				for (int i = 0; i < paths.length; i++) {
-					String path = paths[i];
-					// don't re-process the same entry twice (except default entries ".")
-					if (!(".".equals(path))) { //$NON-NLS-1$
-						if (entryNames.contains(path)) {
-							continue;
-						}
-					}
-					IApiTypeContainer container = component.createApiTypeContainer(path);
-					if (container == null) {
-						for(Iterator iter = all.iterator(); iter.hasNext();) {
-							other = (BundleApiComponent) iter.next();
-							if (other != component) {
-								container = other.createApiTypeContainer(path);
-							}
-						}
-					}
-					if (container != null) {
-						containers.add(container);
-						if (!(".".equals(path))) { //$NON-NLS-1$
-							entryNames.add(path);
-						}
-					}
-				}
-			}
-		} catch (BundleException e) {
-			abort("Unable to parse bundle classpath", e); //$NON-NLS-1$
-		} catch (IOException e) {
-			abort("Unable to initialize class file containers", e); //$NON-NLS-1$
-		}
-		return containers;
-	}
-	
-	/**
-	 * Returns whether this API component is enabled for API analysis by the API builder.
-	 * 
-	 * @return whether this API component is enabled for API analysis by the API builder.
-	 */
-	protected boolean isApiEnabled() {
-		return false;
-	}
-	
-	/**
-	 * Returns classpath entries defined in the given manifest.
-	 * 
-	 * @param manifest
-	 * @return classpath entries as bundle relative paths
-	 * @throws BundleException
-	 */
-	protected String[] getClasspathEntries(Dictionary manifest) throws BundleException {
-		ManifestElement[] classpath = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) manifest.get(Constants.BUNDLE_CLASSPATH));
-		String elements[] = null;
-		if (classpath == null) {
-			// default classpath is '.'
-			elements = new String[]{"."}; //$NON-NLS-1$
-		} else {
-			elements = new String[classpath.length];
-			for (int i = 0; i < classpath.length; i++) {
-				elements[i] = classpath[i].getValue();
-			}
-		}
-		return elements;
-	}
-	
-	/**
-	 * Creates and returns an {@link IApiTypeContainer} at the specified path in
-	 * this bundle, or <code>null</code> if the {@link IApiTypeContainer} does not
-	 * exist. The path is the name (path) of entries specified by the
-	 * <code>Bundle-ClassPath:</code> header.
-	 * 
-	 * @param path relative path to a class file container in this bundle
-	 * @return {@link IApiTypeContainer} or <code>null</code>
-	 * @exception IOException
-	 */
-	protected IApiTypeContainer createApiTypeContainer(String path) throws IOException, CoreException {
-		File bundle = new File(fLocation);
-		if (bundle.isDirectory()) {
-			// bundle is folder
-			File entry = new File(bundle, path);
-			if (entry.exists()) {
-				if (entry.isFile()) {
-					return new ArchiveApiTypeContainer(this, entry.getCanonicalPath());
-				} else {
-					return new DirectoryApiTypeContainer(this, entry.getCanonicalPath());
-				}
-			}
-		} else {
-			// bundle is jar'd
-			ZipFile zip = null;
-			try {
-				if (path.equals(".")) { //$NON-NLS-1$
-					return new ArchiveApiTypeContainer(this, fLocation);
-				} else {
-					// TODO: use temporary space from OSGi if in a framework
-					zip = new ZipFile(fLocation);
-					ZipEntry entry = zip.getEntry(path);
-					if (entry != null) {
-						InputStream inputStream = null;
-						File tempFile;
-						FileOutputStream outputStream = null;
-						try {
-							inputStream = zip.getInputStream(entry);
-							tempFile = File.createTempFile("api", "tmp"); //$NON-NLS-1$ //$NON-NLS-2$
-							tempFile.deleteOnExit();
-							outputStream = new FileOutputStream(tempFile);
-							byte[] bytes = new byte[8096];
-							while (inputStream.available() > 0) {
-								int read = inputStream.read(bytes);
-								if (read > 0) {
-									outputStream.write(bytes, 0, read);
-								}
-							}
-						} finally {
-							if (inputStream != null) {
-								try {
-									inputStream.close();
-								} catch(IOException e) {
-									ApiPlugin.log(e);
-								}
-							}
-							if (outputStream != null) {
-								try {
-									outputStream.close();
-								} catch(IOException e) {
-									ApiPlugin.log(e);
-								}
-							}
-						}
-						return new ArchiveApiTypeContainer(this, tempFile.getCanonicalPath());
-					}
-				}
-			} finally {
-				if (zip != null) {
-					zip.close();
-				}
-			}
-		}
-		return null;
-	}
-		
-	/**
-	 * Parses a bunlde's manifest into a dictionary. The bundle may be in a jar
-	 * or in a directory at the specified location.
-	 * 
-	 * @param bundleLocation root location of the bundle
-	 * @return bundle manifest dictionary or <code>null</code> if none
-	 * @throws IOException if unable to parse
-	 */
-	protected Map loadManifest(File bundleLocation) throws IOException {
-		ZipFile jarFile = null;
-		InputStream manifestStream = null;
-		String extension = new Path(bundleLocation.getName()).getFileExtension();
-		try {
-			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
-				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
-				ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
-				if (manifestEntry != null) {
-					manifestStream = jarFile.getInputStream(manifestEntry);
-				}
-			} else {
-				File file = new File(bundleLocation, JarFile.MANIFEST_NAME);
-				if (file.exists())
-					manifestStream = new FileInputStream(file);
-			}
-			if (manifestStream == null) {
-				return null;
-			}
-			return ManifestElement.parseBundleManifest(manifestStream, new Hashtable(10));
-		} catch (BundleException e) {
-			ApiPlugin.log(e);
-		} finally {
-			closingZipFileAndStream(manifestStream, jarFile);
-		}
-		return null;
-	}
-	
-	/**
-	 * Reads and returns this bunlde's manifest in a Manifest object.
-	 * The bundle may be in a jar or in a directory at the specified location.
-	 * 
-	 * @param bundleLocation root location of the bundle
-	 * @return manifest or <code>null</code> if not present
-	 * @throws IOException if unable to parse
-	 */
-	protected Manifest readManifest(File bundleLocation) throws IOException {
-		ZipFile jarFile = null;
-		InputStream manifestStream = null;
-		try {
-			String extension = new Path(bundleLocation.getName()).getFileExtension();
-			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
-				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
-				ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
-				if (manifestEntry != null) {
-					manifestStream = jarFile.getInputStream(manifestEntry);
-				}
-			} else {
-				File file = new File(bundleLocation, JarFile.MANIFEST_NAME);
-				if (file.exists())
-					manifestStream = new FileInputStream(file);
-			}
-			if (manifestStream == null) {
-				return null;
-			}
-			return new Manifest(manifestStream);
-		} finally {
-			closingZipFileAndStream(manifestStream, jarFile);
-		}
-	}
-
-	void closingZipFileAndStream(InputStream stream, ZipFile jarFile) {
-		try {
-			if (stream != null) {
-				stream.close();
-			}
-		} catch (IOException e) {
-			ApiPlugin.log(e);
-		}
-		try {
-			if (jarFile != null) {
-				jarFile.close();
-			}
-		} catch (IOException e) {
-			ApiPlugin.log(e);
-		}
-	}
-	
-	/**
-	 * Reads and returns the file contents corresponding to the given file name.
-	 * The bundle may be in a jar or in a directory at the specified location.
-	 * 
-	 * @param xmlFileName the given file name
-	 * @param bundleLocation the root location of the bundle
-	 * @return the file contents or <code>null</code> if not present
-	 */
-	protected String readFileContents(String xmlFileName, File bundleLocation) {
-		ZipFile jarFile = null;
-		InputStream stream = null;
-		try {
-			String extension = new Path(bundleLocation.getName()).getFileExtension();
-			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
-				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
-				ZipEntry manifestEntry = jarFile.getEntry(xmlFileName);
-				if (manifestEntry != null) {
-					stream = jarFile.getInputStream(manifestEntry);
-				}
-			} else {
-				File file = new File(bundleLocation, xmlFileName);
-				if (file.exists()) {
-					stream = new FileInputStream(file);
-				}
-			}
-			if (stream == null) {
-				return null;
-			}
-			return new String(Util.getInputStreamAsCharArray(stream, -1, IApiCoreConstants.UTF_8));
-		} catch(IOException e) {
-			//TODO abort
-			ApiPlugin.log(e);
-		} finally {
-			closingZipFileAndStream(stream, jarFile);
-		}
-		return null;
-	}
-
-	/**
-	 * Parses a bundle's .api_description XML into a string. The file may be in a jar
-	 * or in a directory at the specified location.
-	 * 
-	 * @param bundleLocation root location of the bundle
-	 * @return API description XML as a string or <code>null</code> if none
-	 * @throws IOException if unable to parse
-	 */
-	protected String loadApiDescription(File bundleLocation) throws IOException {
-		ZipFile jarFile = null;
-		InputStream stream = null;
-		String contents = null;
-		try {
-			String extension = new Path(bundleLocation.getName()).getFileExtension();
-			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
-				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
-				ZipEntry manifestEntry = jarFile.getEntry(IApiCoreConstants.API_DESCRIPTION_XML_NAME);
-				if (manifestEntry != null) {
-					// new file is present
-					stream = jarFile.getInputStream(manifestEntry);
-				}
-			} else {
-				File file = new File(bundleLocation, IApiCoreConstants.API_DESCRIPTION_XML_NAME);
-				if (file.exists()) {
-					// use new file
-					stream = new FileInputStream(file);
-				}
-			}
-			if (stream == null) {
-				return null;
-			}
-			char[] charArray = Util.getInputStreamAsCharArray(stream, -1, IApiCoreConstants.UTF_8);
-			contents = new String(charArray);
-		} finally {
-			closingZipFileAndStream(stream, jarFile);
-		}
-		return contents;
-	}
-	
-	
-	/**
-	 * Returns a URL describing a file inside a bundle.
-	 * 
-	 * @param bundleLocation root location of the bundle. May be a
-	 *  directory or a file (jar)
-	 * @param filePath bundle relative path to desired file
-	 * @return URL to the file
-	 * @throws MalformedURLException 
-	 */
-	protected URL getFileInBundle(File bundleLocation, String filePath) throws MalformedURLException {
-		String extension = new Path(bundleLocation.getName()).getFileExtension();
-		StringBuffer urlSt = new StringBuffer();
-		if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
-			urlSt.append("jar:file:"); //$NON-NLS-1$
-			urlSt.append(bundleLocation.getAbsolutePath());
-			urlSt.append("!/"); //$NON-NLS-1$
-			urlSt.append(filePath);
-		} else {
-			urlSt.append("file:"); //$NON-NLS-1$
-			urlSt.append(bundleLocation.getAbsolutePath());
-			urlSt.append(File.separatorChar);
-			urlSt.append(filePath);
-		}	
-		return new URL(urlSt.toString());
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getExecutionEnvironments()
-	 */
-	public synchronized String[] getExecutionEnvironments() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription.getExecutionEnvironments();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getId()
-	 */
-	public synchronized String getId() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription.getSymbolicName();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getRequiredComponents()
-	 */
-	public synchronized IRequiredComponentDescription[] getRequiredComponents() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		BundleSpecification[] requiredBundles = fBundleDescription.getRequiredBundles();
-		IRequiredComponentDescription[] req = new IRequiredComponentDescription[requiredBundles.length];
-		for (int i = 0; i < requiredBundles.length; i++) {
-			BundleSpecification bundle = requiredBundles[i];
-			req[i] = new RequiredComponentDescription(bundle.getName(),
-					new BundleVersionRange(bundle.getVersionRange()),
-					bundle.isOptional(),
-					bundle.isExported());
-		}
-		return req;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getVersion()
-	 */
-	public synchronized String getVersion() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription.getVersion().toString();
-	}
-	
-	/**
-	 * Returns this component's bundle description.
-	 * 
-	 * @return bundle description
-	 */
-	public synchronized BundleDescription getBundleDescription() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		if (fBundleDescription != null) {
-			try {
-				StringBuffer buffer = new StringBuffer();
-				buffer.append(fBundleDescription.toString());
-				buffer.append(" - "); //$NON-NLS-1$
-				buffer.append("[fragment: ").append(isFragment()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
-				buffer.append("[host: ").append(fBundleDescription.getFragments().length > 0).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
-				buffer.append("[system bundle: ").append(isSystemComponent()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
-				buffer.append("[source bundle: ").append(isSourceComponent()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
-				return buffer.toString();
-			}
-			catch(CoreException ce) {} 
-		}
-		return super.toString();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#getLocation()
-	 */
-	public String getLocation() {
-		return fLocation;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#isSystemComponent()
-	 */
-	public boolean isSystemComponent() {
-		return false;
-	}
-	
-	/**
-	 * Returns a boolean option from the map or the default value if not present.
-	 * 
-	 * @param options option map
-	 * @param optionName option name
-	 * @param defaultValue default value for option if not present
-	 * @return boolean value
-	 */
-	protected boolean getBooleanOption(Map options, String optionName, boolean defaultValue) {
-		Boolean optionB = (Boolean)options.get(optionName);
-		if (optionB != null) {
-			return optionB.booleanValue();
-		}
-		return defaultValue;
-	}
-	
-	/* (non-Javadoc)
-	 * @see IApiComponent#isSourceComponent()
-	 */
-	public synchronized boolean isSourceComponent() throws CoreException {
-		if (this.fManifest == null) {
-			baselineDisposed();
-		}
-		ManifestElement[] sourceBundle = null;
-		try {
-			sourceBundle = ManifestElement.parseHeader(IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE, (String) fManifest.get(IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE));
-		} catch (BundleException e) {
-			// ignore
-		}
-		if (sourceBundle != null) {
-			// this is a source bundle with the new format
-			return true;
-		}
-		// check for the old format
-		String pluginXMLContents = readFileContents(IApiCoreConstants.PLUGIN_XML_NAME,new File(getLocation()));
-		if (pluginXMLContents != null) {
-			if (containsSourceExtensionPoint(pluginXMLContents)) {
-				return true;
-			}
-		}
-		// check if it contains a fragment.xml with the appropriate extension point
-		pluginXMLContents = readFileContents(IApiCoreConstants.FRAGMENT_XML_NAME,new File(getLocation()));
-		if (pluginXMLContents != null) {
-			if (containsSourceExtensionPoint(pluginXMLContents)) {
-				return true;
-			}
-		}
-		// parse XML contents to find extension points
-		return false;
-	}
-
-	/**
-	 * Check if the given source contains an source extension point.
-	 * 
-	 * @param pluginXMLContents the given file contents
-	 * @return true if it contains a source extension point, false otherwise
-	 */
-	private boolean containsSourceExtensionPoint(String pluginXMLContents) {
-		SAXParserFactory factory = null;
-		try {
-			factory = SAXParserFactory.newInstance();
-		} catch (FactoryConfigurationError e) {
-			return false;
-		}
-		SAXParser saxParser = null;
-		try {
-			saxParser = factory.newSAXParser();
-		} catch (ParserConfigurationException e) {
-			// ignore
-		} catch (SAXException e) {
-			// ignore
-		}
-
-		if (saxParser == null) {
-			return false;
-		}
-
-		// Parse
-		InputSource inputSource = new InputSource(new BufferedReader(new StringReader(pluginXMLContents)));
-		try {
-			SourceDefaultHandler defaultHandler = new SourceDefaultHandler();
-			saxParser.parse(inputSource, defaultHandler);
-			return defaultHandler.isSource();
-		} catch (SAXException e) {
-			// ignore
-		} catch (IOException e) {
-			// ignore
-		}
-		return false;
-	}	
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.IApiComponent#isFragment()
-	 */
-	public synchronized boolean isFragment() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription.getHost() != null;
-	}
-
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getHost()
-	 */
-	public synchronized IApiComponent getHost() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		HostSpecification host = fBundleDescription.getHost();
-		if(host != null) {
-			return getBaseline().getApiComponent(host.getName());
-		}
-		return null;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.IApiComponent#hasFragments()
-	 */
-	public synchronized boolean hasFragments() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		return fBundleDescription.getFragments().length != 0;
-	}
-	
-	/**
-	 * Sets whether this bundle has an underlying API description file.
-	 * 
-	 * @param hasApiDescription whether this bundle has an underlying API description file
-	 */
-	protected void setHasApiDescription(boolean hasApiDescription) {
-		fHasApiDescription = hasApiDescription;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiComponent#hasApiDescription()
-	 */
-	public boolean hasApiDescription() {
-		// ensure initialized
-		try {
-			getApiDescription();
-		} catch (CoreException e) {
-		}
-		return fHasApiDescription;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getLowestEEs()
-	 */
-	public String[] getLowestEEs() throws CoreException {
-		if (this.lowestEEs != null) return this.lowestEEs;
-		String[] temp = null;
-		String[] executionEnvironments = this.getExecutionEnvironments();
-		int length = executionEnvironments.length;
-		switch(length) {
-			case 0 :
-				return null;
-			case 1 :
-				temp = new String[] { executionEnvironments[0] };
-				break;
-			default :
-				int values = ProfileModifiers.NO_PROFILE_VALUE;
-				for (int i = 0; i < length; i++) {
-					values |= ProfileModifiers.getValue(executionEnvironments[i]);
-				}
-				if (ProfileModifiers.isJRE(values)) {
-					if (ProfileModifiers.isJRE_1_1(values)) {
-						temp = new String[] { ProfileModifiers.JRE_1_1_NAME };
-					} else if (ProfileModifiers.isJ2SE_1_2(values)) {
-						temp = new String[] { ProfileModifiers.J2SE_1_2_NAME };
-					} else if (ProfileModifiers.isJ2SE_1_3(values)) {
-						temp = new String[] { ProfileModifiers.J2SE_1_3_NAME };
-					} else if (ProfileModifiers.isJ2SE_1_4(values)) {
-						temp = new String[] { ProfileModifiers.J2SE_1_4_NAME };
-					} else if (ProfileModifiers.isJ2SE_1_5(values)) {
-						temp = new String[] { ProfileModifiers.J2SE_1_5_NAME };
-					} else {
-						// this is 1.6
-						temp = new String[] { ProfileModifiers.JAVASE_1_6_NAME };
-					}
-				}
-				if (ProfileModifiers.isCDC_Foundation(values)) {
-					if (ProfileModifiers.isCDC_1_0_FOUNDATION_1_0(values)) {
-						if (temp != null) {
-							temp = new String[] { temp[0], ProfileModifiers.CDC_1_0_FOUNDATION_1_0_NAME };
-						} else {
-							temp = new String[] { ProfileModifiers.CDC_1_0_FOUNDATION_1_0_NAME };
-						}
-					} else {
-						if (temp != null) {
-							temp = new String[] { temp[0], ProfileModifiers.CDC_1_1_FOUNDATION_1_1_NAME };
-						} else {
-							temp = new String[] { ProfileModifiers.CDC_1_1_FOUNDATION_1_1_NAME };
-						}
-					}
-				}
-				if (ProfileModifiers.isOSGi(values)) {
-					if (ProfileModifiers.isOSGI_MINIMUM_1_0(values)) {
-						if (temp != null) {
-							int tempLength = temp.length;
-							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
-							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_0_NAME;
-						} else {
-							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_0_NAME };
-						}
-					} else if (ProfileModifiers.isOSGI_MINIMUM_1_1(values)) {
-						if (temp != null) {
-							int tempLength = temp.length;
-							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
-							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_1_NAME;
-						} else {
-							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_1_NAME };
-						}
-					} else {
-						// OSGI_MINIMUM_1_2
-						if (temp != null) {
-							int tempLength = temp.length;
-							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
-							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_2_NAME;
-						} else {
-							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_2_NAME };
-						}
-					}
-				}
-		}
-		this.lowestEEs = temp;
-		return temp;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getErrors()
-	 */
-	public synchronized ResolverError[] getErrors() throws CoreException {
-		if (this.fBundleDescription == null) {
-			baselineDisposed();
-		}
-		IApiElement ancestor = getAncestor(IApiElement.BASELINE);
-		if (ancestor != null) {
-			if (ancestor instanceof ApiBaseline) {
-				ApiBaseline baseline = (ApiBaseline) ancestor;
-				ResolverError[] resolverErrors = baseline.getState().getResolverErrors(this.fBundleDescription);
-				if (resolverErrors.length == 0) {
-					return null;
-				}
-				return resolverErrors;
-			}
-		}
-		return null;
-	}
-	
-	/**
-	 * @throws CoreException with the baseline disposed information
-	 */
-	protected void baselineDisposed() throws CoreException {
-		throw new CoreException(
-				new Status(
-						IStatus.ERROR,
-						ApiPlugin.PLUGIN_ID,
-						ApiPlugin.REPORT_BASELINE_IS_DISPOSED,
-						ApiPlugin.BASELINE_IS_DISPOSED,
-						null));
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java
new file mode 100644
index 0000000..d23304b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java
@@ -0,0 +1,1317 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.BundleSpecification;
+import org.eclipse.osgi.service.resolver.ExportPackageDescription;
+import org.eclipse.osgi.service.resolver.HostSpecification;
+import org.eclipse.osgi.service.resolver.ResolverError;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.osgi.service.resolver.StateObjectFactory;
+import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
+import org.eclipse.pde.api.tools.internal.ApiDescription;
+import org.eclipse.pde.api.tools.internal.ApiDescriptionProcessor;
+import org.eclipse.pde.api.tools.internal.BundleVersionRange;
+import org.eclipse.pde.api.tools.internal.CompositeApiDescription;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.RequiredComponentDescription;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
+import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
+import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
+import org.eclipse.pde.api.tools.internal.provisional.IRequiredComponentDescription;
+import org.eclipse.pde.api.tools.internal.provisional.ProfileModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+import org.eclipse.pde.api.tools.internal.util.FileManager;
+import org.eclipse.pde.api.tools.internal.util.SourceDefaultHandler;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.eclipse.pde.internal.core.TargetWeaver;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Implementation of an API component based on a bundle in the file system.
+ * 
+ * @since 1.0.0
+ */
+public class BundleComponent extends Component {
+	
+	static final String TMP_API_FILE_PREFIX = "api"; //$NON-NLS-1$
+	static final String TMP_API_FILE_POSTFIX = "tmp"; //$NON-NLS-1$
+	
+	/**
+	 * Dictionary parsed from MANIFEST.MF
+	 */
+	private Dictionary fManifest;
+	
+	/**
+	 * Manifest headers that are maintained after {@link BundleDescription} creation.
+	 * Only these headers are maintained in the manifest dictionary to reduce footprint.  
+	 */
+	private static final String[] MANIFEST_HEADERS = new String[] {
+		IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE,
+		Constants.BUNDLE_CLASSPATH,
+		Constants.BUNDLE_NAME,
+		Constants.BUNDLE_VERSION
+	};
+	
+	/**
+	 * Whether there is an underlying .api_description file
+	 */
+	private boolean fHasApiDescription = false;
+	
+	/**
+	 * Root location of component in the file system
+	 */
+	private String fLocation;
+	
+	/**
+	 * Underlying bundle description (OSGi model of a bundle)
+	 */
+	private BundleDescription fBundleDescription;
+	
+	/**
+	 * Symbolic name of this bundle
+	 */
+	private String fSymbolicName = null;
+	
+	/**
+	 * Bundle version
+	 */
+	private Version fVersion = null;
+	
+	/**
+	 * Cached value for the lowest EEs
+	 */
+	private String[] lowestEEs;
+	
+	/**
+	 * Flag to know if this component is a binary bundle in the workspace
+	 * i.e. an imported binary bundle
+	 */
+	private boolean fWorkspaceBinary = false;
+	
+	/**
+	 * The id of this component
+	 */
+	private long fBundleId = 0L;
+
+	/**
+	 * Constructs a new API component from the specified location in the file system
+	 * in the given baseline.
+	 * 
+	 * @param baseline owning API baseline
+	 * @param location directory or jar file
+	 * @param bundleid
+	 * @exception CoreException if unable to create a component from the specified location
+	 */
+	public BundleComponent(IApiBaseline baseline, String location, long bundleid) throws CoreException {
+		super(baseline);
+		fLocation = location;
+		fBundleId = bundleid;
+		fWorkspaceBinary = isBinary() && ApiBaselineManager.WORKSPACE_API_BASELINE_ID.equals(baseline.getName());
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.descriptors.AbstractApiComponent#dispose()
+	 */
+	public void dispose() {
+		try {
+			super.dispose();
+		} finally {
+			synchronized(this) {
+				fManifest = null;
+				fBundleDescription = null;
+			}
+		}
+	}
+	
+	/**
+	 * Returns this bundle's manifest as a dictionary.
+	 * 
+	 * @return manifest dictionary
+	 * @exception CoreException if something goes terribly wrong
+	 */
+	protected synchronized Dictionary getManifest() throws CoreException {
+		if(fManifest == null) {
+			try {
+				fManifest = (Dictionary) loadManifest(new File(fLocation));
+			} catch (IOException e) {
+				abort("Unable to load manifest due to IO error", e); //$NON-NLS-1$
+			}
+		}
+		return fManifest;
+	}
+
+	/**
+	 * Reduce the manifest to only contain required headers after {@link BundleDescription} creation.
+	 */
+	protected synchronized void doManifestCompaction() {
+		Dictionary temp = fManifest;
+		fManifest = new Hashtable(MANIFEST_HEADERS.length, 1);
+		for (int i = 0; i < MANIFEST_HEADERS.length; i++) {
+			String header = MANIFEST_HEADERS[i];
+			Object value = temp.get(header);
+			if (value != null) {
+				fManifest.put(header, value);
+			}
+		}
+	}
+	
+	/**
+	 * Returns if the bundle at the specified location is a valid bundle or not.
+	 * Validity is determined via the existence of a readable manifest file
+	 * @param location
+	 * @return true if the bundle at the given location is valid false otherwise
+	 * @throws IOException
+	 */
+	public boolean isValidBundle() throws CoreException {
+		Dictionary manifest = getManifest();
+		return manifest != null && (manifest.get(Constants.BUNDLE_NAME) != null && manifest.get(Constants.BUNDLE_VERSION) != null);
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if(obj instanceof BundleComponent) {
+			BundleComponent comp = (BundleComponent) obj;
+			return getName().equals(comp.getName()) && 
+					getSymbolicName().equals(comp.getSymbolicName()) &&
+					getVersion().equals(comp.getVersion());
+		}
+		return false;
+	}
+	
+	/**
+	 * Initializes the component
+	 * @throws CoreException on failure
+	 */
+	protected synchronized void init() {
+		if(fBundleDescription != null) {
+			return;
+		}
+		try {
+			Dictionary manifest = getManifest();
+			if (isWorkspaceBinary()) {
+				// must account for bundles in development mode - look for class files in output
+				// folders rather than jars
+				TargetWeaver.weaveManifest(manifest);
+			}
+			fBundleDescription = getBundleDescription(manifest, fLocation, fBundleId);
+			if(fBundleDescription == null) {
+				ApiPlugin.log(new Status(
+						IStatus.ERROR, 
+						ApiPlugin.PLUGIN_ID, 
+						"Unable to resolve the BundleDescription for the component from: " + fLocation,  //$NON-NLS-1$
+						null));
+			}
+			fSymbolicName = fBundleDescription.getSymbolicName();
+			fVersion = fBundleDescription.getVersion();
+			setName((String)manifest.get(Constants.BUNDLE_NAME));
+		} catch (BundleException e) {
+			ApiPlugin.log(new Status(
+					IStatus.ERROR, 
+					ApiPlugin.PLUGIN_ID, 
+					"Unable to create API component from specified location: " + fLocation,  //$NON-NLS-1$
+					e));
+		}
+		catch (CoreException ce) {
+			ApiPlugin.log(ce);
+		}
+		// compact manifest after initialization - only keep used headers
+		doManifestCompaction();
+	}
+	
+	/**
+	 * Returns if this component is a a binary bundle in the workspace
+	 * i.e. an imported binary bundle
+	 * @return true if the component is a binary bundle in the workspace, false otherwise
+	 */
+	public boolean isWorkspaceBinary() {
+		return fWorkspaceBinary;
+	}
+	
+	/**
+	 * Returns the {@link State} from the backing baseline
+	 * @return the state from the backing {@link ApiBaseline}
+	 */
+	protected State getState() {
+		return ((ApiBaseline)getBaseline()).getState();
+	}
+	
+	/**
+	 * Returns the {@link BundleDescription} for the given manifest + state or throws an exception, never
+	 * returns <code>null</code>
+	 * @param manifest
+	 * @param location
+	 * @param id
+	 * @return the {@link BundleDescription} or throws an exception
+	 * @throws BundleException
+	 */
+	protected BundleDescription getBundleDescription(Dictionary manifest, String location, long id) throws BundleException {
+		State state = getState();
+		BundleDescription bundle = lookupBundle(state, manifest);
+		if(bundle != null) {
+			return bundle;
+		}
+		StateObjectFactory factory = StateObjectFactory.defaultFactory;
+		bundle = factory.createBundleDescription(state, manifest, fLocation, id);
+		state.addBundle(bundle);
+		return bundle;
+	}
+	
+	/**
+	 * Tries to look up the bundle described by the given manifest in the given state
+	 * @param manifest
+	 * @return the bundle for the given manifest, <code>null</code> otherwise
+	 * @throws BundleException
+	 */
+	protected BundleDescription lookupBundle(State state, Dictionary manifest) throws BundleException {
+		Version version = null;
+		try {
+			//just in case the version is not a number
+			String ver = (String)manifest.get(Constants.BUNDLE_VERSION);
+			version = ver != null ? new Version(ver) : null;
+		}
+		catch (NumberFormatException nfe) {
+			version = null;
+		}
+		ManifestElement[] name = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, (String)manifest.get(Constants.BUNDLE_SYMBOLICNAME));
+		if(name.length < 1) {
+			return null;
+		}
+		return state.getBundle(name[0].getValue(), version);
+	}
+	
+	/**
+	 * Returns whether this API component represents a binary bundle versus a project bundle.
+	 * 
+	 * @return whether this API component represents a binary bundle
+	 */
+	protected boolean isBinary() {
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.AbstractApiComponent#createApiDescription()
+	 */
+	protected IApiDescription createApiDescription() throws CoreException {
+		BundleDescription[] fragments = getBundleDescription().getFragments();
+		if (fragments.length == 0) {
+			return createLocalApiDescription();
+		}
+		// build a composite description
+		ArrayList descriptions = new ArrayList(fragments.length);
+		descriptions.add(createLocalApiDescription());
+		IApiComponent component = null;
+		for (int i = 0; i < fragments.length; i++) {
+			if(!fragments[i].isResolved()) {
+				continue;
+			}
+			component = getBaseline().getApiComponent(fragments[i].getSymbolicName());
+			if(component != null) {
+				descriptions.add(component.getApiDescription());
+			}
+			else {
+				ApiPlugin.log(new Status(
+						IStatus.WARNING, 
+						ApiPlugin.PLUGIN_ID,
+						NLS.bind(Messages.BundleComponent_failed_to_lookup_fragment, fragments[i].getSymbolicName())));
+			}
+		}
+		return new CompositeApiDescription((IApiDescription[]) descriptions.toArray(new IApiDescription[descriptions.size()]));
+	}
+
+	/**
+	 * Creates and returns this component's API description based on packages
+	 * supplied by this component, exported packages, and associated directives.
+	 * 
+	 * @return API description
+	 * @throws CoreException if unable to initialize 
+	 */
+	protected IApiDescription createLocalApiDescription() throws CoreException {
+		IApiDescription apiDesc = new ApiDescription(getSymbolicName());
+		// first mark all packages as internal
+		initializeApiDescription(apiDesc, getBundleDescription(), getLocalPackageNames());
+		try {
+			String xml = loadApiDescription(new File(fLocation));
+			setHasApiDescription(xml != null);
+			if (xml != null) {
+				ApiDescriptionProcessor.annotateApiSettings(null, apiDesc, xml);
+			}
+		} catch (IOException e) {
+			abort("Unable to load .api_description file ", e); //$NON-NLS-1$
+		}
+		return apiDesc;
+	}
+	
+	/**
+	 * Returns the names of all packages that originate from this bundle.
+	 * Does not include packages that originate from fragments or a host.
+	 * 
+	 * @return local package names
+	 * @throws CoreException
+	 */
+	protected Set getLocalPackageNames() throws CoreException {
+		Set names = new HashSet();
+		IApiTypeContainer[] containers = getApiTypeContainers();
+		IApiComponent comp = null;
+		for (int i = 0; i < containers.length; i++) {
+			comp = (IApiComponent) containers[i].getAncestor(IApiElement.COMPONENT);
+			if (comp != null && comp.getSymbolicName().equals(getSymbolicName())) {
+				String[] packageNames = containers[i].getPackageNames();
+				for (int j = 0; j < packageNames.length; j++) {
+					names.add(packageNames[j]);
+				}
+			}
+		}
+		return names;
+	}	
+	
+
+	/**
+	 * Initializes the given API description based on package exports in the manifest.
+	 * The API description for a bundle only contains packages that originate from
+	 * this bundle (so a host will not contain API descriptions for packages that
+	 * originate from fragments). However, a host's API description will be represented
+	 * by a proxy that delegates to the host and all of its fragments to provide
+	 * a complete description of the host.
+	 * 
+	 * @param apiDesc API description to initialize
+	 * @param bundle the bundle to load from
+	 * @param packages the complete set of packages names originating from the backing
+	 * 		component
+	 * @throws CoreException if an error occurs
+	 */
+	public static void initializeApiDescription(IApiDescription apiDesc, BundleDescription bundle, Set packages) throws CoreException {
+		Iterator iterator = packages.iterator();
+		while (iterator.hasNext()) {
+			String name = (String) iterator.next();
+			apiDesc.setVisibility(Factory.packageDescriptor(name), VisibilityModifiers.PRIVATE);
+		}
+		// then process exported packages that originate from this bundle
+		// considering host and fragment package exports
+		List supplied = new ArrayList();
+		ExportPackageDescription[] exportPackages = bundle.getExportPackages();
+		addSuppliedPackages(packages, supplied, exportPackages);
+		HostSpecification host = bundle.getHost();
+		if (host != null) {
+			BundleDescription[] hosts = host.getHosts();
+			for (int i = 0; i < hosts.length; i++) {
+				addSuppliedPackages(packages, supplied, hosts[i].getExportPackages());
+			}
+		}
+		BundleDescription[] fragments = bundle.getFragments();
+		for (int i = 0; i < fragments.length; i++) {
+			if(!fragments[i].isResolved()) {
+				continue;
+			}
+			addSuppliedPackages(packages, supplied, fragments[i].getExportPackages());
+		}
+		
+		annotateExportedPackages(apiDesc, (ExportPackageDescription[]) supplied.toArray(new ExportPackageDescription[supplied.size()]));
+	}
+
+	/**
+	 * Adds package exports to the given list if the associated package originates
+	 * from this bundle.
+	 *   
+	 * @param packages names of packages supplied by this bundle
+	 * @param supplied list to append package exports to
+	 * @param exportPackages package exports to consider
+	 */
+	protected static void addSuppliedPackages(Set packages, List supplied, ExportPackageDescription[] exportPackages) {
+		for (int i = 0; i < exportPackages.length; i++) {
+			ExportPackageDescription pkg = exportPackages[i];
+			String name = pkg.getName();
+			if (name.equals(".")) { //$NON-NLS-1$
+				// translate . to default package
+				name = Util.DEFAULT_PACKAGE_NAME;
+			}
+			if (packages.contains(name)) {
+				supplied.add(pkg);
+			}
+		}
+	}
+	
+	/**
+	 * Annotates the API description with exported packages.
+	 * 
+	 * @param apiDesc description to annotate
+	 * @param exportedPackages packages that are exported
+	 */
+	protected static void annotateExportedPackages(IApiDescription apiDesc, ExportPackageDescription[] exportedPackages) {
+		for(int i = 0; i < exportedPackages.length; i++) {
+			ExportPackageDescription pkg = exportedPackages[i];
+			boolean internal = ((Boolean) pkg.getDirective("x-internal")).booleanValue(); //$NON-NLS-1$
+			String[] friends = (String[]) pkg.getDirective("x-friends"); //$NON-NLS-1$
+			String pkgName = pkg.getName();
+			if (pkgName.equals(".")) { //$NON-NLS-1$
+				// default package
+				pkgName = ""; //$NON-NLS-1$
+			}
+			IPackageDescriptor pkgDesc = Factory.packageDescriptor(pkgName);
+			if(internal) {
+				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.PRIVATE);
+			}
+			if (friends != null) {
+				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.PRIVATE);
+				for(int j = 0; j < friends.length; j++) {
+					//annotate the api description for x-friends access levels
+					apiDesc.setAccessLevel(
+							Factory.componentDescriptor(friends[j]), 
+							Factory.packageDescriptor(pkgName), 
+							IApiAccess.FRIEND);
+				}
+			}
+			if (!internal && friends == null) {
+				//there could have been directives that have nothing to do with
+				//visibility, so we need to add the package as API in that case
+				apiDesc.setVisibility(pkgDesc, VisibilityModifiers.API);
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.AbstractApiComponent#createApiFilterStore()
+	 */
+	protected IApiFilterStore createApiFilterStore() throws CoreException {
+		//always return a new empty store since we do not support filtering from bundles
+		return null;
+	}
+	
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#createApiTypeContainers()
+	 */
+	protected synchronized List createApiTypeContainers() throws CoreException {
+		List containers = new ArrayList(5);
+		try {
+			List all = new ArrayList();
+			// build the classpath from bundle and all fragments
+			all.add(this);
+			boolean considerFragments = true;
+			if (Util.ORG_ECLIPSE_SWT.equals(getSymbolicName())) {
+				// if SWT is a project to be built/analyzed don't consider its fragments
+				considerFragments = !isApiEnabled();
+			}
+			if (considerFragments) { 
+				BundleDescription[] fragments = getBundleDescription().getFragments();
+				IApiComponent component = null;
+				for (int i = 0; i < fragments.length; i++) {
+					if(!fragments[i].isResolved()) {
+						continue;
+					}
+					component = getBaseline().getApiComponent(fragments[i].getSymbolicName());
+					if (component != null) {
+						// force initialization of the fragment so we can retrieve its class file containers
+						component.getApiTypeContainers();
+						all.add(component);
+					}
+				}
+			}
+			Iterator iterator = all.iterator();
+			Set entryNames = new HashSet(5);
+			BundleComponent other = null;
+			while (iterator.hasNext()) {
+				BundleComponent component = (BundleComponent) iterator.next();
+				String[] paths = getClasspathEntries(component.getManifest());
+				for (int i = 0; i < paths.length; i++) {
+					String path = paths[i];
+					// don't re-process the same entry twice (except default entries ".")
+					if (!(".".equals(path))) { //$NON-NLS-1$
+						if (entryNames.contains(path)) {
+							continue;
+						}
+					}
+					IApiTypeContainer container = component.createApiTypeContainer(path);
+					if (container == null) {
+						for(Iterator iter = all.iterator(); iter.hasNext();) {
+							other = (BundleComponent) iter.next();
+							if (other != component) {
+								container = other.createApiTypeContainer(path);
+							}
+						}
+					}
+					if (container != null) {
+						containers.add(container);
+						if (!(".".equals(path))) { //$NON-NLS-1$
+							entryNames.add(path);
+						}
+					}
+				}
+			}
+		} catch (BundleException e) {
+			abort("Unable to parse bundle classpath", e); //$NON-NLS-1$
+		} catch (IOException e) {
+			abort("Unable to initialize class file containers", e); //$NON-NLS-1$
+		}
+		return containers;
+	}
+	
+	/**
+	 * Returns whether this API component is enabled for API analysis by the API builder.
+	 * 
+	 * @return whether this API component is enabled for API analysis by the API builder.
+	 */
+	protected boolean isApiEnabled() {
+		return false;
+	}
+	
+	/**
+	 * Returns classpath entries defined in the given manifest.
+	 * 
+	 * @param manifest
+	 * @return classpath entries as bundle relative paths
+	 * @throws BundleException
+	 */
+	protected String[] getClasspathEntries(Dictionary manifest) throws BundleException {
+		ManifestElement[] classpath = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) manifest.get(Constants.BUNDLE_CLASSPATH));
+		String elements[] = null;
+		if (classpath == null) {
+			// default classpath is '.'
+			elements = new String[]{"."}; //$NON-NLS-1$
+		} else {
+			elements = new String[classpath.length];
+			for (int i = 0; i < classpath.length; i++) {
+				elements[i] = classpath[i].getValue();
+			}
+		}
+		return elements;
+	}
+	
+	/**
+	 * Creates and returns an {@link IApiTypeContainer} at the specified path in
+	 * this bundle, or <code>null</code> if the {@link IApiTypeContainer} does not
+	 * exist. The path is the name (path) of entries specified by the
+	 * <code>Bundle-ClassPath:</code> header.
+	 * 
+	 * @param path relative path to a class file container in this bundle
+	 * @return {@link IApiTypeContainer} or <code>null</code>
+	 * @exception IOException
+	 */
+	protected IApiTypeContainer createApiTypeContainer(String path) throws IOException, CoreException {
+		File bundle = new File(fLocation);
+		if (bundle.isDirectory()) {
+			// bundle is folder
+			File entry = new File(bundle, path);
+			if (entry.exists()) {
+				if (entry.isFile()) {
+					return new ArchiveApiTypeContainer(this, entry.getCanonicalPath());
+				} else {
+					return new DirectoryApiTypeContainer(this, entry.getCanonicalPath());
+				}
+			}
+		} else {
+			// bundle is jar'd
+			ZipFile zip = null;
+			try {
+				if (path.equals(".")) { //$NON-NLS-1$
+					return new ArchiveApiTypeContainer(this, fLocation);
+				} else {
+					//classpath element can be jar or folder
+					//https://bugs.eclipse.org/bugs/show_bug.cgi?id=279729
+					zip = new ZipFile(fLocation);
+					ZipEntry entry = zip.getEntry(path);
+					if (entry != null) {
+						File tmpfolder = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
+						if(entry.isDirectory()) {
+							//extract the dir and all children
+							File dir = Util.createTempFile(TMP_API_FILE_PREFIX, TMP_API_FILE_POSTFIX);
+							//hack to create a temp directory
+							// see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4735419
+							if(dir.delete()) {
+								dir.mkdir();
+								FileManager.getManager().recordTempFileRoot(dir.getCanonicalPath());
+							}
+							extractDirectory(zip, entry.getName(), dir);
+							if(dir.isDirectory() && dir.exists()) {
+								return new DirectoryApiTypeContainer(this, dir.getCanonicalPath());
+							}
+						}
+						else {
+							File file = extractEntry(zip, entry, tmpfolder);
+							if(Util.isArchive(file.getName())) {
+								File parent = file.getParentFile();
+								if(!parent.equals(tmpfolder)) {
+									FileManager.getManager().recordTempFileRoot(parent.getCanonicalPath());
+								}
+								else {
+									FileManager.getManager().recordTempFileRoot(file.getCanonicalPath());
+								}
+								return new ArchiveApiTypeContainer(this, file.getCanonicalPath());
+							}
+						}
+					}
+				}
+			} finally {
+				if (zip != null) {
+					zip.close();
+				}
+			}
+		}
+		return null;
+	}
+		
+	/**
+	 * Extracts a directory from the archive given a path prefix for entries to retrieve.
+	 * <code>null</code> can be passed in as a prefix, causing all entries to be be extracted from 
+	 * the archive.
+	 * 
+	 * @param zip the {@link ZipFile} to extract from
+	 * @param pathprefix the prefix'ing path to include for extraction
+	 * @param parent the parent directory to extract to
+	 * @throws IOException if the {@link ZipFile} cannot be read or extraction fails to write the file(s)
+	 */
+	void extractDirectory(ZipFile zip, String pathprefix, File parent) throws IOException {
+		Enumeration entries = zip.entries();
+		String prefix = (pathprefix == null ? Util.EMPTY_STRING : pathprefix);
+		ZipEntry entry = null;
+		File file = null;
+		while (entries.hasMoreElements()) {
+			entry = (ZipEntry) entries.nextElement();
+			if(entry.getName().startsWith(prefix)) {
+				file = new File(parent, entry.getName());
+				if (entry.isDirectory()) {
+					file.mkdir();
+					continue;
+				}
+				extractEntry(zip, entry, parent);
+			}
+		}
+	}
+	
+	/**
+	 * Extracts a non-directory entry from a zip file and returns the File handle
+	 * @param zip the zip to extract from
+	 * @param entry the entry to extract
+	 * @param parent the parent directory to add the extracted entry to
+	 * @return the file handle to the extracted entry, <code>null</code> otherwise
+	 * @throws IOException
+	 */
+	File extractEntry(ZipFile zip, ZipEntry entry, File parent) throws IOException {
+		InputStream inputStream = null;
+		File file;
+		FileOutputStream outputStream = null;
+		try {
+			inputStream = zip.getInputStream(entry);
+			file = new File(parent, entry.getName());
+			File lparent = file.getParentFile();
+			if(!lparent.exists()) {
+				lparent.mkdirs();
+			}
+			outputStream = new FileOutputStream(file);
+			byte[] bytes = new byte[8096];
+			while (inputStream.available() > 0) {
+				int read = inputStream.read(bytes);
+				if (read > 0) {
+					outputStream.write(bytes, 0, read);
+				}
+			}
+		} finally {
+			if (inputStream != null) {
+				try {
+					inputStream.close();
+				} catch(IOException e) {
+					ApiPlugin.log(e);
+				}
+			}
+			if (outputStream != null) {
+				try {
+					outputStream.close();
+				} catch(IOException e) {
+					ApiPlugin.log(e);
+				}
+			}
+		}
+		return file;
+	}
+	
+	/**
+	 * Parses a bunlde's manifest into a dictionary. The bundle may be in a jar
+	 * or in a directory at the specified location.
+	 * 
+	 * @param bundleLocation root location of the bundle
+	 * @return bundle manifest dictionary or <code>null</code> if none
+	 * @throws IOException if unable to parse
+	 */
+	protected Map loadManifest(File bundleLocation) throws IOException {
+		ZipFile jarFile = null;
+		InputStream manifestStream = null;
+		String extension = new Path(bundleLocation.getName()).getFileExtension();
+		try {
+			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
+				ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
+				if (manifestEntry != null) {
+					manifestStream = jarFile.getInputStream(manifestEntry);
+				}
+			} else {
+				File file = new File(bundleLocation, JarFile.MANIFEST_NAME);
+				if (file.exists())
+					manifestStream = new FileInputStream(file);
+			}
+			if (manifestStream == null) {
+				return null;
+			}
+			return ManifestElement.parseBundleManifest(manifestStream, new Hashtable(10));
+		} catch (BundleException e) {
+			ApiPlugin.log(e);
+		} finally {
+			closingZipFileAndStream(manifestStream, jarFile);
+		}
+		return null;
+	}
+	
+	/**
+	 * Reads and returns this bunlde's manifest in a Manifest object.
+	 * The bundle may be in a jar or in a directory at the specified location.
+	 * 
+	 * @param bundleLocation root location of the bundle
+	 * @return manifest or <code>null</code> if not present
+	 * @throws IOException if unable to parse
+	 */
+	protected Manifest readManifest(File bundleLocation) throws IOException {
+		ZipFile jarFile = null;
+		InputStream manifestStream = null;
+		try {
+			String extension = new Path(bundleLocation.getName()).getFileExtension();
+			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
+				ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
+				if (manifestEntry != null) {
+					manifestStream = jarFile.getInputStream(manifestEntry);
+				}
+			} else {
+				File file = new File(bundleLocation, JarFile.MANIFEST_NAME);
+				if (file.exists())
+					manifestStream = new FileInputStream(file);
+			}
+			if (manifestStream == null) {
+				return null;
+			}
+			return new Manifest(manifestStream);
+		} finally {
+			closingZipFileAndStream(manifestStream, jarFile);
+		}
+	}
+
+	void closingZipFileAndStream(InputStream stream, ZipFile jarFile) {
+		try {
+			if (stream != null) {
+				stream.close();
+			}
+		} catch (IOException e) {
+			ApiPlugin.log(e);
+		}
+		try {
+			if (jarFile != null) {
+				jarFile.close();
+			}
+		} catch (IOException e) {
+			ApiPlugin.log(e);
+		}
+	}
+	
+	/**
+	 * Reads and returns the file contents corresponding to the given file name.
+	 * The bundle may be in a jar or in a directory at the specified location.
+	 * 
+	 * @param xmlFileName the given file name
+	 * @param bundleLocation the root location of the bundle
+	 * @return the file contents or <code>null</code> if not present
+	 */
+	protected String readFileContents(String xmlFileName, File bundleLocation) {
+		ZipFile jarFile = null;
+		InputStream stream = null;
+		try {
+			String extension = new Path(bundleLocation.getName()).getFileExtension();
+			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
+				ZipEntry manifestEntry = jarFile.getEntry(xmlFileName);
+				if (manifestEntry != null) {
+					stream = jarFile.getInputStream(manifestEntry);
+				}
+			} else {
+				File file = new File(bundleLocation, xmlFileName);
+				if (file.exists()) {
+					stream = new FileInputStream(file);
+				}
+			}
+			if (stream == null) {
+				return null;
+			}
+			return new String(Util.getInputStreamAsCharArray(stream, -1, IApiCoreConstants.UTF_8));
+		} catch(IOException e) {
+			//TODO abort
+			ApiPlugin.log(e);
+		} finally {
+			closingZipFileAndStream(stream, jarFile);
+		}
+		return null;
+	}
+
+	/**
+	 * Parses a bundle's .api_description XML into a string. The file may be in a jar
+	 * or in a directory at the specified location.
+	 * 
+	 * @param bundleLocation root location of the bundle
+	 * @return API description XML as a string or <code>null</code> if none
+	 * @throws IOException if unable to parse
+	 */
+	protected String loadApiDescription(File bundleLocation) throws IOException {
+		ZipFile jarFile = null;
+		InputStream stream = null;
+		String contents = null;
+		try {
+			String extension = new Path(bundleLocation.getName()).getFileExtension();
+			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
+				ZipEntry manifestEntry = jarFile.getEntry(IApiCoreConstants.API_DESCRIPTION_XML_NAME);
+				if (manifestEntry != null) {
+					// new file is present
+					stream = jarFile.getInputStream(manifestEntry);
+				}
+			} else {
+				File file = new File(bundleLocation, IApiCoreConstants.API_DESCRIPTION_XML_NAME);
+				if (file.exists()) {
+					// use new file
+					stream = new FileInputStream(file);
+				}
+			}
+			if (stream == null) {
+				return null;
+			}
+			char[] charArray = Util.getInputStreamAsCharArray(stream, -1, IApiCoreConstants.UTF_8);
+			contents = new String(charArray);
+		} finally {
+			closingZipFileAndStream(stream, jarFile);
+		}
+		return contents;
+	}
+	
+	
+	/**
+	 * Returns a URL describing a file inside a bundle.
+	 * 
+	 * @param bundleLocation root location of the bundle. May be a
+	 *  directory or a file (jar)
+	 * @param filePath bundle relative path to desired file
+	 * @return URL to the file
+	 * @throws MalformedURLException 
+	 */
+	protected URL getFileInBundle(File bundleLocation, String filePath) throws MalformedURLException {
+		String extension = new Path(bundleLocation.getName()).getFileExtension();
+		StringBuffer urlSt = new StringBuffer();
+		if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+			urlSt.append("jar:file:"); //$NON-NLS-1$
+			urlSt.append(bundleLocation.getAbsolutePath());
+			urlSt.append("!/"); //$NON-NLS-1$
+			urlSt.append(filePath);
+		} else {
+			urlSt.append("file:"); //$NON-NLS-1$
+			urlSt.append(bundleLocation.getAbsolutePath());
+			urlSt.append(File.separatorChar);
+			urlSt.append(filePath);
+		}	
+		return new URL(urlSt.toString());
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getExecutionEnvironments()
+	 */
+	public synchronized String[] getExecutionEnvironments() throws CoreException {
+		if (fBundleDescription == null) {
+			baselineDisposed(getBaseline());
+		}
+		return fBundleDescription.getExecutionEnvironments();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getSymbolicName()
+	 */
+	public final String getSymbolicName() {
+		init();
+		return fSymbolicName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getRequiredComponents()
+	 */
+	public synchronized IRequiredComponentDescription[] getRequiredComponents() throws CoreException {
+		if (fBundleDescription == null) {
+			baselineDisposed(getBaseline());
+		}
+		BundleSpecification[] requiredBundles = fBundleDescription.getRequiredBundles();
+		IRequiredComponentDescription[] req = new IRequiredComponentDescription[requiredBundles.length];
+		for (int i = 0; i < requiredBundles.length; i++) {
+			BundleSpecification bundle = requiredBundles[i];
+			req[i] = new RequiredComponentDescription(bundle.getName(),
+					new BundleVersionRange(bundle.getVersionRange()),
+					bundle.isOptional(),
+					bundle.isExported());
+		}
+		return req;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.manifest.IApiComponent#getVersion()
+	 */
+	public synchronized String getVersion() {
+		init();
+		return fVersion.toString();
+	}
+	
+	/**
+	 * Returns this component's bundle description.
+	 * 
+	 * @return bundle description
+	 */
+	public synchronized BundleDescription getBundleDescription() throws CoreException {
+		init();
+		if (fBundleDescription == null) {
+			baselineDisposed(getBaseline());
+		}
+		return fBundleDescription;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		if (fBundleDescription != null) {
+			try {
+				StringBuffer buffer = new StringBuffer();
+				buffer.append(fBundleDescription.toString());
+				buffer.append(" - "); //$NON-NLS-1$
+				buffer.append("[fragment: ").append(isFragment()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append("[host: ").append(fBundleDescription.getFragments().length > 0).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append("[system bundle: ").append(isSystemComponent()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append("[source bundle: ").append(isSourceComponent()).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append("[dev bundle: ").append(fWorkspaceBinary).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+				return buffer.toString();
+			}
+			catch(CoreException ce) {} 
+		}
+		else {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append("Un-initialized Bundle Component"); //$NON-NLS-1$
+			buffer.append("[location: ").append(fLocation).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("[dev bundle: ").append(fWorkspaceBinary).append("]"); //$NON-NLS-1$ //$NON-NLS-2$
+			return buffer.toString();
+		}
+		return super.toString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#getLocation()
+	 */
+	public String getLocation() {
+		return fLocation;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#isSystemComponent()
+	 */
+	public boolean isSystemComponent() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see IApiComponent#isSourceComponent()
+	 */
+	public synchronized boolean isSourceComponent() throws CoreException {
+		getManifest();
+		if (fManifest == null) {
+			baselineDisposed(getBaseline());
+		}
+		ManifestElement[] sourceBundle = null;
+		try {
+			sourceBundle = ManifestElement.parseHeader(IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE, (String) fManifest.get(IApiCoreConstants.ECLIPSE_SOURCE_BUNDLE));
+		} catch (BundleException e) {
+			// ignore
+		}
+		if (sourceBundle != null) {
+			// this is a source bundle with the new format
+			return true;
+		}
+		// check for the old format
+		String pluginXMLContents = readFileContents(IApiCoreConstants.PLUGIN_XML_NAME,new File(getLocation()));
+		if (pluginXMLContents != null) {
+			if (containsSourceExtensionPoint(pluginXMLContents)) {
+				return true;
+			}
+		}
+		// check if it contains a fragment.xml with the appropriate extension point
+		pluginXMLContents = readFileContents(IApiCoreConstants.FRAGMENT_XML_NAME,new File(getLocation()));
+		if (pluginXMLContents != null) {
+			if (containsSourceExtensionPoint(pluginXMLContents)) {
+				return true;
+			}
+		}
+		// parse XML contents to find extension points
+		return false;
+	}
+
+	/**
+	 * Check if the given source contains an source extension point.
+	 * 
+	 * @param pluginXMLContents the given file contents
+	 * @return true if it contains a source extension point, false otherwise
+	 */
+	private boolean containsSourceExtensionPoint(String pluginXMLContents) {
+		SAXParserFactory factory = null;
+		try {
+			factory = SAXParserFactory.newInstance();
+		} catch (FactoryConfigurationError e) {
+			return false;
+		}
+		SAXParser saxParser = null;
+		try {
+			saxParser = factory.newSAXParser();
+		} catch (ParserConfigurationException e) {
+			// ignore
+		} catch (SAXException e) {
+			// ignore
+		}
+
+		if (saxParser == null) {
+			return false;
+		}
+
+		// Parse
+		InputSource inputSource = new InputSource(new BufferedReader(new StringReader(pluginXMLContents)));
+		try {
+			SourceDefaultHandler defaultHandler = new SourceDefaultHandler();
+			saxParser.parse(inputSource, defaultHandler);
+			return defaultHandler.isSource();
+		} catch (SAXException e) {
+			// ignore
+		} catch (IOException e) {
+			// ignore
+		}
+		return false;
+	}	
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.IApiComponent#isFragment()
+	 */
+	public synchronized boolean isFragment() throws CoreException {
+		init();
+		if (fBundleDescription == null) {
+			baselineDisposed(getBaseline());
+		}
+		return fBundleDescription.getHost() != null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.Component#getHost()
+	 */
+	public synchronized IApiComponent getHost() throws CoreException {
+		init();
+		if (fBundleDescription == null) {
+			baselineDisposed(getBaseline());
+		}
+		HostSpecification host = fBundleDescription.getHost();
+		if(host != null) {
+			return getBaseline().getApiComponent(host.getName());
+		}
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.IApiComponent#hasFragments()
+	 */
+	public synchronized boolean hasFragments() throws CoreException {
+		return getBundleDescription().getFragments().length != 0;
+	}
+	
+	/**
+	 * Sets whether this bundle has an underlying API description file.
+	 * 
+	 * @param hasApiDescription whether this bundle has an underlying API description file
+	 */
+	protected void setHasApiDescription(boolean hasApiDescription) {
+		fHasApiDescription = hasApiDescription;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiComponent#hasApiDescription()
+	 */
+	public boolean hasApiDescription() {
+		// ensure initialized
+		try {
+			getApiDescription();
+		} catch (CoreException e) {
+		}
+		return fHasApiDescription;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getLowestEEs()
+	 */
+	public String[] getLowestEEs() throws CoreException {
+		if (lowestEEs != null) return lowestEEs;
+		String[] temp = null;
+		String[] executionEnvironments = getExecutionEnvironments();
+		int length = executionEnvironments.length;
+		switch(length) {
+			case 0 :
+				return null;
+			case 1 :
+				temp = new String[] { executionEnvironments[0] };
+				break;
+			default :
+				int values = ProfileModifiers.NO_PROFILE_VALUE;
+				for (int i = 0; i < length; i++) {
+					values |= ProfileModifiers.getValue(executionEnvironments[i]);
+				}
+				if (ProfileModifiers.isJRE(values)) {
+					if (ProfileModifiers.isJRE_1_1(values)) {
+						temp = new String[] { ProfileModifiers.JRE_1_1_NAME };
+					} else if (ProfileModifiers.isJ2SE_1_2(values)) {
+						temp = new String[] { ProfileModifiers.J2SE_1_2_NAME };
+					} else if (ProfileModifiers.isJ2SE_1_3(values)) {
+						temp = new String[] { ProfileModifiers.J2SE_1_3_NAME };
+					} else if (ProfileModifiers.isJ2SE_1_4(values)) {
+						temp = new String[] { ProfileModifiers.J2SE_1_4_NAME };
+					} else if (ProfileModifiers.isJ2SE_1_5(values)) {
+						temp = new String[] { ProfileModifiers.J2SE_1_5_NAME };
+					} else {
+						// this is 1.6
+						temp = new String[] { ProfileModifiers.JAVASE_1_6_NAME };
+					}
+				}
+				if (ProfileModifiers.isCDC_Foundation(values)) {
+					if (ProfileModifiers.isCDC_1_0_FOUNDATION_1_0(values)) {
+						if (temp != null) {
+							temp = new String[] { temp[0], ProfileModifiers.CDC_1_0_FOUNDATION_1_0_NAME };
+						} else {
+							temp = new String[] { ProfileModifiers.CDC_1_0_FOUNDATION_1_0_NAME };
+						}
+					} else {
+						if (temp != null) {
+							temp = new String[] { temp[0], ProfileModifiers.CDC_1_1_FOUNDATION_1_1_NAME };
+						} else {
+							temp = new String[] { ProfileModifiers.CDC_1_1_FOUNDATION_1_1_NAME };
+						}
+					}
+				}
+				if (ProfileModifiers.isOSGi(values)) {
+					if (ProfileModifiers.isOSGI_MINIMUM_1_0(values)) {
+						if (temp != null) {
+							int tempLength = temp.length;
+							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
+							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_0_NAME;
+						} else {
+							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_0_NAME };
+						}
+					} else if (ProfileModifiers.isOSGI_MINIMUM_1_1(values)) {
+						if (temp != null) {
+							int tempLength = temp.length;
+							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
+							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_1_NAME;
+						} else {
+							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_1_NAME };
+						}
+					} else {
+						// OSGI_MINIMUM_1_2
+						if (temp != null) {
+							int tempLength = temp.length;
+							System.arraycopy(temp, 0, (temp = new String[tempLength + 1]), 0, tempLength);
+							temp[tempLength] = ProfileModifiers.OSGI_MINIMUM_1_2_NAME;
+						} else {
+							temp = new String[] { ProfileModifiers.OSGI_MINIMUM_1_2_NAME };
+						}
+					}
+				}
+		}
+		lowestEEs = temp;
+		return temp;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getErrors()
+	 */
+	public synchronized ResolverError[] getErrors() throws CoreException {
+		init();
+		ApiBaseline baseline = (ApiBaseline) getBaseline();
+		if (fBundleDescription == null) {
+			baselineDisposed(baseline);
+		}
+		if (baseline != null) {
+			ResolverError[] resolverErrors = baseline.getState().getResolverErrors(fBundleDescription);
+			if (resolverErrors.length == 0) {
+				return null;
+			}
+			return resolverErrors;
+		}
+		return null;
+	}
+	
+	/**
+	 * @param baseline the baseline that is disposed
+	 * @throws CoreException with the baseline disposed information
+	 */
+	protected void baselineDisposed(IApiBaseline baseline) throws CoreException {
+		throw new CoreException(
+				new Status(
+						IStatus.ERROR,
+						ApiPlugin.PLUGIN_ID,
+						ApiPlugin.REPORT_BASELINE_IS_DISPOSED,
+						NLS.bind(Messages.BundleApiComponent_baseline_disposed, baseline.getName()),
+						null));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Component.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Component.java
new file mode 100644
index 0000000..ad43ffe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Component.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
+import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+
+/**
+ * Common implementation of an API component as a composite class file container.
+ * 
+ * @since 1.0.0
+ */
+public abstract class Component extends AbstractApiTypeContainer implements IApiComponent {
+	/**
+	 * API description
+	 */
+	private IApiDescription fApiDescription = null;
+		
+	/**
+	 * Api Filter store
+	 */
+	private IApiFilterStore fFilterStore = null;
+	
+	/**
+	 * Constructs an API component in the given {@link IApiBaseline}.
+	 * 
+	 * @param baseline the parent {@link IApiBaseline}
+	 */
+	public Component(IApiBaseline baseline) {
+		super(baseline, IApiElement.COMPONENT, null);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.model.component.IClassFileContainer#accept(org.eclipse.pde.api.tools.model.component.ClassFileContainerVisitor)
+	 */
+	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
+		if (visitor.visit(this)) {
+			super.accept(visitor);
+		}
+		visitor.end(this);
+	}	
+		
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getHost()
+	 */
+	public IApiComponent getHost() throws CoreException {
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getBaseline()
+	 */
+	public IApiBaseline getBaseline() {
+		return (IApiBaseline) getAncestor(IApiElement.BASELINE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#dispose()
+	 */
+	public void dispose() {
+		try {
+			close();
+		} catch (CoreException e) {
+			ApiPlugin.log(e);
+		}
+		finally {
+			synchronized(this) {
+				fApiDescription = null;
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.ApiElement#getApiComponent()
+	 */
+	public IApiComponent getApiComponent() {
+		return this;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.model.component.IApiComponent#getApiDescription()
+	 */
+	public synchronized IApiDescription getApiDescription() throws CoreException {
+		if (fApiDescription == null) {
+			fApiDescription = createApiDescription();
+		}
+		return fApiDescription;
+	}
+	
+	/**
+	 * Returns whether this component has created an API description.
+	 * 
+	 * @return whether this component has created an API description
+	 */
+	protected synchronized boolean isApiDescriptionInitialized() {
+		return fApiDescription != null;
+	}
+
+	/**
+	 * Returns if this component has created an API filter store
+	 * 
+	 * @return true if a store has been created, false other wise
+	 */
+	protected synchronized boolean hasApiFilterStore() {
+		return fFilterStore != null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeContainer#getApiTypeContainers()
+	 */
+	public synchronized IApiTypeContainer[] getApiTypeContainers() throws CoreException {
+		return super.getApiTypeContainers();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeContainer#getApiTypeContainers()
+	 */
+	public synchronized IApiTypeContainer[] getApiTypeContainers(String id) throws CoreException {
+		if (this.hasFragments()) {
+			return super.getApiTypeContainers(id);
+		} else {
+			return super.getApiTypeContainers();
+		}
+	}
+	
+	/**
+	 * Creates and returns the API description for this component.
+	 * 
+	 * @return newly created API description for this component
+	 */
+	protected abstract IApiDescription createApiDescription() throws CoreException;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.IApiComponent#getFilterStore()
+	 */
+	public IApiFilterStore getFilterStore() throws CoreException {
+		if(fFilterStore == null) {
+			fFilterStore = createApiFilterStore();
+		}
+		return fFilterStore;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getHandle()
+	 */
+	public IElementDescriptor getHandle() {
+		return Factory.componentDescriptor(this.getSymbolicName(), this.getVersion());
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return IApiTypeContainer.COMPONENT;
+	}
+	
+	/**
+	 * Lazily creates a new {@link IApiFilterStore} when it is requested
+	 * 
+	 * @return the current {@link IApiFilterStore} for this component
+	 * @throws CoreException
+	 */
+	protected abstract IApiFilterStore createApiFilterStore() throws CoreException;	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
index f6486d6..36b8d0d 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/DirectoryApiTypeContainer.java
@@ -14,6 +14,7 @@ import java.io.File;
 import java.io.FileFilter;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -24,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
@@ -88,15 +90,30 @@ public class DirectoryApiTypeContainer extends ApiElement implements IApiTypeCon
 		}
 
 		/* (non-Javadoc)
-		 * @see org.eclipse.pde.api.tools.model.component.IClassFile#getInputStream()
+		 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot#getContents()
 		 */
-		public InputStream getInputStream() throws CoreException {
+		public byte[] getContents() throws CoreException {
+			InputStream stream = null;
 			try {
-				return new FileInputStream(new File(fLocation));
+				stream = new FileInputStream(new File(fLocation));
 			} catch (FileNotFoundException e) {
 				abort("File not found", e); //$NON-NLS-1$
+				return null;
+			}
+			try {
+				return Util.getInputStreamAsByteArray(stream, -1);
+			}
+			catch(IOException ioe) {
+				abort("Unable to read class file: " + getTypeName(), ioe); //$NON-NLS-1$
+				return null;
+			}
+			finally {
+				try {
+					stream.close();
+				} catch (IOException e) {
+					ApiPlugin.log(e);
+				}
 			}
-			return null; // never reaches here
 		}
 	}	
 
@@ -124,45 +141,48 @@ public class DirectoryApiTypeContainer extends ApiElement implements IApiTypeCon
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
 	 */
 	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
-		init();
-		String[] packageNames = getPackageNames();
-		for (int i = 0; i < packageNames.length; i++) {
-			String pkg = packageNames[i];
-			if (visitor.visitPackage(pkg)) {
-				String location = (String) fPackages.get(pkg);
-				if(location == null) {
-					continue;
-				}
-				File dir = new File(location);
-				if(!dir.exists()) {
-					continue;
-				}
-				File[] files = dir.listFiles(new FileFilter() {
-					public boolean accept(File file) {
-						return file.isFile() && file.getName().endsWith(Util.DOT_CLASS_SUFFIX);
+		if(visitor.visit(this)) {
+			init();
+			String[] packageNames = getPackageNames();
+			for (int i = 0; i < packageNames.length; i++) {
+				String pkg = packageNames[i];
+				if (visitor.visitPackage(pkg)) {
+					String location = (String) fPackages.get(pkg);
+					if(location == null) {
+						continue;
 					}
-				});
-				if (files != null) {
-					List classFiles = new ArrayList();
-					for (int j = 0; j < files.length; j++) {
-						String name = files[j].getName();
-						String typeName = name.substring(0, name.length() - 6);
-						if (pkg.length() > 0) {
-							typeName = pkg + "." + typeName; //$NON-NLS-1$
-						}
-						classFiles.add(new LocalApiTypeRoot(this, files[j].getAbsolutePath(), typeName));
+					File dir = new File(location);
+					if(!dir.exists()) {
+						continue;
 					}
-					Collections.sort(classFiles);
-					Iterator cfIterator = classFiles.iterator();
-					while (cfIterator.hasNext()) {
-						IApiTypeRoot classFile = (IApiTypeRoot) cfIterator.next();
-						visitor.visit(pkg, classFile);
-						visitor.end(pkg, classFile);
+					File[] files = dir.listFiles(new FileFilter() {
+						public boolean accept(File file) {
+							return file.isFile() && file.getName().endsWith(Util.DOT_CLASS_SUFFIX);
+						}
+					});
+					if (files != null) {
+						List classFiles = new ArrayList();
+						for (int j = 0; j < files.length; j++) {
+							String name = files[j].getName();
+							String typeName = name.substring(0, name.length() - 6);
+							if (pkg.length() > 0) {
+								typeName = pkg + "." + typeName; //$NON-NLS-1$
+							}
+							classFiles.add(new LocalApiTypeRoot(this, files[j].getAbsolutePath(), typeName));
+						}
+						Collections.sort(classFiles);
+						Iterator cfIterator = classFiles.iterator();
+						while (cfIterator.hasNext()) {
+							IApiTypeRoot classFile = (IApiTypeRoot) cfIterator.next();
+							visitor.visit(pkg, classFile);
+							visitor.end(pkg, classFile);
+						}
 					}
 				}
+				visitor.endVisitPackage(pkg);
 			}
-			visitor.endVisitPackage(pkg);
 		}
+		visitor.end(this);
 	}
 
 	/**
@@ -273,4 +293,11 @@ public class DirectoryApiTypeContainer extends ApiElement implements IApiTypeCon
 	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
 		return findTypeRoot(qualifiedName);
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return DIRECTORY;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/FolderApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/FolderApiTypeContainer.java
deleted file mode 100644
index 790f270..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/FolderApiTypeContainer.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.model;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
-import org.eclipse.pde.api.tools.internal.util.Util;
-
-/**
- * An {@link IApiTypeRoot} rooted at a container in the workspace.
- * 
- * @since 1.0.0
- */
-public class FolderApiTypeContainer extends ApiElement implements IApiTypeContainer {
-	
-	/**
-	 * Root directory of the {@link IApiTypeContainer}
-	 */
-	private IContainer fRoot;
-	
-	/**
-	 * Constructs an {@link IApiTypeContainer} rooted at the location.
-	 * 
-	 * @param parent the {@link IApiElement} parent for this container
-	 * @param container folder in the workspace
-	 */
-	public FolderApiTypeContainer(IApiElement parent, IContainer container) {
-		super(parent, IApiElement.API_TYPE_CONTAINER, container.getName());
-		this.fRoot = container;
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
-	 */
-	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
-		doVisit(fRoot, Util.DEFAULT_PACKAGE_NAME, visitor);
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#close()
-	 */
-	public void close() throws CoreException {}
-	
-	/**
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		StringBuffer buff = new StringBuffer();
-		buff.append("Folder Class File Container: "+getName()); //$NON-NLS-1$
-		return buff.toString();
-	}
-	
-	/**
-	 * Visits the given {@link IContainer}
-	 * @param container
-	 * @param pkgName
-	 * @param visitor
-	 * @throws CoreException
-	 */
-	private void doVisit(IContainer container, String pkgName, ApiTypeContainerVisitor visitor) throws CoreException {
-		IResource[] members = container.members();
-		List dirs = new ArrayList();
-		boolean visitPkg = visitor.visitPackage(pkgName);
-		for (int i = 0; i < members.length; i++) {
-			IResource file = members[i];
-			switch (file.getType()) {
-			case IResource.FOLDER:
-				dirs.add(file);
-				break;
-			case IResource.FILE:
-				if (visitPkg && file.getName().endsWith(Util.DOT_CLASS_SUFFIX)) {
-					String name = file.getName();
-					String typeName = name.substring(0, name.length() - 6);
-					if (pkgName.length() > 0) {
-						StringBuffer buf = new StringBuffer(pkgName);
-						buf.append('.');
-						buf.append(typeName);
-						typeName = buf.toString();
-					}
-					ResourceApiTypeRoot cf = new ResourceApiTypeRoot(this, (IFile) file, typeName);
-					visitor.visit(pkgName, cf);
-					visitor.end(pkgName, cf);
-				}
-				break;
-			}
-		}
-		visitor.endVisitPackage(pkgName);
-		Iterator iterator = dirs.iterator();
-		while (iterator.hasNext()) {
-			IContainer child = (IContainer)iterator.next();
-			String nextName = null;
-			if (pkgName.length() == 0) {
-				nextName = child.getName();
-			} else {
-				StringBuffer buffer = new StringBuffer(pkgName);
-				buffer.append('.');
-				buffer.append(child.getName());
-				nextName = buffer.toString();
-			}
-			doVisit(child, nextName, visitor);
-		}
-	}
-
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String)
-	 */
-	public IApiTypeRoot findTypeRoot(String qualifiedName) throws CoreException {
-		int index = qualifiedName.lastIndexOf('.');
-		String cfName = qualifiedName;
-		String pkg = Util.DEFAULT_PACKAGE_NAME;
-		if (index > 0) {
-			pkg = qualifiedName.substring(0, index);
-			cfName = qualifiedName.substring(index + 1);
-		}
-		IFolder folder = fRoot.getFolder(new Path(pkg.replace('.', IPath.SEPARATOR)));
-		if (folder.exists()) {
-			IFile file = folder.getFile(cfName + Util.DOT_CLASS_SUFFIX);
-			if (file.exists()) {
-				return new ResourceApiTypeRoot(this, file, qualifiedName);
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#getPackageNames()
-	 */
-	public String[] getPackageNames() throws CoreException {
-		List names = new ArrayList();
-		collectPackageNames(names, Util.DEFAULT_PACKAGE_NAME, fRoot);
-		String[] result = new String[names.size()];
-		names.toArray(result);
-		Arrays.sort(result);
-		return result;
-	}
-	
-	/**
-	 * Traverses a directory to determine if it has {@link IApiTypeRoot}s and
-	 * then visits sub-directories.
-	 * 
-	 * @param packageName package name of directory being visited
-	 * @param dir directory being visited
-	 */
-	private void collectPackageNames(List names, String packageName, IContainer dir) throws CoreException {
-		IResource[] members = dir.members();
-		boolean hasClassFiles = false;
-		List dirs = new ArrayList();
-		for (int i = 0; i < members.length; i++) {
-			IResource file = members[i];
-			switch (file.getType()) {
-			case IResource.FOLDER:
-				dirs.add(file);
-				break;
-			case IResource.FILE:
-				if (!hasClassFiles && file.getName().endsWith(Util.DOT_CLASS_SUFFIX)) {
-					names.add(packageName);
-					hasClassFiles = true;
-				}
-				break;
-			}
-		}
-		Iterator iterator = dirs.iterator();
-		while (iterator.hasNext()) {
-			IContainer child = (IContainer)iterator.next();
-			String nextName = null;
-			if (packageName.length() == 0) {
-				nextName = child.getName();
-			} else {
-				StringBuffer buffer = new StringBuffer(packageName);
-				buffer.append('.');
-				buffer.append(child.getName());
-				nextName = buffer.toString();
-			}
-			collectPackageNames(names, nextName, child);
-		}
-	}
-
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String, java.lang.String)
-	 */
-	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
-		return findTypeRoot(qualifiedName);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.java
index 956d94c..d210926 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@ public class Messages extends NLS {
 	public static String ApiType_2;
 	public static String ApiType_3;
 	public static String ApiScope_0;
+	public static String BundleApiComponent_baseline_disposed;
+	public static String BundleComponent_failed_to_lookup_fragment;
 	
 	static {
 		// initialize resource bundle
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.properties
index 4e17a41..7a2fbcf 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/Messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,3 +13,5 @@ ApiType_1=Unable to resolve superclass {0} for {1}
 ApiType_2=Unsupported operation - API component required for resolution
 ApiType_3=Unable to resolve member type {0} for {1}
 ApiScope_0=Unable to visit this element type: {0}
+BundleApiComponent_baseline_disposed=Baseline ''{0}'' is disposed
+BundleComponent_failed_to_lookup_fragment=Failed to look up resolved fragment: {0}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/MethodKey.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/MethodKey.java
index aabd3bd..0ff4eac 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/MethodKey.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/MethodKey.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,14 +19,21 @@ package org.eclipse.pde.api.tools.internal.model;
 public class MethodKey {
 	private String fSelector;
 	private String fSig;
+	private String fTypename;
+	private boolean fConsiderTypename = false;
+	
 	/**
 	 * Constructs a new method key
-	 * @param name method name
-	 * @param sig method signature
+	 * @param typename the name (fully qualified or otherwise) of the type the method is from
+	 * @param name method name the name of the method
+	 * @param sig method signature the signature of the method or <code>null</code>
+	 * @param considertypename if the given type name should be used when computing equality and hash codes
 	 */
-	public MethodKey(String name, String sig) {
+	public MethodKey(String typename, String name, String sig, boolean considertypename) {
+		fTypename = typename;
 		fSelector = name;
 		fSig = sig;
+		fConsiderTypename = considertypename;
 	}
 	/* (non-Javadoc)
 	 * @see java.lang.Object#equals(java.lang.Object)
@@ -35,7 +42,8 @@ public class MethodKey {
 		if (obj instanceof MethodKey) {
 			MethodKey key = (MethodKey) obj;
 			return fSelector.equals(key.fSelector) &&
-			 fSig.equals(key.fSig);
+			 signaturesEqual(fSig, key.fSig) &&
+			 (fConsiderTypename ? fTypename.equals(key.fTypename) : true);
 		}
 		return false;
 	}
@@ -43,7 +51,26 @@ public class MethodKey {
 	 * @see java.lang.Object#hashCode()
 	 */
 	public int hashCode() {
-		return fSelector.hashCode() + fSig.hashCode();
+		return (fConsiderTypename ? fTypename.hashCode() : 0) + fSelector.hashCode() + (fSig == null ? 0 : fSig.hashCode());
+	}
+	
+	/**
+	 * Returns if the given signatures are equal.
+	 * Signatures are considered equal iff:
+	 * <ul>
+	 * <li>both are equal</li>
+	 * <li>both are <code>null</code></li>
+	 * </ul>
+	 * 
+	 * @param sig1
+	 * @param sig2
+	 * @return <code>true</code> if the signatures are equal <code>false</code> otherwise
+	 */
+	boolean signaturesEqual(String sig1, String sig2) {
+		if(sig1 != null) {
+			return sig1.equals(sig2);
+		}
+		return sig2 == null;
 	}
 	
 	/* (non-Javadoc)
@@ -51,8 +78,9 @@ public class MethodKey {
 	 */
 	public String toString() {
 		StringBuffer buf = new StringBuffer();
-		buf.append(fSelector);
-		buf.append(fSig);
+		buf.append("Method Key: [enclosing type - ").append(fTypename).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+		buf.append("[method name - ").append(fSelector).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
+		buf.append("[signature - ").append(fSig).append("] "); //$NON-NLS-1$ //$NON-NLS-2$
 		return buf.toString();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/PluginProjectApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/PluginProjectApiComponent.java
deleted file mode 100644
index 311aa85..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/PluginProjectApiComponent.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.model;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.pde.api.tools.internal.ApiDescriptionManager;
-import org.eclipse.pde.api.tools.internal.ApiFilterStore;
-import org.eclipse.pde.api.tools.internal.CompositeApiDescription;
-import org.eclipse.pde.api.tools.internal.ProjectApiDescription;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
-import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
-import org.eclipse.pde.api.tools.internal.util.Util;
-import org.eclipse.pde.core.build.IBuild;
-import org.eclipse.pde.core.build.IBuildEntry;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
-
-/**
- * An API component for a plug-in project in the workspace.
- * <p>
- * Note: this class requires a running workspace to be instantiated.
- * </p>
- * @since 1.0.0
- */
-public class PluginProjectApiComponent extends BundleApiComponent {
-	
-	/**
-	 * Constant used for controlling tracing in the plug-in workspace component
-	 */
-	private static boolean DEBUG = Util.DEBUG;
-	
-	/**
-	 * Method used for initializing tracing in the plug-in workspace component
-	 */
-	public static void setDebug(boolean debugValue) {
-		DEBUG = debugValue || Util.DEBUG;
-	}
-		
-	/**
-	 * Associated Java project
-	 */
-	private IJavaProject fProject = null;
-
-	/**
-	 * Associated IPluginModelBase object
-	 */
-	private IPluginModelBase fModel = null;
-	
-	/**
-	 * A cache of bundle class path entries to class file containers.
-	 */
-	private Map fPathToOutputContainers = null;
-	
-	/**
-	 * A cache of output location paths to corresponding class file containers.
-	 */
-	private Map fOutputLocationToContainer = null;
-
-	/**
-	 * Constructs an API component for the given Java project in the specified profile.
-	 * 
-	 * @param profile the owning profile
-	 * @param location the given location of the component
-	 * @param model the given model
-	 * @param project java project
-	 * @throws CoreException if unable to create the API component
-	 */
-	public PluginProjectApiComponent(IApiBaseline profile, String location, IPluginModelBase model) throws CoreException {
-		super(profile, location);
-		IPath path = new Path(location);
-		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
-		this.fProject = JavaCore.create(project);
-		this.fModel = model;
-		setName(fModel.getResourceString(super.getName()));
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#isBinaryBundle()
-	 */
-	protected boolean isBinaryBundle() {
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#isApiEnabled()
-	 */
-	protected boolean isApiEnabled() {
-		return Util.isApiProject(fProject);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.descriptors.AbstractApiComponent#dispose()
-	 */
-	public void dispose() {
-		try {
-			if (isApiDescriptionInitialized()) {
-				try {
-					IApiDescription description = getApiDescription();
-					if (description instanceof ProjectApiDescription) {
-						((ProjectApiDescription) description).disconnect(getBundleDescription());
-					} else if (description instanceof CompositeApiDescription) {
-						((CompositeApiDescription) description).disconnect(getBundleDescription());
-					}
-				} catch (CoreException e) {
-					ApiPlugin.log(e.getStatus());
-				}
-			}
-			if(hasApiFilterStore()) {
-				getFilterStore().dispose();
-			}
-			fModel = null;
-			if (fOutputLocationToContainer != null) {
-				fOutputLocationToContainer.clear();
-				fOutputLocationToContainer = null;
-			}
-			if (fPathToOutputContainers != null) {
-				fPathToOutputContainers.clear();
-				fPathToOutputContainers = null;
-			}
-		} 
-		catch(CoreException ce) {
-			ApiPlugin.log(ce);
-		}
-		finally {
-			super.dispose();
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createLocalApiDescription()
-	 */
-	protected IApiDescription createLocalApiDescription() throws CoreException {
-		long time = System.currentTimeMillis();
-		if(Util.isApiProject(getJavaProject())) {
-			setHasApiDescription(true);
-		}
-		IApiDescription apiDesc = ApiDescriptionManager.getDefault().getApiDescription(this, getBundleDescription());
-		if (DEBUG) {
-			System.out.println("Time to create api description for: ["+fProject.getElementName()+"] " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		}
-		return apiDesc;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createApiFilterStore()
-	 */
-	protected IApiFilterStore createApiFilterStore() throws CoreException {
-		long time = System.currentTimeMillis();
-		IApiFilterStore store = new ApiFilterStore(getJavaProject());
-		if (DEBUG) {
-			System.out.println("Time to create api filter store for: ["+fProject.getElementName()+"] " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		}
-		return store;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.descriptors.BundleApiComponent#createClassFileContainers()
-	 */
-	protected synchronized List createApiTypeContainers() throws CoreException {
-		// first populate build.properties cache so we can create class file containers
-		// from bundle classpath entries
-		fPathToOutputContainers = new HashMap(4);
-		fOutputLocationToContainer = new HashMap(4);
-		if (fProject.exists() && fProject.getProject().isOpen()) {
-			IFile prop = fProject.getProject().getFile("build.properties"); //$NON-NLS-1$
-			if (prop.exists()) {
-				WorkspaceBuildModel properties = new WorkspaceBuildModel(prop);
-				IBuild build = properties.getBuild();
-				IBuildEntry entry = build.getEntry("custom"); //$NON-NLS-1$
-				if (entry != null) {
-					String[] tokens = entry.getTokens();
-					if (tokens.length == 1 && tokens[0].equals("true")) { //$NON-NLS-1$
-						// hack : add the current output location for each classpath entries
-						IClasspathEntry[] classpathEntries = fProject.getRawClasspath();
-						List containers = new ArrayList();
-						for (int i = 0; i < classpathEntries.length; i++) {
-							IClasspathEntry classpathEntry = classpathEntries[i];
-							switch(classpathEntry.getEntryKind()) {
-								case IClasspathEntry.CPE_SOURCE :
-									String containerPath = classpathEntry.getPath().removeFirstSegments(1).toString();
-									IApiTypeContainer container = getApiTypeContainer(containerPath, this);
-									if (container != null && !containers.contains(container)) {
-										containers.add(container);
-									}
-									break;
-								case IClasspathEntry.CPE_VARIABLE :
-									classpathEntry = JavaCore.getResolvedClasspathEntry(classpathEntry);
-									//$FALL-THROUGH$
-								case IClasspathEntry.CPE_LIBRARY :
-									IPath path = classpathEntry.getPath();
-									if (Util.isArchive(path.lastSegment())) {
-										IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
-										if (resource != null) {
-											// jar inside the workspace
-											containers.add(new ArchiveApiTypeContainer(this, resource.getLocation().toOSString()));
-										} else {
-											// external jar
-											containers.add(new ArchiveApiTypeContainer(this, path.toOSString()));
-										}
-									}
-									break;
-							}
-						}
-						if (!containers.isEmpty()) {
-							IApiTypeContainer cfc = null;
-							if (containers.size() == 1) {
-								cfc = (IApiTypeContainer) containers.get(0);
-							} else {
-								cfc = new CompositeApiTypeContainer(this, containers);
-							}
-							fPathToOutputContainers.put(".", cfc); //$NON-NLS-1$
-						}
-					}
-				} else {
-					IBuildEntry[] entries = build.getBuildEntries();
-					int length = entries.length;
-					for (int i = 0; i < length; i++) {
-						IBuildEntry buildEntry = entries[i];
-						if (buildEntry.getName().startsWith(IBuildEntry.JAR_PREFIX)) {
-							String jar = buildEntry.getName().substring(IBuildEntry.JAR_PREFIX.length());
-							String[] tokens = buildEntry.getTokens();
-							if (tokens.length == 1) {
-								IApiTypeContainer container = getApiTypeContainer(tokens[0], this);
-								if (container != null) {
-									fPathToOutputContainers.put(jar, container);
-								}
-							} else {
-								List containers = new ArrayList();
-								for (int j = 0; j < tokens.length; j++) {
-									String currentToken = tokens[j];
-									IApiTypeContainer container = getApiTypeContainer(currentToken, this);
-									if (container != null && !containers.contains(container)) {
-										containers.add(container);
-									}
-								}
-								if (!containers.isEmpty()) {
-									IApiTypeContainer cfc = null;
-									if (containers.size() == 1) {
-										cfc = (IApiTypeContainer) containers.get(0);
-									} else {
-										cfc = new CompositeApiTypeContainer(this, containers);
-									}
-									fPathToOutputContainers.put(jar, cfc);
-								}
-							}
-						}
-					}
-				}
-			}
-			return super.createApiTypeContainers();
-		}
-		return Collections.EMPTY_LIST;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createClassFileContainer(java.lang.String)
-	 */
-	protected IApiTypeContainer createApiTypeContainer(String path) throws IOException, CoreException {
-		if (this.fPathToOutputContainers == null) {
-			baselineDisposed();
-		}
-		IApiTypeContainer container = (IApiTypeContainer) fPathToOutputContainers.get(path);
-		if (container == null) {
-			// could be a binary jar included in the plug-in, just look for it
-			container = findApiTypeContainer(path);
-		}
-		return container;
-	}
-	
-	/** 
-	 * Finds and returns an existing {@link IApiTypeContainer} at the specified location
-	 * in this project, or <code>null</code> if none.
-	 * 
-	 * @param location project relative path to the class file container
-	 * @return {@link IApiTypeContainer} or <code>null</code>
-	 */
-	private IApiTypeContainer findApiTypeContainer(String location) {
-		IResource res = fProject.getProject().findMember(new Path(location));
-		if (res != null) {
-			if (res.getType() == IResource.FILE) {
-				return new ArchiveApiTypeContainer(this, res.getLocation().toOSString());
-			} else {
-				return new DirectoryApiTypeContainer(this, res.getLocation().toOSString());
-			}
-		}
-		return null;
-	}
-	
-	/** 
-	 * Finds and returns an {@link IApiTypeContainer} for the specified
-	 * source folder, or <code>null</code> if it does not exist. If the
-	 * source folder shares an output location with a previous source
-	 * folder, the output location is shared (a new one is not created).
-	 * 
-	 * @param location project relative path to the source folder
-	 * @return {@link IApiTypeContainer} or <code>null</code>
-	 */
-	private IApiTypeContainer getApiTypeContainer(String location, IApiComponent component) throws CoreException {
-		if (this.fOutputLocationToContainer == null) {
-			baselineDisposed();
-		}
-		IResource res = fProject.getProject().findMember(new Path(location));
-		if (res != null) {
-			IPackageFragmentRoot root = fProject.getPackageFragmentRoot(res);
-			if (root.exists()) {
-				if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
-					if (res.getType() == IResource.FOLDER) {
-						// class file folder
-						IPath location2 = res.getLocation();
-						IApiTypeContainer cfc = (IApiTypeContainer) fOutputLocationToContainer.get(location2);
-						if (cfc == null) {
-							cfc = new FolderApiTypeContainer(component, (IContainer) res);
-							fOutputLocationToContainer.put(location2, cfc);
-						}
-						return cfc;
-					}
-				} else {
-					IClasspathEntry entry = root.getRawClasspathEntry();
-					IPath outputLocation = entry.getOutputLocation();
-					if (outputLocation == null) {
-						outputLocation = fProject.getOutputLocation();
-					}
-					IApiTypeContainer cfc = (IApiTypeContainer) fOutputLocationToContainer.get(outputLocation);
-					if (cfc == null) {
-						IPath projectFullPath = fProject.getProject().getFullPath();
-						IContainer container = null;
-						if (projectFullPath.equals(outputLocation)) {
-							// The project is its own output location
-							container = fProject.getProject();
-						} else {
-							container = fProject.getProject().getWorkspace().getRoot().getFolder(outputLocation);
-						}
-						if (container.exists()) {
-							cfc = new FolderApiTypeContainer(component, container);
-							fOutputLocationToContainer.put(outputLocation, cfc);
-						}
-					}
-					return cfc;
-				}
-			}
-		}
-		return null;
-	}	
-	
-	/**
-	 * Returns the Java project associated with this component.
-	 * 
-	 * @return associated Java project
-	 */
-	public IJavaProject getJavaProject() {
-		return fProject;
-	}
-	
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectComponent.java
new file mode 100644
index 0000000..abb4d75
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectComponent.java
@@ -0,0 +1,423 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.ApiDescriptionManager;
+import org.eclipse.pde.api.tools.internal.ApiFilterStore;
+import org.eclipse.pde.api.tools.internal.CoreMessages;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
+import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.eclipse.pde.core.build.IBuild;
+import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.osgi.framework.BundleException;
+
+/**
+ * An API component for a plug-in project in the workspace.
+ * <p>
+ * Note: this class requires a running workspace to be instantiated.
+ * </p>
+ * @since 1.0.0
+ */
+public class ProjectComponent extends BundleComponent {
+	
+	/**
+	 * Constant used for controlling tracing in the plug-in workspace component
+	 */
+	private static boolean DEBUG = Util.DEBUG;
+	
+	/**
+	 * Method used for initializing tracing in the plug-in workspace component
+	 */
+	public static void setDebug(boolean debugValue) {
+		DEBUG = debugValue || Util.DEBUG;
+	}
+		
+	/**
+	 * Associated Java project
+	 */
+	private IJavaProject fProject = null;
+
+	/**
+	 * Associated IPluginModelBase object
+	 */
+	private IPluginModelBase fModel = null;
+	
+	/**
+	 * A cache of bundle class path entries to class file containers.
+	 */
+	private Map fPathToOutputContainers = null;
+	
+	/**
+	 * A cache of output location paths to corresponding class file containers.
+	 */
+	private Map fOutputLocationToContainer = null;
+
+	/**
+	 * Constructs an API component for the given Java project in the specified baseline.
+	 * 
+	 * @param baseline the owning API baseline
+	 * @param location the given location of the component
+	 * @param model the given model
+	 * @param bundleid
+	 * @throws CoreException if unable to create the API component
+	 */
+	public ProjectComponent(IApiBaseline baseline, String location, IPluginModelBase model, long bundleid) throws CoreException {
+		super(baseline, location, bundleid);
+		IPath path = new Path(location);
+		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.lastSegment());
+		this.fProject = JavaCore.create(project);
+		this.fModel = model;
+		setName(fModel.getResourceString(super.getName()));
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#isBinaryBundle()
+	 */
+	protected boolean isBinary() {
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.BundleApiComponent#getBundleDescription(java.util.Dictionary, java.lang.String, long)
+	 */
+	protected BundleDescription getBundleDescription(Dictionary manifest, String location, long id) throws BundleException {
+		try {
+			return getModel().getBundleDescription();
+		}
+		catch(CoreException ce) {
+			throw new BundleException(ce.getMessage());
+		}
+	}
+	
+	/**
+	 * Returns the {@link IPluginModelBase} backing this component
+	 * @return the {@link IPluginModelBase} or throws and exception, never retruns <code>null</code>
+	 * @throws CoreException
+	 */
+	IPluginModelBase getModel() throws CoreException {
+		if(fModel == null) {
+			fModel = PluginRegistry.findModel(fProject.getProject());
+			if(fModel == null) {
+				abort(NLS.bind(CoreMessages.ProjectComponent_could_not_locate_model, fProject.getElementName()), null);
+			}
+		}
+		return fModel;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#isApiEnabled()
+	 */
+	protected boolean isApiEnabled() {
+		return Util.isApiProject(fProject);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.descriptors.AbstractApiComponent#dispose()
+	 */
+	public void dispose() {
+		try {
+			if(hasApiFilterStore()) {
+				getFilterStore().dispose();
+			}
+			fModel = null;
+			if (fOutputLocationToContainer != null) {
+				fOutputLocationToContainer.clear();
+				fOutputLocationToContainer = null;
+			}
+			if (fPathToOutputContainers != null) {
+				fPathToOutputContainers.clear();
+				fPathToOutputContainers = null;
+			}
+		} 
+		catch(CoreException ce) {
+			ApiPlugin.log(ce);
+		}
+		finally {
+			super.dispose();
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createLocalApiDescription()
+	 */
+	protected IApiDescription createLocalApiDescription() throws CoreException {
+		long time = System.currentTimeMillis();
+		if(Util.isApiProject(getJavaProject())) {
+			setHasApiDescription(true);
+		}
+		IApiDescription apiDesc = ApiDescriptionManager.getManager().getApiDescription(this, getBundleDescription());
+		if (DEBUG) {
+			System.out.println("Time to create api description for: ["+fProject.getElementName()+"] " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		return apiDesc;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createApiFilterStore()
+	 */
+	protected IApiFilterStore createApiFilterStore() throws CoreException {
+		long time = System.currentTimeMillis();
+		IApiFilterStore store = new ApiFilterStore(getJavaProject());
+		if (DEBUG) {
+			System.out.println("Time to create api filter store for: ["+fProject.getElementName()+"] " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		return store;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.descriptors.BundleApiComponent#createClassFileContainers()
+	 */
+	protected synchronized List createApiTypeContainers() throws CoreException {
+		// first populate build.properties cache so we can create class file containers
+		// from bundle classpath entries
+		fPathToOutputContainers = new HashMap(4);
+		fOutputLocationToContainer = new HashMap(4);
+		if (fProject.exists() && fProject.getProject().isOpen()) {
+			IFile prop = fProject.getProject().getFile("build.properties"); //$NON-NLS-1$
+			if (prop.exists()) {
+				WorkspaceBuildModel properties = new WorkspaceBuildModel(prop);
+				IBuild build = properties.getBuild();
+				IBuildEntry entry = build.getEntry("custom"); //$NON-NLS-1$
+				if (entry != null) {
+					String[] tokens = entry.getTokens();
+					if (tokens.length == 1 && tokens[0].equals("true")) { //$NON-NLS-1$
+						// hack : add the current output location for each classpath entries
+						IClasspathEntry[] classpathEntries = fProject.getRawClasspath();
+						List containers = new ArrayList();
+						for (int i = 0; i < classpathEntries.length; i++) {
+							IClasspathEntry classpathEntry = classpathEntries[i];
+							switch(classpathEntry.getEntryKind()) {
+								case IClasspathEntry.CPE_SOURCE :
+									String containerPath = classpathEntry.getPath().removeFirstSegments(1).toString();
+									IApiTypeContainer container = getApiTypeContainer(containerPath, this);
+									if (container != null && !containers.contains(container)) {
+										containers.add(container);
+									}
+									break;
+								case IClasspathEntry.CPE_VARIABLE :
+									classpathEntry = JavaCore.getResolvedClasspathEntry(classpathEntry);
+									//$FALL-THROUGH$
+								case IClasspathEntry.CPE_LIBRARY :
+									IPath path = classpathEntry.getPath();
+									if (Util.isArchive(path.lastSegment())) {
+										IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+										if (resource != null) {
+											// jar inside the workspace
+											containers.add(new ArchiveApiTypeContainer(this, resource.getLocation().toOSString()));
+										} else {
+											// external jar
+											containers.add(new ArchiveApiTypeContainer(this, path.toOSString()));
+										}
+									}
+									break;
+							}
+						}
+						if (!containers.isEmpty()) {
+							IApiTypeContainer cfc = null;
+							if (containers.size() == 1) {
+								cfc = (IApiTypeContainer) containers.get(0);
+							} else {
+								cfc = new CompositeApiTypeContainer(this, containers);
+							}
+							fPathToOutputContainers.put(".", cfc); //$NON-NLS-1$
+						}
+					}
+				} else {
+					IBuildEntry[] entries = build.getBuildEntries();
+					int length = entries.length;
+					for (int i = 0; i < length; i++) {
+						IBuildEntry buildEntry = entries[i];
+						if (buildEntry.getName().startsWith(IBuildEntry.JAR_PREFIX)) {
+							String jar = buildEntry.getName().substring(IBuildEntry.JAR_PREFIX.length());
+							String[] tokens = buildEntry.getTokens();
+							if (tokens.length == 1) {
+								IApiTypeContainer container = getApiTypeContainer(tokens[0], this);
+								if (container != null) {
+									fPathToOutputContainers.put(jar, container);
+								}
+							} else {
+								List containers = new ArrayList();
+								for (int j = 0; j < tokens.length; j++) {
+									String currentToken = tokens[j];
+									IApiTypeContainer container = getApiTypeContainer(currentToken, this);
+									if (container != null && !containers.contains(container)) {
+										containers.add(container);
+									}
+								}
+								if (!containers.isEmpty()) {
+									IApiTypeContainer cfc = null;
+									if (containers.size() == 1) {
+										cfc = (IApiTypeContainer) containers.get(0);
+									} else {
+										cfc = new CompositeApiTypeContainer(this, containers);
+									}
+									fPathToOutputContainers.put(jar, cfc);
+								}
+							}
+						}
+					}
+				}
+			}
+			return super.createApiTypeContainers();
+		}
+		return Collections.EMPTY_LIST;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.BundleApiComponent#createClassFileContainer(java.lang.String)
+	 */
+	protected IApiTypeContainer createApiTypeContainer(String path) throws IOException, CoreException {
+		if (this.fPathToOutputContainers == null) {
+			baselineDisposed(getBaseline());
+		}
+		IApiTypeContainer container = (IApiTypeContainer) fPathToOutputContainers.get(path);
+		if (container == null) {
+			// could be a binary jar included in the plug-in, just look for it
+			container = findApiTypeContainer(path);
+		}
+		return container;
+	}
+	
+	/** 
+	 * Finds and returns an existing {@link IApiTypeContainer} at the specified location
+	 * in this project, or <code>null</code> if none.
+	 * 
+	 * @param location project relative path to the class file container
+	 * @return {@link IApiTypeContainer} or <code>null</code>
+	 */
+	private IApiTypeContainer findApiTypeContainer(String location) {
+		IResource res = fProject.getProject().findMember(new Path(location));
+		if (res != null) {
+			if (res.getType() == IResource.FILE) {
+				return new ArchiveApiTypeContainer(this, res.getLocation().toOSString());
+			} else {
+				return new DirectoryApiTypeContainer(this, res.getLocation().toOSString());
+			}
+		}
+		return null;
+	}
+	
+	/** 
+	 * Finds and returns an {@link IApiTypeContainer} for the specified
+	 * source folder, or <code>null</code> if it does not exist. If the
+	 * source folder shares an output location with a previous source
+	 * folder, the output location is shared (a new one is not created).
+	 * 
+	 * @param location project relative path to the source folder
+	 * @return {@link IApiTypeContainer} or <code>null</code>
+	 */
+	private IApiTypeContainer getApiTypeContainer(String location, IApiComponent component) throws CoreException {
+		if (this.fOutputLocationToContainer == null) {
+			baselineDisposed(getBaseline());
+		}
+		IResource res = fProject.getProject().findMember(new Path(location));
+		if (res != null) {
+			IPackageFragmentRoot root = fProject.getPackageFragmentRoot(res);
+			if (root.exists()) {
+				if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
+					if (res.getType() == IResource.FOLDER) {
+						// class file folder
+						IPath location2 = res.getLocation();
+						IApiTypeContainer cfc = (IApiTypeContainer) fOutputLocationToContainer.get(location2);
+						if (cfc == null) {
+							cfc = new ProjectTypeContainer(component, (IContainer) res);
+							fOutputLocationToContainer.put(location2, cfc);
+						}
+						return cfc;
+					}
+				} else {
+					IClasspathEntry entry = root.getRawClasspathEntry();
+					IPath outputLocation = entry.getOutputLocation();
+					if (outputLocation == null) {
+						outputLocation = fProject.getOutputLocation();
+					}
+					IApiTypeContainer cfc = (IApiTypeContainer) fOutputLocationToContainer.get(outputLocation);
+					if (cfc == null) {
+						IPath projectFullPath = fProject.getProject().getFullPath();
+						IContainer container = null;
+						if (projectFullPath.equals(outputLocation)) {
+							// The project is its own output location
+							container = fProject.getProject();
+						} else {
+							container = fProject.getProject().getWorkspace().getRoot().getFolder(outputLocation);
+						}
+						cfc = new ProjectTypeContainer(component, container);
+						fOutputLocationToContainer.put(outputLocation, cfc);
+					}
+					return cfc;
+				}
+			}
+		}
+		return null;
+	}	
+	
+	/**
+	 * Returns the Java project associated with this component.
+	 * 
+	 * @return associated Java project
+	 */
+	public IJavaProject getJavaProject() {
+		return fProject;
+	}
+	
+	/**
+	 * Returns the cached API type container for the given package fragment root, or <code>null</code>
+	 * if none. The given package fragment has to be a SOURCE package fragment - this method is only
+	 * used by the project API description to obtain a class file corresponding to a compilation unit
+	 * when tag scanning (to resolve signatures).
+	 *  
+	 * @param root source package fragment root
+	 * @return API type container associated with the package fragment root, or <code>null</code> 
+	 * 	if none
+	 */
+	public IApiTypeContainer getTypeContainer(IPackageFragmentRoot root) throws CoreException {
+		if (root.getKind() == IPackageFragmentRoot.K_SOURCE) {
+			getApiTypeContainers(); // ensure initialized
+			IResource resource = root.getResource();
+			if (resource != null) {
+				String location = resource.getProjectRelativePath().toString();
+				return getApiTypeContainer(location, this);
+			}
+		}
+		return null;
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java
new file mode 100644
index 0000000..b9946d5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ProjectTypeContainer.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
+import org.eclipse.pde.api.tools.internal.util.Util;
+
+/**
+ * An {@link IApiTypeRoot} rooted at a project output container in the workspace.
+ * 
+ * @since 1.0.0
+ */
+public class ProjectTypeContainer extends ApiElement implements IApiTypeContainer {
+	
+	/**
+	 * Proxy visitor for collecting package names, etc for our 
+	 * type containers
+	 * 
+	 * @since 1.1
+	 */
+	class ContainerVisitor implements IResourceProxyVisitor {
+		
+		List collector = null;
+		int segmentcount = 0;
+		
+		/**
+		 * Constructor
+		 * @param collector
+		 * @param root
+		 */
+		public ContainerVisitor(List collector, IContainer root) {
+			this.collector = collector;
+			this.segmentcount = root.getFullPath().segmentCount();
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.resources.IResourceProxyVisitor#visit(org.eclipse.core.resources.IResourceProxy)
+		 */
+		public boolean visit(IResourceProxy proxy) throws CoreException {
+			if(proxy.getType() == IResource.FOLDER) {
+				String path = proxy.requestFullPath().removeFirstSegments(this.segmentcount).toString();
+				return this.collector.add(path.replace(IPath.SEPARATOR, '.'));
+			}
+			return false;
+		}
+	}
+	
+	/**
+	 * Root directory of the {@link IApiTypeContainer}
+	 */
+	private IContainer fRoot;
+	private String[] fPackageNames = null;
+	
+	/**
+	 * Constructs an {@link IApiTypeContainer} rooted at the location.
+	 * 
+	 * @param parent the {@link IApiElement} parent for this container
+	 * @param container folder in the workspace
+	 */
+	public ProjectTypeContainer(IApiElement parent, IContainer container) {
+		super(parent, IApiElement.API_TYPE_CONTAINER, container.getName());
+		this.fRoot = container;
+	}
+	
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
+	 */
+	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
+		if(visitor.visit(this)) {
+			doVisit(fRoot, Util.DEFAULT_PACKAGE_NAME, visitor);
+		}
+		visitor.end(this);
+	}
+	
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#close()
+	 */
+	public void close() throws CoreException {
+		fPackageNames = null;
+	}
+	
+	/**
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buff = new StringBuffer();
+		buff.append("Project Class File Container: "+getName()); //$NON-NLS-1$
+		return buff.toString();
+	}
+	
+	/**
+	 * Visits the given {@link IContainer}
+	 * @param container
+	 * @param pkgName
+	 * @param visitor
+	 * @throws CoreException
+	 */
+	private void doVisit(IContainer container, String pkgName, ApiTypeContainerVisitor visitor) throws CoreException {
+		IResource[] members = container.members();
+		List dirs = new ArrayList();
+		boolean visitPkg = visitor.visitPackage(pkgName);
+		for (int i = 0; i < members.length; i++) {
+			IResource file = members[i];
+			switch (file.getType()) {
+			case IResource.FOLDER:
+				dirs.add(file);
+				break;
+			case IResource.FILE:
+				if (visitPkg && file.getName().endsWith(Util.DOT_CLASS_SUFFIX)) {
+					String name = file.getName();
+					String typeName = name.substring(0, name.length() - 6);
+					if (pkgName.length() > 0) {
+						StringBuffer buf = new StringBuffer(pkgName);
+						buf.append('.');
+						buf.append(typeName);
+						typeName = buf.toString();
+					}
+					ResourceApiTypeRoot cf = new ResourceApiTypeRoot(this, (IFile) file, typeName);
+					visitor.visit(pkgName, cf);
+					visitor.end(pkgName, cf);
+				}
+				break;
+			}
+		}
+		visitor.endVisitPackage(pkgName);
+		Iterator iterator = dirs.iterator();
+		while (iterator.hasNext()) {
+			IContainer child = (IContainer)iterator.next();
+			String nextName = null;
+			if (pkgName.length() == 0) {
+				nextName = child.getName();
+			} else {
+				StringBuffer buffer = new StringBuffer(pkgName);
+				buffer.append('.');
+				buffer.append(child.getName());
+				nextName = buffer.toString();
+			}
+			doVisit(child, nextName, visitor);
+		}
+	}
+
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String)
+	 */
+	public IApiTypeRoot findTypeRoot(String qualifiedName) throws CoreException {
+		int index = qualifiedName.lastIndexOf('.');
+		String cfName = qualifiedName;
+		String pkg = Util.DEFAULT_PACKAGE_NAME;
+		if (index > 0) {
+			pkg = qualifiedName.substring(0, index);
+			cfName = qualifiedName.substring(index + 1);
+		}
+		IFolder folder = fRoot.getFolder(new Path(pkg.replace('.', IPath.SEPARATOR)));
+		if (folder.exists()) {
+			IFile file = folder.getFile(cfName + Util.DOT_CLASS_SUFFIX);
+			if (file.exists()) {
+				return new ResourceApiTypeRoot(this, file, qualifiedName);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#getPackageNames()
+	 */
+	public String[] getPackageNames() throws CoreException {
+		if(fPackageNames == null) {
+			List names = new ArrayList();
+			collectPackageNames(names, Util.DEFAULT_PACKAGE_NAME, fRoot);
+			fPackageNames = (String[]) names.toArray(new String[names.size()]);
+			Arrays.sort(fPackageNames);
+		}
+		return fPackageNames;
+	}
+	
+	/**
+	 * Traverses a directory to determine if it has {@link IApiTypeRoot}s and
+	 * then visits sub-directories.
+	 * 
+	 * @param packageName package name of directory being visited
+	 * @param dir directory being visited
+	 */
+	private void collectPackageNames(List names, String packageName, IContainer dir) throws CoreException {
+		dir.accept(new ContainerVisitor(names, dir), IResource.NONE);
+	}
+
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeContainer#findTypeRoot(java.lang.String, java.lang.String)
+	 */
+	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
+		return findTypeRoot(qualifiedName);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return FOLDER;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
index 9fb08be..d89b99e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ResourceApiTypeRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.model;
 
+import java.io.IOException;
 import java.io.InputStream;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
+import org.eclipse.pde.api.tools.internal.util.Util;
 
 /**
  * A class file corresponding to a resource in the workspace.
@@ -40,14 +43,28 @@ public class ResourceApiTypeRoot extends AbstractApiTypeRoot {
 		super(parent, typeName);
 		fFile = file;
 	}
-	
+
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeRoot#getInputStream()
+	 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot#getContents()
 	 */
-	public InputStream getInputStream() throws CoreException {
-		return fFile.getContents();
+	public byte[] getContents() throws CoreException {
+		InputStream stream = fFile.getContents();
+		try {
+			return Util.getInputStreamAsByteArray(stream, -1);
+		}
+		catch (IOException ioe) {
+			abort("Unable to read class file: " + getTypeName(), ioe); //$NON-NLS-1$
+			return null;
+		}
+		finally {
+			try {
+				stream.close();
+			} catch (IOException e) {
+				ApiPlugin.log(e);
+			}
+		}
 	}
-
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.IApiTypeRoot#getTypeName()
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubApiComponent.java
index c065087..31460cc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubApiComponent.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubApiComponent.java
@@ -63,15 +63,16 @@ public class StubApiComponent extends SystemLibraryApiComponent {
 
 	private static File getFileFor(int eeValue, String name) {
 		try {
+			String lname = name;
 			switch(eeValue) {
 				case ProfileModifiers.CDC_1_0_FOUNDATION_1_0 :
 				case ProfileModifiers.CDC_1_1_FOUNDATION_1_1 :
 				case ProfileModifiers.OSGI_MINIMUM_1_0 :
 				case ProfileModifiers.OSGI_MINIMUM_1_1 :
 				case ProfileModifiers.OSGI_MINIMUM_1_2 :
-					name = name.replace('/', '_');
+					lname = lname.replace('/', '_');
 			}
-			String stubName = name + ".zip"; //$NON-NLS-1$
+			String stubName = lname + ".zip"; //$NON-NLS-1$
 			URL stub = null;
 			if (Platform.isRunning()) {
 				stub = ApiPlugin.getDefault().getBundle().getResource(STUB_PATH + stubName);
@@ -130,13 +131,13 @@ public class StubApiComponent extends SystemLibraryApiComponent {
 	/**
 	 * Constructs a system library from the given execution environment description file.
 	 * 
-	 * @param profile owning profile
+	 * @param baseline owning baseline
 	 * @param fileName the file name that corresponds to the stub file for the corresponding profile
 	 * @param profileName the given profile name
 	 * @exception CoreException if unable to read the execution environment description file
 	 */
-	private StubApiComponent(IApiBaseline profile, String fileName, String profileName) {
-		super(profile);
+	private StubApiComponent(IApiBaseline baseline, String fileName, String profileName) {
+		super(baseline);
 		IPath path = new Path(fileName);
 		fLibraries = new LibraryLocation[] { new LibraryLocation(path, null, null) };
 		fExecEnv = new String[]{ profileName };
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
index 4319d2f..0c3ae76 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/StubArchiveApiTypeContainer.java
@@ -26,6 +26,7 @@ import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
@@ -98,18 +99,34 @@ public class StubArchiveApiTypeContainer extends ApiElement implements IApiTypeC
 			return getName().hashCode();
 		}
 
-		/**
-		 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeRoot#getInputStream()
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot#getContents()
 		 */
-		public InputStream getInputStream() throws CoreException {
+		public byte[] getContents() throws CoreException {
 			StubArchiveApiTypeContainer archive = (StubArchiveApiTypeContainer) getParent();
 			ZipFile zipFile = archive.open();
 			ZipEntry entry = zipFile.getEntry(getName());
+			InputStream stream = null;
 			if (entry != null) {
 				try {
-					return zipFile.getInputStream(entry);
+					stream = zipFile.getInputStream(entry);
 				} catch (IOException e) {
 					abort("Failed to open class file: " + getTypeName() + " in archive: " + archive.fLocation, e); //$NON-NLS-1$ //$NON-NLS-2$
+					return null;
+				}
+				try {
+					return Util.getInputStreamAsByteArray(stream, -1);
+				}
+				catch(IOException ioe) {
+					abort("Unable to read class file: " + getTypeName(), ioe); //$NON-NLS-1$
+					return null; // never gets here
+				}
+				finally {
+					try {
+						stream.close();
+					} catch (IOException e) {
+						ApiPlugin.log(e);
+					}
 				}
 			}
 			abort("Class file not found: " + getTypeName() + " in archive: " + archive.fLocation, null); //$NON-NLS-1$ //$NON-NLS-2$
@@ -120,7 +137,7 @@ public class StubArchiveApiTypeContainer extends ApiElement implements IApiTypeC
 	/**
 	 * Location of the archive in the local file system.
 	 */
-	private String fLocation;
+	String fLocation;
 	
 	/**
 	 * Cache of package names to class file paths in that package,
@@ -154,30 +171,33 @@ public class StubArchiveApiTypeContainer extends ApiElement implements IApiTypeC
 	 * @see org.eclipse.pde.api.tools.internal.AbstractApiTypeContainer#accept(org.eclipse.pde.api.tools.internal.provisional.ApiTypeContainerVisitor)
 	 */
 	public void accept(ApiTypeContainerVisitor visitor) throws CoreException {
-		init();
-		List packages = new ArrayList(fPackages.keySet());
-		Collections.sort(packages);
-		Iterator iterator = packages.iterator();
-		while (iterator.hasNext()) {
-			String pkg = (String) iterator.next();
-			if (visitor.visitPackage(pkg)) {
-				List types = new ArrayList((Set) fPackages.get(pkg));
-				Iterator cfIterator = types.iterator();
-				List classFiles = new ArrayList(types.size());
-				while (cfIterator.hasNext()) {
-					String entryName = (String) cfIterator.next();
-					classFiles.add(new ArchiveApiTypeRoot(this, entryName));
-				}
-				Collections.sort(classFiles);
-				cfIterator = classFiles.iterator();
-				while (cfIterator.hasNext()) {
-					ArchiveApiTypeRoot classFile = (ArchiveApiTypeRoot) cfIterator.next();
-					visitor.visit(pkg, classFile);
-					visitor.end(pkg, classFile);
+		if(visitor.visit(this)) {
+			init();
+			List packages = new ArrayList(fPackages.keySet());
+			Collections.sort(packages);
+			Iterator iterator = packages.iterator();
+			while (iterator.hasNext()) {
+				String pkg = (String) iterator.next();
+				if (visitor.visitPackage(pkg)) {
+					List types = new ArrayList((Set) fPackages.get(pkg));
+					Iterator cfIterator = types.iterator();
+					List classFiles = new ArrayList(types.size());
+					while (cfIterator.hasNext()) {
+						String entryName = (String) cfIterator.next();
+						classFiles.add(new ArchiveApiTypeRoot(this, entryName));
+					}
+					Collections.sort(classFiles);
+					cfIterator = classFiles.iterator();
+					while (cfIterator.hasNext()) {
+						ArchiveApiTypeRoot classFile = (ArchiveApiTypeRoot) cfIterator.next();
+						visitor.visit(pkg, classFile);
+						visitor.end(pkg, classFile);
+					}
 				}
+				visitor.endVisitPackage(pkg);
 			}
-			visitor.endVisitPackage(pkg);
 		}
+		visitor.end(this);
 	}
 
 	/**
@@ -274,7 +294,7 @@ public class StubArchiveApiTypeContainer extends ApiElement implements IApiTypeC
 	 * @return zip file
 	 * @throws IOException if unable to open the archive
 	 */
-	private synchronized ZipFile open() throws CoreException {
+	synchronized ZipFile open() throws CoreException {
 		if (fZipFile == null) {
 			try {
 				fZipFile = new ZipFile(fLocation);
@@ -307,4 +327,11 @@ public class StubArchiveApiTypeContainer extends ApiElement implements IApiTypeC
 	public IApiTypeRoot findTypeRoot(String qualifiedName, String id) throws CoreException {
 		return findTypeRoot(qualifiedName);
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer#getContainerType()
+	 */
+	public int getContainerType() {
+		return ARCHIVE;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/SystemLibraryApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/SystemLibraryApiComponent.java
index 25304b0..97e6f3f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/SystemLibraryApiComponent.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/SystemLibraryApiComponent.java
@@ -31,7 +31,7 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
  * 
  * @since 1.0.0
  */
-public class SystemLibraryApiComponent extends AbstractApiComponent {
+public class SystemLibraryApiComponent extends Component {
 	
 	/**
 	 * Execution environment profile symbolic name.
@@ -61,21 +61,21 @@ public class SystemLibraryApiComponent extends AbstractApiComponent {
 	/**
 	 * Constructs a system library.
 	 * 
-	 * @param profile owning profile
+	 * @param baseline owning baseline
 	 */
-	protected SystemLibraryApiComponent(IApiBaseline profile){
-		super(profile);
+	protected SystemLibraryApiComponent(IApiBaseline baseline){
+		super(baseline);
 	}
 	/**
 	 * Constructs a system library from the given execution environment description file.
 	 * 
-	 * @param profile owning profile
+	 * @param baseline owning baseline
 	 * @param description EE file
 	 * @param systemPackages exported system packages
 	 * @exception CoreException if unable to read the execution environment description file
 	 */
-	public SystemLibraryApiComponent(IApiBaseline profile, ExecutionEnvironmentDescription description, String[] systemPackages) throws CoreException {
-		super(profile);
+	public SystemLibraryApiComponent(IApiBaseline baseline, ExecutionEnvironmentDescription description, String[] systemPackages) throws CoreException {
+		super(baseline);
 		init(description);
 		fSystemPackages = systemPackages;
 	}
@@ -84,7 +84,7 @@ public class SystemLibraryApiComponent extends AbstractApiComponent {
 	 * @see org.eclipse.pde.api.tools.internal.descriptors.AbstractApiComponent#createApiDescription()
 	 */
 	protected IApiDescription createApiDescription() throws CoreException {
-		IApiDescription api = new ApiDescription(getId());
+		IApiDescription api = new ApiDescription(getSymbolicName());
 		for (int i = 0; i < fSystemPackages.length; i++) {
 			IPackageDescriptor pkg  = Factory.packageDescriptor(fSystemPackages[i]);
 			api.setVisibility(pkg, VisibilityModifiers.API);
@@ -130,7 +130,7 @@ public class SystemLibraryApiComponent extends AbstractApiComponent {
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent#getId()
 	 */
-	public String getId() {
+	public String getSymbolicName() {
 		return fExecEnv[0];
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
index e63e288..44b58d2 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
@@ -20,6 +20,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.pde.api.tools.internal.model.StubArchiveApiTypeContainer.ArchiveApiTypeRoot;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
@@ -73,8 +74,13 @@ public class TypeStructureBuilder extends ClassAdapter {
 		if (index > -1) {
 			enclosingName = name.substring(0, index).replace('/', '.');
 		}
+		int laccess = access;
 		// TODO: inner types should be have enclosing type as parent instead of component
-		fType = new ApiType(fComponent, name.replace('/', '.'), simpleSig.toString(), signature, access, enclosingName, fFile);
+		if ((laccess & Opcodes.ACC_DEPRECATED) != 0) {
+			laccess &= ~Opcodes.ACC_DEPRECATED;
+			laccess |= ClassFileConstants.AccDeprecated;
+		}
+		fType = new ApiType(fComponent, name.replace('/', '.'), simpleSig.toString(), signature, laccess, enclosingName, fFile);
 		if (superName != null) {
 			fType.setSuperclassName(superName.replace('/', '.'));
 		}
@@ -85,9 +91,8 @@ public class TypeStructureBuilder extends ClassAdapter {
 			}
 			fType.setSuperInterfaceNames(names);
 		}
-		super.visit(version, access, name, signature, superName, interfaces);
+		super.visit(version, laccess, name, signature, superName, interfaces);
 	}
-	
 	/**
 	 * @see org.objectweb.asm.ClassAdapter#visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int)
 	 */
@@ -129,7 +134,12 @@ public class TypeStructureBuilder extends ClassAdapter {
 	 * @see org.objectweb.asm.ClassAdapter#visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
 	 */
 	public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
-		fType.addField(name, desc, signature, access, value);
+		int laccess = access;
+		if ((access & Opcodes.ACC_DEPRECATED) != 0) {
+			laccess &= ~Opcodes.ACC_DEPRECATED;
+			laccess |= ClassFileConstants.AccDeprecated;
+		}
+		fType.addField(name, desc, signature, laccess, value);
 		return null;
 	}
 
@@ -138,14 +148,19 @@ public class TypeStructureBuilder extends ClassAdapter {
 	 */
 	public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
 		String[] names = null;
+		int laccess = access;
+		if ((laccess & Opcodes.ACC_DEPRECATED) != 0) {
+			laccess &= ~Opcodes.ACC_DEPRECATED;
+			laccess |= ClassFileConstants.AccDeprecated;
+		}
 		if (exceptions != null && exceptions.length > 0) {
 			names = new String[exceptions.length];
 			for (int i = 0; i < names.length; i++) {
 				names[i] = exceptions[i].replace('/', '.');
 			}
 		}
-		final ApiMethod method = fType.addMethod(name, desc, signature, access, names);
-		return new MethodAdapter(super.visitMethod(access, name, desc, signature, exceptions)) {
+		final ApiMethod method = fType.addMethod(name, desc, signature, laccess, names);
+		return new MethodAdapter(super.visitMethod(laccess, name, desc, signature, exceptions)) {
 			public AnnotationVisitor visitAnnotationDefault() {
 				return new TraceAnnotationVisitor() {
 					public void visitEnd() {
@@ -264,6 +279,13 @@ public class TypeStructureBuilder extends ClassAdapter {
 		public TypeNameFinderInConstructor(MethodVisitor mv, EnclosingMethodSetter enclosingMethodSetter) {
 			super(mv, enclosingMethodSetter);
 		}
+		/* (non-Javadoc)
+		 * @see org.objectweb.asm.MethodAdapter#visitFieldInsn(int, java.lang.String, java.lang.String, java.lang.String)
+		 */
+		public void visitFieldInsn(int opcode, String owner, String name,
+				String desc) {
+			super.visitFieldInsn(opcode, owner, name, desc);
+		}
 		public void visitTypeInsn(int opcode, String type) {
 			if (!setter.found && setter.typeName.equals(type)) {
 				this.matchingLineNumber = this.currentLineNumber;
@@ -302,20 +324,25 @@ public class TypeStructureBuilder extends ClassAdapter {
 		ApiType type = null;
 		try {
 			Map pool = new HashMap();
-			inputStream.readShort(); // read file version (for now there is only one version)
+			short currentVersion = inputStream.readShort(); // read file version (for now there is only one version)
 			short poolSize = inputStream.readShort();
 			for (int i = 0; i < poolSize; i++) {
 				String readUtf = inputStream.readUTF();
 				int index = inputStream.readShort();
 				pool.put(new Integer(index), readUtf);
 			}
+			int access = 0;
+			// access flag was added in version 2 of the stub format
+			if (currentVersion == 2) {
+				access = inputStream.readChar();
+			}
 			int classIndex = inputStream.readShort();
 			String name = (String) pool.get(new Integer(classIndex));
 			StringBuffer simpleSig = new StringBuffer();
 			simpleSig.append('L');
 			simpleSig.append(name);
 			simpleSig.append(';');
-			type = new ApiType(apiComponent, name.replace('/', '.'), simpleSig.toString(), null, 0, null, archiveApiTypeRoot);
+			type = new ApiType(apiComponent, name.replace('/', '.'), simpleSig.toString(), null, access, null, archiveApiTypeRoot);
 			int superclassNameIndex = inputStream.readShort();
 			if (superclassNameIndex != -1) {
 				String superclassName = (String) pool.get(new Integer(superclassNameIndex));
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java
new file mode 100644
index 0000000..aadc75e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/WorkspaceBaseline.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.model;
+
+import java.util.Arrays;
+import java.util.HashSet;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.internal.core.PDECore;
+
+
+/**
+ * Describes the workspace baseline. Tracks the PDE model for the workspace
+ * 
+ * @since 1.1
+ */
+public class WorkspaceBaseline extends ApiBaseline {
+	
+	/**
+	 * Constructor
+	 */
+	public WorkspaceBaseline() {
+		super(ApiBaselineManager.WORKSPACE_API_BASELINE_ID);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.ApiBaseline#dispose()
+	 */
+	public void dispose() {
+		doDispose();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.model.ApiBaseline#getState()
+	 */
+	public State getState() {
+		return PDECore.getDefault().getModelManager().getState().getState();
+	}
+	
+	/* (non-Javadoc)
+	 * @see IApiBaseline#addApiComponents(org.eclipse.pde.api.tools.model.component.IApiComponent[], boolean)
+	 */
+	public void addApiComponents(IApiComponent[] components) throws CoreException {
+		HashSet ees = new HashSet();
+		for (int i = 0; i < components.length; i++) {
+			BundleComponent component = (BundleComponent) components[i];
+			if (component.isSourceComponent()) {
+				continue;
+			}
+			addComponent(component);
+			ees.addAll(Arrays.asList(component.getExecutionEnvironments()));
+		}
+		resolveSystemLibrary(ees);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
index 0005cd9..406f88a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblem.java
@@ -418,9 +418,9 @@ public class ApiProblem implements IApiProblem {
 	}
 
 	/**
-	 * Returns the string representation of the API profile problem kind
+	 * Returns the string representation of the API component problem kind
 	 * @param kind
-	 * @return the string of the API profile problem kind
+	 * @return the string of the API component problem kind
 	 */
 	public static String getApiComponentResolutionProblemKindName(int kind) {
 		switch(kind) {
@@ -432,9 +432,9 @@ public class ApiProblem implements IApiProblem {
 	}
 
 	/**
-	 * Returns the string representation of the API profile problem kind
+	 * Returns the string representation of the API baseline problem kind
 	 * @param kind
-	 * @return the string of the API profile problem kind
+	 * @return the string of the API baseline problem kind
 	 */
 	public static String getApiBaselineProblemKindName(int kind) {
 		switch(kind) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
index f371fd5..ec242c1 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,9 @@ import java.util.ResourceBundle;
 
 import org.eclipse.pde.api.tools.internal.builder.BuilderMessages;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
+import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
@@ -40,6 +42,18 @@ public class ApiProblemFactory {
 	private static Hashtable fMessages = null;
 	
 	/**
+	 * Creates a new {@link IApiProblemFilter}
+	 * @param componentid
+	 * @param problem
+	 * @param comment
+	 * @return the new {@link IApiProblemFilter}
+	 * @since 1.1
+	 */
+	public static IApiProblemFilter newProblemFilter(String componentid, IApiProblem problem, String comment) {
+		return new ApiProblemFilter(componentid, problem, comment);
+	}
+	
+	/**
 	 * Creates a new {@link IApiProblem}
 	 * @param resourcepath the path to the resource this problem was found in
 	 * @param typeName the type name this problem was found in
@@ -149,6 +163,18 @@ public class ApiProblemFactory {
 		return newApiProblem(resourcepath, null, messageargs, argumentids, arguments, -1, -1, -1, id);
 	}
 	/**
+	 * Creates a new fatal {@link IApiProblem}
+	 * @param resourcepath the path to the resource this problem was found in
+	 * @param messageargs listing of arguments to pass in to the localized message.
+	 * The arguments are passed into the string in the order they appear in the array.
+	 * @param kind the kind
+	 * @return a new {@link IApiProblem} for API usage
+	 */
+	public static IApiProblem newFatalProblem(String resourcepath, String[] messageargs, int kind) {
+		int id = createProblemId(IApiProblem.CATEGORY_FATAL_PROBLEM, IElementDescriptor.RESOURCE, kind, IApiProblem.NO_FLAGS);
+		return newApiProblem(resourcepath, null, messageargs, null, null, -1, -1, -1, id);
+	}
+	/**
 	 * Creates a new since tag {@link IApiProblem}
 	 * @param resourcepath the path to the resource this problem was found in
 	 * @param typeName the type name this problem was found in
@@ -560,10 +586,15 @@ public class ApiProblemFactory {
 			}
 			case IApiProblem.CATEGORY_API_COMPONENT_RESOLUTION: {
 				switch(kind) {
-					case IApiProblem.API_COMPONENT_RESOLUTION: {
-						return 99;
-					}
+					case IApiProblem.API_COMPONENT_RESOLUTION: return 99;
+				}
+				break;
+			}
+			case IApiProblem.CATEGORY_FATAL_PROBLEM: {
+				switch(kind) {
+					case IApiProblem.FATAL_JDT_BUILDPATH_PROBLEM: return 31;
 				}
+				break;
 			}
 		}
 		return 0;
@@ -579,6 +610,12 @@ public class ApiProblemFactory {
 	 */
 	public static String getProblemSeverityId(IApiProblem problem) {
 		switch(problem.getCategory()) {
+			case IApiProblem.CATEGORY_FATAL_PROBLEM: {
+				switch(problem.getKind()) {
+					case IApiProblem.FATAL_JDT_BUILDPATH_PROBLEM: return IApiProblemTypes.FATAL_PROBLEMS;
+				}
+				break;	
+			}
 			case IApiProblem.CATEGORY_API_COMPONENT_RESOLUTION : {
 				switch(problem.getKind()) {
 					case IApiProblem.API_COMPONENT_RESOLUTION: return IApiProblemTypes.REPORT_RESOLUTION_ERRORS_API_COMPONENT;
@@ -633,59 +670,4 @@ public class ApiProblemFactory {
 		}
 		return null;
 	}
-	
-	/**
-	 * Returns the problem kind from the given preference key.
-	 * 
-	 * @see IApiProblemTypes for a listing of all preference keys
-	 * @param prefkey
-	 * @return the corresponding kind for the given preference key, or 0 if the pref key is unknown
-	 */
-	public static int getProblemKindFromPref(String prefkey) {
-		if(IApiProblemTypes.ILLEGAL_EXTEND.equals(prefkey)) {
-			return IApiProblem.ILLEGAL_EXTEND;
-		}
-		if(IApiProblemTypes.ILLEGAL_IMPLEMENT.equals(prefkey)) {
-			return IApiProblem.ILLEGAL_IMPLEMENT;
-		}
-		if(IApiProblemTypes.ILLEGAL_INSTANTIATE.equals(prefkey)) {
-			return IApiProblem.ILLEGAL_INSTANTIATE;
-		}
-		if(IApiProblemTypes.ILLEGAL_REFERENCE.equals(prefkey)) {
-			return IApiProblem.ILLEGAL_REFERENCE;
-		}
-		if(IApiProblemTypes.ILLEGAL_OVERRIDE.equals(prefkey)) {
-			return IApiProblem.ILLEGAL_OVERRIDE;
-		}
-		if(IApiProblemTypes.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES.equals(prefkey)) {
-			return IApiProblem.INVALID_REFERENCE_IN_SYSTEM_LIBRARIES;
-		}
-		if(IApiProblemTypes.UNUSED_PROBLEM_FILTERS.equals(prefkey)) {
-			return IApiProblem.UNUSED_PROBLEM_FILTERS;
-		}
-		if(IApiProblemTypes.MISSING_SINCE_TAG.equals(prefkey)) {
-			return IApiProblem.SINCE_TAG_MISSING;
-		}
-		if(IApiProblemTypes.MALFORMED_SINCE_TAG.equals(prefkey)) {
-			return IApiProblem.SINCE_TAG_MALFORMED;
-		}
-		if(IApiProblemTypes.INVALID_SINCE_TAG_VERSION.equals(prefkey)) {
-			return IApiProblem.SINCE_TAG_INVALID;
-		}
-		if(IApiProblemTypes.REPORT_RESOLUTION_ERRORS_API_COMPONENT.equals(prefkey)) {
-			return IApiProblem.API_COMPONENT_RESOLUTION;
-		}
-		if(prefkey != null) {
-			if(prefkey.indexOf("ADDED") > -1) { //$NON-NLS-1$
-				return IDelta.ADDED;
-			}
-			if(prefkey.indexOf("CHANGED") > -1) { //$NON-NLS-1$
-				return IDelta.CHANGED;
-			}
-			if(prefkey.indexOf("REMOVED") > -1) { //$NON-NLS-1$
-				return IDelta.REMOVED;
-			}
-		}
-		return 0;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFilter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFilter.java
index 219d9cf..a36371e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFilter.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/ApiProblemFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,17 +26,37 @@ public class ApiProblemFilter implements IApiProblemFilter, Cloneable {
 
 	private String fComponentId = null;
 	private IApiProblem fProblem = null;
+	private String fComment = null;
 	
 	/**
 	 * Constructor
 	 * 
 	 * @param componentid
 	 * @param problem
+	 * @param comment
 	 */
-	public ApiProblemFilter(String componentid, IApiProblem problem) {
+	public ApiProblemFilter(String componentid, IApiProblem problem, String comment) {
 		fComponentId = componentid;
 		Assert.isNotNull(problem);
 		fProblem = problem;
+		fComment = comment;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter#getComment()
+	 */
+	public String getComment() {
+		return fComment;
+	}
+	
+	/**
+	 * Sets the comment for this filter.
+	 * 
+	 * @param comment the comment or <code>null</code> to remove the existing comment
+	 * @since 1.1
+	 */
+	public void setComment(String comment) {
+		fComment = comment;
 	}
 	
 	/* (non-Javadoc)
@@ -97,7 +117,7 @@ public class ApiProblemFilter implements IApiProblemFilter, Cloneable {
 	 * @see java.lang.Object#clone()
 	 */
 	public Object clone() {
-		return new ApiProblemFilter(this.fComponentId, fProblem);
+		return new ApiProblemFilter(this.fComponentId, fProblem, fComment);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
index 35b4b11..f57bff0 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/problems/problemmessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,12 +8,12 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# the slot 107 has been removed. So it is open again for another message
-# remove messages for 31, 38, 42,
+# remove messages for 38, 42,
 # 45, 46, 47, 48, 49, 50, 51, 52, 53, 57, 58, 59, 60, 62, 63, 65, 68, 70, 71, 74, 75, 80,
 # 82, 83, 88, 90, 93, 05
-#api profile
+#api baseline 
 1 = An API baseline has not been set for the current workspace.
+31 = API analysis aborted for ''{0}'' since its build path is incomplete
 
 #invalid since tag problems
 2 = Invalid @since {0} tag on {2}; expecting @since {1}
@@ -48,10 +48,10 @@
 25 = The local type {0} defined in {1} illegally extends {2}
 28 = An anonymous type defined in {0} illegally extends {1}
 30 = The API problem filter for: ''{0}'' is no longer used
-33 = The method {1}.{2} referenced in {0} is not defined in bundle''s required execution environment: {3} 
-34 = The constructor {1} referenced in {0} is not defined in bundle''s required execution environment: {2}
-35 = The field {1}.{2} referenced in {0} is not defined in bundle''s required execution environment: {3}
-36 = The type {1} referenced in {0} is not defined in bundle''s required execution environment: {2}
+33 = The method {1}.{2} referenced in {0} is not defined in the bundle''s required execution environment: {3} 
+34 = The constructor {1} referenced in {0} is not defined in the bundle''s required execution environment: {2}
+35 = The field {1}.{2} referenced in {0} is not defined in the bundle''s required execution environment: {3}
+36 = The type {1} referenced in {0} is not defined in the bundle''s required execution environment: {2}
 109 = Constructor for {1} with non-API parameter type {0}
 110 = {1} illegally references constructor {0}
 111 = {1} illegally references method {0}.{2}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/ApiPlugin.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/ApiPlugin.java
index f402658..37b9e69 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/ApiPlugin.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/ApiPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,9 @@ package org.eclipse.pde.api.tools.internal.provisional;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
 import org.eclipse.core.resources.ISaveContext;
 import org.eclipse.core.resources.ISaveParticipant;
 import org.eclipse.core.resources.ProjectScope;
@@ -30,9 +30,13 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.pde.api.tools.internal.ApiBaselineManager;
+import org.eclipse.pde.api.tools.internal.ApiDescription;
 import org.eclipse.pde.api.tools.internal.ApiDescriptionManager;
 import org.eclipse.pde.api.tools.internal.ApiFilterStore;
+import org.eclipse.pde.api.tools.internal.WorkspaceDeltaProcessor;
 import org.eclipse.pde.api.tools.internal.JavadocTagManager;
 import org.eclipse.pde.api.tools.internal.SessionManager;
 import org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector;
@@ -42,10 +46,11 @@ import org.eclipse.pde.api.tools.internal.builder.ReferenceExtractor;
 import org.eclipse.pde.api.tools.internal.builder.ReferenceResolver;
 import org.eclipse.pde.api.tools.internal.comparator.ClassFileComparator;
 import org.eclipse.pde.api.tools.internal.descriptors.ElementDescriptorImpl;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
+import org.eclipse.pde.api.tools.internal.model.ProjectComponent;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemTypes;
 import org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner;
+import org.eclipse.pde.api.tools.internal.util.FileManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.prefs.BackingStoreException;
 
@@ -164,7 +169,9 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 	private static final String API_FILTER_STORE_DEBUG = PLUGIN_ID + "/debug/apifilterstore"; //$NON-NLS-1$
 	private static final String API_REFERENCE_ANALYZER_DEBUG = PLUGIN_ID + "/debug/refanalyzer"; //$NON-NLS-1$
 	private static final String PROBLEM_DETECTOR_DEBUG = PLUGIN_ID + "/debug/problemdetector"; //$NON-NLS-1$
-	private static final String REFERENCE_RESOLVER_DEBUG = PLUGIN_ID + "debug/refresolver"; //$NON-NLS-1$
+	private static final String REFERENCE_RESOLVER_DEBUG = PLUGIN_ID + "/debug/refresolver"; //$NON-NLS-1$
+	private static final String API_DESCRIPTION = PLUGIN_ID + "/debug/apidescription"; //$NON-NLS-1$
+	private static final String WORKSPACE_DELTA_PROCESSOR = PLUGIN_ID + "/debug/workspacedeltaprocessor"; //$NON-NLS-1$
 
 	public final static String TRUE = "true"; //$NON-NLS-1$
 
@@ -259,6 +266,11 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 	 * This is used outside the workbench.
 	 */
 	private static int LogBits= 0;
+	
+	/**
+	 * Standard delta processor for Java element changes
+	 */
+	private WorkspaceDeltaProcessor deltaProcessor = null;
 
 	private static final int RESOLUTION_LOG_BIT = 1;
 	private static final int BASELINE_DISPOSED_LOG_BIT = 2;
@@ -450,9 +462,6 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 	 * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
 	 */
 	public void saving(ISaveContext context) throws CoreException {
-		if(context.getKind() == ISaveContext.FULL_SAVE) {
-			context.needDelta();
-		}
 		ISaveParticipant sp = null;
 		for(Iterator iter = savelisteners.iterator(); iter.hasNext();) {
 			sp = (ISaveParticipant) iter.next();
@@ -475,7 +484,10 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 		try {
 			super.start(context);
 		} finally {
-			ResourcesPlugin.getWorkspace().addSaveParticipant(this, this);
+			ResourcesPlugin.getWorkspace().addSaveParticipant(PLUGIN_ID, this);
+			deltaProcessor = new WorkspaceDeltaProcessor();
+			JavaCore.addElementChangedListener(deltaProcessor, ElementChangedEvent.POST_CHANGE);
+			ResourcesPlugin.getWorkspace().addResourceChangeListener(deltaProcessor, IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_BUILD);
 			configurePluginDebugOptions();
 		}
 	}
@@ -487,7 +499,12 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 		try {
 			ApiDescriptionManager.shutdown();
 			ApiBaselineManager.getManager().stop();
-			ResourcesPlugin.getWorkspace().removeSaveParticipant(this);
+			ResourcesPlugin.getWorkspace().removeSaveParticipant(PLUGIN_ID);
+			FileManager.getManager().deleteFiles();
+			if(deltaProcessor != null) {
+				JavaCore.removeElementChangedListener(deltaProcessor);
+				ResourcesPlugin.getWorkspace().removeResourceChangeListener(deltaProcessor);
+			}
 		}
 		finally {
 			super.stop(context);
@@ -506,15 +523,14 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 	 */
 	public int getSeverityLevel(String prefkey, IProject project) {
 		IPreferencesService service = Platform.getPreferencesService();
-		List scopes = new ArrayList();
-		scopes.add(new InstanceScope());
-		if(project != null) {
-			scopes.add(new ProjectScope(project));
+		IScopeContext[] context = null;
+		if(hasProjectSettings(project)) {
+			context = new IScopeContext[] {new ProjectScope(project), new DefaultScope()};
 		}
-		String value = service.getString(PLUGIN_ID, prefkey, null, (IScopeContext[]) scopes.toArray(new IScopeContext[scopes.size()]));
-		if(value == null) {
-			value = service.getString(PLUGIN_ID, prefkey, VALUE_IGNORE, new IScopeContext[]{new DefaultScope()});
+		else {
+			context = new IScopeContext[] {new InstanceScope(), new DefaultScope()};
 		}
+		String value = service.get(prefkey, null, getPreferences(context));
 		if(VALUE_ERROR.equals(value)) {
 			return SEVERITY_ERROR;
 		}
@@ -524,6 +540,55 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 		return SEVERITY_IGNORE;
 	}
 	
+	/**
+	 * Returns the array of {@link IEclipsePreferences} nodes to look in to determine
+	 * the value of a given preference. 
+	 * This method will return <code>null</code> iff:
+	 * <ul>
+	 * <li>the given array of contexts are <code>null</code></li> 
+	 * <li>if no nodes could be determined from the given contexts</li>
+	 * </ul>
+	 * @param context
+	 * @return the array of {@link IEclipsePreferences} to look in or <code>null</code>.
+	 * @since 1.1
+	 */
+	IEclipsePreferences[] getPreferences(IScopeContext[] context) {
+		if(context != null) {
+			ArrayList nodes = new ArrayList(context.length);
+			IEclipsePreferences node = null;
+			for (int i = 0; i < context.length; i++) {
+				node = context[i].getNode(PLUGIN_ID);
+				if(node != null) {
+					nodes.add(node);
+				}
+			}
+			if(nodes.size() > 0) {
+				return (IEclipsePreferences[]) nodes.toArray(new IEclipsePreferences[nodes.size()]);
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Returns if the given project has project-specific settings
+	 * @param project
+	 * @return true if the project has specific settings, false otherwise
+	 * @since 1.1
+	 */
+	boolean hasProjectSettings(IProject project) {
+		if(project != null) {
+			ProjectScope scope = new ProjectScope(project);
+			IEclipsePreferences node = scope.getNode(PLUGIN_ID);
+			try {
+				return node != null && node.keys().length > 0;
+			}
+			catch(BackingStoreException bse) {
+				log(bse);
+			}
+		}
+		return false;
+	}
+	
 	public ISessionManager getSessionManager() {
 		if(fgSessionManager == null) {
 			fgSessionManager = new SessionManager();
@@ -541,18 +606,17 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 	 * @param project the given project or <code>null</code>
 	 * @return the enable state
 	 */
-	public String getEnableState(String prefkey, IProject project) {
+	public boolean getEnableState(String prefkey, IProject project) {
 		IPreferencesService service = Platform.getPreferencesService();
-		List scopes = new ArrayList();
-		scopes.add(new InstanceScope());
-		if(project != null) {
-			scopes.add(new ProjectScope(project));
+		IScopeContext[] context = null;
+		if(hasProjectSettings(project)) {
+			context = new IScopeContext[] {new ProjectScope(project), new DefaultScope()};
 		}
-		String value = service.getString(PLUGIN_ID, prefkey, null, (IScopeContext[]) scopes.toArray(new IScopeContext[scopes.size()]));
-		if(value == null) {
-			value = service.getString(PLUGIN_ID, prefkey, VALUE_DISABLED, new IScopeContext[]{new DefaultScope()}); 
+		else {
+			context = new IScopeContext[] {new InstanceScope(), new DefaultScope()};
 		}
-		return value;
+		String value = service.get(prefkey, null, getPreferences(context));
+		return VALUE_ENABLED.equals(value);
 	}
 	/**
 	 * Method to configure all of the debug options for this plugin
@@ -583,7 +647,7 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 			}
 			option = Platform.getDebugOption(PLUGIN_WORKSPACE_COMPONENT_DEBUG);
 			if(option != null) {
-				PluginProjectApiComponent.setDebug(option.equalsIgnoreCase(TRUE));
+				ProjectComponent.setDebug(option.equalsIgnoreCase(TRUE));
 			}
 			option = Platform.getDebugOption(API_PROFILE_MANAGER_DEBUG);
 			if(option != null) {
@@ -605,6 +669,14 @@ public class ApiPlugin extends Plugin implements ISaveParticipant {
 			if(option != null) {
 				AbstractProblemDetector.setDebug(option.equals(TRUE));
 			}
+			option = Platform.getDebugOption(API_DESCRIPTION);
+			if(option != null) {
+				ApiDescription.setDebug(option.equals(TRUE));
+			}
+			option = Platform.getDebugOption(WORKSPACE_DELTA_PROCESSOR);
+			if(option != null) {
+				WorkspaceDeltaProcessor.setDebug(option.equals(TRUE));
+			}
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/Factory.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/Factory.java
index 87120ae..8ef3c35 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/Factory.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/Factory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,11 +21,14 @@ import org.eclipse.pde.api.tools.internal.descriptors.PackageDescriptorImpl;
 import org.eclipse.pde.api.tools.internal.model.CompositeApiTypeContainer;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+import org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor;
+import org.eclipse.pde.api.tools.internal.search.ReferenceDescriptor;
 import org.eclipse.pde.api.tools.internal.util.Signatures;
 
 /**
@@ -36,7 +39,8 @@ import org.eclipse.pde.api.tools.internal.util.Signatures;
 public class Factory {
 
 	/**
-	 * Returns a component descriptor for the {@link IApiComponent} with the given id.
+	 * Returns a component descriptor for the {@link IApiComponent} with the given id
+	 * and an undefined version.
 	 * The given id does not have to be the id of a component that actually exists: no
 	 * resolution or lookup of any kind is done with the descriptor.
 	 * 
@@ -44,10 +48,23 @@ public class Factory {
 	 * @return a new component descriptor
 	 */
 	public static IComponentDescriptor componentDescriptor(String componentid) {
-		return new ComponentDescriptorImpl(componentid);
+		return new ComponentDescriptorImpl(componentid, null);
 	}
 	
 	/**
+	 * Returns a component descriptor for the {@link IApiComponent} with the given id and version.
+	 * The given id does not have to be the id of a component that actually exists: no
+	 * resolution or lookup of any kind is done with the descriptor.
+	 * 
+	 * @param componentid
+	 * @param version version descriptor or <code>null</code> if none
+	 * @return a new component descriptor
+	 */
+	public static IComponentDescriptor componentDescriptor(String componentid, String version) {
+		return new ComponentDescriptorImpl(componentid, version);
+	}	
+	
+	/**
 	 * Returns a package descriptor for the package with the given name.
 	 * An empty string indicates the default package. Package names are
 	 * dot qualified.
@@ -100,6 +117,24 @@ public class Factory {
 	}
 	
 	/**
+	 * Creates a new {@link IReferenceDescriptor} object
+	 * @param origincomponent the component where the reference comes from
+	 * @param originmember the member where the reference comes from
+	 * @param line the line number of the reference or -1 if unknown
+	 * @param targetcomponent the component the reference is to
+	 * @param targetmember the member the reference is to
+	 * @param kind the kind of the reference. See {@link org.eclipse.pde.api.tools.internal.provisional.builder.IReference} for a complete list of kinds
+	 * @param flags the flags of the reference. See {@link org.eclipse.pde.api.tools.internal.provisional.builder.IReference} for a complete list of flags
+	 * @param visibility the visibility of the reference. See {@link VisibilityModifiers} for a complete list of visibilities
+	 * @param messages a listing of {@link IApiProblem} messages associated with this reference descriptor
+	 * @return a new {@link IReferenceDescriptor}
+	 * @since 1.1
+	 */
+	public static IReferenceDescriptor referenceDescriptor(IComponentDescriptor origincomponent, IMemberDescriptor originmember, int line, IComponentDescriptor targetcomponent, IMemberDescriptor targetmember, int kind, int flags, int visibility, String[] messages) {
+		return new ReferenceDescriptor(origincomponent, originmember, line, targetcomponent, targetmember, kind, flags, visibility, messages);
+	}
+	
+	/**
 	 * Returns a scope containing all elements in the given components.
 	 * 
 	 * @param components API components
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiBaselineManager.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiBaselineManager.java
index eaa3f22..208bbf4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiBaselineManager.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiBaselineManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.pde.api.tools.internal.provisional;
 
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 
 
 /**
@@ -89,4 +90,13 @@ public interface IApiBaselineManager {
 	 * @return the workspace baseline or <code>null</code>
 	 */
 	public IApiBaseline getWorkspaceBaseline();
+	
+	/**
+	 * Returns the API component the workspace baseline with the given symbolic name
+	 * or <code>null</code> if none.
+	 * 
+	 * @param symbolicName bundle symbolic name
+	 * @return API component from the workspace baseline or <code>null</code>
+	 */
+	public IApiComponent getWorkspaceComponent(String symbolicName);
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiDescription.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiDescription.java
index 32880c4..47b5bfd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiDescription.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.provisional;
 
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
@@ -151,7 +152,19 @@ public interface IApiDescription {
 	 * Traverses this description with the given visitor.
 	 * 
 	 * @param visitor description visitor
+	 * @param monitor
 	 */
-	public void accept(ApiDescriptionVisitor visitor);
+	public void accept(ApiDescriptionVisitor visitor, IProgressMonitor monitor);
+	
+	/**
+	 * Traverses this given element contained in this description, if present.
+	 * 
+	 * @param visitor visitor
+	 * @param element element to visit
+	 * @param monitor progress monitor or <code>null</code>
+	 * @return whether the element was visited - <code>true</code> if present and
+	 *  <code>false</code> if not present
+	 */
+	public boolean accept(ApiDescriptionVisitor visitor, IElementDescriptor element, IProgressMonitor monitor);
 	
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiMarkerConstants.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiMarkerConstants.java
index 8bde375..bc588d7 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiMarkerConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/IApiMarkerConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,12 @@ public interface IApiMarkerConstants {
 	 */
 	public static final String API_COMPONENT_RESOLUTION_PROBLEM_MARKER = ApiPlugin.PLUGIN_ID + ".api_component_resolution"; //$NON-NLS-1$
 	/**
+	 * Constant representing the id for the fatal problem marker.
+	 * Value is: <code>org.eclipse.pde.api.tools.fatal_problem</code>
+	 * @since 1.1
+	 */
+	public static final String FATAL_PROBLEM_MARKER = ApiPlugin.PLUGIN_ID + ".fatal_problem"; //$NON-NLS-1$
+	/**
 	 * Constant representing the id for the compatibility problem marker.
 	 * Value is: <code>org.eclipse.pde.api.tools.compatibility</code> 
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/VisibilityModifiers.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/VisibilityModifiers.java
index 5c2500a..9803e7f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/VisibilityModifiers.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/VisibilityModifiers.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.provisional;
 
-import org.eclipse.pde.api.tools.internal.search.ApiUseReportConverter;
+import org.eclipse.pde.api.tools.internal.search.UseReportConverter;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
 /**
@@ -34,7 +34,11 @@ public final class VisibilityModifiers {
 	 * audience (service provider interface).
 	 */
 	public static final int SPI = 0x0004;
-	
+	/**
+	 * Visibility constant indicating an element is API but illegal to use.
+	 * i.e. the element has API restrictions
+	 */
+	public static final int ILLEGAL_API = 0x0016;
 	/**
 	 * Visibility constant indicating an element is private, but some
 	 * clients have been permitted access to the element.
@@ -114,12 +118,15 @@ public final class VisibilityModifiers {
 			case PRIVATE_PERMISSIBLE: {
 				return "PRIVATE_PERMISSIBLE"; //$NON-NLS-1$
 			}
-			case ApiUseReportConverter.FRAGMENT_PERMISSIBLE: {
+			case UseReportConverter.FRAGMENT_PERMISSIBLE: {
 				return "FRAGMENT_PERMISSIBLE"; //$NON-NLS-1$
 			}
 			case SPI: {
 				return "SPI"; //$NON-NLS-1$
 			}
+			case ILLEGAL_API: {
+				return "ILLEGAL_API"; //$NON-NLS-1$
+			}
 			case 0: {
 				return "INHERITED"; //$NON-NLS-1$
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IApiAnalyzer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IApiAnalyzer.java
index 6f2fce1..39c5103 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IApiAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IApiAnalyzer.java
@@ -40,7 +40,7 @@ public interface IApiAnalyzer {
 	 * @param buildState the given build state or null if none
 	 * @param filterStore the given filter store or null if none
 	 * @param preferences the given preferences to be used for the analysis
-	 * @param baseline the profile context to check the component against
+	 * @param baseline the baseline context to check the component against
 	 * @param component the component to analyze
 	 * @param context the build context reported from the {@link ApiAnalysisBuilder}
 	 * @param monitor to report progress
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext.java
index c6109c0..ca2c7e2 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,14 @@ public interface IBuildContext {
 	 * @return the collection of API visible types that have been changed or an empty array
 	 */
 	public String[] getStructurallyChangedTypes();
+	
+	/**
+	 * Returns a collection of types that have had an API description change.
+	 * If no types have had an API description change, an empty array is returned, never <code>null</code>.
+	 *  
+	 * @return the collection of API visible types that have had a description change or an empty array
+	 */
+	public String[] getDescriptionChangedTypes();
 
 	/**
 	 * Returns the collection of types that have been removed (where an {@link IResourceDelta#REMOVED} delta was found)
@@ -35,12 +43,13 @@ public interface IBuildContext {
 	public String[] getRemovedTypes();
 	
 	/**
-	 * Returns the complete collection of dependent types reported from the {@link org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder}.
+	 * Returns the complete collection of types dependent the description changed types reported from the
+	 * {@link org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder}.
 	 * If no types have been reported as dependent an empty array is returned, never <code>null</code>.
 	 * 
-	 * @return the complete collection of dependent types or an empty array
+	 * @return the complete collection of types dependent on description changes or an empty array
 	 */
-	public String[] getDependentTypes();
+	public String[] getDescriptionDependentTypes();
 	
 	/**
 	 * Cleans up the build context and frees any held memory
@@ -48,25 +57,28 @@ public interface IBuildContext {
 	public void dispose();
 	
 	/**
-	 * Returns if the build context has any recorded changed types (includes both structurally changed
-	 * and description changed type names). 
+	 * Returns if the build context has any structurally changed types. 
 	 * 
 	 * Has better performance impact than getting the collection of changed
 	 * type names to ask for the size.
 	 * 
 	 * @return true if there are changed type names recorded, false otherwise
 	 */
-	public boolean hasChangedTypes();
+	public boolean hasStructuralChanges();
 	
 	/**
-	 * Returns if the build context has any recorded dependent types. 
+	 * Returns if the build context has any recorded API description changes.
 	 * 
-	 * Has better performance impact than getting the collection of dependent
-	 * type names to ask for the size.
+	 * @return whether any types have API description changes
+	 */
+	public boolean hasDescriptionChanges();
+	
+	/**
+	 * Returns whether this build context has any type dependent on API description changes.
 	 * 
-	 * @return true if there are dependent type names recorded, false otherwise
+	 * @return <code>true</code> if there are type dependent on API description changes, otherwise <code>false</code>
 	 */
-	public boolean hasDependentTypes();
+	public boolean hasDescriptionDependents();
 	
 	/**
 	 * Returns if the build context has any recorded removed types. 
@@ -80,29 +92,38 @@ public interface IBuildContext {
 	
 	/**
 	 * Returns if this build context has any recorded
-	 * types that require building.
+	 * types that require incremental building.
 	 * 
-	 * @return true if there are types to build, false otherwise
+	 * @return true if there are types to build incrementally, false otherwise
 	 */
 	public boolean hasTypes();
 	
 	/**
-	 * Returns if this build context contains the given type name in its changed types
-	 * collection.
+	 * Returns if this build context contains the given type name in its collection of
+	 * types with API description changes.
 	 *  
 	 * @param typename
 	 * @return true if this context contains the given type name, false otherwise
 	 */
-	public boolean containsChangedType(String typename);
+	public boolean containsDescriptionChange(String typename);
 	
 	/**
-	 * Returns if this build context contains the given type name
-	 * in its dependent types collection
-	 * 
+	 * Returns if this build context contains the given type name in its collection of
+	 * types dependent on API description changes.
+	 *  
+	 * @param typename
+	 * @return true if this context contains the given type name, false otherwise
+	 */
+	public boolean containsDescriptionDependent(String typename);	
+	
+	/**
+	 * Returns if this build context contains the given type name in its changed types
+	 * collection.
+	 *  
 	 * @param typename
 	 * @return true if this context contains the given type name, false otherwise
 	 */
-	public boolean containsDependentType(String typename);
+	public boolean containsStructuralChange(String typename);
 	
 	/**
 	 * Returns if this build context contains the given type name 
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IReference.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IReference.java
index bd73e29..f7e068f 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IReference.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/builder/IReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,13 @@ public interface IReference {
 	public static final int T_METHOD_REFERENCE = 3;
 	
 	/**
+	 * Flag to indicate the reference is illegal, i.e. a reference
+	 * made to an API restricted {@link org.eclipse.pde.api.tools.internal.provisional.model.IApiElement}
+	 * @since 1.1
+	 */
+	public static final int F_ILLEGAL = 1;
+	
+	/**
 	 * Constant representing the superclass of the class is a class in the target space.
 	 * 
 	 * Value is <code>2^0</code>
@@ -315,6 +322,13 @@ public interface IReference {
 	public int getReferenceKind();
 	
 	/**
+	 * Returns any flags set on the reference
+	 * 
+	 * @return any flags set on the reference
+	 */
+	public int getReferenceFlags();
+	
+	/**
 	 * Returns the type of reference that has been made - one of type, field, or method.
 	 * 
 	 * @return one of the reference type constants defined in this interface
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java
index d449f9c..6c74a40 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import java.util.Set;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.Flags;
 import org.eclipse.pde.api.tools.internal.comparator.ClassFileComparator;
 import org.eclipse.pde.api.tools.internal.comparator.Delta;
@@ -46,10 +46,21 @@ public class ApiComparator {
 	/**
 	 * Constant used for controlling tracing in the API comparator
 	 */
-	private static boolean DEBUG = Util.DEBUG;
+	static boolean DEBUG = Util.DEBUG;
 
+	/**
+	 * Default empty delta
+	 */
 	public static final IDelta NO_DELTA = new Delta();
 	
+	/**
+	 * Reports a delta for a API component version change
+	 * @param apiComponent2
+	 * @param id
+	 * @param apiComponentVersion
+	 * @param apiComponentVersion2
+	 * @param globalDelta
+	 */
 	private static void checkBundleVersionChanges(IApiComponent apiComponent2, String id, String apiComponentVersion, String apiComponentVersion2, Delta globalDelta) {
 		Version version = null;
 		try {
@@ -104,65 +115,13 @@ public class ApiComparator {
 	}
 
 	/**
-	 * Returns a delta that corresponds to the comparison of the two given API baselines.
-	 * Nested API components with the same versions are not compared.
-	 * <p>Equivalent to: compare(baseline, baseline2, false);</p>
-	 * 
-	 * @param referenceBaseline the given API baseline which is the reference
-	 * @param baseline the given API baseline to compare with
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @throws IllegalArgumentException if one of the two baselines is null
-	 */
-	public static IDelta compare(
-			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline) {
-		return compare(referenceBaseline, baseline, VisibilityModifiers.ALL_VISIBILITIES, false);
-	}
-
-	/**
-	 * Returns a delta that corresponds to the comparison of the two given API baselines. 
-	 * 
-	 * @param referenceBaseline the given API baseline which is the reference
-	 * @param baseline the given API baseline to compare with
-	 * @param force a flag to force the comparison of nested API components with the same versions 
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @throws IllegalArgumentException if one of the two baselines is null
-	 */
-	public static IDelta compare(
-			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline,
-			final boolean force) {
-		return compare(referenceBaseline, baseline, VisibilityModifiers.ALL_VISIBILITIES, force);
-	}
-
-	/**
-	 * Returns a delta that corresponds to the comparison of the two given API baselines. 
-	 * Nested API components with the same versions are not compared.
-	 * <p>Equivalent to: compare(baseline, baseline2, visibilityModifiers, false);</p>
-	 * 
-	 * @param referenceBaseline the given API baseline which is the reference
-	 * @param baseline the given API baseline to compare with
-	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @throws IllegalArgumentException if one of the two baselines is null
-	 */
-	public static IDelta compare(
-			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline,
-			final int visibilityModifiers) {
-		return compare(referenceBaseline, baseline, visibilityModifiers, false);
-	}
-
-	/**
 	 * Returns a delta that corresponds to the difference between the given baseline and the reference.
 	 * 
 	 * @param referenceBaseline the given API baseline which is used as the reference
 	 * @param baseline the given API baseline to compare with
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
 	 * @param force a flag to force the comparison of nested API components with the same versions 
+	 * @param monitor
 	 *
 	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
 	 * @throws IllegalArgumentException if one of the two baselines is null
@@ -171,7 +130,9 @@ public class ApiComparator {
 			final IApiBaseline referenceBaseline,
 			final IApiBaseline baseline,
 			final int visibilityModifiers,
-			final boolean force) {
+			final boolean force, 
+			final IProgressMonitor monitor) {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 2);
 		try {
 			if (referenceBaseline == null || baseline == null) {
 				throw new IllegalArgumentException("None of the baselines must be null"); //$NON-NLS-1$
@@ -181,9 +142,10 @@ public class ApiComparator {
 			Set apiComponentsIds = new HashSet();
 			final Delta globalDelta = new Delta();
 			for (int i = 0, max = apiComponents.length; i < max; i++) {
+				Util.updateMonitor(localmonitor);
 				IApiComponent apiComponent = apiComponents[i];
 				if (!apiComponent.isSystemComponent()) {
-					String id = apiComponent.getId();
+					String id = apiComponent.getSymbolicName();
 					IApiComponent apiComponent2 = baseline.getApiComponent(id);
 					IDelta delta = null;
 					if (apiComponent2 == null) {
@@ -191,7 +153,7 @@ public class ApiComparator {
 						delta =
 							new Delta(
 									null,
-									IDelta.API_PROFILE_ELEMENT_TYPE,
+									IDelta.API_BASELINE_ELEMENT_TYPE,
 									IDelta.REMOVED,
 									IDelta.API_COMPONENT,
 									null,
@@ -206,7 +168,7 @@ public class ApiComparator {
 								|| force) {
 							long time = System.currentTimeMillis();
 							try {
-								delta = compare(apiComponent, apiComponent2, referenceBaseline, baseline, visibilityModifiers);
+								delta = compare(apiComponent, apiComponent2, referenceBaseline, baseline, visibilityModifiers, localmonitor.newChild(1));
 							} finally {
 								if (DEBUG) {
 									System.out.println("Time spent for " + id+ " " + versionString + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -219,16 +181,18 @@ public class ApiComparator {
 					}
 				}
 			}
+			Util.updateMonitor(localmonitor, 1);
 			for (int i = 0, max = apiComponents2.length; i < max; i++) {
+				Util.updateMonitor(localmonitor);
 				IApiComponent apiComponent = apiComponents2[i];
 				if (!apiComponent.isSystemComponent()) {
-					String id = apiComponent.getId();
+					String id = apiComponent.getSymbolicName();
 					if (!apiComponentsIds.contains(id)) {
 						// addition of an API component
 						globalDelta.add(
 								new Delta(
 										null,
-										IDelta.API_PROFILE_ELEMENT_TYPE,
+										IDelta.API_BASELINE_ELEMENT_TYPE,
 										IDelta.ADDED,
 										IDelta.API_COMPONENT,
 										null,
@@ -238,10 +202,10 @@ public class ApiComparator {
 				}
 			}
 			return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
 		}
-		return null;
+		finally {
+			localmonitor.done();
+		}
 	}
 
 	/**
@@ -251,6 +215,7 @@ public class ApiComparator {
 	 * @param referenceBaseline the given API baseline which is used as the reference
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
 	 * @param force a flag to force the comparison of nested API components with the same versions 
+	 * @param monitor
 	 *
 	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
 	 * @exception IllegalArgumentException if:<ul>
@@ -262,8 +227,9 @@ public class ApiComparator {
 			final IApiComponent component,
 			final IApiBaseline referenceBaseline,
 			final int visibilityModifiers,
-			final boolean force) {
-		
+			final boolean force, 
+			final IProgressMonitor monitor) {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 2);
 		try {
 			if (component == null) {
 				throw new IllegalArgumentException("The composent cannot be null"); //$NON-NLS-1$
@@ -271,16 +237,17 @@ public class ApiComparator {
 			if (referenceBaseline == null) {
 				throw new IllegalArgumentException("The reference baseline cannot be null"); //$NON-NLS-1$
 			}
+			Util.updateMonitor(localmonitor, 1);
 			IDelta delta = null;
 			if (!component.isSystemComponent()) {
-				String id = component.getId();
+				String id = component.getSymbolicName();
 				IApiComponent apiComponent2 = referenceBaseline.getApiComponent(id);
 				if (apiComponent2 == null) {
 					// report addition of an API component
 					delta =
 						new Delta(
 							null,
-							IDelta.API_PROFILE_ELEMENT_TYPE,
+							IDelta.API_BASELINE_ELEMENT_TYPE,
 							IDelta.ADDED,
 							IDelta.API_COMPONENT,
 							null,
@@ -291,7 +258,7 @@ public class ApiComparator {
 							|| force) {
 						long time = System.currentTimeMillis();
 						try {
-							delta = compare(apiComponent2, component, visibilityModifiers);
+							delta = compare(apiComponent2, component, visibilityModifiers, localmonitor.newChild(1));
 						} finally {
 							if (DEBUG) {
 								System.out.println("Time spent for " + id+ " " + component.getVersion() + " : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -304,44 +271,22 @@ public class ApiComparator {
 				}
 			}
 			return NO_DELTA;
-		} catch (CoreException e) {
-			ApiPlugin.log(e);
 		}
-		return null;
+		finally {
+			localmonitor.done();
+		}
 	}
 
 	/**
 	 * Returns a delta that corresponds to the comparison of the two given API components.
 	 * The two components are compared even if their versions are identical.
 	 * 
-	 * @param referenceComponent the given API component from which the given class file is coming from
-	 * @param component2 the given API component to compare with
-	 * @param referenceBaseline the given API baseline from which the given component <code>component</code> is coming from
-	 * @param baseline the given API baseline from which the given component <code>component2</code> is coming from
-	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @exception IllegalArgumentException if:<ul>
-	 * <li>both given components are null</li>
-	 * <li>one of the baselines is null</li>
-	 * </ul>
-	 */
-	public static IDelta compare(
-			final IApiComponent referenceComponent,
-			final IApiComponent component2,
-			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline) {
-		return compare(referenceComponent, component2, referenceBaseline, baseline, VisibilityModifiers.ALL_VISIBILITIES);
-	}
-	/**
-	 * Returns a delta that corresponds to the comparison of the two given API components.
-	 * The two components are compared even if their versions are identical.
-	 * 
 	 * @param referenceComponent the given API component
 	 * @param component2 the given API component to compare with
 	 * @param referenceBaseline the given API baseline from which the given component <code>component</code> is coming from
 	 * @param baseline the given API baseline from which the given component <code>component2</code> is coming from
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
+	 * @param monitor
 	 *
 	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
 	 * @exception IllegalArgumentException if:<ul>
@@ -354,43 +299,46 @@ public class ApiComparator {
 			final IApiComponent component2,
 			final IApiBaseline referenceBaseline,
 			final IApiBaseline baseline,
-			final int visibilityModifiers) {
+			final int visibilityModifiers, 
+			final IProgressMonitor monitor) {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 3);
 		try {
-		
 			if (referenceComponent == null) {
 				if (component2 == null) {
 					throw new IllegalArgumentException("Both components cannot be null"); //$NON-NLS-1$
 				}
 				return new Delta(
 						null,
-						IDelta.API_PROFILE_ELEMENT_TYPE,
+						IDelta.API_BASELINE_ELEMENT_TYPE,
 						IDelta.ADDED,
 						IDelta.API_COMPONENT,
 						null,
-						component2.getId(),
+						component2.getSymbolicName(),
 						Util.getComponentVersionsId(component2));
 			} else if (component2 == null) {
-				String referenceComponentId = referenceComponent.getId();
+				String referenceComponentId = referenceComponent.getSymbolicName();
 				return new Delta(
 						null,
-						IDelta.API_PROFILE_ELEMENT_TYPE,
+						IDelta.API_BASELINE_ELEMENT_TYPE,
 						IDelta.REMOVED,
 						IDelta.API_COMPONENT,
 						null,
 						referenceComponentId,
 						Util.getComponentVersionsId(referenceComponent));
 			}
+			Util.updateMonitor(localmonitor, 1);
 			if (referenceBaseline == null || baseline == null) {
 				throw new IllegalArgumentException("The baselines cannot be null"); //$NON-NLS-1$
 			}
-			String referenceComponentId = referenceComponent.getId();
+			String referenceComponentId = referenceComponent.getSymbolicName();
 			final Delta globalDelta = new Delta();
 	
 			// check the EE first
 			Set referenceEEs = Util.convertAsSet(referenceComponent.getExecutionEnvironments());
 			Set componentsEEs = Util.convertAsSet(component2.getExecutionEnvironments());
-			
+			Util.updateMonitor(localmonitor, 1);
 			for (Iterator iterator = referenceEEs.iterator(); iterator.hasNext(); ) {
+				Util.updateMonitor(localmonitor);
 				String currentEE = (String) iterator.next();
 				if (!componentsEEs.remove(currentEE)) {
 					globalDelta.add(
@@ -408,6 +356,7 @@ public class ApiComparator {
 				}
 			}
 			for (Iterator iterator = componentsEEs.iterator(); iterator.hasNext(); ) {
+				Util.updateMonitor(localmonitor);
 				String currentEE = (String) iterator.next();
 				globalDelta.add(
 						new Delta(
@@ -422,12 +371,16 @@ public class ApiComparator {
 								referenceComponentId,
 								new String[] { currentEE, Util.getComponentVersionsId(referenceComponent)}));
 			}
-			return internalCompare(referenceComponent, component2, referenceBaseline, baseline, visibilityModifiers, globalDelta);
+			return internalCompare(referenceComponent, component2, referenceBaseline, baseline, visibilityModifiers, globalDelta, localmonitor.newChild(1));
 		} catch(CoreException e) {
 			// null means an error case
 			return null;
 		}
+		finally {
+			localmonitor.done();
+		}
 	}
+
 	/**
 	 * Returns a delta that corresponds to the difference between the given component and the given reference component.
 	 * The given component cannot be null.
@@ -435,31 +388,35 @@ public class ApiComparator {
 	 * @param referenceComponent the given API component that is used as the reference
 	 * @param component the given component to compare with
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
-	 * @param force a flag to force the comparison of nested API components with the same versions 
+	 * @param force a flag to force the comparison of nested API components with the same versions
+	 * @param monitor 
 	 *
 	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
 	 */
 	public static IDelta compare(
 			final IApiComponent referenceComponent,
 			final IApiComponent component,
-			final int visibilityModifiers) {
-
+			final int visibilityModifiers, 
+			final IProgressMonitor monitor) {
 		try {
-			return compare(referenceComponent, component, referenceComponent == null ? null : referenceComponent.getBaseline(), component.getBaseline(), visibilityModifiers);
+			return compare(referenceComponent, component, referenceComponent == null ? null : referenceComponent.getBaseline(), component.getBaseline(), visibilityModifiers, monitor);
 		} catch (CoreException e) {
 			ApiPlugin.log(e);
 		}
 		return null;
 	}
+
 	/**
 	 * Returns a delta that corresponds to the comparison of the given class file with the reference. 
 	 * 
 	 * @param typeRoot2 the given class file that comes from the <code>component2</code>
 	 * @param component the given API component from the reference
 	 * @param component2 the given API component to compare with
+	 * @param reexporter the API component re-exporting component2, or <code>null</code> if none
 	 * @param referenceBaseline the given API baseline from which the given component <code>component</code> is coming from
 	 * @param baseline the given API baseline from which the given component <code>component2</code> is coming from
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
+	 * @param monitor
 	 *
 	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
 	 * @exception IllegalArgumentException if:<ul>
@@ -472,9 +429,10 @@ public class ApiComparator {
 			final IApiTypeRoot typeRoot2,
 			final IApiComponent component,
 			final IApiComponent component2,
+			final IApiComponent reexporter,
 			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline,
-			final int visibilityModifiers) {
+			final IApiBaseline baseline, 
+			final int visibilityModifiers, final IProgressMonitor monitor) {
 		
 		if (typeRoot2 == null) {
 			throw new IllegalArgumentException("The given class file is null"); //$NON-NLS-1$
@@ -485,7 +443,7 @@ public class ApiComparator {
 		if (referenceBaseline == null || baseline == null) {
 			throw new IllegalArgumentException("One of the given baselines is null"); //$NON-NLS-1$
 		}
-
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 6);
 		try {
 			IApiType typeDescriptor2 = typeRoot2.getStructure();
 			if (typeDescriptor2.isMemberType() || typeDescriptor2.isAnonymous() || typeDescriptor2.isLocal()) {
@@ -494,7 +452,7 @@ public class ApiComparator {
 			}
 			String typeName = typeRoot2.getTypeName();
 			IApiTypeRoot typeRoot = null;
-			String id = component.getId();
+			String id = component.getSymbolicName();
 			if (Util.ORG_ECLIPSE_SWT.equals(id)) {
 				typeRoot = component.findTypeRoot(typeName);
 			} else {
@@ -506,20 +464,22 @@ public class ApiComparator {
 			if (elementDescription2 != null) {
 				visibility = elementDescription2.getVisibility();
 			}
+			Util.updateMonitor(localmonitor, 1);
 			final IApiDescription referenceApiDescription = component.getApiDescription();
 			IApiAnnotations refElementDescription = referenceApiDescription.resolveAnnotations(typeDescriptor2.getHandle());
 			int refVisibility = 0;
 			if (refElementDescription != null) {
 				refVisibility = refElementDescription.getVisibility();
 			}
+			Util.updateMonitor(localmonitor, 1);
 			String deltaComponentID = Util.getDeltaComponentVersionsId(component2);
 			if (typeRoot == null) {
-				if (isAPI(visibility, typeDescriptor2)) {
+				if (Util.isAPI(visibility, typeDescriptor2)) {
 					return new Delta(
 							deltaComponentID,
 							IDelta.API_COMPONENT_ELEMENT_TYPE,
 							IDelta.ADDED,
-							IDelta.TYPE,
+							reexporter == null ? IDelta.TYPE : IDelta.REEXPORTED_TYPE,
 							elementDescription2 != null ? elementDescription2.getRestrictions() : RestrictionModifiers.NO_RESTRICTIONS,
 							0,
 							typeDescriptor2.getModifiers(),
@@ -529,13 +489,14 @@ public class ApiComparator {
 				}
 				return NO_DELTA;
 			}
+			Util.updateMonitor(localmonitor, 1);
 			IApiType typeDescriptor = typeRoot.getStructure();
 			if ((visibility & visibilityModifiers) == 0) {
 				if ((refVisibility & visibilityModifiers) == 0) {
 					// no delta
 					return NO_DELTA;
 				}
-				if (isAPI(refVisibility, typeDescriptor)) {
+				if (Util.isAPI(refVisibility, typeDescriptor)) {
 					return new Delta(
 							deltaComponentID,
 							IDelta.API_COMPONENT_ELEMENT_TYPE,
@@ -548,8 +509,8 @@ public class ApiComparator {
 							typeName,
 							new String[] { typeName, Util.getComponentVersionsId(component2)});
 				}
-			} else if (!isAPI(refVisibility, typeDescriptor)
-					&& isAPI(visibility, typeDescriptor2)) {
+			} else if (!Util.isAPI(refVisibility, typeDescriptor)
+					&& Util.isAPI(visibility, typeDescriptor2)) {
 				return new Delta(
 						deltaComponentID,
 						IDelta.API_COMPONENT_ELEMENT_TYPE,
@@ -562,6 +523,7 @@ public class ApiComparator {
 						typeName,
 						new String[] { typeName, Util.getComponentVersionsId(component2)});
 			}
+			Util.updateMonitor(localmonitor, 1);
 			if (visibilityModifiers == VisibilityModifiers.API) {
 				// if the visibility is API, we only consider public and protected types
 				if (Util.isDefault(typeDescriptor2.getModifiers())
@@ -585,8 +547,9 @@ public class ApiComparator {
 					}
 				}
 			}
+			Util.updateMonitor(localmonitor, 1);
 			ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, component2, referenceBaseline, baseline, visibilityModifiers);
-			IDelta delta = comparator.getDelta();
+			IDelta delta = comparator.getDelta(localmonitor.newChild(1));
 			if (DEBUG) {
 				IStatus status = comparator.getStatus();
 				if(status != null) {
@@ -597,6 +560,9 @@ public class ApiComparator {
 		} catch (CoreException e) {
 			return null;
 		}
+		finally {
+			localmonitor.done();
+		}
 	}
 
 	/**
@@ -609,6 +575,7 @@ public class ApiComparator {
 	 * @param referenceBaseline the given API baseline from which the given component <code>component</code> is coming from
 	 * @param baseline the given API baseline from which the given component <code>component2</code> is coming from
 	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
+	 * @param monitor
 	 *
 	 * @return a delta, an empty delta if no difference is found or <code>null</code> if the delta detection failed
 	 * @exception IllegalArgumentException if:<ul>
@@ -623,8 +590,8 @@ public class ApiComparator {
 			final IApiComponent component2,
 			final IApiBaseline referenceBaseline,
 			final IApiBaseline baseline,
-			final int visibilityModifiers) {
-		
+			final int visibilityModifiers, 
+			final IProgressMonitor monitor) {
 		if (typeRoot == null || typeRoot2 == null) {
 			throw new IllegalArgumentException("One of the given class files is null"); //$NON-NLS-1$
 		}
@@ -645,7 +612,7 @@ public class ApiComparator {
 						referenceBaseline,
 						baseline,
 						visibilityModifiers);
-			delta = comparator.getDelta();
+			delta = comparator.getDelta(SubMonitor.convert(monitor));
 			if (DEBUG) {
 				IStatus status = comparator.getStatus();
 				if(status != null) {
@@ -658,6 +625,7 @@ public class ApiComparator {
 		}
 		return delta;
 	}
+	
 	/**
 	 * Returns a delta that corresponds to the comparison of the two given API baselines. 
 	 * Nested API components with the same versions are not compared.
@@ -682,89 +650,53 @@ public class ApiComparator {
 		if (scope == null || baseline == null) {
 			throw new IllegalArgumentException("None of the scope or the baseline must be null"); //$NON-NLS-1$
 		}
-		IProgressMonitor localMonitor = null;
-		if (monitor == null) {
-			localMonitor = new NullProgressMonitor();
-		} else {
-			localMonitor = monitor;
-		}
-		final Set deltas = new HashSet();
-		final CompareApiScopeVisitor visitor = new CompareApiScopeVisitor(deltas, baseline, force, visibilityModifiers, localMonitor);
-		scope.accept(visitor);
-		if (visitor.containsError()) {
-			return null;
-		}
-		if (deltas.isEmpty()) {
-			return NO_DELTA;
-		}
-		final Delta globalDelta = new Delta();
-		for (Iterator iterator = deltas.iterator(); iterator.hasNext(); ) {
-			IDelta delta = (IDelta) iterator.next();
-			delta.accept(new DeltaVisitor() {
-				public void endVisit(IDelta localDelta) {
-					if (localDelta.getChildren().length == 0) {
-						switch(localDelta.getElementType()) {
-							case IDelta.ANNOTATION_ELEMENT_TYPE :
-							case IDelta.ENUM_ELEMENT_TYPE :
-							case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
-							case IDelta.METHOD_ELEMENT_TYPE :
-							case IDelta.INTERFACE_ELEMENT_TYPE :
-							case IDelta.CLASS_ELEMENT_TYPE :
-							case IDelta.FIELD_ELEMENT_TYPE :
-							case IDelta.API_COMPONENT_ELEMENT_TYPE :
-							case IDelta.API_PROFILE_ELEMENT_TYPE : 
-								globalDelta.add(localDelta);
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 2);
+		try {
+			final Set deltas = new HashSet();
+			final CompareApiScopeVisitor visitor = new CompareApiScopeVisitor(deltas, baseline, force, visibilityModifiers, localmonitor.newChild(1));
+			scope.accept(visitor);
+			if (visitor.containsError()) {
+				return null;
+			}
+			if (deltas.isEmpty()) {
+				return NO_DELTA;
+			}
+			final Delta globalDelta = new Delta();
+			for (Iterator iterator = deltas.iterator(); iterator.hasNext(); ) {
+				IDelta delta = (IDelta) iterator.next();
+				delta.accept(new DeltaVisitor() {
+					public void endVisit(IDelta localDelta) {
+						if (localDelta.getChildren().length == 0) {
+							switch(localDelta.getElementType()) {
+								case IDelta.ANNOTATION_ELEMENT_TYPE :
+								case IDelta.ENUM_ELEMENT_TYPE :
+								case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
+								case IDelta.METHOD_ELEMENT_TYPE :
+								case IDelta.INTERFACE_ELEMENT_TYPE :
+								case IDelta.CLASS_ELEMENT_TYPE :
+								case IDelta.FIELD_ELEMENT_TYPE :
+								case IDelta.API_COMPONENT_ELEMENT_TYPE :
+								case IDelta.API_BASELINE_ELEMENT_TYPE : 
+									globalDelta.add(localDelta);
+							}
 						}
 					}
-				}
-			});
+				});
+			}
+			Util.updateMonitor(localmonitor, 1);
+			return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
+		}
+		finally {
+			localmonitor.done();
 		}
-		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
 	}
 
 	/**
-	 * Returns a delta that corresponds to the comparison of the two given API baselines. 
-	 * Nested API components with the same versions are not compared.
-	 * <p>Equivalent to: compare(baseline, baseline2, visibilityModifiers, force, null);</p>
-	 * 
-	 * @param scope the given scope for the comparison
-	 * @param baseline the given API baseline to compare with
-	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
-	 * @param force a flag to force the comparison of nested API components with the same versions 
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @throws IllegalArgumentException if one of the two baselines is null
-	 *         CoreException if one of the element in the scope cannot be visited
-	 */
-	public static IDelta compare(
-			final IApiScope scope,
-			final IApiBaseline baseline,
-			final int visibilityModifiers,
-			final boolean force) throws CoreException {
-		return compare(scope, baseline, visibilityModifiers, force, null);
-	}
-	/**
-	 * Returns a delta that corresponds to the comparison of the two given API baselines. 
-	 * Nested API components with the same versions are not compared.
-	 * <p>Equivalent to: compare(baseline, baseline2, visibilityModifiers, false);</p>
-	 * 
-	 * @param scope the given scope for the comparison
-	 * @param baseline the given API baseline to compare with
-	 * @param visibilityModifiers the given visibility that triggers what visibility should be used for the comparison
-	 *
-	 * @return a delta, an empty delta if no difference is found or null if the delta detection failed
-	 * @throws IllegalArgumentException if one of the two baselines is null
-	 *         CoreException if one of the element in the scope cannot be visited
-	 */
-	public static IDelta compare(
-			final IApiScope scope,
-			final IApiBaseline baseline,
-			final int visibilityModifiers) throws CoreException {
-		return compare(scope, baseline, visibilityModifiers, false);
-	}
-
-	/* (no javadoc)
 	 * Returns true, if the given type descriptor should be skipped, false otherwise.
+	 * @param visibilityModifiers
+	 * @param elementDescription
+	 * @param typeDescriptor
+	 * @return
 	 */
 	static boolean filterType(final int visibilityModifiers,
 			IApiAnnotations elementDescription,
@@ -785,19 +717,31 @@ public class ApiComparator {
 		return false;
 	}
 
-	private static IDelta internalCompare(
-			final IApiComponent component,
-			final IApiComponent component2,
+	/**
+	 * Performs the internal compare of the given {@link IApiComponent}s using their type containers
+	 * @param component
+	 * @param component2
+	 * @param referenceBaseline
+	 * @param baseline
+	 * @param visibilityModifiers
+	 * @param globalDelta
+	 * @param monitor
+	 * 
+	 * @return a delta of changed API elements
+	 * @throws CoreException
+	 */
+	private static IDelta internalCompare(final IApiComponent component, 
+			final IApiComponent component2, 
 			final IApiBaseline referenceBaseline,
-			final IApiBaseline baseline,
-			final int visibilityModifiers,
-			final Delta globalDelta) throws CoreException {
-
+			final IApiBaseline baseline, 
+			final int visibilityModifiers,	
+			final Delta globalDelta, 
+			final IProgressMonitor monitor) throws CoreException {
 		final Set typeRootBaseLineNames = new HashSet();
-		final String id = component.getId();
+		final String id = component.getSymbolicName();
 		IApiTypeContainer[] typeRootContainers = null;
 		IApiTypeContainer[] typeRootContainers2 = null;
-		
+		final SubMonitor localmonitor = SubMonitor.convert(monitor, 4);
 		final boolean isSWT = Util.ORG_ECLIPSE_SWT.equals(id);
 		if (isSWT) {
 			typeRootContainers = component.getApiTypeContainers();
@@ -808,13 +752,15 @@ public class ApiComparator {
 		}
 		final IApiDescription apiDescription = component.getApiDescription();
 		final IApiDescription apiDescription2 = component2.getApiDescription();
-
+		Util.updateMonitor(localmonitor, 1);
 		if (typeRootContainers != null) {
 			for (int i = 0, max = typeRootContainers.length; i < max; i++) {
+				Util.updateMonitor(localmonitor);
 				IApiTypeContainer container = typeRootContainers[i];
 				try {
 					container.accept(new ApiTypeContainerVisitor() {
 						public void visit(String packageName, IApiTypeRoot typeRoot) {
+							Util.updateMonitor(localmonitor);
 							String typeName = typeRoot.getTypeName();
 							try {
 								IApiType typeDescriptor = typeRoot.getStructure();
@@ -842,9 +788,10 @@ public class ApiComparator {
 									IApiComponent[] providers = component2.getBaseline().resolvePackage(component2, packageName);
 									int index = 0;
 									while (typeRoot2 == null && index < providers.length) {
+										Util.updateMonitor(localmonitor);
 										IApiComponent p = providers[index];
 										if (!p.equals(component2)) {
-											String id2 = p.getId();
+											String id2 = p.getSymbolicName();
 											if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
 												typeRoot2 = p.findTypeRoot(typeName);
 											} else {
@@ -869,6 +816,7 @@ public class ApiComparator {
 									provider = component2;
 									providerApiDesc = apiDescription2;
 								}
+								Util.updateMonitor(localmonitor);
 								deltaComponentID = Util.getDeltaComponentVersionsId(component2);
 								if(typeRoot2 == null) {
 									if ((visibility & visibilityModifiers) == 0) {
@@ -912,8 +860,8 @@ public class ApiComparator {
 											return;
 										}
 									}
-									if (isAPI(visibility, typeDescriptor)) {
-										if (!isAPI(visibility2, typeDescriptor2)) {
+									if (Util.isAPI(visibility, typeDescriptor)) {
+										if (!Util.isAPI(visibility2, typeDescriptor2)) {
 											globalDelta.add(
 												new Delta(
 													deltaComponentID,
@@ -946,7 +894,7 @@ public class ApiComparator {
 									}
 									typeRootBaseLineNames.add(typeName);
 									ClassFileComparator comparator = new ClassFileComparator(typeDescriptor, typeRoot2, component, provider, referenceBaseline, baseline, visibilityModifiers);
-									IDelta delta = comparator.getDelta();
+									IDelta delta = comparator.getDelta(localmonitor.newChild(1));
 									if (DEBUG) {
 										IStatus status = comparator.getStatus();
 										if(status != null) {
@@ -957,6 +905,7 @@ public class ApiComparator {
 										globalDelta.add(delta);
 									}
 								}
+								Util.updateMonitor(localmonitor);
 							} catch (CoreException e) {
 								ApiPlugin.log(e);
 							}
@@ -967,10 +916,12 @@ public class ApiComparator {
 				}
 			}
 		}
+		Util.updateMonitor(localmonitor, 1);
 		IRequiredComponentDescription[] requiredComponents = component.getRequiredComponents();
 		int length = requiredComponents.length;
 		if (length != 0) {
 			for (int j = 0; j < length; j++) {
+				Util.updateMonitor(localmonitor);
 				IRequiredComponentDescription description = requiredComponents[j];
 				if (description.isExported()) {
 					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
@@ -983,10 +934,12 @@ public class ApiComparator {
 					IApiTypeContainer[] apiTypeContainers = currentRequiredApiComponent.getApiTypeContainers();
 					if (apiTypeContainers != null) {
 						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
+							Util.updateMonitor(localmonitor);
 							IApiTypeContainer container = apiTypeContainers[i];
 							try {
 								container.accept(new ApiTypeContainerVisitor() {
 									public void visit(String packageName, IApiTypeRoot typeRoot) {
+										Util.updateMonitor(localmonitor);
 										String typeName = typeRoot.getTypeName();
 										try {
 											IApiType typeDescriptor = typeRoot.getStructure();
@@ -1013,7 +966,7 @@ public class ApiComparator {
 												while (typeRoot2 == null && index < providers.length) {
 													IApiComponent p = providers[index];
 													if (!p.equals(component2)) {
-														String id2 = p.getId();
+														String id2 = p.getSymbolicName();
 														if (Util.ORG_ECLIPSE_SWT.equals(id2)) {
 															typeRoot2 = p.findTypeRoot(typeName);
 														} else {
@@ -1065,8 +1018,8 @@ public class ApiComparator {
 														|| Flags.isPrivate(typeDescriptor.getModifiers())) {
 													return;
 												}
-												if (isAPI(visibility, typeDescriptor)) {
-													if (!isAPI(visibility2, typeDescriptor2)) {
+												if (Util.isAPI(visibility, typeDescriptor)) {
+													if (!Util.isAPI(visibility2, typeDescriptor2)) {
 														globalDelta.add(
 															new Delta(
 																currentComponentID,
@@ -1096,12 +1049,15 @@ public class ApiComparator {
 				}
 			}
 		}
+		Util.updateMonitor(localmonitor, 1);
 		if (typeRootContainers2 != null) {
 			for (int i = 0, max = typeRootContainers2.length; i < max; i++) {
+				Util.updateMonitor(localmonitor);
 				IApiTypeContainer container = typeRootContainers2[i];
 				try {
 					container.accept(new ApiTypeContainerVisitor() {
 						public void visit(String packageName, IApiTypeRoot typeRoot) {
+							Util.updateMonitor(localmonitor);
 							String typeName = typeRoot.getTypeName();
 							try {
 								IApiType type = typeRoot.getStructure();
@@ -1141,10 +1097,12 @@ public class ApiComparator {
 				}
 			}
 		}
+		Util.updateMonitor(localmonitor, 1);
 		requiredComponents = component2.getRequiredComponents();
 		length = requiredComponents.length;
 		if (length != 0) {
 			for (int j = 0; j < length; j++) {
+				Util.updateMonitor(localmonitor);
 				IRequiredComponentDescription description = requiredComponents[j];
 				if (description.isExported()) {
 					final String currentComponentID = Util.getDeltaComponentVersionsId(component);
@@ -1157,10 +1115,12 @@ public class ApiComparator {
 					final IApiDescription reexportedApiDescription = currentRequiredApiComponent.getApiDescription();
 					if (apiTypeContainers != null) {
 						for (int i = 0, max = apiTypeContainers.length; i < max; i++) {
+							Util.updateMonitor(localmonitor);
 							IApiTypeContainer container = apiTypeContainers[i];
 							try {
 								container.accept(new ApiTypeContainerVisitor() {
 									public void visit(String packageName, IApiTypeRoot typeRoot) {
+										Util.updateMonitor(localmonitor);
 										String typeName = typeRoot.getTypeName();
 										try {
 											IApiType typeDescriptor = typeRoot.getStructure();
@@ -1205,13 +1165,6 @@ public class ApiComparator {
 		return globalDelta.isEmpty() ? NO_DELTA : globalDelta;
 	}
 
-	private static boolean isAPI(int visibility,
-			IApiType typeDescriptor) {
-		int access = typeDescriptor.getModifiers();
-		return VisibilityModifiers.isAPI(visibility)
-			&& (Flags.isPublic(access) || Flags.isProtected(access));
-	}
-	
 	/**
 	 * Method used for initializing tracing in the API comparator
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
index 18e139d..6e4389c 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/ApiScope.java
@@ -10,12 +10,13 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.provisional.comparator;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.Iterator;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.model.Messages;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.ApiScopeVisitor;
@@ -36,7 +37,7 @@ public class ApiScope implements IApiScope {
 	/**
 	 * Contains all API elements of this scope
 	 */
-	Set apiElements;
+	ArrayList elements;
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiScope#accept(org.eclipse.pde.api.tools.internal.provisional.model.ApiScopeVisitor)
@@ -76,25 +77,47 @@ public class ApiScope implements IApiScope {
 							new Status(
 									IStatus.ERROR,
 									ApiPlugin.PLUGIN_ID,
-									Messages.bind(
+									NLS.bind(
 											Messages.ApiScope_0,
 											Util.getApiElementType(type))));
 			}
 		}
 	}
 
-	public void add(IApiElement apiElement) {
-		if (this.apiElements == null) {
-			this.apiElements = new HashSet();
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiScope#addElement(org.eclipse.pde.api.tools.internal.provisional.model.IApiElement)
+	 */
+	public void addElement(IApiElement newelement) {
+		if (this.elements == null) {
+			this.elements = new ArrayList();
 		}
-		this.apiElements.add(apiElement);
+		this.elements.add(newelement);
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiScope#encloses(org.eclipse.pde.api.tools.internal.provisional.model.IApiElement)
+	 */
+	public boolean encloses(IApiElement element) {
+		if(element != null) {
+			IApiComponent component = element.getApiComponent();
+			IApiComponent enclosing = null;
+			for(Iterator iter = this.elements.iterator(); iter.hasNext();) {
+				enclosing = ((IApiElement)iter.next()).getApiComponent();
+				if(component.equals(enclosing)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiScope#getApiElement()
 	 */
 	public IApiElement[] getApiElements() {
-		if (this.apiElements == null || this.apiElements.size() == 0) return NO_ELEMENTS;
-		return (IApiElement[]) this.apiElements.toArray(new IApiElement[this.apiElements.size()]);
+		if (this.elements == null || this.elements.size() == 0) {
+			return NO_ELEMENTS;
+		}
+		return (IApiElement[]) this.elements.toArray(new IApiElement[this.elements.size()]);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/CompareApiScopeVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/CompareApiScopeVisitor.java
index 344a929..71ac287 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/CompareApiScopeVisitor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/CompareApiScopeVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,8 +50,8 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 	
 	public boolean visit(IApiBaseline baseline) throws CoreException {
 		try {
-			Util.checkCanceled(this.monitor);
-			IDelta delta = ApiComparator.compare(this.referenceBaseline, baseline, this.visibilityModifiers, this.force);
+			Util.updateMonitor(this.monitor);
+			IDelta delta = ApiComparator.compare(this.referenceBaseline, baseline, this.visibilityModifiers, this.force, null);
 			if (delta != null) {
 				delta.accept(new DeltaVisitor() {
 					public void endVisit(IDelta localDelta) {
@@ -71,11 +71,11 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 
 	public boolean visit(IApiTypeContainer container) throws CoreException {
 		try {
-			Util.checkCanceled(this.monitor);
+			Util.updateMonitor(this.monitor);
 			container.accept(new ApiTypeContainerVisitor() {
 				public void visit(String packageName, IApiTypeRoot typeroot) {
 					try {
-						Util.checkCanceled(CompareApiScopeVisitor.this.monitor);
+						Util.updateMonitor(CompareApiScopeVisitor.this.monitor);
 						compareApiTypeRoot(typeroot);
 					} catch (CoreException e) {
 						ApiPlugin.log(e);
@@ -90,12 +90,12 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 
 	public boolean visit(IApiComponent component) throws CoreException {
 		try {
-			Util.checkCanceled(this.monitor);
+			Util.updateMonitor(this.monitor);
 			if (component.getErrors() != null) {
 				this.containsErrors = true;
 				return false;
 			}
-			IApiComponent referenceComponent = this.referenceBaseline.getApiComponent(component.getId());
+			IApiComponent referenceComponent = this.referenceBaseline.getApiComponent(component.getSymbolicName());
 			if (referenceComponent != null && referenceComponent.getErrors() != null) {
 				this.containsErrors = true;
 				return false;
@@ -103,8 +103,8 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 			if (component.isSourceComponent() || component.isSystemComponent()) {
 				return false;
 			}
-			Util.checkCanceled(this.monitor);
-			IDelta delta = ApiComparator.compare(referenceComponent, component, this.visibilityModifiers);
+			Util.updateMonitor(this.monitor);
+			IDelta delta = ApiComparator.compare(referenceComponent, component, this.visibilityModifiers, null);
 			if (delta != null) {
 				delta.accept(new DeltaVisitor() {
 					public void endVisit(IDelta localDelta) {
@@ -124,7 +124,7 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 	
 	public void visit(IApiTypeRoot root) throws CoreException {
 		try {
-			Util.checkCanceled(this.monitor);
+			Util.updateMonitor(this.monitor);
 			compareApiTypeRoot(root);
 		} finally {
 			this.monitor.worked(1);
@@ -140,7 +140,7 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 			this.containsErrors = true;
 			return;
 		}
-		IApiComponent referenceComponent = this.referenceBaseline.getApiComponent(apiComponent.getId());
+		IApiComponent referenceComponent = this.referenceBaseline.getApiComponent(apiComponent.getSymbolicName());
 		if (referenceComponent == null) return;
 		if (referenceComponent.getErrors() != null) {
 			this.containsErrors = true;
@@ -151,9 +151,9 @@ public class CompareApiScopeVisitor extends ApiScopeVisitor {
 				root,
 				referenceComponent,
 				apiComponent,
+				null,
 				this.referenceBaseline,
-				baseline,
-				this.visibilityModifiers);
+				baseline, this.visibilityModifiers, null);
 		if (delta != null) {
 			delta.accept(new DeltaVisitor() {
 				public void endVisit(IDelta localDelta) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java
index 5b2595c..6ad1a44 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/DeltaProcessor.java
@@ -56,9 +56,9 @@ public class DeltaProcessor {
 	 * @param delta
 	 * @return true if the delta represents a compatible change or not
 	 */
-	private static boolean isCompatible0(IDelta delta) {
+	static boolean isCompatible0(IDelta delta) {
 		switch(delta.getElementType()) {
-			case IDelta.API_PROFILE_ELEMENT_TYPE : {
+			case IDelta.API_BASELINE_ELEMENT_TYPE : {
 				return isApiProfileCompatible(delta);
 			}
 			case IDelta.API_COMPONENT_ELEMENT_TYPE : {
@@ -93,7 +93,7 @@ public class DeltaProcessor {
 	}
 	
 	/**
-	 * Returns if the API profile is compatible
+	 * Returns if the API baseline is compatible
 	 * @param delta
 	 * @return true if compatible, false otherwise
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java
index fe8a045..f8e3094 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/comparator/IDelta.java
@@ -48,11 +48,11 @@ public interface IDelta {
 	public static final int API_COMPONENT_ELEMENT_TYPE = 2;
 
 	/**
-	 * Element type constant indicating that the delta is reported against an API profile.
+	 * Element type constant indicating that the delta is reported against an API baseline.
 	 * 
 	 * @see #getElementType()
 	 */
-	public static final int API_PROFILE_ELEMENT_TYPE = 3;
+	public static final int API_BASELINE_ELEMENT_TYPE = 3;
 
 	/**
 	 * Element type constant indicating that the delta is reported against a class type declaration.
@@ -854,6 +854,18 @@ public interface IDelta {
 	 */
 	public static final int REEXPORTED_API_TYPE = 71;
 	/**
+	 * Delta kind flag that denotes adding or removing the deprecated modifiers on the corresponding element.
+	 * <br>
+	 * Applies to kinds:
+	 * <ul>
+	 * <li>{@link #ADDED}</li>
+	 * <li>{@link #REMOVED}</li>
+	 * </ul>
+	 * 
+	 * @see #getFlags()
+	 */
+	public static final int DEPRECATION = 72;
+	/**
 	 * Return true if the receiver has no children deltas, false otherwise.
 	 * 
 	 * @return true if the receiver has no children deltas, false otherwise.
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/descriptors/IComponentDescriptor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/descriptors/IComponentDescriptor.java
index 1a11c15..09e700c 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/descriptors/IComponentDescriptor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/descriptors/IComponentDescriptor.java
@@ -29,4 +29,12 @@ public interface IComponentDescriptor extends IElementDescriptor {
 	 */
 	public String getId();
 	
+	/**
+	 * Returns the version id for this component or <code>null</code> if
+	 * unspecified.
+	 * 
+	 * @return
+	 */
+	public String getVersion();
+	
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/ApiTypeContainerVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/ApiTypeContainerVisitor.java
index edadba6..0777628 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/ApiTypeContainerVisitor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/ApiTypeContainerVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public abstract class ApiTypeContainerVisitor {
 	public boolean visit(IApiComponent component) {
 		return true;
 	}
-
+	
 	/**
 	 * End visiting a component. This method is only called when
 	 * the class file container being visited is contained in an API component.
@@ -46,6 +46,31 @@ public abstract class ApiTypeContainerVisitor {
 	}
 
 	/**
+	 * Visits a container and returns whether class files
+	 * in the container should be visited.
+	 * <p>
+	 * The default implementation does nothing and returns <code>true</code>.
+	 * Subclasses may re-implement.
+	 * </p>
+	 * @param container
+	 * @return
+	 */
+	public boolean visit(IApiTypeContainer container) {
+		return true;
+	}
+	
+	/**
+	 * Ends visiting a container.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may re-implement.
+	 * </p>
+	 * @param container
+	 */
+	public void end(IApiTypeContainer container) {
+		//subclasses my re-implement
+	}
+	
+	/**
 	 * Visits a package in the container and returns whether class files
 	 * in the package should be visited.
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiComponent.java
index 3beacf2..3a4b145 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiComponent.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiComponent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,8 +16,6 @@ import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
 import org.eclipse.pde.api.tools.internal.provisional.IApiFilterStore;
 import org.eclipse.pde.api.tools.internal.provisional.IRequiredComponentDescription;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
-import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
-import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
 
 /**
  * Describes the API of a software component. An API component
@@ -29,12 +27,12 @@ import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter
 public interface IApiComponent extends IApiTypeContainer {
 	
 	/**
-	 * Returns this component's symbolic name.
+	 * Returns this component's symbolic name. This is a handle-only 
+	 * method - the component may not exist or may be disposed.
 	 * 
 	 * @return component's symbolic name
-	 * @throws CoreException if its baseline is disposed
 	 */
-	public String getId() throws CoreException;
+	public String getSymbolicName();
 	
 	/**
 	 * Returns this component's API description.
@@ -58,9 +56,8 @@ public interface IApiComponent extends IApiTypeContainer {
 	 * Returns this component's version identifier.
 	 * 
 	 * @return component version
-	 * @throws CoreException if its baseline is disposed
 	 */
-	public String getVersion() throws CoreException;
+	public String getVersion();
 	
 	/**
 	 * Returns the execution environments required by this component for building
@@ -163,16 +160,6 @@ public interface IApiComponent extends IApiTypeContainer {
 	public IApiFilterStore getFilterStore() throws CoreException;
 	
 	/**
-	 * Creates and returns a new problem filter for the given 
-	 * {@link IApiProblem}
-	 * 
-	 * @param problem
-	 * @return new problem filter
-	 * @throws CoreException if its baseline is disposed
-	 */
-	public IApiProblemFilter newProblemFilter(IApiProblem problem) throws CoreException;
-	
-	/**
 	 * Returns whether this API component is a fragment.
 	 * 
 	 * @return whether this API component is a fragment
@@ -224,7 +211,6 @@ public interface IApiComponent extends IApiTypeContainer {
 	 * Returns the associated element descriptor for this member.
 	 * 
 	 * @return element descriptor
-	 * @throws CoreException if an error occurs fetching the component id to make a handle object
 	 */
-	public IElementDescriptor getHandle() throws CoreException;
+	public IElementDescriptor getHandle();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiMember.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiMember.java
index 9bc27a0..9bd2554 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiMember.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiMember.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescrip
 public interface IApiMember extends IApiElement {
 	
 	/**
-	 * Returns a the type this member is declared in or <code>null</code>
+	 * Returns the type this member is declared in or <code>null</code>
 	 * if none.
 	 * 
 	 * @return enclosing type or <code>null</code>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiScope.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiScope.java
index 30cd214..a102c12 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiScope.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiScope.java
@@ -14,17 +14,18 @@ import org.eclipse.core.runtime.CoreException;
 
 /**
  * Describes a set of {@link IApiElement}.
- * <p>The api elements can be of the following types:</p>
- * <ul>
- * <li>{@link IApiElement#BASELINE}</li>
- * <li>{@link IApiElement#COMPONENT}</li>
- * <li>{@link IApiElement#API_TYPE_CONTAINER}</li>
- * <li>{@link IApiElement#API_TYPE_ROOT}</li>
- * </ul>
  * 
  * @since 1.1.0
  */
 public interface IApiScope {
+	
+	/**
+	 * Adds the given {@link IApiElement} to the scope
+	 * 
+	 * @param newelements
+	 */
+	public void addElement(IApiElement newelement);
+	
 	/**
 	 * Returns all API elements contained within this scope
 	 * 
@@ -39,4 +40,12 @@ public interface IApiScope {
 	 * @exception CoreException if unable to visit this scope
 	 */
 	void accept(ApiScopeVisitor visitor) throws CoreException;
+	
+	/**
+	 * Returns if this scope encloses the given element
+	 * 
+	 * @param element
+	 * @return true if this scope encloses the given element, false otherwise
+	 */
+	public boolean encloses(IApiElement element) throws CoreException;
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer.java
index 74a8b9d..3011bcc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,23 @@ import org.eclipse.core.runtime.CoreException;
  * @since 1.0.0
  */
 public interface IApiTypeContainer extends IApiElement {
+	
+	/**
+	 * Container type that is a JAR or ZIP archive
+	 */
+	public static final int ARCHIVE = 1;
+	/**
+	 * Container type that is a folder rooted in the file system
+	 */
+	public static final int DIRECTORY = 2;
+	/**
+	 * Container type that is a folder rooted in the workspace
+	 */
+	public static final int FOLDER = 3;
+	/**
+	 * Container type that is an {@link IApiComponent}
+	 */
+	public static final int COMPONENT = 4;
 
 	/**
 	 * Returns the names of all packages in this container in dot
@@ -67,4 +84,16 @@ public interface IApiTypeContainer extends IApiElement {
 	 * @throws CoreException if closing fails
 	 */
 	public void close() throws CoreException;
+	
+	/**
+	 * Returns the kind of container this is, one of:
+	 * <ul>
+	 * <li>{@link #ARCHIVE}</li>
+	 * <li>{@link #DIRECTORY}</li>
+	 * <li>{@link #FOLDER}</li>
+	 * <li>{@link #STUB}</li>
+	 * </ul>
+	 * @return the type of container this is
+	 */
+	public int getContainerType();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeRoot.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeRoot.java
index 191ee6a..a23e759 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeRoot.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/model/IApiTypeRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ public interface IApiTypeRoot extends IApiElement {
 	 * Returns the structure contained in this type storage. I.e. access
 	 * to the methods, fields, and member types in the associated type.
 	 * 
-	 * @return structure of associated type
+	 * @return structure of associated type or <code>null</code> if a problem occurs creating the new type
 	 * @exception CoreException if unable to retrieve the structure
 	 */
 	public IApiType getStructure() throws CoreException;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
index 01b3370..1ac1fcb 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@ package org.eclipse.pde.api.tools.internal.provisional.problems;
 
 
 /**
- * Describes a given api problem.
+ * Describes a given API problem.
  * 
  * @since 1.0.0
  * @noimplement This interface is not intended to be implemented by clients.
@@ -25,7 +25,7 @@ public interface IApiProblem {
 	public static final int CATEGORY_COMPATIBILITY = 0x10000000;
 	
 	/**
-	 * Constant representing the api usage problem category
+	 * Constant representing the API usage problem category
 	 */
 	public static final int CATEGORY_USAGE = 0x20000000;
 	
@@ -40,15 +40,20 @@ public interface IApiProblem {
 	public static final int CATEGORY_SINCETAGS = 0x40000000;
 	
 	/**
-	 * Constant representing the api profile problem category
+	 * Constant representing the API profile problem category
 	 */
 	public static final int CATEGORY_API_BASELINE = 0x50000000;
 	
 	/**
-	 * Constant representing the api component resolution problem category
+	 * Constant representing the API component resolution problem category
 	 */
 	public static final int CATEGORY_API_COMPONENT_RESOLUTION = 0x60000000;
 	/**
+	 * Constant representing a fatal problem i.e. a fatal JDT problem has been detected
+	 * @since 1.1
+	 */
+	public static final int CATEGORY_FATAL_PROBLEM = 0x70000000;
+	/**
 	 * Constant representing the offset of the message key portion of the id bit mask.
 	 */
 	public static final int OFFSET_MESSAGE = 0;
@@ -86,6 +91,7 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_SINCETAGS
 	 */
 	public static final int SINCE_TAG_INVALID = 1;
 
@@ -95,6 +101,7 @@ public interface IApiProblem {
 	 * Value is: <code>2</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_SINCETAGS
 	 */
 	public static final int SINCE_TAG_MALFORMED = 2;
 
@@ -104,6 +111,7 @@ public interface IApiProblem {
 	 * Value is: <code>3</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_SINCETAGS
 	 */
 	public static final int SINCE_TAG_MISSING = 3;
 
@@ -113,6 +121,7 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int MAJOR_VERSION_CHANGE = 1;
 
@@ -122,6 +131,7 @@ public interface IApiProblem {
 	 * Value is: <code>2</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int MINOR_VERSION_CHANGE = 2;
 	
@@ -131,6 +141,7 @@ public interface IApiProblem {
 	 * Value is: <code>3</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int MAJOR_VERSION_CHANGE_NO_BREAKAGE = 3;
 	
@@ -140,26 +151,29 @@ public interface IApiProblem {
 	 * Value is: <code>4</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int MINOR_VERSION_CHANGE_NO_NEW_API = 4;
 	
 	/**
 	 * Constant representing the value of the major version change {@link IApiProblem} kind as a
-	 * consequence of a major version change in a reexported bundle.
+	 * consequence of a major version change in a re-exported bundle.
 	 * <br>
 	 * Value is: <code>5</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int REEXPORTED_MAJOR_VERSION_CHANGE = 5;
 
 	/**
 	 * Constant representing the value of the minor version change {@link IApiProblem} kind as a
-	 * consequence of a minor version change in a reexported bundle..
+	 * consequence of a minor version change in a re-exported bundle..
 	 * <br>
 	 * Value is: <code>6</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_VERSION
 	 */
 	public static final int REEXPORTED_MINOR_VERSION_CHANGE = 6;
 
@@ -169,6 +183,7 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ILLEGAL_EXTEND = 1;
 	
@@ -178,6 +193,7 @@ public interface IApiProblem {
 	 * Value is: <code>2</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ILLEGAL_INSTANTIATE = 2;
 	
@@ -187,6 +203,7 @@ public interface IApiProblem {
 	 * Value is: <code>3</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ILLEGAL_REFERENCE = 3;
 	
@@ -196,6 +213,7 @@ public interface IApiProblem {
 	 * Value is: <code>4</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ILLEGAL_IMPLEMENT = 4;
 	
@@ -205,6 +223,7 @@ public interface IApiProblem {
 	 * Value is: <code>5</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ILLEGAL_OVERRIDE = 5;
 	
@@ -214,6 +233,7 @@ public interface IApiProblem {
 	 * Value is: <code>6</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int API_LEAK = 6;
 	
@@ -223,6 +243,7 @@ public interface IApiProblem {
 	 * Value is: <code>7</code>
 	 * 
 	 *  @see #getKind()
+	 *  @see #CATEGORY_USAGE
 	 */
 	public static final int UNSUPPORTED_TAG_USE = 7;
 	
@@ -232,6 +253,7 @@ public interface IApiProblem {
 	 * Value is: <code>8</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int DUPLICATE_TAG_USE = 8;
 	
@@ -241,6 +263,7 @@ public interface IApiProblem {
 	 * Value is: <code>9</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int INVALID_REFERENCE_IN_SYSTEM_LIBRARIES = 9;
 	/**
@@ -249,6 +272,7 @@ public interface IApiProblem {
 	 * Value is:<code>10</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int UNUSED_PROBLEM_FILTERS = 10;
 	/**
@@ -257,6 +281,7 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_EXTENDS = 1;
 	
@@ -266,6 +291,7 @@ public interface IApiProblem {
 	 * Value is: <code>2</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_IMPLEMENTS = 2;
 	
@@ -275,6 +301,7 @@ public interface IApiProblem {
 	 * Value is: <code>3</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_FIELD = 3;
 	
@@ -284,6 +311,7 @@ public interface IApiProblem {
 	 * Value is: <code>4</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_RETURN_TYPE = 4;
 	
@@ -293,6 +321,7 @@ public interface IApiProblem {
 	 * Value is: <code>5</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_METHOD_PARAMETER = 5;	
 	
@@ -302,6 +331,7 @@ public interface IApiProblem {
 	 * Value is: <code>6</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LEAK_CONSTRUCTOR_PARAMETER = 6;
 	
@@ -311,6 +341,7 @@ public interface IApiProblem {
 	 * Value is: <code>7</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int CONSTRUCTOR_METHOD = 7;
 	
@@ -320,6 +351,7 @@ public interface IApiProblem {
 	 * Value is: <code>8</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int METHOD = 8;
 
@@ -329,6 +361,7 @@ public interface IApiProblem {
 	 * Value is: <code>9</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int FIELD = 9;
 	
@@ -338,6 +371,7 @@ public interface IApiProblem {
 	 * Value is: <code>10</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int LOCAL_TYPE = 10;
 	
@@ -347,6 +381,7 @@ public interface IApiProblem {
 	 * Value is: <code>11</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int ANONYMOUS_TYPE = 11;
 	
@@ -356,6 +391,7 @@ public interface IApiProblem {
 	 * Value is: <code>10</code>
 	 * 
 	 * @see #getFlags()
+	 * @see #CATEGORY_USAGE
 	 */
 	public static final int INDIRECT_REFERENCE = 10;
 
@@ -365,6 +401,7 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_API_BASELINE
 	 */
 	public static final int API_BASELINE_MISSING = 1;
 
@@ -374,9 +411,19 @@ public interface IApiProblem {
 	 * Value is: <code>1</code>
 	 * 
 	 * @see #getKind()
+	 * @see #CATEGORY_API_COMPONENT_RESOLUTION
 	 */
 	public static final int API_COMPONENT_RESOLUTION = 1;
 	/**
+	 * Constant representing the value of a workspace baseline resolution {@link IApiProblem} kind.
+	 * <br>
+	 * Value is: <code>1</code>
+	 * 
+	 * @see #getKind()
+	 * @see #CATEGORY_FATAL_PROBLEM
+	 */
+	public static final int FATAL_JDT_BUILDPATH_PROBLEM = 1;
+	/**
 	 * Returns the severity of the problem. See the severity constants defined in
 	 * {@link org.eclipse.pde.api.tools.internal.provisional.ApiPlugin} class.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter.java
index d80198d..b686c57 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.provisional.problems;
 
-
-
 /**
  * Describes API problems that should be filtered. 
  * <p>
@@ -35,4 +33,13 @@ public interface IApiProblemFilter {
 	 * @return the underlying {@link IApiProblem} for this filter
 	 */
 	public IApiProblem getUnderlyingProblem();
+	
+	/**
+	 * Returns the comment associated with this filter or <code>null</code> if a comment has not
+	 * been added to the filter.
+	 * 
+	 * @return the comment for the filter or <code>null</code>
+	 * @since 1.1
+	 */
+	public String getComment();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
index e178856..17fc0d3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemTypes.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -177,6 +177,15 @@ public interface IApiProblemTypes {
 	public static final String REPORT_API_BREAKAGE_WHEN_MAJOR_VERSION_INCREMENTED =
 		"report_api_breakage_when_major_version_incremented"; //$NON-NLS-1$
 
+	/**
+	 * @since 1.1
+	 */
+	public static final String AUTOMATICALLY_REMOVE_UNUSED_PROBLEM_FILTERS = "automatically_removed_unused_problem_filters"; //$NON-NLS-1$
+	/**
+	 * @since 1.1
+	 */
+	public static final String FATAL_PROBLEMS = "fatal_problems"; //$NON-NLS-1$
+	
 	// Version numbering problems
 	public static final String MISSING_SINCE_TAG = "missing_since_tag"; //$NON-NLS-1$
 	public static final String MALFORMED_SINCE_TAG = "malformed_since_tag"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/scanner/TagScanner.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/scanner/TagScanner.java
index 0b7a371..675a417 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/scanner/TagScanner.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/scanner/TagScanner.java
@@ -20,9 +20,10 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.JavaCore;
@@ -170,11 +171,12 @@ public class TagScanner {
 		}
 		
 		private int getEnclosingType(ASTNode node) {
-			while (!(node instanceof AbstractTypeDeclaration)) {
-				node = node.getParent();
+			ASTNode lnode = node;
+			while (!(lnode instanceof AbstractTypeDeclaration)) {
+				lnode = lnode.getParent();
 			}
-			if (node instanceof TypeDeclaration) {
-				if (((TypeDeclaration)node).isInterface()) {
+			if (lnode instanceof TypeDeclaration) {
+				if (((TypeDeclaration)lnode).isInterface()) {
 					return IApiJavadocTag.TYPE_INTERFACE;
 				}
 			}
@@ -219,14 +221,15 @@ public class TagScanner {
 				restrictions |= jtm.getRestrictionsForTag(tagname, type, member);
 			}
 			if (restrictions != RestrictionModifiers.NO_RESTRICTIONS) {
-				if (descriptor.getElementType() == IElementDescriptor.METHOD) {
+				IElementDescriptor ldesc = descriptor;
+				if (ldesc.getElementType() == IElementDescriptor.METHOD) {
 					try {
-						descriptor = resolveMethod((IMethodDescriptor)descriptor);
+						ldesc = resolveMethod((IMethodDescriptor)ldesc);
 					} catch (CoreException e) {
 						fException = e;
 					}
 				}
-				fDescription.setRestrictions(descriptor, restrictions);
+				fDescription.setRestrictions(ldesc, restrictions);
 			}
 		}
 		
@@ -429,20 +432,22 @@ public class TagScanner {
 				IApiTypeRoot classFile = fContainer.findTypeRoot(type.getQualifiedName());
 				if(classFile != null) {
 					IApiType structure = classFile.getStructure();
-					IApiMethod[] methods = structure.getMethods();
-					for (int i = 0; i < methods.length; i++) {
-						IApiMethod method = methods[i];
-						if (descriptor.getName().equals(method.getName())) {
-							String signature = method.getSignature();
-							String descriptorSignature = descriptor.getSignature().replace('/', '.');
-							if (Signatures.matchesSignatures(descriptorSignature, signature.replace('/', '.'))) {
-								return descriptor.getEnclosingType().getMethod(method.getName(), signature);
-							}
-							String genericSignature = method.getGenericSignature();
-							if (genericSignature != null) {
-								if (Signatures.matchesSignatures(descriptorSignature, genericSignature.replace('/', '.'))) {
+					if(structure != null) {
+						IApiMethod[] methods = structure.getMethods();
+						for (int i = 0; i < methods.length; i++) {
+							IApiMethod method = methods[i];
+							if (descriptor.getName().equals(method.getName())) {
+								String signature = method.getSignature();
+								String descriptorSignature = descriptor.getSignature().replace('/', '.');
+								if (Signatures.matchesSignatures(descriptorSignature, signature.replace('/', '.'))) {
 									return descriptor.getEnclosingType().getMethod(method.getName(), signature);
 								}
+								String genericSignature = method.getGenericSignature();
+								if (genericSignature != null) {
+									if (Signatures.matchesSignatures(descriptorSignature, genericSignature.replace('/', '.'))) {
+										return descriptor.getEnclosingType().getMethod(method.getName(), signature);
+									}
+								}
 							}
 						}
 					}
@@ -485,10 +490,12 @@ public class TagScanner {
 	 * @param container optional class file container containing the class file for the given source
 	 * 	that can be used to resolve method signatures if required (for tags on methods). If 
 	 * 	not provided (<code>null</code>), method signatures will be unresolved.
+	 * @param monitor
+	 * 
 	 * @throws CoreException
 	 */
-	public void scan(ICompilationUnit unit, IApiDescription description, IApiTypeContainer container) throws CoreException {
-		scan(new CompilationUnit(unit), description, container, unit.getJavaProject().getOptions(true));
+	public void scan(ICompilationUnit unit, IApiDescription description, IApiTypeContainer container, IProgressMonitor monitor) throws CoreException {
+		scan(new CompilationUnit(unit), description, container, unit.getJavaProject().getOptions(true), monitor);
 	}
 	
 	/**
@@ -502,10 +509,12 @@ public class TagScanner {
 	 * 	not provided (<code>null</code>), method signatures will be unresolved.
 	 * @param options a map of Java compiler options to use when creating the AST to scan
 	 *  or <code>null</code> if default options should be used 
+	 *  @param monitor
 	 * 
 	 * @throws CoreException 
 	 */
-	public void scan(CompilationUnit source, IApiDescription description, IApiTypeContainer container, Map options) throws CoreException {
+	public void scan(CompilationUnit source, IApiDescription description, IApiTypeContainer container, Map options, IProgressMonitor monitor) throws CoreException {
+		SubMonitor localmonitor = SubMonitor.convert(monitor, 2);
 		ASTParser parser = ASTParser.newParser(AST.JLS3);
 		InputStream inputStream = null;
 		try {
@@ -529,12 +538,14 @@ public class TagScanner {
 				}
 			}
 		}
-		if(options == null) {
-			options = JavaCore.getOptions();
+		Util.updateMonitor(localmonitor);
+		Map loptions = options;
+		if(loptions == null) {
+			loptions = JavaCore.getOptions();
 		}
-		options.put(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, JavaCore.ENABLED);
-		parser.setCompilerOptions(options);
-		org.eclipse.jdt.core.dom.CompilationUnit cunit = (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(new NullProgressMonitor());
+		loptions.put(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, JavaCore.ENABLED);
+		parser.setCompilerOptions(loptions);
+		org.eclipse.jdt.core.dom.CompilationUnit cunit = (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(localmonitor.newChild(1));
 		Visitor visitor = new Visitor(description, container);
 		cunit.accept(visitor);
 		if (visitor.getException() != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/ApiSearchEngine.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/ApiSearchEngine.java
index ad34c1c..047439e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/ApiSearchEngine.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/ApiSearchEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,9 @@ import java.util.List;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.pde.api.tools.internal.builder.Reference;
 import org.eclipse.pde.api.tools.internal.builder.ReferenceResolver;
@@ -27,7 +30,9 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiScope;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
 import org.eclipse.pde.api.tools.internal.search.SearchMessages;
 import org.eclipse.pde.api.tools.internal.util.Util;
@@ -55,12 +60,14 @@ public final class ApiSearchEngine {
 	 * Visitor used to extract references from the component is is passed to
 	 */
 	class ReferenceExtractor extends ApiTypeContainerVisitor {
+		static final int COLLECTOR_MAX = 2500;
 		private List collector = null;
 		private IApiSearchRequestor requestor = null;
 		private IApiSearchReporter reporter = null;
 		IApiElement element = null;
 		private SubMonitor monitor = null;
 		
+		
 		/**
 		 * Constructor
 		 */
@@ -73,6 +80,13 @@ public final class ApiSearchEngine {
 		}
 		
 		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor#visit(org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer)
+		 */
+		public boolean visit(IApiTypeContainer container) {
+			return requestor.acceptContainer(container);
+		}
+		
+		/* (non-Javadoc)
 		 * @see org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor#visit(java.lang.String, org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot)
 		 */
 		public void visit(String packageName, IApiTypeRoot typeroot) {
@@ -81,20 +95,29 @@ public final class ApiSearchEngine {
 			}
 			try {
 				IApiType type = typeroot.getStructure();
-				if(!requestor.acceptMember(type)) {
+				if(type == null || !requestor.acceptMember(type)) {
 					return;
-				}				
-				collector.addAll(acceptReferences(requestor, 
+				}
+				collector.addAll(acceptReferences(
+						requestor, 
 						type, 
 						getResolvedReferences(requestor, type, monitor.newChild(1)), 
 						monitor.newChild(1)));
-				
 			}
 			catch(CoreException ce) {
 				ApiPlugin.log(ce);
 			}
 		}
 		
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor#end(java.lang.String, org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot)
+		 */
+		public void end(String packageName, IApiTypeRoot typeroot) {
+			if(this.collector.size() >= COLLECTOR_MAX) {
+				reportResults();
+			}
+		}
+		
 		/**
 		 * @see org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor#visit(org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent)
 		 */
@@ -106,6 +129,10 @@ public final class ApiSearchEngine {
 		 * @see org.eclipse.pde.api.tools.internal.provisional.model.ApiTypeContainerVisitor#endVisitPackage(java.lang.String)
 		 */
 		public void endVisitPackage(String packageName) {
+			reportResults();
+		}
+		
+		private void reportResults() {
 			reporter.reportResults(this.element, (IReference[]) collector.toArray(new IReference[collector.size()]));
 			collector.clear();
 		}
@@ -131,7 +158,7 @@ public final class ApiSearchEngine {
 	 * @return The listing of resolved references from the given {@link IApiType}
 	 * @throws CoreException
 	 */
-	private List getResolvedReferences(IApiSearchRequestor requestor, IApiType type, IProgressMonitor monitor) throws CoreException {
+	List getResolvedReferences(IApiSearchRequestor requestor, IApiType type, IProgressMonitor monitor) throws CoreException {
 		String name = type.getSimpleName();
 		SubMonitor localmonitor = SubMonitor.convert(monitor, 
 				MessageFormat.format(SearchMessages.ApiSearchEngine_extracting_refs_from, new String[] {(name == null ? SearchMessages.ApiSearchEngine_anonymous_type : name)}), 2);
@@ -154,7 +181,7 @@ public final class ApiSearchEngine {
 	 * @return
 	 * @throws CoreException
 	 */
-	private List acceptReferences(IApiSearchRequestor requestor, IApiType type, List references, IProgressMonitor monitor) throws CoreException {
+	List acceptReferences(IApiSearchRequestor requestor, IApiType type, List references, IProgressMonitor monitor) throws CoreException {
 		ArrayList refs = new ArrayList();
 		Reference ref = null;
 		SubMonitor localmonitor = SubMonitor.convert(monitor, references.size());
@@ -207,14 +234,15 @@ public final class ApiSearchEngine {
 					reporter.reportResults(element, (IReference[]) refs.toArray(new IReference[refs.size()]));
 					break;
 				}
-				case IApiComponent.COMPONENT: {
+				case IApiElement.COMPONENT: {
 					if(localmonitor.isCanceled()) {
 						reporter.reportResults(element, NO_REFERENCES);
 					}
 					ReferenceExtractor visitor = new ReferenceExtractor(requestor, reporter, element, localmonitor.newChild(1));
 					IApiComponent comp = (IApiComponent) element;
 					comp.accept(visitor);
-					localmonitor.worked(1);
+					comp.close();
+					Util.updateMonitor(localmonitor, 1);
 					break;
 				}
 				case IApiElement.FIELD:
@@ -236,7 +264,7 @@ public final class ApiSearchEngine {
 					break;
 				}
 			}
-			localmonitor.worked(1);
+			Util.updateMonitor(localmonitor, 1);
 		}
 		finally {
 			localmonitor.done();
@@ -257,48 +285,89 @@ public final class ApiSearchEngine {
 		if(baseline == null || reporter == null || requestor == null) {
 			return;
 		}
-		IApiSearchScope scope = requestor.getScope();
+		IApiScope scope = requestor.getScope();
 		if(scope == null) {
 			return;
 		}
-		fRequestorContext = SearchMessages.ApiSearchEngine_api_internal;
-		if(requestor.includesAPI() && !requestor.includesInternal()) {
-			fRequestorContext = SearchMessages.ApiSearchEngine_api;
-		}
-		if(requestor.includesInternal() && !requestor.includesAPI()) {
-			fRequestorContext = SearchMessages.ApiSearchEngine_internal;
-		}
-		IApiElement[] scopeelements = scope.getScope();
+		fRequestorContext = computeContext(requestor);
+		IApiElement[] scopeelements = scope.getApiElements();
 		SubMonitor localmonitor = SubMonitor.convert(monitor, 
 				MessageFormat.format(SearchMessages.ApiSearchEngine_searching_projects, new String[] {fRequestorContext}), scopeelements.length*2+1);
 		try {
 			long start = System.currentTimeMillis();
 			long loopstart = 0;
 			String taskname = null;
+			MultiStatus mstatus = null;
 			for (int i = 0; i < scopeelements.length; i++) {
-				taskname = MessageFormat.format(SearchMessages.ApiSearchEngine_searching_project, new String[] {scopeelements[i].getApiComponent().getId(), fRequestorContext});
-				localmonitor.setTaskName(taskname);
-				if(DEBUG) {
-					loopstart = System.currentTimeMillis();
-					System.out.println("Searching "+scopeelements[i].getApiComponent().getId()+"..."); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-				searchReferences(requestor, scopeelements[i], reporter, localmonitor.newChild(1));
-				localmonitor.setTaskName(taskname);
-				if(localmonitor.isCanceled()) {
-					reporter.reportResults(scopeelements[i], NO_REFERENCES);
-					return;
+				try {
+					taskname = MessageFormat.format(SearchMessages.ApiSearchEngine_searching_project, new String[] {scopeelements[i].getApiComponent().getSymbolicName(), fRequestorContext});
+					localmonitor.setTaskName(taskname);
+					if(DEBUG) {
+						loopstart = System.currentTimeMillis();
+						System.out.println("Searching "+scopeelements[i].getApiComponent().getSymbolicName()+"..."); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+					searchReferences(requestor, scopeelements[i], reporter, localmonitor.newChild(1));
+					localmonitor.setTaskName(taskname);
+					if(localmonitor.isCanceled()) {
+						reporter.reportResults(scopeelements[i], NO_REFERENCES);
+						return;
+					}
+					localmonitor.worked(1);
+					if(DEBUG) {
+						System.out.println(Math.round((((float)(i+1))/scopeelements.length)*100)+"% done in "+(System.currentTimeMillis()-loopstart)+" ms"); //$NON-NLS-1$ //$NON-NLS-2$
+					}
 				}
-				localmonitor.worked(1);
-				if(DEBUG) {
-					System.out.println(Math.round((((float)(i+1))/scopeelements.length)*100)+"% done in "+(System.currentTimeMillis()-loopstart)+" ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				catch(CoreException ce) {
+					if(mstatus == null) {
+						mstatus = new MultiStatus(ApiPlugin.PLUGIN_ID, IStatus.ERROR, null, null);
+					}
+					mstatus.add(new Status(IStatus.ERROR, ApiPlugin.PLUGIN_ID, ce.getMessage(), ce));
 				}
 			}
 			if(DEBUG) {
 				System.out.println("Total Search Time: "+((System.currentTimeMillis()-start)/1000)+" seconds");  //$NON-NLS-1$//$NON-NLS-2$
 			}
+			if(mstatus != null) {
+				throw new CoreException(mstatus);
+			}
 		}
 		finally {
 			localmonitor.done();
 		}
 	}
+	
+	/**
+	 * Computes the process context (label)
+	 * @param requestor
+	 * @return the label describing the process for the progress monitor
+	 */
+	String computeContext(IApiSearchRequestor requestor) {
+		String context = SearchMessages.ApiSearchEngine_api_internal;
+		if(requestor.includesAPI()) {
+			if(requestor.includesInternal()) {
+				if(requestor.includesIllegalUse()) {
+					return context; 
+				}
+				else {
+					context = SearchMessages.ApiSearchEngine_api_and_internal;
+				}
+			}
+			else if(!requestor.includesIllegalUse()){
+				context = SearchMessages.ApiSearchEngine_api;
+			}
+			else {
+				context = SearchMessages.ApiSearchEngine_api_and_illegal;
+			}
+		} else if(requestor.includesInternal()) {
+			if(requestor.includesIllegalUse()) {
+				context = SearchMessages.ApiSearchEngine_internal_and_illegal;
+			}
+			else {
+				context = SearchMessages.ApiSearchEngine_internal;
+			}
+		} else if(requestor.includesIllegalUse()) {
+			context = SearchMessages.ApiSearchEngine_illegal;
+		}
+		return context;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchReporter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchReporter.java
index 573efc1..38350e1 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchReporter.java
@@ -34,4 +34,11 @@ public interface IApiSearchReporter {
 	 * @param notsearched array of elements not searched 
 	 */
 	public void reportNotSearched(final IApiElement[] elements);
+	
+	/**
+	 * Reports the given metadata object out to the report directory.
+	 * Does no work if the metadata is <code>null</code>
+	 * @param data the data object to write out
+	 */
+	public void reportMetadata(IMetadata data);
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchRequestor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchRequestor.java
index 6553e7f..bd32676 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchRequestor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchRequestor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,8 @@ package org.eclipse.pde.api.tools.internal.provisional.search;
 import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiScope;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
 
 /**
  * A default search requestor to use for API tools
@@ -34,22 +36,19 @@ public interface IApiSearchRequestor {
 	 * 
 	 * @see #includesInternal()
 	 */
-	public static final int INCLUDE_INTERNAL = 0x0002;
-	
+	public static final int INCLUDE_INTERNAL = 0x0002;	
 	/**
-	 * Search mask that determines if non-API enabled projects should be considered
-	 * in the search scope or not
-	 * 
-	 * @see includesNonApiProjects
+	 * Search mask that will cause the engine to consider
+	 * illegal API use when searching
 	 */
-	public static final int INCLUDE_NON_API_ENABLED_PROJECTS = 0x0004;
+	public static final int INCLUDE_ILLEGAL_USE = 0x0004;
 	
 	/**
-	 * Returns the {@link IApiSearchScope} to be searched
+	 * Returns the {@link IApiScope} to be searched
 	 * 
-	 * @return the {@link IApiSearchScope} to be searched
+	 * @return the {@link IApiScope} to be searched
 	 */
-	public IApiSearchScope getScope();
+	public IApiScope getScope();
 	
 	/**
 	 * Returns whether this requestor cares about the given {@link IApiComponent} or not.
@@ -61,6 +60,16 @@ public interface IApiSearchRequestor {
 	public boolean acceptComponent(IApiComponent component);
 	
 	/**
+	 * Returns whether this requestor cares about the given {@link IApiTypeContainer} or not.
+	 * This allows the requestor to direct the {@link ApiSearchEngine} to ignore certain type containers
+	 * while searching a component
+	 * 
+	 * @param container
+	 * @return true if this requestor cares about the given {@link IApiTypeContainer} false otherwise.
+	 */
+	public boolean acceptContainer(IApiTypeContainer container);
+	
+	/**
 	 * Returns whether this requestor cares about the given {@link IApiMember} or not.
 	 * This allows the requestor to direct the {@link ApiSearchEngine} to ignore certain
 	 * members.
@@ -107,10 +116,9 @@ public interface IApiSearchRequestor {
 	public boolean includesInternal();
 	
 	/**
-	 * Returns true if projects that have not been API tools enabled should be considered in the 
-	 * search scope.
+	 * Returns true if the current search mask includes considering illegal API use.
 	 * 
-	 * @return true if non-API projects should be considered in the scope false otherwise
+	 * @return true if references to illegal API use should be considered, false otherwise
 	 */
-	public boolean includesNonApiProjects();
+	public boolean includesIllegalUse();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchScope.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchScope.java
deleted file mode 100644
index 608a18c..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IApiSearchScope.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.provisional.search;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-
-/**
- * An {@link ApiSearchScope} is used  by an {@link IApiSearchRequestor} to denote what
- * {@link org.eclipse.pde.api.tools.internal.provisional.model.IApiElement}s should be 
- * searched for any given invocation of an {@link ApiSearchEngine}
- * 
- * @since 1.0.0
- */
-public interface IApiSearchScope {
-	
-	/**
-	 * Returns the {@link IApiElement}s to be considered during a search.
-	 * 
-	 * @return the {@link IApiElement}s to search
-	 */
-	public IApiElement[] getScope() throws CoreException;
-	
-	/**
-	 * Returns if this scope encloses the given element
-	 * 
-	 * @param element
-	 * @return true if this scope encloses the given element, false otherwise
-	 */
-	public boolean encloses(IApiElement element) throws CoreException;
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IMetadata.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IMetadata.java
new file mode 100644
index 0000000..8854069
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/provisional/search/IMetadata.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.provisional.search;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * Object used to hold API use scan metadata that can be written out 
+ * by an {@link IApiSearchReporter}
+ * 
+ * @since 1.0.1
+ */
+public interface IMetadata {
+
+	/**
+	 * Writes the current snapshot of metadata out to the given file
+	 * @param file the file to write to
+	 * @throws IOException
+	 * @throws CoreException
+	 */
+	public void serializeToFile(File file) throws IOException, CoreException;
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiDescriptionModifier.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiDescriptionModifier.java
new file mode 100644
index 0000000..a4a7a61
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiDescriptionModifier.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.util.regex.Pattern;
+
+import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
+import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
+
+/**
+ * Visits an API description modifying package visibility based on pattern
+ * matching.
+ */
+public class ApiDescriptionModifier extends ApiDescriptionVisitor {
+	
+	/**
+	 * Internal package patterns or <code>null</code> if none.
+	 */
+	private Pattern[] fInternalPackages;
+		
+	/**
+	 * API package patterns of <code>null</code> if none.
+	 */
+	private Pattern[] fApiPackages; 
+	
+	/**
+	 * API description to modify.
+	 */
+	private IApiDescription fDescription;
+	
+	/**
+	 * Constructs a visitor with the given patterns.
+	 * 
+	 * @param internal regular expressions to match as internal packages or <code>null</code>
+	 * @param api regular expressions to match as API or <code>null</code>
+	 */
+	public ApiDescriptionModifier(String[] internal, String[] api) {
+		setInternalPatterns(internal);
+		setApiPatterns(api);
+	}
+	
+	/**
+	 * Sets the description to be modified.
+	 * 
+	 * @param description API description to modify
+	 */
+	public void setApiDescription(IApiDescription description) {
+		fDescription = description;
+	}
+
+	/**
+	 * Sets regular expressions to consider as internal packages. Used to override visibility settings
+	 * in an API description.
+	 * 
+	 * @param patterns regular expressions, may be empty or <code>null</code>
+	 */
+	private void setInternalPatterns(String[] patterns) {
+		if (patterns == null || patterns.length == 0) {
+			fInternalPackages = null;
+		} else {
+			fInternalPackages = new Pattern[patterns.length];
+			for (int i = 0; i < patterns.length; i++) {
+				fInternalPackages[i] = Pattern.compile(patterns[i]);
+			}
+		}
+	}
+	
+	/**
+	 * Sets regular expressions to consider as API packages. Used to override visibility settings
+	 * in an API description.
+	 * 
+	 * @param patterns regular expressions, may be empty or <code>null</code>
+	 */
+	private void setApiPatterns(String[] patterns) {
+		if (patterns == null || patterns.length == 0) {
+			fApiPackages = null;
+		} else {
+			fApiPackages = new Pattern[patterns.length];
+			for (int i = 0; i < patterns.length; i++) {
+				fApiPackages[i] = Pattern.compile(patterns[i]);
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor#visitElement(org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor, org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations)
+	 */
+	public boolean visitElement(IElementDescriptor element, IApiAnnotations description) {
+		switch (element.getElementType()) {
+			case IElementDescriptor.COMPONENT:
+				return true;
+			case IElementDescriptor.PACKAGE:
+				IPackageDescriptor pkg = (IPackageDescriptor) element;
+				if (fInternalPackages != null) {
+					if (matchesPattern(pkg.getName(), fInternalPackages)) {
+						fDescription.setVisibility(element, VisibilityModifiers.PRIVATE);
+					}
+				}
+				if (fApiPackages != null) {
+					if (matchesPattern(pkg.getName(), fApiPackages)) {
+						fDescription.setVisibility(element, VisibilityModifiers.API);
+					}
+				}
+				return false;
+			default:
+				return false;
+		}
+	}
+	
+	/**
+	 * Returns whether the package matches any of the given patterns.
+	 * 
+	 * @param name name to match
+	 * @param patterns patterns to match against
+	 * @return whether there's a match
+	 */
+	private boolean matchesPattern(String name, Pattern[] patterns) {
+		for (int i = 0; i < patterns.length; i++) {
+			if (patterns[i].matcher(name).find()) {
+				return true;
+			}
+		}
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseReportConverter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseReportConverter.java
deleted file mode 100644
index 9aac411..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseReportConverter.java
+++ /dev/null
@@ -1,995 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.search;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
-import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
-import org.eclipse.pde.api.tools.internal.util.Util;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This class converts a collection of API use report XML files
- * from a given location to a corresponding collection of
- * HTML in a given location
- * 
- * @since 1.0.1
- */
-public final class ApiUseReportConverter {
-
-	/**
-	 * Default handler to collect a total reference count
-	 */
-	static final class UseDefaultHandler extends DefaultHandler {
-
-		private Report lreport = null;
-		private int type = 0;
-		private CountGroup counts = null;
-		
-		/**
-		 * Constructor
-		 */
-		public UseDefaultHandler(Report report, int type, CountGroup counts) {
-			this.lreport = report;
-			this.type = type;
-			this.counts = counts;
-		}
-		
-		/* (non-Javadoc)
-		 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-		 */
-		public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
-			if(IApiXmlConstants.REFERENCES.equals(name)) {
-				String vis = attributes.getValue(IApiXmlConstants.ATTR_REFERENCE_VISIBILITY);
-				String value = attributes.getValue(IApiXmlConstants.ATTR_REFERENCE_COUNT);
-				int count = Integer.parseInt(value);
-				switch(Integer.parseInt(vis)) {
-					case VisibilityModifiers.API: {
-						switch(type) {
-							case IReference.T_TYPE_REFERENCE: {
-								counts.total_api_type_count = count;
-								lreport.counts.total_api_type_count += count;
-								break;
-							}
-							case IReference.T_METHOD_REFERENCE: {
-								counts.total_api_method_count = count;
-								lreport.counts.total_api_method_count += count;
-								break;
-							}
-							case IReference.T_FIELD_REFERENCE: {
-								counts.total_api_field_count = count;
-								lreport.counts.total_api_field_count += count;
-								break;
-							}
-						}
-						break;
-					}
-					case VisibilityModifiers.PRIVATE: {
-						switch(type) {
-							case IReference.T_TYPE_REFERENCE: {
-								counts.total_private_type_count = count;
-								lreport.counts.total_private_type_count += count;
-								break;
-							}
-							case IReference.T_METHOD_REFERENCE: {
-								counts.total_private_method_count = count;
-								lreport.counts.total_private_method_count += count;
-								break;
-							}
-							case IReference.T_FIELD_REFERENCE: {
-								counts.total_private_field_count = count;
-								lreport.counts.total_private_field_count += count;
-								break;
-							}
-						}
-						break;
-					}
-					case VisibilityModifiers.PRIVATE_PERMISSIBLE: {
-						switch(type) {
-							case IReference.T_TYPE_REFERENCE: {
-								counts.total_permissable_type_count = count;
-								lreport.counts.total_permissable_type_count += count;
-								break;
-							}
-							case IReference.T_METHOD_REFERENCE: {
-								counts.total_permissable_method_count = count;
-								lreport.counts.total_permissable_method_count += count;
-								break;
-							}
-							case IReference.T_FIELD_REFERENCE: {
-								counts.total_permissable_field_count = count;
-								lreport.counts.total_permissable_field_count += count;
-								break;
-							}
-						}
-						break;
-					}
-					case VisibilityModifiers.ALL_VISIBILITIES: {
-						switch(type) {
-							case IReference.T_TYPE_REFERENCE: {
-								counts.total_other_type_count = count;
-								lreport.counts.total_other_type_count += count;
-								break;
-							}
-							case IReference.T_METHOD_REFERENCE: {
-								counts.total_other_method_count = count;
-								lreport.counts.total_other_method_count += count;
-								break;
-							}
-							case IReference.T_FIELD_REFERENCE: {
-								counts.total_other_field_count = count;
-								lreport.counts.total_other_field_count += count;
-								break;
-							}
-						}
-						break;
-					}
-					case ApiUseReportConverter.FRAGMENT_PERMISSIBLE: {
-						switch(type) {
-						case IReference.T_TYPE_REFERENCE: {
-							counts.total_fragment_permissible_type_count = count;
-							lreport.counts.total_fragment_permissible_type_count += count;
-							break;
-						}
-						case IReference.T_METHOD_REFERENCE: {
-							counts.total_fragment_permissible_method_count = count;
-							lreport.counts.total_fragment_permissible_method_count += count;
-							break;
-						}
-						case IReference.T_FIELD_REFERENCE: {
-							counts.total_fragment_permissible_field_count = count;
-							lreport.counts.total_fragment_permissible_field_count += count;
-							break;
-						}
-					}
-						break;
-					}
-				}
-			}
-		}
-	}
-	
-	/**
-	 * A group of counters to origin meta-data
-	 */
-	static final class CountGroup {
-		private int total_api_field_count = 0;
-		private int total_private_field_count = 0;
-		private int total_permissable_field_count = 0;
-		private int total_fragment_permissible_field_count = 0;
-		private int total_other_field_count = 0;
-		private int total_api_method_count = 0;
-		private int total_private_method_count = 0;
-		private int total_permissable_method_count = 0;
-		private int total_fragment_permissible_method_count = 0;
-		private int total_other_method_count = 0;
-		private int total_api_type_count = 0;
-		private int total_private_type_count = 0;
-		private int total_permissable_type_count = 0;
-		private int total_fragment_permissible_type_count = 0;
-		private int total_other_type_count = 0;
-		
-		public int getTotalRefCount() {
-			return total_api_field_count +
-					total_api_method_count +
-					total_api_type_count +
-					total_other_field_count +
-					total_other_method_count +
-					total_other_type_count +
-					total_private_field_count +
-					total_private_method_count +
-					total_private_type_count +
-					total_permissable_field_count +
-					total_permissable_method_count + 
-					total_permissable_type_count +
-					total_fragment_permissible_field_count +
-					total_fragment_permissible_method_count +
-					total_fragment_permissible_type_count;
-		}
-		
-		public int getTotalApiRefCount() {
-			return total_api_field_count + total_api_method_count + total_api_type_count;
-		}
-		
-		public int getTotalInternalRefCount() {
-			return total_private_field_count + total_private_method_count + total_private_type_count;
-		}
-		
-		public int getTotalOtherRefCount() {
-			return total_other_field_count + total_other_method_count + total_other_type_count;
-		}
-		
-		public int getTotalPermissableRefCount() {
-			return total_permissable_field_count + total_permissable_method_count + total_permissable_type_count;
-		}
-		
-		public int getTotalFragmentPermissibleRefCount() {
-			return total_fragment_permissible_field_count + total_fragment_permissible_method_count + total_fragment_permissible_type_count;
-		}
-	}
-	
-	/**
-	 * Describes one project with references
-	 */
-	private final static class Report {
-		private File referee = null;
-		private TreeMap origintorefslist = new TreeMap(Util.filesorter);
-		private TreeMap origintocountgroup = new TreeMap(Util.filesorter);
-		private CountGroup counts = new CountGroup();
-	}
-	
-	/**
-	 * Method used for initializing tracing in the report converter
-	 */
-	public static void setDebug(boolean debugValue) {
-		DEBUG = debugValue || Util.DEBUG;
-	}
-	
-	/**
-	 * Constant used for controlling tracing in the report converter
-	 */
-	private static boolean DEBUG = Util.DEBUG;
-	
-	/**
-	 * Default XSLT file name
-	 */
-	private static final String DEFAULT_XSLT = "/references.xsl"; //$NON-NLS-1$
-	
-	/**
-	 * Collection of {@link Report}s
-	 */
-	HashSet/*<Report>*/ reports = null;
-	private File htmlRoot = null;
-	private File reportsRoot = null;
-	private String xmlLocation = null;
-	private String htmlLocation = null;
-	private File htmlIndex = null;
-
-	/**
-	 * Visibility constant indicating an element has host-fragment level of visibility.
-	 *  i.e. fragments have {@link #PRIVATE_PERMISSIBLE}-like access to the internals of their host.
-	 *  
-	 *  @since 1.0.1
-	 */
-	public static final int FRAGMENT_PERMISSIBLE = 0x0000005;
-	
-	/**
-	 * Constructor
-	 * @param htmlroot the folder root where the HTML reports should be written
-	 * @param xmlroot the folder root where the current API use scan output is located
-	 */
-	public ApiUseReportConverter(String htmlroot, String xmlroot) {
-		this.xmlLocation = xmlroot;
-		this.htmlLocation = htmlroot;
-	}
-	
-	/**
-	 * Runs the converter on the given locations
-	 */
-	public void convert(String xslt, IProgressMonitor monitor) throws Exception {
-		if (this.htmlLocation == null) {
-			return;
-		}
-		SubMonitor localmonitor = SubMonitor.convert(monitor, SearchMessages.ApiUseReportConverter_preparing_report_metadata, 8);
-		try {
-			SAXParserFactory factory = SAXParserFactory.newInstance();
-			SAXParser parser = null;
-			try {
-				parser = factory.newSAXParser();
-			} catch (ParserConfigurationException e) {
-				e.printStackTrace();
-			} catch (SAXException e) {
-				e.printStackTrace();
-			}
-			if (parser == null) {
-				throw new Exception(SearchMessages.could_not_create_sax_parser);
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_preparing_html_root);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			this.htmlRoot = new File(this.htmlLocation);
-			if (!this.htmlRoot.exists()) {
-				if (!this.htmlRoot.mkdirs()) {
-					throw new Exception(SearchMessages.bind(SearchMessages.could_not_create_file, this.htmlLocation));
-				}
-			}
-			else {
-				this.htmlRoot.mkdirs();
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_preparing_xml_root);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			if (this.xmlLocation == null) {
-				throw new Exception(SearchMessages.missing_xml_files_location);
-			}
-			this.reportsRoot = new File(this.xmlLocation);
-			if (!this.reportsRoot.exists() || !this.reportsRoot.isDirectory()) {
-				throw new Exception(SearchMessages.bind(SearchMessages.invalid_directory_name, this.xmlLocation));
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_preparing_xslt_file);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			File xsltFile = null;
-			if(xslt != null) {
-				// we will use the default XSLT transform from the ant jar when this is null
-				xsltFile = new File(xslt);
-				if(!xsltFile.exists() || !xsltFile.isFile()) {
-					throw new Exception(SearchMessages.ApiUseReportConverter_xslt_file_not_valid);
-				}
-			}
-			long start = 0;
-			if(DEBUG) {
-				System.out.println("Preparing to write indexes..."); //$NON-NLS-1$
-				start = System.currentTimeMillis();
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_collecting_dir_info);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			File[] referees = getDirectories(this.reportsRoot);
-			this.reports = new HashSet(referees.length+1);
-			Report report = null;
-			File[] origins = null;
-			File[] xmlfiles = null;
-			UseDefaultHandler handler = null;
-			CountGroup counts = null;
-			SubMonitor smonitor = localmonitor.newChild(1);
-			smonitor.setWorkRemaining(referees.length);
-			try {
-				for (int i = 0; i < referees.length; i++) {
-					report = new Report();
-					report.referee = referees[i];
-					smonitor.setTaskName(SearchMessages.bind(SearchMessages.ApiUseReportConverter_preparing_report_info_for, new String[] {referees[i].getName()}));
-					origins = getDirectories(referees[i]);
-					for (int j = 0; j < origins.length; j++) {
-						xmlfiles = Util.getAllFiles(origins[j], new FileFilter() {
-							public boolean accept(File pathname) {
-								return pathname.isDirectory() || pathname.getName().endsWith(".xml"); //$NON-NLS-1$
-							}
-						});
-						if(xmlfiles != null) {
-							report.origintorefslist.put(origins[j], xmlfiles);
-						}
-						counts = new CountGroup();
-						report.origintocountgroup.put(origins[j], counts);
-						if (xmlfiles != null) {
-							for (int k = 0; k < xmlfiles.length; k++) {
-								try {
-									handler = new UseDefaultHandler(report, getTypeFromFileName(xmlfiles[k]), counts);
-									parser.parse(xmlfiles[k], handler);
-								} 
-								catch (SAXException e) {}
-								catch (IOException e) {}
-							}
-						}
-					}
-					this.reports.add(report);
-					if(smonitor.isCanceled()) {
-						return;
-					}
-					smonitor.worked(1);
-				}
-			}
-			finally {
-				if(!smonitor.isCanceled()) {
-					smonitor.done();
-				}
-			}
-			ArrayList sortedreports = new ArrayList(this.reports); 
-			Collections.sort(sortedreports, new Comparator() {
-				public int compare(Object o1, Object o2) {
-					if(o1 instanceof Report && o2 instanceof Report) {
-						return ((Report)o1).referee.getName().compareTo(((Report)o2).referee.getName());
-					}
-					return 0;
-				}
-			});
-			if(DEBUG) {
-				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-				System.out.println("Writing not searched index..."); //$NON-NLS-1$
-				start = System.currentTimeMillis();
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_writing_not_searched);
-			writeNotSearched(htmlRoot);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			if(DEBUG) {
-				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-				System.out.println("Writing root index.html..."); //$NON-NLS-1$
-				start = System.currentTimeMillis();
-			}
-			localmonitor.setTaskName(SearchMessages.ApiUseReportConverter_writing_root_index);
-			writeIndexFile(sortedreports, htmlRoot);
-			if(localmonitor.isCanceled()) {
-				return;
-			}
-			localmonitor.worked(1);
-			if(DEBUG) {
-				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-			//dump the reports
-			TreeMap originstorefs = null;
-			smonitor = localmonitor.newChild(1);
-			smonitor.setWorkRemaining(sortedreports.size());
-			try {
-				for(Iterator iter = sortedreports.iterator(); iter.hasNext();) {
-					report = (Report) iter.next();
-					localmonitor.setTaskName(SearchMessages.bind(SearchMessages.ApiUseReportConverter_writing_group_reports_for, new String[] {report.referee.getName()}));
-					if(DEBUG) {
-						start = System.currentTimeMillis();
-						System.out.println("Writing report for "+report.referee.getName()+"..."); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-					writeRefereeIndex(report);
-					originstorefs = report.origintorefslist;
-					for(Iterator iter2 = originstorefs.entrySet().iterator(); iter2.hasNext();) {
-						Map.Entry entry = (Map.Entry) iter2.next();
-						File origin = (File) entry.getKey();
-						writeOriginEntry(report, xmlfiles, origin, (CountGroup) report.origintocountgroup.get(origin));
-						xmlfiles = (File[]) entry.getValue();
-						tranformXml(xmlfiles, xsltFile);
-					}
-					if(DEBUG) {
-						System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-					if(smonitor.isCanceled()) {
-						return;
-					}
-					smonitor.worked(1);
-				}
-			}
-			finally {
-				if(!smonitor.isCanceled()) {
-					smonitor.done();
-				}
-			}
-		}
-		finally {
-			if(localmonitor != null) {
-				localmonitor.done();
-			}
-		}
-	}
-	
-	/**
-	 * @return the index.html file created from the report conversion or <code>null</code>
-	 * if the conversion failed
-	 */
-	public File getReportIndex() {
-		return htmlIndex;
-	}
-	
-	/**
-	 * Applies the given XSLT to the given XML to produce HTML in the given file
-	 * @param xsltfile
-	 * @param xmlfile
-	 * @param htmloutput
-	 * @throws TransformerException
-	 */
-	private void applyXSLT(File xsltFile, File xmlfile, File htmloutput) throws TransformerException, Exception {
-		Source xml = new StreamSource(xmlfile);
-		Source xslt = null;
-		if (xsltFile != null) {
-			xslt = new StreamSource(xsltFile);
-		} else {
-			InputStream defaultXsltInputStream = ApiUseReportConverter.class.getResourceAsStream(DEFAULT_XSLT);
-			if (defaultXsltInputStream != null) {
-				xslt = new StreamSource(new BufferedInputStream(defaultXsltInputStream));
-			}
-		}
-		if(xslt == null) {
-			throw new Exception(SearchMessages.ApiUseReportConverter_no_xstl_specified);
-		}
-		Result html = new StreamResult(htmloutput);
-		TransformerFactory factory = TransformerFactory.newInstance();
-		Transformer former = factory.newTransformer(xslt);
-		former.transform(xml, html);
-	}
-	
-	/**
-	 * Transforms the given set of xml files with the given XSLT and places the result into a
-	 * corresponding HTML file
-	 * @param xmlfiles
-	 * @param xsltFile
-	 * @param html
-	 */
-	private void tranformXml(File[] xmlfiles, File xsltFile) {
-		File html = null;
-		for (int i = 0; i < xmlfiles.length; i++) {
-			try {
-				File htmlroot = new File(this.htmlLocation, getHTMLFileLocation(this.reportsRoot, xmlfiles[i]));
-				if(!htmlroot.exists()) {
-					htmlroot.mkdirs();
-				}
-				html = new File(getNameFromXMLFilename(xmlfiles[i]));
-				applyXSLT(xsltFile, xmlfiles[i], html);
-			}
-			catch(TransformerException te) {}
-			catch (Exception e) {
-				ApiPlugin.log(e);
-			}
-		}
-	}
-	
-	/**
-	 * Gets the HTML path to write out the transformed XML file to
-	 * @param reportroot
-	 * @param xmlfile
-	 * @return
-	 */
-	private String getHTMLFileLocation(File reportroot, File xmlfile) {
-		IPath xml = new Path(xmlfile.getPath());
-		IPath report = new Path(reportroot.getPath());
-		int segments = xml.matchingFirstSegments(report);
-		if(segments > 0) {
-			if(xml.getDevice() != null) {
-				xml = xml.setDevice(null);
-			}
-			IPath html = xml.removeFirstSegments(segments);
-			return html.removeLastSegments(1).toOSString();
-		}
-		return null;
-	}
-	
-	/**
-	 * Returns the name to use for the corresponding HTML file
-	 * from the given XML file
-	 * @param xmlFile
-	 * @return the HTML name to use
-	 */
-	private String getNameFromXMLFilename(File xmlFile) {
-		String fileName = xmlFile.getAbsolutePath();
-		int index = fileName.lastIndexOf('.');
-		StringBuffer buffer = new StringBuffer();
-		buffer.append(fileName.substring(this.reportsRoot.getAbsolutePath().length(), index)).append(".html"); //$NON-NLS-1$
-		File htmlFile = new File(this.htmlLocation, String.valueOf(buffer));
-		return htmlFile.getAbsolutePath();
-	}
-	
-	/**
-	 * Writes out the file of components that were not searched: either because they appeared in an exclude list
-	 * or they have no .api_description file
-	 * 
-	 * @param htmlroot
-	 */
-	private void writeNotSearched(File htmlroot) throws Exception {
-		PrintWriter writer = null;
-		File originhtml = null;
-		try {
-			String filename = "not_searched"; //$NON-NLS-1$
-			originhtml = new File(htmlroot, filename+".html"); //$NON-NLS-1$
-			if(!originhtml.exists()) {
-				originhtml.createNewFile();
-			}
-			
-			FileWriter fileWriter = new FileWriter(originhtml);
-			writer = new PrintWriter(new BufferedWriter(fileWriter));
-			File xml = new File(this.reportsRoot, filename+".xml"); //$NON-NLS-1$
-			writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_bundle_list_header, new String[] {SearchMessages.ApiUseReportConverter_that_were_not_searched}));
-			if(!xml.exists()) {
-				writer.println(SearchMessages.ApiUseReportConverter_no_bundles);
-			}
-			else {
-				writer.println(SearchMessages.ApiUseReportConverter_bundle_list_table_header);
-				writeComponentList(writer, xml);
-				writeTableEnd(writer);
-			}
-			writeBackToBundleIndex(writer, "./index"); //$NON-NLS-1$
-			writeW3Footer(writer);
-		}
-		catch(IOException ioe) {
-			throw new Exception(SearchMessages.bind(SearchMessages.ioexception_writing_html_file, originhtml.getAbsolutePath()));
-		}
-		catch (CoreException e) {
-			throw new Exception(SearchMessages.bind(SearchMessages.ApiUseReportConverter_coreexception_writing_html_file, originhtml.getAbsolutePath()));
-		}
-		finally {
-			if (writer != null) {
-				writer.close();
-			}
-		}
-	}
-	
-	/**
-	 * Writes a convenience 'Back' link on the summary page
-	 * @param writer
-	 * @param indexname
-	 */
-	private void writeBackToBundleIndex(PrintWriter writer, String indexname) {
-		writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_back_to_bundle_index, 
-				new String[] {indexname+".html"})); //$NON-NLS-1$
-	}
-	
-	/**
-	 * Writes the standard W3 footer for each page
-	 * @param writer
-	 */
-	private void writeW3Footer(PrintWriter writer) {
-		writer.println(SearchMessages.W3C_page_footer);
-	}
-	
-	/**
-	 * Writes table end HTML 
-	 * @param writer
-	 */
-	private void writeTableEnd(PrintWriter writer) {
-		writer.println(SearchMessages.ApiUseReportConverter_table_end);
-	}
-	
-	/**
-	 * Writes out a raw list of {@link org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent}
-	 * @param writer
-	 * @param filename
-	 */
-	private void writeComponentList(PrintWriter writer, File xml) throws CoreException {
-		Element root = Util.parseDocument(Util.getFileContentAsString(xml));
-		NodeList components = root.getElementsByTagName(IApiXmlConstants.ELEMENT_COMPONENT);
-		Element component = null;
-		String id = null, nodesc = null, excluded = null, resolveerrors = null;
-		for (int i = 0; i < components.getLength(); i++) {
-			component = (Element) components.item(i);
-			id = component.getAttribute(IApiXmlConstants.ATTR_ID);
-			nodesc = component.getAttribute(IApiXmlConstants.NO_API_DESCRIPTION);
-			excluded = component.getAttribute(IApiXmlConstants.EXCLUDED);
-			resolveerrors = component.getAttribute(IApiXmlConstants.RESOLUTION_ERRORS);
-			if(!"".equals(id)) { //$NON-NLS-1$
-				writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_not_searched_component_list, 
-								new String[] {id, nodesc, excluded, resolveerrors}));
-			}
-		}
-	}
-	
-	/**
-	 * Writes the referee index
-	 * @param report
-	 */
-	private void writeRefereeIndex(Report report) throws Exception {
-		PrintWriter writer = null;
-		File originhtml = null;
-		try {
-			File htmlroot = new File(this.htmlLocation, getHTMLFileLocation(this.reportsRoot, report.referee));
-			if(!htmlroot.exists()) {
-				htmlroot.mkdirs();
-			}
-			String refereetext = report.referee.getName();
-			File root = new File(htmlroot, report.referee.getName());
-			if(!root.exists()) {
-				root.mkdir();
-			}
-			originhtml = new File(root, refereetext+".html"); //$NON-NLS-1$
-			if(!originhtml.exists()) {
-				originhtml.createNewFile();
-			}
-			FileWriter fileWriter = new FileWriter(originhtml);
-			writer = new PrintWriter(new BufferedWriter(fileWriter));
-			writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_referee_index_header, new String[] {report.referee.getName()}));
-			writeRefereeIndexEntries(writer, report);
-			writeTableEnd(writer);
-			writeBackToBundleIndex(writer, "../index"); //$NON-NLS-1$
-			writeW3Footer(writer);
-		}
-		catch(IOException ioe) {
-			throw new Exception(SearchMessages.bind(SearchMessages.ioexception_writing_html_file, originhtml.getAbsolutePath()));
-		}
-		finally {
-			if (writer != null) {
-				writer.close();
-			}
-		}
-	}
-	
-	/**
-	 * Writes out all the index entries for the referee of the given report
-	 * @param writer
-	 * @param report
-	 */
-	private void writeRefereeIndexEntries(PrintWriter writer, Report report) {
-		TreeMap map = report.origintocountgroup;
-		File origin = null;
-		CountGroup counts = null;
-		String link = null;
-		File summary = null;
-		for(Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
-			Map.Entry entry = (Map.Entry)  iter.next();
-			origin = (File) entry.getKey();
-			counts = (CountGroup) entry.getValue();
-			summary = new File(origin, origin.getName()+".html"); //$NON-NLS-1$
-			link = extractLinkFrom(report.referee, summary.getAbsolutePath());
-			writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_referee_index_entry, 
-					new String[] {link, 
-						origin.getName(),
-						Integer.toString(counts.getTotalApiRefCount()),
-						Integer.toString(counts.getTotalInternalRefCount()),
-						Integer.toString(counts.getTotalPermissableRefCount()),
-						Integer.toString(counts.getTotalFragmentPermissibleRefCount()),
-						Integer.toString(counts.getTotalOtherRefCount())}));
-		}
-	}
-	
-	/**
-	 * Extracts underlying link text from the given absolute filename based off the root file
-	 * @param root
-	 * @param fileName
-	 * @return link text pruned via the given root file
-	 */
-	private String extractLinkFrom(File root, String fileName) {
-		StringBuffer buffer = new StringBuffer();
-		String substring = fileName.substring(root.getAbsolutePath().length()).replace('\\', '/');
-		buffer.append('.');
-		if(substring.charAt(0) != '/') {
-			buffer.append('/');
-		}
-		buffer.append(substring);
-		return String.valueOf(buffer);
-	}
-	
-	/**
-	 * Writes one entry for an origin summary
-	 * @param writer
-	 * @param origin
-	 * @param vis
-	 * @param vismodifier
-	 * @param typecount
-	 * @param methodcount
-	 * @param fieldcount
-	 */
-	private void writeOriginSummaryEntry(PrintWriter writer, File origin, String vis, int vismodifier, int typecount, int methodcount, int fieldcount) {
-		writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_origin_summary_table_entry,  
-				new String[]{
-					vis, 
-					getOriginSummaryCountLink(vismodifier, "type", origin, typecount),  //$NON-NLS-1$
-					getOriginSummaryCountLink(vismodifier, "method", origin, methodcount),  //$NON-NLS-1$
-					getOriginSummaryCountLink(vismodifier, "field", origin, fieldcount)})); //$NON-NLS-1$
-	}
-	
-	/**
-	 * Dumps out a link on the number of references, or just the number if the reference count is zero
-	 * @param vis
-	 * @param type
-	 * @param origin
-	 * @param count
-	 * @return a link or not
-	 */
-	private String getOriginSummaryCountLink(int vis, String type, File origin, int count) {
-		if(count == 0) {
-			return Integer.toString(count);
-		}
-		String vname = VisibilityModifiers.getVisibilityName(vis);
-		File linked = new File(origin, vname+File.separator+type+"_references.html"); //$NON-NLS-1$
-		String link = extractLinkFrom(origin, linked.getAbsolutePath());
-		return MessageFormat.format(SearchMessages.ApiUseReportConverter_origin_summary_count_link, 
-				new String[] {link, Integer.toString(count)}); 
-	}
-	
-	/**
-	 * Writes the main index file for the reports
-	 * @param reportsRoot
-	 */
-	private void writeIndexFile(List sortedreports, File reportsRoot) throws Exception {
-		PrintWriter writer = null;
-		try {
-			htmlIndex = new File(this.htmlLocation, "index.html"); //$NON-NLS-1$
-			if(!htmlIndex.exists()) {
-				htmlIndex.createNewFile();
-			}
-			FileWriter fileWriter = new FileWriter(htmlIndex);
-			writer = new PrintWriter(new BufferedWriter(fileWriter));
-			writer.println(SearchMessages.ApiUseReportConverter_search_html_index_file_header);
-			Report report = null;
-			for(Iterator iter = sortedreports.iterator(); iter.hasNext();) {
-				report = (Report) iter.next();
-				if(report != null) {
-					writeIndexEntry(writer, report);
-				}
-			}
-			writeTableEnd(writer);
-			writeW3Footer(writer);
-			writer.flush();
-		} catch (IOException e) {
-			throw new Exception(SearchMessages.bind(SearchMessages.ioexception_writing_html_file, htmlIndex.getAbsolutePath()));
-		} finally {
-			if (writer != null) {
-				writer.close();
-			}
-		}
-	}
-	
-	/**
-	 * Writes a single index file entry
-	 * @param writer
-	 * @param report
-	 * @throws IOException
-	 */
-	private void writeIndexEntry(PrintWriter writer, Report report) throws IOException {
-		File refereehtml = new File(report.referee, report.referee.getName()+".html"); //$NON-NLS-1$
-		String link = extractLinkFrom(this.reportsRoot, refereehtml.getAbsolutePath());
-		writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_referee_index_entry,  
-				new String[] {
-					link,
-					report.referee.getName(),
-					Integer.toString(report.counts.getTotalApiRefCount()),
-					Integer.toString(report.counts.getTotalInternalRefCount()),
-					Integer.toString(report.counts.getTotalPermissableRefCount()),
-					Integer.toString(report.counts.getTotalFragmentPermissibleRefCount()),
-					Integer.toString(report.counts.getTotalOtherRefCount())}));
-	}
-	
-	/**
-	 * Writes an origin index file in the corresponding origin directory
-	 * @param report
-	 * @param xmlfiles
-	 * @param origin
-	 * @param counts
-	 */
-	private void writeOriginEntry(Report report, File[] xmlfiles, File origin, CountGroup counts) throws Exception {
-		PrintWriter writer = null;
-		File originhtml = null;
-		try {
-			File htmlroot = new File(this.htmlLocation, getHTMLFileLocation(this.reportsRoot, origin));
-			if(!htmlroot.exists()) {
-				htmlroot.mkdirs();
-			}
-			String origintext = origin.getName();
-			File root = new File(htmlroot, origin.getName());
-			if(!root.exists()) {
-				root.mkdir();
-			}
-			originhtml = new File(root, origintext+".html"); //$NON-NLS-1$
-			if(!originhtml.exists()) {
-				originhtml.createNewFile();
-			}
-			FileWriter fileWriter = new FileWriter(originhtml);
-			writer = new PrintWriter(new BufferedWriter(fileWriter));
-			writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_origin_html_header, new String[] {origin.getName(), report.referee.getName()}));
-			writeOriginSummary(writer, report, origin, counts);
-			writeBackToBundleIndex(writer, "../"+report.referee.getName()); //$NON-NLS-1$
-			writeW3Footer(writer);
-			writer.flush();
-		}
-		catch(IOException ioe) {
-			throw new Exception(SearchMessages.bind(SearchMessages.ioexception_writing_html_file, originhtml.getAbsolutePath()));
-		}
-		finally {
-			if (writer != null) {
-				writer.close();
-			}
-		}
-	}	
-	
-	/**
-	 * Writes out one individual origin index entry
-	 * @param writer
-	 * @param origin
-	 * @param counts
-	 */
-	private void writeOriginSummary(PrintWriter writer, Report report, File origin, CountGroup counts) {
-		writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_origin_summary_header,  
-				new String[] {origin.getName(), Integer.toString(counts.getTotalRefCount()), report.referee.getName()}));
-		writer.println(MessageFormat.format(SearchMessages.ApiUseReportConverter_origin_summary_table_entry_bold, 
-				new String[]{SearchMessages.ApiUseReportConverter_visibility, 
-					SearchMessages.ApiUseReportConverter_type, 
-					SearchMessages.ApiUseReportConverter_method, 
-					SearchMessages.ApiUseReportConverter_field}));
-		writeOriginSummaryEntry(writer, 
-				origin, 
-				SearchMessages.ApiUseReportConverter_api, 
-				VisibilityModifiers.API,
-				counts.total_api_type_count, 
-				counts.total_api_method_count, 
-				counts.total_api_field_count);
-		writeOriginSummaryEntry(writer, 
-				origin, 
-				SearchMessages.ApiUseReportConverter_internal, 
-				VisibilityModifiers.PRIVATE,
-				counts.total_private_type_count, 
-				counts.total_private_method_count, 
-				counts.total_private_field_count);
-		writeOriginSummaryEntry(writer, 
-				origin, 
-				SearchMessages.ApiUseReportConverter_internal_permissable, 
-				VisibilityModifiers.PRIVATE_PERMISSIBLE,
-				counts.total_permissable_type_count, 
-				counts.total_permissable_method_count, 
-				counts.total_permissable_field_count);
-		writeOriginSummaryEntry(writer, 
-				origin, 
-				SearchMessages.ApiUseReportConverter_fragment_permissible, 
-				ApiUseReportConverter.FRAGMENT_PERMISSIBLE,
-				counts.total_fragment_permissible_type_count, 
-				counts.total_fragment_permissible_method_count, 
-				counts.total_fragment_permissible_field_count);
-		writeOriginSummaryEntry(writer, 
-				origin, 
-				SearchMessages.ApiUseReportConverter_other, 
-				VisibilityModifiers.ALL_VISIBILITIES,
-				counts.total_other_type_count, 
-				counts.total_other_method_count, 
-				counts.total_other_field_count);
-		writeTableEnd(writer);
-	}
-	
-	/**
-	 * Returns the {@link IReference} type from the file name
-	 * @param xmlfile
-	 * @return the type from the file name
-	 */
-	private int getTypeFromFileName(File xmlfile) {
-		if(xmlfile.getName().indexOf(XMLApiSearchReporter.TYPE_REFERENCES) > -1) {
-			return IReference.T_TYPE_REFERENCE;
-		}
-		if(xmlfile.getName().indexOf(XMLApiSearchReporter.METHOD_REFERENCES) > -1) {
-			return IReference.T_METHOD_REFERENCE;
-		}
-		return IReference.T_FIELD_REFERENCE;
-	}
-	
-	/**
-	 * Returns all the child directories form the given directory
-	 * @param file
-	 * @return
-	 */
-	private File[] getDirectories(File file) {
-		File[] directories = file.listFiles(new FileFilter() {
-			public boolean accept(File pathname) {
-				return pathname.isDirectory() && !pathname.isHidden();
-			}
-		});
-		return directories;
-	}	
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchRequestor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchRequestor.java
deleted file mode 100644
index 59d9624..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchRequestor.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.search;
-
-import java.util.Comparator;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.model.ApiBaseline;
-import org.eclipse.pde.api.tools.internal.model.PluginProjectApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
-import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
-import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchScope;
-import org.eclipse.pde.api.tools.internal.util.Util;
-
-/**
- * Default implementation of an {@link IApiSearchRequestor} to use with the
- * {@link ApiSearchEngine}. This requestor returns a search scope
- * composed of the dependent (visible) {@link IApiComponent}s for the given 
- * {@link IApiElement}
- * 
- * @since 1.0.0
- */
-public class ApiUseSearchRequestor implements IApiSearchRequestor {
-
-	/**
-	 * The backing elements to search with
-	 */
-	private Set fComponentIds = null;
-
-	/**
-	 * The mask to use while searching
-	 */
-	private int fSearchMask = 0;
-	
-	/**
-	 * The listing of components to ignore
-	 */
-	private Set fExcludeList = null;
-	
-	/**
-	 * The search scope for this requestor
-	 */
-	private IApiSearchScope fScope = null;
-	
-	/**
-	 * Default comparator that orders {@link IApiComponent} by their ID 
-	 */
-	public static final Comparator componentsorter = new Comparator(){
-		public int compare(Object o1, Object o2) {
-			if(o1 instanceof IApiComponent && o2 instanceof IApiComponent) {
-				try {
-					return ((IApiComponent)o1).getId().compareTo(((IApiComponent)o2).getId());
-				}
-				catch (CoreException ce) {}
-			}
-			return -1;
-		}
-	};
-	
-	/**
-	 * Constructor
-	 * @param elements an array of {@link IApiElement}s for the search engine to use
-	 * @param searchkinds the kinds of references to search for. 
-	 * <br>Options include: 
-	 * <ol>
-	 * <li>{@link #INCLUDE_API}</li>
-	 * <li>{@link #INCLUDE_INTERNAL}</li>
-	 * </ol>
-	 * @param excludelist an array of component ids that should be excluded from the search
-	 */
-	public ApiUseSearchRequestor(Set/*<String>*/ elementnames, IApiElement[] scope, int searchkinds, Set excludelist) {
-		fSearchMask = searchkinds;
-		fComponentIds = elementnames;
-		fExcludeList = excludelist;
-		prepareScope(scope);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptComponent(org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent)
-	 */
-	public boolean acceptComponent(IApiComponent component) {
-		return true; //fComponentIds.contains(component);
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptMember(org.eclipse.pde.api.tools.internal.provisional.model.IApiMember)
-	 */
-	public boolean acceptMember(IApiMember member) {
-		return true;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptReference(org.eclipse.pde.api.tools.internal.provisional.builder.IReference)
-	 */
-	public boolean acceptReference(IReference reference) {
-		try {
-			IApiMember member = reference.getResolvedReference();
-			if(member != null) {
-				IApiComponent component = member.getApiComponent();
-				if(!fComponentIds.contains(component.getId())) {
-					return false;
-				}
-				if(component.equals(reference.getMember().getApiComponent())) {
-					return false;
-				}
-				if(fSearchMask > 0) {
-					if(includesAPI() && includesInternal()) {
-						return true;
-					}
-					IApiAnnotations annots = component.getApiDescription().resolveAnnotations(member.getHandle());
-					if(annots != null) {
-						int vis = annots.getVisibility();
-						if(VisibilityModifiers.isAPI(vis) && includesAPI()) {
-							return true;
-						}
-						else if(VisibilityModifiers.isPrivate(vis) && includesInternal()) {
-							return true;
-						}
-					}
-				}
-			}
-		}
-		catch(CoreException ce) {
-			ApiPlugin.log(ce);
-		}
-		return false;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#getReferenceKinds()
-	 */
-	public int getReferenceKinds() {
-		int kinds = IReference.MASK_REF_ALL & ~IReference.REF_CONSTANTPOOL;
-		return kinds;
-	}
-	
-	/**
-	 * Prepares the search scope based on the available entries in the constructor
-	 * @param elements
-	 */
-	private void prepareScope(IApiElement[] elements) {
-		if(elements != null) {
-			try {
-				TreeSet comps = new TreeSet(componentsorter);
-				IApiComponent[] components = null;
-				IApiComponent component = null;
-				for(int i = 0; i < elements.length; i++) {
-					component = elements[i].getApiComponent();
-					if(component.isSystemComponent()) {
-						continue;
-					}
-					comps.add(component);
-					components = ((ApiBaseline)component.getBaseline()).getVisibleDependentComponents(new IApiComponent[] {component});
-					for (int j = 0; j < components.length; j++) {
-						if(acceptComponent0(components[j])) {
-							comps.add(components[j]);
-						}
-					}
-				}
-				components = (IApiComponent[]) comps.toArray(new IApiComponent[comps.size()]);
-				fScope = new ApiUseSearchScope(components);
-			}
-			catch(CoreException ce) {}
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#getScope()
-	 */
-	public IApiSearchScope getScope() {
-		return fScope;
-	}
-
-	/**
-	 * Checks the given {@link IApiComponent} to see if we allow it to appear in the scope or not
-	 * @param component
-	 * @return true if the given component should be allowed in the scope false otherwise
-	 * @throws CoreException
-	 */
-	private boolean acceptComponent0(IApiComponent component) throws CoreException {
-		return component != null &&  
-				!fExcludeList.contains(component.getId()) && 
-				isApiComponent(component);
-	}
-	
-	/**
-	 * Utility method to determine if the given {@link IApiComponent} represents a project that
-	 * is API tools enabled
-	 * @param component
-	 * @return true if the project represented by the given component is API tools enabled false otherwise
-	 */
-	private boolean isApiComponent(IApiComponent component) {
-		if(includesNonApiProjects()) {
-			return true;
-		}
-		if(component instanceof PluginProjectApiComponent) {
-			PluginProjectApiComponent comp = (PluginProjectApiComponent) component;
-			return comp.hasApiDescription();
-		}
-		else {
-			return Util.isApiToolsComponent(component);
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesAPI()
-	 */
-	public boolean includesAPI() {
-		return (fSearchMask & INCLUDE_API) > 0;
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesInternal()
-	 */
-	public boolean includesInternal() {
-		return (fSearchMask & INCLUDE_INTERNAL) > 0;
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesNonApiProjects()
-	 */
-	public boolean includesNonApiProjects() {
-		return (fSearchMask & INCLUDE_NON_API_ENABLED_PROJECTS) > 0;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchScope.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchScope.java
deleted file mode 100644
index 6ba9a01..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ApiUseSearchScope.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.search;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchScope;
-
-/**
- * Default implementation of {@link IApiSearchScope}
- * 
- * @since 1.0.0
- */
-public class ApiUseSearchScope implements IApiSearchScope {
-
-	/**
-	 * The raw list of elements in this scope
-	 */
-	private List fElements = null;
-	
-	/**
-	 * Constructor
-	 * @param elements
-	 */
-	public ApiUseSearchScope(IApiElement[] elements) {
-		fElements = new ArrayList(elements.length);
-		for(int i = 0; i < elements.length; i++) {
-			fElements.add(elements[i]);
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchScope#getScope()
-	 */
-	public IApiElement[] getScope() {
-		return (IApiElement[]) fElements.toArray(new IApiComponent[fElements.size()]);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchScope#encloses(org.eclipse.pde.api.tools.internal.provisional.model.IApiElement)
-	 */
-	public boolean encloses(IApiElement element) {
-		if(element != null) {
-			IApiComponent component = element.getApiComponent();
-			IApiComponent enclosing = null;
-			for(Iterator iter = fElements.iterator(); iter.hasNext();) {
-				enclosing = ((IApiElement)iter.next()).getApiComponent();
-				if(component.equals(enclosing)) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java
new file mode 100644
index 0000000..8d72540
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java
@@ -0,0 +1,171 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+/**
+ * Contains strings and methods for writing HTML markup
+ * 
+ * @since 1.0.1
+ */
+public abstract class HTMLConvertor {
+
+	/**
+	 * Default file extension for HTML files: <code>.html</code> 
+	 */
+	public static final String HTML_EXTENSION = ".html"; //$NON-NLS-1$
+	/**
+	 * Default file extension for XML files: <code>.xml</code>
+	 */
+	public static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
+	/**
+	 * Standard HTML file prefix
+	 */
+	public static final String HTML_HEADER = "<!doctype HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"; //$NON-NLS-1$
+	/**
+	 * Meta tag for default HTML content type
+	 */
+	public static final String CONTENT_TYPE_META = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n"; //$NON-NLS-1$
+	/**
+	 * Standard W3C footer image + link
+	 */
+	public static final String W3C_FOOTER = "<p>\n\t<a href=\"http://validator.w3.org/check?uri=referer\">\n<img src=\"http://www.w3.org/Icons/valid-html401-blue\" alt=\"Valid HTML 4.01 Transitional\" height=\"31\" width=\"88\"></a>\n</p>\n"; //$NON-NLS-1$
+	/**
+	 * Opening title tag: <code><title></code>
+	 */
+	public static final String OPEN_TITLE = "<title>"; //$NON-NLS-1$
+	/**
+	 * Closing title tag: <code></title></code>
+	 */
+	public static final String CLOSE_TITLE = "</title>\n"; //$NON-NLS-1$
+	/**
+	 * Opening head tag: <code><head></code>
+	 */
+	public static final String OPEN_HEAD = "<head>\n"; //$NON-NLS-1$
+	/**
+	 * Closing head tag: <code></head></code>
+	 */
+	public static final String CLOSE_HEAD = "</head>\n"; //$NON-NLS-1$
+	/**
+	 * Opening body tag: <code><body></code>
+	 */
+	public static final String OPEN_BODY = "<body>\n"; //$NON-NLS-1$
+	/**
+	 * Closing body tag: <code></body></code>
+	 */
+	public static final String CLOSE_BODY = "</body>\n"; //$NON-NLS-1$
+	/**
+	 * Opening h3 tag: <code><h3></code>
+	 */
+	public static final String OPEN_H3 = "<h3>"; //$NON-NLS-1$
+	/**
+	 * Closing h3 tag: <code></h3></code>
+	 */
+	public static final String CLOSE_H3 = "</h3>\n"; //$NON-NLS-1$
+	/**
+	 * Opening html tag: <code><html></code>
+	 */
+	public static final String OPEN_HTML = "<html>\n"; //$NON-NLS-1$
+	/**
+	 * Closing html tag: <code><html></code>
+	 */
+	public static final String CLOSE_HTML = "</html>\n"; //$NON-NLS-1$
+	/**
+	 * Closing table tag: <code></table></code>
+	 */
+	public static final String CLOSE_TABLE = "</table>\n"; //$NON-NLS-1$
+	/**
+	 * Opening td tag: <code><td></code>
+	 */
+	public static final String OPEN_TD = "<td>"; //$NON-NLS-1$
+	/**
+	 * Closing td tag: <code></td></code>
+	 */
+	public static final String CLOSE_TD = "</td>\n"; //$NON-NLS-1$
+	/**
+	 * Opening li tag: <code><li></code>
+	 */
+	public static final String OPEN_LI = "\t<li>"; //$NON-NLS-1$
+	/**
+	 * Closing li tag: <code></li></code>
+	 */
+	public static final String CLOSE_LI = "</li>\n"; //$NON-NLS-1$
+	/**
+	 * Opening p tag: <code><p></code>
+	 */
+	public static final String OPEN_P = "<p>"; //$NON-NLS-1$
+	/**
+	 * Closing p tag: <code></p></code>
+	 */
+	public static final String CLOSE_P = "</p>\n"; //$NON-NLS-1$	
+	/**
+	 * Opening ol tag: <code><ol></code>
+	 */
+	public static final String OPEN_OL = "<ol>\n"; //$NON-NLS-1$
+	/**
+	 * Closing ol tag: <code></ol></code>
+	 */
+	public static final String CLOSE_OL = "</ol>\n"; //$NON-NLS-1$
+	/**
+	 * Opening ul tag: <code><ul></code>
+	 */
+	public static final String OPEN_UL = "<ul>\n"; //$NON-NLS-1$
+	/**
+	 * Closing ul tag: <code></ul></code>
+	 */
+	public static final String CLOSE_UL = "</ul>\n"; //$NON-NLS-1$
+	/**
+	 * Opening tr tag: <code><tr></code>
+	 */
+	public static final String OPEN_TR = "<tr>\n"; //$NON-NLS-1$
+	/**
+	 * Closing tr tag: <code></tr></code>
+	 */
+	public static final String CLOSE_TR = "</tr>\n"; //$NON-NLS-1$
+	/**
+	 * Closing div tag: <code></div></code>
+	 */
+	public static final String CLOSE_DIV = "</div>\n"; //$NON-NLS-1$
+	/**
+	 * Break tag: <code><br></code>
+	 */
+	public static final String BR = "<br>"; //$NON-NLS-1$
+	/**
+	 * Closing a tag: <code></a></code>
+	 */
+	public static final String CLOSE_A = "</a>\n"; //$NON-NLS-1$
+	/**
+	 * Opening b tag: <code><b></code>
+	 */
+	public static final String OPEN_B = "<b>"; //$NON-NLS-1$
+	/**
+	 * Closing b tag: <code></b></code>
+	 */
+	public static final String CLOSE_B = "</b>"; //$NON-NLS-1$
+	/**
+	 * Closing h4 tag: <code></h4></code>
+	 */
+	public static final String CLOSE_H4 = "</h4>\n"; //$NON-NLS-1$
+	/**
+	 * Opening h4 tag: <code><h4></code>
+	 */
+	public static final String OPEN_H4 = "<h4>"; //$NON-NLS-1$
+	
+	/**
+	 * Opens a new <code><td></code> with the given width attribute set
+	 * @param width
+	 * @return a new open <code><td></code> tag
+	 */
+	public static String openTD(int width) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<td width=\"").append(width).append("%\">");  //$NON-NLS-1$//$NON-NLS-2$
+		return buffer.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/IReferenceDescriptor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/IReferenceDescriptor.java
new file mode 100644
index 0000000..bda3ce4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/IReferenceDescriptor.java
@@ -0,0 +1,93 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+
+/**
+ * Describes a reference with element descriptors. Similar to an IReference but does not need
+ * to be connected to an actual baseline/API components.
+ */
+public interface IReferenceDescriptor {
+	/**
+	 * The line number from which the reference was made or -1 if unknown.
+	 * 
+	 * @return source line number or -1
+	 */
+	public int getLineNumber();
+	
+	/**
+	 * Returns the member descriptor where the reference exists.
+	 * 
+	 * @return member descriptor where the reference exists
+	 */
+	public IMemberDescriptor getMember();
+	
+	/**
+	 * Returns the component descriptor where the reference exists.
+	 * 
+	 * @return component descriptor where the reference exists
+	 */
+	public IComponentDescriptor getComponent();
+
+	/**
+	 * Returns the specific kind of reference that was made.
+	 * 
+	 * @return reference kind - one of the reference modifiers
+	 */
+	public int getReferenceKind();
+	
+	/**
+	 * Returns any flags set on the reference
+	 * 
+	 * @return any flags set on the reference
+	 */
+	public int getReferenceFlags();
+	
+	/**
+	 * Returns the type of reference that has been made - one of type, field, or method.
+	 * 
+	 * @return one of the reference type constants defined in this interface
+	 */
+	public int getReferenceType();
+	
+	/**
+	 * Returns a descriptor for the referenced member.
+	 * 
+	 * @return referenced member descriptor
+	 */
+	public IMemberDescriptor getReferencedMember();
+	
+	/**
+	 * A descriptor for the referenced component.
+	 * 
+	 * @return referenced component descriptor
+	 */
+	public IComponentDescriptor getReferencedComponent();
+	
+	/**
+	 * Describes the visibility of the reference.
+	 * 
+	 * @return visibility 
+	 * @see org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers
+	 */
+	public int getVisibility();
+	
+	/**
+	 * Returns the collection of reported problem messages for the original {@link IReference} or 
+	 * <code>null</code> if there are no messages.
+	 * 
+	 * @return the list of problem messages or <code>null</code>
+	 * @since 1.1
+	 */
+	public String[] getProblemMessages();
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/MigrationReportConvertor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/MigrationReportConvertor.java
new file mode 100644
index 0000000..51c2461
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/MigrationReportConvertor.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Report converter specialization for migration reports
+ * 
+ * @since 1.0.1
+ */
+public class MigrationReportConvertor extends UseReportConverter {
+
+	/**
+	 * Constructor
+	 * @param htmlroot
+	 * @param xmlroot
+	 * @param topatterns
+	 * @param frompatterns
+	 */
+	public MigrationReportConvertor(String htmlroot, String xmlroot, String[] topatterns, String[] frompatterns) {
+		super(htmlroot, xmlroot, topatterns, frompatterns);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getIndexTitle()
+	 */
+	protected String getIndexTitle() {
+		return SearchMessages.MigrationReportConvertor_bundle_migration_information;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getIndexHeader()
+	 */
+	protected String getIndexHeader() {
+		return getIndexTitle();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getReferencedTypeTitle(java.lang.String)
+	 */
+	protected String getReferencedTypeTitle(String bundle) {
+		return NLS.bind(SearchMessages.MigrationReportConvertor_type_with_unresolved_refs, bundle);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getReferencedTypeHeader(java.lang.String)
+	 */
+	protected String getReferencedTypeHeader(String bundle) {
+		return getReferencedTypeTitle(bundle);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getAdditionalReferencedTypeInformation()
+	 */
+	protected String getAdditionalReferencedTypeInformation() {
+		return SearchMessages.MigrationReportConvertor_table_shows_unresolved;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getTypeTitle(java.lang.String)
+	 */
+	protected String getTypeTitle(String typename) {
+		return NLS.bind(SearchMessages.MigrationReportConvertor_type_migration_information, Signature.getSimpleName(typename));
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getTypeHeader(java.lang.String)
+	 */
+	protected String getTypeHeader(String typename) {
+		return getTypeTitle(typename);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getTypeDetailsHeader()
+	 */
+	protected String getTypeDetailsHeader() {
+		return SearchMessages.MigrationReportConvertor_migration_details;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getTypeDetails()
+	 */
+	protected String getTypeDetails() {
+		return SearchMessages.MigrationReportConvertor_click_table_entry;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getTypeCountSummary(java.lang.String, org.eclipse.pde.api.tools.internal.search.UseReportConverter.CountGroup, int)
+	 */
+	protected String getTypeCountSummary(String typename, CountGroup counts, int membercount) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_H4).append(SearchMessages.UseReportConverter_summary).append(CLOSE_H4); 
+		buffer.append(OPEN_P).append(NLS.bind(SearchMessages.MigrationReportConvertor_member_has_unresolved_refs, new String[] {typename, Integer.toString(counts.getTotalRefCount()), Integer.toString(membercount)})).append(CLOSE_P);  
+		return buffer.toString();
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getAdditionalIndexInfo(boolean)
+	 */
+	protected String getAdditionalIndexInfo(boolean hasreports) {
+		if(hasreports) {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(SearchMessages.MigrationReportConvertor_bundles_have_references);
+			return buffer.toString();
+		}
+		return null;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseReportConverter#getNoReportsInformation()
+	 */
+	protected String getNoReportsInformation() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_P).append(BR).append(SearchMessages.MigrationReportConvertor_no_reported_migration_problems).append(CLOSE_P); 
+		return buffer.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceDescriptor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceDescriptor.java
new file mode 100644
index 0000000..b453994
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceDescriptor.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+
+/**
+ * Implementation of a reference descriptor
+ */
+public class ReferenceDescriptor implements IReferenceDescriptor {
+	
+	private IMemberDescriptor origin;
+	private IMemberDescriptor target;
+	private IComponentDescriptor from;
+	private IComponentDescriptor to;
+	
+	private int line;
+	private int kind;
+	private int flags;
+	private int visibility;
+	private String[] messages = null;
+	
+	public ReferenceDescriptor(IComponentDescriptor from, IMemberDescriptor origin, int line, IComponentDescriptor to, IMemberDescriptor target, int kind, int flags, int vis, String[] messages) {
+		this.origin = origin;
+		this.target = target;
+		this.from = from;
+		this.to = to;
+		this.line = line;
+		this.kind = kind;
+		this.flags = flags;
+		this.visibility = vis;
+		this.messages = messages;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (obj instanceof ReferenceDescriptor) {
+			ReferenceDescriptor rd = (ReferenceDescriptor) obj;
+			return origin.equals(rd.origin) &&
+			target.equals(rd.target) &&
+			from.equals(rd.from) &&
+			to.equals(rd.to) &&
+			line == rd.line && kind == rd.kind && visibility == rd.visibility;
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return origin.hashCode() + target.hashCode() + from.hashCode() + to.hashCode() + line + kind + visibility;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getComponent()
+	 */
+	public IComponentDescriptor getComponent() {
+		return from;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getLineNumber()
+	 */
+	public int getLineNumber() {
+		return line;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getMember()
+	 */
+	public IMemberDescriptor getMember() {
+		return origin;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getReferenceKind()
+	 */
+	public int getReferenceKind() {
+		return kind;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getReferenceFlags()
+	 */
+	public int getReferenceFlags() {
+		return flags;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getReferenceType()
+	 */
+	public int getReferenceType() {
+		switch (getReferencedMember().getElementType()) {
+			case IElementDescriptor.TYPE: return IReference.T_TYPE_REFERENCE;
+			case IElementDescriptor.METHOD: return IReference.T_METHOD_REFERENCE;
+			case IElementDescriptor.FIELD: return IReference.T_FIELD_REFERENCE;
+			default: return -1;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getReferencedComponent()
+	 */
+	public IComponentDescriptor getReferencedComponent() {
+		return to;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getReferencedMember()
+	 */
+	public IMemberDescriptor getReferencedMember() {
+		return target;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getVisibility()
+	 */
+	public int getVisibility() {
+		return visibility;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor#getProblemMessages()
+	 */
+	public String[] getProblemMessages() {
+		return this.messages;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceLookupVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceLookupVisitor.java
new file mode 100644
index 0000000..9a5d66a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/ReferenceLookupVisitor.java
@@ -0,0 +1,281 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.builder.Reference;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Resolves references from an API use scan in an alternate baseline to see if the
+ * reference still exists in that baseline. Can be used to detect potential migration
+ * issues. 
+ */
+public class ReferenceLookupVisitor extends UseScanVisitor {
+	
+	private IApiBaseline baseline; // baseline to resolve in
+	private IComponentDescriptor targetComponent; // references are made to this component
+	private IComponentDescriptor referencingComponent; // references are made from this component
+	private IApiComponent currComponent; // corresponding component in baseline
+	private boolean skipped = false; // whether the target component was skipped based on scope settings
+	private IMemberDescriptor targetMember; // member a reference has been made to
+	private IReferenceTypeDescriptor targetType; // the enclosing type the reference has been made to
+	private IApiType currType; // corresponding type for current member
+	
+	private List missingComponents = new ArrayList(); // list of missing component descriptors
+	private List skippedComponents = new ArrayList(); // list of skipped component descriptors
+	
+	private String location; // path in file system to create report in
+	
+	private List unresolved = null; // list of reference descriptors (errors)
+	
+	private String analysisScope = null; // the bundles to analyze references from (search scope)
+	private String targetScope = null; // the bundles to analyze references to (target scope)
+	
+	/**
+	 * Creates a visitor to resolve references in the given baseline
+	 * 
+	 * @param base baseline
+	 * @param location to create XML report
+	 */
+	public ReferenceLookupVisitor(IApiBaseline base, String xmlLocation) {
+		baseline = base;
+		location = xmlLocation;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitComponent(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+	 */
+	public boolean visitComponent(IComponentDescriptor target) {
+		unresolved = new ArrayList();
+		targetComponent = target;
+		skipped = false;
+		if (targetScope == null || target.getId().matches(targetScope)) {
+			// only analyze if it matches our scope
+			currComponent = baseline.getApiComponent(targetComponent.getId());
+			return true;			
+		}
+		skipped = true;
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitReferencingComponent(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+	 */
+	public boolean visitReferencingComponent(IComponentDescriptor component) {
+		referencingComponent = component;
+		if (currComponent == null) {
+			return false;
+		}
+		if (analysisScope == null || component.getId().matches(analysisScope)) {
+			// only consider if in scope
+			return true;
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitMember(org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor)
+	 */
+	public boolean visitMember(IMemberDescriptor referencedMember) {
+		targetMember = referencedMember;
+		switch (targetMember.getElementType()) {
+			case IElementDescriptor.TYPE: {
+				targetType = (IReferenceTypeDescriptor)targetMember;
+				break;
+			}
+			case IElementDescriptor.METHOD:
+			case IElementDescriptor.FIELD: {
+				targetType = targetMember.getEnclosingType();
+				break;
+			}
+		}
+		currType = null;
+		try {
+			IApiTypeRoot typeRoot = null;
+			IApiComponent[] comps = currComponent.getBaseline().resolvePackage(currComponent, targetType.getPackage().getName());
+			for (int i = 0; i < comps.length; i++) {
+				typeRoot = comps[i].findTypeRoot(targetType.getQualifiedName());
+				if(typeRoot != null) {
+					break;
+				}
+			}
+			if (typeRoot != null) {
+				currType = typeRoot.getStructure();
+			}
+			return true;
+		} catch (CoreException e) {
+			ApiPlugin.log(e.getStatus());
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitReference(org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor)
+	 */
+	public void visitReference(IReferenceDescriptor reference) {
+		Reference ref = null;
+		IApiMember resolved = null;
+		int refKind = reference.getReferenceKind();
+		int lineNumber = reference.getLineNumber();
+		IMemberDescriptor origin = reference.getMember();
+		if (currType != null) {
+			switch (targetMember.getElementType()) {
+			case IElementDescriptor.TYPE:
+				ref = Reference.typeReference(currType, targetType.getQualifiedName(), refKind);
+				break;
+			case IElementDescriptor.METHOD:
+				ref = Reference.methodReference(currType, targetType.getQualifiedName(), targetMember.getName(), ((IMethodDescriptor)targetMember).getSignature(), refKind);
+				break;
+			case IElementDescriptor.FIELD:
+				ref = Reference.fieldReference(currType, targetType.getQualifiedName(), targetMember.getName(), refKind);
+				break;
+			}
+		}
+		if (ref != null) {
+			try {
+				ref.resolve();
+				resolved = ref.getResolvedReference();
+			} catch (CoreException e) {
+				ApiPlugin.log(e.getStatus());
+			}
+		}
+		if (resolved == null) {
+			// ERROR - failed to resolve
+			addError(Factory.referenceDescriptor(
+					referencingComponent, 
+					origin, 
+					lineNumber, 
+					targetComponent, 
+					targetMember, 
+					refKind, 
+					reference.getReferenceFlags(), 
+					reference.getVisibility(),
+					null));
+		}
+	}
+	
+	private void addError(IReferenceDescriptor error) {
+		unresolved.add(error);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#endVisit(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+	 */
+	public void endVisit(IComponentDescriptor target) {
+		if (skipped) {
+			skippedComponents.add(target);
+		} else {
+			if (currComponent == null) {
+				missingComponents.add(target);
+			} else {
+				if (!unresolved.isEmpty()) {
+					XmlReferenceDescriptorWriter writer = new XmlReferenceDescriptorWriter(location);
+					writer.setAlternate((IComponentDescriptor) currComponent.getHandle());
+					writer.writeReferences((IReferenceDescriptor[]) unresolved.toArray(new IReferenceDescriptor[unresolved.size()]));
+				}
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#endVisitScan()
+	 */
+	public void endVisitScan() {
+		BufferedWriter writer = null;
+		try {
+			// generate missing bundles information
+			File rootfile = new File(location);
+			if(!rootfile.exists()) {
+				rootfile.mkdirs();
+			}
+			File file = new File(rootfile, "not_searched.xml"); //$NON-NLS-1$
+			if(!file.exists()) {
+				file.createNewFile();
+			}
+			Document doc = Util.newDocument();
+			Element root = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENTS);
+			doc.appendChild(root);
+			addMissingComponents(missingComponents, SearchMessages.ReferenceLookupVisitor_0, doc, root);
+			addMissingComponents(skippedComponents, SearchMessages.SkippedComponent_component_was_excluded, doc, root);
+			writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), IApiCoreConstants.UTF_8));
+			writer.write(Util.serializeDocument(doc));
+			writer.flush();
+		}
+		catch(FileNotFoundException fnfe) {}
+		catch(IOException ioe) {}
+		catch(CoreException ce) {}
+		finally {
+			if(writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {}
+			}
+		}
+	}
+	
+	private void addMissingComponents(List missing, String details, Document doc, Element root) {
+		Iterator iter = missing.iterator();
+		while (iter.hasNext()) {
+			IComponentDescriptor component = (IComponentDescriptor)iter.next();
+			Element comp = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENT);
+			comp.setAttribute(IApiXmlConstants.ATTR_ID, component.getId());
+			comp.setAttribute(IApiXmlConstants.ATTR_VERSION, component.getVersion());
+			comp.setAttribute(IApiXmlConstants.SKIPPED_DETAILS, details);
+			root.appendChild(comp);
+		}
+	}
+	
+	/**
+	 * Limits the scope of bundles to consider references from, as a regular expression.
+	 * 
+	 * @param regex regular expression or <code>null</code> if all
+	 */
+	public void setAnalysisScope(String regex) {
+		analysisScope = regex;
+	}
+	
+	/**
+	 * Limits the set of bundles to consider analyzing references to, as a regular expression.
+	 *  
+	 * @param regex regular expression or <code>null</code> if all.
+	 */
+	public void setTargetScope(String regex) {
+		targetScope = regex;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SearchMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SearchMessages.java
index 94f0e4f..dccaa68 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SearchMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SearchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,54 +19,113 @@ public class SearchMessages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.internal.search.searchmessages"; //$NON-NLS-1$
 	public static String ApiSearchEngine_anonymous_type;
 	public static String ApiSearchEngine_api;
+	public static String ApiSearchEngine_api_and_illegal;
+	public static String ApiSearchEngine_api_and_internal;
 	public static String ApiSearchEngine_api_internal;
 	public static String ApiSearchEngine_extracting_refs_from;
+	public static String ApiSearchEngine_illegal;
 	public static String ApiSearchEngine_internal;
+	public static String ApiSearchEngine_internal_and_illegal;
 	public static String ApiSearchEngine_searching_for_use_from;
 	public static String ApiSearchEngine_searching_project;
 	public static String ApiSearchEngine_searching_projects;
-	public static String ApiUseReportConverter_back_to_bundle_index;
-	public static String ApiUseReportConverter_bundle_list_header;
-	public static String ApiUseReportConverter_collecting_dir_info;
-	public static String ApiUseReportConverter_coreexception_writing_html_file;
-	public static String ApiUseReportConverter_no_bundles;
-	public static String ApiUseReportConverter_not_searched_component_list;
-	public static String ApiUseReportConverter_table_end;
-	public static String ApiUseReportConverter_that_were_not_searched;
-	public static String ApiUseReportConverter_no_xstl_specified;
 	public static String ioexception_writing_html_file;
-	public static String W3C_page_footer;
-	public static String ApiUseReportConverter_referee_index_header;
-	public static String ApiUseReportConverter_origin_summary_count_link;
-	public static String ApiUseReportConverter_origin_summary_table_entry;
-	public static String ApiUseReportConverter_search_html_index_file_header;
-	public static String ApiUseReportConverter_origin_summary_table_entry_bold;
-	public static String ApiUseReportConverter_visibility;
-	public static String ApiUseReportConverter_type;
-	public static String ApiUseReportConverter_method;
-	public static String ApiUseReportConverter_field;
-	public static String ApiUseReportConverter_fragment_permissible;
-	public static String ApiUseReportConverter_internal;
-	public static String ApiUseReportConverter_internal_permissable;
-	public static String ApiUseReportConverter_api;
-	public static String ApiUseReportConverter_other;
-	public static String ApiUseReportConverter_origin_html_header;
-	public static String ApiUseReportConverter_preparing_html_root;
-	public static String ApiUseReportConverter_preparing_report_info_for;
-	public static String ApiUseReportConverter_preparing_report_metadata;
-	public static String ApiUseReportConverter_preparing_xml_root;
-	public static String ApiUseReportConverter_preparing_xslt_file;
-	public static String ApiUseReportConverter_writing_group_reports_for;
-	public static String ApiUseReportConverter_writing_not_searched;
-	public static String ApiUseReportConverter_writing_root_index;
 	public static String could_not_create_sax_parser;
 	public static String could_not_create_file;
 	public static String missing_xml_files_location;
 	public static String invalid_directory_name;
-	public static String ApiUseReportConverter_xslt_file_not_valid;
-	public static String ApiUseReportConverter_referee_index_entry;
-	public static String ApiUseReportConverter_origin_summary_header;
-	public static String ApiUseReportConverter_bundle_list_table_header;
+	public static String MigrationReportConvertor_bundle_migration_information;
+	public static String MigrationReportConvertor_bundles_have_references;
+	public static String MigrationReportConvertor_click_table_entry;
+	public static String MigrationReportConvertor_member_has_unresolved_refs;
+	public static String MigrationReportConvertor_migration_details;
+	public static String MigrationReportConvertor_no_reported_migration_problems;
+	public static String MigrationReportConvertor_table_shows_unresolved;
+	public static String MigrationReportConvertor_type_migration_information;
+	public static String MigrationReportConvertor_type_with_unresolved_refs;
+	public static String ReferenceLookupVisitor_0;
+	public static String SkippedComponent_component_was_excluded;
+	public static String UseReportConverter_xslt_file_not_valid;
+	public static String UseReportConverter_collecting_dir_info;
+	public static String UseReportConverter_core_exep_reading_metadata;
+	public static String UseReportConverter_coreexception_writing_html_file;
+	public static String UseReportConverter_te_applying_xslt_skipped;
+	public static String UseReportConverter_no_additional_scan_info;
+	public static String UseReportConverter_no_xstl_specified;
+	public static String UseReportConverter_scan_date;
+	public static String UseReportConverter_scan_details;
+	public static String UseReportConverter_scope_pattern;
+	public static String UseReportConverter_se_error_parser_handle;
+	public static String UseReportConverter_pce_error_getting_parser;
+	public static String UseReportConverter_preparing_html_root;
+	public static String UseReportConverter_preparing_report_metadata;
+	public static String UseReportConverter_preparing_xml_root;
+	public static String UseReportConverter_preparing_xslt_file;
+	public static String UseReportConverter_writing_not_searched;
+	public static String UseReportConverter_writing_root_index;
+	public static String UseReportConverter___has_total_refs;
+	public static String UseReportConverter_api_pattern;
+	public static String UseReportConverter_api_ref_description;
+	public static String UseReportConverter_api_references;
+	public static String UseReportConverter_archive_patterns;
+	public static String UseReportConverter_back_to_bundle_index;
+	public static String UseReportConverter_back_to_not_searched;
+	public static String UseReportConverter_baseline_loc;
+	public static String UseReportConverter_bundle;
+	public static String UseReportConverter_bundle_usage_information;
+	public static String UseReportConverter_bundles_that_were_not_searched;
+	public static String UseReportConverter_click_an_entry_to_see_details;
+	public static String UseReportConverter_description;
+	public static String UseReportConverter_filter_pattern;
+	public static String UseReportConverter_filter_pattern_not_valid;
+	public static String UseReportConverter_following_bundles_have_refs;
+	public static String UseReportConverter_fragment_permissible_references;
+	public static String UseReportConverter_fragment_ref_description;
+	public static String UseReportConverter_illegal;
+	public static String UseReportConverter_illegal_ref_description;
+	public static String UseReportConverter_includes_API_refs;
+	public static String UseReportConverter_includes_illegal_use;
+	public static String UseReportConverter_includes_internal_refs;
+	public static String UseReportConverter_inlined_description;
+	public static String UseReportConverter_internal_patterns;
+	public static String UseReportConverter_internal_permissible_references;
+	public static String UseReportConverter_internal_ref_description;
+	public static String UseReportConverter_internal_references;
+	public static String UseReportConverter_line_number;
+	public static String UseReportConverter_list_of_all_refing_bundles;
+	public static String UseReportConverter_marks_illegal_use_references;
+	public static String UseReportConverter_marks_internal_references;
+	public static String UseReportConverter_member;
+	public static String UseReportConverter_missing_bundles_prevented_scan;
+	public static String UseReportConverter_missing_required;
+	public static String UseReportConverter_no_reported_usage;
+	public static String UseReportConverter_no_required_missing;
+	public static String UseReportConverter_none;
+	public static String UseReportConverter_parsing_use_scan;
+	public static String UseReportConverter_permissible_ref_description;
+	public static String UseReportConverter_reference_count;
+	public static String UseReportConverter_reference_details;
+	public static String UseReportConverter_reference_kind;
+	public static String UseReportConverter_reference_location;
+	public static String UseReportConverter_reference_pattern;
+	public static String UseReportConverter_referenced_type;
+	public static String UseReportConverter_references;
+	public static String UseReportConverter_referencing_bundles;
+	public static String UseReportConverter_report_location;
+	public static String UseReportConverter_reported_missing_bundles;
+	public static String UseReportConverter_required_bundles;
+	public static String UseReportConverter_root_index_description;
+	public static String UseReportConverter_summary;
+	public static String UseReportConverter_terminology;
+	public static String UseReportConverter_to_filter_patterns;
+	public static String UseReportConverter_types_used_in;
+	public static String UseReportConverter_usage_details;
+	public static String UseReportConverter_use_scan_info;
+	public static String UseReportConverter_version;
+	public static String UseReportConverter_version_column_description;
+	public static String UseReportConvertor_additional_infos_section;
+	public static String UseScanParser_analyzing_references;
+	public static String UseScanParser_parsing;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, SearchMessages.class);
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SkippedComponent.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SkippedComponent.java
index 73eef85..c488cdf 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SkippedComponent.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/SkippedComponent.java
@@ -10,39 +10,40 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.search;
 
+import java.util.Comparator;
+import java.util.TreeSet;
+
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.ResolverError;
+import org.eclipse.osgi.service.resolver.VersionConstraint;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
 
 
 public class SkippedComponent implements IApiElement{
 	/**
-	 * If the skipped component has no .api_description
-	 */
-	private boolean noapidescription = false;
-	/**
-	 * If the skipped component was skipped because it was found in an exclude list
+	 * the id of of the skipped component
 	 */
-	private boolean inexcludelist = false;
+	private String componentid;
 	/**
-	 * If the skipped component has resolution errors
+	 * The version of the component 
 	 */
-	private boolean resolveerrors = false;
+	private String version;
 	/**
-	 * the id of of the skipped component
+	 * the set of resolution errors barring the component from being scanned
 	 */
-	private String componentid;
+	private ResolverError[] errors = null;
 
 	/**
 	 * Constructor
-	 * @param noapidescription
-	 * @param inexcludelist
 	 * @param componentid
+	 * @param version
+	 * @param errors the {@link ResolverError}s, if any, that prevented this component from being scanned
 	 */
-	public SkippedComponent(String componentid, boolean noapidescription, boolean inexcludelist, boolean resolveerrors) {
-		this.noapidescription = noapidescription;
-		this.inexcludelist = inexcludelist;
-		this.resolveerrors = resolveerrors;
+	public SkippedComponent(String componentid, String version, ResolverError[] errors) {
 		this.componentid = componentid;
+		this.version = version;
+		this.errors = errors;
 	}
 	
 	/* (non-Javadoc)
@@ -70,24 +71,17 @@ public class SkippedComponent implements IApiElement{
 	}
 	
 	/**
-	 * @return true if the the skipped component has no .api_description file
-	 */
-	public boolean hasNoApiDescription() {
-		return this.noapidescription;
-	}
-	
-	/**
 	 * @return true if the component was skipped because it appeared in an exclude list
 	 */
 	public boolean wasExcluded() {
-		return this.inexcludelist;
+		return this.errors == null;
 	}
 	
 	/**
 	 * @return true if the the component had resolution errors
 	 */
 	public boolean hasResolutionErrors() {
-		return this.resolveerrors;
+		return this.errors != null;
 	}
 
 	/**
@@ -98,6 +92,13 @@ public class SkippedComponent implements IApiElement{
 	}
 
 	/**
+	 * @return the version
+	 */
+	public String getVersion() {
+		return this.version;
+	}
+	
+	/**
 	 * @see org.eclipse.pde.api.tools.internal.provisional.model.IApiElement#getApiComponent()
 	 */
 	public IApiComponent getApiComponent() {
@@ -124,4 +125,58 @@ public class SkippedComponent implements IApiElement{
 	public int getType() {
 		return IApiElement.COMPONENT;
 	}
+	
+	/**
+	 * @return the errors
+	 */
+	public ResolverError[] getErrors() {
+		return this.errors;
+	}
+	
+	/**
+	 * Resolves the root errors for the given set of errors
+	 * @param errors
+	 * @param collector
+	 * @return the resolved leaf set of problem messages
+	 */
+	private String[] resolveRootErrors(ResolverError[] errors) {
+		TreeSet collector = new TreeSet(new Comparator() {
+			public int compare(Object o1, Object o2) {
+				return ((String)o1).compareTo(o2);
+			}
+		});
+		ResolverError error = null;
+		VersionConstraint[] constraints = null;
+		BundleDescription[] bundle = new BundleDescription[1];
+		for (int i = 0; i < errors.length; i++) {
+			error = errors[i];
+			if(error.getType() != ResolverError.MISSING_REQUIRE_BUNDLE) {
+				collector.add(error.toString());
+			}
+			bundle[0] = error.getBundle();
+			constraints = bundle[0].getContainingState().getStateHelper().getUnsatisfiedLeaves(bundle);
+			if(constraints.length == 0) {
+				collector.add(error.toString());
+			}
+			for (int j = 0; j < constraints.length; j++) {
+				collector.add(constraints[j].toString());
+			}
+		}
+		return (String[]) collector.toArray(new String[collector.size()]);
+	}
+	
+	/**
+	 * @return the formatted details of why the component was skipped
+	 */
+	public String getErrorDetails() {
+		if(this.errors != null) {
+			StringBuffer buffer = new StringBuffer();
+			String[] problems = resolveRootErrors(this.errors);
+			for (int i = 0; i < problems.length; i++) {
+				buffer.append(problems[i]).append("<br/>"); //$NON-NLS-1$
+			}
+			return buffer.toString();
+		}
+		return SearchMessages.SkippedComponent_component_was_excluded;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseMetadata.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseMetadata.java
new file mode 100644
index 0000000..30c9456
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseMetadata.java
@@ -0,0 +1,375 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
+import org.eclipse.pde.api.tools.internal.provisional.search.IMetadata;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Implementation of {@link IMetadata} for API use scans
+ * 
+ * @since 1.0.1
+ */
+public class UseMetadata implements IMetadata {
+
+	/**
+	 * XML tag name for the date the scan was run
+	 */
+	public static final String RUNATDATE = "runatdate"; //$NON-NLS-1$
+	/**
+	 * XML tag name for the search flags
+	 */
+	public static final String FLAGS = "flags"; //$NON-NLS-1$
+	/**
+	 * XML tag name for the baseline location
+	 */
+	public static final String BASELINELOCATION = "baselinelocation"; //$NON-NLS-1$
+	/**
+	 * XML tag name for the report location
+	 */
+	public static final String REPORTLOCATION = "reportlocation"; //$NON-NLS-1$
+	/**
+	 * XML tag name for a scope pattern
+	 */
+	public static final String SCOPEPATTERN = "scopepattern"; //$NON-NLS-1$
+	/**
+	 * XML tag name reference pattern
+	 */
+	public static final String REFERENCEPATTERN = "referencepattern"; //$NON-NLS-1$
+	/**
+	 * XML tag name for API patterns
+	 */
+	public static final String APIPATTERNS = "apipatterns"; //$NON-NLS-1$
+	/**
+	 * XML tag name for internal patterns
+	 */
+	public static final String INTERNALPATTERNS = "internalpatterns"; //$NON-NLS-1$
+	/**
+	 * XML tag name for archive patterns
+	 */
+	public static final String ARCHIVEPATTERNS = "archivepatterns"; //$NON-NLS-1$
+	/**
+	 * XML tag name for a pattern
+	 */
+	public static final String PATTERN = "pattern"; //$NON-NLS-1$
+	/**
+	 * XML tag name for the value
+	 */
+	public static final String VALUE = "value"; //$NON-NLS-1$
+	/**
+	 * Root tag for the metadata file
+	 */
+	public static final String METADATA = "metadata"; //$NON-NLS-1$
+	/**
+	 * XML tag name for the description field
+	 */
+	public static final String DESCRIPTION = "description"; //$NON-NLS-1$
+	
+	int searchflags = 0;
+	String[] apipatterns = null, intpatterns = null, archivepatterns = null;
+	String baselinelocation = null, 
+			reportlocation = null, 
+			scopepattern = null, 
+			refpattern = null, 
+			runatdate = null,
+			description = null;
+	
+	/**
+	 * Constructor
+	 */
+	public UseMetadata() {
+		//create an empty metadata object
+	}
+	
+	/**
+	 * Constructor
+	 * @param searchflags
+	 * @param scopepattern
+	 * @param refpattern
+	 * @param baselinelocation
+	 * @param reportlocation
+	 * @param apipatterns
+	 * @param internalpatterns
+	 * @param archivepatterns
+	 * @param runatdate
+	 * @param description
+	 */
+	public UseMetadata(int searchflags, String scopepattern, String refpattern, 
+			String baselinelocation, String reportlocation, String[] apipatterns, String[] internalpatterns, 
+			String[] archivepatterns, String runatdate, String description) {
+		this.searchflags = searchflags;
+		this.scopepattern = scopepattern;
+		this.refpattern = refpattern;
+		this.baselinelocation = baselinelocation;
+		this.reportlocation = reportlocation;
+		this.apipatterns = apipatterns;
+		this.intpatterns = internalpatterns;
+		this.archivepatterns = archivepatterns;
+		this.runatdate = runatdate;
+		this.description = description;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IMetadata#serializeToFile(java.io.File)
+	 */
+	public void serializeToFile(File file) throws IOException, CoreException {
+		BufferedWriter writer = null;
+		try {
+			Document doc = Util.newDocument();
+			Element root = doc.createElement(METADATA);
+			doc.appendChild(root);
+			Element child = doc.createElement(FLAGS);
+			root.appendChild(child);
+			child.setAttribute(VALUE, Integer.toString(this.searchflags));
+			child = doc.createElement(RUNATDATE);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.runatdate);
+			child = doc.createElement(DESCRIPTION);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.description);
+			child = doc.createElement(BASELINELOCATION);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.baselinelocation);
+			child = doc.createElement(REPORTLOCATION);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.reportlocation);
+			child = doc.createElement(SCOPEPATTERN);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.scopepattern);
+			child = doc.createElement(REFERENCEPATTERN);
+			root.appendChild(child);
+			child.setAttribute(VALUE, this.refpattern);
+			child = doc.createElement(APIPATTERNS);
+			root.appendChild(child);
+			Element sub = null;
+			if(this.apipatterns != null) {
+				for (int i = 0; i < this.apipatterns.length; i++) {
+					sub = doc.createElement(PATTERN);
+					child.appendChild(sub);
+					sub.setAttribute(VALUE, apipatterns[i]);
+				}
+			}
+			child = doc.createElement(INTERNALPATTERNS);
+			root.appendChild(child);
+			if(this.intpatterns != null) {
+				for (int i = 0; i < this.intpatterns.length; i++) {
+					sub = doc.createElement(PATTERN);
+					child.appendChild(sub);
+					sub.setAttribute(VALUE, intpatterns[i]);
+				}
+			}
+			child = doc.createElement(ARCHIVEPATTERNS);
+			root.appendChild(child);
+			if(this.archivepatterns != null) {
+				for (int i = 0; i < this.archivepatterns.length; i++) {
+					sub = doc.createElement(PATTERN);
+					child.appendChild(sub);
+					sub.setAttribute(VALUE, archivepatterns[i]);
+				}
+			}
+			writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), IApiCoreConstants.UTF_8));
+			writer.write(Util.serializeDocument(doc));
+			writer.flush();
+		}
+		finally {
+			if(writer != null) {
+				writer.close();
+			}
+		}
+	}
+
+	/**
+	 * @return true if the search8 flags include searching for API references,
+	 * false otherwise
+	 */
+	public boolean includesAPI() {
+		return (this.searchflags & IApiSearchRequestor.INCLUDE_API) != 0;
+	}
+	
+	/**
+	 * @return true if the search flags include searching for internal references, 
+	 * false otherwise
+	 */
+	public boolean includesInternal() {
+		return (this.searchflags & IApiSearchRequestor.INCLUDE_INTERNAL) != 0;
+	}
+	
+	/**
+	 * @return true if the search flags include searching for illegal use, 
+	 * false otherwise
+	 */
+	public boolean includesIllegalUse() {
+		return (this.searchflags & IApiSearchRequestor.INCLUDE_ILLEGAL_USE) != 0;
+	}
+	
+	/**
+	 * Allows the run-at date to be set. This method accepts <code>null</code>
+	 * @param date the date to set
+	 */
+	public void setRunAtDate(String date) {
+		this.runatdate = date;
+	}
+	
+	/**
+	 * Returns the run-at date set in this metadata or <code>null</code> if none.
+	 * @return the run-at date or <code>null</code>
+	 */
+	public String getRunAtDate() {
+		return this.runatdate;
+	}
+	
+	/**
+	 * Returns the human-readable description of the scan
+	 * @return the description
+	 */
+	public String getDescription() {
+		return this.description;
+	}
+	
+	/**
+	 * Allows the human-readable description to be set. This method accepts <code>null</code>
+	 * @param description the description to set
+	 */
+	public void setDescription(String description) {
+		this.description = description;
+	}
+	
+	/**
+	 * Allows the combined search flags to be set.
+	 * @param flags the search flags to set
+	 */
+	public void setSearchflags(int flags) {
+		this.searchflags = flags;
+	}
+
+	/**
+	 * Returns the collection of API patterns set in this metadata or <code>null</code> if none.
+	 * @return the API patterns or <code>null</code>
+	 */
+	public String[] getApiPatterns() {
+		return apipatterns;
+	}
+	
+	/**
+	 * Allows the API patterns to be set. This method accepts <code>null</code>
+	 * @param patterns the patterns to set
+	 */
+	public void setApiPatterns(String[] patterns) {
+		this.apipatterns = patterns;
+	}
+
+	/**
+	 * Returns the collection of internal patterns set in this metadata or <code>null</code> if none.
+	 * @return the internal patterns or <code>null</code>
+	 */
+	public String[] getInternalPatterns() {
+		return this.intpatterns;
+	}
+
+	/**
+	 * Allows the internal patterns to be set. This method accepts <code>null</code>.
+	 * @param patterns the internal patterns to set
+	 */
+	public void setInternalPatterns(String[] patterns) {
+		this.intpatterns = patterns;
+	}
+
+	/**
+	 * Returns the collection of archive patterns set in this metadata or <code>null</code> if none.
+	 * @return the archive patterns or <code>null</code>
+	 */
+	public String[] getArchivePatterns() {
+		return this.archivepatterns;
+	}
+
+	/**
+	 * Allows the set of archive patterns to be set. This method accepts <code>null</code>
+	 * @param patterns the archive patterns to set
+	 */
+	public void setArchivePatterns(String[] patterns) {
+		this.archivepatterns = patterns;
+	}
+
+	/**
+	 * Returns the baseline location set in this metadata or <code>null</code> if none.
+	 * @return the baseline location or <code>null</code>
+	 */
+	public String getBaselineLocation() {
+		return this.baselinelocation;
+	}
+
+	/**
+	 * Allows the baseline location to be set. This method accepts <code>null</code>.
+	 * @param location the new location
+	 */
+	public void setBaselineLocation(String location) {
+		this.baselinelocation = location;
+	}
+
+	/**
+	 * Returns the report location set in this metadata or <code>null</code> if none.
+	 * @return the report location or <code>null</code>
+	 */
+	public String getReportLocation() {
+		return this.reportlocation;
+	}
+
+	/**
+	 * Allows the report location to be set. This method accepts <code>null</code>.
+	 * @param location the new report location
+	 */
+	public void setReportLocation(String location) {
+		this.reportlocation = location;
+	}
+
+	/**
+	 * Allows the reference pattern to be set. This method accepts <code>null</code>
+	 * @param pattern the new pattern
+	 */
+	public void setReferencePattern(String pattern) {
+		this.refpattern = pattern;
+	}
+	
+	/**
+	 * Returns the reference pattern set in this metadata or <code>null</code> if none.
+	 * @return the reference pattern or <code>null</code>
+	 */
+	public String getReferencePattern() {
+		return this.refpattern;
+	}
+	
+	/**
+	 * Allows the scope pattern to be set. This method accepts <code>null</code>
+	 * @param pattern the new pattern
+	 */
+	public void setScopePattern(String pattern) {
+		this.scopepattern = pattern;
+	}
+	
+	/**
+	 * Returns the scope pattern set in this metadata or <code>null</code> if none.
+	 * @return the scope pattern or <code>null</code>
+	 */
+	public String getScopePattern() {
+		return this.scopepattern;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java
new file mode 100644
index 0000000..b62c594
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseReportConverter.java
@@ -0,0 +1,1918 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map.Entry;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+import org.eclipse.pde.api.tools.internal.util.Signatures;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.osgi.framework.Version;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * This class converts a collection of API use report XML files
+ * from a given location to a corresponding collection of
+ * HTML in a given location
+ * 
+ * @since 1.0.1
+ */
+public class UseReportConverter extends HTMLConvertor {
+
+	/**
+	 * Use visitor to write the reports
+	 */
+	class Visitor extends UseScanVisitor {
+		
+		ArrayList reports = new ArrayList();
+		Report currentreport = null;
+		Type currenttype = null, currentreferee = null;
+		Member currentmember = null;
+		HashMap keys = new HashMap();
+		ArrayList referees = new ArrayList();
+		
+		/**
+		 * Returns if the reference should be reported or not
+		 * @param desc
+		 * @return true if the reference should be reported false otherwise
+		 */
+		private boolean acceptReference(IMemberDescriptor desc, Pattern[] patterns) {
+			if(patterns != null) {
+				for (int i = 0; i < patterns.length; i++) {
+					if(patterns[i].matcher(desc.getPackage().getName()).find()) {
+						return false;
+					}
+				}
+			}
+			return true;
+		}
+		
+		/**
+		 * Returns the enclosing {@link IReferenceTypeDescriptor} for the given member
+		 * descriptor
+		 * @param member
+		 * @return the enclosing {@link IReferenceTypeDescriptor} or <code>null</code>
+		 */
+		IReferenceTypeDescriptor getEnclosingDescriptor(IMemberDescriptor member) {
+			switch(member.getElementType()) {
+			case IElementDescriptor.TYPE: {
+				return (IReferenceTypeDescriptor) member;
+			}
+			case IElementDescriptor.METHOD:
+			case IElementDescriptor.FIELD: {
+				return member.getEnclosingType();
+			}
+		}
+		return null;
+	}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitComponent(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+		 */
+		public boolean visitComponent(IComponentDescriptor target) {
+			this.currentreport = new Report();
+			this.currentreport.name = composeName(target.getId(), target.getVersion());
+			this.reports.add(this.currentreport);
+			return true;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#endVisit(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+		 */
+		public void endVisit(IComponentDescriptor target) {
+			try {
+				long start = 0;
+				if(DEBUG) {
+					System.out.println("Writing report for bundle: "+target.getId()); //$NON-NLS-1$
+					start = System.currentTimeMillis();
+				}
+				if(this.currentreport.counts.getTotalRefCount() > 0) {
+					writeReferencedMemberPage(this.currentreport, this.referees);
+				}
+				else {
+					this.reports.remove(this.currentreport);
+				}
+				if(DEBUG) {
+					System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+			catch(Exception e) {
+				ApiPlugin.log(e);
+			}
+			finally {
+				//clear any children as we have written them out - keep the report object to write a sorted index page
+				this.currentreport.children.clear();
+				this.keys.clear();
+				this.referees.clear();
+			}
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitReferencingComponent(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+		 */
+		public boolean visitReferencingComponent(IComponentDescriptor component) {
+			this.currentreferee = new Type(component);
+			return true;
+		}
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#endVisitReferencingComponent(org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor)
+		 */
+		public void endVisitReferencingComponent(IComponentDescriptor component) {
+			if(this.currentreferee.counts.getTotalRefCount() > 0) {
+				this.referees.add(this.currentreferee);
+			}
+		}
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitMember(org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor)
+		 */
+		public boolean visitMember(IMemberDescriptor referencedMember) {
+			IReferenceTypeDescriptor desc = getEnclosingDescriptor(referencedMember);
+			if(desc == null) {
+				return false;
+			}
+			this.currenttype = (Type) this.keys.get(desc);
+			if(this.currenttype == null) {
+				this.currenttype = new Type(desc);
+				this.keys.put(desc, this.currenttype);
+			}
+			TreeMap map = (TreeMap) this.currentreport.children.get(this.currenttype);
+			if(map == null) {
+				map = new TreeMap(compare);
+				this.currentreport.children.put(this.currenttype, map);
+			}
+			this.currentmember = (Member) map.get(referencedMember);
+			if(this.currentmember == null) {
+				this.currentmember = new Member(referencedMember);
+				map.put(referencedMember, this.currentmember);
+			}
+			return true;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#endVisitMember(org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor)
+		 */
+		public void endVisitMember(IMemberDescriptor referencedMember) {
+			if(this.currentmember.children.size() == 0) {
+				TreeMap map = (TreeMap) this.currentreport.children.get(this.currenttype);
+				map.remove(referencedMember);
+			}
+			if(this.currenttype.counts.getTotalRefCount() == 0) {
+				IReferenceTypeDescriptor desc = getEnclosingDescriptor(referencedMember);
+				if(desc != null) {
+					this.keys.remove(desc);
+					this.currentreport.children.remove(this.currenttype);
+				}
+			}
+		}
+	
+		/**
+		 * Formats the arrays of messages
+		 * @param messages
+		 * @return the formatted messages or <code>null</code>
+		 */
+		String formatMessages(String[] messages) {
+			if(messages != null) {
+				StringBuffer buffer = new StringBuffer();
+				for (int i = 0; i < messages.length; i++) {
+					buffer.append(messages[i]);
+					if(i < messages.length-1) {
+						buffer.append("\n"); //$NON-NLS-1$
+					}
+				}
+				return buffer.toString();
+			}
+			return null;
+		}
+		
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.api.tools.internal.search.UseScanVisitor#visitReference(org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor)
+		 */
+		public void visitReference(IReferenceDescriptor reference) {
+			IMemberDescriptor fromMember = reference.getMember();
+			if(!acceptReference(reference.getReferencedMember(), topatterns) || 
+					!acceptReference(fromMember, frompatterns)) {
+				return;
+			}
+			int lineNumber = reference.getLineNumber();
+			int refKind = reference.getReferenceKind();
+			int visibility = reference.getVisibility();
+			String refname = org.eclipse.pde.api.tools.internal.builder.Reference.getReferenceText(refKind);
+			ArrayList refs = (ArrayList) this.currentmember.children.get(refname);
+			if(refs == null) {
+				refs = new ArrayList();
+				this.currentmember.children.put(refname, refs);
+			}
+			refs.add(new Reference(fromMember, lineNumber, visibility, formatMessages(reference.getProblemMessages())));
+			switch(fromMember.getElementType()) {
+				case IElementDescriptor.TYPE: {
+					switch(visibility) {
+						case VisibilityModifiers.API: {
+							this.currentmember.counts.total_api_type_count++;
+							this.currenttype.counts.total_api_type_count++;
+							this.currentreferee.counts.total_api_type_count++;
+							this.currentreport.counts.total_api_type_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE: {
+							this.currentmember.counts.total_private_type_count++;
+							this.currenttype.counts.total_private_type_count++;
+							this.currentreferee.counts.total_private_type_count++;
+							this.currentreport.counts.total_private_type_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE_PERMISSIBLE: {
+							this.currentmember.counts.total_permissable_type_count++;
+							this.currenttype.counts.total_permissable_type_count++;
+							this.currentreferee.counts.total_permissable_type_count++;
+							this.currentreport.counts.total_permissable_type_count++;
+							break;
+						}
+						case FRAGMENT_PERMISSIBLE: {
+							this.currentmember.counts.total_fragment_permissible_type_count++;
+							this.currenttype.counts.total_fragment_permissible_type_count++;
+							this.currentreferee.counts.total_fragment_permissible_type_count++;
+							this.currentreport.counts.total_fragment_permissible_type_count++;
+							break;
+						}
+						case VisibilityModifiers.ILLEGAL_API: {
+							this.currentmember.counts.total_illegal_type_count++;
+							this.currenttype.counts.total_illegal_type_count++;
+							this.currentreferee.counts.total_illegal_type_count++;
+							this.currentreport.counts.total_illegal_type_count++;
+							break;
+						}
+					}
+					break;
+				}
+				case IElementDescriptor.METHOD: {
+					switch(visibility) {
+						case VisibilityModifiers.API: {
+							this.currentmember.counts.total_api_method_count++;
+							this.currenttype.counts.total_api_method_count++;
+							this.currentreferee.counts.total_api_method_count++;
+							this.currentreport.counts.total_api_method_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE: {
+							this.currentmember.counts.total_private_method_count++;
+							this.currenttype.counts.total_private_method_count++;
+							this.currentreferee.counts.total_private_method_count++;
+							this.currentreport.counts.total_private_method_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE_PERMISSIBLE: {
+							this.currentmember.counts.total_permissable_method_count++;
+							this.currenttype.counts.total_permissable_method_count++;
+							this.currentreferee.counts.total_permissable_method_count++;
+							this.currentreport.counts.total_permissable_method_count++;
+							break;
+						}
+						case FRAGMENT_PERMISSIBLE: {
+							this.currentmember.counts.total_fragment_permissible_method_count++;
+							this.currenttype.counts.total_fragment_permissible_method_count++;
+							this.currentreferee.counts.total_fragment_permissible_method_count++;
+							this.currentreport.counts.total_fragment_permissible_method_count++;
+							break;
+						}
+						case VisibilityModifiers.ILLEGAL_API: {
+							this.currentmember.counts.total_illegal_method_count++;
+							this.currenttype.counts.total_illegal_method_count++;
+							this.currentreferee.counts.total_illegal_method_count++;
+							this.currentreport.counts.total_illegal_method_count++;
+							break;
+						}
+					}
+					break;
+				}
+				case IElementDescriptor.FIELD: {
+					switch(visibility) {
+						case VisibilityModifiers.API: {
+							this.currentmember.counts.total_api_field_count++;
+							this.currenttype.counts.total_api_field_count++;
+							this.currentreferee.counts.total_api_field_count++;
+							this.currentreport.counts.total_api_field_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE: {
+							this.currentmember.counts.total_private_field_count++;
+							this.currenttype.counts.total_private_field_count++;
+							this.currentreferee.counts.total_private_field_count++;
+							this.currentreport.counts.total_private_field_count++;
+							break;
+						}
+						case VisibilityModifiers.PRIVATE_PERMISSIBLE: {
+							this.currentmember.counts.total_permissable_field_count++;
+							this.currenttype.counts.total_permissable_field_count++;
+							this.currentreferee.counts.total_permissable_field_count++;
+							this.currentreport.counts.total_permissable_field_count++;
+							break;
+						}
+						case FRAGMENT_PERMISSIBLE: {
+							this.currentmember.counts.total_fragment_permissible_field_count++;
+							this.currenttype.counts.total_fragment_permissible_field_count++;
+							this.currentreferee.counts.total_fragment_permissible_field_count++;
+							this.currentreport.counts.total_fragment_permissible_field_count++;
+							break;
+						}
+						case VisibilityModifiers.ILLEGAL_API: {
+							this.currentmember.counts.total_illegal_field_count++;
+							this.currenttype.counts.total_illegal_field_count++;
+							this.currentreferee.counts.total_illegal_field_count++;
+							this.currentreport.counts.total_illegal_field_count++;
+							break;
+						}
+					}
+					break;
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Comparator for use report items
+	 */
+	static Comparator compare = new Comparator() {
+		public int compare(Object o1, Object o2) {
+			if(o1 instanceof String && o2 instanceof String) {
+				return ((String)o1).compareTo((String)o2);
+			}
+			if(o1 instanceof Type && o2 instanceof Type) {
+				return compare(((Type)o1).desc, ((Type)o2).desc);
+			}
+			if(o1 instanceof IReferenceTypeDescriptor && o2 instanceof IReferenceTypeDescriptor) {
+				return ((IReferenceTypeDescriptor)o1).getQualifiedName().compareTo(((IReferenceTypeDescriptor)o2).getQualifiedName());
+			}
+			if(o1 instanceof IMethodDescriptor && o2 instanceof IMethodDescriptor) {
+				try {
+					return Signatures.getQualifiedMethodSignature((IMethodDescriptor)o1).compareTo(Signatures.getQualifiedMethodSignature((IMethodDescriptor)o2));
+				}
+				catch(CoreException ce) {
+					return  -1;
+				}
+			}
+			if(o1 instanceof IFieldDescriptor && o2 instanceof IFieldDescriptor) {
+				try {
+					return Signatures.getQualifiedFieldSignature((IFieldDescriptor)o1).compareTo(Signatures.getQualifiedFieldSignature((IFieldDescriptor)o2));
+				}
+				catch(CoreException ce) {
+					return -1;
+				}
+			}
+			if(o1 instanceof IComponentDescriptor && o2 instanceof IComponentDescriptor) {
+				return ((IComponentDescriptor)o1).getId().compareTo(((IComponentDescriptor)o2).getId());
+			}
+			return -1;
+		};
+	};
+	
+	/**
+	 * Root item describing the use of one component
+	 */
+	static class Report {
+		String name = null;
+		TreeMap children = new TreeMap(compare);
+		CountGroup counts = new CountGroup();
+	}
+	
+	/**
+	 * Describes a type, used to key a collection of {@link Member}s
+	 */
+	static class Type {
+		IElementDescriptor desc = null;
+		CountGroup counts = new CountGroup();
+		public Type(IElementDescriptor desc) {
+			this.desc = desc;
+		}
+	}
+	
+	/**
+	 * Describes a member that is being used
+	 */
+	static class Member {
+		IElementDescriptor descriptor = null;
+		TreeMap children = new TreeMap(compare);
+		CountGroup counts = new CountGroup();
+		public Member(IElementDescriptor desc) {
+			this.descriptor = desc;
+		}
+	}
+	
+	/**
+	 * Describes a reference from a given descriptor
+	 */
+	static class Reference {
+		IElementDescriptor desc = null;
+		int line = -1, vis = -1;
+		String message = null;
+		public Reference(IElementDescriptor desc, int line, int vis, String message) {
+			this.desc = desc;
+			this.line = line;
+			this.vis = vis;
+			this.message = message;
+		}
+	}
+	
+	/**
+	 * A group of counters to origin meta-data
+	 */
+	static final class CountGroup {
+		int total_api_field_count = 0;
+		int total_private_field_count = 0;
+		int total_permissable_field_count = 0;
+		int total_fragment_permissible_field_count = 0;
+		int total_illegal_field_count = 0;
+		int total_api_method_count = 0;
+		int total_private_method_count = 0;
+		int total_permissable_method_count = 0;
+		int total_fragment_permissible_method_count = 0;
+		int total_illegal_method_count = 0;
+		int total_api_type_count = 0;
+		int total_private_type_count = 0;
+		int total_permissable_type_count = 0;
+		int total_fragment_permissible_type_count = 0;
+		int total_illegal_type_count = 0;
+		
+		public int getTotalRefCount() {
+			return total_api_field_count +
+					total_api_method_count +
+					total_api_type_count +
+					total_private_field_count +
+					total_private_method_count +
+					total_private_type_count +
+					total_permissable_field_count +
+					total_permissable_method_count + 
+					total_permissable_type_count +
+					total_fragment_permissible_field_count +
+					total_fragment_permissible_method_count +
+					total_fragment_permissible_type_count +
+					total_illegal_field_count +
+					total_illegal_method_count +
+					total_illegal_type_count;
+		}
+		
+		public int getTotalApiRefCount() {
+			return total_api_field_count + total_api_method_count + total_api_type_count;
+		}
+		
+		public int getTotalInternalRefCount() {
+			return total_private_field_count + total_private_method_count + total_private_type_count;
+		}
+		
+		public int getTotalPermissableRefCount() {
+			return total_permissable_field_count + total_permissable_method_count + total_permissable_type_count;
+		}
+		
+		public int getTotalFragmentPermissibleRefCount() {
+			return total_fragment_permissible_field_count + total_fragment_permissible_method_count + total_fragment_permissible_type_count;
+		}
+		
+		public int getTotalIllegalRefCount() {
+			return total_illegal_field_count + total_illegal_method_count + total_illegal_type_count;
+		}
+	}
+	
+	/**
+	 * Handler for parsing the not_searched.xml file to output a summary or 
+	 * missing required bundles
+	 */
+	static final class MissingHandler extends DefaultHandler {
+		List missing = new ArrayList();
+		static String pattern = "Require-Bundle:"; //$NON-NLS-1$
+		public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+			if(IApiXmlConstants.ELEMENT_COMPONENT.equals(qName)) {
+				String value = attributes.getValue("details"); //$NON-NLS-1$
+				StringTokenizer tokenizer = new StringTokenizer(value, "<>"); //$NON-NLS-1$
+				int index = -1;
+				while(tokenizer.hasMoreTokens()) {
+					value = tokenizer.nextToken();
+					index = value.indexOf(pattern);
+					if(index > -1) {
+						missing.add(value.replaceAll(pattern, Util.EMPTY_STRING));
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Visibility constant indicating an element has host-fragment level of visibility.
+	 *  i.e. fragments have {@link #PRIVATE_PERMISSIBLE}-like access to the internals of their host.
+	 *  
+	 *  @since 1.0.1
+	 */
+	public static final int FRAGMENT_PERMISSIBLE = 0x0000005;
+	/**
+	 * Default XSLT file name
+	 */
+	public static final String DEFAULT_XSLT = "/references.xsl"; //$NON-NLS-1$
+	/**
+	 * Colour white for normal / permissible references
+	 * Possibility: #C0E0C0
+	 */
+	public static final String NORMAL_REFS_COLOUR = "#FFFFFF"; //$NON-NLS-1$
+	/**
+	 * Colour red for internal references
+	 * Old colour: #E0A0A0
+	 */
+	public static final String INTERNAL_REFS_COLOUR = "#F2C3C3"; //$NON-NLS-1$
+	/**
+	 * Colour gray for illegal references
+	 * @since 1.1
+	 */
+	public static final String ILLEGAL_REFS_COLOUR = "#E0E0E0";  //$NON-NLS-1$
+	/**
+	 * Colour gold for the references table header.
+	 * Old colour: #CC9933
+	 * @since 1.1
+	 */
+	public static final String REFERENCES_TABLE_HEADER_COLOUR = "#E0C040"; //$NON-NLS-1$
+	/**
+	 * Style HTML bits for a page that shows references
+	 */
+	static final String REF_STYLE;
+	/**
+	 * The script block used to show an expanding table of references
+	 */
+	static final String REF_SCRIPT;
+	
+	static {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<style type=\"text/css\">\n"); //$NON-NLS-1$
+		buffer.append("\t.main {\t\tfont-family:Arial, Helvetica, sans-serif;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\t.main h3 {\n\t\tfont-family:Arial, Helvetica, sans-serif;\n\t\t\background-color:#FFFFFF;\n\t\tfont-size:14px;\n\t\tmargin:0.1em;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\t.main h4 {\n\t\tbackground-color:#CCCCCC;\n\t\tmargin:0.15em;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\ta.typeslnk {\n\t\tfont-family:Arial, Helvetica, sans-serif;\n\t\ttext-decoration:none;\n\t\tmargin-left:0.25em;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\ta.typeslnk:hover {\n\t\ttext-decoration:underline;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\ta.kindslnk {\n\t\tfont-family:Arial, Helvetica, sans-serif;\n\t\ttext-decoration:none;\n\t\tmargin-left:0.25em;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("\t.types {\n\t\tdisplay:none;\n\t\tmargin-bottom:0.25em;\n\t\tmargin-top:0.25em;\n\t\tmargin-right:0.25em;\n\t\tmargin-left:0.75em;\n\t}\n"); //$NON-NLS-1$
+		buffer.append("</style>\n"); //$NON-NLS-1$
+		REF_STYLE = buffer.toString();
+		
+		buffer = new StringBuffer();
+		buffer.append("<script type=\"text/javascript\">\n\tfunction expand(location) {\n\t\tif(document.getElementById) {\n\t\t\tvar childhtml = location.firstChild;\n\t\t\tif(!childhtml.innerHTML) {\n\t\t\t\tchildhtml = childhtml.nextSibling;\n\t\t\t}\n\t\t\tchildhtml.innerHTML = childhtml.innerHTML == '[+] ' ? '[-] ' : '[+] ';\n\t\t\tvar parent = location.parentNode;\n\t\t\tchildhtml = parent.nextSibling.style ? parent.nextSibling : parent.nextSibling.nextSibling;\n\t\t\tchildhtml.style.display = childhtml.style.display == 'block' ? 'none' : 'block';\n\t\t}\n\t}\n</script>\n"); //$NON-NLS-1$
+		buffer.append("<noscript>\n\t<style type=\"text/css\">\n\t\t.types {display:block;}\n\t\t.kinds{display:block;}\n\t</style>\n</noscript>\n"); //$NON-NLS-1$
+		REF_SCRIPT = buffer.toString();
+	}
+	
+	/**
+	 * Method used for initializing tracing in the report converter
+	 */
+	public static void setDebug(boolean debugValue) {
+		DEBUG = debugValue || Util.DEBUG;
+	}
+	
+	/**
+	 * Constant used for controlling tracing in the report converter
+	 */
+	protected static boolean DEBUG = Util.DEBUG;
+	
+	private File htmlRoot = null;
+	private File reportsRoot = null;
+	private String xmlLocation = null;
+	private String htmlLocation = null;
+	private File htmlIndex = null;
+	SAXParser parser = null;
+	private boolean hasmissing = false;
+	private UseMetadata metadata = null;
+	Pattern[] topatterns = null;
+	Pattern[] frompatterns = null;
+	
+	/**
+	 * Constructor
+	 * @param htmlroot the folder root where the HTML reports should be written
+	 * @param xmlroot the folder root where the current API use scan output is located
+	 * @param topatterns array of regular expressions used to prune references to a given name pattern
+	 * @param frompatterns array of regular expressions used to prune references from a given name pattern
+	 */
+	public UseReportConverter(String htmlroot, String xmlroot, String[] topatterns, String[] frompatterns) {
+		this.xmlLocation = xmlroot;
+		this.htmlLocation = htmlroot;
+		if(topatterns != null) {
+			ArrayList pats = new ArrayList(topatterns.length);
+			for (int i = 0; i < topatterns.length; i++) {
+				try {
+					pats.add(Pattern.compile(topatterns[i]));
+				}
+				catch(PatternSyntaxException pse) {
+					if(DEBUG) {
+						System.out.println(NLS.bind(SearchMessages.UseReportConverter_filter_pattern_not_valid, topatterns[i]));
+						System.out.println(pse.getMessage());
+					}
+				}
+			}
+			if(!pats.isEmpty()) {
+				this.topatterns = (Pattern[]) pats.toArray(new Pattern[pats.size()]);
+			}
+		}
+		if(frompatterns != null) {
+			ArrayList pats = new ArrayList(frompatterns.length);
+			for (int i = 0; i < frompatterns.length; i++) {
+				try {
+					pats.add(Pattern.compile(frompatterns[i]));
+				}
+				catch(PatternSyntaxException pse) {
+					if(DEBUG) {
+						System.out.println(NLS.bind(SearchMessages.UseReportConverter_filter_pattern_not_valid, frompatterns[i]));
+						System.out.println(pse.getMessage());
+					}
+				}
+			}
+			if(!pats.isEmpty()) {
+				this.frompatterns = (Pattern[]) pats.toArray(new Pattern[pats.size()]);
+			}
+		}
+	}
+	
+	/**
+	 * Runs the converter on the given locations
+	 */
+	public void convert(String xslt, IProgressMonitor monitor) throws Exception {
+		if (this.htmlLocation == null) {
+			return;
+		}
+		SubMonitor localmonitor = SubMonitor.convert(monitor, SearchMessages.UseReportConverter_preparing_report_metadata, 11);
+		try {
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_preparing_html_root);
+			Util.updateMonitor(localmonitor, 1);
+			this.htmlRoot = new File(this.htmlLocation);
+			if (!this.htmlRoot.exists()) {
+				if (!this.htmlRoot.mkdirs()) {
+					throw new Exception(NLS.bind(SearchMessages.could_not_create_file, this.htmlLocation));
+				}
+			}
+			else {
+				this.htmlRoot.mkdirs();
+			}
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_preparing_xml_root);
+			Util.updateMonitor(localmonitor, 1);
+			if (this.xmlLocation == null) {
+				throw new Exception(SearchMessages.missing_xml_files_location);
+			}
+			this.reportsRoot = new File(this.xmlLocation);
+			if (!this.reportsRoot.exists() || !this.reportsRoot.isDirectory()) {
+				throw new Exception(NLS.bind(SearchMessages.invalid_directory_name, this.xmlLocation));
+			}
+			
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_preparing_xslt_file);
+			Util.updateMonitor(localmonitor, 1);
+			File xsltFile = null;
+			if(xslt != null) {
+				// we will use the default XSLT transform from the ant jar when this is null
+				xsltFile = new File(xslt);
+				if(!xsltFile.exists() || !xsltFile.isFile()) {
+					throw new Exception(SearchMessages.UseReportConverter_xslt_file_not_valid);
+				}
+			}
+			long start = 0;
+			if(DEBUG) {
+				start = System.currentTimeMillis();
+			}
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_writing_not_searched);
+			writeMissingBundlesPage(this.htmlRoot);
+			writeNotSearchedPage(this.htmlRoot);
+			Util.updateMonitor(localmonitor, 1);
+			if(DEBUG) {
+				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.println("Parsing use scan..."); //$NON-NLS-1$
+				start = System.currentTimeMillis();
+			}
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_parsing_use_scan);
+			UseScanParser parser = new UseScanParser();
+			Visitor convertor = new Visitor();
+			parser.parse(xmlLocation, localmonitor.newChild(5), convertor);
+			Util.updateMonitor(localmonitor, 1);
+			if(DEBUG) {
+				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				System.out.println("Sorting reports and writing index..."); //$NON-NLS-1$
+				start = System.currentTimeMillis();
+			}
+			localmonitor.setTaskName(SearchMessages.UseReportConverter_writing_root_index);
+			Collections.sort(convertor.reports, new Comparator() {
+				public int compare(Object o1, Object o2) {
+					return ((Report)o1).name.compareTo(((Report)o2).name);
+				}
+			});
+			writeIndexPage(convertor.reports, this.htmlRoot);
+			Util.updateMonitor(localmonitor, 1);
+			if(DEBUG) {
+				System.out.println("done in: "+(System.currentTimeMillis()-start)+ " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			writeMetaPage(this.htmlRoot);
+		}
+		finally {
+			if(localmonitor != null) {
+				localmonitor.done();
+			}
+		}
+	}
+	
+	/**
+	 * Returns the handle to the default parser, caches the handle once it has been created
+	 * @return the handle to the default parser
+	 * @throws Exception forwarded general exception that can be trapped in Ant builds
+	 */
+	SAXParser getParser() throws Exception {
+		if(this.parser == null) {
+			SAXParserFactory factory = SAXParserFactory.newInstance();
+			try {
+				this.parser = factory.newSAXParser();
+			} catch (ParserConfigurationException pce) {
+				throw new Exception(SearchMessages.UseReportConverter_pce_error_getting_parser, pce);
+			} catch (SAXException se) {
+				throw new Exception(SearchMessages.UseReportConverter_se_error_parser_handle, se);
+			}
+			if (this.parser == null) {
+				throw new Exception(SearchMessages.could_not_create_sax_parser);
+			}
+		}
+		return this.parser;
+	}
+	
+	/**
+	 * Builds the name for the component
+	 * @param id
+	 * @param version
+	 * @return
+	 */
+	protected String composeName(String id, String version) {
+		StringBuffer buffer = new StringBuffer(3+id.length()+version.length());
+		buffer.append(id).append(" (").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
+		return buffer.toString();
+	}
+	
+	/**
+	 * @return the index.html file created from the report conversion or <code>null</code>
+	 * if the conversion failed
+	 */
+	public File getReportIndex() {
+		return htmlIndex;
+	}
+	
+	/**
+	 * Applies the given XSLT to the given XML to produce HTML in the given file
+	 * @param xsltfile
+	 * @param xmlfile
+	 * @param htmloutput
+	 * @throws TransformerException
+	 */
+	protected void applyXSLT(File xsltFile, File xmlfile, File htmloutput) throws TransformerException, Exception {
+		Source xslt = null;
+		if (xsltFile != null) {
+			xslt = new StreamSource(xsltFile);
+		} else {
+			InputStream defaultXsltInputStream = UseReportConverter.class.getResourceAsStream(DEFAULT_XSLT);
+			if (defaultXsltInputStream != null) {
+				xslt = new StreamSource(new BufferedInputStream(defaultXsltInputStream));
+			}
+		}
+		if(xslt == null) {
+			throw new Exception(SearchMessages.UseReportConverter_no_xstl_specified);
+		}
+		applyXSLT(xslt, xmlfile, htmloutput);
+	}
+	
+	/**
+	 * Applies the given XSLT source to the given XML file outputting to the given HTML file
+	 * @param xslt
+	 * @param xmlfile
+	 * @param htmlfile
+	 * @throws TransformerException
+	 */
+	protected void applyXSLT(Source xslt, File xmlfile, File htmlfile) throws TransformerException {
+		Source xml = new StreamSource(xmlfile);
+		Result html = new StreamResult(htmlfile);
+		TransformerFactory factory = TransformerFactory.newInstance();
+		Transformer former = factory.newTransformer(xslt);
+		former.transform(xml, html);
+	}
+	
+	/**
+	 * Transforms the given set of xml files with the given XSLT and places the result into a
+	 * corresponding HTML file
+	 * @param xmlfiles
+	 * @param xsltFile
+	 * @param html
+	 */
+	protected void tranformXml(File[] xmlfiles, File xsltFile) {
+		File html = null;
+		for (int i = 0; i < xmlfiles.length; i++) {
+			try {
+				File htmlroot = new File(this.htmlLocation, getHTMLFileLocation(this.reportsRoot, xmlfiles[i]));
+				if(!htmlroot.exists()) {
+					htmlroot.mkdirs();
+				}
+				html = new File(getNameFromXMLFilename(xmlfiles[i]));
+				applyXSLT(xsltFile, xmlfiles[i], html);
+			}
+			catch(TransformerException te) {}
+			catch (Exception e) {
+				ApiPlugin.log(e);
+			}
+		}
+	}
+	
+	/**
+	 * Gets the HTML path to write out the transformed XML file to
+	 * @param reportroot
+	 * @param xmlfile
+	 * @return
+	 */
+	protected String getHTMLFileLocation(File reportroot, File xmlfile) {
+		IPath xml = new Path(xmlfile.getPath());
+		IPath report = new Path(reportroot.getPath());
+		int segments = xml.matchingFirstSegments(report);
+		if(segments > 0) {
+			if(xml.getDevice() != null) {
+				xml = xml.setDevice(null);
+			}
+			IPath html = xml.removeFirstSegments(segments);
+			return html.removeLastSegments(1).toOSString();
+		}
+		return null;
+	}
+	
+	/**
+	 * Returns the name to use for the corresponding HTML file
+	 * from the given XML file
+	 * @param xmlFile
+	 * @return the HTML name to use
+	 */
+	protected String getNameFromXMLFilename(File xmlFile) {
+		String fileName = xmlFile.getAbsolutePath();
+		int index = fileName.lastIndexOf('.');
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(fileName.substring(this.reportsRoot.getAbsolutePath().length(), index)).append(HTML_EXTENSION); 
+		File htmlFile = new File(this.htmlLocation, String.valueOf(buffer));
+		return htmlFile.getAbsolutePath();
+	}
+	
+	/**
+	 * Returns the collection of missing bundle names
+	 * @param missingfile
+	 * @return the collection of missing bundle names
+	 * @throws Exception
+	 */
+	protected String[] getMissingBundles(File missingfile) throws Exception {
+		MissingHandler handler = new MissingHandler();
+		getParser().parse(missingfile, handler);
+		return (String[]) handler.missing.toArray(new String[handler.missing.size()]); 
+	}
+	
+	/**
+	 * Returns the sentence describing the purpose / reason of the missing bundles
+	 * @return a blurb describing the table of missing bundles
+	 */
+	protected String getMissingBundlesHeader() {
+		return SearchMessages.UseReportConverter_reported_missing_bundles;
+	}
+	
+	/**
+	 * Writes any existing metadata out to a meta.html file in the root of the 
+	 * HTML report location
+	 * @param htmlroot
+	 * @throws Exception
+	 */
+	void writeMetaPage(File htmlroot) throws Exception {
+		File meta = null;
+		PrintWriter writer = null;
+		try {
+			File file = new File(this.reportsRoot, "meta.xml"); //$NON-NLS-1$
+			if(!file.exists()) {
+				//do nothing if no meta.xml file
+				return;
+			}
+			String filename = "meta"; //$NON-NLS-1$
+			meta = new File(htmlroot, filename+HTML_EXTENSION); 
+			if(!meta.exists()) {
+				meta.createNewFile();
+			}
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(HTML_HEADER);
+			buffer.append(OPEN_HTML).append(OPEN_HEAD).append(CONTENT_TYPE_META);
+			buffer.append(OPEN_TITLE).append(SearchMessages.UseReportConverter_use_scan_info).append(CLOSE_TITLE); 
+			buffer.append(CLOSE_HEAD); 
+			buffer.append(OPEN_BODY); 
+			buffer.append(OPEN_H3).append(SearchMessages.UseReportConverter_use_scan_info).append(CLOSE_H3);
+			writeMetadataSummary(buffer); 
+			buffer.append(W3C_FOOTER);
+			
+			//write file
+			writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(meta), IApiCoreConstants.UTF_8));
+			writer.println(buffer.toString());
+			writer.flush();
+		}
+		catch(IOException ioe) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, meta.getAbsolutePath()));
+		}
+		finally {
+			if(writer != null) {
+				writer.close();
+			}
+		}
+	}
+	
+	/**
+	 * Writes out a summary of the missing required bundles
+	 * @param htmlroot
+	 */
+	protected void writeMissingBundlesPage(final File htmlroot) throws Exception {
+		File missing = null;
+		PrintWriter writer = null;
+		try {
+			String filename = "missing"; //$NON-NLS-1$
+			missing = new File(htmlroot, filename+HTML_EXTENSION); 
+			if(!missing.exists()) {
+				missing.createNewFile();
+			}
+			
+			File file = new File(this.reportsRoot, "not_searched.xml"); //$NON-NLS-1$
+			if(!file.exists()) {
+				//try <root>/xml in case a raw reports root was specified
+				file = new File(this.reportsRoot+File.separator+"xml", "not_searched.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			TreeSet sorted = new TreeSet(Util.componentsorter);
+			if (file.exists()) {
+				String[] missingBundles = getMissingBundles(file); 
+				this.hasmissing = missingBundles.length > 0;
+				for (int i = 0; i < missingBundles.length; i++) {
+					sorted.add(missingBundles[i]);
+				}
+			}
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(HTML_HEADER);
+			buffer.append(OPEN_HTML).append(OPEN_HEAD).append(CONTENT_TYPE_META);
+			buffer.append(OPEN_TITLE).append(SearchMessages.UseReportConverter_missing_required).append(CLOSE_TITLE); 
+			buffer.append(CLOSE_HEAD); 
+			buffer.append(OPEN_BODY); 
+			buffer.append(OPEN_H3).append(SearchMessages.UseReportConverter_missing_required).append(CLOSE_H3);
+			
+			if(sorted.isEmpty()) {
+				buffer.append(SearchMessages.UseReportConverter_no_required_missing).append(BR);
+			}
+			else {
+				buffer.append(OPEN_P).append(getMissingBundlesHeader()).append(CLOSE_P); 
+				buffer.append("<table border=\"1\" width=\"50%\">\n"); //$NON-NLS-1$
+				buffer.append(OPEN_TR).append("<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" width=\"36%\">").append(OPEN_B).append(SearchMessages.UseReportConverter_required_bundles).append(CLOSE_B).append(CLOSE_TD).append(CLOSE_TR); //$NON-NLS-1$ //$NON-NLS-2$ 
+			}
+			String value = null;
+			for (Iterator iter = sorted.iterator(); iter.hasNext();) {
+				value = (String) iter.next();
+				buffer.append(OPEN_TR).append(OPEN_TD).append(value).append(CLOSE_TD).append(CLOSE_TR);  
+			}
+			buffer.append(CLOSE_TABLE); 
+			buffer.append(BR).append("<a href=\"not_searched.html\">").append(SearchMessages.UseReportConverter_back_to_not_searched).append(CLOSE_A); //$NON-NLS-1$ 
+			buffer.append(W3C_FOOTER);
+			
+			//write file
+			writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(missing), IApiCoreConstants.UTF_8));;
+			writer.println(buffer.toString());
+			writer.flush();
+		}
+		catch(IOException ioe) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, missing.getAbsolutePath()));
+		}
+		finally {
+			if(writer != null) {
+				writer.close();
+			}
+		}
+	}
+	
+	/**
+	 * Writes out the file of components that were not searched: either because they appeared in an exclude list
+	 * or they have no .api_description file
+	 * 
+	 * @param htmlroot
+	 */
+	void writeNotSearchedPage(final File htmlroot) throws Exception {
+		File originhtml = null;
+		try {
+			String filename = "not_searched"; //$NON-NLS-1$
+			originhtml = new File(htmlroot, filename+HTML_EXTENSION); 
+			if(!originhtml.exists()) {
+				originhtml.createNewFile();
+			}
+			File xml = new File(this.reportsRoot, filename+XML_EXTENSION); 
+			if(!xml.exists()) {
+				//try <root>/xml in case a raw report root is specified
+				xml = new File(this.reportsRoot+File.separator+"xml", filename+XML_EXTENSION); //$NON-NLS-1$
+			}
+			InputStream defaultXsltInputStream = UseReportConverter.class.getResourceAsStream(getNotSearchedXSLPath()); 
+			Source xslt = null;
+			if (defaultXsltInputStream != null) {
+				xslt = new StreamSource(new BufferedInputStream(defaultXsltInputStream));
+			}
+			if(xslt == null) {
+				throw new Exception(SearchMessages.UseReportConverter_no_xstl_specified);
+			}
+			if (xml.exists()) {
+				applyXSLT(xslt, xml, originhtml);
+			}
+		}
+		catch(IOException ioe) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, originhtml.getAbsolutePath()));
+		}
+		catch (TransformerException te) {
+			throw new Exception(SearchMessages.UseReportConverter_te_applying_xslt_skipped, te);
+		}
+		catch (CoreException e) {
+			throw new Exception(NLS.bind(SearchMessages.UseReportConverter_coreexception_writing_html_file, originhtml.getAbsolutePath()));
+		}
+	}
+	
+	/**
+	 * Returns path of XSL file to use when generating "not searched" information.
+	 * 
+	 * @return path to the XSL file
+	 */
+	String getNotSearchedXSLPath() {
+		return "/notsearched.xsl"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Writes the referenced member index page
+	 * @param report
+	 * @param referees the listing of referencing bundles
+	 */
+	protected void writeReferencedMemberPage(final Report report, final List referees) throws Exception {
+		PrintWriter writer = null;
+		File originhtml = null;
+		try {
+			File htmlroot = new File(this.htmlLocation, report.name);
+			if(!htmlroot.exists()) {
+				htmlroot.mkdirs();
+			}
+			originhtml = new File(htmlroot, "index.html"); //$NON-NLS-1$
+			if(!originhtml.exists()) {
+				originhtml.createNewFile();
+			}
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(HTML_HEADER);
+			buffer.append(OPEN_HTML).append(OPEN_HEAD).append(CONTENT_TYPE_META);
+			buffer.append(REF_STYLE);
+			buffer.append(REF_SCRIPT);
+			buffer.append(OPEN_TITLE).append(getReferencedTypeTitle(report.name)).append(CLOSE_TITLE); 
+			buffer.append(CLOSE_HEAD); 
+			buffer.append(OPEN_BODY); 
+			buffer.append(OPEN_H3).append(getReferencedTypeHeader(report.name)).append(CLOSE_H3);
+			buffer.append(OPEN_P).append(NLS.bind(SearchMessages.UseReportConverter_list_of_all_refing_bundles, new String[] {"<a href=\"#bundles\">", "</a>"})).append(CLOSE_P); //$NON-NLS-1$ //$NON-NLS-2$
+			String additional = getAdditionalReferencedTypeInformation();
+			if(additional != null) {
+				buffer.append(additional);
+			}
+			buffer.append(getReferencesTableHeader(SearchMessages.UseReportConverter_referenced_type, false));
+			CountGroup counts = null;
+			String link = null;
+			Entry entry = null;
+			File typefile = null;
+			TreeMap map = null;
+			Type type = null;
+			for (Iterator iter = report.children.entrySet().iterator(); iter.hasNext();) {
+				entry = (Entry) iter.next();
+				map = (TreeMap) entry.getValue();
+				type = (Type) entry.getKey();
+				counts = type.counts;
+				
+				String fqname = Signatures.getQualifiedTypeSignature((IReferenceTypeDescriptor) type.desc);
+				typefile = new File(htmlroot, fqname+HTML_EXTENSION); 
+				if(!typefile.exists()) {
+					typefile.createNewFile();
+				}
+				link = extractLinkFrom(htmlroot, typefile.getAbsolutePath());
+				buffer.append(getReferenceTableEntry(counts, link, fqname, false));
+				writeTypePage(map, type, typefile, fqname);
+			}
+			buffer.append(CLOSE_TABLE); 
+			buffer.append(BR);
+			buffer.append(OPEN_H4).append(SearchMessages.UseReportConverter_referencing_bundles).append(CLOSE_H4);
+			buffer.append(OPEN_P).append(NLS.bind(SearchMessages.UseReportConverter_following_bundles_have_refs, report.name)).append(CLOSE_P);
+			buffer.append("<a name=\"bundles\">").append(CLOSE_A); //$NON-NLS-1$
+			buffer.append("<table border=\"1\" width=\"80%\">\n"); //$NON-NLS-1$
+			buffer.append(OPEN_TR); 
+			buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" width=\"50%\">").append(OPEN_B).append(SearchMessages.UseReportConverter_bundle).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" width=\"20%\" align=\"center\">").append(OPEN_B).append(SearchMessages.UseReportConverter_version).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" width=\"10%\" align=\"center\">").append(OPEN_B).append(SearchMessages.UseReportConverter_reference_count).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append(CLOSE_TR);
+			Collections.sort(referees, compare);
+			IComponentDescriptor comp = null;
+			for (int i = 0; i < referees.size(); i++) {
+				type = (Type) referees.get(i);
+				comp = (IComponentDescriptor) type.desc;
+				buffer.append("<tr bgcolor=\"").append(getRowColour(counts)).append("\">\n");  //$NON-NLS-1$//$NON-NLS-2$
+				buffer.append("\t").append(OPEN_TD).append(OPEN_B).append(comp.getId()).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$
+				buffer.append("\t").append(OPEN_TD).append(comp.getVersion()).append(CLOSE_TD); //$NON-NLS-1$
+				buffer.append("\t<td align=\"center\">").append(type.counts.getTotalRefCount()).append(CLOSE_TD); //$NON-NLS-1$
+				buffer.append(CLOSE_TR);
+			}
+			buffer.append(CLOSE_TABLE);
+			buffer.append(OPEN_P).append("<a href=\"../index.html\">").append(SearchMessages.UseReportConverter_back_to_bundle_index).append(CLOSE_A).append(CLOSE_P); //$NON-NLS-1$ 
+			buffer.append(W3C_FOOTER);
+			
+			writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(originhtml), IApiCoreConstants.UTF_8));;
+			writer.println(buffer.toString());
+			writer.flush();
+		}
+		catch(IOException ioe) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, originhtml.getAbsolutePath()));
+		}
+		finally {
+			if (writer != null) {
+				writer.close();
+			}
+		}
+	}
+
+	/**
+	 * Returns the colour to use based on certain counts
+	 * @param counts
+	 * @return the colour to use
+	 * @since 1.1
+	 */
+	String getRowColour(CountGroup counts) {
+		if(counts.getTotalInternalRefCount() > 0) {
+			return INTERNAL_REFS_COLOUR;
+		}
+		if(counts.getTotalIllegalRefCount() > 0) {
+			return ILLEGAL_REFS_COLOUR;
+		}
+		return NORMAL_REFS_COLOUR;
+	}
+	
+	/**
+	 * Returns a string of additional information to print out at the top of the referenced types page.
+	 * @return additional referenced type information.
+	 */
+	protected String getAdditionalReferencedTypeInformation() {
+		return null;
+	}
+	
+	/**
+	 * Returns the page title to use for the referenced types page
+	 * @param bundle
+	 * @return the page title for the referenced types page
+	 */
+	protected String getReferencedTypeTitle(String bundle) {
+		return NLS.bind(SearchMessages.UseReportConverter_types_used_in, bundle);
+	}
+	
+	/**
+	 * Returns the header title to use for the reference types page. This header
+	 * is the first header on the top of the page.
+	 * @param bundle
+	 * @return the header title for the referenced types page
+	 */
+	protected String getReferencedTypeHeader(String bundle) {
+		return NLS.bind(SearchMessages.UseReportConverter_types_used_in, bundle);
+	}
+	
+	/**
+	 * Writes the page that displays all of the members used in a type
+	 * @param map
+	 * @param type
+	 * @param typefile
+	 * @param typename
+	 * @throws Exception
+	 */
+	void writeTypePage(TreeMap map, Type type, File typefile, String typename) throws Exception {
+		PrintWriter writer = null;
+		try {
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(HTML_HEADER);
+			buffer.append(OPEN_HTML).append(OPEN_HEAD).append(CONTENT_TYPE_META);
+			buffer.append(REF_STYLE);
+			buffer.append(REF_SCRIPT);
+			buffer.append(OPEN_TITLE).append(getTypeTitle(typename)).append(CLOSE_TITLE); 
+			buffer.append(CLOSE_HEAD); 
+			buffer.append(OPEN_BODY); 
+			buffer.append(OPEN_H3).append(getTypeHeader(typename)).append(CLOSE_H3); 
+			buffer.append(getTypeCountSummary(typename, type.counts, map.size()));
+			buffer.append(OPEN_H4).append(getTypeDetailsHeader()).append(CLOSE_H4); 
+			buffer.append(OPEN_P).append(getTypeDetails()).append(CLOSE_P); 
+			buffer.append("<div align=\"left\" class=\"main\">"); //$NON-NLS-1$
+			buffer.append("<table border=\"1\" width=\"80%\">\n"); //$NON-NLS-1$
+			buffer.append(OPEN_TR); 
+			buffer.append("<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\">").append(OPEN_B).append(SearchMessages.UseReportConverter_member).append("</b></td>\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
+			buffer.append(CLOSE_TR); 
+			Entry entry = null;
+			IElementDescriptor desc = null;
+			Member mem = null;
+			for (Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
+				entry = (Entry) iter.next();
+				desc = (IElementDescriptor)entry.getKey();
+				mem = (Member) entry.getValue();
+				buffer.append(OPEN_TR); 
+				buffer.append("<td align=\"left\">\n"); //$NON-NLS-1$
+				buffer.append(OPEN_B); 
+				buffer.append("<a href=\"javascript:void(0)\" class=\"typeslnk\" onclick=\"expand(this)\" title=\""); //$NON-NLS-1$
+				buffer.append(getDisplayName(desc, true, true)).append("\">\n"); //$NON-NLS-1$
+				buffer.append("<span>[+] </span>").append(getDisplayName(desc, true, false)).append("\n");  //$NON-NLS-1$//$NON-NLS-2$
+				buffer.append(CLOSE_A).append(CLOSE_B);
+				buffer.append("<div colspan=\"6\" class=\"types\">\n"); //$NON-NLS-1$
+				buffer.append(getReferencesTable(mem)).append("\n"); //$NON-NLS-1$
+				buffer.append(CLOSE_DIV); 
+				buffer.append(CLOSE_TR); 
+			}
+			buffer.append(CLOSE_TABLE);
+			buffer.append(CLOSE_DIV); 
+			buffer.append(OPEN_P).append("<a href=\"index.html\">").append(SearchMessages.UseReportConverter_back_to_bundle_index).append(CLOSE_A).append(CLOSE_P); //$NON-NLS-1$ 
+			buffer.append(W3C_FOOTER);
+			
+			//write the file
+			writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(typefile), IApiCoreConstants.UTF_8));;
+			writer.print(buffer.toString());
+			writer.flush();
+		}
+		catch(IOException ioe) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, typefile.getAbsolutePath()));
+		}
+		finally {
+			if(writer != null) {
+				writer.close();
+			}
+		}
+	}
+	
+	/**
+	 * Returns the header to use for the section that describes the type details table
+	 * @return the details header
+	 */
+	protected String getTypeDetailsHeader() {
+		return SearchMessages.UseReportConverter_reference_details;
+	}
+	
+	/**
+	 * Returns the blurb that follows the type details header
+	 * @return the details information
+	 * @see #getTypeDetailsHeader()
+	 */
+	protected String getTypeDetails() {
+		return SearchMessages.UseReportConverter_click_an_entry_to_see_details;
+	}
+	
+	/**
+	 * Returns the title to use for the type references page
+	 * @param typename
+	 * @return the type references page title
+	 */
+	protected String getTypeTitle(String typename) {
+		return NLS.bind(SearchMessages.UseReportConverter_usage_details, Signature.getSimpleName(typename));
+	}
+	
+	/**
+	 * Returns the header to use for the types page. This is the first header on the page
+	 * @param typename
+	 * @return the type page header
+	 */
+	protected String getTypeHeader(String typename) {
+		return NLS.bind(SearchMessages.UseReportConverter_usage_details, Signature.getSimpleName(typename));
+	}
+	
+	/**
+	 * Returns the nested table of references
+	 * @return the nested table of references as a string
+	 */
+	String getReferencesTable(Member member) {
+		StringBuffer buffer = new StringBuffer();
+		Entry entry = null;
+		buffer.append("<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"6\">\n"); //$NON-NLS-1$
+		ArrayList refs = null;
+		Reference ref = null;
+		for (Iterator iter = member.children.entrySet().iterator(); iter.hasNext();) {
+			entry = (Entry) iter.next();
+			buffer.append("<tr align=\"left\"> \n"); //$NON-NLS-1$
+			buffer.append("<td colspan=\"3\" bgcolor=\"#CCCCCC\">").append(OPEN_B).append(entry.getKey()).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$
+			buffer.append(CLOSE_TR);
+			buffer.append("<tr bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\">"); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("<td align=\"left\" width=\"84%\">").append(OPEN_B).append(SearchMessages.UseReportConverter_reference_location).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ 
+			buffer.append("<td align=\"center\" width=\"8%\">").append(OPEN_B).append(SearchMessages.UseReportConverter_line_number).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ 
+			buffer.append("<td align=\"center\" width=\"8%\">").append(OPEN_B).append(SearchMessages.UseReportConverter_reference_kind).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$
+			buffer.append(CLOSE_TR); 
+			refs = (ArrayList) entry.getValue();
+			Collections.sort(refs, compare);
+			for (Iterator iter2 = refs.iterator(); iter2.hasNext();) {
+				ref = (Reference) iter2.next();
+				try {
+					String name = getDisplayName(ref.desc, false, true);
+					buffer.append(OPEN_TR);
+					buffer.append(OPEN_TD).append(name).append(CLOSE_TD); 
+					buffer.append("<td align=\"center\">").append(ref.line).append(CLOSE_TD); //$NON-NLS-1$
+					buffer.append("<td align=\"center\">").append("<span class=\"typeslnk\"");  //$NON-NLS-1$//$NON-NLS-2$
+					if(ref.message != null) {
+						buffer.append(" title=\"").append(ref.message).append("\""); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+					buffer.append(">").append(VisibilityModifiers.getVisibilityName(ref.vis)).append("</span>"); //$NON-NLS-1$ //$NON-NLS-2$
+					buffer.append(CLOSE_TD).append(CLOSE_TR); 
+				}
+				catch(CoreException ce) {
+					ApiPlugin.log(ce);
+				}
+			}
+		}
+		buffer.append(CLOSE_TABLE); 
+		return buffer.toString();
+	}
+	
+	/**
+	 * Returns the name to display for the given {@link IElementDescriptor} which can be qualified or not
+	 * @param desc
+	 * @param qualifiedparams
+	 * @param qualified
+	 * @return the (un)-qualified name to display for the given {@link IElementDescriptor}
+	 * @throws CoreException
+	 */
+	String getDisplayName(IElementDescriptor desc, boolean qualifiedparams, boolean qualified) throws CoreException {
+		String displayname = null;
+		switch(desc.getElementType()) {
+			case IElementDescriptor.TYPE: {
+				IReferenceTypeDescriptor rtype = (IReferenceTypeDescriptor) desc;
+				displayname = Signatures.getTypeSignature(rtype.getSignature(), rtype.getGenericSignature(), qualified);
+				break;
+			}
+			case IElementDescriptor.METHOD: {
+				IMethodDescriptor method = (IMethodDescriptor)desc;
+				if(qualified) {
+					displayname = Signatures.getQualifiedMethodSignature(method, qualifiedparams, qualifiedparams);
+				}
+				else {
+					displayname = Signatures.getMethodSignature(method, qualifiedparams);
+				}
+				break;
+			}
+			case IElementDescriptor.FIELD: {
+				IFieldDescriptor field = (IFieldDescriptor) desc;
+				if(qualified) {
+					displayname = Signatures.getQualifiedFieldSignature(field);
+				}
+				else {
+					displayname = field.getName();
+				}
+				break;
+			}
+		}
+		return displayname;
+	}
+	
+	/**
+	 * Extracts underlying link text from the given absolute filename based off the root file
+	 * @param root
+	 * @param fileName
+	 * @return link text pruned via the given root file
+	 */
+	String extractLinkFrom(File root, String fileName) {
+		StringBuffer buffer = new StringBuffer();
+		String substring = fileName.substring(root.getAbsolutePath().length()).replace('\\', '/');
+		buffer.append('.');
+		if(substring.charAt(0) != '/') {
+			buffer.append('/');
+		}
+		buffer.append(substring);
+		return String.valueOf(buffer);
+	}
+	
+	/**
+	 * Returns the page title for the index page
+	 * @return the index page title
+	 */
+	protected String getIndexTitle() {
+		return SearchMessages.UseReportConverter_bundle_usage_information;
+	}
+	
+	/**
+	 * Returns the main header for the index page, this header appears as the first header for the page
+	 * @return the index page header
+	 */
+	protected String getIndexHeader() {
+		return SearchMessages.UseReportConverter_bundle_usage_information;
+	}
+	
+	/**
+	 * Writes the main index file for the reports
+	 * @param reportsRoot
+	 */
+	void writeIndexPage(List sortedreports, File reportsRoot) throws Exception {
+		PrintWriter writer = null;
+		try {
+			htmlIndex = new File(this.htmlLocation, "index.html"); //$NON-NLS-1$
+			if(!htmlIndex.exists()) {
+				htmlIndex.createNewFile();
+			}
+			StringBuffer buffer = new StringBuffer();
+			buffer.append(HTML_HEADER);
+			buffer.append(OPEN_HTML).append(OPEN_HEAD).append(CONTENT_TYPE_META);
+			writeMetadataHeaders(buffer);
+			buffer.append(OPEN_TITLE).append(getIndexTitle()).append(CLOSE_TITLE); 
+			buffer.append(CLOSE_HEAD); 
+			buffer.append(OPEN_BODY); 
+			buffer.append(OPEN_H3).append(getIndexHeader()).append(CLOSE_H3);
+			try {
+				getMetadata();
+				writeMetadataSummary(buffer);
+			}
+			catch(Exception e) {
+				//do nothing, failed meta-data should not prevent the index from being written
+			}
+			buffer.append(OPEN_H4).append(SearchMessages.UseReportConvertor_additional_infos_section).append(CLOSE_H4); 
+			if(this.hasmissing) {
+				buffer.append(OPEN_P); 
+				buffer.append(NLS.bind(SearchMessages.UseReportConverter_missing_bundles_prevented_scan, 
+						new String[] {" <a href=\"./missing.html\">", "</a>"})); //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append(CLOSE_P); 
+			}
+			buffer.append(OPEN_P); 
+			buffer.append(NLS.bind(SearchMessages.UseReportConverter_bundles_that_were_not_searched, new String[] {"<a href=\"./not_searched.html\">", "</a></p>\n"}));  //$NON-NLS-1$//$NON-NLS-2$
+			String additional = getAdditionalIndexInfo(sortedreports.size() > 0);
+			if(additional != null) {
+				buffer.append(additional);
+			}
+			if(sortedreports.size() > 0) {
+				buffer.append(OPEN_P).append(SearchMessages.UseReportConverter_inlined_description).append(CLOSE_P);
+				buffer.append(getColourLegend());
+				buffer.append(getReferencesTableHeader(SearchMessages.UseReportConverter_bundle, true));
+				if(sortedreports.size() > 0) {
+					Report report = null;
+					File refereehtml = null;
+					String link = null;
+					for(Iterator iter = sortedreports.iterator(); iter.hasNext();) {
+						report = (Report) iter.next();
+						if(report != null) {
+							refereehtml = new File(this.reportsRoot, report.name+File.separator+"index.html"); //$NON-NLS-1$
+							link = extractLinkFrom(this.reportsRoot, refereehtml.getAbsolutePath());
+							buffer.append(getReferenceTableEntry(report.counts, link, report.name, true));
+						}
+					}
+					buffer.append(CLOSE_TABLE); 
+				}
+			}
+			else {
+				buffer.append(getNoReportsInformation()); 
+			}
+			buffer.append(W3C_FOOTER);
+			buffer.append(CLOSE_BODY).append(CLOSE_HTML);  
+			
+			//write the file
+			writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(htmlIndex), IApiCoreConstants.UTF_8));
+			writer.print(buffer.toString());
+			writer.flush();
+		} catch (IOException e) {
+			throw new Exception(NLS.bind(SearchMessages.ioexception_writing_html_file, htmlIndex.getAbsolutePath()));
+		} finally {
+			if (writer != null) {
+				writer.close();
+			}
+		}
+	}
+	
+	/**
+	 * Returns a table describing what all of the colours mean in the reports
+	 * @return a colour legend table
+	 * @since 1.1
+	 */
+	protected String getColourLegend() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_P);
+		buffer.append("<table width=\"20%\" border=\"1\">"); //$NON-NLS-1$
+		buffer.append(OPEN_TR);
+		buffer.append("<td width=\"25px\" bgcolor=\"").append(INTERNAL_REFS_COLOUR).append("\">\n").append(" ").append(CLOSE_TD);  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+		buffer.append("<td width=\"82%\">").append(SearchMessages.UseReportConverter_marks_internal_references).append(CLOSE_TD); //$NON-NLS-1$
+		buffer.append(CLOSE_TR);
+		buffer.append(OPEN_TR);
+		buffer.append("<td width=\"25px\" bgcolor=\"").append(ILLEGAL_REFS_COLOUR).append("\">\n").append(" ").append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		buffer.append("<td width=\"82%\">").append(SearchMessages.UseReportConverter_marks_illegal_use_references).append(CLOSE_TD); //$NON-NLS-1$
+		buffer.append(CLOSE_TR);
+		buffer.append(CLOSE_TABLE);
+		buffer.append(CLOSE_P);
+		return buffer.toString();
+	}
+	
+	/**
+	 * @return the string to write if there are no reported bundles
+	 */
+	protected String getNoReportsInformation() {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_P).append(BR).append(SearchMessages.UseReportConverter_no_reported_usage).append(CLOSE_P); 
+		return buffer.toString();
+	}
+	
+	/**
+	 * This method is called during the HTML header creation phase to allow
+	 * META header elements to be written for metadata objects
+	 * @param buffer
+	 * @throws Exception
+	 */
+	void writeMetadataHeaders(StringBuffer buffer) throws Exception {
+		writeMetaTag(buffer, "description", SearchMessages.UseReportConverter_root_index_description); //$NON-NLS-1$
+		//TODO could write metadata information here
+	}
+	
+	/**
+	 * This method is called during the initial index page creation to allow
+	 * and executive summary of the use scan to be written out from metadata
+	 * @param buffer
+	 * @throws Exception
+	 */
+	void writeMetadataSummary(StringBuffer buffer) throws Exception {
+		buffer.append(OPEN_H4).append(SearchMessages.UseReportConverter_scan_details).append(CLOSE_H4);
+		if(this.metadata != null) {
+			buffer.append("<table border=\"0px\" title=\"").append(SearchMessages.UseReportConverter_scan_details).append("\"width=\"50%\">"); //$NON-NLS-1$ //$NON-NLS-2$ 
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_scan_date).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.getRunAtDate()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_description).append(CLOSE_TD); 
+			String desc = this.metadata.getDescription();
+			buffer.append(openTD(36)).append((desc != null ? desc : SearchMessages.UseReportConverter_none)).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_includes_API_refs).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.includesAPI()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_includes_internal_refs).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.includesInternal()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_includes_illegal_use).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.includesIllegalUse()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_baseline_loc).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.getBaselineLocation()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_scope_pattern).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.getScopePattern()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_reference_pattern).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.getReferencePattern()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_report_location).append(CLOSE_TD); 
+			buffer.append(openTD(36)).append(this.metadata.getReportLocation()).append(CLOSE_TD); 
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_api_pattern).append(CLOSE_TD); 
+			buffer.append(openTD(36)); 
+			String[] patterns = this.metadata.getApiPatterns();
+			if(patterns != null) {
+				buffer.append(this.metadata.getApiPatterns());
+				for (int i = 0; i < patterns.length; i++) {
+					buffer.append(patterns[i]).append(BR);
+				}
+			}
+			else {
+				buffer.append(SearchMessages.UseReportConverter_none);
+			}
+			buffer.append(CLOSE_TD);
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_internal_patterns).append(CLOSE_TD); 
+			buffer.append(openTD(36)); 
+			patterns = this.metadata.getInternalPatterns();
+			if(patterns != null) {
+				for (int i = 0; i < patterns.length; i++) {
+					buffer.append(patterns[i]).append(BR);
+				}
+			}
+			else {
+				buffer.append(SearchMessages.UseReportConverter_none); 
+			}
+			buffer.append(CLOSE_TD);
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_archive_patterns).append(CLOSE_TD); 
+			buffer.append(openTD(36)); 
+			patterns = this.metadata.getArchivePatterns();
+			if(patterns != null) {
+				for (int i = 0; i < patterns.length; i++) {
+					buffer.append(patterns[i]).append(BR);
+				}
+			}
+			else {
+				buffer.append(SearchMessages.UseReportConverter_none); 
+			}
+			buffer.append(CLOSE_TD);
+			buffer.append(CLOSE_TR);
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_filter_pattern).append(CLOSE_TD); 
+			buffer.append(openTD(36)); 
+			if(this.frompatterns != null) {
+				for (int i = 0; i < this.frompatterns.length; i++) {
+					buffer.append(this.frompatterns[i].pattern()).append(BR);
+				}
+			}
+			else {
+				buffer.append(SearchMessages.UseReportConverter_none); 
+			}
+			buffer.append(CLOSE_TD);
+			buffer.append(CLOSE_TR);
+			
+			buffer.append(OPEN_TR);
+			buffer.append(openTD(14)).append(SearchMessages.UseReportConverter_to_filter_patterns).append(CLOSE_TD); 
+			buffer.append(openTD(36)); 
+			if(this.topatterns != null) {
+				for (int i = 0; i < this.topatterns.length; i++) {
+					buffer.append(this.topatterns[i].pattern()).append(BR);
+				}
+			}
+			else {
+				buffer.append(SearchMessages.UseReportConverter_none); 
+			}
+			buffer.append(CLOSE_TD);
+			buffer.append(CLOSE_TR);
+			buffer.append(CLOSE_TABLE);
+		}
+		else {
+			buffer.append(OPEN_P).append(SearchMessages.UseReportConverter_no_additional_scan_info).append(CLOSE_P);
+		}
+	}
+	
+	/**
+	 * Returns the use metadata from this scan
+	 * @return
+	 * @throws Exception
+	 */
+	UseMetadata getMetadata() throws Exception {
+		if(this.metadata == null) {
+			File xml = null;
+			try {
+				xml = new File(this.reportsRoot, "meta"+XML_EXTENSION);  //$NON-NLS-1$
+				if(!xml.exists()) {
+					//try looking in the default 'xml' directory as a raw report root
+					//might have been specified
+					xml = new File(this.reportsRoot+File.separator+"xml", "meta"+XML_EXTENSION);  //$NON-NLS-1$//$NON-NLS-2$
+				}
+				if(xml.exists()) {
+					String xmlstr = Util.getFileContentAsString(xml);
+					Element doc = Util.parseDocument(xmlstr.trim());
+					this.metadata = new UseMetadata();
+					Element element = null;
+					String value = null, name = null;
+					NodeList nodes = doc.getElementsByTagName("*"); //$NON-NLS-1$
+					for(int i = 0; i < nodes.getLength(); i++) {
+						element = (Element) nodes.item(i);
+						value = element.getAttribute(UseMetadata.VALUE);
+						name = element.getNodeName();
+						if(UseMetadata.FLAGS.equals(name)) {
+							try {
+								this.metadata.setSearchflags(Integer.parseInt(value));
+							}
+							catch(NumberFormatException nfe) {
+								//do nothing
+							}
+							continue;
+						}
+						if(UseMetadata.RUNATDATE.equals(name)) {
+							this.metadata.setRunAtDate(value);
+							continue;
+						}
+						if(UseMetadata.DESCRIPTION.equals(name)) {
+							this.metadata.setDescription(value);
+							continue;
+						}
+						if(UseMetadata.BASELINELOCATION.equals(name)) {
+							this.metadata.setBaselineLocation(value);
+							continue;
+						}
+						if(UseMetadata.REPORTLOCATION.equals(name)) {
+							this.metadata.setReportLocation(value);
+							continue;
+						}
+						if(UseMetadata.SCOPEPATTERN.equals(name)) {
+							this.metadata.setScopePattern(value);
+							continue;
+						}
+						if(UseMetadata.REFERENCEPATTERN.equals(name)) {
+							this.metadata.setReferencePattern(value);
+							continue;
+						}
+						if(UseMetadata.APIPATTERNS.equals(name)) {
+							this.metadata.setApiPatterns(readPatterns(element));
+							continue;
+						}
+						if(UseMetadata.INTERNALPATTERNS.equals(name)) {
+							this.metadata.setInternalPatterns(readPatterns(element));
+							continue;
+						}
+						if(UseMetadata.ARCHIVEPATTERNS.equals(name)) {
+							this.metadata.setArchivePatterns(readPatterns(element));
+							continue;
+						}
+					}
+				}
+			}
+			catch (CoreException e) {
+				throw new Exception(NLS.bind(SearchMessages.UseReportConverter_core_exep_reading_metadata, xml.getAbsolutePath()));
+			}
+		}
+		return this.metadata;
+	}
+	
+	/**
+	 * Reads saved patterns from the meta.xml file
+	 * @param element
+	 * @return the array of patterns or <code>null</code>
+	 */
+	private String[] readPatterns(Element element) {
+		String[] pats = null;
+		NodeList patterns = element.getElementsByTagName(UseMetadata.PATTERN);
+		int length = patterns.getLength();
+		if(length > 0) {
+			pats = new String[length];
+			for (int j = 0; j < length; j++) {
+				pats[j] = ((Element)patterns.item(j)).getAttribute(UseMetadata.VALUE);
+			}
+		}
+		return pats;
+	}
+	
+	/**
+	 * Writes out a META tag of the kind <code>description</code>
+	 * @param buffer
+	 * @param description
+	 */
+	void writeMetaTag(StringBuffer buffer, String name, String content) {
+		buffer.append("<meta name=\"").append(name).append("\" content=\"").append(content).append("\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	
+	/**
+	 * Returns the HTML markup for the default references table header.
+	 * Where the first column contains the linked item and the following five columns are 
+	 * API, Internal, Permissible, Fragment-Permissible and Other reference counts respectively
+	 * @param columnname
+	 * @param includeversion
+	 * @return the default references table header
+	 */
+	String getReferencesTableHeader(String columnname, boolean includeversion) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_H4).append(SearchMessages.UseReportConverter_references).append(CLOSE_H4);
+		buffer.append("<table border=\"1\" width=\"80%\">\n"); //$NON-NLS-1$
+		buffer.append(OPEN_TR); 
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" width=\"30%\">").append(OPEN_B).append(columnname).append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$
+		if(includeversion) {
+			//version header
+			buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"20%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append(SearchMessages.UseReportConverter_version_column_description).append("\"\">"); //$NON-NLS-1$
+			buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_version).append(CLOSE_B).append(CLOSE_TD);
+		}
+		//API header
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"8%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(SearchMessages.UseReportConverter_api_ref_description).append("\">"); //$NON-NLS-1$
+		buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_api_references).append(CLOSE_B).append(CLOSE_TD); 
+		//Internal header
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"8%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(SearchMessages.UseReportConverter_internal_ref_description).append("\">"); //$NON-NLS-1$
+		buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_internal_references).append(CLOSE_B).append(CLOSE_TD);
+		//Permissible header
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"8%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(SearchMessages.UseReportConverter_permissible_ref_description).append("\">"); //$NON-NLS-1$
+		buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_internal_permissible_references).append(CLOSE_B).append(CLOSE_TD);
+		//fragment permissible header
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"8%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(SearchMessages.UseReportConverter_fragment_ref_description).append("\">"); //$NON-NLS-1$
+		buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_fragment_permissible_references).append(CLOSE_B).append(CLOSE_TD);
+		//illegal use header
+		buffer.append("\t<td bgcolor=\"").append(REFERENCES_TABLE_HEADER_COLOUR).append("\" align=\"center\" width=\"8%\" title=\""); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(SearchMessages.UseReportConverter_illegal_ref_description).append("\">");  //$NON-NLS-1$
+		buffer.append(OPEN_B).append(SearchMessages.UseReportConverter_illegal).append(CLOSE_B).append(CLOSE_TD);  
+		return buffer.toString();
+	}
+	
+	/**
+	 * Returns the HTML markup for one entry in the default references table.
+	 * Where the first column contains the linked item and the following five columns are 
+	 * Version, API, Internal, Permissible, Fragment-Permissible reference counts respectively
+	 * @param counts
+	 * @param link
+	 * @param linktext
+	 * @param includeversion
+	 * @return a single reference table entry
+	 */
+	String getReferenceTableEntry(CountGroup counts, String link, String linktext, boolean includeversion) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<tr bgcolor=\"").append(getRowColour(counts)).append("\">\n");  //$NON-NLS-1$//$NON-NLS-2$
+		buffer.append("\t<td><b><a href=\"").append(link).append("\">").append(getBundleOnlyName(linktext)).append("</a>").append(CLOSE_B).append(CLOSE_TD); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		if(includeversion) {
+			buffer.append("\t<td align=\"left\">").append(getVersion(linktext)).append(CLOSE_TD); //$NON-NLS-1$
+		}
+		buffer.append("\t<td align=\"center\">").append(counts.getTotalApiRefCount()).append(CLOSE_TD); //$NON-NLS-1$ 
+		buffer.append("\t<td align=\"center\">").append(counts.getTotalInternalRefCount()).append(CLOSE_TD); //$NON-NLS-1$ 
+		buffer.append("\t<td align=\"center\">").append(counts.getTotalPermissableRefCount()).append(CLOSE_TD); //$NON-NLS-1$ 
+		buffer.append("\t<td align=\"center\">").append(counts.getTotalFragmentPermissibleRefCount()).append(CLOSE_TD); //$NON-NLS-1$ 
+		buffer.append("\t<td align=\"center\">").append(counts.getTotalIllegalRefCount()).append(CLOSE_TD); //$NON-NLS-1$ 
+		buffer.append(CLOSE_TR); 
+		return buffer.toString();
+	}
+	
+	String getBundleOnlyName(String text) {
+		int idx = text.indexOf('(');
+		if(idx > -1) {
+			return text.substring(0, idx-1);
+		}
+		return text;
+	}
+	
+	/**
+	 * Returns the version string from the text (if any)
+	 * @param text
+	 * @return
+	 * @since 1.1
+	 */
+	String getVersion(String text) {
+		int idx = text.indexOf('(');
+		if(idx > -1) {
+			int idx2 = text.indexOf(')', idx);
+			String version = text.substring(idx+1, idx2);
+			try {
+				Version ver = new Version(version);
+				return ver.toString();
+			}
+			catch(IllegalArgumentException iae) {
+				//do nothing, not a valid version
+			}
+		}
+		return "-"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Allows additional infos to be added to the HTML at the top of the report page
+	 * @param hasreports
+	 * 
+	 * @return additional information string to add
+	 */
+	protected String getAdditionalIndexInfo(boolean hasreports) {
+		return null;
+	}
+	
+	/**
+	 * Returns HTML summary for references from a specific component.
+	 * 
+	 * @param typename
+	 * @param counts
+	 * @return HTML as a string
+	 */
+	protected String getTypeCountSummary(String typename, CountGroup counts, int membercount) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(OPEN_H4).append(SearchMessages.UseReportConverter_summary).append(CLOSE_H4); 
+		buffer.append(OPEN_P).append(NLS.bind(SearchMessages.UseReportConverter___has_total_refs, new String[] {typename, Integer.toString(counts.getTotalRefCount()), Integer.toString(membercount)})).append(CLOSE_P);  
+		return buffer.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanParser.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanParser.java
new file mode 100644
index 0000000..3fa1c4e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanParser.java
@@ -0,0 +1,448 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.provisional.Factory;
+import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Parses a use scan (XML) to visit a {@link UseScanVisitor}
+ */
+public class UseScanParser {
+	
+	private UseScanVisitor visitor;
+	
+	private IComponentDescriptor targetComponent;
+	private IComponentDescriptor referencingComponent;
+	private IMemberDescriptor targetMember;
+	private int referenceKind;
+	private int visibility;
+	
+	private boolean visitReferencingComponent = true;
+	private boolean visitMembers = true;
+	private boolean visitReferences = true;
+
+	/**
+	 * Handler to resolve a reference
+	 */
+	class ReferenceHandler extends DefaultHandler {
+
+		// type of file being analyzed - type reference, method reference, field reference
+		private int type = 0;
+
+		/**
+		 * Constructor
+		 * 
+		 * @param type one of IReference.T_TYPE_REFERENCE, IReference.T_METHOD_REFERENCE,
+		 * 			IReference.T_FIELD_REFERENCE
+		 */
+		public ReferenceHandler(int type) {
+			this.type = type;
+		}
+			
+		/* (non-Javadoc)
+		 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
+		 */
+		public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
+			processElement(uri, localName, name, attributes, type);
+		}
+			
+	}
+	
+	private String[] getIdVersion(String value) {
+		int index = value.indexOf(' ');
+		if (index > 0) {
+			String id = value.substring(0, index);
+			String version = value.substring(index + 1);
+			if (version.startsWith("(")) { //$NON-NLS-1$
+				version = version.substring(1);
+				if (version.endsWith(")")) { //$NON-NLS-1$
+					version = version.substring(0,version.length() - 1);
+				}
+			}
+			return new String[]{id, version};
+		}
+		return new String[]{value, null};
+	}
+	
+	/**
+	 * Process the XML element described by the URI, local name, name and attributes
+	 * @param uri the URI of the XML element
+	 * @param localName the local name of the XML element
+	 * @param name the name of the XML element
+	 * @param attributes the attribute listing for the XML element
+	 * @param type the type of the XML file. One of: {@link IReference#T_TYPE_REFERENCE}, {@link IReference#T_METHOD_REFERENCE} or
+	 * {@link IReference#T_FIELD_REFERENCE}
+	 * @throws SAXException
+	 */
+	protected void processElement(String uri, String localName, String name, Attributes attributes, int type) throws SAXException {
+		if (IApiXmlConstants.REFERENCES.equals(name)) {
+			String target = attributes.getValue(IApiXmlConstants.ATTR_REFEREE);
+			String source = attributes.getValue(IApiXmlConstants.ATTR_ORIGIN);
+			String[] idv = getIdVersion(target);
+			enterTargetComponent(Factory.componentDescriptor(idv[0], idv[1]));
+			idv = getIdVersion(source);
+			enterReferencingComponent(Factory.componentDescriptor(idv[0], idv[1]));
+			String visString = attributes.getValue(IApiXmlConstants.ATTR_REFERENCE_VISIBILITY);
+			try {
+				int vis = Integer.parseInt(visString);
+				enterVisibility(vis);
+			} catch (NumberFormatException e) {
+				// TODO:
+				enterVisibility(-1);
+				System.out.println("Internal error: invalid visibility: " + visString); //$NON-NLS-1$
+			}
+		} else if(IApiXmlConstants.ELEMENT_TARGET.equals(name)) {
+			String qName = attributes.getValue(IApiXmlConstants.ATTR_TYPE);
+			String memberName = attributes.getValue(IApiXmlConstants.ATTR_MEMBER_NAME);
+			String signature = attributes.getValue(IApiXmlConstants.ATTR_SIGNATURE);
+			IMemberDescriptor member = null;
+			switch (type) {
+				case IReference.T_TYPE_REFERENCE:
+					member = Factory.typeDescriptor(qName);
+					break;
+				case IReference.T_METHOD_REFERENCE:
+					member = Factory.methodDescriptor(qName, memberName, signature);
+					break;
+				case IReference.T_FIELD_REFERENCE:
+					member = Factory.fieldDescriptor(qName, memberName);
+					break;
+			}
+			enterTargetMember(member);
+		} else if (IApiXmlConstants.REFERENCE_KIND.equals(name)) {
+			String value = attributes.getValue(IApiXmlConstants.ATTR_KIND);
+			if (value != null) {
+				try {
+					enterReferenceKind(Integer.parseInt(value));
+				} catch (NumberFormatException e) {
+					// ERROR
+					System.out.println(NLS.bind("Internal error: invalid reference kind: {0}", value)); //$NON-NLS-1$
+				}
+			}
+		} else if (IApiXmlConstants.ATTR_REFERENCE.equals(name)) {
+			String qName = attributes.getValue(IApiXmlConstants.ATTR_TYPE);
+			String memberName = attributes.getValue(IApiXmlConstants.ATTR_MEMBER_NAME);
+			String signature = attributes.getValue(IApiXmlConstants.ATTR_SIGNATURE);
+			IMemberDescriptor origin = null;
+			if (signature != null) {
+				origin = Factory.methodDescriptor(qName, memberName, signature);
+			} else if (memberName != null) {
+				origin = Factory.fieldDescriptor(qName, memberName);
+			} else {
+				origin = Factory.typeDescriptor(qName);
+			}
+			String line = attributes.getValue(IApiXmlConstants.ATTR_LINE_NUMBER);
+			String flags = attributes.getValue(IApiXmlConstants.ATTR_FLAGS);
+			try {
+				int num = Integer.parseInt(line);
+				int flgs = 0;
+				if(flags != null) {
+					flgs = Integer.parseInt(flags);
+				}
+				setReference(Factory.referenceDescriptor(
+						referencingComponent, 
+						origin, 
+						num, 
+						targetComponent, 
+						targetMember, 
+						referenceKind, 
+						flgs, 
+						visibility, 
+						parseMessages(attributes)));
+			} catch (NumberFormatException e) {
+				// TODO:
+				System.out.println("Internal error: invalid line number: " + line); //$NON-NLS-1$
+			}
+		}
+	}
+	
+	/**
+	 * Parses the problem messages from the attributes
+	 * 
+	 * @param attribs
+	 * @return the messages or an empty array never <code>null</code>
+	 * @since 1.1
+	 */
+	protected String[] parseMessages(Attributes attribs) {
+		String msgs = attribs.getValue(IApiXmlConstants.ELEMENT_PROBLEM_MESSAGE_ARGUMENTS);
+		String[] messages = null;
+		if(msgs != null) {
+			messages = msgs.split("\\,"); //$NON-NLS-1$
+		}
+		return messages;
+	}
+	
+	/**
+	 * Resolves references from an API use scan rooted at the specified location in the file
+	 * system in the given baseline.
+	 * 
+	 * @param xmlLocation root of API use scan (XML directory).
+	 * @param monitor progress monitor
+	 * @param baseline API baseline to resolve references in
+	 */
+	public void parse(String xmlLocation, IProgressMonitor monitor, UseScanVisitor usv) throws Exception {
+		if (xmlLocation == null) {
+			throw new Exception(SearchMessages.missing_xml_files_location);
+		}
+		visitor = usv;
+		File reportsRoot = new File(xmlLocation);
+		if (!reportsRoot.exists() || !reportsRoot.isDirectory()) {
+			throw new Exception(NLS.bind(SearchMessages.invalid_directory_name, xmlLocation));
+		}
+		SubMonitor localmonitor = SubMonitor.convert(monitor, SearchMessages.UseScanParser_parsing, 8);
+		localmonitor.setTaskName(SearchMessages.UseReportConverter_collecting_dir_info);
+		File[] referees = getDirectories(reportsRoot);
+		Util.updateMonitor(localmonitor, 1);
+		File[] origins = null;
+		File[] xmlfiles = null;
+		localmonitor.setWorkRemaining(referees.length);
+		visitor.visitScan();
+		try {
+			SAXParser parser = getParser();
+			for (int i = 0; i < referees.length; i++) {
+				origins = getDirectories(referees[i]);
+				origins = sort(origins); // sort to visit in determined order
+				for (int j = 0; j < origins.length; j++) {
+					localmonitor.setTaskName(NLS.bind(SearchMessages.UseScanParser_analyzing_references, new String[] {origins[j].getName()}));
+					xmlfiles = Util.getAllFiles(origins[j], new FileFilter() {
+						public boolean accept(File pathname) {
+							return pathname.isDirectory() || pathname.getName().endsWith(".xml"); //$NON-NLS-1$
+						}
+					});
+					if (xmlfiles != null && xmlfiles.length > 0) {
+						xmlfiles = sort(xmlfiles); // sort to visit in determined order
+						for (int k = 0; k < xmlfiles.length; k++) {
+							try {
+								ReferenceHandler handler = new ReferenceHandler(getTypeFromFileName(xmlfiles[k]));
+								parser.parse(xmlfiles[k], handler);
+							} 
+							catch (SAXException e) {}
+							catch (IOException e) {}
+						}
+					}
+				}
+				Util.updateMonitor(localmonitor, 1);
+			}
+			endMember();
+			endReferencingComponent();
+			endTargetComponent();
+		}
+		finally {
+			visitor.endVisitScan();
+			localmonitor.done();
+		}		
+	}
+	
+	/**
+	 * Returns a parser
+	 * @return default parser
+	 * @throws Exception forwarded general exception that can be trapped in Ant builds
+	 */
+	SAXParser getParser() throws Exception {
+		SAXParserFactory factory = SAXParserFactory.newInstance();
+		try {
+			return factory.newSAXParser();
+		} catch (ParserConfigurationException pce) {
+			throw new Exception(SearchMessages.UseReportConverter_pce_error_getting_parser, pce);
+		} catch (SAXException se) {
+			throw new Exception(SearchMessages.UseReportConverter_se_error_parser_handle, se);
+		}
+	}	
+	
+	/**
+	 * @return the referencingComponent or <code>null</code>
+	 */
+	protected IComponentDescriptor getReferencingComponent() {
+		return referencingComponent;
+	}
+	
+	/**
+	 * @return the targetComponent or <code>null</code>
+	 */
+	protected IComponentDescriptor getTargetComponent() {
+		return targetComponent;
+	}
+	
+	/**
+	 * @return the targetMember or <code>null</code>
+	 */
+	protected IMemberDescriptor getTargetMember() {
+		return targetMember;
+	}
+	
+	/**
+	 * @return the referenceKind
+	 */
+	protected int getReferenceKind() {
+		return referenceKind;
+	}
+	
+	/**
+	 * @return the visibility
+	 */
+	protected int getVisibility() {
+		return visibility;
+	}
+	
+	/**
+	 * Returns all the child directories form the given directory
+	 * @param file
+	 * @return
+	 */
+	private File[] getDirectories(File file) {
+		File[] directories = file.listFiles(new FileFilter() {
+			public boolean accept(File pathname) {
+				return pathname.isDirectory() && !pathname.isHidden();
+			}
+		});
+		return directories;
+	}	
+	
+	/**
+	 * Returns the {@link IReference} type from the file name
+	 * @param xmlfile
+	 * @return the type from the file name
+	 */
+	private int getTypeFromFileName(File xmlfile) {
+		if(xmlfile.getName().indexOf(XmlReferenceDescriptorWriter.TYPE_REFERENCES) > -1) {
+			return IReference.T_TYPE_REFERENCE;
+		}
+		if(xmlfile.getName().indexOf(XmlReferenceDescriptorWriter.METHOD_REFERENCES) > -1) {
+			return IReference.T_METHOD_REFERENCE;
+		}
+		return IReference.T_FIELD_REFERENCE;
+	}
+	
+	public void enterTargetComponent(IComponentDescriptor component) {
+		boolean different = false;
+		if (targetComponent == null) {
+			different = true;
+		} else {
+			if (!targetComponent.equals(component)) {
+				different = true;
+			}
+		}
+		if (different) {
+			// end visit
+			endMember();
+			endReferencingComponent();
+			endTargetComponent();
+			
+			// start next
+			targetComponent = component;
+			visitReferencingComponent = visitor.visitComponent(targetComponent);
+		}
+	}
+	
+	public void enterReferencingComponent(IComponentDescriptor component) {
+		boolean different = false;
+		if (referencingComponent == null) {
+			different = true;
+		} else {
+			if (!referencingComponent.equals(component)) {
+				different = true;
+			}
+		}
+		if (different) {
+			// end visit
+			endMember();
+			endReferencingComponent();
+			
+			// start next
+			referencingComponent = component;
+			if (visitReferencingComponent) {
+				visitMembers = visitor.visitReferencingComponent(referencingComponent);
+			}
+		}		
+	}
+	
+	public void enterVisibility(int vis) {
+		visibility = vis;
+	}
+	
+	public void enterTargetMember(IMemberDescriptor member) {
+		if (targetMember == null || !targetMember.equals(member)) {
+			endMember();
+			targetMember = member;
+			if (visitReferencingComponent && visitMembers) {
+				visitReferences  =visitor.visitMember(targetMember);
+			}
+		}
+	}
+	
+	public void enterReferenceKind(int refKind) {
+		referenceKind = refKind;
+	}
+	
+	public void setReference(IReferenceDescriptor reference) {
+		if (visitReferencingComponent&& visitMembers && visitReferences) {
+			visitor.visitReference(reference);
+		}
+	}
+	
+	private void endMember() {
+		if (targetMember != null) {
+			visitor.endVisitMember(targetMember);
+			targetMember = null;
+		}
+	}
+	
+	private void endReferencingComponent() {
+		if (referencingComponent != null) {
+			visitor.endVisitReferencingComponent(referencingComponent);
+			referencingComponent = null;
+		}
+	}
+	
+	private void endTargetComponent() {
+		if (targetComponent != null) {
+			visitor.endVisit(targetComponent);
+			targetComponent = null;
+		}
+	}
+	
+	/**
+	 * Sorts the given files by name (not path).
+	 * 
+	 * @param files
+	 * @return sorted files
+	 */
+	private File[] sort(File[] files) {
+		List sorted = new ArrayList(files.length + 2);
+		for (int i = 0; i < files.length; i++) {
+			sorted.add(files[i]);
+		}
+		
+		Collections.sort(sorted, Util.filesorter);
+		return (File[]) sorted.toArray(new File[sorted.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanVisitor.java
new file mode 100644
index 0000000..15cdd5f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseScanVisitor.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+
+/**
+ * Used to visit an API use scan. This visitor visits each referenced component in 
+ * a use scan, by each component that refers to it, by each reference.
+ */
+public class UseScanVisitor {
+	
+	/**
+	 * Start visiting an API use scan
+	 */
+	public void visitScan() {
+	}
+	
+	/**
+	 * Ends visiting an API use scan
+	 */
+	public void endVisitScan() {
+	}
+
+	/**
+	 * Visits the given component and returns whether to visit components referencing
+	 * this component.
+	 * <p>
+	 * Components in a scan are visited in alphabetical order.
+	 * </p>
+	 * 
+	 * @param target API component to which references exist
+	 * @return whether to visit components that reference this component
+	 */
+	public boolean visitComponent(IComponentDescriptor target) {
+		return true;
+	}
+	
+	/**
+	 * End visiting a component that was referenced by others
+	 * 
+	 * @param target the component that was visited
+	 */
+	public void endVisit(IComponentDescriptor target) {
+	}
+	
+	/**
+	 * Visits a component that makes references to the current target component being visited
+	 * and returns whether to visit individual references.
+	 * <p>
+	 * Referencing components in a scan are visited in alphabetical order within the
+	 * current target component.
+	 * </p>
+	 * 
+	 * @param component the component that references the current target component
+	 * @return whether to visit reference members within the component
+	 */
+	public boolean visitReferencingComponent(IComponentDescriptor component) {
+		return true;
+	}
+	
+	/**
+	 * Ends visiting a component that made references to the current target component.
+	 * 
+	 * @param component that component that was visited
+	 */
+	public void endVisitReferencingComponent(IComponentDescriptor component) {	
+	}
+	
+	/**
+	 * Visits a referenced member and returns whether to visit reference locations
+	 * 
+	 * @param referencedMember the member that was referenced
+	 * @return whether to visit individual reference locations
+	 */
+	public boolean visitMember(IMemberDescriptor referencedMember) {
+		return true;
+	}
+	
+	/**
+	 * End visits a referenced member
+	 * 
+	 * @param referencedMember the member that was referenced
+	 */
+	public void endVisitMember(IMemberDescriptor referencedMember) {
+		
+	}	
+	
+	/**
+	 * Visits a reference to the current member.
+	 * 
+	 * @param reference the reference
+	 */
+	public void visitReference(IReferenceDescriptor reference) {
+		
+	}
+	
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseSearchRequestor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseSearchRequestor.java
new file mode 100644
index 0000000..967c17a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/UseSearchRequestor.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.builder.AbstractProblemDetector;
+import org.eclipse.pde.api.tools.internal.builder.ProblemDetectorBuilder;
+import org.eclipse.pde.api.tools.internal.builder.Reference;
+import org.eclipse.pde.api.tools.internal.builder.ReferenceAnalyzer;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.builder.IApiProblemDetector;
+import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiScope;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiScope;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
+
+/**
+ * Default implementation of an {@link IApiSearchRequestor} to use with the
+ * {@link ApiSearchEngine}. This requestor returns a search scope
+ * composed of the dependent (visible) {@link IApiComponent}s for the given 
+ * {@link IApiElement}
+ * 
+ * @since 1.0.0
+ */
+public class UseSearchRequestor implements IApiSearchRequestor {
+
+	/**
+	 * The backing elements to search with
+	 */
+	private Set fComponentIds = null;
+
+	/**
+	 * The mask to use while searching
+	 */
+	private int fSearchMask = 0;
+	
+	/**
+	 * The search scope for this requestor
+	 */
+	private IApiScope fScope = null;
+	
+	/**
+	 * Patterns for jar API type roots to not scan
+	 */
+	private String[] jarPatterns = null;
+
+	/**
+	 * The default {@link ReferenceAnalyzer} for detecting illegal API use
+	 * @see #includesIllegalUse()
+	 */
+	ReferenceAnalyzer fAnalyzer = null;
+	
+	/**
+	 * Constructor
+	 * @param elements an array of {@link IApiElement}s for the search engine to use
+	 * @param scope the raw list of {@link IApiElement}s to extract references from
+	 * @param searchkinds the kinds of references to search for. 
+	 * <br>Options include: 
+	 * <ol>
+	 * <li>{@link #INCLUDE_API}</li>
+	 * <li>{@link #INCLUDE_INTERNAL}</li>
+	 * </ol>
+	 */
+	public UseSearchRequestor(Set/*<String>*/ elementnames, IApiElement[] scope, int searchkinds) {
+		fSearchMask = searchkinds;
+		fComponentIds = elementnames;
+		fAnalyzer = new ReferenceAnalyzer();
+		prepareScope(scope);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptComponent(org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent)
+	 */
+	public boolean acceptComponent(IApiComponent component) {
+		try {
+			if(!component.isSystemComponent() && getScope().encloses(component)) {
+				if(includesIllegalUse()) {
+					fAnalyzer.buildProblemDetectors(component, ProblemDetectorBuilder.K_USE, null);
+				}
+				return true;
+			}
+		}
+		catch(CoreException ce) {
+			//do nothing, return false
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptContainer(org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeContainer)
+	 */
+	public boolean acceptContainer(IApiTypeContainer container) {
+		return considerTypeContainer(container);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptMember(org.eclipse.pde.api.tools.internal.provisional.model.IApiMember)
+	 */
+	public boolean acceptMember(IApiMember member) {
+		// don't consider inner types, as they are considered with the root type
+		switch(member.getType()) {
+			case IApiElement.TYPE: {
+				IApiType type = (IApiType) member;
+				return !(type.isMemberType() || type.isLocal());
+			}
+		}
+		return true;
+	}
+	
+	/**
+	 * Returns if the given {@link IApiTypeContainer} should be processed
+	 * @param container
+	 * @return true if the container should be processed false otherwise
+	 */
+	boolean considerTypeContainer(IApiTypeContainer container) {
+		if(jarPatterns != null && container != null) {
+			if(container.getContainerType() == IApiTypeContainer.ARCHIVE) {
+				String[] pparts = null;
+				for (int i = 0; i < jarPatterns.length; i++) {
+					pparts = jarPatterns[i].split(":"); //$NON-NLS-1$
+					if(pparts.length != 2) {
+						continue;
+					}
+					if(container.getApiComponent().getSymbolicName().equals(pparts[0])) {
+						if(container.getName().endsWith(pparts[1])) {
+							return false;
+						}
+					}
+				}
+			}
+		}
+		return true;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#acceptReference(org.eclipse.pde.api.tools.internal.provisional.builder.IReference)
+	 */
+	public boolean acceptReference(IReference reference) {
+		try {
+			IApiMember member = reference.getResolvedReference();
+			if(member != null) {
+				IApiComponent component = member.getApiComponent();
+				if(!fComponentIds.contains(component.getSymbolicName()) || component.equals(reference.getMember().getApiComponent())) {
+					return false;
+				}
+				if(isIllegalUse(reference) || (includesAPI() && includesInternal())) {
+					return true;
+				}
+				IApiAnnotations annots = component.getApiDescription().resolveAnnotations(member.getHandle());
+				if(annots != null) {
+					int vis = annots.getVisibility();
+					if(VisibilityModifiers.isAPI(vis) && includesAPI()) {
+						return true;
+					}
+					else if(VisibilityModifiers.isPrivate(vis) && includesInternal()) {
+						return true;
+					}
+				}
+			}
+		}
+		catch(CoreException ce) {
+			ApiPlugin.log(ce);
+		}
+		return false;
+	}
+	
+	/**
+	 * Returns true if the given reference is an illegal usage reference
+	 * iff illegal use is part of the search mask.
+	 * @param reference
+	 * @return true if the reference is illegal use false otherwise
+	 * @since 1.1
+	 */
+	boolean isIllegalUse(IReference reference) {
+		IApiProblemDetector[] detectors = fAnalyzer.getProblemDetectors(reference.getReferenceKind());
+		for (int i = 0; i < detectors.length; i++) {
+			if(detectors[i].considerReference(reference)) {
+				Reference ref = (Reference) reference;
+				ref.setFlags(IReference.F_ILLEGAL);
+				try {
+					ref.addProblems(((AbstractProblemDetector)detectors[i]).createProblem(reference));
+				} catch (CoreException e) {
+					ApiPlugin.log(e);
+				}
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#getReferenceKinds()
+	 */
+	public int getReferenceKinds() {
+		return IReference.MASK_REF_ALL & ~IReference.REF_CONSTANTPOOL;
+	}
+	
+	/**
+	 * Prepares the search scope based on the available entries in the constructor
+	 * @param elements
+	 */
+	private void prepareScope(IApiElement[] elements) {
+		if(elements != null) {
+			fScope = new ApiScope();
+			for(int i = 0; i < elements.length; i++) {
+				fScope.addElement(elements[i].getApiComponent());
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#getScope()
+	 */
+	public IApiScope getScope() {
+		return fScope;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesAPI()
+	 */
+	public boolean includesAPI() {
+		return (fSearchMask & INCLUDE_API) > 0;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesInternal()
+	 */
+	public boolean includesInternal() {
+		return (fSearchMask & INCLUDE_INTERNAL) > 0;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor#includesIllegalUse()
+	 */
+	public boolean includesIllegalUse() {
+		return (fSearchMask & INCLUDE_ILLEGAL_USE) > 0;
+	}
+	
+	/**
+	 * The patterns for jar names to exclude from the search
+	 * @param patterns
+	 */
+	public void setJarPatterns(String[] patterns) {
+		jarPatterns = patterns;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XMLApiSearchReporter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XMLApiSearchReporter.java
deleted file mode 100644
index 41ef696..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XMLApiSearchReporter.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.search;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
-import org.eclipse.pde.api.tools.internal.builder.Reference;
-import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
-import org.eclipse.pde.api.tools.internal.provisional.Factory;
-import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
-import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
-import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
-import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
-import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
-import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiField;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiMember;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiMethod;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
-import org.eclipse.pde.api.tools.internal.util.Signatures;
-import org.eclipse.pde.api.tools.internal.util.Util;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Search reporter that outputs results to an XML file
- * 
- * @since 1.0.1
- */
-public class XMLApiSearchReporter implements IApiSearchReporter {
-
-	/**
-	 * file names for the output reference files
-	 */
-	public static final String TYPE_REFERENCES = "type_references"; //$NON-NLS-1$
-	public static final String METHOD_REFERENCES = "method_references"; //$NON-NLS-1$
-	public static final String FIELD_REFERENCES = "field_references"; //$NON-NLS-1$
-	
-	private String fLocation = null;
-	private HashMap fReferenceMap = null;
-	private IApiDescription fDescription = null;
-	private DocumentBuilder parser = null;
-	private boolean debug = false;
-	
-	/**
-	 * Constructor
-	 * 
-	 * @param location the absolute path in the local file system to the folder to write the reports to 
-	 * @param debug if debugging infos should be written out to the console
-	 */
-	public XMLApiSearchReporter(String location, boolean debug) {
-		fLocation = location;
-		this.debug = debug;
-		try {
-			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-			parser.setErrorHandler(new DefaultHandler());
-		}
-		catch(FactoryConfigurationError fce) {} 
-		catch (ParserConfigurationException e) {}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter#reportResults(org.eclipse.pde.api.tools.internal.provisional.builder.IReference[])
-	 */
-	public void reportResults(IApiElement element, final IReference[] references) {
-		if(fLocation != null) {
-			try {
-				File parent = new File(fLocation);
-				if(!parent.exists()) {
-					parent.mkdirs();
-				}
-				collateResults(references);
-				writeXML(parent);
-			} 
-			catch (Exception e) {
-				ApiPlugin.log(e);
-			}
-			finally {
-				if(fReferenceMap != null) {
-					fReferenceMap.clear();
-					fReferenceMap = null;
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Collates the results into like reference kinds
-	 * @param references
-	 */
-	private void collateResults(IReference[] references) throws CoreException {
-		if(fReferenceMap == null) {
-			fReferenceMap = new HashMap();
-		}
-		Integer type = null;
-		Integer visibility = null;
-		String id = null;
-		String tname = null;
-		HashMap rmap = null;
-		HashMap mmap = null;
-		HashMap vmap = null;
-		HashMap tmap = null;
-		HashSet reflist = null;
-		IApiAnnotations annot = null;
-		IApiComponent rcomponent = null;
-		IApiComponent mcomponent = null;
-		for (int i = 0; i < references.length; i++) {
-			rcomponent = references[i].getResolvedReference().getApiComponent(); 
-			id = rcomponent.getId();
-			rmap = (HashMap) fReferenceMap.get(id);
-			if(rmap == null) {
-				rmap = new HashMap();
-				fReferenceMap.put(id, rmap);
-			}
-			mcomponent = references[i].getMember().getApiComponent(); 
-			id = mcomponent.getId();
-			mmap = (HashMap) rmap.get(id);
-			if(mmap == null) {
-				mmap = new HashMap();
-				rmap.put(id, mmap);
-			}
-			fDescription = rcomponent.getApiDescription();
-			annot = fDescription.resolveAnnotations(references[i].getResolvedReference().getHandle());
-			if(annot != null) {
-				visibility = new Integer(annot.getVisibility());
-				if(annot.getVisibility() == VisibilityModifiers.PRIVATE) {
-					IApiComponent host = mcomponent.getHost();
-					if(host != null && host.getId().equals(rcomponent.getId())) {
-						visibility = new Integer(ApiUseReportConverter.FRAGMENT_PERMISSIBLE);
-					}
-					else {
-						IApiAccess access = fDescription.resolveAccessLevel(
-								mcomponent.getHandle(), 
-								getPackageDescriptor(references[i].getResolvedReference()));
-						if(access != null && access.getAccessLevel() == IApiAccess.FRIEND) {
-							visibility = new Integer(VisibilityModifiers.PRIVATE_PERMISSIBLE);
-						}
-					}
-				}
-			}
-			else {
-				//overflow for those references that cannot be resolved
-				visibility = new Integer(VisibilityModifiers.ALL_VISIBILITIES);
-			}
-			vmap = (HashMap) mmap.get(visibility);
-			if(vmap == null) {
-				vmap = new HashMap();
-				mmap.put(visibility, vmap);
-			}
-			type = new Integer(references[i].getReferenceType());
-			tmap = (HashMap) vmap.get(type);
-			if(tmap == null) {
-				tmap = new HashMap();
-				vmap.put(type, tmap);
-			}
-			tname = getText(references[i].getResolvedReference());
-			reflist = (HashSet) tmap.get(tname);
-			if(reflist == null) {
-				reflist = new HashSet();
-				tmap.put(tname, reflist);
-			}
-			reflist.add(references[i]);
-		}
-	}
-	
-	/**
-	 * Returns the {@link IPackageDescriptor} for the package that contains the given {@link IApiMember}
-	 * @param member
-	 * @return a new package descriptor for the given {@link IApiMember}
-	 * @throws CoreException
-	 */
-	private IPackageDescriptor getPackageDescriptor(IApiMember member) throws CoreException {
-		IApiType type = null;
-		if(member.getType() != IApiElement.TYPE) {
-			 type = member.getEnclosingType();
-		}
-		else {
-			type = (IApiType) member;
-		}
-		return Factory.packageDescriptor(type.getPackageName());
-	}
-	
-	/**
-	 * Returns a formatted version of the references xml file name for use during conversion via the default
-	 * XSLT file
-	 * @param groupname
-	 * @return a formatted version of the references file name
-	 */
-	private String getFormattedTypeName(String groupname) {
-		if(TYPE_REFERENCES.equals(groupname)) {
-			return "Types"; //$NON-NLS-1$
-		}
-		if(METHOD_REFERENCES.equals(groupname)) {
-			return "Methods"; //$NON-NLS-1$
-		}
-		if(FIELD_REFERENCES.equals(groupname)) {
-			return "Fields"; //$NON-NLS-1$
-		}
-		return "unknown references"; //$NON-NLS-1$
-	}
-	
-	/**
-	 * Returns the name for the file of references base on the given type
-	 * @param type
-	 * @return
-	 */
-	private String getRefTypeName(int type) {
-		switch(type) {
-			case IReference.T_TYPE_REFERENCE: return TYPE_REFERENCES;
-			case IReference.T_METHOD_REFERENCE: return METHOD_REFERENCES;
-			case IReference.T_FIELD_REFERENCE: return FIELD_REFERENCES;
-		}
-		return "unknown_reference_kinds"; //$NON-NLS-1$
-	}
-	
-	/**
-	 * Writes out the XML for the given api element using the collated {@link IReference}s
-	 * @param parent
-	 * @throws CoreException
-	 * @throws FileNotFoundException
-	 * @throws IOException
-	 */
-	private void writeXML(File parent) throws CoreException, FileNotFoundException, IOException {
-		HashMap vismap = null;
-		HashMap typemap = null;
-		HashMap rmap = null;
-		HashMap mmap = null;
-		Integer type = null;
-		Integer vis = null;
-		String id = null;
-		String referee = null;
-		File root = null;
-		File location = null;
-		for(Iterator iter = fReferenceMap.entrySet().iterator(); iter.hasNext();) {
-			Map.Entry entry = (Map.Entry) iter.next();
-			id = (String) entry.getKey();
-			referee = id;
-			location = new File(parent, id);
-			if(!location.exists()) {
-				location.mkdir();
-			}
-			rmap = (HashMap) entry.getValue();
-			for(Iterator iter2 = rmap.entrySet().iterator(); iter2.hasNext();) {
-				Map.Entry entry2 = (Map.Entry) iter2.next();
-				id = (String) entry2.getKey();
-				root = new File(location, id);
-				if(!root.exists()) {
-					root.mkdir();
-				}
-				mmap = (HashMap) entry2.getValue();
-				for(Iterator iter4 = mmap.entrySet().iterator(); iter4.hasNext();) {
-					Map.Entry entry3 = (Map.Entry) iter4.next();
-					vis = (Integer) entry3.getKey();
-					location = new File(root, VisibilityModifiers.getVisibilityName(vis.intValue()));
-					if(!location.exists()) {
-						location.mkdir();
-					}
-					vismap = (HashMap) entry3.getValue();
-					for(Iterator iter3 = vismap.entrySet().iterator(); iter3.hasNext();) {
-						Map.Entry entry4 = (Map.Entry) iter3.next();
-						type = (Integer) entry4.getKey();
-						typemap = (HashMap) entry4.getValue();
-						writeGroup(id, referee, location, getRefTypeName(type.intValue()), typemap, vis.intValue());
-					}
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Writes out a group of references under the newly created element with the given name
-	 * @param origin the name of the bundle that has the references in it
-	 * @param referee the name of the bundle that is referenced
-	 * @param parent
-	 * @param name
-	 * @param map
-	 * @param visibility
-	 */
-	private void writeGroup(String origin, String referee, File parent, String name, HashMap map, int visibility) throws CoreException, FileNotFoundException, IOException {
-		if(parent.exists()) {
-			BufferedWriter writer = null;
-			try {
-				Document doc = null;
-				Element root = null;
-				int count = 0;
-				File out = new File(parent, name+".xml"); //$NON-NLS-1$
-				if(out.exists()) {
-					try {
-						FileInputStream inputStream = null;
-						try {
-							inputStream = new FileInputStream(out);
-							doc = this.parser.parse(inputStream);
-						} catch (IOException e) {
-							e.printStackTrace();
-						} finally {
-							if (inputStream != null) {
-								inputStream.close();
-							}
-						}
-						if (doc == null) {
-							return;
-						}
-						root = doc.getDocumentElement();
-						String value = root.getAttribute(IApiXmlConstants.ATTR_REFERENCE_COUNT);
-						count = Integer.parseInt(value);
-					}
-					catch(SAXException se) {
-						se.printStackTrace();
-					}
-				}
-				else {
-					doc = Util.newDocument();
-					root = doc.createElement(IApiXmlConstants.REFERENCES);
-					doc.appendChild(root);
-					root.setAttribute(IApiXmlConstants.ATTR_REFERENCE_VISIBILITY, Integer.toString(visibility));
-					root.setAttribute(IApiXmlConstants.ATTR_ORIGIN, origin);
-					root.setAttribute(IApiXmlConstants.ATTR_REFEREE, referee);
-					root.setAttribute(IApiXmlConstants.ATTR_NAME, getFormattedTypeName(name));
-				}
-				if(doc == null) {
-					return;
-				}
-				String tname = null;
-				HashSet refs = null;
-				Element telement = null;
-				for(Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
-					Map.Entry entry = (Map.Entry) iter.next();
-					tname = (String) entry.getKey();
-					telement = findTypeElement(root, tname);
-					if(telement == null) {
-						telement = doc.createElement(IApiXmlConstants.ATTR_NAME_TYPE_NAME);
-						telement.setAttribute(IApiXmlConstants.ATTR_NAME, tname);
-						root.appendChild(telement);
-					}
-					refs = (HashSet) entry.getValue();
-					if(refs != null) {
-						for(Iterator iter2 = refs.iterator(); iter2.hasNext();) {
-							count++;
-							writeReference(doc, telement, (IReference) iter2.next());
-						}
-					}
-				}
-				root.setAttribute(IApiXmlConstants.ATTR_REFERENCE_COUNT, Integer.toString(count));
-				writer = new BufferedWriter(new FileWriter(out));
-				writer.write(Util.serializeDocument(doc));
-				writer.flush();
-			}
-			finally {
-				if (writer != null) {
-					writer.close();
-				}
-			}
-		}
-	}
-	
-	/**
-	 * gets the root kind element
-	 * @param root
-	 * @param kind
-	 * @return
-	 */
-	private Element findTypeElement(Element root, String tname) {
-		if(tname == null) {
-			return null;
-		}
-		Element kelement = null;
-		NodeList nodes = root.getElementsByTagName(IApiXmlConstants.ATTR_NAME_TYPE_NAME);
-		for (int i = 0; i < nodes.getLength(); i++) {
-			kelement = (Element) nodes.item(i);
-			if(tname.equals(kelement.getAttribute(IApiXmlConstants.ATTR_NAME))) {
-				return kelement;
-			}
-		}
-		return null;
-	}
-	
-	/**
-	 * gets the root kind element
-	 * @param root
-	 * @param kind
-	 * @return
-	 */
-	private Element findKindElement(Element root, Integer kind) {
-		Element kelement = null;
-		NodeList nodes = root.getElementsByTagName(IApiXmlConstants.REFERENCE_KIND);
-		for (int i = 0; i < nodes.getLength(); i++) {
-			kelement = (Element) nodes.item(i);
-			if(kind.toString().equals(kelement.getAttribute(IApiXmlConstants.ATTR_KIND))) {
-				return kelement;
-			}
-		}
-		return null;
-	}
-	
-	/**
-	 * Writes the attributes from the given {@link IReference} into a new {@link Element} that is added to 
-	 * the given parent.
-	 * 
-	 * @param document
-	 * @param parent
-	 * @param reference
-	 */
-	private void writeReference(Document document, Element parent, IReference reference) throws CoreException {
-		Element kelement = null;
-		Integer kind = new Integer(reference.getReferenceKind());
-		kelement = findKindElement(parent, kind);
-		if(kelement == null) {
-			kelement = document.createElement(IApiXmlConstants.REFERENCE_KIND);
-			kelement.setAttribute(IApiXmlConstants.ATTR_REFERENCE_KIND_NAME, Reference.getReferenceText(kind.intValue()));
-			kelement.setAttribute(IApiXmlConstants.ATTR_KIND, kind.toString());
-			parent.appendChild(kelement);
-		}
-		Element relement = document.createElement(IApiXmlConstants.ATTR_REFERENCE);
-		IApiMember member = reference.getMember();
-		relement.setAttribute(IApiXmlConstants.ATTR_ORIGIN, getText(member));
-		member = reference.getResolvedReference();
-		if(member != null) {
-			relement.setAttribute(IApiXmlConstants.ATTR_REFEREE, getText(member));
-			relement.setAttribute(IApiXmlConstants.ATTR_LINE_NUMBER, Integer.toString(reference.getLineNumber()));
-			String sig = reference.getReferencedSignature();
-			if(sig != null) {
-				relement.setAttribute(IApiXmlConstants.ATTR_SIGNATURE, sig);
-			}
-			kelement.appendChild(relement);
-		}
-	}
-	
-	/**
-	 * Returns the text to set in the attribute for the given {@link IApiMember}
-	 * @param member
-	 * @return
-	 * @throws CoreException
-	 */
-	private String getText(IApiMember member) throws CoreException {
-		switch(member.getType()) {
-			case IApiElement.TYPE: return Signatures.getQualifiedTypeSignature((IApiType) member);
-			case IApiElement.METHOD: return Signatures.getQualifiedMethodSignature((IApiMethod) member);
-			case IApiElement.FIELD: return Signatures.getQualifiedFieldSignature((IApiField) member);
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter#reportNotSearched(org.eclipse.pde.api.tools.internal.provisional.model.IApiElement[])
-	 */
-	public void reportNotSearched(IApiElement[] elements) {
-		if(elements == null) {
-			return;
-		}
-		BufferedWriter writer = null;
-		try {
-			if(this.debug) {
-				System.out.println("Writing file for projects that were not searched..."); //$NON-NLS-1$
-			}
-			File rootfile = new File(fLocation);
-			if(!rootfile.exists()) {
-				rootfile.mkdirs();
-			}
-			File file = new File(rootfile, "not_searched.xml"); //$NON-NLS-1$
-			if(!file.exists()) {
-				file.createNewFile();
-			}
-			Document doc = Util.newDocument();
-			Element root = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENTS);
-			doc.appendChild(root);
-			Element comp = null;
-			SkippedComponent component = null;
-			for(int i = 0; i < elements.length; i++) {
-				component = (SkippedComponent)elements[i];
-				comp = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENT);
-				comp.setAttribute(IApiXmlConstants.ATTR_ID, component.getComponentId());
-				comp.setAttribute(IApiXmlConstants.NO_API_DESCRIPTION, Boolean.toString(component.hasNoApiDescription()));
-				comp.setAttribute(IApiXmlConstants.EXCLUDED, Boolean.toString(component.wasExcluded()));
-				comp.setAttribute(IApiXmlConstants.RESOLUTION_ERRORS, Boolean.toString(component.hasResolutionErrors()));
-				root.appendChild(comp);
-			}
-			writer = new BufferedWriter(new FileWriter(file));
-			writer.write(Util.serializeDocument(doc));
-			writer.flush();
-		}
-		catch(FileNotFoundException fnfe) {}
-		catch(IOException ioe) {}
-		catch(CoreException ce) {}
-		finally {
-			try {
-				writer.close();
-			} 
-			catch (IOException e) {}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlReferenceDescriptorWriter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlReferenceDescriptorWriter.java
new file mode 100644
index 0000000..1125a87
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlReferenceDescriptorWriter.java
@@ -0,0 +1,522 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.builder.Reference;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
+import org.eclipse.pde.api.tools.internal.util.Signatures;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Writes reference descriptions to XML files.
+ * 
+ * @since 1.0.1
+ */
+public class XmlReferenceDescriptorWriter {
+
+	/**
+	 * file names for the output reference files
+	 */
+	public static final String TYPE_REFERENCES = "type_references"; //$NON-NLS-1$
+	public static final String METHOD_REFERENCES = "method_references"; //$NON-NLS-1$
+	public static final String FIELD_REFERENCES = "field_references"; //$NON-NLS-1$
+	private static final Integer V_ILLEGAL = new Integer(VisibilityModifiers.ILLEGAL_API);
+	private String fLocation = null;
+	private HashMap fReferenceMap = null;
+	private DocumentBuilder parser = null;
+	
+	/**
+	 * Alternate API component where references were unresolved, or <code>null</code>
+	 * if not to be reported.
+	 */
+	private IComponentDescriptor alternate;
+	
+	/**
+	 * Constructor
+	 * 
+	 * @param location the absolute path in the local file system to the folder to write the reports to 
+	 * @param debug if debugging infos should be written out to the console
+	 */
+	public XmlReferenceDescriptorWriter(String location) {
+		fLocation = location;
+		try {
+			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
+		}
+		catch(FactoryConfigurationError fce) {
+			ApiPlugin.log(fce);
+		} 
+		catch (ParserConfigurationException pce) {
+			ApiPlugin.log(pce);
+		}
+	}
+
+	/**
+	 * Writes the given references to XML files.
+	 * 
+	 * @param references
+	 */
+	public void writeReferences(IReferenceDescriptor[] references) {
+		if(fLocation != null) {
+			try {
+				File parent = new File(fLocation);
+				if(!parent.exists()) {
+					parent.mkdirs();
+				}
+				collateResults(references);
+				writeXML(parent);
+			} 
+			catch (Exception e) {
+				ApiPlugin.log(e);
+			}
+			finally {
+				if(fReferenceMap != null) {
+					fReferenceMap.clear();
+					fReferenceMap = null;
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Collates the results into like reference kinds
+	 * @param references
+	 */
+	private void collateResults(IReferenceDescriptor[] references) throws CoreException {
+		if(fReferenceMap == null) {
+			fReferenceMap = new HashMap();
+		}
+		Integer type = null;
+		Integer visibility = null;
+		String id = null;
+		String tname = null;
+		HashMap rmap = null;
+		HashMap mmap = null;
+		HashMap vmap = null;
+		HashMap tmap = null;
+		HashSet reflist = null;
+		IComponentDescriptor rcomponent = null;
+		IComponentDescriptor mcomponent = null;
+		for (int i = 0; i < references.length; i++) {
+			rcomponent = references[i].getReferencedComponent(); 
+			id = getId(rcomponent);
+			rmap = (HashMap) fReferenceMap.get(id);
+			if(rmap == null) {
+				rmap = new HashMap();
+				fReferenceMap.put(id, rmap);
+			}
+			mcomponent = references[i].getComponent(); 
+			id = getId(mcomponent);
+			mmap = (HashMap) rmap.get(id);
+			if(mmap == null) {
+				mmap = new HashMap();
+				rmap.put(id, mmap);
+			}
+			if((references[i].getReferenceFlags() & IReference.F_ILLEGAL) > 0) {
+				visibility = V_ILLEGAL;
+			}
+			else {
+				visibility = new Integer(references[i].getVisibility());
+			}
+			vmap = (HashMap) mmap.get(visibility);
+			if(vmap == null) {
+				vmap = new HashMap();
+				mmap.put(visibility, vmap);
+			}
+			type = new Integer(references[i].getReferenceType());
+			tmap = (HashMap) vmap.get(type);
+			if(tmap == null) {
+				tmap = new HashMap();
+				vmap.put(type, tmap);
+			}
+			tname = getText(references[i].getReferencedMember());
+			reflist = (HashSet) tmap.get(tname);
+			if(reflist == null) {
+				reflist = new HashSet();
+				tmap.put(tname, reflist);
+			}
+			reflist.add(references[i]);
+		}
+	}
+	
+	/**
+	 * Resolves the id to use for the component in the mapping
+	 * @param component
+	 * @return the id to use for the component in the mapping, includes the version information as well
+	 * @throws CoreException
+	 */
+	String getId(IComponentDescriptor component) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(component.getId()).append(" ").append('(').append(component.getVersion()).append(')'); //$NON-NLS-1$
+		return buffer.toString();
+	}
+	
+	/**
+	 * Returns a formatted version of the references xml file name for use during conversion via the default
+	 * XSLT file
+	 * @param groupname
+	 * @return a formatted version of the references file name
+	 */
+	private String getFormattedTypeName(String groupname) {
+		if(TYPE_REFERENCES.equals(groupname)) {
+			return "Types"; //$NON-NLS-1$
+		}
+		if(METHOD_REFERENCES.equals(groupname)) {
+			return "Methods"; //$NON-NLS-1$
+		}
+		if(FIELD_REFERENCES.equals(groupname)) {
+			return "Fields"; //$NON-NLS-1$
+		}
+		return "unknown references"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Returns the name for the file of references base on the given type
+	 * @param type
+	 * @return
+	 */
+	private String getRefTypeName(int type) {
+		switch(type) {
+			case IReference.T_TYPE_REFERENCE: return TYPE_REFERENCES;
+			case IReference.T_METHOD_REFERENCE: return METHOD_REFERENCES;
+			case IReference.T_FIELD_REFERENCE: return FIELD_REFERENCES;
+		}
+		return "unknown_reference_kinds"; //$NON-NLS-1$
+	}
+	
+	/**
+	 * Writes out the XML for the given api element using the collated {@link IReference}s
+	 * @param parent
+	 * @throws CoreException
+	 * @throws FileNotFoundException
+	 * @throws IOException
+	 */
+	private void writeXML(File parent) throws CoreException, FileNotFoundException, IOException {
+		HashMap vismap = null;
+		HashMap typemap = null;
+		HashMap rmap = null;
+		HashMap mmap = null;
+		Integer type = null;
+		Integer vis = null;
+		String id = null;
+		String referee = null;
+		File root = null;
+		File location = null;
+		File base = null;
+		for(Iterator iter = fReferenceMap.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry = (Map.Entry) iter.next();
+			id = (String) entry.getKey();
+			referee = id;
+			base = new File(parent, id);
+			if(!base.exists()) {
+				base.mkdir();
+			}
+			rmap = (HashMap) entry.getValue();
+			for(Iterator iter2 = rmap.entrySet().iterator(); iter2.hasNext();) {
+				Map.Entry entry2 = (Map.Entry) iter2.next();
+				id = (String) entry2.getKey();
+				root = new File(base, id);
+				if(!root.exists()) {
+					root.mkdir();
+				}
+				mmap = (HashMap) entry2.getValue();
+				for(Iterator iter4 = mmap.entrySet().iterator(); iter4.hasNext();) {
+					Map.Entry entry3 = (Map.Entry) iter4.next();
+					vis = (Integer) entry3.getKey();
+					location = new File(root, VisibilityModifiers.getVisibilityName(vis.intValue()));
+					if(!location.exists()) {
+						location.mkdir();
+					}
+					vismap = (HashMap) entry3.getValue();
+					for(Iterator iter3 = vismap.entrySet().iterator(); iter3.hasNext();) {
+						Map.Entry entry4 = (Map.Entry) iter3.next();
+						type = (Integer) entry4.getKey();
+						typemap = (HashMap) entry4.getValue();
+						writeGroup(id, referee, location, getRefTypeName(type.intValue()), typemap, vis.intValue());
+					}
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Writes out a group of references under the newly created element with the given name
+	 * @param origin the name of the bundle that has the references in it
+	 * @param referee the name of the bundle that is referenced
+	 * @param parent
+	 * @param name
+	 * @param map
+	 * @param visibility
+	 */
+	private void writeGroup(String origin, String referee, File parent, String name, HashMap map, int visibility) throws CoreException, FileNotFoundException, IOException {
+		if(parent.exists()) {
+			BufferedWriter writer = null;
+			try {
+				Document doc = null;
+				Element root = null;
+				int count = 0;
+				File out = new File(parent, name+".xml"); //$NON-NLS-1$
+				if(out.exists()) {
+					try {
+						FileInputStream inputStream = null;
+						try {
+							inputStream = new FileInputStream(out);
+							doc = this.parser.parse(inputStream);
+						} catch (IOException e) {
+							e.printStackTrace();
+						} finally {
+							if (inputStream != null) {
+								inputStream.close();
+							}
+						}
+						if (doc == null) {
+							return;
+						}
+						root = doc.getDocumentElement();
+						String value = root.getAttribute(IApiXmlConstants.ATTR_REFERENCE_COUNT);
+						count = Integer.parseInt(value);
+					}
+					catch(SAXException se) {
+						se.printStackTrace();
+					}
+				}
+				else {
+					doc = Util.newDocument();
+					root = doc.createElement(IApiXmlConstants.REFERENCES);
+					doc.appendChild(root);
+					root.setAttribute(IApiXmlConstants.ATTR_REFERENCE_VISIBILITY, Integer.toString(visibility));
+					root.setAttribute(IApiXmlConstants.ATTR_ORIGIN, origin);
+					root.setAttribute(IApiXmlConstants.ATTR_REFEREE, referee);
+					root.setAttribute(IApiXmlConstants.ATTR_NAME, getFormattedTypeName(name));
+					if (alternate != null) {
+						root.setAttribute(IApiXmlConstants.ATTR_ALTERNATE, getId(alternate));
+					}
+				}
+				if(doc == null) {
+					return;
+				}
+				String tname = null;
+				HashSet refs = null;
+				Element telement = null;
+				for(Iterator iter = map.entrySet().iterator(); iter.hasNext();) {
+					Map.Entry entry = (Map.Entry) iter.next();
+					tname = (String) entry.getKey();
+					telement = findTypeElement(root, tname);
+					if(telement == null) {
+						telement = doc.createElement(IApiXmlConstants.ELEMENT_TARGET);
+						telement.setAttribute(IApiXmlConstants.ATTR_NAME, tname);
+						root.appendChild(telement);
+					}
+					refs = (HashSet) entry.getValue();
+					if(refs != null) {
+						for(Iterator iter2 = refs.iterator(); iter2.hasNext();) {
+							count++;
+							IReferenceDescriptor ref = (IReferenceDescriptor) iter2.next();
+							writeReference(doc, telement, ref);
+							if (!iter2.hasNext()) {
+								// set qualified referenced attributes
+								IMemberDescriptor resolved  = ref.getReferencedMember();
+								if (resolved != null) {
+									addMemberDetails(telement, resolved);
+								}
+							}
+						}
+					}
+				}
+				root.setAttribute(IApiXmlConstants.ATTR_REFERENCE_COUNT, Integer.toString(count));
+				writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out), IApiCoreConstants.UTF_8));
+				writer.write(Util.serializeDocument(doc));
+				writer.flush();
+			}
+			finally {
+				if (writer != null) {
+					writer.close();
+				}
+			}
+		}
+	}
+	
+	/**
+	 * Add member descriptor details to the given element.
+	 * 
+	 * @param element XML element
+	 * @param member member to add details for
+	 */
+	private void addMemberDetails(Element element, IMemberDescriptor member) {
+		switch (member.getElementType()) {
+		case IElementDescriptor.TYPE:
+			element.setAttribute(IApiXmlConstants.ATTR_TYPE, ((IReferenceTypeDescriptor)member).getQualifiedName());
+			break;
+		case IElementDescriptor.FIELD:
+			IReferenceTypeDescriptor encl = member.getEnclosingType();
+			element.setAttribute(IApiXmlConstants.ATTR_TYPE, encl.getQualifiedName());
+			element.setAttribute(IApiXmlConstants.ATTR_MEMBER_NAME, member.getName());
+			break;
+		case IElementDescriptor.METHOD:
+			encl = member.getEnclosingType();
+			element.setAttribute(IApiXmlConstants.ATTR_TYPE, encl.getQualifiedName());
+			element.setAttribute(IApiXmlConstants.ATTR_MEMBER_NAME, member.getName());
+			element.setAttribute(IApiXmlConstants.ATTR_SIGNATURE, ((IMethodDescriptor)member).getSignature());
+			break;
+		}
+	}
+	
+	/**
+	 * gets the root kind element
+	 * @param root
+	 * @param kind
+	 * @return
+	 */
+	private Element findTypeElement(Element root, String tname) {
+		if(tname == null) {
+			return null;
+		}
+		Element kelement = null;
+		NodeList nodes = root.getElementsByTagName(IApiXmlConstants.ELEMENT_TARGET);
+		for (int i = 0; i < nodes.getLength(); i++) {
+			kelement = (Element) nodes.item(i);
+			if(tname.equals(kelement.getAttribute(IApiXmlConstants.ATTR_NAME))) {
+				return kelement;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * gets the root kind element
+	 * @param root
+	 * @param kind
+	 * @return
+	 */
+	private Element findKindElement(Element root, Integer kind) {
+		Element kelement = null;
+		NodeList nodes = root.getElementsByTagName(IApiXmlConstants.REFERENCE_KIND);
+		for (int i = 0; i < nodes.getLength(); i++) {
+			kelement = (Element) nodes.item(i);
+			if(kind.toString().equals(kelement.getAttribute(IApiXmlConstants.ATTR_KIND))) {
+				return kelement;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Writes the attributes from the given {@link IReference} into a new {@link Element} that is added to 
+	 * the given parent.
+	 * 
+	 * @param document
+	 * @param parent
+	 * @param reference
+	 */
+	private void writeReference(Document document, Element parent, IReferenceDescriptor reference) throws CoreException {
+		Element kelement = null;
+		Integer kind = new Integer(reference.getReferenceKind());
+		kelement = findKindElement(parent, kind);
+		if(kelement == null) {
+			kelement = document.createElement(IApiXmlConstants.REFERENCE_KIND);
+			kelement.setAttribute(IApiXmlConstants.ATTR_REFERENCE_KIND_NAME, Reference.getReferenceText(kind.intValue()));
+			kelement.setAttribute(IApiXmlConstants.ATTR_KIND, kind.toString());
+			kelement.setAttribute(IApiXmlConstants.ATTR_FLAGS, Integer.toString(reference.getReferenceFlags()));
+			parent.appendChild(kelement);
+		}
+		Element relement = document.createElement(IApiXmlConstants.ATTR_REFERENCE);
+		IMemberDescriptor member = reference.getMember();
+		relement.setAttribute(IApiXmlConstants.ATTR_ORIGIN, getText(member));
+		String[] messages = reference.getProblemMessages();
+		if(messages != null) {
+			relement.setAttribute(IApiXmlConstants.ELEMENT_PROBLEM_MESSAGE_ARGUMENTS, getText(messages));
+		}
+		// add detailed information about origin
+		addMemberDetails(relement, member);
+		member = reference.getReferencedMember();
+		if(member != null) {
+			relement.setAttribute(IApiXmlConstants.ATTR_LINE_NUMBER, Integer.toString(reference.getLineNumber()));
+			kelement.appendChild(relement);
+		}
+	}
+	
+	/**
+	 * Gets the {@link String} value of the given array by calling {@link #toString()} on each of the elements
+	 * in the array.
+	 * 
+	 * @param array the array to convert to a string
+	 * @return the {@link String} or an empty {@link String} never <code>null</code>
+	 * @since 1.1
+	 */
+	String getText(Object[] array) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < array.length; i++) {
+			buffer.append(array[i].toString());
+			if(i < array.length-1) {
+				buffer.append(","); //$NON-NLS-1$
+			}
+		}
+		return buffer.toString();
+	}
+	
+	/**
+	 * Returns the text to set in the attribute for the given {@link IApiMember}
+	 * @param member
+	 * @return
+	 * @throws CoreException
+	 */
+	private String getText(IMemberDescriptor member) throws CoreException {
+		switch(member.getElementType()) {
+			case IElementDescriptor.TYPE: return Signatures.getQualifiedTypeSignature((IReferenceTypeDescriptor) member);
+			case IElementDescriptor.METHOD: return Signatures.getQualifiedMethodSignature((IMethodDescriptor) member);
+			case IElementDescriptor.FIELD: return Signatures.getQualifiedFieldSignature((IFieldDescriptor) member);
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the alternate component where references were unresolved, or <code>null</code>
+	 * if none.
+	 * 
+	 * @param other component descriptor or <code>null</code>
+	 */
+	public void setAlternate(IComponentDescriptor other) {
+		alternate = other;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlSearchReporter.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlSearchReporter.java
new file mode 100644
index 0000000..321b5fe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/XmlSearchReporter.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.search;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.builder.Reference;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.builder.IReference;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
+import org.eclipse.pde.api.tools.internal.provisional.search.IMetadata;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Search reporter that outputs results to an XML file
+ * 
+ * @since 1.0.1
+ */
+public class XmlSearchReporter implements IApiSearchReporter {
+	
+	private String fLocation = null;
+	private DocumentBuilder parser = null;
+	private boolean debug = false; 
+	
+	/**
+	 * Constructor
+	 * 
+	 * @param location the absolute path in the local file system to the folder to write the reports to 
+	 * @param debug if debugging infos should be written out to the console
+	 */
+	public XmlSearchReporter(String location, boolean debug) {
+		fLocation = location;
+		this.debug = debug;
+		try {
+			parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			parser.setErrorHandler(new DefaultHandler());
+		}
+		catch(FactoryConfigurationError fce) {
+			ApiPlugin.log(fce);
+		} 
+		catch (ParserConfigurationException pce) {
+			ApiPlugin.log(pce);
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter#reportResults(org.eclipse.pde.api.tools.internal.provisional.builder.IReference[])
+	 */
+	public void reportResults(IApiElement element, final IReference[] references) {
+		if(fLocation != null) {
+			XmlReferenceDescriptorWriter writer = new XmlReferenceDescriptorWriter(fLocation);
+			List descriptors = new ArrayList(references.length + 1);
+			for (int i = 0; i < references.length; i++) {
+				Reference reference = (Reference) references[i];
+				try {
+					descriptors.add(reference.getReferenceDescriptor());
+				} catch (CoreException e) {
+					ApiPlugin.log(e.getStatus());
+				}
+			}
+			writer.writeReferences((IReferenceDescriptor[]) descriptors.toArray(new IReferenceDescriptor[descriptors.size()]));
+		}
+	}
+		
+	/**
+	 * Resolves the id to use for the component in the mapping
+	 * @param component
+	 * @return the id to use for the component in the mapping, includes the version information as well
+	 * @throws CoreException
+	 */
+	String getId(IApiComponent component) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(component.getSymbolicName()).append(" ").append('(').append(component.getVersion()).append(')'); //$NON-NLS-1$
+		return buffer.toString();
+	}
+
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter#reportNotSearched(org.eclipse.pde.api.tools.internal.provisional.model.IApiElement[])
+	 */
+	public void reportNotSearched(IApiElement[] elements) {
+		if(elements == null) {
+			return;
+		}
+		BufferedWriter writer = null;
+		try {
+			if(this.debug) {
+				System.out.println("Writing file for projects that were not searched..."); //$NON-NLS-1$
+			}
+			File rootfile = new File(fLocation);
+			if(!rootfile.exists()) {
+				rootfile.mkdirs();
+			}
+			File file = new File(rootfile, "not_searched.xml"); //$NON-NLS-1$
+			if(!file.exists()) {
+				file.createNewFile();
+			}
+			Document doc = Util.newDocument();
+			Element root = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENTS);
+			doc.appendChild(root);
+			Element comp = null;
+			SkippedComponent component = null;
+			for(int i = 0; i < elements.length; i++) {
+				component = (SkippedComponent)elements[i];
+				comp = doc.createElement(IApiXmlConstants.ELEMENT_COMPONENT);
+				comp.setAttribute(IApiXmlConstants.ATTR_ID, component.getComponentId());
+				comp.setAttribute(IApiXmlConstants.ATTR_VERSION, component.getVersion());
+				comp.setAttribute(IApiXmlConstants.SKIPPED_DETAILS, component.getErrorDetails());
+				root.appendChild(comp);
+			}
+			writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), IApiCoreConstants.UTF_8));
+			writer.write(Util.serializeDocument(doc));
+			writer.flush();
+		}
+		catch(FileNotFoundException fnfe) {}
+		catch(IOException ioe) {}
+		catch(CoreException ce) {}
+		finally {
+			if(writer != null) {
+				try {
+					writer.close();
+				} catch (IOException e) {}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter#reportMetadata(org.eclipse.pde.api.tools.internal.provisional.search.IMetadata)
+	 */
+	public void reportMetadata(IMetadata data) {
+		if(data == null) {
+			return;
+		}
+		try {
+			if(this.debug) {
+				System.out.println("Writing file for projects that were not searched..."); //$NON-NLS-1$
+			}
+			File rootfile = new File(fLocation);
+			if(!rootfile.exists()) {
+				rootfile.mkdirs();
+			}
+			File file = new File(rootfile, "meta.xml"); //$NON-NLS-1$
+			if(!file.exists()) {
+				file.createNewFile();
+			}
+			data.serializeToFile(file);
+		}
+		catch(FileNotFoundException fnfe) {
+			ApiPlugin.log(fnfe);
+		}
+		catch(IOException ioe) {
+			ApiPlugin.log(ioe);
+		}
+		catch (CoreException ce) {
+			ApiPlugin.log(ce);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/searchmessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/searchmessages.properties
index 0652ba5..540818a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/searchmessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/searchmessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,183 +11,111 @@
 
 ApiSearchEngine_anonymous_type=anonymous type
 ApiSearchEngine_api=API
-ApiSearchEngine_api_internal=API and internal
+ApiSearchEngine_api_and_illegal=API and illegal
+ApiSearchEngine_api_and_internal=API and internal
+ApiSearchEngine_api_internal=API, internal and illegal
 ApiSearchEngine_extracting_refs_from=Extracting references from {0}...
+ApiSearchEngine_illegal=illegal
 ApiSearchEngine_internal=internal
+ApiSearchEngine_internal_and_illegal=internal and illegal
 ApiSearchEngine_searching_for_use_from=Searching for {0} use from {1}...
 ApiSearchEngine_searching_project=Searching project ''{0}'' for {1} use
 ApiSearchEngine_searching_projects=Searching projects for {0} use...
-ApiUseReportConverter_back_to_bundle_index=<p><a href="{0}">Back to bundle index</a></p>\n
-ApiUseReportConverter_bundle_list_header=\
-<\!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
-\  <html>\n\
-\    <head>\n\
-\      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
-\      <title>Bundles {0}</title>\n\
-\    </head>\n\
-\    <body>\n\
-\      <h3>List of bundles {0}</h3>\n\
-\      <p></p>\n\
-
-ApiUseReportConverter_bundle_list_table_header=\
-\  <table border="1" width="70%">\n\
-\    <tr>\n\
-\      <td bgcolor="\#CC9933"><b>Bundle</b></td>\n\
-\      <td bgcolor="\#CC9933" align="center"><b>No API Description</b></td>\n\
-\      <td bgcolor="\#CC9933" align="center"><b>In Exclude List</b></td>\n\
-\      <td bgcolor="\#CC9933" align="center"><b>Has Resolution Errors</b></td>\n\
-\    </tr>\n
-
-#{0} = referee name
-ApiUseReportConverter_referee_index_header=\
-<\!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
-<html>\n\
-<head>\n\
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
-<title>Bundles Using {0}</title>\n\
-</head>\n\
-\  <body>\n\
-\  <h3>List of bundles using {0}</h3>\n\
-\  <p>Terminology</p>\n\
-\  <ol>\n\
-\    <li>API References - are references that are only made to public API of a bundle</li>\n\
-\    <li>Internal References - are references that are only made to internal non-API of a bundle</li>\n\
-\    <li>Internal-Permissible References - are references that are only made to internal non-API of a bundle, but are allowed via the <code>x-friends</code> directive</li>\n\
-\    <li>Fragment-Permissible References - are references that are made to internal non-API of a host bundle by a fragment</li>\n\
-\    <li>Other References - are references that have been detected but could not be resolved</li>\n\
-\  </ol>\n\
-\  <table border="1" width="70%">\n\
-\  <tr>\n\
-\    <td bgcolor="\#CC9933" width="38%"><b>Bundle</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>API References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Internal References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Internal-Permissible References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Fragment-Permissible References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Other References</b></td>\n\
-\  </tr>\n
-
-#{0} = link to origin file
-#{1} = origin name
-#{2} = API reference count
-#{3} = Internal reference count
-#{4} = Internal-Permissible reference count
-#{5} = Other reference count	
-ApiUseReportConverter_referee_index_entry=\
-<tr>\n\
-\  <td><a href="{0}">{1}</a></td>\n\
-\  <td align="center">{2}</td>\n\
-\  <td align="center">{3}</td>\n\
-\  <td align="center">{4}</td>\n\
-\  <td align="center">{5}</td>\n\
-\  <td align="center">{6}</td>\n\
-\ </tr>\n
-
-#{0} = visibility
-#{1} = type counts
-#{2} = method counts
-#{3} = field counts
-ApiUseReportConverter_origin_summary_table_entry=\
-<tr>\n\
-\  <td align="left">{0}</td>\n\
-\  <td align="center">{1}</td>\n\
-\  <td align="center">{2}</td>\n\
-\  <td align="center">{3}</td>\n\
-</tr>\n
-
-#{0} = origin name
-#{1} = total reference count
-#{2} = referee name
-ApiUseReportConverter_origin_summary_header=\
-<h3>Summary</h3>\n\
-<p>{0} has {1} total references to {2}</p>\n\
-<h3>Reference Details</h3>\n\
-<table width="50%" border="1">\n
-
-ApiUseReportConverter_search_html_index_file_header=\
-<\!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
-<html>\n\
-<head>\n\
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
-<title>Bundle usage information</title>\n\
-</head>\n\
-\  <body>\n\
-\  <h3>Additional Bundle Information</h3>\n\
-\  <p>Bundles that were <a href="./not_searched.html">not searched</a></p>\n\
-\  <h3>List of bundles with usage information</h3>\n\
-\  <p>Terminology\n\
-\  <ol>\n\
-\    <li>API References - are references that are only made to public API of a bundle</li>\n\
-\    <li>Internal References - are references that are only made to internal non-API of a bundle</li>\n\
-\    <li>Internal-Permissible References - are references that are only made to internal non-API of a bundle, but are allowed via the <code>x-friends</code> directive</li>\n\
-\    <li>Fragment-Permissible References - are references that are made to internal non-API of a host bundle by a fragment</li>\n\
-\    <li>Other References - are references that have been detected but could not be resolved</li>\n\
-\  </ol>\n\
-\  </p>\n\
-\  <p>\n\
-\  References to or from an in-lined Java element will not be reported.\n\
-\  </p>\n\
-\  <table border="1" width="70%">\n\
-\  <tr>\n\
-\     <td bgcolor="\#CC9933" width="38%"><b>Bundle</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>API References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Internal References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Internal-Permissible References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Fragment-Permissible References</b></td>\n\
-\    <td bgcolor="\#CC9933" align="center" width="8%"><b>Other References</b></td>\n\
-\  </tr>\n
-
-#{0} = visibility
-#{1} = type counts
-#{2} = method counts
-#{3} = field counts
-ApiUseReportConverter_origin_summary_table_entry_bold=\
-<tr>\n\
-\  <td bgcolor="\#CC9933" align="left"><b>{0}</b></td>\n\
-\  <td bgcolor="\#CC9933" align="center"><b>{1}</b></td>\n\
-\  <td bgcolor="\#CC9933" align="center"><b>{2}</b></td>\n\
-\  <td bgcolor="\#CC9933" align="center"><b>{3}</b></td>\n\
-</tr>\n
-
-#{0} = origin name
-ApiUseReportConverter_origin_html_header=\
-<\!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
-<html>\n\
-<head>\n\
-\  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
-\  <title>Usage Information for {0} using {1}</title>\n\
-</head>\n\
-<body>\n\
-<h3>Usage information for {0} using {1}</h3>\n
-
-ApiUseReportConverter_origin_summary_count_link=<a href="{0}">{1}</a>
-could_not_create_sax_parser=Could not create a sax parser
+could_not_create_sax_parser=Could not create a SAX parser
 could_not_create_file=Could not create file {0}
 missing_xml_files_location=The directory that contains xml reports must be specified
 invalid_directory_name=''{0}'' is not a valid directory name
-ApiUseReportConverter_xslt_file_not_valid=The XSLT file location is not valid.
-ApiUseReportConverter_visibility=Visibility
-ApiUseReportConverter_type=Type
-ApiUseReportConverter_method=Method
-ApiUseReportConverter_field=Field
-ApiUseReportConverter_fragment_permissible=Fragment-Permissible
-ApiUseReportConverter_internal=Internal
-ApiUseReportConverter_internal_permissable=Internal-Permissible
-ApiUseReportConverter_api=API
-ApiUseReportConverter_other=Other
-ApiUseReportConverter_collecting_dir_info=Collecting directory information...
-ApiUseReportConverter_coreexception_writing_html_file=CoreException writing html file: {0}
-ApiUseReportConverter_no_bundles=No bundles were skipped during the search.
-ApiUseReportConverter_not_searched_component_list=\ \ <tr>\n    <td>{0}</td>\n    <td align="center">{1}</td>\n    <td align="center">{2}</td>\n    <td align="center">{3}</td>\n  </tr>\n
-ApiUseReportConverter_table_end=</table>\n
-ApiUseReportConverter_that_were_not_searched=that were not searched
-ApiUseReportConverter_no_xstl_specified=No XSLT file was specified.
-ApiUseReportConverter_preparing_html_root=Preparing HTML root...
-ApiUseReportConverter_preparing_report_info_for=Preparing report information for {0}
-ApiUseReportConverter_preparing_report_metadata=Preparing Report Metadata...
-ApiUseReportConverter_preparing_xml_root=Preparing XML root...
-ApiUseReportConverter_preparing_xslt_file=Preparing XSLT file...
-ApiUseReportConverter_writing_group_reports_for=Writing group reports for {0}...
-ApiUseReportConverter_writing_not_searched=Writing report for bundles not searched...
-ApiUseReportConverter_writing_root_index=Writing root index file for the reports...
+UseReportConverter_xslt_file_not_valid=The XSLT file location is not valid.
 ioexception_writing_html_file=An IOException occurred while writing html for: {0} 
-W3C_page_footer=<p>\n<a href="http://validator.w3.org/check?uri=referer">\n  <img src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01 Transitional" height="31" width="88">\n</a>\n</p>\n</body>\n</html>\n
+MigrationReportConvertor_bundle_migration_information=Bundle Migration Information
+MigrationReportConvertor_bundles_have_references=The following bundles have references to them that could not be re-resolved in the given candidate.
+MigrationReportConvertor_click_table_entry=Click an entry in the table below to reveal the details of the un-resolved references made to that element.
+MigrationReportConvertor_member_has_unresolved_refs={0} has {1} total un-resolved references to {2} different members.
+MigrationReportConvertor_migration_details=Migration Details
+MigrationReportConvertor_no_reported_migration_problems=No bundles have any reported migration problems.
+MigrationReportConvertor_table_shows_unresolved=The following table shows the complete listing of types that have un-resolvable references to them.
+MigrationReportConvertor_type_migration_information={0} migration information
+MigrationReportConvertor_type_with_unresolved_refs=Types in {0} with un-resolved references
+ReferenceLookupVisitor_0=A corresponding bundle does not exist in the migration candidate.
+
+SkippedComponent_component_was_excluded=This component was excluded from the search by the search parameters.
+UseReportConverter_scan_date=Date of the Scan:
+UseReportConverter_scan_details=Scan Details
+UseReportConverter_scope_pattern=Scope Pattern:
+UseReportConverter_se_error_parser_handle=SAXException trying to get handle to the default parser.
+UseReportConverter_collecting_dir_info=Collecting directory information...
+UseReportConverter_core_exep_reading_metadata=CoreException parsing XML file: {0}
+UseReportConverter_coreexception_writing_html_file=CoreException writing html file: {0}
+UseReportConverter_te_applying_xslt_skipped=Transformer exception applying XSLT to: not_searched.xml
+UseReportConverter_no_additional_scan_info=No additional scan information is available.
+UseReportConverter_no_xstl_specified=No XSLT file was specified.
+UseReportConverter_pce_error_getting_parser=ParserConfigurationException trying to get handle to the default parser.
+UseReportConverter_preparing_html_root=Preparing HTML root...
+UseReportConverter_preparing_report_metadata=Preparing Report Metadata...
+UseReportConverter_preparing_xml_root=Preparing XML root...
+UseReportConverter_preparing_xslt_file=Preparing XSLT file...
+UseReportConverter_writing_not_searched=Writing report for bundles not searched...
+UseReportConverter_writing_root_index=Writing root index file for the reports...
+UseReportConverter___has_total_refs={0} has {1} total references to {2} different members.
+UseReportConverter_api_pattern=API Patterns:
+UseReportConverter_api_ref_description=API references are references that are only made to public API of a bundle
+UseReportConverter_api_references=API
+UseReportConverter_archive_patterns=Archive Patterns:
+UseReportConverter_back_to_bundle_index=Back to bundle index
+UseReportConverter_back_to_not_searched=Back to not-searched bundle index
+UseReportConverter_baseline_loc=Baseline Location:
+UseReportConverter_bundle=Bundle
+UseReportConverter_bundle_usage_information=Bundle usage information
+UseReportConverter_bundles_that_were_not_searched=Bundles that were {0}not searched{1}
+UseReportConverter_click_an_entry_to_see_details=Click an entry in the table below to reveal the details of the references made to that element. You can hover over an element to see its qualified signature information and hover over the visibility to see details.
+UseReportConverter_description=Description:
+UseReportConverter_filter_pattern=From Filter Patterns:
+UseReportConverter_filter_pattern_not_valid=The filter pattern: {0} is not a valid regular expression
+UseReportConverter_following_bundles_have_refs=The following bundles have references to {0}
+UseReportConverter_fragment_permissible_references=Fragment-Permissible
+UseReportConverter_fragment_ref_description=Fragment-Permissible references are references that are made to internal non-API of a host bundle by a fragment
+UseReportConverter_illegal=Illegal
+UseReportConverter_illegal_ref_description=Illegal references are ones made to API that has restrictions
+UseReportConverter_includes_API_refs=Includes API References:
+UseReportConverter_includes_illegal_use=Includes Illegal Use:
+UseReportConverter_includes_internal_refs=Includes Internal References:
+UseReportConverter_inlined_description=References to or from an in-lined Java element will not be reported.
+UseReportConverter_internal_patterns=Internal Patterns:
+UseReportConverter_internal_permissible_references=Internal-Permissible
+UseReportConverter_internal_ref_description=Internal references are references that are only made to internal non-API of a bundle
+UseReportConverter_internal_references=Internal
+UseReportConverter_line_number=Line Number
+UseReportConverter_list_of_all_refing_bundles=The list of all referencing bundles is available {0}here{1}.
+UseReportConverter_marks_illegal_use_references=Marks illegal use references
+UseReportConverter_marks_internal_references=Marks internal references
+UseReportConverter_member=Member
+UseReportConverter_missing_bundles_prevented_scan=There were missing bundles that affected the scan results. Check {0}here{1} for the details.
+UseReportConverter_missing_required=Missing Required Bundles
+UseReportConverter_no_reported_usage=No bundles have any reported usage.
+UseReportConverter_no_required_missing=No required bundles are missing.
+UseReportConverter_none=None
+UseReportConverter_parsing_use_scan=Parsing use scan...
+UseReportConverter_permissible_ref_description=Internal-Permissible references are references that are only made to internal non-API of a bundle, but are allowed via the x-friends directive
+UseReportConverter_reference_count=Reference Count
+UseReportConverter_reference_details=Reference Details
+UseReportConverter_reference_kind=Visibility
+UseReportConverter_reference_location=Reference Location
+UseReportConverter_reference_pattern=Reference Pattern:
+UseReportConverter_referenced_type=Referenced Type
+UseReportConverter_references=References
+UseReportConverter_referencing_bundles=Referencing Bundles
+UseReportConverter_report_location=Report Location:
+UseReportConverter_reported_missing_bundles=Required bundles that have been reported as missing.
+UseReportConverter_required_bundles=Required Bundles
+UseReportConverter_root_index_description=The root index page for the entire API use scan
+UseReportConverter_summary=Summary
+UseReportConverter_terminology=Terminology
+UseReportConverter_to_filter_patterns=To Filter Patterns:
+UseReportConverter_types_used_in=Types used in {0}
+UseReportConverter_usage_details={0} usage details
+UseReportConverter_use_scan_info=Use Scan Information
+UseReportConverter_version=Version
+UseReportConverter_version_column_description=The version or version range of the bundle
+UseReportConvertor_additional_infos_section=Additional Bundle Information
+UseScanParser_analyzing_references=Creating HTML report for: {0}
+UseScanParser_parsing=Parsing API use scan
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/ExcludedElements.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/ExcludedElements.java
new file mode 100644
index 0000000..9964f15
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/ExcludedElements.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+public class ExcludedElements {
+
+	private Set exactMatches;
+	private Set partialMatches;
+
+	public Set getExactMatches() {
+		if (this.exactMatches == null) {
+			return Collections.EMPTY_SET;
+		}
+		return this.exactMatches;
+	}
+
+	public Set getPartialMatches() {
+		if (this.partialMatches == null) {
+			return Collections.EMPTY_SET;
+		}
+		return this.partialMatches;
+	}
+
+	public boolean containsPartialMatch(String componentId) {
+		if (this.partialMatches == null) return false;
+		if (this.partialMatches.contains(componentId)) {
+			return true;
+		}
+		for (Iterator iterator = this.partialMatches.iterator(); iterator.hasNext(); ) {
+			String partialMatch = (String) iterator.next();
+			if (componentId.startsWith(partialMatch)) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean containsExactMatch(String key) {
+		if (this.exactMatches == null) return false;
+		return this.exactMatches.contains(key);
+	}
+
+	public void addPartialMatch(String componentid) {
+		if (this.partialMatches == null) {
+			this.partialMatches = new HashSet();
+		}
+		this.partialMatches.add(componentid);
+	}
+
+	public void addExactMatch(String match) {
+		if (this.exactMatches == null) {
+			this.exactMatches = new HashSet();
+		}
+		this.exactMatches.add(match);
+	}
+	
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+		printSet(buffer, this.exactMatches, "exact matches"); //$NON-NLS-1$
+		printSet(buffer, this.partialMatches, "partial matches"); //$NON-NLS-1$
+		return String.valueOf(buffer);
+	}
+	
+	private void printSet(StringBuffer buffer, Set set, String title) {
+		final String lineSeparator = System.getProperty("line.separator"); //$NON-NLS-1$
+		buffer
+			.append(title)
+			.append(lineSeparator)
+			.append("================================================================") //$NON-NLS-1$
+			.append(lineSeparator);
+		if (set != null) {
+			final int max = set.size();
+			String[] allEntries = new String[max];
+			set.toArray(allEntries);
+			Arrays.sort(allEntries);
+			for (int i = 0; i < max; i++) {
+				buffer.append(allEntries[i]).append(lineSeparator);
+			}
+			buffer.append(lineSeparator);
+		}
+		buffer
+			.append("================================================================") //$NON-NLS-1$
+			.append(lineSeparator);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FileManager.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FileManager.java
new file mode 100644
index 0000000..4696537
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/FileManager.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.util;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * Manager to handle temp files that have been created. Used as a fall-back to
+ * ensure we clean up after ourselves
+ * 
+ * @since 1.0.1
+ */
+public final class FileManager {
+
+	private static FileManager fInstance = null;
+	
+	/**
+	 * The set of recorded file paths
+	 */
+	private static HashSet fFilePaths = null;
+	
+	/**
+	 * Constructor
+	 * private - no instantiation
+	 */
+	private FileManager() {}
+	
+	/**
+	 * Returns the singleton instance of the manager
+	 * @return the manager instance
+	 */
+	public synchronized static FileManager getManager() {
+		if(fInstance == null) {
+			fInstance = new FileManager();
+		}
+		return fInstance;
+	}
+	
+	/**
+	 * Records a file root path to be deleted on the next call to 
+	 * {@link #deleteFiles()}.
+	 * @param absolutepath the absolute path in the local file system of the file to delete
+	 */
+	public void recordTempFileRoot(String absolutepath) {
+		if(absolutepath != null) {
+			if(fFilePaths == null) {
+				fFilePaths = new HashSet(10);
+			}
+			synchronized (fFilePaths) {
+				fFilePaths.add(absolutepath);
+			}
+		}
+	}
+	
+	/**
+	 * Deletes all of the recorded file roots from the local filesystem (if still existing)
+	 * and returns the success of the entire delete operation.
+	 * @return true if all recorded files were deleted, false otherwise
+	 */
+	public boolean deleteFiles() {
+		boolean success = true;
+		if(fFilePaths != null) {
+			synchronized (fFilePaths) {
+				try {
+					File file = null;
+					for(Iterator iter = fFilePaths.iterator(); iter.hasNext();) {
+						file = new File((String) iter.next());
+						success &= Util.delete(file);
+					}
+				}
+				finally {
+					fFilePaths.clear();	
+				}
+			}
+		}
+		return success;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
index e1a0494..01260a5 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Signatures.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,9 @@ import org.eclipse.jdt.core.dom.QualifiedType;
 import org.eclipse.jdt.core.dom.SimpleType;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
+import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiField;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiMethod;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
@@ -121,6 +124,71 @@ public final class Signatures {
 	}
 	
 	/**
+	 * Returns the signature of the method qualified with the given type
+	 * @param method
+	 * @return the given type qualified signature of the given method
+	 * @throws CoreException if a lookup to the parent type of the given method fails
+	 */
+	public static String getQualifiedMethodSignature(IMethodDescriptor method) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		IReferenceTypeDescriptor type = method.getEnclosingType();
+		if(type != null) {
+			buffer.append(getQualifiedTypeSignature(type)).append('.');
+		}
+		String methodsig = method.getSignature();
+		String methodname = getMethodName(method);
+		buffer.append(Signature.toString(dequalifySignature(methodsig), methodname, null, false, false));
+		return buffer.toString();
+	}	
+	
+	/**
+	 * Returns the signature of the method qualified with the given type with the type names qualified (if specified)
+	 * and the return type appended, in the format of a content assist proposal.<br><br>
+	 * For example:
+	 * <code>x.y.z.Clazz.mymethod() : Object</code>
+	 * @param method the descriptor to get a formatted signature for
+	 * @param qualifiedparams
+	 * @param includereturn if the return type should be returned
+	 * @return the given type qualified signature of the given method
+	 * @throws CoreException if a lookup to the parent type of the given method fails
+	 */
+	public static String getQualifiedMethodSignature(IMethodDescriptor method, boolean qualifiedparams, boolean includereturn) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		IReferenceTypeDescriptor type = method.getEnclosingType();
+		if(type != null) {
+			buffer.append(getQualifiedTypeSignature(type)).append('.');
+		}
+		String methodsig = method.getSignature();
+		String methodname = getMethodName(method);
+		buffer.append(Signature.toString(methodsig, methodname, null, qualifiedparams, false).replace('/', '.'));
+		if(includereturn) {
+			buffer.append(" : "); //$NON-NLS-1$
+			buffer.append(Signature.toString(Signature.getReturnType(methodsig)).replace('/', '.'));
+		}
+		return buffer.toString();
+	}	
+	
+	/**
+	 * Returns the de-qualified method signature
+	 * @param method
+	 * @param includereturn
+	 * @return the de-qualified method signature
+	 * @throws CoreException
+	 */
+	public static String getMethodSignature(IMethodDescriptor method, boolean includereturn) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		String methodsig = method.getSignature();
+		String methodname = getMethodName(method);
+		String dqsig = dequalifySignature(methodsig);
+		buffer.append(Signature.toString(dqsig, methodname, null, false, false));
+		if(includereturn) {
+			buffer.append(" : "); //$NON-NLS-1$
+			buffer.append(Signature.toString(Signature.getReturnType(dqsig)).replace('/', '.'));
+		}
+		return buffer.toString();
+	}
+	
+	/**
 	 * Returns the name to use for the method. If the method is a constructor,
 	 * the enclosing type is loaded to get its simple name
 	 * @param method
@@ -140,6 +208,25 @@ public final class Signatures {
 	}
 	
 	/**
+	 * Returns the name to use for the method. If the method is a constructor,
+	 * the enclosing type is loaded to get its simple name
+	 * @param method
+	 * @return the name for the method. If the method is a constructor the simple name
+	 * of the enclosing type is substituted.
+	 * @throws CoreException
+	 */
+	public static String getMethodName(IMethodDescriptor method) throws CoreException {
+		String mname = method.getName();
+		if("<init>".equals(method.getName())) { //$NON-NLS-1$
+			IReferenceTypeDescriptor type = method.getEnclosingType();
+			if(type != null) {
+				return type.getName();
+			}
+		}
+		return mname;
+	}	
+	
+	/**
 	 * Returns the unqualified signature of the given {@link IApiField}
 	 * 
 	 * @param field
@@ -165,6 +252,21 @@ public final class Signatures {
 	}
 	
 	/**
+	 * Returns the type-qualified field signature
+	 * @param field
+	 * @return the type-qualified field signature
+	 */
+	public static String getQualifiedFieldSignature(IFieldDescriptor field) throws CoreException {
+		StringBuffer buffer = new StringBuffer();
+		IReferenceTypeDescriptor type = field.getEnclosingType();
+		if(type != null) {
+			buffer.append(getQualifiedTypeSignature(type)).append('.');
+		}
+		buffer.append(field.getName());
+		return buffer.toString();
+	}	
+	
+	/**
 	 * Returns the type signature to use for displaying the given {@link IApiType}
 	 * @param type
 	 * @return the display signature to use for the given {@link IApiType}
@@ -172,6 +274,15 @@ public final class Signatures {
 	public static String getQualifiedTypeSignature(IApiType type) {
 		return getTypeSignature(type.getSignature(), type.getGenericSignature(), true);
 	}
+	
+	/**
+	 * Returns the type signature to use for displaying the given {@link IReferenceTypeDescriptor}
+	 * @param type
+	 * @return the display signature to use for the given {@link IReferenceTypeDescriptor}
+	 */
+	public static String getQualifiedTypeSignature(IReferenceTypeDescriptor type) {
+		return getTypeSignature(type.getSignature(), type.getGenericSignature(), true);
+	}	
 
 	/**
 	 * Returns the de-qualified signature for the given {@link IApiType} 
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
index 1a24ce7..f72807e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/TarFile.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -322,10 +322,7 @@ public class TarFile {
 			if(nextEOF == 0) {
 				return -1;
 			}
-			if(len > nextEOF) {
-				len = nextEOF;
-			}
-			int size = super.read(b, off, len);
+			int size = super.read(b, off, (len > nextEOF ? nextEOF : len));
 			nextEntry -= size;
 			nextEOF -= size;
 			bytesread += size;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
index e33b026..0f60647 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ import java.io.LineNumberReader;
 import java.io.PrintWriter;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
@@ -107,6 +108,7 @@ import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.Factory;
 import org.eclipse.pde.api.tools.internal.provisional.IApiMarkerConstants;
 import org.eclipse.pde.api.tools.internal.provisional.IRequiredComponentDescription;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
 import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;
@@ -142,10 +144,10 @@ public final class Util {
 		 * @param name
 		 * @param project
 		 */
-		private BuildJob(String name, IProject[] projects) {
+		BuildJob(String name, IProject[] projects) {
 			this(name, projects, IncrementalProjectBuilder.FULL_BUILD);
 		}
-		private BuildJob(String name, IProject[] projects, int buildType) {
+		BuildJob(String name, IProject[] projects, int buildType) {
 			super(name);
 			fProjects = projects;
 			this.fBuildType = buildType;
@@ -213,7 +215,7 @@ public final class Util {
 					}
 				}
 			} catch (CoreException e) {
-				return e.getStatus();
+				return new Status(e.getStatus().getSeverity(), ApiPlugin.PLUGIN_ID, ApiPlugin.INTERNAL_ERROR, UtilMessages.Util_builder_errorMessage, e);
 			} catch (OperationCanceledException e) {
 				return Status.CANCEL_STATUS;
 			}
@@ -444,8 +446,7 @@ public final class Util {
 	 */
 	public static File createEEFile(IVMInstall jre, String eeid) throws IOException {
 		String string = Util.generateEEContents(jre, eeid);
-		File eeFile = File.createTempFile("eed", ".ee"); //$NON-NLS-1$ //$NON-NLS-2$
-		eeFile.deleteOnExit();
+		File eeFile = createTempFile("eed", ".ee"); //$NON-NLS-1$ //$NON-NLS-2$
 		FileOutputStream outputStream = null;
 		try {
 			outputStream = new FileOutputStream(eeFile);
@@ -567,7 +568,9 @@ public final class Util {
 			if (apiComponent != null) {
 				try {
 					IApiTypeRoot classFile = apiComponent.findTypeRoot(typeName);
-					if (classFile != null) return classFile;
+					if (classFile != null) {
+						return classFile;
+					}
 				} catch (CoreException e) {
 					// ignore
 				}
@@ -608,7 +611,29 @@ public final class Util {
 			}
 		}
 	}
-	
+	/**
+	 * Return an int value that represents the given element type
+	 * Returns -1 if the element type cannot be determined.
+	 * 
+	 * @param elementType the given element type
+	 * @return an int that represents the given element type constant.
+	 */
+	public static int getDeltaElementTypeValue(String elementType) {
+		Class IDeltaClass = IDelta.class;
+		try {
+			Field field = IDeltaClass.getField(elementType);
+			return field.getInt(null);
+		} catch (SecurityException e) {
+			// ignore
+		} catch (IllegalArgumentException e) {
+			// ignore
+		} catch (NoSuchFieldException e) {
+			// ignore
+		} catch (IllegalAccessException e) {
+			// ignore
+		}
+		return -1;
+	}
 	/**
 	 * Return a string that represents the given element type
 	 * Returns {@link #UNKNOWN_ELEMENT_KIND} if the element type cannot be determined.
@@ -626,8 +651,8 @@ public final class Util {
 				return "ENUM_ELEMENT_TYPE"; //$NON-NLS-1$
 			case IDelta.API_COMPONENT_ELEMENT_TYPE :
 				return "API_COMPONENT_ELEMENT_TYPE"; //$NON-NLS-1$
-			case IDelta.API_PROFILE_ELEMENT_TYPE :
-				return "API_PROFILE_ELEMENT_TYPE"; //$NON-NLS-1$
+			case IDelta.API_BASELINE_ELEMENT_TYPE :
+				return "API_BASELINE_ELEMENT_TYPE"; //$NON-NLS-1$
 			case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
 				return "CONSTRUCTOR_ELEMENT_TYPE"; //$NON-NLS-1$
 			case IDelta.METHOD_ELEMENT_TYPE :
@@ -716,6 +741,7 @@ public final class Util {
 			case IDelta.REEXPORTED_API_TYPE : return "REEXPORTED_API_TYPE"; //$NON-NLS-1$
 			case IDelta.REEXPORTED_TYPE : return "REEXPORTED_TYPE"; //$NON-NLS-1$
 			case IDelta.METHOD_MOVED_DOWN : return "METHOD_MOVED_DOWN"; //$NON-NLS-1$
+			case IDelta.DEPRECATION : return "DEPRECATION"; //$NON-NLS-1$
 		}
 		return UNKNOWN_FLAGS;
 	}
@@ -831,8 +857,8 @@ public final class Util {
 			case IDelta.API_COMPONENT_ELEMENT_TYPE :
 				buffer.append("api component"); //$NON-NLS-1$
 				break;
-			case IDelta.API_PROFILE_ELEMENT_TYPE :
-				buffer.append("api profile"); //$NON-NLS-1$
+			case IDelta.API_BASELINE_ELEMENT_TYPE :
+				buffer.append("api baseline"); //$NON-NLS-1$
 				break;
 			case IDelta.METHOD_ELEMENT_TYPE:
 				buffer.append("method"); //$NON-NLS-1$
@@ -1049,6 +1075,17 @@ public final class Util {
 		monitor.worked(work);
 	}
 	
+	/**
+	 * Updates the given monitor 0 work ticks. This method is used to poll for cancellation
+	 * without advancing the work done.
+	 * 
+	 * @param monitor
+	 * @throws OperationCanceledException
+	 */
+	public static void updateMonitor(IProgressMonitor monitor) throws OperationCanceledException {
+		updateMonitor(monitor, 0);
+	}
+	
 	private static IMember getMethod(IType type, String key) {
 		boolean isGeneric = false;
 		int indexOfTypeVariable = key.indexOf('<');
@@ -1449,7 +1486,7 @@ public final class Util {
 		try{
 			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
 			parser.setErrorHandler(new DefaultHandler());
-			stream = new ByteArrayInputStream(document.getBytes());
+			stream = new ByteArrayInputStream(document.getBytes(IApiCoreConstants.UTF_8));
 			root = parser.parse(stream).getDocumentElement();
 		} catch (ParserConfigurationException e) {
 			abort("Unable to parse XML document.", e);  //$NON-NLS-1$
@@ -1663,8 +1700,7 @@ public final class Util {
 		File fakeEEFile = null;
 		PrintWriter writer = null;
 		try {
-			fakeEEFile = File.createTempFile("eefile", ".ee"); //$NON-NLS-1$ //$NON-NLS-2$
-			fakeEEFile.deleteOnExit();
+			fakeEEFile = createTempFile("eefile", ".ee"); //$NON-NLS-1$ //$NON-NLS-2$
 			writer = new PrintWriter(new BufferedWriter(new FileWriter(fakeEEFile)));
 			writer.print("-Djava.home="); //$NON-NLS-1$
 			writer.println(System.getProperty("java.home")); //$NON-NLS-1$
@@ -1684,6 +1720,21 @@ public final class Util {
 	}
 
 	/**
+	 * Creates a new file in the users' <code>temp</code> directory
+	 * @param prefix
+	 * @param suffix
+	 * @return a new temp file
+	 * @throws IOException
+	 * @since 1.1
+	 */
+	public static File createTempFile(String prefix, String suffix) throws IOException {
+		File file = File.createTempFile(prefix, suffix);
+		file.deleteOnExit();
+		FileManager.getManager().recordTempFileRoot(file.getCanonicalPath());
+		return file;
+	}
+	
+	/**
 	 * @return a string representation of all of the libraries from the bootpath 
 	 * of the current default system VM.
 	 */
@@ -1802,7 +1853,9 @@ public final class Util {
 	 * @return true iff the file was really delete, false otherwise
 	 */
 	public static boolean delete(File file) {
-		if (!file.exists()) return true;
+		if (!file.exists()) {
+			return true;
+		}
 		// flush all directory content
 		if (file.isDirectory()) {
 			flushDirectoryContent(file);
@@ -1927,31 +1980,27 @@ public final class Util {
 	 * @return API component + version identifier
 	 */
 	public static String getDeltaComponentVersionsId(IApiComponent component) {
-		try {
-			StringBuffer buffer = new StringBuffer(component.getId());
-			String version = component.getVersion();
-			// remove the qualifier part
-			if (version != null) {
-				buffer.append('(');
-				try {
-					Version version2 = new Version(version);
-					buffer
-						.append(version2.getMajor())
-						.append('.')
-						.append(version2.getMinor())
-						.append('.')
-						.append(version2.getMicro());
-				} catch (IllegalArgumentException e) {
-					// the version string doesn't follow the Eclipse pattern
-					// we keep the version as is
-					buffer.append(version);
-				}
-				buffer.append(')');
-			}
-			return String.valueOf(buffer);
-		} catch (CoreException e) {
-			return EMPTY_STRING;
+		StringBuffer buffer = new StringBuffer(component.getSymbolicName());
+		String version = component.getVersion();
+		// remove the qualifier part
+		if (version != null) {
+			buffer.append('(');
+			try {
+				Version version2 = new Version(version);
+				buffer
+					.append(version2.getMajor())
+					.append('.')
+					.append(version2.getMinor())
+					.append('.')
+					.append(version2.getMicro());
+			} catch (IllegalArgumentException e) {
+				// the version string doesn't follow the Eclipse pattern
+				// we keep the version as is
+				buffer.append(version);
+			}
+			buffer.append(')');
 		}
+		return String.valueOf(buffer);
 	}
 	/**
 	 * Returns an identifier for the given API component including its version identifier
@@ -1961,30 +2010,26 @@ public final class Util {
 	 * @return API component + version identifier
 	 */
 	public static String getComponentVersionsId(IApiComponent component) {
-		try {
-			StringBuffer buffer = new StringBuffer(component.getId());
-			String version = component.getVersion();
-			// remove the qualifier part
-			if (version != null) {
-				buffer.append('_');
-				try {
-					Version version2 = new Version(version);
-					buffer
-						.append(version2.getMajor())
-						.append('.')
-						.append(version2.getMinor())
-						.append('.')
-						.append(version2.getMicro());
-				} catch (IllegalArgumentException e) {
-					// the version string doesn't follow the Eclipse pattern
-					// we keep the version as is
-					buffer.append(version);
-				}
+		StringBuffer buffer = new StringBuffer(component.getSymbolicName());
+		String version = component.getVersion();
+		// remove the qualifier part
+		if (version != null) {
+			buffer.append('_');
+			try {
+				Version version2 = new Version(version);
+				buffer
+					.append(version2.getMajor())
+					.append('.')
+					.append(version2.getMinor())
+					.append('.')
+					.append(version2.getMicro());
+			} catch (IllegalArgumentException e) {
+				// the version string doesn't follow the Eclipse pattern
+				// we keep the version as is
+				buffer.append(version);
 			}
-			return String.valueOf(buffer);
-		} catch (CoreException e) {
-			return EMPTY_STRING;
 		}
+		return String.valueOf(buffer);
 	}
 	public static String getDescriptorName(IApiType descriptor) {
 		String typeName = descriptor.getName();
@@ -2021,6 +2066,11 @@ public final class Util {
 		return EMPTY_STRING;
 	}
 	
+	/**
+	 * Returns the string representation of the {@link IApiElement} type
+	 * @param type
+	 * @return the string of the {@link IApiElement} type
+	 */
 	public static String getApiElementType(int type) {
 		switch(type) {
 			case IApiElement.API_TYPE_CONTAINER :
@@ -2115,50 +2165,28 @@ public final class Util {
 
 	/**
 	 * Returns the {@link IResource} to create markers on when building. If the {@link IType} is <code>null</code>
-	 * or the type cannot be located (does not exist) than the MANIFEST.MF will be returned.
+	 * or the type cannot be located (does not exist) than the MANIFEST.MF will be returned. <code>null</code> can be 
+	 * returned in the case that the project does not have a manifest file.
 	 * @param project the project to look in for the {@link IResource}
 	 * @param type the type we are looking for the resource for, or <code>null</code>
-	 * @return the {@link IResource} associated with the given {@link IType} or the MANIFEST.MF file
+	 * @return the {@link IResource} associated with the given {@link IType} or the MANIFEST.MF file, or <code>null</code> if the project does
+	 * not have a manifest
 	 */
 	public static IResource getResource(IProject project, IType type) {
-		IResource resource = null;
 		try {
-			if (type == null) {
-				IResource manifestFile = Util.getManifestFile(project);
-				if (manifestFile == null) {
-					// Cannot retrieve the manifest.mf file
-					return null;
-				}
-				resource = manifestFile;
-			} else {
+			if (type != null) {
 				ICompilationUnit unit = type.getCompilationUnit();
 				if (unit != null) {
-					resource = unit.getCorrespondingResource();
-					if (resource == null) {
-						return null;
-					}
-					if (project.findMember(resource.getProjectRelativePath()) == null) {
-						resource = null;
-						IResource manifestFile = Util.getManifestFile(project);
-						if (manifestFile == null) {
-							// Cannot retrieve the manifest.mf file
-							return null;
-						}
-						resource = manifestFile;
-					}
-				} else {
-					IResource manifestFile = Util.getManifestFile(project);
-					if (manifestFile == null) {
-						// Cannot retrieve the manifest.mf file
-						return null;
+					IResource resource = unit.getCorrespondingResource();
+					if (resource != null && resource.exists()) {
+						return resource;
 					}
-					resource = manifestFile;
 				}
 			}
 		} catch (JavaModelException e) {
 			ApiPlugin.log(e);
 		}
-		return resource;
+		return getManifestFile(project);
 	}
 
 	/**
@@ -2167,10 +2195,7 @@ public final class Util {
 	public static final Comparator componentsorter = new Comparator(){
 		public int compare(Object o1, Object o2) {
 			if(o1 instanceof IApiComponent && o2 instanceof IApiComponent) {
-				try {
-					return ((IApiComponent)o1).getId().compareTo(((IApiComponent)o2).getId());
-				}
-				catch (CoreException ce) {}
+				return ((IApiComponent)o1).getSymbolicName().compareTo(((IApiComponent)o2).getSymbolicName());
 			}
 			if(o1 instanceof SkippedComponent && o2 instanceof SkippedComponent) {
 				return ((SkippedComponent)o1).getComponentId().compareTo(((SkippedComponent)o2).getComponentId());
@@ -2190,8 +2215,8 @@ public final class Util {
 	 * @param baseline
 	 * @return the list of bundles to be excluded
 	 */
-	public static Set initializeRegexExcludeList(String location, IApiBaseline baseline) {
-		HashSet list = new HashSet();
+	public static ExcludedElements initializeRegexExcludeList(String location, IApiBaseline baseline, boolean debug) {
+		ExcludedElements excludedElements = new ExcludedElements();
 		if (location != null) {
 			File file = new File(location);
 			if (file.exists()) {
@@ -2220,11 +2245,10 @@ public final class Util {
 							}
 							if(line.startsWith(REGULAR_EXPRESSION_START)) {
 								if(baseline != null) {
-									Util.collectRegexIds(line, list, baseline.getApiComponents());
+									Util.collectRegexIds(line, excludedElements, baseline.getApiComponents(), debug);
 								}
-							}
-							else {
-								list.add(line);
+							} else {
+								excludedElements.addExactMatch(line);
 							}
 						}
 					} 
@@ -2238,7 +2262,7 @@ public final class Util {
 				}
 			}
 		}
-		return list;
+		return excludedElements;
 	}
 
 	/**
@@ -2247,27 +2271,37 @@ public final class Util {
 	 * @param list
 	 * @param components
 	 */
-	public static void collectRegexIds(String line, Set list, IApiComponent[] components) throws Exception {
+	public static void collectRegexIds(String line, ExcludedElements excludedElements, IApiComponent[] components, boolean debug) throws Exception {
 		if (line.startsWith(REGULAR_EXPRESSION_START)) {
 			String componentname = line;
 			// regular expression
 			componentname = componentname.substring(2);
 			Pattern pattern = null;
 			try {
+				if (debug) {
+					System.out.println("Pattern to match : " + componentname); //$NON-NLS-1$
+				}
 				pattern = Pattern.compile(componentname);
 				String componentid = null;
 				for (int j = 0, max2 = components.length; j < max2; j++) {
-					componentid = components[j].getId();
+					componentid = components[j].getSymbolicName();
+					if (debug) {
+						System.out.println("component id : " + componentid); //$NON-NLS-1$
+					}
 					if (pattern.matcher(componentid).matches()) {
-						list.add(componentid);
+						if (debug) {
+							System.out.println(componentid + " matched the pattern " + componentname); //$NON-NLS-1$
+						}
+						excludedElements.addPartialMatch(componentid);
+					} else if (debug) {
+						System.out.println(componentid + " didn't match the pattern " + componentname); //$NON-NLS-1$
 					}
 				}
 			} catch (PatternSyntaxException e) {
-				throw new Exception(UtilMessages.bind(
+				throw new Exception(NLS.bind(
 						UtilMessages.comparison_invalidRegularExpression,
 						componentname));
 			}
-			catch(CoreException ce) {}
 		}
 	}
 
@@ -2283,8 +2317,17 @@ public final class Util {
 		}
 	};
 
-	public static void checkCanceled(IProgressMonitor monitor) {
-		if (monitor.isCanceled())
-			throw new OperationCanceledException();
+	/**
+	 * Returns true if the given {@link IApiType} is API or not, where API is defined
+	 * as having API visibility in an API description and having either the public of protected 
+	 * Java flag set
+	 * 
+	 * @param visibility
+	 * @param typeDescriptor
+	 * @return true if the given type is API, false otherwise
+	 */
+	public static boolean isAPI(int visibility, IApiType typeDescriptor) {
+		int access = typeDescriptor.getModifiers();
+		return VisibilityModifiers.isAPI(visibility) && (Flags.isPublic(access) || Flags.isProtected(access));
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/UtilMessages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/UtilMessages.java
index 8540182..3cce669 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/UtilMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/UtilMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ public class UtilMessages extends NLS {
 	public static String Util_4;
 	public static String Util_5;
 	public static String Util_6;
+	public static String Util_builder_errorMessage;
 	public static String comparison_invalidRegularExpression;
 
 	static {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/utilmessages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/utilmessages.properties
index 337f1e1..1a49fb3 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/utilmessages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/utilmessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,4 +12,5 @@ Util_0=Building projects
 Util_4=Building...
 Util_5=Building project {0}
 Util_6=Could not locate method {0}{1}
-comparison_invalidRegularExpression=Invalid regular expression pattern : {0}
\ No newline at end of file
+Util_builder_errorMessage=An error occurred while running the API tools builder.
+comparison_invalidRegularExpression=Invalid regular expression pattern : {0}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationReportConversionTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationReportConversionTask.java
new file mode 100644
index 0000000..1a697b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationReportConversionTask.java
@@ -0,0 +1,401 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.tasks;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.jdt.core.Signature;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
+import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
+import org.eclipse.pde.api.tools.internal.util.Util;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * This task can be used to convert the report generated by the apitooling.apideprecation task
+ * into an html report.
+ */
+public class APIDeprecationReportConversionTask extends Task {
+	static final class ConverterDefaultHandler extends DefaultHandler {
+		private String[] arguments;
+		private List argumentsList;
+		private String componentID;
+		private boolean debug;
+		private int flags;
+		private String key;
+		private String kind;
+		private Map map;
+		private String typename;
+		private int elementType;
+
+		public ConverterDefaultHandler(boolean debug) {
+			this.map = new HashMap();
+			this.debug = debug;
+		}
+		public void endElement(String uri, String localName, String name)
+			throws SAXException {
+			if (IApiXmlConstants.DELTA_ELEMENT_NAME.equals(name)) {
+				Entry entry = new Entry(
+						this.flags,
+						this.elementType,
+						this.key,
+						this.typename,
+						this.arguments,
+						this.kind);
+				Object object = this.map.get(this.componentID);
+				if (object != null) {
+					((List) object).add(entry);
+				} else {
+					ArrayList value = new ArrayList();
+					value.add(entry);
+					this.map.put(componentID, value);
+				}
+			} else if (IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENTS.equals(name)) {
+				if (this.argumentsList != null && this.argumentsList.size() != 0) {
+					this.arguments = new String[this.argumentsList.size()];
+					this.argumentsList.toArray(this.arguments);
+				}
+			}
+		}
+
+		public Map getEntries() {
+			return this.map;
+		}
+		/*
+		 * Only used in debug mode
+		 */
+		private void printAttribute(Attributes attributes, String name) {
+			System.out.println("\t" + name + " = " + String.valueOf(attributes.getValue(name))); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		public void startElement(String uri, String localName,
+				String name, Attributes attributes) throws SAXException {
+			if (IApiXmlConstants.DELTA_ELEMENT_NAME.equals(name)) {
+				if (this.debug) {
+					System.out.println("name : " + name); //$NON-NLS-1$
+					/*<delta
+					 *  compatible="true"
+					 *  componentId="org.eclipse.equinox.p2.ui_0.1.0"
+					 *  element_type="CLASS_ELEMENT_TYPE"
+					 *  flags="25"
+					 *  key="schedule(Lorg/eclipse/equinox/internal/provisional/p2/ui/operations/ProvisioningOperation;Lorg/eclipse/swt/widgets/Shell;I)Lorg/eclipse/core/runtime/jobs/Job;"
+					 *  kind="ADDED"
+					 *  oldModifiers="9"
+					 *  newModifiers="9"
+					 *  restrictions="0"
+					 *  type_name="org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner"/>
+					 */
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_COMPATIBLE);
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_COMPONENT_ID);
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE);
+					printAttribute(attributes, IApiXmlConstants.ATTR_FLAGS);
+					printAttribute(attributes, IApiXmlConstants.ATTR_KEY);
+					printAttribute(attributes, IApiXmlConstants.ATTR_KIND);
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS);
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_OLD_MODIFIERS);
+					printAttribute(attributes, IApiXmlConstants.ATTR_RESTRICTIONS);
+					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_TYPE_NAME);
+				}
+				this.componentID = attributes.getValue(IApiXmlConstants.ATTR_NAME_COMPONENT_ID);
+				this.flags = Integer.parseInt(attributes.getValue(IApiXmlConstants.ATTR_FLAGS));
+				this.elementType = Util.getDeltaElementTypeValue(attributes.getValue(IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE));
+				this.typename = attributes.getValue(IApiXmlConstants.ATTR_NAME_TYPE_NAME);
+				this.key = attributes.getValue(IApiXmlConstants.ATTR_KEY);
+				this.kind = attributes.getValue(IApiXmlConstants.ATTR_KIND);
+			} else if (IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENTS.equals(name)) {
+				if (this.argumentsList == null) {
+					this.argumentsList = new ArrayList();
+				} else {
+					this.argumentsList.clear();
+				}
+			} else if (IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENT.equals(name)) {
+				this.argumentsList.add(attributes.getValue(IApiXmlConstants.ATTR_VALUE));
+			}
+		}
+	}
+	static class Entry {
+		String[] arguments;
+		int flags;
+		int elementType;
+		String key;
+		String typeName;
+		String kind;
+
+		private static final String ADDED = "ADDED"; //$NON-NLS-1$
+		private static final String REMOVED = "REMOVED"; //$NON-NLS-1$
+
+		public Entry(
+				int flags,
+				int elementType,
+				String key,
+				String typeName,
+				String[] arguments,
+				String kind) {
+			this.flags = flags;
+			this.key = key.replace('/', '.');
+			if (typeName != null) {
+				this.typeName = typeName.replace('/', '.');
+			}
+			this.arguments = arguments;
+			this.kind = kind;
+			this.elementType = elementType;
+		}
+		
+		public String getDisplayString() {
+			StringBuffer buffer = new StringBuffer();
+			if(this.typeName != null && this.typeName.length() != 0) {
+				buffer.append(this.typeName);
+				switch(this.flags) {
+					case IDelta.DEPRECATION :
+						switch(this.elementType) {
+							case IDelta.ANNOTATION_ELEMENT_TYPE :
+							case IDelta.INTERFACE_ELEMENT_TYPE :
+							case IDelta.ENUM_ELEMENT_TYPE :
+							case IDelta.CLASS_ELEMENT_TYPE :
+								buffer.append('.');
+								buffer.append(this.key);
+								break;
+							case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
+								int indexOf = key.indexOf('(');
+								if (indexOf == -1) {
+									return null;
+								}
+								int index = indexOf;
+								String selector = key.substring(0, index);
+								String descriptor = key.substring(index, key.length());
+								buffer.append('#');
+								buffer.append(Signature.toString(descriptor, selector, null, false, false));
+								break;
+							case IDelta.METHOD_ELEMENT_TYPE :
+								indexOf = key.indexOf('(');
+								if (indexOf == -1) {
+									return null;
+								}
+								index = indexOf;
+								selector = key.substring(0, index);
+								descriptor = key.substring(index, key.length());
+								buffer.append('#');
+								buffer.append(Signature.toString(descriptor, selector, null, false, true));
+								break;
+							case IDelta.FIELD_ELEMENT_TYPE :
+								buffer.append('#');
+								buffer.append(this.key);
+						}
+				}
+			}
+			
+			return CommonUtilsTask.convertToHtml(String.valueOf(buffer));
+		}
+		public String getDisplayKind() {
+			if (ADDED.equals(this.kind)) {
+				return Messages.AddedElement;
+			} else if (REMOVED.equals(this.kind)) {
+				return Messages.RemovedElement;
+			}
+			return Messages.ChangedElement;
+		}
+	}
+	boolean debug;
+
+	private String htmlFileLocation;
+	private String xmlFileLocation;
+
+	private void dumpEndEntryForComponent(StringBuffer buffer, String componentID) {
+		buffer.append(NLS.bind(Messages.deprecationReportTask_endComponentEntry, componentID));
+	}
+	private void dumpEntries(Map entries, StringBuffer buffer) {
+		dumpHeader(buffer);
+		Set entrySet = entries.entrySet();
+		List allEntries = new ArrayList();
+		for (Iterator iterator = entrySet.iterator(); iterator.hasNext(); ) {
+			allEntries.add(iterator.next());
+		}
+		Collections.sort(allEntries, new Comparator() {
+			public int compare(Object o1, Object o2) {
+				Map.Entry entry1 = (Map.Entry) o1;
+				Map.Entry entry2 = (Map.Entry) o2;
+				return ((String) entry1.getKey()).compareTo((String) entry2.getKey());
+			}
+		});
+		for (Iterator iterator = allEntries.iterator(); iterator.hasNext(); ) {
+			Map.Entry mapEntry = (Map.Entry) iterator.next();
+			String key = (String) mapEntry.getKey();
+			Object value = mapEntry.getValue();
+			dumpEntryForComponent(buffer, key);
+			if (value instanceof List) {
+				List values = (List) value;
+				Collections.sort(values, new Comparator() {
+					public int compare(Object o1, Object o2) {
+						Entry entry1 = (Entry) o1;
+						Entry entry2 = (Entry) o2;
+						String typeName1 = entry1.typeName;
+						String typeName2 = entry2.typeName;
+						if (typeName1 == null) {
+							if (typeName2 == null) {
+								return entry1.key.compareTo(entry2.key);
+							}
+							return -1;
+						} else if (typeName2 == null) {
+							return 1;
+						}
+						if (!typeName1.equals(typeName2)) {
+							return typeName1.compareTo(typeName2);
+						}
+						return entry1.key.compareTo(entry2.key);
+					}
+				});
+				if (debug) {
+					System.out.println("Entries for " + key); //$NON-NLS-1$
+				}
+				for (Iterator iterator2 = ((List)value).iterator(); iterator2.hasNext(); ) {
+					Entry entry = (Entry) iterator2.next();
+					if (debug) {
+						if (entry.typeName != null) {
+							System.out.print(entry.typeName);
+							System.out.print('#');
+						}
+						System.out.println(entry.key);
+					}
+					dumpEntry(buffer, entry);
+				}
+			}
+			dumpEndEntryForComponent(buffer, key);
+		}
+		dumpFooter(buffer);
+	}
+	private void dumpEntry(StringBuffer buffer, Entry entry) {
+		buffer.append(NLS.bind(Messages.deprecationReportTask_entry, entry.getDisplayKind(), entry.getDisplayString()));
+	}
+	private void dumpEntryForComponent(StringBuffer buffer, String componentID) {
+		buffer.append(NLS.bind(Messages.deprecationReportTask_componentEntry, componentID));
+	}
+
+	private void dumpFooter(StringBuffer buffer) {
+		buffer.append(Messages.deprecationReportTask_footer);
+	}
+	private void dumpHeader(StringBuffer buffer) {
+		buffer.append(Messages.deprecationReportTask_header);
+	}
+	/**
+	 * Run the ant task
+	 */
+	public void execute() throws BuildException {
+		if (this.xmlFileLocation == null) {
+			throw new BuildException(Messages.deprecationReportTask_missingXmlFileLocation);
+		}
+		if (this.debug) {
+			System.out.println("xmlFileLocation : " + this.xmlFileLocation); //$NON-NLS-1$
+			System.out.println("htmlFileLocation : " + this.htmlFileLocation); //$NON-NLS-1$
+		}
+		SAXParserFactory factory = SAXParserFactory.newInstance();
+		SAXParser parser = null;
+		try {
+			parser = factory.newSAXParser();
+		} catch (ParserConfigurationException e) {
+			e.printStackTrace();
+		} catch (SAXException e) {
+			e.printStackTrace();
+		}
+		if (parser == null) {
+			throw new BuildException(Messages.deprecationReportTask_couldNotCreateSAXParser);
+		}
+
+		File file = new File(this.xmlFileLocation);
+		if (this.htmlFileLocation == null) {
+			this.htmlFileLocation = extractNameFromXMLName();
+			if (this.debug) {
+				System.out.println("output name :" + this.htmlFileLocation); //$NON-NLS-1$
+			}
+		}
+		try {
+			ConverterDefaultHandler defaultHandler = new ConverterDefaultHandler(this.debug);
+			parser.parse(file, defaultHandler);
+			StringBuffer buffer = new StringBuffer();
+			dumpEntries(defaultHandler.getEntries(), buffer);
+			writeOutput(buffer);
+		} catch (SAXException e) {
+			// ignore
+		} catch (IOException e) {
+			// ignore
+		}
+	}
+	private String extractNameFromXMLName() {
+		int index = this.xmlFileLocation.lastIndexOf('.');
+		StringBuffer buffer = new StringBuffer();
+		buffer.append(this.xmlFileLocation.substring(0, index)).append(".html"); //$NON-NLS-1$
+		return String.valueOf(buffer);
+	}
+	/**
+	 * Set the debug value.
+	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
+	 * <p>Default is <code>false</code>.</p>
+	 *
+	 * @param debugValue the given debug value
+	 */
+	public void setDebug(String debugValue) {
+		this.debug = Boolean.toString(true).equals(debugValue); 
+	}
+	/**
+	 * Set the path of the html file to generate.
+	 * 
+	 * <p>The location is set using an absolute path.</p>
+	 * 
+	 * <p>This is optional. If not set, the html file name is retrieved from the xml file
+	 * name by replacing ".xml" in ".html".</p>
+	 * 
+	 * @param htmlFilePath the path of the html file to generate
+	 */
+	public void setHtmlFile(String htmlFilePath) {
+		this.htmlFileLocation = htmlFilePath;
+	}
+	/**
+	 * Set the path of the xml file to convert to html.
+	 * 
+	 * <p>The path is set using an absolute path.</p>
+	 * 
+	 * @param xmlFilePath the path of the xml file to convert to html
+	 */
+	public void setXmlFile(String xmlFilePath) {
+		this.xmlFileLocation = xmlFilePath;
+	}
+	private void writeOutput(StringBuffer buffer) throws IOException {
+		FileWriter writer = null;
+		BufferedWriter bufferedWriter = null;
+		try {
+			writer = new FileWriter(this.htmlFileLocation);
+			bufferedWriter = new BufferedWriter(writer);
+			bufferedWriter.write(String.valueOf(buffer));
+		} finally {
+			if (bufferedWriter != null) {
+				bufferedWriter.close();
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationTask.java
new file mode 100644
index 0000000..b27d492
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIDeprecationTask.java
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.tasks;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.apache.tools.ant.BuildException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.model.StubApiComponent;
+import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
+import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
+import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator;
+import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
+
+/**
+ * Ant task to retrieve all deprecation changes (addition or removal) between two api baselines
+ */
+public class APIDeprecationTask extends CommonUtilsTask {
+	
+	private boolean debug;
+
+	private String eeFileLocation;
+	private String excludeListLocation;
+
+	public void execute() throws BuildException {
+		if (this.referenceBaselineLocation == null
+				|| this.currentBaselineLocation == null
+				|| this.reportLocation == null) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(
+				NLS.bind(Messages.printArguments,
+					new String[] {
+						this.referenceBaselineLocation,
+						this.currentBaselineLocation,
+						this.reportLocation,
+					})
+			);
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+		if (this.debug) {
+			System.out.println("reference : " + this.referenceBaselineLocation); //$NON-NLS-1$
+			System.out.println("baseline to compare : " + this.currentBaselineLocation); //$NON-NLS-1$
+			System.out.println("report location : " + this.reportLocation); //$NON-NLS-1$
+			if (this.excludeListLocation != null) {
+				System.out.println("exclude list location : " + this.excludeListLocation); //$NON-NLS-1$
+			} else {
+				System.out.println("No exclude list location"); //$NON-NLS-1$
+			}
+		}
+		// unzip reference
+		long time = 0;
+		if (this.debug) {
+			time = System.currentTimeMillis();
+		}
+		File referenceInstallDir = extractSDK(REFERENCE, this.referenceBaselineLocation);
+
+		File baselineInstallDir = extractSDK(CURRENT, this.currentBaselineLocation);
+		if (this.debug) {
+			System.out.println("Extraction of both archives : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			time = System.currentTimeMillis();
+		}
+		// run the comparison
+		// create baseline for the reference
+		IApiBaseline referenceBaseline = createBaseline(REFERENCE_BASELINE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
+		IApiBaseline currentBaseline = createBaseline(CURRENT_BASELINE_NAME, getInstallDir(baselineInstallDir), this.eeFileLocation);
+		
+		ExcludedElements excludedElements = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation, currentBaseline, this.debug);
+
+		if (this.debug) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+			System.out.println("Excluded elements list:"); //$NON-NLS-1$
+			System.out.println(excludedElements);
+		}
+		IDelta delta = null;
+		if (this.debug) {
+			System.out.println("Creation of both baselines : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			time = System.currentTimeMillis();
+		}
+		try {
+			delta = ApiComparator.compare(referenceBaseline, currentBaseline, VisibilityModifiers.API, true, null);
+		} finally {
+			if (this.debug) {
+				System.out.println("API freeze check : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				time = System.currentTimeMillis();
+			}
+			referenceBaseline.dispose();
+			currentBaseline.dispose();
+			StubApiComponent.disposeAllCaches();
+			deleteBaseline(this.referenceBaselineLocation, referenceInstallDir);
+			deleteBaseline(this.currentBaselineLocation, baselineInstallDir);
+			if (this.debug) {
+				System.out.println("Cleanup : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+				time = System.currentTimeMillis();
+			}
+		}
+		if (delta == null) {
+			// an error occurred during the comparison
+			throw new BuildException(Messages.errorInComparison);
+		}
+		if (delta != ApiComparator.NO_DELTA) {
+			// dump the report in the appropriate folder
+			BufferedWriter writer = null;
+			File outputFile = new File(this.reportLocation);
+			if (outputFile.exists()) {
+				// delete the file
+				// TODO we might want to customize it
+				outputFile.delete();
+			} else {
+				File outputDir = outputFile.getParentFile();
+				if (!outputDir.exists()) {
+					if (!outputDir.mkdirs()) {
+						throw new BuildException(
+							NLS.bind(Messages.errorCreatingParentReportFile, outputDir.getAbsolutePath()));
+					}
+				}
+			}
+			try {
+				writer = new BufferedWriter(new FileWriter(outputFile));
+				ExcludeListDeltaVisitor visitor = new ExcludeListDeltaVisitor(excludedElements, ExcludeListDeltaVisitor.CHECK_DEPRECATION);
+				delta.accept(visitor);
+				writer.write(visitor.getXML());
+				writer.flush();
+				if (this.debug) {
+					String potentialExcludeList = visitor.getPotentialExcludeList();
+					if (potentialExcludeList.length() != 0) {
+						System.out.println("Potential exclude list:"); //$NON-NLS-1$
+						System.out.println(potentialExcludeList);
+					}
+				}
+			} catch (IOException e) {
+				ApiPlugin.log(e);
+			} catch (CoreException e) {
+				ApiPlugin.log(e);
+			} finally {
+				try {
+					if (writer != null) {
+						writer.close();
+					}
+				} catch(IOException e) {
+					// ignore
+				}
+			}
+			if (this.debug) {
+				System.out.println("Report generation : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+	}
+	/**
+	 * Set the debug value.
+	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
+	 * <p>Default is <code>false</code>.</p>
+	 *
+	 * @param debugValue the given debug value
+	 */
+	public void setDebug(String debugValue) {
+		this.debug = Boolean.toString(true).equals(debugValue); 
+	}
+	/**
+	 * Set the execution environment file to use.
+	 * <p>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment
+	 * is used.</p>
+	 * <p>The file is specified using an absolute path. This is optional.</p> 
+	 *
+	 * @param eeFileLocation the given execution environment file
+	 */
+	public void setEEFile(String eeFileLocation) {
+		this.eeFileLocation = eeFileLocation;
+	}
+	/**
+	 * Set the exclude list location.
+	 * 
+	 * <p>The exclude list is used to know what bundles should excluded from the xml report
+	 * generated by the task execution. Lines starting with '#' are ignored from
+	 * the excluded element.</p>
+	 * <p>The format of the exclude file looks like this:</p>
+	 * <pre># 229688
+	 * org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListContentProvider#dispose()V
+	 * org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListContentProvider#getElements(Ljava/lang/Object;)[Ljava/lang/Object;
+	 * org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListContentProvider#inputChanged(Lorg/eclipse/jface/viewers/Viewer;Ljava/lang/Object;Ljava/lang/Object;)V
+	 * org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider#dispose()V
+	 * org.eclipse.jface.databinding_1.2.0:org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider#getChildren(Ljava/lang/Object;)[Ljava/lang/Object;
+	 * ...
+	 * </pre>
+	 * @param excludeListLocation the given location for the excluded list file
+	 */
+	public void setExcludeList(String excludeListLocation) {
+		this.excludeListLocation = excludeListLocation;
+	}
+	/**
+	 * Set the location of the current product or baseline that you want to compare against
+	 * the reference baseline.
+	 * 
+	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
+	 * the Eclipse installation folder. This is the directory is which you can find the 
+	 * Eclipse executable.
+	 * </p>
+	 *
+	 * @param baselineLocation the given location for the baseline to analyze
+	 */
+	public void setProfile(String baselineLocation) {
+		this.currentBaselineLocation = baselineLocation;
+	}
+	/**
+	 * Set the location of the reference baseline.
+	 * 
+	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
+	 * the Eclipse installation folder. This is the directory is which you can find the 
+	 * Eclipse executable.
+	 * </p>
+	 *
+	 * @param baselineLocation the given location for the reference baseline to analyze
+	 */
+	public void setBaseline(String baselineLocation) {
+		this.referenceBaselineLocation = baselineLocation;
+	}
+	/**
+	 * Set the given report file name to be generated.
+	 * 
+	 * @param reportLocation the given report file name to be generated.
+	 */
+	public void setReport(String reportLocation) {
+		this.reportLocation = reportLocation;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeReportConversionTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeReportConversionTask.java
index 129d875..4e965a4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeReportConversionTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeReportConversionTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@ import org.eclipse.jdt.core.Signature;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
+import org.eclipse.pde.api.tools.internal.util.Util;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
@@ -49,8 +50,10 @@ public class APIFreezeReportConversionTask extends Task {
 		private boolean debug;
 		private int flags;
 		private String key;
+		private String kind;
 		private Map map;
 		private String typename;
+		private int elementType;
 
 		public ConverterDefaultHandler(boolean debug) {
 			this.map = new HashMap();
@@ -60,10 +63,12 @@ public class APIFreezeReportConversionTask extends Task {
 			throws SAXException {
 			if (IApiXmlConstants.DELTA_ELEMENT_NAME.equals(name)) {
 				Entry entry = new Entry(
-						flags,
-						key,
-						typename,
-						this.arguments);
+						this.flags,
+						this.elementType,
+						this.key,
+						this.typename,
+						this.arguments,
+						this.kind);
 				Object object = this.map.get(this.componentID);
 				if (object != null) {
 					((List) object).add(entry);
@@ -93,7 +98,7 @@ public class APIFreezeReportConversionTask extends Task {
 		public void startElement(String uri, String localName,
 				String name, Attributes attributes) throws SAXException {
 			if (IApiXmlConstants.DELTA_ELEMENT_NAME.equals(name)) {
-				if (debug) {
+				if (this.debug) {
 					System.out.println("name : " + name); //$NON-NLS-1$
 					/*<delta
 					 *  compatible="true"
@@ -112,15 +117,18 @@ public class APIFreezeReportConversionTask extends Task {
 					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE);
 					printAttribute(attributes, IApiXmlConstants.ATTR_FLAGS);
 					printAttribute(attributes, IApiXmlConstants.ATTR_KEY);
+					printAttribute(attributes, IApiXmlConstants.ATTR_KIND);
 					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_NEW_MODIFIERS);
 					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_OLD_MODIFIERS);
 					printAttribute(attributes, IApiXmlConstants.ATTR_RESTRICTIONS);
 					printAttribute(attributes, IApiXmlConstants.ATTR_NAME_TYPE_NAME);
 				}
-				componentID = attributes.getValue(IApiXmlConstants.ATTR_NAME_COMPONENT_ID);
-				flags = Integer.parseInt(attributes.getValue(IApiXmlConstants.ATTR_FLAGS));
-				typename = attributes.getValue(IApiXmlConstants.ATTR_NAME_TYPE_NAME);
-				key = attributes.getValue(IApiXmlConstants.ATTR_KEY);
+				this.componentID = attributes.getValue(IApiXmlConstants.ATTR_NAME_COMPONENT_ID);
+				this.flags = Integer.parseInt(attributes.getValue(IApiXmlConstants.ATTR_FLAGS));
+				this.elementType = Util.getDeltaElementTypeValue(attributes.getValue(IApiXmlConstants.ATTR_NAME_ELEMENT_TYPE));
+				this.typename = attributes.getValue(IApiXmlConstants.ATTR_NAME_TYPE_NAME);
+				this.key = attributes.getValue(IApiXmlConstants.ATTR_KEY);
+				this.kind = attributes.getValue(IApiXmlConstants.ATTR_KIND);
 			} else if (IApiXmlConstants.ELEMENT_DELTA_MESSAGE_ARGUMENTS.equals(name)) {
 				if (this.argumentsList == null) {
 					this.argumentsList = new ArrayList();
@@ -135,20 +143,29 @@ public class APIFreezeReportConversionTask extends Task {
 	static class Entry {
 		String[] arguments;
 		int flags;
+		int elementType;
 		String key;
 		String typeName;
+		String kind;
+
+		private static final String ADDED = "ADDED"; //$NON-NLS-1$
+		private static final String REMOVED = "REMOVED"; //$NON-NLS-1$
 
 		public Entry(
 				int flags,
+				int elementType,
 				String key,
 				String typeName,
-				String[] arguments) {
+				String[] arguments,
+				String kind) {
 			this.flags = flags;
 			this.key = key.replace('/', '.');
 			if (typeName != null) {
 				this.typeName = typeName.replace('/', '.');
 			}
 			this.arguments = arguments;
+			this.kind = kind;
+			this.elementType = elementType;
 		}
 		
 		public String getDisplayString() {
@@ -162,7 +179,7 @@ public class APIFreezeReportConversionTask extends Task {
 					case IDelta.METHOD :
 					case IDelta.METHOD_WITH_DEFAULT_VALUE :
 					case IDelta.METHOD_WITHOUT_DEFAULT_VALUE :
-						int indexOf = key.indexOf('(');
+						int indexOf = this.key.indexOf('(');
 						if (indexOf == -1) {
 							return null;
 						}
@@ -198,22 +215,65 @@ public class APIFreezeReportConversionTask extends Task {
 						buffer.append('.');
 						buffer.append(this.key);
 						break;
+					case IDelta.DEPRECATION :
+						switch(this.elementType) {
+							case IDelta.ANNOTATION_ELEMENT_TYPE :
+							case IDelta.INTERFACE_ELEMENT_TYPE :
+							case IDelta.ENUM_ELEMENT_TYPE :
+							case IDelta.CLASS_ELEMENT_TYPE :
+								buffer.append('.');
+								buffer.append(this.key);
+								break;
+							case IDelta.CONSTRUCTOR_ELEMENT_TYPE :
+								indexOf = key.indexOf('(');
+								if (indexOf == -1) {
+									return null;
+								}
+								index = indexOf;
+								selector = key.substring(0, index);
+								descriptor = key.substring(index, key.length());
+								buffer.append('#');
+								buffer.append(Signature.toString(descriptor, selector, null, false, false));
+								break;
+							case IDelta.METHOD_ELEMENT_TYPE :
+								indexOf = key.indexOf('(');
+								if (indexOf == -1) {
+									return null;
+								}
+								index = indexOf;
+								selector = key.substring(0, index);
+								descriptor = key.substring(index, key.length());
+								buffer.append('#');
+								buffer.append(Signature.toString(descriptor, selector, null, false, true));
+								break;
+							case IDelta.FIELD_ELEMENT_TYPE :
+								buffer.append('#');
+								buffer.append(this.key);
+						}
 				}
 			} else {
 				switch(this.flags) {
 					case IDelta.MAJOR_VERSION :
-						buffer.append(Messages.bind(
+						buffer.append(NLS.bind(
 								Messages.deltaReportTask_entry_major_version,
 								this.arguments));
 						break;
 					case IDelta.MINOR_VERSION :
-						buffer.append(Messages.bind(
+						buffer.append(NLS.bind(
 								Messages.deltaReportTask_entry_minor_version,
 								this.arguments));
 						break;
 				}
 			}
-			return String.valueOf(buffer);
+			return CommonUtilsTask.convertToHtml(String.valueOf(buffer));
+		}
+		public String getDisplayKind() {
+			if (ADDED.equals(this.kind)) {
+				return Messages.AddedElement;
+			} else if (REMOVED.equals(this.kind)) {
+				return Messages.RemovedElement;
+			}
+			return Messages.ChangedElement;
 		}
 	}
 	boolean debug;
@@ -285,7 +345,7 @@ public class APIFreezeReportConversionTask extends Task {
 		dumpFooter(buffer);
 	}
 	private void dumpEntry(StringBuffer buffer, Entry entry) {
-		buffer.append(NLS.bind(Messages.deltaReportTask_entry, entry.getDisplayString()));
+		buffer.append(NLS.bind(Messages.deltaReportTask_entry, entry.getDisplayKind(), entry.getDisplayString()));
 	}
 	private void dumpEntryForComponent(StringBuffer buffer, String componentID) {
 		buffer.append(NLS.bind(Messages.deltaReportTask_componentEntry, componentID));
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeTask.java
index f8a1f46..b114dfe 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIFreezeTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,12 +19,14 @@ import java.io.StringWriter;
 
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.model.StubApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
 
 /**
  * Ant task to run the API freeze check during Eclipse build.
@@ -43,7 +45,7 @@ public class APIFreezeTask extends CommonUtilsTask {
 			StringWriter out = new StringWriter();
 			PrintWriter writer = new PrintWriter(out);
 			writer.println(
-				Messages.bind(Messages.printArguments,
+				NLS.bind(Messages.printArguments,
 					new String[] {
 						this.referenceBaselineLocation,
 						this.currentBaselineLocation,
@@ -78,16 +80,23 @@ public class APIFreezeTask extends CommonUtilsTask {
 		}
 		// run the comparison
 		// create baseline for the reference
-		IApiBaseline referenceBaseline = createBaseline(REFERENCE_PROFILE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
+		IApiBaseline referenceBaseline = createBaseline(REFERENCE_BASELINE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
 		IApiBaseline currentBaseline = createBaseline(CURRENT_BASELINE_NAME, getInstallDir(baselineInstallDir), this.eeFileLocation);
 		
+		ExcludedElements excludedElements = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation, currentBaseline, this.debug);
+
+		if (this.debug) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+			System.out.println("Excluded elements list:"); //$NON-NLS-1$
+			System.out.println(excludedElements);
+		}
 		IDelta delta = null;
 		if (this.debug) {
 			System.out.println("Creation of both baselines : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
 			time = System.currentTimeMillis();
 		}
 		try {
-			delta = ApiComparator.compare(referenceBaseline, currentBaseline, VisibilityModifiers.API, true);
+			delta = ApiComparator.compare(referenceBaseline, currentBaseline, VisibilityModifiers.API, true, null);
 		} finally {
 			if (this.debug) {
 				System.out.println("API freeze check : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -120,13 +129,13 @@ public class APIFreezeTask extends CommonUtilsTask {
 				if (!outputDir.exists()) {
 					if (!outputDir.mkdirs()) {
 						throw new BuildException(
-							Messages.bind(Messages.errorCreatingParentReportFile, outputDir.getAbsolutePath()));
+							NLS.bind(Messages.errorCreatingParentReportFile, outputDir.getAbsolutePath()));
 					}
 				}
 			}
 			try {
 				writer = new BufferedWriter(new FileWriter(outputFile));
-				ExcludeListDeltaVisitor visitor = new ExcludeListDeltaVisitor(this.excludeListLocation);
+				ExcludeListDeltaVisitor visitor = new ExcludeListDeltaVisitor(excludedElements, ExcludeListDeltaVisitor.CHECK_OTHER);
 				delta.accept(visitor);
 				writer.write(visitor.getXML());
 				writer.flush();
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java
index 4be9c78..75d4dc4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/APIToolsAnalysisTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,9 +31,9 @@ import java.util.Set;
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.IApiCoreConstants;
 import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
 import org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer;
@@ -49,6 +49,7 @@ import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
 import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblemFilter;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.w3c.dom.DOMException;
 import org.w3c.dom.Document;
@@ -209,6 +210,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			}
 			NodeList resources = root.getElementsByTagName(IApiXmlConstants.ELEMENT_RESOURCE);
 			ArrayList newfilters = new ArrayList();
+			ArrayList comments = new ArrayList();
 			for(int i = 0; i < resources.getLength(); i++) {
 				Element element = (Element) resources.item(i);
 				String typeName = element.getAttribute(IApiXmlConstants.ATTR_TYPE);
@@ -229,6 +231,8 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 					NodeList arguments = messageArguments.getElementsByTagName(IApiXmlConstants.ELEMENT_PROBLEM_MESSAGE_ARGUMENT);
 					int length = arguments.getLength();
 					messageargs = new String[length];
+					String comment = element.getAttribute(IApiXmlConstants.ATTR_COMMENT);
+					comments.add((comment.length() < 1 ? null : comment));
 					for (int k = 0; k < length; k++) {
 						Element messageArgument = (Element) arguments.item(k);
 						messageargs[k] = messageArgument.getAttribute(IApiXmlConstants.ATTR_VALUE);
@@ -236,7 +240,8 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 					newfilters.add(ApiProblemFactory.newApiProblem(null, typeName, messageargs, null, null, -1, -1, -1, id));
 				}
 			}
-			internalAddFilters(componentID, (IApiProblem[]) newfilters.toArray(new IApiProblem[newfilters.size()]));
+			internalAddFilters(componentID, (IApiProblem[]) newfilters.toArray(new IApiProblem[newfilters.size()]),
+					(String[]) comments.toArray(new String[comments.size()]));
 			newfilters.clear();
 		}
 
@@ -245,7 +250,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 		 * @param problems the problems to add the the store
 		 * @param persist if the filters should be auto-persisted after they are added
 		 */
-		private void internalAddFilters(String componentID, IApiProblem[] problems) {
+		private void internalAddFilters(String componentID, IApiProblem[] problems, String[] comments) {
 			if(problems == null) {
 				if(this.debug) {
 					System.out.println("null problems array not addding filters"); //$NON-NLS-1$
@@ -254,7 +259,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			}
 			for(int i = 0; i < problems.length; i++) {
 				IApiProblem problem = problems[i];
-				IApiProblemFilter filter = new ApiProblemFilter(componentID, problem);
+				IApiProblemFilter filter = new ApiProblemFilter(componentID, problem, comments[i]);
 				String typeName = problem.getTypeName();
 				if (typeName == null) {
 					typeName = GLOBAL;
@@ -415,7 +420,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 	private static final Summary[] NO_SUMMARIES = new Summary[0];
 	public static final String USAGE = "usage"; //$NON-NLS-1$
 
-	private Set excludedElement;
+	private ExcludedElements excludedElements;
 	private String filters;
 	private Properties properties;
 
@@ -453,7 +458,9 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			Summary summary = summaries[i];
 			String contents = null;
 			String componentID = summary.componentID;
-			if (this.excludedElement != null && this.excludedElement.contains(componentID)) {
+			if (this.excludedElements != null
+					&& (this.excludedElements.containsExactMatch(componentID)
+						|| this.excludedElements.containsPartialMatch(componentID))) {
 				continue;
 			}
 			try {
@@ -501,7 +508,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 				
 				for (Iterator iterator = bundlesNames.iterator(); iterator.hasNext();) {
 					String bundleName = (String) iterator.next();
-					if (this.excludedElement == null || !this.excludedElement.contains(bundleName)) {
+					if (this.excludedElements == null || !this.excludedElements.containsPartialMatch(bundleName)) {
 						Element bundle = document.createElement(IApiXmlConstants.ELEMENT_BUNDLE);
 						bundle.setAttribute(IApiXmlConstants.ATTR_NAME, bundleName);
 						report.appendChild(bundle);
@@ -538,7 +545,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			StringWriter out = new StringWriter();
 			PrintWriter writer = new PrintWriter(out);
 			writer.println(
-				Messages.bind(Messages.printArguments,
+				NLS.bind(Messages.printArguments,
 					new String[] {
 						this.referenceBaselineLocation,
 						this.currentBaselineLocation,
@@ -564,9 +571,6 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 				System.out.println("No exclude list location"); //$NON-NLS-1$
 			}
 		}
-		if (this.excludeListLocation != null) {
-			this.excludedElement = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation);
-		}
 		// unzip reference
 		long time = 0;
 		if (this.debug) {
@@ -581,9 +585,17 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 		}
 		// run the comparison
 		// create baseline for the reference
-		IApiBaseline referenceBaseline = createBaseline(REFERENCE_PROFILE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
+		IApiBaseline referenceBaseline = createBaseline(REFERENCE_BASELINE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
 		IApiBaseline currentBaseline = createBaseline(CURRENT_BASELINE_NAME, getInstallDir(baselineInstallDir), this.eeFileLocation);
 		
+		if (this.excludeListLocation != null) {
+			this.excludedElements = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation, currentBaseline, this.debug);
+			if (this.debug) {
+				System.out.println("===================================================================================="); //$NON-NLS-1$
+				System.out.println("Excluded elements list:"); //$NON-NLS-1$
+				System.out.println(this.excludedElements);
+			}
+		}
 		if (this.debug) {
 			System.out.println("Creation of both baselines : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
 			time = System.currentTimeMillis();
@@ -598,7 +610,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			Set visitedApiComponentNames = new HashSet();
 			for (int i = 0; i < length; i++) {
 				IApiComponent apiComponent = apiComponents[i];
-				String name = apiComponent.getId();
+				String name = apiComponent.getSymbolicName();
 				visitedApiComponentNames.add(name);
 				if (apiComponent.isSystemComponent()) {
 					continue;
@@ -644,7 +656,7 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 			IApiComponent[] baselineApiComponents = referenceBaseline.getApiComponents();
 			for (int i = 0, max = baselineApiComponents.length; i < max; i++) {
 				IApiComponent apiComponent = baselineApiComponents[i];
-				String id = apiComponent.getId();
+				String id = apiComponent.getSymbolicName();
 				if (!visitedApiComponentNames.remove(id)) {
 					//remove component in the current baseline
 					IApiProblem problem = ApiProblemFactory.newApiProblem(id,
@@ -662,18 +674,12 @@ public class APIToolsAnalysisTask extends CommonUtilsTask {
 							-1,
 							-1,
 							IApiProblem.CATEGORY_COMPATIBILITY,
-							IDelta.API_PROFILE_ELEMENT_TYPE,
+							IDelta.API_BASELINE_ELEMENT_TYPE,
 							IDelta.REMOVED,
 							IDelta.API_COMPONENT);
 					allProblems.put(id, new IApiProblem[] { problem });
 				}
 			}
-		} catch(CoreException e) {
-			IStatus status = e.getStatus();
-			if (status == null || status.getCode() != ApiPlugin.REPORT_BASELINE_IS_DISPOSED) {
-				throw new BuildException(e);
-			}
-			ApiPlugin.log(e);
 		} finally {
 			if (this.debug) {
 				System.out.println("API tools verification check : " + (System.currentTimeMillis() - time) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
index b74af7c..53ee6e9 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/AnalysisReportConversionTask.java
@@ -29,6 +29,7 @@ import javax.xml.parsers.SAXParserFactory;
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.IApiXmlConstants;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.util.Util;
@@ -189,8 +190,8 @@ public class AnalysisReportConversionTask extends Task {
 					});
 		}
 	}
-	private static final Problem[] NO_PROBLEMS = new Problem[0];
-	private static final String[] NO_NON_API_BUNDLES = new String[0];
+	static final Problem[] NO_PROBLEMS = new Problem[0];
+	static final String[] NO_NON_API_BUNDLES = new String[0];
 	boolean debug;
 
 	private String htmlReportsLocation;
@@ -257,7 +258,7 @@ public class AnalysisReportConversionTask extends Task {
 					MessageFormat.format(
 						Messages.fullReportTask_indexheader,
 						new String[] {
-							Messages.bind(Messages.fullReportTask_nonApiBundleSummary, allNonApiBundleSummary.link)
+							NLS.bind(Messages.fullReportTask_nonApiBundleSummary, allNonApiBundleSummary.link)
 						}));
 			} else {
 				writer.println(
@@ -280,7 +281,7 @@ public class AnalysisReportConversionTask extends Task {
 			writer.println(Messages.fullReportTask_indexfooter);
 			writer.flush();
 		} catch (IOException e) {
-			throw new BuildException(Messages.bind(Messages.ioexception_writing_html_file, htmlFile.getAbsolutePath()));
+			throw new BuildException(NLS.bind(Messages.ioexception_writing_html_file, htmlFile.getAbsolutePath()));
 		} finally {
 			if (writer != null) {
 				writer.close();
@@ -344,7 +345,7 @@ public class AnalysisReportConversionTask extends Task {
 		File parent = htmlFile.getParentFile();
 		if (!parent.exists()) {
 			if (!parent.mkdirs()) {
-				throw new BuildException(Messages.bind(Messages.could_not_create_file, htmlName));
+				throw new BuildException(NLS.bind(Messages.could_not_create_file, htmlName));
 			}
 		}
 		PrintWriter writer = null;
@@ -365,7 +366,7 @@ public class AnalysisReportConversionTask extends Task {
 			}
 			writer.flush();
 		} catch (IOException e) {
-			throw new BuildException(Messages.bind(Messages.ioexception_writing_html_file, htmlName));
+			throw new BuildException(NLS.bind(Messages.ioexception_writing_html_file, htmlName));
 		} finally {
 			if (writer != null) {
 				writer.close();
@@ -385,10 +386,7 @@ public class AnalysisReportConversionTask extends Task {
 		}
 		this.reportsRoot = new File(this.xmlReportsLocation);
 		if (!this.reportsRoot.exists() || !this.reportsRoot.isDirectory()) {
-			throw new BuildException(
-				Messages.bind(
-					Messages.invalid_directory_name,
-					this.xmlReportsLocation));
+			throw new BuildException(NLS.bind(Messages.invalid_directory_name, this.xmlReportsLocation));
 		}
 		SAXParserFactory factory = SAXParserFactory.newInstance();
 		SAXParser parser = null;
@@ -409,10 +407,7 @@ public class AnalysisReportConversionTask extends Task {
 		this.htmlRoot = new File(this.htmlReportsLocation);
 		if (!this.htmlRoot.exists()) {
 			if (!this.htmlRoot.mkdirs()) {
-				throw new BuildException(
-					Messages.bind(
-						Messages.could_not_create_file,
-						this.htmlReportsLocation));
+				throw new BuildException(NLS.bind(Messages.could_not_create_file, this.htmlReportsLocation));
 			}
 		}
 		if (this.debug) {
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java
index e23f4ca..3fde81a 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
 
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
@@ -38,6 +40,7 @@ import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.ApiDescription;
 import org.eclipse.pde.api.tools.internal.ApiDescriptionXmlCreator;
 import org.eclipse.pde.api.tools.internal.CompilationUnit;
@@ -163,9 +166,11 @@ public class ApiFileGenerationTask extends Task {
 	/**
 	 * Set the extra manifest files' locations.
 	 * 
-	 * <br><br>This is a list of extra MANIFEST.MF files' locations that can be set to provide more api
-	 * packages to scan. They are separated by the platform path separator. Each entry must exist.
-	 * <br><br>They should be specified using absolute paths.
+	 * <p>This is a list of extra MANIFEST.MF files' locations that can be set to provide more api
+	 * packages to scan. They are separated by the platform path separator. Each entry must exist.</p>
+	 * <p>If the path is not absolute, it will be resolved relative to the current working directory.</p>
+	 * <p>Jar files can be specified instead of MANIFEST.MF file. If a jar file is specified, its MANIFEST.MF file
+	 * will be read if it exists.</p>
 	 *
 	 * @param manifests the given extra manifest files' locations
 	 */
@@ -195,7 +200,7 @@ public class ApiFileGenerationTask extends Task {
 			StringWriter out = new StringWriter();
 			PrintWriter writer = new PrintWriter(out);
 			writer.println(
-				Messages.bind(Messages.api_generation_printArguments,
+				NLS.bind(Messages.api_generation_printArguments,
 					new String[] {
 						this.projectName,
 						this.projectLocation,
@@ -226,7 +231,7 @@ public class ApiFileGenerationTask extends Task {
 				System.err.println("Must be a directory : " + this.projectLocation); //$NON-NLS-1$
 			}
 			throw new BuildException(
-					Messages.bind(Messages.api_generation_projectLocationNotADirectory, this.projectLocation));
+					NLS.bind(Messages.api_generation_projectLocationNotADirectory, this.projectLocation));
 		}
 		// check if the project contains the api tools nature
 		File dotProjectFile = new File(root, ".project"); //$NON-NLS-1$
@@ -243,7 +248,7 @@ public class ApiFileGenerationTask extends Task {
 				System.err.println("Must be a directory : " + this.targetFolder); //$NON-NLS-1$
 			}
 			throw new BuildException(
-				Messages.bind(Messages.api_generation_targetFolderNotADirectory, this.targetFolder));
+				NLS.bind(Messages.api_generation_targetFolderNotADirectory, this.targetFolder));
 		}
 		File apiDescriptionFile = new File(targetProjectFolder, IApiCoreConstants.API_DESCRIPTION_XML_NAME);
 		if (apiDescriptionFile.exists()) {
@@ -260,7 +265,7 @@ public class ApiFileGenerationTask extends Task {
 			for (int i = 0; i < allBinaryLocations.length; i++) {
 				container = getContainer(allBinaryLocations[i]);
 				if (container == null) {
-					throw new BuildException(Messages.bind(Messages.api_generation_invalidBinaryLocation, allBinaryLocations[i]));
+					throw new BuildException(NLS.bind(Messages.api_generation_invalidBinaryLocation, allBinaryLocations[i]));
 				}
 				allContainers.add(container);
 			}
@@ -298,10 +303,21 @@ public class ApiFileGenerationTask extends Task {
 					Set currentApiPackages = null;
 					if (currentManifest.exists()) {
 						BufferedInputStream inputStream = null;
+						ZipFile zipFile = null;
 						try {
-							inputStream = new BufferedInputStream(new FileInputStream(currentManifest));
-							manifestMap = ManifestElement.parseBundleManifest(inputStream, null);
-							currentApiPackages = collectApiPackageNames(manifestMap);
+							if (isZipJarFile(currentManifest.getName())) {
+								zipFile = new ZipFile(currentManifest);
+								final ZipEntry entry = zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
+								if (entry != null) {
+									inputStream = new BufferedInputStream(zipFile.getInputStream(entry));
+								}
+							} else {
+								inputStream = new BufferedInputStream(new FileInputStream(currentManifest));
+							}
+							if (inputStream != null) {
+								manifestMap = ManifestElement.parseBundleManifest(inputStream, null);
+								currentApiPackages = collectApiPackageNames(manifestMap);
+							}
 						} catch (FileNotFoundException e) {
 							ApiPlugin.log(e);
 						} catch (IOException e) {
@@ -313,7 +329,17 @@ public class ApiFileGenerationTask extends Task {
 								try {
 									inputStream.close();
 								} 
-								catch(IOException e) {}
+								catch(IOException e) {
+									// ignore
+								}
+							}
+							if (zipFile != null) {
+								try {
+									zipFile.close();
+								} 
+								catch(IOException e) {
+									// ignore
+								}
 							}
 						}
 					}
@@ -362,7 +388,7 @@ public class ApiFileGenerationTask extends Task {
 					System.out.println("Unit name[" + i + "] : " + unit.getName()); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				try {
-					tagScanner.scan(unit, apiDescription, classFileContainer, options);
+					tagScanner.scan(unit, apiDescription, classFileContainer, options, null);
 				} catch (CoreException e) {
 					ApiPlugin.log(e);
 				} finally {
@@ -377,7 +403,7 @@ public class ApiFileGenerationTask extends Task {
 		}
 		try {
 			ApiDescriptionXmlCreator xmlVisitor = new ApiDescriptionXmlCreator(this.projectName, this.projectName);
-			apiDescription.accept(xmlVisitor);
+			apiDescription.accept(xmlVisitor, null);
 			String xml = xmlVisitor.getXML();
 			Util.saveFile(apiDescriptionFile, xml);
 		} catch (CoreException e) {
@@ -392,7 +418,7 @@ public class ApiFileGenerationTask extends Task {
 	 * @param path
 	 * @return true if the given path name ends with one of the collected API package names 
 	 */
-	private boolean isApi(String path) {
+	boolean isApi(String path) {
 		String pkg = null;
 		for(Iterator iter = this.apiPackages.iterator(); iter.hasNext();) {
 			pkg = (String) iter.next();
@@ -457,7 +483,7 @@ public class ApiFileGenerationTask extends Task {
 	 * @param manifestmap
 	 * @return The derived {@link JavaCore#COMPILER_COMPLIANCE} from the BREE in the manifest map,
 	 * or {@link JavaCore#VERSION_1_3} if there is no BREE entry in the map or if the BREE entry does not directly map
-	 * to one of {"1.3", "1.4", "1.5", "1.6"}.
+	 * to one of {"1.3", "1.4", "1.5", "1.6", "1.7"}.
 	 */
 	private String resolveCompliance(Map manifestmap) {
 		if(manifestmap != null) {
@@ -472,6 +498,9 @@ public class ApiFileGenerationTask extends Task {
 				if("JavaSE-1.6".equals(eename)) { //$NON-NLS-1$
 					return JavaCore.VERSION_1_6;
 				}
+				if("JavaSE-1.7".equals(eename)) { //$NON-NLS-1$
+					return JavaCore.VERSION_1_7;
+				}
 			}
 		}
 		return JavaCore.VERSION_1_3;
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationReportConversionTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationReportConversionTask.java
new file mode 100644
index 0000000..5174c17
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationReportConversionTask.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.api.tools.internal.tasks;
+
+import java.io.File;
+
+import org.apache.tools.ant.BuildException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.search.MigrationReportConvertor;
+import org.eclipse.pde.api.tools.internal.search.UseReportConverter;
+import org.eclipse.pde.api.tools.internal.util.Util;
+
+/**
+ * Task to convert a report generated from {@link ApiMigrationTask} to HTML
+ * 
+ * @since 1.0.1
+ * @see ApiMigrationTask
+ */
+public class ApiMigrationReportConversionTask extends CommonUtilsTask {
+
+	private String xmlReportsLocation = null;
+	private String htmlReportsLocation = null;
+	private String xsltFileLocation = null;
+	private String[] filterPatterns = null;
+	private String[] toPatterns = null;
+	
+	/**
+	 * Set the debug value.
+	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
+	 * <p>Default is <code>false</code>.</p>
+	 *
+	 * @param debugValue the given debug value
+	 */
+	public void setDebug(String debugValue) {
+		this.debug = Boolean.toString(true).equals(debugValue); 
+	}
+	/**
+	 * Set the location where the html reports are generated.
+	 * 
+	 * <p>This is optional. If not set, the html files are created in the same folder as the
+	 * xml files.</p>
+	 * <p>The location is set using an absolute path.</p>
+	 * 
+	 * @param htmlFilesLocation the given the location where the html reports are generated
+	 */
+	public void setHtmlFiles(String htmlFilesLocation) {
+		this.htmlReportsLocation = htmlFilesLocation;
+	}
+	/**
+	 * Set the location where the xml reports are retrieved.
+	 * 
+	 * <p>The location is set using an absolute path.</p>
+	 *
+	 * @param xmlFilesLocation the given location to retrieve the xml reports
+	 */
+	public void setXmlFiles(String xmlFilesLocation) {
+		this.xmlReportsLocation = xmlFilesLocation;
+	}
+	
+	/**
+	 * Set the group of {@link String} patterns to use as heuristics to filter
+	 * references to names matching any of the given patterns during the report conversion
+	 * @param patterns
+	 */
+	public void setToFilterPatterns(String patterns) {
+		this.toPatterns = parsePatterns(patterns);
+	}
+	
+	/**
+	 * Set the group of {@link String} patterns to use as heuristics to filter
+	 * references from names matching any of the given patterns during the report conversion
+	 * @param patterns
+	 */
+	public void setFilterPatterns(String patterns) {
+		this.filterPatterns = parsePatterns(patterns);	
+	}
+	
+	/**
+	 * Sets the location of the XSLT file to use in the conversion of the XML
+	 * the HTML.
+	 * 
+	 * <p>This is optional. If none is specified, then a default one is used.</p>
+	 * 
+	 * <p>The location is an absolute path.</p>
+	 * 
+	 * @param xsltFileLocation
+	 */
+	public void setXSLTFile(String xsltFileLocation) {
+		this.xsltFileLocation = xsltFileLocation;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() throws BuildException {
+		if (this.debug) {
+			System.out.println("XML report location: " + this.xmlReportsLocation); //$NON-NLS-1$
+			System.out.println("HTML report location: " + this.htmlReportsLocation); //$NON-NLS-1$
+			if (this.xsltFileLocation == null) {
+				System.out.println("No XSLT file specified: using default"); //$NON-NLS-1$}
+			} else {
+				System.out.println("XSLT file location: " + this.xsltFileLocation); //$NON-NLS-1$}
+			}
+		}
+		try {
+			Util.delete(new File(this.htmlReportsLocation));
+			MigrationReportConvertor converter = new MigrationReportConvertor(this.htmlReportsLocation, this.xmlReportsLocation, this.toPatterns, this.filterPatterns);
+			UseReportConverter.setDebug(this.debug);
+			converter.convert(this.xsltFileLocation, null);
+			File index = converter.getReportIndex();
+			System.out.println(NLS.bind(
+					Messages.ApiUseReportConversionTask_conversion_complete,
+					index.getAbsolutePath()));
+		}
+		catch(Exception e) {
+			throw new BuildException(e);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationTask.java
new file mode 100644
index 0000000..98ee673
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiMigrationTask.java
@@ -0,0 +1,358 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.api.tools.internal.tasks;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
+
+import org.apache.tools.ant.BuildException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.osgi.service.resolver.ResolverError;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.search.ReferenceLookupVisitor;
+import org.eclipse.pde.api.tools.internal.search.SkippedComponent;
+import org.eclipse.pde.api.tools.internal.search.UseScanParser;
+import org.eclipse.pde.api.tools.internal.util.Util;
+
+/**
+ * Ant task for performing analysis of an API use scan against an alterante target (migration candidate)
+ */
+public final class ApiMigrationTask extends CommonUtilsTask {
+	
+	/**
+	 * Set of project names that were not searched
+	 */
+	private TreeSet notsearched = null;
+	/**
+	 * The regex pattern to use to compose the scope
+	 */
+	private String scopepattern = null;
+	/**
+	 * The regex pattern to use to compose the reference set of component ids
+	 */
+	private String referencepattern = null;
+	
+	/**
+	 * handle to the baseline install dir to delete after the scan completes
+	 */
+	private File baselinedir = null;
+	
+	/**
+	 * Location of the API use scan to resolve in the migration candidate.
+	 * This can be the root directory containing an 'xml' sub directory or the 'xml'
+	 * directory itself.
+	 */
+	private String scanLocation = null;
+	
+	/**
+	 * Set the location of the product you want to use as the migration candidate.
+	 * 
+	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
+	 * the Eclipse installation folder. This is the directory is which you can find the 
+	 * Eclipse executable.
+	 * </p>
+	 *
+	 * @param location the location for the migration candidate to consider
+	 */
+	public void setCandidate(String location) {
+		this.currentBaselineLocation = location;
+	}
+
+	/**
+	 * Set the regular expression pattern used to build the scope of elements to search for 
+	 * references from in the product location.
+	 * 
+	 * <p>
+	 * The pattern must be a well-formatted regular expression as
+	 * defined here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html 
+	 * </p>
+	 * @param scopepattern
+	 */
+	public void setScopePattern(String scopepattern) {
+		this.scopepattern = scopepattern;
+	}
+	
+	/**
+	 * Set the regular expression pattern used to build the scope of elements to search for 
+	 * references to in the product location.
+	 * 
+	 * <p>
+	 * The pattern must be a well-formatted regular expression as
+	 * defined here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html 
+	 * </p>
+	 * @param referencepattern
+	 */
+	public void setReferencePattern(String referencepattern) {
+		this.referencepattern = referencepattern;
+	}
+	
+	/**
+	 * Set the output location where the reports will be generated.
+	 * 
+	 * <p>Once the task is completed, reports are available in this directory using a structure
+	 * similar to the filter root. A sub-folder is created for each component that has problems
+	 * to be reported. Each sub-folder contains a file called "report.xml". </p>
+	 * 
+	 * <p>A special folder called "allNonApiBundles" is also created in this folder that contains a xml file called
+	 * "report.xml". This file lists all the bundles that are not using the api tooling nature.</p>
+	 * 
+	 * @param baselineLocation the given location for the reference baseline to analyze
+	 */
+	public void setReport(String reportlocation) {
+		this.reportLocation = reportlocation;
+	}
+	
+	/**
+	 * Set the location of an existing API use scan containing references to re-resolve in the
+	 * migration candidate. This can be the root directory containing 'xml' and 'html' subdirectories
+	 * or the 'xml' directory itself.
+	 * 
+	 * <p>A special folder called "allNonApiBundles" is also created in this folder that contains a xml file called
+	 * "report.xml". This file lists all the bundles that are not using the api tooling nature.</p>
+	 * 
+	 * @param baselineLocation the given location for the reference baseline to analyze
+	 */
+	public void setUseScan(String scanLocation) {
+		this.scanLocation = scanLocation;
+	}
+	
+	/**
+	 * Set the debug value.
+	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
+	 * <p>Default is <code>false</code>.</p>
+	 *
+	 * @param debugValue the given debug value
+	 */
+	public void setDebug(String debugValue) {
+		this.debug = Boolean.toString(true).equals(debugValue); 
+	}
+	
+	/**
+	 * @see org.eclipse.pde.api.tools.internal.tasks.UseTask#assertParameters()
+	 */
+	protected void assertParameters() throws BuildException {
+		if (this.reportLocation == null) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiUseTask_missing_report_location, 
+					new String[] {this.reportLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+		if (this.currentBaselineLocation == null) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiUseTask_missing_baseline_argument, 
+					new String[] {this.currentBaselineLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+		if (this.scanLocation == null) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiMigrationTask_missing_scan_location, 
+					new String[] {this.scanLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}		
+		String xmlLocation = scanLocation;
+		File file = new File(xmlLocation);
+		if (!file.exists()) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiMigrationTask_scan_location_not_exist, 
+					new String[] {this.scanLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+		if (!file.isDirectory()) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiMigrationTask_scan_location_not_dir, 
+					new String[] {this.scanLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}		
+		if (this.reportLocation.equals(scanLocation)) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiMigrationTask_scan_locatoin_same_as_report_location, 
+					new String[] {this.scanLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() throws BuildException {
+		assertParameters();
+		writeDebugHeader();
+		cleanReportLocation();
+		
+		IApiBaseline baseline = getBaseline(CURRENT_BASELINE_NAME, this.currentBaselineLocation);
+		try {
+			String xmlLocation = scanLocation;
+			File file = new File(xmlLocation);
+			File nested = new File(file, "xml"); //$NON-NLS-1$
+			if (nested.exists() && nested.isDirectory()) {
+				file = nested;
+			}
+			ReferenceLookupVisitor lookup = new ReferenceLookupVisitor(baseline, this.reportLocation);
+			lookup.setAnalysisScope(scopepattern);
+			lookup.setTargetScope(referencepattern);
+			UseScanParser parser = new UseScanParser();
+			parser.parse(file.getAbsolutePath(), new NullProgressMonitor(), lookup);
+		}
+		catch(CoreException ce) {
+			throw new BuildException(ce.getStatus().getMessage(), ce);
+		}
+		catch (Exception e) {
+			throw new BuildException(e.getMessage(), e);
+		}
+		finally {
+			if(baseline != null) {
+				baseline.dispose();
+				deleteBaseline(this.currentBaselineLocation, this.baselinedir);
+			}
+		}
+	}
+	
+	/**
+	 * Returns if we should add the given component to our search scope
+	 * @param component
+	 * @param pattern
+	 * @param allowresolve
+	 * @return true if the given component should be considered, false otherwise
+	 * @throws CoreException
+	 */
+	boolean acceptComponent(IApiComponent component, Pattern pattern, boolean allowresolve) throws CoreException {
+		if(!allowresolve) {
+			ResolverError[] errors = component.getErrors();
+			if(errors != null) {
+				this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), errors)); 
+				return false;
+			}
+		}
+		if(component.isSystemComponent()) {
+			return false;
+		}
+		if(pattern != null) {
+			return pattern.matcher(component.getSymbolicName()).matches();
+		}
+		return true;
+	}
+	
+	/**
+	 * Prepares and creates and new baseline with the given name from the given location. The
+	 * returned {@link IApiBaseline} is not checked for resolution errors or consistency. If <code>null</code>
+	 * is passed in as a location <code>null</code> is returned.
+	 * 
+	 * @param name the name to give to the baseline
+	 * @param location the location the baseline should be prepared from. If <code>null</code> is passed in, <code>null</code>
+	 * is returned
+	 * @return a new {@link IApiBaseline} with the given name from the given location or <code>null</code> if the given location
+	 * is <code>null</code>
+	 */
+	protected IApiBaseline getBaseline(String name, String location) {
+		if(location == null) {
+			return null;
+		}
+		//extract the baseline to examine
+		long time = 0;
+		if (this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Preparing '"+name+"' baseline installation..."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		File installdir = extractSDK(name, location);
+		if (this.debug) {
+			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			time = System.currentTimeMillis();
+		}
+		//create the baseline to examine
+		if(this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Creating '"+name+"' baseline..."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		IApiBaseline baseline = createBaseline(name, getInstallDir(installdir), this.eeFileLocation);
+		if (this.debug) {
+			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		this.baselinedir = installdir;
+		return baseline;
+	}
+	
+	/**
+	 * Cleans the report location specified by the parameter {@link CommonUtilsTask#reportLocation}
+	 */
+	protected void cleanReportLocation() {
+		if(this.reportLocation == null) {
+			return;
+		}
+		long time = 0;
+		if(this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Cleaning report location..."); //$NON-NLS-1$
+		}
+		File file = new File(this.reportLocation);
+		if(file.exists()) {
+			Util.delete(file);
+		}
+		if(this.debug) {
+			System.out.println("done in: "+ (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+	
+	/**
+	 * Writes a general header of debug information iff the debug flag is set to true
+	 */
+	protected void writeDebugHeader() {
+		if (this.debug) {
+			System.out.println("Migration candidate to analyze : " + this.currentBaselineLocation); //$NON-NLS-1$
+			System.out.println("Report location : " + this.reportLocation); //$NON-NLS-1$
+			System.out.println("Scan location : " + this.scanLocation); //$NON-NLS-1$
+			if(this.scopepattern == null) {
+				System.out.println("No scope pattern defined - searching all bundles"); //$NON-NLS-1$
+			}
+			else {
+				System.out.println("Scope pattern : " + this.scopepattern); //$NON-NLS-1$
+			}
+			if(this.referencepattern == null) {
+				System.out.println("No baseline pattern defined - reporting references to all bundles"); //$NON-NLS-1$
+			}
+			else {
+				System.out.println("Baseline pattern : " + this.referencepattern); //$NON-NLS-1$
+			}
+			System.out.println("-----------------------------------------------------------------------------------------------------"); //$NON-NLS-1$
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseReportConversionTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseReportConversionTask.java
index cd046f3..33f881e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseReportConversionTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseReportConversionTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,8 @@ import java.io.File;
 
 import org.apache.tools.ant.BuildException;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.api.tools.internal.search.ApiUseReportConverter;
+import org.eclipse.pde.api.tools.internal.search.UseReportConverter;
+import org.eclipse.pde.api.tools.internal.util.Util;
 
 /**
  * Default task for converting the XML output from the apitooling.apiuse ant task
@@ -28,6 +29,8 @@ public final class ApiUseReportConversionTask extends CommonUtilsTask {
 	private String xmlReportsLocation = null;
 	private String htmlReportsLocation = null;
 	private String xsltFileLocation = null;
+	private String[] filterPatterns = null;
+	private String[] toPatterns = null;
 	
 	/**
 	 * Set the debug value.
@@ -63,6 +66,24 @@ public final class ApiUseReportConversionTask extends CommonUtilsTask {
 	}
 	
 	/**
+	 * Set the group of {@link String} patterns to use as heuristics to filter
+	 * references to names matching any of the given patterns during the report conversion
+	 * @param patterns
+	 */
+	public void setToFilterPatterns(String patterns) {
+		this.toPatterns = parsePatterns(patterns);
+	}
+	
+	/**
+	 * Set the group of {@link String} patterns to use as heuristics to filter
+	 * references from names matching any of the given patterns during the report conversion
+	 * @param patterns
+	 */
+	public void setFilterPatterns(String patterns) {
+		this.filterPatterns = parsePatterns(patterns);	
+	}
+	
+	/**
 	 * Sets the location of the XSLT file to use in the conversion of the XML
 	 * the HTML.
 	 * 
@@ -90,9 +111,9 @@ public final class ApiUseReportConversionTask extends CommonUtilsTask {
 			}
 		}
 		try {
-			scrubReportLocation(new File(this.htmlReportsLocation));
-			ApiUseReportConverter converter = new ApiUseReportConverter(this.htmlReportsLocation, this.xmlReportsLocation);
-			ApiUseReportConverter.setDebug(this.debug);
+			Util.delete(new File(this.htmlReportsLocation));
+			UseReportConverter converter = new UseReportConverter(this.htmlReportsLocation, this.xmlReportsLocation, this.toPatterns, this.filterPatterns);
+			UseReportConverter.setDebug(this.debug);
 			converter.convert(this.xsltFileLocation, null);
 			File index = converter.getReportIndex();
 			System.out.println(NLS.bind(
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseTask.java
index fd9d07d..f861e5b 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiUseTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,118 +11,134 @@
 
 package org.eclipse.pde.api.tools.internal.tasks;
 
+import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.util.Calendar;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.regex.Pattern;
 
 import org.apache.tools.ant.BuildException;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.service.resolver.ResolverError;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
+import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.search.XMLApiSearchReporter;
+import org.eclipse.pde.api.tools.internal.provisional.search.ApiSearchEngine;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
+import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
+import org.eclipse.pde.api.tools.internal.search.ApiDescriptionModifier;
+import org.eclipse.pde.api.tools.internal.search.SkippedComponent;
+import org.eclipse.pde.api.tools.internal.search.UseMetadata;
+import org.eclipse.pde.api.tools.internal.search.UseSearchRequestor;
+import org.eclipse.pde.api.tools.internal.search.XmlSearchReporter;
+import org.eclipse.pde.api.tools.internal.util.Util;
+
+import com.ibm.icu.text.DateFormat;
 
 /**
  * Ant task for performing the API use analysis of a given Eclipse SDK
  * 
  * @since 1.0.1
- * @noextend This class is not intended to be subclassed by clients.
  */
-public class ApiUseTask extends UseTask {
+public final class ApiUseTask extends CommonUtilsTask {
 	
 	/**
-	 * Set the flag to indicate if the usage scan should try to proceed when an error is encountered
-	 * or stop.
-	 * <p>
-	 * The default value is <code>false</code>.
-	 * </p>
-	 * @param proceed if the scan should try to continue in the face of errors. Valid values 
-	 * are <code>true</code> or <code>false</code>.
+	 * If api references should be considered in the search
 	 */
-	public void setProceedOnError(String proceed) {
-		this.proceedonerror = Boolean.valueOf(proceed).booleanValue();
-	}
+	private boolean considerapi = false;
+	/**
+	 * If internal references should be considered in the search
+	 */
+	private boolean considerinternal = false;
+	/**
+	 * if illegal API use should be reported in the search
+	 * @since 1.1
+	 */
+	private boolean considerillegaluse = false;
+	/**
+	 * Set of project names that were not searched
+	 */
+	private TreeSet notsearched = null;
+	/**
+	 * The regex pattern to use to compose the scope
+	 */
+	private String scopepattern = null;
+	/**
+	 * The regex pattern to use to compose the reference set of component ids
+	 */
+	private String referencepattern = null;
 	
 	/**
-	 * Set the flag to indicate if the usage search should include system libraries in the scope and baseline.
-	 * <p>
-	 * The default value is <code>false</code>.
-	 * </p>
-	 * @param include if system libraries should be considered in the search scope and baseline. Valid values 
-	 * are <code>true</code> or <code>false</code>.
+	 * handle to the baseline install dir to delete after the scan completes
 	 */
-	public void setIncludeSystemLibraries(String include) {
-		this.includesystemlibraries = Boolean.valueOf(include).booleanValue();
-	}
+	private File baselinedir = null;
+	
+	/**
+	 * Package name patterns (regular expressions) to consider as API or <code>null</code> if none.
+	 */
+	private String[] apiPatterns = null;
+	
+	/**
+	 * Package name patterns (regular expressions) to consider as internal or <code>null</code> if none.
+	 */
+	private String[] internalPatterns = null;
+	
+	/**
+	 * Archive name patterns to not scan during analysis.
+	 * Formulation:
+	 * <pre>
+	 * <bundle name>:<path to jar>
+	 * </pre>
+	 */
+	private String[] archivePatterns = null;
 	
 	/**
-	 * Set the location of the current product or baseline that you want to search.
+	 * Set the location of the current product you want to search.
 	 * 
 	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
 	 * the Eclipse installation folder. This is the directory is which you can find the 
 	 * Eclipse executable.
 	 * </p>
 	 *
-	 * @param baselineLocation the given location for the baseline to analyze
+	 * @param location the given location for the baseline to analyze
 	 */
-	public void setBaseline(String baselineLocation) {
-		this.currentBaselineLocation = baselineLocation;
+	public void setLocation(String location) {
+		this.currentBaselineLocation = location;
 	}
-	
+
 	/**
-	 * Sets the location of the scope to search against. If a scope is not provided, the baseline
-	 * will act a both a scope and a baseline: i.e. the baseline will be searched for a complete reference graph.
+	 * Set the regular expression pattern used to build the scope of elements to search for 
+	 * references from in the product location.
 	 * 
-	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to
-	 * a location of bundles that make a complete resolved baseline (i.e. bundles and all of their dependencies).
+	 * <p>
+	 * The pattern must be a well-formatted regular expression as
+	 * defined here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html 
 	 * </p>
-	 * 
-	 * @param scopeLocation the given location for the scope to search against
+	 * @param scopepattern
 	 */
-	public void setScope(String scopeLocation) {
-		this.scopeLocation = scopeLocation;
+	public void setScopePattern(String scopepattern) {
+		this.scopepattern = scopepattern;
 	}
 	
 	/**
-	 * Sets a flag to indicate if projects that have not been set up for API tooling should be allowed 
-	 * in the search scope.
+	 * Set the regular expression pattern used to build the scope of elements to search for 
+	 * references to in the product location.
+	 * 
 	 * <p>
-	 * The default value is <code>false</code>.
+	 * The pattern must be a well-formatted regular expression as
+	 * defined here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html 
 	 * </p>
-	 * @param includenonapi if non- API enabled projects should be included in the search scope. Valid values 
-	 * are <code>true</code> or <code>false</code>.
+	 * @param referencepattern
 	 */
-	public void setIncludeNonApiProjects(String includenonapi) {
-		this.includenonapi = Boolean.valueOf(includenonapi).booleanValue();
+	public void setReferencePattern(String referencepattern) {
+		this.referencepattern = referencepattern;
 	}
 	
 	/**
-	 * Set the exclude list location.
-	 * 
-	 * <p>The exclude list is used to know what bundles should excluded from the xml report generated by the task
-	 * execution. Lines starting with '#' are ignored from the excluded elements.</p>
-	 * <p>The format of the exclude list file looks like this:</p>
-	 * <pre>
-	 * # DOC BUNDLES
-	 * org.eclipse.jdt.doc.isv
-	 * org.eclipse.jdt.doc.user
-	 * org.eclipse.pde.doc.user
-	 * org.eclipse.platform.doc.isv
-	 * org.eclipse.platform.doc.user
-	 * # NON-ECLIPSE BUNDLES
-	 * com.ibm.icu
-	 * com.jcraft.jsch
-	 * javax.servlet
-	 * javax.servlet.jsp
-	 * ...
-	 * </pre>
-	 * <p>The location is set using an absolute path.</p>
-	 *
-	 * @param excludeListLocation the given location for the excluded list file
-	 */
-	public void setExcludeList(String excludeListLocation) {
-		this.excludeListLocation = excludeListLocation;
-	}
-
-	/**
 	 * Set the output location where the reports will be generated.
 	 * 
 	 * <p>Once the task is completed, reports are available in this directory using a structure
@@ -134,20 +150,8 @@ public class ApiUseTask extends UseTask {
 	 * 
 	 * @param baselineLocation the given location for the reference baseline to analyze
 	 */
-	public void setReport(String reportLocation) {
-		this.reportLocation = reportLocation;
-	}
-	
-	/**
-	 * Set the execution environment file to use.
-	 * <p>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment
-	 * is used.</p>
-	 * <p>The file is specified using an absolute path. This is optional.</p> 
-	 *
-	 * @param eeFileLocation the given execution environment file
-	 */
-	public void setEEFile(String eeFileLocation) {
-		this.eeFileLocation = eeFileLocation;
+	public void setReport(String reportlocation) {
+		this.reportLocation = reportlocation;
 	}
 	
 	/**
@@ -173,6 +177,26 @@ public class ApiUseTask extends UseTask {
 	}
 	
 	/**
+	 * Sets if illegal API use should be considered in the search.
+	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
+	 * <p>Default is <code>false</code>.</p>
+	 * 
+	 * @param considerillegaluse the given value
+	 */
+	public void setConsiderIllegalUse(String considerillegaluse) {
+		this.considerillegaluse = Boolean.toString(true).equals(considerillegaluse);
+	}
+	
+	/**
+	 * Sets any package name patterns to consider as API packages.
+	 * 
+	 * @param patterns comma separated list of regular expressions or <code>null</code>
+	 */
+	public void setApiPatterns(String patterns) {
+		apiPatterns = parsePatterns(patterns);
+	}
+	
+	/**
 	 * Sets if references to internal types should be considered in the search.
 	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
 	 * <p>Default is <code>false</code>.</p>
@@ -184,20 +208,51 @@ public class ApiUseTask extends UseTask {
 	}
 	
 	/**
+	 * Sets any package name patterns to consider as internal packages.
+	 * 
+	 * @param patterns comma separated list of regular expressions or <code>null</code>
+	 */
+	public void setInternalPatterns(String patterns) {
+		internalPatterns = parsePatterns(patterns);	
+	}
+	
+	/**
+	 * Sets any archive name patterns to not scan during the analysis.
+	 * 
+	 * @param patterns
+	 */
+	public void setArchivePatterns(String patterns) {
+		archivePatterns = parsePatterns(patterns);
+	}
+	
+	/**
 	 * @see org.eclipse.pde.api.tools.internal.tasks.UseTask#assertParameters()
 	 */
 	protected void assertParameters() throws BuildException {
-		super.assertParameters();
 		if (this.reportLocation == null) {
 			StringWriter out = new StringWriter();
 			PrintWriter writer = new PrintWriter(out);
-			writer.println(Messages.bind(
+			writer.println(NLS.bind(
 					Messages.ApiUseTask_missing_report_location, 
 					new String[] {this.reportLocation}));
 			writer.flush();
 			writer.close();
 			throw new BuildException(String.valueOf(out.getBuffer()));
 		}
+		if (this.currentBaselineLocation == null) {
+			StringWriter out = new StringWriter();
+			PrintWriter writer = new PrintWriter(out);
+			writer.println(NLS.bind(
+					Messages.ApiUseTask_missing_baseline_argument, 
+					new String[] {this.currentBaselineLocation}));
+			writer.flush();
+			writer.close();
+			throw new BuildException(String.valueOf(out.getBuffer()));
+		}
+		//stop if we don't want to see anything
+		if(!considerapi && !considerinternal) {
+			throw new BuildException(Messages.UseTask_no_scan_both_types_not_searched_for);
+		}
 	}
 	
 	/* (non-Javadoc)
@@ -207,16 +262,45 @@ public class ApiUseTask extends UseTask {
 		assertParameters();
 		writeDebugHeader();
 		cleanReportLocation();
-		
+		UseMetadata data = new UseMetadata(
+				getSearchFlags(), 
+				this.scopepattern, 
+				this.referencepattern, 
+				this.currentBaselineLocation, 
+				this.reportLocation, 
+				this.apiPatterns, 
+				this.internalPatterns, 
+				this.archivePatterns,
+				DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime()), 
+				getDescription());
 		IApiBaseline baseline = getBaseline(CURRENT_BASELINE_NAME, this.currentBaselineLocation);
-		IApiBaseline scope = getBaseline(SCOPE_BASELINE_NAME, this.scopeLocation);
-		if(scope == null) {
-			scope = baseline;
-		}
-		initializeExcludeSet(scope);
-		this.reporter = new XMLApiSearchReporter(this.reportLocation, this.debug);
+		IApiSearchReporter reporter = new XmlSearchReporter(this.reportLocation, this.debug);
 		try {
-			doSearch(baseline, scope, this.reporter);
+			Set ids = new HashSet();
+			TreeSet scope = new TreeSet(Util.componentsorter);
+			getContext(baseline, ids, scope);
+			ApiSearchEngine engine = new ApiSearchEngine();
+			UseSearchRequestor requestor = new UseSearchRequestor(
+					ids,
+					(IApiElement[]) scope.toArray(new IApiElement[scope.size()]), 
+					getSearchFlags());
+			requestor.setJarPatterns(archivePatterns);
+			// override API descriptions as required
+			if (apiPatterns != null || internalPatterns != null) {
+				// modify API descriptions
+				ApiDescriptionModifier visitor = new ApiDescriptionModifier(internalPatterns, apiPatterns);
+				IApiComponent[] components = baseline.getApiComponents();
+				for (int i = 0; i < components.length; i++) {
+					IApiComponent component = components[i];
+					if (!component.isSystemComponent() && !component.isSourceComponent()) {
+						visitor.setApiDescription(component.getApiDescription());
+						component.getApiDescription().accept(visitor, null);
+					}
+				}
+			}
+			
+			ApiSearchEngine.setDebug(this.debug);
+			engine.search(baseline, requestor, reporter, null);
 		}
 		catch(CoreException ce) {
 			throw new BuildException(Messages.ApiUseTask_search_engine_problem, ce);
@@ -224,13 +308,163 @@ public class ApiUseTask extends UseTask {
 		finally {
 			if(baseline != null) {
 				baseline.dispose();
-				deleteBaseline(this.currentBaselineLocation, getBaselineInstallDir(CURRENT_BASELINE_NAME));
+				deleteBaseline(this.currentBaselineLocation, this.baselinedir);
+			}
+			reporter.reportNotSearched((IApiElement[]) this.notsearched.toArray(new IApiElement[this.notsearched.size()]));
+			reporter.reportMetadata(data);
+		}
+	}
+	
+	/**
+	 * Returns if we should add the given component to our search scope
+	 * @param component
+	 * @param pattern
+	 * @param allowresolve
+	 * @return true if the given component should be considered, false otherwise
+	 * @throws CoreException
+	 */
+	boolean acceptComponent(IApiComponent component, Pattern pattern, boolean allowresolve) throws CoreException {
+		if(!allowresolve) {
+			ResolverError[] errors = component.getErrors();
+			if(errors != null) {
+				this.notsearched.add(new SkippedComponent(component.getSymbolicName(), component.getVersion(), errors)); 
+				return false;
+			}
+		}
+		if(component.isSystemComponent()) {
+			return false;
+		}
+		if(pattern != null) {
+			return pattern.matcher(component.getSymbolicName()).matches();
+		}
+		return true;
+	}
+	
+	/**
+	 * Collects the scope elements and reference ids in one pass
+	 * @param baseline the baseline to check the components for
+	 * @param ids the live set of reference ids
+	 * @param scope the live set of elements for the scope
+	 * @throws CoreException
+	 */
+	private void getContext(IApiBaseline baseline, Set ids, Set scope) throws CoreException {
+		IApiComponent[] components = baseline.getApiComponents();
+		this.notsearched = new TreeSet(Util.componentsorter);
+		Pattern pattern = null, pattern2 = null;
+		if(this.referencepattern != null) {
+			pattern = Pattern.compile(this.referencepattern);
+		}
+		if(this.scopepattern != null) {
+			pattern2 = Pattern.compile(this.scopepattern);
+		}
+		for (int i = 0; i < components.length; i++) {
+			if(acceptComponent(components[i], pattern, true)) {
+				ids.add(components[i].getSymbolicName());
+			}
+			if(acceptComponent(components[i], pattern2, false)) {
+				scope.add(components[i]);
+			}
+			else {
+				this.notsearched.add(new SkippedComponent(components[i].getSymbolicName(), components[i].getVersion(), components[i].getErrors()));
+			}
+		}
+	}
+	
+	/**
+	 * Returns the set of search flags to use for the {@link IApiSearchRequestor}
+	 * 
+	 * @return the set of flags to use
+	 */
+	protected int getSearchFlags() {
+		int flags = (this.considerapi ? IApiSearchRequestor.INCLUDE_API : 0);
+		flags |= (this.considerinternal ? IApiSearchRequestor.INCLUDE_INTERNAL : 0);
+		flags |= (this.considerillegaluse ? IApiSearchRequestor.INCLUDE_ILLEGAL_USE : 0);
+		return flags;
+	}
+	
+	/**
+	 * Prepares and creates and new baseline with the given name from the given location. The
+	 * returned {@link IApiBaseline} is not checked for resolution errors or consistency. If <code>null</code>
+	 * is passed in as a location <code>null</code> is returned.
+	 * 
+	 * @param name the name to give to the baseline
+	 * @param location the location the baseline should be prepared from. If <code>null</code> is passed in, <code>null</code>
+	 * is returned
+	 * @return a new {@link IApiBaseline} with the given name from the given location or <code>null</code> if the given location
+	 * is <code>null</code>
+	 */
+	protected IApiBaseline getBaseline(String name, String location) {
+		if(location == null) {
+			return null;
+		}
+		//extract the baseline to examine
+		long time = 0;
+		if (this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Preparing '"+name+"' baseline installation..."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		File installdir = extractSDK(name, location);
+		if (this.debug) {
+			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+			time = System.currentTimeMillis();
+		}
+		//create the baseline to examine
+		if(this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Creating '"+name+"' baseline..."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		IApiBaseline baseline = createBaseline(name, getInstallDir(installdir), this.eeFileLocation);
+		if (this.debug) {
+			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		this.baselinedir = installdir;
+		return baseline;
+	}
+	
+	/**
+	 * Cleans the report location specified by the parameter {@link CommonUtilsTask#reportLocation}
+	 */
+	protected void cleanReportLocation() {
+		if(this.reportLocation == null) {
+			return;
+		}
+		long time = 0;
+		if(this.debug) {
+			time = System.currentTimeMillis();
+			System.out.println("Cleaning report location..."); //$NON-NLS-1$
+		}
+		File file = new File(this.reportLocation);
+		if(file.exists()) {
+			Util.delete(file);
+		}
+		if(this.debug) {
+			System.out.println("done in: "+ (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+	
+	/**
+	 * Writes a general header of debug information iff the debug flag is set to true
+	 */
+	protected void writeDebugHeader() {
+		if (this.debug) {
+			System.out.println("Product location to search : " + this.currentBaselineLocation); //$NON-NLS-1$
+			System.out.println("Report location : " + this.reportLocation); //$NON-NLS-1$
+			System.out.println("Searching for API references : " + this.considerapi); //$NON-NLS-1$
+			System.out.println("Searching for internal references : " + this.considerinternal); //$NON-NLS-1$
+			System.out.println("Searching for illegal API use : "+ this.considerillegaluse); //$NON-NLS-1$
+			if(this.scopepattern == null) {
+				System.out.println("No scope pattern defined - searching all bundles"); //$NON-NLS-1$
+			}
+			else {
+				System.out.println("Scope pattern : " + this.scopepattern); //$NON-NLS-1$
+			}
+			if(this.referencepattern == null) {
+				System.out.println("No baseline pattern defined - reporting references to all bundles"); //$NON-NLS-1$
 			}
-			if(scope != null && this.scopeLocation != null) {
-				scope.dispose();
-				deleteBaseline(this.scopeLocation, getBaselineInstallDir(SCOPE_BASELINE_NAME));
+			else {
+				System.out.println("Baseline pattern : " + this.referencepattern); //$NON-NLS-1$
 			}
-			this.reporter.reportNotSearched((IApiElement[]) this.notsearched.toArray(new IApiElement[this.notsearched.size()]));
+			System.out.println("-----------------------------------------------------------------------------------------------------"); //$NON-NLS-1$
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CommonUtilsTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CommonUtilsTask.java
index 48273b9..8754e92 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CommonUtilsTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CommonUtilsTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,15 +16,16 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
 
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Task;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.api.tools.internal.model.ApiModelFactory;
 import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
 import org.eclipse.pde.api.tools.internal.util.TarException;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
@@ -42,7 +43,7 @@ public abstract class CommonUtilsTask extends Task {
 	protected static final String CURRENT = "currentBaseline"; //$NON-NLS-1$
 	protected static final String CURRENT_BASELINE_NAME = "current_baseline"; //$NON-NLS-1$
 	protected static final String REFERENCE = "referenceBaseline"; //$NON-NLS-1$
-	protected static final String REFERENCE_PROFILE_NAME = "reference_baseline"; //$NON-NLS-1$
+	protected static final String REFERENCE_BASELINE_NAME = "reference_baseline"; //$NON-NLS-1$
 
 	protected boolean debug;
 	protected String eeFileLocation;
@@ -73,7 +74,7 @@ public abstract class CommonUtilsTask extends Task {
 			File[] files = dir.listFiles();
 			if(files == null) {
 				throw new BuildException(
-						Messages.bind(Messages.directoryIsEmpty,
+						NLS.bind(Messages.directoryIsEmpty,
 						dir.getAbsolutePath()));
 			}
 			List components = new ArrayList();
@@ -97,25 +98,6 @@ public abstract class CommonUtilsTask extends Task {
 	}
 	
 	/**
-	 * Cleans the location if it exists
-	 * @param file
-	 */
-	protected void scrubReportLocation(File file) {
-		if(file.exists() && file.isDirectory()) {
-			File[] files = file.listFiles();
-			for (int i = 0; i < files.length; i++) {
-				if(files[i].isDirectory()) {
-					scrubReportLocation(files[i]);
-				}
-				else {
-					files[i].delete();
-				}
-			}
-			file.delete();
-		}
-	}
-	
-	/**
 	 * Deletes an {@link IApiBaseline} from the given folder
 	 * @param referenceLocation
 	 * @param folder
@@ -136,7 +118,7 @@ public abstract class CommonUtilsTask extends Task {
 		File file = new File(location);
 		File locationFile = file;
 		if (!locationFile.exists()) {
-			throw new BuildException(Messages.bind(Messages.fileDoesnotExist, location));
+			throw new BuildException(NLS.bind(Messages.fileDoesnotExist, location));
 		}
 		if (isArchive(location)) {
 			File tempDir = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
@@ -145,14 +127,14 @@ public abstract class CommonUtilsTask extends Task {
 				// delete existing folder
 				if (!Util.delete(installDir)) {
 					throw new BuildException(
-						Messages.bind(
+						NLS.bind(
 							Messages.couldNotDelete,
 							installDir.getAbsolutePath()));
 				}
 			}
 			if (!installDir.mkdirs()) {
 				throw new BuildException(
-						Messages.bind(
+						NLS.bind(
 								Messages.couldNotCreate,
 								installDir.getAbsolutePath()));
 			}
@@ -164,7 +146,7 @@ public abstract class CommonUtilsTask extends Task {
 				}
 			} catch (IOException e) {
 				throw new BuildException(
-					Messages.bind(
+					NLS.bind(
 						Messages.couldNotUnzip,
 						new String[] {
 								location,
@@ -172,7 +154,7 @@ public abstract class CommonUtilsTask extends Task {
 						}));
 			} catch (TarException e) {
 				throw new BuildException(
-						Messages.bind(
+						NLS.bind(
 								Messages.couldNotUntar,
 								new String[] {
 										location,
@@ -238,10 +220,10 @@ public abstract class CommonUtilsTask extends Task {
 	 * @param excludeListLocation
 	 * @return the set of project names to be excluded
 	 */
-	protected static Set initializeExcludedElement(String excludeListLocation) {
-		return Util.initializeRegexExcludeList(excludeListLocation, null);
+	protected static ExcludedElements initializeExcludedElement(String excludeListLocation, IApiBaseline baseline, boolean debug) {
+		return Util.initializeRegexExcludeList(excludeListLocation, baseline, debug);
 	}
-	
+
 	/**
 	 * Saves the report with the given name in the report location in a child directory with 
 	 * the componentID name
@@ -253,13 +235,13 @@ public abstract class CommonUtilsTask extends Task {
 		File dir = new File(this.reportLocation);
 		if (!dir.exists()) {
 			if (!dir.mkdirs()) {
-				throw new BuildException(Messages.bind(Messages.errorCreatingReportDirectory, this.reportLocation));
+				throw new BuildException(NLS.bind(Messages.errorCreatingReportDirectory, this.reportLocation));
 			}
 		}
 		File reportComponentIDDir = new File(dir, componentID);
 		if (!reportComponentIDDir.exists()) {
 			if (!reportComponentIDDir.mkdirs()) {
-				throw new BuildException(Messages.bind(Messages.errorCreatingReportDirectory, reportComponentIDDir));
+				throw new BuildException(NLS.bind(Messages.errorCreatingReportDirectory, reportComponentIDDir));
 			}
 		}
 		File reportFile = new File(reportComponentIDDir, reportname);
@@ -280,4 +262,53 @@ public abstract class CommonUtilsTask extends Task {
 			}
 		}
 	}
+	
+	/**
+	 * Parses and returns patterns as an array of Strings or <code>null</code> if none.
+	 * 
+	 * @param patterns comma separated list or <code>null</code>
+	 * @return individual patterns or <code>null</code>
+	 */
+	protected String[] parsePatterns(String patterns) {
+		if (patterns == null || patterns.trim().length() == 0) {
+			return null;
+		}
+		String[] strings = patterns.split(","); //$NON-NLS-1$
+		List list = new ArrayList();
+		for (int i = 0; i < strings.length; i++) {
+			String pattern = strings[i].trim();
+			if (pattern.length() > 0) {
+				list.add(pattern);
+			}
+		}
+		return (String[]) list.toArray(new String[list.size()]);
+	}
+
+	public static String convertToHtml(String s) {
+		char[] contents = s.toCharArray();
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0, max = contents.length; i < max; i++) {
+			char c = contents[i];
+			switch (c) {
+				case '<':
+					buffer.append("<"); //$NON-NLS-1$
+					break;
+				case '>':
+					buffer.append(">"); //$NON-NLS-1$
+					break;
+				case '\"':
+					buffer.append("""); //$NON-NLS-1$
+					break;
+				case '&':
+					buffer.append("&"); //$NON-NLS-1$
+					break;
+				case '^':
+					buffer.append("∧"); //$NON-NLS-1$
+					break;
+				default:
+					buffer.append(c);
+			}
+		}
+		return String.valueOf(buffer);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CompareTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CompareTask.java
index 608179f..2c6132e 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CompareTask.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/CompareTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.pde.api.tools.internal.provisional.comparator.ApiScope;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
 import org.eclipse.pde.api.tools.internal.util.Util;
 import org.eclipse.pde.api.tools.internal.util.UtilMessages;
 
@@ -54,7 +55,7 @@ public class CompareTask extends CommonUtilsTask {
 			StringWriter out = new StringWriter();
 			PrintWriter writer = new PrintWriter(out);
 			writer.println(
-				Messages.bind(Messages.printArguments,
+				NLS.bind(Messages.printArguments,
 					new String[] {
 						this.referenceBaselineLocation,
 						this.currentBaselineLocation,
@@ -83,18 +84,25 @@ public class CompareTask extends CommonUtilsTask {
 
 		// run the comparison
 		// create baseline for the reference
-		IApiBaseline referenceBaseline = createBaseline(REFERENCE_PROFILE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
+		IApiBaseline referenceBaseline = createBaseline(REFERENCE_BASELINE_NAME, getInstallDir(referenceInstallDir), this.eeFileLocation);
 		IApiBaseline currentBaseline = createBaseline(CURRENT_BASELINE_NAME, getInstallDir(baselineInstallDir), this.eeFileLocation);
 		
 		IDelta delta = null;
 		
+		ExcludedElements excludedElements = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation, currentBaseline, this.debug);
+		
+		if (this.debug) {
+			System.out.println("===================================================================================="); //$NON-NLS-1$
+			System.out.println("Excluded elements list:"); //$NON-NLS-1$
+			System.out.println(excludedElements);
+		}
 		ApiScope scope = new ApiScope();
 		if (this.componentsList != null) {
 			// needs to set up individual components
 			IApiComponent[] apiComponents = currentBaseline.getApiComponents();
 			String[] componentsNames = this.componentsList.split(","); //$NON-NLS-1$
 			if (componentsNames.length == 0) {
-				scope.add(currentBaseline);
+				scope.addElement(currentBaseline);
 			} else {
 				for (int i = 0, max = componentsNames.length; i < max; i++) {
 					String componentName = componentsNames[i];
@@ -107,34 +115,30 @@ public class CompareTask extends CommonUtilsTask {
 							pattern = Pattern.compile(componentName);
 							for (int j = 0, max2 = apiComponents.length; j < max2; j++) {
 								IApiComponent apiComponent = apiComponents[j];
-								try {
-									String componentId = apiComponent.getId();
-									Matcher matcher = pattern.matcher(componentId);
-									if (matcher.matches()) {
-										scope.add(apiComponent);
-									}
-								} catch (CoreException e) {
-									ApiPlugin.log(e);
+								String componentId = apiComponent.getSymbolicName();
+								Matcher matcher = pattern.matcher(componentId);
+								if (matcher.matches()) {
+									scope.addElement(apiComponent);
 								}
 							}
 						} catch (PatternSyntaxException e) {
-							throw new BuildException(Messages.bind(
+							throw new BuildException(NLS.bind(
 									UtilMessages.comparison_invalidRegularExpression,
 									componentName));
 						}
 					} else {
 						IApiComponent apiComponent = currentBaseline.getApiComponent(componentName);
 						if (apiComponent != null) {
-							scope.add(apiComponent);
+							scope.addElement(apiComponent);
 						}
 					}
 				}
 			}
 		} else {
-			scope.add(currentBaseline);
+			scope.addElement(currentBaseline);
 		}
 		try {
-			delta = ApiComparator.compare(scope, referenceBaseline, this.visibilityModifiers);
+			delta = ApiComparator.compare(scope, referenceBaseline, this.visibilityModifiers, false, null);
 		} catch(CoreException e) {
 			// an error occurred during the comparison
 			throw new BuildException(NLS.bind(Messages.illegalElementInScope, e.getMessage()));
@@ -155,7 +159,7 @@ public class CompareTask extends CommonUtilsTask {
 		if (!outputDir.exists()) {
 			if (!outputDir.mkdirs()) {
 				throw new BuildException(
-					Messages.bind(
+					NLS.bind(
 							Messages.errorCreatingParentReportFile,
 							outputDir.getAbsolutePath()
 					));
@@ -169,7 +173,8 @@ public class CompareTask extends CommonUtilsTask {
 				outputFile.delete();
 			}
 			writer = new BufferedWriter(new FileWriter(outputFile));
-			ExcludeListDeltaVisitor visitor = new ExcludeListDeltaVisitor(this.excludeListLocation);
+
+			ExcludeListDeltaVisitor visitor = new ExcludeListDeltaVisitor(excludedElements, ExcludeListDeltaVisitor.CHECK_ALL);
 			delta.accept(visitor);
 			writer.write(visitor.getXML());
 			writer.flush();
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java
index 3b6491d..bbacbfc 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ExcludeListDeltaVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jdt.core.Flags;
@@ -24,25 +23,29 @@ import org.eclipse.pde.api.tools.internal.comparator.DeltaXmlVisitor;
 import org.eclipse.pde.api.tools.internal.provisional.RestrictionModifiers;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.DeltaProcessor;
 import org.eclipse.pde.api.tools.internal.provisional.comparator.IDelta;
+import org.eclipse.pde.api.tools.internal.util.ExcludedElements;
 import org.eclipse.pde.api.tools.internal.util.Util;
 
 /**
  * This class is used to exclude some deltas from the generated report.
  */
 public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
-	private Set excludedElement;
-	private String excludeListLocation;
+	public static final int CHECK_DEPRECATION = 0x01;
+	public static final int CHECK_OTHER = 0x02;
+	public static final int CHECK_ALL = CHECK_DEPRECATION | CHECK_OTHER;
+
+	private ExcludedElements excludedElements;
 	private List nonExcludedElements;
 
-	public ExcludeListDeltaVisitor(String excludeListLocation) throws CoreException {
+	private int flags;
+
+	public ExcludeListDeltaVisitor(ExcludedElements excludedElements, int flags) throws CoreException {
 		super();
-		this.excludeListLocation = excludeListLocation;
+		this.excludedElements = excludedElements;
 		this.nonExcludedElements = new ArrayList();
+		this.flags = flags;
 	}
 	private boolean checkExclude(IDelta delta) {
-		if (this.excludedElement == null) {
-			this.excludedElement = CommonUtilsTask.initializeExcludedElement(this.excludeListLocation);
-		}
 		return isExcluded(delta);
 	}
 	public String getPotentialExcludeList() {
@@ -61,7 +64,7 @@ public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
 		StringBuffer buffer = new StringBuffer();
 		String componentId = delta.getComponentVersionId();
 		if (componentId != null) {
-			if (this.excludedElement.contains(componentId)) {
+			if (this.excludedElements.containsPartialMatch(componentId)) {
 				return true;
 			}
 			buffer.append(componentId).append(':');
@@ -88,6 +91,7 @@ public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
 			case IDelta.FIELD :
 			case IDelta.REEXPORTED_API_TYPE :
 			case IDelta.REEXPORTED_TYPE :
+			case IDelta.DEPRECATION :
 				buffer.append('#').append(delta.getKey());
 				break;
 			case IDelta.MAJOR_VERSION :
@@ -99,7 +103,7 @@ public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
 				break;
 		}
 		String excludeListKey = String.valueOf(buffer);
-		if (this.excludedElement.contains(excludeListKey)) {
+		if (this.excludedElements.containsExactMatch(excludeListKey)) {
 			return true;
 		}
 		this.nonExcludedElements.add(excludeListKey);
@@ -111,57 +115,100 @@ public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
 				case IDelta.ADDED :
 					int modifiers = delta.getNewModifiers();
 					if (Flags.isPublic(modifiers)) {
+						if ((this.flags & CHECK_DEPRECATION) != 0) {
+							switch(delta.getFlags()) {
+								case IDelta.DEPRECATION :
+									if (!checkExclude(delta)) {
+										super.processLeafDelta(delta);
+									}
+							}
+						}
+						if ((this.flags & CHECK_OTHER) != 0) {
+							switch(delta.getFlags()) {
+								case IDelta.TYPE_MEMBER :
+								case IDelta.METHOD :
+								case IDelta.CONSTRUCTOR :
+								case IDelta.ENUM_CONSTANT :
+								case IDelta.METHOD_WITH_DEFAULT_VALUE :
+								case IDelta.METHOD_WITHOUT_DEFAULT_VALUE :
+								case IDelta.FIELD :
+								case IDelta.TYPE :
+								case IDelta.API_TYPE :
+								case IDelta.API_METHOD :
+								case IDelta.API_FIELD :
+								case IDelta.API_CONSTRUCTOR :
+								case IDelta.API_ENUM_CONSTANT :
+								case IDelta.REEXPORTED_TYPE :
+									if (!checkExclude(delta)) {
+										super.processLeafDelta(delta);
+									}
+									break;
+							}
+						}
+					} else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) {
+						if ((this.flags & CHECK_DEPRECATION) != 0) {
+							switch(delta.getFlags()) {
+								case IDelta.DEPRECATION :
+									if (!checkExclude(delta)) {
+										super.processLeafDelta(delta);
+									}
+									break;
+							}
+						}
+						if ((this.flags & CHECK_OTHER) != 0) {
+							switch(delta.getFlags()) {
+								case IDelta.TYPE_MEMBER :
+								case IDelta.METHOD :
+								case IDelta.CONSTRUCTOR :
+								case IDelta.ENUM_CONSTANT :
+								case IDelta.FIELD :
+								case IDelta.TYPE :
+								case IDelta.API_TYPE :
+								case IDelta.API_METHOD :
+								case IDelta.API_FIELD :
+								case IDelta.API_CONSTRUCTOR :
+								case IDelta.API_ENUM_CONSTANT :
+								case IDelta.REEXPORTED_TYPE :
+									if (!checkExclude(delta)) {
+										super.processLeafDelta(delta);
+									}
+									break;
+							}
+						}
+					}
+					if (delta.getElementType() == IDelta.API_BASELINE_ELEMENT_TYPE) {
+						switch(delta.getKind()) {
+							case IDelta.ADDED :
+								if (delta.getFlags() == IDelta.API_COMPONENT) {
+									if (!checkExclude(delta)) {
+										super.processLeafDelta(delta);
+									}
+								}
+						}
+					}
+					break;
+				case IDelta.CHANGED :
+					if ((this.flags & CHECK_OTHER) != 0) {
 						switch(delta.getFlags()) {
-							case IDelta.TYPE_MEMBER :
-							case IDelta.METHOD :
-							case IDelta.CONSTRUCTOR :
-							case IDelta.ENUM_CONSTANT :
-							case IDelta.METHOD_WITH_DEFAULT_VALUE :
-							case IDelta.METHOD_WITHOUT_DEFAULT_VALUE :
-							case IDelta.FIELD :
-							case IDelta.TYPE :
-							case IDelta.API_TYPE :
-							case IDelta.API_METHOD :
-							case IDelta.API_FIELD :
-							case IDelta.API_CONSTRUCTOR :
-							case IDelta.API_ENUM_CONSTANT :
-							case IDelta.REEXPORTED_TYPE :
+							case IDelta.MAJOR_VERSION :
+							case IDelta.MINOR_VERSION :
 								if (!checkExclude(delta)) {
 									super.processLeafDelta(delta);
 								}
-								break;
 						}
-					} else if (Flags.isProtected(modifiers) && !RestrictionModifiers.isExtendRestriction(delta.getRestrictions())) {
+					}
+					break;
+				case IDelta.REMOVED :
+					if ((this.flags & CHECK_DEPRECATION) != 0) {
 						switch(delta.getFlags()) {
-							case IDelta.TYPE_MEMBER :
-							case IDelta.METHOD :
-							case IDelta.CONSTRUCTOR :
-							case IDelta.ENUM_CONSTANT :
-							case IDelta.FIELD :
-							case IDelta.TYPE :
-							case IDelta.API_TYPE :
-							case IDelta.API_METHOD :
-							case IDelta.API_FIELD :
-							case IDelta.API_CONSTRUCTOR :
-							case IDelta.API_ENUM_CONSTANT :
-							case IDelta.REEXPORTED_TYPE :
+							case IDelta.DEPRECATION :
 								if (!checkExclude(delta)) {
 									super.processLeafDelta(delta);
 								}
-								break;
 						}
 					}
-					break;
-				case IDelta.CHANGED :
-					switch(delta.getFlags()) {
-						case IDelta.MAJOR_VERSION :
-						case IDelta.MINOR_VERSION :
-							if (!checkExclude(delta)) {
-								super.processLeafDelta(delta);
-							}
-					}
 			}
-		} else {
+		} else if ((this.flags & CHECK_OTHER) != 0) {
 			switch(delta.getKind()) {
 				case IDelta.ADDED :
 					switch(delta.getFlags()) {
@@ -208,6 +255,11 @@ public class ExcludeListDeltaVisitor extends DeltaXmlVisitor {
 									super.processLeafDelta(delta);
 								}
 							}
+							break;
+						case IDelta.API_COMPONENT :
+							if (!checkExclude(delta)) {
+								super.processLeafDelta(delta);
+							}
 					}
 				break;
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/Messages.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/Messages.java
index dad6e1f..36e4f47 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,21 +75,32 @@ public class Messages extends NLS {
 	public static String couldNotUntar;
 
 	public static String api_generation_printArguments;
-	public static String api_generation_printArguments2;
 	public static String api_generation_projectLocationNotADirectory;
 	public static String api_generation_targetFolderNotADirectory;
 	public static String api_generation_invalidBinaryLocation;
 
-	public static String ApiUseDBTask_access_denied_to_class;
-	public static String ApiUseDBTask_class_could_not_be_instantaited;
-	public static String ApiUseDBTask_class_could_not_be_loaded;
-	public static String ApiUseDBTask_must_provide_reporter_class;
+	public static String ApiMigrationTask_missing_scan_location;
+	public static String ApiMigrationTask_scan_location_not_dir;
+	public static String ApiMigrationTask_scan_location_not_exist;
+	public static String ApiMigrationTask_scan_locatoin_same_as_report_location;
 
 	public static String ApiUseReportConversionTask_conversion_complete;
 	public static String ApiUseTask_missing_baseline_argument;
 	public static String ApiUseTask_missing_report_location;
 	public static String ApiUseTask_search_engine_problem;
 	public static String UseTask_no_scan_both_types_not_searched_for;
+	
+	public static String AddedElement;
+	public static String RemovedElement;
+	public static String ChangedElement;
+
+	public static String deprecationReportTask_componentEntry;
+	public static String deprecationReportTask_couldNotCreateSAXParser;
+	public static String deprecationReportTask_endComponentEntry;
+	public static String deprecationReportTask_entry;
+	public static String deprecationReportTask_footer;
+	public static String deprecationReportTask_header;
+	public static String deprecationReportTask_missingXmlFileLocation;
 
 	static {
 		// initialize resource bundle
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/PluggableApiUseTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/PluggableApiUseTask.java
deleted file mode 100644
index 6e204e2..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/PluggableApiUseTask.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.tasks;
-
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
-import org.eclipse.pde.api.tools.internal.search.SkippedComponent;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * Api usage reporting task that reports to a database.
- * 
- * @since 1.0.1
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class PluggableApiUseTask extends UseTask {
-	
-	/**
-	 * Sets the class to use to report search results to. 
-	 * <p>
-	 * This class must implement <code>IApiSearchReporter</code>.
-	 * </p> 
-	 * @param clazz
-	 */
-	public void setReporterClass(String clazz) {
-		this.reporterclazz = clazz;
-	}
-	
-	/**
-	 * Set the flag to indicate if the usage scan should try to proceed when an error is encountered
-	 * or stop.
-	 * <p>
-	 * The default value is <code>false</code>.
-	 * </p>
-	 * @param proceed if the scan should try to continue in the face of errors. Valid values 
-	 * are <code>true</code> or <code>false</code>.
-	 */
-	public void setProceedOnError(String proceed) {
-		this.proceedonerror = Boolean.valueOf(proceed).booleanValue();
-	}
-	
-	/**
-	 * Set the flag to indicate if the usage search should include system libraries in the scope and baseline.
-	 * <p>
-	 * The default value is <code>false</code>.
-	 * </p>
-	 * @param include if system libraries should be considered in the search scope and baseline. Valid values 
-	 * are <code>true</code> or <code>false</code>.
-	 */
-	public void setIncludeSystemLibraries(String include) {
-		this.includesystemlibraries = Boolean.valueOf(include).booleanValue();
-	}
-	
-	/**
-	 * Set the debug value.
-	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
-	 * <p>Default is <code>false</code>.</p>
-	 *
-	 * @param debugValue the given debug value
-	 */
-	public void setDebug(String debugValue) {
-		this.debug = Boolean.toString(true).equals(debugValue); 
-	}
-	
-	/**
-	 * Set the exclude list location.
-	 * 
-	 * <p>The exclude list is used to know what bundles should excluded from the xml report generated by the task
-	 * execution. Lines starting with '#' are ignored from the excluded elements.</p>
-	 * <p>The format of the exclude list file looks like this:</p>
-	 * <pre>
-	 * # DOC BUNDLES
-	 * org.eclipse.jdt.doc.isv
-	 * org.eclipse.jdt.doc.user
-	 * org.eclipse.pde.doc.user
-	 * org.eclipse.platform.doc.isv
-	 * org.eclipse.platform.doc.user
-	 * # NON-ECLIPSE BUNDLES
-	 * com.ibm.icu
-	 * com.jcraft.jsch
-	 * javax.servlet
-	 * javax.servlet.jsp
-	 * ...
-	 * </pre>
-	 * <p>The location is set using an absolute path.</p>
-	 *
-	 * @param excludeListLocation the given location for the excluded list file
-	 */
-	public void setExcludeList(String excludeListLocation) {
-		this.excludeListLocation = excludeListLocation;
-	}
-	
-	/**
-	 * Set the execution environment file to use.
-	 * <p>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment
-	 * is used.</p>
-	 * <p>The file is specified using an absolute path. This is optional.</p> 
-	 *
-	 * @param eeFileLocation the given execution environment file
-	 */
-	public void setEEFile(String eeFileLocation) {
-		this.eeFileLocation = eeFileLocation;
-	}
-	
-	/**
-	 * Sets if references to API types should be considered in the search.
-	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
-	 * <p>Default is <code>false</code>.</p>
-	 * 
-	 * @param considerapi the given value
-	 */
-	public void setConsiderAPI(String considerapi) {
-		this.considerapi = Boolean.toString(true).equals(considerapi);
-	}
-	
-	/**
-	 * Sets if references to internal types should be considered in the search.
-	 * <p>The possible values are: <code>true</code>, <code>false</code></p>
-	 * <p>Default is <code>false</code>.</p>
-	 * 
-	 * @param considerapi the given value
-	 */
-	public void setConsiderInternal(String considerinternal) {
-		this.considerinternal = Boolean.toString(true).equals(considerinternal);
-	}
-	
-	/**
-	 * Set the location of the current product or baseline that you want to search.
-	 * 
-	 * <p>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
-	 * the Eclipse installation folder. This is the directory is which you can find the 
-	 * Eclipse executable.
-	 * </p>
-	 *
-	 * @param baselineLocation the given location for the baseline to analyze
-	 */
-	public void setBaseline(String baselineLocation) {
-		this.currentBaselineLocation = baselineLocation;
-	}
-	
-	/**
-	 * Sets a flag to indicate if projects that have not been set up for API tooling should be allowed 
-	 * in the search scope.
-	 * 
-	 * @param includenonapi if non- API enabled projects should be included in the search scope. Valid values 
-	 * are <code>true</code> or <code>false</code>.
-	 */
-	public void setIncludeNonApiProjects(String includenonapi) {
-		this.includenonapi = Boolean.valueOf(includenonapi).booleanValue();
-	}
-	
-	/**
-	 * @see org.eclipse.pde.api.tools.internal.tasks.UseTask#assertParameters()
-	 */
-	protected void assertParameters() throws BuildException {
-		super.assertParameters();
-		if(this.reporterclazz == null) {
-			throw new BuildException(Messages.ApiUseDBTask_must_provide_reporter_class);
-		}
-		Object clazz = null;
-		try {
-			clazz = Class.forName(this.reporterclazz).newInstance();
-		} catch (ClassNotFoundException e) {
-			throw new BuildException(
-					MessageFormat.format(Messages.ApiUseDBTask_class_could_not_be_loaded, 
-							new String[] {this.reporterclazz, e.getMessage()}));
-		} catch (InstantiationException e) {
-			throw new BuildException(
-					MessageFormat.format(Messages.ApiUseDBTask_class_could_not_be_instantaited, 
-							new String[] {this.reporterclazz, e.getMessage()}));
-		} catch (IllegalAccessException e) {
-			throw new BuildException(
-					MessageFormat.format(Messages.ApiUseDBTask_access_denied_to_class, 
-							new String[] {this.reporterclazz, e.getMessage()}));
-		}
-		if(clazz instanceof IApiSearchReporter) {
-			this.reporter = (IApiSearchReporter) clazz;
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.tools.ant.Task#execute()
-	 */
-	public void execute() throws BuildException {
-		writeDebugHeader();
-		assertParameters();
-		
-		IApiBaseline baseline = getBaseline(CURRENT_BASELINE_NAME, this.currentBaselineLocation);
-		IApiBaseline scope = getBaseline(SCOPE_BASELINE_NAME, this.scopeLocation);
-		if(scope == null) {
-			scope = baseline;
-		}
-		initializeExcludeSet(scope);
-		try {
-			doSearch(baseline, scope, this.reporter);
-			this.reporter.reportNotSearched((SkippedComponent[]) this.notsearched.toArray(new SkippedComponent[this.notsearched.size()]));
-		}
-		catch(CoreException ce) {
-			throw new BuildException(Messages.ApiUseTask_search_engine_problem, ce);
-		}
-		finally {
-			if(baseline != null) {
-				baseline.dispose();
-				deleteBaseline(this.currentBaselineLocation, getBaselineInstallDir(CURRENT_BASELINE_NAME));
-			}
-			if(scope != null && this.scopeLocation != null) {
-				scope.dispose();
-				deleteBaseline(this.scopeLocation, getBaselineInstallDir(SCOPE_BASELINE_NAME));
-			}
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/UseTask.java b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/UseTask.java
deleted file mode 100644
index db3195b..0000000
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/UseTask.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.api.tools.internal.tasks;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiBaseline;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
-import org.eclipse.pde.api.tools.internal.provisional.model.IApiElement;
-import org.eclipse.pde.api.tools.internal.provisional.search.ApiSearchEngine;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchReporter;
-import org.eclipse.pde.api.tools.internal.provisional.search.IApiSearchRequestor;
-import org.eclipse.pde.api.tools.internal.search.ApiUseSearchRequestor;
-import org.eclipse.pde.api.tools.internal.search.SkippedComponent;
-import org.eclipse.pde.api.tools.internal.util.Util;
-
-/**
- * Abstract class describing a use task
- */
-public class UseTask extends CommonUtilsTask {
-	
-	protected static final String SCOPE_BASELINE_NAME = "scope_baseline"; //$NON-NLS-1$
-	
-	/**
-	 * The listing of component names to exclude from scanning
-	 */
-	protected Set excludeset = null;
-	
-	/**
-	 * If api references should be considered in the search
-	 */
-	protected boolean considerapi = false;
-	/**
-	 * If internal references should be considered in the search
-	 */
-	protected boolean considerinternal = false;
-	
-	/**
-	 * The location of the scope to search against
-	 */
-	protected String scopeLocation = null;
-	
-	/**
-	 * If non- API enabled projects should be considered during the search
-	 */
-	protected boolean includenonapi = false;
-	
-	/**
-	 * If system libraries should be included in the search scope and baseline
-	 */
-	protected boolean includesystemlibraries = false;
-	
-	/**
-	 * If the scan should proceed if there are errors encountered
-	 */
-	protected boolean proceedonerror = false;
-	
-	/**
-	 * Set of project names that were not searched
-	 */
-	protected TreeSet notsearched = null;
-	
-	/**
-	 * The fully qualified name of the class to report results to
-	 */
-	protected String reporterclazz = null;
-	
-	/**
-	 * the actual instantiated {@link IApiSearchReporter} instance that will be reported to 
-	 */
-	protected IApiSearchReporter reporter = null;
-	
-	/**
-	 * Map of baseline name to the dir the were extracted to
-	 */
-	private HashMap baselineinstalldirs = new HashMap(4);
-	
-	/**
-	 * Returns the search scope to use
-	 * @param baseline
-	 * @return the {@link IApiComponent} array to use for the search scope
-	 * @throws CoreException
-	 */
-	protected IApiElement[] getScope(IApiBaseline baseline) throws CoreException {
-		TreeSet scope = new TreeSet(Util.componentsorter);
-		if(baseline != null) {
-			IApiComponent[] components = baseline.getApiComponents();
-			boolean isapibundle = false;
-			boolean excluded = false;
-			boolean resolveerrors = false;
-			for(int i = 0; i < components.length; i++) {
-				isapibundle = Util.isApiToolsComponent(components[i]);
-				excluded = this.excludeset.contains(components[i].getId());
-				resolveerrors = components[i].getErrors() != null;
-				if((isapibundle || this.includenonapi) && !excluded && !components[i].isSystemComponent() && (!resolveerrors || this.proceedonerror)) {
-					scope.add(components[i]);
-				}
-				else {
-					notsearched.add(new SkippedComponent(components[i].getId(), !isapibundle, excluded, resolveerrors));
-				}
-			}
-		}
-		return (IApiElement[]) scope.toArray(new IApiElement[scope.size()]);
-	}
-	
-	/**
-	 * Allows the raw list of components returned from the baseline to be altered as needed
-	 * 
-	 * @param baseline
-	 * @return the accepted list of {@link IApiComponent}s from the given baseline
-	 */
-	protected Set getBaselineIds(IApiBaseline baseline) throws CoreException {
-		IApiComponent[] components = baseline.getApiComponents();
-		TreeSet comps = new TreeSet(Util.componentsorter);
-		for (int i = 0; i < components.length; i++) {
-			if(!components[i].isSystemComponent()) {
-				if(Util.isApiToolsComponent(components[i]) || this.includenonapi) {
-					comps.add(components[i].getId());
-				}
-			}
-			if(components[i].isSystemComponent() && this.includesystemlibraries) {
-				comps.add(components[i].getId());
-			}
-		}
-		return comps;
-	}
-	
-	/**
-	 * Returns the set of search flags to use for the {@link IApiSearchRequestor}
-	 * 
-	 * @return the set of flags to use
-	 */
-	protected int getSearchFlags() {
-		int flags = (this.considerapi ? IApiSearchRequestor.INCLUDE_API : 0);
-		flags |= (this.considerinternal ? IApiSearchRequestor.INCLUDE_INTERNAL : 0);
-		flags |= (this.includenonapi ? IApiSearchRequestor.INCLUDE_NON_API_ENABLED_PROJECTS : 0);
-		return flags;
-	}
-	
-	/**
-	 * Ensures that required task parameters are present
-	 * @throws BuildException
-	 */
-	protected void assertParameters() throws BuildException {
-		if (this.currentBaselineLocation == null) {
-			StringWriter out = new StringWriter();
-			PrintWriter writer = new PrintWriter(out);
-			writer.println(Messages.bind(
-					Messages.ApiUseTask_missing_baseline_argument, 
-					new String[] {this.currentBaselineLocation}));
-			writer.flush();
-			writer.close();
-			throw new BuildException(String.valueOf(out.getBuffer()));
-		}
-		//stop if we don't want to see anything
-		if(!considerapi && !considerinternal) {
-			throw new BuildException(Messages.UseTask_no_scan_both_types_not_searched_for);
-		}
-	}
-	
-	/**
-	 * Returns the directory where the {@link IApiBaseline} was extracted to as an install
-	 * @param name
-	 * @return
-	 */
-	protected File getBaselineInstallDir(String name) {
-		return (File) this.baselineinstalldirs.get(name);
-	}
-	
-	/**
-	 * Prepares and creates and new baseline with the given name from the given location. The
-	 * returned {@link IApiBaseline} is not checked for resolution errors or consistency. If <code>null</code>
-	 * is passed in as a location <code>null</code> is returned.
-	 * 
-	 * @param name the name to give to the baseline
-	 * @param location the location the baseline should be prepared from. If <code>null</code> is passed in, <code>null</code>
-	 * is returned
-	 * @return a new {@link IApiBaseline} with the given name from the given location or <code>null</code> if the given location
-	 * is <code>null</code>
-	 */
-	protected IApiBaseline getBaseline(String name, String location) {
-		if(location == null) {
-			return null;
-		}
-		//extract the baseline to examine
-		long time = 0;
-		if (this.debug) {
-			time = System.currentTimeMillis();
-			System.out.println("Preparing '"+name+"' baseline installation..."); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		File installdir = extractSDK(name, location);
-		if (this.debug) {
-			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-			time = System.currentTimeMillis();
-		}
-		//create the baseline to examine
-		if(this.debug) {
-			time = System.currentTimeMillis();
-			System.out.println("Creating '"+name+"' baseline..."); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		IApiBaseline baseline = createBaseline(name, getInstallDir(installdir), this.eeFileLocation);
-		if (this.debug) {
-			System.out.println("done in: " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-		this.baselineinstalldirs.put(name, installdir);
-		return baseline;
-	}
-	
-	/**
-	 * Performs the search
-	 * @param baseline the baseline target
-	 * @param scope the scope to search
-	 * @param reporter the reporter to report to
-	 * @throws CoreException
-	 */
-	protected void doSearch(IApiBaseline baseline, IApiBaseline scope, IApiSearchReporter reporter) throws CoreException {
-		ApiSearchEngine engine = new ApiSearchEngine();
-		IApiSearchRequestor requestor = new ApiUseSearchRequestor(
-				getBaselineIds(baseline),
-				getScope(scope), 
-				getSearchFlags(), 
-				this.excludeset);
-		ApiSearchEngine.setDebug(this.debug);
-		engine.search(baseline, requestor, reporter, null);
-	}
-	
-	/**
-	 * Initializes the exclude set
-	 * @param baseline
-	 */
-	protected void initializeExcludeSet(IApiBaseline baseline) {
-		//initialize the exclude list
-		long start = 0;
-		if(this.debug) {
-			start = System.currentTimeMillis();
-			System.out.println("Preparing exclude set..."); //$NON-NLS-1$
-		}
-		this.excludeset = Util.initializeRegexExcludeList(this.excludeListLocation, baseline);
-		this.notsearched = new TreeSet(Util.componentsorter);
-		if(this.excludeset != null) {
-			for(Iterator iter = this.excludeset.iterator(); iter.hasNext();) {
-				this.notsearched.add(new SkippedComponent((String) iter.next(), false, true, false));
-			}
-		}
-		if(this.debug) {
-			System.out.println("done in: " + (System.currentTimeMillis() - start) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-	
-	/**
-	 * Cleans the report location specified by the parameter {@link CommonUtilsTask#reportLocation}
-	 */
-	protected void cleanReportLocation() {
-		if(this.reportLocation == null) {
-			return;
-		}
-		long time = 0;
-		if(this.debug) {
-			time = System.currentTimeMillis();
-			System.out.println("Cleaning report location..."); //$NON-NLS-1$
-		}
-		File file = new File(this.reportLocation);
-		if(file.exists()) {
-			scrubReportLocation(file);
-		}
-		if(this.debug) {
-			System.out.println("done in: "+ (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-	
-	/**
-	 * Writes a general header of debug information iff the debug flag is set to true
-	 */
-	protected void writeDebugHeader() {
-		if (this.debug) {
-			System.out.println("Baseline to collect references to : " + this.currentBaselineLocation); //$NON-NLS-1$
-			System.out.println("Report location : " + this.reportLocation); //$NON-NLS-1$
-			System.out.println("Searching for API references : " + this.considerapi); //$NON-NLS-1$
-			System.out.println("Searching for internal references : " + this.considerinternal); //$NON-NLS-1$
-			if(this.scopeLocation == null) {
-				System.out.println("No scope specified : baseline will act as scope"); //$NON-NLS-1$
-			}
-			else {
-				System.out.println("Scope to search against : " + this.scopeLocation); //$NON-NLS-1$
-			}
-			if (this.excludeListLocation != null) {
-				System.out.println("Exclude list location : " + this.excludeListLocation); //$NON-NLS-1$
-			} else {
-				System.out.println("No exclude list location"); //$NON-NLS-1$
-			}
-			if(this.eeFileLocation != null) {
-				System.out.println("EE file location : " + this.eeFileLocation); //$NON-NLS-1$
-			}
-			else {
-				System.out.println("No EE file location given: using default"); //$NON-NLS-1$
-			}
-			System.out.println("-----------------------------------------------------------------------------------------------------"); //$NON-NLS-1$
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/messages.properties b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/messages.properties
index 51bccdc..572adfd 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2009 IBM Corporation and others.
+# Copyright (c) 2008, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -17,20 +17,16 @@ project name : {0}\n\
 project location : {1}\n\
 binary locations: {2}\n\
 target folder: {3}
-api_generation_printArguments2=Missing arguments:\n\
-project name : {0}\n\
-project location : {1}\n\
-target folder: {2}
 api_generation_projectLocationNotADirectory=The project argument {0} must be a directory
 api_generation_targetFolderNotADirectory=The target argument {0} must be a directory
 api_generation_invalidBinaryLocation=The location {0} specified in the binary argument does not exist
-ApiUseDBTask_access_denied_to_class=Access was denied to class {0} because: {1}
-ApiUseDBTask_class_could_not_be_instantaited=Class {0} could not be instantiated: {1}
-ApiUseDBTask_class_could_not_be_loaded=Class {0} could not be loaded: {1}
-ApiUseDBTask_must_provide_reporter_class=You must provide a reporter class
+ApiMigrationTask_missing_scan_location=Missing Arguments: scanLocation: {0}
+ApiMigrationTask_scan_location_not_dir=Invalid Arguments: scanLocation must be a directory: {0}
+ApiMigrationTask_scan_location_not_exist=Invalid Arguments: scanLocation does not exist: {0}
+ApiMigrationTask_scan_locatoin_same_as_report_location=Invalid Arguments: scanLocation must be different than report location: {0}
 ApiUseReportConversionTask_conversion_complete=Report conversion complete: {0}
 
-ApiUseTask_missing_baseline_argument=Missing Arguments:\n\tcurrent baseline location: {0}
+ApiUseTask_missing_baseline_argument=Missing Arguments:\n\tlocation: {0}
 ApiUseTask_missing_report_location=Missing Arguments: missing report location {0}
 ApiUseTask_search_engine_problem=Search engine encountered a problem.
 errorInComparison=An error occurred during the comparison
@@ -62,10 +58,10 @@ deltaReportTask_header=<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional
 <html>\n\
 <head>\n\
 \  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
-\  <title>API Freeze 3.4 log</title>\n\
+\  <title>API Freeze 3.6 log</title>\n\
 </head>\n\
 <body>\n\
-<h1>Un-approved Changes Since API Freeze</h1>\n
+<h1>Unapproved Changes Since API Freeze</h1>\n
 deltaReportTask_footer=<p>\n\
 \  <a href="http://validator.w3.org/check?uri=referer"><img \n\
 \    src="http://www.w3.org/Icons/valid-html401-blue"\n\
@@ -73,9 +69,9 @@ deltaReportTask_footer=<p>\n\
 \  </p>\n\
 </body>\n\
 </html>\n
-deltaReportTask_entry=\  <tr>\n    <td>{0}</td>\n  </tr>\n
+deltaReportTask_entry=\  <tr>\n    <td width="7%">{0}</td><td width="73%">{1}</td>\n  </tr>\n
 deltaReportTask_componentEntry=<table border="1" width="80%">\n\
-\  <tr>\n    <th align="center" bgcolor="#CC9933">{0}</th>\n  </tr>\n
+\  <tr>\n    <th colspan="2" align="center" bgcolor="#CC9933">{0}</th>\n  </tr>\n
 deltaReportTask_endComponentEntry=</table>\n
 
 fullReportTask_bundlesheader=<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
@@ -187,3 +183,27 @@ fullReportTask_indexsummary_odd=\  <tr>\n\
 \    <td align="center" bgcolor="#FFFFCC">{3}</td>\n\
 \  </tr>\n
 UseTask_no_scan_both_types_not_searched_for=Build stopping - neither API nor internal references are being searched for
+AddedElement=ADDED
+RemovedElement=REMOVED
+ChangedElement=CHANGED
+deprecationReportTask_componentEntry=<table border="1" width="80%">\n\
+\  <tr>\n    <th colspan="2" align="center" bgcolor="#CC9933">{0}</th>\n  </tr>\n
+deprecationReportTask_couldNotCreateSAXParser=Could not create a sax parser
+deprecationReportTask_endComponentEntry=</table>\n
+deprecationReportTask_entry=\  <tr>\n    <td width="7%">{0}</td><td width="73%">{1}</td>\n  </tr>\n
+deprecationReportTask_header=<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n\
+<html>\n\
+<head>\n\
+\  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n\
+\  <title>API Deprecation log</title>\n\
+</head>\n\
+<body>\n\
+<h1>All deprecation changes</h1>\n
+deprecationReportTask_footer=<p>\n\
+\  <a href="http://validator.w3.org/check?uri=referer"><img \n\
+\    src="http://www.w3.org/Icons/valid-html401-blue"\n\
+\    alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>\n\
+\  </p>\n\
+</body>\n\
+</html>\n
+deprecationReportTask_missingXmlFileLocation=Missing the xml file location argument
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/xslt/compare.xsl b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/compare.xsl
index 40ab999..8bbe3d4 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/xslt/compare.xsl
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/compare.xsl
@@ -1,10 +1,4 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!--
-	Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
-	
-	All Platform Debug contexts, those for org.eclipse.debug.ui, are located in this file
-	All contexts are grouped by their relation, with all relations grouped alphabetically.
--->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output
                xmlns="http://www.w3.org/1999/xhtml"
@@ -17,82 +11,114 @@
 <xsl:template match="/">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
 	<head>
+		<meta http-equiv="Content-Script-Type" content="text/javascript"/>
+		<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
+  		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+  		<meta http-equiv="Content-Style-Type" content="text/css"/>
 		<title>Compare Details</title>
 		<style type="text/css">
-			table {
-				width: 70%;
-				border-style: solid;
-				border-width: 1px;
-				border-color: #666666;
-				border-collapse: collapse;
-			}
-			tbody {
-				display:block
-			}
-			td {
-				border-style: solid;
-				border-width: 1px;
-				border-color: #666666;
-			}
-			a {
-				text-decoration: none;
-				font-weight: bold;
-			}
-			a.typeslnk {
-				color:black;
-				font-family:Arial, Helvetica, sans-serif;
-				text-decoration:none;
-				margin-left:0.25em;
-			}
-			a.typeslnk:hover{
-				text-decoration:underline;
-			}
-			.link {
-				color:black;
-			}
-			.vis {
-				display:block;
-			}
-			.vis tr {
-					border-style: solid;
-					border-width: 1px;
-					border-color: #666666;
-			}
-			.vis th {
-					border-style: solid;
-					border-width: 1px;
-					border-color: #666666;
-					background-color:#CC9933
-			}
+			.main{		font-family:Arial;
+						Helvetica, sans-serif;
+						text-align: left;}
+			.main h3 {	font-family:Arial, Helvetica, sans-serif;
+						background-color:#FFFFFF;
+						font-size:16px;
+						margin:0.1em;}
+			.main h4 { 	background-color:#CCCCCC;
+						margin:0.15em;}
+			a.typeslnk{	font-family:Arial, Helvetica, sans-serif;
+					   	text-decoration:none;}
+			a.typeslnk:hover{text-decoration:underline;}
+			.types{	display:none;
+					margin-bottom:0.25em;
+					margin-top:0.25em;
+					margin-right:0.25em;
+				   	margin-left:0.75em;}
+			thead.head{background-color:#CC9933}
 		</style>
 		<script type="text/javascript">
-		<xsl:text disable-output-escaping="yes"><</xsl:text>!-- Begin
-			var element=false;
-			function hideall() {
-				var tBodyElements = document.getElementsByTagName('tbody');
-				for (i=0;i <xsl:text disable-output-escaping="yes"><</xsl:text> tBodyElements.length;i++) {
-					tBodyElements[i].style.display='none';
+			function expand(location){
+			   if(document.getElementById){
+				  var childhtml = location.firstChild;
+				  if(!childhtml.innerHTML) {
+				  	childhtml = childhtml.nextSibling;
+				  }
+				  childhtml.innerHTML = childhtml.innerHTML == '[+] ' ? '[-] ' : '[+] ';
+				  var parent = location.parentNode;
+				  childhtml = parent.nextSibling.style ? parent.nextSibling : parent.nextSibling.nextSibling;
+				  childhtml.style.display = childhtml.style.display == 'block' ? 'none' : 'block';
 				}
-			}
-
-			function showHide(tBodyID,link) {
-				element=document.getElementById(tBodyID);
-				if (element.style.display=='none') {
-					document.getElementById(link).innerHTML=' - ';
-					element.style.display='block';
-				} else {
-					document.getElementById(link).innerHTML=' + ';
-					element.style.display='none';
-				}
-			}
-			onload=hideall;
-		// End --<xsl:text disable-output-escaping="yes">></xsl:text>
+			}  
 		</script>
+		
 	</head>
 	<body>
+		<noscript>
+			<style type="text/css">
+				.types{display:block;}
+				.kinds{display:block;}
+			</style>
+		</noscript>
 		<h1>Compare Details</h1>
-		<div align="left">
-			<xsl:apply-templates select="deltas"/>
+		<div class="main">
+			<xsl:variable name="breaking" select="deltas/delta[@compatible='false']"/>
+			<xsl:choose>
+				<xsl:when test="count($breaking) > 0">
+					<table border="0" width="60%">
+						<tr>
+							<td>
+								<h3>
+								<a href="javascript:void(0)" class="typeslnk" onclick="expand(this)">
+									<span>[+] </span> List of breaking changes
+								</a>
+								</h3>
+								<div class="types">
+									<table border="1" width="100%" style="line">
+										<thead class="head">
+											<tr><td><b>Changes</b></td></tr>
+										</thead>
+										<xsl:for-each select="$breaking">
+											<tr><td><xsl:value-of disable-output-escaping="yes" select="@message"/></td></tr>
+										</xsl:for-each>
+									</table>
+								</div>
+							</td>
+						</tr>
+					</table>
+				</xsl:when>
+				<xsl:otherwise>
+					<h3>There are no breaking changes.</h3>
+				</xsl:otherwise>
+			</xsl:choose>
+			<xsl:variable name="compatible" select="deltas/delta[@compatible='true']"/>
+			<xsl:choose>
+				<xsl:when test="count($compatible) > 0">
+				<table border="0" width="60%">
+					<tr>
+						<td>
+							<h3>
+							<a href="javascript:void(0)" class="typeslnk" onclick="expand(this)">
+								<span>[+] </span> List of compatible changes
+							</a>
+							</h3>
+							<div class="types">
+								<table border="1" width="100%" style="line">
+									<thead class="head">
+										<tr><td><b>Changes</b></td></tr>
+									</thead>
+									<xsl:for-each select="$compatible">
+										<tr><td><xsl:value-of disable-output-escaping="yes" select="@message"/></td></tr>
+									</xsl:for-each>
+								</table>
+							</div>
+						</td>
+					</tr>
+				</table>
+				</xsl:when>
+				<xsl:otherwise>
+					<h3>There are no compatible changes.</h3>
+				</xsl:otherwise>
+			</xsl:choose>
 		</div>
 		<p>
 			<a href="http://validator.w3.org/check?uri=referer">
@@ -102,51 +128,4 @@
 	</body>
 </html>
 </xsl:template>
-<xsl:template match="deltas">
-	<table>
-		<thead>
-			<tr class="vis">
-				<th class="vis">
-					<a href="javascript:void(0)" class="typeslnk" onclick="showHide('breaking', 'breakingspan')">
-						<span id="breakingspan" class="link" > + </span> List of breaking changes
-					</a>
-				</th>
-			</tr>
-		</thead>
-		<tbody id="breaking">
-			<xsl:for-each select="delta">
-				<xsl:if test="(@compatible='false')">
-					<tr>
-						<td>
-							<xsl:value-of disable-output-escaping="yes" select="@message"/>
-						</td>
-					</tr>
-				</xsl:if>
-			</xsl:for-each>
-		</tbody>
-	</table>
-	<p></p>
-	<table>
-		<thead>
-			<tr class="vis">
-				<th class="vis">
-					<a href="javascript:void(0)" class="typeslnk" onclick="showHide('compatible', 'compatiblespan')">
-						<span id="compatiblespan" class="link"> + </span> List of compatible changes
-					</a>
-				</th>
-			</tr>
-		</thead>
-		<tbody id="compatible">
-			<xsl:for-each select="delta">
-				<xsl:if test="(@compatible='true')">
-					<tr>
-						<td>
-							<xsl:value-of disable-output-escaping="yes" select="@message"/>
-						</td>
-					</tr>
-				</xsl:if>
-			</xsl:for-each>
-		</tbody>
-	</table>
-</xsl:template>
 </xsl:stylesheet>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/xslt/notsearched.xsl b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/notsearched.xsl
new file mode 100644
index 0000000..87992b0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/notsearched.xsl
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+	Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.
+	
+	All Platform Debug contexts, those for org.eclipse.debug.ui, are located in this file
+	All contexts are grouped by their relation, with all relations grouped alphabetically.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+<xsl:template match="/">
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+	<title>List of bundles that were not searched</title>
+		<style type="text/css">
+			.main{		font-family:Arial, Helvetica, sans-serif;}
+			.main h3 {	font-family:Arial, Helvetica, sans-serif;
+						background-color:#FFFFFF;
+						font-size:14px;
+						margin:0.1em;}
+			.main h4 { 	background-color:#CCCCCC;
+						margin:0.15em;}
+			a.typeslnk{	font-family:Arial, Helvetica, sans-serif;
+					   	text-decoration:none;
+					   	margin-left:0.25em;}
+			a.typeslnk:hover{text-decoration:underline;}
+			.types{	display:none;
+					margin-bottom:0.25em;
+					margin-top:0.25em;
+					margin-right:0.25em;
+				   	margin-left:0.75em;} 
+		</style>
+		<script type="text/javascript">
+			function expand(location){
+			   if(document.getElementById){
+				  var childhtml = location.firstChild;
+				  if(!childhtml.innerHTML) {
+				  	childhtml = childhtml.nextSibling;
+				  }
+				  childhtml.innerHTML = childhtml.innerHTML == '[+] ' ? '[-] ' : '[+] ';
+				  var parent = location.parentNode.parentNode;
+				  childhtml = parent.nextSibling.style ? parent.nextSibling : parent.nextSibling.nextSibling;
+				  childhtml.style.display = childhtml.style.display == 'block' ? 'none' : 'block';
+				}
+			}  
+		</script>
+		<noscript>
+			<style type="text/css">
+				.types{display:block;}
+				.kinds{display:block;}
+			</style>
+		</noscript>
+	</head>
+	<body>
+		<h3>
+			Bundles that were not searched
+		</h3>
+			<xsl:choose>
+				<xsl:when test="count(components/component) > 0">
+				<p>
+					A summary of the missing required bundles is <a href="missing.html">available here</a>.
+				</p>
+				<p>
+					Click an entry in the table below to reveal the details of why it was not searched.
+				</p>
+				<div align="left" class="main">
+					<table border="1" width="60%">
+						<tr bgcolor="#E0C040">
+							<td><b>Skipped Bundles</b></td>
+						</tr>
+						<xsl:for-each select="components/component">
+							<xsl:sort select="@id"/>
+							<tr>
+								<td>
+									<h3>
+										<b>
+											<a href="javascript:void(0)" class="typeslnk" onclick="expand(this)">
+												<span>[+] </span><xsl:value-of disable-output-escaping="yes" select="@id"/> (<xsl:value-of disable-output-escaping="yes" select="@version"/>)
+											</a>
+										</b>
+									</h3>
+									<div class="types">
+										<table border="0" width="100%">
+											<tr>
+												<td bgcolor="#CCCCCC"><b>Details</b></td>
+											</tr>	
+											<tr align="left">
+												<pre>
+													<td><xsl:value-of disable-output-escaping="yes" select="@details"/></td>
+												</pre>
+											</tr>
+										</table>
+									</div>
+								</td>
+							</tr>
+						</xsl:for-each>
+					</table>
+					</div>
+				</xsl:when>
+				<xsl:otherwise>
+					<p>No bundles were skipped during the search.</p>
+				</xsl:otherwise>
+			</xsl:choose>
+			<p>
+				<a href="index.html">Back to bundle summary</a>
+			</p>
+		<p>
+			<a href="http://validator.w3.org/check?uri=referer">
+				<img src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01 Transitional" height="31" width="88" />
+			</a>
+			<a href="http://validator.w3.org/check?uri=referer">
+				<img src="http://www.w3.org/Icons/valid-xhtml10-blue" alt="Valid XHTML 1.0 Strict" height="31" width="88" />
+			</a>
+		</p>
+	</body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools/xslt/references.xsl b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/references.xsl
index 1e5534a..e6d9566 100644
--- a/eclipse/plugins/org.eclipse.pde.api.tools/xslt/references.xsl
+++ b/eclipse/plugins/org.eclipse.pde.api.tools/xslt/references.xsl
@@ -33,12 +33,16 @@
 				   	margin-left:0.75em;} 
 		</style>
 		<script type="text/javascript">
-			function expand(loc){
+			function expand(location){
 			   if(document.getElementById){
-				  var foc = loc.firstChild;
-				  foc = loc.firstChild.innerHTML ? loc.firstChild : loc.firstChild.nextSibling;
-				  foc = loc.parentNode.nextSibling.style ? loc.parentNode.nextSibling : loc.parentNode.nextSibling.nextSibling;
-				  foc.style.display = foc.style.display == 'block' ? 'none' : 'block';
+				 var childhtml = location.firstChild;
+				  if(!childhtml.innerHTML) {
+				  	childhtml = childhtml.nextSibling;
+				  }
+				  childhtml.innerHTML = childhtml.innerHTML == '[+] ' ? '[-] ' : '[+] ';
+				  var parent = location.parentNode.parentNode;
+				  childhtml = parent.nextSibling.style ? parent.nextSibling : parent.nextSibling.nextSibling;
+				  childhtml.style.display = childhtml.style.display == 'block' ? 'none' : 'block';
 				}
 			}  
 		</script>
@@ -59,17 +63,19 @@
 		</p>
 		<div align="left" class="main">
 			<table border="1" width="90%">
-				<tr bgcolor="#CC9933">
+				<tr bgcolor="#E0C040">
 					<td><b>Reference Details</b></td>
 				</tr>
-				<xsl:for-each select="references/type_name">
+				<xsl:for-each select="references/target">
 				<xsl:sort select="@name"/>
 					<tr>
 						<td>
 							<h3>
-								<a href="javascript:void(0)" class="typeslnk" onclick="expand(this)">
-									<b><xsl:value-of disable-output-escaping="yes" select="@name"/></b>
-								</a>
+								<b>
+									<a href="javascript:void(0)" class="typeslnk" onclick="expand(this)">
+										<span>[+] </span><xsl:value-of disable-output-escaping="yes" select="@name"/>
+									</a>
+								</b>
 							</h3>
 							<div class="types">
 								<table border="0" width="100%">
diff --git a/eclipse/plugins/org.eclipse.pde.build/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.pde.build/.settings/org.eclipse.jdt.core.prefs
index 850c7b3..84c672a 100644
--- a/eclipse/plugins/org.eclipse.pde.build/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.pde.build/.settings/org.eclipse.jdt.core.prefs
@@ -1,353 +1,355 @@
-#Wed Feb 04 16:41:44 EST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+#Mon Mar 01 15:03:13 EST 2010
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
 org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
 org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.incompleteClasspath=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
 org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
 org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
 org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
 org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/eclipse/plugins/org.eclipse.pde.build/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.build/META-INF/MANIFEST.MF
index cb88ce0..68afb38 100644
--- a/eclipse/plugins/org.eclipse.pde.build/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.build/META-INF/MANIFEST.MF
@@ -1,23 +1,14 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-Version: 3.5.2.qualifier
-Bundle-SymbolicName: org.eclipse.pde.build; singleton:=true
-Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.pde.build;singleton:=true
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: pdebuild.jar
 Bundle-Activator: org.eclipse.pde.internal.build.BuildActivator
-Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ant.core;bundle-version="[3.1.100,4.0.0)",
- org.eclipse.core.runtime.compatibility;bundle-version="[3.1.100,4.0.0)";resolution:=optional,
- org.eclipse.osgi;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.equinox.p2.metadata.generator;resolution:=optional,
- org.eclipse.equinox.p2.jarprocessor;bundle-version="[1.0.1,2.0.0)",
- org.eclipse.equinox.p2.publisher;bundle-version="1.0.0";resolution:=optional,
- org.eclipse.equinox.p2.repository.tools;bundle-version="[1.0.0,2.0.0)";resolution:=optional
-Export-Package: 
- org.eclipse.pde.build,
- org.eclipse.pde.internal.build;x-friends:="org.eclipse.pde.core,org.eclipse.pde.ui",
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.pde.build,
+ org.eclipse.pde.internal.build;x-friends:="org.eclipse.pde.core,org.eclipse.pde.ui,org.eclipse.pde.launching",
  org.eclipse.pde.internal.build.ant;x-internal:=true,
  org.eclipse.pde.internal.build.builder;x-internal:=true,
  org.eclipse.pde.internal.build.fetch;x-internal:=true,
@@ -26,21 +17,30 @@ Export-Package:
  org.eclipse.pde.internal.build.site;x-friends:="org.eclipse.pde.core,org.eclipse.pde.ui",
  org.eclipse.pde.internal.build.site.compatibility;x-internal:=true,
  org.eclipse.pde.internal.swt.tools;x-internal:=true
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ant.core;bundle-version="[3.1.100,4.0.0)",
+ org.eclipse.core.runtime.compatibility;bundle-version="[3.1.100,4.0.0)";resolution:=optional,
+ org.eclipse.osgi;bundle-version="[3.3.0,4.0.0)",
+ org.eclipse.equinox.p2.jarprocessor;bundle-version="[1.0.1,2.0.0)",
+ org.eclipse.equinox.p2.publisher;bundle-version="1.1.0";resolution:=optional,
+ org.eclipse.equinox.p2.repository.tools;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
+ org.eclipse.equinox.p2.director.app;bundle-version="1.0.200"
 Import-Package: com.ibm.icu.util,
+ org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
  org.eclipse.equinox.internal.p2.core.helpers,
+ org.eclipse.equinox.internal.p2.engine,
+ org.eclipse.equinox.internal.p2.engine.phases,
  org.eclipse.equinox.internal.p2.metadata,
  org.eclipse.equinox.internal.p2.updatesite;resolution:=optional,
  org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository,
- org.eclipse.equinox.internal.provisional.p2.core,
- org.eclipse.equinox.internal.provisional.p2.engine,
- org.eclipse.equinox.internal.provisional.p2.engine.phases,
- org.eclipse.equinox.internal.provisional.p2.metadata,
- org.eclipse.equinox.internal.provisional.p2.metadata.query,
- org.eclipse.equinox.internal.provisional.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.p2.query,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator
-Bundle-Localization: plugin
+ org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.pde.build/data/env.properties b/eclipse/plugins/org.eclipse.pde.build/data/env.properties
index ebb1218..88799f5 100644
--- a/eclipse/plugins/org.eclipse.pde.build/data/env.properties
+++ b/eclipse/plugins/org.eclipse.pde.build/data/env.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2006, 2008 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2006, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 CDC-1.0/Foundation-1.0.javacSource=1.3
@@ -41,6 +41,9 @@ J2SE-1.5.javacTarget=1.5
 JavaSE-1.6.javacSource=1.6
 JavaSE-1.6.javacTarget=1.6
 
+JavaSE-1.7.javacSource=1.7
+JavaSE-1.7.javacTarget=1.7
+
 PersonalJava-1.1.javacSource=1.1
 PersonalJava-1.1.javacTarget=1.1
 
diff --git a/eclipse/plugins/org.junit4/cpl-v10.html b/eclipse/plugins/org.eclipse.pde.build/feature/rootfiles/cpl-v10.html
similarity index 100%
rename from eclipse/plugins/org.junit4/cpl-v10.html
rename to eclipse/plugins/org.eclipse.pde.build/feature/rootfiles/cpl-v10.html
diff --git a/eclipse/plugins/org.eclipse.pde.build/plugin.xml b/eclipse/plugins/org.eclipse.pde.build/plugin.xml
index e491476..dfff868 100644
--- a/eclipse/plugins/org.eclipse.pde.build/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.build/plugin.xml
@@ -1,5 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
+<?eclipse version="3.0"?><!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
    <extension-point id="fetchFactories" name="%fetchFactories.name" schema="schema/fetchFactories.exsd"/>
 <!-- Tasks -->
@@ -80,7 +90,17 @@
             library="lib/pdebuild-ant.jar"
             name="eclipse.publish.featuresAndBundles">
       </antTask>
-      
+	<antTask
+		class="org.eclipse.pde.internal.build.tasks.CompileErrorTask"
+		library="lib/pdebuild-ant.jar"
+		name="eclipse.logCompileError">
+	</antTask>
+	<antTask
+		class="org.eclipse.pde.internal.build.generator.GeneratorTask"
+		library="lib/pdebuild-ant.jar"
+		name="p2.generator">
+	</antTask>
+    
    </extension>
 <!-- Extra Classpath -->
    <extension
diff --git a/eclipse/plugins/org.eclipse.pde.build/scripts/genericTargets.xml b/eclipse/plugins/org.eclipse.pde.build/scripts/genericTargets.xml
index 461a503..351a026 100644
--- a/eclipse/plugins/org.eclipse.pde.build/scripts/genericTargets.xml
+++ b/eclipse/plugins/org.eclipse.pde.build/scripts/genericTargets.xml
@@ -1,11 +1,11 @@
 <!--
-     Copyright (c) 2003, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+    Copyright (c) 2003, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 <project name="Generic Build Targets" default="noDefault">
@@ -92,6 +92,7 @@
 		significantVersionDigits="${significantVersionDigits}"
 		generatedVersionLength="${generatedVersionLength}"
 		generateVersionsLists="${generateVersionsLists}"
+		generateSourceReferences="${generateSourceReferences}"
 		groupConfiguration="${groupConfigurations}"
 		pluginPath="${transformedRepoLocation}${path.separator}${pluginPath}"
 		filteredDependencyCheck="${filteredDependencyCheck}"
@@ -206,8 +207,9 @@ set here?
 <!-- Invokes the p2 transformer to process all the repositories found in repoBaseLocation -->
 <!-- ===================================================================== -->
 <target name="transformRepos">
+	<property name="repoBaseLocation.excludes" value=".*" />
 	<p2.repo2runnable destination="${transformedRepoLocation}">
-		<source dir="${repoBaseLocation}/" includes="*"/>
+		<source dir="${repoBaseLocation}/" includes="*" excludes="${repoBaseLocation.excludes}"/>
 	</p2.repo2runnable>
 </target>
 
@@ -219,57 +221,22 @@ set here?
 	<property name="p2.director.extraVMArgs" value="-Declipse.p2.MD5Check=false" />
 	<property name="p2.director.profile" value="profile" />
 	<property name="p2.director.version" value="" />
-	<!-- by default, fork using the same config area we are running under -->
-	<property name="p2.director.configArea" value="${osgi.configuration.area}" />
-	<condition property="p2.director.devMode" value="-dev "${osgi.dev}"" else="">
-		<isset property="osgi.dev" />
-	</condition>
-	
-	<java jar="${equinoxLauncherJar}" fork="true" failonerror="false" resultproperty="p2.director.return.code" outputproperty="p2.director.java.output">
-		<arg line="-application org.eclipse.equinox.p2.director.app.application" />
-		<arg line="-nosplash" />
-		<arg line="--launcher.suppressErrors" />
-		<arg line="-consoleLog" />
-		<arg line="-flavor ${p2.flavor}" />
-		<arg line="-installIU ${p2.director.iu}" />
-		<arg line="-version ${p2.director.version}" />
-		<!-- need to quote os,ws,arch so that '*' does not get expanded -->
-		<arg value="-p2.os" />
-		<arg value="${os}" />
-		<arg value="-p2.ws" />
-		<arg value="${ws}" />
-		<arg value="-p2.arch" />
-		<arg value="${arch}" />
-		<arg line="-roaming" />
-		<arg value="-profile" />
-		<arg value="${p2.director.profile}" />
-		<arg line="${p2.director.extraArgs}" />
-		<arg line="-metadataRepository"/>
-		<arg value="${p2.repo}" />
-		<arg line="-artifactRepository"/>
-		<arg value="${p2.repo}" />
-		<arg line="-destination"/>
-		<arg value="${p2.director.installPath}" />
-		<arg line="-bundlepool"/>
-		<arg value="${p2.director.bundlepool}" />
-
-		<jvmarg value="-Declipse.p2.data.area=${p2.director.dataArea}" />
-		<jvmarg value="-Declipse.p2.profile=@none" />
-		<jvmarg line="${p2.director.extraVMArgs}" />
-		
-		<arg line="${p2.director.devMode}"/>
-		<sysproperty key="osgi.configuration.area" value="${p2.director.configArea}" />
-	</java>
-	<echo message="${p2.director.java.output}" />
-	<antcall target="logDirectorCall"/>
-	<condition property="p2.director.error">
-		<isfailure code="${p2.director.return.code}" />
-	</condition>
-	<fail if="p2.director.error" message="A Problem occured while running the director." />
-</target>
 	
-<target name="logDirectorCall" if="p2.director.log" >
-	<echo message="${p2.director.java.output}" file="${p2.director.log}" append="true" />
+	<p2.director 
+		os="${os}" ws="${ws}" arch="${arch}" 
+		flavor="${p2.flavor}" 
+		roaming="true" 
+		profile="${p2.director.profile}"
+		extraArguments="${p2.director.extraArgs}"
+		metadataRepository="${p2.repo}" 
+		artifactRepository="${p2.repo}" 
+		destination="${p2.director.installPath}" 
+		bundlepool="${p2.director.bundlepool}"
+		agentLocation="${p2.director.dataArea}"
+		outputProperty="p2.director.java.output"
+		logFile="${p2.director.log}">
+		<iu id="${p2.director.iu}" version="${p2.director.version}" />
+	</p2.director>
 </target>
 	
 </project>
diff --git a/eclipse/plugins/org.eclipse.pde.build/scripts/productBuild/productBuild.xml b/eclipse/plugins/org.eclipse.pde.build/scripts/productBuild/productBuild.xml
index 23917f6..12131e4 100644
--- a/eclipse/plugins/org.eclipse.pde.build/scripts/productBuild/productBuild.xml
+++ b/eclipse/plugins/org.eclipse.pde.build/scripts/productBuild/productBuild.xml
@@ -1,11 +1,11 @@
 <!--
-     Copyright (c) 2006, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+    Copyright (c) 2006, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 <project name="Build a Product" default="main">
@@ -21,6 +21,9 @@
 <property name="featureList" value=""/>
 <property name="includeLaunchers" value="true"/>
 <property name="generatedBuildProperties" value=""/>
+<condition property="nestedInclusions" value="true">
+	<istrue value="${p2.gathering}" />
+</condition>
 
 <!-- ===================================================================== -->
 <!-- main entry point to setup, fetch, generate, build etc. Use -->
@@ -61,6 +64,8 @@
 		featureList="${featureList}"
 		includeLaunchers="${includeLaunchers}"
 		buildPropertiesFile="${generatedBuildProperties}"
+		nestedInclusions="${nestedInclusions}"
+		filterP2Base="${filterP2Base}"
 	/>
 </target>
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/Constants.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/Constants.java
index 375dd0d..8f0c1fc 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/Constants.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/Constants.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2006 Eclipse Foundation and others.
+ * Copyright (c) 2006, 2010 Eclipse Foundation and others.
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
  *     Gunnar Wagenknecht - Initial API and implementation
  *     IBM Corporation - Initial API and implementation
  **********************************************************************/
- package org.eclipse.pde.build;
+package org.eclipse.pde.build;
 
 /**
  * Constants for the files usually manipulated by the fetch factory.
@@ -19,13 +19,22 @@
 public interface Constants {
 	/** Constant for the string <code>feature.xml</code> */
 	public final static String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
-	
+
 	/** Constant for the string <code>fragment.xml</code> */
 	public final static String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
-	
+
 	/** Constant for the string <code>plugin.xml</code> */
 	public final static String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
-	
+
 	/** Constant for the string <code>META-INF/MANIFEST.MF</code> */
 	public final static String BUNDLE_FILENAME_DESCRIPTOR = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
+
+	/**
+	 * Key used to store the value of a project reference in the Eclipse-SourceReferences manifest header.  
+	 * 
+	 * @since 3.6
+	 * @see IFetchFactory
+	 */
+	public static final String KEY_SOURCE_REFERENCES = "sourceReferences"; //$NON-NLS-1$
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IAntScript.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IAntScript.java
index 43be65a..8ba53f9 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IAntScript.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IAntScript.java
@@ -1,15 +1,16 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.build;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -48,15 +49,15 @@ public interface IAntScript {
 	 * Print a empty line.
 	 */
 	public void println();
-	
+
 	/**
-	 * Print an ant call task as defined by <a href="http://ant.apache.org/manual/CoreTasks/antcall.html">AntCall</a>}.
+	 * Print an ant call task as defined by <a href="http://ant.apache.org/manual/Tasks/antcall.html">AntCall</a>}.
 	 * @param target the target executed by the call. This value can not be <code>null</code>.
 	 * @param inheritAll If true, pass all properties to the new Ant project.
 	 * @param params Specifies as key / value pairs, the properties to set before running the specified target. This value can be <code>null</code>
 	 */
 	public void printAntCallTask(String target, boolean inheritAll, Map params);
-	
+
 	/**
 	 * Print an XML attribute. <code>name=value</code>.
 	 * @param name the name of the attribute to print. This value can not be <code>null</code>.
@@ -65,24 +66,52 @@ public interface IAntScript {
 	 * If the <code>value</code> is <code>null</code> and the attribute is mandatory, the printed value will be "". 
 	 */
 	public void printAttribute(String name, String value, boolean mandatory);
-	
+
 	/**
 	 * Print tagName as an xml begin tag (<code><tagName><code>).
 	 * @param tagName the tag to print.
 	 */
 	public void printStartTag(String tagName);
-	
+
+	/**
+	 * Print tagName as an xml begin tag with attributes (<code><tagName [attributes...] ><code>).
+	 * @param tag
+	 * @param attributes
+	 * @since 3.6
+	 */
+	public void printStartTag(String tag, Map attributes);
+
 	/**
 	 * Print tagName as an xml end tag (<code></tagName><code>).
 	 * @param endTag the tag to print.
 	 */
 	public void printEndTag(String endTag);
-	
+
+	/**
+	 * Print an xml element with attributes (<code><tagName [attributes...] /><code>).
+	 * @param tag
+	 * @param attributes
+	 * @since 3.6
+	 */
+	public void printElement(String tag, Map attributes);
+
 	/**
 	 * Print as many tabs as current nesting level requires
 	 */
 	public void printTabs();
-	
+
+	/**
+	 * Increment the nesting level
+	 * @since 3.6
+	 */
+	public void incrementIdent();
+
+	/**
+	 * Decrement the nesting level
+	 * @since 3.6
+	 */
+	public void decrementIdent();
+
 	/**
 	 * Print a target declaration. See <a href="http://ant.apache.org/manual/using.html#targets">Ant's targets</a>. 
 	 * @param name the name of the target. This value can not be <code>null</code>.
@@ -92,9 +121,32 @@ public interface IAntScript {
 	 * @param description a short description of this target's function. This value can be <code>null</code>
 	 */
 	public void printTargetDeclaration(String name, String depends, String ifClause, String unlessClause, String description);
-	
+
 	/**
 	 * Print the end tag for a target declaration.
 	 */
 	public void printTargetEnd();
+
+	/**
+	 * Print an <a href="http://ant.apache.org/manual/Tasks/echo.html">echo</a> task
+	 * @param file - file to write the message to (or null)
+	 * @param message - the message to echo
+	 * @param level - the level to report the message (ie, "error", "warning", "info"), "warning" is the default if null is passed.
+	 * @since 3.6
+	 */
+	public void printEchoTask(String file, String message, String level);
+
+	/**
+	 * Print the beginning of a <a href="http://ant.apache.org/manual/Tasks/macrodef.html">macro definition</a>
+	 * @param macroName
+	 * @param attributes
+	 * @since 3.6
+	 */
+	public void printMacroDef(String macroName, List attributes);
+
+	/**
+	 * Print the end of the macro
+	 * @since 3.6
+	 */
+	public void printEndMacroDef();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IFetchFactory.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IFetchFactory.java
index 7e4f2e9..5c55fe4 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IFetchFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/build/IFetchFactory.java
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2004, 2006 Eclipse Foundation and others.
+ * Copyright (c) 2004, 2010 Eclipse Foundation and others.
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IPath;
 /**
  * Interface to be implemented by clients of the <code>org.eclipse.pde.build.fetchFactories</code> extension-point.
  * <p>
- * The factories are being used at various points in the execution of the PDE Build<code>eclipse.fetch</code> Ant task.
+ * The factories are being used at various points in the execution of the PDE Build <code>eclipse.fetch</code> Ant task.
  * Based on a map file entry, they are responsible for generating segments of an ant script whose execution will fetch 
  * plug-ins, fragments, bundles and features or individual files contained in one of those elements.
  * The format of a map file entry is:
@@ -37,6 +37,11 @@ import org.eclipse.core.runtime.IPath;
  * The fetch factories are being contributed through the <code>org.eclipse.pde.build.fetchFactories</code> 
  * extension-points.
  * </p>
+ * <p>
+ * Fetch factories will not be re-used between different PDE Build <code>eclipse.fetch</code> Ant tasks. Each task will create at
+ * most one fetch factory instance for the duration of the task processing. This allows implementors to
+ * build and maintain stateful information. Such information must be released in {@link #addTargets(IAntScript)} call.
+ * </p>
  * @since 3.2
  */
 public interface IFetchFactory {
@@ -77,7 +82,10 @@ public interface IFetchFactory {
 	 * infos should be filled with provider specific information that is
 	 * required in later processing to sucessfully generate the fetch script.
 	 * </p>
-	 * 
+	 * <p>
+	 * Since 3.6, factories may optionally set the {@link Constants#KEY_SOURCE_REFERENCES} property in the entry infos map to support the inclusion 
+	 * of source references in the bundle manifest using the Eclipse-SourceReferences header.
+	 * </p>
 	 * @param rawEntry the arguments as specified in the map file (may not be <code>null</code>).
 	 * @param overrideTags a key / value containing all the override tags specified for all the repository (maybe <code>null</code> or empty). 
 	 * The values of this map of this are read from the fetchTag property (see file scripts/templates/headless-build/build.properties). 
@@ -89,7 +97,7 @@ public interface IFetchFactory {
 	 * @throws CoreException if the rawEntry is incorrect.
 	 */
 	public void parseMapFileEntry(String rawEntry, Properties overrideTags, Map entryInfos) throws CoreException;
-	
+
 	/**
 	 * Generates a segment of ant script whose execution will fetch the element (bundle, plug-in, fragment, feature) indicated in the entryInfos arguments.
 	 * <p>
@@ -100,7 +108,7 @@ public interface IFetchFactory {
 	 * @param script the script in which to generate the segments of ant script. It is not authorized to generate target declaration during this call.  
 	 */
 	public void generateRetrieveElementCall(Map entryInfos, IPath destination, IAntScript script);
-	
+
 	/**
 	 * Generates a segment of ant script whose execution will fetch the specified file from the given element.
 	 * <p> 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java
index 00693a8..c0c3d85 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java
@@ -1,19 +1,25 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.*;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.State;
 import org.eclipse.osgi.util.NLS;
@@ -29,6 +35,19 @@ import org.osgi.framework.Version;
  * It contains basic informations like the script, the configurations, and a location 
  */
 public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuildConstants, IBuildPropertiesConstants {
+	private static final FilenameFilter METADATA_REPO_FILTER = new FilenameFilter() {
+		public boolean accept(File dir, String name) {
+			return name.startsWith("content.") || name.startsWith("compositeContent.") || //$NON-NLS-1$ //$NON-NLS-2$
+					name.endsWith(".profile") || name.endsWith(".profile.gz"); //$NON-NLS-1$//$NON-NLS-2$
+		}
+	};
+
+	private static final FilenameFilter ARTIFACT_REPO_FILTER = new FilenameFilter() {
+		public boolean accept(File dir, String name) {
+			return name.startsWith("artifacts.") || name.startsWith("compositeArtifacts."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	};
+
 	private static Properties immutableAntProperties = null;
 	protected static boolean embeddedSource = false;
 	protected static boolean forceUpdateJarFormat = false;
@@ -36,6 +55,7 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 	protected static String workingDirectory;
 	protected static boolean buildingOSGi = true;
 	protected URI[] contextMetadata = null;
+	protected URI[] contextArtifacts = null;
 	protected AntScript script;
 	protected Properties platformProperties;
 	protected String productQualifier;
@@ -274,7 +294,7 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 
 	protected static boolean loadP2Class() {
 		try {
-			BundleHelper.getDefault().getClass().getClassLoader().loadClass("org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator"); //$NON-NLS-1$
+			BundleHelper.getDefault().getClass().getClassLoader().loadClass("org.eclipse.equinox.p2.publisher.Publisher"); //$NON-NLS-1$
 			return true;
 		} catch (Throwable e) {
 			return false;
@@ -291,20 +311,30 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 		if (siteFactory != null && refresh == false)
 			return siteFactory.createSite();
 
-		if (siteFactory == null || refresh == true) {
-			siteFactory = new BuildTimeSiteFactory();
-			siteFactory.setFilterState(filterState);
-			siteFactory.setFilterRoots(featuresForFilterRoots, pluginsForFilterRoots);
-			siteFactory.setReportResolutionErrors(reportResolutionErrors);
-			siteFactory.setFilterP2Base(filterP2Base);
-		}
+		//If there is an exception from createSite(), we will discard the factory
+		BuildTimeSiteFactory factory = new BuildTimeSiteFactory();
+		factory.setFilterState(filterState);
+		factory.setFilterRoots(featuresForFilterRoots, pluginsForFilterRoots);
+		factory.setReportResolutionErrors(reportResolutionErrors);
+		factory.setFilterP2Base(filterP2Base);
+		factory.setSitePaths(getPaths());
+		factory.setEESources(getEESources());
+		factory.setInitialState(pdeUIState);
+
+		BuildTimeSite result = factory.createSite();
+		siteFactory = factory;
 
-		siteFactory.setSitePaths(getPaths());
-		siteFactory.setEESources(getEESources());
-		siteFactory.setInitialState(pdeUIState);
-		BuildTimeSite result = siteFactory.createSite();
 		if (platformProperties != null)
 			result.setPlatformPropeties(platformProperties);
+
+		File baseProfile = result.getSiteContentProvider().getBaseProfile();
+		if (baseProfile != null) {
+			List repos = getAssociatedRepositories(baseProfile);
+			if (repos.size() > 0) {
+				addContextRepos((URI[]) repos.toArray(new URI[repos.size()]));
+			}
+		}
+
 		return result;
 	}
 
@@ -390,7 +420,7 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 	}
 
 	public ProductFile loadProduct(String product, String os) throws CoreException {
-		if (product == null || product.startsWith("${")) { //$NON-NLS-1$
+		if (product == null || product.startsWith("${") || product.length() == 0) { //$NON-NLS-1$
 			return null;
 		}
 		String productPath = findFile(product, false);
@@ -405,6 +435,9 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 				f = new File(getWorkingDirectory(), product);
 				if (!f.exists() || !f.isFile()) {
 					f = new File(getWorkingDirectory() + "/" + DEFAULT_PLUGIN_LOCATION, product); //$NON-NLS-1$
+					if (!f.exists() || !f.isFile()) {
+						f = new File(getWorkingDirectory() + '/' + DEFAULT_FEATURE_LOCATION, product);
+					}
 				}
 			}
 		}
@@ -425,6 +458,7 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 		try {
 			state = getSite(false).getRegistry();
 		} catch (CoreException e) {
+			BundleHelper.getDefault().getLog().log(e.getStatus());
 			return null;
 		}
 		Path path = new Path(location);
@@ -443,7 +477,7 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 		try {
 			feature = getSite(false).findFeature(id, null, false);
 		} catch (CoreException e) {
-			//Ignore
+			BundleHelper.getDefault().getLog().log(e.getStatus());
 		}
 		if (feature == null)
 			return null;
@@ -504,14 +538,215 @@ public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuil
 		filterP2Base = filter;
 	}
 
+	static private URI getDownloadCacheLocation(IProvisioningAgent agent) {
+		IAgentLocation location = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
+		if (location == null)
+			return null;
+		return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	protected void setContextArtifacts(URI[] uris) {
+		contextArtifacts = uris;
+	}
+
+	protected void setContextMetadata(URI[] uris) {
+		contextMetadata = uris;
+	}
+
 	public void setContextMetadataRepositories(URI[] uris) {
-		this.contextMetadata = uris;
+		Set uriSet = new HashSet();
+		uriSet.addAll(Arrays.asList(uris));
+
+		for (int i = 0; i < uris.length; i++) {
+			//try and find additional repos associated with a profile
+			File uriFile = URIUtil.toFile(uris[i]);
+			uriSet.addAll(getAssociatedRepositories(uriFile));
+		}
+
+		addContextRepos((URI[]) uriSet.toArray(new URI[uriSet.size()]));
+	}
+
+	protected void addContextRepos(URI[] repos) {
+		List metadata = filterRepos(repos, METADATA_REPO_FILTER);
+		List artifacts = filterRepos(repos, ARTIFACT_REPO_FILTER);
+
+		if (contextMetadata != null) {
+			Set uriSet = new HashSet();
+			uriSet.addAll(Arrays.asList(contextMetadata));
+			uriSet.addAll(metadata);
+			contextMetadata = (URI[]) uriSet.toArray(new URI[uriSet.size()]);
+		} else {
+			contextMetadata = (URI[]) metadata.toArray(new URI[metadata.size()]);
+		}
+
+		if (contextArtifacts != null) {
+			Set uriSet = new HashSet();
+			uriSet.addAll(Arrays.asList(contextArtifacts));
+			uriSet.addAll(artifacts);
+			contextArtifacts = (URI[]) uriSet.toArray(new URI[uriSet.size()]);
+		} else {
+			contextArtifacts = (URI[]) artifacts.toArray(new URI[artifacts.size()]);
+		}
+	}
+
+	//return only the metadata repos, and also the ones we aren't sure about
+	private List filterRepos(URI[] contexts, FilenameFilter repoFilter) {
+		if (contexts == null)
+			return null;
+		ArrayList result = new ArrayList();
+		for (int i = 0; i < contexts.length; i++) {
+			File repo = URIUtil.toFile(contexts[i]);
+			if (repo == null) {
+				//remote, not sure, just use it
+				result.add(contexts[i]);
+			} else {
+				String[] list = repo.list(repoFilter);
+				if (list != null && list.length > 0)
+					result.add(contexts[i]);
+			}
+		}
+		return result;
+	}
+
+	private List getAssociatedRepositories(File profileFile) {
+		if (profileFile == null || !profileFile.exists() || !profileFile.getName().endsWith(".profile")) //$NON-NLS-1$
+			return Collections.EMPTY_LIST;
+
+		ArrayList result = new ArrayList();
+		URI profileURI = profileFile.toURI();
+		result.add(profileURI);
+
+		Map profileInfo = extractProfileInformation(profileFile);
+		if (profileInfo == null)
+			return result;
+
+		File areaFile = new File((String) profileInfo.get(PROFILE_DATA_AREA));
+		if (areaFile.exists()) {
+			IProvisioningAgent agent = BundleHelper.getDefault().getProvisioningAgent(areaFile.toURI());
+			if (agent != null) {
+				IProfileRegistry registry = new SimpleProfileRegistry(agent, (File) profileInfo.get(PROFILE_REGISTRY), null, false);
+				try {
+					long timestamp = ((Long) profileInfo.get(PROFILE_TIMESTAMP)).longValue();
+					String profileId = (String) profileInfo.get(PROFILE_ID);
+					if (timestamp == -1L) {
+						long[] timestamps = registry.listProfileTimestamps(profileId);
+						if (timestamps.length > 0)
+							timestamp = timestamps[timestamps.length - 1];
+					}
+
+					//specifying the timestamp avoids attempting to lock the profile registry
+					//which could be a problem if it is read only.
+					if (timestamp > 0) {
+						IProfile profile = registry.getProfile(profileId, timestamp);
+						if (profile != null) {
+							String cache = profile.getProperty(IProfile.PROP_CACHE);
+							if (cache != null) {
+								File cacheFolder = new File(cache);
+								if (cacheFolder.exists()) {
+									result.add(cacheFolder.toURI());
+								} else {
+									//if cache does not exist, this could be a roaming profile that has not
+									//been run yet, lets guess and use the parent of the p2 data area
+									result.add(areaFile.getParentFile().toURI());
+								}
+							}
+							String sharedCache = profile.getProperty(IProfile.PROP_SHARED_CACHE);
+							if (sharedCache != null)
+								result.add(new File(cache).toURI());
+							String dropinRepositories = profile.getProperty("org.eclipse.equinox.p2.cache.extensions"); //$NON-NLS-1$
+							if (dropinRepositories != null) {
+								// #filterRepos will remove any dropin folders that require synchronization
+								StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, "|"); //$NON-NLS-1$
+								while (tokenizer.hasMoreTokens()) {
+									try {
+										result.add(new URI(tokenizer.nextToken()));
+									} catch (URISyntaxException e) {
+										//skip
+									}
+								}
+							}
+						}
+					}
+				} catch (IllegalStateException e) {
+					//unable to read profile, may be read only
+					result.add(areaFile.getParentFile().toURI());
+				}
+
+				//download cache
+				URI download = getDownloadCacheLocation(agent);
+				if (URIUtil.toFile(download).exists())
+					result.add(download);
+			}
+		}
+		return result;
+	}
+
+	private static String PROFILE_TIMESTAMP = "timestamp"; //$NON-NLS-1$
+	private static String PROFILE_ID = "profileId"; //$NON-NLS-1$
+	private static String PROFILE_DATA_AREA = "dataArea"; //$NON-NLS-1$
+	private static String PROFILE_REGISTRY = "registry"; //$NON-NLS-1$
+
+	private static Map extractProfileInformation(File target) {
+		if (target == null || !target.exists())
+			return null;
+
+		IPath path = new Path(target.getAbsolutePath());
+		if (!path.lastSegment().endsWith(PROFILE) && !path.lastSegment().endsWith(PROFILE_GZ))
+			return null;
+
+		//expect at least "p2/org.eclipse.equinox.p2.engine/profileRegistry/Profile.profile"
+		if (path.segmentCount() < 4)
+			return null;
+
+		Map results = new HashMap();
+		results.put(PROFILE_TIMESTAMP, new Long(-1));
+
+		String profileId = null;
+		if (target.isFile()) {
+			//p2/org.eclipse.equinox.p2.engine/profileRegistry/Profile.profile/123456.profile.gz
+			if (path.segmentCount() < 5)
+				return null;
+
+			String timestamp = path.lastSegment();
+			int idx = timestamp.indexOf('.');
+			if (idx > 0) {
+				timestamp = timestamp.substring(0, idx);
+				try {
+					results.put(PROFILE_TIMESTAMP, new Long(timestamp));
+				} catch (NumberFormatException e) {
+					//not a timestamp?
+				}
+			}
+
+			path = path.removeLastSegments(1);
+			profileId = path.removeFileExtension().lastSegment();
+		} else {
+			//target is the profile folder
+			profileId = path.removeFileExtension().lastSegment();
+		}
+
+		profileId = SimpleProfileRegistry.unescape(profileId);
+		results.put(PROFILE_ID, profileId);
+
+		//remove Profile.profile to get the registry folder
+		path = path.removeLastSegments(1);
+		results.put(PROFILE_REGISTRY, path.toFile());
+
+		//removing "org.eclipse.equinox.p2.engine/profileRegistry"
+		path = path.removeLastSegments(2);
+		results.put(PROFILE_DATA_AREA, path.toOSString());
+
+		return results;
 	}
 
 	public URI[] getContextMetadata() {
 		return contextMetadata;
 	}
 
+	public URI[] getContextArtifacts() {
+		return contextArtifacts;
+	}
+
 	public void setProductQualifier(String value) {
 		productQualifier = value;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java
index 3535a58..61e8776 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleConfigScriptGenerator.java
@@ -1,13 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation G&H Softwareentwicklung
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation G&H Softwareentwicklung
  * GmbH - internationalization implementation (bug 150933) Prosyst - create
  * proper OSGi bundles (bug 174157)
- ******************************************************************************/
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.File;
@@ -766,6 +768,7 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 				script.printAttribute("artifactRepositoryName", Utils.getPropertyFormat(PROPERTY_P2_ARTIFACT_REPO_NAME), true); //$NON-NLS-1$
 				script.printAttribute("publishArtifacts", Utils.getPropertyFormat(PROPERTY_P2_PUBLISH_ARTIFACTS), true); //$NON-NLS-1$
 				script.printAttribute("site", Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE), true); //$NON-NLS-1$
+				script.printAttribute("siteVersion", Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_VERSION), true); //$NON-NLS-1$
 				script.printAttribute("p2OS", configInfo.getOs(), true); //$NON-NLS-1$
 				if (!havePDEUIState() || rootFileProviders.size() > 0)
 					script.printAttribute("mode", "incremental", true); //$NON-NLS-1$ //$NON-NLS-2$
@@ -801,6 +804,9 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 				if (productFile != null) {
 					script.printAttribute("exe", rootFolder + '/' + Utils.getPropertyFormat(PROPERTY_LAUNCHER_NAME), true); //$NON-NLS-1$
 					script.printAttribute("productFile", Utils.getPropertyFormat(PROPERTY_P2_PRODUCT_MOD), true); //$NON-NLS-1$
+				} else {
+					script.printAttribute("root", Utils.getPropertyFormat(PROPERTY_P2_ROOT_NAME), true); //$NON-NLS-1$
+					script.printAttribute("rootVersion", Utils.getPropertyFormat(PROPERTY_P2_ROOT_VERSION), true); //$NON-NLS-1$
 				}
 				script.println("/>"); //$NON-NLS-1$
 			}
@@ -930,7 +936,10 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 
 		if (BuildDirector.p2Gathering) {
 			//TODO permissions
-			fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, null, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$
+			FileSet[] permissions = generatePermissions(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), true);
+			String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$
+			fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, toExcludeFromArchive, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$
+			fileSets.addAll(Arrays.asList(permissions));
 		} else {
 			for (int i = 0; i < plugins.length; i++) {
 				Object[] shape = shapeAdvisor.getFinalShape(plugins[i]);
@@ -950,7 +959,7 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 						fileSets.add(new ZipFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + elt.toStringReplacingAny(".", ANY_STRING), false, null, "**/**", null, null, null, elt.toStringReplacingAny(".", ANY_STRING), null, null)); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 					}
 				} else {
-					FileSet[] permissions = generatePermissions(true);
+					FileSet[] permissions = generatePermissions(rootFolder, true);
 					String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$
 					fileSets.add(new ZipFileSet(rootFolder, false, null, "**/**", null, toExcludeFromArchive, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX), null, null)); //$NON-NLS-1$
 					fileSets.addAll(Arrays.asList(permissions));
@@ -963,13 +972,17 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 		}
 	}
 
-	protected FileSet[] generatePermissions(boolean zip) {
+	protected Collection getArchiveRootFileProviders() {
+		return rootFileProviders != null ? rootFileProviders : Collections.EMPTY_LIST;
+	}
+
+	protected FileSet[] generatePermissions(String root, boolean zip) {
 		String configInfix = configInfo.toString("."); //$NON-NLS-1$
 		String prefixPermissions = ROOT_PREFIX + configInfix + '.' + PERMISSIONS + '.';
 		String commonPermissions = ROOT_PREFIX + PERMISSIONS + '.';
 		ArrayList fileSets = new ArrayList();
 
-		for (Iterator iter = rootFileProviders.iterator(); iter.hasNext();) {
+		for (Iterator iter = getArchiveRootFileProviders().iterator(); iter.hasNext();) {
 			Properties featureProperties = getFeatureBuildProperties((BuildTimeFeature) iter.next());
 			for (Iterator iter2 = featureProperties.entrySet().iterator(); iter2.hasNext();) {
 				Map.Entry permission = (Map.Entry) iter2.next();
@@ -981,17 +994,17 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 					if (instruction.startsWith(prefixPermissions)) {
 						addedByPermissions.add(values[i]);
 						if (zip)
-							fileSets.add(new ZipFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+							fileSets.add(new ZipFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 						else
-							fileSets.add(new TarFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+							fileSets.add(new TarFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(prefixPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 						continue;
 					}
 					if (instruction.startsWith(commonPermissions)) {
 						addedByPermissions.add(values[i]);
 						if (zip)
-							fileSets.add(new ZipFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+							fileSets.add(new ZipFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 						else
-							fileSets.add(new TarFileSet(rootFolder + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+							fileSets.add(new TarFileSet(root + (isFile ? '/' + values[i] : ""), isFile, null, isFile ? null : values[i] + "/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) + (isFile ? '/' + values[i] : ""), null, instruction.substring(commonPermissions.length()))); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 						continue;
 					}
 				}
@@ -1005,7 +1018,10 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 		List fileSets = new ArrayList();
 
 		if (BuildDirector.p2Gathering) {
-			fileSets.add(new TarFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, null, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$
+			FileSet[] permissions = generatePermissions(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false);
+			String toExcludeFromArchive = Utils.getStringFromCollection(this.addedByPermissions, ","); //$NON-NLS-1$
+			fileSets.add(new TarFileSet(Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE), false, null, "**/**", null, toExcludeFromArchive, null, productFile != null ? Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX) : null, null, null)); //$NON-NLS-1$
+			fileSets.addAll(Arrays.asList(permissions));
 		} else {
 			//FileSet[] filesPlugins = new FileSet[plugins.length];
 			for (int i = 0; i < plugins.length; i++) {
@@ -1019,7 +1035,7 @@ public class AssembleConfigScriptGenerator extends AbstractScriptGenerator {
 			}
 
 			if (rootFileProviders.size() > 0) {
-				FileSet[] permissionSets = generatePermissions(false);
+				FileSet[] permissionSets = generatePermissions(rootFolder, false);
 				fileSets.add(new TarFileSet(rootFolder, false, null, "**/**", null, null, null, Utils.getPropertyFormat(PROPERTY_ARCHIVE_PREFIX), null, null)); //$NON-NLS-1$
 				fileSets.add(Arrays.asList(permissionSets));
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java
index 11b8599..9098bc0 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssembleScriptGenerator.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.File;
@@ -51,6 +53,7 @@ public class AssembleScriptGenerator extends AbstractScriptGenerator {
 			openScript(directory, getScriptName());
 			printProjectDeclaration();
 			printAssembleMacroDef();
+			generatePrologue();
 			generateMainTarget();
 			generateReplaceProductTarget();
 			generateMetadataTarget();
@@ -66,6 +69,12 @@ public class AssembleScriptGenerator extends AbstractScriptGenerator {
 		script.printProjectDeclaration("Assemble All Config of " + featureId, TARGET_MAIN, null); //$NON-NLS-1$
 	}
 
+	protected void generatePrologue() {
+		if (productQualifier != null)
+			script.printProperty(PROPERTY_P2_PRODUCT_QUALIFIER, productQualifier);
+		script.println();
+	}
+
 	protected void printDefaultAssembleCondition() {
 		// packaging may need to print something different if running in a backward compatible mode.
 		script.printConditionIsSet("defaultAssemble.@{config}", "defaultAssemble", "defaultAssemblyEnabled", "assemble.@{element}@{dot}@{config}"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -144,7 +153,8 @@ public class AssembleScriptGenerator extends AbstractScriptGenerator {
 		p2ConfigGenerator.initialize(directory, featureId);
 		p2ConfigGenerator.setSignJars(configScriptGenerator.isSigning());
 		p2ConfigGenerator.setVersionsList(versionsList);
-		p2ConfigGenerator.setContextMetadataRepositories(contextMetadata);
+		p2ConfigGenerator.setContextMetadata(contextMetadata);
+		p2ConfigGenerator.setContextArtifacts(contextArtifacts);
 		p2ConfigGenerator.setProductQualifier(productQualifier);
 		p2ConfigGenerator.generate();
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssemblyInformation.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssemblyInformation.java
index 180603b..ff3b380 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssemblyInformation.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AssemblyInformation.java
@@ -157,7 +157,7 @@ public class AssemblyInformation implements IPDEBuildConstants {
 	}
 
 	// All the information that will go into the assemble file for a specific info
-	protected class AssemblyLevelConfigInfo {
+	protected static class AssemblyLevelConfigInfo {
 		// the plugins that are contained into this config
 		private final Collection plugins = new LinkedHashSet(20);
 		// the features that are contained into this config
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BrandingIron.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BrandingIron.java
index ee9bc8e..3e6247d 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BrandingIron.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BrandingIron.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build;
@@ -70,16 +70,18 @@ public class BrandingIron implements IXMLConstants {
 
 		if ("win32".equals(os)) //$NON-NLS-1$
 			brandWindows();
-		if ("linux".equals(os)) //$NON-NLS-1$
+		else if ("linux".equals(os)) //$NON-NLS-1$
 			brandLinux();
-		if ("solaris".equals(os)) //$NON-NLS-1$
+		else if ("solaris".equals(os)) //$NON-NLS-1$
 			brandSolaris();
-		if ("macosx".equals(os)) //$NON-NLS-1$
+		else if ("macosx".equals(os)) //$NON-NLS-1$
 			brandMac();
-		if ("aix".equals(os)) //$NON-NLS-1$
+		else if ("aix".equals(os)) //$NON-NLS-1$
 			brandAIX();
-		if ("hpux".equals(os)) //$NON-NLS-1$
+		else if ("hpux".equals(os)) //$NON-NLS-1$
 			brandHPUX();
+		else
+			renameLauncher();
 	}
 
 	private void brandAIX() {
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildApplication.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildApplication.java
index 7ab88a6..76ed7cf 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildApplication.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,102 +12,30 @@ package org.eclipse.pde.internal.build;
 
 import java.io.IOException;
 import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
+import org.eclipse.ant.core.AntRunner;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.app.IApplication;
 import org.eclipse.equinox.app.IApplicationContext;
-import org.osgi.framework.Bundle;
 
 public class BuildApplication implements IApplication {
 
-	class ApplicationContext implements IApplicationContext {
-
-		IApplicationContext parent;
-		Map arguments;
-
-		ApplicationContext(IApplicationContext parent, Map arguments) {
-			this.parent = parent;
-			this.arguments = arguments;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#applicationRunning()
-		 */
-		public void applicationRunning() {
-			parent.applicationRunning();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getArguments()
-		 */
-		public Map getArguments() {
-			return arguments;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingApplication()
-		 */
-		public String getBrandingApplication() {
-			return parent.getBrandingApplication();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingBundle()
-		 */
-		public Bundle getBrandingBundle() {
-			return parent.getBrandingBundle();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingDescription()
-		 */
-		public String getBrandingDescription() {
-			return parent.getBrandingDescription();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingId()
-		 */
-		public String getBrandingId() {
-			return parent.getBrandingId();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingName()
-		 */
-		public String getBrandingName() {
-			return parent.getBrandingName();
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.app.IApplicationContext#getBrandingProperty(java.lang.String)
-		 */
-		public String getBrandingProperty(String key) {
-			return parent.getBrandingProperty(key);
-		}
-	}
-
 	/* (non-Javadoc)
 	 * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
 	 */
 	public Object start(IApplicationContext context) throws Exception {
-		Platform.endSplash();
+		//take down splash
+		context.applicationRunning();
+
 		IExtension extension = Platform.getExtensionRegistry().getExtension("org.eclipse.ant.core.antRunner"); //$NON-NLS-1$
 		if (extension == null)
 			return null;
 		IConfigurationElement element = extension.getConfigurationElements()[0];
 		Object ee = element.createExecutableExtension("run"); //$NON-NLS-1$
-		Object args = context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
-		args = updateArgs((String[]) args);
+		String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
+		args = updateArgs(args);
 
-		if (ee instanceof IApplication) {
-			// create a copy of this context arguments
-			Map arguments = new HashMap(context.getArguments());
-			// add the updated args as a key for launching antRunner
-			arguments.put(IApplicationContext.APPLICATION_ARGS, args);
-			IApplicationContext appContext = new ApplicationContext(context, arguments);
-			return ((IApplication) ee).start(appContext);
+		if (ee instanceof AntRunner) {
+			return ((AntRunner) ee).run(args);
 		}
 		// else it is probably an old IPlatformRunnable
 		return doPlatformRunnable(ee, args);
@@ -125,7 +53,7 @@ public class BuildApplication implements IApplication {
 		return null;
 	}
 
-	private Object updateArgs(String[] args) throws IOException {
+	private String[] updateArgs(String[] args) throws IOException {
 		for (int i = 0; i < args.length; i++) {
 			String string = args[i];
 			if (string.equals("-f") || string.equals("-buildfile")) //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildScriptGenerator.java
index 0a2c715..50f9029 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BuildScriptGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *      Ben Pryor - Bug 148288
  *******************************************************************************/
@@ -80,6 +80,7 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 	private Properties antProperties = null;
 	private BundleDescription[] bundlesToBuild;
 	private boolean flatten = false;
+	private boolean sourceReferences = false;
 
 	private static final String PROPERTY_ARCHIVESFORMAT = "archivesFormat"; //$NON-NLS-1$
 
@@ -154,6 +155,7 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 				generator.setCompiledElements(generator.getCompiledElements());
 				generator.setBuildingOSGi(isBuildingOSGi());
 				generator.setSignJars(signJars);
+				generator.setGenerateSourceReferences(sourceReferences);
 				generator.generate();
 			}
 			if (bundlesToBuild != null)
@@ -170,6 +172,7 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 					generator.setCompiledElements(generator.getCompiledElements());
 					generator.setBuildingOSGi(isBuildingOSGi());
 					generator.setSignJars(signJars);
+					generator.setGenerateSourceReferences(sourceReferences);
 					generator.generate();
 				}
 		} finally {
@@ -221,7 +224,9 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 			generator.setProduct(product);
 			generator.setProductQualifier(productQualifier);
 			generator.setUseWorkspaceBinaries(workspaceBinaries);
-			generator.setContextMetadataRepositories(contextMetadata);
+			generator.setContextMetadata(contextMetadata);
+			generator.setContextArtifacts(contextArtifacts);
+			generator.setGenerateSourceReferences(sourceReferences);
 		}
 
 		if (generator != null) {
@@ -373,7 +378,8 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 		assembler.setBuildSiteFactory(factory);
 		assembler.setGroupConfigs(groupConfigs);
 		assembler.setVersionsList(generateVersionsList);
-		assembler.setContextMetadataRepositories(contextMetadata);
+		assembler.setContextMetadata(contextMetadata);
+		assembler.setContextArtifacts(contextArtifacts);
 		assembler.generate();
 	}
 
@@ -387,7 +393,8 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 		assembler.setBuildSiteFactory(factory);
 		assembler.setGroupConfigs(groupConfigs);
 		assembler.setVersionsList(generateVersionsList);
-		assembler.setContextMetadataRepositories(contextMetadata);
+		assembler.setContextMetadata(contextMetadata);
+		assembler.setContextArtifacts(contextArtifacts);
 		assembler.generate();
 	}
 
@@ -492,7 +499,7 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 		generateFeatureVersionSuffix = value;
 	}
 
-	private class ArchiveTable extends HashMap {
+	private static class ArchiveTable extends HashMap {
 		private static final long serialVersionUID = -3063402400461435816L;
 
 		public ArchiveTable(int size) {
@@ -594,4 +601,8 @@ public class BuildScriptGenerator extends AbstractScriptGenerator {
 	public void setUseWorkspaceBinaries(boolean workspaceBinaries) {
 		this.workspaceBinaries = workspaceBinaries;
 	}
+
+	public void setGenerateSourceReferences(boolean generateSourceRef) {
+		this.sourceReferences = generateSourceRef;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BundleHelper.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BundleHelper.java
index 6296947..fe1d4d1 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BundleHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/BundleHelper.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,10 +12,12 @@ package org.eclipse.pde.internal.build;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URI;
 import java.net.URL;
-import java.util.Dictionary;
-import java.util.Map;
+import java.util.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.*;
+import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.ManifestElement;
 import org.osgi.framework.*;
 
@@ -81,6 +83,30 @@ public class BundleHelper {
 		return bundle;
 	}
 
+	public IProvisioningAgent getProvisioningAgent(URI location) {
+		//Is there already an agent for this location?
+		String filter = "(locationURI=" + String.valueOf(location) + ")"; //$NON-NLS-1$//$NON-NLS-2$
+		ServiceReference[] serviceReferences = null;
+		try {
+			serviceReferences = context.getServiceReferences(IProvisioningAgent.SERVICE_NAME, filter);
+			if (serviceReferences != null) {
+				return (IProvisioningAgent) context.getService(serviceReferences[0]);
+			}
+		} catch (InvalidSyntaxException e) {
+			// ignore
+		} finally {
+			if (serviceReferences != null)
+				context.ungetService(serviceReferences[0]);
+		}
+
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) acquireService(IProvisioningAgentProvider.SERVICE_NAME);
+		try {
+			return provider.createAgent(location);
+		} catch (ProvisionException e) {
+			return null;
+		}
+	}
+
 	public Object acquireService(String serviceName) {
 		ServiceReference reference = context.getServiceReference(serviceName);
 		if (reference == null)
@@ -101,6 +127,45 @@ public class BundleHelper {
 		}
 	}
 
+	public Filter getFilter(BundleDescription bundleDescription) {
+		if (bundleDescription == null)
+			return null;
+
+		String platformFilter = bundleDescription.getPlatformFilter();
+		String nativeFilter = null;
+
+		NativeCodeSpecification nativeCodeSpec = bundleDescription.getNativeCodeSpecification();
+		if (nativeCodeSpec != null) {
+			NativeCodeDescription[] possibleSuppliers = nativeCodeSpec.getPossibleSuppliers();
+			ArrayList supplierFilters = new ArrayList(possibleSuppliers.length);
+			for (int i = 0; i < possibleSuppliers.length; i++) {
+				if (possibleSuppliers[i].getFilter() != null)
+					supplierFilters.add(possibleSuppliers[i].getFilter());
+			}
+			if (supplierFilters.size() == 1)
+				nativeFilter = supplierFilters.get(0).toString();
+			else if (supplierFilters.size() > 1) {
+				StringBuffer buffer = new StringBuffer("(|"); //$NON-NLS-1$
+				for (Iterator iterator = supplierFilters.iterator(); iterator.hasNext();) {
+					Filter filter = (Filter) iterator.next();
+					buffer.append(filter.toString());
+				}
+				buffer.append(")"); //$NON-NLS-1$
+				nativeFilter = buffer.toString();
+			}
+		}
+
+		String filterString = null;
+		if (platformFilter != null && nativeFilter != null)
+			filterString = "(&" + platformFilter + nativeFilter + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+		else
+			filterString = platformFilter != null ? platformFilter : nativeFilter;
+
+		if (filterString != null)
+			return createFilter(filterString);
+		return null;
+	}
+
 	public void setLog(Object antLog) {
 		if (antLog == null) {
 			log = null;
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureGenerator.java
index 3ee335e..8a409f4 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureGenerator.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.*;
@@ -15,9 +17,9 @@ import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.ResolverError;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.build.Constants;
-import org.eclipse.pde.internal.build.site.BuildTimeFeature;
-import org.eclipse.pde.internal.build.site.PDEState;
+import org.eclipse.pde.internal.build.site.*;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
+import org.osgi.framework.Filter;
 import org.osgi.framework.Version;
 
 public class FeatureGenerator extends AbstractScriptGenerator {
@@ -81,6 +83,7 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 
 	private String featureId = null;
 	private String version = null;
+	private String nestedInclusions = null;
 	private String productFile = null;
 	private String[] pluginList = null;
 	private String[] fragmentList = null;
@@ -125,9 +128,20 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 		AbstractScriptGenerator.setStaticAntProperties(antProperties);
 		try {
 			initialize();
-			Set plugins = createSet(pluginList);
-			Set features = createSet(featureList);
-			Set fragments = createSet(fragmentList);
+
+			Set plugins = null;
+			Set features = null;
+			Set fragments = null;
+			if (shouldNestInclusions()) {
+				features = createSet(new String[] {generateNestedRequirements()});
+				fragments = new LinkedHashSet();
+				plugins = new LinkedHashSet();
+			} else {
+				plugins = createSet(pluginList);
+				features = createSet(featureList);
+				fragments = createSet(fragmentList);
+			}
+
 			if (product != null) {
 				List entries = product.getProductEntries();
 				for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
@@ -154,6 +168,69 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 		}
 	}
 
+	private boolean shouldNestInclusions() {
+		if (nestedInclusions == null || nestedInclusions.equalsIgnoreCase(FALSE))
+			return false;
+
+		if (product != null) {
+			//will need to generate a .eclipseproduct file
+			if (buildProperties == null)
+				buildProperties = new Properties();
+			buildProperties.put(IBuildPropertiesConstants.PROPERTY_GENERATE_ECLIPSEPRODUCT, TRUE);
+		}
+
+		//make sure there's actually something to nest
+		if ((pluginList == null || pluginList.length == 0) && (fragmentList == null || fragmentList.length == 0) && (featureList == null || featureList.length == 0) && (buildProperties == null || buildProperties.size() == 0))
+			return false;
+
+		// use the product-id to generate a name if nestedRequirements==true
+		if (nestedInclusions.equalsIgnoreCase(TRUE))
+			return product != null;
+
+		//else nestedRequirements specifies the name to use for the nested feature
+		return true;
+	}
+
+	private String generateNestedRequirements() throws CoreException {
+		String nestedId = null;
+		String nestedVersion = null;
+		String productKey = null;
+		if (product != null) {
+			nestedId = product.getProductId() + ".root.feature"; //$NON-NLS-1$
+			nestedVersion = product.getVersion();
+			productKey = PRODUCT_PREFIX + product.getProductId();
+		} else {
+			nestedId = nestedInclusions;
+			nestedVersion = version != null ? version : "1.0.0.qualifier"; //$NON-NLS-1$
+		}
+
+		String extraRequires = null;
+		if (buildProperties != null && productKey != null)
+			extraRequires = (String) buildProperties.remove(productKey);
+
+		FeatureGenerator generator = new FeatureGenerator();
+		generator.setVerify(verify);
+		generator.setPluginList(pluginList);
+		generator.setFeatureList(featureList);
+		generator.setBuildProperties(buildProperties);
+		generator.setIncludeLaunchers(false);
+		generator.setBuildSiteFactory(siteFactory);
+		generator.setFeatureId(nestedId);
+		generator.setVersion(nestedVersion);
+		generator.generate();
+
+		if (productKey != null) {
+			buildProperties = new Properties();
+			extraRequires = (extraRequires == null) ? "" : extraRequires + ","; //$NON-NLS-1$ //$NON-NLS-2$
+			extraRequires += "feature@" + nestedId + ";version=" + nestedVersion; //$NON-NLS-1$ //$NON-NLS-2$
+			buildProperties.put(productKey, extraRequires);
+		} else {
+			buildProperties = null;
+		}
+
+		return nestedId + ";version=" + nestedVersion; //$NON-NLS-1$
+	}
+
 	public void setProductFile(String productFile) {
 		this.productFile = productFile;
 	}
@@ -190,29 +267,7 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 			xml.delete();
 		}
 
-		if (productFile != null && !productFile.startsWith("${") && productFile.length() > 0) { //$NON-NLS-1$
-			String productPath = findFile(productFile, false);
-			File f = null;
-			if (productPath != null) {
-				f = new File(productPath);
-			} else {
-				// couldn't find productFile, try it as a path directly
-				f = new File(productFile);
-				if (!f.exists() || !f.isFile()) {
-					// doesn't exist, try it as a path relative to the working directory
-					f = new File(getWorkingDirectory(), productFile);
-					if (!f.exists() || !f.isFile()) {
-						f = new File(getWorkingDirectory() + "/" + DEFAULT_PLUGIN_LOCATION, productFile); //$NON-NLS-1$
-					}
-				}
-			}
-			if (f.exists() && f.isFile()) {
-				product = new ProductFile(f.getAbsolutePath(), null);
-			} else {
-				IStatus error = new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PRODUCT_FILE, NLS.bind(Messages.exception_missingElement, productFile), null);
-				throw new CoreException(error);
-			}
-		}
+		product = loadProduct(productFile);
 	}
 
 	/*
@@ -235,7 +290,7 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 			try {
 				executableFeature = getSite(false).findFeature(FEATURE_EQUINOX_EXECUTABLE, null, false);
 			} catch (CoreException e) {
-				// ignore
+				BundleHelper.getDefault().getLog().log(e.getStatus());
 			}
 			if (executableFeature != null) {
 				/* the executable feature includes the launcher and fragments already */
@@ -330,8 +385,8 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 						BundleDescription bundle = state.getResolvedBundle(name, bundleVersion);
 						if (bundle != null) {
 							//Bundle resolved, write it out if it matches the current config
-							String filterSpec = bundle.getPlatformFilter();
-							if (filterSpec == null || helper.createFilter(filterSpec).match(environment)) {
+							Filter filter = helper.getFilter(bundle);
+							if (filter == null || filter.match(environment)) {
 								writeBundle = true;
 								guessedUnpack = Utils.guessUnpack(bundle, (String[]) state.getExtraData().get(new Long(bundle.getBundleId())));
 								if (currentConfig.equals(Config.genericConfig())) {
@@ -340,19 +395,20 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 							}
 						} else {
 							//Bundle did not resolve, only ok if it was because of the platform filter
-							BundleDescription[] bundles = state.getState().getBundles(name);
-							boolean error = true;
-							if (bundles != null && bundles.length > 0) {
-								ResolverError[] errors = state.getState().getResolverErrors(bundles[0]);
-								for (int i = 0; i < errors.length; i++) {
-									if ((errors[i].getType() & ResolverError.PLATFORM_FILTER) != 0) {
-										//didn't match config, this is ok
-										error = false;
-										break;
-									}
-								}
+							if (bundleVersion != null)
+								bundle = state.getBundle(name, bundleVersion, false);
+							else {
+								//There are no resolved bundles with this name, if there is more than one unresolved just use the first
+								BundleDescription[] bundles = state.getState().getBundles(name);
+								bundle = (bundles != null && bundles.length > 0) ? bundles[0] : null;
 							}
-							if (error) {
+							if (bundle != null) {
+								ResolverError[] errors = state.getState().getResolverErrors(bundle);
+								//ok if we didn't match the config
+								if (!BuildTimeSite.isConfigError(bundle, errors, configs)) {
+									BuildTimeSite.missingPlugin(bundle, errors, null, true); //throws CoreException
+								}
+							} else {
 								//throw error
 								String message = NLS.bind(Messages.exception_missingPlugin, bundleVersion != null ? name + "_" + bundleVersion : name); //$NON-NLS-1$
 								throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PLUGIN_MISSING, message, null));
@@ -474,4 +530,8 @@ public class FeatureGenerator extends AbstractScriptGenerator {
 	public void setImmutableAntProperties(Properties properties) {
 		antProperties = properties;
 	}
+
+	public void setNestedInclusions(String nested) {
+		this.nestedInclusions = nested;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureWriter.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureWriter.java
index ee91ba5..090572e 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureWriter.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FeatureWriter.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.IOException;
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FetchScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FetchScriptGenerator.java
index 5eab5bb..adef92f 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FetchScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/FetchScriptGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build;
@@ -18,9 +18,9 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.build.Constants;
 import org.eclipse.pde.build.IFetchFactory;
 import org.eclipse.pde.internal.build.ant.AntScript;
+import org.eclipse.pde.internal.build.ant.IScriptRunner;
 import org.eclipse.pde.internal.build.fetch.CVSFetchTaskFactory;
-import org.eclipse.pde.internal.build.site.BuildTimeFeature;
-import org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory;
+import org.eclipse.pde.internal.build.site.*;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
 import org.osgi.framework.Version;
 
@@ -29,6 +29,7 @@ import org.osgi.framework.Version;
  * to retrieve plug-ins and features from a repository.
  */
 public class FetchScriptGenerator extends AbstractScriptGenerator {
+	private static final Object SAVE_LOCK = new Object();
 	private static final String FETCH_TASK_FACTORY = "internal.factory"; //$NON-NLS-1$
 	private static final String MATCHED_VERSION = "internal.matchedVersion"; //$NON-NLS-1$
 
@@ -62,6 +63,7 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 	// A property table containing the association between the plugins and the version from the map  
 	protected Properties repositoryPluginTags = new Properties();
 	protected Properties repositoryFeatureTags = new Properties();
+	protected Properties sourceReferences = new Properties();
 
 	//The registry of the task factories
 	private FetchTaskFactoriesRegistry fetchTaskFactories;
@@ -74,6 +76,7 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 	public static final String FETCH_FILE_PREFIX = "fetch_"; //$NON-NLS-1$
 
 	private String scriptName;
+	private IScriptRunner scriptRunner;
 
 	public FetchScriptGenerator() {
 		super();
@@ -128,33 +131,36 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 	}
 
 	private void saveRepositoryTags(Properties properties, String fileName) throws CoreException {
-		try {
-			InputStream input = new BufferedInputStream(new FileInputStream(workingDirectory + '/' + fileName));
+		synchronized (SAVE_LOCK) {
 			try {
-				properties.load(input);
-			} finally {
-				input.close();
+				InputStream input = new BufferedInputStream(new FileInputStream(workingDirectory + '/' + fileName));
+				try {
+					properties.load(input);
+				} finally {
+					input.close();
+				}
+			} catch (IOException e) {
+				//ignore the exception, the same may not exist
 			}
-		} catch (IOException e) {
-			//ignore the exception, the same may not exist
-		}
 
-		try {
-			OutputStream os = new BufferedOutputStream(new FileOutputStream(workingDirectory + '/' + fileName));
 			try {
-				properties.store(os, null);
-			} finally {
-				os.close();
+				OutputStream os = new BufferedOutputStream(new FileOutputStream(workingDirectory + '/' + fileName));
+				try {
+					properties.store(os, null);
+				} finally {
+					os.close();
+				}
+			} catch (IOException e) {
+				String message = NLS.bind(Messages.exception_writingFile, workingDirectory + '/' + fileName);
+				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, null));
 			}
-		} catch (IOException e) {
-			String message = NLS.bind(Messages.exception_writingFile, workingDirectory + '/' + fileName);
-			throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, null));
 		}
 	}
 
 	private void saveRepositoryTags() throws CoreException {
 		saveRepositoryTags(repositoryPluginTags, DEFAULT_PLUGIN_REPOTAG_FILENAME_DESCRIPTOR);
 		saveRepositoryTags(repositoryFeatureTags, DEFAULT_FEATURE_REPOTAG_FILENAME_DESCRIPTOR);
+		saveRepositoryTags(sourceReferences, DEFAULT_SOURCE_REFERENCES_FILENAME_DESCRIPTOR);
 	}
 
 	/**
@@ -177,6 +183,8 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 			generator.setDirectoryFile(directoryFile);
 			generator.setBuildSiteFactory(siteFactory);
 			generator.repositoryPluginTags = repositoryPluginTags;
+			generator.setSourceReferences(sourceReferences);
+			generator.setScriptRunner(scriptRunner);
 			generator.generate();
 		}
 	}
@@ -360,15 +368,27 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 			factory.generateRetrieveFilesCall(mapFileEntry, computeFinalLocation(type, elementToFetch, (Version) mapFileEntry.get(MATCHED_VERSION)), files, script);
 		}
 
+		//key to use for version and source references properties files
+		String key = null;
+		if (version.getQualifier().endsWith(PROPERTY_QUALIFIER))
+			key = QualifierReplacer.getQualifierKey(elementToFetch, version.toString());
+		else
+			key = elementToFetch + ',' + new Version(version.getMajor(), version.getMinor(), version.getMicro()).toString();
 		//Keep track of the element that are being fetched. To simplify the lookup in the qualifier replacer, the versioned that was initially looked up is used as key in the file
 		Properties tags = null;
 		if (type.equals(IFetchFactory.ELEMENT_TYPE_FEATURE))
 			tags = repositoryFeatureTags;
 		else
 			tags = repositoryPluginTags;
-		if (mapFileEntry.get(IFetchFactory.KEY_ELEMENT_TAG) != null)
-			tags.put(elementToFetch + ',' + new Version(version.getMajor(), version.getMinor(), version.getMicro()), mapFileEntry.get(IFetchFactory.KEY_ELEMENT_TAG));
+		if (mapFileEntry.get(IFetchFactory.KEY_ELEMENT_TAG) != null) {
+			tags.put(key, mapFileEntry.get(IFetchFactory.KEY_ELEMENT_TAG));
+		}
 
+		if (!type.equals(IFetchFactory.ELEMENT_TYPE_FEATURE)) {
+			String sourceURLs = (String) mapFileEntry.get(Constants.KEY_SOURCE_REFERENCES);
+			if (sourceURLs != null)
+				sourceReferences.put(key, sourceURLs);
+		}
 		return true;
 	}
 
@@ -474,20 +494,23 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 		// Run the Ant script to go to and retrieve the feature.xml. Call the Update
 		// code to construct the feature object to return.
 		try {
-			AntRunner runner = new AntRunner();
-			runner.setBuildFileLocation(target.getAbsolutePath());
 			Map retrieveProp = new HashMap();
 			retrieveProp.put("fetch.failonerror", "true"); //$NON-NLS-1$//$NON-NLS-2$
-			runner.addUserProperties(retrieveProp);
-			//This has to be hardcoded here because of the way AntRunner stipulates that 
-			//loggers are passed in. Otherwise this would be a Foo.class.getName()
-			runner.addBuildLogger("org.eclipse.pde.internal.build.tasks.SimpleBuildLogger"); //$NON-NLS-1$
-
-			runner.run();
+			if (scriptRunner != null) {
+				scriptRunner.runScript(target, TARGET_MAIN, retrieveProp);
+			} else {
+				AntRunner runner = new AntRunner();
+				runner.setBuildFileLocation(target.getAbsolutePath());
+				runner.addUserProperties(retrieveProp);
+				//This has to be hardcoded here because of the way AntRunner stipulates that 
+				//loggers are passed in. Otherwise this would be a Foo.class.getName()
+				runner.addBuildLogger("org.eclipse.pde.internal.build.tasks.SimpleBuildLogger"); //$NON-NLS-1$
+
+				runner.run();
+			}
 		} catch (Exception e) {
 			throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_FEATURE_MISSING, NLS.bind(Messages.error_retrieveFailed, elementName), e));
 		}
-
 		try {
 			BuildTimeFeatureFactory factory = BuildTimeFeatureFactory.getInstance();
 			File featureFolder = new File(destination.toString());
@@ -605,7 +628,7 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 			MapFileEntry aCandidate = (MapFileEntry) entry.getKey();
 			//Find the exact match
 			if (aCandidate.v.equals(version))
-				return new String[] {(String) entry.getValue(), version.toString()};
+				return new Object[] {(String) entry.getValue(), version};
 
 			if (bestMatch != null) {
 				if (((MapFileEntry) bestMatch.getKey()).v.compareTo(((MapFileEntry) entry.getKey()).v) < 1) {
@@ -635,7 +658,7 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 		}
 	}
 
-	public class MapFileEntry implements Comparable {
+	public static class MapFileEntry implements Comparable {
 		String id;
 		Version v;
 
@@ -725,6 +748,10 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 		fetchTags = value;
 	}
 
+	public void setSourceReferences(Properties sourceReferences) {
+		this.sourceReferences = sourceReferences;
+	}
+
 	/**
 	 * Sets the CVS tag to use when fetching.  This overrides whatever is 
 	 * in the directory database.  This is typically used when doing a nightly
@@ -761,6 +788,10 @@ public class FetchScriptGenerator extends AbstractScriptGenerator {
 		this.recursiveGeneration = recursiveGeneration;
 	}
 
+	public void setScriptRunner(IScriptRunner runner) {
+		this.scriptRunner = runner;
+	}
+
 	private void setDirectory(SortedMap dir) {
 		directory = dir;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java
index 463b406..c111e14 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IBuildPropertiesConstants.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -34,6 +34,7 @@ public interface IBuildPropertiesConstants {
 	public static final String PROPERTY_MANIFEST_PREFIX = "manifest."; //$NON-NLS-1$
 
 	public static final String PROPERTY_CONVERTED_MANIFEST = "convertedManifest"; //$NON-NLS-1$
+	public static final String PROPERTY_SOURCE_REFERENCE = "sourceReference"; //$NON-NLS-1$
 	public static final String PROPERTY_QUALIFIER = "qualifier"; //$NON-NLS-1$
 	public static final String PROPERTY_VERSION_REPLACEMENT = "versionReplacement"; //$NON-NLS-1$
 	public static final String PROPERTY_REQUIRED_BUNDLE_IDS = "requiredBundleIds"; //$NON-NLS-1$
@@ -44,6 +45,7 @@ public interface IBuildPropertiesConstants {
 	public final static String GENERATION_SOURCE_FEATURE_PREFIX = GENERATION_SOURCE_PREFIX + "feature@"; //$NON-NLS-1$
 	public final static String GENERATION_SOURCE_PLUGIN_PREFIX = GENERATION_SOURCE_PREFIX + "plugin@"; //$NON-NLS-1$
 	public final static String PROPERTY_SOURCE_FEATURE_NAME = "sourceFeature.name"; //$NON-NLS-1$
+	public final static String PRODUCT_PREFIX = "product@"; //$NON-NLS-1$
 
 	public static final String PROPERTY_CUSTOM = "custom"; //$NON-NLS-1$
 	public static final String PROPERTY_GENERATE_SOURCE_BUNDLE = "generateSourceBundle"; //$NON-NLS-1$
@@ -59,6 +61,8 @@ public interface IBuildPropertiesConstants {
 	public static final String PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX = "javacDefaultEncoding."; //$NON-NLS-1$
 	public static final String PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX = "javacCustomEncodings."; //$NON-NLS-1$
 	public static final String PROPERTY_JAVAC_WARNINGS_PREFIX = "javacWarnings."; //$NON-NLS-1$
+	public static final String PROPERTY_JAVAC_ERRORS_PREFIX = "javacErrors."; //$NON-NLS-1$
+	public static final String PROPERTY_PROJECT_SETTINGS = "javacProjectSettings"; //$NON-NLS-1$
 
 	public static final String DEFAULT_MATCH_ALL = "*"; //$NON-NLS-1$
 	public static final String DEFAULT_FINAL_SHAPE = "*"; //$NON-NLS-1$
@@ -92,6 +96,7 @@ public interface IBuildPropertiesConstants {
 	public static final String PROPERTY_P2_PUBLISH_ARTIFACTS = "p2.publish.artifacts"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_CATEGORY_SITE = "p2.category.site"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_CATEGORY_DEFINITION = "p2.category.definition"; //$NON-NLS-1$
+	public static final String PROPERTY_P2_CATEGORY_VERSION = "p2.category.version"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_CATEGORY_PREFIX = "p2.category.prefix"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_ROOT_NAME = "p2.root.name"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_ROOT_VERSION = "p2.root.version"; //$NON-NLS-1$
@@ -106,6 +111,11 @@ public interface IBuildPropertiesConstants {
 	public static final String PROPERTY_SKIP_MIRRORING = "skipMirroring"; //$NON-NLS-1$
 	public static final String PROPERTY_SKIP_DIRECTOR = "skipDirector"; //$NON-NLS-1$
 
+	public static final String PROPERTY_SOURCE_FILE_EXTENSIONS = "sourceFileExtensions"; //$NON-NLS-1$
+	public static final String PROPERTY_COMPILER_ADAPTER = "compilerAdapter"; //$NON-NLS-1$
+	public static final String PROPERTY_ADAPTER_USELOG = "compilerAdapter.useLog"; //$NON-NLS-1$
+	public static final String PROPERTY_ADAPTER_USEARGFILE = "compilerAdapter.useArgFile"; //$NON-NLS-1$
+
 	//Internal usage only
 	public static final String PROPERTY_P2_BUILD_REPO = "p2.build.repo"; //$NON-NLS-1$
 	public static final String PROPERTY_P2_GENERATION_MODE = "p2.generation.mode"; //$NON-NLS-1$
@@ -123,6 +133,7 @@ public interface IBuildPropertiesConstants {
 	public static final String PROPERTY_COMPILE_PROBLEM_MARKER = "compilation.problem.marker"; //$NON-NLS-1$
 	public static final String PROPERTY_COMPILE_PROBLEM_MARKER_EXISTS = "compilation.problem.marker.exists"; //$NON-NLS-1$
 	public static final String PROPERTY_COMPILATION_ERROR = "compilation.error.occured"; //$NON-NLS-1$
+	public static final String PROPERTY_PREREQ_COMPILE_LOG = "compilation.prereq.log"; //$NON-NLS-1$
 
 	public static final String PROPERTY_SUPPRESS_RESOLUTION_ERRORS = "suppressResolutionErrors"; //$NON-NLS-1$
 	public static final String PROPERTY_ANT_VERSION = "ant.version"; //$NON-NLS-1$
@@ -131,4 +142,6 @@ public interface IBuildPropertiesConstants {
 
 	public static final String PROPERTY_PACKAGER_MODE = "packagerMode"; //$NON-NLS-1$
 	public static final String PROPERTY_PACKAGER_AS_NORMALIZER = "packagerAsNormalizer"; //$NON-NLS-1$
+
+	public static final String PROPERTY_GENERATE_ECLIPSEPRODUCT = "generateEclipseProduct"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java
index f6e7b05..17a6ed9 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IPDEBuildConstants.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -38,6 +38,10 @@ public interface IPDEBuildConstants {
 	public final static String MANIFEST_FOLDER = "META-INF"; //$NON-NLS-1$
 	public final static String MANIFEST = "MANIFEST.MF"; //$NON-NLS-1$
 
+	public static final String FILE_SCHEME = "file"; //$NON-NLS-1$
+	public static final String PROFILE = "profile"; //$NON-NLS-1$
+	public static final String PROFILE_GZ = "profile.gz"; //$NON-NLS-1$
+
 	// default values
 	public final static String PROPERTY_GENERIC_TARGETS = "genericTargets"; //$NON-NLS-1$
 	public final static String DEFAULT_BUILD_SCRIPT_FILENAME = "build.xml"; //$NON-NLS-1$
@@ -58,6 +62,7 @@ public interface IPDEBuildConstants {
 	public final static String DEFAULT_UNZIPPER_FILENAME_DESCRIPTOR = "unzipper.xml"; //$NON-NLS-1$
 	public final static String DEFAULT_PLUGIN_REPOTAG_FILENAME_DESCRIPTOR = "pluginVersions.properties"; //$NON-NLS-1$
 	public final static String DEFAULT_FEATURE_REPOTAG_FILENAME_DESCRIPTOR = "featureVersions.properties"; //$NON-NLS-1$
+	public final static String DEFAULT_SOURCE_REFERENCES_FILENAME_DESCRIPTOR = "sourceReferences.properties"; //$NON-NLS-1$
 	public final static String DEFAULT_PLUGINS_POSTPROCESSINGSTEPS_FILENAME_DESCRIPTOR = "plugins.postProcessingSteps.properties"; //$NON-NLS-1$
 	public final static String DEFAULT_FEATURES_POSTPROCESSINGSTEPS_FILENAME_DESCRIPTOR = "features.postProcessingSteps.properties"; //$NON-NLS-1$
 	public final static String DEFAULT_CUSTOM_BUILD_CALLBACKS_FILE = "customBuildCallbacks.xml"; //$NON-NLS-1$
@@ -69,6 +74,8 @@ public interface IPDEBuildConstants {
 	public final static String DEFAULT_FEATURE_VERSION_FILENAME_PREFIX = "finalFeaturesVersions"; //$NON-NLS-1$
 	public final static String PROPERTIES_FILE_SUFFIX = ".properties"; //$NON-NLS-1$
 
+	public final static String[] DEFAULT_SOURCE_FILE_EXTENSIONS = new String[] {"*.java"}; //$NON-NLS-1$
+
 	// Tag replaced in files
 	public final static String REPLACED_PLUGIN_ID = "PLUGIN_ID"; //$NON-NLS-1$
 	public final static String REPLACED_PLUGIN_VERSION = "PLUGIN_VERSION"; //$NON-NLS-1$
@@ -120,6 +127,8 @@ public interface IPDEBuildConstants {
 	public final static String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle"; //$NON-NLS-1$
 	public final static String ECLIPSE_PLATFORM_FILTER = "Eclipse-PlatformFilter"; //$NON-NLS-1$
 	public final static String ECLIPSE_BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
+	public final static String ECLIPSE_SOURCE_REF = "Eclipse-SourceReferences"; //$NON-NLS-1$
+	public final static String PDE_SOURCE_REF = "${PDE_SOURCE_REF}"; //$NON-NLS-1$
 
 	//Some Bundle IDs we care about
 	public final static String BUNDLE_OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
@@ -140,4 +149,9 @@ public interface IPDEBuildConstants {
 
 	//container feature used in building .product files
 	public final static String CONTAINER_FEATURE = "org.eclipse.pde.build.container.feature"; //$NON-NLS-1$
+	public final static String UI_CONTAINER_FEATURE = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
+
+	public final static String PDE_CORE_PREFS = ".settings/org.eclipse.pde.core.prefs"; //$NON-NLS-1$
+	public final static String JDT_CORE_PREFS = ".settings/org.eclipse.jdt.core.prefs"; //$NON-NLS-1$
+	public final static String BUNDLE_ROOT_PATH = "BUNDLE_ROOT_PATH"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IXMLConstants.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IXMLConstants.java
index 44f1b5b..27af8e1 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IXMLConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/IXMLConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -15,6 +15,7 @@ public interface IXMLConstants {
 
 	// general
 	public static final String PROPERTY_ASSIGNMENT_PREFIX = "${"; //$NON-NLS-1$
+	public static final String MACRO_ASSIGNMENT_PREFIX = "@{"; //$NON-NLS-1$
 	public static final String PROPERTY_ASSIGNMENT_SUFFIX = "}"; //$NON-NLS-1$
 	public static final String JDT_COMPILER_ADAPTER = "org.eclipse.jdt.core.JDTCompilerAdapter"; //$NON-NLS-1$
 
@@ -109,6 +110,7 @@ public interface IXMLConstants {
 	public static final String PROPERTY_PRODUCT = "product"; //$NON-NLS-1$
 	public static final String PROPERTY_BASE_LOCATION = "baseLocation"; //$NON-NLS-1$
 	public static final String PROPERTY_LOG_EXTENSION = "logExtension"; //$NON-NLS-1$
+	public static final String PROPERTY_LOG_EXTENSION_PARAM = "logExtension.param"; //$NON-NLS-1$
 
 	public static final String PROPERTY_NL = "nl"; //$NON-NLS-1$
 	public static final String PROPERTY_BASE_NL = "basenl"; //$NON-NLS-1$ 
@@ -168,6 +170,7 @@ public interface IXMLConstants {
 	public static final String PROPERTY_GENERATE_API_DESCRIPTION = "generateAPIDescription"; //$NON-NLS-1$
 	public static final String PROPERTY_BINARY_FOLDERS = "binary.folders"; //$NON-NLS-1$
 	public static final String PROPERTY_LAUNCHER_JAR = "equinoxLauncherJar"; //$NON-NLS-1$
+	public static final String PROPERTY_EXTRA_MANIFESTS = "extraManifests"; //$NON-NLS-1$
 
 	//Jar processor properties
 	public static final String PROPERTY_SIGN_ALIAS = "sign.alias"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Messages.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Messages.java
index 14dcdb5..99513f5 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Messages.java
@@ -1,12 +1,13 @@
-/**********************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others. All rights reserved.   This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * IBM - Initial API and implementation
- **********************************************************************/
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import org.eclipse.osgi.util.NLS;
@@ -25,6 +26,7 @@ public class Messages extends NLS {
 	public static String error_pluginCycle;
 	public static String error_missingDirectoryEntry;
 	public static String error_incorrectDirectoryEntry;
+	public static String error_directoryEntryRequiresIdAndRepo;
 	public static String error_missingElement;
 	public static String error_missingFeatureId;
 	public static String error_cannotFetchNorFindFeature;
@@ -90,10 +92,14 @@ public class Messages extends NLS {
 	public static String unsatisfied_required;
 	public static String unsatisfied_optionalBundle;
 	public static String unsatisfied_host;
+	public static String unsatisfied_nativeSpec;
 
 	public static String feature_parse_invalidIdOrVersion;
 	public static String feature_parse_emptyRequires;
 
+	public static String fetching_p2Repo;
+	public static String includedFromFeature;
+
 	static {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java
index 9185b4e..b205aa4 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2ConfigScriptGenerator.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 
 package org.eclipse.pde.internal.build;
 
@@ -203,7 +205,6 @@ public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator {
 			script.println("/>"); //$NON-NLS-1$
 			generateCopyConfigs(product, productDir);
 			generateProductReplaceTask(product, newProduct);
-			productPath = newProduct;
 
 			script.printTab();
 			script.print("<p2.publish.product"); //$NON-NLS-1$
@@ -212,11 +213,20 @@ public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator {
 			script.printAttribute("productFile", newProduct, true); //$NON-NLS-1$
 			script.println(">"); //$NON-NLS-1$
 
-			URI[] context = getContextMetadata();
-			for (int i = 0; context != null && i < context.length; i++) {
+			URI[] metadata = getContextMetadata();
+			URI[] artifacts = getContextArtifacts();
+			for (int i = 0; metadata != null && i < metadata.length; i++) {
 				script.printTab();
 				script.print("\t<contextRepository"); //$NON-NLS-1$
-				script.printAttribute("location", URIUtil.toUnencodedString(context[i]), true); //$NON-NLS-1$
+				script.printAttribute("location", URIUtil.toUnencodedString(metadata[i]), true); //$NON-NLS-1$
+				script.printAttribute("metadata", TRUE, true); //$NON-NLS-1$
+				script.println("/>"); //$NON-NLS-1$
+			}
+			for (int i = 0; artifacts != null && i < artifacts.length; i++) {
+				script.printTab();
+				script.print("\t<contextRepository"); //$NON-NLS-1$
+				script.printAttribute("location", URIUtil.toUnencodedString(artifacts[i]), true); //$NON-NLS-1$
+				script.printAttribute("artifact", TRUE, true); //$NON-NLS-1$
 				script.println("/>"); //$NON-NLS-1$
 			}
 
@@ -303,8 +313,18 @@ public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator {
 			script.printTab();
 			script.print("\t<source"); //$NON-NLS-1$
 			script.printAttribute("location", URIUtil.toUnencodedString(context[i]), true); //$NON-NLS-1$
+			script.printAttribute("optional", TRUE, true); //$NON-NLS-1$
+			script.printAttribute("kind", "metadata", true); //$NON-NLS-1$ //$NON-NLS-2$
+			script.println("/>"); //$NON-NLS-1$
+		}
+		URI[] artifacts = getContextArtifacts();
+		for (int i = 0; artifacts != null && i < artifacts.length; i++) {
+			script.printTab();
+			script.print("\t<source"); //$NON-NLS-1$
+			script.printAttribute("location", URIUtil.toUnencodedString(artifacts[i]), true); //$NON-NLS-1$
+			script.printAttribute("optional", TRUE, true); //$NON-NLS-1$
+			script.printAttribute("kind", "artifact", true); //$NON-NLS-1$ //$NON-NLS-2$
 			script.println("/>"); //$NON-NLS-1$
-
 		}
 
 		script.printTab();
@@ -350,6 +370,7 @@ public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator {
 		generator.setRoot(root);
 		generator.setWorkingDirectory(getWorkingDirectory());
 		generator.setAssemblyInfo(assemblyInformation);
+		generator.setFeatureId(featureId);
 		try {
 			return generator.generateP2Info();
 		} catch (CoreException e) {
@@ -427,7 +448,8 @@ public class P2ConfigScriptGenerator extends AssembleConfigScriptGenerator {
 		}
 
 		String repo = Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO);
-		script.printP2PublishFeaturesAndBundles(repo, repo, (FileSet[]) binaryBundles.toArray(new FileSet[binaryBundles.size()]), (FileSet[]) binaryFeatures.toArray(new FileSet[binaryFeatures.size()]), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_PREFIX), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_DEFINITION), contextMetadata);
+		URI[] context = getContextMetadata();
+		script.printP2PublishFeaturesAndBundles(repo, repo, (FileSet[]) binaryBundles.toArray(new FileSet[binaryBundles.size()]), (FileSet[]) binaryFeatures.toArray(new FileSet[binaryFeatures.size()]), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_PREFIX), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_DEFINITION), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_VERSION), context);
 
 		script.printTargetEnd();
 		script.println();
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Policy.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Policy.java
deleted file mode 100644
index e45eae0..0000000
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Policy.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.build;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-
-/**
- * Utility class used to help with NLS'ing messages, creating progress monitors, etc.
- */
-public class Policy {
-
-	/**
-	 * Return a progress monitor for the given monitor. Ensures that the resulting
-	 * monitor is not <code>null</code>.
-	 * 
-	 * @param monitor the monitor to wrap, or <code>null</code>
-	 * @return IProgressMonitor
-	 */
-	public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
-		if (monitor == null)
-			return new NullProgressMonitor();
-		return monitor;
-	}
-
-	/**
-	 * Create a sub progress monitor with the given units of work, for the given monitor.
-	 * 
-	 * @param monitor the parent monitor, or <code>null</code>
-	 * @param ticks the number of units of work
-	 * @return IProgressMonitor
-	 */
-	public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
-		if (monitor == null)
-			return new NullProgressMonitor();
-		if (monitor instanceof NullProgressMonitor)
-			return monitor;
-		return new SubProgressMonitor(monitor, ticks);
-	}
-
-	/**
-	 * Create a sub progress monitor with the given number of units of work and in the 
-	 * given style, for the specified parent monitor.
-	 * 
-	 * @param monitor the parent monitor, or <code>null</code>
-	 * @param ticks the number of units of work
-	 * @param style the style of the sub progress monitor
-	 * @return IProgressMonitor
-	 */
-	public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks, int style) {
-		if (monitor == null)
-			return new NullProgressMonitor();
-		if (monitor instanceof NullProgressMonitor)
-			return monitor;
-		return new SubProgressMonitor(monitor, ticks, style);
-	}
-
-	/**
-	 * Print a debug message to the console. If the given boolean is
-	 * <code>true</code> then pre-pend the message with the current date.
-	 */
-	public static void debug(boolean includeDate, String message) {
-		if (includeDate)
-			message = new Date(System.currentTimeMillis()).toString() + " - " + message; //$NON-NLS-1$
-		System.out.println(message);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java
index c27fd77..c9a34da 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,7 +15,7 @@ import java.io.*;
 import java.util.*;
 import javax.xml.parsers.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
 import org.xml.sax.*;
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
index 10d6495..e415127 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
@@ -1,21 +1,25 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build;
 
 import java.io.*;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.VersionRange;
 import org.eclipse.pde.internal.build.site.*;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
+import org.osgi.framework.Filter;
 import org.osgi.framework.Version;
 
 public class ProductGenerator extends AbstractScriptGenerator {
@@ -39,6 +43,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
 	private static final byte CONFIG_INCLUDES_DS = 16;
 
 	private String product = null;
+	private String featureId = null;
 	private ProductFile productFile = null;
 	private String root = null;
 	private Properties buildProperties;
@@ -95,6 +100,35 @@ public class ProductGenerator extends AbstractScriptGenerator {
 
 	}
 
+	public void generateEclipseProduct() throws CoreException {
+		initialize();
+
+		if (productFile == null)
+			return;
+
+		String location = DEFAULT_PRODUCT_ROOT_FILES_DIR + "/ANY.ANY.ANY"; //$NON-NLS-1$
+		String rootLocation = root + location;
+		File rootDir = new File(rootLocation);
+		if ((!rootDir.exists() && !rootDir.mkdirs()) || rootDir.isFile())
+			return; //we will fail trying to create the files,
+
+		if (buildProperties == null)
+			buildProperties = new Properties();
+
+		String fileList = buildProperties.getProperty(ROOT, ""); //$NON-NLS-1$
+		fileList += (fileList.length() > 0) ? ',' + location : location;
+		buildProperties.put(ROOT, fileList);
+
+		//need to actually write the property changes out to disk
+		try {
+			Utils.writeProperties(buildProperties, new File(root, IPDEBuildConstants.PROPERTIES_FILE), ""); //$NON-NLS-1$
+		} catch (IOException e) {
+			return;
+		}
+
+		createEclipseProductFile(rootLocation);
+	}
+
 	public boolean generateP2Info() throws CoreException {
 		initialize();
 
@@ -149,7 +183,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
 		defaults[2] = new BundleInfo(BUNDLE_OSGI, null, null, -1, true);
 		defaults[3] = new BundleInfo(BUNDLE_UPDATE_CONFIGURATOR, null, null, 4, true);
 		defaults[4] = new BundleInfo(BUNDLE_CORE_RUNTIME, null, null, 4, true);
-		defaults[5] = new BundleInfo(BUNDLE_DS, null, null, 1, true);
+		defaults[5] = new BundleInfo(BUNDLE_DS, null, null, 2, true);
 		return defaults;
 	}
 
@@ -191,6 +225,12 @@ public class ProductGenerator extends AbstractScriptGenerator {
 			}
 		}
 
+		try {
+			index = generateExtraRequirements(buffer, index);
+		} catch (CoreException e) {
+			//ignore
+		}
+
 		BundleDescription launcher = assembly.getPlugin(BUNDLE_EQUINOX_LAUNCHER, null);
 		if (launcher != null && launchers) {
 			VersionRange launcherRange = new VersionRange(launcher.getVersion(), true, launcher.getVersion(), true);
@@ -257,6 +297,36 @@ public class ProductGenerator extends AbstractScriptGenerator {
 		}
 	}
 
+	private int generateExtraRequirements(StringBuffer buffer, int index) throws CoreException {
+		BuildTimeFeature rootFeature = getSite(false).findFeature(featureId, null, false);
+		if (rootFeature == null)
+			return index;
+
+		Properties properties = AbstractScriptGenerator.readProperties(new Path(rootFeature.getRootLocation()).toOSString(), PROPERTIES_FILE, IStatus.OK);
+		String[] extraEntries = Utils.getArrayFromString(properties.getProperty(PRODUCT_PREFIX + productFile.getId()));
+		for (int i = 0; i < extraEntries.length; i++) {
+			Map entry = Utils.parseExtraBundlesString(extraEntries[i], true);
+			String id = (String) entry.get(Utils.EXTRA_ID);
+			Version version = (Version) entry.get(Utils.EXTRA_VERSION);
+
+			boolean feature = extraEntries[i].startsWith("feature@");//$NON-NLS-1$
+			VersionRange range = null;
+			String versionString = version.toString();
+			if (feature) {
+				BuildTimeFeature requiredFeature = getSite(false).findFeature(id, version.toString(), false);
+				if (requiredFeature != null)
+					versionString = requiredFeature.getVersion();
+			} else {
+				BundleDescription bundle = getSite(false).getRegistry().getResolvedBundle(id, version.toString());
+				if (bundle != null)
+					versionString = bundle.getVersion().toString();
+			}
+			range = Utils.createVersionRange(versionString);
+			P2InfUtils.printRequires(buffer, null, index++, P2InfUtils.NAMESPACE_IU, id + (feature ? ".feature.group" : ""), range, null, true); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		return index;
+	}
+
 	private String getLauncherName(BuildTimeFeature executableProvider) {
 		String name = productFile.getLauncherName();
 		if (name != null)
@@ -289,6 +359,12 @@ public class ProductGenerator extends AbstractScriptGenerator {
 	}
 
 	private List getBundlesFromProductFile(Config config) {
+		BundleHelper helper = BundleHelper.getDefault();
+		Dictionary environment = new Hashtable(3);
+		environment.put("osgi.os", config.getOs()); //$NON-NLS-1$
+		environment.put("osgi.ws", config.getWs()); //$NON-NLS-1$
+		environment.put("osgi.arch", config.getArch()); //$NON-NLS-1$
+
 		List pluginList = productFile.getProductEntries();
 		List results = new ArrayList(pluginList.size());
 		for (Iterator iter = pluginList.iterator(); iter.hasNext();) {
@@ -298,7 +374,9 @@ public class ProductGenerator extends AbstractScriptGenerator {
 
 			BundleDescription bundle = assembly.getPlugin(entry.getId(), entry.getVersion());
 			if (bundle != null) {
-				results.add(bundle);
+				Filter filter = helper.getFilter(bundle);
+				if (filter == null || filter.match(environment))
+					results.add(bundle);
 			}
 		}
 		return results;
@@ -320,7 +398,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
 		if (bundlesTxt != null) {
 			buffer.append(SIMPLE_CONFIGURATOR_CONFIG_URL);
 			buffer.append("=file:"); //$NON-NLS-1$
-			buffer.append(P2Utils.BUNDLE_TXT_PATH);
+			buffer.append(SimpleConfiguratorManipulator.BUNDLES_INFO_PATH);
 			buffer.append("\n"); //$NON-NLS-1$
 		}
 	}
@@ -363,7 +441,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
 				if ((style & CONFIG_INCLUDES_DS) > 0) {
 					//org.eclipse.equinox.ds at 1:start
 					buffer.append(BUNDLE_DS);
-					buffer.append(START_LEVEL_1);
+					buffer.append(START_LEVEL_2);
 					buffer.append(',');
 				}
 				//org.eclipse.core.runtime
@@ -403,8 +481,8 @@ public class ProductGenerator extends AbstractScriptGenerator {
 			String id = bundle.getSymbolicName();
 			if (BUNDLE_OSGI.equals(id) || BUNDLE_EQUINOX_LAUNCHER.equals(id))
 				continue;
-			String filter = bundle.getPlatformFilter();
-			if (filter == null || helper.createFilter(filter).match(environment)) {
+			Filter filter = helper.getFilter(bundle);
+			if (filter == null || filter.match(environment)) {
 				if (first)
 					first = false;
 				else
@@ -419,7 +497,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
 					if (BUNDLE_EQUINOX_COMMON.equals(id)) {
 						buffer.append(START_LEVEL_2);
 					} else if (BUNDLE_DS.equals(id)) {
-						buffer.append(START_LEVEL_1);
+						buffer.append(START_LEVEL_2);
 					} else if (BUNDLE_CORE_RUNTIME.equals(id)) {
 						if ((style & CONFIG_STYLE_REFACTORED) > 0) {
 							buffer.append(START);
@@ -565,8 +643,8 @@ public class ProductGenerator extends AbstractScriptGenerator {
 		if (bundle != null) {
 			BundleDescription[] fragments = bundle.getFragments();
 			for (int i = 0; i < fragments.length; i++) {
-				String filter = fragments[i].getPlatformFilter();
-				if (filter == null || helper.createFilter(filter).match(environment)) {
+				Filter filter = helper.getFilter(fragments[i]);
+				if (filter == null || filter.match(environment)) {
 					String fragmentId = fragments[i].getSymbolicName();
 					if (productFile.containsPlugin(fragmentId)) {
 						buffer.append(",platform:/base/plugins/"); //$NON-NLS-1$
@@ -663,4 +741,8 @@ public class ProductGenerator extends AbstractScriptGenerator {
 		this.assembly = info;
 	}
 
+	public void setFeatureId(String featureId) {
+		this.featureId = featureId;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
index 50ead4b..fa79f4c 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build;
@@ -18,11 +18,13 @@ import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.ant.AntScript;
 import org.eclipse.pde.internal.build.site.BuildTimeFeature;
 import org.eclipse.pde.internal.build.site.BuildTimeSite;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
+import org.osgi.framework.BundleException;
 import org.osgi.framework.Version;
 
 /**
@@ -82,7 +84,7 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
 
 	public static VersionRange createVersionRange(String versionId) {
 		VersionRange range = null;
-		if (versionId == null || GENERIC_VERSION_NUMBER.equals(versionId))
+		if (versionId == null || versionId.length() == 0 || GENERIC_VERSION_NUMBER.equals(versionId))
 			range = VersionRange.emptyRange;
 		else {
 			int qualifierIdx = versionId.indexOf(IBuildPropertiesConstants.PROPERTY_QUALIFIER);
@@ -437,6 +439,16 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
 		}
 	}
 
+	public static void writeProperties(Properties properites, File outputFile, String comment) throws IOException {
+		outputFile.getParentFile().mkdirs();
+		OutputStream buildFile = new BufferedOutputStream(new FileOutputStream(outputFile));
+		try {
+			properites.store(buildFile, comment);
+		} finally {
+			close(buildFile);
+		}
+	}
+
 	public static FeatureEntry[] getPluginEntry(BuildTimeFeature feature, String pluginId, boolean raw) {
 		FeatureEntry[] plugins;
 		if (raw)
@@ -728,6 +740,14 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
 		return sb.toString();
 	}
 
+	public static String getMacroFormat(String propertyName) {
+		StringBuffer sb = new StringBuffer();
+		sb.append(MACRO_ASSIGNMENT_PREFIX);
+		sb.append(propertyName);
+		sb.append(PROPERTY_ASSIGNMENT_SUFFIX);
+		return sb.toString();
+	}
+
 	public static boolean isBinary(BundleDescription bundle) {
 		Properties bundleProperties = ((Properties) bundle.getUserObject());
 		if (bundleProperties == null || bundleProperties.get(IS_COMPILED) == null) {
@@ -747,13 +767,13 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
 		return (bundleProperties != null && bundleProperties.containsKey(ECLIPSE_BUNDLE_SHAPE));
 	}
 
-	public static String[] getSourceBundleHeader(BundleDescription bundle) {
+	public static String getSourceBundleHeader(BundleDescription bundle) {
 		Properties bundleProperties = (Properties) bundle.getUserObject();
 		if (bundleProperties == null || !bundleProperties.containsKey(ECLIPSE_SOURCE_BUNDLE))
-			return new String[0];
+			return ""; //$NON-NLS-1$
 
 		String header = bundleProperties.getProperty(ECLIPSE_SOURCE_BUNDLE);
-		return getArrayFromString(header);
+		return header;
 	}
 
 	/**
@@ -778,30 +798,31 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
 	}
 
 	public static Map parseSourceBundleEntry(BundleDescription bundle) {
-		String[] header = getSourceBundleHeader(bundle);
-		if (header.length > 0) {
-			HashMap map = new HashMap();
-			for (int i = 0; i < header.length; i++) {
-				String[] args = getArrayFromString(header[i], ";"); //$NON-NLS-1$
-
-				if (args.length == 1) {
-					map.put(args[0], Collections.EMPTY_MAP);
-				} else {
-					HashMap subMap = new HashMap(2);
-					map.put(args[0], subMap);
-					for (int j = 1; j < args.length; j++) {
-						int idx = args[j].indexOf('=');
-						if (idx != -1) {
-							subMap.put(args[j].substring(0, idx), args[j].substring(idx, args[j].length()));
-						} else {
-							subMap.put(args[j], ""); //$NON-NLS-1$
-						}
-					}
-				}
+		String header = getSourceBundleHeader(bundle);
+		if (header.length() == 0)
+			return Collections.EMPTY_MAP;
+
+		HashMap map = new HashMap();
+		ManifestElement[] elements;
+		try {
+			elements = ManifestElement.parseHeader(ECLIPSE_SOURCE_BUNDLE, header);
+		} catch (BundleException e1) {
+			return Collections.EMPTY_MAP;
+		}
+		for (int i = 0; i < elements.length; i++) {
+			String key = elements[i].getValue();
+			HashMap subMap = new HashMap(2);
+			map.put(key, subMap);
+			for (Enumeration e = elements[i].getDirectiveKeys(); e != null && e.hasMoreElements();) {
+				String directive = (String) e.nextElement();
+				subMap.put(directive, elements[i].getDirective(directive));
+			}
+			for (Enumeration e = elements[i].getKeys(); e != null && e.hasMoreElements();) {
+				String attribute = (String) e.nextElement();
+				subMap.put(attribute, elements[i].getAttribute(attribute));
 			}
-			return map;
 		}
-		return Collections.EMPTY_MAP;
+		return map;
 	}
 
 	public static final String EXTRA_ID = "id"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java
index dc02479..04cdc3c 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/AntScript.java
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation Prosyst - create proper
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * OSGi bundles (bug 174157)
- ******************************************************************************/
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.ant;
 
 import java.io.*;
@@ -85,7 +86,7 @@ public class AntScript implements IAntScript {
 		}
 	}
 
-	public void printP2PublishFeaturesAndBundles(String metadataRepository, String artifactRepository, FileSet[] bundles, FileSet[] features, String siteXML, String siteQualifier, String categoryDefintion, URI[] contextMetadata) {
+	public void printP2PublishFeaturesAndBundles(String metadataRepository, String artifactRepository, FileSet[] bundles, FileSet[] features, String siteXML, String siteQualifier, String categoryDefintion, String categoryVersion, URI[] contextMetadata) {
 		printTab();
 		output.print("<eclipse.publish.featuresAndBundles"); //$NON-NLS-1$
 		if (metadataRepository.equals(artifactRepository)) {
@@ -97,6 +98,7 @@ public class AntScript implements IAntScript {
 		printAttribute("site", siteXML, false); //$NON-NLS-1$
 		printAttribute("category", categoryDefintion, false); //$NON-NLS-1$
 		printAttribute("siteQualifier", siteQualifier, false); //$NON-NLS-1$
+		printAttribute("categoryVersion", categoryVersion, false); //$NON-NLS-1$
 		output.println(">"); //$NON-NLS-1$
 		indent++;
 		for (int i = 0; i < features.length; i++) {
@@ -632,8 +634,13 @@ public class AntScript implements IAntScript {
 	}
 
 	public void printEchoTask(String file, String message) {
+		printEchoTask(file, message, null);
+	}
+
+	public void printEchoTask(String file, String message, String level) {
 		printTab();
 		output.print("<echo"); //$NON-NLS-1$
+		printAttribute("level", level, false); //$NON-NLS-1$
 		printAttribute("file", file, false); //$NON-NLS-1$
 		printAttribute("message", message, true); //$NON-NLS-1$
 		output.println("/>"); //$NON-NLS-1$
@@ -755,6 +762,51 @@ public class AntScript implements IAntScript {
 	}
 
 	/**
+	 * Print a start tag in the Ant script for the given element name.
+	 * 
+	 * @param tag the name of the element
+	 */
+	public void printStartTag(String tag, Map arguments) {
+		printTab();
+		output.print("<"); //$NON-NLS-1$
+		output.print(tag);
+		Set entries = arguments.entrySet();
+		for (Iterator iter = entries.iterator(); iter.hasNext();) {
+			Map.Entry entry = (Map.Entry) iter.next();
+			printAttribute((String) entry.getKey(), (String) entry.getValue(), true);
+		}
+		output.println(">"); //$NON-NLS-1$
+	}
+
+	public void incrementIdent() {
+		indent++;
+	}
+
+	public void decrementIdent() {
+		indent--;
+	}
+
+	/**
+	 * Print an element the Ant script for the given name including a closing " />".
+	 * 
+	 * @param tag the name of the element
+	 * @param arguments the arguments
+	 */
+	public void printElement(String tag, Map arguments) {
+		printTab();
+		output.print("<"); //$NON-NLS-1$
+		output.print(tag);
+		if (null != arguments) {
+			Set entries = arguments.entrySet();
+			for (Iterator iter = entries.iterator(); iter.hasNext();) {
+				Map.Entry entry = (Map.Entry) iter.next();
+				printAttribute((String) entry.getKey(), (String) entry.getValue(), true);
+			}
+		}
+		output.println("/>"); //$NON-NLS-1$
+	}
+
+	/**
 	 * Print an end tag in the Ant script for the given element name.
 	 * 
 	 * @param tag the name of the element
@@ -963,10 +1015,11 @@ public class AntScript implements IAntScript {
 	public void printMacroDef(String macroName, List attributes) {
 		println("<macrodef name=\"" + macroName + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
 		indent++;
-		for (Iterator iterator = attributes.iterator(); iterator.hasNext();) {
-			String attribute = (String) iterator.next();
-			println("<attribute name=\"" + attribute + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$
-		}
+		if (null != attributes)
+			for (Iterator iterator = attributes.iterator(); iterator.hasNext();) {
+				String attribute = (String) iterator.next();
+				println("<attribute name=\"" + attribute + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
 		println("<sequential>"); //$NON-NLS-1$
 		indent++;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/Condition.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/Condition.java
deleted file mode 100644
index d772e80..0000000
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/Condition.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.build.ant;
-
-import java.util.*;
-
-/**
- * Represents an Ant condition.
- */
-public class Condition {
-
-	/**
-	 * Types of conditions.
-	 */
-	protected String type;
-	public static final String TYPE_AND = "and"; //$NON-NLS-1$
-	protected List singleConditions;
-	protected List nestedConditions;
-
-	/**
-	 * Default constructor for the class.
-	 */
-	public Condition() {
-		this.singleConditions = new ArrayList(5);
-		this.nestedConditions = new ArrayList(5);
-	}
-
-	public Condition(String type) {
-		this();
-		this.type = type;
-	}
-
-	/**
-	 * Add this Ant condition to the given Ant script.
-	 * 
-	 * @param script the script to add the condition to
-	 */
-	protected void print(AntScript script) {
-		if (type != null) {
-			script.indent++;
-			script.printStartTag(type);
-		}
-		for (Iterator iterator = singleConditions.iterator(); iterator.hasNext();)
-			script.printString((String) iterator.next());
-		for (Iterator iterator = nestedConditions.iterator(); iterator.hasNext();) {
-			Condition condition = (Condition) iterator.next();
-			condition.print(script);
-		}
-		if (type != null) {
-			script.printEndTag(type);
-			script.indent--;
-		}
-	}
-
-	/**
-	 * Add an "equals" condition to this Ant condition.
-	 * 
-	 * @param arg1 the left-hand side of the equals
-	 * @param arg2 the right-hand side of the equals
-	 */
-	public void addEquals(String arg1, String arg2) {
-		StringBuffer condition = new StringBuffer();
-		condition.append("<equals "); //$NON-NLS-1$
-		condition.append("arg1=\""); //$NON-NLS-1$
-		condition.append(arg1);
-		condition.append("\" "); //$NON-NLS-1$
-		condition.append("arg2=\""); //$NON-NLS-1$
-		condition.append(arg2);
-		condition.append("\"/>"); //$NON-NLS-1$
-		singleConditions.add(condition.toString());
-	}
-
-	/**
-	 * Add the given condition to this Ant condition.
-	 * 
-	 * @param condition the condition to add
-	 */
-	public void add(Condition condition) {
-		nestedConditions.add(condition);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/ConditionTask.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/ConditionTask.java
deleted file mode 100644
index ec4557f..0000000
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/ConditionTask.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.build.ant;
-
-/**
- * Represents an Ant condition.
- */
-public class ConditionTask implements ITask {
-
-	protected String property;
-	protected String value;
-	protected Condition condition;
-
-	/**
-	 * Constructor for the condition.
-	 * 
-	 * @param property
-	 * @param value
-	 * @param condition
-	 */
-	public ConditionTask(String property, String value, Condition condition) {
-		this.property = property;
-		this.value = value;
-		this.condition = condition;
-	}
-
-	/**
-	 * @see ITask#print(AntScript)
-	 */
-	public void print(AntScript script) {
-		script.printTab();
-		script.print("<condition"); //$NON-NLS-1$
-		script.printAttribute("property", property, true); //$NON-NLS-1$
-		script.printAttribute("value", value, false); //$NON-NLS-1$
-		script.println(">"); //$NON-NLS-1$
-		condition.print(script);
-		script.println("</condition>"); //$NON-NLS-1$
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/IScriptRunner.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/IScriptRunner.java
new file mode 100644
index 0000000..990ca2a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/IScriptRunner.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.build.ant;
+
+import java.io.File;
+import java.util.Map;
+
+public interface IScriptRunner {
+
+	public void runScript(File script, String target, Map properties);
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/JavacTask.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/JavacTask.java
index 506099a..6ba0f9d 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/JavacTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/JavacTask.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -30,10 +30,16 @@ public class JavacTask implements ITask {
 	protected String source;
 	protected String target;
 	protected String compileArgs;
+	protected String specificCompileArgs;
 	protected String compileArgsFile;
 	protected String encoding;
 	protected String logExtension;
 	protected String errorProperty;
+	protected String[] excludes;
+	protected String compilerAdapter;
+	protected String warningProperties;
+	private boolean adapterUseLog = false;
+	private boolean adapterUseArgFile = false;
 
 	/**
 	 * Default constructor for the class.
@@ -59,6 +65,7 @@ public class JavacTask implements ITask {
 		script.printAttribute("target", target, false); //$NON-NLS-1$
 		script.printAttribute("encoding", encoding, false); //$NON-NLS-1$
 		script.printAttribute("errorProperty", errorProperty, false); //$NON-NLS-1$
+		script.printAttribute("compiler", compilerAdapter, false); //$NON-NLS-1$
 		script.println(">"); //$NON-NLS-1$
 
 		script.indent++;
@@ -67,6 +74,13 @@ public class JavacTask implements ITask {
 			script.println("<compilerarg line=\"" + compileArgs + "\" compiler=\"" + Utils.getPropertyFormat(IXMLConstants.PROPERTY_BUILD_COMPILER) + "\"/>"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 		}
 
+		if (specificCompileArgs != null) {
+			script.printTabs();
+			script.print("<compilerarg"); //$NON-NLS-1$
+			script.printAttribute("line", specificCompileArgs, true); //$NON-NLS-1$
+			script.printAttribute("compiler", compilerAdapter, false); //$NON-NLS-1$
+			script.println("/>"); //$NON-NLS-1$
+		}
 		script.println("<classpath refid=\"" + classpathId + "\" />"); //$NON-NLS-1$ //$NON-NLS-2$
 
 		for (int i = 0; i < srcdir.length; i++) {
@@ -76,11 +90,44 @@ public class JavacTask implements ITask {
 			script.println("/>"); //$NON-NLS-1$
 		}
 
+		for (int i = 0; excludes != null && i < excludes.length; i++) {
+			script.printTab();
+			script.print("<exclude "); //$NON-NLS-1$
+			script.printAttribute("name", excludes[i], true); //$NON-NLS-1$
+			script.println("/>"); //$NON-NLS-1$
+		}
+
+		if (warningProperties != null) {
+			script.printTab();
+			script.print("<compilerarg"); //$NON-NLS-1$
+			script.printAttribute("line", "-properties '" + warningProperties + "'", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			if (compilerAdapter != null && adapterUseArgFile)
+				script.printAttribute("compiler", compilerAdapter, true); //$NON-NLS-1$
+			else
+				script.printAttribute("compiler", IXMLConstants.JDT_COMPILER_ADAPTER, true); //$NON-NLS-1$
+			script.println("/>"); //$NON-NLS-1$
+		}
+
 		if (compileArgsFile != null) {
-			script.println("<compilerarg value=\"@" + compileArgsFile + "\" compiler=\"" + IXMLConstants.JDT_COMPILER_ADAPTER + "\"/>"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+			script.printTabs();
+			script.print("<compilerarg"); //$NON-NLS-1$
+			script.printAttribute("value", "@" + compileArgsFile, true); //$NON-NLS-1$ //$NON-NLS-2$
+			if (compilerAdapter != null && adapterUseArgFile)
+				script.printAttribute("compiler", compilerAdapter, true); //$NON-NLS-1$
+			else
+				script.printAttribute("compiler", IXMLConstants.JDT_COMPILER_ADAPTER, true); //$NON-NLS-1$
+			script.println("/>"); //$NON-NLS-1$
 		}
+
 		if (destdir != null) {
-			script.println("<compilerarg line=\"-log '" + destdir + logExtension + "'\" compiler=\"" + IXMLConstants.JDT_COMPILER_ADAPTER + "\"/>"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+			script.printTabs();
+			script.print("<compilerarg"); //$NON-NLS-1$
+			script.printAttribute("line", "-log '" + destdir + logExtension + "'", true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			if (compilerAdapter != null && adapterUseLog)
+				script.printAttribute("compiler", compilerAdapter, true); //$NON-NLS-1$
+			else
+				script.printAttribute("compiler", IXMLConstants.JDT_COMPILER_ADAPTER, true); //$NON-NLS-1$
+			script.println("/>"); //$NON-NLS-1$
 		}
 		script.indent--;
 		script.printEndTag("javac"); //$NON-NLS-1$
@@ -142,6 +189,14 @@ public class JavacTask implements ITask {
 	}
 
 	/**
+	 * Set patterns to exclude from compilation 
+	 * @param excludes
+	 */
+	public void setExcludes(String[] excludes) {
+		this.excludes = excludes;
+	}
+
+	/**
 	 * Set the javac task verbose attribute to be the given value. Valid values
 	 * are <code>"true"</code> and <code>"false"</code>.
 	 * 
@@ -193,6 +248,10 @@ public class JavacTask implements ITask {
 		this.compileArgs = args;
 	}
 
+	public void setSpecificCompileArgs(String args) {
+		this.specificCompileArgs = args;
+	}
+
 	public void setEncoding(String encoding) {
 		this.encoding = encoding;
 	}
@@ -208,4 +267,22 @@ public class JavacTask implements ITask {
 	public void setErrorProperty(String errorProperty) {
 		this.errorProperty = errorProperty;
 	}
+
+	public void setCompilerAdapter(String compilerAdapter) {
+		this.compilerAdapter = compilerAdapter;
+	}
+
+	public void setAdapterUseLog(boolean useLog) {
+		this.adapterUseLog = useLog;
+
+	}
+
+	public void setAdapterArgFile(boolean useFile) {
+		this.adapterUseArgFile = useFile;
+
+	}
+
+	public void setWarningProperties(String warningProperties) {
+		this.warningProperties = warningProperties;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/AbstractBuildScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/AbstractBuildScriptGenerator.java
index e985beb..a865894 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/AbstractBuildScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/AbstractBuildScriptGenerator.java
@@ -1,16 +1,17 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2007 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.builder;
 
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.internal.build.*;
@@ -32,22 +33,22 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 
 	private boolean includePlatformIndependent = true;
 
-	/** flag indicating whether or not the missing properties file should be logged */ 
+	/** flag indicating whether or not the missing properties file should be logged */
 	private boolean ignoreMissingPropertiesFile = true;
 
 	static private Properties executionEnvironmentMappings = null;
-	
+
 	abstract protected Properties getBuildProperties() throws CoreException;
 
-	static public Properties getExecutionEnvironmentMappings(){
-		if(executionEnvironmentMappings != null)
+	static public Properties getExecutionEnvironmentMappings() {
+		if (executionEnvironmentMappings != null)
 			return executionEnvironmentMappings;
-		
-		executionEnvironmentMappings = new Properties();
+
+		Properties properties = new Properties();
 		InputStream stream = null;
 		try {
 			stream = BundleHelper.getDefault().getBundle().getEntry("data/env.properties").openStream(); //$NON-NLS-1$
-			executionEnvironmentMappings.load(stream);
+			properties.load(stream);
 		} catch (IOException e) {
 			//ignore
 		} finally {
@@ -58,9 +59,10 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 				//ignore
 			}
 		}
+		executionEnvironmentMappings = properties;
 		return executionEnvironmentMappings;
 	}
-	
+
 	public void setDevEntries(String entries) {
 		devEntries = new DevClassPathHelper(entries);
 	}
@@ -72,7 +74,7 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 	public void includePlatformIndependent(boolean value) {
 		includePlatformIndependent = value;
 	}
-	
+
 	public boolean isPlatformIndependentIncluded() {
 		return includePlatformIndependent;
 	}
@@ -87,9 +89,7 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 	public List selectConfigs(IPlatformEntry element) {
 		List result = new ArrayList(getConfigInfos());
 
-		if (((element.getOS() == null || element.getOS().equals(Config.ANY)) && includePlatformIndependent == false) && 
-			((element.getWS() == null || element.getWS().equals(Config.ANY)) && includePlatformIndependent == false) && 
-			((element.getArch() == null || element.getArch().equals(Config.ANY)) && includePlatformIndependent == false)) {
+		if (((element.getOS() == null || element.getOS().equals(Config.ANY)) && includePlatformIndependent == false) && ((element.getWS() == null || element.getWS().equals(Config.ANY)) && includePlatformIndependent == false) && ((element.getArch() == null || element.getArch().equals(Config.ANY)) && includePlatformIndependent == false)) {
 			result.clear();
 			return result;
 		}
@@ -97,21 +97,21 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 		if (element.getOS() != null && !element.getOS().equals(Config.ANY)) {
 			for (Iterator iter = result.iterator(); iter.hasNext();) {
 				Config config = (Config) iter.next();
-				if (! isMatching(element.getOS(), config.getOs()) )
+				if (!isMatching(element.getOS(), config.getOs()))
 					iter.remove();
 			}
 		}
 		if (element.getWS() != null && !element.getWS().equals(Config.ANY)) {
 			for (Iterator iter = result.iterator(); iter.hasNext();) {
 				Config config = (Config) iter.next();
-				if (! isMatching(element.getWS(), config.getWs()) )
+				if (!isMatching(element.getWS(), config.getWs()))
 					iter.remove();
 			}
 		}
 		if (element.getArch() != null && !element.getArch().equals(Config.ANY)) {
 			for (Iterator iter = result.iterator(); iter.hasNext();) {
 				Config config = (Config) iter.next();
-				if (! isMatching(element.getArch(), config.getArch()))
+				if (!isMatching(element.getArch(), config.getArch()))
 					iter.remove();
 			}
 		}
@@ -122,11 +122,12 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 		StringTokenizer stok = new StringTokenizer(candidateValues, ","); //$NON-NLS-1$
 		while (stok.hasMoreTokens()) {
 			String token = stok.nextToken().toUpperCase();
-			if (configValue.equalsIgnoreCase(token)) return true;
+			if (configValue.equalsIgnoreCase(token))
+				return true;
 		}
 		return false;
 	}
-	
+
 	public Set getCompiledElements() {
 		if (compiledElements == null)
 			compiledElements = new HashSet();
@@ -153,7 +154,6 @@ public abstract class AbstractBuildScriptGenerator extends AbstractScriptGenerat
 			return false;
 		return ignoreMissingPropertiesFile;
 	}
-	
 
 	/**
 	 * @param value The ignoreMissingPropertiesFile to set.
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/BuildDirector.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/BuildDirector.java
index 9baf866..12b728e 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/BuildDirector.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/BuildDirector.java
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation G&H Softwareentwicklung
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  * GmbH - internationalization implementation (bug 150933)
- ******************************************************************************/
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.builder;
 
 import java.util.*;
@@ -53,6 +54,7 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 	protected String product = null;
 	protected boolean generateJnlp = false;
 	protected boolean workspaceBinaries = false;
+	private boolean sourceReferences = false;
 
 	public static boolean p2Gathering = false;
 
@@ -115,7 +117,7 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 				model = getSite(false).getRegistry().getResolvedBundle(entry.getId(), versionRequested);
 			}
 			if (model == null) {
-				getSite(false).missingPlugin(entry.getId(), versionRequested, true);
+				getSite(false).missingPlugin(entry.getId(), versionRequested, feature, true);
 			}
 
 			associateModelAndEntry(model, entry);
@@ -493,7 +495,7 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 			//and generate the script if one the configuration is being built. The generated scripts
 			//are configuration agnostic so we only generate once.
 			Set matchingEntries = (Set) ((Properties) model.getUserObject()).get(PLUGIN_ENTRY);
-			if (matchingEntries.isEmpty())
+			if (matchingEntries == null || matchingEntries.isEmpty())
 				return;
 
 			Iterator entryIter = matchingEntries.iterator();
@@ -514,6 +516,7 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 			generator.includePlatformIndependent(isPlatformIndependentIncluded());
 			generator.setSignJars(signJars);
 			generator.setAssociatedEntry(correspondingEntry);
+			generator.setGenerateSourceReferences(sourceReferences);
 			generator.generate();
 		}
 
@@ -553,17 +556,24 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 	}
 
 	protected void collectElementToAssemble(BuildTimeFeature featureToCollect) throws CoreException {
-		if (assemblyData == null)
+		if (assemblyData == null || featureToCollect == null)
 			return;
 
-		/* collect binary features */
-		if (featureToCollect != null && featureToCollect.isBinary()) {
+		String binIncludes = getBuildProperties(featureToCollect).getProperty(PROPERTY_BIN_INCLUDES);
+
+		/* collect binary features, and any feature defining bin.includes */
+		if (featureToCollect.isBinary() || (binIncludes != null && binIncludes.length() > 0)) {
 			basicCollectElementToAssemble(featureToCollect);
 			return;
 		}
 
-		// don't collect if bin.includes is empty, or we are generating source;
-		if (getBuildProperties(featureToCollect).get(PROPERTY_BIN_INCLUDES) == null)
+		//at this point, we have a non-binary feature with empty bin includes
+		//when building p2, containers (features without bin.includes) need to be collected, 
+		//with the exception of the pde generated containers.
+		if (!BuildDirector.p2Gathering)
+			return;
+
+		if (featureToCollect.getId().equals(CONTAINER_FEATURE) || featureToCollect.getId().equals(UI_CONTAINER_FEATURE))
 			return;
 
 		basicCollectElementToAssemble(featureToCollect);
@@ -628,6 +638,10 @@ public class BuildDirector extends AbstractBuildScriptGenerator {
 		signJars = value;
 	}
 
+	public void setGenerateSourceReferences(boolean generateSourceRef) {
+		this.sourceReferences = generateSourceRef;
+	}
+
 	/**
 	 * Sets whether or not to generate the feature version suffix
 	 * 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer2_1.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer2_1.java
index eeed27b..da058e9 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer2_1.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer2_1.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.builder;
@@ -83,7 +83,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 		Properties modelProps = getBuildPropertiesFor(model);
 		for (int i = 0; i < libraries.length; i++) {
 			addDevEntries(model, baseLocation, classpath, Utils.getArrayFromString(generator.getBuildProperties().getProperty(PROPERTY_OUTPUT_PREFIX + libraries[i])));
-			addPathAndCheck(model.getSymbolicName(), base, libraries[i], modelProps, classpath);
+			addPathAndCheck(model, base, libraries[i], modelProps, classpath);
 		}
 	}
 
@@ -144,7 +144,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 		IPath base = Utils.makeRelative(new Path(root), new Path(baseLocation));
 		Properties modelProps = getBuildPropertiesFor(fragment);
 		for (int i = 0; i < libraries.length; i++) {
-			addPathAndCheck(fragment.getSymbolicName(), base, libraries[i], modelProps, classpath);
+			addPathAndCheck(fragment, base, libraries[i], modelProps, classpath);
 		}
 	}
 
@@ -160,10 +160,11 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 	// Add a path into the classpath for a given model
 	// path : The path to add
 	// classpath : The classpath in which we want to add this path 
-	private void addPathAndCheck(String pluginId, IPath basePath, String libraryName, Properties modelProperties, List classpath) {
+	private void addPathAndCheck(BundleDescription model, IPath basePath, String libraryName, Properties modelProperties, List classpath) {
+		String pluginKey = model != null ? model.getSymbolicName() + "_" + model.getVersion() : null; //$NON-NLS-1$
 		String path = basePath.append(libraryName).toString();
-		path = ModelBuildScriptGenerator.replaceVariables(path, pluginId == null ? false : generator.getCompiledElements().contains(pluginId));
-		if (generator.getCompiledElements().contains(pluginId)) {
+		path = ModelBuildScriptGenerator.replaceVariables(path, pluginKey == null ? false : generator.getCompiledElements().contains(pluginKey));
+		if (generator.getCompiledElements().contains(pluginKey)) {
 			if (modelProperties == null || modelProperties.getProperty("source." + libraryName) != null) //$NON-NLS-1$
 				path = Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER) + '/' + path;
 		}
@@ -200,7 +201,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 					//Potential pb: here there maybe a nasty case where the libraries variable may refer to something which is part of the base
 					//but $xx$ will replace it by the $xx instead of $basexx. The solution is for the user to use the explicitly set the content
 					// of its build.property file
-					addPathAndCheck(model.getSymbolicName(), Path.EMPTY, libraryName, modelProperties, classpath);
+					addPathAndCheck(model, Path.EMPTY, libraryName, modelProperties, classpath);
 				}
 			}
 		} else {
@@ -210,7 +211,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 				if (order[i].equals(jar.getName(false)))
 					break;
 				addDevEntries(model, location, classpath, Utils.getArrayFromString((String) modelProperties.get(PROPERTY_OUTPUT_PREFIX + order[i])));
-				addPathAndCheck(model.getSymbolicName(), Path.EMPTY, order[i], modelProperties, classpath);
+				addPathAndCheck(model, Path.EMPTY, order[i], modelProperties, classpath);
 			}
 			// Then we add all the "pure libraries" (the one that does not contain source)
 			String[] libraries = getClasspathEntries(model);
@@ -219,7 +220,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 				if (modelProperties.get(PROPERTY_SOURCE_PREFIX + libraryName) == null) {
 					//Potential pb: if the pure library is something that is being compiled (which is supposetly not the case, but who knows...)
 					//the user will get $basexx instead of $ws 
-					addPathAndCheck(model.getSymbolicName(), Path.EMPTY, libraryName, modelProperties, classpath);
+					addPathAndCheck(model, Path.EMPTY, libraryName, modelProperties, classpath);
 				}
 			}
 		}
@@ -277,7 +278,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 					else
 						modelLocation += '/' + urlfragments[i];
 				}
-				return relativePath = Utils.makeRelative(new Path(modelLocation), new Path(location)).toOSString();
+				return Utils.makeRelative(new Path(modelLocation), new Path(location)).toOSString();
 			}
 		}
 
@@ -370,7 +371,7 @@ public class ClasspathComputer2_1 implements IClasspathComputer, IPDEBuildConsta
 
 		IPath root = Utils.makeRelative(new Path(generator.getLocation(model)), new Path(baseLocation));
 		for (int i = 0; i < entries.length; i++) {
-			addPathAndCheck(model.getSymbolicName(), root, entries[i], null, classpath);
+			addPathAndCheck(model, root, entries[i], null, classpath);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer3_0.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer3_0.java
index def803c..353af8a 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer3_0.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ClasspathComputer3_0.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -91,7 +91,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 	private Map visiblePackages = null;
 	private Map pathElements = null;
 	private boolean allowBinaryCycles = false;
-	private StringBuffer requiredIds = null;
+	private Set requiredIds = null;
 
 	public ClasspathComputer3_0(ModelBuildScriptGenerator modelGenerator) {
 		this.generator = modelGenerator;
@@ -113,7 +113,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 		Set addedPlugins = new HashSet(10); //The set of all the plugins already added to the classpath (this allows for optimization)
 		pathElements = new HashMap();
 		visiblePackages = getVisiblePackages(model);
-		requiredIds = new StringBuffer();
+		requiredIds = new HashSet();
 		allowBinaryCycles = AbstractScriptGenerator.getPropertyAsBoolean(IBuildPropertiesConstants.PROPERTY_ALLOW_BINARY_CYCLES);
 
 		//PREREQUISITE
@@ -135,7 +135,12 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			bundleProperties = new Properties();
 			model.setUserObject(bundleProperties);
 		}
-		bundleProperties.setProperty(PROPERTY_REQUIRED_BUNDLE_IDS, requiredIds.toString());
+		StringBuffer buffer = new StringBuffer();
+		for (Iterator iterator = requiredIds.iterator(); iterator.hasNext();) {
+			buffer.append(iterator.next().toString());
+			buffer.append(':');
+		}
+		bundleProperties.setProperty(PROPERTY_REQUIRED_BUNDLE_IDS, buffer.toString());
 	}
 
 	private Map getVisiblePackages(BundleDescription model) {
@@ -158,7 +163,8 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			String pattern = exports[i].getName().replaceAll("\\.", "/") + "/*"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			String rule = (discouraged ? '~' : '+') + pattern;
 
-			String rules = (String) packages.get(exporter.getSymbolicName());
+			String packagesKey = exporter.getSymbolicName() + "_" + exporter.getVersion(); //$NON-NLS-1$
+			String rules = (String) packages.get(packagesKey);
 			if (rules != null) {
 				if (rules.indexOf(rule) == -1)
 					rules = rules + File.pathSeparator + rule;
@@ -166,7 +172,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 				rules = rule;
 			}
 
-			packages.put(exporter.getSymbolicName(), rules);
+			packages.put(packagesKey, rules);
 		}
 	}
 
@@ -185,8 +191,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			allFragments = false;
 		}
 
-		requiredIds.append(plugin.getBundleId());
-		requiredIds.append(':');
+		requiredIds.add(new Long(plugin.getBundleId()));
 
 		addRuntimeLibraries(plugin, classpath, location);
 		addFragmentsLibraries(plugin, classpath, location, true, allFragments);
@@ -231,8 +236,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			if (matchFilter(fragments[i]) == false)
 				continue;
 
-			requiredIds.append(fragments[i].getBundleId());
-			requiredIds.append(':');
+			requiredIds.add(new Long(fragments[i].getBundleId()));
 
 			if (!afterPlugin && isPatchFragment(fragments[i])) {
 				addPluginLibrariesToFragmentLocations(plugin, fragments[i], classpath, baseLocation);
@@ -304,15 +308,16 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 	// basePath : the relative path between the plugin from which we are adding the classpath and the plugin that is requiring this entry 
 	// classpath : The classpath in which we want to add this path 
 	private void addPathAndCheck(BundleDescription model, IPath basePath, String libraryName, Properties modelProperties, List classpath) {
-		String pluginId = model != null ? model.getSymbolicName() : null;
+		String pluginKey = model != null ? model.getSymbolicName() + "_" + model.getVersion() : null; //$NON-NLS-1$
 		String rules = ""; //$NON-NLS-1$
 		//only add access rules to libraries that are not part of the current bundle
 		//and are not this bundle's host if we are a fragment
 		BundleDescription currentBundle = generator.getModel();
 		if (model != null && model != currentBundle && (currentBundle.getHost() == null || currentBundle.getHost().getSupplier() != model)) {
-			String packageKey = pluginId;
+			String packageKey = pluginKey;
 			if (model.isResolved() && model.getHost() != null) {
-				packageKey = ((BundleDescription) model.getHost().getSupplier()).getSymbolicName();
+				BundleDescription host = (BundleDescription) model.getHost().getSupplier();
+				packageKey = host.getSymbolicName() + "_" + host.getVersion(); //$NON-NLS-1$
 			}
 			if (visiblePackages.containsKey(packageKey)) {
 				rules = "[" + (String) visiblePackages.get(packageKey) + File.pathSeparator + EXCLUDE_ALL_RULE + "]"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -331,9 +336,9 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			else
 				path = basePath.append(libraryPath).toOSString();
 		}
-		path = ModelBuildScriptGenerator.replaceVariables(path, pluginId == null ? false : generator.getCompiledElements().contains(pluginId));
+		path = ModelBuildScriptGenerator.replaceVariables(path, pluginKey == null ? false : generator.getCompiledElements().contains(pluginKey));
 		String secondaryPath = null;
-		if (generator.getCompiledElements().contains(pluginId)) {
+		if (generator.getCompiledElements().contains(pluginKey)) {
 			if (modelProperties == null || modelProperties.getProperty(IBuildPropertiesConstants.PROPERTY_SOURCE_PREFIX + libraryName) != null)
 				path = Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER) + '/' + path;
 			secondaryPath = Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER) + "/../" + model.getSymbolicName() + '_' + model.getVersion() + '/' + libraryName; //$NON-NLS-1$
@@ -452,25 +457,31 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 		if (urlfragments.length > 2 && urlfragments[0].equals(PlatformURLHandler.PROTOCOL + PlatformURLHandler.PROTOCOL_SEPARATOR)) {
 			String modelLocation = null;
 			BundleDescription bundle = null;
-			if (urlfragments[1].equalsIgnoreCase(PLUGIN) || urlfragments[1].equalsIgnoreCase(FRAGMENT))
+			if (urlfragments[1].equalsIgnoreCase(PLUGIN) || urlfragments[1].equalsIgnoreCase(FRAGMENT)) {
 				bundle = generator.getSite(false).getRegistry().getResolvedBundle(urlfragments[2]);
+				if (bundle == null) {
+					String message = NLS.bind(Messages.exception_url, generator.getModel().getSymbolicName() + '/' + generator.getPropertiesFileName() + ": " + url); //$NON-NLS-1$
+					MultiStatus status = new MultiStatus(PI_PDEBUILD, EXCEPTION_MALFORMED_URL, message, null);
+					message = NLS.bind(Messages.exception_missingElement, urlfragments[2]);
+					status.add(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PLUGIN_MISSING, message, null));
+					throw new CoreException(status);
+				}
 
-			if (urlfragments.length == 3) {
-				addPlugin(bundle, classpath, location);
-				return null;
-			}
-
-			modelLocation = generator.getLocation(bundle);
+				if (urlfragments.length == 3) {
+					addPlugin(bundle, classpath, location);
+					return null;
+				}
 
-			if (urlfragments[1].equalsIgnoreCase("resource")) { //$NON-NLS-1$
-				String message = NLS.bind(Messages.exception_url, generator.getPropertiesFileName() + "::" + url); //$NON-NLS-1$
-				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_MALFORMED_URL, message, null));
-			}
-			if (modelLocation != null) {
-				for (int i = 3; i < urlfragments.length; i++) {
-					modelLocation += '/' + urlfragments[i];
+				modelLocation = generator.getLocation(bundle);
+				if (modelLocation != null) {
+					for (int i = 3; i < urlfragments.length; i++) {
+						modelLocation += '/' + urlfragments[i];
+					}
+					return Utils.makeRelative(new Path(modelLocation), new Path(location)).toOSString();
 				}
-				return relativePath = Utils.makeRelative(new Path(modelLocation), new Path(location)).toOSString();
+			} else if (urlfragments[1].equalsIgnoreCase("resource")) { //$NON-NLS-1$
+				String message = NLS.bind(Messages.exception_url, generator.getModel().getSymbolicName() + '/' + generator.getPropertiesFileName() + ": " + url); //$NON-NLS-1$
+				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_MALFORMED_URL, message, null));
 			}
 		}
 
@@ -480,7 +491,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			try {
 				relativePath = Utils.makeRelative(new Path(FileLocator.resolve(extraURL).getFile()), new Path(location)).toOSString();
 			} catch (IOException e) {
-				String message = NLS.bind(Messages.exception_url, generator.getPropertiesFileName() + "::" + url); //$NON-NLS-1$
+				String message = NLS.bind(Messages.exception_url, generator.getModel().getSymbolicName() + '/' + generator.getPropertiesFileName() + ": " + url); //$NON-NLS-1$
 				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_MALFORMED_URL, message, e));
 			}
 		} catch (MalformedURLException e) {
@@ -560,7 +571,7 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 	}
 
 	private boolean matchFilter(BundleDescription target) {
-		String filter = target.getPlatformFilter();
+		Filter filter = BundleHelper.getDefault().getFilter(target);
 		if (filter == null) //Target is platform independent, add it 
 			return true;
 
@@ -576,10 +587,6 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 			return true;
 
 		//The plugin for which we are generating the classpath and target are not platform independent
-		Filter f = BundleHelper.getDefault().createFilter(filter);
-		if (f == null)
-			return true;
-
 		Dictionary properties = new Hashtable(3);
 		if (os != null) {
 			properties.put(OSGI_OS, os);
@@ -596,12 +603,12 @@ public class ClasspathComputer3_0 implements IClasspathComputer, IPDEBuildConsta
 		else
 			properties.put(OSGI_ARCH, CatchAllValue.singleton);
 
-		if (arch != null)
-			properties.put(OSGI_NL, arch);
+		if (nl != null)
+			properties.put(OSGI_NL, nl);
 		else
 			properties.put(OSGI_NL, CatchAllValue.singleton);
 
-		return f.match(properties);
+		return filter.match(properties);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/DevClassPathHelper.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/DevClassPathHelper.java
index a3542b0..881fd5b 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/DevClassPathHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/DevClassPathHelper.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,7 +15,8 @@ import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Properties;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.*;
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java
index ce80ce1..3b40dfe 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *     G&H Softwareentwicklung GmbH - internationalization implementation (bug 150933)
  *******************************************************************************/
@@ -49,10 +49,7 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 
 	public FeatureBuildScriptGenerator(BuildTimeFeature feature) {
 		this.feature = feature;
-
-		if (featureRootLocation == null) {
-			featureRootLocation = feature.getRootLocation();
-		}
+		featureRootLocation = feature.getRootLocation();
 	}
 
 	public void setDirector(BuildDirector director) {
@@ -179,9 +176,11 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 		String destinationTempFolder = new Path(featureTempFolder).append(DEFAULT_PLUGIN_LOCATION).toString();
 		script.printMkdirTask(destinationTempFolder);
 		script.printProperty(PROPERTY_DESTINATION_TEMP_FOLDER, destinationTempFolder);
+		script.printConditionIsSet(PROPERTY_LOG_EXTENSION_PARAM, PROPERTY_LOG_EXTENSION, PROPERTY_LOG_EXTENSION, PROPERTY_LOG_EXTENSION_PARAM);
 		Map params = new HashMap(1);
 		params.put(PROPERTY_TARGET, TARGET_GATHER_LOGS);
 		params.put(PROPERTY_DESTINATION_TEMP_FOLDER, destinationTempFolder);
+		params.put(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION_PARAM), Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION));
 		script.printAntCallTask(TARGET_ALL_CHILDREN, false, params);
 		script.printTargetEnd();
 	}
@@ -255,10 +254,12 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 		script.printTargetDeclaration(TARGET_ZIP_LOGS, TARGET_INIT, null, null, null);
 		script.printDeleteTask(featureTempFolder, null, null);
 		script.printMkdirTask(featureTempFolder);
+		script.printConditionIsSet(PROPERTY_LOG_EXTENSION_PARAM, PROPERTY_LOG_EXTENSION, PROPERTY_LOG_EXTENSION, PROPERTY_LOG_EXTENSION_PARAM);
 		Map params = new HashMap(1);
 		params.put(PROPERTY_INCLUDE_CHILDREN, "true"); //$NON-NLS-1$
 		params.put(PROPERTY_TARGET, TARGET_GATHER_LOGS);
 		params.put(PROPERTY_DESTINATION_TEMP_FOLDER, new Path(featureTempFolder).append(DEFAULT_PLUGIN_LOCATION).toString());
+		params.put(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION_PARAM), Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION));
 		script.printAntCallTask(TARGET_ALL_CHILDREN, false, params);
 		IPath destination = new Path(Utils.getPropertyFormat(PROPERTY_FEATURE_DESTINATION)).append(featureFullName + ".log.zip"); //$NON-NLS-1$
 		script.printZipTask(destination.toString(), featureTempFolder, true, false, null);
@@ -298,10 +299,11 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 		script.println();
 		script.printTargetDeclaration(TARGET_PUBLISH_BIN_PARTS, TARGET_INIT, PROPERTY_P2_PUBLISH_PARTS, null, null);
 
-		String featureTemp = Utils.getPropertyFormat(PROPERTY_FEATURE_TEMP_FOLDER);
+		String featureTemp = Utils.getPropertyFormat(PROPERTY_FEATURE_TEMP_FOLDER) + '/' + featureFolderName;
+		script.printMkdirTask(featureTemp);
+
 		Map callbackParams = null;
 		if (customFeatureCallbacks != null) {
-			featureTemp += '/' + featureFullName;
 			callbackParams = new HashMap(1);
 			callbackParams.put(PROPERTY_DESTINATION_TEMP_FOLDER, new Path(Utils.getPropertyFormat(PROPERTY_FEATURE_BASE)).append(DEFAULT_PLUGIN_LOCATION).toString());
 			callbackParams.put(PROPERTY_FEATURE_DIRECTORY, featureTemp);
@@ -314,8 +316,6 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 
 		String exclude = (String) getBuildProperties().get(PROPERTY_BIN_EXCLUDES);
 
-		script.printMkdirTask(featureTemp);
-
 		FileSet fileSet = new FileSet(Utils.getPropertyFormat(PROPERTY_BASEDIR), null, include, null, exclude, null, null);
 		script.printCopyTask(null, featureTemp, new FileSet[] {fileSet}, true, true);
 		generateIdReplacerCall(featureTemp);
@@ -327,7 +327,7 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 		script.println("<eclipse.gatherFeature "); //$NON-NLS-1$
 		script.println("   metadataRepository=\"" + Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 		script.println("   artifactRepository=\"" + Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
-		if (customFeatureCallbacks != null && include != null)
+		if (customFeatureCallbacks != null)
 			script.println("   targetFolder=\"" + featureTemp + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 		else
 			script.println("   buildResultFolder=\"" + featureTemp + "\""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -400,8 +400,9 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 	 *  
 	 */
 	private void generateRootFilesAndPermissions() throws CoreException {
-		String product = generateProductFiles ? director.getProduct() : null;
-		if (product != null && !BuildDirector.p2Gathering) {
+		boolean generateEclipseProduct = Boolean.valueOf(getBuildProperties().getProperty(IBuildPropertiesConstants.PROPERTY_GENERATE_ECLIPSEPRODUCT)).booleanValue();
+		String product = (generateProductFiles || generateEclipseProduct) ? director.getProduct() : null;
+		if (product != null) {
 			ProductGenerator generator = new ProductGenerator();
 			generator.setProduct(product);
 			generator.setBuildSiteFactory(siteFactory);
@@ -410,7 +411,10 @@ public class FeatureBuildScriptGenerator extends AbstractScriptGenerator {
 			generator.setWorkingDirectory(getWorkingDirectory());
 			generator.setAssemblyInfo(director.getAssemblyData());
 			try {
-				generator.generate();
+				if (!BuildDirector.p2Gathering && generateProductFiles)
+					generator.generate();
+				else if (generateEclipseProduct)
+					generator.generateEclipseProduct();
 			} catch (CoreException e) {
 				//problem with the .product file
 				//TODO Log warning/error
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java
index bf53ed6..71fd74a 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -13,7 +13,8 @@ import java.io.*;
 import java.util.*;
 import java.util.jar.JarFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.*;
+import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.build.Constants;
 import org.eclipse.pde.internal.build.*;
@@ -21,6 +22,7 @@ import org.eclipse.pde.internal.build.ant.*;
 import org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.ClasspathElement;
 import org.eclipse.pde.internal.build.site.ProfileManager;
 import org.eclipse.pde.internal.build.site.compatibility.FeatureEntry;
+import org.osgi.framework.BundleException;
 import org.osgi.framework.Version;
 
 /**
@@ -111,6 +113,9 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 	private String customCallbacksBuildpath = null;
 	private String customCallbacksFailOnError = null;
 	private String customCallbacksInheritAll = null;
+	private String warningProperties = null;
+	// array of extensions of recognized source files (eg- *.java, *.aj, etc)
+	private String[] sourceFileExtensions;
 	//This list is initialized by the generateBuildJarsTarget
 	private ArrayList compiledJarNames;
 	private boolean dotOnTheClasspath = false;
@@ -119,6 +124,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 	private Map workspaceOutputFolders = null;
 
 	private boolean generateErrorPropertyAttribute = true;
+	private boolean sourceReferences = false;
 
 	/**
 	 * @see AbstractScriptGenerator#generate()
@@ -199,6 +205,18 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		customCallbacksFailOnError = properties.getProperty(PROPERTY_CUSTOM_CALLBACKS_FAILONERROR, FALSE);
 		customCallbacksInheritAll = properties.getProperty(PROPERTY_CUSTOM_CALLBACKS_INHERITALL);
 
+		// Bug 303960 determine all source files recognized in this bundle
+		String sourceFileExtensionsStr = properties.getProperty(PROPERTY_SOURCE_FILE_EXTENSIONS);
+		if (sourceFileExtensionsStr == null) {
+			sourceFileExtensions = DEFAULT_SOURCE_FILE_EXTENSIONS;
+		} else {
+			String[] sourceFileExtensionsArr = sourceFileExtensionsStr.split(","); //$NON-NLS-1$
+			sourceFileExtensions = new String[sourceFileExtensionsArr.length];
+			for (int i = 0; i < sourceFileExtensionsArr.length; i++) {
+				sourceFileExtensions[i] = sourceFileExtensionsArr[i].trim();
+			}
+		}
+
 		if (featureGenerator != null && featureGenerator.useWorkspaceBinaries() && havePDEUIState()) {
 			PDEUIStateWrapper wrapper = getSite(false).getSiteContentProvider().getInitialState();
 			if (wrapper != null && wrapper.getOutputFolders() != null) {
@@ -208,6 +226,16 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 				}
 			}
 		}
+
+		String projectWarningSettings = getBuildProperties().getProperty(PROPERTY_PROJECT_SETTINGS);
+		if (Boolean.valueOf(projectWarningSettings).booleanValue()) {
+			//find default prefs file
+			if (new File(model.getLocation(), JDT_CORE_PREFS).exists())
+				warningProperties = JDT_CORE_PREFS;
+		} else if (projectWarningSettings != null && !FALSE.equalsIgnoreCase(projectWarningSettings)) {
+			if (new File(model.getLocation(), projectWarningSettings).exists())
+				warningProperties = projectWarningSettings;
+		}
 	}
 
 	protected static boolean findAndReplaceDot(String[] classpathInfo) {
@@ -329,7 +357,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 				if (Utils.isBinary(plugin)) {
 					// this plug-in wasn't compiled, take source from the previous source plug-in
 					if (previousSrcRoot != null) {
-						File previousSrc = new File(previousSrcRoot, plugin.getSymbolicName() + '_' + plugin.getVersion());
+						File previousSrc = new File(previousSrcRoot, getNormalizedName(plugin));
 						if (previousSrc.exists()) {
 							FileSet[] fileSets = new FileSet[1];
 							fileSets[0] = new FileSet(previousSrc.getAbsolutePath(), null, "**/*", null, null, null, null); //$NON-NLS-1$
@@ -540,6 +568,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printAttribute("project", Utils.getPropertyFormat(PROPERTY_PROJECT_LOCATION), true); //$NON-NLS-1$
 		script.printAttribute("binary", Utils.getPropertyFormat(PROPERTY_BINARY_FOLDERS), true); //$NON-NLS-1$
 		script.printAttribute("target", Utils.getPropertyFormat(PROPERTY_TARGET_FOLDER), true); //$NON-NLS-1$
+		script.printAttribute("extramanifests", Utils.getPropertyFormat(PROPERTY_EXTRA_MANIFESTS), true); //$NON-NLS-1$
 		script.println("/>"); //$NON-NLS-1$
 		script.printTargetEnd();
 	}
@@ -573,11 +602,32 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 				}
 			}
 		}
+
 		Map params = new HashMap();
 		params.put(PROPERTY_PROJECT_NAME, Utils.getPropertyFormat(PROPERTY_BUNDLE_ID) + "_" + Utils.getPropertyFormat(PROPERTY_BUNDLE_VERSION)); //$NON-NLS-1$
 		params.put(PROPERTY_PROJECT_LOCATION, Utils.getPropertyFormat(PROPERTY_BASEDIR));
 		params.put(PROPERTY_BINARY_FOLDERS, binaryFolders.toString());
 		params.put(PROPERTY_TARGET_FOLDER, target);
+
+		HostSpecification host = model.getHost();
+		if (host != null && host.getSupplier() != null) {
+			BundleDescription hostBundle = host.getSupplier().getSupplier();
+			String hostLocation = hostBundle.getLocation();
+			String modelLocation = model.getLocation();
+			if (hostLocation != null && modelLocation != null) {
+				IPath location = null;
+				if (new File(hostLocation).isFile()) {
+					location = Utils.makeRelative(new Path(hostLocation), new Path(modelLocation));
+				} else {
+					IPath hostPath = new Path(hostLocation);
+					location = Utils.makeRelative(hostPath.append(JarFile.MANIFEST_NAME), new Path(modelLocation));
+				}
+				if (location.isAbsolute())
+					params.put(PROPERTY_EXTRA_MANIFESTS, location.toString());
+				else
+					params.put(PROPERTY_EXTRA_MANIFESTS, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + location.toString());
+			}
+		}
 		script.printAntCallTask(TARGET_API_GENERATION, true, params);
 	}
 
@@ -608,7 +658,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 			script.printCopyTask(null, Utils.getPropertyFormat(PROPERTY_BUILD_RESULT_FOLDER), new FileSet[] {metadata}, true, true);
 
 			if (Utils.isSourceBundle(model)) {
-				Set pluginsToGatherSourceFrom = (Set) featureGenerator.sourceToGather.getElementEntries().get(model.getSymbolicName());
+				Set pluginsToGatherSourceFrom = getPluginSourceProviders();
 				if (pluginsToGatherSourceFrom != null) {
 					for (Iterator iter = pluginsToGatherSourceFrom.iterator(); iter.hasNext();) {
 						BundleDescription plugin = (BundleDescription) iter.next();
@@ -749,7 +799,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		}
 
 		if (Utils.isSourceBundle(model)) {
-			Set pluginsToGatherSourceFrom = (Set) featureGenerator.sourceToGather.getElementEntries().get(model.getSymbolicName());
+			Set pluginsToGatherSourceFrom = getPluginSourceProviders();
 			if (pluginsToGatherSourceFrom != null) {
 				for (Iterator iter = pluginsToGatherSourceFrom.iterator(); iter.hasNext();) {
 					BundleDescription plugin = (BundleDescription) iter.next();
@@ -766,15 +816,72 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		generateAPIToolsCall(fileSetValues, dotIncluded, root);
 	}
 
+	private Set getPluginSourceProviders() throws CoreException {
+		Set pluginSet = (Set) featureGenerator.sourceToGather.getElementEntries().get(model.getSymbolicName());
+		if (pluginSet != null && pluginSet.size() > 0)
+			return pluginSet;
+
+		String sourceAttribute = getBuildProperties().getProperty(SOURCE_PLUGIN_ATTRIBUTE);
+		if (Boolean.valueOf(sourceAttribute).booleanValue())
+			return null;
+
+		String[] tokens = Utils.getArrayFromString(sourceAttribute, ";"); //$NON-NLS-1$
+		pluginSet = new HashSet();
+		for (int i = 0; i + 1 < tokens.length; i += 2) {
+			BundleDescription fromPlugin = getSite(false).getRegistry().getBundle(tokens[i], tokens[i + 1], true);
+			if (fromPlugin != null && !Utils.isBinary(fromPlugin))
+				pluginSet.add(fromPlugin);
+		}
+		return pluginSet;
+	}
+
 	private void genarateIdReplacementCall(String location) {
 		Properties bundleProperties = (Properties) model.getUserObject();
 		if (bundleProperties == null)
 			return;
 
 		String qualifier = bundleProperties.getProperty(PROPERTY_QUALIFIER);
-		if (qualifier == null)
+		String sourceReference = getSourceReference(bundleProperties);
+		if (qualifier == null && sourceReference == null)
 			return;
-		script.println("<eclipse.versionReplacer path=\"" + AntScript.getEscaped(location) + "\" version=\"" + model.getVersion() + "\"/>"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+		Map arguments = new HashMap();
+		arguments.put("path", AntScript.getEscaped(location)); //$NON-NLS-1$
+		if (qualifier != null)
+			arguments.put("version", model.getVersion().toString()); //$NON-NLS-1$
+		if (sourceReference != null)
+			arguments.put("attributes", ECLIPSE_SOURCE_REF + '|' + sourceReference); //$NON-NLS-1$
+		script.printElement("eclipse.versionReplacer", arguments); //$NON-NLS-1$
+	}
+
+	private String getSourceReference(Properties bundleProperties) {
+		String reference = (String) bundleProperties.get(PROPERTY_SOURCE_REFERENCE);
+		if (!sourceReferences || reference == null)
+			return null;
+
+		String originalEntry = (String) bundleProperties.get(ECLIPSE_SOURCE_REF);
+		if (originalEntry != null) {
+			try {
+				ManifestElement[] elements = ManifestElement.parseHeader(ECLIPSE_SOURCE_REF, originalEntry);
+				StringBuffer newEntry = new StringBuffer();
+				boolean changed = false;
+				for (int i = 0; i < elements.length; i++) {
+					if (i > 0)
+						newEntry.append(',');
+					if (elements[i].getValue().equals(PDE_SOURCE_REF)) {
+						newEntry.append(reference);
+						changed = true;
+					} else
+						newEntry.append(elements[i].toString());
+				}
+				return changed ? newEntry.toString() : null; //returning null is no change
+			} catch (BundleException e) {
+				// ignore
+			}
+		} else {
+			return reference;
+		}
+		return null;
 	}
 
 	private void generatePermissionProperties(String directory) throws CoreException {
@@ -907,7 +1014,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printTargetDeclaration(TARGET_INIT, TARGET_PROPERTIES, null, null, null);
 		script.printConditionIsSet(PROPERTY_PLUGIN_TEMP, Utils.getPropertyFormat(PROPERTY_BUILD_TEMP) + '/' + DEFAULT_PLUGIN_LOCATION, PROPERTY_BUILD_TEMP);
 		script.printProperty(PROPERTY_PLUGIN_TEMP, Utils.getPropertyFormat(PROPERTY_BASEDIR));
-		script.printConditionIsSet(PROPERTY_BUILD_RESULT_FOLDER, Utils.getPropertyFormat(PROPERTY_PLUGIN_TEMP) + '/' + model.getSymbolicName() + '_' + model.getVersion(), PROPERTY_BUILD_TEMP);
+		script.printConditionIsSet(PROPERTY_BUILD_RESULT_FOLDER, Utils.getPropertyFormat(PROPERTY_PLUGIN_TEMP) + '/' + getNormalizedName(model), PROPERTY_BUILD_TEMP);
 		script.printProperty(PROPERTY_BUILD_RESULT_FOLDER, Utils.getPropertyFormat(PROPERTY_BASEDIR));
 		script.printProperty(PROPERTY_TEMP_FOLDER, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + PROPERTY_TEMP_FOLDER);
 		script.printProperty(PROPERTY_PLUGIN_DESTINATION, Utils.getPropertyFormat(PROPERTY_BASEDIR));
@@ -917,7 +1024,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printConditionStart(PROPERTY_COMPILE_PROBLEM_MARKER_EXISTS, TRUE, null);
 		script.printStartTag("and"); //$NON-NLS-1$
 		script.printAvailableTask(null, Utils.getPropertyFormat(PROPERTY_COMPILE_PROBLEM_MARKER));
-		script.printIsFalse(PROPERTY_P2_PUBLISHONERROR);
+		script.printIsFalse(Utils.getPropertyFormat(PROPERTY_P2_PUBLISHONERROR));
 		script.printEndTag("and"); //$NON-NLS-1$
 		script.printEndCondition();
 
@@ -951,6 +1058,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printProperty(PROPERTY_JAVAC_VERBOSE, "false"); //$NON-NLS-1$
 		script.printProperty(PROPERTY_LOG_EXTENSION, ".log"); //$NON-NLS-1$
 		script.printProperty(PROPERTY_JAVAC_COMPILERARG, ""); //$NON-NLS-1$  
+		script.printProperty(PROPERTY_PREREQ_COMPILE_LOG, Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/prereqErrors.log"); //$NON-NLS-1$
 
 		if (javacSource == null)
 			script.printProperty(IXMLConstants.PROPERTY_JAVAC_SOURCE, "1.3"); //$NON-NLS-1$
@@ -1038,7 +1146,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 			//if there were no build.properties, then it is a binary plugin
 			binaryPlugin = true;
 		} else {
-			getCompiledElements().add(model.getSymbolicName());
+			getCompiledElements().add(getNormalizedName(model));
 		}
 		Properties bundleProperties = (Properties) model.getUserObject();
 		if (bundleProperties == null) {
@@ -1154,13 +1262,10 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 			script.printSubantTask(Utils.getPropertyFormat(PROPERTY_CUSTOM_BUILD_CALLBACKS), PROPERTY_POST + TARGET_BUILD_JARS, customCallbacksBuildpath, customCallbacksFailOnError, customCallbacksInheritAll, params, null);
 		}
 		script.printTargetEnd();
-
 		script.println();
-		script.printTargetDeclaration(TARGET_CHECK_COMPILATION_RESULTS, null, PROPERTY_COMPILATION_ERROR, null, null);
-		script.printEchoTask(Utils.getPropertyFormat(PROPERTY_COMPILE_PROBLEM_MARKER), pluginModel.getSymbolicName() + " : " + PROPERTY_COMPILATION_ERROR + "=" + Utils.getPropertyFormat(PROPERTY_COMPILATION_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
-		script.printTargetEnd();
 
-		script.println();
+		generateCheckCompilationTask(pluginModel);
+
 		script.printTargetDeclaration(TARGET_BUILD_SOURCES, TARGET_INIT, null, null, null);
 		if (customBuildCallbacks != null) {
 			script.printSubantTask(Utils.getPropertyFormat(PROPERTY_CUSTOM_BUILD_CALLBACKS), PROPERTY_PRE + TARGET_BUILD_SOURCES, customCallbacksBuildpath, customCallbacksFailOnError, customCallbacksInheritAll, params, null);
@@ -1177,6 +1282,52 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printTargetEnd();
 	}
 
+	private void generateCheckCompilationTask(BundleDescription pluginModel) throws CoreException {
+		script.printTargetDeclaration(TARGET_CHECK_COMPILATION_RESULTS, null, PROPERTY_COMPILATION_ERROR, null, null);
+		script.printEchoTask(Utils.getPropertyFormat(PROPERTY_COMPILE_PROBLEM_MARKER), getNormalizedName(pluginModel) + "${line.separator}" + PROPERTY_COMPILATION_ERROR + "=" + Utils.getPropertyFormat(PROPERTY_COMPILATION_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$
+
+		Map arguments = new HashMap();
+		arguments.put("bundle", getNormalizedName(pluginModel)); //$NON-NLS-1$
+		arguments.put("log", Utils.getPropertyFormat(PROPERTY_PREREQ_COMPILE_LOG)); //$NON-NLS-1$
+		script.printStartTag("eclipse.logCompileError", arguments); //$NON-NLS-1$
+		script.incrementIdent();
+		arguments.clear();
+		for (Iterator iter = getPrequisitePaths().iterator(); iter.hasNext();) {
+			arguments.put("name", iter.next().toString()); //$NON-NLS-1$
+			script.printElement("include", arguments); //$NON-NLS-1$
+		}
+		script.decrementIdent();
+		script.printEndTag("eclipse.logCompileError"); //$NON-NLS-1$
+
+		script.printTargetEnd();
+		script.println();
+	}
+
+	private List getPrequisitePaths() throws CoreException {
+		Properties properties = (Properties) model.getUserObject();
+		List results = new ArrayList();
+		if (properties != null) {
+			String required = properties.getProperty(PROPERTY_REQUIRED_BUNDLE_IDS);
+			if (required != null) {
+				State state = getSite(false).getRegistry().getState();
+				String[] ids = Utils.getArrayFromString(required, ":"); //$NON-NLS-1$
+				for (int i = 0; i < ids.length; i++) {
+					try {
+						BundleDescription bundle = state.getBundle(new Long(ids[i]).longValue());
+						if (bundle != null && !Utils.isBinary(bundle)) {
+							Path bundleLocation = new Path(bundle.getLocation());
+							results.add(bundleLocation.append("compilation.problem")); //$NON-NLS-1$
+							results.add(Utils.getPropertyFormat(PROPERTY_PLUGIN_TEMP) + '/' + getNormalizedName(bundle) + "/compilation.problem"); //$NON-NLS-1$
+						}
+					} catch (NumberFormatException e) {
+						//ignore
+					}
+				}
+			}
+		}
+		return results;
+	}
+
 	/**
 	 * generate compile settings for compiling this entry
 	 * warning levels, default encoding, custom encodings
@@ -1197,17 +1348,36 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 			return;
 
 		String name = entry.getName(false);
+
+		String excludes = properties.getProperty(PROPERTY_EXCLUDE_PREFIX + name);
+		if (excludes != null) {
+			javac.setExcludes(Utils.getArrayFromString(excludes, ",")); //$NON-NLS-1$
+		}
 		if (name.equals(EXPANDED_DOT))
 			name = DOT;
 
+		// Bug 303960 potentially use a custom compiler adapter
+		String compilerAdapter = properties.getProperty(PROPERTY_COMPILER_ADAPTER);
+		if (compilerAdapter != null) {
+			javac.setCompilerAdapter(compilerAdapter);
+			javac.setAdapterUseLog(Boolean.valueOf(properties.getProperty(PROPERTY_ADAPTER_USELOG, TRUE)).booleanValue());
+			javac.setAdapterArgFile(Boolean.valueOf(properties.getProperty(PROPERTY_ADAPTER_USEARGFILE, TRUE)).booleanValue());
+		}
+
+		// Bug 303960 get compilerArg property
+		String compilerArg = properties.getProperty(PROPERTY_JAVAC_COMPILERARG);
+		if (compilerArg != null)
+			javac.setSpecificCompileArgs(compilerArg);
+
 		String defaultEncodingVal = properties.getProperty(PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX + name);
 		if (defaultEncodingVal != null)
 			javac.setEncoding(defaultEncodingVal);
 
 		String customEncodingsVal = properties.getProperty(PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX + name);
 		String warningLevels = properties.getProperty(PROPERTY_JAVAC_WARNINGS_PREFIX + name);
+		String errorLevels = properties.getProperty(PROPERTY_JAVAC_ERRORS_PREFIX + name);
 
-		if (customEncodingsVal == null && warningLevels == null && classpath.size() == 0) {
+		if (customEncodingsVal == null && warningLevels == null && errorLevels == null && classpath.size() == 0) {
 			return;
 		}
 
@@ -1220,13 +1390,17 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		try {
 			try {
 				//only create the file if we are going to write something in it
-				if (warningLevels != null || customEncodingsVal != null)
+				if (warningLevels != null || customEncodingsVal != null || errorLevels != null)
 					writer = new BufferedWriter(new FileWriter(file));
 
 				if (warningLevels != null) {
 					writer.write("-warn:" + warningLevels + "\n"); //$NON-NLS-1$//$NON-NLS-2$
 				}
 
+				if (errorLevels != null) {
+					writer.write("-err:" + errorLevels + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+
 				if (customEncodingsVal != null) {
 					String[] encodings = customEncodingsVal.split(","); //$NON-NLS-1$
 					if (encodings.length > 0) {
@@ -1333,6 +1507,8 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 			javac.setCompileArgs(Utils.getPropertyFormat(PROPERTY_JAVAC_COMPILERARG));
 			javac.setSrcdir(sources);
 			javac.setLogExtension(Utils.getPropertyFormat(PROPERTY_LOG_EXTENSION));
+			if (warningProperties != null)
+				javac.setWarningProperties(Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + warningProperties);
 			if (generateErrorPropertyAttribute)
 				javac.setErrorProperty(PROPERTY_COMPILATION_ERROR);
 			generateCompilerSettings(javac, entry, classpath);
@@ -1345,7 +1521,12 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printComment("Copy necessary resources"); //$NON-NLS-1$
 		FileSet[] fileSets = new FileSet[sources.length];
 		for (int i = 0; i < sources.length; i++) {
-			String excludes = "**/*.java, **/package.htm*"; //$NON-NLS-1$
+			String excludes = getFormattedSourceFileExtensions();
+			if (excludes.length() > 0) {
+				excludes += ", **/package.htm*"; //$NON-NLS-1$
+			} else {
+				excludes = "**/package.htm*"; //$NON-NLS-1$
+			}
 			String excludedFromJar = entry.getExcludedFromJar();
 			if (excludedFromJar != null)
 				excludes += ',' + excludedFromJar;
@@ -1478,7 +1659,7 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		int count = 0;
 		for (int i = 0; i < sources.length; i++) {
 			if (sources[i] != null)
-				fileSets[count++] = new FileSet(sources[i], null, "**/*.java", null, null, null, null); //$NON-NLS-1$
+				fileSets[count++] = new FileSet(sources[i], null, getFormattedSourceFileExtensions(), null, null, null, null);
 		}
 
 		String srcLocation = getSRCLocation(name);
@@ -1505,6 +1686,20 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 		script.printTargetEnd();
 	}
 
+	/**
+	 * @return list of source extensions recognized by the bundle
+	 */
+	private String getFormattedSourceFileExtensions() {
+		StringBuffer sb = new StringBuffer();
+		for (int i = 0; i < sourceFileExtensions.length; i++) {
+			if (i > 0) {
+				sb.append(", "); //$NON-NLS-1$
+			}
+			sb.append("**/").append(sourceFileExtensions[i]); //$NON-NLS-1$
+		}
+		return sb.toString();
+	}
+
 	private void filterNonExistingSourceFolders(String[] sources) {
 		File pluginRoot;
 		pluginRoot = new File(getLocation(model));
@@ -1675,4 +1870,8 @@ public class ModelBuildScriptGenerator extends AbstractBuildScriptGenerator {
 	protected void setWorkspaceOutputFolders(Map folders) {
 		this.workspaceOutputFolders = folders;
 	}
+
+	public void setGenerateSourceReferences(boolean sourceReferences) {
+		this.sourceReferences = sourceReferences;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/SourceGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/SourceGenerator.java
index a38bfea..3694a90 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/SourceGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/SourceGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -14,8 +14,7 @@ package org.eclipse.pde.internal.build.builder;
 import java.io.*;
 import java.net.URL;
 import java.util.*;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
+import java.util.jar.*;
 import java.util.jar.Attributes.Name;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
@@ -193,7 +192,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 			} else if (extraEntries[i].startsWith("plugin@")) { //$NON-NLS-1$
 				model = getSite().getRegistry().getResolvedBundle((String) items.get(Utils.EXTRA_ID), ((Version) items.get(Utils.EXTRA_VERSION)).toString());
 				if (model == null) {
-					IStatus status = getSite().missingPlugin(id, version.toString(), false);
+					IStatus status = getSite().missingPlugin(id, version.toString(), null, false);
 					BundleHelper.getDefault().getLog().log(status);
 					continue;
 				}
@@ -332,15 +331,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 			sourceBuildProperties.put(PROPERTY_BIN_INCLUDES, Utils.getStringFromCollection(copiedFiles, ",")); //$NON-NLS-1$
 			sourceBuildProperties.put(SOURCE_PLUGIN_ATTRIBUTE, "true"); //$NON-NLS-1$
 			try {
-				OutputStream buildFile = new BufferedOutputStream(new FileOutputStream(buildProperty));
-				try {
-					sourceBuildProperties.store(buildFile, null);
-				} finally {
-					buildFile.close();
-				}
-			} catch (FileNotFoundException e) {
-				String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
-				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
+				Utils.writeProperties(sourceBuildProperties, buildProperty, null);
 			} catch (IOException e) {
 				String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
 				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
@@ -413,15 +404,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 				sourceBuildProperties.put(PROPERTY_BIN_INCLUDES, Utils.getStringFromCollection(copiedFiles, ",")); //$NON-NLS-1$
 				sourceBuildProperties.put("sourcePlugin", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 				try {
-					OutputStream buildFile = new BufferedOutputStream(new FileOutputStream(buildProperty));
-					try {
-						sourceBuildProperties.store(buildFile, null);
-					} finally {
-						buildFile.close();
-					}
-				} catch (FileNotFoundException e) {
-					String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
-					throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
+					Utils.writeProperties(sourceBuildProperties, buildProperty, null);
 				} catch (IOException e) {
 					String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
 					throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
@@ -480,15 +463,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 				sourceBuildProperties.put(PROPERTY_BIN_INCLUDES, Utils.getStringFromCollection(copiedFiles, ",")); //$NON-NLS-1$
 				sourceBuildProperties.put("sourcePlugin", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 				try {
-					OutputStream buildFile = new BufferedOutputStream(new FileOutputStream(buildProperty));
-					try {
-						sourceBuildProperties.store(buildFile, null);
-					} finally {
-						buildFile.close();
-					}
-				} catch (FileNotFoundException e) {
-					String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
-					throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
+					Utils.writeProperties(sourceBuildProperties, buildProperty, null);
 				} catch (IOException e) {
 					String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
 					throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
@@ -535,17 +510,8 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 		copiedFiles.add(Constants.FEATURE_FILENAME_DESCRIPTOR); //Because the feature.xml is not copied, we need to add it to the file
 		Properties sourceBuildProperties = new Properties();
 		sourceBuildProperties.put(PROPERTY_BIN_INCLUDES, Utils.getStringFromCollection(copiedFiles, ",")); //$NON-NLS-1$
-		OutputStream output = null;
 		try {
-			output = new BufferedOutputStream(new FileOutputStream(buildProperty));
-			try {
-				sourceBuildProperties.store(output, null);
-			} finally {
-				output.close();
-			}
-		} catch (FileNotFoundException e) {
-			String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
-			throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
+			Utils.writeProperties(sourceBuildProperties, buildProperty, null);
 		} catch (IOException e) {
 			String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
 			throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
@@ -616,7 +582,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 	private FeatureEntry createSourceBundle(BuildTimeFeature sourceFeature, FeatureEntry pluginEntry) throws CoreException {
 		BundleDescription bundle = getSite().getRegistry().getBundle(pluginEntry.getId(), pluginEntry.getVersion(), true);
 		if (bundle == null) {
-			getSite().missingPlugin(pluginEntry.getId(), pluginEntry.getVersion(), true);
+			getSite().missingPlugin(pluginEntry.getId(), pluginEntry.getVersion(), null, true);
 		}
 
 		if (excludedEntries != null && excludedEntries.containsKey(bundle.getSymbolicName())) {
@@ -771,17 +737,15 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 		localizationEntry = localization + ".properties"; //$NON-NLS-1$
 		File localizationFile = new File(sourcePluginDirURL.toFile(), localizationEntry);
 		try {
-			localizationFile.getParentFile().mkdirs();
-			localizationProperties.store(new BufferedOutputStream(new FileOutputStream(localizationFile)), "#Source Bundle Localization"); //$NON-NLS-1$
+			Utils.writeProperties(localizationProperties, localizationFile, "#Source Bundle Localization"); //$NON-NLS-1$
 		} catch (IOException e) {
 			//	what?
 		}
 
 		File manifestFile = new File(sourcePluginDirURL.toFile(), Constants.BUNDLE_FILENAME_DESCRIPTOR);
 		manifestFile.getParentFile().mkdirs();
-		BufferedOutputStream out = null;
 		try {
-			out = new BufferedOutputStream(new FileOutputStream(manifestFile));
+			OutputStream out = new BufferedOutputStream(new FileOutputStream(manifestFile));
 			try {
 				manifest.write(out);
 			} finally {
@@ -794,7 +758,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 
 		// if this source bundle  will be the branding plug-in for the source feature, use the old plug-in template directory
 		String template = sourceEntry.getId().equals(brandingPlugin) ? "sourceTemplatePlugin" : "sourceTemplateBundle"; //$NON-NLS-1$ //$NON-NLS-2$
-		generateSourceFiles(sourcePluginDirURL, sourceEntry, template, localizationEntry);
+		generateSourceFiles(sourcePluginDirURL, sourceEntry, template, localizationEntry, originalBundle);
 
 		PDEState state = getSite().getRegistry();
 		BundleDescription oldBundle = state.getResolvedBundle(sourceEntry.getId(), sourceEntry.getVersion());
@@ -852,7 +816,7 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 		}
 
 		//Copy the other files
-		generateSourceFiles(sourcePluginDirURL, result, "sourceTemplatePlugin", null); //$NON-NLS-1$
+		generateSourceFiles(sourcePluginDirURL, result, "sourceTemplatePlugin", null, null); //$NON-NLS-1$
 
 		PDEState state = getSite().getRegistry();
 		BundleDescription oldBundle = state.getResolvedBundle(result.getId());
@@ -881,13 +845,15 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 		return result;
 	}
 
-	private void generateSourceFiles(IPath sourcePluginDirURL, FeatureEntry sourceEntry, String templateDir, String extraFiles) throws CoreException {
+	private void generateSourceFiles(IPath sourcePluginDirURL, FeatureEntry sourceEntry, String templateDir, String extraFiles, BundleDescription originalBundle) throws CoreException {
 		Collection copiedFiles = Utils.copyFiles(featureRootLocation + '/' + templateDir, sourcePluginDirURL.toFile().getAbsolutePath());
 		if (copiedFiles.contains(Constants.BUNDLE_FILENAME_DESCRIPTOR)) {
 			//make sure the manifest.mf has the version we want
 			replaceManifestValue(sourcePluginDirURL.append(Constants.BUNDLE_FILENAME_DESCRIPTOR).toOSString(), org.osgi.framework.Constants.BUNDLE_VERSION, sourceEntry.getVersion());
 		}
 
+		String original = originalBundle != null ? originalBundle.getSymbolicName() + ';' + originalBundle.getVersion().toString() : "true"; //$NON-NLS-1$
+
 		//	If a build.properties file already exist then we use it supposing it is correct.
 		File buildProperty = sourcePluginDirURL.append(PROPERTIES_FILE).toFile();
 		if (!buildProperty.exists()) {
@@ -899,21 +865,21 @@ public class SourceGenerator implements IPDEBuildConstants, IBuildPropertiesCons
 			if (extraFiles != null)
 				binIncludes += "," + extraFiles; //$NON-NLS-1$
 			sourceBuildProperties.put(PROPERTY_BIN_INCLUDES, binIncludes);
-			sourceBuildProperties.put(SOURCE_PLUGIN_ATTRIBUTE, "true"); //$NON-NLS-1$
+			sourceBuildProperties.put(SOURCE_PLUGIN_ATTRIBUTE, original);
 			try {
-				OutputStream buildFile = new BufferedOutputStream(new FileOutputStream(buildProperty));
-				try {
-					sourceBuildProperties.store(buildFile, null);
-				} finally {
-					buildFile.close();
-				}
-			} catch (FileNotFoundException e) {
-				String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
-				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
+				Utils.writeProperties(sourceBuildProperties, buildProperty, null);
 			} catch (IOException e) {
 				String message = NLS.bind(Messages.exception_writingFile, buildProperty.getAbsolutePath());
 				throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_WRITING_FILE, message, e));
 			}
+		} else if (originalBundle != null) {
+			Properties props = AbstractScriptGenerator.readProperties(sourcePluginDirURL.toOSString(), PROPERTIES_FILE, IStatus.OK);
+			props.put(SOURCE_PLUGIN_ATTRIBUTE, original);
+			try {
+				Utils.writeProperties(props, buildProperty, null);
+			} catch (IOException e) {
+				//ignore
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java
index 98237bb..c95350d 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Gunnar Wagenknecht - adaption to new fetch script builder API
  *******************************************************************************/
@@ -139,7 +139,7 @@ public class CVSFetchTaskFactory implements IFetchFactory {
 			String tag = (String) entryInfos.get(IFetchFactory.KEY_ELEMENT_TAG);
 			String cvsRoot = (String) entryInfos.get(KEY_CVSROOT);
 			String dest = "true".equalsIgnoreCase((String) entryInfos.get(KEY_PREBUILT)) ? destination.removeLastSegments(1).toString() : destination.toString(); //$NON-NLS-1$
-			printCVSTask("export -r " + tag + ' ' + filePath.toString(), cvsRoot, dest, null, null, "true", Utils.getPropertyFormat(PROP_REALLYQUIET), null, null, "${fetch.failonerror}", script); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-5$
+			printCVSTask("export -r " + tag + ' ' + filePath.toString(), cvsRoot, dest, null, null, "true", Utils.getPropertyFormat(PROP_REALLYQUIET), null, null, "${fetch.failonerror}", script); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 			script.println("<move file=\"" + destination + '/' + filePath + "\"" + " tofile=\"" + destination.append(file) + "\" failonerror=\"false\" />"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
 	}
@@ -180,6 +180,7 @@ public class CVSFetchTaskFactory implements IFetchFactory {
 			int index = arg.indexOf('=');
 			if (index == -1) {
 				legacyParseMapFileEntry(arguments, overrideTags, entryInfos);
+				addProjectReference(entryInfos);
 				return;
 			}
 			String key = arg.substring(0, index);
@@ -197,6 +198,99 @@ public class CVSFetchTaskFactory implements IFetchFactory {
 		entryInfos.put(KEY_PASSWORD, table.get(KEY_PASSWORD));
 		entryInfos.put(KEY_PATH, table.get(KEY_PATH));
 		entryInfos.put(KEY_PREBUILT, table.get(KEY_PREBUILT));
+		addProjectReference(entryInfos);
+	}
+
+	private void addProjectReference(Map entryInfos) {
+		String repoLocation = (String) entryInfos.get(KEY_CVSROOT);
+		String module = (String) entryInfos.get(KEY_PATH);
+		String projectName = (String) entryInfos.get(KEY_ELEMENT_NAME);
+		String tag = (String) entryInfos.get(IFetchFactory.KEY_ELEMENT_TAG);
+
+		if (repoLocation != null && projectName != null) {
+			String sourceURLs = asReference(repoLocation, module != null ? module : projectName, projectName, tag);
+			if (sourceURLs != null) {
+				entryInfos.put(Constants.KEY_SOURCE_REFERENCES, sourceURLs);
+			}
+		}
+	}
+
+	/**
+	 * Creates an SCMURL reference to the associated source.
+	 * 
+	 * @param repoLocation
+	 * @param module
+	 * @param projectName
+	 * @return project reference string or <code>null</code> if none
+	 */
+	private String asReference(String repoLocation, String module, String projectName, String tagName) {
+		// parse protocol, host, repository root from repoLocation
+		String protocol = null;
+		String host = null;
+		String root = null;
+
+		int at = repoLocation.indexOf('@');
+		if (at < 0) {
+			// should be a local protocol
+			if (repoLocation.startsWith(":local:")) { //$NON-NLS-1$
+				protocol = "local"; //$NON-NLS-1$
+				root = repoLocation.substring(7);
+			}
+		} else if (at < (repoLocation.length() - 2)) {
+			String serverRoot = repoLocation.substring(at + 1);
+			String protocolUserPass = repoLocation.substring(0, at);
+			int colon = serverRoot.indexOf(':');
+			if (colon > 0) {
+				host = serverRoot.substring(0, colon);
+				if (colon < (serverRoot.length() - 2)) {
+					root = serverRoot.substring(colon + 1);
+				}
+				if (protocolUserPass.startsWith(":")) { //$NON-NLS-1$
+					colon = protocolUserPass.indexOf(':', 1);
+					if (colon > 0) {
+						protocol = protocolUserPass.substring(1, colon);
+					}
+				} else {
+					// missing protocol, assume p-server
+					protocol = "pserver"; //$NON-NLS-1$
+				}
+			}
+		}
+
+		if (protocol == null || root == null) {
+			return null; // invalid syntax
+		}
+
+		// use '|' as separator if the root location uses a colon for a Windows path
+		String sep = ":"; //$NON-NLS-1$
+		if (root.indexOf(':') >= 0) {
+			sep = "|"; //$NON-NLS-1$
+		}
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("scm:cvs"); //$NON-NLS-1$
+		buffer.append(sep);
+		buffer.append(protocol);
+		buffer.append(sep);
+		if (host != null) {
+			buffer.append(host);
+			buffer.append(sep);
+		}
+		buffer.append(root);
+		buffer.append(sep);
+		buffer.append(module);
+
+		Path modulePath = new Path(module);
+		if (!modulePath.lastSegment().equals(projectName)) {
+			buffer.append(";project=\""); //$NON-NLS-1$
+			buffer.append(projectName);
+			buffer.append('"');
+		}
+
+		if (tagName != null && !tagName.equals("HEAD")) { //$NON-NLS-1$
+			buffer.append(";tag="); //$NON-NLS-1$
+			buffer.append(tagName);
+		}
+		return buffer.toString();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/GETFetchFactory.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/GETFetchFactory.java
index a002d9f..2cd5588 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/GETFetchFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/GETFetchFactory.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -42,10 +42,12 @@ public class GETFetchFactory implements IFetchFactory {
 	private static final String UNPACK = "unpack"; //$NON-NLS-1$
 	private static final String SEPARATOR = ","; //$NON-NLS-1$
 	private static final String TASK_GET = "get"; //$NON-NLS-1$
+	private static final String TASK_MKDIR = "mkdir"; //$NON-NLS-1$
 	private static final String TASK_DELETE = "delete"; //$NON-NLS-1$
 	private static final String TASK_UNZIP = "unzip"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_SRC = "src"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_DEST = "dest"; //$NON-NLS-1$
+	private static final String ATTRIBUTE_DIR = "dir"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_FILE = "file"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_VERBOSE = "verbose"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_IGNORE_ERRORS = "ignoreerrors"; //$NON-NLS-1$
@@ -115,15 +117,23 @@ public class GETFetchFactory implements IFetchFactory {
 		int index = src.lastIndexOf('/');
 		String filename = index == -1 ? src : src.substring(index);
 
+		String dest = (String) entryInfos.get(ATTRIBUTE_DEST);
+		if (dest != null) {
+			//if a dest was specified, make sure the parent directory exists
+			script.printTabs();
+			script.print(TAG_OPEN + TASK_MKDIR);
+			script.printAttribute(ATTRIBUTE_DIR, new Path(dest).removeLastSegments(1).toOSString(), true);
+			script.print(TAG_CLOSE);
+			script.println();
+		} else {
+			// "dest" attribute is mandatory
+			dest = destination.removeLastSegments(1).append(filename).toOSString();
+		}
+
 		// "src" attribute is mandatory
 		script.printTabs();
 		script.print(TAG_OPEN + TASK_GET);
 		script.printAttribute(ATTRIBUTE_SRC, src, true);
-
-		// "dest" attribute is mandatory
-		String dest = (String) entryInfos.get(ATTRIBUTE_DEST);
-		if (dest == null)
-			dest = destination.removeLastSegments(1).append(filename).toOSString();
 		script.printAttribute(ATTRIBUTE_DEST, dest, true);
 
 		// the rest of the attributes are optional so check if they exist before writing in the file
@@ -151,10 +161,19 @@ public class GETFetchFactory implements IFetchFactory {
 		// if we have a feature or un-packed plug-in then we need to unzip it
 		boolean unpack = Boolean.valueOf((String) entryInfos.get(UNPACK)).booleanValue();
 		if (unpack || ELEMENT_TYPE_FEATURE.equals(entryInfos.get(KEY_ELEMENT_TYPE))) {
+			Path destPath = new Path(dest);
+			String unzipped = destPath.removeLastSegments(1).toOSString();
+			if (destPath.getFileExtension().equalsIgnoreCase("jar")) { //$NON-NLS-1$
+				unzipped = destPath.removeFileExtension().toOSString();
+				script.printTabs();
+				script.print(TAG_OPEN + TASK_MKDIR);
+				script.printAttribute(ATTRIBUTE_DIR, unzipped, true);
+				script.print(TAG_CLOSE);
+			}
 			script.printTabs();
 			script.print(TAG_OPEN + TASK_UNZIP);
 			script.printAttribute(ATTRIBUTE_SRC, dest, true);
-			script.printAttribute(ATTRIBUTE_DEST, new Path(dest).removeLastSegments(1).toOSString(), true);
+			script.printAttribute(ATTRIBUTE_DEST, unzipped, true);
 			script.print(TAG_CLOSE);
 
 			script.printTabs();
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java
index be8d436..a36eb4d 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/P2IUFetchFactory.java
@@ -1,16 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.fetch;
 
+import java.io.File;
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.build.IAntScript;
@@ -24,6 +26,43 @@ import org.eclipse.pde.internal.build.*;
  */
 public class P2IUFetchFactory implements IFetchFactory {
 
+	private static class IUFetchInfo {
+		String id, version;
+
+		public IUFetchInfo(String id, String version) {
+			this.id = id;
+			this.version = version;
+		}
+
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result + ((id == null) ? 0 : id.hashCode());
+			result = prime * result + ((version == null) ? 0 : version.hashCode());
+			return result;
+		}
+
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null || getClass() != obj.getClass())
+				return false;
+
+			IUFetchInfo other = (IUFetchInfo) obj;
+			if (id == null) {
+				if (other.id != null)
+					return false;
+			} else if (!id.equals(other.id))
+				return false;
+			if (version == null) {
+				if (other.version != null)
+					return false;
+			} else if (!version.equals(other.version))
+				return false;
+			return true;
+		}
+	}
+
 	private static final String ATTRIBUTE_DESTINATION = "destination"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
 	private static final String ATTRIBUTE_SOURCE = "source"; //$NON-NLS-1$
@@ -34,6 +73,9 @@ public class P2IUFetchFactory implements IFetchFactory {
 	private static final String SEPARATOR = ","; //$NON-NLS-1$
 	private static final String TASK_IU = "iu"; //$NON-NLS-1$
 	private static final String TASK_REPO2RUNNABLE = "p2.repo2runnable"; //$NON-NLS-1$
+	private static final String TARGET_GET_IUS_FROM_REPO = "FetchIUsFromRepo"; //$NON-NLS-1$
+
+	private final Map iusToFetchBySource = new LinkedHashMap(2);
 
 	/*
 	 * Helper method to throw an exception with the given message.
@@ -46,39 +88,116 @@ public class P2IUFetchFactory implements IFetchFactory {
 	 * @see org.eclipse.pde.build.IFetchFactory#addTargets(org.eclipse.pde.build.IAntScript)
 	 */
 	public void addTargets(IAntScript script) {
+		// single target to fetch all IUs from different repos
 		//
+		// <p2.repo2runnable source="source1" destination="${trasnformedRepoLocation}">
+		//    <iu id="aBundle" version="1" />
+		//    ...
+		// </p2.repo2runnable>
+		// <p2.repo2runnable source="source2" destination="${transformedRepoLocation}">
+		//    <iu id="bBundle" version="2" />
+		//    ...
+		// </p2.repo2runnable>
+		// ...
+		script.println();
+		script.printTargetDeclaration(TARGET_GET_IUS_FROM_REPO, null, null, null, null);
+
+		Map args = new LinkedHashMap(2);
+		for (Iterator stream = iusToFetchBySource.entrySet().iterator(); stream.hasNext();) {
+			Entry entry = (Entry) stream.next();
+			String sourceRepository = (String) entry.getKey();
+			List iusToFetch = (List) entry.getValue();
+
+			script.printEchoTask(null, NLS.bind(Messages.fetching_p2Repo, new String[] {sourceRepository, Utils.getPropertyFormat(IBuildPropertiesConstants.PROPERTY_TRANSFORMED_REPO)}), "info"); //$NON-NLS-1$
+			args.clear();
+			args.put(ATTRIBUTE_SOURCE, sourceRepository);
+			args.put(ATTRIBUTE_DESTINATION, Utils.getPropertyFormat(IBuildPropertiesConstants.PROPERTY_TRANSFORMED_REPO));
+			script.printStartTag(TASK_REPO2RUNNABLE, args);
+			script.incrementIdent();
+
+			for (Iterator stream2 = iusToFetch.iterator(); stream2.hasNext();) {
+				IUFetchInfo iuFetchInfo = (IUFetchInfo) stream2.next();
+				args.clear();
+				args.put(ATTRIBUTE_ID, iuFetchInfo.id);
+				args.put(ATTRIBUTE_VERSION, iuFetchInfo.version);
+				script.printElement(TASK_IU, args);
+			}
+
+			script.decrementIdent();
+			script.printEndTag(TASK_REPO2RUNNABLE);
+			script.println();
+
+		}
+
+		script.printTargetEnd();
+		script.println();
+
+		// clear the map
+		iusToFetchBySource.clear();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.build.IFetchFactory#generateRetrieveElementCall(java.util.Map, org.eclipse.core.runtime.IPath, org.eclipse.pde.build.IAntScript)
 	 */
 	public void generateRetrieveElementCall(Map entryInfos, IPath destination, IAntScript script) {
-		// <p2.transform source="${source}" destination="${destination}">
-		//    <iu id="aBundle" version="1" />
-		// </p2.transform>
-		script.println();
-		script.print('<' + TASK_REPO2RUNNABLE);
-		// TODO ensure this is the right value to set. 
-		// TODO also we might need to put the real expanded path here.
-		script.printAttribute(ATTRIBUTE_DESTINATION, "${transformedRepoLocation}", true);
-		script.printAttribute(ATTRIBUTE_SOURCE, (String) entryInfos.get(KEY_REPOSITORY), true);
-		script.println(">"); //$NON-NLS-1$
-
-		script.print("<"); //$NON-NLS-1$
-		script.print(TASK_IU);
-		script.printAttribute(ATTRIBUTE_ID, (String) entryInfos.get(KEY_ID), true);
-		script.printAttribute(ATTRIBUTE_VERSION, (String) entryInfos.get(KEY_VERSION), true);
-		script.println("/>"); //$NON-NLS-1$
+		// generate at most one fetch call
+		if (iusToFetchBySource.isEmpty()) {
+			// <antcall target="FetchIUsFromRepo" />
+			script.printAntCallTask(TARGET_GET_IUS_FROM_REPO, true, null);
+		}
+
+		// collect the IU and repo to fetch from for single fetch call later
+		String sourceRepository = (String) entryInfos.get(KEY_REPOSITORY);
+
+		if (!iusToFetchBySource.containsKey(sourceRepository)) {
+			iusToFetchBySource.put(sourceRepository, new ArrayList());
+		}
+
+		IUFetchInfo iuFetchInfo = new IUFetchInfo((String) entryInfos.get(KEY_ID), (String) entryInfos.get(KEY_VERSION));
+
+		List iusToFetch = (List) iusToFetchBySource.get(sourceRepository);
+		if (!iusToFetch.contains(iuFetchInfo))
+			iusToFetch.add(iuFetchInfo);
 
-		script.printEndTag(TASK_REPO2RUNNABLE);
-		script.println();
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.build.IFetchFactory#generateRetrieveFilesCall(java.util.Map, org.eclipse.core.runtime.IPath, java.lang.String[], org.eclipse.pde.build.IAntScript)
 	 */
 	public void generateRetrieveFilesCall(Map entryInfos, IPath destination, String[] files, IAntScript script) {
-		// 
+		Map args = new HashMap();
+		args.put(ATTRIBUTE_SOURCE, entryInfos.get(KEY_REPOSITORY));
+		args.put(ATTRIBUTE_DESTINATION, destination.toOSString());
+		script.printStartTag(TASK_REPO2RUNNABLE, args);
+		script.incrementIdent();
+		args.clear();
+		args.put(ATTRIBUTE_ID, entryInfos.get(KEY_ID));
+		args.put(ATTRIBUTE_VERSION, entryInfos.get(KEY_VERSION));
+		script.printElement(TASK_IU, args);
+		script.decrementIdent();
+		script.printEndTag(TASK_REPO2RUNNABLE);
+		script.println();
+
+		//create a dummy build.properties file which will be overwritten if the feature actually contains one
+		args.clear();
+		args.put("message", "#empty"); //$NON-NLS-1$ //$NON-NLS-2$
+		args.put("file", new File(destination.toFile(), "build.properties").getAbsolutePath()); //$NON-NLS-1$//$NON-NLS-2$
+		script.printElement("echo", args); //$NON-NLS-1$
+
+		//move the files to the destination
+		args.clear();
+		args.put("todir", destination.toOSString()); //$NON-NLS-1$
+		args.put("flatten", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+		script.printStartTag("move", args); //$NON-NLS-1$
+		script.incrementIdent();
+		args.clear();
+		args.put("dir", destination.toOSString()); //$NON-NLS-1$
+		for (int i = 0; i < files.length; i++) {
+			args.put("includes", "features/*/" + files[i]); //$NON-NLS-1$ //$NON-NLS-2$
+			script.printElement("fileset", args); //$NON-NLS-1$
+		}
+		script.decrementIdent();
+		script.printEndTag("move"); //$NON-NLS-1$
 	}
 
 	/* (non-Javadoc)
@@ -86,9 +205,6 @@ public class P2IUFetchFactory implements IFetchFactory {
 	 */
 	public void parseMapFileEntry(String rawEntry, Properties overrideTags, Map entryInfos) throws CoreException {
 		String[] arguments = Utils.getArrayFromStringWithBlank(rawEntry, SEPARATOR);
-		// we need an IU id, version, and repository
-		if (arguments.length < 3)
-			throwException(NLS.bind(Messages.error_incorrectDirectoryEntry, entryInfos.get(KEY_ELEMENT_NAME)), null);
 
 		// build up the table of arguments in the map file entry
 		Map table = new HashMap();
@@ -104,8 +220,15 @@ public class P2IUFetchFactory implements IFetchFactory {
 		}
 
 		entryInfos.put(KEY_ID, table.get(KEY_ID));
-		entryInfos.put(KEY_VERSION, table.get(KEY_VERSION));
+		if (table.containsKey(KEY_VERSION))
+			entryInfos.put(KEY_VERSION, table.get(KEY_VERSION));
+		else
+			entryInfos.put(KEY_VERSION, ""); //$NON-NLS-1$
 		entryInfos.put(KEY_REPOSITORY, table.get(KEY_REPOSITORY));
+
+		// we need an IU id, and repository
+		if (entryInfos.get(KEY_ID) == null || entryInfos.get(KEY_REPOSITORY) == null)
+			throwException(NLS.bind(Messages.error_directoryEntryRequiresIdAndRepo, entryInfos.get(KEY_ELEMENT_NAME)), null);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/messages.properties b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/messages.properties
index 7a87b7d..bcf2158 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/messages.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2003, 2009 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
@@ -21,6 +21,7 @@ warning_ant171Required = Warning: Ant 1.7.1 or greater is required to use \"{0}\
 error_pluginCycle = A cycle was detected when generating the classpath {0}.
 error_missingDirectoryEntry = Missing directory entry: {0}.
 error_incorrectDirectoryEntry = Incorrect directory entry: {0}.
+error_directoryEntryRequiresIdAndRepo = Incorrect directory entry for {0}, both an id and a repository are required.
 error_missingElement = Element must be specified.
 error_missingFeatureId = Feature id must be specified.
 error_missingInstallLocation = Install location must be specified.
@@ -89,3 +90,7 @@ unsatisfied_import = Unsatisfied import package {0}.
 unsatisfied_required = Missing required plug-in {0}.
 unsatisfied_optionalBundle = Optional plug-in {0} is not available.
 unsatisfied_host = Host plug-in {0} has not been found.
+unsatisfied_nativeSpec = Unsatisfied native code filter: {0}. 
+
+fetching_p2Repo=Fetching IUs from {0} to {1}.
+includedFromFeature=Processing inclusion from feature {0}: {1}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/DeltaPackScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/DeltaPackScriptGenerator.java
index f1a6b09..0e1d2a6 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/DeltaPackScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/DeltaPackScriptGenerator.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java
index fdc15d8..08c96af 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageConfigScriptGenerator.java
@@ -1,18 +1,17 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.packager;
 
 import java.io.*;
-import java.util.ArrayList;
-import java.util.Properties;
+import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.util.NLS;
@@ -25,6 +24,20 @@ import org.eclipse.pde.internal.build.site.BuildTimeFeature;
 public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator {
 
 	private Properties packagingProperties;
+	private Collection archiveRootProviders = Collections.EMPTY_LIST;
+
+	public void initialize(String directoryName, String feature, Config configurationInformation, Collection elementList, Collection featureList, Collection allFeaturesList, Collection rootProviders) throws CoreException {
+		/* package scripts require the root file providers for creating the file archive, but don't want them for other rootfile
+		 * stuff done by the assembly scripts, so keep them separate here */
+		super.initialize(directoryName, feature, configurationInformation, elementList, featureList, allFeaturesList, new ArrayList(0));
+		archiveRootProviders = rootProviders != null ? rootProviders : Collections.EMPTY_LIST;
+	}
+
+	protected Collection getArchiveRootFileProviders() {
+		if (archiveRootProviders.size() > 0)
+			return archiveRootProviders;
+		return super.getArchiveRootFileProviders();
+	}
 
 	private String getFinalName(BundleDescription bundle, String shape) {
 		final String JAR = "jar"; //$NON-NLS-1$
@@ -100,7 +113,7 @@ public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator
 
 		if (BuildDirector.p2Gathering) {
 			String repo = "file:" + getWorkingDirectory() + "/buildRepo"; //$NON-NLS-1$ //$NON-NLS-2$
-			script.printP2PublishFeaturesAndBundles(repo, repo, (FileSet[]) p2Bundles.toArray(new FileSet[p2Bundles.size()]), (FileSet[]) p2Features.toArray(new FileSet[p2Features.size()]), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_PREFIX), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_DEFINITION), contextMetadata);
+			script.printP2PublishFeaturesAndBundles(repo, repo, (FileSet[]) p2Bundles.toArray(new FileSet[p2Bundles.size()]), (FileSet[]) p2Features.toArray(new FileSet[p2Features.size()]), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_SITE), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_PREFIX), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_DEFINITION), Utils.getPropertyFormat(PROPERTY_P2_CATEGORY_VERSION), contextMetadata);
 		}
 
 		if (packagingProperties.size() != 0) {
@@ -144,7 +157,7 @@ public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator
 		try {
 			propertyStream = new BufferedInputStream(new FileInputStream(packagingPropertiesLocation));
 			try {
-				packagingProperties.load(new BufferedInputStream(propertyStream));
+				packagingProperties.load(propertyStream);
 			} finally {
 				propertyStream.close();
 			}
@@ -171,9 +184,12 @@ public class PackageConfigScriptGenerator extends AssembleConfigScriptGenerator
 		script.println();
 	}
 
-	protected FileSet[] generatePermissions(boolean zip) {
-		//In the packager there is nothing to do since, the features we are packaging are pre-built and do not have a build.properties
-		return new FileSet[0];
+	protected FileSet[] generatePermissions(String root, boolean zip) {
+		if (packagingProperties != null && packagingProperties.size() > 0) {
+			//In the packager there is nothing to do since, the features we are packaging are pre-built and do not have a build.properties
+			return new FileSet[0];
+		}
+		return super.generatePermissions(root, zip);
 	}
 
 	protected void generateGZipTarget(boolean assembling) {
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java
index f3f5dd3..74e301b 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackageScriptGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.packager;
@@ -45,7 +45,7 @@ public class PackageScriptGenerator extends AssembleScriptGenerator {
 	}
 
 	protected Collection[] getConfigInfos(Config aConfig) {
-		return new Collection[] {assemblageInformation.getBinaryPlugins(aConfig), assemblageInformation.getBinaryFeatures(aConfig), assemblageInformation.getFeatures(aConfig), new HashSet(0)};
+		return new Collection[] {assemblageInformation.getBinaryPlugins(aConfig), assemblageInformation.getBinaryFeatures(aConfig), assemblageInformation.getFeatures(aConfig), BuildDirector.p2Gathering ? assemblageInformation.getRootFileProviders(aConfig) : new HashSet(0)};
 	}
 
 	protected void generateP2ConfigFileTargetCall() {
@@ -115,6 +115,7 @@ public class PackageScriptGenerator extends AssembleScriptGenerator {
 	}
 
 	private static void generateP2FinalCall(AntScript script, String productFileLocation, String versionAdvice) {
+		script.printTab();
 		script.print("<p2.generator "); //$NON-NLS-1$
 		script.printAttribute("append", Utils.getPropertyFormat(PROPERTY_P2_APPEND), true); //$NON-NLS-1$ 
 		script.printAttribute("flavor", Utils.getPropertyFormat(PROPERTY_P2_FLAVOR), true); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackagerGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackagerGenerator.java
index 137fd78..3b6e885 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackagerGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/PackagerGenerator.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.packager;
@@ -13,8 +13,6 @@ package org.eclipse.pde.internal.build.packager;
 import java.util.List;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.internal.build.*;
-import org.eclipse.pde.internal.build.BuildScriptGenerator;
-import org.eclipse.pde.internal.build.Utils;
 import org.eclipse.pde.internal.build.site.BuildTimeSiteFactory;
 
 public class PackagerGenerator extends BuildScriptGenerator {
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/UnzipperGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/UnzipperGenerator.java
index 18953f1..742e601 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/UnzipperGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/packager/UnzipperGenerator.java
@@ -56,7 +56,7 @@ public class UnzipperGenerator extends AbstractScriptGenerator {
 		try {
 			propertyStream = new BufferedInputStream(new FileInputStream(packagingPropertiesLocation));
 			try {
-				packagingProperties.load(new BufferedInputStream(propertyStream));
+				packagingProperties.load(propertyStream);
 			} finally {
 				propertyStream.close();
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java
index fd828f1..7a89675 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/FeatureRootAdvice.java
@@ -1,24 +1,25 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.pde.internal.build.publisher;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
+import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
 import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.equinox.p2.publisher.AbstractAdvice;
+import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
 import org.eclipse.pde.internal.build.Config;
 
-public class FeatureRootAdvice extends AbstractAdvice {
+public class FeatureRootAdvice extends AbstractAdvice implements IFeatureRootAdvice {
 	private static final int IDX_COMPUTER = 0;
 	private static final int IDX_DESCRIPTOR = 1;
 
@@ -28,17 +29,15 @@ public class FeatureRootAdvice extends AbstractAdvice {
 	private Version featureVersion;
 
 	public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
-		if (configSpec == null)
-			return true;
-		if (advice.containsKey(configSpec)) {
-			if (featureId != null) {
-				if (!featureId.equals(id))
-					return false;
-				return (featureVersion != null) ? featureVersion.equals(version) : true;
-			}
-			return true;
-		}
-		return false;
+		if (featureId != null && !featureId.equals(id))
+			return false;
+		if (featureVersion != null && !featureVersion.equals(version))
+			return false;
+
+		if (configSpec != null && !advice.containsKey(configSpec))
+			return false;
+
+		return true;
 	}
 
 	/**
@@ -55,7 +54,7 @@ public class FeatureRootAdvice extends AbstractAdvice {
 	 * @param config
 	 * @return GatheringComputer
 	 */
-	public GatheringComputer getRootFileComputer(String config) {
+	public IPathComputer getRootFileComputer(String config) {
 		if (advice.containsKey(config))
 			return (GatheringComputer) ((Object[]) advice.get(config))[IDX_COMPUTER];
 		return null;
@@ -70,6 +69,8 @@ public class FeatureRootAdvice extends AbstractAdvice {
 			GatheringComputer existing = (GatheringComputer) configAdvice[IDX_COMPUTER];
 			existing.addAll(computer);
 		}
+		FileSetDescriptor descriptor = getDescriptor(config);
+		descriptor.addFiles(computer.getFiles());
 	}
 
 	public void addPermissions(String config, String permissions, String[] files) {
@@ -104,7 +105,6 @@ public class FeatureRootAdvice extends AbstractAdvice {
 			if (!config.equals(Config.ANY) && config.length() > 0)
 				key += "." + config; //$NON-NLS-1$
 			descriptor = new FileSetDescriptor(key, config.equals(Config.ANY) ? null : config);
-			descriptor.setFiles(""); //$NON-NLS-1$
 			configAdvice[IDX_DESCRIPTOR] = descriptor;
 		}
 		return descriptor;
@@ -117,4 +117,10 @@ public class FeatureRootAdvice extends AbstractAdvice {
 	public void setFeatureVersion(Version featureVersion) {
 		this.featureVersion = featureVersion;
 	}
+
+	public String[] getConfigurations() {
+		Set keys = advice.keySet();
+		return (String[]) keys.toArray(new String[keys.size()]);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
index cad74c5..f56bd55 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherBundleAction.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -15,11 +15,11 @@ import java.io.File;
 import java.util.Dictionary;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
 import org.eclipse.equinox.p2.publisher.IPublisherInfo;
 import org.eclipse.equinox.p2.publisher.IPublisherResult;
 import org.eclipse.equinox.p2.publisher.eclipse.*;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.internal.build.BundleHelper;
 import org.eclipse.pde.internal.build.Utils;
@@ -68,7 +68,7 @@ public class GatherBundleAction extends BundlesAction {
 				shape = Utils.guessUnpack(bundle, BundleHelper.getClasspath(manifest)) ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
 			}
 		}
-		BundleShapeAdvice advice = new BundleShapeAdvice(bundle.getSymbolicName(), Version.fromOSGiVersion(bundle.getVersion()), shape);
+		BundleShapeAdvice advice = new BundleShapeAdvice(bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), shape);
 		info.addAdvice(advice);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java
index 78b159a..08a3ae0 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/GatherFeatureAction.java
@@ -1,31 +1,30 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.publisher;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Collection;
-import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
 import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.ArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.*;
 import org.eclipse.equinox.p2.publisher.IPublisherInfo;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
 import org.eclipse.equinox.p2.publisher.eclipse.Feature;
 import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 
 public class GatherFeatureAction extends FeaturesAction {
 	private GatheringComputer computer;
 	private String groupId = null;
+	private FeatureRootAdvice rootAdvice;
 	private final File featureRoot;
 
 	public GatherFeatureAction(File location, File featureRoot) {
@@ -45,40 +44,42 @@ public class GatherFeatureAction extends FeaturesAction {
 		Feature feature = new FeatureParser().parse(featureRoot);
 		if (feature != null) {
 			feature.setLocation(locations[0].getAbsolutePath());
+			rootAdvice.setFeatureId(feature.getId());
+			rootAdvice.setFeatureVersion(Version.parseVersion(feature.getVersion()));
 			return new Feature[] {feature};
 		}
 		return new Feature[0];
 	}
 
-	protected ArrayList generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
-		ArrayList ius = new ArrayList();
-
-		Collection collection = publisherInfo.getAdvice(null, false, null, null, FeatureRootAdvice.class);
-		if (collection.size() == 0)
-			return ius;
-
-		FeatureRootAdvice advice = (FeatureRootAdvice) collection.iterator().next();
-		String[] configs = advice.getConfigs();
-		for (int i = 0; i < configs.length; i++) {
-			String config = configs[i];
-
-			GatheringComputer rootComputer = advice.getRootFileComputer(config);
-
-			if (rootComputer != null) {
-				FileSetDescriptor descriptor = advice.getDescriptor(config);
-				IInstallableUnit iu = (IInstallableUnit) createFeatureRootFileIU(feature.getId(), feature.getVersion(), null, descriptor)[0];
-
-				File[] files = rootComputer.getFiles();
-				IArtifactKey artifactKey = iu.getArtifacts()[0];
-				ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(artifactKey);
-				publishArtifact(artifactDescriptor, files, null, publisherInfo, rootComputer);
-
-				result.addIU(iu, IPublisherResult.NON_ROOT);
-				ius.add(iu);
-			}
-		}
-		return ius;
-	}
+	//	protected ArrayList generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
+	//		ArrayList ius = new ArrayList();
+	//
+	//		Collection collection = publisherInfo.getAdvice(null, false, null, null, FeatureRootAdvice.class);
+	//		if (collection.size() == 0)
+	//			return ius;
+	//
+	//		FeatureRootAdvice advice = (FeatureRootAdvice) collection.iterator().next();
+	//		String[] configs = advice.getConfigs();
+	//		for (int i = 0; i < configs.length; i++) {
+	//			String config = configs[i];
+	//
+	//			GatheringComputer rootComputer = advice.getRootFileComputer(config);
+	//
+	//			if (rootComputer != null) {
+	//				FileSetDescriptor descriptor = advice.getDescriptor(config);
+	//				IInstallableUnit iu = (IInstallableUnit) createFeatureRootFileIU(feature.getId(), feature.getVersion(), null, descriptor)[0];
+	//
+	//				File[] files = rootComputer.getFiles();
+	//				IArtifactKey artifactKey = iu.getArtifacts()[0];
+	//				ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(artifactKey);
+	//				publishArtifact(artifactDescriptor, files, null, publisherInfo, rootComputer);
+	//
+	//				result.addIU(iu, IPublisherResult.NON_ROOT);
+	//				ius.add(iu);
+	//			}
+	//		}
+	//		return ius;
+	//	}
 
 	protected String getGroupId(String featureId) {
 		if (groupId != null)
@@ -97,15 +98,19 @@ public class GatherFeatureAction extends FeaturesAction {
 			return;
 
 		// add all the artifacts associated with the feature
-		IArtifactKey[] artifacts = featureIU.getArtifacts();
-		if (artifacts.length > 1) {
+		Collection artifacts = featureIU.getArtifacts();
+		if (artifacts.size() > 1) {
 			//boo!
 		}
 
-		ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(artifacts[0], null);
+		ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(publisherInfo.getArtifactRepository(), (IArtifactKey) artifacts.iterator().next(), null);
 		processArtifactPropertiesAdvice(featureIU, ad, publisherInfo);
 		ad.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
 
 		publishArtifact(ad, computer.getFiles(), null, publisherInfo, computer);
 	}
+
+	public void setRootAdvice(FeatureRootAdvice rootAdvice) {
+		this.rootAdvice = rootAdvice;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/AssembledConfigAdvice.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/AssembledConfigAdvice.java
new file mode 100644
index 0000000..a8cda03
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/AssembledConfigAdvice.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher.compatibility;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.eclipse.IConfigAdvice;
+import org.eclipse.equinox.p2.publisher.eclipse.IExecutableAdvice;
+import org.eclipse.osgi.service.environment.Constants;
+
+public class AssembledConfigAdvice implements IConfigAdvice, IExecutableAdvice {
+	private String configSpec = null;
+	private String launcherName = null;
+	private LauncherData launcherData = null;
+	private ConfigData configData = null;
+
+	public AssembledConfigAdvice(String configSpec, File configRoot, String launcherName) {
+		this.configSpec = configSpec;
+		this.launcherName = launcherName;
+		initializeData(configRoot);
+	}
+
+	public BundleInfo[] getBundles() {
+		return configData.getBundles();
+	}
+
+	public Map getProperties() {
+		Properties configProps = configData.getProperties();
+		Map props = new HashMap(configProps.size() + 1);
+		CollectionUtils.putAll(configProps, props);
+		int startLevel = configData.getInitialBundleStartLevel();
+		if (startLevel != BundleInfo.NO_LEVEL)
+			props.put("osgi.bundles.defaultStartLevel", String.valueOf(startLevel)); //$NON-NLS-1$
+		return props;
+	}
+
+	public boolean isApplicable(String spec, boolean includeDefault, String id, Version version) {
+		return configSpec.equals(spec);
+	}
+
+	private File getLauncher(File root) {
+		if (launcherName == null)
+			launcherName = "eclipse"; //$NON-NLS-1$
+		if (configSpec.indexOf(Constants.OS_MACOSX) > 0) {
+			File launcher = new File(root, launcherName + ".app/Contents/MacOS/" + launcherName); //$NON-NLS-1$
+			if (!launcher.exists()) {
+				//try upcase first letter
+				return new File(root, Character.toUpperCase(launcherName.charAt(0)) + launcherName.substring(1) + ".app/Contents/MacOS/" + launcherName); //$NON-NLS-1$
+			}
+			return launcher;
+		}
+		if (configSpec.indexOf("win32") > 0) //$NON-NLS-1$
+			return new File(root, launcherName + ".exe"); //$NON-NLS-1$
+		return new File(root, launcherName);
+	}
+
+	private void initializeData(File configRoot) {
+		DataLoader loader = new DataLoader(new File(configRoot, "configuration/config.ini"), getLauncher(configRoot)); //$NON-NLS-1$
+		configData = loader.getConfigData();
+		launcherData = loader.getLauncherData();
+	}
+
+	public String getExecutableName() {
+		return (launcherName != null) ? launcherName : "eclipse"; //$NON-NLS-1$
+	}
+
+	public String[] getProgramArguments() {
+		return (launcherData != null) ? launcherData.getProgramArgs() : new String[0];
+	}
+
+	public String[] getVMArguments() {
+		return (launcherData != null) ? launcherData.getJvmArgs() : new String[0];
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/GeneratorApplication.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/GeneratorApplication.java
new file mode 100644
index 0000000..d6965ff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/GeneratorApplication.java
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher.compatibility;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.*;
+import org.eclipse.equinox.p2.publisher.eclipse.*;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+
+public class GeneratorApplication extends AbstractPublisherApplication {
+	static final public int OPERATION_SOURCE = 1;
+	static final public int OPERATION_INPLACE = 2;
+	static final public int OPERATION_CONFIG = 3;
+	static final public int OPERATION_UPDATE = 4;
+
+	private int operation = 0;
+	private IPublisherResult result = null;
+	private URI site = null;
+	private String siteVersion = null;
+	private String flavor;
+	private ProductFile product;
+	private String rootVersion;
+	private String versionAdvice;
+	private String rootId;
+
+	protected IPublisherAction[] createActions() {
+
+		File sourceFile = source != null ? new File(source) : null;
+
+		List actions = new ArrayList();
+		switch (operation) {
+			case 0 :
+				if (product != null) {
+					actions.add(new RootFileParentAction(product, flavor));
+					actions.add(new EquinoxLauncherCUAction(flavor, info.getConfigurations()));
+					actions.add(new ProductAction(source, product, flavor, null));
+				} else if (rootId != null) {
+					info.addAdvice(new RootIUResultFilterAdvice(null));
+					actions.add(new RootFileParentAction(rootId, rootVersion, flavor));
+					actions.add(new RootIUAction(rootId, Version.parseVersion(rootVersion), null));
+				}
+				break;
+			case OPERATION_SOURCE :
+				actions.add(new FeaturesAction(new File[] {new File(sourceFile, "features")})); //$NON-NLS-1$
+				actions.add(new BundlesAction(new File[] {new File(sourceFile, "plugins")})); //$NON-NLS-1$
+				if (site != null) {
+					SiteXMLAction siteAction = new SiteXMLAction(site, ""); //$NON-NLS-1$
+					if (siteVersion != null && siteVersion.length() > 0)
+						siteAction.setCategoryVersion(siteVersion);
+					actions.add(siteAction);
+				}
+				break;
+			case OPERATION_CONFIG :
+				String[] configs = info.getConfigurations();
+				if (configs.length == 1) {
+					info.addAdvice(new AssembledConfigAdvice(configs[0], sourceFile, product != null ? product.getLauncherName() : null));
+					info.addAdvice(new RootFileTouchpointAdvice(product, sourceFile, new File[] {sourceFile}, null, configs[0]));
+					actions.add(createRootFileAction(configs[0]));
+				}
+				break;
+		}
+
+		if (versionAdvice != null)
+			info.addAdvice(createVersionAdvice());
+
+		return (IPublisherAction[]) actions.toArray(new IPublisherAction[actions.size()]);
+	}
+
+	protected IVersionAdvice createVersionAdvice() {
+		File adviceFile = new File(versionAdvice);
+		boolean features = adviceFile.getName().indexOf("feature") > 0; //$NON-NLS-1$
+		VersionAdvice advice = new VersionAdvice();
+		advice.load(IInstallableUnit.NAMESPACE_IU_ID, versionAdvice, features ? ".feature.group" : ""); //$NON-NLS-1$ //$NON-NLS-2$
+		return advice;
+	}
+
+	protected IPublisherAction createRootFileAction(String configSpec) {
+		String id = product != null ? product.getId() : rootId;
+		Version version = Version.parseVersion(getProductVersion());
+
+		RootFilesAction action = new RootFilesAction(info, id, version, flavor);
+		action.setCreateParent(false);
+		return action;
+	}
+
+	private String getProductVersion() {
+		String version = "1.0.0"; //$NON-NLS-1$
+		if (product != null && !product.getVersion().equals(IPDEBuildConstants.GENERIC_VERSION_NUMBER)) {
+			version = product.getVersion();
+		} else if (rootVersion != null && !rootVersion.equals(IPDEBuildConstants.GENERIC_VERSION_NUMBER)) {
+			version = rootVersion;
+		}
+		return version;
+	}
+
+	protected Publisher createPublisher(PublisherInfo publisherInfo) {
+		if (result != null)
+			return new Publisher(publisherInfo, result);
+		return new Publisher(publisherInfo);
+	}
+
+	public void setAppend(boolean value) {
+		super.append = value;
+	}
+
+	public void setArtifactRepositoryName(String name) {
+		super.artifactRepoName = name;
+	}
+
+	public void setCompress(boolean value) {
+		super.compress = value;
+	}
+
+	public void setMetadataRepositoryName(String name) {
+		super.metadataRepoName = name;
+	}
+
+	public void setOperation(int operation) {
+		this.operation = operation;
+	}
+
+	public void setSource(String location) {
+		this.source = location;
+	}
+
+	public void setSite(URI location) {
+		this.site = location;
+	}
+
+	public void setIncrementalResult(IPublisherResult result) {
+		this.result = result;
+	}
+
+	public void setFlavor(String flavor) {
+		this.flavor = flavor;
+	}
+
+	public void setRootVersion(String rootVersion) {
+		this.rootVersion = rootVersion;
+	}
+
+	public void setRoodId(String root) {
+		this.rootId = root;
+	}
+
+	public void setProductFile(String file) {
+		if (file != null && new File(file).exists()) {
+			try {
+				product = new ProductFile(file);
+			} catch (Exception e) {
+				// problem
+			}
+		}
+	}
+
+	public void setVersionAdvice(String advice) {
+		this.versionAdvice = advice;
+	}
+
+	public void setSiteVersion(String version) {
+		this.siteVersion = version;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/IncrementalGenerator.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/IncrementalGenerator.java
new file mode 100644
index 0000000..f6035cf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/IncrementalGenerator.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.build.publisher.compatibility;
+
+import java.util.*;
+import org.eclipse.equinox.p2.publisher.*;
+
+/**
+ * A class to enable carrying GeneratorResults across multiple invocations of the Generator.
+ * Done here in the bundle instead of in GeneratorTask because of the way org.eclipse.ant.core.AntRunner uses class loaders.
+ * @since 1.0
+ */
+
+public class IncrementalGenerator {
+	private static String MODE_INCREMENTAL = "incremental"; //$NON-NLS-1$
+	private String mode = null;
+	static private PublisherResult result = null;
+	static private ArrayList configs = null;
+	static private ArrayList advice = null;
+
+	public void setMode(String mode) {
+		this.mode = mode;
+	}
+
+	public void run(GeneratorApplication generator, PublisherInfo provider) throws Exception {
+		if (MODE_INCREMENTAL.equals(mode)) {
+			initialize();
+			generator.setIncrementalResult(result);
+		} else if ("final".equals(mode) && result != null) { //$NON-NLS-1$
+			generator.setIncrementalResult(result);
+			if (configs != null)
+				provider.setConfigurations((String[]) configs.toArray(new String[configs.size()]));
+			if (advice != null) {
+				for (Iterator iterator = advice.iterator(); iterator.hasNext();) {
+					provider.addAdvice((IPublisherAdvice) iterator.next());
+				}
+			}
+		}
+
+		generator.run(provider);
+
+		if (MODE_INCREMENTAL.equals(mode)) {
+			configs.addAll(Arrays.asList(provider.getConfigurations()));
+			advice.addAll(provider.getAdvice());
+		} else {
+			result = null;
+			configs = null;
+			advice = null;
+		}
+	}
+
+	private void initialize() {
+		if (result == null)
+			result = new PublisherResult();
+		if (configs == null)
+			configs = new ArrayList();
+		if (advice == null)
+			advice = new ArrayList();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java
new file mode 100644
index 0000000..0434fd3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileParentAction.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher.compatibility;
+
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.actions.RootFilesAction;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+
+public class RootFileParentAction extends AbstractPublisherAction {
+
+	private final String flavor;
+	private final String version;
+	protected final String baseId;
+
+	public RootFileParentAction(ProductFile product, String flavor) {
+		this.flavor = flavor;
+		this.baseId = product.getId();
+		this.version = getVersion(product.getVersion());
+	}
+
+	public RootFileParentAction(String rootId, String rootVersion, String flavor) {
+		this.flavor = flavor;
+		this.baseId = rootId != null ? rootId : "org.eclipse"; //$NON-NLS-1$
+		this.version = getVersion(rootVersion);
+	}
+
+	public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+		final String idPrefix = baseId + ".rootfiles"; //$NON-NLS-1$
+		final String flavorPrefix = flavor + baseId + ".rootfiles"; //$NON-NLS-1$
+
+		HashSet collector = new HashSet();
+		Iterator iter = results.getIUs(null, IPublisherResult.NON_ROOT).iterator();
+		while (iter.hasNext()) {
+			IInstallableUnit iu = (IInstallableUnit) iter.next();
+			String id = iu.getId();
+			if (id.startsWith(idPrefix) || id.startsWith(flavorPrefix))
+				collector.add(iu);
+		}
+
+		InstallableUnitDescription descriptor = createParentIU(collector, RootFilesAction.computeIUId(baseId, flavor), Version.parseVersion(version));
+		descriptor.setSingleton(true);
+		IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
+		results.addIU(rootIU, IPublisherResult.ROOT);
+		return Status.OK_STATUS;
+	}
+
+	private String getVersion(String rootVersion) {
+		if (rootVersion != null && !rootVersion.equals(IPDEBuildConstants.GENERIC_VERSION_NUMBER))
+			return rootVersion;
+		return "1.0.0"; //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileTouchpointAdvice.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileTouchpointAdvice.java
new file mode 100644
index 0000000..b5e2687
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/publisher/compatibility/RootFileTouchpointAdvice.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.publisher.compatibility;
+
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.p2.metadata.ITouchpointData;
+import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
+import org.eclipse.equinox.p2.publisher.actions.ITouchpointAdvice;
+import org.eclipse.equinox.p2.publisher.actions.RootFilesAdvice;
+import org.eclipse.osgi.service.environment.Constants;
+
+public class RootFileTouchpointAdvice extends RootFilesAdvice implements ITouchpointAdvice {
+
+	private final ProductFile product;
+
+	public RootFileTouchpointAdvice(ProductFile product, File root, File[] includedFiles, File[] excludedFiles, String configSpec) {
+		super(root, includedFiles, excludedFiles, configSpec);
+		this.product = product;
+	}
+
+	public ITouchpointData getTouchpointData(ITouchpointData existingData) {
+		String[] config = AbstractPublisherAction.parseConfigSpec(getConfigSpec());
+		String os = config[1];
+
+		String launcherName = product != null ? product.getLauncherName() : null;
+		if (launcherName == null)
+			launcherName = "eclipse"; //$NON-NLS-1$
+
+		File root = getRoot();
+		File launcherFile = new File(root, launcherName);
+		if (Constants.OS_MACOSX.equals(os)) {
+			launcherFile = new File(root, launcherName + ".app/Contents/MacOS/" + launcherName); //$NON-NLS-1$
+			if (!launcherFile.exists()) {
+				String capitalized = launcherName.substring(0, 1).toUpperCase() + launcherName.substring(1, launcherName.length());
+				launcherFile = new File(root, capitalized + ".app/Contents/MacOS/" + launcherName); //$NON-NLS-1$
+			}
+		} else if (Constants.OS_WIN32.equals(os) && !launcherFile.exists()) {
+			launcherFile = new File(root, launcherName + ".exe"); //$NON-NLS-1$				
+		}
+
+		String configInstruction = null;
+		if (launcherFile.exists()) {
+			configInstruction = "setLauncherName(name:" + launcherName + ");"; //$NON-NLS-1$ //$NON-NLS-2$
+			if (Constants.OS_MACOSX.equals(os)) {
+				Path path = new Path(launcherFile.getAbsolutePath());
+				File appFolder = path.removeLastSegments(3).toFile();
+				configInstruction += "chmod(targetDir:${installFolder}/" + appFolder.getName() + "/Contents/MacOS/, targetFile:" + launcherFile.getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			} else if (!Constants.OS_WIN32.equals(os)) {
+				configInstruction += "chmod(targetDir:${installFolder}, targetFile:" + launcherFile.getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$				
+			}
+
+			Map newInstructions = new HashMap();
+			newInstructions.put("configure", MetadataFactory.createTouchpointInstruction(configInstruction, "org.eclipse.equinox.p2.touchpoint.eclipse.setLauncherName")); //$NON-NLS-1$ //$NON-NLS-2$ 
+			return MetadataFactory.mergeTouchpointData(existingData, newInstructions);
+		}
+		return existingData;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
index 53d357c..5af68c2 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -19,6 +19,7 @@ import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.*;
 import org.eclipse.pde.internal.build.site.compatibility.*;
+import org.osgi.framework.Filter;
 import org.osgi.framework.Version;
 
 /**
@@ -95,6 +96,22 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 		return result;
 	}
 
+	private Collection removeDuplicates(Collection bundles) {
+		Set result = new LinkedHashSet(bundles.size() / 2);
+		for (Iterator iterator = bundles.iterator(); iterator.hasNext();) {
+			File bundle = (File) iterator.next();
+			try {
+				bundle = bundle.getCanonicalFile();
+			} catch (IOException e) {
+				// ignore
+			}
+			if (result.contains(bundle))
+				continue;
+			result.add(bundle);
+		}
+		return result;
+	}
+
 	public PDEState getRegistry() throws CoreException {
 		if (state == null) {
 			// create the registry according to the site where the code to
@@ -121,7 +138,9 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 			} else {
 				state = createConverter();
 			}
-			state.addBundles(provider.getPluginPaths());
+
+			Collection bundles = removeDuplicates(provider.getPluginPaths());
+			state.addBundles(bundles);
 			state.setEESources(eeSources);
 
 			//Once all the elements have been added to the state, the filter is removed to allow for the generated plug-ins to be added
@@ -163,10 +182,12 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 		return state;
 	}
 
-	public IStatus missingPlugin(String id, String version, boolean throwException) throws CoreException {
+	public IStatus missingPlugin(String id, String version, Feature containingFeature, boolean throwException) throws CoreException {
 		BundleDescription bundle = state.getBundle(id, version, false);
 		if (bundle == null) {
 			String message = NLS.bind(Messages.exception_missingPlugin, id + "_" + version); //$NON-NLS-1$
+			if (containingFeature != null)
+				message = NLS.bind(Messages.includedFromFeature, containingFeature.getId(), message);
 			IStatus status = new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_PLUGIN_MISSING, message, null);
 			if (throwException)
 				throw new CoreException(status);
@@ -177,11 +198,17 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 		if (bundle.isResolved())
 			return null;
 
-		StateHelper helper = Platform.getPlatformAdmin().getStateHelper();
 		ResolverError[] resolutionErrors = state.getState().getResolverErrors(bundle);
+		return missingPlugin(bundle, resolutionErrors, containingFeature, throwException);
+	}
+
+	public static IStatus missingPlugin(BundleDescription bundle, ResolverError[] resolutionErrors, Feature containingFeature, boolean throwException) throws CoreException {
+		StateHelper helper = Platform.getPlatformAdmin().getStateHelper();
 		VersionConstraint[] versionErrors = helper.getUnsatisfiedConstraints(bundle);
 
-		String message = NLS.bind(Messages.exception_unresolvedPlugin, id + '_' + version);
+		String message = NLS.bind(Messages.exception_unresolvedPlugin, bundle.getSymbolicName() + '_' + bundle.getVersion().toString());
+		if (containingFeature != null)
+			message = NLS.bind(Messages.includedFromFeature, containingFeature.getId(), message);
 		message += ":\n" + BuildTimeSite.getResolutionErrorMessage(resolutionErrors); //$NON-NLS-1$
 		for (int j = 0; j < versionErrors.length; j++) {
 			message += '\t' + BuildTimeSite.getResolutionFailureMessage(versionErrors[j]) + '\n';
@@ -194,16 +221,16 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 	}
 
 	//Return whether the resolution error is caused because we are not building for the proper configurations.
-	private boolean isConfigError(BundleDescription bundle, ResolverError[] errors, List configs) {
+	static public boolean isConfigError(BundleDescription bundle, ResolverError[] errors, List configs) {
 		Dictionary environment = new Hashtable(3);
-		String filterSpec = bundle.getPlatformFilter();
+		Filter bundleFilter = BundleHelper.getDefault().getFilter(bundle);
 		if (hasPlatformFilterError(errors) != null) {
 			for (Iterator iter = configs.iterator(); iter.hasNext();) {
 				Config aConfig = (Config) iter.next();
 				environment.put("osgi.os", aConfig.getOs()); //$NON-NLS-1$
 				environment.put("osgi.ws", aConfig.getWs()); //$NON-NLS-1$
 				environment.put("osgi.arch", aConfig.getArch()); //$NON-NLS-1$
-				if (BundleHelper.getDefault().createFilter(filterSpec).match(environment)) {
+				if (bundleFilter.match(environment)) {
 					return false;
 				}
 			}
@@ -213,10 +240,12 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 	}
 
 	//Check if the set of errors contain a platform filter
-	private ResolverError hasPlatformFilterError(ResolverError[] errors) {
+	static private ResolverError hasPlatformFilterError(ResolverError[] errors) {
 		for (int i = 0; i < errors.length; i++) {
 			if ((errors[i].getType() & ResolverError.PLATFORM_FILTER) != 0)
 				return errors[i];
+			if ((errors[i].getType() & ResolverError.NO_NATIVECODE_MATCH) != 0)
+				return errors[i];
 		}
 		return null;
 	}
@@ -235,6 +264,8 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
 			throw new IllegalArgumentException();
 		if (unsatisfied instanceof ImportPackageSpecification)
 			return NLS.bind(Messages.unsatisfied_import, displayVersionConstraint(unsatisfied));
+		if (unsatisfied instanceof NativeCodeSpecification)
+			return NLS.bind(Messages.unsatisfied_nativeSpec, unsatisfied.toString());
 		if (unsatisfied instanceof BundleSpecification) {
 			if (((BundleSpecification) unsatisfied).isOptional())
 				return NLS.bind(Messages.unsatisfied_optionalBundle, displayVersionConstraint(unsatisfied));
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSiteContentProvider.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSiteContentProvider.java
index 20434bf..db66f1e 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSiteContentProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSiteContentProvider.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.site;
@@ -14,6 +14,8 @@ import java.io.File;
 import java.net.URL;
 import java.util.*;
 import java.util.jar.JarFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.pde.build.Constants;
 import org.eclipse.pde.internal.build.*;
 
@@ -62,13 +64,58 @@ public class BuildTimeSiteContentProvider implements IPDEBuildConstants {
 			} else if (new File(location[i], JarFile.MANIFEST_NAME).exists() || new File(location[i], Constants.PLUGIN_FILENAME_DESCRIPTOR).exists() || new File(location[i], Constants.FRAGMENT_FILENAME_DESCRIPTOR).exists()) {
 				collectedElements.add(location[i]);
 			} else if (location[i].isDirectory()) {
-				collectedElements.addAll(Arrays.asList(location[i].listFiles()));
-			} else if (location[i].isFile() && location[i].getName().endsWith(".jar")) //$NON-NLS-1$
+				//at this point Manifest, plugin.xml, feature.xml and fragment.xml don't exist here
+				//consider a project with "flexible root"
+				if (new File(location[i], PDE_CORE_PREFS).exists()) {
+					try {
+						Properties properties = AbstractScriptGenerator.readProperties(location[i].getAbsolutePath(), PDE_CORE_PREFS, IStatus.OK);
+						String root = properties.getProperty(BUNDLE_ROOT_PATH);
+						if (root != null) {
+							File actualRoot = new File(location[i], root);
+							if (actualRoot.exists())
+								collectedElements.add(actualRoot);
+						}
+					} catch (CoreException e) {
+						// nope
+					}
+				} else {
+					//a "workspace"
+					collectedElements.addAll(Arrays.asList(location[i].listFiles()));
+				}
+			} else if (location[i].isFile() && location[i].getName().endsWith(".jar")) {//$NON-NLS-1$
 				collectedElements.add(location[i]);
+			}
 		}
 		return collectedElements;
 	}
 
+	public File getBaseProfile() {
+		if (installedBaseURL == null)
+			return null;
+
+		File configurationFolder = new File(installedBaseURL, "configuration"); //$NON-NLS-1$
+		if (configurationFolder.exists()) {
+			try {
+				Properties config = AbstractScriptGenerator.readProperties(configurationFolder.getAbsolutePath(), "config.ini", IStatus.OK); //$NON-NLS-1$
+				String dataArea = config.getProperty("eclipse.p2.data.area"); //$NON-NLS-1$
+				String profileName = config.getProperty("eclipse.p2.profile"); //$NON-NLS-1$
+				if (dataArea != null && profileName != null) {
+					int idx = dataArea.indexOf("@config.dir"); //$NON-NLS-1$
+					if (idx != -1)
+						dataArea = dataArea.substring(0, idx) + configurationFolder.getAbsolutePath() + dataArea.substring(idx + 11);
+
+					File profileArea = new File(dataArea, "org.eclipse.equinox.p2.engine/profileRegistry/" + profileName + ".profile"); //$NON-NLS-1$ //$NON-NLS-2$
+					if (profileArea.exists())
+						return profileArea;
+				}
+			} catch (CoreException e) {
+				//won't happend
+			}
+		}
+
+		return null;
+	}
+
 	public PDEUIStateWrapper getInitialState() {
 		return pdeUIState;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/P2Utils.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/P2Utils.java
index 5643473..c0af792 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/P2Utils.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/P2Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,11 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.build.site;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.net.*;
 import java.util.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.internal.build.*;
 
@@ -26,11 +25,6 @@ import org.eclipse.pde.internal.build.*;
  */
 public class P2Utils {
 
-	private static final String SRC_BUNDLE_TXT_FOLDER = "org.eclipse.equinox.source"; //$NON-NLS-1$
-	private static final String BUNDLE_TXT_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-	private static final String SRC_BUNDLE_TXT_PATH = SRC_BUNDLE_TXT_FOLDER + "/source.info"; //$NON-NLS-1$
-	public static final String BUNDLE_TXT_PATH = BUNDLE_TXT_FOLDER + "/bundles.info"; //$NON-NLS-1$
-
 	/**
 	 * Returns bundles defined by the 'bundles.info' file in the
 	 * specified location, or <code>null</code> if none. The "bundles.info" file
@@ -46,13 +40,16 @@ public class P2Utils {
 		SimpleConfiguratorManipulator manipulator = (SimpleConfiguratorManipulator) BundleHelper.getDefault().acquireService(SimpleConfiguratorManipulator.class.getName());
 
 		File root = new File(platformHome);
-		File bundlesTxt = new File(root, "configuration/" + BUNDLE_TXT_PATH); //$NON-NLS-1$
-		File sourceTxt = new File(root, "configuration/" + SRC_BUNDLE_TXT_PATH); //$NON-NLS-1$
+		File bundlesTxt = new File(root, "configuration/" + SimpleConfiguratorManipulator.BUNDLES_INFO_PATH); //$NON-NLS-1$
+		File sourceTxt = new File(root, "configuration/" + SimpleConfiguratorManipulator.SOURCE_INFO_PATH); //$NON-NLS-1$
 
 		List infos = new ArrayList();
 		try {
-			infos.addAll(Arrays.asList(manipulator.loadConfiguration(bundlesTxt.toURL(), root)));
-			infos.addAll(Arrays.asList(manipulator.loadConfiguration(sourceTxt.toURL(), root)));
+			//streams are closed for us
+			if (bundlesTxt.exists())
+				infos.addAll(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(bundlesTxt), root.toURI())));
+			if (sourceTxt.exists())
+				infos.addAll(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(sourceTxt), root.toURI())));
 		} catch (MalformedURLException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();
@@ -152,7 +149,7 @@ public class P2Utils {
 						info.setStartLevel(refactoredRuntime ? 4 : 2);
 						info.setMarkedAsStarted(true);
 					} else if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) {
-						info.setStartLevel(1);
+						info.setStartLevel(2);
 						info.setMarkedAsStarted(true);
 					} else {
 						info.setStartLevel(defaultStartLevel);
@@ -166,8 +163,8 @@ public class P2Utils {
 			}
 		}
 
-		File bundlesTxt = new File(directory, BUNDLE_TXT_PATH);
-		File srcBundlesTxt = new File(directory, SRC_BUNDLE_TXT_PATH);
+		File bundlesTxt = new File(directory, SimpleConfiguratorManipulator.BUNDLES_INFO_PATH);
+		File srcBundlesTxt = new File(directory, SimpleConfiguratorManipulator.SOURCE_INFO_PATH);
 		File base = directory.getParentFile();
 
 		BundleInfo[] infos = (BundleInfo[]) bundleInfos.toArray(new BundleInfo[bundleInfos.size()]);
@@ -175,8 +172,8 @@ public class P2Utils {
 
 		SimpleConfiguratorManipulator manipulator = (SimpleConfiguratorManipulator) BundleHelper.getDefault().acquireService(SimpleConfiguratorManipulator.class.getName());
 		try {
-			manipulator.saveConfiguration(infos, bundlesTxt, base);
-			manipulator.saveConfiguration(sources, srcBundlesTxt, base);
+			manipulator.saveConfiguration(infos, bundlesTxt, base.toURI());
+			manipulator.saveConfiguration(sources, srcBundlesTxt, base.toURI());
 		} catch (IOException e) {
 			return null;
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java
index 57ce240..9fbb943 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PDEState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2009 IBM Corporation and others.
+ *  Copyright (c) 2004, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,12 +26,13 @@ import org.osgi.framework.*;
 
 // This class provides a higher level API on the state
 public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
-	private static final String[] MANIFEST_ENTRIES = {Constants.BUNDLE_LOCALIZATION, Constants.BUNDLE_NAME, Constants.BUNDLE_VENDOR, ECLIPSE_BUNDLE_SHAPE, ECLIPSE_SOURCE_BUNDLE};
+	private static final String[] MANIFEST_ENTRIES = {Constants.BUNDLE_LOCALIZATION, Constants.BUNDLE_NAME, Constants.BUNDLE_VENDOR, ECLIPSE_BUNDLE_SHAPE, ECLIPSE_SOURCE_BUNDLE, ECLIPSE_SOURCE_REF};
 
 	private StateObjectFactory factory;
 	protected State state;
 	private long id;
 	private Properties repositoryVersions;
+	private Properties sourceReferences;
 	private HashMap bundleClasspaths;
 	private ProfileManager profileManager;
 	private Map patchBundles;
@@ -62,12 +63,13 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 	public PDEState() {
 		factory = Platform.getPlatformAdmin().getFactory();
 		state = factory.createState(false);
-		state.setResolver(Platform.getPlatformAdmin().getResolver());
+		state.setResolver(Platform.getPlatformAdmin().createResolver());
 		id = 0;
 		bundleClasspaths = new HashMap();
 		patchBundles = new HashMap();
 		convertedManifests = new HashSet(2);
 		loadPluginTagFile();
+		loadSourceReferences();
 	}
 
 	public StateObjectFactory getFactory() {
@@ -84,7 +86,7 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 
 	//Add a bundle to the state, updating the version number 
 	public boolean addBundle(Dictionary enhancedManifest, File bundleLocation) {
-		updateVersionNumber(enhancedManifest);
+		String oldVersion = updateVersionNumber(enhancedManifest);
 		try {
 			BundleDescription descriptor;
 			descriptor = factory.createBundleDescription(state, enhancedManifest, bundleLocation.getAbsolutePath(), getNextId());
@@ -95,6 +97,7 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 			rememberQualifierTagPresence(descriptor);
 			rememberManifestConversion(descriptor, enhancedManifest);
 			rememberManifestEntries(descriptor, enhancedManifest, MANIFEST_ENTRIES);
+			rememberSourceReference(descriptor, oldVersion);
 			if (addBundleDescription(descriptor) == true && addedBundle != null)
 				addedBundle.add(descriptor);
 		} catch (BundleException e) {
@@ -115,6 +118,23 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 		bundleProperties.setProperty(PROPERTY_QUALIFIER, "marker"); //$NON-NLS-1$
 	}
 
+	private void rememberSourceReference(BundleDescription descriptor, String oldVersion) {
+		if (sourceReferences == null)
+			return;
+
+		String key = QualifierReplacer.getQualifierKey(descriptor.getSymbolicName(), oldVersion);
+		if (key == null || !sourceReferences.containsKey(key))
+			key = descriptor.getSymbolicName() + ',' + Version.emptyVersion.toString();
+		if (sourceReferences.containsKey(key)) {
+			Properties bundleProperties = (Properties) descriptor.getUserObject();
+			if (bundleProperties == null) {
+				bundleProperties = new Properties();
+				descriptor.setUserObject(bundleProperties);
+			}
+			bundleProperties.setProperty(PROPERTY_SOURCE_REFERENCE, sourceReferences.getProperty(key));
+		}
+	}
+
 	private void rememberManifestEntries(BundleDescription descriptor, Dictionary manifest, String[] entries) {
 		if (entries == null || entries.length == 0)
 			return;
@@ -181,11 +201,26 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 		}
 	}
 
+	private void loadSourceReferences() {
+		sourceReferences = new Properties();
+		try {
+			InputStream input = new BufferedInputStream(new FileInputStream(AbstractScriptGenerator.getWorkingDirectory() + '/' + DEFAULT_SOURCE_REFERENCES_FILENAME_DESCRIPTOR));
+			try {
+				sourceReferences.load(input);
+			} finally {
+				input.close();
+			}
+		} catch (IOException e) {
+			//Ignore
+		}
+	}
+
 	public boolean addBundle(File bundleLocation) {
 		Dictionary manifest;
 		manifest = loadManifest(bundleLocation);
-		if (manifest == null)
-			return false;
+		if (manifest == null) {
+			return addFlexibleRoot(bundleLocation);
+		}
 		try {
 			hasQualifier(bundleLocation, manifest);
 		} catch (BundleException e) {
@@ -194,20 +229,38 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 		return addBundle(manifest, bundleLocation);
 	}
 
-	private void updateVersionNumber(Dictionary manifest) {
+	private boolean addFlexibleRoot(File bundleLocation) {
+		if (!new File(bundleLocation, PDE_CORE_PREFS).exists())
+			return false;
+
+		try {
+			Properties properties = AbstractScriptGenerator.readProperties(bundleLocation.getAbsolutePath(), PDE_CORE_PREFS, IStatus.OK);
+			String root = properties.getProperty(BUNDLE_ROOT_PATH);
+			if (root != null)
+				return addBundle(new File(bundleLocation, root));
+		} catch (CoreException e) {
+			//ignore
+		}
+		return false;
+	}
+
+	private String updateVersionNumber(Dictionary manifest) {
 		String newVersion = null;
+		String oldVersion = null;
 		try {
 			String symbolicName = (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME);
 			if (symbolicName == null)
-				return;
+				return null;
 
 			symbolicName = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, symbolicName)[0].getValue();
-			newVersion = QualifierReplacer.replaceQualifierInVersion((String) manifest.get(Constants.BUNDLE_VERSION), symbolicName, (String) manifest.get(PROPERTY_QUALIFIER), repositoryVersions);
+			oldVersion = (String) manifest.get(Constants.BUNDLE_VERSION);
+			newVersion = QualifierReplacer.replaceQualifierInVersion(oldVersion, symbolicName, (String) manifest.get(PROPERTY_QUALIFIER), repositoryVersions);
 		} catch (BundleException e) {
 			//ignore
 		}
 		if (newVersion != null)
 			manifest.put(Constants.BUNDLE_VERSION, newVersion);
+		return oldVersion;
 	}
 
 	/**
@@ -480,9 +533,10 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 			return description;
 
 		if (parsedVersion.getQualifier().indexOf(IBuildPropertiesConstants.PROPERTY_QUALIFIER) > -1) {
-			BundleDescription[] bundles = getState().getBundles(bundleId);
+			BundleDescription[] bundles = sortByVersion(getState().getBundles(bundleId));
 			VersionRange qualifierRange = Utils.createVersionRange(version);
-			for (int i = 0; i < bundles.length; i++) {
+			//bundles are sorted, start at the high end
+			for (int i = bundles.length - 1; i >= 0; i--) {
 				if (qualifierRange.isIncluded(bundles[i].getVersion()) && (!resolved || bundles[i].isResolved()))
 					return bundles[i];
 			}
@@ -490,11 +544,29 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 		return null;
 	}
 
+	/**
+	 * Sort the BundleDescription[] by Version, lowest to highest.
+	 * (It is likely they are already close to this order)
+	 * @param bundles
+	 * @return sorted BundleDescription []
+	 */
+	private BundleDescription[] sortByVersion(BundleDescription[] bundles) {
+		if (bundles.length > 1) {
+			Arrays.sort(bundles, new Comparator() {
+				public int compare(Object o1, Object o2) {
+					return ((BundleDescription) o1).getVersion().compareTo(((BundleDescription) o2).getVersion());
+				}
+			});
+		}
+		return bundles;
+	}
+
 	public BundleDescription getResolvedBundle(String bundleId) {
-		BundleDescription[] description = getState().getBundles(bundleId);
+		BundleDescription[] description = sortByVersion(getState().getBundles(bundleId));
 		if (description == null)
 			return null;
-		for (int i = 0; i < description.length; i++) {
+		//bundles are sorted, start at the high end
+		for (int i = description.length - 1; i >= 0; i--) {
 			if (description[i].isResolved())
 				return description[i];
 		}
@@ -564,7 +636,7 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 			} finally {
 				propertyStream.close();
 			}
-		} catch (Exception e) {
+		} catch (IOException e) {
 			//ignore because compiled plug-ins do not have such files
 		}
 		return result;
@@ -633,7 +705,7 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 				String newVersion = QualifierReplacer.replaceQualifierInVersion(b.getVersion().toString(), b.getSymbolicName(), getQualifierPropery(b.getLocation()), null);
 
 				//Here it is important to reuse the same bundle id than the bundle we are removing so that we don't loose the information about the classpath
-				BundleDescription newBundle = state.getFactory().createBundleDescription(b.getBundleId(), b.getSymbolicName(), new Version(newVersion), b.getLocation(), b.getRequiredBundles(), b.getHost(), b.getImportPackages(), b.getExportPackages(), b.isSingleton(), b.attachFragments(), b.dynamicFragments(), b.getPlatformFilter(), b.getExecutionEnvironments(), b.getGenericRequires(), b.getGenericCapabilities());
+				BundleDescription newBundle = state.getFactory().createBundleDescription(b.getBundleId(), b.getSymbolicName(), new Version(newVersion), b.getLocation(), b.getRequiredBundles(), b.getHost(), b.getImportPackages(), b.getExportPackages(), b.isSingleton(), b.attachFragments(), b.dynamicFragments(), b.getPlatformFilter(), b.getExecutionEnvironments(), b.getGenericRequires(), b.getGenericCapabilities(), b.getNativeCodeSpecification());
 				addBundleDescription(newBundle);
 				rememberQualifierTagPresence(newBundle);
 				mapVersionReplacedBundle(b, newBundle);
@@ -677,7 +749,7 @@ public class PDEState implements IPDEBuildConstants, IBuildPropertiesConstants {
 			File osgi = getOSGiLocation();
 			String[] sources = null;
 			if (osgi != null) {
-				if (eeSources != null && osgi != null) {
+				if (eeSources != null) {
 					sources = new String[eeSources.length + 1];
 					sources[0] = osgi.getAbsolutePath();
 					System.arraycopy(eeSources, 0, sources, 1, eeSources.length);
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java
index 38947a8..1ea8373 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/PluginPathFinder.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.site;
 
 import java.io.*;
@@ -98,7 +100,9 @@ public class PluginPathFinder {
 		for (int i = 0; i < contents.length; i++) {
 			if (contents[i].isFile()) {
 				if (contents[i].getName().endsWith(LINK)) {
-					sites.add(new File(getSitePath(platformHome, contents[i], features)));
+					String path = getSitePath(platformHome, contents[i], features);
+					if (path != null)
+						sites.add(new File(path));
 				} else {
 					//bundle
 					results.add(contents[i]);
@@ -149,7 +153,7 @@ public class PluginPathFinder {
 
 		if (filterP2Base) {
 			URL[] urls = P2Utils.readBundlesTxt(platformHome);
-			if (urls != null) {
+			if (urls != null && urls.length > 0) {
 				return Utils.asFile(urls);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java
index fd422be..313de83 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/QualifierReplacer.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.site;
 
 import com.ibm.icu.util.Calendar;
@@ -39,7 +41,7 @@ public class QualifierReplacer implements IBuildPropertiesConstants {
 				newQualifier = globalQualifier;
 
 			if (newQualifier == null && newVersions != null && newVersions.size() != 0) { //Skip the lookup in the file if there is no entries
-				newQualifier = (String) newVersions.get(id + ',' + version.substring(0, version.length() - PROPERTY_QUALIFIER.length() - 1)); //First we check to see if there is a precise version
+				newQualifier = (String) newVersions.get(getQualifierKey(id, version)); //First we check to see if there is a precise version
 				if (newQualifier == null) //If not found, then lookup for the id,0.0.0
 					newQualifier = (String) newVersions.get(id + ',' + Version.emptyVersion.toString());
 				if (newQualifier == null)
@@ -59,6 +61,30 @@ public class QualifierReplacer implements IBuildPropertiesConstants {
 		return version;
 	}
 
+	//given a version ending in "qualifier" return the key to look up the replacement
+	public static String getQualifierKey(String id, String version) {
+		if (version == null || !version.endsWith(PROPERTY_QUALIFIER))
+			return null;
+
+		Version osgiVersion = new Version(version);
+		String qualifier = osgiVersion.getQualifier();
+		qualifier = qualifier.substring(0, qualifier.length() - PROPERTY_QUALIFIER.length());
+
+		StringBuffer keyBuffer = new StringBuffer(id);
+		keyBuffer.append(',');
+		keyBuffer.append(osgiVersion.getMajor());
+		keyBuffer.append('.');
+		keyBuffer.append(osgiVersion.getMinor());
+		keyBuffer.append('.');
+		keyBuffer.append(osgiVersion.getMicro());
+
+		if (qualifier.length() > 0) {
+			keyBuffer.append('.');
+			keyBuffer.append(qualifier);
+		}
+		return keyBuffer.toString();
+	}
+
 	/**
 	 * Returns the current date/time as a string to be used as a qualifier
 	 * replacement.  This is the default qualifier replacement.  Will
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/generator/GeneratorTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/generator/GeneratorTask.java
new file mode 100644
index 0000000..fb1bfae
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/generator/GeneratorTask.java
@@ -0,0 +1,240 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.build.generator;
+
+import java.net.URISyntaxException;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.PublisherInfo;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.build.publisher.compatibility.GeneratorApplication;
+import org.eclipse.pde.internal.build.publisher.compatibility.IncrementalGenerator;
+import org.eclipse.pde.internal.build.tasks.TaskMessages;
+
+/**
+ * An Ant task to call the p2 Metadata Generator application.
+ */
+public class GeneratorTask extends Task {
+	private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
+
+	protected PublisherInfo info = null;
+	private GeneratorApplication generator = null;
+	private String mode;
+
+	/* (non-Javadoc)
+	 * @see org.apache.tools.ant.Task#execute()
+	 */
+	public void execute() throws BuildException {
+		try {
+			IncrementalGenerator incremental = new IncrementalGenerator();
+			incremental.setMode(mode);
+			incremental.run(generator, info);
+
+			if (!"incremental".equals(mode)) { //$NON-NLS-1$
+				info = null;
+				generator = null;
+			}
+		} catch (Exception e) {
+			throw new BuildException(TaskMessages.error_callingGenerator, e);
+		}
+	}
+
+	protected PublisherInfo getInfo() {
+		if (info == null) {
+			info = new PublisherInfo();
+		}
+		return info;
+	}
+
+	protected GeneratorApplication getGenerator() {
+		if (generator == null)
+			generator = new GeneratorApplication();
+		return generator;
+	}
+
+	public void setAppend(String value) {
+		getGenerator().setAppend(Boolean.valueOf(value).booleanValue());
+	}
+
+	public void setArtifactRepository(String location) {
+		if (location != null && !location.startsWith(ANT_PREFIX))
+			try {
+				getGenerator().setArtifactLocation(URIUtil.fromString(location));
+			} catch (URISyntaxException e) {
+				throw new IllegalArgumentException(NLS.bind(TaskMessages.error_artifactRepoNotURI, location));
+			}
+	}
+
+	public void setArtifactRepositoryName(String name) {
+		getGenerator().setArtifactRepositoryName(name);
+	}
+
+	public void setBase(String value) {
+		if (generator == null)
+			generator = new GeneratorApplication();
+		//		generator.setBase(value);
+	}
+
+	public void setBundles(String value) {
+		if (generator == null)
+			generator = new GeneratorApplication();
+		//		generator.setBundles(value);
+	}
+
+	public void setCompress(String value) {
+		getGenerator().setCompress(Boolean.valueOf(value).booleanValue());
+	}
+
+	public void setConfig(String value) {
+		getGenerator().setOperation(GeneratorApplication.OPERATION_CONFIG);
+		getGenerator().setSource(value);
+	}
+
+	public void setInplace(String value) {
+		getGenerator().setOperation(GeneratorApplication.OPERATION_INPLACE);
+		getGenerator().setSource(value);
+	}
+
+	public void setSource(String location) {
+		getGenerator().setOperation(GeneratorApplication.OPERATION_SOURCE);
+		getGenerator().setSource(location);
+	}
+
+	public void setUpdateSite(String value) {
+		getGenerator().setOperation(GeneratorApplication.OPERATION_UPDATE);
+		getGenerator().setSource(value);
+	}
+
+	public void setExe(String value) {
+		if (info == null)
+			info = new PublisherInfo();
+		//		info.setExecutableLocation(value);
+	}
+
+	public void setFeatures(String value) {
+		if (generator == null)
+			generator = new GeneratorApplication();
+		//		generator.setFeatures(value);
+	}
+
+	public void setFlavor(String flavor) {
+		if (flavor != null && !flavor.startsWith(ANT_PREFIX))
+			getGenerator().setFlavor(flavor);
+	}
+
+	public void setLauncherConfig(String launcherConfig) {
+		if (launcherConfig != null && !launcherConfig.startsWith(ANT_PREFIX)) {
+			//config comes in as os_ws_arch, publisher wants ws.os.arch
+			String[] array = Utils.toStringArray(launcherConfig, "_"); //$NON-NLS-1$
+			if (array.length >= 3) {
+				StringBuffer config = new StringBuffer(array[1]);
+				config.append('.');
+				config.append(array[0]);
+				config.append('.');
+				config.append(array[2]);
+				if (array.length > 3) { //arch's like x86_64
+					config.append('_');
+					config.append(array[3]);
+				}
+
+				getInfo().setConfigurations(new String[] {config.toString()});
+			}
+		}
+	}
+
+	public void setMetadataRepository(String location) {
+		if (location != null && !location.startsWith(ANT_PREFIX))
+			try {
+				getGenerator().setMetadataLocation(URIUtil.fromString(location));
+			} catch (URISyntaxException e) {
+				throw new IllegalArgumentException(NLS.bind(TaskMessages.error_metadataRepoNotURI, location));
+			}
+	}
+
+	public void setMetadataRepositoryName(String name) {
+		if (name != null && !name.startsWith(ANT_PREFIX))
+			getGenerator().setMetadataRepositoryName(name);
+	}
+
+	public void setNoDefaultIUs(String value) {
+		if (info == null)
+			info = new PublisherInfo();
+		//		info.setAddDefaultIUs(!Boolean.valueOf(value).booleanValue());
+	}
+
+	public void setP2OS(String value) {
+		if (info == null)
+			info = new PublisherInfo();
+		//		info.setOS(value);
+	}
+
+	public void setProductFile(String file) {
+		if (file != null && !file.startsWith(ANT_PREFIX)) {
+			getGenerator().setProductFile(file);
+		}
+	}
+
+	public void setPublishArtifactRepository(boolean value) {
+		int options = getInfo().getArtifactOptions();
+		if (value)
+			info.setArtifactOptions(options | IPublisherInfo.A_INDEX);
+		else
+			info.setArtifactOptions(options & ~IPublisherInfo.A_INDEX);
+	}
+
+	public void setPublishArtifacts(boolean value) {
+		int options = getInfo().getArtifactOptions();
+		if (value)
+			info.setArtifactOptions(options | IPublisherInfo.A_PUBLISH);
+		else
+			info.setArtifactOptions(options & ~IPublisherInfo.A_PUBLISH);
+	}
+
+	public void setRoot(String root) {
+		if (root == null || root.startsWith("${")) //$NON-NLS-1$
+			return;
+		getGenerator().setRoodId(root);
+	}
+
+	public void setRootVersion(String rootVersion) {
+		if (rootVersion == null || rootVersion.startsWith(ANT_PREFIX))
+			return;
+		getGenerator().setRootVersion(rootVersion);
+	}
+
+	public void setMode(String mode) {
+		this.mode = mode;
+	}
+
+	public void setVersionAdvice(String advice) {
+		if (advice != null && !advice.startsWith(ANT_PREFIX))
+			getGenerator().setVersionAdvice(advice);
+	}
+
+	public void setSite(String site) {
+		if (site == null || site.startsWith(ANT_PREFIX))
+			return;
+		try {
+			getGenerator().setSite(URIUtil.fromString(site));
+		} catch (URISyntaxException e) {
+			throw new IllegalArgumentException(NLS.bind(TaskMessages.error_locationNotURI, site));
+		}
+	}
+
+	public void setSiteVersion(String version) {
+		if (version == null || version.startsWith(ANT_PREFIX))
+			return;
+		getGenerator().setSiteVersion(version);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java
index 824c29f..b8ce23b 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/BrandP2Task.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -20,22 +20,24 @@ import org.apache.tools.ant.Project;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.URIUtil;
 import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.*;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.Phase;
-import org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect;
-import org.eclipse.equinox.internal.provisional.p2.engine.phases.Install;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.internal.repository.tools.Activator;
+import org.eclipse.equinox.internal.p2.engine.Phase;
+import org.eclipse.equinox.internal.p2.engine.PhaseSet;
+import org.eclipse.equinox.internal.p2.engine.phases.Collect;
+import org.eclipse.equinox.internal.p2.engine.phases.Install;
+import org.eclipse.equinox.internal.p2.metadata.TouchpointData;
+import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
 import org.eclipse.equinox.p2.internal.repository.tools.Repo2Runnable;
 import org.eclipse.equinox.p2.internal.repository.tools.tasks.IUDescription;
 import org.eclipse.equinox.p2.internal.repository.tools.tasks.Repo2RunnableTask;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
 import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.*;
@@ -61,6 +63,10 @@ public class BrandP2Task extends Repo2RunnableTask {
 			protected PhaseSet getPhaseSet() {
 				return new PhaseSet(new Phase[] {new Collect(100), new Install(100)}) { /* nothing to override */};
 			}
+
+			protected PhaseSet getNativePhase() {
+				return null;
+			}
 		};
 	}
 
@@ -71,8 +77,18 @@ public class BrandP2Task extends Repo2RunnableTask {
 		if (launcherProvider == null || launcherProvider.startsWith("${")) //$NON-NLS-1$
 			launcherProvider = IPDEBuildConstants.FEATURE_EQUINOX_EXECUTABLE;
 
-		IMetadataRepository metadataRepo = loadMetadataRepository();
-		IArtifactRepository artifactRepo = loadArtifactRepository();
+		IProvisioningAgent agent = (IProvisioningAgent) BundleHelper.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new BuildException(TaskMessages.error_agentService);
+		IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+		if (metadataManager == null)
+			throw new BuildException(TaskMessages.error_metadataRepoManagerService);
+		IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+		if (artifactManager == null)
+			throw new BuildException(TaskMessages.error_artifactRepoManagerService);
+
+		IMetadataRepository metadataRepo = loadMetadataRepository(metadataManager);
+		IArtifactRepository artifactRepo = loadArtifactRepository(artifactManager);
 
 		try {
 			super.setDestination(getRootFolder());
@@ -86,18 +102,12 @@ public class BrandP2Task extends Repo2RunnableTask {
 		} catch (BuildException e) {
 			getProject().log(e.getMessage(), Project.MSG_WARN);
 		} finally {
-			try {
-				cleanupRepositories();
-			} catch (ProvisionException e) {
-				getProject().log(e.getMessage(), Project.MSG_WARN);
-			}
+			cleanupRepositories(metadataManager, artifactManager);
 			ius = null;
 		}
 	}
 
-	private void cleanupRepositories() throws ProvisionException {
-		IMetadataRepositoryManager metadataManager = Activator.getMetadataRepositoryManager();
-		IArtifactRepositoryManager artifactManager = Activator.getArtifactRepositoryManager();
+	private void cleanupRepositories(IMetadataRepositoryManager metadataManager, IArtifactRepositoryManager artifactManager) {
 		URI destination = new Path(getRootFolder()).toFile().toURI();
 
 		if (metadataManager != null) {
@@ -113,14 +123,10 @@ public class BrandP2Task extends Repo2RunnableTask {
 		}
 	}
 
-	private IArtifactRepository loadArtifactRepository() throws BuildException {
+	private IArtifactRepository loadArtifactRepository(IArtifactRepositoryManager manager) throws BuildException {
 		if (artifactURI == null)
 			throw new BuildException(TaskMessages.error_noArtifactRepo);
 
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) BundleHelper.getDefault().acquireService(IArtifactRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException(TaskMessages.error_artifactRepoManagerService);
-
 		removeArtifactRepo = !manager.contains(artifactURI);
 
 		IArtifactRepository repo = null;
@@ -136,14 +142,10 @@ public class BrandP2Task extends Repo2RunnableTask {
 		return repo;
 	}
 
-	private IMetadataRepository loadMetadataRepository() throws BuildException {
+	private IMetadataRepository loadMetadataRepository(IMetadataRepositoryManager manager) throws BuildException {
 		if (metadataURI == null)
 			throw new BuildException(TaskMessages.error_noMetadataRepo);
 
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) BundleHelper.getDefault().acquireService(IMetadataRepositoryManager.class.getName());
-		if (manager == null)
-			throw new BuildException(TaskMessages.error_metadataRepoManagerService);
-
 		removeMetadataRepo = !manager.contains(metadataURI);
 
 		IMetadataRepository repo = null;
@@ -209,16 +211,16 @@ public class BrandP2Task extends Repo2RunnableTask {
 		newIUDescription.setTouchpointType(originalIU.getTouchpointType());
 		newIUDescription.setFilter(originalIU.getFilter());
 
-		ITouchpointData[] data = brandTouchpointData(originalIU.getTouchpointData());
-		for (int i = 0; i < data.length; i++) {
-			newIUDescription.addTouchpointData(data[i]);
+		List data = brandTouchpointData(originalIU.getTouchpointData());
+		for (int i = 0; i < data.size(); i++) {
+			newIUDescription.addTouchpointData((ITouchpointData) data.get(i));
 		}
 
-		IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, newIUDescription.getId(), newIUDescription.getVersion());
+		IArtifactKey key = artifactRepo.createArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, newIUDescription.getId(), newIUDescription.getVersion());
 		newIUDescription.setArtifacts(new IArtifactKey[] {key});
 
 		IInstallableUnit newIU = MetadataFactory.createInstallableUnit(newIUDescription);
-		metadataRepo.addInstallableUnits(new IInstallableUnit[] {newIU});
+		metadataRepo.addInstallableUnits(Arrays.asList(new IInstallableUnit[] {newIU}));
 
 		ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
 		ZipOutputStream output = null;
@@ -247,7 +249,10 @@ public class BrandP2Task extends Repo2RunnableTask {
 	private static final String INSTALL = "install"; //$NON-NLS-1$
 	private static final String CONFIGURE = "configure"; //$NON-NLS-1$
 
-	private ITouchpointData[] brandTouchpointData(ITouchpointData[] data) {
+	private List/*<ITouchpointData>*/brandTouchpointData(Collection/*<ITouchpointData>*/data) {
+		ArrayList results = new ArrayList(data.size() + 1);
+		results.addAll(data);
+
 		boolean haveChmod = false;
 
 		String brandedLauncher = null;
@@ -258,12 +263,13 @@ public class BrandP2Task extends Repo2RunnableTask {
 		else
 			brandedLauncher = launcherName;
 
-		for (int i = 0; i < data.length; i++) {
-			Map instructions = new HashMap(data[i].getInstructions());
+		for (int i = 0; i < results.size(); i++) {
+			ITouchpointData td = (ITouchpointData) results.get(i);
+			Map instructions = new HashMap(td.getInstructions());
 
 			String[] phases = new String[] {INSTALL, CONFIGURE};
 			for (int phase = 0; phase < phases.length; phase++) {
-				ITouchpointInstruction instruction = data[i].getInstruction(phases[phase]);
+				ITouchpointInstruction instruction = td.getInstruction(phases[phase]);
 				if (instruction == null)
 					continue;
 
@@ -307,7 +313,7 @@ public class BrandP2Task extends Repo2RunnableTask {
 				}
 			}
 
-			data[i] = new TouchpointData(instructions);
+			results.set(i, new TouchpointData(instructions));
 		}
 
 		//add a chmod if there wasn't one before
@@ -316,12 +322,9 @@ public class BrandP2Task extends Repo2RunnableTask {
 			TouchpointInstruction newInstruction = new TouchpointInstruction(body, null);
 			Map instructions = new HashMap();
 			instructions.put(INSTALL, newInstruction);
-			ArrayList newData = new ArrayList(data.length + 1);
-			newData.addAll(Arrays.asList(data));
-			newData.add(new TouchpointData(instructions));
-			data = (ITouchpointData[]) newData.toArray(new ITouchpointData[newData.size()]);
+			results.add(new TouchpointData(instructions));
 		}
-		return data;
+		return results;
 	}
 
 	private String toString(String[] elements, String separator) {
@@ -406,7 +409,7 @@ public class BrandP2Task extends Repo2RunnableTask {
 	public void setMetadataRepository(String location) {
 		try {
 			this.metadataURI = URIUtil.fromString(location);
-			super.addMetadataSourceRepository(metadataURI);
+			super.addMetadataSourceRepository(metadataURI, false);
 		} catch (URISyntaxException e) {
 			throw new IllegalArgumentException("Metadata repository location (" + location + ") must be a URI."); //$NON-NLS-1$//$NON-NLS-2$
 		}
@@ -415,7 +418,7 @@ public class BrandP2Task extends Repo2RunnableTask {
 	public void setArtifactRepository(String location) {
 		try {
 			this.artifactURI = URIUtil.fromString(location);
-			super.addArtifactSourceRepository(artifactURI);
+			super.addArtifactSourceRepository(artifactURI, false);
 		} catch (URISyntaxException e) {
 			throw new IllegalArgumentException("Artifact repository location (" + location + ") must be a URI."); //$NON-NLS-1$//$NON-NLS-2$
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/FeaturesAndBundlesTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/FeaturesAndBundlesTask.java
index 8f62294..5672f53 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/FeaturesAndBundlesTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/FeaturesAndBundlesTask.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.publisher;
 
 import java.io.File;
@@ -27,6 +29,7 @@ public class FeaturesAndBundlesTask extends AbstractPublisherTask {
 	private URI siteXML = null;
 	private URI categoryXML = null;
 	private String siteQualifier = ""; //$NON-NLS-1$
+	private String categoryVersion = null;
 
 	public void execute() throws BuildException {
 		File[] f = getLocations(features);
@@ -37,10 +40,18 @@ public class FeaturesAndBundlesTask extends AbstractPublisherTask {
 			application.addAction(new FeaturesAction(f));
 		if (b.length > 0)
 			application.addAction(new BundlesAction(b));
-		if (siteXML != null)
-			application.addAction(new SiteXMLAction(siteXML, siteQualifier));
-		if (categoryXML != null)
-			application.addAction(new CategoryXMLAction(categoryXML, siteQualifier));
+		if (siteXML != null) {
+			SiteXMLAction action = new SiteXMLAction(siteXML, siteQualifier);
+			if (categoryVersion != null)
+				action.setCategoryVersion(categoryVersion);
+			application.addAction(action);
+		}
+		if (categoryXML != null) {
+			CategoryXMLAction action = new CategoryXMLAction(categoryXML, siteQualifier);
+			if (categoryVersion != null)
+				action.setCategoryVersion(categoryVersion);
+			application.addAction(action);
+		}
 
 		try {
 			application.run(getPublisherInfo());
@@ -93,6 +104,11 @@ public class FeaturesAndBundlesTask extends AbstractPublisherTask {
 		}
 	}
 
+	public void setCategoryVersion(String version) {
+		if (version != null && !version.startsWith(ANT_PREFIX))
+			categoryVersion = version;
+	}
+
 	public void setSite(String value) {
 		if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX)) {
 			try {
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/GatherFeatureTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/GatherFeatureTask.java
index 1fabf28..1f78117 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/GatherFeatureTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/publisher/GatherFeatureTask.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.publisher;
 
 import java.io.File;
@@ -36,8 +38,10 @@ public class GatherFeatureTask extends AbstractPublisherTask {
 		action.setComputer(computer);
 		setGroupId(action);
 
+		FeatureRootAdvice advice = createRootAdvice();
+		action.setRootAdvice(advice);
 		PublisherInfo info = getPublisherInfo();
-		info.addAdvice(createRootAdvice());
+		info.addAdvice(advice);
 		BuildPublisherApplication application = createPublisherApplication();
 		application.addAction(action);
 		try {
@@ -79,31 +83,28 @@ public class GatherFeatureTask extends AbstractPublisherTask {
 			return null;
 		}
 
-		if (include != null) {
-			GatheringComputer computer = new GatheringComputer();
+		GatheringComputer computer = new GatheringComputer();
 
-			FileSet fileSet = new FileSet();
-			fileSet.setProject(getProject());
-			fileSet.setDir(new File(buildResultFolder));
-			String[] splitIncludes = Utils.getArrayFromString(include);
-			for (int i = 0; i < splitIncludes.length; i++) {
-				String entry = splitIncludes[i];
-				if (entry.equals(ModelBuildScriptGenerator.DOT))
-					continue;
+		FileSet fileSet = new FileSet();
+		fileSet.setProject(getProject());
+		fileSet.setDir(new File(buildResultFolder));
+		String[] splitIncludes = Utils.getArrayFromString(include);
+		for (int i = 0; i < splitIncludes.length; i++) {
+			String entry = splitIncludes[i];
+			if (entry.equals(ModelBuildScriptGenerator.DOT))
+				continue;
 
-				NameEntry fileInclude = fileSet.createInclude();
-				fileInclude.setName(entry);
-			}
+			NameEntry fileInclude = fileSet.createInclude();
+			fileInclude.setName(entry);
+		}
 
-			String[] splitExcludes = Utils.getArrayFromString(exclude);
-			for (int i = 0; i < splitExcludes.length; i++) {
-				NameEntry fileExclude = fileSet.createExclude();
-				fileExclude.setName(splitIncludes[i]);
-			}
-			computer.addFiles(buildResultFolder, fileSet.getDirectoryScanner().getIncludedFiles());
-			return computer;
+		String[] splitExcludes = Utils.getArrayFromString(exclude);
+		for (int i = 0; i < splitExcludes.length; i++) {
+			NameEntry fileExclude = fileSet.createExclude();
+			fileExclude.setName(splitIncludes[i]);
 		}
-		return null;
+		computer.addFiles(buildResultFolder, fileSet.getDirectoryScanner().getIncludedFiles());
+		return computer;
 	}
 
 	private String reorderConfig(String config) {
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/AntScriptRunner.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/AntScriptRunner.java
new file mode 100644
index 0000000..ec3a438
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/AntScriptRunner.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.build.tasks;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.Ant;
+import org.apache.tools.ant.taskdefs.Property;
+import org.eclipse.pde.internal.build.ant.IScriptRunner;
+
+public class AntScriptRunner implements IScriptRunner {
+	private final Task parentTask;
+
+	public AntScriptRunner(Task parent) {
+		parentTask = parent;
+	}
+
+	public void runScript(File script, String target, Map properties) {
+		Ant task = new Ant();
+		task.setLocation(parentTask.getLocation());
+		task.setProject(parentTask.getProject());
+		task.init();
+
+		for (Iterator iterator = properties.entrySet().iterator(); iterator.hasNext();) {
+			Map.Entry entry = (Entry) iterator.next();
+			Property antProperty = task.createProperty();
+			antProperty.setName((String) entry.getKey());
+			antProperty.setValue((String) entry.getValue());
+		}
+
+		task.setTarget(target);
+		task.setInheritAll(false);
+		task.setInheritRefs(false);
+		task.setDir(script.getParentFile());
+		task.setAntfile(script.getName());
+		task.execute();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java
index ed9c1e0..4ac8159 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java
@@ -1,11 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: IBM - Initial API and implementation
- ******************************************************************************/
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.pde.internal.build.tasks;
 
 import java.io.File;
@@ -55,6 +57,10 @@ public class BuildScriptGeneratorTask extends Task {
 		generator.setFlattenDependencies(flatten);
 	}
 
+	public void setGenerateSourceReferences(boolean generateSourceRef) {
+		generator.setGenerateSourceReferences(generateSourceRef);
+	}
+
 	/**
 	 * Set the plug-in path to be the given value.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/CompileErrorTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/CompileErrorTask.java
new file mode 100644
index 0000000..ada3a39
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/CompileErrorTask.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.build.tasks;
+
+import java.io.*;
+import java.util.*;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.PatternSet;
+import org.apache.tools.ant.types.resources.Files;
+import org.apache.tools.ant.types.resources.Union;
+
+public class CompileErrorTask extends Task {
+	private static final Object LOCK = new Object();
+	private static final String NEW_LINE = System.getProperty("line.separator"); //$NON-NLS-1$
+	private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
+
+	private final Files problemFiles = new Files();
+	private String logFile = null;
+	private String bundle = null;
+
+	public void execute() {
+		if (logFile == null || logFile.startsWith(ANT_PREFIX) || problemFiles.size() == 0)
+			return;
+
+		Union union = new Union(problemFiles);
+		String[] prereqFiles = union.list();
+		List problems = new ArrayList();
+		BufferedReader reader = null;
+		for (int i = 0; i < prereqFiles.length; i++) {
+			File file = new File(prereqFiles[i]);
+			try {
+				reader = new BufferedReader(new FileReader(file));
+				String line = reader.readLine();
+				if (line != null)
+					problems.add(line);
+			} catch (IOException e) {
+				// 
+			} finally {
+				close(reader);
+			}
+		}
+
+		if (problems.size() > 0) {
+			File log = new File(logFile);
+			if (!log.getParentFile().exists())
+				log.getParentFile().mkdirs();
+			synchronized (LOCK) {
+				FileWriter writer = null;
+				try {
+					writer = new FileWriter(log, true);
+					writer.write(bundle + ": the following prerequisites contain compile errors" + NEW_LINE); //$NON-NLS-1$
+					for (Iterator iterator = problems.iterator(); iterator.hasNext();) {
+						writer.write("\t"); //$NON-NLS-1$
+						writer.write((String) iterator.next());
+						writer.write(NEW_LINE);
+					}
+				} catch (IOException e) {
+					// 
+				} finally {
+					close(writer);
+				}
+
+			}
+		}
+
+	}
+
+	private void close(Object o) {
+		if (o == null)
+			return;
+		try {
+			if (o instanceof Reader)
+				((Reader) o).close();
+			if (o instanceof Writer)
+				((Writer) o).close();
+		} catch (IOException e) {
+			// ignore
+		}
+
+	}
+
+	public void setBundle(String bundle) {
+		this.bundle = bundle;
+	}
+
+	public void setLog(String logFile) {
+		this.logFile = logFile;
+	}
+
+	public PatternSet.NameEntry createInclude() {
+		return problemFiles.createInclude();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/Config.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/Config.java
index ff29f98..091425f 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/Config.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/Config.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -13,9 +13,9 @@ package org.eclipse.pde.internal.build.tasks;
 public class Config {
 
 	public static String ANY = "*"; //$NON-NLS-1$
-	private String ws;
-	private String os;
-	private String arch;
+	private final String ws;
+	private final String os;
+	private final String arch;
 
 	private static Config genericConfig; //singleton
 
@@ -82,11 +82,11 @@ public class Config {
 		String newWs = ws;
 		String newArch = arch;
 
-		if (os == ANY)
+		if (ANY.equals(os))
 			newOs = value;
-		if (ws == ANY)
+		if (ANY.equals(ws))
 			newWs = value;
-		if (arch == ANY)
+		if (ANY.equals(arch))
 			newArch = value;
 
 		return newOs + separator + newWs + separator + newArch;
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FeatureGeneratorTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FeatureGeneratorTask.java
index 826f221..78ab9e1 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FeatureGeneratorTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FeatureGeneratorTask.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -24,6 +24,7 @@ import org.eclipse.pde.internal.build.site.ProfileManager;
  * @since 3.2
  */
 public class FeatureGeneratorTask extends Task {
+	private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
 	private final FeatureGenerator generator = new FeatureGenerator();
 	private final Properties antProperties = new Properties();
 
@@ -92,7 +93,7 @@ public class FeatureGeneratorTask extends Task {
 	 * @param pluginList a comma separated list of plugin ids
 	 */
 	public void setPluginList(String pluginList) {
-		if (pluginList != null && !pluginList.startsWith("${")) //$NON-NLS-1$
+		if (pluginList != null && !pluginList.startsWith(ANT_PREFIX))
 			generator.setPluginList(Utils.getArrayFromString(pluginList));
 	}
 
@@ -101,7 +102,7 @@ public class FeatureGeneratorTask extends Task {
 	 * @param fragmentList a comma separated list of plugin ids
 	 */
 	public void setFragmentList(String fragmentList) {
-		if (fragmentList != null && !fragmentList.startsWith("${")) //$NON-NLS-1$
+		if (fragmentList != null && !fragmentList.startsWith(ANT_PREFIX))
 			generator.setFragmentList(Utils.getArrayFromString(fragmentList));
 	}
 
@@ -110,7 +111,7 @@ public class FeatureGeneratorTask extends Task {
 	 * @param featureList a comma separated list of feature ids
 	 */
 	public void setFeatureList(String featureList) {
-		if (featureList != null && !featureList.startsWith("${")) //$NON-NLS-1$
+		if (featureList != null && !featureList.startsWith(ANT_PREFIX))
 			generator.setFeatureList(Utils.getArrayFromString(featureList));
 	}
 
@@ -155,4 +156,13 @@ public class FeatureGeneratorTask extends Task {
 	public void setBuildPropertiesFile(String buildPropertiesFile) {
 		generator.setBuildProperties(buildPropertiesFile);
 	}
+
+	public void setNestedInclusions(String nested) {
+		if (nested != null && !nested.startsWith(ANT_PREFIX))
+			generator.setNestedInclusions(nested);
+	}
+
+	public void setFilterP2Base(boolean value) {
+		generator.setFilterP2Base(value);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FetchTask.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FetchTask.java
index a361675..5aea4d4 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FetchTask.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/FetchTask.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -99,6 +99,7 @@ public class FetchTask extends Task {
 	public void execute() throws BuildException {
 		try {
 			BundleHelper.getDefault().setLog(this);
+			generator.setScriptRunner(new AntScriptRunner(this));
 			generator.generate();
 			BundleHelper.getDefault().setLog(null);
 		} catch (CoreException e) {
@@ -125,7 +126,7 @@ public class FetchTask extends Task {
 	public void setPluginPath(String pluginPath) {
 		generator.setPluginPath(Utils.getArrayFromString(pluginPath, File.pathSeparator));
 	}
-	
+
 	/** 
 	 * Set the configuration for which the script should be generated. The default is set to be configuration independent.
 	 * @param configInfo an ampersand separated list of configuration (for example win32, win32, x86 & macoxs, carbon, ppc).
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/GenericVersionReplacer.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/GenericVersionReplacer.java
index 00beff9..4a6bf7f 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/GenericVersionReplacer.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/GenericVersionReplacer.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2005 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.tasks;
@@ -24,6 +24,7 @@ public class GenericVersionReplacer extends Task {
 	private static final String MANIFEST = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
 	private String rootPath;
 	private String version;
+	private String attributes;
 
 	public void execute() {
 		File root = new File(rootPath);
@@ -58,6 +59,8 @@ public class GenericVersionReplacer extends Task {
 		modifier.setProject(getProject());
 		modifier.setManifestLocation(path);
 		modifier.setKeyValue("Bundle-Version|" + version); //$NON-NLS-1$
+		if (attributes != null)
+			modifier.setKeyValue(attributes);
 		modifier.execute();
 	}
 
@@ -76,4 +79,8 @@ public class GenericVersionReplacer extends Task {
 	public void setVersion(String version) {
 		this.version = version;
 	}
+
+	public void setAttributes(String attributes) {
+		this.attributes = attributes;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/ManifestModifier.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/ManifestModifier.java
index c2fc30b..307f783 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/ManifestModifier.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/ManifestModifier.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
@@ -69,7 +69,7 @@ public class ManifestModifier extends Task {
 				os.close();
 			}
 		} catch (IOException e1) {
-			new BuildException("Problem writing the content of the manifest : " + manifestLocation); //$NON-NLS-1$
+			throw new BuildException("Problem writing the content of the manifest : " + manifestLocation); //$NON-NLS-1$
 		}
 	}
 
@@ -102,7 +102,7 @@ public class ManifestModifier extends Task {
 				is.close();
 			}
 		} catch (IOException e) {
-			new BuildException("Problem reading the content of the manifest : " + manifestLocation); //$NON-NLS-1$
+			throw new BuildException("Problem reading the content of the manifest : " + manifestLocation); //$NON-NLS-1$
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/SimpleBuildLogger.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/SimpleBuildLogger.java
index b588140..be6d9e6 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/SimpleBuildLogger.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/SimpleBuildLogger.java
@@ -1,17 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM - Initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.build.tasks;
 
 import java.io.PrintStream;
-import org.apache.tools.ant.*;
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.BuildLogger;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.osgi.util.NLS;
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/TaskMessages.java b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/TaskMessages.java
index 032a357..55716cb 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/TaskMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/TaskMessages.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -24,6 +24,7 @@ public class TaskMessages extends NLS {
 	public static String error_noArtifactRepo;
 	public static String error_noMetadataRepo;
 	public static String error_metadataRepoManagerService;
+	public static String error_agentService;
 	public static String error_artifactRepoManagerService;
 	public static String error_loadRepository;
 	public static String error_unmodifiableRepository;
@@ -31,6 +32,11 @@ public class TaskMessages extends NLS {
 	public static String error_invalidConfig;
 	public static String error_branding;
 
+	public static String error_callingGenerator;
+	public static String error_artifactRepoNotURI;
+	public static String error_metadataRepoNotURI;
+	public static String error_locationNotURI;
+
 	static {
 		// load message values from bundle file
 		NLS.initializeMessages(BUNDLE_NAME, TaskMessages.class);
diff --git a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/messages.properties b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/messages.properties
index b281414..158b9a7 100644
--- a/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/messages.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
@@ -22,6 +22,12 @@ error_metadataRepoManagerService = Unable to acquire artifact repository manager
 error_artifactRepoManagerService = Unable to acquire metadata repository manager service.
 error_loadRepository = Unable to load repository: {0}.
 error_unmodifiableRepository = The repository is not modifiable: {0}.
+error_agentService = Unable to acquire a provisioning agent.
 
 error_invalidConfig = {0} is not a valid configuration.
-error_branding = An error occured while branding.
\ No newline at end of file
+error_branding = An error occured while branding.
+error_callingGenerator = An error occurred when calling generator.
+
+error_artifactRepoNotURI= The specified artifact repository location ({0}) is not a valid URI.
+error_metadataRepoNotURI= The specified metadata repository location ({0}) is not a valid URI.
+error_locationNotURI= The specified location ({0}) is not a valid URI.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.build/templates/headless-build/build.properties b/eclipse/plugins/org.eclipse.pde.build/templates/headless-build/build.properties
index 1404821..45a1813 100644
--- a/eclipse/plugins/org.eclipse.pde.build/templates/headless-build/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.build/templates/headless-build/build.properties
@@ -1,10 +1,10 @@
 ###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
+# Copyright (c) 2003, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
-# 
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
diff --git a/eclipse/plugins/org.eclipse.pde.build/templates/plugins/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.pde.build/templates/plugins/customBuildCallbacks.xml
index 385b1cf..db9b2e1 100644
--- a/eclipse/plugins/org.eclipse.pde.build/templates/plugins/customBuildCallbacks.xml
+++ b/eclipse/plugins/org.eclipse.pde.build/templates/plugins/customBuildCallbacks.xml
@@ -78,7 +78,7 @@
 	<!-- Steps to do after the compilation target <name>                       -->
 	<!-- Substitute "name" with the name of the compilation target, eg @dot    -->
 	<!-- Available parameters :                                                -->
-	<!--   jar.location - the location of the compilation results              -->
+	<!--   jar.Location - the location of the compilation results              -->
 	<!--   <name>.classpath : name = name of the compilation target. A         -->
 	<!--                      reference to the classpath structure.            -->
 	<!-- ===================================================================== -->
diff --git a/eclipse/plugins/org.eclipse.pde.core/.settings/.api_filters b/eclipse/plugins/org.eclipse.pde.core/.settings/.api_filters
deleted file mode 100644
index 13251b1..0000000
--- a/eclipse/plugins/org.eclipse.pde.core/.settings/.api_filters
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.pde.core" version="2">
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginModelFactory.java" type="org.eclipse.pde.core.plugin.IPluginModelFactory">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginModelFactory"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginModel.java" type="org.eclipse.pde.core.plugin.IPluginModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginExtensionPoint.java" type="org.eclipse.pde.core.plugin.IPluginExtensionPoint">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginExtensionPoint"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginBase.java" type="org.eclipse.pde.core.plugin.IPluginBase">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginBase"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/build/IBuildModel.java" type="org.eclipse.pde.core.build.IBuildModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.build.IBuildModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IExtensions.java" type="org.eclipse.pde.core.plugin.IExtensions">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IExtensions"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginParent.java" type="org.eclipse.pde.core.plugin.IPluginParent">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginParent"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginModelBase.java" type="org.eclipse.pde.core.plugin.IPluginModelBase">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginModelBase"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/build/IBuild.java" type="org.eclipse.pde.core.build.IBuild">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.build.IBuild"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/build/IBuildEntry.java" type="org.eclipse.pde.core.build.IBuildEntry">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.build.IBuildEntry"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/ISourceObject.java" type="org.eclipse.pde.core.ISourceObject">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.ISourceObject"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IExtensionsModelFactory.java" type="org.eclipse.pde.core.plugin.IExtensionsModelFactory">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IExtensionsModelFactory"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/ISharedExtensionsModel.java" type="org.eclipse.pde.core.plugin.ISharedExtensionsModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.ISharedExtensionsModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginReference.java" type="org.eclipse.pde.core.plugin.IPluginReference">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginReference"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginLibrary.java" type="org.eclipse.pde.core.plugin.IPluginLibrary">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginLibrary"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IEditableModel.java" type="org.eclipse.pde.core.IEditableModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IEditableModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/build/IBuildModelFactory.java" type="org.eclipse.pde.core.build.IBuildModelFactory">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.build.IBuildModelFactory"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/ISharedPluginModel.java" type="org.eclipse.pde.core.plugin.ISharedPluginModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.ISharedPluginModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginElement.java" type="org.eclipse.pde.core.plugin.IPluginElement">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginElement"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginAttribute.java" type="org.eclipse.pde.core.plugin.IPluginAttribute">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginAttribute"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IEditable.java" type="org.eclipse.pde.core.IEditable">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IEditable"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelProviderListener.java" type="org.eclipse.pde.core.IModelProviderListener">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelProviderListener"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IFragmentModel.java" type="org.eclipse.pde.core.plugin.IFragmentModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IFragmentModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginImport.java" type="org.eclipse.pde.core.plugin.IPluginImport">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginImport"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelChangedEvent.java" type="org.eclipse.pde.core.IModelChangedEvent">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelChangedEvent"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IFragment.java" type="org.eclipse.pde.core.plugin.IFragment">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IFragment"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IIdentifiable.java" type="org.eclipse.pde.core.IIdentifiable">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IIdentifiable"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IBaseModel.java" type="org.eclipse.pde.core.IBaseModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IBaseModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/ModelChangedEvent.java" type="org.eclipse.pde.core.ModelChangedEvent">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.ModelChangedEvent"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginObject.java" type="org.eclipse.pde.core.plugin.IPluginObject">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginObject"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPluginExtension.java" type="org.eclipse.pde.core.plugin.IPluginExtension">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPluginExtension"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelChangedListener.java" type="org.eclipse.pde.core.IModelChangedListener">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelChangedListener"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModel.java" type="org.eclipse.pde.core.IModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IMatchRules.java" type="org.eclipse.pde.core.plugin.IMatchRules">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IMatchRules"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelChangeProvider.java" type="org.eclipse.pde.core.IModelChangeProvider">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelChangeProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelProviderEvent.java" type="org.eclipse.pde.core.IModelProviderEvent">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelProviderEvent"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IModelProvider.java" type="org.eclipse.pde.core.IModelProvider">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IModelProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/IWritable.java" type="org.eclipse.pde.core.IWritable">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.IWritable"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IExtensionsModel.java" type="org.eclipse.pde.core.plugin.IExtensionsModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IExtensionsModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/core/plugin/IPlugin.java" type="org.eclipse.pde.core.plugin.IPlugin">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.core.plugin.IPlugin"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.prefs
index 443c97c..63cf819 100644
--- a/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.prefs
@@ -1,16 +1,28 @@
-#Wed Jan 02 09:59:17 CST 2008
+#Mon Dec 14 12:08:37 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
 compilers.p.missing-bundle-classpath-entries=2
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=0
 compilers.p.unknown-attribute=1
 compilers.p.unknown-class=0
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.pde.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.core/META-INF/MANIFEST.MF
index 24f85c3..589d6da 100644
--- a/eclipse/plugins/org.eclipse.pde.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.core; singleton:=true
-Bundle-Version: 3.5.101.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Activator: org.eclipse.pde.internal.core.PDECore
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
@@ -10,27 +10,31 @@ Export-Package:
  org.eclipse.pde.core,
  org.eclipse.pde.core.build,
  org.eclipse.pde.core.plugin,
- org.eclipse.pde.internal.core;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.runtime",
+ org.eclipse.pde.core.project,
+ org.eclipse.pde.internal.core;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.runtime,org.eclipse.pde.launching",
  org.eclipse.pde.internal.core.build;x-friends:="org.eclipse.pde.ui",
- org.eclipse.pde.internal.core.builders;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.core.builders;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.launching",
  org.eclipse.pde.internal.core.bundle;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.content;x-internal:=true,
  org.eclipse.pde.internal.core.converter;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.exports;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.feature;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.ibundle;x-friends:="org.eclipse.pde.ui",
- org.eclipse.pde.internal.core.ifeature;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.core.ifeature;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.launching",
+ org.eclipse.pde.internal.core.importing;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.core.importing.provisional;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.iproduct;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.ischema;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.isite;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.natures;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.plugin;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.product;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.core.project;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.launching",
  org.eclipse.pde.internal.core.schema;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.search;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.site;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.target;x-friends:="org.eclipse.pde.ui",
- org.eclipse.pde.internal.core.target.provisional;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.api.tools.ui",
+ org.eclipse.pde.internal.core.target.provisional;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.api.tools.ui,org.eclipse.pde.launching",
  org.eclipse.pde.internal.core.text;
   x-friends:="org.eclipse.pde.ui,
    org.eclipse.pde.ds.core,
@@ -40,7 +44,7 @@ Export-Package:
  org.eclipse.pde.internal.core.text.build;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.text.bundle;x-friends:="org.eclipse.pde.ui",
  org.eclipse.pde.internal.core.text.plugin;x-friends:="org.eclipse.pde.ui",
- org.eclipse.pde.internal.core.util;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.ua.ui",
+ org.eclipse.pde.internal.core.util;x-friends:="org.eclipse.pde.ui,org.eclipse.pde.ua.ui,org.eclipse.pde.launching",
  org.eclipse.pde.internal.core.variables;x-internal:=true
 Require-Bundle: 
  org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
@@ -54,17 +58,18 @@ Require-Bundle:
  org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.pde.build;bundle-version="[3.2.0,4.1.0)",
  org.eclipse.ant.core;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.simpleconfigurator.manipulator;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
  org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.engine;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.core;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.p2.director;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.director;bundle-version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.artifact.repository;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.repository;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0]",
  org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.garbagecollector;bundle-version="[1.0.100,2.0.0)"
+ org.eclipse.equinox.p2.garbagecollector;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.p2.touchpoint.eclipse;bundle-version="[2.0.0,3.0.0)"
 Eclipse-LazyStart: true
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: com.ibm.icu.util
diff --git a/eclipse/plugins/org.eclipse.pde.core/macosx/Info.plist b/eclipse/plugins/org.eclipse.pde.core/macosx/Info.plist
index 79b95d9..f2d4eca 100644
--- a/eclipse/plugins/org.eclipse.pde.core/macosx/Info.plist
+++ b/eclipse/plugins/org.eclipse.pde.core/macosx/Info.plist
@@ -6,7 +6,7 @@
 	<key>CFBundleExecutable</key>
 		<string>eclipse</string>
 	<key>CFBundleGetInfoString</key>
-		<string>Eclipse 3.3 for Mac OS X, Copyright IBM Corp. and others 2002, 2007. All rights reserved.</string>
+		<string>Eclipse 3.6 for Mac OS X, Copyright IBM Corp. and others 2002, 2010. All rights reserved.</string>
 	<key>CFBundleIconFile</key>
 		<string>Eclipse.icns</string>
 	<key>CFBundleIdentifier</key>
@@ -18,11 +18,39 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>3.3</string>
+		<string>3.6</string>
 	<key>CFBundleSignature</key>
 		<string>????</string>
 	<key>CFBundleVersion</key>
-		<string>3.3</string>
+		<string>3.6</string>
+	<key>CFBundleLocalizations</key>
+		<array>
+			<string>ar</string>
+			<string>cs</string>
+			<string>da</string>
+			<string>el</string>
+			<string>en</string>
+			<string>es</string>
+			<string>de</string>
+			<string>fi</string>
+			<string>fr</string>
+			<string>hu</string>
+			<string>it</string>
+			<string>iw</string>
+			<string>ja</string>
+			<string>ko</string>
+			<string>nl</string>
+			<string>no</string>
+			<string>pl</string>
+			<string>pt_BR</string>
+			<string>pt</string>
+			<string>ru</string>
+			<string>sv</string>
+			<string>tr</string>
+			<string>zh_HK</string>
+			<string>zh_TW</string>
+			<string>zh</string>
+		</array>
 		
 	<key>Eclipse</key>
 		<array>
diff --git a/eclipse/plugins/org.eclipse.pde.core/plugin.properties b/eclipse/plugins/org.eclipse.pde.core/plugin.properties
index 61d2239..bd102fd 100644
--- a/eclipse/plugins/org.eclipse.pde.core/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.core/plugin.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2000, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
@@ -18,6 +18,9 @@ provider-name = Eclipse.org
 expoint.source.name = Code Source Locations
 expoint.javadoc.name = Javadoc Locations
 expoint.target.name = Target Profiles
+expoint.bundleImporters.name = Bundle Importers
+
+bundleImporter.cvs = CVS Bundle Importer
 
 target.name.0 = Base RCP (with Source)
 target.name.1 = Base RCP (Binary Only)
diff --git a/eclipse/plugins/org.eclipse.pde.core/plugin.xml b/eclipse/plugins/org.eclipse.pde.core/plugin.xml
index 63b3035..9819d4b 100644
--- a/eclipse/plugins/org.eclipse.pde.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.core/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?><!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@
      <extension-point id="source" name="%expoint.source.name" schema="schema/source.exsd"/>
      <extension-point id="javadoc" name="%expoint.javadoc.name" schema="schema/javadoc.exsd"/>
      <extension-point id="targets" name="%expoint.target.name" schema="schema/targets.exsd"/>
+     <extension-point id="bundleImporters" name="%expoint.bundleImporters.name" schema="schema/bundleImporters.exsd"/>
 
    <extension
          point="org.eclipse.jdt.core.classpathVariableInitializer">
@@ -334,5 +335,31 @@
          </describer>
       </content-type>
     </extension>
+    <!-- Make sure that the web-tools don't create the document:
+         https://bugs.eclipse.org/bugs/show_bug.cgi?id=307524 -->
+    <extension point="org.eclipse.core.filebuffers.documentCreation">
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.pluginManifest"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.fragmentManifest"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.featureManifest"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.siteManifest"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.productFile"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.targetFile"/>
+      <factory class="org.eclipse.pde.internal.core.content.DefaultDocumentFactory"
+               contentTypeId="org.eclipse.pde.schema"/>
+    </extension>
+   <extension
+         point="org.eclipse.pde.core.bundleImporters">
+      <importer
+            class="org.eclipse.pde.internal.core.importing.CvsBundleImporterDelegate"
+            name="%bundleImporter.cvs"
+            id="org.eclipse.pde.core.cvs.importer">
+      </importer>
+   </extension>
    
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.pde.core/schema/bundleImporters.exsd b/eclipse/plugins/org.eclipse.pde.core/schema/bundleImporters.exsd
new file mode 100644
index 0000000..8b5e9c3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/schema/bundleImporters.exsd
@@ -0,0 +1,156 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.pde.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.pde.core" id="bundleImporters" name="Bundle Importers"/>
+      </appInfo>
+      <documentation>
+         <strong>EXPERIMENTAL</strong>. This extension point has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same in future releases. Please do not use this API without consulting with the PDE team.
+<p>
+A bundle importer is capable of creating a project in the workspace based on a bundle manifest. For example, the CVS bundle importer leverages the 'Eclipse-SourceReferences' header to import projects from CVS.
+</p>
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element internal="true" />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="1" maxOccurs="unbounded">
+            <element ref="importer"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="importer">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Fully qualified name of a Java class providing an implementation of <code>org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate</code> for this handler.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Unique identifier for this project factory extension.
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="description" type="string">
+            <annotation>
+               <documentation>
+                  A short description of this importer suitable for display to the end user.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The name of this bundle importer, suitable for display to an end user.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.6
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of a bundle importer extension.
+
+<p>
+<pre>
+ <extension point="org.eclipse.pde.core.bundleImporters">
+  <importer
+   id="com.example.ExampleIdentifier"
+   class="com.example.ExampleBundleImporter">
+  </importer>
+ </extension>
+</pre>
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         Value of a importer's <b>class</b> attribute must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate</b>.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         PDE provides a bundle importer extension capable of importing projects from CVS referenced by 'Eclipse-SourceReferences' headers.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.
+<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuild.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuild.java
index 235eec3..164ac01 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuild.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuild.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import org.eclipse.pde.core.IWritable;
 
 /**
  * The top-level model object of the model that is created from
- * "build.properties" file.
+ * <code>build.properties</code> file.
  *  
  *  @noimplement This interface is not intended to be implemented by clients.
  *  @noextend This interface is not intended to be extended by clients.
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuildModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuildModel.java
index 04e3208..469fa97 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuildModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/build/IBuildModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IModelChangeProvider;
 
 /**
- * This model is created from the "build.properties" file
+ * This model is created from the <code>build.properties</code> file
  * that defines what source folders in the plug-in are
  * to be used to build require plug-in Jars.
  * <p>
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/plugin/PluginRegistry.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/plugin/PluginRegistry.java
index da941ab..d8bdd98 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/plugin/PluginRegistry.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/plugin/PluginRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,14 @@
  *******************************************************************************/
 package org.eclipse.pde.core.plugin;
 
+import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.VersionRange;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.util.VersionUtil;
+import org.osgi.framework.Version;
 
 /**
  * The central access point for models representing plug-ins found in the workspace
@@ -30,6 +35,29 @@ import org.eclipse.pde.internal.core.PDECore;
 public class PluginRegistry {
 
 	/**
+	 * Filter used when searching for plug-in models.
+	 * <p>
+	 * Clients may subclass this class to implement custom filters.
+	 * </p>
+	 * @see PluginRegistry#findModel(String, String, int, PluginFilter)
+	 * @see PluginRegistry#findModel(String, VersionRange, PluginFilter)
+	 * @since 3.6
+	 */
+	public static class PluginFilter {
+
+		/**
+		 * Returns whether the given model is accepted by this filter.
+		 * 
+		 * @param model plug-in model
+		 * @return whether accepted by this filter
+		 */
+		public boolean accept(IPluginModelBase model) {
+			return true;
+		}
+
+	}
+
+	/**
 	 * Returns a model entry containing all workspace and target plug-ins by the given ID
 	 * 
 	 * @param id the plug-in ID
@@ -185,4 +213,179 @@ public class PluginRegistry {
 		return PDECore.getDefault().getModelManager().getExternalModels();
 	}
 
+	/**
+	 * Returns whether the given model matches the given id, version, and match rule.
+	 * 
+	 * @param base match candidate
+	 * @param id id to match
+	 * @param version version to match or <code>null</code>
+	 * @param match version match rule
+	 * @return whether the model is a match
+	 */
+	private static boolean isMatch(IPluginBase base, String id, String version, int match) {
+		// if version is null, then match any version with same ID
+		if (base == null) {
+			return false; // guard against invalid plug-ins
+		}
+		if (base.getId() == null) {
+			return false; // guard against invalid plug-ins
+		}
+		if (version == null)
+			return base.getId().equals(id);
+		return VersionUtil.compare(base.getId(), base.getVersion(), id, version, match);
+	}
+
+	/**
+	 * Returns a model matching the given id, version, match rule, and optional filter,
+	 * or <code>null</code> if none.
+	 * p>
+	 * A workspace plug-in is always preferably returned over a target plug-in.
+	 * A plug-in that is checked/enabled on the Target Platform preference page is always
+	 * preferably returned over a target plug-in that is unchecked/disabled.
+	 * </p>
+	 * <p>
+	 * In the case of a tie among workspace plug-ins or among target plug-ins,
+	 * the plug-in with the highest version is returned.
+	 * </p>
+	 * <p>
+	 * In the case of a tie among more than one suitable plug-in that have the same version, 
+	 * one of those plug-ins is randomly returned.
+	 * </p>
+	 * 
+	 * @param id symbolic name of a plug-in to find
+	 * @param version minimum version, or <code>null</code> to only match on symbolic name
+	 * @param match one of {@link IMatchRules#COMPATIBLE}, {@link IMatchRules#EQUIVALENT},
+	 *  {@link IMatchRules#GREATER_OR_EQUAL}, {@link IMatchRules#PERFECT}, or {@link IMatchRules#NONE}
+	 *  when a version is unspecified
+	 * @param filter a plug-in filter or <code>null</code> 
+	 * 
+	 * @return a matching model or <code>null</code>
+	 * @since 3.6
+	 */
+	public static IPluginModelBase findModel(String id, String version, int match, PluginFilter filter) {
+		return getMax(findModels(id, version, match, filter));
+	}
+
+	/**
+	 * Returns all models matching the given id, version, match rule, and optional filter.
+	 * <p>
+	 * Target (external) plug-ins/fragments with the same ID as workspace counterparts are not
+	 * considered.
+	 * </p>
+	 * <p>
+	 * Returns plug-ins regardless of whether they are checked/enabled or unchecked/disabled
+	 * on the Target Platform preference page.
+	 * </p>
+	 * @param id symbolic name of a plug-ins to find
+	 * @param version minimum version, or <code>null</code> to only match on symbolic name
+	 * @param match one of {@link IMatchRules#COMPATIBLE}, {@link IMatchRules#EQUIVALENT},
+	 *  {@link IMatchRules#GREATER_OR_EQUAL}, {@link IMatchRules#PERFECT}, or {@link IMatchRules#NONE}
+	 *  when a version is unspecified
+	 * @param filter a plug-in filter or <code>null</code> 
+	 * 
+	 * @return a matching models, possibly an empty collection
+	 * @since 3.6
+	 */
+	public static IPluginModelBase[] findModels(String id, String version, int match, PluginFilter filter) {
+		IPluginModelBase[] models = PluginRegistry.getAllModels();
+		List results = new ArrayList();
+		for (int i = 0; i < models.length; i++) {
+			IPluginModelBase model = models[i];
+			if ((filter == null || filter.accept(model)) && isMatch(model.getPluginBase(), id, version, match))
+				results.add(model);
+		}
+		return (IPluginModelBase[]) results.toArray(new IPluginModelBase[results.size()]);
+	}
+
+	/**
+	 * Returns a model matching the given id, version range, and optional filter,
+	 * or <code>null</code> if none.
+	 * <p>
+	 * A workspace plug-in is always preferably returned over a target plug-in.
+	 * A plug-in that is checked/enabled on the Target Platform preference page is always
+	 * preferably returned over a target plug-in that is unchecked/disabled.
+	 * </p>
+	 * <p>
+	 * In the case of a tie among workspace plug-ins or among target plug-ins,
+	 * the plug-in with the highest version is returned.
+	 * </p>
+	 * <p>
+	 * In the case of a tie among more than one suitable plug-in that have the same version, 
+	 * one of those plug-ins is randomly returned.
+	 * </p>
+	 * @param id symbolic name of plug-in to find
+	 * @param range acceptable version range to match, or <code>null</code> for any range
+	 * @param filter a plug-in filter or <code>null</code>
+	 * 
+	 * @return a matching model or <code>null</code>
+	 * @since 3.6
+	 */
+	public static IPluginModelBase findModel(String id, VersionRange range, PluginFilter filter) {
+		return getMax(findModels(id, range, filter));
+	}
+
+	/**
+	 * Returns the plug-in with the highest version, or <code>null</code> if empty.
+	 * 
+	 * @param models models
+	 * @return plug-in with the highest version or <code>null</code>
+	 */
+	private static IPluginModelBase getMax(IPluginModelBase[] models) {
+		if (models.length == 0) {
+			return null;
+		}
+		if (models.length == 1) {
+			return models[0];
+		}
+		IPluginModelBase max = null;
+		Version maxV = null;
+		for (int i = 0; i < models.length; i++) {
+			IPluginModelBase model = models[i];
+			String versionStr = model.getPluginBase().getVersion();
+			Version version = VersionUtil.validateVersion(versionStr).isOK() ? new Version(versionStr) : Version.emptyVersion;
+			if (max == null) {
+				max = model;
+				maxV = version;
+			} else {
+				if (VersionUtil.isGreaterOrEqualTo(version, maxV)) {
+					max = model;
+					maxV = version;
+				}
+			}
+		}
+		return max;
+	}
+
+	/**
+	 * Returns all models matching the given id, version range, and optional filter.
+	 * <p>
+	 * Target (external) plug-ins/fragments with the same ID as workspace counterparts are not
+	 * considered.
+	 * </p>
+	 * <p>
+	 * Returns plug-ins regardless of whether they are checked/enabled or unchecked/disabled
+	 * on the Target Platform preference page.
+	 * </p>
+	 * @param id symbolic name of plug-ins to find
+	 * @param range acceptable version range to match, or <code>null</code> for any range
+	 * @param filter a plug-in filter or <code>null</code>
+	 * 
+	 * @return a matching models, possibly empty
+	 * @since 3.6
+	 */
+	public static IPluginModelBase[] findModels(String id, VersionRange range, PluginFilter filter) {
+		IPluginModelBase[] models = PluginRegistry.getAllModels();
+		List results = new ArrayList();
+		for (int i = 0; i < models.length; i++) {
+			IPluginModelBase model = models[i];
+			if ((filter == null || filter.accept(model)) && id.equals(model.getPluginBase().getId())) {
+				String versionStr = model.getPluginBase().getVersion();
+				Version version = VersionUtil.validateVersion(versionStr).isOK() ? new Version(versionStr) : Version.emptyVersion;
+				if (range == null || range.isIncluded(version)) {
+					results.add(model);
+				}
+			}
+		}
+		return (IPluginModelBase[]) results.toArray(new IPluginModelBase[results.size()]);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleClasspathEntry.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleClasspathEntry.java
new file mode 100644
index 0000000..1f11a96
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleClasspathEntry.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * Specifies the origin of source, class files, and/or archive for an entry
+ * on the Bundle-Classpath header. Instances of this class can be created
+ * via {@link IBundleProjectService#newBundleClasspathEntry(IPath, IPath, IPath)}.
+ * 
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IBundleClasspathEntry {
+
+	/**
+	 * Returns a project relative path for a folder containing source code targeted for
+	 * the library this entry describes, or <code>null</code> if there is no source for
+	 * the entry.
+	 * <p>
+	 * When a {@link #getSourcePath()} is specified, the binary path specifies the output
+	 * folder for the source, and in this case <code>null</code> indicates the associated
+	 * Java project's default build path output folder.
+	 * <p>
+	 * @return project relative path of folder containing source code or <code>null</code>
+	 */
+	public IPath getSourcePath();
+
+	/**
+	 * Returns a project relative path for a folder or archive containing class files and
+	 * resource files targeted for the library this entry describes.
+	 * <p>
+	 * When a {@link #getSourcePath()} is specified, the binary path specifies the output
+	 * folder for the source, and in this case <code>null</code> indicates the associated
+	 * Java project's default build path output folder. When a {@link #getSourcePath()} is
+	 * not specified, the binary path specifies a folder of class files.
+	 * </p>
+	 * @return project relative class file folder, archive or <code>null</code> to indicate
+	 *  default build path output folder
+	 */
+	public IPath getBinaryPath();
+
+	/**
+	 * Returns the library on the Bundle-Classpath header the source and/binary files are targeted for
+	 * or <code>null</code> to indicate the default entry <code>"."</code>.
+	 * <p>
+	 * When a {@link #getSourcePath()} or {@link #getBinaryPath()} is specified, this indicates that
+	 * the library will be generated from source or binaries. When neither {@link #getSourcePath()}
+	 * or {@link #getBinaryPath()} are specified, it indicates the library is contained in the
+	 * project as an archive at the specified location.  
+	 * </p>
+	 * @return Bundle-Classpath library or <code>null</code>
+	 */
+	public IPath getLibrary();
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectDescription.java
new file mode 100644
index 0000000..a83c0b2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectDescription.java
@@ -0,0 +1,612 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import java.net.URI;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.natures.PDE;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
+
+/**
+ * Describes a project representing an OSGi bundle. Used to create or modify
+ * artifacts associated with a bundle project. A bundle project description can be
+ * created for an {@link IProject} via {@link IBundleProjectService#getDescription(IProject)}.
+ * 
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IBundleProjectDescription {
+	/**
+	 * Identifies bundles developed for Eclipse 3.0, value is <code>"3.0"</code>.
+	 */
+	public static final String VERSION_3_0 = ICoreConstants.TARGET30;
+	/**
+	 * Identifies bundles developed for Eclipse 3.1, value is <code>"3.1"</code>.
+	 */
+	public static final String VERSION_3_1 = ICoreConstants.TARGET31;
+	/**
+	 * Identifies bundles developed for Eclipse 3.2, value is <code>"3.2"</code>.
+	 */
+	public static final String VERSION_3_2 = ICoreConstants.TARGET32;
+	/**
+	 * Identifies bundles developed for Eclipse 3.3, value is <code>"3.3"</code>.
+	 */
+	public static final String VERSION_3_3 = ICoreConstants.TARGET33;
+	/**
+	 * Identifies bundles developed for Eclipse 3.4, value is <code>"3.4"</code>.
+	 */
+	public static final String VERSION_3_4 = ICoreConstants.TARGET34;
+	/**
+	 * Identifies bundles developed for Eclipse 3.5, value is <code>"3.5"</code>.
+	 */
+	public static final String VERSION_3_5 = ICoreConstants.TARGET35;
+	/**
+	 * Identifies bundles developed for Eclipse 3.6, value is <code>"3.6"</code>.
+	 */
+	public static final String VERSION_3_6 = ICoreConstants.TARGET36;
+
+	/**
+	 * Constant for the PDE Plug-in project nature, value is <code>"org.eclipse.pde.PluginNature"</code>.
+	 */
+	public static final String PLUGIN_NATURE = PDE.PLUGIN_NATURE;
+
+	/**
+	 * Creates or modifies a bundle project and associated artifacts based current settings.
+	 * 
+	 * @param monitor progress monitor or <code>null</code>
+	 * @throws CoreException if project creation or modification fails
+	 */
+	public void apply(IProgressMonitor monitor) throws CoreException;
+
+	/**
+	 * Sets the symbolic name of the described bundle.
+	 * <p>
+	 * A symbolic name must be specified.
+	 * </p>
+	 * @param name bundle symbolic name
+	 */
+	public void setSymbolicName(String name);
+
+	/**
+	 * Returns the symbolic name of the described bundle or <code>null</code> if unspecified.
+	 * 
+	 * @return bundle symbolic name or <code>null</code>
+	 */
+	public String getSymbolicName();
+
+	/**
+	 * Sets the location for the described project.  
+	 * If <code>null</code> is specified, the default location is used.
+	 * <p>
+	 * Setting the location on a description for a project which already
+	 * exists has no effect; the new project location is ignored when the
+	 * description is applied to the already existing project. This method is 
+	 * intended for use on descriptions for new projects.
+	 * </p>
+	 * <p>
+	 * This operation maps the root folder of the project to the exact location
+	 * provided.  For example, if the location for project named "P" is set
+	 * to the URI file://c:/my_plugins/Project1, the file resource at workspace path
+	 * /P/index.html  would be stored in the local file system at 
+	 * file://c:/my_plugins/Project1/index.html.
+	 * </p>
+	 *
+	 * @param location the location for the described project or <code>null</code>
+	 * @see #getLocationURI()
+	 * @see IProjectDescription#setLocationURI(URI)
+	 */
+	public void setLocationURI(URI location);
+
+	/**
+	 * Returns the location URI for the described project.  <code>null</code> is
+	 * returned if the default location should be used.
+	 *
+	 * @return the location for the described project or <code>null</code>
+	 * @see #setLocationURI(URI)
+	 */
+	public URI getLocationURI();
+
+	/**
+	 * Sets the value of the Bundle-Name header for the described bundle.
+	 * When <code>null</code>, the bundle name defaults to the bundle symbolic name.
+	 * 
+	 * @param name bundle name
+	 */
+	public void setBundleName(String name);
+
+	/**
+	 * Returns the value of the Bundle-Name header for the described bundle
+	 * or <code>null</code> if unspecified.
+	 * <p>
+	 * For new projects, the bundle name defaults to the bundle symbolic name.
+	 * </p>
+	 * @return bundle name or <code>null</code>
+	 */
+	public String getBundleName();
+
+	/**
+	 * Sets the value of the Bundle-Vendor header for the described bundle.
+	 * 
+	 * @param name bundle vendor name
+	 */
+	public void setBundleVendor(String name);
+
+	/**
+	 * Returns the value of the Bundle-Vendor header for the described bundle
+	 * or <code>null</code> if unspecified.
+	 * 
+	 * @return bundle vendor name or <code>null</code>
+	 */
+	public String getBundleVendor();
+
+	/**
+	 * Sets the value of the Bundle-Version header for the described bundle.
+	 * When <code>null</code>, the bundle version defaults to <code>1.0.0.qualifier</code>.
+	 * 
+	 * @param version bundle version
+	 */
+	public void setBundleVersion(Version version);
+
+	/**
+	 * Returns the value of the Bundle-Version header for the described bundle.
+	 * <p>
+	 * For new projects, the bundle version is <code>1.0.0.qualifier</code> unless
+	 * otherwise specified.
+	 * </p>
+	 * @return bundle version or <code>null</code> if unspecified
+	 */
+	public Version getBundleVersion();
+
+	/**
+	 * Sets whether the described bundle is a singleton.
+	 * 
+	 * @param singleton whether the described bundle is a singleton
+	 */
+	public void setSingleton(boolean singleton);
+
+	/**
+	 * Returns whether the described bundle is a singleton.
+	 * <p>
+	 * A bundle description for a new project is <b>not</b> a singleton, by default.
+	 * </p>
+	 * @return whether the described bundle is a singleton
+	 */
+	public boolean isSingleton();
+
+	/**
+	 * Sets the value of the Bundle-Localization header for the described bundle.
+	 * 
+	 * @param path bundle root relative path or <code>null</code>
+	 */
+	public void setLocalization(IPath path);
+
+	/**
+	 * Returns the value of the Bundle-Localization header for the described bundle
+	 * or <code>null</code> if unspecified.
+	 *
+	 * @return bundle relative path or <code>null</code>
+	 */
+	public IPath getLocalization();
+
+	/** 
+	 * Returns the list of natures associated with the described project.
+	 * Returns an empty array if there are no natures on this description.
+	 *
+	 * @return the list of natures for the described project
+	 * @see #setNatureIds(String[])
+	 * @see IProjectDescription#setNatureIds(String[])
+	 */
+	public String[] getNatureIds();
+
+	/** 
+	 * Sets the list of natures associated with the described project.
+	 * A project created with this description will have these natures
+	 * added to it in the given order when this description is applied.
+	 * <p>
+	 * When creating a new project, plug-in and Java natures ({@link #PLUGIN_NATURE}
+	 * and {@link JavaCore#NATURE_ID}) will be added by default when unspecified.
+	 * </p>
+	 * @param natures the list of natures
+	 * @see #getNatureIds()
+	 * @see IProjectDescription#getNatureIds()
+	 */
+	public void setNatureIds(String[] natures);
+
+	/** 
+	 * Returns whether the project nature specified by the given
+	 * nature extension id has been added to the described project. 
+	 *
+	 * @param natureId the nature extension identifier
+	 * @return <code>true</code> if the described project has the given nature 
+	 * @see IProjectDescription#hasNature(String)
+	 */
+	public boolean hasNature(String natureId);
+
+	/**
+	 * Sets the the Fragment-Host header for the described fragment.
+	 * When a non-<code>null</code> value is specified, this bundle description
+	 * describes a fragment. 
+	 * 
+	 * @param host host specification or <code>null</code>
+	 */
+	public void setHost(IHostDescription host);
+
+	/**
+	 * Returns the host bundle for the described fragment,
+	 * or <code>null</code> if this description does not describe a fragment.
+	 * 
+	 * @return host specification or <code>null</code>
+	 */
+	public IHostDescription getHost();
+
+	/**
+	 * Sets a project relative path for the default output folder used on the Java build path
+	 * for the described bundle. <code>null</code> indicates the Java project's default output
+	 * location should be used.
+	 * 
+	 * @param output project relative path to default output location or <code>null</code>
+	 */
+	public void setDefaultOutputFolder(IPath output);
+
+	/**
+	 * Returns a project relative path for the described bundle's default output folder used on the Java build path,
+	 * or <code>null</code> to indicate the default output location is used.
+	 * 
+	 * @return default project relative output folder path or <code>null</code>
+	 */
+	public IPath getDefaultOutputFolder();
+
+	/**
+	 * Sets the required execution environments for the described bundle, possible <code>null</code>.
+	 * When more than one environment specified, the first will be used to configure compiler compliance
+	 * and build path settings.
+	 * 
+	 * @param environments execution environment identifiers or <code>null</code>
+	 */
+	public void setExecutionEnvironments(String[] environments);
+
+	/**
+	 * Returns the required execution environments for the described bundle, or <code>null</code> if unspecified.
+	 * When more than one environment is specified, the first will be used to configure compiler compliance
+	 * and build path settings.
+	 * 
+	 * @return execution environment identifiers or <code>null</code>
+	 */
+	public String[] getExecutionEnvironments();
+
+	/**
+	 * Sets the entries for the Bundle-Classpath header of the described bundle,
+	 * or <code>null</code> if unspecified. Specifies the relationship between
+	 * source and/or binary folders with bundle classpath entries. When <code>null</code>
+	 * is specified, no Bundle-Classpath header will be produced.
+	 * 
+	 * @param entries Bundle-Classpath header entries or <code>null</code>
+	 */
+	public void setBundleClassath(IBundleClasspathEntry[] entries);
+
+	/**
+	 * Returns the entries on the Bundle-Classpath header of the described bundle,
+	 * or <code>null</code> if unspecified.
+	 * 
+	 * @return bundle class path entries or <code>null</code> if unspecified
+	 * @see #setBundleClassath(IBundleClasspathEntry[])
+	 */
+	public IBundleClasspathEntry[] getBundleClasspath();
+
+	/**
+	 * Sets the value of the Bundle-Activator header for the described bundle,
+	 * or <code>null</code> if none.
+	 * 
+	 * @param className activator class name or <code>null</code>
+	 */
+	public void setActivator(String className);
+
+	/**
+	 * Returns the value of the Bundle-Activator header for the described bundle,
+	 * or <code>null</code> if none.
+	 * 
+	 * @return bundle activator class name or <code>null</code>
+	 */
+	public String getActivator();
+
+	/**
+	 * Sets the version of Eclipse the described bundle is to targeted for.
+	 * This effects the values generated for Equinox specific headers.
+	 * Has no effect when {@link #isEquinox()} is <code>false</code>.
+	 * When {@link #isEquinox()} is <code>true</code>, and a target version
+	 * is unspecified, the newest available target version of Eclipse is
+	 * used.
+	 * 
+	 * @param version one of the version constant values defined by this class or <code>null</code>
+	 * @see #setEquinox(boolean)
+	 */
+	public void setTargetVersion(String version);
+
+	/**
+	 * Returns the version of Eclipse the described bundle is targeted for, or <code>null</code>
+	 * if unspecified. When unspecified, the project is targeted to the newest available
+	 * version of Eclipse when {@link #isEquinox()} is <code>true</code>.
+	 * 
+	 * @return target version or <code>null</code>
+	 */
+	public String getTargetVersion();
+
+	/**
+	 * Sets whether the described bundle is targeted for the Equinox OSGi framework.
+	 * <p>
+	 * An Equniox specific lazy-start header will be generated in the associated manifest
+	 * when <code>true</code> based on the target version and activation policy. For new projects
+	 * the value is <code>false</code>, by default.
+	 * </p>
+	 * <p>
+	 * This following headers are affected when <code>true</code>, based on the {@link #getTargetVersion()}
+	 * and {@link #getActivationPolicy()}. The headers are removed when {@link #getActivationPolicy()} is
+	 * unspecified (<code>null</code>).
+	 * <ul>
+	 * <li><code>Eclipse-AutoStart</code> is set to <code>true</code> when the target version is 3.1
+	 * 	and {@link #getActivationPolicy()} is {@link Constants#ACTIVATION_LAZY}</li>
+	 * <li><code>Eclipse-LazyStart</code> is set to <code>true</code> when the target version is 3.2 or 3.3
+	 *  and {@link #getActivationPolicy()} is {@link Constants#ACTIVATION_LAZY}</li>
+	 * <li><code>Bundle-ActivationPolicy</code> is set to <code>lazy</code> when the target version is 3.4 or
+	 *  greater and {@link #getActivationPolicy()} is {@link Constants#ACTIVATION_LAZY}</li>
+	 * </ul>
+	 * </p>
+	 * @param equinox whether targeted for the Equinox OSGi framework
+	 * @see #getTargetVersion()
+	 */
+	public void setEquinox(boolean equinox);
+
+	/**
+	 * Returns whether the described bundle is targeted for the Equinox OSGi framework.
+	 * Effects the Equinox lazy-start header generated in the manifest.
+	 * 
+	 * @return whether the described bundle is targeted for the Equinox OSGi framework
+	 */
+	public boolean isEquinox();
+
+	/**
+	 * Sets this bundle's activation policy. Legal values are {@link Constants#ACTIVATION_LAZY}
+	 * or <code>null</code> (unspecified). Any other values are ignored (equivalent to
+	 * <code>null</code>). When unspecified, a corresponding header is not generated. By default
+	 * the value is unspecified for newly created projects.
+	 * <p>
+	 * An Equniox specific lazy-start header will be generated in the associated manifest
+	 * based on the {@link #getTargetVersion()} and the specified policy. The headers are
+	 * removed when the policy is unspecified (<code>null</code>).
+	 * <ul>
+	 * <li><code>Eclipse-AutoStart</code> is set to <code>true</code> when the target version is 3.1
+	 * 	and policy is {@link Constants#ACTIVATION_LAZY}</li>
+	 * <li><code>Eclipse-LazyStart</code> is set to <code>true</code> when the target version is 3.2 or 3.3
+	 *  and policy is {@link Constants#ACTIVATION_LAZY}</li>
+	 * <li><code>Bundle-ActivationPolicy</code> is set to <code>lazy</code> when the target version is 3.4 or
+	 *  greater and policy is {@link Constants#ACTIVATION_LAZY}</li>
+	 * </ul>
+	 * </p>
+	 * @param policy activation policy or <code>null</code>
+	 * @see #getTargetVersion()
+	 */
+	public void setActivationPolicy(String policy);
+
+	/**
+	 * Returns this bundle's activation policy or <code>null</code> if unspecified.
+	 * 
+	 * @return activation policy or <code>null</code>
+	 */
+	public String getActivationPolicy();
+
+	/**
+	 * Sets whether this bundle supports extension points and extensions via 
+	 * {@link IExtensionRegistry} support. By default, this value is <code>false</code>
+	 * for new projects.
+	 * 
+	 * @param supportExtensions whether extension points and extensions are supported
+	 */
+	public void setExtensionRegistry(boolean supportExtensions);
+
+	/**
+	 * Returns whether this bundle supports extension points and extensions via 
+	 * {@link IExtensionRegistry} support. By default, this value is <code>false</code>
+	 * for new projects.
+	 * 
+	 * @return whether extension points and extensions are supported
+	 */
+	public boolean isExtensionRegistry();
+
+	/**
+	 * Sets the value of the Require-Bundle header for the described bundle.
+	 * 
+	 * @param bundles required bundle descriptions or <code>null</code> if none
+	 */
+	public void setRequiredBundles(IRequiredBundleDescription[] bundles);
+
+	/**
+	 * Returns the value of the Require-Bundle header or <code>null</code> if unspecified.
+	 * 
+	 * @return required bundle descriptions or <code>null</code>
+	 */
+	public IRequiredBundleDescription[] getRequiredBundles();
+
+	/**
+	 * Sets the value of the Import-Package header for the described bundle.
+	 * 
+	 * @param imports package import descriptions or <code>null</code> if none
+	 */
+	public void setPackageImports(IPackageImportDescription[] imports);
+
+	/**
+	 * Returns the value of the Import-Package header or <code>null</code> if unspecified.
+	 * 
+	 * @return package import descriptions or <code>null</code>
+	 */
+	public IPackageImportDescription[] getPackageImports();
+
+	/**
+	 * Sets the value of the Export-Package header for the described bundle.
+	 * 
+	 * @param exports package export descriptions or <code>null</code> if none
+	 */
+	public void setPackageExports(IPackageExportDescription[] exports);
+
+	/**
+	 * Returns the value of the Export-Package header or <code>null</code> if unspecified.
+	 * 
+	 * @return package export descriptions or <code>null</code>
+	 */
+	public IPackageExportDescription[] getPackageExports();
+
+	/**
+	 * Returns the project associated with the described bundle.
+	 * 
+	 * @return associated project
+	 */
+	public IProject getProject();
+
+	/**
+	 * Sets file and folder entries on the <code>bin.includes</code> entry of
+	 * the <code>build.properties</code> file of the described bundle project.
+	 * <p>
+	 * By default, the <code>MANIFEST/</code> folder and any entries on the
+	 * Bundle-Classpath will be included. This sets any additional entries that 
+	 * are to be included.
+	 * </p>
+	 * @param paths bundle root relative paths of files and folders to include
+	 *  or <code>null</code> if none
+	 */
+	public void setBinIncludes(IPath[] paths);
+
+	/**
+	 * Returns the file and folder entries to be included on the <code>bin.includes</code> entry
+	 * of the <code>build.properties</code> file of the described bundle project.
+	 * <p>
+	 * By default, the <code>MANIFEST/</code> folder and any entries on the
+	 * Bundle-Classpath will be included. This returns any additional entries that 
+	 * are to be included.
+	 * </p>
+	 * @return bundle root relative paths of files and folders on the <code>bin.includes</code>
+	 * 	entry or <code>null</code>
+	 */
+	public IPath[] getBinIncludes();
+
+	/**
+	 * Sets the location within the project where the root of the bundle and its associated
+	 * artifacts will reside, or <code>null</code> to indicate the default bundle root location
+	 * should be used (project folder).
+	 * <p>
+	 * This has no effect on existing projects.  This method is intended for use on descriptions
+	 * for new projects. To modify the bundle root of an existing project use
+	 * {@link IBundleProjectService#setBundleRoot(IProject, IPath)}.
+	 * </p>
+	 * <p>
+	 * The bundle root is the folder containing the <code>META-INF/</code> folder. When a project
+	 * does not yet exist, bundle files will be created relative to the bundle root. When a project
+	 * already exists and the bundle root location is modified, existing bundle artifacts at the old
+	 * root are not moved or modified. Instead, the modify operation will update any existing bundle
+	 * files at the new root location, or create them if not yet present.
+	 * </p>
+	 * @param path project relative path to bundle root artifacts in the project or <code>null</code>
+	 */
+	public void setBundleRoot(IPath path);
+
+	/**
+	 * Returns the location within the project that is the root of the bundle related
+	 * artifacts, or <code>null</code> to indicate the default location (project folder).
+	 * 
+	 * @return project relative bundle root path or <code>null</code>
+	 */
+	public IPath getBundleRoot();
+
+	/**
+	 * Returns identifiers of <code>org.eclipse.debug.ui.launchShortcuts</code>
+	 * referenced by <code>org.eclipse.pde.ui.launchShortcuts</code> extensions
+	 * that will be displayed in the manifest editor for the project associated
+	 * with these settings, or <code>null</code> if default shortcuts are being
+	 * used.
+	 * 
+	 * @return identifiers of the <code>org.eclipse.debug.ui.launchShortcuts</code> extensions
+	 *  or <code>null</code>
+	 */
+	public String[] getLaunchShortcuts();
+
+	/**
+	 * Sets the identifiers of <code>org.eclipse.debug.ui.launchShortcuts</code>
+	 * referenced by <code>org.eclipse.pde.ui.launchShortcuts</code> extensions
+	 * to be displayed in the manifest editor for the project associated with these settings,
+	 * or <code>null</code> to indicate default shortcuts should be used.
+	 * <p>
+	 * When default shortcuts are used, all <code>org.eclipse.pde.ui.launchShortcuts</code> extensions
+	 * are considered. When specific shortcuts are specified, the available shortcuts will be limited
+	 * to those specified.
+	 * </p>
+	 * <p>
+	 * <b>Important</b>: When specifying shortcuts, both <code>org.eclipse.debug.ui.launchShortcuts</code> and
+	 * <code>org.eclipse.pde.ui.launchShortcuts</code> must exist. Labels for shortcuts in the editor
+	 * are derived from the <code>org.eclipse.pde.ui.launchShortcuts</code>.
+	 * </p>
+	 * @param ids identifiers of <code>org.eclipse.debug.ui.launchShortcuts</code> extensions
+	 *  or <code>null</code>
+	 */
+	public void setLaunchShortcuts(String[] ids);
+
+	/**
+	 * Returns the identifier of the <code>org.eclipse.ui.exportWizards</code> extension
+	 * used in the manifest editor for exporting the project associated with these
+	 * settings, or <code>null</code> if the default export wizard should be used.
+	 * 
+	 * @return identifier of an <code>org.eclipse.ui.exportWizards</code> extension
+	 *  or <code>null</code>
+	 */
+	public String getExportWizardId();
+
+	/**
+	 * Sets the identifier of the <code>org.eclipse.ui.exportWizards</code> extension
+	 * used in the manifest editor for exporting the project associated with these
+	 * settings, or <code>null</code> if the default export wizard should be used.
+	 * 
+	 * @param id identifier of an <code>org.eclipse.ui.exportWizards</code> extension
+	 *  or <code>null</code>
+	 */
+	public void setExportWizardId(String id);
+
+	/**
+	 * Sets the value of the specified header in the bundle manifest to the given value
+	 * or removes the header if the value is <code>null</code>.
+	 * <p>
+	 * Using this method will override the value of a header generated by other methods
+	 * in this interface. For example, using the method {@link #setBundleName(String)} will
+	 * generate a value for the <code>Bundle-Name</code> header, but calling {@link #setHeader(String, String)}
+	 * for the <code>Bundle-Name</code> header will override any value set via {@link #setBundleName(String)}.
+	 * This method is intended to be used to set the value of a header that does
+	 * not have explicit API.
+	 * </p><p>
+	 * To include an empty header <code>value.trim().length()</code> must equal zero (i.e an empty string or a string of
+	 * whitespace).
+	 * </p>
+	 * @param header header name
+	 * @param value header value or <code>null</code> to remove
+	 */
+	public void setHeader(String header, String value);
+
+	/**
+	 * Returns the value of the specified header from the bundle manifest, or <code>null</code>
+	 * if unspecified. Note that an empty string is returned for a header that has an empty value.
+	 * 
+	 * @param header
+	 * @return header value or <code>null</code>
+	 */
+	public String getHeader(String header);
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectService.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectService.java
new file mode 100644
index 0000000..34b0548
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IBundleProjectService.java
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Version;
+
+/**
+ * Service used to create and configure bundle project descriptions.
+ * <p>
+ * An instance of this service can be obtained from a {@link BundleContext} as
+ * follows
+ * <pre>
+ * BundleContext context = ...
+ * ServiceReference ref = context.getServiceReference(IBundleContextService.class.getName());
+ * IBundleContextService service = (IBundleContextService)context.getService(ref);
+ * ...
+ * context.ungetService(ref); 
+ * </pre>
+ * </p>
+ * @since 3.6
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IBundleProjectService {
+
+	/**
+	 * Returns a bundle description for the given project.
+	 * If the project does not exist, the description can be used to create
+	 * a new bundle project. If the project does exist, the description can be used to
+	 * modify a project.
+	 *  
+	 * @param project project
+	 * @return bundle description for the associated project
+	 * @exception CoreException if unable to create a description on an existing project
+	 */
+	public IBundleProjectDescription getDescription(IProject project) throws CoreException;
+
+	/**
+	 * Creates and returns a new host description.
+	 * 
+	 * @param name symbolic name of the host
+	 * @param range version constraint or <code>null</code>
+	 * @return host description
+	 */
+	public IHostDescription newHost(String name, VersionRange range);
+
+	/**
+	 * Creates and returns a new package import description.
+	 * 
+	 * @param name fully qualified name of imported package
+	 * @param range version constraint or <code>null</code>
+	 * @param optional whether the import is optional
+	 * @return package import description
+	 */
+	public IPackageImportDescription newPackageImport(String name, VersionRange range, boolean optional);
+
+	/**
+	 * Constructs a new package export description.
+	 * 
+	 * @param name fully qualified package name
+	 * @param version version or <code>null</code>
+	 * @param api whether the package is considered API
+	 * @param friends symbolic names of bundles that are friends, or <code>null</code>; when 
+	 *  friends are specified the package will not be API
+	 * @return package export description
+	 */
+	public IPackageExportDescription newPackageExport(String name, Version version, boolean api, String[] friends);
+
+	/**
+	 * Creates and returns a new required bundle description.
+	 * 
+	 * @param name symbolic name of required bundle
+	 * @param range version constraint or <code>null</code>
+	 * @param optional whether the required bundle is optional
+	 * @param export whether the required bundle is re-exported
+	 * @return required bundle description
+	 */
+	public IRequiredBundleDescription newRequiredBundle(String name, VersionRange range, boolean optional, boolean export);
+
+	/**
+	 * Creates and returns a new bundle classpath entry defining the relationship
+	 * between a source, binaries, and library on the Bundle-Classpath header.
+	 * <p>
+	 * When a source folder is specified, the binary folder defines its output
+	 * folder, or may be <code>null</code> to indicate that the project's default output
+	 * folder is used by the source folder. When only a binary folder is specified, there
+	 * is no source associated with the folder. When no source or binary are specified,
+	 * it indicates the library is included in the project as an archive.
+	 * </p>
+	 * @param sourceFolder source folder or <code>null</code>
+	 * @param binaryFolder binary folder or <code>null</code>
+	 * @param library associated entry on the Bundle-Classpath header or <code>null</code>
+	 * 	to indicate default entry "."
+	 */
+	public IBundleClasspathEntry newBundleClasspathEntry(IPath sourceFolder, IPath binaryFolder, IPath library);
+
+	/**
+	 * Sets the location within the project where the root of the bundle and its associated
+	 * artifacts will reside, or <code>null</code> to indicate the default bundle root location
+	 * should be used (project folder).
+	 * <p>
+	 * The bundle root is the folder containing the <code>META-INF/</code> folder. When the bundle
+	 * root location is modified, existing bundle artifacts at the old root are not moved or modified.
+	 * When creating a new bundle project {@link IBundleProjectDescription#setBundleRoot(IPath)} can 
+	 * be used to specify an initial bundle root location. To modify the bundle root location of an
+	 * existing project, this method must be used.
+	 * </p>
+	 * @param project project that must exist and be open
+	 * @param bundleRoot project relative path to bundle root artifacts in the project or <code>null</code>
+	 * @throws CoreException if setting the root fails
+	 */
+	public void setBundleRoot(IProject project, IPath bundleRoot) throws CoreException;
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IHostDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IHostDescription.java
new file mode 100644
index 0000000..c849cb0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IHostDescription.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+/**
+ * Describes a fragment host. Instances of this class can be created
+ * via {@link IBundleProjectService#newHost(String, VersionRange)}.
+ * 
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IHostDescription {
+
+	/**
+	 * Returns the symbolic name of the host.
+	 * 
+	 * @return symbolic name of the host
+	 */
+	public String getName();
+
+	/**
+	 * Returns the version constraint of the host or <code>null</code>
+	 * if unspecified.
+	 * 
+	 * @return version constraint or <code>null</code>
+	 */
+	public VersionRange getVersionRange();
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageExportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageExportDescription.java
new file mode 100644
index 0000000..437f233
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageExportDescription.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.osgi.framework.Version;
+
+/**
+ * Describes a package export. Instances of this class can be created
+ * via {@link IBundleProjectService#newPackageExport(String, Version, boolean, String[])}.
+ * 
+ * @since 3.6
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IPackageExportDescription {
+
+	/**
+	 * Returns the fully qualified name of the exported package.
+	 * 
+	 * @return fully qualified name of the exported package
+	 */
+	public String getName();
+
+	/**
+	 * Returns the version of the exported package or <code>null</code>
+	 * if unspecified.
+	 * 
+	 * @return version or <code>null</code>
+	 */
+	public Version getVersion();
+
+	/**
+	 * Returns the declared friends of this package or <code>null</code> if none.
+	 *  
+	 * @return friends as bundle symbolic names or <code>null</code>
+	 */
+	public String[] getFriends();
+
+	/**
+	 * Returns whether the package is exported as API, or is internal.
+	 * 
+	 * @return whether the package is exported as API
+	 */
+	public boolean isApi();
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageImportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageImportDescription.java
new file mode 100644
index 0000000..fc66ea2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IPackageImportDescription.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+/**
+ * Describes a package import. Instances of this class can be created
+ * via {@link IBundleProjectService#newPackageImport(String, VersionRange, boolean)}.
+ * 
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IPackageImportDescription {
+
+	/**
+	 * Returns the fully qualified name of the imported package.
+	 * 
+	 * @return fully qualified name of the imported package
+	 */
+	public String getName();
+
+	/**
+	 * Returns the version constraint of the imported package or <code>null</code>
+	 * if unspecified.
+	 * 
+	 * @return version constraint or <code>null</code>
+	 */
+	public VersionRange getVersionRange();
+
+	/**
+	 * Returns whether the package import is optional.
+	 * 
+	 * @return whether optional
+	 */
+	public boolean isOptional();
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IRequiredBundleDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IRequiredBundleDescription.java
new file mode 100644
index 0000000..815549a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/IRequiredBundleDescription.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+/**
+ * Describes a required bundle. Instances of this class can be created
+ * via {@link IBundleProjectService#newRequiredBundle(String, VersionRange, boolean, boolean)}.
+ * 
+ * @since 3.6
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IRequiredBundleDescription {
+
+	/**
+	 * Returns the symbolic name of the required bundle.
+	 * 
+	 * @return symbolic name of the required bundle
+	 */
+	public String getName();
+
+	/**
+	 * Returns the version constraint of the required bundle or <code>null</code>
+	 * if unspecified.
+	 * 
+	 * @return version constraint or <code>null</code>
+	 */
+	public VersionRange getVersionRange();
+
+	/**
+	 * Returns whether the required bundle is re-exported.
+	 * 
+	 * @return whether re-exported
+	 */
+	public boolean isExported();
+
+	/**
+	 * Returns whether the required bundle is optional.
+	 * 
+	 * @return whether optional
+	 */
+	public boolean isOptional();
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/package.html b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/package.html
new file mode 100644
index 0000000..9df2fa7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/core/project/package.html
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Application programming interfaces for creating and modifying plug-in projects.
+<h2>
+Package Specification</h2>
+Provides support for describing, creating, and modifying plug-in projects.
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
index f2364db..3607161 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/BundleValidationOperation.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
@@ -14,6 +14,7 @@ import java.util.*;
 import org.eclipse.core.resources.IWorkspaceRunnable;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.service.resolver.*;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 
 public class BundleValidationOperation implements IWorkspaceRunnable {
@@ -53,8 +54,16 @@ public class BundleValidationOperation implements IWorkspaceRunnable {
 		Map map = new HashMap();
 		BundleDescription[] bundles = fState.getBundles();
 		for (int i = 0; i < bundles.length; i++) {
-			if (!bundles[i].isResolved()) {
-				map.put(bundles[i], fState.getResolverErrors(bundles[i]));
+			BundleDescription desc = bundles[i];
+			if (!desc.isResolved()) {
+				map.put(desc, fState.getResolverErrors(desc));
+			} else if (desc.isSingleton()) {
+				BundleDescription[] dups = fState.getBundles(desc.getSymbolicName());
+				if (dups.length > 1) {
+					// more than 1 singleton present
+					IStatus errorStatus = new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(PDECoreMessages.BundleValidationOperation_multiple_singletons, new String[] {Integer.toString(dups.length), desc.getSymbolicName()}));
+					map.put(desc, new Object[] {errorStatus});
+				}
 			}
 		}
 		return map;
@@ -65,7 +74,22 @@ public class BundleValidationOperation implements IWorkspaceRunnable {
 	}
 
 	public boolean hasErrors() {
-		return fState.getHighestBundleId() > -1 && fState.getBundles().length > fState.getResolvedBundles().length;
+		if (fState.getHighestBundleId() > -1) {
+			BundleDescription[] bundles = fState.getBundles();
+			for (int i = 0; i < bundles.length; i++) {
+				BundleDescription desc = bundles[i];
+				if (!desc.isResolved()) {
+					return true;
+				} else if (desc.isSingleton()) {
+					BundleDescription[] dups = fState.getBundles(desc.getSymbolicName());
+					if (dups.length > 1) {
+						// more than one singleton
+						return true;
+					}
+				}
+			}
+		}
+		return false;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
index e59d15f..416bd9a 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.pde.core.build.*;
 import org.eclipse.pde.core.plugin.IPluginLibrary;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.team.core.RepositoryProvider;
 
@@ -140,7 +141,7 @@ public class ClasspathComputer {
 	}
 
 	protected static IBuild getBuild(IProject project) throws CoreException {
-		IFile buildFile = project.getFile("build.properties"); //$NON-NLS-1$
+		IFile buildFile = PDEProject.getBuildProperties(project);
 		IBuildModel buildModel = null;
 		if (buildFile.exists()) {
 			buildModel = new WorkspaceBuildModel(buildFile);
@@ -201,7 +202,7 @@ public class ClasspathComputer {
 	 * for the specified execution environment. Overrides any existing settings.
 	 *  
 	 * @param project project to set compiler compliance options for
-	 * @param eeId execution environment identifier
+	 * @param eeId execution environment identifier or <code>null</code>
 	 */
 	public static void setComplianceOptions(IJavaProject project, String eeId) {
 		setComplianceOptions(project, eeId, true);
@@ -337,7 +338,7 @@ public class ClasspathComputer {
 
 	/**
 	 * Returns a classpath container entry for the given execution environment.
-	 * @param ee id of the execution environment
+	 * @param ee id of the execution environment or <code>null</code>
 	 * @return classpath container entry
 	 */
 	public static IClasspathEntry createJREEntry(String ee) {
@@ -346,7 +347,7 @@ public class ClasspathComputer {
 
 	/**
 	 * Returns the JRE container path for the execution environment with the given id.
-	 * @param ee execution environment id
+	 * @param ee execution environment id or <code>null</code>
 	 * @return JRE container path for the execution environment
 	 */
 	private static IPath getEEPath(String ee) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathHelper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathHelper.java
index 1a89555..0658ee7 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,10 +21,12 @@ import org.eclipse.pde.core.build.IBuild;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class ClasspathHelper {
 
 	private static final String DOT = "."; //$NON-NLS-1$
+	private static final String FRAGMENT_ANNOTATION = "@fragment@"; //$NON-NLS-1$
 
 	public static String getDevEntriesProperties(String fileName, boolean checkExcluded) {
 		File file = new File(fileName);
@@ -248,7 +250,7 @@ public class ClasspathHelper {
 		try {
 			if (project.hasNature(JavaCore.NATURE_ID)) {
 				Map classpathMap = getClasspathMap(project, checkExcluded, !base.getId().equals(PDECore.getDefault().getModelManager().getSystemBundleId()), false);
-				IFile file = project.getFile("build.properties"); //$NON-NLS-1$
+				IFile file = PDEProject.getBuildProperties(project);
 				boolean searchBuild = file.exists();
 				if (searchBuild) {
 					WorkspaceBuildModel bModel = new WorkspaceBuildModel(file);
@@ -260,6 +262,20 @@ public class ClasspathHelper {
 					else {
 						if (libraries.length == 0) {
 							IPath[] paths = findLibrary(DOT, project, classpathMap, build);
+							if (paths.length == 0) {
+								// No mapping for default library, if there are source folders just add their corresponding output folders to the build path.
+								// This likely indicates an error in the build.properties, but to be friendly we should add the output folders so running/debugging
+								// works (see bug 237025)
+								if (!classpathMap.isEmpty()) {
+									Iterator iterator = classpathMap.values().iterator();
+									List collect = new ArrayList();
+									while (iterator.hasNext()) {
+										ArrayList list = (ArrayList) iterator.next();
+										collect.addAll(list);
+									}
+									paths = (IPath[]) collect.toArray(new IPath[collect.size()]);
+								}
+							}
 							for (int j = 0; j < paths.length; j++)
 								addPath(result, project, paths[j]);
 						} else {
@@ -303,7 +319,7 @@ public class ClasspathHelper {
 				try {
 					IProject project = frags[i].getUnderlyingResource().getProject();
 					Map classpathMap = getClasspathMap(project, checkExcluded, false, true);
-					IFile file = project.getFile("build.properties"); //$NON-NLS-1$
+					IFile file = PDEProject.getBuildProperties(project);
 					IBuild build = null;
 					if (file.exists()) {
 						WorkspaceBuildModel bModel = new WorkspaceBuildModel(file);
@@ -311,7 +327,7 @@ public class ClasspathHelper {
 					}
 					IPath[] paths = findLibrary(libName, project, classpathMap, build);
 					if (paths.length > 0)
-						return paths;
+						return postfixFragmentAnnotation(paths);
 
 				} catch (JavaModelException e) {
 					continue;
@@ -322,23 +338,37 @@ public class ClasspathHelper {
 				if (file.isDirectory()) {
 					file = new File(file, libName);
 					if (file.exists())
-						return new IPath[] {new Path(file.getPath())};
+						// Postfix fragment annotation for fragment path (fix bug 294211)
+						return new IPath[] {new Path(file.getPath() + FRAGMENT_ANNOTATION)};
 				}
 			}
 		}
 		return new IPath[0];
 	}
 
+	/*
+	 * Postfixes the fragment annotation for the paths that we know come
+	 * from fragments.  This is needed to fix bug 294211.
+	 */
+	private static IPath[] postfixFragmentAnnotation(IPath[] paths) {
+		for (int i = 0; i < paths.length; i++)
+			paths[i] = new Path(paths[i].toString() + FRAGMENT_ANNOTATION);
+		return paths;
+	}
+
 	private static void addPath(ArrayList result, IProject project, IPath path) {
 		IPath resultPath = null;
 		if (path.isAbsolute())
 			resultPath = path;
 		else if (path.segmentCount() > 0 && path.segment(0).equals(project.getName())) {
-			path = path.removeFirstSegments(1);
+			IContainer bundleRoot = PDEProject.getBundleRoot(project);
+			IPath rootPath = bundleRoot.getFullPath();
+			// make path relative to bundle root
+			path = path.makeRelativeTo(rootPath);
 			if (path.segmentCount() == 0)
 				resultPath = new Path(DOT);
 			else {
-				IResource resource = project.findMember(path);
+				IResource resource = bundleRoot.findMember(path);
 				if (resource != null)
 					resultPath = path;
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathUtilCore.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathUtilCore.java
index 76eebb3..e26908d 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathUtilCore.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathUtilCore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.pde.internal.core.bundle.BundlePlugin;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.plugin.*;
 import org.eclipse.pde.internal.core.plugin.Plugin;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class ClasspathUtilCore {
 
@@ -195,7 +196,7 @@ public class ClasspathUtilCore {
 		IBuildModel buildModel = model.getBuildModel();
 		if (buildModel == null) {
 			IProject project = model.getUnderlyingResource().getProject();
-			IFile buildFile = project.getFile("build.properties"); //$NON-NLS-1$
+			IFile buildFile = PDEProject.getBuildProperties(project);
 			if (buildFile.exists()) {
 				buildModel = new WorkspaceBuildModel(buildFile);
 				buildModel.load();
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/DependencyManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/DependencyManager.java
index 1492c85..b33b027 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/DependencyManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/DependencyManager.java
@@ -16,51 +16,114 @@ import org.eclipse.pde.core.plugin.IPluginExtension;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.osgi.framework.Constants;
 
+/**
+ * Utility class to return bundle id collections for a variety of dependency
+ * scenarios
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
 public class DependencyManager {
 
 	/** 
-	 * @return a set of plug-in IDs
+	 * Returns a {@link Set} of bundle ids for the dependents of the given
+	 * {@link IPluginModelBase}. The set includes the id of the given model base
+	 * as well as all computed implicit / optional dependencies. 
 	 * 
+	 * @param model the {@link IPluginModelBase} to compute dependencies for
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 *  or <code>null</code> if none
+	 * @return a set of bundle IDs
 	 */
-	public static Set getSelfAndDependencies(IPluginModelBase model) {
-		return getDependencies(new Object[] {model}, getImplicitDependencies(), TargetPlatformHelper.getState(), false, true);
+	public static Set getSelfAndDependencies(IPluginModelBase model, String[] excludeFragments) {
+		return getDependencies(new Object[] {model}, getImplicitDependencies(), TargetPlatformHelper.getState(), false, true, toSet(excludeFragments));
 	}
 
 	/** 
-	 * @return a set of plug-in IDs
+	 * Returns a {@link Set} of bundle ids for the dependents of the given
+	 * {@link IPluginModelBase}s. The set includes the ids of the given model bases
+	 * as well as all computed implicit / optional dependencies.
 	 * 
+	 * @param models the array of {@link IPluginModelBase}s to compute dependencies for
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 *  or <code>null</code> if none
+	 * @return a set of bundle IDs
 	 */
-	public static Set getSelfandDependencies(IPluginModelBase[] models) {
-		return getDependencies(models, getImplicitDependencies(), TargetPlatformHelper.getState(), false, true);
+	public static Set getSelfandDependencies(IPluginModelBase[] models, String[] excludeFragments) {
+		return getDependencies(models, getImplicitDependencies(), TargetPlatformHelper.getState(), false, true, toSet(excludeFragments));
 	}
 
 	/** 
-	 * @return a set of plug-in IDs
+	 * Returns a {@link Set} of bundle ids for the dependents of the given
+	 * objects from the given {@link State}. 
+	 * The set does not include the ids of the given objects
+	 * and only includes the given set of implicit dependencies.
 	 * 
+	 * @param selected the group of objects to compute dependencies for. Any items
+	 * in this array that are not {@link IPluginModelBase}s are ignored.
+	 * @param implicit the array of additional implicit dependencies to add to the {@link Set}
+	 * @param state the {@link State} to compute the dependencies in
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 *  or <code>null</code> if none
+	 * @return a set of bundle IDs
 	 */
-	public static Set getDependencies(Object[] selected, String[] implicit, State state) {
-		return getDependencies(selected, implicit, state, true, true);
+	public static Set getDependencies(Object[] selected, String[] implicit, State state, String[] excludeFragments) {
+		return getDependencies(selected, implicit, state, true, true, toSet(excludeFragments));
 	}
 
 	/** 
-	 * @return a set of plug-in IDs
+	 * Returns a {@link Set} of bundle ids for the dependents of the given
+	 * objects. The set does not include the ids of the given objects
+	 * but does include the computed set of implicit dependencies.
 	 * 
+	 * @param selected selected the group of objects to compute dependencies for. Any items
+	 * in this array that are not {@link IPluginModelBase}s are ignored.
+	 * @param includeOptional if optional bundle ids should be included
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 *  or <code>null</code> if none
+	 * @return a set of bundle IDs
 	 */
-	public static Set getDependencies(Object[] selected, boolean includeOptional) {
-		return getDependencies(selected, getImplicitDependencies(), TargetPlatformHelper.getState(), true, includeOptional);
+	public static Set getDependencies(Object[] selected, boolean includeOptional, String[] excludeFragments) {
+		return getDependencies(selected, getImplicitDependencies(), TargetPlatformHelper.getState(), true, includeOptional, toSet(excludeFragments));
+	}
+
+	/**
+	 * Returns the array as a set or <code>null</code> 
+	 * @param array array or <code>null</code>
+	 * @return set
+	 */
+	private static Set toSet(String[] array) {
+		Set set = new HashSet();
+		if (array != null) {
+			for (int i = 0; i < array.length; i++) {
+				set.add(array[i]);
+			}
+		}
+		return set;
 	}
 
 	/** 
-	 * @return a set of plug-in IDs
+	 * Returns a {@link Set} of bundle ids for the dependents of the given
+	 * objects from the given {@link State}. 
+	 * The set additionally only includes the given set of implicit dependencies.
 	 * 
+	 * @param selected selected the group of objects to compute dependencies for. Any items
+	 * in this array that are not {@link IPluginModelBase}s are ignored.
+	 * @param implicit the array of additional implicit dependencies to add to the {@link Set}
+	 * @param state the {@link State} to compute the dependencies in
+	 * @param removeSelf if the id of one of the bundles were are computing dependencies for should be
+	 * included in the result {@link Set} or not
+	 * @param includeOptional if optional bundle ids should be included
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 * @return a set of bundle IDs
 	 */
-	private static Set getDependencies(Object[] selected, String[] implicit, State state, boolean removeSelf, boolean includeOptional) {
+	private static Set getDependencies(Object[] selected, String[] implicit, State state, boolean removeSelf, boolean includeOptional, Set excludeFragments) {
 		Set set = new TreeSet();
 		for (int i = 0; i < selected.length; i++) {
 			if (!(selected[i] instanceof IPluginModelBase))
 				continue;
 			IPluginModelBase model = (IPluginModelBase) selected[i];
-			addBundleAndDependencies(model.getBundleDescription(), set, includeOptional);
+			addBundleAndDependencies(model.getBundleDescription(), set, includeOptional, excludeFragments);
 			IPluginExtension[] extensions = model.getPluginBase().getExtensions();
 			for (int j = 0; j < extensions.length; j++) {
 				String point = extensions[j].getPoint();
@@ -68,20 +131,21 @@ public class DependencyManager {
 					int dot = point.lastIndexOf('.');
 					if (dot != -1) {
 						String id = point.substring(0, dot);
-						addBundleAndDependencies(state.getBundle(id, null), set, includeOptional);
+						addBundleAndDependencies(state.getBundle(id, null), set, includeOptional, excludeFragments);
 					}
 				}
 			}
 		}
 
 		for (int i = 0; i < implicit.length; i++) {
-			addBundleAndDependencies(state.getBundle(implicit[i], null), set, includeOptional);
+			addBundleAndDependencies(state.getBundle(implicit[i], null), set, includeOptional, excludeFragments);
 		}
 
 		if (removeSelf) {
 			for (int i = 0; i < selected.length; i++) {
-				if (!(selected[i] instanceof IPluginModelBase))
+				if (!(selected[i] instanceof IPluginModelBase)) {
 					continue;
+				}
 				IPluginModelBase model = (IPluginModelBase) selected[i];
 				set.remove(model.getPluginBase().getId());
 			}
@@ -89,44 +153,63 @@ public class DependencyManager {
 		return set;
 	}
 
+	/**
+	 * Computes the set of implicit dependencies from the {@link PDEPreferencesManager}
+	 * @return a set if bundle ids 
+	 */
 	private static String[] getImplicitDependencies() {
 		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
 		String dependencies = preferences.getString(ICoreConstants.IMPLICIT_DEPENDENCIES);
-		if (dependencies.length() == 0)
+		if (dependencies.length() == 0) {
 			return new String[0];
+		}
 		StringTokenizer tokenizer = new StringTokenizer(dependencies, ","); //$NON-NLS-1$
 		String[] implicitIds = new String[tokenizer.countTokens()];
-		for (int i = 0; i < implicitIds.length; i++)
+		for (int i = 0; i < implicitIds.length; i++) {
 			implicitIds[i] = tokenizer.nextToken();
+		}
 		return implicitIds;
 	}
 
-	private static void addBundleAndDependencies(BundleDescription desc, Set set, boolean includeOptional) {
+	/**
+	 * Recursively adds the given {@link BundleDescription} and its dependents to the given 
+	 * {@link Set}
+	 * @param desc the {@link BundleDescription} to compute dependencies for
+	 * @param set the {@link Set} to collect results in
+	 * @param includeOptional if optional dependencies should be included
+	 * @param excludeFragments a collection of <b>fragment</b> bundle symbolic names to exclude from the dependency resolution
+	 */
+	private static void addBundleAndDependencies(BundleDescription desc, Set set, boolean includeOptional, Set excludeFragments) {
 		if (desc != null && set.add(desc.getSymbolicName())) {
 			BundleSpecification[] required = desc.getRequiredBundles();
 			for (int i = 0; i < required.length; i++) {
-				if (includeOptional || !required[i].isOptional())
-					addBundleAndDependencies((BundleDescription) required[i].getSupplier(), set, includeOptional);
+				if (includeOptional || !required[i].isOptional()) {
+					addBundleAndDependencies((BundleDescription) required[i].getSupplier(), set, includeOptional, excludeFragments);
+				}
 			}
 			ImportPackageSpecification[] importedPkgs = desc.getImportPackages();
 			for (int i = 0; i < importedPkgs.length; i++) {
 				ExportPackageDescription exporter = (ExportPackageDescription) importedPkgs[i].getSupplier();
 				// Continue if the Imported Package is unresolved of the package is optional and don't want optional packages
-				if (exporter == null || (!includeOptional && Constants.RESOLUTION_OPTIONAL.equals(importedPkgs[i].getDirective(Constants.RESOLUTION_DIRECTIVE))))
+				if (exporter == null || (!includeOptional && Constants.RESOLUTION_OPTIONAL.equals(importedPkgs[i].getDirective(Constants.RESOLUTION_DIRECTIVE)))) {
 					continue;
-				addBundleAndDependencies(exporter.getExporter(), set, includeOptional);
+				}
+				addBundleAndDependencies(exporter.getExporter(), set, includeOptional, excludeFragments);
 			}
 			BundleDescription[] fragments = desc.getFragments();
 			for (int i = 0; i < fragments.length; i++) {
-				if (!fragments[i].isResolved())
+				if (!fragments[i].isResolved()) {
 					continue;
+				}
 				String id = fragments[i].getSymbolicName();
-				if (!"org.eclipse.ui.workbench.compatibility".equals(id)) //$NON-NLS-1$
-					addBundleAndDependencies(fragments[i], set, includeOptional);
+				if (!excludeFragments.contains(id)) {
+					addBundleAndDependencies(fragments[i], set, includeOptional, excludeFragments);
+				}
 			}
 			HostSpecification host = desc.getHost();
-			if (host != null)
-				addBundleAndDependencies((BundleDescription) host.getSupplier(), set, includeOptional);
+			if (host != null) {
+				addBundleAndDependencies((BundleDescription) host.getSupplier(), set, includeOptional, excludeFragments);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
index 7d3d6b6..cc7f62e 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalFeatureModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,15 +14,14 @@ import java.io.*;
 import java.net.URL;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
 import org.eclipse.pde.core.IModelProviderEvent;
 import org.eclipse.pde.core.IModelProviderListener;
 import org.eclipse.pde.internal.core.feature.ExternalFeatureModel;
 import org.eclipse.pde.internal.core.ifeature.IFeature;
 import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.osgi.framework.Version;
 
-public class ExternalFeatureModelManager implements IEclipsePreferences.IPreferenceChangeListener {
+public class ExternalFeatureModelManager {
 
 	/**
 	 * Creates a feature model for the feature based on the given feature XML
@@ -51,13 +50,39 @@ public class ExternalFeatureModelManager implements IEclipsePreferences.IPrefere
 		return null;
 	}
 
+	public static IFeatureModel[] createModels(String platformHome, ArrayList additionalLocations, IProgressMonitor monitor) {
+		if (platformHome != null && platformHome.length() > 0) {
+			URL[] featureURLs = PluginPathFinder.getFeaturePaths(platformHome);
+
+			if (additionalLocations.size() == 0)
+				return createModels(featureURLs, monitor);
+
+			File[] dirs = new File[additionalLocations.size()];
+			for (int i = 0; i < dirs.length; i++) {
+				String directory = additionalLocations.get(i).toString();
+				File dir = new File(directory, "features"); //$NON-NLS-1$
+				if (!dir.exists())
+					dir = new File(directory);
+				dirs[i] = dir;
+			}
+
+			URL[] newUrls = PluginPathFinder.scanLocations(dirs);
+
+			URL[] result = new URL[featureURLs.length + newUrls.length];
+			System.arraycopy(featureURLs, 0, result, 0, featureURLs.length);
+			System.arraycopy(newUrls, 0, result, featureURLs.length, newUrls.length);
+			return createModels(result, monitor);
+		}
+		return new IFeatureModel[0];
+	}
+
 	private static IFeatureModel[] createModels(URL[] featurePaths, IProgressMonitor monitor) {
 		if (monitor == null)
 			monitor = new NullProgressMonitor();
 		monitor.beginTask("", featurePaths.length); //$NON-NLS-1$
 		Map uniqueFeatures = new HashMap();
 		for (int i = 0; i < featurePaths.length; i++) {
-			File manifest = new File(featurePaths[i].getFile(), "feature.xml"); //$NON-NLS-1$
+			File manifest = new File(featurePaths[i].getFile(), ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 			if (!manifest.exists() || !manifest.isFile()) {
 				monitor.worked(1);
 				continue;
@@ -77,8 +102,6 @@ public class ExternalFeatureModelManager implements IEclipsePreferences.IPrefere
 
 	private IFeatureModel[] fModels;
 
-	private String fPlatformHome;
-
 	private PDEPreferencesManager fPref;
 
 	public ExternalFeatureModelManager() {
@@ -89,20 +112,6 @@ public class ExternalFeatureModelManager implements IEclipsePreferences.IPrefere
 		fListeners.add(listener);
 	}
 
-	private boolean equalPaths(String path1, String path2) {
-		if (path1 == null) {
-			if (path2 == null) {
-				return true;
-			}
-			return false;
-		}
-		if (path2 == null) {
-			return false;
-		}
-		return new File(path1).equals(new File(path2));
-
-	}
-
 	private void fireModelProviderEvent(IModelProviderEvent e) {
 		Object[] listeners = fListeners.getListeners();
 		for (int i = 0; i < listeners.length; i++) {
@@ -112,65 +121,69 @@ public class ExternalFeatureModelManager implements IEclipsePreferences.IPrefere
 	}
 
 	/**
-	 * @param propertyValue
-	 * @return String or null
+	 * Loads new feature models from preferences and notifies listeners.
 	 */
-	private String getPathString(Object propertyValue) {
-		if (propertyValue != null && propertyValue instanceof String) {
-			String path = (String) propertyValue;
-			if (path.length() > 0) {
-				return path;
-			}
-		}
-		return null;
-	}
+	public void initialize() {
+		// Load all features from the platform path and addditional locations then filter by the list of external features, if available
+		String platformHome = fPref.getString(ICoreConstants.PLATFORM_PATH);
+		String additionalLocations = fPref.getString(ICoreConstants.ADDITIONAL_LOCATIONS);
+		String externalFeaturesString = fPref.getString(ICoreConstants.EXTERNAL_FEATURES);
 
-	public static IFeatureModel[] createModels(String platformHome, ArrayList additionalLocations, IProgressMonitor monitor) {
-		if (platformHome != null && platformHome.length() > 0) {
-			URL[] featureURLs = PluginPathFinder.getFeaturePaths(platformHome);
-
-			if (additionalLocations.size() == 0)
-				return createModels(featureURLs, monitor);
-
-			File[] dirs = new File[additionalLocations.size()];
-			for (int i = 0; i < dirs.length; i++) {
-				String directory = additionalLocations.get(i).toString();
-				File dir = new File(directory, "features"); //$NON-NLS-1$
-				if (!dir.exists())
-					dir = new File(directory);
-				dirs[i] = dir;
-			}
-
-			URL[] newUrls = PluginPathFinder.scanLocations(dirs);
-
-			URL[] result = new URL[featureURLs.length + newUrls.length];
-			System.arraycopy(featureURLs, 0, result, 0, featureURLs.length);
-			System.arraycopy(newUrls, 0, result, featureURLs.length, newUrls.length);
-			return createModels(result, monitor);
-		}
-		return new IFeatureModel[0];
-	}
-
-	/**
-	 * Loads new feature models and notifies listeners.
-	 * 
-	 * @param platformHome new location of platform home
-	 * @param additionalLocations additional locations
-	 * @param force whether to force load models - <code>true</code> loads models, and 
-	 *  <code>false</code> only loads models if platform home location has actually changed
-	 */
-	private void loadModels(String platformHome, String additionalLocations, boolean force) {
 		IFeatureModel[] oldModels = null;
 		IFeatureModel[] newModels = null;
+		// Do the model loading in a synch block in case other changes cause the models to load
 		synchronized (this) {
-			if (!force) {
-				if (equalPaths(platformHome, fPlatformHome)) {
-					return;
+			oldModels = fModels != null ? fModels : new IFeatureModel[0];
+			IFeatureModel[] allModels = createModels(platformHome, parseAdditionalLocations(additionalLocations), null);
+			if (externalFeaturesString == null || externalFeaturesString.trim().length() == 0) {
+				fModels = allModels;
+			} else {
+				// To allow multiple versions of features, create a map of feature ids to a list of models
+				Map modelMap = new HashMap();
+				for (int i = 0; i < allModels.length; i++) {
+					String id = allModels[i].getFeature().getId();
+					if (modelMap.containsKey(id)) {
+						List list = (List) modelMap.get(id);
+						list.add(allModels[i]);
+					} else {
+						List list = new ArrayList();
+						list.add(allModels[i]);
+						modelMap.put(id, list);
+					}
+				}
+
+				// Loop through the filter list, finding an exact match in the available models or highest version match
+				Set filteredModels = new HashSet();
+				String[] entries = externalFeaturesString.split(","); //$NON-NLS-1$
+				for (int i = 0; i < entries.length; i++) {
+					String[] parts = entries[i].split("@"); //$NON-NLS-1$
+					if (parts.length > 0) {
+						String id = parts[0];
+						List possibilities = (List) modelMap.get(id);
+						if (possibilities != null) {
+							IFeatureModel candidate = null;
+							for (Iterator iterator = possibilities.iterator(); iterator.hasNext();) {
+								IFeatureModel current = (IFeatureModel) iterator.next();
+								if (candidate == null) {
+									candidate = current;
+								} else if (parts.length > 1 && parts[1].equals(current.getFeature().getVersion())) {
+									candidate = current;
+								} else {
+									Version currentVersion = Version.parseVersion(current.getFeature().getVersion());
+									Version candidateVersion = Version.parseVersion(candidate.getFeature().getVersion());
+									if (currentVersion.compareTo(candidateVersion) == 1) {
+										candidate = current;
+									}
+								}
+							}
+							if (candidate != null) {
+								filteredModels.add(candidate);
+							}
+						}
+					}
 				}
+				fModels = (IFeatureModel[]) filteredModels.toArray(new IFeatureModel[filteredModels.size()]);
 			}
-			oldModels = fModels != null ? fModels : new IFeatureModel[0];
-			fModels = createModels(platformHome, parseAdditionalLocations(additionalLocations), null);
-			fPlatformHome = platformHome;
 			newModels = new IFeatureModel[fModels.length];
 			System.arraycopy(fModels, 0, newModels, 0, fModels.length);
 		}
@@ -200,37 +213,10 @@ public class ExternalFeatureModelManager implements IEclipsePreferences.IPrefere
 
 	}
 
-	private void platformPathChanged(String newHome) {
-		loadModels(newHome, fPref.getString(ICoreConstants.ADDITIONAL_LOCATIONS), false);
-	}
-
-	public void preferenceChange(PreferenceChangeEvent event) {
-		if (!ICoreConstants.PLATFORM_PATH.equals(event.getKey())) {
-			return;
-		}
-		String newHome = getPathString(event.getNewValue());
-		platformPathChanged(newHome);
-	}
-
 	public void removeModelProviderListener(IModelProviderListener listener) {
 		fListeners.remove(listener);
 	}
 
-	public synchronized void shutdown() {
-		fPref.removePreferenceChangeListener(this);
-	}
-
-	public void startup() {
-		synchronized (this) {
-			fPref.addPreferenceChangeListener(this);
-		}
-		loadModels(fPref.getString(ICoreConstants.PLATFORM_PATH), fPref.getString(ICoreConstants.ADDITIONAL_LOCATIONS), true);
-	}
-
-	public void reload() {
-		loadModels(fPref.getString(ICoreConstants.PLATFORM_PATH), fPref.getString(ICoreConstants.ADDITIONAL_LOCATIONS), true);
-	}
-
 	public IFeatureModel[] getModels() {
 		return fModels;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalModelManager.java
index 06661b8..40e5c4a 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ExternalModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,13 +11,13 @@
 package org.eclipse.pde.internal.core;
 
 import java.io.File;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.pde.core.plugin.IPluginBase;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.target.AbstractTargetHandle;
-import org.eclipse.pde.internal.core.target.NameVersionDescriptor;
+import org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor;
 
 public class ExternalModelManager extends AbstractModelManager {
 
@@ -35,44 +35,31 @@ public class ExternalModelManager extends AbstractModelManager {
 			for (int i = 0; i < fModels.length; i++)
 				fModels[i].setEnabled(true);
 		} else if (!saved.equals(ICoreConstants.VALUE_SAVED_NONE)) {
+			String versionString = pref.getString(ICoreConstants.CHECKED_VERSION_PLUGINS);
+			Set versions = new HashSet();
+			Set versionIds = new HashSet();
+			if (versionString != null && versionString.trim().length() > 0) {
+				if (!versionString.equals(ICoreConstants.VALUE_SAVED_NONE)) {
+					// restore version information, if any
+					StringTokenizer stok = new StringTokenizer(versionString);
+					while (stok.hasMoreTokens()) {
+						NameVersionDescriptor desc = NameVersionDescriptor.fromPortableString(stok.nextToken());
+						versions.add(desc);
+						versionIds.add(desc.getId());
+					}
+				}
+			}
 			Vector result = new Vector();
 			StringTokenizer stok = new StringTokenizer(saved);
 			while (stok.hasMoreTokens()) {
 				result.add(stok.nextToken());
 			}
 			for (int i = 0; i < fModels.length; i++) {
-				fModels[i].setEnabled(!result.contains(fModels[i].getPluginBase().getId()));
-			}
-		}
-		// enable pooled bundles properly (only if part of the profile)
-		String pooled = pref.getString(ICoreConstants.POOLED_BUNDLES);
-		if (pooled != null && pooled.trim().length() > 0) {
-			if (ICoreConstants.VALUE_SAVED_NONE.equals(pooled)) {
-				// all pooled bundles are disabled
-				for (int i = 0; i < fModels.length; i++) {
-					if (AbstractTargetHandle.BUNDLE_POOL.isPrefixOf(new Path(fModels[i].getInstallLocation()))) {
-						fModels[i].setEnabled(false);
-					}
-				}
-			} else {
-				StringTokenizer tokenizer = new StringTokenizer(pooled, ","); //$NON-NLS-1$
-				Set enabled = new HashSet();
-				while (tokenizer.hasMoreTokens()) {
-					String id = tokenizer.nextToken();
-					if (tokenizer.hasMoreTokens()) {
-						String ver = tokenizer.nextToken();
-						if (ICoreConstants.VALUE_SAVED_NONE.equals(ver)) { // indicates null version
-							ver = null;
-						}
-						enabled.add(new NameVersionDescriptor(id, ver));
-					}
-				}
-				for (int i = 0; i < fModels.length; i++) {
-					if (AbstractTargetHandle.BUNDLE_POOL.isPrefixOf(new Path(fModels[i].getInstallLocation()))) {
-						IPluginBase base = fModels[i].getPluginBase();
-						NameVersionDescriptor desc = new NameVersionDescriptor(base.getId(), base.getVersion());
-						fModels[i].setEnabled(enabled.contains(desc));
-					}
+				String id = fModels[i].getPluginBase().getId();
+				if (versionIds.contains(id)) {
+					fModels[i].setEnabled(!versions.contains(new NameVersionDescriptor(id, fModels[i].getPluginBase().getVersion())));
+				} else {
+					fModels[i].setEnabled(!result.contains(id));
 				}
 			}
 		}
@@ -82,34 +69,81 @@ public class ExternalModelManager extends AbstractModelManager {
 		fModels = models;
 	}
 
-	protected URL[] getPluginPaths() {
+	/**
+	 * Returns the URLs of all external plug-ins referenced by PDE target platform preferences.
+	 * <p>
+	 * Note this method is public for testing purposes only.
+	 * </p>
+	 * @return URLs of all external plug-ins referenced by PDE target platform preferences.
+	 */
+	public URL[] getPluginPaths() {
 		PDEPreferencesManager pref = PDECore.getDefault().getPreferencesManager();
-		URL[] base = PluginPathFinder.getPluginPaths(pref.getString(ICoreConstants.PLATFORM_PATH));
+		boolean addPool = false;
+		String baseLocation = pref.getString(ICoreConstants.PLATFORM_PATH);
+		URL[] base = null;
+		if (AbstractTargetHandle.BUNDLE_POOL.isPrefixOf(new Path(baseLocation))) {
+			// if the base platform path is part of the bundle pool, use the bundle pool
+			// preference info to restore bundles selectively
+			addPool = true;
+			base = new URL[0];
+		} else {
+			base = PluginPathFinder.getPluginPaths(baseLocation);
+		}
 
 		String value = pref.getString(ICoreConstants.ADDITIONAL_LOCATIONS);
 		StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$
 
-		if (tokenizer.countTokens() == 0)
+		if (!addPool && tokenizer.countTokens() == 0)
 			return base;
 
-		File[] extraLocations = new File[tokenizer.countTokens()];
-		for (int i = 0; i < extraLocations.length; i++) {
+		List extraLocations = new ArrayList(tokenizer.countTokens());
+		while (tokenizer.hasMoreTokens()) {
 			String location = tokenizer.nextToken();
-			File dir = new File(location, "plugins"); //$NON-NLS-1$
-			if (!dir.exists() || !dir.isDirectory())
-				dir = new File(location);
-			extraLocations[i] = dir;
+			if (AbstractTargetHandle.BUNDLE_POOL.isPrefixOf(new Path(location))) {
+				addPool = true;
+			} else {
+				File dir = new File(location, "plugins"); //$NON-NLS-1$
+				if (!dir.exists() || !dir.isDirectory())
+					dir = new File(location);
+				extraLocations.add(dir);
+			}
 		}
-		URL[] additional = PluginPathFinder.scanLocations(extraLocations);
+		URL[] additional = PluginPathFinder.scanLocations((File[]) extraLocations.toArray(new File[extraLocations.size()]));
+		URL[] result = append(base, additional);
 
-		if (additional.length == 0)
-			return base;
+		// add pooled bundles (only if part of the profile)
+		if (addPool) {
+			String pooled = pref.getString(ICoreConstants.POOLED_URLS);
+			if (pooled != null && pooled.trim().length() > 0) {
+				if (ICoreConstants.VALUE_SAVED_NONE.equals(pooled)) {
+					// none
+				} else {
+					tokenizer = new StringTokenizer(pooled, ","); //$NON-NLS-1$
+					List urls = new ArrayList(tokenizer.countTokens());
+					while (tokenizer.hasMoreTokens()) {
+						String fileName = tokenizer.nextToken();
+						try {
+							urls.add(AbstractTargetHandle.BUNDLE_POOL.append("plugins").append(fileName).toFile().toURL()); //$NON-NLS-1$
+						} catch (MalformedURLException e) {
+							PDECore.log(e);
+						}
+					}
+					additional = (URL[]) urls.toArray(new URL[urls.size()]);
+					result = append(result, additional);
+				}
+			}
+		}
 
+		return result;
+	}
+
+	private URL[] append(URL[] base, URL[] additional) {
+		if (additional.length == 0) {
+			return base;
+		}
 		URL[] result = new URL[base.length + additional.length];
 		System.arraycopy(base, 0, result, 0, base.length);
 		System.arraycopy(additional, 0, result, base.length, additional.length);
-
 		return result;
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureModelManager.java
index 08ec701..1f9b3bb 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FeatureModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,15 +10,9 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
+import java.util.*;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.pde.core.IModel;
-import org.eclipse.pde.core.IModelProviderEvent;
-import org.eclipse.pde.core.IModelProviderListener;
+import org.eclipse.pde.core.*;
 import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.util.VersionUtil;
 import org.osgi.framework.Version;
@@ -66,7 +60,6 @@ public class FeatureModelManager {
 			fWorkspaceManager.removeModelProviderListener(fProviderListener);
 		if (fExternalManager != null) {
 			fExternalManager.removeModelProviderListener(fProviderListener);
-			fExternalManager.shutdown();
 		}
 	}
 
@@ -74,7 +67,7 @@ public class FeatureModelManager {
 		if (fActiveModels != null) {
 			if (fReloadExternalNeeded) {
 				fReloadExternalNeeded = false;
-				fExternalManager.reload();
+				fExternalManager.initialize();
 			}
 			return;
 		}
@@ -99,7 +92,7 @@ public class FeatureModelManager {
 		fExternalManager = new ExternalFeatureModelManager();
 		fExternalManager.addModelProviderListener(fProviderListener);
 		fReloadExternalNeeded = false;
-		fExternalManager.startup();
+		fExternalManager.initialize();
 	}
 
 	/*
@@ -117,11 +110,22 @@ public class FeatureModelManager {
 		return (IFeatureModel[]) valid.toArray(new IFeatureModel[valid.size()]);
 	}
 
+	/**
+	 * @return all models in the workspace model manager
+	 */
 	public IFeatureModel[] getWorkspaceModels() {
 		init();
 		return fWorkspaceManager.getFeatureModels();
 	}
 
+	/**
+	 * @return all models in the external model manager
+	 */
+	public IFeatureModel[] getExternalModels() {
+		init();
+		return fExternalManager.getModels();
+	}
+
 	public IFeatureModel getFeatureModel(IProject project) {
 		init();
 		return fWorkspaceManager.getFeatureModel(project);
@@ -131,20 +135,23 @@ public class FeatureModelManager {
 	 * Finds active model with a given id and version
 	 * 
 	 * @param id
-	 * @param version
+	 * @param version version number to find, newest version is returned for empty version.
 	 * @return one IFeature model or null
 	 */
 	public IFeatureModel findFeatureModel(String id, String version) {
 		init();
 		IFeatureModel[] models = fActiveModels.get(id, version);
+
+		if (VersionUtil.isEmptyVersion(version)) {
+			return findFeatureModel(id);
+		}
+
 		for (int i = 0; i < models.length; i++) {
 			if (models[i].isValid()) {
 				return models[i];
 			}
 		}
-		if (models.length == 0 && "0.0.0".equals(version)) { //$NON-NLS-1$
-			return findFeatureModel(id);
-		}
+
 		return null;
 	}
 
@@ -222,10 +229,6 @@ public class FeatureModelManager {
 		}
 	}
 
-	/**
-	 * @param e
-	 * @return
-	 */
 	private synchronized IFeatureModelDelta processEvent(IModelProviderEvent e) {
 		FeatureModelDelta delta = new FeatureModelDelta();
 		/*
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FileAdapter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FileAdapter.java
index e9fdfd3..0197f2a 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FileAdapter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/FileAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.pde.internal.core;
 
 import java.io.File;
 import java.util.Locale;
-
 import org.eclipse.core.runtime.PlatformObject;
 
 public class FileAdapter extends PlatformObject {
@@ -33,7 +32,7 @@ public class FileAdapter extends PlatformObject {
 
 	public boolean isManifest() {
 		String fileName = fFile.getName();
-		return (fileName.equals("plugin.xml") || fileName.equals("fragment.xml") || fileName.equalsIgnoreCase("manifest.mf")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		return (fileName.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || fileName.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) || fileName.equalsIgnoreCase(ICoreConstants.MANIFEST_FILENAME));
 	}
 
 	public boolean isSchema() {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
index c66f219..09c4379 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ICoreConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
+import java.util.Locale;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.osgi.framework.Constants;
@@ -36,7 +37,30 @@ public interface ICoreConstants {
 	String GROUP_PLUGINS_VIEW = "group_plugins"; //$NON-NLS-1$
 	String ADDITIONAL_LOCATIONS = "additional_locations"; //$NON-NLS-1$
 	String TARGET_PLATFORM_REALIZATION = "target_platform_realization"; //$NON-NLS-1$
+
+	/**
+	 * This preference was only used during 3.5, it has been replaced in 3.6
+	 * with POOLED_URLS.
+	 * 
+	 * @deprecated
+	 */
 	String POOLED_BUNDLES = "pooled_bundles"; //$NON-NLS-1$
+	/**
+	 * Comma separated list of bundle URLs used from the bundle pool.
+	 * @since 3.6
+	 */
+	String POOLED_URLS = "pooled_urls"; //$NON-NLS-1$
+	/**
+	 * List of feature ids and versions that are available in the target platform.  Features
+	 * are comma separated, with each entry taking the form of [id]@[version]
+	 * 
+	 * @since 3.6
+	 */
+	String EXTERNAL_FEATURES = "external_features"; //$NON-NLS-1$
+	/**
+	 * @since 3.6 - Bug 282708: [target] issues with two versions of the same bundle 
+	 */
+	String CHECKED_VERSION_PLUGINS = "checkedVersionPlugins"; //$NON-NLS-1$
 
 	// Target Environment
 	String OS = "org.eclipse.pde.ui.os"; //$NON-NLS-1$
@@ -67,6 +91,15 @@ public interface ICoreConstants {
 	/** Constant for the string <code>META-INF/MANIFEST.MF</code> */
 	public final static String BUNDLE_FILENAME_DESCRIPTOR = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
 
+	/** Constant for the string <code>MANIFEST.MF</code> */
+	public final static String MANIFEST_FILENAME = "MANIFEST.MF"; //$NON-NLS-1$
+
+	/** Constant for the string <code>.options</code> */
+	public final static String OPTIONS_FILENAME = ".options"; //$NON-NLS-1$
+
+	/** Constant for the string <code>manifest.mf</code> */
+	public final static String MANIFEST_FILENAME_LOWER_CASE = MANIFEST_FILENAME.toLowerCase(Locale.ENGLISH);
+
 	/** Constant for the string <code>build.properties</code> */
 	public final static String BUILD_FILENAME_DESCRIPTOR = "build.properties"; //$NON-NLS-1$
 
@@ -76,6 +109,7 @@ public interface ICoreConstants {
 	public final static String TARGET33 = "3.3"; //$NON-NLS-1$
 	public final static String TARGET34 = "3.4"; //$NON-NLS-1$
 	public final static String TARGET35 = "3.5"; //$NON-NLS-1$
+	public final static String TARGET36 = "3.6"; //$NON-NLS-1$
 
 	public final static String EQUINOX = "Equinox"; //$NON-NLS-1$
 
@@ -85,6 +119,22 @@ public interface ICoreConstants {
 	public static final String EXTENSIONS_PROPERTY = "pluginProject.extensions"; //$NON-NLS-1$
 	public static final String RESOLVE_WITH_REQUIRE_BUNDLE = "resolve.requirebundle"; //$NON-NLS-1$
 	public static final String TARGET_PROFILE = "target.profile"; //$NON-NLS-1$
+	/**
+	 * Configures launch shortcuts visible in the manifest editor for a project.
+	 * Value is a comma separated list of <code>org.eclipse.pde.ui.launchShortcuts</code>
+	 * extension identifiers.
+	 * 
+	 * @since 3.6 
+	 */
+	public static final String MANIFEST_LAUNCH_SHORTCUTS = "manifest.launchShortcuts"; //$NON-NLS-1$
+
+	/**
+	 * Configures the export wizard used in the manifest editor for a project.
+	 * Value is an <code>org.eclipse.ui.exportWizards</code> extension identifier.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String MANIFEST_EXPORT_WIZARD = "manifest.exportWizard"; //$NON-NLS-1$
 
 	// for backwards compatibility with Eclipse 3.0 bundle manifest files
 	public final static String PROVIDE_PACKAGE = "Provide-Package"; //$NON-NLS-1$
@@ -100,7 +150,17 @@ public interface ICoreConstants {
 	public final static String EXTENSIBLE_API = "Eclipse-ExtensibleAPI"; //$NON-NLS-1$
 	public final static String PATCH_FRAGMENT = "Eclipse-PatchFragment"; //$NON-NLS-1$
 	public final static String PLUGIN_CLASS = "Plugin-Class"; //$NON-NLS-1$
+	/**
+	 * The 'Eclipse-AutoStart=true' header was used up to and including 3.1 to mean LAZY.
+	 * However, this was a poorly named header, since "auto-start" sounds UN-LAZY, and
+	 * was replaced with 'Eclipse-LazyStart=true' in 3.2.
+	 */
 	public final static String ECLIPSE_AUTOSTART = "Eclipse-AutoStart"; //$NON-NLS-1$
+	/**
+	 * The 'Eclipse-LazyStart=true' header replaced the 'Eclipse-AutoStart' header 
+	 * with a better name in 3.2. And since 3.4 (OSGi R4.1), the 'Bundle-ActivationPolicy: lazy'
+	 * replaces all of these.
+	 */
 	public final static String ECLIPSE_LAZYSTART = "Eclipse-LazyStart"; //$NON-NLS-1$
 	public final static String ECLIPSE_JREBUNDLE = "Eclipse-JREBundle"; //$NON-NLS-1$
 	public static final String ECLIPSE_BUDDY_POLICY = "Eclipse-BuddyPolicy"; //$NON-NLS-1$
@@ -111,6 +171,7 @@ public interface ICoreConstants {
 	public static final String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle"; //$NON-NLS-1$
 	public static final String ECLIPSE_SYSTEM_BUNDLE = "Eclipse-SystemBundle"; //$NON-NLS-1$
 	public static final String ECLIPSE_BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
+	public static final String ECLIPSE_SOURCE_REFERENCES = "Eclipse-SourceReferences"; //$NON-NLS-1$
 	public static final String SERVICE_COMPONENT = "Service-Component"; //$NON-NLS-1$
 
 	// Equinox-specific system properties
@@ -126,8 +187,9 @@ public interface ICoreConstants {
 	public static final String INTERNAL_DIRECTIVE = "x-internal"; //$NON-NLS-1$
 	public static final String FRIENDS_DIRECTIVE = "x-friends"; //$NON-NLS-1$
 
-	public static final String[] SHAPE_VALUES = new String[] {"dir", //$NON-NLS-1$
-			"jar"}; //$NON-NLS-1$
+	public static final String SHAPE_JAR = "jar"; //$NON-NLS-1$
+	public static final String SHAPE_DIR = "dir"; //$NON-NLS-1$
+	public static final String[] SHAPE_VALUES = new String[] {SHAPE_DIR, SHAPE_JAR};
 
 	public static final String[] TRANSLATABLE_HEADERS = new String[] {Constants.BUNDLE_VENDOR, Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_COPYRIGHT, Constants.BUNDLE_CATEGORY, Constants.BUNDLE_CONTACTADDRESS};
 
@@ -150,6 +212,7 @@ public interface ICoreConstants {
 
 	// Extension point identifiers
 	public static final String EXTENSION_POINT_SOURCE = PDECore.PLUGIN_ID + ".source"; //$NON-NLS-1$
+	public static final String EXTENSION_POINT_BUNDLE_IMPORTERS = PDECore.PLUGIN_ID + ".bundleImporters"; //$NON-NLS-1$
 
 	// file extensions
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavaElementChangeListener.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavaElementChangeListener.java
index 474f4f4..813ba58 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavaElementChangeListener.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavaElementChangeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,28 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
+import java.io.*;
 import java.util.Enumeration;
 import java.util.Properties;
-
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.*;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class JavaElementChangeListener implements IElementChangedListener {
 
@@ -120,7 +107,7 @@ public class JavaElementChangeListener implements IElementChangedListener {
 
 	private boolean isInterestingProject(IJavaProject jProject) {
 		IProject project = jProject.getProject();
-		return WorkspaceModelManager.isPluginProject(project) && !WorkspaceModelManager.isBinaryProject(project) && !project.exists(ICoreConstants.MANIFEST_PATH);
+		return WorkspaceModelManager.isPluginProject(project) && !WorkspaceModelManager.isBinaryProject(project) && !PDEProject.getManifest(project).exists();
 	}
 
 	private void updateTable(IJavaElement element) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavadocLocationManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavadocLocationManager.java
index c1cb27f..9d2529f 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavadocLocationManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/JavadocLocationManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,9 +32,9 @@ public class JavadocLocationManager {
 		if (file.isDirectory()) {
 			File doc = new File(file, "doc"); //$NON-NLS-1$
 			if (new File(doc, "package-list").exists()) //$NON-NLS-1$
-				return doc.getAbsolutePath();
+				return "file:/" + doc.getAbsolutePath(); //$NON-NLS-1$
 		} else if (CoreUtility.jarContainsResource(file, "doc/package-list", false)) { //$NON-NLS-1$
-			return file.getAbsolutePath() + "!/doc"; //$NON-NLS-1$
+			return "jar:file:/" + file.getAbsolutePath() + "!/doc"; //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		return getEntry(model);
 	}
@@ -103,8 +103,12 @@ public class JavadocLocationManager {
 						}
 					}
 					buffer.append(path);
-					if (archive)
+					if (archive) {
 						buffer.insert(0, "jar:"); //$NON-NLS-1$
+						if (buffer.indexOf("!") == -1) { //$NON-NLS-1$
+							buffer.append("!/"); //$NON-NLS-1$
+						}
+					}
 					processPlugins(buffer.toString(), children[i].getChildren());
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
index d4f3333..c1f31fb 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java
@@ -12,7 +12,7 @@
 package org.eclipse.pde.internal.core;
 
 import java.io.*;
-import java.util.Dictionary;
+import java.util.*;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
@@ -201,6 +201,26 @@ public class MinimalState {
 		return internalResolveState(incremental);
 	}
 
+	/**
+	 * Resolves the state incrementally based on the given bundle names.
+	 *  
+	 * @param symbolicNames
+	 * @return state delta
+	 */
+	public StateDelta resolveState(String[] symbolicNames) {
+		if (initializePlatformProperties()) {
+			return fState.resolve(false);
+		}
+		List bundles = new ArrayList();
+		for (int i = 0; i < symbolicNames.length; i++) {
+			BundleDescription[] descriptions = fState.getBundles(symbolicNames[i]);
+			for (int j = 0; j < descriptions.length; j++) {
+				bundles.add(descriptions[j]);
+			}
+		}
+		return fState.resolve((BundleDescription[]) bundles.toArray(new BundleDescription[bundles.size()]));
+	}
+
 	private synchronized StateDelta internalResolveState(boolean incremental) {
 		boolean fullBuildRequired = initializePlatformProperties();
 		return fState.resolve(incremental && !fullBuildRequired);
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
index 39c5bfd..46925f8 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/P2Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,34 +11,44 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
+import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
+import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.pde.core.plugin.IPluginBase;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.build.BundleHelper;
-import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.internal.core.plugin.PluginBase;
+import org.osgi.framework.Constants;
 
 /**
- * Utilities to read and write bundle and source information files.
+ * Utilities to read and write p2 files
  * 
  * @since 3.4
  */
 public class P2Utils {
 
-	private static final String SRC_INFO_FOLDER = "org.eclipse.equinox.source"; //$NON-NLS-1$
-	private static final String BUNDLE_INFO_FOLDER = IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR;
-	private static final String SRC_INFO_PATH = SRC_INFO_FOLDER + File.separator + "source.info"; //$NON-NLS-1$
-	private static final String BUNDLE_INFO_PATH = BUNDLE_INFO_FOLDER + File.separator + "bundles.info"; //$NON-NLS-1$
-
 	public static final String P2_FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
 
+	public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
+	private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
+	private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
+	public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
+	public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
+	public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
+	public static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package"; //$NON-NLS-1$
+
 	/**
 	 * Returns bundles defined by the 'bundles.info' file in the
 	 * specified location, or <code>null</code> if none. The "bundles.info" file
@@ -97,7 +107,7 @@ public class P2Utils {
 			return null;
 		}
 		try {
-			URL bundlesTxt = new URL(configurationArea.getProtocol(), configurationArea.getHost(), new File(configurationArea.getFile(), BUNDLE_INFO_PATH).getAbsolutePath());
+			URL bundlesTxt = new URL(configurationArea.getProtocol(), configurationArea.getHost(), new File(configurationArea.getFile(), SimpleConfiguratorManipulator.BUNDLES_INFO_PATH).getAbsolutePath());
 			File home = basePath.toFile();
 			BundleInfo bundles[] = getBundlesFromFile(bundlesTxt, home);
 			if (bundles == null || bundles.length == 0) {
@@ -130,7 +140,7 @@ public class P2Utils {
 		}
 		try {
 			File home = basePath.toFile();
-			URL srcBundlesTxt = new URL(configurationArea.getProtocol(), configurationArea.getHost(), configurationArea.getFile().concat(SRC_INFO_PATH));
+			URL srcBundlesTxt = new URL(configurationArea.getProtocol(), configurationArea.getHost(), configurationArea.getFile().concat(SimpleConfiguratorManipulator.SOURCE_INFO_PATH));
 			BundleInfo srcBundles[] = getBundlesFromFile(srcBundlesTxt, home);
 			if (srcBundles == null || srcBundles.length == 0) {
 				return null;
@@ -173,7 +183,12 @@ public class P2Utils {
 		if (manipulator == null) {
 			return null;
 		}
-		return manipulator.loadConfiguration(fileURL, home);
+		// the input stream will be buffered and closed for us
+		try {
+			return manipulator.loadConfiguration(fileURL.openStream(), home.toURI());
+		} catch (FileNotFoundException e) {
+			return null;
+		}
 	}
 
 	/**
@@ -270,8 +285,8 @@ public class P2Utils {
 			}
 		}
 
-		File bundlesTxt = new File(directory, BUNDLE_INFO_PATH);
-		File srcBundlesTxt = new File(directory, SRC_INFO_PATH);
+		File bundlesTxt = new File(directory, SimpleConfiguratorManipulator.BUNDLES_INFO_PATH);
+		File srcBundlesTxt = new File(directory, SimpleConfiguratorManipulator.SOURCE_INFO_PATH);
 
 		BundleInfo[] infos = (BundleInfo[]) bundleInfo.toArray(new BundleInfo[bundleInfo.size()]);
 		BundleInfo[] sources = (BundleInfo[]) sourceInfo.toArray(new BundleInfo[sourceInfo.size()]);
@@ -296,4 +311,170 @@ public class P2Utils {
 		}
 	}
 
+	/**
+	 * Returns whether a profile with the given ID exists in a profile registry
+	 * stored in the give p2 data area.
+	 * 
+	 * @param profileID id of the profile to check
+	 * @param p2DataArea data area where the profile registry is
+	 * @return whether the profile exists
+	 */
+	public static boolean profileExists(String profileID, File p2DataArea) throws CoreException {
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) PDECore.getDefault().acquireService(IProvisioningAgentProvider.SERVICE_NAME);
+		if (provider == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		IProvisioningAgent agent = provider.createAgent(p2DataArea.toURI());
+		if (agent == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (registry == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		return registry.containsProfile(profileID);
+	}
+
+	/**
+	 * Generates a profile containing metadata for all of the bundles in the provided collection.
+	 * The profile will have the given profile ID and will be persisted in the profile registry
+	 * directory inside the given p2 data area.
+	 * 
+	 * @param profileID the ID to be used when creating the profile, if a profile with the same name exists, it will be overwritten
+	 * @param p2DataArea the directory which contains p2 data including the profile registry, if the directory path doesn't exist it will be created
+	 * @param bundles the collection of IPluginModelBase objects representing bundles to create metadata for and add to the profile
+	 * 
+	 * @throws CoreException if the profile cannot be generated
+	 */
+	public static void createProfile(String profileID, File p2DataArea, Collection bundles) throws CoreException {
+		// Acquire the required p2 services, creating an agent in the target p2 metadata area
+		IProvisioningAgentProvider provider = (IProvisioningAgentProvider) PDECore.getDefault().acquireService(IProvisioningAgentProvider.SERVICE_NAME);
+		if (provider == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		IProvisioningAgent agent = provider.createAgent(p2DataArea.toURI());
+		if (agent == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (registry == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
+		if (engine == null) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.P2Utils_UnableToAcquireP2Service));
+		}
+
+		// Delete any previous profiles with the same ID
+		registry.removeProfile(profileID);
+
+		// Create the profile
+		IProfile profile = null;
+		Properties props = new Properties();
+//		props.setProperty(IProfile.PROP_INSTALL_FOLDER, registryArea.getAbsolutePath());
+		profile = registry.addProfile(profileID, props);
+
+		// Create metadata for the bundles
+		Collection ius = new ArrayList(bundles.size());
+		for (Iterator iterator = bundles.iterator(); iterator.hasNext();) {
+			IPluginModelBase model = (IPluginModelBase) iterator.next();
+			BundleDescription bundle = model.getBundleDescription();
+			ius.add(createBundleIU(bundle));
+		}
+
+		// Add the metadata to the profile
+		ProvisioningContext context = new ProvisioningContext(agent);
+		IProvisioningPlan plan = engine.createPlan(profile, context);
+		for (Iterator iter = ius.iterator(); iter.hasNext();) {
+			IInstallableUnit iu = (IInstallableUnit) iter.next();
+			plan.addInstallableUnit(iu);
+			plan.setInstallableUnitProfileProperty(iu, "org.eclipse.equinox.p2.internal.inclusion.rules", ProfileInclusionRules.createOptionalInclusionRule(iu)); //$NON-NLS-1$
+		}
+		IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_CHECK_TRUST, PhaseSetFactory.PHASE_COLLECT, PhaseSetFactory.PHASE_CONFIGURE, PhaseSetFactory.PHASE_UNCONFIGURE, PhaseSetFactory.PHASE_UNINSTALL});
+		IStatus status = engine.perform(plan, phaseSet, new NullProgressMonitor());
+
+		if (!status.isOK() && status.getSeverity() != IStatus.CANCEL) {
+			throw new CoreException(status);
+		}
+
+	}
+
+	/**
+	 * Creates an installable unit from a bundle description
+	 * 
+	 * @param bd bundle description to create metadata for
+	 * @return an installable unit
+	 */
+	private static IInstallableUnit createBundleIU(BundleDescription bd) {
+		InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
+		iu.setSingleton(bd.isSingleton());
+		iu.setId(bd.getSymbolicName());
+		iu.setVersion(fromOSGiVersion(bd.getVersion()));
+		iu.setFilter(bd.getPlatformFilter());
+		iu.setTouchpointType(TOUCHPOINT_OSGI);
+
+		boolean isFragment = bd.getHost() != null;
+
+		//Process the required bundles
+		BundleSpecification requiredBundles[] = bd.getRequiredBundles();
+		ArrayList reqsDeps = new ArrayList();
+		if (isFragment)
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
+		for (int j = 0; j < requiredBundles.length; j++)
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
+
+		// Process the import packages
+		ImportPackageSpecification osgiImports[] = bd.getImportPackages();
+		for (int i = 0; i < osgiImports.length; i++) {
+			// TODO we need to sort out how we want to handle wild-carded dynamic imports - for now we ignore them
+			ImportPackageSpecification importSpec = osgiImports[i];
+			String importPackageName = importSpec.getName();
+			if (importPackageName.indexOf('*') != -1)
+				continue;
+			VersionRange versionRange = fromOSGiVersionRange(importSpec.getVersionRange());
+			//TODO this needs to be refined to take into account all the attribute handled by imports
+			boolean isOptional = importSpec.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC) || importSpec.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL);
+			reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional, false));
+		}
+		iu.setRequirements(((IRequirement[]) reqsDeps.toArray(new IRequirement[reqsDeps.size()])));
+
+		// Create set of provided capabilities
+		ArrayList providedCapabilities = new ArrayList();
+		providedCapabilities.add(MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
+		providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
+
+		// Process the export package
+		ExportPackageDescription exports[] = bd.getExportPackages();
+		for (int i = 0; i < exports.length; i++) {
+			//TODO make sure that we support all the refinement on the exports
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), fromOSGiVersion(exports[i].getVersion())));
+		}
+		// Here we add a bundle capability to identify bundles
+		providedCapabilities.add(BUNDLE_CAPABILITY);
+		if (isFragment)
+			providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), fromOSGiVersion(bd.getVersion())));
+
+		iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+		return MetadataFactory.createInstallableUnit(iu);
+	}
+
+	private static Version fromOSGiVersion(org.osgi.framework.Version version) {
+		if (version == null)
+			return null;
+		if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
+			return Version.MAX_VERSION;
+		return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
+	}
+
+	private static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
+		if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
+			return VersionRange.emptyRange;
+		return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java
index 5c62e05..2d15ff5 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
@@ -22,6 +22,7 @@ import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
+import org.xml.sax.helpers.DefaultHandler;
 
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.util.ManifestElement;
@@ -240,7 +241,9 @@ public class PDEAuxiliaryState {
 		if (file.exists() && file.isFile()) {
 			try {
 				DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-				Document doc = factory.newDocumentBuilder().parse(file);
+				DocumentBuilder documentBuilder = factory.newDocumentBuilder();
+				documentBuilder.setErrorHandler(new DefaultHandler());
+				Document doc = documentBuilder.parse(file);
 				Element root = doc.getDocumentElement();
 				if (root != null) {
 					NodeList list = root.getChildNodes();
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECore.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECore.java
index 34791d1..c8c2ea9 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECore.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,20 +14,19 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 import java.util.Hashtable;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.project.IBundleProjectService;
 import org.eclipse.pde.internal.core.builders.FeatureRebuilder;
 import org.eclipse.pde.internal.core.builders.PluginRebuilder;
+import org.eclipse.pde.internal.core.project.BundleProjectService;
 import org.eclipse.pde.internal.core.schema.SchemaRegistry;
 import org.eclipse.pde.internal.core.target.TargetPlatformService;
 import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
 import org.eclipse.update.configurator.ConfiguratorUtils;
 import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.util.tracker.ServiceTracker;
 
 public class PDECore extends Plugin {
 	public static final String PLUGIN_ID = "org.eclipse.pde.core"; //$NON-NLS-1$
@@ -125,9 +124,6 @@ public class PDECore extends Plugin {
 
 	private TargetDefinitionManager fTargetProfileManager;
 
-	private PackageAdmin fPackageAdmin = null;
-	private ServiceTracker fServiceTracker = null;
-
 	// Schema registry
 	private SchemaRegistry fSchemaRegistry;
 
@@ -149,6 +145,11 @@ public class PDECore extends Plugin {
 	 */
 	private ServiceRegistration fTargetPlatformService;
 
+	/**
+	 * Bundle project service.
+	 */
+	private ServiceRegistration fBundleProjectService;
+
 	public PDECore() {
 		inst = this;
 	}
@@ -235,11 +236,6 @@ public class PDECore extends Plugin {
 	public SearchablePluginsManager getSearchablePluginsManager() {
 		if (fSearchablePluginsManager == null) {
 			fSearchablePluginsManager = new SearchablePluginsManager();
-			try {
-				getWorkspace().addSaveParticipant(inst, fSearchablePluginsManager);
-			} catch (CoreException e) {
-				log(e);
-			}
 		}
 		return fSearchablePluginsManager;
 	}
@@ -248,37 +244,10 @@ public class PDECore extends Plugin {
 		return fModelManager != null && fModelManager.isInitialized();
 	}
 
-	private Bundle getBundle(String symbolicName) {
-		if (fPackageAdmin == null)
-			return null;
-		Bundle[] bundles = fPackageAdmin.getBundles(symbolicName, null);
-		if (bundles == null)
-			return null;
-		// Return the first bundle that is not installed or uninstalled
-		for (int i = 0; i < bundles.length; i++) {
-			if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
-				return bundles[i];
-			}
-		}
-		return null;
-	}
-
-	private boolean startEarly(String bundleName) throws BundleException {
-		Bundle bundle = getBundle(bundleName);
-		if (bundle == null)
-			return false;
-		bundle.start(Bundle.START_TRANSIENT);
-		return true;
-	}
-
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
 		fBundleContext = context;
 
-		fServiceTracker = new ServiceTracker(context, PackageAdmin.class.getName(), null);
-		fServiceTracker.open();
-		fPackageAdmin = (PackageAdmin) fServiceTracker.getService();
-
 		fJavaElementChangeListener = new JavaElementChangeListener();
 		fJavaElementChangeListener.start();
 		fPluginRebuilder = new PluginRebuilder();
@@ -287,10 +256,39 @@ public class PDECore extends Plugin {
 		fFeatureRebuilder.start();
 
 		fTargetPlatformService = context.registerService(ITargetPlatformService.class.getName(), TargetPlatformService.getDefault(), new Hashtable());
+		fBundleProjectService = context.registerService(IBundleProjectService.class.getName(), BundleProjectService.getDefault(), new Hashtable());
+
+		// use save participant to clean orphaned profiles.
+		ResourcesPlugin.getWorkspace().addSaveParticipant(PLUGIN_ID, new ISaveParticipant() {
+			public void saving(ISaveContext saveContext) throws CoreException {
+				ITargetPlatformService tps = (ITargetPlatformService) acquireService(ITargetPlatformService.class.getName());
+				if (tps instanceof TargetPlatformService) {
+					((TargetPlatformService) tps).cleanOrphanedTargetDefinitionProfiles();
+				}
+				if (fSearchablePluginsManager != null) {
+					fSearchablePluginsManager.saving(saveContext);
+				}
+			}
+
+			public void rollback(ISaveContext saveContext) {
+				if (fSearchablePluginsManager != null) {
+					fSearchablePluginsManager.rollback(saveContext);
+				}
+			}
+
+			public void prepareToSave(ISaveContext saveContext) throws CoreException {
+				if (fSearchablePluginsManager != null) {
+					fSearchablePluginsManager.prepareToSave(saveContext);
+				}
+			}
+
+			public void doneSaving(ISaveContext saveContext) {
+				if (fSearchablePluginsManager != null) {
+					fSearchablePluginsManager.doneSaving(saveContext);
+				}
+			}
+		});
 
-		// for now we need to start this bundle to ensure required services
-		// are present when we need them (like IProfileRegistry)
-		startEarly("org.eclipse.equinox.p2.exemplarysetup"); //$NON-NLS-1$
 	}
 
 	public BundleContext getBundleContext() {
@@ -299,11 +297,6 @@ public class PDECore extends Plugin {
 
 	public void stop(BundleContext context) throws CoreException {
 
-		ITargetPlatformService tps = (ITargetPlatformService) acquireService(ITargetPlatformService.class.getName());
-		if (tps instanceof TargetPlatformService) {
-			((TargetPlatformService) tps).cleanOrphanedTargetDefinitionProfiles();
-		}
-
 		if (fPreferenceManager != null) {
 			fPreferenceManager.savePluginPreferences();
 		}
@@ -321,7 +314,6 @@ public class PDECore extends Plugin {
 			fTargetProfileManager = null;
 		}
 		if (fSearchablePluginsManager != null) {
-			getWorkspace().removeSaveParticipant(inst);
 			fSearchablePluginsManager.shutdown();
 			fSearchablePluginsManager = null;
 		}
@@ -342,9 +334,12 @@ public class PDECore extends Plugin {
 			fTargetPlatformService.unregister();
 			fTargetPlatformService = null;
 		}
+		if (fBundleProjectService != null) {
+			fBundleProjectService.unregister();
+			fBundleProjectService = null;
+		}
 
-		fServiceTracker.close();
-		fPackageAdmin = null;
+		ResourcesPlugin.getWorkspace().removeSaveParticipant(PLUGIN_ID);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
index 9b82c9b..2f649e5 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Code 9 Corporation - on going enhancements and maintenance
+ *     Simon Muschel <smuschel at gmx.de> - bugs 215743, 260549
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
@@ -54,6 +55,8 @@ public class PDECoreMessages extends NLS {
 	// Status text #####################################
 	public static String BinaryRepositoryProvider_veto;
 
+	public static String P2Utils_UnableToAcquireP2Service;
+
 	public static String ProductExportOperation_0;
 
 	public static String PropertiesTextChangeListener_editNames_delete;
@@ -77,6 +80,8 @@ public class PDECoreMessages extends NLS {
 	public static String FeatureInfo_copyright;
 	public static String PluginObject_readOnlyChange;
 	public static String FeatureObject_readOnlyChange;
+	public static String SiteBuildOperation_0;
+
 	public static String SiteObject_readOnlyChange;
 
 	public static String BuildObject_readOnlyException;
@@ -111,6 +116,7 @@ public class PDECoreMessages extends NLS {
 	public static String Builders_Feature_patchedMatch;
 	public static String Builders_Feature_missingUnpackFalse;
 	public static String Builders_Feature_mismatchUnpackBundleShape;
+	public static String Builders_Feature_mismatchPluginVersion;
 	public static String Builders_Schema_compiling;
 	public static String Builders_Schema_compilingSchemas;
 	public static String Builders_Schema_removing;
@@ -121,6 +127,8 @@ public class PDECoreMessages extends NLS {
 	public static String Builders_Schema_valueRequired;
 	public static String Builders_Schema_valueNotRequired;
 	public static String Builders_Schema_duplicateElement;
+	public static String Builders_Schema_includeNotValid;
+	public static String Builders_Schema_referencedElementNotFound;
 
 	public static String Builders_Manifest_missingRequired;
 	public static String Builders_Manifest_dependency;
@@ -212,19 +220,47 @@ public class PDECoreMessages extends NLS {
 
 	public static String BundleManifestSourceLocationManager_problemProcessBundleManifestHeaderAttributeMissing;
 
+	public static String BundleValidationOperation_multiple_singletons;
+
 	public static String ManifestConsistencyChecker_buildPropertiesSubtask;
 
 	public static String BuildErrorReporter_missingEntry;
 	public static String BuildErrorReporter_missingFolder;
 	public static String BuildErrorReporter_emptyEntry;
 	public static String BuildErrorReporter_binIncludesMissing;
+	public static String BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings;
+
+	public static String BuildErrorReporter_buildEntryMissingProjectSpecificSettings;
+
+	public static String BuildErrorReporter_buildEntryMissingValidPath;
+
+	public static String BuildErrorReporter_buildEntryMissingValidRelativePath;
+
+	public static String BuildErrorReporter_BuildEntryNotRequiredMatchesDefault;
+
 	public static String BuildErrorReporter_sourceMissing;
+
+	public static String BuildErrorReporter_srcIncludesSourceFolder;
+
+	public static String BuildErrorReporter_srcIncludesSourceFolder1;
 	public static String BuildErrorReporter_classpathEntryMissing;
 	public static String BuildErrorReporter_missingFile;
 	public static String BuildErrorReporter_entiresMustRefDirs;
 	public static String BuildErrorReporter_dirsMustEndSlash;
 	public static String BuildErrorReporter_classpathEntryMissing1;
 
+	public static String BuildErrorReporter_CompilercomplianceLevel;
+
+	public static String BuildErrorReporter_DisallowIdentifiers;
+
+	public static String BuildErrorReporter_GeneratedClassFilesCompatibility;
+
+	public static String BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken;
+
+	public static String BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry;
+
+	public static String BuildErrorReporter_SourceCompatibility;
+
 	public static String ExportWizard_badDirectory;
 
 	public static String FeatureExportJob_taskName;
@@ -255,6 +291,7 @@ public class PDECoreMessages extends NLS {
 	public static String PluginConverter_EclipseConverterFileNotFound;
 
 	public static String PluginModelManager_0;
+	public static String PluginModelManager_1;
 
 	public static String PluginParser_EclipseConverterMissingAttribute;
 
@@ -268,6 +305,29 @@ public class PDECoreMessages extends NLS {
 
 	public static String SearchablePluginsManager_createProjectTaskName;
 
+	public static String SourceEntryErrorReporter_0;
+	public static String SourceEntryErrorReporter_1;
+	public static String SourceEntryErrorReporter_10;
+	public static String SourceEntryErrorReporter_2;
+	public static String SourceEntryErrorReporter_3;
+	public static String SourceEntryErrorReporter_4;
+	public static String SourceEntryErrorReporter_5;
+	public static String SourceEntryErrorReporter_6;
+	public static String SourceEntryErrorReporter_7;
+	public static String SourceEntryErrorReporter_8;
+	public static String SourceEntryErrorReporter_9;
+
+	public static String SourceEntryErrorReporter_DifferentTargetLibrary;
+	public static String SourceEntryErrorReporter_DupeOutputFolder;
+	public static String SourceEntryErrorReporter_DupeSourceFolder;
+	public static String SourceEntryErrorReporter_ExtraOutputFolder;
+	public static String SourceEntryErrorReporter_InvalidOutputFolder;
+	public static String SourceEntryErrorReporter_InvalidSourceFolder;
+	public static String SourceEntryErrorReporter_MissingLibrary;
+
+	public static String SourceEntryErrorReporter_MissingOutputEntry;
+	public static String SourceEntryErrorReporter_MissingOutputLibForClassFolder;
+
 	public static String SourceLocationManager_problemProcessingBundleManifestSourceHeader;
 
 	public static String UpdateSiteBuilder_0;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEPreferencesManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEPreferencesManager.java
index 8fd2b92..7f2a2ff 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEPreferencesManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEPreferencesManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -147,7 +147,7 @@ public final class PDEPreferencesManager {
 	 * 
 	 * @param key key whose associated value is to be returned as an <code>int</code>.
 	 * @return the <code>int</code> value associated with <code>key</code>, or
-	 *         <code>null</code> if the associated value does not exist in either scope or cannot
+	 *         <code>0</code> if the associated value does not exist in either scope or cannot
 	 *         be interpreted as an <code>int</code>.
 	 * @see #setValue(String, int)
 	 * @see #setDefault(String, int)
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEState.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEState.java
index 2218f1d..dfdb544 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEState.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.core.bundle.*;
 import org.eclipse.pde.internal.core.plugin.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
+import org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 
 public class PDEState extends MinimalState {
@@ -87,10 +89,10 @@ public class PDEState extends MinimalState {
 	}
 
 	public PDEState(URL[] urls, boolean resolve, IProgressMonitor monitor) {
-		this(new URL[0], urls, resolve, monitor);
+		this(new URL[0], urls, resolve, false, monitor);
 	}
 
-	public PDEState(URL[] workspace, URL[] target, boolean resolve, IProgressMonitor monitor) {
+	public PDEState(URL[] workspace, URL[] target, boolean resolve, boolean removeTargetDuplicates, IProgressMonitor monitor) {
 		long start = System.currentTimeMillis();
 		fAuxiliaryState = new PDEAuxiliaryState();
 
@@ -99,6 +101,11 @@ public class PDEState extends MinimalState {
 		} else {
 			createNewTargetState(resolve, target, monitor);
 		}
+
+		if (removeTargetDuplicates) {
+			removeDuplicatesFromState(fState);
+		}
+
 		createTargetModels(fState.getBundles());
 
 		if (resolve && workspace.length > 0 && !fNewState && !"true".equals(System.getProperty("pde.nocache"))) //$NON-NLS-1$ //$NON-NLS-2$
@@ -161,7 +168,30 @@ public class PDEState extends MinimalState {
 		fAuxiliaryState.addAuxiliaryData(desc, manifest, hasBundleStructure);
 	}
 
-	public IPluginModelBase[] createTargetModels(BundleDescription[] bundleDescriptions) {
+	/**
+	 * When creating a target state, having duplicates of certain bundles including core runtime cause problems when launching.  The
+	 * {@link LoadTargetDefinitionJob} removes duplicates for us, but on restart the state is created from preferences.  This method
+	 * search the state for bundles with the same ID/Version.  Where multiple bundles are found, all but one are removed from the state.
+	 * 
+	 * @param state state to search for duplicates in
+	 */
+	private void removeDuplicatesFromState(State state) {
+		BundleDescription[] bundles = state.getBundles();
+		for (int i = 0; i < bundles.length; i++) {
+			BundleDescription desc = bundles[i];
+			String id = desc.getSymbolicName();
+			BundleDescription[] conflicts = state.getBundles(id);
+			if (conflicts.length > 1) {
+				for (int j = 0; j < conflicts.length; j++) {
+					if (desc.getVersion().equals(conflicts[j].getVersion()) && desc.getBundleId() != conflicts[j].getBundleId()) {
+						fState.removeBundle(desc);
+					}
+				}
+			}
+		}
+	}
+
+	private IPluginModelBase[] createTargetModels(BundleDescription[] bundleDescriptions) {
 		HashMap models = new HashMap((4 / 3) * bundleDescriptions.length + 1);
 		for (int i = 0; i < bundleDescriptions.length; i++) {
 			BundleDescription desc = bundleDescriptions[i];
@@ -261,21 +291,23 @@ public class PDEState extends MinimalState {
 		IProject project = PDECore.getWorkspace().getRoot().getProject(projectName);
 		if (!project.exists())
 			return null;
-		if (project.exists(ICoreConstants.MANIFEST_PATH)) {
+		IFile manifest = PDEProject.getManifest(project);
+		IFile pluginXml = PDEProject.getPluginXml(project);
+		IFile fragmentXml = PDEProject.getFragmentXml(project);
+		if (manifest.exists()) {
 			BundlePluginModelBase model = null;
 			if (desc.getHost() == null)
 				model = new BundlePluginModel();
 			else
 				model = new BundleFragmentModel();
 			model.setEnabled(true);
-			WorkspaceBundleModel bundle = new WorkspaceBundleModel(project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR));
+			WorkspaceBundleModel bundle = new WorkspaceBundleModel(manifest);
 			bundle.load(desc, this);
 			model.setBundleDescription(desc);
 			model.setBundleModel(bundle);
 			bundle.setEditable(false);
 
-			String filename = (desc.getHost() == null) ? ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR : ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR;
-			IFile file = project.getFile(filename);
+			IFile file = (desc.getHost() == null) ? pluginXml : fragmentXml;
 			if (file.exists()) {
 				WorkspaceExtensionsModel extensions = new WorkspaceExtensionsModel(file);
 				extensions.setEditable(false);
@@ -288,9 +320,9 @@ public class PDEState extends MinimalState {
 
 		WorkspacePluginModelBase model = null;
 		if (desc.getHost() == null)
-			model = new WorkspacePluginModel(project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR), true);
+			model = new WorkspacePluginModel(pluginXml, true);
 		else
-			model = new WorkspaceFragmentModel(project.getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR), true);
+			model = new WorkspaceFragmentModel(fragmentXml, true);
 		model.load(desc, this);
 		model.setBundleDescription(desc);
 		return model;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
index e5976e1..3dd9c22 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,24 +11,89 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
-import org.eclipse.pde.internal.core.target.*;
-
 import java.util.*;
+import java.util.Map.Entry;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jdt.core.*;
 import org.eclipse.osgi.service.resolver.*;
 import org.eclipse.pde.core.*;
 import org.eclipse.pde.core.build.IBuild;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.target.*;
 import org.eclipse.pde.internal.core.target.provisional.*;
 
 public class PluginModelManager implements IModelProviderListener {
 
 	/**
+	 * Job to update class path containers asynchronously. Avoids blocking the UI thread
+	 * while saving the manifest editor.
+	 */
+	class UpdateClasspathsJob extends Job {
+
+		private List fProjects = new ArrayList();
+		private List fContainers = new ArrayList();
+
+		/**
+		 * Constructs a new job.
+		 */
+		public UpdateClasspathsJob() {
+			super(PDECoreMessages.PluginModelManager_1);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+		 */
+		protected IStatus run(IProgressMonitor monitor) {
+			try {
+				boolean more = false;
+				do {
+					IJavaProject[] projects = null;
+					IClasspathContainer[] containers = null;
+					synchronized (fProjects) {
+						projects = (IJavaProject[]) fProjects.toArray(new IJavaProject[fProjects.size()]);
+						containers = (IClasspathContainer[]) fContainers.toArray(new IClasspathContainer[fContainers.size()]);
+						fProjects.clear();
+						fContainers.clear();
+					}
+					JavaCore.setClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, projects, containers, monitor);
+					synchronized (fProjects) {
+						more = !fProjects.isEmpty();
+					}
+				} while (more);
+
+			} catch (JavaModelException e) {
+				return e.getStatus();
+			}
+			return Status.OK_STATUS;
+		}
+
+		/**
+		 * Queues more projects/containers.
+		 * 
+		 * @param projects
+		 * @param containers
+		 */
+		void add(IJavaProject[] projects, IClasspathContainer[] containers) {
+			synchronized (fProjects) {
+				for (int i = 0; i < containers.length; i++) {
+					fProjects.add(projects[i]);
+					fContainers.add(containers[i]);
+				}
+			}
+		}
+
+	}
+
+	/**
+	 * Job used to update class path containers.
+	 */
+	private UpdateClasspathsJob fUpdateJob = new UpdateClasspathsJob();
+
+	/**
 	 * Subclass of ModelEntry
 	 * It adds methods that add/remove model from the entry.
 	 * These methods must not be on ModelEntry itself because
@@ -124,6 +189,7 @@ public class PluginModelManager implements IModelProviderListener {
 			}
 		}
 
+		Set addedBSNs = new HashSet();
 		// Adds to the master table and the state newly created plug-ins in the workspace
 		// (ie. new plug-in project or a closed project that has just been re-opened).
 		// Also, if the target location changes, we add all plug-ins from the new target
@@ -132,8 +198,10 @@ public class PluginModelManager implements IModelProviderListener {
 			for (int i = 0; i < added.length; i++) {
 				IPluginModelBase model = (IPluginModelBase) added[i];
 				String id = model.getPluginBase().getId();
-				if (id != null)
+				if (id != null) {
 					handleAdd(id, model, delta);
+					addedBSNs.add(id);
+				}
 			}
 		}
 
@@ -161,10 +229,24 @@ public class PluginModelManager implements IModelProviderListener {
 		if (fState != null) {
 			// if the target location has not changed, incrementally re-resolve the state after processing all the add/remove/modify changes
 			// Otherwise, the state is in a good resolved state
-			StateDelta stateDelta = (e.getEventTypes() & IModelProviderEvent.TARGET_CHANGED) != 0 ? null : fState.resolveState((e.getEventTypes() & IModelProviderEvent.ENVIRONMENT_CHANGED) != 0 ? false : true);
+			StateDelta stateDelta = null;
+			if ((e.getEventTypes() & IModelProviderEvent.TARGET_CHANGED) == 0) {
+				if ((e.getEventTypes() & IModelProviderEvent.ENVIRONMENT_CHANGED) != 0) {
+					// environment has changed, do complete resolution
+					stateDelta = fState.resolveState(false);
+				} else {
+					if (addedBSNs.isEmpty()) {
+						// resolve incrementally
+						stateDelta = fState.resolveState(true);
+					} else {
+						// resolve based on added bundles, in case there are multiple versions of the added bundles
+						stateDelta = fState.resolveState((String[]) addedBSNs.toArray(new String[addedBSNs.size()]));
+					}
+				}
+			}
 			// trigger a classpath update for all workspace plug-ins affected by the
 			// processed batch of changes
-			updateAffectedEntries(stateDelta);
+			updateAffectedEntries(stateDelta, e);
 			fireStateDelta(stateDelta);
 
 		}
@@ -179,8 +261,9 @@ public class PluginModelManager implements IModelProviderListener {
 	 * 
 	 * @param delta  a state delta containing a list of bundles affected by the processed
 	 * 				changes
+	 * @param event event that triggered this update
 	 */
-	private void updateAffectedEntries(StateDelta delta) {
+	private void updateAffectedEntries(StateDelta delta, IModelProviderEvent event) {
 		Map map = new HashMap();
 		if (delta == null) {
 			// if the delta is null, then the entire target changed.
@@ -235,12 +318,29 @@ public class PluginModelManager implements IModelProviderListener {
 		}
 
 		if (map.size() > 0) {
-			try {
-				// update classpath for all affected workspace plug-ins in one operation
-				IJavaProject[] jProjects = (IJavaProject[]) map.keySet().toArray(new IJavaProject[map.size()]);
-				IClasspathContainer[] containers = (IClasspathContainer[]) map.values().toArray(new IClasspathContainer[map.size()]);
-				JavaCore.setClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, jProjects, containers, null);
-			} catch (JavaModelException e) {
+			// update class path for all affected workspace plug-ins in one operation
+			Iterator iterator = map.entrySet().iterator();
+			IJavaProject[] projects = new IJavaProject[map.size()];
+			IClasspathContainer[] containers = new IClasspathContainer[projects.length];
+			int index = 0;
+			while (iterator.hasNext()) {
+				Entry entry = (Entry) iterator.next();
+				projects[index] = (IJavaProject) entry.getKey();
+				containers[index] = (IClasspathContainer) entry.getValue();
+				index++;
+			}
+			int types = event.getEventTypes();
+			if (types == IModelProviderEvent.MODELS_CHANGED) {
+				// when a model (manifest) is changed schedule a job to avoid blocking
+				// the UI thread (@see bug 276135)
+				fUpdateJob.add(projects, containers);
+				fUpdateJob.schedule();
+			} else {
+				// else update synchronously
+				try {
+					JavaCore.setClasspathContainer(PDECore.REQUIRED_PLUGINS_CONTAINER_PATH, projects, containers, null);
+				} catch (JavaModelException e) {
+				}
 			}
 		}
 	}
@@ -378,7 +478,7 @@ public class PluginModelManager implements IModelProviderListener {
 		// Create a state that contains all bundles from the target and workspace
 		// If a workspace bundle has the same symbolic name as a target bundle,
 		// the target counterpart is subsequently removed from the state.
-		fState = new PDEState(fWorkspaceManager.getPluginPaths(), fExternalManager.getPluginPaths(), true, new NullProgressMonitor());
+		fState = new PDEState(fWorkspaceManager.getPluginPaths(), fExternalManager.getPluginPaths(), true, true, new NullProgressMonitor());
 
 		// initialize the enabled/disabled state of target models
 		// based on whether the bundle is checked/unchecked on the Target Platform
@@ -426,6 +526,23 @@ public class PluginModelManager implements IModelProviderListener {
 
 		// Create default target platform definition if required
 		initDefaultTargetPlatformDefinition();
+
+		// re-load the target if the corrupt POOLED_BUNDLES preference was being used
+		PDEPreferencesManager pref = PDECore.getDefault().getPreferencesManager();
+		String pooled = pref.getString(ICoreConstants.POOLED_BUNDLES);
+		if (pooled != null && pooled.trim().length() > 0) {
+			if (!ICoreConstants.VALUE_SAVED_NONE.equals(pooled.trim())) {
+				ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+				if (service != null) {
+					try {
+						ITargetHandle handle = service.getWorkspaceTargetHandle();
+						LoadTargetDefinitionJob.load(handle.getTargetDefinition());
+					} catch (CoreException e) {
+						PDECore.log(e);
+					}
+				}
+			}
+		}
 	}
 
 	/**
@@ -959,4 +1076,20 @@ public class PluginModelManager implements IModelProviderListener {
 		fWorkspaceManager.removeExtensionDeltaListener(listener);
 	}
 
+	/**
+	 * Called when the bundle root for a project is changed.
+	 * 
+	 * @param project
+	 */
+	public void bundleRootChanged(IProject project) {
+		fWorkspaceManager.initialize();
+		fWorkspaceManager.removeModel(project);
+		if (fWorkspaceManager.isInterestingProject(project)) {
+			fWorkspaceManager.createModel(project, false);
+			Object model = fWorkspaceManager.getModel(project);
+			fWorkspaceManager.addChange(model, IModelProviderEvent.MODELS_CHANGED);
+		}
+		fWorkspaceManager.processModelChanges();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PreferenceInitializer.java
index bb66add..24f652c 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		IEclipsePreferences preferences = new InstanceScope().getNode(PDECore.PLUGIN_ID);
 		defaultPreferences.put(ICoreConstants.TARGET_MODE, ICoreConstants.VALUE_USE_THIS);
 		defaultPreferences.put(ICoreConstants.CHECKED_PLUGINS, ICoreConstants.VALUE_SAVED_ALL);
+		defaultPreferences.put(ICoreConstants.CHECKED_VERSION_PLUGINS, ICoreConstants.VALUE_SAVED_NONE);
 		if (preferences.get(ICoreConstants.TARGET_MODE, defaultPreferences.get(ICoreConstants.TARGET_MODE, "")).equals(ICoreConstants.VALUE_USE_THIS)) { //$NON-NLS-1$
 			preferences.put(ICoreConstants.PLATFORM_PATH, TargetPlatform.getDefaultLocation());
 		} else {
@@ -61,7 +62,17 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		prefs.putInt(CompilerFlags.P_UNKNOWN_RESOURCE, CompilerFlags.WARNING);
 		prefs.putInt(CompilerFlags.P_UNKNOWN_IDENTIFIER, CompilerFlags.WARNING);
 		prefs.putInt(CompilerFlags.P_NOT_EXTERNALIZED, CompilerFlags.IGNORE);
+
 		prefs.putInt(CompilerFlags.P_BUILD, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_MISSING_OUTPUT, CompilerFlags.IGNORE);
+		prefs.putInt(CompilerFlags.P_BUILD_SOURCE_LIBRARY, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_OUTPUT_LIBRARY, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_SRC_INCLUDES, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_BIN_INCLUDES, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPLIANCE, CompilerFlags.WARNING);
+		prefs.putInt(CompilerFlags.P_BUILD_JAVA_COMPILER, CompilerFlags.IGNORE);
+		prefs.putInt(CompilerFlags.P_BUILD_ENCODINGS, CompilerFlags.IGNORE);
+
 		prefs.putInt(CompilerFlags.P_INCOMPATIBLE_ENV, CompilerFlags.WARNING);
 		prefs.putInt(CompilerFlags.P_MISSING_EXPORT_PKGS, CompilerFlags.IGNORE);
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
index 1b0ad02..f269c3f 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/RequiredPluginsClasspathContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -177,12 +177,13 @@ public class RequiredPluginsClasspathContainer extends PDEClasspathContainer imp
 			if (exporter == null)
 				continue;
 			ArrayList list = (ArrayList) visiblePackages.get(exporter);
-			if (list == null)
+			if (list == null) {
 				list = new ArrayList();
+				visiblePackages.put(exporter, list);
+			}
 			Rule rule = getRule(helper, desc, exports[i]);
 			if (!list.contains(rule))
 				list.add(rule);
-			visiblePackages.put(exporter, list);
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/SearchablePluginsManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/SearchablePluginsManager.java
index 3b1c344..946a063 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/SearchablePluginsManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/SearchablePluginsManager.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
@@ -60,7 +60,11 @@ public class SearchablePluginsManager implements IFileAdapterFactory, IPluginMod
 					if (delta.getKind() == IJavaElementDelta.REMOVED) {
 						fPluginIdSet.clear();
 					} else if (delta.getKind() == IJavaElementDelta.ADDED) {
-						initializeStates();
+						// We may be getting a queued delta from when the manager was initialized, ignore unless we don't already have data
+						if (fPluginIdSet == null || fPluginIdSet.size() == 0) {
+							// Something other than the manager created the project, check if it has a .searchable file to load from
+							initializeStates();
+						}
 					}
 				}
 				return true;
@@ -263,6 +267,22 @@ public class SearchablePluginsManager implements IFileAdapterFactory, IPluginMod
 		}
 	}
 
+	public void removeAllFromJavaSearch() {
+		if (fPluginIdSet.size() > 0) {
+			PluginModelDelta delta = new PluginModelDelta();
+			for (Iterator iterator = fPluginIdSet.iterator(); iterator.hasNext();) {
+				String id = (String) iterator.next();
+				ModelEntry entry = PluginRegistry.findEntry(id);
+				if (entry != null) {
+					delta.addEntry(entry, PluginModelDelta.CHANGED);
+				}
+			}
+			fPluginIdSet.clear();
+			resetContainer();
+			fireDelta(delta);
+		}
+	}
+
 	public boolean isInJavaSearch(String symbolicName) {
 		return fPluginIdSet.contains(symbolicName);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPlatformHelper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPlatformHelper.java
index 87f03cc..480e646 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPlatformHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPlatformHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -309,7 +309,7 @@ public class TargetPlatformHelper {
 	public static String getTargetVersionString() {
 		IPluginModelBase model = PluginRegistry.findModel(IPDEBuildConstants.BUNDLE_OSGI);
 		if (model == null)
-			return ICoreConstants.TARGET35;
+			return ICoreConstants.TARGET36;
 
 		String version = model.getPluginBase().getVersion();
 		if (VersionUtil.validateVersion(version).getSeverity() == IStatus.OK) {
@@ -326,8 +326,10 @@ public class TargetPlatformHelper {
 				return ICoreConstants.TARGET33;
 			if (major == 3 && minor == 4)
 				return ICoreConstants.TARGET34;
+			if (major == 3 && minor == 5)
+				return ICoreConstants.TARGET35;
 		}
-		return ICoreConstants.TARGET35;
+		return ICoreConstants.TARGET36;
 	}
 
 	public static double getHostVersion() {
@@ -335,7 +337,7 @@ public class TargetPlatformHelper {
 		Bundle bundle = context.getBundle(0);
 		String version = (String) bundle.getHeaders().get(Constants.BUNDLE_VERSION);
 		if (version == null)
-			return Double.parseDouble(ICoreConstants.TARGET35);
+			return Double.parseDouble(ICoreConstants.TARGET36);
 
 		if (VersionUtil.validateVersion(version).getSeverity() == IStatus.OK) {
 			Version vid = new Version(version);
@@ -351,8 +353,10 @@ public class TargetPlatformHelper {
 				return Double.parseDouble(ICoreConstants.TARGET33);
 			if (major == 3 && minor == 4)
 				return Double.parseDouble(ICoreConstants.TARGET34);
+			if (major == 3 && minor == 5)
+				return Double.parseDouble(ICoreConstants.TARGET35);
 		}
-		return Double.parseDouble(ICoreConstants.TARGET35);
+		return Double.parseDouble(ICoreConstants.TARGET36);
 	}
 
 	public static double getTargetVersion() {
@@ -386,6 +390,30 @@ public class TargetPlatformHelper {
 	}
 
 	/**
+	 * Reverse engineer the target version based on a schema version.
+	 * If <code>null</code> is* passed as the version, the current target platform's
+	 * version is used (result of getTargetVersion()).
+	 * @param schemaVersion the schema version being targeted or <code>null</code>
+	 * @return a compatible target version
+	 */
+	public static String getTargetVersionForSchemaVersion(String schemaVersion) {
+		if (schemaVersion == null) {
+			return getTargetVersionString();
+		}
+		// In 3.4 the schemas changed the spelling of appInfo to appinfo to be w3c compliant, see bug 213255.
+		if (schemaVersion.equals(ICoreConstants.TARGET30)) {
+			// 3.0 schema version was good up to 3.1
+			return ICoreConstants.TARGET31;
+		}
+		if (schemaVersion.equals(ICoreConstants.TARGET32)) {
+			// 3.2 schema version was good for 3.2 and 3.3
+			return ICoreConstants.TARGET33;
+		}
+		// otherwise, compatible with latest version
+		return getTargetVersionString();
+	}
+
+	/**
 	 * Gets the schema version to use for the current target platform
 	 * @return String schema version for the current target platform
 	 */
@@ -454,7 +482,7 @@ public class TargetPlatformHelper {
 		for (int i = 0; i < models.length; i++) {
 			String location = models[i].getInstallLocation();
 			if (location != null)
-				list.add(location + IPath.SEPARATOR + "feature.xml"); //$NON-NLS-1$
+				list.add(location + IPath.SEPARATOR + ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 		}
 		return (String[]) list.toArray(new String[list.size()]);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPreferenceModifyListener.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPreferenceModifyListener.java
index 99e20b1..5212dff 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPreferenceModifyListener.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TargetPreferenceModifyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,10 +32,12 @@ public class TargetPreferenceModifyListener extends PreferenceModifyListener {
 				node.remove(ICoreConstants.ADDITIONAL_LOCATIONS);
 				node.remove(ICoreConstants.ARCH);
 				node.remove(ICoreConstants.CHECKED_PLUGINS);
+				node.remove(ICoreConstants.CHECKED_VERSION_PLUGINS);
 				node.remove(ICoreConstants.IMPLICIT_DEPENDENCIES);
 				node.remove(ICoreConstants.NL);
 				node.remove(ICoreConstants.PLATFORM_PATH);
 				node.remove(ICoreConstants.POOLED_BUNDLES);
+				node.remove(ICoreConstants.POOLED_URLS);
 				node.remove(ICoreConstants.PROGRAM_ARGS);
 				node.remove(ICoreConstants.OS);
 				for (int i = 0; i < 4; i++) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
index 3184175..1e92f39 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/TracingOptionsManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -97,10 +97,10 @@ public class TracingOptionsManager {
 		ZipFile jarFile = null;
 		try {
 			if (pluginLocation.isDirectory())
-				return new File(pluginLocation, ".options").exists(); //$NON-NLS-1$
+				return new File(pluginLocation, ICoreConstants.OPTIONS_FILENAME).exists();
 
 			jarFile = new ZipFile(pluginLocation, ZipFile.OPEN_READ);
-			ZipEntry manifestEntry = jarFile.getEntry(".options"); //$NON-NLS-1$
+			ZipEntry manifestEntry = jarFile.getEntry(ICoreConstants.OPTIONS_FILENAME);
 			if (manifestEntry != null) {
 				stream = jarFile.getInputStream(manifestEntry);
 			}
@@ -166,12 +166,12 @@ public class TracingOptionsManager {
 		ZipFile jarFile = null;
 		try {
 			if (pluginLocation.isDirectory()) {
-				File file = new File(pluginLocation, ".options"); //$NON-NLS-1$
+				File file = new File(pluginLocation, ICoreConstants.OPTIONS_FILENAME);
 				if (file.exists())
 					stream = new FileInputStream(file);
 			} else {
 				jarFile = new ZipFile(pluginLocation, ZipFile.OPEN_READ);
-				ZipEntry manifestEntry = jarFile.getEntry(".options"); //$NON-NLS-1$
+				ZipEntry manifestEntry = jarFile.getEntry(ICoreConstants.OPTIONS_FILENAME);
 				if (manifestEntry != null) {
 					stream = jarFile.getInputStream(manifestEntry);
 				}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceFeatureModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceFeatureModelManager.java
index 795faa9..6016b29 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceFeatureModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceFeatureModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,14 +11,11 @@
 package org.eclipse.pde.internal.core;
 
 import java.util.HashMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.*;
 import org.eclipse.pde.core.IModelProviderEvent;
 import org.eclipse.pde.internal.core.feature.WorkspaceFeatureModel;
 import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class WorkspaceFeatureModelManager extends WorkspaceModelManager {
 
@@ -27,8 +24,9 @@ public class WorkspaceFeatureModelManager extends WorkspaceModelManager {
 	}
 
 	protected void createModel(IProject project, boolean notify) {
-		if (project.exists(ICoreConstants.FEATURE_PATH)) {
-			WorkspaceFeatureModel model = new WorkspaceFeatureModel(project.getFile(ICoreConstants.FEATURE_PATH));
+		IFile featureXml = PDEProject.getFeatureXml(project);
+		if (featureXml.exists()) {
+			WorkspaceFeatureModel model = new WorkspaceFeatureModel(featureXml);
 			loadModel(model, false);
 			if (fModels == null)
 				fModels = new HashMap();
@@ -40,8 +38,9 @@ public class WorkspaceFeatureModelManager extends WorkspaceModelManager {
 
 	protected void handleFileDelta(IResourceDelta delta) {
 		IFile file = (IFile) delta.getResource();
-		if (file.getProjectRelativePath().equals(ICoreConstants.FEATURE_PATH)) {
-			IProject project = file.getProject();
+		IProject project = file.getProject();
+		IFile featureXml = PDEProject.getFeatureXml(project);
+		if (file.equals(featureXml)) {
 			Object model = getModel(project);
 			int kind = delta.getKind();
 			if (kind == IResourceDelta.REMOVED && model != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
index cfd46b8..1d2d94e 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspaceModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,39 +10,25 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core;
 
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.ListIterator;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
+import java.io.*;
+import java.util.*;
+import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IModelProviderEvent;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.team.core.RepositoryProvider;
 
 public abstract class WorkspaceModelManager extends AbstractModelManager implements IResourceChangeListener, IResourceDeltaVisitor {
 
 	public static boolean isPluginProject(IProject project) {
 		if (project.isOpen())
-			return project.exists(ICoreConstants.MANIFEST_PATH) || project.exists(ICoreConstants.PLUGIN_PATH) || project.exists(ICoreConstants.FRAGMENT_PATH);
+			return PDEProject.getManifest(project).exists() || PDEProject.getPluginXml(project).exists() || PDEProject.getFragmentXml(project).exists();
 		return false;
 	}
 
 	public static boolean isFeatureProject(IProject project) {
-		return project.isOpen() && project.exists(ICoreConstants.FEATURE_PATH);
+		return project.isOpen() && PDEProject.getFeatureXml(project).exists();
 	}
 
 	public static boolean isBinaryProject(IProject project) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java
index 93296ea..8a2110a 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/WorkspacePluginModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,8 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
 import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.pde.core.IModelProviderEvent;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
@@ -27,6 +28,7 @@ import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.ischema.ISchema;
 import org.eclipse.pde.internal.core.ischema.ISchemaDescriptor;
 import org.eclipse.pde.internal.core.plugin.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.schema.SchemaDescriptor;
 
 public class WorkspacePluginModelManager extends WorkspaceModelManager {
@@ -55,8 +57,11 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 	 */
 	protected void createModel(IProject project, boolean notify) {
 		IPluginModelBase model = null;
-		if (project.exists(ICoreConstants.MANIFEST_PATH)) {
-			WorkspaceBundleModel bmodel = new WorkspaceBundleModel(project.getFile(ICoreConstants.MANIFEST_PATH));
+		IFile manifest = PDEProject.getManifest(project);
+		IFile pluginXml = PDEProject.getPluginXml(project);
+		IFile fragmentXml = PDEProject.getFragmentXml(project);
+		if (manifest.exists()) {
+			WorkspaceBundleModel bmodel = new WorkspaceBundleModel(manifest);
 			loadModel(bmodel, false);
 			if (bmodel.isFragmentModel())
 				model = new BundleFragmentModel();
@@ -66,7 +71,7 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 			bmodel.setEditable(false);
 			((IBundlePluginModelBase) model).setBundleModel(bmodel);
 
-			IFile efile = project.getFile(bmodel.isFragmentModel() ? ICoreConstants.FRAGMENT_PATH : ICoreConstants.PLUGIN_PATH);
+			IFile efile = bmodel.isFragmentModel() ? fragmentXml : pluginXml;
 			if (efile.exists()) {
 				WorkspaceExtensionsModel extModel = new WorkspaceExtensionsModel(efile);
 				extModel.setEditable(false);
@@ -75,15 +80,15 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 				extModel.setBundleModel((IBundlePluginModelBase) model);
 			}
 
-		} else if (project.exists(ICoreConstants.PLUGIN_PATH)) {
-			model = new WorkspacePluginModel(project.getFile(ICoreConstants.PLUGIN_PATH), true);
+		} else if (pluginXml.exists()) {
+			model = new WorkspacePluginModel(pluginXml, true);
 			loadModel(model, false);
-		} else if (project.exists(ICoreConstants.FRAGMENT_PATH)) {
-			model = new WorkspaceFragmentModel(project.getFile(ICoreConstants.FRAGMENT_PATH), true);
+		} else if (fragmentXml.exists()) {
+			model = new WorkspaceFragmentModel(fragmentXml, true);
 			loadModel(model, false);
 		}
 
-		if (project.getFile(".options").exists()) //$NON-NLS-1$
+		if (PDEProject.getOptionsFile(project).exists())
 			PDECore.getDefault().getTracingOptionsManager().reset();
 
 		if (model != null) {
@@ -100,37 +105,31 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 	 */
 	protected void handleFileDelta(IResourceDelta delta) {
 		IFile file = (IFile) delta.getResource();
+		IProject project = file.getProject();
 		String filename = file.getName();
-		if (filename.equals(".options")) { //$NON-NLS-1$
+		if (file.equals(PDEProject.getOptionsFile(project))) {
 			PDECore.getDefault().getTracingOptionsManager().reset();
 		} else if (filename.endsWith(".properties")) { //$NON-NLS-1$
 			// change in build.properties should trigger a Classpath Update
 			// we therefore fire a notification
 			//TODO this is inefficient.  we could do better.
-			if (filename.equals("build.properties")) { //$NON-NLS-1$
+			if (file.equals(PDEProject.getBuildProperties(project))) {
 				Object model = getModel(file.getProject());
 				if (model != null)
 					addChange(model, IModelProviderEvent.MODELS_CHANGED);
 			} else {
 				// reset bundle resource if localization file has changed.
-				IPluginModelBase model = getPluginModel(file.getProject());
-				String localization = null;
-				if (model instanceof IBundlePluginModelBase) {
-					localization = ((IBundlePluginModelBase) model).getBundleLocalization();
-				} else if (model != null) {
-					localization = "plugin"; //$NON-NLS-1$
-				}
-				if (localization != null && file.getProjectRelativePath().toString().startsWith(localization)) {
+				if (file.equals(PDEProject.getLocalizationFile(file.getProject()))) {
+					IPluginModelBase model = getPluginModel(file.getProject());
 					((AbstractNLModel) model).resetNLResourceHelper();
 				}
 			}
 		} else if (filename.endsWith(".exsd")) { //$NON-NLS-1$
 			handleEclipseSchemaDelta(file, delta);
 		} else {
-			IPath path = file.getProjectRelativePath();
-			if (path.equals(ICoreConstants.PLUGIN_PATH) || path.equals(ICoreConstants.FRAGMENT_PATH)) {
+			if (file.equals(PDEProject.getPluginXml(project)) || file.equals(PDEProject.getFragmentXml(project))) {
 				handleExtensionFileDelta(file, delta);
-			} else if (path.equals(ICoreConstants.MANIFEST_PATH)) {
+			} else if (file.equals(PDEProject.getManifest(project))) {
 				handleBundleManifestDelta(file, delta);
 			}
 		}
@@ -313,7 +312,7 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 	 */
 	protected Object removeModel(IProject project) {
 		Object model = super.removeModel(project);
-		if (model != null && project.exists(new Path(".options"))) //$NON-NLS-1$
+		if (model != null && PDEProject.getOptionsFile(project).exists())
 			PDECore.getDefault().getTracingOptionsManager().reset();
 		if (model instanceof IPluginModelBase) {
 			// PluginModelManager will remove IPluginModelBase form ModelEntry before triggering IModelChangedEvent
@@ -384,8 +383,12 @@ public class WorkspacePluginModelManager extends WorkspaceModelManager {
 	 * 
 	 */
 	protected boolean isInterestingFolder(IFolder folder) {
+		IContainer root = PDEProject.getBundleRoot(folder.getProject());
+		if (folder.getProjectRelativePath().isPrefixOf(root.getProjectRelativePath())) {
+			return true;
+		}
 		String folderName = folder.getName();
-		if (("META-INF".equals(folderName) || "OSGI-INF".equals(folderName) || "schema".equals(folderName)) && folder.getParent() instanceof IProject) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		if (("META-INF".equals(folderName) || "OSGI-INF".equals(folderName) || "schema".equals(folderName)) && folder.getParent().equals(root)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			return true;
 		}
 		if ("OSGI-INF/l10n".equals(folder.getProjectRelativePath().toString())) { //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildEntry.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildEntry.java
index 5559f3e..3adae82 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildEntry.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/BuildEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,13 @@
 package org.eclipse.pde.internal.core.build;
 
 import java.io.PrintWriter;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import org.eclipse.core.runtime.CoreException;
+import java.util.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
 import org.eclipse.pde.core.IModelChangedEvent;
 import org.eclipse.pde.core.ModelChangedEvent;
 import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.PropertiesUtil;
 
 public class BuildEntry extends BuildObject implements IBuildEntry {
@@ -48,10 +49,12 @@ public class BuildEntry extends BuildObject implements IBuildEntry {
 	}
 
 	void processEntry(String value) {
+		IPath rootPath = getRootPath();
 		StringTokenizer stok = new StringTokenizer(value, ","); //$NON-NLS-1$
 		while (stok.hasMoreTokens()) {
 			String token = stok.nextToken();
 			token = token.trim();
+			token = fromRelative(token, rootPath);
 			tokens.add(token);
 		}
 	}
@@ -85,7 +88,18 @@ public class BuildEntry extends BuildObject implements IBuildEntry {
 	}
 
 	public void write(String indent, PrintWriter writer) {
-		PropertiesUtil.writeKeyValuePair(indent, name, tokens.elements(), writer);
+		Enumeration elements = tokens.elements();
+		IPath rootPath = getRootPath();
+		if (rootPath != null) {
+			// translation required for source. and output. entries
+			Vector vector = new Vector();
+			while (elements.hasMoreElements()) {
+				String e = (String) elements.nextElement();
+				vector.add(toRelative(e, rootPath));
+			}
+			elements = vector.elements();
+		}
+		PropertiesUtil.writeKeyValuePair(indent, name, elements, writer);
 	}
 
 	public void restoreProperty(String name, Object oldValue, Object newValue) throws CoreException {
@@ -93,4 +107,54 @@ public class BuildEntry extends BuildObject implements IBuildEntry {
 			setName(newValue != null ? newValue.toString() : null);
 		}
 	}
+
+	/**
+	 * Returns the path that this entries tokens are relative to, or <code>null</code> if none.
+	 * 
+	 * @return relative root path, or <code>null</code>
+	 */
+	IPath getRootPath() {
+		if (name.startsWith(IBuildEntry.JAR_PREFIX) || name.startsWith(IBuildEntry.OUTPUT_PREFIX)) {
+			IResource resource = getModel().getUnderlyingResource();
+			if (resource != null) {
+				IProject project = resource.getProject();
+				if (project != null) {
+					IContainer root = PDEProject.getBundleRoot(project);
+					if (root != null && !root.equals(project)) {
+						// translation required for source. and output. entries
+						return root.getProjectRelativePath();
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Makes the token a bundle root relative path
+	 * 
+	 * @param token token
+	 * @param root bundle root path or <code>null</code>
+	 * @return bundle relative token
+	 */
+	String toRelative(String token, IPath root) {
+		if (root == null) {
+			return token;
+		}
+		return (new Path(token)).makeRelativeTo(root).toPortableString();
+	}
+
+	/**
+	 * Makes the token a project relative path
+	 * 
+	 * @param token token
+	 * @param root bundle root path or <code>null</code>
+	 * @return project relative token
+	 */
+	String fromRelative(String token, IPath root) {
+		if (root == null) {
+			return token;
+		}
+		return root.append(new Path(token)).toPortableString();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/ExternalBuildModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/ExternalBuildModel.java
index 428fea8..716a613 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/ExternalBuildModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/build/ExternalBuildModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.pde.internal.core.build;
 import java.io.*;
 import java.net.URL;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
 
 public class ExternalBuildModel extends BuildModel {
@@ -41,7 +42,7 @@ public class ExternalBuildModel extends BuildModel {
 			if (file.isFile() && file.getName().endsWith(".jar")) { //$NON-NLS-1$
 				url = new URL("jar:file:" + file.getAbsolutePath() + "!/build.properties"); //$NON-NLS-1$ //$NON-NLS-2$
 			} else {
-				url = new URL("file:" + file.getAbsolutePath() + IPath.SEPARATOR + "build.properties"); //$NON-NLS-1$ //$NON-NLS-2$
+				url = new URL("file:" + file.getAbsolutePath() + IPath.SEPARATOR + ICoreConstants.BUILD_FILENAME_DESCRIPTOR); //$NON-NLS-1$
 			}
 			stream = url.openStream();
 			load(stream, false);
@@ -65,7 +66,7 @@ public class ExternalBuildModel extends BuildModel {
 
 	private File getLocalFile() {
 		File file = new File(getInstallLocation());
-		return (file.isFile()) ? file : new File(file, "build.properties"); //$NON-NLS-1$
+		return (file.isFile()) ? file : new File(file, ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
 	}
 
 	public boolean isInSync() {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
index a591a95..0e31467 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.build.BuildEntry;
 import org.eclipse.pde.internal.core.text.build.BuildModel;
 import org.eclipse.pde.internal.core.util.CoreUtility;
@@ -41,6 +42,19 @@ import org.osgi.framework.Constants;
 public class BuildErrorReporter extends ErrorReporter implements IBuildPropertiesConstants {
 
 	private static final String DEF_SOURCE_ENTRY = PROPERTY_SOURCE_PREFIX + '.';
+	private static final String[] RESERVED_NAMES = new String[] {"meta-inf", "osgi-inf", ICoreConstants.BUILD_FILENAME_DESCRIPTOR, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR, "plugin.properties"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+	private static final String ASSERT_IDENTIFIER = "assertIdentifier"; //$NON-NLS-1$
+	private static final String ENUM_IDENTIFIER = "enumIdentifier"; //$NON-NLS-1$
+
+	//Execution Environments
+	private static final String JRE_1_1 = "JRE-1.1"; //$NON-NLS-1$
+	private static final String J2SE_1_2 = "J2SE-1.2"; //$NON-NLS-1$
+	private static final String J2SE_1_3 = "J2SE-1.3"; //$NON-NLS-1$
+	private static final String J2SE_1_4 = "J2SE-1.4"; //$NON-NLS-1$
+	private static final String J2SE_1_5 = "J2SE-1.5"; //$NON-NLS-1$
+	private static final String JavaSE_1_6 = "JavaSE-1.6"; //$NON-NLS-1$
+	private static final String JavaSE_1_7 = "JavaSE-1.7"; //$NON-NLS-1$
 
 	private class BuildProblem {
 		String fEntryToken;
@@ -88,19 +102,35 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 
 	}
 
-	private ArrayList fProblemList = new ArrayList();
-	private int fBuildSeverity;
-	private int fClasspathSeverity;
+	protected ArrayList fProblemList = new ArrayList();
+	protected int fBuildSeverity;
+	protected int fClasspathSeverity;
+	protected int fJavaComplianceSeverity;
+	protected int fJavaCompilerSeverity;
+	protected int fSrcInclSeverity;
+	protected int fBinInclSeverity;
+	protected int fMissingOutputLibSeverity;
+	protected int fSrcLibSeverity;
+	protected int fOututLibSeverity;
+	protected int fEncodingSeverity;
 
 	public BuildErrorReporter(IFile buildFile) {
 		super(buildFile);
+		fBuildSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD);
+		fClasspathSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_UNRESOLVED_IMPORTS);
+		fMissingOutputLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_MISSING_OUTPUT);
+		fSrcLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SOURCE_LIBRARY);
+		fOututLibSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
+		fJavaComplianceSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
+		fJavaCompilerSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_JAVA_COMPILER);
+		fSrcInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_SRC_INCLUDES);
+		fBinInclSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_BIN_INCLUDES);
+		fEncodingSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD_ENCODINGS);
 	}
 
 	public void validate(IProgressMonitor monitor) {
-		fBuildSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_BUILD);
-		fClasspathSeverity = CompilerFlags.getFlag(fFile.getProject(), CompilerFlags.P_UNRESOLVED_IMPORTS);
-		if (fBuildSeverity == CompilerFlags.IGNORE && fClasspathSeverity == CompilerFlags.IGNORE)
-			return;
+		/*if (fBuildSeverity == CompilerFlags.IGNORE && fClasspathSeverity == CompilerFlags.IGNORE)
+			return;*/
 		WorkspaceBuildModel wbm = new WorkspaceBuildModel(fFile);
 		wbm.load();
 		if (!wbm.isLoaded())
@@ -121,8 +151,15 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		IBuildEntry srcExcludes = null;
 		IBuildEntry jarsExtra = null;
 		IBuildEntry bundleList = null;
-		ArrayList sourceEntries = new ArrayList();
-		ArrayList sourceEntryKeys = new ArrayList();
+		IBuildEntry javacSource = null;
+		IBuildEntry javacTarget = null;
+		IBuildEntry jreCompilationProfile = null;
+		IBuildEntry javaProjectWarnings = null;
+		ArrayList javacWarnings = new ArrayList();
+		ArrayList javacErrors = new ArrayList();
+		ArrayList sourceEntries = new ArrayList(1);
+		ArrayList sourceEntryKeys = new ArrayList(1);
+		ArrayList outputEntries = new ArrayList(1);
 		Map encodingEntries = new HashMap();
 		IBuildEntry[] entries = build.getBuildEntries();
 		for (int i = 0; i < entries.length; i++) {
@@ -137,8 +174,22 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 				srcIncludes = entries[i];
 			else if (name.equals(PROPERTY_SRC_EXCLUDES))
 				srcExcludes = entries[i];
+			else if (name.equals(PROPERTY_JAVAC_SOURCE))
+				javacSource = entries[i];
+			else if (name.equals(PROPERTY_JAVAC_TARGET))
+				javacTarget = entries[i];
+			else if (name.equals(PROPERTY_PROJECT_SETTINGS))
+				javaProjectWarnings = entries[i];
+			else if (name.equals(PROPERTY_JRE_COMPILATION_PROFILE))
+				jreCompilationProfile = entries[i];
+			else if (name.startsWith(PROPERTY_JAVAC_WARNINGS_PREFIX))
+				javacWarnings.add(entries[i]);
+			else if (name.startsWith(PROPERTY_JAVAC_ERRORS_PREFIX))
+				javacErrors.add(entries[i]);
 			else if (name.startsWith(PROPERTY_SOURCE_PREFIX))
 				sourceEntries.add(entries[i]);
+			else if (name.startsWith(PROPERTY_OUTPUT_PREFIX))
+				outputEntries.add(entries[i]);
 			else if (name.startsWith(PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX))
 				encodingEntries.put(entries[i].getName(), entries[i].getTokens()[0]);
 			else if (name.equals(PROPERTY_JAR_EXTRA_CLASSPATH))
@@ -163,63 +214,338 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 				validateDependencyManagement(bundleList);
 		}
 
-		// rest of validation relies on build flag
-		if (fBuildSeverity == CompilerFlags.IGNORE)
-			return;
-
 		if (jarsExtra != null)
 			validateJarsExtraClasspath(jarsExtra);
-		validateIncludes(binIncludes, sourceEntryKeys);
-		validateIncludes(binExcludes, sourceEntryKeys);
-		validateIncludes(srcIncludes, sourceEntryKeys);
-		validateIncludes(srcExcludes, sourceEntryKeys);
+		validateIncludes(binIncludes, sourceEntryKeys, fBinInclSeverity);
+		validateIncludes(binExcludes, sourceEntryKeys, fBinInclSeverity);
+		validateIncludes(srcIncludes, sourceEntryKeys, fSrcInclSeverity);
+		validateIncludes(srcExcludes, sourceEntryKeys, fSrcInclSeverity);
+		validateSourceFoldersInSrcIncludes(srcIncludes);
 
 		try {
-			if (fProject.hasNature(JavaCore.NATURE_ID)) {
-				IJavaProject jp = JavaCore.create(fProject);
+			IJavaProject jp = JavaCore.create(fProject);
+			if (jp.exists()) {
 				IClasspathEntry[] cpes = jp.getRawClasspath();
 				validateMissingLibraries(sourceEntryKeys, cpes);
 				validateSourceEntries(sourceEntries, cpes);
+				SourceEntryErrorReporter srcEntryErrReporter = new SourceEntryErrorReporter(fFile, build);
+				srcEntryErrReporter.initialize(sourceEntries, outputEntries, cpes, fProject);
+				srcEntryErrReporter.validate();
+				ArrayList problems = srcEntryErrReporter.getProblemList();
+				for (int i = 0; i < problems.size(); i++) {
+					if (!fProblemList.contains(problems.get(i))) {
+						fProblemList.add(problems.get(i));
+					}
+				}
+
 			}
 		} catch (JavaModelException e) {
-		} catch (CoreException e) {
 		}
 
-		validateSourceEntries(sourceEntries);
 		validateMissingSourceInBinIncludes(binIncludes, sourceEntryKeys, build);
 		validateBinIncludes(binIncludes);
-		//validateDefaultEncoding(sourceEntries, encodingEntries);
+		validateExecutionEnvironment(javacSource, javacTarget, jreCompilationProfile, javacWarnings, javacErrors, getSourceLibraries(sourceEntries));
+		validateJavaCompilerSettings(javaProjectWarnings);
+	}
+
+	/**
+	 * Given a list of source library entries, returns the list of library names.
+	 * 
+	 * @param sourceEntries list of IBuildEntry source entries
+	 * @return list of library names
+	 */
+	private List getSourceLibraries(List sourceEntries) {
+		List libraries = new ArrayList();
+		for (Iterator iterator = sourceEntries.iterator(); iterator.hasNext();) {
+			IBuildEntry sourceEntry = (IBuildEntry) iterator.next();
+			String libName = sourceEntry.getName().substring(PROPERTY_SOURCE_PREFIX.length());
+			libraries.add(libName);
+		}
+		return libraries;
+	}
+
+	/**
+	 * Matches the javacSource, javacTarget, javacWarnings, javacErrors and jre.compilation.prile entries in build.properties with the 
+	 * project specific Java Compiler properties and reports the errors found.
+	 * 
+	 * @param javacSourceEntry
+	 * @param javacTargetEntry
+	 * @param jreCompilationProfileEntry
+	 * @param javacWarningsEntries
+	 * @param javacErrorsEntries 
+	 * @param libraryNames list of library names (javacWarnings/javacErrors require an entry for each source library)
+	 */
+	private void validateExecutionEnvironment(IBuildEntry javacSourceEntry, IBuildEntry javacTargetEntry, IBuildEntry jreCompilationProfileEntry, ArrayList javacWarningsEntries, ArrayList javacErrorsEntries, List libraryNames) {
+		// if there is no source to compile, don't worry about compiler settings
+		IJavaProject project = JavaCore.create(fProject);
+		if (project.exists()) {
+			IClasspathEntry[] classpath = null;
+			try {
+				classpath = project.getRawClasspath();
+			} catch (JavaModelException e) {
+				PDECore.log(e);
+				return;
+			}
+			boolean source = false;
+			for (int i = 0; i < classpath.length; i++) {
+				IClasspathEntry cpe = classpath[i];
+				if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+					source = true;
+				}
+			}
+			if (!source) {
+				return;
+			}
+
+			String projectComplianceLevel = project.getOption(JavaCore.COMPILER_COMPLIANCE, false);
+
+			if (projectComplianceLevel != null) {
+
+				IPluginModelBase model = PluginRegistry.findModel(fProject);
+				String[] execEnvs = null;
+				if (model != null) {
+					BundleDescription bundleDesc = model.getBundleDescription();
+					if (bundleDesc != null) {
+						execEnvs = bundleDesc.getExecutionEnvironments();
+					}
+				}
+
+				if (execEnvs == null || execEnvs.length == 0) {
+					return;
+				}
+
+				//PDE Build uses top most entry to build the plug-in
+				String execEnv = execEnvs[0];
+
+				String projectSourceCompatibility = project.getOption(JavaCore.COMPILER_SOURCE, false);
+				String projectClassCompatibility = project.getOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, false);
+				if (projectComplianceLevel.equals(findMatchingEE(projectSourceCompatibility, projectClassCompatibility, false)) && execEnv.equals(findMatchingEE(projectSourceCompatibility, projectClassCompatibility, true))) {
+					return; //The project compliance settings matches the BREE
+				}
+
+				Map defaultComplianceOptions = new HashMap();
+				JavaCore.setComplianceOptions(projectComplianceLevel, defaultComplianceOptions);
+
+				//project compliance does not match the BREE
+				String projectJavaCompatibility = findMatchingEE(projectSourceCompatibility, projectClassCompatibility, true);
+				String message = null;
+				if (projectJavaCompatibility != null) {
+					if (jreCompilationProfileEntry == null) {
+						message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
+						prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+					} else {
+						if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) {
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel);
+							prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						}
+					}
+				} else {
+					// Check source level setting
+					if (projectSourceCompatibility.equals(defaultComplianceOptions.get(JavaCore.COMPILER_SOURCE))) {
+						if (javacSourceEntry != null) {
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_BuildEntryNotRequiredMatchesDefault, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
+							prepareError(PROPERTY_JAVAC_SOURCE, null, message, PDEMarkerFactory.B_REMOVAL, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						}
+					} else {
+						if (javacSourceEntry == null) {
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
+							prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						} else {
+							if (!projectSourceCompatibility.equalsIgnoreCase(javacSourceEntry.getTokens()[0])) {
+								message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility);
+								prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+							}
+						}
+					}
+
+					// Check target level setting
+					if (projectClassCompatibility.equals(defaultComplianceOptions.get(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM))) {
+						if (javacTargetEntry != null) {
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_BuildEntryNotRequiredMatchesDefault, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
+							prepareError(PROPERTY_JAVAC_TARGET, null, message, PDEMarkerFactory.B_REMOVAL, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						}
+					} else {
+						if (javacTargetEntry == null) {
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
+							prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						} else {
+							if (!projectClassCompatibility.equalsIgnoreCase(javacTargetEntry.getTokens()[0])) {
+								message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility);
+								prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_REPLACE, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+							}
+						}
+					}
+				}
+
+				boolean warnForJavacWarnings = message != null || javacSourceEntry != null || javacTargetEntry != null || jreCompilationProfileEntry != null;
+				if (warnForJavacWarnings == false) {
+					return;
+				}
+
+				checkJavaComplianceSettings(projectComplianceLevel, javacWarningsEntries, javacErrorsEntries, libraryNames);
+			}
+		}
+	}
+
+	/**
+	 * Matches the javacWarnings and javacErrors entries in build.properties with the 
+	 * project specific Java compliance properties and reports the errors found.  Since java
+	 * compiler settings are set on a per project basis, any special javacWarnings/javacErrors
+	 * must be set for each library.
+	 * 
+	 * @param complianceLevel the compliance level to check settings against, used to get default values
+	 * @param javacWarningsEntries list of build entries with the java compiler warnings prefix javacWarnings.
+	 * @param javacErrorsEntries list of build entries with the java compiler errors prefix javacErrors.
+	 * @param libraryNames list of String library names
+	 */
+	private void checkJavaComplianceSettings(String complianceLevel, ArrayList javacWarningsEntries, ArrayList javacErrorsEntries, List libraryNames) {
+		List complianceWarnSettings = new ArrayList(3);
+		List complianceErrorSettings = new ArrayList(3);
+
+		IJavaProject project = JavaCore.create(fProject);
+		if (project.exists()) {
+
+			Map defaultComplianceOptions = new HashMap();
+			JavaCore.setComplianceOptions(complianceLevel, defaultComplianceOptions);
+
+			//look for assertIdentifier and enumIdentifier entries in javacWarnings. If any is present let it be, if not warn.
+			String assertIdentifier = project.getOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, false);
+			String defaultAssert = (String) defaultComplianceOptions.get(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER);
+			if (assertIdentifier != null && !assertIdentifier.equalsIgnoreCase(defaultAssert)) {
+				if (JavaCore.ERROR.equalsIgnoreCase(assertIdentifier)) {
+					complianceErrorSettings.add(ASSERT_IDENTIFIER);
+				} else if (JavaCore.WARNING.equalsIgnoreCase(assertIdentifier)) {
+					complianceWarnSettings.add(ASSERT_IDENTIFIER);
+				}
+			}
+
+			String enumIdentifier = project.getOption(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, false);
+			String defaultEnum = (String) defaultComplianceOptions.get(JavaCore.COMPILER_PB_ENUM_IDENTIFIER);
+			if (enumIdentifier != null && !enumIdentifier.equalsIgnoreCase(defaultEnum)) {
+				if (JavaCore.ERROR.equalsIgnoreCase(enumIdentifier)) {
+					complianceErrorSettings.add(ENUM_IDENTIFIER);
+				} else if (JavaCore.WARNING.equalsIgnoreCase(enumIdentifier)) {
+					complianceWarnSettings.add(ENUM_IDENTIFIER);
+				}
+			}
+
+			// If a warnings entry is required, make sure there is one for each library with the correct content
+			if (complianceWarnSettings.size() > 0) {
+				for (Iterator iterator = libraryNames.iterator(); iterator.hasNext();) {
+					String libName = (String) iterator.next();
+					IBuildEntry matchingEntry = null;
+					for (Iterator iterator2 = javacWarningsEntries.iterator(); iterator2.hasNext();) {
+						IBuildEntry candidate = (IBuildEntry) iterator2.next();
+						if (candidate.getName().equals(PROPERTY_JAVAC_WARNINGS_PREFIX + libName)) {
+							matchingEntry = candidate;
+							break;
+						}
+					}
+					if (matchingEntry == null) {
+						String missingTokens = ""; //$NON-NLS-1$
+						for (Iterator iterator2 = complianceWarnSettings.iterator(); iterator2.hasNext();) {
+							String currentIdentifier = (String) iterator2.next();
+							missingTokens = join(missingTokens, '-' + currentIdentifier);
+						}
+						String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_WARNINGS_PREFIX + libName);
+						prepareError(PROPERTY_JAVAC_WARNINGS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+					} else {
+						String missingTokens = ""; //$NON-NLS-1$
+						for (Iterator iterator2 = complianceWarnSettings.iterator(); iterator2.hasNext();) {
+							String currentIdentifier = (String) iterator2.next();
+							if (!matchingEntry.contains(currentIdentifier) && !matchingEntry.contains('+' + currentIdentifier) && !matchingEntry.contains('-' + currentIdentifier)) {
+								join(missingTokens, '-' + currentIdentifier);
+							}
+						}
+						if (missingTokens.length() > 0) {
+							String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_WARNINGS_PREFIX + libName);
+							prepareError(PROPERTY_JAVAC_WARNINGS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						}
+					}
+				}
+			}
+
+			// If a warnings entry is required, make sure there is one for each library with the correct content
+			if (complianceErrorSettings.size() > 0) {
+				for (Iterator iterator = libraryNames.iterator(); iterator.hasNext();) {
+					String libName = (String) iterator.next();
+					IBuildEntry matchingEntry = null;
+					for (Iterator iterator2 = javacErrorsEntries.iterator(); iterator2.hasNext();) {
+						IBuildEntry candidate = (IBuildEntry) iterator2.next();
+						if (candidate.getName().equals(PROPERTY_JAVAC_ERRORS_PREFIX + libName)) {
+							matchingEntry = candidate;
+							break;
+						}
+					}
+					if (matchingEntry == null) {
+						String missingTokens = ""; //$NON-NLS-1$
+						for (Iterator iterator2 = complianceErrorSettings.iterator(); iterator2.hasNext();) {
+							String currentIdentifier = (String) iterator2.next();
+							missingTokens = join(missingTokens, '-' + currentIdentifier);
+						}
+						String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_ERRORS_PREFIX + libName);
+						prepareError(PROPERTY_JAVAC_ERRORS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+					} else {
+						String missingTokens = ""; //$NON-NLS-1$
+						for (Iterator iterator2 = complianceErrorSettings.iterator(); iterator2.hasNext();) {
+							String currentIdentifier = (String) iterator2.next();
+							if (!matchingEntry.contains(currentIdentifier) && !matchingEntry.contains('+' + currentIdentifier) && !matchingEntry.contains('-' + currentIdentifier)) {
+								missingTokens = join(missingTokens, '-' + currentIdentifier);
+							}
+						}
+						if (missingTokens.length() > 0) {
+							String message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_ERRORS_PREFIX + libName);
+							prepareError(PROPERTY_JAVAC_ERRORS_PREFIX + libName, missingTokens, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplianceSeverity, PDEMarkerFactory.CAT_EE);
+						}
+					}
+				}
+			}
+		}
 	}
 
-//	private void validateDefaultEncoding(ArrayList sourceEntries, Map encodingEntries) {
-//		String defaultEncoding = System.getProperty("file.encoding"); //$NON-NLS-1$
-//		for (int i = 0; i < sourceEntries.size(); i++) {
-//			try {
-//				String name = ((IBuildEntry) sourceEntries.get(i)).getName();
-//				String library = name.substring(name.indexOf('.') + 1, name.length());
-//				String encoding = fProject.getDefaultCharset(false);
-//				String encodingId = PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX + library;
-//				String libraryEncoding = (String) encodingEntries.get(encodingId);
-//				if (encoding != null && !defaultEncoding.equalsIgnoreCase(encoding) && libraryEncoding == null) {
-//					prepareError(encodingId, encoding, NLS.bind(PDECoreMessages.BuildErrorReporter_defaultEncodingMissing, new Object[] {defaultEncoding, encoding}), PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_OTHER);
-//				}
-//			} catch (CoreException e) {
-//				PDECore.logException(e);
-//			}
-//		}
-//	}
+	private String findMatchingEE(String srcCompatibility, String clsCompatibility, boolean ee) {
+		String executionEnv = null;
+		String complaince = null;
+		if (srcCompatibility.equals(JavaCore.VERSION_1_1) && clsCompatibility.equals(JavaCore.VERSION_1_1)) {
+			executionEnv = JRE_1_1;
+			complaince = JavaCore.VERSION_1_1;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_2) && clsCompatibility.equals(JavaCore.VERSION_1_1)) {
+			executionEnv = J2SE_1_2;
+			complaince = JavaCore.VERSION_1_2;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_3) && clsCompatibility.equals(JavaCore.VERSION_1_1)) {
+			executionEnv = J2SE_1_3;
+			complaince = JavaCore.VERSION_1_3;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_3) && clsCompatibility.equals(JavaCore.VERSION_1_2)) {
+			executionEnv = J2SE_1_4;
+			complaince = JavaCore.VERSION_1_4;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_5) && clsCompatibility.equals(JavaCore.VERSION_1_5)) {
+			executionEnv = J2SE_1_5;
+			complaince = JavaCore.VERSION_1_5;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_6) && clsCompatibility.equals(JavaCore.VERSION_1_6)) {
+			executionEnv = JavaSE_1_6;
+			complaince = JavaCore.VERSION_1_6;
+		} else if (srcCompatibility.equals(JavaCore.VERSION_1_7) && clsCompatibility.equals(JavaCore.VERSION_1_7)) {
+			executionEnv = JavaSE_1_7;
+			complaince = JavaCore.VERSION_1_7;
+		}
+
+		if (ee) {
+			return executionEnv;
+		}
+		return complaince;
+	}
 
 	private void validateBinIncludes(IBuildEntry binIncludes) {
 		// make sure we have a manifest entry
-		if (fProject.exists(ICoreConstants.MANIFEST_PATH)) {
+		if (PDEProject.getManifest(fProject).exists()) {
 			validateBinIncludes(binIncludes, ICoreConstants.MANIFEST_FOLDER_NAME);
 		}
 
 		// if we have an OSGI_INF/ directory, let's do some validation
-		if (fProject.exists(ICoreConstants.OSGI_INF_PATH)) {
+		IFolder OSGinf = PDEProject.getOSGiInf(fProject);
+		if (OSGinf.exists()) {
 			try {
-				IFolder folder = fProject.getFolder(ICoreConstants.OSGI_INF_PATH);
-				if (folder.members().length > 0) { // only validate if we have something in it
+				if (OSGinf.members().length > 0) { // only validate if we have something in it
 					validateBinIncludes(binIncludes, ICoreConstants.OSGI_INF_FOLDER_NAME);
 				}
 			} catch (CoreException e) { // do nothing
@@ -227,12 +553,12 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		}
 
 		// make sure if we're a fragment, we have a fragment.xml entry
-		if (fProject.exists(ICoreConstants.FRAGMENT_PATH)) {
+		if (PDEProject.getFragmentXml(fProject).exists()) {
 			validateBinIncludes(binIncludes, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
 		}
 
-		// make sure if we're a plugin, we have a plugin.xml entry
-		if (fProject.exists(ICoreConstants.PLUGIN_PATH)) {
+		// make sure if we're a plug-in, we have a plugin.xml entry
+		if (PDEProject.getPluginXml(fProject).exists()) {
 			validateBinIncludes(binIncludes, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
 		}
 
@@ -243,23 +569,25 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		if (model instanceof IBundlePluginModelBase && !(model instanceof IBundleFragmentModel)) {
 			IBundleModel bm = ((IBundlePluginModelBase) model).getBundleModel();
 			IManifestHeader mh = bm.getBundle().getManifestHeader(Constants.BUNDLE_LOCALIZATION);
+			IPath resourcePath = null;
+			String entry = null;
 			if ((mh == null || mh.getValue() == null)) { // check for default location
-				Path path = new Path(Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME);
-				if (fProject.exists(path))
-					validateBinIncludes(binIncludes, Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME);
+				resourcePath = new Path(Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME);
+				entry = Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME;
 			} else { // check for the real location
 				String localization = mh.getValue();
 				int index = localization.lastIndexOf('/');
 				if (index != -1) { // if we're a folder
-					String folder = localization.substring(0, index + 1);
-					Path path = new Path(folder);
-					if (fProject.exists(path))
-						validateBinIncludes(binIncludes, folder);
+					entry = localization.substring(0, index + 1);
+					resourcePath = new Path(entry);
 				} else { // if we're just a file location
-					String location = mh.getValue().concat(".properties"); //$NON-NLS-1$
-					Path path = new Path(location);
-					if (fProject.exists(path))
-						validateBinIncludes(binIncludes, location);
+					entry = mh.getValue().concat(".properties"); //$NON-NLS-1$
+					resourcePath = new Path(entry);
+				}
+			}
+			if (resourcePath != null && entry != null) {
+				if (PDEProject.getBundleRoot(fProject).exists(resourcePath)) {
+					validateBinIncludes(binIncludes, entry);
 				}
 			}
 		}
@@ -292,7 +620,7 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		}
 
 		if (!exists) {
-			prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_FATAL);
+			prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL);
 		}
 	}
 
@@ -338,8 +666,22 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 	private void validateMissingSourceInBinIncludes(IBuildEntry binIncludes, ArrayList sourceEntryKeys, IBuild build) {
 		if (binIncludes == null)
 			return;
+		List pluginLibraryNames = new ArrayList(1);
+		IPluginModelBase pluginModel = PluginRegistry.findModel(fProject);
+		if (pluginModel != null) {
+			IPluginLibrary[] pluginLibraries = pluginModel.getPluginBase().getLibraries();
+			for (int i = 0; i < pluginLibraries.length; i++) {
+				pluginLibraryNames.add(pluginLibraries[i].getName());
+			}
+		}
+		if (!pluginLibraryNames.contains(".")) { //$NON-NLS-1$
+			pluginLibraryNames.add("."); //$NON-NLS-1$)
+		}
 		for (int i = 0; i < sourceEntryKeys.size(); i++) {
 			String key = (String) sourceEntryKeys.get(i);
+			if (!pluginLibraryNames.contains(key)) {
+				return; // do not report error for folders if the library itself does not exists on plug-in classpath
+			}
 			// We don't want to flag source.. = . as in  bug 146042 comment 1
 			if (DEF_SOURCE_ENTRY.equals(key)) {
 				IBuildEntry entry = build.getEntry(DEF_SOURCE_ENTRY);
@@ -355,27 +697,37 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 				if (pattern.matcher(key).matches())
 					found = true;
 			}
+			// account for trailing slash on class file folders
+			if (!found) {
+				IPath path = new Path(key);
+				if (path.getFileExtension() == null) {
+					if (!key.endsWith("/")) { //$NON-NLS-1$
+						key = key + "/"; //$NON-NLS-1$
+						for (int j = 0; j < binIncludesTokens.length; j++) {
+							Pattern pattern = PatternConstructor.createPattern(binIncludesTokens[j], false);
+							if (pattern.matcher(key).matches())
+								found = true;
+						}
+					}
+				}
+			}
 			if (!found)
-				prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, PDEMarkerFactory.CAT_FATAL);
+				prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL);
 		}
 	}
 
-	private void validateSourceEntries(ArrayList sourceEntries) {
-		for (int i = 0; i < sourceEntries.size(); i++) {
-			String name = ((IBuildEntry) sourceEntries.get(i)).getName();
-			String[] tokens = ((IBuildEntry) sourceEntries.get(i)).getTokens();
-			for (int j = 0; j < tokens.length; j++) {
-				if (".".equals(tokens[j])) //$NON-NLS-1$
-					continue;
-				IResource folderEntry = fProject.findMember(tokens[j]);
-				if (folderEntry == null || !folderEntry.exists() || !(folderEntry instanceof IFolder))
-					prepareError(name, tokens[j], NLS.bind(PDECoreMessages.BuildErrorReporter_missingFolder, tokens[j]), PDEMarkerFactory.B_REMOVAL, PDEMarkerFactory.CAT_OTHER);
+	private void validateMissingLibraries(ArrayList sourceEntryKeys, IClasspathEntry[] cpes) {
+		boolean srcFolderExists = false;
+		// no need to flag anything if the project contains no source folders.
+		for (int j = 0; j < cpes.length; j++) {
+			if (cpes[j].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+				srcFolderExists = true;
+				break;
 			}
-
 		}
-	}
+		if (!srcFolderExists)
+			return;
 
-	private void validateMissingLibraries(ArrayList sourceEntryKeys, IClasspathEntry[] cpes) {
 		IPluginModelBase model = PluginRegistry.findModel(fProject);
 		if (model == null)
 			return;
@@ -383,12 +735,8 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 			IBundleModel bm = ((IBundlePluginModelBase) model).getBundleModel();
 			IManifestHeader mh = bm.getBundle().getManifestHeader(Constants.BUNDLE_CLASSPATH);
 			if ((mh == null || mh.getValue() == null)) {
-				for (int i = 0; i < cpes.length; i++) {
-					if (cpes[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
-						if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY))
-							prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER);
-						break;
-					}
+				if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY)) {
+					prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
 				}
 			}
 		}
@@ -396,15 +744,10 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		for (int i = 0; i < libraries.length; i++) {
 			String libname = libraries[i].getName();
 			if (libname.equals(".")) { //$NON-NLS-1$
-				// no need to flag anything if the project contains no source folders.
-				for (int j = 0; j < cpes.length; j++) {
-					if (cpes[j].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
-						if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY))
-							prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, PDEMarkerFactory.CAT_OTHER);
-						break;
-					}
+				if (!sourceEntryKeys.contains(DEF_SOURCE_ENTRY)) {
+					prepareError(DEF_SOURCE_ENTRY, null, PDECoreMessages.BuildErrorReporter_sourceMissing, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
+					continue;
 				}
-				continue;
 			} else if (fProject.findMember(libname) != null) {
 				// non "." library entries that exist in the workspace
 				// don't have to be referenced in the build properties
@@ -412,7 +755,7 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 			}
 			String sourceEntryKey = PROPERTY_SOURCE_PREFIX + libname;
 			if (!sourceEntryKeys.contains(sourceEntryKey) && !containedInFragment(model.getBundleDescription(), libname))
-				prepareError(sourceEntryKey, null, NLS.bind(PDECoreMessages.BuildErrorReporter_missingEntry, sourceEntryKey), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER);
+				prepareError(sourceEntryKey, null, NLS.bind(PDECoreMessages.BuildErrorReporter_missingEntry, sourceEntryKey), PDEMarkerFactory.B_ADDITION, PDEMarkerFactory.CAT_OTHER);
 		}
 	}
 
@@ -457,27 +800,64 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 	}
 
 	private void validateSourceEntries(ArrayList sourceEntries, IClasspathEntry[] cpes) {
+		if (sourceEntries == null || sourceEntries.size() == 0)
+			return;
 		String[] unlisted = PDEBuilderHelper.getUnlistedClasspaths(sourceEntries, fProject, cpes);
-		StringBuffer sb = new StringBuffer();
+		String name = ((IBuildEntry) sourceEntries.get(0)).getName();
+		String message = PDECoreMessages.BuildErrorReporter_classpathEntryMissing1;
+		if (sourceEntries.size() > 1) {
+			name = DEF_SOURCE_ENTRY;
+			message = PDECoreMessages.BuildErrorReporter_classpathEntryMissing;
+		}
 		for (int i = 0; i < unlisted.length; i++) {
 			if (unlisted[i] == null)
 				break;
-			if (sb.length() > 0)
-				sb.append(", "); //$NON-NLS-1$
-			sb.append(unlisted[i]);
+			prepareError(name, unlisted[i], NLS.bind(message, unlisted[i], name), PDEMarkerFactory.B_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
 		}
-		String unlistedEntries = sb.toString();
-		if (sb.length() == 0)
+	}
+
+	// bug 286808
+	private void validateSourceFoldersInSrcIncludes(IBuildEntry includes) {
+		if (includes == null)
 			return;
-		if (sourceEntries.size() == 1) {
-			String name = ((IBuildEntry) sourceEntries.get(0)).getName();
-			prepareError(name, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing1, unlistedEntries, name), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER);
-		} else
-			prepareError(DEF_SOURCE_ENTRY, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing, unlistedEntries), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER);
+
+		List sourceFolderList = new ArrayList(0);
+		try {
+			IJavaProject javaProject = JavaCore.create(fProject);
+			if (javaProject.exists()) {
+				IClasspathEntry[] classPathEntries = javaProject.getResolvedClasspath(true);
+
+				for (int index = 0; index < classPathEntries.length; index++) {
+					if (classPathEntries[index].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+						sourceFolderList.add(classPathEntries[index].getPath());
+					}
+				}
+			}
+		} catch (JavaModelException e) { //do nothing
+		}
+
+		List reservedTokens = Arrays.asList(RESERVED_NAMES);
+
+		String[] tokens = includes.getTokens();
+		for (int i = 0; i < tokens.length; i++) {
+			IResource res = fProject.findMember(tokens[i]);
+			if (res == null)
+				continue;
+			String errorMessage = null;
+			if (sourceFolderList.contains(res.getFullPath())) {
+				errorMessage = PDECoreMessages.BuildErrorReporter_srcIncludesSourceFolder;
+			} else if (tokens[i].startsWith(".") || reservedTokens.contains(res.getName().toString().toLowerCase())) { //$NON-NLS-1$
+				errorMessage = NLS.bind(PDECoreMessages.BuildErrorReporter_srcIncludesSourceFolder1, res.getName());
+			}
+
+			if (errorMessage != null) {
+				prepareError(includes.getName(), tokens[i], errorMessage, PDEMarkerFactory.B_REMOVAL, fSrcInclSeverity, PDEMarkerFactory.CAT_OTHER);
+			}
+		}
 
 	}
 
-	private void validateIncludes(IBuildEntry includes, ArrayList sourceIncludes) {
+	private void validateIncludes(IBuildEntry includes, ArrayList sourceIncludes, int severity) {
 		if (includes == null)
 			return;
 		String[] tokens = includes.getTokens();
@@ -492,7 +872,7 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 			if (startsWithAntVariable(token))
 				// skip '${x}' variables
 				continue;
-			IResource member = fProject.findMember(token);
+			IResource member = PDEProject.getBundleRoot(fProject).findMember(token);
 			String message = null;
 			int fixId = PDEMarkerFactory.NO_RESOLUTION;
 			if (member == null) {
@@ -512,7 +892,7 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 			}
 
 			if (message != null)
-				prepareError(includes.getName(), token, message, fixId, PDEMarkerFactory.CAT_OTHER);
+				prepareError(includes.getName(), token, message, fixId, severity, PDEMarkerFactory.CAT_OTHER);
 		}
 	}
 
@@ -530,6 +910,97 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 
 	}
 
+	/**
+	 * Checks that if the project has java compiler settings that build.properties contains a use project settings
+	 * entry so that the compiler picks up the settings using the .pref file.
+	 * 
+	 * @param useJavaProjectSettings a build entry for using the project's compiler warning preferences file
+	 */
+	private void validateJavaCompilerSettings(IBuildEntry useJavaProjectSettings) {
+		// Check if the project has compiler warnings set
+		IJavaProject project = JavaCore.create(fProject);
+		if (project.exists()) {
+			Map options = project.getOptions(false);
+			// If project specific options are turned on, all options will be stored.  Only need to check if at least one compiler option is set. Currently using the second option on the property page.
+			if (options.containsKey(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS)) {
+				if (useJavaProjectSettings != null) {
+					boolean entryCorrect = false;
+					String[] tokens = useJavaProjectSettings.getTokens();
+					if (tokens != null && tokens.length == 1) {
+						if (Boolean.TRUE.toString().equalsIgnoreCase(tokens[0])) {
+							// True is valid if the bundle root is the default (the project)
+							entryCorrect = fProject.equals(PDEProject.getBundleRoot(fProject));
+						} else {
+							IPath prefFile = null;
+							prefFile = new Path(tokens[0]);
+							if (prefFile.isAbsolute()) {
+								entryCorrect = prefFile.toFile().exists();
+							} else {
+								IContainer root = PDEProject.getBundleRoot(fProject);
+								entryCorrect = root.getFile(prefFile).exists();
+							}
+						}
+					}
+					if (!entryCorrect) {
+						String token = null;
+						String message = null;
+						IContainer root = PDEProject.getBundleRoot(fProject);
+						if (fProject.equals(root)) {
+							// Default project root, just use 'true'
+							token = Boolean.TRUE.toString();
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryMissingValidPath, PROPERTY_PROJECT_SETTINGS);
+						} else {
+							// Non default bundle root, make a relative path
+							IPath prefFile = fProject.getFullPath().append(".settings").append(JavaCore.PLUGIN_ID + ".prefs"); //$NON-NLS-1$ //$NON-NLS-2$
+							prefFile = prefFile.makeRelativeTo(root.getFullPath());
+							token = prefFile.toString();
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryMissingValidRelativePath, PROPERTY_PROJECT_SETTINGS);
+						}
+						prepareError(PROPERTY_PROJECT_SETTINGS, token, message, PDEMarkerFactory.B_REPLACE, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
+					}
+				} else {
+					String token = null;
+					IContainer root = PDEProject.getBundleRoot(fProject);
+					if (fProject.equals(root)) {
+						// Default project root, just use 'true'
+						token = Boolean.TRUE.toString();
+					} else {
+						// Non default bundle root, make a relative path
+						IPath prefFile = fProject.getFullPath().append(".settings").append(JavaCore.PLUGIN_ID + ".prefs"); //$NON-NLS-1$ //$NON-NLS-2$
+						prefFile = prefFile.makeRelativeTo(root.getFullPath());
+						token = prefFile.toString();
+					}
+					String message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryMissingProjectSpecificSettings, PROPERTY_PROJECT_SETTINGS);
+					prepareError(PROPERTY_PROJECT_SETTINGS, token, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
+				}
+			} else if (useJavaProjectSettings != null) {
+				String message = NLS.bind(PDECoreMessages.BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings, PROPERTY_PROJECT_SETTINGS);
+				prepareError(PROPERTY_PROJECT_SETTINGS, null, message, PDEMarkerFactory.B_REMOVAL, fJavaCompilerSeverity, PDEMarkerFactory.CAT_EE);
+			}
+		}
+	}
+
+	/**
+	 * Joins the given tokens into a single string with a comma separator.  If either of
+	 * the tokens are null or of length 0, the other string will be returned
+	 * 
+	 * @param token1 first string
+	 * @param token2 second string
+	 * @return concatenated string
+	 */
+	private String join(String token1, String token2) {
+		StringBuffer result = new StringBuffer();
+		if (token1 != null && token1.length() > 0) {
+			result.append(token1);
+		}
+		if (token2 != null && token2.length() > 0) {
+			if (result.length() > 0)
+				result.append(',');
+			result.append(token2);
+		}
+		return result.toString();
+	}
+
 	private BuildModel prepareTextBuildModel(IProgressMonitor monitor) {
 		try {
 			IDocument doc = createDocument(fFile);
@@ -623,11 +1094,11 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		return 0;
 	}
 
-	private void prepareError(String name, String token, String message, int fixId, String category) {
+	protected void prepareError(String name, String token, String message, int fixId, String category) {
 		prepareError(name, token, message, fixId, fBuildSeverity, category);
 	}
 
-	private void prepareError(String name, String token, String message, int fixId, int severity, String category) {
+	protected void prepareError(String name, String token, String message, int fixId, int severity, String category) {
 		BuildProblem bp = new BuildProblem(name, token, message, fixId, severity, category);
 		for (int i = 0; i < fProblemList.size(); i++) {
 			BuildProblem listed = (BuildProblem) fProblemList.get(i);
@@ -648,4 +1119,16 @@ public class BuildErrorReporter extends ErrorReporter implements IBuildPropertie
 		}
 	}
 
+	public boolean isCustomBuild() {
+		WorkspaceBuildModel wbm = new WorkspaceBuildModel(fFile);
+		IBuild build = wbm.getBuild();
+		IBuildEntry entry = build.getEntry(PROPERTY_CUSTOM);
+		if (entry != null) {
+			String[] tokens = entry.getTokens();
+			if (tokens.length == 1 && tokens[0].equalsIgnoreCase("true")) { //$NON-NLS-1$
+				return true;
+			}
+		}
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
index 1543092..4e1f9b4 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.search.PluginJavaSearchUtil;
 import org.eclipse.pde.internal.core.util.*;
 import org.osgi.framework.*;
@@ -52,7 +53,6 @@ public class BundleErrorReporter extends JarManifestErrorReporter {
 			return;
 
 		validateFragmentHost();
-		validateRequiredHeader(Constants.BUNDLE_NAME);
 		validateBundleVersion();
 		validateRequiredExecutionEnvironment();
 
@@ -170,7 +170,7 @@ public class BundleErrorReporter extends JarManifestErrorReporter {
 		IPluginBase base = fModel.getPluginBase();
 		// must check the existence of plugin.xml file instead of using IPluginBase because if the bundle is not a singleton,
 		// it won't be registered with the extension registry and will always return 0 when querying extensions/extension points
-		boolean hasExtensions = base != null && fProject.findMember(ICoreConstants.PLUGIN_PATH) != null;
+		boolean hasExtensions = base != null && PDEProject.getPluginXml(fProject).exists();
 
 		if (hasExtensions) {
 			if (TargetPlatformHelper.getTargetVersion() >= 3.1) {
@@ -218,7 +218,7 @@ public class BundleErrorReporter extends JarManifestErrorReporter {
 	private void validateFragmentHost() {
 		IHeader header = getHeader(Constants.FRAGMENT_HOST);
 		if (header == null) {
-			if (isCheckNoRequiredAttr() && fProject.getFile("fragment.xml").exists()) { //$NON-NLS-1$
+			if (isCheckNoRequiredAttr() && PDEProject.getFragmentXml(fProject).exists()) {
 				report(PDECoreMessages.BundleErrorReporter_HostNeeded, 1, CompilerFlags.P_NO_REQUIRED_ATT, PDEMarkerFactory.CAT_FATAL);
 			}
 			return;
@@ -356,7 +356,11 @@ public class BundleErrorReporter extends JarManifestErrorReporter {
 
 					IPath validPath = JavaRuntime.newJREContainerPath(env);
 					if (!validPath.equals(currentPath)) {
-						report(NLS.bind(PDECoreMessages.BundleErrorReporter_reqExecEnv_conflict, bundleEnvs[0]), getLine(header, bundleEnvs[0]), sev, PDEMarkerFactory.M_MISMATCHED_EXEC_ENV, PDEMarkerFactory.CAT_EE);
+						// Check if the user is using a perfect match JRE
+						IVMInstall vm = JavaRuntime.getVMInstall(validPath);
+						if (vm == null || !env.isStrictlyCompatible(vm)) {
+							report(NLS.bind(PDECoreMessages.BundleErrorReporter_reqExecEnv_conflict, bundleEnvs[0]), getLine(header, bundleEnvs[0]), sev, PDEMarkerFactory.M_MISMATCHED_EXEC_ENV, PDEMarkerFactory.CAT_EE);
+						}
 					}
 				}
 			} catch (JavaModelException e) {
@@ -1085,7 +1089,7 @@ public class BundleErrorReporter extends JarManifestErrorReporter {
 			location = new String();
 		}
 
-		IResource res = fProject.findMember(location);
+		IResource res = PDEProject.getBundleRoot(fProject).findMember(location);
 		if (res == null || !(res instanceof IContainer)) {
 			report(PDECoreMessages.BundleErrorReporter_localization_folder_not_exist, header.getLineNumber() + 1, CompilerFlags.getFlag(fProject, CompilerFlags.P_UNKNOWN_RESOURCE), PDEMarkerFactory.CAT_OTHER);
 			return;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java
index 6b1d8db..2857899 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,6 +54,14 @@ public class CompilerFlags {
 	public static final String P_NO_REQUIRED_ATT = "compilers.p.no-required-att"; //$NON-NLS-1$
 	public static final String P_NOT_EXTERNALIZED = "compilers.p.not-externalized-att"; //$NON-NLS-1$
 	public static final String P_BUILD = "compilers.p.build"; //$NON-NLS-1$
+	public static final String P_BUILD_MISSING_OUTPUT = "compilers.p.build.missing.output"; //$NON-NLS-1$
+	public static final String P_BUILD_SOURCE_LIBRARY = "compilers.p.build.source.library"; //$NON-NLS-1$
+	public static final String P_BUILD_OUTPUT_LIBRARY = "compilers.p.build.output.library"; //$NON-NLS-1$
+	public static final String P_BUILD_SRC_INCLUDES = "compilers.p.build.src.includes"; //$NON-NLS-1$
+	public static final String P_BUILD_BIN_INCLUDES = "compilers.p.build.bin.includes"; //$NON-NLS-1$
+	public static final String P_BUILD_JAVA_COMPLIANCE = "compilers.p.build.java.compliance"; //$NON-NLS-1$
+	public static final String P_BUILD_JAVA_COMPILER = "compilers.p.build.java.compiler"; //$NON-NLS-1$
+	public static final String P_BUILD_ENCODINGS = "compilers.p.build.encodings"; //$NON-NLS-1$
 	public static final String P_INCOMPATIBLE_ENV = "compilers.incompatible-environment"; //$NON-NLS-1$
 	public static final String P_MISSING_EXPORT_PKGS = "compilers.p.missing-packages"; //$NON-NLS-1$
 	public static final String P_DEPRECATED = "compilers.p.deprecated"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
index f17a999..b2b433b 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ExtensionsErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.pde.core.build.IBuild;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ischema.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.schema.SchemaRegistry;
 import org.eclipse.pde.internal.core.util.*;
 import org.w3c.dom.*;
@@ -512,7 +513,7 @@ public class ExtensionsErrorReporter extends ManifestErrorReporter {
 				IPath currPath = new Path(paths.get(i).toString());
 				if (currPath.isAbsolute() && currPath.toFile().exists())
 					return true;
-				if (fFile.getProject().findMember(currPath) != null)
+				if (PDEProject.getBundleRoot(fFile.getProject()).findMember(currPath) != null)
 					return true;
 				if (fBuildModel != null && fBuildModel.getEntry("source." + paths.get(i)) != null) //$NON-NLS-1$
 					return true;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureConsistencyChecker.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureConsistencyChecker.java
index 241408d..c14dd44 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureConsistencyChecker.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureConsistencyChecker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,13 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core.builders;
 
-import java.util.Locale;
 import java.util.Map;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.osgi.framework.Bundle;
 
 public class FeatureConsistencyChecker extends IncrementalProjectBuilder {
@@ -78,7 +78,7 @@ public class FeatureConsistencyChecker extends IncrementalProjectBuilder {
 	}
 
 	private void checkProject(IProgressMonitor monitor) {
-		IFile file = getProject().getFile("feature.xml"); //$NON-NLS-1$
+		IFile file = PDEProject.getFeatureXml(getProject());
 		if (file.exists()) {
 			checkFile(file, monitor);
 		}
@@ -97,14 +97,14 @@ public class FeatureConsistencyChecker extends IncrementalProjectBuilder {
 	}
 
 	private boolean isManifestFile(IFile file) {
-		return file.getParent().equals(file.getProject()) && file.getName().toLowerCase(Locale.ENGLISH).equals("feature.xml"); //$NON-NLS-1$
+		return file.equals(PDEProject.getFeatureXml(file.getProject()));
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.core.resources.IncrementalProjectBuilder#clean(org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	protected void clean(IProgressMonitor monitor) throws CoreException {
-		IFile file = getProject().getFile("feature.xml"); //$NON-NLS-1$
+		IFile file = PDEProject.getFeatureXml(getProject());
 		if (file.exists()) {
 			SubMonitor localmonitor = SubMonitor.convert(monitor, NLS.bind(PDECoreMessages.FeatureConsistencyChecker_0, file.getName()), 1);
 			try {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureErrorReporter.java
index 1911572..5882eb1 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/FeatureErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Simon Muschel <smuschel at gmx.de> - bug 260549
  *******************************************************************************/
 package org.eclipse.pde.internal.core.builders;
 
@@ -15,8 +16,7 @@ import java.util.HashSet;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModel;
 import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
@@ -105,11 +105,12 @@ public class FeatureErrorReporter extends ManifestErrorReporter {
 					validatePluginID(plugin, attr, isFragment);
 				} else if (name.equals("version")) { //$NON-NLS-1$
 					validateVersionAttribute(plugin, attr);
+					validateVersion(plugin, attr);
 				} else if (name.equals("fragment") || name.equals("unpack")) { //$NON-NLS-1$ //$NON-NLS-2$
 					validateBoolean(plugin, attr);
 				} else if (!name.equals("os") && !name.equals("ws") && !name.equals("nl") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 						&& !name.equals("arch") && !name.equals("download-size") //$NON-NLS-1$ //$NON-NLS-2$
-						&& !name.equals("install-size")) { //$NON-NLS-1$
+						&& !name.equals("install-size") && !name.equals("filter")) { //$NON-NLS-1$ //$NON-NLS-2$
 					reportUnknownAttribute(plugin, name, CompilerFlags.ERROR);
 				}
 			}
@@ -162,7 +163,7 @@ public class FeatureErrorReporter extends ManifestErrorReporter {
 					} else {
 						validateBoolean(element, attr);
 					}
-				} else if (!name.equals("plugin") && !name.equals("feature")) { //$NON-NLS-1$ //$NON-NLS-2$
+				} else if (!name.equals("plugin") && !name.equals("feature") && !name.equals("filter")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 					reportUnknownAttribute(element, name, CompilerFlags.ERROR);
 				}
 			}
@@ -197,7 +198,7 @@ public class FeatureErrorReporter extends ManifestErrorReporter {
 						reportIllegalAttributeValue(include, attr);
 					}
 				} else if (!name.equals("id") && !name.equals("name") && !name.equals("os") && !name.equals("ws") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-						&& !name.equals("nl") && !name.equals("arch")) { //$NON-NLS-1$ //$NON-NLS-2$
+						&& !name.equals("nl") && !name.equals("arch") && !name.equals("filter")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 					reportUnknownAttribute(include, name, CompilerFlags.ERROR);
 				}
 			}
@@ -425,4 +426,31 @@ public class FeatureErrorReporter extends ManifestErrorReporter {
 			report(message, getLine(parent), severity, PDEMarkerFactory.CAT_OTHER);
 		}
 	}
+
+	/**
+	 * Validates that the version of the given plug-in is available in the registry.  Adds a
+	 * warning if the plug-in could not be found.
+	 * 
+	 * @param plugin xml element describing the plug-in to look for in the registry
+	 * @param attr set of element attributes 
+	 */
+	private void validateVersion(Element plugin, Attr attr) {
+		String id = plugin.getAttribute("id"); //$NON-NLS-1$
+		String version = plugin.getAttribute("version"); //$NON-NLS-1$
+		if (id.trim().length() == 0 || version.trim().length() == 0 || version.equals("0.0.0")) //$NON-NLS-1$
+			return;
+		ModelEntry entry = PluginRegistry.findEntry(id);
+		if (entry != null) {
+			IPluginModelBase[] allModels = entry.getActiveModels();
+			for (int i = 0; i < allModels.length; i++) {
+				IPluginModelBase availablePlugin = allModels[i];
+				if (id.equals(availablePlugin.getPluginBase().getId())) {
+					if (version.equals(availablePlugin.getPluginBase().getVersion())) {
+						return;
+					}
+				}
+			}
+		}
+		report(NLS.bind(PDECoreMessages.Builders_Feature_mismatchPluginVersion, new String[] {version, id}), getLine(plugin, attr.getName()), CompilerFlags.WARNING, PDEMarkerFactory.CAT_OTHER);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ManifestConsistencyChecker.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ManifestConsistencyChecker.java
index 8b4233b..0daef1e 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ManifestConsistencyChecker.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/ManifestConsistencyChecker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,10 +17,8 @@ import java.util.Map;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.osgi.framework.Bundle;
 
 public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
@@ -98,8 +96,9 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 				if (resource.isDerived())
 					return false;
 				if (resource.getType() == IResource.FILE) {
+					IFile file = (IFile) resource;
+					IProject project = file.getProject();
 					String name = resource.getName();
-					IPath path = resource.getProjectRelativePath();
 					if (isLocalizationFile(resource)) {
 						type |= MANIFEST | EXTENSIONS;
 						if (DEBUG) {
@@ -107,21 +106,21 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 							System.out.print(delta.getResource().getProjectRelativePath().toString());
 							System.out.println(" - changed"); //$NON-NLS-1$
 						}
-					} else if (path.equals(ICoreConstants.MANIFEST_PATH)) {
+					} else if (file.equals(PDEProject.getManifest(project))) {
 						type |= MANIFEST | EXTENSIONS | BUILD;
 						if (DEBUG) {
 							System.out.print("Needs to rebuild project [" + getProject().getName() + "]: "); //$NON-NLS-1$ //$NON-NLS-2$
 							System.out.print(delta.getResource().getProjectRelativePath().toString());
 							System.out.println(" - changed"); //$NON-NLS-1$
 						}
-					} else if (name.endsWith(".exsd") || path.equals(ICoreConstants.PLUGIN_PATH) || path.equals(ICoreConstants.FRAGMENT_PATH)) { //$NON-NLS-1$
+					} else if (name.endsWith(".exsd") || file.equals(PDEProject.getPluginXml(project)) || file.equals(PDEProject.getFragmentXml(project))) { //$NON-NLS-1$
 						type |= EXTENSIONS;
 						if (DEBUG) {
 							System.out.print("Needs to rebuild extensions in project [" + getProject().getName() + "]: "); //$NON-NLS-1$ //$NON-NLS-2$
 							System.out.print(delta.getResource().getProjectRelativePath().toString());
 							System.out.println(" - changed"); //$NON-NLS-1$
 						}
-					} else if (path.equals(ICoreConstants.BUILD_PROPERTIES_PATH)) {
+					} else if (file.equals(PDEProject.getBuildProperties(project))) {
 						type |= BUILD;
 						if (DEBUG) {
 							System.out.print("Needs to rebuild build.properties in project [" + getProject().getName() + "]: "); //$NON-NLS-1$ //$NON-NLS-2$
@@ -144,16 +143,7 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 	}
 
 	private boolean isLocalizationFile(IResource file) {
-		IPluginModelBase model = PluginRegistry.findModel(getProject());
-		String localization = null;
-		if (model instanceof IBundlePluginModelBase) {
-			localization = ((IBundlePluginModelBase) model).getBundleLocalization();
-		} else {
-			localization = "plugin"; //$NON-NLS-1$
-		}
-		if (localization != null)
-			return file.getProjectRelativePath().equals(new Path(localization + ".properties")); //$NON-NLS-1$
-		return false;
+		return file.equals(PDEProject.getLocalizationFile(getProject()));
 	}
 
 	protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
@@ -225,14 +215,14 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 
 		if ((type & MANIFEST | EXTENSIONS) != 0) {
 			IProject project = getProject();
-			IFile file = project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
+			IFile file = PDEProject.getPluginXml(project);
 			if (!file.exists())
-				file = project.getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
+				file = PDEProject.getFragmentXml(project);
 
 			if (file.exists()) {
 				validateFiles(file, type, monitor);
 			} else if ((type & MANIFEST) != 0) {
-				IFile manifestFile = project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+				IFile manifestFile = PDEProject.getManifest(project);
 				if (manifestFile.exists())
 					validateManifestFile(manifestFile, new SubProgressMonitor(monitor, 1));
 			}
@@ -288,7 +278,7 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 		String message = NLS.bind(PDECoreMessages.Builders_verifying, file.getFullPath().toString());
 		monitor.subTask(message);
 
-		IFile bundleManifest = file.getProject().getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		IFile bundleManifest = PDEProject.getManifest(getProject());
 		XMLErrorReporter reporter = null;
 		BundleErrorReporter bundleReporter = null;
 		if (bundleManifest.exists()) {
@@ -297,9 +287,9 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 			if ((type & MANIFEST) != 0)
 				bundleReporter = new BundleErrorReporter(bundleManifest);
 		} else if ((type & MANIFEST) != 0 || (type & EXTENSIONS) != 0) {
-			if (file.getName().equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR)) {
+			if (file.equals(PDEProject.getPluginXml(getProject()))) {
 				reporter = new PluginErrorReporter(file);
-			} else if (file.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
+			} else if (file.equals(PDEProject.getFragmentXml(getProject()))) {
 				reporter = new FragmentErrorReporter(file);
 			}
 		}
@@ -319,7 +309,7 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 		if (monitor.isCanceled())
 			return;
 		IProject project = getProject();
-		IFile file = project.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getBuildProperties(project);
 		if (file.exists()) {
 			monitor.subTask(PDECoreMessages.ManifestConsistencyChecker_buildPropertiesSubtask);
 			BuildErrorReporter ber = new BuildErrorReporter(file);
@@ -329,7 +319,7 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 
 	// Will place a marker on the project if the build.properties does not exist
 	private void validateBuildPropertiesExists(IProject project) {
-		IFile file = project.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getBuildProperties(project);
 		if (!file.exists()) {
 			int severity = CompilerFlags.getFlag(project, CompilerFlags.P_BUILD);
 			if (severity == CompilerFlags.IGNORE)
@@ -346,14 +336,14 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 
 	// Will place a marker on either the project (if META-INF exist but not a MANIFEST.MF) or on the MANIFEST.MF file with incorrect casing.
 	private void validateManifestCasing(IProject project) {
-		IFolder manifestFolder = project.getFolder("META-INF"); //$NON-NLS-1$
+		IFolder manifestFolder = PDEProject.getMetaInf(project);
 		if (manifestFolder.exists()) {
 			try {
 				manifestFolder.deleteMarkers(PDEMarkerFactory.MARKER_ID, false, IResource.DEPTH_ONE);
 			} catch (CoreException e1) {
 			}
 			// exit if the proper casing exists (should be majority of the time)
-			if (manifestFolder.getFile("MANIFEST.MF").exists()) //$NON-NLS-1$
+			if (PDEProject.getManifest(project).exists())
 				return;
 
 			IPath location = manifestFolder.getLocation();
@@ -389,7 +379,7 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 	class ManifestFilter implements FilenameFilter {
 
 		public boolean accept(File dir, String name) {
-			return (name.equalsIgnoreCase("MANIFEST.MF")); //$NON-NLS-1$
+			return (name.equalsIgnoreCase(ICoreConstants.MANIFEST_FILENAME));
 		}
 	}
 
@@ -402,14 +392,14 @@ public class ManifestConsistencyChecker extends IncrementalProjectBuilder {
 			// clean problem markers on the project
 			cleanProblems(getProject(), IResource.DEPTH_ZERO);
 			// clean the manifest directory (since errors can be created on manifest files with incorrect casing)
-			IFile manifestFile = getProject().getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+			IFile manifestFile = PDEProject.getManifest(getProject());
 			cleanProblems(manifestFile.getParent(), IResource.DEPTH_ONE);
 			// clean plug-in XML file
-			cleanProblems(getProject().getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR), IResource.DEPTH_ZERO);
+			cleanProblems(PDEProject.getPluginXml(getProject()), IResource.DEPTH_ZERO);
 			// clean fragment XML file
-			cleanProblems(getProject().getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR), IResource.DEPTH_ZERO);
+			cleanProblems(PDEProject.getFragmentXml(getProject()), IResource.DEPTH_ZERO);
 			// clean build properties
-			cleanProblems(getProject().getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR), IResource.DEPTH_ZERO);
+			cleanProblems(PDEProject.getBuildProperties(getProject()), IResource.DEPTH_ZERO);
 			localmonitor.worked(1);
 		} finally {
 			localmonitor.done();
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java
index a27f99e..71eb208 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,9 +51,11 @@ public class PDEMarkerFactory {
 	// build properties fixes
 	public static final int B_APPEND_SLASH_FOLDER_ENTRY = 0x2001;
 	public static final int B_REMOVE_SLASH_FILE_ENTRY = 0x2002;
-	public static final int B_ADDDITION = 0x2003;
+	public static final int B_ADDITION = 0x2003;
 	public static final int B_SOURCE_ADDITION = 0x2004;
 	public static final int B_REMOVAL = 0x2005;
+	public static final int B_REPLACE = 0x2006;
+	public static final int B_JAVA_ADDDITION = 0x2007;
 
 	// plugin.xml fixes
 	public static final int P_ILLEGAL_XML_NODE = 0x3001;
@@ -72,11 +74,12 @@ public class PDEMarkerFactory {
 	public static final String CAT_DEPRECATION = "deprecation"; //$NON-NLS-1$
 	public static final String CAT_EE = "ee"; //$NON-NLS-1$
 	public static final String CAT_OTHER = ""; //$NON-NLS-1$
+	public static final String CAT_ID = "categoryId"; //$NON-NLS-1$
 
 	public IMarker createMarker(IFile file, int id, String category) throws CoreException {
 		IMarker marker = file.createMarker(MARKER_ID);
 		marker.setAttribute("id", id); //$NON-NLS-1$
-		marker.setAttribute("categoryId", category); //$NON-NLS-1$
+		marker.setAttribute(CAT_ID, category);
 		return marker;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SchemaErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SchemaErrorReporter.java
index 9a035ca..b362f86 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SchemaErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SchemaErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,23 +7,20 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Simon Muschel <smuschel at gmx.de> - bug 215743
  *******************************************************************************/
 package org.eclipse.pde.internal.core.builders;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
+import java.net.MalformedURLException;
+import java.util.*;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.PDECoreMessages;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
+import org.eclipse.pde.internal.core.ischema.*;
+import org.eclipse.pde.internal.core.schema.IncludedSchemaDescriptor;
+import org.eclipse.pde.internal.core.schema.SchemaDescriptor;
+import org.w3c.dom.*;
 
 public class SchemaErrorReporter extends XMLErrorReporter {
 
@@ -67,17 +64,23 @@ public class SchemaErrorReporter extends XMLErrorReporter {
 			"thead", //$NON-NLS-1$
 			"tr"}; //$NON-NLS-1$
 
+	private ISchema fSchema;
 	private static final String ELEMENT = "element"; //$NON-NLS-1$
 	private static final String DOCUMENTATION = "documentation"; //$NON-NLS-1$
 	private static final String ANNOTATION = "annotation"; //$NON-NLS-1$
 	private static final String ATTRIBUTE = "attribute"; //$NON-NLS-1$
+	private static final String INCLUDE = "include"; //$NON-NLS-1$
 
 	private static final String ATTR_NAME = "name"; //$NON-NLS-1$
 	private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
 	private static final String ATTR_USE = "use"; //$NON-NLS-1$
+	private static final String ATTR_REF = "ref"; //$NON-NLS-1$
+	private static final String ATTR_LOCATION = "schemaLocation"; //$NON-NLS-1$
 
 	public SchemaErrorReporter(IFile file) {
 		super(file);
+		SchemaDescriptor desc = new SchemaDescriptor(fFile, true);
+		fSchema = desc.getSchema(false);
 	}
 
 	public void validateContent(IProgressMonitor monitor) {
@@ -99,6 +102,8 @@ public class SchemaErrorReporter extends XMLErrorReporter {
 								elements.add(value);
 							}
 						}
+					} else if (name != null && name.equals(INCLUDE)) {
+						validateInclude(childElement);
 					}
 					validate((Element) child);
 				}
@@ -116,6 +121,8 @@ public class SchemaErrorReporter extends XMLErrorReporter {
 			if (child instanceof Element) {
 				if (child.getNodeName().equals(ANNOTATION)) {
 					validateAnnotation((Element) child);
+				} else if (child.getNodeName().equals(ELEMENT)) {
+					validateElementReference((Element) child);
 				} else {
 					validate((Element) child);
 				}
@@ -259,4 +266,36 @@ public class SchemaErrorReporter extends XMLErrorReporter {
 		}
 	}
 
+	private void validateInclude(Element element) {
+		if (fSchema != null) {
+			ISchemaInclude[] includes = fSchema.getIncludes();
+			String schemaLocation = element.getAttribute(ATTR_LOCATION);
+			for (int i = 0; i < includes.length; i++) {
+				ISchemaInclude include = includes[i];
+				ISchema includedSchema = include.getIncludedSchema();
+				try {
+					if (includedSchema == null)
+						continue;
+					String includedSchemaUrl = includedSchema.getURL().toString();
+					String computedUrl = IncludedSchemaDescriptor.computeURL(fSchema.getSchemaDescriptor(), schemaLocation).toString();
+					if (includedSchemaUrl != null && includedSchemaUrl.equals(computedUrl)) {
+						if (!includedSchema.isValid())
+							report(NLS.bind(PDECoreMessages.Builders_Schema_includeNotValid, schemaLocation), getLine(element), CompilerFlags.ERROR, PDEMarkerFactory.CAT_OTHER);
+					}
+				} catch (MalformedURLException e) {
+					// this should not happen since fSchema's URL is valid 
+				}
+			}
+		}
+	}
+
+	private void validateElementReference(Element element) {
+		String value = element.getAttribute(ATTR_REF);
+		if (value != null && value.length() > 0) {
+			ISchemaElement referencedElement = fSchema.findElement(value);
+			if (referencedElement == null) {
+				report(NLS.bind(PDECoreMessages.Builders_Schema_referencedElementNotFound, value), getLine(element), CompilerFlags.ERROR, PDEMarkerFactory.CAT_OTHER);
+			}
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
new file mode 100644
index 0000000..e779e1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java
@@ -0,0 +1,763 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.builders;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jdt.core.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.build.IBuild;
+import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.PDECoreMessages;
+import org.eclipse.pde.internal.core.project.PDEProject;
+
+public class SourceEntryErrorReporter extends BuildErrorReporter {
+
+	private static final String DEF_OUTPUT_ENTRY = PROPERTY_OUTPUT_PREFIX + '.';
+
+	public SourceEntryErrorReporter(IFile file, IBuild model) {
+		super(file);
+		fBuild = model;
+	}
+
+	class ProjectFolder {
+		IPath fPath;
+		String fToken;
+		ArrayList fLibs = new ArrayList(1);
+		String dupeLibName = null;
+
+		public ProjectFolder(IPath path) {
+			fPath = path;
+		}
+
+		public IPath getPath() {
+			return fPath;
+		}
+
+		void setToken(String token) {
+			fToken = token;
+		}
+
+		public String getToken() {
+			if (fToken == null) {
+				return fPath.toString();
+			}
+			return fToken;
+		}
+
+		public void addLib(String libName) {
+			if (fLibs.contains(libName)) {
+				dupeLibName = libName;
+			} else
+				fLibs.add(libName);
+		}
+
+		public ArrayList getLibs() {
+			return fLibs;
+		}
+
+		public String getDupeLibName() {
+			return dupeLibName;
+		}
+	}
+
+	class SourceFolder extends ProjectFolder {
+
+		OutputFolder fOutputFolder;
+
+		/**
+		 * Constructs a source folder with the given project relative path.
+		 * 
+		 * @param path source folder path
+		 * @param outputFolder associated output folder
+		 */
+		public SourceFolder(IPath path, OutputFolder outputFolder) {
+			super(path);
+			fOutputFolder = outputFolder;
+		}
+
+		public OutputFolder getOutputLocation() {
+			return fOutputFolder;
+		}
+
+	}
+
+	class OutputFolder extends ProjectFolder {
+
+		private ArrayList fSourceFolders = new ArrayList();
+		/**
+		 * True when there is no corresponding source - i.e. a class file folder or library
+		 */
+		private boolean fIsLibrary = false;
+
+		/**
+		 * Creates an output folder with the given relative path (relative to the project).
+		 * 
+		 * @param path project relative path
+		 */
+		public OutputFolder(IPath path) {
+			super(path);
+		}
+
+		/**
+		 * Creates an output folder with the given relative path (relative to the project).
+		 * 
+		 * @param path project relative path
+		 * @param isLibrary whether this output folder is a binary location that has no corresponding
+		 *  source folder
+		 */
+		public OutputFolder(IPath path, boolean isLibrary) {
+			this(path);
+			fIsLibrary = isLibrary;
+		}
+
+		public void addSourceFolder(SourceFolder sourceFolder) {
+			if (!fSourceFolders.contains(sourceFolder))
+				fSourceFolders.add(sourceFolder);
+		}
+
+		public boolean isLibrary() {
+			return fIsLibrary;
+		}
+
+		public ArrayList getSourceFolders() {
+			return fSourceFolders;
+		}
+
+	}
+
+	/**
+	 * Represents a default or custom encoding property for a resource
+	 * within a library.
+	 */
+	class EncodingEntry {
+
+		private String fEncoding;
+		private IResource fResource;
+
+		/**
+		 * Constructs an encoding entry for the given resource.
+		 * 
+		 * @param resource resource
+		 * @param encoding the encoding identifier
+		 */
+		EncodingEntry(IResource resource, String encoding) {
+			fEncoding = encoding;
+			fResource = resource;
+		}
+
+		/**
+		 * Returns the explicit encoding for this entry.
+		 * 
+		 * @return explicit encoding
+		 */
+		public String getEncoding() {
+			return fEncoding;
+		}
+
+		/**
+		 * Returns the resource this encoding is associated with.
+		 * 
+		 * @return associated resource 
+		 */
+		public IResource getResource() {
+			return fResource;
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			return getValue();
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			if (obj instanceof EncodingEntry) {
+				EncodingEntry other = (EncodingEntry) obj;
+				return other.fEncoding.equals(fEncoding) && other.fResource.equals(fResource);
+			}
+			return false;
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Object#hashCode()
+		 */
+		public int hashCode() {
+			return fEncoding.hashCode() + fResource.hashCode();
+		}
+
+		/**
+		 * Returns the generated value of this entry for the build.properties file.
+		 * 
+		 * @return value to enter into build.properties
+		 */
+		String getValue() {
+			StringBuffer buf = new StringBuffer();
+			IContainer root = PDEProject.getBundleRoot(fResource.getProject());
+			buf.append(fResource.getFullPath().makeRelativeTo(root.getFullPath()).makeAbsolute());
+			buf.append('[');
+			buf.append(fEncoding);
+			buf.append(']');
+			return buf.toString();
+		}
+
+	}
+
+	/**
+	 * Visits a source folder gathering encodings.
+	 */
+	class Visitor implements IResourceVisitor {
+
+		String[] fLibs = null;
+
+		Visitor(SourceFolder folder) {
+			ArrayList list = folder.getLibs();
+			fLibs = (String[]) list.toArray(new String[list.size()]);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource)
+		 */
+		public boolean visit(IResource resource) throws CoreException {
+			String encoding = null;
+			switch (resource.getType()) {
+				case IResource.FOLDER :
+					encoding = ((IFolder) resource).getDefaultCharset(false);
+					break;
+				case IResource.FILE :
+					IFile file = (IFile) resource;
+					// only worry about .java files
+					if (file.getFileExtension() != null && file.getFileExtension().equals("java")) { //$NON-NLS-1$
+						encoding = file.getCharset(false);
+					}
+					break;
+			}
+			if (encoding != null) {
+				EncodingEntry entry = new EncodingEntry(resource, encoding);
+				for (int i = 0; i < fLibs.length; i++) {
+					String lib = fLibs[i];
+					List encodings = (List) fCustomEncodings.get(lib);
+					if (encodings == null) {
+						encodings = new ArrayList();
+						fCustomEncodings.put(lib, encodings);
+					}
+					encodings.add(entry);
+				}
+			}
+			return true;
+		}
+
+	}
+
+	private HashMap fSourceFolderMap = new HashMap(4);
+	private HashMap fOutputFolderMap = new HashMap(4);
+	private IBuild fBuild = null;
+
+	/**
+	 * Maps library name to default encoding for that library (or not present if there is no
+	 * explicit default encoding specified). 
+	 */
+	Map fDefaultLibraryEncodings = new HashMap();
+
+	/**
+	 * Maps library name to custom {@link EncodingEntry}'s for this library.
+	 */
+	Map fCustomEncodings = new HashMap();
+
+	public void initialize(ArrayList sourceEntries, ArrayList outputEntries, IClasspathEntry[] cpes, IProject project) {
+
+		fProject = project;
+		IPath defaultOutputLocation = null;
+		IJavaProject javaProject = JavaCore.create(fProject);
+		try {
+			defaultOutputLocation = javaProject.getOutputLocation();
+		} catch (JavaModelException e) {
+		}
+
+		List pluginLibraryNames = new ArrayList(1);
+		IPluginModelBase pluginModel = PluginRegistry.findModel(fProject);
+		if (pluginModel != null) {
+			IPluginLibrary[] pluginLibraries = pluginModel.getPluginBase().getLibraries();
+			for (int i = 0; i < pluginLibraries.length; i++) {
+				pluginLibraryNames.add(pluginLibraries[i].getName());
+			}
+		}
+		if (!pluginLibraryNames.contains(".")) { //$NON-NLS-1$
+			pluginLibraryNames.add("."); //$NON-NLS-1$)
+		}
+		for (int i = 0; i < cpes.length; i++) {
+			if (cpes[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+				IPath sourcePath = getPath(cpes[i]);
+				if (sourcePath == null)
+					continue;
+
+				IPath outputLocation = cpes[i].getOutputLocation();
+				if (outputLocation == null)
+					outputLocation = defaultOutputLocation;
+				IPath outputPath = getPath(outputLocation);
+
+				OutputFolder outputFolder = (OutputFolder) fOutputFolderMap.get(outputPath);
+				if (outputFolder == null) {
+					outputFolder = new OutputFolder(outputPath);
+				}
+
+				SourceFolder sourceFolder = (SourceFolder) fSourceFolderMap.get(sourcePath);
+				if (sourceFolder == null) {
+					sourceFolder = new SourceFolder(sourcePath, outputFolder);
+				}
+
+				outputFolder.addSourceFolder(sourceFolder);
+				fOutputFolderMap.put(outputPath, outputFolder);
+				fSourceFolderMap.put(sourcePath, sourceFolder);
+			} else if (cpes[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
+				IClasspathEntry entry = cpes[i];
+				IPackageFragmentRoot[] roots = javaProject.findPackageFragmentRoots(entry);
+				IPath outputPath = null;
+				if (roots.length == 1) { // should only be one entry for a library
+					if (!roots[0].isArchive()) {
+						outputPath = getPath(entry);
+						OutputFolder outputFolder = new OutputFolder(outputPath, true);
+						fOutputFolderMap.put(outputPath, outputFolder);
+					}
+				}
+			}
+		}
+
+		for (Iterator iterator = sourceEntries.iterator(); iterator.hasNext();) {
+			IBuildEntry sourceEntry = (IBuildEntry) iterator.next();
+			String libName = sourceEntry.getName().substring(PROPERTY_SOURCE_PREFIX.length());
+			if (!pluginLibraryNames.contains(libName)) {
+				prepareError(sourceEntry.getName(), null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingLibrary, libName), PDEMarkerFactory.B_REMOVAL, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
+			}
+			String[] tokens = sourceEntry.getTokens();
+			for (int i = 0; i < tokens.length; i++) {
+				IPath path = new Path(tokens[i]).addTrailingSeparator();
+				SourceFolder sourceFolder = (SourceFolder) fSourceFolderMap.get(path);
+				if (sourceFolder == null) {
+					sourceFolder = new SourceFolder(path, null);
+					fSourceFolderMap.put(path, sourceFolder);
+				}
+				sourceFolder.setToken(tokens[i]);
+				sourceFolder.addLib(libName);
+			}
+		}
+
+		for (Iterator iterator = outputEntries.iterator(); iterator.hasNext();) {
+			IBuildEntry outputEntry = (IBuildEntry) iterator.next();
+			String libName = outputEntry.getName().substring(PROPERTY_OUTPUT_PREFIX.length());
+			if (!pluginLibraryNames.contains(libName)) {
+				prepareError(outputEntry.getName(), null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingLibrary, libName), PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+			}
+			String[] tokens = outputEntry.getTokens();
+			for (int i = 0; i < tokens.length; i++) {
+				IPath path = new Path(tokens[i]).addTrailingSeparator();
+				if (path.segmentCount() == 1 && path.segment(0).equals(".")) { //$NON-NLS-1$
+					// translate "." to root path
+					path = Path.ROOT;
+				}
+				OutputFolder outputFolder = (OutputFolder) fOutputFolderMap.get(path);
+				if (outputFolder == null) {
+					outputFolder = new OutputFolder(path);
+					fOutputFolderMap.put(path, outputFolder);
+				}
+				outputFolder.setToken(tokens[i]);
+				outputFolder.addLib(libName);
+			}
+		}
+	}
+
+	private IPath getPath(Object entry) {
+		IPath path = null;
+		if (entry instanceof IClasspathEntry) {
+			IClasspathEntry cpes = (IClasspathEntry) entry;
+			path = cpes.getPath();
+		} else if (entry instanceof IPath) {
+			path = (IPath) entry;
+		}
+		if (path.matchingFirstSegments(fProject.getFullPath()) > 0) {
+			path = path.removeFirstSegments(1);
+		}
+		if (path != null) {
+			return path.addTrailingSeparator();
+		}
+		return null;
+	}
+
+	public void validate() {
+
+		for (Iterator iterator = fOutputFolderMap.keySet().iterator(); iterator.hasNext();) {
+			IPath outputPath = (IPath) iterator.next();
+			OutputFolder outputFolder = (OutputFolder) fOutputFolderMap.get(outputPath);
+			ArrayList sourceFolders = outputFolder.getSourceFolders();
+			ArrayList outputFolderLibs = new ArrayList(outputFolder.getLibs());
+
+			if (sourceFolders.size() == 0) {
+				if (!outputFolder.isLibrary()) {
+					// report error - invalid output folder				
+					for (Iterator libNameiterator = outputFolderLibs.iterator(); libNameiterator.hasNext();) {
+						String libName = (String) libNameiterator.next();
+						IResource folderEntry = fProject.findMember(outputPath);
+						String message;
+						if (folderEntry == null || !folderEntry.exists() || !(folderEntry instanceof IContainer))
+							message = NLS.bind(PDECoreMessages.BuildErrorReporter_missingFolder, outputPath.toString());
+						else
+							message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_InvalidOutputFolder, outputPath.toString());
+						prepareError(PROPERTY_OUTPUT_PREFIX + libName, outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+					}
+				} else {
+					if (outputFolderLibs.size() == 0) {
+						//class folder does not have an output.<library> entry
+						IPluginModelBase model = PluginRegistry.findModel(fProject);
+						IPluginLibrary[] libs = model.getPluginBase().getLibraries();
+						String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingOutputLibForClassFolder, outputPath.toString());
+						if (libs.length > 0) {
+							prepareError(PROPERTY_OUTPUT_PREFIX, null, message, PDEMarkerFactory.NO_RESOLUTION, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+						} else {
+							prepareError(DEF_OUTPUT_ENTRY, outputPath.toString(), message, PDEMarkerFactory.B_ADDITION, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+						}
+
+					}
+				}
+			} else {
+				String srcFolderLibName = null;
+
+				for (int i = 0; i < sourceFolders.size(); i++) {
+					SourceFolder sourceFolder = (SourceFolder) sourceFolders.get(i);
+					ArrayList srcFolderLibs = sourceFolder.getLibs();
+					outputFolderLibs.removeAll(srcFolderLibs);
+					switch (srcFolderLibs.size()) {
+						case 0 :
+							//error - src folder with no lib
+							//do nothing. already caught in super
+							break;
+						case 1 :
+							if (srcFolderLibName == null) {
+								srcFolderLibName = (String) srcFolderLibs.get(0);
+								break;
+							} else if (srcFolderLibName.equals(srcFolderLibs.get(0))) {
+								break;
+							}
+						default :
+							//error - targeted to diff libs
+							String erringSrcFolders = join((SourceFolder[]) sourceFolders.toArray(new SourceFolder[sourceFolders.size()]));
+							for (int j = 0; j < sourceFolders.size(); j++) {
+								SourceFolder srcFolder = (SourceFolder) sourceFolders.get(j);
+								for (int k = 0; k < srcFolder.getLibs().size(); k++) {
+									String libName = (String) srcFolder.getLibs().get(k);
+									String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DifferentTargetLibrary, erringSrcFolders);
+									prepareError(PROPERTY_SOURCE_PREFIX + libName, srcFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
+								}
+							}
+					}
+				}
+				for (int i = 0; i < outputFolderLibs.size(); i++) {
+					String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_ExtraOutputFolder, outputFolder.getPath().toString(), PROPERTY_SOURCE_PREFIX + outputFolderLibs.get(i));
+					prepareError(PROPERTY_OUTPUT_PREFIX + outputFolderLibs.get(i), outputFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+				}
+
+				if (outputFolder.getDupeLibName() != null) {
+					String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DupeOutputFolder, outputPath.toString(), PROPERTY_OUTPUT_PREFIX + outputFolder.getDupeLibName());
+					prepareError(PROPERTY_OUTPUT_PREFIX + outputFolder.getDupeLibName(), outputFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fOututLibSeverity, PDEMarkerFactory.CAT_OTHER);
+				}
+			}
+		}
+
+		HashMap missingOutputEntryErrors = new HashMap(4);
+		class MissingOutputEntry {
+			private List fSrcFolders = new ArrayList(1);
+			private List fOutputFolders = new ArrayList(1);
+
+			public String getOutputList() {
+				return generateList(fOutputFolders);
+			}
+
+			public String getSourceList() {
+				return generateList(fSrcFolders);
+			}
+
+			private String generateList(List strings) {
+				StringBuffer buffer = new StringBuffer();
+				Iterator iterator = strings.iterator();
+				while (iterator.hasNext()) {
+					String next = (String) iterator.next();
+					buffer.append(next);
+					if (iterator.hasNext()) {
+						buffer.append(',');
+						buffer.append(' ');
+					}
+				}
+				return buffer.toString();
+			}
+
+			public void addSrcFolder(String sourcePath) {
+				if (!fSrcFolders.contains(sourcePath)) {
+					fSrcFolders.add(sourcePath);
+				}
+			}
+
+			public void addOutputFolder(String outputPath) {
+				if (!fOutputFolders.contains(outputPath)) {
+					fOutputFolders.add(outputPath);
+				}
+			}
+		}
+
+		List toValidate = new ArrayList(); // list of source folders to perform encoding validation on
+		for (Iterator iterator = fSourceFolderMap.keySet().iterator(); iterator.hasNext();) {
+			IPath sourcePath = (IPath) iterator.next();
+			SourceFolder sourceFolder = (SourceFolder) fSourceFolderMap.get(sourcePath);
+			OutputFolder outputFolder = sourceFolder.getOutputLocation();
+
+			if (outputFolder == null) {
+				//error - not a src folder
+				IResource folderEntry = fProject.findMember(sourcePath);
+				String message;
+				if (folderEntry == null || !folderEntry.exists() || !(folderEntry instanceof IContainer))
+					message = NLS.bind(PDECoreMessages.BuildErrorReporter_missingFolder, sourcePath.toString());
+				else
+					message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_InvalidSourceFolder, sourcePath.toString());
+
+				ArrayList srcLibs = sourceFolder.getLibs();
+				for (int i = 0; i < srcLibs.size(); i++) {
+					String libName = (String) srcLibs.get(i);
+					prepareError(PROPERTY_SOURCE_PREFIX + libName, sourceFolder.getToken(), message, PDEMarkerFactory.B_REMOVAL, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
+				}
+			} else {
+				if (outputFolder.getLibs().size() == 0 && sourceFolder.getLibs().size() == 1) {
+					//error - missing output folder
+
+					String libName = (String) sourceFolder.getLibs().get(0);
+					MissingOutputEntry errorEntry = (MissingOutputEntry) missingOutputEntryErrors.get(libName);
+					if (errorEntry == null)
+						errorEntry = new MissingOutputEntry();
+
+					errorEntry.addSrcFolder(sourcePath.toString());
+					errorEntry.addOutputFolder(outputFolder.getToken());
+
+					missingOutputEntryErrors.put(libName, errorEntry);
+				}
+
+				if (sourceFolder.getDupeLibName() != null) {
+					String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_DupeSourceFolder, sourcePath.toString(), PROPERTY_SOURCE_PREFIX + sourceFolder.getDupeLibName());
+					prepareError(PROPERTY_SOURCE_PREFIX + sourceFolder.getDupeLibName(), sourceFolder.getToken(), message, PDEMarkerFactory.NO_RESOLUTION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER);
+				}
+
+				toValidate.add(sourceFolder);
+			}
+		}
+
+		for (Iterator iter = missingOutputEntryErrors.keySet().iterator(); iter.hasNext();) {
+			String libName = (String) iter.next();
+			MissingOutputEntry errorEntry = (MissingOutputEntry) missingOutputEntryErrors.get(libName);
+			String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingOutputEntry, errorEntry.getSourceList(), PROPERTY_OUTPUT_PREFIX + libName);
+			prepareError(PROPERTY_OUTPUT_PREFIX + libName, errorEntry.getOutputList(), message, PDEMarkerFactory.B_ADDITION, fMissingOutputLibSeverity, PDEMarkerFactory.CAT_OTHER);
+		}
+
+		// validate workspace encodings with those specified in build.properties
+
+		if (fEncodingSeverity == CompilerFlags.ERROR || fEncodingSeverity == CompilerFlags.WARNING) {
+			// build map of expected encodings
+			Iterator iterator = toValidate.iterator();
+			while (iterator.hasNext()) {
+				SourceFolder sourceFolder = (SourceFolder) iterator.next();
+				IPath sourcePath = sourceFolder.getPath();
+				IContainer container = fProject;
+				if (!sourcePath.isEmpty() && !sourcePath.isRoot()) {
+					container = container.getFolder(sourcePath);
+				}
+				try {
+					ArrayList list = sourceFolder.getLibs();
+					String[] libs = (String[]) list.toArray(new String[list.size()]);
+					String encoding = getExplicitEncoding(container);
+					if (encoding != null) {
+						for (int i = 0; i < libs.length; i++) {
+							fDefaultLibraryEncodings.put(libs[i], encoding);
+						}
+					}
+					container.accept(new Visitor(sourceFolder));
+				} catch (CoreException e) {
+					// Can't validate if unable to retrieve encoding
+					PDECore.log(e);
+				}
+
+			}
+
+			// Compare to encodings specified in build.properties (if any)
+			IBuildEntry[] entries = fBuild.getBuildEntries();
+			for (int i = 0; i < entries.length; i++) {
+				IBuildEntry entry = entries[i];
+				String name = entry.getName();
+				if (name.startsWith(PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX)) {
+					String lib = name.substring(PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX.length());
+					String[] tokens = entry.getTokens();
+					if (tokens.length > 0) {
+						if (tokens.length == 1) {
+							// compare
+							String specified = tokens[0];
+							String expected = (String) fDefaultLibraryEncodings.remove(lib);
+							if (expected != null) {
+								if (!specified.equals(expected)) {
+									prepareError(name, specified, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_0, new String[] {expected, specified, lib}), PDEMarkerFactory.NO_RESOLUTION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+								}
+							} else {
+								// encoding is specified, but workspace does not specify one
+								prepareError(name, null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_1, new String[] {specified, lib}), PDEMarkerFactory.B_REMOVAL, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+							}
+						} else {
+							// syntax error
+							fDefaultLibraryEncodings.remove(lib);
+							prepareError(name, null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_2, lib), PDEMarkerFactory.NO_RESOLUTION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+						}
+					}
+				} else if (name.startsWith(PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX)) {
+					IContainer bundleRoot = PDEProject.getBundleRoot(fProject);
+					String lib = name.substring(PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX.length());
+					String[] tokens = entry.getTokens();
+					if (tokens.length > 0) {
+						List encodings = new ArrayList();
+						for (int j = 0; j < tokens.length; j++) {
+							String special = tokens[j];
+							int index = special.indexOf('[');
+							if (index >= 0 && special.endsWith("]")) { //$NON-NLS-1$
+								String path = special.substring(0, index);
+								String encoding = special.substring(index + 1, special.length() - 1);
+								IResource member = bundleRoot.findMember(path);
+								if (member == null) {
+									// error - missing resource
+									String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_3, new String[] {encoding, path});
+									prepareError(name, special, message, PDEMarkerFactory.B_REMOVAL, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+								} else {
+									encodings.add(new EncodingEntry(member, encoding));
+								}
+							} else {
+								// syntax error - invalid
+								String message = PDECoreMessages.SourceEntryErrorReporter_4;
+								prepareError(name, special, message, PDEMarkerFactory.NO_RESOLUTION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+							}
+						}
+						// compare with workspace encodings
+						List workspace = (List) fCustomEncodings.remove(lib);
+						if (workspace == null) {
+							prepareError(name, null, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_5, lib), PDEMarkerFactory.B_REMOVAL, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+						} else {
+							Map map = new HashMap();
+							Iterator iter = workspace.iterator();
+							while (iter.hasNext()) {
+								EncodingEntry ee = (EncodingEntry) iter.next();
+								map.put(ee.getResource(), ee.getEncoding());
+							}
+							iter = encodings.iterator();
+							while (iter.hasNext()) {
+								EncodingEntry ee = (EncodingEntry) iter.next();
+								String specified = ee.getEncoding();
+								String expected = (String) map.remove(ee.getResource());
+								if (expected == null) {
+									prepareError(name, ee.getValue(), NLS.bind(PDECoreMessages.SourceEntryErrorReporter_6, new String[] {expected, ee.getResource().getProjectRelativePath().toString()}), PDEMarkerFactory.B_REMOVAL, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+								} else {
+									if (!specified.equals(expected)) {
+										prepareError(name, ee.getValue(), NLS.bind(PDECoreMessages.SourceEntryErrorReporter_7, new String[] {expected, ee.getResource().getProjectRelativePath().toString(), specified}), PDEMarkerFactory.NO_RESOLUTION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+									}
+								}
+							}
+							// anything left in the workspace map?
+							if (!map.isEmpty()) {
+								iter = map.entrySet().iterator();
+								while (iter.hasNext()) {
+									Entry en = (Entry) iter.next();
+									IResource res = (IResource) en.getKey();
+									String expected = (String) en.getValue();
+									EncodingEntry missing = new EncodingEntry(res, expected);
+									String m = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_8, new String[] {expected, res.getProjectRelativePath().toString()});
+									prepareError(name, missing.getValue(), m, PDEMarkerFactory.B_ADDITION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+								}
+							}
+						}
+					}
+
+				}
+			}
+
+			// check for unspecified default encodings
+			Iterator iter = fDefaultLibraryEncodings.entrySet().iterator();
+			while (iter.hasNext()) {
+				Entry entry = (Entry) iter.next();
+				String lib = (String) entry.getKey();
+				String expected = (String) entry.getValue();
+				prepareError(PROPERTY_JAVAC_DEFAULT_ENCODING_PREFIX + lib, expected, NLS.bind(PDECoreMessages.SourceEntryErrorReporter_9, new String[] {expected, lib}), PDEMarkerFactory.B_ADDITION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+			}
+
+			// check for unspecified custom encodings
+			iter = fCustomEncodings.entrySet().iterator();
+			while (iter.hasNext()) {
+				Entry entry = (Entry) iter.next();
+				String lib = (String) entry.getKey();
+				List encodings = (List) entry.getValue();
+				Iterator iterator2 = encodings.iterator();
+				while (iterator2.hasNext()) {
+					EncodingEntry encoding = (EncodingEntry) iterator2.next();
+					String m = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_10, new String[] {encoding.getEncoding(), encoding.getResource().getProjectRelativePath().toString()});
+					prepareError(PROPERTY_JAVAC_CUSTOM_ENCODINGS_PREFIX + lib, encoding.getValue(), m, PDEMarkerFactory.B_ADDITION, fEncodingSeverity, PDEMarkerFactory.CAT_OTHER);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns any explicit encoding set on the given container or one of its parents
+	 * up to and including its project.
+	 * 
+	 * @param container container
+	 * @return any explicit encoding or <code>null</code> if none
+	 * @throws CoreException
+	 */
+	private String getExplicitEncoding(IContainer container) throws CoreException {
+		String encoding = container.getDefaultCharset(false);
+		if (encoding == null) {
+			IContainer parent = container.getParent();
+			if (parent != null) {
+				switch (parent.getType()) {
+					case IResource.FOLDER :
+						return getExplicitEncoding(parent);
+					case IResource.PROJECT :
+						return getExplicitEncoding(parent);
+					default :
+						// don't consider workspace encoding
+						return null;
+				}
+			}
+		}
+		return encoding;
+	}
+
+	private String join(ProjectFolder[] folders) {
+		StringBuffer result = new StringBuffer();
+		for (int i = 0; i < folders.length; i++) {
+			String text = folders[i].getPath().toString().trim();
+			if (text.length() > 0) {
+				result.append(text);
+				result.append(',');
+			}
+		}
+		result.deleteCharAt(result.length() - 1);
+		return result.toString();
+	}
+
+	public ArrayList getProblemList() {
+		return fProblemList;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
index 5201227..49d79a2 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/Bundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,8 @@ public class Bundle extends BundleObject implements IBundle {
 		if (fProperties == null)
 			fProperties = new HeaderMap();//TreeMap(new HeaderComparator());
 		Object oldValue = fProperties.get(key);
-		if (value == null || value.trim().length() == 0)
+		// an empty string removes the header whereas a non-zero length string with spaces is used to generate an empty header
+		if (value == null || value.length() == 0)
 			fProperties.remove(key);
 		else
 			fProperties.put(key, value);
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
index 42bf529..bacd61d 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundleModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,18 +12,16 @@ package org.eclipse.pde.internal.core.bundle;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Map;
 import java.util.Properties;
-
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.HostSpecification;
 import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.pde.core.IModelChangedEvent;
 import org.eclipse.pde.core.ModelChangedEvent;
-import org.eclipse.pde.internal.core.AbstractModel;
-import org.eclipse.pde.internal.core.ICoreConstants;
-import org.eclipse.pde.internal.core.PDEState;
-import org.eclipse.pde.internal.core.ibundle.IBundle;
-import org.eclipse.pde.internal.core.ibundle.IBundleModel;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.text.bundle.BundleModelFactory;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;
 
@@ -60,6 +58,20 @@ public abstract class BundleModel extends AbstractModel implements IBundleModel
 			if (!outOfSync)
 				updateTimeStamp();
 			setLoaded(true);
+			// format headers
+			BundleModelFactory factory = new BundleModelFactory(this);
+			Map headers = fBundle.getHeaders();
+			Object[] keys = headers.keySet().toArray();
+			for (int i = 0; i < keys.length; i++) {
+				String key = (String) keys[i];
+				String value = (String) headers.get(key);
+				IManifestHeader header = factory.createHeader(key, value);
+				header.update();
+				String formatted = header.getValue();
+				if (formatted != null && formatted.trim().length() > 0) {
+					fBundle.setHeader(key, formatted);
+				}
+			}
 		} catch (BundleException e) {
 		} catch (IOException e) {
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundlePluginBase.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundlePluginBase.java
index e0ed0b8..a417d94 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundlePluginBase.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/BundlePluginBase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,17 +13,39 @@ package org.eclipse.pde.internal.core.bundle;
 import java.io.PrintWriter;
 import java.io.Serializable;
 import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.BundleSpecification;
 import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.pde.core.*;
+import org.eclipse.pde.core.IIdentifiable;
+import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.core.ModelChangedEvent;
 import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.ibundle.*;
-import org.eclipse.pde.internal.core.plugin.*;
-import org.eclipse.pde.internal.core.text.bundle.*;
-import org.osgi.framework.*;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.PDECoreMessages;
+import org.eclipse.pde.internal.core.PDEStateHelper;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.ibundle.IBundle;
+import org.eclipse.pde.internal.core.ibundle.IBundleModel;
+import org.eclipse.pde.internal.core.ibundle.IBundlePluginBase;
+import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
+import org.eclipse.pde.internal.core.plugin.AbstractExtensions;
+import org.eclipse.pde.internal.core.plugin.PluginImport;
+import org.eclipse.pde.internal.core.plugin.PluginLibrary;
+import org.eclipse.pde.internal.core.text.bundle.BundleClasspathHeader;
+import org.eclipse.pde.internal.core.text.bundle.BundleNameHeader;
+import org.eclipse.pde.internal.core.text.bundle.BundleSymbolicNameHeader;
+import org.eclipse.pde.internal.core.text.bundle.BundleVendorHeader;
+import org.eclipse.pde.internal.core.text.bundle.BundleVersionHeader;
+import org.eclipse.pde.internal.core.text.bundle.RequireBundleHeader;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
 
 public class BundlePluginBase extends PlatformObject implements IBundlePluginBase, Serializable {
 
@@ -138,6 +160,44 @@ public class BundlePluginBase extends PlatformObject implements IBundlePluginBas
 		getBundle().setHeader(Constants.BUNDLE_CLASSPATH, buffer.toString());
 	}
 
+	/**
+	 * Removes the specified library from the given 'Bundle-Classpath' header.
+	 * 
+	 * @param library library to remove
+	 * @param header header to update
+	 */
+	private void removeLibrary(IPluginLibrary library, IManifestHeader header) {
+		String value = header == null ? null : header.getValue();
+		String name = library.getName();
+		int index = value.indexOf(name);
+		if (index >= 0) {
+			// copy up to the removed library
+			StringBuffer buffer = new StringBuffer();
+			for (int i = 0; i > index; i++) {
+				buffer.append(value.charAt(i));
+			}
+			int after = index + name.length();
+			// delete (skip) comma
+			if (after < value.length()) {
+				while (value.charAt(after) == ',') {
+					after++;
+				}
+			}
+			// delete (skip) whitespace
+			if (after < value.length()) {
+				while (Character.isWhitespace(value.charAt(after))) {
+					after++;
+				}
+			}
+			// keep everything else
+			while (after < value.length()) {
+				buffer.append(value.charAt(after));
+				after++;
+			}
+			getBundle().setHeader(Constants.BUNDLE_CLASSPATH, buffer.toString());
+		}
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -147,9 +207,11 @@ public class BundlePluginBase extends PlatformObject implements IBundlePluginBas
 		ensureModelEditable();
 		if (libraries != null) {
 			libraries.remove(library);
-			Object header = getManifestHeader(Constants.BUNDLE_CLASSPATH);
+			IManifestHeader header = getManifestHeader(Constants.BUNDLE_CLASSPATH);
 			if (header instanceof BundleClasspathHeader) {
 				((BundleClasspathHeader) header).removeLibrary(library.getName());
+			} else if (header != null) {
+				removeLibrary(library, header);
 			}
 			fireStructureChanged(library, false);
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundleModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundleModel.java
index bca6c94..b20fec9 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundleModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundleModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -143,6 +143,7 @@ public class WorkspaceBundleModel extends BundleModel implements IEditableModel
 				fUnderlyingResource.create(stream, false, null);
 			}
 			stream.close();
+			setLoaded(true);
 		} catch (CoreException e) {
 			PDECore.logException(e);
 		} catch (IOException e) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundlePluginModelBase.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundlePluginModelBase.java
index 5c4e5de..25b666c 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundlePluginModelBase.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/bundle/WorkspaceBundlePluginModelBase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@ public abstract class WorkspaceBundlePluginModelBase extends WorkspacePluginMode
 	public IBundleModel getBundleModel() {
 		if (fBundleModel == null) {
 			IFile file = (IFile) getUnderlyingResource();
-			fBundleModel = new WorkspaceBundleModel((IFile) getUnderlyingResource());
+			fBundleModel = new WorkspaceBundleModel(file);
 			if (file.exists()) {
 				try {
 					fBundleModel.load();
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/content/DefaultDocumentFactory.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/content/DefaultDocumentFactory.java
new file mode 100644
index 0000000..b15618f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/content/DefaultDocumentFactory.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Markus Schorn - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.content;
+
+import org.eclipse.core.filebuffers.*;
+import org.eclipse.jface.text.IDocument;
+
+public class DefaultDocumentFactory implements IDocumentFactory {
+
+	/**
+	 * Just ensures, that the default document is created.
+	 * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=307524
+	 */
+	public IDocument createDocument() {
+		return FileBuffers.getTextFileBufferManager().createEmptyDocument(null, LocationKind.LOCATION);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PDEPluginConverter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PDEPluginConverter.java
index cee06e5..4ab9ab6 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PDEPluginConverter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PDEPluginConverter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
 import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.osgi.framework.BundleException;
 
 public class PDEPluginConverter {
@@ -29,7 +29,7 @@ public class PDEPluginConverter {
 
 	public static void convertToOSGIFormat(IProject project, String target, Dictionary dictionary, HashMap newProps, IProgressMonitor monitor) throws CoreException {
 		try {
-			File outputFile = new File(project.getLocation().append(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR).toOSString());
+			File outputFile = new File(PDEProject.getManifest(project).getLocation().toOSString());
 			File inputFile = new File(project.getLocation().toOSString());
 			PluginConverter converter = PluginConverter.getDefault();
 			converter.convertManifest(inputFile, outputFile, false, target, true, dictionary);
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PluginConverter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PluginConverter.java
index a772e43..869aaea 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PluginConverter.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/converter/PluginConverter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.build.Build;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.converter.PluginConverterParser.PluginInfo;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.osgi.framework.*;
 
 public class PluginConverter {
@@ -41,8 +42,6 @@ public class PluginConverter {
 	/** bundle manifest type jared bundle */
 	static public final byte MANIFEST_TYPE_JAR = 0x08;
 
-	public static final String OSGI_BUNDLE_MANIFEST = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
-
 	private static final String SEMICOLON = "; "; //$NON-NLS-1$
 	private static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
 	public static final String LIST_SEPARATOR = ",\n "; //$NON-NLS-1$
@@ -60,12 +59,10 @@ public class PluginConverter {
 	private static final String MANIFEST_VERSION = "Manifest-Version"; //$NON-NLS-1$
 	private static final String PLUGIN_PROPERTIES_FILENAME = "plugin"; //$NON-NLS-1$
 	private static PluginConverter instance;
-	static public final String FRAGMENT_MANIFEST = "fragment.xml"; //$NON-NLS-1$
 	static public final String GENERATED_FROM = "Generated-from"; //$NON-NLS-1$
 	static public final String MANIFEST_TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
 	protected static final String PI_BOOT = "org.eclipse.core.boot"; //$NON-NLS-1$
 	protected static final String PI_RUNTIME_COMPATIBILITY = "org.eclipse.core.runtime.compatibility"; //$NON-NLS-1$
-	static public final String PLUGIN_MANIFEST = "plugin.xml"; //$NON-NLS-1$
 	private static final String COMPATIBILITY_ACTIVATOR = "org.eclipse.core.internal.compatibility.PluginActivator"; //$NON-NLS-1$
 	private static final String SOURCE_PREFIX = "source."; //$NON-NLS-1$
 
@@ -119,7 +116,7 @@ public class PluginConverter {
 			//this can't happen since we are building the urls ourselves from a file
 		}
 		try {
-			xmlFileLocation = new URL(baseURL, PLUGIN_MANIFEST);
+			xmlFileLocation = new URL(baseURL, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
 			stream = xmlFileLocation.openStream();
 			manifestType |= MANIFEST_TYPE_PLUGIN;
 			return xmlFileLocation;
@@ -136,7 +133,7 @@ public class PluginConverter {
 			}
 		}
 		try {
-			xmlFileLocation = new URL(baseURL, FRAGMENT_MANIFEST);
+			xmlFileLocation = new URL(baseURL, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
 			stream = xmlFileLocation.openStream();
 			manifestType |= MANIFEST_TYPE_FRAGMENT;
 			return xmlFileLocation;
@@ -376,7 +373,7 @@ public class PluginConverter {
 	}
 
 	public Set getExports(IProject proj, Map libs) {
-		IFile buildProperties = proj.getFile("build.properties"); //$NON-NLS-1$
+		IFile buildProperties = PDEProject.getBuildProperties(proj);
 		IBuild build = null;
 		if (buildProperties != null) {
 			WorkspaceBuildModel buildModel = new WorkspaceBuildModel(buildProperties);
@@ -511,11 +508,11 @@ public class PluginConverter {
 		if ((manifestType & MANIFEST_TYPE_JAR) != 0)
 			return pluginLocation.lastModified();
 		else if ((manifestType & MANIFEST_TYPE_PLUGIN) != 0)
-			return new File(pluginLocation, PLUGIN_MANIFEST).lastModified();
+			return new File(pluginLocation, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR).lastModified();
 		else if ((manifestType & MANIFEST_TYPE_FRAGMENT) != 0)
-			return new File(pluginLocation, FRAGMENT_MANIFEST).lastModified();
+			return new File(pluginLocation, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR).lastModified();
 		else if ((manifestType & MANIFEST_TYPE_BUNDLE) != 0)
-			return new File(pluginLocation, OSGI_BUNDLE_MANIFEST).lastModified();
+			return new File(pluginLocation, ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR).lastModified();
 		return -1;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureBasedExportOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureBasedExportOperation.java
index 82fa817..84b858f 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureBasedExportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureBasedExportOperation.java
@@ -1,124 +1,123 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.core.exports;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.pde.core.IModel;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.TargetPlatform;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.PDECoreMessages;
-import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-
-public abstract class FeatureBasedExportOperation extends FeatureExportOperation {
-
-	protected String fFeatureLocation;
-
-	public FeatureBasedExportOperation(FeatureExportInfo info, String name) {
-		super(info, name);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#run(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected IStatus run(IProgressMonitor monitor) {
-		try {
-			createDestination();
-			monitor.beginTask("Exporting...", 33); //$NON-NLS-1$
-			// create a feature to contain all plug-ins
-			String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
-			fFeatureLocation = fBuildTempLocation + File.separator + featureID;
-			String[][] config = new String[][] {{TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL()}};
-			createFeature(featureID, fFeatureLocation, config, false);
-			createBuildPropertiesFile(fFeatureLocation);
-			if (fInfo.useJarFormat)
-				createPostProcessingFiles();
-			IStatus status = testBuildWorkspaceBeforeExport(new SubProgressMonitor(monitor, 10));
-			doExport(featureID, null, fFeatureLocation, config, new SubProgressMonitor(monitor, 20));
-			if (monitor.isCanceled()) {
-				return Status.CANCEL_STATUS;
-			}
-			return status;
-		} catch (IOException e) {
-			return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e);
-		} catch (CoreException e) {
-			return e.getStatus();
-		} catch (InvocationTargetException e) {
-			return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e.getTargetException());
-		} finally {
-			for (int i = 0; i < fInfo.items.length; i++) {
-				if (fInfo.items[i] instanceof IModel)
-					try {
-						deleteBuildFiles(fInfo.items[i]);
-					} catch (CoreException e) {
-						PDECore.log(e);
-					}
-			}
-			cleanup(null, new SubProgressMonitor(monitor, 3));
-			monitor.done();
-		}
-	}
-
-	protected abstract void createPostProcessingFiles();
-
-	protected String[] getPaths() {
-		String[] paths = super.getPaths();
-		String[] all = new String[paths.length + 1];
-		all[0] = fFeatureLocation + File.separator + "feature.xml"; //$NON-NLS-1$
-		System.arraycopy(paths, 0, all, 1, paths.length);
-		return all;
-	}
-
-	private void createBuildPropertiesFile(String featureLocation) {
-		File file = new File(featureLocation);
-		if (!file.exists() || !file.isDirectory())
-			file.mkdirs();
-		Properties prop = new Properties();
-		prop.put("pde", "marker"); //$NON-NLS-1$ //$NON-NLS-2$
-
-		if (fInfo.exportSource && fInfo.exportSourceBundle) {
-			prop.put("individualSourceBundles", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-			Dictionary environment = new Hashtable(4);
-			environment.put("osgi.os", TargetPlatform.getOS()); //$NON-NLS-1$
-			environment.put("osgi.ws", TargetPlatform.getWS()); //$NON-NLS-1$
-			environment.put("osgi.arch", TargetPlatform.getOSArch()); //$NON-NLS-1$
-			environment.put("osgi.nl", TargetPlatform.getNL()); //$NON-NLS-1$
-
-			for (int i = 0; i < fInfo.items.length; i++) {
-				if (fInfo.items[i] instanceof IFeatureModel) {
-					IFeature feature = ((IFeatureModel) fInfo.items[i]).getFeature();
-					prop.put("generate.feature@" + feature.getId() + ".source", feature.getId()); //$NON-NLS-1$ //$NON-NLS-2$
-				} else {
-					BundleDescription bundle = null;
-					if (fInfo.items[i] instanceof IPluginModelBase) {
-						bundle = ((IPluginModelBase) fInfo.items[i]).getBundleDescription();
-					}
-					if (bundle == null) {
-						if (fInfo.items[i] instanceof BundleDescription)
-							bundle = (BundleDescription) fInfo.items[i];
-					}
-					if (bundle == null)
-						continue;
-					if (shouldAddPlugin(bundle, environment)) {
-						prop.put("generate.plugin@" + bundle.getSymbolicName() + ".source", bundle.getSymbolicName()); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-				}
-			}
-		}
-		save(new File(file, "build.properties"), prop, "Marker File"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-}
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.exports;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.core.IModel;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.IFeature;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+
+public abstract class FeatureBasedExportOperation extends FeatureExportOperation {
+
+	protected String fFeatureLocation;
+
+	public FeatureBasedExportOperation(FeatureExportInfo info, String name) {
+		super(info, name);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		try {
+			createDestination();
+			monitor.beginTask("Exporting...", 33); //$NON-NLS-1$
+			// create a feature to contain all plug-ins
+			String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
+			fFeatureLocation = fBuildTempLocation + File.separator + featureID;
+			String[][] config = new String[][] {{TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL()}};
+			createFeature(featureID, fFeatureLocation, config, false);
+			createBuildPropertiesFile(fFeatureLocation);
+			if (fInfo.useJarFormat)
+				createPostProcessingFiles();
+			IStatus status = testBuildWorkspaceBeforeExport(new SubProgressMonitor(monitor, 10));
+			doExport(featureID, null, fFeatureLocation, config, new SubProgressMonitor(monitor, 20));
+			if (monitor.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+			return status;
+		} catch (IOException e) {
+			return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e);
+		} catch (CoreException e) {
+			return e.getStatus();
+		} catch (InvocationTargetException e) {
+			return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e.getTargetException());
+		} finally {
+			for (int i = 0; i < fInfo.items.length; i++) {
+				if (fInfo.items[i] instanceof IModel)
+					try {
+						deleteBuildFiles(fInfo.items[i]);
+					} catch (CoreException e) {
+						PDECore.log(e);
+					}
+			}
+			cleanup(null, new SubProgressMonitor(monitor, 3));
+			monitor.done();
+		}
+	}
+
+	protected abstract void createPostProcessingFiles();
+
+	protected String[] getPaths() {
+		String[] paths = super.getPaths();
+		String[] all = new String[paths.length + 1];
+		all[0] = fFeatureLocation + File.separator + ICoreConstants.FEATURE_FILENAME_DESCRIPTOR;
+		System.arraycopy(paths, 0, all, 1, paths.length);
+		return all;
+	}
+
+	private void createBuildPropertiesFile(String featureLocation) {
+		File file = new File(featureLocation);
+		if (!file.exists() || !file.isDirectory())
+			file.mkdirs();
+		Properties prop = new Properties();
+		prop.put("pde", "marker"); //$NON-NLS-1$ //$NON-NLS-2$
+
+		if (fInfo.exportSource && fInfo.exportSourceBundle) {
+			prop.put("individualSourceBundles", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+			Dictionary environment = new Hashtable(4);
+			environment.put("osgi.os", TargetPlatform.getOS()); //$NON-NLS-1$
+			environment.put("osgi.ws", TargetPlatform.getWS()); //$NON-NLS-1$
+			environment.put("osgi.arch", TargetPlatform.getOSArch()); //$NON-NLS-1$
+			environment.put("osgi.nl", TargetPlatform.getNL()); //$NON-NLS-1$
+
+			for (int i = 0; i < fInfo.items.length; i++) {
+				if (fInfo.items[i] instanceof IFeatureModel) {
+					IFeature feature = ((IFeatureModel) fInfo.items[i]).getFeature();
+					prop.put("generate.feature@" + feature.getId() + ".source", feature.getId()); //$NON-NLS-1$ //$NON-NLS-2$
+				} else {
+					BundleDescription bundle = null;
+					if (fInfo.items[i] instanceof IPluginModelBase) {
+						bundle = ((IPluginModelBase) fInfo.items[i]).getBundleDescription();
+					}
+					if (bundle == null) {
+						if (fInfo.items[i] instanceof BundleDescription)
+							bundle = (BundleDescription) fInfo.items[i];
+					}
+					if (bundle == null)
+						continue;
+					if (shouldAddPlugin(bundle, environment)) {
+						prop.put("generate.plugin@" + bundle.getSymbolicName() + ".source", bundle.getSymbolicName()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+				}
+			}
+		}
+		save(new File(file, ICoreConstants.BUILD_FILENAME_DESCRIPTOR), prop, "Marker File"); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
index 4a341e9..76dc85d 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/FeatureExportOperation.java
@@ -12,8 +12,7 @@ package org.eclipse.pde.internal.core.exports;
 
 import java.io.*;
 import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.*;
 import java.util.*;
 import javax.xml.parsers.*;
 import org.eclipse.ant.core.*;
@@ -38,6 +37,8 @@ import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.feature.ExternalFeatureModel;
 import org.eclipse.pde.internal.core.feature.FeatureChild;
 import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
+import org.eclipse.pde.internal.core.target.TargetMetadataCollector;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.osgi.framework.InvalidSyntaxException;
 import org.w3c.dom.*;
@@ -93,7 +94,7 @@ public class FeatureExportOperation extends Job {
 				model.setInstallLocation(fFeatureLocation);
 				InputStream stream = null;
 
-				stream = new BufferedInputStream(new FileInputStream(new File(fFeatureLocation + File.separator + "feature.xml"))); //$NON-NLS-1$
+				stream = new BufferedInputStream(new FileInputStream(new File(fFeatureLocation + File.separator + ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)));
 				model.load(stream, true);
 				if (stream != null) {
 					stream.close();
@@ -336,6 +337,7 @@ public class FeatureExportOperation extends Job {
 								|| (filename.startsWith("javaCompiler.") && filename.endsWith(".args")) //$NON-NLS-1$ //$NON-NLS-2$
 								|| (filename.startsWith("assemble.") && filename.endsWith(".xml")) //$NON-NLS-1$ //$NON-NLS-2$
 								|| (filename.startsWith("package.") && filename.endsWith(".xml")) //$NON-NLS-1$ //$NON-NLS-2$
+								|| (filename.startsWith("compile.") && filename.endsWith(".xml")) //$NON-NLS-1$ //$NON-NLS-2$
 								|| filename.equals(FEATURE_POST_PROCESSING) || filename.equals(PLUGIN_POST_PROCESSING)) {
 							children[i].delete();
 						}
@@ -512,6 +514,26 @@ public class FeatureExportOperation extends Job {
 	}
 
 	/**
+	 * Returns a list of URI metadata repository locations that contain metadata for some 
+	 * or all of the target platform.  The repositories may not contain metadata for all
+	 * plugins in the target.  This method returns <code>null</code> if the target does not
+	 * have any repositories.
+	 * 
+	 * @return list of URI representing metadata repositories or <code>null</code>
+	 */
+	protected URI[] getMetadataContextFromTargetPlatform() {
+		try {
+			URI[] context = TargetMetadataCollector.getMetadataRepositories(null);
+			if (context.length > 0) {
+				return context;
+			}
+		} catch (CoreException e) {
+			return null;
+		}
+		return null;
+	}
+
+	/**
 	 * @return the location of the category definition file, or null if none is specified
 	 */
 	protected String getCategoryDefinition() {
@@ -690,6 +712,13 @@ public class FeatureExportOperation extends Job {
 			generator.setEESources(extraLocations);
 		}
 
+		// if we are exporting metadata, provide context repositories from the target if available and option is turned on
+		if (publishingP2Metadata()) {
+			URI[] contexts = getMetadataContextFromTargetPlatform();
+			if (contexts != null) {
+				generator.setContextMetadataRepositories(contexts);
+			}
+		}
 	}
 
 	protected State getState(String os, String ws, String arch) {
@@ -736,7 +765,7 @@ public class FeatureExportOperation extends Job {
 
 	protected boolean isCustomBuild(IModel model) throws CoreException {
 		IBuildModel buildModel = null;
-		IFile buildFile = model.getUnderlyingResource().getProject().getFile("build.properties"); //$NON-NLS-1$
+		IFile buildFile = PDEProject.getBuildProperties(model.getUnderlyingResource().getProject());
 		if (buildFile.exists()) {
 			buildModel = new WorkspaceBuildModel(buildFile);
 			buildModel.load();
@@ -758,7 +787,24 @@ public class FeatureExportOperation extends Job {
 	}
 
 	protected String[] getPaths() {
-		return TargetPlatformHelper.getFeaturePaths();
+		Map map = new HashMap(); // merge workspace and external features using workspace over external
+		FeatureModelManager fmm = PDECore.getDefault().getFeatureModelManager();
+		IFeatureModel[] models = fmm.getExternalModels();
+		for (int i = 0; i < models.length; i++) {
+			map.put(models[i].getFeature().getId(), models[i].getInstallLocation());
+		}
+		// remove anything that we have in the workspace models
+		models = fmm.getWorkspaceModels();
+		String[] locations = new String[models.length];
+		for (int i = 0; i < models.length; i++) {
+			map.remove(models[i].getFeature().getId());
+			locations[i] = models[i].getInstallLocation();
+		}
+		// add all workspace models
+		String[] paths = new String[map.size() + models.length];
+		paths = (String[]) map.values().toArray(paths);
+		System.arraycopy(locations, 0, paths, map.size(), models.length);
+		return paths;
 	}
 
 	protected void cleanup(String[] config, IProgressMonitor monitor) {
@@ -900,8 +946,8 @@ public class FeatureExportOperation extends Job {
 			if (!file.exists() || !file.isDirectory())
 				file.mkdirs();
 
-			save(new File(file, "build.properties"), prop, "Marker File"); //$NON-NLS-1$ //$NON-NLS-2$
-			XMLPrintHandler.writeFile(doc, new File(file, "feature.xml")); //$NON-NLS-1$
+			save(new File(file, ICoreConstants.BUILD_FILENAME_DESCRIPTOR), prop, "Marker File"); //$NON-NLS-1$ 
+			XMLPrintHandler.writeFile(doc, new File(file, ICoreConstants.FEATURE_FILENAME_DESCRIPTOR));
 		} catch (DOMException e1) {
 		} catch (FactoryConfigurationError e1) {
 		} catch (ParserConfigurationException e1) {
@@ -1001,7 +1047,7 @@ public class FeatureExportOperation extends Job {
 
 					if (fInfo.exportSource && fInfo.exportSourceBundle) {
 						includes = doc.createElement("includes"); //$NON-NLS-1$
-						includes.setAttribute("id", feature.getId() + " .source"); //$NON-NLS-1$ //$NON-NLS-2$
+						includes.setAttribute("id", feature.getId() + ".source"); //$NON-NLS-1$ //$NON-NLS-2$
 						includes.setAttribute("version", feature.getVersion()); //$NON-NLS-1$
 						root.appendChild(includes);
 					}
@@ -1066,7 +1112,7 @@ public class FeatureExportOperation extends Job {
 					}
 				}
 			}
-			XMLPrintHandler.writeFile(doc, new File(file, "feature.xml")); //$NON-NLS-1$
+			XMLPrintHandler.writeFile(doc, new File(file, ICoreConstants.FEATURE_FILENAME_DESCRIPTOR));
 		} catch (DOMException e1) {
 		} catch (FactoryConfigurationError e1) {
 		} catch (ParserConfigurationException e1) {
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/PluginExportOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/PluginExportOperation.java
index c338aad..42e5f3c 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/PluginExportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/PluginExportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,8 @@ import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.State;
 import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.w3c.dom.Element;
 
 public class PluginExportOperation extends FeatureBasedExportOperation {
 
@@ -52,4 +54,11 @@ public class PluginExportOperation extends FeatureBasedExportOperation {
 		return true;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#setAdditionalAttributes(org.w3c.dom.Element, org.eclipse.osgi.service.resolver.BundleDescription)
+	 */
+	protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) {
+		plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle))); //$NON-NLS-1$
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java
index 65c4c8a..4dd7378 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java
@@ -1,470 +1,472 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.core.exports;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.build.*;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.pde.internal.core.iproduct.*;
-import org.eclipse.pde.internal.core.iproduct.IProduct;
-import org.eclipse.pde.internal.core.util.CoreUtility;
-import org.w3c.dom.Element;
-
-public class ProductExportOperation extends FeatureExportOperation {
-	private static final String STATUS_MESSAGE = "!MESSAGE"; //$NON-NLS-1$
-	private static final String STATUS_ENTRY = "!ENTRY"; //$NON-NLS-1$
-	private static final String STATUS_SUBENTRY = "!SUBENTRY"; //$NON-NLS-1$
-	private static final String ECLIPSE_APP_MACOS = "Eclipse.app/Contents/MacOS"; //$NON-NLS-1$
-	private static final String ECLIPSE_APP_CONTENTS = "Eclipse.app/Contents"; //$NON-NLS-1$
-	private String fFeatureLocation;
-	private String fRoot;
-	private IProduct fProduct;
-
-	protected static String errorMessage;
-
-	public static void setErrorMessage(String message) {
-		errorMessage = message;
-	}
-
-	public static String getErrorMessage() {
-		return errorMessage;
-	}
-
-	public static IStatus parseErrorMessage(CoreException e) {
-		if (errorMessage == null)
-			return null;
-
-		MultiStatus status = null;
-		StringTokenizer tokenizer = new StringTokenizer(errorMessage, "\n"); //$NON-NLS-1$
-		for (; tokenizer.hasMoreTokens();) {
-			String line = tokenizer.nextToken().trim();
-			if (line.startsWith(STATUS_ENTRY) && tokenizer.hasMoreElements()) {
-				String next = tokenizer.nextToken();
-				if (next.startsWith(STATUS_MESSAGE)) {
-					status = new MultiStatus(PDECore.PLUGIN_ID, 0, next.substring(8), null);
-				}
-			} else if (line.startsWith(STATUS_SUBENTRY) && tokenizer.hasMoreElements() && status != null) {
-				String next = tokenizer.nextToken();
-				if (next.startsWith(STATUS_MESSAGE)) {
-					status.add(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, next.substring(8)));
-				}
-			}
-		}
-		if (status != null)
-			return status;
-
-		//parsing didn't work, just set the message
-		return new MultiStatus(PDECore.PLUGIN_ID, 0, new IStatus[] {e.getStatus()}, errorMessage, null);
-	}
-
-	public ProductExportOperation(FeatureExportInfo info, String name, IProduct product, String root) {
-		super(info, name);
-		fProduct = product;
-		fRoot = root;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#run(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected IStatus run(IProgressMonitor monitor) {
-		String[][] configurations = fInfo.targets;
-		if (configurations == null)
-			configurations = new String[][] {{TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL()}};
-
-		cleanupBuildRepo();
-		errorMessage = null;
-
-		try {
-			monitor.beginTask("", 10); //$NON-NLS-1$
-			try {
-				// create a feature to wrap all plug-ins and features
-				String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
-				fFeatureLocation = fBuildTempLocation + File.separator + featureID;
-
-				createFeature(featureID, fFeatureLocation, configurations, true);
-				createBuildPropertiesFile(fFeatureLocation, configurations);
-				doExport(featureID, null, fFeatureLocation, configurations, new SubProgressMonitor(monitor, 8));
-			} catch (IOException e) {
-				PDECore.log(e);
-			} catch (InvocationTargetException e) {
-				return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e.getTargetException());
-			} catch (CoreException e) {
-				if (errorMessage != null)
-					return parseErrorMessage(e);
-				return e.getStatus();
-			} finally {
-				// Clean up generated files
-				for (int j = 0; j < fInfo.items.length; j++) {
-					try {
-						deleteBuildFiles(fInfo.items[j]);
-					} catch (CoreException e) {
-						PDECore.log(e);
-					}
-				}
-				cleanup(null, new SubProgressMonitor(monitor, 1));
-			}
-
-			if (hasAntErrors()) {
-				return new Status(IStatus.WARNING, PDECore.PLUGIN_ID, NLS.bind(PDECoreMessages.FeatureExportOperation_CompilationErrors, fInfo.destinationDirectory));
-			}
-
-		} finally {
-			monitor.done();
-			errorMessage = null;
-		}
-		return Status.OK_STATUS;
-	}
-
-	protected boolean groupedConfigurations() {
-		// we never group product exports
-		return false;
-	}
-
-	private void cleanupBuildRepo() {
-		File metadataTemp = new File(fBuildTempMetadataLocation);
-		if (metadataTemp.exists()) {
-			//make sure our build metadata repo is clean
-			deleteDir(metadataTemp);
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.pde.internal.ui.wizards.exports.FeatureExportJob#getPaths()
-	 */
-	protected String[] getPaths() {
-		String[] paths = super.getPaths();
-		String[] all = new String[paths.length + 1];
-		all[0] = fFeatureLocation + File.separator + "feature.xml"; //$NON-NLS-1$
-		System.arraycopy(paths, 0, all, 1, paths.length);
-		return all;
-	}
-
-	private void createBuildPropertiesFile(String featureLocation, String[][] configurations) {
-		File file = new File(featureLocation);
-		if (!file.exists() || !file.isDirectory())
-			file.mkdirs();
-
-		boolean hasLaunchers = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature() != null;
-		Properties properties = new Properties();
-		if (!hasLaunchers && configurations.length > 0) {
-			String rootPrefix = IBuildPropertiesConstants.ROOT_PREFIX + configurations[0][0] + "." + configurations[0][1] + "." + configurations[0][2]; //$NON-NLS-1$ //$NON-NLS-2$
-			properties.put(rootPrefix, getRootFileLocations(hasLaunchers));
-			if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
-				String plist = createMacInfoPList();
-				if (plist != null)
-					properties.put(rootPrefix + ".folder." + ECLIPSE_APP_CONTENTS, "absolute:file:" + plist); //$NON-NLS-1$ //$NON-NLS-2$
-				properties.put(rootPrefix + ".folder." + ECLIPSE_APP_MACOS, getLauncherLocations(hasLaunchers)); //$NON-NLS-1$
-				properties.put(rootPrefix + ".permissions.755", ECLIPSE_APP_MACOS + "/" + getLauncherName()); //$NON-NLS-1$ //$NON-NLS-2$
-			} else {
-				properties.put(rootPrefix, getLauncherLocations(hasLaunchers)); //To copy a folder
-				properties.put(rootPrefix + ".permissions.755", getLauncherName()); //$NON-NLS-1$
-				if (TargetPlatform.getWS().equals("motif") && TargetPlatform.getOS().equals("linux")) { //$NON-NLS-1$ //$NON-NLS-2$
-					properties.put(rootPrefix + ".permissions.755", "libXm.so.2"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			}
-		}
-
-		IJREInfo jreInfo = fProduct.getJREInfo();
-		for (int i = 0; i < configurations.length; i++) {
-			String[] config = configurations[i];
-			File vm = jreInfo != null ? jreInfo.getJVMLocation(config[0]) : null;
-
-			if (vm != null) {
-				String rootPrefix = IBuildPropertiesConstants.ROOT_PREFIX + config[0] + "." + config[1] + //$NON-NLS-1$
-						"." + config[2]; //$NON-NLS-1$
-				properties.put(rootPrefix + ".folder.jre", "absolute:" + vm.getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
-				String perms = (String) properties.get(rootPrefix + ".permissions.755"); //$NON-NLS-1$
-				if (perms != null) {
-					StringBuffer buffer = new StringBuffer(perms);
-					buffer.append(","); //$NON-NLS-1$
-					buffer.append("jre/bin/java"); //$NON-NLS-1$
-					properties.put(rootPrefix + ".permissions.755", buffer.toString()); //$NON-NLS-1$
-				}
-			}
-		}
-
-		if (fInfo.exportSource && fInfo.exportSourceBundle) {
-			properties.put(IBuildPropertiesConstants.PROPERTY_INDIVIDUAL_SOURCE, "true"); //$NON-NLS-1$
-			List workspacePlugins = Arrays.asList(PluginRegistry.getWorkspaceModels());
-			for (int i = 0; i < fInfo.items.length; i++) {
-				if (fInfo.items[i] instanceof IFeatureModel) {
-					IFeature feature = ((IFeatureModel) fInfo.items[i]).getFeature();
-					properties.put("generate.feature@" + feature.getId().trim() + ".source", feature.getId()); //$NON-NLS-1$ //$NON-NLS-2$
-				} else {
-					BundleDescription bundle = null;
-					if (fInfo.items[i] instanceof IPluginModelBase) {
-						bundle = ((IPluginModelBase) fInfo.items[i]).getBundleDescription();
-					}
-					if (bundle == null) {
-						if (fInfo.items[i] instanceof BundleDescription)
-							bundle = (BundleDescription) fInfo.items[i];
-					}
-					if (bundle == null)
-						continue;
-
-					//it doesn't matter if we generate extra properties for platforms we aren't exporting for
-					if (workspacePlugins.contains(PluginRegistry.findModel(bundle))) {
-						properties.put("generate.plugin@" + bundle.getSymbolicName().trim() + ".source", bundle.getSymbolicName()); //$NON-NLS-1$ //$NON-NLS-2$
-					}
-				}
-			}
-		}
-		save(new File(file, "build.properties"), properties, "Build Configuration"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#publishingP2Metadata()
-	 */
-	protected boolean publishingP2Metadata() {
-		return fInfo.exportMetadata;
-	}
-
-	private String getLauncherLocations(boolean hasLaunchers) {
-		//get the launchers for the eclipse install
-		StringBuffer buffer = new StringBuffer();
-		if (!hasLaunchers) {
-			File homeDir = new File(TargetPlatform.getLocation());
-			if (homeDir.exists() && homeDir.isDirectory()) {
-				// try to retrieve the exact eclipse launcher path
-				// see bug 205833
-				File file = null;
-				if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$
-					String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$
-					file = new File(launcherPath);
-				}
-
-				if (file != null && file.exists() && !file.isDirectory()) {
-					appendAbsolutePath(buffer, file);
-				} else if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$)
-					appendEclipsePath(buffer, new File(homeDir, ECLIPSE_APP_MACOS));
-				} else {
-					appendEclipsePath(buffer, homeDir);
-				}
-			}
-		}
-		return buffer.toString();
-	}
-
-	private String getRootFileLocations(boolean hasLaunchers) {
-		//Get the files that go in the root of the eclipse install, excluding the launcher
-		StringBuffer buffer = new StringBuffer();
-		if (!hasLaunchers) {
-			File homeDir = new File(TargetPlatform.getLocation());
-			if (homeDir.exists() && homeDir.isDirectory()) {
-				File file = new File(homeDir, "startup.jar"); //$NON-NLS-1$
-				if (file.exists())
-					appendAbsolutePath(buffer, file);
-
-				file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
-				if (file.exists()) {
-					appendAbsolutePath(buffer, file);
-				}
-			}
-		}
-
-		return buffer.toString();
-	}
-
-	private void appendEclipsePath(StringBuffer buffer, File homeDir) {
-		File file = null;
-		file = new File(homeDir, "eclipse"); //$NON-NLS-1$
-		if (file.exists()) {
-			appendAbsolutePath(buffer, file);
-		}
-		file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$
-		if (file.exists()) {
-			appendAbsolutePath(buffer, file);
-		}
-	}
-
-	private void appendAbsolutePath(StringBuffer buffer, File file) {
-		if (buffer.length() > 0)
-			buffer.append(","); //$NON-NLS-1$
-
-		buffer.append("absolute:file:"); //$NON-NLS-1$
-		buffer.append(file.getAbsolutePath());
-	}
-
-	protected HashMap createAntBuildProperties(String[][] configs) {
-		HashMap properties = super.createAntBuildProperties(configs);
-		properties.put(IXMLConstants.PROPERTY_LAUNCHER_NAME, getLauncherName());
-
-		if (fProduct.includeLaunchers()) {
-			properties.put("excludeLaunchers", IBuildPropertiesConstants.TRUE); //$NON-NLS-1$
-		}
-
-		ILauncherInfo info = fProduct.getLauncherInfo();
-		if (info != null) {
-			String icons = ""; //$NON-NLS-1$
-			for (int i = 0; i < configs.length; i++) {
-				String images = null;
-				if (configs[i][0].equals("win32")) { //$NON-NLS-1$
-					images = getWin32Images(info);
-				} else if (configs[i][0].equals("solaris")) { //$NON-NLS-1$
-					images = getSolarisImages(info);
-				} else if (configs[i][0].equals("linux")) { //$NON-NLS-1$
-					images = getExpandedPath(info.getIconPath(ILauncherInfo.LINUX_ICON));
-				} else if (configs[i][0].equals("macosx")) { //$NON-NLS-1$
-					images = getExpandedPath(info.getIconPath(ILauncherInfo.MACOSX_ICON));
-				}
-				if (images != null) {
-					if (icons.length() > 0)
-						icons += ","; //$NON-NLS-1$
-					icons += images;
-				}
-
-			}
-			if (icons != null && icons.length() > 0)
-				properties.put(IXMLConstants.PROPERTY_LAUNCHER_ICONS, icons);
-		}
-
-		fAntBuildProperties.put(IXMLConstants.PROPERTY_COLLECTING_FOLDER, fRoot);
-		fAntBuildProperties.put(IXMLConstants.PROPERTY_ARCHIVE_PREFIX, fRoot);
-
-		return properties;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#setP2MetaDataProperties(java.util.Map)
-	 */
-	protected void setP2MetaDataProperties(Map map) {
-		if (fInfo.exportMetadata) {
-			if (PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature() == null)
-				map.put(IXMLConstants.PROPERTY_LAUNCHER_PROVIDER, "org.eclipse.pde.container.feature"); //$NON-NLS-1$
-			map.put(IXMLConstants.TARGET_P2_METADATA, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_FLAVOR, P2Utils.P2_FLAVOR_DEFAULT);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_PUBLISH_ARTIFACTS, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_COMPRESS, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, Boolean.toString(publishingP2Metadata()));
-			try {
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_BUILD_REPO, new File(fBuildTempMetadataLocation).toURL().toString());
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO, new File(fInfo.destinationDirectory + "/repository").toURL().toString()); //$NON-NLS-1$
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO, new File(fInfo.destinationDirectory + "/repository").toURL().toString()); //$NON-NLS-1$
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO_NAME, NLS.bind(PDECoreMessages.ProductExportOperation_0, fProduct.getProductId()));
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO_NAME, NLS.bind(PDECoreMessages.ProductExportOperation_0, fProduct.getProductId()));
-			} catch (MalformedURLException e) {
-				PDECore.log(e);
-			}
-		}
-	}
-
-	private String getLauncherName() {
-		ILauncherInfo info = fProduct.getLauncherInfo();
-		if (info != null) {
-			String name = info.getLauncherName();
-			if (name != null && name.length() > 0) {
-				name = name.trim();
-				if (name.endsWith(".exe")) //$NON-NLS-1$
-					name = name.substring(0, name.length() - 4);
-				return name;
-			}
-		}
-		return "eclipse"; //$NON-NLS-1$
-	}
-
-	private String getWin32Images(ILauncherInfo info) {
-		StringBuffer buffer = new StringBuffer();
-		if (info.usesWinIcoFile()) {
-			append(buffer, info.getIconPath(ILauncherInfo.P_ICO_PATH));
-		} else {
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_16_LOW));
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_16_HIGH));
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_32_HIGH));
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_32_LOW));
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_48_HIGH));
-			append(buffer, info.getIconPath(ILauncherInfo.WIN32_48_LOW));
-		}
-		return buffer.length() > 0 ? buffer.toString() : null;
-	}
-
-	private String getSolarisImages(ILauncherInfo info) {
-		StringBuffer buffer = new StringBuffer();
-		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_LARGE));
-		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_MEDIUM));
-		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_SMALL));
-		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_TINY));
-		return buffer.length() > 0 ? buffer.toString() : null;
-	}
-
-	private void append(StringBuffer buffer, String path) {
-		path = getExpandedPath(path);
-		if (path != null) {
-			if (buffer.length() > 0)
-				buffer.append(","); //$NON-NLS-1$
-			buffer.append(path);
-		}
-	}
-
-	private String getExpandedPath(String path) {
-		if (path == null || path.length() == 0)
-			return null;
-		IResource resource = PDECore.getWorkspace().getRoot().findMember(new Path(path));
-		if (resource != null) {
-			IPath fullPath = resource.getLocation();
-			return fullPath == null ? null : fullPath.toOSString();
-		}
-		return null;
-	}
-
-	protected void setupGenerator(BuildScriptGenerator generator, String featureID, String versionId, String[][] configs, String featureLocation) throws CoreException {
-		super.setupGenerator(generator, featureID, versionId, configs, featureLocation);
-		generator.setGenerateVersionsList(true);
-		if (fProduct != null)
-			generator.setProduct(fProduct.getModel().getInstallLocation());
-	}
-
-	private String createMacInfoPList() {
-		String entryName = TargetPlatformHelper.getTargetVersion() >= 3.3 ? "macosx/Info.plist" //$NON-NLS-1$
-				: "macosx/Info.plist.32"; //$NON-NLS-1$
-		URL url = PDECore.getDefault().getBundle().getEntry(entryName);
-		if (url == null)
-			return null;
-
-		File plist = null;
-		InputStream in = null;
-		String location = fFeatureLocation;
-
-		try {
-			in = url.openStream();
-			File dir = new File(location, ECLIPSE_APP_CONTENTS);
-			dir.mkdirs();
-			plist = new File(dir, "Info.plist"); //$NON-NLS-1$
-			CoreUtility.readFile(in, plist);
-			return plist.getAbsolutePath();
-		} catch (IOException e) {
-			// nothing to do
-		} finally {
-			try {
-				if (in != null)
-					in.close();
-			} catch (IOException e) {
-			}
-		}
-		return null;
-	}
-
-	protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) {
-		plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle))); //$NON-NLS-1$
-	}
-}
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.exports;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.build.*;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.IFeature;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.iproduct.*;
+import org.eclipse.pde.internal.core.iproduct.IProduct;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.w3c.dom.Element;
+
+public class ProductExportOperation extends FeatureExportOperation {
+	private static final String STATUS_MESSAGE = "!MESSAGE"; //$NON-NLS-1$
+	private static final String STATUS_ENTRY = "!ENTRY"; //$NON-NLS-1$
+	private static final String STATUS_SUBENTRY = "!SUBENTRY"; //$NON-NLS-1$
+	private static final String ECLIPSE_APP_MACOS = "Eclipse.app/Contents/MacOS"; //$NON-NLS-1$
+	private static final String ECLIPSE_APP_CONTENTS = "Eclipse.app/Contents"; //$NON-NLS-1$
+	private static final String MAC_JAVA_FRAMEWORK = "/System/Library/Frameworks/JavaVM.framework"; //$NON-NLS-1$
+	private String fFeatureLocation;
+	private String fRoot;
+	private IProduct fProduct;
+
+	protected static String errorMessage;
+
+	public static void setErrorMessage(String message) {
+		errorMessage = message;
+	}
+
+	public static String getErrorMessage() {
+		return errorMessage;
+	}
+
+	public static IStatus parseErrorMessage(CoreException e) {
+		if (errorMessage == null)
+			return null;
+
+		MultiStatus status = null;
+		StringTokenizer tokenizer = new StringTokenizer(errorMessage, "\n"); //$NON-NLS-1$
+		for (; tokenizer.hasMoreTokens();) {
+			String line = tokenizer.nextToken().trim();
+			if (line.startsWith(STATUS_ENTRY) && tokenizer.hasMoreElements()) {
+				String next = tokenizer.nextToken();
+				if (next.startsWith(STATUS_MESSAGE)) {
+					status = new MultiStatus(PDECore.PLUGIN_ID, 0, next.substring(8), null);
+				}
+			} else if (line.startsWith(STATUS_SUBENTRY) && tokenizer.hasMoreElements() && status != null) {
+				String next = tokenizer.nextToken();
+				if (next.startsWith(STATUS_MESSAGE)) {
+					status.add(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, next.substring(8)));
+				}
+			}
+		}
+		if (status != null)
+			return status;
+
+		//parsing didn't work, just set the message
+		return new MultiStatus(PDECore.PLUGIN_ID, 0, new IStatus[] {e.getStatus()}, errorMessage, null);
+	}
+
+	public ProductExportOperation(FeatureExportInfo info, String name, IProduct product, String root) {
+		super(info, name);
+		fProduct = product;
+		fRoot = root;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		String[][] configurations = fInfo.targets;
+		if (configurations == null)
+			configurations = new String[][] {{TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL()}};
+
+		cleanupBuildRepo();
+		errorMessage = null;
+
+		try {
+			monitor.beginTask("", 10); //$NON-NLS-1$
+			try {
+				// create a feature to wrap all plug-ins and features
+				String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$
+				fFeatureLocation = fBuildTempLocation + File.separator + featureID;
+
+				createFeature(featureID, fFeatureLocation, configurations, fProduct.includeLaunchers());
+				createBuildPropertiesFile(fFeatureLocation, configurations);
+				doExport(featureID, null, fFeatureLocation, configurations, new SubProgressMonitor(monitor, 8));
+			} catch (IOException e) {
+				PDECore.log(e);
+			} catch (InvocationTargetException e) {
+				return new Status(IStatus.ERROR, PDECore.PLUGIN_ID, PDECoreMessages.FeatureBasedExportOperation_ProblemDuringExport, e.getTargetException());
+			} catch (CoreException e) {
+				if (errorMessage != null)
+					return parseErrorMessage(e);
+				return e.getStatus();
+			} finally {
+				// Clean up generated files
+				for (int j = 0; j < fInfo.items.length; j++) {
+					try {
+						deleteBuildFiles(fInfo.items[j]);
+					} catch (CoreException e) {
+						PDECore.log(e);
+					}
+				}
+				cleanup(null, new SubProgressMonitor(monitor, 1));
+			}
+
+			if (hasAntErrors()) {
+				return new Status(IStatus.WARNING, PDECore.PLUGIN_ID, NLS.bind(PDECoreMessages.FeatureExportOperation_CompilationErrors, fInfo.destinationDirectory));
+			}
+
+		} finally {
+			monitor.done();
+			errorMessage = null;
+		}
+		return Status.OK_STATUS;
+	}
+
+	protected boolean groupedConfigurations() {
+		// we never group product exports
+		return false;
+	}
+
+	private void cleanupBuildRepo() {
+		File metadataTemp = new File(fBuildTempMetadataLocation);
+		if (metadataTemp.exists()) {
+			//make sure our build metadata repo is clean
+			deleteDir(metadataTemp);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.pde.internal.ui.wizards.exports.FeatureExportJob#getPaths()
+	 */
+	protected String[] getPaths() {
+		String[] paths = super.getPaths();
+		String[] all = new String[paths.length + 1];
+		all[0] = fFeatureLocation + File.separator + ICoreConstants.FEATURE_FILENAME_DESCRIPTOR;
+		System.arraycopy(paths, 0, all, 1, paths.length);
+		return all;
+	}
+
+	private void createBuildPropertiesFile(String featureLocation, String[][] configurations) {
+		File file = new File(featureLocation);
+		if (!file.exists() || !file.isDirectory())
+			file.mkdirs();
+
+		boolean hasLaunchers = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature() != null;
+		Properties properties = new Properties();
+		if (fProduct.includeLaunchers() && !hasLaunchers && configurations.length > 0) {
+			String rootPrefix = IBuildPropertiesConstants.ROOT_PREFIX + configurations[0][0] + "." + configurations[0][1] + "." + configurations[0][2]; //$NON-NLS-1$ //$NON-NLS-2$
+			properties.put(rootPrefix, getRootFileLocations(hasLaunchers));
+			if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
+				String plist = createMacInfoPList();
+				if (plist != null)
+					properties.put(rootPrefix + ".folder." + ECLIPSE_APP_CONTENTS, "absolute:file:" + plist); //$NON-NLS-1$ //$NON-NLS-2$
+				properties.put(rootPrefix + ".folder." + ECLIPSE_APP_MACOS, getLauncherLocations(hasLaunchers)); //$NON-NLS-1$
+				properties.put(rootPrefix + ".permissions.755", ECLIPSE_APP_MACOS + "/" + getLauncherName()); //$NON-NLS-1$ //$NON-NLS-2$
+			} else {
+				properties.put(rootPrefix, getLauncherLocations(hasLaunchers)); //To copy a folder
+				properties.put(rootPrefix + ".permissions.755", getLauncherName()); //$NON-NLS-1$
+				if (TargetPlatform.getWS().equals("motif") && TargetPlatform.getOS().equals("linux")) { //$NON-NLS-1$ //$NON-NLS-2$
+					properties.put(rootPrefix + ".permissions.755", "libXm.so.2"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+		}
+
+		IJREInfo jreInfo = fProduct.getJREInfo();
+		for (int i = 0; i < configurations.length; i++) {
+			String[] config = configurations[i];
+			File vm = jreInfo != null ? jreInfo.getJVMLocation(config[0]) : null;
+
+			if (vm != null) {
+
+				if (config[0].equals("macosx") && vm.getPath().startsWith(MAC_JAVA_FRAMEWORK)) { //$NON-NLS-1$
+					continue;
+				}
+
+				String rootPrefix = IBuildPropertiesConstants.ROOT_PREFIX + config[0] + "." + config[1] + //$NON-NLS-1$
+						"." + config[2]; //$NON-NLS-1$
+				properties.put(rootPrefix + ".folder.jre", "absolute:" + vm.getAbsolutePath()); //$NON-NLS-1$ //$NON-NLS-2$
+				String perms = (String) properties.get(rootPrefix + ".permissions.755"); //$NON-NLS-1$
+				if (perms != null) {
+					StringBuffer buffer = new StringBuffer(perms);
+					buffer.append(","); //$NON-NLS-1$
+					buffer.append("jre/bin/java"); //$NON-NLS-1$
+					properties.put(rootPrefix + ".permissions.755", buffer.toString()); //$NON-NLS-1$
+				}
+			}
+		}
+
+		if (fInfo.exportSource && fInfo.exportSourceBundle) {
+			properties.put(IBuildPropertiesConstants.PROPERTY_INDIVIDUAL_SOURCE, "true"); //$NON-NLS-1$
+			List workspacePlugins = Arrays.asList(PluginRegistry.getWorkspaceModels());
+			for (int i = 0; i < fInfo.items.length; i++) {
+				if (fInfo.items[i] instanceof IFeatureModel) {
+					IFeature feature = ((IFeatureModel) fInfo.items[i]).getFeature();
+					properties.put("generate.feature@" + feature.getId().trim() + ".source", feature.getId()); //$NON-NLS-1$ //$NON-NLS-2$
+				} else {
+					BundleDescription bundle = null;
+					if (fInfo.items[i] instanceof IPluginModelBase) {
+						bundle = ((IPluginModelBase) fInfo.items[i]).getBundleDescription();
+					}
+					if (bundle == null) {
+						if (fInfo.items[i] instanceof BundleDescription)
+							bundle = (BundleDescription) fInfo.items[i];
+					}
+					if (bundle == null)
+						continue;
+
+					//it doesn't matter if we generate extra properties for platforms we aren't exporting for
+					if (workspacePlugins.contains(PluginRegistry.findModel(bundle))) {
+						properties.put("generate.plugin@" + bundle.getSymbolicName().trim() + ".source", bundle.getSymbolicName()); //$NON-NLS-1$ //$NON-NLS-2$
+					}
+				}
+			}
+		}
+		save(new File(file, ICoreConstants.BUILD_FILENAME_DESCRIPTOR), properties, "Build Configuration"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#publishingP2Metadata()
+	 */
+	protected boolean publishingP2Metadata() {
+		return fInfo.exportMetadata;
+	}
+
+	private String getLauncherLocations(boolean hasLaunchers) {
+		//get the launchers for the eclipse install
+		StringBuffer buffer = new StringBuffer();
+		if (!hasLaunchers) {
+			File homeDir = new File(TargetPlatform.getLocation());
+			if (homeDir.exists() && homeDir.isDirectory()) {
+				// try to retrieve the exact eclipse launcher path
+				// see bug 205833
+				File file = null;
+				if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$
+					String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$
+					file = new File(launcherPath);
+				}
+
+				if (file != null && file.exists() && !file.isDirectory()) {
+					appendAbsolutePath(buffer, file);
+				} else if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$)
+					appendEclipsePath(buffer, new File(homeDir, ECLIPSE_APP_MACOS));
+				} else {
+					appendEclipsePath(buffer, homeDir);
+				}
+			}
+		}
+		return buffer.toString();
+	}
+
+	private String getRootFileLocations(boolean hasLaunchers) {
+		//Get the files that go in the root of the eclipse install, excluding the launcher
+		StringBuffer buffer = new StringBuffer();
+		if (!hasLaunchers) {
+			File homeDir = new File(TargetPlatform.getLocation());
+			if (homeDir.exists() && homeDir.isDirectory()) {
+				File file = new File(homeDir, "startup.jar"); //$NON-NLS-1$
+				if (file.exists())
+					appendAbsolutePath(buffer, file);
+
+				file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
+				if (file.exists()) {
+					appendAbsolutePath(buffer, file);
+				}
+			}
+		}
+
+		return buffer.toString();
+	}
+
+	private void appendEclipsePath(StringBuffer buffer, File homeDir) {
+		File file = null;
+		file = new File(homeDir, "eclipse"); //$NON-NLS-1$
+		if (file.exists()) {
+			appendAbsolutePath(buffer, file);
+		}
+		file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$
+		if (file.exists()) {
+			appendAbsolutePath(buffer, file);
+		}
+	}
+
+	private void appendAbsolutePath(StringBuffer buffer, File file) {
+		if (buffer.length() > 0)
+			buffer.append(","); //$NON-NLS-1$
+
+		buffer.append("absolute:file:"); //$NON-NLS-1$
+		buffer.append(file.getAbsolutePath());
+	}
+
+	protected HashMap createAntBuildProperties(String[][] configs) {
+		HashMap properties = super.createAntBuildProperties(configs);
+		properties.put(IXMLConstants.PROPERTY_LAUNCHER_NAME, getLauncherName());
+
+		ILauncherInfo info = fProduct.getLauncherInfo();
+		if (info != null) {
+			String icons = ""; //$NON-NLS-1$
+			for (int i = 0; i < configs.length; i++) {
+				String images = null;
+				if (configs[i][0].equals("win32")) { //$NON-NLS-1$
+					images = getWin32Images(info);
+				} else if (configs[i][0].equals("solaris")) { //$NON-NLS-1$
+					images = getSolarisImages(info);
+				} else if (configs[i][0].equals("linux")) { //$NON-NLS-1$
+					images = getExpandedPath(info.getIconPath(ILauncherInfo.LINUX_ICON));
+				} else if (configs[i][0].equals("macosx")) { //$NON-NLS-1$
+					images = getExpandedPath(info.getIconPath(ILauncherInfo.MACOSX_ICON));
+				}
+				if (images != null) {
+					if (icons.length() > 0)
+						icons += ","; //$NON-NLS-1$
+					icons += images;
+				}
+
+			}
+			if (icons != null && icons.length() > 0)
+				properties.put(IXMLConstants.PROPERTY_LAUNCHER_ICONS, icons);
+		}
+
+		fAntBuildProperties.put(IXMLConstants.PROPERTY_COLLECTING_FOLDER, fRoot);
+		fAntBuildProperties.put(IXMLConstants.PROPERTY_ARCHIVE_PREFIX, fRoot);
+
+		return properties;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#setP2MetaDataProperties(java.util.Map)
+	 */
+	protected void setP2MetaDataProperties(Map map) {
+		if (fInfo.exportMetadata) {
+			if (PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature() == null)
+				map.put(IXMLConstants.PROPERTY_LAUNCHER_PROVIDER, "org.eclipse.pde.container.feature"); //$NON-NLS-1$
+			map.put(IXMLConstants.TARGET_P2_METADATA, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_FLAVOR, P2Utils.P2_FLAVOR_DEFAULT);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_PUBLISH_ARTIFACTS, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_COMPRESS, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, Boolean.toString(publishingP2Metadata()));
+			try {
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_BUILD_REPO, new File(fBuildTempMetadataLocation).toURL().toString());
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO, new File(fInfo.destinationDirectory + "/repository").toURL().toString()); //$NON-NLS-1$
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO, new File(fInfo.destinationDirectory + "/repository").toURL().toString()); //$NON-NLS-1$
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO_NAME, NLS.bind(PDECoreMessages.ProductExportOperation_0, fProduct.getProductId()));
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO_NAME, NLS.bind(PDECoreMessages.ProductExportOperation_0, fProduct.getProductId()));
+			} catch (MalformedURLException e) {
+				PDECore.log(e);
+			}
+		}
+	}
+
+	private String getLauncherName() {
+		ILauncherInfo info = fProduct.getLauncherInfo();
+		if (info != null) {
+			String name = info.getLauncherName();
+			if (name != null && name.length() > 0) {
+				name = name.trim();
+				if (name.endsWith(".exe")) //$NON-NLS-1$
+					name = name.substring(0, name.length() - 4);
+				return name;
+			}
+		}
+		return "eclipse"; //$NON-NLS-1$
+	}
+
+	private String getWin32Images(ILauncherInfo info) {
+		StringBuffer buffer = new StringBuffer();
+		if (info.usesWinIcoFile()) {
+			append(buffer, info.getIconPath(ILauncherInfo.P_ICO_PATH));
+		} else {
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_16_LOW));
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_16_HIGH));
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_32_HIGH));
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_32_LOW));
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_48_HIGH));
+			append(buffer, info.getIconPath(ILauncherInfo.WIN32_48_LOW));
+		}
+		return buffer.length() > 0 ? buffer.toString() : null;
+	}
+
+	private String getSolarisImages(ILauncherInfo info) {
+		StringBuffer buffer = new StringBuffer();
+		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_LARGE));
+		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_MEDIUM));
+		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_SMALL));
+		append(buffer, info.getIconPath(ILauncherInfo.SOLARIS_TINY));
+		return buffer.length() > 0 ? buffer.toString() : null;
+	}
+
+	private void append(StringBuffer buffer, String path) {
+		path = getExpandedPath(path);
+		if (path != null) {
+			if (buffer.length() > 0)
+				buffer.append(","); //$NON-NLS-1$
+			buffer.append(path);
+		}
+	}
+
+	private String getExpandedPath(String path) {
+		if (path == null || path.length() == 0)
+			return null;
+		IResource resource = PDECore.getWorkspace().getRoot().findMember(new Path(path));
+		if (resource != null) {
+			IPath fullPath = resource.getLocation();
+			return fullPath == null ? null : fullPath.toOSString();
+		}
+		return null;
+	}
+
+	protected void setupGenerator(BuildScriptGenerator generator, String featureID, String versionId, String[][] configs, String featureLocation) throws CoreException {
+		super.setupGenerator(generator, featureID, versionId, configs, featureLocation);
+		generator.setGenerateVersionsList(true);
+		if (fProduct != null)
+			generator.setProduct(fProduct.getModel().getInstallLocation());
+	}
+
+	private String createMacInfoPList() {
+		String entryName = TargetPlatformHelper.getTargetVersion() >= 3.3 ? "macosx/Info.plist" //$NON-NLS-1$
+				: "macosx/Info.plist.32"; //$NON-NLS-1$
+		URL url = PDECore.getDefault().getBundle().getEntry(entryName);
+		if (url == null)
+			return null;
+
+		File plist = null;
+		InputStream in = null;
+		String location = fFeatureLocation;
+
+		try {
+			in = url.openStream();
+			File dir = new File(location, ECLIPSE_APP_CONTENTS);
+			dir.mkdirs();
+			plist = new File(dir, "Info.plist"); //$NON-NLS-1$
+			CoreUtility.readFile(in, plist);
+			return plist.getAbsolutePath();
+		} catch (IOException e) {
+			// nothing to do
+		} finally {
+			try {
+				if (in != null)
+					in.close();
+			} catch (IOException e) {
+			}
+		}
+		return null;
+	}
+
+	protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) {
+		plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle))); //$NON-NLS-1$
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/SiteBuildOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/SiteBuildOperation.java
index 5d0af9d..ef31792 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/SiteBuildOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/SiteBuildOperation.java
@@ -8,212 +8,212 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-package org.eclipse.pde.internal.core.exports;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.Map;
-import java.util.regex.Pattern;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.MultiRule;
-import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
-import org.eclipse.pde.internal.build.IXMLConstants;
-import org.eclipse.pde.internal.core.P2Utils;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.pde.internal.core.isite.*;
-import org.eclipse.pde.internal.core.site.WorkspaceSiteModel;
-import org.eclipse.pde.internal.core.util.PatternConstructor;
-import org.osgi.framework.Version;
-
-/**
- * Performs a site build operation that will build any features needed by the site and generate
- * p2 metadata for those features.
- * 
- * @see FeatureBasedExportOperation
- * @see FeatureExportOperation
- */
-public class SiteBuildOperation extends FeatureBasedExportOperation {
-
-	private long fBuildTime;
-
-	private IFeatureModel[] fFeatureModels;
-	private ISiteModel fSiteModel;
-	private IContainer fSiteContainer;
-
-	public SiteBuildOperation(IFeatureModel[] features, ISiteModel site, String jobName) {
-		super(getInfo(features, site), jobName);
-		fFeatureModels = features;
-		fSiteModel = site;
-		fSiteContainer = site.getUnderlyingResource().getParent();
-		setRule(MultiRule.combine(fSiteContainer.getProject(), getRule()));
-	}
-
-	private static FeatureExportInfo getInfo(IFeatureModel[] models, ISiteModel siteModel) {
-		FeatureExportInfo info = new FeatureExportInfo();
-		info.useJarFormat = true;
-		info.toDirectory = true;
-		info.allowBinaryCycles = true;
-		info.destinationDirectory = siteModel.getUnderlyingResource().getParent().getLocation().toOSString();
-		info.items = models;
-		return info;
-	}
-
-	protected IStatus run(IProgressMonitor monitor) {
-		fBuildTime = System.currentTimeMillis();
-		IStatus status = super.run(monitor);
-		try {
-			fSiteContainer.refreshLocal(IResource.DEPTH_INFINITE, monitor);
-			updateSiteFeatureVersions();
-		} catch (CoreException ce) {
-			return ce.getStatus();
-		}
-		return status;
-	}
-
-	private void updateSiteFeatureVersions() throws CoreException {
-		for (int i = 0; i < fFeatureModels.length; i++) {
-			IFeature feature = fFeatureModels[i].getFeature();
-			Version pvi = Version.parseVersion(feature.getVersion());
-
-			if ("qualifier".equals(pvi.getQualifier())) { //$NON-NLS-1$
-				String newVersion = findBuiltVersion(feature.getId(), pvi.getMajor(), pvi.getMinor(), pvi.getMicro());
-				if (newVersion == null) {
-					continue;
-				}
-				ISiteFeature reVersionCandidate = findSiteFeature(feature, pvi);
-				if (reVersionCandidate != null) {
-					reVersionCandidate.setVersion(newVersion);
-					reVersionCandidate.setURL("features/" + feature.getId() + "_" //$NON-NLS-1$ //$NON-NLS-2$
-							+ newVersion + ".jar"); //$NON-NLS-1$
-				}
-			}
-		}
-		((WorkspaceSiteModel) fSiteModel).save();
-	}
-
-	private ISiteFeature findSiteFeature(IFeature feature, Version pvi) {
-		ISiteFeature reversionCandidate = null;
-		// first see if version with qualifier being qualifier is present among
-		// site features
-		ISiteFeature[] siteFeatures = fSiteModel.getSite().getFeatures();
-		for (int s = 0; s < siteFeatures.length; s++) {
-			if (siteFeatures[s].getId().equals(feature.getId()) && siteFeatures[s].getVersion().equals(feature.getVersion())) {
-				return siteFeatures[s];
-			}
-		}
-		String highestQualifier = null;
-		// then find feature with the highest qualifier
-		for (int s = 0; s < siteFeatures.length; s++) {
-			if (siteFeatures[s].getId().equals(feature.getId())) {
-				Version candidatePvi = Version.parseVersion(siteFeatures[s].getVersion());
-				if (pvi.getMajor() == candidatePvi.getMajor() && pvi.getMinor() == candidatePvi.getMinor() && pvi.getMicro() == candidatePvi.getMicro()) {
-					if (reversionCandidate == null || candidatePvi.getQualifier().compareTo(highestQualifier) > 0) {
-						reversionCandidate = siteFeatures[s];
-						highestQualifier = candidatePvi.getQualifier();
-					}
-				}
-			}
-		}
-		return reversionCandidate;
-	}
-
-	/**
-	 * Finds the highest version from feature jars. ID and version components
-	 * are constant. Qualifier varies
-	 * 
-	 * @param builtJars
-	 *            candidate jars in format id_version.jar
-	 * @param id
-	 * @param major
-	 * @param minor
-	 * @param service
-	 */
-	private String findBuiltVersion(String id, int major, int minor, int service) {
-		IFolder featuresFolder = fSiteContainer.getFolder(new Path("features")); //$NON-NLS-1$
-		if (!featuresFolder.exists()) {
-			return null;
-		}
-		IResource[] featureJars = null;
-		try {
-			featureJars = featuresFolder.members();
-		} catch (CoreException ce) {
-			return null;
-		}
-		Pattern pattern = PatternConstructor.createPattern(id + "_" //$NON-NLS-1$
-				+ major + "." //$NON-NLS-1$
-				+ minor + "." //$NON-NLS-1$
-				+ service + "*.jar", true); //$NON-NLS-1$ 
-		// finding the newest feature archive
-		String newestName = null;
-		long newestTime = 0;
-		for (int i = 0; i < featureJars.length; i++) {
-			File file = new File(featureJars[i].getLocation().toOSString());
-			long jarTime = file.lastModified();
-			String jarName = featureJars[i].getName();
-
-			if (jarTime < fBuildTime) {
-				continue;
-			}
-			if (jarTime <= newestTime) {
-				continue;
-			}
-			if (pattern.matcher(jarName).matches()) {
-				newestName = featureJars[i].getName();
-				newestTime = jarTime;
-			}
-		}
-		if (newestName == null) {
-			return null;
-		}
-
-		return newestName.substring(id.length() + 1, newestName.length() - 4);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation#createPostProcessingFiles()
-	 */
-	protected void createPostProcessingFiles() {
-		createPostProcessingFile(new File(fFeatureLocation, FEATURE_POST_PROCESSING));
-		createPostProcessingFile(new File(fFeatureLocation, PLUGIN_POST_PROCESSING));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#publishingP2Metadata()
-	 */
-	protected boolean publishingP2Metadata() {
-		return true;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#setP2MetaDataProperties(java.util.Map)
-	 */
-	protected void setP2MetaDataProperties(Map map) {
-		if (fInfo.toDirectory) {
-			map.put(IXMLConstants.TARGET_P2_METADATA, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_FLAVOR, P2Utils.P2_FLAVOR_DEFAULT);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_PUBLISH_ARTIFACTS, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_FINAL_MODE_OVERRIDE, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_COMPRESS, IBuildPropertiesConstants.TRUE);
-			map.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, Boolean.toString(publishingP2Metadata()));
-			IResource siteXML = fSiteModel.getUnderlyingResource();
-			if (siteXML.exists() && siteXML.getLocationURI() != null) {
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_CATEGORY_SITE, URIUtil.toUnencodedString(siteXML.getLocationURI()));
-			}
-			ISiteDescription description = fSiteModel.getSite().getDescription();
-			if (description != null && description.getName() != null && description.getName().length() > 0) {
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO_NAME, description.getName());
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO_NAME, description.getName());
-			}
-			try {
-				String destination = new File(fBuildTempMetadataLocation).toURL().toString();
-				map.put(IBuildPropertiesConstants.PROPERTY_P2_BUILD_REPO, destination);
-			} catch (MalformedURLException e) {
-				PDECore.log(e);
-			}
-		}
-	}
-
-}
+package org.eclipse.pde.internal.core.exports;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.Map;
+import java.util.regex.Pattern;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.MultiRule;
+import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
+import org.eclipse.pde.internal.build.IXMLConstants;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.IFeature;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.isite.*;
+import org.eclipse.pde.internal.core.site.WorkspaceSiteModel;
+import org.eclipse.pde.internal.core.util.PatternConstructor;
+import org.osgi.framework.Version;
+
+/**
+ * Performs a site build operation that will build any features needed by the site and generate
+ * p2 metadata for those features.
+ * 
+ * @see FeatureBasedExportOperation
+ * @see FeatureExportOperation
+ */
+public class SiteBuildOperation extends FeatureBasedExportOperation {
+
+	private long fBuildTime;
+
+	private IFeatureModel[] fFeatureModels;
+	private ISiteModel fSiteModel;
+	private IContainer fSiteContainer;
+
+	public SiteBuildOperation(IFeatureModel[] features, ISiteModel site, String jobName) {
+		super(getInfo(features, site), jobName);
+		fFeatureModels = features;
+		fSiteModel = site;
+		fSiteContainer = site.getUnderlyingResource().getParent();
+		setRule(MultiRule.combine(fSiteContainer.getProject(), getRule()));
+	}
+
+	private static FeatureExportInfo getInfo(IFeatureModel[] models, ISiteModel siteModel) {
+		FeatureExportInfo info = new FeatureExportInfo();
+		info.useJarFormat = true;
+		info.toDirectory = true;
+		info.allowBinaryCycles = true;
+		info.destinationDirectory = siteModel.getUnderlyingResource().getParent().getLocation().toOSString();
+		info.items = models;
+		return info;
+	}
+
+	protected IStatus run(IProgressMonitor monitor) {
+		fBuildTime = System.currentTimeMillis();
+		IStatus status = super.run(monitor);
+		try {
+			fSiteContainer.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+			updateSiteFeatureVersions();
+		} catch (CoreException ce) {
+			return ce.getStatus();
+		}
+		return status;
+	}
+
+	private void updateSiteFeatureVersions() throws CoreException {
+		for (int i = 0; i < fFeatureModels.length; i++) {
+			IFeature feature = fFeatureModels[i].getFeature();
+			Version pvi = Version.parseVersion(feature.getVersion());
+
+			if ("qualifier".equals(pvi.getQualifier())) { //$NON-NLS-1$
+				String newVersion = findBuiltVersion(feature.getId(), pvi.getMajor(), pvi.getMinor(), pvi.getMicro());
+				if (newVersion == null) {
+					continue;
+				}
+				ISiteFeature reVersionCandidate = findSiteFeature(feature, pvi);
+				if (reVersionCandidate != null) {
+					reVersionCandidate.setVersion(newVersion);
+					reVersionCandidate.setURL("features/" + feature.getId() + "_" //$NON-NLS-1$ //$NON-NLS-2$
+							+ newVersion + ".jar"); //$NON-NLS-1$
+				}
+			}
+		}
+		((WorkspaceSiteModel) fSiteModel).save();
+	}
+
+	private ISiteFeature findSiteFeature(IFeature feature, Version pvi) {
+		ISiteFeature reversionCandidate = null;
+		// first see if version with qualifier being qualifier is present among
+		// site features
+		ISiteFeature[] siteFeatures = fSiteModel.getSite().getFeatures();
+		for (int s = 0; s < siteFeatures.length; s++) {
+			if (siteFeatures[s].getId().equals(feature.getId()) && siteFeatures[s].getVersion().equals(feature.getVersion())) {
+				return siteFeatures[s];
+			}
+		}
+		String highestQualifier = null;
+		// then find feature with the highest qualifier
+		for (int s = 0; s < siteFeatures.length; s++) {
+			if (siteFeatures[s].getId().equals(feature.getId())) {
+				Version candidatePvi = Version.parseVersion(siteFeatures[s].getVersion());
+				if (pvi.getMajor() == candidatePvi.getMajor() && pvi.getMinor() == candidatePvi.getMinor() && pvi.getMicro() == candidatePvi.getMicro()) {
+					if (reversionCandidate == null || candidatePvi.getQualifier().compareTo(highestQualifier) > 0) {
+						reversionCandidate = siteFeatures[s];
+						highestQualifier = candidatePvi.getQualifier();
+					}
+				}
+			}
+		}
+		return reversionCandidate;
+	}
+
+	/**
+	 * Finds the highest version from feature jars. ID and version components
+	 * are constant. Qualifier varies
+	 * 
+	 * @param builtJars
+	 *            candidate jars in format id_version.jar
+	 * @param id
+	 * @param major
+	 * @param minor
+	 * @param service
+	 */
+	private String findBuiltVersion(String id, int major, int minor, int service) {
+		IFolder featuresFolder = fSiteContainer.getFolder(new Path("features")); //$NON-NLS-1$
+		if (!featuresFolder.exists()) {
+			return null;
+		}
+		IResource[] featureJars = null;
+		try {
+			featureJars = featuresFolder.members();
+		} catch (CoreException ce) {
+			return null;
+		}
+		Pattern pattern = PatternConstructor.createPattern(id + "_" //$NON-NLS-1$
+				+ major + "." //$NON-NLS-1$
+				+ minor + "." //$NON-NLS-1$
+				+ service + "*.jar", true); //$NON-NLS-1$ 
+		// finding the newest feature archive
+		String newestName = null;
+		long newestTime = 0;
+		for (int i = 0; i < featureJars.length; i++) {
+			File file = new File(featureJars[i].getLocation().toOSString());
+			long jarTime = file.lastModified();
+			String jarName = featureJars[i].getName();
+
+			if (jarTime < fBuildTime) {
+				continue;
+			}
+			if (jarTime <= newestTime) {
+				continue;
+			}
+			if (pattern.matcher(jarName).matches()) {
+				newestName = featureJars[i].getName();
+				newestTime = jarTime;
+			}
+		}
+		if (newestName == null) {
+			return null;
+		}
+
+		return newestName.substring(id.length() + 1, newestName.length() - 4);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation#createPostProcessingFiles()
+	 */
+	protected void createPostProcessingFiles() {
+		createPostProcessingFile(new File(fFeatureLocation, FEATURE_POST_PROCESSING));
+		createPostProcessingFile(new File(fFeatureLocation, PLUGIN_POST_PROCESSING));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#publishingP2Metadata()
+	 */
+	protected boolean publishingP2Metadata() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.exports.FeatureExportOperation#setP2MetaDataProperties(java.util.Map)
+	 */
+	protected void setP2MetaDataProperties(Map map) {
+		if (fInfo.toDirectory) {
+			map.put(IXMLConstants.TARGET_P2_METADATA, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_FLAVOR, P2Utils.P2_FLAVOR_DEFAULT);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_PUBLISH_ARTIFACTS, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_FINAL_MODE_OVERRIDE, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_COMPRESS, IBuildPropertiesConstants.TRUE);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_GATHERING, Boolean.toString(publishingP2Metadata()));
+			IResource siteXML = fSiteModel.getUnderlyingResource();
+			if (siteXML.exists() && siteXML.getLocationURI() != null) {
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_CATEGORY_SITE, URIUtil.toUnencodedString(siteXML.getLocationURI()));
+			}
+
+			ISiteDescription description = fSiteModel.getSite().getDescription();
+			String name = description != null && description.getName() != null && description.getName().length() > 0 ? description.getName() : PDECoreMessages.SiteBuildOperation_0;
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_METADATA_REPO_NAME, name);
+			map.put(IBuildPropertiesConstants.PROPERTY_P2_ARTIFACT_REPO_NAME, name);
+
+			try {
+				String destination = new File(fBuildTempMetadataLocation).toURL().toString();
+				map.put(IBuildPropertiesConstants.PROPERTY_P2_BUILD_REPO, destination);
+			} catch (MalformedURLException e) {
+				PDECore.log(e);
+			}
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/WorkspaceExportHelper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/WorkspaceExportHelper.java
index 312efdb..26c53b6 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/WorkspaceExportHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/WorkspaceExportHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
 import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.ifeature.IFeaturePlugin;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 /**
  * Helper class for the various export operation classes, making it easier to export using workspace
@@ -106,7 +107,7 @@ public class WorkspaceExportHelper extends LaunchConfigurationDelegate {
 		IProject[] projects = getExportedWorkspaceProjects(exportedItems);
 		Map result = new HashMap(projects.length);
 		for (int i = 0; i < projects.length; i++) {
-			IFile buildFile = projects[i].getFile("build.properties"); //$NON-NLS-1$
+			IFile buildFile = PDEProject.getBuildProperties(projects[i]);
 			if (buildFile.exists()) {
 				IBuildModel buildModel = new WorkspaceBuildModel(buildFile);
 				buildModel.load();
@@ -175,10 +176,12 @@ public class WorkspaceExportHelper extends LaunchConfigurationDelegate {
 					IFeaturePlugin[] plugins = feature.getFeature().getPlugins();
 					for (int j = 0; j < plugins.length; j++) {
 						IPluginModelBase plugin = PDECore.getDefault().getModelManager().findModel(plugins[j].getId());
-						IPath installLocation = new Path(plugin.getInstallLocation());
-						IProject project = PDECore.getWorkspace().getRoot().getProject(installLocation.lastSegment());
-						if (project.exists()) {
-							projects.add(project);
+						if (plugin != null) {
+							IPath installLocation = new Path(plugin.getInstallLocation());
+							IProject project = PDECore.getWorkspace().getRoot().getProject(installLocation.lastSegment());
+							if (project.exists()) {
+								projects.add(project);
+							}
 						}
 					}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureChild.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureChild.java
index 764a0e9..d76565b 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureChild.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureChild.java
@@ -1,22 +1,20 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core.feature;
 
 import java.io.PrintWriter;
-
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.core.IWritable;
 import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureChild;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.*;
 import org.w3c.dom.Node;
 
 public class FeatureChild extends IdentifiableObject implements IFeatureChild {
@@ -30,6 +28,7 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 	private String fWs;
 	private String fArch;
 	private String fNl;
+	private String fFilter;
 
 	protected void reset() {
 		super.reset();
@@ -42,6 +41,7 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 		fWs = null;
 		fArch = null;
 		fNl = null;
+		fFilter = null;
 	}
 
 	protected void parse(Node node) {
@@ -53,6 +53,7 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 		fWs = getNodeAttribute(node, "ws"); //$NON-NLS-1$
 		fArch = getNodeAttribute(node, "arch"); //$NON-NLS-1$
 		fNl = getNodeAttribute(node, "nl"); //$NON-NLS-1$
+		fFilter = getNodeAttribute(node, "filter"); //$NON-NLS-1$
 		String matchName = getNodeAttribute(node, "match"); //$NON-NLS-1$
 		if (matchName != null) {
 			for (int i = 0; i < RULE_NAME_TABLE.length; i++) {
@@ -122,6 +123,10 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 		return fNl;
 	}
 
+	public String getFilter() {
+		return fFilter;
+	}
+
 	public IFeature getReferencedFeature() {
 		IFeatureModel workspaceModel = PDECore.getDefault().getFeatureModelManager().findFeatureModel(getId(), fVersion);
 		if (workspaceModel != null) {
@@ -196,6 +201,13 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 		firePropertyChanged(P_NL, oldValue, nl);
 	}
 
+	public void setFilter(String filter) throws CoreException {
+		ensureModelEditable();
+		Object oldValue = this.fFilter;
+		this.fFilter = filter;
+		firePropertyChanged(P_FILTER, oldValue, filter);
+	}
+
 	public void restoreProperty(String name, Object oldValue, Object newValue) throws CoreException {
 		if (name.equals(P_VERSION)) {
 			setVersion((String) newValue);
@@ -270,6 +282,12 @@ public class FeatureChild extends IdentifiableObject implements IFeatureChild {
 			String value = fSearchLocation == SELF ? "self" : "both"; //$NON-NLS-1$ //$NON-NLS-2$
 			writer.print(indent2 + "search-location=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 		}
+
+		if (getFilter() != null) {
+			writer.println();
+			writer.print(indent2 + "filter=\"" + getFilter() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
 		writer.println("/>"); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureData.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureData.java
index 784f51c..6948a21 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureData.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureData.java
@@ -1,18 +1,17 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core.feature;
 
 import java.io.File;
 import java.io.PrintWriter;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.internal.core.ifeature.IFeatureData;
 import org.w3c.dom.Node;
@@ -23,6 +22,7 @@ public class FeatureData extends IdentifiableObject implements IFeatureData {
 	private String ws;
 	private String nl;
 	private String arch;
+	private String filter;
 	private long downloadSize;
 	private long installSize;
 
@@ -53,6 +53,7 @@ public class FeatureData extends IdentifiableObject implements IFeatureData {
 		ws = getNodeAttribute(node, "ws"); //$NON-NLS-1$
 		nl = getNodeAttribute(node, "nl"); //$NON-NLS-1$
 		arch = getNodeAttribute(node, "arch"); //$NON-NLS-1$
+		filter = getNodeAttribute(node, "filter"); //$NON-NLS-1$
 		downloadSize = getIntegerAttribute(node, "download-size"); //$NON-NLS-1$
 		installSize = getIntegerAttribute(node, "install-size"); //$NON-NLS-1$
 	}
@@ -63,6 +64,7 @@ public class FeatureData extends IdentifiableObject implements IFeatureData {
 		writeAttribute("ws", getWS(), indent2, writer); //$NON-NLS-1$
 		writeAttribute("nl", getNL(), indent2, writer); //$NON-NLS-1$
 		writeAttribute("arch", getArch(), indent2, writer); //$NON-NLS-1$
+		writeAttribute("filter", getFilter(), indent2, writer); //$NON-NLS-1$
 		writer.println();
 		writer.print(indent2 + "download-size=\"" + getDownloadSize() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println();
@@ -165,6 +167,24 @@ public class FeatureData extends IdentifiableObject implements IFeatureData {
 	}
 
 	/**
+	 * Get the LDAP filter
+	 * @return the filter or null
+	 */
+	public String getFilter() {
+		return filter;
+	}
+
+	/** Set the LDAP filter
+	 * @param filter The filter to set
+	 */
+	public void setFilter(String filter) throws CoreException {
+		ensureModelEditable();
+		Object oldValue = this.filter;
+		this.filter = filter;
+		firePropertyChanged(P_FILTER, oldValue, filter);
+	}
+
+	/**
 	 * Gets the downloadSize.
 	 * @return Returns a int
 	 */
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureImport.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureImport.java
index bce7f7d..9f2687d 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureImport.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/feature/FeatureImport.java
@@ -1,26 +1,20 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core.feature;
 
 import java.io.PrintWriter;
-
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.pde.core.plugin.IPlugin;
-import org.eclipse.pde.core.plugin.IPluginModel;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.core.ifeature.IFeatureImport;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.util.VersionUtil;
 import org.w3c.dom.Node;
 
@@ -30,6 +24,7 @@ public class FeatureImport extends VersionableObject implements IFeatureImport {
 	private int fIdMatch = PERFECT;
 	private int fType = PLUGIN;
 	private boolean fPatch = false;
+	private String fFilter = null;
 
 	public FeatureImport() {
 	}
@@ -86,6 +81,7 @@ public class FeatureImport extends VersionableObject implements IFeatureImport {
 		fType = PLUGIN;
 		fMatch = NONE;
 		fIdMatch = PERFECT;
+		fFilter = null;
 	}
 
 	protected void parse(Node node) {
@@ -109,12 +105,12 @@ public class FeatureImport extends VersionableObject implements IFeatureImport {
 			}
 		}
 		mvalue = getNodeAttribute(node, "id-match"); //$NON-NLS-1$
-
 		if (mvalue != null && mvalue.length() > 0) {
 			if (mvalue.equalsIgnoreCase(RULE_PREFIX))
 				fIdMatch = PREFIX;
 		}
 		fPatch = getBooleanAttribute(node, "patch"); //$NON-NLS-1$
+		fFilter = getNodeAttribute(node, "filter"); //$NON-NLS-1$
 	}
 
 	public void loadFrom(IFeature feature) {
@@ -193,6 +189,9 @@ public class FeatureImport extends VersionableObject implements IFeatureImport {
 		if (fPatch) {
 			writer.print(" patch=\"true\""); //$NON-NLS-1$
 		}
+		if (fFilter != null) {
+			writer.print(" filter=\"" + fFilter + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		}
 		writer.println("/>"); //$NON-NLS-1$
 	}
 
@@ -205,4 +204,13 @@ public class FeatureImport extends VersionableObject implements IFeatureImport {
 			return feature.getLabel();
 		return getId();
 	}
+
+	public String getFilter() {
+		return fFilter;
+	}
+
+	public void setFilter(String filter) throws CoreException {
+		this.fFilter = filter;
+
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundle.java
index 2044cf0..2059c30 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,6 +12,13 @@ package org.eclipse.pde.internal.core.ibundle;
 
 public interface IBundle {
 
+	/**
+	 * Sets the value of a header in this bundle.  If the value is <code>null</code> the header will be removed from the bundle.
+	 * 
+	 * @param key header name
+	 * @param value value to set the header to, or <code>null</code> or an <b>EMPTY STRING</b> to remove the header.
+	 *   A non-zero length empty string sets an empty header.
+	 */
 	void setHeader(String key, String value);
 
 	void renameHeader(String key, String newKey);
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundleModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundleModel.java
index 8c264fb..05dd046 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundleModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ibundle/IBundleModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IModelChangeProvider;
 
 /**
- * This model is created from the "META-INF/MANIFEST.MF" file that represents
+ * This model is created from the <code>META-INF/MANIFEST.MF</code> file that represents
  * the plug-in manifest in Eclipse 3.0 OSGi format.
  * <p>
  * If this model is editable, isEditable() will return true and the model
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureChild.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureChild.java
index 7b372c6..232a50f 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureChild.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureChild.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core.ifeature;
@@ -22,6 +22,7 @@ public interface IFeatureChild extends IFeatureObject, IIdentifiable, IMatchRule
 	String P_OPTIONAL = "optional"; //$NON-NLS-1$
 	String P_NAME = "name"; //$NON-NLS-1$
 	String P_MATCH = "match"; //$NON-NLS-1$
+	String P_FILTER = "filter"; //$NON-NLS-1$
 	String P_SEARCH_LOCATION = "search-location"; //$NON-NLS-1$
 
 	int ROOT = 0;
@@ -48,4 +49,7 @@ public interface IFeatureChild extends IFeatureObject, IIdentifiable, IMatchRule
 
 	void setMatch(int match) throws CoreException;
 
+	String getFilter();
+
+	void setFilter(String filter) throws CoreException;
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureEntry.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureEntry.java
index 0f8debc..cf795c8 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureEntry.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureEntry.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.core.ifeature;
@@ -21,6 +21,7 @@ public interface IFeatureEntry extends IFeatureObject, IIdentifiable {
 	String P_WS = "p_ws"; //$NON-NLS-1$
 	String P_NL = "p_nl"; //$NON-NLS-1$
 	String P_ARCH = "p_arch"; //$NON-NLS-1$
+	String P_FILTER = "p_filter"; //$NON-NLS-1$
 	String P_DOWNLOAD_SIZE = "p_download_size"; //$NON-NLS-1$
 	String P_INSTALL_SIZE = "p_install_size"; //$NON-NLS-1$
 
@@ -45,6 +46,11 @@ public interface IFeatureEntry extends IFeatureObject, IIdentifiable {
 	public String getArch();
 
 	/**
+	 * Returns an LDAP filter that must be satisfied for this entry 
+	 */
+	public String getFilter();
+
+	/**
 	 * 	Returns estimated download size of this plug-in.
 	 */
 	public long getDownloadSize();
@@ -75,6 +81,11 @@ public interface IFeatureEntry extends IFeatureObject, IIdentifiable {
 	public void setArch(String arch) throws CoreException;
 
 	/**
+	 * Sets an LDAP filter on this plugin
+	 */
+	public void setFilter(String filter) throws CoreException;
+
+	/**
 	 * 	Sets the estimated download size of this plug-in.
 	 */
 	public void setDownloadSize(long size) throws CoreException;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureImport.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureImport.java
index b53b9c4..96f94d1 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureImport.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureImport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,4 +35,8 @@ public interface IFeatureImport extends IFeatureObject, IPluginReference {
 	int getIdMatch();
 
 	void setIdMatch(int idMatch) throws CoreException;
+
+	String getFilter();
+
+	void setFilter(String filter) throws CoreException;
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureModel.java
index 9addc43..b4518fd 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ifeature/IFeatureModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import org.eclipse.pde.core.IModelChangeProvider;
 
 /**
  * This model type is designed to hold data loaded from
- * "feature.xml" file of an Eclipse feature.
+ * feature.xml file of an Eclipse feature.
  */
 public interface IFeatureModel extends IModel, IModelChangeProvider {
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/BundleImporterExtension.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/BundleImporterExtension.java
new file mode 100644
index 0000000..e8f852b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/BundleImporterExtension.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing;
+
+import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
+
+/**
+ * A bundle importer extension.
+ * 
+ * @since 3.6
+ */
+public class BundleImporterExtension implements IBundleImporter {
+
+	private IBundleImporterDelegate delegate;
+	private IConfigurationElement element;
+
+	/**
+	 * Constructs a bundle importer extension on the given element.
+	 * 
+	 * @param element contribution
+	 */
+	public BundleImporterExtension(IConfigurationElement element) {
+		this.element = element;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleImporterDelegate#validateImport(java.util.Map[])
+	 */
+	public BundleImportDescription[] validateImport(Map[] manifests) {
+		try {
+			return getDelegate().validateImport(manifests);
+		} catch (CoreException e) {
+			PDECore.log(e);
+			return null;
+		}
+	}
+
+	/**
+	 * Returns underlying delegate.
+	 * 
+	 * @return delegate
+	 * @exception CoreException if unable to instantiate delegate
+	 */
+	private synchronized IBundleImporterDelegate getDelegate() throws CoreException {
+		if (delegate == null) {
+			delegate = (IBundleImporterDelegate) element.createExecutableExtension("class"); //$NON-NLS-1$
+		}
+		return delegate;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.importing.IBundleImporterDelegate#performImport(org.eclipse.pde.core.importing.BundleImportDescription[], org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IProject[] performImport(BundleImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException {
+		return getDelegate().performImport(descriptions, monitor);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleImporter#getId()
+	 */
+	public String getId() {
+		return element.getAttribute("id"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleImporter#getDescription()
+	 */
+	public String getDescription() {
+		return element.getAttribute("description"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleImporter#getName()
+	 */
+	public String getName() {
+		return element.getAttribute("name"); //$NON-NLS-1$
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImportDescription.java
new file mode 100644
index 0000000..b8290dd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImportDescription.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing;
+
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+
+import java.util.Map;
+
+/**
+ * Describes a bundle to be imported by CVS.
+ * @since 3.6
+ */
+public class CvsBundleImportDescription extends BundleImportDescription {
+
+	String tag;
+	String server;
+	String path;
+	String module;
+	String protocol;
+
+	/**
+	 * @param project
+	 * @param manifest
+	 */
+	public CvsBundleImportDescription(String project, Map manifest, String protocol, String server, String path, String module, String tag) {
+		super(project, manifest);
+		this.protocol = protocol;
+		this.server = server;
+		this.path = path;
+		this.module = module;
+		this.tag = tag;
+	}
+
+	public void setTag(String tag) {
+		this.tag = tag;
+	}
+
+	public String getTag() {
+		return tag;
+	}
+
+	public String getServer() {
+		return server;
+	}
+
+	public String getPath() {
+		return path;
+	}
+
+	public String getModule() {
+		return module;
+	}
+
+	public String getProtocol() {
+		return protocol;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImporterDelegate.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImporterDelegate.java
new file mode 100644
index 0000000..04419b5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/CvsBundleImporterDelegate.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing;
+
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
+
+import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.team.core.*;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+/**
+ * Handles SCM CVS headers of the following form. Tag and project name can be specified
+ * as extra attributes. When a tag is unspecified, the HEAD tag is used. When a project
+ * name is unspecified, it is generated by the module name.
+ * <pre>
+ * scm:cvs<delimiter><method><delimiter>path_to_repository<delimiter>module_name[;tag=version][;project=name]
+ * scm:psf<delimiter><method><delimiter>path_to_repository<delimiter>module_name[;tag=version][;project=name]
+ * </pre>
+ * @since 3.6
+ */
+/**
+ *
+ */
+public class CvsBundleImporterDelegate implements IBundleImporterDelegate {
+
+	private static Set SUPPORTED_VALUES;
+
+	private static final String SCM = "scm:"; //$NON-NLS-1$
+	private static final String CVS = "cvs"; //$NON-NLS-1$
+//	private static final String PSF = "psf"; //$NON-NLS-1$
+	private static final String COLON = ":"; //$NON-NLS-1$
+	private static final String PIPE = "|"; //$NON-NLS-1$
+
+	private static final String ATTR_TAG = "tag"; //$NON-NLS-1$
+	private static final String ATTR_PROJECT = "project"; //$NON-NLS-1$
+
+	private static RepositoryProviderType CVS_PROVIDER_TYPE = RepositoryProviderType.getProviderType("org.eclipse.team.cvs.core.cvsnature"); //$NON-NLS-1$
+
+	static {
+		SUPPORTED_VALUES = new HashSet();
+		SUPPORTED_VALUES.add(SCM + CVS + COLON);
+		SUPPORTED_VALUES.add(SCM + CVS + PIPE);
+//		SUPPORTED_VALUES.add(SCM + PSF + COLON);
+//		SUPPORTED_VALUES.add(SCM + PSF + PIPE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleImporterDelegate#validateImport(java.util.Map[])
+	 */
+	public BundleImportDescription[] validateImport(Map[] manifests) {
+		BundleImportDescription[] results = new BundleImportDescription[manifests.length];
+		if (CVS_PROVIDER_TYPE != null) {
+			for (int i = 0; i < manifests.length; i++) {
+				Map manifest = manifests[i];
+				String value = (String) manifest.get(ICoreConstants.ECLIPSE_SOURCE_REFERENCES);
+				if (value != null && value.length() > 8) {
+					String prefix = value.substring(0, 8);
+					if (SUPPORTED_VALUES.contains(prefix)) {
+						try {
+							ManifestElement[] elements = ManifestElement.parseHeader(ICoreConstants.ECLIPSE_SOURCE_REFERENCES, value);
+							for (int j = 0; j < elements.length; j++) {
+								ManifestElement element = elements[j];
+								String url = element.getValue();
+								String tag = element.getAttribute(ATTR_TAG);
+								String project = element.getAttribute(ATTR_PROJECT);
+								if (project == null) {
+									String bsn = (String) manifests[i].get(Constants.BUNDLE_SYMBOLICNAME);
+									if (bsn != null) {
+										ManifestElement[] bsnElement = ManifestElement.parseHeader(Constants.BUNDLE_SYMBOLICNAME, bsn);
+										project = bsnElement[0].getValue();
+									}
+								}
+								results[i] = createImportDescription(url, manifest, tag, project);
+							}
+						} catch (BundleException e) {
+							PDECore.log(e);
+						}
+					}
+				}
+			}
+		}
+		return results;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.importing.IBundleImporterDelegate#performImport(org.eclipse.pde.core.importing.BundleImportDescription[], org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IProject[] performImport(BundleImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException {
+		List references = new ArrayList();
+		// collect and validate all header values
+		for (int i = 0; i < descriptions.length; i++) {
+			references.add(createPSF((CvsBundleImportDescription) descriptions[i]));
+		}
+		// create projects
+		if (!references.isEmpty()) {
+			SubMonitor subMonitor = SubMonitor.convert(monitor, references.size());
+			ProjectSetCapability psfCapability = CVS_PROVIDER_TYPE.getProjectSetCapability();
+			if (psfCapability != null) {
+				// TODO: specify shell
+				psfCapability.addToWorkspace((String[]) references.toArray(new String[references.size()]), new ProjectSetSerializationContext(), subMonitor);
+			} else {
+				//TODO: error
+			}
+			subMonitor.done();
+		}
+		return null;
+	}
+
+	/**
+	 * Constructs a CVS project set import description from an SCMURL.
+	 * 
+	 * @param url
+	 * @param manifest bundle manifest
+	 * @param tag attribute value or <code>null</code>
+	 * @param project suggested project name or <code>null</code>
+	 * @return corresponding CVS project set reference
+	 */
+	private BundleImportDescription createImportDescription(String url, Map manifest, String tag, String project) {
+		// format is 1.0,protocol:host:cvs folder,project name [, tag]
+		String suffix = url.substring(8);
+		String sep = url.substring(7, 8);
+		String[] pieces = suffix.split(sep);
+		String protocol = pieces[0];
+		// the last piece is the module name
+		String module = pieces[pieces.length - 1];
+		// path is the second last piece
+		String path = pieces[pieces.length - 2];
+		// there might be a user:password:server:port
+		int index = pieces.length - 3; // start looking at the third last piece and work backwards
+		// if it's a port number, keep moving back
+		String server = null;
+		try {
+			Integer.parseInt(pieces[index]);
+			index--;
+			server = pieces[index];
+		} catch (NumberFormatException e) {
+			server = pieces[index];
+		}
+		// trim any user/password
+		index = server.indexOf('@');
+		if (index >= 0) {
+			server = server.substring(index + 1);
+		}
+		if (project == null) {
+			// use module name as default
+			int slash = pieces[3].lastIndexOf('/');
+			if (slash >= 0) {
+				project = pieces[3].substring(slash + 1);
+			} else {
+				project = pieces[3];
+			}
+		}
+		return new CvsBundleImportDescription(project, manifest, protocol, server, path, module, tag);
+	}
+
+	/**
+	 * Constructs a CVS project set import description from an SCMURL.
+	 * 
+	 * @param url
+	 * @param tag attribute value or <code>null</code>
+	 * @param project suggested project name or <code>null</code>
+	 * @return corresponding CVS project set reference
+	 */
+	private String createPSF(CvsBundleImportDescription description) {
+		// format is 1.0,protocol:host:cvs folder,project name [, tag]
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("1.0,:"); //$NON-NLS-1$
+		buffer.append(description.protocol); // protocol
+		buffer.append(COLON);
+		buffer.append(description.server);
+		buffer.append(COLON);
+		buffer.append(description.path);
+		buffer.append(',');
+		buffer.append(description.module);
+		buffer.append(',');
+		buffer.append(description.getProject());
+		String tag = description.tag;
+		if (tag != null) {
+			buffer.append(',');
+			buffer.append(tag);
+		}
+		return buffer.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/IBundleImporter.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/IBundleImporter.java
new file mode 100644
index 0000000..430c143
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/IBundleImporter.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing;
+
+import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
+
+/**
+ * A bundle importer represents an instance of a bundle importer extension.
+ * Clients contributing a bundle importer extension contribute an implementation
+ * of {@link IBundleImporterDelegate} rather than this interface.
+ * <p>
+ * Clients contributing a bundle importer extension are intended to implement
+ * {@link IBundleImporterDelegate}.
+ * </p>
+ * @since 3.6
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IBundleImporter extends IBundleImporterDelegate {
+
+	/**
+	 * Returns this impoter's unique identifier.
+	 * 
+	 * @return identifier
+	 */
+	public String getId();
+
+	/**
+	 * Returns a short description of this importer, or <code>null</code> if unspecified.
+	 * 
+	 * @return description or <code>null</code>
+	 */
+	public String getDescription();
+
+	/**
+	 * Returns a human readable name for this importer.
+	 * 
+	 * @return name
+	 */
+	public String getName();
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/BundleImportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/BundleImportDescription.java
new file mode 100644
index 0000000..20c34e8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/BundleImportDescription.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing.provisional;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Describes how a bundle import will be executed. A bundle importer delegate
+ * creates bundle import descriptions when it validates bundle manifests for
+ * importing. When asked to import bundles, it is passed back the instances
+ * of bundle import descriptions is created. However, the target project
+ * may have been modified and properties may have been modified.
+ * <p>
+ * Clients may instantiate this class. Clients may subclass this class to
+ * implement model specific behavior and include model specific data in import
+ * descriptions.
+ * </p> 
+ * <p>
+ * <strong>EXPERIMENTAL</strong>. This class has been added as
+ * part of a work in progress. There is no guarantee that this API will
+ * work or that it will remain the same. Please do not use this API without
+ * consulting with the PDE team.
+ * </p>
+ * @since 3.6
+ */
+public class BundleImportDescription {
+
+	private String project;
+	private Map manifest;
+	private Map properties;
+
+	/**
+	 * Constructs a bundle import description with given project and manifest.
+	 * 
+	 * @param project the project the bundle should be imported into which may
+	 *  or may not exist
+	 * @param manifest bundle manifest headers and values
+	 */
+	public BundleImportDescription(String project, Map manifest) {
+		this.project = project;
+		this.manifest = manifest;
+	}
+
+	/**
+	 * Sets or removes a client property.
+	 * 
+	 * @param key property key
+	 * @param value property value or <code>null</code> to remove the property
+	 */
+	public synchronized void setProperty(String key, Object value) {
+		if (properties == null) {
+			properties = new HashMap();
+		}
+		if (value == null) {
+			properties.remove(key);
+		} else {
+			properties.put(key, value);
+		}
+
+	}
+
+	/**
+	 * Returns the specified client property, or <code>null</code> if none.
+	 * 
+	 * @param key property key
+	 * @return property value or <code>null</code>
+	 */
+	public synchronized Object getProperty(String key) {
+		if (properties == null) {
+			return null;
+		}
+		return properties.get(key);
+	}
+
+	/**
+	 * Returns the project name the bundle will be imported into. The project
+	 * may or may not exist before the import. However, when the import operation
+	 * beings, the project will not exist.
+	 * 
+	 * @return target project
+	 */
+	public synchronized String getProject() {
+		return project;
+	}
+
+	/**
+	 * Returns the manifest of the bundle to be imported.
+	 * 
+	 * @return bundle manifest keys and values
+	 */
+	public Map getManifest() {
+		return manifest;
+	}
+
+	/**
+	 * Sets the project name that is the target of the import operation.
+	 * 
+	 * @param project target project
+	 */
+	public synchronized void setProject(String project) {
+		this.project = project;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/IBundleImporterDelegate.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/IBundleImporterDelegate.java
new file mode 100644
index 0000000..a98a93b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/IBundleImporterDelegate.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.importing.provisional;
+
+import java.util.Map;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * A bundle importer delegate is contributed by a bundle importer extension and is capable
+ * of importing projects into the workspace from a repository based on bundle manifest entries.
+ * <p>
+ * Following is an example extension:
+ * <pre>
+ * <extension point="org.eclipse.pde.core.bundleImporters">
+ *  <importer
+ *   id="com.example.ExampleIdentifier"
+ *   class="com.example.ExampleBundleImporterDelegate">
+ *  </importer>
+ * </extension>
+ * </pre>
+ * </p>
+ * <p>
+ * Clients contributing bundle importer extensions are intended to implement this interface.
+ * </p>
+ * <p>
+ * <strong>EXPERIMENTAL</strong>. This interface has been added as
+ * part of a work in progress. There is no guarantee that this API will
+ * work or that it will remain the same. Please do not use this API without
+ * consulting with the PDE team.
+ * </p>
+ * @since 3.6
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IBundleImporterDelegate {
+
+	/**
+	 * Returns an array of objects describing how each given bundle (manifest headers and values)
+	 * can be imported into a workspace project. A <code>null</code> entry in the returned array
+	 * indicates the corresponding bundle cannot be imported by this delegate.
+	 * 
+	 * @param manifests array of maps containing manifest headers and values of the associated bundles
+	 * @return array of bundle import descriptions that may contain <code>null</code> entries
+	 */
+	public BundleImportDescription[] validateImport(Map[] manifests);
+
+	/**
+	 * Imports bundles into the workspace creating a project for each import description.
+	 * Reports progress to the given monitor, if not <code>null</code>.
+	 * 
+	 * @param descriptions description of bundles to import
+	 * @param monitor progress monitor or <code>null</code>
+	 * @return collection of projects created in the workspace or <code>null</code> if none
+	 * @throws CoreException if unable to import projects
+	 */
+	public IProject[] performImport(BundleImportDescription[] descriptions, IProgressMonitor monitor) throws CoreException;
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/package.html b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/package.html
new file mode 100644
index 0000000..befab8d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/importing/provisional/package.html
@@ -0,0 +1,23 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Application programming interfaces for importing projects into the workspace.
+<h2>
+Package Specification</h2>
+<p>
+Provides support for importing projects into the workspace from a repository. 
+</p>
+<p>
+A bundle manifest may contain information identifying source code for the bundle
+or a project in a repository associated with the bundle. Clients may contribute
+implementations of <code>org.eclipse.pde.core.importing.IBundleImporterDelegate</code>
+to the <code>org.eclipse.pde.core.bundleImporters</code> extension point to participate
+in the import of bundles into workspace projects based on bundle manifests.
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IJREInfo.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IJREInfo.java
index b7ab589..0f302b5 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IJREInfo.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IJREInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,4 +44,17 @@ public interface IJREInfo extends IProductObject {
 	 */
 	public void setJREContainerPath(String os, IPath jreContainerPath);
 
+	/**
+	 * Returns whether or not the JRE for the given oOS should actually be bundled with the product
+	 * @param os
+	 * @return whether to include the JRE with the product
+	 */
+	public boolean includeJREWithProduct(String os);
+
+	/**
+	 * Set whether or not the JRE for the given OS should be included with the product
+	 * @param os
+	 * @param includeJRE
+	 */
+	public void setIncludeJREWithProduct(String os, boolean includeJRE);
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
index 4b0b327..dabeb93 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
 #
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#     Simon Muschel <smuschel at gmx.de> - bugs 215743, 260549
 ###############################################################################
 
 ###### Status text #####################################
@@ -26,8 +27,10 @@ FeatureConsistencyChecker_0=Cleaning {0}
 FeatureInfo_description = Feature Description
 FeatureInfo_license = License Agreement
 FeatureInfo_copyright = Copyright Notice
+P2Utils_UnableToAcquireP2Service=Unable to acquire p2 services
 PluginObject_readOnlyChange=Illegal attempt to change read-only plug-in manifest model
 FeatureObject_readOnlyChange=Illegal attempt to change read-only feature manifest model
+SiteBuildOperation_0=Update Site
 SiteObject_readOnlyChange=Illegal attempt to change read-only site manifest model
 
 BuildObject_readOnlyException=Illegal attempt to change read-only build.properties
@@ -57,6 +60,7 @@ Builders_Feature_patchedVersion = ''{0}'' attribute requires ''version'' attribu
 Builders_Feature_patchedMatch = ''{0}'' attribute cannot be used when ''patch'' attribue is set
 Builders_Feature_missingUnpackFalse = It is recommended for plug-in ''{0}'' to run from a JAR, specify ''{1}'' attribute
 Builders_Feature_mismatchUnpackBundleShape = The feature specifies ''{0}'', however the plug-in ''{1}'' specifies ''{2}''
+Builders_Feature_mismatchPluginVersion = Version ''{0}'' of plug-in ''{1}'' is not available.
 Builders_Schema_compiling = Compiling {0} ...
 Builders_Schema_compilingSchemas=Compiling extension point schemas...
 Builders_Schema_removing = Removing {0} ...
@@ -67,6 +71,8 @@ Builders_Schema_forbiddenEndTag = Tag ''{0}'' must not contain a terminating ''/
 Builders_Schema_valueRequired = Element ''{0}'' with use set to ''default'' must have the attribute ''value'' defined
 Builders_Schema_valueNotRequired = Element ''{0}'' must not have the ''value'' attribute set
 Builders_Schema_duplicateElement = Element ''{0}'' already defined
+Builders_Schema_includeNotValid = Included schema ''{0}'' is invalid or can not be found
+Builders_Schema_referencedElementNotFound = Referenced element ''{0}'' is not defined
 Builders_Manifest_missingRequired = Attribute ''{0}'' of element ''{1}'' must be defined.
 Builders_Manifest_dependency = Cannot resolve plug-in: {0}
 Builders_Manifest_ex_point = Unknown extension point: ''{0}''
@@ -83,6 +89,11 @@ Builders_Manifest_deprecated_attribute = Attribute ''{0}'' is deprecated
 Builders_Manifest_deprecated_element = Element ''{0}'' is deprecated
 Builders_Manifest_internal_rootElement = Access to extension point ''{0}'' is discouraged 
 BuildErrorReporter_binIncludesMissing=An entry for {0} is required in bin.includes
+BuildErrorReporter_buildEntryInvalidWhenNoProjectSettings=The ''{0}'' build entry should not be set when there are no project specific compiler settings
+BuildErrorReporter_buildEntryMissingProjectSpecificSettings=The ''{0}'' build entry should be set when there are project specific compiler settings
+BuildErrorReporter_buildEntryMissingValidPath=The ''{0}'' build entry does not contain ''true'' or a path to an existing properties file
+BuildErrorReporter_buildEntryMissingValidRelativePath=The ''{0}'' build entry does not contain a path to an existing properties file
+BuildErrorReporter_BuildEntryNotRequiredMatchesDefault=The ''{0}'' build entry is not required because it matches the default value
 BuildErrorReporter_entiresMustRefDirs={0}: entries ending in / must reference directories
 Builders_Manifest_deprecated_rootElement = The extension point ''{0}'' is deprecated
 BuildErrorReporter_classpathEntryMissing={0} is not included in any "source.*" build entry
@@ -96,16 +107,24 @@ Builders_Manifest_resource = Referenced resource ''{0}'' in attribute ''{1}'' ca
 Builders_Manifest_deprecated_3_0 = Element ''{0}'' is deprecated as of Eclipse 3.0
 BuildErrorReporter_missingFolder=The folder "{0}" does not exist in the workspace
 BuildErrorReporter_sourceMissing=The plug-in's classpath library '.' does not have a corresponding source build entry
+BuildErrorReporter_srcIncludesSourceFolder=Source folders should not be added to the src.includes list because they are included by default in source builds.
+BuildErrorReporter_srcIncludesSourceFolder1=''{0}'' should not be added to src.includes list as it is not required in source build.
 BuildErrorReporter_cannotFindJar={0} cannot be resolved
 BuildErrorReporter_cannotFindBundle=Bundle {0} cannot be resolved
+BuildErrorReporter_CompilercomplianceLevel=Compiler compliance level
+BuildErrorReporter_DisallowIdentifiers=Disallow identifiers
 Builders_Manifest_key_not_found = Key ''{0}'' is not found localization properties file
 Builders_Manifest_useless_file = A plug-in manifest must contain at least one extension or extension point
-BuildErrorReporter_missingEntry=An "{0}" build entry is missing
+BuildErrorReporter_missingEntry = ''{0}'' build entry is missing
 
 Builders_Convert_missingAttribute = ''{0}'' attribute is missing
 Builders_Convert_illegalValue = Illegal value for ''{0}'' attribute
 BuildErrorReporter_emptyEntry=Build entries must contain at least one value
+BuildErrorReporter_GeneratedClassFilesCompatibility=Generated .class files compatibility
 BuildErrorReporter_missingFile=The file "{0}" does not exist in the workspace
+BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken=The ''{0}'' build entry does not match the current project Java compliance settings
+BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry=There is no ''{0}'' build entry and the project has Java compliance preferences set
+BuildErrorReporter_SourceCompatibility=Source compatibility
 
 BundleErrorReporter_lineTooLong = The line is too long
 BundleErrorReporter_noMainSection = Manifest has no main section
@@ -168,6 +187,7 @@ BundleErrorReporter_unecessaryDependencyDueToFragmentHost=The ''{0}'' dependency
 BundleErrorReporter_localization_properties_file_not_exist=no valid properties files exist in the localization directory specified
 BundleErrorReporter_illegalManifestVersion=The bundle manifest version is invalid. Valid ranges are 1-2.
 BundleManifestSourceLocationManager_problemProcessBundleManifestHeaderAttributeMissing=Problem processing bundle manifest header in source bundle {0}, plugin name and version must both be specified.
+BundleValidationOperation_multiple_singletons={0} versions of singleton ''{1}'' exist
 
 ManifestConsistencyChecker_0=Cleaning {0}
 ManifestConsistencyChecker_buildPropertiesSubtask=Verifying build.properties
@@ -204,6 +224,7 @@ PluginConverter_EclipseConverterFileNotFound=Could not find a META-INF/MANIFEST.
 PluginConverter_EclipseConverterErrorCreatingBundleManifest=Error creating bundle manifest file for {0} at {1}.
 PluginConverter_EclipseConverterErrorParsingPluginManifest=Error parsing plugin manifest file {0} at {1}.
 PluginModelManager_0=Target Platform
+PluginModelManager_1=Updating plug-in dependencies
 PluginParser_EclipseConverterMissingAttribute=Error parsing {0} manifest. Missing attribute "{1}" in element "{2}".
 
 # {0} will be a product id, this string will be the name of a p2 repository 
@@ -217,6 +238,29 @@ XMLTextChangeListener_editNames_modifyAttribute=Modify "{0}" attribute of "{1}"
 XMLTextChangeListener_editNames_addAttribute=Add "{0}" attribute to "{1}" node
 
 SearchablePluginsManager_createProjectTaskName=Creating {0} project
+
+SourceEntryErrorReporter_0=Workspace encoding ({0}) does not match specified default encoding ({1}) for library "{2}".
+SourceEntryErrorReporter_1=Default encoding ({0}) for library "{1}" should be removed as the workspace does not specify an explicit encoding.
+SourceEntryErrorReporter_10=Custom encoding ({0}) should be specified for "{1}" to match workspace settings.
+SourceEntryErrorReporter_2=Only one default encoding can be specified for library "{0}".
+SourceEntryErrorReporter_3=Custom encoding ({0}) should be removed for file or folder that does not exist: "{1}"
+SourceEntryErrorReporter_4=Syntax error: expecting '<path>[encoding]'
+SourceEntryErrorReporter_5=Custom encodings should be removed for library "{0}" as the workspace settings does not specify any explicit encodings.
+SourceEntryErrorReporter_6=Custom encoding ({0}) should be removed for "{0}" as the workspace does not specify an explicit encoding.
+SourceEntryErrorReporter_7=Workspace encoding ({0}) for "{1}" does not match specified encoding ({2}).
+SourceEntryErrorReporter_8=Custom encoding ({0}) should be specified for "{1}" to match workspace settings.
+SourceEntryErrorReporter_9=Default encoding ({0}) should be specified for library "{1}" to match workspace settings.
+
+SourceEntryErrorReporter_DifferentTargetLibrary=Source folders ''{0}'' share the same output folder but are targeted to different libraries.
+SourceEntryErrorReporter_DupeOutputFolder=Multiple entries for output folder ''{0}'' in build entry ''{1}''. 
+SourceEntryErrorReporter_DupeSourceFolder=Multiple entries for source folder ''{0}'' in build entry ''{1}''.
+SourceEntryErrorReporter_ExtraOutputFolder=Redundant entry for output folder ''{0}''. It does not correspond to any source folder in ''{1}'' entry. 
+SourceEntryErrorReporter_InvalidOutputFolder=''{0}'' is not an output folder.
+SourceEntryErrorReporter_InvalidSourceFolder=''{0}'' is not a source folder.
+SourceEntryErrorReporter_MissingLibrary=The library ''{0}'' has not been specified on the bundle classpath.
+SourceEntryErrorReporter_MissingOutputEntry=Source folder ''{0}'' does not have the output folder in corresponding output entry ''{1}''.  
+SourceEntryErrorReporter_MissingOutputLibForClassFolder=The class folder ''{0}'' is not associated to any output library entry.
+
 SourceLocationManager_problemProcessingBundleManifestSourceHeader=Problem processing bundle manifest source header
 UpdateSiteBuilder_0=Cleaning {0}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginElement.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginElement.java
index 7d44d54..ee0038f 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginElement.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/PluginElement.java
@@ -62,6 +62,7 @@ public class PluginElement extends PluginParent implements IPluginElement {
 			return false;
 		if (obj instanceof IPluginElement) {
 			IPluginElement target = (IPluginElement) obj;
+			// Equivalent models must return false to get proper source range selection, see bug 267954.
 			if (target.getModel().equals(getModel()))
 				return false;
 			if (target.getAttributeCount() != getAttributeCount())
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/WorkspaceExtensionsModel.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/WorkspaceExtensionsModel.java
index 55ba8e8..683d246 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/WorkspaceExtensionsModel.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/plugin/WorkspaceExtensionsModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.pde.core.IEditableModel;
 import org.eclipse.pde.core.IModelChangedEvent;
-import org.eclipse.pde.internal.core.NLResourceHelper;
-import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelProvider;
 import org.osgi.framework.Constants;
@@ -148,7 +147,7 @@ public class WorkspaceExtensionsModel extends AbstractExtensionsModel implements
 	 */
 	protected Extensions createExtensions() {
 		Extensions extensions = super.createExtensions();
-		extensions.setIsFragment(fUnderlyingResource.getName().equals("fragment.xml")); //$NON-NLS-1$
+		extensions.setIsFragment(fUnderlyingResource.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR));
 		return extensions;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/JREInfo.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/JREInfo.java
index 9aa089f..e0d0333 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/JREInfo.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/JREInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,11 @@ public class JREInfo extends ProductObject implements IJREInfo {
 	private IPath fJVMSol;
 	private IPath fJVMWin;
 
+	private boolean bIncludeLin;
+	private boolean bIncludeMac;
+	private boolean bIncludeSol;
+	private boolean bIncludeWin;
+
 	public JREInfo(IProductModel model) {
 		super(model);
 	}
@@ -102,14 +107,20 @@ public class JREInfo extends ProductObject implements IJREInfo {
 		for (int i = 0; i < list.getLength(); i++) {
 			Node child = list.item(i);
 			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				Node includeNode = child.getAttributes().getNamedItem("include"); //$NON-NLS-1$
+				boolean include = includeNode != null ? Boolean.valueOf(includeNode.getNodeValue()).booleanValue() : true;
 				if (child.getNodeName().equals(JRE_LIN)) {
 					fJVMLin = getPath(child);
+					bIncludeLin = include;
 				} else if (child.getNodeName().equals(JRE_MAC)) {
 					fJVMMac = getPath(child);
+					bIncludeMac = include;
 				} else if (child.getNodeName().equals(JRE_SOL)) {
 					fJVMSol = getPath(child);
+					bIncludeSol = include;
 				} else if (child.getNodeName().equals(JRE_WIN)) {
 					fJVMWin = getPath(child);
+					bIncludeWin = include;
 				}
 			}
 		}
@@ -139,29 +150,66 @@ public class JREInfo extends ProductObject implements IJREInfo {
 		writer.println(indent + "<vm>"); //$NON-NLS-1$
 		if (fJVMLin != null) {
 			writer.print(indent);
-			writer.print("   <" + JRE_LIN + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.print("   <" + JRE_LIN + " include=\"" + String.valueOf(bIncludeLin) + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			writer.print(fJVMLin.toPortableString());
 			writer.println("</" + JRE_LIN + ">"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		if (fJVMMac != null) {
 			writer.print(indent);
-			writer.print("   <" + JRE_MAC + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.print("   <" + JRE_MAC + " include=\"" + String.valueOf(bIncludeMac) + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			writer.print(fJVMMac.toPortableString());
 			writer.println("</" + JRE_MAC + ">"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		if (fJVMSol != null) {
 			writer.print(indent);
-			writer.print("   <" + JRE_SOL + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.print("   <" + JRE_SOL + " include=\"" + String.valueOf(bIncludeSol) + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			writer.print(fJVMSol.toPortableString());
 			writer.println("</" + JRE_SOL + ">"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		if (fJVMWin != null) {
 			writer.print(indent);
-			writer.print("   <" + JRE_WIN + ">"); //$NON-NLS-1$ //$NON-NLS-2$
+			writer.print("   <" + JRE_WIN + " include=\"" + String.valueOf(bIncludeWin) + "\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			writer.print(fJVMWin.toPortableString());
 			writer.println("</" + JRE_WIN + ">"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 		writer.println(indent + "</vm>"); //$NON-NLS-1$
 	}
 
+	public boolean includeJREWithProduct(String os) {
+		if (Platform.OS_WIN32.equals(os)) {
+			return bIncludeWin;
+		} else if (Platform.OS_LINUX.equals(os)) {
+			return bIncludeLin;
+		} else if (Platform.OS_MACOSX.equals(os)) {
+			return bIncludeMac;
+		} else if (Platform.OS_SOLARIS.equals(os)) {
+			return bIncludeSol;
+		}
+		return false;
+	}
+
+	public void setIncludeJREWithProduct(String os, boolean includeJRE) {
+		if (Platform.OS_WIN32.equals(os)) {
+			Boolean old = Boolean.valueOf(bIncludeWin);
+			bIncludeWin = includeJRE;
+			if (isEditable())
+				firePropertyChanged(JRE_WIN, old, Boolean.valueOf(bIncludeWin));
+		} else if (Platform.OS_LINUX.equals(os)) {
+			Boolean old = Boolean.valueOf(bIncludeLin);
+			bIncludeLin = includeJRE;
+			if (isEditable())
+				firePropertyChanged(JRE_LIN, old, Boolean.valueOf(bIncludeLin));
+		} else if (Platform.OS_MACOSX.equals(os)) {
+			Boolean old = Boolean.valueOf(bIncludeMac);
+			bIncludeMac = includeJRE;
+			if (isEditable())
+				firePropertyChanged(JRE_MAC, old, Boolean.valueOf(bIncludeMac));
+		} else if (Platform.OS_SOLARIS.equals(os)) {
+			Boolean old = Boolean.valueOf(bIncludeSol);
+			bIncludeSol = includeJRE;
+			if (isEditable())
+				firePropertyChanged(JRE_SOL, old, Boolean.valueOf(bIncludeSol));
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleClasspathSpecification.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleClasspathSpecification.java
new file mode 100644
index 0000000..8411c4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleClasspathSpecification.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.pde.core.project.IBundleClasspathEntry;
+
+/**
+ * Defines relationship between a source folder and/or classfile folder and bundle
+ * classpath entry.
+ */
+public class BundleClasspathSpecification implements IBundleClasspathEntry {
+
+	private IPath fSource;
+	private IPath fBinary;
+	private IPath fEntry;
+
+	/**
+	 * Constructs a relationship. Must specify one of <code>sourceFolder</code> or
+	 * <code>binaryFolder</code>.
+	 * 
+	 * @param sourceFolder source folder or <code>null</code>
+	 * @param binaryFolder binary folder or <code>null</code>
+	 * @param entry entry on the Bundle-Classpath header
+	 */
+	public BundleClasspathSpecification(IPath sourceFolder, IPath binaryFolder, IPath entry) {
+		fSource = sourceFolder;
+		fBinary = binaryFolder;
+		fEntry = entry;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleClasspathSpecification#getSourceFolder()
+	 */
+	public IPath getSourcePath() {
+		return fSource;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleClasspathSpecification#getClassfileFolder()
+	 */
+	public IPath getBinaryPath() {
+		return fBinary;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleClasspathSpecification#getBundleClasspathEntry()
+	 */
+	public IPath getLibrary() {
+		return fEntry;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (obj instanceof IBundleClasspathEntry) {
+			IBundleClasspathEntry spec = (IBundleClasspathEntry) obj;
+			return equalOrNull(getSourcePath(), spec.getSourcePath()) && equalOrNull(getBinaryPath(), spec.getBinaryPath()) && equalOrNull(getLibrary(), spec.getLibrary());
+		}
+		return false;
+	}
+
+	private boolean equalOrNull(Object o1, Object o2) {
+		if (o1 == null) {
+			return o2 == null;
+		}
+		if (o2 == null) {
+			return o1 == null;
+		}
+		return o1.equals(o2);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		int code = getClass().hashCode();
+		if (fSource != null) {
+			code += fSource.hashCode();
+		}
+		if (fBinary != null) {
+			code += fBinary.hashCode();
+		}
+		if (fEntry != null) {
+			code += fEntry.hashCode();
+		}
+		return code;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append("Bundle-Claspath: ["); //$NON-NLS-1$
+		buf.append("src="); //$NON-NLS-1$
+		buf.append(fSource);
+		buf.append(" bin="); //$NON-NLS-1$
+		buf.append(fBinary);
+		buf.append(" jar="); //$NON-NLS-1$
+		buf.append(fEntry);
+		buf.append("]"); //$NON-NLS-1$
+		return buf.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java
new file mode 100644
index 0000000..eeb64f9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectDescription.java
@@ -0,0 +1,867 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jdt.core.*;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.pde.core.build.IBuild;
+import org.eclipse.pde.core.build.IBuildEntry;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.core.project.*;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.osgi.framework.*;
+
+/**
+ * A bundle project description contains the meta-data required to define
+ * a bundle or plug-in project.
+ * <p>
+ * Clients may instantiate this class.
+ * </p>
+ * @since 3.6
+ */
+public class BundleProjectDescription implements IBundleProjectDescription {
+
+	private IProject fProject;
+	private IPath fRoot;
+	private String fSymbolicName;
+	private String fBundleName;
+	private String fBundleVendor;
+	private IHostDescription fHost;
+	private URI fUri;
+	private Version fVersion;
+	private boolean fSingleton = false;
+	private IPath fLocalization = null;
+	private IPath fDefaultOuputFolder = null;
+	private String[] fEEs;
+	private String[] fNatures;
+	private IBundleClasspathEntry[] fBundleClasspath = null;
+	private String fActivator = null;
+	private String fTargetVersion;
+	private boolean fIsEquinox = false;
+	private boolean fIsExtensionRegistry = false;
+	private String fActivationPolicy;
+	private IRequiredBundleDescription[] fRequiredBundles;
+	private IPackageImportDescription[] fImports;
+	private IPackageExportDescription[] fExports;
+	private IPath[] fBinIncludes;
+	private IBundleProjectService fService;
+	private String[] fLaunchShortcuts;
+	private String fExportWizard;
+	private Map fHeaders = new HashMap();
+	private Map fReadHeaders = null;
+
+	/**
+	 * Constructs a bundle description for the specified project.
+	 * 
+	 * @param project project that may or may not exist
+	 * @throws CoreException 
+	 */
+	public BundleProjectDescription(IProject project) throws CoreException {
+		fProject = project;
+		if (project.exists() && project.isOpen()) {
+			initiaize(project);
+		}
+	}
+
+	/**
+	 * Returns the bundle project service.
+	 * 
+	 * @return bundle project service
+	 */
+	IBundleProjectService getBundleProjectService() {
+		if (fService == null) {
+			fService = (IBundleProjectService) PDECore.getDefault().acquireService(IBundleProjectService.class.getName());
+		}
+		return fService;
+	}
+
+	/**
+	 * Returns the build model for the given project or <code>null</code>
+	 * if none.
+	 * 
+	 * @param project project
+	 * @return build model or <code>null</code>
+	 */
+	private IBuild getBuildModel(IProject project) {
+		IFile buildFile = PDEProject.getBuildProperties(project);
+		if (buildFile.exists()) {
+			WorkspaceBuildModel buildModel = new WorkspaceBuildModel(buildFile);
+			buildModel.load();
+			return buildModel.getBuild();
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the header value from the Map of ManifestElement's or <code>null</code> if none.
+	 * 
+	 * @param headers map of ManifestElement's
+	 * @param key header name
+	 * @return header value or <code>null</code>
+	 */
+	private String getHeaderValue(Map headers, String key) throws CoreException {
+		ManifestElement[] elements = parseHeader(headers, key);
+		if (elements != null) {
+			if (elements.length > 0) {
+				return elements[0].getValue();
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Parses the specified header.
+	 * 
+	 * @param headers
+	 * @param key
+	 * @return elements or <code>null</code> if none
+	 * @throws CoreException
+	 */
+	private ManifestElement[] parseHeader(Map headers, String key) throws CoreException {
+		String value = (String) headers.get(key);
+		if (value != null) {
+			if (value.trim().length() > 0) {
+				try {
+					return ManifestElement.parseHeader(key, value);
+				} catch (BundleException e) {
+					throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, e.getMessage(), e));
+				}
+			}
+			// empty header
+			return new ManifestElement[0];
+		}
+		return null;
+	}
+
+	/**
+	 * Initialize settings from the given project.
+	 * 
+	 * @param project project
+	 * @exception CoreException if unable to initialize
+	 */
+	private void initiaize(IProject project) throws CoreException {
+		IContainer root = PDEProject.getBundleRoot(project);
+		if (root != project) {
+			setBundleRoot(root.getProjectRelativePath());
+		}
+		IEclipsePreferences node = new ProjectScope(project).getNode(PDECore.PLUGIN_ID);
+		if (node != null) {
+			setExtensionRegistry(node.getBoolean(ICoreConstants.EXTENSIONS_PROPERTY, true));
+			setEquinox(node.getBoolean(ICoreConstants.EQUINOX_PROPERTY, true));
+		}
+		// export wizard and launch shortcuts
+		setExportWizardId(PDEProject.getExportWizard(project));
+		setLaunchShortcuts(PDEProject.getLaunchShortcuts(project));
+		// location and natures
+		setLocationURI(project.getDescription().getLocationURI());
+		setNatureIds(project.getDescription().getNatureIds());
+
+		IFile manifest = PDEProject.getManifest(project);
+		if (manifest.exists()) {
+			Map headers;
+			try {
+				headers = ManifestElement.parseBundleManifest(manifest.getContents(), null);
+				fReadHeaders = headers;
+			} catch (IOException e) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, e.getMessage(), e));
+			} catch (BundleException e) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, e.getMessage(), e));
+			}
+			setActivator(getHeaderValue(headers, Constants.BUNDLE_ACTIVATOR));
+			setBundleName(getHeaderValue(headers, Constants.BUNDLE_NAME));
+			setBundleVendor(getHeaderValue(headers, Constants.BUNDLE_VENDOR));
+			String version = getHeaderValue(headers, Constants.BUNDLE_VERSION);
+			if (version != null) {
+				setBundleVersion(new Version(version));
+			}
+			IJavaProject jp = JavaCore.create(project);
+			if (jp.exists()) {
+				setDefaultOutputFolder(jp.getOutputLocation().removeFirstSegments(1));
+			}
+			ManifestElement[] elements = parseHeader(headers, Constants.FRAGMENT_HOST);
+			if (elements != null && elements.length > 0) {
+				setHost(getBundleProjectService().newHost(elements[0].getValue(), getRange(elements[0].getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE))));
+			}
+			String value = getHeaderValue(headers, Constants.BUNDLE_LOCALIZATION);
+			if (value != null) {
+				setLocalization(new Path(value));
+			}
+			elements = parseHeader(headers, Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
+			if (elements != null && elements.length > 0) {
+				String[] keys = new String[elements.length];
+				for (int i = 0; i < elements.length; i++) {
+					keys[i] = elements[i].getValue();
+				}
+				setExecutionEnvironments(keys);
+			}
+			IBuild build = getBuildModel(project);
+			elements = parseHeader(headers, Constants.BUNDLE_CLASSPATH);
+			IBundleClasspathEntry[] classpath = null;
+			if (elements != null && elements.length > 0) {
+				List collect = new ArrayList();
+				for (int i = 0; i < elements.length; i++) {
+					String libName = elements[i].getValue();
+					IBundleClasspathEntry[] entries = getClasspathEntries(project, build, libName);
+					if (entries != null) {
+						for (int j = 0; j < entries.length; j++) {
+							collect.add(entries[j]);
+						}
+					}
+				}
+				classpath = (IBundleClasspathEntry[]) collect.toArray(new IBundleClasspathEntry[collect.size()]);
+			} else if (elements == null) {
+				// default bundle classpath of '.'
+				classpath = getClasspathEntries(project, build, "."); //$NON-NLS-1$
+			}
+			setBundleClassath(classpath);
+			elements = parseHeader(headers, Constants.BUNDLE_SYMBOLICNAME);
+			if (elements != null && elements.length > 0) {
+				setSymbolicName(elements[0].getValue());
+				String directive = elements[0].getDirective(Constants.SINGLETON_DIRECTIVE);
+				if (directive == null) {
+					directive = elements[0].getAttribute(Constants.SINGLETON_DIRECTIVE);
+				}
+				setSingleton("true".equals(directive)); //$NON-NLS-1$
+			}
+			elements = parseHeader(headers, Constants.IMPORT_PACKAGE);
+			if (elements != null) {
+				if (elements.length > 0) {
+					IPackageImportDescription[] imports = new IPackageImportDescription[elements.length];
+					for (int i = 0; i < elements.length; i++) {
+						boolean optional = Constants.RESOLUTION_OPTIONAL.equals(elements[i].getDirective(Constants.RESOLUTION_DIRECTIVE)) || "true".equals(elements[i].getAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE)); //$NON-NLS-1$
+						String pv = elements[i].getAttribute(ICoreConstants.PACKAGE_SPECIFICATION_VERSION);
+						if (pv == null) {
+							pv = elements[i].getAttribute(Constants.VERSION_ATTRIBUTE);
+						}
+						imports[i] = getBundleProjectService().newPackageImport(elements[i].getValue(), getRange(pv), optional);
+					}
+					setPackageImports(imports);
+				} else {
+					// empty header - should be maintained
+					setHeader(Constants.IMPORT_PACKAGE, ""); //$NON-NLS-1$
+				}
+			}
+			elements = parseHeader(headers, Constants.EXPORT_PACKAGE);
+			if (elements != null && elements.length > 0) {
+				IPackageExportDescription[] exports = new IPackageExportDescription[elements.length];
+				for (int i = 0; i < elements.length; i++) {
+					ManifestElement exp = elements[i];
+					String pv = exp.getAttribute(ICoreConstants.PACKAGE_SPECIFICATION_VERSION);
+					if (pv == null) {
+						pv = exp.getAttribute(Constants.VERSION_ATTRIBUTE);
+					}
+					String directive = exp.getDirective(ICoreConstants.FRIENDS_DIRECTIVE);
+					boolean internal = "true".equals(exp.getDirective(ICoreConstants.INTERNAL_DIRECTIVE)) || directive != null; //$NON-NLS-1$
+					String[] friends = null;
+					if (directive != null) {
+						friends = ManifestElement.getArrayFromList(directive);
+					}
+					exports[i] = getBundleProjectService().newPackageExport(exp.getValue(), getVersion(pv), !internal, friends);
+				}
+				setPackageExports(exports);
+			}
+			elements = parseHeader(headers, Constants.REQUIRE_BUNDLE);
+			if (elements != null && elements.length > 0) {
+				IRequiredBundleDescription[] req = new IRequiredBundleDescription[elements.length];
+				for (int i = 0; i < elements.length; i++) {
+					ManifestElement rb = elements[i];
+					boolean reexport = Constants.VISIBILITY_REEXPORT.equals(rb.getDirective(Constants.VISIBILITY_DIRECTIVE)) || "true".equals(rb.getAttribute(ICoreConstants.REPROVIDE_ATTRIBUTE)); //$NON-NLS-1$
+					boolean optional = Constants.RESOLUTION_OPTIONAL.equals(rb.getDirective(Constants.RESOLUTION_DIRECTIVE)) || "true".equals(rb.getAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE)); //$NON-NLS-1$
+					req[i] = getBundleProjectService().newRequiredBundle(rb.getValue(), getRange(rb.getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE)), optional, reexport);
+				}
+				setRequiredBundles(req);
+			}
+			String lazy = getHeaderValue(headers, ICoreConstants.ECLIPSE_AUTOSTART);
+			if (lazy == null) {
+				lazy = getHeaderValue(headers, ICoreConstants.ECLIPSE_LAZYSTART);
+				if (lazy == null) {
+					setActivationPolicy(getHeaderValue(headers, Constants.BUNDLE_ACTIVATIONPOLICY));
+				}
+			}
+			if ("true".equals(lazy)) { //$NON-NLS-1$
+				setActivationPolicy(Constants.ACTIVATION_LAZY);
+			}
+			String latest = TargetPlatformHelper.getTargetVersionString();
+			IPluginModelBase model = PluginRegistry.findModel(project);
+			if (model != null) {
+				IPluginBase base = model.getPluginBase();
+				String tv = TargetPlatformHelper.getTargetVersionForSchemaVersion(base.getSchemaVersion());
+				if (!tv.equals(latest)) {
+					setTargetVersion(tv);
+				}
+			}
+			if (build != null) {
+				IBuildEntry entry = build.getEntry(IBuildEntry.BIN_INCLUDES);
+				if (entry != null) {
+					String[] tokens = entry.getTokens();
+					if (tokens != null && tokens.length > 0) {
+						List strings = new ArrayList();
+						for (int i = 0; i < tokens.length; i++) {
+							strings.add(tokens[i]);
+						}
+						// remove the default entries
+						strings.remove("META-INF/"); //$NON-NLS-1$
+						String[] names = ProjectModifyOperation.getLibraryNames(this);
+						if (names != null) {
+							for (int i = 0; i < names.length; i++) {
+								strings.remove(names[i]);
+								// if the library is a folder, account for trailing slash - see bug 306991
+								IPath path = new Path(names[i]);
+								if (path.getFileExtension() == null) {
+									strings.remove(names[i] + "/"); //$NON-NLS-1$
+								}
+							}
+						}
+						// set left overs
+						if (!strings.isEmpty()) {
+							IPath[] paths = new IPath[strings.size()];
+							for (int i = 0; i < strings.size(); i++) {
+								paths[i] = new Path((String) strings.get(i));
+							}
+							setBinIncludes(paths);
+						}
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns bundle classpath specifications associated with the specified library or <code>null</code>.
+	 * 
+	 * @param project associated project
+	 * @param build build properties object or <code>null</code>
+	 * @param libraryName name of library classpath is for
+	 * @return bundle classpath specifications associated with the specified library or <code>null</code>
+	 * @exception CoreException if unable to access associated Java project for source entries
+	 */
+	private IBundleClasspathEntry[] getClasspathEntries(IProject project, IBuild build, String libraryName) throws CoreException {
+		if (build != null) {
+			IBuildEntry entry = build.getEntry(IBuildEntry.JAR_PREFIX + libraryName);
+			if (entry == null) {
+				entry = build.getEntry(IBuildEntry.OUTPUT_PREFIX + libraryName);
+				if (entry == null) {
+					// no source or class file folder
+					return new IBundleClasspathEntry[] {getBundleProjectService().newBundleClasspathEntry(null, null, new Path(libraryName))};
+				}
+				// base the entries on class file folders
+				return getClasspathEntries(project, entry, true);
+			}
+			// base the entries on source folders
+			return getClasspathEntries(project, entry, false);
+		}
+		return null;
+	}
+
+	/**
+	 * Creates and returns a bundle claspath specifications for the given source.<library> build
+	 * entry
+	 * 
+	 * @param project
+	 * @param entry
+	 * @param binary whether a binary folder (<code>true</code>) or source folder (<code>false</code>)
+	 * @return associated bundle classpath specifications or <code>null</code> if a malformed entry
+	 * @throws CoreException if unable to access Java build path
+	 */
+	private IBundleClasspathEntry[] getClasspathEntries(IProject project, IBuildEntry entry, boolean binary) throws CoreException {
+		String[] tokens = entry.getTokens();
+		IPath lib = null;
+		if (binary) {
+			lib = new Path(entry.getName().substring(IBuildEntry.OUTPUT_PREFIX.length()));
+		} else {
+			lib = new Path(entry.getName().substring(IBuildEntry.JAR_PREFIX.length()));
+		}
+		if (tokens != null && tokens.length > 0) {
+			IBundleClasspathEntry[] bces = new IBundleClasspathEntry[tokens.length];
+			for (int i = 0; i < tokens.length; i++) {
+				IPath path = new Path(tokens[i]);
+				IBundleClasspathEntry spec = null;
+				if (binary) {
+					spec = getBundleProjectService().newBundleClasspathEntry(null, path, lib);
+				} else {
+					IJavaProject jp = JavaCore.create(project);
+					IPath output = null;
+					if (jp.exists()) {
+						IClasspathEntry[] rawClasspath = jp.getRawClasspath();
+						for (int j = 0; j < rawClasspath.length; j++) {
+							IClasspathEntry cpe = rawClasspath[j];
+							if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+								if (cpe.getPath().removeFirstSegments(1).equals(path)) {
+									output = cpe.getOutputLocation();
+									if (output != null) {
+										output = output.removeFirstSegments(1);
+									}
+									break;
+								}
+							}
+						}
+					}
+					spec = getBundleProjectService().newBundleClasspathEntry(path, output, lib);
+				}
+				bces[i] = spec;
+			}
+			return bces;
+		}
+		return null;
+	}
+
+	/**
+	 * Create and return a version range from the given string or <code>null</code>.
+	 * 
+	 * @param version version range string or <code>null</code>
+	 * @return version range or <code>null</code>
+	 */
+	private VersionRange getRange(String version) {
+		if (version != null) {
+			return new VersionRange(version);
+		}
+		return null;
+	}
+
+	/**
+	 * Creates and returns a version from the given string or <code>null</code>.
+	 * 
+	 * @param version version string or <code>null</code>
+	 * @return version or <code>null</code>
+	 */
+	private Version getVersion(String version) {
+		if (version != null) {
+			return new Version(version);
+		}
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#apply(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void apply(IProgressMonitor monitor) throws CoreException {
+		ProjectModifyOperation operation = new ProjectModifyOperation();
+		operation.execute(monitor, this);
+		fService = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setSymbolicName(java.lang.String)
+	 */
+	public void setSymbolicName(String name) {
+		fSymbolicName = name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getSymbolicName()
+	 */
+	public String getSymbolicName() {
+		return fSymbolicName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setLocationURI(java.net.URI)
+	 */
+	public void setLocationURI(URI location) {
+		fUri = location;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getLocationURI()
+	 */
+	public URI getLocationURI() {
+		return fUri;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBundleName(java.lang.String)
+	 */
+	public void setBundleName(String name) {
+		fBundleName = name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBundleName()
+	 */
+	public String getBundleName() {
+		return fBundleName;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBundleVendor(java.lang.String)
+	 */
+	public void setBundleVendor(String name) {
+		fBundleVendor = name;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBundleVendor()
+	 */
+	public String getBundleVendor() {
+		return fBundleVendor;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBundleVersion(org.osgi.framework.Version)
+	 */
+	public void setBundleVersion(Version version) {
+		fVersion = version;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBundleVersion()
+	 */
+	public Version getBundleVersion() {
+		return fVersion;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setSingleton(boolean)
+	 */
+	public void setSingleton(boolean singleton) {
+		fSingleton = singleton;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#isSingleton()
+	 */
+	public boolean isSingleton() {
+		return fSingleton;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setLocalization(org.eclipse.core.runtime.IPath)
+	 */
+	public void setLocalization(IPath path) {
+		fLocalization = path;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getLocalization()
+	 */
+	public IPath getLocalization() {
+		return fLocalization;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getNatureIds()
+	 */
+	public String[] getNatureIds() {
+		if (fNatures == null) {
+			return new String[0];
+		}
+		String[] copy = new String[fNatures.length];
+		System.arraycopy(fNatures, 0, copy, 0, fNatures.length);
+		return copy;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setNatureIds(java.lang.String[])
+	 */
+	public void setNatureIds(String[] natures) {
+		String[] copy = null;
+		if (natures != null) {
+			copy = new String[natures.length];
+			System.arraycopy(natures, 0, copy, 0, natures.length);
+		}
+		fNatures = copy;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#hasNature(java.lang.String)
+	 */
+	public boolean hasNature(String natureId) {
+		if (fNatures != null) {
+			for (int i = 0; i < fNatures.length; i++) {
+				if (fNatures[i].equals(natureId)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setHost(org.eclipse.pde.core.project.IHostDescription)
+	 */
+	public void setHost(IHostDescription host) {
+		fHost = host;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getHost()
+	 */
+	public IHostDescription getHost() {
+		return fHost;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setDefaultOutputFolder(org.eclipse.core.runtime.IPath)
+	 */
+	public void setDefaultOutputFolder(IPath output) {
+		fDefaultOuputFolder = output;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getDefaultOutputFolder()
+	 */
+	public IPath getDefaultOutputFolder() {
+		return fDefaultOuputFolder;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setExecutionEnvironments(java.lang.String[])
+	 */
+	public void setExecutionEnvironments(String[] environments) {
+		fEEs = environments;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getExecutionEnvironments()
+	 */
+	public String[] getExecutionEnvironments() {
+		return fEEs;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBundleClasspath()
+	 */
+	public IBundleClasspathEntry[] getBundleClasspath() {
+		return fBundleClasspath;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setActivator(java.lang.String)
+	 */
+	public void setActivator(String className) {
+		fActivator = className;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getActivator()
+	 */
+	public String getActivator() {
+		return fActivator;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setTargetVersion(java.lang.String)
+	 */
+	public void setTargetVersion(String version) {
+		fTargetVersion = version;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getTargetVersion()
+	 */
+	public String getTargetVersion() {
+		return fTargetVersion;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setEqunioxHeaders(boolean)
+	 */
+	public void setEquinox(boolean equinox) {
+		fIsEquinox = equinox;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#isEquinoxHeaders()
+	 */
+	public boolean isEquinox() {
+		return fIsEquinox;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setRequiredBundles(org.eclipse.pde.core.project.IRequiredBundleDescription[])
+	 */
+	public void setRequiredBundles(IRequiredBundleDescription[] bundles) {
+		fRequiredBundles = bundles;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getRequiredBundles()
+	 */
+	public IRequiredBundleDescription[] getRequiredBundles() {
+		return fRequiredBundles;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setPackageImports(org.eclipse.pde.core.project.IPackageImportDescription[])
+	 */
+	public void setPackageImports(IPackageImportDescription[] imports) {
+		fImports = imports;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getPackageImports()
+	 */
+	public IPackageImportDescription[] getPackageImports() {
+		return fImports;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setPackageExports(org.eclipse.pde.core.project.IPackageExportDescription[])
+	 */
+	public void setPackageExports(IPackageExportDescription[] exports) {
+		fExports = exports;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getPackageExports()
+	 */
+	public IPackageExportDescription[] getPackageExports() {
+		return fExports;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getProject()
+	 */
+	public IProject getProject() {
+		return fProject;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBundleClassath(org.eclipse.pde.core.project.IBundleClasspathSpecification[])
+	 */
+	public void setBundleClassath(IBundleClasspathEntry[] entries) {
+		fBundleClasspath = entries;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBinIncludes(org.eclipse.core.runtime.IPath[])
+	 */
+	public void setBinIncludes(IPath[] paths) {
+		fBinIncludes = paths;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBinIncludes()
+	 */
+	public IPath[] getBinIncludes() {
+		return fBinIncludes;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setBundleRoot(org.eclipse.core.runtime.IPath)
+	 */
+	public void setBundleRoot(IPath path) {
+		fRoot = path;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getBundleRoot()
+	 */
+	public IPath getBundleRoot() {
+		return fRoot;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#isExtensionRegistry()
+	 */
+	public boolean isExtensionRegistry() {
+		return fIsExtensionRegistry;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setExtensionRegistry(boolean)
+	 */
+	public void setExtensionRegistry(boolean supportExtensions) {
+		fIsExtensionRegistry = supportExtensions;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getLaunchShortcuts()
+	 */
+	public String[] getLaunchShortcuts() {
+		return fLaunchShortcuts;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setLaunchShortcuts(java.lang.String[])
+	 */
+	public void setLaunchShortcuts(String[] ids) {
+		fLaunchShortcuts = ids;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getExportWizardId()
+	 */
+	public String getExportWizardId() {
+		return fExportWizard;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setExportWizardId(java.lang.String)
+	 */
+	public void setExportWizardId(String id) {
+		fExportWizard = id;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setActivationPolicy(java.lang.String)
+	 */
+	public void setActivationPolicy(String policy) {
+		if (Constants.ACTIVATION_LAZY.equals(policy)) {
+			fActivationPolicy = policy;
+		} else {
+			fActivationPolicy = null;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getActivationPolicy()
+	 */
+	public String getActivationPolicy() {
+		return fActivationPolicy;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#setHeader(java.lang.String, java.lang.String)
+	 */
+	public void setHeader(String header, String value) {
+		fHeaders.put(header, value);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectDescription#getHeader(java.lang.String)
+	 */
+	public String getHeader(String header) {
+		if (fHeaders.containsKey(header)) { // might be null so check contains
+			return (String) fHeaders.get(header);
+		}
+		if (fReadHeaders != null) {
+			if (fReadHeaders.containsKey(header)) {
+				String value = (String) fReadHeaders.get(header);
+				if (value == null) {
+					// Return the empty string for present empty headers (instead of null - which means missing)
+					return ""; //$NON-NLS-1$
+				}
+				return value;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns any extra headers that have been specified. A map of header names to header
+	 * values.
+	 * 
+	 * @return a map of header names to header values, possible empty
+	 */
+	Map getExtraHeaders() {
+		return fHeaders;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectService.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectService.java
new file mode 100644
index 0000000..2441a66
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/BundleProjectService.java
@@ -0,0 +1,308 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Kaloyan Raev - kaloyan.raev at sap.com - Bug 323246: IBundleProjectService.setBundleRoot() does not accept null argument
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import java.io.*;
+import java.util.*;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.osgi.util.ManifestElement;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.project.*;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.importing.BundleImporterExtension;
+import org.eclipse.pde.internal.core.importing.IBundleImporter;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.target.Messages;
+import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Version;
+
+/**
+ * Factory class for creating bundle project descriptions and associated artifacts.
+ * 
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @since 3.6
+ */
+public final class BundleProjectService implements IBundleProjectService {
+
+	/**
+	 * Property key used in {@link BundleImportDescription}s.
+	 */
+	public static final String BUNDLE_IMPORTER = "BUNDLE_IMPORTER"; //$NON-NLS-1$
+
+	/**
+	 * Property key used in {@link BundleImportDescription}s.
+	 */
+	public static final String PLUGIN = "PLUGIN"; //$NON-NLS-1$
+
+	private static IBundleProjectService fgDefault;
+
+	private List fProjectFactories;
+
+	/**
+	 * Returns the bundle project service.
+	 * 
+	 * @return bundle project service
+	 */
+	public static synchronized IBundleProjectService getDefault() {
+		if (fgDefault == null) {
+			fgDefault = new BundleProjectService();
+		}
+		return fgDefault;
+	}
+
+	/**
+	 * Constructs a new service.
+	 */
+	private BundleProjectService() {
+	}
+
+	/**
+	 * Returns a bundle description for the given project.
+	 * If the project does not exist, the description can be used to create
+	 * a new bundle project. If the project does exist, the description can be used to
+	 * modify a project.
+	 *  
+	 * @param project project
+	 * @return bundle description for the associated project
+	 * @exception CoreException if unable to create a description on an existing project
+	 */
+	public IBundleProjectDescription getDescription(IProject project) throws CoreException {
+		return new BundleProjectDescription(project);
+	}
+
+	/**
+	 * Creates and returns a new host description.
+	 * 
+	 * @param name symbolic name of the host
+	 * @param range version constraint or <code>null</code>
+	 * @return host description
+	 */
+	public IHostDescription newHost(String name, VersionRange range) {
+		return new HostDescriptoin(name, range);
+	}
+
+	/**
+	 * Creates and returns a new package import description.
+	 * 
+	 * @param name fully qualified name of imported package
+	 * @param range version constraint or <code>null</code>
+	 * @param optional whether the import is optional
+	 * @return package import description
+	 */
+	public IPackageImportDescription newPackageImport(String name, VersionRange range, boolean optional) {
+		return new PackageImportDescription(name, range, optional);
+	}
+
+	/**
+	 * Constructs a new package export description.
+	 * 
+	 * @param name fully qualified package name
+	 * @param version version or <code>null</code>
+	 * @param api whether the package is considered API
+	 * @param friends symbolic names of bundles that are friends, or <code>null</code>; when 
+	 *  friends are specified the package will not be API
+	 * @return package export description
+	 */
+	public IPackageExportDescription newPackageExport(String name, Version version, boolean api, String[] friends) {
+		return new PackageExportDescription(name, version, friends, api);
+	}
+
+	/**
+	 * Creates and returns a new required bundle description.
+	 * 
+	 * @param name symbolic name of required bundle
+	 * @param range version constraint or <code>null</code>
+	 * @param optional whether the required bundle is optional
+	 * @param export whether the required bundle is re-exported
+	 * @return required bundle description
+	 */
+	public IRequiredBundleDescription newRequiredBundle(String name, VersionRange range, boolean optional, boolean export) {
+		return new RequiredBundleDescription(name, range, export, optional);
+	}
+
+	/**
+	 * Creates and returns a new bundle classpath entry defining the relationship
+	 * between a source, binaries, and library on the Bundle-Classpath header.
+	 * <p>
+	 * When a source folder is specified, the binary folder defines its output
+	 * folder, or may be <code>null</code> to indicate that the project's default output
+	 * folder is used by the source folder. When only a binary folder is specified, there
+	 * is no source associated with the folder. When no source or binary are specified,
+	 * it indicates the library is included in the project as an archive.
+	 * </p>
+	 * @param sourceFolder source folder or <code>null</code>
+	 * @param binaryFolder binary folder or <code>null</code>
+	 * @param library associated entry on the Bundle-Classpath header or <code>null</code>
+	 * 	to indicate default entry "."
+	 */
+	public IBundleClasspathEntry newBundleClasspathEntry(IPath sourceFolder, IPath binaryFolder, IPath library) {
+		return new BundleClasspathSpecification(sourceFolder, binaryFolder, library);
+	}
+
+	/**
+	 * Sets the location within the project where the root of the bundle and its associated
+	 * artifacts will reside, or <code>null</code> to indicate the default bundle root location
+	 * should be used (project folder).
+	 * <p>
+	 * The bundle root is the folder containing the <code>META-INF/</code> folder. When the bundle
+	 * root location is modified, existing bundle artifacts at the old root are not moved or modified.
+	 * When creating a new bundle project {@link IBundleProjectDescription#setBundleRoot(IPath)} can 
+	 * be used to specify an initial bundle root location. To modify the bundle root location of an
+	 * existing project, this method must be used.
+	 * </p>
+	 * @param project project that must exist and be open
+	 * @param bundleRoot project relative path to bundle root artifacts in the project or <code>null</code>
+	 * @throws CoreException if setting the root fails
+	 */
+	public void setBundleRoot(IProject project, IPath bundleRoot) throws CoreException {
+		PDEProject.setBundleRoot(project, (bundleRoot == null) ? null : project.getFolder(bundleRoot));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectService#getSourceReferenceHandler(java.lang.String)
+	 */
+	public IBundleImporter getSourceReferenceHandler(String id) {
+
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IBundleProjectService#getBundleImporters()
+	 */
+	public synchronized IBundleImporter[] getBundleImporters() {
+		if (fProjectFactories == null) {
+			fProjectFactories = new ArrayList();
+			IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(ICoreConstants.EXTENSION_POINT_BUNDLE_IMPORTERS);
+			if (point != null) {
+				IConfigurationElement[] infos = point.getConfigurationElements();
+				for (int i = 0; i < infos.length; i++) {
+					fProjectFactories.add(new BundleImporterExtension(infos[i]));
+				}
+			}
+		}
+		return (IBundleImporter[]) fProjectFactories.toArray(new IBundleImporter[fProjectFactories.size()]);
+	}
+
+	/**
+	 * Creates and returns a map of bundle import descriptions for the given bundles.
+	 * The map is of {@link IBundleImporter} -> arrays of {@link BundleImportDescription}.
+	 * Adds 'BUNDLE_IMPORTER' property to each description that maps to the importer that
+	 * created each description.
+	 * Adds 'PLUGIN' property that maps to the original plug-in model.
+	 * 
+	 * @param models plug-in models
+	 * @return import instructions
+	 * @exception CoreException if unable to read manifest
+	 */
+	public Map getImportDescriptions(IPluginModelBase[] models) throws CoreException {
+		// build manifests
+		List manifests = new ArrayList();
+		List plugins = new ArrayList();
+		for (int i = 0; i < models.length; i++) {
+			String location = models[i].getInstallLocation();
+			if (location != null) {
+				Map manifest = loadManifest(new File(location));
+				if (manifest != null) {
+					manifests.add(manifest);
+					plugins.add(models[i]);
+				}
+			}
+		}
+		if (!manifests.isEmpty()) {
+			Map[] marray = (Map[]) manifests.toArray(new Map[manifests.size()]);
+			Map result = new HashMap();
+			IBundleImporter[] importers = getBundleImporters();
+			for (int i = 0; i < importers.length; i++) {
+				IBundleImporter importer = importers[i];
+				BundleImportDescription[] descriptions = importer.validateImport(marray);
+				List valid = new ArrayList();
+				for (int j = 0; j < descriptions.length; j++) {
+					BundleImportDescription description = descriptions[j];
+					if (description != null) {
+						valid.add(description);
+						description.setProperty(BUNDLE_IMPORTER, importer);
+						description.setProperty(PLUGIN, plugins.get(j));
+					}
+				}
+				if (!valid.isEmpty()) {
+					result.put(importer, valid.toArray(new BundleImportDescription[valid.size()]));
+				}
+			}
+			return result;
+		}
+		return new HashMap();
+	}
+
+	/**
+	 * Parses a bunlde's manifest into a dictionary and returns the map
+	 * or <code>null</code> if none. The bundle may be in a jar
+	 * or in a directory at the specified location.
+	 * 
+	 * @param bundleLocation root location of the bundle
+	 * @return bundle manifest dictionary or <code>null</code>
+	 * @throws CoreException if manifest has invalid syntax or is missing
+	 */
+	private Map loadManifest(File bundleLocation) throws CoreException {
+		ZipFile jarFile = null;
+		InputStream manifestStream = null;
+		String extension = new Path(bundleLocation.getName()).getFileExtension();
+		try {
+			if (extension != null && extension.equals("jar") && bundleLocation.isFile()) { //$NON-NLS-1$
+				jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
+				ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
+				if (manifestEntry != null) {
+					manifestStream = jarFile.getInputStream(manifestEntry);
+				}
+			} else {
+				File file = new File(bundleLocation, JarFile.MANIFEST_NAME);
+				if (file.exists()) {
+					manifestStream = new FileInputStream(file);
+				}
+			}
+			if (manifestStream == null) {
+				return null;
+			}
+			return ManifestElement.parseBundleManifest(manifestStream, new Hashtable(10));
+		} catch (BundleException e) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_INVALID_MANIFEST, NLS.bind(Messages.DirectoryBundleContainer_3, bundleLocation.getAbsolutePath()), e));
+		} catch (IOException e) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_INVALID_MANIFEST, NLS.bind(Messages.DirectoryBundleContainer_3, bundleLocation.getAbsolutePath()), e));
+		} finally {
+			closeZipFileAndStream(manifestStream, jarFile);
+		}
+	}
+
+	private void closeZipFileAndStream(InputStream stream, ZipFile jarFile) {
+		try {
+			if (stream != null) {
+				stream.close();
+			}
+		} catch (IOException e) {
+			PDECore.log(e);
+		}
+		try {
+			if (jarFile != null) {
+				jarFile.close();
+			}
+		} catch (IOException e) {
+			PDECore.log(e);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/HostDescriptoin.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/HostDescriptoin.java
new file mode 100644
index 0000000..1eb5a5b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/HostDescriptoin.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.pde.core.project.IHostDescription;
+
+/**
+ * Describes a host
+ */
+public class HostDescriptoin extends RequirementSpecification implements IHostDescription {
+
+	/**
+	 * Constructs a host description.
+	 * 
+	 * @param name
+	 * @param range
+	 */
+	public HostDescriptoin(String name, VersionRange range) {
+		super(name, range, false, false);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.java
new file mode 100644
index 0000000..19410c5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ *
+ */
+public class Messages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.pde.internal.core.project.Messages"; //$NON-NLS-1$
+	public static String ProjectModifyOperation_0;
+	public static String ProjectModifyOperation_1;
+	public static String ProjectModifyOperation_2;
+	static {
+		// initialize resource bundle
+		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+	}
+
+	private Messages() {
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.properties b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.properties
new file mode 100644
index 0000000..d2b8e6d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/Messages.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+ProjectModifyOperation_0=Modifying project...
+ProjectModifyOperation_1=Creating project...
+ProjectModifyOperation_2=Error saving project specific settings
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java
new file mode 100644
index 0000000..e187c55
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PDEProject.java
@@ -0,0 +1,263 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.*;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * Utility class to resolve plug-in and bundle files relative to a project 
+ * specific bundle root location.
+ * 
+ * @since 3.6
+ */
+public class PDEProject {
+
+	/**
+	 * Preference key for the project relative bundle root path
+	 */
+	public static final String BUNDLE_ROOT_PATH = "BUNDLE_ROOT_PATH"; //$NON-NLS-1$
+
+	/**
+	 * Returns the container in the specified project that corresponds to the
+	 * root of bundle related artifacts. May return the project itself
+	 * or a folder within the project.
+	 * 
+	 * @param project project
+	 * @return container corresponding to the bundle root
+	 */
+	public static IContainer getBundleRoot(IProject project) {
+		ProjectScope scope = new ProjectScope(project);
+		IEclipsePreferences node = scope.getNode(PDECore.PLUGIN_ID);
+		if (node != null) {
+			String string = node.get(BUNDLE_ROOT_PATH, null);
+			if (string != null) {
+				IPath path = Path.fromPortableString(string);
+				return project.getFolder(path);
+			}
+		}
+		return project;
+	}
+
+	/**
+	 * Returns the launch shortcuts configured for this project
+	 * or <code>null</code> if default launchers should be used.
+	 *  
+	 * @param project project
+	 * @return configured launch shortcuts or <code>null</code>
+	 */
+	public static String[] getLaunchShortcuts(IProject project) {
+		ProjectScope scope = new ProjectScope(project);
+		IEclipsePreferences node = scope.getNode(PDECore.PLUGIN_ID);
+		if (node != null) {
+			String list = node.get(ICoreConstants.MANIFEST_LAUNCH_SHORTCUTS, (String) null);
+			if (list != null) {
+				return list.split(","); //$NON-NLS-1$
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the export wizard configured for this project or <code>null</code>
+	 * if default.
+	 * 
+	 * @param project project
+	 * @return export wizard identifier or <code>null</code>
+	 */
+	public static String getExportWizard(IProject project) {
+		ProjectScope scope = new ProjectScope(project);
+		IEclipsePreferences node = scope.getNode(PDECore.PLUGIN_ID);
+		if (node != null) {
+			return node.get(ICoreConstants.MANIFEST_EXPORT_WIZARD, (String) null);
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the root of the bundle related artifacts in the specified project
+	 * to the specified container. When <code>null</code> is specified, the 
+	 * bundle root will be the project itself. The container must be within
+	 * the specified project.
+	 * 
+	 * @param project project
+	 * @param root project relative bundle root path, or <code>null</code> (or an empty path)
+	 *  to indicate the root of the bundle is the root of the project
+	 * @exception CoreException if unable to set the bundle root to the specified container
+	 */
+	public static void setBundleRoot(IProject project, IContainer root) throws CoreException {
+		if (root != null && !root.getProject().equals(project)) {
+			throw new IllegalArgumentException("root must be contained in the given project"); //$NON-NLS-1$
+		}
+		ProjectScope scope = new ProjectScope(project);
+		IEclipsePreferences node = scope.getNode(PDECore.PLUGIN_ID);
+		if (node != null) {
+			IPath path = null;
+			if (root != null) {
+				path = root.getProjectRelativePath();
+			}
+			if (path != null && path.isEmpty()) {
+				path = null;
+			}
+			String value = null;
+			if (path != null) {
+				value = path.toPortableString();
+			}
+			if (value == null) {
+				node.remove(BUNDLE_ROOT_PATH);
+			} else {
+				node.put(BUNDLE_ROOT_PATH, value);
+			}
+			try {
+				node.flush();
+				// update model manager
+				PDECore.getDefault().getModelManager().bundleRootChanged(project);
+			} catch (BackingStoreException e) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, e.getMessage(), e));
+			}
+		} else {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, "Failed to retrieve project scope preference settings")); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>MANIFEST.MF</code> file.
+	 * 
+	 * @param project project
+	 * @return <code>MANIFEST.MF</code> file that may or may not exist
+	 */
+	public static IFile getManifest(IProject project) {
+		return getBundleRelativeFile(project, ICoreConstants.MANIFEST_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>build.properties</code>file.
+	 * 
+	 * @param project project
+	 * @return <code>build.properties</code> file that may or may not exist
+	 */
+	public static IFile getBuildProperties(IProject project) {
+		return getBundleRelativeFile(project, ICoreConstants.BUILD_PROPERTIES_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>plugin.xml</code>file.
+	 * 
+	 * @param project project
+	 * @return <code>plugin.xml</code> file that may or may not exist
+	 */
+	public static IFile getPluginXml(IProject project) {
+		return getBundleRelativeFile(project, ICoreConstants.PLUGIN_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>fragment.xml</code>file.
+	 * 
+	 * @param project project
+	 * @return <code>fragment.xml</code> file that may or may not exist
+	 */
+	public static IFile getFragmentXml(IProject project) {
+		return getBundleRelativeFile(project, ICoreConstants.FRAGMENT_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>feature.xml</code>file.
+	 * 
+	 * @param project project
+	 * @return <code>feature.xml</code> file that may or may not exist
+	 */
+	public static IFile getFeatureXml(IProject project) {
+		return getBundleRelativeFile(project, ICoreConstants.FEATURE_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>.options</code>file.
+	 * 
+	 * @param project project
+	 * @return <code>.options</code> file that may or may not exist
+	 */
+	public static IFile getOptionsFile(IProject project) {
+		return getBundleRelativeFile(project, new Path(ICoreConstants.OPTIONS_FILENAME));
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>OSGI-INF/</code>folder.
+	 * 
+	 * @param project project
+	 * @return <code>OSGI-INF/</code> folder that may or may not exist
+	 */
+	public static IFolder getOSGiInf(IProject project) {
+		return getBundleRelativeFolder(project, ICoreConstants.OSGI_INF_PATH);
+	}
+
+	/**
+	 * Returns the resource in the specified project corresponding to its
+	 * <code>META-INF/</code>folder.
+	 * 
+	 * @param project project
+	 * @return <code>META-INF/</code> folder that may or may not exist
+	 */
+	public static IFolder getMetaInf(IProject project) {
+		return getBundleRelativeFolder(project, new Path(ICoreConstants.MANIFEST_FOLDER_NAME));
+	}
+
+	/**
+	 * Returns a file relative to the bundle root of the specified project.
+	 * 
+	 * @param project project
+	 * @param path bundle root relative path
+	 * @return file that may or may not exist
+	 */
+	public static IFile getBundleRelativeFile(IProject project, IPath path) {
+		return getBundleRoot(project).getFile(path);
+	}
+
+	/**
+	 * Returns a folder relative to the bundle root of the specified project.
+	 * 
+	 * @param project project
+	 * @param path bundle root relative path
+	 * @return folder that may or may not exist
+	 */
+	public static IFolder getBundleRelativeFolder(IProject project, IPath path) {
+		return getBundleRoot(project).getFolder(path);
+	}
+
+	/**
+	 * Returns the bundle localization file for the specified bundle project.
+	 * The file may or may not exist.
+	 * 
+	 * @param project
+	 * @return bunlde localization file which may or may not exist
+	 */
+	public static IFile getLocalizationFile(IProject project) {
+		IPluginModelBase model = PluginRegistry.findModel(project);
+		String localization = PDEManager.getBundleLocalization(model);
+		return getBundleRelativeFile(project, new Path(localization + ".properties")); //$NON-NLS-1$
+	}
+
+	// TODO: schema folder?
+
+	// TODO: plugin_customization.ini ?
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageExportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageExportDescription.java
new file mode 100644
index 0000000..d42a7c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageExportDescription.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.pde.core.project.IPackageExportDescription;
+import org.osgi.framework.Version;
+
+/**
+ * Package export description.
+ */
+public class PackageExportDescription implements IPackageExportDescription {
+
+	private String fName;
+	private Version fVersion;
+	private String[] fFriends;
+	private boolean fApi;
+
+	public PackageExportDescription(String name, Version version, String[] friends, boolean api) {
+		fName = name;
+		fVersion = version;
+		fApi = api;
+		if (friends != null && friends.length > 0) {
+			fFriends = friends;
+			fApi = false;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IPackageExportDescription#getVersion()
+	 */
+	public Version getVersion() {
+		return fVersion;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IPackageExportDescription#getFriends()
+	 */
+	public String[] getFriends() {
+		return fFriends;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IPackageExportDescription#isApi()
+	 */
+	public boolean isApi() {
+		return fApi;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IPackageExportDescription#getName()
+	 */
+	public String getName() {
+		return fName;
+	}
+
+	public boolean equals(Object obj) {
+		if (obj instanceof PackageExportDescription) {
+			PackageExportDescription spec = (PackageExportDescription) obj;
+			return getName().equals(spec.getName()) && isApi() == spec.isApi() && equalOrNull(getVersion(), spec.getVersion()) && equalOrNull(getFriends(), spec.getFriends());
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		int code = getClass().hashCode() + fName.hashCode();
+		if (fVersion != null) {
+			code += fVersion.hashCode();
+		}
+		if (fApi) {
+			code++;
+		}
+		if (fFriends != null) {
+			for (int i = 0; i < fFriends.length; i++) {
+				code += fFriends[i].hashCode();
+			}
+		}
+		return code;
+	}
+
+	private boolean equalOrNull(Object o1, Object o2) {
+		if (o1 == null) {
+			return o2 == null;
+		}
+		if (o2 == null) {
+			return o1 == null;
+		}
+		return o1.equals(o2);
+	}
+
+	/**
+	 * Returns whether the arrays are equal.
+	 * 
+	 * @param array1 an object array or <code>null</code> 
+	 * @param array2 an object array or <code>null</code>
+	 * @return whether the arrays are equal
+	 */
+	private boolean equalOrNull(Object[] array1, Object[] array2) {
+		if (array1 == null || array1.length == 0) {
+			return array2 == null || array2.length == 0;
+		}
+		if (array2 == null || array2.length == 0) {
+			return false;
+		}
+		if (array1.length != array2.length) {
+			return false;
+		}
+		for (int i = 0; i < array1.length; i++) {
+			if (!array1[i].equals(array2[i])) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append(fName);
+		if (fVersion != null) {
+			buf.append(";version="); //$NON-NLS-1$
+			buf.append(fVersion.toString());
+		}
+		if (fFriends != null) {
+			buf.append(";x-friends="); //$NON-NLS-1$
+			buf.append('"');
+			for (int i = 0; i < fFriends.length; i++) {
+				if (i > 0) {
+					buf.append(',');
+				}
+				buf.append(fFriends[i]);
+			}
+			buf.append('"');
+		} else {
+			if (!fApi) {
+				buf.append(";x-internal=true"); //$NON-NLS-1$
+			}
+		}
+		return buf.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageImportDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageImportDescription.java
new file mode 100644
index 0000000..dc374ba
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/PackageImportDescription.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.pde.core.project.IPackageImportDescription;
+
+/**
+ * Describes a package import
+ * 
+ * @since 3.6
+ */
+public class PackageImportDescription extends RequirementSpecification implements IPackageImportDescription {
+
+	/**
+	 * Constructs a package import.
+	 * 
+	 * @param name
+	 * @param range
+	 * @param optional
+	 */
+	public PackageImportDescription(String name, VersionRange range, boolean optional) {
+		super(name, range, false, optional);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java
new file mode 100644
index 0000000..b0603f3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/ProjectModifyOperation.java
@@ -0,0 +1,945 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.pde.core.build.*;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.core.project.*;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.bundle.*;
+import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
+import org.eclipse.pde.internal.core.text.bundle.*;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
+import org.osgi.service.prefs.BackingStoreException;
+
+/**
+ * Operation to create or modify a PDE project based on a bundle project description.
+ * 
+ * @since 3.6
+ */
+public class ProjectModifyOperation {
+
+	private WorkspacePluginModelBase fModel;
+
+	private final static IPath[] EXCLUDE_NONE = {};
+
+	/**
+	 * Creates or modifies a project based on the given description.
+	 * 
+	 * @param monitor progress monitor or <code>null</code>
+	 * @param description project description
+	 * @throws CoreException if project creation fails
+	 */
+	public void execute(IProgressMonitor monitor, IBundleProjectDescription description) throws CoreException {
+		// retrieve current description of the project to detect differences
+		IProject project = description.getProject();
+		IBundleProjectService service = (IBundleProjectService) PDECore.getDefault().acquireService(IBundleProjectService.class.getName());
+		IBundleProjectDescription before = service.getDescription(project);
+		boolean considerRoot = !project.exists();
+		String taskName = null;
+		boolean jpExisted = false;
+		if (project.exists()) {
+			taskName = Messages.ProjectModifyOperation_0;
+			jpExisted = before.hasNature(JavaCore.NATURE_ID);
+		} else {
+			taskName = Messages.ProjectModifyOperation_1;
+			// new bundle projects get Java and Plug-in natures
+			if (description.getNatureIds().length == 0) {
+				description.setNatureIds(new String[] {IBundleProjectDescription.PLUGIN_NATURE, JavaCore.NATURE_ID});
+			}
+		}
+		boolean becomeBundle = !before.hasNature(IBundleProjectDescription.PLUGIN_NATURE) && description.hasNature(IBundleProjectDescription.PLUGIN_NATURE);
+
+		// set default values when migrating from Java project to bundle project
+		if (jpExisted && becomeBundle) {
+			if (description.getExecutionEnvironments() == null) {
+				// use EE from Java project when unspecified in the description, and a bundle nature is being added
+				IJavaProject jp = JavaCore.create(project);
+				if (jp.exists()) {
+					IClasspathEntry[] classpath = jp.getRawClasspath();
+					for (int i = 0; i < classpath.length; i++) {
+						IClasspathEntry entry = classpath[i];
+						if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+							String id = JavaRuntime.getExecutionEnvironmentId(entry.getPath());
+							if (id != null) {
+								description.setExecutionEnvironments(new String[] {id});
+								break;
+							}
+						}
+					}
+				}
+			}
+		}
+		// other default values when becoming a bundle
+		if (becomeBundle) {
+			// set default values for where unspecified
+			if (description.getBundleVersion() == null) {
+				description.setBundleVersion(new Version(1, 0, 0, "qualifier")); //$NON-NLS-1$
+			}
+		}
+
+		SubMonitor sub = SubMonitor.convert(monitor, taskName, 6);
+		// create and open project
+		createProject(description);
+		// set bundle root for new projects
+		if (considerRoot) {
+			IFolder folder = null;
+			IPath root = description.getBundleRoot();
+			if (root != null && !root.isEmpty()) {
+				folder = project.getFolder(root);
+				CoreUtility.createFolder(folder);
+			}
+			PDEProject.setBundleRoot(project, folder);
+		}
+		sub.worked(1);
+		configureNatures(description);
+		sub.worked(1);
+		if (project.hasNature(JavaCore.NATURE_ID)) {
+			configureJavaProject(description, before, jpExisted);
+		}
+		sub.worked(1);
+		configureManifest(description, before);
+		sub.worked(1);
+		configureBuildPropertiesFile(description, before);
+		sub.worked(1);
+
+		// project settings for Equinox, Extension Registry, Automated dependency policy,
+		// manifest editor launch shortcuts and export wizard
+		IEclipsePreferences pref = new ProjectScope(project).getNode(PDECore.PLUGIN_ID);
+		if (pref != null) {
+			// best guess for automated dependency management: Equinox + Extensions = use required bundle
+			if (description.isEquinox() && description.isExtensionRegistry()) {
+				pref.remove(ICoreConstants.RESOLVE_WITH_REQUIRE_BUNDLE); // i.e. use required bundle
+			} else {
+				pref.putBoolean(ICoreConstants.RESOLVE_WITH_REQUIRE_BUNDLE, false);
+			}
+			if (description.isExtensionRegistry()) {
+				pref.remove(ICoreConstants.EXTENSIONS_PROPERTY); // i.e. support extensions
+			} else {
+				pref.putBoolean(ICoreConstants.EXTENSIONS_PROPERTY, false);
+			}
+			if (description.isEquinox()) {
+				pref.remove(ICoreConstants.EQUINOX_PROPERTY); // i.e. using Equinox
+			} else {
+				pref.putBoolean(ICoreConstants.EQUINOX_PROPERTY, false);
+			}
+			String[] shorts = description.getLaunchShortcuts();
+			if (shorts == null || shorts.length == 0) {
+				pref.remove(ICoreConstants.MANIFEST_LAUNCH_SHORTCUTS); // use defaults
+			} else {
+				StringBuffer value = new StringBuffer();
+				for (int i = 0; i < shorts.length; i++) {
+					if (i > 0) {
+						value.append(',');
+					}
+					value.append(shorts[i]);
+				}
+				pref.put(ICoreConstants.MANIFEST_LAUNCH_SHORTCUTS, value.toString());
+			}
+			if (description.getExportWizardId() == null) {
+				pref.remove(ICoreConstants.MANIFEST_EXPORT_WIZARD);
+			} else {
+				pref.put(ICoreConstants.MANIFEST_EXPORT_WIZARD, description.getExportWizardId());
+			}
+			try {
+				pref.flush();
+			} catch (BackingStoreException e) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.ProjectModifyOperation_2, e));
+			}
+		}
+
+		if (fModel.isDirty()) {
+			fModel.save();
+		}
+		sub.worked(1);
+		sub.done();
+		if (monitor != null) {
+			monitor.done();
+		}
+	}
+
+	/**
+	 * Returns the model created by this operation.
+	 * 
+	 * @return model 
+	 */
+	public WorkspacePluginModelBase getModel() {
+		return fModel;
+	}
+
+	/**
+	 * Configures the build path and output location of the described Java project.
+	 * If the Java project existed before this operation, new build path entries are
+	 * added for the bundle class path, if required, but we don't change the exiting
+	 * build path.
+	 * 
+	 * @param description desired project description
+	 * @param before state before the operation
+	 * @param existed whether the Java project existed before the operation
+	 */
+	private void configureJavaProject(IBundleProjectDescription description, IBundleProjectDescription before, boolean existed) throws CoreException {
+		IProject project = description.getProject();
+		IJavaProject javaProject = JavaCore.create(project);
+		// create source folders as required
+		IBundleClasspathEntry[] bces = description.getBundleClasspath();
+		if (bces != null && bces.length > 0) {
+			for (int i = 0; i < bces.length; i++) {
+				IPath folder = bces[i].getSourcePath();
+				if (folder != null) {
+					CoreUtility.createFolder(project.getFolder(folder));
+				}
+			}
+		}
+		// Set default output folder
+		if (description.getDefaultOutputFolder() != null) {
+			IPath path = project.getFullPath().append(description.getDefaultOutputFolder());
+			javaProject.setOutputLocation(path, null);
+		}
+
+		// merge the class path if the project existed before
+		IBundleClasspathEntry[] prev = before.getBundleClasspath();
+		if (!isEqual(bces, prev)) {
+			if (existed) {
+				// add entries not already present
+				IClasspathEntry[] entries = getSourceFolderEntries(javaProject, description);
+				IClasspathEntry[] rawClasspath = javaProject.getRawClasspath();
+				List add = new ArrayList();
+				for (int i = 0; i < entries.length; i++) {
+					IClasspathEntry entry = entries[i];
+					boolean present = false;
+					for (int j = 0; j < rawClasspath.length; j++) {
+						IClasspathEntry existingEntry = rawClasspath[j];
+						if (existingEntry.getEntryKind() == entry.getEntryKind()) {
+							if (existingEntry.getPath().equals(entry.getPath())) {
+								present = true;
+								break;
+							}
+						}
+					}
+					if (!present) {
+						add.add(entry);
+					}
+				}
+				// check if the 'required plug-ins' container is present
+				boolean addRequired = false;
+				if (description.hasNature(IBundleProjectDescription.PLUGIN_NATURE)) {
+					addRequired = true;
+					for (int i = 0; i < rawClasspath.length; i++) {
+						IClasspathEntry cpe = rawClasspath[i];
+						if (cpe.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
+							if (PDECore.REQUIRED_PLUGINS_CONTAINER_PATH.equals(cpe.getPath())) {
+								addRequired = false;
+								break;
+							}
+						}
+					}
+				}
+				if (addRequired) {
+					add.add(ClasspathComputer.createContainerEntry());
+				}
+				if (!add.isEmpty()) {
+					List all = new ArrayList();
+					for (int i = 0; i < rawClasspath.length; i++) {
+						all.add(rawClasspath[i]);
+					}
+					all.addAll(add);
+					javaProject.setRawClasspath((IClasspathEntry[]) all.toArray(new IClasspathEntry[all.size()]), null);
+				}
+			} else {
+				IClasspathEntry[] entries = getClassPathEntries(javaProject, description);
+				javaProject.setRawClasspath(entries, null);
+			}
+		}
+	}
+
+	/**
+	 * Returns whether the arrays are equal.
+	 * 
+	 * @param array1 an object array or <code>null</code> 
+	 * @param array2 an object array or <code>null</code>
+	 * @return whether the arrays are equal
+	 */
+	private boolean isEqual(Object[] array1, Object[] array2) {
+		if (array1 == null || array1.length == 0) {
+			return array2 == null || array2.length == 0;
+		}
+		if (array2 == null || array2.length == 0) {
+			return false;
+		}
+		if (array1.length != array2.length) {
+			return false;
+		}
+		for (int i = 0; i < array1.length; i++) {
+			if (!array1[i].equals(array2[i])) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Returns whether the two objects are equal or both <code>null</code>.
+	 * 
+	 * @param st1
+	 * @param st2
+	 * @return whether equal or both <code>null</code>
+	 */
+	private boolean isEqual(Object st1, Object st2) {
+		if (st1 == null) {
+			return st2 == null;
+		}
+		if (st2 == null) {
+			return false;
+		}
+		return st1.equals(st2);
+	}
+
+	/**
+	 * Returns the class path entries to create for the given project.
+	 * 
+	 * @param project Java project
+	 * @param description project description
+	 * @return class path entries
+	 * @throws CoreException if class path creation fails
+	 */
+	private IClasspathEntry[] getClassPathEntries(IJavaProject project, IBundleProjectDescription description) throws CoreException {
+		IClasspathEntry[] internalClassPathEntries = getSourceFolderEntries(project, description);
+		IClasspathEntry[] entries = new IClasspathEntry[internalClassPathEntries.length + 2];
+		System.arraycopy(internalClassPathEntries, 0, entries, 2, internalClassPathEntries.length);
+
+		String[] ids = description.getExecutionEnvironments();
+		String executionEnvironment = null;
+		if (ids != null && ids.length > 0) {
+			executionEnvironment = ids[0];
+		}
+		ClasspathComputer.setComplianceOptions(project, executionEnvironment);
+		entries[0] = ClasspathComputer.createJREEntry(executionEnvironment);
+		entries[1] = ClasspathComputer.createContainerEntry();
+		return entries;
+	}
+
+	/**
+	 * Returns source folder class path entries.
+	 * 
+	 * @param project Java project
+	 * @param description project description
+	 * @return source folder class path entries, possibly empty.
+	 * @exception CoreException if source folder class path entry creation fails
+	 */
+	private IClasspathEntry[] getSourceFolderEntries(IJavaProject project, IBundleProjectDescription description) throws CoreException {
+		IBundleClasspathEntry[] folders = description.getBundleClasspath();
+		if (folders == null || folders.length == 0) {
+			return new IClasspathEntry[0];
+		}
+		List entries = new ArrayList();
+		for (int i = 0; i < folders.length; i++) {
+			IBundleClasspathEntry folder = folders[i];
+			if (folder.getSourcePath() == null) {
+				// no source indicates class file folder or library
+				IPath bin = folder.getBinaryPath();
+				if (bin == null) {
+					// nested library
+					bin = folder.getLibrary();
+				}
+				if (bin != null) {
+					IPath output = project.getProject().getFullPath().append(bin);
+					entries.add(JavaCore.newLibraryEntry(output, null, null));
+				}
+			} else {
+				// source folder
+				IPath path = project.getProject().getFullPath().append(folder.getSourcePath());
+				IPath output = folder.getBinaryPath();
+				if (output != null) {
+					output = project.getProject().getFullPath().append(output);
+				}
+				entries.add(JavaCore.newSourceEntry(path, EXCLUDE_NONE, output));
+			}
+		}
+		return (IClasspathEntry[]) entries.toArray(new IClasspathEntry[entries.size()]);
+	}
+
+	/**
+	 * Create and open the described project, as necessary.
+	 * 
+	 * @param description project description
+	 * @exception CoreException on failure
+	 */
+	private void createProject(IBundleProjectDescription description) throws CoreException {
+		IProject project = description.getProject();
+		if (!project.exists()) {
+			IProjectDescription pd = project.getWorkspace().newProjectDescription(project.getName());
+			pd.setLocationURI(description.getLocationURI());
+			project.create(pd, null);
+		}
+		if (!project.isOpen()) {
+			project.open(null);
+		}
+	}
+
+	/**
+	 * Configures project natures.
+	 * 
+	 * @param description description of project to modify
+	 * @exception CoreException if something goes wrong
+	 */
+	private void configureNatures(IBundleProjectDescription description) throws CoreException {
+		IProject project = description.getProject();
+		IProjectDescription projectDescription = project.getDescription();
+		String[] curr = projectDescription.getNatureIds();
+		Set before = new HashSet();
+		for (int i = 0; i < curr.length; i++) {
+			before.add(curr[i]);
+		}
+		String[] natureIds = description.getNatureIds();
+		Set after = new HashSet();
+		for (int i = 0; i < natureIds.length; i++) {
+			after.add(natureIds[i]);
+		}
+		if (!before.equals(after)) {
+			projectDescription.setNatureIds(natureIds);
+			project.setDescription(projectDescription, null);
+		}
+	}
+
+	/**
+	 * Configures the MANIFEST.MF for the given description.
+	 * 
+	 * @param description project description
+	 * @param before description before operation began
+	 * @throws CoreException
+	 */
+	private void configureManifest(IBundleProjectDescription description, IBundleProjectDescription before) throws CoreException {
+		IProject project = description.getProject();
+		IFile manifest = PDEProject.getManifest(project);
+		if (description.getHost() == null) {
+			fModel = new WorkspaceBundlePluginModel(manifest, PDEProject.getPluginXml(project));
+		} else {
+			fModel = new WorkspaceBundleFragmentModel(manifest, PDEProject.getFragmentXml(project));
+		}
+
+		IPluginBase pluginBase = fModel.getPluginBase();
+
+		// target version
+		String targetVersion = getTargetVersion(description.getTargetVersion());
+		if (!isEqual(targetVersion, getTargetVersion(before.getTargetVersion()))) {
+			String schemaVersion = TargetPlatformHelper.getSchemaVersionForTargetVersion(targetVersion);
+			pluginBase.setSchemaVersion(schemaVersion);
+		}
+
+		// symbolic name
+		if (!isEqual(description.getSymbolicName(), before.getSymbolicName())) {
+			pluginBase.setId(description.getSymbolicName());
+		}
+
+		// bundle version
+		if (!isEqual(description.getBundleVersion(), before.getBundleVersion())) {
+			pluginBase.setVersion(description.getBundleVersion().toString());
+		}
+
+		// bundle name
+		String bundleName = description.getBundleName();
+		if (bundleName == null) {
+			// for new projects, bundle name must be specified
+			bundleName = description.getSymbolicName();
+		}
+		if (!isEqual(bundleName, before.getBundleName())) {
+			pluginBase.setName(bundleName);
+		}
+
+		// bundle vendor
+		if (!isEqual(description.getBundleVendor(), before.getBundleVendor())) {
+			pluginBase.setProviderName(description.getBundleVendor());
+		}
+
+		// manifest version
+		if (fModel instanceof IBundlePluginModelBase) {
+			IBundlePluginModelBase bmodel = ((IBundlePluginModelBase) fModel);
+			// Target version is not persisted and does not make the model dirty.
+			// It is only used by the new project wizard to determine which templates are available.
+			((IBundlePluginBase) bmodel.getPluginBase()).setTargetVersion(targetVersion);
+			String ver = bmodel.getBundleModel().getBundle().getHeader(Constants.BUNDLE_MANIFESTVERSION);
+			if (!isEqual("2", ver)) { //$NON-NLS-1$
+				bmodel.getBundleModel().getBundle().setHeader(Constants.BUNDLE_MANIFESTVERSION, "2"); //$NON-NLS-1$
+			}
+		}
+		if (pluginBase instanceof IFragment) {
+			// host specification
+			IFragment fragment = (IFragment) pluginBase;
+			IHostDescription host = description.getHost();
+			if (!isEqual(host, before.getHost())) {
+				fragment.setPluginId(host.getName());
+				if (host.getVersionRange() != null) {
+					fragment.setPluginVersion(host.getVersionRange().toString());
+				} else {
+					// must explicitly set to null, else it appears as 0.0.0
+					fragment.setPluginVersion(null);
+				}
+			}
+		} else {
+			// bundle activator class
+			String activator = description.getActivator();
+			if (!isEqual(activator, before.getActivator())) {
+				((IPlugin) pluginBase).setClassName(activator);
+			}
+		}
+		// bundle classpath
+		configureBundleClasspath(description, before);
+
+		// required bundles
+		IRequiredBundleDescription[] dependencies = description.getRequiredBundles();
+		if (!isEqual(dependencies, before.getRequiredBundles())) {
+			// remove all existing imports, then add new ones
+			IPluginImport[] imports = pluginBase.getImports();
+			if (imports != null && imports.length > 0) {
+				for (int i = 0; i < imports.length; i++) {
+					pluginBase.remove(imports[i]);
+				}
+			}
+			if (dependencies != null) {
+				for (int i = 0; i < dependencies.length; i++) {
+					IRequiredBundleDescription req = dependencies[i];
+					VersionRange range = req.getVersionRange();
+					IPluginImport iimport = fModel.getPluginFactory().createImport();
+					iimport.setId(req.getName());
+					if (range != null) {
+						iimport.setVersion(range.toString());
+						iimport.setMatch(IMatchRules.COMPATIBLE);
+					}
+					iimport.setReexported(req.isExported());
+					iimport.setOptional(req.isOptional());
+					pluginBase.add(iimport);
+				}
+			}
+		}
+		// add Bundle Specific fields if applicable
+		if (pluginBase instanceof BundlePluginBase) {
+			IBundle bundle = ((BundlePluginBase) pluginBase).getBundle();
+			BundleModelFactory factory = new BundleModelFactory(bundle.getModel());
+			// Remove host specification if no longer a fragment
+			if (before.getHost() != null && description.getHost() == null) {
+				bundle.setHeader(Constants.FRAGMENT_HOST, null);
+			}
+			// Singleton
+			if (description.isSingleton() != before.isSingleton()) {
+				if (description.isSingleton()) {
+					IManifestHeader header = factory.createHeader(Constants.BUNDLE_SYMBOLICNAME, description.getSymbolicName());
+					if (header instanceof BundleSymbolicNameHeader) {
+						((BundleSymbolicNameHeader) header).setSingleton(description.isSingleton());
+						bundle.setHeader(Constants.BUNDLE_SYMBOLICNAME, header.getValue());
+					}
+				}
+			}
+			// Set required EEs
+			String[] ees = description.getExecutionEnvironments();
+			if (!isEqual(ees, before.getExecutionEnvironments())) {
+				if (ees == null) {
+					bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, null); // remove
+				} else {
+					StringBuffer buffer = new StringBuffer();
+					for (int i = 0; i < ees.length; i++) {
+						String id = ees[i];
+						if (buffer.length() > 0) {
+							buffer.append(",\n "); //comma, new-line, space //$NON-NLS-1$
+						}
+						buffer.append(id);
+					}
+					bundle.setHeader(Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT, buffer.toString());
+				}
+			}
+			// package imports
+			IPackageImportDescription[] packages = description.getPackageImports();
+			if (!isEqual(packages, before.getPackageImports())) {
+				if (packages == null) {
+					bundle.setHeader(Constants.IMPORT_PACKAGE, null); // remove
+				} else {
+					ImportPackageHeader header = (ImportPackageHeader) factory.createHeader(Constants.IMPORT_PACKAGE, ""); //$NON-NLS-1$
+					for (int i = 0; i < packages.length; i++) {
+						IPackageImportDescription pkg = packages[i];
+						ImportPackageObject ip = header.addPackage(pkg.getName());
+						VersionRange range = pkg.getVersionRange();
+						if (range != null) {
+							ip.setVersion(range.toString());
+						}
+						ip.setOptional(pkg.isOptional());
+					}
+					header.update();
+					bundle.setHeader(Constants.IMPORT_PACKAGE, header.getValue());
+				}
+			}
+			// package exports
+			IPackageExportDescription[] exports = description.getPackageExports();
+			if (!isEqual(exports, before.getPackageExports())) {
+				if (exports == null) {
+					bundle.setHeader(Constants.EXPORT_PACKAGE, null); // remove
+				} else {
+					ExportPackageHeader header = (ExportPackageHeader) factory.createHeader(Constants.EXPORT_PACKAGE, ""); //$NON-NLS-1$					
+					for (int i = 0; i < exports.length; i++) {
+						IPackageExportDescription pkg = exports[i];
+						ExportPackageObject epo = header.addPackage(pkg.getName());
+						Version version = pkg.getVersion();
+						if (version != null) {
+							epo.setVersion(version.toString());
+						}
+						String[] friends = pkg.getFriends();
+						if (friends != null) {
+							for (int j = 0; j < friends.length; j++) {
+								epo.addFriend(new PackageFriend(epo, friends[j]));
+							}
+						} else {
+							epo.setInternal(!pkg.isApi());
+						}
+					}
+					header.update();
+					bundle.setHeader(Constants.EXPORT_PACKAGE, header.getValue());
+				}
+			}
+			// Activation policy
+			boolean removeActivation = false;
+			if (!isEqual(description.getActivationPolicy(), before.getActivationPolicy())) {
+				if (Constants.ACTIVATION_LAZY.equals(description.getActivationPolicy())) {
+					if (description.isEquinox()) {
+						if (targetVersion.equals(IBundleProjectDescription.VERSION_3_1))
+							bundle.setHeader(ICoreConstants.ECLIPSE_AUTOSTART, "true"); //$NON-NLS-1$
+						else {
+							double version = Double.parseDouble(targetVersion);
+							if (version >= 3.4) {
+								// use OSGi R4.1 header
+								bundle.setHeader(Constants.BUNDLE_ACTIVATIONPOLICY, Constants.ACTIVATION_LAZY);
+							} else {
+								bundle.setHeader(ICoreConstants.ECLIPSE_LAZYSTART, "true"); //$NON-NLS-1$
+							}
+						}
+					} else {
+						// use OSGi R4.1 header
+						bundle.setHeader(Constants.BUNDLE_ACTIVATIONPOLICY, Constants.ACTIVATION_LAZY);
+					}
+				} else { // remove activation policy headers
+					removeActivation = true;
+				}
+			}
+			if (description.getHost() != null && before.getHost() == null) {
+				// remove activation policy if becoming a fragment
+				removeActivation = true;
+			}
+			if (removeActivation) {
+				bundle.setHeader(ICoreConstants.ECLIPSE_AUTOSTART, null);
+				bundle.setHeader(Constants.BUNDLE_ACTIVATIONPOLICY, null);
+				bundle.setHeader(ICoreConstants.ECLIPSE_LAZYSTART, null);
+			}
+			// Localization
+			IPath localization = description.getLocalization();
+			if (!isEqual(localization, before.getLocalization())) {
+				if (localization == null) {
+					bundle.setHeader(Constants.BUNDLE_LOCALIZATION, null);
+				} else {
+					bundle.setHeader(Constants.BUNDLE_LOCALIZATION, localization.toString());
+				}
+			}
+			// if the bundle model has been made dirty, ensure that propagates back to the root model
+			IBundleModel bundleModel = bundle.getModel();
+			if (bundleModel instanceof WorkspaceBundleModel) {
+				WorkspaceBundleModel wbm = (WorkspaceBundleModel) bundleModel;
+				if (wbm.isDirty()) {
+					fModel.setDirty(true);
+				}
+			}
+			// apply any other headers that have been specified
+			BundleProjectDescription bpd = (BundleProjectDescription) description;
+			Map extraHeaders = bpd.getExtraHeaders();
+			Iterator iterator = extraHeaders.entrySet().iterator();
+			while (iterator.hasNext()) {
+				Entry entry = (Entry) iterator.next();
+				String name = (String) entry.getKey();
+				String value = (String) entry.getValue();
+				// translate empty header to a single space to ensure inclusion of empty headers
+				if (value != null && value.trim().length() == 0) {
+					value = " "; //$NON-NLS-1$
+				}
+				if (!isEqual(value, bundle.getHeader(name))) {
+					bundle.setHeader(name, value);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Returns the specified target version or the latest version when <code>null</code>.
+	 * @param targetVersion version or <code>null</code>
+	 * @return non-null target version
+	 */
+	private String getTargetVersion(String targetVersion) {
+		if (targetVersion == null) {
+			return TargetPlatformHelper.getTargetVersionString();
+		}
+		return targetVersion;
+	}
+
+	/**
+	 * Returns the names of libraries as they should appear on the Bundle-Classpath header
+	 * or <code>null</code> if none.
+	 * 
+	 * @param description project description
+	 * @return library names in the order they should appear or <code>null</code>
+	 */
+	protected static String[] getLibraryNames(IBundleProjectDescription description) {
+		// collect unique entries
+		IBundleClasspathEntry[] libs = description.getBundleClasspath();
+		if (libs != null && libs.length > 0) {
+			Set names = new LinkedHashSet();
+			for (int i = 0; i < libs.length; i++) {
+				IPath lib = libs[i].getLibrary();
+				String libName = "."; //$NON-NLS-1$
+				if (lib != null) {
+					libName = lib.toString();
+				}
+				names.add(libName);
+			}
+			return (String[]) names.toArray(new String[names.size()]);
+		}
+		return null;
+	}
+
+	/**
+	 * Sets the bundle class path entries in the manifest. If there is only 
+	 * one entry with the default name '.', it is not added to the Bundle-Classpath
+	 * header.
+	 * 
+	 * @param description project description
+	 * @param before original state of project
+	 * @throws CoreException
+	 */
+	private void configureBundleClasspath(IBundleProjectDescription description, IBundleProjectDescription before) throws CoreException {
+		IBundleClasspathEntry[] cp = description.getBundleClasspath();
+		if (!isEqual(cp, before.getBundleClasspath())) {
+			// remove all libraries and start again
+			IPluginBase pluginBase = fModel.getPluginBase();
+			IPluginLibrary[] libraries = pluginBase.getLibraries();
+			if (libraries != null && libraries.length > 0) {
+				for (int i = 0; i < libraries.length; i++) {
+					pluginBase.remove(libraries[i]);
+				}
+			}
+			String[] names = getLibraryNames(description);
+			if (names != null) {
+				if (names.length == 1 && ".".equals(names[0])) { //$NON-NLS-1$
+					return; // default library does not need to be added
+				}
+				for (int i = 0; i < names.length; i++) {
+					IPluginLibrary library = fModel.getPluginFactory().createLibrary();
+					library.setName(names[i]);
+					library.setExported(false);
+					pluginBase.add(library);
+				}
+			}
+		}
+	}
+
+	private void configureBuildPropertiesFile(IBundleProjectDescription description, IBundleProjectDescription before) throws CoreException {
+		IProject project = description.getProject();
+		IFile file = PDEProject.getBuildProperties(project);
+		WorkspaceBuildModel model = new WorkspaceBuildModel(file);
+		IBuildModelFactory factory = model.getFactory();
+
+		// BIN.INCLUDES
+		IBuildEntry binEntry = model.getBuild().getEntry(IBuildEntry.BIN_INCLUDES);
+		if (binEntry == null) {
+			binEntry = factory.createEntry(IBuildEntry.BIN_INCLUDES);
+			model.getBuild().add(binEntry);
+		}
+		boolean modified = fillBinIncludes(project, binEntry, description, before);
+		modified = createSourceOutputBuildEntries(model, factory, description, before) | modified;
+		if (modified) {
+			model.save();
+		}
+	}
+
+	/**
+	 * Configures the bin.includes entry based on the included libraries and explicit entries to add.
+	 * 
+	 * @param project
+	 * @param binEntry
+	 * @param description
+	 * @param before
+	 * @return whether the entry was modified
+	 * @throws CoreException
+	 */
+	private boolean fillBinIncludes(IProject project, IBuildEntry binEntry, IBundleProjectDescription description, IBundleProjectDescription before) throws CoreException {
+		boolean modified = false;
+		if (!binEntry.contains("META-INF/")) { //$NON-NLS-1$
+			modified = true;
+			binEntry.addToken("META-INF/"); //$NON-NLS-1$
+		}
+		// add bundle class path entries
+		String[] names = getLibraryNames(description);
+		String[] prevNames = getLibraryNames(before);
+		if (!isEqual(names, prevNames)) {
+			// remove old libraries
+			if (prevNames != null) {
+				for (int i = 0; i < prevNames.length; i++) {
+					if (binEntry.contains(prevNames[i])) {
+						modified = true;
+						binEntry.removeToken(prevNames[i]);
+					}
+				}
+			}
+			// add new libraries
+			if (names != null) {
+				for (int i = 0; i < names.length; i++) {
+					if (!binEntry.contains(names[i])) {
+						modified = true;
+						// folders need trailing slash - see bug 306991
+						String name = names[i];
+						IPath path = new Path(names[i]);
+						String extension = path.getFileExtension();
+						if (extension == null) {
+							if (!name.endsWith("/")) { //$NON-NLS-1$
+								name = name + "/"; //$NON-NLS-1$
+							}
+						}
+						binEntry.addToken(name);
+					}
+				}
+			}
+		}
+
+		// extra files be added to build.properties
+		IPath[] paths = description.getBinIncludes();
+		IPath[] prevPaths = before.getBinIncludes();
+		if (!isEqual(paths, prevPaths)) {
+			// remove old paths
+			if (prevPaths != null) {
+				for (int i = 0; i < prevPaths.length; i++) {
+					String token = prevPaths[i].toString();
+					if (binEntry.contains(token)) {
+						binEntry.removeToken(token);
+						modified = true;
+					}
+				}
+			}
+			// add new paths
+			if (paths != null) {
+				for (int i = 0; i < paths.length; i++) {
+					String name = paths[i].toString();
+					if (!binEntry.contains(name)) {
+						binEntry.addToken(name);
+						modified = true;
+					}
+				}
+			}
+		}
+		return modified;
+	}
+
+	private boolean createSourceOutputBuildEntries(WorkspaceBuildModel model, IBuildModelFactory factory, IBundleProjectDescription description, IBundleProjectDescription before) throws CoreException {
+		boolean modified = false;
+		IBundleClasspathEntry[] folders = description.getBundleClasspath();
+		IBundleClasspathEntry[] prev = before.getBundleClasspath();
+		if (!isEqual(folders, prev)) {
+			modified = true;
+			// remove the old ones
+			String[] oldNames = getLibraryNames(before);
+			IBuild build = model.getBuild();
+			if (oldNames != null) {
+				for (int i = 0; i < oldNames.length; i++) {
+					removeBuildEntry(build, IBuildEntry.JAR_PREFIX + oldNames[i]);
+					removeBuildEntry(build, IBuildEntry.OUTPUT_PREFIX + oldNames[i]);
+				}
+			}
+			// configure the new ones
+			if (folders != null && folders.length > 0) {
+				for (int i = 0; i < folders.length; i++) {
+					String libraryName = null;
+					IPath libPath = folders[i].getLibrary();
+					if (libPath == null) {
+						libraryName = "."; //$NON-NLS-1$
+					} else {
+						libraryName = folders[i].getLibrary().toString();
+					}
+
+					// SOURCE.<LIBRARY_NAME>
+					IPath srcFolder = folders[i].getSourcePath();
+					if (srcFolder != null) {
+						IBuildEntry entry = getBuildEntry(build, factory, IBuildEntry.JAR_PREFIX + libraryName);
+						if (!srcFolder.isEmpty())
+							entry.addToken(srcFolder.addTrailingSeparator().toString());
+						else
+							entry.addToken("."); //$NON-NLS-1$
+					}
+
+					// OUTPUT.<LIBRARY_NAME>
+					IPath outFolder = folders[i].getBinaryPath();
+					if (srcFolder != null && outFolder == null) {
+						// default output folder
+						IJavaProject project = JavaCore.create(description.getProject());
+						outFolder = project.getOutputLocation().removeFirstSegments(1);
+					}
+					if (outFolder != null) {
+						IBuildEntry entry = getBuildEntry(build, factory, IBuildEntry.OUTPUT_PREFIX + libraryName);
+						String token = null;
+						if (!outFolder.isEmpty())
+							token = outFolder.addTrailingSeparator().toString();
+						else
+							token = "."; //$NON-NLS-1$
+						if (!entry.contains(token)) {
+							entry.addToken(token);
+						}
+					}
+
+				}
+			}
+		}
+		return modified;
+	}
+
+	/**
+	 * Gets the specified build entry, creating and adding it if not already present.
+	 * 
+	 * @param build build
+	 * @param factory factory to create new entries
+	 * @param key the entry to create
+	 * @return build entry
+	 * @exception CoreException if unable to add the build entry
+	 */
+	private IBuildEntry getBuildEntry(IBuild build, IBuildModelFactory factory, String key) throws CoreException {
+		IBuildEntry entry = build.getEntry(key);
+		if (entry == null) {
+			entry = factory.createEntry(key);
+			build.add(entry);
+		}
+		return entry;
+	}
+
+	/**
+	 * Remove a build entry from the model.
+	 * 
+	 * @param build
+	 * @param key
+	 * @throws CoreException 
+	 */
+	private void removeBuildEntry(IBuild build, String key) throws CoreException {
+		IBuildEntry entry = build.getEntry(key);
+		if (entry != null) {
+			build.remove(entry);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequiredBundleDescription.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequiredBundleDescription.java
new file mode 100644
index 0000000..fe53b94
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequiredBundleDescription.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.eclipse.pde.core.project.IRequiredBundleDescription;
+
+/**
+ * Describes a required bundle.
+ * 
+ * @since 3.6
+ */
+public class RequiredBundleDescription extends RequirementSpecification implements IRequiredBundleDescription {
+
+	/**
+	 * Constructs a required bundle description.
+	 * 
+	 * @param name
+	 * @param range
+	 * @param reexport
+	 * @param optional
+	 */
+	public RequiredBundleDescription(String name, VersionRange range, boolean reexport, boolean optional) {
+		super(name, range, reexport, optional);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequirementSpecification.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequirementSpecification.java
new file mode 100644
index 0000000..0983335
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/project/RequirementSpecification.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.project;
+
+import org.eclipse.osgi.service.resolver.VersionRange;
+
+/**
+ * Common implementation for a requirement specification - host, required bundle,
+ * or package import.
+ */
+public abstract class RequirementSpecification {
+
+	private String fName;
+	private VersionRange fRange;
+	private boolean fExport;
+	private boolean fOptional;
+
+	/**
+	 * Constructs a new requirement specification.
+	 * 
+	 * @param name
+	 * @param range
+	 * @param export
+	 */
+	RequirementSpecification(String name, VersionRange range, boolean export, boolean optional) {
+		fName = name;
+		fRange = range;
+		fExport = export;
+		fOptional = optional;
+	}
+
+	public String getName() {
+		return fName;
+	}
+
+	public VersionRange getVersionRange() {
+		return fRange;
+	}
+
+	public boolean isExported() {
+		return fExport;
+	}
+
+	public boolean equals(Object obj) {
+		if (obj instanceof RequirementSpecification) {
+			RequirementSpecification spec = (RequirementSpecification) obj;
+			return getName().equals(spec.getName()) && isExported() == spec.isExported() && isOptional() == spec.isOptional() && equalOrNull(getVersionRange(), spec.getVersionRange());
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		int code = getClass().hashCode() + fName.hashCode();
+		if (fRange != null) {
+			code += fRange.hashCode();
+		}
+		if (fExport) {
+			code++;
+		}
+		if (fOptional) {
+			code = code + 2;
+		}
+		return code;
+	}
+
+	private boolean equalOrNull(Object o1, Object o2) {
+		if (o1 == null) {
+			return o2 == null;
+		}
+		if (o2 == null) {
+			return o1 == null;
+		}
+		return o1.equals(o2);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.core.project.IRequirementSpecification#isOptional()
+	 */
+	public boolean isOptional() {
+		return fOptional;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append(fName);
+		buf.append(' ');
+		if (fRange != null) {
+			buf.append(fRange);
+		}
+		if (fOptional) {
+			buf.append(" optional"); //$NON-NLS-1$
+		}
+		if (fExport) {
+			buf.append(" re-export"); //$NON-NLS-1$
+		}
+		return buf.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/Schema.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/Schema.java
index c02c9d2..fcf7df7 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/Schema.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/Schema.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -9,1043 +9,1049 @@
  *     IBM Corporation - initial API and implementation
  *     David Carver - STAR - bug 213255
  *******************************************************************************/
-package org.eclipse.pde.internal.core.schema;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.pde.core.*;
-import org.eclipse.pde.core.plugin.IPluginBase;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.ischema.*;
-import org.eclipse.pde.internal.core.util.*;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-public class Schema extends PlatformObject implements ISchema {
-
-	private URL fURL;
-
-	private ListenerList fListeners = new ListenerList();
-
-	private Vector fElements = new Vector();
-
-	private Vector fDocSections = new Vector();
-
-	private Vector fIncludes;
-
-	private String fPointID;
-
-	private String fPluginID;
-
-	private ISchemaDescriptor fSchemaDescriptor;
-
-	private boolean fLoaded;
-
-	private Vector fReferences;
-
-	private String fDescription;
-
-	private double fTargetVersion;
-
-	private String fName = ""; //$NON-NLS-1$
-
-	private boolean fNotificationEnabled;
-
-	public final static String INDENT = "   "; //$NON-NLS-1$
-
-	private boolean fDisposed;
-
-	private boolean fValid;
-
-	private boolean fAbbreviated;
-
-	public Schema(String pluginId, String pointId, String name, boolean abbreviated) {
-		fPluginID = pluginId;
-		fPointID = pointId;
-		fName = name;
-		fAbbreviated = abbreviated;
-	}
-
-	public Schema(ISchemaDescriptor schemaDescriptor, URL url, boolean abbreviated) {
-		fSchemaDescriptor = schemaDescriptor;
-		fURL = url;
-		fAbbreviated = abbreviated;
-	}
-
-	public void addDocumentSection(IDocumentSection docSection) {
-		fDocSections.addElement(docSection);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {docSection}, null));
-
-	}
-
-	public void addElement(ISchemaElement element) {
-		addElement(element, null);
-	}
-
-	public void addElement(ISchemaElement element, ISchemaElement afterElement) {
-		int index = -1;
-		if (afterElement != null) {
-			index = fElements.indexOf(afterElement);
-		}
-		if (index != -1)
-			fElements.add(index + 1, element);
-		else
-			fElements.add(element);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {element}, null));
-	}
-
-	public void addInclude(ISchemaInclude include) {
-		if (fIncludes == null)
-			fIncludes = new Vector();
-		fIncludes.add(include);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {include}, null));
-	}
-
-	public void removeInclude(ISchemaInclude include) {
-		if (fIncludes == null)
-			return;
-		fIncludes.remove(include);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {include}, null));
-	}
-
-	public void addModelChangedListener(IModelChangedListener listener) {
-		fListeners.add(listener);
-	}
-
-	private void collectElements(ISchemaCompositor compositor, Vector result) {
-		Object[] children = compositor.getChildren();
-		for (int i = 0; i < children.length; i++) {
-			Object child = children[i];
-			if (child instanceof ISchemaCompositor)
-				collectElements((ISchemaCompositor) child, result);
-			else if (child instanceof ISchemaObjectReference) {
-				ISchemaObjectReference ref = (ISchemaObjectReference) child;
-				Object referenced = ref.getReferencedObject();
-				if (referenced instanceof ISchemaElement)
-					result.addElement(referenced);
-			}
-		}
-	}
-
-	public void dispose() {
-		if (fIncludes != null) {
-			for (int i = 0; i < fIncludes.size(); i++) {
-				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
-				include.dispose();
-			}
-		}
-		reset();
-		fDisposed = true;
-	}
-
-	public ISchemaElement findElement(String name) {
-		if (!isLoaded())
-			load();
-		for (int i = 0; i < fElements.size(); i++) {
-			ISchemaElement element = (ISchemaElement) fElements.elementAt(i);
-			if (element.getName().equals(name))
-				return element;
-		}
-		if (fIncludes != null) {
-			for (int i = 0; i < fIncludes.size(); i++) {
-				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
-				ISchema ischema = include.getIncludedSchema();
-				if (ischema == null)
-					continue;
-				ISchemaElement element = ischema.findElement(name);
-				if (element != null)
-					return element;
-			}
-		}
-		return null;
-	}
-
-	public void fireModelChanged(IModelChangedEvent event) {
-		if (!fNotificationEnabled)
-			return;
-		Object[] listeners = fListeners.getListeners();
-		for (int i = 0; i < listeners.length; i++) {
-			((IModelChangedListener) listeners[i]).modelChanged(event);
-		}
-	}
-
-	public void fireModelObjectChanged(Object object, String property, Object oldValue, Object newValue) {
-		fireModelChanged(new ModelChangedEvent(this, object, property, oldValue, newValue));
-	}
-
-	private String getAttribute(Node node, String name) {
-		NamedNodeMap map = node.getAttributes();
-		Node attNode = map.getNamedItem(name);
-		if (attNode != null) {
-			String value = attNode.getNodeValue();
-			if (value.length() > 0)
-				return value;
-		}
-		return null;
-	}
-
-	public ISchemaElement[] getCandidateChildren(ISchemaElement element) {
-		Vector candidates = new Vector();
-		ISchemaType type = element.getType();
-		if (type instanceof ISchemaComplexType) {
-			ISchemaCompositor compositor = ((ISchemaComplexType) type).getCompositor();
-			if (compositor != null)
-				collectElements(compositor, candidates);
-		}
-		ISchemaElement[] result = new ISchemaElement[candidates.size()];
-		candidates.copyInto(result);
-		return result;
-	}
-
-	public String getDescription() {
-		return fDescription;
-	}
-
-	public boolean isValid() {
-		return fValid;
-	}
-
-	public IDocumentSection[] getDocumentSections() {
-		IDocumentSection[] result = new IDocumentSection[fDocSections.size()];
-		fDocSections.copyInto(result);
-		return result;
-	}
-
-	public int getElementCount() {
-		return fElements.size();
-	}
-
-	public int getResolvedElementCount() {
-		int localCount = getElementCount();
-		if (fIncludes == null)
-			return localCount;
-		int totalCount = localCount;
-		for (int i = 0; i < fIncludes.size(); i++) {
-			ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
-			ISchema schema = include.getIncludedSchema();
-			if (schema == null)
-				continue;
-			totalCount += schema.getResolvedElementCount();
-		}
-		return totalCount;
-	}
-
-	public ISchemaElement[] getElements() {
-		if (!isLoaded())
-			load();
-		ISchemaElement[] result = new ISchemaElement[fElements.size()];
-		fElements.copyInto(result);
-		return result;
-	}
-
-	public String[] getElementNames() {
-		ISchemaElement[] elements = getElements();
-		String[] names = new String[elements.length];
-		for (int i = 0; i < elements.length; i++)
-			names[i] = elements[i].getName();
-		return names;
-	}
-
-	public ISchemaElement[] getResolvedElements() {
-		if (fIncludes == null)
-			return getElements();
-		if (!isLoaded())
-			load();
-		Vector result = (Vector) fElements.clone();
-		for (int i = 0; i < fIncludes.size(); i++) {
-			ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
-			ISchema schema = include.getIncludedSchema();
-			if (schema == null)
-				continue;
-			ISchemaElement[] ielements = schema.getElements();
-			for (int j = 0; j < ielements.length; j++)
-				result.add(ielements[j]);
-		}
-		return (ISchemaElement[]) result.toArray(new ISchemaElement[result.size()]);
-	}
-
-	public ISchemaInclude[] getIncludes() {
-		if (fIncludes == null)
-			return new ISchemaInclude[0];
-		return (ISchemaInclude[]) fIncludes.toArray(new ISchemaInclude[fIncludes.size()]);
-	}
-
-	public String getName() {
-		return fName;
-	}
-
-	private String getNormalizedText(String source) {
-		if (source == null)
-			return ""; //$NON-NLS-1$
-
-		String result = source.replace('\t', ' ');
-		result = result.trim();
-		return result;
-	}
-
-	public ISchemaObject getParent() {
-		return null;
-	}
-
-	public void setParent(ISchemaObject obj) {
-	}
-
-	public ISchemaElement getElementAt(int index) {
-		return (ISchemaElement) fElements.get(index);
-	}
-
-	public String getQualifiedPointId() {
-		return fPluginID + "." + fPointID; //$NON-NLS-1$
-	}
-
-	public String getPluginId() {
-		return fPluginID;
-	}
-
-	public String getPointId() {
-		return fPointID;
-	}
-
-	public ISchema getSchema() {
-		return this;
-	}
-
-	public ISchemaDescriptor getSchemaDescriptor() {
-		return fSchemaDescriptor;
-	}
-
-	public URL getURL() {
-		return fURL;
-	}
-
-	public int indexOf(Object obj) {
-		return fElements.indexOf(obj);
-	}
-
-	public boolean isDisposed() {
-		return fDisposed;
-	}
-
-	public boolean isEditable() {
-		return false;
-	}
-
-	public boolean isLoaded() {
-		return fLoaded;
-	}
-
-	public boolean isNotificationEnabled() {
-		return fNotificationEnabled;
-	}
-
-	public void load() {
-		InputStream input = null;
-		try {
-			input = SchemaUtil.getInputStream(fURL);
-			load(input);
-		} catch (FileNotFoundException e) {
-			fLoaded = false;
-		} catch (IOException e) {
-			PDECore.logException(e);
-		} finally {
-			try {
-				if (input != null)
-					input.close();
-			} catch (IOException e1) {
-			}
-		}
-	}
-
-	public void load(InputStream stream) {
-		try {
-			SAXParserWrapper parser = new SAXParserWrapper();
-			XMLDefaultHandler handler = new XMLDefaultHandler(fAbbreviated);
-			parser.parse(stream, handler);
-			traverseDocumentTree(handler.getDocumentElement());
-		} catch (SAXException e) {
-			// ignore parse errors - 'loaded' will be false anyway
-		} catch (IOException e) {
-			PDECore.logException(e, "IOException reading following URL: " + fURL); //$NON-NLS-1$
-		} catch (Exception e) {
-			PDECore.logException(e);
-		}
-	}
-
-	private ISchemaAttribute processAttribute(ISchemaElement element, Node elementNode) {
-		String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$
-		if (aname == null)
-			return null;
-		String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$
-		String ause = getAttribute(elementNode, "use"); //$NON-NLS-1$
-		String avalue = getAttribute(elementNode, "value"); //$NON-NLS-1$
-		ISchemaSimpleType type = null;
-		if (atype != null) {
-			type = (ISchemaSimpleType) resolveTypeReference(atype);
-		}
-		SchemaAttribute attribute = new SchemaAttribute(element, aname);
-		//attribute.bindSourceLocation(elementNode, lineTable);
-		if (ause != null) {
-			int use = ISchemaAttribute.OPTIONAL;
-			if (ause.equals("required")) //$NON-NLS-1$
-				use = ISchemaAttribute.REQUIRED;
-			else if (ause.equals("optional")) //$NON-NLS-1$
-				use = ISchemaAttribute.OPTIONAL;
-			else if (ause.equals("default")) //$NON-NLS-1$
-				use = ISchemaAttribute.DEFAULT;
-			attribute.setUse(use);
-		}
-		if (avalue != null)
-			attribute.setValue(avalue);
-		NodeList children = elementNode.getChildNodes();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				String tag = child.getNodeName();
-				if (tag.equals("annotation")) { //$NON-NLS-1$
-					processAttributeAnnotation(attribute, child);
-				} else if (tag.equals("simpleType")) { //$NON-NLS-1$
-					processAttributeSimpleType(attribute, child);
-				}
-			}
-		}
-		if (type != null && attribute.getType() == null)
-			attribute.setType(type);
-		return attribute;
-	}
-
-	private void processAttributeAnnotation(SchemaAttribute element, Node node) {
-		NodeList children = node.getChildNodes();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("documentation")) { //$NON-NLS-1$
-					Node doc = child.getFirstChild();
-					if (doc != null)
-						element.setDescription(getNormalizedText(doc.getNodeValue()));
-				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
-					NodeList infos = child.getChildNodes();
-					for (int j = 0; j < infos.getLength(); j++) {
-						Node meta = infos.item(j);
-						if (meta.getNodeType() == Node.ELEMENT_NODE) {
-							if (meta.getNodeName().equals("meta.attribute")) { //$NON-NLS-1$
-								element.setKind(processKind(getAttribute(meta, "kind"))); //$NON-NLS-1$
-								element.setBasedOn(getAttribute(meta, "basedOn")); //$NON-NLS-1$
-								element.setTranslatableProperty(processTranslatable(getAttribute(meta, "translatable"))); //$NON-NLS-1$
-								element.setDeprecatedProperty(processDeprecated(getAttribute(meta, "deprecated"))); //$NON-NLS-1$
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	private boolean processTranslatable(String value) {
-		return (value != null && "true".equals(value)); //$NON-NLS-1$
-	}
-
-	private boolean processDeprecated(String value) {
-		return value != null && "true".equals(value); //$NON-NLS-1$
-	}
-
-	private SchemaSimpleType processAttributeRestriction(SchemaAttribute attribute, Node node) {
-		NodeList children = node.getChildNodes();
-		if (children.getLength() == 0)
-			return null;
-		String baseName = getAttribute(node, "base"); //$NON-NLS-1$
-		if (baseName.equals("string") == false) { //$NON-NLS-1$
-			return new SchemaSimpleType(attribute.getSchema(), "string"); //$NON-NLS-1$
-		}
-		SchemaSimpleType type = new SchemaSimpleType(attribute.getSchema(), baseName);
-		Vector items = new Vector();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("enumeration")) { //$NON-NLS-1$
-					ISchemaEnumeration enumeration = processEnumeration(attribute.getSchema(), child);
-					if (enumeration != null)
-						items.addElement(enumeration);
-				}
-			}
-		}
-		ChoiceRestriction restriction = new ChoiceRestriction(attribute.getSchema());
-		restriction.setChildren(items);
-		type.setRestriction(restriction);
-		return type;
-	}
-
-	private void processAttributeSimpleType(SchemaAttribute attribute, Node node) {
-		NodeList children = node.getChildNodes();
-		if (children.getLength() == 0)
-			return;
-		SchemaSimpleType type = null;
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("restriction")) { //$NON-NLS-1$
-					type = processAttributeRestriction(attribute, child);
-				}
-			}
-		}
-		if (type != null)
-			attribute.setType(type);
-	}
-
-	private SchemaComplexType processComplexType(ISchemaElement owner, Node typeNode) {
-		String aname = getAttribute(typeNode, "name"); //$NON-NLS-1$
-		String amixed = getAttribute(typeNode, "mixed"); //$NON-NLS-1$
-		SchemaComplexType complexType = new SchemaComplexType(this, aname);
-		if (amixed != null && amixed.equals("true")) //$NON-NLS-1$
-			complexType.setMixed(true);
-		NodeList children = typeNode.getChildNodes();
-		ISchemaCompositor compositor = null;
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("attribute")) { //$NON-NLS-1$
-					complexType.addAttribute(processAttribute(owner, child));
-				} else {
-					ISchemaObject object = processCompositorChild(owner, child, ISchemaCompositor.ROOT);
-					if (object instanceof ISchemaCompositor && compositor == null) {
-						compositor = (ISchemaCompositor) object;
-					}
-				}
-			}
-		}
-		complexType.setCompositor(compositor);
-		return complexType;
-	}
-
-	private ISchemaCompositor processCompositor(ISchemaObject parent, Node node, int type) {
-		SchemaCompositor compositor = new SchemaCompositor(parent, type);
-		NodeList children = node.getChildNodes();
-		int minOccurs = 1;
-		int maxOccurs = 1;
-		String aminOccurs = getAttribute(node, "minOccurs"); //$NON-NLS-1$
-		String amaxOccurs = getAttribute(node, "maxOccurs"); //$NON-NLS-1$
-		if (aminOccurs != null)
-			minOccurs = Integer.valueOf(aminOccurs).intValue();
-		if (amaxOccurs != null) {
-			if (amaxOccurs.equals("unbounded")) //$NON-NLS-1$
-				maxOccurs = Integer.MAX_VALUE;
-			else {
-				maxOccurs = Integer.valueOf(amaxOccurs).intValue();
-			}
-		}
-		compositor.setMinOccurs(minOccurs);
-		compositor.setMaxOccurs(maxOccurs);
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			ISchemaObject object = processCompositorChild(compositor, child, type);
-			if (object != null)
-				compositor.addChild(object);
-		}
-		return compositor;
-	}
-
-	private ISchemaObject processCompositorChild(ISchemaObject parent, Node child, int parentKind) {
-		String tag = child.getNodeName();
-		if (tag.equals("element") && parentKind != ISchemaCompositor.ROOT) { //$NON-NLS-1$
-			return processElement(parent, child);
-		}
-		// sequence: element | group | choice | sequence
-		if (tag.equals("sequence") && parentKind != ISchemaCompositor.ALL) { //$NON-NLS-1$
-			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
-		}
-		// choice: element | group | choice | sequence
-		if (tag.equals("choice") && parentKind != ISchemaCompositor.ALL) { //$NON-NLS-1$
-			return processCompositor(parent, child, ISchemaCompositor.CHOICE);
-		}
-		// all: element
-		if (tag.equals("all") //$NON-NLS-1$
-				&& (parentKind == ISchemaCompositor.ROOT || parentKind == ISchemaCompositor.GROUP)) {
-			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
-		}
-		// group: all | choice | sequence
-		if (tag.equals("group") //$NON-NLS-1$
-				&& (parentKind == ISchemaCompositor.CHOICE || parentKind == ISchemaCompositor.SEQUENCE)) {
-			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
-		}
-		return null;
-	}
-
-	private ISchemaElement processElement(ISchemaObject parent, Node elementNode) {
-		if (parent instanceof ISchemaCompositor)
-			return processElementReference((ISchemaCompositor) parent, elementNode);
-		return processElementDeclaration(parent, elementNode);
-	}
-
-	private ISchemaElement processElementDeclaration(ISchemaObject parent, Node elementNode) {
-		String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$
-		if (aname == null)
-			return null;
-		String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$	
-		int minOccurs = getMinOccurs(elementNode);
-		int maxOccurs = getMaxOccurs(elementNode);
-
-		ISchemaType type = null;
-		if (atype != null) {
-			type = resolveTypeReference(atype);
-		}
-		SchemaElement element;
-		if (aname.equals("extension")) //$NON-NLS-1$
-			element = new SchemaRootElement(parent, aname);
-		else
-			element = new SchemaElement(parent, aname);
-		//element.bindSourceLocation(elementNode, lineTable);
-		element.setMinOccurs(minOccurs);
-		element.setMaxOccurs(maxOccurs);
-		NodeList children = elementNode.getChildNodes();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				String tag = child.getNodeName();
-				if (type == null && tag.equals("complexType")) { //$NON-NLS-1$
-					type = processComplexType(element, child);
-				}
-				if (tag.equals("annotation")) { //$NON-NLS-1$
-					processElementAnnotation(element, child);
-				}
-			}
-		}
-		element.setType(type);
-		return element;
-	}
-
-	private ISchemaElement processElementReference(ISchemaCompositor compositor, Node elementNode) {
-		String aref = getAttribute(elementNode, "ref"); //$NON-NLS-1$
-		if (aref == null) {
-			return null;
-		}
-		int minOccurs = getMinOccurs(elementNode);
-		int maxOccurs = getMaxOccurs(elementNode);
-
-		SchemaElementReference reference = new SchemaElementReference(compositor, aref);
-		reference.addComments(elementNode);
-		reference.setMinOccurs(minOccurs);
-		reference.setMaxOccurs(maxOccurs);
-		fReferences.addElement(reference);
-		//reference.bindSourceLocation(elementNode, lineTable);
-		return reference;
-	}
-
-	private int getMinOccurs(Node elementNode) {
-		String aminOccurs = getAttribute(elementNode, "minOccurs"); //$NON-NLS-1$
-		if (aminOccurs != null)
-			return Integer.valueOf(aminOccurs).intValue();
-		return 1;
-
-	}
-
-	private int getMaxOccurs(Node elementNode) {
-		String amaxOccurs = getAttribute(elementNode, "maxOccurs"); //$NON-NLS-1$
-		if (amaxOccurs != null) {
-			if (amaxOccurs.equals("unbounded")) //$NON-NLS-1$
-				return Integer.MAX_VALUE;
-			return Integer.valueOf(amaxOccurs).intValue();
-		}
-		return 1;
-	}
-
-	private void processElementAnnotation(SchemaElement element, Node node) {
-		NodeList children = node.getChildNodes();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("documentation") && !fAbbreviated) { //$NON-NLS-1$
-					element.setDescription(getNormalizedText(child.getFirstChild().getNodeValue()));
-				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
-					NodeList infos = child.getChildNodes();
-					for (int j = 0; j < infos.getLength(); j++) {
-						Node meta = infos.item(j);
-						if (meta.getNodeType() == Node.ELEMENT_NODE) {
-							if (meta.getNodeName().equals("meta.element")) { //$NON-NLS-1$
-								element.setLabelProperty(getAttribute(meta, "labelAttribute")); //$NON-NLS-1$
-								element.setIconProperty(getAttribute(meta, "icon")); //$NON-NLS-1$
-								if (element.getIconProperty() == null)
-									element.setIconProperty(getAttribute(meta, "iconName")); //$NON-NLS-1$
-								element.setTranslatableProperty(processTranslatable(getAttribute(meta, "translatable"))); //$NON-NLS-1$
-								element.setDeprecatedProperty(processDeprecated(getAttribute(meta, "deprecated"))); //$NON-NLS-1$
-								if (element instanceof ISchemaRootElement) {
-									// set deprecated suggestion
-									String depSug = getAttribute(meta, ISchemaRootElement.P_DEP_REPLACEMENT);
-									((ISchemaRootElement) element).setDeprecatedSuggestion(depSug);
-
-									// set internal
-									String internal = getAttribute(meta, ISchemaRootElement.P_INTERNAL);
-									((ISchemaRootElement) element).setInternal(Boolean.valueOf(internal).booleanValue());
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	private ISchemaEnumeration processEnumeration(ISchema schema, Node node) {
-		String name = getAttribute(node, "value"); //$NON-NLS-1$
-		return new SchemaEnumeration(schema, name);
-	}
-
-	private int processKind(String name) {
-		if (name != null) {
-			if (name.equals("java")) //$NON-NLS-1$
-				return IMetaAttribute.JAVA;
-			if (name.equals("resource")) //$NON-NLS-1$
-				return IMetaAttribute.RESOURCE;
-			if (name.equals("identifier")) //$NON-NLS-1$
-				return IMetaAttribute.IDENTIFIER;
-		}
-		return IMetaAttribute.STRING;
-	}
-
-	private void processSchemaAnnotation(Node node) {
-		NodeList children = node.getChildNodes();
-		String section = "overview"; //$NON-NLS-1$
-		String sectionName = "Overview"; //$NON-NLS-1$
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				if (child.getNodeName().equals("documentation") && !fAbbreviated) { //$NON-NLS-1$
-					String text = getNormalizedText(child.getFirstChild().getNodeValue());
-					if (section != null) {
-						if (section.equals("overview")) { //$NON-NLS-1$
-							setDescription(text);
-						} else {
-							DocumentSection sec = new DocumentSection(this, section, sectionName);
-							sec.setDescription(text);
-							fDocSections.addElement(sec);
-						}
-					}
-				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
-					NodeList infos = child.getChildNodes();
-					for (int j = 0; j < infos.getLength(); j++) {
-						Node meta = infos.item(j);
-						if (meta.getNodeType() == Node.ELEMENT_NODE) {
-							if (meta.getNodeName().equals("meta.schema")) { //$NON-NLS-1$
-								section = "overview"; //$NON-NLS-1$
-								setName(getAttribute(meta, "name")); //$NON-NLS-1$
-								fPluginID = getAttribute(meta, "plugin"); //$NON-NLS-1$
-								fPointID = getAttribute(meta, "id"); //$NON-NLS-1$
-								fValid = true;
-							} else if (meta.getNodeName().equals("meta.section")) { //$NON-NLS-1$
-								section = getAttribute(meta, "type"); //$NON-NLS-1$
-								sectionName = getAttribute(meta, "name"); //$NON-NLS-1$
-								if (sectionName == null)
-									sectionName = section;
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	private void processInclude(Node node) {
-		String location = getAttribute(node, "schemaLocation"); //$NON-NLS-1$
-		SchemaInclude include = new SchemaInclude(this, location, fAbbreviated);
-		if (fIncludes == null)
-			fIncludes = new Vector();
-		fIncludes.add(include);
-	}
-
-	public void reload() {
-		reload(null);
-	}
-
-	public void reload(InputStream is) {
-		setNotificationEnabled(false);
-		reset();
-		if (is != null)
-			load(is);
-		else
-			load();
-		setNotificationEnabled(true);
-		if (isLoaded())
-			fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.WORLD_CHANGED, new Object[0], null));
-	}
-
-	public void removeDocumentSection(IDocumentSection docSection) {
-		fDocSections.removeElement(docSection);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {docSection}, null));
-	}
-
-	public void moveElementToSibling(ISchemaElement element, ISchemaObject sibling) {
-		if (!isLoaded())
-			load();
-		int index = fElements.indexOf(element);
-		int newIndex;
-		if (sibling != null && fElements.contains(sibling))
-			newIndex = fElements.indexOf(sibling);
-		else
-			newIndex = fElements.size() - 1;
-
-		if (index > newIndex) {
-			for (int i = index; i > newIndex; i--) {
-				fElements.set(i, fElements.elementAt(i - 1));
-			}
-		} else if (index < newIndex) {
-			for (int i = index; i < newIndex; i++) {
-				fElements.set(i, fElements.elementAt(i + 1));
-			}
-		} else
-			// don't need to move
-			return;
-		fElements.set(newIndex, element);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.CHANGE, new Object[] {this}, null));
-	}
-
-	public void removeElement(ISchemaElement element) {
-		fElements.removeElement(element);
-		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {element}, null));
-	}
-
-	public void removeModelChangedListener(IModelChangedListener listener) {
-		fListeners.remove(listener);
-	}
-
-	private void reset() {
-		fElements = new Vector();
-		fDocSections = new Vector();
-		fIncludes = null;
-		fPointID = null;
-		fPluginID = null;
-		fReferences = null;
-		fDescription = null;
-		fName = null;
-		fValid = false;
-		fLoaded = false;
-	}
-
-	private void resolveElementReference(ISchemaObjectReference reference) {
-		ISchemaElement[] elementList = getResolvedElements();
-		for (int i = 0; i < elementList.length; i++) {
-			ISchemaElement element = elementList[i];
-			if (!(element instanceof ISchemaObjectReference) && element.getName().equals(reference.getName())) {
-				// Link
-				reference.setReferencedObject(element);
-				break;
-			}
-		}
-	}
-
-	private void resolveReference(ISchemaObjectReference reference) {
-		Class clazz = reference.getReferencedObjectClass();
-		if (clazz.equals(ISchemaElement.class)) {
-			resolveElementReference(reference);
-		}
-	}
-
-	private void resolveReferences(Vector references) {
-		for (int i = 0; i < references.size(); i++) {
-			ISchemaObjectReference reference = (ISchemaObjectReference) references.elementAt(i);
-			resolveReference(reference);
-		}
-	}
-
-	private SchemaType resolveTypeReference(String typeName) {
-		// for now, create a simple type
-		return new SchemaSimpleType(this, typeName);
-	}
-
-	public void setDescription(String newDescription) {
-		String oldValue = fDescription;
-		fDescription = newDescription;
-		fireModelObjectChanged(this, P_DESCRIPTION, oldValue, fDescription);
-	}
-
-	public void setName(String newName) {
-		if (newName == null)
-			newName = ""; //$NON-NLS-1$
-		String oldValue = fName;
-		fName = newName;
-		fireModelObjectChanged(this, P_NAME, oldValue, fName);
-	}
-
-	public void setPluginId(String newId) {
-		String oldValue = fPluginID;
-		fPluginID = newId;
-		fireModelObjectChanged(this, P_PLUGIN, oldValue, newId);
-	}
-
-	public void setPointId(String newId) {
-		String oldValue = fPointID;
-		fPointID = newId;
-		fireModelObjectChanged(this, P_POINT, oldValue, newId);
-	}
-
-	public void setNotificationEnabled(boolean newNotificationEnabled) {
-		fNotificationEnabled = newNotificationEnabled;
-	}
-
-	public String toString() {
-		return fName;
-	}
-
-	public void traverseDocumentTree(Node root) {
-		if (root == null)
-			return;
-		NodeList children = root.getChildNodes();
-		fReferences = new Vector();
-		for (int i = 0; i < children.getLength(); i++) {
-			Node child = children.item(i);
-			if (child.getNodeType() == Node.ELEMENT_NODE) {
-				String nodeName = child.getNodeName().toLowerCase(Locale.ENGLISH);
-				if (nodeName.equals("element")) { //$NON-NLS-1$
-					ISchemaElement element = processElement(this, child);
-					if (element == null) {
-						fValid = false;
-						return;
-					}
-					ISchemaAttribute[] attributes = element.getAttributes();
-					for (int j = 0; j < attributes.length; j++)
-						if (attributes[j] == null) {
-							fValid = false;
-							return;
-						}
-					fElements.addElement(element);
-				} else if (nodeName.equals("annotation")) { //$NON-NLS-1$
-					processSchemaAnnotation(child);
-				} else if (nodeName.equals("include")) { //$NON-NLS-1$
-					processInclude(child);
-				}
-			}
-		}
-		addOmittedDocumentSections();
-		fLoaded = true;
-		if (fReferences.size() > 0)
-			resolveReferences(fReferences);
-		fReferences = null;
-	}
-
-	private void addOmittedDocumentSections() {
-		for (int i = 0; i < DocumentSection.DOC_SECTIONS.length; i++) {
-			DocumentSection section = new DocumentSection(this, DocumentSection.DOC_SECTIONS[i], null);
-			if (!fDocSections.contains(section)) {
-				addDocumentSection(section);
-			}
-		}
-		Collections.sort(fDocSections);
-	}
-
-	public void updateReferencesFor(ISchemaElement element) {
-		updateReferencesFor(element, ISchema.REFRESH_RENAME);
-	}
-
-	public void updateReferencesFor(ISchemaElement element, int kind) {
-		for (int i = 0; i < fElements.size(); i++) {
-			ISchemaElement el = (ISchemaElement) fElements.elementAt(i);
-			if (el.equals(element))
-				continue;
-			ISchemaType type = el.getType();
-			if (type instanceof ISchemaComplexType) {
-				SchemaCompositor compositor = (SchemaCompositor) ((ISchemaComplexType) type).getCompositor();
-				if (compositor != null)
-					compositor.updateReferencesFor(element, kind);
-			}
-		}
-	}
-
-	public void write(String indent, PrintWriter writer) {
-		writer.println("<?xml version='1.0' encoding='UTF-8'?>"); //$NON-NLS-1$
-		writer.println("<!-- Schema file written by PDE -->"); //$NON-NLS-1$
-		writer.println("<schema targetNamespace=\"" + fPluginID + "\" xmlns=\"http://www.w3.org/2001/XMLSchema\">"); //$NON-NLS-1$ //$NON-NLS-2$
-		String indent2 = INDENT + INDENT;
-		String indent3 = indent2 + INDENT;
-		writer.println(indent + "<annotation>"); //$NON-NLS-1$
-
-		writer.println(indent2 + (getSchemaVersion() >= 3.4 ? "<appinfo>" : "<appInfo>")); //$NON-NLS-1$ //$NON-NLS-2$
-		writer.print(indent3 + "<meta.schema plugin=\"" + fPluginID + "\""); //$NON-NLS-1$ //$NON-NLS-2$
-		writer.print(" id=\"" + fPointID + "\""); //$NON-NLS-1$ //$NON-NLS-2$
-		writer.println(" name=\"" + getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
-		writer.println(indent2 + (getSchemaVersion() >= 3.4 ? "</appinfo>" : "</appInfo>")); //$NON-NLS-1$ //$NON-NLS-2$
-		writer.println(indent2 + "<documentation>"); //$NON-NLS-1$
-		writer.println(indent3 + getWritableDescription());
-		writer.println(indent2 + "</documentation>"); //$NON-NLS-1$
-		writer.println(INDENT + "</annotation>"); //$NON-NLS-1$
-		writer.println();
-		// add includes, if defined
-		if (fIncludes != null) {
-			for (int i = 0; i < fIncludes.size(); i++) {
-				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
-				include.write(INDENT, writer);
-				writer.println();
-			}
-		}
-		// add elements
-		for (int i = 0; i < fElements.size(); i++) {
-			ISchemaElement element = (ISchemaElement) fElements.elementAt(i);
-			element.write(INDENT, writer);
-			writer.println();
-		}
-		// add document sections
-		for (int i = 0; i < fDocSections.size(); i++) {
-			IDocumentSection section = (IDocumentSection) fDocSections.elementAt(i);
-			section.write(INDENT, writer);
-			writer.println();
-		}
-		writer.println("</schema>"); //$NON-NLS-1$
-	}
-
-	private String getWritableDescription() {
-		String lineDelimiter = System.getProperty("line.separator"); //$NON-NLS-1$
-		String description = PDEXMLHelper.getWritableString(getDescription());
-		String platformDescription = description.replaceAll("\\r\\n|\\r|\\n", lineDelimiter); //$NON-NLS-1$
-
-		return platformDescription;
-	}
-
-	public boolean isDeperecated() {
-		Iterator it = fElements.iterator();
-		while (it.hasNext()) {
-			Object next = it.next();
-			if (next instanceof SchemaRootElement)
-				return ((SchemaRootElement) next).isDeprecated();
-		}
-		return false;
-	}
-
-	public String getDeprecatedSuggestion() {
-		Iterator it = fElements.iterator();
-		while (it.hasNext()) {
-			Object next = it.next();
-			if (next instanceof SchemaRootElement)
-				return ((SchemaRootElement) next).getDeprecatedSuggestion();
-		}
-		return null;
-	}
-
-	public boolean isInternal() {
-		Iterator it = fElements.iterator();
-		while (it.hasNext()) {
-			Object next = it.next();
-			if (next instanceof SchemaRootElement)
-				return ((SchemaRootElement) next).isInternal();
-		}
-		return false;
-	}
-
-	public double getSchemaVersion() {
-		if (fTargetVersion == 0) {
-			IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(fPluginID);
-			if (model != null) {
-				IPluginBase base = model.getPluginBase();
-				if (base != null) {
-					if (base.getSchemaVersion() != null) {
-						fTargetVersion = Double.parseDouble(base.getSchemaVersion());
-					}
-				}
-			}
-			if (fTargetVersion == 0) {
-				// Use default for target platform
-				fTargetVersion = Double.parseDouble(TargetPlatformHelper.getSchemaVersion());
-			}
-		}
-		return fTargetVersion;
-	}
-}
+package org.eclipse.pde.internal.core.schema;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.pde.core.*;
+import org.eclipse.pde.core.plugin.IPluginBase;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ischema.*;
+import org.eclipse.pde.internal.core.util.*;
+import org.w3c.dom.*;
+import org.xml.sax.SAXException;
+
+public class Schema extends PlatformObject implements ISchema {
+
+	private URL fURL;
+
+	private ListenerList fListeners = new ListenerList();
+
+	private Vector fElements = new Vector();
+
+	private Vector fDocSections = new Vector();
+
+	private Vector fIncludes;
+
+	private String fPointID;
+
+	private String fPluginID;
+
+	private ISchemaDescriptor fSchemaDescriptor;
+
+	private boolean fLoaded;
+
+	private Vector fReferences;
+
+	private String fDescription;
+
+	private double fTargetVersion;
+
+	private String fName = ""; //$NON-NLS-1$
+
+	private boolean fNotificationEnabled;
+
+	public final static String INDENT = "   "; //$NON-NLS-1$
+
+	private boolean fDisposed;
+
+	private boolean fValid;
+
+	private boolean fAbbreviated;
+
+	public Schema(String pluginId, String pointId, String name, boolean abbreviated) {
+		fPluginID = pluginId;
+		fPointID = pointId;
+		fName = name;
+		fAbbreviated = abbreviated;
+	}
+
+	public Schema(ISchemaDescriptor schemaDescriptor, URL url, boolean abbreviated) {
+		fSchemaDescriptor = schemaDescriptor;
+		fURL = url;
+		fAbbreviated = abbreviated;
+	}
+
+	public void addDocumentSection(IDocumentSection docSection) {
+		fDocSections.addElement(docSection);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {docSection}, null));
+
+	}
+
+	public void addElement(ISchemaElement element) {
+		addElement(element, null);
+	}
+
+	public void addElement(ISchemaElement element, ISchemaElement afterElement) {
+		int index = -1;
+		if (afterElement != null) {
+			index = fElements.indexOf(afterElement);
+		}
+		if (index != -1)
+			fElements.add(index + 1, element);
+		else
+			fElements.add(element);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {element}, null));
+	}
+
+	public void addInclude(ISchemaInclude include) {
+		if (fIncludes == null)
+			fIncludes = new Vector();
+		fIncludes.add(include);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.INSERT, new Object[] {include}, null));
+	}
+
+	public void removeInclude(ISchemaInclude include) {
+		if (fIncludes == null)
+			return;
+		fIncludes.remove(include);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {include}, null));
+	}
+
+	public void addModelChangedListener(IModelChangedListener listener) {
+		fListeners.add(listener);
+	}
+
+	private void collectElements(ISchemaCompositor compositor, Vector result) {
+		Object[] children = compositor.getChildren();
+		for (int i = 0; i < children.length; i++) {
+			Object child = children[i];
+			if (child instanceof ISchemaCompositor)
+				collectElements((ISchemaCompositor) child, result);
+			else if (child instanceof ISchemaObjectReference) {
+				ISchemaObjectReference ref = (ISchemaObjectReference) child;
+				Object referenced = ref.getReferencedObject();
+				if (referenced instanceof ISchemaElement)
+					result.addElement(referenced);
+			}
+		}
+	}
+
+	public void dispose() {
+		if (fIncludes != null) {
+			for (int i = 0; i < fIncludes.size(); i++) {
+				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
+				include.dispose();
+			}
+		}
+		reset();
+		fDisposed = true;
+	}
+
+	public ISchemaElement findElement(String name) {
+		if (!isLoaded())
+			load();
+		for (int i = 0; i < fElements.size(); i++) {
+			ISchemaElement element = (ISchemaElement) fElements.elementAt(i);
+			if (element.getName().equals(name))
+				return element;
+		}
+		if (fIncludes != null) {
+			for (int i = 0; i < fIncludes.size(); i++) {
+				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
+				ISchema ischema = include.getIncludedSchema();
+				if (ischema == null)
+					continue;
+				ISchemaElement element = ischema.findElement(name);
+				if (element != null)
+					return element;
+			}
+		}
+		return null;
+	}
+
+	public void fireModelChanged(IModelChangedEvent event) {
+		if (!fNotificationEnabled)
+			return;
+		Object[] listeners = fListeners.getListeners();
+		for (int i = 0; i < listeners.length; i++) {
+			((IModelChangedListener) listeners[i]).modelChanged(event);
+		}
+	}
+
+	public void fireModelObjectChanged(Object object, String property, Object oldValue, Object newValue) {
+		fireModelChanged(new ModelChangedEvent(this, object, property, oldValue, newValue));
+	}
+
+	private String getAttribute(Node node, String name) {
+		NamedNodeMap map = node.getAttributes();
+		Node attNode = map.getNamedItem(name);
+		if (attNode != null) {
+			String value = attNode.getNodeValue();
+			if (value.length() > 0)
+				return value;
+		}
+		return null;
+	}
+
+	public ISchemaElement[] getCandidateChildren(ISchemaElement element) {
+		Vector candidates = new Vector();
+		ISchemaType type = element.getType();
+		if (type instanceof ISchemaComplexType) {
+			ISchemaCompositor compositor = ((ISchemaComplexType) type).getCompositor();
+			if (compositor != null)
+				collectElements(compositor, candidates);
+		}
+		ISchemaElement[] result = new ISchemaElement[candidates.size()];
+		candidates.copyInto(result);
+		return result;
+	}
+
+	public String getDescription() {
+		return fDescription;
+	}
+
+	public boolean isValid() {
+		return fValid;
+	}
+
+	public IDocumentSection[] getDocumentSections() {
+		IDocumentSection[] result = new IDocumentSection[fDocSections.size()];
+		fDocSections.copyInto(result);
+		return result;
+	}
+
+	public int getElementCount() {
+		return fElements.size();
+	}
+
+	public int getResolvedElementCount() {
+		int localCount = getElementCount();
+		if (fIncludes == null)
+			return localCount;
+		int totalCount = localCount;
+		for (int i = 0; i < fIncludes.size(); i++) {
+			ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
+			ISchema schema = include.getIncludedSchema();
+			if (schema == null)
+				continue;
+			totalCount += schema.getResolvedElementCount();
+		}
+		return totalCount;
+	}
+
+	public ISchemaElement[] getElements() {
+		if (!isLoaded())
+			load();
+		ISchemaElement[] result = new ISchemaElement[fElements.size()];
+		fElements.copyInto(result);
+		return result;
+	}
+
+	public String[] getElementNames() {
+		ISchemaElement[] elements = getElements();
+		String[] names = new String[elements.length];
+		for (int i = 0; i < elements.length; i++)
+			names[i] = elements[i].getName();
+		return names;
+	}
+
+	public ISchemaElement[] getResolvedElements() {
+		if (fIncludes == null)
+			return getElements();
+		if (!isLoaded())
+			load();
+		Vector result = (Vector) fElements.clone();
+		for (int i = 0; i < fIncludes.size(); i++) {
+			ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
+			ISchema schema = include.getIncludedSchema();
+			if (schema == null)
+				continue;
+			ISchemaElement[] ielements = schema.getElements();
+			for (int j = 0; j < ielements.length; j++)
+				result.add(ielements[j]);
+		}
+		return (ISchemaElement[]) result.toArray(new ISchemaElement[result.size()]);
+	}
+
+	public ISchemaInclude[] getIncludes() {
+		if (fIncludes == null)
+			return new ISchemaInclude[0];
+		return (ISchemaInclude[]) fIncludes.toArray(new ISchemaInclude[fIncludes.size()]);
+	}
+
+	public String getName() {
+		return fName;
+	}
+
+	private String getNormalizedText(String source) {
+		if (source == null)
+			return ""; //$NON-NLS-1$
+
+		String result = source.replace('\t', ' ');
+		result = result.trim();
+		return result;
+	}
+
+	public ISchemaObject getParent() {
+		return null;
+	}
+
+	public void setParent(ISchemaObject obj) {
+	}
+
+	public ISchemaElement getElementAt(int index) {
+		return (ISchemaElement) fElements.get(index);
+	}
+
+	public String getQualifiedPointId() {
+		return fPluginID + "." + fPointID; //$NON-NLS-1$
+	}
+
+	public String getPluginId() {
+		return fPluginID;
+	}
+
+	public String getPointId() {
+		return fPointID;
+	}
+
+	public ISchema getSchema() {
+		return this;
+	}
+
+	public ISchemaDescriptor getSchemaDescriptor() {
+		return fSchemaDescriptor;
+	}
+
+	public URL getURL() {
+		return fURL;
+	}
+
+	public int indexOf(Object obj) {
+		return fElements.indexOf(obj);
+	}
+
+	public boolean isDisposed() {
+		return fDisposed;
+	}
+
+	public boolean isEditable() {
+		return false;
+	}
+
+	public boolean isLoaded() {
+		return fLoaded;
+	}
+
+	public boolean isNotificationEnabled() {
+		return fNotificationEnabled;
+	}
+
+	public void load() {
+		URLConnection connection = null;
+		InputStream input = null;
+		try {
+			connection = SchemaUtil.getURLConnection(fURL);
+			input = connection.getInputStream();
+			load(input);
+		} catch (FileNotFoundException e) {
+			fLoaded = false;
+		} catch (IOException e) {
+			PDECore.logException(e);
+		} finally {
+			try {
+				if (input != null) {
+					input.close();
+				}
+				if (connection instanceof JarURLConnection) {
+					((JarURLConnection) connection).getJarFile().close();
+				}
+			} catch (IOException e1) {
+			}
+		}
+	}
+
+	public void load(InputStream stream) {
+		try {
+			SAXParserWrapper parser = new SAXParserWrapper();
+			XMLDefaultHandler handler = new XMLDefaultHandler(fAbbreviated);
+			parser.parse(stream, handler);
+			traverseDocumentTree(handler.getDocumentElement());
+		} catch (SAXException e) {
+			// ignore parse errors - 'loaded' will be false anyway
+		} catch (IOException e) {
+			PDECore.logException(e, "IOException reading following URL: " + fURL); //$NON-NLS-1$
+		} catch (Exception e) {
+			PDECore.logException(e);
+		}
+	}
+
+	private ISchemaAttribute processAttribute(ISchemaElement element, Node elementNode) {
+		String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$
+		if (aname == null)
+			return null;
+		String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$
+		String ause = getAttribute(elementNode, "use"); //$NON-NLS-1$
+		String avalue = getAttribute(elementNode, "value"); //$NON-NLS-1$
+		ISchemaSimpleType type = null;
+		if (atype != null) {
+			type = (ISchemaSimpleType) resolveTypeReference(atype);
+		}
+		SchemaAttribute attribute = new SchemaAttribute(element, aname);
+		//attribute.bindSourceLocation(elementNode, lineTable);
+		if (ause != null) {
+			int use = ISchemaAttribute.OPTIONAL;
+			if (ause.equals("required")) //$NON-NLS-1$
+				use = ISchemaAttribute.REQUIRED;
+			else if (ause.equals("optional")) //$NON-NLS-1$
+				use = ISchemaAttribute.OPTIONAL;
+			else if (ause.equals("default")) //$NON-NLS-1$
+				use = ISchemaAttribute.DEFAULT;
+			attribute.setUse(use);
+		}
+		if (avalue != null)
+			attribute.setValue(avalue);
+		NodeList children = elementNode.getChildNodes();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				String tag = child.getNodeName();
+				if (tag.equals("annotation")) { //$NON-NLS-1$
+					processAttributeAnnotation(attribute, child);
+				} else if (tag.equals("simpleType")) { //$NON-NLS-1$
+					processAttributeSimpleType(attribute, child);
+				}
+			}
+		}
+		if (type != null && attribute.getType() == null)
+			attribute.setType(type);
+		return attribute;
+	}
+
+	private void processAttributeAnnotation(SchemaAttribute element, Node node) {
+		NodeList children = node.getChildNodes();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("documentation")) { //$NON-NLS-1$
+					Node doc = child.getFirstChild();
+					if (doc != null)
+						element.setDescription(getNormalizedText(doc.getNodeValue()));
+				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
+					NodeList infos = child.getChildNodes();
+					for (int j = 0; j < infos.getLength(); j++) {
+						Node meta = infos.item(j);
+						if (meta.getNodeType() == Node.ELEMENT_NODE) {
+							if (meta.getNodeName().equals("meta.attribute")) { //$NON-NLS-1$
+								element.setKind(processKind(getAttribute(meta, "kind"))); //$NON-NLS-1$
+								element.setBasedOn(getAttribute(meta, "basedOn")); //$NON-NLS-1$
+								element.setTranslatableProperty(processTranslatable(getAttribute(meta, "translatable"))); //$NON-NLS-1$
+								element.setDeprecatedProperty(processDeprecated(getAttribute(meta, "deprecated"))); //$NON-NLS-1$
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	private boolean processTranslatable(String value) {
+		return (value != null && "true".equals(value)); //$NON-NLS-1$
+	}
+
+	private boolean processDeprecated(String value) {
+		return value != null && "true".equals(value); //$NON-NLS-1$
+	}
+
+	private SchemaSimpleType processAttributeRestriction(SchemaAttribute attribute, Node node) {
+		NodeList children = node.getChildNodes();
+		if (children.getLength() == 0)
+			return null;
+		String baseName = getAttribute(node, "base"); //$NON-NLS-1$
+		if (baseName.equals("string") == false) { //$NON-NLS-1$
+			return new SchemaSimpleType(attribute.getSchema(), "string"); //$NON-NLS-1$
+		}
+		SchemaSimpleType type = new SchemaSimpleType(attribute.getSchema(), baseName);
+		Vector items = new Vector();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("enumeration")) { //$NON-NLS-1$
+					ISchemaEnumeration enumeration = processEnumeration(attribute.getSchema(), child);
+					if (enumeration != null)
+						items.addElement(enumeration);
+				}
+			}
+		}
+		ChoiceRestriction restriction = new ChoiceRestriction(attribute.getSchema());
+		restriction.setChildren(items);
+		type.setRestriction(restriction);
+		return type;
+	}
+
+	private void processAttributeSimpleType(SchemaAttribute attribute, Node node) {
+		NodeList children = node.getChildNodes();
+		if (children.getLength() == 0)
+			return;
+		SchemaSimpleType type = null;
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("restriction")) { //$NON-NLS-1$
+					type = processAttributeRestriction(attribute, child);
+				}
+			}
+		}
+		if (type != null)
+			attribute.setType(type);
+	}
+
+	private SchemaComplexType processComplexType(ISchemaElement owner, Node typeNode) {
+		String aname = getAttribute(typeNode, "name"); //$NON-NLS-1$
+		String amixed = getAttribute(typeNode, "mixed"); //$NON-NLS-1$
+		SchemaComplexType complexType = new SchemaComplexType(this, aname);
+		if (amixed != null && amixed.equals("true")) //$NON-NLS-1$
+			complexType.setMixed(true);
+		NodeList children = typeNode.getChildNodes();
+		ISchemaCompositor compositor = null;
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("attribute")) { //$NON-NLS-1$
+					complexType.addAttribute(processAttribute(owner, child));
+				} else {
+					ISchemaObject object = processCompositorChild(owner, child, ISchemaCompositor.ROOT);
+					if (object instanceof ISchemaCompositor && compositor == null) {
+						compositor = (ISchemaCompositor) object;
+					}
+				}
+			}
+		}
+		complexType.setCompositor(compositor);
+		return complexType;
+	}
+
+	private ISchemaCompositor processCompositor(ISchemaObject parent, Node node, int type) {
+		SchemaCompositor compositor = new SchemaCompositor(parent, type);
+		NodeList children = node.getChildNodes();
+		int minOccurs = 1;
+		int maxOccurs = 1;
+		String aminOccurs = getAttribute(node, "minOccurs"); //$NON-NLS-1$
+		String amaxOccurs = getAttribute(node, "maxOccurs"); //$NON-NLS-1$
+		if (aminOccurs != null)
+			minOccurs = Integer.valueOf(aminOccurs).intValue();
+		if (amaxOccurs != null) {
+			if (amaxOccurs.equals("unbounded")) //$NON-NLS-1$
+				maxOccurs = Integer.MAX_VALUE;
+			else {
+				maxOccurs = Integer.valueOf(amaxOccurs).intValue();
+			}
+		}
+		compositor.setMinOccurs(minOccurs);
+		compositor.setMaxOccurs(maxOccurs);
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			ISchemaObject object = processCompositorChild(compositor, child, type);
+			if (object != null)
+				compositor.addChild(object);
+		}
+		return compositor;
+	}
+
+	private ISchemaObject processCompositorChild(ISchemaObject parent, Node child, int parentKind) {
+		String tag = child.getNodeName();
+		if (tag.equals("element") && parentKind != ISchemaCompositor.ROOT) { //$NON-NLS-1$
+			return processElement(parent, child);
+		}
+		// sequence: element | group | choice | sequence
+		if (tag.equals("sequence") && parentKind != ISchemaCompositor.ALL) { //$NON-NLS-1$
+			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
+		}
+		// choice: element | group | choice | sequence
+		if (tag.equals("choice") && parentKind != ISchemaCompositor.ALL) { //$NON-NLS-1$
+			return processCompositor(parent, child, ISchemaCompositor.CHOICE);
+		}
+		// all: element
+		if (tag.equals("all") //$NON-NLS-1$
+				&& (parentKind == ISchemaCompositor.ROOT || parentKind == ISchemaCompositor.GROUP)) {
+			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
+		}
+		// group: all | choice | sequence
+		if (tag.equals("group") //$NON-NLS-1$
+				&& (parentKind == ISchemaCompositor.CHOICE || parentKind == ISchemaCompositor.SEQUENCE)) {
+			return processCompositor(parent, child, ISchemaCompositor.SEQUENCE);
+		}
+		return null;
+	}
+
+	private ISchemaElement processElement(ISchemaObject parent, Node elementNode) {
+		if (parent instanceof ISchemaCompositor)
+			return processElementReference((ISchemaCompositor) parent, elementNode);
+		return processElementDeclaration(parent, elementNode);
+	}
+
+	private ISchemaElement processElementDeclaration(ISchemaObject parent, Node elementNode) {
+		String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$
+		if (aname == null)
+			return null;
+		String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$	
+		int minOccurs = getMinOccurs(elementNode);
+		int maxOccurs = getMaxOccurs(elementNode);
+
+		ISchemaType type = null;
+		if (atype != null) {
+			type = resolveTypeReference(atype);
+		}
+		SchemaElement element;
+		if (aname.equals("extension")) //$NON-NLS-1$
+			element = new SchemaRootElement(parent, aname);
+		else
+			element = new SchemaElement(parent, aname);
+		//element.bindSourceLocation(elementNode, lineTable);
+		element.setMinOccurs(minOccurs);
+		element.setMaxOccurs(maxOccurs);
+		NodeList children = elementNode.getChildNodes();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				String tag = child.getNodeName();
+				if (type == null && tag.equals("complexType")) { //$NON-NLS-1$
+					type = processComplexType(element, child);
+				}
+				if (tag.equals("annotation")) { //$NON-NLS-1$
+					processElementAnnotation(element, child);
+				}
+			}
+		}
+		element.setType(type);
+		return element;
+	}
+
+	private ISchemaElement processElementReference(ISchemaCompositor compositor, Node elementNode) {
+		String aref = getAttribute(elementNode, "ref"); //$NON-NLS-1$
+		if (aref == null) {
+			return null;
+		}
+		int minOccurs = getMinOccurs(elementNode);
+		int maxOccurs = getMaxOccurs(elementNode);
+
+		SchemaElementReference reference = new SchemaElementReference(compositor, aref);
+		reference.addComments(elementNode);
+		reference.setMinOccurs(minOccurs);
+		reference.setMaxOccurs(maxOccurs);
+		fReferences.addElement(reference);
+		//reference.bindSourceLocation(elementNode, lineTable);
+		return reference;
+	}
+
+	private int getMinOccurs(Node elementNode) {
+		String aminOccurs = getAttribute(elementNode, "minOccurs"); //$NON-NLS-1$
+		if (aminOccurs != null)
+			return Integer.valueOf(aminOccurs).intValue();
+		return 1;
+
+	}
+
+	private int getMaxOccurs(Node elementNode) {
+		String amaxOccurs = getAttribute(elementNode, "maxOccurs"); //$NON-NLS-1$
+		if (amaxOccurs != null) {
+			if (amaxOccurs.equals("unbounded")) //$NON-NLS-1$
+				return Integer.MAX_VALUE;
+			return Integer.valueOf(amaxOccurs).intValue();
+		}
+		return 1;
+	}
+
+	private void processElementAnnotation(SchemaElement element, Node node) {
+		NodeList children = node.getChildNodes();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("documentation") && !fAbbreviated) { //$NON-NLS-1$
+					element.setDescription(getNormalizedText(child.getFirstChild().getNodeValue()));
+				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
+					NodeList infos = child.getChildNodes();
+					for (int j = 0; j < infos.getLength(); j++) {
+						Node meta = infos.item(j);
+						if (meta.getNodeType() == Node.ELEMENT_NODE) {
+							if (meta.getNodeName().equals("meta.element")) { //$NON-NLS-1$
+								element.setLabelProperty(getAttribute(meta, "labelAttribute")); //$NON-NLS-1$
+								element.setIconProperty(getAttribute(meta, "icon")); //$NON-NLS-1$
+								if (element.getIconProperty() == null)
+									element.setIconProperty(getAttribute(meta, "iconName")); //$NON-NLS-1$
+								element.setTranslatableProperty(processTranslatable(getAttribute(meta, "translatable"))); //$NON-NLS-1$
+								element.setDeprecatedProperty(processDeprecated(getAttribute(meta, "deprecated"))); //$NON-NLS-1$
+								if (element instanceof ISchemaRootElement) {
+									// set deprecated suggestion
+									String depSug = getAttribute(meta, ISchemaRootElement.P_DEP_REPLACEMENT);
+									((ISchemaRootElement) element).setDeprecatedSuggestion(depSug);
+
+									// set internal
+									String internal = getAttribute(meta, ISchemaRootElement.P_INTERNAL);
+									((ISchemaRootElement) element).setInternal(Boolean.valueOf(internal).booleanValue());
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	private ISchemaEnumeration processEnumeration(ISchema schema, Node node) {
+		String name = getAttribute(node, "value"); //$NON-NLS-1$
+		return new SchemaEnumeration(schema, name);
+	}
+
+	private int processKind(String name) {
+		if (name != null) {
+			if (name.equals("java")) //$NON-NLS-1$
+				return IMetaAttribute.JAVA;
+			if (name.equals("resource")) //$NON-NLS-1$
+				return IMetaAttribute.RESOURCE;
+			if (name.equals("identifier")) //$NON-NLS-1$
+				return IMetaAttribute.IDENTIFIER;
+		}
+		return IMetaAttribute.STRING;
+	}
+
+	private void processSchemaAnnotation(Node node) {
+		NodeList children = node.getChildNodes();
+		String section = "overview"; //$NON-NLS-1$
+		String sectionName = "Overview"; //$NON-NLS-1$
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				if (child.getNodeName().equals("documentation") && !fAbbreviated) { //$NON-NLS-1$
+					String text = getNormalizedText(child.getFirstChild().getNodeValue());
+					if (section != null) {
+						if (section.equals("overview")) { //$NON-NLS-1$
+							setDescription(text);
+						} else {
+							DocumentSection sec = new DocumentSection(this, section, sectionName);
+							sec.setDescription(text);
+							fDocSections.addElement(sec);
+						}
+					}
+				} else if (child.getNodeName().equals("appInfo") || child.getNodeName().equals("appinfo")) { //$NON-NLS-1$ //$NON-NLS-2$
+					NodeList infos = child.getChildNodes();
+					for (int j = 0; j < infos.getLength(); j++) {
+						Node meta = infos.item(j);
+						if (meta.getNodeType() == Node.ELEMENT_NODE) {
+							if (meta.getNodeName().equals("meta.schema")) { //$NON-NLS-1$
+								section = "overview"; //$NON-NLS-1$
+								setName(getAttribute(meta, "name")); //$NON-NLS-1$
+								fPluginID = getAttribute(meta, "plugin"); //$NON-NLS-1$
+								fPointID = getAttribute(meta, "id"); //$NON-NLS-1$
+								fValid = true;
+							} else if (meta.getNodeName().equals("meta.section")) { //$NON-NLS-1$
+								section = getAttribute(meta, "type"); //$NON-NLS-1$
+								sectionName = getAttribute(meta, "name"); //$NON-NLS-1$
+								if (sectionName == null)
+									sectionName = section;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	private void processInclude(Node node) {
+		String location = getAttribute(node, "schemaLocation"); //$NON-NLS-1$
+		SchemaInclude include = new SchemaInclude(this, location, fAbbreviated);
+		if (fIncludes == null)
+			fIncludes = new Vector();
+		fIncludes.add(include);
+	}
+
+	public void reload() {
+		reload(null);
+	}
+
+	public void reload(InputStream is) {
+		setNotificationEnabled(false);
+		reset();
+		if (is != null)
+			load(is);
+		else
+			load();
+		setNotificationEnabled(true);
+		if (isLoaded())
+			fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.WORLD_CHANGED, new Object[0], null));
+	}
+
+	public void removeDocumentSection(IDocumentSection docSection) {
+		fDocSections.removeElement(docSection);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {docSection}, null));
+	}
+
+	public void moveElementToSibling(ISchemaElement element, ISchemaObject sibling) {
+		if (!isLoaded())
+			load();
+		int index = fElements.indexOf(element);
+		int newIndex;
+		if (sibling != null && fElements.contains(sibling))
+			newIndex = fElements.indexOf(sibling);
+		else
+			newIndex = fElements.size() - 1;
+
+		if (index > newIndex) {
+			for (int i = index; i > newIndex; i--) {
+				fElements.set(i, fElements.elementAt(i - 1));
+			}
+		} else if (index < newIndex) {
+			for (int i = index; i < newIndex; i++) {
+				fElements.set(i, fElements.elementAt(i + 1));
+			}
+		} else
+			// don't need to move
+			return;
+		fElements.set(newIndex, element);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.CHANGE, new Object[] {this}, null));
+	}
+
+	public void removeElement(ISchemaElement element) {
+		fElements.removeElement(element);
+		fireModelChanged(new ModelChangedEvent(this, IModelChangedEvent.REMOVE, new Object[] {element}, null));
+	}
+
+	public void removeModelChangedListener(IModelChangedListener listener) {
+		fListeners.remove(listener);
+	}
+
+	private void reset() {
+		fElements = new Vector();
+		fDocSections = new Vector();
+		fIncludes = null;
+		fPointID = null;
+		fPluginID = null;
+		fReferences = null;
+		fDescription = null;
+		fName = null;
+		fValid = false;
+		fLoaded = false;
+	}
+
+	private void resolveElementReference(ISchemaObjectReference reference) {
+		ISchemaElement[] elementList = getResolvedElements();
+		for (int i = 0; i < elementList.length; i++) {
+			ISchemaElement element = elementList[i];
+			if (!(element instanceof ISchemaObjectReference) && element.getName().equals(reference.getName())) {
+				// Link
+				reference.setReferencedObject(element);
+				break;
+			}
+		}
+	}
+
+	private void resolveReference(ISchemaObjectReference reference) {
+		Class clazz = reference.getReferencedObjectClass();
+		if (clazz.equals(ISchemaElement.class)) {
+			resolveElementReference(reference);
+		}
+	}
+
+	private void resolveReferences(Vector references) {
+		for (int i = 0; i < references.size(); i++) {
+			ISchemaObjectReference reference = (ISchemaObjectReference) references.elementAt(i);
+			resolveReference(reference);
+		}
+	}
+
+	private SchemaType resolveTypeReference(String typeName) {
+		// for now, create a simple type
+		return new SchemaSimpleType(this, typeName);
+	}
+
+	public void setDescription(String newDescription) {
+		String oldValue = fDescription;
+		fDescription = newDescription;
+		fireModelObjectChanged(this, P_DESCRIPTION, oldValue, fDescription);
+	}
+
+	public void setName(String newName) {
+		if (newName == null)
+			newName = ""; //$NON-NLS-1$
+		String oldValue = fName;
+		fName = newName;
+		fireModelObjectChanged(this, P_NAME, oldValue, fName);
+	}
+
+	public void setPluginId(String newId) {
+		String oldValue = fPluginID;
+		fPluginID = newId;
+		fireModelObjectChanged(this, P_PLUGIN, oldValue, newId);
+	}
+
+	public void setPointId(String newId) {
+		String oldValue = fPointID;
+		fPointID = newId;
+		fireModelObjectChanged(this, P_POINT, oldValue, newId);
+	}
+
+	public void setNotificationEnabled(boolean newNotificationEnabled) {
+		fNotificationEnabled = newNotificationEnabled;
+	}
+
+	public String toString() {
+		return fName;
+	}
+
+	public void traverseDocumentTree(Node root) {
+		if (root == null)
+			return;
+		NodeList children = root.getChildNodes();
+		fReferences = new Vector();
+		for (int i = 0; i < children.getLength(); i++) {
+			Node child = children.item(i);
+			if (child.getNodeType() == Node.ELEMENT_NODE) {
+				String nodeName = child.getNodeName().toLowerCase(Locale.ENGLISH);
+				if (nodeName.equals("element")) { //$NON-NLS-1$
+					ISchemaElement element = processElement(this, child);
+					if (element == null) {
+						fValid = false;
+						return;
+					}
+					ISchemaAttribute[] attributes = element.getAttributes();
+					for (int j = 0; j < attributes.length; j++)
+						if (attributes[j] == null) {
+							fValid = false;
+							return;
+						}
+					fElements.addElement(element);
+				} else if (nodeName.equals("annotation")) { //$NON-NLS-1$
+					processSchemaAnnotation(child);
+				} else if (nodeName.equals("include")) { //$NON-NLS-1$
+					processInclude(child);
+				}
+			}
+		}
+		addOmittedDocumentSections();
+		fLoaded = true;
+		if (fReferences.size() > 0)
+			resolveReferences(fReferences);
+		fReferences = null;
+	}
+
+	private void addOmittedDocumentSections() {
+		for (int i = 0; i < DocumentSection.DOC_SECTIONS.length; i++) {
+			DocumentSection section = new DocumentSection(this, DocumentSection.DOC_SECTIONS[i], null);
+			if (!fDocSections.contains(section)) {
+				addDocumentSection(section);
+			}
+		}
+		Collections.sort(fDocSections);
+	}
+
+	public void updateReferencesFor(ISchemaElement element) {
+		updateReferencesFor(element, ISchema.REFRESH_RENAME);
+	}
+
+	public void updateReferencesFor(ISchemaElement element, int kind) {
+		for (int i = 0; i < fElements.size(); i++) {
+			ISchemaElement el = (ISchemaElement) fElements.elementAt(i);
+			if (el.equals(element))
+				continue;
+			ISchemaType type = el.getType();
+			if (type instanceof ISchemaComplexType) {
+				SchemaCompositor compositor = (SchemaCompositor) ((ISchemaComplexType) type).getCompositor();
+				if (compositor != null)
+					compositor.updateReferencesFor(element, kind);
+			}
+		}
+	}
+
+	public void write(String indent, PrintWriter writer) {
+		writer.println("<?xml version='1.0' encoding='UTF-8'?>"); //$NON-NLS-1$
+		writer.println("<!-- Schema file written by PDE -->"); //$NON-NLS-1$
+		writer.println("<schema targetNamespace=\"" + fPluginID + "\" xmlns=\"http://www.w3.org/2001/XMLSchema\">"); //$NON-NLS-1$ //$NON-NLS-2$
+		String indent2 = INDENT + INDENT;
+		String indent3 = indent2 + INDENT;
+		writer.println(indent + "<annotation>"); //$NON-NLS-1$
+
+		writer.println(indent2 + (getSchemaVersion() >= 3.4 ? "<appinfo>" : "<appInfo>")); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.print(indent3 + "<meta.schema plugin=\"" + fPluginID + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.print(" id=\"" + fPointID + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.println(" name=\"" + getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.println(indent2 + (getSchemaVersion() >= 3.4 ? "</appinfo>" : "</appInfo>")); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.println(indent2 + "<documentation>"); //$NON-NLS-1$
+		writer.println(indent3 + getWritableDescription());
+		writer.println(indent2 + "</documentation>"); //$NON-NLS-1$
+		writer.println(INDENT + "</annotation>"); //$NON-NLS-1$
+		writer.println();
+		// add includes, if defined
+		if (fIncludes != null) {
+			for (int i = 0; i < fIncludes.size(); i++) {
+				ISchemaInclude include = (ISchemaInclude) fIncludes.get(i);
+				include.write(INDENT, writer);
+				writer.println();
+			}
+		}
+		// add elements
+		for (int i = 0; i < fElements.size(); i++) {
+			ISchemaElement element = (ISchemaElement) fElements.elementAt(i);
+			element.write(INDENT, writer);
+			writer.println();
+		}
+		// add document sections
+		for (int i = 0; i < fDocSections.size(); i++) {
+			IDocumentSection section = (IDocumentSection) fDocSections.elementAt(i);
+			section.write(INDENT, writer);
+			writer.println();
+		}
+		writer.println("</schema>"); //$NON-NLS-1$
+	}
+
+	private String getWritableDescription() {
+		String lineDelimiter = System.getProperty("line.separator"); //$NON-NLS-1$
+		String description = PDEXMLHelper.getWritableString(getDescription());
+		String platformDescription = description.replaceAll("\\r\\n|\\r|\\n", lineDelimiter); //$NON-NLS-1$
+
+		return platformDescription;
+	}
+
+	public boolean isDeperecated() {
+		Iterator it = fElements.iterator();
+		while (it.hasNext()) {
+			Object next = it.next();
+			if (next instanceof SchemaRootElement)
+				return ((SchemaRootElement) next).isDeprecated();
+		}
+		return false;
+	}
+
+	public String getDeprecatedSuggestion() {
+		Iterator it = fElements.iterator();
+		while (it.hasNext()) {
+			Object next = it.next();
+			if (next instanceof SchemaRootElement)
+				return ((SchemaRootElement) next).getDeprecatedSuggestion();
+		}
+		return null;
+	}
+
+	public boolean isInternal() {
+		Iterator it = fElements.iterator();
+		while (it.hasNext()) {
+			Object next = it.next();
+			if (next instanceof SchemaRootElement)
+				return ((SchemaRootElement) next).isInternal();
+		}
+		return false;
+	}
+
+	public double getSchemaVersion() {
+		if (fTargetVersion == 0) {
+			IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(fPluginID);
+			if (model != null) {
+				IPluginBase base = model.getPluginBase();
+				if (base != null) {
+					if (base.getSchemaVersion() != null) {
+						fTargetVersion = Double.parseDouble(base.getSchemaVersion());
+					}
+				}
+			}
+			if (fTargetVersion == 0) {
+				// Use default for target platform
+				fTargetVersion = Double.parseDouble(TargetPlatformHelper.getSchemaVersion());
+			}
+		}
+		return fTargetVersion;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractBundleContainer.java
index 7d95547..212c1a2 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractBundleContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.spi.RegistryContributor;
 import org.eclipse.core.variables.IStringVariableManager;
 import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
 import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
 import org.eclipse.osgi.service.pluginconversion.PluginConverter;
@@ -26,6 +27,7 @@ import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.provisional.*;
 import org.osgi.framework.*;
 
@@ -42,25 +44,14 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 	private IResolvedBundle[] fBundles;
 
 	/**
-	 * Status generated when this container was resolved, possibly <code>null</code>
-	 */
-	private IStatus fResolutionStatus;
-
-	/**
-	 * Status generated when this container resolved it's bundles, a multi-status containing all individual bundle statuses, possibly <code>null</code>
+	 * List of features contained in this bundle container or <code>null</code> if unresolved
 	 */
-	private IStatus fBundleStatus;
+	private IFeatureModel[] fFeatures;
 
 	/**
-	 * Bundle restrictions (subset) this container is restricted to or <code>null</code> if
-	 * no restrictions.
-	 */
-	private BundleInfo[] fRestrictions;
-
-	/**
-	 * Optional bundles or <code>null</code> if none
+	 * Status generated when this container was resolved, possibly <code>null</code>
 	 */
-	private BundleInfo[] fOptional;
+	private IStatus fResolutionStatus;
 
 	/**
 	 * A registry can be built to identify old school source bundles.
@@ -101,9 +92,10 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#resolve(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	public final IStatus resolve(ITargetDefinition definition, IProgressMonitor monitor) {
-		SubMonitor subMonitor = SubMonitor.convert(monitor, 10);
+		SubMonitor subMonitor = SubMonitor.convert(monitor, 150);
 		try {
-			fBundles = resolveBundles(definition, subMonitor.newChild(10));
+			fBundles = resolveBundles(definition, subMonitor.newChild(100));
+			fFeatures = resolveFeatures(definition, subMonitor.newChild(50));
 			fResolutionStatus = Status.OK_STATUS;
 			if (subMonitor.isCanceled()) {
 				fBundles = null;
@@ -111,6 +103,7 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 			}
 		} catch (CoreException e) {
 			fBundles = new IResolvedBundle[0];
+			fFeatures = new IFeatureModel[0];
 			fResolutionStatus = e.getStatus();
 		} finally {
 			if (fRegistry != null) {
@@ -122,39 +115,17 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 				monitor.done();
 			}
 		}
-		fBundleStatus = null;
 		return fResolutionStatus;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getBundleStatus()
+	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getStatus()
 	 */
-	public IStatus getBundleStatus() {
+	public IStatus getStatus() {
 		if (!isResolved()) {
 			return null;
 		}
-		if (!fResolutionStatus.isOK()) {
-			return fResolutionStatus;
-		}
-
-		if (fBundleStatus != null) {
-			return fBundleStatus;
-		}
-		// build status from bundle list
-		IResolvedBundle[] bundles = getBundles();
-		MultiStatus status = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.AbstractBundleContainer_0, null);
-		for (int i = 0; i < bundles.length; i++) {
-			if (!bundles[i].getStatus().isOK()) {
-				status.add(bundles[i].getStatus());
-			}
-		}
-		if (status.isOK()) {
-			// return the generic ok status vs a problem multi-status with no children
-			fBundleStatus = Status.OK_STATUS;
-			return fBundleStatus;
-		}
-		fBundleStatus = status;
-		return fBundleStatus;
+		return fResolutionStatus;
 	}
 
 	/* (non-Javadoc)
@@ -162,28 +133,23 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 	 */
 	public final IResolvedBundle[] getBundles() {
 		if (isResolved()) {
-			return getMatchingBundles(fBundles, getIncludedBundles(), getOptionalBundles(), this);
+			return fBundles;
 		}
 		return null;
 	}
 
-	/**
-	 * Returns the list of resolved bundles in this container.  Does not filter based on any
-	 * includedBundles or optionalBundles set on this container.  Returns <code>null</code> if
-	 * this container has not been resolved.  Use {@link #getBundles()} to get the restricted
-	 * list of bundles.
-	 *  
-	 * @return list of resolved bundles or <code>null</code>
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getFeatures()
 	 */
-	public IResolvedBundle[] getAllBundles() {
+	public IFeatureModel[] getFeatures() {
 		if (isResolved()) {
-			return fBundles;
+			return fFeatures;
 		}
 		return null;
 	}
 
 	/**
-	 * Resolves all source and executable bundles in this container regardless of any bundle restrictions.
+	 * Resolves all source and executable bundles in this container
 	 * <p>
 	 * Subclasses must implement this method.
 	 * </p><p>
@@ -191,140 +157,24 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 	 * </p>
 	 * @param definition target context
 	 * @param monitor progress monitor
-	 * @return all source and executable bundles in this container regardless of any bundle restrictions
+	 * @return all source and executable bundles in this container
 	 * @throws CoreException if an error occurs
 	 */
 	protected abstract IResolvedBundle[] resolveBundles(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException;
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getRestrictions()
-	 */
-	public final BundleInfo[] getIncludedBundles() {
-		return fRestrictions;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#setRestrictions(org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo[])
-	 */
-	public final void setIncludedBundles(BundleInfo[] bundles) {
-		fRestrictions = bundles;
-		fBundleStatus = null;
-	}
-
 	/**
-	 * Returns bundles from the specified collection that match the symbolic names
-	 * and/or version in the specified criteria. When no version is specified
-	 * the newest version (if any) is selected.
-	 * 
-	 * @param collection bundles to resolve against match criteria
-	 * @param included bundles to include or <code>null</code> if no restrictions
-	 * @param optional optional bundles or <code>null</code> of no optional bundles
-	 * @param parentContainer parent bundle container to be set on any errors that are created, if <code>null</code> some returned contains may have a null parent
-	 * @return bundles that match this container's restrictions
-	 */
-	static IResolvedBundle[] getMatchingBundles(IResolvedBundle[] collection, BundleInfo[] included, BundleInfo[] optional, IBundleContainer parentContainer) {
-		if (included == null && optional == null) {
-			return collection;
-		}
-		// map bundles names to available versions
-		Map bundleMap = new HashMap(collection.length);
-		for (int i = 0; i < collection.length; i++) {
-			IResolvedBundle resolved = collection[i];
-			List list = (List) bundleMap.get(resolved.getBundleInfo().getSymbolicName());
-			if (list == null) {
-				list = new ArrayList(3);
-				bundleMap.put(resolved.getBundleInfo().getSymbolicName(), list);
-			}
-			list.add(resolved);
-		}
-		List resolved = new ArrayList();
-		if (included == null) {
-			for (int i = 0; i < collection.length; i++) {
-				resolved.add(collection[i]);
-			}
-		} else {
-			for (int i = 0; i < included.length; i++) {
-				BundleInfo info = included[i];
-				resolved.add(resolveBundle(bundleMap, info, false, parentContainer));
-			}
-		}
-		if (optional != null) {
-			for (int i = 0; i < optional.length; i++) {
-				BundleInfo option = optional[i];
-				IResolvedBundle resolveBundle = resolveBundle(bundleMap, option, true, parentContainer);
-				IStatus status = resolveBundle.getStatus();
-				if (status.isOK()) {
-					// add to list if not there already
-					if (!resolved.contains(resolveBundle)) {
-						resolved.add(resolveBundle);
-					}
-				} else {
-					// missing optional bundle - add it to the list
-					resolved.add(resolveBundle);
-				}
-			}
-		}
-		return (IResolvedBundle[]) resolved.toArray(new IResolvedBundle[resolved.size()]);
-	}
-
-	/**
-	 * Resolves a bundle for the given info from the given map. The map contains
-	 * keys of symbolic names and values are lists of {@link IResolvedBundle}'s available
-	 * that match the names.
-	 * 
-	 * @param bundleMap available bundles to resolve against
-	 * @param info name and version to match against
-	 * @param optional whether the bundle is optional
-	 * @param parentContainer bundle container the resolved bundle belongs too
-	 * @return resolved bundle
+	 * Collects all of the features in this container
+	 * <p>
+	 * Subclasses must implement this method.
+	 * </p><p>
+	 * <code>beginTask()</code> and <code>done()</code> will be called on the given monitor by the caller. 
+	 * </p>
+	 * @param definition target context
+	 * @param monitor progress monitor
+	 * @return all features in this container
+	 * @throws CoreException if an error occurs
 	 */
-	private static IResolvedBundle resolveBundle(Map bundleMap, BundleInfo info, boolean optional, IBundleContainer parentContainer) {
-		List list = (List) bundleMap.get(info.getSymbolicName());
-		if (list != null) {
-			String version = info.getVersion();
-			if (version == null) {
-				// select newest
-				if (list.size() > 1) {
-					// sort the list
-					Collections.sort(list, new Comparator() {
-						public int compare(Object o1, Object o2) {
-							BundleInfo b1 = ((IResolvedBundle) o1).getBundleInfo();
-							BundleInfo b2 = ((IResolvedBundle) o2).getBundleInfo();
-							return b1.getVersion().compareTo(b2.getVersion());
-						}
-					});
-				}
-				// select the last one
-				ResolvedBundle rb = (ResolvedBundle) list.get(list.size() - 1);
-				rb.setOptional(optional);
-				return rb;
-			}
-			Iterator iterator = list.iterator();
-			while (iterator.hasNext()) {
-				IResolvedBundle bundle = (IResolvedBundle) iterator.next();
-				if (bundle.getBundleInfo().getVersion().equals(version)) {
-					((ResolvedBundle) bundle).setOptional(optional);
-					return bundle;
-				}
-			}
-			// VERSION DOES NOT EXIST
-			int sev = IStatus.ERROR;
-			String message = NLS.bind(Messages.AbstractBundleContainer_1, new Object[] {info.getVersion(), info.getSymbolicName()});
-			if (optional) {
-				sev = IStatus.INFO;
-				message = NLS.bind(Messages.AbstractBundleContainer_2, new Object[] {info.getVersion(), info.getSymbolicName()});
-			}
-			return new ResolvedBundle(info, parentContainer, new Status(sev, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_VERSION_DOES_NOT_EXIST, message, null), null, optional, false);
-		}
-		// DOES NOT EXIST
-		int sev = IStatus.ERROR;
-		String message = NLS.bind(Messages.AbstractBundleContainer_3, info.getSymbolicName());
-		if (optional) {
-			sev = IStatus.INFO;
-			message = NLS.bind(Messages.AbstractBundleContainer_4, info.getSymbolicName());
-		}
-		return new ResolvedBundle(info, parentContainer, new Status(sev, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_DOES_NOT_EXIST, message, null), null, optional, false);
-	}
+	protected abstract IFeatureModel[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException;
 
 	/**
 	 * Returns a string that identifies the type of bundle container.  This type is persisted to xml
@@ -348,53 +198,18 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 	public abstract String getLocation(boolean resolve) throws CoreException;
 
 	/**
-	 * Returns whether restrictions are equivalent. Subclasses should override for other data.
+	 * Returns whether this container has equivalent bundle content to the given container
 	 * 
 	 * @param container bundle container
 	 * @return whether content is equivalent
 	 */
-	public boolean isContentEqual(AbstractBundleContainer container) {
-		return isEqualOrNull(fRestrictions, container.fRestrictions) && isEqualOrNull(fOptional, container.fOptional);
-	}
+	public abstract boolean isContentEqual(AbstractBundleContainer container);
 
 	/**
-	 * Returns whether the arrays have equal contents or are both <code>null</code>.
-	 * 
-	 * @param objects1
-	 * @param objects2
-	 * @return whether the arrays have equal contents or are both <code>null</code>
+	 * Sets the resolution status to null.  This container will be considered unresolved.
 	 */
-	protected boolean isEqualOrNull(Object[] objects1, Object[] objects2) {
-		if (objects1 == null) {
-			return objects2 == null;
-		}
-		if (objects2 == null) {
-			return false;
-		}
-		if (objects1.length == objects2.length) {
-			for (int i = 0; i < objects1.length; i++) {
-				if (!objects1[i].equals(objects2[i])) {
-					return false;
-				}
-			}
-			return true;
-		}
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getOptionalBundles()
-	 */
-	public BundleInfo[] getOptionalBundles() {
-		return fOptional;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#setOptionalBundles(org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo[])
-	 */
-	public void setOptionalBundles(BundleInfo[] bundles) {
-		fOptional = bundles;
-		fBundleStatus = null;
+	protected void clearResolutionStatus() {
+		fResolutionStatus = null;
 	}
 
 	/**
@@ -735,35 +550,4 @@ public abstract class AbstractBundleContainer implements IBundleContainer {
 		}
 		return fVMArgs;
 	}
-
-	// Helpful when using working copies, but needs to differentiate between all containers, including different features with same location
-//	/* (non-Javadoc)
-//	 * @see java.lang.Object#equals(java.lang.Object)
-//	 */
-//	public boolean equals(Object obj) {
-//		if (obj instanceof AbstractBundleContainer) {
-//			AbstractBundleContainer container = (AbstractBundleContainer) obj;
-//			try {
-//				if (container.getType().equals(getType()) && container.getLocation(false).equals(getLocation(false))) {
-//					return true;
-//				}
-//			} catch (CoreException e) {
-//				PDECore.log(e);
-//			}
-//		}
-//		return false;
-//	}
-//
-//	/* (non-Javadoc)
-//	 * @see java.lang.Object#hashCode()
-//	 */
-//	public int hashCode() {
-//		int result = getType().hashCode();
-//		try {
-//			result += getLocation(false).hashCode();
-//		} catch (CoreException e) {
-//			// Do nothing, caught by equals
-//		}
-//		return result;
-//	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractTargetHandle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractTargetHandle.java
index 42ca963..cf9d79b 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractTargetHandle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/AbstractTargetHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,9 @@ import java.io.File;
 import java.io.InputStream;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
 import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
@@ -156,7 +157,8 @@ public abstract class AbstractTargetHandle implements ITargetHandle {
 	 * @return profile registry or <code>null</code>
 	 */
 	static IProfileRegistry getProfileRegistry() {
-		return (IProfileRegistry) PDECore.getDefault().acquireService(IProfileRegistry.class.getName());
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
index fd908aa..141a311 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/DirectoryBundleContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
 import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
 
@@ -94,6 +95,16 @@ public class DirectoryBundleContainer extends AbstractBundleContainer {
 		throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.DirectoryBundleContainer_1, dir.toString())));
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.AbstractBundleContainer#resolveFeatures(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IFeatureModel[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		if (definition instanceof TargetDefinition) {
+			return ((TargetDefinition) definition).getFeatureModels(getLocation(false), monitor);
+		}
+		return new IFeatureModel[0];
+	}
+
 	/**
 	 * Returns the directory to search for bundles in.
 	 * 
@@ -110,7 +121,7 @@ public class DirectoryBundleContainer extends AbstractBundleContainer {
 	public boolean isContentEqual(AbstractBundleContainer container) {
 		if (container instanceof DirectoryBundleContainer) {
 			DirectoryBundleContainer dbc = (DirectoryBundleContainer) container;
-			return fPath.equals(dbc.fPath) && super.isContentEqual(container);
+			return fPath.equals(dbc.fPath);
 		}
 		return false;
 	}
@@ -119,7 +130,7 @@ public class DirectoryBundleContainer extends AbstractBundleContainer {
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-		return new StringBuffer().append("Directory ").append(fPath).append(' ').append(getIncludedBundles() == null ? "All" : Integer.toString(getIncludedBundles().length)).append(" included").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		return new StringBuffer().append("Directory ").append(fPath).toString(); //$NON-NLS-1$
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExternalFileTargetHandle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExternalFileTargetHandle.java
index 39995d1..c770cf4 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExternalFileTargetHandle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ExternalFileTargetHandle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,11 +49,7 @@ public class ExternalFileTargetHandle extends AbstractTargetHandle {
 	 */
 	protected ExternalFileTargetHandle(URI uri) {
 		fURI = uri;
-		try {
-			fFile = new File(fURI.toURL().getFile());
-		} catch (MalformedURLException e) {
-			fFile = null;
-		}
+		fFile = URIUtil.toFile(fURI);
 	}
 
 	/* (non-Javadoc)
@@ -86,14 +82,13 @@ public class ExternalFileTargetHandle extends AbstractTargetHandle {
 		} catch (IOException e) {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.LocalTargetHandle_4, fFile.getName()), e));
 		}
-
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetHandle#exists()
 	 */
 	public boolean exists() {
-		return fFile.exists();
+		return fFile != null && fFile.exists();
 	}
 
 	/* (non-Javadoc)
@@ -115,4 +110,11 @@ public class ExternalFileTargetHandle extends AbstractTargetHandle {
 		return fURI;
 	}
 
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return fURI.toString();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
index 82c19fc..620344a 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/FeatureBundleContainer.java
@@ -1,273 +1,250 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.core.target;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.build.site.PluginPathFinder;
-import org.eclipse.pde.internal.core.ExternalFeatureModelManager;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.ifeature.*;
-import org.eclipse.pde.internal.core.target.provisional.*;
-
-/**
- * A container of the bundles contained in a feature.
- * 
- * @since 3.5
- */
-public class FeatureBundleContainer extends AbstractBundleContainer {
-
-	/**
-	 * Constant describing the type of bundle container 
-	 */
-	public static final String TYPE = "Feature"; //$NON-NLS-1$
-
-	/**
-	 * Feature symbolic name 
-	 */
-	private String fId;
-
-	/**
-	 * Feature version or <code>null</code>
-	 */
-	private String fVersion;
-
-	/**
-	 * Install location which may contain string substitution variables
-	 */
-	private String fHome;
-
-	/**
-	 * Constructs a new feature bundle container for the feature at the specified
-	 * location. Plug-ins are resolved in the plug-ins directory of the given home
-	 * directory. When version is unspecified, the most recent version is used.
-	 * 
-	 * @param home root directory containing the features directory which
-	 *  may contain string substitution variables
-	 * @param name feature symbolic name
-	 * @param version feature version, or <code>null</code> if unspecified
-	 */
-	FeatureBundleContainer(String home, String name, String version) {
-		fId = name;
-		fVersion = version;
-		fHome = home;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#getLocation(boolean)
-	 */
-	public String getLocation(boolean resolve) throws CoreException {
-		if (resolve) {
-			return resolveHomeLocation().toOSString();
-		}
-		return fHome;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#getType()
-	 */
-	public String getType() {
-		return TYPE;
-	}
-
-	/**
-	 * Returns the symbolic name of the feature this bundle container resolves from
-	 * 
-	 * @return string feature id (symbolic name)
-	 */
-	public String getFeatureId() {
-		return fId;
-	}
-
-	/**
-	 * Returns the version of the feature this bundle container resolves from if
-	 * a version was specified.
-	 * 
-	 * @return string feature version or <code>null</code>
-	 */
-	public String getFeatureVersion() {
-		return fVersion;
-	}
-
-	/**
-	 * Returns the home location with all variables resolved as a path.
-	 * 
-	 * @return resolved home location
-	 * @throws CoreException
-	 */
-	private IPath resolveHomeLocation() throws CoreException {
-		return new Path(resolveVariables(fHome));
-	}
-
-	/**
-	 * Resolves and returns the directory containing the feature.
-	 * 
-	 * @return feature directory
-	 * @throws CoreException if unable to resolve
-	 */
-	private File resolveFeatureLocation() throws CoreException {
-		IPath home = resolveHomeLocation();
-		File[] featurePaths = PluginPathFinder.getFeaturePaths(home.toOSString());
-		if (featurePaths.length == 0) {
-			// no features are included with the install/home location
-			IPath path = home.append("features"); //$NON-NLS-1$
-			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_0, path.toOSString())));
-		}
-		// if a specific version is specified, find it
-		if (fVersion != null) {
-			StringBuffer buf = new StringBuffer();
-			String name = buf.append(fId).append("_").append(fVersion).toString(); //$NON-NLS-1$
-			for (int i = 0; i < featurePaths.length; i++) {
-				File feature = featurePaths[i];
-				if (feature.getName().equals(name)) {
-					return feature;
-				}
-			}
-			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_1, fId)));
-		}
-		// use most recent version
-		List versions = new ArrayList();
-		StringBuffer buf = new StringBuffer();
-		String prefix = buf.append(fId).append("_").toString(); //$NON-NLS-1$
-		for (int i = 0; i < featurePaths.length; i++) {
-			String name = featurePaths[i].getName();
-			if (name.startsWith(prefix)) {
-				versions.add(featurePaths[i]);
-			}
-		}
-		if (versions.isEmpty()) {
-			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_1, fId)));
-		}
-		Collections.sort(versions, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				return ((File) o1).getName().compareTo(((File) o2).getName());
-			}
-		});
-		return (File) versions.get(versions.size() - 1);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#resolveBundles(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected IResolvedBundle[] resolveBundles(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
-		IFeatureModel model = null;
-		try {
-			if (monitor.isCanceled()) {
-				return new IResolvedBundle[0];
-			}
-			File location = resolveFeatureLocation();
-			File manifest = new File(location, "feature.xml"); //$NON-NLS-1$
-			if (!manifest.exists() || !manifest.isFile()) {
-				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_2, fId)));
-			}
-			model = ExternalFeatureModelManager.createModel(manifest);
-			if (model == null || !model.isLoaded()) {
-				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_2, fId)));
-			}
-			// search bundles in plug-ins directory
-			ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
-			if (service == null) {
-				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.FeatureBundleContainer_4));
-			}
-			File dir = new File(manifest.getParentFile().getParentFile().getParentFile(), "plugins"); //$NON-NLS-1$
-			if (!dir.exists() || !dir.isDirectory()) {
-				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_5, fId)));
-			}
-			if (monitor.isCanceled()) {
-				return new IResolvedBundle[0];
-			}
-
-			IBundleContainer container = service.newDirectoryContainer(dir.getAbsolutePath());
-			container.resolve(definition, monitor);
-			IResolvedBundle[] bundles = container.getBundles();
-			IFeature feature = model.getFeature();
-			IFeaturePlugin[] plugins = feature.getPlugins();
-			List matchInfos = new ArrayList(plugins.length);
-			for (int i = 0; i < plugins.length; i++) {
-				if (monitor.isCanceled()) {
-					return new IResolvedBundle[0];
-				}
-				IFeaturePlugin plugin = plugins[i];
-				// only include if plug-in matches environment
-				if (isMatch(definition.getArch(), plugin.getArch(), Platform.getOSArch()) && isMatch(definition.getNL(), plugin.getNL(), Platform.getNL()) && isMatch(definition.getOS(), plugin.getOS(), Platform.getOS()) && isMatch(definition.getWS(), plugin.getWS(), Platform.getWS())) {
-					matchInfos.add(new BundleInfo(plugin.getId(), plugin.getVersion(), null, BundleInfo.NO_LEVEL, false));
-				}
-			}
-
-			// Because we used the directory container to get our bundles, we need to replace their parent
-			for (int i = 0; i < bundles.length; i++) {
-				bundles[i].setParentContainer(this);
-			}
-			return AbstractBundleContainer.getMatchingBundles(bundles, (BundleInfo[]) matchInfos.toArray(new BundleInfo[matchInfos.size()]), null, this);
-		} finally {
-			if (model != null) {
-				model.dispose();
-			}
-		}
-	}
-
-	/**
-	 * Returns whether the given target environment setting matches that of a fragments.
-	 * 
-	 * @param targetValue value in target definition
-	 * @param fragmentValue value in fragment
-	 * @param runningValue value of current running platform
-	 * @return whether the fragment should be considered
-	 */
-	private boolean isMatch(String targetValue, String fragmentValue, String runningValue) {
-		if (fragmentValue == null) {
-			// unspecified, so it is a match
-			return true;
-		}
-		if (targetValue == null) {
-			return runningValue.equals(fragmentValue);
-		}
-		return targetValue.equals(fragmentValue);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#isContentEqual(org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer)
-	 */
-	public boolean isContentEqual(AbstractBundleContainer container) {
-		if (container instanceof FeatureBundleContainer) {
-			FeatureBundleContainer fbc = (FeatureBundleContainer) container;
-			return fHome.equals(fbc.fHome) && fId.equals(fbc.fId) && isNullOrEqual(fVersion, fVersion) && super.isContentEqual(container);
-		}
-		return false;
-	}
-
-	private boolean isNullOrEqual(Object o1, Object o2) {
-		if (o1 == null) {
-			return o2 == null;
-		}
-		if (o2 == null) {
-			return false;
-		}
-		return o1.equals(o2);
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		return new StringBuffer().append("Feature ").append(fId).append(' ').append(fVersion).append(' ').append(fHome).append(' ').append(getIncludedBundles() == null ? "All" : Integer.toString(getIncludedBundles().length)).append(" included").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getVMArguments()
-	 */
-	public String[] getVMArguments() {
-		return null;
-	}
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.core.target.provisional.*;
+
+/**
+ * A container of the bundles contained in a feature.
+ * 
+ * @since 3.5
+ */
+public class FeatureBundleContainer extends AbstractBundleContainer {
+
+	/**
+	 * Constant describing the type of bundle container 
+	 */
+	public static final String TYPE = "Feature"; //$NON-NLS-1$
+
+	/**
+	 * Feature symbolic name 
+	 */
+	private String fId;
+
+	/**
+	 * Feature version or <code>null</code>
+	 */
+	private String fVersion;
+
+	/**
+	 * Install location which may contain string substitution variables
+	 */
+	private String fHome;
+
+	/**
+	 * Constructs a new feature bundle container for the feature at the specified
+	 * location. Plug-ins are resolved in the plug-ins directory of the given home
+	 * directory. When version is unspecified, the most recent version is used.
+	 * 
+	 * @param home root directory containing the features directory which
+	 *  may contain string substitution variables
+	 * @param name feature symbolic name
+	 * @param version feature version, or <code>null</code> if unspecified
+	 */
+	FeatureBundleContainer(String home, String name, String version) {
+		fId = name;
+		fVersion = version;
+		fHome = home;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#getLocation(boolean)
+	 */
+	public String getLocation(boolean resolve) throws CoreException {
+		if (resolve) {
+			return resolveHomeLocation().toOSString();
+		}
+		return fHome;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#getType()
+	 */
+	public String getType() {
+		return TYPE;
+	}
+
+	/**
+	 * Returns the symbolic name of the feature this bundle container resolves from
+	 * 
+	 * @return string feature id (symbolic name)
+	 */
+	public String getFeatureId() {
+		return fId;
+	}
+
+	/**
+	 * Returns the version of the feature this bundle container resolves from if
+	 * a version was specified.
+	 * 
+	 * @return string feature version or <code>null</code>
+	 */
+	public String getFeatureVersion() {
+		return fVersion;
+	}
+
+	/**
+	 * Returns the home location with all variables resolved as a path.
+	 * 
+	 * @return resolved home location
+	 * @throws CoreException
+	 */
+	private IPath resolveHomeLocation() throws CoreException {
+		return new Path(resolveVariables(fHome));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#resolveBundles(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IResolvedBundle[] resolveBundles(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		IFeatureModel model = null;
+		try {
+			if (monitor.isCanceled()) {
+				return new IResolvedBundle[0];
+			}
+
+			IFeatureModel[] features = resolveFeatures(definition, null);
+			if (features.length == 0) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_1, fId)));
+			}
+			File location = new File(features[0].getInstallLocation());
+			if (!location.exists()) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_0, location.toString())));
+			}
+			File manifest = new File(location, ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
+			if (!manifest.exists() || !manifest.isFile()) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_2, fId)));
+			}
+			model = ExternalFeatureModelManager.createModel(manifest);
+			if (model == null || !model.isLoaded()) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_2, fId)));
+			}
+			// search bundles in plug-ins directory
+			ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+			if (service == null) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.FeatureBundleContainer_4));
+			}
+			File dir = new File(manifest.getParentFile().getParentFile().getParentFile(), "plugins"); //$NON-NLS-1$
+			if (!dir.exists() || !dir.isDirectory()) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.FeatureBundleContainer_5, fId)));
+			}
+			if (monitor.isCanceled()) {
+				return new IResolvedBundle[0];
+			}
+
+			IBundleContainer container = service.newDirectoryContainer(dir.getAbsolutePath());
+			container.resolve(definition, monitor);
+			IResolvedBundle[] bundles = container.getBundles();
+			IFeature feature = model.getFeature();
+			IFeaturePlugin[] plugins = feature.getPlugins();
+			List matchInfos = new ArrayList(plugins.length);
+			for (int i = 0; i < plugins.length; i++) {
+				if (monitor.isCanceled()) {
+					return new IResolvedBundle[0];
+				}
+				IFeaturePlugin plugin = plugins[i];
+				// only include if plug-in matches environment
+				if (isMatch(definition.getArch(), plugin.getArch(), Platform.getOSArch()) && isMatch(definition.getNL(), plugin.getNL(), Platform.getNL()) && isMatch(definition.getOS(), plugin.getOS(), Platform.getOS()) && isMatch(definition.getWS(), plugin.getWS(), Platform.getWS())) {
+					matchInfos.add(new NameVersionDescriptor(plugin.getId(), plugin.getVersion()));
+				}
+			}
+
+			// Because we used the directory container to get our bundles, we need to replace their parent
+			for (int i = 0; i < bundles.length; i++) {
+				bundles[i].setParentContainer(this);
+			}
+			List result = TargetDefinition.getMatchingBundles(bundles, (NameVersionDescriptor[]) matchInfos.toArray(new NameVersionDescriptor[matchInfos.size()]), null, this);
+			return (IResolvedBundle[]) result.toArray(new IResolvedBundle[result.size()]);
+		} finally {
+			if (model != null) {
+				model.dispose();
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.AbstractBundleContainer#resolveFeatures(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IFeatureModel[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		if (definition instanceof TargetDefinition) {
+			IFeatureModel[] allFeatures = ((TargetDefinition) definition).getFeatureModels(getLocation(false), monitor);
+			for (int i = 0; i < allFeatures.length; i++) {
+				if (allFeatures[i].getFeature().getId().equals(fId)) {
+					if (fVersion == null || allFeatures[i].getFeature().getVersion().equals(fVersion)) {
+						return new IFeatureModel[] {allFeatures[i]};
+					}
+				}
+			}
+		}
+		return new IFeatureModel[0];
+	}
+
+	/**
+	 * Returns whether the given target environment setting matches that of a fragments.
+	 * 
+	 * @param targetValue value in target definition
+	 * @param fragmentValue value in fragment
+	 * @param runningValue value of current running platform
+	 * @return whether the fragment should be considered
+	 */
+	private boolean isMatch(String targetValue, String fragmentValue, String runningValue) {
+		if (fragmentValue == null) {
+			// unspecified, so it is a match
+			return true;
+		}
+		if (targetValue == null) {
+			return runningValue.equals(fragmentValue);
+		}
+		return targetValue.equals(fragmentValue);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#isContentEqual(org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer)
+	 */
+	public boolean isContentEqual(AbstractBundleContainer container) {
+		if (container instanceof FeatureBundleContainer) {
+			FeatureBundleContainer fbc = (FeatureBundleContainer) container;
+			return fHome.equals(fbc.fHome) && fId.equals(fbc.fId) && isNullOrEqual(fVersion, fVersion);
+		}
+		return false;
+	}
+
+	private boolean isNullOrEqual(Object o1, Object o2) {
+		if (o1 == null) {
+			return o2 == null;
+		}
+		if (o2 == null) {
+			return false;
+		}
+		return o1.equals(o2);
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return new StringBuffer().append("Feature ").append(fId).append(' ').append(fVersion).append(' ').append(fHome).toString(); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.IBundleContainer#getVMArguments()
+	 */
+	public String[] getVMArguments() {
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
index d0b985f..7ea3bb4 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/IUBundleContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.pde.internal.core.target;
 
@@ -15,20 +16,22 @@ import java.net.URI;
 import java.util.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.equinox.internal.p2.director.PermissiveSlicer;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IFileArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepositoryManager;
-import org.eclipse.equinox.internal.provisional.p2.query.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.touchpoint.eclipse.query.OSGiBundleQuery;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.provisional.*;
 
 /**
@@ -44,6 +47,11 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	public static final String TYPE = "InstallableUnit"; //$NON-NLS-1$	
 
 	/**
+	 * Constant for the string that is appended to feature installable unit ids
+	 */
+	private static final String FEATURE_ID_SUFFIX = ".feature.group"; //$NON-NLS-1$
+
+	/**
 	 * IU identifiers.
 	 */
 	private String[] fIds;
@@ -60,6 +68,11 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	private IInstallableUnit[] fUnits;
 
 	/**
+	 * Cached id/version pairs listing the features that were downloaded to the bundle pool during resolution.  <code>null</code> if not resolved.
+	 */
+	private NameVersionDescriptor[] fFeatures;
+
+	/**
 	 * Repositories to consider, or <code>null</code> if default.
 	 */
 	private URI[] fRepos;
@@ -85,29 +98,6 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	private boolean fIncludeMultipleEnvironments = false;
 
 	/**
-	 * Query for bundles in a profile. Every IU that ends up being installed as a bundle
-	 * provides a capability in the name space "osgi.bundle".
-	 */
-	class BundleQuery extends MatchQuery {
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.equinox.internal.provisional.p2.query.MatchQuery#isMatch(java.lang.Object)
-		 */
-		public boolean isMatch(Object candidate) {
-			if (candidate instanceof IInstallableUnit) {
-				IInstallableUnit unit = (IInstallableUnit) candidate;
-				IProvidedCapability[] provided = unit.getProvidedCapabilities();
-				for (int i = 0; i < provided.length; i++) {
-					if (provided[i].getNamespace().equals("osgi.bundle")) { //$NON-NLS-1$
-						return true;
-					}
-				}
-			}
-			return false;
-		}
-	}
-
-	/**
 	 * Constructs a installable unit bundle container for the specified units.
 	 * 
 	 * @param ids IU identifiers
@@ -166,9 +156,41 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.AbstractBundleContainer#resolveFeatures(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IFeatureModel[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		if (fFeatures == null || fFeatures.length == 0 || !(definition instanceof TargetDefinition)) {
+			return new IFeatureModel[0];
+		}
+
+		// Note: By creating a map of the container features, we are limiting the user to only one version of a feature in this container
+
+		// Get all the features in the bundle pool
+		IFeatureModel[] allFeatures = ((TargetDefinition) definition).getFeatureModels(getLocation(false), monitor);
+
+		// Create a map of the container features for quick lookups
+		HashMap containerFeatures = new HashMap();
+		for (int i = 0; i < fFeatures.length; i++) {
+			containerFeatures.put(fFeatures[i].getId(), fFeatures[i]);
+		}
+
+		List includedFeatures = new ArrayList();
+		for (int i = 0; i < allFeatures.length; i++) {
+			NameVersionDescriptor candidate = (NameVersionDescriptor) containerFeatures.get(allFeatures[i].getFeature().getId());
+			if (candidate != null) {
+				if (candidate.getVersion().equals(allFeatures[i].getFeature().getVersion())) {
+					includedFeatures.add(allFeatures[i]);
+				}
+			}
+		}
+		return (IFeatureModel[]) includedFeatures.toArray(new IFeatureModel[includedFeatures.size()]);
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#resolveBundles(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	protected IResolvedBundle[] resolveBundles(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		fFeatures = null; // Resolving may change the included features
 		if (fIncludeAllRequired) {
 			return resolveWithPlanner(definition, monitor);
 		}
@@ -187,7 +209,7 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	 */
 	private IResolvedBundle[] resolveWithPlanner(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
 		SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 10);
-		subMonitor.beginTask(Messages.IUBundleContainer_0, 200);
+		subMonitor.beginTask(Messages.IUBundleContainer_0, 210);
 
 		// retrieve profile
 		IProfile profile = ((TargetDefinition) definition).getProfile();
@@ -206,26 +228,27 @@ public class IUBundleContainer extends AbstractBundleContainer {
 
 		// create the provisioning plan
 		ProfileChangeRequest request = new ProfileChangeRequest(profile);
-		request.addInstallableUnits(units);
+		request.addAll(Arrays.asList(units));
 		for (int i = 0; i < units.length; i++) {
 			IInstallableUnit unit = units[i];
 			request.setInstallableUnitProfileProperty(unit, AbstractTargetHandle.PROP_INSTALLED_IU, Boolean.toString(true));
 		}
 		IPlanner planner = getPlanner();
 		URI[] repositories = resolveRepositories();
-		ProvisioningContext context = new ProvisioningContext(repositories);
+		ProvisioningContext context = new ProvisioningContext(getAgent());
+		context.setMetadataRepositories(repositories);
 		context.setArtifactRepositories(repositories);
 
 		if (subMonitor.isCanceled()) {
 			return new IResolvedBundle[0];
 		}
 
-		ProvisioningPlan plan = planner.getProvisioningPlan(request, context, new SubProgressMonitor(subMonitor, 10));
+		IProvisioningPlan plan = planner.getProvisioningPlan(request, context, new SubProgressMonitor(subMonitor, 10));
 		IStatus status = plan.getStatus();
 		if (!status.isOK()) {
 			throw new CoreException(status);
 		}
-		ProvisioningPlan installerPlan = plan.getInstallerPlan();
+		IProvisioningPlan installerPlan = plan.getInstallerPlan();
 		if (installerPlan != null) {
 			// this plan requires an update to the installer first, log the fact and attempt
 			// to continue, we don't want to update the running SDK while provisioning a target
@@ -238,16 +261,11 @@ public class IUBundleContainer extends AbstractBundleContainer {
 		}
 
 		// execute the provisioning plan
-		PhaseSet phases = DefaultPhaseSet.createDefaultPhaseSet(DefaultPhaseSet.PHASE_CHECK_TRUST | DefaultPhaseSet.PHASE_CONFIGURE | DefaultPhaseSet.PHASE_UNCONFIGURE | DefaultPhaseSet.PHASE_UNINSTALL);
+		IPhaseSet phases = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_CHECK_TRUST, PhaseSetFactory.PHASE_CONFIGURE, PhaseSetFactory.PHASE_UNCONFIGURE, PhaseSetFactory.PHASE_UNINSTALL});
 		IEngine engine = getEngine();
-		Operand[] operands = plan.getOperands();
-		List allOps = new ArrayList(operands.length + 1);
-		for (int i = 0; i < operands.length; i++) {
-			allOps.add(operands[i]);
-		}
-		allOps.add(new PropertyOperand(AbstractTargetHandle.PROP_PROVISION_MODE, null, TargetDefinitionPersistenceHelper.MODE_PLANNER));
-		allOps.add(new PropertyOperand(AbstractTargetHandle.PROP_ALL_ENVIRONMENTS, null, Boolean.toString(false)));
-		IStatus result = engine.perform(profile, phases, (Operand[]) allOps.toArray(new Operand[allOps.size()]), context, new SubProgressMonitor(subMonitor, 140));
+		plan.setProfileProperty(AbstractTargetHandle.PROP_PROVISION_MODE, TargetDefinitionPersistenceHelper.MODE_PLANNER);
+		plan.setProfileProperty(AbstractTargetHandle.PROP_ALL_ENVIRONMENTS, Boolean.toString(false));
+		IStatus result = engine.perform(plan, phases, new SubProgressMonitor(subMonitor, 140));
 
 		if (subMonitor.isCanceled()) {
 			return new IResolvedBundle[0];
@@ -265,9 +283,15 @@ public class IUBundleContainer extends AbstractBundleContainer {
 		}
 
 		// query for bundles
-		BundleQuery query = new BundleQuery();
-		Collector collector = new Collector();
-		slice.query(query, collector, new SubProgressMonitor(subMonitor, 10));
+		OSGiBundleQuery query = new OSGiBundleQuery();
+		IQueryResult queryResult = slice.query(query, new SubProgressMonitor(subMonitor, 10));
+
+		if (subMonitor.isCanceled()) {
+			return new IResolvedBundle[0];
+		}
+
+		// Cache the feature list
+		queryForFeatures(slice);
 
 		if (subMonitor.isCanceled()) {
 			return new IResolvedBundle[0];
@@ -275,13 +299,11 @@ public class IUBundleContainer extends AbstractBundleContainer {
 
 		Map bundles = new LinkedHashMap();
 		IFileArtifactRepository repo = getBundlePool(profile);
-		Iterator iterator = collector.iterator();
-		while (iterator.hasNext()) {
+		for (Iterator iterator = queryResult.iterator(); iterator.hasNext();) {
 			IInstallableUnit unit = (IInstallableUnit) iterator.next();
-			IArtifactKey[] artifacts = unit.getArtifacts();
-			for (int i = 0; i < artifacts.length; i++) {
-				IArtifactKey key = artifacts[i];
-				File file = repo.getArtifactFile(key);
+			Collection/*<IArtifactKey*/artifacts = unit.getArtifacts();
+			for (Iterator iterator2 = artifacts.iterator(); iterator2.hasNext();) {
+				File file = repo.getArtifactFile((IArtifactKey) iterator2.next());
 				if (file == null) {
 					// TODO: missing bundle
 				} else {
@@ -356,17 +378,26 @@ public class IUBundleContainer extends AbstractBundleContainer {
 
 		IProgressMonitor loadMonitor = new SubProgressMonitor(subMonitor, 10);
 		loadMonitor.beginTask(null, repoCount * 10);
-		IMetadataRepository[] metadataRepos = new IMetadataRepository[repoCount];
+		List metadataRepos = new ArrayList(repoCount);
+		MultiStatus repoStatus = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.IUBundleContainer_ProblemsLoadingRepositories, null);
 		IMetadataRepositoryManager manager = getRepoManager();
-		for (int i = 0; i < repoCount; ++i)
-			metadataRepos[i] = manager.loadRepository(repositories[i], new SubProgressMonitor(loadMonitor, 10));
+		for (int i = 0; i < repoCount; ++i) {
+			try {
+				IMetadataRepository repo = manager.loadRepository(repositories[i], new SubProgressMonitor(loadMonitor, 10));
+				metadataRepos.add(repo);
+			} catch (ProvisionException e) {
+				repoStatus.add(e.getStatus());
+			}
+		}
 		loadMonitor.done();
 
 		IQueryable allMetadata;
-		if (repoCount == 1) {
-			allMetadata = metadataRepos[0];
+		if (metadataRepos.size() == 0) {
+			throw new CoreException(repoStatus);
+		} else if (metadataRepos.size() == 1) {
+			allMetadata = (IQueryable) metadataRepos.get(0);
 		} else {
-			allMetadata = new CompoundQueryable(metadataRepos);
+			allMetadata = QueryUtil.compoundQueryable(metadataRepos);
 		}
 
 		// slice IUs and all prerequisites
@@ -379,33 +410,41 @@ public class IUBundleContainer extends AbstractBundleContainer {
 			props.setProperty("osgi.ws", definition.getWS() != null ? definition.getWS() : Platform.getWS()); //$NON-NLS-1$
 			props.setProperty("osgi.arch", definition.getArch() != null ? definition.getArch() : Platform.getOSArch()); //$NON-NLS-1$
 			props.setProperty("osgi.nl", definition.getNL() != null ? definition.getNL() : Platform.getNL()); //$NON-NLS-1$
+			props.setProperty(IProfile.PROP_INSTALL_FEATURES, Boolean.TRUE.toString());
 			slicer = new PermissiveSlicer(allMetadata, props, true, false, false, true, false);
 		}
 		IQueryable slice = slicer.slice(units, new SubProgressMonitor(subMonitor, 10));
-		Collector collector = slice.query(new InstallableUnitQuery(null), new Collector(), new SubProgressMonitor(subMonitor, 10));
+		if (slice == null) {
+			// The PermissiveSlicer may return null if an error occurs
+			return new IResolvedBundle[0];
+		}
+		IQueryResult queryResult = slice.query(QueryUtil.createIUAnyQuery(), new SubProgressMonitor(subMonitor, 10));
 
-		if (subMonitor.isCanceled() || collector.isEmpty()) {
+		if (subMonitor.isCanceled() || queryResult.isEmpty()) {
 			return new IResolvedBundle[0];
 		}
 
-		ArrayList operands = new ArrayList(collector.size());
-		Iterator itor = collector.iterator();
+		IEngine engine = getEngine();
+		ProvisioningContext context = new ProvisioningContext(getAgent());
+		context.setMetadataRepositories(repositories);
+		context.setArtifactRepositories(repositories);
+		IProvisioningPlan plan = engine.createPlan(profile, context);
+
+		Set querySet = queryResult.toUnmodifiableSet();
+		Iterator itor = querySet.iterator();
 		while (itor.hasNext()) {
-			operands.add(new InstallableUnitOperand(null, (IInstallableUnit) itor.next()));
+			plan.addInstallableUnit((IInstallableUnit) itor.next());
 		}
 		for (int i = 0; i < units.length; i++) {
 			IInstallableUnit unit = units[i];
-			operands.add(new InstallableUnitPropertyOperand(unit, AbstractTargetHandle.PROP_INSTALLED_IU, null, Boolean.toString(true)));
+			plan.setInstallableUnitProfileProperty(unit, AbstractTargetHandle.PROP_INSTALLED_IU, Boolean.toString(true));
 		}
-		operands.add(new PropertyOperand(AbstractTargetHandle.PROP_PROVISION_MODE, null, TargetDefinitionPersistenceHelper.MODE_SLICER));
-		operands.add(new PropertyOperand(AbstractTargetHandle.PROP_ALL_ENVIRONMENTS, null, Boolean.toString(getIncludeAllEnvironments())));
+		plan.setProfileProperty(AbstractTargetHandle.PROP_PROVISION_MODE, TargetDefinitionPersistenceHelper.MODE_SLICER);
+		plan.setProfileProperty(AbstractTargetHandle.PROP_ALL_ENVIRONMENTS, Boolean.toString(getIncludeAllEnvironments()));
 
 		// execute the provisioning plan
-		PhaseSet phases = DefaultPhaseSet.createDefaultPhaseSet(DefaultPhaseSet.PHASE_CHECK_TRUST | DefaultPhaseSet.PHASE_CONFIGURE | DefaultPhaseSet.PHASE_UNCONFIGURE | DefaultPhaseSet.PHASE_UNINSTALL);
-		IEngine engine = getEngine();
-		ProvisioningContext context = new ProvisioningContext(repositories);
-		context.setArtifactRepositories(repositories);
-		IStatus result = engine.perform(profile, phases, (Operand[]) operands.toArray(new Operand[operands.size()]), context, new SubProgressMonitor(subMonitor, 140));
+		IPhaseSet phases = PhaseSetFactory.createDefaultPhaseSetExcluding(new String[] {PhaseSetFactory.PHASE_CHECK_TRUST, PhaseSetFactory.PHASE_CONFIGURE, PhaseSetFactory.PHASE_UNCONFIGURE, PhaseSetFactory.PHASE_UNINSTALL});
+		IStatus result = engine.perform(plan, phases, new SubProgressMonitor(subMonitor, 140));
 
 		if (subMonitor.isCanceled()) {
 			return new IResolvedBundle[0];
@@ -423,7 +462,14 @@ public class IUBundleContainer extends AbstractBundleContainer {
 		}
 
 		// query for bundles
-		collector = slice.query(new BundleQuery(), new Collector(), new SubProgressMonitor(subMonitor, 10));
+		queryResult = slice.query(new OSGiBundleQuery(), new SubProgressMonitor(subMonitor, 10));
+
+		if (subMonitor.isCanceled()) {
+			return new IResolvedBundle[0];
+		}
+
+		// Cache the feature list
+		queryForFeatures(slice);
 
 		if (subMonitor.isCanceled()) {
 			return new IResolvedBundle[0];
@@ -431,13 +477,12 @@ public class IUBundleContainer extends AbstractBundleContainer {
 
 		Map bundles = new LinkedHashMap();
 		IFileArtifactRepository repo = getBundlePool(profile);
-		Iterator iterator = collector.iterator();
+		Iterator iterator = queryResult.iterator();
 		while (iterator.hasNext()) {
 			IInstallableUnit unit = (IInstallableUnit) iterator.next();
-			IArtifactKey[] artifacts = unit.getArtifacts();
-			for (int i = 0; i < artifacts.length; i++) {
-				IArtifactKey key = artifacts[i];
-				File file = repo.getArtifactFile(key);
+			Collection/*<IArtifactKey>*/artifacts = unit.getArtifacts();
+			for (Iterator iterator2 = artifacts.iterator(); iterator2.hasNext();) {
+				File file = repo.getArtifactFile((IArtifactKey) iterator2.next());
 				if (file == null) {
 					// TODO: missing bundle
 				} else {
@@ -476,6 +521,30 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	}
 
 	/**
+	 * Queries the given given queryable and finds all feature group IUs.  The feature id/versions of the features
+	 * are cached in {@link #fFeatures}.
+	 * 
+	 * @param queryable profile/slicer/etc. to query for features
+	 */
+	private void queryForFeatures(IQueryable queryable) {
+		// Query for features, cache the result for calls to resolveFeatures()
+		// Get any IU with the group property, this will return any feature groups
+		IQuery featureQuery = QueryUtil.createMatchQuery("properties[$0] == $1", new Object[] {MetadataFactory.InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString()}); //$NON-NLS-1$
+		IQueryResult featureResult = queryable.query(featureQuery, null);
+		List features = new ArrayList();
+		for (Iterator iterator = featureResult.iterator(); iterator.hasNext();) {
+			IInstallableUnit unit = (IInstallableUnit) iterator.next();
+			String id = unit.getId();
+			if (id.endsWith(FEATURE_ID_SUFFIX)) {
+				id = id.substring(0, id.length() - FEATURE_ID_SUFFIX.length());
+			}
+			String version = unit.getVersion().toString();
+			features.add(new NameVersionDescriptor(id, version, NameVersionDescriptor.TYPE_FEATURE));
+		}
+		fFeatures = (NameVersionDescriptor[]) features.toArray(new NameVersionDescriptor[features.size()]);
+	}
+
+	/**
 	 * Returns the IU's this container references. Checks in the profile first to avoid
 	 * going out to repositories.
 	 * 
@@ -487,25 +556,29 @@ public class IUBundleContainer extends AbstractBundleContainer {
 		if (fUnits == null) {
 			fUnits = new IInstallableUnit[fIds.length];
 			for (int i = 0; i < fIds.length; i++) {
-				InstallableUnitQuery query = new InstallableUnitQuery(fIds[i], fVersions[i]);
-				Collector collector = profile.query(query, new Collector(), null);
-				if (collector.isEmpty()) {
+				IQuery query = QueryUtil.createIUQuery(fIds[i], fVersions[i]);
+				IQueryResult queryResult = profile.query(query, null);
+				if (queryResult.isEmpty()) {
 					// try repositories
 					URI[] repositories = resolveRepositories();
 					for (int j = 0; j < repositories.length; j++) {
-						IMetadataRepository repository = getRepository(repositories[j]);
-						collector = repository.query(query, new Collector(), null);
-						if (!collector.isEmpty()) {
-							break;
+						try {
+							IMetadataRepository repository = getRepository(repositories[j]);
+							queryResult = repository.query(query, null);
+							if (!queryResult.isEmpty()) {
+								break;
+							}
+						} catch (ProvisionException e) {
+							// Ignore and move on to the next site
 						}
 					}
 				}
-				if (collector.isEmpty()) {
+				if (queryResult.isEmpty()) {
 					// not found
 					fUnits = null;
 					throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.IUBundleContainer_1, fIds[i])));
 				}
-				fUnits[i] = (IInstallableUnit) collector.iterator().next();
+				fUnits[i] = (IInstallableUnit) queryResult.iterator().next();
 			}
 		}
 		return fUnits;
@@ -531,7 +604,10 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	 * @throws CoreException if none
 	 */
 	private IMetadataRepositoryManager getRepoManager() throws CoreException {
-		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) PDECore.getDefault().acquireService(IMetadataRepositoryManager.class.getName());
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_7));
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
 		if (manager == null) {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_2));
 		}
@@ -567,7 +643,10 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	 * @throws CoreException if none
 	 */
 	private IArtifactRepositoryManager getArtifactRepositoryManager() throws CoreException {
-		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) PDECore.getDefault().acquireService(IArtifactRepositoryManager.class.getName());
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_7));
+		IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.class.getName());
 		if (manager == null) {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_3));
 		}
@@ -581,7 +660,10 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	 * @throws CoreException if none
 	 */
 	private IEngine getEngine() throws CoreException {
-		IEngine engine = (IEngine) PDECore.getDefault().acquireService(IEngine.SERVICE_NAME);
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_7));
+		IEngine engine = (IEngine) agent.getService(IEngine.class.getName());
 		if (engine == null) {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_4));
 		}
@@ -595,13 +677,26 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	 * @throws CoreException if none
 	 */
 	private IPlanner getPlanner() throws CoreException {
-		IPlanner planner = (IPlanner) PDECore.getDefault().acquireService(IPlanner.class.getName());
+		IPlanner planner = (IPlanner) getAgent().getService(IPlanner.class.getName());
 		if (planner == null) {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_5));
 		}
 		return planner;
 	}
 
+	/**
+	 * Returns the provisioning agent.
+	 * 
+	 * @return provisioning agent
+	 * @throws CoreException if none
+	 */
+	private IProvisioningAgent getAgent() throws CoreException {
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_7));
+		return agent;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer#isContentEqual(org.eclipse.pde.internal.core.target.impl.AbstractBundleContainer)
 	 */
@@ -611,11 +706,34 @@ public class IUBundleContainer extends AbstractBundleContainer {
 			if (iuContainer.getIncludeAllRequired() == getIncludeAllRequired()) {
 				// include all targets only matters if include all required is turned off
 				if (getIncludeAllRequired() || iuContainer.getIncludeAllEnvironments() == getIncludeAllEnvironments()) {
-					if (isEqualOrNull(fIds, iuContainer.fIds) && isEqualOrNull(fVersions, iuContainer.fVersions) && isEqualOrNull(fRepos, iuContainer.fRepos)) {
-						return super.isContentEqual(container);
-					}
+					return isEqualOrNull(fIds, iuContainer.fIds) && isEqualOrNull(fVersions, iuContainer.fVersions) && isEqualOrNull(fRepos, iuContainer.fRepos);
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Returns whether the arrays have equal contents or are both <code>null</code>.
+	 * 
+	 * @param objects1
+	 * @param objects2
+	 * @return whether the arrays have equal contents or are both <code>null</code>
+	 */
+	private boolean isEqualOrNull(Object[] objects1, Object[] objects2) {
+		if (objects1 == null) {
+			return objects2 == null;
+		}
+		if (objects2 == null) {
+			return false;
+		}
+		if (objects1.length == objects2.length) {
+			for (int i = 0; i < objects1.length; i++) {
+				if (!objects1[i].equals(objects2[i])) {
+					return false;
 				}
 			}
+			return true;
 		}
 		return false;
 	}
@@ -729,6 +847,29 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	}
 
 	/**
+	 * Removes an installable unit from this container.  The container will no longer be resolved.
+	 *  
+	 * @param unit unit to remove from the list of root IUs
+	 */
+	public void removeInstallableUnit(IInstallableUnit unit) {
+		List newUnits = new ArrayList(fUnits.length);
+		for (int i = 0; i < fUnits.length; i++) {
+			if (!fUnits[i].equals(unit)) {
+				newUnits.add(fUnits[i]);
+			}
+		}
+		fUnits = (IInstallableUnit[]) newUnits.toArray(new IInstallableUnit[newUnits.size()]);
+		fIds = new String[fUnits.length];
+		fVersions = new Version[fUnits.length];
+		for (int i = 0; i < fUnits.length; i++) {
+			fIds[i] = fUnits[i].getId();
+			fVersions[i] = fUnits[i].getVersion();
+		}
+		// Need to mark the container as unresolved
+		clearResolutionStatus();
+	}
+
+	/**
 	 * Returns installable unit identifiers.
 	 * 
 	 * @return IU id's
@@ -745,4 +886,5 @@ public class IUBundleContainer extends AbstractBundleContainer {
 	Version[] getVersions() {
 		return fVersions;
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.java
index 8ebb11c..0d03252 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import org.eclipse.osgi.util.NLS;
  */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.pde.internal.core.target.Messages"; //$NON-NLS-1$
-	public static String AbstractBundleContainer_0;
 	public static String AbstractBundleContainer_1;
 	public static String AbstractBundleContainer_2;
 	public static String AbstractBundleContainer_3;
@@ -39,6 +38,8 @@ public class Messages extends NLS {
 	public static String IUBundleContainer_4;
 	public static String IUBundleContainer_5;
 	public static String IUBundleContainer_6;
+	public static String IUBundleContainer_7;
+	public static String IUBundleContainer_ProblemsLoadingRepositories;
 	public static String LoadTargetDefinitionJob_0;
 	public static String LoadTargetDefinitionJob_1;
 	public static String LoadTargetOperation_argsTaskName;
@@ -63,6 +64,7 @@ public class Messages extends NLS {
 	public static String TargetDefinition_3;
 	public static String TargetDefinition_4;
 	public static String TargetDefinition_5;
+	public static String TargetDefinition_RequiredFeatureCouldNotBeFound;
 	public static String TargetDefinitionPersistenceHelper_0;
 	public static String TargetDefinitionPersistenceHelper_1;
 	public static String TargetPlatformService_0;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.properties b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.properties
index 503f393..f067ee5 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/Messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
+# Copyright (c) 2009, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -9,7 +9,6 @@
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
-AbstractBundleContainer_0=Problems occurred while resolving plug-ins in the target
 AbstractBundleContainer_2=Optional plug-in with version {0} could not be found: {1}
 AbstractBundleContainer_3=Required plug-in could not be found: {0}
 AbstractBundleContainer_4=Optional plug-in could not be found: {0}
@@ -31,6 +30,8 @@ IUBundleContainer_3=Artifact respository service not found
 IUBundleContainer_4=Provisioning engine not found
 IUBundleContainer_5=Provisioning planner not found
 IUBundleContainer_6=Target provisioning skipped install plan.
+IUBundleContainer_7=Provisioning agent not found
+IUBundleContainer_ProblemsLoadingRepositories=Problems loading repositories
 LoadTargetDefinitionJob_0=Load Target Platform
 LoadTargetDefinitionJob_1=Unable to resolve plug-ins in target definition
 LoadTargetOperation_argsTaskName=Setting arguments
@@ -55,6 +56,7 @@ TargetDefinition_2=Problems occurred while resolving the target contents
 TargetDefinition_3=Error writing target definition
 TargetDefinition_4=Reading plug-ins
 TargetDefinition_5=Problems occurred getting the plug-ins in this container
+TargetDefinition_RequiredFeatureCouldNotBeFound=Required feature could not be found: {0}
 TargetDefinitionPersistenceHelper_0=The target file is in an invalid format and could not be opened.
 TargetDefinitionPersistenceHelper_1=Could not acquire the target platform service to initialize the target definition.
 TargetPlatformService_0=Unable to restore target memento
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/NameVersionDescriptor.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/NameVersionDescriptor.java
deleted file mode 100644
index c4e6aa9..0000000
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/NameVersionDescriptor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.core.target;
-
-/**
- * Describes something with a name and version.
- */
-public class NameVersionDescriptor {
-
-	private String fId;
-	private String fVersion;
-
-	/**
-	 * Constructs a descriptor.
-	 * 
-	 * @param id name identifier
-	 * @param version version identifier, can be <code>null</code>
-	 */
-	public NameVersionDescriptor(String id, String version) {
-		fId = id;
-		fVersion = version;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object obj) {
-		if (obj instanceof NameVersionDescriptor) {
-			NameVersionDescriptor iud = (NameVersionDescriptor) obj;
-			if (fId.equals(iud.fId)) {
-				return (fVersion != null && fVersion.equals(iud.fVersion)) || (fVersion == null && iud.fVersion == null);
-			}
-		}
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		return fId.hashCode() + (fVersion != null ? fVersion.hashCode() : 0);
-	}
-
-	public String getId() {
-		return fId;
-	}
-
-	public String getVersion() {
-		return fVersion;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
-	public String toString() {
-		StringBuffer buf = new StringBuffer();
-		buf.append(fId);
-		buf.append('_');
-		buf.append(fVersion);
-		return buf.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
index 8646635..7967dc6 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ProfileBundleContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,17 +10,18 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core.target;
 
-import java.io.File;
+import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.engine.EngineActivator;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.build.site.PluginPathFinder;
 import org.eclipse.pde.internal.core.P2Utils;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
 import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
 
@@ -31,6 +32,17 @@ import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
  */
 public class ProfileBundleContainer extends AbstractBundleContainer {
 
+	// The following constants are duplicated from org.eclipse.equinox.internal.p2.core.Activator
+	private static final String CONFIG_INI = "config.ini"; //$NON-NLS-1$
+	private static final String PROP_AGENT_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
+	private static final String PROP_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
+	private static final String PROP_CONFIG_DIR = "osgi.configuration.area"; //$NON-NLS-1$
+	private static final String PROP_USER_DIR = "user.dir"; //$NON-NLS-1$
+	private static final String PROP_USER_HOME = "user.home"; //$NON-NLS-1$
+	private static final String VAR_CONFIG_DIR = "@config.dir"; //$NON-NLS-1$
+	private static final String VAR_USER_DIR = "@user.dir"; //$NON-NLS-1$
+	private static final String VAR_USER_HOME = "@user.home"; //$NON-NLS-1$
+
 	/**
 	 * Constant describing the type of bundle container 
 	 */
@@ -142,6 +154,16 @@ public class ProfileBundleContainer extends AbstractBundleContainer {
 		return all;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.AbstractBundleContainer#resolveFeatures(org.eclipse.pde.internal.core.target.provisional.ITargetDefinition, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IFeatureModel[] resolveFeatures(ITargetDefinition definition, IProgressMonitor monitor) throws CoreException {
+		if (definition instanceof TargetDefinition) {
+			return ((TargetDefinition) definition).getFeatureModels(getLocation(false), monitor);
+		}
+		return new IFeatureModel[0];
+	}
+
 	/**
 	 * Resolves installed bundles based on update manager's platform XML.
 	 * 
@@ -193,7 +215,7 @@ public class ProfileBundleContainer extends AbstractBundleContainer {
 	 * if none.
 	 * 
 	 * @return configuration area URL or <code>null</code>
-	 * @throws CoreException if unable to generate a URL
+	 * @throws CoreException if unable to generate a URL or the user specified location does not exist
 	 */
 	private URL getConfigurationArea() throws CoreException {
 		IPath home = resolveHomeLocation();
@@ -210,6 +232,9 @@ public class ProfileBundleContainer extends AbstractBundleContainer {
 			} catch (MalformedURLException e) {
 				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.ProfileBundleContainer_1, home.toOSString()), e));
 			}
+		} else if (fConfiguration != null) {
+			// If the user specified config area does not exist throw an error
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.ProfileBundleContainer_2, configuration.toOSString())));
 		}
 		return null;
 	}
@@ -220,11 +245,116 @@ public class ProfileBundleContainer extends AbstractBundleContainer {
 	public boolean isContentEqual(AbstractBundleContainer container) {
 		if (container instanceof ProfileBundleContainer) {
 			ProfileBundleContainer pbc = (ProfileBundleContainer) container;
-			return fHome.equals(pbc.fHome) && isNullOrEqual(fConfiguration, fConfiguration) && super.isContentEqual(container);
+			return fHome.equals(pbc.fHome) && isNullOrEqual(pbc.fConfiguration, fConfiguration);
 		}
 		return false;
 	}
 
+	/**
+	 * Returns the location of the profile file that describes the installation this container represents or <code>null</code>
+	 * if no profile file could be determined.  This method checks the configuration file for a p2 data area entry and profile name
+	 * to determine where the profile is located.
+	 * <p>
+	 * Note that when self hosting, the returned profile location will not have all running plug-ins installed unless the launch has generated
+	 * a complete profile.
+	 * </p>
+	 * 
+	 * @return the profile file or <code>null</code>
+	 */
+	public File getProfileFileLocation() throws CoreException {
+		// Get the configuration location
+		String home = resolveHomeLocation().toOSString();
+		if (!new File(home).isDirectory()) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.ProfileBundleContainer_0, home)));
+		}
+		File configArea = null;
+		URL configURL = getConfigurationArea();
+		if (configURL != null) {
+			configArea = new File(configURL.getFile());
+		} else {
+			configArea = new File(home);
+		}
+		if (!configArea.isDirectory()) {
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, NLS.bind(Messages.ProfileBundleContainer_2, configArea)));
+		}
+
+		// Location of the profile
+		File p2DataArea = null;
+		String profileName = null;
+
+		// Load the config.ini to try and find the backing profile
+		File configIni = new File(configArea, CONFIG_INI);
+		if (configIni.isFile()) {
+			// Read config.ini
+			Properties configProps = new Properties();
+			FileInputStream fis = null;
+			try {
+				fis = new FileInputStream(configIni);
+				configProps.load(fis);
+				fis.close();
+			} catch (IOException e) {
+				PDECore.log(e);
+			} finally {
+				try {
+					if (fis != null)
+						fis.close();
+				} catch (IOException e) {
+				}
+			}
+
+			String p2Area = configProps.getProperty(PROP_AGENT_DATA_AREA);
+			if (p2Area != null) {
+				if (p2Area.startsWith(VAR_USER_HOME)) {
+					String base = substituteVar(configProps, p2Area, VAR_USER_HOME, PROP_USER_HOME, configArea);
+					p2Area = new Path(base).toFile().getAbsolutePath();
+				} else if (p2Area.startsWith(VAR_USER_DIR)) {
+					String base = substituteVar(configProps, p2Area, VAR_USER_DIR, PROP_USER_DIR, configArea);
+					p2Area = new Path(base).toFile().getAbsolutePath();
+				} else if (p2Area.startsWith(VAR_CONFIG_DIR)) {
+					String base = substituteVar(configProps, p2Area, VAR_CONFIG_DIR, PROP_CONFIG_DIR, configArea);
+					p2Area = new Path(base).toFile().getAbsolutePath();
+				}
+				p2DataArea = new File(p2Area);
+			}
+
+			profileName = configProps.getProperty(PROP_PROFILE);
+		}
+
+		if (p2DataArea == null || !p2DataArea.isDirectory()) {
+			p2DataArea = new File(configArea, "p2"); //$NON-NLS-1$
+		}
+
+		if (profileName == null || profileName.length() == 0) {
+			profileName = "SDKProfile"; //$NON-NLS-1$
+		}
+
+		IPath profilePath = new Path(p2DataArea.getAbsolutePath());
+		profilePath = profilePath.append(EngineActivator.ID).append("profileRegistry").append(profileName + ".profile"); //$NON-NLS-1$ //$NON-NLS-2$
+		File profile = profilePath.toFile();
+
+		if (profile.exists()) {
+			return profile;
+		}
+
+		return null;
+	}
+
+	/**
+	 * Replaces a variable in config.ini
+	 * @param props properties containing entries from the 
+	 * @param source the string to replace the var in
+	 * @param var the variable to replace
+	 * @param prop the property to lookup for a replacement value
+	 * @param defaultValue value to use if the property can't be found
+	 * @return source string with the variable replaced with the proper value
+	 */
+	private String substituteVar(Properties props, String source, String var, String prop, File defaultValue) {
+		String value = props.getProperty(prop);
+		if (value == null)
+			value = defaultValue.getAbsolutePath();
+		return value + source.substring(var.length());
+	}
+
 	private boolean isNullOrEqual(Object o1, Object o2) {
 		if (o1 == null) {
 			return o2 == null;
@@ -239,7 +369,7 @@ public class ProfileBundleContainer extends AbstractBundleContainer {
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-		return new StringBuffer().append("Installation ").append(fHome).append(' ').append(fConfiguration == null ? "Default Configuration" : fConfiguration).append(' ').append(getIncludedBundles() == null ? "All" : Integer.toString(getIncludedBundles().length)).append(" included").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		return new StringBuffer().append("Installation ").append(fHome).append(' ').append(fConfiguration == null ? "Default Configuration" : fConfiguration).toString(); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ResolvedBundle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ResolvedBundle.java
index 69fcfd3..baa7462 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ResolvedBundle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/ResolvedBundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,7 @@ package org.eclipse.pde.internal.core.target;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
 import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
 
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
index 86d8d23..db304fe 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinition.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,13 +15,22 @@ import java.util.*;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerException;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
 import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.ExternalFeatureModelManager;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.IFeaturePlugin;
 import org.eclipse.pde.internal.core.target.provisional.*;
 import org.xml.sax.SAXException;
 
@@ -35,6 +44,10 @@ public class TargetDefinition implements ITargetDefinition {
 	// name and description
 	private String fName;
 
+	// included and optional filtering
+	private NameVersionDescriptor[] fIncluded;
+	private NameVersionDescriptor[] fOptional;
+
 	// arguments
 	private String fProgramArgs;
 	private String fVMArgs;
@@ -53,7 +66,19 @@ public class TargetDefinition implements ITargetDefinition {
 	private ITargetHandle fHandle;
 
 	// implicit dependencies
-	private BundleInfo[] fImplicit;
+	private NameVersionDescriptor[] fImplicit;
+
+	// internal settings for UI mode (how content is displayed to the user
+	private int fUIMode = MODE_PLUGIN;
+	public static final int MODE_PLUGIN = 0;
+	public static final int MODE_FEATURE = 1;
+
+	// cache of features found for a given location, maps a string path location to a array of IFeatureModels (IFeatureModel[])
+	private Map fFeaturesInLocation = new HashMap();
+
+	// internal cache for features.  A target managed by features will contain a set of features as well as a set of plug-ins that don't belong to a feature
+	private IFeatureModel[] fFeatureModels;
+	private IResolvedBundle[] fOtherBundles;
 
 	/**
 	 * Constructs a target definition based on the given handle. 
@@ -177,10 +202,20 @@ public class TargetDefinition implements ITargetDefinition {
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#setBundleContainers(org.eclipse.pde.internal.core.target.provisional.IBundleContainer[])
 	 */
 	public void setBundleContainers(IBundleContainer[] containers) {
+		// Clear the feature model cache as it is based on the bundle container locations
+		fFeatureModels = null;
+		fOtherBundles = null;
+
 		if (containers != null && containers.length == 0) {
 			containers = null;
 		}
+
 		fContainers = containers;
+
+		if (containers == null) {
+			fIncluded = null;
+			fOptional = null;
+		}
 	}
 
 	/* (non-Javadoc)
@@ -242,14 +277,25 @@ public class TargetDefinition implements ITargetDefinition {
 		if (isResolved()) {
 			IBundleContainer[] containers = getBundleContainers();
 			if (containers != null) {
+				// Check if the containers have any resolution problems
 				MultiStatus result = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.TargetDefinition_5, null);
 				for (int i = 0; i < containers.length; i++) {
 					IBundleContainer container = containers[i];
-					IStatus containerStatus = container.getBundleStatus();
-					if (containerStatus != null) {
+					IStatus containerStatus = container.getStatus();
+					if (containerStatus != null && !containerStatus.isOK()) {
 						result.add(containerStatus);
 					}
 				}
+
+				// Check if any of the included bundles have problems
+				// build status from bundle list
+				IResolvedBundle[] bundles = getBundles();
+				for (int i = 0; i < bundles.length; i++) {
+					if (!bundles[i].getStatus().isOK()) {
+						result.add(bundles[i].getStatus());
+					}
+				}
+
 				if (result.isOK()) {
 					// Return generic ok status instead of problem multi-status with no children
 					return Status.OK_STATUS;
@@ -262,6 +308,35 @@ public class TargetDefinition implements ITargetDefinition {
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#setIncluded(org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor[])
+	 */
+	public void setIncluded(NameVersionDescriptor[] included) {
+		fIncluded = included;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getIncluded()
+	 */
+	public NameVersionDescriptor[] getIncluded() {
+		return fIncluded;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#setOptional(org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor[])
+	 */
+	public void setOptional(NameVersionDescriptor[] optional) {
+		fOptional = optional;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getOptional()
+	 */
+	public NameVersionDescriptor[] getOptional() {
+		return fOptional;
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getBundles()
 	 */
 	public IResolvedBundle[] getBundles() {
@@ -289,24 +364,243 @@ public class TargetDefinition implements ITargetDefinition {
 				List all = new ArrayList();
 				for (int i = 0; i < containers.length; i++) {
 					IBundleContainer container = containers[i];
-					IResolvedBundle[] bundles = null;
-					if (allBundles) {
-						bundles = container.getAllBundles();
-					} else {
-						bundles = container.getBundles();
-					}
+					IResolvedBundle[] bundles = container.getBundles();
 					for (int j = 0; j < bundles.length; j++) {
 						IResolvedBundle rb = bundles[j];
 						all.add(rb);
 					}
 				}
-				return (IResolvedBundle[]) all.toArray(new IResolvedBundle[all.size()]);
+
+				IResolvedBundle[] allResolvedBundles = (IResolvedBundle[]) all.toArray(new IResolvedBundle[all.size()]);
+				if (allBundles) {
+					return allResolvedBundles;
+				}
+				return filterBundles(allResolvedBundles, getIncluded());
 			}
 			return new IResolvedBundle[0];
 		}
 		return null;
 	}
 
+	private IResolvedBundle[] filterBundles(IResolvedBundle[] bundles, NameVersionDescriptor[] filter) {
+		if (filter == null) {
+			// All bundles are included, but still need to check for optional bundles
+			IBundleContainer parent = fContainers != null && fContainers.length > 0 ? fContainers[0] : null;
+			List resolved = getMatchingBundles(bundles, null, fOptional, parent);
+			return (IResolvedBundle[]) resolved.toArray(new IResolvedBundle[resolved.size()]);
+		}
+		if (filter.length == 0) {
+			return new IResolvedBundle[0];
+		}
+
+		// If there are features, don't set errors for missing bundles as they are caused by missing OS specific fragments
+		boolean containsFeatures = false;
+
+		// If there are any included features that are missing, add errors as resolved bundles (the same thing we would do for missing bundles)
+		List missingFeatures = new ArrayList();
+
+		List included = new ArrayList();
+		// For feature filters, get the list of included bundles, for bundle filters just add them to the list
+		for (int i = 0; i < filter.length; i++) {
+			if (filter[i].getType() == NameVersionDescriptor.TYPE_PLUGIN) {
+				included.add(filter[i]);
+			} else if (filter[i].getType() == NameVersionDescriptor.TYPE_FEATURE) {
+				containsFeatures = true;
+				IFeatureModel[] features = getAllFeatures();
+				IFeatureModel bestMatch = null;
+				for (int j = 0; j < features.length; j++) {
+					if (features[j].getFeature().getId().equals(filter[i].getId())) {
+						if (filter[i].getVersion() != null) {
+							// Try to find an exact feature match
+							if (filter[i].getVersion().equals(features[j].getFeature().getVersion())) {
+								// Exact match
+								bestMatch = features[j];
+								break;
+							}
+						} else if (bestMatch != null) {
+							// If no version specified take the highest version
+							Version v1 = Version.parseVersion(features[j].getFeature().getVersion());
+							Version v2 = Version.parseVersion(bestMatch.getFeature().getVersion());
+							if (v1.compareTo(v2) > 0) {
+								bestMatch = features[j];
+							}
+						}
+
+						if (bestMatch == null) {
+							// If we can't find a version match, just take any name match
+							bestMatch = features[j];
+						}
+					}
+				}
+
+				// Add the required plugins from the feature to the list of includes
+				if (bestMatch != null) {
+					IFeaturePlugin[] plugins = bestMatch.getFeature().getPlugins();
+					for (int j = 0; j < plugins.length; j++) {
+						included.add(new NameVersionDescriptor(plugins[j].getId(), plugins[j].getVersion()));
+					}
+				} else {
+					missingFeatures.add(filter[i]);
+				}
+			}
+		}
+
+		// Return matching bundles
+		IBundleContainer parent = fContainers != null && fContainers.length > 0 ? fContainers[0] : null;
+		List result = getMatchingBundles(bundles, (NameVersionDescriptor[]) included.toArray(new NameVersionDescriptor[included.size()]), fOptional, containsFeatures ? null : parent);
+
+		// Add in missing features as resolved bundles with error statuses
+		if (containsFeatures && !missingFeatures.isEmpty()) {
+			for (Iterator iterator = missingFeatures.iterator(); iterator.hasNext();) {
+				NameVersionDescriptor missing = (NameVersionDescriptor) iterator.next();
+				BundleInfo info = new BundleInfo(missing.getId(), missing.getVersion(), null, BundleInfo.NO_LEVEL, false);
+				String message = NLS.bind(Messages.TargetDefinition_RequiredFeatureCouldNotBeFound, missing.getId());
+				Status status = new Status(IStatus.ERROR, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_FEATURE_DOES_NOT_EXIST, message, null);
+				result.add(new ResolvedBundle(info, parent, status, null, false, false));
+			}
+		}
+
+		return (IResolvedBundle[]) result.toArray(new IResolvedBundle[result.size()]);
+	}
+
+	/**
+	 * Returns bundles from the specified collection that match the symbolic names
+	 * and/or version in the specified criteria. When no version is specified
+	 * the newest version (if any) is selected.
+	 * <p>
+	 * If a parent error container is specified, bundles listed in the included and optional filters that
+	 * are not found in the given collection will be added as IResolvedBundles with error statuses explaining
+	 * the problem.  If no parent container is specified, missing included and optional bundles will be ignored.
+	 * </p> 
+	 * @param collection bundles to resolve against match criteria
+	 * @param included bundles to include or <code>null</code> if no restrictions
+	 * @param optional optional bundles or <code>null</code> of no optional bundles
+	 * @param errorParentContainer 
+	 * 
+	 * @return list of IResolvedBundle bundles that match this container's restrictions
+	 */
+	static List getMatchingBundles(IResolvedBundle[] collection, NameVersionDescriptor[] included, NameVersionDescriptor[] optional, IBundleContainer errorParentContainer) {
+		if (included == null && optional == null) {
+			ArrayList result = new ArrayList();
+			result.addAll(Arrays.asList(collection));
+			return result;
+		}
+		// map bundles names to available versions
+		Map bundleMap = new HashMap(collection.length);
+		for (int i = 0; i < collection.length; i++) {
+			IResolvedBundle resolved = collection[i];
+			List list = (List) bundleMap.get(resolved.getBundleInfo().getSymbolicName());
+			if (list == null) {
+				list = new ArrayList(3);
+				bundleMap.put(resolved.getBundleInfo().getSymbolicName(), list);
+			}
+			list.add(resolved);
+		}
+		List resolved = new ArrayList();
+		if (included == null) {
+			for (int i = 0; i < collection.length; i++) {
+				resolved.add(collection[i]);
+			}
+		} else {
+			for (int i = 0; i < included.length; i++) {
+				BundleInfo info = new BundleInfo(included[i].getId(), included[i].getVersion(), null, BundleInfo.NO_LEVEL, false);
+				IResolvedBundle bundle = resolveBundle(bundleMap, info, false, errorParentContainer);
+				if (bundle != null) {
+					resolved.add(bundle);
+				}
+			}
+		}
+		if (optional != null) {
+			for (int i = 0; i < optional.length; i++) {
+				BundleInfo option = new BundleInfo(optional[i].getId(), optional[i].getVersion(), null, BundleInfo.NO_LEVEL, false);
+				IResolvedBundle resolveBundle = resolveBundle(bundleMap, option, true, errorParentContainer);
+				if (resolveBundle != null) {
+					IStatus status = resolveBundle.getStatus();
+					if (status.isOK()) {
+						// add to list if not there already
+						if (!resolved.contains(resolveBundle)) {
+							resolved.add(resolveBundle);
+						}
+					} else {
+						// missing optional bundle - add it to the list
+						resolved.add(resolveBundle);
+					}
+				}
+			}
+		}
+		return resolved;
+	}
+
+	/**
+	 * Resolves a bundle for the given info from the given map. The map contains
+	 * keys of symbolic names and values are lists of {@link IResolvedBundle}'s available
+	 * that match the names.
+	 * <p>
+	 * If an parent container for errors is provided, if a resolve bundle matching the requirements cannot be found
+	 * a IResolvedBundle will be returned containing an status.  If no parent container is specified,
+	 * missing bundles will result in a return value of <code>null</code>
+	 * </p>
+	 * 
+	 * @param bundleMap available bundles to resolve against
+	 * @param info name and version to match against
+	 * @param optional whether the bundle is optional
+	 * @param errorParentContainer bundle container the resolved bundle belongs too
+	 * @return resolved bundle or <code>null</code>
+	 */
+	private static IResolvedBundle resolveBundle(Map bundleMap, BundleInfo info, boolean optional, IBundleContainer errorParentContainer) {
+		List list = (List) bundleMap.get(info.getSymbolicName());
+		if (list != null) {
+			String version = info.getVersion();
+			if (version == null || version.equals(BundleInfo.EMPTY_VERSION)) {
+				// select newest
+				if (list.size() > 1) {
+					// sort the list
+					Collections.sort(list, new Comparator() {
+						public int compare(Object o1, Object o2) {
+							BundleInfo b1 = ((IResolvedBundle) o1).getBundleInfo();
+							BundleInfo b2 = ((IResolvedBundle) o2).getBundleInfo();
+							return b1.getVersion().compareTo(b2.getVersion());
+						}
+					});
+				}
+				// select the last one
+				ResolvedBundle rb = (ResolvedBundle) list.get(list.size() - 1);
+				rb.setOptional(optional);
+				return rb;
+			}
+			Iterator iterator = list.iterator();
+			while (iterator.hasNext()) {
+				IResolvedBundle bundle = (IResolvedBundle) iterator.next();
+				if (bundle.getBundleInfo().getVersion().equals(version)) {
+					((ResolvedBundle) bundle).setOptional(optional);
+					return bundle;
+				}
+			}
+			// VERSION DOES NOT EXIST
+			if (errorParentContainer == null) {
+				return null;
+			}
+			int sev = IStatus.ERROR;
+			String message = NLS.bind(Messages.AbstractBundleContainer_1, new Object[] {info.getVersion(), info.getSymbolicName()});
+			if (optional) {
+				sev = IStatus.INFO;
+				message = NLS.bind(Messages.AbstractBundleContainer_2, new Object[] {info.getVersion(), info.getSymbolicName()});
+			}
+			return new ResolvedBundle(info, errorParentContainer, new Status(sev, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_VERSION_DOES_NOT_EXIST, message, null), null, optional, false);
+		}
+		// DOES NOT EXIST
+		if (errorParentContainer == null) {
+			return null;
+		}
+		int sev = IStatus.ERROR;
+		String message = NLS.bind(Messages.AbstractBundleContainer_3, info.getSymbolicName());
+		if (optional) {
+			sev = IStatus.INFO;
+			message = NLS.bind(Messages.AbstractBundleContainer_4, info.getSymbolicName());
+		}
+		return new ResolvedBundle(info, errorParentContainer, new Status(sev, PDECore.PLUGIN_ID, IResolvedBundle.STATUS_PLUGIN_DOES_NOT_EXIST, message, null), null, optional, false);
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getHandle()
 	 */
@@ -375,28 +669,14 @@ public class TargetDefinition implements ITargetDefinition {
 	/* (non-Javadoc)
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getImplicitDependencies()
 	 */
-	public BundleInfo[] getImplicitDependencies() {
+	public NameVersionDescriptor[] getImplicitDependencies() {
 		return fImplicit;
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getResolvedImplicitDependencies()
-	 */
-	public IResolvedBundle[] getResolvedImplicitDependencies() {
-		int size = 0;
-		if (fImplicit != null) {
-			size = fImplicit.length;
-		}
-		if (size == 0) {
-			return new IResolvedBundle[0];
-		}
-		return AbstractBundleContainer.getMatchingBundles(getBundles(), fImplicit, null, null);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#setImplicitDependencies(org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo[])
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#setImplicitDependencies(org.eclipse.pde.internal.core.target.provisional.NameVersionDescriptor[])
 	 */
-	public void setImplicitDependencies(BundleInfo[] bundles) {
+	public void setImplicitDependencies(NameVersionDescriptor[] bundles) {
 		if (bundles != null && bundles.length == 0) {
 			bundles = null;
 		}
@@ -425,11 +705,15 @@ public class TargetDefinition implements ITargetDefinition {
 	 */
 	public boolean isContentEqual(ITargetDefinition definition) {
 		if (isNullOrEqual(getName(), definition.getName()) && isNullOrEqual(getArch(), definition.getArch()) && isNullOrEqual(getNL(), definition.getNL()) && isNullOrEqual(getOS(), definition.getOS()) && isNullOrEqual(getWS(), definition.getWS()) && isNullOrEqual(getProgramArguments(), definition.getProgramArguments()) && isNullOrEqual(getVMArguments(), definition.getVMArguments()) && isNullOrEqual(getJREContainer(), definition.getJREContainer())) {
-			// check containers and implicit dependencies
-			IBundleContainer[] c1 = getBundleContainers();
-			IBundleContainer[] c2 = definition.getBundleContainers();
-			if (areContainersEqual(c1, c2)) {
-				return areEqual(getImplicitDependencies(), definition.getImplicitDependencies());
+			// Check includes/optional
+			if (isNullOrEqual(getIncluded(), definition.getIncluded()) && isNullOrEqual(getOptional(), definition.getOptional())) {
+				// Check containers
+				IBundleContainer[] c1 = getBundleContainers();
+				IBundleContainer[] c2 = definition.getBundleContainers();
+				if (areContainersEqual(c1, c2)) {
+					// Check implicit dependencies
+					return isNullOrEqual(getImplicitDependencies(), definition.getImplicitDependencies());
+				}
 			}
 		}
 		return false;
@@ -445,30 +729,16 @@ public class TargetDefinition implements ITargetDefinition {
 	 */
 	public boolean isContentEquivalent(ITargetDefinition definition) {
 		if (isNullOrEqual(getArch(), definition.getArch()) && isNullOrEqual(getNL(), definition.getNL()) && isNullOrEqual(getOS(), definition.getOS()) && isNullOrEqual(getWS(), definition.getWS()) && isArgsNullOrEqual(getProgramArguments(), definition.getProgramArguments()) && isArgsNullOrEqual(getVMArguments(), definition.getVMArguments()) && isNullOrEqual(getJREContainer(), definition.getJREContainer())) {
-			// check containers and implicit dependencies
-			IBundleContainer[] c1 = getBundleContainers();
-			IBundleContainer[] c2 = definition.getBundleContainers();
-			if (areContainersEqual(c1, c2)) {
-				return areEqual(getImplicitDependencies(), definition.getImplicitDependencies());
-			}
-		}
-		return false;
-	}
-
-	private boolean areEqual(BundleInfo[] c1, BundleInfo[] c2) {
-		if (c1 == null) {
-			return c2 == null;
-		}
-		if (c2 == null) {
-			return false;
-		}
-		if (c1.length == c2.length) {
-			for (int i = 0; i < c2.length; i++) {
-				if (!c1[i].equals(c2[i])) {
-					return false;
+			// Check includes/optional
+			if (isNullOrEqual(getIncluded(), definition.getIncluded()) && isNullOrEqual(getOptional(), definition.getOptional())) {
+				// Check containers
+				IBundleContainer[] c1 = getBundleContainers();
+				IBundleContainer[] c2 = definition.getBundleContainers();
+				if (areContainersEqual(c1, c2)) {
+					// Check implicit dependencies
+					return isNullOrEqual(getImplicitDependencies(), definition.getImplicitDependencies());
 				}
 			}
-			return true;
 		}
 		return false;
 	}
@@ -483,6 +753,31 @@ public class TargetDefinition implements ITargetDefinition {
 		return o1.equals(o2);
 	}
 
+	/**
+	 * Returns whether the arrays have equal contents or are both <code>null</code>.
+	 * 
+	 * @param objects1
+	 * @param objects2
+	 * @return whether the arrays have equal contents or are both <code>null</code>
+	 */
+	private boolean isNullOrEqual(Object[] objects1, Object[] objects2) {
+		if (objects1 == null) {
+			return objects2 == null;
+		}
+		if (objects2 == null) {
+			return false;
+		}
+		if (objects1.length == objects2.length) {
+			for (int i = 0; i < objects1.length; i++) {
+				if (!objects1[i].equals(objects2[i])) {
+					return false;
+				}
+			}
+			return true;
+		}
+		return false;
+	}
+
 	private boolean isArgsNullOrEqual(String args1, String args2) {
 		if (args1 == null) {
 			return args2 == null;
@@ -545,25 +840,6 @@ public class TargetDefinition implements ITargetDefinition {
 	}
 
 	/**
-	 * Returns the existing profile for this target definition or <code>null</code> if none.
-	 *  
-	 * @return profile or <code>null</code>
-	 */
-	public IProfile findProfile() {
-		IProfileRegistry registry = AbstractTargetHandle.getProfileRegistry();
-		if (registry != null) {
-			AbstractTargetHandle handle = ((AbstractTargetHandle) getHandle());
-			String id;
-			try {
-				id = handle.getProfileId();
-				return registry.getProfile(id);
-			} catch (CoreException e) {
-			}
-		}
-		return null;
-	}
-
-	/**
 	 * Returns whether software site containers are configured to provision for all environments
 	 * versus a single environment.
 	 * 
@@ -659,8 +935,9 @@ public class TargetDefinition implements ITargetDefinition {
 			if (!recreate) {
 				// check top level IU's. If any have been removed from the containers that are
 				// still in the profile, we need to recreate (rather than uninstall)
-				Collector collector = profile.query(new IUProfilePropertyQuery(profile, AbstractTargetHandle.PROP_INSTALLED_IU, Boolean.toString(true)), new Collector(), null);
-				Iterator iterator = collector.iterator();
+				IUProfilePropertyQuery propertyQuery = new IUProfilePropertyQuery(AbstractTargetHandle.PROP_INSTALLED_IU, Boolean.toString(true));
+				IQueryResult queryResult = profile.query(propertyQuery, null);
+				Iterator iterator = queryResult.iterator();
 				if (iterator.hasNext()) {
 					Set installedIUs = new HashSet();
 					while (iterator.hasNext()) {
@@ -710,6 +987,172 @@ public class TargetDefinition implements ITargetDefinition {
 	}
 
 	/**
+	 * Returns a set of feature models that exist in the provided location.  If
+	 * the locationPath is <code>null</code> the default target platform location
+	 * will be used.  The locationPath string may container string variables which
+	 * will be resolved.  This target definition may cache the feature models for
+	 * faster retrieval. 
+	 * 
+	 * TODO When to clear the cache
+	 * 
+	 * @param locationPath string path to the directory containing features.  May container string variables or be <code>null</code>
+	 * @return list of feature models found in the location, possible empty 
+	 * @param monitor progress monitor
+	 * @throws CoreException if there is a problem substituting a string variable
+	 */
+	public IFeatureModel[] getFeatureModels(String locationPath, IProgressMonitor monitor) throws CoreException {
+		String path = locationPath;
+		if (path == null) {
+			path = TargetPlatform.getDefaultLocation();
+		} else {
+			IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
+			path = manager.performStringSubstitution(path);
+		}
+
+		IFeatureModel[] models = null;
+		if (fFeaturesInLocation != null) {
+			models = (IFeatureModel[]) fFeaturesInLocation.get(path);
+		}
+
+		if (models != null) {
+			return models; /*(IFeatureModel[])models.toArray(new IFeatureModel[models.size()]);*/
+		}
+
+		models = ExternalFeatureModelManager.createModels(path, new ArrayList(), monitor);
+		fFeaturesInLocation.put(path, models);
+		return models;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetDefinition#getAllFeatures()
+	 */
+	public IFeatureModel[] getAllFeatures() {
+		if (!isResolved()) {
+			return null;
+		}
+
+		if (fFeatureModels != null) {
+			return fFeatureModels;
+		}
+
+		IBundleContainer[] containers = getBundleContainers();
+
+		ArrayList features = new ArrayList();
+		// secondary containers are considered additional
+		if (containers != null && containers.length > 0) {
+			for (int i = 0; i < containers.length; i++) {
+				IFeatureModel[] currentFeatures = containers[i].getFeatures();
+				if (currentFeatures != null && currentFeatures.length > 0) {
+					features.addAll(Arrays.asList(currentFeatures));
+				}
+			}
+		}
+
+		fFeatureModels = (IFeatureModel[]) features.toArray(new IFeatureModel[features.size()]);
+		return fFeatureModels;
+	}
+
+	/**
+	 * Returns the set of IResolvedBundle available in this target that are not part of any features, will return a cached copy if available
+	 * 
+	 * @see #getAllFeatures()
+	 * @return set of resolved bundles available in this target that don't belong to any features, possibly empty
+	 */
+	public IResolvedBundle[] getOtherBundles() {
+		if (!isResolved()) {
+			return null;
+		}
+
+		if (fOtherBundles != null) {
+			return fOtherBundles;
+		}
+
+		IResolvedBundle[] allBundles = getAllBundles();
+		Map remaining = new HashMap();
+		for (int i = 0; i < allBundles.length; i++) {
+			remaining.put(allBundles[i].getBundleInfo().getSymbolicName(), allBundles[i]);
+		}
+
+		IFeatureModel[] features = getAllFeatures();
+		for (int i = 0; i < features.length; i++) {
+			IFeaturePlugin[] plugins = features[i].getFeature().getPlugins();
+			for (int j = 0; j < plugins.length; j++) {
+				remaining.remove(plugins[j].getId());
+			}
+		}
+
+		Collection values = remaining.values();
+		fOtherBundles = (IResolvedBundle[]) values.toArray(new IResolvedBundle[values.size()]);
+		return fOtherBundles;
+	}
+
+	/**
+	 * Convenience method to return the set of IFeatureModels that are included in this
+	 * target as well as any other included plug-ins as IResolvedBundles (that are not part 
+	 * of the features). Also returns any bundles with error statuses.  Will return <code>null</code> 
+	 * if this target has not been resolved.
+	 * 
+	 * @see #getAllFeatures()
+	 * @see #getOtherBundles()
+	 * @return set of IFeatureModels and IResolvedBundles or <code>null</code>
+	 */
+	public Set getFeaturesAndBundles() {
+		if (!isResolved()) {
+			return null;
+		}
+
+		IFeatureModel[] allFeatures = getAllFeatures();
+		IResolvedBundle[] allExtraBundles = getOtherBundles();
+
+		NameVersionDescriptor[] included = getIncluded();
+		NameVersionDescriptor[] optional = getOptional();
+
+		if (included == null && optional == null) {
+			Set result = new HashSet();
+			result.addAll(Arrays.asList(allFeatures));
+			result.addAll(Arrays.asList(allExtraBundles));
+			return result;
+		}
+
+		Set result = new HashSet();
+		for (int i = 0; i < included.length; i++) {
+			if (included[i].getType() == NameVersionDescriptor.TYPE_PLUGIN) {
+				for (int j = 0; j < allExtraBundles.length; j++) {
+					if (allExtraBundles[j].getBundleInfo().getSymbolicName().equals(included[i].getId())) {
+						result.add(allExtraBundles[j]);
+					}
+				}
+			} else if (included[i].getType() == NameVersionDescriptor.TYPE_FEATURE) {
+				for (int j = 0; j < allFeatures.length; j++) {
+					if (allFeatures[j].getFeature().getId().equals(included[i].getId())) {
+						result.add(allFeatures[j]);
+					}
+				}
+			}
+		}
+
+		if (optional != null) {
+			for (int i = 0; i < optional.length; i++) {
+				for (int j = 0; j < allExtraBundles.length; j++) {
+					if (allExtraBundles[j].getBundleInfo().getSymbolicName().equals(optional[i].getId())) {
+						result.add(allExtraBundles[j]);
+					}
+				}
+			}
+		}
+
+		return result;
+	}
+
+	public int getUIMode() {
+		return fUIMode;
+	}
+
+	public void setUIMode(int mode) {
+		fUIMode = mode;
+	}
+
+	/**
 	 * Generates the environment properties string for this target definition's p2 profile.
 	 * 
 	 * @return environment properties
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinitionPersistenceHelper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinitionPersistenceHelper.java
index 6e7dac3..7270784 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinitionPersistenceHelper.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetDefinitionPersistenceHelper.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,22 +12,17 @@ package org.eclipse.pde.internal.core.target;
 
 import java.io.*;
 import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 import javax.xml.parsers.*;
 import javax.xml.transform.*;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.core.Version;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.target.provisional.*;
-import org.eclipse.pde.internal.core.util.VMUtil;
 import org.w3c.dom.*;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -43,145 +38,47 @@ public class TargetDefinitionPersistenceHelper {
 	/**
 	 * Constants for XML element names and attributes
 	 */
-	private static final String ROOT = "target"; //$NON-NLS-1$
-	private static final String ATTR_NAME = "name"; //$NON-NLS-1$
-	private static final String LOCATIONS = "locations"; //$NON-NLS-1$
-	private static final String LOCATION = "location"; //$NON-NLS-1$
-	private static final String ATTR_LOCATION_PATH = "path"; //$NON-NLS-1$
-	private static final String ATTR_LOCATION_TYPE = "type"; //$NON-NLS-1$
-	private static final String ATTR_USE_DEFAULT = "useDefault"; //$NON-NLS-1$
-	private static final String INCLUDE_BUNDLES = "includeBundles"; //$NON-NLS-1$
-	private static final String OPTIONAL_BUNDLES = "optionalBundles"; //$NON-NLS-1$
-	private static final String ENVIRONMENT = "environment"; //$NON-NLS-1$
-	private static final String OS = "os"; //$NON-NLS-1$
-	private static final String WS = "ws"; //$NON-NLS-1$
-	private static final String ARCH = "arch"; //$NON-NLS-1$
-	private static final String NL = "nl"; //$NON-NLS-1$
-	private static final String TARGET_JRE = "targetJRE"; //$NON-NLS-1$
-	private static final String EXEC_ENV = "execEnv"; //$NON-NLS-1$
-	private static final String JRE_NAME = "jreName"; //$NON-NLS-1$
-	private static final String ARGUMENTS = "launcherArgs"; //$NON-NLS-1$
-	private static final String PROGRAM_ARGS = "programArgs"; //$NON-NLS-1$
-	private static final String VM_ARGS = "vmArgs"; //$NON-NLS-1$
-	private static final String IMPLICIT = "implicitDependencies"; //$NON-NLS-1$
-	private static final String PLUGIN = "plugin"; //$NON-NLS-1$
-	private static final String PDE_INSTRUCTION = "pde"; //$NON-NLS-1$
-	private static final String ATTR_ID = "id"; //$NON-NLS-1$
-	private static final String INSTALLABLE_UNIT = "unit"; //$NON-NLS-1$
-	private static final String REPOSITORY = "repository"; //$NON-NLS-1$
-	private static final String ATTR_INCLUDE_MODE = "includeMode"; //$NON-NLS-1$
+	static final String ROOT = "target"; //$NON-NLS-1$
+	static final String ATTR_NAME = "name"; //$NON-NLS-1$
+	static final String LOCATIONS = "locations"; //$NON-NLS-1$
+	static final String LOCATION = "location"; //$NON-NLS-1$
+	static final String ATTR_LOCATION_PATH = "path"; //$NON-NLS-1$
+	static final String ATTR_LOCATION_TYPE = "type"; //$NON-NLS-1$
+	static final String ATTR_USE_DEFAULT = "useDefault"; //$NON-NLS-1$
+	static final String INCLUDE_BUNDLES = "includeBundles"; //$NON-NLS-1$
+	static final String OPTIONAL_BUNDLES = "optionalBundles"; //$NON-NLS-1$
+	static final String ENVIRONMENT = "environment"; //$NON-NLS-1$
+	static final String OS = "os"; //$NON-NLS-1$
+	static final String WS = "ws"; //$NON-NLS-1$
+	static final String ARCH = "arch"; //$NON-NLS-1$
+	static final String NL = "nl"; //$NON-NLS-1$
+	static final String TARGET_JRE = "targetJRE"; //$NON-NLS-1$
+	static final String EXEC_ENV = "execEnv"; //$NON-NLS-1$
+	static final String JRE_NAME = "jreName"; //$NON-NLS-1$
+	static final String ARGUMENTS = "launcherArgs"; //$NON-NLS-1$
+	static final String PROGRAM_ARGS = "programArgs"; //$NON-NLS-1$
+	static final String VM_ARGS = "vmArgs"; //$NON-NLS-1$
+	static final String IMPLICIT = "implicitDependencies"; //$NON-NLS-1$
+	static final String PLUGIN = "plugin"; //$NON-NLS-1$
+	static final String PDE_INSTRUCTION = "pde"; //$NON-NLS-1$
+	static final String ATTR_ID = "id"; //$NON-NLS-1$
+	static final String INSTALLABLE_UNIT = "unit"; //$NON-NLS-1$
+	static final String REPOSITORY = "repository"; //$NON-NLS-1$
+	static final String ATTR_INCLUDE_MODE = "includeMode"; //$NON-NLS-1$
 	public static final String MODE_SLICER = "slicer"; //$NON-NLS-1$
 	public static final String MODE_PLANNER = "planner"; //$NON-NLS-1$
-	private static final String ATTR_INCLUDE_ALL_PLATFORMS = "includeAllPlatforms"; //$NON-NLS-1$
-	private static final String ATTR_OPTIONAL = "optional"; //$NON-NLS-1$
-	private static final String ATTR_VERSION = "version"; //$NON-NLS-1$
-	private static final String ATTR_CONFIGURATION = "configuration"; //$NON-NLS-1$
-	private static final String CONTENT = "content"; //$NON-NLS-1$
-	private static final String ATTR_USE_ALL = "useAllPlugins"; //$NON-NLS-1$
-	private static final String PLUGINS = "plugins"; //$NON-NLS-1$
-	private static final String FEATURES = "features"; //$NON-NLS-1$
-	private static final String EXTRA_LOCATIONS = "extraLocations"; //$NON-NLS-1$
+	static final String ATTR_INCLUDE_ALL_PLATFORMS = "includeAllPlatforms"; //$NON-NLS-1$
+	static final String ATTR_OPTIONAL = "optional"; //$NON-NLS-1$
+	static final String ATTR_VERSION = "version"; //$NON-NLS-1$
+	static final String ATTR_CONFIGURATION = "configuration"; //$NON-NLS-1$
+	static final String CONTENT = "content"; //$NON-NLS-1$
+	static final String ATTR_USE_ALL = "useAllPlugins"; //$NON-NLS-1$
+	static final String PLUGINS = "plugins"; //$NON-NLS-1$
+	static final String FEATURES = "features"; //$NON-NLS-1$
+	static final String FEATURE = "feature"; //$NON-NLS-1$
+	static final String EXTRA_LOCATIONS = "extraLocations"; //$NON-NLS-1$
 	private static ITargetPlatformService fTargetService;
 
-	/* Example Old Style Xml
-	<?xml version="1.0" encoding="UTF-8"?>
-	<?pde version="3.2"?>
-
-	<target>
-
-	<targetJRE>
-	  <execEnv>CDC-1.0/Foundation-1.0</execEnv>
-	</targetJRE>
-
-	<environment>
-		<os>hpux</os>
-		<ws>gtk</ws>
-		<arch>ia64</arch>
-		<nl>ar</nl>
-	</environment>
-
-	<launcherArgs>
-		<vmArgs>vm</vmArgs>
-		<programArgs>program</programArgs>
-	</launcherArgs>
-
-	<location path="d:\targets\provisioning-base"/>
-
-	<content>
-	  <plugins>
-	     <plugin id="org.eclipse.core.jobs"/>
-	     <plugin id="org.eclipse.equinox.app"/>
-	     <plugin id="org.eclipse.osgi"/>
-	     <plugin id="org.eclipse.osgi.services"/>
-	     <plugin id="org.junit"/>
-	  </plugins>
-	  <features>
-	  </features>
-	  <extraLocations>
-	     <location path="D:\targets\equinox\eclipse"/>
-	  </extraLocations>
-	</content>
-	
-	<implicitDependencies>
-	  <plugin id="javax.servlet"/>
-	  <plugin id="com.jcraft.jsch"/>
-	  <plugin id="ie.wombat.jbdiff"/>
-	  <plugin id="javax.servlet.jsp"/>
-	  <plugin id="ie.wombat.jbdiff.test"/>
-	</implicitDependencies>
-	
-	</target>
-
-	 */
-
-	/* Example New Style XML
-
-	<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-	<?pde version="3.5"?>
-
-	<target description="A description" name="A name">
-	<locations>
-	<location path="d:\targets\provisioning-base" type="Profile">
-	<includeBundles>
-	<plugin id="org.eclipse.core.jobs"/>
-	<plugin id="org.eclipse.equinox.app"/>
-	<plugin id="org.eclipse.osgi"/>
-	<plugin id="org.eclipse.osgi.services"/>
-	<plugin id="org.junit"/>
-	</includeBundles>
-	
-	</location>
-	<location path="D:\targets\equinox\eclipse" type="Directory">
-	<includeBundles>
-	<plugin id="org.eclipse.core.jobs"/>
-	<plugin id="org.eclipse.equinox.app"/>
-	<plugin id="org.eclipse.osgi"/>
-	<plugin id="org.eclipse.osgi.services"/>
-	<plugin id="org.junit"/>
-	</includeBundles>
-	</location>
-	</locations>
-	<environment>
-	<os>hpux</os>
-	<ws>gtk</ws>
-	<arch>ia64</arch>
-	<nl>ar</nl>
-	</environment>
-	<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
-	<launcherArgs>
-	<vmArgs>vm</vmArgs>
-	<programArgs>program</programArgs>
-	</launcherArgs>
-	<implicitDependencies>
-	<plugin id="javax.servlet"/>
-	<plugin id="com.jcraft.jsch"/>
-	<plugin id="ie.wombat.jbdiff"/>
-	<plugin id="javax.servlet.jsp"/>
-	<plugin id="ie.wombat.jbdiff.test"/>
-	</implicitDependencies>
-	</target>
-	 */
-
 	/**
 	 * Serializes a target definition to xml and writes the xml to the given stream
 	 * @param definition target definition to serialize
@@ -196,7 +93,7 @@ public class TargetDefinitionPersistenceHelper {
 		DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
 		Document doc = docBuilder.newDocument();
 
-		ProcessingInstruction instruction = doc.createProcessingInstruction(PDE_INSTRUCTION, ATTR_VERSION + "=\"" + ICoreConstants.TARGET35 + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+		ProcessingInstruction instruction = doc.createProcessingInstruction(PDE_INSTRUCTION, ATTR_VERSION + "=\"" + ICoreConstants.TARGET36 + "\""); //$NON-NLS-1$ //$NON-NLS-2$
 		doc.appendChild(instruction);
 
 		Element rootElement = doc.createElement(ROOT);
@@ -205,6 +102,10 @@ public class TargetDefinitionPersistenceHelper {
 			rootElement.setAttribute(ATTR_NAME, definition.getName());
 		}
 
+		if (((TargetDefinition) definition).getUIMode() == TargetDefinition.MODE_FEATURE) {
+			rootElement.setAttribute(ATTR_INCLUDE_MODE, FEATURE);
+		}
+
 		IBundleContainer[] containers = definition.getBundleContainers();
 		if (containers != null && containers.length > 0) {
 			Element containersElement = doc.createElement(LOCATIONS);
@@ -215,6 +116,19 @@ public class TargetDefinitionPersistenceHelper {
 			rootElement.appendChild(containersElement);
 		}
 
+		NameVersionDescriptor[] included = definition.getIncluded();
+		if (included != null) {
+			Element includedElement = doc.createElement(INCLUDE_BUNDLES);
+			serializeBundles(doc, includedElement, included);
+			rootElement.appendChild(includedElement);
+		}
+		NameVersionDescriptor[] optional = definition.getOptional();
+		if (optional != null) {
+			Element optionalElement = doc.createElement(OPTIONAL_BUNDLES);
+			serializeBundles(doc, optionalElement, optional);
+			rootElement.appendChild(optionalElement);
+		}
+
 		if (definition.getOS() != null || definition.getWS() != null || definition.getArch() != null || definition.getNL() != null) {
 			Element envElement = doc.createElement(ENVIRONMENT);
 			if (definition.getOS() != null) {
@@ -262,12 +176,12 @@ public class TargetDefinitionPersistenceHelper {
 			rootElement.appendChild(argElement);
 		}
 
-		BundleInfo[] implicitDependencies = definition.getImplicitDependencies();
+		NameVersionDescriptor[] implicitDependencies = definition.getImplicitDependencies();
 		if (implicitDependencies != null && implicitDependencies.length > 0) {
 			Element implicit = doc.createElement(IMPLICIT);
 			for (int i = 0; i < implicitDependencies.length; i++) {
 				Element plugin = doc.createElement(PLUGIN);
-				plugin.setAttribute(ATTR_ID, implicitDependencies[i].getSymbolicName());
+				plugin.setAttribute(ATTR_ID, implicitDependencies[i].getId());
 				if (implicitDependencies[i].getVersion() != null) {
 					plugin.setAttribute(ATTR_VERSION, implicitDependencies[i].getVersion());
 				}
@@ -307,137 +221,62 @@ public class TargetDefinitionPersistenceHelper {
 			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.TargetDefinitionPersistenceHelper_0));
 		}
 
-		String name = root.getAttribute(ATTR_NAME);
-		if (name.length() > 0) {
-			definition.setName(name);
-		}
-
-		AbstractBundleContainer oldStylePrimaryContainer = null;
-		List bundleContainers = new ArrayList();
-		NodeList list = root.getChildNodes();
+		String version = null;
+		NodeList list = doc.getChildNodes();
 		for (int i = 0; i < list.getLength(); ++i) {
 			Node node = list.item(i);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				Element element = (Element) node;
-				String nodeName = element.getNodeName();
-				if (nodeName.equalsIgnoreCase(LOCATIONS)) {
-					NodeList locations = element.getChildNodes();
-					for (int j = 0; j < locations.getLength(); ++j) {
-						Node locationNode = locations.item(j);
-						if (locationNode.getNodeType() == Node.ELEMENT_NODE) {
-							Element locationElement = (Element) locationNode;
-							if (locationElement.getNodeName().equalsIgnoreCase(LOCATION)) {
-								bundleContainers.add(deserializeBundleContainer(locationElement));
-							}
-						}
-					}
-				} else if (nodeName.equalsIgnoreCase(LOCATION)) {
-					// This is the 'home' location in old style target platforms
-					oldStylePrimaryContainer = (AbstractBundleContainer) deserializeBundleContainer(element);
-				} else if (nodeName.equalsIgnoreCase(CONTENT)) {
-					// Additional locations and other bundle content settings were stored under this tag in old style target platforms
-					// Only included if the content has useAllPlugins='true' otherwise we create bundle containers for the restrictions
-					boolean useAll = Boolean.TRUE.toString().equalsIgnoreCase(element.getAttribute(ATTR_USE_ALL));
-					if (useAll) {
-						bundleContainers.add(oldStylePrimaryContainer);
-					}
-					bundleContainers.addAll(deserializeBundleContainersFromOldStyleElement(element, oldStylePrimaryContainer, useAll));
-					// It is possible to have an empty content section, in which case we should add the primary container, bug 268709
-					if (bundleContainers.isEmpty()) {
-						bundleContainers.add(oldStylePrimaryContainer);
-					}
-				} else if (nodeName.equalsIgnoreCase(ENVIRONMENT)) {
-					NodeList envEntries = element.getChildNodes();
-					for (int j = 0; j < envEntries.getLength(); ++j) {
-						Node entry = envEntries.item(j);
-						if (entry.getNodeType() == Node.ELEMENT_NODE) {
-							Element currentElement = (Element) entry;
-							if (currentElement.getNodeName().equalsIgnoreCase(OS)) {
-								definition.setOS(getTextContent(currentElement));
-							} else if (currentElement.getNodeName().equalsIgnoreCase(WS)) {
-								definition.setWS(getTextContent(currentElement));
-							} else if (currentElement.getNodeName().equalsIgnoreCase(ARCH)) {
-								definition.setArch(getTextContent(currentElement));
-							} else if (currentElement.getNodeName().equalsIgnoreCase(NL)) {
-								definition.setNL(getTextContent(currentElement));
-							}
-						}
-					}
-				} else if (nodeName.equalsIgnoreCase(TARGET_JRE)) {
-					String text = element.getAttribute(ATTR_LOCATION_PATH);
-					if (text.length() == 0) {
-						// old format (or missing)
-						NodeList argEntries = element.getChildNodes();
-						for (int j = 0; j < argEntries.getLength(); ++j) {
-							Node entry = argEntries.item(j);
-							if (entry.getNodeType() == Node.ELEMENT_NODE) {
-								Element currentElement = (Element) entry;
-								IPath path = null;
-								if (currentElement.getNodeName().equalsIgnoreCase(EXEC_ENV)) {
-									IExecutionEnvironment env = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(getTextContent(currentElement));
-									if (env != null) {
-										path = JavaRuntime.newJREContainerPath(env);
-									}
-								} else if (currentElement.getNodeName().equalsIgnoreCase(JRE_NAME)) {
-									String vmName = getTextContent(currentElement);
-									IVMInstall vmInstall = VMUtil.getVMInstall(vmName);
-									if (vmInstall != null) {
-										path = JavaRuntime.newJREContainerPath(vmInstall);
-									}
-								}
-								definition.setJREContainer(path);
-							}
-						}
-					} else {
-						// new format - JRE container path
-						IPath path = Path.fromPortableString(text);
-						definition.setJREContainer(path);
-					}
-				} else if (nodeName.equalsIgnoreCase(ARGUMENTS)) {
-					NodeList argEntries = element.getChildNodes();
-					for (int j = 0; j < argEntries.getLength(); ++j) {
-						Node entry = argEntries.item(j);
-						if (entry.getNodeType() == Node.ELEMENT_NODE) {
-							Element currentElement = (Element) entry;
-							if (currentElement.getNodeName().equalsIgnoreCase(PROGRAM_ARGS)) {
-								definition.setProgramArguments(getTextContent(currentElement));
-							} else if (currentElement.getNodeName().equalsIgnoreCase(VM_ARGS)) {
-								definition.setVMArguments(getTextContent(currentElement));
-							}
-						}
+			if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
+				ProcessingInstruction instruction = (ProcessingInstruction) node;
+				if (instruction.getTarget() == PDE_INSTRUCTION) {
+					String data = instruction.getData();
+					Pattern pattern = Pattern.compile(ATTR_VERSION + "=\"(.*)\""); //$NON-NLS-1$
+					Matcher matcher = pattern.matcher(data);
+					if (matcher.matches()) {
+						version = matcher.group(1);
+						break;
 					}
-				} else if (nodeName.equalsIgnoreCase(ARGUMENTS)) {
-					NodeList argEntries = element.getChildNodes();
-					for (int j = 0; j < argEntries.getLength(); ++j) {
-						Node entry = argEntries.item(j);
-						if (entry.getNodeType() == Node.ELEMENT_NODE) {
-							Element currentElement = (Element) entry;
-							if (currentElement.getNodeName().equalsIgnoreCase(PROGRAM_ARGS)) {
-								definition.setProgramArguments(getTextContent(currentElement));
-							} else if (currentElement.getNodeName().equalsIgnoreCase(VM_ARGS)) {
-								definition.setVMArguments(getTextContent(currentElement));
-							}
-						}
-					}
-				} else if (nodeName.equalsIgnoreCase(IMPLICIT)) {
-					NodeList implicitEntries = element.getChildNodes();
-					List implicit = new ArrayList(implicitEntries.getLength());
-					for (int j = 0; j < implicitEntries.getLength(); ++j) {
-						Node entry = implicitEntries.item(j);
-						if (entry.getNodeType() == Node.ELEMENT_NODE) {
-							Element currentElement = (Element) entry;
-							if (currentElement.getNodeName().equalsIgnoreCase(PLUGIN)) {
-								String version = currentElement.getAttribute(ATTR_VERSION);
-								BundleInfo bundle = new BundleInfo(currentElement.getAttribute(ATTR_ID), version.length() > 0 ? version : null, null, BundleInfo.NO_LEVEL, false);
-								implicit.add(bundle);
-							}
-						}
-					}
-					definition.setImplicitDependencies((BundleInfo[]) implicit.toArray(new BundleInfo[implicit.size()]));
 				}
 			}
 		}
-		definition.setBundleContainers((IBundleContainer[]) bundleContainers.toArray(new IBundleContainer[bundleContainers.size()]));
+
+		// Select the correct helper class to use
+		if (version == null || version.length() == 0) {
+			TargetPersistence36Helper.initFromDoc(definition, root);
+		} else if (version.equals(ICoreConstants.TARGET36)) {
+			TargetPersistence36Helper.initFromDoc(definition, root);
+		} else if (version.equals(ICoreConstants.TARGET35)) {
+			TargetPersistence35Helper.initFromDoc(definition, root);
+		} else if (version.compareTo(ICoreConstants.TARGET34) <= 0) {
+			TargetPersistence34Helper.initFromDoc(definition, root);
+		}
+	}
+
+	static ITargetPlatformService getTargetPlatformService() throws CoreException {
+		if (fTargetService == null) {
+			fTargetService = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+			if (fTargetService == null) {
+				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.TargetDefinitionPersistenceHelper_1));
+			}
+		}
+		return fTargetService;
+	}
+
+	/**
+	 * Returns the value of any text nodes stored as children of the given element
+	 * @param element the element to check for text content
+	 * @return string containing text content of element or empty string
+	 * @throws DOMException
+	 */
+	static String getTextContent(Element element) throws DOMException {
+		NodeList children = element.getChildNodes();
+		StringBuffer result = new StringBuffer();
+		for (int i = 0; i < children.getLength(); ++i) {
+			Node currentNode = children.item(i);
+			if (currentNode.getNodeType() == Node.TEXT_NODE) {
+				result.append(currentNode.getNodeValue());
+			}
+		}
+		return result.toString();
 	}
 
 	private static Element serializeBundleContainer(Document doc, AbstractBundleContainer container) throws CoreException {
@@ -478,251 +317,29 @@ public class TargetDefinitionPersistenceHelper {
 				}
 			}
 		}
-		BundleInfo[] includedBundles = container.getIncludedBundles();
-		if (includedBundles != null) {
-			Element included = doc.createElement(INCLUDE_BUNDLES);
-			serializeBundles(doc, included, includedBundles);
-			containerElement.appendChild(included);
-		}
-		BundleInfo[] optionalBundles = container.getOptionalBundles();
-		if (optionalBundles != null) {
-			Element optional = doc.createElement(OPTIONAL_BUNDLES);
-			serializeBundles(doc, optional, optionalBundles);
-			containerElement.appendChild(optional);
-		}
 		return containerElement;
 	}
 
-	private static void serializeBundles(Document doc, Element parent, BundleInfo[] bundles) {
+	private static void serializeBundles(Document doc, Element parent, NameVersionDescriptor[] bundles) {
 		for (int j = 0; j < bundles.length; j++) {
-			Element includedBundle = doc.createElement(PLUGIN);
-			includedBundle.setAttribute(ATTR_ID, bundles[j].getSymbolicName());
-			String version = bundles[j].getVersion();
-			if (version != null) {
-				includedBundle.setAttribute(ATTR_VERSION, version);
-			}
-			parent.appendChild(includedBundle);
-		}
-	}
-
-	private static IBundleContainer deserializeBundleContainer(Element location) throws CoreException {
-		String def = location.getAttribute(ATTR_USE_DEFAULT);
-		String path = null;
-		String type = null;
-		if (def.length() > 0) {
-			// old style
-			if (Boolean.valueOf(def).booleanValue()) {
-				path = "${eclipse_home}"; //$NON-NLS-1$
-				type = ProfileBundleContainer.TYPE;
-			}
-		} else {
-			path = location.getAttribute(ATTR_LOCATION_PATH);
-			type = location.getAttribute(ATTR_LOCATION_TYPE);
-		}
-		if (type.length() == 0) {
-			if (path.endsWith("plugins")) { //$NON-NLS-1$
-				type = DirectoryBundleContainer.TYPE;
-			} else {
-				type = ProfileBundleContainer.TYPE;
-			}
-		}
-		IBundleContainer container = null;
-		if (DirectoryBundleContainer.TYPE.equals(type)) {
-			container = getTargetPlatformService().newDirectoryContainer(path);
-		} else if (ProfileBundleContainer.TYPE.equals(type)) {
-			String configArea = location.getAttribute(ATTR_CONFIGURATION);
-			container = getTargetPlatformService().newProfileContainer(path, configArea.length() > 0 ? configArea : null);
-		} else if (FeatureBundleContainer.TYPE.equals(type)) {
-			String version = location.getAttribute(ATTR_VERSION);
-			container = getTargetPlatformService().newFeatureContainer(path, location.getAttribute(ATTR_ID), version.length() > 0 ? version : null);
-		} else if (IUBundleContainer.TYPE.equals(type)) {
-			String includeMode = location.getAttribute(ATTR_INCLUDE_MODE);
-			String includeAllPlatforms = location.getAttribute(ATTR_INCLUDE_ALL_PLATFORMS);
-			NodeList list = location.getChildNodes();
-			List ids = new ArrayList();
-			List versions = new ArrayList();
-			List repos = new ArrayList();
-			for (int i = 0; i < list.getLength(); ++i) {
-				Node node = list.item(i);
-				if (node.getNodeType() == Node.ELEMENT_NODE) {
-					// TODO: missing id/version
-					Element element = (Element) node;
-					if (element.getNodeName().equalsIgnoreCase(INSTALLABLE_UNIT)) {
-						String id = element.getAttribute(ATTR_ID);
-						if (id.length() > 0) {
-							String version = element.getAttribute(ATTR_VERSION);
-							if (version.length() > 0) {
-								ids.add(id);
-								versions.add(version);
-							}
-						}
-					} else if (element.getNodeName().equalsIgnoreCase(REPOSITORY)) {
-						String loc = element.getAttribute(LOCATION);
-						if (loc.length() > 0) {
-							try {
-								repos.add(new URI(loc));
-							} catch (URISyntaxException e) {
-								// TODO: illegal syntax
-							}
-						}
-					}
-				}
-			}
-			String[] iuIDs = (String[]) ids.toArray(new String[ids.size()]);
-			String[] iuVer = (String[]) versions.toArray(new String[versions.size()]);
-			URI[] uris = (URI[]) repos.toArray(new URI[repos.size()]);
-			container = new IUBundleContainer(iuIDs, iuVer, uris);
-			if (includeMode != null && includeMode.trim().length() > 0) {
-				if (includeMode.equals(MODE_PLANNER)) {
-					((IUBundleContainer) container).setIncludeAllRequired(true, null);
-				} else if (includeMode.equals(MODE_SLICER)) {
-					((IUBundleContainer) container).setIncludeAllRequired(false, null);
-				}
-			}
-			if (includeAllPlatforms != null && includeAllPlatforms.trim().length() > 0) {
-				((IUBundleContainer) container).setIncludeAllEnvironments(Boolean.valueOf(includeAllPlatforms).booleanValue(), null);
-			}
-
-		}
-
-		NodeList list = location.getChildNodes();
-		for (int i = 0; i < list.getLength(); ++i) {
-			Node node = list.item(i);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				Element element = (Element) node;
-				if (element.getNodeName().equalsIgnoreCase(INCLUDE_BUNDLES)) {
-					BundleInfo[] included = deserializeBundles(element);
-					container.setIncludedBundles(included);
-				} else if (element.getNodeName().equalsIgnoreCase(OPTIONAL_BUNDLES)) {
-					BundleInfo[] optional = deserializeBundles(element);
-					container.setOptionalBundles(optional);
-				}
-			}
-		}
-
-		return container;
-	}
-
-	private static BundleInfo[] deserializeBundles(Element bundleContainer) {
-		NodeList nodes = bundleContainer.getChildNodes();
-		List bundles = new ArrayList(nodes.getLength());
-		for (int j = 0; j < nodes.getLength(); ++j) {
-			Node include = nodes.item(j);
-			if (include.getNodeType() == Node.ELEMENT_NODE) {
-				Element includeElement = (Element) include;
-				if (includeElement.getNodeName().equalsIgnoreCase(PLUGIN)) {
-					String id = includeElement.getAttribute(ATTR_ID);
-					String version = includeElement.getAttribute(ATTR_VERSION);
-					bundles.add(new BundleInfo(id, version.length() > 0 ? version : null, null, BundleInfo.NO_LEVEL, false));
-				}
-			}
-		}
-		return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
-	}
-
-	/**
-	 * Parses old content section.
-	 * 
-	 * @param content element containing the content section
-	 * @param primaryContainer the primary location defined in the xml file, restrictions are based off this container
-	 * @param useAll whether all bundles in the locations should be considered vs. only those specified
-	 * @return list of bundle containers
-	 */
-	private static List deserializeBundleContainersFromOldStyleElement(Element content, AbstractBundleContainer primaryContainer, boolean useAll) throws CoreException {
-		List containers = new ArrayList();
-		NodeList list = content.getChildNodes();
-		List included = new ArrayList(list.getLength());
-		List optional = new ArrayList();
-		for (int i = 0; i < list.getLength(); ++i) {
-			Node node = list.item(i);
-			if (node.getNodeType() == Node.ELEMENT_NODE) {
-				Element element = (Element) node;
-				if (!useAll && element.getNodeName().equalsIgnoreCase(PLUGINS)) {
-					NodeList plugins = element.getChildNodes();
-					for (int j = 0; j < plugins.getLength(); j++) {
-						Node lNode = plugins.item(j);
-						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
-							Element plugin = (Element) lNode;
-							String id = plugin.getAttribute(ATTR_ID);
-							boolean isOptional = plugin.getAttribute(ATTR_OPTIONAL).equalsIgnoreCase(Boolean.toString(true));
-							if (id.length() > 0) {
-								BundleInfo info = new BundleInfo(id, null, null, BundleInfo.NO_LEVEL, false);
-								if (isOptional) {
-									optional.add(info);
-								} else {
-									included.add(info);
-								}
-							}
-						}
-					}
-					// Primary container is only added by default if useAllPlugins='true'
-					if (included.size() > 0 || optional.size() > 0) {
-						containers.add(primaryContainer);
-					}
-				} else if (element.getNodeName().equalsIgnoreCase(EXTRA_LOCATIONS)) {
-					NodeList locations = element.getChildNodes();
-					for (int j = 0; j < locations.getLength(); j++) {
-						Node lNode = locations.item(j);
-						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
-							Element location = (Element) lNode;
-							String path = location.getAttribute(ATTR_LOCATION_PATH);
-							if (path.length() > 0) {
-								containers.add(getTargetPlatformService().newDirectoryContainer(path));
-							}
-						}
-					}
-				} else if (!useAll && element.getNodeName().equalsIgnoreCase(FEATURES)) {
-					NodeList features = element.getChildNodes();
-					for (int j = 0; j < features.getLength(); j++) {
-						Node lNode = features.item(j);
-						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
-							Element feature = (Element) lNode;
-							String id = feature.getAttribute(ATTR_ID);
-							if (id.length() > 0) {
-								if (primaryContainer != null) {
-									containers.add(getTargetPlatformService().newFeatureContainer(primaryContainer.getLocation(false), id, null));
-								}
-							}
-						}
-					}
+			if (bundles[j].getType() == NameVersionDescriptor.TYPE_FEATURE) {
+				Element includedBundle = doc.createElement(FEATURE);
+				includedBundle.setAttribute(ATTR_ID, bundles[j].getId());
+				String version = bundles[j].getVersion();
+				if (version != null) {
+					includedBundle.setAttribute(ATTR_VERSION, version);
 				}
-
-			}
-		}
-		// in the old world, the restrictions were global to all containers
-		if (!useAll && (included.size() > 0 || optional.size() > 0)) {
-			Iterator iterator = containers.iterator();
-			while (iterator.hasNext()) {
-				IBundleContainer container = (IBundleContainer) iterator.next();
-				if (!(container instanceof FeatureBundleContainer)) {
-					if (included.size() > 0) {
-						container.setIncludedBundles((BundleInfo[]) included.toArray(new BundleInfo[included.size()]));
-					}
-					if (optional.size() > 0) {
-						container.setOptionalBundles((BundleInfo[]) optional.toArray(new BundleInfo[optional.size()]));
-					}
+				parent.appendChild(includedBundle);
+			} else {
+				Element includedBundle = doc.createElement(PLUGIN);
+				includedBundle.setAttribute(ATTR_ID, bundles[j].getId());
+				String version = bundles[j].getVersion();
+				if (version != null) {
+					includedBundle.setAttribute(ATTR_VERSION, version);
 				}
+				parent.appendChild(includedBundle);
 			}
 		}
-		return containers;
-	}
-
-	/**
-	 * Returns the value of any text nodes stored as children of the given element
-	 * @param element the element to check for text content
-	 * @return string containing text content of element or empty string
-	 * @throws DOMException
-	 */
-	private static String getTextContent(Element element) throws DOMException {
-		NodeList children = element.getChildNodes();
-		StringBuffer result = new StringBuffer();
-		for (int i = 0; i < children.getLength(); ++i) {
-			Node currentNode = children.item(i);
-			if (currentNode.getNodeType() == Node.TEXT_NODE) {
-				result.append(currentNode.getNodeValue());
-			}
-		}
-		return result.toString();
 	}
 
 	/**
@@ -742,14 +359,4 @@ public class TargetDefinitionPersistenceHelper {
 		}
 	}
 
-	private static ITargetPlatformService getTargetPlatformService() throws CoreException {
-		if (fTargetService == null) {
-			fTargetService = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
-			if (fTargetService == null) {
-				throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.TargetDefinitionPersistenceHelper_1));
-			}
-		}
-		return fTargetService;
-	}
-
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetMetadataCollector.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetMetadataCollector.java
new file mode 100644
index 0000000..bb83526
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetMetadataCollector.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target;
+
+import java.io.File;
+import java.net.URI;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.provisional.*;
+
+/**
+ * Utility class that collects the metadata repositories that a target definition has access to.
+ * This class was created specifically to support providing pde build with a metadata context when
+ * exporting features so that the metadata would be reused rather than be generated again.
+ * 
+ * @since 3.6
+ */
+public class TargetMetadataCollector {
+
+	/**
+	 * Returns the list of URI locations that contain metadata repositories describing plug-ins in the
+	 * given target definition.  The returned list may be empty or may not contain metadata for all
+	 * plug-ins in the target.  The definition does not have to be resolved and this method will not
+	 * resolve it.  If <code>null</code> is passed as the definition, this method will use {@link ITargetPlatformService}
+	 * to get the active target definition.
+	 * 
+	 * @param definition the target definition to load metadata repositories for or <code>null</code> to use the active target definition
+	 * @return a list of URIs that specify metadata repository locations, possibly empty
+	 * @throws CoreException if there is a problem working with the target definition
+	 */
+	public static URI[] getMetadataRepositories(ITargetDefinition definition) throws CoreException {
+		// Lookup the active target definition
+		if (definition == null) {
+			ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+			if (service == null) {
+				return null;
+			}
+			ITargetHandle handle = service.getWorkspaceTargetHandle();
+			definition = handle.getTargetDefinition();
+		}
+
+		Set repos = new HashSet();
+
+		IBundleContainer[] containers = definition.getBundleContainers();
+		if (containers != null) {
+			for (int i = 0; i < containers.length; i++) {
+				IBundleContainer currentContainer = containers[i];
+				if (currentContainer instanceof ProfileBundleContainer) {
+					File profileLocation = ((ProfileBundleContainer) currentContainer).getProfileFileLocation();
+					if (profileLocation != null) {
+						repos.add(profileLocation.toURI());
+					}
+				} else if (currentContainer instanceof IUBundleContainer) {
+					// PDE Build only wants local repositories as downloading can take as long as publishing new metadata.  Currently no way to get cached/downloaded metadata.
+					URI[] locations = ((IUBundleContainer) currentContainer).getRepositories();
+					if (locations != null) {
+						for (int j = 0; j < locations.length; j++) {
+							if (URIUtil.isFileURI(locations[j])) {
+								repos.add(locations[j]);
+							}
+						}
+					}
+				}
+			}
+		}
+
+		return (URI[]) repos.toArray(new URI[repos.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence34Helper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence34Helper.java
new file mode 100644
index 0000000..16bf1ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence34Helper.java
@@ -0,0 +1,299 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
+import org.eclipse.pde.internal.core.target.provisional.*;
+import org.eclipse.pde.internal.core.util.VMUtil;
+import org.w3c.dom.*;
+
+/**
+ * Handles reading of target definition files that were created before the new target platform
+ * story (3.4 and earlier).
+ * 
+ * @see TargetDefinitionPersistenceHelper
+ */
+public class TargetPersistence34Helper {
+
+	/* Example Old Style Xml
+	<?xml version="1.0" encoding="UTF-8"?>
+	<?pde version="3.2"?>
+
+	<target>
+
+	<targetJRE>
+	  <execEnv>CDC-1.0/Foundation-1.0</execEnv>
+	</targetJRE>
+
+	<environment>
+		<os>hpux</os>
+		<ws>gtk</ws>
+		<arch>ia64</arch>
+		<nl>ar</nl>
+	</environment>
+
+	<launcherArgs>
+		<vmArgs>vm</vmArgs>
+		<programArgs>program</programArgs>
+	</launcherArgs>
+
+	<location path="d:\targets\provisioning-base"/>
+
+	<content>
+	  <plugins>
+	     <plugin id="org.eclipse.core.jobs"/>
+	     <plugin id="org.eclipse.equinox.app"/>
+	     <plugin id="org.eclipse.osgi"/>
+	     <plugin id="org.eclipse.osgi.services"/>
+	     <plugin id="org.junit"/>
+	  </plugins>
+	  <features>
+	  </features>
+	  <extraLocations>
+	     <location path="D:\targets\equinox\eclipse"/>
+	  </extraLocations>
+	</content>
+	
+	<implicitDependencies>
+	  <plugin id="javax.servlet"/>
+	  <plugin id="com.jcraft.jsch"/>
+	  <plugin id="ie.wombat.jbdiff"/>
+	  <plugin id="javax.servlet.jsp"/>
+	  <plugin id="ie.wombat.jbdiff.test"/>
+	</implicitDependencies>
+	
+	</target>
+
+	 */
+	public static void initFromDoc(ITargetDefinition definition, Element root) throws CoreException {
+
+		String name = root.getAttribute(TargetDefinitionPersistenceHelper.ATTR_NAME);
+		if (name.length() > 0) {
+			definition.setName(name);
+		}
+
+		AbstractBundleContainer oldStylePrimaryContainer = null;
+		List bundleContainers = new ArrayList();
+		NodeList list = root.getChildNodes();
+		for (int i = 0; i < list.getLength(); ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				Element element = (Element) node;
+				String nodeName = element.getNodeName();
+				if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.LOCATION)) {
+					// This is the 'home' location in old style target platforms
+					oldStylePrimaryContainer = (AbstractBundleContainer) deserializeBundleContainer(element);
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.CONTENT)) {
+					// Additional locations and other bundle content settings were stored under this tag in old style target platforms
+					// Only included if the content has useAllPlugins='true' otherwise we create bundle containers for the restrictions
+					boolean useAll = Boolean.TRUE.toString().equalsIgnoreCase(element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_USE_ALL));
+					if (useAll) {
+						bundleContainers.add(oldStylePrimaryContainer);
+					}
+					bundleContainers.addAll(deserializeBundleContainersFromOldStyleElement(element, definition, oldStylePrimaryContainer, useAll));
+					// It is possible to have an empty content section, in which case we should add the primary container, bug 268709
+					if (bundleContainers.isEmpty()) {
+						bundleContainers.add(oldStylePrimaryContainer);
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ENVIRONMENT)) {
+					NodeList envEntries = element.getChildNodes();
+					for (int j = 0; j < envEntries.getLength(); ++j) {
+						Node entry = envEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.OS)) {
+								definition.setOS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.WS)) {
+								definition.setWS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARCH)) {
+								definition.setArch(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.NL)) {
+								definition.setNL(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.TARGET_JRE)) {
+					String text = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+					if (text.length() == 0) {
+						// old format (or missing)
+						NodeList argEntries = element.getChildNodes();
+						for (int j = 0; j < argEntries.getLength(); ++j) {
+							Node entry = argEntries.item(j);
+							if (entry.getNodeType() == Node.ELEMENT_NODE) {
+								Element currentElement = (Element) entry;
+								IPath path = null;
+								if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.EXEC_ENV)) {
+									IExecutionEnvironment env = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+									if (env != null) {
+										path = JavaRuntime.newJREContainerPath(env);
+									}
+								} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.JRE_NAME)) {
+									String vmName = TargetDefinitionPersistenceHelper.getTextContent(currentElement);
+									IVMInstall vmInstall = VMUtil.getVMInstall(vmName);
+									if (vmInstall != null) {
+										path = JavaRuntime.newJREContainerPath(vmInstall);
+									}
+								}
+								definition.setJREContainer(path);
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARGUMENTS)) {
+					NodeList argEntries = element.getChildNodes();
+					for (int j = 0; j < argEntries.getLength(); ++j) {
+						Node entry = argEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PROGRAM_ARGS)) {
+								definition.setProgramArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.VM_ARGS)) {
+								definition.setVMArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.IMPLICIT)) {
+					NodeList implicitEntries = element.getChildNodes();
+					List implicit = new ArrayList(implicitEntries.getLength());
+					for (int j = 0; j < implicitEntries.getLength(); ++j) {
+						Node entry = implicitEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+								String version = currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								NameVersionDescriptor bundle = new NameVersionDescriptor(currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID), version.length() > 0 ? version : null);
+								implicit.add(bundle);
+							}
+						}
+					}
+					definition.setImplicitDependencies((NameVersionDescriptor[]) implicit.toArray(new NameVersionDescriptor[implicit.size()]));
+				}
+			}
+		}
+		definition.setBundleContainers((IBundleContainer[]) bundleContainers.toArray(new IBundleContainer[bundleContainers.size()]));
+	}
+
+	private static IBundleContainer deserializeBundleContainer(Element location) throws CoreException {
+		String def = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_USE_DEFAULT);
+		String path = null;
+		String type = null;
+		if (def.length() > 0 && Boolean.valueOf(def).booleanValue()) {
+			path = "${eclipse_home}"; //$NON-NLS-1$
+			type = ProfileBundleContainer.TYPE;
+		} else {
+			path = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+		}
+
+		if (type == null) {
+			if (path.endsWith("plugins")) { //$NON-NLS-1$
+				type = DirectoryBundleContainer.TYPE;
+			} else {
+				type = ProfileBundleContainer.TYPE;
+			}
+		}
+		IBundleContainer container = null;
+		if (DirectoryBundleContainer.TYPE.equals(type)) {
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newDirectoryContainer(path);
+		} else if (ProfileBundleContainer.TYPE.equals(type)) {
+			String configArea = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_CONFIGURATION);
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newProfileContainer(path, configArea.length() > 0 ? configArea : null);
+		}
+
+		return container;
+	}
+
+	/**
+	 * Parses old content section.
+	 * 
+	 * @param content element containing the content section
+	 * @param primaryContainer the primary location defined in the xml file, restrictions are based off this container
+	 * @param useAll whether all bundles in the locations should be considered vs. only those specified
+	 * @return list of bundle containers
+	 */
+	private static List deserializeBundleContainersFromOldStyleElement(Element content, ITargetDefinition definition, AbstractBundleContainer primaryContainer, boolean useAll) throws CoreException {
+		List containers = new ArrayList();
+		NodeList list = content.getChildNodes();
+		List included = new ArrayList(list.getLength());
+		List optional = new ArrayList();
+		for (int i = 0; i < list.getLength(); ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				Element element = (Element) node;
+				if (!useAll && element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGINS)) {
+					NodeList plugins = element.getChildNodes();
+					for (int j = 0; j < plugins.getLength(); j++) {
+						Node lNode = plugins.item(j);
+						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
+							Element plugin = (Element) lNode;
+							String id = plugin.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+							boolean isOptional = plugin.getAttribute(TargetDefinitionPersistenceHelper.ATTR_OPTIONAL).equalsIgnoreCase(Boolean.toString(true));
+							if (id.length() > 0) {
+								NameVersionDescriptor info = new NameVersionDescriptor(id, null);
+								if (isOptional) {
+									optional.add(info);
+								} else {
+									included.add(info);
+								}
+							}
+						}
+					}
+					// Primary container is only added by default if useAllPlugins='true'
+					if (included.size() > 0 || optional.size() > 0) {
+						containers.add(primaryContainer);
+					}
+				} else if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.EXTRA_LOCATIONS)) {
+					NodeList locations = element.getChildNodes();
+					for (int j = 0; j < locations.getLength(); j++) {
+						Node lNode = locations.item(j);
+						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
+							Element location = (Element) lNode;
+							String path = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+							if (path.length() > 0) {
+								containers.add(TargetDefinitionPersistenceHelper.getTargetPlatformService().newDirectoryContainer(path));
+							}
+						}
+					}
+				} else if (!useAll && element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.FEATURES)) {
+					NodeList features = element.getChildNodes();
+					for (int j = 0; j < features.getLength(); j++) {
+						Node lNode = features.item(j);
+						if (lNode.getNodeType() == Node.ELEMENT_NODE) {
+							Element feature = (Element) lNode;
+							String id = feature.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+							if (id.length() > 0) {
+								if (primaryContainer != null) {
+									containers.add(TargetDefinitionPersistenceHelper.getTargetPlatformService().newFeatureContainer(primaryContainer.getLocation(false), id, null));
+								}
+							}
+						}
+					}
+				}
+
+			}
+		}
+		// restrictions are global to all containers
+		if (!useAll && (included.size() > 0 || optional.size() > 0)) {
+			if (included.size() > 0) {
+				definition.setIncluded((NameVersionDescriptor[]) included.toArray(new NameVersionDescriptor[included.size()]));
+			}
+			if (optional.size() > 0) {
+				definition.setOptional((NameVersionDescriptor[]) optional.toArray(new NameVersionDescriptor[optional.size()]));
+			}
+		}
+		return containers;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence35Helper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence35Helper.java
new file mode 100644
index 0000000..b2b5c37
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence35Helper.java
@@ -0,0 +1,300 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.pde.internal.core.target.provisional.*;
+import org.w3c.dom.*;
+
+/**
+ * Handles reading of target definition files that were created in 3.5 when the target
+ * platform story changed.
+ * <p>
+ * There are significant changes to the structure of the file from 3.4 and earlier versions.
+ * The same xml element names are used, but the target is organized into bundle containers
+ * (locations).
+ * </p>
+ * @see TargetDefinitionPersistenceHelper
+ */
+public class TargetPersistence35Helper {
+
+	/* Example New Style XML
+
+	<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+	<?pde version="3.5"?>
+
+	<target description="A description" name="A name">
+	<locations>
+	<location path="d:\targets\provisioning-base" type="Profile">
+	<includeBundles>
+	<plugin id="org.eclipse.core.jobs"/>
+	<plugin id="org.eclipse.equinox.app"/>
+	<plugin id="org.eclipse.osgi"/>
+	<plugin id="org.eclipse.osgi.services"/>
+	<plugin id="org.junit"/>
+	</includeBundles>
+	
+	</location>
+	<location path="D:\targets\equinox\eclipse" type="Directory">
+	<includeBundles>
+	<plugin id="org.eclipse.core.jobs"/>
+	<plugin id="org.eclipse.equinox.app"/>
+	<plugin id="org.eclipse.osgi"/>
+	<plugin id="org.eclipse.osgi.services"/>
+	<plugin id="org.junit"/>
+	</includeBundles>
+	</location>
+	</locations>
+	<environment>
+	<os>hpux</os>
+	<ws>gtk</ws>
+	<arch>ia64</arch>
+	<nl>ar</nl>
+	</environment>
+	<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.0%Foundation-1.0"/>
+	<launcherArgs>
+	<vmArgs>vm</vmArgs>
+	<programArgs>program</programArgs>
+	</launcherArgs>
+	<implicitDependencies>
+	<plugin id="javax.servlet"/>
+	<plugin id="com.jcraft.jsch"/>
+	<plugin id="ie.wombat.jbdiff"/>
+	<plugin id="javax.servlet.jsp"/>
+	<plugin id="ie.wombat.jbdiff.test"/>
+	</implicitDependencies>
+	</target>
+	 */
+
+	public static void initFromDoc(ITargetDefinition definition, Element root) throws CoreException {
+		String name = root.getAttribute(TargetDefinitionPersistenceHelper.ATTR_NAME);
+		if (name.length() > 0) {
+			definition.setName(name);
+		}
+
+		NodeList list = root.getChildNodes();
+		for (int i = 0; i < list.getLength(); ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				Element element = (Element) node;
+				String nodeName = element.getNodeName();
+				if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.LOCATIONS)) {
+					NodeList locations = element.getChildNodes();
+					for (int j = 0; j < locations.getLength(); ++j) {
+						Node locationNode = locations.item(j);
+						if (locationNode.getNodeType() == Node.ELEMENT_NODE) {
+							Element locationElement = (Element) locationNode;
+							if (locationElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.LOCATION)) {
+								deserializeBundleContainer(definition, locationElement);
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ENVIRONMENT)) {
+					NodeList envEntries = element.getChildNodes();
+					for (int j = 0; j < envEntries.getLength(); ++j) {
+						Node entry = envEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.OS)) {
+								definition.setOS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.WS)) {
+								definition.setWS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARCH)) {
+								definition.setArch(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.NL)) {
+								definition.setNL(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.TARGET_JRE)) {
+					String text = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+					if (text.length() != 0) {
+						// new format - JRE container path
+						IPath path = Path.fromPortableString(text);
+						definition.setJREContainer(path);
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARGUMENTS)) {
+					NodeList argEntries = element.getChildNodes();
+					for (int j = 0; j < argEntries.getLength(); ++j) {
+						Node entry = argEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PROGRAM_ARGS)) {
+								definition.setProgramArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.VM_ARGS)) {
+								definition.setVMArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.IMPLICIT)) {
+					NodeList implicitEntries = element.getChildNodes();
+					List implicit = new ArrayList(implicitEntries.getLength());
+					for (int j = 0; j < implicitEntries.getLength(); ++j) {
+						Node entry = implicitEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+								String version = currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								NameVersionDescriptor bundle = new NameVersionDescriptor(currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID), version.length() > 0 ? version : null);
+								implicit.add(bundle);
+							}
+						}
+					}
+					definition.setImplicitDependencies((NameVersionDescriptor[]) implicit.toArray(new NameVersionDescriptor[implicit.size()]));
+				}
+			}
+		}
+	}
+
+	/**
+	 * Uses the given location to create a bundle container.  If the container had included or optional bundles set, add them
+	 * to the appropriate set (in 3.5 each container had included/optional, in 3.6 only the target has included/optional).  The
+	 * sets may be null to indicate that no container has specified inclusion restrictions yet.
+	 * 
+	 * @param location document element representing a bundle container
+	 * @param included set to contain included bundles, possibly <code>null</code>
+	 * @param optional set to contain optional bundles, possible <code>null</code>
+	 * @return bundle container instance
+	 * @throws CoreException
+	 */
+	private static void deserializeBundleContainer(ITargetDefinition definition, Element location) throws CoreException {
+		String path = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+		String type = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_TYPE);
+		if (type.length() == 0) {
+			if (path.endsWith("plugins")) { //$NON-NLS-1$
+				type = DirectoryBundleContainer.TYPE;
+			} else {
+				type = ProfileBundleContainer.TYPE;
+			}
+		}
+		IBundleContainer container = null;
+		if (DirectoryBundleContainer.TYPE.equals(type)) {
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newDirectoryContainer(path);
+		} else if (ProfileBundleContainer.TYPE.equals(type)) {
+			String configArea = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_CONFIGURATION);
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newProfileContainer(path, configArea.length() > 0 ? configArea : null);
+		} else if (FeatureBundleContainer.TYPE.equals(type)) {
+			String version = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newFeatureContainer(path, location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID), version.length() > 0 ? version : null);
+		} else if (IUBundleContainer.TYPE.equals(type)) {
+			String includeMode = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_INCLUDE_MODE);
+			String includeAllPlatforms = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_INCLUDE_ALL_PLATFORMS);
+			NodeList list = location.getChildNodes();
+			List ids = new ArrayList();
+			List versions = new ArrayList();
+			List repos = new ArrayList();
+			for (int i = 0; i < list.getLength(); ++i) {
+				Node node = list.item(i);
+				if (node.getNodeType() == Node.ELEMENT_NODE) {
+					// TODO: missing id/version
+					Element element = (Element) node;
+					if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.INSTALLABLE_UNIT)) {
+						String id = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+						if (id.length() > 0) {
+							String version = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+							if (version.length() > 0) {
+								ids.add(id);
+								versions.add(version);
+							}
+						}
+					} else if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.REPOSITORY)) {
+						String loc = element.getAttribute(TargetDefinitionPersistenceHelper.LOCATION);
+						if (loc.length() > 0) {
+							try {
+								repos.add(new URI(loc));
+							} catch (URISyntaxException e) {
+								// TODO: illegal syntax
+							}
+						}
+					}
+				}
+			}
+			String[] iuIDs = (String[]) ids.toArray(new String[ids.size()]);
+			String[] iuVer = (String[]) versions.toArray(new String[versions.size()]);
+			URI[] uris = (URI[]) repos.toArray(new URI[repos.size()]);
+			container = new IUBundleContainer(iuIDs, iuVer, uris);
+			if (includeMode != null && includeMode.trim().length() > 0) {
+				if (includeMode.equals(TargetDefinitionPersistenceHelper.MODE_PLANNER)) {
+					((IUBundleContainer) container).setIncludeAllRequired(true, null);
+				} else if (includeMode.equals(TargetDefinitionPersistenceHelper.MODE_SLICER)) {
+					((IUBundleContainer) container).setIncludeAllRequired(false, null);
+				}
+			}
+			if (includeAllPlatforms != null && includeAllPlatforms.trim().length() > 0) {
+				((IUBundleContainer) container).setIncludeAllEnvironments(Boolean.valueOf(includeAllPlatforms).booleanValue(), null);
+			}
+
+		}
+
+		NodeList list = location.getChildNodes();
+		for (int i = 0; i < list.getLength(); ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				Element element = (Element) node;
+				if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.INCLUDE_BUNDLES)) {
+					NameVersionDescriptor[] included = deserializeBundles(element);
+					NameVersionDescriptor[] currentIncluded = definition.getIncluded();
+					if (currentIncluded == null || currentIncluded.length == 0) {
+						definition.setIncluded(included);
+					} else {
+						NameVersionDescriptor[] newIncluded = new NameVersionDescriptor[currentIncluded.length + included.length];
+						System.arraycopy(currentIncluded, 0, newIncluded, 0, currentIncluded.length);
+						System.arraycopy(included, 0, newIncluded, currentIncluded.length, included.length);
+						definition.setIncluded(newIncluded);
+					}
+				} else if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.OPTIONAL_BUNDLES)) {
+					NameVersionDescriptor[] optional = deserializeBundles(element);
+					NameVersionDescriptor[] currentOptional = definition.getIncluded();
+					if (currentOptional == null || currentOptional.length == 0) {
+						definition.setIncluded(optional);
+					} else {
+						NameVersionDescriptor[] newOptional = new NameVersionDescriptor[currentOptional.length + optional.length];
+						System.arraycopy(currentOptional, 0, newOptional, 0, currentOptional.length);
+						System.arraycopy(optional, 0, newOptional, currentOptional.length, optional.length);
+						definition.setIncluded(newOptional);
+					}
+				}
+			}
+		}
+
+		IBundleContainer[] currentContainers = definition.getBundleContainers();
+		if (currentContainers == null || currentContainers.length == 0) {
+			definition.setBundleContainers(new IBundleContainer[] {container});
+		} else {
+			IBundleContainer[] newContainers = new IBundleContainer[currentContainers.length + 1];
+			System.arraycopy(currentContainers, 0, newContainers, 0, currentContainers.length);
+			newContainers[currentContainers.length] = container;
+			definition.setBundleContainers(newContainers);
+		}
+	}
+
+	private static NameVersionDescriptor[] deserializeBundles(Element bundleContainer) {
+		NodeList nodes = bundleContainer.getChildNodes();
+		List bundles = new ArrayList(nodes.getLength());
+		for (int j = 0; j < nodes.getLength(); ++j) {
+			Node include = nodes.item(j);
+			if (include.getNodeType() == Node.ELEMENT_NODE) {
+				Element includeElement = (Element) include;
+				if (includeElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+					String id = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+					String version = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+					bundles.add(new NameVersionDescriptor(id, version.length() > 0 ? version : null));
+				}
+			}
+		}
+		return (NameVersionDescriptor[]) bundles.toArray(new NameVersionDescriptor[bundles.size()]);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence36Helper.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence36Helper.java
new file mode 100644
index 0000000..ea249cb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPersistence36Helper.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.pde.internal.core.target.provisional.*;
+import org.w3c.dom.*;
+
+/**
+ * Handles reading of target definition files that were created in 3.6.
+ * Only significant different between 3.5 and 3.6 is that the included and optional
+ * bundle restrictions are set at the target level rather than the bundle container
+ * level.  In addition, features can be use on the included settings to restrict
+ * by feature.
+ * 
+ * @see TargetDefinitionPersistenceHelper
+ */
+public class TargetPersistence36Helper {
+
+	public static void initFromDoc(ITargetDefinition definition, Element root) throws CoreException {
+		String name = root.getAttribute(TargetDefinitionPersistenceHelper.ATTR_NAME);
+		if (name.length() > 0) {
+			definition.setName(name);
+		}
+
+		String mode = root.getAttribute(TargetDefinitionPersistenceHelper.ATTR_INCLUDE_MODE);
+		if (mode.equalsIgnoreCase(TargetDefinitionPersistenceHelper.FEATURE)) {
+			((TargetDefinition) definition).setUIMode(TargetDefinition.MODE_FEATURE);
+		}
+
+		NodeList list = root.getChildNodes();
+		for (int i = 0; i < list.getLength(); ++i) {
+			Node node = list.item(i);
+			if (node.getNodeType() == Node.ELEMENT_NODE) {
+				Element element = (Element) node;
+				String nodeName = element.getNodeName();
+				if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.LOCATIONS)) {
+					NodeList locations = element.getChildNodes();
+					List bundleContainers = new ArrayList();
+					for (int j = 0; j < locations.getLength(); ++j) {
+						Node locationNode = locations.item(j);
+						if (locationNode.getNodeType() == Node.ELEMENT_NODE) {
+							Element locationElement = (Element) locationNode;
+							if (locationElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.LOCATION)) {
+								bundleContainers.add(deserializeBundleContainer(locationElement));
+							}
+						}
+					}
+					definition.setBundleContainers((IBundleContainer[]) bundleContainers.toArray(new IBundleContainer[bundleContainers.size()]));
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.INCLUDE_BUNDLES)) {
+					NodeList children = element.getChildNodes();
+					List included = new ArrayList();
+					for (int j = 0; j < children.getLength(); ++j) {
+						Node child = children.item(j);
+						if (child.getNodeType() == Node.ELEMENT_NODE) {
+							Element includeElement = (Element) child;
+							if (includeElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+								String id = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+								String version = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								included.add(new NameVersionDescriptor(id, version.length() > 0 ? version : null));
+							} else if (includeElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.FEATURE)) {
+								String id = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+								String version = includeElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								included.add(new NameVersionDescriptor(id, version.length() > 0 ? version : null, NameVersionDescriptor.TYPE_FEATURE));
+							}
+						}
+					}
+					definition.setIncluded((NameVersionDescriptor[]) included.toArray(new NameVersionDescriptor[included.size()]));
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.OPTIONAL_BUNDLES)) {
+					NodeList children = element.getChildNodes();
+					List optional = new ArrayList();
+					for (int j = 0; j < children.getLength(); ++j) {
+						Node child = children.item(j);
+						if (child.getNodeType() == Node.ELEMENT_NODE) {
+							Element optionalElement = (Element) child;
+							if (optionalElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+								String id = optionalElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+								String version = optionalElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								optional.add(new NameVersionDescriptor(id, version.length() > 0 ? version : null));
+							}
+						}
+					}
+					definition.setOptional((NameVersionDescriptor[]) optional.toArray(new NameVersionDescriptor[optional.size()]));
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ENVIRONMENT)) {
+					NodeList envEntries = element.getChildNodes();
+					for (int j = 0; j < envEntries.getLength(); ++j) {
+						Node entry = envEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.OS)) {
+								definition.setOS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.WS)) {
+								definition.setWS(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARCH)) {
+								definition.setArch(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.NL)) {
+								definition.setNL(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.TARGET_JRE)) {
+					String text = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+					if (text.length() != 0) {
+						// new format - JRE container path
+						IPath path = Path.fromPortableString(text);
+						definition.setJREContainer(path);
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.ARGUMENTS)) {
+					NodeList argEntries = element.getChildNodes();
+					for (int j = 0; j < argEntries.getLength(); ++j) {
+						Node entry = argEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PROGRAM_ARGS)) {
+								definition.setProgramArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							} else if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.VM_ARGS)) {
+								definition.setVMArguments(TargetDefinitionPersistenceHelper.getTextContent(currentElement));
+							}
+						}
+					}
+				} else if (nodeName.equalsIgnoreCase(TargetDefinitionPersistenceHelper.IMPLICIT)) {
+					NodeList implicitEntries = element.getChildNodes();
+					List implicit = new ArrayList(implicitEntries.getLength());
+					for (int j = 0; j < implicitEntries.getLength(); ++j) {
+						Node entry = implicitEntries.item(j);
+						if (entry.getNodeType() == Node.ELEMENT_NODE) {
+							Element currentElement = (Element) entry;
+							if (currentElement.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.PLUGIN)) {
+								String version = currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+								NameVersionDescriptor bundle = new NameVersionDescriptor(currentElement.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID), version.length() > 0 ? version : null);
+								implicit.add(bundle);
+							}
+						}
+					}
+					definition.setImplicitDependencies((NameVersionDescriptor[]) implicit.toArray(new NameVersionDescriptor[implicit.size()]));
+				}
+			}
+		}
+	}
+
+	/**
+	 * Uses the given location to create a bundle container.  If the container had included or optional bundles set, add them
+	 * to the appropriate set (in 3.5 each container had included/optional, in 3.6 only the target has included/optional).  The
+	 * sets may be null to indicate that no container has specified inclusion restrictions yet.
+	 * 
+	 * @param location document element representing a bundle container
+	 * @return bundle container instance
+	 * @throws CoreException
+	 */
+	private static IBundleContainer deserializeBundleContainer(Element location) throws CoreException {
+		String path = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_PATH);
+		String type = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_LOCATION_TYPE);
+		if (type.length() == 0) {
+			if (path.endsWith("plugins")) { //$NON-NLS-1$
+				type = DirectoryBundleContainer.TYPE;
+			} else {
+				type = ProfileBundleContainer.TYPE;
+			}
+		}
+		IBundleContainer container = null;
+		if (DirectoryBundleContainer.TYPE.equals(type)) {
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newDirectoryContainer(path);
+		} else if (ProfileBundleContainer.TYPE.equals(type)) {
+			String configArea = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_CONFIGURATION);
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newProfileContainer(path, configArea.length() > 0 ? configArea : null);
+		} else if (FeatureBundleContainer.TYPE.equals(type)) {
+			String version = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+			container = TargetDefinitionPersistenceHelper.getTargetPlatformService().newFeatureContainer(path, location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID), version.length() > 0 ? version : null);
+		} else if (IUBundleContainer.TYPE.equals(type)) {
+			String includeMode = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_INCLUDE_MODE);
+			String includeAllPlatforms = location.getAttribute(TargetDefinitionPersistenceHelper.ATTR_INCLUDE_ALL_PLATFORMS);
+			NodeList list = location.getChildNodes();
+			List ids = new ArrayList();
+			List versions = new ArrayList();
+			List repos = new ArrayList();
+			for (int i = 0; i < list.getLength(); ++i) {
+				Node node = list.item(i);
+				if (node.getNodeType() == Node.ELEMENT_NODE) {
+					// TODO: missing id/version
+					Element element = (Element) node;
+					if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.INSTALLABLE_UNIT)) {
+						String id = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_ID);
+						if (id.length() > 0) {
+							String version = element.getAttribute(TargetDefinitionPersistenceHelper.ATTR_VERSION);
+							if (version.length() > 0) {
+								ids.add(id);
+								versions.add(version);
+							}
+						}
+					} else if (element.getNodeName().equalsIgnoreCase(TargetDefinitionPersistenceHelper.REPOSITORY)) {
+						String loc = element.getAttribute(TargetDefinitionPersistenceHelper.LOCATION);
+						if (loc.length() > 0) {
+							try {
+								repos.add(new URI(loc));
+							} catch (URISyntaxException e) {
+								// TODO: illegal syntax
+							}
+						}
+					}
+				}
+			}
+			String[] iuIDs = (String[]) ids.toArray(new String[ids.size()]);
+			String[] iuVer = (String[]) versions.toArray(new String[versions.size()]);
+			URI[] uris = (URI[]) repos.toArray(new URI[repos.size()]);
+			container = new IUBundleContainer(iuIDs, iuVer, uris);
+			if (includeMode != null && includeMode.trim().length() > 0) {
+				if (includeMode.equals(TargetDefinitionPersistenceHelper.MODE_PLANNER)) {
+					((IUBundleContainer) container).setIncludeAllRequired(true, null);
+				} else if (includeMode.equals(TargetDefinitionPersistenceHelper.MODE_SLICER)) {
+					((IUBundleContainer) container).setIncludeAllRequired(false, null);
+				}
+			}
+			if (includeAllPlatforms != null && includeAllPlatforms.trim().length() > 0) {
+				((IUBundleContainer) container).setIncludeAllEnvironments(Boolean.valueOf(includeAllPlatforms).booleanValue(), null);
+			}
+
+		}
+		return container;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
index a1a17d8..dc0bb39 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/TargetPlatformService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,11 +15,12 @@ import java.net.*;
 import java.util.*;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
@@ -144,6 +145,21 @@ public class TargetPlatformService implements ITargetPlatformService {
 				if (target.exists())
 					local.add(target);
 			}
+		} else {
+			PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
+			String memento = preferences.getString(ICoreConstants.WORKSPACE_TARGET_HANDLE);
+			if (memento != null && memento.length() != 0 && !memento.equals(ICoreConstants.NO_TARGET)) {
+				try {
+					URI uri = new URI(memento);
+					String scheme = uri.getScheme();
+					if (ExternalFileTargetHandle.SCHEME.equals(scheme)) {
+						ITargetHandle target = getTarget(uri);
+						local.add(target);
+					}
+				} catch (URISyntaxException e) {
+					// ignore
+				}
+			}
 		}
 		return (ITargetHandle[]) local.toArray(new ITargetHandle[local.size()]);
 	}
@@ -237,6 +253,12 @@ public class TargetPlatformService implements ITargetPlatformService {
 	 * @see org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService#getWorkspaceTargetDefinition()
 	 */
 	public ITargetHandle getWorkspaceTargetHandle() throws CoreException {
+		// If the plug-in registry has not been initialized we may not have a target set, getting the start forces the init
+		PluginModelManager manager = PDECore.getDefault().getModelManager();
+		if (!manager.isInitialized()) {
+			manager.getExternalModelManager();
+		}
+
 		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
 		String memento = preferences.getString(ICoreConstants.WORKSPACE_TARGET_HANDLE);
 		if (memento != null && memento.length() != 0 && !memento.equals(ICoreConstants.NO_TARGET)) {
@@ -341,11 +363,11 @@ public class TargetPlatformService implements ITargetPlatformService {
 		String value = preferences.getString(ICoreConstants.IMPLICIT_DEPENDENCIES);
 		if (value.length() > 0) {
 			StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$
-			BundleInfo[] plugins = new BundleInfo[tokenizer.countTokens()];
+			NameVersionDescriptor[] plugins = new NameVersionDescriptor[tokenizer.countTokens()];
 			int i = 0;
 			while (tokenizer.hasMoreTokens()) {
 				String id = tokenizer.nextToken();
-				plugins[i++] = new BundleInfo(id, null, null, BundleInfo.NO_LEVEL, false);
+				plugins[i++] = new NameVersionDescriptor(id, null);
 			}
 			target.setImplicitDependencies(plugins);
 		}
@@ -415,7 +437,6 @@ public class TargetPlatformService implements ITargetPlatformService {
 
 	private void initializePluginContent(PDEPreferencesManager preferences, ITargetDefinition target) {
 		String value = preferences.getString(ICoreConstants.CHECKED_PLUGINS);
-		IBundleContainer primary = target.getBundleContainers()[0];
 		if (value.length() == 0 || value.equals(ICoreConstants.VALUE_SAVED_NONE)) {
 			// no bundles
 			target.setBundleContainers(null);
@@ -425,16 +446,27 @@ public class TargetPlatformService implements ITargetPlatformService {
 			// restrictions on container
 			IPluginModelBase[] models = PluginRegistry.getExternalModels();
 			ArrayList list = new ArrayList(models.length);
+			Set disabledIDs = new HashSet();
+			for (int i = 0; i < models.length; i++) {
+				if (!models[i].isEnabled()) {
+					disabledIDs.add(models[i].getPluginBase().getId());
+				}
+			}
 			for (int i = 0; i < models.length; i++) {
 				if (models[i].isEnabled()) {
 					String id = models[i].getPluginBase().getId();
 					if (id != null) {
-						list.add(new BundleInfo(id, null, null, BundleInfo.NO_LEVEL, false));
+						if (disabledIDs.contains(id)) {
+							// include version info since some versions are disabled
+							list.add(new NameVersionDescriptor(id, models[i].getPluginBase().getVersion()));
+						} else {
+							list.add(new NameVersionDescriptor(id, null));
+						}
 					}
 				}
 			}
 			if (list.size() > 0) {
-				primary.setIncludedBundles((BundleInfo[]) list.toArray(new BundleInfo[list.size()]));
+				target.setIncluded((NameVersionDescriptor[]) list.toArray(new NameVersionDescriptor[list.size()]));
 			}
 		}
 
@@ -538,7 +570,7 @@ public class TargetPlatformService implements ITargetPlatformService {
 					// it's not in the state... if it's not really in the target either (missing) this
 					// is not an error
 					IStatus status = bundle.getStatus();
-					if (status.isOK() || (status.getCode() != IResolvedBundle.STATUS_DOES_NOT_EXIST && status.getCode() != IResolvedBundle.STATUS_VERSION_DOES_NOT_EXIST)) {
+					if (status.isOK() || (status.getCode() != IResolvedBundle.STATUS_PLUGIN_DOES_NOT_EXIST && status.getCode() != IResolvedBundle.STATUS_FEATURE_DOES_NOT_EXIST && status.getCode() != IResolvedBundle.STATUS_VERSION_DOES_NOT_EXIST)) {
 						// its in the target, missing in the state
 						IStatus s = new Status(IStatus.WARNING, PDECore.PLUGIN_ID, ITargetPlatformService.STATUS_MISSING_FROM_TARGET_PLATFORM, bundle.getBundleInfo().getSymbolicName(), null);
 						multi.add(s);
@@ -599,19 +631,23 @@ public class TargetPlatformService implements ITargetPlatformService {
 	 * having PDE's bundle pool area grow unbounded.
 	 */
 	public void garbageCollect() {
-		IProfileRegistry registry = (IProfileRegistry) PDECore.getDefault().acquireService(IProfileRegistry.class.getName());
-		if (registry != null) {
-			IProfile[] profiles = registry.getProfiles();
-			if (profiles.length > 0) {
-				IProfile profile = null;
-				for (int i = 0; i < profiles.length; i++) {
-					if (profiles[i].getProfileId().startsWith(AbstractTargetHandle.PROFILE_ID_PREFIX)) {
-						profile = profiles[i];
-						break;
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent != null) {
+			IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+			if (registry != null) {
+				IProfile[] profiles = registry.getProfiles();
+				if (profiles.length > 0) {
+					IProfile profile = null;
+					for (int i = 0; i < profiles.length; i++) {
+						if (profiles[i].getProfileId().startsWith(AbstractTargetHandle.PROFILE_ID_PREFIX)) {
+							profile = profiles[i];
+							break;
+						}
+					}
+					if (profile != null) {
+						GarbageCollector gc = (GarbageCollector) agent.getService(GarbageCollector.SERVICE_NAME);
+						gc.runGC(profile);
 					}
-				}
-				if (profile != null) {
-					new GarbageCollector().runGC(profile);
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IBundleContainer.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IBundleContainer.java
index 0191652..6662472 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IBundleContainer.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IBundleContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
 package org.eclipse.pde.internal.core.target.provisional;
 
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 
 /**
  * A collection of bundles. A bundle container abstracts the storage and location of the
@@ -30,7 +30,7 @@ public interface IBundleContainer {
 	 * returned. If the progress monitor is canceled a CANCEL status will be returned.
 	 * </p><p>
 	 * Note that the returned status may differ from the result of calling 
-	 * {@link #getBundleStatus()}
+	 * {@link #getStatus()}
 	 * </p>
 	 * @param definition target being resolved for
 	 * @param monitor progress monitor or <code>null</code>
@@ -40,17 +40,15 @@ public interface IBundleContainer {
 	public IStatus resolve(ITargetDefinition definition, IProgressMonitor monitor);
 
 	/**
-	 * Returns the status of the bundles in this container or <code>null</code> if 
+	 * Returns the status of the last bundle resolution or <code>null</code> if 
 	 * this container has not been resolved.  If there was a problem during the 
-	 * resolution, a single status explaining the problem will be returned, see
-	 * {@link #resolve(ITargetDefinition, IProgressMonitor)}.  Otherwise a multi-status
-	 * will be returned containing all non-OK statuses on the bundles in this container
-	 * (the bundles in this container can be retrieved by calling {@link #getBundles()}. 
+	 * resolution, a status, possibly a multi-status explaining the problem will be 
+	 * returned, see {@link #resolve(ITargetDefinition, IProgressMonitor)}. 
 	 * 	 
 	 * @see IBundleContainer#getBundles()
-	 * @return single resolution status, bundle multi-status or <code>null</code>
+	 * @return single resolution status or <code>null</code>
 	 */
-	public IStatus getBundleStatus();
+	public IStatus getStatus();
 
 	/**
 	 * Returns whether this container has resolved all of its contained bundles.
@@ -61,14 +59,11 @@ public interface IBundleContainer {
 	public boolean isResolved();
 
 	/**
-	 * Returns the bundles in this container or <code>null</code> if this container is
-	 * not resolved.  The returned list of bundles will be filtered if included bundles
-	 * {@link #setIncludedBundles(BundleInfo[])} or optional bundles
-	 * {@link #setOptionalBundles(BundleInfo[])} have been set.
+	 * Returns the bundles in this container or <code>null</code> if this container is not resolved
 	 * <p>
 	 * Some of the returned bundles may have non-OK statuses.  These bundles may be missing some
 	 * information (location, version, source target).  To get a bundle's status call
-	 * {@link IResolvedBundle#getStatus()}.  You can also use {@link #getBundleStatus()} to
+	 * {@link IResolvedBundle#getStatus()}.  You can also use {@link #getStatus()} to
 	 * get the complete set of problems.
 	 * </p>
 	 * @return resolved bundles or <code>null</code>
@@ -76,54 +71,16 @@ public interface IBundleContainer {
 	public IResolvedBundle[] getBundles();
 
 	/**
-	 * Returns the list of resolved bundles in this container.  Does not filter based on any
-	 * includedBundles or optionalBundles set on this container.  Returns <code>null</code> if
-	 * this container has not been resolved.  Use {@link #getBundles()} to get the restricted
-	 * list of bundles.
-	 *  
-	 * @return collection of resolved bundles or <code>null</code>
-	 */
-	public IResolvedBundle[] getAllBundles();
-
-	/**
-	 * Restricts the bundles in this container to the explicit set of bundles specified or
-	 * all bundles in this container when <code>null</code>. When this container resolves
-	 * bundles and source bundles the result will be limited to those bundles matching the
-	 * bundles specified.
+	 * Returns all features available in this container or <code>null</code> if this container is
+	 * not resolved.
 	 * <p>
-	 * When bundle versions are specified, resolving will enforce version matching. When
-	 * bundle versions are unspecified, resolving will select the bundle with the highest
-	 * version identifier and matching symbolic name.
+	 * This method may return no features, even if the container has multiple bundles.  For all
+	 * returned features, the bundles that the features reference should be returned in the list
+	 * returned by {@link #getBundles()}
 	 * </p>
-	 * @param bundles bundle restriction or <code>null</code> for all bundles
-	 */
-	public void setIncludedBundles(BundleInfo[] bundles);
-
-	/**
-	 * Returns the explicit list of bundles to be included in the bundle container.  Any 
-	 * bundles in the container that are not included in this list will not be included 
-	 * in the result of {@link #resolveBundles(IProgressMonitor)}. This method will return 
-	 * <code>null</code> if an explicit list has not been set, all bundles will be included
-	 * in the container.
-	 * 
-	 * @return list of included bundles set or <code>null</code> if all bundles included
-	 */
-	public BundleInfo[] getIncludedBundles();
-
-	/**
-	 * Describes a set of bundles in this container that are optional. During resolution,
-	 * missing optional bundles are not considered as resolution errors.
-	 * 
-	 * @param bundles optional bundles or <code>null</code>
-	 */
-	public void setOptionalBundles(BundleInfo[] bundles);
-
-	/**
-	 * Returns bundles that are optionally part of this container or <code>null</code> if none.
-	 * 
-	 * @return optional bundles or <code>null</code>
+	 * @return features or <code>null</code>
 	 */
-	public BundleInfo[] getOptionalBundles();
+	public IFeatureModel[] getFeatures();
 
 	/**
 	 * Returns VM Arguments that are specified in the bundle container or <code>null</code> if none.
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IResolvedBundle.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IResolvedBundle.java
index 265c516..9c83b67 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IResolvedBundle.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/IResolvedBundle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
 package org.eclipse.pde.internal.core.target.provisional;
 
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 
 /**
  * A resolved bundle contained in a bundle container of a target definition.
@@ -25,7 +25,12 @@ public interface IResolvedBundle {
 	/**
 	 * Status code indicating that a required bundle does not exist.
 	 */
-	public static final int STATUS_DOES_NOT_EXIST = 100;
+	public static final int STATUS_PLUGIN_DOES_NOT_EXIST = 100;
+
+	/**
+	 * Status code indicating that a required bundle does not exist.
+	 */
+	public static final int STATUS_FEATURE_DOES_NOT_EXIST = 110;
 
 	/**
 	 * Status code indicating that a required bundle version does not exist (a bundle
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetDefinition.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetDefinition.java
index 2557ae9..02807c5 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetDefinition.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetDefinition.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,9 @@
 package org.eclipse.pde.internal.core.target.provisional;
 
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.osgi.service.environment.Constants;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 
 /**
  * Defines a target platform. A target platform is a collection of bundles configured
@@ -144,10 +144,58 @@ public interface ITargetDefinition {
 	public void setBundleContainers(IBundleContainer[] containers);
 
 	/**
-	 * Returns all bundles in this target definition or <code>null</code>
-	 * if this container is not resolved.  Equivalent to collecting the result
-	 * of {@link IBundleContainer#getBundles()} on each of the bundle containers
-	 * in this target.
+	 * Sets a list of descriptors to filter the resolved plug-ins in this target.  The list may include both
+	 * plug-ins and features.  To include all plug-ins in the target, pass <code>null</code> as the argument.
+	 * <p>
+	 * The descriptions passed to this method must have an ID set.  The version may be <code>null</code>
+	 * to include any version of the matches the ID.  Only descriptors with a type of {@link NameVersionDescriptor#TYPE_FEATURE}
+	 * or {@link NameVersionDescriptor#TYPE_PLUGIN} will be considered.
+	 * </p>
+	 * @see #getBundles()
+	 * @see #getIncluded()
+	 * @param included list of descriptors to include in the target or <code>null</code> to include all plug-ins
+	 */
+	public void setIncluded(NameVersionDescriptor[] included);
+
+	/**
+	 * Returns a list of descriptors that filter the resolved plug-ins in this target.  The list may include
+	 * both plug-ins and features.  The returned descriptors will have an id, may have a version and will have
+	 * either {@link NameVersionDescriptor#TYPE_FEATURE} or {@link NameVersionDescriptor#TYPE_PLUGIN} as their
+	 * type.  If the target is set to include all units (no filtering is being done), this method will return 
+	 * <code>null</code>.
+	 * 
+	 * @see #getBundles()
+	 * @see #setIncluded()
+	 * @return list of name version descriptors or <code>null</code>
+	 */
+	public NameVersionDescriptor[] getIncluded();
+
+	/**
+	 * Sets a list of descriptors used to add optional bundles to the resolved target.  To not use optional bundles
+	 * pass <code>null</code> as the argument.  Only {@link NameVersionDescriptor}s with a type of {@link NameVersionDescriptor#TYPE_PLUGIN}
+	 * will be considered. The unit descriptions passed to this method must have an ID set, but the version may be <code>null</code>
+	 * to include any version of that plug-in.
+	 * 
+	 * @param included list of units to include in the target or <code>null</code> to not use optional bundles
+	 */
+	public void setOptional(NameVersionDescriptor[] optional);
+
+	/**
+	 * Returns a list of descriptors used to add optional bundles to the resolved target.  If optional
+	 * bundles are not being used in this target this method will return <code>null</code>.  The returned
+	 * descriptors will have an ID set, may have a version set and will have a type of {@link NameVersionDescriptor#TYPE_PLUGIN}.
+	 * 
+	 * @return list of name version descriptors or <code>null</code>
+	 */
+	public NameVersionDescriptor[] getOptional();
+
+	/**
+	 * Returns all bundles included in this target definition or <code>null</code>
+	 * if this container is not resolved.  Takes all the bundles available from the
+	 * set bundle containers (result returned by {@link #getAllBundles()} and applies
+	 * the filters set by {@link #setIncluded(NameVersionDescriptor[])} and 
+	 * {@link #setOptional(NameVersionDescriptor[])} to determine the final list of 
+	 * bundles in this target.
 	 * <p>
 	 * Some of the returned bundles may have non-OK statuses.  These bundles may be missing some
 	 * information (location, version, source target).  To get a bundle's status call
@@ -163,13 +211,21 @@ public interface ITargetDefinition {
 	 * Returns the list of resolved bundles in this target definition or <code>null</code>. 
 	 * Does not filter based on any includedBundles or optionalBundles set on bundle containers.
 	 * Returns <code>null</code> if this target has not been resolved. 
-	 * Use {@link #getBundles()} to get the restricted list of bundles.
+	 * Use {@link #getBundles()} to get the filtered list of bundles.
 	 *  
 	 * @return collection of resolved bundles or <code>null</code>
 	 */
 	public IResolvedBundle[] getAllBundles();
 
 	/**
+	 * Returns the list of feature models available in this target or <code>null</code> if
+	 * this target has not been resolved.
+	 * 
+	 * @return collection of feature models or <code>null</code>
+	 */
+	public IFeatureModel[] getAllFeatures();
+
+	/**
 	 * Resolves all bundles in this target definition by resolving each
 	 * bundle container in this target definition.
 	 * <p>
@@ -201,7 +257,7 @@ public interface ITargetDefinition {
 	 * Returns a multi-status containing the bundle status of all bundle containers
 	 * in this target or <code>null</code> if this target has not been resolved.  For
 	 * information on the statuses collected from the bundle containers see
-	 * {@link IBundleContainer#getBundleStatus()}.
+	 * {@link IBundleContainer#getStatus()}.
 	 * 
 	 * @see #getBundles()
 	 * @return multi-status containing status for each bundle container or <code>null</code>
@@ -250,11 +306,11 @@ public interface ITargetDefinition {
 	/**
 	 * Sets implicit dependencies for this target. Bundles in this collection are always
 	 * considered by PDE when computing plug-in dependencies. Only symbolic names need to
-	 * be specified in the given bundle descriptions. 
+	 * be specified in the given descriptors. 
 	 * 
 	 * @param bundles implicit dependencies or <code>null</code> if none
 	 */
-	public void setImplicitDependencies(BundleInfo[] bundles);
+	public void setImplicitDependencies(NameVersionDescriptor[] bundles);
 
 	/**
 	 * Returns the implicit dependencies set on this target or <code>null</code> if none.
@@ -263,14 +319,5 @@ public interface ITargetDefinition {
 	 * 
 	 * @return implicit dependencies or <code>null</code>
 	 */
-	public BundleInfo[] getImplicitDependencies();
-
-	/**
-	 * Returns implicit dependencies resolved against the actual bundles contained in this target
-	 * or <code>null</code> if this target has not been resolved. Matches symbolic names and optional
-	 * versions of implicit dependencies against the actual bundles in this target.
-	 *  
-	 * @return resolved implicit dependencies or <code>null</code>
-	 */
-	public IResolvedBundle[] getResolvedImplicitDependencies();
+	public NameVersionDescriptor[] getImplicitDependencies();
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetPlatformService.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetPlatformService.java
index a336b79..c9a2d43 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetPlatformService.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/ITargetPlatformService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,10 +10,11 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.core.target.provisional;
 
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+
 import java.net.URI;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
 
 /**
  * A service to manage target platform definitions available to the workspace.
@@ -170,7 +171,8 @@ public interface ITargetPlatformService {
 
 	/**
 	 * Returns a handle to the target definition that corresponds to the active target platform
-	 * or <code>null</code> if none.
+	 * or <code>null</code> if none.  If the plug-in registry has not been initialized, this method
+	 * will initialize it so the workspace target can be set.
 	 * 
 	 * @return handle to workspace target platform or <code>null</code> if none
 	 * @exception CoreException if an error occurs generating the handle
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/LoadTargetDefinitionJob.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/LoadTargetDefinitionJob.java
index ec31b20..495a189 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/LoadTargetDefinitionJob.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/LoadTargetDefinitionJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,15 +16,18 @@ import java.net.URL;
 import java.util.*;
 import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.core.variables.IStringVariableManager;
 import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.p2.metadata.Version;
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.*;
 
 /**
@@ -56,9 +59,27 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 	 * @param target target definition or <code>null</code> if none
 	 */
 	public static void load(ITargetDefinition target) {
+		load(target, null);
+	}
+
+	/**
+	 * Constructs a new operation to load the specified target definition
+	 * as the current target platform. When <code>null</code> is specified
+	 * the target platform is empty and all other settings are default.  This
+	 * method will cancel all existing LoadTargetDefinitionJob instances then
+	 * schedules the operation as a user job.  Adds the given listener to the
+	 * job that is started.
+	 * 
+	 * @param target target definition or <code>null</code> if none
+	 * @param listener job change listener that will be added to the created job
+	 */
+	public static void load(ITargetDefinition target, IJobChangeListener listener) {
 		Job.getJobManager().cancel(JOB_FAMILY_ID);
 		Job job = new LoadTargetDefinitionJob(target);
 		job.setUser(true);
+		if (listener != null) {
+			job.addJobChangeListener(listener);
+		}
 		job.schedule();
 	}
 
@@ -216,12 +237,12 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 	 * @param monitor progress monitor
 	 */
 	private void loadImplicitPlugins(PDEPreferencesManager pref, IProgressMonitor monitor) {
-		BundleInfo[] infos = fTarget.getImplicitDependencies();
+		NameVersionDescriptor[] infos = fTarget.getImplicitDependencies();
 		if (infos != null) {
 			monitor.beginTask(Messages.LoadTargetOperation_implicitPluginsTaskName, infos.length + 1);
 			StringBuffer buffer = new StringBuffer();
 			for (int i = 0; i < infos.length; i++) {
-				buffer.append(infos[i].getSymbolicName()).append(',');
+				buffer.append(infos[i].getId()).append(',');
 				monitor.worked(1);
 			}
 			if (infos.length > 0)
@@ -334,13 +355,19 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 			Set included = new HashSet();
 			Set duplicates = new HashSet();
 			List infos = new ArrayList();
+			Set includedIds = new HashSet();
 
 			if (!fTarget.isResolved()) {
+				// Even if there are errors in the target, don't interrupt the user with an error dialog
 				fTarget.resolve(subMon.newChild(20));
 			} else {
 				subMon.worked(20);
 			}
 
+			if (subMon.isCanceled()) {
+				return;
+			}
+
 			// collect all bundles, ignoring duplicates (symbolic name & version)
 			IResolvedBundle[] resolved = fTarget.getBundles();
 			List pooled = new ArrayList();
@@ -354,10 +381,11 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 					considerPool = considerPool || inPool;
 					if (!duplicates.contains(desc)) {
 						if (inPool) {
-							pooled.add(desc);
+							pooled.add(file);
 						}
 						infos.add(bundleInfo);
 						included.add(bundleInfo);
+						includedIds.add(bundleInfo.getSymbolicName());
 						duplicates.add(desc);
 					}
 				}
@@ -365,20 +393,13 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 
 			// Compute missing (not included) bundles (preference need to know disabled/missing bundles)
 			List missing = new ArrayList();
-			IBundleContainer[] containers = fTarget.getBundleContainers();
-			if (containers != null) {
-				for (int i = 0; i < containers.length; i++) {
-					IBundleContainer container = containers[i];
-					BundleInfo[] restrictions = container.getIncludedBundles();
-					if (restrictions != null) {
-						container.setIncludedBundles(null);
-						IResolvedBundle[] all = container.getAllBundles();
-						for (int j = 0; j < all.length; j++) {
-							IResolvedBundle bi = all[j];
-							if (!included.contains(bi.getBundleInfo())) {
-								missing.add(bi.getBundleInfo());
-							}
-						}
+			NameVersionDescriptor[] restrictions = fTarget.getIncluded();
+			if (restrictions != null) {
+				IResolvedBundle[] all = fTarget.getAllBundles();
+				for (int j = 0; j < all.length; j++) {
+					IResolvedBundle bi = all[j];
+					if (!included.contains(bi.getBundleInfo())) {
+						missing.add(bi.getBundleInfo());
 					}
 				}
 			}
@@ -396,30 +417,45 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 
 			// generate URLs and save CHECKED_PLUGINS (which are missing), and add to master list of paths
 			StringBuffer checked = new StringBuffer();
-			int i = 0;
+			StringBuffer versions = new StringBuffer();
+			int count = 0;
 			iterator = missing.iterator();
-			Set missingIds = new HashSet(missing.size());
+			Set missingDescriptions = new HashSet(missing.size());
 			while (iterator.hasNext()) {
 				BundleInfo bi = (BundleInfo) iterator.next();
-				missingIds.add(bi.getSymbolicName());
+				NameVersionDescriptor desc = new NameVersionDescriptor(bi.getSymbolicName(), bi.getVersion());
+				missingDescriptions.add(desc);
 				try {
 					paths.add(new File(bi.getLocation()).toURL());
 				} catch (MalformedURLException e) {
 					throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.LoadTargetDefinitionJob_1, e));
 				}
-				if (i > 0) {
+				if (count > 0) {
 					checked.append(" "); //$NON-NLS-1$
 				}
 				checked.append(bi.getSymbolicName());
-				i++;
+				count++;
+				if (includedIds.contains(bi.getSymbolicName())) {
+					// multiple versions of the bundle are available and some are included - store version info of excluded bundles
+					if (versions.length() > 0) {
+						versions.append(" "); //$NON-NLS-1$
+					}
+					versions.append(desc.toPortableString());
+				}
 			}
 
 			URL[] urls = (URL[]) paths.toArray(new URL[paths.size()]);
 			PDEState state = new PDEState(urls, true, new SubProgressMonitor(monitor, 45));
 			IPluginModelBase[] models = state.getTargetModels();
-			for (i = 0; i < models.length; i++) {
-				models[i].setEnabled(!missingIds.contains(models[i].getPluginBase().getId()));
+			for (int i = 0; i < models.length; i++) {
+				NameVersionDescriptor nv = new NameVersionDescriptor(models[i].getPluginBase().getId(), models[i].getPluginBase().getVersion());
+				models[i].setEnabled(!missingDescriptions.contains(nv));
 			}
+
+			if (subMon.isCanceled()) {
+				return;
+			}
+
 			// save CHECKED_PLUGINS
 			if (urls.length == 0) {
 				pref.setValue(ICoreConstants.CHECKED_PLUGINS, ICoreConstants.VALUE_SAVED_NONE);
@@ -428,36 +464,101 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 			} else {
 				pref.setValue(ICoreConstants.CHECKED_PLUGINS, checked.toString());
 			}
+			// save CHECKED_VERSION_PLUGINS
+			if (versions.length() > 0) {
+				pref.setValue(ICoreConstants.CHECKED_VERSION_PLUGINS, versions.toString());
+			} else {
+				// no version information required
+				pref.setValue(ICoreConstants.CHECKED_VERSION_PLUGINS, ICoreConstants.VALUE_SAVED_NONE);
+			}
 
 			// saved POOLED_BUNDLES
 			if (pooled.isEmpty()) {
 				if (considerPool) {
 					// all pooled bundles are excluded
-					pref.setValue(ICoreConstants.POOLED_BUNDLES, ICoreConstants.VALUE_SAVED_NONE);
+					pref.setValue(ICoreConstants.POOLED_URLS, ICoreConstants.VALUE_SAVED_NONE);
 				} else {
 					// nothing in the pool
-					pref.setValue(ICoreConstants.POOLED_BUNDLES, ""); //$NON-NLS-1$
+					pref.setValue(ICoreConstants.POOLED_URLS, ""); //$NON-NLS-1$
 				}
 			} else {
 				StringBuffer buf = new StringBuffer();
 				Iterator iterator2 = pooled.iterator();
 				while (iterator2.hasNext()) {
-					NameVersionDescriptor desc = (NameVersionDescriptor) iterator2.next();
-					buf.append(desc.getId());
-					buf.append(',');
-					String version = desc.getVersion();
-					if (version == null) {
-						buf.append(ICoreConstants.VALUE_SAVED_NONE); // indicates null version
-					} else {
-						buf.append(version);
-					}
+					File bundle = (File) iterator2.next();
+					buf.append(bundle.getName()); // only store file name to make workspace portable
 					if (iterator2.hasNext()) {
 						buf.append(',');
 					}
 				}
-				pref.setValue(ICoreConstants.POOLED_BUNDLES, buf.toString());
+				pref.setValue(ICoreConstants.POOLED_URLS, buf.toString());
+				pref.setValue(ICoreConstants.POOLED_BUNDLES, ""); // NO LONGER USED //$NON-NLS-1$
 			}
 
+			// Save the feature list for the external feature model manager to EXTERNAL_FEATURES
+			StringBuffer featureList = new StringBuffer();
+			IFeatureModel[] features = fTarget.getAllFeatures();
+
+			// If the target has includes, but only plug-ins are specified, just include all features
+
+			// If the target has feature includes, only add features that are included (bug 308693)
+			NameVersionDescriptor[] includes = fTarget.getIncluded();
+			boolean featuresFound = false; // If only plug-ins are specified, include all features
+			if (includes != null) {
+				for (int i = 0; i < includes.length; i++) {
+					if (includes[i].getType() == NameVersionDescriptor.TYPE_FEATURE) {
+						featuresFound = true;
+						IFeatureModel bestMatch = null;
+						for (int j = 0; j < features.length; j++) {
+							if (features[j].getFeature().getId().equals(includes[i].getId())) {
+								if (includes[i].getVersion() != null) {
+									// Try to find an exact feature match
+									if (includes[i].getVersion().equals(features[j].getFeature().getVersion())) {
+										// Exact match
+										bestMatch = features[j];
+										break;
+									}
+								} else if (bestMatch != null) {
+									// If no version specified take the highest version
+									Version v1 = Version.parseVersion(features[j].getFeature().getVersion());
+									Version v2 = Version.parseVersion(bestMatch.getFeature().getVersion());
+									if (v1.compareTo(v2) > 0) {
+										bestMatch = features[j];
+									}
+								}
+
+								if (bestMatch == null) {
+									// If we can't find a version match, just take any name match
+									bestMatch = features[j];
+								}
+							}
+						}
+						if (bestMatch != null) {
+							if (featureList.length() > 0) {
+								featureList.append(',');
+							}
+							featureList.append(bestMatch.getFeature().getId());
+							featureList.append('@');
+							featureList.append(bestMatch.getFeature().getVersion());
+						}
+					}
+				}
+			}
+
+			if (includes == null || !featuresFound) {
+				// Add all features to the list
+				for (int i = 0; i < features.length; i++) {
+					featureList.append(features[i].getFeature().getId());
+					featureList.append('@');
+					featureList.append(features[i].getFeature().getVersion());
+					if (i < features.length - 1) {
+						featureList.append(',');
+					}
+				}
+			}
+
+			pref.setValue(ICoreConstants.EXTERNAL_FEATURES, featureList.toString());
+
 			Job job = new TargetPlatformResetJob(state);
 			job.schedule();
 			try {
@@ -471,5 +572,4 @@ public class LoadTargetDefinitionJob extends WorkspaceJob {
 			subMon.done();
 		}
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/NameVersionDescriptor.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/NameVersionDescriptor.java
new file mode 100644
index 0000000..7020126
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/provisional/NameVersionDescriptor.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.core.target.provisional;
+
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+
+/**
+ * Describes something with a name and version.
+ */
+public class NameVersionDescriptor {
+
+	public static final String TYPE_PLUGIN = "plugin"; //$NON-NLS-1$
+	public static final String TYPE_FEATURE = "feature"; //$NON-NLS-1$
+
+	private String fId;
+	private String fVersion;
+	private String fType;
+
+	/**
+	 * Constructs a descriptor with a type of 'plugin'
+	 * <p>
+	 * If the passed string version is equal to {@link BundleInfo#EMPTY_VERSION}, 
+	 * the version will be replaced with <code>null</code>.
+	 * </p>
+	 * 
+	 * @param id name identifier
+	 * @param version version identifier, can be <code>null</code>
+	 */
+	public NameVersionDescriptor(String id, String version) {
+		fId = id;
+		// If an empty version was passed to the constructor, treat it as if null was passed
+		if (version == null || version.equals(BundleInfo.EMPTY_VERSION)) {
+			fVersion = null;
+		} else {
+			fVersion = version;
+		}
+		fType = TYPE_PLUGIN;
+	}
+
+	/**
+	 * Constructs a descriptor of the given type
+	 * <p>
+	 * If the passed string version is equal to {@link BundleInfo#EMPTY_VERSION}, 
+	 * the version will be replaced with <code>null</code>.
+	 * </p>
+	 * 
+	 * @param id name identifier
+	 * @param version version identifier, can be <code>null</code>
+	 * @param type type of object this descriptor represents, should be one of the TYPE constants defined in this file
+	 */
+	public NameVersionDescriptor(String id, String version, String type) {
+		fId = id;
+		// If an empty version was passed to the constructor, treat it as if null was passed
+		if (version == null || version.equals(BundleInfo.EMPTY_VERSION)) {
+			fVersion = null;
+		} else {
+			fVersion = version;
+		}
+		fType = type;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (obj instanceof NameVersionDescriptor) {
+			NameVersionDescriptor iud = (NameVersionDescriptor) obj;
+			if (fId.equals(iud.fId)) {
+				return (fVersion != null && fVersion.equals(iud.fVersion)) || (fVersion == null && iud.fVersion == null);
+			}
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return fId.hashCode() + (fVersion != null ? fVersion.hashCode() : 0);
+	}
+
+	public String getId() {
+		return fId;
+	}
+
+	public String getVersion() {
+		return fVersion;
+	}
+
+	public String getType() {
+		return fType;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append(fId);
+		buf.append('_');
+		buf.append(fVersion);
+		buf.append('_');
+		buf.append(fType);
+		return buf.toString();
+	}
+
+	/**
+	 * Creates a descriptor from a portable string.
+	 * 
+	 * @param portable generated from {@link #toPortableString()}
+	 * @return descriptor
+	 */
+	public static NameVersionDescriptor fromPortableString(String portable) {
+		int index = portable.indexOf('@');
+		if (index > 0) {
+			String name = portable.substring(0, index);
+			String ver = null;
+			index++;
+			if (index < portable.length()) {
+				ver = portable.substring(index);
+			}
+			return new NameVersionDescriptor(name, ver);
+		}
+		return new NameVersionDescriptor(portable, null);
+	}
+
+	/**
+	 * Returns a portable form for this descriptor.
+	 * 
+	 * @return portable form
+	 */
+	public String toPortableString() {
+		StringBuffer buf = new StringBuffer();
+		buf.append(fId);
+		buf.append('@');
+		buf.append(fVersion);
+		return buf.toString();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/CoreUtility.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/CoreUtility.java
index bc0798f..a3a1598 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/CoreUtility.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/CoreUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,10 @@ import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.HostSpecification;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.build.IPDEBuildConstants;
-import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.IFeaturePlugin;
 
 public class CoreUtility {
 
@@ -136,6 +139,32 @@ public class CoreUtility {
 		if (model == null)
 			return true;
 
+		// check bundle header
+		if (model instanceof IBundlePluginModelBase) {
+			IBundleModel bundleModel = ((IBundlePluginModelBase) model).getBundleModel();
+			if (bundleModel != null) {
+				IBundle b = bundleModel.getBundle();
+				String header = b.getHeader(ICoreConstants.ECLIPSE_BUNDLE_SHAPE);
+				if (header != null) {
+					return ICoreConstants.SHAPE_DIR.equals(header);
+				}
+			}
+		}
+
+		// check features
+		FeatureModelManager manager = PDECore.getDefault().getFeatureModelManager();
+		IFeatureModel[] models = manager.getModels();
+		for (int i = 0; i < models.length; i++) {
+			IFeatureModel featureModel = models[i];
+			IFeaturePlugin[] plugins = featureModel.getFeature().getPlugins();
+			for (int j = 0; j < plugins.length; j++) {
+				IFeaturePlugin featurePlugin = plugins[j];
+				if (featurePlugin.getId().equals(bundle.getSymbolicName())) {
+					return featurePlugin.isUnpack();
+				}
+			}
+		}
+
 		IPluginLibrary[] libraries = model.getPluginBase().getLibraries();
 		if (libraries.length == 0)
 			return false;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/IdUtil.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/IdUtil.java
index 5cbe543..454a131 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/IdUtil.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/IdUtil.java
@@ -59,7 +59,7 @@ public class IdUtil {
 	}
 
 	public static String getValidId(String projectName) {
-		return projectName.replaceAll("[^a-zA-Z0-9\\._]", "_"); //$NON-NLS-1$ //$NON-NLS-2$
+		return projectName.replaceAll("[^a-zA-Z0-9\\._-]", "_"); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/ManifestUtils.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/ManifestUtils.java
index 88120ca..99b88c7 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/ManifestUtils.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/ManifestUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import org.eclipse.pde.core.build.IBuild;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class ManifestUtils {
 
@@ -74,7 +75,7 @@ public class ManifestUtils {
 	}
 
 	public final static IBuild getBuild(IProject project) {
-		IFile buildProps = project.getFile("build.properties"); //$NON-NLS-1$
+		IFile buildProps = PDEProject.getBuildProperties(project);
 		if (buildProps.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(buildProps);
 			if (model != null)
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
index 64b1930..8771364 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/SchemaUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,16 +11,11 @@
 
 package org.eclipse.pde.internal.core.util;
 
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
+import java.net.*;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
-
 import org.eclipse.pde.internal.core.PDECore;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
@@ -31,19 +26,38 @@ import org.xml.sax.helpers.DefaultHandler;
  */
 public class SchemaUtil {
 
-	public static InputStream getInputStream(URL url) throws IOException {
+	/**
+	 * Returns a URL connection that an input stream can be obtained from.  The
+	 * URL Connection can handle urls of a variety of types including files, jar
+	 * files and remote urls.
+	 * <p>
+	 * NOTE: If the connection is of type {@link JarURLConnection} the zip file
+	 * should be independantly closed using {@link JarURLConnection#getJarFile()}.close()
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=326263
+	 * </p>
+	 * 
+	 * @param url URL to open connection to
+	 * @return the url connection
+	 * @throws MalformedURLException if the url is null
+	 * @throws IOException if there is a problem accessing the resource specified by the url
+	 */
+	public static URLConnection getURLConnection(URL url) throws MalformedURLException, IOException {
 		if (url == null) {
 			throw new MalformedURLException("URL specified is null"); //$NON-NLS-1$
-		} else if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
-			return new BufferedInputStream(new FileInputStream(url.getFile()));
 		}
-		return new BufferedInputStream(url.openStream());
+		URLConnection connection = url.openConnection();
+		if (connection instanceof JarURLConnection) {
+			connection.setUseCaches(false);
+		}
+		return connection;
 	}
 
 	public static void parseURL(URL url, DefaultHandler handler) {
 		InputStream input = null;
+		URLConnection connection = null;
 		try {
-			input = getInputStream(url);
+			connection = getURLConnection(url);
+			input = connection.getInputStream();
 			SAXParserWrapper parser = new SAXParserWrapper();
 			parser.parse(input, handler);
 		} catch (MalformedURLException e) {
@@ -65,9 +79,12 @@ public class SchemaUtil {
 			try {
 				if (input != null)
 					input.close();
+				if (connection instanceof JarURLConnection) {
+					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=326263
+					((JarURLConnection) connection).getJarFile().close();
+				}
 			} catch (IOException e1) {
 			}
 		}
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/VersionUtil.java b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/VersionUtil.java
index 9f510dc..6851d8d 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/VersionUtil.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/util/VersionUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -62,6 +62,21 @@ public class VersionUtil {
 		return version1.equals(version2);
 	}
 
+	/**
+	 * Returns true if the given version number is an empty version as
+	 * defined by {@link Version}. Used in cases where it would be
+	 * inappropriate to parse the actual version number.
+	 * 
+	 * @param version version string to check
+	 * @return true if empty version
+	 */
+	public static boolean isEmptyVersion(String version) {
+		if (version == null)
+			return true;
+		version = version.trim();
+		return version.length() == 0 || version.equals(Version.emptyVersion.toString());
+	}
+
 	public static boolean isCompatibleWith(Version v1, Version v2) {
 		if (v1.getMajor() != v2.getMajor())
 			return false;
diff --git a/eclipse/plugins/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java b/eclipse/plugins/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
index 9f1855b..ef36cd3 100644
--- a/eclipse/plugins/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
+++ b/eclipse/plugins/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -157,9 +157,9 @@ public class ConvertSchemaToHTML extends Task {
 
 		ExternalPluginModelBase model = null;
 		try {
-			if (file.getName().toLowerCase(Locale.ENGLISH).equals("fragment.xml")) //$NON-NLS-1$
+			if (file.getName().toLowerCase(Locale.ENGLISH).equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 				model = new ExternalFragmentModel();
-			else if (file.getName().toLowerCase(Locale.ENGLISH).equals("plugin.xml")) //$NON-NLS-1$
+			else if (file.getName().toLowerCase(Locale.ENGLISH).equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR))
 				model = new ExternalPluginModel();
 			else {
 				System.out.println(NLS.bind(PDECoreMessages.Builders_Convert_illegalValue, "manifest")); //$NON-NLS-1$ 
diff --git a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentHandler.java b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentHandler.java
index ef5d3ac..ff3f4c1 100644
--- a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentHandler.java
+++ b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -181,8 +181,9 @@ public abstract class DocumentHandler extends DefaultHandler {
 
 	private IRegion getAttributeRegion(String name, String value, int offset) throws BadLocationException {
 		FindReplaceDocumentAdapter fFindReplaceAdapter = new FindReplaceDocumentAdapter(getDocument());
-		IRegion nameRegion = fFindReplaceAdapter.find(offset, name + "\\s*=\\s*\"", true, true, false, true); //$NON-NLS-1$
+		IRegion nameRegion = fFindReplaceAdapter.find(offset, "\\s" + name + "\\s*=\\s*[\"\']", true, true, false, true); //$NON-NLS-1$ //$NON-NLS-2$
 		if (nameRegion != null) {
+			nameRegion = new Region(nameRegion.getOffset() + 1, nameRegion.getLength() - 1);
 			if (getDocument().get(nameRegion.getOffset() + nameRegion.getLength(), value.length()).equals(value))
 				return new Region(nameRegion.getOffset(), nameRegion.getLength() + value.length() + 1);
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
index c6768c1..d5e87a8 100644
--- a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
+++ b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/DocumentObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -670,7 +670,11 @@ public abstract class DocumentObject extends DocumentElementNode implements IDoc
 
 		// Fire an event 
 		if (changed && shouldFireEvent()) {
-			firePropertyChanged(node, IDocumentTextNode.F_PROPERTY_CHANGE_TYPE_PCDATA, oldText, text);
+			if (node != null) {
+				firePropertyChanged(node, IDocumentTextNode.F_PROPERTY_CHANGE_TYPE_PCDATA, oldText, text);
+			} else {
+				fireStructureChanged(this, IModelChangedEvent.INSERT);
+			}
 		}
 		return changed;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/BuildEntry.java b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/BuildEntry.java
index 123bb39..97e0b92 100644
--- a/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/BuildEntry.java
+++ b/eclipse/plugins/org.eclipse.pde.core/text/org/eclipse/pde/internal/core/text/build/BuildEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,11 +13,13 @@ package org.eclipse.pde.internal.core.text.build;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.StringTokenizer;
-import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.TextUtilities;
 import org.eclipse.pde.core.build.*;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.IDocumentKey;
 import org.eclipse.pde.internal.core.text.IEditingModel;
 import org.eclipse.pde.internal.core.util.PropertiesUtil;
@@ -155,8 +157,11 @@ public class BuildEntry implements IBuildEntry, IDocumentKey {
 
 	public void processEntry(String value) {
 		StringTokenizer stok = new StringTokenizer(value, ","); //$NON-NLS-1$
+		IPath root = getRootPath();
 		while (stok.hasMoreTokens()) {
-			fTokens.add(stok.nextToken().trim());
+			String token = stok.nextToken().trim();
+			token = fromRelative(token, root);
+			fTokens.add(token);
 		}
 	}
 
@@ -168,8 +173,11 @@ public class BuildEntry implements IBuildEntry, IDocumentKey {
 		buffer.append(PropertiesUtil.createWritableName(fName));
 		buffer.append(" = "); //$NON-NLS-1$
 		int indentLength = fName.length() + 3;
+		IPath rootPath = getRootPath();
 		for (int i = 0; i < fTokens.size(); i++) {
-			buffer.append(PropertiesUtil.createEscapedValue(fTokens.get(i).toString()));
+			String token = fTokens.get(i).toString();
+			token = toRelative(token, rootPath);
+			buffer.append(PropertiesUtil.createEscapedValue(token));
 			if (i < fTokens.size() - 1) {
 				buffer.append(",\\"); //$NON-NLS-1$
 				buffer.append(fLineDelimiter);
@@ -272,4 +280,54 @@ public class BuildEntry implements IBuildEntry, IDocumentKey {
 		getModel().fireModelObjectChanged(this, getName(), null, token);
 	}
 
+	/**
+	 * Returns the path that this entries tokens are relative to, or <code>null</code> if none.
+	 * 
+	 * @return relative root path, or <code>null</code>
+	 */
+	IPath getRootPath() {
+		if (fName.startsWith(IBuildEntry.JAR_PREFIX) || fName.startsWith(IBuildEntry.OUTPUT_PREFIX)) {
+			IResource resource = getModel().getUnderlyingResource();
+			if (resource != null) {
+				IProject project = resource.getProject();
+				if (project != null) {
+					IContainer root = PDEProject.getBundleRoot(project);
+					if (root != null && !root.equals(project)) {
+						// translation required for source. and output. entries
+						return root.getProjectRelativePath();
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Makes the token a bundle root relative path
+	 * 
+	 * @param token token
+	 * @param root bundle root path
+	 * @return bundle relative token
+	 */
+	String toRelative(String token, IPath root) {
+		if (root == null) {
+			return token;
+		}
+		return (new Path(token)).makeRelativeTo(root).toPortableString();
+	}
+
+	/**
+	 * Makes the token a project relative path
+	 * 
+	 * @param token token
+	 * @param root bundle root path
+	 * @return project relative token
+	 */
+	String fromRelative(String token, IPath root) {
+		if (root == null) {
+			return token;
+		}
+		return root.append(new Path(token)).toPortableString();
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/.project b/eclipse/plugins/org.eclipse.pde.doc.user/.project
index 7d8c4b1..e2e8d58 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/.project
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/.project
@@ -1,22 +1,22 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.pde.doc.user</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-	</natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.pde.doc.user</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.doc.user/META-INF/MANIFEST.MF
index 379f5be..802a62b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.doc.user; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/about.ini b/eclipse/plugins/org.eclipse.pde.doc.user/about.ini
deleted file mode 100644
index 5dd7b3f..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/about.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-# about.ini
-# contains information about a feature
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# "%key" are externalized strings defined in about.properties
-# This file does not need to be translated.
-
-# Property "aboutText" contains blurb for "About" dialog (translated)
-aboutText=%blurb
-
-# Property "windowImage" contains path to window icon (16x16)
-# needed for primary features only
-
-# Property "featureImage" contains path to feature image (32x32)
-featureImage=eclipse32.png
-
-# Property "aboutImage" contains path to product image (500x330 or 115x164)
-# needed for primary features only
-
-# Property "appName" contains name of the application (translated)
-# needed for primary features only
-
-# Property "welcomePage" contains path to welcome page (special XML-based format)
-# optional
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/about.properties b/eclipse/plugins/org.eclipse.pde.doc.user/about.properties
index e3fea02..976770f 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/about.properties
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Plug-in Development Environment User Guide\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright IBM Corp. and others 2000, 2003.  All rights reserved.\n\
+(c) Copyright IBM Corp. and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/pde
 
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/api_contexts.xml b/eclipse/plugins/org.eclipse.pde.doc.user/api_contexts.xml
index bd69b8b..79054c0 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/api_contexts.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/api_contexts.xml
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
      Copyright (c) 2005, 2008 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
@@ -60,5 +61,54 @@
       <topic href="reference/api-tooling/actions/ref-apitooling-setup-action.htm" label="API Tooling Setup Command"/>
       <topic href="reference/api-tooling/wizards/ref-api-setup-wizard.htm" label="API Tooling Setup Wizard"/>
       <topic href="tasks/api_tooling_setup.htm" label="Setting Up API Tooling"/>
-   </context>
   <context id="api_compare_wizard_page" title="API Compare">
      <description>This wizard is used to compare a selected set of projects/source folders/package fragments/units against a selected API baseline.</description>
      <topic href="reference/api-tooling/preferences/ref-baselines.htm" label="API Baseline Preferences"/>
      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
   </context>
   <context id="api_tooling_view">
      <description>This view is used to see the result of a comparison between a selected set of projects/source folders/package fragments/units and a selected API baseline.</description>
      <topic href="reference/api-tooling/views/ref-api-tooling-view.htm" label="API Tooling View"/>
      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
   </context>
   <context id="api_compare_export_dialog">
      <description>This dialog is used to export the result of an API comparison. Specify an ".xml" extension to generate an XML file, or an ".html" extension to generate an HTML report.</description>
      <topic href="reference/api-tooling/views/ref-api-tooling-view.htm" label="API Tooling View"/>
      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
   </context>   
+   </context>
+   <context id="api_compare_wizard_page" title="API Compare">
+      <description>This wizard is used to compare a selected set of projects/source folders/package fragments/units against a selected API baseline.</description>
+      <topic href="reference/api-tooling/preferences/ref-baselines.htm" label="API Baseline Preferences"/>
+      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
+      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
+      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
+   </context>
+   <context id="api_tooling_view">
+      <description>This view is used to see the result of a comparison between a selected set of projects/source folders/package fragments/units and a selected API baseline.</description>
+      <topic href="reference/api-tooling/views/ref-api-tooling-view.htm" label="API Tooling View"/>
+      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
+      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
+      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
+   </context>
+   <context id="api_compare_export_dialog">
+      <description>This dialog is used to export the result of an API comparison. Specify an ".xml" extension to generate an XML file, or an ".html" extension to generate an HTML report.</description>
+      <topic href="reference/api-tooling/views/ref-api-tooling-view.htm" label="API Tooling View"/>
+      <topic href="tasks/api_tooling_baseline.htm" label="Adding API Baselines"/>
+      <topic href="reference/api-tooling/wizards/ref-api-baseline-wizard.htm" label="API Baseline Wizard"/>
+      <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard"/>
+   </context>
+   <context id="api_use_pattern_tab" title="API Use Pattern Tab">
+      <description>This tab allows you to set package name patterns to use during a use scan for augmenting API descriptions.</description>
+      <topic href="reference/api-tooling/wizards/ref-api-use-dialog.htm" label="API Use Reports"/>
+      <topic href="reference/api-tooling/ant-tasks/apiuse-ant-task.htm" label="API Use Ant Task"/>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Patterns Wizard"/>
+   </context>
+   <context id="api_use_main_tab" title="API Use Main Tab">
+      <description>This tab allows you to configure all of the settings to generate an API use report.</description>
+      <topic href="reference/api-tooling/wizards/ref-api-use-dialog.htm" label="API Use Reports"/>
+      <topic href="reference/api-tooling/ant-tasks/apiuse-ant-task.htm" label="API Use Ant Task"/>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Patterns Wizard"/>
+   </context>
+   <context id="apitools_archive_pattern_wizard_page" title="API Use Archive Pattern Page">
+      <description>This page allows you to add a use pattern for excluding nested archives from within a given bundle</description>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Pattern Wizard"/>
+   </context>
+   <context id="apitools_pattern_selection_wizard_page" title="API Use Pattern Selection Page">
+      <description>This page allows you to select the type of use pattern to create</description>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Pattern Wizard"/>
+   </context>
+   <context id="apitools_description_pattern_wizard_page" title="API Use Pattern Package Description Page">
+      <description>This page allows you to create a use pattern that is used to specify what is internal / API for the given package pattern</description>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Pattern Wizard"/>
+   </context>
+   <context id="apitools_report_pattern_wizard_page">
+      <description>This page allows you to create a name pattern that can be used to prune references to or from a member from the HTML of a converted use report</description>
+      <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Pattern Wizard"/>
+   </context>   
 </contexts>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/build.properties b/eclipse/plugins/org.eclipse.pde.doc.user/build.properties
index 3fec312..4520d9e 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2000, 2007 IBM Corporation and others.
+#  Copyright (c) 2000, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -8,5 +8,31 @@
 #  Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-# use provided build.xml
-custom=true
+
+customBuildCallbacks=customBuildCallbacks.xml
+
+#the "index*/" entry only exists after the customBuildCallbacks run, we
+#use the '*' to avoid a warning
+bin.includes = META-INF/,\
+               about.html,\
+               about.properties,\
+               about.mappings,\
+               api_contexts.xml,\
+               apache_style.css,\
+               book.css,\
+               concepts/,\
+               contexts_PDE.xml,\
+               guide/,\
+               images/,\
+               index*/,\
+               notices.html,\
+               plugin.properties,\
+               plugin.xml,\
+               reference/,\
+               schema.css,\
+               tasks/,\
+               tips/,\
+               toc.xml,\
+               topics_Reference.xml,\
+               topics_Tasks.xml,\
+               whatsNew/
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/build.xml b/eclipse/plugins/org.eclipse.pde.doc.user/build.xml
deleted file mode 100644
index a1ff40b..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/build.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
-         IBM Corporation - initial API and implementation
- -->
-
-<project name="org.eclipse.pde.doc.user" default="build.jars" basedir=".">
-
	<path id="path_bootclasspath">
		<fileset dir="${java.home}/lib">
			<include name="*.jar" />
		</fileset>
	</path>
	<property name="bootclasspath" refid="path_bootclasspath" />
	
-	<target name="init">
-		<property name="plugin" value="org.eclipse.pde.doc.user" />
-		<property name="version.suffix" value="3.2.0.200606011503" />
-		<property name="full.name" value="${plugin}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<ant antfile="buildDoc.xml" />
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="META-INF/,*.properties,*.xml,*.zip,*.html,*.htm,*.png,images/*.png,*.css,index/**,guide/**,concepts/**,tips/**,reference/**,tasks/**,whatsNew/**" excludes="build.properties,build.xml,buildDoc.xml" />
-		</copy>
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-			<antcall target="gather.bin.parts">
-				<param name="destination.temp.folder" value="${build.result.folder}"/>
-			</antcall>
-			<eclipse.gatherBundle 
-			   metadataRepository="${p2.build.repo}"
-			   artifactRepository="${p2.build.repo}"
-			   buildResultFolder="${build.result.folder}"
-			   targetFolder="${build.result.folder}/${full.name}"
-			/>
-    </target>
-	
-	<target name="build.jars" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-	</target>
-
-	<target name="build.sources" depends="init">
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-	</target>
-
-	<target name="clean" depends="init">
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${plugin}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin.log" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/buildDoc.xml b/eclipse/plugins/org.eclipse.pde.doc.user/buildDoc.xml
index e79d415..17e1d09 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/buildDoc.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/buildDoc.xml
@@ -1,5 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -33,6 +34,7 @@
 		<pde.convertSchemaToHTML manifest="../org.eclipse.pde.core/plugin.xml" destination="${dest}" />
 		<pde.convertSchemaToHTML manifest="../org.eclipse.pde.build/plugin.xml" destination="${dest}" />
     	<pde.convertSchemaToHTML manifest="../org.eclipse.pde.ui/plugin.xml" destination="${dest}" />
+		<pde.convertSchemaToHTML manifest="../org.eclipse.pde.launching/plugin.xml" destination="${dest}" />
 
 		<record name="${basedir}/pdeconvert.txt" action="stop"/>
 	</target>
@@ -66,6 +68,12 @@
 		<exec dir="." executable="${javadoc}" output="doc.bin.log">
 			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
 		</exec>
+		
+		<!--workaround for bug 101048-->
+		<replace dir="reference/api" token="="/../misc/api-usage-rules.html" value="="./../misc/api-usage-rules.html">
+			<include name="*htm*" />
+		</replace>
+		
 	</target>
 
 	<target name="buildJdtDoc" unless="jdt.index.present">
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/feature.htm b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/feature.htm
index 89af499..17e97cd 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/feature.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/feature.htm
@@ -12,7 +12,7 @@
 <body>
 <h1>Feature</h1>
 
-<p>A <strong>Feature</strong> is used to package a group of plug-ins together into a single installable and updtable unit.</p>
+<p>A <strong>Feature</strong> is used to package a group of plug-ins together into a single installable and updatable unit.</p>
 
 <p>Features have a manifest that provides basic information
 about the feature and its content. Content may include plug-ins, fragments and
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/target.htm b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/target.htm
index f0f8844..ce38463 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/target.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/target.htm
@@ -35,7 +35,7 @@
 <a href="../guide/tools/target_shared/edit_target_wizard.htm">Edit Target Definition Wizard</a><br>
 <a href="../guide/tools/editors/target_editor/target_editor.htm">Target Editor</a><br>
 <a href="../guide/tools/launchers/eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
-<a href="../guide/tools/launchers/eclipse_plugins.htm">Eclipse Application Launcher Plug-ins Tab</a><br>
+<a href="../guide/tools/launchers/plugins.htm">Eclipse Application Launcher Plug-ins Tab</a><br>
 </p>
 
 </body>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/update_site.htm b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/update_site.htm
index 3600bdf..50afb67 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/concepts/update_site.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/concepts/update_site.htm
@@ -1,17 +1,17 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Update Site</title>
-<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
-<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
-</head>
-
-<body>
-<h1>Update Site</h1>
-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Update Site</title>
+<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+
+<body>
+<h1>Update Site</h1>
+
 <p><strong>Update Sites</strong> are used to organize and export features so they
 can be installed into Eclipse applications.</p>
 
@@ -23,7 +23,7 @@ organized into categories.</p>
 
 <p>When the site is built, the included features (along with all plug-ins part of those features) 
 will be exported into an installable form.  The exported plug-ins and features will be put into two
-folders "plugins" and "features".  Two other files, "content.xml"
+folders "plug-ins" and "features".  Two other files, "content.xml"
 and "artifacts.xml" will also be generated and contain metadata for the exported files
 that make installing easier.  These files, along with "site.xml", collectively form an Eclipse update
 site.  To make the update site available to others you must make all these files available 
@@ -41,5 +41,5 @@ in a shared directory or web site.</p>
 <a href="plugin.htm">Plug-in</a><br>
 </p>
 
-</body>
+</body>
 </html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/contexts_PDE.xml b/eclipse/plugins/org.eclipse.pde.doc.user/contexts_PDE.xml
index 6dbabb8..d06422f 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/contexts_PDE.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/contexts_PDE.xml
@@ -65,6 +65,9 @@
     <context id="history_list_action">
         <description>Choose to open a dialog with all previously shown plug-in dependencies.</description>
     </context>
+    <context id="target_export_wizard">
+        <description>Use this wizard to export the contents of the current target platform to a directory.  All plug-ins included in the target platform will be copied to the destination directory.</description>
+    </context>
     
 <!-- Dialogs -->
  	<context id="fragment_add_target">
@@ -208,6 +211,9 @@ If the selected command has parameters, you are able to edit their values.</desc
 	<context id="plugin_import_finish_dialog">
 		<description>This dialog shows a list of plug-ins for which import was not possible (probably because they already exist in read-only projects of your workspace).</description>
 	</context>
+	<context id="plugin_import_overwrite_dialog">
+    	<description>This dialog opens when one or more plug-ins being imported already exist in the workspace.  Any projects that are checked in this dialog will be deleted when finish is pressed.  The imported plug-ins will use their id as the project name, but if a project with that name exists in the workspace a new project name that includes the version will be used.</description>
+	</context>
 
 	<context id="spy_dialog">
 		<description>This dialog, called the "Plug-in Spy", allows you to introspect your environment and retrieve information about your current context (active page, active selection, ...).</description>
@@ -232,7 +238,7 @@ You can select any item to open it in an editor.</description>
 	<context id="launcher_advanced">
 		<description>This page allows you to run your configuration with only a subset of the plug-ins.</description>
 		<topic label="Eclipse Application Launcher Plug-ins Tab" 
-			   href="guide/tools/launchers/eclipse_plugins.htm"/>
+			   href="guide/tools/launchers/plugins.htm"/>
 		<!-- Note:  This context ID is shared between the Eclipse Application Launcher Plug-ins tab 
 		            and Equinox OSGi Framework Launcher Plug-ins tab.  Limitation at this point which
 		            may cause confusion
@@ -281,7 +287,7 @@ You can select any item to open it in an editor.</description>
 		<topic label="Dependencies" href="guide/tools/editors/manifest_editor/dependencies.htm"/>
 	</context>
 	<context id="manifest_plugin_runtime">
-		<description>The Runtime page shows information about the plug-in's runtime libraries and OSGi plug-in activation settings.</description>
+		<description>The Runtime page shows information about the plug-in's runtime libraries.  This includes the plug-in classpath (if resources are not at the root of the plug-in) as well as what packages the plug-in exports.  Visibility restrictions can be set on the exported packages to limit usage by downstream users.</description>
 		<topic label="Runtime" href="guide/tools/editors/manifest_editor/runtime.htm" />
 	</context>
 	<context id="manifest_plugin_extensions">
@@ -561,11 +567,15 @@ You can select any item to open it in an editor.</description>
 
 
 <!-- Property pages -->	
-    <context id="selfhosting_property_page" >
+	<context id="plugin_development_property_page">
+      <description>Parent property page for the other pde property pages.  Allows you to modify how the manifest editor is displayed for your project.</description>
+   </context>
+
+    <context id="selfhosting_property_page">
       <description>This page allows you to exclude certain class folders from the project's classpath.</description>
    </context>
 
-   <context id="compilers_property_page" >
+   <context id="compilers_property_page">
       <description>This page allows you to specify the behavior of the various manifest compilers.  The settings are identical to the Compilers Preference Page, but will only apply to a single project.</description>
       <topic label="Plug-in Compiler Preferences" href="guide/tools/preference_pages/plugin_compiler.htm"/>
    </context>
@@ -757,7 +767,7 @@ If the selected project does not contain a manifest file, PDE will generate a ge
 	<!-- Plugins and Fragments -->
 	
 	<context id="plugin_import_first_page">
-		<description>This wizard allows you to import plug-ins into the workspace.  Source code, if found, will be attached to JARs. Importing plug-ins as binary projects with links is the fastest.  It will not import these plug-ins physically into the workspace. It will instead create links to those plug-ins on disk.  Note that deleting these binary linked projects will not delete the files that they map to on disk.</description>
+		<description>This wizard allows you to import plug-ins into the workspace.  Plug-ins can be imported from the current target, any other target definition or a local directory.  The next page of the wizard will allow you to choose which plug-ins to import.  You can either select from a list of all plug-ins at the source location or select based on the requirements of plug-ins already in your workspace.  Plug-ins can be imported in four different formats.  Binary projects will contain the compiled plug-in code and will have attached source, but the source cannot be edited.  Binary projects with linked content will use linked files instead of copying the plug-in contents into the project.  Projects with source folders will attempt to extract source from the imported plug-in to make an editable project.  Projects from a repository will look for a special entry in the plug-in manifest that specifies a repository (such as a CVS location) so that source can be checked out.</description>
 		<topic label="Plug-in Import" 
 			   href="guide/tools/import_wizards/import_plugins.htm"/>
 	</context>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.pde.doc.user/customBuildCallbacks.xml
new file mode 100644
index 0000000..308dc6a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/customBuildCallbacks.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ===================================================================== -->
+<!-- Custom targets called from a project's generated build.xml            -->
+<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
+<!-- ===================================================================== -->
+<project name="Build specific targets and properties" default="noDefault">
+
+	<import file="${eclipse.pdebuild.templates}/plugins/customBuildCallbacks.xml" />
+	
+	<target name="noDefault">
+		<echo message="This file must be called with explicit targets" />
+	</target>
+	
+	<!-- ===================================================================== -->
+	<!-- Steps to do before the target gather.bin.parts                        -->
+	<!-- Available parameters :                                                -->
+	<!--  destination.temp.folder - the directory plugins will be collected to -->
+	<!--  feature.directory - the directory containing the resulting feature   -->
+	<!-- ===================================================================== -->
+	<target name="pre.gather.bin.parts">
+		<antcall target="build.index"/>	
+	</target>
+	
+	<target name="build.index" description="Builds search index for the plug-in: org.eclipse.platform.doc.user." if="eclipse.running">
+		<ant antfile="buildDoc.xml" />
+	</target>
+
+</project>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/import_wizards/plugin_import.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/import_wizards/plugin_import.png
index ed3494e..7a2e4f7 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/import_wizards/plugin_import.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/import_wizards/plugin_import.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_configuration.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_configuration.png
index 742b564..0579ed6 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_configuration.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_configuration.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_features.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_features.png
new file mode 100644
index 0000000..5d36f2f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_features.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_plugins.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_plugins.png
index a284295..ecddfa5 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_plugins.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_eclipse_plugins.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_configuration.PNG b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_configuration.PNG
deleted file mode 100644
index fdf947f..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_configuration.PNG and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_plugins.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_plugins.png
deleted file mode 100644
index c6d58b8..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/launchers/launcher_junit_plugins.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/new_ctx_hlp_wizard.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/new_ctx_hlp_wizard.png
new file mode 100644
index 0000000..12fe970
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/new_ctx_hlp_wizard.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/user_assistance.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/user_assistance.png
new file mode 100644
index 0000000..d4efac9
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/new_wizards/user_assistance.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/internal.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/internal.png
new file mode 100644
index 0000000..762766c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/internal.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/public.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/public.png
new file mode 100644
index 0000000..de99391
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/public.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/xfriend.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/xfriend.png
new file mode 100644
index 0000000..e9f4ec0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/plugin_editor/xfriend.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/compilers_plugin.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/compilers_plugin.png
index 339767c..34d6662 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/compilers_plugin.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/compilers_plugin.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png
index bd9310c..200b22c 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/preferences/plugin_development.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_ee.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_ee.png
new file mode 100644
index 0000000..45ca8f9
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_ee.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_jre.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_jre.png
deleted file mode 100644
index cd16c3b..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/product_editor/launcher_jre.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/schema_editor/schema_identifier.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/schema_editor/schema_identifier.png
new file mode 100644
index 0000000..f601ee0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/schema_editor/schema_identifier.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page.png
index 5907062..60d2931 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page_feature_mode.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page_feature_mode.png
new file mode 100644
index 0000000..e7c76b4
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_editor/content_page_feature_mode.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab.png
index ef88ed9..d5b7de1 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab.png and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab_feature_mode.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab_feature_mode.png
new file mode 100644
index 0000000..1179042
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/target_shared/edit_target_content_tab_feature_mode.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-as-repo.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-as-repo.png
new file mode 100644
index 0000000..aadfd0d
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-as-repo.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-active.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-active.png
new file mode 100644
index 0000000..391ab2a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-active.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-plugins-view.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-plugins-view.png
new file mode 100644
index 0000000..ca18d0a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-from-plugins-view.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-version.png b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-version.png
new file mode 100644
index 0000000..11e960a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/guide/images/tasks/import-version.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/intro/pde_overview.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/intro/pde_overview.htm
index 32227e3..2beeb1b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/intro/pde_overview.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/intro/pde_overview.htm
@@ -22,7 +22,7 @@ development.</p>
 <p>PDE is broken into three main components:</p>
 <ul>
 <li><a href="#ui">UI</a> - A rich set of models, tools and editors to develop plug-ins and OSGi bundles</li>
-<li><a href="#api">API Tooling</a> - Tooling to assist API documentation and maintenence</li>
+<li><a href="#api">API Tooling</a> - Tooling to assist API documentation and maintenance</li>
 <li><a href="#build">Build</a> - Ant based tools and scripts to automate build processes</li>
 </ul>
 
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/access_rules.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/access_rules.htm
index cc7b873..e9cf55a 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/access_rules.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/access_rules.htm
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 <html lang="en">
 <head>
 <meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/build.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/build.htm
index 3af7d24..e8e50c2 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/build.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/build.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Plug-in Build</title>
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
@@ -13,6 +13,10 @@
 <h1>Plug-in Build</h1>
 <p>The <strong>Build </strong>page contains all the information needed to   build, package and export the plug-in. Although it appears as a page in the plug-in   manifest editor, changes made to it are written by PDE to the plug-in's <em>build.properties</em> file.  The <em>build.properties</em> file solely guides the build   process.</p>
 
+<h2>Custom Build</h2>
+<p>The <strong>Custom Build</strong> option prevents the build.xml file from being overwritten with a generated build file.  Use this option when 
+the plug-in provides a custom build.xml that is being manually updated.</p>
+
 <h2>Runtime Information</h2>
 <p>The <strong>Runtime Information</strong> section lists all the libraries that you want to build. For each library, you must list the source folder(s) that will be   compiled into the library. </p>
 <p><img src="../../../images/plugin_editor/runtime.png" alt="Runtime" ></p>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/runtime.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/runtime.htm
index 29e3417..afae0c9 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/runtime.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/manifest_editor/runtime.htm
@@ -20,6 +20,12 @@
 <p>Press <strong>Add...</strong> to see the list of packages available for export that are not already in your list.</p>
 <p>PDE can calculate the <em>uses</em> directive, as defined in the OSGi Specification, for all of your publicly exported packages. Press the <strong>Calculate Uses</strong> button to begin. Because this process involves code introspection, this might be a long running operation.</p>
 <p>You can control the visibility of each package to downstream clients in the <strong>Package Visibility</strong> section. Refer to the <a href="access_rules.htm">Access Rules</a> document for full details. </p>
+<p>When the visiblity of a package is changed the icon beside the package will change to reflect its status as follows:</p>
+<ul>
+<li><img src="../../../images/plugin_editor/public.png" align="top" alt="Public Package"> Visible to all downstream plug-ins (public)</li>
+<li><img src="../../../images/plugin_editor/internal.png" align="top" alt="Internal Package"> Not visible to any downstream plug-ins (internal)</li>
+<li><img src="../../../images/plugin_editor/xfriend.png" align="top" alt="X-Friend Package"> Visible to a specific list of downstream plug-ins (internal with friends)</li>
+</ul>
 
 <a name="classpath"></a>
 <h2>Classpath</h2>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/product_editor/launching.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/product_editor/launching.htm
index 596c583..af38480 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/product_editor/launching.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/product_editor/launching.htm
@@ -12,9 +12,9 @@
 <h1>Product Launching</h1>
 <p>The <strong>Launching</strong> page customizes the native launcher of your product and the launching arguments.</p>
 
-<h2>JRE</h2>
-<p>The <strong>Java Runtime Environment</strong> section allows you to bundle a JRE with your product automatically. </p>
-<p><img src="../../../images/product_editor/launcher_jre.png" alt="launcher jre" ></p>
+<h2>Execution Environment</h2>
+<p>The <strong>Execution Environment</strong> section allows you to specify an execution environment (EE) that the product runs on.  The default JRE associated with the chosen EE can be bundles with the product if the option is turned on.</p>
+<p><img src="../../../images/product_editor/launcher_ee.png" alt="launcher jre" ></p>
 <p>The JRE will be placed in the <strong>jre</strong> directory at the root of your product. </p>
 
 
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/schema_editor/page_schema_definition.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/schema_editor/page_schema_definition.htm
index 6073c5a..e31d60f 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/schema_editor/page_schema_definition.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/schema_editor/page_schema_definition.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 	<head>
-	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 		<title>Schema Definition Page</title>
 		<link rel="STYLESHEET" href="../../../../book.css" type="text/css">
@@ -643,6 +643,13 @@
 			<img src="../../../images/schema_editor/section_attribute-details_4.png" alt="Attribute Details Section 4">
 		</p>
 
+	 	<h3>Using the Schema Indentifier Attribute</h3>
+
+		<p>Extension point authors can define attributes that reference other attributes. This is accomplished by setting your extension point attributes as type identifier and choosing the attribute it references. An example of this would be the org.eclipse.ui.handlers extension point. The commandId attribute references commands defined in the org.eclipse.ui.commands extension point.</p>
+
+		<img src="../../../images/schema_editor/schema_identifier.png" alt="Schema Identifier Usage">
+
+		<p>Extension developers contributing a handler can then select from all valid identifiers for the commandId attribute. Warnings are issued for identifiers that don't exist to prevent the common mistake of a misspelled identifier.</p>
 
 		<h3>Attribute Details Section Fields</h3>
 		
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/content_page.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/content_page.htm
index a458d4c..8bae10f 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/content_page.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/editors/target_editor/content_page.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Content Page</title>
 <link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css">
@@ -32,8 +32,18 @@
 <li><strong>File Path</strong> - Grouped by the directory path the plug-ins are stored in on the local file system</li>
 <li><strong>Location</strong> - Grouped by the locations set on the <a href="../../target_shared/edit_target_locations_tab.htm">locations tab</a></li>
 </ol>
-  
-  
+
+<h2>Managing Content with Features</h2>
+
+<p>On the right hand side, you can choose between two different modes to manage the content of the target.  By default targets
+are managed using a list of plug-ins.  Selecting <strong>Features</strong> will change your target contents to a list of features.</p>
+
+<img src="../../../images/target_editor/content_page_feature_mode.png" alt="Content Page Feature Mode">
+
+<p>You can select features in the same way as when managing by plug-ins.  <strong>Add Required</strong> will select any features that the currently
+selected features have in their <em>include</em> or <em>require</em> entries.  If there are plug-ins in the target that do not belong to a
+feature, they will be listed under the <em>Other Plug-ins</em> item and can be selected individually.</p>
+    
 <p><img src="../../../../images/ngrelr.png" alt="Related reference"></p>
 <p>
 <a href="./target_editor.htm">Target Definition Editor</a><br>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_cheat_sheet.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_cheat_sheet.htm
index 41ec33d..f19153e 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_cheat_sheet.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_cheat_sheet.htm
@@ -1,16 +1,17 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
-	<head>
-	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-		<title>New Cheat Sheet Wizard</title>
-		<link rel="STYLESHEET" href="../../book.css" type="text/css">
-		<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
-	</head>
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
+<title>New Cheat Sheet Wizard</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
+</head>
 	<body>
-		<h2>New Cheat Sheet Wizard</h2>
+		<h1>New Cheat Sheet Wizard</h1>
 
-		<h3>About Cheat Sheets</h3>
+		<h2>About Cheat Sheets</h2>
 		
 		<p>
 			In general, cheat sheets help guide users through a complex set of instructions. 
@@ -20,7 +21,7 @@
 			present tasks represented by simple cheat sheets to achieve a larger goal.
 		</p>
 		
-		<h3>About This Wizard</h3>
+		<h2>About This Wizard</h2>
 		
 		<p>
 			This wizard allows you to create a new simple or composite cheat sheet.
@@ -41,7 +42,7 @@
 			<img src="../../images/new_wizards/wizard_new_cheat-sheet.png" alt="New Cheat Sheet Wizard">
 		</p>
 
-		<h3>Relevant Links</h3>
+		<h2>Relevant Links</h2>
 
 		<ul>
 			<li>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_ctx_help.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_ctx_help.htm
new file mode 100644
index 0000000..9f4040f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_ctx_help.htm
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
+<title>New Context Help Wizard</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
+</head>
+	<body>
+		<h1>New Context Help Wizard</h1>
+
+		<h2>About Context Help</h2>
+		
+		<p>
+			Context-sensitive help is a mechanism that enables linking a user interface part with a specific help topic. When the user activates the associated user interface part, the help page is displayed in the dynamic help area. 
+			Users of Eclipse products can view installed products' contributions to help by clicking <strong>Help > Help Contents</strong>.   
+		</p>
+		
+		<h2>About This Wizard</h2>
+		
+		<p>
+			This wizard allows you to create a new context help.
+			Upon completion of this wizard, a new context help will be created with basic
+			content and opened in the <strong>Context Help Editor</strong>.
+		</p>
+
+		<p>
+			To start this wizard, click 
+			<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.pde.ua.ui.NewContextHelpWizard)")'>
+    			<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+				<strong>File > New > Other... > User Assistance > Context Help</strong>
+			</a>.	
+		</p>
+
+		<p>
+			<img src="../../images/new_wizards/new_ctx_hlp_wizard.png" alt="New Context Help Wizard">
+		</p>
+
+		<h2>Relevant Links</h2>
+
+		<ul>
+			<li>
+				<a href="../editors/ctx_help_editor/ctx_help_editor.htm">Context Help Editor</a>
+			</li>
+		</ul>
+		
+	</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_file_wizards.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_file_wizards.htm
index 48ef85d..23f48fb 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_file_wizards.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_file_wizards.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
 <title>New File Creation Wizards</title>
@@ -12,26 +12,30 @@
 <body>
 <h1>New File Creation Wizards</h1>
 <p>In addition to manifest files, several other types of files are needed in various aspects and at different stages of plug-in development:</p>
-<ul>
-  <li><strong>Extension point schemas</strong> -  specify the grammar of extension points</li>
-  <li><strong>Product configurations</strong> -  manage all the data needed to define, brand and build an Eclipse product</li>
-  <li><strong>Target definitions</strong> - define all aspects of a target platform</li>
-  <li><strong>Cheat sheets</strong> - Create a cheat sheet for an Eclipse product</li>
-  <li><strong>Help Tables of Contents</strong> - Create a Table of Contents for the documentation in an Eclipse product</li>
-  <li><strong>Category Definitions</strong> - specify categories to apply to features during export</li>
-</ul>
+
 <p>To help you create these files, PDE provides specialized <strong>New File</strong> creation wizards available via 		<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard()")'>
     		<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Open the new wizard"><strong>File > New > Other... > Plug-in Development</strong></a>
  from the top level menu. </p>
+
+<h2>Plug-in Development Files</h2>
+
 <p><img src="../../images/new_wizards/other_category.PNG" alt="File Wizards" ></p>
-<p>For details on individual wizards, refer to the following documents:</p>
+
+<ul>
+  <li><a href="new_category.htm"><strong>Category Definitions</strong></a> - specify categories to apply to features during export</li>
+  <li><a href="new_schema.htm"><strong>Extension point schemas</strong></a> -  specify the grammar of extension points</li>
+  <li><a href="new_product_config.htm"><strong>Product configurations</strong></a> -  manage all the data needed to define, brand and build an Eclipse product</li>
+  <li><a href="new_target_definition.htm"><strong>Target definitions</strong></a> - define all aspects of a target platform</li>
+</ul>
+
+<h2>User Assistance Files</h2>
+
+<p><img src="../../images/new_wizards/user_assistance.png" alt="UA File Wizards" ></p>
+
 <ul>
-  <li><a href="new_product_config.htm">Product Configuration</a></li>
-  <li><a href="new_target_definition.htm">Target Definition</a></li>
-  <li><a href="new_schema.htm">Extension Point Schema</a></li>
-  <li><a href="new_cheat_sheet.htm">Cheat Sheet</a></li>
-  <li><a href="new_toc.htm">Table of Contents</a></li>
-  <li><a href="new_category.htm">Category Definition</a></li>
+  <li><a href="new_cheat_sheet.htm"><strong>Cheat Sheet</strong></a> - Create a cheat sheet tutorial for an Eclipse product</li>
+  <li><a href="new_ctx_help.htm"><strong>Context Help</strong></a> - Create a context help xml file to associate UI components to help documentation</li>
+  <li><a href="new_toc.htm"><strong>Help Table of Contents</strong></a> - Create a Table of Contents for help documentation</li>
 </ul>
 
 </body>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_toc.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_toc.htm
index a594aeb..41ca8f1 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_toc.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/file_wizards/new_toc.htm
@@ -1,16 +1,17 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
-	<head>
-	<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-		<title>New Table of Contents Wizard</title>
-		<link rel="STYLESHEET" href="../../book.css" type="text/css">
-		<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
-	</head>
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
+<title>New Table of Contents Wizard</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
+</head>
 	<body>
-		<h2>New Table of Contents Wizard</h2>
+		<h1>New Table of Contents Wizard</h1>
 
-		<h3>About Tables of Contents</h3>
+		<h2>About Tables of Contents</h2>
 		
 		<p>
 			Tables of contents allow you to organize your Eclipse product's contribution to on-line help.
@@ -18,7 +19,7 @@
 			Users of Eclipse products can view installed products' contributions to help by clicking <strong>Help > Help Contents</strong>.   
 		</p>
 		
-		<h3>About This Wizard</h3>
+		<h2>About This Wizard</h2>
 		
 		<p>
 			This wizard allows you to create a new table of contents.
@@ -38,7 +39,7 @@
 			<img src="../../images/new_wizards/new_toc_wizard.png" alt="New Table of Contents Wizard">
 		</p>
 
-		<h3>Relevant Links</h3>
+		<h2>Relevant Links</h2>
 
 		<ul>
 			<li>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/import_wizards/import_plugins.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/import_wizards/import_plugins.htm
index 4dcb231..f79f882 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/import_wizards/import_plugins.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/import_wizards/import_plugins.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
 <title>Plug-in Import</title>
@@ -44,6 +44,7 @@ Select this option if you choose to import plug-ins from an arbitrary location o
   <li><strong>Binary projects</strong>: The plug-in content is copied into the project. The binary code remains intact in a JAR; while, the manifest files and other resources are extracted to the project root. The advantage of binary projects is that they allow you to browse the code without the overhead of compiling the source code. </li>
   <li><strong>Binary projects with linked content</strong>: The plug-in content is not copied into the project. Instead, links are created in the project to map to the actual physical location of the JARs, files and folders on disk. The advantage of this type of import over a regular binary import is that it is faster to import; since, the operation only involves creating links. The disadvantage of this approach is that linked binary projects can become out of sync and have to be re-imported if the absolute path to these linked files are changed in the file system. </li>
   <li><strong>Projects with source folders</strong>: The source code for the plug-ins being imported gets extracted and placed in source folders. The advantage of this type of import is that you will be able to modify the imported source code. The disadvantage of this approach is that the code gets compiled and results in an overhead whose magnitude is proportional to the number and size of plug-ins imported. </li>
+  <li><strong>Projects from a repository</strong>: The manifest file for plug-ins can specify a source repository location (such as a CVS server).  Plug-ins containing this information can be imported as source directly from the repository.  This provides a quick way to get editable source and create patches for plug-ins you are working with.</li>
 </ol>
 
 </body>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/arguments.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/arguments.htm
new file mode 100644
index 0000000..a4e3b7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/arguments.htm
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Arguments Tab</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
+</head>
+
+<body>
+<h1>Arguments Tab</h1>
+<p>You can easily test your plug-in under different conditions by customizing the launching program and VM arguments on the <strong>Arguments Tab</strong>. </p>
+<p><img src="../../images/launchers/launcher_eclipse_arguments.png" alt="Arguments" > </p>
+
+<h2>Program and VM Arguments</h2>
+<p><strong>Program arguments</strong> are application-specific values that the application code expects and processes. For example, the <em>-debug</em> argument puts the platform in debug mode and enables tracing, while the <em>-nl fr </em>arguments launch the application in a French locale.</p>
+<p><strong>VM arguments</strong> are typically values that change the behaviour of the <em>Java Virtual Machine</em> (JVM). For example, the <em>-Xmx256M</em> argument allows the Java heap to grow to 256MB. </p>
+<p>The Eclipse runtime is also configurable via many system properties which can be passed as VM arguments in the form: <em>-DpropertyName=propertyValue</em>. For example, <em>-Dosgi.clean=true</em> clears all data cached by the OSGi framework and the Eclipse runtime. </p>
+<p>For a list of the program and VM arguments supported by the Eclipse runtime, refer to the following documents: </p>
+<ul>
+  <li><a href="../../../../org.eclipse.platform.doc.user/tasks/running_eclipse.htm">Running Eclipse</a></li>
+  <li><a href="../../../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html">Eclipse Runtime Options </a></li>
+</ul>
+<p>If you would like the same set of program and VM arguments to be used for all your launch configurations, it is recommended that you use the <a href="../target_shared/edit_target_arguments_tab.htm">Launching Arguments</a> setting when editing your <a href="../../../concepts/target.htm">Target Platform</a> to create a template that gets propagated into all newly-created launch configurations. </p>
+
+<h2>Working Directory</h2>
+<p>The <strong>Working Directory</strong> specifies the directory in which the runtime Eclipse application executes (e.g. read and write files into the working directory, etc.). By default, the working directory is the root directory of the Eclipse installation; but, it can be configured by the user to be any writable directory they wish. </p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/common.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/common.htm
index 20ac45a..095f5c1 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/common.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/common.htm
@@ -17,5 +17,20 @@
 <p>A launch configuration is saved as an XML <em>.launch</em> file on disk. By default, this file is saved in the <em>${workspace_loc}/.metadata/.plugins/org.eclipse.debug.core/.launches</em> directory, where <em>${workspace_loc}</em> denotes the workspace location. </p>
 <p>If you want to share a launch configuration with team members, you have the option to save it as a <strong>Shared file</strong> in one of your workspace projects (in order to make it visible for version control).</p>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/configuration.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/configuration.htm
index ec294b4..0872cec 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/configuration.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/configuration.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Configuration Tab</title>
 <link href="../../book.css" rel="stylesheet" type="text/css">
@@ -31,8 +31,27 @@
   <li><strong>osgi.splashPath</strong> - specifies one or more locations of the splash screen.</li>
 </ul>
 <p>The <strong>Use an existing <em>config.ini</em> file as a template</strong> option takes an existing <em>config.ini</em> file and makes a copy of it. PDE neither adds nor removes properties from this file. However, PDE modifies the <strong>osgi.bundles</strong> and <strong>osgi.splashPath</strong> keys by substituting their generic bundle URL values with absolute paths that reflect the actual locations of the bundles on disk.</p>
-<br>
-<br>
-<br>
+
+<h2>Software Installation</h2>
+<p>Use <strong>Support software installation in the launched application</strong> to create p2 metadata for the plug-ins
+being launched and starts the application with a profile containing the metadata.  If the launched application does
+not include p2, this option has no effect.  The contents of the profile are cleared and recreated on each launch,
+but if the application is restarted the same profile is kept.</p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm
index 517254d..1047b6b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_application_launcher.htm
@@ -28,13 +28,19 @@
 <p>An <em>Eclipse Application</em> launch configuration contains seven tabs allowing you to customize all aspects of the test launch. Refer to the following documents for more details: </p>
 <ul>
   <li><a href="eclipse_main.htm">Main Tab</a></li>
-  <li><a href="eclipse_args.htm">Arguments Tab</a></li>
-  <li><a href="eclipse_plugins.htm">Plug-ins Tab</a></li>
+  <li><a href="arguments.htm">Arguments Tab</a></li>
+  <li><a href="plugins.htm">Plug-ins Tab</a></li>
   <li><a href="configuration.htm">Configuration Tab</a></li>
   <li><a href="tracing.htm">Tracing Tab</a></li>
   <li><a href="environment.htm">Environment Tab</a></li>
   <li><a href="common.htm">Common Tab</a></li>
 </ul>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_args.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_args.htm
deleted file mode 100644
index f79c3a7..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_args.htm
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Arguments Tab</title>
-<link href="../../book.css" rel="stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Arguments Tab</h1>
-<p>You can easily test your plug-in under different conditions by customizing the launching program and VM arguments on the <strong>Arguments Tab</strong>. </p>
-<p><img src="../../images/launchers/launcher_eclipse_arguments.png" alt="Arguments" > </p>
-
-<h2>Program and VM Arguments</h2>
-<p><strong>Program arguments</strong> are application-specific values that the application code expects and processes. For example, the <em>-debug</em> argument puts the platform in debug mode and enables tracing, while the <em>-nl fr </em>arguments launch the application in a French locale.</p>
-<p><strong>VM arguments</strong> are typically values that change the behaviour of the <em>Java Virtual Machine</em> (JVM). For example, the <em>-Xmx256M</em> argument allows the Java heap to grow to 256MB. </p>
-<p>The Eclipse runtime is also configurable via many system properties which can be passed as VM arguments in the form: <em>-DpropertyName=propertyValue</em>. For example, <em>-Dosgi.clean=true</em> clears all data cached by the OSGi framework and the Eclipse runtime. </p>
-<p>For a list of the program and VM arguments supported by the Eclipse runtime, refer to the following documents: </p>
-<ul>
-  <li><a href="../../../../org.eclipse.platform.doc.user/tasks/running_eclipse.htm">Running Eclipse</a></li>
-  <li><a href="../../../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html">Eclipse Runtime Options </a></li>
-</ul>
-<p>If you would like the same set of program and VM arguments to be used for all your launch configurations, it is recommended that you use the <a href="../target_shared/edit_target_arguments_tab.htm">Launching Arguments</a> setting when editing your <a href="../../../concepts/target.htm">Target Platform</a> to create a template that gets propagated into all newly-created launch configurations. </p>
-
-<h2>Working Directory</h2>
-<p>The <strong>Working Directory</strong> specifies the directory in which the runtime Eclipse application executes (e.g. read and write files into the working directory, etc.). By default, the working directory is the root directory of the Eclipse installation; but, it can be configured by the user to be any writable directory they wish. </p>
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_main.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_main.htm
index b7a446a..d16d4c0 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_main.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_main.htm
@@ -44,6 +44,20 @@
   <li><a href="../../../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html">Eclipse Runtime Options </a></li>
 </ul>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
 
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_plugins.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_plugins.htm
deleted file mode 100644
index ff53d3a..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/eclipse_plugins.htm
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Plug-ins Tab</title>
-<link href="../../book.css" rel="stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Plug-ins Tab</h1>
-<p>When testing your plug-in, you have the ability to manage and select the list of plug-ins that you want to launch with on the  <strong>Plug-ins Tab</strong> of the launch configuration. </p>
-<p><img src="../../images/launchers/launcher_eclipse_plugins.png" alt="Plug-ins tab" ></p>
-
-<h2>Launch Options </h2>
-<p>The <strong>Launch with</strong> combo box allows you to configure the way the Eclipse Application is launched. The options are explained in more detail below.</p>
-<p>The <strong>all workspace and enabled external plug-ins</strong> option is the default setting. With this option, the runtime Eclipse application you are launching will be made up of all the workspace plug-ins and all the plug-ins that are explicitly checked on the <strong>Window > Preferences... > Plug-in Development > Target Platform</strong> preference page. This option requires little maintenance because the list of plug-ins is maintained by PDE and updated prior to every launch as plug-ins are created or deleted in the workspace. This option is recommended when the <strong>Program to Run</strong> setting on the <a href="eclipse_main.htm">Main tab</a> of the launch configuration is set to the <strong>default product</strong> or <strong>default application</strong> of your target. </p>
-<p>The <strong>workspace features</strong> is an advanced option that requires a special setup. It should only be used when you want to test feature lifecycles and leave Update Manager in control of your startup sequence. Refer to the <a href="../../../tips/pde_tips.htm">Tips and Tricks</a> section for details on how to set up your workspace for this option.</p>
-<p>The <strong>plug-ins selected below only</strong> option is typically used when you are testing an RCP application that uses a subset of the plug-ins from the workspace and target. This setting requires more maintenance than the other options, since you have to ensure that the list of selected plug-ins is up-to-date when you add or remove a plug-in from the workspace. There are several buttons available to help you select plug-ins, including an <strong>Add Required Plug-ins</strong> button.  The <strong>Add Required Plug-ins</strong> button should be used often to ensure the subset of plug-ins you have selected is complete. </p>
-<p>Please note that if a workspace plug-in has the same ID as a target plug-in, the workspace plug-in is used in place of its target counterpart. This behavior applies to all three plug-in selection options described above; however, you can override this option by choosing the third option, deselecting a workspace plug-in and selecting the target plug-in with the same ID. </p>
-
-<h2>Validate Plug-ins</h2>
-<p>The <strong>Validate Plug-ins</strong> functionality, which can be invoked via the button located at the bottom right corner of the <strong>Plug-ins tab</strong>, analyzes the selected set of plug-ins to find launching startup problems. For instance, missing dependencies, unsatisfied execution environments, incompatible platform filters are a few of the potential problems that may prevent your plug-in from running.</p>
-<p>By checking the <strong>Validate plug-ins automatically prior to launching</strong> option, PDE will run the <strong>Validate Plug-ins</strong> function prior to every launch. If problems are found, an error dialog will appear for you to examine and you can choose to either continue the launch without correcting the problems or cancel the launch to rectify the issues. Otherwise, if no problems are found, the launch proceeds as normal. </p>
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/environment.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/environment.htm
index 4f2bc6e..712b128 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/environment.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/environment.htm
@@ -10,8 +10,33 @@
 
 <body>
 <h1>Environment Tab</h1>
-<p>The <strong>Environment Tab</strong> is a tab that is common to all PDE and Java launch configurations. It defines the environment variable values to use when running an application. By default, the environment is inherited from the Eclipse runtime. You may opt to override the environment or append to it. </p>
+<p>The <strong>Environment Tab</strong> is a tab that is common to all PDE and Java launch configurations.
+  It defines the environment variable values to use when running an application. By default, the environment
+  is inherited from the Eclipse runtime. You may opt to override the environment or append to it.</p>
+<p>
+  Variables specified in the tab always replace values in the underlying native environment. However, when
+  "Append environment to native environment" is selected the launched environment is seeded
+  with the native environment, after which variables in the tab replace (existing variables)
+  or augment the set of environment variables. When "Replace native environment with
+  specified environment" is selected, the launched environment is comprised only of the
+  variables specified in the tab.
+</p>
 <p><img src="../../images/launchers/launcher_eclipse_environment.png" alt="Environment Tab" ></p>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_args.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_args.htm
index 46417b7..a3a4b58 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_args.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_args.htm
@@ -27,5 +27,18 @@
 <h2>Working Directory</h2>
 <p>The <strong>Working Directory</strong> specifies the directory in which the <em>Equinox OSGi Framework</em> executes (e.g. read and write files into the working directory, etc.). By default, the working directory is the root directory of the Eclipse installation; but, it can be configured by the user to be any writable directory they wish. </p>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_plugins.htm">Bundles Tab</a><br>
+  <a href="equinox_args.htm">Arguments Tab</a><br>
+  <a href="equinox_settings.htm">Settings Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_launcher.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_launcher.htm
index 35d8499..451cbe5 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_launcher.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_launcher.htm
@@ -32,5 +32,12 @@
   <li><a href="common.htm">Common Tab</a></li>
 </ul>
 
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_plugins.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_plugins.htm
index d853e86..938f1b2 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_plugins.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_plugins.htm
@@ -27,8 +27,19 @@
 <h2>Validate Bundles</h2>
 <p>The <STRONG>Validate Bundles</STRONG> functionality, which can be invoked   via the button located at the bottom right corner of the <STRONG>Bundles   tab</STRONG>, analyzes the selected set of bundles to find launching   startup problems. For instance, missing dependencies, unsatisfied execution environments,   incompatible platform filters are a few of the potential problems that may   prevent your bundle from running.</p>
 <p>By checking the <STRONG>Validate bundles automatically prior to   launching</STRONG> option, PDE will run the <strong>Validate Bundle</strong> function prior to every launch. If problems are found, a dialog showing the error comes up for you to examine and you have the option to continue the launch without correcting the problems or canceling the launch to rectify the issues. Otherwise, if no problems are found, the launch proceeds as normal. </p>
-<br>
-<br>
-<br>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_plugins.htm">Bundles Tab</a><br>
+  <a href="equinox_args.htm">Arguments Tab</a><br>
+  <a href="equinox_settings.htm">Settings Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_settings.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_settings.htm
index 8b981a8..f87a770 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_settings.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/equinox_settings.htm
@@ -30,5 +30,18 @@
 <p>If desired, the user can set the location of the configuration area.   Variables in the directory path are supported in order to facilitate shareable launch configurations among team members.</p>
 <p>You also have the option to <strong>Clear the configuration area before launching</strong>, which is useful for testing how bundles cache data in that area.  </p>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_plugins.htm">Bundles Tab</a><br>
+  <a href="equinox_args.htm">Arguments Tab</a><br>
+  <a href="equinox_settings.htm">Settings Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_configuration.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_configuration.htm
deleted file mode 100644
index c067864..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_configuration.htm
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>JUnit Plug-in Configuration Tab</title>
-<link href="../../book.css" rel="stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Configuration Tab</h1>
-<p>The <strong>Configuration Tab</strong> is an advanced tab that lets you override the default configuration area location and the <em>config.ini</em> file content of the runtime Eclipse application you are testing. </p>
-<h1><img src="../../images/launchers/launcher_junit_configuration.PNG" alt="JUnit Configuration" ></h1>
-
-<h2>Configuration Area</h2>
-<p>Every Eclipse application instance has a unique configuration area which contains metadata, caches and configuration files read by the runtime and <em>Update Manager</em> upon startup.</p>
-<p>Typically, the location of the configuration is not important; therefore, PDE generates a unique configuration area in its own metadata area. </p>
-<p>By default, this area is reused by all <em>JUnit Plug-in Test</em> launch configurations and deleted when the launch configuration is deleted. That is why the option to <strong>Clear the configuration area before launching</strong> is on by default. </p>
-<p>If desired, the user can set the location of the configuration area. Variables in the directory path are supported in order to make launch configurations sharable among team members.</p>
-
-<h2>Configuration File</h2>
-<p> Upon startup, the runtime reads a configuration file named <em>config.ini</em> located in a <em>configuration/</em> subdirectory of the configuration area associated with the Eclipse application instance. This file is a standard properties file that can configure many aspects of the runtime. For a full list of the supported properties, refer to the <a href="../../../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html">Eclipse runtime options</a> document.</p>
-<p>The <strong>Generate a config.ini file with default content</strong> is the default option and is recommended unless you have some very specific needs.  When this option is selected, PDE generates a <em>config.ini</em> file with the following properties:</p>
-<ul>
-    <li><strong>osgi.bundles</strong> - lists all the bundles that should be installed and optionally started once the system is up and running. This list is based on the <em>osgi.bundles</em> key found in the <em>${target_home}/configuration/config.ini</em> file.  (Note, the ${target_home} variable is the location of the target platform).</li>
-  <li><strong>osgi.bundles.defaultStartLevel</strong> - denotes the default OSGi start level at which a bundle should start.  The default value is set to <strong>4</strong></li>
-  <li><strong>osgi.configuration.cascaded</strong> - indicates whether this configuration is standalone or has a parent configuration to cascade up to.  The default value is set to false.</li>
-  <li><strong>osgi.framework</strong> - specifies the URL location of the <em>org.eclipse.osgi</em> plug-in</li>
-  <li><strong>osgi.install.area</strong> - specifies the location of the target platform. </li>
-  <li><strong>osgi.splashPath</strong> - specifies one or more locations of the splash screen.</li>
-</ul>
-<p>The <strong>Use an existing config.ini file as a template</strong> option takes an existing <em>config.ini</em> and makes a copy of it. PDE neither adds nor removes any properties from the file.  However, PDE modifies the <strong>osgi.bundles</strong> and <strong>osgi.splashPath</strong> keys by substituting their generic bundle URL values with absolute paths that reflect the actual locations of bundles on disk.</p>
-<br>
-<br>
-<br>
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_launcher.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_launcher.htm
index 9927984..1fce9e9 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_launcher.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_launcher.htm
@@ -28,13 +28,19 @@
 <ul>
   <li><a href="junit_test.htm">Test Tab</a></li>
   <li><a href="junit_main.htm">Main Tab  </a></li>
-  <li><a href="junit_plugins.htm">Plug-ins Tab</a></li>
-  <li><a href="eclipse_args.htm">Arguments Tab </a></li>
-  <li><a href="junit_configuration.htm">Configuration Tab </a></li>
+  <li><a href="plugins.htm">Plug-ins Tab</a></li>
+  <li><a href="arguments.htm">Arguments Tab </a></li>
+  <li><a href="configuration.htm">Configuration Tab </a></li>
   <li><a href="tracing.htm">Tracing Tab</a></li>
   <li><a href="environment.htm">Environment Tab</a></li>
   <li><a href="common.htm">Common Tab</a></li>
 </ul>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a>
+</p>
+
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_main.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_main.htm
index e7e8503..e195aea 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_main.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_main.htm
@@ -46,6 +46,20 @@
   <li><a href="../../../../org.eclipse.platform.doc.isv/reference/misc/runtime-options.html">Eclipse Runtime Options </a></li>
 </ul>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="junit_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
 
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_plugins.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_plugins.htm
deleted file mode 100644
index 5f85fd2..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_plugins.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>JUnit Plug-ins Tab</title>
-<link href="../../book.css" rel="stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Plug-ins Tab</h1>
-<p>When testing your plug-in, you have the ability to manage and select the list of plug-ins that you want to launch with on the <strong>Plug-ins Tab</strong> of the launch configuration. </p>
-<p><img src="../../images/launchers/launcher_junit_plugins.png" alt="JUnit Plug-ins Tab" ></p>
-
-<h2>Launch Options </h2>
-<p>The <strong>Launch with</strong> combo box allows you to configure the way the JUnit Plug-in Test is launched. The options are explained in more detail below.</p>
-<p>The <strong>all workspace and enabled external plug-ins</strong> option is the default setting. With this option, the runtime Eclipse application you are launching will be made up of all the workspace plug-ins and all the plug-ins that are explicitly checked on the <strong>Window > Preferences... > Plug-in Development > Target Platform</strong> preference page. This option requires little maintenance because the list of plug-ins is maintained by PDE and updated prior to every launch as plug-ins are created or deleted in the workspace. This option is recommended when the <strong>Program to Run</strong> setting on the <a href="junit_main.htm">Main tab</a> of the launch configuration is set to the <strong>default product</strong> or <strong>default application</strong> of your target. </p>
-<p>The <strong>plug-ins selected below only</strong> option is typically used when you are in <strong>headless</strong> mode or when you are testing an RCP application that uses a subset of the plug-ins from the workspace and target. This setting requires more maintenance than the other options since, you have to ensure the list of selected plug-ins is up-to-date when you add or remove a plug-in from the workspace. There are several buttons available to help you select plug-ins, including an <strong>Add Required Plug-ins</strong> button.  The <strong>Add Required Plug-ins</strong> button should be used often to ensure the subset of plug-ins you have selected is complete. </p>
-<p>Please note that if a workspace plug-in has the same ID as a target plug-in, the workspace plug-in overrides its target counterpart. This behavior can be overridden when using the second option; since, you can deselect a workspace plug-in and select its target counterpart. </p>
-
-<h2>Validate Plug-ins</h2>
-<p>The <strong>Validate Plug-ins</strong> functionality, which can be invoked via the button located at the bottom right corner of the <strong>Plug-ins tab</strong>, analyzes the selected set of plug-ins to find launching startup problems. For instance, missing dependencies, unsatisfied execution environments, incompatible platform filters are a few of the potential problems that may prevent your plug-in from running.</p>
-<p>By checking the <strong>Validate plug-ins automatically prior to launching</strong> option, PDE will run the <strong>Validate Plug-ins</strong> function prior to every launch. If problems are found, an error dialog will appear for you to examine and you can choose to either continue the launch without correcting the problems or cancel the launch to rectify the issues. Otherwise, if no problems are found, the launch proceeds as normal. </p>
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_test.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_test.htm
index ff37716..9900fe4 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_test.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/junit_test.htm
@@ -25,6 +25,21 @@
   <li><strong>JUnit 4</strong>:   uses <em>JUnit 4.1.0</em> and is available only if you are running Eclipse with a JRE version that is greater than or equal to 1.5.</li>
 </ul>
 
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="junit_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/plugins.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/plugins.htm
new file mode 100644
index 0000000..9ea7944
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/plugins.htm
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Plug-ins Tab</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
+</head>
+
+<body>
+<h1>Plug-ins Tab</h1>
+<p>When testing your plug-in, you have the ability to manage and select the list of plug-ins that you want to launch with on the  <strong>Plug-ins Tab</strong> of the launch configuration. </p>
+<p><img src="../../images/launchers/launcher_eclipse_plugins.png" alt="Plug-ins tab" ></p>
+
+<h2>Launch Options </h2>
+<p>The <strong>Launch with</strong> combo box allows you to configure the way the Eclipse Application is launched. The options are explained in more detail below.</p>
+<p>The <strong>all workspace and enabled external plug-ins</strong> option is the default setting. With this option, the runtime Eclipse application you are launching will be made up of all the workspace plug-ins and all the plug-ins that are explicitly checked on the <strong>Window > Preferences... > Plug-in Development > Target Platform</strong> preference page. This option requires little maintenance because the list of plug-ins is maintained by PDE and updated prior to every launch as plug-ins are created or deleted in the workspace. This option is recommended when the <strong>Program to Run</strong> setting on the <a href="eclipse_main.htm">Main tab</a> of the launch configuration is set to the <strong>default product</strong> or <strong>default application</strong> of your target. </p>
+<p>The <strong>plug-ins selected below only</strong> option is typically used when you are testing an RCP application that uses a subset of the plug-ins from the workspace and target. This setting requires more maintenance than the other options, since you have to ensure that the list of selected plug-ins is up-to-date when you add or remove a plug-in from the workspace. <strong>Add Required Plug-ins</strong> should be used to ensure the subset of plug-ins you have selected is complete.</p>
+<p>The <strong>features selected below</strong> option can be used to launch an RCP application by specifying features. It also allows to specify the location from where the feature plug-ins should be picked - Workspace or External (Target Platform). The plug-in resolution is first find location. Thus, if a plug-in marked for Workspace is not found there, then it is searched in External location and vice-versa. Select <strong>Add Plug-ins...</strong> to add individual plug-ins to the launch configuration. <strong>Select Required</strong> will look for the dependent features of the presently selected features and add them also to the configuration. If there are many features, <strong>Select Features...</strong> can be used to find and select specific features.</p>
+<p>Feature-based configurations launch with plug-ins resolved from the selected features and any additional plug-ins <em>as well as </em> all required plug-ins.  This means that a minimal set of features/plug-ins can be selected and still have a valid launch.</p>
+<p><img src="../../images/launchers/launcher_eclipse_features.png" alt="Plug-ins tab" ></p>
+<p>Please note that if a workspace plug-in has the same ID as a target plug-in, the workspace plug-in is used in place of its target counterpart. This behavior applies to all three plug-in selection options described above; however, you can override this option by choosing the third option, deselecting a workspace plug-in and selecting the target plug-in with the same ID. </p>
+
+<h2>Validate Plug-ins</h2>
+<p>Selecting <strong>Validate Plug-ins</strong> analyzes the selected set of plug-ins to find launching startup problems. For instance, missing dependencies, unsatisfied execution environments, incompatible platform filters are a few of the potential problems that may prevent your plug-in from running.</p>
+<p>By checking the <strong>Validate plug-ins automatically prior to launching</strong> option, PDE will run the <strong>Validate Plug-ins</strong> function prior to every launch. If problems are found, an error dialog will appear for you to examine and you can choose to either continue the launch without correcting the problems or cancel the launch to rectify the issues. Otherwise, if no problems are found, the launch proceeds as normal. </p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/tracing.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/tracing.htm
index 94afb1e..3697121 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/tracing.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/launchers/tracing.htm
@@ -32,9 +32,22 @@
 <h2>Enable Tracing </h2>
 <p>When the  <strong>Enable tracing for the selected  plug-ins</strong> option is checked, PDE launches with the <em>-debug <filename></em> program argument.  The <em><filename></em> portion of the program argument is a properties file generated by PDE that contains both key-value pairs for the plug-ins you are tracing and the state of each tracing flag.</p>
 <p>Please note that toggling tracing flags on the <strong>Tracing tab</strong> does not result in the modification of the <em>.options</em> file. The tracing flag values are saved as metadata in the launch configuration itself and are copied into the master properties file that is passed to the runtime via the <em>-debug</em> argument.</p>
-<br>
-<br>
-<br>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
+<p>
+  <a href="eclipse_application_launcher.htm">Eclipse Application Launcher</a><br>
+  <a href="junit_launcher.htm">JUnit Plug-in Test Launcher</a><br>
+  <a href="equinox_launcher.htm">OSGi Framework Launcher</a><br>
+  <a href="junit_test.htm">Junit Launcher Test Tab</a><br>
+  <a href="eclipse_main.htm">Main Tab</a><br>
+  <a href="arguments.htm">Arguments Tab</a><br>
+  <a href="plugins.htm">Plug-ins Tab</a><br>
+  <a href="configuration.htm">Configuration Tab</a><br>
+  <a href="tracing.htm">Tracing Tab</a><br>
+  <a href="environment.htm">Environment Tab</a><br>
+  <a href="common.htm">Common Tab</a>
+</p>
+
 </body>
 
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
index 441a2d0..7059a21 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/preference_pages/plug_in_development.htm
@@ -2,11 +2,12 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
 <title>General Plug-in Development Preferences</title>
+<link href="../../book.css" rel="stylesheet" type="text/css">
 </head>
-
 <body>
 <h1>General Plug-in Development Preferences</h1>
 <p>The  Plug-in Development preference page provides global settings that control:</p>
@@ -17,13 +18,22 @@
 
 <p><img src="../../images/preferences/plugin_development.png" alt="Main Preference Page" ></p>
 
-<h2>Presentation Label Preference </h2>
+<h2>Presentation Labels</h2>
 <p>By default, whenever a plug-in or a feature is presented in the UI (i.e. in the outline view, Plug-ins view, editors, etc.), the label shows the plug-in or feature ID followed by the plug-in or feature version. </p>
 <p>The <strong>Presentation Label</strong> preference is a global setting that allows you to show an alternate label for plug-ins and features composed of the (translated) name of the plug-in or feature followed by the plug-in or feature version.</p>
 
-<h2>Automated Management of Dependencies Preference </h2>
-<p>With the<a href="../editors/manifest_editor/automated_management.htm"> Automated Management of Dependencies</a> workflow, it is the user's responsibility to explicitly invoke the function that analyzes the plug-in code and generates the correct dependencies for the plug-in <em>MANIFEST.MF</em> file. Neglecting to update the manifests may result in class loading errors when testing the plug-in. </p>
-<p>With the <strong>Automated Management of Dependencies</strong> preference selected, PDE checks all the manifest files in your workspace and makes necessary updates to the manifests prior to launching. This option is a great convenience, but it is off by default because it presents an overhead in the time to launch. </p>
+<h2>Automated Management of Dependencies</h2>
+<p>With automated management of dependencies it is the user's responsibility to explicitly invoke the function that analyzes the plug-in code and generates the correct dependencies for the plug-in <em>MANIFEST.MF</em> file. Neglecting to update the manifests may result in class loading errors when testing the plug-in. </p>
+<p>The <strong>Update stale manifest files prior to launching</strong> preference will have PDE check all the manifest files in your workspace and make necessary updates to the manifests prior to launching.  This option is off by default as it decreases launch performance.</p>
+
+<h2>Exporting</h2>
+<p>Export Wizard creates a build.xml file when a plug-in is being exported. If the <strong>Prompt before overwriting build.xml files when exporting</strong> preference is selected, the user is prompted for confirmation before overwriting this file. This preference is used to preserve any custom changes made by the user.</p>  
+
+<h2>Source</h2>
+<p>When <strong>Show source plug-ins</strong> preference is selected, the source plug-ins too are displayed on Plug-ins tab of Eclipse Application launch configuration and on plug-ins import wizard.</p>
 
+<h2>Target Definitions</h2>
+<p>If <strong>Prompt before deleting a target definition file</strong> is selected, you will be prompted before a target definition file is deleted when <strong>Remove</strong> is pressed on the <a href="target_platform.htm">Target Platform</a> preference page.</p>
+<p>If <strong>Include all plug-ins from target in Java search</strong> is selected, all the plug-ins from the active target platform will be added to the Java search scope.  Adding plug-ins to the java search scope will allow the plug-in contents to show up when doing Java searches and using the Open Type Dialog.  When this option is on, if any plug-in is removed from Java search, the preference will be turned off.</p>  
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/target_shared/edit_target_content_tab.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/target_shared/edit_target_content_tab.htm
index b8cc39a..667f787 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/target_shared/edit_target_content_tab.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/target_shared/edit_target_content_tab.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Content Tab</title>
 <link rel="stylesheet" href="../../book.css" charset="ISO-8859-1" type="text/css">
@@ -14,7 +14,7 @@
 
 <p>The <strong>Content Tab</strong> in the <a href="./edit_target_wizard.htm">Edit Target Wizard</a> is used to set a subset of plug-ins to include in the target platform.  The tab displays a list of all plug-ins available in the target definition's <a href="./edit_target_locations_tab.htm">locations</a>.  Only the plug-ins checked on this tab will be included.  There are multiple ways to organize and filter the list.  The target content can also be edited on the <a href="../editors/target_editor/content_page.htm">Content Page</a> of the <a href="../editors/target_editor/target_editor.htm">Target Editor</a>.</p>
 
-<img src="../../images/target_shared/edit_target_content_tab.png" alt="Location Tab">
+<p><img src="../../images/target_shared/edit_target_content_tab.png" alt="Content Tab"></p>
 
 <p><strong>Select / Deselect</strong> will check or uncheck the selected plug-ins. </p>
 
@@ -31,6 +31,17 @@
 <li><strong>Location</strong> - Grouped by the locations set on the <a href="edit_target_locations_tab.htm">locations tab</a></li>
 </ol>
 
+<h2>Managing Content with Features</h2>
+
+<p>On the right hand side, you can choose between two different modes to manage the content of the target.  By default targets
+are managed using a list of plug-ins.  Selecting <strong>Features</strong> will change your target contents to a list of features.</p>
+
+<p><img src="../../images/target_shared/edit_target_content_tab_feature_mode.png" alt="Content Tab Feature Mode"></p>
+
+<p>You can select features in the same way as when managing by plug-ins.  <strong>Add Required</strong> will select any features that the currently
+selected features have in their <em>include</em> or <em>require</em> entries.  If there are plug-ins in the target that do not belong to a
+feature, they will be listed under the <em>Other Plug-ins</em> item and can be selected individually.</p>
+
 <p><img src="../../../images/ngrelr.png" alt="Related reference"></p>
 <p>
 <a href="./edit_target_wizard.htm">Edit Target Wizard</a><br>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/views/target_platform_state.htm b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/views/target_platform_state.htm
index e7ff3f9..1c05d7c 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/views/target_platform_state.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/guide/tools/views/target_platform_state.htm
@@ -2,7 +2,7 @@
 "http://www.w3.org/TR/html4/loose.dtd">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) 2009, 2010 IBM Corporation and others. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>Target Platform State</title>
 <script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
@@ -13,7 +13,7 @@
 <h1>Target Platform State</h1>
 <p>The <strong>Target Platform State View</strong> shows the current status of the resolver state in PDE.</p>
 
-<p>The view is available under <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.pde.ui.TargetPlatformStateView)")'>
+<p>The view is available under <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.pde.ui.TargetPlatformState)")'>
 <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Open the Target Platform State view">
 <strong>Window > Show View > Other... > Plug-in Development > Target Platform State</strong>
 </a>.</p>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/notices.html b/eclipse/plugins/org.eclipse.pde.doc.user/notices.html
index b81cc5e..8008473 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/notices.html
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/notices.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="STYLESHEET" href="book.css" type="text/css">
@@ -13,7 +13,7 @@
 <h3>
 <a name="Notices"></a>Notices</h3>
 <p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2009.
+The material in this guide is Copyright (c) IBM Corporation and others 2000, 2010.
 </p>
 <p>
 <a href="about.html">Terms and conditions regarding the use of this guide.</a>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/pdeOptions.txt b/eclipse/plugins/org.eclipse.pde.doc.user/pdeOptions.txt
index 8bcf11b..9ab78d0 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/pdeOptions.txt
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/pdeOptions.txt
@@ -2,52 +2,55 @@
 -charset "iso-8859-1"
 -sourcepath "../org.eclipse.pde.core/src
 ;../org.eclipse.pde.ui/src
-;../org.eclipse.pde.build/src"
+;../org.eclipse.pde.build/src
+;../org.eclipse.pde.launching/src"
 -d reference/api
 -classpath @rt@
-;../org.eclipse.core.boot/@dot
-;../org.eclipse.debug.core/@dot
 ;../org.eclipse.compare/@dot
 ;../org.eclipse.compare.core/@dot
-;../org.eclipse.help/@dot
-;../org.eclipse.help.ui/@dot
+;../org.eclipse.core.boot/@dot
+;../org.eclipse.core.contenttype/@dot
+;../org.eclipse.core.jobs/@dot
 ;../org.eclipse.core.resources/@dot
 ;../org.eclipse.core.runtime/@dot
-;../org.eclipse.swt.win32.win32.x86/@dot
-;../org.eclipse.ui/@dot
+;../org.eclipse.core.runtime.content/@dot
+;../org.eclipse.core.runtime.jobs/@dot
+;../org.eclipse.core.runtime.preferences/@dot
+;../org.eclipse.core.variables/@dot
+;../org.eclipse.debug.core/@dot
+;../org.eclipse.debug.ui/@dot
+;../org.eclipse.equinox.common/@dot
+;../org.eclipse.equinox.preferences/@dot
+;../org.eclipse.equinox.registry/@dot
+;../org.eclipse.equinox.supplement/@dot
+;../org.eclipse.help/@dot
+;../org.eclipse.help.ui/@dot
 ;../org.eclipse.jdt.core/@dot
-;../org.eclipse.jdt.ui/@dot
-;../org.eclipse.jdt.launching/@dot
 ;../org.eclipse.jdt.debug/jdi.jar
-;../org.eclipse.debug.ui/@dot
-;../org.eclipse.search/@dot
+;../org.eclipse.jdt.debug.ui/@dot
+;../org.eclipse.jdt.junit/@dot
+;../org.eclipse.jdt.junit/junitsupport.jar
+;../org.eclipse.jdt.junit.core/@dot
+;../org.eclipse.jdt.launching/@dot
+;../org.eclipse.jdt.ui/@dot
 ;../org.eclipse.jface/@dot
 ;../org.eclipse.jface.text/@dot
+;../org.eclipse.osgi/@dot
+;../org.eclipse.osgi.services/@dot
+;../org.eclipse.osgi.util/@dot
+;../org.eclipse.pde.core/@dot
+;../org.eclipse.pde.ui/@dot
+;../org.eclipse.pde.build/@dot
+;../org.eclipse.pde.launching/@dot
+;../org.eclipse.search/@dot
+;../org.eclipse.swt.win32.win32.x86/@dot
 ;../org.eclipse.text/@dot
+;../org.eclipse.ui/@dot
 ;../org.eclipse.ui.editors/@dot
+;../org.eclipse.ui.ide/@dot
 ;../org.eclipse.ui.views/@dot
 ;../org.eclipse.ui.workbench/@dot
 ;../org.eclipse.ui.workbench.texteditor/@dot
-;../org.eclipse.core.variables/@dot
-;../org.eclipse.ui.ide/@dot
-;../org.eclipse.jdt.junit/@dot
-;../org.eclipse.pde.core/@dot
-;../org.eclipse.pde.ui/@dot
-;../org.eclipse.osgi/@dot
-;../org.eclipse.osgi.services/@dot
-;../org.eclipse.osgi.util/@dot
-;../org.eclipse.core.jobs/@dot
-;../org.eclipse.equinox.registry/@dot
-;../org.eclipse.equinox.common/@dot
-;../org.eclipse.equinox.preferences/@dot
-;../org.eclipse.equinox.supplement/@dot
-;../org.eclipse.core.runtime.content/@dot
-;../org.eclipse.core.runtime.jobs/@dot
-;../org.eclipse.core.runtime.preferences/@dot
-;../org.eclipse.core.contenttype/@dot
-;../org.eclipse.jdt.debug.ui/@dot
-;../org.eclipse.jdt.junit/junitsupport.jar
-;../org.eclipse.jdt.junit/@dot
 ;../org.eclipse.update.configurator/@dot
 -breakiterator
 -use
@@ -55,9 +58,9 @@
 
 -windowtitle "Eclipse PDE API Specification"
 -doctitle "Eclipse PDE API Specification"
--header "<b>Eclipse PDE</b><br>Release 3.5"
--bottom "Copyright (c) IBM Corp. and others 2000, 2008.  All Rights Reserved."
--link http://java.sun.com/j2se/1.4/docs/api
+-header "<b>Eclipse PDE</b><br>Release 3.6"
+-bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using Eclipse APIs</a>.</p><p>Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.</p></font>'
+-link http://download.oracle.com/javase/1.4.2/docs/api
 -linkoffline ./../../../org.eclipse.platform.doc.isv/reference/api ../org.eclipse.platform.doc.isv/reference/api
 -linkoffline ./../../../org.eclipse.jdt.doc.isv/reference/api ../org.eclipse.jdt.doc.isv/reference/api
 -link http://bundles.osgi.org/javadoc/r4
@@ -71,6 +74,8 @@ org.eclipse.pde.build
 org.eclipse.pde.core
 org.eclipse.pde.core.build
 org.eclipse.pde.core.plugin
+org.eclipse.pde.core.project
 org.eclipse.pde.ui
 org.eclipse.pde.ui.launcher
 org.eclipse.pde.ui.templates
+org.eclipse.pde.launching
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/plugin.xml b/eclipse/plugins/org.eclipse.pde.doc.user/plugin.xml
index 37f623c..0227310 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/plugin.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
+<?eclipse version="3.0"?>
+<!--
      Copyright (c) 2005, 2008 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-ant-task.htm
index 5bf7e15..889276d 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -16,7 +16,7 @@
 
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.analysis</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.analysis</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre style="margin-left: 40px">
@@ -175,16 +175,17 @@ The keys can be found in org.eclipse.pde.api.tools.internal.provisional.problems
 It will use the exclude list and the <code>.api_filter</code> files located in <code>D:\exclude_list_external.txt</code> and 
 <code>D:\filters</code> to reduce the number of problems to report.</p>
 <p>Problem severities will be generated as specified by <code>D:\tests_api\org.eclipse.pde.api.tools.prefs</code>.</p>
-<p>Since debug is enabled, some debug tracing will show up in the ant console.</p>
+<p>Since debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a>
+<p><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm
index 84c9301..693942c 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -11,11 +11,11 @@
 <body>
 <h1> API Tools Analysis Report Conversion Ant Task </h1>
 <h2>Purpose</h2>
-<p>This task converts  XML reports created by the <code>apitooling.analysis</code> ant task into HTML files.
+<p>This task converts  XML reports created by the <code>apitooling.analysis</code> Ant task into HTML files.
 </p>
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.analysis_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.analysis_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre style="margin-left: 40px">
@@ -70,15 +70,16 @@ classpath.</p>
 <p>This will create an <code>index.html</code> inside the folder <code>D:\reports\html</code>. A report for each
 bundle will be created inside a sub-folder of <code>D:\reports\html</code>. Each sub-folder will contain a 
 <code>report.html</code>.</p>
-<p>Since debug is enabled, some debug tracing will show up in the ant console.</p>
+<p>Since debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="analysis-ant-task.htm">API Tools Analysis Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a></p>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a></p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-ant-task.htm
index d23085c..0f429f7 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -15,7 +15,7 @@
 This task is intended to validate no API changes occur after an API freeze. </p>
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.apifreeze</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.apifreeze</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre style="margin-left: 40px">
@@ -112,15 +112,16 @@ org.eclipse.ui.workbench_3.4.0:org.eclipse.ui.ISharedImages#IMG_ELCL_COLLAPSEALL
 </pre>
 <p>This will run the task creating <code>report.xml</code> inside the folder <code>D:\report</code>.
 It will use the exclude list <code>D:\exclude_list_external.txt</code> to reduce the number of problems to report.</p>
-<p>Since debug is enabled, some debug tracing will show up in the ant console.</p>
+<p>Since debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="analysis-ant-task.htm">API Tools Analysis Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a></p>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a></p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm
index 73f01b5..7eec00b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -11,10 +11,10 @@
 <body>
 <h1> API Tools API Freeze Report Conversion Ant Task </h1>
 <h2>Purpose</h2>
-<p>This task converts the XML report created by the <code>apitooling.apifreeze</code> ant task into an HTML file.</p>
+<p>This task converts the XML report created by the <code>apitooling.apifreeze</code> Ant task into an HTML file.</p>
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.apifreeze_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.apifreeze_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre style="margin-left: 40px">
@@ -67,16 +67,17 @@ classpath.</p>
 </pre>
 <p>This will run the task creating <code>report.html</code> inside the folder <code>D:\report</code> as the
 htmlfile attribute is not set.</p>
-<p>Since debug is enabled, some debug tracing will show up in the ant console.</p>
+<p>Since debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="analysis-ant-task.htm">API Tools Analysis Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">AAPI Freeze Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-ant-task.htm
new file mode 100644
index 0000000..ae30ef4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-ant-task.htm
@@ -0,0 +1,146 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="stylesheet" href="../../../apache_style.css" type="text/css">
+<title>API Use Migration Ant Task</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+<body>
+<h1> API Use Migration Ant Task </h1>
+<h2>Purpose</h2>
+<p>This task takes a given API use scan and tries to re-resolve it within a 
+given candidate product release and reports any unresolved references.</p>
+
+<h2>Usage</h2>
+<h3>Description</h3>
+<p>The name of the Ant task is: <code>apitooling.apimigration</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
+classpath.</p>
+<pre>
+	<b><font color="#0000ff"><apitooling.apimigration
+		candidate=<font color="#008000">"..."</font>
+		usescan=<font color="#008000">"..."</font>
+		scopepattern=<font color="#008000">"..."</font>
+		referencepattern=<font color="#008000">"..."</font>
+		report=<font color="#008000">"..."</font>
+		debug=<font color="#008000">"..."</font>
+	/></font></b>
+</pre>
+<h3>Parameters</h3>
+<table border="1" cellpadding="2" cellspacing="0">
+  <tr>
+    <td valign="top"><b>Attribute</b></td>
+    <td valign="top"><b>Description</b></td>
+    <td align="center" valign="top"><b>Required</b></td>
+  </tr>
+<tr>
+	<td valign="top">candidate</td>
+	<td valign="top">This attribute specifies the product you want to use as the migration candidate. 
+	 	<p>
+	 		It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to 
+	 		the Eclipse installation folder. This is the directory is which you can find the 
+			Eclipse executable.
+	 	</p>
+	</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">usescan</td>
+	<td valign="top">This attribute specifies the product use scan you want to compare to the migration candidate. 
+		<br><br>
+		The usescan is specified using an absolute path to the root of the use scan.
+	</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">scopepattern</td>
+	<td valign="top">
+		This attribute specifies the regular expression pattern used to build the scope of elements to search for 
+	 	references from in the product location.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">referencepattern</td>
+	<td valign="top">
+		Set the regular expression pattern used to build the scope of elements to search for 
+	 	references to in the product location.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	 	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">report</td>
+	<td valign="top">Set the output location where the reports will be generated.
+		<br><br>
+		Once the task is completed, reports are available in this directory using a hierarchical structure. A sub-folder is created
+		for each component that has another bundle that references it. Each sub-folder contains a file called "[bundlename].xml". Within
+		this folder is another sub-folder (named "[referencing bundle name].xml") for each bundle that references the bundle of the containing folder. 
+		Inside the referencing bundle folder is one of three sub-folders (API, PRIVATE or OTHER) which contain type, method or field references of that kind.
+		<br><br>
+		Two other special files are written into the report directory, which are "not_searched.xml" and "no_apidescription.xml" and they contain
+		information about bundles from the baseline that were not search for usage information and those that did not have an .api_description files in them, respectively.
+		<br><br>
+		The location is specified using an absolute path.
+		<br><br>
+		For example:
+<pre>
+  root
+   |
+   +-- "not_searched.xml"
+   +-- "no_apidescription.xml"
+   +-- bundle name with usage
+   		|
+   		+--referencing bundle name
+   			|
+   			+-- [API or PRIVATE or OTHER]
+   				|
+   				+--[type_ or method_ or field_]references.xml
+</pre>
+		</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">debug</td>
+	<td valign="top">Set the debug value.
+		<br><br>The possible values are: <code>true</code>, <code>false</code>
+		<br>Default is <code>false</code>.</td>
+	<td align="center" valign="top">No</td>
+</tr>
+</table>
+
+<h3>Examples</h3>
+<pre>
+	<b><font color="#0000ff"><apitooling.apimigration
+		candidate=<font color="#008000">"/eclipse/sdk3.5"</font>
+		usescan=<font color="#008000">"/eclipse/scans/sdk3.4"</font>
+		scopepattern=<font color="#008000">".*"</font>
+		referencepattern=<font color="#008000">"org\.eclipse.*"</font>
+		report=<font color="#008000">"/eclipse/apimigration/xml"</font>
+		debug=<font color="#008000">"true"</font>
+	/></font></b>
+</pre>
+<p>This will run the task creating <code>*.xml</code> files inside the folder <code>/eclipse/apimigration/xml</code>.
+The task will re-resolve all references in the <code>usescan</code> location - defined by the regular expression <code>.*</code> - against 
+the candidate product whose identifier begins with org.eclipse (defined by the <code>org\.eclipse.*</code> regular expression).</p>
+<p>If debug is enabled, some debug tracing will show up in the Ant console.</p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
+<br><a href="apimigration-reportconversion-ant-task.htm">API Use Migration Report Conversion Ant Task</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-reportconversion-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-reportconversion-ant-task.htm
new file mode 100644
index 0000000..1cecb31
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apimigration-reportconversion-ant-task.htm
@@ -0,0 +1,122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="stylesheet" href="../../../apache_style.css" type="text/css">
+<title>API Use Migration Report Conversion Ant Task</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+<body>
+<h1> API Use Migration Report Conversion Ant Task </h1>
+<h2>Purpose</h2>
+<p>This task converts the XML report created by the <code>apitooling.apimigration</code> Ant task into HTML files.</p>
+<h2>Usage</h2>
+<h3>Description</h3>
+<p>The name of the Ant task is: <code>apitooling.apimigration_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
+classpath.</p>
+<div style="text-align: left;">
+<pre>
+	<b><font color="#0000ff"><apitooling.apimigration_reportconversion
+		xmlfiles=<font color="#008000">"..."</font>
+		htmlfiles=<font color="#008000">"..."</font>
+		xsltfile=<font color="#008000">"..."</font>
+		filterpatterns=<font color="#008000">"..."</font>
+		tofilterpatterns=<font color="#008000">"..."</font>
+		debug=<font color="#008000">"..."</font>
+	/></font></b>
+</pre>
+</div>
+<h3>Parameters</h3>
+<table border="1" cellpadding="2" cellspacing="0">
+  <tr>
+    <td valign="top"><b>Attribute</b></td>
+    <td valign="top"><b>Description</b></td>
+    <td align="center" valign="top"><b>Required</b></td>
+  </tr>
+<tr>
+	<td valign="top">xmlfiles</td>
+	<td valign="top">This attribute specifies the location of the xml files to convert.
+	<br><br>
+	The location is specified using an absolute path.
+	</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">htmlfiles</td>
+	<td valign="top">This attribute specifies the location of the html files to generate.
+	<br><br>
+	The location is specified using an absolute path.
+	</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">xsltfile</td>
+	<td valign="top">This attribute specifies the location of an XSLT file to be used to generate the reference details pages in a desired ordering.
+	<br><br>
+	A default XSLT file is available in the <code>apitooling-ant.jar</code> JAR file.
+	<br><br>
+	The location is specified using an absolute path.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">filterpatterns</td>
+	<td valign="top">
+		This attribute specifies a comma separated listing of regular expression patterns used to prune 
+		references <em>from</em> matching name patterns from the final report.
+	 	<br><br>
+	 	The patterns must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">tofilterpatterns</td>
+	<td valign="top">
+		This attribute specifies a comma separated listing of regular expression patterns used to prune 
+		references <em>to</em> matching name patterns from the final report.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">debug</td>
+	<td valign="top">Set the debug value.
+	<br><br>The possible values are: <code>true</code>, <code>false</code>
+	<br>Default is <code>false</code>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+</table>
+
+<h3>Examples</h3>
+
+<pre>
+	<b><font color="#0000ff"><apitooling.apimigration_reportconversion
+		xmlfiles=<font color="#008000">"/eclipse/apimigration-both/XML"</font>
+		htmlfiles=<font color="#008000">"/eclipse/apimigration-both/HTML"</font>
+		xsltfile=<font color="#008000">"/eclipse/references.xsl"</font>
+		debug=<font color="#008000">"true"</font>
+	/></font></b>
+</pre>
+<p>This will run the task creating <code>*.html</code> files inside the folder <code>/eclipse/apimigration-both/HTML</code> corresponding 
+to the folder structure of the XML file location</p>
+<p>If debug is enabled, some debug tracing will show up in the Ant console.</p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
+<br><a href="apimigration-ant-task.htm">API Use Migration Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-ant-task.htm
index 8d805e5..a1eef2b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -16,20 +16,20 @@
 
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.apiuse</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.apiuse</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <pre>
 	<b><font color="#0000ff"><apitooling.apiuse
-		baseline=<font color="#008000">"..."</font>
-		scope=<font color="#008000">"..."</font>
-		proceedonerror=<font color="#008000">"..."</font>
+		location=<font color="#008000">"..."</font>
+		scopepattern=<font color="#008000">"..."</font>
+		referencepattern=<font color="#008000">"..."</font>
 		report=<font color="#008000">"..."</font>
-		includenonapiprojects=<font color="#008000">"..."</font>
-		includesystemlibraries=<font color="#008000">"..."</font>
 		considerinternal=<font color="#008000">"..."</font>
 		considerapi=<font color="#008000">"..."</font>
-		eefile=<font color="#008000">"..."</font>
-		excludelist=<font color="#008000">"..."</font>
+		considerillegaluse=<font color="#008000">"..."</font>
+		apipatterns=<font color="#008000">"..."</font>
+		internalpatterns=<font color="#008000">"..."</font>
+		archivepatterns=<font color="#008000">"..."</font>
 		debug=<font color="#008000">"..."</font>
 	/></font></b>
 </pre>
@@ -41,9 +41,9 @@ classpath.</p>
     <td align="center" valign="top"><b>Required</b></td>
   </tr>
 <tr>
-	<td valign="top">baseline</td>
+	<td valign="top">location</td>
 	<td valign="top">
-		This attribute specifies the location of the current product or baseline that you want to search for API usage to.
+		This attribute specifies the location of the current product you want to search for API usage.
 		<br><br>
 		It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to a collection of bundles.
 		<br><br>
@@ -51,14 +51,25 @@ classpath.</p>
 	<td align="center" valign="top">Yes</td>
 </tr>
 <tr>
-	<td valign="top">scope</td>
+	<td valign="top">scopepattern</td>
 	<td valign="top">
-		This attribute specifies the location of the current product or baseline that you want to search against for API usage.
-		<br><br>
-		It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to a collection of bundles. If no scope is provided
-		the baseline will act as itself and the search scope.
-		<br><br>
-		The location is specified using an absolute path.</td>
+		This attribute specifies the regular expression pattern used to build the scope of elements to search for 
+	 	references from in the product location.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">referencepattern</td>
+	<td valign="top">
+		Set the regular expression pattern used to build the scope of elements to search for 
+	 	references to in the product location.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	 	</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
@@ -93,64 +104,41 @@ classpath.</p>
 	<td align="center" valign="top">Yes</td>
 </tr>
 <tr>
-	<td valign="top">proceedonerror</td>
-	<td valign="top">If the use search should try to continue if an error is encountered.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">includenonapiprojects</td>
-	<td valign="top">If non-API enabled projects should be allowed in the search scope.
+	<td valign="top">considerinternal</td>
+	<td valign="top">If internal references should be considered during the search.
 		<br><br>Default is <code>false</code>.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
-	<td valign="top">includesystemlibraries</td>
-	<td valign="top">If system libraries should be allowed in the search scope.
+	<td valign="top">considerapi</td>
+	<td valign="top">If API references should be considered during the search.
 		<br><br>Default is <code>false</code>.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
-	<td valign="top">considerinternal</td>
-	<td valign="top">If internal references should be considered during the search.
+	<td valign="top">considerillegaluse</td>
+	<td valign="top">If illegal API use references should be considered during the search.
 		<br><br>Default is <code>false</code>.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
-	<td valign="top">considerapi</td>
-	<td valign="top">If API references should be considered during the search.
-		<br><br>Default is <code>false</code>.</td>
+	<td valign="top">apipatterns</td>
+	<td valign="top">A comma separated list of package name patterns (regular expressions) to consider as API packages.
+		<br><br>By default API descriptions are used in the scanned bundles, but this can be used to
+		override or add API packages.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
-	<td valign="top">eefile</td>
-	<td valign="top">Set the execution environment file to use. 
-		<br><br>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment is used.
-		<br><br>The format of the file is described in this <a href="http://wiki.eclipse.org/index.php/Execution_Environment_Descriptions" target="blank">wiki page</a>.
-		<br><br>The file is specified using an absolute path.</td>
+	<td valign="top">internalpatterns</td>
+	<td valign="top">A comma separated list of package name patterns (regular expressions) to consider as private packages.
+		<br><br>By default API descriptions are used in the scanned bundles, but this can be used to
+		override or add private packages.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
-	<td valign="top">excludelist</td>
-	<td valign="top">Set the exclude list location. 
-		<br><br>The exclude list is used to know what bundles should excluded from the search scope during a search.
-		The lines that start with '#' are ignored from the excluded elements.
-		<br><br>
-		Regular expressions can be used in the listing but must be prefixed with 'R:'. For example
-		<code>R:org.eclipse.*</code>
-		<br>The location is specified using an absolute path.
-		<br>The format of the exclude list file looks like this:
-<pre>
- # DOC BUNDLES
- R:org.eclipse.*.doc.*
-
- # NON-ECLIPSE BUNDLES
- com.ibm.icu
- com.jcraft.jsch
- javax.servlet
- javax.servlet.jsp
- ...
-</pre></td>
+	<td valign="top">archivepatterns</td>
+	<td valign="top">A comma separated list of archive identifiers to ignore during the scan.
+		<br><br>An archive identifier is of the form: <code>[bundle id]:[path to archive]</code>.</td>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
@@ -165,30 +153,31 @@ classpath.</p>
 <h3>Examples</h3>
 <pre>
 	<b><font color="#0000ff"><apitooling.apiuse
-		baseline=<font color="#008000">"/eclipse/eclipse.tar.gz"</font>
-		scope=<font color="#008000">"/eclipse/jdt_only.tar.gz"</font>
-		proceedonerror=<font color="#008000">"true"</font>
-		includenonapiprojects=<font color="#008000">"false"</font>
-		includesystemlibraries=<font color="#008000">"false"</font>
+		location=<font color="#008000">"/eclipse/eclipse.tar.gz"</font>
+		scopepattern=<font color="#008000">".*"</font>
+		referencepattern=<font color="#008000">"org\.eclipse.*"</font>
 		report=<font color="#008000">"/eclipse/apiuse-both/XML"</font>
 		considerinternal=<font color="#008000">"true"</font>
 		considerapi=<font color="#008000">"true"</font>
-		eefile=<font color="#008000">""</font>
-		excludelist=<font color="#008000">"/eclipse/excludelist.txt"</font>
+		considerillegaluse=<font color="#008000">"true"</font>
+		archivepatterns=<font color="#008000">"org.eclipse.test.bundle:/libs/contributed.jar"</font>
 		debug=<font color="#008000">"true"</font>
 	/></font></b>
 </pre>
 <p>This will run the task creating <code>*.xml</code> files inside the folder <code>/eclipse/apiuse-both/XML</code>.
-It will use the exclude list located in <code>/eclipse/excludelist.txt</code> to reduce the scope of the search.</p>
-<p>If debug is enabled, some debug tracing will show up in the ant console.</p>
+The task will search all bundles in the product location - defined by the regular expression <code>.*</code> - searching 
+for all references to any bundles whose identifier begins with org.eclipse (defined by the <code>org\.eclipse.*</code> regular expression).</p>
+<p>While scanning, any class files found in the /libs/contributed.jar archive inside org.eclipse.test.bundle will be ignored.</p>
+<p>If debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a>
+<p><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm
index a10ecb8..af71bd7 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -11,10 +11,10 @@
 <body>
 <h1> API Use Report Conversion Ant Task </h1>
 <h2>Purpose</h2>
-<p>This task converts the XML report created by the <code>apitooling.apiuse</code> ant task into HTML files.</p>
+<p>This task converts the XML report created by the <code>apitooling.apiuse</code> Ant task into HTML files.</p>
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.apiuse_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.apiuse_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre>
@@ -22,6 +22,8 @@ classpath.</p>
 		xmlfiles=<font color="#008000">"..."</font>
 		htmlfiles=<font color="#008000">"..."</font>
 		xsltfile=<font color="#008000">"..."</font>
+		filterpatterns=<font color="#008000">"..."</font>
+		tofilterpatterns=<font color="#008000">"..."</font>
 		debug=<font color="#008000">"..."</font>
 	/></font></b>
 </pre>
@@ -60,6 +62,28 @@ classpath.</p>
 	<td align="center" valign="top">No</td>
 </tr>
 <tr>
+	<td valign="top">filterpatterns</td>
+	<td valign="top">
+		This attribute specifies a comma separated listing of regular expression patterns used to prune 
+		references <em>from</em> matching name patterns from the final report.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">tofilterpatterns</td>
+	<td valign="top">
+		This attribute specifies a comma separated listing of regular expression patterns used to prune 
+		references <em>to</em> matching name patterns from the final report.
+	 	<br><br>
+	 	The pattern must be a well-formatted regular expression as
+	 	defined <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html">here</a>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
 	<td valign="top">debug</td>
 	<td valign="top">Set the debug value.
 	<br><br>The possible values are: <code>true</code>, <code>false</code>
@@ -81,15 +105,16 @@ classpath.</p>
 </pre>
 <p>This will run the task creating <code>*.html</code> files inside the folder <code>/eclipse/apiuse-both/HTML</code> corresponding 
 to the folder structure of the XML file location</p>
-<p>If debug is enabled, some debug tracing will show up in the ant console.</p>
+<p>If debug is enabled, some debug tracing will show up in the Ant console.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="analysis-ant-task.htm">API Tools Analysis Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-ant-task.htm
new file mode 100644
index 0000000..3dd92d3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-ant-task.htm
@@ -0,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="stylesheet" href="../../../apache_style.css" type="text/css">
+<title>API Tools API Deprecation Ant Task</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+<body>
+<h1> API Deprecation Ant Task </h1>
+<h2>Purpose</h2>
+<p>This task runs a complete API analysis of an API profile relative to a baseline - looking only for members (classes, fields, methods) that have been deprecated / un-deprecated. The profile is the current state of a product under development. The profile is compared to an API baseline for deprecation changes (usually the previous release of a product). </p>
+
+<h2>Usage</h2>
+<h3>Description</h3>
+<p>The name of the Ant task is: <code>apitooling.apideprecation</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
+classpath.</p>
+<div style="text-align: left;">
+<pre style="margin-left: 40px">
+<b><font color="#0000ff"><apitooling.apideprecation
+	baseline=<font color="#008000">"..."</font>
+	profile=<font color="#008000">"..."</font>
+	report=<font color="#008000">"..."</font>
+	excludelist=<font color="#008000">"..."</font>
+	debug=<font color="#008000">"..."</font>
+	eefile=<font color="#008000">"..."</font>
+/></font></b>
+</pre>
+</div>
+<h3>Parameters</h3>
+<table border="1" cellpadding="2" cellspacing="0">
+  <tr>
+    <td valign="top"><b>Attribute</b></td>
+    <td valign="top"><b>Description</b></td>
+    <td align="center" valign="top"><b>Required</b></td>
+  </tr>
+<tr>
+<td valign="top">baseline</td>
+<td valign="top">This attribute specifies the location of the reference baseline.
+<br><br>It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to the Eclipse installation folder. This is the 
+directory is which you can find the Eclipse executable.
+<br><br>The location is specified using an absolute path.
+</td>
+<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+<td valign="top">profile</td>
+<td valign="top">This attribute specifies the location of the current product or profile that you want to compare against the reference baseline.
+<br><br>
+It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to the Eclipse installation folder. This is the 
+directory is which you can find the Eclipse executable.
+<br><br>The location is specified using an absolute path.
+</td>
+<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+<td valign="top">report</td>
+<td valign="top">Set the output location where the reports will be generated.
+<br><br>
+Once the task is completed, reports are available in this directory using a structure similar to the filter root. A sub-folder is created
+for each component that has problems to be reported. Each sub-folder contains a file called "report.xml".
+<br><br>A special folder called "allNonApiBundles" is also created in this folder which also contains a file called "report.xml".
+This file lists all the bundles that are not using the API Tooling nature.
+<br><br>The location is specified using an absolute path. 
+</td>
+<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+<td valign="top">excludelist</td>
+<td valign="top">Set the exclude list location. 
+<br><br>The exclude list is used to know what bundles should excluded from the xml report generated by the task execution.
+The lines that start with '#' are ignored from the excluded elements.
+<br>The location is specified using an absolute path.
+<br>The format of the exclude list file looks like this:
+<pre>
+ # DOC BUNDLES
+ org.eclipse.jdt.doc.isv
+ org.eclipse.jdt.doc.user
+ org.eclipse.pde.doc.user
+ org.eclipse.platform.doc.isv
+ org.eclipse.platform.doc.user
+ # NON-ECLIPSE BUNDLES
+ com.ibm.icu
+ com.jcraft.jsch
+ javax.servlet
+ javax.servlet.jsp
+ ...
+</pre>
+</td>
+<td align="center" valign="top">No</td>
+</tr>
+<tr>
+<td valign="top">debug</td>
+<td valign="top">Set the debug value.
+<br><br>The possible values are: <code>true</code>, <code>false</code>
+<br>Default is <code>false</code>.
+</td>
+<td align="center" valign="top">No</td>
+</tr>
+<tr>
+<td valign="top">eefile</td>
+<td valign="top">Set the execution environment file to use. 
+<br><br>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment is used.
+<br><br>The format of the file is described in this <a href="http://wiki.eclipse.org/index.php/Execution_Environment_Descriptions" target="blank">wiki page</a>.
+<br><br>The file is specified using an absolute path.
+</td>
+<td align="center" valign="top">No</td>
+</tr>
+</table>
+
+<h3>Examples</h3>
+
+<pre>
+	<b><font color="#0000ff"><apitooling.apideprecation
+		baseline=<font color="#008000">"D:\eclipse\3.4.1\eclipse"</font>
+		profile=<font color="#008000">"D:\eclipse-SDK-I20081118-0800-linux-gtk.tar.gz"</font>
+		report=<font color="#008000">"D:\reports\xml"</font>
+		excludelist=<font color="#008000">"D:\exclude_list_external.txt"</font>
+		debug=<font color="#008000">"true"</font>
+	/></font></b>
+</pre>
+<p>This will run the task creating <code>report.xml</code> files inside the folder <code>D:\reports\xml</code>.
+It will use the exclude list to reduce the number of problems to report.</p>
+<p>Since debug is enabled, some debug tracing will show up in the Ant console.</p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-reportconversion-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-reportconversion-ant-task.htm
new file mode 100644
index 0000000..14a416e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/deprecation-reportconversion-ant-task.htm
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="stylesheet" href="../../../apache_style.css" type="text/css">
+<title>API Deprecation Report Conversion Ant Task</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+<body>
+<h1> API Deprecation Report Conversion Ant Task </h1>
+<h2>Purpose</h2>
+<p>This task converts the XML report created by the <code>apitooling.apideprecation</code> Ant task into HTML files.</p>
+<h2>Usage</h2>
+<h3>Description</h3>
+<p>The name of the Ant task is: <code>apitooling.apideprecation_reportconversion</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
+classpath.</p>
+<div style="text-align: left;">
+<pre>
+	<b><font color="#0000ff"><apitooling.apideprecation_reportconversion
+		xmlfile=<font color="#008000">"..."</font>
+		htmlfile=<font color="#008000">"..."</font>
+		debug=<font color="#008000">"..."</font>
+	/></font></b>
+</pre>
+</div>
+<h3>Parameters</h3>
+<table border="1" cellpadding="2" cellspacing="0">
+  <tr>
+    <td valign="top"><b>Attribute</b></td>
+    <td valign="top"><b>Description</b></td>
+    <td align="center" valign="top"><b>Required</b></td>
+  </tr>
+<tr>
+	<td valign="top">xmlfile</td>
+	<td valign="top">This attribute specifies the location of the xml file to convert.
+	<br><br>
+	The location is specified using an absolute path.
+	</td>
+	<td align="center" valign="top">Yes</td>
+</tr>
+<tr>
+	<td valign="top">htmlfile</td>
+	<td valign="top">This attribute specifies the location of the html file to generate.
+	<br>
+	If omitted, the html file name will be the given xml file name where the extension is replaced with html.
+	<br><br>
+	The location is specified using an absolute path.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+<tr>
+	<td valign="top">debug</td>
+	<td valign="top">Set the debug value.
+	<br><br>The possible values are: <code>true</code>, <code>false</code>
+	<br>Default is <code>false</code>.
+	</td>
+	<td align="center" valign="top">No</td>
+</tr>
+</table>
+
+<h3>Examples</h3>
+
+<pre>
+	<b><font color="#0000ff"><apitooling.apideprecation_reportconversion
+		xmlfile=<font color="#008000">"/eclipse/deprecation/deprecation.xml"</font>
+		debug=<font color="#008000">"true"</font>
+	/></font></b>
+</pre>
+<p>This will run the task creating the <code>deprecation.html</code> file inside the folder <code>/eclipse/deprecation</code>.</p>
+<p>If debug is enabled, some debug tracing will show up in the Ant console.</p>
+
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="filegeneration-ant-task.htm">File Generation Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/filegeneration-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/filegeneration-ant-task.htm
index 679286a..d8744c0 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/filegeneration-ant-task.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/filegeneration-ant-task.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="stylesheet" href="../../../apache_style.css" type="text/css">
@@ -18,7 +18,7 @@ that have an Api Tooling nature.
 <p>Right now, only the file called <code>.api_description</code> is created.</p>
 <h2>Usage</h2>
 <h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.apigeneration</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the ant
+<p>The name of the Ant task is: <code>apitooling.apigeneration</code>. To be used, the jar file <code>apitooling-ant.jar</code> has to be on the Ant
 classpath.</p>
 <div style="text-align: left;">
 <pre style="margin-left: 40px">
@@ -81,7 +81,9 @@ They are separated by the platform path separator. Each entry must exist.
 <td valign="top">Set the extra manifest files' locations.
 <br><br>This is a list of extra MANIFEST.MF files' locations that can be set to provide more api
  packages to scan. They are separated by the platform path separator. Each entry must exist.
-<br><br>They should be specified using absolute paths.
+<br><br>If the path is not absolute, it will be resolved relative to the current working directory.
+<br><br>Jar files can be specified instead of MANIFEST.MF file. If a jar file is specified, its MANIFEST.MF file
+will be read if it exists.
 </td>
 <td align="center" valign="top">No</td>
 </tr>
@@ -112,13 +114,14 @@ on the source contained in <code>d:\eclipse\org.eclipse.jdt.core</code> and the
 <code>d:\eclipse\org.eclipse.jdt.core\bin</code>.</p>
 
 <p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="analysis-ant-task.htm">API Tools Analysis Ant Task</a>
-<br><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="apiuse-ant-task.htm">API Tools API Use Ant Task</a>
-<br><a href="pluggableapiuse-ant-task.htm">API Tools Pluggable API Use Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a>
+<p><a href="analysis-ant-task.htm">Analysis Ant Task</a>
+<br><a href="apifreeze-ant-task.htm">API Freeze Ant Task</a>
+<br><a href="apiuse-ant-task.htm">API Use Ant Task</a>
+<br><a href="analysis-reportconversion-ant-task.htm">Analysis Report Conversion Ant Task</a>
+<br><a href="apifreeze-reportconversion-ant-task.htm">API Freeze Report Conversion Ant Task</a>
+<br><a href="deprecation-ant-task.htm">API Deprecation Ant Task</a>
+<br><a href="deprecation-reportconversion-ant-task.htm">API Deprecation Report Conversion Ant Task</a>
+<br><a href="apiuse-reportconversion-ant-task.htm">API Use Report Conversion Ant Task</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/pluggableapiuse-ant-task.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/pluggableapiuse-ant-task.htm
deleted file mode 100644
index b84cc2d..0000000
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/ant-tasks/pluggableapiuse-ant-task.htm
+++ /dev/null
@@ -1,174 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="stylesheet" href="../../../apache_style.css" type="text/css">
-<title>Pluggable API Use Ant Task</title>
-<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
-</head>
-<body>
-<h1>Pluggable API Use Ant Task </h1>
-<h2>Purpose</h2>
-<p>This task runs a complete search of a given baseline to determine a producer-centric report of API usage and report those results
-to the supplied <code>IApiSearchReporter</code>.</p>
-<p>The analysis does not include bundles that are not API Tools enabled by default.</p>
-
-<h2>Usage</h2>
-<h3>Description</h3>
-<p>The name of the ant task is: <code>apitooling.pluggableapiuse</code>. To be used, the jar file <code>apitooling-ant.jar</code> and the 
-jar file for the database driver you wish to use must to be on the ant classpath.</p>
-<pre>
-	<b><font color="#0000ff"><apitooling.apiusedb
-		baseline=<font color="#008000">"..."</font>
-		scope=<font color="#008000">"..."</font>
-		reporterclass=<font color="#008000">"..."</font>
-		proceedonerror=<font color="#008000">"..."</font>
-		includenonapiprojects=<font color="#008000">"..."</font>
-		includesystemlibraries=<font color="#008000">"..."</font>
-		considerinternal=<font color="#008000">"..."</font>
-		considerapi=<font color="#008000">"..."</font>
-		eefile=<font color="#008000">"..."</font>
-		excludelist=<font color="#008000">"..."</font>
-		debug=<font color="#008000">"..."</font>
-	/></font></b>
-</pre>
-<h3>Parameters</h3>
-<table border="1" cellpadding="2" cellspacing="0">
-  <tr>
-    <td valign="top"><b>Attribute</b></td>
-    <td valign="top"><b>Description</b></td>
-    <td align="center" valign="top"><b>Required</b></td>
-  </tr>
-<tr>
-	<td valign="top">baseline</td>
-	<td valign="top">
-		This attribute specifies the location of the current product or profile that you want to search for API usage to.
-		<br><br>
-		It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to a collection of bundles.
-		<br><br>
-		The location is specified using an absolute path.</td>
-	<td align="center" valign="top">Yes</td>
-</tr>
-<tr>
-	<td valign="top">scope</td>
-	<td valign="top">
-		This attribute specifies the location of the current product or baseline that you want to search against for API usage.
-		<br><br>
-		It can be a .zip, .jar, .tgz, .tar.gz file, or a directory that corresponds to a collection of bundles. If no scope is provided
-		the baseline will act as itself and the search scope.
-		<br><br>
-		The location is specified using an absolute path.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">proceedonerror</td>
-	<td valign="top">If the use search should include bundles that have resolution errors in the scan.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">includenonapiprojects</td>
-	<td valign="top">If non-API enabled projects should be allowed in the search scope.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">includesystemlibraries</td>
-	<td valign="top">If system libraries should be allowed in the search scope.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">reporterclass</td>
-	<td valign="top">
-		This attribute specifies the package-qualified name of the class that should be loaded and have search
-		results reported to it. The class must implement <code>IApiSearchReporter</code> and must appear on the Ant
-		classpath with any required classes.
-		<br><br>
-		<p>For example <code>org.eclipse.a.b.c.MyReporter</code>.</p>
-	</td>
-	<td align="center" valign="top">Yes</td>
-</tr>
-<tr>
-	<td valign="top">considerinternal</td>
-	<td valign="top">If internal references should be considered during the search.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">considerapi</td>
-	<td valign="top">If API references should be considered during the search.
-		<br><br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">eefile</td>
-	<td valign="top">Set the execution environment file to use. 
-		<br><br>By default, an execution environment file corresponding to a JavaSE-1.6 execution environment is used.
-		<br><br>The format of the file is described in this <a href="http://wiki.eclipse.org/index.php/Execution_Environment_Descriptions" target="blank">wiki page</a>.
-		<br><br>The file is specified using an absolute path.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">excludelist</td>
-	<td valign="top">Set the exclude list location. 
-		<br><br>The exclude list is used to know what bundles should excluded from the scope during a search.
-		The lines that start with '#' are ignored from the excluded elements.
-		<br><br>
-		Regular expressions can be used in the listing but must be prefixed with 'R:'. For example
-		<code>R:org.eclipse.*</code>
-		<br>The location is specified using an absolute path.
-		<br>The format of the exclude list file looks like this:
-<pre>
- # DOC BUNDLES
- R:org.eclipse.*.doc.*
- 
- # NON-ECLIPSE BUNDLES
- com.ibm.icu
- com.jcraft.jsch
- javax.servlet
- javax.servlet.jsp
- ...
-</pre></td>
-	<td align="center" valign="top">No</td>
-</tr>
-<tr>
-	<td valign="top">debug</td>
-	<td valign="top">Set the debug value.
-		<br><br>The possible values are: <code>true</code>, <code>false</code>
-		<br>Default is <code>false</code>.</td>
-	<td align="center" valign="top">No</td>
-</tr>
-</table>
-
-<h3>Examples</h3>
-<pre>
-	<b><font color="#0000ff"><apitooling.apiusedb
-		baseline=<font color="#008000">"/eclipse/eclipse.tar.gz"</font>
-		scope=<font color="#008000">"/eclipse/jdt_only.tar.gz"</font>
-		proceedonerror=<font color="#008000">"true"</font>
-		includenonapiprojects=<font color="#008000">"false"</font>
-		includesystemlibraries=<font color="#008000">"false"</font>
-		reporterclass=<font color="#008000">"org.eclipse.a.b.c.MyReporter"</font>
-		considerinternal=<font color="#008000">"true"</font>
-		considerapi=<font color="#008000">"true"</font>
-		eefile=<font color="#008000">""</font>
-		excludelist=<font color="#008000">"/eclipse/excludelist.txt"</font>
-		debug=<font color="#008000">"true"</font>
-	/></font></b>
-</pre>
-<p>This will run the task writing results out to the given search reporter class.
-It will use the exclude list located in <code>/eclipse/excludelist.txt</code> to reduce the scope of the search.</p>
-<p>If debug is enabled, some debug tracing will show up in the ant console.</p>
-
-<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
-<p><a href="apifreeze-ant-task.htm">API Tools API Freeze Ant Task</a>
-<br><a href="filegeneration-ant-task.htm">API Tools File Generation Ant Task</a>
-<br><a href="analysis-reportconversion-ant-task.htm">API Tools Analysis Report Conversion Ant Task</a>
-<br><a href="apifreeze-reportconversion-ant-task.htm">API Tools API Freeze Report Conversion Ant Task</a>
-<br><a href="apiuse-reportconversion-ant-task.htm">API Tools API Use Report Conversion Ant Task</a>
-</p>
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-problem-filter-prop.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-problem-filter-prop.png
index 92eaa31..405437c 100644
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-problem-filter-prop.png and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-problem-filter-prop.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-archive-page.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-archive-page.png
new file mode 100644
index 0000000..174f656
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-archive-page.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-conversion-page.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-conversion-page.png
new file mode 100644
index 0000000..5b677f0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-conversion-page.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-package-page.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-package-page.png
new file mode 100644
index 0000000..6022ff4
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard-package-page.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard.png
new file mode 100644
index 0000000..6c9a73f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/api-use-pattern-wizard.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui-patterns.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui-patterns.png
new file mode 100644
index 0000000..7c9164c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui-patterns.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui.png b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui.png
new file mode 100644
index 0000000..bae4da5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/images/use-ui.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-api-use-dialog.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-api-use-dialog.htm
new file mode 100644
index 0000000..4709267
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-api-use-dialog.htm
@@ -0,0 +1,198 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+  <meta name="copyright"
+ content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=ISO-8859-1">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link rel="STYLESHEET" href="../../../book.css" charset="ISO-8859-1" type="text/css">
+  <title>API Use Reports</title>
+  <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
+</head>
+<body>
+<h1>API Use Reports</h1>
+<p>An <b>API Use Report</b> describes a set of references from one set of bundles to another set of bundles.
+A report can be generated using the <a href="../ant-tasks/apiuse-ant-task.htm">API Use Ant Task</a>.
+A user interface is provided to configure and generate a report in the <b>External Tools</b> dialog.
+To create a new use scan configuration simply double-click the <em>API Use Report</em> configuration type.</p>
+
+<h3>API Use Report Tab</h3>
+<p>The <b>API Use Report</b> tab allows you to configure the analysis.</p>
+<p>The following example shows a configuration to extract all references to Eclipse bundles in a 3.4 installation.</p>
+
+<p><img src="../images/use-ui.png" alt="API Use Report tab" border="0"></p><br>
+
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="15%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+  	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">You can select what you want to analyze, which can be either an API baseline, target definition or a directory of bundles. 
+      You can also select to only generate HTML for an existing report. You can only select one option, with each option allowing you to configure it. I.e. you can go to the API baselines preference page to edit existing baselines if you select analyzing an API baseline.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">API Baseline</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > API Baseline</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">You can choose any API baseline from the combo box to analyze</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">Default baseline or empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Baselines...</td>
+      <td rowspan="1" colspan="1" valign="top" align="left"> Allows access to the  <b><a href="../preferences/ref-baselines.htm">API Baselines</a></b> preference page to configure the baseline to analyze.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Target Definition</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">You can choose any target definition from the combo box to analyze</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">The active target definition or empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Targets</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows access to the <b><a href="../../../guide/tools/preference_pages/target_platform.htm">Target Platform</a></b> preference page to configure the target definition to analyze.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Directory</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">You can enter the absolute path to a directory containing the bundles.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Browse...</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to browse for a folder of bundles to analyze.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Analyze > Generate HTML report for existing use scan</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to create a report for an existing scan and not have to perform the analysis again.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Search for > References to</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to specify the name (or matching RegEx) of the bundle that you want to see references to. 
+      Consider the following example: <code>org\.eclipse.*</code>. In this example we are saying that we want to see all references to any bundle that starts with the name <code>org.eclipse.</code>.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Search for > API references</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to scan for API references.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Search for > Internal references</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to scan for internal references.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">checked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Search for > Illegal API Use</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to scan for illegal API usage i.e. usage of restricted API members.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Search in > Bundles matching</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to specify the name (or matching RegEx) of the bundle(s) that you want to scan for references from i.e. a search scope. 
+      Consider the following example: <code>.*</code>. In this example we are saying that we want to search in all bundles whose name matches any character sequence. 
+      The same effect can be achieved leaving the field blank.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Report Output Location</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to specify the absolute path where any generated reports should be placed.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Browse...</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to select the location to output any reports.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Clean report directory before reporting new results</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to clear out an existing XML report location prior to the scan reporting any results. 
+      It should be noted that this option will completely remove the specified report directory if it exists, with all child directories being recursively removed as well.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Create HTML reports</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Converts all of the XML output into formatted HTML and place it in <code><report location>\html</code></td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Clean HTML report location</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to clear out an existing HTML location prior to creating new reports. 
+      It should be noted that this option will completely remove the specified HTML directory if it exists, with all child directories being recursively removed as well.
+      This option only enables if you select the <b>Create HTML Reports</b> option mentioned above.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Open report when search completes</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Opens the HTML report when the analysis is complete. This option only enables if you select the <b>Create HTML Reports</b> option mentioned above.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">unchecked</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Reporting > Description</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to enter a human-readable description for the report.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center">empty</td>
+    </tr>
+  </tbody>
+</table>
+
+<h3>Patterns Tab</h3>
+<p>The <b>Patterns</b> tab allows you to create a variety of Regular Expression patterns to control the use analysis. 
+There are currently three supported kinds of patterns: 
+	<ol>
+		<li>Archive Pattern - Allows you to specify nested archives that should be ignored during analysis.</li>
+		<li>Package Pattern - Allows you to specify packages that should be API or internal without having to update your bundle manifest.</li>
+		<li>Report Conversion Pattern - Allows you to create a package name regular expression to filter references taht are reported. All reported referece are filtered
+		using their fully qualified package name.</li>
+	</ol>
+</p>
+
+<p><img src="../images/use-ui-patterns.png" alt="Patterns tab" border="0"></p><br>
+
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="15%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Add...</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to add a new pattern. This button will start the 
+      <a href="ref-apiuse-patterns-wizard.htm"><strong>Pattern wizard</strong></a>.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Edit</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to edit the currently selected pattern. Only one pattern can be edited at a time.</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Remove</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to remove the selected pattern(s). You can remove more than one pattern at a time.versio</td>
+      <td rowspan="1" colspan="1" valign="top" align="center"> </td>
+    </tr>
+  </tbody>
+</table>
+
+<br>
+<p><img border="0" src="../../../images/ngrelt.png" alt="Related tasks"></p>
+<p> 
+<a href="../../../tasks/api_tooling_compare_to_baseline.htm">Comparing to an API baseline</a><br>
+<a href="../../../tasks/api_tooling_baseline.htm">Setting up a baseline</a>
+</p>
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p>
+<a href="../preferences/ref-baselines.htm">API Baselines Preferences</a><br>
+<a href="ref-apiuse-patterns-wizard.htm">API Use Patterns Wizard</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm
new file mode 100644
index 0000000..9b48e5e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm
@@ -0,0 +1,165 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+  <meta name="copyright"
+ content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=ISO-8859-1">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link rel="STYLESHEET" href="../../../book.css" type="text/css">
+  <title>API Use Patterns Wizard</title>
+</head>
+<body>
+<h1>API Use Patterns Wizard</h1>
+<p>This wizard helps guide you through creating regular expression patterns for controlling an API Use analysis.</p> 
+<p>To activate the wizard use the following steps:</p>
+	<ol>
+		<li>While creating a new API Use Report launch configuration, switch to the <strong>Patterns</strong> tab.</li>
+		<li>On the tab press the <strong>Add...</strong> button</li>
+	</ol>
+	
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="20%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+  	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Pattern Types</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">This listing shows all of the patterns that can be created with the wizard.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">First element in list</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Description</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Shows the human-readable description of the pattern kind selected in the <strong>Pattern Types</strong> listing.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left"> </td>
+    </tr>
+  </tbody>
+</table>
+<p>
+The first page of the wizard allows you to select what kind of pattern you would like to create. Descriptions for each pattern
+are given to help you choose - simply select the pattern and the description is displayed in the <strong>Description</strong> field. 
+</p>
+<p>
+<img src="../images/api-use-pattern-wizard.png" alt="API Use pattern wizard - pattern selection page">
+</p>
+
+<h3>Archive Patterns</h3>
+<p>
+When API use analysis is done all folders and archives within a bundle are scanned; ensuring all class files are analyzed. In some cases
+a bundle may contain an archive with old versions of class files (for example) that you do not want to be analyzed. In this case an archive pattern
+can be used to completely ignore a specific archive or all archives matching a given regular expression.
+</p>
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="20%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+  	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Bundle Name</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">The complete symbolic name of the bundle to apply this pattern to.
+      For example: <code>org.eclipse.pde.api.tools</code>.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Archive Name</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">The complete name or regular expression of the archive(s) to apply the pattern to. 
+      For example: <code>*.jar</code> - which will ignore any nested jar file.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">empty</td>
+    </tr>
+  </tbody>
+</table>
+<p>
+<img src="../images/api-use-pattern-wizard-archive-page.png" alt="API Use pattern wizard - creating archive patterns">
+</p>
+
+<h3>Package Patterns</h3>
+<p>
+When extracting references for analysis, the API Use search engine uses meta-data from the bundle to determine if a reference is internal or not. In
+some cases a bundle has not been set up to properly describe what classes are internal and which are not. A <strong>Package Pattern</strong> allows you to 
+augment these malformed bundles - only from the search engine point of view, the actual bundle is not changed in any way - to describe what is 
+or is not internal. 
+</p>
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="20%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+  	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Pattern</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">The regular expression pattern to match packages against.
+      For example: <code>.*\.internal\..*</code>.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">empty</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">API Pattern</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">If the pattern should make matching packages be considered as API or not.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">checked</td>
+    </tr>
+  </tbody>
+</table>
+<p>
+<img src="../images/api-use-pattern-wizard-package-page.png" alt="API Use pattern wizard - creating package patterns">
+</p>
+
+<h3>Report Conversion Patterns</h3>
+<p>
+When an API use analysis is complete, there can be an immense amount of information to look through. With a report conversion pattern though
+you can cut down on the reference information presented in the HTML reports to only see what you are interested in. To do so you can create
+exclusion patterns used to prune the references that are reported.
+</p>
+<table border="1" cellspacing="0" cellpadding= "5" width="100%">
+  <thead>
+    <tr>
+      <th rowspan="1" colspan="1" width="20%"> <p> Option </p></th>
+      <th rowspan="1" colspan="1"> <p> Description </p></th>
+      <th rowspan="1" colspan="1" width="5%"> <p> Default </p></th>
+    </tr>
+  </thead>
+  <tbody>
+  	<tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Filter references to this pattern</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to ignore reporting references to the pattern. 
+      For example if the pattern was <code>org\.eclipse\.jdt\..*</code>, selecting this option would not report any references made to JDT.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">selected</td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Filter references from this pattern</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">Allows you to ignore reporting references to the pattern. 
+      For example if the pattern was <code>org\.eclipse\.jdt\..*</code>, selecting this option would not report any references from JDT.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left"> </td>
+    </tr>
+    <tr>
+      <td rowspan="1" colspan="1" valign="top" align="left">Pattern</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">The regular expression pattern.</td>
+      <td rowspan="1" colspan="1" valign="top" align="left">empty</td>
+    </tr>
+  </tbody>
+</table>
+<p>
+<img src="../images/api-use-pattern-wizard-conversion-page.png" alt="API Use pattern wizard - creating report conversion patterns">
+</p>
+
+<p> <img border="0" src="../../../images/ngrelt.png" alt="Related tasks" > </p>
+<p> 
+<a href="../../../tasks/api_tooling_setup.htm">Setting up API Tooling</a>
+</p>
+<p><img src="../../../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p>
+<a href="../actions/ref-apitooling-setup-action.htm">API Tooling Setup Action</a><br>
+<a href="../../actions/ref-pdetools.htm">PDE Tools Menu</a><br>
+<a href="ref-api-use-dialog.htm">API Use Reports</a>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/extension-points/index.html b/eclipse/plugins/org.eclipse.pde.doc.user/reference/extension-points/index.html
index eb51187..14cd53e 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/extension-points/index.html
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/extension-points/index.html
@@ -12,9 +12,11 @@
   PDE infrastructure: </p>
 <ul>
   <li><a href="org_eclipse_pde_build_fetchFactories.html">org.eclipse.pde.build.fetchFactories</a></li>
+  <li><a href="org_eclipse_pde_core_bundleImporters.html">org.eclipse.pde.core.bundleImporters</a></li>
   <li><a href="org_eclipse_pde_core_javadoc.html">org.eclipse.pde.core.javadoc</a></li>
   <li><a href="org_eclipse_pde_core_source.html">org.eclipse.pde.core.source</a></li>
   <li><a href="org_eclipse_pde_core_targets.html">org.eclipse.pde.core.targets</a></li>
+  <li><a href="org_eclipse_pde_ui_bundleImportPages.html">org.eclipse.pde.ui.bundleImportPages</a></li>
   <li><a href="org_eclipse_pde_ui_launchShortcuts.html">org.eclipse.pde.ui.launchShortcuts</a></li>
   <li><a href="org_eclipse_pde_ui_newExtension.html">org.eclipse.pde.ui.newExtension</a></li>
   <li><a href="org_eclipse_pde_ui_osgiFrameworks.html">org.eclipse.pde.ui.osgiFrameworks</a></li>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/api-usage-rules.html b/eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/api-usage-rules.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/api-usage-rules.html
copy to eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/api-usage-rules.html
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/overview-pde.html b/eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/overview-pde.html
index ffc1c43..3040d5f 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/overview-pde.html
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/misc/overview-pde.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <meta name="Author" content="IBM">
 <title>PDE Overview</title>
@@ -27,6 +27,10 @@
     <td><tt>org.eclipse.pde.core</tt></td>
   </tr>
   <tr> 
+    <td><tt>org.eclipse.pde.launching[.*]</tt></td>
+    <td><tt>org.eclipse.pde.launching</tt></td>
+  </tr>  
+  <tr> 
     <td><tt>org.eclipse.pde.ui[.*]</tt></td>
     <td><tt>org.eclipse.pde.ui</tt></td>
   </tr>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_builder_config.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_builder_config.htm
index ceef898..2cd9116 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_builder_config.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_builder_config.htm
@@ -553,5 +553,21 @@ Compilation Environment</a>.</td>
     <br>
   </li>
 </ul>
+<ul>
+  <li>Other properties<br>
+    <table style="width: 100%; text-align: left;" border="1"
+ cellpadding="2" cellspacing="0">
+      <tbody>
+        <tr><td style="vertical-align: top;">generateAPIDescription<br></td>
+            <td style="vertical-align: top;">Enable automatic generation of API description files for bundles.</td>
+        </tr>
+        <tr><td style="vertical-align: top;">generateSourceReferences</td>
+            <td style="vertical-align: top;">Enable generation of Eclipse-SourceReferences headers into bundle manifests. </td>
+        </tr>
+      </tbody>
+    </table>
+    <br>
+  </li>
+</ul>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm b/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm
index 4a1ee74..e6830c8 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm
@@ -99,10 +99,12 @@ libraries;</li>
   <li> <b>jars.compile.order</b> - defines the order in which jars
 should be compiled (in case there are multiple libraries).</li>
 </ul>
+
+Compiler related options.  See also the <a href="../tasks/pde_compilation_env.htm">Controlling the Compilation Environment</a> and
+<a href="../tasks/pde_compiler_options.htm">Compiler Options</a> pages.
 <ul>
   <li><span style="font-weight: bold;">jre.compilation.profile</span> -
-set the Environment used to compile this bundle.  (See <a
- href="../tasks/pde_compilation_env.htm">Controlling the Compilation Environment</a>)<br>
+set the Environment used to compile this bundle.  
   </li>
   <li><span style="font-weight: bold;">javacSource</span> - set the
 source compatibility level for compiling this bundle.  Overrides
@@ -121,6 +123,10 @@ jre.compilation.profile.<br>
 - set the warning options to pass to the compiler.  (See the -warn
 option in <a
  href="../../org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">Compiling
+Java Code</a> from the JDT Plug-in Developer Guide).</li>
+<li><span style="font-weight: bold;">javacErrors.<library></span>
+- set the error options to pass to the compiler.  (See the -err option in <a
+ href="../../org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">Compiling
 Java Code</a> from the JDT Plug-in Developer Guide).<br>
     <span style="font-weight: bold;"></span></li>
   <li><span style="font-weight: bold;">javacDefaultEncoding.<library></span>
@@ -133,6 +139,13 @@ Example: <br>
     <pre>javacCustomEncodings.library.jar = src/org/foo[US-ASCII], src/org/foo/bar.java[ISO-8859-1]</pre>
     </div>
   </li>
+  <li><b>javacProjectSettings</b> - A relative path to a preference file specifying properties for the JDT Compiler.  Set to <tt>true</tt> to use the default "<i>.settings/org.eclipse.jdt.core.prefs</i>".</li>
+  <li><b>compilerArg</b> - specify custom compiler arguments</li>
+  <li><b>compilerAdapter</b> - specify a custom compiler adapter to use instead of the default org.eclipse.jdt.core.JDTCompilerAdapter</li>
+  <li><b>compilerAdapter.useLog</b> - true/false: whether or not the custom compiler adapter should receive the -log argument.</li>
+  <li><b>compilerAdapter.useArgFile</b> - true/false: whether or not the custom compiler adapter should receive the generated javaCompiler.<library>.args argument file.</li> 
+  <li><b>sourceFileExtensions</b> - a list of extensions (*.java, *.aj) that should be considered as source when using a custom compiler adapter.</li>
+  
 </ul>
 <p> The values
 defined for these keys ending with "includes" or "excludes" are
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compilation_env.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compilation_env.htm
index b7996fc..f0adf6a 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compilation_env.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compilation_env.htm
@@ -188,7 +188,7 @@ as possible.<br>
 <br>
 The second setting is the property <span style="font-weight: bold;">jre.compilation.profile</span>
 from your bundle's build.properties file.  The value of this
-property should be the prefered environment for compiling this bundle
+property should be the preferred environment for compiling this bundle
 if the Bundle-RequiredExecutionEnvironment list is not adequate.<br>
 <br>
 These two settings together form a list of environments,
@@ -205,7 +205,7 @@ environments considered (in order) is: J2SE-1.4, 
 CDC-1.0/Foundation-1.0, J2SE-1.3.  The bundle can run on
 CDC/Foundation and J2SE-1.3, but for some reason,  it should be
 compiled with J2SE-1.4.  In this case, J2SE-1.4 is set in the
-build configuration, and comes first in the list of environments, so it
+build configuration and comes first in the list of environments, so it
 is used to compile the bundle.  The source and target levels used
 in this case are 1.3 and 1.2.  If instead, the build configuration
 defined only J2SE-1.3 and not J2SE-1.4, then J2SE-1.3 would be the only
@@ -227,7 +227,7 @@ build.properties
 file.  These properties will override the values derived from the
 environment settings.<br>
 <br>
-Similarily, setting the property <tt>bootClasspath</tt> in the
+Similarly, setting the property <tt>bootClasspath</tt> in the
 bundle's build.properties file will override the set of
 jars the bundle is compiled against.<br>
 <br>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compiler_options.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compiler_options.htm
new file mode 100644
index 0000000..ae365f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_compiler_options.htm
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+  <meta name="copyright"
+ content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link rel="STYLESHEET" href="../guide/book.css" type="text/css">
+  <title>Specifying Compiler Options</title>
+</head>
+<body>
+<h1>Compiler options</h1>
+<p>PDE/Build supports a number of options to control the compiler for individual plug-ins.  For settings related to 
+source and target levels and bootclasspath, see <a href="pde_compilation_env.htm">"Setting the Compilation Environment"</a>.
+</p>
+
+<h2>Warnings and Errors</h2>
+<p>PDE/Build allows specifying custom compiler warnings and errors in the build.properties file.  These can be set on a per library basis (a single plug-in can
+contain multiple jar libraries) with the <b>javacWarnings.<library></b> and <b>javacErrors.<library></b> options. The values for these properties 
+are given on the <a href="../../org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">Compiling Java Code</a> page (from the JDT Plug-in Developer Guide).</p>
+
+Example:
+<pre>		javacErrors.. = forbidden,discouraged,
+		javacWarnings.library.jar = deprecation,nullDereference
+</pre>
+
+<h3>Warnings and Errors from Project preferences</h3>
+The JDT project preferences can now also be used during PDE/Build.  PDE/Build itself is not able to read the preference files, but it is able to pass them
+to the JDT compiler which does understand them.
+
+To use this, a plug-in should specify the <b>javacProjectSettings</b> property in its build.properties file.  The value should be:
+<ul>
+<li><tt><b>javacProjectSettings=true</b></tt> :  Use the project setting specified in the default <tt>.settings/org.eclipse.jdt.core.prefs</tt> preferences file.</li>
+<li><tt><b>javacProjectSettings=path/to/jdt.prefs</b></tt> : Use the specified preference file.</li>
+</ul>
+Some projects may wish to use different warning and error settings in the workspace as compared to a releng build.  This allows a more convenient method
+of specifying these settings compared to the "javacWarnings.<library>" property.
+
+<h2>File Encoding</h2>
+PDE/Build can accept custom file encodings on a per library, folder or file basis.
+<ul>
+  <li><span style="font-weight: bold;">javacDefaultEncoding.<library></span>
+- sets default encoding to use when compiling the given library.</li>
+  <li><span style="font-weight: bold;">javacCustomEncodings.<library></span>
+- a comma separated list of
+paths and encodings to use when compiling the given library.  When specifying a folder, the encoding is used for everything contained in that folder.  When 
+specifying a file, the encoding is used for just that file. 
+Example: <br>
+    <div style="text-align: center;">
+    <pre>javacCustomEncodings.library.jar = src/org/foo[US-ASCII], src/org/foo/bar.java[ISO-8859-1]</pre>
+    </div>
+  </li>
+</ul>
+<h2>Custom Compiler Arguments</h2>
+Custom compiler arguments can now be specified per bundle using the <b>compilerArg</b> property in the bundle's build.properties file.  This property is similar 
+to the <a href="../reference/pde_builder_config.htm">compilerArg</a> property in the builder configuration except that it affects only the single plug-in instead
+of all plug-ins.  The specific arguments here depend on the compiler being used.  The JDT compiler arguments are listed <a href="../../org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">here</a>.
+
+<h2>Compiler Option Precedence</h2>
+There are a number of difference ways to specify different compiler options.  As a general rule, option precedence is as follows:
+<ul>
+<li>javacDefaultEncoding.<library> has precedence over a custom <b>-encoding</b> command line option.</li>
+<li>For general options, an option appearing later on the compiler command line overrides options specified earlier.  The options are provided to the JDT in the following order:
+<ol> 
+<li>The <b>compilerArg</b> property from the builder configuration.  (Affects all bundles).</li>
+<li>The <b>compilerArg</b> property from this plug-in's build.properties. </li>
+<li>The compiler preferences file specified with <b>javacProjectSettings</b>.</li>
+<li>The generated compiler arguments file (javaCompiler.<library>.args) containing file encodings, <b>javacWarnings</b>, <b>javacErrors</b> and access rules.</li> 
+</ol>
+</li>
+</ul>
+
+<h2>Using a Custom Compiler</h2>
+A bundle can now use a custom compiler by setting the <b>compilerAdapter</b> property.  The specified compiler adapter must be available in the ant environment.  The JDT compiler
+adapter used by default is <b>org.eclipse.jdt.core.JDTCompilerAdapter</b>.  One particular reason for specifying an alternate compiler is for Aspect J or Groovy bundles.  Bundles specifying
+a custom compiler adapter may need to also specify some of the following properties:
+<ul>
+<li><b>sourceFileExtensions</b> : A list of extensions that should be considered source. (eg *.java, *.aj, *.groovy).</li>
+<li><b>compilerAdapter.useLog</b> : whether or not to pass "-log" argument to the compiler</li>
+<li><b>compilerAdapter.useArgFile</b> : whether or not to pass the generated javaCompiler.<library>.args argument file.  (Contains access rules, file encodings and warning/error levels).</li>
+</ul>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_controlling_output.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_controlling_output.htm
index dfb4af4..2a7be21 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_controlling_output.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_controlling_output.htm
@@ -16,10 +16,10 @@ This section describes how to control the output of a feature or
 product build.</p>
 <h3>Controlling the output format</h3>
 <p>
-The archivesFormat property allows specifying the output format (zip,
+The <tt>archivesFormat</tt> property allows specifying the output format (zip,
 tar, and folder) of the build on a configuration basis. The format of
 the property is <configuration> - <format>, where
-configuration is the same value than the one specified in the <tt>configs</tt>
+configuration is the same value as specified in the <tt>configs</tt>
 property and format is one of the following. </p>
 <ul>
   <li><tt>folder</tt> - the output will be stored in a folder located
@@ -34,7 +34,7 @@ files requiring specific permissions (mostly on UNIX based systems).
 The property <tt>zipargs</tt> allows passing additional options to the
 zip command.</li>
   <li><tt>antZip</tt> - the output will be stored in a zip file. The
-zip file will be created by the zip implementation of Ant. This is the
+zip file will be created by Ant's implementation of zip. This is the
 default value when nothing is specified.</li>
   <li><tt>tar</tt> - the output will be stored in a gzip'ed tar file.
 The OS implementation of tar and gzip will be used. The property <tt>tarargs</tt>
@@ -45,12 +45,12 @@ the created file. It needs to be changed in the allElements.xml file.
 <h3>Generating JNLP manifests</h3>
 <p>
 To enable the generation of JNLP manifests at build time, set <tt>generateJnlp</tt>
-to <tt>true</tt> and set <tt>jnlp.codebase</tt> to be the value where
+to <tt>true</tt>, set <tt>jnlp.codebase</tt> to be the value where
 the
-jnlp file will be served from (see codebase attribute in jnlp tag) and <tt>jnlp.j2se</tt>.
+jnlp file will be served from (see codebase attribute in jnlp tag), and set <tt>jnlp.j2se</tt>.
 Note that this will not package your plug-ins and features for an
 update site, see the "preparing the output for an update site or jnlp
-site".
+site" below.
 Due to current restrictions, the creation of the jnlp manifest only
 works when producing folders as an output format.
 </p>
@@ -62,7 +62,7 @@ property to true. Note that this will not generate the site.xml for the
 eclipse update site and it will not generate jnlp files (see generating
 jnlp files).
 </p>
-<h3>Grouping multiple configurations in one build</h3>
+<h3>Grouping multiple configurations in one archive</h3>
 In order to produce an output that contains the plug-ins and features
 of multiple configurations, set <tt>groupConfigurations</tt> to true.
 This will create an archive that contains all the plug-ins and features
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_custom_callbacks.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_custom_callbacks.htm
index 8a51cff..49f6427 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_custom_callbacks.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_custom_callbacks.htm
@@ -12,7 +12,7 @@
 <body>
 <h1>Feature and Plug-in custom build steps</h1>
 <p>New in 3.2 is the ability for a feature or plug-in to contribute
-custom custom steps to its own build.  These custom steps can be
+custom ant targets to its own build.  These custom steps can be
 used for things like instrumenting byte-code after compilation,
 indexing help files for documentation, or copying extra files into the
 bundle. </p>
@@ -26,7 +26,7 @@ customBuildCallbacks.buildpath to set the directory to use. </p>
 <span style="font-style: italic;">customBuildCallbacks.xml</span>
 containing the supported custom targets are
 provided in org.eclipse.pde.build/templates/plugins and 
-org.eclipse.pde.build/templates/features respectively.  These
+org.eclipse.pde.build/templates/features.  These
 templates can be copied into your feature/plug-in and modified as
 needed. </p>
  <p>
@@ -69,12 +69,12 @@ class
 files will be placed</li>
       <li><tt>source.folder<N></tt>:  The source folder(s)
 containing
-the source to be compiled.  (eg <tt>source.folder1</tt>, <tt>source.folder2</tt>,
+the source to be compiled.  (e.g. <tt>source.folder1</tt>, <tt>source.folder2</tt>,
 etc).</li>
       <li><tt><compilation target>.classpath</tt>:  A
 reference to
 the ant path structure containing the classpath that will be used in
-the compilation.  (eg <tt>@dot.classpath</tt>, <tt>library.jar.classpath</tt>).  The reference to the classpath should be used with a <tt>refid</tt>. 
+the compilation.  (e.g. <tt>@dot.classpath</tt>, <tt>library.jar.classpath</tt>).  The reference to the classpath should be used with a <tt>refid</tt>. 
 <br><b>Example:</b>
 <pre>
 <classpath refid="library.jar.classpath"/>
@@ -111,7 +111,7 @@ targets.  Both of these targets are provided with the property
 build.result.folder which is the folder to which the source zip files
 will be copied.</li>
   <li><span style="font-weight: bold;">gather.bin.parts</span>: 
-This target copies the build results (ie the jars and any other files
+This target copies the build results (i.e. the jars and any other files
 being included in the bundle) to the final destination directory. 
 It is also the target where the version qualifiers are replaced in the
 manifest file (see <a href="pde_version_qualifiers.htm">Version
@@ -155,8 +155,8 @@ copied to.<br>
     <li><tt>build.result.folder</tt>:  The folder that the results
 of the
 build were copied to</li>
-    <li><tt>temp.folder</tt>:  The temporary folder where results
-were staged before being copied to the final desination.<br>
+    <li><tt>temp.folder</tt>:  The temporary folder where the results
+were staged before being copied to the final destination.<br>
     </li>
   </ul>
   </li>
@@ -165,15 +165,14 @@ were staged before being copied to the final desination.<br>
 <p>
 The generated build.xml for features only supports custom build
 callbacks for the gather.bin.parts target.  This target will
-invoke that gather.bin.parts target of all the included features and
+invoke the gather.bin.parts target of all the included features and
 plug-ins.  It supports pre.gather.bin.parts and
 post.gather.bin.parts.  Both of these targets are provided with
 the following properties:
 </p>
 <ul>
   <li><tt>destination.temp.folder</tt>:  The directory to which
-the plugins
-will be copied.</li>
+the plug-ins will be copied.</li>
   <li><tt>feature.directory</tt>:  The directory to which the
 files for
 this feature will be copied.<br>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_build.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_build.htm
index a312772..1ac4929 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_build.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_build.htm
@@ -11,11 +11,11 @@
 <body>
 <h1>Building features</h1>
 <p>
-PDE Build comes with infrastructure to automate the build of features.
+PDE Build comes with infrastructure to automate building features.
 Most of the setup necessary
 for such a build can be done through a few modifications to the
 template build.properties provided
-in PDE build. The following section focuses on setting up a simple
+by PDE build. The following section focuses on setting up a simple
 build assuming that all plug-ins
 and features (both to-build and pre-built) referenced from the feature
 being built are already
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_generating_antcommandline.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
index 0b42a5a..4124f1b 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_feature_generating_antcommandline.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
   <meta name="copyright"
- content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+ content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
   <meta http-equiv="Content-Type"
  content="text/html; charset=ISO-8859-1">
   <meta http-equiv="Content-Style-Type" content="text/css">
@@ -208,7 +208,7 @@ must sign jars for features and plug-ins. The default value is false.
 The parameters to the sign task are controlled by the following ant
 properties: sign.alias, sign.keystore and sign.storepass respectively
 being passed to the alias, keystore and storepass parameters from the
-ant <a href="http://ant.apache.org/manual/CoreTasks/signjar.html">signJar
+ant <a href="http://ant.apache.org/manual/Tasks/signjar.html">signJar
 task</a>. The default value is false;</td>
         </tr>
         <tr>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_fetch_phase.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_fetch_phase.htm
index 6737a08..112a2f6 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_fetch_phase.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_fetch_phase.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
   <meta name="copyright"
- content="Copyright (c) IBM Corporation and others 2006, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+ content="Copyright (c) IBM Corporation and others 2006, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
   <meta http-equiv="Content-Type"
  content="text/html; charset=ISO-8859-1">
   <meta http-equiv="Content-Style-Type" content="text/css">
@@ -67,7 +67,7 @@ If any of the optional arguments aren't specified, then the commas are still req
 </table>
 <h4>Map file entry for Ant GET</h4>
 <p>
-The format of a map file entry to fetch content from any URL supported by <a href="http://ant.apache.org/manual/CoreTasks/get.html">Ant GET</a> is the following:</p>
+The format of a map file entry to fetch content from any URL supported by <a href="http://ant.apache.org/manual/Tasks/get.html">Ant GET</a> is the following:</p>
 <div style="text-align: center;">
 <pre><key> = GET, <url> [,args]</pre>
 </div>
@@ -92,24 +92,28 @@ entry to your map file for build input and PDE/Build will retrieve the artifact
 id and version of the installable unit (IU), and the URI of the repository where the IU can be found. The metadata and artifact repositories are 
 assumed to be co-located. 
 </p>
-
-<p><i>Note:</i> In the Galileo release this only works for bundles/plug-ins and not features.</p>
-
 <p>
 The format of a map file entry to fetch content via p2 is as follows:
 </p>
 <div style="text-align: center;">
-<pre><elementType>@<elementID> = p2IU, <id>, <version>, <repository></pre>
+<pre><elementType>@<elementID> = p2IU, id=<id>, version=<version>, repository=<repository></pre>
 </div>
 <ul>
 <li><tt>id</tt>, the identifier of the Installable Unit;</li>
-<li><tt>version</tt>, the version of the Installable Unit;</li>
+<li><tt>version</tt>, the version of the Installable (optional).  If not specified, the highest version available will be fetched.</li>
 <li><tt>repository</tt>, the location (URI) of the repository where the IU will be found.</li>
 </ul>
 
-Example:
+<b>Fetching features with p2</b>
+<p>In the Helios release, features can be fetched with p2 by specifying the Installable Unit representing the feature jar.  See the <a href="pde_p2_featuremetadata.htm">feature metadata</a> page 
+for details on the structure of p2 metadata for features.</p> 
+
+Examples:
 <div style="text-align: center;">
-   <pre>plugin at my.bundle.id,1.0.0=p2IU,id=my.bundle.id,version=1.0.0,repository=http:/example.eclipse.org/repo</pre>
+<pre>
+plugin at my.bundle.id,1.0.0=p2IU,id=my.bundle.id,version=1.0.0,repository=http://example.eclipse.org/repo
+feature at my.feature.id = p2IU,id=my.feature.id<b>.feature.jar</b>, version=1.0.0,repository=http://example.eclipse.org/repo
+</pre> 
 </div>
 
 
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_builds.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_builds.htm
index b33e8d2..29f4896 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_builds.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_builds.htm
@@ -25,7 +25,7 @@
 
 <h2><a name="gathering_overview">Overview of the changes</a></h2>
 <h3>The build's local repository</h3>
-<p>During the build, all metadata and artifacts will be published into a build repository defined by the property <tt><b>p2.build.repo</b></tt>.  The default location for this repository is <tt>${buildDirectory}/buildRepo</tt>.</p>
+<p>During the build, all metadata and artifacts will be published into a build repository defined by the property <tt><b>p2.build.repo</b></tt>.  This property should specify a URI, the default value for this is <tt>file:${buildDirectory}/buildRepo</tt>.</p>
 <p>Once all the metadata and artifacts are published into this repository, the final assemble and packaging scripts will mirror and/or install from this repository into the locations that will become the archives produced by the build.  This final
 mirroring and installation can be skipped using <tt><b>skipMirroring</b></tt> and <tt><b>skipDirector</b></tt> properties, in which case the build results would all just be in the build repository.</p>
 
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_buildtasks.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_buildtasks.htm
index 141a53b..d35c933 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_buildtasks.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_buildtasks.htm
@@ -15,14 +15,14 @@
 tasks may be usefull in special cases to publish metadata directly without running a full build. </p>
 
 <table cellspacing="1" cellpadding="2">
-	<tr><td><b><tt>eclipse.publish.featuresAndBundles</tt></b></td></tr>
+	<tr><td><b><h3>eclipse.publish.featuresAndBundles</h3></b></td></tr>
 	<tr><td><p>This task is very similar to the <tt>p2.publish.featuresAndBundles</tt> task contributed by the p2 publisher. 
 	This task will publish metadata for pre-existing binary features and plug-ins which are not being built from source.  The task will also publish categories based on a provided site.xml or category.xml file.
 	</p></td></tr>
 	<tr><td><p>This task supports the following attributes:</p>
 		<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
-			<tr><td><tt>metadataRepository</tt></td><td>A URL specifying the metadata repository to publish to.</td></tr>
-			<tr><td><tt>artifactRepository</tt></td><td>A URL specifying the artifact repository to publish to.</td></tr>
+			<tr><td><tt>metadataRepository</tt></td><td>A URI specifying the metadata repository to publish to.</td></tr>
+			<tr><td><tt>artifactRepository</tt></td><td>A URI specifying the artifact repository to publish to.</td></tr>
 			<tr><td><tt>repository</tt></td><td>Sets both metadataRepository and artifactRepository.</td></tr>
 			<tr><td><tt>site</tt></td><td>A URL to a site.xml specifying category information.</td></tr>
 			<tr><td><tt>category</tt></td><td>A URL to a category.xml specifyiny category information.</td></tr>
@@ -47,14 +47,14 @@ Example:
 </div>
 <br>
 <table cellspacing="1" cellpadding="2">
-	<tr><td><b><tt>eclipse.gatherBundle</tt></b></td></tr>
+	<tr><td><b><h3>eclipse.gatherBundle</h3></b></td></tr>
 	<tr><td><p>Publish a plug-in directly from source.  Once the .class files for a bundle are compiled, this task will gather up all the files that make up the binary result and publish them as a p2 artifact with metadata.  
 	This task is used in the <tt>publish.bin.parts</tt> task in the plug-in's generated build.xml, this task replaces the <tt>gather.bin.parts</tt> task when you are building with the p2 publisher.</p>
 	</td></tr>
 	<tr><td><p>This task supports the following attributes:</p>
 	<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
-		<tr><td><tt>metadataRepository</tt></td><td>The metadata repository to publish to.</td></tr>
-		<tr><td><tt>artifactRepository</tt></td><td>The artifact repository to publish to.</td></tr>
+		<tr><td><tt>metadataRepository</tt></td><td>A URI to the metadata repository to publish to.</td></tr>
+		<tr><td><tt>artifactRepository</tt></td><td>A URI to the artifact repository to publish to.</td></tr>
 		<tr><td><tt>buildResultFolder</tt></td><td>Folder containing built .class files, the Manifest and potentially .api_description files.</td></tr>
 		<tr><td><tt>targetFolder</tt></td><td>Content when running with customBuildCallbacks.</td></tr>
 		<tr><td><tt>baseDirectory</tt></td><td>Project location to gather content from when not using customBuildCallbacks</td></tr>
@@ -77,7 +77,7 @@ Example:
 </div>
 <br>			
 <table cellspacing="1" cellpadding="2">
-	<tr><td><b><tt>eclipse.gatherFeature</tt></b></td></tr>
+	<tr><td><b><h3>eclipse.gatherFeature</h3></b></td></tr>
 	<tr><td><p>Publish a feature directly from source.  This task will gather up all the files that make up the feature jar and publish them as a p2 artifact with metadata.  
 	This task will also publish artifacts containing any <a href="pde_rootfiles.htm">root files</a> that are contributed by this feature.
 	If the feature does not specify a <tt>bin.includes</tt> property, then the feature jar will not be generated, but there will still be root file artifacts and feature group metadata.
@@ -85,8 +85,8 @@ Example:
 	</td></tr>
 	<tr><td><p>This task supports the following attributes:</p>
 	<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
-		<tr><td><tt>metadataRepository</tt></td><td>The metadata repository to publish to.</td></tr>
-		<tr><td><tt>artifactRepository</tt></td><td>The artifact repository to publish to.</td></tr>
+		<tr><td><tt>metadataRepository</tt></td><td>A URI to the metadata repository to publish to.</td></tr>
+		<tr><td><tt>artifactRepository</tt></td><td>A URI to the artifact repository to publish to.</td></tr>
 		<tr><td><tt>buildResultFolder</tt></td><td>Folder containing a modified feature.xml with versions replaced.</td></tr>
 		<tr><td><tt>targetFolder</tt></td><td>Content when running with customBuildCallbacks.</td></tr>
 		<tr><td><tt>baseDirectory</tt></td><td>The feature project location</td></tr>
@@ -105,12 +105,12 @@ Example:
 </div>
 <br>			
 <table cellspacing="1" cellpadding="2">
-	<tr><td><b><a name="brand_p2_artifacts"><tt>eclipse.brand.p2.artifacts</tt></a></b></td></tr>
+	<tr><td><b><a name="brand_p2_artifacts"><h3>eclipse.brand.p2.artifacts</h3></a></b></td></tr>
 	<tr><td><p>Brand launcher artifacts for a product and republish them with a new name for inclusion in the given product.</p></td></tr>
 	<tr><td><p>This task supports the following attributes:</p>
 	<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
-		<tr><td><tt>metadataRepository</tt></td><td>The metadata repository to publish to.</td></tr>
-		<tr><td><tt>artifactRepository</tt></td><td>The artifact repository to publish to.</td></tr>
+		<tr><td><tt>metadataRepository</tt></td><td>A URI to the metadata repository to publish to.</td></tr>
+		<tr><td><tt>artifactRepository</tt></td><td>A URI to the artifact repository to publish to.</td></tr>
 		<tr><td><tt>config</tt></td><td>The configuration for which the launchers will be used. (eg "gtk.linux.x86")</td></tr>
 		<tr><td><tt>iconsList</tt></td><td>Locations to find the icons to brand the executable with.</td></tr>
 		<tr><td><tt>tempDirectory</tt></td><td>The location of a temporary directory that can be be used.</td></tr>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_configuringproducts.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_configuringproducts.htm
index 6178a9a..6de7234 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_configuringproducts.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_configuringproducts.htm
@@ -27,7 +27,7 @@ This means that if you decide to set any custom start levels, then you must set
 <tr><td>org.eclipse.equinox.common</td><td align="center">2</td><td align="center">true</td></tr>
 <tr><td>org.eclipse.update.configurator</td><td align="center">4 (default)</td><td align="center">true</td></tr>
 <tr><td>org.eclipse.core.runtime</td><td align="center">4 (default)</td><td align="center">true</td></tr>
-<tr><td>org.eclipse.equinox.ds</td><td align="center">1</td><td align="center">true</td></tr>
+<tr><td>org.eclipse.equinox.ds</td><td align="center">2</td><td align="center">true</td></tr>
 </table>
 <p>When setting the start level for org.eclipse.update.configurator, PDE/Build will also automatically set In addition to these properties, <b><tt>org.eclipse.update.reconcile=false</tt></b>.</p>
 <h3>Config.ini properties</h3>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featurebuilds.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featurebuilds.htm
index a7ee4f2..4b947ee 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featurebuilds.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featurebuilds.htm
@@ -17,7 +17,7 @@
 <p>The following is a list of related properties (old and new):</p>
 <table border="5" cellspacing="0" cellpadding="2">
 	<tr><td><tt><b>p2.gathering</b></tt></td><td>Set to <tt><b>true</b></tt> to turn on p2 publisher based builds.</td></tr>
-	<tr><td><tt>p2.build.repo</tt></td><td>The local build time p2 repository, default is <tt>${buildDirectory}/buildRepo</tt>.  Results will be mirrored from here to the final archive location.</td></tr>
+	<tr><td><tt>p2.build.repo</tt></td><td>A URI to the local build time p2 repository, default is <tt>file:${buildDirectory}/buildRepo</tt>.  Results will be mirrored from here to the final archive location.</td></tr>
 	<tr><td><tt>groupConfigurations</tt></td><td><tt>p2.gathering=true</tt> has the implicit effect of setting <tt>groupConfigurations=true</tt>.  To control the <a href="pde_controlling_output.htm">output format</a> of the archive use the <tt>group.group.group</tt> configuration.</td></tr>
 	<tr><td><tt>generate.p2.metadata</tt></td><td>This is property for the old <a href="pde_p2_integration.htm">metadata generator integration</a>.  It has no affect when <tt>p2.gathering=true</tt>.</td></tr>
 	<tr><td><tt>p2.metadata.repo<br>p2.artifact.repo</tt></td>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featuremetadata.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featuremetadata.htm
index 72f57ec..4e9b1b4 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featuremetadata.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_featuremetadata.htm
@@ -36,7 +36,7 @@ From build's perspective, a feature contributes three things:
 	</table>
 	
 <p>Notice this IU structure does not include anything for the root files contributed by the feature.  Instead a build using the metadata generation placed all rootfiles together into a single IU and artifact.</p>
-<p>New in 3.5 is the <a href="pde_p2_builds.htm">p2 publisher</a>.  If we use PDE Build's <a href="pde_p2_anttasks.htm"><tt>eclipse.gatherFeature</tt></a> task to publish the feature from source, we instead get root file IUs corresponding to the feature that contributed them.  In this case, we end up with metadata as follows:</p>
+<p>New in 3.5 is the <a href="pde_p2_builds.htm">p2 publisher</a>.  If we use PDE Build's <a href="pde_p2_buildtasks.htm"><tt>eclipse.gatherFeature</tt></a> task to publish the feature from source, we instead get root file IUs corresponding to the feature that contributed them.  In this case, we end up with metadata as follows:</p>
 <table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
 		<tr>
 			<td width="370"><tt>org.example.platform.feature.group</tt></td><td>The top level grouping IU for the feature</td>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_integration.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_integration.htm
index d93156b..defca39 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_integration.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_integration.htm
@@ -24,7 +24,7 @@ However, PDE/Build does provide integration with p2 via the following properties
 		</tr>
 		<tr>
 			<td><pre>p2.metadata.repo<br>p2.artifact.repo</pre></td>
-			<td>Specify a <b>file:</b> URL giving the location of the p2 metadata and artifact repositories to publish to.  It is common, but not necessary for the artifact repository to use the same location as the metadata repository.<br>
+			<td>Specify a <b>file:</b> URI giving the location of the p2 metadata and artifact repositories to publish to.  It is common, but not necessary for the artifact repository to use the same location as the metadata repository.<br>
 			Example:<br>
 			<pre>
 			p2.metadata.repo=file:${buildDirectory}/repository
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_productbuilds.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_productbuilds.htm
index 842081b..1107236 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_productbuilds.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_p2_productbuilds.htm
@@ -16,10 +16,10 @@
 <p>The following is a list of related properties (old and new):</p>
 <table border="5" cellspacing="0" cellpadding="2">
 	<tr><td><tt><b>p2.gathering</b></tt></td><td>Set to <tt><b>true</b></tt> to turn on p2 publisher based builds.</td></tr>
-	<tr><td><tt>p2.build.repo</tt></td><td>The local build time p2 repository, default is <tt>${buildDirectory}/buildRepo</tt>.  Results will be mirrored from here to the final archive location.</td></tr>
+	<tr><td><tt>p2.build.repo</tt></td><td>A URI to the local build time p2 repository, default is <tt>file:${buildDirectory}/buildRepo</tt>.  Results will be mirrored from here to the final archive location.</td></tr>
 	<tr><td><tt>generate.p2.metadata</tt></td><td>This is property for the old <a href="pde_p2_integration.htm">metadata generator integration</a>.  It has no affect when <tt>p2.gathering=true</tt>.</td></tr>
 	<tr><td><tt>p2.metadata.repo<br>p2.artifact.repo</tt></td>
-		<td>By default for product builds, the final archives are the installed products and metadata and artifacts are left in the <tt>${p2.build.repo}</tt>.  If <tt>p2.metadata.repo</tt> and <tt>p2.artifact.repo</tt> are defined, then 
+		<td>These properties are be URIs.  By default for product builds, the final archives are the installed products and metadata and artifacts are left in the <tt>${p2.build.repo}</tt>.  If <tt>p2.metadata.repo</tt> and <tt>p2.artifact.repo</tt> are defined, then 
 		the artifacts and metadata for the product will be mirrored from the build repository.</td>
 	</tr>
 	<tr><td><tt>p2.metadata.repo.name<br>p2.artifact.repo.name</tt></td><td>Optional, these properties will be used to name the final repository when <tt>p2.metadata.repo</tt> and <tt>p2.artifact.repo</tt> are used.</td></tr>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_packager.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_packager.htm
index b4994e6..a207449 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_packager.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_packager.htm
@@ -20,9 +20,9 @@ often the case that consumers either need more than one component
 and/or only need parts of some components. Without assistance,
 consumers would have to manually fetch the archives containing the
 superset
-of the function they need and then manually extract the required
+of the functionality they need and then manually extract the required
 features and plug-ins. This can be a laborious and error prone process.</p>
-<p>Fortunately, PDE contains a batch oriented mechanism, the <em>packager</em>
+<p>Fortunately, PDE contains a batch oriented mechanism, the <em>packager</em>,
 which can help. In short, the packager takes as input a list of
 archives containing features and a list of interesting features. It
 then fetches
@@ -49,7 +49,7 @@ directory in which the actual packaging work will take place.
 separated list of feature ids that you wish to include in your archive.<br>
     </li>
     <li><span style="font-weight: bold;">componentFilter </span>: 
-A comma separated list of components from which your features can be
+A comma separated list of components in which your features can be
 found.  Specifying this will avoid unnecessary downloads. 
 Use * if you don't know the components.  (See the componentName in
 the <a href="pde_packager.htm#Packager_Map_File_Format">Packager Map
@@ -57,7 +57,7 @@ File Format</a>
 below).<br>
       <span style="font-weight: bold;"></span></li>
     <li><span style="font-weight: bold;">contentFilter</span> : A comma
-separated list of content type you are interested in.  Common
+separated list of content types you are interested in.  Common
 content types are <tt>runtime</tt> or <tt>sdk</tt>.  This is
 used to optimize the
 downloading of the archives.   Leave this blank to not filter
@@ -67,12 +67,12 @@ below).</li>
     <li><span style="font-weight: bold;">config </span>:  The
 configurations to package. This is an "&" separated list of comma
 separated triples of operating system,
-windowing system and architecture (eg <tt>win32,win32,x86 & linux,
-gtk, ppc</tt>)</li>
+windowing system and architecture (eg <tt>win32,win32,x86 &
+linux,gtk,ppc</tt>)</li>
   </ul>
   </li>
   <li>Get packager map files.  The following properties control
-downdloading the map files:<br>
+downloading the map files:<br>
     <ul>
       <li><span style="font-weight: bold;">localMaps</span> : Set this
 property if you have map files locally,
@@ -111,8 +111,8 @@ where the archive can be found.  The concatenation of url and
 archiveName should point to the archive to download.</li>
   <li><span style="font-weight: bold;">configList</span> : This is an
 "&" separated list of configs that this archive contains. 
-(eg: <tt>win32, win32, x86 & linux, gtk, x86</tt>).  If no
-value is given the archive is considered to be platform independant.</li>
+(eg: <tt>win32,win32,x86 & linux,gtk,x86</tt>).  If no
+value is given the archive is considered to be platform independent.</li>
   <li><span style="font-weight: bold;">directory</span> : The directory
 where the content of the archive should be extracted relative to a
 standard eclipse installation.  When no value is specified it
@@ -203,7 +203,7 @@ downloaded.<br>
     <tr>
       <td style="vertical-align: top;">config<br>
       </td>
-      <td style="vertical-align: top;">An "&" seperated list of
+      <td style="vertical-align: top;">An "&" separated list of
 configs (comma separated triples of operating system, windowing system,
 architecture) to repackage.  (eg: <tt>win32, win32, x86 &
 linux, gtk, x86</tt>) </td>
@@ -287,7 +287,7 @@ this points to packaging.properties.<br>
       <td style="vertical-align: top;">deltaPack<br>
       </td>
       <td style="vertical-align: top;">Whether or not to generate a
-delta pack.  This will exclude platform independant pieces and
+delta pack.  This will exclude platform independent pieces and
 will group all configs into one archive.<br>
       </td>
     </tr>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_product_build.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_product_build.htm
index 3268214..c2bfbcd 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_product_build.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_product_build.htm
@@ -40,7 +40,7 @@ directory</i>).
 Edit the copied build.properties file and set the following properties:<br>
 <ul>
   <li><span style="font-weight: bold;">product</span>: the location of
-your product configuration file in the form "<code>/<plugin or
+your product configuration file in the form "<code>/<plug-in or
 feature id>/path/to/.product</code>"</li>
   <li><span style="font-weight: bold;">baseLocation</span>:  the
 location of an eclipse install containing all the pre-built features
@@ -64,7 +64,7 @@ of the directory of your product once installed on disk.</li>
 <h3>Overview of the directory structure</h3>
 <pre><buildDirectory>/<br>	plugins/<br>		pluginToBuildA<br>		pluginToBuildB<br>			myProduct.product<br>		...<br>	features/<br>		featureToBuild<br>		...<br><br><buildConfiguration>/<br>	build.properties<br><br><baseLocation><br>	plugins/<br>		org.eclipse.core.runtime<br>		org.eclipse.ui<br>		...<br>	features/<br>		org.eclipse.rcp<br>		org.eclipse.platform.launchers<br>		...<br>		<br></pre>
 <h2>Running the build</h2>
-To run the build you will use the org.elipse.ant.core.antRunner
+To run the build you will use the org.eclipse.ant.core.antRunner
 application. When invoking eclipse with this application to
 perform a build you need to set two arguments on the command line:<br>
 <ul>
@@ -94,10 +94,10 @@ org.eclipse.ant.core.antRunner -buildfile
 </ul>
 <h2>Advanced scenarios</h2>
 <p>Behind the scenes this setup will generate a feature containing the
-plugins or features specified in your product configuration file. 
+plug-ins or features specified in your product configuration file. 
 This generated feature is then used to drive a normal feature based
 headless build. If you require more customization of the build,
-ie fetching from a repository, see the Advanced
+i.e. fetching from a repository, see the Advanced
 PDE Build topics for
 more information.
 </p>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_source_generation.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_source_generation.htm
index 2fd44cc..5310e79 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_source_generation.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/pde_source_generation.htm
@@ -10,9 +10,10 @@
 </head>
 <body>
 <h1>Generating Source Features and Plug-ins</h1>
+<p>Starting in 3.4, Eclipse has shipped with individual source bundles which allow for more flexible delivery of source.  See the "<a href="pde_individual_source.htm">Individual Source Bundles</a>" page for details.  Traditional folder-shaped source plug-ins can still be built as outlined below.
+</p>
 <p>
-PDE Build can generate a source feature or plug-in. Consider the
-following SDK feature:</p><br>
+Consider the following SDK feature:</p><br>
 <div style="text-align: left; margin-left: 40px;">
 <pre>features/<br>    org.foo.sdk/<br>	feature.xml: <includes id="org.foo.rcp" /><br>		     <includes id="org.foo.rcp.source" /><br>	build.properties: generate.feature at org.foo.rcp.source = org.foo.rcp<br>    org.foo.rcp/<br>	feature.xml: <plugin id="org.foo.BundleA" /><br>		     <plugin id="org.foo.BundleB" /><br>		     <plugin id="org.foo.BundleB.win32" fragment="true" os="win32" /><br></pre>
 </div>
@@ -25,7 +26,7 @@ build.properties
 file.  This property tells PDE Build to generate a feature named
 "<tt>org.foo.rcp.source</tt>" based on the contents of the feature
 "<tt>org.foo.rcp</tt>".  PDE build will generate an
-org.foo.rcp.source feature, a plugin that
+org.foo.rcp.source feature, a plug-in that
 will contain the source code, and fragments containing the source of
 any platform specific bundles that were included in the feature:</p><br>
 <div style="text-align: left; margin-left: 40px;">
@@ -42,7 +43,7 @@ Normally it is something like <feature id>.source</li>
   <li><span style="font-weight: bold;"><feature id></span>: 
 The feature on which to base the source feature, the source for all
 contained plug-ins will be collected into the <source feature id>
-plugin.</li>
+plug-in.</li>
   <li><span style="font-weight: bold;">feature@<feature id></span>: 
 This will include the named feature in the generated source feature.</li>
   <li><span style="font-weight: bold;">plugin@<plug-in id></span>: 
@@ -101,7 +102,7 @@ feature@ or by providing a template feature.xml:<br>
 <div style="text-align: left; margin-left: 40px;">
 <pre>features/<br>    org.foo.sdk/<br>	sourceTemplateFeature/<br>		build.properties:  generate.feature at org.foo.nested.source = org.foo.nested<br><br>	feature.xml: <includes id="org.foo.rcp" /><br>		     <includes id="org.foo.rcp.source" /><br><br>	build.properties: generate.feature at org.foo.rcp.source = org.foo.rcp, feature at org.foo.nested.source<br><br>    org.foo.rcp/...<br>    org.foo.nested/...<br></pre>
 </div>
-In the above example,  org.foo.sdk contains a generated source
+In the above example, org.foo.sdk contains a generated source
 feature named org.foo.rcp.source.  This generated source feature
 will get the template sourceTemplateFeature/build.properties
 file.  It will also include org.foo.nested.source in its
@@ -114,11 +115,15 @@ org.foo.nested.source.
 <p>It is also possible to generate a single source plug-in based on a
 feature instead of generating an entire source feature.  The
 property to do this is:</p>
-<p style="text-align: center;"><tt>generate.plugin@<source plug-in
+<p style="text-align: left;"><tt>generate.plugin@<source plug-in
 id>=<feature-in id></tt></p>
+<p>Be aware that these old-style source plug-ins (one plug-in containing
+the source for all plug-ins of the feature) must be installed in folder 
+form. Therefore you have to set the <tt>unpack="true"</tt> attribute
+in the file <tt>feature.xml</tt>.</p>
 Example:
 <div style="text-align: left; margin-left: 40px;">
-<pre>features/<br>    org.foo.sdk/<br>	feature.xml: <plugin id="org.foo.rcp" /><br> 		    <plugin id="org.foo.sdk.source" /><br> <br>	build.properties: generate.plugin at org.foo.sdk.source = org.foo.sdk<br></pre>
+<pre>features/<br>    org.foo.sdk/<br>	feature.xml: <plugin id="org.foo.rcp" /><br> 		     <plugin id="org.foo.sdk.source" <b>unpack="true"</b> /><br> <br>	build.properties: generate.plugin at org.foo.sdk.source = org.foo.sdk<br></pre>
 </div>
 <br>
 <br>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tasks/ui_import_from_cvs.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/ui_import_from_cvs.htm
new file mode 100644
index 0000000..be067d7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tasks/ui_import_from_cvs.htm
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../guide/book.css" type="text/css">
+<title>Import Projects from a Repository</title>
+<script type="text/javaScript" language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
+</head>
+<body>
+<h1>Import Projects from a Repository</h1>
+<p>
+The <b>Plug-in Import Wizard</b> allows you to create projects in the workspace by importing plug-ins from the active
+target platform, a directory, or a target definition. If the plug-ins you are importing contain appropriate source
+reference information, the import wizard allows you to import the projects associated with those bundles from
+a repository.
+</p>
+<p>
+For example, the plug-ins in the Eclipse SDK contain <b>Eclipse-SourceReference:</b> headers identifying the CVS
+repository and projects the plug-ins originated from. You can import the specific version of a project that a plug-in
+was built from or you can import the associated project from HEAD. 
+</p>
+
+<p>To import plug-ins from a repository do the following:</p>
+<ol>
+<li>Open the import wizard: <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.file.import(importWizardId=org.eclipse.pde.ui.PluginImportWizard)")'>
+<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Open the plugin import wizard">
+<strong>File > Import... > Plug-in Development > Plug-ins and Fragments</strong>
+</a></li>
+<li>In the <strong>Import From</strong> section, select a source of plug-ins such as the active target platform.
+<p><img src="../guide/images/tasks/import-from-active.png" alt="Import from the active target platform" border="0"></p>
+</li>
+
+<li>In the <strong>Import As</strong> section select <strong>Projects from a repository</strong>.
+<p><img src="../guide/images/tasks/import-as-repo.png" alt="Import as projects from a repository" border="0"></p>
+</li>
+
+<li>Press <strong>Next</strong>.  A list of plug-ins in the target platform that can be imported from a repository will be
+shown. Select the plug-ins you want to import and press <strong>Next</strong>.</li>
+
+<li>The next page allows you to import specific versions of the associated projects (the versions used to build the
+target platform), or from HEAD. Select the desired option and press <strong>Finish</strong>. The projects
+will be imported and appear as projects in the workspace.
+<p><img src="../guide/images/tasks/import-version.png" alt="Import specific versions or from HEAD" border="0"></p>
+</li>
+</ol>
+<p>You can also import plug-ins from a repository from the <strong>Plug-ins</strong> View. Select the plug-ins you want
+to import and use the <strong>Import As > Project from a Repository...</strong> action.</p>
+<p><img src="../guide/images/tasks/import-from-plugins-view.png" alt="Import projects from a repository" border="0"></p>
+<br>
+<p><img src="../images/ngrelr.png" alt="Related reference" border="0"></p>
+<p>
+<a href="../guide/tools/import_wizards/import_wizards.htm">Import Wizards</a><br>
+<a href="../guide/tools/import_wizards/import_plugins.htm">Plug-in Import</a><br>
+</p>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/tips/pde_tips.htm b/eclipse/plugins/org.eclipse.pde.doc.user/tips/pde_tips.htm
index 0a2e866..e68dc4d 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/tips/pde_tips.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/tips/pde_tips.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
@@ -45,32 +45,6 @@
     </td>
   </tr>  
   <tr>
-    <td valign="top" align="left" width="20%" height="345"><b>Feature-based 
-    self-hosting</b></td>
-    <td valign="top" align="left" width="80%" height="345">The current method of self-hosting in Eclipse
-      is plug-in-based. PDE launches a second run-time workbench instance by
-      passing an array of plug-ins that it should load. A regular Eclipse
-      product is feature-based: during startup, it checks all the features that
-      should be active, computes plug-ins that belong to those features, and
-      passes the result for loading.
-      <p>This difference in behavior makes it complicated to self-host in
-      scenarios where a full startup that involves features is required. PDE now
-      supports this scenario if care is taken with the setup:</p>
-      <ol>
-        <li>The workspace needs to be <work-area>/plugins.</li>
-        <li>Features must be imported into the workspace using the new 'Feature
-          Import' wizard (they will be created in <work-area>/features).</li>
-        <li>All plug-ins must be in the workspace (either in source or imported
-          as binary projects WITHOUT linking).</li>
-        <li>When launching, Run-time Workbench launcher must be configured to
-          use features (in Plug-ins and Fragments tab).</li>
-      </ol>
-      <p>If all these conditions are met, the runtime Eclipse instance will be
-      launched in a way that is the closest possible approximation of a normal
-      Eclipse startup. This facilitates testing About dialogs and other aspects
-      that may depend on the set of installed features.</p></td>
-  </tr>
-  <tr>
     <td valign="top" align="left" width="20%"><b>To clean or not to clean</b></td>
     <td valign="top" align="left" width="80%">When you create a new runtime 
     workbench launch configuration, PDE presets the Program Arguments on the 
@@ -119,7 +93,7 @@
     needs a particular plug-in X, now you can easily find out why.  
     <p>The <b>Compute Dependency Extent </b>operation
       found on the context menu in several contexts (including manifest file
-      Dependencies page and Dependencies view) performs a combined Java and
+      Dependencies page and Plug-in Dependencies view) performs a combined Java and
       plug-in search to find all Java types and extension points provided by 
     plug-in X which are referenced
       by your plug-in. The results will be displayed in the Search view.  When a type is selected in the Search results view, the <b>References
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/topics_Reference.xml b/eclipse/plugins/org.eclipse.pde.doc.user/topics_Reference.xml
index 198d4c4..149f81a 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/topics_Reference.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/topics_Reference.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?NLS TYPE="org.eclipse.help.toc"?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -16,21 +16,27 @@
 <!-- ============================================================================= -->
 <toc label="Reference">
    <topic label="API Tools Ant Tasks">
-      <topic href="reference/api-tooling/ant-tasks/analysis-ant-task.htm" label="API Tools Analysis Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/analysis-ant-task.htm" label="Analysis Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm" label="API Tools Analysis Report Conversion Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/analysis-reportconversion-ant-task.htm" label="Analysis Report Conversion Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/apifreeze-ant-task.htm" label="API Tools API Freeze Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/apifreeze-ant-task.htm" label="API Freeze Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm" label="API Tools API Freeze Report Conversion Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/apifreeze-reportconversion-ant-task.htm" label="API Freeze Report Conversion Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/filegeneration-ant-task.htm" label="API Tools File Generation Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/deprecation-ant-task.htm" label="API Deprecation Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/apiuse-ant-task.htm" label="API Tools API Use Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/deprecation-reportconversion-ant-task.htm" label="API Deprecation Report Conversion Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm" label="API Tools API Use Report Conversion Task">
+      <topic href="reference/api-tooling/ant-tasks/apiuse-ant-task.htm" label="API Use Ant Task">
       </topic>
-      <topic href="reference/api-tooling/ant-tasks/pluggableapiuse-ant-task.htm" label="API Tools Pluggable API Use Ant Task">
+      <topic href="reference/api-tooling/ant-tasks/apiuse-reportconversion-ant-task.htm" label="API Use Report Conversion Task">
+      </topic>
+      <topic href="reference/api-tooling/ant-tasks/apimigration-ant-task.htm" label="API Use Migration Ant Task">
+      </topic>
+      <topic href="reference/api-tooling/ant-tasks/apimigration-reportconversion-ant-task.htm" label="API Use Migration Report Conversion Task">
+      </topic>
+      <topic href="reference/api-tooling/ant-tasks/filegeneration-ant-task.htm" label="File Generation Ant Task">
       </topic>
    </topic>
    <topic label="Build Configuration">
@@ -70,10 +76,14 @@
 	
 	<topic label="Product Configuration Editor" href="guide/tools/editors/product_editor/editor.htm">
 		<topic label="Product Overview" href="guide/tools/editors/product_editor/overview.htm"/>
+  <topic href="guide/tools/editors/product_editor/dependencies.htm" label="Product Dependencies">
+  </topic>
 		<topic label="Product Configuration" href="guide/tools/editors/product_editor/configuration.htm"/>
 		<topic label="Product Launching" href="guide/tools/editors/product_editor/launching.htm"/>
 		<topic label="Product Splash" href="guide/tools/editors/product_editor/splash.htm"/>
 		<topic label="Product Branding" href="guide/tools/editors/product_editor/branding.htm"/>
+  <topic href="guide/tools/editors/product_editor/licensing.htm" label="Product Licensing">
+  </topic>
 	</topic>
 	<topic label="Target Definition Editor" href="guide/tools/editors/target_editor/target_editor.htm">
 		<topic label="Target Definition" href="guide/tools/editors/target_editor/definition_page.htm"/>
@@ -120,8 +130,8 @@
 <topic label="Launchers">
 	<topic label="Eclipse Application Launcher" href="guide/tools/launchers/eclipse_application_launcher.htm">
 		<topic label="Main Tab" href="guide/tools/launchers/eclipse_main.htm"/>
-		<topic label="Arguments Tab" href="guide/tools/launchers/eclipse_args.htm"/>
-		<topic label="Plug-ins Tab" href="guide/tools/launchers/eclipse_plugins.htm"/>
+		<topic label="Arguments Tab" href="guide/tools/launchers/arguments.htm"/>
+		<topic label="Plug-ins Tab" href="guide/tools/launchers/plugins.htm"/>
 		<topic label="Configuration Tab" href="guide/tools/launchers/configuration.htm"/>
 		<topic label="Tracing Tab" href="guide/tools/launchers/tracing.htm"/>
 		<topic label="Environment Tab" href="guide/tools/launchers/environment.htm"/>
@@ -138,9 +148,9 @@
 	<topic label="JUnit Plug-in Test Launcher" href="guide/tools/launchers/junit_launcher.htm">
 		<topic label="Test Tab" href="guide/tools/launchers/junit_test.htm"/>
 		<topic label="Main Tab" href="guide/tools/launchers/junit_main.htm"/>
-		<topic label="Arguments Tab" href="guide/tools/launchers/eclipse_args.htm"/>
-		<topic label="Plug-ins Tab" href="guide/tools/launchers/junit_plugins.htm"/>
-		<topic label="Configuration Tab" href="guide/tools/launchers/junit_configuration.htm"/>
+		<topic label="Arguments Tab" href="guide/tools/launchers/arguments.htm"/>
+		<topic label="Plug-ins Tab" href="guide/tools/launchers/plugins.htm"/>
+		<topic label="Configuration Tab" href="guide/tools/launchers/configuration.htm"/>
 		<topic label="Tracing Tab" href="guide/tools/launchers/tracing.htm"/>
 		<topic label="Environment Tab" href="guide/tools/launchers/environment.htm"/>
 		<topic label="Common Tab" href="guide/tools/launchers/common.htm"/>
@@ -211,13 +221,15 @@
 		<topic label="Update Site Project" href="guide/tools/project_wizards/new_update_site_project.htm"/>
 	</topic>
 	<topic label="New File Creation Wizards" href="guide/tools/file_wizards/new_file_wizards.htm">
+  <topic href="guide/tools/file_wizards/new_category.htm" label="Category Definition">
+  </topic>
+		<topic label="Extension Point Schema" href="guide/tools/file_wizards/new_schema.htm"/>
 		<topic label="Product Configuration" href="guide/tools/file_wizards/new_product_config.htm"/>
 		<topic label="Target Definition" href="guide/tools/file_wizards/new_target_definition.htm"/>
-		<topic label="Extension Point Schema" href="guide/tools/file_wizards/new_schema.htm"/>
 		<topic label="Cheat Sheet" href="guide/tools/file_wizards/new_cheat_sheet.htm"/>
-		<topic label="Table of Contents" href="guide/tools/file_wizards/new_toc.htm"/>
-  <topic href="guide/tools/file_wizards/new_category.htm" label="Category Definition">
+  <topic href="guide/tools/file_wizards/new_ctx_help.htm" label="Context Help">
   </topic>
+		<topic label="Table of Contents" href="guide/tools/file_wizards/new_toc.htm"/>
 	</topic>
 	<topic label="Import Wizards" href="guide/tools/import_wizards/import_wizards.htm">
 		<topic label="Plug-in Import" href="guide/tools/import_wizards/import_plugins.htm"/>
@@ -241,6 +253,10 @@
 	    </topic>
 	    <topic href="reference/api-tooling/wizards/ref-api-compare-wizard.htm" label="API Compare Wizard">
 	    </topic>
+     <topic href="reference/api-tooling/wizards/ref-api-use-dialog.htm" label="API Use Reports">
+     </topic>
+     <topic href="reference/api-tooling/wizards/ref-apiuse-patterns-wizard.htm" label="API Use Patterns Wizard">
+     </topic>
     </topic>
     <topic label="Target Wizards">
        <topic href="guide/tools/target_shared/new_target_wizard.htm" label="New Target Wizard">
@@ -274,6 +290,10 @@
    </topic>
    <topic href="reference/api/org/eclipse/pde/core/plugin/package-summary.html" label="org.eclipse.pde.core.plugin">
    </topic>
+   <topic href="reference/api/org/eclipse/pde/core/project/package-summary.html" label="org.eclipse.pde.core.project">
+   </topic>
+   <topic href="reference/api/org/eclipse/pde/launching/package-summary.html" label="org.eclipse.pde.launching">
+   </topic>
    <topic href="reference/api/org/eclipse/pde/ui/package-summary.html" label="org.eclipse.pde.ui">
    </topic>
    <topic href="reference/api/org/eclipse/pde/ui/launcher/package-summary.html" label="org.eclipse.pde.ui.launcher">
@@ -284,12 +304,16 @@
 	<topic label="Extension Points Reference" href="reference/extension-points/index.html">
     <topic href="reference/extension-points/org_eclipse_pde_build_fetchFactories.html" label="org.eclipse.pde.build.fetchFactories">
     </topic>
+    <topic href="reference/extension-points/org_eclipse_pde_core_bundleImporters.html" label="org.eclipse.pde.core.bundleImporters">
+    </topic>
     <topic href="reference/extension-points/org_eclipse_pde_core_javadoc.html" label="org.eclipse.pde.core.javadoc">
     </topic>
     <topic href="reference/extension-points/org_eclipse_pde_core_source.html" label="org.eclipse.pde.core.source">
     </topic>
     <topic href="reference/extension-points/org_eclipse_pde_core_targets.html" label="org.eclipse.pde.core.targets">
     </topic>
+    <topic href="reference/extension-points/org_eclipse_pde_ui_bundleImportPages.html" label="org.eclipse.pde.ui.bundleImportPages">
+    </topic>
     <topic href="reference/extension-points/org_eclipse_pde_ui_launchShortcuts.html" label="org.eclipse.pde.ui.launchShortcuts">
     </topic>
     <topic href="reference/extension-points/org_eclipse_pde_ui_newExtension.html" label="org.eclipse.pde.ui.newExtension">
@@ -306,6 +330,8 @@
     </topic>
 	</topic>
 	<topic label="Other Reference Information" href="reference/misc/index.html">
+    <topic href="reference/misc/overview-pde.html" label="PDE Plug-ins Map">
+    </topic>
 	</topic>
  <topic href="reference/api-tooling/api_javadoc_tags.htm" label="Defining API Restrictions">
  </topic>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/topics_Tasks.xml b/eclipse/plugins/org.eclipse.pde.doc.user/topics_Tasks.xml
index 8e61fb2..6a5f724 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/topics_Tasks.xml
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/topics_Tasks.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?NLS TYPE="org.eclipse.help.toc"?>
 <!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -39,6 +39,8 @@
       </topic>
       <topic href="tasks/pde_compilation_env.htm" label="Controlling compilation environment">
       </topic>
+      <topic href="tasks/pde_compiler_options.htm" label="Compiler options and settings">
+      </topic>
       <topic href="tasks/pde_source_generation.htm" label="Source Plug-in and Feature generation">
       </topic>
       <topic href="tasks/pde_individual_source.htm" label="Individual Source Bundles">
@@ -85,5 +87,7 @@
    <topic label="PDE UI">
       <topic href="tasks/ui_export_install_into_host.htm" label="Export and Install Into Running Host">
       </topic>
+      <topic href="tasks/ui_import_from_cvs.htm" label="Import Projects from a Repository">
+      </topic>
    </topic>
 </toc>
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-plugins.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-plugins.png
new file mode 100644
index 0000000..76ac21e
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-plugins.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-to-target.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-to-target.png
new file mode 100644
index 0000000..86cb2f0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/add-to-target.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-deprecation.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-deprecation.png
new file mode 100644
index 0000000..6625a04
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-deprecation.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-filters.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-filters.png
new file mode 100644
index 0000000..c5ae3a8
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-filters.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-scan.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-scan.png
new file mode 100644
index 0000000..1775c34
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/api-scan.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/apichanges.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/apichanges.png
deleted file mode 100644
index 8e66bec..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/apichanges.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive-wizard.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive-wizard.png
new file mode 100644
index 0000000..d18a4d2
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive-wizard.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive.png
new file mode 100644
index 0000000..5f9aaf8
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/archive.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/avail.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/avail.png
new file mode 100644
index 0000000..5b2deb1
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/avail.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/build-severities.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/build-severities.png
new file mode 100644
index 0000000..c2b74e5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/build-severities.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/buildproperties.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/buildproperties.png
new file mode 100644
index 0000000..a45daef
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/buildproperties.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categorydef.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categorydef.png
deleted file mode 100644
index e37acda..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categorydef.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categoryexport.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categoryexport.png
deleted file mode 100644
index 5dcbda1..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/categoryexport.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/click-install.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/click-install.png
deleted file mode 100644
index 06032c9..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/click-install.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/console-menu.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/console-menu.png
new file mode 100644
index 0000000..f5867d5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/console-menu.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/consolelog.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/consolelog.png
new file mode 100644
index 0000000..f907b6a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/consolelog.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/description.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/description.png
new file mode 100644
index 0000000..4d1b5d3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/description.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/dstemplate.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/dstemplate.png
deleted file mode 100644
index 140aab9..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/dstemplate.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation-pref.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation-pref.png
deleted file mode 100644
index 8fed896..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation-pref.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation.png
deleted file mode 100644
index 6374953..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/ee-validation.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/err-warn.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/err-warn.png
deleted file mode 100644
index 1d77633..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/err-warn.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-options.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-options.png
deleted file mode 100644
index 3734dda..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-options.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-target.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-target.png
new file mode 100644
index 0000000..17b9104
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/export-target.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/feature-launch.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/feature-launch.png
new file mode 100644
index 0000000..bc3f812
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/feature-launch.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/filter-quick-fix.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/filter-quick-fix.png
deleted file mode 100644
index c3a5ca1..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/filter-quick-fix.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/from-repo.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/from-repo.png
new file mode 100644
index 0000000..07b2159
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/from-repo.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/head-version.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/head-version.png
new file mode 100644
index 0000000..8fe8e05
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/head-version.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/hover-quick-fix.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/hover-quick-fix.png
new file mode 100644
index 0000000..e61b32e
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/hover-quick-fix.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installcategory.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installcategory.png
deleted file mode 100644
index 4e14cb8..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installcategory.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installed.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installed.png
deleted file mode 100644
index 24b7031..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/installed.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/keypass.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/keypass.png
deleted file mode 100644
index efa73d0..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/keypass.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/menuspy.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/menuspy.png
deleted file mode 100644
index b379427..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/menuspy.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/nl-fragments.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/nl-fragments.png
deleted file mode 100644
index bea68ec..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/nl-fragments.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/non-ui-thread.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/non-ui-thread.png
deleted file mode 100644
index ccd962d..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/non-ui-thread.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/options-editor.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/options-editor.png
deleted file mode 100644
index fc3e61b..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/options-editor.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pattern-wizard.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pattern-wizard.png
new file mode 100644
index 0000000..10e56ed
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pattern-wizard.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/patterns.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/patterns.png
new file mode 100644
index 0000000..4f68ad4
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/patterns.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-binarycycles.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-binarycycles.png
deleted file mode 100644
index 1116175..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-binarycycles.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-ds.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-ds.png
deleted file mode 100644
index 4be8af4..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-ds.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-jumpconsole.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-jumpconsole.png
deleted file mode 100644
index e8eaba4..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-jumpconsole.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-registryview.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-registryview.png
deleted file mode 100644
index d579b21..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-registryview.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-versioning.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-versioning.png
deleted file mode 100644
index 6724948..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/pde-versioning.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/registryfragments.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/registryfragments.png
deleted file mode 100644
index 7e55553..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/registryfragments.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/scandetails.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/scandetails.png
new file mode 100644
index 0000000..656a8a0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/scandetails.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/soft-install.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/soft-install.png
new file mode 100644
index 0000000..bb0536a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/soft-install.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/spell-check.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/spell-check.png
new file mode 100644
index 0000000..c1d0348
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/spell-check.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/src-builds.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/src-builds.png
new file mode 100644
index 0000000..53579cf
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/src-builds.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/start-levels.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/start-levels.png
deleted file mode 100644
index 78ec47b..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/start-levels.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-settings.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-settings.png
new file mode 100644
index 0000000..2fdf972
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-settings.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-warnings.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-warnings.png
new file mode 100644
index 0000000..1bab2e3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/synch-warnings.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-editor.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-editor.png
deleted file mode 100644
index 3b61fea..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-editor.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-features.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-features.png
new file mode 100644
index 0000000..685e52d
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-features.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-platform.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-platform.png
deleted file mode 100644
index a46f94c..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-platform.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-search.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-search.png
new file mode 100644
index 0000000..dcae43a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/target-search.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/targetstateview.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/targetstateview.png
deleted file mode 100644
index 9a8c377..0000000
Binary files a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/targetstateview.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/xml-errors.png b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/xml-errors.png
new file mode 100644
index 0000000..f0ce0c1
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/images/xml-errors.png differ
diff --git a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/pde_whatsnew.htm b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/pde_whatsnew.htm
index ec6faa7..9ea6117 100644
--- a/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/pde_whatsnew.htm
+++ b/eclipse/plugins/org.eclipse.pde.doc.user/whatsNew/pde_whatsnew.htm
@@ -1,337 +1,560 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>PDE - What's New in 3.5</title>
-<link rel="stylesheet" href="../book.css" type="text/css">
+<meta name="copyright"
+	content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/>
+<meta http-equiv="Content-Language" content="en-us"/>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>PDE - What's New in 3.6</title>
+<link rel="stylesheet" href="../book.css" type="text/css"/>
 <style type="text/css">
-td {border-top: solid thin black;}
-img[alt] {background-color:#ffdddd;}
-tr {vertical-align: top;}
+td {
+	border-top: solid thin black;
+}
+
+img[alt] {
+	background-color: #ffdddd;
+}
+
+tr {
+	vertical-align: top;
+}
 </style>
 </head>
 <body>
-<h2>What's New in 3.5 (PDE) </h2>
-<p>Here are descriptions of some of the more interesting or significant changes made to the Plug-in Development Environment (PDE) for the 3.5 release of Eclipse, grouped into:</p>
+<h2>What's New in 3.6 (PDE)</h2>
+<p>Here are descriptions of some of the more interesting or
+significant changes made to the Plug-in Development Environment (PDE)
+for the 3.6 release of Eclipse, grouped into:</p>
 <ul>
-  <li><a href="#ViewsAndEditors">Views and Editors</a></li>
-  <li><a href="#Export">Export</a></li>
-  <li><a href="#APITooling">API Tooling</a> </li>
-  <li><a href="#Build">Build</a></li>
-  <li><a href="#TargetPlatform">Target Platform </a></li>
+	<li><a href="#ViewsAndEditors">Views and Editors</a></li>
+	<li><a href="#Launching">Launching</a></li>
+	<li><a href="#TargetPlatform">Target Platform </a></li>
+	<li><a href="#Export">Import and Export</a></li>
+	<li><a href="#APITooling">API Tooling</a></li>
+	<li><a href="#Build">Build</a></li>
 </ul>
 <!-- ****************** START OF N&N TABLE ****************** -->
 <table cellpadding="10" cellspacing="0" width="600">
-  <tr>
-    <td colspan="2"><h2><a name="ViewsAndEditors">Views and Editors </a></h2></td>
-  </tr>
-  <tr id="pde-ds">
-    <td align="left" valign="top"><b>Declarative services editor</b></td>
-    <td valign="top">PDE has added declarative services tooling to help author service component definitions.
-      <p><img src="images/pde-ds.png" alt="Declarative Services Editor"></p></td>
-  </tr>
-  <tr id="pde.ds">
-    <td valign="top" align="left"><b>DS Tooling enhancements</b></td>
-    <td valign="top"><p>The OSGi Declarative Services (DS) tooling has been
-      enhanced to support the latest version of the DS specification. Specifically, a new <b>modified</b> attribute has been added to the component element.
-      </p>
-        <p>A new template based on a simple dictionary service has been added to 
-          showcase Declarative Services tooling. </p>
-      <p><img src="images/dstemplate.png" alt="DS Template"></p></td>
-  </tr>
-  <tr id="pde-logview">
-    <td align="left" valign="top"><b>Jump to Console from stack trace</b></td>
-    <td valign="top">The error log view has been enhanced to allow posting stack trace dumps to the <b>Console</b> view from log messages.
-      <p><img src="images/pde-jumpconsole.png" alt="Jump to Console"></p></td>
-  </tr>
-  <tr id="pde-versioning">
-    <td align="left" valign="top"><b>Versioning options</b></td>
-    <td valign="top">To help developers follow versioning best practices, PDE has expanded its compiler options
-      to include version constraint checks on imported packages, exported packages and required bundle statements.
-      <p><img src="images/pde-versioning.png" alt="Preferences > Plug-in Development > Compilers"></p></td>
-  </tr>
-  <tr id="pde.options.editor">
-    <td valign="top" align="left"><b>Properties editor for .options </b></td>
-    <td valign="top"><p>The standard properties file editor is now used for <code>.options</code> files in the workspace.</p>
-        <p><img src="images/options-editor.png" alt="Property file editor"></p></td>
-  </tr>
-  <tr id="pde.product.editor">
-    <td valign="top" align="left"><strong>Product editor enhancements </strong></td>
-    <td valign="top">The product editor has been enhanced to support   bundle start levels and product license information. </td>
-  </tr>
-  <tr id="pde.productosgi">
-    <td valign="top" align="left"><b>Product definition enhancements</b></td>
-    <td valign="top"><p>You can now initialize product definitions from OSGi launch configurations.</p></td>
-  </tr>
-  <tr id="pde.nl.fragments">
-    <td valign="top" align="left"><b>NL fragment generation </b></td>
-    <td valign="top"><p>A new wizard (<strong>PDE Tools -& Internationalize...</strong>) supports the generation of NL fragments for plug-ins in the workspace. A project is generated for each selected plug-in containing skeleton properties files for each selected locale. The generated properties files contain the keys from each of the associated plug-in's properties files.</p>
-        <p><img src="images/nl-fragments.png" alt="Wizard to generate NL fragments" ></p></td>
-  </tr>
-  <tr id="pde.menuspy">
-    <td valign="top" align="left"><b>Plug-in Spy and menus</b></td>
-    <td valign="top"><p>View information about menus by invoking Plug-in Spy 
-      in menu introspection mode (<b>Alt+Shift+F2</b>) and selecting a menu item.
-      </p>
-        <p><img src="images/menuspy.png" alt="Menu Spy"></p></td>
-  </tr>
-  <tr id="registryview">
-    <td align="left" valign="top"><b>Plug-in Registry view enhancements </b></td>
-    <td valign="top">The <b>Plug-in Registry</b> view now supports 
-      browsing for OSGi services.
-      <p><img src="images/pde-registryview.png" alt="Browse for OSGi services using the registry view" ></p></td>
-  </tr>
-  <tr id="launch-config-startLevels">
-    <td valign="top" align="left"><b>Start levels</b></td>
-    <td valign="top">Eclipse Application launch configurations now support start 
-      levels and auto-start settings. You can specify default start levels and auto-start 
-      settings for all plug-ins in the configuration, and provide specific settings for others 
-      by selecting the plug-in in the list.
-      <p><img src="images/start-levels.png" alt="Use the Plug-ins tab to specify start levels" ></p></td>
-  </tr>
-  <tr id="junit-nonUIThread">
-    <td valign="top" align="left"><b>JUnit plug-in tests in non-UI thread</b></td>
-    <td valign="top">You can now launch JUnit Plug-in tests in a non-UI thread. A 
-      check box has been added to the Test tab to specify whether tests should run in the UI thread.
-      <p><img src="images/non-ui-thread.png" alt="Check box for non-UI thread"></p></td>
-  </tr>
-  <tr id="pde.fragments">
-    <td valign="top" align="left"><b>Fragments in the Plug-in Registry view</b></td>
-    <td valign="top"><p>The Plug-in Registry view now includes fragments. Simply expand a plug-in, and expand
-      the <b>Fragments</b> element in the tree to see all available fragments of that plug-in.
-      </p>
-        <p><img src="images/registryfragments.png" alt="Fragments"></p></td>
-  </tr>
-  <tr>
-    <td colspan="2"><h2><a name="Export">Export </a></h2></td>
-  </tr>
-  <tr id="exportInstall">
-    <td valign="top" align="left"><b> Install  into running platform</b></td>
-    <td valign="top"><p>It's simple to run and test your latest code by exporting and install plug-ins and features directly into the running workbench. Choose <strong>Install into host</strong> when exporting and 
-      specify a path in the local file system where exported artifacts can be stored (repository). You will be prompted to restart your 
-      workspace after export and install is complete. </p>
-        <p><img src="images/click-install.png" alt="Export Wizard"></p>
-      <p>Patched plug-ins will appear in the installed software list and can also be uninstalled.</p>
-      <p><img src="images/installed.png" alt="Installation Details Dialog"></p>    </td>
-  </tr>
-  <tr id="pde-binary-cycles">
-    <td valign="top" align="left"><b>Source bundles, binary cycles, and  workspace class files </b></td>
-    <td valign="top"><p>Export options have been enhanced:</p>
-      <ul>
-        <li>Generate source bundles. Select the <b>Export source</b> option and choose <b>Generate 
-        source bundles</b> from the drop down menu. A source bundle will be exported for each 
-      plug-in being exported. </li>
-        <li>Export features, plug-ins, and products with binary cycles. 
-          Binary cycles are cycles that exist in your target platform, not your workspace. This option is on by default.</li>
-        <li>Export existing class files from the workspace. When this option is checked, PDE will re-use existing class files in the workspace rather than compiling class files from source during export.</li>
-      </ul>
-    <p><img src="images/export-options.png" alt="Export Wizard Options Tab"></p></td>
-  </tr>
-  <tr id="pde.feature.categories">
-    <td valign="top" align="left"><strong>Publish feature categories</strong></td>
-    <td valign="top"><p>The new <strong>Category Definition</strong> editor can be 
-      used to assign categories to features when exporting. The category names and 
-      descriptions will then appear in software selection dialogs. First, create a category 
-      definition file via <strong>File > New > Other...</strong> and select<strong> Plug-in Development > Category Definition.</strong> Define categories with 
-      symbolic identifiers, names, and descriptions, and then add features to each category.
-      </p>
-        <p><img src="images/categorydef.png" alt="Category Definition editor" ></p>
-      <p>When exporting your feature, specify the category file to apply when exporting 
-        via the <strong>Options</strong> tab. </p>
-      <p><img src="images/categoryexport.png" alt="Specify category file on export" ></p>
-      <p>The categories can then be seen when browsing the repository from the Install Software dialog.</p>
-      <p><img src="images/installcategory.png" alt="Install new software dialog displays exported categories"></p></td>
-  </tr>
-  <tr id="pde.keypass">
-    <td valign="top" align="left"><b>Keypass support</b></td>
-    <td valign="top"><p>The JAR signing support in PDE has been expanded to include support for keypasses.
-      </p>
-        <p><img src="images/keypass.png" alt="Keypass support"></p></td>
-  </tr>
-  <tr>
-    <td colspan="2"><h2><a name="APITooling">API Tooling </a></h2></td>
-  </tr>
-  <tr id="apiOptions">
-    <td valign="top" align="left"><b>Compatibility options </b></td>
-    <td valign="top"><p>API compatibility options have been reorganized and descriptions have been improved. The number of options has been reduced by combining related problems. For example, problems related to type parameters 
-      are now in their own group rather than being listed separately in the settings for classes, interfaces, and methods. </p>
-      <p>As well, you can be alerted to breaking API changes even if you have incremented the major version of your plug-in. The first time you change a plug-in's API in an incompatible way, problems inform you to increment the major version of your plug-in. Once you increment the major version of your plug-in, API tooling allows additional breaking API changes without warning. Use the new preference <strong>Report API breakage even if authorized by major version increment</strong> to enable this feature (on the <strong>Plug-in Development > API Errors/Warnings</strong> preference page, on the <strong>API Compatibility</strong> tab). When this preference is enabled you must use API problem filters to selectively permit incompatible API changes.</p>
-      <p><img src="images/err-warn.png" alt="Preferences > Plug-in Development > API Errors/Warnings" ></p></td>
-  </tr>
-  <tr id="api.noextend">
-    <td valign="top" align="left"><b>@noextend restriction supported on interfaces</b></td>
-    <td valign="top"><p>API tooling now supports two restrictions on interfaces: <code>@noimplement</code> and <code>@noextend</code>. This allows an interface to be 
-      extended when it is not intended to be implemented directly. For example, a client may 
-      be permitted to subclass an existing implementation of a <code>@noimplement</code> interface and extend the base interface with extra function.</p>
-        <p>Component owners should decide where to add <code>@noextend</code> tags on existing interfaces, as this was previously implicit. To maintain the API contracts 
-          specified in 3.4, <code>@noextend</code> tags can be added to all interfaces 
-          specified as <code>@noimplement</code>. In some cases the <code>@noextend</code> restriction can be omitted, as clients that extend and implement a <code>@noimplement</code> interface will still be flagged with errors. However, if you would like to reserve the 
-          right to add constants to an API interface in the future, you must add the <code>@noextend</code> tag. This is because adding a field to an interface is binary 
-          incompatible if clients can extend or implement an interface (see <a href="http://wiki.eclipse.org/Evolving_Java-based_APIs_2#Evolving_API_Interfaces">Evolving API Interfaces</a>).<br>
-      </p></td>
-  </tr>
-  <tr id="systemLibrary">
-    <td valign="top" align="left"><b>System library validation</b></td>
-    <td valign="top">API tools can now analyze use of system libraries and create 
-      problems when code accesses members that may not be present at runtime. 
-      For example, when a plug-in specifies a required execution environment of J2SE 1.3, 
-      but the only JRE installed in the workspace for building is J2SE 1.5, it is possible to 
-      access methods that exist in J2SE 1.5, but not in J2SE 1.3. In order for the validation to work, 
-      you must install relevant execution environment descriptions from an update site.
-      <p><img src="images/ee-validation-pref.png" alt="API Errors/Warnings preference page"></p>
-      <p>The <strong>API Use</strong> tab of the <strong>API Errors/Warnings</strong> preference page displays installed execution environments. 
-        Use the "install them now" hyperlink to install additional environments 
-        via the software updates dialog.</p>
-      <p><img src="images/ee-validation.png" alt="Illegal access warning"></p></td>
-  </tr>
-  <tr id="api.stale.filters">
-    <td valign="top" align="left"><b>Stale  problem filters </b></td>
-    <td valign="top"><p>API tooling creates warnings for problem filters that are no longer needed. API problem filters often become stale because they are used to filter known incompatibilities between two specific releases. A quick fix is available to remove stale filters. </p>
-        <p><img src="images/filter-quick-fix.png" alt="Quick fix to remove stale filters"></p></td>
-  </tr>
-  <tr id="api.ant.tasks">
-    <td valign="top" align="left"><b>Ant tasks </b></td>
-    <td valign="top"><p>Ant tasks to perform API analysis and generate simple HTML reports are now available. These are the same Ant tasks used in the Eclipse SDK build. Documentation for each task is available in the <strong>Reference</strong> section of the <strong>Plug-in Development Environment Guide</strong>.</p>        </td>
-  </tr>
-  <tr id="pde.api.compare">
-    <td valign="top" align="left"><b>Compare APIs</b></td>
-    <td valign="top"><p>You can now view API changes relative to an API baseline. Select a project or 
-      package in the Package Explorer and choose <strong>Compare With > API Baseline</strong>. 
-      Specify the API baseline you wish to compare against and press <strong>OK</strong>. 
-      The API Tooling view will summarize the API changes.
-      </p>
-          <p><img src="images/apichanges.png" alt="API Tooling view"></p></td>
-  </tr>
-  <colgroup>
-  <col width="30%">
-  <col width="70%">
-  </colgroup>
-  <tbody>
-  <tr>
-    <td colspan="2"><h2><a name="Build">Build </a></h2></td>
-  </tr>
+	<tr>
+		<td colspan="2">
+		<h2><a name="ViewsAndEditors">Views and Editors </a></h2>
+		</td>
+	</tr>
+	
+	<tr id="osgiconsole">
+		<td align="left" valign="top" width="30%"><b>OSGi console </b></td>
+		<td valign="top" width="70%">An OSGi console is now available to
+		interact with the running framework. Use the <b>Open Console</b> drop
+		down action in the <b>Console View</b> to open a <b>Host OSGi Console</b>.
+		<p><img alt="Open an OSGi console to interact with the running framework" title="Open Host OSGi Console"
+			src="images/console-menu.png" /><br />
+		<br />
+		</p>
+		<p>You can then enter OSGi commands into the console to interact
+		directly with the framework running the IDE.</p>
+		</td>
+	</tr>
+
+	<tr id="pde-xml-errors">
+		<td width="30%" valign="top" align="left"><b>XML error
+		reporting in context help and table of contents editors</b></td>
+		<td width="70%" valign="top">The context help editor and table of
+		contents editor now report XML errors.
+		<p><img src="images/xml-errors.png" alt="TOC Editor" /></p>
+		</td>
+	</tr>
+
+	<tr id="toc.spell.check">
+		<td width="30%" valign="top" align="left"><b>Spell checking 
+		in context help and table of contents editors</b></td>
+		<td width="70%" valign="top">
+		<p>Spell checking is now available in the <strong>Table
+		of Contents</strong> (TOC) and <strong> Context Help</strong> editors.</p>
+		<p><img src="images/spell-check.png"
+			alt="Incorrectly spelled works are underlined in red" /></p>
+		</td>
+	</tr>
+
+	<tr id="buildseverities">
+		<td align="left" valign="top" width="30%"><b>Configurable
+		problem severities for build.properties </b></td>
+		<td valign="top" width="70%">Severities for problems in
+		build.properties can now be configured individually via the <b>Preferences
+		> Plug-in Development > Compilers</b> preference page. Problem
+		severities can also be configured at the project level via a project's
+		<b>Properties > Plug-in Development > Plug-in Manifest
+		Compiler</b> property page.
+		<p><img alt="Severity Settings" title="Severity Settings"
+			src="images/build-severities.png" /><br />
+		<br />
+		</p>
+		</td>
+	</tr>
+	
+	<tr id="searchrepos">
+		<td align="left" valign="top" width="30%"><b>Search
+		repositories quickfix</b></td>
+		<td valign="top" width="70%">A new quickfix allows you to
+		conveniently search a set of repositories for a missing imported
+		package and have a bundle supplying the package added to your target
+		platform.
+		<p><img alt="Search Repositories Quickfix"
+			title="Search Repositories Quickfix" src="images/hover-quick-fix.png" /><br />
+		<br />
+		</p>
+		</td>
+	</tr>
+	
+	<tr id="pdecreateapi">
+		<td align="left" valign="top" width="30%"><b>API for plug-in
+		project creation</b></td>
+		<td valign="top" width="70%">An API is now available to create
+		and modify plug-in (bundle) projects. The API provides a description
+		of a project's bundle related attributes and allows them to be
+		modified declaratively. For example, a bundle's activator, required
+		bundles, package exports and imports can be queried and defined. As
+		well, the root of bundle (i.e. the folder containing <code>META-INF/MANIFEST.MF</code>)
+		can be placed anywhere inside a project (rather than just the root
+		project folder). The new API is available in the <code>org.eclipse.pde.core.project</code>
+		package of the <code>org.eclipse.pde.core</code> bundle.</td>
+	</tr>
+
+	<tr>
+		<td colspan="2">
+		<h2><a name="Launching">Launching</a></h2>
+		</td>
+	</tr>
+
+	<tr id="featurelaunch">
+		<td align="left" valign="top" width="30%"><b>Feature based
+		launch </b></td>
+		<td valign="top" width="70%">You can now manage the set of
+		plug-ins launched in Eclipse Applications, JUnit
+		Plug-in Tests, and OSGi Framework launch configurations
+		by selecting a set of features.
+		<p><img alt="Feature Based Launching"
+			title="Feature Based Launching" src="images/feature-launch.png" />
+		</p>
+		<p>
+		Features from both the workspace and the target can be 
+		included.  Individual plug-ins can be added to the launch
+		to include plug-ins that are not part of a feature.  PDE
+		will launch all the selected plug-ins as well as all required
+		plug-ins.
+		</p>
+		<p><img alt="Add individual plug-ins to a feature based launch"
+			title="Add Individual Plug-ins" src="images/add-plugins.png" />
+		</p>
+		<p>Features in the workspace are used over external features,
+		however, this can be configured by un-checking '<b>Use features
+		from workspace if available</b>'. Bundles in the workspace are used over
+		external bundles in the target platform. However, this can be
+		configured by modifying the configuration's default bundle resolution
+		policy, or can be configured per feature using the cell editors in the
+		'<b>Plug-in Location</b>' column.</p>
+		</td>
+	</tr>
+
+	<tr id="headless-pde">
+		<td width="30%" valign="top" align="left"><b>Headless
+		launching support</b></td>
+		<td width="70%" valign="top">Launching support for Eclipse
+		Applications, JUnit Plug-in Tests, and OSGi Frameworks is provided by
+		a new headless plug-in (<code>org.eclipse.pde.launching</code>). This
+		allows applications without a user interface to leverage the launch
+		support programmatically.</td>
+	</tr>
+
+	<tr>
+		<td width="30%" valign="top" align="left"><a name="consolelog"
+			id="consolelog"></a><b>Console log</b></td>
+		<td width="70%" valign="top">By <a
+			href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284704">popular
+		demand</a>, <code>-consoleLog</code> is added to new launch configuration
+		program arguments by default.
+		<p><img src="images/consolelog.png"
+			alt="Default program arguments" /></p>
+		</td>
+	</tr>
+
+	<tr id="generate-profile">
+		<td width="30%" valign="top" align="left"><b>Support software
+		installation while running and debugging</b></td>
+		<td width="70%" valign="top">Launched Eclipse Applications can
+		now support software installation operations. When the new option is
+		checked (on the <b>Configuration</b> tab of Eclipse Applications), a
+		p2 profile is generated when running or debugging. The profile
+		initially contains all bundles in the target and can be modified by
+		software installation operations. The profile is regenerated on each
+		subsequent run or debug session, but is maintained across restart
+		operations.
+		<p><img src="images/soft-install.png"
+			alt="Configuration tab of Eclipse Application" /></p>
+		</td>
+	</tr>
+
+	<tr>
+		<td colspan="2">
+		<h2><a name="Export">Import and Export </a></h2>
+		</td>
+	</tr>
+
+	<tr id="importcvs">
+		<td align="left" valign="top" width="30%"><b>Import from CVS
+		</b></td>
+		<td valign="top" width="70%">The <b>Plug-in Import</b> wizard
+		allows you to import projects from CVS corresponding to bundles in the
+		target platform. This feature is available for bundles that define the
+		<b>Eclipse-SourceReferences</b> header. On the first page of the
+		import wizard select the <b>Import As > Projects from a repository</b>
+		option.
+		<p><img alt="Import from a repository"
+			title="Import From Repository" src="images/from-repo.png" />
+		</p>
+		<p>The second page allows you to choose from all bundles with
+		source repository information. Select the bundles you want to import
+		and press <b>Next</b>.</p>
+		<p><img alt="Select bundles to import"
+			title="Select Bundles to Import" src="images/avail.png" />
+		</p>
+		<p>The last page of the wizard allows you to import the specific
+		versions of the bundles used in the target platform or from HEAD.
+		Pressing <b>Finish</b> will import the projects into your workspace.</p>
+		<p><img alt="Select Version" title="Select Version"
+			src="images/head-version.png" />
+		</p>
+		<p>You can also import projects from the <b>Plug-ins</b> view. Use the <b>Import As > Project from a Repository...</b> action
+		to import plug-ins from CVS. 
+		</p>
+		<p><img alt="Import plug-in projects from CVS" title="Import plug-in projects from CVS"
+			src="../guide/images/tasks/import-from-plugins-view.png" />
+		</p>
+		</td>
+	</tr>
+
+	<tr id="exporttarget">
+		<td align="left" valign="top" width="30%"><b>Export target
+		content </b></td>
+		<td valign="top" width="70%">It's now possible to export the
+		contents of your current target platform into a destination directory
+		via the export active target definition wizard. In the list of export
+		wizards (<b>File -> Export...</b>), you'll find the wizard available
+		under <b>Plug-in Development -> Target definition</b>.
+		<p><img alt="Export Active Target Wizard"
+			title="Export Active Target Wizard" src="images/export-target.png" /><br />
+		<br />
+		</p>
+		<p>Note: This will copy all features and plug-ins that are part of
+		your currently set target platform to the destination directory.</p>
+		</td>
+	</tr>
+	
+	<tr>
+		<td colspan="2">
+		<h2><a name="TargetPlatform">Target Platform</a></h2>
+		</td>
+	</tr>
+
+	<tr id="featuretarget">
+		<td align="left" valign="top" width="30%"><b>Feature based
+		target </b></td>
+		<td valign="top" width="70%">You can now manage the set of
+		bundles in a target platform by selecting a set of features.
+		Additionally, you can select from bundles that are not contained in
+		any feature. On a target definition's <b>Content</b> tab select the <b>Manage
+		using Features</b> radio button. This provides coarse grained management
+		of bundles in a target. When a feature is selected, all bundles in
+		that feature are added to the target.
+		<p><img alt="Target Based Features" title="Target Based Features"
+			src="images/target-features.png" /><br />
+		<br />
+		</p>
+		</td>
+	</tr>
+
+	<tr id="pdetargetdialog">
+		<td align="left" valign="top" width="30%"><b>Add to target
+		platform dialog</b></td>
+		<td valign="top" width="70%">The <b>Add Artifact to Target
+		Platform</b> dialog (Ctrl+Shift+Alt+A) allows you to quickly search a set
+		of repositories for dependencies (bundle, feature or package) to add
+		to your current target platform.
+		<p><img alt="Add Artifact to Target Platform Dialog"
+			title="Add Artifact to Target Platform Dialog"
+			src="images/add-to-target.png" /><br />
+		<br />
+		</p>
+		</td>
+	</tr>
+	
+	<tr id="synch-java-search">
+		<td width="30%" valign="top" align="left"><b>Synchronize Java
+		search with target platform</b></td>
+		<td width="70%" valign="top">You can automatically synchronize
+		Java search operations with the target platform via the <b>Preferences
+		> Plug-in Development</b> preference page.
+		<p><img src="images/target-search.png"
+			alt="Preferences > Plug-in Development" /></p>
+		<p>Java search operations are scoped to workspace projects and
+		their dependencies. Developers don't typically have the entire target
+		platform in their workspace and thus Java search operations don't
+		locate references from many upstream plug-ins. You can manually add
+		plug-ins to the Java search path using the <b>Add All Plug-ins to
+		Java Search</b> action in the Plug-ins view. However, the new preference
+		automatically keeps the search path in synch with the target platform.</p>
+		<p>Under the covers a project named <i>External Plug-in
+		Libraries</i> is created with all external plug-ins in the target platform
+		on its build path.</p>
+		</td>
+	</tr>
 
-  <tr id="flattenDependencies">
-    <td width="30%" valign="top" align="left"><b>Sort plug-ins across feature boundaries</b></td>
-    <td width="70%" valign="top"><p>PDE/Build determines <a href="../tasks/pde_compilation_order.htm">compilation order</a> by sorting 
-    	plug-ins according to their dependencies. Previously, this sorting was only done within 
-    	a single feature and features were compiled depth first in the order they were included.</p>
-        Set the property:
-        <div align="center"><pre>flattenDependencies=true</pre></div>
-        in your build's configuration, and PDE/Build will instead sort plug-ins across feature boundaries.  
-        This allows you to structure your features according to the best logical groupings 
-        without restrictions imposed by compilation requirements. 	</td>
-  </tr>
+	<tr>
+		<td colspan="2">
+		<h2><a name="APITooling">API Tooling </a></h2>
+		</td>
+	</tr>
 
-  <tr id="parallelCompilation">
-    <td width="30%" valign="top" align="left"><b>Parallel compilation</b></td>
-    <td width="70%" valign="top"><p>If plug-ins are sorted across feature boundaries (see above), 
-    PDE/Build can also group plug-ins allowing for parallel compilation.</p>
-    Set the property:
-    <div align="center"><pre>parallelCompilation=true</pre></div>
-    in your build's configuration, and PDE/Build will group plug-ins for parallel compilation 
-    using Ant's <tt><parallel></tt> task.  Setting the properties <tt>parallelThreadCount</tt> 
-    and <tt>parallelThreadsPerProcessor</tt> will control the corresponding attributes on the parallel task.    </td>
-  </tr>
-  <tr id="publish_p2">
-    <td valign="top" align="left"><b>Build integration with p2</b></td>
-    <td valign="top">PDE/Build has updated <a href="../tasks/pde_p2_builds.htm">integration with p2</a>.  It is now
-      able to publish metadata directly from your source instead of generating it based 
-      on binary jars.  For an existing feature or product build, set the property:
-      <pre>
-           p2.gathering = true
-     </pre>
-        <p>Setting this property will use the p2 publisher to gather up your bundle and publish it into a 
-          build specific repository.</p>
-      <p>For product builds, this will automatically perform a director install to create the final product archives.  
-        If you also set the <tt>p2.metadata.repo</tt> and <tt>p2.artifact.repo</tt> properties then build will mirror the 
-        resulting product metadata into those repositories.</p>
-      <p>For Feature builds, this will create a p2 repository for the final archive.  This also has the effect of setting <tt>groupConfigurations=true</tt> and <tt>outputUpdateJars=true</tt>.</p></td>
-  </tr>
-  <tr id="rootfile_artifacts">
-    <td valign="top" align="left"><b>Feature rootfile artifacts</b></td>
-    <td valign="top">When publishing metadata directly from source using the <tt>p2.gathering=true</tt> property, 
-      root files contributed by features will be published into the artifact repository and <a href="../tasks/pde_p2_featuremetadata.htm">associated metadata</a> will be created.
-      The result is that installing your feature will also cause the feature's root files to be installed.</td>
-  </tr>
-  <tr id="product_qualifiers">
-    <td valign="top" align="left"><b>Qualifier replacement on .product files</b></td>
-    <td valign="top"><p>When building products using <a href="../tasks/pde_p2_productbuilds.htm"><tt>p2.gathering=true</tt></a>, PDE/Build will now replace the ".qualifier" on the version specified in a .product file used
-      in a product build.  Set the property <b><tt>p2.product.qualifier</tt></b> to be the qualifier you wish to use.
-      </p>
-        <p>If no value is specified, the default will be either the value of <tt>forceContextQualifier</tt> or the default timestamp.</p>    </td>
-  </tr>
+	<tr id="pde-api-deprecation">
+		<td width="30%" valign="top" align="left"><b>Compare with
+		baseline now reports deprecations</b></td>
+		<td width="70%" valign="top">When performing <b>Compare With
+		> API Baseline...</b>, deprecation changes are now reported. This
+		allows you to quickly identify what has been deprecated between two
+		releases of a project.
+		<p><img src="images/api-deprecation.png" alt="TOC Editor" /></p>
+		</td>
+	</tr>
 
-  <tr id="pde-build-fetch">
-    <td width="30%" valign="top" align="left"><b>Fetch artifacts for your build using p2</b></td>
-    <td width="70%" valign="top">
-      A new extension has been added to PDE/Build that enables users to <a href="../tasks/pde_fetch_phase.htm#p2_fetch">fetch
-    	artifacts</a> from p2 repositories. You can now add an entry to your map
-    	file for build input and PDE/Build will retrieve the artifact and include it in the build.
-    	<p>
-    	The map file entry needs to include the id and version of the installable unit (IU), and
-    	the URI of the repository where the IU can be found. The metadata and 
-    	artifact repositories are assumed to be co-located. An example (needs to be on one line) is:</p>
-    	<p>
-    	<code>
-    		plugin at my.bundle.id,1.0.0=p2IU,id=my.bundle.id,version=
-    		   1.0.0,repository=http://example.com/repo</code></p></td>
-  </tr>
+	<tr id="api.use.scans">
+		<td width="30%" valign="top" align="left"><b>API use reports
+		</b></td>
+		<td width="70%" valign="top">
+		<p>You can generate reports describing what API and internals are
+		being used by other bundles. API use reports have been integrated as
+		an external tool (<strong>Run > External Tools >
+		External Tool Configurations...</strong>). For example, the following report
+		settings are used to generate a report revealing which internal
+		components of the debug platform are being consumed by JDT.</p>
+		<p><img src="images/api-scan.png" alt="API use report settings" />
+		</p>
+		<p>A report is run against a set of bundles which can be specified
+		as an API baseline, a target definition or a directory of bundles. You
+		can search for API and/or internal references and you can limit the
+		report to specific bundles by using regular expressions. You must
+		specify an output location (directory) for the report and whether to
+		generate HTML.</p>
+		<p>Package exports in bundle manifests are used to determine
+		package visibility. Any package exports with an <em>x-internal</em> or
+		<em>x-friends</em> modifier will be considered internal. All other
+		packages are considered API. The <strong>Patterns</strong> tab can be
+		used to augment package visibility information by specifying regular
+		expressions to identify packages, and whether those packages should be
+		considered API or internal. For example, since TPTP specifies all
+		packages as API, the following patterns could be used to identify its
+		internal packages.</p>
+		<p><img src="images/patterns.png"
+			alt="Specify package visibility using the patterns tab" /></p>
+		</td>
+	</tr>
 
-  <tr id="repo2runnable">
-    <td width="30%" valign="top" align="left"><b>p2 repositories as a target for PDE Build</b></td>
-    <td width="70%" valign="top"><p>
-    	You can now specify a location that contains <a href="../tasks/pde_p2_reusingmetadata.htm">local p2 repositories</a> in nested folders or zip files.
-    	The build will automatically transform the repositories into a form that PDE/Build can 
-    	compile against.</p>
-    	<p>
-    	There is a new <tt>processRepos</tt> phase in the main build script with corresponding
-    	<tt>pre</tt> and <tt>post</tt> targets in the <tt>customTargets.xml</tt> file.</p>
-    	<p>
-    	You must set these properties in the <tt>build.properties</tt> for your builder. The
-    	<tt>repoBaseLocation</tt> is the location of the folder containing the local p2 
-    	repositories. The <tt>transformedRepoLocation</tt> is the location where the transformed
-    	artifacts will be placed after being processed.</p>
-    	<p>
-    	<code>
-    	repoBaseLocation=${base}/repos<br>
-		transformedRepoLocation=${base}/transformedRepos		</code>		</p>	</td>
-	</tr>
-  <tr>
-    <td colspan="2"><h2><a name="TargetPlatform">Target Platform </a></h2></td>
-  </tr>
+	<tr id="apireports">
+		<td align="left" valign="top" width="30%"><b>Customize API
+		use scan reports </b></td>
+		<td valign="top" width="70%">A new wizard helps you customize API
+		use reports. From the <b>Patterns</b> tab of an <b>API Use Report</b>
+		launch configuration (available via External Tools), press the <b>Add</b>
+		button to open the wizard and create custom pattern filters.
+		<p><img alt="API Pattern Wizard" title="API Pattern Wizard"
+			src="images/api-filters.png" />
+		</p>
+		<p>An <b>Archive Pattern</b> allows specific jars within bundles
+		to be omitted from the scan. A <b>Package Pattern</b> allows you to
+		specify which packages should be considered API or non-API (override
+		visibility definitions in bundle manifests). A <b>Report
+		Conversion Pattern</b> allows specific references to be filtered from the
+		final report. You can filter references from or to locations based on
+		regular expressions.</p>
+		</td>
+	</tr>
 
-  <tr id="pde.target.platform">
-    <td width="30%" valign="top" align="left"><strong>Target platform and target definitions </strong></td>
-    <td width="70%" valign="top"><p>The target platform preference page (<strong>Preferences
-     > Plug-in Development > Target Platform</strong>) has been redesigned. The page allows the user to select the active target platform from all target 
-     definitions in the workspace. 
-     Target definitions can be created and edited from this page using a wizard or with the target definition editor. You can quickly switch 
-     between targets using the checkboxes. Targets can be composed of plug-ins originating from installations, directories, features, and software sites. See <a href="../concepts/target.htm">target definition concepts</a> for more details on crafting targets. </p>
-      <p><img src="images/target-platform.png" alt="Target platform preference page"></p></td>
-  </tr>
-  <tr id="targetEditor">
-    <td valign="top" align="left"><b>Target editor enhancements</b></td>
-    <td valign="top">The target editor has been enhanced to support new features 
-      in target definitions. Targets now support installation-based locations in addition to 
-      directories and features. As well, the editor support retrieval of plug-ins from update 
-      sites. The wizards used to add content to a target definition are the same as 
-      described in the new target platform preference page (above).
-      <p><img src="images/target-editor.png" alt="Target Definition Editor"></p>
-      <p>To support new features, the underlying target file format has been enhanced. 
-        The new editor continues to read old target files, but only writes files in the new format.</p></td>
-  </tr>
+	<tr id="build-properties">
+		<td width="30%" valign="top" align="left"><b>Enhanced
+		build.properties validation</b></td>
+		<td width="70%" valign="top">Redundant entries in source builds
+		are now flagged with a warning by default.
+		<p><img src="images/src-builds.png" alt="Source folder validation" /></p>
+		</td>
+	</tr>
+
+	<tr>
+		<td width="30%" valign="top" align="left"><a
+			name="usescanpatterntab" id="usescanpatterntab"></a><b>API use
+		report filters</b></td>
+		<td width="70%" valign="top">You can now add filter patterns to
+		API use reports to constrain what references are reported. This
+		feature is available in UI and in API tooling Ant tasks. When you
+		press <b>Add</b> on the <b>Patterns</b> tab a wizard allows you to
+		craft a variety of patterns. An archive pattern is used to skip
+		specific jars. A package pattern is used to define a package as API or
+		internal (to override a bundle manifest). A report conversion pattern
+		is used to skip specific references during report creation (by
+		specifying a regular expression of reference origins to skip).
+		<p><img src="images/pattern-wizard.png"
+			alt="Create new patterns using the convenient wizard" /></p>
+		<p>For example, to use an archive pattern to filter references
+		from specific archives within bundles, select <b>Archive Pattern</b>
+		and press <b>Next</b>. The wizard allows you to easily craft an
+		archive pattern.</p>
+		<p><img src="images/archive-wizard.png"
+			alt="Create a new archive pattern using the convenient wizard" /></p>
+		<p>When you press <b>Finish</b> the pattern appears in the <b>Patterns</b>
+		table.</p>
+		<p><img src="images/archive.png" alt="Archive pattern" /></p>
+		</td>
+	</tr>
 
-  <tr id="pde.target.state">
-    <td width="30%" valign="top" align="left"><b>Target platform state</b></td>
-    <td width="70%" valign="top"><p>The new <strong>Target Platform State</strong> 
-    view displays all the bundles used to build, run and debug plug-ins with. The state is 
-    built from the active target definition.</p>
-    <p><img src="images/targetstateview.png" alt="Target Platform State view" ></p></td>
-  </tr>
-  </tbody>
+	<tr>
+		<td width="30%" valign="top" align="left"><a name="meta-data"
+			id="meta-data"></a><b>API use report details</b></td>
+		<td width="70%" valign="top">You can now provide comments to
+		accompany an API use report, which will show up in the reports as
+		additional information along with the scan parameters for reference.
+		This feature is available in the UI and in API tooling Ant tasks.
+		<p><img src="images/description.png" alt="Scan description" /></p>
+		<p>The resulting report could look like the following.</p>
+		<p><img src="images/scandetails.png"
+			alt="Sample use scan details report header." /></p>
+		</td>
+	</tr>
+
+	<tr>
+		<td colspan="2">
+		<h2><a name="Build">Build </a></h2>
+		</td>
+	</tr>
+
+	<tr id="error-options">
+		<td width="30%" valign="top" align="left"><b>Enhanced
+		compiler error options for PDE build</b></td>
+		<td width="70%" valign="top">PDE/Build can now take advantage of
+		new support from the JDT compiler to specify that certain warnings
+		should instead be reported as errors.
+		<p>Set the property <tt>javacErrors.<library></tt> in your
+		build.properties. Similar to the <tt>javacWarnings.<library></tt>
+		property, specify the <a
+			href="../../org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">warnings</a>
+		that should be reported as errors:</p>
+		<pre>
+    	javacErrors.. = forbidden,discouraged,
+    	javacErrors.library.jar = deprecation,nullDereference
+    	</pre></td>
+	</tr>
+
+	<tr>
+		<td width="30%" valign="top" align="left"><a
+			name="buildproperties" id="buildproperties"></a><b>Synchronize
+		project settings with PDE build</b></td>
+		<td width="70%" valign="top">To ensure PDE will export and build
+		your project with the same settings as in the workspace there are new
+		checks to synchronize project specific compiler and build path
+		settings with <code>build.properties</code>. The following validations
+		are performed and quick fixes are provided for any problems.
+		<ul>
+			<li>Compiler compliance, source and target levels match <code>jre.compliance.profile</code>,
+			<code>javacSource</code>, and <code>javacTarget</code> properties
+			(only required when compiler settings do not match default settings
+			for a bundle's required execution environment).</li>
+			<li>Folders in <code>source.<library></code> exist, are
+			source folders on the Java build path, and are not duplicated.</li>
+			<li>Folders in <code>output.<library></code> exist, are
+			output folders or class file folders on the Java build path, and are
+			not duplicated.</li>
+			<li>Each <code>output.<library></code> entry contains all
+			output locations of its corresponding source folders on the Java
+			build path.</li>
+			<li>Source folders targeted to different libraries do not share
+			the same output location.</li>
+			<li>Source folders are not included in <code>src.includes</code>
+			entries (they are included by default).</li>
+			<li>Additionally, a check can be performed to ensure an <code>output.<library></code>
+			exists for each <code>source.<library></code> entry. By
+			default, this problem is ignored but can be turned on via <b>Preferences
+			> Plug-in Development > Compilers</b> (or project specific <b>Properties
+			> Plug-in Development > Plug-in Manifest Compiler</b>). This option
+			is useful when using the PDE option to export existing class files
+			from the workspace.</li>
+		</ul>
+		<p><img src="images/buildproperties.png"
+			alt="Build.properties validation" /></p>
+		</td>
+	</tr>
+
+	<tr id="pdebuildsynch">
+		<td align="left" valign="top" width="30%"><b>Synchronize
+		project settings with PDE build</b></td>
+		<td valign="top" width="70%">It's easier to synchronize your
+		project specific compiler settings and file encoding settings with PDE
+		build. Two new options appear in the <b>Build</b> section of the <b>Preferences
+		> Plug-in Development > Compilers </b> preference page. By default the new
+		options are set to <b>Ignore</b>.
+		<p><img alt="Build validation settings"
+			title="Build Validation Settings" src="images/synch-settings.png" />
+		</p>
+		<p>When set to <b>Warning</b> or <b>Error</b> problem markers will
+		appear when your project settings are not reflected in <code>build.properties</code>.
+		Quick fixes are available to help you synchronize the settings.</p>
+		<p><img alt="Warnings" title="Build Validation Warnings"
+			src="images/synch-warnings.png" />
+		</p>
+		<p>A new <code>javacProjectSettings</code> property is supported
+		in <code>build.properties</code>. The value can be a project relative
+		path to a preference settings file of compiler options supported by
+		the JDT compiler, or it can simply by <code>true</code> to indicate
+		the default preference file should be used (<code>.settings/org.eclipse.jdt.core.prefs</code>).
+		</p>
+		</td>
+	</tr>
+	
+	<tr id="bundleCompilerArgs">
+		<td align="left" valign="top" width="30%"><b>Plug-in specific
+		compiler arguments</b></td>
+		<td valign="top" width="70%">A bundle can now specify custom
+		compiler arguments to be used in export or releng builds by setting <b><tt>compilerArgs</tt></b>
+		in its build.properties file..
+		<p>These arguments will be specified in addition to whatever
+		general compiler arguments are specified by the releng setup.</p>
+		</td>
+	</tr>
+	
+	<tr id="customCompilerAdapter">
+		<td align="left" valign="top" width="30%"><b>Custom compiler
+		adapters</b></td>
+		<td valign="top" width="70%">A bundle can now specify a custom
+		ant compiler adapter to be used during export or releng builds. This
+		allows for compiling non-java sources such as AspectJ or Groovy
+		provided a suitable adapter is available.
+		<p>Set <b><tt>compilerAdapter</tt></b> in the bundle's
+		build.properties file. As well, set <b><tt>sourceFileExtensions</tt></b>
+		to a list of file extensions which should be treated as source and
+		automatically copied to generated source bundles.</p>
+		</td>
+	</tr>
+
+	<tr id="pdeerrors">
+		<td align="left" valign="top" width="30%"><b>Improved error
+		reporting from PDE build</b></td>
+		<td valign="top" width="70%">A new <code>prereqErrors.log</code>
+		file is generated by PDE build. The file helps locate bundles lowest
+		on the stack with compilation errors. An entry is added for each
+		bundle with build errors describing any prerequisite bundles that
+		contained compile errors. Entries are added in the order bundles are
+		compiled. For example:
+		<p><code> org.eclipse.debug.ui_3.6.0.201004141459: the
+		following prerequisites contain compile errors<br />
+		    org.eclipse.debug.core_3.6.0.201004141459 </code></p>
+		</td>
+	</tr>
 </table>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ds.core/META-INF/MANIFEST.MF
index 0c258e6..a49bce4 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ds.core;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ds.core.Activator
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.core.filebuffers;bundle-version="[3.3.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/build.properties b/eclipse/plugins/org.eclipse.pde.ds.core/build.properties
index 0650559..a03857d 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/build.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
 source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/plugin.properties b/eclipse/plugins/org.eclipse.pde.ds.core/plugin.properties
index f4d05bd..2859591 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/plugin.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
 #Properties file for org.eclipse.pde.ds.core
 pluginName = PDE DS Core
 providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/plugin.xml b/eclipse/plugins/org.eclipse.pde.ds.core/plugin.xml
index 3abcd29..50acf01 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
+<!--
+    Copyright (c) 2008, 2009 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
    <extension
          point="org.eclipse.core.contenttype.contentTypes">
@@ -13,7 +24,7 @@
                class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
             <parameter
                   name="element"
-                  value="component">
+                  value="{http://www.osgi.org/xmlns/scr/v1.1.0}component">
             </parameter>
          </describer>
       </content-type>
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/builders/XMLErrorReporter.java b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/builders/XMLErrorReporter.java
index 877fbf5..268fa3e 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/builders/XMLErrorReporter.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/builders/XMLErrorReporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/messages.properties b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/messages.properties
index 371ff68..b00613d 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 IBM Corporation and others.
+# Copyright (c) 2008, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSObject.java b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSObject.java
index 19beb75..c74ce57 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSObject.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.core/src/org/eclipse/pde/internal/ds/core/text/DSObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
index 1739b2a..eb6f21d 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ds.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ds.ui.Activator
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/build.properties b/eclipse/plugins/org.eclipse.pde.ds.ui/build.properties
index 4d648cc..b47c14e 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/build.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
 source.. = src/
 output.. = bin/
 bin.includes = META-INF/,\
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.properties b/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.properties
index 1384f92..db1c02f 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.properties
@@ -1,3 +1,13 @@
+###############################################################################
+# Copyright (c) 2008, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
 #Properties file for org.eclipse.pde.ds.ui
 pluginName = PDE DS UI
 providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.xml b/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.xml
index 3b48c95..45a4c3b 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/plugin.xml
@@ -1,5 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
+<!--
+    Copyright (c) 2008 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
 <plugin>
    <extension
          point="org.eclipse.ui.editors">
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSSourceViewerConfiguration.java b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSSourceViewerConfiguration.java
index ec08718..2ff04e8 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSSourceViewerConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/DSSourceViewerConfiguration.java
@@ -49,6 +49,7 @@ public class DSSourceViewerConfiguration extends XMLConfiguration {
 					.setInformationControlCreator(getInformationControlCreator(true));
 			fContentAssistant.setShowEmptyList(false);
 			fContentAssistant.addCompletionListener(fContentAssistProcessor);
+			fContentAssistant.enableAutoInsert(true);
 		}
 		return fContentAssistant;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/contentassist/TypeCompletionProposal.java b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/contentassist/TypeCompletionProposal.java
index e5ae0b7..e8231bd 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/contentassist/TypeCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/editor/contentassist/TypeCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2010 Code 9 Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ package org.eclipse.pde.internal.ds.ui.editor.contentassist;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.internal.text.html.BrowserInformationControl;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.text.AbstractReusableInformationControlCreator;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
@@ -23,12 +25,9 @@ import org.eclipse.jface.text.contentassist.ICompletionProposal;
 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3;
 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5;
 import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.pde.internal.ui.editor.contentassist.display.BrowserInformationControl;
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.editors.text.EditorsUI;
 
 public class TypeCompletionProposal implements ICompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension5 {
 
@@ -135,9 +134,8 @@ public class TypeCompletionProposal implements ICompletionProposal, ICompletionP
 				 * @see org.eclipse.jdt.internal.ui.text.java.hover.AbstractReusableInformationControlCreator#doCreateInformationControl(org.eclipse.swt.widgets.Shell)
 				 */
 				public IInformationControl doCreateInformationControl(Shell parent) {
-					return new BrowserInformationControl(parent, SWT.NO_TRIM
-							| SWT.TOOL, SWT.NONE, EditorsUI
-							.getTooltipAffordanceString());
+					return new BrowserInformationControl(parent,
+							JFaceResources.DIALOG_FONT, false);
 				}
 			};
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSCreationOperation.java b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSCreationOperation.java
index 8eceea9..94394de 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSCreationOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSCreationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2010 Code 9 Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     Code 9 Corporation - initial API and implementation
  *     Chris Aniszczyk <caniszczyk at gmail.com>
  *     Rafael Oliveira Nobrega <rafael.oliveira at gmail.com> - bug 242028
+ *     IBM - ongoing maintenance
  *******************************************************************************/
 package org.eclipse.pde.internal.ds.ui.wizards;
 
@@ -28,10 +29,11 @@ import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.core.build.IBuildModel;
 import org.eclipse.pde.core.build.IBuildModelFactory;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.ibundle.IBundleModel;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ds.core.IDSComponent;
 import org.eclipse.pde.internal.ds.core.IDSDocumentFactory;
@@ -81,10 +83,12 @@ public class DSCreationOperation extends WorkspaceModifyOperation {
 		createContent();
 		monitor.worked(1);
 		openFile();
+		if (PDE.hasPluginNature(fFile.getProject())) {
 		writeManifest(fFile.getProject(), new SubProgressMonitor(
 				monitor, 1));
 		writeBuildProperties(fFile.getProject(), new SubProgressMonitor(
 				monitor, 1));
+		}
 		monitor.done();
 	}
 
@@ -107,13 +111,13 @@ public class DSCreationOperation extends WorkspaceModifyOperation {
 	private void writeBuildProperties(final IProject project,
 			SubProgressMonitor monitor) {
 
-		PDEModelUtility.modifyModel(new ModelModification(project
-				.getFile(PDEModelUtility.F_BUILD)) {
+		PDEModelUtility.modifyModel(new ModelModification(PDEProject
+				.getBuildProperties(project)) {
 			protected void modifyModel(IBaseModel model,
 					IProgressMonitor monitor) throws CoreException {
 				if (!(model instanceof IBuildModel))
 					return;
-				IFile file = project.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+				IFile file = PDEProject.getBuildProperties(project);
 				if (file.exists()) {
 					WorkspaceBuildModel wbm = new WorkspaceBuildModel(file);
 					wbm.load();
diff --git a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java
index 00c9cee..4afc1e3 100644
--- a/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/internal/ds/ui/wizards/DSFileWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2010 Code 9 Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     Code 9 Corporation - initial API and implementation
  *     Rafael Oliveira Nobrega <rafael.oliveira at gmail.com> - bug 242028
  *     Simon Archer <sarcher at us.ibm.com> - bug 248519
+ *     IBM - ongoing maintenance
  *******************************************************************************/
 package org.eclipse.pde.internal.ds.ui.wizards;
 
@@ -33,11 +34,11 @@ import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ds.ui.Activator;
 import org.eclipse.pde.internal.ds.ui.Messages;
 import org.eclipse.pde.internal.ds.ui.SWTUtil;
 import org.eclipse.pde.internal.ds.ui.SharedImages;
-import org.eclipse.pde.internal.ui.util.PDEModelUtility;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -127,7 +128,8 @@ public class DSFileWizardPage extends WizardNewFileCreationPage {
 		try {
 			if (project.hasNature(PDE.PLUGIN_NATURE)) {
 				WorkspaceBundlePluginModel model = new WorkspaceBundlePluginModel(
-						project.getFile(PDEModelUtility.F_MANIFEST_FP), null);
+						PDEProject.getManifest(project),
+						null);
 				model.load();
 				String header = model.getBundleModel().getBundle().getHeader(
 						Constants.BUNDLE_SYMBOLICNAME);
diff --git a/eclipse/plugins/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
index 4d5a3c0..1f259f0 100644
--- a/eclipse/plugins/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.junit.runtime/META-INF/MANIFEST.MF
@@ -2,11 +2,11 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.junit.runtime; singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.4.100.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.jdt.junit.runtime;bundle-version="[3.2.0,4.0.0)",
- org.junit;bundle-version="[3.8.1,3.9)",
+ org.junit;bundle-version="3.8.2",
  org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)";resolution:=optional
 Export-Package: org.eclipse.pde.internal.junit.runtime;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.properties b/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.properties
index 680b946..a2b6967 100644
--- a/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,5 +8,5 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-pluginName = PDE JUnit Plug-in Test
+pluginName = PDE JUnit Runtime Support
 providerName = Eclipse.org
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.xml b/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.xml
index fcabeac..02be040 100644
--- a/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.junit.runtime/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java b/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java
index 525203d..cc18d3c 100644
--- a/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java
+++ b/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/RemotePluginTestRunner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Ralf Ebert - Bug 307076 : JUnit Plug-in test runner exception "No Classloader found for plug-in ..." is confusing 
  *******************************************************************************/
 package org.eclipse.pde.internal.junit.runtime;
 
@@ -14,7 +15,6 @@ import java.io.IOException;
 import java.net.URL;
 import java.util.Enumeration;
 import java.util.Locale;
-
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jdt.internal.junit.runner.RemoteTestRunner;
 import org.osgi.framework.Bundle;
@@ -71,10 +71,11 @@ public class RemotePluginTestRunner extends RemoteTestRunner {
 		return getClassLoader(pluginId);
 	}
 
-	public ClassLoader getClassLoader(final String pluginId) {
-		Bundle bundle = Platform.getBundle(pluginId);
-		if (bundle == null)
-			throw new IllegalArgumentException("No Classloader found for plug-in " + pluginId); //$NON-NLS-1$
+	public ClassLoader getClassLoader(final String bundleId) {
+		Bundle bundle = Platform.getBundle(bundleId);
+		if (bundle == null) {
+			throw new IllegalArgumentException("Bundle \"" + bundleId + "\" not found. Possible causes include missing dependencies, too restrictive version ranges, or a non-matching required execution environment."); //$NON-NLS-1$ //$NON-NLS-2$
+		}
 		return new BundleClassLoader(bundle);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/UITestApplication.java b/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/UITestApplication.java
index cc19bc0..68eddfe 100644
--- a/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/UITestApplication.java
+++ b/eclipse/plugins/org.eclipse.pde.junit.runtime/src/org/eclipse/pde/internal/junit/runtime/UITestApplication.java
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Carsten Reckord <eclipse at reckord.de> - bug 288343
  *******************************************************************************/
 package org.eclipse.pde.internal.junit.runtime;
 
@@ -108,13 +109,16 @@ public class UITestApplication implements IApplication, ITestHarness {
 	 * @see org.eclipse.ui.testing.ITestHarness#runTests()
 	 */
 	public void runTests() {
-		fTestableObject.testingStarting();
-		fTestableObject.runTest(new Runnable() {
-			public void run() {
-				RemotePluginTestRunner.main(Platform.getCommandLineArgs());
-			}
-		});
-		fTestableObject.testingFinished();
+		try {
+			fTestableObject.testingStarting();
+			fTestableObject.runTest(new Runnable() {
+				public void run() {
+					RemotePluginTestRunner.main(Platform.getCommandLineArgs());
+				}
+			});
+		} finally {
+			fTestableObject.testingFinished();
+		}
 	}
 
 }
diff --git a/eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath b/eclipse/plugins/org.eclipse.pde.launching/.classpath
similarity index 100%
rename from eclipse/ecf-src/org.eclipse.ecf.provider.filetransfer.ssl/.classpath
rename to eclipse/plugins/org.eclipse.pde.launching/.classpath
diff --git a/eclipse/plugins/org.eclipse.pde.launching/.project b/eclipse/plugins/org.eclipse.pde.launching/.project
new file mode 100644
index 0000000..9ab68be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.pde.launching</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.core.resources.prefs b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.core.resources.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.core.resources.prefs
copy to eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.core.resources.prefs
diff --git a/eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.jdt.core.prefs
copy to eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.jdt.core.prefs
diff --git a/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.jdt.ui.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.jdt.ui.prefs
copy to eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.jdt.ui.prefs
diff --git a/eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.core.prefs b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.pde.core.prefs
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.core/.settings/org.eclipse.pde.core.prefs
copy to eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.pde.core.prefs
diff --git a/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..b0b6169
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,27 @@
+#Mon Dec 14 12:08:48 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.missing.output=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.pde.launching/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.launching/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..0ef0619
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/META-INF/MANIFEST.MF
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %name
+Bundle-SymbolicName: org.eclipse.pde.launching;singleton:=true
+Bundle-Version: 3.6.0.qualifier
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-Vendor: %provider-name
+Require-Bundle: org.eclipse.jdt.junit.core;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.pde.build;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.pde.core;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.jdt.debug;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)"
+Bundle-Activator: org.eclipse.pde.internal.launching.PDELaunchingPlugin
+Export-Package: org.eclipse.pde.internal.launching;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.launching.launcher;x-friends:="org.eclipse.pde.ui",
+ org.eclipse.pde.internal.launching.sourcelookup;x-internal:=true,
+ org.eclipse.pde.launching
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.equinox.p2.tools/about.html b/eclipse/plugins/org.eclipse.pde.launching/about.html
similarity index 100%
rename from eclipse/plugins/org.eclipse.equinox.p2.tools/about.html
rename to eclipse/plugins/org.eclipse.pde.launching/about.html
diff --git a/eclipse/plugins/org.eclipse.pde.launching/build.properties b/eclipse/plugins/org.eclipse.pde.launching/build.properties
new file mode 100644
index 0000000..e3c966a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/build.properties
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2003, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               about.html
+src.includes = schema/,\
+               about.html
diff --git a/eclipse/plugins/org.eclipse.pde.launching/plugin.properties b/eclipse/plugins/org.eclipse.pde.launching/plugin.properties
new file mode 100644
index 0000000..a08a588
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/plugin.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#	  Charlie Fats <charlie.fats at gmail.com> - bug 216303
+###############################################################################
+#
+# PDE plugin.xml resources
+#
+name = PDE Launching Support
+provider-name = Eclipse.org
+expoint.osgiLauncher.name = OSGi Launcher
+
+PDELaunchDelegate.name=Eclipse Application Launcher
+PDELaunchDelegate.description=The Eclipse Application launcher is used to run or debug a separate instance of an Eclipse application
+OSGiLaunchDelegate.name=OSGi Framework Launcher
+OSGiLaunchDelegate.description=The OSGi Framework launcher is used to launch an OSGi framework and run or debug OSGi bundles
+JUnitPluginLaunchDelegate.name= JUnit Plugin Test Launcher
+JUnitPluginLaunchDelegate.description=The JUnit Plugin Test launcher is used to run and debug test suites for plug-in projects
+
+Equinox.shortcut.label = Equinox
+launcher.junit.name = JUnit Plug-in Test
+
+launchConfigurationType.name = Eclipse Application
+launcher.framework.name = OSGi Framework
+
+pde.sourcelocator = PDE Source Lookup Director
diff --git a/eclipse/plugins/org.eclipse.pde.launching/plugin.xml b/eclipse/plugins/org.eclipse.pde.launching/plugin.xml
new file mode 100644
index 0000000..e426863
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/plugin.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?><!--
+    Copyright (c) 2005, 2009 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+   <extension-point id="org.eclipse.pde.ui.osgiFrameworks" name="%expoint.osgiLauncher.name" schema="schema/osgiFrameworks.exsd"/>
+
+    <extension point="org.eclipse.debug.core.sourceLocators">
+   		<sourceLocator
+   			id="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
+   			class="org.eclipse.pde.internal.launching.sourcelookup.PDESourceLookupDirector"
+   			name="%pde.sourcelocator">
+   		</sourceLocator>
+   </extension>
+   <extension
+         point="org.eclipse.debug.core.launchConfigurationTypes">
+      <launchConfigurationType
+            delegate="org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration"
+            delegateDescription="%PDELaunchDelegate.description"
+            delegateName="%PDELaunchDelegate.name"
+            id="org.eclipse.pde.ui.RuntimeWorkbench"
+            migrationDelegate="org.eclipse.pde.internal.launching.launcher.PDEMigrationDelegate"
+            modes="run, debug"
+            name="%launchConfigurationType.name"
+            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
+      </launchConfigurationType>
+      <launchConfigurationType
+            delegate="org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate"
+            delegateDescription="%JUnitPluginLaunchDelegate.description"
+            delegateName="%JUnitPluginLaunchDelegate.name"
+            id="org.eclipse.pde.ui.JunitLaunchConfig"
+            migrationDelegate="org.eclipse.pde.internal.launching.launcher.PDEMigrationDelegate"
+            modes="run, debug"
+            name="%launcher.junit.name"
+            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
+      </launchConfigurationType>
+      <launchConfigurationType
+            delegate="org.eclipse.pde.launching.OSGiLaunchConfigurationDelegate"
+            delegateDescription="%OSGiLaunchDelegate.description"
+            delegateName="%OSGiLaunchDelegate.name"
+            id="org.eclipse.pde.ui.EquinoxLauncher"
+            migrationDelegate="org.eclipse.pde.internal.launching.launcher.OSGiMigrationDelegate"
+            modes="run, debug"
+            name="%launcher.framework.name"
+            public="true"
+            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
+            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>
+   </extension>
+	<extension
+         point="org.eclipse.jdt.junit.junitLaunchConfigs">
+      <launchConfigType
+            configTypeID="org.eclipse.pde.ui.JunitLaunchConfig">
+      </launchConfigType>
+   </extension>
+    <extension
+         point="org.eclipse.pde.ui.osgiFrameworks">
+      <framework
+            launcherDelegate="org.eclipse.pde.launching.EquinoxLaunchConfiguration"
+            id="org.eclipse.pde.ui.EquinoxFramework"
+            name="%Equinox.shortcut.label" 
+            initializer="org.eclipse.pde.internal.launching.launcher.EquinoxInitializer"/>
+    </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer class="org.eclipse.pde.internal.launching.PreferenceInitializer"/>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.launching.classpathProviders">
+      <classpathProvider
+            class="org.eclipse.pde.launching.PDESourcePathProvider"
+            id="org.eclipse.pde.ui.workbenchClasspathProvider">
+      </classpathProvider>
+   </extension>
+    
+</plugin>
diff --git a/eclipse/plugins/org.eclipse.pde.launching/schema/osgiFrameworks.exsd b/eclipse/plugins/org.eclipse.pde.launching/schema/osgiFrameworks.exsd
new file mode 100644
index 0000000..3c18fb1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/schema/osgiFrameworks.exsd
@@ -0,0 +1,167 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.pde.ui" id="osgiFrameworks" name="OSGi Frameworks"/>
+      </appInfo>
+      <documentation>
+         <p>
+This extension point is used to register new OSGi frameworks. Each framework is associated with a launcher delegate that is called when the OSGi framework is selected in the <b>OSGi Framework</b> launch configuration.
+</p>
+<p>Registered OSGi frameworks appear on the <b>Plug-in Development > OSGi frameworks</b> preference page, where a default framework can be set.
+</p>
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="framework" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="framework">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a unique identifier of the framework
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string" use="required">
+            <annotation>
+               <documentation>
+                  human-readable name of the OSGi framework
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="launcherDelegate" type="string" use="required">
+            <annotation>
+               <documentation>
+                  a launch configuration delegate to launch the OSGi framework. The value of this attribute is the fully qualified name of the Java class that extends <code>org.eclipse.pde.launcher.AbstractPDELaunchConfiguration</code>.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.pde.launcher.AbstractPDELaunchConfiguration"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="initializer" type="string">
+            <annotation>
+               <documentation>
+                  initializes new OSGi Framework launch configurations with suitable defaults.  The value of this attribute must be a fully-qualified name of a Java class that extends the default implementation <code>org.eclipse.pde.launcher.OSGiLaunchConfigurationInitializer</code>.  If not specified, the default initializer <code>org.eclipse.pde.launcher.OSGiLaunchConfigurationInitializer</code> is instantiated.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.pde.launcher.OSGiLaunchConfigurationInitializer"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.3
+<p>
+This extension point was moved from <code>org.eclipse.pde.ui</code> to <code>org.eclipse.pde.launching</code> in 3.6. However, its qualified name and visibility remains the same.
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         <p>
+The following is an example of the extension point:
+<pre>
+   <extension
+         point="org.eclipse.pde.launching.osgiFrameworks">
+      <framework
+            launcherDelegate="org.eclipse.pde.launcher.EquinoxLaunchConfiguration"
+            id="org.eclipse.pde.ui.EquinoxFramework"
+            name="%Equinox.shortcut.label" 
+            initializer="org.eclipse.pde.internal.launcher.EquinoxInitializer"/>
+   </extension>
+</pre>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         <p>
+The value of the attribute <code>launcherDelegate</code> must be a fully qualified name of a Java class that extends <code>org.eclipse.pde.launcher.AbstractPDELaunchConfiguration</code>.  If the launcher is to provide its own source lookup order, then the method <code>setDefaultSourceLocator</code> should be overridden.
+</p>
+<p>
+The value of the attribute <code>initializer</code> must be a fully qualified name of a Java class that extends <code>org.eclipse.launcher.OSGiLaunchConfigurationInitializer</code>.
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         <p>
+PDE supplies the Equinox OSGi Framework extension to launch Equinox frameworks.
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2006, 2010 IBM Corporation and others.
+<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/ILaunchingPreferenceConstants.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/ILaunchingPreferenceConstants.java
new file mode 100644
index 0000000..c630c58
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/ILaunchingPreferenceConstants.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching;
+
+/**
+ * Listing of constants used in PDE preferences for launching.
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface ILaunchingPreferenceConstants {
+
+	// Main preference page
+	public static final String PROP_AUTO_MANAGE = "Preferences.MainPage.automanageDependencies"; //$NON-NLS-1$
+
+	// OSGi Frameworks
+	public static final String DEFAULT_OSGI_FRAMEOWRK = "Preference.default.osgi.framework"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/IPDEConstants.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/IPDEConstants.java
new file mode 100644
index 0000000..b5270a6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/IPDEConstants.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching;
+
+public interface IPDEConstants {
+	String PLUGIN_ID = "org.eclipse.pde.launching"; //$NON-NLS-1$
+	String UI_PLUGIN_ID = "org.eclipse.pde.ui"; //$NON-NLS-1$
+
+	// JUnit application identifiers
+	String LEGACY_UI_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.legacytestapplication"; //$NON-NLS-1$
+	String NON_UI_THREAD_APPLICATION = "org.eclipse.pde.junit.runtime.nonuithreadtestapplication"; //$NON-NLS-1$
+	String UI_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.uitestapplication"; //$NON-NLS-1$
+	String CORE_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.coretestapplication"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifies
+	 * whether the launch configuration is being restarted. This does not need
+	 * to be promoted to IPDELauncherConstants since clients should not need to
+	 * know about restarts.
+	 */
+	String RESTART = "restart"; //$NON-NLS-1$
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * whether the workspace log for an Eclipse application should be cleared
+	 * prior to launching.
+	 * 
+	 * TODO, move to IPDELauncherConstants in 3.4
+	 */
+	String DOCLEARLOG = "clearwslog"; //$NON-NLS-1$
+	String LAUNCHER_PDE_VERSION = "pde.version"; //$NON-NLS-1$
+	String APPEND_ARGS_EXPLICITLY = "append.args"; //$NON-NLS-1$
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDELaunchingPlugin.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDELaunchingPlugin.java
new file mode 100644
index 0000000..adf6cfb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDELaunchingPlugin.java
@@ -0,0 +1,209 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching;
+
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import java.util.Hashtable;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfigurationListener;
+import org.eclipse.pde.internal.core.PDEPreferencesManager;
+import org.eclipse.pde.internal.launching.launcher.*;
+import org.osgi.framework.*;
+
+public class PDELaunchingPlugin extends Plugin implements IPDEConstants {
+
+	// Shared instance
+	private static PDELaunchingPlugin fInstance;
+
+	// Launches listener
+	private LaunchListener fLaunchListener;
+
+	private BundleContext fBundleContext;
+
+	private Hashtable fCounters;
+
+	/**
+	 * Utility class to help setup the launch configuration listener without
+	 * loading the debug plugin
+	 */
+	private DebugPluginUtil fDebugPluginUtil;
+
+	/**
+	 * The shared text file document provider.
+	 * 
+	 * @since 3.2
+	 */
+	private OSGiFrameworkManager fOSGiFrameworkManager;
+
+	private PDEPreferencesManager fPreferenceManager;
+
+	public PDELaunchingPlugin() {
+		fInstance = this;
+	}
+
+	public PDEPreferencesManager getPreferenceManager() {
+		if (fPreferenceManager == null) {
+			fPreferenceManager = new PDEPreferencesManager(PLUGIN_ID);
+		}
+		return fPreferenceManager;
+	}
+
+	public URL getInstallURL() {
+		return getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
+	}
+
+	public static PDELaunchingPlugin getDefault() {
+		return fInstance;
+	}
+
+	public Hashtable getDefaultNameCounters() {
+		if (fCounters == null)
+			fCounters = new Hashtable();
+		return fCounters;
+	}
+
+	public static String getPluginId() {
+		return getDefault().getBundle().getSymbolicName();
+	}
+
+	public static IWorkspace getWorkspace() {
+		return ResourcesPlugin.getWorkspace();
+	}
+
+	public static void log(IStatus status) {
+		ResourcesPlugin.getPlugin().getLog().log(status);
+	}
+
+	public static void logErrorMessage(String message) {
+		log(new Status(IStatus.ERROR, getPluginId(), IStatus.ERROR, message,
+				null));
+	}
+
+	public static void log(Throwable e) {
+		if (e instanceof InvocationTargetException)
+			e = ((InvocationTargetException) e).getTargetException();
+		IStatus status = null;
+		if (e instanceof CoreException)
+			status = ((CoreException) e).getStatus();
+		else
+			status = new Status(IStatus.ERROR, getPluginId(), IStatus.OK, e
+					.getMessage(), e);
+		log(status);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		fBundleContext = context;
+		setupLaunchConfigurationListener();
+	}
+
+	/**
+	 * Add the launch configuration listener if the debug plugin is started.
+	 * Otherwise, setup a bundle listener to install the listener when the debug
+	 * plugin loads.
+	 * 
+	 * @param context
+	 *            bundle context needed to get current bundles
+	 */
+	private void setupLaunchConfigurationListener() {
+		boolean listenerStarted = false;
+		Bundle bundle = Platform.getBundle("org.eclipse.debug.core"); //$NON-NLS-1$
+		if (bundle != null && bundle.getState() == Bundle.ACTIVE) {
+			fDebugPluginUtil = new DebugPluginUtil();
+			fDebugPluginUtil.addListener();
+			listenerStarted = true;
+		}
+		if (!listenerStarted) {
+			fBundleContext.addBundleListener(new BundleListener() {
+				public void bundleChanged(BundleEvent event) {
+					if (event.getType() == BundleEvent.STARTED
+							&& "org.eclipse.debug.core".equals(event.getBundle().getSymbolicName())) { //$NON-NLS-1$
+						fDebugPluginUtil = new DebugPluginUtil();
+						fDebugPluginUtil.addListener();
+						fBundleContext.removeBundleListener(this);
+					}
+				}
+			});
+		}
+	}
+
+	public BundleContext getBundleContext() {
+		return fBundleContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+	 * )
+	 */
+	public void stop(BundleContext context) throws Exception {
+		if (fLaunchListener != null)
+			fLaunchListener.shutdown();
+		if (fDebugPluginUtil != null) {
+			fDebugPluginUtil.removeListener();
+		}
+		LauncherUtils.shutdown();
+		super.stop(context);
+	}
+
+	public LaunchListener getLaunchListener() {
+		if (fLaunchListener == null)
+			fLaunchListener = new LaunchListener();
+		return fLaunchListener;
+	}
+
+	public OSGiFrameworkManager getOSGiFrameworkManager() {
+		if (fOSGiFrameworkManager == null)
+			fOSGiFrameworkManager = new OSGiFrameworkManager();
+		return fOSGiFrameworkManager;
+	}
+
+	/**
+	 * Utility class that creates and controls a the PDE launch configuration
+	 * listener. This is done in a separate class to avoid loading the debug
+	 * plugin.
+	 * 
+	 * @since 3.4
+	 */
+	private class DebugPluginUtil {
+		private ILaunchConfigurationListener fLaunchConfigurationListener;
+
+		public void addListener() {
+			if (fLaunchConfigurationListener == null) {
+				fLaunchConfigurationListener = new LaunchConfigurationListener();
+			}
+			DebugPlugin.getDefault().getLaunchManager()
+					.addLaunchConfigurationListener(
+							fLaunchConfigurationListener);
+		}
+
+		public void removeListener() {
+			if (fLaunchConfigurationListener != null) {
+				DebugPlugin.getDefault().getLaunchManager()
+						.removeLaunchConfigurationListener(
+								fLaunchConfigurationListener);
+				fLaunchConfigurationListener = null;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDEMessages.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDEMessages.java
new file mode 100644
index 0000000..23e2f67
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PDEMessages.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching;
+
+import org.eclipse.osgi.util.NLS;
+
+public class PDEMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.pde.internal.launching.pderesources";//$NON-NLS-1$
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, PDEMessages.class);
+	}
+
+	public static String LauncherUtils_cannotLaunchApplication;
+
+	public static String Launcher_error_code13;
+	public static String Launcher_error_code15;
+
+	public static String EclipsePluginValidationOperation_pluginMissing;
+	public static String PluginValidation_error;
+
+	public static String WorkbenchLauncherConfigurationDelegate_noJRE;
+	public static String WorkbenchLauncherConfigurationDelegate_jrePathNotFound;
+	public static String WorkbenchLauncherConfigurationDelegate_badFeatureSetup;
+	public static String WorkbenchLauncherConfigurationDelegate_noStartup;
+	public static String JUnitLaunchConfiguration_error_notaplugin;
+	public static String JUnitLaunchConfiguration_error_missingPlugin;
+
+	public static String OSGiLaunchConfiguration_cannotFindLaunchConfiguration;
+	public static String OSGiLaunchConfiguration_selected;
+
+	public static String EquinoxLaunchConfiguration_oldTarget;
+
+	public static String VMHelper_cannotFindExecEnv;
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PreferenceInitializer.java
new file mode 100644
index 0000000..ca4108b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/PreferenceInitializer.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2009 eXXcellent solutions gmbh and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt, eXXcellent solutions gmbh - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching;
+
+
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
+
+import org.eclipse.core.runtime.preferences.*;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 */
+	public void initializeDefaultPreferences() {
+		IEclipsePreferences prefs = new DefaultScope().getNode(IPDEConstants.PLUGIN_ID);
+		prefs.put(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, OSGiFrameworkManager.DEFAULT_FRAMEWORK);
+
+		// copy over instance scope prefs from UI plugin
+		IEclipsePreferences oldInstancePrefs = new InstanceScope().getNode(IPDEConstants.UI_PLUGIN_ID);
+		IEclipsePreferences newInstancePrefs = new InstanceScope().getNode(IPDEConstants.PLUGIN_ID);
+
+		String osgiFramework = oldInstancePrefs.get(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, null);
+		if (osgiFramework != null) {
+			newInstancePrefs.put(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, osgiFramework);
+			oldInstancePrefs.remove(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
+		}
+
+		String autoManage = oldInstancePrefs.get(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE, null);
+		if (autoManage != null) {
+			newInstancePrefs.put(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE, autoManage);
+			oldInstancePrefs.remove(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE);
+		}
+
+		try {
+			newInstancePrefs.flush();
+			oldInstancePrefs.flush();
+		} catch (BackingStoreException e) {
+			PDELaunchingPlugin.log(e);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/BundleLauncherHelper.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/BundleLauncherHelper.java
new file mode 100644
index 0000000..4e1b924
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/BundleLauncherHelper.java
@@ -0,0 +1,603 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.util.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.osgi.framework.Version;
+
+public class BundleLauncherHelper {
+
+	/**
+	 * When creating a mapping of bundles to their start levels, update configurator is set
+	 * to auto start at level three.  However, if at launch time we are launching with both
+	 * simple configurator and update configurator, we change the start level as they 
+	 * shouldn't be started together.
+	 */
+	public static final String DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL = "3:true"; //$NON-NLS-1$
+
+	public static final char VERSION_SEPARATOR = '*';
+
+	public static Map getWorkspaceBundleMap(ILaunchConfiguration configuration) throws CoreException {
+		return getWorkspaceBundleMap(configuration, null, IPDELauncherConstants.WORKSPACE_BUNDLES);
+	}
+
+	public static Map getTargetBundleMap(ILaunchConfiguration configuration) throws CoreException {
+		return getTargetBundleMap(configuration, null, IPDELauncherConstants.TARGET_BUNDLES);
+	}
+
+	public static Map getMergedBundleMap(ILaunchConfiguration configuration, boolean osgi) throws CoreException {
+		Set set = new HashSet();
+		Map map = new HashMap();
+
+		// if we are using the eclipse-based launcher, we need special checks
+		if (!osgi) {
+
+			checkBackwardCompatibility(configuration, true);
+
+			if (configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true)) {
+				IPluginModelBase[] models = PluginRegistry.getActiveModels();
+				for (int i = 0; i < models.length; i++) {
+					addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
+				}
+				return map;
+			}
+
+			if (configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
+				IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
+				for (int i = 0; i < models.length; i++) {
+					addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
+				}
+				return map;
+			}
+		}
+
+		if (configuration.getAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false)) {
+			// Get the default location settings
+			String defaultLocation = configuration.getAttribute(IPDELauncherConstants.FEATURE_DEFAULT_LOCATION, IPDELauncherConstants.LOCATION_WORKSPACE);
+			String defaultPluginResolution = configuration.getAttribute(IPDELauncherConstants.FEATURE_PLUGIN_RESOLUTION, IPDELauncherConstants.LOCATION_WORKSPACE);
+
+			// Get all available features
+			HashMap workspaceFeatureMap = new HashMap();
+			HashMap externalFeatureMap = new HashMap();
+
+			FeatureModelManager fmm = PDECore.getDefault().getFeatureModelManager();
+			IFeatureModel[] workspaceFeatureModels = fmm.getWorkspaceModels();
+			for (int i = 0; i < workspaceFeatureModels.length; i++) {
+				String id = workspaceFeatureModels[i].getFeature().getId();
+				workspaceFeatureMap.put(id, workspaceFeatureModels[i]);
+			}
+
+			IFeatureModel[] externalFeatureModels = fmm.getExternalModels();
+			for (int i = 0; i < externalFeatureModels.length; i++) {
+				String id = externalFeatureModels[i].getFeature().getId();
+				externalFeatureMap.put(id, externalFeatureModels[i]);
+			}
+
+			// Get the selected features and their plugin resolution
+			Map featureResolutionMap = new HashMap();
+			Set selectedFeatures = configuration.getAttribute(IPDELauncherConstants.SELECTED_FEATURES, (Set) null);
+			if (selectedFeatures != null) {
+				for (Iterator iterator = selectedFeatures.iterator(); iterator.hasNext();) {
+					String currentSelected = (String) iterator.next();
+					String[] attributes = currentSelected.split(":"); //$NON-NLS-1$
+					if (attributes.length > 1) {
+						featureResolutionMap.put(attributes[0], attributes[1]);
+					}
+				}
+			}
+
+			// Get the feature model for each selected feature id and resolve its plugins
+			Set launchPlugins = new HashSet();
+			for (Iterator iterator = featureResolutionMap.keySet().iterator(); iterator.hasNext();) {
+				String id = (String) iterator.next();
+
+				IFeatureModel featureModel = null;
+				if (IPDELauncherConstants.LOCATION_WORKSPACE.equalsIgnoreCase(defaultLocation)) {
+					featureModel = (IFeatureModel) workspaceFeatureMap.get(id);
+				}
+				if (featureModel == null || IPDELauncherConstants.LOCATION_EXTERNAL.equalsIgnoreCase(defaultLocation)) {
+					if (externalFeatureMap.containsKey(id)) {
+						featureModel = (IFeatureModel) externalFeatureMap.get(id);
+					}
+				}
+				if (featureModel == null) {
+					continue;
+				}
+
+				IFeaturePlugin[] featurePlugins = featureModel.getFeature().getPlugins();
+				String pluginResolution = (String) featureResolutionMap.get(id);
+				if (IPDELauncherConstants.LOCATION_DEFAULT.equalsIgnoreCase(pluginResolution)) {
+					pluginResolution = defaultPluginResolution;
+				}
+
+				for (int i = 0; i < featurePlugins.length; i++) {
+					ModelEntry modelEntry = PluginRegistry.findEntry(featurePlugins[i].getId());
+					if (modelEntry != null) {
+						IPluginModelBase model = findModel(modelEntry, featurePlugins[i].getVersion(), pluginResolution);
+						if (model != null)
+							launchPlugins.add(model);
+					}
+				}
+
+				IFeatureImport[] featureImports = featureModel.getFeature().getImports();
+				for (int i = 0; i < featureImports.length; i++) {
+					if (featureImports[i].getType() == IFeatureImport.PLUGIN) {
+						ModelEntry modelEntry = PluginRegistry.findEntry(featureImports[i].getId());
+						if (modelEntry != null) {
+							IPluginModelBase model = findModel(modelEntry, featureImports[i].getVersion(), pluginResolution);
+							if (model != null)
+								launchPlugins.add(model);
+						}
+					}
+				}
+			}
+
+			HashMap additionalPlugins = getAdditionalPlugins(configuration, true);
+			launchPlugins.addAll(additionalPlugins.keySet());
+
+			// Get any plug-ins required by the application/product set on the config
+			if (!osgi) {
+				String[] applicationIds = RequirementHelper.getApplicationRequirements(configuration);
+				for (int i = 0; i < applicationIds.length; i++) {
+					ModelEntry modelEntry = PluginRegistry.findEntry(applicationIds[i]);
+					if (modelEntry != null) {
+						IPluginModelBase model = findModel(modelEntry, null, defaultPluginResolution);
+						if (model != null)
+							launchPlugins.add(model);
+					}
+				}
+			}
+
+			// Get all required plugins
+			// exclude "org.eclipse.ui.workbench.compatibility" - it is only needed for pre-3.0 bundles
+			Set additionalIds = DependencyManager.getDependencies(launchPlugins.toArray(), false, new String[] {"org.eclipse.ui.workbench.compatibility"}); //$NON-NLS-1$
+			Iterator it = additionalIds.iterator();
+			while (it.hasNext()) {
+				String id = (String) it.next();
+				ModelEntry modelEntry = PluginRegistry.findEntry(id);
+				if (modelEntry != null) {
+					IPluginModelBase model = findModel(modelEntry, null, defaultPluginResolution);
+					if (model != null)
+						launchPlugins.add(model);
+				}
+			}
+
+			//remove conflicting duplicates - if they have same version or both are singleton
+			HashMap pluginMap = new HashMap();
+			List workspaceModels = null;
+			for (Iterator iterator = launchPlugins.iterator(); iterator.hasNext();) {
+				IPluginModelBase model = (IPluginModelBase) iterator.next();
+				String id = model.getPluginBase().getId();
+				if (pluginMap.containsKey(id)) {
+					IPluginModelBase existing = (IPluginModelBase) pluginMap.get(id);
+					if (model.getPluginBase().getVersion().equalsIgnoreCase(existing.getPluginBase().getVersion()) || (isSingleton(model) && isSingleton(existing))) {
+						if (workspaceModels == null)
+							workspaceModels = Arrays.asList(PluginRegistry.getWorkspaceModels());
+						if (!workspaceModels.contains(existing)) { //if existing model is external 							
+							pluginMap.put(id, model); // launch the workspace model 
+							continue;
+						}
+					}
+				}
+				pluginMap.put(id, model);
+			}
+
+			// Create the start levels for the selected plugins and add them to the map
+			for (Iterator iterator = pluginMap.values().iterator(); iterator.hasNext();) {
+				IPluginModelBase model = (IPluginModelBase) iterator.next();
+				addBundleToMap(map, model, "default:default"); //$NON-NLS-1$
+			}
+			return map;
+		}
+
+		String workspace = osgi == false ? IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS : IPDELauncherConstants.WORKSPACE_BUNDLES;
+		String target = osgi == false ? IPDELauncherConstants.SELECTED_TARGET_PLUGINS : IPDELauncherConstants.TARGET_BUNDLES;
+		map = getWorkspaceBundleMap(configuration, set, workspace);
+		map.putAll(getTargetBundleMap(configuration, set, target));
+		return map;
+	}
+
+	/**
+	 * Finds the best candidate model from the <code>resolution</code> location. If the model is not found there, 
+	 * alternate location is explored before returning <code>null</code>.
+	 * @param modelEntry
+	 * @param version
+	 * @param location
+	 * @return model
+	 */
+	private static IPluginModelBase findModel(ModelEntry modelEntry, String version, String location) {
+		IPluginModelBase model = null;
+		if (IPDELauncherConstants.LOCATION_WORKSPACE.equalsIgnoreCase(location)) {
+			model = getBestCandidateModel(modelEntry.getWorkspaceModels(), version);
+		}
+		if (model == null) {
+			model = getBestCandidateModel(modelEntry.getExternalModels(), version);
+		}
+		if (model == null && IPDELauncherConstants.LOCATION_EXTERNAL.equalsIgnoreCase(location)) {
+			model = getBestCandidateModel(modelEntry.getWorkspaceModels(), version);
+		}
+		return model;
+	}
+
+	private static boolean isSingleton(IPluginModelBase model) {
+		if (model.getBundleDescription() == null || model.getBundleDescription().isSingleton()) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Returns model from the given list that is a 'best match' to the given bundle version or
+	 * <code>null</code> if no enabled models were in the provided list.  The best match will
+	 * be an exact version match if one is found.  Otherwise a model that is resolved in the
+	 * OSGi state with the highest version is returned.
+	 * 
+	 * @param models list of candidate models to choose from
+	 * @param version the bundle version to find a match for
+	 * @return best candidate model from the list of models or <code>null</code> if no there were no acceptable models in the list
+	 */
+	private static IPluginModelBase getBestCandidateModel(IPluginModelBase[] models, String version) {
+		Version requiredVersion = version != null ? Version.parseVersion(version) : Version.emptyVersion;
+		IPluginModelBase model = null;
+		for (int i = 0; i < models.length; i++) {
+			if (models[i].getBundleDescription() == null || !models[i].isEnabled())
+				continue;
+
+			if (model == null) {
+				model = models[i];
+				if (requiredVersion.compareTo(model.getBundleDescription().getVersion()) == 0) {
+					break;
+				}
+				continue;
+			}
+
+			if (!model.isEnabled() && models[i].isEnabled()) {
+				model = models[i];
+				continue;
+			}
+
+			BundleDescription current = model.getBundleDescription();
+			BundleDescription candidate = models[i].getBundleDescription();
+			if (current == null || candidate == null) {
+				continue;
+			}
+
+			if (!current.isResolved() && candidate.isResolved()) {
+				model = models[i];
+				continue;
+			}
+
+			if (requiredVersion.compareTo(candidate.getVersion()) == 0) {
+				model = models[i];
+				break;
+			}
+
+			if (current.getVersion().compareTo(candidate.getVersion()) < 0) {
+				model = models[i];
+			}
+		}
+		return model;
+	}
+
+	public static IPluginModelBase[] getMergedBundles(ILaunchConfiguration configuration, boolean osgi) throws CoreException {
+		Map map = getMergedBundleMap(configuration, osgi);
+		return (IPluginModelBase[]) map.keySet().toArray(new IPluginModelBase[map.size()]);
+	}
+
+	public static Map getWorkspaceBundleMap(ILaunchConfiguration configuration, Set set, String attribute) throws CoreException {
+		String selected = configuration.getAttribute(attribute, ""); //$NON-NLS-1$
+		Map map = new HashMap();
+		StringTokenizer tok = new StringTokenizer(selected, ","); //$NON-NLS-1$
+		while (tok.hasMoreTokens()) {
+			String token = tok.nextToken();
+			int index = token.indexOf('@');
+			if (index < 0) { // if no start levels, assume default
+				token = token.concat("@default:default"); //$NON-NLS-1$
+				index = token.indexOf('@');
+			}
+			String idVersion = token.substring(0, index);
+			int versionIndex = idVersion.indexOf(VERSION_SEPARATOR);
+			String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
+			String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
+			if (set != null)
+				set.add(id);
+			ModelEntry entry = PluginRegistry.findEntry(id);
+			if (entry != null) {
+				IPluginModelBase[] models = entry.getWorkspaceModels();
+				Set versions = new HashSet();
+				for (int i = 0; i < models.length; i++) {
+					IPluginBase base = models[i].getPluginBase();
+					String v = base.getVersion();
+					if (versions.add(v)) { // don't add exact same version more than once
+
+						// match only if...
+						// a) if we have the same version
+						// b) no version
+						// c) all else fails, if there's just one bundle available, use it
+						if (base.getVersion().equals(version) || version == null || models.length == 1)
+							addBundleToMap(map, models[i], token.substring(index + 1));
+					}
+				}
+			}
+		}
+
+		if (configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true)) {
+			Set deselectedPlugins = LaunchPluginValidator.parsePlugins(configuration, IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS);
+			IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
+			for (int i = 0; i < models.length; i++) {
+				String id = models[i].getPluginBase().getId();
+				if (id == null)
+					continue;
+				if (!deselectedPlugins.contains(models[i])) {
+					if (set != null)
+						set.add(id);
+					if (!map.containsKey(models[i]))
+						addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
+				}
+			}
+		}
+		return map;
+	}
+
+	/**
+	 * Adds the given bundle and start information to the map.  This will override anything set
+	 * for system bundles, and set their start level to the appropriate level
+	 * @param map The map to add the bundles too
+	 * @param bundle The bundle to add
+	 * @param substring the start information in the form level:autostart
+	 */
+	private static void addBundleToMap(Map map, IPluginModelBase bundle, String sl) {
+		BundleDescription desc = bundle.getBundleDescription();
+		boolean defaultsl = (sl == null || sl.equals("default:default")); //$NON-NLS-1$
+		if (desc != null && defaultsl) {
+			String modelName = desc.getSymbolicName();
+			if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) {
+				map.put(bundle, "1:true"); //$NON-NLS-1$ 
+			} else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR.equals(modelName)) {
+				map.put(bundle, "1:true"); //$NON-NLS-1$
+			} else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON.equals(modelName)) {
+				map.put(bundle, "2:true"); //$NON-NLS-1$
+			} else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) {
+				map.put(bundle, "-1:true"); //$NON-NLS-1$
+			} else if (IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR.equals(modelName)) {
+				map.put(bundle, DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL);
+			} else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) {
+				if (TargetPlatformHelper.getTargetVersion() > 3.1) {
+					map.put(bundle, "default:true"); //$NON-NLS-1$
+				} else {
+					map.put(bundle, "2:true"); //$NON-NLS-1$
+				}
+			} else {
+				map.put(bundle, sl);
+			}
+		} else {
+			map.put(bundle, sl);
+		}
+
+	}
+
+	public static Map getTargetBundleMap(ILaunchConfiguration configuration, Set set, String attribute) throws CoreException {
+		String selected = configuration.getAttribute(attribute, ""); //$NON-NLS-1$
+		Map map = new HashMap();
+		StringTokenizer tok = new StringTokenizer(selected, ","); //$NON-NLS-1$
+		while (tok.hasMoreTokens()) {
+			String token = tok.nextToken();
+			int index = token.indexOf('@');
+			if (index < 0) { // if no start levels, assume default
+				token = token.concat("@default:default"); //$NON-NLS-1$
+				index = token.indexOf('@');
+			}
+			String idVersion = token.substring(0, index);
+			int versionIndex = idVersion.indexOf(VERSION_SEPARATOR);
+			String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
+			String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
+			if (set != null && set.contains(id))
+				continue;
+			ModelEntry entry = PluginRegistry.findEntry(id);
+			if (entry != null) {
+				IPluginModelBase[] models = entry.getExternalModels();
+				for (int i = 0; i < models.length; i++) {
+					if (models[i].isEnabled()) {
+						IPluginBase base = models[i].getPluginBase();
+						// match only if...
+						// a) if we have the same version
+						// b) no version
+						// c) all else fails, if there's just one bundle available, use it
+						if (base.getVersion().equals(version) || version == null || models.length == 1)
+							addBundleToMap(map, models[i], token.substring(index + 1));
+					}
+				}
+			}
+		}
+		return map;
+	}
+
+	public static String writeBundleEntry(IPluginModelBase model, String startLevel, String autoStart) {
+		IPluginBase base = model.getPluginBase();
+		String id = base.getId();
+		StringBuffer buffer = new StringBuffer(id);
+
+		ModelEntry entry = PluginRegistry.findEntry(id);
+		if (entry != null && entry.getActiveModels().length > 1) {
+			buffer.append(VERSION_SEPARATOR);
+			buffer.append(model.getPluginBase().getVersion());
+		}
+
+		boolean hasStartLevel = (startLevel != null && startLevel.length() > 0);
+		boolean hasAutoStart = (autoStart != null && autoStart.length() > 0);
+
+		if (hasStartLevel || hasAutoStart)
+			buffer.append('@');
+		if (hasStartLevel)
+			buffer.append(startLevel);
+		if (hasStartLevel || hasAutoStart)
+			buffer.append(':');
+		if (hasAutoStart)
+			buffer.append(autoStart);
+		return buffer.toString();
+	}
+
+	public static void checkBackwardCompatibility(ILaunchConfiguration configuration, boolean save) throws CoreException {
+		ILaunchConfigurationWorkingCopy wc = null;
+		if (configuration.isWorkingCopy()) {
+			wc = (ILaunchConfigurationWorkingCopy) configuration;
+		} else {
+			wc = configuration.getWorkingCopy();
+		}
+
+		String value = configuration.getAttribute("wsproject", (String) null); //$NON-NLS-1$
+		if (value != null) {
+			wc.setAttribute("wsproject", (String) null); //$NON-NLS-1$
+			if (value.indexOf(';') != -1) {
+				value = value.replace(';', ',');
+			} else if (value.indexOf(':') != -1) {
+				value = value.replace(':', ',');
+			}
+			value = (value.length() == 0 || value.equals(",")) //$NON-NLS-1$
+			? null
+					: value.substring(0, value.length() - 1);
+
+			boolean automatic = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
+			String attr = automatic ? IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS : IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS;
+			wc.setAttribute(attr, value);
+		}
+
+		String value2 = configuration.getAttribute("extplugins", (String) null); //$NON-NLS-1$
+		if (value2 != null) {
+			wc.setAttribute("extplugins", (String) null); //$NON-NLS-1$
+			if (value2.indexOf(';') != -1) {
+				value2 = value2.replace(';', ',');
+			} else if (value2.indexOf(':') != -1) {
+				value2 = value2.replace(':', ',');
+			}
+			value2 = (value2.length() == 0 || value2.equals(",")) ? null : value2.substring(0, value2.length() - 1); //$NON-NLS-1$
+			wc.setAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, value2);
+		}
+
+		String version = configuration.getAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, (String) null);
+		boolean newApp = TargetPlatformHelper.usesNewApplicationModel();
+		boolean upgrade = !"3.3".equals(version) && newApp; //$NON-NLS-1$
+		if (!upgrade)
+			upgrade = TargetPlatformHelper.getTargetVersion() >= 3.2 && version == null;
+		if (upgrade) {
+			wc.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, newApp ? "3.3" : "3.2a"); //$NON-NLS-1$ //$NON-NLS-2$
+			boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
+			boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
+			boolean automaticAdd = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
+			if (!usedefault && !useFeatures) {
+				ArrayList list = new ArrayList();
+				if (version == null) {
+					list.add("org.eclipse.core.contenttype"); //$NON-NLS-1$
+					list.add("org.eclipse.core.jobs"); //$NON-NLS-1$
+					list.add(IPDEBuildConstants.BUNDLE_EQUINOX_COMMON);
+					list.add("org.eclipse.equinox.preferences"); //$NON-NLS-1$
+					list.add("org.eclipse.equinox.registry"); //$NON-NLS-1$
+					list.add("org.eclipse.core.runtime.compatibility.registry"); //$NON-NLS-1$
+				}
+				if (!"3.3".equals(version) && newApp) //$NON-NLS-1$
+					list.add("org.eclipse.equinox.app"); //$NON-NLS-1$
+				StringBuffer extensions = new StringBuffer(configuration.getAttribute(IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, "")); //$NON-NLS-1$
+				StringBuffer target = new StringBuffer(configuration.getAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, "")); //$NON-NLS-1$
+				for (int i = 0; i < list.size(); i++) {
+					String plugin = list.get(i).toString();
+					IPluginModelBase model = PluginRegistry.findModel(plugin);
+					if (model == null)
+						continue;
+					if (model.getUnderlyingResource() != null) {
+						if (automaticAdd)
+							continue;
+						if (extensions.length() > 0)
+							extensions.append(","); //$NON-NLS-1$
+						extensions.append(plugin);
+					} else {
+						if (target.length() > 0)
+							target.append(","); //$NON-NLS-1$
+						target.append(plugin);
+					}
+				}
+				if (extensions.length() > 0)
+					wc.setAttribute(IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, extensions.toString());
+				if (target.length() > 0)
+					wc.setAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, target.toString());
+			}
+		}
+
+		if (save && (value != null || value2 != null || upgrade))
+			wc.doSave();
+	}
+
+	public static String writeAdditionalPluginsEntry(IPluginModelBase model, String pluginResolution, boolean checked) {
+		IPluginBase base = model.getPluginBase();
+		String id = base.getId();
+		StringBuffer buffer = new StringBuffer(id);
+		buffer.append(':');
+		buffer.append(base.getVersion());
+		buffer.append(':');
+		buffer.append(pluginResolution);
+		buffer.append(':');
+		buffer.append(checked);
+		return buffer.toString();
+	}
+
+	/**
+	 * Returns a map of IPluginModelBase to their associated String resolution setting. Reads the 
+	 * additional plug-ins attribute of the given launch config and returns a map of plug-in models
+	 * to their resolution.  The attribute stores the id, version, enablement and resolution of each plug-in.
+	 * The models to be returned are determined by trying to find a model with a matching name, matching version
+	 * (or highest) in the resolution location (falling back on other locations if the chosen option is unavailable).
+	 * The includeDisabled option allows the returned list to contain only plug-ins that are enabled (checked) in
+	 * the config.
+	 * 
+	 * @param config launch config to read attribute from
+	 * @param onlyEnabled whether all plug-ins in the attribute should be returned or just the ones marked as enabled/checked
+	 * @return map of IPluginModelBase to String resolution setting
+	 * @throws CoreException if there is a problem reading the launch config
+	 */
+	public static HashMap getAdditionalPlugins(ILaunchConfiguration config, boolean onlyEnabled) throws CoreException {
+		HashMap resolvedAdditionalPlugins = new HashMap();
+		Set userAddedPlugins = config.getAttribute(IPDELauncherConstants.ADDITIONAL_PLUGINS, (Set) null);
+		String defaultPluginResolution = config.getAttribute(IPDELauncherConstants.FEATURE_PLUGIN_RESOLUTION, IPDELauncherConstants.LOCATION_WORKSPACE);
+		if (userAddedPlugins != null) {
+			for (Iterator iterator = userAddedPlugins.iterator(); iterator.hasNext();) {
+				String addedPlugin = (String) iterator.next();
+				String[] pluginData = addedPlugin.split(":"); //$NON-NLS-1$
+				boolean checked = Boolean.valueOf(pluginData[3]).booleanValue();
+				if (!onlyEnabled || checked) {
+					String id = pluginData[0];
+					String version = pluginData[1];
+					String pluginResolution = pluginData[2];
+					ModelEntry pluginModelEntry = PluginRegistry.findEntry(id);
+					if (pluginModelEntry != null) {
+						if (IPDELauncherConstants.LOCATION_DEFAULT.equalsIgnoreCase(pluginResolution)) {
+							pluginResolution = defaultPluginResolution;
+						}
+						IPluginModelBase model = findModel(pluginModelEntry, version, pluginResolution);
+						if (model != null) {
+							resolvedAdditionalPlugins.put(model, pluginData[2]);
+						}
+					}
+				}
+			}
+		}
+		return resolvedAdditionalPlugins;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EclipsePluginValidationOperation.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EclipsePluginValidationOperation.java
new file mode 100644
index 0000000..ff886cb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EclipsePluginValidationOperation.java
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.launching.*;
+
+public class EclipsePluginValidationOperation extends LaunchValidationOperation {
+	public static final int CREATE_EXTENSION_ERROR_CODE = 1000;
+
+	private Map fExtensionErrors = new HashMap(2);
+	private static Object[] EMPTY = new Object[0];
+
+	public EclipsePluginValidationOperation(ILaunchConfiguration configuration) {
+		super(configuration);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation#getModels()
+	 */
+	protected IPluginModelBase[] getModels() throws CoreException {
+		return BundleLauncherHelper.getMergedBundles(fLaunchConfiguration, false);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void run(IProgressMonitor monitor) throws CoreException {
+		super.run(monitor);
+		if (fExtensionErrors.size() > 0)
+			fExtensionErrors.clear();
+		validateExtensions();
+	}
+
+	private void validateExtensions() {
+		try {
+			String[] required = RequirementHelper.getApplicationRequirements(fLaunchConfiguration);
+			for (int i = 0; i < required.length; i++) {
+				BundleDescription bundle = getState().getBundle(required[i], null);
+				if (bundle == null) {
+					String message = NLS.bind(PDEMessages.EclipsePluginValidationOperation_pluginMissing, required[i]);
+					Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, CREATE_EXTENSION_ERROR_CODE, message, null);
+					IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+					Object extensionError = null;
+					if (statusHandler == null)
+						extensionError = status.getMessage();
+					else
+						extensionError = statusHandler.handleStatus(status, required[i]);
+					fExtensionErrors.put(extensionError, EMPTY);
+				}
+			}
+		} catch (CoreException e) {
+			PDELaunchingPlugin.log(e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation#hasErrors()
+	 */
+	public boolean hasErrors() {
+		return super.hasErrors() || fExtensionErrors.size() >= 1;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation#getInput()
+	 */
+	public Map getInput() {
+		Map map = super.getInput();
+		map.putAll(fExtensionErrors);
+		return map;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EquinoxInitializer.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EquinoxInitializer.java
new file mode 100644
index 0000000..cf70e3f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/EquinoxInitializer.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.util.*;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer;
+
+public class EquinoxInitializer extends OSGiLaunchConfigurationInitializer {
+
+	private Map fStartLevels;
+
+	public void initialize(ILaunchConfigurationWorkingCopy configuration) {
+		super.initialize(configuration);
+		initializeProgramArguments(configuration);
+		initializeVMArguments(configuration);
+		initializeTracing(configuration);
+	}
+
+	private void initializeProgramArguments(ILaunchConfigurationWorkingCopy configuration) {
+		StringBuffer buffer = new StringBuffer(LaunchArgumentsHelper.getInitialProgramArguments());
+		if (buffer.length() > 0) {
+			// Note that -console applies to the same indexof as -consoleLog
+			if (buffer.indexOf("-console ") == -1 && !buffer.toString().endsWith("-console")) { //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append(" -console"); //$NON-NLS-1$
+			}
+		} else {
+			buffer.append("-console"); //$NON-NLS-1$
+		}
+		configuration.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
+		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, buffer.toString());
+	}
+
+	private void initializeVMArguments(ILaunchConfigurationWorkingCopy configuration) {
+		configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
+		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
+		StringBuffer vmArgs = new StringBuffer(preferences.getString(ICoreConstants.VM_ARGS));
+		if (vmArgs.indexOf("-Declipse.ignoreApp") == -1) { //$NON-NLS-1$
+			if (vmArgs.length() > 0)
+				vmArgs.append(" "); //$NON-NLS-1$
+			vmArgs.append("-Declipse.ignoreApp=true"); //$NON-NLS-1$
+		}
+		if (vmArgs.indexOf("-Dosgi.noShutdown") == -1) { //$NON-NLS-1$
+			vmArgs.append(" -Dosgi.noShutdown=true"); //$NON-NLS-1$
+		}
+		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.toString());
+	}
+
+	private void initializeTracing(ILaunchConfigurationWorkingCopy configuration) {
+		configuration.setAttribute(IPDELauncherConstants.TRACING_CHECKED, IPDELauncherConstants.TRACING_NONE);
+	}
+
+	protected void initializeBundleState(ILaunchConfigurationWorkingCopy configuration) {
+		initializeBundleState();
+		super.initializeBundleState(configuration);
+	}
+
+	protected String getAutoStart(String bundleID) {
+		if (fStartLevels.containsKey(bundleID)) {
+			String value = fStartLevels.get(bundleID).toString();
+			return value.substring(value.indexOf(":") + 1); //$NON-NLS-1$
+		}
+		return super.getAutoStart(bundleID);
+	}
+
+	protected String getStartLevel(String bundleID) {
+		if (fStartLevels.containsKey(bundleID)) {
+			String value = fStartLevels.get(bundleID).toString();
+			return value.substring(0, value.indexOf(":")); //$NON-NLS-1$
+		}
+		return super.getStartLevel(bundleID);
+	}
+
+	private void initializeBundleState() {
+		if (fStartLevels == null)
+			fStartLevels = new HashMap();
+		Properties props = TargetPlatformHelper.getConfigIniProperties();
+		if (props != null) {
+			String value = (String) props.get("osgi.bundles"); //$NON-NLS-1$
+			if (value != null) {
+				StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens()) {
+					String tokenValue = tokenizer.nextToken();
+					int index = tokenValue.indexOf("@"); //$NON-NLS-1$
+					if (index > 0) {
+						String bundle = tokenValue.substring(0, index).trim();
+						fStartLevels.put(bundle, getStartValue(tokenValue.substring(index)));
+					}
+				}
+			}
+		}
+	}
+
+	private String getStartValue(String value) {
+		StringBuffer buffer = new StringBuffer(value);
+		StringBuffer result = new StringBuffer(":"); //$NON-NLS-1$
+
+		int index = value.indexOf("start"); //$NON-NLS-1$
+		result.append(Boolean.toString(index != -1));
+
+		if (index != -1)
+			buffer.delete(index, index + 5);
+
+		int colon = value.indexOf(':');
+		if (colon != -1)
+			buffer.deleteCharAt(colon);
+
+		// delete the first char '@'
+		buffer.deleteCharAt(0);
+
+		try {
+			result.insert(0, Integer.parseInt(buffer.toString().trim()));
+		} catch (NumberFormatException e) {
+			result.insert(0, DEFAULT);
+		}
+		return result.toString();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchArgumentsHelper.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchArgumentsHelper.java
new file mode 100644
index 0000000..59a9fa3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchArgumentsHelper.java
@@ -0,0 +1,332 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.launching.ExecutionArguments;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
+import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.osgi.framework.Bundle;
+
+public class LaunchArgumentsHelper {
+
+	/**
+	 * Returns the location that will be used as the workspace when launching.  Will
+	 * replace variables, so this method should only be called
+	 * when variable substitution (may prompt the user) is appropriate.
+	 * @param configuration the launch configuration to get the workspace value for
+	 * @return workspace location path as a string
+	 * @throws CoreException if there is a problem with the configuration
+	 */
+	public static String getWorkspaceLocation(ILaunchConfiguration configuration) throws CoreException {
+		String location = configuration.getAttribute(IPDELauncherConstants.LOCATION, (String) null);
+		if (location == null) {
+			// backward compatibility
+			location = configuration.getAttribute(IPDELauncherConstants.LOCATION + "0", (String) null); //$NON-NLS-1$
+			if (location != null) {
+				ILaunchConfigurationWorkingCopy wc = null;
+				if (configuration.isWorkingCopy()) {
+					wc = (ILaunchConfigurationWorkingCopy) configuration;
+				} else {
+					wc = configuration.getWorkingCopy();
+				}
+				wc.setAttribute(IPDELauncherConstants.LOCATION + "0", (String) null); //$NON-NLS-1$
+				wc.setAttribute(IPDELauncherConstants.LOCATION, location);
+				wc.doSave();
+			}
+		}
+		return getSubstitutedString(location);
+	}
+
+	public static String[] getUserProgramArgumentArray(ILaunchConfiguration configuration) throws CoreException {
+		String args = getUserProgramArguments(configuration);
+		return new ExecutionArguments("", args).getProgramArgumentsArray(); //$NON-NLS-1$
+	}
+
+	public static String getUserProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		String args = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String) null);
+		if (args == null) {
+			// backward compatibility
+			args = configuration.getAttribute("progargs", (String) null); //$NON-NLS-1$
+			if (args != null) {
+				ILaunchConfigurationWorkingCopy wc = null;
+				if (configuration.isWorkingCopy()) {
+					wc = (ILaunchConfigurationWorkingCopy) configuration;
+				} else {
+					wc = configuration.getWorkingCopy();
+				}
+				wc.setAttribute("progargs", (String) null); //$NON-NLS-1$
+				wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
+				wc.doSave();
+			}
+		}
+		return args == null ? "" : getSubstitutedString(args); //$NON-NLS-1$
+	}
+
+	public static String getUserVMArguments(ILaunchConfiguration configuration) throws CoreException {
+		String args = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, (String) null);
+		if (args == null) {
+			// backward compatibility
+			args = configuration.getAttribute("vmargs", (String) null); //$NON-NLS-1$
+			if (args != null) {
+				ILaunchConfigurationWorkingCopy wc = null;
+				if (configuration.isWorkingCopy()) {
+					wc = (ILaunchConfigurationWorkingCopy) configuration;
+				} else {
+					wc = configuration.getWorkingCopy();
+				}
+				wc.setAttribute("vmargs", (String) null); //$NON-NLS-1$
+				wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, args);
+				wc.doSave();
+			}
+		}
+		return args == null ? "" : getSubstitutedString(args); //$NON-NLS-1$
+	}
+
+	/**
+	 * Fetches the VM Arguments from the current Target Platform
+	 *  
+	 * @return	VM Arguments from the current Target Platform or empty string if none found
+	 */
+	public static String getInitialVMArguments() {
+
+		try {
+			ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+			if (service != null) {
+				ITargetHandle target = service.getWorkspaceTargetHandle();
+				if (target != null) {
+					String result = target.getTargetDefinition().getVMArguments();
+					result = result != null ? result : ""; //$NON-NLS-1$
+					return result;
+				}
+			}
+		} catch (CoreException e) {
+		}
+
+		// TODO: Generally, once the new preference target platform preference page is in use,
+		// this code path will not be used. Once we decide to remove support for old targets/preferences
+		// this code can be removed.
+		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
+		StringBuffer result = new StringBuffer(preferences.getString(ICoreConstants.VM_ARGS));
+
+		if (preferences.getBoolean(ICoreConstants.VM_LAUNCHER_INI)) {
+			// hack on the arguments from eclipse.ini
+			result.append(TargetPlatformHelper.getIniVMArgs());
+		}
+		return result.toString();
+	}
+
+	public static String getInitialProgramArguments() {
+		StringBuffer buffer = new StringBuffer("-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"); //$NON-NLS-1$
+
+		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
+		String programArgs = preferences.getString(ICoreConstants.PROGRAM_ARGS);
+		if (programArgs.length() > 0) {
+			buffer.append(" "); //$NON-NLS-1$
+			buffer.append(programArgs);
+		}
+		return buffer.toString();
+	}
+
+	public static File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
+		String working;
+		try {
+			working = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, new File(".").getCanonicalPath()); //$NON-NLS-1$
+		} catch (IOException e) {
+			working = "${workspace_loc}/../"; //$NON-NLS-1$
+		}
+		File dir = new File(getSubstitutedString(working));
+		if (!dir.exists())
+			dir.mkdirs();
+		return dir;
+	}
+
+	public static Map getVMSpecificAttributesMap(ILaunchConfiguration config) throws CoreException {
+		Map map = new HashMap(2);
+		String javaCommand = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, (String) null);
+		map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, javaCommand);
+		if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
+			ModelEntry entry = PluginRegistry.findEntry("org.eclipse.jdt.debug"); //$NON-NLS-1$
+			if (entry != null) {
+				IPluginModelBase[] models = entry.getExternalModels();
+				for (int i = 0; i < models.length; i++) {
+					File file = new File(models[i].getInstallLocation());
+					if (!file.isFile())
+						file = new File(file, "jdi.jar"); //$NON-NLS-1$
+					if (file.exists()) {
+						map.put(IJavaLaunchConfigurationConstants.ATTR_BOOTPATH_PREPEND, new String[] {file.getAbsolutePath()});
+						break;
+					}
+				}
+			}
+		}
+		return map;
+	}
+
+	public static String getTracingFileArgument(ILaunchConfiguration config, String optionsFileName) throws CoreException {
+		try {
+			TracingOptionsManager mng = PDECore.getDefault().getTracingOptionsManager();
+			Map options = config.getAttribute(IPDELauncherConstants.TRACING_OPTIONS, (Map) null);
+			String selected = config.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null);
+			if (selected == null) {
+				mng.save(optionsFileName, options);
+			} else if (!selected.equals(IPDELauncherConstants.TRACING_NONE)) {
+				HashSet result = new HashSet();
+				StringTokenizer tokenizer = new StringTokenizer(selected, ","); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens()) {
+					result.add(tokenizer.nextToken());
+				}
+				mng.save(optionsFileName, options, result);
+			}
+		} catch (CoreException e) {
+			return ""; //$NON-NLS-1$
+		}
+		return optionsFileName;
+	}
+
+	public static String[] constructClasspath(ILaunchConfiguration configuration) throws CoreException {
+		double targetVersion = TargetPlatformHelper.getTargetVersion();
+		String jarPath = targetVersion >= 3.3 ? getEquinoxStartupPath(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER) : getStartupJarPath();
+		if (jarPath == null && targetVersion < 3.3)
+			jarPath = getEquinoxStartupPath("org.eclipse.core.launcher"); //$NON-NLS-1$
+
+		if (jarPath == null)
+			return null;
+
+		ArrayList entries = new ArrayList();
+		entries.add(jarPath);
+
+		String bootstrap = configuration.getAttribute(IPDELauncherConstants.BOOTSTRAP_ENTRIES, ""); //$NON-NLS-1$
+		StringTokenizer tok = new StringTokenizer(getSubstitutedString(bootstrap), ","); //$NON-NLS-1$
+		while (tok.hasMoreTokens())
+			entries.add(tok.nextToken().trim());
+		return (String[]) entries.toArray(new String[entries.size()]);
+	}
+
+	private static String getEquinoxStartupPath(String packageName) throws CoreException {
+		IPluginModelBase model = PluginRegistry.findModel(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER);
+		if (model != null) {
+			IResource resource = model.getUnderlyingResource();
+			// found in the target
+			if (resource == null)
+				return model.getInstallLocation();
+
+			// find it in the workspace
+			IProject project = resource.getProject();
+			if (project.hasNature(JavaCore.NATURE_ID)) {
+				IJavaProject jProject = JavaCore.create(project);
+				IClasspathEntry[] entries = jProject.getRawClasspath();
+				for (int i = 0; i < entries.length; i++) {
+					int kind = entries[i].getEntryKind();
+					if (kind == IClasspathEntry.CPE_SOURCE || kind == IClasspathEntry.CPE_LIBRARY) {
+						IPackageFragmentRoot[] roots = jProject.findPackageFragmentRoots(entries[i]);
+						for (int j = 0; j < roots.length; j++) {
+							if (roots[j].getPackageFragment(packageName).exists()) {
+								// if source folder, find the output folder
+								if (kind == IClasspathEntry.CPE_SOURCE) {
+									IPath path = entries[i].getOutputLocation();
+									if (path == null)
+										path = jProject.getOutputLocation();
+									path = path.removeFirstSegments(1);
+									return project.getLocation().append(path).toOSString();
+								}
+								// else if is a library jar, then get the location of the jar itself
+								IResource jar = roots[j].getResource();
+								if (jar != null) {
+									return jar.getLocation().toOSString();
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		Bundle bundle = Platform.getBundle(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER);
+		if (bundle != null) {
+			try {
+				URL url = FileLocator.resolve(bundle.getEntry("/")); //$NON-NLS-1$
+				url = FileLocator.toFileURL(url);
+				String path = url.getFile();
+				if (path.startsWith("file:")) //$NON-NLS-1$
+					path = path.substring(5);
+				path = new File(path).getAbsolutePath();
+				if (path.endsWith("!")) //$NON-NLS-1$
+					path = path.substring(0, path.length() - 1);
+				return path;
+			} catch (IOException e) {
+			}
+		}
+		return null;
+	}
+
+	private static String getStartupJarPath() throws CoreException {
+		IPluginModelBase model = PluginRegistry.findModel("org.eclipse.platform"); //$NON-NLS-1$
+		if (model != null && model.getUnderlyingResource() != null) {
+			IProject project = model.getUnderlyingResource().getProject();
+			if (project.hasNature(JavaCore.NATURE_ID)) {
+				IJavaProject jProject = JavaCore.create(project);
+				IPackageFragmentRoot[] roots = jProject.getPackageFragmentRoots();
+				for (int i = 0; i < roots.length; i++) {
+					if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE && roots[i].getPackageFragment("org.eclipse.core.launcher").exists()) { //$NON-NLS-1$
+						IPath path = jProject.getOutputLocation().removeFirstSegments(1);
+						return project.getLocation().append(path).toOSString();
+					}
+				}
+			}
+			if (project.getFile("startup.jar").exists()) //$NON-NLS-1$
+				return project.getFile("startup.jar").getLocation().toOSString(); //$NON-NLS-1$
+		}
+		File startupJar = new Path(TargetPlatform.getLocation()).append("startup.jar").toFile(); //$NON-NLS-1$
+
+		// if something goes wrong with the preferences, fall back on the startup.jar 
+		// in the running eclipse.  
+		if (!startupJar.exists())
+			startupJar = new Path(TargetPlatform.getDefaultLocation()).append("startup.jar").toFile(); //$NON-NLS-1$
+
+		return startupJar.exists() ? startupJar.getAbsolutePath() : null;
+	}
+
+	private static String getSubstitutedString(String text) throws CoreException {
+		if (text == null)
+			return ""; //$NON-NLS-1$
+		IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+		return mgr.performStringSubstitution(text);
+	}
+
+	public static String getDefaultWorkspaceLocation(String uniqueName) {
+		return "${workspace_loc}/../runtime-" + uniqueName.replaceAll("\\s", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+
+	public static String getDefaultJUnitWorkspaceLocation() {
+		return "${workspace_loc}/../junit-workspace"; //$NON-NLS-1$
+	}
+
+	public static String getDefaultJUnitConfigurationLocation() {
+		return "${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"; //$NON-NLS-1$
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java
new file mode 100644
index 0000000..e90518b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationHelper.java
@@ -0,0 +1,482 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+/**
+ * Contains helper methods for launching an Eclipse Runtime Workbench
+ */
+public class LaunchConfigurationHelper {
+
+	private static final String PROP_OSGI_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
+	private static final String PROP_OSGI_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
+	private static final String PROP_P2_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
+	private static final String DEFAULT_PROFILE_NAME = "SelfHostingProfile"; //$NON-NLS-1$
+
+	/**
+	 * The p2 data area will be set to a directory with this name inside the configuration folder
+	 */
+	private static final String DEFAULT_P2_DIRECTORY = ".p2"; //$NON-NLS-1$
+
+	public static void synchronizeManifests(ILaunchConfiguration config, File configDir) {
+		try {
+			String programArgs = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
+			if (programArgs.indexOf("-clean") != -1) //$NON-NLS-1$
+				return;
+		} catch (CoreException e) {
+		}
+		File dir = new File(configDir, "org.eclipse.osgi/manifests"); //$NON-NLS-1$
+		if (dir.exists() && dir.isDirectory()) {
+			PDECore.getDefault().getJavaElementChangeListener().synchronizeManifests(dir);
+		}
+	}
+
+	public static File getConfigurationArea(ILaunchConfiguration config) {
+		File dir = getConfigurationLocation(config);
+		if (!dir.exists())
+			dir.mkdirs();
+		return dir;
+	}
+
+	public static File getConfigurationLocation(ILaunchConfiguration config) {
+		//bug 170213 change config location if config name contains #
+		String configName = config.getName();
+		configName = configName.replace('#', 'h');
+		File dir = new File(PDECore.getDefault().getStateLocation().toOSString(), configName);
+		try {
+			if (!config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
+				String userPath = config.getAttribute(IPDELauncherConstants.CONFIG_LOCATION, (String) null);
+				if (userPath != null) {
+					userPath = getSubstitutedString(userPath);
+					dir = new File(userPath).getAbsoluteFile();
+				}
+			}
+		} catch (CoreException e) {
+		}
+		return dir;
+	}
+
+	private static String getSubstitutedString(String text) throws CoreException {
+		if (text == null)
+			return ""; //$NON-NLS-1$
+		IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+		return mgr.performStringSubstitution(text);
+	}
+
+	public static Properties createConfigIniFile(ILaunchConfiguration configuration, String productID, Map bundles, Map bundlesWithStartLevels, File configurationDirectory) throws CoreException {
+		Properties properties = null;
+		// if we are to generate a config.ini, start with the values in the target platform's config.ini - bug 141918
+		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
+			properties = TargetPlatformHelper.getConfigIniProperties();
+			// if target's config.ini does not exist, lets try to fill in default values
+			if (properties == null)
+				properties = new Properties();
+			// keep properties only if we are launching the default product (bug 175437)
+			else if (productID == null || !productID.equals(properties.get("eclipse.product"))) //$NON-NLS-1$
+				properties.clear();
+			// if target's config.ini has the osgi.bundles header, then parse and compute the proper osgi.bundles value
+			String bundleList = properties.getProperty(PROP_OSGI_BUNDLES);
+			if (bundleList != null)
+				properties.setProperty(PROP_OSGI_BUNDLES, computeOSGiBundles(TargetPlatformHelper.stripPathInformation(bundleList), bundles, bundlesWithStartLevels));
+		} else {
+			String templateLoc = configuration.getAttribute(IPDELauncherConstants.CONFIG_TEMPLATE_LOCATION, (String) null);
+			if (templateLoc != null) {
+				properties = loadFromTemplate(getSubstitutedString(templateLoc));
+				// if template contains osgi.bundles, then only strip the path, do not compute the value
+				String osgiBundles = properties.getProperty(PROP_OSGI_BUNDLES);
+				if (osgiBundles != null)
+					properties.setProperty(PROP_OSGI_BUNDLES, TargetPlatformHelper.stripPathInformation(osgiBundles));
+			}
+		}
+		// whether we create a new config.ini or read from one as a template, we should add the required properties - bug 161265
+		if (properties != null) {
+			addRequiredProperties(properties, productID, bundles, bundlesWithStartLevels);
+		} else {
+			properties = new Properties();
+		}
+		if (!configurationDirectory.exists()) {
+			configurationDirectory.mkdirs();
+		}
+		String osgiBundles = properties.getProperty(PROP_OSGI_BUNDLES);
+		int start = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
+		properties.put("osgi.bundles.defaultStartLevel", Integer.toString(start)); //$NON-NLS-1$
+		boolean autostart = configuration.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, false);
+
+		// Special processing for launching with p2
+		if (osgiBundles != null && osgiBundles.indexOf(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR) != -1 && bundles.containsKey(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
+
+			// If update configurator is set to its default start level, override it as simple/update configurators should not be autostarted together
+			Object updateConfiguratorBundle = bundles.get(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR);
+			if (updateConfiguratorBundle != null) {
+				String startLevel = (String) bundlesWithStartLevels.get(updateConfiguratorBundle);
+				if (startLevel != null && startLevel.equals(BundleLauncherHelper.DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL)) {
+					bundlesWithStartLevels.put(updateConfiguratorBundle, "4:false"); //$NON-NLS-1$
+				}
+			}
+
+			// Write out P2 files (bundles.txt)
+			URL bundlesTxt = null;
+			boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
+			boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
+			if (usedefault || useFeatures) {
+				bundlesTxt = P2Utils.writeBundlesTxt(bundlesWithStartLevels, 4, false, configurationDirectory, osgiBundles);
+			} else {
+				bundlesTxt = P2Utils.writeBundlesTxt(bundlesWithStartLevels, start, autostart, configurationDirectory, null);
+			}
+
+			// Add bundles.txt as p2 config data
+			if (bundlesTxt != null) {
+				properties.setProperty("org.eclipse.equinox.simpleconfigurator.configUrl", bundlesTxt.toString()); //$NON-NLS-1$
+				// if we have simple configurator and update configurator together, ensure update doesn't reconcile
+				if (bundles.get(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR) != null) {
+					properties.setProperty("org.eclipse.update.reconcile", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+
+			// Make the p2 data area in the configuration area itself, rather than a sibling of the configuration
+			// area (which is a the root pde.core shared metadata area) @see bug 272810
+			properties.setProperty(PROP_P2_DATA_AREA, "@config.dir/".concat(DEFAULT_P2_DIRECTORY)); //$NON-NLS-1$
+
+			// Generate a profile to launch with, set the profile id as the default
+			if (configuration.getAttribute(IPDELauncherConstants.GENERATE_PROFILE, false)) {
+				String profileID = DEFAULT_PROFILE_NAME;
+				File p2DataArea = new File(configurationDirectory, DEFAULT_P2_DIRECTORY);
+
+				// Unless we are restarting an existing profile, generate/overwrite the profile
+				if (!configuration.getAttribute(IPDEConstants.RESTART, false) || !P2Utils.profileExists(profileID, p2DataArea)) {
+					P2Utils.createProfile(profileID, p2DataArea, bundles.values());
+				}
+				properties.setProperty("eclipse.p2.profile", profileID); //$NON-NLS-1$
+			}
+		}
+
+		setBundleLocations(bundles, properties, autostart);
+
+		save(new File(configurationDirectory, "config.ini"), properties); //$NON-NLS-1$
+		return properties;
+	}
+
+	private static void addRequiredProperties(Properties properties, String productID, Map bundles, Map bundlesWithStartLevels) {
+		if (!properties.containsKey("osgi.install.area")) //$NON-NLS-1$
+			properties.setProperty("osgi.install.area", "file:" + TargetPlatform.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!properties.containsKey("osgi.configuration.cascaded")) //$NON-NLS-1$
+			properties.setProperty("osgi.configuration.cascaded", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (!properties.containsKey(PROP_OSGI_FRAMEWORK))
+			properties.setProperty(PROP_OSGI_FRAMEWORK, IPDEBuildConstants.BUNDLE_OSGI);
+		if (!properties.containsKey("osgi.splashPath") && productID != null) //$NON-NLS-1$
+			addSplashLocation(properties, productID, bundles);
+		// if osgi.splashPath is set, try to resolve relative paths to absolute paths
+		if (properties.containsKey("osgi.splashPath")) //$NON-NLS-1$
+			resolveLocationPath(properties.getProperty("osgi.splashPath"), properties, bundles); //$NON-NLS-1$
+		if (!properties.containsKey(PROP_OSGI_BUNDLES))
+			properties.setProperty(PROP_OSGI_BUNDLES, computeOSGiBundles(TargetPlatform.getBundleList(), bundles, bundlesWithStartLevels));
+		if (!properties.containsKey("osgi.bundles.defaultStartLevel")) //$NON-NLS-1$
+			properties.setProperty("osgi.bundles.defaultStartLevel", "4"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Computes a list of osgi bundles to be put into the osgi.bundles property based
+	 * on the bundles from the target platform config.ini and a map of bundles we are
+	 * launching with.  The list of bundles must have already had it's path information
+	 * removed.
+	 * @param bundleList list of bundles without path information
+	 * @param bundles map of bundle id to bundle model, contains all bundles being launched with
+	 * @param bundlesWithStartLevels map of bundles of start level
+	 * @return string list of osgi bundles
+	 */
+	private static String computeOSGiBundles(String bundleList, Map bundles, Map bundlesWithStartLevels) {
+
+		// if p2 and only simple configurator and 
+		// if simple configurator isn't selected & isn't in bundle list... hack it
+
+		// if using p2's simple configurator, a bundles.txt will be written, so we only need simple configurator in the config.ini
+		if (bundles.get(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR) != null)
+			return "org.eclipse.equinox.simpleconfigurator at 1:start"; //$NON-NLS-1$
+
+		StringBuffer buffer = new StringBuffer();
+		Set initialBundleSet = new HashSet();
+		StringTokenizer tokenizer = new StringTokenizer(bundleList, ","); //$NON-NLS-1$
+		while (tokenizer.hasMoreTokens()) {
+			String token = tokenizer.nextToken();
+			int index = token.indexOf('@');
+			String id = index != -1 ? token.substring(0, index) : token;
+			if (bundles.containsKey(id)) {
+				if (buffer.length() > 0)
+					buffer.append(',');
+				buffer.append(id);
+				if (index != -1 && index < token.length() - 1)
+					buffer.append(token.substring(index));
+				initialBundleSet.add(id);
+			}
+		}
+
+		// if org.eclipse.update.configurator is not included (LIKE IN BASIC RCP APPLICATION), then write out all bundles in osgi.bundles - bug 170772
+		if (!initialBundleSet.contains(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR)) {
+			initialBundleSet.add(IPDEBuildConstants.BUNDLE_OSGI);
+			Iterator iter = bundlesWithStartLevels.keySet().iterator();
+			while (iter.hasNext()) {
+				IPluginModelBase model = (IPluginModelBase) iter.next();
+				String id = model.getPluginBase().getId();
+				if (!initialBundleSet.contains(id)) {
+					if (buffer.length() > 0)
+						buffer.append(',');
+
+					String slinfo = (String) bundlesWithStartLevels.get(model);
+					buffer.append(id);
+					buffer.append('@');
+					buffer.append(slinfo);
+				}
+			}
+		}
+		return buffer.toString();
+	}
+
+	private static Properties loadFromTemplate(String templateLoc) throws CoreException {
+		Properties properties = new Properties();
+		File templateFile = new File(templateLoc);
+		if (templateFile.exists() && templateFile.isFile()) {
+			FileInputStream stream = null;
+			try {
+				stream = new FileInputStream(templateFile);
+				properties.load(stream);
+			} catch (Exception e) {
+				String message = e.getMessage();
+				if (message != null)
+					throw new CoreException(new Status(IStatus.ERROR, PDELaunchingPlugin.getPluginId(), IStatus.ERROR, message, e));
+			} finally {
+				if (stream != null) {
+					try {
+						stream.close();
+					} catch (IOException e) {
+					}
+				}
+			}
+		}
+		return properties;
+	}
+
+	private static void addSplashLocation(Properties properties, String productID, Map map) {
+		Properties targetConfig = TargetPlatformHelper.getConfigIniProperties();
+		String targetProduct = targetConfig == null ? null : targetConfig.getProperty("eclipse.product"); //$NON-NLS-1$
+		String targetSplash = targetConfig == null ? null : targetConfig.getProperty("osgi.splashPath"); //$NON-NLS-1$
+		if (!productID.equals(targetProduct) || targetSplash == null) {
+			ArrayList locations = new ArrayList();
+			String plugin = getContributingPlugin(productID);
+			locations.add(plugin);
+			IPluginModelBase model = (IPluginModelBase) map.get(plugin);
+			if (model != null) {
+				BundleDescription desc = model.getBundleDescription();
+				if (desc != null) {
+					BundleDescription[] fragments = desc.getFragments();
+					for (int i = 0; i < fragments.length; i++)
+						locations.add(fragments[i].getSymbolicName());
+				}
+			}
+			resolveLocationPath(locations, properties, map);
+		} else
+			resolveLocationPath(targetSplash, properties, map);
+	}
+
+	private static void resolveLocationPath(String splashPath, Properties properties, Map map) {
+		ArrayList locations = new ArrayList();
+		StringTokenizer tok = new StringTokenizer(splashPath, ","); //$NON-NLS-1$
+		while (tok.hasMoreTokens())
+			locations.add(tok.nextToken());
+		resolveLocationPath(locations, properties, map);
+	}
+
+	private static void resolveLocationPath(ArrayList locations, Properties properties, Map map) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < locations.size(); i++) {
+			String location = (String) locations.get(i);
+			if (location.startsWith("platform:/base/plugins/")) { //$NON-NLS-1$
+				location = location.replaceFirst("platform:/base/plugins/", ""); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+			String url = getBundleURL(location, map, false);
+			if (url == null)
+				continue;
+			if (buffer.length() > 0)
+				buffer.append(","); //$NON-NLS-1$
+			buffer.append(url);
+		}
+		if (buffer.length() > 0)
+			properties.setProperty("osgi.splashPath", buffer.toString()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns a string url representing the install location of the bundle model with the
+	 * specified id.  The model is obtained using the provided map.
+	 * @param id the id of the bundle
+	 * @param pluginMap mapping of bundle ids to bundle models
+	 * @param includeReference whether to prefix the url with 'reference:'
+	 * @return string url for the bundle location
+	 */
+	public static String getBundleURL(String id, Map pluginMap, boolean includeReference) {
+		IPluginModelBase model = (IPluginModelBase) pluginMap.get(id.trim());
+		return getBundleURL(model, includeReference);
+	}
+
+	/**
+	 * Returns a string url representing the install location of the given bundle model
+	 * @param model the model to create the url for
+	 * @param includeReference whether to prefix the url with 'reference:'
+	 * @return string url for bundle location
+	 */
+	public static String getBundleURL(IPluginModelBase model, boolean includeReference) {
+		if (model == null || model.getInstallLocation() == null)
+			return null;
+		StringBuffer buf = new StringBuffer();
+		if (includeReference) {
+			buf.append(TargetPlatformHelper.REFERENCE_PREFIX);
+		}
+		buf.append(TargetPlatformHelper.FILE_URL_PREFIX);
+		buf.append(new Path(model.getInstallLocation()).removeTrailingSeparator().toString());
+		return buf.toString();
+	}
+
+	/**
+	 * Use the map of bundles we are launching with to update the osgi.framework
+	 * and osgi.bundles properties with the correct info.
+	 * @param map map of bundles being launched (id mapped to model)
+	 * @param properties properties for config.ini
+	 */
+	private static void setBundleLocations(Map map, Properties properties, boolean defaultAuto) {
+		String framework = properties.getProperty(PROP_OSGI_FRAMEWORK);
+		if (framework != null) {
+			framework = TargetPlatformHelper.stripPathInformation(framework);
+			String url = getBundleURL(framework, map, false);
+			if (url != null)
+				properties.setProperty(PROP_OSGI_FRAMEWORK, url);
+		}
+
+		String bundles = properties.getProperty(PROP_OSGI_BUNDLES);
+		if (bundles != null) {
+			StringBuffer buffer = new StringBuffer();
+			StringTokenizer tokenizer = new StringTokenizer(bundles, ","); //$NON-NLS-1$
+			while (tokenizer.hasMoreTokens()) {
+				String token = tokenizer.nextToken().trim();
+				String url = getBundleURL(token, map, false);
+				int i = -1;
+				if (url == null) {
+					i = token.indexOf('@');
+					if (i != -1) {
+						url = getBundleURL(token.substring(0, i), map, false);
+					}
+					if (url == null) {
+						i = token.indexOf(':');
+						if (i != -1)
+							url = getBundleURL(token.substring(0, i), map, false);
+					}
+				}
+				if (url != null) {
+					if (buffer.length() > 0) {
+						buffer.append(","); //$NON-NLS-1$
+					}
+					buffer.append("reference:" + url); //$NON-NLS-1$
+					if (i != -1) {
+						String slinfo = token.substring(i + 1);
+						buffer.append(getStartData(slinfo, defaultAuto));
+					}
+				}
+			}
+			properties.setProperty(PROP_OSGI_BUNDLES, buffer.toString());
+		}
+	}
+
+	/**
+	 * Convenience method to parses the startData ("startLevel:autoStart"), convert it to the
+	 * format expected by the OSGi bundles property, and append to a StringBuffer.
+	 * @param startData data to parse ("startLevel:autoStart")
+	 * @param defaultAuto default auto start setting
+	 */
+	public static String getStartData(String startData, boolean defaultAuto) {
+		StringBuffer buffer = new StringBuffer();
+		int index = startData.indexOf(':');
+		String level = index > 0 ? startData.substring(0, index) : "default"; //$NON-NLS-1$
+		String auto = startData;
+		if (!startData.equals("start")) //$NON-NLS-1$
+			auto = index >= 0 && index < startData.length() - 1 ? startData.substring(index + 1) : "default"; //$NON-NLS-1$
+		if ("default".equals(auto)) //$NON-NLS-1$
+			auto = Boolean.toString(defaultAuto);
+		if (!level.equals("default") || "true".equals(auto) || "start".equals(auto)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			buffer.append("@"); //$NON-NLS-1$
+
+		if (!level.equals("default")) { //$NON-NLS-1$
+			buffer.append(level);
+			if ("start".equals(auto) || "true".equals(auto)) //$NON-NLS-1$ //$NON-NLS-2$
+				buffer.append(":"); //$NON-NLS-1$
+		}
+		if ("start".equals(auto) || "true".equals(auto)) { //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("start"); //$NON-NLS-1$
+		}
+		return buffer.toString();
+	}
+
+	public static void save(File file, Properties properties) {
+		try {
+			FileOutputStream stream = new FileOutputStream(file);
+			properties.store(stream, "Configuration File"); //$NON-NLS-1$
+			stream.flush();
+			stream.close();
+		} catch (IOException e) {
+			PDECore.logException(e);
+		}
+	}
+
+	public static String getContributingPlugin(String productID) {
+		if (productID == null)
+			return null;
+		int index = productID.lastIndexOf('.');
+		return index == -1 ? productID : productID.substring(0, index);
+	}
+
+	public static String getProductID(ILaunchConfiguration configuration) throws CoreException {
+		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
+			return configuration.getAttribute(IPDELauncherConstants.PRODUCT, (String) null);
+		}
+
+		// find the product associated with the application, and return its
+		// contributing plug-in
+		String appID = configuration.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication());
+		IExtension[] extensions = PDECore.getDefault().getExtensionsRegistry().findExtensions("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
+		for (int i = 0; i < extensions.length; i++) {
+			String id = extensions[i].getUniqueIdentifier();
+			if (id == null)
+				continue;
+			IConfigurationElement[] children = extensions[i].getConfigurationElements();
+			if (children.length != 1)
+				continue;
+			if (!"product".equals(children[0].getName())) //$NON-NLS-1$
+				continue;
+			if (appID.equals(children[0].getAttribute("application"))) //$NON-NLS-1$
+				return id;
+		}
+		return null;
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationListener.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationListener.java
new file mode 100644
index 0000000..636663a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchConfigurationListener.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.File;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.core.*;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+
+public class LaunchConfigurationListener implements ILaunchConfigurationListener {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void launchConfigurationAdded(ILaunchConfiguration configuration) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void launchConfigurationChanged(ILaunchConfiguration configuration) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
+		final File configDir = LaunchConfigurationHelper.getConfigurationLocation(configuration);
+		if (configDir.exists()) {
+			// rename the config area if it was auto-set by PDE when the launch configuration is renamed
+			ILaunchConfiguration destination = DebugPlugin.getDefault().getLaunchManager().getMovedTo(configuration);
+			boolean delete = true;
+			if (destination != null) {
+				delete = !configDir.renameTo(LaunchConfigurationHelper.getConfigurationLocation(destination));
+			}
+			// delete asynchronously in a job to avoid blocking calling thread
+			if (delete) {
+				Job job = new Job("Clean Configuration Data") { //$NON-NLS-1$
+					protected IStatus run(IProgressMonitor monitor) {
+						CoreUtility.deleteContent(configDir);
+						return Status.OK_STATUS;
+					}
+				};
+				job.setSystem(true);
+				job.schedule();
+			}
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java
new file mode 100644
index 0000000..bf5c49d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchListener.java
@@ -0,0 +1,187 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.File;
+import java.util.ArrayList;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.pde.internal.launching.*;
+
+public class LaunchListener implements ILaunchListener, IDebugEventSetListener {
+	private ArrayList managedLaunches;
+
+	public LaunchListener() {
+		managedLaunches = new ArrayList();
+	}
+
+	public void manage(ILaunch launch) {
+		if (managedLaunches.size() == 0)
+			hookListener(true);
+		if (!managedLaunches.contains(launch))
+			managedLaunches.add(launch);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchRemoved(ILaunch launch) {
+		update(launch, true);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchAdded(ILaunch launch) {
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchChanged(ILaunch launch) {
+	}
+
+	private void update(ILaunch launch, boolean remove) {
+		if (managedLaunches.contains(launch)) {
+			if (remove || launch.isTerminated()) {
+				managedLaunches.remove(launch);
+				if (managedLaunches.size() == 0) {
+					hookListener(false);
+				}
+			}
+		}
+	}
+
+	private void hookListener(boolean add) {
+		DebugPlugin debugPlugin = DebugPlugin.getDefault();
+		ILaunchManager launchManager = debugPlugin.getLaunchManager();
+		if (add) {
+			launchManager.addLaunchListener(this);
+			debugPlugin.addDebugEventListener(this);
+		} else {
+			launchManager.removeLaunchListener(this);
+			debugPlugin.removeDebugEventListener(this);
+		}
+	}
+
+	private void doRestart(ILaunch launch) {
+		ILaunchConfiguration config = launch.getLaunchConfiguration();
+		try {
+			ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
+			copy.setAttribute(IPDEConstants.RESTART, true);
+			copy.launch(launch.getLaunchMode(), new NullProgressMonitor());
+		} catch (CoreException e) {
+			Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, 42, null, e);
+			IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+			if (statusHandler == null)
+				PDELaunchingPlugin.log(e);
+			else {
+				try {
+					statusHandler.handleStatus(status, null);
+				} catch (CoreException e1) {
+					// status handler failed to log the original exception
+					// log it ourselves
+					PDELaunchingPlugin.log(e);
+				}
+			}
+		}
+	}
+
+	public void shutdown() {
+		hookListener(false);
+	}
+
+	/**
+	 * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent)
+	 */
+	public void handleDebugEvents(DebugEvent[] events) {
+		for (int i = 0; i < events.length; i++) {
+			DebugEvent event = events[i];
+			Object source = event.getSource();
+			if (source instanceof IProcess && event.getKind() == DebugEvent.TERMINATE) {
+				IProcess process = (IProcess) source;
+				ILaunch launch = process.getLaunch();
+				if (launch != null) {
+					try {
+						launchTerminated(launch, process.getExitValue());
+					} catch (DebugException e) {
+					} catch (CoreException e) {
+						PDELaunchingPlugin.log(e);
+					}
+				}
+			}
+		}
+	}
+
+	private void launchTerminated(final ILaunch launch, int returnValue) throws CoreException {
+		if (managedLaunches.contains(launch)) {
+			update(launch, true);
+			if (returnValue == 23) {
+				doRestart(launch);
+				return;
+			}
+			// launch failed because the associated workspace is in use
+			// FIXME: I failed to come up with a constellation that produces this error.
+			// I suppose this no longer happens with PDE 3.6 since this error condition is detected earlier 
+			if (returnValue == 15) {
+				Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, returnValue, PDEMessages.Launcher_error_code15, null);
+				IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+				if (statusHandler == null)
+					PDELaunchingPlugin.log(status);
+				else
+					statusHandler.handleStatus(status, launch);
+				return;
+			}
+			// launch failed for reasons printed to the log.
+			if (returnValue == 13) {
+				Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, returnValue, PDEMessages.Launcher_error_code13, null);
+				IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+				if (statusHandler == null)
+					PDELaunchingPlugin.log(status);
+				else
+					statusHandler.handleStatus(status, launch);
+				return;
+			}
+		}
+	}
+
+	/**
+	 * Returns latest log file for Launch Configuration.
+	 * It's ".metadala/.log", file with most recent timestamp ending with ".log"
+	 * in configuration location or null if none found.
+	 *
+	 * @returns log file or null
+	 * @throws CoreException
+	 * @since 3.4
+	 */
+	public static File getMostRecentLogFile(ILaunchConfiguration configuration) throws CoreException {
+		File latest = null;
+		String workspace = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
+		if (workspace.length() > 0) {
+			latest = new File(workspace, ".metadata/.log"); //$NON-NLS-1$
+			if (!latest.exists())
+				latest = null;
+		}
+		File configDir = LaunchConfigurationHelper.getConfigurationLocation(configuration);
+		File[] children = configDir.listFiles();
+		if (children != null) {
+			for (int i = 0; i < children.length; i++) {
+				if (!children[i].isDirectory() && children[i].getName().endsWith(".log")) { //$NON-NLS-1$
+					if (latest == null || latest.lastModified() < children[i].lastModified())
+						latest = children[i];
+				}
+			}
+		}
+		return latest;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchPluginValidator.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchPluginValidator.java
new file mode 100644
index 0000000..b05ce30
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchPluginValidator.java
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.SearchablePluginsManager;
+import org.eclipse.pde.internal.launching.*;
+
+public class LaunchPluginValidator {
+	public static final int DISPLAY_VALIDATION_ERROR_CODE = 1001;
+
+	private static IPluginModelBase[] getSelectedWorkspacePlugins(ILaunchConfiguration configuration) throws CoreException {
+
+		boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
+		boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
+
+		IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
+
+		if (usedefault || useFeatures || models.length == 0)
+			return models;
+
+		Collection result = null;
+		Map bundles = BundleLauncherHelper.getWorkspaceBundleMap(configuration, null, IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS);
+		result = bundles.keySet();
+		return (IPluginModelBase[]) result.toArray(new IPluginModelBase[result.size()]);
+	}
+
+	/**
+	 * 
+	 * @param configuration launchConfiguration to get the attribute value
+	 * @param attribute launch configuration attribute to containing plug-in information
+	 * @return a TreeSet containing IPluginModelBase objects which are represented by the value of the attribute
+	 * @throws CoreException
+	 */
+	public static Set parsePlugins(ILaunchConfiguration configuration, String attribute) throws CoreException {
+		HashSet set = new HashSet();
+		String ids = configuration.getAttribute(attribute, (String) null);
+		if (ids != null) {
+			String[] entries = ids.split(","); //$NON-NLS-1$
+			Map unmatchedEntries = new HashMap();
+			for (int i = 0; i < entries.length; i++) {
+				int index = entries[i].indexOf('@');
+				if (index < 0) { // if no start levels, assume default
+					entries[i] = entries[i].concat("@default:default"); //$NON-NLS-1$
+					index = entries[i].indexOf('@');
+				}
+				String idVersion = entries[i].substring(0, index);
+				int versionIndex = entries[i].indexOf(BundleLauncherHelper.VERSION_SEPARATOR);
+				String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
+				String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
+				ModelEntry entry = PluginRegistry.findEntry(id);
+				if (entry != null) {
+					IPluginModelBase matchingModels[] = attribute.equals(IPDELauncherConstants.SELECTED_TARGET_PLUGINS) ? entry.getExternalModels() : entry.getWorkspaceModels();
+					for (int j = 0; j < matchingModels.length; j++) {
+						if (matchingModels[j].isEnabled()) {
+							// TODO Very similar logic to BundleLauncherHelper
+							// the logic here is this (see bug 225644)
+							// a) if we come across a bundle that has the right version, immediately add it
+							// b) if there's no version, add it
+							// c) if there's only one instance of that bundle in the list of ids... add it
+							if (version == null || matchingModels[j].getPluginBase().getVersion().equals(version)) {
+								set.add(matchingModels[j]);
+							} else if (matchingModels.length == 1) {
+								if (unmatchedEntries.remove(id) == null) {
+									unmatchedEntries.put(id, matchingModels[j]);
+								}
+							}
+						}
+					}
+				}
+			}
+			set.addAll(unmatchedEntries.values());
+		}
+		return set;
+	}
+
+	public static IProject[] getAffectedProjects(ILaunchConfiguration config) throws CoreException {
+		// if restarting, no need to check projects for errors
+		if (config.getAttribute(IPDEConstants.RESTART, false))
+			return new IProject[0];
+		ArrayList projects = new ArrayList();
+		IPluginModelBase[] models = getSelectedWorkspacePlugins(config);
+		for (int i = 0; i < models.length; i++) {
+			IProject project = models[i].getUnderlyingResource().getProject();
+			if (project.hasNature(JavaCore.NATURE_ID))
+				projects.add(project);
+		}
+
+		// add fake "Java Search" project
+		SearchablePluginsManager manager = PDECore.getDefault().getSearchablePluginsManager();
+		IJavaProject proxy = manager.getProxyProject();
+		if (proxy != null) {
+			projects.add(proxy.getProject());
+		}
+		return (IProject[]) projects.toArray(new IProject[projects.size()]);
+	}
+
+	public static void runValidationOperation(final LaunchValidationOperation op, IProgressMonitor monitor) throws CoreException {
+		op.run(monitor);
+		if (op.hasErrors()) {
+			String message = NLS.bind(PDEMessages.PluginValidation_error, op.getInput().toString());
+			Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, DISPLAY_VALIDATION_ERROR_CODE, message, null);
+			IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+			if (statusHandler == null)
+				PDELaunchingPlugin.log(status);
+			else
+				statusHandler.handleStatus(status, op);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchValidationOperation.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchValidationOperation.java
new file mode 100644
index 0000000..948746d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LaunchValidationOperation.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ *  Copyright (c) 2007, 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.*;
+import java.util.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.BundleValidationOperation;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.osgi.framework.Constants;
+
+public abstract class LaunchValidationOperation implements IWorkspaceRunnable {
+
+	private BundleValidationOperation fOperation;
+	protected ILaunchConfiguration fLaunchConfiguration;
+
+	public LaunchValidationOperation(ILaunchConfiguration configuration) {
+		fLaunchConfiguration = configuration;
+	}
+
+	public void run(IProgressMonitor monitor) throws CoreException {
+		fOperation = new BundleValidationOperation(getModels(), getPlatformProperties());
+		fOperation.run(monitor);
+	}
+
+	protected abstract IPluginModelBase[] getModels() throws CoreException;
+
+	protected Dictionary[] getPlatformProperties() throws CoreException {
+		IExecutionEnvironment[] envs = getMatchingEnvironments();
+		if (envs.length == 0)
+			return new Dictionary[] {TargetPlatformHelper.getTargetEnvironment()};
+
+		// add java profiles for those EE's that have a .profile file in the current system bundle
+		ArrayList result = new ArrayList(envs.length);
+		for (int i = 0; i < envs.length; i++) {
+			Properties profileProps = getJavaProfileProperties(envs[i].getId());
+			if (profileProps != null) {
+				Dictionary props = TargetPlatformHelper.getTargetEnvironment();
+				String systemPackages = profileProps.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
+				if (systemPackages != null)
+					props.put(Constants.FRAMEWORK_SYSTEMPACKAGES, systemPackages);
+				String ee = profileProps.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
+				if (ee != null)
+					props.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, ee);
+				result.add(props);
+			}
+		}
+		if (result.size() > 0)
+			return (Dictionary[]) result.toArray(new Dictionary[result.size()]);
+		return new Dictionary[] {TargetPlatformHelper.getTargetEnvironment()};
+
+	}
+
+	protected IExecutionEnvironment[] getMatchingEnvironments() throws CoreException {
+		IVMInstall install = VMHelper.getVMInstall(fLaunchConfiguration);
+		if (install == null)
+			return new IExecutionEnvironment[0];
+
+		IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
+		IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
+		List result = new ArrayList(envs.length);
+		for (int i = 0; i < envs.length; i++) {
+			IExecutionEnvironment env = envs[i];
+			IVMInstall[] compatible = env.getCompatibleVMs();
+			for (int j = 0; j < compatible.length; j++) {
+				if (compatible[j].equals(install)) {
+					result.add(env);
+					break;
+				}
+			}
+		}
+		return (IExecutionEnvironment[]) result.toArray(new IExecutionEnvironment[result.size()]);
+	}
+
+	private Properties getJavaProfileProperties(String ee) {
+		IPluginModelBase model = PluginRegistry.findModel("system.bundle"); //$NON-NLS-1$
+		if (model == null)
+			return null;
+
+		File location = new File(model.getInstallLocation());
+		String filename = ee.replace('/', '_') + ".profile"; //$NON-NLS-1$
+		InputStream is = null;
+		ZipFile zipFile = null;
+		try {
+			// find the input stream to the profile properties file
+			if (location.isDirectory()) {
+				File file = new File(location, filename);
+				if (file.exists())
+					is = new FileInputStream(file);
+			} else {
+				zipFile = null;
+				try {
+					zipFile = new ZipFile(location, ZipFile.OPEN_READ);
+					ZipEntry entry = zipFile.getEntry(filename);
+					if (entry != null)
+						is = zipFile.getInputStream(entry);
+				} catch (IOException e) {
+					// nothing to do
+				}
+			}
+			if (is != null) {
+				Properties profile = new Properties();
+				profile.load(is);
+				return profile;
+			}
+		} catch (IOException e) {
+			// nothing to do
+		} finally {
+			if (is != null)
+				try {
+					is.close();
+				} catch (IOException e) {
+					// nothing to do
+				}
+			if (zipFile != null)
+				try {
+					zipFile.close();
+				} catch (IOException e) {
+					// nothing to do
+				}
+		}
+		return null;
+	}
+
+	public boolean hasErrors() {
+		return fOperation.hasErrors();
+	}
+
+	public Map getInput() {
+		return fOperation.getResolverErrors();
+	}
+
+	public boolean isEmpty() {
+		return fOperation.getState().getHighestBundleId() == -1;
+	}
+
+	protected State getState() {
+		return fOperation.getState();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LauncherUtils.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LauncherUtils.java
new file mode 100644
index 0000000..43c03b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/LauncherUtils.java
@@ -0,0 +1,347 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.osgi.framework.*;
+
+public class LauncherUtils {
+	public static final int WORKSPACE_LOCKED = 2000;
+	public static final int CLEAR_LOG = 2001;
+	public static final int DELETE_WORKSPACE = 2002;
+	public static final int GENERATE_CONFIG_INI = 2003;
+	public static final int ORGANIZE_MANIFESTS = 2004;
+
+	private static final String TIMESTAMP = "timestamp"; //$NON-NLS-1$
+	private static final String FILE_NAME = "dep-timestamp.properties"; //$NON-NLS-1$
+	private static Properties fLastRun;
+
+	public static boolean clearWorkspace(ILaunchConfiguration configuration, String workspace, IProgressMonitor monitor) throws CoreException {
+
+		// If the workspace is not defined, there is no workspace to clear
+		// What will happen is that the workspace chooser dialog will be 
+		// brought up because no -data parameter will be specified on the 
+		// launch
+		if (workspace.length() == 0) {
+			monitor.done();
+			return true;
+		}
+
+		// Check if the workspace is already in use, if so, open a message and stop the launch before clearing
+		boolean isLocked = false;
+		try {
+			BundleContext context = PDECore.getDefault().getBundleContext();
+			ServiceReference[] references = context.getServiceReferences(Location.class.getName(), "(type=osgi.configuration.area)"); //$NON-NLS-1$
+			if (references.length > 0) {
+				Object service = context.getService(references[0]);
+				if (service instanceof Location) {
+					URL workspaceURL = new Path(workspace).toFile().toURI().toURL();
+					Location targetLocation = ((Location) service).createLocation(null, workspaceURL, false);
+					targetLocation.set(targetLocation.getDefault(), false);
+					isLocked = targetLocation.isLocked();
+				}
+			}
+		} catch (InvalidSyntaxException e) {
+			PDECore.log(e);
+			isLocked = false;
+		} catch (MalformedURLException e) {
+			PDECore.log(e);
+			isLocked = false;
+		} catch (IOException e) {
+			PDECore.log(e);
+			isLocked = false;
+		}
+
+		if (isLocked) {
+			Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, WORKSPACE_LOCKED, null, null);
+			IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+			if (statusHandler != null)
+				statusHandler.handleStatus(status, workspace);
+			monitor.done();
+			return false;
+		}
+
+		File workspaceFile = new Path(workspace).toFile().getAbsoluteFile();
+		if (configuration.getAttribute(IPDELauncherConstants.DOCLEAR, false) && workspaceFile.exists()) {
+			if (configuration.getAttribute(IPDELauncherConstants.ASKCLEAR, true)) {
+				int result = 0;
+				if (configuration.getAttribute(IPDEConstants.DOCLEARLOG, false)) {
+					Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, CLEAR_LOG, null, null);
+					IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+					if (statusHandler != null)
+						result = ((Integer) statusHandler.handleStatus(status, null)).intValue();
+				} else {
+					Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, DELETE_WORKSPACE, null, null);
+					IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+					if (statusHandler != null)
+						result = ((Integer) statusHandler.handleStatus(status, workspaceFile.getPath())).intValue();
+				}
+
+				if (result == 2 /*Cancel Button*/|| result == -1 /*Dialog close button*/) {
+					monitor.done();
+					return false;
+				} else if (result == 0) {
+					if (configuration.getAttribute(IPDEConstants.DOCLEARLOG, false)) {
+						LauncherUtils.clearWorkspaceLog(workspace);
+					} else {
+						CoreUtility.deleteContent(workspaceFile);
+					}
+				}
+			} else if (configuration.getAttribute(IPDEConstants.DOCLEARLOG, false)) {
+				LauncherUtils.clearWorkspaceLog(workspace);
+			} else {
+				CoreUtility.deleteContent(workspaceFile);
+			}
+		}
+
+		monitor.done();
+		return true;
+	}
+
+	public static boolean generateConfigIni() throws CoreException {
+		Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, GENERATE_CONFIG_INI, null, null);
+		IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+		return statusHandler == null ? true : ((Boolean) statusHandler.handleStatus(status, null)).booleanValue();
+	}
+
+	public static void validateProjectDependencies(ILaunchConfiguration launch, final IProgressMonitor monitor) {
+		PDEPreferencesManager store = PDELaunchingPlugin.getDefault().getPreferenceManager();
+		if (!store.getBoolean(org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants.PROP_AUTO_MANAGE))
+			return;
+
+		String timeStamp;
+		boolean useDefault, autoAdd;
+		try {
+			timeStamp = launch.getAttribute(TIMESTAMP, "0"); //$NON-NLS-1$
+			autoAdd = launch.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
+			useDefault = launch.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
+			useDefault |= launch.getAttribute(IPDELauncherConstants.USEFEATURES, false);
+			final ArrayList projects = new ArrayList();
+			if (useDefault)
+				handleUseDefault(timeStamp, projects);
+			else if (autoAdd)
+				handleDeselectedPlugins(launch, timeStamp, projects);
+			else
+				handleSelectedPlugins(launch, timeStamp, projects);
+
+			if (!projects.isEmpty()) {
+				Status status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, ORGANIZE_MANIFESTS, null, null);
+				IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(status);
+				if (statusHandler != null)
+					statusHandler.handleStatus(status, new Object[] {projects, monitor, getLastRun()});
+			}
+
+			ILaunchConfigurationWorkingCopy wc = null;
+			if (launch.isWorkingCopy())
+				wc = (ILaunchConfigurationWorkingCopy) launch;
+			else
+				wc = launch.getWorkingCopy();
+			wc.setAttribute(TIMESTAMP, Long.toString(System.currentTimeMillis()));
+			wc.doSave();
+		} catch (CoreException e) {
+		}
+	}
+
+	private static String getTimeStamp(IProject project) {
+		IJavaProject jp = JavaCore.create(project);
+		try {
+			long timeStamp = 0;
+			IClasspathEntry[] entries = jp.getResolvedClasspath(true);
+			for (int i = 0; i < entries.length; i++) {
+				if (entries[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
+					File file;
+					IPath location = entries[i].getOutputLocation();
+					if (location == null)
+						location = jp.getOutputLocation();
+					IResource res = project.getWorkspace().getRoot().findMember(location);
+					IPath path = res == null ? null : res.getLocation();
+					if (path == null)
+						continue;
+					file = path.toFile();
+					Stack files = new Stack();
+					files.push(file);
+					while (!files.isEmpty()) {
+						file = (File) files.pop();
+						if (file.isDirectory()) {
+							File[] children = file.listFiles();
+							if (children != null) {
+								for (int j = 0; j < children.length; j++)
+									files.push(children[j]);
+							}
+						} else if (file.getName().endsWith(".class") && timeStamp < file.lastModified()) //$NON-NLS-1$
+							timeStamp = file.lastModified();
+					}
+				}
+			}
+			IFile[] otherFiles = new IFile[] {PDEProject.getManifest(project), PDEProject.getBuildProperties(project)};
+			for (int i = 0; i < otherFiles.length; i++) {
+				IFile file = otherFiles[i];
+				if (file != null) {
+					long fileTimeStamp = file.getRawLocation().toFile().lastModified();
+					if (timeStamp < fileTimeStamp)
+						timeStamp = fileTimeStamp;
+				}
+			}
+			return Long.toString(timeStamp);
+		} catch (JavaModelException e) {
+		}
+		return "0"; //$NON-NLS-1$
+	}
+
+	private static void handleUseDefault(String launcherTimeStamp, ArrayList projects) {
+		IProject[] projs = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+		for (int i = 0; i < projs.length; i++) {
+			if (!WorkspaceModelManager.isPluginProject(projs[i]))
+				continue;
+			String timestamp = getTimeStamp(projs[i]);
+			if (timestamp.compareTo(launcherTimeStamp) > 0 && shouldAdd(projs[i], launcherTimeStamp, timestamp))
+				projects.add(projs[i]);
+		}
+	}
+
+	private static void handleSelectedPlugins(ILaunchConfiguration config, String timeStamp, ArrayList projects) throws CoreException {
+		Map selectedPlugins = BundleLauncherHelper.getWorkspaceBundleMap(config, null, IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS);
+		Iterator it = selectedPlugins.keySet().iterator();
+		while (it.hasNext()) {
+			IPluginModelBase model = (IPluginModelBase) it.next();
+			IResource res = model.getUnderlyingResource();
+			if (res != null) {
+				IProject project = res.getProject();
+				String projTimeStamp = getTimeStamp(project);
+				if (projTimeStamp.compareTo(timeStamp) > 0 && shouldAdd(project, timeStamp, projTimeStamp))
+					projects.add(project);
+			}
+		}
+	}
+
+	private static void handleDeselectedPlugins(ILaunchConfiguration config, String launcherTimeStamp, ArrayList projects) throws CoreException {
+		Map deSelectedPlugins = BundleLauncherHelper.getWorkspaceBundleMap(config, null, IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS);
+		IProject[] projs = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+		for (int i = 0; i < projs.length; i++) {
+			if (!WorkspaceModelManager.isPluginProject(projs[i]))
+				continue;
+			IPluginModelBase base = PluginRegistry.findModel(projs[i]);
+			if (base == null || base != null && deSelectedPlugins.containsKey(base))
+				continue;
+			String timestamp = getTimeStamp(projs[i]);
+			if (timestamp.compareTo(launcherTimeStamp) > 0 && shouldAdd(projs[i], launcherTimeStamp, timestamp))
+				projects.add(projs[i]);
+		}
+	}
+
+	public static final void shutdown() {
+		if (fLastRun == null)
+			return;
+		FileOutputStream stream = null;
+		try {
+			stream = new FileOutputStream(new File(getDirectory(), FILE_NAME));
+			fLastRun.store(stream, "Cached timestamps"); //$NON-NLS-1$
+			stream.flush();
+			stream.close();
+		} catch (IOException e) {
+			PDECore.logException(e);
+		} finally {
+			try {
+				if (stream != null)
+					stream.close();
+			} catch (IOException e1) {
+			}
+		}
+	}
+
+	private static File getDirectory() {
+		IPath path = PDECore.getDefault().getStateLocation().append(".cache"); //$NON-NLS-1$
+		File directory = new File(path.toOSString());
+		if (!directory.exists() || !directory.isDirectory())
+			directory.mkdirs();
+		return directory;
+	}
+
+	private static Properties getLastRun() {
+		if (fLastRun == null) {
+			fLastRun = new Properties();
+			FileInputStream fis = null;
+			try {
+				File file = new File(getDirectory(), FILE_NAME);
+				if (file.exists()) {
+					fis = new FileInputStream(file);
+					fLastRun.load(fis);
+					fis.close();
+				}
+			} catch (IOException e) {
+				PDECore.logException(e);
+			} finally {
+				try {
+					if (fis != null)
+						fis.close();
+				} catch (IOException e1) {
+				}
+			}
+		}
+		return fLastRun;
+	}
+
+	private static boolean shouldAdd(IProject proj, String launcherTS, String fileSystemTS) {
+		String projTS = (String) getLastRun().get(proj.getName());
+		if (projTS == null)
+			return true;
+		return ((projTS.compareTo(launcherTS) < 0) || (projTS.compareTo(fileSystemTS) < 0));
+	}
+
+	public static boolean requiresUI(ILaunchConfiguration configuration) {
+		try {
+			String projectID = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
+			if (projectID.length() > 0) {
+				IResource project = PDELaunchingPlugin.getWorkspace().getRoot().findMember(projectID);
+				if (project instanceof IProject) {
+					IPluginModelBase model = PluginRegistry.findModel((IProject) project);
+					if (model != null) {
+						Set plugins = DependencyManager.getSelfAndDependencies(model, null);
+						return plugins.contains("org.eclipse.swt"); //$NON-NLS-1$
+					}
+				}
+			}
+		} catch (CoreException e) {
+		}
+		return true;
+	}
+
+	public static boolean clearWorkspaceLog(String workspace) {
+		File logFile = new File(workspace, ".metadata" + File.separator + ".log"); //$NON-NLS-1$ //$NON-NLS-2$
+		if (logFile != null && logFile.exists()) {
+			return logFile.delete();
+		}
+		return true;
+	}
+
+	public static IStatus createErrorStatus(String message) {
+		return new Status(IStatus.ERROR, PDELaunchingPlugin.getPluginId(), IStatus.OK, message, null);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiFrameworkManager.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiFrameworkManager.java
new file mode 100644
index 0000000..15c9445
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiFrameworkManager.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer;
+
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+
+
+
+
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.pde.internal.core.PDEPreferencesManager;
+
+public class OSGiFrameworkManager implements IRegistryChangeListener {
+
+	public static final String POINT_ID = "org.eclipse.pde.ui.osgiFrameworks"; //$NON-NLS-1$
+	public static final String DEFAULT_FRAMEWORK = "org.eclipse.pde.ui.EquinoxFramework"; //$NON-NLS-1$
+
+	public static final String ATT_ID = "id"; //$NON-NLS-1$
+	public static final String ATT_NAME = "name"; //$NON-NLS-1$
+	public static final String ATT_DELEGATE = "launcherDelegate"; //$NON-NLS-1$
+	public static final String ATT_INITIALIZER = "initializer"; //$NON-NLS-1$
+
+	public static final String ELEMENT_FRAMEWORK = "framework"; //$NON-NLS-1$
+
+	private Map fFrameworks;
+
+	public IConfigurationElement[] getFrameworks() {
+		if (fFrameworks == null)
+			loadElements();
+		return (IConfigurationElement[]) fFrameworks.values().toArray(new IConfigurationElement[fFrameworks.size()]);
+	}
+
+	public IConfigurationElement[] getSortedFrameworks() {
+		IConfigurationElement[] elements = getFrameworks();
+		return orderElements(elements);
+	}
+
+	private void loadElements() {
+		fFrameworks = new HashMap();
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] elements = registry.getConfigurationElementsFor(POINT_ID);
+		for (int i = 0; i < elements.length; i++) {
+			String id = elements[i].getAttribute(ATT_ID);
+			if (id == null || elements[i].getAttribute(ATT_NAME) == null || elements[i].getAttribute(ATT_DELEGATE) == null)
+				continue;
+			fFrameworks.put(id, elements[i]);
+		}
+	}
+
+	private IConfigurationElement[] orderElements(IConfigurationElement[] elems) {
+		Arrays.sort(elems, new Comparator() {
+			public int compare(Object o1, Object o2) {
+				String name1 = ((IConfigurationElement) o1).getAttribute(ATT_NAME);
+				String name2 = ((IConfigurationElement) o2).getAttribute(ATT_NAME);
+				if (name1 != null)
+					return name1.compareToIgnoreCase(name2);
+				return 1;
+			}
+		});
+		return elems;
+	}
+
+	public void registryChanged(IRegistryChangeEvent event) {
+		//TODO implement 
+	}
+
+	public String getDefaultFramework() {
+		PDEPreferencesManager store = PDELaunchingPlugin.getDefault().getPreferenceManager();
+		return store.getString(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
+	}
+
+	public OSGiLaunchConfigurationInitializer getDefaultInitializer() {
+		return getInitializer(getDefaultFramework());
+	}
+
+	public OSGiLaunchConfigurationInitializer getInitializer(String frameworkID) {
+		if (fFrameworks == null)
+			loadElements();
+		if (fFrameworks.containsKey(frameworkID)) {
+			try {
+				IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
+				if (element.getAttribute(ATT_INITIALIZER) != null) {
+					Object result = element.createExecutableExtension(ATT_INITIALIZER);
+					if (result instanceof OSGiLaunchConfigurationInitializer)
+						return (OSGiLaunchConfigurationInitializer) result;
+				}
+			} catch (CoreException e) {
+			}
+		}
+		return new OSGiLaunchConfigurationInitializer();
+	}
+
+	public LaunchConfigurationDelegate getFrameworkLauncher(String frameworkID) {
+		if (fFrameworks == null)
+			loadElements();
+		if (fFrameworks.containsKey(frameworkID)) {
+			try {
+				IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
+				Object result = element.createExecutableExtension(ATT_DELEGATE);
+				if (result instanceof LaunchConfigurationDelegate)
+					return (LaunchConfigurationDelegate) result;
+			} catch (CoreException e) {
+			}
+		}
+		return null;
+	}
+
+	public String getFrameworkName(String frameworkID) {
+		if (fFrameworks == null)
+			loadElements();
+		if (fFrameworks.containsKey(frameworkID)) {
+			IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
+			return element.getAttribute(ATT_NAME);
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the {@link IConfigurationElement} for the framework with the given ID
+	 * or <code>null</code> if no element exists with that ID.
+	 * @param frameworkId
+	 * @return the {@link IConfigurationElement} for the framework with the given ID or <code>null</code>
+	 * 
+	 * @since 3.5
+	 */
+	public IConfigurationElement getFramework(String frameworkId) {
+		if (fFrameworks == null) {
+			loadElements();
+		}
+		return (IConfigurationElement) fFrameworks.get(frameworkId);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiMigrationDelegate.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiMigrationDelegate.java
new file mode 100644
index 0000000..f7cc6cc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiMigrationDelegate.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.pde.internal.launching.IPDEConstants;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+
+public class OSGiMigrationDelegate extends PDEMigrationDelegate {
+
+	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
+		return super.isCandidate(candidate) || !candidate.getAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "").equals("3.3"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void migrate(ILaunchConfigurationWorkingCopy wc) throws CoreException {
+		if (!wc.getAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "").equals("3.3")) { //$NON-NLS-1$ //$NON-NLS-2$
+			wc.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
+			StringBuffer vmArgs = new StringBuffer(wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "")); //$NON-NLS-1$
+			if (vmArgs.indexOf("-Declipse.ignoreApp") == -1) { //$NON-NLS-1$
+				if (vmArgs.length() > 0)
+					vmArgs.append(" "); //$NON-NLS-1$
+				vmArgs.append("-Declipse.ignoreApp=true"); //$NON-NLS-1$
+			}
+			if (vmArgs.indexOf("-Dosgi.noShutdown") == -1) { //$NON-NLS-1$
+				vmArgs.append(" -Dosgi.noShutdown=true"); //$NON-NLS-1$
+			}
+			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.toString());
+		}
+		super.migrate(wc);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiValidationOperation.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiValidationOperation.java
new file mode 100644
index 0000000..7958d4f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/OSGiValidationOperation.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+public class OSGiValidationOperation extends LaunchValidationOperation {
+
+	public OSGiValidationOperation(ILaunchConfiguration configuration) {
+		super(configuration);
+	}
+
+	protected IPluginModelBase[] getModels() throws CoreException {
+		return BundleLauncherHelper.getMergedBundles(fLaunchConfiguration, true);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/PDEMigrationDelegate.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/PDEMigrationDelegate.java
new file mode 100644
index 0000000..6bedbf2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/PDEMigrationDelegate.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+import org.eclipse.pde.internal.launching.IPDEConstants;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.debug.core.*;
+import org.eclipse.jdt.launching.*;
+
+public class PDEMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
+
+	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
+		return !candidate.getAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, false) || candidate.hasAttribute(IPDELauncherConstants.VMINSTALL);
+	}
+
+	public void migrate(ILaunchConfiguration candidate) throws CoreException {
+		ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
+		migrate(wc);
+		wc.doSave();
+	}
+
+	public void migrate(ILaunchConfigurationWorkingCopy candidate) throws CoreException {
+		if (!candidate.getAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, false)) {
+			candidate.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
+			String args = candidate.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
+			StringBuffer buffer = new StringBuffer(LaunchArgumentsHelper.getInitialProgramArguments());
+			if (args.length() > 0) {
+				buffer.append(" "); //$NON-NLS-1$
+				buffer.append(args);
+			}
+			candidate.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, buffer.toString());
+		}
+		if (candidate.hasAttribute(IPDELauncherConstants.VMINSTALL)) {
+			String name = candidate.getAttribute(IPDELauncherConstants.VMINSTALL, (String) null);
+			if (name != null) {
+				IVMInstall vm = VMHelper.getVMInstall(name);
+				if (vm != null) {
+					IPath path = JavaRuntime.newJREContainerPath(vm);
+					candidate.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, path.toPortableString());
+				}
+			}
+			candidate.removeAttribute(IPDELauncherConstants.VMINSTALL);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/ProductValidationOperation.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/ProductValidationOperation.java
new file mode 100644
index 0000000..d91814d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/ProductValidationOperation.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
+import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+
+public class ProductValidationOperation extends LaunchValidationOperation {
+
+	private IPluginModelBase[] fModels;
+
+	public ProductValidationOperation(IPluginModelBase[] models) {
+		super(null);
+		fModels = models;
+	}
+
+	protected IPluginModelBase[] getModels() throws CoreException {
+		return fModels;
+	}
+
+	protected IExecutionEnvironment[] getMatchingEnvironments() throws CoreException {
+		IVMInstall install = JavaRuntime.getDefaultVMInstall();
+
+		IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
+		IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
+		List result = new ArrayList(envs.length);
+		for (int i = 0; i < envs.length; i++) {
+			IExecutionEnvironment env = envs[i];
+			IVMInstall[] compatible = env.getCompatibleVMs();
+			for (int j = 0; j < compatible.length; j++) {
+				if (compatible[j].equals(install)) {
+					result.add(env);
+					break;
+				}
+			}
+		}
+		return (IExecutionEnvironment[]) result.toArray(new IExecutionEnvironment[result.size()]);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/RequirementHelper.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/RequirementHelper.java
new file mode 100644
index 0000000..e6455ed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/RequirementHelper.java
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.PDEExtensionRegistry;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+/**
+ * Centralizes code for validating the contents of a launch and finding missing requirements. 
+ * 
+ * @since 3.6
+ * @see EclipsePluginValidationOperation
+ */
+public class RequirementHelper {
+
+	/**
+	 * Returns a list of string plug-in ids that are required to launch the product, application
+	 * or application to test that the given launch configuration specifies.  Which attributes are
+	 * checked will depend on whether a product, an application or a junit application is being launched.
+	 * 
+	 * @param config launch configuration to get attributes from
+	 * @param plugins list of plugin models to look for product extensions in
+	 * @return list of string plug-in IDs that are required by the config's application/product settings
+	 * @throws CoreException if there is a problem reading the launch config
+	 */
+	public static String[] getApplicationRequirements(ILaunchConfiguration config) throws CoreException {
+		Set requiredIds = new HashSet();
+		if (config.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
+			String product = config.getAttribute(IPDELauncherConstants.PRODUCT, (String) null);
+			if (product != null) {
+				getProductRequirements(product, requiredIds);
+			}
+		} else {
+			String configType = config.getType().getIdentifier();
+			if (configType.equals(IPDELauncherConstants.ECLIPSE_APPLICATION_LAUNCH_CONFIGURATION_TYPE)) {
+				String application = config.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication());
+				if (!IPDEConstants.CORE_TEST_APPLICATION.equals(application)) {
+					getApplicationRequirements(application, requiredIds);
+				}
+			} else {
+				// Junit launch configs can have the core test application set in either the 'app to test' or the 'application' attribute
+				String application = config.getAttribute(IPDELauncherConstants.APP_TO_TEST, (String) null);
+				if (application == null) {
+					application = config.getAttribute(IPDELauncherConstants.APPLICATION, (String) null);
+				}
+				if (application == null) {
+					application = TargetPlatform.getDefaultApplication();
+				}
+				if (!IPDEConstants.CORE_TEST_APPLICATION.equals(application)) {
+					getApplicationRequirements(application, requiredIds);
+				}
+			}
+		}
+		return (String[]) requiredIds.toArray(new String[requiredIds.size()]);
+	}
+
+	private static void getProductRequirements(String product, Collection requiredIds) {
+		PDEExtensionRegistry registry = PDECore.getDefault().getExtensionsRegistry();
+		IExtension[] extensions = registry.findExtensions("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
+		for (int i = 0; i < extensions.length; i++) {
+
+			if (product.equals(extensions[i].getUniqueIdentifier()) || product.equals(extensions[i].getSimpleIdentifier())) {
+				requiredIds.add(extensions[i].getNamespaceIdentifier());
+
+				IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+				for (int j = 0; j < elements.length; j++) {
+					String application = elements[j].getAttribute("application"); //$NON-NLS-1$
+					if (application != null && application.length() > 0) {
+						getApplicationRequirements(application, requiredIds);
+					}
+				}
+				// Only one extension should match the product so break out of the looop
+				break;
+			}
+		}
+	}
+
+	private static void getApplicationRequirements(String application, Collection requiredIds) {
+		PDEExtensionRegistry registry = PDECore.getDefault().getExtensionsRegistry();
+		IExtension[] extensions = registry.findExtensions("org.eclipse.core.runtime.applications", true); //$NON-NLS-1$
+		for (int i = 0; i < extensions.length; i++) {
+			if (application.equals(extensions[i].getUniqueIdentifier()) || application.equals(extensions[i].getSimpleIdentifier())) {
+				requiredIds.add(extensions[i].getNamespaceIdentifier());
+				// Only one extension should match the application so break out of the looop
+				break;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/VMHelper.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/VMHelper.java
new file mode 100644
index 0000000..6381d6e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/launcher/VMHelper.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Les Jones <lesojones at gmail.com> - Bug 195433
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.launcher;
+
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.launching.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.util.VMUtil;
+import org.eclipse.pde.internal.launching.PDEMessages;
+
+public class VMHelper {
+
+	/**
+	 * Get the default VMInstall name using the available info in the config,
+	 * using the JavaProject if available.
+	 * 
+	 * @param configuration
+	 *            Launch configuration to check
+	 * @return name of the VMInstall
+	 * @throws CoreException
+	 *             thrown if there's a problem getting the VM name
+	 */
+	public static String getDefaultVMInstallName(ILaunchConfiguration configuration) throws CoreException {
+		IJavaProject javaProject = JavaRuntime.getJavaProject(configuration);
+		IVMInstall vmInstall = null;
+		if (javaProject != null) {
+			vmInstall = JavaRuntime.getVMInstall(javaProject);
+		}
+
+		if (vmInstall != null) {
+			return vmInstall.getName();
+		}
+
+		return VMUtil.getDefaultVMInstallName();
+	}
+
+	public static IVMInstall getVMInstall(ILaunchConfiguration configuration) throws CoreException {
+		String jre = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String) null);
+		IVMInstall vm = null;
+		if (jre == null) {
+			String name = configuration.getAttribute(IPDELauncherConstants.VMINSTALL, (String) null);
+			if (name == null) {
+				name = getDefaultVMInstallName(configuration);
+			}
+			vm = getVMInstall(name);
+			if (vm == null) {
+				throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEMessages.WorkbenchLauncherConfigurationDelegate_noJRE, name)));
+			}
+		} else {
+			IPath jrePath = Path.fromPortableString(jre);
+			vm = JavaRuntime.getVMInstall(jrePath);
+			if (vm == null) {
+				String id = JavaRuntime.getExecutionEnvironmentId(jrePath);
+				if (id == null) {
+					String name = JavaRuntime.getVMInstallName(jrePath);
+					throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEMessages.WorkbenchLauncherConfigurationDelegate_noJRE, name)));
+				}
+				throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEMessages.VMHelper_cannotFindExecEnv, id)));
+			}
+		}
+		return vm;
+	}
+
+	public static IVMInstall getVMInstall(String name) {
+		if (name != null) {
+			IVMInstall[] installs = VMUtil.getAllVMInstances();
+			for (int i = 0; i < installs.length; i++) {
+				if (installs[i].getName().equals(name))
+					return installs[i];
+			}
+		}
+		return JavaRuntime.getDefaultVMInstall();
+	}
+
+	public static IVMInstall createLauncher(ILaunchConfiguration configuration) throws CoreException {
+		IVMInstall launcher = getVMInstall(configuration);
+		if (!launcher.getInstallLocation().exists())
+			throw new CoreException(LauncherUtils.createErrorStatus(PDEMessages.WorkbenchLauncherConfigurationDelegate_jrePathNotFound));
+		return launcher;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/pderesources.properties b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/pderesources.properties
new file mode 100644
index 0000000..685533f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/pderesources.properties
@@ -0,0 +1,32 @@
+###############################################################################
+# Copyright (c) 2009 EclipseSource Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     EclipseSource Corporation - initial API and implementation
+###############################################################################
+
+LauncherUtils_cannotLaunchApplication=Could not launch the application because the associated workspace is currently in use by another Eclipse application.\n\n{0}
+
+Launcher_error_code13=The application could not start. Details can be found in the log.
+Launcher_error_code15=Could not launch the configuration because the associated workspace is currently in use.
+
+EclipsePluginValidationOperation_pluginMissing={0} is missing
+PluginValidation_error=Plugin validation errors were detected:\n{0}
+
+WorkbenchLauncherConfigurationDelegate_noJRE = Cannot locate JRE definition: "{0}". Launch aborted.
+WorkbenchLauncherConfigurationDelegate_jrePathNotFound = The installation path to the specified JRE could not be found.  Launch aborted.
+WorkbenchLauncherConfigurationDelegate_badFeatureSetup = When in feature mode, plug-ins must be in the 'plugins' directory and features in 'features' directory in the workspace.
+WorkbenchLauncherConfigurationDelegate_noStartup = Launching failed. Bootstrap code cannot be found.
+JUnitLaunchConfiguration_error_notaplugin = Could not launch the JUnit plug-in tests because project ''{0}'' is not a plug-in project.
+JUnitLaunchConfiguration_error_missingPlugin = Required plug-in ''{0}'' could not be found.
+
+OSGiLaunchConfiguration_cannotFindLaunchConfiguration=Cannot find the {0} OSGi framework.
+OSGiLaunchConfiguration_selected=selected
+
+EquinoxLaunchConfiguration_oldTarget=The org.eclipse.osgi plug-in is missing from this configuration.
+
+VMHelper_cannotFindExecEnv=Cannot locate Execution Environment definition: "{0}". Launch aborted.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupDirector.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupDirector.java
new file mode 100644
index 0000000..f01326f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupDirector.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Code 9 Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.sourcelookup;
+
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.sourcelookup.*;
+import org.eclipse.debug.core.sourcelookup.containers.*;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.debug.core.*;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.jdt.launching.sourcelookup.containers.JavaSourceLookupParticipant;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.PDEClasspathContainer;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+
+public class PDESourceLookupDirector extends AbstractSourceLookupDirector {
+
+	/**
+	 * Cache of source containers by location and id (String & String)
+	 */
+	private Map fSourceContainerMap = new HashMap();
+
+	private static Set fFilteredTypes;
+
+	static {
+		fFilteredTypes = new HashSet(3);
+		fFilteredTypes.add(ProjectSourceContainer.TYPE_ID);
+		fFilteredTypes.add(WorkspaceSourceContainer.TYPE_ID);
+		fFilteredTypes.add("org.eclipse.debug.ui.containerType.workingSet"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Lazily initialized.
+	 */
+	private double fOSGiRuntimeVersion = Double.MIN_VALUE;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
+	 */
+	public void initializeParticipants() {
+		addParticipants(new ISourceLookupParticipant[] {new JavaSourceLookupParticipant()});
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#supportsSourceContainerType(org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType)
+	 */
+	public boolean supportsSourceContainerType(ISourceContainerType type) {
+		return !fFilteredTypes.contains(type.getId());
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#getSourceElement(java.lang.Object)
+	 */
+	public Object getSourceElement(Object element) {
+		PDESourceLookupQuery query = new PDESourceLookupQuery(this, element);
+		SafeRunner.run(query);
+		Object result = query.getResult();
+		return result != null ? result : super.getSourceElement(element);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#findSourceElements(java.lang.Object)
+	 */
+	public Object[] findSourceElements(Object object) throws CoreException {
+		Object[] sourceElements = null;
+		if (object instanceof IJavaStackFrame || object instanceof IJavaObject || object instanceof IJavaReferenceType) {
+			sourceElements = new Object[] {getSourceElement(object)};
+		}
+		if (sourceElements == null) {
+			sourceElements = super.findSourceElements(object);
+		}
+		return sourceElements;
+	}
+
+	ISourceContainer[] getSourceContainers(String location, String id) throws CoreException {
+
+		ISourceContainer[] containers = (ISourceContainer[]) fSourceContainerMap.get(location);
+		if (containers != null) {
+			return containers;
+		}
+
+		ArrayList result = new ArrayList();
+		ModelEntry entry = PluginRegistry.findEntry(id);
+
+		boolean match = false;
+
+		IPluginModelBase[] models = entry.getWorkspaceModels();
+		for (int i = 0; i < models.length; i++) {
+			if (isPerfectMatch(models[i], new Path(location))) {
+				IResource resource = models[i].getUnderlyingResource();
+				// if the plug-in matches a workspace model,
+				// add the project and any libraries not coming via a container
+				// to the list of source containers, in that order
+				if (resource != null) {
+					addProjectSourceContainers(resource.getProject(), result);
+				}
+				match = true;
+				break;
+			}
+		}
+
+		if (!match) {
+			File file = new File(location);
+			if (file.isFile()) {
+				// in case of linked plug-in projects that map to an external JARd plug-in,
+				// use source container that maps to the library in the linked project.
+				ISourceContainer container = getArchiveSourceContainer(location);
+				if (container != null) {
+					containers = new ISourceContainer[] {container};
+					fSourceContainerMap.put(location, containers);
+					return containers;
+				}
+			}
+
+			models = entry.getExternalModels();
+			for (int i = 0; i < models.length; i++) {
+				if (isPerfectMatch(models[i], new Path(location))) {
+					// try all source zips found in the source code locations
+					IClasspathEntry[] entries = PDEClasspathContainer.getExternalEntries(models[i]);
+					for (int j = 0; j < entries.length; j++) {
+						IRuntimeClasspathEntry rte = convertClasspathEntry(entries[j]);
+						if (rte != null)
+							result.add(rte);
+					}
+					break;
+				}
+			}
+		}
+
+		IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[]) result.toArray(new IRuntimeClasspathEntry[result.size()]);
+		containers = JavaRuntime.getSourceContainers(entries);
+		fSourceContainerMap.put(location, containers);
+		return containers;
+	}
+
+	private boolean isPerfectMatch(IPluginModelBase model, IPath path) {
+		return model == null ? false : path.equals(new Path(model.getInstallLocation()));
+	}
+
+	private IRuntimeClasspathEntry convertClasspathEntry(IClasspathEntry entry) {
+		if (entry == null)
+			return null;
+
+		IPath srcPath = entry.getSourceAttachmentPath();
+		if (srcPath != null && srcPath.segmentCount() > 0) {
+			IRuntimeClasspathEntry rte = JavaRuntime.newArchiveRuntimeClasspathEntry(entry.getPath());
+			rte.setSourceAttachmentPath(srcPath);
+			rte.setSourceAttachmentRootPath(entry.getSourceAttachmentRootPath());
+			return rte;
+		}
+		return null;
+	}
+
+	private ISourceContainer getArchiveSourceContainer(String location) throws JavaModelException {
+		IWorkspaceRoot root = PDELaunchingPlugin.getWorkspace().getRoot();
+		IFile[] containers = root.findFilesForLocationURI(URIUtil.toURI(location));
+		for (int i = 0; i < containers.length; i++) {
+			IJavaElement element = JavaCore.create(containers[i]);
+			if (element instanceof IPackageFragmentRoot) {
+				IPackageFragmentRoot archive = (IPackageFragmentRoot) element;
+				IPath path = archive.getSourceAttachmentPath();
+				if (path == null || path.segmentCount() == 0)
+					continue;
+
+				IPath rootPath = archive.getSourceAttachmentRootPath();
+				boolean detectRootPath = rootPath != null && rootPath.segmentCount() > 0;
+
+				IFile archiveFile = root.getFile(path);
+				if (archiveFile.exists())
+					return new ArchiveSourceContainer(archiveFile, detectRootPath);
+
+				File file = path.toFile();
+				if (file.exists())
+					return new ExternalArchiveSourceContainer(file.getAbsolutePath(), detectRootPath);
+			}
+		}
+		return null;
+	}
+
+	private void addProjectSourceContainers(IProject project, ArrayList result) throws CoreException {
+		if (project == null || !project.hasNature(JavaCore.NATURE_ID))
+			return;
+
+		IJavaProject jProject = JavaCore.create(project);
+		result.add(JavaRuntime.newProjectRuntimeClasspathEntry(jProject));
+
+		IClasspathEntry[] entries = jProject.getRawClasspath();
+		for (int i = 0; i < entries.length; i++) {
+			IClasspathEntry entry = entries[i];
+			if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
+				IRuntimeClasspathEntry rte = convertClasspathEntry(entry);
+				if (rte != null)
+					result.add(rte);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#dispose()
+	 */
+	public synchronized void dispose() {
+		Iterator iterator = fSourceContainerMap.values().iterator();
+		while (iterator.hasNext()) {
+			ISourceContainer[] containers = (ISourceContainer[]) iterator.next();
+			for (int i = 0; i < containers.length; i++) {
+				containers[i].dispose();
+			}
+		}
+		fSourceContainerMap.clear();
+		super.dispose();
+	}
+
+	/**
+	 * Returns the version of the OSGi runtime being debugged, based on the target platform.
+	 * Cached per source lookup director.
+	 * 
+	 * @return OSGi runtime version
+	 */
+	double getOSGiRuntimeVersion() {
+		if (fOSGiRuntimeVersion == Double.MIN_VALUE) {
+			fOSGiRuntimeVersion = TargetPlatformHelper.getTargetVersion();
+		}
+		return fOSGiRuntimeVersion;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupQuery.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupQuery.java
new file mode 100644
index 0000000..7447d12
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/internal/launching/sourcelookup/PDESourceLookupQuery.java
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Bug 242461 - JSR045 support
+ *******************************************************************************/
+package org.eclipse.pde.internal.launching.sourcelookup;
+
+import java.io.File;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IValue;
+import org.eclipse.debug.core.sourcelookup.ISourceContainer;
+import org.eclipse.jdt.debug.core.*;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+
+public class PDESourceLookupQuery implements ISafeRunnable {
+
+	protected static String OSGI_CLASSLOADER = "org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader"; //$NON-NLS-1$
+	private static String LEGACY_ECLIPSE_CLASSLOADER = "org.eclipse.core.runtime.adaptor.EclipseClassLoader"; //$NON-NLS-1$
+	private static String MAIN_CLASS = "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
+	private static String MAIN_PLUGIN = "org.eclipse.platform"; //$NON-NLS-1$
+
+	private Object fElement;
+	private Object fResult;
+	private PDESourceLookupDirector fDirector;
+
+	public PDESourceLookupQuery(PDESourceLookupDirector director, Object object) {
+		fElement = object;
+		fDirector = director;
+	}
+
+	public void handleException(Throwable exception) {
+	}
+
+	public void run() throws Exception {
+		IJavaReferenceType declaringType = null;
+		String sourcePath = null;
+		if (fElement instanceof IJavaStackFrame) {
+			IJavaStackFrame stackFrame = (IJavaStackFrame) fElement;
+			declaringType = stackFrame.getReferenceType();
+			// under JSR 45 source path from the stack frame is more precise than anything derived from the type: 
+			sourcePath = stackFrame.getSourcePath();
+		} else if (fElement instanceof IJavaObject) {
+			IJavaType javaType = ((IJavaObject) fElement).getJavaType();
+			if (javaType instanceof IJavaReferenceType) {
+				declaringType = (IJavaReferenceType) javaType;
+			}
+		} else if (fElement instanceof IJavaReferenceType) {
+			declaringType = (IJavaReferenceType) fElement;
+		}
+		if (declaringType != null) {
+			IJavaObject classLoaderObject = declaringType.getClassLoaderObject();
+			String declaringTypeName = declaringType.getName();
+			if (sourcePath == null) {
+				String[] sourcePaths = declaringType.getSourcePaths(null);
+				if (sourcePaths != null) {
+					sourcePath = sourcePaths[0];
+				}
+				if (sourcePath == null) {
+					sourcePath = generateSourceName(declaringTypeName);
+				}
+			}
+
+			if (classLoaderObject != null) {
+				IJavaClassType type = (IJavaClassType) classLoaderObject.getJavaType();
+				if (OSGI_CLASSLOADER.equals(type.getName())) {
+					if (fDirector.getOSGiRuntimeVersion() < 3.5) {
+						fResult = findSourceElement34(classLoaderObject, sourcePath);
+					} else {
+						fResult = findSourceElement(classLoaderObject, sourcePath);
+					}
+				} else if (LEGACY_ECLIPSE_CLASSLOADER.equals(type.getName())) {
+					fResult = findSourceElement_legacy(classLoaderObject, sourcePath);
+				} else if (MAIN_CLASS.equals(declaringTypeName)) {
+					IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(MAIN_PLUGIN);
+					if (model != null)
+						fResult = getSourceElement(model.getInstallLocation(), MAIN_PLUGIN, sourcePath, true);
+				}
+			}
+		}
+	}
+
+	protected Object getResult() {
+		return fResult;
+	}
+
+	private String getValue(IJavaObject object, String variable) throws DebugException {
+		IJavaFieldVariable var = object.getField(variable, false);
+		return var == null ? null : var.getValue().getValueString();
+	}
+
+	/**
+	 * Finds a source element in a 3.4 OSGi runtime.
+	 * 
+	 * @param object Bundle class loader object
+	 * @param typeName fully qualified name of the source type being searched for
+	 * @return source element
+	 * @throws CoreException
+	 */
+	protected Object findSourceElement34(IJavaObject object, String typeName) throws CoreException {
+		IJavaObject manager = getObject(object, "manager", false); //$NON-NLS-1$
+		if (manager != null) {
+			IJavaObject data = getObject(manager, "data", false); //$NON-NLS-1$
+			if (data != null) {
+				String location = getValue(data, "fileName"); //$NON-NLS-1$
+				String id = getValue(data, "symbolicName"); //$NON-NLS-1$
+				return getSourceElement(location, id, typeName, true);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Finds source in a 3.5 runtime. In 3.5, the OSGi runtime provides hooks to properly
+	 * lookup source in fragments that replace/prepend jars in their host.
+	 * 
+	 * @param object Bundle class loader object
+	 * @param typeName fully qualified name of the source type being searched for 
+	 * @return source element
+	 * @throws CoreException
+	 */
+	protected Object findSourceElement(IJavaObject object, String typeName) throws CoreException {
+		IJavaObject manager = getObject(object, "manager", false); //$NON-NLS-1$
+		if (manager != null) {
+			IJavaObject data = getObject(manager, "data", false); //$NON-NLS-1$
+			if (data != null) {
+				// search manager's class path for location
+				Object result = searchClasspathEntries(manager, typeName);
+				if (result != null) {
+					return result;
+				}
+				// then check its fragments
+				IJavaObject frgArray = getObject(manager, "fragments", false); //$NON-NLS-1$
+				if (frgArray instanceof IJavaArray) {
+					IJavaArray fragments = (IJavaArray) frgArray;
+					for (int i = 0; i < fragments.getLength(); i++) {
+						IJavaObject fragment = (IJavaObject) fragments.getValue(i);
+						if (!fragment.isNull()) {
+							// search fragment class path
+							result = searchClasspathEntries(fragment, typeName);
+							if (result != null) {
+								return result;
+							}
+						}
+
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Search a bundle's class path entries for source for the type of given name.
+	 * This is used for 3.5 and greater.
+	 * 
+	 * @param entriesOwner
+	 * @param typeName
+	 * @return source object or <code>null</code>
+	 * @throws CoreException
+	 */
+	private Object searchClasspathEntries(IJavaObject entriesOwner, String typeName) throws CoreException {
+		IJavaObject cpeArray = getObject(entriesOwner, "entries", false); //$NON-NLS-1$
+		if (cpeArray instanceof IJavaArray) {
+			IJavaArray entries = (IJavaArray) cpeArray;
+			for (int i = 0; i < entries.getLength(); i++) {
+				IJavaObject entry = (IJavaObject) entries.getValue(i);
+				if (!entry.isNull()) {
+					IJavaObject baseData = getObject(entry, "data", false); //$NON-NLS-1$
+					if (baseData != null && !baseData.isNull()) {
+						IJavaObject fileName = getObject(baseData, "fileName", false); //$NON-NLS-1$
+						if (fileName != null && !fileName.isNull()) {
+							String location = fileName.getValueString();
+							String symbolicName = getValue(baseData, "symbolicName"); //$NON-NLS-1$
+							Object el = getSourceElement(location, symbolicName, typeName, false);
+							if (el != null) {
+								return el;
+							}
+						}
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	private IJavaObject getObject(IJavaObject object, String field, boolean superfield) throws DebugException {
+		IJavaFieldVariable variable = object.getField(field, superfield);
+		if (variable != null) {
+			IValue value = variable.getValue();
+			if (value instanceof IJavaObject)
+				return (IJavaObject) value;
+		}
+		return null;
+	}
+
+	private Object findSourceElement_legacy(IJavaObject object, String typeName) throws CoreException {
+		IJavaObject hostdata = getObject(object, "hostdata", true); //$NON-NLS-1$
+		if (hostdata != null) {
+			String location = getValue(hostdata, "fileName"); //$NON-NLS-1$
+			String id = getValue(hostdata, "symbolicName"); //$NON-NLS-1$
+			return getSourceElement(location, id, typeName, true);
+		}
+		return null;
+	}
+
+	/**
+	 * Looks up source in the source containers associated with the bundle at the given location.
+	 * Searches associated fragments if source is not found in that location only if 
+	 * <code>chechFragments</code> is <code>true</code> (which should only be done when < 3.5, 
+	 * as this is just a guess in random order).
+	 * 
+	 * @param location location of bundle jar / class file folder
+	 * @param id symbolic name of bundle or fragment
+	 * @param typeName qualified name of source
+	 * @param checkFragments whether to guess at fragments
+	 * @return source element or <code>null</code>
+	 * @throws CoreException
+	 */
+	private Object getSourceElement(String location, String id, String typeName, boolean checkFragments) throws CoreException {
+		if (location != null && id != null) {
+			Object result = findSourceElement(getSourceContainers(location, id), typeName);
+			if (result != null)
+				return result;
+
+			// don't give up yet, search fragments attached to this host
+			if (checkFragments) {
+				State state = TargetPlatformHelper.getState();
+				BundleDescription desc = state.getBundle(id, null);
+				if (desc != null) {
+					BundleDescription[] fragments = desc.getFragments();
+					for (int i = 0; i < fragments.length; i++) {
+						location = fragments[i].getLocation();
+						id = fragments[i].getSymbolicName();
+						result = findSourceElement(getSourceContainers(location, id), typeName);
+						if (result != null)
+							return result;
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	private Object findSourceElement(ISourceContainer[] containers, String typeName) throws CoreException {
+		for (int i = 0; i < containers.length; i++) {
+			Object[] result = containers[i].findSourceElements(typeName);
+			if (result.length > 0)
+				return result[0];
+		}
+		return null;
+	}
+
+	protected ISourceContainer[] getSourceContainers(String location, String id) throws CoreException {
+		return fDirector.getSourceContainers(location, id);
+	}
+
+	/**
+	 * Generates and returns a source file path based on a qualified type name.
+	 * For example, when <code>java.lang.String</code> is provided,
+	 * the returned source name is <code>java/lang/String.java</code>.
+	 * 
+	 * @param qualifiedTypeName fully qualified type name that may contain inner types
+	 *  denoted with <code>$</code> character
+	 * @return a source file path corresponding to the type name
+	 */
+	private static String generateSourceName(String qualifiedTypeName) {
+		int index = qualifiedTypeName.indexOf('$');
+		if (index >= 0)
+			qualifiedTypeName = qualifiedTypeName.substring(0, index);
+		return qualifiedTypeName.replace('.', File.separatorChar) + ".java"; //$NON-NLS-1$
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java
new file mode 100644
index 0000000..a196a30
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/AbstractPDELaunchConfiguration.java
@@ -0,0 +1,419 @@
+/*******************************************************************************
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Map;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.jdt.core.IJavaModelMarker;
+import org.eclipse.jdt.launching.*;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
+import org.eclipse.pde.internal.launching.*;
+import org.eclipse.pde.internal.launching.launcher.*;
+
+/**
+ * An abstract launch delegate for PDE-based launch configurations
+ * <p>
+ * Clients may subclass this class.
+ * </p>
+ * <p>
+ * This class originally existed in 3.2 as
+ * <code>org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration</code>.
+ * </p>
+ * @since 3.6
+ */
+public abstract class AbstractPDELaunchConfiguration extends LaunchConfigurationDelegate {
+
+	protected File fConfigDir = null;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#isLaunchProblem(org.eclipse.core.resources.IMarker)
+	 */
+	protected boolean isLaunchProblem(IMarker problemMarker) throws CoreException {
+		return super.isLaunchProblem(problemMarker) && (problemMarker.getType().equals(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER) || problemMarker.getType().equals(PDEMarkerFactory.MARKER_ID));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		try {
+			fConfigDir = null;
+			monitor.beginTask("", 4); //$NON-NLS-1$
+			try {
+				preLaunchCheck(configuration, launch, new SubProgressMonitor(monitor, 2));
+			} catch (CoreException e) {
+				if (e.getStatus().getSeverity() == IStatus.CANCEL) {
+					monitor.setCanceled(true);
+					return;
+				}
+				throw e;
+			}
+
+			VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration));
+			runnerConfig.setVMArguments(getVMArguments(configuration));
+			runnerConfig.setProgramArguments(getProgramArguments(configuration));
+			runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath());
+			runnerConfig.setEnvironment(getEnvironment(configuration));
+			runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration));
+
+			monitor.worked(1);
+
+			setDefaultSourceLocator(configuration);
+			manageLaunch(launch);
+			IVMRunner runner = getVMRunner(configuration, mode);
+			if (runner != null)
+				runner.run(runnerConfig, launch, monitor);
+			else
+				monitor.setCanceled(true);
+			monitor.done();
+		} catch (final CoreException e) {
+			monitor.setCanceled(true);
+			throw e;
+		}
+	}
+
+	/**
+	 * Returns the VM runner for the given launch mode to use when launching the
+	 * given configuration.
+	 *  
+	 * @param configuration launch configuration
+	 * @param mode launch node
+	 * @return VM runner to use when launching the given configuration in the given mode
+	 * @throws CoreException if a VM runner cannot be determined
+	 */
+	public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
+		IVMInstall launcher = VMHelper.createLauncher(configuration);
+		return launcher.getVMRunner(mode);
+	}
+
+	/**
+	 * Assigns a default source locator to the given launch if a source locator
+	 * has not yet been assigned to it, and the associated launch configuration
+	 * does not specify a source locator.
+	 * 
+	 * @param configuration
+	 *            configuration being launched
+	 * @exception CoreException
+	 *                if unable to set the source locator
+	 */
+	protected void setDefaultSourceLocator(ILaunchConfiguration configuration) throws CoreException {
+		ILaunchConfigurationWorkingCopy wc = null;
+		if (configuration.isWorkingCopy()) {
+			wc = (ILaunchConfigurationWorkingCopy) configuration;
+		} else {
+			wc = configuration.getWorkingCopy();
+		}
+		String id = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null);
+		if (!PDESourcePathProvider.ID.equals(id)) {
+			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
+			wc.doSave();
+		}
+	}
+
+	/**
+	 * Returns the entries that should appear on boot classpath.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the location of startup.jar and 
+	 * 		the bootstrap classpath specified by the given launch configuration
+	 *        
+	 * @exception CoreException
+	 *                if unable to find startup.jar
+	 */
+	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
+		String[] classpath = LaunchArgumentsHelper.constructClasspath(configuration);
+		if (classpath == null) {
+			String message = PDEMessages.WorkbenchLauncherConfigurationDelegate_noStartup;
+			throw new CoreException(LauncherUtils.createErrorStatus(message));
+		}
+		return classpath;
+	}
+
+	/** 
+	 * Returns an array of environment variables to be used when
+	 * launching the given configuration or <code>null</code> if unspecified.
+	 * 
+	 * @param configuration launch configuration
+	 * @throws CoreException if unable to access associated attribute or if
+	 * unable to resolve a variable in an environment variable's value
+	 */
+	public String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException {
+		return DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
+	}
+
+	/**
+	 * Returns the working directory path specified by the given launch
+	 * configuration, or <code>null</code> if none.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the working directory path specified by the given launch
+	 *         configuration, or <code>null</code> if none
+	 * @exception CoreException
+	 *                if unable to retrieve the attribute
+	 */
+	public File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
+		return LaunchArgumentsHelper.getWorkingDirectory(configuration);
+	}
+
+	/**
+	 * Returns the Map of VM-specific attributes specified by the given launch
+	 * configuration, or <code>null</code> if none.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the <code>Map</code> of VM-specific attributes
+	 * @exception CoreException
+	 *                if unable to retrieve the attribute
+	 */
+	public Map getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException {
+		return LaunchArgumentsHelper.getVMSpecificAttributesMap(configuration);
+	}
+
+	/**
+	 * Returns the VM arguments specified by the given launch configuration, as
+	 * an array of strings. 
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the VM arguments specified by the given launch configuration,
+	 *         possibly an empty array
+	 * @exception CoreException
+	 *                if unable to retrieve the attribute
+	 */
+	public String[] getVMArguments(ILaunchConfiguration configuration) throws CoreException {
+		String[] vmArgs = new ExecutionArguments(LaunchArgumentsHelper.getUserVMArguments(configuration), "").getVMArgumentsArray(); //$NON-NLS-1$
+		// For p2 target, add "-Declipse.p2.data.area=@config.dir/p2" unless already specified by user
+		Map bundleMap = BundleLauncherHelper.getMergedBundleMap(configuration, false);
+		if (bundleMap.containsKey("org.eclipse.equinox.p2.core")) { //$NON-NLS-1$
+			for (int i = 0; i < vmArgs.length; i++) {
+				String arg = vmArgs[i];
+				if (arg.startsWith("-Declipse.p2.data.area=")) { //$NON-NLS-1$
+					return vmArgs;
+				}
+			}
+			String[] temp = new String[vmArgs.length + 1];
+			System.arraycopy(vmArgs, 0, temp, 0, vmArgs.length);
+			temp[vmArgs.length] = "-Declipse.p2.data.area=@config.dir" + File.separator + "p2"; //$NON-NLS-1$ //$NON-NLS-2$
+			return temp;
+		}
+		return vmArgs;
+	}
+
+	/**
+	 * Returns the program arguments to launch with.
+	 * This list is a combination of arguments computed by PDE based on attributes
+	 * specified in the given launch configuration, followed by the program arguments
+	 * that the entered directly into the launch configuration.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the program arguments necessary for launching
+	 * 
+	 * @exception CoreException
+	 *                if unable to retrieve the attribute or create the
+	 *                necessary configuration files      
+	 */
+	public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		ArrayList programArgs = new ArrayList();
+
+		// add tracing, if turned on	
+		if (configuration.getAttribute(IPDELauncherConstants.TRACING, false) && !IPDELauncherConstants.TRACING_NONE.equals(configuration.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null))) {
+			programArgs.add("-debug"); //$NON-NLS-1$
+			programArgs.add(LaunchArgumentsHelper.getTracingFileArgument(configuration, getConfigDir(configuration).toString() + IPath.SEPARATOR + ICoreConstants.OPTIONS_FILENAME));
+		}
+
+		// add the program args specified by the user
+		String[] userArgs = LaunchArgumentsHelper.getUserProgramArgumentArray(configuration);
+		ArrayList userDefined = new ArrayList();
+		for (int i = 0; i < userArgs.length; i++) {
+			// be forgiving if people have tracing turned on and forgot
+			// to remove the -debug from the program args field.
+			if (userArgs[i].equals("-debug") && programArgs.contains("-debug")) //$NON-NLS-1$ //$NON-NLS-2$
+				continue;
+			userDefined.add(userArgs[i]);
+		}
+
+		if (!configuration.getAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, false)) {
+
+			if (!userDefined.contains("-os")) { //$NON-NLS-1$
+				programArgs.add("-os"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getOS());
+			}
+			if (!userDefined.contains("-ws")) { //$NON-NLS-1$
+				programArgs.add("-ws"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getWS());
+			}
+			if (!userDefined.contains("-arch")) { //$NON-NLS-1$
+				programArgs.add("-arch"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getOSArch());
+			}
+		}
+
+		if (userDefined.size() > 0) {
+			programArgs.addAll(userDefined);
+		}
+
+		return (String[]) programArgs.toArray(new String[programArgs.size()]);
+	}
+
+	/**
+	 * Does sanity checking before launching.  The criteria whether the launch should 
+	 * proceed or not is specific to the launch configuration type.
+	 * 
+	 * @param configuration launch configuration
+	 * @param launch the launch object to contribute processes and debug targets to
+	 * @param monitor a progress monitor
+	 * 
+	 * @throws CoreException exception thrown if launch fails or canceled or if unable to retrieve attributes
+	 * from the launch configuration
+	 * 				
+	 */
+	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		boolean autoValidate = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false);
+		monitor.beginTask("", autoValidate ? 3 : 4); //$NON-NLS-1$
+		if (autoValidate)
+			validatePluginDependencies(configuration, new SubProgressMonitor(monitor, 1));
+		validateProjectDependencies(configuration, new SubProgressMonitor(monitor, 1));
+		clear(configuration, new SubProgressMonitor(monitor, 1));
+		launch.setAttribute(IPDELauncherConstants.CONFIG_LOCATION, getConfigDir(configuration).toString());
+		synchronizeManifests(configuration, new SubProgressMonitor(monitor, 1));
+	}
+
+	/**
+	 * Returns the configuration area specified by the given launch
+	 * configuration.
+	 * 
+	 * @param configuration
+	 *            launch configuration
+	 * @return the directory path specified by the given launch
+	 *         configuration
+	 */
+	protected File getConfigDir(ILaunchConfiguration configuration) {
+		if (fConfigDir == null)
+			fConfigDir = LaunchConfigurationHelper.getConfigurationArea(configuration);
+		return fConfigDir;
+	}
+
+	/*
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException {
+		return LaunchPluginValidator.getAffectedProjects(configuration);
+	}
+
+	/**
+	 * Returns the fully-qualified name of the class to launch. 
+	 * 
+	 * @return the fully-qualified name of the class to launch.  Must not return <code>null</code>. 
+	 * @since 3.3
+	 */
+	public String getMainClass() {
+		if (TargetPlatformHelper.getTargetVersion() >= 3.3)
+			return "org.eclipse.equinox.launcher.Main"; //$NON-NLS-1$
+		return "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
+	}
+
+	/**
+	 * Adds a listener to the launch to be notified at interesting launch lifecycle
+	 * events such as when the launch terminates.
+	 * 
+	 * @param launch
+	 * 			the launch 		
+	 * 
+	 * @since 3.3	
+	 */
+	protected void manageLaunch(ILaunch launch) {
+		PDELaunchingPlugin.getDefault().getLaunchListener().manage(launch);
+	}
+
+	/**
+	 * Checks for old-style plugin.xml files that have become stale since the last launch.
+	 * For any stale plugin.xml files found, the corresponding MANIFEST.MF is deleted 
+	 * from the runtime configuration area so that it gets regenerated upon startup.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			a progress monitor
+	 * 
+	 * @since 3.3
+	 */
+	protected void synchronizeManifests(ILaunchConfiguration configuration, IProgressMonitor monitor) {
+		LaunchConfigurationHelper.synchronizeManifests(configuration, getConfigDir(configuration));
+		monitor.done();
+	}
+
+	/**
+	 * Checks if the Automated Management of Dependencies option is turned on.
+	 * If so, it makes aure all manifests are updated with the correct dependencies.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			a progress monitor
+	 * 
+	 * @since 3.3
+	 */
+	protected void validateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) {
+		LauncherUtils.validateProjectDependencies(configuration, monitor);
+	}
+
+	/**
+	 * By default, this method does nothing.  Clients should override, if appropriate.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			the progress monitor
+	 * @throws CoreException
+	 * 			if unable to retrieve launch attribute values
+	 * @since 3.3
+	 */
+	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+	}
+
+	/**
+	 * Validates inter-bundle dependencies automatically prior to launching
+	 * if that option is turned on.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			a progress monitor
+	 * @since 3.3
+	 */
+	protected void validatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		EclipsePluginValidationOperation op = new EclipsePluginValidationOperation(configuration);
+		LaunchPluginValidator.runValidationOperation(op, monitor);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EclipseApplicationLaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EclipseApplicationLaunchConfiguration.java
new file mode 100644
index 0000000..b41f2f6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EclipseApplicationLaunchConfiguration.java
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.variables.IStringVariableManager;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.eclipse.pde.internal.core.util.VersionUtil;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.*;
+import org.osgi.framework.Version;
+
+/**
+ * A launch delegate for launching Eclipse applications
+ * <p>
+ * Clients may subclass and instantiate this class.
+ * </p>
+ * <p>
+ * This class originally existed in 3.2 as
+ * <code>org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration</code>.
+ * </p>
+ * @since 3.6
+ */
+public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConfiguration {
+
+	// used to generate the dev classpath entries
+	// key is bundle ID, value is a model
+	private Map fAllBundles;
+
+	// key is a model, value is startLevel:autoStart
+	private Map fModels;
+
+	/**
+	 * To avoid duplicating variable substitution (and duplicate prompts)
+	 * this variable will store the substituted workspace location.
+	 */
+	private String fWorkspaceLocation;
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		ArrayList programArgs = new ArrayList();
+
+		// If a product is specified, then add it to the program args
+		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
+			String product = configuration.getAttribute(IPDELauncherConstants.PRODUCT, ""); //$NON-NLS-1$
+			if (product.length() > 0) {
+				programArgs.add("-product"); //$NON-NLS-1$
+				programArgs.add(product);
+			} else { // TODO product w/o an application and product... how to handle gracefully?
+				programArgs.add("-application"); //$NON-NLS-1$
+				programArgs.add(configuration.getAttribute(IPDELauncherConstants.APPLICATION, "")); //$NON-NLS-1$
+			}
+		} else {
+			// specify the application to launch
+			programArgs.add("-application"); //$NON-NLS-1$
+			programArgs.add(configuration.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication()));
+		}
+
+		// specify the workspace location for the runtime workbench
+		if (fWorkspaceLocation == null) {
+			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
+		}
+		if (fWorkspaceLocation.length() > 0) {
+			programArgs.add("-data"); //$NON-NLS-1$
+			programArgs.add(fWorkspaceLocation);
+		}
+
+		boolean showSplash = true;
+		if (configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
+			validateFeatures();
+			IPath installPath = PDELaunchingPlugin.getWorkspace().getRoot().getLocation();
+			programArgs.add("-install"); //$NON-NLS-1$
+			programArgs.add("file:" + installPath.removeLastSegments(1).addTrailingSeparator().toString()); //$NON-NLS-1$
+			if (!configuration.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
+				programArgs.add("-configuration"); //$NON-NLS-1$
+				programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
+			}
+			programArgs.add("-update"); //$NON-NLS-1$
+			// add the output folder names
+			programArgs.add("-dev"); //$NON-NLS-1$
+			programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", true)); //$NON-NLS-1$
+		} else {
+			String productID = LaunchConfigurationHelper.getProductID(configuration);
+			Properties prop = LaunchConfigurationHelper.createConfigIniFile(configuration, productID, fAllBundles, fModels, getConfigDir(configuration));
+			showSplash = prop.containsKey("osgi.splashPath") || prop.containsKey("splashLocation"); //$NON-NLS-1$ //$NON-NLS-2$
+			String brandingId = LaunchConfigurationHelper.getContributingPlugin(productID);
+			TargetPlatform.createPlatformConfiguration(getConfigDir(configuration), (IPluginModelBase[]) fAllBundles.values().toArray(new IPluginModelBase[fAllBundles.size()]), brandingId != null ? (IPluginModelBase) fAllBundles.get(brandingId) : null);
+			TargetPlatformHelper.checkPluginPropertiesConsistency(fAllBundles, getConfigDir(configuration));
+			programArgs.add("-configuration"); //$NON-NLS-1$
+			programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
+
+			// add the output folder names
+			programArgs.add("-dev"); //$NON-NLS-1$
+			programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
+		}
+		// necessary for PDE to know how to load plugins when target platform = host platform
+		// see PluginPathFinder.getPluginPaths() and PluginPathFinder.isDevLaunchMode()
+		IPluginModelBase base = (IPluginModelBase) fAllBundles.get(PDECore.PLUGIN_ID);
+		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) < 0) //$NON-NLS-1$
+			programArgs.add("-pdelaunch"); //$NON-NLS-1$
+
+		String[] args = super.getProgramArguments(configuration);
+		for (int i = 0; i < args.length; i++) {
+			programArgs.add(args[i]);
+		}
+
+		if (!programArgs.contains("-nosplash") && showSplash) { //$NON-NLS-1$
+			if (TargetPlatformHelper.getTargetVersion() >= 3.1) {
+				programArgs.add(0, "-launcher"); //$NON-NLS-1$
+
+				IPath path = null;
+				if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
+					path = new Path(TargetPlatform.getLocation()).append("Eclipse.app/Contents/MacOS/eclipse"); //$NON-NLS-1$
+				} else {
+					path = new Path(TargetPlatform.getLocation()).append("eclipse"); //$NON-NLS-1$
+					if (TargetPlatform.getOS().equals("win32")) { //$NON-NLS-1$
+						path = path.addFileExtension("exe"); //$NON-NLS-1$
+					}
+				}
+
+				programArgs.add(1, path.toOSString()); //This could be the branded launcher if we want (also this does not bring much)
+				programArgs.add(2, "-name"); //$NON-NLS-1$
+				programArgs.add(3, "Eclipse"); //This should be the name of the product //$NON-NLS-1$
+				programArgs.add(4, "-showsplash"); //$NON-NLS-1$
+				programArgs.add(5, "600"); //$NON-NLS-1$
+			} else {
+				programArgs.add(0, "-showsplash"); //$NON-NLS-1$
+				programArgs.add(1, computeShowsplashArgument());
+			}
+		}
+		return (String[]) programArgs.toArray(new String[programArgs.size()]);
+	}
+
+	private void validateFeatures() throws CoreException {
+		IPath installPath = PDELaunchingPlugin.getWorkspace().getRoot().getLocation();
+		String lastSegment = installPath.lastSegment();
+		boolean badStructure = lastSegment == null;
+		if (!badStructure) {
+			IPath featuresPath = installPath.removeLastSegments(1).append("features"); //$NON-NLS-1$
+			badStructure = !lastSegment.equalsIgnoreCase("plugins") //$NON-NLS-1$
+					|| !featuresPath.toFile().exists();
+		}
+		if (badStructure) {
+			throw new CoreException(LauncherUtils.createErrorStatus(PDEMessages.WorkbenchLauncherConfigurationDelegate_badFeatureSetup));
+		}
+		// Ensure important files are present
+		ensureProductFilesExist(getProductPath());
+	}
+
+	private IPath getProductPath() {
+		return PDELaunchingPlugin.getWorkspace().getRoot().getLocation().removeLastSegments(1);
+	}
+
+	private String computeShowsplashArgument() {
+		IPath eclipseHome = new Path(TargetPlatform.getLocation());
+		IPath fullPath = eclipseHome.append("eclipse"); //$NON-NLS-1$
+		return fullPath.toOSString() + " -showsplash 600"; //$NON-NLS-1$
+	}
+
+	private void ensureProductFilesExist(IPath productArea) {
+		File productDir = productArea.toFile();
+		File marker = new File(productDir, ".eclipseproduct"); //$NON-NLS-1$
+		IPath eclipsePath = new Path(TargetPlatform.getLocation());
+		if (!marker.exists())
+			CoreUtility.copyFile(eclipsePath, ".eclipseproduct", marker); //$NON-NLS-1$
+
+		File configDir = new File(productDir, "configuration"); //$NON-NLS-1$
+		if (!configDir.exists())
+			configDir.mkdirs();
+		File ini = new File(configDir, "config.ini"); //$NON-NLS-1$
+		if (!ini.exists())
+			CoreUtility.copyFile(eclipsePath.append("configuration"), "config.ini", ini); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#getConfigDir(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	protected File getConfigDir(ILaunchConfiguration config) {
+		if (fConfigDir == null) {
+			try {
+				if (config.getAttribute(IPDELauncherConstants.USEFEATURES, false) && config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
+					String root = getProductPath().toString();
+					root += "/configuration"; //$NON-NLS-1$
+					fConfigDir = new File(root);
+					if (!fConfigDir.exists())
+						fConfigDir.mkdirs();
+				} else {
+					fConfigDir = LaunchConfigurationHelper.getConfigurationArea(config);
+				}
+			} catch (CoreException e) {
+				fConfigDir = LaunchConfigurationHelper.getConfigurationArea(config);
+			}
+		}
+		return fConfigDir;
+	}
+
+	/**
+	 * Clears the workspace prior to launching if the workspace exists and the option to 
+	 * clear it is turned on.  Also clears the configuration area if that option is chosen.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			the progress monitor
+	 * @throws CoreException
+	 * 			if unable to retrieve launch attribute values
+	 * @since 3.3
+	 */
+	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		if (fWorkspaceLocation == null) {
+			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
+		}
+		// Clear workspace and prompt, if necessary
+		if (!LauncherUtils.clearWorkspace(configuration, fWorkspaceLocation, monitor))
+			throw new CoreException(Status.CANCEL_STATUS);
+
+		// clear config area, if necessary
+		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
+			CoreUtility.deleteContent(getConfigDir(configuration));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		fWorkspaceLocation = null;
+
+		fModels = BundleLauncherHelper.getMergedBundleMap(configuration, false);
+		fAllBundles = new HashMap(fModels.size());
+		Iterator iter = fModels.keySet().iterator();
+		while (iter.hasNext()) {
+			IPluginModelBase model = (IPluginModelBase) iter.next();
+			fAllBundles.put(model.getPluginBase().getId(), model);
+		}
+		validateConfigIni(configuration);
+		super.preLaunchCheck(configuration, launch, monitor);
+	}
+
+	private void validateConfigIni(ILaunchConfiguration configuration) throws CoreException {
+		if (!configuration.getAttribute(IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
+			String templateLoc = configuration.getAttribute(IPDELauncherConstants.CONFIG_TEMPLATE_LOCATION, ""); //$NON-NLS-1$
+			IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
+			templateLoc = mgr.performStringSubstitution(templateLoc);
+
+			File templateFile = new File(templateLoc);
+			if (!templateFile.exists()) {
+				if (!LauncherUtils.generateConfigIni())
+					throw new CoreException(Status.CANCEL_STATUS);
+				// with the way the launcher works, if a config.ini file is not found one will be generated automatically.
+				// This check was to warn the user a config.ini needs to be generated. - bug 161265, comment #7
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#getVMArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getVMArguments(ILaunchConfiguration configuration) throws CoreException {
+		String[] vmArgs = super.getVMArguments(configuration);
+		IPluginModelBase base = (IPluginModelBase) fAllBundles.get(PDECore.PLUGIN_ID);
+		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) >= 0) { //$NON-NLS-1$
+			// necessary for PDE to know how to load plugins when target platform = host platform
+			// see PluginPathFinder.getPluginPaths() and PluginPathFinder.isDevLaunchMode()
+			String[] result = new String[vmArgs.length + 1];
+			System.arraycopy(vmArgs, 0, result, 0, vmArgs.length);
+			result[vmArgs.length] = "-Declipse.pde.launch=true"; //$NON-NLS-1$
+			return result;
+		}
+		return vmArgs;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EquinoxLaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EquinoxLaunchConfiguration.java
new file mode 100644
index 0000000..a605dc6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/EquinoxLaunchConfiguration.java
@@ -0,0 +1,219 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import java.io.File;
+import java.net.URL;
+import java.util.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
+import org.eclipse.pde.internal.core.ClasspathHelper;
+import org.eclipse.pde.internal.core.P2Utils;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.*;
+
+/**
+ * A launch delegate for launching the Equinox framework
+ * <p>
+ * Clients may subclass and instantiate this class.
+ * </p>
+ * <p>
+ * This class originally existed in 3.2 as
+ * <code>org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration</code>.
+ * </p>
+ * @since 3.6
+ */
+public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
+
+	// used to generate the dev classpath entries
+	// key is bundle ID, value is a model
+	protected Map fAllBundles;
+
+	// key is a model, value is startLevel:autoStart
+	private Map fModels;
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		ArrayList programArgs = new ArrayList();
+
+		programArgs.add("-dev"); //$NON-NLS-1$
+		programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigDir(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
+
+		saveConfigurationFile(configuration);
+		programArgs.add("-configuration"); //$NON-NLS-1$
+		programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
+
+		String[] args = super.getProgramArguments(configuration);
+		for (int i = 0; i < args.length; i++) {
+			programArgs.add(args[i]);
+		}
+		return (String[]) programArgs.toArray(new String[programArgs.size()]);
+	}
+
+	private void saveConfigurationFile(ILaunchConfiguration configuration) throws CoreException {
+		Properties properties = new Properties();
+		properties.setProperty("osgi.install.area", "file:" + TargetPlatform.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
+		properties.setProperty("osgi.configuration.cascaded", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		properties.put("osgi.framework", LaunchConfigurationHelper.getBundleURL(IPDEBuildConstants.BUNDLE_OSGI, fAllBundles, false)); //$NON-NLS-1$
+		int start = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
+		properties.put("osgi.bundles.defaultStartLevel", Integer.toString(start)); //$NON-NLS-1$
+		boolean autostart = configuration.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
+
+		String bundles = null;
+		if (fAllBundles.containsKey(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
+
+			// If update configurator is set to its default start level, override it as simple/update configurators should not be autostarted together
+			Object updateConfiguratorBundle = fAllBundles.get(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR);
+			if (updateConfiguratorBundle != null) {
+				String startLevel = (String) fModels.get(updateConfiguratorBundle);
+				if (startLevel != null && startLevel.equals(BundleLauncherHelper.DEFAULT_UPDATE_CONFIGURATOR_START_LEVEL)) {
+					fModels.put(updateConfiguratorBundle, "4:false"); //$NON-NLS-1$
+				}
+			}
+
+			// If simple configurator is being used, we need to write out the bundles.txt instead of writing out the list in the config.ini
+			URL bundlesTxt = P2Utils.writeBundlesTxt(fModels, start, autostart, getConfigDir(configuration), null);
+			if (bundlesTxt != null) {
+				properties.setProperty("org.eclipse.equinox.simpleconfigurator.configUrl", bundlesTxt.toString()); //$NON-NLS-1$
+				if (fAllBundles.get(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR) != null) {
+					properties.setProperty("org.eclipse.update.reconcile", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+			}
+			StringBuffer buffer = new StringBuffer();
+			IPluginModelBase model = (IPluginModelBase) fAllBundles.get(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR);
+			buffer.append(LaunchConfigurationHelper.getBundleURL(model, true));
+			appendStartData(buffer, (String) fModels.get(model), autostart);
+			bundles = buffer.toString();
+		} else {
+			bundles = getBundles(autostart);
+		}
+		if (bundles.length() > 0)
+			properties.put("osgi.bundles", bundles); //$NON-NLS-1$
+
+		if (!"3.3".equals(configuration.getAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, ""))) { //$NON-NLS-1$ //$NON-NLS-2$
+			properties.put("eclipse.ignoreApp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+			properties.put("osgi.noShutdown", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		LaunchConfigurationHelper.save(new File(getConfigDir(configuration), "config.ini"), properties); //$NON-NLS-1$
+	}
+
+	private String getBundles(boolean defaultAuto) {
+		StringBuffer buffer = new StringBuffer();
+		Iterator iter = fModels.keySet().iterator();
+		while (iter.hasNext()) {
+			IPluginModelBase model = (IPluginModelBase) iter.next();
+			String id = model.getPluginBase().getId();
+			if (!IPDEBuildConstants.BUNDLE_OSGI.equals(id)) {
+				if (buffer.length() > 0)
+					buffer.append(","); //$NON-NLS-1$
+				buffer.append(LaunchConfigurationHelper.getBundleURL(model, true));
+
+				// fragments must not be started or have a start level
+				if (model instanceof IFragmentModel)
+					continue;
+
+				String data = fModels.get(model).toString();
+				appendStartData(buffer, data, defaultAuto);
+			}
+		}
+		return buffer.toString();
+	}
+
+	/**
+	 * Convenience method to parses the startData ("startLevel:autoStart"), convert it to the
+	 * format expected by the OSGi bundles property, and append to a StringBuffer.
+	 * @param buffer buffer to append the data to
+	 * @param startData data to parse ("startLevel:autoStart")
+	 * @param defaultAuto default auto start setting
+	 */
+	private void appendStartData(StringBuffer buffer, String startData, boolean defaultAuto) {
+		int index = startData.indexOf(':');
+		String level = index > 0 ? startData.substring(0, index) : "default"; //$NON-NLS-1$
+		String auto = index > 0 && index < startData.length() - 1 ? startData.substring(index + 1) : "default"; //$NON-NLS-1$
+		if ("default".equals(auto)) //$NON-NLS-1$
+			auto = Boolean.toString(defaultAuto);
+		if (!level.equals("default") || "true".equals(auto)) //$NON-NLS-1$ //$NON-NLS-2$
+			buffer.append("@"); //$NON-NLS-1$
+
+		if (!level.equals("default")) { //$NON-NLS-1$
+			buffer.append(level);
+			if ("true".equals(auto)) //$NON-NLS-1$
+				buffer.append(":"); //$NON-NLS-1$
+		}
+		if ("true".equals(auto)) { //$NON-NLS-1$
+			buffer.append("start"); //$NON-NLS-1$
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		fModels = BundleLauncherHelper.getMergedBundleMap(configuration, true);
+		fAllBundles = new HashMap(fModels.size());
+		Iterator iter = fModels.keySet().iterator();
+		while (iter.hasNext()) {
+			IPluginModelBase model = (IPluginModelBase) iter.next();
+			fAllBundles.put(model.getPluginBase().getId(), model);
+		}
+
+		if (!fAllBundles.containsKey(IPDEBuildConstants.BUNDLE_OSGI)) {
+			// implicitly add it
+			IPluginModelBase model = PluginRegistry.findModel(IPDEBuildConstants.BUNDLE_OSGI);
+			if (model != null) {
+				fModels.put(model, "default:default"); //$NON-NLS-1$
+				fAllBundles.put(IPDEBuildConstants.BUNDLE_OSGI, model);
+			} else {
+				String message = PDEMessages.EquinoxLaunchConfiguration_oldTarget;
+				throw new CoreException(LauncherUtils.createErrorStatus(message));
+			}
+		}
+		super.preLaunchCheck(configuration, launch, monitor);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration#validatePluginDependencies(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void validatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		OSGiValidationOperation op = new OSGiValidationOperation(configuration);
+		LaunchPluginValidator.runValidationOperation(op, monitor);
+	}
+
+	/**
+	 * Clears the configuration area if the area exists and that option is selected.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			the progress monitor
+	 * @throws CoreException
+	 * 			if unable to retrieve launch attribute values
+	 * @since 3.3
+	 */
+	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		// clear config area, if necessary
+		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
+			CoreUtility.deleteContent(getConfigDir(configuration));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/IPDELauncherConstants.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/IPDELauncherConstants.java
new file mode 100644
index 0000000..9da82f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/IPDELauncherConstants.java
@@ -0,0 +1,493 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+/**
+ * Constant definitions for PDE launch configurations.
+ * <p>
+ * Constant definitions only; not to be implemented.
+ * </p>
+ * <p>
+ * This class originally existed in 3.2 as
+ * <code>org.eclipse.pde.ui.launcher.IPDELauncherConstants</code>.
+ * </p>
+ * @since 3.6
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IPDELauncherConstants {
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * workspace data location for an Eclipse application.
+	 */
+	String LOCATION = "location"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * workspace data location for an Eclipse application should be cleared
+	 * prior to launching.
+	 */
+	String DOCLEAR = "clearws"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * whether the user should be prompted prior to clearing the workspace.
+	 * 
+	 * @see IPDELauncherConstants#DOCLEAR
+	 */
+	String ASKCLEAR = "askclear"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * the application to run.  If the value is <code>null</code>, the default 
+	 * application as specified in the target platform will be used.
+	 */
+	String APPLICATION = "application"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * the product to run.
+	 * 
+	 * @see IPDELauncherConstants#APPLICATION
+	 */
+	String PRODUCT = "product"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * if the launch should appear in product-mode.  If the value is <code>false</code>,
+	 * the launch takes place in application-mode.
+	 * 
+	 * @see IPDELauncherConstants#PRODUCT
+	 * @see IPDELauncherConstants#APPLICATION
+	 */
+	String USE_PRODUCT = "useProduct"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key used in Plug-in JUnit launch configurations only. 
+	 * The value is a string specifying the application to be tested.  
+	 * If the value is <code>null</code>, the default UI workbench application is tested.
+	 */
+	String APP_TO_TEST = "testApplication"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * the name of the VM to launch with.  If the value is <code>null</code>,
+	 * the default workspace VM is used.
+	 * 
+	 * @deprecated use IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH
+	 */
+	String VMINSTALL = "vminstall"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * the user-entered bootstrap classpath entries. 
+	 */
+	String BOOTSTRAP_ENTRIES = "bootstrap"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * if the default self-hosting mode should be used when launching.
+	 * The default being to launch with all workspace plug-ins and all the 
+	 * plug-ins that are explicitly checked on the Target Platform preference page.
+	 */
+	String USE_DEFAULT = "default"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * if the feature-based self-hosting mode should be used.
+	 * The workspace must be set up properly for the feature-based self-hosting
+	 * to succeed.
+	 * Check the PDE Tips and Tricks section for how to set up feature-based self-hosting.
+	 * 
+	 * @deprecated As of 3.6 the feature-based self-hosting option is not supported
+	 */
+	String USEFEATURES = "usefeatures"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * a comma-separated list of IDs of workspace plug-ins to launch with.
+	 * This value is only used when the Automatic Add option is off.
+	 * 
+	 * @see IPDELauncherConstants#AUTOMATIC_ADD
+	 */
+	String SELECTED_WORKSPACE_PLUGINS = "selected_workspace_plugins"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * a comma-separated list of IDs of workspace plug-ins that are to be excluded from
+	 * the launch.
+	 * This value is only used when the Automatic Add option is on.
+	 * 
+	 * @see IPDELauncherConstants#AUTOMATIC_ADD
+	 */
+	String DESELECTED_WORKSPACE_PLUGINS = "deselected_workspace_plugins"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * whether workspace plug-in created after the creation of a launch configuration
+	 * should be added to the list of plug-ins to launch with.
+	 * 
+	 * If the value is <code>true</code>, then DESELECTED_WORKSPACE_PLUGINS should be used.
+	 * Otherwise, SELECTED_WORKSPACE_PLUGINS should be used.
+	 * 
+	 * @see IPDELauncherConstants#DESELECTED_WORKSPACE_PLUGINS
+	 * @see IPDELauncherConstants#SELECTED_WORKSPACE_PLUGINS
+	 */
+	String AUTOMATIC_ADD = "automaticAdd"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * whether the list of plug-ins to run should be validate prior to launching.
+	 * If problems are found, they will be reported and the user will be able to cancel or
+	 * continue.
+	 * If no problems are found, the launch continues as normal.
+	 */
+	String AUTOMATIC_VALIDATE = "automaticValidate"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying
+	 * a comma-separated list of IDs of target platform plug-ins to launch with.
+	 * This value is only used when the Automatic Add option is off.
+	 */
+	String SELECTED_TARGET_PLUGINS = "selected_target_plugins"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean indicating
+	 * whether the computation of required plug-ins on the Plug-ins tab should include
+	 * the traversal of optional dependencies.
+	 */
+	String INCLUDE_OPTIONAL = "includeOptional"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean indicating
+	 * whether tracing is enabled or disabled.
+	 */
+	String TRACING = "tracing"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a map containing the list
+	 * of options to debug with.
+	 */
+	String TRACING_OPTIONS = "tracingOptions"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is the id of the last plug-in 
+	 * that was selected on the Tracing tab.
+	 */
+	String TRACING_SELECTED_PLUGIN = "selectedPlugin"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is the IDs of all plug-ins
+	 * checked on the Tracing tab.  The value may also be "[NONE]"
+	 * 
+	 * @see IPDELauncherConstants#TRACING_NONE
+	 */
+	String TRACING_CHECKED = "checked"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute value indicating that, although tracing is enabled,
+	 * no plug-ins have been selected to be traced.
+	 */
+	String TRACING_NONE = "[NONE]"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying 
+	 * if PDE should generate a default configuration area for the launch.
+	 * 
+	 * If <code>true</code>, a configuration location in the PDE metadata area 
+	 * is created.  Otherwise, the user is expected to specify a location.
+	 * 
+	 * @see IPDELauncherConstants#CONFIG_LOCATION
+	 */
+	String CONFIG_USE_DEFAULT_AREA = "useDefaultConfigArea"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying 
+	 * the configuration area location for an Eclipse application launch.
+	 * 
+	 * This key is only used when CONFIG_USE_DEFAULT_AREA is <code>false</code>.
+	 * 
+	 * @see IPDELauncherConstants#CONFIG_USE_DEFAULT_AREA
+	 */
+	String CONFIG_LOCATION = "configLocation"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying 
+	 * if the configuration area location should be cleared prior to launching
+	*/
+	String CONFIG_CLEAR_AREA = "clearConfig"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration atribute key.  The value is a boolean specifying
+	 * if PDE should generate a default config.ini file for the launch.
+	 * 
+	 * If <code>true</code>, a configuration file is created.  
+	 * Otherwise, the user is expected to specify a config.ini to be used as a template.
+	 * 
+	 * @see IPDELauncherConstants#CONFIG_TEMPLATE_LOCATION
+	 */
+	String CONFIG_GENERATE_DEFAULT = "useDefaultConfig"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying 
+	 * the location of the config.ini file to be used as a template for an 
+	 * Eclipse application launch.
+	 * 
+	 * This key is only used when CONFIG_GENERATE_DEFAULT is <code>false</code>.
+	 * 
+	 * @see IPDELauncherConstants#CONFIG_GENERATE_DEFAULT
+	 */
+	String CONFIG_TEMPLATE_LOCATION = "templateConfig"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a string specifying 
+	 * the location of the .product file with which this launch configuration 
+	 * is associated.
+	 */
+	String PRODUCT_FILE = "productFile"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is the ID of an OSGi framework
+	 * declared in an <code>org.eclipse.pde.ui.osgiLaunchers</code> extension point.
+	 * 
+	 * @since 3.3
+	 */
+	String OSGI_FRAMEWORK_ID = "osgi_framework_id"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is a boolean specifying
+	 * if the default Auto-Start for an OSGi Framework launch configuration 
+	 * is <code>true</code> or <code>false</code>
+	 * 
+	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
+	 */
+	String DEFAULT_AUTO_START = "default_auto_start"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is an integer specifying
+	 * the default start level for bundles in an OSGi Framework launch configuration.
+	 * 
+	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
+	 */
+	String DEFAULT_START_LEVEL = "default_start_level"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is a comma-separated list
+	 * of workspace bundles to launch with the OSGi framework.
+	 * 
+	 * Each token in the list is of the format:
+	 * <plugin-id>@<start-level>:<auto-start>
+	 * 
+	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
+	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
+	 */
+	String WORKSPACE_BUNDLES = "workspace_bundles"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is a comma-separated list
+	 * of non-workspace bundles to launch with the OSGi framework.
+	 * 
+	 * Each token in the list is of the format:
+	 * <plugin-id>@<start-level>:<auto-start>
+	 * 
+	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
+	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
+	 */
+	String TARGET_BUNDLES = "target_bundles"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value can be either the full path
+	 * to the workspace location of a Target Definition (ie. .target file), or
+	 * the ID of a target defined in an org.eclipse.pde.core.targets extension.
+	 */
+	String DEFINED_TARGET = "defined_target"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean indicating
+	 * whether or not to display only selected plug-ins. 
+	 * 
+	 * @since 3.4
+	 */
+	String SHOW_SELECTED_ONLY = "show_selected_only"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the bundles tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_BUNDLES_ID = "org.eclipse.pde.ui.launch.tab.osgi.bundles"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the configuration tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_CONFIGURATION_ID = "org.eclipse.pde.ui.launch.tab.configuration"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the main tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_MAIN_ID = "org.eclipse.pde.ui.launch.tab.main"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the osgi settings tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_OSGI_SETTINGS_ID = "org.eclipse.pde.ui.launch.tab.osgi.settings"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the plug-in junit tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_PLUGIN_JUNIT_MAIN_ID = "org.eclipse.pde.ui.launch.tab.junit.main"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the plug-ins tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_PLUGINS_ID = "org.eclipse.pde.ui.launch.tab.plugins"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the tracing tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_TRACING_ID = "org.eclipse.pde.ui.launch.tab.tracing"; //$NON-NLS-1$
+
+	/**
+	 * The unique tab identifier for the tracing tab
+	 * 
+	 * @since 3.5
+	 */
+	String TAB_TEST_ID = "org.eclipse.pde.ui.launch.tab.test"; //$NON-NLS-1$
+
+	/**
+	 * The launch configuration type id for OSGi launches.
+	 * 
+	 * @since 3.5
+	 */
+	String OSGI_CONFIGURATION_TYPE = "org.eclipse.pde.ui.EquinoxLauncher"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying 
+	 * whether the tests should run on the UI thread.
+	 * 
+	 * The default value is <code>true</code>
+	 * 
+	 * @since 3.5
+	 */
+	String RUN_IN_UI_THREAD = "run_in_ui_thread"; //$NON-NLS-1$
+
+	/**
+	 * The launch configuration type for Eclipse application launches.
+	 * 
+	 * @since 3.6
+	 */
+	String ECLIPSE_APPLICATION_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.pde.ui.RuntimeWorkbench"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key.  The value is a boolean specifying
+	 * whether a p2 profile should be 
+	 * 
+	 * @since 3.6
+	 */
+	String GENERATE_PROFILE = "generateProfile"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a List specifying the features
+	 * to include when launching (when {@link #USE_CUSTOM_FEATURES} is set to <code>true</code>.
+	 * The values in the List are strings that contain the id and plugin resolution value as follows:
+	 * <pre>
+	 * [feature_id]:[resolution]
+	 * </pre>
+	 * The resolution must be one of {@link #LOCATION_DEFAULT}, {@link #LOCATION_EXTERNAL}, {@link #LOCATION_WORKSPACE}
+	 *  
+	 * @since 3.6
+	 */
+	String SELECTED_FEATURES = "selected_features"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a boolean specifying
+	 * if the feature-based launching mode should be used.
+	 * This mode will launch with all the workspace and external features
+	 * that have been explicitly selected in the Plug-ins Tab.
+	 * 
+	 *  @since 3.6
+	 */
+	String USE_CUSTOM_FEATURES = "useCustomFeatures"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a String specifying
+	 * if the default location for a feature is {@link #LOCATION_WORKSPACE} 
+	 * or {@link #LOCATION_EXTERNAL} 
+	 * 
+	 *  @since 3.6
+	 */
+	String FEATURE_DEFAULT_LOCATION = "featureDefaultLocation"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a String specifying
+	 * if the default plug-in resolution location for a feature 
+	 * is {@link #LOCATION_WORKSPACE} or {@link #LOCATION_EXTERNAL} 
+	 * 
+	 *  @since 3.6
+	 */
+	String FEATURE_PLUGIN_RESOLUTION = "featurePluginResolution"; //$NON-NLS-1$
+
+	/**
+	 * Value for a launch configuration attribute used when the object should be
+	 * obtained from whatever the default location is for this works
+	 * 
+	 * @since 3.6
+	 * @see #FEATURE_PLUGIN_RESOLUTION
+	 */
+	String LOCATION_DEFAULT = "default"; //$NON-NLS-1$
+
+	/**
+	 * Value for a launch configuration attribute used when the object should
+	 * be obtained from an external location over the workspace.
+	 * 
+	 * @since 3.6
+	 * @see #FEATURE_DEFAULT_LOCATION
+	 * @see #FEATURE_PLUGIN_RESOLUTION
+	 */
+	String LOCATION_EXTERNAL = "external"; //$NON-NLS-1$
+
+	/**
+	 * Value for a launch configuration attribute used when the object should
+	 * be obtained from the workspace over an external location.
+	 * 
+	 * @since 3.6
+	 * @see #FEATURE_DEFAULT_LOCATION
+	 * @see #FEATURE_PLUGIN_RESOLUTION
+	 */
+	String LOCATION_WORKSPACE = "workspace"; //$NON-NLS-1$
+
+	/**
+	 * Launch configuration attribute key. The value is a List specifying the additional plug-ins that 
+	 * will be included along with the features in the list {@link #SELECTED_FEATURES}
+	 * when launching (when {@link #USE_CUSTOM_FEATURES} is set to <code>true</code>.
+	 * The values in the List are strings that contain the id and versions as follows:
+	 * <pre>
+	 * [plugin_id]:[version]
+	 * </pre>
+	 *  
+	 * @since 3.6
+	 */
+	String ADDITIONAL_PLUGINS = "additional_plugins"; //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/JUnitLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/JUnitLaunchConfigurationDelegate.java
new file mode 100644
index 0000000..68b5d18
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/JUnitLaunchConfigurationDelegate.java
@@ -0,0 +1,503 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     EclipseSource Corporation - ongoing enhancements
+ *     David Saff <saff at mit.edu> - bug 102632
+ *     Ketan Padegaonkar <KetanPadegaonkar at gmail.com> - bug 250340
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import java.io.File;
+import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.*;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.internal.junit.launcher.*;
+import org.eclipse.jdt.launching.*;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.util.CoreUtility;
+import org.eclipse.pde.internal.core.util.VersionUtil;
+import org.eclipse.pde.internal.launching.*;
+import org.eclipse.pde.internal.launching.launcher.*;
+import org.osgi.framework.Version;
+
+/**
+ * A launch delegate for launching JUnit Plug-in tests.
+ * <p>
+ * This class originally existed in 3.3 as
+ * <code>org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate</code>.
+ * </p>
+ * @since 3.6
+ */
+public class JUnitLaunchConfigurationDelegate extends org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate {
+
+	/**
+	 * To avoid duplicating variable substitution (and duplicate prompts)
+	 * this variable will store the substituted workspace location.
+	 */
+	private String fWorkspaceLocation;
+
+	protected File fConfigDir = null;
+
+	// used to generate the dev classpath entries
+	// key is bundle ID, value is a model
+	private Map fAllBundles;
+
+	// key is a model, value is startLevel:autoStart
+	private Map fModels;
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMRunner(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
+		IVMInstall launcher = VMHelper.createLauncher(configuration);
+		return launcher.getVMRunner(mode);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException {
+		if (TargetPlatformHelper.getTargetVersion() >= 3.3)
+			return "org.eclipse.equinox.launcher.Main"; //$NON-NLS-1$
+		return "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
+	}
+
+	private String getTestPluginId(ILaunchConfiguration configuration) throws CoreException {
+		IJavaProject javaProject = getJavaProject(configuration);
+		IPluginModelBase model = PluginRegistry.findModel(javaProject.getProject());
+		if (model == null)
+			abort(NLS.bind(PDEMessages.JUnitLaunchConfiguration_error_notaplugin, javaProject.getProject().getName()), null, IStatus.OK);
+		if (model instanceof IFragmentModel)
+			return ((IFragmentModel) model).getFragment().getPluginId();
+
+		return model.getPluginBase().getId();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.junit.launcher.JUnitBaseLaunchConfiguration#abort(java.lang.String, java.lang.Throwable, int)
+	 */
+	protected void abort(String message, Throwable exception, int code) throws CoreException {
+		throw new CoreException(new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, code, message, exception));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#collectExecutionArguments(org.eclipse.debug.core.ILaunchConfiguration, java.util.List, java.util.List)
+	 */
+	protected void collectExecutionArguments(ILaunchConfiguration configuration, List/*String*/vmArguments, List/*String*/programArgs) throws CoreException {
+		super.collectExecutionArguments(configuration, vmArguments, programArgs);
+
+		// Specify the JUnit Plug-in test application to launch
+		programArgs.add("-application"); //$NON-NLS-1$
+		String application = getApplication(configuration);
+
+		programArgs.add(application);
+
+		// If a product is specified, then add it to the program args
+		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
+			programArgs.add("-product"); //$NON-NLS-1$
+			programArgs.add(configuration.getAttribute(IPDELauncherConstants.PRODUCT, "")); //$NON-NLS-1$
+		} else {
+			// Specify the application to test
+			String defaultApplication = TargetPlatform.getDefaultApplication();
+			if (IPDEConstants.CORE_TEST_APPLICATION.equals(application)) {
+				// If we are launching the core test application we don't need a test app
+				defaultApplication = null;
+			} else if (IPDEConstants.NON_UI_THREAD_APPLICATION.equals(application)) {
+				// When running in a non-UI thread, run the core test app to avoid opening the workbench
+				defaultApplication = IPDEConstants.CORE_TEST_APPLICATION;
+			}
+
+			String testApplication = configuration.getAttribute(IPDELauncherConstants.APP_TO_TEST, defaultApplication);
+			if (testApplication != null) {
+				programArgs.add("-testApplication"); //$NON-NLS-1$
+				programArgs.add(testApplication);
+			}
+		}
+
+		// Specify the location of the runtime workbench
+		if (fWorkspaceLocation == null) {
+			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
+		}
+		if (fWorkspaceLocation.length() > 0) {
+			programArgs.add("-data"); //$NON-NLS-1$
+			programArgs.add(fWorkspaceLocation);
+		}
+
+		// Create the platform configuration for the runtime workbench
+		String productID = LaunchConfigurationHelper.getProductID(configuration);
+		LaunchConfigurationHelper.createConfigIniFile(configuration, productID, fAllBundles, fModels, getConfigurationDirectory(configuration));
+		String brandingId = LaunchConfigurationHelper.getContributingPlugin(productID);
+		TargetPlatform.createPlatformConfiguration(getConfigurationDirectory(configuration), (IPluginModelBase[]) fAllBundles.values().toArray(new IPluginModelBase[fAllBundles.size()]), brandingId != null ? (IPluginModelBase) fAllBundles.get(brandingId) : null);
+		TargetPlatformHelper.checkPluginPropertiesConsistency(fAllBundles, getConfigurationDirectory(configuration));
+
+		programArgs.add("-configuration"); //$NON-NLS-1$
+		programArgs.add("file:" + new Path(getConfigurationDirectory(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
+
+		// Specify the output folder names
+		programArgs.add("-dev"); //$NON-NLS-1$
+		programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigurationDirectory(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
+
+		// necessary for PDE to know how to load plugins when target platform = host platform
+		// see PluginPathFinder.getPluginPaths()
+		IPluginModelBase base = findPlugin(PDECore.PLUGIN_ID);
+		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) < 0) //$NON-NLS-1$
+			programArgs.add("-pdelaunch"); //$NON-NLS-1$				
+
+		// Create the .options file if tracing is turned on
+		if (configuration.getAttribute(IPDELauncherConstants.TRACING, false) && !IPDELauncherConstants.TRACING_NONE.equals(configuration.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null))) {
+			programArgs.add("-debug"); //$NON-NLS-1$
+			String path = getConfigurationDirectory(configuration).getPath() + IPath.SEPARATOR + ICoreConstants.OPTIONS_FILENAME;
+			programArgs.add(LaunchArgumentsHelper.getTracingFileArgument(configuration, path));
+		}
+
+		// add the program args specified by the user
+		String[] userArgs = LaunchArgumentsHelper.getUserProgramArgumentArray(configuration);
+		for (int i = 0; i < userArgs.length; i++) {
+			// be forgiving if people have tracing turned on and forgot
+			// to remove the -debug from the program args field.
+			if (userArgs[i].equals("-debug") && programArgs.contains("-debug")) //$NON-NLS-1$ //$NON-NLS-2$
+				continue;
+			programArgs.add(userArgs[i]);
+		}
+
+		if (!configuration.getAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, false)) {
+			if (!programArgs.contains("-os")) { //$NON-NLS-1$
+				programArgs.add("-os"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getOS());
+			}
+			if (!programArgs.contains("-ws")) { //$NON-NLS-1$
+				programArgs.add("-ws"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getWS());
+			}
+			if (!programArgs.contains("-arch")) { //$NON-NLS-1$
+				programArgs.add("-arch"); //$NON-NLS-1$
+				programArgs.add(TargetPlatform.getOSArch());
+			}
+		}
+
+		programArgs.add("-testpluginname"); //$NON-NLS-1$
+		programArgs.add(getTestPluginId(configuration));
+	}
+
+	/**
+	 * Returns the application to launch plug-in tests with
+	 * 
+	 * @since 3.5
+	 * 
+	 * @param configuration
+	 * @return the application
+	 */
+	protected String getApplication(ILaunchConfiguration configuration) {
+		String application = null;
+
+		boolean shouldRunInUIThread = true;
+		try {
+			shouldRunInUIThread = configuration.getAttribute(IPDELauncherConstants.RUN_IN_UI_THREAD, true);
+		} catch (CoreException e) {
+		}
+
+		if (!shouldRunInUIThread) {
+			return IPDEConstants.NON_UI_THREAD_APPLICATION;
+		}
+
+		try {
+			// if application is set, it must be a headless app.
+			application = configuration.getAttribute(IPDELauncherConstants.APPLICATION, (String) null);
+		} catch (CoreException e) {
+		}
+
+		// if application is not set, we should launch the default UI test app
+		// Check to see if we should launch the legacy UI app
+		if (application == null) {
+			IPluginModelBase model = (IPluginModelBase) fAllBundles.get("org.eclipse.pde.junit.runtime"); //$NON-NLS-1$
+			BundleDescription desc = model != null ? model.getBundleDescription() : null;
+			if (desc != null) {
+				Version version = desc.getVersion();
+				int major = version.getMajor();
+				// launch legacy UI app only if we are launching a target that does 
+				// not use the new application model and we are launching with a 
+				// org.eclipse.pde.junit.runtime whose version is >= 3.3
+				if (major >= 3 && version.getMinor() >= 3 && !TargetPlatformHelper.usesNewApplicationModel()) {
+					application = IPDEConstants.LEGACY_UI_TEST_APPLICATION;
+				}
+			}
+		}
+
+		// launch the UI test application
+		if (application == null)
+			application = IPDEConstants.UI_TEST_APPLICATION;
+		return application;
+	}
+
+	private IPluginModelBase findPlugin(String id) throws CoreException {
+		IPluginModelBase model = PluginRegistry.findModel(id);
+		if (model == null)
+			model = PDECore.getDefault().findPluginInHost(id);
+		if (model == null)
+			abort(NLS.bind(PDEMessages.JUnitLaunchConfiguration_error_missingPlugin, id), null, IStatus.OK);
+		return model;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
+		return LaunchArgumentsHelper.getUserProgramArguments(configuration);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMArguments(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String getVMArguments(ILaunchConfiguration configuration) throws CoreException {
+		String vmArgs = LaunchArgumentsHelper.getUserVMArguments(configuration);
+
+		// necessary for PDE to know how to load plugins when target platform = host platform
+		IPluginModelBase base = (IPluginModelBase) fAllBundles.get(PDECore.PLUGIN_ID);
+		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) >= 0) { //$NON-NLS-1$
+			vmArgs = concatArg(vmArgs, "-Declipse.pde.launch=true"); //$NON-NLS-1$
+		}
+		// For p2 target, add "-Declipse.p2.data.area=@config.dir/p2" unless already specified by user
+		if (fAllBundles.containsKey("org.eclipse.equinox.p2.core")) { //$NON-NLS-1$
+			if (vmArgs.indexOf("-Declipse.p2.data.area=") < 0) { //$NON-NLS-1$
+				vmArgs = concatArg(vmArgs, "-Declipse.p2.data.area=@config.dir" + File.separator + "p2"); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		}
+		return vmArgs;
+	}
+
+	/**
+	 * Returns the result of concatenating the given argument to the
+	 * specified vmArgs.
+	 * 
+	 * @param vmArgs existing VM arguments
+	 * @param arg argument to concatenate
+	 * @return result of concatenation
+	 */
+	private String concatArg(String vmArgs, String arg) {
+		if (vmArgs.length() > 0 && !vmArgs.endsWith(" ")) //$NON-NLS-1$
+			vmArgs = vmArgs.concat(" "); //$NON-NLS-1$
+		return vmArgs.concat(arg);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getEnvironment(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException {
+		return DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getClasspath(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
+		String[] classpath = LaunchArgumentsHelper.constructClasspath(configuration);
+		if (classpath == null) {
+			abort(PDEMessages.WorkbenchLauncherConfigurationDelegate_noStartup, null, IStatus.OK);
+		}
+		return classpath;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
+		return LaunchArgumentsHelper.getWorkingDirectory(configuration);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMSpecificAttributesMap(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public Map getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException {
+		return LaunchArgumentsHelper.getVMSpecificAttributesMap(configuration);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#setDefaultSourceLocator(org.eclipse.debug.core.ILaunch, org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	protected void setDefaultSourceLocator(ILaunch launch, ILaunchConfiguration configuration) throws CoreException {
+		ILaunchConfigurationWorkingCopy wc = null;
+		if (configuration.isWorkingCopy()) {
+			wc = (ILaunchConfigurationWorkingCopy) configuration;
+		} else {
+			wc = configuration.getWorkingCopy();
+		}
+		String id = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null);
+		if (!PDESourcePathProvider.ID.equals(id)) {
+			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
+			wc.doSave();
+		}
+
+		manageLaunch(launch);
+	}
+
+	/**
+	 * Returns the location of the configuration area
+	 * 
+	 * @param configuration
+	 * 				the launch configuration
+	 * @return a directory where the configuration area is located
+	 */
+	protected File getConfigurationDirectory(ILaunchConfiguration configuration) {
+		if (fConfigDir == null)
+			fConfigDir = LaunchConfigurationHelper.getConfigurationArea(configuration);
+		return fConfigDir;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException {
+		return LaunchPluginValidator.getAffectedProjects(configuration);
+	}
+
+	/**
+	 * Adds a listener to the launch to be notified at interesting launch lifecycle
+	 * events such as when the launch terminates.
+	 * 
+	 * @param launch
+	 * 			the launch 			
+	 */
+	protected void manageLaunch(ILaunch launch) {
+		PDELaunchingPlugin.getDefault().getLaunchListener().manage(launch);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		fWorkspaceLocation = null;
+		fModels = BundleLauncherHelper.getMergedBundleMap(configuration, false);
+		fAllBundles = new HashMap(fModels.size());
+		Iterator iter = fModels.keySet().iterator();
+		while (iter.hasNext()) {
+			IPluginModelBase model = (IPluginModelBase) iter.next();
+			fAllBundles.put(model.getPluginBase().getId(), model);
+		}
+
+		// implicitly add the plug-ins required for JUnit testing if necessary
+		String[] requiredPlugins = getRequiredPlugins(configuration);
+		for (int i = 0; i < requiredPlugins.length; i++) {
+			String id = requiredPlugins[i];
+			if (!fAllBundles.containsKey(id)) {
+				IPluginModelBase model = findPlugin(id);
+				fAllBundles.put(id, model);
+				fModels.put(model, "default:default"); //$NON-NLS-1$
+			}
+		}
+
+		boolean autoValidate = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false);
+		monitor.beginTask("", autoValidate ? 3 : 4); //$NON-NLS-1$
+		if (autoValidate)
+			validatePluginDependencies(configuration, new SubProgressMonitor(monitor, 1));
+		validateProjectDependencies(configuration, new SubProgressMonitor(monitor, 1));
+		clear(configuration, new SubProgressMonitor(monitor, 1));
+		launch.setAttribute(IPDELauncherConstants.CONFIG_LOCATION, getConfigurationDirectory(configuration).toString());
+		synchronizeManifests(configuration, new SubProgressMonitor(monitor, 1));
+	}
+
+	private String[] getRequiredPlugins(ILaunchConfiguration configuration) {
+		// if we are using JUnit4, we need to include the junit4 specific bundles
+		ITestKind testKind = JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
+		if (TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId()))
+			return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime", "org.junit4", "org.eclipse.jdt.junit4.runtime"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+		return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+	}
+
+	/**
+	 * Checks for old-style plugin.xml files that have become stale since the last launch.
+	 * For any stale plugin.xml files found, the corresponding MANIFEST.MF is deleted 
+	 * from the runtime configuration area so that it gets regenerated upon startup.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			the progress monitor
+	 */
+	protected void synchronizeManifests(ILaunchConfiguration configuration, IProgressMonitor monitor) {
+		LaunchConfigurationHelper.synchronizeManifests(configuration, getConfigurationDirectory(configuration));
+		monitor.done();
+	}
+
+	/**
+	 * Clears the workspace prior to launching if the workspace exists and the option to 
+	 * clear it is turned on.  Also clears the configuration area if that option is chosen.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			the progress monitor
+	 * @throws CoreException
+	 * 			if unable to retrieve launch attribute values
+	 * @since 3.3
+	 */
+	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		if (fWorkspaceLocation == null) {
+			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
+		}
+		// Clear workspace and prompt, if necessary
+		if (!LauncherUtils.clearWorkspace(configuration, fWorkspaceLocation, new SubProgressMonitor(monitor, 1))) {
+			monitor.setCanceled(true);
+			return;
+		}
+
+		// clear config area, if necessary
+		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
+			CoreUtility.deleteContent(getConfigurationDirectory(configuration));
+	}
+
+	/**
+	 * Checks if the Automated Management of Dependencies option is turned on.
+	 * If so, it makes aure all manifests are updated with the correct dependencies.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			a progress monitor
+	 */
+	protected void validateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) {
+		LauncherUtils.validateProjectDependencies(configuration, monitor);
+	}
+
+	/**
+	 * Validates inter-bundle dependencies automatically prior to launching
+	 * if that option is turned on.
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @param monitor
+	 * 			a progress monitor
+	 */
+	protected void validatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
+		EclipsePluginValidationOperation op = new EclipsePluginValidationOperation(configuration);
+		LaunchPluginValidator.runValidationOperation(op, monitor);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationDelegate.java
new file mode 100644
index 0000000..482d56b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationDelegate.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.launching.*;
+import org.eclipse.pde.internal.launching.launcher.LaunchPluginValidator;
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
+
+/**
+ * A launch delegate for launching OSGi frameworks
+ * <p>
+ * Clients may subclass and instantiate this class.
+ * </p>
+ * <p>
+ * This class originally existed in 3.3 as
+ * <code>org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationDelegate</code>.
+ * </p>
+ * @since 3.6
+ */
+public class OSGiLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
+
+	/**
+	 * Delegates to the launcher delegate associated with the OSGi framework
+	 * selected in the launch configuration.
+	 * 
+	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
+		OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager();
+		String id = configuration.getAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, manager.getDefaultFramework());
+		LaunchConfigurationDelegate launcher = manager.getFrameworkLauncher(id);
+		if (launcher != null) {
+			launcher.launch(configuration, mode, launch, monitor);
+		} else {
+			String name = manager.getFrameworkName(id);
+			if (name == null)
+				name = PDEMessages.OSGiLaunchConfiguration_selected;
+			String message = NLS.bind(PDEMessages.OSGiLaunchConfiguration_cannotFindLaunchConfiguration, name);
+			IStatus status = new Status(IStatus.ERROR, IPDEConstants.PLUGIN_ID, IStatus.OK, message, null);
+			throw new CoreException(status);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
+	 */
+	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationInitializer.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationInitializer.java
new file mode 100644
index 0000000..1d7d2be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/OSGiLaunchConfigurationInitializer.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+
+/**
+ * Initializes launch configuration attributes for newly-created OSGi Framework 
+ * launch configurations
+ * <p>
+ * Clients may instantiate or subclass this class
+ * </p>
+ * <p>
+ * This class originally existed in 3.3 as
+ * <code>org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer</code>.
+ * </p>
+ * @since 3.6
+ */
+public class OSGiLaunchConfigurationInitializer {
+
+	protected static final String DEFAULT = "default"; //$NON-NLS-1$
+
+	/**
+	 * Initializes some attributes on a newly-created launch configuration
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 */
+	public void initialize(ILaunchConfigurationWorkingCopy configuration) {
+		initializeFrameworkDefaults(configuration);
+		initializeBundleState(configuration);
+		initializeSourcePathProvider(configuration);
+	}
+
+	/**
+	 * Sets the source provider ID
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 */
+	protected void initializeSourcePathProvider(ILaunchConfigurationWorkingCopy configuration) {
+		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
+	}
+
+	/**
+	 * Initializes the start level and auto-start attributes
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 */
+	protected void initializeFrameworkDefaults(ILaunchConfigurationWorkingCopy configuration) {
+		configuration.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
+		configuration.setAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
+	}
+
+	/**
+	 * Initializes the checked/unchecked state of bundles
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 */
+	protected void initializeBundleState(ILaunchConfigurationWorkingCopy configuration) {
+		StringBuffer explugins = new StringBuffer();
+		StringBuffer wsplugins = new StringBuffer();
+		IPluginModelBase[] models = PluginRegistry.getActiveModels();
+		for (int i = 0; i < models.length; i++) {
+			boolean inWorkspace = models[i].getUnderlyingResource() != null;
+			appendBundle(inWorkspace ? wsplugins : explugins, models[i]);
+		}
+		configuration.setAttribute(IPDELauncherConstants.WORKSPACE_BUNDLES, wsplugins.toString());
+		configuration.setAttribute(IPDELauncherConstants.TARGET_BUNDLES, explugins.toString());
+		configuration.setAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
+	}
+
+	private void appendBundle(StringBuffer buffer, IPluginModelBase model) {
+		if (buffer.length() > 0)
+			buffer.append(","); //$NON-NLS-1$
+		String id = model.getPluginBase().getId();
+		String value = BundleLauncherHelper.writeBundleEntry(model, getStartLevel(id), getAutoStart(id));
+		buffer.append(value);
+	}
+
+	/**
+	 * Returns the bundle's start level
+	 * 
+	 * @param bundleID
+	 * 			the bundle ID
+	 * @return the start level for the given bundle or the string <code>default</code>
+	 */
+	protected String getStartLevel(String bundleID) {
+		return DEFAULT;
+	}
+
+	/**
+	 * Returns whether the bundle should be started automatically
+	 * @param bundleID
+	 * 			the bundle ID
+	 * @return <code>true</code>, <code>false</code>, or <code>default</code>
+	 */
+	protected String getAutoStart(String bundleID) {
+		return DEFAULT;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/PDESourcePathProvider.java b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/PDESourcePathProvider.java
new file mode 100644
index 0000000..f17b5d4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/PDESourcePathProvider.java
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.launching;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.launching.*;
+import org.eclipse.pde.internal.core.util.PDEJavaHelper;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.launcher.LaunchPluginValidator;
+import org.eclipse.pde.internal.launching.launcher.VMHelper;
+
+/**
+ * Generates a source lookup path for all PDE-based launch configurations
+ * <p>
+ * Clients may subclass this class.
+ * </p>
+ * <p>
+ * This class originally existed in 3.3 as
+ * <code>org.eclipse.pde.ui.launcher.PDESourcePathProvider</code>.
+ * </p>
+ * @since 3.6
+ */
+public class PDESourcePathProvider extends StandardSourcePathProvider {
+
+	public static final String ID = "org.eclipse.pde.ui.workbenchClasspathProvider"; //$NON-NLS-1$
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.StandardSourcePathProvider#computeUnresolvedClasspath(org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
+		List sourcePath = new ArrayList();
+		sourcePath.add(getJREEntry(configuration));
+		IProject[] projects = getJavaProjects(configuration);
+		for (int i = 0; i < projects.length; i++) {
+			sourcePath.add(JavaRuntime.newProjectRuntimeClasspathEntry(JavaCore.create(projects[i])));
+		}
+		return (IRuntimeClasspathEntry[]) sourcePath.toArray(new IRuntimeClasspathEntry[sourcePath.size()]);
+	}
+
+	/**
+	 * Returns a JRE runtime classpath entry
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @return a JRE runtime classpath entry
+	 * @throws CoreException
+	 * 			if the JRE associated with the launch configuration cannot be found
+	 * 			or if unable to retrieve the launch configuration attributes
+	 */
+	private IRuntimeClasspathEntry getJREEntry(ILaunchConfiguration configuration) throws CoreException {
+		IVMInstall jre = VMHelper.createLauncher(configuration);
+		IPath containerPath = new Path(JavaRuntime.JRE_CONTAINER);
+		containerPath = containerPath.append(jre.getVMInstallType().getId());
+		containerPath = containerPath.append(jre.getName());
+		return JavaRuntime.newRuntimeContainerClasspathEntry(containerPath, IRuntimeClasspathEntry.BOOTSTRAP_CLASSES);
+	}
+
+	/**
+	 * Returns an array of sorted plug-in projects that represent plug-ins participating
+	 * in the launch
+	 * 
+	 * @param configuration
+	 * 			the launch configuration
+	 * @return an array of ordered projects
+	 * @throws CoreException
+	 * 			if unable to retrieve attributes from the launch configuration or if 
+	 * 			an error occurs when checking the nature of the project
+	 * 			
+	 */
+	private IProject[] getJavaProjects(ILaunchConfiguration configuration) throws CoreException {
+		IProject[] projects = LaunchPluginValidator.getAffectedProjects(configuration);
+		return PDELaunchingPlugin.getWorkspace().computeProjectOrder(projects).projects;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.jdt.launching.StandardSourcePathProvider#resolveClasspath(org.eclipse.jdt.launching.IRuntimeClasspathEntry[], org.eclipse.debug.core.ILaunchConfiguration)
+	 */
+	public IRuntimeClasspathEntry[] resolveClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException {
+		List all = new ArrayList(entries.length);
+		for (int i = 0; i < entries.length; i++) {
+			if (entries[i].getType() == IRuntimeClasspathEntry.PROJECT) {
+				// a project resolves to itself for source lookup (rather than
+				// the class file output locations)
+				all.add(entries[i]);
+				// also add non-JRE libraries
+				IResource resource = entries[i].getResource();
+				if (resource instanceof IProject) {
+					addBinaryPackageFragmentRoots(JavaCore.create((IProject) resource), all);
+				}
+			} else {
+				IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], configuration);
+				for (int j = 0; j < resolved.length; j++) {
+					all.add(resolved[j]);
+				}
+			}
+		}
+		return (IRuntimeClasspathEntry[]) all.toArray(new IRuntimeClasspathEntry[all.size()]);
+	}
+
+	/**
+	 * Adds runtime classpath entries for binary package fragment roots contained within
+	 * the project
+	 * 
+	 * @param jProject
+	 * 			the Java project whose roots are to be enumerated
+	 * @param all
+	 * 			a list of accumulated runtime classpath entries
+	 * @throws CoreException
+	 * 			if unable to evaluate the package fragment roots
+	 */
+	private void addBinaryPackageFragmentRoots(IJavaProject jProject, List all) throws CoreException {
+		IPackageFragmentRoot[] roots = jProject.getPackageFragmentRoots();
+		for (int j = 0; j < roots.length; j++) {
+			if (roots[j].getKind() == IPackageFragmentRoot.K_BINARY && !PDEJavaHelper.isJRELibrary(roots[j])) {
+				IRuntimeClasspathEntry rte = JavaRuntime.newArchiveRuntimeClasspathEntry(roots[j].getPath());
+				IPath path = roots[j].getSourceAttachmentPath();
+				if (path != null) {
+					rte.setSourceAttachmentPath(path);
+					rte.setSourceAttachmentRootPath(roots[j].getSourceAttachmentRootPath());
+				}
+				if (!all.contains(rte))
+					all.add(rte);
+			}
+		}
+
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/package.html b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/package.html
new file mode 100644
index 0000000..5f82fa2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.launching/src/org/eclipse/pde/launching/package.html
@@ -0,0 +1,14 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <title>Package-level Javadoc</title>
+</head>
+<body>
+Application programming interfaces for launching plug-in projects.
+<h2>
+Package Specification</h2>
+Provides support for launching plug-in projects.
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
index af27b8d..6e61ff9 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.runtime/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.runtime; singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.4.200.qualifier
 Bundle-Activator: org.eclipse.pde.internal.runtime.PDERuntimePlugin
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/plugin.properties b/eclipse/plugins/org.eclipse.pde.runtime/plugin.properties
index 881738d..1439826 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.runtime/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,8 +15,11 @@
 name = PDE Runtime
 provider-name = Eclipse.org
 
+views.category.name = Plug-in Development
 views.registry.name= Plug-in Registry
 
 spy-category.name = Spy
-spy-command.name = Plug-in Spy
+spy-command.name = Plug-in Selection Spy
 spy-command.description = Show the Plug-in Spy
+spy-menu-command.name = Plug-in Menu Spy
+
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/plugin.xml b/eclipse/plugins/org.eclipse.pde.runtime/plugin.xml
index c08ee22..0824cb2 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.runtime/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -22,6 +23,10 @@
             class="org.eclipse.pde.internal.runtime.registry.RegistryBrowser"
             id="org.eclipse.pde.runtime.RegistryBrowser">
       </view>
+      <category
+            id="org.eclipse.pde.ui"
+            name="%views.category.name">
+      </category>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
@@ -39,7 +44,7 @@
             categoryId="org.eclipse.pde.runtime.spy.commands.category"
             description="%spy-command.description"
             id="org.eclipse.pde.runtime.spy.commands.menuSpyCommand"
-            name="%spy-command.name">
+            name="%spy-menu-command.name">
       </command>
    </extension>
    <extension
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
index 25d69b8..1d2e9d6 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/PDERuntimeMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,7 @@ public class PDERuntimeMessages extends NLS {
 	public static String MessageHelper_missing_host;
 
 	public static String SpyDialog_title;
+	public static String MenuSpyDialog_title;
 	public static String SpyDialog_close;
 	public static String SpyDialog_activeShell_title;
 	public static String SpyDialog_activeShell_desc;
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
index 1693287..fbc68f9 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -66,7 +66,8 @@ MessageHelper_missing_imported_package=Missing imported package {0}
 MessageHelper_missing_host=Missing host {0}
 
 # Plug-in Spy
-SpyDialog_title = Plug-in Spy
+SpyDialog_title = Plug-in Selection Spy
+MenuSpyDialog_title = Plug-in Menu Spy
 SpyDialog_close = &Close
 SpyDialog_activeShell_title = Active Shell
 SpyDialog_activeShell_desc = The active shell class:
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
index 4a1a915..09fcf13 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
index 9ba96a2..870252c 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
@@ -76,7 +76,7 @@ public class MenuSpyDialog extends PopupDialog {
 		toolkit.decorateFormHeading(form.getForm());
 
 		// set title and image
-		form.setText(PDERuntimeMessages.SpyDialog_title);
+		form.setText(PDERuntimeMessages.MenuSpyDialog_title);
 		Image image = PDERuntimePluginImages.get(PDERuntimePluginImages.IMG_SPY_OBJ);
 		form.setImage(image);
 
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
index d16a85d..7c8d159 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 EclipseSource Corporation and others.
+ * Copyright (c) 2009, 2010 EclipseSource Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     EclipseSource Corporation - initial API and implementation
+ *     Anyware Technologies - ongoing enhancements
  *******************************************************************************/
 package org.eclipse.pde.internal.runtime.spy.sections;
 
@@ -20,9 +21,9 @@ import org.eclipse.pde.internal.runtime.PDERuntimePlugin;
 import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.actions.RetargetAction;
 import org.eclipse.ui.forms.widgets.*;
-import org.eclipse.ui.internal.IActionSetContributionItem;
-import org.eclipse.ui.internal.PluginAction;
+import org.eclipse.ui.internal.*;
 import org.eclipse.ui.menus.CommandContributionItem;
 import org.osgi.framework.Bundle;
 import org.osgi.service.packageadmin.PackageAdmin;
@@ -139,23 +140,36 @@ public class ActiveMenuSection implements ISpySection {
 
 	private void createActionContributionItemText(Object object, StringBuffer buffer, SpyFormToolkit toolkit, FormText text, Class clazz, PluginAction pluginAction) {
 		try {
-			Field field = clazz.getDeclaredField("delegate"); //$NON-NLS-1$
-			field.setAccessible(true);
-			IActionDelegate delegate = (IActionDelegate) field.get(pluginAction);
-			if (delegate == null) { // have to invoke createDelegate if we don't have one yet...
-				Method method = clazz.getDeclaredMethod("createDelegate", null); //$NON-NLS-1$
-				method.setAccessible(true);
-				method.invoke(pluginAction, null);
+			RetargetAction retargetAction = null;
+			IActionDelegate delegate = null;
+			if (pluginAction instanceof WWinPluginAction) {
+				// such an action *may* have a retarget action
+				Field field = clazz.getDeclaredField("retargetAction"); //$NON-NLS-1$
+				field.setAccessible(true);
+				retargetAction = (RetargetAction) field.get(pluginAction);
+			}
+			// if there's no retarget action OR if the pluginAction is not a WWinPluginAction, let's try to find the action delegate
+			if (retargetAction == null) {
+				Field field = clazz.getDeclaredField("delegate"); //$NON-NLS-1$
+				field.setAccessible(true);
 				delegate = (IActionDelegate) field.get(pluginAction);
+				if (delegate == null) { // have to invoke createDelegate if we don't have one yet...
+					Method method = clazz.getDeclaredMethod("createDelegate", null); //$NON-NLS-1$
+					method.setAccessible(true);
+					method.invoke(pluginAction, null);
+					delegate = (IActionDelegate) field.get(pluginAction);
+				}
 			}
-
-			buffer.append(toolkit.createClassSection(text, PDERuntimeMessages.ActiveMenuSection_6, new Class[] {delegate.getClass()}));
+			buffer.append(toolkit.createClassSection(text, PDERuntimeMessages.ActiveMenuSection_6, new Class[] {(retargetAction == null) ? delegate.getClass() : retargetAction.getActionHandler().getClass()}));
 			PackageAdmin admin = PDERuntimePlugin.getDefault().getPackageAdmin();
 			Bundle bundle = admin.getBundle(clazz);
 			toolkit.generatePluginDetailsText(bundle, null, "menu item", buffer, text); //$NON-NLS-1$
 
 		} catch (Exception e) {
-			createActionContributionItemText(object, buffer, toolkit, text, clazz.getSuperclass(), pluginAction);
+			Class superclass = clazz.getSuperclass();
+			if (superclass != null) {
+				createActionContributionItemText(object, buffer, toolkit, text, superclass, pluginAction);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
index 25a620c..eab9dda 100644
--- a/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
+++ b/eclipse/plugins/org.eclipse.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Chris Aniszczyk <zx at us.ibm.com> - initial API and implementation
+ *     Heiko Seeberger - changes for bug 237764
  *******************************************************************************/
 package org.eclipse.pde.internal.runtime.spy.sections;
 
@@ -38,6 +39,9 @@ public class ActivePartSection implements ISpySection {
 			return;
 
 		final IWorkbenchPart part = HandlerUtil.getActivePart(event);
+		if (part == null)
+			return; // (Bug 237764) if no active part let's do nothing ...
+
 		String partType = part instanceof IEditorPart ? "editor" : "view"; //$NON-NLS-1$ //$NON-NLS-2$
 		Section section = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR);
 
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
index 71de598..ebbfc53 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ua.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ua.core.Activator
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.pde.core;bundle-version="[3.3.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpDocumentHandler.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpDocumentHandler.java
index 69ed00b..3376607 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpDocumentHandler.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpDocumentHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,8 @@ package org.eclipse.pde.internal.ua.core.ctxhelp.text;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.internal.core.text.IDocumentElementNode;
 import org.eclipse.pde.internal.core.text.NodeDocumentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 
 /**
  * Document handler for context help xml files.
@@ -48,4 +50,48 @@ public class CtxHelpDocumentHandler extends NodeDocumentHandler {
 	protected IDocumentElementNode getRootNode() {
 		return (IDocumentElementNode) fModel.getRoot();
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.text.DocumentHandler#startDocument()
+	 */
+	public void startDocument() throws SAXException {
+		//starting fresh parsing, clean the known errors
+		fModel.purgeErrors();
+		super.startDocument();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.xml.sax.helpers.DefaultHandler#endDocument()
+	 */
+	public void endDocument() throws SAXException {
+		//reached the document end, refresh the markers (if any)
+		super.endDocument();
+		if (fModel.isMarkerRefreshNeeded()) {
+			CtxHelpMarkerManager.refreshMarkers(fModel);
+			fModel.setMarkerRefreshNeeded(false);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.text.DocumentHandler#error(org.xml.sax.SAXParseException)
+	 */
+	public void error(SAXParseException e) throws SAXException {
+		//error are recoverable so add it and continue
+		fModel.addError(e);
+		super.error(e);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.core.text.DocumentHandler#fatalError(org.xml.sax.SAXParseException)
+	 */
+	public void fatalError(SAXParseException e) throws SAXException {
+		//fatalError are not recoverable, so add it and refresh the marker as the document won't be parsed further
+		fModel.addError(e);
+		super.fatalError(e);
+		if (fModel.isMarkerRefreshNeeded()) {
+			CtxHelpMarkerManager.refreshMarkers(fModel);
+			fModel.setMarkerRefreshNeeded(false);
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java
new file mode 100644
index 0000000..4a73d9c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpMarkerManager.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.ua.core.ctxhelp.text;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Manages markers for xml problems in the context help editor
+ */
+public class CtxHelpMarkerManager {
+
+	public static void refreshMarkers(CtxHelpModel model) {
+		deleteMarkers(model);
+		createMarkers(model);
+	}
+
+	public static void deleteMarkers(CtxHelpModel model) {
+		try {
+			IMarker[] problems = model.getUnderlyingResource().findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+			if (problems != null) {
+				for (int index = 0; index < problems.length; index++) {
+					problems[index].delete();
+				}
+			}
+		} catch (CoreException e) {
+		}
+
+	}
+
+	public static void createMarkers(CtxHelpModel model) {
+		Collection errors = model.getErrors();
+		if (errors == null || errors.size() == 0) {
+			return;
+		}
+
+		Iterator iter = errors.iterator();
+		while (iter.hasNext()) {
+			Throwable exception = (Throwable) iter.next();
+			if (exception instanceof SAXParseException) {
+				int line = ((SAXParseException) exception).getLineNumber();
+				try {
+
+					IMarker marker = model.getUnderlyingResource().createMarker(IMarker.PROBLEM);
+
+					marker.setAttribute(IMarker.LINE_NUMBER, line);
+					marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
+					marker.setAttribute(IMarker.MESSAGE, exception.getLocalizedMessage());
+				} catch (CoreException e) {
+				}
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpModel.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpModel.java
index c4ca2ee..7e7142e 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpModel.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/ctxhelp/text/CtxHelpModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,10 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ua.core.ctxhelp.text;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IWritable;
@@ -30,6 +34,8 @@ public class CtxHelpModel extends XMLEditingModel {
 	private CtxHelpDocumentHandler fHandler;
 	private CtxHelpDocumentFactory fFactory;
 	private CtxHelpRoot fRoot;
+	private List fErrors;
+	private boolean fMarkerRefreshNeeded;
 
 	public CtxHelpModel(IDocument document, boolean isReconciling) {
 		super(document, isReconciling);
@@ -42,8 +48,7 @@ public class CtxHelpModel extends XMLEditingModel {
 	 * org.eclipse.pde.internal.core.text.XMLEditingModel#createDocumentHandler
 	 * (org.eclipse.pde.core.IModel, boolean)
 	 */
-	protected DefaultHandler createDocumentHandler(IModel model,
-			boolean reconciling) {
+	protected DefaultHandler createDocumentHandler(IModel model, boolean reconciling) {
 		if (fHandler == null) {
 			fHandler = new CtxHelpDocumentHandler(this, reconciling);
 		}
@@ -95,4 +100,30 @@ public class CtxHelpModel extends XMLEditingModel {
 		return getCtxHelpRoot();
 	}
 
+	public void addError(Exception e) {
+		if (fErrors == null) {
+			fErrors = new ArrayList(1);
+		}
+		if (!fErrors.contains(e)) {
+			fErrors.add(e);
+		}
+	}
+
+	public Collection getErrors() {
+		return fErrors;
+	}
+
+	public void purgeErrors() {
+		if (fErrors != null) {
+			fErrors.clear();
+		}
+	}
+
+	public void setMarkerRefreshNeeded(boolean refresh) {
+		this.fMarkerRefreshNeeded = refresh;
+	}
+
+	public boolean isMarkerRefreshNeeded() {
+		return fMarkerRefreshNeeded;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocDocumentHandler.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocDocumentHandler.java
index c421b97..20718ed 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocDocumentHandler.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocDocumentHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ package org.eclipse.pde.internal.ua.core.toc.text;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.internal.core.text.IDocumentElementNode;
 import org.eclipse.pde.internal.core.text.NodeDocumentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
 
 public class TocDocumentHandler extends NodeDocumentHandler {
 
@@ -45,4 +47,47 @@ public class TocDocumentHandler extends NodeDocumentHandler {
 		return (IDocumentElementNode) fModel.getToc();
 	}
 
+	public void startDocument() throws SAXException {
+		//starting fresh parsing, clean the known errors
+		fModel.purgeErrors();
+		super.startDocument();
+	}
+
+	public void endDocument() throws SAXException {
+		//reached the document end, refresh the markers (if any)
+		super.endDocument();
+		if (fModel.isMarkerRefreshNeeded()) {
+			TocMarkerManager.refreshMarkers(fModel);
+			fModel.setMarkerRefreshNeeded(false);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.core.text.DocumentHandler#error(org.xml.sax.SAXParseException)
+	 */
+	public void error(SAXParseException e) throws SAXException {
+		//error are recoverable so add it and continue
+		fModel.addError(e);
+		super.error(e);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.core.text.DocumentHandler#fatalError(org.xml.sax.SAXParseException)
+	 */
+	public void fatalError(SAXParseException e) throws SAXException {
+		//fatalError are not recoverable, so add it and refresh the marker as the document won't be parsed further
+		fModel.addError(e);
+		super.fatalError(e);
+		if (fModel.isMarkerRefreshNeeded()) {
+			TocMarkerManager.refreshMarkers(fModel);
+			fModel.setMarkerRefreshNeeded(false);
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java
new file mode 100644
index 0000000..c2e0549
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocMarkerManager.java
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.pde.internal.ua.core.toc.text;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.internal.core.PDECore;
+import org.xml.sax.SAXParseException;
+
+public class TocMarkerManager {
+
+	public static void refreshMarkers(TocModel model) {
+		deleteMarkers(model);
+		createMarkers(model);
+	}
+
+	public static void deleteMarkers(TocModel model) {
+		try {
+			IMarker[] problems = model.getUnderlyingResource().findMarkers(
+					IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
+			if (problems != null) {
+				for (int index = 0; index < problems.length; index++) {
+					problems[index].delete();
+				}
+			}
+		} catch (CoreException e) {
+			PDECore.log(e);
+		}
+
+	}
+
+	public static void createMarkers(TocModel model) {
+		Collection errors = model.getErrors();
+		if (errors == null || errors.size() == 0) {
+			return;
+		}
+
+		Iterator iter = errors.iterator();
+		while (iter.hasNext()) {
+			Throwable exception = (Throwable) iter.next();
+			if (exception instanceof SAXParseException) {
+				int line = ((SAXParseException) exception).getLineNumber();
+				try {
+
+					IMarker marker = model.getUnderlyingResource()
+							.createMarker(IMarker.PROBLEM);
+
+					marker.setAttribute(IMarker.LINE_NUMBER, line);
+					marker.setAttribute(IMarker.SEVERITY,
+							IMarker.SEVERITY_ERROR);
+					marker.setAttribute(IMarker.MESSAGE, exception
+							.getLocalizedMessage());
+				} catch (CoreException e) {
+					PDECore.log(e);
+				}
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
index 6a33c5d..8c6e3a1 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.core/src/org/eclipse/pde/internal/ua/core/toc/text/TocModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,10 @@
 
 package org.eclipse.pde.internal.ua.core.toc.text;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IWritable;
@@ -26,6 +30,10 @@ public class TocModel extends XMLEditingModel {
 
 	private Toc fToc;
 
+	private List fErrors;
+
+	private boolean fMarkerRefreshNeeded;
+
 	/**
 	 * @param document
 	 * @param isReconciling
@@ -45,8 +53,7 @@ public class TocModel extends XMLEditingModel {
 	 * org.eclipse.pde.internal.core.text.XMLEditingModel#createDocumentHandler
 	 * (org.eclipse.pde.core.IModel, boolean)
 	 */
-	protected DefaultHandler createDocumentHandler(IModel model,
-			boolean reconciling) {
+	protected DefaultHandler createDocumentHandler(IModel model, boolean reconciling) {
 
 		if (fHandler == null) {
 			fHandler = new TocDocumentHandler(this, reconciling);
@@ -91,4 +98,35 @@ public class TocModel extends XMLEditingModel {
 		return getToc();
 	}
 
+	public TocDocumentHandler getDocumentHandler() {
+		return fHandler;
+	}
+
+	public void addError(Exception e) {
+		if (fErrors == null) {
+			fErrors = new ArrayList(1);
+		}
+
+		if (!fErrors.contains(e)) {
+			fErrors.add(e);
+		}
+	}
+
+	public Collection getErrors() {
+		return fErrors;
+	}
+
+	public void purgeErrors() {
+		if (fErrors != null) {
+			fErrors.clear();
+		}
+	}
+
+	public void setMarkerRefreshNeeded(boolean refresh) {
+		this.fMarkerRefreshNeeded = refresh;
+	}
+
+	public boolean isMarkerRefreshNeeded() {
+		return fMarkerRefreshNeeded;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
index c537e4b..623965c 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde.ua.ui;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.100.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin
 Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSPage.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSPage.java
index a989023..c56b986 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/comp/CompCSPage.java
@@ -23,7 +23,6 @@ import org.eclipse.pde.internal.ua.core.icheatsheet.comp.ICompCSObject;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPluginImages;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
 import org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock;
 import org.eclipse.ui.PlatformUI;
@@ -49,17 +48,21 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 		fBlock = new CompCSBlock(this);
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/composite_cs_editor/editor.htm"; //$NON-NLS-1$
+		return IHelpContextIds.COMPOSITE_CS_EDITOR;
 	}
 
-	// TODO: MP: LOW: CompCS: Clean-up and reuse externalized strings
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.
+	 * eclipse.ui.forms.IManagedForm)
 	 */
 	protected void createFormContent(IManagedForm managedForm) {
 		// Bug: Two veritical scrollbars appear when resizing the editor
@@ -75,15 +78,19 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 				e = ((AbstractModel) model).getException();
 			}
 			// Create a formatted error page
-			createFormErrorContent(managedForm, Messages.CompCSPage_loadFailure, Messages.CompCSPage_error, e);
+			createFormErrorContent(managedForm,
+					Messages.CompCSPage_loadFailure, Messages.CompCSPage_error,
+					e);
 			return;
 		}
 		// Create the rest of the actions in the form title area
 		super.createFormContent(managedForm);
 		// Form image
-		form.setImage(PDEUserAssistanceUIPlugin.getDefault().getLabelProvider().get(PDEUserAssistanceUIPluginImages.DESC_CHEATSHEET_OBJ));
+		form.setImage(PDEUserAssistanceUIPlugin.getDefault().getLabelProvider()
+				.get(PDEUserAssistanceUIPluginImages.DESC_CHEATSHEET_OBJ));
 		// Form title
-		String title = PDETextHelper.translateReadText(model.getCompCS().getFieldName());
+		String title = PDETextHelper.translateReadText(model.getCompCS()
+				.getFieldName());
 		if (title.length() > 0) {
 			form.setText(title);
 		} else {
@@ -92,16 +99,19 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 		// Create the masters details block
 		// Note: Scrolled form #2 created here
 		fBlock.createContent(managedForm);
-		// Force the selection in the masters tree section to load the 
+		// Force the selection in the masters tree section to load the
 		// proper details section
 		fBlock.getMastersSection().fireSelection();
 		// Register this page to be informed of model change events
 		model.addModelChangedListener(this);
 		// Set context-sensitive help
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.COMPOSITE_CS_EDITOR);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(),
+				IHelpContextIds.COMPOSITE_CS_EDITOR);
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#dispose()
 	 */
 	public void dispose() {
@@ -113,8 +123,12 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 		super.dispose();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde
+	 * .core.IModelChangedEvent)
 	 */
 	public void modelChanged(IModelChangedEvent event) {
 
@@ -125,10 +139,14 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 				// Ignore
 			} else if (object.getType() == ICompCSConstants.TYPE_COMPOSITE_CHEATSHEET) {
 				String changeProperty = event.getChangedProperty();
-				if ((changeProperty != null) && changeProperty.equals(ICompCSConstants.ATTRIBUTE_NAME)) {
+				if ((changeProperty != null)
+						&& changeProperty
+								.equals(ICompCSConstants.ATTRIBUTE_NAME)) {
 					// Has to be a String if the property is a title
 					// Update the form page title
-					getManagedForm().getForm().setText(PDETextHelper.translateReadText((String) event.getNewValue()));
+					getManagedForm().getForm().setText(
+							PDETextHelper.translateReadText((String) event
+									.getNewValue()));
 				}
 			}
 		} else if (event.getChangeType() == IModelChangedEvent.WORLD_CHANGED) {
@@ -158,7 +176,8 @@ public class CompCSPage extends PDEFormPage implements IModelChangedListener {
 		} else if (object.getType() == ICompCSConstants.TYPE_COMPOSITE_CHEATSHEET) {
 			String newValue = ((ICompCS) object).getFieldName();
 			// Update page title
-			getManagedForm().getForm().setText(PDETextHelper.translateReadText(newValue));
+			getManagedForm().getForm().setText(
+					PDETextHelper.translateReadText(newValue));
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSDefinitionPage.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSDefinitionPage.java
index 8d061c4..5ae2388 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSDefinitionPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSDefinitionPage.java
@@ -24,7 +24,6 @@ import org.eclipse.pde.internal.ua.core.cheatsheet.simple.ISimpleCSObject;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPluginImages;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
 import org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock;
 import org.eclipse.pde.internal.ui.editor.PDESourcePage;
@@ -37,9 +36,10 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
 
 /**
  * SimpleCSPage
- *
+ * 
  */
-public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChangedListener {
+public class SimpleCSDefinitionPage extends PDEFormPage implements
+		IModelChangedListener {
 
 	public static final String PAGE_ID = "simpleCSPage"; //$NON-NLS-1$
 
@@ -54,15 +54,21 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		fBlock = new SimpleCSBlock(this);
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/simple_cs_editor/editor.htm"; //$NON-NLS-1$
+		return IHelpContextIds.SIMPLE_CS_EDITOR;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.
+	 * eclipse.ui.forms.IManagedForm)
 	 */
 	protected void createFormContent(IManagedForm managedForm) {
 		// Bug: Two veritical scrollbars appear when resizing the editor
@@ -78,15 +84,19 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 				e = ((AbstractModel) model).getException();
 			}
 			// Create a formatted error page
-			createFormErrorContent(managedForm, SimpleMessages.SimpleCSDefinitionPage_loadFailure, SimpleMessages.SimpleCSDefinitionPage_errorMessage, e);
+			createFormErrorContent(managedForm,
+					SimpleMessages.SimpleCSDefinitionPage_loadFailure,
+					SimpleMessages.SimpleCSDefinitionPage_errorMessage, e);
 			return;
 		}
 		// Create the rest of the actions in the form title area
 		super.createFormContent(managedForm);
 		// Form image
-		form.setImage(PDEUserAssistanceUIPlugin.getDefault().getLabelProvider().get(PDEUserAssistanceUIPluginImages.DESC_CHEATSHEET_OBJ));
+		form.setImage(PDEUserAssistanceUIPlugin.getDefault().getLabelProvider()
+				.get(PDEUserAssistanceUIPluginImages.DESC_CHEATSHEET_OBJ));
 		// Form title
-		String title = PDETextHelper.translateReadText(model.getSimpleCS().getTitle());
+		String title = PDETextHelper.translateReadText(model.getSimpleCS()
+				.getTitle());
 		if (title.length() > 0) {
 			form.setText(title);
 		} else {
@@ -95,16 +105,19 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		// Create the masters details block
 		// Note: Scrolled form #2 created here
 		fBlock.createContent(managedForm);
-		// Force the selection in the masters tree section to load the 
+		// Force the selection in the masters tree section to load the
 		// proper details section
 		fBlock.getMastersSection().fireSelection();
 		// Register this page to be informed of model change events
 		model.addModelChangedListener(this);
 		// Set context-sensitive help
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.SIMPLE_CS_EDITOR);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(),
+				IHelpContextIds.SIMPLE_CS_EDITOR);
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#dispose()
 	 */
 	public void dispose() {
@@ -116,8 +129,12 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		super.dispose();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde
+	 * .core.IModelChangedEvent)
 	 */
 	public void modelChanged(IModelChangedEvent event) {
 
@@ -132,14 +149,18 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 				// Ignore
 			} else if (object.getType() == ISimpleCSConstants.TYPE_CHEAT_SHEET) {
 				String changeProperty = event.getChangedProperty();
-				if ((changeProperty != null) && changeProperty.equals(ISimpleCSConstants.ATTRIBUTE_TITLE)) {
+				if ((changeProperty != null)
+						&& changeProperty
+								.equals(ISimpleCSConstants.ATTRIBUTE_TITLE)) {
 					// Has to be a String if the property is a title
 					// Update the form page title
-					getManagedForm().getForm().setText(PDETextHelper.translateReadText((String) event.getNewValue()));
+					getManagedForm().getForm().setText(
+							PDETextHelper.translateReadText((String) event
+									.getNewValue()));
 				}
 			}
 		} else if (event.getChangeType() == IModelChangedEvent.WORLD_CHANGED) {
-			fStale=true;
+			fStale = true;
 		}
 		// Inform the block
 		fBlock.modelChanged(event);
@@ -159,7 +180,9 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		return fBlock;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#setActive(boolean)
 	 */
 	public void setActive(boolean active) {
@@ -171,7 +194,8 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		}
 		// Switching into this page
 		// Get source page
-		IFormPage page = getPDEEditor().findPage(SimpleCSInputContext.CONTEXT_ID);
+		IFormPage page = getPDEEditor().findPage(
+				SimpleCSInputContext.CONTEXT_ID);
 		// Ensure we got the source page
 		if ((page instanceof PDESourcePage) == false) {
 			return;
@@ -205,9 +229,10 @@ public class SimpleCSDefinitionPage extends PDEFormPage implements IModelChanged
 		}
 		// Select the node in the master tree viewer if defined
 		fBlock.getMastersSection().setFormInput(range);
-		
-		if (fStale){
-			// If we get a global model change the model's title may have changed
+
+		if (fStale) {
+			// If we get a global model change the model's title may have
+			// changed
 			ScrolledForm form = getManagedForm().getForm();
 			ISimpleCSModel model = (ISimpleCSModel) getModel();
 			String oldTitle = form.getText();
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
index c705c82..c46216b 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/SimpleCSMasterTreeSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -149,7 +149,7 @@ public class SimpleCSMasterTreeSection extends TreeSection implements ICSMaster
 	 * 
 	 */
 	private void initializeTreeViewer() {
-
+		ISelection selection = fTreeViewer.getSelection();
 		if (fModel == null) {
 			return;
 		}
@@ -166,10 +166,11 @@ public class SimpleCSMasterTreeSection extends TreeSection implements ICSMaster
 		getTreePart().setButtonEnabled(F_BUTTON_DOWN, false);
 		getTreePart().setButtonEnabled(F_BUTTON_PREVIEW, true);
 
-		ISimpleCS cheatsheet = fModel.getSimpleCS();
+		//ISimpleCS cheatsheet = fModel.getSimpleCS();
 		// Select the cheatsheet node in the tree
-		fTreeViewer.setSelection(new StructuredSelection(cheatsheet), true);
-		fTreeViewer.expandToLevel(2);
+		//fTreeViewer.setSelection(new StructuredSelection(cheatsheet), true);
+		//fTreeViewer.expandToLevel(2);
+		fTreeViewer.setSelection(selection, true);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSHelpDetails.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSHelpDetails.java
index 355d43a..7dc173b 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSHelpDetails.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSHelpDetails.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
 
 /**
  * SimpleCSHelpDetailsSection
- *
+ * 
  */
 public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 
@@ -85,16 +85,24 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		fHelpSection = null;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.CSAbstractDetails#setData(java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.cheatsheet.CSAbstractDetails#setData
+	 * (java.lang.Object)
 	 */
 	public void setData(ISimpleCSHelpObject object) {
 		// Set data
 		fHelpObject = object;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails#createDetails(org.eclipse.swt.widgets.Composite)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails
+	 * #createDetails(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createDetails(Composite parent) {
 
@@ -106,24 +114,30 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		Color foreground = toolkit.getColors().getColor(IFormColors.TITLE);
 
 		// Create help section
-		fHelpSection = toolkit.createSection(parent, Section.DESCRIPTION | ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
+		fHelpSection = toolkit.createSection(parent, Section.DESCRIPTION
+				| ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
 		fHelpSection.clientVerticalSpacing = FormLayoutFactory.SECTION_HEADER_VERTICAL_SPACING;
-		fHelpSection.setText(SimpleDetailsMessages.SimpleCSHelpDetails_helpSectionText);
-		fHelpSection.setDescription(SimpleDetailsMessages.SimpleCSHelpDetails_helpSectionDesc);
-		fHelpSection.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
+		fHelpSection
+				.setText(SimpleDetailsMessages.SimpleCSHelpDetails_helpSectionText);
+		fHelpSection
+				.setDescription(SimpleDetailsMessages.SimpleCSHelpDetails_helpSectionDesc);
+		fHelpSection.setLayout(FormLayoutFactory
+				.createClearGridLayout(false, 1));
 		data = new GridData(GridData.FILL_HORIZONTAL);
 		fHelpSection.setLayoutData(data);
 
-		// Create container for help section		
+		// Create container for help section
 		Composite helpSectionClient = toolkit.createComposite(fHelpSection);
-		helpSectionClient.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, columnSpan));
+		helpSectionClient.setLayout(FormLayoutFactory
+				.createSectionClientGridLayout(false, columnSpan));
 
-		// Attribute: href		
+		// Attribute: href
 		// Attribute: contextId
-		label = toolkit.createLabel(helpSectionClient, SimpleDetailsMessages.SimpleCSHelpDetails_attrType, SWT.WRAP);
+		label = toolkit.createLabel(helpSectionClient,
+				SimpleDetailsMessages.SimpleCSHelpDetails_attrType, SWT.WRAP);
 		label.setForeground(foreground);
 
-		// Attribute: href		
+		// Attribute: href
 		// Attribute: contextId
 		fHelpCombo = new ComboPart();
 		fHelpCombo.createControl(helpSectionClient, toolkit, SWT.READ_ONLY);
@@ -135,18 +149,20 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		fHelpCombo.add(F_HELP_DOCUMENT_LINK);
 		fHelpCombo.setText(F_NO_HELP);
 
-		// Attribute: href		
+		// Attribute: href
 		// Attribute: contextId
-		fHelpLabel = toolkit.createLabel(helpSectionClient, SimpleDetailsMessages.SimpleCSHelpDetails_attrValue, SWT.WRAP);
+		fHelpLabel = toolkit.createLabel(helpSectionClient,
+				SimpleDetailsMessages.SimpleCSHelpDetails_attrValue, SWT.WRAP);
 		fHelpLabel.setForeground(foreground);
 
-		// Attribute: href		
+		// Attribute: href
 		// Attribute: contextId
 		fHelpText = toolkit.createText(helpSectionClient, null);
 		data = new GridData(GridData.FILL_HORIZONTAL);
 		fHelpText.setLayoutData(data);
 		// Browse Button
-		fHelpBrowse = toolkit.createButton(helpSectionClient, SimpleDetailsMessages.SimpleCSHelpDetails_browse, SWT.PUSH);
+		fHelpBrowse = toolkit.createButton(helpSectionClient,
+				SimpleDetailsMessages.SimpleCSHelpDetails_browse, SWT.PUSH);
 
 		// Bind widgets
 		toolkit.paintBordersFor(helpSectionClient);
@@ -155,13 +171,17 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		markDetailsPart(fHelpSection);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails#hookListeners()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails
+	 * #hookListeners()
 	 */
 	public void hookListeners() {
 
-		// Attribute: href		
-		// Attribute: contextId		
+		// Attribute: href
+		// Attribute: contextId
 		fHelpCombo.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				// Ensure data object is defined
@@ -172,12 +192,12 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 				if (selection.equals(F_NO_HELP) == false) {
 					// Help was selected
 					if (selection.equals(F_HELP_CONTEXT_ID)) {
-						// Help context ID was selected, clear the help 
+						// Help context ID was selected, clear the help
 						// document link value
 						fHelpObject.setHref(null);
 						fHelpBrowse.setEnabled(false);
 					} else {
-						// Help document link was selected, clear the help 
+						// Help document link was selected, clear the help
 						// context ID value
 						fHelpObject.setContextId(null);
 						fHelpBrowse.setEnabled(true);
@@ -204,8 +224,8 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 				}
 			}
 		});
-		// Attribute: href		
-		// Attribute: contextId		
+		// Attribute: href
+		// Attribute: contextId
 		fHelpText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				// Block UI updates
@@ -243,7 +263,9 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 	 */
 	private void handleButtonSelectedEventBrowse(SelectionEvent event) {
 		// Create the dialog
-		ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getManagedForm().getForm().getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
+		ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
+				getManagedForm().getForm().getShell(),
+				new WorkbenchLabelProvider(), new WorkbenchContentProvider());
 		// Disable multiple selection
 		dialog.setAllowMultiple(false);
 		// Title
@@ -263,7 +285,8 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		// Set the initial selection using the existing path (if any)
 		Path path = new Path(fHelpText.getText());
 		// Path must be non-empty, absolute and have at least two segments
-		if ((path.isEmpty() == false) && path.isAbsolute() && (path.segmentCount() > 1)) {
+		if ((path.isEmpty() == false) && path.isAbsolute()
+				&& (path.segmentCount() > 1)) {
 			IFile helpDocumentFile = root.getFile(path);
 			dialog.setInitialSelection(helpDocumentFile);
 		}
@@ -272,14 +295,10 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 			// Get the selection
 			Object result = dialog.getFirstResult();
 			// Ensure a file was selected
-			if ((result instanceof IFile) == false) {
+			if (!(result instanceof IFile)) {
 				return;
 			}
 			IFile file = (IFile) result;
-			// Ensure there was a selection
-			if (file == null) {
-				return;
-			}
 			// Get the absolute path
 			String absolutePath = file.getFullPath().toPortableString();
 			// Update the field
@@ -287,8 +306,12 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails#updateFields()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.cheatsheet.simple.details.ISimpleCSDetails
+	 * #updateFields()
 	 */
 	public void updateFields() {
 		// Ensure data object is defined
@@ -302,7 +325,7 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		// Block model updates
 		fBlockListeners = true;
 		// Attribute: contextId
-		// Attribute: href		
+		// Attribute: href
 		if (PDETextHelper.isDefined(fHelpObject.getContextId())) {
 			fHelpText.setText(fHelpObject.getContextId());
 			fHelpText.setToolTipText(fHelpObject.getContextId());
@@ -327,7 +350,9 @@ public class SimpleCSHelpDetails extends CSAbstractSubDetails {
 		fHelpCombo.setEnabled(editable);
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean)
 	 */
 	public void commit(boolean onSave) {
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSItemDetails.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSItemDetails.java
index 30e2472..7dcd23e 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSItemDetails.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/cheatsheet/simple/details/SimpleCSItemDetails.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -282,7 +282,8 @@ public class SimpleCSItemDetails extends CSAbstractDetails {
 
 		// description:  Content (Element)
 		fBlockEvents = true;
-		fContentViewer.getDocument().set(fItem.getDescription().getContent());
+		String content = fItem.getDescription().getContent();
+		fContentViewer.getDocument().set(content == null ? "" : content);
 		fBlockEvents = false;
 		fContentViewer.getViewer().setEditable(editable);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpEditor.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpEditor.java
index 745f5e4..8bda6c0 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.action.ControlContribution;
 import org.eclipse.jface.action.IToolBarManager;
@@ -29,6 +30,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.pde.core.IModel;
+import org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpMarkerManager;
 import org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpModel;
 import org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpObject;
 import org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpTopic;
@@ -352,4 +354,35 @@ public class CtxHelpEditor extends MultiSourceEditor {
 		dialog.open();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor monitor) {
+		CtxHelpModel model = (CtxHelpModel) getAggregateModel();
+		model.setMarkerRefreshNeeded(true);
+
+		super.doSave(monitor);
+		model.reconciled(model.getDocument()); //model recon occurs async so we can proceed to save
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#dispose()
+	 */
+	public void dispose() {
+		//editor is closing, delete the markers
+		CtxHelpMarkerManager.deleteMarkers((CtxHelpModel) getAggregateModel());
+		super.dispose();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createInputContexts(org.eclipse.pde.internal.ui.editor.context.InputContextManager)
+	 */
+	protected void createInputContexts(InputContextManager contextManager) {
+		super.createInputContexts(contextManager);
+
+		// model is loaded, create markers if there were errors found
+		CtxHelpMarkerManager.createMarkers((CtxHelpModel) getAggregateModel());
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpPage.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpPage.java
index 8f70a6f..8a4db78 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/ctxhelp/CtxHelpPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ua.ui.editor.ctxhelp;
 
+import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -23,7 +24,6 @@ import org.eclipse.pde.internal.ua.core.ctxhelp.text.CtxHelpObject;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPluginImages;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
 import org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock;
 import org.eclipse.swt.custom.StyledText;
@@ -34,9 +34,10 @@ import org.eclipse.ui.forms.editor.IFormPage;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 
 /**
- * The main page for the context help editor.  Contains a tree displaying the 
- * structure of the xml and a details section.  UI elements are handled by 
+ * The main page for the context help editor. Contains a tree displaying the
+ * structure of the xml and a details section. UI elements are handled by
  * CtxHelpBlock.
+ * 
  * @since 3.4
  * @see CtxHelpEditor
  * @see CtxHelpBlock
@@ -58,8 +59,12 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 		return fBlock;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.
+	 * eclipse.ui.forms.IManagedForm)
 	 */
 	protected void createFormContent(IManagedForm managedForm) {
 		ScrolledForm form = managedForm.getForm();
@@ -67,8 +72,7 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 
 		// Ensure the model was loaded properly
 		if ((model == null) || (model.isLoaded() == false)) {
-			createFormErrorContent(managedForm, CtxHelpMessages.CtxHelpPage_errTitle, CtxHelpMessages.CtxHelpPage_errMsg, null);
-			return;
+			createErrorContent(managedForm);
 		}
 
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.CTX_HELP_EDITOR);
@@ -80,14 +84,22 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 		form.setText(CtxHelpMessages.CtxHelpPage_formText);
 		// Create the master details block
 		fBlock.createContent(managedForm);
-		// Force the selection in the masters tree section to load the 
+		// Force the selection in the masters tree section to load the
 		// proper details section
 		fBlock.getMasterSection().fireSelection();
 		// Register this page to be informed of model change events
 		model.addModelChangedListener(this);
 	}
 
-	/* (non-Javadoc)
+	private void createErrorContent(IManagedForm managedForm) {
+		// Add error meesage to the form
+		ScrolledForm form = managedForm.getForm();
+		form.setMessage(CtxHelpMessages.CtxHelpPage_errMsg, IMessageProvider.ERROR);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#dispose()
 	 */
 	public void dispose() {
@@ -98,8 +110,12 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 		super.dispose();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde
+	 * .core.IModelChangedEvent)
 	 */
 	public void modelChanged(IModelChangedEvent event) {
 		fBlock.modelChanged(event);
@@ -112,12 +128,22 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 		return fBlock.getSelection();
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#setActive(boolean)
 	 */
 	public void setActive(boolean active) {
 		super.setActive(active);
 		if (active) {
+			CtxHelpModel model = (CtxHelpModel) getModel();
+			if ((model == null) || (model.isLoaded() == false)) {
+				createErrorContent(getManagedForm());
+			} else {
+				// Clear the error message
+				getManagedForm().getForm().setMessage("", IMessageProvider.NONE);
+			}
+
 			IFormPage page = getPDEEditor().findPage(CtxHelpInputContext.CONTEXT_ID);
 			if (page instanceof CtxHelpSourcePage && ((CtxHelpSourcePage) page).getInputContext().isInSourceMode()) {
 				ISourceViewer viewer = ((CtxHelpSourcePage) page).getViewer();
@@ -149,10 +175,12 @@ public class CtxHelpPage extends PDEFormPage implements IModelChangedListener {
 		}
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/ctx_help_editor/ctx_help_editor.htm"; //$NON-NLS-1$
+		return IHelpContextIds.CTX_HELP_EDITOR;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocEditor.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocEditor.java
index 0d72553..74d4adf 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.action.ControlContribution;
@@ -29,6 +30,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.pde.core.IModel;
+import org.eclipse.pde.internal.ua.core.toc.text.TocMarkerManager;
 import org.eclipse.pde.internal.ua.core.toc.text.TocModel;
 import org.eclipse.pde.internal.ua.core.toc.text.TocObject;
 import org.eclipse.pde.internal.ua.ui.IConstants;
@@ -55,8 +57,8 @@ import org.eclipse.ui.part.IShowInTargetList;
 import org.eclipse.ui.part.ShowInContext;
 
 /**
- * Editor for table of contents xml files (for user assistance).  Provides a graphical way to
- * view and edit the xml files, as well as a source viewer.
+ * Editor for table of contents xml files (for user assistance). Provides a
+ * graphical way to view and edit the xml files, as well as a source viewer.
  */
 public class TocEditor extends MultiSourceEditor {
 
@@ -66,7 +68,9 @@ public class TocEditor extends MultiSourceEditor {
 		super();
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#getEditorID()
 	 */
 	protected String getEditorID() {
@@ -121,7 +125,8 @@ public class TocEditor extends MultiSourceEditor {
 
 	/**
 	 * Returns the <code>IShowInSource</code> for this section.
-	 * @return the <code>IShowInSource</code> 
+	 * 
+	 * @return the <code>IShowInSource</code>
 	 */
 	private IShowInSource getShowInSource() {
 		return new IShowInSource() {
@@ -166,7 +171,8 @@ public class TocEditor extends MultiSourceEditor {
 
 	/**
 	 * Returns the <code>IShowInTargetList</code> for this section.
-	 * @return the <code>IShowInTargetList</code> 
+	 * 
+	 * @return the <code>IShowInTargetList</code>
 	 */
 	private IShowInTargetList getShowInTargetList() {
 		return new IShowInTargetList() {
@@ -176,21 +182,28 @@ public class TocEditor extends MultiSourceEditor {
 		};
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#isSaveAsAllowed()
 	 */
 	public boolean isSaveAsAllowed() {
 		return true;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#getContextIDForSaveAs()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#getContextIDForSaveAs()
 	 */
 	public String getContextIDForSaveAs() {
 		return TocInputContext.CONTEXT_ID;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#addEditorPages()
 	 */
 	protected void addEditorPages() {
@@ -203,37 +216,59 @@ public class TocEditor extends MultiSourceEditor {
 		addSourcePage(TocInputContext.CONTEXT_ID);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createContentOutline()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createContentOutline()
 	 */
 	protected ISortableContentOutlinePage createContentOutline() {
 		return new TocFormOutlinePage(this);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createInputContextManager()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createInputContextManager
+	 * ()
 	 */
 	protected InputContextManager createInputContextManager() {
 		return new TocInputContextManager(this);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createResourceContexts(org.eclipse.pde.internal.ui.editor.context.InputContextManager, org.eclipse.ui.IFileEditorInput)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createResourceContexts
+	 * (org.eclipse.pde.internal.ui.editor.context.InputContextManager,
+	 * org.eclipse.ui.IFileEditorInput)
 	 */
 	protected void createResourceContexts(InputContextManager contexts, IFileEditorInput input) {
 		contexts.putContext(input, new TocInputContext(this, input, true));
 		contexts.monitorFile(input.getFile());
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createStorageContexts(org.eclipse.pde.internal.ui.editor.context.InputContextManager, org.eclipse.ui.IStorageEditorInput)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createStorageContexts
+	 * (org.eclipse.pde.internal.ui.editor.context.InputContextManager,
+	 * org.eclipse.ui.IStorageEditorInput)
 	 */
 	protected void createStorageContexts(InputContextManager contexts, IStorageEditorInput input) {
 		contexts.putContext(input, new TocInputContext(this, input, true));
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#createSystemFileContexts(org.eclipse.pde.internal.ui.editor.context.InputContextManager, org.eclipse.pde.internal.ui.editor.SystemFileEditorInput)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createSystemFileContexts
+	 * (org.eclipse.pde.internal.ui.editor.context.InputContextManager,
+	 * org.eclipse.pde.internal.ui.editor.SystemFileEditorInput)
 	 */
 	protected void createSystemFileContexts(InputContextManager contexts, FileStoreEditorInput input) {
 		try {
@@ -245,43 +280,62 @@ public class TocEditor extends MultiSourceEditor {
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#editorContextAdded(org.eclipse.pde.internal.ui.editor.context.InputContext)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#editorContextAdded(org
+	 * .eclipse.pde.internal.ui.editor.context.InputContext)
 	 */
 	public void editorContextAdded(InputContext context) {
 		// Add the source page
 		addSourcePage(context.getId());
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#getInputContext(java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#getInputContext(java
+	 * .lang.Object)
 	 */
 	protected InputContext getInputContext(Object object) {
 		return fInputContextManager.findContext(TocInputContext.CONTEXT_ID);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.context.IInputContextListener#contextRemoved(org.eclipse.pde.internal.ui.editor.context.InputContext)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.pde.internal.ui.editor.context.IInputContextListener#
+	 * contextRemoved(org.eclipse.pde.internal.ui.editor.context.InputContext)
 	 */
 	public void contextRemoved(InputContext context) {
 		close(false);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.context.IInputContextListener#monitoredFileAdded(org.eclipse.core.resources.IFile)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.pde.internal.ui.editor.context.IInputContextListener#
+	 * monitoredFileAdded(org.eclipse.core.resources.IFile)
 	 */
 	public void monitoredFileAdded(IFile monitoredFile) {
 		// NO-OP
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.context.IInputContextListener#monitoredFileRemoved(org.eclipse.core.resources.IFile)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.pde.internal.ui.editor.context.IInputContextListener#
+	 * monitoredFileRemoved(org.eclipse.core.resources.IFile)
 	 */
 	public boolean monitoredFileRemoved(IFile monitoredFile) {
 		return true;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#getSelection()
 	 */
 	public ISelection getSelection() {
@@ -310,8 +364,13 @@ public class TocEditor extends MultiSourceEditor {
 		return false;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.MultiSourceEditor#createSourcePage(org.eclipse.pde.internal.ui.editor.PDEFormEditor, java.lang.String, java.lang.String, java.lang.String)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.MultiSourceEditor#createSourcePage
+	 * (org.eclipse.pde.internal.ui.editor.PDEFormEditor, java.lang.String,
+	 * java.lang.String, java.lang.String)
 	 */
 	protected PDESourcePage createSourcePage(PDEFormEditor editor, String title, String name, String contextId) {
 		return new TocSourcePage(editor, title, name);
@@ -400,4 +459,45 @@ public class TocEditor extends MultiSourceEditor {
 			// NO-OP
 		}
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#doSave(org.eclipse.core
+	 * .runtime.IProgressMonitor)
+	 */
+	public void doSave(IProgressMonitor monitor) {
+
+		TocModel model = (TocModel) getAggregateModel();
+		model.setMarkerRefreshNeeded(true);
+		super.doSave(monitor);
+		model.reconciled(model.getDocument()); // model recon occurs async so we can proceed to save
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.pde.internal.ui.editor.PDEFormEditor#dispose()
+	 */
+	public void dispose() {
+		// editor is closing, delete the markers
+		TocMarkerManager.deleteMarkers((TocModel) getAggregateModel());
+		super.dispose();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormEditor#createInputContexts(
+	 * org.eclipse.pde.internal.ui.editor.context.InputContextManager)
+	 */
+	protected void createInputContexts(InputContextManager contextManager) {
+		super.createInputContexts(contextManager);
+
+		// model is loaded, create markers if there were errors found
+		TocMarkerManager.createMarkers((TocModel) getAggregateModel());
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocPage.java b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocPage.java
index 86ca57d..935b392 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 package org.eclipse.pde.internal.ua.ui.editor.toc;
 
+import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -27,7 +28,6 @@ import org.eclipse.pde.internal.ua.core.toc.text.TocObject;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPlugin;
 import org.eclipse.pde.internal.ua.ui.PDEUserAssistanceUIPluginImages;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
 import org.eclipse.pde.internal.ui.editor.PDEFormPage;
 import org.eclipse.pde.internal.ui.editor.PDEMasterDetailsBlock;
 import org.eclipse.swt.custom.StyledText;
@@ -39,7 +39,7 @@ import org.eclipse.ui.forms.widgets.ScrolledForm;
 
 /**
  * TocPage
- *
+ * 
  */
 public class TocPage extends PDEFormPage implements IModelChangedListener {
 	public static final String PAGE_ID = "tocPage"; //$NON-NLS-1$
@@ -62,8 +62,12 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 		return fBlock;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.internal.ui.editor.PDEFormPage#createFormContent(org.
+	 * eclipse.ui.forms.IManagedForm)
 	 */
 	protected void createFormContent(IManagedForm managedForm) {
 		ScrolledForm form = managedForm.getForm();
@@ -71,8 +75,7 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 
 		// Ensure the model was loaded properly
 		if ((model == null) || (model.isLoaded() == false)) {
-			createErrorContent(managedForm, model);
-			return;
+			createErrorContent(managedForm);
 		}
 
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TOC_EDITOR);
@@ -83,19 +86,17 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 		setFormTitle(form, model);
 		// Create the master details block
 		fBlock.createContent(managedForm);
-		// Force the selection in the masters tree section to load the 
+		// Force the selection in the masters tree section to load the
 		// proper details section
 		fBlock.getMasterSection().fireSelection();
 		// Register this page to be informed of model change events
 		model.addModelChangedListener(this);
 	}
 
-	private void createErrorContent(IManagedForm managedForm, TocModel model) {
-		Exception e = null;
-		//e = ((AbstractModel)model).getException();
-
-		// Create a formatted error page
-		createFormErrorContent(managedForm, TocMessages.TocPage_errorMessage, TocMessages.TocPage_errorMessage2, e);
+	private void createErrorContent(IManagedForm managedForm) {
+		// Add error meesage to the form
+		ScrolledForm form = managedForm.getForm();
+		form.setMessage(TocMessages.TocPage_errorMessage2, IMessageProvider.ERROR);
 	}
 
 	private void setFormTitle(ScrolledForm form, TocModel model) {
@@ -108,7 +109,9 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 		}
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#dispose()
 	 */
 	public void dispose() {
@@ -120,8 +123,12 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 		super.dispose();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde.core.IModelChangedEvent)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.pde.core.IModelChangedListener#modelChanged(org.eclipse.pde
+	 * .core.IModelChangedEvent)
 	 */
 	public void modelChanged(IModelChangedEvent event) {
 
@@ -173,6 +180,14 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 	public void setActive(boolean active) {
 		super.setActive(active);
 		if (active) {
+			TocModel model = (TocModel) getModel();
+			if ((model == null) || (model.isLoaded() == false)) {
+				createErrorContent(getManagedForm());
+			} else {
+				// Clear the error message
+				getManagedForm().getForm().setMessage("", IMessageProvider.NONE);
+			}
+
 			IFormPage page = getPDEEditor().findPage(TocInputContext.CONTEXT_ID);
 			if (page instanceof TocSourcePage && ((TocSourcePage) page).getInputContext().isInSourceMode()) {
 				ISourceViewer viewer = ((TocSourcePage) page).getViewer();
@@ -204,10 +219,12 @@ public class TocPage extends PDEFormPage implements IModelChangedListener {
 		}
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/toc_editor/page_toc.htm"; //$NON-NLS-1$
+		return IHelpContextIds.TOC_EDITOR;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/wizards/ctxhelp/messages.properties b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/wizards/ctxhelp/messages.properties
index 517a0a9..677d18c 100644
--- a/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/wizards/ctxhelp/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/wizards/ctxhelp/messages.properties
@@ -9,5 +9,5 @@ RegisterCtxHelpOperation_task=Adding new cheat sheet extension to new plug-in ma
 RegisterCtxHelpWizard_pageMessage=Enter any additional information and hit finish to register the file in plugin.xml
 RegisterCtxHelpWizard_pageTitle=Context Help
 RegisterCtxHelpWizard_plugin=&Plugin:
-RegisterCtxHelpWizard_pluginDesc=You can optionally specify a plugin that this context help file extends.
+RegisterCtxHelpWizard_pluginDesc=You can optionally specify a plug-in that this context help file extends.
 RegisterCtxHelpWizard_title=Register Context Help File
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ui.templates/META-INF/MANIFEST.MF
index 64fb2ee..bdd7396 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %bundleName
 Bundle-SymbolicName: org.eclipse.pde.ui.templates;singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.4.200.qualifier
 Bundle-Vendor: %bundleVendor
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Export-Package: org.eclipse.pde.internal.ui.templates;x-internal:=true,
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/build.properties b/eclipse/plugins/org.eclipse.pde.ui.templates/build.properties
index c6c9255..433390e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/build.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
+# Copyright (c) 2006, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,5 +19,6 @@ bin.includes = META-INF/,\
                icons/,\
                branding/,\
                about.html,\
-               templates_3.3/
+               templates_3.3/,\
+               templates_3.5/
 src.includes = about.html
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.properties b/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.properties
index 5c3d662..4ddf287 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.properties
@@ -344,3 +344,9 @@ pluginContent.helloDSOSGIService.description=\
 <li>org.osgi.util.tracker</li>\
 <li>org.eclipse.osgi.framework.console</li>
 
+pluginContent.OSGiEventAdminService.name=OSGi EventAdmin Service Example
+pluginContent.OSGiEventAdminService.description=\
+<p>This wizard listens to an event topic using the OSGi <b>EventAdmin</b> Service.</p>\
+<p><b>Imports Used</b></p>\
+<li>org.osgi.framework</li>\
+<li>org.osgi.service.event</li>
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.xml b/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.xml
index 3786e77..0d09430 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.2"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -498,6 +499,18 @@
             %pluginContent.helloDSOSGIService.description
          </description>
       </wizard>
+      <wizard
+            class="org.eclipse.pde.internal.ui.templates.osgi.OSGiEventAdminTemplateWizard"
+            icon="$nl$/icons/etool16/newexprj_wiz.gif"
+            id="org.eclipse.pde.ui.ds.OSGiEventAdminTemplateWizard"
+            name="%pluginContent.OSGiEventAdminService.name"
+            pureOSGi="true"
+            requiresActivator="false"
+            ui-content="false">
+         <description>
+            %pluginContent.OSGiEventAdminService.description
+         </description>
+      </wizard>
         
    </extension>
    
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java
index f322c03..10cb59c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateMessages.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Code 9 Corporation - ongoing development
  *     Volker Wegert - bug 243087
@@ -263,10 +263,6 @@ public class PDETemplateMessages extends NLS {
 	public static String HelloOSGiServiceNewWizard_title;
 
 	// DS OSGi Service template
-	public static String DSTemplate_startMessage;
-	public static String DSTemplate_stopMessage;
-	public static String DSTemplate_hello;
-	public static String DSTemplate_goodbye;
 	public static String DSTemplate_pageDescription;
 	public static String DSTemplate_pageTitle;
 	public static String DSTemplateWizard_title;
@@ -308,9 +304,13 @@ public class PDETemplateMessages extends NLS {
 	public static String CommonNavigatorTemplate_pagetitle;
 
 	// Declarative Services Template
-	public static String HelloServiceComponentTemplate_message;
-	public static String HelloServiceComponentTemplate_messageTitle;
 	public static String HelloServiceComponentTemplate_command;
 	public static String HelloServiceComponentTemplate_commandTitle;
 
+	// Declarative Services Template
+	public static String OSGiEventAdminTemplate_eventTopicTitle;
+	public static String OSGiEventAdminTemplateWizard_title;
+	public static String OSGiEventAdminTemplate_pageTitle;
+	public static String OSGiEventAdminTemplate_pageDescription;
+
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateSection.java b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateSection.java
index 286128b..14619f5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/PDETemplateSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,6 +54,12 @@ public abstract class PDETemplateSection extends OptionTemplateSection {
 	private String[] getDirectoryCandidates() {
 		double version = getTargetVersion();
 		ArrayList result = new ArrayList();
+		if (version >= 3.6)
+			result.add("templates_3.6" + "/" + getSectionId() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		if (version >= 3.5)
+			result.add("templates_3.5" + "/" + getSectionId() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		if (version >= 3.4)
+			result.add("templates_3.4" + "/" + getSectionId() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		if (version >= 3.3)
 			result.add("templates_3.3" + "/" + getSectionId() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		if (version >= 3.2)
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplate.java b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplate.java
new file mode 100644
index 0000000..da0ea59
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplate.java
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.templates.osgi;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.IPluginReference;
+import org.eclipse.pde.internal.ui.templates.*;
+import org.eclipse.pde.ui.IFieldData;
+
+public class OSGiEventAdminTemplate extends PDETemplateSection {
+
+	public static final String EVENT_TOPIC = "eventTopic"; //$NON-NLS-1$
+	private String packageName = null;
+
+	public OSGiEventAdminTemplate() {
+		setPageCount(1);
+		addOption(EVENT_TOPIC, PDETemplateMessages.OSGiEventAdminTemplate_eventTopicTitle, "org/osgi/framework/BundleEvent/STARTED", 0); //$NON-NLS-1$
+	}
+
+	public void addPages(Wizard wizard) {
+		WizardPage page = createPage(0, IHelpContextIds.TEMPLATE_RCP_MAIL);
+		page.setTitle(PDETemplateMessages.OSGiEventAdminTemplate_pageTitle);
+		page.setDescription(PDETemplateMessages.OSGiEventAdminTemplate_pageDescription);
+		wizard.addPage(page);
+		markPagesAdded();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.pde.ui.templates.OptionTemplateSection#getSectionId()
+	 */
+	public String getSectionId() {
+		return "OSGiEventAdmin"; //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.AbstractTemplateSection#updateModel(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void updateModel(IProgressMonitor monitor) { // do nothing
+		setManifestHeader("Service-Component", "OSGI-INF/*.xml"); //$NON-NLS-1$ //$NON-NLS-2$]
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.ITemplateSection#getUsedExtensionPoint()
+	 */
+	public String getUsedExtensionPoint() {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.BaseOptionTemplateSection#isDependentOnParentWizard()
+	 */
+	public boolean isDependentOnParentWizard() {
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.AbstractTemplateSection#getNumberOfWorkUnits()
+	 */
+	public int getNumberOfWorkUnits() {
+		return super.getNumberOfWorkUnits() + 1;
+	}
+
+	public IPluginReference[] getDependencies(String schemaVersion) {
+		return new IPluginReference[0];
+	}
+
+	protected void initializeFields(IFieldData data) {
+		// In a new project wizard, we don't know this yet - the
+		// model has not been created
+		String packageName = getFormattedPackageName(data.getId());
+		initializeOption(KEY_PACKAGE_NAME, packageName);
+		this.packageName = getFormattedPackageName(data.getId());
+	}
+
+	public void initializeFields(IPluginModelBase model) {
+		String id = model.getPluginBase().getId();
+		String packageName = getFormattedPackageName(id);
+		initializeOption(KEY_PACKAGE_NAME, packageName);
+		this.packageName = getFormattedPackageName(id);
+	}
+
+	public String getStringOption(String name) {
+		if (name.equals(KEY_PACKAGE_NAME)) {
+			return packageName;
+		}
+		return super.getStringOption(name);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplateWizard.java b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplateWizard.java
new file mode 100644
index 0000000..10635c7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/osgi/OSGiEventAdminTemplateWizard.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.templates.osgi;
+
+import org.eclipse.pde.core.plugin.IPluginReference;
+import org.eclipse.pde.internal.ui.templates.PDETemplateMessages;
+import org.eclipse.pde.ui.IFieldData;
+import org.eclipse.pde.ui.templates.ITemplateSection;
+import org.eclipse.pde.ui.templates.NewPluginTemplateWizard;
+
+public class OSGiEventAdminTemplateWizard extends NewPluginTemplateWizard {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.AbstractNewPluginTemplateWizard#init(org.eclipse.pde.ui.IFieldData)
+	 */
+	public void init(IFieldData data) {
+		super.init(data);
+		setWindowTitle(PDETemplateMessages.OSGiEventAdminTemplateWizard_title);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.templates.NewPluginTemplateWizard#createTemplateSections()
+	 */
+	public ITemplateSection[] createTemplateSections() {
+		return new ITemplateSection[] {new OSGiEventAdminTemplate()};
+	}
+
+	public String[] getImportPackages() {
+		return new String[] {"org.osgi.framework;version=\"1.3.0\"", "org.osgi.service.event;version=\"1.2.0\""}; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public IPluginReference[] getDependencies(String schemaVersion) {
+		return new IPluginReference[0];
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/pderesources.properties b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/pderesources.properties
index d18e394..b358b0e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/pderesources.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/pderesources.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2006, 2009 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2006, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
@@ -59,15 +59,10 @@ HelloOSGiServiceTemplate_pageDescription=This template creates a OSGi service th
 HelloOSGiServiceTemplate_pageTitle=Dictionary OSGi Service
 HelloOSGiServiceNewWizard_title=Dictionary OSGi Service Wizard
 
-DSTemplate_startMessage=Start Message:
-DSTemplate_stopMessage=Stop Message:
-DSTemplate_hello=Hello World\!\!
-DSTemplate_goodbye=Goodbye World\!\!
 DSTemplate_pageDescription=This template registers an OSGi service using declarative services
 DSTemplate_pageTitle=Declarative OSGi Service
 DSTemplateWizard_title=Declarative OSGi Service Wizard
 
-
 IntroNewWizard_wtitle = New RCP Project with an intro
 IntroTemplate_title = Sample Intro
 IntroTemplate_desc = This template creates a standalone RCP application with an intro.
@@ -290,5 +285,9 @@ CommonNavigatorTemplate_pagetitle=Common Navigator Settings
 # Declarative Services Template
 HelloServiceComponentTemplate_commandTitle = C&ommand:
 HelloServiceComponentTemplate_command = dict
-HelloServiceComponentTemplate_messageTitle = &Message:
-HelloServiceComponentTemplate_message = Howdy using declarative services
+
+# OSGi EventAdmin Template
+OSGiEventAdminTemplate_eventTopicTitle = &Event:
+OSGiEventAdminTemplate_pageTitle = OSGi EventAdmin Service
+OSGiEventAdminTemplateWizard_title = OSGi EventAdmin Service Wizard
+OSGiEventAdminTemplate_pageDescription = Choose the event topic to listen to
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/rcp/ViewRCPTemplate.java b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/rcp/ViewRCPTemplate.java
index 881cb7e..0f35dff 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/rcp/ViewRCPTemplate.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/src/org/eclipse/pde/internal/ui/templates/rcp/ViewRCPTemplate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Lars Vogel - bug 265231
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.templates.rcp;
 
@@ -14,14 +15,8 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.pde.core.plugin.IPluginBase;
-import org.eclipse.pde.core.plugin.IPluginElement;
-import org.eclipse.pde.core.plugin.IPluginExtension;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.IPluginReference;
-import org.eclipse.pde.internal.ui.templates.IHelpContextIds;
-import org.eclipse.pde.internal.ui.templates.PDETemplateMessages;
-import org.eclipse.pde.internal.ui.templates.PDETemplateSection;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.ui.templates.*;
 import org.eclipse.pde.ui.IFieldData;
 import org.eclipse.pde.ui.templates.PluginReference;
 
@@ -83,6 +78,9 @@ public class ViewRCPTemplate extends PDETemplateSection {
 		createApplicationExtension();
 		createPerspectiveExtension();
 		createViewExtension();
+		createPerspectiveViewExtension();
+		createMenuExtension();
+
 		if (getBooleanOption(KEY_PRODUCT_BRANDING))
 			createProductExtension();
 	}
@@ -137,6 +135,52 @@ public class ViewRCPTemplate extends PDETemplateSection {
 			plugin.add(extension);
 	}
 
+	private void createPerspectiveViewExtension() throws CoreException {
+		IPluginBase plugin = model.getPluginBase();
+		String id = plugin.getId();
+
+		IPluginExtension extension = createExtension("org.eclipse.ui.perspectiveExtensions", true); //$NON-NLS-1$
+		IPluginElement perspectiveExtension = model.getPluginFactory().createElement(extension);
+		perspectiveExtension.setName("perspectiveExtension"); //$NON-NLS-1$
+		perspectiveExtension.setAttribute("targetID", "*"); //$NON-NLS-1$ //$NON-NLS-2$
+		extension.add(perspectiveExtension);
+
+		IPluginElement view = model.getPluginFactory().createElement(perspectiveExtension);
+		view.setName("view"); //$NON-NLS-1$
+		view.setAttribute("id", id + ".view"); //$NON-NLS-1$ //$NON-NLS-2$
+		view.setAttribute("minimized", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+		view.setAttribute("relationship", "left"); //$NON-NLS-1$ //$NON-NLS-2$
+		view.setAttribute("standalone", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+		view.setAttribute("relative", "org.eclipse.ui.editorss"); //$NON-NLS-1$ //$NON-NLS-2$
+		perspectiveExtension.add(view);
+
+		if (!extension.isInTheModel())
+			plugin.add(extension);
+	}
+
+	private void createMenuExtension() throws CoreException {
+		IPluginBase plugin = model.getPluginBase();
+		IPluginExtension extension = createExtension("org.eclipse.ui.menus", true); //$NON-NLS-1$
+		IPluginElement menuContribution = model.getPluginFactory().createElement(extension);
+		menuContribution.setName("menuContribution"); //$NON-NLS-1$
+		menuContribution.setAttribute("locationURI", "menu:org.eclipse.ui.main.menu"); //$NON-NLS-1$ //$NON-NLS-2$
+		extension.add(menuContribution);
+
+		IPluginElement menu = model.getPluginFactory().createElement(menuContribution);
+		menu.setName("menu"); //$NON-NLS-1$
+		menu.setAttribute("label", "File"); //$NON-NLS-1$ //$NON-NLS-2$
+		menuContribution.add(menu);
+
+		IPluginElement command = model.getPluginFactory().createElement(menu);
+		command.setName("command"); //$NON-NLS-1$
+		command.setAttribute("commandId", "org.eclipse.ui.file.exit"); //$NON-NLS-1$ //$NON-NLS-2$
+		command.setAttribute("label", "Exit"); //$NON-NLS-1$ //$NON-NLS-2$
+		menu.add(command);
+
+		if (!extension.isInTheModel())
+			plugin.add(extension);
+	}
+
 	private void createProductExtension() throws CoreException {
 		IPluginBase plugin = model.getPluginBase();
 		IPluginExtension extension = createExtension("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/propertyPages/java/$className$.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/propertyPages/java/$className$.java
index 14c2b18..1b3dc1b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/propertyPages/java/$className$.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/propertyPages/java/$className$.java
@@ -106,6 +106,7 @@ public class $className$ extends PropertyPage {
 	}
 
 	protected void performDefaults() {
+		super.performDefaults();
 		// Populate the owner text field with the default value
 		ownerText.setText(DEFAULT_OWNER);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/$applicationClass$.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/$applicationClass$.java
index dff7b9a..a62f4b6 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/$applicationClass$.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/$applicationClass$.java
@@ -32,9 +32,9 @@ public class $applicationClass$ implements IApplication {
 	 * @see org.eclipse.equinox.app.IApplication#stop()
 	 */
 	public void stop() {
-		final IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench == null)
+		if (!PlatformUI.isWorkbenchRunning())
 			return;
+		final IWorkbench workbench = PlatformUI.getWorkbench();
 		final Display display = workbench.getDisplay();
 		display.syncExec(new Runnable() {
 			public void run() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchAdvisor.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchAdvisor.java
index d257049..a9b323d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchAdvisor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchAdvisor.java
@@ -6,7 +6,7 @@ import org.eclipse.ui.application.WorkbenchWindowAdvisor;
 
 public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 
-	private static final String PERSPECTIVE_ID = "$pluginId$.perspective";
+	private static final String PERSPECTIVE_ID = "$pluginId$.perspective"; //$$NON-NLS-1$$
 
     public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
         return new ApplicationWorkbenchWindowAdvisor(configurer);
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchWindowAdvisor.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchWindowAdvisor.java
index 744b0cb..90d33ad 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchWindowAdvisor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/helloRCP/java/ApplicationWorkbenchWindowAdvisor.java
@@ -22,7 +22,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
         configurer.setShowCoolBar(false);
         configurer.setShowStatusLine(false);
 %if productBranding == false
-        configurer.setTitle("$windowTitle$");
+        configurer.setTitle("$windowTitle$"); //$$NON-NLS-1$$
 %endif
     }
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/intro/java/Application.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/intro/java/Application.java
index 2405172..7c295fc 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/intro/java/Application.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/intro/java/Application.java
@@ -31,9 +31,9 @@ public class Application implements IApplication {
 	 * @see org.eclipse.equinox.app.IApplication#stop()
 	 */
 	public void stop() {
-		final IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench == null)
+		if (!PlatformUI.isWorkbenchRunning())
 			return;
+		final IWorkbench workbench = PlatformUI.getWorkbench();
 		final Display display = workbench.getDisplay();
 		display.syncExec(new Runnable() {
 			public void run() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/mail/java/$applicationClass$.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/mail/java/$applicationClass$.java
index fcf3519..d5cc36c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/mail/java/$applicationClass$.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/mail/java/$applicationClass$.java
@@ -31,9 +31,9 @@ public class $applicationClass$ implements IApplication {
 	 * @see org.eclipse.equinox.app.IApplication#stop()
 	 */
 	public void stop() {
-		final IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench == null)
+		if (!PlatformUI.isWorkbenchRunning())
 			return;
+		final IWorkbench workbench = PlatformUI.getWorkbench();
 		final Display display = workbench.getDisplay();
 		display.syncExec(new Runnable() {
 			public void run() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/$applicationClass$.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/$applicationClass$.java
index fcf3519..d5cc36c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/$applicationClass$.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/$applicationClass$.java
@@ -31,9 +31,9 @@ public class $applicationClass$ implements IApplication {
 	 * @see org.eclipse.equinox.app.IApplication#stop()
 	 */
 	public void stop() {
-		final IWorkbench workbench = PlatformUI.getWorkbench();
-		if (workbench == null)
+		if (!PlatformUI.isWorkbenchRunning())
 			return;
+		final IWorkbench workbench = PlatformUI.getWorkbench();
 		final Display display = workbench.getDisplay();
 		display.syncExec(new Runnable() {
 			public void run() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/ApplicationActionBarAdvisor.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/ApplicationActionBarAdvisor.java
index 623c61b..706da75 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/ApplicationActionBarAdvisor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/ApplicationActionBarAdvisor.java
@@ -1,11 +1,5 @@
 package $packageName$;
 
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.application.ActionBarAdvisor;
 import org.eclipse.ui.application.IActionBarConfigurer;
 
@@ -20,29 +14,9 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
 	// them
 	// in the fill methods. This ensures that the actions aren't recreated
 	// when fillActionBars is called with FILL_PROXY.
-	private IWorkbenchAction exitAction;
 
 	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
 		super(configurer);
 	}
 
-	protected void makeActions(final IWorkbenchWindow window) {
-		// Creates the actions and registers them.
-		// Registering is needed to ensure that key bindings work.
-		// The corresponding commands keybindings are defined in the plugin.xml
-		// file.
-		// Registering also provides automatic disposal of the actions when
-		// the window is closed.
-
-		exitAction = ActionFactory.QUIT.create(window);
-		register(exitAction);
-	}
-
-	protected void fillMenuBar(IMenuManager menuBar) {
-		MenuManager fileMenu = new MenuManager("&File",
-				IWorkbenchActionConstants.M_FILE);
-		menuBar.add(fileMenu);
-		fileMenu.add(exitAction);
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/Perspective.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/Perspective.java
index 4d16ecf..03a4c97 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/Perspective.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/Perspective.java
@@ -6,11 +6,9 @@ import org.eclipse.ui.IPerspectiveFactory;
 public class Perspective implements IPerspectiveFactory {
 
 	public void createInitialLayout(IPageLayout layout) {
-		String editorArea = layout.getEditorArea();
 		layout.setEditorAreaVisible(false);
 		layout.setFixed(true);
 		
-		layout.addStandaloneView(View.ID,  false, IPageLayout.LEFT, 1.0f, editorArea);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/View.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/View.java
index 8a70946..56e68a1 100644
--- a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/View.java
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.3/viewRCP/java/View.java
@@ -32,7 +32,10 @@ public class View extends ViewPart {
 		}
 
 		public Object[] getElements(Object parent) {
-			return new String[] { "One", "Two", "Three" };
+			if (parent instanceof Object[]) {
+				return (Object[]) parent;
+			}
+	        return new Object[0];
 		}
 	}
 
@@ -61,7 +64,8 @@ public class View extends ViewPart {
 				| SWT.V_SCROLL);
 		viewer.setContentProvider(new ViewContentProvider());
 		viewer.setLabelProvider(new ViewLabelProvider());
-		viewer.setInput(getViewSite());
+		// Provide the input to the ContentProvider
+		viewer.setInput(new String[] {"One", "Two", "Three"});
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/OSGI-INF/component.xml b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/OSGI-INF/component.xml
new file mode 100644
index 0000000..d5c3768
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/OSGI-INF/component.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="$packageName$">
+   <implementation class="$packageName$.ServiceComponent"/>
+   <service>
+      <provide interface="org.osgi.service.event.EventHandler"/>
+   </service>
+   <property name="event.topics" type="String" value="$eventTopic$"/>
+</scr:component>
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/helloOSGiServiceComponent/build.properties b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/build.properties
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.0/helloOSGiServiceComponent/build.properties
copy to eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/build.properties
diff --git a/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/java/ServiceComponent.java b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/java/ServiceComponent.java
new file mode 100644
index 0000000..e70beed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui.templates/templates_3.5/OSGiEventAdmin/java/ServiceComponent.java
@@ -0,0 +1,14 @@
+package $packageName$;
+
+import org.osgi.service.event.Event;
+import org.osgi.service.event.EventHandler;
+
+// referenced in component.xml
+public class ServiceComponent implements EventHandler {
+
+	public void handleEvent(Event event) {
+		// TODO handle event - $eventTopic$
+		System.out.println(event.getTopic());
+	}
+	
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/.settings/.api_filters b/eclipse/plugins/org.eclipse.pde.ui/.settings/.api_filters
deleted file mode 100644
index 8aa4654..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/.settings/.api_filters
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.pde.ui" version="2">
-    <resource path="src/org/eclipse/pde/ui/launcher/OSGiLauncherTabGroup.java" type="org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IPluginFieldData.java" type="org.eclipse.pde.ui.IPluginFieldData">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IPluginFieldData"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IPluginContentWizard.java" type="org.eclipse.pde.ui.IPluginContentWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IPluginContentWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IExtensionEditorWizard.java" type="org.eclipse.pde.ui.IExtensionEditorWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IExtensionEditorWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IProvisionerWizard.java" type="org.eclipse.pde.ui.IProvisionerWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IProvisionerWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IBasePluginWizard.java" type="org.eclipse.pde.ui.IBasePluginWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IBasePluginWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/templates/IVariableProvider.java" type="org.eclipse.pde.ui.templates.IVariableProvider">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.templates.IVariableProvider"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/templates/ITemplateSection.java" type="org.eclipse.pde.ui.templates.ITemplateSection">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.templates.ITemplateSection"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IExtensionWizard.java" type="org.eclipse.pde.ui.IExtensionWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IExtensionWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IBundleContentWizard.java" type="org.eclipse.pde.ui.IBundleContentWizard">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IBundleContentWizard"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IFieldData.java" type="org.eclipse.pde.ui.IFieldData">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IFieldData"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/pde/ui/IFragmentFieldData.java" type="org.eclipse.pde.ui.IFragmentFieldData">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.pde.ui.IFragmentFieldData"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.pde.prefs
index 3a83987..12abc8e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.pde.ui/.settings/org.eclipse.pde.prefs
@@ -1,13 +1,27 @@
-#Wed Mar 29 03:57:21 EST 2006
+#Mon Dec 14 12:08:57 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=1
 compilers.p.unknown-class=1
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.pde.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde.ui/META-INF/MANIFEST.MF
index ebd4a4f..851fab4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.pde.ui; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: org.eclipse.pde.internal.ui.PDEPlugin
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
@@ -42,6 +42,7 @@ Export-Package:
  org.eclipse.pde.internal.ui.search;x-internal:=true,
  org.eclipse.pde.internal.ui.search.dependencies;x-internal:=true,
  org.eclipse.pde.internal.ui.search.dialogs;x-internal:=true,
+ org.eclipse.pde.internal.ui.shared;x-internal:=true,
  org.eclipse.pde.internal.ui.shared.target;x-internal:=true,
  org.eclipse.pde.internal.ui.util;x-internal:=true,
  org.eclipse.pde.internal.ui.views.dependencies;x-internal:=true,
@@ -63,7 +64,7 @@ Export-Package:
  org.eclipse.pde.ui.launcher,
  org.eclipse.pde.ui.templates
 Require-Bundle: 
- org.eclipse.pde.core;bundle-version="[3.2.0,4.0.0)";visibility:=reexport,
+ org.eclipse.pde.core;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
  org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)",
@@ -79,7 +80,6 @@ Require-Bundle:
  org.eclipse.search;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.team.core;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.update.core;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ant.ui;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.jdt.junit;bundle-version="[3.2.0,4.0.0)",
@@ -94,16 +94,20 @@ Require-Bundle:
  org.eclipse.ltk.ui.refactoring;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.navigator.resources;bundle-version="[3.3.100,4.0.0)",
- org.eclipse.equinox.p2.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.p2.engine;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.p2.director;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.p2.ui;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.director;bundle-version="[2.0.0,3.0.0)",
  org.eclipse.equinox.p2.artifact.repository;bundle-version="[1.0.100,2.0.0)",
  org.eclipse.equinox.p2.metadata.repository;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.frameworkadmin;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.frameworkadmin;bundle-version="[2.0.0,3.0.0)",
  org.eclipse.equinox.frameworkadmin.equinox;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.repository;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.pde.launching;bundle-version="[3.6.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ui.console;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.equinox.simpleconfigurator;bundle-version="[1.0.200,2.0.0)"
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text,
  org.eclipse.jdt.debug.core
diff --git a/eclipse/plugins/org.eclipse.pde.ui/icons/etool16/export_target.gif b/eclipse/plugins/org.eclipse.pde.ui/icons/etool16/export_target.gif
new file mode 100644
index 0000000..b45bf34
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.ui/icons/etool16/export_target.gif differ
diff --git a/eclipse/plugins/org.eclipse.pde.ui/icons/eview16/osgiconsole.gif b/eclipse/plugins/org.eclipse.pde.ui/icons/eview16/osgiconsole.gif
new file mode 100644
index 0000000..5e22d37
Binary files /dev/null and b/eclipse/plugins/org.eclipse.pde.ui/icons/eview16/osgiconsole.gif differ
diff --git a/eclipse/plugins/org.eclipse.pde.ui/plugin.properties b/eclipse/plugins/org.eclipse.pde.ui/plugin.properties
index 2fa35d0..de1f4cc 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,13 +19,7 @@ expoint.newExtension.name=Extension wizards
 expoint.templates.name = Extension Templates
 expoint.samples.name = Code Samples
 expoint.osgiLauncher.name = OSGi Launcher
-
-PDELaunchDelegate.name=Eclipse Application Launcher
-PDELaunchDelegate.description=The Eclipse Application launcher is used to run or debug a separate instance of an Eclipse application
-OSGiLaunchDelegate.name=OSGi Framework Launcher
-OSGiLaunchDelegate.description=The OSGi Framework launcher is used to launch an OSGi framework and run or debug OSGi bundles
-JUnitPluginLaunchDelegate.name= JUnit Plugin Test Launcher
-JUnitPluginLaunchDelegate.description=The JUnit Plugin Test launcher is used to run and debug test suites for plug-in projects
+expoint.bundleImportPages.name = Bundle Import Pages
 
 RunPDELaunchShortcut.description=Runs a separate Eclipse application
 DebugPDELaunchShortcut.description=Debugs a separate Eclipse application
@@ -43,8 +37,8 @@ preferences.compilers.name = Compilers
 preferences.editor.name = Editors
 
 preferenceKeywords.PDE=Plug-in plugin Development PDE
-preferenceKeywords.MainPreferencePage=ID Label
-preferenceKeywords.TargetPlatformPreferencePage=external target plug-in fragment
+preferenceKeywords.MainPreferencePage=java search target source dependencies
+preferenceKeywords.TargetPlatformPreferencePage=external target definition plug-in fragment
 preferenceKeywords.EditorPreferencePage=editor colors source page folding
 preferenceKeywords.CompilersPreferencePage=error warning ignore marker schema
 
@@ -83,6 +77,8 @@ FeatureImportWizard.description=Create projects from features in the file system
 
 PluginSearchPage.label = Plug-in Search
 
+target.export.wizard.name=Target definition
+target.export.wizard.desc=Export the currently active target definition
 PluginExportWizard.label=Deployable plug-ins and fragments
 PluginExportWizard.description=Export the selected plug-ins and/or fragments \
 in a form suitable for deploying in an Eclipse product.
@@ -132,16 +128,12 @@ OpenDependenciesAction.label= Ope&n Dependencies
 launcher.shortcut.label= Eclipse Application
 EclipseApplicationShortcut.description.debug = Debug Eclipse Application
 EclipseApplicationShortcut.description.run = Run Eclipse Application
-Equinox.shortcut.label = Equinox
 OSGiShortcut.description.debug = Debug OSGi Framework
 OSGiShortcut.description.run = Run OSGi Framework
 launcher.junit.name = JUnit Plug-in Test
 JUnitApplicationShortcut.description.debug = Debug JUnit Plug-in Test
 JUnitApplicationShortcut.description.run = Run JUnit Plug-in Test
 
-launchConfigurationType.name = Eclipse Application
-launcher.framework.name = OSGi Framework
-
 osgiLauncherTabGroup.description.debug=Create a configuration to launch the OSGi framework in debug mode.
 osgiLauncherTabGroup.description.run=Create a configuration to launch the OSGi framework.
 workbenchLauncherTabGroup.description.debug=Create a configuration to launch an Eclipse application in debug mode.
@@ -182,7 +174,6 @@ editor.profile.name = Target Editor (old)
 editor.target.name = Target Editor
 fontDefinition.label.0 = Manifest compare text font
 fontDefinition.description.0 = The MANIFEST.MF compare text font is used by Bundle manifest compare/merge tools.
-pde.sourcelocator = PDE Source Lookup Director
 
 category.source.name = Manifest Editor Source
 category.source.description = PDE Source Page actions
@@ -257,6 +248,9 @@ pluginsearch.action.desc = Open a plug-in artifact in the manifest editor
 addpluginstojavasearch.action.name = Add All Plug-ins to Java Search
 addpluginstojavasearch.action.desc = Adds all plug-ins in the target platform to java search
 
+target.reposearch.name = Add Artifact to Target Platform
+target.reposearch.description = Add an artifact to your target platform
+
 Internationalize.label = Internationalize...
 markerGroupingEntry.label = Plug-in Development
 showErrorInStackTraceConsoleAction.label = Show Stack Trace in Console View
@@ -264,4 +258,6 @@ showErrorInStackTraceConsoleAction.label = Show Stack Trace in Console View
 contentMergeViewers.manifest.label=Manifest Source Compare
 contentMergeViewers.plugin.label=Plug-in Source Compare
 structureMergeViewers.manifest.label=Manifest Structure Compare
-structureMergeViewers.plugin.label=Plug-in Structure Compare
\ No newline at end of file
+structureMergeViewers.plugin.label=Plug-in Structure Compare
+commandParameter.name = The initial search pattern for the artifact search dialog
+consoleFactory.label = Host OSGi Console
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/plugin.xml b/eclipse/plugins/org.eclipse.pde.ui/plugin.xml
index 3757b9f..c19e698 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde.ui/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?><!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -18,9 +18,9 @@
    <extension-point id="newExtension" name="%expoint.newExtension.name" schema="schema/newExtension.exsd"/>
    <extension-point id="templates" name="%expoint.templates.name" schema="schema/templates.exsd"/>
    <extension-point id="samples" name="%expoint.samples.name" schema="schema/samples.exsd"/>
-   <extension-point id="osgiFrameworks" name="%expoint.osgiLauncher.name" schema="schema/osgiFrameworks.exsd"/>
    <extension-point id="targetProvisioners" name="%extension-point.name.0" schema="schema/targetProvisioners.exsd"/>
    <extension-point id="launchShortcuts" name="%extension-point.name.1" schema="schema/launchShortcuts.exsd"/>
+   <extension-point id="bundleImportPages" name="%expoint.bundleImportPages.name" schema="schema/bundleImportPages.exsd"/>
 
 <!-- Extensions -->
    <extension
@@ -115,6 +115,9 @@
          <description>
             %new.pluginProject.description
          </description>
+         <keywordReference
+               id="org.eclipse.pde.ui.pde">
+         </keywordReference>
       </wizard>
       <wizard
             category="org.eclipse.pde.PDE"
@@ -127,6 +130,9 @@
          <description>
             %new.pluginWithJarsProject.description
          </description>
+         <keywordReference
+               id="org.eclipse.pde.ui.pde">
+         </keywordReference>
       </wizard>
       <wizard
             name="%new.fragmentProject.name"
@@ -228,6 +234,9 @@
          <description>
             %PluginImportWizard.description
          </description>
+         <keywordReference
+               id="org.eclipse.pde.ui.pde">
+         </keywordReference>
       </wizard>
       <wizard
             category="org.eclipse.pde.ui.PluginDevelopment"
@@ -265,6 +274,9 @@
          <selection
                class="org.eclipse.core.resources.IProject">
          </selection>
+         <keywordReference
+               id="org.eclipse.pde.ui.pde">
+         </keywordReference>
       </wizard>
       <wizard
             category="org.eclipse.pde.ui.PluginDevelopment"
@@ -300,6 +312,16 @@
                class="org.eclipse.core.resources.IContainer">
          </selection>
       </wizard>
+      <wizard
+            category="org.eclipse.pde.ui.PluginDevelopment"
+            class="org.eclipse.pde.internal.ui.wizards.exports.TargetDefinitionExportWizard"
+            icon="icons/etool16/export_target.gif"
+            id="org.eclipse.pde.target.wizard"
+            name="%target.export.wizard.name">
+         <description>
+            %target.export.wizard.desc
+         </description>
+      </wizard>
       <category
             id="org.eclipse.pde.ui.PluginDevelopment"
             name="%PluginImportExport.category"/>
@@ -538,7 +560,17 @@
             description="%addpluginstojavasearch.action.desc"
             id="org.eclipse.pde.ui.addAllPluginsToJavaSearch"
             name="%addpluginstojavasearch.action.name">
-      </command>   
+      </command>
+      <command
+            description="%target.reposearch.description"
+            id="org.eclipse.pde.ui.searchTargetRepositories"
+            name="%target.reposearch.name">
+         <commandParameter
+               id="org.eclipse.pde.ui.searchTargetRepositories.term"
+               name="%commandParameter.name"
+               optional="true">
+         </commandParameter>
+      </command>
    </extension>
    <extension
          point="org.eclipse.ui.popupMenus">
@@ -895,42 +927,6 @@
       </objectContribution>
    </extension>
    <extension
-         point="org.eclipse.debug.core.launchConfigurationTypes">
-      <launchConfigurationType
-            delegate="org.eclipse.pde.ui.launcher.EclipseApplicationLaunchConfiguration"
-            delegateDescription="%PDELaunchDelegate.description"
-            delegateName="%PDELaunchDelegate.name"
-            id="org.eclipse.pde.ui.RuntimeWorkbench"
-            migrationDelegate="org.eclipse.pde.internal.ui.launcher.PDEMigrationDelegate"
-            modes="run, debug"
-            name="%launchConfigurationType.name"
-            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
-      </launchConfigurationType>
-      <launchConfigurationType
-            delegate="org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate"
-            delegateDescription="%JUnitPluginLaunchDelegate.description"
-            delegateName="%JUnitPluginLaunchDelegate.name"
-            id="org.eclipse.pde.ui.JunitLaunchConfig"
-            migrationDelegate="org.eclipse.pde.internal.ui.launcher.PDEMigrationDelegate"
-            modes="run, debug"
-            name="%launcher.junit.name"
-            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
-      </launchConfigurationType>
-      <launchConfigurationType
-            delegate="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationDelegate"
-            delegateDescription="%OSGiLaunchDelegate.description"
-            delegateName="%OSGiLaunchDelegate.name"
-            id="org.eclipse.pde.ui.EquinoxLauncher"
-            migrationDelegate="org.eclipse.pde.internal.ui.launcher.OSGiMigrationDelegate"
-            modes="run, debug"
-            name="%launcher.framework.name"
-            public="true"
-            sourceLocatorId="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
-            sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"/>
-   </extension>
-   <extension
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
       <launchConfigurationTypeImage
             icon="$nl$/icons/etool16/eclipse_launcher.gif"
@@ -994,12 +990,6 @@
       </launchConfigurationTabGroup>
    </extension>
    <extension
-         point="org.eclipse.jdt.junit.junitLaunchConfigs">
-      <launchConfigType
-            configTypeID="org.eclipse.pde.ui.JunitLaunchConfig">
-      </launchConfigType>
-   </extension>
-   <extension
          point="org.eclipse.debug.ui.launchShortcuts">
       <shortcut
             class="org.eclipse.pde.ui.launcher.JUnitWorkbenchLaunchShortcut"
@@ -1221,13 +1211,6 @@
             id="org.eclipse.pde.ui.dependencyExtentResultPage"/>
    </extension>
    <extension
-         point="org.eclipse.jdt.launching.classpathProviders">
-      <classpathProvider
-            class="org.eclipse.pde.ui.launcher.PDESourcePathProvider"
-            id="org.eclipse.pde.ui.workbenchClasspathProvider">
-      </classpathProvider>
-   </extension>
-   <extension
          point="org.eclipse.ui.intro.configExtension">
       <standbyContentPart
             pluginId="org.eclipse.pde.ui"
@@ -1419,6 +1402,12 @@
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M1+M2+A">
       </key>
+      <key
+            commandId="org.eclipse.pde.ui.searchTargetRepositories"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M2+M3+A">
+      </key>
    </extension>
    <extension
          point="org.eclipse.ltk.core.refactoring.renameParticipants">
@@ -1637,13 +1626,6 @@
          </description>
        </fontDefinition>
     </extension>
-    <extension point="org.eclipse.debug.core.sourceLocators">
-   		<sourceLocator
-   			id="org.eclipse.pde.ui.launcher.PDESourceLookupDirector"
-   			class="org.eclipse.pde.internal.ui.launcher.PDESourceLookupDirector"
-   			name="%pde.sourcelocator">
-   		</sourceLocator>
-   </extension>
    <extension
           point="org.eclipse.ui.perspectiveExtensions">
        <perspectiveExtension
@@ -1666,6 +1648,9 @@
          <showInPart
                id="org.eclipse.team.ui.GenericHistoryView">
          </showInPart>
+          <showInPart
+                id="org.eclipse.ui.navigator.ProjectExplorer">
+          </showInPart>
          <perspectiveShortcut
                id="org.eclipse.ui.resourcePerspective">
          </perspectiveShortcut>
@@ -1720,14 +1705,6 @@
       </perspectiveExtension>
     </extension>
     <extension
-         point="org.eclipse.pde.ui.osgiFrameworks">
-      <framework
-            launcherDelegate="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration"
-            id="org.eclipse.pde.ui.EquinoxFramework"
-            name="%Equinox.shortcut.label" 
-            initializer="org.eclipse.pde.internal.ui.launcher.EquinoxInitializer"/>
-    </extension>
-    <extension
           point="org.eclipse.ui.ide.markerSupport">
        <markerTypeCategory
              name="%marker.category">
@@ -1921,6 +1898,10 @@
        <extension
              point="org.eclipse.ui.handlers">
           <handler
+                class="org.eclipse.pde.internal.ui.search.dialogs.TargetRepositorySearchHandler"
+                commandId="org.eclipse.pde.ui.searchTargetRepositories">
+          </handler>
+          <handler
                 class="org.eclipse.pde.internal.ui.search.dialogs.PluginArtifactSearchHandler"
                 commandId="org.eclipse.pde.ui.openPluginArtifact">
           </handler>
@@ -2026,5 +2007,94 @@
                    tooltip="%showErrorInStackTraceConsoleAction.label">
              </action>
           </viewContribution>
-	</extension>>
+	</extension>
+	<extension
+         point="org.eclipse.debug.core.statusHandlers">
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LaunchTerminationStatusHandler"
+            code="13"
+            id="org.eclipse.pde.launching.ERR13"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LaunchTerminationStatusHandler"
+            code="15"
+            id="org.eclipse.pde.launching.ERR15"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.GenericExceptionStatusHandler"
+            code="42"
+            id="org.eclipse.pde.launching.GENERIC_EXCEPTION"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.PluginValidationStatusHandler"
+            code="1000"
+            id="org.eclipse.pde.launching.CREATE_EXTENSION_ERROR"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.PluginValidationStatusHandler"
+            code="1001"
+            id="org.eclipse.pde.launching.DISPLAY_VALIDATION_ERROR"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LauncherUtilsStatusHandler"
+            code="2000"
+            id="org.eclipse.pde.launching.WORKSPACE_LOCKED"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LauncherUtilsStatusHandler"
+            code="2001"
+            id="org.eclipse.pde.launching.CLEAR_LOG"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LauncherUtilsStatusHandler"
+            code="2002"
+            id="org.eclipse.pde.launching.DELETE_WORKSPACE"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LauncherUtilsStatusHandler"
+            code="2003"
+            id="org.eclipse.pde.launching.CREATE_CONFIG_INI"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+      <statusHandler
+            class="org.eclipse.pde.internal.ui.launcher.LauncherUtilsStatusHandler"
+            code="2004"
+            id="org.eclipse.pde.launching.ORGANIZE_MANIFESTS"
+            plugin="org.eclipse.pde.launching">
+      </statusHandler>
+   </extension>
+ <extension
+       point="org.eclipse.pde.ui.bundleImportPages">
+    <page
+          bundleImporter="org.eclipse.pde.core.cvs.importer"
+          class="org.eclipse.pde.internal.ui.wizards.imports.CVSBundleImportPage"
+          id="org.eclipse.pde.ui.cvs.import.page">
+    </page>
+ </extension>
+ <extension
+         point="org.eclipse.ui.console.consoleFactories">
+      <consoleFactory
+            class="org.eclipse.pde.internal.ui.util.OSGiConsoleFactory"
+            icon="$nl$/icons/eview16/osgiconsole.gif"
+            label="%consoleFactory.label">
+      </consoleFactory>
+   </extension>
+   <extension
+         point="org.eclipse.ui.console.consolePageParticipants">
+      <consolePageParticipant
+            class="org.eclipse.pde.internal.ui.util.OSGiConsolePageParticipant"
+            id="org.eclipse.pde.ui.OSGiConsoleParticipant">
+         <enablement>
+            <test property="org.eclipse.ui.console.consoleTypeTest" value="osgiConsole"/>
+         </enablement>
+      </consolePageParticipant>
+   </extension>
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.pde.ui/schema/bundleImportPages.exsd b/eclipse/plugins/org.eclipse.pde.ui/schema/bundleImportPages.exsd
new file mode 100644
index 0000000..574dc4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/schema/bundleImportPages.exsd
@@ -0,0 +1,147 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.pde.ui" id="bundleImportPages" name="Bundle Import Pages"/>
+      </appInfo>
+      <documentation>
+         <strong>EXPERIMENTAL</strong>. This extension point has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same in future releases. Please do not use this API without consulting with the PDE team.
+<p>
+A bundle import page provides an optional wizard page used to configure settings for bundles to be imported by a <code>org.eclipse.pde.core.bundleImporters</code> extension.
+</p>
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element internal="true" />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="page" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="page">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  unique identifier for this bundle import page
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Fully qualified name of a Java class providing an implementation of <code>org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage</code>.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn=":org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+         <attribute name="bundleImporter" type="string" use="required">
+            <annotation>
+               <documentation>
+                  Identifier of the <code>org.eclipse.pde.core.bundleImporters</code> extension that this page provides a user interface for.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.pde.core.bundleImporters/importer/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.6
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following is an example of a bundle import wizard page extension.
+
+<p>
+<pre>
+ <extension point="org.eclipse.pde.core.bundleImporters">
+  <importer
+   id="com.example.ExampleIdentifier"
+   class="com.example.ExampleBundleImportWizardpage"
+   bundleImporter="com.example.bundleImporter">
+  </importer>
+ </extension>
+</pre>
+</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         Value of a page's <b>class</b> attribute must be a fully qualified name of a Java class that implements the interface <b>org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage</b>.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         PDE provides a wizard page for editing properties of bundles that can be imported by the CVS bundle importer. The page allows users to import specific bundle versions or from HEAD.
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2010 IBM Corporation and others.
+<br>
+All rights reserved. This program and the accompanying materials are made 
+available under the terms of the Eclipse Public License v1.0 which 
+accompanies this distribution, and is available at 
+<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.pde.ui/schema/launchShortcuts.exsd b/eclipse/plugins/org.eclipse.pde.ui/schema/launchShortcuts.exsd
index 07b073e..c41a468 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/schema/launchShortcuts.exsd
+++ b/eclipse/plugins/org.eclipse.pde.ui/schema/launchShortcuts.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.pde.ui">
+<schema targetNamespace="org.eclipse.pde.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.pde.ui" id="launchShortcuts" name="Launch Shortcuts"/>
@@ -13,6 +13,11 @@ This extension point is used to register a launching shortcut in a PDE editor. L
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="shortcut" minOccurs="1" maxOccurs="unbounded"/>
@@ -87,6 +92,13 @@ This extension point is used to register a launching shortcut in a PDE editor. L
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="projectSpecific" type="boolean">
+            <annotation>
+               <documentation>
+                  When <code>true</code>, this launch shortcut is only displayed in projects it has been associated with via <code>IBundleProjectDescription</code>. When unspecified, this value is assumed to be <code>false</code>. This attribute was added in the 3.6 release to support custom launch shortcuts in Manifest editors.
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/schema/osgiFrameworks.exsd b/eclipse/plugins/org.eclipse.pde.ui/schema/osgiFrameworks.exsd
deleted file mode 100644
index b79b3dc..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/schema/osgiFrameworks.exsd
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.pde.ui">
-<annotation>
-      <appInfo>
-         <meta.schema plugin="org.eclipse.pde.ui" id="osgiFrameworks" name="OSGi Frameworks"/>
-      </appInfo>
-      <documentation>
-         <p>
-This extension point is used to register new OSGi frameworks. Each framework is associated with a launcher delegate that is called when the OSGi framework is selected in the <b>OSGi Framework</b> launch configuration.
-</p>
-<p>Registered OSGi frameworks appear on the <b>Plug-in Development > OSGi frameworks</b> preference page, where a default framework can be set.
-</p>
-      </documentation>
-   </annotation>
-
-   <element name="extension">
-      <complexType>
-         <sequence>
-            <element ref="framework" minOccurs="1" maxOccurs="unbounded"/>
-         </sequence>
-         <attribute name="point" type="string" use="required">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="id" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string">
-            <annotation>
-               <documentation>
-                  
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <element name="framework">
-      <complexType>
-         <attribute name="id" type="string" use="required">
-            <annotation>
-               <documentation>
-                  a unique identifier of the framework
-               </documentation>
-            </annotation>
-         </attribute>
-         <attribute name="name" type="string" use="required">
-            <annotation>
-               <documentation>
-                  human-readable name of the OSGi framework
-               </documentation>
-               <appInfo>
-                  <meta.attribute translatable="true"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-         <attribute name="launcherDelegate" type="string" use="required">
-            <annotation>
-               <documentation>
-                  a launch configuration delegate to launch the OSGi framework. The value of this attribute is the fully qualified name of the Java class that extends <code>org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration</code>.
-               </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-         <attribute name="initializer" type="string">
-            <annotation>
-               <documentation>
-                  initializes new OSGi Framework launch configurations with suitable defaults.  The value of this attribute must be a fully-qualified name of a Java class that extends the default implementation <code>org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer</code>.  If not specified, the default initializer <code>org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer</code> is instantiated.
-               </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer"/>
-               </appInfo>
-            </annotation>
-         </attribute>
-      </complexType>
-   </element>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="since"/>
-      </appInfo>
-      <documentation>
-         3.3
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="examples"/>
-      </appInfo>
-      <documentation>
-         <p>
-The following is an example of the extension point:
-<pre>
-   <extension
-         point="org.eclipse.pde.ui.osgiFrameworks">
-      <framework
-            launcherDelegate="org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration"
-            id="org.eclipse.pde.ui.EquinoxFramework"
-            name="%Equinox.shortcut.label" 
-            initializer="org.eclipse.pde.internal.ui.launcher.EquinoxInitializer"/>
-   </extension>
-</pre>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         <p>
-The value of the attribute <code>launcherDelegate</code> must be a fully qualified name of a Java class that extends <code>org.eclipse.pde.ui.launcher.AbstractPDELaunchConfiguration</code>.  If the launcher is to provide its own source lookup order, then the method <code>setDefaultSourceLocator</code> should be overridden.
-</p>
-<p>
-The value of the attribute <code>initializer</code> must be a fully qualified name of a Java class that extends <code>org.eclipse.ui.launcher.OSGiLaunchConfigurationInitializer</code>.
-</p>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         <p>
-PDE supplies the Equinox OSGi Framework extension to launch Equinox frameworks.
-</p>
-      </documentation>
-   </annotation>
-
-   <annotation>
-      <appInfo>
-         <meta.section type="copyright"/>
-      </appInfo>
-      <documentation>
-         Copyright (c) 2006 IBM Corporation and others.
-<br>
-All rights reserved. This program and the accompanying materials are made 
-available under the terms of the Eclipse Public License v1.0 which 
-accompanies this distribution, and is available at 
-<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-      </documentation>
-   </annotation>
-
-</schema>
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IHelpContextIds.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IHelpContextIds.java
index c9b6bf6..525a91e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IHelpContextIds.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IHelpContextIds.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ public interface IHelpContextIds {
 	public static final String TARGET_PLATFORM_PREFERENCE_PAGE = PREFIX + "target_platform_preference_page"; //$NON-NLS-1$
 
 	// Property Pages
+	public static final String PLUGIN_DEVELOPMENT_PROPERTY_PAGE = PREFIX + "plugin_development_property_page"; //$NON-NLS-1$
 	public static final String SELFHOSTING_PROPERTY_PAGE = PREFIX + "selfhosting_property_page"; //$NON-NLS-1$
 	public static final String COMPILERS_PROPERTY_PAGE = PREFIX + "compilers_property_page"; //$NON-NLS-1$
 
@@ -75,6 +76,8 @@ public interface IHelpContextIds {
 	public static final String PLUGIN_IMPORT_FIRST_PAGE = PREFIX + "plugin_import_first_page"; //$NON-NLS-1$
 	public static final String PLUGIN_IMPORT_SECOND_PAGE = PREFIX + "plugin_import_second_page"; //$NON-NLS-1$
 	public static final String PLUGIN_IMPORT_EXPRESS_PAGE = PREFIX + "plugin_import_express_page"; //$NON-NLS-1$
+	public static final String PLUGIN_IMPORT_OVERWRITE_DIALOG = PREFIX + "plugin_import_overwrite_dialog"; //$NON-NLS-1$
+	public static final String PLUGIN_IMPORT_CVS_PAGE = PREFIX + "plugin_import_cvs_page"; //$NON-NLS-1$
 
 	public static final String FEATURE_IMPORT_FIRST_PAGE = PREFIX + "feature_import_first_page"; //$NON-NLS-1$
 	public static final String FEATURE_IMPORT_SECOND_PAGE = PREFIX + "feature_import_second_page"; //$NON-NLS-1$
@@ -82,6 +85,7 @@ public interface IHelpContextIds {
 	public static final String PLUGIN_EXPORT_WIZARD = PREFIX + "plugin_export_wizard"; //$NON-NLS-1$
 	public static final String FEATURE_EXPORT_WIZARD = PREFIX + "feature_export_wizard"; //$NON-NLS-1$
 	public static final String PRODUCT_EXPORT_WIZARD = PREFIX + "product_export_wizard"; //$NON-NLS-1$
+	public static final String TARGET_EXPORT_WIZARD = PREFIX + "target_export_wizard"; //$NON-NLS-1$
 
 	public static final String TEMPLATE_SELECTION = PREFIX + "template_selection"; //$NON-NLS-1$
 	public static final String TEMPLATE_EDITOR = PREFIX + "template_editor"; //$NON-NLS-1$
@@ -175,9 +179,6 @@ public interface IHelpContextIds {
 
 	public static final String NEW_CS_CATEGORY_NAME_DIALOG = PREFIX + "new_cs_category_name_dialog"; //$NON-NLS-1$
 
-	public static final String TARGET_ERROR_DIALOG = PREFIX + "target_error_dialog"; //$NON-NLS-1$
-	public static final String TARGET_LOCATION_DIALOG = PREFIX + "target_location_dialog"; //$NON-NLS-1$
-
 	public static final String PLUGIN_IMPORT_FINISH_DIALOG = PREFIX + "plugin_import_finish_dialog"; //$NON-NLS-1$
 
 	public static final String FILTERED_PLUGIN_ARTIFACTS_DIALOG = PREFIX + "filtered_plugin_artifacts_dialog"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPDEUIConstants.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPDEUIConstants.java
index 7063c38..d4fbf95 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPDEUIConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPDEUIConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,9 @@
 package org.eclipse.pde.internal.ui;
 
 import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.pde.internal.launching.IPDEConstants;
 
-public interface IPDEUIConstants {
+public interface IPDEUIConstants extends IPDEConstants {
 	String PLUGIN_ID = "org.eclipse.pde.ui"; //$NON-NLS-1$
 
 	String MANIFEST_EDITOR_ID = PLUGIN_ID + ".manifestEditor"; //$NON-NLS-1$
@@ -40,19 +41,6 @@ public interface IPDEUIConstants {
 
 	String PLUGIN_DOC_ROOT = "/org.eclipse.pde.doc.user/"; //$NON-NLS-1$
 
-	// JUnit application identifiers
-	String LEGACY_UI_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.legacytestapplication"; //$NON-NLS-1$
-	String NON_UI_THREAD_APPLICATION = "org.eclipse.pde.junit.runtime.nonuithreadtestapplication"; //$NON-NLS-1$
-	String UI_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.uitestapplication"; //$NON-NLS-1$
-	String CORE_TEST_APPLICATION = "org.eclipse.pde.junit.runtime.coretestapplication"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is a boolean specifies
-	 * whether the launch configuration is being restarted.  This does not need to 
-	 * be promoted to IPDELauncherConstants since clients should not need to know 
-	 * about restarts.  
-	 */
-	String RESTART = "restart"; //$NON-NLS-1$
 	/**
 	 * Launch configuration attribute key. The value is a boolean specifying
 	 * whether the workspace log for an Eclipse application should be cleared
@@ -60,9 +48,11 @@ public interface IPDEUIConstants {
 	 * 
 	 * TODO, move to IPDELauncherConstants in 3.4
 	 */
-	String DOCLEARLOG = "clearwslog"; //$NON-NLS-1$
-	String LAUNCHER_PDE_VERSION = "pde.version"; //$NON-NLS-1$
-	String APPEND_ARGS_EXPLICITLY = "append.args"; //$NON-NLS-1$
 	String GENERATED_CONFIG = "pde.generated.config"; //$NON-NLS-1$
 
+	/**
+	 * Extension point identifier for <code>org.eclipse.pde.ui.bundleImportPages</code>.
+	 */
+	public static final String EXTENSION_POINT_BUNDLE_IMPORT_PAGES = PLUGIN_ID + ".bundleImportPages"; //$NON-NLS-1$
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPreferenceConstants.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPreferenceConstants.java
index 1ffdfcb..f1eb63d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPreferenceConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/IPreferenceConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,21 +11,23 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui;
 
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
+
 /**
  * Listing of constants used in PDE preferences
  * 
  * @noimplement This interface is not intended to be implemented by clients.
  */
-public interface IPreferenceConstants {
+public interface IPreferenceConstants extends ILaunchingPreferenceConstants {
 
 	// Main preference page	
 	public static final String PROP_SHOW_OBJECTS = "Preferences.MainPage.showObjects"; //$NON-NLS-1$
 	public static final String VALUE_USE_IDS = "useIds"; //$NON-NLS-1$
 	public static final String VALUE_USE_NAMES = "useNames"; //$NON-NLS-1$
-	public static final String PROP_AUTO_MANAGE = "Preferences.MainPage.automanageDependencies"; //$NON-NLS-1$
 	public static final String PROP_SHOW_SOURCE_BUNDLES = "Preferences.MainPage.showSourceBundles"; //$NON-NLS-1$
 	public static final String OVERWRITE_BUILD_FILES_ON_EXPORT = "Preferences.MainPage.overwriteBuildFilesOnExport"; //$NON-NLS-1$
 	public static final String PROP_PROMPT_REMOVE_TARGET = "Preferences.MainPage.promptRemoveTarget"; //$NON-NLS-1$
+	public static final String ADD_TO_JAVA_SEARCH = "Preferences.MainPage.addToJavaSearch"; //$NON-NLS-1$
 
 	// Editor Outline
 	public static final String PROP_OUTLINE_SORTING = "PDEMultiPageContentOutline.SortingAction.isChecked"; //$NON-NLS-1$
@@ -38,6 +40,7 @@ public interface IPreferenceConstants {
 	public static final String DEPS_VIEW_SHOW_LIST = "DependenciesView.show.list"; //$NON-NLS-1$
 	public static final String DEPS_VIEW_SHOW_STATE = "DependenciesView.show.state"; //$NON-NLS-1$
 
-	// OSGi Frameworks
-	public static final String DEFAULT_OSGI_FRAMEOWRK = "Preference.default.osgi.framework"; //$NON-NLS-1$
+	//Run Configurations - Plug-ins Tab - Feature launching
+	public static final String FEATURE_SORT_COLUMN = "Preferences.RunConfigs.Feature.SortColumn"; //$NON-NLS-1$
+	public static final String FEATURE_SORT_ORDER = "Preferences.RunConfigs.Feature.SortOrder"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDELabelProvider.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDELabelProvider.java
index 4c44426..b72c44b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDELabelProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDELabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.util.Locale;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jdt.ui.ISharedImages;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -33,6 +34,7 @@ import org.eclipse.pde.internal.core.ischema.*;
 import org.eclipse.pde.internal.core.isite.*;
 import org.eclipse.pde.internal.core.plugin.ImportObject;
 import org.eclipse.pde.internal.core.text.bundle.*;
+import org.eclipse.pde.internal.core.util.VersionUtil;
 import org.eclipse.pde.internal.ui.elements.NamedElement;
 import org.eclipse.pde.internal.ui.util.SharedLabelProvider;
 import org.eclipse.swt.graphics.Image;
@@ -119,6 +121,9 @@ public class PDELabelProvider extends SharedLabelProvider {
 		if (obj instanceof Locale) {
 			return getObjectText((Locale) obj);
 		}
+		if (obj instanceof IStatus) {
+			return getObjectText((IStatus) obj);
+		}
 		return super.getText(obj);
 	}
 
@@ -293,14 +298,10 @@ public class PDELabelProvider extends SharedLabelProvider {
 	}
 
 	public String getObjectText(IProductFeature obj) {
-		String name = obj.getId();
-		String version = obj.getVersion().length() > 0 ? obj.getVersion() : "0.0.0"; //$NON-NLS-1$
-		String text;
-		if (version != null && version.length() > 0)
-			text = name + ' ' + formatVersion(obj.getVersion());
-		else
-			text = name;
-		return preventNull(text);
+		String name = preventNull(obj.getId());
+		if (VersionUtil.isEmptyVersion(obj.getVersion()))
+			return name;
+		return name + ' ' + formatVersion(obj.getVersion());
 	}
 
 	public String getObjectText(ISiteFeature obj) {
@@ -336,6 +337,10 @@ public class PDELabelProvider extends SharedLabelProvider {
 		return preventNull(obj.getName());
 	}
 
+	private String getObjectText(IStatus status) {
+		return status.getMessage();
+	}
+
 	public Image getImage(Object obj) {
 		if (obj instanceof IPlugin) {
 			return getObjectImage((IPlugin) obj);
@@ -446,7 +451,9 @@ public class PDELabelProvider extends SharedLabelProvider {
 		if (obj instanceof Locale) {
 			return get(PDEPluginImages.DESC_DISCOVERY);
 		}
-
+		if (obj instanceof IStatus) {
+			return getObjectImage((IStatus) obj);
+		}
 		return super.getImage(obj);
 	}
 
@@ -744,6 +751,18 @@ public class PDELabelProvider extends SharedLabelProvider {
 		return JavaUI.getSharedImages().getImage(ISharedImages.IMG_OBJS_PACKAGE);
 	}
 
+	private Image getObjectImage(IStatus status) {
+		int sev = status.getSeverity();
+		switch (sev) {
+			case IStatus.ERROR :
+				return PlatformUI.getWorkbench().getSharedImages().getImage(org.eclipse.ui.ISharedImages.IMG_OBJS_ERROR_TSK);
+			case IStatus.WARNING :
+				return PlatformUI.getWorkbench().getSharedImages().getImage(org.eclipse.ui.ISharedImages.IMG_OBJS_WARN_TSK);
+			default :
+				return PlatformUI.getWorkbench().getSharedImages().getImage(org.eclipse.ui.ISharedImages.IMG_OBJS_INFO_TSK);
+		}
+	}
+
 	public boolean isFullNameModeEnabled() {
 		return PDEPlugin.isFullNameModeEnabled();
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEPlugin.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEPlugin.java
index c660920..f4a624e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEPlugin.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,12 +16,10 @@ import java.util.Hashtable;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.pde.internal.core.PDEPreferencesManager;
-import org.eclipse.pde.internal.ui.launcher.*;
+import org.eclipse.pde.internal.ui.launcher.PDELogFileProvider;
 import org.eclipse.pde.internal.ui.util.SWTUtil;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
@@ -33,18 +31,13 @@ import org.eclipse.ui.internal.views.log.ILogFileProvider;
 import org.eclipse.ui.internal.views.log.LogFilesManager;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.osgi.framework.*;
+import org.osgi.framework.BundleContext;
 
 public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 
 	// Shared instance
 	private static PDEPlugin fInstance;
 
-	// Launches listener
-	private LaunchListener fLaunchListener;
-
-	private BundleContext fBundleContext;
-
 	private Hashtable fCounters;
 
 	// Provides Launch Configurations log files to Log View
@@ -55,19 +48,11 @@ public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 	private PDELabelProvider fLabelProvider;
 
 	/**
-	 * Utility class to help setup the launch configuration listener
-	 * without loading the debug plugin
-	 */
-	private DebugPluginUtil fDebugPluginUtil;
-
-	/**
 	 * The shared text file document provider.
 	 * @since 3.2
 	 */
 	private IDocumentProvider fTextFileDocumentProvider;
 
-	private OSGiFrameworkManager fOSGiFrameworkManager;
-
 	private PDEPreferencesManager fPreferenceManager;
 
 	public PDEPlugin() {
@@ -183,49 +168,14 @@ public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 	 */
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
-		fBundleContext = context;
-		setupLaunchConfigurationListener();
 		fLogFileProvider = new PDELogFileProvider();
 		LogFilesManager.addLogFileProvider(fLogFileProvider);
 	}
 
-	/**
-	 * Add the launch configuration listener if the debug plugin
-	 * is started.  Otherwise, setup a bundle listener to install
-	 * the listener when the debug plugin loads.
-	 * @param context bundle context needed to get current bundles
-	 */
-	private void setupLaunchConfigurationListener() {
-		boolean listenerStarted = false;
-		Bundle bundle = Platform.getBundle("org.eclipse.debug.core"); //$NON-NLS-1$
-		if (bundle != null && bundle.getState() == Bundle.ACTIVE) {
-			fDebugPluginUtil = new DebugPluginUtil();
-			fDebugPluginUtil.addListener();
-			listenerStarted = true;
-		}
-		if (!listenerStarted) {
-			fBundleContext.addBundleListener(new BundleListener() {
-				public void bundleChanged(BundleEvent event) {
-					if (event.getType() == BundleEvent.STARTED && "org.eclipse.debug.core".equals(event.getBundle().getSymbolicName())) { //$NON-NLS-1$
-						fDebugPluginUtil = new DebugPluginUtil();
-						fDebugPluginUtil.addListener();
-						fBundleContext.removeBundleListener(this);
-					}
-				}
-			});
-		}
-	}
-
-	public BundleContext getBundleContext() {
-		return fBundleContext;
-	}
-
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 	 */
 	public void stop(BundleContext context) throws Exception {
-		if (fLaunchListener != null)
-			fLaunchListener.shutdown();
 		if (fFormColors != null) {
 			fFormColors.dispose();
 			fFormColors = null;
@@ -234,14 +184,11 @@ public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 			fLabelProvider.dispose();
 			fLabelProvider = null;
 		}
-		if (fDebugPluginUtil != null) {
-			fDebugPluginUtil.removeListener();
-		}
 		if (fLogFileProvider != null) {
 			LogFilesManager.removeLogFileProvider(fLogFileProvider);
 			fLogFileProvider = null;
 		}
-		LauncherUtils.shutdown();
+		Utilities.shutdown();
 		super.stop(context);
 	}
 
@@ -251,18 +198,6 @@ public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 		return fLabelProvider;
 	}
 
-	public LaunchListener getLaunchListener() {
-		if (fLaunchListener == null)
-			fLaunchListener = new LaunchListener();
-		return fLaunchListener;
-	}
-
-	public OSGiFrameworkManager getOSGiFrameworkManager() {
-		if (fOSGiFrameworkManager == null)
-			fOSGiFrameworkManager = new OSGiFrameworkManager();
-		return fOSGiFrameworkManager;
-	}
-
 	public static boolean isFullNameModeEnabled() {
 		IPreferenceStore store = getDefault().getPreferenceStore();
 		return store.getString(IPreferenceConstants.PROP_SHOW_OBJECTS).equals(IPreferenceConstants.VALUE_USE_NAMES);
@@ -280,26 +215,4 @@ public class PDEPlugin extends AbstractUIPlugin implements IPDEUIConstants {
 		return fTextFileDocumentProvider;
 	}
 
-	/**
-	 * Utility class that creates and controls a the PDE launch configuration listener.
-	 * This is done in a separate class to avoid loading the debug plugin.
-	 * @since 3.4
-	 */
-	private class DebugPluginUtil {
-		private ILaunchConfigurationListener fLaunchConfigurationListener;
-
-		public void addListener() {
-			if (fLaunchConfigurationListener == null) {
-				fLaunchConfigurationListener = new LaunchConfigurationListener();
-			}
-			DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(fLaunchConfigurationListener);
-		}
-
-		public void removeListener() {
-			if (fLaunchConfigurationListener != null) {
-				DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(fLaunchConfigurationListener);
-				fLaunchConfigurationListener = null;
-			}
-		}
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
index cd6ba1b..ef1ae8f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,8 +52,6 @@ public class PDEUIMessages extends NLS {
 
 	public static String DependencyPropertiesDialog_exportGroupText;
 
-	public static String EclipsePluginValidationOperation_pluginMissing;
-
 	public static String ExternalizeStringsOperation_editNames_addComment;
 
 	public static String ExternalizeStringsOperation_editNames_insertProperty;
@@ -64,6 +62,40 @@ public class PDEUIMessages extends NLS {
 
 	public static String ExternalizeStringsProcessor_errorMessage;
 
+	public static String FeatureBlock_AdditionalPluginsEntry;
+
+	public static String FeatureBlock_AddPluginsLabel;
+
+	public static String FeatureBlock_AllFeatureSelected;
+
+	public static String FeatureBlock_RemovePluginsLabel;
+
+	public static String FeatureBlock_addRequiredFeatues;
+
+	public static String FeatureBlock_default;
+
+	public static String FeatureBlock_defaultPluginResolution;
+
+	public static String FeatureBlock_features;
+
+	public static String FeatureBlock_pluginResolution;
+
+	public static String FeatureBlock_externalBefore;
+
+	public static String FeatureBlock_ExternalResolutionLabel;
+
+	public static String FeatureBlock_FeatureGroupDescription;
+
+	public static String FeatureBlock_SelectFeatures;
+
+	public static String FeatureBlock_UseWorkspaceFeatures;
+
+	public static String FeatureBlock_version;
+
+	public static String FeatureBlock_workspaceBefore;
+
+	public static String FeatureBlock_WorkspaceResolutionLabel;
+
 	public static String FeatureEditor_exportTooltip;
 
 	public static String JavaArgumentsTab_addVMArgs;
@@ -72,6 +104,15 @@ public class PDEUIMessages extends NLS {
 
 	public static String OrganizeManifestsProcessor_rootMessage;
 
+	public static String PDECompilersConfigurationBlock_0;
+	public static String PDECompilersConfigurationBlock_1;
+	public static String PDECompilersConfigurationBlock_2;
+	public static String PDECompilersConfigurationBlock_3;
+	public static String PDECompilersConfigurationBlock_4;
+	public static String PDECompilersConfigurationBlock_5;
+	public static String PDECompilersConfigurationBlock_6;
+	public static String PDECompilersConfigurationBlock_7;
+
 	public static String PDECompilersConfigurationBlock_general;
 	public static String PDECompilersConfigurationBlock_versioning;
 	public static String PDECompilersConfigurationBlock_references;
@@ -79,6 +120,7 @@ public class PDEUIMessages extends NLS {
 	public static String PDECompilersConfigurationBlock_settings_changed;
 	public static String PDECompilersConfigurationBlock_settings_changed_all;
 	public static String PDECompilersConfigurationBlock_usage;
+	public static String PDECompilersConfigurationBlock_build;
 
 	public static String PDEWizardNewFileCreationPage_errorMsgStartsWithDot;
 
@@ -179,8 +221,6 @@ public class PDEUIMessages extends NLS {
 
 	public static String LauncherUtils_workspaceLocked;
 
-	public static String LauncherUtils_cannotLaunchApplication;
-
 	public static String LauncherUtils_clearLogFile;
 
 	public static String LauncherUtils_generateConfigIni;
@@ -215,7 +255,7 @@ public class PDEUIMessages extends NLS {
 
 	public static String PluginsTab_allPlugins;
 
-	public static String PluginsTab_featureMode;
+	public static String PluginsTab_customFeatureMode;
 
 	public static String PluginsTab_launchWith;
 
@@ -353,8 +393,12 @@ public class PDEUIMessages extends NLS {
 
 	public static String ImportActionGroup_binaryWithLinkedContent;
 
+	public static String ImportActionGroup_cannot_import;
+
 	public static String ImportActionGroup_importContributingPlugin;
 
+	public static String ImportActionGroup_Repository_project;
+
 	public static String InformationSection_0;
 
 	public static String InformationSection_1;
@@ -367,6 +411,7 @@ public class PDEUIMessages extends NLS {
 
 	public static String LibrarySection_addDialogButton;
 
+	public static String MainPreferencePage_addToJavaSearch;
 	public static String MainPreferencePage_exportingGroup;
 	public static String MainPreferencePage_sourceGroup;
 	public static String MainPreferencePage_group2;
@@ -392,10 +437,14 @@ public class PDEUIMessages extends NLS {
 
 	public static String OpenSchemaAction_titleExtensionPointSchema;
 
+	public static String OSGiFrameworkBlock_selectedBundles;
+
 	public static String OSGiFrameworkPreferencePage_default;
 
 	public static String OSGiFrameworkPreferencePage_installed;
 
+	public static String OSGiFrameworkPreferencePage_installed_nolink;
+
 	public static String PDEFormEditor_errorMessageSaveNotCompleted;
 
 	public static String PDEFormEditor_errorTitleProblemSaveAs;
@@ -864,7 +913,6 @@ public class PDEUIMessages extends NLS {
 	public static String AdvancedPluginExportPage_noPassword;
 	public static String AdvancedFeatureExportPage_createJNLP;
 	public static String AdvancedFeatureExportPage_jreVersion;
-	public static String AdvancedLauncherTab_error_featureSetup;
 	public static String AdvancedPluginExportPage_qualifier;
 
 	public static String TracingLauncherTab_name;
@@ -893,13 +941,7 @@ public class PDEUIMessages extends NLS {
 	public static String ConfigurationSection_selection;
 	public static String ConfigurationTab_fileDialogMessage;
 
-	public static String WorkbenchLauncherConfigurationDelegate_noJRE;
-	public static String WorkbenchLauncherConfigurationDelegate_jrePathNotFound;
-	public static String WorkbenchLauncherConfigurationDelegate_badFeatureSetup;
-	public static String WorkbenchLauncherConfigurationDelegate_noStartup;
 	public static String WorkbenchLauncherConfigurationDelegate_confirmDeleteWorkspace;
-	public static String JUnitLaunchConfiguration_error_notaplugin;
-	public static String JUnitLaunchConfiguration_error_missingPlugin;
 
 	public static String Launcher_error_title;
 	public static String LauncherSection_desc;
@@ -908,7 +950,6 @@ public class PDEUIMessages extends NLS {
 	public static String LauncherSection_icon;
 	public static String LauncherSection_tiny;
 	public static String Launcher_error_code13;
-	public static String Launcher_error_code15;
 	public static String Launcher_error_displayInLogView;
 	public static String Launcher_error_displayInSystemEditor;
 	public static String LauncherSection_browse;
@@ -931,8 +972,6 @@ public class PDEUIMessages extends NLS {
 	public static String OpenLogDialog_cannotDisplay;
 
 	public static String OSGiBundlesTab_frameworkLabel;
-	public static String OSGiLaunchConfiguration_cannotFindLaunchConfiguration;
-	public static String OSGiLaunchConfiguration_selected;
 
 	// Preferences ####################################
 	public static String Preferences_MainPage_Description;
@@ -1005,7 +1044,6 @@ public class PDEUIMessages extends NLS {
 	public static String ContentPage_noid;
 	public static String ContentPage_invalidId;
 	public static String ContentPage_badversion;
-	public static String ContentPage_noname;
 	public static String ContentPage_nopid;
 	public static String ContentPage_pluginNotFound;
 	public static String ContentPage_illegalCharactersInID;
@@ -1058,6 +1096,8 @@ public class PDEUIMessages extends NLS {
 	public static String BuildPluginAction_ErrorDialog_Title;
 	public static String BuildPluginAction_ErrorDialog_Message;
 
+	public static String BuildPluginAction_WarningCustomBuildExists;
+
 	public static String NewFeatureWizard_wtitle;
 	public static String NewFeatureWizard_MainPage_desc;
 	public static String NewFeatureWizard_SpecPage_title;
@@ -1191,6 +1231,7 @@ public class PDEUIMessages extends NLS {
 	public static String NewExtensionWizard_PointSelectionPage_contributedTemplates_label;
 	public static String NewExtensionWizard_PointSelectionPage_templateDescription;
 	public static String NewExtensionWizard_PointSelectionPage_pluginDescription;
+	public static String NewExtensionWizard_PointSelectionPage_pluginDescription_deprecated;
 	public static String NewExtensionWizard_PointSelectionPage_extPointDescription;
 
 	public static String ExtensionEditorWizard_wtitle;
@@ -1249,6 +1290,7 @@ public class PDEUIMessages extends NLS {
 
 	public static String PluginSelectionDialog_title;
 	public static String PluginSelectionDialog_message;
+
 	public static String PluginImportOperation_could_not_delete_project;
 
 	public static String PluginContentPage_appQuestion;
@@ -1256,8 +1298,6 @@ public class PDEUIMessages extends NLS {
 	public static String PluginContentPage_enable_api_analysis;
 
 	public static String ImportWizard_title;
-	public static String ImportWizard_messages_title;
-	public static String ImportWizard_messages_exists;
 	public static String ImportWizard_FirstPage_title;
 	public static String ImportWizard_FirstPage_desc;
 	public static String ImportWizard_FirstPage_importGroup;
@@ -1304,7 +1344,6 @@ public class PDEUIMessages extends NLS {
 	public static String ImportWizard_DetailedPage_filterDesc;
 	public static String ImportWizard_DetailedPage_search;
 
-	public static String ImportWizard_operation_creating;
 	public static String ImportWizard_operation_multiProblem;
 	public static String ImportWizard_operation_importingSource;
 
@@ -1423,6 +1462,9 @@ public class PDEUIMessages extends NLS {
 	public static String SearchAction_Declaration;
 	public static String ShowDescriptionAction_label;
 	public static String ShowDescriptionAction_title;
+	public static String ShowSampleAction_installing;
+	public static String ShowSampleAction_title;
+	public static String ShowSampleAction_msgDesc;
 	public static String ShowSampleAction_msgTitle;
 	public static String DependencyExtent_singular;
 	public static String DependencyExtent_plural;
@@ -1657,6 +1699,22 @@ public class PDEUIMessages extends NLS {
 	public static String CategorySection_newCategoryName;
 	public static String CategorySection_newCategoryLabel;
 
+	// Target Export ########################################
+	public static String ExportTargetDefinition_task;
+	public static String ExportTargetDeleteOldData;
+	public static String ExportTargetExportFeatures;
+	public static String ExportTargetExportPlugins;
+	public static String ExportActiveTargetDefinition;
+	public static String ExportActiveTargetDefinition_message;
+	public static String ExportTargetCurrentTarget;
+	public static String ExportTargetChooseFolder;
+	public static String ExportTargetBrowse;
+	public static String ExportTargetSelectDestination;
+	public static String ExportTargetSpecifyDestination;
+	public static String ExportTargetClearDestination;
+	public static String ExportTargetError_ChooseDestination;
+	public static String ExportTargetError_validPath;
+
 	public static String CategoryDetails_title;
 	public static String CategoryDetails_sectionDescription;
 	public static String CategoryDetails_name;
@@ -1745,8 +1803,6 @@ public class PDEUIMessages extends NLS {
 	public static String ReviewPage_desc;
 	public static String ReviewPage_descContent;
 	public static String ReviewPage_content;
-	public static String ShowSampleAction_title;
-	public static String ShowSampleAction_msgDesc;
 	public static String SelfHostingPropertyPage_label;
 	public static String SelfHostingPropertyPage_viewerLabel;
 	public static String RuntimePage_tabName;
@@ -1863,6 +1919,7 @@ public class PDEUIMessages extends NLS {
 	public static String ProductJRESection_desc;
 	public static String ProductJRESection_eeName;
 	public static String ProductJRESection_browseEEs;
+	public static String ProdctJRESection_bundleJRE;
 
 	public static String Product_FeatureSection_remove;
 	public static String Product_FeatureSection_open;
@@ -1940,6 +1997,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String CrossPlatformExportPage_desc;
 
+	public static String BaseImportWizardSecondPage_0;
+
 	public static String BaseImportWizardSecondPage_autobuild;
 
 	public static String ExportPackageVisibilitySection_unconditional;
@@ -2058,6 +2117,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String OverviewPage_fExtensionContent;
 
+	public static String OverwriteProjectsSelectionDialog_0;
+
 	public static String BaseBlock_dirSelection;
 
 	public static String BaseBlock_dirChoose;
@@ -2098,8 +2159,6 @@ public class PDEUIMessages extends NLS {
 
 	public static String EquinoxSettingsTab_name;
 
-	public static String EquinoxLaunchConfiguration_oldTarget;
-
 	public static String ModelChangeLabelProvider_instance;
 
 	public static String ModelChangeLabelProvider_instances;
@@ -2265,10 +2324,10 @@ public class PDEUIMessages extends NLS {
 
 	public static String OrganizeExportPackageResolution_Label;
 
-	public static String PluginImportOperation_executionEnvironment;
-
 	public static String PluginImportOperation_Importing_plugin;
 
+	public static String PluginImportOperation_OverwritePluginProjects;
+
 	public static String PluginImportOperation_Set_up_classpaths;
 
 	public static String PluginImportWizard_runningConfigDesc;
@@ -2283,6 +2342,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String PluginImportWizardFirstPage_2;
 
+	public static String PluginImportWizardFirstPage_3;
+
 	public static String LauncherUtils_title;
 
 	public static String RemoveLazyLoadingDirectiveResolution_remove;
@@ -2401,6 +2462,10 @@ public class PDEUIMessages extends NLS {
 
 	public static String JavaArgumentsTab_description;
 
+	public static String JavaSearchActionGroup_RemoveJavaSearchMessage;
+
+	public static String JavaSearchActionGroup_RemoveJavaSearchTitle;
+
 	public static String TargetProfileWizardPage_title;
 
 	public static String ProductInfoSection_productname;
@@ -2411,8 +2476,6 @@ public class PDEUIMessages extends NLS {
 
 	public static String EnvironmentPage_title;
 
-	public static String JRESection_title;
-
 	public static String JRESection_description;
 
 	public static String JRESection_defaultJRE;
@@ -2421,8 +2484,6 @@ public class PDEUIMessages extends NLS {
 
 	public static String JRESection_ExecutionEnv;
 
-	public static String EnvironmentSection_title;
-
 	public static String EnvironmentSection_description;
 
 	public static String EnvironmentSection_operationSystem;
@@ -2459,12 +2520,18 @@ public class PDEUIMessages extends NLS {
 
 	public static String TargetDefinitionContentPage_8;
 
+	public static String TargetDefinitionContentPage_LocationDescription;
+
 	public static String TargetDefinitionEnvironmentPage_3;
 
 	public static String TargetDefinitionEnvironmentPage_4;
 
 	public static String TargetDefinitionEnvironmentPage_5;
 
+	public static String FilteredIUSelectionDialog_title;
+	public static String FilteredIUSelectionDialog_message;
+	public static String FilteredIUSelectionDialog_showLatestVersionOnly;
+
 	public static String EditorUtilities_noImageData;
 
 	public static String EditorUtilities_pathNotValidImage;
@@ -2523,6 +2590,14 @@ public class PDEUIMessages extends NLS {
 
 	public static String CompilersConfigurationTab_buildPropertiesErrors;
 
+	public static String CVSBundleImportPage_0;
+
+	public static String CVSBundleImportPage_1;
+
+	public static String CVSBundleImportPage_2;
+
+	public static String CVSBundleImportPage_3;
+
 	public static String PluginsView_description;
 
 	public static String LocationSection_0;
@@ -2593,6 +2668,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String TargetPlatformPreferencePage2_1;
 
+	public static String TargetPlatformPreferencePage2_10;
+
 	public static String TargetPlatformPreferencePage2_11;
 
 	public static String TargetPlatformPreferencePage2_12;
@@ -2629,6 +2706,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String TargetPlatformPreferencePage2_27;
 
+	public static String TargetPlatformPreferencePage2_28;
+
 	public static String TargetPlatformPreferencePage2_3;
 
 	public static String TargetPlatformPreferencePage2_4;
@@ -2645,6 +2724,10 @@ public class PDEUIMessages extends NLS {
 
 	public static String ManifestEditorContributor_externStringsActionName;
 
+	public static String MultiFixResolution_JavaFixAll;
+
+	public static String MultiFixResolution_FixAll;
+
 	public static String SplashSection_progressBar;
 	public static String SplashSection_progressX;
 	public static String SplashSection_progressWidth;
@@ -2680,6 +2763,10 @@ public class PDEUIMessages extends NLS {
 
 	public static String ProductInfoSection_features;
 
+	public static String ProfileBlock_0;
+
+	public static String ProfileBlock_1;
+
 	public static String ImportPackageSection_goToPackage;
 
 	public static String ExportPackageSection_findReferences;
@@ -2688,6 +2775,8 @@ public class PDEUIMessages extends NLS {
 
 	public static String RemoveBuildEntryResolution_removeToken;
 
+	public static String ReplaceBuildEntryResolution_replaceToken;
+
 	public static String AddBuildEntryResolution_add;
 
 	public static String AppendSeperatorBuildEntryResolution_label;
@@ -2704,6 +2793,14 @@ public class PDEUIMessages extends NLS {
 
 	public static String DescriptionSection_nameLabel;
 
+	public static String DuplicatePluginResolutionDialog_deselectAll;
+
+	public static String DuplicatePluginResolutionDialog_message;
+
+	public static String DuplicatePluginResolutionDialog_messageSingular;
+
+	public static String DuplicatePluginResolutionDialog_selectAll;
+
 	public static String OrganizeManifestsOperation_additionalDeps;
 
 	public static String OrganizeManifestsWizardPage_addDependencies;
@@ -2751,8 +2848,6 @@ public class PDEUIMessages extends NLS {
 	public static String HyperlinkActionOpenBundle;
 	public static String HyperlinkActionOpenPackage;
 
-	public static String VMHelper_cannotFindExecEnv;
-
 	public static String HyperlinkActionOpenResource;
 	public static String HyperlinkActionOpenSchema;
 	public static String HyperlinkActionOpenTranslation;
@@ -2785,6 +2880,8 @@ public class PDEUIMessages extends NLS {
 	public static String AddExportPackageResolution_Label;
 	public static String AddBundleClassPathResolution_add;
 
+	public static String AddToJavaSearchJob_0;
+
 	public static String AntGeneratingExportWizard_0;
 	public static String AntGeneratingExportWizard_1;
 	public static String AntGeneratingExportWizard_2;
@@ -2816,5 +2913,12 @@ public class PDEUIMessages extends NLS {
 	public static String PDEJUnitLaunchConfigurationTab_Run_Tests_In_UI_Thread;
 
 	public static String VersionDialog_text;
+	public static String VersionDialog_title;
+
+	public static String SearchRepositoriesForIUProposal_message;
+	public static String SearchRepositoriesForIUProposal_description;
+
+	public static String OSGiConsole_name;
+	public static String OSGiConsoleFactory_title;
 
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/Utilities.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/Utilities.java
new file mode 100644
index 0000000..1b2d620
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/Utilities.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui;
+
+import java.io.*;
+import java.util.Date;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * This class is a collection of utility functions for creating and using temporary working directories. 
+ */
+public class Utilities {
+
+	private static long tmpseed = (new Date()).getTime();
+	private static String dirRoot = null;
+
+	/**
+	 * Returns a new working directory (in temporary space). Ensures
+	 * the directory exists. Any directory levels that had to be created
+	 * are marked for deletion on exit.
+	 * 
+	 * @return working directory
+	 * @exception IOException
+	 * @since 2.0
+	 */
+	public static synchronized File createWorkingDirectory() throws IOException {
+
+		if (dirRoot == null) {
+			dirRoot = System.getProperty("java.io.tmpdir"); //$NON-NLS-1$
+			// in Linux, returns '/tmp', we must add '/'
+			if (!dirRoot.endsWith(File.separator))
+				dirRoot += File.separator;
+
+			// on Unix/Linux, the temp dir is shared by many users, so we need to ensure 
+			// that the top working directory is different for each user
+			if (!Platform.getOS().equals("win32")) { //$NON-NLS-1$
+				String home = System.getProperty("user.home"); //$NON-NLS-1$
+				home = Integer.toString(home.hashCode());
+				dirRoot += home + File.separator;
+			}
+			dirRoot += "eclipse" + File.separator + ".update" + File.separator + Long.toString(tmpseed) + File.separator; //$NON-NLS-1$ //$NON-NLS-2$
+		}
+
+		String tmpName = dirRoot + Long.toString(++tmpseed) + File.separator;
+
+		File tmpDir = new File(tmpName);
+		verifyPath(tmpDir, false);
+		if (!tmpDir.exists())
+			throw new FileNotFoundException(tmpName);
+		return tmpDir;
+	}
+
+	/**
+	 * Perform shutdown processing for temporary file handling.
+	 * This method is called when platform is shutting down.
+	 * It is not intended to be called at any other time under
+	 * normal circumstances. A side-effect of calling this method
+	 * is that the contents of the temporary directory managed 
+	 * by this class are deleted. 
+	 * 
+	 * @since 2.0
+	 */
+	public static void shutdown() {
+		if (dirRoot == null)
+			return;
+		File temp = new File(dirRoot); // temp directory root for this run
+		cleanupTemp(temp);
+		temp.delete();
+	}
+
+	private static void cleanupTemp(File root) {
+		File[] files = root.listFiles();
+		for (int i = 0; files != null && i < files.length; i++) {
+			if (files[i].isDirectory())
+				cleanupTemp(files[i]);
+			files[i].delete();
+		}
+	}
+
+	private static void verifyPath(File path, boolean isFile) {
+		// if we are expecting a file back off 1 path element
+		if (isFile) {
+			if (path.getAbsolutePath().endsWith(File.separator)) {
+				// make sure this is a file
+				path = path.getParentFile();
+				isFile = false;
+			}
+		}
+
+		// already exists ... just return
+		if (path.exists())
+			return;
+
+		// does not exist ... ensure parent exists
+		File parent = path.getParentFile();
+		verifyPath(parent, false);
+
+		// ensure directories are made. Mark files or directories for deletion
+		if (!isFile)
+			path.mkdir();
+		path.deleteOnExit();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
index c7ee802..0dc9545 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BaseBuildAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.build.IXMLConstants;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDEPreferencesManager;
 import org.eclipse.pde.internal.core.exports.BuildUtilities;
 import org.eclipse.pde.internal.core.natures.PDE;
@@ -114,7 +115,7 @@ public abstract class BaseBuildAction implements IObjectActionDelegate {
 		// Force the build if autobuild is off
 		IProject project = file.getProject();
 		if (!project.getWorkspace().isAutoBuilding()) {
-			String builderID = "feature.xml".equals(file.getName()) ? PDE.FEATURE_BUILDER_ID : PDE.MANIFEST_BUILDER_ID; //$NON-NLS-1$
+			String builderID = ICoreConstants.FEATURE_FILENAME_DESCRIPTOR.equals(file.getName()) ? PDE.FEATURE_BUILDER_ID : PDE.MANIFEST_BUILDER_ID;
 			project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, builderID, null, monitor);
 		}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java
index 7ac7abb..b509d79 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java
@@ -14,8 +14,8 @@ package org.eclipse.pde.internal.ui.build;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Properties;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
@@ -23,18 +23,26 @@ import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.build.*;
 import org.eclipse.pde.internal.core.ClasspathHelper;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
+import org.eclipse.pde.internal.core.builders.BuildErrorReporter;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 
 public class BuildPluginAction extends BaseBuildAction {
 
 	protected void makeScripts(IProgressMonitor monitor) throws InvocationTargetException, CoreException {
 
+		IProject project = fManifestFile.getProject();
+		IPluginModelBase model = PluginRegistry.findModel(project);
+		BuildErrorReporter buildErrorReporter = new BuildErrorReporter(fManifestFile);
+		IResource buildXML = project.findMember("build.xml"); //$NON-NLS-1$
+		if (buildXML != null && buildXML.exists() == true && buildErrorReporter.isCustomBuild() == true) {
+			IStatus warnFail = new Status(IStatus.WARNING, model.getPluginBase().getId(), PDEUIMessages.BuildPluginAction_WarningCustomBuildExists);
+			throw new CoreException(warnFail);
+		}
 		BuildScriptGenerator generator = new BuildScriptGenerator();
 		AbstractScriptGenerator.setEmbeddedSource(AbstractScriptGenerator.getDefaultEmbeddedSource());
 		AbstractScriptGenerator.setForceUpdateJar(AbstractScriptGenerator.getForceUpdateJarFormat());
 		AbstractScriptGenerator.setConfigInfo(AbstractScriptGenerator.getDefaultConfigInfos());
 
-		IProject project = fManifestFile.getProject();
 		generator.setWorkingDirectory(project.getLocation().toOSString());
 		String url = ClasspathHelper.getDevEntriesProperties(project.getLocation().addTrailingSeparator().toString() + "dev.properties", false); //$NON-NLS-1$
 		generator.setDevEntries(url);
@@ -46,7 +54,6 @@ public class BuildPluginAction extends BaseBuildAction {
 		Properties properties = new Properties();
 		properties.put(IBuildPropertiesConstants.PROPERTY_ALLOW_BINARY_CYCLES, "true"); //$NON-NLS-1$
 		generator.setImmutableAntProperties(properties);
-		IPluginModelBase model = PluginRegistry.findModel(project);
 		if (model != null && model.getPluginBase().getId() != null) {
 			generator.setBundles(new BundleDescription[] {model.getBundleDescription()});
 			generator.generate();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/FeatureExportJob.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/FeatureExportJob.java
new file mode 100644
index 0000000..891fc27
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/FeatureExportJob.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.build;
+
+import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
+import org.eclipse.pde.internal.core.exports.FeatureExportOperation;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+/**
+ * This class remains for internal compatibility - see bug 301178.
+ */
+public class FeatureExportJob extends FeatureExportOperation {
+
+	public FeatureExportJob(FeatureExportInfo info) {
+		super(info, PDEUIMessages.FeatureExportJob_name);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/PluginExportJob.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/PluginExportJob.java
new file mode 100644
index 0000000..e880f3d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/PluginExportJob.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.build;
+
+import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
+import org.eclipse.pde.internal.core.exports.PluginExportOperation;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+/**
+ * This class remains for internal compatibility - see bug 301178.
+ */
+public class PluginExportJob extends PluginExportOperation {
+
+	public PluginExportJob(FeatureExportInfo info) {
+		super(info, PDEUIMessages.PluginExportJob_name);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
index dc5dcd7..ccdf64d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/RuntimeInstallJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
+ *  Copyright (c) 2008, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,220 +7,210 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
-package org.eclipse.pde.internal.ui.build;
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.provisional.p2.core.*;
-import org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.ProvisioningPlan;
-import org.eclipse.equinox.internal.provisional.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
-import org.eclipse.equinox.internal.provisional.p2.query.MatchQuery;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.InstallAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.build.site.QualifierReplacer;
-import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-
-/**
- * This job attempts to install a set of exported plug-ins or
- * features into the current runtime.
- */
-public class RuntimeInstallJob extends Job {
-
-	private FeatureExportInfo fInfo;
-
-	/**
-	 * Creates a new job that will install exported plug-ins.  For a 
-	 * successful install, specific option in the feature export info
-	 * object need to be set before the export operation see 
-	 * {@link #modifyInfoForInstall(FeatureExportInfo)}
-	 * 
-	 * @param jobName the name to use for this job
-	 * @param info the info object describing what is being exported
-	 */
-	public RuntimeInstallJob(String jobName, FeatureExportInfo info) {
-		super(jobName);
-		fInfo = info;
-	}
-
-	/**
-	 * Sets the export options required to make the export installable.
-	 * This method should be called before the export operation takes
-	 * place.
-	 * 
-	 * @param info the feature info object that will be modified
-	 */
-	public static void modifyInfoForInstall(FeatureExportInfo info) {
-		info.exportSource = false;
-		info.useJarFormat = true;
-		info.exportMetadata = true;
-		info.qualifier = QualifierReplacer.getDateQualifier();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected IStatus run(IProgressMonitor monitor) {
-		try {
-			monitor.beginTask(PDEUIMessages.RuntimeInstallJob_Job_name_installing, 12 + (2 * fInfo.items.length));
-
-			// p2 needs to know about the generated repos
-			URI destination = new File(fInfo.destinationDirectory).toURI();
-			ProvisioningUtil.loadArtifactRepository(destination, new SubProgressMonitor(monitor, 1));
-
-			IMetadataRepository metaRepo = ProvisioningUtil.loadMetadataRepository(destination, new SubProgressMonitor(monitor, 1));
-
-			IProfile profile = ProvisioningUtil.getProfile(IProfileRegistry.SELF);
-			if (profile == null) {
-				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), PDEUIMessages.RuntimeInstallJob_ErrorCouldntOpenProfile);
-			}
-
-			List toInstall = new ArrayList();
-			for (int i = 0; i < fInfo.items.length; i++) {
-				if (monitor.isCanceled()) {
-					return Status.CANCEL_STATUS;
-				}
-				monitor.subTask(NLS.bind(PDEUIMessages.RuntimeInstallJob_Creating_installable_unit, fInfo.items[i].toString()));
-
-				//Get the installable unit from the repo
-				String id = null;
-				String version = null;
-				if (fInfo.items[i] instanceof IPluginModelBase) {
-					id = ((IPluginModelBase) fInfo.items[i]).getPluginBase().getId();
-					version = ((IPluginModelBase) fInfo.items[i]).getPluginBase().getVersion();
-				} else if (fInfo.items[i] instanceof IFeatureModel) {
-					id = ((IFeatureModel) fInfo.items[i]).getFeature().getId() + ".feature.group"; //$NON-NLS-1$
-					version = ((IFeatureModel) fInfo.items[i]).getFeature().getVersion();
-				}
-
-				if (id == null && version == null) {
-					return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.RuntimeInstallJob_ErrorCouldNotGetIdOrVersion, fInfo.items[i].toString()));
-				}
-
-				// Use the same qualifier replacement as the export operation used
-				version = QualifierReplacer.replaceQualifierInVersion(version, id, null, null);
-
-				// Check if the right version exists in the new meta repo
-				Version newVersion = new Version(version);
-				Collector queryMatches = metaRepo.query(new InstallableUnitQuery(id, newVersion), new Collector(), monitor);
-				if (queryMatches.size() == 0) {
-					return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.RuntimeInstallJob_ErrorCouldNotFindUnitInRepo, new String[] {id, version}));
-				}
-
-				IInstallableUnit iuToInstall = (IInstallableUnit) queryMatches.toArray(IInstallableUnit.class)[0];
-
-				// Find out if the profile already has that iu installed												
-				queryMatches = profile.query(new InstallableUnitQuery(id), new Collector(), new SubProgressMonitor(monitor, 0));
-				if (queryMatches.size() == 0) {
-					// Just install the new iu into the profile
-					toInstall.add(iuToInstall);
-				} else {
-					// There is an existing iu that we need to replace using an installable unit patch
-					Version existingVersion = ((IInstallableUnit) queryMatches.toArray(IInstallableUnit.class)[0]).getVersion();
-					toInstall.add(createInstallableUnitPatch(id, newVersion, existingVersion, profile, monitor));
-				}
-				monitor.worked(2);
-
-			}
-
-			if (toInstall.size() > 0) {
-				MultiStatus accumulatedStatus = new MultiStatus(PDEPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
-				ProfileChangeRequest request = InstallAction.computeProfileChangeRequest((IInstallableUnit[]) toInstall.toArray(new IInstallableUnit[toInstall.size()]), IProfileRegistry.SELF, accumulatedStatus, monitor);
-				if (request == null || accumulatedStatus.getSeverity() == IStatus.CANCEL || !(accumulatedStatus.isOK() || accumulatedStatus.getSeverity() == IStatus.INFO)) {
-					return accumulatedStatus;
-				}
-
-				ProvisioningPlan thePlan = ProvisioningUtil.getProvisioningPlan(request, new ProvisioningContext(new URI[] {destination}), new SubProgressMonitor(monitor, 5));
-				IStatus status = thePlan.getStatus();
-				if (status.getSeverity() == IStatus.CANCEL || !(status.isOK() || status.getSeverity() == IStatus.INFO)) {
-					return status;
-				}
-
-				status = ProvisioningUtil.performProvisioningPlan(thePlan, new DefaultPhaseSet(), profile, new SubProgressMonitor(monitor, 5));
-
-				return status;
-			}
-
-			if (monitor.isCanceled()) {
-				return Status.CANCEL_STATUS;
-			}
-			return Status.OK_STATUS;
-
-		} catch (ProvisionException e) {
-			return e.getStatus();
-		} finally {
-			monitor.done();
-		}
-	}
-
-	/**
-	 * Creates an installable unit patch that will change the version of
-	 * existing requirements with the given version.
-	 * 
-	 * @param id id of the installable unit that is having a version change
-	 * @param version the new version to require
-	 * @param existingVersion an existing version of the plug-in that this patch will replaced, used to generate lifecycle
-	 * @param profile the profile we are installing in
-	 * @param monitor progress monitor
-	 * @return an installable unit patch
-	 */
-	private IInstallableUnitPatch createInstallableUnitPatch(final String id, final Version version, final Version existingVersion, IProfile profile, IProgressMonitor monitor) {
-		InstallableUnitPatchDescription iuPatchDescription = new MetadataFactory.InstallableUnitPatchDescription();
-		iuPatchDescription.setId(id + ".patch"); //$NON-NLS-1$
-		iuPatchDescription.setProperty(IInstallableUnit.PROP_NAME, NLS.bind(PDEUIMessages.RuntimeInstallJob_installPatchName, id));
-		iuPatchDescription.setProperty(IInstallableUnit.PROP_DESCRIPTION, PDEUIMessages.RuntimeInstallJob_installPatchDescription);
-		Version patchVersion = new Version("1.0.0." + QualifierReplacer.getDateQualifier()); //$NON-NLS-1$
-		iuPatchDescription.setVersion(patchVersion);
-		iuPatchDescription.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(iuPatchDescription.getId(), new VersionRange(new Version(0, 0, 0), true, patchVersion, false), 0, null));
-
-		ArrayList list = new ArrayList(1);
-		list.add(MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, iuPatchDescription.getId(), iuPatchDescription.getVersion()));
-		iuPatchDescription.addProvidedCapabilities(list);
-
-		IRequiredCapability applyTo = MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, id, null, null, false, false);
-		IRequiredCapability newValue = MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, version, true), null, false, false);
-		iuPatchDescription.setRequirementChanges(new IRequirementChange[] {MetadataFactory.createRequirementChange(applyTo, newValue)});
-
-		iuPatchDescription.setApplicabilityScope(new IRequiredCapability[0][0]);
-
-		// Add lifecycle requirement on a changed bundle, if it gets updated, then we should uninstall the patch
-		Collector queryMatches = profile.query(new MatchQuery() {
-			public boolean isMatch(Object candidate) {
-				if (candidate instanceof IInstallableUnit) {
-					IRequiredCapability[] reqs = ((IInstallableUnit) candidate).getRequiredCapabilities();
-					for (int i = 0; i < reqs.length; i++) {
-						if (reqs[i].getName().equals(id)) {
-							if (new VersionRange(existingVersion, true, existingVersion, true).equals(reqs[i].getRange())) {
-								return true;
-							}
-						}
-					}
-				}
-				return false;
-			}
-		}, new Collector(), monitor);
-		if (!queryMatches.isEmpty()) {
-			IInstallableUnit lifecycleUnit = (IInstallableUnit) queryMatches.toArray(IInstallableUnit.class)[0];
-			iuPatchDescription.setLifeCycle(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, lifecycleUnit.getId(), new VersionRange(lifecycleUnit.getVersion(), true, lifecycleUnit.getVersion(), true), null, false, false, false));
-		}
-
-		iuPatchDescription.setProperty(IInstallableUnit.PROP_TYPE_PATCH, Boolean.TRUE.toString());
-
-		return MetadataFactory.createInstallableUnitPatch(iuPatchDescription);
-	}
-}
+package org.eclipse.pde.internal.ui.build;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
+import org.eclipse.equinox.p2.operations.*;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.build.site.QualifierReplacer;
+import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+/**
+ * This job attempts to install a set of exported plug-ins or
+ * features into the current runtime.
+ */
+public class RuntimeInstallJob extends Job {
+
+	private FeatureExportInfo fInfo;
+	private ProvisioningUI ui;
+
+	/**
+	 * Creates a new job that will install exported plug-ins.  For a 
+	 * successful install, specific option in the feature export info
+	 * object need to be set before the export operation see 
+	 * {@link #modifyInfoForInstall(FeatureExportInfo)}
+	 * 
+	 * @param jobName the name to use for this job
+	 * @param info the info object describing what is being exported
+	 */
+	public RuntimeInstallJob(String jobName, FeatureExportInfo info) {
+		super(jobName);
+		fInfo = info;
+		// This provisioning UI manages the currently running profile.
+		ui = ProvisioningUI.getDefaultUI();
+		ui.manageJob(this, ProvisioningJob.RESTART_OR_APPLY);
+	}
+
+	/**
+	 * Sets the export options required to make the export installable.
+	 * This method should be called before the export operation takes
+	 * place.
+	 * 
+	 * @param info the feature info object that will be modified
+	 */
+	public static void modifyInfoForInstall(FeatureExportInfo info) {
+		info.exportSource = false;
+		info.useJarFormat = true;
+		info.exportMetadata = true;
+		info.qualifier = QualifierReplacer.getDateQualifier();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		try {
+			ProvisioningSession session = ui.getSession();
+			monitor.beginTask(PDEUIMessages.RuntimeInstallJob_Job_name_installing, 12 + (2 * fInfo.items.length));
+
+			// p2 needs to know about the generated repos
+			URI destination = new File(fInfo.destinationDirectory).toURI();
+			ui.loadArtifactRepository(destination, false, new SubProgressMonitor(monitor, 1));
+
+			IMetadataRepository metaRepo = ui.loadMetadataRepository(destination, false, new SubProgressMonitor(monitor, 1));
+
+			IProfileRegistry profileRegistry = (IProfileRegistry) session.getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
+			if (profileRegistry == null) {
+				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), PDEUIMessages.RuntimeInstallJob_ErrorCouldntOpenProfile);
+			}
+			IProfile profile = profileRegistry.getProfile(IProfileRegistry.SELF);
+			if (profile == null) {
+				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), PDEUIMessages.RuntimeInstallJob_ErrorCouldntOpenProfile);
+			}
+
+			List toInstall = new ArrayList();
+			for (int i = 0; i < fInfo.items.length; i++) {
+				if (monitor.isCanceled()) {
+					return Status.CANCEL_STATUS;
+				}
+				monitor.subTask(NLS.bind(PDEUIMessages.RuntimeInstallJob_Creating_installable_unit, fInfo.items[i].toString()));
+
+				//Get the installable unit from the repo
+				String id = null;
+				String version = null;
+				if (fInfo.items[i] instanceof IPluginModelBase) {
+					id = ((IPluginModelBase) fInfo.items[i]).getPluginBase().getId();
+					version = ((IPluginModelBase) fInfo.items[i]).getPluginBase().getVersion();
+				} else if (fInfo.items[i] instanceof IFeatureModel) {
+					id = ((IFeatureModel) fInfo.items[i]).getFeature().getId() + ".feature.group"; //$NON-NLS-1$
+					version = ((IFeatureModel) fInfo.items[i]).getFeature().getVersion();
+				}
+
+				if (id == null && version == null) {
+					return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.RuntimeInstallJob_ErrorCouldNotGetIdOrVersion, fInfo.items[i].toString()));
+				}
+
+				// Use the same qualifier replacement as the export operation used
+				version = QualifierReplacer.replaceQualifierInVersion(version, id, null, null);
+
+				// Check if the right version exists in the new meta repo
+				Version newVersion = Version.parseVersion(version);
+				IQueryResult queryMatches = metaRepo.query(QueryUtil.createIUQuery(id, newVersion), monitor);
+				if (queryMatches.isEmpty()) {
+					return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.RuntimeInstallJob_ErrorCouldNotFindUnitInRepo, new String[] {id, version}));
+				}
+
+				IInstallableUnit iuToInstall = (IInstallableUnit) queryMatches.iterator().next();
+
+				// Find out if the profile already has that iu installed												
+				queryMatches = profile.query(QueryUtil.createIUQuery(id), new SubProgressMonitor(monitor, 0));
+				if (queryMatches.isEmpty()) {
+					// Just install the new iu into the profile
+					toInstall.add(iuToInstall);
+				} else {
+					// There is an existing iu that we need to replace using an installable unit patch
+					IInstallableUnit existingIU = (IInstallableUnit) queryMatches.iterator().next();
+					toInstall.add(createInstallableUnitPatch(existingIU, newVersion, profile, monitor));
+				}
+				monitor.worked(2);
+
+			}
+
+			if (toInstall.size() > 0) {
+				InstallOperation operation = ui.getInstallOperation(toInstall, new URI[] {destination});
+				operation.resolveModal(new SubProgressMonitor(monitor, 5));
+				IStatus status = operation.getResolutionResult();
+				if (status.getSeverity() == IStatus.CANCEL || !(status.isOK() || status.getSeverity() == IStatus.INFO)) {
+					return status;
+				}
+				ProvisioningJob job = operation.getProvisioningJob(null);
+				status = job.runModal(new SubProgressMonitor(monitor, 5));
+				return status;
+			}
+
+			if (monitor.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+			return Status.OK_STATUS;
+
+		} catch (ProvisionException e) {
+			return e.getStatus();
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/**
+	 * Creates an installable unit patch that will change the version of
+	 * existing requirements with the given version.
+	 * 
+	 * @param existingIU an existing plug-in that this patch will replace, used to generate lifecycle
+	 * @param newVersion the new version to require
+	 * @param profile the profile we are installing in
+	 * @param monitor progress monitor
+	 * @return an installable unit patch
+	 */
+	private IInstallableUnitPatch createInstallableUnitPatch(IInstallableUnit existingIU, Version newVersion, IProfile profile, IProgressMonitor monitor) {
+		InstallableUnitPatchDescription iuPatchDescription = new MetadataFactory.InstallableUnitPatchDescription();
+		String id = existingIU.getId();
+		iuPatchDescription.setId(id + ".patch"); //$NON-NLS-1$
+		iuPatchDescription.setProperty(IInstallableUnit.PROP_NAME, NLS.bind(PDEUIMessages.RuntimeInstallJob_installPatchName, id));
+		iuPatchDescription.setProperty(IInstallableUnit.PROP_DESCRIPTION, PDEUIMessages.RuntimeInstallJob_installPatchDescription);
+		Version patchVersion = Version.createOSGi(1, 0, 0, QualifierReplacer.getDateQualifier());
+		iuPatchDescription.setVersion(patchVersion);
+		iuPatchDescription.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(iuPatchDescription.getId(), new VersionRange(Version.createOSGi(0, 0, 0), true, patchVersion, false), 0, null));
+
+		ArrayList list = new ArrayList(1);
+		list.add(MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, iuPatchDescription.getId(), iuPatchDescription.getVersion()));
+		iuPatchDescription.addProvidedCapabilities(list);
+
+		IRequirement applyTo = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, null, null, false, false);
+		IRequirement newValue = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(newVersion, true, newVersion, true), null, false, false);
+		iuPatchDescription.setRequirementChanges(new IRequirementChange[] {MetadataFactory.createRequirementChange(applyTo, newValue)});
+
+		iuPatchDescription.setApplicabilityScope(new IRequirement[0][0]);
+
+		// Locate IU's that appoint the existing version of the IU that we are patching.
+		// Add lifecycle requirement on a changed bundle, if it gets updated, then we should uninstall the patch
+		IQueryResult queryMatches = profile.query(QueryUtil.createMatchQuery("requirements.exists(rc | $0 ~= rc)", new Object[] {existingIU}), monitor); //$NON-NLS-1$
+		if (!queryMatches.isEmpty()) {
+			IInstallableUnit lifecycleUnit = (IInstallableUnit) queryMatches.iterator().next();
+			iuPatchDescription.setLifeCycle(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, lifecycleUnit.getId(), new VersionRange(lifecycleUnit.getVersion(), true, lifecycleUnit.getVersion(), true), null, false, false, false));
+		}
+
+		iuPatchDescription.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
+
+		return MetadataFactory.createInstallableUnitPatch(iuPatchDescription);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/PluginStructureCreator.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/PluginStructureCreator.java
index 1a463db..02c9de1 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/PluginStructureCreator.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/compare/PluginStructureCreator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jface.resource.*;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.text.IDocumentElementNode;
 import org.eclipse.pde.internal.core.text.plugin.*;
 import org.eclipse.pde.internal.ui.*;
@@ -128,7 +129,7 @@ public class PluginStructureCreator extends StructureCreator {
 	}
 
 	private boolean isFragment(Object input) {
-		if (input instanceof ITypedElement && ((ITypedElement) input).getName().equals("fragment.xml")) //$NON-NLS-1$
+		if (input instanceof ITypedElement && ((ITypedElement) input).getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 			return true;
 		return false;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java
index 9a4ea24..d2f26c2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,8 +13,7 @@ package org.eclipse.pde.internal.ui.correction;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.text.build.Build;
-import org.eclipse.pde.internal.core.text.build.BuildEntry;
+import org.eclipse.pde.internal.core.text.build.*;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 
 public class AddBuildEntryResolution extends BuildEntryMarkerResolution {
@@ -29,10 +28,16 @@ public class AddBuildEntryResolution extends BuildEntryMarkerResolution {
 
 	protected void createChange(Build build) {
 		try {
+			BuildModel buildModel = build.getModel();
+			if (buildModel.isStale()) {
+				buildModel.reconciled(buildModel.getDocument());
+			}
 			BuildEntry buildEntry = (BuildEntry) build.getEntry(fEntry);
 			if (buildEntry == null)
-				buildEntry = new BuildEntry(fEntry, build.getModel());
-			buildEntry.addToken(fToken);
+				buildEntry = new BuildEntry(fEntry, buildModel);
+
+			if (fToken != null)
+				buildEntry.addToken(fToken);
 		} catch (CoreException e) {
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ExternalizeResolution.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ExternalizeResolution.java
index 6c81f1b..0e89f2a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ExternalizeResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ExternalizeResolution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,9 +20,11 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDEManager;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
@@ -46,9 +48,8 @@ public class ExternalizeResolution extends AbstractXMLMarkerResolution {
 			String localization = PDEManager.getBundleLocalization(model);
 			if (localization == null)
 				addLocalization(model, localization = "plugin"); //$NON-NLS-1$
-			localization += ModelChange.LOCALIZATION_FILE_SUFFIX;
 			IProject project = model.getUnderlyingResource().getProject();
-			IFile file = project.getFile(localization);
+			IFile file = PDEProject.getLocalizationFile(project);
 			checkPropertiesFile(file);
 			try {
 				ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
@@ -99,8 +100,8 @@ public class ExternalizeResolution extends AbstractXMLMarkerResolution {
 		IFile file = ((IFile) marker.getResource());
 		ModelModification modification = null;
 		// if file we are externalizing is not manifest, try to pass manifest in if it exists
-		if (!file.getName().equals(PDEModelUtility.F_MANIFEST)) {
-			IFile manifest = file.getProject().getFile(PDEModelUtility.F_MANIFEST_FP);
+		if (!file.getName().equals(ICoreConstants.MANIFEST_FILENAME)) {
+			IFile manifest = PDEProject.getManifest(file.getProject());
 			if (manifest.exists()) {
 				modification = new ModelModification(manifest, file) {
 					protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java
new file mode 100644
index 0000000..479bcb7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ *  Copyright (c) 2009, 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.correction;
+
+import java.util.ArrayList;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
+import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
+
+/**
+ * A wrapper class to fix multiple markers of provided category. It invokes the first non-MultiFixResolution for the selected markers
+ *
+ */
+public class MultiFixResolution extends WorkbenchMarkerResolution {
+
+	IMarker fMarker;
+	String fLabel;
+	// if quick fix is invoked from editor, then fix all related markers. If invoked from problem view, fix only the selected ones.
+	boolean problemViewQuickFix;
+
+	public MultiFixResolution(IMarker marker, String label) {
+		fMarker = marker;
+		if (label != null)
+			fLabel = label;
+		else
+			fLabel = PDEUIMessages.MultiFixResolution_FixAll;
+		problemViewQuickFix = false;
+	}
+
+	public IMarker[] findOtherMarkers(IMarker[] markers) {
+		ArrayList relatedMarkers = new ArrayList();
+		try {
+			String markerCategory = (String) fMarker.getAttribute(PDEMarkerFactory.CAT_ID);
+			for (int i = 0; i < markers.length; i++) {
+				if (markerCategory.equals(markers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && !markers[i].equals(fMarker) && markers[i].getResource().equals(fMarker.getResource())) {
+					relatedMarkers.add(markers[i]);
+				}
+			}
+		} catch (CoreException e) {
+		}
+		problemViewQuickFix = true;
+		return (IMarker[]) relatedMarkers.toArray(new IMarker[relatedMarkers.size()]);
+	}
+
+	public String getDescription() {
+		return getLabel();
+	}
+
+	public Image getImage() {
+		return PDEPluginImages.DESC_ADD_ATT.createImage();
+	}
+
+	public String getLabel() {
+		return fLabel;
+	}
+
+	public void run(IMarker marker) {
+		IResource resource = marker.getResource();
+		IMarker[] markers = new IMarker[0];
+		try {
+			markers = resource.findMarkers(marker.getType(), true, IResource.DEPTH_INFINITE);
+		} catch (CoreException e) {
+		}
+		if (!problemViewQuickFix) {
+			IMarker[] otherMarkers = findOtherMarkers(markers);
+			for (int i = 0; i < otherMarkers.length; i++) {
+				fixMarker(otherMarkers[i]);
+			}
+		}
+		fixMarker(marker);
+	}
+
+	private void fixMarker(IMarker marker) {
+		ResolutionGenerator resGen = new ResolutionGenerator();
+		IMarkerResolution[] resolutions = resGen.getResolutions(marker);
+		for (int i = 0; i < resolutions.length; i++) {
+			IMarkerResolution resolution = resolutions[i];
+			if (!(resolution instanceof MultiFixResolution)) { // To avoid infinite loop
+				resolution.run(marker);
+				break;
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (!(obj instanceof MultiFixResolution))
+			return false;
+		MultiFixResolution multiFix = (MultiFixResolution) obj;
+		try {
+			String categoryId = (String) multiFix.fMarker.getAttribute(PDEMarkerFactory.CAT_ID);
+			if (categoryId == null)
+				return false;
+			return categoryId.equals(fMarker.getAttribute(PDEMarkerFactory.CAT_ID));
+		} catch (CoreException e) {
+		}
+		return false;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/RemoveBuildEntryResolution.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/RemoveBuildEntryResolution.java
index 5ca1f9c..044a3c0 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/RemoveBuildEntryResolution.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/RemoveBuildEntryResolution.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.correction;
@@ -36,8 +36,12 @@ public class RemoveBuildEntryResolution extends BuildEntryMarkerResolution {
 				return;
 			if (fToken == null)
 				build.remove(buildEntry);
-			else
+			else {
 				buildEntry.removeToken(fToken);
+				if (buildEntry.getTokens().length == 0) {
+					build.remove(buildEntry);
+				}
+			}
 		} catch (CoreException e) {
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ReplaceBuildEntryResolution.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ReplaceBuildEntryResolution.java
new file mode 100644
index 0000000..dd649c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ReplaceBuildEntryResolution.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.correction;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.text.build.Build;
+import org.eclipse.pde.internal.core.text.build.BuildEntry;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+public class ReplaceBuildEntryResolution extends BuildEntryMarkerResolution {
+
+	public ReplaceBuildEntryResolution(int type, IMarker marker) {
+		super(type, marker);
+	}
+
+	public String getLabel() {
+		return NLS.bind(PDEUIMessages.ReplaceBuildEntryResolution_replaceToken, fToken, fEntry);
+	}
+
+	protected void createChange(Build build) {
+		try {
+			BuildEntry buildEntry = (BuildEntry) build.getEntry(fEntry);
+			if (buildEntry == null)
+				return;
+			if (fToken == null)
+				build.remove(buildEntry);
+			else {
+				String[] tokens = buildEntry.getTokens();
+				for (int i = 0; i < tokens.length; i++) {
+					buildEntry.removeToken(tokens[i]);
+				}
+				buildEntry.addToken(fToken);
+			}
+		} catch (CoreException e) {
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java
index 350f469..82d88ca 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,11 +13,14 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.correction;
 
+import java.util.ArrayList;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
 import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.IMarkerResolutionGenerator2;
 import org.osgi.framework.Constants;
@@ -76,12 +79,16 @@ public class ResolutionGenerator implements IMarkerResolutionGenerator2 {
 				return new IMarkerResolution[] {new RemoveSeperatorBuildEntryResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)};
 			case PDEMarkerFactory.B_APPEND_SLASH_FOLDER_ENTRY :
 				return new IMarkerResolution[] {new AppendSeperatorBuildEntryResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)};
-			case PDEMarkerFactory.B_ADDDITION :
-				return new IMarkerResolution[] {new AddBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker)};
+			case PDEMarkerFactory.B_ADDITION :
+				return getBuildEntryAdditionResolutions(marker, null);
+			case PDEMarkerFactory.B_JAVA_ADDDITION :
+				return getBuildEntryAdditionResolutions(marker, PDEUIMessages.MultiFixResolution_JavaFixAll);
 			case PDEMarkerFactory.B_SOURCE_ADDITION :
 				return new IMarkerResolution[] {new AddSourceBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker)};
 			case PDEMarkerFactory.B_REMOVAL :
 				return new IMarkerResolution[] {new RemoveBuildEntryResolution(AbstractPDEMarkerResolution.REMOVE_TYPE, marker)};
+			case PDEMarkerFactory.B_REPLACE :
+				return new IMarkerResolution[] {new ReplaceBuildEntryResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)};
 			case PDEMarkerFactory.P_ILLEGAL_XML_NODE :
 				return new IMarkerResolution[] {new RemoveNodeXMLResolution(AbstractPDEMarkerResolution.REMOVE_TYPE, marker)};
 			case PDEMarkerFactory.P_UNTRANSLATED_NODE :
@@ -102,6 +109,24 @@ public class ResolutionGenerator implements IMarkerResolutionGenerator2 {
 		return NO_RESOLUTIONS;
 	}
 
+	private IMarkerResolution[] getBuildEntryAdditionResolutions(IMarker marker, String multiFixDescription) {
+		ArrayList resolutions = new ArrayList(2);
+		resolutions.add(new AddBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker));
+		try {
+			String markerCategory = (String) marker.getAttribute(PDEMarkerFactory.CAT_ID);
+			int problemID = marker.getAttribute("id", PDEMarkerFactory.NO_RESOLUTION); //$NON-NLS-1$
+			IMarker[] relatedMarkers = marker.getResource().findMarkers(marker.getType(), true, IResource.DEPTH_INFINITE);
+			for (int i = 0; i < relatedMarkers.length; i++) {
+				if (markerCategory.equals(relatedMarkers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && relatedMarkers[i].getAttribute("id", PDEMarkerFactory.NO_RESOLUTION) == problemID && !marker.equals(relatedMarkers[i])) { //$NON-NLS-1$
+					resolutions.add(new MultiFixResolution(marker, multiFixDescription));
+					break;
+				}
+			}
+		} catch (CoreException e) {
+		}
+		return (IMarkerResolution[]) resolutions.toArray(new IMarkerResolution[resolutions.size()]);
+	}
+
 	private IMarkerResolution[] getRemoveInternalDirectiveResolution(IMarker marker) {
 		String packageName = marker.getAttribute("packageName", (String) null); //$NON-NLS-1$
 		if (packageName != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/JavaResolutionFactory.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/JavaResolutionFactory.java
index 9292648..b3b70a5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/JavaResolutionFactory.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/JavaResolutionFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.plugin.IPluginImport;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.bundle.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.util.ModelModification;
@@ -185,11 +185,10 @@ public class JavaResolutionFactory {
 		 * @see org.eclipse.pde.internal.ui.correction.java.JavaResolutionFactory.AbstractManifestChange#getModifiedElement()
 		 */
 		public Object getModifiedElement() {
-			IPath[] paths = new IPath[] {ICoreConstants.MANIFEST_PATH, ICoreConstants.PLUGIN_PATH};
-			for (int i = 0; i < paths.length; i++) {
-				IFile file = getProject().getFile(ICoreConstants.MANIFEST_PATH);
-				if (file.exists())
-					return file;
+			IFile[] files = new IFile[] {PDEProject.getManifest(getProject()), PDEProject.getPluginXml(getProject())};
+			for (int i = 0; i < files.length; i++) {
+				if (files[i].exists())
+					return files[i];
 			}
 			return super.getModifiedElement();
 		}
@@ -272,7 +271,7 @@ public class JavaResolutionFactory {
 		 * @see org.eclipse.pde.internal.ui.correction.java.JavaResolutionFactory.AbstractManifestChange#getModifiedElement()
 		 */
 		public Object getModifiedElement() {
-			IFile file = getProject().getFile(ICoreConstants.MANIFEST_PATH);
+			IFile file = PDEProject.getManifest(getProject());
 			if (file.exists())
 				return file;
 			return super.getModifiedElement();
@@ -331,7 +330,7 @@ public class JavaResolutionFactory {
 		 * @see org.eclipse.pde.internal.ui.correction.java.JavaResolutionFactory.AbstractManifestChange#getModifiedElement()
 		 */
 		public Object getModifiedElement() {
-			IFile file = getProject().getFile(ICoreConstants.MANIFEST_PATH);
+			IFile file = PDEProject.getManifest(getProject());
 			if (file.exists())
 				return file;
 			return super.getModifiedElement();
@@ -377,6 +376,10 @@ public class JavaResolutionFactory {
 		return createWrapper(change, type, relevance);
 	}
 
+	public static final IJavaCompletionProposal createSearchRepositoriesProposal(String packageName) {
+		return new SearchRepositoriesForIUProposal(packageName);
+	}
+
 	/**
 	 * Creates and returns a proposal which create an Export-Package entry in the MANIFEST.MF for the package represented by 
 	 * pkg.  The object will be of the type specified by the type argument.
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/QuickFixProcessor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/QuickFixProcessor.java
index 2df36c6..6cf7048 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/QuickFixProcessor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/QuickFixProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,6 +163,10 @@ public class QuickFixProcessor implements IQuickFixProcessor {
 
 				String className = ((ImportDeclaration) node).getName().getFullyQualifiedName();
 
+				// always add the search repositories proposal
+				String packageName = className.substring(0, className.lastIndexOf('.'));
+				result.add(JavaResolutionFactory.createSearchRepositoriesProposal(packageName));
+
 				// create a collector that will create IJavaCompletionProposals and load them into 'result'
 				AbstractClassResolutionCollector collector = createCollector(result);
 				IRunnableWithProgress findOperation = new FindClassResolutionsOperation(project, className, collector);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/SearchRepositoriesForIUProposal.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/SearchRepositoriesForIUProposal.java
new file mode 100644
index 0000000..2ad6e73
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/java/SearchRepositoriesForIUProposal.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2010 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.correction.java;
+
+import org.eclipse.core.commands.*;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
+
+public class SearchRepositoriesForIUProposal implements IJavaCompletionProposal {
+
+	private String fPackageName;
+
+	public SearchRepositoriesForIUProposal(String packageName) {
+		fPackageName = packageName;
+	}
+
+	public int getRelevance() {
+		return 0;
+	}
+
+	public void apply(IDocument document) {
+		try {
+			IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
+			ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+			Command command = commandService.getCommand("org.eclipse.pde.ui.searchTargetRepositories"); //$NON-NLS-1$
+			IParameter parameter = command.getParameter("org.eclipse.pde.ui.searchTargetRepositories.term"); //$NON-NLS-1$
+			Parameterization parameterization = new Parameterization(parameter, fPackageName);
+			ParameterizedCommand pc = new ParameterizedCommand(command, new Parameterization[] {parameterization});
+			handlerService.executeCommand(pc, null);
+		} catch (ExecutionException e) {
+			PDEPlugin.log(e);
+		} catch (NotDefinedException e) {
+			PDEPlugin.log(e);
+		} catch (NotEnabledException e) {
+			PDEPlugin.log(e);
+		} catch (NotHandledException e) {
+			PDEPlugin.log(e);
+		}
+	}
+
+	public String getAdditionalProposalInfo() {
+		return NLS.bind(PDEUIMessages.SearchRepositoriesForIUProposal_description, fPackageName);
+	}
+
+	public IContextInformation getContextInformation() {
+		return null;
+	}
+
+	public String getDisplayString() {
+		return NLS.bind(PDEUIMessages.SearchRepositoriesForIUProposal_message, fPackageName);
+	}
+
+	public Image getImage() {
+		return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_SITE_OBJ);
+	}
+
+	public Point getSelection(IDocument document) {
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/OpenManifestAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/OpenManifestAction.java
index ddff653..c40dde8 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/OpenManifestAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/OpenManifestAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.WorkspaceModelManager;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.ui.*;
@@ -67,11 +67,11 @@ public class OpenManifestAction implements IWorkbenchWindowActionDelegate {
 						Iterator it = projects.iterator();
 						while (it.hasNext()) {
 							IProject project = (IProject) it.next();
-							IFile file = project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+							IFile file = PDEProject.getManifest(project);
 							if (file == null || !file.exists())
-								file = project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
+								file = PDEProject.getPluginXml(project);
 							if (file == null || !file.exists())
-								file = project.getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
+								file = PDEProject.getFragmentXml(project);
 							if (file == null || !file.exists())
 								MessageDialog.openError(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.OpenManifestsAction_title, NLS.bind(PDEUIMessages.OpenManifestsAction_cannotFind, project.getName()));
 							else
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormPage.java
index 1ce42da..0aae6b1 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEFormPage.java
@@ -22,7 +22,8 @@ import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.*;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.custom.CTabFolder;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
@@ -79,15 +80,11 @@ public abstract class PDEFormPage extends FormPage {
 
 		getPDEEditor().contributeToToolbar(manager);
 
-		final String href = getHelpResource();
-		if (href != null) {
+		final String helpContextID = getHelpResource();
+		if (helpContextID != null) {
 			Action helpAction = new Action("help") { //$NON-NLS-1$
 				public void run() {
-					BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
-						public void run() {
-							PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(href);
-						}
-					});
+					PlatformUI.getWorkbench().getHelpSystem().displayHelp(helpContextID);
 				}
 			};
 			helpAction.setToolTipText(PDEUIMessages.PDEFormPage_help);
@@ -114,6 +111,12 @@ public abstract class PDEFormPage extends FormPage {
 		return (PDEFormEditor) getEditor();
 	}
 
+	/**
+	 * Return a help context id to have the help button at the top right of the form page open
+	 * the dynamic help for the page.
+	 * 
+	 * @return a help context id or <code>null</code>
+	 */
 	protected String getHelpResource() {
 		return null;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
index 8923e7a..2ead10b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDELauncherFormEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
 package org.eclipse.pde.internal.ui.editor;
 
 import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.*;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.ui.ILaunchShortcut;
@@ -18,6 +20,7 @@ import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
 import org.eclipse.pde.internal.ui.editor.actions.ActionMenu;
 
@@ -67,7 +70,7 @@ public abstract class PDELauncherFormEditor extends MultiSourceEditor {
 		for (int i = 0; i < elements.length; i++) {
 			String label = elements[i].getAttribute("label"); //$NON-NLS-1$
 			final String thisLaunchShortcut = getLaunchString(elements[i]);
-			Action thisAction = new Action(label) { 
+			Action thisAction = new Action(label) {
 				public void run() {
 					doSave(null);
 					launch(thisLaunchShortcut, getPreLaunchRunnable(), getLauncherHelper().getLaunchObject());
@@ -142,16 +145,40 @@ public abstract class PDELauncherFormEditor extends MultiSourceEditor {
 		ArrayList runList = new ArrayList();
 		ArrayList debugList = new ArrayList();
 		ArrayList profileList = new ArrayList();
+		// limit to specific shortcuts based on project settings (if specified)
+		IResource resource = (IResource) getEditorInput().getAdapter(IResource.class);
+		Set specificIds = null;
+		if (resource != null) {
+			IProject project = resource.getProject();
+			if (project != null) {
+				String[] values = PDEProject.getLaunchShortcuts(project);
+				if (values != null) {
+					specificIds = new HashSet();
+					for (int i = 0; i < values.length; i++) {
+						specificIds.add(values[i]);
+					}
+				}
+			}
+		}
 		for (int i = 0; i < elements.length; i++) {
 			String mode = elements[i].getAttribute("mode"); //$NON-NLS-1$
-			if (mode != null && elements[i].getAttribute("label") != null && elements[i].getAttribute("id") != null && //$NON-NLS-1$ //$NON-NLS-2$
-					osgi == "true".equals(elements[i].getAttribute("osgi"))) { //$NON-NLS-1$ //$NON-NLS-2$
-				if (mode.equals(ILaunchManager.RUN_MODE))
-					runList.add(elements[i]);
-				else if (mode.equals(ILaunchManager.DEBUG_MODE))
-					debugList.add(elements[i]);
-				else if (mode.equals(ILaunchManager.PROFILE_MODE))
-					profileList.add(elements[i]);
+			String id = elements[i].getAttribute("id"); //$NON-NLS-1$
+			String projectSpecific = elements[i].getAttribute("projectSpecific"); //$NON-NLS-1$
+			if (mode != null && elements[i].getAttribute("label") != null && id != null) { //$NON-NLS-1$
+				boolean include = false;
+				if (specificIds != null) {
+					include = specificIds.contains(id);
+				} else {
+					include = osgi == "true".equals(elements[i].getAttribute("osgi")) && !"true".equals(projectSpecific); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+				}
+				if (include) {
+					if (mode.equals(ILaunchManager.RUN_MODE))
+						runList.add(elements[i]);
+					else if (mode.equals(ILaunchManager.DEBUG_MODE))
+						debugList.add(elements[i]);
+					else if (mode.equals(ILaunchManager.PROFILE_MODE))
+						profileList.add(elements[i]);
+				}
 			}
 		}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEMultiPageContentOutline.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEMultiPageContentOutline.java
index a1e38a0..91f4c8c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEMultiPageContentOutline.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/PDEMultiPageContentOutline.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.pde.internal.ui.editor;
 import java.util.ArrayList;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusListener;
@@ -24,7 +25,7 @@ import org.eclipse.ui.part.Page;
 import org.eclipse.ui.part.PageBook;
 import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
 
-public class PDEMultiPageContentOutline extends Page implements IContentOutlinePage, ISelectionProvider, ISelectionChangedListener, IPreferenceConstants {
+public class PDEMultiPageContentOutline extends Page implements IContentOutlinePage, ISelectionProvider, ISelectionChangedListener, ILaunchingPreferenceConstants {
 	private PageBook pagebook;
 	private ISelection selection;
 	private ArrayList listeners;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BinSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BinSection.java
index 5fdb47c..3d189ae 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BinSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BinSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -53,7 +53,7 @@ public class BinSection extends BuildContentsSection implements IModelChangedLis
 
 	protected void handleBuildCheckStateChange(boolean wasTopParentChecked) {
 		IResource resource = fParentResource;
-		String resourceName = fParentResource.getProjectRelativePath().toString();
+		String resourceName = fParentResource.getProjectRelativePath().makeRelativeTo(fBundleRoot.getProjectRelativePath()).toPortableString();
 		IBuild build = fBuildModel.getBuild();
 		IBuildEntry includes = build.getEntry(IBuildPropertiesConstants.PROPERTY_BIN_INCLUDES);
 		IBuildEntry excludes = build.getEntry(IBuildPropertiesConstants.PROPERTY_BIN_EXCLUDES);
@@ -89,7 +89,7 @@ public class BinSection extends BuildContentsSection implements IModelChangedLis
 					if (event.getNewValue().equals(".")) //$NON-NLS-1$
 						return;
 					// adding token
-					IFile file = fProject.getFile(new Path(event.getNewValue().toString()));
+					IFile file = fBundleRoot.getFile(new Path(event.getNewValue().toString()));
 					if (!file.exists())
 						return;
 					fParentResource = fOriginalResource = file;
@@ -98,7 +98,7 @@ public class BinSection extends BuildContentsSection implements IModelChangedLis
 					if (event.getOldValue().equals(".")) //$NON-NLS-1$
 						return;
 					// removing token
-					IFile file = fProject.getFile(new Path(event.getOldValue().toString()));
+					IFile file = fBundleRoot.getFile(new Path(event.getOldValue().toString()));
 					if (!file.exists())
 						return;
 					fParentResource = fOriginalResource = file;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
index b5b9d03..c7f13fc 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildContentsSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,14 +13,14 @@ package org.eclipse.pde.internal.ui.editor.build;
 
 import java.util.*;
 import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.pde.core.IModelChangedEvent;
 import org.eclipse.pde.core.IModelChangedListener;
 import org.eclipse.pde.core.build.*;
 import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.context.InputContext;
@@ -37,7 +37,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 
 	protected CheckboxTreeViewer fTreeViewer;
 	private boolean fDoRefresh = false;
-	protected IProject fProject;
+	protected IContainer fBundleRoot;
 	protected IBuildModel fBuildModel;
 	protected IResource fOriginalResource, fParentResource;
 	protected boolean isChecked;
@@ -45,9 +45,9 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 	public class TreeContentProvider extends DefaultContentProvider implements ITreeContentProvider {
 
 		public Object[] getElements(Object parent) {
-			if (parent instanceof IProject) {
+			if (parent instanceof IContainer) {
 				try {
-					return ((IProject) parent).members();
+					return ((IContainer) parent).members();
 				} catch (CoreException e) {
 					PDEPlugin.logException(e);
 				}
@@ -143,7 +143,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 		Composite container = createClientContainer(section, 2, toolkit);
 		fBuildModel = getBuildModel();
 		if (fBuildModel.getUnderlyingResource() != null)
-			fProject = fBuildModel.getUnderlyingResource().getProject();
+			fBundleRoot = PDEProject.getBundleRoot(fBuildModel.getUnderlyingResource().getProject());
 
 		fTreeViewer = new CheckboxTreeViewer(toolkit.createTree(container, SWT.CHECK));
 		fTreeViewer.setContentProvider(new TreeContentProvider());
@@ -196,7 +196,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 
 	protected IResource handleAllUnselected(IResource resource, String name) {
 		IResource parent = resource.getParent();
-		if (parent == resource.getProject()) {
+		if (parent.equals(fBundleRoot)) {
 			return resource;
 		}
 		try {
@@ -259,7 +259,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 							return;
 						Vector fileExt = new Vector();
 						String[] inclTokens, exclTokens = new String[0];
-						if (fProject == null || includes == null)
+						if (fBundleRoot == null || includes == null)
 							return;
 						inclTokens = includes.getTokens();
 						if (excludes != null)
@@ -276,7 +276,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 							if (resource.equals(".") || resource.equals("./") || resource.equals(".\\")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 								// ignore - should be root directory
 							} else if (resource.lastIndexOf(IPath.SEPARATOR) == resource.length() - 1) {
-								IFolder folder = fProject.getFolder(resource);
+								IFolder folder = fBundleRoot.getFolder(new Path(resource));
 								if (!folder.exists())
 									continue;
 								fTreeViewer.setSubtreeChecked(folder, isIncluded);
@@ -289,7 +289,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 								if (isIncluded)
 									fileExt.add(resource.substring(2));
 							} else {
-								IFile file = fProject.getFile(resource);
+								IFile file = fBundleRoot.getFile(new Path(resource));
 								if (!file.exists())
 									continue;
 								fTreeViewer.setChecked(file, isIncluded);
@@ -303,7 +303,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 						if (fileExt.size() == 0)
 							return;
 						try {
-							IResource[] members = fProject.members();
+							IResource[] members = fBundleRoot.members();
 							for (int i = 0; i < members.length; i++) {
 								if (!(members[i] instanceof IFolder) && (fileExt.contains(members[i].getFileExtension()))) {
 									fTreeViewer.setChecked(members[i], includes.contains("*." //$NON-NLS-1$
@@ -369,7 +369,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 				if (includes.contains(resourceName))
 					includes.removeToken(resourceName);
 				if (includes.contains("*." + resource.getFileExtension())) { //$NON-NLS-1$
-					IResource[] members = fProject.members();
+					IResource[] members = fBundleRoot.members();
 					for (int i = 0; i < members.length; i++) {
 						if (!(members[i] instanceof IFolder) && !members[i].getName().equals(resource.getName()) && (resource.getFileExtension().equals(members[i].getFileExtension()))) {
 							includes.addToken(members[i].getName());
@@ -379,7 +379,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 								&& libraries.length != 0) {
 							for (int j = 0; j < libraries.length; j++) {
 								String libName = libraries[j].getName().substring(7);
-								IPath path = fProject.getFile(libName).getProjectRelativePath();
+								IPath path = fBundleRoot.getFile(new Path(libName)).getProjectRelativePath().makeRelativeTo(fBundleRoot.getProjectRelativePath());
 								if (path.segmentCount() == 1 && !includes.contains(libName) && !libName.equals(resource.getName()))
 									includes.addToken(libName);
 							}
@@ -416,7 +416,7 @@ public abstract class BuildContentsSection extends TableSection implements IMode
 	public void initialize() {
 		if (fTreeViewer.getInput() == null) {
 			fTreeViewer.setUseHashlookup(true);
-			fTreeViewer.setInput(fProject);
+			fTreeViewer.setInput(fBundleRoot);
 		}
 		fBuildModel.addModelChangedListener(this);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildEditor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildEditor.java
index 2c8ee82..1600ad3 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.pde.internal.ui.editor.build;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.pde.core.build.IBuildModel;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.build.IBuildObject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.*;
@@ -57,7 +58,7 @@ public class BuildEditor extends MultiSourceEditor {
 		if (fInputContextManager == null)
 			return;
 		String name = file.getName();
-		if (name.equalsIgnoreCase("build.properties")) { //$NON-NLS-1$
+		if (name.equalsIgnoreCase(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			if (!fInputContextManager.hasContext(BuildInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new BuildInputContext(this, in, false));
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildPage.java
index c852326..ce8a734 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.build;
@@ -46,7 +46,7 @@ public class BuildPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/build.htm"; //$NON-NLS-1$
+		return IHelpContextIds.BUILD_PAGE;
 	}
 
 	protected void createFormContent(IManagedForm mform) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildSourcePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildSourcePage.java
index 7b74f28..a21b357 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildSourcePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/BuildSourcePage.java
@@ -30,6 +30,8 @@ import org.eclipse.pde.internal.ui.editor.text.ChangeAwareSourceViewerConfigurat
 import org.eclipse.pde.internal.ui.editor.text.IColorManager;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.ChainedPreferenceStore;
 
 public class BuildSourcePage extends KeyValueSourcePage {
 	class BuildOutlineContentProvider extends DefaultContentProvider implements ITreeContentProvider {
@@ -148,7 +150,9 @@ public class BuildSourcePage extends KeyValueSourcePage {
 
 	protected ChangeAwareSourceViewerConfiguration createSourceViewerConfiguration(IColorManager colorManager) {
 		IPreferenceStore store = PreferenceConstants.getPreferenceStore();
-		this.setPreferenceStore(store);
-		return new BuildSourceViewerConfiguration(colorManager, store, this);
+		IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore();
+		IPreferenceStore combinedStore = new ChainedPreferenceStore(new IPreferenceStore[] {store, generalTextStore});
+		this.setPreferenceStore(combinedStore);
+		return new BuildSourceViewerConfiguration(colorManager, combinedStore, this);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/SrcSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/SrcSection.java
index d375649..8f3378e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/SrcSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/build/SrcSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -54,7 +54,7 @@ public class SrcSection extends BuildContentsSection implements IModelChangedLis
 
 	protected void handleBuildCheckStateChange(boolean wasTopParentChecked) {
 		IResource resource = fParentResource;
-		String resourceName = fParentResource.getFullPath().removeFirstSegments(1).toString();
+		String resourceName = fParentResource.getProjectRelativePath().makeRelativeTo(fBundleRoot.getProjectRelativePath()).toPortableString();
 		IBuild build = fBuildModel.getBuild();
 		IBuildEntry includes = build.getEntry(IBuildPropertiesConstants.PROPERTY_SRC_INCLUDES);
 		IBuildEntry excludes = build.getEntry(IBuildPropertiesConstants.PROPERTY_SRC_EXCLUDES);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/FeaturesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/FeaturesPage.java
index e137aba..f21fcfb 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/FeaturesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/category/FeaturesPage.java
@@ -93,6 +93,6 @@ public class FeaturesPage extends PDEFormPage {
 	}
 
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/category_editor/definition_page.htm"; //$NON-NLS-1$
+		return IHelpContextIds.CATEGORY_EDITOR;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/TypeCompletionProposal.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/TypeCompletionProposal.java
index 176e595..bc80b82 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/TypeCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/TypeCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,21 +7,21 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Peter Friese <peter.friese at itemis.de> - bug 215314
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.contentassist;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.internal.text.html.BrowserInformationControl;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.text.*;
 import org.eclipse.jface.text.contentassist.*;
-import org.eclipse.pde.internal.ui.editor.contentassist.display.BrowserInformationControl;
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.editors.text.EditorsUI;
 
-public class TypeCompletionProposal implements ICompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension5 {
+public class TypeCompletionProposal implements ICompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension4, ICompletionProposalExtension5 {
 
 	protected String fReplacementString;
 	protected Image fImage;
@@ -112,9 +112,6 @@ public class TypeCompletionProposal implements ICompletionProposal, ICompletionP
 	}
 
 	public IInformationControlCreator getInformationControlCreator() {
-		if (!BrowserInformationControl.isAvailable(null))
-			return null;
-
 		if (fCreator == null) {
 			fCreator = new AbstractReusableInformationControlCreator() {
 
@@ -122,7 +119,9 @@ public class TypeCompletionProposal implements ICompletionProposal, ICompletionP
 				 * @see org.eclipse.jdt.internal.ui.text.java.hover.AbstractReusableInformationControlCreator#doCreateInformationControl(org.eclipse.swt.widgets.Shell)
 				 */
 				public IInformationControl doCreateInformationControl(Shell parent) {
-					return new BrowserInformationControl(parent, SWT.NO_TRIM | SWT.TOOL, SWT.NONE, EditorsUI.getTooltipAffordanceString());
+					if (BrowserInformationControl.isAvailable(parent))
+						return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, false);
+					return new DefaultInformationControl(parent, false);
 				}
 			};
 		}
@@ -137,4 +136,11 @@ public class TypeCompletionProposal implements ICompletionProposal, ICompletionP
 		return fReplacementString;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension4#isAutoInsertable()
+	 */
+	public boolean isAutoInsertable() {
+		return true;
+	}
+
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLCompletionProposal.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLCompletionProposal.java
index 7b3f32b..f1aa923 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLCompletionProposal.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/XMLCompletionProposal.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,9 @@ import java.util.HashSet;
 import java.util.Stack;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.internal.text.html.BrowserInformationControl;
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.text.*;
 import org.eclipse.jface.text.contentassist.*;
 import org.eclipse.pde.core.IBaseModel;
@@ -26,16 +29,13 @@ import org.eclipse.pde.internal.core.text.plugin.PluginAttribute;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.editor.PDESourcePage;
-import org.eclipse.pde.internal.ui.editor.contentassist.display.BrowserInformationControl;
-import org.eclipse.pde.internal.ui.editor.text.HTMLPrinter;
 import org.eclipse.pde.internal.ui.editor.text.XMLUtil;
 import org.eclipse.pde.internal.ui.util.TextUtil;
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.Shell;
 
-public class XMLCompletionProposal implements ICompletionProposal, ICompletionProposalExtension5, ICompletionProposalExtension3 {
+public class XMLCompletionProposal implements ICompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension4, ICompletionProposalExtension5 {
 
 	private static final String F_DEF_ATTR_INDENT = "      "; //$NON-NLS-1$
 
@@ -106,7 +106,6 @@ public class XMLCompletionProposal implements ICompletionProposal, ICompletionPr
 	 * @param delim
 	 * @param documentInsertBuffer
 	 * @param doInternalWork
-	 * @return
 	 */
 	private boolean applyVirtual(IDocument document, ITextSelection sel, String delim, StringBuffer documentInsertBuffer, boolean doInternalWork) {
 		int type = ((VirtualSchemaObject) fSchemaObject).getVType();
@@ -519,13 +518,12 @@ public class XMLCompletionProposal implements ICompletionProposal, ICompletionPr
 	}
 
 	public IInformationControlCreator getInformationControlCreator() {
-		if (!BrowserInformationControl.isAvailable(null))
-			return null;
-
 		if (fCreator == null) {
 			fCreator = new AbstractReusableInformationControlCreator() {
 				public IInformationControl doCreateInformationControl(Shell parent) {
-					return new BrowserInformationControl(parent, SWT.NO_TRIM | SWT.TOOL, SWT.NONE);
+					if (BrowserInformationControl.isAvailable(parent))
+						return new BrowserInformationControl(parent, JFaceResources.DIALOG_FONT, false);
+					return new DefaultInformationControl(parent, false);
 				}
 			};
 		}
@@ -540,4 +538,11 @@ public class XMLCompletionProposal implements ICompletionProposal, ICompletionPr
 		return null;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension4#isAutoInsertable()
+	 */
+	public boolean isAutoInsertable() {
+		return true;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/BrowserInformationControl.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/BrowserInformationControl.java
deleted file mode 100644
index def14f1..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/BrowserInformationControl.java
+++ /dev/null
@@ -1,563 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2006, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.pde.internal.ui.editor.contentassist.display;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Iterator;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.jface.text.*;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.editor.text.HTMLPrinter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Displays textual information in a {@link org.eclipse.swt.browser.Browser}
- * widget.
- *
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- * <p>
- * Current problems:
- * - the size computation is too small
- * - focusLost event is not sent (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532)
- * </p>
- *
- * @since 3.1
- */
-public class BrowserInformationControl implements IInformationControl, IInformationControlExtension, IInformationControlExtension3, DisposeListener {
-
-	/**
-	 * Tells whether the SWT Browser widget and hence this information
-	 * control is available.
-	 *
-	 * @param parent the parent component used for checking or <code>null</code> if none
-	 * @return <code>true</code> if this control is available
-	 */
-	public static boolean isAvailable(Composite parent) {
-		if (!fgAvailabilityChecked) {
-			try {
-				if (parent == null)
-					parent = PDEPlugin.getActiveWorkbenchShell();
-				if (parent == null)
-					return false; // don't store this value - try again later
-
-				Browser browser = new Browser(parent, SWT.NONE);
-				browser.dispose();
-				fgIsAvailable = true;
-			} catch (SWTError er) {
-				fgIsAvailable = false;
-			} finally {
-				fgAvailabilityChecked = true;
-			}
-		}
-
-		return fgIsAvailable;
-	}
-
-	/** Border thickness in pixels. */
-	private static final int BORDER = 1;
-
-	/**
-	 * Minimal size constraints.
-	 * @since 3.2
-	 */
-	private static final int MIN_WIDTH = 80;
-	private static final int MIN_HEIGHT = 80;
-
-	/**
-	 * Availability checking cache.
-	 */
-	private static boolean fgIsAvailable = false;
-	private static boolean fgAvailabilityChecked = false;
-
-	/** The control's shell */
-	private Shell fShell;
-	/** The control's browser widget */
-	private Browser fBrowser;
-	/** Tells whether the browser has content */
-	private boolean fBrowserHasContent;
-	/** The control width constraint */
-	private int fMaxWidth = -1;
-	/** The control height constraint */
-	private int fMaxHeight = -1;
-	private Font fStatusTextFont;
-	private Label fStatusTextField;
-	private String fStatusFieldText;
-	private boolean fHideScrollBars;
-	private Listener fDeactivateListener;
-	private ListenerList fFocusListeners = new ListenerList();
-	private Label fSeparator;
-	private String fInputText;
-	private TextLayout fTextLayout;
-
-	private TextStyle fBoldStyle;
-
-	/**
-	 * Creates a default information control with the given shell as parent. The given
-	 * information presenter is used to process the information to be displayed. The given
-	 * styles are applied to the created styled text widget.
-	 *
-	 * @param parent the parent shell
-	 * @param shellStyle the additional styles for the shell
-	 * @param style the additional styles for the styled text widget
-	 */
-	public BrowserInformationControl(Shell parent, int shellStyle, int style) {
-		this(parent, shellStyle, style, null);
-	}
-
-	/**
-	 * Creates a default information control with the given shell as parent. The given
-	 * information presenter is used to process the information to be displayed. The given
-	 * styles are applied to the created styled text widget.
-	 *
-	 * @param parent the parent shell
-	 * @param shellStyle the additional styles for the shell
-	 * @param style the additional styles for the styled text widget
-	 * @param statusFieldText the text to be used in the optional status field
-	 *                         or <code>null</code> if the status field should be hidden
-	 */
-	public BrowserInformationControl(Shell parent, int shellStyle, int style, String statusFieldText) {
-		fStatusFieldText = statusFieldText;
-
-		fShell = new Shell(parent, SWT.NO_FOCUS | SWT.ON_TOP | shellStyle);
-		Display display = fShell.getDisplay();
-		fShell.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
-
-		Composite composite = fShell;
-		GridLayout layout = new GridLayout(1, false);
-		int border = ((shellStyle & SWT.NO_TRIM) == 0) ? 0 : BORDER;
-		layout.marginHeight = border;
-		layout.marginWidth = border;
-		composite.setLayout(layout);
-
-		if (statusFieldText != null) {
-			composite = new Composite(composite, SWT.NONE);
-			layout = new GridLayout(1, false);
-			layout.marginHeight = 0;
-			layout.marginWidth = 0;
-			layout.verticalSpacing = 1;
-			layout.horizontalSpacing = 1;
-			composite.setLayout(layout);
-
-			GridData gd = new GridData(GridData.FILL_BOTH);
-			composite.setLayoutData(gd);
-
-			composite.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-			composite.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-		}
-
-		// Browser field
-		fBrowser = new Browser(composite, SWT.NONE);
-
-		// Disable javascript for security reasons, see bug 265808
-		fBrowser.setJavascriptEnabled(false);
-
-		fHideScrollBars = (style & SWT.V_SCROLL) == 0 && (style & SWT.H_SCROLL) == 0;
-
-		GridData gd = new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
-		fBrowser.setLayoutData(gd);
-
-		fBrowser.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-		fBrowser.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-		fBrowser.addKeyListener(new KeyListener() {
-
-			public void keyPressed(KeyEvent e) {
-				if (e.character == 0x1B) // ESC
-					fShell.dispose();
-			}
-
-			public void keyReleased(KeyEvent e) {
-			}
-		});
-		/*
-		 * XXX revisit when the Browser support is better 
-		 * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=107629. Choosing a link to a
-		 * non-available target will show an error dialog behind the ON_TOP shell that seemingly
-		 * blocks the workbench. Disable links completely for now.
-		 */
-		fBrowser.addLocationListener(new LocationAdapter() {
-			/*
-			 * @see org.eclipse.swt.browser.LocationAdapter#changing(org.eclipse.swt.browser.LocationEvent)
-			 */
-			public void changing(LocationEvent event) {
-				String location = event.location;
-				if (!"about:blank".equals(location)) //$NON-NLS-1$
-					event.doit = false;
-			}
-		});
-
-		// Replace browser's built-in context menu with none
-		fBrowser.setMenu(new Menu(fShell, SWT.NONE));
-
-		// Status field
-		if (statusFieldText != null) {
-
-			fSeparator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.LINE_DOT);
-			fSeparator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-			// Status field label
-			fStatusTextField = new Label(composite, SWT.RIGHT);
-			fStatusTextField.setText(statusFieldText);
-			Font font = fStatusTextField.getFont();
-			FontData[] fontDatas = font.getFontData();
-			for (int i = 0; i < fontDatas.length; i++)
-				fontDatas[i].setHeight(fontDatas[i].getHeight() * 9 / 10);
-			fStatusTextFont = new Font(fStatusTextField.getDisplay(), fontDatas);
-			fStatusTextField.setFont(fStatusTextFont);
-			gd = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
-			fStatusTextField.setLayoutData(gd);
-
-			fStatusTextField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
-
-			fStatusTextField.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-		}
-
-		addDisposeListener(this);
-		createTextLayout();
-	}
-
-	/**
-	 * Creates a default information control with the given shell as parent. The given
-	 * information presenter is used to process the information to be displayed. The given
-	 * styles are applied to the created styled text widget.
-	 *
-	 * @param parent the parent shell
-	 * @param style the additional styles for the browser widget
-	 */
-	public BrowserInformationControl(Shell parent, int style) {
-		this(parent, SWT.TOOL | SWT.NO_TRIM, style);
-	}
-
-	/**
-	 * Creates a default information control with the given shell as parent.
-	 * No information presenter is used to process the information
-	 * to be displayed. No additional styles are applied to the styled text widget.
-	 *
-	 * @param parent the parent shell
-	 */
-	public BrowserInformationControl(Shell parent) {
-		this(parent, SWT.NONE);
-	}
-
-	/*
-	 * @see IInformationControl#setInformation(String)
-	 */
-	public void setInformation(String content) {
-		fBrowserHasContent = content != null && content.length() > 0;
-
-		if (!fBrowserHasContent)
-			content = "<html><body ></html>"; //$NON-NLS-1$
-
-		fInputText = content;
-
-		int shellStyle = fShell.getStyle();
-		boolean RTL = (shellStyle & SWT.RIGHT_TO_LEFT) != 0;
-
-		String[] styles = null;
-		if (RTL && !fHideScrollBars)
-			styles = new String[] {"direction:rtl;", "word-wrap:break-word;"}; //$NON-NLS-1$ //$NON-NLS-2$
-		else if (RTL && fHideScrollBars)
-			styles = new String[] {"direction:rtl;", "overflow:hidden;", "word-wrap:break-word;"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		else if (fHideScrollBars && true)
-			styles = new String[] {"overflow:hidden;", "word-wrap: break-word;"}; //$NON-NLS-1$ //$NON-NLS-2$
-
-		if (styles != null) {
-			StringBuffer buffer = new StringBuffer(content);
-			HTMLPrinter.insertStyles(buffer, styles);
-			content = buffer.toString();
-		}
-
-		fBrowser.setText(content);
-
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.ui.text.IInformationControlExtension4#setStatusText(java.lang.String)
-	 * @since 3.2
-	 */
-	public void setStatusText(String statusFieldText) {
-		fStatusFieldText = statusFieldText;
-	}
-
-	/*
-	 * @see IInformationControl#setVisible(boolean)
-	 */
-	public void setVisible(boolean visible) {
-		if (fShell.isVisible() == visible)
-			return;
-
-		if (visible) {
-			if (fStatusTextField != null) {
-				boolean state = fStatusFieldText != null;
-				if (state)
-					fStatusTextField.setText(fStatusFieldText);
-				fStatusTextField.setVisible(state);
-				fSeparator.setVisible(state);
-			}
-		}
-
-		fShell.setVisible(visible);
-		if (!visible)
-			setInformation(""); //$NON-NLS-1$
-	}
-
-	/**
-	 * Creates and initializes the text layout used
-	 * to compute the size hint.
-	 * 
-	 * @since 3.2
-	 */
-	private void createTextLayout() {
-		fTextLayout = new TextLayout(fBrowser.getDisplay());
-
-		// Initialize fonts
-		Font font = fBrowser.getFont();
-		fTextLayout.setFont(font);
-		fTextLayout.setWidth(-1);
-		FontData[] fontData = font.getFontData();
-		for (int i = 0; i < fontData.length; i++)
-			fontData[i].setStyle(SWT.BOLD);
-		font = new Font(fShell.getDisplay(), fontData);
-		fBoldStyle = new TextStyle(font, null, null);
-
-		// Compute and set tab width
-		fTextLayout.setText("    "); //$NON-NLS-1$
-		int tabWidth = fTextLayout.getBounds().width;
-		fTextLayout.setTabs(new int[] {tabWidth});
-
-		fTextLayout.setText(""); //$NON-NLS-1$
-	}
-
-	/*
-	 * @see IInformationControl#dispose()
-	 */
-	public void dispose() {
-		fTextLayout.dispose();
-		fTextLayout = null;
-		fBoldStyle.font.dispose();
-		fBoldStyle = null;
-		if (fShell != null && !fShell.isDisposed())
-			fShell.dispose();
-		else
-			widgetDisposed(null);
-	}
-
-	/*
-	 * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
-	 */
-	public void widgetDisposed(DisposeEvent event) {
-		if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
-			fStatusTextFont.dispose();
-
-		fShell = null;
-		fBrowser = null;
-		fStatusTextFont = null;
-	}
-
-	/*
-	 * @see IInformationControl#setSize(int, int)
-	 */
-	public void setSize(int width, int height) {
-		fShell.setSize(Math.min(width, fMaxWidth), Math.min(height, fMaxHeight));
-	}
-
-	/*
-	 * @see IInformationControl#setLocation(Point)
-	 */
-	public void setLocation(Point location) {
-		fShell.setLocation(location);
-	}
-
-	/*
-	 * @see IInformationControl#setSizeConstraints(int, int)
-	 */
-	public void setSizeConstraints(int maxWidth, int maxHeight) {
-		fMaxWidth = maxWidth;
-		fMaxHeight = maxHeight;
-	}
-
-	/*
-	 * @see IInformationControl#computeSizeHint()
-	 */
-	public Point computeSizeHint() {
-		TextPresentation presentation = new TextPresentation();
-		HTML2TextReader reader = new HTML2TextReader(new StringReader(fInputText), presentation);
-		String text;
-		try {
-			text = reader.getString();
-		} catch (IOException e) {
-			text = ""; //$NON-NLS-1$
-		}
-
-		fTextLayout.setText(text);
-		Iterator iter = presentation.getAllStyleRangeIterator();
-		while (iter.hasNext()) {
-			StyleRange sr = (StyleRange) iter.next();
-			if (sr.fontStyle == SWT.BOLD)
-				fTextLayout.setStyle(fBoldStyle, sr.start, sr.start + sr.length - 1);
-		}
-		Rectangle bounds = fTextLayout.getBounds();
-		int width = bounds.width;
-		int height = bounds.height;
-
-		width += 15;
-		height += 25;
-
-		if (fStatusFieldText != null && fSeparator != null) {
-			fTextLayout.setText(fStatusFieldText);
-			Rectangle statusBounds = fTextLayout.getBounds();
-			Rectangle separatorBounds = fSeparator.getBounds();
-			width = Math.max(width, statusBounds.width);
-			height = height + statusBounds.height + separatorBounds.height;
-		}
-
-		// Apply size constraints
-		if (fMaxWidth != SWT.DEFAULT)
-			width = Math.min(fMaxWidth, width);
-		if (fMaxHeight != SWT.DEFAULT)
-			height = Math.min(fMaxHeight, height);
-
-		// Ensure minimal size
-		width = Math.max(MIN_WIDTH, width);
-		height = Math.max(MIN_HEIGHT, height);
-
-		return new Point(width, height);
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.IInformationControlExtension3#computeTrim()
-	 */
-	public Rectangle computeTrim() {
-		return fShell.computeTrim(0, 0, 0, 0);
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.IInformationControlExtension3#getBounds()
-	 */
-	public Rectangle getBounds() {
-		return fShell.getBounds();
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.IInformationControlExtension3#restoresLocation()
-	 */
-	public boolean restoresLocation() {
-		return false;
-	}
-
-	/*
-	 * @see org.eclipse.jface.text.IInformationControlExtension3#restoresSize()
-	 */
-	public boolean restoresSize() {
-		return false;
-	}
-
-	/*
-	 * @see IInformationControl#addDisposeListener(DisposeListener)
-	 */
-	public void addDisposeListener(DisposeListener listener) {
-		fShell.addDisposeListener(listener);
-	}
-
-	/*
-	 * @see IInformationControl#removeDisposeListener(DisposeListener)
-	 */
-	public void removeDisposeListener(DisposeListener listener) {
-		fShell.removeDisposeListener(listener);
-	}
-
-	/*
-	 * @see IInformationControl#setForegroundColor(Color)
-	 */
-	public void setForegroundColor(Color foreground) {
-		fBrowser.setForeground(foreground);
-	}
-
-	/*
-	 * @see IInformationControl#setBackgroundColor(Color)
-	 */
-	public void setBackgroundColor(Color background) {
-		fBrowser.setBackground(background);
-	}
-
-	/*
-	 * @see IInformationControl#isFocusControl()
-	 */
-	public boolean isFocusControl() {
-		return fBrowser.isFocusControl();
-	}
-
-	/*
-	 * @see IInformationControl#setFocus()
-	 */
-	public void setFocus() {
-		fShell.forceFocus();
-		fBrowser.setFocus();
-	}
-
-	/*
-	 * @see IInformationControl#addFocusListener(FocusListener)
-	 */
-	public void addFocusListener(final FocusListener listener) {
-		fBrowser.addFocusListener(listener);
-
-		/*
-		 * FIXME:	This is a workaround for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532
-		 * 			(Browser widget does not send focusLost event)
-		 */
-		if (fFocusListeners.isEmpty()) {
-			fDeactivateListener = new Listener() {
-				public void handleEvent(Event event) {
-					Object[] listeners = fFocusListeners.getListeners();
-					for (int i = 0; i < listeners.length; i++)
-						((FocusListener) listeners[i]).focusLost(new FocusEvent(event));
-				}
-			};
-			fBrowser.getShell().addListener(SWT.Deactivate, fDeactivateListener);
-		}
-		fFocusListeners.add(listener);
-	}
-
-	/*
-	 * @see IInformationControl#removeFocusListener(FocusListener)
-	 */
-	public void removeFocusListener(FocusListener listener) {
-		fBrowser.removeFocusListener(listener);
-
-		/*
-		 * FIXME:	This is a workaround for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=84532
-		 * 			(Browser widget does not send focusLost event)
-		 */
-		fFocusListeners.remove(listener);
-		if (fFocusListeners.isEmpty()) {
-			fBrowser.getShell().removeListener(SWT.Deactivate, fDeactivateListener);
-			fDeactivateListener = null;
-		}
-	}
-
-	/*
-	 * @see IInformationControlExtension#hasContents()
-	 */
-	public boolean hasContents() {
-		return fBrowserHasContent;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/HTML2TextReader.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/HTML2TextReader.java
deleted file mode 100644
index 6846fee..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/HTML2TextReader.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.editor.contentassist.display;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-
-/**
- * Reads the text contents from a reader of HTML contents and translates
- * the tags or cut them out.
- */
-public class HTML2TextReader extends SubstitutionTextReader {
-
-	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-	private static final Map fgEntityLookup;
-	private static final Set fgTags;
-
-	static {
-
-		fgTags = new HashSet();
-		fgTags.add("b"); //$NON-NLS-1$
-		fgTags.add("br"); //$NON-NLS-1$
-		fgTags.add("br/"); //$NON-NLS-1$
-		fgTags.add("div"); //$NON-NLS-1$
-		fgTags.add("h1"); //$NON-NLS-1$
-		fgTags.add("h2"); //$NON-NLS-1$
-		fgTags.add("h3"); //$NON-NLS-1$
-		fgTags.add("h4"); //$NON-NLS-1$
-		fgTags.add("h5"); //$NON-NLS-1$
-		fgTags.add("p"); //$NON-NLS-1$
-		fgTags.add("dl"); //$NON-NLS-1$
-		fgTags.add("dt"); //$NON-NLS-1$
-		fgTags.add("dd"); //$NON-NLS-1$
-		fgTags.add("li"); //$NON-NLS-1$
-		fgTags.add("ul"); //$NON-NLS-1$
-		fgTags.add("pre"); //$NON-NLS-1$
-		fgTags.add("head"); //$NON-NLS-1$
-
-		fgEntityLookup = new HashMap(7);
-		fgEntityLookup.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
-		fgEntityLookup.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
-		fgEntityLookup.put("nbsp", " "); //$NON-NLS-1$ //$NON-NLS-2$
-		fgEntityLookup.put("amp", "&"); //$NON-NLS-1$ //$NON-NLS-2$
-		fgEntityLookup.put("circ", "^"); //$NON-NLS-1$ //$NON-NLS-2$
-		fgEntityLookup.put("tilde", "~"); //$NON-NLS-2$ //$NON-NLS-1$
-		fgEntityLookup.put("quot", "\""); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	private int fCounter = 0;
-	private TextPresentation fTextPresentation;
-	private int fBold = 0;
-	private int fStartOffset = -1;
-	private boolean fInParagraph = false;
-	private boolean fIsPreformattedText = false;
-	private boolean fIgnore = false;
-
-	/**
-	 * Transforms the HTML text from the reader to formatted text.
-	 *
-	 * @param reader the reader
-	 * @param presentation If not <code>null</code>, formattings will be applied to
-	 * the presentation.
-	*/
-	public HTML2TextReader(Reader reader, TextPresentation presentation) {
-		super(new PushbackReader(reader));
-		fTextPresentation = presentation;
-	}
-
-	public int read() throws IOException {
-		int c = super.read();
-		if (c != -1)
-			++fCounter;
-		return c;
-	}
-
-	protected void startBold() {
-		if (fBold == 0)
-			fStartOffset = fCounter;
-		++fBold;
-	}
-
-	protected void startPreformattedText() {
-		fIsPreformattedText = true;
-		setSkipWhitespace(false);
-	}
-
-	protected void stopPreformattedText() {
-		fIsPreformattedText = false;
-		setSkipWhitespace(true);
-	}
-
-	protected void stopBold() {
-		--fBold;
-		if (fBold == 0) {
-			if (fTextPresentation != null) {
-				fTextPresentation.addStyleRange(new StyleRange(fStartOffset, fCounter - fStartOffset, null, null, SWT.BOLD));
-			}
-			fStartOffset = -1;
-		}
-	}
-
-	/*
-	 * @see org.eclipse.jdt.internal.ui.text.SubstitutionTextReader#computeSubstitution(int)
-	 */
-	protected String computeSubstitution(int c) throws IOException {
-
-		if (c == '<')
-			return processHTMLTag();
-		else if (fIgnore)
-			return EMPTY_STRING;
-		else if (c == '&')
-			return processEntity();
-		else if (fIsPreformattedText)
-			return processPreformattedText(c);
-
-		return null;
-	}
-
-	private String html2Text(String html) {
-
-		if (html == null || html.length() == 0)
-			return EMPTY_STRING;
-
-		html = html.toLowerCase();
-
-		String tag = html;
-		if ('/' == tag.charAt(0))
-			tag = tag.substring(1);
-
-		if (!fgTags.contains(tag))
-			return EMPTY_STRING;
-
-		if ("pre".equals(html)) { //$NON-NLS-1$
-			startPreformattedText();
-			return EMPTY_STRING;
-		}
-
-		if ("/pre".equals(html)) { //$NON-NLS-1$
-			stopPreformattedText();
-			return EMPTY_STRING;
-		}
-
-		if (fIsPreformattedText)
-			return EMPTY_STRING;
-
-		if ("b".equals(html)) { //$NON-NLS-1$
-			startBold();
-			return EMPTY_STRING;
-		}
-
-		if ((html.length() > 1 && html.charAt(0) == 'h' && Character.isDigit(html.charAt(1))) || "dt".equals(html)) { //$NON-NLS-1$
-			startBold();
-			return EMPTY_STRING;
-		}
-
-		if ("dl".equals(html)) //$NON-NLS-1$
-			return LINE_DELIM;
-
-		if ("dd".equals(html)) //$NON-NLS-1$
-			return "\t"; //$NON-NLS-1$
-
-		if ("li".equals(html)) //$NON-NLS-1$
-			// FIXME: this hard-coded prefix does not work for RTL languages, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=91682
-			return LINE_DELIM + "\t- "; //$NON-NLS-1$
-
-		if ("/b".equals(html)) { //$NON-NLS-1$
-			stopBold();
-			return EMPTY_STRING;
-		}
-
-		if ("p".equals(html)) { //$NON-NLS-1$
-			fInParagraph = true;
-			return LINE_DELIM;
-		}
-
-		if ("br".equals(html) || "br/".equals(html) || "div".equals(html)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			return LINE_DELIM;
-
-		if ("/p".equals(html)) { //$NON-NLS-1$
-			boolean inParagraph = fInParagraph;
-			fInParagraph = false;
-			return inParagraph ? EMPTY_STRING : LINE_DELIM;
-		}
-
-		if ((html.startsWith("/h") && html.length() > 2 && Character.isDigit(html.charAt(2))) || "/dt".equals(html)) { //$NON-NLS-1$ //$NON-NLS-2$
-			stopBold();
-			return LINE_DELIM;
-		}
-
-		if ("/dd".equals(html)) //$NON-NLS-1$
-			return LINE_DELIM;
-
-		if ("head".equals(html)) { //$NON-NLS-1$
-			fIgnore = true;
-			return EMPTY_STRING;
-		}
-
-		if ("/head".equals(html)) { //$NON-NLS-1$
-			fIgnore = false;
-			return EMPTY_STRING;
-		}
-
-		return EMPTY_STRING;
-	}
-
-	/*
-	 * A '<' has been read. Process a html tag
-	 */
-	private String processHTMLTag() throws IOException {
-
-		StringBuffer buf = new StringBuffer();
-		int ch;
-		do {
-
-			ch = nextChar();
-
-			while (ch != -1 && ch != '>') {
-				buf.append(Character.toLowerCase((char) ch));
-				ch = nextChar();
-				if (ch == '"') {
-					buf.append(Character.toLowerCase((char) ch));
-					ch = nextChar();
-					while (ch != -1 && ch != '"') {
-						buf.append(Character.toLowerCase((char) ch));
-						ch = nextChar();
-					}
-				}
-				if (ch == '<') {
-					unread(ch);
-					return '<' + buf.toString();
-				}
-			}
-
-			if (ch == -1)
-				return null;
-
-			int tagLen = buf.length();
-			// needs special treatment for comments
-			if ((tagLen >= 3 && "!--".equals(buf.substring(0, 3))) //$NON-NLS-1$
-					&& !(tagLen >= 5 && "--".equals(buf.substring(tagLen - 2)))) { //$NON-NLS-1$
-				// unfinished comment
-				buf.append(ch);
-			} else {
-				break;
-			}
-		} while (true);
-
-		return html2Text(buf.toString());
-	}
-
-	private String processPreformattedText(int c) {
-		if (c == '\r' || c == '\n')
-			fCounter++;
-		return null;
-	}
-
-	private void unread(int ch) throws IOException {
-		((PushbackReader) getReader()).unread(ch);
-	}
-
-	protected String entity2Text(String symbol) {
-		if (symbol.length() > 1 && symbol.charAt(0) == '#') {
-			int ch;
-			try {
-				if (symbol.charAt(1) == 'x') {
-					ch = Integer.parseInt(symbol.substring(2), 16);
-				} else {
-					ch = Integer.parseInt(symbol.substring(1), 10);
-				}
-				return EMPTY_STRING + (char) ch;
-			} catch (NumberFormatException e) {
-			}
-		} else {
-			String str = (String) fgEntityLookup.get(symbol);
-			if (str != null) {
-				return str;
-			}
-		}
-		return "&" + symbol; // not found //$NON-NLS-1$
-	}
-
-	/*
-	 * A '&' has been read. Process a entity
-	 */
-	private String processEntity() throws IOException {
-		StringBuffer buf = new StringBuffer();
-		int ch = nextChar();
-		while (Character.isLetterOrDigit((char) ch) || ch == '#') {
-			buf.append((char) ch);
-			ch = nextChar();
-		}
-
-		if (ch == ';')
-			return entity2Text(buf.toString());
-
-		buf.insert(0, '&');
-		if (ch != -1)
-			buf.append((char) ch);
-		return buf.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/JavaDocCommentReader.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/JavaDocCommentReader.java
index 95c74e2..addb35b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/JavaDocCommentReader.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/JavaDocCommentReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,17 +12,23 @@ package org.eclipse.pde.internal.ui.editor.contentassist.display;
 
 import org.eclipse.jdt.core.IBuffer;
 import org.eclipse.jdt.core.formatter.IndentManipulation;
+import org.eclipse.jface.internal.text.html.SingleCharReader;
 
 /**
  * Reads a java doc comment from a java doc comment. Skips star-character
- * on begin of line
+ * on begin of line.
+ * <p>
+ * XXX: copied from <code>org.eclipse.jdt.ui</code>.
+ * </p>
  */
 public class JavaDocCommentReader extends SingleCharReader {
 
 	private IBuffer fBuffer;
 
 	private int fCurrPos;
+
 	private int fStartPos;
+
 	private int fEndPos;
 
 	private boolean fWasNewLine;
@@ -81,6 +87,8 @@ public class JavaDocCommentReader extends SingleCharReader {
 
 	/**
 	 * Returns the offset of the last read character in the passed buffer.
+	 * 
+	 * @return the offset
 	 */
 	public int getOffset() {
 		return fCurrPos;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SingleCharReader.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SingleCharReader.java
deleted file mode 100644
index 115deb7..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SingleCharReader.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.editor.contentassist.display;
-
-import java.io.IOException;
-import java.io.Reader;
-
-abstract class SingleCharReader extends Reader {
-
-	/**
-	 * @see Reader#read()
-	 */
-	public abstract int read() throws IOException;
-
-	/**
-	 * @see Reader#read(char[],int,int)
-	 */
-	public int read(char cbuf[], int off, int len) throws IOException {
-		int end = off + len;
-		for (int i = off; i < end; i++) {
-			int ch = read();
-			if (ch == -1) {
-				if (i == off)
-					return -1;
-				return i - off;
-			}
-			cbuf[i] = (char) ch;
-		}
-		return len;
-	}
-
-	/**
-	 * @see Reader#ready()
-	 */
-	public boolean ready() throws IOException {
-		return true;
-	}
-
-	/**
-	 * Returns the readable content as string.
-	 * @return the readable content as string
-	 * @exception IOException in case reading fails
-	 */
-	public String getString() throws IOException {
-		StringBuffer buf = new StringBuffer();
-		int ch;
-		while ((ch = read()) != -1) {
-			buf.append((char) ch);
-		}
-		return buf.toString();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SubstitutionTextReader.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SubstitutionTextReader.java
deleted file mode 100644
index 9cab8ff..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/contentassist/display/SubstitutionTextReader.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.pde.internal.ui.editor.contentassist.display;
-
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * Reads the text contents from a reader and computes for each character
- * a potential substitution. The substitution may eat more characters than
- * only the one passed into the computation routine.
- */
-abstract class SubstitutionTextReader extends SingleCharReader {
-
-	protected static final String LINE_DELIM = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
-	private Reader fReader;
-	private boolean fWasWhiteSpace;
-	private int fCharAfterWhiteSpace;
-
-	/**
-	 * Tells whether white space characters are skipped.
-	 */
-	private boolean fSkipWhiteSpace = true;
-
-	private boolean fReadFromBuffer;
-	private StringBuffer fBuffer;
-	private int fIndex;
-
-	protected SubstitutionTextReader(Reader reader) {
-		fReader = reader;
-		fBuffer = new StringBuffer();
-		fIndex = 0;
-		fReadFromBuffer = false;
-		fCharAfterWhiteSpace = -1;
-		fWasWhiteSpace = true;
-	}
-
-	/**
-	 * Computes the substitution for the given character and if necessary
-	 * subsequent characters. Implementation should use <code>nextChar</code>
-	 * to read subsequent characters.
-	 *
-	 * @param c the character to be substituted
-	 * @return the substitution for <code>c</code>
-	 * @throws IOException in case computing the substitution fails
-	 */
-	protected abstract String computeSubstitution(int c) throws IOException;
-
-	/**
-	 * Returns the internal reader.
-	 *
-	 * @return the internal reader
-	 */
-	protected Reader getReader() {
-		return fReader;
-	}
-
-	/**
-	 * Returns the next character.
-	 * @return the next character
-	 * @throws IOException in case reading the character fails
-	 */
-	protected int nextChar() throws IOException {
-		fReadFromBuffer = (fBuffer.length() > 0);
-		if (fReadFromBuffer) {
-			char ch = fBuffer.charAt(fIndex++);
-			if (fIndex >= fBuffer.length()) {
-				fBuffer.setLength(0);
-				fIndex = 0;
-			}
-			return ch;
-		}
-
-		int ch = fCharAfterWhiteSpace;
-		if (ch == -1) {
-			ch = fReader.read();
-		}
-		if (fSkipWhiteSpace && Character.isWhitespace((char) ch)) {
-			do {
-				ch = fReader.read();
-			} while (Character.isWhitespace((char) ch));
-			if (ch != -1) {
-				fCharAfterWhiteSpace = ch;
-				return ' ';
-			}
-		} else {
-			fCharAfterWhiteSpace = -1;
-		}
-		return ch;
-	}
-
-	/**
-	 * @see Reader#read()
-	 */
-	public int read() throws IOException {
-		int c;
-		do {
-
-			c = nextChar();
-			while (!fReadFromBuffer) {
-				String s = computeSubstitution(c);
-				if (s == null)
-					break;
-				if (s.length() > 0)
-					fBuffer.insert(0, s);
-				c = nextChar();
-			}
-
-		} while (fSkipWhiteSpace && fWasWhiteSpace && (c == ' '));
-		fWasWhiteSpace = (c == ' ' || c == '\r' || c == '\n');
-		return c;
-	}
-
-	/**
-	 * @see Reader#ready()
-	 */
-	public boolean ready() throws IOException {
-		return fReader.ready();
-	}
-
-	/**
-	 * @see Reader#close()
-	 */
-	public void close() throws IOException {
-		fReader.close();
-	}
-
-	/**
-	 * @see Reader#reset()
-	 */
-	public void reset() throws IOException {
-		fReader.reset();
-		fWasWhiteSpace = true;
-		fCharAfterWhiteSpace = -1;
-		fBuffer.setLength(0);
-		fIndex = 0;
-	}
-
-	protected final void setSkipWhitespace(boolean state) {
-		fSkipWhiteSpace = state;
-	}
-
-	protected final boolean isSkippingWhitespace() {
-		return fSkipWhiteSpace;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLDocumentSetupParticpant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLDocumentSetupParticpant.java
index 8deb99a..3b61ffb 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLDocumentSetupParticpant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLDocumentSetupParticpant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,7 +14,12 @@ import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
 import org.eclipse.jface.text.*;
 import org.eclipse.jface.text.rules.FastPartitioner;
 import org.eclipse.pde.internal.ui.editor.text.XMLPartitionScanner;
+import org.eclipse.pde.internal.ui.editor.text.XMLStringPartitionScanner;
 
+/**
+ * Creates and sets up the document partitioner
+ *  
+ */
 public class XMLDocumentSetupParticpant implements IDocumentSetupParticipant {
 
 	public static final String XML_PARTITIONING = "_pde_xml_partitioning"; //$NON-NLS-1$
@@ -26,6 +31,9 @@ public class XMLDocumentSetupParticpant implements IDocumentSetupParticipant {
 			if (document instanceof IDocumentExtension3) {
 				IDocumentExtension3 de3 = (IDocumentExtension3) document;
 				de3.setDocumentPartitioner(XML_PARTITIONING, partitioner);
+				partitioner = new FastPartitioner(new XMLStringPartitionScanner(), XMLStringPartitionScanner.STRING_PARTITIONS);
+				partitioner.connect(document);
+				de3.setDocumentPartitioner(XMLStringPartitionScanner.XML_STRING, partitioner);
 			} else {
 				document.setDocumentPartitioner(partitioner);
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java
index bf75a2c..3502927 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -108,6 +108,7 @@ public abstract class XMLInputContext extends UTF8InputContext {
 			if (node.getOffset() > -1) {
 				// this is an element that was of the form <element/>
 				// it now needs to be broken up into <element><new/></element>
+				// Note that the node here has the correct stored length (the previous value, not what will be written out during the write() call), see bug 293474
 				op = new ReplaceEdit(node.getOffset(), node.getLength(), node.write(false));
 			} else {
 				// try to insert after last sibling that has an offset
@@ -217,15 +218,18 @@ public abstract class XMLInputContext extends UTF8InputContext {
 		Object changedObject = attr;
 		TextEdit op = null;
 		if (offset > -1) {
+			// Attribute exists, replace the old value with the new value
 			if (newValue == null || newValue.toString().length() == 0) {
 				int length = attr.getValueOffset() + attr.getValueLength() + 1 - attr.getNameOffset();
 				op = getAttributeDeleteEditOperation(attr.getNameOffset(), length);
 			} else {
-				op = new ReplaceEdit(offset, attr.getValueLength(), getWritableAttributeNodeValue(event.getNewValue().toString()));
+				int oldLength = ((String) event.getOldValue()).length();
+				op = new ReplaceEdit(offset, oldLength, getWritableAttributeNodeValue(event.getNewValue().toString()));
 			}
 		}
 
 		if (op == null) {
+			// Attribute doesn't exist, check if the parent exists and add the attribute to it
 			IDocumentElementNode node = attr.getEnclosingElement();
 			IDocument doc = getDocumentProvider().getDocument(getInput());
 			if (node.getOffset() > -1) {
@@ -233,6 +237,7 @@ public abstract class XMLInputContext extends UTF8InputContext {
 				int len = getNextPosition(doc, node.getOffset(), '>');
 				op = new ReplaceEdit(node.getOffset(), len + 1, node.writeShallow(shouldTerminateElement(doc, node.getOffset() + len)));
 			} else {
+				// Parent doesn't exist in the doc, write out whole parent to the doc
 				insertNode(node, ops);
 				return;
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/DataSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/DataSection.java
index b8b520c..1df2186 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/DataSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/DataSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.jface.action.*;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.IModelChangedEvent;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.feature.FeatureData;
 import org.eclipse.pde.internal.core.feature.FeaturePlugin;
 import org.eclipse.pde.internal.core.ifeature.*;
@@ -168,7 +169,7 @@ public class DataSection extends TableSection {
 	}
 
 	private boolean canAdd(IFeatureModel model, String path) {
-		if ("feature.xml".equals(path)) //$NON-NLS-1$
+		if (ICoreConstants.FEATURE_FILENAME_DESCRIPTOR.equals(path))
 			return false;
 		IFeatureData[] data = model.getFeature().getData();
 		for (int i = 0; i < data.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureAdvancedPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureAdvancedPage.java
index 3062e24..94a6959 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureAdvancedPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureAdvancedPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -40,7 +40,7 @@ public class FeatureAdvancedPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/installation.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_INSTALLATION;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureDependenciesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureDependenciesPage.java
index 259a5e5..09db0b5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureDependenciesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureDependenciesPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -43,7 +43,7 @@ public class FeatureDependenciesPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/dependencies.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_DEPENDENCIES;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
index 0ae7001..a41f280 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.pde.core.IIdentifiable;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.build.IBuildObject;
 import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.build.*;
@@ -68,7 +69,7 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 				if (resource != null)
 					input = new FileEditorInput((IFile) resource);
 				else {
-					File file = new File(model.getInstallLocation(), "feature.xml"); //$NON-NLS-1$
+					File file = new File(model.getInstallLocation(), ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 					IFileStore store = EFS.getStore(file.toURI());
 					input = new FileStoreEditorInput(store);
 				}
@@ -94,10 +95,10 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 		IFile featureFile = null;
 
 		String name = file.getName().toLowerCase(Locale.ENGLISH);
-		if (name.equals("feature.xml")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
 			featureFile = file;
-			buildFile = project.getFile("build.properties"); //$NON-NLS-1$
-		} else if (name.equals("build.properties")) { //$NON-NLS-1$
+			buildFile = PDEProject.getBuildProperties(project);
+		} else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			buildFile = file;
 			featureFile = createFeatureFile(project);
 		}
@@ -123,13 +124,13 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 		if (fInputContextManager == null)
 			return;
 		String name = file.getName();
-		if (name.equalsIgnoreCase("feature.xml")) { //$NON-NLS-1$
+		if (name.equalsIgnoreCase(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
 			/*
 			 * IEditorInput in = new FileEditorInput(file);
 			 * inputContextManager.putContext(in, new FeatureInputContext(this,
 			 * in, false));
 			 */
-		} else if (name.equalsIgnoreCase("build.properties")) { //$NON-NLS-1$
+		} else if (name.equalsIgnoreCase(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			if (!fInputContextManager.hasContext(BuildInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new BuildInputContext(this, in, false));
@@ -163,11 +164,11 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 		File buildFile = null;
 		File featureFile = null;
 		String name = file.getName().toLowerCase(Locale.ENGLISH);
-		if (name.equals("feature.xml")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
 			featureFile = file;
 			File dir = file.getParentFile();
-			buildFile = new File(dir, "build.properties"); //$NON-NLS-1$
-		} else if (name.equals("build.properties")) { //$NON-NLS-1$
+			buildFile = new File(dir, ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		} else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			buildFile = file;
 			File dir = file.getParentFile();
 			featureFile = createFeatureFile(dir);
@@ -189,20 +190,19 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 	}
 
 	private File createFeatureFile(File dir) {
-		File pluginFile = new File(dir, "plugin.xml"); //$NON-NLS-1$
+		File pluginFile = new File(dir, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
 		return pluginFile;
 	}
 
 	private IFile createFeatureFile(IProject project) {
-		IFile featureFile = project.getFile(ICoreConstants.FEATURE_PATH);
-		return featureFile;
+		return PDEProject.getFeatureXml(project);
 	}
 
 	protected void createStorageContexts(InputContextManager manager, IStorageEditorInput input) {
 		String name = input.getName().toLowerCase(Locale.ENGLISH);
-		if (name.equals("build.properties")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			manager.putContext(input, new BuildInputContext(this, input, true));
-		} else if (name.startsWith("feature.xml")) { //$NON-NLS-1$
+		} else if (name.startsWith(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
 			manager.putContext(input, new FeatureInputContext(this, input, true));
 		}
 	}
@@ -343,7 +343,7 @@ public class FeatureEditor extends MultiSourceEditor implements IShowEditorInput
 
 	public void showEditorInput(IEditorInput editorInput) {
 		String name = editorInput.getName();
-		if (name.equals("feature.xml")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
 			setActivePage(0);
 		} else {
 			setActivePage(getPageCount() - 3);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
index 6dae712..2645049 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureEditorMatchingStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,14 +12,12 @@
 package org.eclipse.pde.internal.ui.editor.feature;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.ui.*;
 import org.eclipse.ui.ide.ResourceUtil;
 
 public class FeatureEditorMatchingStrategy implements IEditorMatchingStrategy {
 
-	private static final String BP = "build.properties"; //$NON-NLS-1$
-	private static final String FX = "feature.xml"; //$NON-NLS-1$
-
 	public boolean matches(IEditorReference editorRef, IEditorInput input) {
 		if (!(input instanceof IFileEditorInput))
 			return false;
@@ -34,13 +32,13 @@ public class FeatureEditorMatchingStrategy implements IEditorMatchingStrategy {
 				return false;
 			// build.properties matches with editors that have a feature.xml file
 			// as their input and that feature.xml is at the root
-			if (inputFile.getName().equals(FX)) {
-				if (currInputFile.getName().equals(BP))
-					return inputFile.getProjectRelativePath().toString().equals(FX);
+			if (inputFile.getName().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR)) {
+				if (currInputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR))
+					return inputFile.getProjectRelativePath().toString().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 				return inputFile.equals(currInputFile);
-			} else if (inputFile.getName().equals(BP)) {
-				if (currInputFile.getName().equals(FX))
-					return currInputFile.getProjectRelativePath().toString().equals(FX);
+			} else if (inputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
+				if (currInputFile.getName().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR))
+					return currInputFile.getProjectRelativePath().toString().equals(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 				return inputFile.equals(currInputFile);
 			}
 			return false;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureFormPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureFormPage.java
index 79bcdb6..df1cf53 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureFormPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureFormPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -45,7 +45,7 @@ public class FeatureFormPage extends PDEFormPage implements IHyperlinkListener {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/overview.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_OVERVIEW;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureIncludesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureIncludesPage.java
index 84a836b..eaadd86 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureIncludesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureIncludesPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -44,7 +44,7 @@ public class FeatureIncludesPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/included_features.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_ADVANCED;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureReferencePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureReferencePage.java
index 3e4df71..4958022 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureReferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/FeatureReferencePage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -44,7 +44,7 @@ public class FeatureReferencePage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/plugins.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_CONTENT;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoFormPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoFormPage.java
index 33b3e51..0ef2207 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoFormPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/feature/InfoFormPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.feature;
@@ -40,7 +40,7 @@ public class InfoFormPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/feature_editor/information.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_FEATURE_INFO;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/CreateManifestOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/CreateManifestOperation.java
index 6af2f0b..54cd46b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/CreateManifestOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/CreateManifestOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -18,8 +18,10 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.text.*;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ClasspathHelper;
+import org.eclipse.pde.internal.core.TargetPlatformHelper;
 import org.eclipse.pde.internal.core.converter.PDEPluginConverter;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.text.edits.*;
 
 public class CreateManifestOperation implements IRunnableWithProgress {
@@ -49,8 +51,8 @@ public class CreateManifestOperation implements IRunnableWithProgress {
 
 	private void trimOldManifest() throws BadLocationException, CoreException {
 		ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
-		String filename = fModel.isFragmentModel() ? ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR : ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR;
-		IFile file = fModel.getUnderlyingResource().getProject().getFile(filename);
+		IProject project = fModel.getUnderlyingResource().getProject();
+		IFile file = fModel.isFragmentModel() ? PDEProject.getFragmentXml(project) : PDEProject.getPluginXml(project);
 		try {
 			manager.connect(file.getFullPath(), LocationKind.NORMALIZE, null);
 			ITextFileBuffer buffer = manager.getTextFileBuffer(file.getFullPath(), LocationKind.NORMALIZE);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependenciesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependenciesPage.java
index 202ec6e..32c3fe6 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependenciesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependenciesPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
@@ -34,7 +34,7 @@ public class DependenciesPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/dependencies.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_PLUGIN_DEPENDENCIES;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
index 3dfd4e0..f6bfd0f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/DependencyManagementSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     EclipseSource Corporation - ongoing enhancements
+ *     Anyware Technologies - ongoing enhancements
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
 
@@ -18,7 +19,6 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.jface.action.*;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.*;
@@ -31,7 +31,10 @@ import org.eclipse.pde.internal.core.ibundle.IBundlePluginModel;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.plugin.ExternalPluginModel;
 import org.eclipse.pde.internal.core.plugin.WorkspacePluginModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.build.BuildEntry;
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog;
 import org.eclipse.pde.internal.ui.editor.*;
@@ -337,7 +340,7 @@ public class DependencyManagementSection extends TableSection implements IModelC
 		InputContext context = getPage().getPDEEditor().getContextManager().findContext(BuildInputContext.CONTEXT_ID);
 		if (context == null) {
 			if (createIfMissing) {
-				IFile buildFile = getPage().getPDEEditor().getCommonProject().getFile("build.properties"); //$NON-NLS-1$
+				IFile buildFile = PDEProject.getBuildProperties(getPage().getPDEEditor().getCommonProject());
 				try {
 					buildFile.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
 				} catch (CoreException e) {
@@ -392,8 +395,8 @@ public class DependencyManagementSection extends TableSection implements IModelC
 					entry.addToken(pmodel.getPlugin().getId());
 				}
 				markDirty();
-				IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
-				store.setDefault(IPreferenceConstants.PROP_AUTO_MANAGE, true);
+				PDEPreferencesManager store = PDELaunchingPlugin.getDefault().getPreferenceManager();
+				store.setDefault(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE, true);
 			} catch (CoreException e) {
 				PDEPlugin.logException(e);
 			}
@@ -407,6 +410,9 @@ public class DependencyManagementSection extends TableSection implements IModelC
 		IPluginModelBase model = PluginRegistry.findModel(currentProj);
 		if (model != null) {
 			currentPlugins.add(model.getPluginBase().getId());
+			if (model.isFragmentModel()) {
+				currentPlugins.add(((IFragmentModel) model).getFragment().getPluginId());
+			}
 		}
 
 		ArrayList result = new ArrayList();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsPage.java
index ad24490..1891261 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionPointsPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
@@ -69,7 +69,7 @@ public class ExtensionPointsPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/extension_points.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_PLUGIN_EXT_POINTS;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsPage.java
index 9a1c533..7b3d5ba 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
@@ -116,7 +116,7 @@ public class ExtensionsPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/extensions.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_PLUGIN_EXTENSIONS;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
index 6d21b02..fa9dced 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ExtensionsSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,6 @@ import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.parts.TreePart;
 import org.eclipse.pde.internal.ui.search.PluginSearchActionGroup;
 import org.eclipse.pde.internal.ui.util.SWTUtil;
-import org.eclipse.pde.internal.ui.util.SharedLabelProvider;
 import org.eclipse.pde.internal.ui.wizards.extension.ExtensionEditorWizard;
 import org.eclipse.pde.internal.ui.wizards.extension.NewExtensionWizard;
 import org.eclipse.pde.ui.IExtensionEditorWizard;
@@ -639,10 +638,14 @@ public class ExtensionsSection extends TreeSection implements IModelChangedListe
 	}
 
 	public void refresh() {
+		// The model changed but the editor is still open, we should try to retain expansion, selection will be retained on its own
+		Object[] expanded = fExtensionTree.getExpandedElements();
 		IPluginModelBase model = (IPluginModelBase) getPage().getModel();
+		fExtensionTree.getControl().setRedraw(false);
 		fExtensionTree.setInput(model.getPluginBase());
+		fExtensionTree.setExpandedElements(expanded);
+		fExtensionTree.getControl().setRedraw(true);
 		reportMissingExtensionPointSchemas(model.getPluginBase());
-		selectFirstExtension();
 		getManagedForm().fireSelectionChanged(ExtensionsSection.this, fExtensionTree.getSelection());
 		super.refresh();
 	}
@@ -712,11 +715,6 @@ public class ExtensionsSection extends TreeSection implements IModelChangedListe
 			Image customImage = getCustomImage(element);
 			if (customImage != null)
 				elementImage = customImage;
-			String bodyText = element.getText();
-			boolean hasBodyText = bodyText != null && bodyText.length() > 0;
-			if (hasBodyText) {
-				elementImage = PDEPlugin.getDefault().getLabelProvider().get(elementImage, SharedLabelProvider.F_EDIT);
-			}
 		}
 		return elementImage;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/GeneralInfoSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/GeneralInfoSection.java
index f8f6a50..f77db83 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/GeneralInfoSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/GeneralInfoSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -34,6 +34,9 @@ import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.forms.widgets.*;
 import org.osgi.framework.Constants;
 
+/**
+ * Provides the first section of the manifest editor describing the bundle id/name/version/etc.
+ */
 public abstract class GeneralInfoSection extends PDESection {
 	private static String PLATFORM_FILTER = "Eclipse-PlatformFilter"; //$NON-NLS-1$
 
@@ -106,7 +109,6 @@ public abstract class GeneralInfoSection extends PDESection {
 	 * a different model instance from the one used by the bundle error
 	 * reporter.  Things get out of sync between the form validator and 
 	 * source validator
-	 * @return
 	 */
 	protected IPluginModelBase getModelBase() {
 		// Find the model only on the first call
@@ -154,9 +156,6 @@ public abstract class GeneralInfoSection extends PDESection {
 		};
 	}
 
-	/**
-	 * @return
-	 */
 	private boolean validateIdEntry() {
 		// Value must be specified
 		return ControlValidationUtility.validateRequiredField(fIdEntry.getText().getText(), fIdEntryValidator, IMessageProvider.ERROR);
@@ -182,9 +181,6 @@ public abstract class GeneralInfoSection extends PDESection {
 		};
 	}
 
-	/**
-	 * @return
-	 */
 	private boolean validateVersionEntry() {
 		// Value must be specified
 		if (ControlValidationUtility.validateRequiredField(fVersionEntry.getText().getText(), fVersionEntryValidator, IMessageProvider.ERROR) == false) {
@@ -214,14 +210,7 @@ public abstract class GeneralInfoSection extends PDESection {
 		};
 	}
 
-	/**
-	 * @return
-	 */
 	private boolean validateNameEntry() {
-		// Value must be specified
-		if (ControlValidationUtility.validateRequiredField(fNameEntry.getText().getText(), fNameEntryValidator, IMessageProvider.ERROR) == false) {
-			return false;
-		}
 		// Value must be externalized
 		return ControlValidationUtility.validateTranslatableField(fNameEntry.getText().getText(), fNameEntryValidator, getModelBase(), getProject());
 	}
@@ -246,9 +235,6 @@ public abstract class GeneralInfoSection extends PDESection {
 		};
 	}
 
-	/**
-	 * @return
-	 */
 	private boolean validateProviderEntry() {
 		// No validation required for an optional field
 		if (fProviderEntry.getText().getText().length() == 0) {
@@ -274,9 +260,6 @@ public abstract class GeneralInfoSection extends PDESection {
 		};
 	}
 
-	/**
-	 * @return
-	 */
 	private boolean validatePlatformEntry() {
 		// No validation required for an optional field
 		if (fPlatformFilterEntry.getText().getText().length() == 0) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
index 6fb0c8f..e1a8417 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ImportPackageSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.bundle.BundlePluginBase;
 import org.eclipse.pde.internal.core.ibundle.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.bundle.*;
 import org.eclipse.pde.internal.core.util.PDEJavaHelper;
 import org.eclipse.pde.internal.ui.*;
@@ -513,7 +514,7 @@ public class ImportPackageSection extends TableSection implements IModelChangedL
 				// add un-exported packages in workspace non-binary plug-ins
 				IResource resource = models[i].getUnderlyingResource();
 				IProject project = resource != null ? resource.getProject() : null;
-				if (project == null || !project.hasNature(JavaCore.NATURE_ID) || WorkspaceModelManager.isBinaryProject(project) || !project.exists(ICoreConstants.MANIFEST_PATH))
+				if (project == null || !project.hasNature(JavaCore.NATURE_ID) || WorkspaceModelManager.isBinaryProject(project) || !PDEProject.getManifest(project).exists())
 					continue;
 				IJavaProject jp = JavaCore.create(project);
 				IPackageFragmentRoot[] roots = jp.getPackageFragmentRoots();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/JavaAttributeWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/JavaAttributeWizardPage.java
index 1235028..eb41035 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/JavaAttributeWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/JavaAttributeWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -162,18 +162,19 @@ public class JavaAttributeWizardPage extends NewClassWizardPage {
 			}
 			//			superclass and interface
 			if (attInfo == null) {
+				initialValues.interfaceName = "org.osgi.framework.BundleActivator"; //$NON-NLS-1$
+				initialValues.interfaceType = findTypeForName(initialValues.interfaceName);
 				IEclipsePreferences prefs = new ProjectScope(project).getNode(PDECore.PLUGIN_ID);
 				if (prefs != null && !prefs.getBoolean(ICoreConstants.EXTENSIONS_PROPERTY, true)) {
-					initialValues.interfaceName = "org.osgi.framework.BundleActivator"; //$NON-NLS-1$
-					initialValues.interfaceType = findTypeForName(initialValues.interfaceName);
 					return;
 				}
-				initialValues.superClassName = "org.eclipse.core.runtime.Plugin"; //$NON-NLS-1$
 				if (model != null) {
 					IPluginImport[] imports = model.getPluginBase().getImports();
 					for (int i = 0; i < imports.length; i++) {
 						if (imports[i].getId().equals("org.eclipse.ui")) { //$NON-NLS-1$
 							initialValues.superClassName = "org.eclipse.ui.plugin.AbstractUIPlugin"; //$NON-NLS-1$
+							initialValues.interfaceName = null;
+							initialValues.interfaceType = null;
 							break;
 						}
 					}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
index 1dcc784..3396e0a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/LibrarySection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
 import org.eclipse.pde.internal.core.ClasspathUtilCore;
 import org.eclipse.pde.internal.core.bundle.BundlePluginBase;
 import org.eclipse.pde.internal.core.plugin.PluginLibrary;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.build.*;
@@ -434,30 +435,41 @@ public class LibrarySection extends TableSection implements IModelChangedListene
 		dialog.setTitle(PDEUIMessages.BuildEditor_ClasspathSection_jarsTitle);
 		dialog.setMessage(PDEUIMessages.ClasspathSection_jarsMessage);
 		IPluginLibrary[] libraries = getModel().getPluginBase().getLibraries();
+		IProject project = ((IModel) getPage().getModel()).getUnderlyingResource().getProject();
 		HashSet set = new HashSet();
-		for (int i = 0; i < libraries.length; i++)
-			set.add(new Path(ClasspathUtilCore.expandLibraryName(libraries[i].getName())));
+		for (int i = 0; i < libraries.length; i++) {
+			IPath bundlePath = new Path(ClasspathUtilCore.expandLibraryName(libraries[i].getName()));
+			IPath buildPath = PDEProject.getBundleRoot(project).getProjectRelativePath().append(bundlePath);
+			set.add(buildPath);
+		}
 
 		dialog.addFilter(new LibraryFilter(set));
-		IProject project = ((IModel) getPage().getModel()).getUnderlyingResource().getProject();
 		dialog.setInput(project);
 		dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		dialog.create();
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IHelpContextIds.ADD_LIBRARY);
 		if (dialog.open() == Window.OK) {
 			Object[] elements = dialog.getResult();
-			String[] filePaths = new String[elements.length];
+			String[] bundlePaths = new String[elements.length];
+			String[] buildPaths = new String[elements.length];
 			IPluginModelBase model = getModel();
 			ArrayList list = new ArrayList();
 			for (int i = 0; i < elements.length; i++) {
 				IResource elem = (IResource) elements[i];
-				IPath path = elem.getProjectRelativePath();
-				if (elem instanceof IFolder)
-					path = path.addTrailingSeparator();
-				filePaths[i] = path.toString();
+				IContainer bundleRoot = PDEProject.getBundleRoot(project);
+				IPath rootPath = bundleRoot.getFullPath();
+				// make path relative to bundle root
+				IPath bundlePath = elem.getFullPath().makeRelativeTo(rootPath);
+				IPath buildPath = elem.getProjectRelativePath();
+				if (elem instanceof IFolder) {
+					bundlePath = bundlePath.addTrailingSeparator();
+					buildPath = buildPath.addTrailingSeparator();
+				}
+				bundlePaths[i] = bundlePath.toString();
+				buildPaths[i] = buildPath.toString();
 				IPluginLibrary library = model.getPluginFactory().createLibrary();
 				try {
-					library.setName(filePaths[i]);
+					library.setName(bundlePaths[i]);
 					library.setExported(true);
 					model.getPluginBase().add(library);
 					list.add(library);
@@ -466,9 +478,9 @@ public class LibrarySection extends TableSection implements IModelChangedListene
 				}
 			}
 			checkSourceRootEntry();
-			updateBuildProperties(new String[filePaths.length], filePaths, false);
+			updateBuildProperties(new String[bundlePaths.length], bundlePaths, false);
 			if (updateClasspath[0])
-				updateJavaClasspathLibs(new String[filePaths.length], filePaths);
+				updateJavaClasspathLibs(new String[buildPaths.length], buildPaths);
 			fLibraryTable.setSelection(new StructuredSelection(list.toArray()));
 			fLibraryTable.getTable().setFocus();
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
index 9e4853f..a027aca 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.build.IBuildObject;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelProvider;
 import org.eclipse.pde.internal.core.plugin.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.*;
@@ -168,15 +169,15 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		boolean fragment = false;
 
 		String name = file.getName().toLowerCase(Locale.ENGLISH);
-		if (name.equals("manifest.mf")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.MANIFEST_FILENAME_LOWER_CASE)) {
 			if (container instanceof IFolder)
 				container = container.getParent();
 			manifestFile = file;
 			buildFile = container.getFile(ICoreConstants.BUILD_PROPERTIES_PATH);
 			pluginFile = createPluginFile(container);
-		} else if (name.equals("plugin.xml") || name.equals("fragment.xml")) { //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			pluginFile = file;
-			fragment = name.equals("fragment.xml"); //$NON-NLS-1$
+			fragment = name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
 			buildFile = container.getFile(ICoreConstants.BUILD_PROPERTIES_PATH);
 			manifestFile = container.getFile(ICoreConstants.MANIFEST_PATH);
 		}
@@ -213,22 +214,22 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		if (fInputContextManager == null)
 			return;
 		String name = file.getName();
-		if (name.equalsIgnoreCase("MANIFEST.MF")) { //$NON-NLS-1$
+		if (name.equalsIgnoreCase(ICoreConstants.MANIFEST_FILENAME)) {
 			if (!fInputContextManager.hasContext(BundleInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new BundleInputContext(this, in, false));
 			}
-		} else if (name.equalsIgnoreCase("plugin.xml")) { //$NON-NLS-1$
+		} else if (name.equalsIgnoreCase(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR)) {
 			if (!fInputContextManager.hasContext(PluginInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new PluginInputContext(this, in, false, false));
 			}
-		} else if (name.equalsIgnoreCase("fragment.xml")) { //$NON-NLS-1$
+		} else if (name.equalsIgnoreCase(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			if (!fInputContextManager.hasContext(PluginInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new PluginInputContext(this, in, false, true));
 			}
-		} else if (name.equalsIgnoreCase("build.properties")) { //$NON-NLS-1$
+		} else if (name.equalsIgnoreCase(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			if (!fInputContextManager.hasContext(BuildInputContext.CONTEXT_ID)) {
 				IEditorInput in = new FileEditorInput(file);
 				fInputContextManager.putContext(in, new BuildInputContext(this, in, false));
@@ -240,13 +241,15 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		if (fInputContextManager.hasContext(PluginInputContext.CONTEXT_ID))
 			return;
 		IProject project = fInputContextManager.getCommonProject();
-		String name = (fInputContextManager.getAggregateModel() instanceof IFragmentModel) ? ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR : ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR;
-		IFile file = project.getFile(name);
-		WorkspacePluginModelBase model;
-		if (name.equals("fragment.xml")) //$NON-NLS-1$
+		WorkspacePluginModelBase model = null;
+		IFile file = null;
+		if (fInputContextManager.getAggregateModel() instanceof IFragmentModel) {
+			file = PDEProject.getFragmentXml(project);
 			model = new WorkspaceFragmentModel(file, false);
-		else
+		} else {
+			file = PDEProject.getPluginXml(project);
 			model = new WorkspacePluginModel(file, false);
+		}
 
 		IPluginBase pluginBase = model.getPluginBase(true);
 		try {
@@ -257,7 +260,7 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		IEditorInput in = new FileEditorInput(file);
 		fInputContextManager.putContext(in, new PluginInputContext(this, in, false, false));
 
-		updateBuildProperties(name);
+		updateBuildProperties(file.getName());
 	}
 
 	private void updateBuildProperties(String filename) {
@@ -323,17 +326,17 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		File buildFile = null;
 		File pluginFile = null;
 		String name = file.getName().toLowerCase(Locale.ENGLISH);
-		if (name.equals("manifest.mf")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.MANIFEST_FILENAME_LOWER_CASE)) {
 			manifestFile = file;
 			File dir = file.getParentFile().getParentFile();
-			buildFile = new File(dir, "build.properties"); //$NON-NLS-1$
+			buildFile = new File(dir, ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
 			pluginFile = createPluginFile(dir);
-		} else if (name.equals("build.properties")) { //$NON-NLS-1$
+		} else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			buildFile = file;
 			File dir = file.getParentFile();
 			pluginFile = createPluginFile(dir);
 			manifestFile = new File(dir, ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
-		} else if (name.equals("plugin.xml") || name.equals("fragment.xml")) { //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			pluginFile = file;
 			File dir = file.getParentFile();
 			buildFile = new File(dir, ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
@@ -348,7 +351,7 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 			if (pluginFile.exists()) {
 				IFileStore store = EFS.getStore(pluginFile.toURI());
 				IEditorInput in = new FileStoreEditorInput(store);
-				manager.putContext(in, new PluginInputContext(this, in, file == pluginFile, name.equals("fragment.xml"))); //$NON-NLS-1$
+				manager.putContext(in, new PluginInputContext(this, in, file == pluginFile, name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)));
 			}
 			if (buildFile.exists()) {
 				IFileStore store = EFS.getStore(buildFile.toURI());
@@ -381,13 +384,13 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		}
 
 		String name = input.getName().toLowerCase(Locale.ENGLISH);
-		if (name.startsWith("manifest.mf")) { //$NON-NLS-1$
+		if (name.startsWith(ICoreConstants.MANIFEST_FILENAME_LOWER_CASE)) {
 			manager.putContext(input, new BundleInputContext(this, input, true));
-		} else if (name.startsWith("build.properties")) { //$NON-NLS-1$
+		} else if (name.startsWith(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			manager.putContext(input, new BuildInputContext(this, input, true));
-		} else if (name.startsWith("plugin.xml")) { //$NON-NLS-1$
+		} else if (name.startsWith(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR)) {
 			manager.putContext(input, new PluginInputContext(this, input, true, false));
-		} else if (name.startsWith("fragment.xml")) { //$NON-NLS-1$
+		} else if (name.startsWith(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			manager.putContext(input, new PluginInputContext(this, input, true, true));
 		}
 	}
@@ -401,20 +404,20 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 
 			if (zip.getEntry(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR) != null) {
 				input = new JarEntryEditorInput(new JarEntryFile(zip, ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR));
-				manager.putContext(input, new BundleInputContext(this, input, storage.getName().equals("MANIFEST.MF"))); //$NON-NLS-1$
+				manager.putContext(input, new BundleInputContext(this, input, storage.getName().equals(ICoreConstants.MANIFEST_FILENAME)));
 			}
 
 			if (zip.getEntry(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) != null) {
 				input = new JarEntryEditorInput(new JarEntryFile(zip, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR));
-				manager.putContext(input, new PluginInputContext(this, input, storage.getName().equals("plugin.xml"), false)); //$NON-NLS-1$
+				manager.putContext(input, new PluginInputContext(this, input, storage.getName().equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR), false));
 			} else if (zip.getEntry(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) != null) {
 				input = new JarEntryEditorInput(new JarEntryFile(zip, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR));
-				manager.putContext(input, new PluginInputContext(this, input, storage.getName().equals("fragment.xml"), true)); //$NON-NLS-1$
+				manager.putContext(input, new PluginInputContext(this, input, storage.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR), true));
 			}
 
 			if (zip.getEntry(ICoreConstants.BUILD_FILENAME_DESCRIPTOR) != null) {
 				input = new JarEntryEditorInput(new JarEntryFile(zip, ICoreConstants.BUILD_FILENAME_DESCRIPTOR));
-				manager.putContext(input, new BuildInputContext(this, input, storage.getName().equals("build.properties"))); //$NON-NLS-1$
+				manager.putContext(input, new BuildInputContext(this, input, storage.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)));
 			}
 		} finally {
 			try {
@@ -616,11 +619,11 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 		InputContext context = null;
 		if (object instanceof IFile) {
 			String name = ((IFile) object).getName();
-			if (name.equals("plugin.xml") || name.equals("fragment.xml")) //$NON-NLS-1$ //$NON-NLS-2$
+			if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 				context = fInputContextManager.findContext(PluginInputContext.CONTEXT_ID);
-			else if (name.equals("MANIFEST.MF")) //$NON-NLS-1$
+			else if (name.equals(ICoreConstants.MANIFEST_FILENAME))
 				context = fInputContextManager.findContext(BundleInputContext.CONTEXT_ID);
-			else if (name.equals("build.properties")) //$NON-NLS-1$
+			else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR))
 				context = fInputContextManager.findContext(BuildInputContext.CONTEXT_ID);
 		} else if (object instanceof IBuildObject) {
 			context = fInputContextManager.findContext(BuildInputContext.CONTEXT_ID);
@@ -640,10 +643,10 @@ public class ManifestEditor extends PDELauncherFormEditor implements IShowEditor
 	public void showEditorInput(IEditorInput editorInput) {
 		String name = editorInput.getName();
 		String id = getActivePageInstance().getId();
-		if (name.equals("build.properties")) { //$NON-NLS-1$
+		if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			if (!BuildInputContext.CONTEXT_ID.equals(id))
 				setActivePage(SHOW_SOURCE ? BuildInputContext.CONTEXT_ID : BuildPage.PAGE_ID);
-		} else if (name.equals("plugin.xml") || name.equals("fragment.xml")) { //$NON-NLS-1$ //$NON-NLS-2$
+		} else if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			if (!PluginInputContext.CONTEXT_ID.equals(id)) {
 				if (SHOW_SOURCE) {
 					setActivePage(PluginInputContext.CONTEXT_ID);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
index f570fc7..82de1b6 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/ManifestEditorMatchingStrategy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class ManifestEditorMatchingStrategy implements IEditorMatchingStrategy {
 
 				// If a MANIFEST.MF file is being opened, make sure we return a positive match
 				// only if it is colocated with the plugin.xml/fragment.xml file already open
-				if (inputFile.getName().equals("MANIFEST.MF")) { //$NON-NLS-1$
+				if (inputFile.getName().equals(ICoreConstants.MANIFEST_FILENAME)) {
 					IContainer parent = inputFile.getParent();
 					return parent instanceof IFolder && parent.getName().equals("META-INF") //$NON-NLS-1$
 							&& parent.getParent().equals(editorFile.getParent());
@@ -42,7 +42,7 @@ public class ManifestEditorMatchingStrategy implements IEditorMatchingStrategy {
 
 				// if a plugin.xml/fragment.xml is being opened, make sure we return a positive match
 				// only if the editor that is open is associated with a colocated MANIFEST.MF
-				if (inputFile.getName().equals("plugin.xml") || inputFile.getName().equals("fragment.xml")) { //$NON-NLS-1$ //$NON-NLS-2$
+				if (inputFile.getName().equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || inputFile.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 					IContainer parent = inputFile.getParent();
 					IFile file = parent.getFile(ICoreConstants.MANIFEST_PATH);
 					return file.exists() && editorFile.equals(file);
@@ -50,10 +50,10 @@ public class ManifestEditorMatchingStrategy implements IEditorMatchingStrategy {
 
 				// if a build.properties is being opened, only return a positive match
 				// if an editor is already open on a sibling plugin.xml/fragment.xml or a META-INF/MANIFEST.MF
-				if (inputFile.getName().equals("build.properties")) { //$NON-NLS-1$ 
+				if (inputFile.getName().equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 					IContainer parent = inputFile.getParent();
 					if (parent.equals(editorFile.getParent())) {
-						return editorFile.getName().equals("plugin.xml") || editorFile.getName().equals("fragment.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+						return editorFile.getName().equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || editorFile.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR);
 					}
 					IFile file = parent.getFile(ICoreConstants.MANIFEST_PATH);
 					return file.exists() && editorFile.equals(file);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
index 45b6dca..bd256e9 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/OverviewPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jface.window.Window;
 import org.eclipse.pde.core.build.*;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.build.BuildInputContext;
@@ -54,7 +55,7 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/overview.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_PLUGIN_OVERVIEW;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
@@ -209,7 +210,7 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
 			if (!getPDEEditor().hasInputContext(BuildInputContext.CONTEXT_ID)) {
 				if (!MessageDialog.openQuestion(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.OverviewPage_buildTitle, PDEUIMessages.OverviewPage_buildQuestion))
 					return;
-				IFile file = getPDEEditor().getCommonProject().getFile("build.properties"); //$NON-NLS-1$
+				IFile file = PDEProject.getBuildProperties(getPDEEditor().getCommonProject());
 				WorkspaceBuildModel model = new WorkspaceBuildModel(file);
 				model.save();
 				IEditorInput in = new FileEditorInput(file);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PluginExportAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PluginExportAction.java
index 972607c..ce863ec 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PluginExportAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/PluginExportAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -11,7 +11,9 @@
 package org.eclipse.pde.internal.ui.editor.plugin;
 
 import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -20,11 +22,14 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.pde.core.IModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
 import org.eclipse.pde.internal.ui.wizards.ResizableWizardDialog;
 import org.eclipse.pde.internal.ui.wizards.exports.PluginExportWizard;
+import org.eclipse.ui.IWorkbenchWizard;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.wizards.IWizardDescriptor;
 
 /**
  *
@@ -58,15 +63,37 @@ public class PluginExportAction extends Action {
 	public void run() {
 		if (fEditor != null)
 			ensureContentSaved();
-		PluginExportWizard wizard = new PluginExportWizard();
 		IStructuredSelection selection;
 		IResource resource = null;
 		if (fEditor != null)
 			resource = ((IModel) fEditor.getAggregateModel()).getUnderlyingResource();
-		if (resource != null)
+		String customWizard = null;
+		if (resource != null) {
 			selection = new StructuredSelection(resource);
-		else
+			IProject project = resource.getProject();
+			if (project != null) {
+				// a project can override the default export wizard
+				customWizard = PDEProject.getExportWizard(project);
+			}
+		} else {
 			selection = new StructuredSelection();
+		}
+		IWorkbenchWizard wizard = null;
+		if (customWizard != null) {
+			IWizardDescriptor descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(customWizard);
+			if (descriptor != null) {
+				try {
+					wizard = descriptor.createWizard();
+				} catch (CoreException e) {
+					PDEPlugin.log(e);
+					notifyResult(false);
+					return;
+				}
+			}
+		}
+		if (wizard == null) {
+			wizard = new PluginExportWizard();
+		}
 		wizard.init(PlatformUI.getWorkbench(), selection);
 		WizardDialog wd = new ResizableWizardDialog(PDEPlugin.getActiveWorkbenchShell(), wizard);
 		wd.create();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RuntimePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RuntimePage.java
index 004baf9..3d239e1 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RuntimePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/plugin/RuntimePage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.plugin;
@@ -30,7 +30,9 @@ public class RuntimePage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/manifest_editor/runtime.htm"; //$NON-NLS-1$
+		if (((IPluginModelBase) getPDEEditor().getAggregateModel()).isFragmentModel())
+			return IHelpContextIds.MANIFEST_FRAGMENT_RUNTIME;
+		return IHelpContextIds.MANIFEST_PLUGIN_RUNTIME;
 	}
 
 	protected void createFormContent(IManagedForm mform) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/BrandingPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/BrandingPage.java
index eb5d9b4..2aa8d20 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/BrandingPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/BrandingPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.product;
@@ -32,7 +32,7 @@ public class BrandingPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/branding.htm"; //$NON-NLS-1$
+		return IHelpContextIds.BRANDING_PAGE;
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/DependenciesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/DependenciesPage.java
index c382dd9..76f93ea 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/DependenciesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/DependenciesPage.java
@@ -38,7 +38,7 @@ public class DependenciesPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/configuration.htm"; //$NON-NLS-1$
+		return IHelpContextIds.CONFIGURATION_PAGE;
 	}
 
 	/* (non-Javadoc) 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/JRESection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/JRESection.java
index 56d0f2c..da2714a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/JRESection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/JRESection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,8 +37,7 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.*;
 
 public class JRESection extends PDESection {
 
@@ -107,20 +106,9 @@ public class JRESection extends PDESection {
 		});
 		fTabFolder.setUnselectedImageVisible(false);
 
-		fEEButton = toolkit.createButton(client, PDEUIMessages.ProductJRESection_eeName, SWT.CHECK);
-		fEEButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				fEEsCombo.setEnabled(fEEButton.getSelection());
-				if (fEEButton.getSelection()) {
-					updateWidgets();
-					if (fEEsCombo.getSelection() == null)
-						fEEsCombo.select(0);
-					else
-						setEE((IExecutionEnvironment) fEEsCombo.getSelection());
-				}
-			}
-		});
-		fEEButton.setEnabled(isEditable());
+		FormText text = toolkit.createFormText(client, false);
+		text.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+		text.setText(PDEUIMessages.ProductJRESection_eeName, false, false);
 
 		fEEsCombo = new ComboViewerPart();
 		fEEsCombo.createControl(client, toolkit, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
@@ -128,10 +116,13 @@ public class JRESection extends PDESection {
 		fEEsCombo.setLabelProvider(new EELabelProvider());
 		fEEsCombo.setComparator(new ViewerComparator());
 		fEEsCombo.setItems(VMUtil.getExecutionEnvironments());
+		fEEsCombo.addItem("", 0); //$NON-NLS-1$
 		fEEsCombo.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
 				if (!fBlockChanges) {
-					setEE((IExecutionEnvironment) ((IStructuredSelection) event.getSelection()).getFirstElement());
+					Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
+					setEE(selection instanceof IExecutionEnvironment ? (IExecutionEnvironment) selection : null);
+					fEEButton.setEnabled(selection instanceof IExecutionEnvironment);
 				}
 			}
 		});
@@ -147,6 +138,17 @@ public class JRESection extends PDESection {
 		});
 		fExecutionEnvironmentsButton.setEnabled(isEditable());
 
+		fEEButton = toolkit.createButton(client, PDEUIMessages.ProdctJRESection_bundleJRE, SWT.CHECK);
+		GridData buttonLayout = new GridData(GridData.FILL_HORIZONTAL);
+		buttonLayout.horizontalSpan = 2;
+		fEEButton.setLayoutData(buttonLayout);
+		fEEButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				getJVMLocations().setIncludeJREWithProduct(getOS(fLastTab), fEEButton.getSelection());
+			}
+		});
+		fEEButton.setEnabled(isEditable());
+
 		createTabs();
 		toolkit.paintBordersFor(client);
 		section.setClient(client);
@@ -200,6 +202,7 @@ public class JRESection extends PDESection {
 	public void refresh() {
 		fBlockChanges = true;
 		fLastTab = fTabFolder.getSelectionIndex();
+		fEEButton.setSelection(getJVMLocations().includeJREWithProduct(getOS(fLastTab)));
 		IPath jrePath = getJVMLocations().getJREContainerPath(getOS(fLastTab));
 		if (jrePath != null) {
 			String eeID = JavaRuntime.getExecutionEnvironmentId(jrePath);
@@ -208,16 +211,13 @@ public class JRESection extends PDESection {
 				if (!fEEsCombo.getItems().contains(env))
 					fEEsCombo.addItem(env);
 				fEEsCombo.select(env);
-				fEEButton.setSelection(true);
 			} else {
 				IVMInstall install = JavaRuntime.getVMInstall(jrePath);
 				if (install != null) {
-					fEEButton.setSelection(false);
 					fEEsCombo.select(null);
 				}
 			}
 		} else {
-			fEEButton.setSelection(false);
 			fEEsCombo.select(null);
 		}
 		updateWidgets();
@@ -255,7 +255,7 @@ public class JRESection extends PDESection {
 	}
 
 	protected void updateWidgets() {
-		fEEsCombo.setEnabled(isEditable() && fEEButton.getSelection());
+		fEEButton.setEnabled(isEditable() && fEEsCombo.getSelection() instanceof IExecutionEnvironment);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/LaunchingPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/LaunchingPage.java
index f73de0c..a871953 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/LaunchingPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/LaunchingPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.product;
@@ -32,7 +32,7 @@ public class LaunchingPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/launching.htm"; //$NON-NLS-1$
+		return IHelpContextIds.LAUNCHING_PAGE;
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/OverviewPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/OverviewPage.java
index d6cecc1..c8b98b4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/OverviewPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/OverviewPage.java
@@ -32,7 +32,7 @@ public class OverviewPage extends LaunchShortcutOverviewPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/overview.htm"; //$NON-NLS-1$
+		return IHelpContextIds.OVERVIEW_PAGE;
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductValidateAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductValidateAction.java
index ba8e8f5..a18683f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductValidateAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ProductValidateAction.java
@@ -21,8 +21,8 @@ import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.iproduct.*;
+import org.eclipse.pde.internal.launching.launcher.*;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.*;
 
 public class ProductValidateAction extends Action {
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/SplashPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/SplashPage.java
index 2bb2831..8c46418 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/SplashPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/SplashPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
@@ -29,9 +29,6 @@ public class SplashPage extends PDEFormPage {
 
 	public static final String PAGE_ID = "splash"; //$NON-NLS-1$
 
-	/**
-	 * @param editor
-	 */
 	public SplashPage(FormEditor editor) {
 		super(editor, PAGE_ID, PDEUIMessages.SplashPage_splashName);
 	}
@@ -40,8 +37,7 @@ public class SplashPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		// TODO: MP: SPLASH: Update help document reference in header
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/product_editor/splash.htm"; //$NON-NLS-1$
+		return IHelpContextIds.SPLASH_PAGE;
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/VersionDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/VersionDialog.java
index 061ef2d..d20c97c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/VersionDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/VersionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 Code 9 Corporation and others.
+ * Copyright (c) 2008, 2010 Code 9 Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,7 @@ public class VersionDialog extends StatusDialog {
 			}
 		};
 		fVersionPart.setVersion(version);
+		setTitle(PDEUIMessages.VersionDialog_title);
 	}
 
 	protected Control createDialogArea(Composite parent) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaFormPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaFormPage.java
index 711d2fd..eb34d3f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaFormPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaFormPage.java
@@ -14,7 +14,8 @@ import org.eclipse.jface.action.ControlContribution;
 import org.eclipse.pde.core.IModelChangedEvent;
 import org.eclipse.pde.core.IModelChangedListener;
 import org.eclipse.pde.internal.core.ischema.*;
-import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.IHelpContextIds;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.search.ShowDescriptionAction;
 import org.eclipse.swt.SWT;
@@ -100,7 +101,7 @@ public class SchemaFormPage extends PDEFormPage implements IModelChangedListener
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/schema_editor/page_schema_definition.htm"; //$NON-NLS-1$
+		return IHelpContextIds.SCHEMA_EDITOR_MAIN;
 	}
 
 	protected void createFormContent(IManagedForm managedForm) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaOverviewPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaOverviewPage.java
index 2aa5866..9c50a8d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaOverviewPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaOverviewPage.java
@@ -12,7 +12,8 @@ package org.eclipse.pde.internal.ui.editor.schema;
 
 import org.eclipse.jface.action.ControlContribution;
 import org.eclipse.pde.internal.core.ischema.ISchema;
-import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.IHelpContextIds;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.text.ColorManager;
 import org.eclipse.pde.internal.ui.editor.text.IColorManager;
@@ -51,7 +52,7 @@ public class SchemaOverviewPage extends PDEFormPage {
 	 * @see org.eclipse.pde.internal.ui.editor.PDEFormPage#getHelpResource()
 	 */
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/schema_editor/page_schema_overview.htm"; //$NON-NLS-1$
+		return IHelpContextIds.SCHEMA_EDITOR_DOC;
 	}
 
 	public void setActive(boolean active) {
@@ -88,9 +89,6 @@ public class SchemaOverviewPage extends PDEFormPage {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.SCHEMA_EDITOR_DOC);
 	}
 
-	/**
-	 * @return
-	 */
 	private ControlContribution createUIControlConPreviewRefDoc() {
 		return new ControlContribution("Preview") { //$NON-NLS-1$
 			protected Control createControl(Composite parent) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchivePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchivePage.java
index f8f3ebb..1f11a2a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchivePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/ArchivePage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.site;
@@ -49,6 +49,6 @@ public class ArchivePage extends PDEFormPage {
 	}
 
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/site_editor/archives.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_SITE_ARCHIVES;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
index 5423c65..8d8a1f3 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/CategorySection.java
@@ -1,18 +1,16 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Bartosz Michalik <bartosz.michalik at gmail.com> - bug 181878
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.site;
 
-import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog;
-
 import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.action.*;
@@ -25,6 +23,7 @@ import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.isite.*;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog;
 import org.eclipse.pde.internal.ui.editor.*;
 import org.eclipse.pde.internal.ui.editor.feature.FeatureEditor;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
@@ -277,7 +276,12 @@ public class CategorySection extends TreeSection implements IFeatureModelListene
 	private void copyFeature(SiteFeatureAdapter adapter, Object target) {
 		ISiteFeature feature = findRealFeature(adapter);
 		if (feature == null) {
-			return;
+			try {
+				feature = copySiteFeature(fModel, adapter.feature);
+				fModel.getSite().addFeatures(new ISiteFeature[] {feature});
+			} catch (CoreException ce) {
+				return;
+			}
 		}
 		/*
 		 * if (adapter.category == null) { moveFeature(adapter, target); } else
@@ -789,4 +793,25 @@ public class CategorySection extends TreeSection implements IFeatureModelListene
 	public void modelsChanged(IFeatureModelDelta delta) {
 		markStale();
 	}
+
+	/**
+	 * Creates a new site feature instance with the same settings as the given source feature.
+	 * 
+	 * @param model site model to create the feature from
+	 * @param sourceFeature the feature to copy settings out of
+	 * @return a new site feature instance
+	 * @throws CoreException
+	 */
+	private ISiteFeature copySiteFeature(ISiteModel model, ISiteFeature sourceFeature) throws CoreException {
+		ISiteFeature sfeature = model.getFactory().createFeature();
+		sfeature.setId(sourceFeature.getId());
+		sfeature.setVersion(sourceFeature.getVersion());
+		sfeature.setURL(sourceFeature.getURL());
+		sfeature.setOS(sourceFeature.getOS());
+		sfeature.setWS(sourceFeature.getWS());
+		sfeature.setArch(sourceFeature.getArch());
+		sfeature.setNL(sourceFeature.getNL());
+		sfeature.setIsPatch(sourceFeature.isPatch());
+		return sfeature;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/FeaturesPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/FeaturesPage.java
index 9df3306..9bdfc05 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/FeaturesPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/site/FeaturesPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.site;
@@ -101,6 +101,6 @@ public class FeaturesPage extends PDEFormPage {
 	}
 
 	protected String getHelpResource() {
-		return IPDEUIConstants.PLUGIN_DOC_ROOT + "guide/tools/editors/site_editor/site_map.htm"; //$NON-NLS-1$
+		return IHelpContextIds.MANIFEST_SITE_FEATURES;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ArgumentsSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ArgumentsSection.java
index 9163f16..66a45ab 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ArgumentsSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ArgumentsSection.java
@@ -26,6 +26,7 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.IFormColors;
@@ -130,7 +131,12 @@ public class ArgumentsSection extends SectionPart {
 		});
 
 		Composite buttons = new Composite(vmComp, SWT.NONE);
-		buttons.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
+		GridLayout layout = FormLayoutFactory.createSectionClientGridLayout(false, 2);
+		layout.marginTop = 0;
+		layout.marginBottom = 0;
+		layout.marginRight = 0;
+		layout.marginLeft = 0;
+		buttons.setLayout(layout);
 		buttons.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
 		Button vmArgs = toolkit.createButton(buttons, PDEUIMessages.ArgumentsSection_argumentsButtonTitle, SWT.NONE);
 		vmArgs.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentPage.java
index 02a18de..e1d2478 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,6 +57,7 @@ public class ContentPage extends FormPage {
 		((TargetEditor) getEditor()).addForm(managedForm);
 		form.updateToolBar();
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_CONTENT_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(form, IHelpContextIds.TARGET_EDITOR_CONTENT_PAGE);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentSection.java
index 0ceb713..4066933 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ContentSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@ public class ContentSection extends SectionPart {
 		client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 1));
 		client.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
 
-		fContentGroup = new TargetContentsGroup(client, toolkit);
+		fContentGroup = TargetContentsGroup.createInForm(client, toolkit);
 		fEditor.getTargetChangedListener().setContentTree(fContentGroup);
 		fContentGroup.addTargetChangedListener(fEditor.getTargetChangedListener());
 		fContentGroup.addTargetChangedListener(new ITargetChangedListener() {
@@ -80,7 +80,8 @@ public class ContentSection extends SectionPart {
 	 * @see org.eclipse.ui.forms.AbstractFormPart#refresh()
 	 */
 	public void refresh() {
-		fContentGroup.setInput(getTarget());
+		// Use the change listener as it can check if we are resolved, resolving, or cancelled bug 264908
+		fEditor.getTargetChangedListener().contentsChanged(getTarget(), this, false, false);
 		super.refresh();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java
index 47b1c92..f4f2874 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/DefinitionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -63,6 +63,7 @@ public class DefinitionPage extends FormPage implements IHyperlinkListener {
 		((TargetEditor) getEditor()).addForm(managedForm);
 		form.updateToolBar();
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_DEFINITION_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(form, IHelpContextIds.TARGET_EDITOR_DEFINITION_PAGE);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentPage.java
index 7fc13bd..e796b2f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,7 @@ public class EnvironmentPage extends FormPage {
 		((TargetEditor) getEditor()).addForm(managedForm);
 		form.updateToolBar();
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(form.getBody(), IHelpContextIds.TARGET_EDITOR_ENVIRONMENT_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(form, IHelpContextIds.TARGET_EDITOR_ENVIRONMENT_PAGE);
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentSection.java
index 53d014f..1ac05e4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/EnvironmentSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,7 +74,7 @@ public class EnvironmentSection extends SectionPart {
 	 */
 	protected void createClient(Section section, FormToolkit toolkit) {
 		section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
-		section.setText(PDEUIMessages.EnvironmentSection_title);
+		section.setText(PDEUIMessages.EnvironmentBlock_targetEnv);
 		section.setDescription(PDEUIMessages.EnvironmentSection_description);
 		GridData data = new GridData(GridData.FILL_HORIZONTAL);
 		data.verticalAlignment = SWT.TOP;
@@ -144,45 +144,20 @@ public class EnvironmentSection extends SectionPart {
 				getTarget().setOS(getText(fOSCombo));
 			}
 		});
-		// see bug 292068
-		fOSCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				markDirty();
-				getTarget().setOS(getText(fOSCombo));
-			}
-		});
-
 		fWSCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				markDirty();
 				getTarget().setWS(getText(fWSCombo));
 			}
 		});
-		// see bug 292068
-		fWSCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				markDirty();
-				getTarget().setWS(getText(fWSCombo));
-			}
-		});
-
 		fArchCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				markDirty();
 				getTarget().setArch(getText(fArchCombo));
 			}
 		});
-		// see bug 292068
-		fArchCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				markDirty();
-				getTarget().setArch(getText(fArchCombo));
-			}
-		});
-
 		fNLCombo.getControl().addFocusListener(new FocusAdapter() {
 			public void focusGained(FocusEvent event) {
-
 				// if we haven't gotten all the values for the NL's, display a busy cursor to the user while we find them.
 				if (!LOCALES_INITIALIZED) {
 					try {
@@ -223,22 +198,6 @@ public class EnvironmentSection extends SectionPart {
 							markDirty();
 						}
 					});
-
-					// see bug 292068
-					fNLCombo.addSelectionListener(new SelectionAdapter() {
-						public void widgetSelected(SelectionEvent e) {
-							String value = getText(fNLCombo);
-							if (value == null) {
-								getTarget().setNL(null);
-							} else {
-								int index = value.indexOf("-"); //$NON-NLS-1$
-								if (index > 0)
-									value = value.substring(0, index);
-								getTarget().setNL(value.trim());
-							}
-							markDirty();
-						}
-					});
 				}
 
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java
index 173f7f8..52beaf5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/ImplicitDependenciesSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,11 @@ package org.eclipse.pde.internal.ui.editor.targetdefinition;
 import java.util.*;
 import java.util.List;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
-import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
+import org.eclipse.pde.internal.core.target.provisional.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
 import org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor;
@@ -107,9 +106,9 @@ public class ImplicitDependenciesSection extends SectionPart {
 		fViewer = new TableViewer(table);
 		fViewer.setContentProvider(new DefaultTableProvider() {
 			public Object[] getElements(Object inputElement) {
-				BundleInfo[] bundles = getTarget().getImplicitDependencies();
+				NameVersionDescriptor[] bundles = getTarget().getImplicitDependencies();
 				if (bundles == null) {
-					return new BundleInfo[0];
+					return new NameVersionDescriptor[0];
 				}
 				return bundles;
 			}
@@ -117,9 +116,9 @@ public class ImplicitDependenciesSection extends SectionPart {
 		fViewer.setLabelProvider(new StyledBundleLabelProvider(true, false));
 		fViewer.setComparator(new ViewerComparator() {
 			public int compare(Viewer viewer, Object e1, Object e2) {
-				BundleInfo bundle1 = (BundleInfo) e1;
-				BundleInfo bundle2 = (BundleInfo) e2;
-				return super.compare(viewer, bundle1.getSymbolicName(), bundle2.getSymbolicName());
+				NameVersionDescriptor bundle1 = (NameVersionDescriptor) e1;
+				NameVersionDescriptor bundle2 = (NameVersionDescriptor) e2;
+				return super.compare(viewer, bundle1.getId(), bundle2.getId());
 			}
 		});
 		fViewer.setInput(getTarget());
@@ -131,7 +130,7 @@ public class ImplicitDependenciesSection extends SectionPart {
 		fViewer.addDoubleClickListener(new IDoubleClickListener() {
 			public void doubleClick(DoubleClickEvent event) {
 				Object object = ((IStructuredSelection) event.getSelection()).getFirstElement();
-				ManifestEditor.openPluginEditor(((BundleInfo) object).getSymbolicName());
+				ManifestEditor.openPluginEditor(((NameVersionDescriptor) object).getId());
 			}
 		});
 	}
@@ -206,15 +205,15 @@ public class ImplicitDependenciesSection extends SectionPart {
 			ArrayList pluginsToAdd = new ArrayList();
 			for (int i = 0; i < models.length; i++) {
 				BundleInfo selected = ((BundleInfo) models[i]);
-				pluginsToAdd.add(new BundleInfo(selected.getSymbolicName(), null, null, BundleInfo.NO_LEVEL, false));
+				pluginsToAdd.add(new NameVersionDescriptor(selected.getSymbolicName(), null));
 			}
 			Set allDependencies = new HashSet();
 			allDependencies.addAll(pluginsToAdd);
-			BundleInfo[] currentBundles = getTarget().getImplicitDependencies();
+			NameVersionDescriptor[] currentBundles = getTarget().getImplicitDependencies();
 			if (currentBundles != null) {
 				allDependencies.addAll(Arrays.asList(currentBundles));
 			}
-			getTarget().setImplicitDependencies((BundleInfo[]) allDependencies.toArray(new BundleInfo[allDependencies.size()]));
+			getTarget().setImplicitDependencies((NameVersionDescriptor[]) allDependencies.toArray(new NameVersionDescriptor[allDependencies.size()]));
 			markDirty();
 			refresh();
 		}
@@ -225,11 +224,11 @@ public class ImplicitDependenciesSection extends SectionPart {
 	 * @return list of possible dependencies
 	 */
 	protected BundleInfo[] getValidBundles() throws CoreException {
-		BundleInfo[] current = getTarget().getImplicitDependencies();
+		NameVersionDescriptor[] current = getTarget().getImplicitDependencies();
 		Set currentBundles = new HashSet();
 		if (current != null) {
 			for (int i = 0; i < current.length; i++) {
-				currentBundles.add(current[i].getSymbolicName());
+				currentBundles.add(current[i].getId());
 			}
 		}
 
@@ -253,11 +252,11 @@ public class ImplicitDependenciesSection extends SectionPart {
 		Object[] removeBundles = ((IStructuredSelection) fViewer.getSelection()).toArray();
 		if (removeBundles.length > 0) {
 			for (int i = 0; i < removeBundles.length; i++) {
-				if (removeBundles[i] instanceof BundleInfo) {
+				if (removeBundles[i] instanceof NameVersionDescriptor) {
 					bundles.remove(removeBundles[i]);
 				}
 			}
-			getTarget().setImplicitDependencies((BundleInfo[]) bundles.toArray((new BundleInfo[bundles.size()])));
+			getTarget().setImplicitDependencies((NameVersionDescriptor[]) bundles.toArray((new NameVersionDescriptor[bundles.size()])));
 			markDirty();
 			refresh();
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/JRESection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/JRESection.java
index 5a153b0..ecf8e40 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/JRESection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/JRESection.java
@@ -71,7 +71,7 @@ public class JRESection extends SectionPart {
 	 * @param toolkit form toolkit used to create the widgets
 	 */
 	protected void createClient(Section section, FormToolkit toolkit) {
-		section.setText(PDEUIMessages.JRESection_title);
+		section.setText(PDEUIMessages.EnvironmentBlock_jreTitle);
 		section.setDescription(PDEUIMessages.JRESection_description);
 		section.setLayout(FormLayoutFactory.createClearGridLayout(false, 1));
 		GridData data = new GridData(GridData.FILL_HORIZONTAL);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/LocationsSection.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/LocationsSection.java
index 327f6a5..7fe1ac2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/LocationsSection.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/LocationsSection.java
@@ -57,7 +57,7 @@ public class LocationsSection extends SectionPart {
 		section.setLayoutData(sectionData);
 		section.setText(PDEUIMessages.LocationSection_0);
 
-		section.setDescription(PDEUIMessages.ContentSection_1);
+		section.setDescription(PDEUIMessages.TargetDefinitionContentPage_LocationDescription);
 		Composite client = toolkit.createComposite(section);
 		client.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 1));
 		client.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java
index ac496da..9bfea7d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/targetdefinition/TargetEditor.java
@@ -380,14 +380,23 @@ public class TargetEditor extends FormEditor {
 		public void contentsChanged(ITargetDefinition definition, Object source, boolean resolve, boolean forceResolve) {
 			if (!forceResolve && (!resolve || definition.isResolved())) {
 				if (fContentTree != null && source != fContentTree) {
-					fContentTree.setInput(getTarget());
+					ITargetDefinition target = getTarget();
+					// Check to see if we are resolved, resolving, or cancelled
+					if (target != null && target.isResolved()) {
+						fContentTree.setInput(getTarget());
+					} else if (Job.getJobManager().find(getJobFamily()).length > 0) {
+						fContentTree.setInput(null);
+					} else {
+						fContentTree.setCancelled();
+					}
+
 				}
 				if (fLocationTree != null && source != fLocationTree) {
 					fLocationTree.setInput(getTarget());
 				}
 			} else {
 				if (fContentTree != null) {
-					fContentTree.setEnabled(false);
+					fContentTree.setInput(null);
 				}
 				if (fLocationTree != null) {
 					fLocationTree.setInput(getTarget());
@@ -415,10 +424,15 @@ public class TargetEditor extends FormEditor {
 				};
 				resolveJob.addJobChangeListener(new JobChangeAdapter() {
 					public void done(org.eclipse.core.runtime.jobs.IJobChangeEvent event) {
+						final IStatus status = event.getResult();
 						UIJob job = new UIJob(PDEUIMessages.TargetEditor_2) {
 							public IStatus runInUIThread(IProgressMonitor monitor) {
 								if (fContentTree != null) {
-									fContentTree.setInput(getTarget());
+									if (status.getSeverity() == IStatus.CANCEL) {
+										fContentTree.setCancelled();
+									} else {
+										fContentTree.setInput(getTarget());
+									}
 								}
 								if (fLocationTree != null) {
 									fLocationTree.setInput(getTarget());
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
index 63212a2..7a48c8b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ChangeAwareSourceViewerConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,7 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.text.*;
 import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
 import org.eclipse.jface.text.information.*;
-import org.eclipse.jface.text.reconciler.IReconciler;
-import org.eclipse.jface.text.reconciler.MonoReconciler;
+import org.eclipse.jface.text.reconciler.*;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.pde.core.IBaseModel;
@@ -35,7 +34,7 @@ public abstract class ChangeAwareSourceViewerConfiguration extends TextSourceVie
 
 	protected PDESourcePage fSourcePage;
 	protected IColorManager fColorManager;
-	private MonoReconciler fReconciler;
+	protected AbstractReconciler fReconciler;
 	private InformationPresenter fInfoPresenter;
 	private InformationPresenter fOutlinePresenter;
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/HTMLPrinter.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/HTMLPrinter.java
deleted file mode 100644
index 35d3c21..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/HTMLPrinter.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.editor.text;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.net.URL;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Provides a set of convenience methods for creating HTML pages.
- * <p>
- * Moved into this package from <code>org.eclipse.jface.internal.text.revisions</code>.</p>
- */
-public class HTMLPrinter {
-
-	private static RGB BG_COLOR_RGB = new RGB(255, 255, 225); // RGB value of info bg color on WindowsXP
-	private static RGB FG_COLOR_RGB = new RGB(0, 0, 0); // RGB value of info fg color on WindowsXP
-
-	private static final String UNIT; // See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=155993
-	static {
-		String platform = SWT.getPlatform();
-		UNIT = "carbon".equals(platform) || "cocoa".equals(platform) ? "px" : "pt"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-	}
-
-	static {
-		final Display display = Display.getDefault();
-		if (display != null && !display.isDisposed()) {
-			try {
-				display.asyncExec(new Runnable() {
-					/*
-					 * @see java.lang.Runnable#run()
-					 */
-					public void run() {
-						BG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
-						FG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB();
-					}
-				});
-			} catch (SWTError err) {
-				// see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=45294
-				if (err.code != SWT.ERROR_DEVICE_DISPOSED)
-					throw err;
-			}
-		}
-	}
-
-	private HTMLPrinter() {
-	}
-
-	private static String replace(String text, char c, String s) {
-
-		int previous = 0;
-		int current = text.indexOf(c, previous);
-
-		if (current == -1)
-			return text;
-
-		StringBuffer buffer = new StringBuffer();
-		while (current > -1) {
-			buffer.append(text.substring(previous, current));
-			buffer.append(s);
-			previous = current + 1;
-			current = text.indexOf(c, previous);
-		}
-		buffer.append(text.substring(previous));
-
-		return buffer.toString();
-	}
-
-	public static String convertToHTMLContent(String content) {
-		content = replace(content, '&', "&"); //$NON-NLS-1$
-		content = replace(content, '"', """); //$NON-NLS-1$
-		content = replace(content, '<', "<"); //$NON-NLS-1$
-		return replace(content, '>', ">"); //$NON-NLS-1$
-	}
-
-	public static String read(Reader rd) {
-
-		StringBuffer buffer = new StringBuffer();
-		char[] readBuffer = new char[2048];
-
-		try {
-			int n = rd.read(readBuffer);
-			while (n > 0) {
-				buffer.append(readBuffer, 0, n);
-				n = rd.read(readBuffer);
-			}
-			return buffer.toString();
-		} catch (IOException x) {
-		}
-
-		return null;
-	}
-
-	public static void insertPageProlog(StringBuffer buffer, int position, RGB fgRGB, RGB bgRGB, String styleSheet) {
-		if (fgRGB == null)
-			fgRGB = FG_COLOR_RGB;
-		if (bgRGB == null)
-			bgRGB = BG_COLOR_RGB;
-
-		StringBuffer pageProlog = new StringBuffer(300);
-
-		pageProlog.append("<html>"); //$NON-NLS-1$
-
-		appendStyleSheetURL(pageProlog, styleSheet);
-
-		appendColors(pageProlog, fgRGB, bgRGB);
-
-		buffer.insert(position, pageProlog.toString());
-	}
-
-	private static void appendColors(StringBuffer pageProlog, RGB fgRGB, RGB bgRGB) {
-		pageProlog.append("<body text=\""); //$NON-NLS-1$
-		appendColor(pageProlog, fgRGB);
-		pageProlog.append("\" bgcolor=\""); //$NON-NLS-1$
-		appendColor(pageProlog, bgRGB);
-		pageProlog.append("\">"); //$NON-NLS-1$
-	}
-
-	private static void appendColor(StringBuffer buffer, RGB rgb) {
-		buffer.append('#');
-		appendAsHexString(buffer, rgb.red);
-		appendAsHexString(buffer, rgb.green);
-		appendAsHexString(buffer, rgb.blue);
-	}
-
-	private static void appendAsHexString(StringBuffer buffer, int intValue) {
-		String hexValue = Integer.toHexString(intValue);
-		if (hexValue.length() == 1)
-			buffer.append('0');
-		buffer.append(hexValue);
-	}
-
-	public static void insertStyles(StringBuffer buffer, String[] styles) {
-		if (styles == null || styles.length == 0)
-			return;
-
-		StringBuffer styleBuf = new StringBuffer(10 * styles.length);
-		for (int i = 0; i < styles.length; i++) {
-			styleBuf.append(" style=\""); //$NON-NLS-1$
-			styleBuf.append(styles[i]);
-			styleBuf.append('"');
-		}
-
-		// Find insertion index
-		// a) within existing body tag with trailing space
-		int index = buffer.indexOf("<body "); //$NON-NLS-1$
-		if (index != -1) {
-			buffer.insert(index + 5, styleBuf.toString());
-			return;
-		}
-
-		// b) within existing body tag without attributes
-		index = buffer.indexOf("<body>"); //$NON-NLS-1$
-		if (index != -1) {
-			buffer.insert(index + 5, ' ');
-			buffer.insert(index + 6, styleBuf.toString());
-			return;
-		}
-	}
-
-	private static void appendStyleSheetURL(StringBuffer buffer, String styleSheet) {
-		if (styleSheet == null)
-			return;
-
-		buffer.append("<head><style CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$
-		buffer.append(styleSheet);
-		buffer.append("</style></head>"); //$NON-NLS-1$
-	}
-
-	private static void appendStyleSheetURL(StringBuffer buffer, URL styleSheetURL) {
-		if (styleSheetURL == null)
-			return;
-
-		buffer.append("<head>"); //$NON-NLS-1$
-
-		buffer.append("<LINK REL=\"stylesheet\" HREF= \""); //$NON-NLS-1$
-		buffer.append(styleSheetURL);
-		buffer.append("\" CHARSET=\"ISO-8859-1\" TYPE=\"text/css\">"); //$NON-NLS-1$
-
-		buffer.append("</head>"); //$NON-NLS-1$
-	}
-
-	public static void insertPageProlog(StringBuffer buffer, int position) {
-		StringBuffer pageProlog = new StringBuffer(60);
-		pageProlog.append("<html>"); //$NON-NLS-1$
-		appendColors(pageProlog, FG_COLOR_RGB, BG_COLOR_RGB);
-		buffer.insert(position, pageProlog.toString());
-	}
-
-	public static void insertPageProlog(StringBuffer buffer, int position, URL styleSheetURL) {
-		StringBuffer pageProlog = new StringBuffer(300);
-		pageProlog.append("<html>"); //$NON-NLS-1$
-		appendStyleSheetURL(pageProlog, styleSheetURL);
-		appendColors(pageProlog, FG_COLOR_RGB, BG_COLOR_RGB);
-		buffer.insert(position, pageProlog.toString());
-	}
-
-	public static void insertPageProlog(StringBuffer buffer, int position, String styleSheet) {
-		insertPageProlog(buffer, position, null, null, styleSheet);
-	}
-
-	public static void addPageProlog(StringBuffer buffer) {
-		insertPageProlog(buffer, buffer.length());
-	}
-
-	public static void addPageEpilog(StringBuffer buffer) {
-		buffer.append("</font></body></html>"); //$NON-NLS-1$
-	}
-
-	public static void startBulletList(StringBuffer buffer) {
-		buffer.append("<ul>"); //$NON-NLS-1$
-	}
-
-	public static void endBulletList(StringBuffer buffer) {
-		buffer.append("</ul>"); //$NON-NLS-1$
-	}
-
-	public static void addBullet(StringBuffer buffer, String bullet) {
-		if (bullet != null) {
-			buffer.append("<li>"); //$NON-NLS-1$
-			buffer.append(bullet);
-			buffer.append("</li>"); //$NON-NLS-1$
-		}
-	}
-
-	public static void addSmallHeader(StringBuffer buffer, String header) {
-		if (header != null) {
-			buffer.append("<h5>"); //$NON-NLS-1$
-			buffer.append(header);
-			buffer.append("</h5>"); //$NON-NLS-1$
-		}
-	}
-
-	public static void addParagraph(StringBuffer buffer, String paragraph) {
-		if (paragraph != null) {
-			buffer.append("<p>"); //$NON-NLS-1$
-			buffer.append(paragraph);
-		}
-	}
-
-	public static void addParagraph(StringBuffer buffer, Reader paragraphReader) {
-		if (paragraphReader != null)
-			addParagraph(buffer, read(paragraphReader));
-	}
-
-	/**
-	 * Replaces the following style attributes of the font definition of the <code>html</code>
-	 * element:
-	 * <ul>
-	 * <li>font-size</li>
-	 * <li>font-weight</li>
-	 * <li>font-style</li>
-	 * <li>font-family</li>
-	 * </ul>
-	 * The font's name is used as font family, a <code>sans-serif</code> default font family is
-	 * appended for the case that the given font name is not available.
-	 * <p>
-	 * If the listed font attributes are not contained in the passed style list, nothing happens.
-	 * </p>
-	 *
-	 * @param styles CSS style definitions
-	 * @param fontData the font information to use
-	 * @return the modified style definitions
-	 * @since 3.3
-	 */
-	public static String convertTopLevelFont(String styles, FontData fontData) {
-		boolean bold = (fontData.getStyle() & SWT.BOLD) != 0;
-		boolean italic = (fontData.getStyle() & SWT.ITALIC) != 0;
-		String size = Integer.toString(fontData.getHeight()) + UNIT;
-		String family = "'" + fontData.getName() + "',sans-serif"; //$NON-NLS-1$ //$NON-NLS-2$
-
-		styles = styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-size:\\s*)\\d+pt(\\;?.*\\})", "$1" + size + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		styles = styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-weight:\\s*)\\w+(\\;?.*\\})", "$1" + (bold ? "bold" : "normal") + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-		styles = styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-style:\\s*)\\w+(\\;?.*\\})", "$1" + (italic ? "italic" : "normal") + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-		styles = styles.replaceFirst("(html\\s*\\{.*(?:\\s|;)font-family:\\s*).+?(;.*\\})", "$1" + family + "$2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		return styles;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
index eb33340..c8394e9 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ManifestConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -251,6 +251,7 @@ public class ManifestConfiguration extends ChangeAwareSourceViewerConfiguration
 				fContentAssistant.setContentAssistProcessor(fContentAssistantProcessor, IDocument.DEFAULT_CONTENT_TYPE);
 				fContentAssistant.setContentAssistProcessor(fContentAssistantProcessor, ManifestPartitionScanner.MANIFEST_HEADER_VALUE);
 				fContentAssistant.addCompletionListener(fContentAssistantProcessor);
+				fContentAssistant.enableAutoInsert(true);
 				fContentAssistant.setInformationControlCreator(new IInformationControlCreator() {
 					public IInformationControl createInformationControl(Shell parent) {
 						return new DefaultInformationControl(parent, false);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
index 2c47b58..4fd843b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PDEQuickAssistAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mohammed Mostafa <mmostafa at ca.ibm.com> - bug 296522
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.text;
 
@@ -28,6 +29,7 @@ import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.IMarkerResolution2;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.texteditor.SimpleMarkerAnnotation;
+import org.eclipse.ui.texteditor.spelling.SpellingAnnotation;
 
 public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 
@@ -35,7 +37,7 @@ public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 	private Image fRenameImage;
 	private Image fRemoveImage;
 
-	class PDECompletionProposal implements ICompletionProposal, ICompletionProposalExtension3 {
+	class PDECompletionProposal implements ICompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension4, Comparable {
 
 		Position fPosition;
 		IMarkerResolution fResolution;
@@ -99,6 +101,40 @@ public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 			return null;
 		}
 
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension4#isAutoInsertable()
+		 */
+		public boolean isAutoInsertable() {
+			return true;
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Object#equals(java.lang.Object)
+		 */
+		public boolean equals(Object obj) {
+			if (!(obj instanceof PDECompletionProposal)) {
+				return false;
+			}
+			PDECompletionProposal proposal = (PDECompletionProposal) obj;
+			return proposal.fPosition.equals(fPosition) && proposal.fResolution.equals(fResolution);
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Comparable#compareTo(java.lang.Object)
+		 */
+		public int compareTo(Object arg0) {
+			if (!(arg0 instanceof PDECompletionProposal))
+				return -1;
+			PDECompletionProposal obj = (PDECompletionProposal) arg0;
+			if (getDisplayString() != null) {
+				if (obj.getDisplayString() != null) {
+					return getDisplayString().compareTo(obj.getDisplayString());
+				}
+				return 0;
+			}
+			return -1;
+		}
+
 	}
 
 	class PDEQuickAssistProcessor implements IQuickAssistProcessor {
@@ -111,31 +147,46 @@ public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 		}
 
 		public boolean canFix(Annotation annotation) {
-			if (!(annotation instanceof SimpleMarkerAnnotation))
-				return false;
+			boolean bRetVal = false;
+			if (annotation instanceof SimpleMarkerAnnotation) {
+				// check local resolutions first
+				IMarker marker = ((SimpleMarkerAnnotation) annotation).getMarker();
+				IMarkerResolution[] localResolutions = fGenerator.getResolutions(marker);
+				if (localResolutions.length > 0) {
+					bRetVal = true;
+				}
+				// check the contributed resolutions if needed
+				if (!bRetVal) {
+					IMarkerResolution[] contributedResolutions = IDE.getMarkerHelpRegistry().getResolutions(marker);
+					if (contributedResolutions.length > 0) {
+						bRetVal = true;
+					}
+				}
+			}
+			return bRetVal;
 
-			ArrayList resolutions = new ArrayList(5);
+		}
 
+		private void populateDataModelForAnnotation(SimpleMarkerAnnotation annotation) {
 			// grab the local resolutions first
-			IMarker marker = ((SimpleMarkerAnnotation) annotation).getMarker();
-			IMarkerResolution[] localResolutions = fGenerator.getResolutions(marker);
-			resolutions.addAll(Arrays.asList(localResolutions));
-
-			// grab the contributed resolutions
-			IMarkerResolution[] contributedResolutions = IDE.getMarkerHelpRegistry().getResolutions(marker);
-			for (int i = 0; i < contributedResolutions.length; i++) {
-				IMarkerResolution resolution = contributedResolutions[i];
-				// only add contributed marker resolutions if they don't come from PDE
-				if (!(resolution instanceof AbstractPDEMarkerResolution))
-					resolutions.add(contributedResolutions[i]);
-			}
-
-			boolean canFix = resolutions.size() > 0;
-			if (canFix)
-				if (!fResMap.containsKey(marker))
+			IMarker marker = annotation.getMarker();
+			if (!fResMap.containsKey(marker)) {
+				ArrayList resolutions = new ArrayList(5);
+				IMarkerResolution[] localResolutions = fGenerator.getResolutions(marker);
+				resolutions.addAll(Arrays.asList(localResolutions));
+
+				// grab the contributed resolutions
+				IMarkerResolution[] contributedResolutions = IDE.getMarkerHelpRegistry().getResolutions(marker);
+				for (int i = 0; i < contributedResolutions.length; i++) {
+					IMarkerResolution resolution = contributedResolutions[i];
+					// only add contributed marker resolutions if they don't come from PDE
+					if (!(resolution instanceof AbstractPDEMarkerResolution) && !resolutions.contains(contributedResolutions[i]))
+						resolutions.add(contributedResolutions[i]);
+				}
+				if (resolutions.size() > 0) {
 					fResMap.put(marker, resolutions.toArray(new IMarkerResolution[resolutions.size()]));
-
-			return canFix;
+				}
+			}
 		}
 
 		public boolean canAssist(IQuickAssistInvocationContext invocationContext) {
@@ -151,10 +202,21 @@ public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 			ArrayList list = new ArrayList();
 			while (it.hasNext()) {
 				Object key = it.next();
-				if (!(key instanceof SimpleMarkerAnnotation))
+				if (!(key instanceof SimpleMarkerAnnotation)) {
+					if (key instanceof SpellingAnnotation) {
+						SpellingAnnotation annotation = (SpellingAnnotation) key;
+						if (amodel.getPosition(annotation).overlapsWith(offset, 1)) {
+							ICompletionProposal[] proposals = annotation.getSpellingProblem().getProposals();
+							for (int index = 0; index < proposals.length; index++) {
+								list.add(proposals[index]);
+							}
+						}
+					}
 					continue;
+				}
 
 				SimpleMarkerAnnotation annotation = (SimpleMarkerAnnotation) key;
+				populateDataModelForAnnotation(annotation);
 				IMarker marker = annotation.getMarker();
 
 				IMarkerResolution[] mapping = (IMarkerResolution[]) fResMap.get(marker);
@@ -168,7 +230,10 @@ public class PDEQuickAssistAssistant extends QuickAssistAssistant {
 						int end = doc.getLineLength(line) + start - delimLength;
 						if (offset >= start && offset <= end) {
 							for (int i = 0; i < mapping.length; i++) {
-								list.add(new PDECompletionProposal(mapping[i], pos, marker));
+								PDECompletionProposal proposal = new PDECompletionProposal(mapping[i], pos, marker);
+								if (!list.contains(proposal)) {
+									list.add(proposal);
+								}
 							}
 						}
 					} catch (BadLocationException e) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PluginXMLConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PluginXMLConfiguration.java
index f085aa4..344e1b2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PluginXMLConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/PluginXMLConfiguration.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.editor.text;
@@ -38,6 +38,7 @@ public class PluginXMLConfiguration extends XMLConfiguration {
 			fContentAssistant.setInformationControlCreator(getInformationControlCreator(true));
 			fContentAssistant.setShowEmptyList(false);
 			fContentAssistant.addCompletionListener(fContentAssistProcessor);
+			fContentAssistant.enableAutoInsert(true);
 		}
 		return fContentAssistant;
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLConfiguration.java
index ce99219..5548467 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,14 +14,24 @@ import org.eclipse.jface.text.*;
 import org.eclipse.jface.text.presentation.IPresentationReconciler;
 import org.eclipse.jface.text.presentation.PresentationReconciler;
 import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
+import org.eclipse.jface.text.reconciler.IReconciler;
+import org.eclipse.jface.text.reconciler.Reconciler;
 import org.eclipse.jface.text.source.IAnnotationHover;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.internal.core.text.IReconcilingParticipant;
+import org.eclipse.pde.internal.core.text.plugin.PluginModel;
+import org.eclipse.pde.internal.ui.editor.ISortableContentOutlinePage;
 import org.eclipse.pde.internal.ui.editor.PDESourcePage;
 import org.eclipse.pde.internal.ui.editor.context.XMLDocumentSetupParticpant;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
 
+/**
+ * Source viewer configuration for the XML Source editors
+ *
+ */
 public class XMLConfiguration extends ChangeAwareSourceViewerConfiguration {
 	private AnnotationHover fAnnotationHover;
 	private XMLDoubleClickStrategy fDoubleClickStrategy;
@@ -41,7 +51,7 @@ public class XMLConfiguration extends ChangeAwareSourceViewerConfiguration {
 	}
 
 	public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
-		return new String[] {IDocument.DEFAULT_CONTENT_TYPE, XMLPartitionScanner.XML_COMMENT, XMLPartitionScanner.XML_TAG};
+		return new String[] {IDocument.DEFAULT_CONTENT_TYPE, XMLPartitionScanner.XML_COMMENT, XMLPartitionScanner.XML_TAG, XMLStringPartitionScanner.XML_STRING};
 	}
 
 	public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
@@ -161,8 +171,38 @@ public class XMLConfiguration extends ChangeAwareSourceViewerConfiguration {
 		return SourceInformationProvider.F_XML_IMP;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getConfiguredDocumentPartitioning(org.eclipse.jface.text.source.ISourceViewer)
+	 */
 	public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) {
 		return XMLDocumentSetupParticpant.XML_PARTITIONING;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.ui.editor.text.ChangeAwareSourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
+	 */
+	public IReconciler getReconciler(ISourceViewer sourceViewer) {
+		if (fSourcePage != null && fReconciler == null) {
+			IBaseModel model = fSourcePage.getInputContext().getModel();
+			if (model instanceof IReconcilingParticipant) {
+				ReconcilingStrategy strategy = new ReconcilingStrategy();
+				strategy.addParticipant((IReconcilingParticipant) model);
+				ISortableContentOutlinePage outline = fSourcePage.getContentOutline();
+				if (outline instanceof IReconcilingParticipant)
+					strategy.addParticipant((IReconcilingParticipant) outline);
+
+				Reconciler reconciler = new Reconciler();
+				reconciler.setReconcilingStrategy(strategy, IDocument.DEFAULT_CONTENT_TYPE);
+				if (!(model instanceof PluginModel)) {
+					XMLReconcilingStrategy xmlStrategy = new XMLReconcilingStrategy(sourceViewer);
+					reconciler.setReconcilingStrategy(xmlStrategy, XMLStringPartitionScanner.XML_STRING);
+					reconciler.setReconcilingStrategy(xmlStrategy, XMLStringPartitionScanner.CUSTOM_TAG);
+					reconciler.setDocumentPartitioning(XMLStringPartitionScanner.XML_STRING);
+				}
+				reconciler.setDelay(500);
+				fReconciler = reconciler;
+			}
+		}
+		return fReconciler;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java
new file mode 100644
index 0000000..fb4a143
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLReconcilingStrategy.java
@@ -0,0 +1,155 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.editor.text;
+
+import java.util.*;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.text.*;
+import org.eclipse.jface.text.source.*;
+import org.eclipse.pde.internal.ui.editor.context.XMLDocumentSetupParticpant;
+import org.eclipse.ui.editors.text.EditorsUI;
+import org.eclipse.ui.texteditor.spelling.*;
+
+/**
+ * Reconcile strategy used for spell checking XML documents.
+ *
+ */
+public class XMLReconcilingStrategy extends SpellingReconcileStrategy {
+
+	/**
+	 * Spelling problem collector.
+	 */
+	private class SpellingProblemCollector implements ISpellingProblemCollector {
+
+		/** Annotation model. */
+		private IAnnotationModel fAnnotationModel;
+
+		/** Annotations to add. */
+		private Map fAddAnnotations;
+
+		/** Lock object for modifying the annotations. */
+		private Object fLockObject;
+
+		/**
+		 * Initializes this collector with the given annotation model.
+		 *
+		 * @param annotationModel the annotation model
+		 */
+		public SpellingProblemCollector(IAnnotationModel annotationModel) {
+			Assert.isLegal(annotationModel != null);
+			fAnnotationModel = annotationModel;
+			if (fAnnotationModel instanceof ISynchronizable)
+				fLockObject = ((ISynchronizable) fAnnotationModel).getLockObject();
+			else
+				fLockObject = fAnnotationModel;
+		}
+
+		/*
+		 * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#accept(org.eclipse.ui.texteditor.spelling.SpellingProblem)
+		 */
+		public void accept(SpellingProblem problem) {
+			fAddAnnotations.put(new SpellingAnnotation(problem), new Position(problem.getOffset(), problem.getLength()));
+		}
+
+		/*
+		 * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#beginCollecting()
+		 */
+		public void beginCollecting() {
+			fAddAnnotations = new HashMap();
+		}
+
+		/*
+		 * @see org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector#endCollecting()
+		 */
+		public void endCollecting() {
+			synchronized (fLockObject) {
+				for (Iterator iter = fAddAnnotations.keySet().iterator(); iter.hasNext();) {
+					Annotation annotation = (Annotation) iter.next();
+					fAnnotationModel.addAnnotation(annotation, (Position) fAddAnnotations.get(annotation));
+				}
+				deleteNonstringSpellingAnnotations(fAddAnnotations.keySet().iterator());
+			}
+
+			fAddAnnotations = null;
+		}
+	}
+
+	public XMLReconcilingStrategy(ISourceViewer viewer) {
+		super(viewer, EditorsUI.getSpellingService());
+	}
+
+	public void reconcile(IRegion region) {
+
+		deleteAllAnnotations(region);
+		super.reconcile(region);
+
+	}
+
+	/**
+	 * Deletes all the spelling annotations located inside the area marked by <code>region</code>
+	 */
+	private void deleteAllAnnotations(IRegion region) {
+		IAnnotationModel model = getAnnotationModel();
+		if (model == null)
+			return;
+		Iterator iter = model.getAnnotationIterator();
+
+		while (iter.hasNext()) {
+			Annotation annotation = (Annotation) iter.next();
+			if (annotation instanceof SpellingAnnotation) {
+				SpellingAnnotation spellingAnnotation = (SpellingAnnotation) annotation;
+				Position position = model.getPosition(spellingAnnotation);
+				if (position.overlapsWith(region.getOffset(), region.getLength())) {
+					model.removeAnnotation(spellingAnnotation);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Deletes the spelling annotations marked for XML Tags
+	 */
+	private void deleteNonstringSpellingAnnotations(Iterator iter) {
+		if (!(getDocument() instanceof IDocumentExtension3)) { //can not proceed otherwise
+			return;
+		}
+		IDocumentExtension3 document = (IDocumentExtension3) getDocument();
+		IDocumentPartitioner docPartitioner = document.getDocumentPartitioner(XMLStringPartitionScanner.XML_STRING);
+		IDocumentPartitioner pdeXMLPartitioner = document.getDocumentPartitioner(XMLDocumentSetupParticpant.XML_PARTITIONING);
+		IAnnotationModel model = getAnnotationModel();
+
+		while (iter.hasNext()) {
+			Object annotation = iter.next();
+			if (annotation instanceof SpellingAnnotation) {
+				SpellingAnnotation spellingAnnotation = (SpellingAnnotation) annotation;
+				Position position = model.getPosition(spellingAnnotation);
+				String docContentType = docPartitioner.getContentType(position.getOffset());
+				String pdeXMLContentType = pdeXMLPartitioner.getContentType(position.getOffset());
+				if ((!XMLStringPartitionScanner.XML_STRING.equalsIgnoreCase(docContentType) && !XMLStringPartitionScanner.CUSTOM_TAG.equalsIgnoreCase(docContentType)) // delete the annotation if the marked position was not selected by XML_STRING document partitioner
+						|| (XMLStringPartitionScanner.CUSTOM_TAG.equalsIgnoreCase(docContentType)) && XMLPartitionScanner.XML_TAG.equalsIgnoreCase(pdeXMLContentType)) { // also delete the annotations that are positioned at special XML Tags 
+					model.removeAnnotation(spellingAnnotation);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy#createSpellingProblemCollector()
+	 */
+	protected ISpellingProblemCollector createSpellingProblemCollector() {
+		IAnnotationModel model = getAnnotationModel();
+		if (model == null)
+			return null;
+		return new SpellingProblemCollector(model);
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLStringPartitionScanner.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLStringPartitionScanner.java
new file mode 100644
index 0000000..0ca85b5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/XMLStringPartitionScanner.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ *  Copyright (c) 2009 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.editor.text;
+
+import org.eclipse.jface.text.rules.*;
+
+/**
+ * Scanner that exclusively sets predicate rules for checking spelling only for quoted strings.
+ *
+ */
+public class XMLStringPartitionScanner extends RuleBasedPartitionScanner {
+	public final static String XML_STRING = "__xml_string"; //$NON-NLS-1$
+	public final static String CUSTOM_TAG = "__custom_tag"; //$NON-NLS-1$
+
+	public static final String[] STRING_PARTITIONS = new String[] {XML_STRING, CUSTOM_TAG};
+
+	public XMLStringPartitionScanner() {
+		IPredicateRule[] rules = new IPredicateRule[6];
+		rules[0] = new MultiLineRule("\"", "\"", new Token(XML_STRING), '\\', true); //$NON-NLS-1$ //$NON-NLS-2$
+		rules[1] = new MultiLineRule("\'", "\'", new Token(XML_STRING), '\\', true); //$NON-NLS-1$ //$NON-NLS-2$
+		rules[2] = new MultiLineRule("<!--", "-->", new Token(XMLPartitionScanner.XML_COMMENT)); //$NON-NLS-1$//$NON-NLS-2$
+		rules[3] = new MultiLineRule("<?", "?>", new Token(XMLPartitionScanner.XML_COMMENT)); //$NON-NLS-1$ //$NON-NLS-2$
+		rules[4] = new MultiLineRule("<description>", "</description>", new Token(CUSTOM_TAG)); //$NON-NLS-1$//$NON-NLS-2$
+		rules[5] = new MultiLineRule("href=\"", "\"", new Token(XMLPartitionScanner.XML_COMMENT)); //$NON-NLS-1$ //$NON-NLS-2$
+
+		setPredicateRules(rules);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java
index d458dff..0597297 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/AbstractPluginBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,8 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.elements.NamedElement;
@@ -34,8 +36,8 @@ import org.eclipse.pde.internal.ui.launcher.FilteredCheckboxTree.FilterableCheck
 import org.eclipse.pde.internal.ui.launcher.FilteredCheckboxTree.PreRefreshNotifier;
 import org.eclipse.pde.internal.ui.util.*;
 import org.eclipse.pde.internal.ui.wizards.ListUtil;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.SWTException;
 import org.eclipse.swt.custom.CCombo;
@@ -78,7 +80,6 @@ public abstract class AbstractPluginBlock {
 	private Label fCounter;
 
 	private LaunchValidationOperation fOperation;
-	private PluginStatusDialog fDialog;
 
 	private Button fValidateButton;
 
@@ -88,8 +89,15 @@ public abstract class AbstractPluginBlock {
 	private HashMap autoColumnCache = new HashMap();
 	private TreeEditor levelColumnEditor = null;
 	private TreeEditor autoColumnEditor = null;
+	private boolean fIsDisposed = false;
+
+	private PluginStatusDialog fDialog;
 
+	/**
+	 * Label provider for the tree.
+	 */
 	class OSGiLabelProvider extends PDELabelProvider {
+
 		public Image getColumnImage(Object obj, int index) {
 			return index == 0 ? super.getColumnImage(obj, index) : null;
 		}
@@ -134,7 +142,7 @@ public abstract class AbstractPluginBlock {
 			} else if (source == fWorkingSetButton) {
 				handleWorkingSets();
 			} else if (source == fAddRequiredButton) {
-				computeSubset();
+				addRequiredPlugins();
 			} else if (source == fDefaultsButton) {
 				handleRestoreDefaults();
 			}
@@ -159,7 +167,8 @@ public abstract class AbstractPluginBlock {
 			} else if (source == fValidateButton) {
 				handleValidate();
 			}
-			fTab.updateLaunchConfigurationDialog();
+			if (!fIsDisposed)
+				fTab.updateLaunchConfigurationDialog();
 		}
 	}
 
@@ -285,7 +294,7 @@ public abstract class AbstractPluginBlock {
 		gd.horizontalIndent = indent;
 		button.setLayoutData(gd);
 		button.addSelectionListener(fListener);
-
+		button.setFont(parent.getFont());
 		return button;
 	}
 
@@ -295,7 +304,9 @@ public abstract class AbstractPluginBlock {
 
 	protected void createPluginViewer(Composite composite, int span, int indent) {
 
-		fPluginFilteredTree = new FilteredCheckboxTree(composite, getTreeViewerStyle(), new PatternFilter());
+		PatternFilter patternFilter = new PatternFilter();
+		patternFilter.setIncludeLeadingWildcard(true);
+		fPluginFilteredTree = new FilteredCheckboxTree(composite, getTreeViewerStyle(), patternFilter);
 		fPluginTreeViewer = (CheckboxTreeViewer) fPluginFilteredTree.getViewer();
 		((FilterableCheckboxTreeViewer) fPluginTreeViewer).addPreRefreshNotifier(new PreRefreshNotifier() {
 
@@ -394,6 +405,9 @@ public abstract class AbstractPluginBlock {
 		column3.setWidth(80);
 		tree.setHeaderVisible(true);
 
+		tree.setFont(composite.getFont());
+		fPluginFilteredTree.getFilterControl().setFont(composite.getFont());
+
 		createEditors();
 	}
 
@@ -501,7 +515,7 @@ public abstract class AbstractPluginBlock {
 	}
 
 	private void createButtonContainer(Composite parent, int vOffset) {
-		Composite composite = new Composite(parent, SWT.NONE);
+		Composite composite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_VERTICAL);
 		GridLayout layout = new GridLayout();
 		layout.marginHeight = layout.marginWidth = 0;
 		layout.marginTop = vOffset;
@@ -513,11 +527,11 @@ public abstract class AbstractPluginBlock {
 		fWorkingSetButton = createButton(composite, PDEUIMessages.AdvancedLauncherTab_workingSet, SWT.PUSH);
 		fAddRequiredButton = createButton(composite, NLS.bind(PDEUIMessages.AdvancedLauncherTab_subset, fTab.getName()), SWT.PUSH);
 		fDefaultsButton = createButton(composite, PDEUIMessages.AdvancedLauncherTab_defaults, SWT.PUSH);
-		fFilterButton = createButton(composite, NLS.bind(PDEUIMessages.AdvancedLauncherTab_selectedBundles, fTab.getName().toLowerCase()), SWT.CHECK);
+		fFilterButton = createButton(composite, PDEUIMessages.AdvancedLauncherTab_selectedBundles, SWT.CHECK);
 		GridData filterButtonGridData = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_END);
 		fFilterButton.setLayoutData(filterButtonGridData);
 
-		fCounter = new Label(composite, SWT.NONE);
+		fCounter = SWTFactory.createLabel(composite, "", 1); //$NON-NLS-1$
 		fCounter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_END));
 		updateCounter();
 	}
@@ -729,14 +743,19 @@ public abstract class AbstractPluginBlock {
 		fFilterButton.setSelection(config.getAttribute(IPDELauncherConstants.SHOW_SELECTED_ONLY, false));
 	}
 
-	protected void computeSubset() {
+	/**
+	 * Looks at the currently checked plugins and finds any plug-ins required by them.  The required plug-ins are
+	 * then also checked in the tree
+	 */
+	protected void addRequiredPlugins() {
 		Object[] checked = fPluginTreeViewer.getCheckedElements();
 		ArrayList toCheck = new ArrayList(checked.length);
 		for (int i = 0; i < checked.length; i++)
 			if (checked[i] instanceof IPluginModelBase)
 				toCheck.add(checked[i]);
 
-		Set additionalIds = DependencyManager.getDependencies(checked, fIncludeOptionalButton.getSelection());
+		// exclude "org.eclipse.ui.workbench.compatibility" - it is only needed for pre-3.0 bundles
+		Set additionalIds = DependencyManager.getDependencies(checked, fIncludeOptionalButton.getSelection(), new String[] {"org.eclipse.ui.workbench.compatibility"}); //$NON-NLS-1$
 
 		Iterator it = additionalIds.iterator();
 		while (it.hasNext()) {
@@ -764,28 +783,6 @@ public abstract class AbstractPluginBlock {
 		adjustGroupState();
 	}
 
-	protected void setCheckedElements(Object[] checked) {
-		fPluginTreeViewer.setCheckedElements(checked);
-		updateGroup(fWorkspacePlugins);
-		updateGroup(fExternalPlugins);
-	}
-
-	private void updateGroup(Object group) {
-		Widget item = fPluginTreeViewer.testFindItem(group);
-		if (item instanceof TreeItem) {
-			TreeItem[] items = ((TreeItem) item).getItems();
-			for (int i = 0; i < items.length; i++) {
-				TreeItem child = items[i];
-				if (child.getChecked() == (child.getText(1).length() == 0)) {
-					Object model = items[i].getData();
-					if (model instanceof IPluginModelBase) {
-						resetText((IPluginModelBase) model);
-					}
-				}
-			}
-		}
-	}
-
 	protected IPluginModelBase findPlugin(String id) {
 		ModelEntry entry = PluginRegistry.findEntry(id);
 		if (entry != null) {
@@ -809,6 +806,28 @@ public abstract class AbstractPluginBlock {
 		return null;
 	}
 
+	protected void setCheckedElements(Object[] checked) {
+		fPluginTreeViewer.setCheckedElements(checked);
+		updateGroup(fWorkspacePlugins);
+		updateGroup(fExternalPlugins);
+	}
+
+	private void updateGroup(Object group) {
+		Widget item = fPluginTreeViewer.testFindItem(group);
+		if (item instanceof TreeItem) {
+			TreeItem[] items = ((TreeItem) item).getItems();
+			for (int i = 0; i < items.length; i++) {
+				TreeItem child = items[i];
+				if (child.getChecked() == (child.getText(1).length() == 0)) {
+					Object model = items[i].getData();
+					if (model instanceof IPluginModelBase) {
+						resetText((IPluginModelBase) model);
+					}
+				}
+			}
+		}
+	}
+
 	protected void adjustGroupState() {
 		fPluginTreeViewer.setChecked(fExternalPlugins, fNumExternalChecked > 0);
 		fPluginTreeViewer.setGrayed(fExternalPlugins, fNumExternalChecked > 0 && fNumExternalChecked < getExternalModels().length);
@@ -850,6 +869,7 @@ public abstract class AbstractPluginBlock {
 
 	public void dispose() {
 		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		fIsDisposed = true;
 	}
 
 	protected boolean isEnabled() {
@@ -909,19 +929,26 @@ public abstract class AbstractPluginBlock {
 		} catch (CoreException e) {
 			PDEPlugin.log(e);
 		}
+
 		if (fDialog == null) {
 			if (fOperation.hasErrors()) {
-				fDialog = new PluginStatusDialog(getShell(), SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE | SWT.RESIZE);
+				fDialog = new PluginStatusDialog(getShell(), SWT.MODELESS | SWT.CLOSE | SWT.BORDER | SWT.TITLE | SWT.RESIZE);
 				fDialog.setInput(fOperation.getInput());
 				fDialog.open();
 				fDialog = null;
 			} else if (fOperation.isEmpty()) {
-				MessageDialog.openInformation(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, NLS.bind(PDEUIMessages.AbstractLauncherToolbar_noSelection, fTab.getName().toLowerCase(Locale.ENGLISH)));
+				MessageDialog.openInformation(getShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, NLS.bind(PDEUIMessages.AbstractLauncherToolbar_noSelection, fTab.getName().toLowerCase(Locale.ENGLISH)));
 			} else {
-				MessageDialog.openInformation(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, PDEUIMessages.AbstractLauncherToolbar_noProblems);
+				MessageDialog.openInformation(getShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, PDEUIMessages.AbstractLauncherToolbar_noProblems);
 			}
 		} else {
-			fDialog.refresh(fOperation.getInput());
+			if (fOperation.getInput().size() > 0)
+				fDialog.refresh(fOperation.getInput());
+			else {
+				Map input = new HashMap(1);
+				input.put(PDEUIMessages.AbstractLauncherToolbar_noProblems, Status.OK_STATUS);
+				fDialog.refresh(input);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java
index 6a71d50..57a7cab 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BaseBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,7 +61,7 @@ public abstract class BaseBlock {
 		}
 
 		public void modifyText(ModifyEvent e) {
-			fTab.updateLaunchConfigurationDialog();
+			fTab.scheduleUpdateJob();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BlockAdapter.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BlockAdapter.java
new file mode 100644
index 0000000..c683147
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BlockAdapter.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.SWTFactory;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+
+public class BlockAdapter {
+
+	private AbstractPluginBlock fPluginBlock;
+	private FeatureBlock fFeatureBlock;
+	private StackLayout fLayout;
+	private Composite fPluginBlockComposite;
+	private Composite fFeatureBlockComposite;
+	private Composite fParent;
+	private ILaunchConfiguration fLaunchConfig;
+	private int fActiveIndex;
+	private int fSpan = 1;
+	private int fIndent = 0;
+
+	// These constants MUST match the constants in PluginsTab
+	private static final int PLUGINS_BLOCK = 1; //CUSTOM_SELECTION
+	private static final int FEATURES_BLOCK = 2; //CUSTOM_FEATURES_SELECTION
+
+	public BlockAdapter(AbstractPluginBlock pluginBlock, FeatureBlock featureBlock) {
+		Assert.isNotNull(pluginBlock);
+		Assert.isNotNull(featureBlock);
+		fPluginBlock = pluginBlock;
+		fFeatureBlock = featureBlock;
+	}
+
+	public void createControl(Composite parent, int span, int indent) {
+		Composite blockComposite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
+		fSpan = span;
+		fIndent = indent;
+		fLayout = new StackLayout();
+		blockComposite.setLayout(fLayout);
+
+		fLayout.topControl = fPluginBlockComposite;
+		fParent = blockComposite;
+	}
+
+	public void initializeFrom(ILaunchConfiguration config, boolean enableTable) throws CoreException {
+		fLaunchConfig = config;
+		if (fActiveIndex == FEATURES_BLOCK) {
+			fFeatureBlock.initializeFrom(config);
+		} else {
+			fPluginBlock.initializeFrom(config, enableTable);
+		}
+	}
+
+	public void initializeFrom(ILaunchConfiguration config) throws CoreException {
+		fLaunchConfig = config;
+		if (fActiveIndex == FEATURES_BLOCK) {
+			fFeatureBlock.initializeFrom(config);
+		} else {
+			if (fPluginBlock instanceof OSGiBundleBlock)
+				((OSGiBundleBlock) fPluginBlock).initializeFrom(config);
+		}
+	}
+
+	public void performApply(ILaunchConfigurationWorkingCopy config) {
+		if (fActiveIndex == FEATURES_BLOCK) {
+			fFeatureBlock.performApply(config);
+		} else {
+			fPluginBlock.performApply(config);
+		}
+	}
+
+	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+		if (fActiveIndex == FEATURES_BLOCK) {
+			fFeatureBlock.setDefaults(config);
+		} else {
+			fPluginBlock.setDefaults(config);
+		}
+	}
+
+	public void enableViewer(boolean enable) {
+	}
+
+	public void dispose() {
+		fPluginBlock.dispose();
+		fFeatureBlock.dispose();
+	}
+
+	public void initialize(boolean enable) throws CoreException {
+		if (fActiveIndex == FEATURES_BLOCK) {
+			fFeatureBlock.initialize();
+		} else {
+			if (fPluginBlock instanceof PluginBlock) {
+				((PluginBlock) fPluginBlock).initialize(enable);
+			}
+		}
+	}
+
+	public void setActiveBlock(int index) {
+		try {
+			fActiveIndex = index;
+			if (index == FEATURES_BLOCK) {
+				if (fFeatureBlockComposite == null) {
+					fFeatureBlockComposite = SWTFactory.createComposite(fParent, 7, 1, GridData.FILL_BOTH, 0, 0);
+					fFeatureBlock.createControl(fFeatureBlockComposite, 6, 10);
+					if (fLaunchConfig != null) {
+						fFeatureBlock.initializeFrom(fLaunchConfig);
+					}
+				}
+				fLayout.topControl = fFeatureBlockComposite;
+				return;
+			} else if (fPluginBlockComposite == null) {
+				fPluginBlockComposite = SWTFactory.createComposite(fParent, fSpan, 1, GridData.FILL_BOTH, 0, 0);
+				fPluginBlock.createControl(fPluginBlockComposite, fSpan, fIndent);
+				if (fLaunchConfig != null) {
+					if (fPluginBlock instanceof PluginBlock) {
+						fPluginBlock.initializeFrom(fLaunchConfig, fActiveIndex == PLUGINS_BLOCK);
+					} else if (fPluginBlock instanceof OSGiBundleBlock) {
+						((OSGiBundleBlock) fPluginBlock).initializeFrom(fLaunchConfig);
+					}
+				}
+			}
+			fLayout.topControl = fPluginBlockComposite;
+		} catch (CoreException ex) {
+			PDEPlugin.log(ex);
+		}
+
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BundleLauncherHelper.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BundleLauncherHelper.java
deleted file mode 100644
index 12e4735..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/BundleLauncherHelper.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource Corporation - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.*;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.build.IPDEBuildConstants;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-
-public class BundleLauncherHelper {
-
-	public static final char VERSION_SEPARATOR = '*';
-
-	public static Map getWorkspaceBundleMap(ILaunchConfiguration configuration) throws CoreException {
-		return getWorkspaceBundleMap(configuration, null, IPDELauncherConstants.WORKSPACE_BUNDLES);
-	}
-
-	public static Map getTargetBundleMap(ILaunchConfiguration configuration) throws CoreException {
-		return getTargetBundleMap(configuration, null, IPDELauncherConstants.TARGET_BUNDLES);
-	}
-
-	public static Map getMergedBundleMap(ILaunchConfiguration configuration, boolean osgi) throws CoreException {
-		Set set = new HashSet();
-		Map map = new HashMap();
-
-		// if we are using the eclipse-based launcher, we need special checks
-		if (!osgi) {
-
-			checkBackwardCompatibility(configuration, true);
-
-			if (configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true)) {
-				IPluginModelBase[] models = PluginRegistry.getActiveModels();
-				for (int i = 0; i < models.length; i++) {
-					addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
-				}
-				return map;
-			}
-
-			if (configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
-				IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
-				for (int i = 0; i < models.length; i++) {
-					addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
-				}
-				return map;
-			}
-		}
-
-		String workspace = osgi == false ? IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS : IPDELauncherConstants.WORKSPACE_BUNDLES;
-		String target = osgi == false ? IPDELauncherConstants.SELECTED_TARGET_PLUGINS : IPDELauncherConstants.TARGET_BUNDLES;
-		map = getWorkspaceBundleMap(configuration, set, workspace);
-		map.putAll(getTargetBundleMap(configuration, set, target));
-		return map;
-	}
-
-	public static IPluginModelBase[] getMergedBundles(ILaunchConfiguration configuration, boolean osgi) throws CoreException {
-		Map map = getMergedBundleMap(configuration, osgi);
-		return (IPluginModelBase[]) map.keySet().toArray(new IPluginModelBase[map.size()]);
-	}
-
-	public static Map getWorkspaceBundleMap(ILaunchConfiguration configuration, Set set, String attribute) throws CoreException {
-		String selected = configuration.getAttribute(attribute, ""); //$NON-NLS-1$
-		Map map = new HashMap();
-		StringTokenizer tok = new StringTokenizer(selected, ","); //$NON-NLS-1$
-		while (tok.hasMoreTokens()) {
-			String token = tok.nextToken();
-			int index = token.indexOf('@');
-			if (index < 0) { // if no start levels, assume default
-				token = token.concat("@default:default"); //$NON-NLS-1$
-				index = token.indexOf('@');
-			}
-			String idVersion = token.substring(0, index);
-			int versionIndex = idVersion.indexOf(VERSION_SEPARATOR);
-			String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
-			String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
-			if (set != null)
-				set.add(id);
-			ModelEntry entry = PluginRegistry.findEntry(id);
-			if (entry != null) {
-				IPluginModelBase[] models = entry.getWorkspaceModels();
-				for (int i = 0; i < models.length; i++) {
-					IPluginBase base = models[i].getPluginBase();
-
-					// match only if...
-					// a) if we have the same version
-					// b) no version
-					// c) all else fails, if there's just one bundle available, use it
-					if (base.getVersion().equals(version) || version == null || models.length == 1)
-						addBundleToMap(map, models[i], token.substring(index + 1));
-				}
-			}
-		}
-
-		if (configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true)) {
-			Set deselectedPlugins = LaunchPluginValidator.parsePlugins(configuration, IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS);
-			IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
-			for (int i = 0; i < models.length; i++) {
-				String id = models[i].getPluginBase().getId();
-				if (id == null)
-					continue;
-				if (!deselectedPlugins.contains(models[i])) {
-					if (set != null)
-						set.add(id);
-					if (!map.containsKey(models[i]))
-						addBundleToMap(map, models[i], "default:default"); //$NON-NLS-1$
-				}
-			}
-		}
-		return map;
-	}
-
-	/**
-	 * Adds the given bundle and start information to the map.  This will override anything set
-	 * for system bundles, and set their start level to the appropriate level
-	 * @param map The map to add the bundles too
-	 * @param bundle The bundle to add
-	 * @param substring the start information in the form level:autostart
-	 */
-	private static void addBundleToMap(Map map, IPluginModelBase bundle, String sl) {
-		BundleDescription desc = bundle.getBundleDescription();
-		boolean defaultsl = (sl == null || sl.equals("default:default")); //$NON-NLS-1$
-		if (desc != null && defaultsl) {
-			String modelName = desc.getSymbolicName();
-			if (IPDEBuildConstants.BUNDLE_DS.equals(modelName)) {
-				map.put(bundle, "1:true"); //$NON-NLS-1$ 
-			} else if (IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR.equals(modelName)) {
-				map.put(bundle, "1:true"); //$NON-NLS-1$
-			} else if (IPDEBuildConstants.BUNDLE_EQUINOX_COMMON.equals(modelName)) {
-				map.put(bundle, "2:true"); //$NON-NLS-1$
-			} else if (IPDEBuildConstants.BUNDLE_OSGI.equals(modelName)) {
-				map.put(bundle, "-1:true"); //$NON-NLS-1$
-			} else if (IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR.equals(modelName)) {
-				map.put(bundle, "3:true"); //$NON-NLS-1$
-			} else if (IPDEBuildConstants.BUNDLE_CORE_RUNTIME.equals(modelName)) {
-				if (TargetPlatformHelper.getTargetVersion() > 3.1) {
-					map.put(bundle, "default:true"); //$NON-NLS-1$
-				} else {
-					map.put(bundle, "2:true"); //$NON-NLS-1$
-				}
-			} else {
-				map.put(bundle, sl);
-			}
-		} else {
-			map.put(bundle, sl);
-		}
-
-	}
-
-	public static Map getTargetBundleMap(ILaunchConfiguration configuration, Set set, String attribute) throws CoreException {
-		String selected = configuration.getAttribute(attribute, ""); //$NON-NLS-1$
-		Map map = new HashMap();
-		StringTokenizer tok = new StringTokenizer(selected, ","); //$NON-NLS-1$
-		while (tok.hasMoreTokens()) {
-			String token = tok.nextToken();
-			int index = token.indexOf('@');
-			if (index < 0) { // if no start levels, assume default
-				token = token.concat("@default:default"); //$NON-NLS-1$
-				index = token.indexOf('@');
-			}
-			String idVersion = token.substring(0, index);
-			int versionIndex = idVersion.indexOf(VERSION_SEPARATOR);
-			String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
-			String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
-			if (set != null && set.contains(id))
-				continue;
-			ModelEntry entry = PluginRegistry.findEntry(id);
-			if (entry != null) {
-				IPluginModelBase[] models = entry.getExternalModels();
-				for (int i = 0; i < models.length; i++) {
-					if (models[i].isEnabled()) {
-						IPluginBase base = models[i].getPluginBase();
-						// match only if...
-						// a) if we have the same version
-						// b) no version
-						// c) all else fails, if there's just one bundle available, use it
-						if (base.getVersion().equals(version) || version == null || models.length == 1)
-							addBundleToMap(map, models[i], token.substring(index + 1));
-					}
-				}
-			}
-		}
-		return map;
-	}
-
-	public static String writeBundleEntry(IPluginModelBase model, String startLevel, String autoStart) {
-		IPluginBase base = model.getPluginBase();
-		String id = base.getId();
-		StringBuffer buffer = new StringBuffer(id);
-
-		ModelEntry entry = PluginRegistry.findEntry(id);
-		if (entry.getActiveModels().length > 1) {
-			buffer.append(VERSION_SEPARATOR);
-			buffer.append(model.getPluginBase().getVersion());
-		}
-
-		boolean hasStartLevel = (startLevel != null && startLevel.length() > 0);
-		boolean hasAutoStart = (autoStart != null && autoStart.length() > 0);
-
-		if (hasStartLevel || hasAutoStart)
-			buffer.append('@');
-		if (hasStartLevel)
-			buffer.append(startLevel);
-		if (hasStartLevel || hasAutoStart)
-			buffer.append(':');
-		if (hasAutoStart)
-			buffer.append(autoStart);
-		return buffer.toString();
-	}
-
-	public static void checkBackwardCompatibility(ILaunchConfiguration configuration, boolean save) throws CoreException {
-		ILaunchConfigurationWorkingCopy wc = null;
-		if (configuration.isWorkingCopy()) {
-			wc = (ILaunchConfigurationWorkingCopy) configuration;
-		} else {
-			wc = configuration.getWorkingCopy();
-		}
-
-		String value = configuration.getAttribute("wsproject", (String) null); //$NON-NLS-1$
-		if (value != null) {
-			wc.setAttribute("wsproject", (String) null); //$NON-NLS-1$
-			if (value.indexOf(';') != -1) {
-				value = value.replace(';', ',');
-			} else if (value.indexOf(':') != -1) {
-				value = value.replace(':', ',');
-			}
-			value = (value.length() == 0 || value.equals(",")) //$NON-NLS-1$
-			? null
-					: value.substring(0, value.length() - 1);
-
-			boolean automatic = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
-			String attr = automatic ? IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS : IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS;
-			wc.setAttribute(attr, value);
-		}
-
-		String value2 = configuration.getAttribute("extplugins", (String) null); //$NON-NLS-1$
-		if (value2 != null) {
-			wc.setAttribute("extplugins", (String) null); //$NON-NLS-1$
-			if (value2.indexOf(';') != -1) {
-				value2 = value2.replace(';', ',');
-			} else if (value2.indexOf(':') != -1) {
-				value2 = value2.replace(':', ',');
-			}
-			value2 = (value2.length() == 0 || value2.equals(",")) ? null : value2.substring(0, value2.length() - 1); //$NON-NLS-1$
-			wc.setAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, value2);
-		}
-
-		String version = configuration.getAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, (String) null);
-		boolean newApp = TargetPlatformHelper.usesNewApplicationModel();
-		boolean upgrade = !"3.3".equals(version) && newApp; //$NON-NLS-1$
-		if (!upgrade)
-			upgrade = TargetPlatformHelper.getTargetVersion() >= 3.2 && version == null;
-		if (upgrade) {
-			wc.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, newApp ? "3.3" : "3.2a"); //$NON-NLS-1$ //$NON-NLS-2$
-			boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
-			boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
-			boolean automaticAdd = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
-			if (!usedefault && !useFeatures) {
-				ArrayList list = new ArrayList();
-				if (version == null) {
-					list.add("org.eclipse.core.contenttype"); //$NON-NLS-1$
-					list.add("org.eclipse.core.jobs"); //$NON-NLS-1$
-					list.add(IPDEBuildConstants.BUNDLE_EQUINOX_COMMON);
-					list.add("org.eclipse.equinox.preferences"); //$NON-NLS-1$
-					list.add("org.eclipse.equinox.registry"); //$NON-NLS-1$
-					list.add("org.eclipse.core.runtime.compatibility.registry"); //$NON-NLS-1$
-				}
-				if (!"3.3".equals(version) && newApp) //$NON-NLS-1$
-					list.add("org.eclipse.equinox.app"); //$NON-NLS-1$
-				StringBuffer extensions = new StringBuffer(configuration.getAttribute(IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, "")); //$NON-NLS-1$
-				StringBuffer target = new StringBuffer(configuration.getAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, "")); //$NON-NLS-1$
-				for (int i = 0; i < list.size(); i++) {
-					String plugin = list.get(i).toString();
-					IPluginModelBase model = PluginRegistry.findModel(plugin);
-					if (model == null)
-						continue;
-					if (model.getUnderlyingResource() != null) {
-						if (automaticAdd)
-							continue;
-						if (extensions.length() > 0)
-							extensions.append(","); //$NON-NLS-1$
-						extensions.append(plugin);
-					} else {
-						if (target.length() > 0)
-							target.append(","); //$NON-NLS-1$
-						target.append(plugin);
-					}
-				}
-				if (extensions.length() > 0)
-					wc.setAttribute(IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, extensions.toString());
-				if (target.length() > 0)
-					wc.setAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS, target.toString());
-			}
-		}
-
-		if (save && (value != null || value2 != null || upgrade))
-			wc.doSave();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java
index be0fbf1..68ceafe 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationAreaBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,13 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java
index 5e4359c..4dc80a5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ConfigurationTemplateBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import java.io.File;
 import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.*;
@@ -23,7 +25,6 @@ import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.util.FileNameFilter;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EclipsePluginValidationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EclipsePluginValidationOperation.java
deleted file mode 100644
index 7329608..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EclipsePluginValidationOperation.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource Corporation - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.util.IdUtil;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.elements.NamedElement;
-import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.eclipse.swt.graphics.Image;
-
-public class EclipsePluginValidationOperation extends LaunchValidationOperation {
-
-	private Map fExtensionErrors = new HashMap(2);
-	private static Object[] EMPTY = new Object[0];
-
-	public EclipsePluginValidationOperation(ILaunchConfiguration configuration) {
-		super(configuration);
-	}
-
-	protected IPluginModelBase[] getModels() throws CoreException {
-		return BundleLauncherHelper.getMergedBundles(fLaunchConfiguration, false);
-	}
-
-	public void run(IProgressMonitor monitor) throws CoreException {
-		super.run(monitor);
-		if (fExtensionErrors.size() > 0)
-			fExtensionErrors.clear();
-		validateExtensions();
-	}
-
-	private void validateExtensions() {
-		try {
-			if (fLaunchConfiguration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
-				String product = fLaunchConfiguration.getAttribute(IPDELauncherConstants.PRODUCT, (String) null);
-				if (product != null) {
-					validateExtension(product);
-					String application = getApplication(product);
-					if (application != null)
-						validateExtension(application);
-				}
-			} else {
-				String configType = fLaunchConfiguration.getType().getIdentifier();
-				String attribute = configType.equals(EclipseLaunchShortcut.CONFIGURATION_TYPE) ? IPDELauncherConstants.APPLICATION : IPDELauncherConstants.APP_TO_TEST;
-				String application = fLaunchConfiguration.getAttribute(attribute, TargetPlatform.getDefaultApplication());
-				if (!IPDEUIConstants.CORE_TEST_APPLICATION.equals(application)) {
-					validateExtension(application);
-				}
-			}
-		} catch (CoreException e) {
-			PDEPlugin.log(e);
-		}
-	}
-
-	private String getApplication(String product) {
-		String bundleID = product.substring(0, product.lastIndexOf('.'));
-		BundleDescription bundle = getState().getBundle(bundleID, null);
-		if (bundle != null) {
-			IPluginModelBase model = PluginRegistry.findModel(bundle);
-			if (model != null) {
-				IPluginExtension[] extensions = model.getPluginBase().getExtensions();
-				for (int i = 0; i < extensions.length; i++) {
-					IPluginExtension ext = extensions[i];
-					String point = ext.getPoint();
-					if ("org.eclipse.core.runtime.products".equals(point) //$NON-NLS-1$
-							&& product.equals(IdUtil.getFullId(ext))) {
-						if (ext.getChildCount() == 1) {
-							IPluginElement prod = (IPluginElement) ext.getChildren()[0];
-							if (prod.getName().equals("product")) { //$NON-NLS-1$
-								IPluginAttribute attr = prod.getAttribute("application"); //$NON-NLS-1$
-								return attr != null ? attr.getValue() : null;
-							}
-						}
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	private void validateExtension(String id) {
-		int index = id.lastIndexOf('.');
-		if (index == -1)
-			return;
-		String bundleID = id.substring(0, index);
-		BundleDescription bundle = getState().getBundle(bundleID, null);
-		if (bundle == null) {
-			String name = NLS.bind(PDEUIMessages.EclipsePluginValidationOperation_pluginMissing, bundleID);
-			PDELabelProvider provider = PDEPlugin.getDefault().getLabelProvider();
-			Image image = provider.get(PDEPluginImages.DESC_PLUGIN_OBJ);
-			fExtensionErrors.put(new NamedElement(name, image), EMPTY);
-		}
-	}
-
-	public boolean hasErrors() {
-		return super.hasErrors() || fExtensionErrors.size() >= 1;
-	}
-
-	public Map getInput() {
-		Map map = super.getInput();
-		map.putAll(fExtensionErrors);
-		return map;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EquinoxInitializer.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EquinoxInitializer.java
deleted file mode 100644
index 124ebbf..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/EquinoxInitializer.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.*;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer;
-
-public class EquinoxInitializer extends OSGiLaunchConfigurationInitializer {
-
-	private Map fStartLevels;
-
-	public void initialize(ILaunchConfigurationWorkingCopy configuration) {
-		super.initialize(configuration);
-		initializeProgramArguments(configuration);
-		initializeVMArguments(configuration);
-		initializeTracing(configuration);
-	}
-
-	private void initializeProgramArguments(ILaunchConfigurationWorkingCopy configuration) {
-		StringBuffer buffer = new StringBuffer(LaunchArgumentsHelper.getInitialProgramArguments());
-		if (buffer.length() > 0) {
-			if (buffer.indexOf("-console") == -1) { //$NON-NLS-1$
-				buffer.append(" -console"); //$NON-NLS-1$
-			}
-		} else {
-			buffer.append("-console"); //$NON-NLS-1$
-		}
-		configuration.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
-		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, buffer.toString());
-	}
-
-	private void initializeVMArguments(ILaunchConfigurationWorkingCopy configuration) {
-		configuration.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
-		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
-		StringBuffer vmArgs = new StringBuffer(preferences.getString(ICoreConstants.VM_ARGS));
-		if (vmArgs.indexOf("-Declipse.ignoreApp") == -1) { //$NON-NLS-1$
-			if (vmArgs.length() > 0)
-				vmArgs.append(" "); //$NON-NLS-1$
-			vmArgs.append("-Declipse.ignoreApp=true"); //$NON-NLS-1$
-		}
-		if (vmArgs.indexOf("-Dosgi.noShutdown") == -1) { //$NON-NLS-1$
-			vmArgs.append(" -Dosgi.noShutdown=true"); //$NON-NLS-1$
-		}
-		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.toString());
-	}
-
-	private void initializeTracing(ILaunchConfigurationWorkingCopy configuration) {
-		configuration.setAttribute(IPDELauncherConstants.TRACING_CHECKED, IPDELauncherConstants.TRACING_NONE);
-	}
-
-	protected void initializeBundleState(ILaunchConfigurationWorkingCopy configuration) {
-		initializeBundleState();
-		super.initializeBundleState(configuration);
-	}
-
-	protected String getAutoStart(String bundleID) {
-		if (fStartLevels.containsKey(bundleID)) {
-			String value = fStartLevels.get(bundleID).toString();
-			return value.substring(value.indexOf(":") + 1); //$NON-NLS-1$
-		}
-		return super.getAutoStart(bundleID);
-	}
-
-	protected String getStartLevel(String bundleID) {
-		if (fStartLevels.containsKey(bundleID)) {
-			String value = fStartLevels.get(bundleID).toString();
-			return value.substring(0, value.indexOf(":")); //$NON-NLS-1$
-		}
-		return super.getStartLevel(bundleID);
-	}
-
-	private void initializeBundleState() {
-		if (fStartLevels == null)
-			fStartLevels = new HashMap();
-		Properties props = TargetPlatformHelper.getConfigIniProperties();
-		if (props != null) {
-			String value = (String) props.get("osgi.bundles"); //$NON-NLS-1$
-			if (value != null) {
-				StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$
-				while (tokenizer.hasMoreTokens()) {
-					String tokenValue = tokenizer.nextToken();
-					int index = tokenValue.indexOf("@"); //$NON-NLS-1$
-					if (index > 0) {
-						String bundle = tokenValue.substring(0, index).trim();
-						fStartLevels.put(bundle, getStartValue(tokenValue.substring(index)));
-					}
-				}
-			}
-		}
-	}
-
-	private String getStartValue(String value) {
-		StringBuffer buffer = new StringBuffer(value);
-		StringBuffer result = new StringBuffer(":"); //$NON-NLS-1$
-
-		int index = value.indexOf("start"); //$NON-NLS-1$
-		result.append(Boolean.toString(index != -1));
-
-		if (index != -1)
-			buffer.delete(index, index + 5);
-
-		int colon = value.indexOf(':');
-		if (colon != -1)
-			buffer.deleteCharAt(colon);
-
-		// delete the first char '@'
-		buffer.deleteCharAt(0);
-
-		try {
-			result.insert(0, Integer.parseInt(buffer.toString().trim()));
-		} catch (NumberFormatException e) {
-			result.insert(0, DEFAULT);
-		}
-		return result.toString();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java
new file mode 100644
index 0000000..9b8809d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FeatureBlock.java
@@ -0,0 +1,1192 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import java.util.*;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.launching.launcher.LaunchValidationOperation;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.dialogs.FeatureSelectionDialog;
+import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog;
+import org.eclipse.pde.internal.ui.elements.NamedElement;
+import org.eclipse.pde.internal.ui.shared.CachedCheckboxTreeViewer;
+import org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.progress.WorkbenchJob;
+
+/**
+ * Provides the UI that is displayed in the Plug-ins tab of PDE launch configs when the user
+ * has chosen to launch using "features selected below".  Provides a filterable tree that
+ * the user can select which features to launch, as well as where the feature should be taken
+ * from (Workspace or External) and where plug-ins should be collected from (Workspace first
+ * or External first).
+ */
+public class FeatureBlock {
+
+	/**
+	 * Label provider for the tree.  Implements ILabelProvider so it can support the text filter (see PatternFilter)
+	 */
+	class FeatureTreeLabelProvider extends StyledCellLabelProvider implements ILabelProvider {
+
+		PDELabelProvider pdeLabelProvider = new PDELabelProvider();
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.pde.internal.ui.util.SharedLabelProvider#getColumnImage(java.lang.Object, int)
+		 */
+		public Image getColumnImage(Object obj, int index) {
+			// If there is a workspace feature available, display the workspace feature icon, even if the user has selected external
+			if (index == COLUMN_FEATURE_NAME) {
+				if (obj instanceof FeatureLaunchModel) {
+					FeatureLaunchModel model = (FeatureLaunchModel) obj;
+					return pdeLabelProvider.getImage(model.getModel(true));
+				} else if (obj instanceof NamedElement) {
+					return ((NamedElement) obj).getImage();
+				} else if (obj instanceof PluginLaunchModel) {
+					IPluginModelBase pluginModelBase = ((PluginLaunchModel) obj).getPluginModelBase();
+					return pdeLabelProvider.getColumnImage(pluginModelBase, index);
+				}
+			} else if (index == COLUMN_PLUGIN_RESOLUTION) {
+				if (obj instanceof PluginLaunchModel) {
+					PluginLaunchModel pluginLaunchModel = ((PluginLaunchModel) obj);
+					if (IPDELauncherConstants.LOCATION_WORKSPACE.equalsIgnoreCase(pluginLaunchModel.getPluginResolution())) {
+						ModelEntry modelEntry = PluginRegistry.findEntry(pluginLaunchModel.getPluginModelId());
+						if (!modelEntry.hasWorkspaceModels()) {
+							return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+						}
+					} else if (IPDELauncherConstants.LOCATION_EXTERNAL.equalsIgnoreCase(pluginLaunchModel.getPluginResolution())) {
+						ModelEntry modelEntry = PluginRegistry.findEntry(pluginLaunchModel.getPluginModelId());
+						if (!modelEntry.hasExternalModels()) {
+							return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+						}
+					}
+				}
+			}
+			return null;
+		}
+
+		public String getColumnText(Object obj, int index) {
+			if (obj instanceof NamedElement && index == COLUMN_FEATURE_NAME)
+				return ((NamedElement) obj).getLabel();
+			if (obj instanceof PluginLaunchModel) {
+				PluginLaunchModel pluginLaunchModel = (PluginLaunchModel) obj;
+				switch (index) {
+					case COLUMN_FEATURE_NAME :
+						return pluginLaunchModel.getPluginModelId();
+					case COLUMN_PLUGIN_RESOLUTION :
+						return getResolutionLabel(pluginLaunchModel.getPluginResolution());
+				}
+			}
+			if (obj instanceof FeatureLaunchModel) {
+				FeatureLaunchModel model = (FeatureLaunchModel) obj;
+				switch (index) {
+					case COLUMN_FEATURE_NAME :
+						return model.getId();
+					case COLUMN_PLUGIN_RESOLUTION :
+						return getResolutionLabel(model.getResolutionValue());
+					default :
+						return ""; //$NON-NLS-1$
+				}
+			}
+			return null;
+		}
+
+		public void update(ViewerCell cell) {
+			switch (cell.getColumnIndex()) {
+				case COLUMN_FEATURE_NAME :
+					StyledString label = getStyledText(cell.getElement());
+					cell.setStyleRanges(label.getStyleRanges());
+					cell.setText(label.toString());
+					cell.setImage(getColumnImage(cell.getElement(), COLUMN_FEATURE_NAME));
+					break;
+				case COLUMN_PLUGIN_RESOLUTION :
+					cell.setText(getColumnText(cell.getElement(), COLUMN_PLUGIN_RESOLUTION));
+					cell.setImage(getColumnImage(cell.getElement(), COLUMN_PLUGIN_RESOLUTION));
+					break;
+			}
+			super.update(cell);
+		}
+
+		private StyledString getStyledText(Object element) {
+			StyledString styledString = new StyledString(getColumnText(element, COLUMN_FEATURE_NAME));
+			if (element instanceof FeatureLaunchModel) {
+				FeatureLaunchModel featureModel = (FeatureLaunchModel) element;
+				styledString.append(" (", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+				String version = featureModel.getVersion();
+				int index = version.indexOf('-');
+				if (index > -1)
+					version = version.substring(0, index);
+				styledString.append(version, StyledString.QUALIFIER_STYLER);
+				styledString.append(")", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+			} else if (element instanceof PluginLaunchModel) {
+				PluginLaunchModel pluginLaunchModel = (PluginLaunchModel) element;
+				styledString.append(" (", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+				String version = pluginLaunchModel.getPluginModelBase().getPluginBase().getVersion();
+				int index = version.indexOf('-');
+				if (index > -1)
+					version = version.substring(0, index);
+				styledString.append(version, StyledString.QUALIFIER_STYLER);
+				styledString.append(")", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+			}
+			return styledString;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+		 */
+		public Image getImage(Object element) {
+			// Only the name column gets an image, see getColumnImage()
+			return null;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+		 */
+		public String getText(Object element) {
+			// If the label provider implement ILabelProvider the ViewerComparator calls getText() with whatever was passed to it, in our case we are already passing the label text based on sort order
+			if (element instanceof String) {
+				return (String) element;
+			}
+			return getColumnText(element, 0);
+		}
+	}
+
+	class ButtonSelectionListener extends SelectionAdapter {
+
+		private PluginStatusDialog fDialog;
+
+		public void widgetSelected(SelectionEvent e) {
+			Object source = e.getSource();
+			if (source == fValidateButton) {
+				handleValidate();
+			} else if (source == fSelectFeaturesButton) {
+				handleSelectFeatures();
+			} else if (source == fAddPluginButton) {
+				handleAddPlugin();
+			} else if (source == fSelectAllButton) {
+				handleSelectAll(true);
+			} else if (source == fDeselectAllButton) {
+				handleSelectAll(false);
+			} else if (source == fAddRequiredFeaturesButton) {
+				handleAddRequired();
+			} else if (source == fDefaultsButton) {
+				handleRestoreDefaults();
+			} else if (source == fRemovePluginButton) {
+				handleRemovePlugin();
+			} else if (source == fFilterButton) {
+				handleFilterButton();
+			} else if (source instanceof TreeColumn) {
+				handleColumn((TreeColumn) source, 0);
+			}
+			if (!fIsDisposed)
+				fTab.updateLaunchConfigurationDialog();
+		}
+
+		private void handleSelectFeatures() {
+			ArrayList featureModels = new ArrayList();
+			for (Iterator iterator = fFeatureModels.values().iterator(); iterator.hasNext();) {
+				FeatureLaunchModel featureLaunchModel = (FeatureLaunchModel) iterator.next();
+				if (!fTree.getChecked(featureLaunchModel)) {
+					featureModels.add(featureLaunchModel.getModel(true));
+				}
+			}
+			if (featureModels.size() == 0) {
+				MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.FeatureSelectionDialog_title, PDEUIMessages.FeatureBlock_AllFeatureSelected);
+				return;
+			}
+			FeatureSelectionDialog dialog = new FeatureSelectionDialog(PDEPlugin.getActiveWorkbenchShell(), (IFeatureModel[]) featureModels.toArray(new IFeatureModel[featureModels.size()]), true);
+			dialog.create();
+			if (dialog.open() == Window.OK) {
+				fTree.getControl().setRedraw(false);
+				fTree.removeFilter(fSelectedOnlyFilter);
+				Object[] selectedModels = dialog.getResult();
+				for (int i = 0; i < selectedModels.length; i++) {
+					String id = ((IFeatureModel) selectedModels[i]).getFeature().getId();
+					fTree.setChecked(fFeatureModels.get(id), true);
+				}
+				if (fFilterButton.getSelection()) {
+					fTree.addFilter(fSelectedOnlyFilter);
+				}
+				fTree.getControl().setRedraw(true);
+				updateCounter();
+			}
+		}
+
+		private void handleFilterButton() {
+			if (fFilterButton.getSelection()) {
+				fTree.addFilter(fSelectedOnlyFilter);
+			} else {
+				fTree.removeFilter(fSelectedOnlyFilter);
+			}
+			fTree.expandAll();
+		}
+
+		private void handleRemovePlugin() {
+			// Any changes here need to be reflected in the SWT.DEL key remove handling
+			IStructuredSelection selection = (IStructuredSelection) fTree.getSelection();
+			int index = fAdditionalPlugins.indexOf(selection.getFirstElement());
+			fAdditionalPlugins.removeAll(selection.toList());
+			fTree.remove(selection.toArray());
+			List input = (List) fTree.getInput();
+			input.removeAll(selection.toList());
+			if (fAdditionalPlugins.size() == 0) {
+				fTree.remove(fAdditionalPluginsParentElement);
+				input.remove(fAdditionalPluginsParentElement);
+				fRemovePluginButton.setEnabled(false);
+			} else {
+				index--;
+				fTree.setSelection(new StructuredSelection(fAdditionalPlugins.get(index > 0 ? index : 0)), true);
+				fRemovePluginButton.setEnabled(true);
+			}
+			updateCounter();
+		}
+
+		private void handleAddPlugin() {
+			PluginSelectionDialog dialog = new PluginSelectionDialog(PDEPlugin.getActiveWorkbenchShell(), getAvailablePlugins(), true);
+			if (dialog.open() == Window.OK) {
+
+				Object[] models = dialog.getResult();
+				ArrayList modelList = new ArrayList(models.length);
+				for (int i = 0; i < models.length; i++) {
+					PluginLaunchModel pluginLaunchModel = new PluginLaunchModel((IPluginModelBase) models[i], IPDELauncherConstants.LOCATION_DEFAULT);
+					modelList.add(pluginLaunchModel);
+				}
+
+				List input = (List) fTree.getInput();
+				if (!input.contains(fAdditionalPluginsParentElement)) {
+					input.add(fAdditionalPluginsParentElement);
+				}
+				fAdditionalPlugins.addAll(modelList);
+
+				fTree.getControl().setRedraw(false);
+				fTree.removeFilter(fSelectedOnlyFilter);
+				fTree.refresh();
+				for (Iterator iterator = modelList.iterator(); iterator.hasNext();) {
+					fTree.setChecked(iterator.next(), true);
+				}
+				fTree.setSelection(new StructuredSelection(modelList.get(modelList.size() - 1)), true);
+				fTree.getTree().setSortColumn(fTree.getTree().getSortColumn());
+				fTree.getTree().setSortDirection(fTree.getTree().getSortDirection());
+				if (fFilterButton.getSelection()) {
+					fTree.addFilter(fSelectedOnlyFilter);
+				}
+				fTree.getControl().setRedraw(true);
+				updateCounter();
+			}
+		}
+
+		private IPluginModelBase[] getAvailablePlugins() {
+			IPluginModelBase[] plugins = PluginRegistry.getActiveModels(false);
+			if (fAdditionalPlugins.isEmpty()) {
+				return plugins;
+			}
+			Set additionalPlugins = new HashSet();
+			for (Iterator iterator = fAdditionalPlugins.iterator(); iterator.hasNext();) {
+				PluginLaunchModel model = (PluginLaunchModel) iterator.next();
+				additionalPlugins.add(model.getPluginModelBase());
+			}
+			List result = new ArrayList();
+			for (int i = 0; i < plugins.length; i++) {
+				if (!additionalPlugins.contains(plugins[i])) {
+					result.add(plugins[i]);
+				}
+			}
+			return (IPluginModelBase[]) result.toArray(new IPluginModelBase[result.size()]);
+		}
+
+		private void handleValidate() {
+			if (fOperation == null)
+				// Unlike PluginBlock, we don't want to validate the application/product requirements because we will grab them automatically at launch time
+				fOperation = new LaunchValidationOperation(fLaunchConfig) {
+					protected IPluginModelBase[] getModels() throws CoreException {
+						// The feature block is used in both the OSGi config and Eclipse configs, use the tab id to determine which we are using
+						boolean isOSGiTab = fTab.getId().equals(IPDELauncherConstants.TAB_BUNDLES_ID);
+						return BundleLauncherHelper.getMergedBundles(fLaunchConfiguration, isOSGiTab);
+					}
+				};
+			try {
+				fOperation.run(new NullProgressMonitor());
+			} catch (CoreException e) {
+				PDEPlugin.log(e);
+			}
+			if (fDialog == null) {
+				if (fOperation.hasErrors()) {
+					fDialog = new PluginStatusDialog(getShell(), SWT.MODELESS | SWT.CLOSE | SWT.BORDER | SWT.TITLE | SWT.RESIZE);
+					fDialog.setInput(fOperation.getInput());
+					fDialog.open();
+					fDialog = null;
+				} else if (fOperation.isEmpty()) {
+					MessageDialog.openInformation(getShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, NLS.bind(PDEUIMessages.AbstractLauncherToolbar_noSelection, fTab.getName().toLowerCase(Locale.ENGLISH)));
+				} else {
+					MessageDialog.openInformation(getShell(), PDEUIMessages.PluginStatusDialog_pluginValidation, PDEUIMessages.AbstractLauncherToolbar_noProblems);
+				}
+			} else {
+				if (fOperation.getInput().size() > 0)
+					fDialog.refresh(fOperation.getInput());
+				else {
+					Map input = new HashMap(1);
+					input.put(PDEUIMessages.AbstractLauncherToolbar_noProblems, Status.OK_STATUS);
+					fDialog.refresh(input);
+				}
+			}
+		}
+
+		private Shell getShell() {
+			try {
+				Control c = fTab.getControl();
+				if (!c.isDisposed())
+					return c.getShell();
+			} catch (SWTException e) {
+			}
+			return PDEPlugin.getActiveWorkbenchShell();
+		}
+
+		private void handleAddRequired() {
+			if (fTree.getCheckedElements() != null && fTree.getCheckedElements().length > 0) {
+				Object[] features = fTree.getCheckedElements();
+				Set requiredFeatureIDs = new HashSet();
+				for (int i = 0; i < features.length; i++) {
+					if (features[i] instanceof FeatureLaunchModel) {
+						requiredFeatureIDs.add(((FeatureLaunchModel) features[i]).getId());
+						getFeatureDependencies(((FeatureLaunchModel) features[i]).getModel(fFeatureWorkspaceButton.getSelection()), requiredFeatureIDs);
+					}
+				}
+
+				fTree.getControl().setRedraw(false);
+				fTree.removeFilter(fSelectedOnlyFilter);
+				for (Iterator iterator = requiredFeatureIDs.iterator(); iterator.hasNext();) {
+					Object featureModel = fFeatureModels.get(iterator.next());
+					if (featureModel != null) {
+						fTree.setChecked(featureModel, true);
+					}
+				}
+				if (fFilterButton.getSelection()) {
+					fTree.addFilter(fSelectedOnlyFilter);
+				}
+				fTree.getControl().setRedraw(true);
+				updateCounter();
+			}
+		}
+
+		private void getFeatureDependencies(IFeatureModel model, Set requiredFeatureIDs) {
+			IFeature feature = model.getFeature();
+			IFeatureImport[] featureImports = feature.getImports();
+			for (int i = 0; i < featureImports.length; i++) {
+				if (featureImports[i].getType() == IFeatureImport.FEATURE) {
+					addFeature(requiredFeatureIDs, featureImports[i].getId());
+				}
+			}
+
+			IFeatureChild[] featureIncludes = feature.getIncludedFeatures();
+			for (int i = 0; i < featureIncludes.length; i++) {
+				addFeature(requiredFeatureIDs, featureIncludes[i].getId());
+			}
+		}
+
+		private void addFeature(Set requiredFeatureIDs, String id) {
+			if (!requiredFeatureIDs.contains(id)) {
+				FeatureLaunchModel model = (FeatureLaunchModel) fFeatureModels.get(id);
+				if (model != null) {
+					requiredFeatureIDs.add(id);
+					getFeatureDependencies(model.getModel(fFeatureWorkspaceButton.getSelection()), requiredFeatureIDs);
+				}
+			}
+		}
+
+		private void handleColumn(TreeColumn tc, int sortDirn) {
+			Tree tree = fTree.getTree();
+			tree.setSortColumn(tc);
+			if (sortDirn == 0) {
+				switch (tree.getSortDirection()) {
+					case SWT.DOWN :
+						sortDirn = SWT.UP;
+						break;
+					case SWT.UP :
+					default :
+						sortDirn = SWT.DOWN;
+				}
+			}
+			tree.setSortDirection(sortDirn);
+			int sortOrder = sortDirn == SWT.UP ? -1 : 1;
+			int sortColumn = ((Integer) tc.getData(COLUMN_ID)).intValue();
+			fTree.setSorter(new TreeSorter(sortColumn, sortOrder));
+			saveSortOrder();
+		}
+
+		private void handleRestoreDefaults() {
+			fWorkspacePluginButton.setSelection(true);
+			fExternalPluginButton.setSelection(false);
+
+			List input = (List) fTree.getInput();
+			input.removeAll(fAdditionalPlugins);
+			input.remove(fAdditionalPluginsParentElement);
+			fAdditionalPlugins.clear();
+
+			fRemovePluginButton.setEnabled(false);
+			for (Iterator iterator = fFeatureModels.values().iterator(); iterator.hasNext();) {
+				FeatureLaunchModel model = (FeatureLaunchModel) iterator.next();
+				model.setPluginResolution(IPDELauncherConstants.LOCATION_DEFAULT);
+			}
+
+			fTree.getControl().setRedraw(false);
+			fTree.removeFilter(fSelectedOnlyFilter);
+			fTree.setCheckedElements(new Object[0]); // Make sure the check state cache is cleared
+			fTree.refresh();
+			fTree.setAllChecked(true);
+			if (fFilterButton.getSelection()) {
+				fTree.addFilter(fSelectedOnlyFilter);
+			}
+			fTree.getControl().setRedraw(true);
+			updateCounter();
+		}
+
+		private void handleSelectAll(boolean state) {
+			fTree.getControl().setRedraw(false);
+			fTree.removeFilter(fSelectedOnlyFilter);
+			fTree.setAllChecked(state);
+			if (fFilterButton.getSelection()) {
+				fTree.addFilter(fSelectedOnlyFilter);
+			}
+			fTree.getControl().setRedraw(true);
+			updateCounter();
+		}
+	}
+
+	class LocationCellModifier implements ICellModifier {
+		public boolean canModify(Object element, String property) {
+			if (element instanceof FeatureLaunchModel || element instanceof PluginLaunchModel) {
+				return fTree.getChecked(element);
+			}
+			return false;
+		}
+
+		public Object getValue(Object element, String property) {
+			if (property == PROPERTY_RESOLUTION) {
+				if (element instanceof FeatureLaunchModel) {
+					String location = ((FeatureLaunchModel) element).getResolutionValue();
+					return getLocationIndex(location);
+				} else if (element instanceof PluginLaunchModel) {
+					String location = ((PluginLaunchModel) element).getPluginResolution();
+					return getLocationIndex(location);
+				}
+			}
+			return null;
+		}
+
+		private Object getLocationIndex(String location) {
+			if (location.equalsIgnoreCase(IPDELauncherConstants.LOCATION_DEFAULT)) {
+				return new Integer(0);
+			} else if (location.equalsIgnoreCase(IPDELauncherConstants.LOCATION_WORKSPACE)) {
+				return new Integer(1);
+			} else if (location.equalsIgnoreCase(IPDELauncherConstants.LOCATION_EXTERNAL)) {
+				return new Integer(2);
+			}
+			return null;
+		}
+
+		public void modify(Object item, String property, Object value) {
+			if (property == PROPERTY_RESOLUTION && value != null) {
+				Object data = ((TreeItem) item).getData();
+				int comboIndex = ((Integer) value).intValue();
+				String location = getLocation(comboIndex);
+				if (data instanceof FeatureLaunchModel) {
+					FeatureLaunchModel model = (FeatureLaunchModel) data;
+					if (!location.equalsIgnoreCase(model.getResolutionValue())) {
+						model.setPluginResolution(location);
+						fTree.refresh(model, true);
+						fTab.updateLaunchConfigurationDialog();
+					}
+				} else if (data instanceof PluginLaunchModel) {
+					PluginLaunchModel pluginLaunchModel = (PluginLaunchModel) data;
+					if (!location.equalsIgnoreCase(pluginLaunchModel.getPluginResolution())) {
+						pluginLaunchModel.setPluginResolution(location);
+						fTree.refresh(pluginLaunchModel, true);
+						fTab.updateLaunchConfigurationDialog();
+					}
+				}
+
+			}
+		}
+
+		private String getLocation(int comboIndex) {
+			String location = null;
+			switch (comboIndex) {
+				case 0 :
+					location = IPDELauncherConstants.LOCATION_DEFAULT;
+					break;
+				case 1 :
+					location = IPDELauncherConstants.LOCATION_WORKSPACE;
+					break;
+				case 2 :
+					location = IPDELauncherConstants.LOCATION_EXTERNAL;
+			}
+			return location;
+		}
+	}
+
+	class PluginContentProvider implements ITreeContentProvider {
+
+		public Object[] getElements(Object input) {
+			if (input instanceof Collection) {
+				return ((Collection) input).toArray();
+			}
+			if (input instanceof Object[]) {
+				return (Object[]) input;
+			}
+			return new Object[0];
+		}
+
+		public void dispose() {
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement == fAdditionalPluginsParentElement) {
+				return fAdditionalPlugins.toArray();
+			}
+			return new Object[0];
+		}
+
+		public Object getParent(Object element) {
+			if (element instanceof PluginLaunchModel)
+				return fAdditionalPluginsParentElement;
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			if (element instanceof NamedElement)
+				return true;
+			return false;
+		}
+	}
+
+	class TreeSorter extends ViewerSorter {
+		int sortColumn;
+		int sortOrder;
+
+		public TreeSorter(int sortColumn, int sortOrder) {
+			this.sortColumn = sortColumn;
+			this.sortOrder = sortOrder;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		public int compare(Viewer viewer, Object e1, Object e2) {
+			if (e1 == fAdditionalPluginsParentElement) {
+				return 1;
+			}
+			if (e2 == fAdditionalPluginsParentElement) {
+				return -1;
+			}
+			FeatureTreeLabelProvider labelProvider = (FeatureTreeLabelProvider) fTree.getLabelProvider();
+			return sortOrder * super.compare(viewer, labelProvider.getColumnText(e1, sortColumn), labelProvider.getColumnText(e2, sortColumn));
+		}
+	}
+
+	class PluginLaunchModel {
+		private IPluginModelBase fPluginModelBase;
+		private String fPluginResolution;
+
+		public PluginLaunchModel(IPluginModelBase pluginModelBase, String pluginResolution) {
+			fPluginModelBase = pluginModelBase;
+			fPluginResolution = pluginResolution;
+		}
+
+		public IPluginModelBase getPluginModelBase() {
+			return fPluginModelBase;
+		}
+
+		public String getPluginResolution() {
+			return fPluginResolution;
+		}
+
+		public void setPluginResolution(String pluginResolution) {
+			fPluginResolution = pluginResolution;
+		}
+
+		public String getPluginModelId() {
+			return fPluginModelBase.getPluginBase().getId();
+		}
+
+		public String getPluginModelVersion() {
+			return fPluginModelBase.getPluginBase().getVersion();
+		}
+
+	}
+
+	class FeatureLaunchModel {
+		public IFeatureModel fWorkspaceModel;
+		public IFeatureModel fTargetModel;
+		public String fPluginResolution;
+
+		public FeatureLaunchModel(IFeatureModel workspaceModel, IFeatureModel targetModel) {
+			fWorkspaceModel = workspaceModel;
+			fTargetModel = targetModel;
+			fPluginResolution = IPDELauncherConstants.LOCATION_DEFAULT;
+		}
+
+		public void setWorkspaceModel(IFeatureModel workspaceModel) {
+			fWorkspaceModel = workspaceModel;
+		}
+
+		public void setTargetModel(IFeatureModel targetModel) {
+			fTargetModel = targetModel;
+		}
+
+		public void setPluginResolution(String resolution) {
+			fPluginResolution = resolution;
+		}
+
+		public String getId() {
+			if (fWorkspaceModel != null) {
+				return fWorkspaceModel.getFeature().getId();
+			} else if (fTargetModel != null) {
+				return fTargetModel.getFeature().getId();
+			}
+			return ""; //$NON-NLS-1$
+		}
+
+		public String getVersion() {
+			if (fWorkspaceModel != null) {
+				return fWorkspaceModel.getFeature().getVersion();
+			} else if (fTargetModel != null) {
+				return fTargetModel.getFeature().getVersion();
+			}
+			return ""; //$NON-NLS-1$
+		}
+
+		public IFeatureModel getModel(boolean workspaceFirst) {
+			if (fWorkspaceModel == null) {
+				return fTargetModel;
+			}
+			if (fTargetModel == null) {
+				return fWorkspaceModel;
+			}
+			if (workspaceFirst) {
+				return fWorkspaceModel;
+			}
+			return fTargetModel;
+		}
+
+		/**
+		 * @return resolution value that can be stored in the config, one of {@link IPDELauncherConstants#LOCATION_DEFAULT}, {@link IPDELauncherConstants#LOCATION_WORKSPACE} or {@link IPDELauncherConstants#LOCATION_EXTERNAL}
+		 */
+		public String getResolutionValue() {
+			return fPluginResolution;
+		}
+
+		/* (non-Javadoc)
+		 * @see java.lang.Object#toString()
+		 */
+		public String toString() {
+			if (fWorkspaceModel != null) {
+				return fWorkspaceModel.getFeature().getId() + " " + fPluginResolution; //$NON-NLS-1$
+			}
+			if (fTargetModel != null) {
+				return fTargetModel.getFeature().getId() + " " + fPluginResolution; //$NON-NLS-1$
+			}
+			return fPluginResolution;
+		}
+	}
+
+	/**
+	 * @return the translated string label for the current resolution value
+	 */
+	public String getResolutionLabel(String pluginResolution) {
+		if (pluginResolution.equalsIgnoreCase(IPDELauncherConstants.LOCATION_DEFAULT)) {
+			return PDEUIMessages.FeatureBlock_default;
+		} else if (pluginResolution.equalsIgnoreCase(IPDELauncherConstants.LOCATION_WORKSPACE)) {
+			return PDEUIMessages.FeatureBlock_WorkspaceResolutionLabel;
+		} else if (pluginResolution.equalsIgnoreCase(IPDELauncherConstants.LOCATION_EXTERNAL)) {
+			return PDEUIMessages.FeatureBlock_ExternalResolutionLabel;
+		}
+		return ""; //$NON-NLS-1$
+	}
+
+	private static final int COLUMN_FEATURE_NAME = 0;
+	private static final int COLUMN_PLUGIN_RESOLUTION = 1;
+
+	private static final String COLUMN_ID = "columnID"; //$NON-NLS-1$
+	private static final String PROPERTY_RESOLUTION = "resolution"; //$NON-NLS-1$
+
+	private Button fAddRequiredFeaturesButton;
+	private Button fDefaultsButton;
+	private Button fSelectAllButton;
+	private Button fDeselectAllButton;
+
+	private Button fWorkspacePluginButton;
+	private Button fExternalPluginButton;
+	private Button fFilterButton;
+	private Label fCounter;
+
+	private Button fFeatureWorkspaceButton;
+	private Button fAutoValidate;
+	private Button fValidateButton;
+	private Button fSelectFeaturesButton;
+	private Button fAddPluginButton;
+	private Button fRemovePluginButton;
+
+	private ILaunchConfiguration fLaunchConfig;
+	private ButtonSelectionListener fListener;
+	private AbstractLauncherTab fTab;
+	private CachedCheckboxTreeViewer fTree;
+	private LaunchValidationOperation fOperation;
+
+	private ViewerFilter fSelectedOnlyFilter;
+	private boolean fIsDisposed = false;
+
+	/**
+	 * Maps feature ID to the FeatureLaunchModel that represents the feature in the tree
+	 */
+	private Map fFeatureModels;
+	private List fAdditionalPlugins;
+	private NamedElement fAdditionalPluginsParentElement;
+
+	public FeatureBlock(AbstractLauncherTab pluginsTab) {
+		Assert.isNotNull(pluginsTab);
+		fTab = pluginsTab;
+		PDEPlugin.getDefault().getLabelProvider().connect(this);
+	}
+
+	public void createControl(Composite parent, int span, int indent) {
+		fListener = new ButtonSelectionListener();
+		fSelectedOnlyFilter = new ViewerFilter() {
+			public boolean select(Viewer viewer, Object parentElement, Object element) {
+				return fTree.getChecked(element);
+			}
+		};
+
+		Composite composite = SWTFactory.createComposite(parent, 1, span, GridData.FILL_BOTH, 0, 0);
+
+		Composite treeGroup = SWTFactory.createComposite(composite, 2, 1, GridData.FILL_BOTH, 0, 0);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		gd.horizontalIndent = indent;
+		treeGroup.setLayoutData(gd);
+		SWTFactory.createLabel(treeGroup, PDEUIMessages.FeatureBlock_FeatureGroupDescription, 2);
+		createCheckBoxTree(treeGroup);
+		createButtonContainer(treeGroup, 10);
+
+		fFeatureWorkspaceButton = SWTFactory.createCheckButton(treeGroup, PDEUIMessages.FeatureBlock_UseWorkspaceFeatures, null, true, 2);
+		fFeatureWorkspaceButton.addSelectionListener(fListener);
+
+		Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+		separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+		Composite validatecomp = SWTFactory.createComposite(composite, 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalIndent = indent;
+		validatecomp.setLayoutData(gd);
+
+		fAutoValidate = SWTFactory.createCheckButton(validatecomp, NLS.bind(PDEUIMessages.PluginsTabToolBar_auto_validate, fTab.getName().replaceAll("&", "").toLowerCase(Locale.ENGLISH)), null, false, 1); //$NON-NLS-1$ //$NON-NLS-2$
+		fAutoValidate.addSelectionListener(fListener);
+		Composite rightAlignComp = SWTFactory.createComposite(validatecomp, 1, 1, SWT.NONE, 0, 0);
+		rightAlignComp.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, true));
+		fValidateButton = SWTFactory.createPushButton(rightAlignComp, NLS.bind(PDEUIMessages.PluginsTabToolBar_validate, fTab.getName().replaceAll("&", "")), null); //$NON-NLS-1$//$NON-NLS-2$
+		fValidateButton.addSelectionListener(fListener);
+	}
+
+	public void dispose() {
+		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		fIsDisposed = true;
+	}
+
+	private void createCheckBoxTree(Composite parent) {
+		PatternFilter filter = new PatternFilter() {
+			public boolean isElementVisible(Viewer viewer, Object element) {
+				if (element instanceof FeatureLaunchModel) {
+					return super.isElementVisible(viewer, ((FeatureLaunchModel) element).getId());
+				} else if (element instanceof PluginLaunchModel) {
+					return super.isElementVisible(viewer, ((PluginLaunchModel) element).getPluginModelId());
+				}
+				return super.isElementVisible(viewer, element);
+			}
+		};
+		filter.setIncludeLeadingWildcard(true);
+		FilteredCheckboxTree tree = new FilteredCheckboxTree(parent, null, SWT.FULL_SELECTION, filter) {
+			/* (non-Javadoc)
+			 * @see org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree#doCreateRefreshJob()
+			 */
+			protected WorkbenchJob doCreateRefreshJob() {
+				// If we are only showing selected items, we need to redo the filter after text filtering is applied.  The only selected filter uses the tree's check state, which hasn't been restored correctly at filter time. 
+				WorkbenchJob job = super.doCreateRefreshJob();
+				job.addJobChangeListener(new JobChangeAdapter() {
+					public void done(IJobChangeEvent event) {
+						if (event.getResult().isOK()) {
+							getDisplay().asyncExec(new Runnable() {
+								public void run() {
+									fTree.getControl().setRedraw(false);
+									fTree.removeFilter(fSelectedOnlyFilter);
+									fTree.restoreLeafCheckState();
+									fTree.addFilter(fSelectedOnlyFilter);
+									fTree.getControl().setRedraw(true);
+								}
+							});
+						}
+					}
+				});
+				return job;
+			}
+		};
+
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		tree.setLayoutData(gd);
+		fTree = tree.getCheckboxTreeViewer();
+
+		fTree.getControl().setFont(parent.getFont());
+		tree.getFilterControl().setFont(parent.getFont());
+
+		TreeColumn column1 = new TreeColumn(fTree.getTree(), SWT.LEFT);
+		column1.setText(PDEUIMessages.FeatureBlock_features);
+		column1.setWidth(400);
+		column1.addSelectionListener(fListener);
+		column1.setData(COLUMN_ID, new Integer(COLUMN_FEATURE_NAME));
+
+		TreeColumn column2 = new TreeColumn(fTree.getTree(), SWT.CENTER);
+		column2.setText(PDEUIMessages.FeatureBlock_pluginResolution);
+		column2.setWidth(100);
+		column2.addSelectionListener(fListener);
+		column2.setData(COLUMN_ID, new Integer(COLUMN_PLUGIN_RESOLUTION));
+
+		fTree.getTree().setHeaderVisible(true);
+		fTree.setLabelProvider(new FeatureTreeLabelProvider());
+		fTree.setContentProvider(new PluginContentProvider());
+		fTree.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				updateCounter();
+				fTab.updateLaunchConfigurationDialog();
+			}
+		});
+		String[] items = new String[] {PDEUIMessages.FeatureBlock_default, PDEUIMessages.FeatureBlock_WorkspaceResolutionLabel, PDEUIMessages.FeatureBlock_ExternalResolutionLabel};
+		ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(fTree.getTree(), items);
+		cellEditor.getControl().pack();
+		fTree.setCellEditors(new CellEditor[] {null, cellEditor});
+		fTree.setColumnProperties(new String[] {null, PROPERTY_RESOLUTION});
+		fTree.setCellModifier(new LocationCellModifier());
+		fTree.addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				ISelection selection = event.getSelection();
+				if (selection == null || !(selection instanceof IStructuredSelection)) {
+					return;
+				}
+				Object element = ((IStructuredSelection) selection).getFirstElement();
+				fTree.setChecked(element, !fTree.getChecked(element));
+				fTab.updateLaunchConfigurationDialog();
+			}
+		});
+		fTree.addSelectionChangedListener(new ISelectionChangedListener() {
+
+			public void selectionChanged(SelectionChangedEvent event) {
+				IStructuredSelection selection = (IStructuredSelection) fTree.getSelection();
+				boolean allPlugins = true;
+				for (Iterator iterator = selection.iterator(); iterator.hasNext();) {
+					Object element = iterator.next();
+					if (!(element instanceof PluginLaunchModel)) {
+						allPlugins = false;
+					}
+				}
+				fRemovePluginButton.setEnabled(allPlugins);
+			}
+		});
+		fTree.getTree().addKeyListener(new KeyAdapter() {
+			public void keyReleased(KeyEvent e) {
+				if (e.keyCode == SWT.DEL) {
+					// Any changes here need to be reflected in the remove button handling
+					IStructuredSelection selection = (IStructuredSelection) fTree.getSelection();
+					int index = fAdditionalPlugins.indexOf(selection.getFirstElement());
+					List input = (List) fTree.getInput();
+					for (Iterator iterator = selection.iterator(); iterator.hasNext();) {
+						Object element = iterator.next();
+						if (element instanceof PluginLaunchModel) {
+							fAdditionalPlugins.remove(element);
+							fTree.remove(element);
+							input.remove(element);
+						}
+					}
+					if (fAdditionalPlugins.size() == 0) {
+						fTree.remove(fAdditionalPluginsParentElement);
+						input.remove(fAdditionalPluginsParentElement);
+						fRemovePluginButton.setEnabled(false);
+					} else {
+						index--;
+						fTree.setSelection(new StructuredSelection(fAdditionalPlugins.get(index > 0 ? index : 0)), true);
+						fRemovePluginButton.setEnabled(true);
+					}
+					updateCounter();
+					fTab.updateLaunchConfigurationDialog();
+				}
+			}
+		});
+	}
+
+	private void createButtonContainer(Composite parent, int vOffset) {
+		Composite buttonComp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_VERTICAL);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = layout.marginWidth = 0;
+		layout.marginTop = vOffset;
+		buttonComp.setLayout(layout);
+		buttonComp.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+
+		fSelectAllButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.AdvancedLauncherTab_selectAll, null);
+		fSelectAllButton.addSelectionListener(fListener);
+		fDeselectAllButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.AdvancedLauncherTab_deselectAll, null);
+		fDeselectAllButton.addSelectionListener(fListener);
+		fSelectFeaturesButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.FeatureBlock_SelectFeatures, null);
+		fSelectFeaturesButton.addSelectionListener(fListener);
+		fAddRequiredFeaturesButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.FeatureBlock_addRequiredFeatues, null);
+		fAddRequiredFeaturesButton.addSelectionListener(fListener);
+		fAddPluginButton = SWTFactory.createPushButton(buttonComp, NLS.bind(PDEUIMessages.FeatureBlock_AddPluginsLabel, fTab.getName().replaceAll("&", "")), null); //$NON-NLS-1$//$NON-NLS-2$
+		fAddPluginButton.addSelectionListener(fListener);
+		fRemovePluginButton = SWTFactory.createPushButton(buttonComp, NLS.bind(PDEUIMessages.FeatureBlock_RemovePluginsLabel, fTab.getName().replaceAll("&", "")), null); //$NON-NLS-1$//$NON-NLS-2$
+		fRemovePluginButton.addSelectionListener(fListener);
+		fRemovePluginButton.setEnabled(false);
+		fDefaultsButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.AdvancedLauncherTab_defaults, null);
+		fDefaultsButton.addSelectionListener(fListener);
+
+		SWTFactory.createLabel(buttonComp, PDEUIMessages.FeatureBlock_defaultPluginResolution, 1);
+		fWorkspacePluginButton = SWTFactory.createRadioButton(buttonComp, PDEUIMessages.FeatureBlock_workspaceBefore);
+		fWorkspacePluginButton.addSelectionListener(fListener);
+		fExternalPluginButton = SWTFactory.createRadioButton(buttonComp, PDEUIMessages.FeatureBlock_externalBefore);
+		fExternalPluginButton.addSelectionListener(fListener);
+
+		Composite countComp = SWTFactory.createComposite(buttonComp, 1, 1, SWT.NONE, 0, 0);
+		countComp.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, true, true));
+
+		fFilterButton = SWTFactory.createCheckButton(countComp, NLS.bind(PDEUIMessages.AdvancedLauncherTab_selectedBundles, ""), null, false, 1); //$NON-NLS-1$
+		fFilterButton.addSelectionListener(fListener);
+
+		fCounter = SWTFactory.createLabel(countComp, "", 1); //$NON-NLS-1$
+
+		Image siteImage = PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_SITE_OBJ);
+		fAdditionalPluginsParentElement = new NamedElement(NLS.bind(PDEUIMessages.FeatureBlock_AdditionalPluginsEntry, fTab.getName().replaceAll("&", "")), siteImage); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void initialize() throws CoreException {
+		initializeFrom(fLaunchConfig);
+	}
+
+	public void initializeFrom(ILaunchConfiguration config) throws CoreException {
+		fLaunchConfig = config;
+		fTree.removeFilter(fSelectedOnlyFilter);
+		setInput(config, fTree);
+
+		// Setup other buttons
+		String pluginResolution = config.getAttribute(IPDELauncherConstants.FEATURE_PLUGIN_RESOLUTION, IPDELauncherConstants.LOCATION_WORKSPACE);
+		if (pluginResolution.equalsIgnoreCase(IPDELauncherConstants.LOCATION_WORKSPACE)) {
+			fWorkspacePluginButton.setSelection(true);
+			fExternalPluginButton.setSelection(false);
+		} else {
+			fWorkspacePluginButton.setSelection(false);
+			fExternalPluginButton.setSelection(true);
+		}
+		String featureLocation = config.getAttribute(IPDELauncherConstants.FEATURE_DEFAULT_LOCATION, IPDELauncherConstants.LOCATION_WORKSPACE);
+		fFeatureWorkspaceButton.setSelection(featureLocation.equalsIgnoreCase(IPDELauncherConstants.LOCATION_WORKSPACE));
+		fAutoValidate.setSelection(config.getAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false));
+
+		// If the workspace plug-in state has changed (project closed, etc.) the launch config needs to be updated without making the tab dirty
+		if (fLaunchConfig.isWorkingCopy()) {
+			savePluginState((ILaunchConfigurationWorkingCopy) fLaunchConfig);
+		}
+
+		PDEPreferencesManager prefs = new PDEPreferencesManager(IPDEUIConstants.PLUGIN_ID);
+		int index = prefs.getInt(IPreferenceConstants.FEATURE_SORT_COLUMN);
+		TreeColumn column = fTree.getTree().getColumn(index == 0 ? COLUMN_FEATURE_NAME : index - 1);
+		fListener.handleColumn(column, prefs.getInt(IPreferenceConstants.FEATURE_SORT_ORDER));
+		fRemovePluginButton.setEnabled(false);
+		fFilterButton.setSelection(config.getAttribute(IPDELauncherConstants.SHOW_SELECTED_ONLY, false));
+		if (fFilterButton.getSelection()) {
+			fTree.addFilter(fSelectedOnlyFilter);
+		}
+		fTree.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
+		fTree.expandAll();
+		fTree.refresh(true);
+		fTab.updateLaunchConfigurationDialog();
+	}
+
+	public void performApply(ILaunchConfigurationWorkingCopy config) {
+		config.setAttribute(IPDELauncherConstants.SHOW_SELECTED_ONLY, fFilterButton.getSelection());
+		config.setAttribute(IPDELauncherConstants.FEATURE_DEFAULT_LOCATION, fFeatureWorkspaceButton.getSelection() ? IPDELauncherConstants.LOCATION_WORKSPACE : IPDELauncherConstants.LOCATION_EXTERNAL);
+		config.setAttribute(IPDELauncherConstants.FEATURE_PLUGIN_RESOLUTION, fWorkspacePluginButton.getSelection() ? IPDELauncherConstants.LOCATION_WORKSPACE : IPDELauncherConstants.LOCATION_EXTERNAL);
+		config.setAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, fAutoValidate.getSelection());
+		savePluginState(config);
+		saveSortOrder();
+		updateCounter();
+	}
+
+	private void savePluginState(ILaunchConfigurationWorkingCopy config) {
+		Set featuresEntry = new HashSet(); // By using a set, debug will sort the attribute for us
+		Set pluginsEntry = new HashSet();
+		ArrayList checkPluginLaunchModels = new ArrayList();
+
+		Object[] models = fTree.getCheckedElements();
+
+		for (int i = 0; i < models.length; i++) {
+			if (models[i] instanceof FeatureLaunchModel) {
+				FeatureLaunchModel featureModel = (FeatureLaunchModel) models[i];
+				StringBuffer buffer = new StringBuffer();
+				buffer.append(featureModel.getId());
+				buffer.append(':');
+				buffer.append(featureModel.getResolutionValue());
+				featuresEntry.add(buffer.toString());
+			} else if (models[i] instanceof PluginLaunchModel) {
+				PluginLaunchModel pluginLaunchModel = (PluginLaunchModel) models[i];
+				String entry = BundleLauncherHelper.writeAdditionalPluginsEntry(pluginLaunchModel.getPluginModelBase(), pluginLaunchModel.getPluginResolution(), true);
+				pluginsEntry.add(entry);
+				checkPluginLaunchModels.add(pluginLaunchModel);
+			}
+		}
+
+		for (Iterator iterator = fAdditionalPlugins.iterator(); iterator.hasNext();) {
+			PluginLaunchModel uncheckedPluginLaunchModel = (PluginLaunchModel) iterator.next();
+			if (checkPluginLaunchModels.contains(uncheckedPluginLaunchModel))
+				continue;
+			String entry = BundleLauncherHelper.writeAdditionalPluginsEntry(uncheckedPluginLaunchModel.getPluginModelBase(), uncheckedPluginLaunchModel.getPluginResolution(), false);
+			pluginsEntry.add(entry);
+		}
+		config.setAttribute(IPDELauncherConstants.SELECTED_FEATURES, featuresEntry);
+		config.setAttribute(IPDELauncherConstants.ADDITIONAL_PLUGINS, pluginsEntry);
+
+	}
+
+	private void saveSortOrder() {
+		PDEPreferencesManager prefs = new PDEPreferencesManager(IPDEUIConstants.PLUGIN_ID);
+		Tree tree = fTree.getTree();
+		TreeColumn column = tree.getSortColumn();
+		int index = column == null ? 0 : ((Integer) tree.getSortColumn().getData(COLUMN_ID)).intValue();
+		prefs.setValue(IPreferenceConstants.FEATURE_SORT_COLUMN, index + 1);
+		int sortOrder = column == null ? 0 : tree.getSortDirection();
+		prefs.setValue(IPreferenceConstants.FEATURE_SORT_ORDER, sortOrder);
+		prefs.savePluginPreferences();
+	}
+
+	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
+		config.setAttribute(IPDELauncherConstants.SHOW_SELECTED_ONLY, false);
+		config.setAttribute(IPDELauncherConstants.FEATURE_DEFAULT_LOCATION, IPDELauncherConstants.LOCATION_WORKSPACE);
+		config.setAttribute(IPDELauncherConstants.FEATURE_PLUGIN_RESOLUTION, IPDELauncherConstants.LOCATION_WORKSPACE);
+		config.setAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false);
+	}
+
+	private void updateCounter() {
+		if (fCounter != null) {
+			int checked = fTree.getCheckedLeafCount();
+			int total = fFeatureModels.values().size() + fAdditionalPlugins.size();
+			fCounter.setText(NLS.bind(PDEUIMessages.AbstractPluginBlock_counter, new Integer(checked), new Integer(total)));
+		}
+	}
+
+	/**
+	 * Sets input to the tree, including location selection and checked features
+	 * 
+	 * @param config configuration to get attributes from
+	 * @param tree tree to set input and checked items on
+	 */
+	protected void setInput(ILaunchConfiguration config, CheckboxTreeViewer tree) {
+		// Maps feature IDs to their models
+		Map featureModels = new HashMap();
+		FeatureModelManager fmm = PDECore.getDefault().getFeatureModelManager();
+		IFeatureModel[] workspaceModels = fmm.getWorkspaceModels();
+		for (int i = 0; i < workspaceModels.length; i++) {
+			String id = workspaceModels[i].getFeature().getId();
+			featureModels.put(id, new FeatureLaunchModel(workspaceModels[i], null));
+		}
+
+		// If there is both a workspace and a target model with the same id, combine them into the same launch model
+		IFeatureModel[] externalModels = fmm.getExternalModels();
+		for (int i = 0; i < externalModels.length; i++) {
+			String id = externalModels[i].getFeature().getId();
+			if (featureModels.containsKey(id)) {
+				FeatureLaunchModel launchModel = (FeatureLaunchModel) featureModels.get(id);
+				launchModel.setTargetModel(externalModels[i]);
+			} else {
+				featureModels.put(id, new FeatureLaunchModel(null, externalModels[i]));
+			}
+		}
+
+		fFeatureModels = featureModels;
+		try {
+			fAdditionalPlugins = new ArrayList();
+			List checkedAdditionalPlugins = new ArrayList();
+			HashMap allAdditionalMap = BundleLauncherHelper.getAdditionalPlugins(config, false);
+			HashMap checkedAdditionalMap = BundleLauncherHelper.getAdditionalPlugins(config, true);
+			for (Iterator iterator = allAdditionalMap.keySet().iterator(); iterator.hasNext();) {
+				IPluginModelBase model = (IPluginModelBase) iterator.next();
+				PluginLaunchModel launchModel = new PluginLaunchModel(model, (String) allAdditionalMap.get(model));
+				fAdditionalPlugins.add(launchModel);
+				if (checkedAdditionalMap.containsKey(model)) {
+					checkedAdditionalPlugins.add(launchModel);
+				}
+			}
+
+			List models = new ArrayList(fFeatureModels.values());
+			if (fAdditionalPlugins.size() > 0) {
+				models.add(fAdditionalPluginsParentElement);
+			}
+			tree.setInput(models);
+
+			// Loop through the saved config to determine location settings and selection
+			Set selected = config.getAttribute(IPDELauncherConstants.SELECTED_FEATURES, (Set) null);
+			if (selected == null) {
+				tree.setCheckedElements(fFeatureModels.values().toArray());
+			} else {
+				ArrayList selectedFeatureList = new ArrayList();
+				for (Iterator iterator = selected.iterator(); iterator.hasNext();) {
+					String currentSelected = (String) iterator.next();
+					String[] attributes = currentSelected.split(":"); //$NON-NLS-1$
+					if (attributes.length > 0) {
+						String id = attributes[0];
+						FeatureLaunchModel model = (FeatureLaunchModel) fFeatureModels.get(id);
+						if (model != null) {
+							selectedFeatureList.add(model);
+							if (attributes.length > 1) {
+								model.setPluginResolution(attributes[1]);
+							}
+						}
+					}
+				}
+				List checkedElements = new ArrayList();
+				checkedElements.addAll(selectedFeatureList);
+				checkedElements.addAll(checkedAdditionalPlugins);
+				tree.setCheckedElements(checkedElements.toArray());
+			}
+		} catch (CoreException e) {
+			PDELaunchingPlugin.log(e);
+		}
+
+		updateCounter();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FilteredCheckboxTree.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FilteredCheckboxTree.java
index 6ce556c..120fa03 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FilteredCheckboxTree.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/FilteredCheckboxTree.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2008, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Ian Bull <irbull at cs.uvic.ca> - bug 207064
  *******************************************************************************/
@@ -223,7 +223,6 @@ class FilteredCheckboxTree extends FilteredTree {
 			while (iterator.hasNext()) {
 				FilteredCheckboxTreeItem item = (FilteredCheckboxTreeItem) iterator.next();
 				Widget testFindItem = getViewer().testFindItem(item.data);
-				testFindItem = null;
 				if (testFindItem == null) {
 					if (item.state.equals(CHECKED) || item.state.equals(CHECKED_GREYED) || item.state.equals(GREYED)) {
 						checkedElements.add(item.data);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/GenericExceptionStatusHandler.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/GenericExceptionStatusHandler.java
new file mode 100644
index 0000000..704dba6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/GenericExceptionStatusHandler.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009 eXXcellent solutions gmbh and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt, eXXcellent solutions gmbh - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+
+public class GenericExceptionStatusHandler implements IStatusHandler {
+
+	public Object handleStatus(IStatus status, Object source) throws CoreException {
+		PDEPlugin.logException(status.getException());
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
index 912665e..5165084 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JREBlock.java
@@ -21,11 +21,12 @@ import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.util.VMUtil;
+import org.eclipse.pde.internal.launching.launcher.VMHelper;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.SWTFactory;
 import org.eclipse.pde.internal.ui.util.SWTUtil;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridData;
@@ -60,7 +61,7 @@ public class JREBlock {
 		}
 
 		public void modifyText(ModifyEvent e) {
-			fTab.updateLaunchConfigurationDialog();
+			fTab.scheduleUpdateJob();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JUnitProgramBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JUnitProgramBlock.java
index 5f6bfbc..ba35643 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JUnitProgramBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/JUnitProgramBlock.java
@@ -1,23 +1,25 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import java.util.TreeSet;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.LauncherUtils;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 
 public class JUnitProgramBlock extends ProgramBlock {
 
@@ -31,7 +33,7 @@ public class JUnitProgramBlock extends ProgramBlock {
 
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
 		if (!LauncherUtils.requiresUI(config))
-			config.setAttribute(IPDELauncherConstants.APPLICATION, IPDEUIConstants.CORE_TEST_APPLICATION);
+			config.setAttribute(IPDELauncherConstants.APPLICATION, IPDEConstants.CORE_TEST_APPLICATION);
 		else
 			super.setDefaults(config);
 	}
@@ -51,7 +53,7 @@ public class JUnitProgramBlock extends ProgramBlock {
 	 */
 	protected void initializeApplicationSection(ILaunchConfiguration config) throws CoreException {
 		String application = config.getAttribute(IPDELauncherConstants.APPLICATION, (String) null);
-		if (IPDEUIConstants.CORE_TEST_APPLICATION.equals(application))
+		if (IPDEConstants.CORE_TEST_APPLICATION.equals(application))
 			fApplicationCombo.setText(PDEUIMessages.JUnitProgramBlock_headless);
 		else
 			super.initializeApplicationSection(config);
@@ -62,7 +64,7 @@ public class JUnitProgramBlock extends ProgramBlock {
 	 */
 	protected void saveApplicationSection(ILaunchConfigurationWorkingCopy config) {
 		if (fApplicationCombo.getText().equals(PDEUIMessages.JUnitProgramBlock_headless)) {
-			String appName = fApplicationCombo.isEnabled() ? IPDEUIConstants.CORE_TEST_APPLICATION : null;
+			String appName = fApplicationCombo.isEnabled() ? IPDEConstants.CORE_TEST_APPLICATION : null;
 			config.setAttribute(IPDELauncherConstants.APPLICATION, appName);
 			config.setAttribute(IPDELauncherConstants.APP_TO_TEST, (String) null);
 		} else {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchAction.java
index 87dbee8..b1ce648 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,8 +28,14 @@ import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.iproduct.*;
 import org.eclipse.pde.internal.core.iproduct.IProduct;
 import org.eclipse.pde.internal.core.util.CoreUtility;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.ui.launcher.*;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.launching.PDESourcePathProvider;
+import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
 import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 
 public class LaunchAction extends Action {
@@ -136,8 +142,14 @@ public class LaunchAction extends Action {
 	}
 
 	private String getVMArguments(String os) {
+		StringBuffer buffer = new StringBuffer(LaunchArgumentsHelper.getInitialVMArguments());
 		IArgumentsInfo info = fProduct.getLauncherArguments();
-		return (info != null) ? CoreUtility.normalize(info.getCompleteVMArguments(os)) : ""; //$NON-NLS-1$
+		String userArgs = (info != null) ? CoreUtility.normalize(info.getCompleteVMArguments(os)) : ""; //$NON-NLS-1$
+		if (userArgs.length() > 0) {
+			buffer.append(" "); //$NON-NLS-1$
+			buffer.append(userArgs);
+		}
+		return buffer.toString();
 	}
 
 	private String getJREContainer(String os) {
@@ -211,15 +223,17 @@ public class LaunchAction extends Action {
 
 	private String getTemplateConfigIni(String os) {
 		IConfigurationFileInfo info = fProduct.getConfigurationFileInfo();
-		String path = info.getPath(os);
-		if (path == null) // if we can't find an os path, let's try the normal one
-			path = info.getPath(null);
-		if (info != null && path != null) {
-			String expandedPath = getExpandedPath(path);
-			if (expandedPath != null) {
-				File file = new File(expandedPath);
-				if (file.exists() && file.isFile())
-					return file.getAbsolutePath();
+		if (info != null) {
+			String path = info.getPath(os);
+			if (path == null) // if we can't find an os path, let's try the normal one
+				path = info.getPath(null);
+			if (info != null && path != null) {
+				String expandedPath = getExpandedPath(path);
+				if (expandedPath != null) {
+					File file = new File(expandedPath);
+					if (file.exists() && file.isFile())
+						return file.getAbsolutePath();
+				}
 			}
 		}
 		return null;
@@ -263,8 +277,8 @@ public class LaunchAction extends Action {
 		wc.setAttribute(IPDELauncherConstants.USEFEATURES, false);
 		wc.setAttribute(IPDELauncherConstants.USE_DEFAULT, false);
 		wc.setAttribute(IPDELauncherConstants.DOCLEAR, false);
-		wc.setAttribute(IPDEUIConstants.DOCLEARLOG, false);
-		wc.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
+		wc.setAttribute(IPDEConstants.DOCLEARLOG, false);
+		wc.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
 		wc.setAttribute(IPDELauncherConstants.ASKCLEAR, true);
 		wc.setAttribute(IPDELauncherConstants.USE_PRODUCT, true);
 		wc.setAttribute(IPDELauncherConstants.AUTOMATIC_ADD, false);
@@ -275,7 +289,7 @@ public class LaunchAction extends Action {
 
 	private String getComputedName(String prefix) {
 		ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
-		return lm.generateUniqueLaunchConfigurationNameFrom(prefix);
+		return lm.generateLaunchConfigurationName(prefix);
 	}
 
 	private ILaunchConfiguration[] getLaunchConfigurations() throws CoreException {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchArgumentsHelper.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchArgumentsHelper.java
deleted file mode 100644
index 5f16f08..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchArgumentsHelper.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.launching.ExecutionArguments;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.build.IPDEBuildConstants;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
-import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.osgi.framework.Bundle;
-
-public class LaunchArgumentsHelper {
-
-	/**
-	 * Returns the location that will be used as the workspace when launching.  Will
-	 * replace variables, so this method should only be called
-	 * when variable substitution (may prompt the user) is appropriate.
-	 * @param configuration the launch configuration to get the workspace value for
-	 * @return workspace location path as a string
-	 * @throws CoreException if there is a problem with the configuration
-	 */
-	public static String getWorkspaceLocation(ILaunchConfiguration configuration) throws CoreException {
-		String location = configuration.getAttribute(IPDELauncherConstants.LOCATION, (String) null);
-		if (location == null) {
-			// backward compatibility
-			location = configuration.getAttribute(IPDELauncherConstants.LOCATION + "0", (String) null); //$NON-NLS-1$
-			if (location != null) {
-				ILaunchConfigurationWorkingCopy wc = null;
-				if (configuration.isWorkingCopy()) {
-					wc = (ILaunchConfigurationWorkingCopy) configuration;
-				} else {
-					wc = configuration.getWorkingCopy();
-				}
-				wc.setAttribute(IPDELauncherConstants.LOCATION + "0", (String) null); //$NON-NLS-1$
-				wc.setAttribute(IPDELauncherConstants.LOCATION, location);
-				wc.doSave();
-			}
-		}
-		return getSubstitutedString(location);
-	}
-
-	public static String[] getUserProgramArgumentArray(ILaunchConfiguration configuration) throws CoreException {
-		String args = getUserProgramArguments(configuration);
-		return new ExecutionArguments("", args).getProgramArgumentsArray(); //$NON-NLS-1$
-	}
-
-	public static String getUserProgramArguments(ILaunchConfiguration configuration) throws CoreException {
-		String args = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String) null);
-		if (args == null) {
-			// backward compatibility
-			args = configuration.getAttribute("progargs", (String) null); //$NON-NLS-1$
-			if (args != null) {
-				ILaunchConfigurationWorkingCopy wc = null;
-				if (configuration.isWorkingCopy()) {
-					wc = (ILaunchConfigurationWorkingCopy) configuration;
-				} else {
-					wc = configuration.getWorkingCopy();
-				}
-				wc.setAttribute("progargs", (String) null); //$NON-NLS-1$
-				wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, args);
-				wc.doSave();
-			}
-		}
-		return args == null ? "" : getSubstitutedString(args); //$NON-NLS-1$
-	}
-
-	public static String getUserVMArguments(ILaunchConfiguration configuration) throws CoreException {
-		String args = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, (String) null);
-		if (args == null) {
-			// backward compatibility
-			args = configuration.getAttribute("vmargs", (String) null); //$NON-NLS-1$
-			if (args != null) {
-				ILaunchConfigurationWorkingCopy wc = null;
-				if (configuration.isWorkingCopy()) {
-					wc = (ILaunchConfigurationWorkingCopy) configuration;
-				} else {
-					wc = configuration.getWorkingCopy();
-				}
-				wc.setAttribute("vmargs", (String) null); //$NON-NLS-1$
-				wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, args);
-				wc.doSave();
-			}
-		}
-		return args == null ? "" : getSubstitutedString(args); //$NON-NLS-1$
-	}
-
-	/**
-	 * Fetches the VM Arguments from the current Target Platform
-	 *  
-	 * @return	VM Arguments from the current Target Platform or empty string if none found
-	 */
-	public static String getInitialVMArguments() {
-
-		try {
-			ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
-			if (service != null) {
-				ITargetHandle target = service.getWorkspaceTargetHandle();
-				if (target != null) {
-					String result = target.getTargetDefinition().getVMArguments();
-					result = result != null ? result : ""; //$NON-NLS-1$
-					return result;
-				}
-			}
-		} catch (CoreException e) {
-		}
-
-		// TODO: Generally, once the new preference target platform preference page is in use,
-		// this code path will not be used. Once we decide to remove support for old targets/preferences
-		// this code can be removed.
-		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
-		StringBuffer result = new StringBuffer(preferences.getString(ICoreConstants.VM_ARGS));
-
-		if (preferences.getBoolean(ICoreConstants.VM_LAUNCHER_INI)) {
-			// hack on the arguments from eclipse.ini
-			result.append(TargetPlatformHelper.getIniVMArgs());
-		}
-		return result.toString();
-	}
-
-	public static String getInitialProgramArguments() {
-		StringBuffer buffer = new StringBuffer("-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"); //$NON-NLS-1$
-
-		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
-		String programArgs = preferences.getString(ICoreConstants.PROGRAM_ARGS);
-		if (programArgs.length() > 0) {
-			buffer.append(" "); //$NON-NLS-1$
-			buffer.append(programArgs);
-		}
-		return buffer.toString();
-	}
-
-	public static File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
-		String working;
-		try {
-			working = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, new File(".").getCanonicalPath()); //$NON-NLS-1$
-		} catch (IOException e) {
-			working = "${workspace_loc}/../"; //$NON-NLS-1$
-		}
-		File dir = new File(getSubstitutedString(working));
-		if (!dir.exists())
-			dir.mkdirs();
-		return dir;
-	}
-
-	public static Map getVMSpecificAttributesMap(ILaunchConfiguration config) throws CoreException {
-		Map map = new HashMap(2);
-		String javaCommand = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, (String) null);
-		map.put(IJavaLaunchConfigurationConstants.ATTR_JAVA_COMMAND, javaCommand);
-		if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
-			ModelEntry entry = PluginRegistry.findEntry("org.eclipse.jdt.debug"); //$NON-NLS-1$
-			if (entry != null) {
-				IPluginModelBase[] models = entry.getExternalModels();
-				for (int i = 0; i < models.length; i++) {
-					File file = new File(models[i].getInstallLocation());
-					if (!file.isFile())
-						file = new File(file, "jdi.jar"); //$NON-NLS-1$
-					if (file.exists()) {
-						map.put(IJavaLaunchConfigurationConstants.ATTR_BOOTPATH_PREPEND, new String[] {file.getAbsolutePath()});
-						break;
-					}
-				}
-			}
-		}
-		return map;
-	}
-
-	public static String getTracingFileArgument(ILaunchConfiguration config, String optionsFileName) throws CoreException {
-		try {
-			TracingOptionsManager mng = PDECore.getDefault().getTracingOptionsManager();
-			Map options = config.getAttribute(IPDELauncherConstants.TRACING_OPTIONS, (Map) null);
-			String selected = config.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null);
-			if (selected == null) {
-				mng.save(optionsFileName, options);
-			} else if (!selected.equals(IPDELauncherConstants.TRACING_NONE)) {
-				HashSet result = new HashSet();
-				StringTokenizer tokenizer = new StringTokenizer(selected, ","); //$NON-NLS-1$
-				while (tokenizer.hasMoreTokens()) {
-					result.add(tokenizer.nextToken());
-				}
-				mng.save(optionsFileName, options, result);
-			}
-		} catch (CoreException e) {
-			return ""; //$NON-NLS-1$
-		}
-		return optionsFileName;
-	}
-
-	public static String[] constructClasspath(ILaunchConfiguration configuration) throws CoreException {
-		double targetVersion = TargetPlatformHelper.getTargetVersion();
-		String jarPath = targetVersion >= 3.3 ? getEquinoxStartupPath(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER) : getStartupJarPath();
-		if (jarPath == null && targetVersion < 3.3)
-			jarPath = getEquinoxStartupPath("org.eclipse.core.launcher"); //$NON-NLS-1$
-
-		if (jarPath == null)
-			return null;
-
-		ArrayList entries = new ArrayList();
-		entries.add(jarPath);
-
-		String bootstrap = configuration.getAttribute(IPDELauncherConstants.BOOTSTRAP_ENTRIES, ""); //$NON-NLS-1$
-		StringTokenizer tok = new StringTokenizer(getSubstitutedString(bootstrap), ","); //$NON-NLS-1$
-		while (tok.hasMoreTokens())
-			entries.add(tok.nextToken().trim());
-		return (String[]) entries.toArray(new String[entries.size()]);
-	}
-
-	private static String getEquinoxStartupPath(String packageName) throws CoreException {
-		IPluginModelBase model = PluginRegistry.findModel(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER);
-		if (model != null) {
-			IResource resource = model.getUnderlyingResource();
-			// found in the target
-			if (resource == null)
-				return model.getInstallLocation();
-
-			// find it in the workspace
-			IProject project = resource.getProject();
-			if (project.hasNature(JavaCore.NATURE_ID)) {
-				IJavaProject jProject = JavaCore.create(project);
-				IClasspathEntry[] entries = jProject.getRawClasspath();
-				for (int i = 0; i < entries.length; i++) {
-					int kind = entries[i].getEntryKind();
-					if (kind == IClasspathEntry.CPE_SOURCE || kind == IClasspathEntry.CPE_LIBRARY) {
-						IPackageFragmentRoot[] roots = jProject.findPackageFragmentRoots(entries[i]);
-						for (int j = 0; j < roots.length; j++) {
-							if (roots[j].getPackageFragment(packageName).exists()) {
-								// if source folder, find the output folder
-								if (kind == IClasspathEntry.CPE_SOURCE) {
-									IPath path = entries[i].getOutputLocation();
-									if (path == null)
-										path = jProject.getOutputLocation();
-									path = path.removeFirstSegments(1);
-									return project.getLocation().append(path).toOSString();
-								}
-								// else if is a library jar, then get the location of the jar itself
-								IResource jar = roots[j].getResource();
-								if (jar != null) {
-									return jar.getLocation().toOSString();
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-		Bundle bundle = Platform.getBundle(IPDEBuildConstants.BUNDLE_EQUINOX_LAUNCHER);
-		if (bundle != null) {
-			try {
-				URL url = FileLocator.resolve(bundle.getEntry("/")); //$NON-NLS-1$
-				url = FileLocator.toFileURL(url);
-				String path = url.getFile();
-				if (path.startsWith("file:")) //$NON-NLS-1$
-					path = path.substring(5);
-				path = new File(path).getAbsolutePath();
-				if (path.endsWith("!")) //$NON-NLS-1$
-					path = path.substring(0, path.length() - 1);
-				return path;
-			} catch (IOException e) {
-			}
-		}
-		return null;
-	}
-
-	private static String getStartupJarPath() throws CoreException {
-		IPluginModelBase model = PluginRegistry.findModel("org.eclipse.platform"); //$NON-NLS-1$
-		if (model != null && model.getUnderlyingResource() != null) {
-			IProject project = model.getUnderlyingResource().getProject();
-			if (project.hasNature(JavaCore.NATURE_ID)) {
-				IJavaProject jProject = JavaCore.create(project);
-				IPackageFragmentRoot[] roots = jProject.getPackageFragmentRoots();
-				for (int i = 0; i < roots.length; i++) {
-					if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE && roots[i].getPackageFragment("org.eclipse.core.launcher").exists()) { //$NON-NLS-1$
-						IPath path = jProject.getOutputLocation().removeFirstSegments(1);
-						return project.getLocation().append(path).toOSString();
-					}
-				}
-			}
-			if (project.getFile("startup.jar").exists()) //$NON-NLS-1$
-				return project.getFile("startup.jar").getLocation().toOSString(); //$NON-NLS-1$
-		}
-		File startupJar = new Path(TargetPlatform.getLocation()).append("startup.jar").toFile(); //$NON-NLS-1$
-
-		// if something goes wrong with the preferences, fall back on the startup.jar 
-		// in the running eclipse.  
-		if (!startupJar.exists())
-			startupJar = new Path(TargetPlatform.getDefaultLocation()).append("startup.jar").toFile(); //$NON-NLS-1$
-
-		return startupJar.exists() ? startupJar.getAbsolutePath() : null;
-	}
-
-	private static String getSubstitutedString(String text) throws CoreException {
-		if (text == null)
-			return ""; //$NON-NLS-1$
-		IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
-		return mgr.performStringSubstitution(text);
-	}
-
-	public static String getDefaultWorkspaceLocation(String uniqueName) {
-		return "${workspace_loc}/../runtime-" + uniqueName.replaceAll("\\s", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-	}
-
-	public static String getDefaultJUnitWorkspaceLocation() {
-		return "${workspace_loc}/../junit-workspace"; //$NON-NLS-1$
-	}
-
-	public static String getDefaultJUnitConfigurationLocation() {
-		return "${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"; //$NON-NLS-1$
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationHelper.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationHelper.java
deleted file mode 100644
index a03007b..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationHelper.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.TargetPlatform;
-import org.eclipse.pde.internal.build.IPDEBuildConstants;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-
-/**
- * Contains helper methods for launching an Eclipse Runtime Workbench
- */
-public class LaunchConfigurationHelper {
-
-	private static final String PROP_OSGI_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
-	private static final String PROP_OSGI_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
-	private static final String PROP_P2_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
-
-	public static void synchronizeManifests(ILaunchConfiguration config, File configDir) {
-		try {
-			String programArgs = config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
-			if (programArgs.indexOf("-clean") != -1) //$NON-NLS-1$
-				return;
-		} catch (CoreException e) {
-		}
-		File dir = new File(configDir, "org.eclipse.osgi/manifests"); //$NON-NLS-1$
-		if (dir.exists() && dir.isDirectory()) {
-			PDECore.getDefault().getJavaElementChangeListener().synchronizeManifests(dir);
-		}
-	}
-
-	public static File getConfigurationArea(ILaunchConfiguration config) {
-		File dir = getConfigurationLocation(config);
-		if (!dir.exists())
-			dir.mkdirs();
-		return dir;
-	}
-
-	public static File getConfigurationLocation(ILaunchConfiguration config) {
-		//bug 170213 change config location if config name contains #
-		String configName = config.getName();
-		configName = configName.replace('#', 'h');
-		File dir = new File(PDECore.getDefault().getStateLocation().toOSString(), configName);
-		try {
-			if (!config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
-				String userPath = config.getAttribute(IPDELauncherConstants.CONFIG_LOCATION, (String) null);
-				if (userPath != null) {
-					userPath = getSubstitutedString(userPath);
-					dir = new File(userPath).getAbsoluteFile();
-				}
-			}
-		} catch (CoreException e) {
-		}
-		return dir;
-	}
-
-	private static String getSubstitutedString(String text) throws CoreException {
-		if (text == null)
-			return ""; //$NON-NLS-1$
-		IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
-		return mgr.performStringSubstitution(text);
-	}
-
-	public static Properties createConfigIniFile(ILaunchConfiguration configuration, String productID, Map bundles, Map bundlesWithStartLevels, File directory) throws CoreException {
-		Properties properties = null;
-		// if we are to generate a config.ini, start with the values in the target platform's config.ini - bug 141918
-		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
-			properties = TargetPlatformHelper.getConfigIniProperties();
-			// if target's config.ini does not exist, lets try to fill in default values
-			if (properties == null)
-				properties = new Properties();
-			// keep properties only if we are launching the default product (bug 175437)
-			else if (productID == null || !productID.equals(properties.get("eclipse.product"))) //$NON-NLS-1$
-				properties.clear();
-			// if target's config.ini has the osgi.bundles header, then parse and compute the proper osgi.bundles value
-			String bundleList = properties.getProperty(PROP_OSGI_BUNDLES);
-			if (bundleList != null)
-				properties.setProperty(PROP_OSGI_BUNDLES, computeOSGiBundles(TargetPlatformHelper.stripPathInformation(bundleList), bundles, bundlesWithStartLevels));
-			String dataArea = properties.getProperty(PROP_P2_DATA_AREA);
-			if (dataArea != null) {
-				// Make the p2 data area in the configuration area itself, rather than a sibling of the configuration
-				// area (which is a the root pde.core shared metadata area) @see bug 272810
-				properties.setProperty(PROP_P2_DATA_AREA, "@config.dir/.p2"); //$NON-NLS-1$
-			}
-		} else {
-			String templateLoc = configuration.getAttribute(IPDELauncherConstants.CONFIG_TEMPLATE_LOCATION, (String) null);
-			if (templateLoc != null) {
-				properties = loadFromTemplate(getSubstitutedString(templateLoc));
-				// if template contains osgi.bundles, then only strip the path, do not compute the value
-				String osgiBundles = properties.getProperty(PROP_OSGI_BUNDLES);
-				if (osgiBundles != null)
-					properties.setProperty(PROP_OSGI_BUNDLES, TargetPlatformHelper.stripPathInformation(osgiBundles));
-			}
-		}
-		// whether we create a new config.ini or read from one as a template, we should add the required properties - bug 161265
-		if (properties != null) {
-			addRequiredProperties(properties, productID, bundles, bundlesWithStartLevels);
-		} else {
-			properties = new Properties();
-		}
-		if (!directory.exists()) {
-			directory.mkdirs();
-		}
-		String osgiBundles = properties.getProperty(PROP_OSGI_BUNDLES);
-		int start = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
-		properties.put("osgi.bundles.defaultStartLevel", Integer.toString(start)); //$NON-NLS-1$
-		boolean autostart = configuration.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, false);
-
-		// if we are launching using P2, write out P2 files (bundles.txt) and add P2 property to config.ini
-		if (osgiBundles != null && osgiBundles.indexOf(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR) != -1 && bundles.containsKey(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
-			URL bundlesTxt = null;
-			boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
-			boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
-			if (usedefault || useFeatures) {
-				bundlesTxt = P2Utils.writeBundlesTxt(bundlesWithStartLevels, 4, false, directory, osgiBundles);
-			} else {
-				bundlesTxt = P2Utils.writeBundlesTxt(bundlesWithStartLevels, start, autostart, directory, null);
-			}
-
-			if (bundlesTxt != null) {
-				properties.setProperty("org.eclipse.equinox.simpleconfigurator.configUrl", bundlesTxt.toString()); //$NON-NLS-1$
-				// if we have simple configurator and update configurator together, ensure update doesn't reconcile
-				if (bundles.get(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR) != null) {
-					properties.setProperty("org.eclipse.update.reconcile", "false"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			}
-		}
-
-		setBundleLocations(bundles, properties, autostart);
-
-		save(new File(directory, "config.ini"), properties); //$NON-NLS-1$
-		return properties;
-	}
-
-	private static void addRequiredProperties(Properties properties, String productID, Map bundles, Map bundlesWithStartLevels) {
-		if (!properties.containsKey("osgi.install.area")) //$NON-NLS-1$
-			properties.setProperty("osgi.install.area", "file:" + TargetPlatform.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!properties.containsKey("osgi.configuration.cascaded")) //$NON-NLS-1$
-			properties.setProperty("osgi.configuration.cascaded", "false"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (!properties.containsKey(PROP_OSGI_FRAMEWORK))
-			properties.setProperty(PROP_OSGI_FRAMEWORK, IPDEBuildConstants.BUNDLE_OSGI);
-		if (!properties.containsKey("osgi.splashPath") && productID != null) //$NON-NLS-1$
-			addSplashLocation(properties, productID, bundles);
-		// if osgi.splashPath is set, try to resolve relative paths to absolute paths
-		if (properties.containsKey("osgi.splashPath")) //$NON-NLS-1$
-			resolveLocationPath(properties.getProperty("osgi.splashPath"), properties, bundles); //$NON-NLS-1$
-		if (!properties.containsKey(PROP_OSGI_BUNDLES))
-			properties.setProperty(PROP_OSGI_BUNDLES, computeOSGiBundles(TargetPlatform.getBundleList(), bundles, bundlesWithStartLevels));
-		if (!properties.containsKey("osgi.bundles.defaultStartLevel")) //$NON-NLS-1$
-			properties.setProperty("osgi.bundles.defaultStartLevel", "4"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	/**
-	 * Computes a list of osgi bundles to be put into the osgi.bundles property based
-	 * on the bundles from the target platform config.ini and a map of bundles we are
-	 * launching with.  The list of bundles must have already had it's path information
-	 * removed.
-	 * @param bundleList list of bundles without path information
-	 * @param bundles map of bundle id to bundle model, contains all bundles being launched with
-	 * @param bundlesWithStartLevels map of bundles of start level
-	 * @return string list of osgi bundles
-	 */
-	private static String computeOSGiBundles(String bundleList, Map bundles, Map bundlesWithStartLevels) {
-
-		// if p2 and only simple configurator and 
-		// if simple configurator isn't selected & isn't in bundle list... hack it
-
-		// if using p2's simple configurator, a bundles.txt will be written, so we only need simple configurator in the config.ini
-		if (bundles.get(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR) != null)
-			return "org.eclipse.equinox.simpleconfigurator at 1:start"; //$NON-NLS-1$
-
-		StringBuffer buffer = new StringBuffer();
-		Set initialBundleSet = new HashSet();
-		StringTokenizer tokenizer = new StringTokenizer(bundleList, ","); //$NON-NLS-1$
-		while (tokenizer.hasMoreTokens()) {
-			String token = tokenizer.nextToken();
-			int index = token.indexOf('@');
-			String id = index != -1 ? token.substring(0, index) : token;
-			if (bundles.containsKey(id)) {
-				if (buffer.length() > 0)
-					buffer.append(',');
-				buffer.append(id);
-				if (index != -1 && index < token.length() - 1)
-					buffer.append(token.substring(index));
-				initialBundleSet.add(id);
-			}
-		}
-
-		// if org.eclipse.update.configurator is not included (LIKE IN BASIC RCP APPLICATION), then write out all bundles in osgi.bundles - bug 170772
-		if (!initialBundleSet.contains(IPDEBuildConstants.BUNDLE_UPDATE_CONFIGURATOR)) {
-			initialBundleSet.add(IPDEBuildConstants.BUNDLE_OSGI);
-			Iterator iter = bundlesWithStartLevels.keySet().iterator();
-			while (iter.hasNext()) {
-				IPluginModelBase model = (IPluginModelBase) iter.next();
-				String id = model.getPluginBase().getId();
-				if (!initialBundleSet.contains(id)) {
-					if (buffer.length() > 0)
-						buffer.append(',');
-
-					String slinfo = (String) bundlesWithStartLevels.get(model);
-					buffer.append(id);
-					buffer.append('@');
-					buffer.append(slinfo);
-				}
-			}
-		}
-		return buffer.toString();
-	}
-
-	private static Properties loadFromTemplate(String templateLoc) throws CoreException {
-		Properties properties = new Properties();
-		File templateFile = new File(templateLoc);
-		if (templateFile.exists() && templateFile.isFile()) {
-			FileInputStream stream = null;
-			try {
-				stream = new FileInputStream(templateFile);
-				properties.load(stream);
-			} catch (Exception e) {
-				String message = e.getMessage();
-				if (message != null)
-					throw new CoreException(new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, message, e));
-			} finally {
-				if (stream != null) {
-					try {
-						stream.close();
-					} catch (IOException e) {
-					}
-				}
-			}
-		}
-		return properties;
-	}
-
-	private static void addSplashLocation(Properties properties, String productID, Map map) {
-		Properties targetConfig = TargetPlatformHelper.getConfigIniProperties();
-		String targetProduct = targetConfig == null ? null : targetConfig.getProperty("eclipse.product"); //$NON-NLS-1$
-		String targetSplash = targetConfig == null ? null : targetConfig.getProperty("osgi.splashPath"); //$NON-NLS-1$
-		if (!productID.equals(targetProduct) || targetSplash == null) {
-			ArrayList locations = new ArrayList();
-			String plugin = getContributingPlugin(productID);
-			locations.add(plugin);
-			IPluginModelBase model = (IPluginModelBase) map.get(plugin);
-			if (model != null) {
-				BundleDescription desc = model.getBundleDescription();
-				if (desc != null) {
-					BundleDescription[] fragments = desc.getFragments();
-					for (int i = 0; i < fragments.length; i++)
-						locations.add(fragments[i].getSymbolicName());
-				}
-			}
-			resolveLocationPath(locations, properties, map);
-		} else
-			resolveLocationPath(targetSplash, properties, map);
-	}
-
-	private static void resolveLocationPath(String splashPath, Properties properties, Map map) {
-		ArrayList locations = new ArrayList();
-		StringTokenizer tok = new StringTokenizer(splashPath, ","); //$NON-NLS-1$
-		while (tok.hasMoreTokens())
-			locations.add(tok.nextToken());
-		resolveLocationPath(locations, properties, map);
-	}
-
-	private static void resolveLocationPath(ArrayList locations, Properties properties, Map map) {
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0; i < locations.size(); i++) {
-			String location = (String) locations.get(i);
-			if (location.startsWith("platform:/base/plugins/")) { //$NON-NLS-1$
-				location = location.replaceFirst("platform:/base/plugins/", ""); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-			String url = getBundleURL(location, map, false);
-			if (url == null)
-				continue;
-			if (buffer.length() > 0)
-				buffer.append(","); //$NON-NLS-1$
-			buffer.append(url);
-		}
-		if (buffer.length() > 0)
-			properties.setProperty("osgi.splashPath", buffer.toString()); //$NON-NLS-1$
-	}
-
-	/**
-	 * Returns a string url representing the install location of the bundle model with the
-	 * specified id.  The model is obtained using the provided map.
-	 * @param id the id of the bundle
-	 * @param pluginMap mapping of bundle ids to bundle models
-	 * @param includeReference whether to prefix the url with 'reference:'
-	 * @return string url for the bundle location
-	 */
-	public static String getBundleURL(String id, Map pluginMap, boolean includeReference) {
-		IPluginModelBase model = (IPluginModelBase) pluginMap.get(id.trim());
-		return getBundleURL(model, includeReference);
-	}
-
-	/**
-	 * Returns a string url representing the install location of the given bundle model
-	 * @param model the model to create the url for
-	 * @param includeReference whether to prefix the url with 'reference:'
-	 * @return string url for bundle location
-	 */
-	public static String getBundleURL(IPluginModelBase model, boolean includeReference) {
-		if (model == null || model.getInstallLocation() == null)
-			return null;
-		StringBuffer buf = new StringBuffer();
-		if (includeReference) {
-			buf.append(TargetPlatformHelper.REFERENCE_PREFIX);
-		}
-		buf.append(TargetPlatformHelper.FILE_URL_PREFIX);
-		buf.append(new Path(model.getInstallLocation()).removeTrailingSeparator().toString());
-		return buf.toString();
-	}
-
-	/**
-	 * Use the map of bundles we are launching with to update the osgi.framework
-	 * and osgi.bundles properties with the correct info.
-	 * @param map map of bundles being launched (id mapped to model)
-	 * @param properties properties for config.ini
-	 */
-	private static void setBundleLocations(Map map, Properties properties, boolean defaultAuto) {
-		String framework = properties.getProperty(PROP_OSGI_FRAMEWORK);
-		if (framework != null) {
-			framework = TargetPlatformHelper.stripPathInformation(framework);
-			String url = getBundleURL(framework, map, false);
-			if (url != null)
-				properties.setProperty(PROP_OSGI_FRAMEWORK, url);
-		}
-
-		String bundles = properties.getProperty(PROP_OSGI_BUNDLES);
-		if (bundles != null) {
-			StringBuffer buffer = new StringBuffer();
-			StringTokenizer tokenizer = new StringTokenizer(bundles, ","); //$NON-NLS-1$
-			while (tokenizer.hasMoreTokens()) {
-				String token = tokenizer.nextToken().trim();
-				String url = getBundleURL(token, map, false);
-				int i = -1;
-				if (url == null) {
-					i = token.indexOf('@');
-					if (i != -1) {
-						url = getBundleURL(token.substring(0, i), map, false);
-					}
-					if (url == null) {
-						i = token.indexOf(':');
-						if (i != -1)
-							url = getBundleURL(token.substring(0, i), map, false);
-					}
-				}
-				if (url != null) {
-					if (buffer.length() > 0) {
-						buffer.append(","); //$NON-NLS-1$
-					}
-					buffer.append("reference:" + url); //$NON-NLS-1$
-					if (i != -1) {
-						String slinfo = token.substring(i + 1);
-						buffer.append(getStartData(slinfo, defaultAuto));
-					}
-				}
-			}
-			properties.setProperty(PROP_OSGI_BUNDLES, buffer.toString());
-		}
-	}
-
-	/**
-	 * Convenience method to parses the startData ("startLevel:autoStart"), convert it to the
-	 * format expected by the OSGi bundles property, and append to a StringBuffer.
-	 * @param startData data to parse ("startLevel:autoStart")
-	 * @param defaultAuto default auto start setting
-	 */
-	public static String getStartData(String startData, boolean defaultAuto) {
-		StringBuffer buffer = new StringBuffer();
-		int index = startData.indexOf(':');
-		String level = index > 0 ? startData.substring(0, index) : "default"; //$NON-NLS-1$
-		String auto = startData;
-		if (!startData.equals("start")) //$NON-NLS-1$
-			auto = index >= 0 && index < startData.length() - 1 ? startData.substring(index + 1) : "default"; //$NON-NLS-1$
-		if ("default".equals(auto)) //$NON-NLS-1$
-			auto = Boolean.toString(defaultAuto);
-		if (!level.equals("default") || "true".equals(auto) || "start".equals(auto)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			buffer.append("@"); //$NON-NLS-1$
-
-		if (!level.equals("default")) { //$NON-NLS-1$
-			buffer.append(level);
-			if ("start".equals(auto) || "true".equals(auto)) //$NON-NLS-1$ //$NON-NLS-2$
-				buffer.append(":"); //$NON-NLS-1$
-		}
-		if ("start".equals(auto) || "true".equals(auto)) { //$NON-NLS-1$ //$NON-NLS-2$
-			buffer.append("start"); //$NON-NLS-1$
-		}
-		return buffer.toString();
-	}
-
-	public static void save(File file, Properties properties) {
-		try {
-			FileOutputStream stream = new FileOutputStream(file);
-			properties.store(stream, "Configuration File"); //$NON-NLS-1$
-			stream.flush();
-			stream.close();
-		} catch (IOException e) {
-			PDECore.logException(e);
-		}
-	}
-
-	public static String getContributingPlugin(String productID) {
-		if (productID == null)
-			return null;
-		int index = productID.lastIndexOf('.');
-		return index == -1 ? productID : productID.substring(0, index);
-	}
-
-	public static String getProductID(ILaunchConfiguration configuration) throws CoreException {
-		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
-			return configuration.getAttribute(IPDELauncherConstants.PRODUCT, (String) null);
-		}
-
-		// find the product associated with the application, and return its
-		// contributing plug-in
-		String appID = configuration.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication());
-		IExtension[] extensions = PDECore.getDefault().getExtensionsRegistry().findExtensions("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
-		for (int i = 0; i < extensions.length; i++) {
-			String id = extensions[i].getUniqueIdentifier();
-			if (id == null)
-				continue;
-			IConfigurationElement[] children = extensions[i].getConfigurationElements();
-			if (children.length != 1)
-				continue;
-			if (!"product".equals(children[0].getName())) //$NON-NLS-1$
-				continue;
-			if (appID.equals(children[0].getAttribute("application"))) //$NON-NLS-1$
-				return id;
-		}
-		return null;
-
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationListener.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationListener.java
deleted file mode 100644
index 3de0e4e..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchConfigurationListener.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.File;
-import org.eclipse.debug.core.*;
-import org.eclipse.pde.internal.core.util.CoreUtility;
-
-public class LaunchConfigurationListener implements ILaunchConfigurationListener {
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public void launchConfigurationAdded(ILaunchConfiguration configuration) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public void launchConfigurationChanged(ILaunchConfiguration configuration) {
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
-		File configDir = LaunchConfigurationHelper.getConfigurationLocation(configuration);
-		if (configDir.exists()) {
-			// rename the config area if it was auto-set by PDE when the launch configuration is renamed
-			ILaunchConfiguration destination = DebugPlugin.getDefault().getLaunchManager().getMovedTo(configuration);
-			boolean delete = true;
-			if (destination != null) {
-				delete = !configDir.renameTo(LaunchConfigurationHelper.getConfigurationLocation(destination));
-			}
-			if (delete)
-				CoreUtility.deleteContent(configDir);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchListener.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchListener.java
deleted file mode 100644
index 3355ca4..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchListener.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.File;
-import java.util.ArrayList;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.*;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.views.log.LogView;
-
-public class LaunchListener implements ILaunchListener, IDebugEventSetListener {
-	private ArrayList managedLaunches;
-	// maximum log file size
-	public static final long MAX_FILE_LENGTH = 1024 * 1024;
-	// different ways to open the error log
-	public static final int OPEN_IN_ERROR_LOG_VIEW = 0;
-	public static final int OPEN_IN_SYSTEM_EDITOR = 1;
-
-	public LaunchListener() {
-		managedLaunches = new ArrayList();
-	}
-
-	public void manage(ILaunch launch) {
-		if (managedLaunches.size() == 0)
-			hookListener(true);
-		if (!managedLaunches.contains(launch))
-			managedLaunches.add(launch);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesRemoved(org.eclipse.debug.core.ILaunch)
-	 */
-	public void launchRemoved(ILaunch launch) {
-		update(launch, true);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesAdded(org.eclipse.debug.core.ILaunch)
-	 */
-	public void launchAdded(ILaunch launch) {
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.ILaunchesListener#launchesChanged(org.eclipse.debug.core.ILaunch)
-	 */
-	public void launchChanged(ILaunch launch) {
-	}
-
-	private void update(ILaunch launch, boolean remove) {
-		if (managedLaunches.contains(launch)) {
-			if (remove || launch.isTerminated()) {
-				managedLaunches.remove(launch);
-				if (managedLaunches.size() == 0) {
-					hookListener(false);
-				}
-			}
-		}
-	}
-
-	private void hookListener(boolean add) {
-		DebugPlugin debugPlugin = DebugPlugin.getDefault();
-		ILaunchManager launchManager = debugPlugin.getLaunchManager();
-		if (add) {
-			launchManager.addLaunchListener(this);
-			debugPlugin.addDebugEventListener(this);
-		} else {
-			launchManager.removeLaunchListener(this);
-			debugPlugin.removeDebugEventListener(this);
-		}
-	}
-
-	private void doRestart(ILaunch launch) {
-		ILaunchConfiguration config = launch.getLaunchConfiguration();
-		try {
-			ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();
-			copy.setAttribute(IPDEUIConstants.RESTART, true);
-			copy.launch(launch.getLaunchMode(), new NullProgressMonitor());
-		} catch (CoreException e) {
-			PDEPlugin.logException(e);
-		}
-	}
-
-	public void shutdown() {
-		hookListener(false);
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent)
-	 */
-	public void handleDebugEvents(DebugEvent[] events) {
-		for (int i = 0; i < events.length; i++) {
-			DebugEvent event = events[i];
-			Object source = event.getSource();
-			if (source instanceof IProcess && event.getKind() == DebugEvent.TERMINATE) {
-				IProcess process = (IProcess) source;
-				ILaunch launch = process.getLaunch();
-				if (launch != null) {
-					try {
-						launchTerminated(launch, process.getExitValue());
-					} catch (DebugException e) {
-					}
-				}
-			}
-		}
-	}
-
-	private void launchTerminated(final ILaunch launch, int returnValue) {
-		if (managedLaunches.contains(launch)) {
-			update(launch, true);
-			if (returnValue == 23) {
-				doRestart(launch);
-				return;
-			}
-			// launch failed because the associated workspace is in use
-			if (returnValue == 15) {
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						MessageDialog.openError(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.Launcher_error_title, PDEUIMessages.Launcher_error_code15);
-					}
-				});
-				return;
-			}
-			// launch failed for reasons printed to the log.
-			if (returnValue == 13) {
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						try {
-							File log = getMostRecentLogFile(launch.getLaunchConfiguration());
-							if (log != null && log.exists()) {
-								MessageDialog dialog = new MessageDialog(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.Launcher_error_title, null, // accept the default window icon
-										PDEUIMessages.Launcher_error_code13, MessageDialog.ERROR, new String[] {PDEUIMessages.Launcher_error_displayInLogView, PDEUIMessages.Launcher_error_displayInSystemEditor, IDialogConstants.NO_LABEL}, OPEN_IN_ERROR_LOG_VIEW);
-								int dialog_value = dialog.open();
-								if (dialog_value == OPEN_IN_ERROR_LOG_VIEW) {
-									LogView errlog = (LogView) PDEPlugin.getActivePage().showView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
-									errlog.handleImportPath(log.getAbsolutePath());
-									errlog.sortByDateDescending();
-								} else if (dialog_value == OPEN_IN_SYSTEM_EDITOR) {
-									openInEditor(log);
-								}
-							}
-						} catch (CoreException e) {
-						}
-					}
-				});
-			}
-		}
-	}
-
-	private void openInEditor(File log) {
-		IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(log.getAbsolutePath()));
-		if (!fileStore.fetchInfo().isDirectory() && fileStore.fetchInfo().exists()) {
-			IWorkbenchWindow ww = PDEPlugin.getActiveWorkbenchWindow();
-			IWorkbenchPage page = ww.getActivePage();
-			try {
-				IDE.openEditorOnFileStore(page, fileStore);
-			} catch (PartInitException e) {
-			}
-		}
-	}
-
-	/**
-	 * Returns latest log file for Launch Configuration.
-	 * It's ".metadala/.log", file with most recent timestamp ending with ".log"
-	 * in configuration location or null if none found.
-	 *
-	 * @returns log file or null
-	 * @throws CoreException
-	 * @since 3.4
-	 */
-	static File getMostRecentLogFile(ILaunchConfiguration configuration) throws CoreException {
-		File latest = null;
-		String workspace = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
-		if (workspace.length() > 0) {
-			latest = new File(workspace, ".metadata/.log"); //$NON-NLS-1$
-			if (!latest.exists())
-				latest = null;
-		}
-		File configDir = LaunchConfigurationHelper.getConfigurationLocation(configuration);
-		File[] children = configDir.listFiles();
-		if (children != null) {
-			for (int i = 0; i < children.length; i++) {
-				if (!children[i].isDirectory() && children[i].getName().endsWith(".log")) { //$NON-NLS-1$
-					if (latest == null || latest.lastModified() < children[i].lastModified())
-						latest = children[i];
-				}
-			}
-		}
-		return latest;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchPluginValidator.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchPluginValidator.java
deleted file mode 100644
index 0595e01..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchPluginValidator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.SearchablePluginsManager;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.eclipse.swt.widgets.Display;
-
-public class LaunchPluginValidator {
-
-	private static IPluginModelBase[] getSelectedWorkspacePlugins(ILaunchConfiguration configuration) throws CoreException {
-
-		boolean usedefault = configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
-		boolean useFeatures = configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false);
-
-		IPluginModelBase[] models = PluginRegistry.getWorkspaceModels();
-
-		if (usedefault || useFeatures || models.length == 0)
-			return models;
-
-		Collection result = null;
-		Map bundles = BundleLauncherHelper.getWorkspaceBundleMap(configuration, null, IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS);
-		result = bundles.keySet();
-		return (IPluginModelBase[]) result.toArray(new IPluginModelBase[result.size()]);
-	}
-
-	/**
-	 * 
-	 * @param configuration launchConfiguration to get the attribute value
-	 * @param attribute launch configuration attribute to containing plug-in information
-	 * @return a TreeSet containing IPluginModelBase objects which are represented by the value of the attribute
-	 * @throws CoreException
-	 */
-	public static Set parsePlugins(ILaunchConfiguration configuration, String attribute) throws CoreException {
-		HashSet set = new HashSet();
-		String ids = configuration.getAttribute(attribute, (String) null);
-		if (ids != null) {
-			String[] entries = ids.split(","); //$NON-NLS-1$
-			Map unmatchedEntries = new HashMap();
-			for (int i = 0; i < entries.length; i++) {
-				int index = entries[i].indexOf('@');
-				if (index < 0) { // if no start levels, assume default
-					entries[i] = entries[i].concat("@default:default"); //$NON-NLS-1$
-					index = entries[i].indexOf('@');
-				}
-				String idVersion = entries[i].substring(0, index);
-				int versionIndex = entries[i].indexOf(BundleLauncherHelper.VERSION_SEPARATOR);
-				String id = (versionIndex > 0) ? idVersion.substring(0, versionIndex) : idVersion;
-				String version = (versionIndex > 0) ? idVersion.substring(versionIndex + 1) : null;
-				ModelEntry entry = PluginRegistry.findEntry(id);
-				if (entry != null) {
-					IPluginModelBase matchingModels[] = attribute.equals(IPDELauncherConstants.SELECTED_TARGET_PLUGINS) ? entry.getExternalModels() : entry.getWorkspaceModels();
-					for (int j = 0; j < matchingModels.length; j++) {
-						if (matchingModels[j].isEnabled()) {
-							// TODO Very similar logic to BundleLauncherHelper
-							// the logic here is this (see bug 225644)
-							// a) if we come across a bundle that has the right version, immediately add it
-							// b) if there's no version, add it
-							// c) if there's only one instance of that bundle in the list of ids... add it
-							if (version == null || matchingModels[j].getPluginBase().getVersion().equals(version)) {
-								set.add(matchingModels[j]);
-							} else if (matchingModels.length == 1) {
-								if (unmatchedEntries.remove(id) == null) {
-									unmatchedEntries.put(id, matchingModels[j]);
-								}
-							}
-						}
-					}
-				}
-			}
-			set.addAll(unmatchedEntries.values());
-		}
-		return set;
-	}
-
-	public static IProject[] getAffectedProjects(ILaunchConfiguration config) throws CoreException {
-		// if restarting, no need to check projects for errors
-		if (config.getAttribute(IPDEUIConstants.RESTART, false))
-			return new IProject[0];
-		ArrayList projects = new ArrayList();
-		IPluginModelBase[] models = getSelectedWorkspacePlugins(config);
-		for (int i = 0; i < models.length; i++) {
-			IProject project = models[i].getUnderlyingResource().getProject();
-			if (project.hasNature(JavaCore.NATURE_ID))
-				projects.add(project);
-		}
-
-		// add fake "Java Search" project
-		SearchablePluginsManager manager = PDECore.getDefault().getSearchablePluginsManager();
-		IJavaProject proxy = manager.getProxyProject();
-		if (proxy != null) {
-			projects.add(proxy.getProject());
-		}
-		return (IProject[]) projects.toArray(new IProject[projects.size()]);
-	}
-
-	public static void runValidationOperation(final LaunchValidationOperation op, IProgressMonitor monitor) throws CoreException {
-		op.run(monitor);
-		if (op.hasErrors()) {
-			final int[] result = new int[1];
-			final Display display = LauncherUtils.getDisplay();
-			display.syncExec(new Runnable() {
-				public void run() {
-					PluginStatusDialog dialog = new PluginStatusDialog(display.getActiveShell());
-					dialog.showCancelButton(true);
-					dialog.setInput(op.getInput());
-					result[0] = dialog.open();
-				}
-			});
-			if (result[0] == IDialogConstants.CANCEL_ID)
-				throw new CoreException(Status.CANCEL_STATUS);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchTerminationStatusHandler.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchTerminationStatusHandler.java
new file mode 100644
index 0000000..8ae137b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchTerminationStatusHandler.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2009 eXXcellent solutions gmbh, EclipseSource Corporation
+ * and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt, eXXcellent solutions gmbh - initial API and implementation
+ *     EclipseSource - initial API and implementation, ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import java.io.File;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.LaunchListener;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.*;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.views.log.LogView;
+
+public class LaunchTerminationStatusHandler implements IStatusHandler {
+	// different ways to open the error log
+	public static final int OPEN_IN_ERROR_LOG_VIEW = 0;
+	public static final int OPEN_IN_SYSTEM_EDITOR = 1;
+
+	public Object handleStatus(IStatus status, Object source) throws CoreException {
+		if (status.getCode() == 13)
+			handleOtherReasonsFoundInLog((ILaunch) source);
+		else if (status.getCode() == 15)
+			handleWorkspaceInUse();
+		return null;
+	}
+
+	private void handleWorkspaceInUse() {
+		Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				MessageDialog.openError(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.Launcher_error_title, PDEMessages.Launcher_error_code15);
+			}
+		});
+	}
+
+	private void handleOtherReasonsFoundInLog(final ILaunch launch) {
+		Display.getDefault().asyncExec(new Runnable() {
+			public void run() {
+				try {
+					File log = LaunchListener.getMostRecentLogFile(launch.getLaunchConfiguration());
+					if (log != null && log.exists()) {
+						MessageDialog dialog = new MessageDialog(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.Launcher_error_title, null, // accept the default window icon
+								PDEUIMessages.Launcher_error_code13, MessageDialog.ERROR, new String[] {PDEUIMessages.Launcher_error_displayInLogView, PDEUIMessages.Launcher_error_displayInSystemEditor, IDialogConstants.NO_LABEL}, OPEN_IN_ERROR_LOG_VIEW);
+						int dialog_value = dialog.open();
+						if (dialog_value == OPEN_IN_ERROR_LOG_VIEW) {
+							LogView errlog = (LogView) PDEPlugin.getActivePage().showView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$
+							errlog.handleImportPath(log.getAbsolutePath());
+							errlog.sortByDateDescending();
+						} else if (dialog_value == OPEN_IN_SYSTEM_EDITOR) {
+							openInEditor(log);
+						}
+					}
+				} catch (CoreException e) {
+				}
+			}
+		});
+	}
+
+	private void openInEditor(File log) {
+		IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(log.getAbsolutePath()));
+		if (!fileStore.fetchInfo().isDirectory() && fileStore.fetchInfo().exists()) {
+			IWorkbenchWindow ww = PDEPlugin.getActiveWorkbenchWindow();
+			IWorkbenchPage page = ww.getActivePage();
+			try {
+				IDE.openEditorOnFileStore(page, fileStore);
+			} catch (PartInitException e) {
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchValidationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchValidationOperation.java
deleted file mode 100644
index da038d6..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LaunchValidationOperation.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
-import org.eclipse.osgi.service.resolver.State;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.BundleValidationOperation;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.osgi.framework.Constants;
-
-public abstract class LaunchValidationOperation implements IWorkspaceRunnable {
-
-	private BundleValidationOperation fOperation;
-	protected ILaunchConfiguration fLaunchConfiguration;
-
-	public LaunchValidationOperation(ILaunchConfiguration configuration) {
-		fLaunchConfiguration = configuration;
-	}
-
-	public void run(IProgressMonitor monitor) throws CoreException {
-		fOperation = new BundleValidationOperation(getModels(), getPlatformProperties());
-		fOperation.run(monitor);
-	}
-
-	protected abstract IPluginModelBase[] getModels() throws CoreException;
-
-	protected Dictionary[] getPlatformProperties() throws CoreException {
-		IExecutionEnvironment[] envs = getMatchingEnvironments();
-		if (envs.length == 0)
-			return new Dictionary[] {TargetPlatformHelper.getTargetEnvironment()};
-
-		// add java profiles for those EE's that have a .profile file in the current system bundle
-		ArrayList result = new ArrayList(envs.length);
-		for (int i = 0; i < envs.length; i++) {
-			Properties profileProps = getJavaProfileProperties(envs[i].getId());
-			if (profileProps != null) {
-				Dictionary props = TargetPlatformHelper.getTargetEnvironment();
-				String systemPackages = profileProps.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES);
-				if (systemPackages != null)
-					props.put(Constants.FRAMEWORK_SYSTEMPACKAGES, systemPackages);
-				String ee = profileProps.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
-				if (ee != null)
-					props.put(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, ee);
-				result.add(props);
-			}
-		}
-		if (result.size() > 0)
-			return (Dictionary[]) result.toArray(new Dictionary[result.size()]);
-		return new Dictionary[] {TargetPlatformHelper.getTargetEnvironment()};
-
-	}
-
-	protected IExecutionEnvironment[] getMatchingEnvironments() throws CoreException {
-		IVMInstall install = VMHelper.getVMInstall(fLaunchConfiguration);
-		if (install == null)
-			return new IExecutionEnvironment[0];
-
-		IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
-		IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
-		List result = new ArrayList(envs.length);
-		for (int i = 0; i < envs.length; i++) {
-			IExecutionEnvironment env = envs[i];
-			IVMInstall[] compatible = env.getCompatibleVMs();
-			for (int j = 0; j < compatible.length; j++) {
-				if (compatible[j].equals(install)) {
-					result.add(env);
-					break;
-				}
-			}
-		}
-		return (IExecutionEnvironment[]) result.toArray(new IExecutionEnvironment[result.size()]);
-	}
-
-	private Properties getJavaProfileProperties(String ee) {
-		IPluginModelBase model = PluginRegistry.findModel("system.bundle"); //$NON-NLS-1$
-		if (model == null)
-			return null;
-
-		File location = new File(model.getInstallLocation());
-		String filename = ee.replace('/', '_') + ".profile"; //$NON-NLS-1$
-		InputStream is = null;
-		ZipFile zipFile = null;
-		try {
-			// find the input stream to the profile properties file
-			if (location.isDirectory()) {
-				File file = new File(location, filename);
-				if (file.exists())
-					is = new FileInputStream(file);
-			} else {
-				zipFile = null;
-				try {
-					zipFile = new ZipFile(location, ZipFile.OPEN_READ);
-					ZipEntry entry = zipFile.getEntry(filename);
-					if (entry != null)
-						is = zipFile.getInputStream(entry);
-				} catch (IOException e) {
-					// nothing to do
-				}
-			}
-			if (is != null) {
-				Properties profile = new Properties();
-				profile.load(is);
-				return profile;
-			}
-		} catch (IOException e) {
-			// nothing to do
-		} finally {
-			if (is != null)
-				try {
-					is.close();
-				} catch (IOException e) {
-					// nothing to do
-				}
-			if (zipFile != null)
-				try {
-					zipFile.close();
-				} catch (IOException e) {
-					// nothing to do
-				}
-		}
-		return null;
-	}
-
-	public boolean hasErrors() {
-		return fOperation.hasErrors();
-	}
-
-	public Map getInput() {
-		return fOperation.getResolverErrors();
-	}
-
-	public boolean isEmpty() {
-		return fOperation.getState().getHighestBundleId() == -1;
-	}
-
-	protected State getState() {
-		return fOperation.getState();
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtils.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtils.java
deleted file mode 100644
index 0de689e..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtils.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource Corporation - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.util.CoreUtility;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.wizards.tools.OrganizeManifestsProcessor;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.osgi.framework.*;
-
-public class LauncherUtils {
-
-	private static final String TIMESTAMP = "timestamp"; //$NON-NLS-1$
-	private static final String FILE_NAME = "dep-timestamp.properties"; //$NON-NLS-1$
-	private static Properties fLastRun;
-
-	public static Display getDisplay() {
-		Display display = Display.getCurrent();
-		if (display == null) {
-			display = Display.getDefault();
-		}
-		return display;
-	}
-
-	public final static Shell getActiveShell() {
-		IWorkbenchWindow window = PDEPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
-		if (window == null) {
-			IWorkbenchWindow[] windows = PDEPlugin.getDefault().getWorkbench().getWorkbenchWindows();
-			if (windows.length > 0)
-				return windows[0].getShell();
-		} else
-			return window.getShell();
-		return getDisplay().getActiveShell();
-	}
-
-	public static boolean clearWorkspace(ILaunchConfiguration configuration, String workspace, IProgressMonitor monitor) throws CoreException {
-
-		// If the workspace is not defined, there is no workspace to clear
-		// What will happen is that the workspace chooser dialog will be 
-		// brought up because no -data parameter will be specified on the 
-		// launch
-		if (workspace.length() == 0) {
-			monitor.done();
-			return true;
-		}
-
-		// Check if the workspace is already in use, if so, open a message and stop the launch before clearing
-		boolean isLocked = false;
-		try {
-			BundleContext context = PDECore.getDefault().getBundleContext();
-			ServiceReference[] references = context.getServiceReferences(Location.class.getName(), "(type=osgi.configuration.area)"); //$NON-NLS-1$
-			if (references.length > 0) {
-				Object service = context.getService(references[0]);
-				if (service instanceof Location) {
-					URL workspaceURL = new Path(workspace).toFile().toURI().toURL();
-					Location targetLocation = ((Location) service).createLocation(null, workspaceURL, false);
-					targetLocation.set(targetLocation.getDefault(), false);
-					isLocked = targetLocation.isLocked();
-				}
-			}
-		} catch (InvalidSyntaxException e) {
-			PDECore.log(e);
-			isLocked = false;
-		} catch (MalformedURLException e) {
-			PDECore.log(e);
-			isLocked = false;
-		} catch (IOException e) {
-			PDECore.log(e);
-			isLocked = false;
-		}
-
-		if (isLocked) {
-			generateErrorDialog(PDEUIMessages.LauncherUtils_workspaceLocked, NLS.bind(PDEUIMessages.LauncherUtils_cannotLaunchApplication, workspace));
-			monitor.done();
-			return false;
-		}
-
-		File workspaceFile = new Path(workspace).toFile().getAbsoluteFile();
-		if (configuration.getAttribute(IPDELauncherConstants.DOCLEAR, false) && workspaceFile.exists()) {
-			if (configuration.getAttribute(IPDELauncherConstants.ASKCLEAR, true)) {
-				int result;
-				if (configuration.getAttribute(IPDEUIConstants.DOCLEARLOG, false)) {
-					result = generateDialog(PDEUIMessages.LauncherUtils_clearLogFile);
-				} else {
-					result = generateDialog(NLS.bind(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_confirmDeleteWorkspace, workspaceFile.getPath()));
-				}
-
-				if (result == 2 /*Cancel Button*/|| result == -1 /*Dialog close button*/) {
-					monitor.done();
-					return false;
-				} else if (result == 0) {
-					if (configuration.getAttribute(IPDEUIConstants.DOCLEARLOG, false)) {
-						LauncherUtils.clearWorkspaceLog(workspace);
-					} else {
-						CoreUtility.deleteContent(workspaceFile);
-					}
-				}
-			} else if (configuration.getAttribute(IPDEUIConstants.DOCLEARLOG, false)) {
-				LauncherUtils.clearWorkspaceLog(workspace);
-			} else {
-				CoreUtility.deleteContent(workspaceFile);
-			}
-		}
-
-		monitor.done();
-		return true;
-	}
-
-	public static boolean generateConfigIni() {
-		String message = PDEUIMessages.LauncherUtils_generateConfigIni;
-		return generateDialog(message) == 0;
-	}
-
-	/**
-	 * Creates a message dialog using a syncExec in case we are launching in the background.
-	 * Dialog will be a question dialog with Yes, No and Cancel buttons.
-	 * @param message Message to use in the dialog
-	 * @return int representing the button clicked (-1 or 2 for cancel, 0 for yes, 1 for no).
-	 */
-	private static int generateDialog(final String message) {
-		final int[] result = new int[1];
-		getDisplay().syncExec(new Runnable() {
-			public void run() {
-				String title = PDEUIMessages.LauncherUtils_title;
-				MessageDialog dialog = new MessageDialog(getActiveShell(), title, null, message, MessageDialog.QUESTION, new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
-				result[0] = dialog.open();
-			}
-		});
-		return result[0];
-	}
-
-	private static void generateErrorDialog(final String title, final String message) {
-		getDisplay().syncExec(new Runnable() {
-			public void run() {
-				MessageDialog dialog = new MessageDialog(getActiveShell(), title, null, message, MessageDialog.ERROR, new String[] {IDialogConstants.OK_LABEL}, 0);
-				dialog.open();
-			}
-		});
-	}
-
-	public static void validateProjectDependencies(ILaunchConfiguration launch, final IProgressMonitor monitor) {
-		IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
-		if (!store.getBoolean(IPreferenceConstants.PROP_AUTO_MANAGE))
-			return;
-
-		String timeStamp;
-		boolean useDefault, autoAdd;
-		try {
-			timeStamp = launch.getAttribute(TIMESTAMP, "0"); //$NON-NLS-1$
-			autoAdd = launch.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
-			useDefault = launch.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
-			useDefault |= launch.getAttribute(IPDELauncherConstants.USEFEATURES, false);
-			final ArrayList projects = new ArrayList();
-			if (useDefault)
-				handleUseDefault(timeStamp, projects);
-			else if (autoAdd)
-				handleDeselectedPlugins(launch, timeStamp, projects);
-			else
-				handleSelectedPlugins(launch, timeStamp, projects);
-
-			if (!projects.isEmpty())
-				Display.getDefault().syncExec(new Runnable() {
-					public void run() {
-						OrganizeManifestsProcessor processor = new OrganizeManifestsProcessor(projects);
-						initializeProcessor(processor);
-						try {
-							Change change = processor.createChange(monitor);
-							change.perform(monitor);
-							// update table for each project with current time stamp
-							Properties table = getLastRun();
-							String ts = Long.toString(System.currentTimeMillis());
-							Iterator it = projects.iterator();
-							while (it.hasNext())
-								table.put(((IProject) it.next()).getName(), ts);
-						} catch (OperationCanceledException e) {
-						} catch (CoreException e) {
-						}
-					}
-				});
-
-			ILaunchConfigurationWorkingCopy wc = null;
-			if (launch.isWorkingCopy())
-				wc = (ILaunchConfigurationWorkingCopy) launch;
-			else
-				wc = launch.getWorkingCopy();
-			wc.setAttribute(TIMESTAMP, Long.toString(System.currentTimeMillis()));
-			wc.doSave();
-		} catch (CoreException e) {
-		}
-	}
-
-	private static void initializeProcessor(OrganizeManifestsProcessor processor) {
-		processor.setAddMissing(false);
-		processor.setRemoveUnresolved(false);
-		processor.setModifyDep(false);
-		processor.setRemoveLazy(false);
-		processor.setRemoveUselessFiles(false);
-		processor.setAddDependencies(true);
-		processor.setCalculateUses(false);
-		processor.setMarkInternal(false);
-		processor.setPrefixIconNL(false);
-		processor.setUnusedDependencies(false);
-		processor.setUnusedKeys(false);
-	}
-
-	private static String getTimeStamp(IProject project) {
-		IJavaProject jp = JavaCore.create(project);
-		try {
-			long timeStamp = 0;
-			IClasspathEntry[] entries = jp.getResolvedClasspath(true);
-			for (int i = 0; i < entries.length; i++) {
-				if (entries[i].getEntryKind() == IClasspathEntry.CPE_SOURCE) {
-					File file;
-					IPath location = entries[i].getOutputLocation();
-					if (location == null)
-						location = jp.getOutputLocation();
-					IResource res = project.getWorkspace().getRoot().findMember(location);
-					IPath path = res == null ? null : res.getLocation();
-					if (path == null)
-						continue;
-					file = path.toFile();
-					Stack files = new Stack();
-					files.push(file);
-					while (!files.isEmpty()) {
-						file = (File) files.pop();
-						if (file.isDirectory()) {
-							File[] children = file.listFiles();
-							if (children != null) {
-								for (int j = 0; j < children.length; j++)
-									files.push(children[j]);
-							}
-						} else if (file.getName().endsWith(".class") && timeStamp < file.lastModified()) //$NON-NLS-1$
-							timeStamp = file.lastModified();
-					}
-				}
-			}
-			String[] otherFiles = {ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR, ICoreConstants.BUILD_FILENAME_DESCRIPTOR};
-			for (int i = 0; i < otherFiles.length; i++) {
-				IResource file = project.getFile(otherFiles[i]);
-				if (file != null) {
-					long fileTimeStamp = file.getRawLocation().toFile().lastModified();
-					if (timeStamp < fileTimeStamp)
-						timeStamp = fileTimeStamp;
-				}
-			}
-			return Long.toString(timeStamp);
-		} catch (JavaModelException e) {
-		}
-		return "0"; //$NON-NLS-1$
-	}
-
-	private static void handleUseDefault(String launcherTimeStamp, ArrayList projects) {
-		IProject[] projs = ResourcesPlugin.getWorkspace().getRoot().getProjects();
-		for (int i = 0; i < projs.length; i++) {
-			if (!WorkspaceModelManager.isPluginProject(projs[i]))
-				continue;
-			String timestamp = getTimeStamp(projs[i]);
-			if (timestamp.compareTo(launcherTimeStamp) > 0 && shouldAdd(projs[i], launcherTimeStamp, timestamp))
-				projects.add(projs[i]);
-		}
-	}
-
-	private static void handleSelectedPlugins(ILaunchConfiguration config, String timeStamp, ArrayList projects) throws CoreException {
-		Map selectedPlugins = BundleLauncherHelper.getWorkspaceBundleMap(config, null, IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS);
-		Iterator it = selectedPlugins.keySet().iterator();
-		while (it.hasNext()) {
-			IPluginModelBase model = (IPluginModelBase) it.next();
-			IResource res = model.getUnderlyingResource();
-			if (res != null) {
-				IProject project = res.getProject();
-				String projTimeStamp = getTimeStamp(project);
-				if (projTimeStamp.compareTo(timeStamp) > 0 && shouldAdd(project, timeStamp, projTimeStamp))
-					projects.add(project);
-			}
-		}
-	}
-
-	private static void handleDeselectedPlugins(ILaunchConfiguration config, String launcherTimeStamp, ArrayList projects) throws CoreException {
-		Map deSelectedPlugins = BundleLauncherHelper.getWorkspaceBundleMap(config, null, IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS);
-		IProject[] projs = ResourcesPlugin.getWorkspace().getRoot().getProjects();
-		for (int i = 0; i < projs.length; i++) {
-			if (!WorkspaceModelManager.isPluginProject(projs[i]))
-				continue;
-			IPluginModelBase base = PluginRegistry.findModel(projs[i]);
-			if (base == null || base != null && deSelectedPlugins.containsKey(base))
-				continue;
-			String timestamp = getTimeStamp(projs[i]);
-			if (timestamp.compareTo(launcherTimeStamp) > 0 && shouldAdd(projs[i], launcherTimeStamp, timestamp))
-				projects.add(projs[i]);
-		}
-	}
-
-	public static final void shutdown() {
-		if (fLastRun == null)
-			return;
-		FileOutputStream stream = null;
-		try {
-			stream = new FileOutputStream(new File(getDirectory(), FILE_NAME));
-			fLastRun.store(stream, "Cached timestamps"); //$NON-NLS-1$
-			stream.flush();
-			stream.close();
-		} catch (IOException e) {
-			PDECore.logException(e);
-		} finally {
-			try {
-				if (stream != null)
-					stream.close();
-			} catch (IOException e1) {
-			}
-		}
-	}
-
-	private static File getDirectory() {
-		IPath path = PDECore.getDefault().getStateLocation().append(".cache"); //$NON-NLS-1$
-		File directory = new File(path.toOSString());
-		if (!directory.exists() || !directory.isDirectory())
-			directory.mkdirs();
-		return directory;
-	}
-
-	private static Properties getLastRun() {
-		if (fLastRun == null) {
-			fLastRun = new Properties();
-			FileInputStream fis = null;
-			try {
-				File file = new File(getDirectory(), FILE_NAME);
-				if (file.exists()) {
-					fis = new FileInputStream(file);
-					fLastRun.load(fis);
-					fis.close();
-				}
-			} catch (IOException e) {
-				PDECore.logException(e);
-			} finally {
-				try {
-					if (fis != null)
-						fis.close();
-				} catch (IOException e1) {
-				}
-			}
-		}
-		return fLastRun;
-	}
-
-	private static boolean shouldAdd(IProject proj, String launcherTS, String fileSystemTS) {
-		String projTS = (String) getLastRun().get(proj.getName());
-		if (projTS == null)
-			return true;
-		return ((projTS.compareTo(launcherTS) < 0) || (projTS.compareTo(fileSystemTS) < 0));
-	}
-
-	public static boolean requiresUI(ILaunchConfiguration configuration) {
-		try {
-			String projectID = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
-			if (projectID.length() > 0) {
-				IResource project = PDEPlugin.getWorkspace().getRoot().findMember(projectID);
-				if (project instanceof IProject) {
-					IPluginModelBase model = PluginRegistry.findModel((IProject) project);
-					if (model != null) {
-						Set plugins = DependencyManager.getSelfAndDependencies(model);
-						return plugins.contains("org.eclipse.swt"); //$NON-NLS-1$
-					}
-				}
-			}
-		} catch (CoreException e) {
-		}
-		return true;
-	}
-
-	public static boolean clearWorkspaceLog(String workspace) {
-		File logFile = new File(workspace, ".metadata" + File.separator + ".log"); //$NON-NLS-1$ //$NON-NLS-2$
-		if (logFile != null && logFile.exists()) {
-			return logFile.delete();
-		}
-		return true;
-	}
-
-	public static IStatus createErrorStatus(String message) {
-		return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.OK, message, null);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java
new file mode 100644
index 0000000..d87ed3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/LauncherUtilsStatusHandler.java
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * Copyright (c) 2009 eXXcellent solutions gmbh, EclipseSource Corporation
+ * and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt, eXXcellent solutions gmbh - initial API and implementation
+ *     EclipseSource - initial API and implementation, ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import java.util.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.LauncherUtils;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.wizards.tools.OrganizeManifestsProcessor;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+
+public class LauncherUtilsStatusHandler implements IStatusHandler {
+
+	public Object handleStatus(IStatus status, Object source) throws CoreException {
+		if (status.getCode() == LauncherUtils.WORKSPACE_LOCKED)
+			handleWorkspaceLocked((String) source);
+		else if (status.getCode() == LauncherUtils.CLEAR_LOG)
+			return clearLog();
+		else if (status.getCode() == LauncherUtils.DELETE_WORKSPACE)
+			return deleteWorkspace((String) source);
+		else if (status.getCode() == LauncherUtils.GENERATE_CONFIG_INI)
+			return generateConfigIni();
+		else if (status.getCode() == LauncherUtils.ORGANIZE_MANIFESTS) {
+			Object[] args = (Object[]) source;
+			organizeManifests((ArrayList) args[0], (IProgressMonitor) args[1], (Properties) args[2]);
+		}
+		return null;
+	}
+
+	private Boolean generateConfigIni() {
+		String message = PDEUIMessages.LauncherUtils_generateConfigIni;
+		return Boolean.valueOf(generateDialog(message).intValue() == 0);
+	}
+
+	private Integer deleteWorkspace(String path) {
+		return generateDialog(NLS.bind(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_confirmDeleteWorkspace, path));
+	}
+
+	private Integer clearLog() {
+		return generateDialog(PDEUIMessages.LauncherUtils_clearLogFile);
+	}
+
+	private void handleWorkspaceLocked(String workspace) {
+		generateErrorDialog(PDEUIMessages.LauncherUtils_workspaceLocked, NLS.bind(PDEMessages.LauncherUtils_cannotLaunchApplication, workspace));
+	}
+
+	private void organizeManifests(final ArrayList projects, final IProgressMonitor monitor, final Properties lastRun) {
+		Display.getDefault().syncExec(new Runnable() {
+			public void run() {
+				OrganizeManifestsProcessor processor = new OrganizeManifestsProcessor(projects);
+				initializeProcessor(processor);
+				try {
+					Change change = processor.createChange(monitor);
+					change.perform(monitor);
+					// update table for each project with current time stamp
+					Properties table = lastRun;
+					String ts = Long.toString(System.currentTimeMillis());
+					Iterator it = projects.iterator();
+					while (it.hasNext())
+						table.put(((IProject) it.next()).getName(), ts);
+				} catch (OperationCanceledException e) {
+				} catch (CoreException e) {
+				}
+			}
+		});
+	}
+
+	public static Display getDisplay() {
+		Display display = Display.getCurrent();
+		if (display == null) {
+			display = Display.getDefault();
+		}
+		return display;
+	}
+
+	public final static Shell getActiveShell() {
+		IWorkbenchWindow window = PDEPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
+		if (window == null) {
+			IWorkbenchWindow[] windows = PDEPlugin.getDefault().getWorkbench().getWorkbenchWindows();
+			if (windows.length > 0)
+				return windows[0].getShell();
+		} else
+			return window.getShell();
+		return getDisplay().getActiveShell();
+	}
+
+	private static void initializeProcessor(OrganizeManifestsProcessor processor) {
+		processor.setAddMissing(false);
+		processor.setRemoveUnresolved(false);
+		processor.setModifyDep(false);
+		processor.setRemoveLazy(false);
+		processor.setRemoveUselessFiles(false);
+		processor.setAddDependencies(true);
+		processor.setCalculateUses(false);
+		processor.setMarkInternal(false);
+		processor.setPrefixIconNL(false);
+		processor.setUnusedDependencies(false);
+		processor.setUnusedKeys(false);
+	}
+
+	/**
+	 * Creates a message dialog using a syncExec in case we are launching in the background.
+	 * Dialog will be a question dialog with Yes, No and Cancel buttons.
+	 * @param message Message to use in the dialog
+	 * @return int representing the button clicked (-1 or 2 for cancel, 0 for yes, 1 for no).
+	 */
+	private static Integer generateDialog(final String message) {
+		final int[] result = new int[1];
+		getDisplay().syncExec(new Runnable() {
+			public void run() {
+				String title = PDEUIMessages.LauncherUtils_title;
+				MessageDialog dialog = new MessageDialog(getActiveShell(), title, null, message, MessageDialog.QUESTION, new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
+				result[0] = dialog.open();
+			}
+		});
+		return new Integer(result[0]);
+	}
+
+	private static void generateErrorDialog(final String title, final String message) {
+		getDisplay().syncExec(new Runnable() {
+			public void run() {
+				MessageDialog dialog = new MessageDialog(getActiveShell(), title, null, message, MessageDialog.ERROR, new String[] {IDialogConstants.OK_LABEL}, 0);
+				dialog.open();
+			}
+		});
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiBundleBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiBundleBlock.java
index 77765e4..0e9d120 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiBundleBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiBundleBlock.java
@@ -11,13 +11,16 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+import org.eclipse.pde.internal.launching.launcher.*;
+
 import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.ui.launcher.BundlesTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 
 public class OSGiBundleBlock extends AbstractPluginBlock {
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkBlock.java
index 4f49044..813c6e4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -8,132 +8,168 @@
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-public class OSGiFrameworkBlock {
-
-	private Combo fDefaultAutoStart;
-	private Spinner fDefaultStartLevel;
-	private IConfigurationElement[] fConfigElements;
-	private Combo fLauncherCombo;
-	private Listener fListener;
-	private AbstractLauncherTab fTab;
-
-	class Listener extends SelectionAdapter implements ModifyListener {
-
-		public void widgetSelected(SelectionEvent e) {
-			fTab.updateLaunchConfigurationDialog();
-		}
-
-		public void modifyText(ModifyEvent e) {
-			fTab.updateLaunchConfigurationDialog();
-		}
-	}
-
-	public OSGiFrameworkBlock(AbstractLauncherTab tab) {
-		fTab = tab;
-		fConfigElements = PDEPlugin.getDefault().getOSGiFrameworkManager().getSortedFrameworks();
-		fListener = new Listener();
-	}
-
-	public void createControl(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout(6, false);
-		layout.marginHeight = layout.marginWidth = 0;
-		composite.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = 2;
-		composite.setLayoutData(gd);
-
-		Label label = new Label(composite, SWT.NONE);
-		label.setText(PDEUIMessages.OSGiBundlesTab_frameworkLabel);
-		gd = new GridData();
-		gd.horizontalIndent = 5;
-		label.setLayoutData(gd);
-
-		fLauncherCombo = new Combo(composite, SWT.READ_ONLY);
-		for (int i = 0; i < fConfigElements.length; i++)
-			fLauncherCombo.add(fConfigElements[i].getAttribute("name")); //$NON-NLS-1$
-		fLauncherCombo.addSelectionListener(fListener);
-
-		label = new Label(composite, SWT.NONE);
-		gd = new GridData();
-		gd.horizontalIndent = 20;
-		label.setLayoutData(gd);
-		label.setText(PDEUIMessages.EquinoxPluginsTab_defaultStart);
-
-		fDefaultStartLevel = new Spinner(composite, SWT.BORDER);
-		fDefaultStartLevel.setMinimum(1);
-		fDefaultStartLevel.addModifyListener(fListener);
-
-		label = new Label(composite, SWT.NONE);
-		gd = new GridData();
-		gd.horizontalIndent = 20;
-		label.setLayoutData(gd);
-		label.setText(PDEUIMessages.EquinoxPluginsTab_defaultAuto);
-
-		fDefaultAutoStart = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
-		fDefaultAutoStart.setItems(new String[] {Boolean.toString(true), Boolean.toString(false)});
-		fDefaultAutoStart.select(0);
-		fDefaultAutoStart.addSelectionListener(fListener);
-
-		label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
-		gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = 6;
-		label.setLayoutData(gd);
-	}
-
-	public void initializeFrom(ILaunchConfiguration config) throws CoreException {
-		initializeFramework(config);
-		boolean auto = config.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
-		fDefaultAutoStart.setText(Boolean.toString(auto));
-		int level = config.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
-		fDefaultStartLevel.setSelection(level);
-	}
-
-	private void initializeFramework(ILaunchConfiguration config) throws CoreException {
-		OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
-		String id = config.getAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, manager.getDefaultFramework());
-
-		for (int i = 0; i < fConfigElements.length; i++) {
-			if (id.equals(fConfigElements[i].getAttribute(OSGiFrameworkManager.ATT_ID))) {
-				fLauncherCombo.select(i);
-				return;
-			}
-		}
-		if (fLauncherCombo.getItemCount() > 0)
-			fLauncherCombo.select(0);
-	}
-
-	public void performApply(ILaunchConfigurationWorkingCopy config) {
-		config.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, Boolean.toString(true).equals(fDefaultAutoStart.getText()));
-		config.setAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, fDefaultStartLevel.getSelection());
-
-		int index = fLauncherCombo.getSelectionIndex();
-		String id = index > -1 ? fConfigElements[index].getAttribute(OSGiFrameworkManager.ATT_ID) : null;
-		OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
-
-		// no need to persist the default OSGi framework
-		if (manager.getDefaultFramework().equals(id))
-			id = null;
-		config.setAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, id);
-	}
-
-	public int getDefaultStartLevel() {
-		return fDefaultStartLevel.getSelection();
-	}
-}
+package org.eclipse.pde.internal.ui.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.SWTFactory;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+
+public class OSGiFrameworkBlock {
+
+	private Combo fDefaultAutoStart;
+	private Spinner fDefaultStartLevel;
+	private IConfigurationElement[] fConfigElements;
+	private Combo fLauncherCombo;
+	private Listener fListener;
+	private AbstractLauncherTab fTab;
+	private Combo fLaunchWithCombo;
+	private BlockAdapter fBlock;
+
+	class Listener extends SelectionAdapter implements ModifyListener {
+
+		public void widgetSelected(SelectionEvent e) {
+			if (e.widget == fLaunchWithCombo) {
+				setActiveIndex();
+			}
+			fTab.updateLaunchConfigurationDialog();
+		}
+
+		public void modifyText(ModifyEvent e) {
+			fTab.updateLaunchConfigurationDialog();
+		}
+	}
+
+	/**
+	 * Constructs a new instance of this block
+	 * @param tab parent launch config tab
+	 * @param block the content block that will contain the UI for modifying included bundles (block changes based on bundle/feature mode)
+	 */
+	public OSGiFrameworkBlock(AbstractLauncherTab tab, BlockAdapter block) {
+		fTab = tab;
+		fBlock = block;
+		fConfigElements = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager().getSortedFrameworks();
+		fListener = new Listener();
+	}
+
+	public void createControl(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(8, false);
+		layout.marginHeight = layout.marginWidth = 0;
+		composite.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		composite.setLayoutData(gd);
+
+		Label launchLabel = new Label(composite, SWT.NONE);
+		launchLabel.setText(PDEUIMessages.PluginsTab_launchWith);
+		gd = new GridData();
+		gd.horizontalIndent = 5;
+		launchLabel.setLayoutData(gd);
+
+		fLaunchWithCombo = SWTFactory.createCombo(composite, SWT.READ_ONLY, 1, SWT.NONE, new String[] {PDEUIMessages.OSGiFrameworkBlock_selectedBundles, PDEUIMessages.PluginsTab_customFeatureMode});
+
+		fLaunchWithCombo.addSelectionListener(fListener);
+
+		Label label = new Label(composite, SWT.NONE);
+		label.setText(PDEUIMessages.OSGiBundlesTab_frameworkLabel);
+		gd = new GridData();
+		gd.horizontalIndent = 5;
+		label.setLayoutData(gd);
+
+		fLauncherCombo = new Combo(composite, SWT.READ_ONLY);
+		for (int i = 0; i < fConfigElements.length; i++)
+			fLauncherCombo.add(fConfigElements[i].getAttribute("name")); //$NON-NLS-1$
+		fLauncherCombo.addSelectionListener(fListener);
+
+		label = new Label(composite, SWT.NONE);
+		gd = new GridData();
+		gd.horizontalIndent = 5;
+		label.setLayoutData(gd);
+		label.setText(PDEUIMessages.EquinoxPluginsTab_defaultStart);
+
+		fDefaultStartLevel = new Spinner(composite, SWT.BORDER);
+		fDefaultStartLevel.setMinimum(1);
+		fDefaultStartLevel.addModifyListener(fListener);
+
+		label = new Label(composite, SWT.NONE);
+		gd = new GridData();
+		gd.horizontalIndent = 5;
+		label.setLayoutData(gd);
+		label.setText(PDEUIMessages.EquinoxPluginsTab_defaultAuto);
+
+		fDefaultAutoStart = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
+		fDefaultAutoStart.setItems(new String[] {Boolean.toString(true), Boolean.toString(false)});
+		fDefaultAutoStart.select(0);
+		fDefaultAutoStart.addSelectionListener(fListener);
+		fDefaultAutoStart.setLayoutData(new GridData());
+
+		label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+		gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 8;
+		label.setLayoutData(gd);
+	}
+
+	public void initializeFrom(ILaunchConfiguration config) throws CoreException {
+		initializeFramework(config);
+		boolean auto = config.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
+		fDefaultAutoStart.setText(Boolean.toString(auto));
+		int level = config.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
+		fDefaultStartLevel.setSelection(level);
+	}
+
+	private void initializeFramework(ILaunchConfiguration config) throws CoreException {
+		boolean usePlugins = config.getAttribute(IPDELauncherConstants.USE_DEFAULT, true);
+		fLaunchWithCombo.select(usePlugins ? 0 : 1);
+		setActiveIndex();
+
+		OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager();
+		String id = config.getAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, manager.getDefaultFramework());
+
+		for (int i = 0; i < fConfigElements.length; i++) {
+			if (id.equals(fConfigElements[i].getAttribute(OSGiFrameworkManager.ATT_ID))) {
+				fLauncherCombo.select(i);
+				return;
+			}
+		}
+		if (fLauncherCombo.getItemCount() > 0)
+			fLauncherCombo.select(0);
+	}
+
+	public void performApply(ILaunchConfigurationWorkingCopy config) {
+		config.setAttribute(IPDELauncherConstants.USE_DEFAULT, fLaunchWithCombo.getSelectionIndex() == 0);
+		config.setAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, fLaunchWithCombo.getSelectionIndex() == 1);
+		config.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, Boolean.toString(true).equals(fDefaultAutoStart.getText()));
+		config.setAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, fDefaultStartLevel.getSelection());
+
+		int index = fLauncherCombo.getSelectionIndex();
+		String id = index > -1 ? fConfigElements[index].getAttribute(OSGiFrameworkManager.ATT_ID) : null;
+		OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager();
+
+		// no need to persist the default OSGi framework
+		if (manager.getDefaultFramework().equals(id))
+			id = null;
+		config.setAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, id);
+	}
+
+	public int getDefaultStartLevel() {
+		return fDefaultStartLevel.getSelection();
+	}
+
+	public void setActiveIndex() {
+		if (fBlock != null) {
+			fBlock.setActiveBlock(fLaunchWithCombo.getSelectionIndex() + 1); // +1 to match plug-ins tab combo indices
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkManager.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkManager.java
deleted file mode 100644
index b5c6f02..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiFrameworkManager.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.pde.internal.ui.IPreferenceConstants;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.ui.launcher.OSGiLaunchConfigurationInitializer;
-
-public class OSGiFrameworkManager implements IRegistryChangeListener {
-
-	public static final String POINT_ID = "org.eclipse.pde.ui.osgiFrameworks"; //$NON-NLS-1$
-	public static final String DEFAULT_FRAMEWORK = "org.eclipse.pde.ui.EquinoxFramework"; //$NON-NLS-1$
-
-	public static final String ATT_ID = "id"; //$NON-NLS-1$
-	public static final String ATT_NAME = "name"; //$NON-NLS-1$
-	public static final String ATT_DELEGATE = "launcherDelegate"; //$NON-NLS-1$
-	public static final String ATT_INITIALIZER = "initializer"; //$NON-NLS-1$
-
-	public static final String ELEMENT_FRAMEWORK = "framework"; //$NON-NLS-1$
-
-	private Map fFrameworks;
-
-	public IConfigurationElement[] getFrameworks() {
-		if (fFrameworks == null)
-			loadElements();
-		return (IConfigurationElement[]) fFrameworks.values().toArray(new IConfigurationElement[fFrameworks.size()]);
-	}
-
-	public IConfigurationElement[] getSortedFrameworks() {
-		IConfigurationElement[] elements = getFrameworks();
-		return orderElements(elements);
-	}
-
-	private void loadElements() {
-		fFrameworks = new HashMap();
-		IExtensionRegistry registry = Platform.getExtensionRegistry();
-		IConfigurationElement[] elements = registry.getConfigurationElementsFor(POINT_ID);
-		for (int i = 0; i < elements.length; i++) {
-			String id = elements[i].getAttribute(ATT_ID);
-			if (id == null || elements[i].getAttribute(ATT_NAME) == null || elements[i].getAttribute(ATT_DELEGATE) == null)
-				continue;
-			fFrameworks.put(id, elements[i]);
-		}
-	}
-
-	private IConfigurationElement[] orderElements(IConfigurationElement[] elems) {
-		Arrays.sort(elems, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				String name1 = ((IConfigurationElement) o1).getAttribute(ATT_NAME);
-				String name2 = ((IConfigurationElement) o2).getAttribute(ATT_NAME);
-				if (name1 != null)
-					return name1.compareToIgnoreCase(name2);
-				return 1;
-			}
-		});
-		return elems;
-	}
-
-	public void registryChanged(IRegistryChangeEvent event) {
-		//TODO implement 
-	}
-
-	public String getDefaultFramework() {
-		IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
-		return store.getString(IPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
-	}
-
-	public OSGiLaunchConfigurationInitializer getDefaultInitializer() {
-		return getInitializer(getDefaultFramework());
-	}
-
-	public OSGiLaunchConfigurationInitializer getInitializer(String frameworkID) {
-		if (fFrameworks == null)
-			loadElements();
-		if (fFrameworks.containsKey(frameworkID)) {
-			try {
-				IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
-				if (element.getAttribute(ATT_INITIALIZER) != null) {
-					Object result = element.createExecutableExtension(ATT_INITIALIZER);
-					if (result instanceof OSGiLaunchConfigurationInitializer)
-						return (OSGiLaunchConfigurationInitializer) result;
-				}
-			} catch (CoreException e) {
-			}
-		}
-		return new OSGiLaunchConfigurationInitializer();
-	}
-
-	public LaunchConfigurationDelegate getFrameworkLauncher(String frameworkID) {
-		if (fFrameworks == null)
-			loadElements();
-		if (fFrameworks.containsKey(frameworkID)) {
-			try {
-				IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
-				Object result = element.createExecutableExtension(ATT_DELEGATE);
-				if (result instanceof LaunchConfigurationDelegate)
-					return (LaunchConfigurationDelegate) result;
-			} catch (CoreException e) {
-			}
-		}
-		return null;
-	}
-
-	public String getFrameworkName(String frameworkID) {
-		if (fFrameworks == null)
-			loadElements();
-		if (fFrameworks.containsKey(frameworkID)) {
-			IConfigurationElement element = (IConfigurationElement) fFrameworks.get(frameworkID);
-			return element.getAttribute(ATT_NAME);
-		}
-		return null;
-	}
-
-	/**
-	 * Returns the {@link IConfigurationElement} for the framework with the given ID
-	 * or <code>null</code> if no element exists with that ID.
-	 * @param frameworkId
-	 * @return the {@link IConfigurationElement} for the framework with the given ID or <code>null</code>
-	 * 
-	 * @since 3.5
-	 */
-	public IConfigurationElement getFramework(String frameworkId) {
-		if (fFrameworks == null) {
-			loadElements();
-		}
-		return (IConfigurationElement) fFrameworks.get(frameworkId);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiMigrationDelegate.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiMigrationDelegate.java
deleted file mode 100644
index 98c64ed..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiMigrationDelegate.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-
-public class OSGiMigrationDelegate extends PDEMigrationDelegate {
-
-	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
-		return super.isCandidate(candidate) || !candidate.getAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "").equals("3.3"); //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	public void migrate(ILaunchConfigurationWorkingCopy wc) throws CoreException {
-		if (!wc.getAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "").equals("3.3")) { //$NON-NLS-1$ //$NON-NLS-2$
-			wc.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
-			StringBuffer vmArgs = new StringBuffer(wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "")); //$NON-NLS-1$
-			if (vmArgs.indexOf("-Declipse.ignoreApp") == -1) { //$NON-NLS-1$
-				if (vmArgs.length() > 0)
-					vmArgs.append(" "); //$NON-NLS-1$
-				vmArgs.append("-Declipse.ignoreApp=true"); //$NON-NLS-1$
-			}
-			if (vmArgs.indexOf("-Dosgi.noShutdown") == -1) { //$NON-NLS-1$
-				vmArgs.append(" -Dosgi.noShutdown=true"); //$NON-NLS-1$
-			}
-			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs.toString());
-		}
-		super.migrate(wc);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiValidationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiValidationOperation.java
deleted file mode 100644
index 11342a4..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OSGiValidationOperation.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     EclipseSource Corporation - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-
-public class OSGiValidationOperation extends LaunchValidationOperation {
-
-	public OSGiValidationOperation(ILaunchConfiguration configuration) {
-		super(configuration);
-	}
-
-	protected IPluginModelBase[] getModels() throws CoreException {
-		return BundleLauncherHelper.getMergedBundles(fLaunchConfiguration, true);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OpenLogDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OpenLogDialog.java
index 4739206..e5ef4c4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OpenLogDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/OpenLogDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,8 @@ import org.eclipse.swt.widgets.*;
  * Displays the error log in non-Win32 platforms - see bug 55314.
  */
 public final class OpenLogDialog extends TrayDialog {
+	// maximum log file size
+	public static final long MAX_FILE_LENGTH = 1024 * 1024;
 	// input log file
 	private File logFile;
 	// location/size configuration
@@ -90,7 +92,7 @@ public final class OpenLogDialog extends TrayDialog {
 	private String getLogSummary() {
 		StringWriter out = new StringWriter();
 		PrintWriter writer = new PrintWriter(out);
-		if (logFile.length() > LaunchListener.MAX_FILE_LENGTH) {
+		if (logFile.length() > MAX_FILE_LENGTH) {
 			readLargeFileWithMonitor(writer);
 		} else {
 			readFileWithMonitor(writer);
@@ -112,7 +114,7 @@ public final class OpenLogDialog extends TrayDialog {
 		boolean hasStarted = false;
 		try {
 			random = new RandomAccessFile(logFile, "r"); //$NON-NLS-1$
-			random.seek(logFile.length() - LaunchListener.MAX_FILE_LENGTH);
+			random.seek(logFile.length() - MAX_FILE_LENGTH);
 			for (;;) {
 				String line = random.readLine();
 				if (line == null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDELogFileProvider.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDELogFileProvider.java
index 4679f52..785a191 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDELogFileProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDELogFileProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.IOException;
 import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.*;
+import org.eclipse.pde.internal.launching.launcher.LaunchListener;
 import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
 import org.eclipse.ui.internal.views.log.ILogFileProvider;
 import org.eclipse.ui.statushandlers.StatusManager;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDEMigrationDelegate.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDEMigrationDelegate.java
deleted file mode 100644
index 65f175a..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDEMigrationDelegate.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.debug.core.*;
-import org.eclipse.jdt.launching.*;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-
-public class PDEMigrationDelegate implements ILaunchConfigurationMigrationDelegate {
-
-	public boolean isCandidate(ILaunchConfiguration candidate) throws CoreException {
-		return !candidate.getAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, false) || candidate.hasAttribute(IPDELauncherConstants.VMINSTALL);
-	}
-
-	public void migrate(ILaunchConfiguration candidate) throws CoreException {
-		ILaunchConfigurationWorkingCopy wc = candidate.getWorkingCopy();
-		migrate(wc);
-		wc.doSave();
-	}
-
-	public void migrate(ILaunchConfigurationWorkingCopy candidate) throws CoreException {
-		if (!candidate.getAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, false)) {
-			candidate.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
-			String args = candidate.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); //$NON-NLS-1$
-			StringBuffer buffer = new StringBuffer(LaunchArgumentsHelper.getInitialProgramArguments());
-			if (args.length() > 0) {
-				buffer.append(" "); //$NON-NLS-1$
-				buffer.append(args);
-			}
-			candidate.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, buffer.toString());
-		}
-		if (candidate.hasAttribute(IPDELauncherConstants.VMINSTALL)) {
-			String name = candidate.getAttribute(IPDELauncherConstants.VMINSTALL, (String) null);
-			if (name != null) {
-				IVMInstall vm = VMHelper.getVMInstall(name);
-				if (vm != null) {
-					IPath path = JavaRuntime.newJREContainerPath(vm);
-					candidate.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, path.toPortableString());
-				}
-			}
-			candidate.removeAttribute(IPDELauncherConstants.VMINSTALL);
-		}
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java
deleted file mode 100644
index fd7c350..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Code 9 Corporation - ongoing enhancements
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.sourcelookup.*;
-import org.eclipse.debug.core.sourcelookup.containers.*;
-import org.eclipse.debug.ui.sourcelookup.WorkingSetSourceContainer;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.debug.core.*;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.sourcelookup.containers.JavaSourceLookupParticipant;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.PDEClasspathContainer;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-
-public class PDESourceLookupDirector extends AbstractSourceLookupDirector {
-
-	/**
-	 * Cache of source containers by location and id (String & String)
-	 */
-	private Map fSourceContainerMap = new HashMap();
-
-	private static Set fFilteredTypes;
-
-	static {
-		fFilteredTypes = new HashSet(3);
-		fFilteredTypes.add(ProjectSourceContainer.TYPE_ID);
-		fFilteredTypes.add(WorkspaceSourceContainer.TYPE_ID);
-		fFilteredTypes.add(WorkingSetSourceContainer.TYPE_ID);
-	}
-
-	/**
-	 * Lazily initialized.
-	 */
-	private double fOSGiRuntimeVersion = Double.MIN_VALUE;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#initializeParticipants()
-	 */
-	public void initializeParticipants() {
-		addParticipants(new ISourceLookupParticipant[] {new JavaSourceLookupParticipant()});
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.internal.core.sourcelookup.ISourceLookupDirector#supportsSourceContainerType(org.eclipse.debug.internal.core.sourcelookup.ISourceContainerType)
-	 */
-	public boolean supportsSourceContainerType(ISourceContainerType type) {
-		return !fFilteredTypes.contains(type.getId());
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#getSourceElement(java.lang.Object)
-	 */
-	public Object getSourceElement(Object element) {
-		PDESourceLookupQuery query = new PDESourceLookupQuery(this, element);
-		SafeRunner.run(query);
-		Object result = query.getResult();
-		return result != null ? result : super.getSourceElement(element);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#findSourceElements(java.lang.Object)
-	 */
-	public Object[] findSourceElements(Object object) throws CoreException {
-		Object[] sourceElements = null;
-		if (object instanceof IJavaStackFrame || object instanceof IJavaObject || object instanceof IJavaReferenceType) {
-			sourceElements = new Object[] {getSourceElement(object)};
-		}
-		if (sourceElements == null) {
-			sourceElements = super.findSourceElements(object);
-		}
-		return sourceElements;
-	}
-
-	ISourceContainer[] getSourceContainers(String location, String id) throws CoreException {
-
-		ISourceContainer[] containers = (ISourceContainer[]) fSourceContainerMap.get(location);
-		if (containers != null) {
-			return containers;
-		}
-
-		ArrayList result = new ArrayList();
-		ModelEntry entry = PluginRegistry.findEntry(id);
-
-		boolean match = false;
-
-		IPluginModelBase[] models = entry.getWorkspaceModels();
-		for (int i = 0; i < models.length; i++) {
-			if (isPerfectMatch(models[i], new Path(location))) {
-				IResource resource = models[i].getUnderlyingResource();
-				// if the plug-in matches a workspace model,
-				// add the project and any libraries not coming via a container
-				// to the list of source containers, in that order
-				if (resource != null) {
-					addProjectSourceContainers(resource.getProject(), result);
-				}
-				match = true;
-				break;
-			}
-		}
-
-		if (!match) {
-			File file = new File(location);
-			if (file.isFile()) {
-				// in case of linked plug-in projects that map to an external JARd plug-in,
-				// use source container that maps to the library in the linked project.
-				ISourceContainer container = getArchiveSourceContainer(location);
-				if (container != null) {
-					containers = new ISourceContainer[] {container};
-					fSourceContainerMap.put(location, containers);
-					return containers;
-				}
-			}
-
-			models = entry.getExternalModels();
-			for (int i = 0; i < models.length; i++) {
-				if (isPerfectMatch(models[i], new Path(location))) {
-					// try all source zips found in the source code locations
-					IClasspathEntry[] entries = PDEClasspathContainer.getExternalEntries(models[i]);
-					for (int j = 0; j < entries.length; j++) {
-						IRuntimeClasspathEntry rte = convertClasspathEntry(entries[j]);
-						if (rte != null)
-							result.add(rte);
-					}
-					break;
-				}
-			}
-		}
-
-		IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[]) result.toArray(new IRuntimeClasspathEntry[result.size()]);
-		containers = JavaRuntime.getSourceContainers(entries);
-		fSourceContainerMap.put(location, containers);
-		return containers;
-	}
-
-	private boolean isPerfectMatch(IPluginModelBase model, IPath path) {
-		return model == null ? false : path.equals(new Path(model.getInstallLocation()));
-	}
-
-	private IRuntimeClasspathEntry convertClasspathEntry(IClasspathEntry entry) {
-		if (entry == null)
-			return null;
-
-		IPath srcPath = entry.getSourceAttachmentPath();
-		if (srcPath != null && srcPath.segmentCount() > 0) {
-			IRuntimeClasspathEntry rte = JavaRuntime.newArchiveRuntimeClasspathEntry(entry.getPath());
-			rte.setSourceAttachmentPath(srcPath);
-			rte.setSourceAttachmentRootPath(entry.getSourceAttachmentRootPath());
-			return rte;
-		}
-		return null;
-	}
-
-	private ISourceContainer getArchiveSourceContainer(String location) throws JavaModelException {
-		IWorkspaceRoot root = PDEPlugin.getWorkspace().getRoot();
-		IFile[] containers = root.findFilesForLocationURI(URIUtil.toURI(location));
-		for (int i = 0; i < containers.length; i++) {
-			IJavaElement element = JavaCore.create(containers[i]);
-			if (element instanceof IPackageFragmentRoot) {
-				IPackageFragmentRoot archive = (IPackageFragmentRoot) element;
-				IPath path = archive.getSourceAttachmentPath();
-				if (path == null || path.segmentCount() == 0)
-					continue;
-
-				IPath rootPath = archive.getSourceAttachmentRootPath();
-				boolean detectRootPath = rootPath != null && rootPath.segmentCount() > 0;
-
-				IFile archiveFile = root.getFile(path);
-				if (archiveFile.exists())
-					return new ArchiveSourceContainer(archiveFile, detectRootPath);
-
-				File file = path.toFile();
-				if (file.exists())
-					return new ExternalArchiveSourceContainer(file.getAbsolutePath(), detectRootPath);
-			}
-		}
-		return null;
-	}
-
-	private void addProjectSourceContainers(IProject project, ArrayList result) throws CoreException {
-		if (project == null || !project.hasNature(JavaCore.NATURE_ID))
-			return;
-
-		IJavaProject jProject = JavaCore.create(project);
-		result.add(JavaRuntime.newProjectRuntimeClasspathEntry(jProject));
-
-		IClasspathEntry[] entries = jProject.getRawClasspath();
-		for (int i = 0; i < entries.length; i++) {
-			IClasspathEntry entry = entries[i];
-			if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
-				IRuntimeClasspathEntry rte = convertClasspathEntry(entry);
-				if (rte != null)
-					result.add(rte);
-			}
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#dispose()
-	 */
-	public synchronized void dispose() {
-		Iterator iterator = fSourceContainerMap.values().iterator();
-		while (iterator.hasNext()) {
-			ISourceContainer[] containers = (ISourceContainer[]) iterator.next();
-			for (int i = 0; i < containers.length; i++) {
-				containers[i].dispose();
-			}
-		}
-		fSourceContainerMap.clear();
-		super.dispose();
-	}
-
-	/**
-	 * Returns the version of the OSGi runtime being debugged, based on the target platform.
-	 * Cached per source lookup director.
-	 * 
-	 * @return OSGi runtime version
-	 */
-	double getOSGiRuntimeVersion() {
-		if (fOSGiRuntimeVersion == Double.MIN_VALUE) {
-			fOSGiRuntimeVersion = TargetPlatformHelper.getTargetVersion();
-		}
-		return fOSGiRuntimeVersion;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java
deleted file mode 100644
index 50a12cf..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.io.File;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.debug.core.DebugException;
-import org.eclipse.debug.core.model.IValue;
-import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.jdt.debug.core.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.service.resolver.State;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
-
-public class PDESourceLookupQuery implements ISafeRunnable {
-
-	protected static String OSGI_CLASSLOADER = "org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader"; //$NON-NLS-1$
-	private static String LEGACY_ECLIPSE_CLASSLOADER = "org.eclipse.core.runtime.adaptor.EclipseClassLoader"; //$NON-NLS-1$
-	private static String MAIN_CLASS = "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
-	private static String MAIN_PLUGIN = "org.eclipse.platform"; //$NON-NLS-1$
-
-	private Object fElement;
-	private Object fResult;
-	private PDESourceLookupDirector fDirector;
-
-	public PDESourceLookupQuery(PDESourceLookupDirector director, Object object) {
-		fElement = object;
-		fDirector = director;
-	}
-
-	public void handleException(Throwable exception) {
-	}
-
-	public void run() throws Exception {
-		IJavaObject classLoaderObject = null;
-		String declaringTypeName = null;
-		String sourcePath = null;
-		if (fElement instanceof IJavaStackFrame) {
-			IJavaStackFrame stackFrame = (IJavaStackFrame) fElement;
-			classLoaderObject = stackFrame.getReferenceType().getClassLoaderObject();
-			declaringTypeName = stackFrame.getDeclaringTypeName();
-			sourcePath = generateSourceName(declaringTypeName);
-		} else if (fElement instanceof IJavaObject) {
-			IJavaObject object = (IJavaObject) fElement;
-			IJavaReferenceType type = (IJavaReferenceType) object.getJavaType();
-			if (type != null) {
-				classLoaderObject = type.getClassLoaderObject();
-				if (object.getJavaType() != null) {
-					declaringTypeName = object.getJavaType().getName();
-				}
-				if (declaringTypeName != null) {
-					sourcePath = generateSourceName(declaringTypeName);
-				}
-			}
-		} else if (fElement instanceof IJavaReferenceType) {
-			IJavaReferenceType type = (IJavaReferenceType) fElement;
-			classLoaderObject = type.getClassLoaderObject();
-			declaringTypeName = type.getName();
-			sourcePath = generateSourceName(declaringTypeName);
-		}
-
-		if (classLoaderObject != null) {
-			IJavaClassType type = (IJavaClassType) classLoaderObject.getJavaType();
-			if (OSGI_CLASSLOADER.equals(type.getName())) {
-				if (fDirector.getOSGiRuntimeVersion() < 3.5) {
-					fResult = findSourceElement34(classLoaderObject, sourcePath);
-				} else {
-					fResult = findSourceElement(classLoaderObject, sourcePath);
-				}
-			} else if (LEGACY_ECLIPSE_CLASSLOADER.equals(type.getName())) {
-				fResult = findSourceElement_legacy(classLoaderObject, sourcePath);
-			} else if (MAIN_CLASS.equals(declaringTypeName)) {
-				IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(MAIN_PLUGIN);
-				if (model != null)
-					fResult = getSourceElement(model.getInstallLocation(), MAIN_PLUGIN, sourcePath);
-			}
-		}
-	}
-
-	protected Object getResult() {
-		return fResult;
-	}
-
-	private String getValue(IJavaObject object, String variable) throws DebugException {
-		IJavaFieldVariable var = object.getField(variable, false);
-		return var == null ? null : var.getValue().getValueString();
-	}
-
-	/**
-	 * Finds a source element in a 3.4 OSGi runtime.
-	 * 
-	 * @param object Bundle class loader object
-	 * @param typeName fully qualified name of the source type being searched for
-	 * @return source element
-	 * @throws CoreException
-	 */
-	protected Object findSourceElement34(IJavaObject object, String typeName) throws CoreException {
-		IJavaObject manager = getObject(object, "manager", false); //$NON-NLS-1$
-		if (manager != null) {
-			IJavaObject data = getObject(manager, "data", false); //$NON-NLS-1$
-			if (data != null) {
-				String location = getValue(data, "fileName"); //$NON-NLS-1$
-				String id = getValue(data, "symbolicName"); //$NON-NLS-1$
-				return getSourceElement(location, id, typeName);
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * Finds source in a 3.5 runtime. In 3.5, the OSGi runtime provides hooks to properly
-     * lookup source in fragments that replace/prepend jars in their host.
-	 * 
-	 * @param object Bundle class loader object
-	 * @param typeName fully qualified name of the source type being searched for 
-	 * @return source element
-	 * @throws CoreException
-	 */
-	protected Object findSourceElement(IJavaObject object, String typeName) throws CoreException {
-		IJavaObject manager = getObject(object, "manager", false); //$NON-NLS-1$
-		if (manager != null) {
-			IJavaObject data = getObject(manager, "data", false); //$NON-NLS-1$
-			if (data != null) {
-				String id = getValue(data, "symbolicName"); //$NON-NLS-1$
-				// search manager's class path for location
-				Object result = searchClasspathEntries(manager, id, typeName);
-				if (result != null) {
-					return result;
-				}
-				// then check its fragments
-				IJavaObject frgArray = getObject(manager, "fragments", false); //$NON-NLS-1$
-				if (frgArray instanceof IJavaArray) {
-					IJavaArray fragments = (IJavaArray) frgArray;
-					for (int i = 0; i < fragments.getLength(); i++) {
-						IJavaObject fragment = (IJavaObject) fragments.getValue(i);
-						if (!fragment.isNull()) {
-							// search fragment class path
-							result = searchClasspathEntries(fragment, id, typeName);
-							if (result != null) {
-								return result;
-							}
-						}
-
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	private Object searchClasspathEntries(IJavaObject entriesOwner, String id, String typeName) throws CoreException {
-		IJavaObject cpeArray = getObject(entriesOwner, "entries", false); //$NON-NLS-1$
-		if (cpeArray instanceof IJavaArray) {
-			IJavaArray entries = (IJavaArray) cpeArray;
-			for (int i = 0; i < entries.getLength(); i++) {
-				IJavaObject entry = (IJavaObject) entries.getValue(i);
-				if (!entry.isNull()) {
-					IJavaObject baseData = getObject(entry, "data", false); //$NON-NLS-1$
-					if (baseData != null && !baseData.isNull()) {
-						IJavaObject fileName = getObject(baseData, "fileName", false); //$NON-NLS-1$
-						if (fileName != null && !fileName.isNull()) {
-							String location = fileName.getValueString();
-							Object el = getSourceElement(location, id, typeName);
-							if (el != null) {
-								return el;
-							}
-						}
-					}
-				}
-			}
-		}
-		return null;
-	}
-
-	private IJavaObject getObject(IJavaObject object, String field, boolean superfield) throws DebugException {
-		IJavaFieldVariable variable = object.getField(field, superfield);
-		if (variable != null) {
-			IValue value = variable.getValue();
-			if (value instanceof IJavaObject)
-				return (IJavaObject) value;
-		}
-		return null;
-	}
-
-	private Object findSourceElement_legacy(IJavaObject object, String typeName) throws CoreException {
-		IJavaObject hostdata = getObject(object, "hostdata", true); //$NON-NLS-1$
-		if (hostdata != null) {
-			String location = getValue(hostdata, "fileName"); //$NON-NLS-1$
-			String id = getValue(hostdata, "symbolicName"); //$NON-NLS-1$
-			return getSourceElement(location, id, typeName);
-		}
-		return null;
-	}
-
-	private Object getSourceElement(String location, String id, String typeName) throws CoreException {
-		if (location != null && id != null) {
-			Object result = findSourceElement(getSourceContainers(location, id), typeName);
-			if (result != null)
-				return result;
-
-			// don't give up yet, search fragments attached to this host
-			State state = TargetPlatformHelper.getState();
-			BundleDescription desc = state.getBundle(id, null);
-			if (desc != null) {
-				BundleDescription[] fragments = desc.getFragments();
-				for (int i = 0; i < fragments.length; i++) {
-					location = fragments[i].getLocation();
-					id = fragments[i].getSymbolicName();
-					result = findSourceElement(getSourceContainers(location, id), typeName);
-					if (result != null)
-						return result;
-				}
-			}
-		}
-		return null;
-	}
-
-	private Object findSourceElement(ISourceContainer[] containers, String typeName) throws CoreException {
-		for (int i = 0; i < containers.length; i++) {
-			Object[] result = containers[i].findSourceElements(typeName);
-			if (result.length > 0)
-				return result[0];
-		}
-		return null;
-	}
-
-	protected ISourceContainer[] getSourceContainers(String location, String id) throws CoreException {
-		return fDirector.getSourceContainers(location, id);
-	}
-
-	/**
-	 * Generates and returns a source file path based on a qualified type name.
-	 * For example, when <code>java.lang.String</code> is provided,
-	 * the returned source name is <code>java/lang/String.java</code>.
-	 * 
-	 * @param qualifiedTypeName fully qualified type name that may contain inner types
-	 *  denoted with <code>$</code> character
-	 * @return a source file path corresponding to the type name
-	 */
-	private static String generateSourceName(String qualifiedTypeName) {
-		int index = qualifiedTypeName.indexOf('$');
-		if (index >= 0)
-			qualifiedTypeName = qualifiedTypeName.substring(0, index);
-		return qualifiedTypeName.replace('.', File.separatorChar) + ".java"; //$NON-NLS-1$
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginBlock.java
index 5051a35..65682b0 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,10 +16,12 @@ import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.util.IdUtil;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.ui.launcher.*;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.launching.launcher.*;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
 
 public class PluginBlock extends AbstractPluginBlock {
 
@@ -61,6 +63,11 @@ public class PluginBlock extends AbstractPluginBlock {
 			initWorkspacePluginsState(config);
 			initExternalPluginsState(config);
 			handleFilterButton(); // Once the page is initialized, apply any filtering
+
+			// If the workspace plug-in state has changed (project closed, etc.) the launch config needs to be updated without making the tab dirty
+			if (fLaunchConfig.isWorkingCopy()) {
+				savePluginState((ILaunchConfigurationWorkingCopy) fLaunchConfig);
+			}
 		}
 
 		enableViewer(enableTable);
@@ -78,8 +85,8 @@ public class PluginBlock extends AbstractPluginBlock {
 		if (fLaunchConfig != null) {
 			fInitDefaultCheckState = enable && !fLaunchConfig.hasAttribute(IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS) && !fLaunchConfig.hasAttribute(IPDELauncherConstants.SELECTED_TARGET_PLUGINS);
 			fTab.updateLaunchConfigurationDialog();
+			initializeFrom(fLaunchConfig, enable);
 		}
-		initializeFrom(fLaunchConfig, enable);
 	}
 
 	/*
@@ -192,71 +199,27 @@ public class PluginBlock extends AbstractPluginBlock {
 		}
 	}
 
-	protected void computeSubset() {
-		validateExtensions();
-		super.computeSubset();
-	}
-
-	private void validateExtensions() {
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.internal.ui.launcher.AbstractPluginBlock#addRequiredPlugins()
+	 */
+	protected void addRequiredPlugins() {
+		// Check that the application or product we are launching has its requirements included
 		try {
-			if (fLaunchConfig.getAttribute(IPDELauncherConstants.USE_PRODUCT, true)) {
-				String product = fLaunchConfig.getAttribute(IPDELauncherConstants.PRODUCT, (String) null);
-				if (product != null) {
-					validateLaunchId(product);
-					String application = getApplication(product);
-					if (application != null)
-						validateLaunchId(application);
-				}
-			} else {
-				String configType = fLaunchConfig.getType().getIdentifier();
-				String attribute = configType.equals(EclipseLaunchShortcut.CONFIGURATION_TYPE) ? IPDELauncherConstants.APPLICATION : IPDELauncherConstants.APP_TO_TEST;
-				String application = fLaunchConfig.getAttribute(attribute, TargetPlatform.getDefaultApplication());
-				if (!IPDEUIConstants.CORE_TEST_APPLICATION.equals(application))
-					validateLaunchId(application);
-			}
-		} catch (CoreException e) {
-		}
-	}
-
-	private void validateLaunchId(String launchId) {
-		if (launchId != null) {
-			int index = launchId.lastIndexOf('.');
-			if (index > 0) {
-				String pluginId = launchId.substring(0, index);
+			String[] requiredIds = RequirementHelper.getApplicationRequirements(fLaunchConfig);
+			for (int i = 0; i < requiredIds.length; i++) {
 				// see if launcher plugin is already included
-				IPluginModelBase base = findPlugin(pluginId);
+				IPluginModelBase base = findPlugin(requiredIds[i]);
 				if (base == null) {
-					base = PluginRegistry.findModel(pluginId);
+					base = PluginRegistry.findModel(requiredIds[i]);
 					if (base != null) {
 						fPluginTreeViewer.setChecked(base, true);
 					}
 				}
 			}
+		} catch (CoreException e) {
+			PDEPlugin.log(e);
 		}
-	}
-
-	private String getApplication(String product) {
-		String bundleID = product.substring(0, product.lastIndexOf('.'));
-		IPluginModelBase model = findPlugin(bundleID);
-
-		if (model != null) {
-			IPluginExtension[] extensions = model.getPluginBase().getExtensions();
-			for (int i = 0; i < extensions.length; i++) {
-				IPluginExtension ext = extensions[i];
-				String point = ext.getPoint();
-				if ("org.eclipse.core.runtime.products".equals(point) //$NON-NLS-1$
-						&& product.equals(IdUtil.getFullId(ext))) {
-					if (ext.getChildCount() == 1) {
-						IPluginElement prod = (IPluginElement) ext.getChildren()[0];
-						if (prod.getName().equals("product")) { //$NON-NLS-1$
-							IPluginAttribute attr = prod.getAttribute("application"); //$NON-NLS-1$
-							return attr != null ? attr.getValue() : null;
-						}
-					}
-				}
-			}
-		}
-		return null;
+		super.addRequiredPlugins();
 	}
 
 	protected LaunchValidationOperation createValidationOperation() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginStatusDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginStatusDialog.java
index 597c4c7..cbec5f4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginStatusDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginStatusDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,6 +22,11 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.PlatformUI;
 
+/**
+ * Dialog that opens when plug-in validation fails during launching.  Displays
+ * a list of problems discovered.  Allows the user to continue the launch or 
+ * cancel if @link {@link #showCancelButton(boolean)} is set to true.
+ */
 public class PluginStatusDialog extends TrayDialog {
 
 	class ContentProvider extends DefaultContentProvider implements ITreeContentProvider {
@@ -73,8 +78,9 @@ public class PluginStatusDialog extends TrayDialog {
 	 */
 	protected void createButtonsForButtonBar(Composite parent) {
 		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
-		if (fShowCancelButton)
-			createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
+		if (fShowCancelButton) {
+			createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
+		}
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginValidationStatusHandler.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginValidationStatusHandler.java
new file mode 100644
index 0000000..25eba45
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PluginValidationStatusHandler.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009 eXXcellent solutions gmbh, EclipseSource Corporation
+ * and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Achim Demelt, eXXcellent solutions gmbh - initial API and implementation
+ *     EclipseSource - initial API and implementation, ongoing enhancements
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.IStatusHandler;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.*;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.elements.NamedElement;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class PluginValidationStatusHandler implements IStatusHandler {
+	public Object handleStatus(IStatus status, Object source) throws CoreException {
+		if (status.getCode() == EclipsePluginValidationOperation.CREATE_EXTENSION_ERROR_CODE)
+			return createExtensionError((String) source);
+		else if (status.getCode() == LaunchPluginValidator.DISPLAY_VALIDATION_ERROR_CODE)
+			displayValidationError((LaunchValidationOperation) source);
+		return null;
+	}
+
+	private Object createExtensionError(String bundleID) {
+		String name = NLS.bind(PDEMessages.EclipsePluginValidationOperation_pluginMissing, bundleID);
+		PDELabelProvider provider = PDEPlugin.getDefault().getLabelProvider();
+		Image image = provider.get(PDEPluginImages.DESC_PLUGIN_OBJ);
+		return new NamedElement(name, image);
+	}
+
+	private void displayValidationError(final LaunchValidationOperation op) throws CoreException {
+		final int[] result = new int[1];
+		final Display display = LauncherUtilsStatusHandler.getDisplay();
+		display.syncExec(new Runnable() {
+			public void run() {
+				PluginStatusDialog dialog = new PluginStatusDialog(display.getActiveShell());
+				dialog.showCancelButton(true);
+				dialog.setInput(op.getInput());
+				result[0] = dialog.open();
+			}
+		});
+		if (result[0] == IDialogConstants.CANCEL_ID)
+			throw new CoreException(Status.CANCEL_STATUS);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProductValidationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProductValidationOperation.java
deleted file mode 100644
index a0632cb..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProductValidationOperation.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     EclipseSource Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-
-public class ProductValidationOperation extends LaunchValidationOperation {
-
-	private IPluginModelBase[] fModels;
-
-	public ProductValidationOperation(IPluginModelBase[] models) {
-		super(null);
-		fModels = models;
-	}
-
-	protected IPluginModelBase[] getModels() throws CoreException {
-		return fModels;
-	}
-
-	protected IExecutionEnvironment[] getMatchingEnvironments() throws CoreException {
-		IVMInstall install = JavaRuntime.getDefaultVMInstall();
-
-		IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
-		IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
-		List result = new ArrayList(envs.length);
-		for (int i = 0; i < envs.length; i++) {
-			IExecutionEnvironment env = envs[i];
-			IVMInstall[] compatible = env.getCompatibleVMs();
-			for (int j = 0; j < compatible.length; j++) {
-				if (compatible[j].equals(install)) {
-					result.add(env);
-					break;
-				}
-			}
-		}
-		return (IExecutionEnvironment[]) result.toArray(new IExecutionEnvironment[result.size()]);
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProgramBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProgramBlock.java
index eefbc99..afc7b66 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProgramBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/ProgramBlock.java
@@ -20,8 +20,8 @@ import org.eclipse.jface.fieldassist.*;
 import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.SWTFactory;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridData;
@@ -48,7 +48,7 @@ public class ProgramBlock {
 				updateProductDecorator();
 			}
 
-			fTab.updateLaunchConfigurationDialog();
+			fTab.scheduleUpdateJob();
 		}
 
 		public void modifyText(ModifyEvent e) {
@@ -78,7 +78,6 @@ public class ProgramBlock {
 			else
 				fProductComboDecoration.show();
 
-			fTab.updateLaunchConfigurationDialog();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/SoftwareInstallBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/SoftwareInstallBlock.java
new file mode 100644
index 0000000..8510db6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/SoftwareInstallBlock.java
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.launcher;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.SWTFactory;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
+import org.eclipse.pde.ui.launcher.ConfigurationTab;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Block on the {@link ConfigurationTab} that allows the user to choose 
+ * between generating a p2 metadata profile for the launch or simply
+ * reusing the profile from the host.
+ * 
+ * @since 3.6
+ */
+public class SoftwareInstallBlock {
+
+	private Button fGenerateProfileButton;
+	private AbstractLauncherTab fTab;
+
+	/**
+	 * Constructor
+	 * @param tab the tab that this block is added to, used to apply changes
+	 */
+	public SoftwareInstallBlock(AbstractLauncherTab tab) {
+		fTab = tab;
+	}
+
+	/**
+	 * Create the UI elements for this block
+	 * @param parent parent composite
+	 */
+	public void createControl(Composite parent) {
+		Group group = SWTFactory.createGroup(parent, PDEUIMessages.ProfileBlock_0, 1, 1, GridData.FILL_HORIZONTAL);
+		fGenerateProfileButton = SWTFactory.createCheckButton(group, PDEUIMessages.ProfileBlock_1, null, false, 1);
+		fGenerateProfileButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fTab.updateLaunchConfigurationDialog();
+			}
+		});
+	}
+
+	/**
+	 * Sets up any default configuration attributes.
+	 * @param configuration configuration to modify
+	 */
+	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+		// No defaults required
+	}
+
+	/**
+	 * Initializes the state of UI components from the configuration attributes
+	 * @param configuration the configuration to get attributes from
+	 * @throws CoreException if an error occurs getting an attribute
+	 */
+	public void initializeFrom(ILaunchConfiguration configuration) throws CoreException {
+		fGenerateProfileButton.setSelection(configuration.getAttribute(IPDELauncherConstants.GENERATE_PROFILE, false));
+	}
+
+	/**
+	 * Sets attributes on the configuration based on the current state of the UI elements
+	 * @param configuration configuration to modify
+	 */
+	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+		if (fGenerateProfileButton.getSelection()) {
+			configuration.setAttribute(IPDELauncherConstants.GENERATE_PROFILE, true);
+		} else {
+			configuration.removeAttribute(IPDELauncherConstants.GENERATE_PROFILE);
+		}
+	}
+
+	/**
+	 * @return a string error message or <code>null</code> if the block contents are valid
+	 */
+	public String validate() {
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
index 6e0b2ec..ccde3bd 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingBlock.java
@@ -12,6 +12,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import java.util.*;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -25,7 +27,8 @@ import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.util.SWTUtil;
 import org.eclipse.pde.internal.ui.wizards.ListUtil;
-import org.eclipse.pde.ui.launcher.*;
+import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
+import org.eclipse.pde.ui.launcher.TracingTab;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
 import org.eclipse.swt.events.SelectionAdapter;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
index 3f503c6..b2c846c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/TracingPropertySource.java
@@ -55,7 +55,7 @@ public class TracingPropertySource {
 		protected void valueModified(Object value) {
 			fValues.put(getKey(), value);
 			fModified = true;
-			fBlock.getTab().updateLaunchConfigurationDialog();
+			fBlock.getTab().scheduleUpdateJob();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/VMHelper.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/VMHelper.java
deleted file mode 100644
index 594cde8..0000000
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/VMHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Les Jones <lesojones at gmail.com> - Bug 195433
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.launcher;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.launching.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.util.VMUtil;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
-
-public class VMHelper {
-
-	/**
-	 * Get the default VMInstall name using the available info in the config,
-	 * using the JavaProject if available.
-	 * 
-	 * @param configuration
-	 *            Launch configuration to check
-	 * @return name of the VMInstall
-	 * @throws CoreException
-	 *             thrown if there's a problem getting the VM name
-	 */
-	public static String getDefaultVMInstallName(ILaunchConfiguration configuration) throws CoreException {
-		IJavaProject javaProject = JavaRuntime.getJavaProject(configuration);
-		IVMInstall vmInstall = null;
-		if (javaProject != null) {
-			vmInstall = JavaRuntime.getVMInstall(javaProject);
-		}
-
-		if (vmInstall != null) {
-			return vmInstall.getName();
-		}
-
-		return VMUtil.getDefaultVMInstallName();
-	}
-
-	public static IVMInstall getVMInstall(ILaunchConfiguration configuration) throws CoreException {
-		String jre = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, (String) null);
-		IVMInstall vm = null;
-		if (jre == null) {
-			String name = configuration.getAttribute(IPDELauncherConstants.VMINSTALL, (String) null);
-			if (name == null) {
-				name = getDefaultVMInstallName(configuration);
-			}
-			vm = getVMInstall(name);
-			if (vm == null) {
-				throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_noJRE, name)));
-			}
-		} else {
-			IPath jrePath = Path.fromPortableString(jre);
-			vm = JavaRuntime.getVMInstall(jrePath);
-			if (vm == null) {
-				String id = JavaRuntime.getExecutionEnvironmentId(jrePath);
-				if (id == null) {
-					String name = JavaRuntime.getVMInstallName(jrePath);
-					throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_noJRE, name)));
-				}
-				throw new CoreException(LauncherUtils.createErrorStatus(NLS.bind(PDEUIMessages.VMHelper_cannotFindExecEnv, id)));
-			}
-		}
-		return vm;
-	}
-
-	public static IVMInstall getVMInstall(String name) {
-		if (name != null) {
-			IVMInstall[] installs = VMUtil.getAllVMInstances();
-			for (int i = 0; i < installs.length; i++) {
-				if (installs[i].getName().equals(name))
-					return installs[i];
-			}
-		}
-		return JavaRuntime.getDefaultVMInstall();
-	}
-
-	public static IVMInstall createLauncher(ILaunchConfiguration configuration) throws CoreException {
-		IVMInstall launcher = getVMInstall(configuration);
-		if (!launcher.getInstallLocation().exists())
-			throw new CoreException(LauncherUtils.createErrorStatus(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_jrePathNotFound));
-		return launcher;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java
index 72416e7..fd85003 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/WorkspaceDataBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,13 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.ui.launcher.AbstractLauncherTab;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -96,7 +98,7 @@ public class WorkspaceDataBlock extends BaseBlock {
 		config.setAttribute(IPDELauncherConstants.LOCATION, getLocation());
 		config.setAttribute(IPDELauncherConstants.DOCLEAR, fClearWorkspaceCheck.getSelection());
 		config.setAttribute(IPDELauncherConstants.ASKCLEAR, fAskClearCheck.getSelection());
-		config.setAttribute(IPDEUIConstants.DOCLEARLOG, fClearWorkspaceLogRadio.getSelection());
+		config.setAttribute(IPDEConstants.DOCLEARLOG, fClearWorkspaceLogRadio.getSelection());
 	}
 
 	public void initializeFrom(ILaunchConfiguration configuration) throws CoreException {
@@ -105,9 +107,9 @@ public class WorkspaceDataBlock extends BaseBlock {
 		fAskClearCheck.setSelection(configuration.getAttribute(IPDELauncherConstants.ASKCLEAR, true));
 		fAskClearCheck.setEnabled(fClearWorkspaceCheck.getSelection());
 		fClearWorkspaceLogRadio.setEnabled(fClearWorkspaceCheck.getSelection());
-		fClearWorkspaceLogRadio.setSelection(configuration.getAttribute(IPDEUIConstants.DOCLEARLOG, false));
+		fClearWorkspaceLogRadio.setSelection(configuration.getAttribute(IPDEConstants.DOCLEARLOG, false));
 		fClearWorkspaceRadio.setEnabled(fClearWorkspaceCheck.getSelection());
-		fClearWorkspaceRadio.setSelection(!configuration.getAttribute(IPDEUIConstants.DOCLEARLOG, false));
+		fClearWorkspaceRadio.setSelection(!configuration.getAttribute(IPDEConstants.DOCLEARLOG, false));
 	}
 
 	public void setDefaults(ILaunchConfigurationWorkingCopy configuration, boolean isJUnit) {
@@ -118,7 +120,7 @@ public class WorkspaceDataBlock extends BaseBlock {
 		}
 		configuration.setAttribute(IPDELauncherConstants.DOCLEAR, isJUnit);
 		configuration.setAttribute(IPDELauncherConstants.ASKCLEAR, !isJUnit);
-		configuration.setAttribute(IPDEUIConstants.DOCLEARLOG, false);
+		configuration.setAttribute(IPDEConstants.DOCLEARLOG, false);
 	}
 
 	protected String getName() {
@@ -131,14 +133,10 @@ public class WorkspaceDataBlock extends BaseBlock {
 
 	protected void handleBrowseWorkspace() {
 		super.handleBrowseWorkspace();
-		if (fClearWorkspaceCheck.getSelection())
-			fClearWorkspaceCheck.setSelection(false);
 	}
 
 	protected void handleBrowseFileSystem() {
 		super.handleBrowseFileSystem();
-		if (fClearWorkspaceCheck.getSelection())
-			fClearWorkspaceCheck.setSelection(false);
 	}
 
 	public String validate() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
index 4020e1c..e5deb32 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ExternalizeStringsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,8 +28,10 @@ import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.core.build.IBuildModel;
 import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.util.ModelModification;
 import org.eclipse.pde.internal.ui.util.PDEModelUtility;
@@ -69,7 +71,7 @@ public class ExternalizeStringsOperation extends WorkspaceModifyOperation {
 					addBundleLocalization(change, monitor, pluginChange);
 
 				// Update build.properties file (if exists & not already done)
-				IFile buildProps = changeFile.getFile().getProject().getFile(PDEModelUtility.F_BUILD);
+				IFile buildProps = PDEProject.getBuildProperties(changeFile.getFile().getProject());
 				if (buildProps != null && buildProps.exists() && !fFileChanges.containsKey(buildProps)) {
 					getChangeForBuild(buildProps, monitor, pluginChange, change.getBundleLocalization());
 				}
@@ -132,9 +134,7 @@ public class ExternalizeStringsOperation extends WorkspaceModifyOperation {
 		change.setEdit(edit);
 		// mark a plugin.xml or a fragment.xml as PLUGIN2 type so they will be compared
 		// with the PluginContentMergeViewer
-		String textType = file.getName().equals("plugin.xml") || //$NON-NLS-1$
-				file.getName().equals("fragment.xml") ? //$NON-NLS-1$
-		"PLUGIN2" //$NON-NLS-1$
+		String textType = file.getName().equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || file.getName().equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) ? "PLUGIN2" //$NON-NLS-1$
 				: file.getFileExtension();
 		change.setTextType(textType);
 		parentChange.add(change);
@@ -166,7 +166,7 @@ public class ExternalizeStringsOperation extends WorkspaceModifyOperation {
 
 	private void addBundleLocalization(ModelChange change, IProgressMonitor mon, CompositeChange parent) {
 		IPluginModelBase base = change.getParentModel();
-		IFile manifest = base.getUnderlyingResource().getProject().getFile(PDEModelUtility.F_MANIFEST_FP);
+		IFile manifest = PDEProject.getManifest(base.getUnderlyingResource().getProject());
 		// if the edit for this manifest file is in the HashMap, then we must have added
 		// the localization already since it is checked first (this must be the second or subsequent
 		// change to the manifest for this plug-in)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChange.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChange.java
index 7f18b70..14fc4cc 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChange.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/ModelChange.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.nls;
@@ -15,11 +15,11 @@ import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Properties;
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.PDEManager;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public class ModelChange {
 
@@ -94,8 +94,7 @@ public class ModelChange {
 	}
 
 	public IFile getPropertiesFile() {
-		IProject project = fParent.getUnderlyingResource().getProject();
-		return project.getFile(getBundleLocalization() + LOCALIZATION_FILE_SUFFIX);
+		return PDEProject.getLocalizationFile(fParent.getUnderlyingResource().getProject());
 	}
 
 	public Properties getProperties() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
index 5ecdd98..a92f650 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/nls/NLSFragmentGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.wizard.IWizardContainer;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
 import org.eclipse.pde.internal.core.plugin.ExternalPluginModelBase;
 import org.eclipse.pde.internal.ui.PDEPlugin;
@@ -53,9 +54,6 @@ public class NLSFragmentGenerator {
 	private static final String PROPERTIES_EXTENSION = ".properties"; //$NON-NLS-1$
 	private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
 
-	private static final String PLUGIN_XML = "plugin.xml"; //$NON-NLS-1$
-	private static final String BUILD_PROPERTIES = "build.properties"; //$NON-NLS-1$
-
 	private static final String BIN = "/bin/"; //$NON-NLS-1$
 	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
 	private static final String BACKSLASH = "\\"; //$NON-NLS-1$
@@ -92,7 +90,7 @@ public class NLSFragmentGenerator {
 			add(new AbstractFilter(false) {
 				public boolean matches(Object object) {
 					String path = object.toString();
-					return path.indexOf(BIN) != -1 || path.endsWith(SLASH) || path.endsWith(PLUGIN_XML);
+					return path.indexOf(BIN) != -1 || path.endsWith(SLASH) || path.endsWith(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
 				}
 			});
 
@@ -110,7 +108,7 @@ public class NLSFragmentGenerator {
 			add(new AbstractFilter(false) {
 				public boolean matches(Object object) {
 					String path = object.toString();
-					return path.indexOf(BIN) != -1 || path.endsWith(BUILD_PROPERTIES);
+					return path.indexOf(BIN) != -1 || path.endsWith(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
 				}
 			});
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/FormEntry.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/FormEntry.java
index d430187..0808214 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/FormEntry.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/parts/FormEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Philipp Kursawe <phil.kursawe at gmail.com> - bug 272654
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.parts;
 
@@ -196,6 +197,7 @@ public class FormEntry {
 		});
 		fText.addFocusListener(new FocusAdapter() {
 			public void focusGained(FocusEvent e) {
+				fText.selectAll();
 				if (fListener != null)
 					fListener.focusGained(FormEntry.this);
 			}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
index 64e5018..a30ed64 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -54,6 +54,14 @@ WizardCheckboxTablePart_counter = {0} of {1} selected.
 ToggleLinkWithEditorAction_label = Lin&k with Editor
 ToggleLinkWithEditorAction_toolTip = Link with Editor
 ToggleLinkWithEditorAction_description = Link with active editorPDEMultiPageContentOutline.SortingAction.label = Sort
+PDECompilersConfigurationBlock_0=Missing 'output.<&library>' entry:
+PDECompilersConfigurationBlock_1=Problems with 's&ource.<library>' entry:
+PDECompilersConfigurationBlock_2=Problems with 'output.<libr&ary>' entry:
+PDECompilersConfigurationBlock_3=Proble&ms with 'bin.includes' entry:
+PDECompilersConfigurationBlock_4=Problems with 'src.inclu&des' entry:
+PDECompilersConfigurationBlock_5=Missing or incompatible &Java compliance properties:
+PDECompilersConfigurationBlock_6=Missing project specific Java compiler settings:
+PDECompilersConfigurationBlock_7=Missing or incorrect file encodings
 PDECompilersConfigurationBlock_general=General
 PDECompilersConfigurationBlock_versioning=Versioning
 PDECompilersConfigurationBlock_references=References
@@ -61,6 +69,7 @@ PDECompilersConfigurationBlock_setting_changed_project=Compiler settings have ch
 PDECompilersConfigurationBlock_settings_changed=Settings Changed
 PDECompilersConfigurationBlock_settings_changed_all=Compiler settings have changed. A full build is required for the changes to take effect.\n\nDo a full build now?
 PDECompilersConfigurationBlock_usage=Usage
+PDECompilersConfigurationBlock_build=Build
 PDEMultiPageContentOutline_SortingAction_label = Sort
 PDEMultiPageContentOutline_SortingAction_tooltip = Sort
 PDEMultiPageContentOutline_SortingAction_description = Sorts elements in the outline
@@ -95,6 +104,23 @@ BuildEditor_ClasspathSection_jarsTitle = JAR Selection
 BuildEditor_ClasspathSection_jarsDesc = Choose JAR archives to be added to the build path:
 
 ######## Feature Manifest Editor ####################
+FeatureBlock_AdditionalPluginsEntry=Additional {0}
+FeatureBlock_AddPluginsLabel=Add {0}&...
+FeatureBlock_AllFeatureSelected=All available features have been selected.
+FeatureBlock_RemovePluginsLabel=Rem&ove {0}
+FeatureBlock_addRequiredFeatues=Select Re&quired
+FeatureBlock_default=Default
+FeatureBlock_defaultPluginResolution=Default Plug-in Location:
+FeatureBlock_features=ID
+FeatureBlock_pluginResolution=Plug-in Location
+FeatureBlock_externalBefore=E&xternal
+FeatureBlock_ExternalResolutionLabel=External
+FeatureBlock_FeatureGroupDescription=The features selected below and all required plug-ins will be launched.
+FeatureBlock_SelectFeatures=Sele&ct Features...
+FeatureBlock_UseWorkspaceFeatures=Use features from works&pace if available
+FeatureBlock_version=Version
+FeatureBlock_workspaceBefore=Wor&kspace
+FeatureBlock_WorkspaceResolutionLabel=Workspace
 FeatureEditor_BuildAction_label = &Export...
 FeatureEditor_FeaturePage_title = Overview
 FeatureEditor_InfoPage_title = Information
@@ -317,11 +343,12 @@ ManifestSyntaxColorTab_values=Values
 ManifestStructureCreator_name=Manifest Structure Compare
 ManifestStructureCreator_errorMessage=An error occurred while creating the input structure.
 
+MainPreferencePage_addToJavaSearch=Include &all plug-ins from target in Java search
 MainPreferencePage_exportingGroup=Exporting
 MainPreferencePage_sourceGroup=Source
 MainPreferencePage_group2=Automated Management of Dependencies
 MainPreferencePage_promptBeforeOverwrite=Prompt &before overwriting build.xml files when exporting
-MainPreferencePage_promtBeforeRemove=Prompt before deleting a target &definition file
+MainPreferencePage_promtBeforeRemove=Prompt before deleting a &target definition file
 MainPreferencePage_showSourceBundles=Show &source plug-ins
 MainPreferencePage_updateStale=&Update stale manifest files prior to launching
 MainPreferencePage_targetDefinitionsGroup=Target Definitions
@@ -491,7 +518,7 @@ AdvancedFeatureExportPage_noSite=Site URL is not set
 AdvancedPluginExportPage_signJar=JA&R Signing
 AdvancedPluginExportPage_noAlias=Alias is not set
 AdvancedLauncherTab_subset = Add Re&quired {0}
-AdvancedLauncherTab_selectedBundles = Only s&how selected {0}
+AdvancedLauncherTab_selectedBundles = Only s&how selected
 AdvancedLauncherTab_addNew=&Add new workspace {0} to this launch configuration automatically
 AdvancedLauncherTab_defaults = Restore Defa&ults
 AddSingleon_dir_label=set the 'singleton' directive
@@ -511,8 +538,6 @@ AdvancedPluginExportPage_noPassword=Password is not set
 AddSourceBuildEntryResolution_label=Add a {0} entry.
 AdvancedFeatureExportPage_createJNLP=&Create JNLP manifests for the JAR archives
 AdvancedFeatureExportPage_jreVersion=&JRE version:
-AdvancedLauncherTab_error_featureSetup = The workspace is not set up properly for this option. Plug-ins must be in \
-'plugins' directory, and features in 'features' directory.
 AdvancedPluginExportPage_qualifier = &Qualifier replacement (default value is today's date):
 
 TracingLauncherTab_name = Trac&ing
@@ -548,19 +573,12 @@ ConfigurationSection_selection=File Selection
 ConfigurationTab_fileDialogMessage=Select a config.ini file:
 
 
-WorkbenchLauncherConfigurationDelegate_noJRE = Cannot locate JRE definition: "{0}". Launch aborted.
-WorkbenchLauncherConfigurationDelegate_jrePathNotFound = The installation path to the specified JRE could not be found.  Launch aborted.
-WorkbenchLauncherConfigurationDelegate_badFeatureSetup = When in feature mode, plug-ins must be in the 'plugins' directory and features in 'features' directory in the workspace.
-WorkbenchLauncherConfigurationDelegate_noStartup = Launching failed. Bootstrap code cannot be found.
 WorkbenchLauncherConfigurationDelegate_confirmDeleteWorkspace = Do you really want to clear the run-time workspace data in {0}?
-JUnitLaunchConfiguration_error_notaplugin = Could not launch the JUnit plug-in tests because project ''{0}'' is not a plug-in project.
-JUnitLaunchConfiguration_error_missingPlugin = Required plug-in ''{0}'' could not be found.
 
 Launcher_error_title=Launch Error
 LauncherSection_desc=Customize the executable that is used to launch the product.
 LauncherSection_ico=Use a single ICO file containing the 6 images:
 LauncherUtils_workspaceLocked=Workspace Cannot Be Locked
-LauncherUtils_cannotLaunchApplication=Could not launch the application because the associated workspace is currently in use by another Eclipse application.\n\n{0}
 LauncherUtils_clearLogFile=Do you really want to clear the log file?
 LauncherUtils_title=Launcher
 LauncherPage_title=Launching
@@ -568,7 +586,6 @@ LauncherSection_file=File:
 LauncherSection_icon=Icon:
 LauncherSection_tiny=Tiny:
 Launcher_error_code13=The application could not start.  Would you like to view the log?
-Launcher_error_code15=Could not launch the configuration because the associated workspace is currently in use.
 Launcher_error_displayInLogView=Yes, in the Error Log view
 LauncherUtils_generateConfigIni=The config.ini template file you specified does not exist.  Continue launching with a generated config.ini file?
 Launcher_error_displayInSystemEditor=Yes, in an editor
@@ -674,7 +691,7 @@ ContentPage_pGroup = Properties
 ContentPage_fGroup = Properties
 ContentPage_parentPluginGroup = Host Plug-in
 ContentSection_0=Content
-ContentSection_1=The following list of locations will be used to collect plug-ins for this target definition.
+ContentSection_1=The plug-ins selected below will be included in this target definition.
 ContentPage_pClassGroup = Options
 ContentPage_pid = &ID:
 ContentPage_pversion = &Version:
@@ -700,7 +717,6 @@ CommandDetails_id=Command ID:
 CommandDetails_clear=Clear
 CommandDetails_param={0} :
 ContentPage_badversion = Version must be in the format 'major.minor.micro'
-ContentPage_noname = Name is not set
 ContentPage_nopid = Plug-in ID is not set
 ContentPage_pluginNotFound = Plug-in with the specified id could not be found
 CommandDetails_execute=Execute command
@@ -717,7 +733,7 @@ CommandCopyFilter_noFilter=<No Filter>
 CommandCopyFilter_helpDesc=Copy the command for embedding in Help topics.
 CommandDetails_includeMarkup=Include Markup
 CommandDetails_markupTooltip=Include the proper document specific markup surrounding the command when copying to clipboard.
-CommandDetails_commandResult=Commad Result
+CommandDetails_commandResult=Command Result
 CommandDetails_copyToClipboard=Copy To Clipboard
 CommandDetails_paramValueMessage=[{0}] {1}
 CommandCopyFilter_noFilterDesc=Copy the command directly without any filtering.
@@ -797,6 +813,7 @@ BuildAction_ErrorDialog_Title = Validation Error
 BuildAction_ErrorDialog_Message = Build script cannot be generated because the file contains errors.
 BuildPluginAction_ErrorDialog_Title = Invalid Plug-in Project
 BuildPluginAction_ErrorDialog_Message = Build script cannot be generated because the project's plug-in manifest does not define an ID.
+BuildPluginAction_WarningCustomBuildExists=Custom build file already exists. If you want to generate a new build file, disable the 'custom' property in your build.properties file.
 
 NewFeatureWizard_wtitle = New Feature
 NewFeatureWizard_MainPage_desc = Define the name of the new feature project
@@ -861,7 +878,7 @@ VersionSyncWizard_usePluginsAtBuild = Synchronize versions on build (recommended
 VersionSyncWizard_synchronizing = Synchronizing versions...
 
 JavaAttributeWizard_wtitle = New Java Class
-JavaArgumentsTab_vmArgsGroup=V&M Arguments
+JavaArgumentsTab_vmArgsGroup=V&M arguments
 JavaArgumentsTab_vmVariables=Variables&...
 JavaArgumentsTab_description=The values below are used to initialize program and VM arguments on new PDE launch configurations.
 
@@ -923,6 +940,7 @@ BaseExportWizardPage_packageJARs=&Package plug-ins as individual JAR archives
 BaseExportWizard_wtitle=Export
 BaseExportWizardPage_fPackageJARs=&Package as individual JAR archives (required for JNLP and update sites)
 BaseFeatureSpecPage_patchGroup_title=Properties of feature being patched
+BaseImportWizardSecondPage_0=Some plug-ins are not available from a repository
 BaseImportWizardSecondPage_autobuild=Build projects after the import operation completes
 BaseFeatureSpecPage_featurePropertiesGroup_title = Feature properties
 BaseFeatureSpecPage_browse=Bro&wse...
@@ -952,6 +970,7 @@ NewExtensionWizard_PointSelectionPage_contributedTemplates_label= Available temp
 NewExtensionWizard_PointSelectionPage_extPointDescription = (Select an Extension Point to see its description)
 NewExtensionWizard_PointSelectionPage_templateDescription = Create a new extension from the {0} template.
 NewExtensionWizard_PointSelectionPage_pluginDescription = Create a new {0} extension.
+NewExtensionWizard_PointSelectionPage_pluginDescription_deprecated = The {0} extension point is deprecated
 
 ExtensionEditorWizard_wtitle = Edit Extension
 
@@ -1027,7 +1046,9 @@ TemplateSelectionPage_column_name = Name
 TemplateSelectionPage_column_point = Extension Point
 
 ImportActionGroup_binaryWithLinkedContent=Binary Project with &Linked Content
+ImportActionGroup_cannot_import=The selected plug-ins cannot be imported from a repository.
 ImportActionGroup_importContributingPlugin=&Import Contributing Plug-in as
+ImportActionGroup_Repository_project=P&roject from a Repository...
 
 ####
 
@@ -1035,8 +1056,8 @@ PluginSelectionDialog_title = Plug-in Selection
 PluginStructureCreator_name=Plug-in Structure Compare
 PluginSelectionDialog_message = &Select a Plug-in:
 PluginImportOperation_could_not_delete_project=Import operation could not delete the following project: {0}
-PluginImportOperation_executionEnvironment=Plug-in ''{0}'' requires an ''{1}'' execution environment that is not supported by any of the installed JREs. Import anyway?
 PluginImportOperation_Importing_plugin=Importing {0}
+PluginImportOperation_OverwritePluginProjects=Delete Plug-in Projects
 PluginImportOperation_Set_up_classpaths=Setting up the classpaths:
 PluginImportWizard_runningConfigDesc=An application is currently running. Some of the selected plug-ins may not be imported if they are locked by it. Do you want to continue?
 PluginImportWizard_runningConfigsDesc=Multiple applications are currently running. Some of the selected plug-ins may not be imported if they are locked by them. Do you want to continue?
@@ -1044,14 +1065,13 @@ PluginImportWizard_runningConfigsTitle=Running Applications
 PluginImportWizardFirstPage_0=Tar&get definition:
 PluginImportWizardFirstPage_1=Reading contents
 PluginImportWizardFirstPage_2=A target definition must be selected
+PluginImportWizardFirstPage_3=Projects from a &repository
 PluginContentPage_appQuestion=Would you like to create a rich client application?
 PluginContentPage_enable_api_analysis=Enable API Analy&sis
 PluginContentMergeViewer_title=Plug-in Source Compare
 PluginDevelopmentPage_equinox=&Show sections specific to the Equinox OSGi framework
 
 ImportWizard_title = Import Plug-ins and Fragments
-ImportWizard_messages_title = Plug-in Import
-ImportWizard_messages_exists = Project ''{0}'' already exists. Is it OK to replace it?
 ImportWizard_FirstPage_title = Import Plug-ins and Fragments
 ImportWizard_FirstPage_desc = Create projects from plug-ins and fragments in the file system.
 ImportWizard_FirstPage_importGroup = Plug-ins and Fragments to Import
@@ -1100,7 +1120,6 @@ ImportWizard_DetailedPage_filter = Filter Available Plug-ins and Fragments
 ImportWizard_DetailedPage_filterDesc=Show latest version of plug-ins only
 ImportWizard_DetailedPage_search = &ID (* = any string, ? = any character):
 
-ImportWizard_operation_creating = Creating projects from plug-ins
 ImportWizard_operation_multiProblem = Problems detected while importing plug-ins
 ImportWizard_operation_importingSource== Importing source...
 FeatureImportWizard_FirstPage_title = Import Features
@@ -1227,7 +1246,6 @@ SearchAction_references = Find Re&ferences
 SearchAction_Declaration = Find Declaratio&n
 ShowDescriptionAction_label = Sho&w Description
 ShowDescriptionAction_title=Extension Point Description
-ShowSampleAction_msgTitle=Samples
 DefinitionPage_0=Definition
 DefinitionPage_1=Target Definition
 DependencyExtent_singular = dependency
@@ -1336,7 +1354,7 @@ PluginsView_deferredLabel0=Plug-ins View
 PluginsView_description=Filter matched {0} of {1} plug-ins.
 PluginsView_showWorkspace=Show &workspace plug-ins
 PluginsView_textEditor=&Text Editor
-PluginsTab_featureMode=workspace features (simulated normal startup)
+PluginsTab_customFeatureMode=features selected below
 PluginWorkingSet_title=Plug-ins and Fragments Working Set
 PluginsView_systemEditor=&System Editor
 PluginsView_manifestEditor=&PDE Manifest Editor
@@ -1349,7 +1367,7 @@ PluginsView_schemaEditor=PDE &Schema Editor
 PluginsView_copy=&Copy
 PluginsView_dependentPlugins=&Required Plug-ins
 PluginsView_pluginsInJavaSearch=&Plug-ins in Java Search
-PluginsTabToolBar_auto_validate=Validate {0} automatically prior to &launching
+PluginsTabToolBar_auto_validate=Validate {0} automatically prior to launchin&g
 PluginsView_addToJavaSearch=&Add to Java Search
 PluginsView_removeFromJavaSearch=Remove &from Java Search
 PluginWorkingSet_setContent=Working set content:
@@ -1367,7 +1385,7 @@ PluginEditor_exportTooltip=Export deployable plug-ins and fragments
 PluginWorkingSet_noPluginsChecked=At least one plug-in must be checked
 PluginStatusDialog_pluginValidation=Validation
 PluginsView_openWith=Open &With
-PluginsView_import=&Import As
+PluginsView_import=I&mport As
 PluginsView_select=Se&lect
 PluginsView_showIn=Sho&w In
 PluginsTab_target=Target Platform
@@ -1434,14 +1452,14 @@ compilers_p_unresolved_ex_points= Un&resolved extension points:
 compilers_p_unknown_element= Ille&gal elements:
 compilers_p_unknown_attribute=&Illegal attributes:
 compilers_p_unknown_class= References to non-existent &classes:
-compilers_p_discouraged_class= References to &discouraged classes:
+compilers_p_discouraged_class= References to disco&uraged classes:
 compilers_p_unknown_resource= References to non-e&xistent resources:
-compilers_p_unknown_identifier= References to non-e&xistent identifier attributes:
+compilers_p_unknown_identifier= References to non-exis&tent identifier attributes:
 compilers_p_no_required_att=Re&quired attributes not defined:
-compilers_p_not_externalized_att = Usage of n&on-externalized strings:
+compilers_p_not_externalized_att = Usage of non-externali&zed strings:
 compilers_p_deprecated = Usage of deprecated attributes and &elements:
-compilers_p_internal = Usage of internal extension &points:
-compilers_p_exported_pkgs = Missing exported &packages: 
+compilers_p_internal = Usage o&f internal extension points:
+compilers_p_exported_pkgs = Missing exported pac&kages: 
 compilers_p_missing_exp_pkg = Missing versions on exported packages:
 compilers_p_missing_imp_pkg = Missing versions on imported packages:
 compilers_p_missing_require_bundle = Missing versions on required bundles:
@@ -1455,7 +1473,7 @@ compilers_f_unresolved_features = Un&resolved feature references:
 
 ContainerRenameParticipant_renameFolders=Rename folders referenced in plug-in manifest and build files
 ContainerRenameParticipant_renameBundleId=Rename Bundle-SymbolicName
-CompilersConfigurationTab_buildPropertiesErrors=Problems in &build.properties files:
+CompilersConfigurationTab_buildPropertiesErrors=Other problems with &build.properties files:
 ControlValidationUtility_errorMsgNotOnClasspath=The specified class is not on the plug-in classpath
 CompilersConfigurationBlock_building = Building Projects...
 CompilersConfigurationTab_incompatEnv=Incompatible en&vironment:
@@ -1546,6 +1564,23 @@ CategorySection_build = Build
 CategorySection_newCategoryName = new_category_{0}
 CategorySection_newCategoryLabel = New Category {0}
 
+######### Target Export Wizard ###################################33
+ExportTargetDefinition_task = Exporting current target definition...
+ExportTargetDeleteOldData = Deleting old data...
+ExportTargetExportFeatures = Exporting features...
+ExportTargetExportPlugins = Exporting plugins...
+ExportActiveTargetDefinition = Export Active Target Definition
+ExportActiveTargetDefinition_message = Please choose a destination directory to export all target content
+ExportTargetCurrentTarget = Active &Target: 
+ExportTargetChooseFolder = &Destination:
+ExportTargetBrowse = &Browse...
+ExportTargetSelectDestination = Select Destination
+ExportTargetSpecifyDestination = Specify the destination directory for the current target
+ExportTargetClearDestination = &Clear destination directory before exporting
+ExportTargetError_ChooseDestination = Please choose a destination directory
+ExportTargetError_validPath = Destination directory must be a valid path
+
+
 CategoryDetails_title = Category Properties
 CategoryDetails_sectionDescription = Provide a unique id, a name and a description for each category.\n\
 "*" denotes a required field.
@@ -1675,6 +1710,7 @@ OverviewPage_contentDescription=<form>\
 <p>The <a href="content">Content</a> section specifies the set of plug-ins that will be included in the target platform.</p>\
 </form>
 OverviewPage_buildTitle=Build Configuration
+OverwriteProjectsSelectionDialog_0=&Projects to delete:
 ClassAttributeRow_dialogTitle=Select Type
 ArchivePage_title=Description and Archives
 ArchivePage_name=Archives
@@ -1711,6 +1747,8 @@ ReviewPage_content = <p>You have selected the following sample:</p>\
 <p>If the selection is correct, press <b>Finish</b> to create the sample.</p>
 ShowSampleAction_title=Eclipse Samples
 ShowSampleAction_msgDesc=The samples are currently not installed. Do you want to download samples from Eclipse.org?
+ShowSampleAction_installing=Installing sample plug-ins
+ShowSampleAction_msgTitle=Samples
 SelfHostingPropertyPage_label=By default, all output folders are put on the plug-in's classpath when running a runtime Eclipse application.
 SecondaryBundlesSection_title=Automated Management of Dependencies
 SelfHostingPropertyPage_viewerLabel=Deselect the folders to be excluded:
@@ -1732,6 +1770,7 @@ TargetDefinitionContentPage_4=&Name:
 TargetDefinitionContentPage_6=&Content
 TargetDefinitionContentPage_7=The target name cannot be blank.
 TargetDefinitionContentPage_8=Enter a name for this target definition
+TargetDefinitionContentPage_LocationDescription=The following list of locations will be used to collect plug-ins for this target definition.
 TargetDefinitionEnvironmentPage_3=En&vironment
 TargetDefinitionEnvironmentPage_4=Ar&guments
 TargetDefinitionEnvironmentPage_5=Implicit &Dependencies
@@ -1745,26 +1784,28 @@ TargetCreationPage_3=C&urrent Target: Copy settings from the current target plat
 TargetCreationPage_4=&Template:
 TargetCreationPage_6=New Target
 TargetImplicitPluginsTab_desc=Specify plug-ins which should always be included when computing plug-in dependencies.
-TargetPlatformPreferencePage2_0=Add, edit and remove target definitions.  The active target definition will be used as the target platform which workspace plug-ins will be compiled and tested against.  New definitions are stored locally, but they can be moved to a project in the workspace.
+TargetPlatformPreferencePage2_0=Add, edit and remove target definitions.  The active target definition will be used as the target platform which workspace plug-ins will be compiled and tested against.  New definitions are stored locally, but they can be moved to a project in the workspace and shared with others.
 TargetPlatformPreferencePage2_1=\ (Active)
+TargetPlatformPreferencePage2_10=You have selected a target with a newer version than your current Eclipse installation.  This can cause unexpected behaviour in PDE.  Please use a newer version of Eclipse.
 TargetPlatformPreferencePage2_11=Unable to delete target definition
 TargetPlatformPreferencePage2_12=Reloading
-TargetPlatformPreferencePage2_13=&Move...
+TargetPlatformPreferencePage2_13=&Share...
 TargetPlatformPreferencePage2_14=Problems With Target Definition
 TargetPlatformPreferencePage2_15=Problems were found with the selected target definition.  You can still set the definition as the active target, but there may be problems building.
 TargetPlatformPreferencePage2_16=Re&load...
 TargetPlatformPreferencePage2_17=Target Definition Out Of Synch
 TargetPlatformPreferencePage2_18=The active target platform is out of synch with the file system.  Pressing ok on the preference page will update the target platform.
 TargetPlatformPreferencePage2_19=Remove Target Definition
-TargetPlatformPreferencePage2_2=&Target Definitions:
+TargetPlatformPreferencePage2_2=&Target definitions:
 TargetPlatformPreferencePage2_20=Are you sure you want to remove the selected target definition?  Removing it will delete a file in your workspace.
 TargetPlatformPreferencePage2_21=&Do not ask me again
 TargetPlatformPreferencePage2_22=No target definition is currently set active.
 TargetPlatformPreferencePage2_23=Target definition could not be located.
 TargetPlatformPreferencePage2_24=The definition file for the current target could not be found. A new target definition file with same settings can be created by clicking "Add..." and choosing the "Current Target" option on the "New Target Definition" wizard that opens up.
-TargetPlatformPreferencePage2_25=Locations
+TargetPlatformPreferencePage2_25=Locations:
 TargetPlatformPreferencePage2_26=Garbage Collection
 TargetPlatformPreferencePage2_27=Garbage collecting target definition bundle pool
+TargetPlatformPreferencePage2_28=Target Version
 TargetPlatformPreferencePage2_3=Add&...
 TargetPlatformPreferencePage2_4=New Target Definition
 TargetPlatformPreferencePage2_5=&Edit...
@@ -1774,7 +1815,6 @@ TargetPlatformPreferencePage2_8=Error
 TargetPlatformPreferencePage2_9=Unable to set workspace target platform
 EnvironmentBlock_jreTitle=Java Runtime Environment
 EnvironmentSection_locale=Locale:
-EnvironmentSection_title=Environment
 EnvironmentPage_title=Environment
 EnvironmentBlock_targetEnv=Target Environment
 EnvironmentSection_description=Specify the target environment.  If left blank, the default environment variables from the host (running) platform will be used.
@@ -1919,8 +1959,8 @@ LauncherSection_dialogTitle=Image Selection
 LauncherSection_dialogMessage=Select an image:
 RemoveLazyLoadingDirectiveResolution_remove=Remove lazy activation header
 ProductDefinitonWizardPage_applicationDefinition=<form><p>An Eclipse product must be associated with an <a href="applications">application</a>, the default entry point for the product when it is running.</p></form>
-ArgumentsSection_0=Program Arguments:
-ArgumentsSection_1=VM Arguments:
+ArgumentsSection_0=Program arguments:
+ArgumentsSection_1=VM arguments:
 ArgumentsSection_title=Launching Arguments
 ArgumentsSection_editorTitle=Arguments
 ArgumentsSection_desc=Specify the program and VM arguments to launch the product with.  Platform-specific arguments should be entered on their respective tabs.
@@ -1937,6 +1977,7 @@ ProductJRESection_title=Execution Environment
 ProductJRESection_desc=Specify the execution environment of the product. The respective default JRE will be bundled with the product.
 ProductJRESection_eeName=Execution Environment:
 ProductJRESection_browseEEs=Environments...
+ProdctJRESection_bundleJRE=Bundle JRE for this environment with the product.
 
 Product_FeatureSection_remove = Remove
 Product_FeatureSection_open = Open
@@ -2004,7 +2045,6 @@ InternationalizeWizard_NLSFragmentGenerator_overwriteMessage = A fragment projec
 InternationalizeWizard_NLSFragmentGenerator_errorMessage = An error occured while generating an NL Fragment.
 
 MainTab_jreSection = Java Runtime Environment
-EquinoxLaunchConfiguration_oldTarget=The org.eclipse.osgi plug-in is missing from this configuration.
 EquinoxPluginBlock_levelColumn=Start Level
 EquinoxPluginsTab_defaultStart=Default S&tart level:
 EquinoxPluginBlock_autoColumn=Auto-Start
@@ -2012,9 +2052,9 @@ EquinoxPluginsTab_defaultAuto=De&fault Auto-Start:
 EquinoxSettingsTab_name=Settings
 ModelChangeLabelProvider_instance=\ instance
 ModelChangeLabelProvider_instances=\ instances
-MoveTargetDefinitionPage_0=Move Target Definition
+MoveTargetDefinitionPage_0=Share Target Definition
 MoveTargetDefinitionPage_1=Choose a workspace location for the target definition file
-MoveTargetDefinitionWizard_0=Move Target Definition
+MoveTargetDefinitionWizard_0=Share Target Definition
 GetNonExternalizedStringsOperation_taskMessage=Scanning workspace for non-externalized manifest strings
 GetNonExternalizedStringsAction_allExternalizedTitle=Externalize Strings
 GetNonExternalizedStringsAction_allExternalizedMessage=All strings in manifest files have been externalized
@@ -2046,6 +2086,7 @@ RemoveSeperatorBuildEntryResolution_label=Remove the trailing separator in {0} f
 RemoveImportPkgResolution_description=Remove the ''{0}'' package from list
 RemoveBuildEntryResolution_removeEntry=Remove the {0} build entry.
 RemoveBuildEntryResolution_removeToken=Remove the {0} token from {1}.
+ReplaceBuildEntryResolution_replaceToken=Change the value of ''{1}'' build entry to ''{0}''.
 RemoveImportPkgResolution_label=Remove the ''{0}'' package from the list
 OptionalImportPkgResolution_description=Mark ''{0}'' as an optional imported package
 OptionalImportPkgResolution_label=Mark package ''{0}'' as an optional imported package
@@ -2101,13 +2142,14 @@ SyntaxColorTab_italic=&Italic
 SyntaxColorTab_preview=Preview:
 DocSection_text=Documentation
 SecondaryBundlesSection_resolve=<form><p>Analyze code and <a href="analyze">add dependencies</a> to the MANIFEST.MF via:</p></form>
-JavaArgumentsTab_progamArgsGroup=P&rogram Arguments
+JavaArgumentsTab_progamArgsGroup=P&rogram arguments
 JavaArgumentsTab_programVariables=Var&iables...
 JavaArgumentsTab_addVMArgs=&Import...
-JRESection_title=Target JRE
+JavaSearchActionGroup_RemoveJavaSearchMessage=Java search is currently set to include all plug-ins from the target platform.  To remove plug-ins from the java search scope, this preference setting must be turned off.  Would you like to continue?
+JavaSearchActionGroup_RemoveJavaSearchTitle=Java Search Using Target Plug-ins
 JRESection_description=Specify the JRE or execution environment for this target. Selecting a named JRE will change the workspace default JRE setting.
 JRESection_defaultJRE=&Default JRE
-JRESection_JREName=&JRE Name:
+JRESection_JREName=&JRE name:
 JRESection_ExecutionEnv=E&xecution Environment:
 JRESection_jrePreference=Installed JREs...
 JRESection_eeBoundJRE={0} ({1})
@@ -2121,6 +2163,10 @@ AddExportPackageResolution_Label=Add missing packages
 
 DependencyManagementSection_jobName=Analyzing Code
 DescriptionSection_nameLabel=Name:
+DuplicatePluginResolutionDialog_deselectAll=&Deselect All
+DuplicatePluginResolutionDialog_messageSingular=A plug-in you are importing already exists as a project in the workspace. The project selected below will be deleted during the import.
+DuplicatePluginResolutionDialog_message=Some of the plug-ins you are importing already exist as projects in the workspace. The projects selected below will be deleted during the import.
+DuplicatePluginResolutionDialog_selectAll=Select &All
 OrganizeManifestsOperation_additionalDeps=adding required dependencies...{0}
 OrganizeManifestsWizardPage_addDependencies=&Add required dependencies (this may be a long-running operation)
 SecondaryBundlesSection_desc=Augment the plug-in development classpath with the following dependencies without adding them to the MANIFEST.MF file.
@@ -2136,12 +2182,14 @@ RenameProjectChange_projectDoesNotExist=''{0}'' does not exist
 RenameProjectChange_destinationExists=Project ''{0}'' already exists
 RenamePluginWizardPage_renameProject=&Rename project to match the plug-in ID
 RenamePluginProcessor_noManifestError=Cannot refactor plug-ins without a MANIFEST.MF
-RenamePluginProcessor_processorName=Rename Plug-in ID
+RenamePluginProcessor_processorName=Rename Plug-in
 RenamePluginWizardPage_updateReferences=&Update references in dependent plug-ins
 RenamePluginProcessor_externalBundleError=Cannot refactor non-workspace plug-ins
 RenamePluginProcessor_renameProjectDesc=Rename project ''{0}'' to ''{1}''
 RemoveInternalDirective_label=Remove redundant x-internal header
 RemoveInternalDirective_desc=The x-friends directive implies x-internal, so the latter is redundant
+MultiFixResolution_JavaFixAll=Add all missing java compiler build entries
+MultiFixResolution_FixAll=Fix all similar entries
 ImportPackageSection_dialogButtonLabel=&Show non-exported packages
 ExportPackageSection_dialogButtonLabel=&Show non-Java packages
 MissingResourcePage_missingResource=Missing Resource
@@ -2182,10 +2230,10 @@ PDESourcePage_actionTextQuickOutline=Quick Outline
 EditorSourcePage_name=Source
 EditTargetNode_0=New Target Definition
 OSGiBundlesTab_frameworkLabel=&Framework:
-OSGiLaunchConfiguration_cannotFindLaunchConfiguration=Cannot find the {0} OSGi framework.
-OSGiLaunchConfiguration_selected=selected
+OSGiFrameworkBlock_selectedBundles=bundles selected below
 OSGiFrameworkPreferencePage_default=(default)
 OSGiFrameworkPreferencePage_installed=Installed <a>OSGi frameworks</a>:
+OSGiFrameworkPreferencePage_installed_nolink=Installed OSGi frameworks:
 
 RemoveImportExportServices_label=Remove ''{0}'' from the manifest
 RemoveImportExportServices_description=Remove ''{0}'' from the manifest
@@ -2205,6 +2253,10 @@ ControlValidationUtility_errorMsgValueMustBeSpecified=A value must be specified
 ControlValidationUtility_errorMsgValueNotExternalized=The specified value is not externalized
 ControlValidationUtility_errorMsgKeyNotFound=The specified key is not present in the plug-in's properties file
 ControlValidationUtility_errorMsgFilterInvalidSyntax=The specified platform filter contains invalid syntax
+CVSBundleImportPage_0=Import Projects from CVS
+CVSBundleImportPage_1=Import CVS projects corresponding to plug-ins and fragments in the file system.
+CVSBundleImportPage_2=Import from &HEAD
+CVSBundleImportPage_3=Import specific &version(s) shown below
 PackageFinder_taskName=Searching class files for package references
 
 UpdateSplashHandlerInModelAction_nameEmbedded=Embedded
@@ -2214,7 +2266,6 @@ UpdateSplashHandlerInModelAction_msgAddingExtension=Adding extension ''{0}'' ...
 UpdateSplashHandlerInModelAction_nameEnterprise=Enterprise
 UpdateSplashProgressAction_msgErrorTextFileBuffer=Text file buffer is NULL
 UpdateSplashHandlerInModelAction_nameLanguages=Languages
-EclipsePluginValidationOperation_pluginMissing={0} is missing
 SplashProgressSection_progressName=Customization
 SplashProgressSection_progressSectionDesc=Create a custom splash screen using one of the provided templates or by adding a progress bar and message.
 UpdateSplashHandlerInModelAction_templateTypeInteractive=Interactive - A simulated log-in session
@@ -2240,6 +2291,7 @@ StateViewPage_openItem=Open
 StateViewPage_showOnlyUnresolved_label=Show only unresolved plug-ins
 SchemaPreviewLauncher_msgEditorHasUnsavedChanges=Open schema editor has unsaved changes
 AddBundleClassPathResolution_add=Add ''{0}'' to the bundle classpath
+AddToJavaSearchJob_0=Updating Java search scope
 AntGeneratingExportWizard_0=File overwrite
 # {0} will be a list of projects, separated by newlines, may be followed by an ellipsis
 AntGeneratingExportWizard_1=The following projects contain build.xml files that will be overwritten by the export operation.  If you have a custom build.xml file, you must set the custom property to true in the build.properties file.  OK to overwrite? \n\n{0}
@@ -2262,6 +2314,10 @@ FilteredSchemaAttributeSelectionDialog_message=&Select an attribute (? = any cha
 FilteredSchemaAttributeSelectionDialog_searching=Searching...
 FilteredSchemaAttributeSelectionDialog_showOptionalAttributes=Show &Optional Attributes
 
+FilteredIUSelectionDialog_title=Add Artifact to Target Platform
+FilteredIUSelectionDialog_message=&Select an artifact to add to your target platform (? = any character, * = any string):
+FilteredIUSelectionDialog_showLatestVersionOnly=Show latest version only
+
 ProjectSelectionDialog_title=Project Specific Configuration
 ProjectSelectionDialog_message=&Select the project to configure:
 ProjectSelectionDialog_settingsTitle=Show only &projects with project specific settings
@@ -2270,8 +2326,6 @@ PDECompilersConfigurationBlock_error = Error
 PDECompilersConfigurationBlock_warning = Warning
 PDECompilersConfigurationBlock_ignore = Ignore
 
-VMHelper_cannotFindExecEnv=Cannot locate Execution Environment definition: "{0}". Launch aborted.
-
 LicensingPage_title=Licensing
 LicenseSection_title=License
 LicenseSection_description=Specify the license text and URL for the product.
@@ -2279,7 +2333,16 @@ LicenseSection_url=URL:
 LicenseSection_text=Text:
 
 VersionDialog_text=Specify a version:
+VersionDialog_title=Specify Version
 
 Product_FeatureSection_properties=Properties...
+ProfileBlock_0=Software Installation
+ProfileBlock_1=Support software installation in the launched application
+
+PDEJUnitLaunchConfigurationTab_Run_Tests_In_UI_Thread=Run in &UI thread
+
+SearchRepositoriesForIUProposal_message=Search repositories for ''{0}''
+SearchRepositoriesForIUProposal_description=Opens the artifact search dialog to search for ''{0}'' to add to your target
 
-PDEJUnitLaunchConfigurationTab_Run_Tests_In_UI_Thread=Run in &UI thread
\ No newline at end of file
+OSGiConsole_name=Host OSGi Console [{0}]
+OSGiConsoleFactory_title=WARNING: This console is connected to the current running instance of Eclipse!
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/AddToJavaSearchJob.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/AddToJavaSearchJob.java
new file mode 100644
index 0000000..c7f9c3a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/AddToJavaSearchJob.java
@@ -0,0 +1,174 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.preferences;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.SearchablePluginsManager;
+import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
+import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+/**
+ * Adds/Removes the target bundles to/from Java search
+ * 
+ * @since 3.6
+ */
+public class AddToJavaSearchJob extends WorkspaceJob {
+
+	private static final String JOB_FAMILY_ID = "AddToJavaSearchJob"; //$NON-NLS-1$
+
+	private IPluginModelBase[] fBundles;
+	private boolean fAdd;
+	private ITargetDefinition fTargetDefinition;
+
+	/**
+	 * Adds/Removes the target bundles to/from Java search
+	 * 
+	 * @param target	The target definition whose bundles are to be added/removed.
+	 */
+	public static void synchWithTarget(ITargetDefinition target) {
+		Job.getJobManager().cancel(JOB_FAMILY_ID);
+		AddToJavaSearchJob job = new AddToJavaSearchJob(target);
+		job.schedule();
+	}
+
+	/**
+	 * Removes all bundles from Java search
+	 */
+	public static void clearAll() {
+		Job.getJobManager().cancel(JOB_FAMILY_ID);
+		AddToJavaSearchJob job = new AddToJavaSearchJob(null, false);
+		job.schedule();
+	}
+
+	/**
+	 * Adds or removes a set of bundles from Java search
+	 * 
+	 * @param bundles	bundles that are to be added/removed.
+	 * @param add		<code>true</code> to add, <code>false></code> to remove
+	 */
+	public static void changeBundles(IPluginModelBase[] bundles, boolean add) {
+		Job.getJobManager().cancel(JOB_FAMILY_ID);
+		AddToJavaSearchJob job = new AddToJavaSearchJob(bundles, add);
+		job.schedule();
+	}
+
+	/**
+	 * Updates the contents of the java search scope setting its contents to the
+	 * contents of the given target definition.
+	 * 
+	 * @param target target to update search scope with
+	 */
+	private AddToJavaSearchJob(ITargetDefinition target) {
+		super(PDEUIMessages.AddToJavaSearchJob_0);
+		fTargetDefinition = target;
+		fAdd = true;
+		fBundles = null;
+	}
+
+	/**
+	 * Updates the contents of the java search scope with the given set of bundles.
+	 * Adds them to the scope if add to <code>true</code> otherwise they are removed.
+	 * Calling this method with bundles being null and add being <code>false</code>
+	 * will clear the java search scope.
+	 * 
+	 * @param bundles set of bundles to add or remove
+	 * @param add whether to add or remove the bundles
+	 */
+	private AddToJavaSearchJob(IPluginModelBase[] bundles, boolean add) {
+		super(PDEUIMessages.AddToJavaSearchJob_0);
+		fTargetDefinition = null;
+		fBundles = bundles;
+		fAdd = add;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.WorkspaceJob#runInWorkspace(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+		int ticks = fTargetDefinition != null ? 100 : 25;
+		SubMonitor subMon = SubMonitor.convert(monitor, ticks);
+		try {
+			if (subMon.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+
+			SearchablePluginsManager manager = PDECore.getDefault().getSearchablePluginsManager();
+
+			// If synching with a target, clear the project and check that the target is resolved
+			if (fTargetDefinition != null) {
+
+				manager.removeAllFromJavaSearch();
+
+				if (!fTargetDefinition.isResolved()) {
+					IStatus status = fTargetDefinition.resolve(subMon.newChild(50));
+					if (!status.isOK()) {
+						return status;
+					}
+					subMon.subTask(""); //$NON-NLS-1$
+				} else {
+					subMon.worked(50);
+				}
+
+				if (monitor.isCanceled()) {
+					return Status.CANCEL_STATUS;
+				}
+
+				IResolvedBundle[] bundles = fTargetDefinition.getBundles();
+				fAdd = true;
+				List models = new ArrayList(bundles.length);
+				for (int index = 0; index < bundles.length; index++) {
+					IPluginModelBase model = PluginRegistry.findModel(bundles[index].getBundleInfo().getSymbolicName());
+					if (model != null) {
+						models.add(model);
+					}
+				}
+				subMon.worked(25);
+				fBundles = (IPluginModelBase[]) models.toArray(new IPluginModelBase[models.size()]);
+			}
+
+			if (subMon.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+
+			if (fAdd) {
+				manager.addToJavaSearch(fBundles);
+			} else {
+				if (fBundles != null) {
+					manager.removeFromJavaSearch(fBundles);
+				} else {
+					manager.removeAllFromJavaSearch();
+				}
+			}
+			subMon.worked(25);
+
+			return Status.OK_STATUS;
+
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+	 */
+	public boolean belongsTo(Object family) {
+		return JOB_FAMILY_ID.equals(family);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/MainPreferencePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/MainPreferencePage.java
index d1ec298..10d910a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/MainPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/MainPreferencePage.java
@@ -11,10 +11,16 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.preferences;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.preferences.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.pde.internal.core.PDEPreferencesManager;
+import org.eclipse.pde.internal.core.target.TargetPlatformService;
+import org.eclipse.pde.internal.core.target.provisional.ITargetHandle;
+import org.eclipse.pde.internal.launching.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -23,6 +29,7 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.*;
+import org.osgi.service.prefs.BackingStoreException;
 
 public class MainPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 	private Button fUseID;
@@ -31,6 +38,7 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 	private Button fOverwriteBuildFiles;
 	private Button fShowSourceBundles;
 	private Button fPromptOnRemove;
+	private Button fAddToJavaSearch;
 
 	public MainPreferencePage() {
 		setPreferenceStore(PDEPlugin.getDefault().getPreferenceStore());
@@ -39,6 +47,7 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 
 	protected Control createContents(Composite parent) {
 		IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
+		PDEPreferencesManager launchingStore = PDELaunchingPlugin.getDefault().getPreferenceManager();
 
 		Composite composite = new Composite(parent, SWT.NONE);
 		GridLayout layout = new GridLayout();
@@ -63,7 +72,7 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 
 		fAutoManage = new Button(group, SWT.CHECK);
 		fAutoManage.setText(PDEUIMessages.MainPreferencePage_updateStale);
-		fAutoManage.setSelection(store.getBoolean(IPreferenceConstants.PROP_AUTO_MANAGE));
+		fAutoManage.setSelection(launchingStore.getBoolean(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE));
 
 		group = SWTFactory.createGroup(composite, PDEUIMessages.MainPreferencePage_exportingGroup, 1, 1, GridData.FILL_HORIZONTAL);
 
@@ -91,6 +100,9 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 
 		});
 
+		fAddToJavaSearch = new Button(group, SWT.CHECK);
+		fAddToJavaSearch.setText(PDEUIMessages.MainPreferencePage_addToJavaSearch);
+		fAddToJavaSearch.setSelection(store.getBoolean(IPreferenceConstants.ADD_TO_JAVA_SEARCH));
 		return composite;
 	}
 
@@ -107,10 +119,42 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 		} else {
 			store.setValue(IPreferenceConstants.PROP_SHOW_OBJECTS, IPreferenceConstants.VALUE_USE_NAMES);
 		}
-		store.setValue(IPreferenceConstants.PROP_AUTO_MANAGE, fAutoManage.getSelection());
 		store.setValue(IPreferenceConstants.OVERWRITE_BUILD_FILES_ON_EXPORT, fOverwriteBuildFiles.getSelection() ? MessageDialogWithToggle.PROMPT : MessageDialogWithToggle.ALWAYS);
 		store.setValue(IPreferenceConstants.PROP_SHOW_SOURCE_BUNDLES, fShowSourceBundles.getSelection());
+
+		boolean synchJavaSearch = fAddToJavaSearch.getSelection();
+		if (store.getBoolean(IPreferenceConstants.ADD_TO_JAVA_SEARCH) != synchJavaSearch) {
+			store.setValue(IPreferenceConstants.ADD_TO_JAVA_SEARCH, synchJavaSearch);
+			try {
+				if (synchJavaSearch) {
+					ITargetHandle target = TargetPlatformService.getDefault().getWorkspaceTargetHandle();
+					if (target != null) {
+						AddToJavaSearchJob.synchWithTarget(target.getTargetDefinition());
+					}
+				} else {
+					AddToJavaSearchJob.clearAll();
+				}
+			} catch (CoreException e) {
+				PDEPlugin.log(e);
+			}
+		}
+
 		PDEPlugin.getDefault().getPreferenceManager().savePluginPreferences();
+
+		// write AUTO_MANAGE setting to pde.launching instance scope 
+		IEclipsePreferences instancePrefs = new InstanceScope().getNode(IPDEConstants.PLUGIN_ID);
+		IEclipsePreferences defaultPrefs = new DefaultScope().getNode(IPDEConstants.PLUGIN_ID);
+		if (defaultPrefs.getBoolean(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE, false) == fAutoManage.getSelection()) {
+			instancePrefs.remove(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE);
+		} else {
+			instancePrefs.putBoolean(ILaunchingPreferenceConstants.PROP_AUTO_MANAGE, fAutoManage.getSelection());
+		}
+		try {
+			instancePrefs.flush();
+		} catch (BackingStoreException e) {
+			PDEPlugin.log(e);
+		}
+
 		return super.performOk();
 	}
 
@@ -127,6 +171,8 @@ public class MainPreferencePage extends PreferencePage implements IWorkbenchPref
 		fOverwriteBuildFiles.setSelection(true);
 		fShowSourceBundles.setSelection(false);
 		fPromptOnRemove.setSelection(true);
+
+		fAddToJavaSearch.setSelection(store.getDefaultBoolean(IPreferenceConstants.ADD_TO_JAVA_SEARCH));
 	}
 
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/OSGiFrameworkPreferencePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/OSGiFrameworkPreferencePage.java
index 1a08373..1589a96 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/OSGiFrameworkPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/OSGiFrameworkPreferencePage.java
@@ -8,19 +8,23 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Code 9 Corporation - ongoing enhancements
+ *     Anyware Technologies - ongoing enhancements
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.preferences;
 
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.preferences.*;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.pde.core.plugin.IPluginExtensionPoint;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.PDEPreferencesManager;
+import org.eclipse.pde.internal.core.schema.SchemaRegistry;
+import org.eclipse.pde.internal.launching.*;
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
 import org.eclipse.pde.internal.ui.search.ShowDescriptionAction;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -29,6 +33,7 @@ import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.*;
+import org.osgi.service.prefs.BackingStoreException;
 
 /**
  * Provides the preference page for managing the default OSGi framework to use.
@@ -104,8 +109,8 @@ public class OSGiFrameworkPreferencePage extends PreferencePage implements IWork
 	 * Restores the default framework setting from the PDE preferences
 	 */
 	private void setDefaultFramework() {
-		IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
-		fDefaultFramework = store.getString(IPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
+		PDEPreferencesManager preferenceManager = PDELaunchingPlugin.getDefault().getPreferenceManager();
+		fDefaultFramework = preferenceManager.getString(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
 	}
 
 	/* (non-Javadoc)
@@ -115,18 +120,14 @@ public class OSGiFrameworkPreferencePage extends PreferencePage implements IWork
 		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH);
 
 		Link text = new Link(comp, SWT.WRAP);
-		text.setText(PDEUIMessages.OSGiFrameworkPreferencePage_installed);
+		final IPluginExtensionPoint point = PDECore.getDefault().getExtensionsRegistry().findExtensionPoint(OSGiFrameworkManager.POINT_ID);
+		text.setText((point != null && SchemaRegistry.getSchemaURL(point) != null) ? PDEUIMessages.OSGiFrameworkPreferencePage_installed : PDEUIMessages.OSGiFrameworkPreferencePage_installed_nolink);
 		GridData gd = new GridData();
 		gd.horizontalSpan = 2;
 		text.setLayoutData(gd);
 		text.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				IPluginExtensionPoint point = PDECore.getDefault().getExtensionsRegistry().findExtensionPoint(OSGiFrameworkManager.POINT_ID);
-				if (point != null) {
-					new ShowDescriptionAction(point, true).run();
-				} else {
-					Display.getDefault().beep();
-				}
+				new ShowDescriptionAction(point, true).run();
 			}
 		});
 
@@ -134,7 +135,7 @@ public class OSGiFrameworkPreferencePage extends PreferencePage implements IWork
 		fTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
 		fTableViewer.setContentProvider(ArrayContentProvider.getInstance());
 		fTableViewer.setLabelProvider(new FrameworkLabelProvider());
-		fTableViewer.setInput(PDEPlugin.getDefault().getOSGiFrameworkManager().getSortedFrameworks());
+		fTableViewer.setInput(PDELaunchingPlugin.getDefault().getOSGiFrameworkManager().getSortedFrameworks());
 		fTableViewer.addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
 				IConfigurationElement element = (IConfigurationElement) event.getElement();
@@ -144,7 +145,7 @@ public class OSGiFrameworkPreferencePage extends PreferencePage implements IWork
 			}
 		});
 		if (fDefaultFramework != null) {
-			IConfigurationElement element = PDEPlugin.getDefault().getOSGiFrameworkManager().getFramework(fDefaultFramework);
+			IConfigurationElement element = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager().getFramework(fDefaultFramework);
 			if (element != null) {
 				fTableViewer.setCheckedElements(new Object[] {element});
 			}
@@ -158,9 +159,19 @@ public class OSGiFrameworkPreferencePage extends PreferencePage implements IWork
 	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
 	 */
 	public boolean performOk() {
-		IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
-		store.setValue(IPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, fDefaultFramework);
-		PDEPlugin.getDefault().getPreferenceManager().savePluginPreferences();
+		IEclipsePreferences instancePrefs = new InstanceScope().getNode(IPDEConstants.PLUGIN_ID);
+		IEclipsePreferences defaultPrefs = new DefaultScope().getNode(IPDEConstants.PLUGIN_ID);
+		if (defaultPrefs.get(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, "").equals(fDefaultFramework)) { //$NON-NLS-1$
+			instancePrefs.remove(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK);
+		} else {
+			instancePrefs.put(ILaunchingPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, fDefaultFramework);
+		}
+		try {
+			instancePrefs.flush();
+		} catch (BackingStoreException e) {
+			PDEPlugin.log(e);
+		}
+
 		return super.performOk();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
index 22affe5..bd4ec48 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.preferences;
 
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
 import com.ibm.icu.text.MessageFormat;
 import java.util.*;
 import java.util.List;
@@ -199,13 +201,23 @@ public class PDECompilersConfigurationBlock {
 	//general
 	private static final Key KEY_P_DISCOURAGED_CLASS = getPDEPrefKey(CompilerFlags.P_DISCOURAGED_CLASS);
 	private static final Key KEY_P_NO_REQUIRED_ATT = getPDEPrefKey(CompilerFlags.P_NO_REQUIRED_ATT);
-	private static final Key KEY_P_BUILD = getPDEPrefKey(CompilerFlags.P_BUILD);
 	private static final Key KEY_P_NOT_EXTERNALIZED = getPDEPrefKey(CompilerFlags.P_NOT_EXTERNALIZED);
 	private static final Key KEY_P_INCOMPATIBLE_ENV = getPDEPrefKey(CompilerFlags.P_INCOMPATIBLE_ENV);
 	private static final Key KEY_P_MISSING_EXPORT_PKGS = getPDEPrefKey(CompilerFlags.P_MISSING_EXPORT_PKGS);
 	private static final Key KEY_P_DEPRECATED = getPDEPrefKey(CompilerFlags.P_DEPRECATED);
 	private static final Key KEY_P_INTERNAL = getPDEPrefKey(CompilerFlags.P_INTERNAL);
 
+	// build
+	private static final Key KEY_P_BUILD_SOURCE_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_SOURCE_LIBRARY);
+	private static final Key KEY_P_BUILD_OUTPUT_LIBRARY = getPDEPrefKey(CompilerFlags.P_BUILD_OUTPUT_LIBRARY);
+	private static final Key KEY_P_BUILD_MISSING_OUTPUT = getPDEPrefKey(CompilerFlags.P_BUILD_MISSING_OUTPUT);
+	private static final Key KEY_P_BUILD_SRC_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_SRC_INCLUDES);
+	private static final Key KEY_P_BUILD_BIN_INCLUDES = getPDEPrefKey(CompilerFlags.P_BUILD_BIN_INCLUDES);
+	private static final Key KEY_P_BUILD_JAVA_COMPLIANCE = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPLIANCE);
+	private static final Key KEY_P_BUILD_JAVA_COMPILER = getPDEPrefKey(CompilerFlags.P_BUILD_JAVA_COMPILER);
+	private static final Key KEY_P_BUILD_ENCODINGS = getPDEPrefKey(CompilerFlags.P_BUILD_ENCODINGS);
+	private static final Key KEY_P_BUILD = getPDEPrefKey(CompilerFlags.P_BUILD);
+
 	// versioning
 	private static final Key KEY_P_VERSION_EXP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_EXP_PKG);
 	private static final Key KEY_P_VERSION_IMP_PKG = getPDEPrefKey(CompilerFlags.P_MISSING_VERSION_IMP_PKG);
@@ -217,7 +229,7 @@ public class PDECompilersConfigurationBlock {
 
 	private static String[] SEVERITIES = {PDEUIMessages.PDECompilersConfigurationBlock_error, PDEUIMessages.PDECompilersConfigurationBlock_warning, PDEUIMessages.PDECompilersConfigurationBlock_ignore};
 
-	private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_INTERNAL, KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, KEY_P_VERSION_REQ_BUNDLE, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, KEY_S_OPEN_TAGS};
+	private static Key[] fgAllKeys = {KEY_F_UNRESOLVED_FEATURES, KEY_F_UNRESOLVED_PLUGINS, KEY_P_BUILD, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, KEY_P_BUILD_ENCODINGS, KEY_P_INTERNAL, KEY_P_DEPRECATED, KEY_P_DISCOURAGED_CLASS, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS, KEY_P_NO_REQUIRED_ATT, KEY_P_NOT_EXTERNALIZED, KEY_P_UNKNOWN_ATTRIBUTE, KEY_P_UNKNOWN_CLASS, KEY_P_UNKNOWN_ELEMENT, KEY_P_UNKNOWN_IDENTIFIER, KEY_P_UNKNOWN_RESOURCE, KEY_P_UNRESOLVED_EX_POINTS, KEY_P_UNRESOLVED_IMPORTS, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG, KEY_P_VERSION_REQ_BUNDLE, KEY_S_CREATE_DOCS, KEY_S_DOC_FOLDER, KEY_S_OPEN_TAGS};
 
 	/**
 	 * Constant representing the {@link IDialogSettings} section for this block
@@ -461,7 +473,6 @@ public class PDECompilersConfigurationBlock {
 			folder = new TabFolder(fMainComp, SWT.NONE);
 			GridData gd = new GridData(GridData.FILL_BOTH);
 			gd.heightHint = 375;
-			gd.widthHint = 400;
 			folder.setLayoutData(gd);
 		}
 
@@ -508,7 +519,10 @@ public class PDECompilersConfigurationBlock {
 				scomp.setContent(sbody);
 				// General
 				Composite client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_general);
-				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_no_required_att, PDEUIMessages.CompilersConfigurationTab_buildPropertiesErrors, PDEUIMessages.CompilersConfigurationTab_incompatEnv, PDEUIMessages.compilers_p_exported_pkgs}, new Key[] {KEY_P_NO_REQUIRED_ATT, KEY_P_BUILD, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS}, CompilerFlags.PLUGIN_FLAGS);
+				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_no_required_att, PDEUIMessages.CompilersConfigurationTab_incompatEnv, PDEUIMessages.compilers_p_exported_pkgs}, new Key[] {KEY_P_NO_REQUIRED_ATT, KEY_P_INCOMPATIBLE_ENV, KEY_P_MISSING_EXPORT_PKGS}, CompilerFlags.PLUGIN_FLAGS);
+				//build.properties
+				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_build);
+				initializeComboControls(client, new String[] {PDEUIMessages.PDECompilersConfigurationBlock_1, PDEUIMessages.PDECompilersConfigurationBlock_2, PDEUIMessages.PDECompilersConfigurationBlock_0, PDEUIMessages.PDECompilersConfigurationBlock_3, PDEUIMessages.PDECompilersConfigurationBlock_4, PDEUIMessages.PDECompilersConfigurationBlock_5, PDEUIMessages.PDECompilersConfigurationBlock_6, PDEUIMessages.PDECompilersConfigurationBlock_7, PDEUIMessages.CompilersConfigurationTab_buildPropertiesErrors}, new Key[] {KEY_P_BUILD_SOURCE_LIBRARY, KEY_P_BUILD_OUTPUT_LIBRARY, KEY_P_BUILD_MISSING_OUTPUT, KEY_P_BUILD_BIN_INCLUDES, KEY_P_BUILD_SRC_INCLUDES, KEY_P_BUILD_JAVA_COMPLIANCE, KEY_P_BUILD_JAVA_COMPILER, KEY_P_BUILD_ENCODINGS, KEY_P_BUILD}, CompilerFlags.PLUGIN_FLAGS);
 				// Versioning
 				client = createExpansibleComposite(sbody, PDEUIMessages.PDECompilersConfigurationBlock_versioning);
 				initializeComboControls(client, new String[] {PDEUIMessages.compilers_p_missing_require_bundle, PDEUIMessages.compilers_p_missing_exp_pkg, PDEUIMessages.compilers_p_missing_imp_pkg}, new Key[] {KEY_P_VERSION_REQ_BUNDLE, KEY_P_VERSION_EXP_PKG, KEY_P_VERSION_IMP_PKG}, CompilerFlags.PLUGIN_FLAGS);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PreferenceInitializer.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PreferenceInitializer.java
index 58a132e..61d6f98 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.pde.internal.ui.IPreferenceConstants;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.editor.text.ColorManager;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
 
 public class PreferenceInitializer extends AbstractPreferenceInitializer {
 
@@ -27,7 +26,6 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
 		ColorManager.initializeDefaults(store);
 		store.setDefault(IPreferenceConstants.PROP_SHOW_OBJECTS, IPreferenceConstants.VALUE_USE_IDS);
 		store.setDefault(IPreferenceConstants.EDITOR_FOLDING_ENABLED, false);
-		store.setDefault(IPreferenceConstants.DEFAULT_OSGI_FRAMEOWRK, OSGiFrameworkManager.DEFAULT_FRAMEWORK);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
index 01d378f..cb4cc97 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/TargetPlatformPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 EclipseSource Corporation and others.
+ * Copyright (c) 2009, 2010 EclipseSource Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,8 @@ import java.util.*;
 import java.util.List;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.*;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -40,12 +41,15 @@ import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.*;
+import org.osgi.framework.Version;
 
 /**
  * Preference page for managing all known target definitions and setting one as the active target platform.
  */
 public class TargetPlatformPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
+	private static final String ORG_ECLIPSE_OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
+
 	private class TargetLabelProvider extends StyledCellLabelProvider {
 
 		// Definition corresponding to running host
@@ -271,6 +275,7 @@ public class TargetPlatformPreferencePage extends PreferencePage implements IWor
 				try {
 					fTargets.add(targets[i].getTargetDefinition());
 				} catch (CoreException e) {
+					PDECore.log(e);
 					setErrorMessage(e.getMessage());
 				}
 			}
@@ -332,8 +337,9 @@ public class TargetPlatformPreferencePage extends PreferencePage implements IWor
 
 		updateButtons();
 
-		Group group = SWTFactory.createGroup(comp, PDEUIMessages.TargetPlatformPreferencePage2_25, 1, 1, GridData.FILL_HORIZONTAL);
-		fDetails = new TableViewer(group);
+		Composite detailsComposite = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_HORIZONTAL, 0, 0);
+		SWTFactory.createLabel(detailsComposite, PDEUIMessages.TargetPlatformPreferencePage2_25, 1);
+		fDetails = new TableViewer(detailsComposite);
 		fDetails.setLabelProvider(new StyledBundleLabelProvider(true, true));
 		fDetails.setContentProvider(new ArrayContentProvider());
 		gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -612,7 +618,9 @@ public class TargetPlatformPreferencePage extends PreferencePage implements IWor
 	public void init(IWorkbench workbench) {
 		// ensures default targets are created when page is opened (if not created yet)
 		PluginModelManager manager = PDECore.getDefault().getModelManager();
-		manager.getExternalModelManager();
+		if (!manager.isInitialized()) {
+			manager.getExternalModelManager();
+		}
 	}
 
 	/* (non-Javadoc)
@@ -642,6 +650,7 @@ public class TargetPlatformPreferencePage extends PreferencePage implements IWor
 			fActiveTarget = deflt;
 			fTableViewer.setCheckedElements(new Object[] {fActiveTarget});
 			fTableViewer.refresh(true);
+			handleActivate();
 		}
 		super.performDefaults();
 	}
@@ -759,7 +768,45 @@ public class TargetPlatformPreferencePage extends PreferencePage implements IWor
 
 		// set workspace target if required
 		if (load) {
-			LoadTargetDefinitionJob.load(toLoad);
+
+			// Warn about forward compatibility, synchronize java search
+			IJobChangeListener listener = new JobChangeAdapter() {
+				public void done(IJobChangeEvent event) {
+					if (event.getResult().getSeverity() == IStatus.OK) {
+						if (fActiveTarget != null) {
+							PDEPreferencesManager pref = new PDEPreferencesManager(PDEPlugin.getPluginId());
+							if (pref.getBoolean(IPreferenceConstants.ADD_TO_JAVA_SEARCH)) {
+								AddToJavaSearchJob.synchWithTarget(fActiveTarget);
+							}
+							// Ignore the qualifier when comparing (otherwise N builds always newer than I builds)
+							Version platformOsgiVersion = Platform.getBundle(ORG_ECLIPSE_OSGI).getVersion();
+							platformOsgiVersion = new Version(platformOsgiVersion.getMajor(), platformOsgiVersion.getMinor(), platformOsgiVersion.getMicro());
+							IResolvedBundle[] bundles;
+							bundles = fActiveTarget.getAllBundles();
+							if (bundles != null) {
+								for (int index = 0; index < bundles.length; index++) {
+									BundleInfo bundleInfo = bundles[index].getBundleInfo();
+									if (ORG_ECLIPSE_OSGI.equalsIgnoreCase(bundleInfo.getSymbolicName())) {
+										// Ignore the qualifier when comparing (otherwise N builds always newer than I builds)
+										Version bundleVersion = Version.parseVersion(bundleInfo.getVersion());
+										bundleVersion = new Version(bundleVersion.getMajor(), bundleVersion.getMinor(), bundleVersion.getMicro());
+										if (platformOsgiVersion.compareTo(bundleVersion) < 0) {
+											Display.getDefault().syncExec(new Runnable() {
+												public void run() {
+													MessageDialog.openWarning(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.TargetPlatformPreferencePage2_28, PDEUIMessages.TargetPlatformPreferencePage2_10);
+												}
+											});
+										}
+										break;
+									}
+								}
+							}
+						}
+					}
+				}
+			};
+
+			LoadTargetDefinitionJob.load(toLoad, listener);
 			fPrevious = toLoad == null ? null : toLoad.getHandle();
 		}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/PluginDevelopmentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/PluginDevelopmentPage.java
index 6f8a9a5..3960662 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/PluginDevelopmentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/properties/PluginDevelopmentPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -15,17 +15,20 @@ import org.eclipse.core.resources.ProjectScope;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.PropertyPage;
 import org.osgi.service.prefs.BackingStoreException;
 import org.osgi.service.prefs.Preferences;
 
+/**
+ * Top level PDE property page for projects.
+ */
 public class PluginDevelopmentPage extends PropertyPage implements IWorkbenchPropertyPage {
 
 	private Button fExtensionButton;
@@ -35,6 +38,9 @@ public class PluginDevelopmentPage extends PropertyPage implements IWorkbenchPro
 		noDefaultAndApplyButton();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+	 */
 	protected Control createContents(Composite parent) {
 		Composite composite = new Composite(parent, SWT.NONE);
 		composite.setLayout(new GridLayout());
@@ -64,10 +70,26 @@ public class PluginDevelopmentPage extends PropertyPage implements IWorkbenchPro
 		}
 	}
 
+	/**
+	 * Returns the preference settings scoped to the given project if available
+	 * @param project project to get preferences for
+	 * @return preferences for the project or <code>null</code>
+	 */
 	private Preferences getPreferences(IProject project) {
 		return new ProjectScope(project).getNode(PDECore.PLUGIN_ID);
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IHelpContextIds.PLUGIN_DEVELOPMENT_PROPERTY_PAGE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#performOk()
+	 */
 	public boolean performOk() {
 		Preferences pref = getPreferences((IProject) getElement().getAdapter(IProject.class));
 		if (pref != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/provisional/IBundeImportWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/provisional/IBundeImportWizardPage.java
new file mode 100644
index 0000000..568b76d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/provisional/IBundeImportWizardPage.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.provisional;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+
+/**
+ * A wizard page contributed by a <code>org.eclipse.pde.ui.bundleImportPages</code>
+ * extension.
+ * <p>
+ * <strong>EXPERIMENTAL</strong>. This interface has been added as
+ * part of a work in progress. There is no guarantee that this API will
+ * work or that it will remain the same. Please do not use this API without
+ * consulting with the PDE team.
+ * </p>
+ * @since 3.6
+ */
+public interface IBundeImportWizardPage extends IWizardPage {
+	/**
+	 * Called when the import wizard is closed by selecting 
+	 * the finish button.
+	 * Implementers may store the page result (new/changed bundle
+	 * import descriptions in getSelection) here.
+	 * 
+	 * @return if the operation was successful. The wizard will only close
+	 * when <code>true</code> is returned.
+	 */
+	public boolean finish();
+
+	/**
+	 * Returns the bundle import descriptions edited or created on the page 
+	 * after the wizard has closed.
+	 * Returns bundle import descriptions initially set using 
+	 * <code>setSelection</code>if the wizard has not been 
+	 * closed yet.
+	 * 
+	 * @return the bundle import descriptions edited or created on the page.
+	 */
+	public BundleImportDescription[] getSelection();
+
+	/**
+	 * Sets the bundle import descriptions to be edited on the page.
+	 * The passed descriptions can be edited and should be 
+	 * returned in getSelection().
+	 * 
+	 * @param descriptions the bundle import descriptions edited on the page.
+	 */
+	public void setSelection(BundleImportDescription[] descriptions);
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java
index f58a700..3fa30f4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ContainerRenameParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,9 +19,9 @@ import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
 import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.WorkspaceModelManager;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.bundle.*;
 import org.eclipse.pde.internal.core.util.IdUtil;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
@@ -62,7 +62,7 @@ public class ContainerRenameParticipant extends PDERenameParticipant {
 	}
 
 	protected Change createManifestChange(IProgressMonitor monitor) throws CoreException {
-		IFile manifest = fProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		IFile manifest = PDEProject.getManifest(fProject);
 		if (manifest.exists()) {
 			monitor.beginTask("", 4); //$NON-NLS-1$
 			try {
@@ -82,15 +82,18 @@ public class ContainerRenameParticipant extends PDERenameParticipant {
 						// don't update Bundle-SymbolicName if the id and project name don't match
 						if (!oldText.equals(calcProjectId))
 							return null;
-						// remember to create a valid OSGi Bundle-SymbolicName.  Project name does not have that garuntee
+						// remember to create a valid OSGi Bundle-SymbolicName.  Project name does not have that guarante
 						String newId = IdUtil.getValidId(newText);
 
 						header.setId(newId);
 						// at this point, neither the project or file will exist.  
 						// The project/resources get refactored before the TextChange is applied, therefore we need their future locations
 						IProject newProject = ((IWorkspaceRoot) manifest.getProject().getParent()).getProject(newText);
+						// If the manifest is in a non-standard location the new project will keep that location, only the project will be changed
+						IPath oldManifest = manifest.getFullPath().removeFirstSegments(1);
+						IFile newManifest = newProject.getFile(oldManifest);
 
-						MovedTextFileChange change = new MovedTextFileChange("", newProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR), manifest); //$NON-NLS-1$
+						MovedTextFileChange change = new MovedTextFileChange("", newManifest, manifest); //$NON-NLS-1$
 						MultiTextEdit edit = new MultiTextEdit();
 						edit.addChildren(listener.getTextOperations());
 						change.setEdit(edit);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/CreateHeaderChangeOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/CreateHeaderChangeOperation.java
index ce85d61..7449eda 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/CreateHeaderChangeOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/CreateHeaderChangeOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -17,9 +17,9 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.ltk.core.refactoring.TextFileChange;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
 import org.eclipse.pde.internal.core.ibundle.IManifestHeader;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.bundle.*;
 import org.eclipse.pde.internal.ui.util.PDEModelUtility;
 import org.eclipse.text.edits.*;
@@ -45,7 +45,7 @@ public class CreateHeaderChangeOperation implements IWorkspaceRunnable {
 			if (res == null)
 				return;
 			IProject proj = res.getProject();
-			IFile file = proj.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+			IFile file = PDEProject.getManifest(proj);
 			if (file.exists())
 				fChange = updateBundleHeader(file, monitor);
 		} finally {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestPackageMoveParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestPackageMoveParticipant.java
index 22ef418..73529cc 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestPackageMoveParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestPackageMoveParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.core.*;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 
 public class ManifestPackageMoveParticipant extends PDEMoveParticipant {
@@ -26,7 +26,7 @@ public class ManifestPackageMoveParticipant extends PDEMoveParticipant {
 			IPackageFragment fragment = (IPackageFragment) element;
 			IJavaProject javaProject = (IJavaProject) fragment.getAncestor(IJavaElement.JAVA_PROJECT);
 			IProject project = javaProject.getProject();
-			if (project.exists(ICoreConstants.MANIFEST_PATH)) {
+			if (PDEProject.getManifest(project).exists()) {
 				fProject = javaProject.getProject();
 				fElements = new HashMap();
 				fElements.put(fragment, getNewName(getArguments().getDestination(), element));
@@ -41,14 +41,14 @@ public class ManifestPackageMoveParticipant extends PDEMoveParticipant {
 	}
 
 	protected void addChange(CompositeChange result, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getManifest(fProject);
 		if (file.exists()) {
 			IProject destProject = getDestinationProject();
 			if (destProject != null && !fProject.equals(destProject)) {
 				MoveFromChange change = BundleManifestChange.createMovePackageChange(file, fElements.keySet().toArray(), pm);
 				if (change != null) {
 					result.add(change);
-					IFile dest = destProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+					IFile dest = PDEProject.getManifest(destProject);
 					if (dest.exists()) {
 						Change second = BundleManifestChange.createMoveToPackageChange(dest, change, pm);
 						if (second != null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestTypeMoveParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestTypeMoveParticipant.java
index c8bf171..7dcb6f1 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestTypeMoveParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ManifestTypeMoveParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -18,8 +18,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jdt.core.*;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.WorkspaceModelManager;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 
 public class ManifestTypeMoveParticipant extends PDEMoveParticipant {
@@ -53,8 +53,7 @@ public class ManifestTypeMoveParticipant extends PDEMoveParticipant {
 		return false;
 	}
 
-	protected void addChange(CompositeChange result, String filename, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(filename);
+	protected void addChange(CompositeChange result, IFile file, IProgressMonitor pm) throws CoreException {
 		if (file.exists()) {
 			Change change = PluginManifestChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), getTextChange(file), pm);
 			if (change != null)
@@ -74,7 +73,7 @@ public class ManifestTypeMoveParticipant extends PDEMoveParticipant {
 	}
 
 	protected void addChange(CompositeChange result, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getManifest(fProject);
 		if (file.exists()) {
 			Change change = BundleManifestChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), pm);
 			if (change != null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDEMoveParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDEMoveParticipant.java
index d8852c4..95775eb 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDEMoveParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDEMoveParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,11 +12,12 @@ package org.eclipse.pde.internal.ui.refactoring;
 
 import java.util.HashMap;
 import java.util.Iterator;
+import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.ltk.core.refactoring.*;
 import org.eclipse.ltk.core.refactoring.participants.*;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public abstract class PDEMoveParticipant extends MoveParticipant implements ISharableParticipant {
 
@@ -36,15 +37,15 @@ public abstract class PDEMoveParticipant extends MoveParticipant implements ISha
 		CompositeChange result = new CompositeChange(getName());
 		addChange(result, pm);
 		if (isInterestingForExtensions()) {
-			addChange(result, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR, pm);
-			addChange(result, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR, pm);
+			addChange(result, PDEProject.getPluginXml(fProject), pm);
+			addChange(result, PDEProject.getFragmentXml(fProject), pm);
 		}
 		return (result.getChildren().length == 0) ? null : result;
 	}
 
 	protected abstract boolean isInterestingForExtensions();
 
-	protected void addChange(CompositeChange result, String filename, IProgressMonitor pm) throws CoreException {
+	protected void addChange(CompositeChange result, IFile file, IProgressMonitor pm) throws CoreException {
 	}
 
 	// add main change (whether to Manifest or build.properties)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDERenameParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDERenameParticipant.java
index c1aac0c..f9aa100 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDERenameParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PDERenameParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jdt.core.IJavaElement;
 import org.eclipse.ltk.core.refactoring.*;
 import org.eclipse.ltk.core.refactoring.participants.*;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public abstract class PDERenameParticipant extends RenameParticipant implements ISharableParticipant {
 
@@ -44,13 +44,12 @@ public abstract class PDERenameParticipant extends RenameParticipant implements
 		addBundleManifestChange(result, pm);
 		if (updateBuildProperties())
 			addBuildPropertiesChange(result, pm);
-		addChange(result, ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR, pm);
-		addChange(result, ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR, pm);
+		addChange(result, PDEProject.getPluginXml(fProject), pm);
+		addChange(result, PDEProject.getFragmentXml(fProject), pm);
 		return (result.getChildren().length == 0) ? null : result;
 	}
 
-	private void addChange(CompositeChange result, String filename, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(filename);
+	private void addChange(CompositeChange result, IFile file, IProgressMonitor pm) throws CoreException {
 		if (file.exists()) {
 			Change change = PluginManifestChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), getTextChange(file), pm);
 			if (change != null)
@@ -67,7 +66,7 @@ public abstract class PDERenameParticipant extends RenameParticipant implements
 	}
 
 	protected void addBundleManifestChange(CompositeChange result, IProgressMonitor pm) throws CoreException {
-		addBundleManifestChange(fProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR), result, pm);
+		addBundleManifestChange(PDEProject.getManifest(fProject), result, pm);
 	}
 
 	protected void addBundleManifestChange(IFile file, CompositeChange result, IProgressMonitor pm) throws CoreException {
@@ -79,7 +78,7 @@ public abstract class PDERenameParticipant extends RenameParticipant implements
 	}
 
 	protected void addBuildPropertiesChange(CompositeChange result, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getBuildProperties(fProject);
 		if (file.exists()) {
 			Change change = BuildPropertiesChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), pm);
 			if (change != null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PluginManifestChange.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PluginManifestChange.java
index 87ec717..e554e27 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PluginManifestChange.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/PluginManifestChange.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.refactoring;
@@ -17,6 +17,7 @@ import org.eclipse.jdt.core.*;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.ltk.core.refactoring.*;
 import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.ischema.*;
 import org.eclipse.pde.internal.core.schema.SchemaRegistry;
@@ -39,7 +40,7 @@ public class PluginManifestChange {
 
 			try {
 				PluginModelBase model;
-				if ("fragment.xml".equals(file.getName())) //$NON-NLS-1$
+				if (ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR.equals(file.getName()))
 					model = new FragmentModel(document, false);
 				else
 					model = new PluginModel(document, false);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java
index b7c0403..38bf7d0 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenameExtensionPointProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
+ *  Copyright (c) 2007, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -17,8 +17,8 @@ import org.eclipse.ltk.core.refactoring.*;
 import org.eclipse.ltk.core.refactoring.participants.*;
 import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.util.ModelModification;
 import org.eclipse.pde.internal.ui.util.PDEModelUtility;
@@ -109,7 +109,7 @@ public class RenameExtensionPointProcessor extends RefactoringProcessor {
 		IResource res = base.getUnderlyingResource();
 		if (res != null) {
 			IProject proj = res.getProject();
-			IFile file = proj.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
+			IFile file = PDEProject.getPluginXml(proj);
 			if (file.exists())
 				return file;
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenamePluginProcessor.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenamePluginProcessor.java
index dd977de..85ac028 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenamePluginProcessor.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/RenamePluginProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import org.eclipse.ltk.core.refactoring.resource.RenameResourceDescriptor;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.osgi.framework.Constants;
 
@@ -36,7 +36,7 @@ public class RenamePluginProcessor extends RefactoringProcessor {
 		IResource res = fInfo.getBase().getUnderlyingResource();
 		if (res == null)
 			status.addFatalError(PDEUIMessages.RenamePluginProcessor_externalBundleError);
-		else if (!res.getProject().getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR).exists())
+		else if (!PDEProject.getManifest(res.getProject()).exists())
 			status.addFatalError(PDEUIMessages.RenamePluginProcessor_noManifestError);
 		if (fInfo.isRenameProject()) {
 			String newName = fInfo.getNewValue();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ResourceMoveParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ResourceMoveParticipant.java
index 362f739..b7cd084 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ResourceMoveParticipant.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/refactoring/ResourceMoveParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,8 +17,8 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.WorkspaceModelManager;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 public abstract class ResourceMoveParticipant extends PDEMoveParticipant {
 
@@ -39,8 +39,7 @@ public abstract class ResourceMoveParticipant extends PDEMoveParticipant {
 		return false;
 	}
 
-	protected void addChange(CompositeChange result, String filename, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(filename);
+	protected void addChange(CompositeChange result, IFile file, IProgressMonitor pm) throws CoreException {
 		if (file.exists()) {
 			Change change = PluginManifestChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), getTextChange(file), pm);
 			if (change != null)
@@ -60,13 +59,13 @@ public abstract class ResourceMoveParticipant extends PDEMoveParticipant {
 	}
 
 	protected void addChange(CompositeChange result, IProgressMonitor pm) throws CoreException {
-		IFile file = fProject.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getBuildProperties(fProject);
 		if (file.exists()) {
 			Change change = BuildPropertiesChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), pm);
 			if (change != null)
 				result.add(change);
 		}
-		file = fProject.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		file = PDEProject.getManifest(fProject);
 		if (file.exists()) {
 			Change change = BundleManifestChange.createRenameChange(file, fElements.keySet().toArray(), getNewNames(), pm);
 			if (change != null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/FindReferencesAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/FindReferencesAction.java
index 8fbc611..fae4e8f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/FindReferencesAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/FindReferencesAction.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.search;
@@ -15,6 +15,7 @@ import org.eclipse.pde.internal.core.search.*;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.search.ui.ISearchQuery;
+import org.osgi.framework.Version;
 
 public class FindReferencesAction extends BaseSearchAction {
 
@@ -44,14 +45,22 @@ public class FindReferencesAction extends BaseSearchAction {
 			input.setSearchString(((IPlugin) fSelectedObject).getId());
 		} else if (fSelectedObject instanceof IPluginExtensionPoint) {
 			input.setSearchElement(PluginSearchInput.ELEMENT_EXTENSION_POINT);
+			String extensionID = ((IPluginExtensionPoint) fSelectedObject).getId();
 			IPluginModelBase model = ((IPluginExtensionPoint) fSelectedObject).getPluginModel();
-			String id = model.getPluginBase().getId();
-			if (id == null || id.trim().length() == 0)
-				id = fPluginID;
-			if (id == null || id.trim().length() == 0)
-				id = "*"; //$NON-NLS-1$
-			input.setSearchString(id + "." //$NON-NLS-1$
-					+ ((IPluginExtensionPoint) fSelectedObject).getId());
+
+			// Only plug-in xmls created with 3.2 or later support fully qualified names, assume no file version means a > 3.2 version
+			Version fileVersion = new Version(model.getPluginBase().getSchemaVersion());
+			if ((fileVersion == null || fileVersion.compareTo(new Version("3.2")) >= 0) && extensionID.indexOf('.') >= 0) { //$NON-NLS-1$
+				// Fully qualified extension point, don't prefix with plug-in id
+				input.setSearchString(extensionID);
+			} else {
+				String id = model.getPluginBase().getId();
+				if (id == null || id.trim().length() == 0)
+					id = fPluginID;
+				if (id == null || id.trim().length() == 0)
+					id = "*"; //$NON-NLS-1$
+				input.setSearchString(id + "." + extensionID); //$NON-NLS-1$
+			}
 			scope = new ExtensionPluginSearchScope(input);
 		} else if (fSelectedObject instanceof IPluginImport) {
 			input.setSearchElement(PluginSearchInput.ELEMENT_PLUGIN);
@@ -65,5 +74,4 @@ public class FindReferencesAction extends BaseSearchAction {
 		input.setSearchScope((scope == null) ? new PluginSearchScope() : scope);
 		return new PluginSearchQuery(input);
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/SearchResult.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/SearchResult.java
index caba565..f09c4ef 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/SearchResult.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/SearchResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.core.plugin.IPluginObject;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.search.ui.ISearchQuery;
@@ -119,7 +120,7 @@ public class SearchResult extends AbstractTextSearchResult implements IEditorMat
 		if (file != null) {
 			IPath path = new Path(object.getModel().getInstallLocation());
 			IPath filePath = null;
-			if ("MANIFEST.MF".equals(file.getName())) //$NON-NLS-1$
+			if (ICoreConstants.MANIFEST_FILENAME.equals(file.getName()))
 				filePath = new Path(file.getParentFile().getParent());
 			else if (file.getName().endsWith("jar")) { //$NON-NLS-1$
 				filePath = new Path(file.getPath());
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ShowDescriptionAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ShowDescriptionAction.java
index fb93550..4ab1c16 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ShowDescriptionAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/ShowDescriptionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,6 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.browser.IWebBrowser;
 import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.update.core.Utilities;
 
 public class ShowDescriptionAction extends Action {
 	private String fPointID;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewDependenciesOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewDependenciesOperation.java
index f030c22..449e640 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewDependenciesOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/AddNewDependenciesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.pde.internal.core.bundle.BundlePluginBase;
 import org.eclipse.pde.internal.core.converter.PluginConverter;
 import org.eclipse.pde.internal.core.ibundle.*;
 import org.eclipse.pde.internal.core.plugin.PluginImport;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.search.PluginJavaSearchUtil;
 import org.eclipse.pde.internal.core.text.bundle.*;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
@@ -113,7 +114,7 @@ public class AddNewDependenciesOperation extends WorkspaceModifyOperation {
 	}
 
 	protected final IBuild getBuild() {
-		IFile buildProps = fProject.getFile("build.properties"); //$NON-NLS-1$
+		IFile buildProps = PDEProject.getBuildProperties(fProject);
 		if (buildProps != null) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(buildProps);
 			if (model != null)
@@ -347,7 +348,7 @@ public class AddNewDependenciesOperation extends WorkspaceModifyOperation {
 			} else
 				addRequireBundles(plugins, pbase, build.getEntry(IBuildEntry.SECONDARY_DEPENDENCIES));
 			try {
-				build.write("", new PrintWriter(new FileOutputStream(fProject.getFile("build.properties").getFullPath().toFile()))); //$NON-NLS-1$ //$NON-NLS-2$
+				build.write("", new PrintWriter(new FileOutputStream(PDEProject.getBuildProperties(fProject).getFullPath().toFile()))); //$NON-NLS-1$
 			} catch (FileNotFoundException e) {
 			}
 		} else {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
index aea74b2..db46e4b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/CalculateUsesOperation.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.search.dependencies;
@@ -40,6 +40,9 @@ public class CalculateUsesOperation extends WorkspaceModifyOperation {
 			if (packages.isEmpty())
 				return;
 			Map pkgsAndUses = findPackageReferences(packages, monitor);
+			if (monitor.isCanceled()) {
+				return;
+			}
 			handleSetUsesDirectives(pkgsAndUses);
 		} finally {
 			monitor.done();
@@ -68,6 +71,9 @@ public class CalculateUsesOperation extends WorkspaceModifyOperation {
 		IPackageFragment[] frags = PDEJavaHelper.getPackageFragments(jp, Collections.EMPTY_SET, false);
 		monitor.beginTask("", frags.length * 2); //$NON-NLS-1$
 		for (int i = 0; i < frags.length; i++) {
+			if (monitor.isCanceled()) {
+				return pkgsAndUses;
+			}
 			monitor.subTask(NLS.bind(PDEUIMessages.CalculateUsesOperation_calculatingDirective, frags[i].getElementName()));
 			if (packages.contains(frags[i].getElementName())) {
 				HashSet pkgs = new HashSet();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/UnusedImportsDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/UnusedImportsDialog.java
index a025f6f..139afd8 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/UnusedImportsDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dependencies/UnusedImportsDialog.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.search.dependencies;
@@ -52,6 +52,7 @@ public class UnusedImportsDialog extends TrayDialog {
 
 	public UnusedImportsDialog(Shell parentShell, IPluginModelBase model, Object[] unused) {
 		super(parentShell);
+		setShellStyle(getShellStyle() | SWT.RESIZE);
 		this.model = model;
 		this.unused = unused;
 		checkboxTablePart = new WizardCheckboxTablePart(PDEUIMessages.UnusedDependencies_remove);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/FilteredIUSelectionDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/FilteredIUSelectionDialog.java
new file mode 100644
index 0000000..26e7954
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/FilteredIUSelectionDialog.java
@@ -0,0 +1,271 @@
+/******************************************************************************* 
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+*   IBM - Ongoing development
+******************************************************************************/
+package org.eclipse.pde.internal.ui.search.dialogs;
+
+import java.util.Comparator;
+import java.util.Iterator;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.Messages;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
+
+public class FilteredIUSelectionDialog extends FilteredItemsSelectionDialog {
+
+	private Button fShowLatestVersionOnlyButton;
+	private boolean fShowLatestVersionOnly = true;
+	private final IQuery query;
+	private final ILabelProvider fLabelProvider = new IUWrapperLabelProvider();
+
+//	private static final String S_PLUGINS = "showPlugins"; //$NON-NLS-1$
+//	private static final String S_FEATURES = "showFeatures"; //$NON-NLS-1$
+//	private static final String S_PACKAGES = "showPackages"; //$NON-NLS-1$
+//
+//	private static final int TYPE_PLUGIN = 0;
+//	private static final int TYPE_FEATURE = 1;
+//	private static final int TYPE_PACKAGE = 2;
+
+	private class IUWrapperLabelProvider extends LabelProvider implements DelegatingStyledCellLabelProvider.IStyledLabelProvider {
+
+		private PDELabelProvider labelProvider;
+
+		public IUWrapperLabelProvider() {
+			labelProvider = PDEPlugin.getDefault().getLabelProvider();
+			labelProvider.connect(this);
+		}
+
+		public StyledString getStyledText(Object element) {
+			StyledString styledString = new StyledString();
+
+			if (element instanceof IUPackage) {
+				IUPackage iuPackage = (IUPackage) element;
+				styledString.append(iuPackage.getId());
+				styledString.append(' ');
+				styledString.append("(", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+				styledString.append(iuPackage.getVersion().toString(), StyledString.QUALIFIER_STYLER);
+				styledString.append(")", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+			} else if (element instanceof IInstallableUnit) {
+				IInstallableUnit iu = (IInstallableUnit) element;
+				String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+				styledString.append(iu.getId());
+				styledString.append(' ');
+				styledString.append("(", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+				styledString.append(iu.getVersion().toString(), StyledString.QUALIFIER_STYLER);
+				styledString.append(")", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+				styledString.append(" - "); //$NON-NLS-1$
+				styledString.append(name, StyledString.DECORATIONS_STYLER);
+			}
+
+			return styledString;
+		}
+
+		public Image getImage(Object element) {
+			if (element instanceof IUPackage) {
+				return labelProvider.get(PDEPluginImages.DESC_PACKAGE_OBJ);
+			} else if (element instanceof IInstallableUnit) {
+				IInstallableUnit iu = (IInstallableUnit) element;
+				if (QueryUtil.isGroup(iu))
+					return labelProvider.get(PDEPluginImages.DESC_FEATURE_OBJ);
+				return labelProvider.get(PDEPluginImages.DESC_PLUGIN_OBJ);
+			}
+			return null;
+		}
+
+		public String getText(Object element) {
+			StyledString string = getStyledText(element);
+			return string.getString();
+		}
+
+		public void dispose() {
+			labelProvider.disconnect(this);
+		}
+	}
+
+	public FilteredIUSelectionDialog(Shell shell, IQuery query) {
+		super(shell, true);
+		this.query = query;
+		setTitle(PDEUIMessages.FilteredIUSelectionDialog_title);
+		setMessage(PDEUIMessages.FilteredIUSelectionDialog_message);
+		setListLabelProvider(fLabelProvider);
+		setDetailsLabelProvider(fLabelProvider);
+	}
+
+	protected Control createExtendedContentArea(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		composite.setLayout(new GridLayout(1, false));
+		fShowLatestVersionOnlyButton = new Button(composite, SWT.CHECK);
+		fShowLatestVersionOnlyButton.setSelection(true);
+		fShowLatestVersionOnlyButton.setText(PDEUIMessages.FilteredIUSelectionDialog_showLatestVersionOnly);
+		fShowLatestVersionOnlyButton.addSelectionListener(new SelectionAdapter() {
+
+			public void widgetSelected(SelectionEvent e) {
+				fShowLatestVersionOnly = fShowLatestVersionOnlyButton.getSelection();
+				applyFilter();
+			}
+		});
+		return composite;
+	}
+
+	class IUItemsFilter extends ItemsFilter {
+
+		boolean latest = false;
+
+		public IUItemsFilter() {
+			latest = fShowLatestVersionOnly;
+		}
+
+		public boolean matchItem(Object item) {
+			if (item instanceof IUPackage)
+				return patternMatcher.matches(((IUPackage) item).getId());
+			else if (item instanceof IInstallableUnit)
+				return isIUMatch((IInstallableUnit) item);
+
+			return false;
+		}
+
+		public boolean isConsistentItem(Object item) {
+			return true;
+		}
+
+		public boolean isSubFilter(ItemsFilter filter) {
+			if (latest != ((IUItemsFilter) filter).latest)
+				return false;
+			return super.isSubFilter(filter);
+		}
+
+		public boolean equalsFilter(ItemsFilter obj) {
+			if (latest != ((IUItemsFilter) obj).latest)
+				return false;
+			return super.equals(obj);
+		}
+
+		public boolean isIUMatch(IInstallableUnit iu) {
+			if (iu.getFragments() != null && iu.getFragments().size() > 0)
+				return false;
+
+			String id = iu.getId();
+			String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
+			if (name == null || name.startsWith("%")) //$NON-NLS-1$
+				name = ""; //$NON-NLS-1$
+			if (patternMatcher.matches(id) || patternMatcher.matches(name)) {
+				return true;
+			}
+
+			return false;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
+	 */
+	protected ItemsFilter createFilter() {
+		return new IUItemsFilter();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException {
+		// TODO clean up this code a bit...
+		IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.IUBundleContainer_7));
+		IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+
+		//URI[] knownRepositories = metadataManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
+		IQuery pipedQuery;
+		if (fShowLatestVersionOnly)
+			pipedQuery = QueryUtil.createPipeQuery(query, QueryUtil.createLatestIUQuery());
+		else
+			pipedQuery = query;
+
+		Iterator iter = manager.query(pipedQuery, progressMonitor).iterator();
+		while (iter.hasNext()) {
+			IInstallableUnit iu = (IInstallableUnit) iter.next();
+			Iterator pcIter = iu.getProvidedCapabilities().iterator();
+			while (pcIter.hasNext()) {
+				IProvidedCapability pc = (IProvidedCapability) pcIter.next();
+				if (pc.getNamespace().equals("java.package")) { //$NON-NLS-1$
+					IUPackage pkg = new IUPackage(pc.getName(), pc.getVersion(), iu);
+					contentProvider.add(pkg, itemsFilter);
+				}
+			}
+			contentProvider.add(iu, itemsFilter);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getDialogSettings()
+	 */
+	protected IDialogSettings getDialogSettings() {
+		return new DialogSettings("org.eclipse.pde.internal.ui.search.dialogs.FilteredTargetRepoIUSelectionDialog"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getElementName(java.lang.Object)
+	 */
+	public String getElementName(Object item) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#getItemsComparator()
+	 */
+	protected Comparator getItemsComparator() {
+		return new Comparator() {
+			public int compare(Object o1, Object o2) {
+				String id1 = null;
+				String id2 = null;
+
+				if (o1 instanceof IUPackage) {
+					id1 = ((IUPackage) o1).getId();
+				} else if (o1 instanceof IInstallableUnit) {
+					id1 = ((IInstallableUnit) o1).getId();
+				} else {
+					return 0;
+				}
+
+				if (o2 instanceof IUPackage) {
+					id2 = ((IUPackage) o2).getId();
+				} else if (o2 instanceof IInstallableUnit) {
+					id2 = ((IInstallableUnit) o2).getId();
+				} else {
+					return 0;
+				}
+
+				return id1.compareTo(id2);
+			}
+		};
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#validateItem(java.lang.Object)
+	 */
+	protected IStatus validateItem(Object item) {
+		return Status.OK_STATUS;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/IUPackage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/IUPackage.java
new file mode 100644
index 0000000..72127a0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/IUPackage.java
@@ -0,0 +1,62 @@
+/******************************************************************************* 
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+*   IBM - Further improvements
+******************************************************************************/
+package org.eclipse.pde.internal.ui.search.dialogs;
+
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.Version;
+
+/**
+ * Wrapper containing a java package and the installable unit that represents it in the
+ * p2 metadata.
+ * 
+ * @since 3.6
+ */
+public class IUPackage {
+
+	private final IInstallableUnit iu;
+	private final String packageName;
+	private final Version version;
+
+	/**
+	 * Creates a new wrapper
+	 * 
+	 * @param packageName name of the package, must not be <code>null</code>
+	 * @param version version of the package, must not be <code>null</code>
+	 * @param iu installable unit associated with this package, must not be <code>null</code>
+	 */
+	public IUPackage(String packageName, Version version, IInstallableUnit iu) {
+		this.packageName = packageName;
+		this.version = version;
+		this.iu = iu;
+	}
+
+	/**
+	 * @return the iu representing this package
+	 */
+	public IInstallableUnit getIU() {
+		return iu;
+	}
+
+	/**
+	 * @return the version of this package
+	 */
+	public Version getVersion() {
+		return version;
+	}
+
+	/**
+	 * @return the id of this package
+	 */
+	public String getId() {
+		return packageName;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/TargetRepositorySearchHandler.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/TargetRepositorySearchHandler.java
new file mode 100644
index 0000000..701cdf8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/search/dialogs/TargetRepositorySearchHandler.java
@@ -0,0 +1,98 @@
+/******************************************************************************* 
+* Copyright (c) 2010 EclipseSource and others. All rights reserved. This
+* program and the accompanying materials are made available under the terms of
+* the Eclipse Public License v1.0 which accompanies this distribution, and is
+* available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   EclipseSource - initial API and implementation
+*   IBM - Further improvements
+******************************************************************************/
+package org.eclipse.pde.internal.ui.search.dialogs;
+
+import java.net.URI;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.commands.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.jface.window.Window;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.IUBundleContainer;
+import org.eclipse.pde.internal.core.target.provisional.*;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Command handler that pops up an IU selection dialog, the result of which is added to the active
+ *  target.
+ *  
+ *  @since 3.6
+ */
+public class TargetRepositorySearchHandler extends AbstractHandler implements IHandler {
+
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+		IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+
+		// create the query for packages, features and bundles
+		IQuery query = QueryUtil.createMatchQuery("properties[$0] == true || providedCapabilities.exists(p | p.namespace == 'osgi.bundle')", new Object[] {MetadataFactory.InstallableUnitDescription.PROP_TYPE_GROUP}); //$NON-NLS-1$
+		//IQuery query = QueryUtil.createIUAnyQuery();
+
+		FilteredIUSelectionDialog dialog = new FilteredIUSelectionDialog(window.getShell(), query);
+		String pattern = event.getParameter("org.eclipse.pde.ui.searchTargetRepositories.term"); //$NON-NLS-1$
+		if (pattern != null)
+			dialog.setInitialPattern(pattern);
+		int status = dialog.open();
+		if (status == Window.OK) {
+			Object[] result = dialog.getResult();
+			if (result != null) {
+				Set set = new HashSet();
+				for (int i = 0; i < result.length; i++) {
+					if (result[i] instanceof IUPackage)
+						set.add(((IUPackage) result[i]).getIU());
+					else if (result[i] instanceof IInstallableUnit)
+						set.add(result[i]);
+				}
+				IInstallableUnit[] units = (IInstallableUnit[]) set.toArray(new IInstallableUnit[set.size()]);
+				try {
+					installIntoActiveTarget(units, null);
+				} catch (CoreException e) {
+					PDEPlugin.log(e);
+				}
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Creates a new IUBundleContainer, adds it to the active target, then reloads the active target.
+	 * 
+	 * @param units new installable units to include in the container
+	 * @param repositories list of repositories the container can use as a context or <code>null</code> to use all available repos
+	 */
+	private static void installIntoActiveTarget(IInstallableUnit[] units, URI[] repositories) throws CoreException {
+		ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName());
+		ITargetHandle currentTarget = service.getWorkspaceTargetHandle();
+		ITargetDefinition definition = currentTarget.getTargetDefinition();
+		IUBundleContainer container = (IUBundleContainer) service.newIUContainer(units, repositories);
+		// Force the target into slicer mode as all requirements may not be available
+		container.setIncludeAllRequired(false, definition);
+		container.setIncludeAllEnvironments(true, definition);
+		IBundleContainer[] oldContainers = definition.getBundleContainers();
+		if (oldContainers == null) {
+			definition.setBundleContainers(new IBundleContainer[] {container});
+		} else {
+			IBundleContainer[] newContainers = new IBundleContainer[oldContainers.length + 1];
+			System.arraycopy(oldContainers, 0, newContainers, 0, oldContainers.length);
+			newContainers[newContainers.length - 1] = container;
+			definition.setBundleContainers(newContainers);
+			service.saveTargetDefinition(definition);
+			LoadTargetDefinitionJob job = new LoadTargetDefinitionJob(definition);
+			job.schedule();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java
new file mode 100644
index 0000000..7d70d24
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/CachedCheckboxTreeViewer.java
@@ -0,0 +1,258 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared;
+
+import java.util.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
+
+/**
+ * Copy of ContainerCheckedTreeViewer which is specialized for use
+ * with {@link FilteredCheckboxTree}.  This container caches
+ * the check state of leaf nodes in the tree.  When a filter
+ * is applied the cache stores which nodes are checked.  When
+ * a filter is removed the viewer can be told to restore check
+ * state from the cache.  This viewer updates the check state of
+ * parent items the same way as {@link CachedCheckboxTreeViewer}
+ * <p>
+ * Note: If duplicate items are added to the tree the cache will treat them
+ * as a single entry.
+ * </p>
+ */
+public class CachedCheckboxTreeViewer extends ContainerCheckedTreeViewer {
+
+	private Set checkState = new HashSet();
+
+	/**
+	 * Constructor for ContainerCheckedTreeViewer.
+	 * @see CheckboxTreeViewer#CheckboxTreeViewer(Tree)
+	 */
+	protected CachedCheckboxTreeViewer(Tree tree) {
+		super(tree);
+		addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				updateCheckState(event.getElement(), event.getChecked());
+			}
+		});
+		setUseHashlookup(true);
+	}
+
+	protected void updateCheckState(Object element, boolean state) {
+		if (state) {
+			// Add the item (or its children) to the cache
+			if (checkState == null) {
+				checkState = new HashSet();
+			}
+
+			ITreeContentProvider contentProvider = null;
+			if (getContentProvider() instanceof ITreeContentProvider) {
+				contentProvider = (ITreeContentProvider) getContentProvider();
+			}
+
+			if (contentProvider != null) {
+				Object[] children = contentProvider.getChildren(element);
+				if (children != null && children.length > 0) {
+					for (int i = 0; i < children.length; i++) {
+						updateCheckState(children[i], state);
+					}
+				} else {
+					checkState.add(element);
+				}
+			} else {
+				checkState.add(element);
+			}
+		} else if (checkState != null) {
+			// Remove the item (or its children) from the cache
+			ITreeContentProvider contentProvider = null;
+			if (getContentProvider() instanceof ITreeContentProvider) {
+				contentProvider = (ITreeContentProvider) getContentProvider();
+			}
+
+			if (contentProvider != null) {
+				Object[] children = contentProvider.getChildren(element);
+				if (children.length > 0) {
+					for (int i = 0; i < children.length; i++) {
+						updateCheckState(children[i], state);
+					}
+
+				}
+			}
+			checkState.remove(element);
+		}
+	}
+
+	/**
+	 * Restores the checked state of items based on the cached check state.  This
+	 * will only check leaf nodes, but parent items will be updated by the container
+	 * viewer.  No events will be fired.
+	 */
+	public void restoreLeafCheckState() {
+		if (checkState == null)
+			return;
+
+		getTree().setRedraw(false);
+		// Call the super class so we don't mess up the cache
+		super.setCheckedElements(new Object[0]);
+		setGrayedElements(new Object[0]);
+		// Now we are only going to set the check state of the leaf nodes
+		// and rely on our container checked code to update the parents properly.
+		Iterator iter = checkState.iterator();
+		Object element = null;
+		if (iter.hasNext())
+			expandAll();
+		while (iter.hasNext()) {
+			element = iter.next();
+			// Call the super class as there is no need to update the check state
+			super.setChecked(element, true);
+		}
+		getTree().setRedraw(true);
+	}
+
+	/**
+	 * Returns the contents of the cached check state.  The contents will be all
+	 * checked leaf nodes ignoring any filters.
+	 * 
+	 * @return checked leaf elements
+	 */
+	public Object[] getCheckedLeafElements() {
+		if (checkState == null) {
+			return new Object[0];
+		}
+		return checkState.toArray(new Object[checkState.size()]);
+	}
+
+	/**
+	 * Returns the number of leaf nodes checked.  This method uses its internal check
+	 * state cache to determine what has been checked, not what is visible in the viewer.
+	 * The cache does not count duplicate items in the tree.
+	 * 
+	 * @return number of leaf nodes checked according to the cached check state
+	 */
+	public int getCheckedLeafCount() {
+		if (checkState == null) {
+			return 0;
+		}
+		return checkState.size();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ICheckable#setChecked(java.lang.Object, boolean)
+	 */
+	public boolean setChecked(Object element, boolean state) {
+		updateCheckState(element, state);
+		return super.setChecked(element, state);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.CheckboxTreeViewer#setCheckedElements(java.lang.Object[])
+	 */
+	public void setCheckedElements(Object[] elements) {
+		super.setCheckedElements(elements);
+		if (checkState == null) {
+			checkState = new HashSet();
+		} else {
+			checkState.clear();
+		}
+		ITreeContentProvider contentProvider = null;
+		if (getContentProvider() instanceof ITreeContentProvider) {
+			contentProvider = (ITreeContentProvider) getContentProvider();
+		}
+
+		for (int i = 0; i < elements.length; i++) {
+			Object[] children = contentProvider != null ? contentProvider.getChildren(elements[i]) : null;
+			if (!getGrayed(elements[i]) && (children == null || children.length == 0)) {
+				if (!checkState.contains(elements[i])) {
+					checkState.add(elements[i]);
+				}
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.CheckboxTreeViewer#setAllChecked(boolean)
+	 */
+	public void setAllChecked(boolean state) {
+		super.setAllChecked(state);
+		if (state) {
+
+			// Find all visible children, add only the visible leaf nodes to the check state cache
+			Object[] visible = getFilteredChildren(getRoot());
+			if (checkState == null) {
+				checkState = new HashSet();
+			}
+
+			ITreeContentProvider contentProvider = null;
+			if (getContentProvider() instanceof ITreeContentProvider) {
+				contentProvider = (ITreeContentProvider) getContentProvider();
+			}
+
+			if (contentProvider == null) {
+				for (int i = 0; i < visible.length; i++) {
+					checkState.add(visible[i]);
+				}
+			} else {
+				Set toCheck = new HashSet();
+				for (int i = 0; i < visible.length; i++) {
+					addFilteredChildren(visible[i], contentProvider, toCheck);
+				}
+				checkState.addAll(toCheck);
+			}
+		} else {
+			// Remove any item in the check state that is visible (passes the filters)
+			if (checkState != null) {
+				Object[] visible = filter(checkState.toArray());
+				for (int i = 0; i < visible.length; i++) {
+					checkState.remove(visible[i]);
+				}
+			}
+		}
+	}
+
+	/**
+	 * If the element is a leaf node, it is added to the result collection.  If the element has
+	 * children, this method will recursively look at the children and add any visible leaf nodes
+	 * to the collection.
+	 * 
+	 * @param element element to check
+	 * @param contentProvider tree content provider to check for children
+	 * @param result collection to collect leaf nodes in
+	 */
+	private void addFilteredChildren(Object element, ITreeContentProvider contentProvider, Collection result) {
+		if (!contentProvider.hasChildren(element)) {
+			result.add(element);
+		} else {
+			Object[] visibleChildren = getFilteredChildren(element);
+			for (int i = 0; i < visibleChildren.length; i++) {
+				addFilteredChildren(visibleChildren[i], contentProvider, result);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object[])
+	 */
+	public void remove(Object[] elementsOrTreePaths) {
+		for (int i = 0; i < elementsOrTreePaths.length; i++) {
+			updateCheckState(elementsOrTreePaths[i], false);
+		}
+		super.remove(elementsOrTreePaths);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object)
+	 */
+	public void remove(Object elementsOrTreePaths) {
+		updateCheckState(elementsOrTreePaths, false);
+		super.remove(elementsOrTreePaths);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/FilteredCheckboxTree.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/FilteredCheckboxTree.java
new file mode 100644
index 0000000..d65477d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/FilteredCheckboxTree.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ *  Copyright (c) 2010 IBM Corporation and others.
+ *  All rights reserved. This program and the accompanying materials
+ *  are made available under the terms of the Eclipse Public License v1.0
+ *  which accompanies this distribution, and is available at
+ *  http://www.eclipse.org/legal/epl-v10.html
+ * 
+ *  Contributors:
+ *      IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.shared;
+
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.progress.WorkbenchJob;
+
+/**
+ * A FilteredCheckboxTree implementation to be used internally in PDE UI code.  This tree stores 
+ * all the tree elements internally, and keeps the check state in sync.  This way, even if an 
+ * element is filtered, the caller can get and set the checked state.
+ * 
+ * @since 3.6
+ */
+public class FilteredCheckboxTree extends FilteredTree {
+
+	private static final long FILTER_DELAY = 400;
+
+	FormToolkit fToolkit;
+	CachedCheckboxTreeViewer checkboxViewer;
+
+	/**
+	 * Constructor that creates a tree with preset style bits and a CachedContainerCheckedTreeViewer for the tree.
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit optional toolkit to create UI elements with, required if the tree is being created in a form editor
+	 */
+	public FilteredCheckboxTree(Composite parent, FormToolkit toolkit) {
+		this(parent, toolkit, SWT.NONE);
+	}
+
+	/**
+	 * Constructor that creates a tree with preset style bits and a CachedContainerCheckedTreeViewer for the tree.
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit optional toolkit to create UI elements with, required if the tree is being created in a form editor
+	 */
+	public FilteredCheckboxTree(Composite parent, FormToolkit toolkit, int treeStyle) {
+		this(parent, toolkit, treeStyle, new PatternFilter());
+	}
+
+	/**
+	 * Constructor that creates a tree with preset style bits and a CachedContainerCheckedTreeViewer for the tree.
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit optional toolkit to create UI elements with, required if the tree is being created in a form editor
+	 * @param filter pattern filter to use in the filter control
+	 */
+	public FilteredCheckboxTree(Composite parent, FormToolkit toolkit, int treeStyle, PatternFilter filter) {
+		super(parent, true);
+		fToolkit = toolkit;
+		init(treeStyle, filter);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateTreeViewer(org.eclipse.swt.widgets.Composite, int)
+	 */
+	protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
+		int treeStyle = style | SWT.CHECK | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER;
+		Tree tree = null;
+		if (fToolkit != null) {
+			tree = fToolkit.createTree(parent, treeStyle);
+		} else {
+			tree = new Tree(parent, treeStyle);
+		}
+
+		checkboxViewer = new CachedCheckboxTreeViewer(tree);
+		return checkboxViewer;
+	}
+
+	/*
+	 * Overridden to hook a listener on the job and set the deferred content provider
+	 * to synchronous mode before a filter is done.
+	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateRefreshJob()
+	 */
+	protected WorkbenchJob doCreateRefreshJob() {
+		WorkbenchJob filterJob = super.doCreateRefreshJob();
+		filterJob.addJobChangeListener(new JobChangeAdapter() {
+			public void done(IJobChangeEvent event) {
+				if (event.getResult().isOK()) {
+					getDisplay().asyncExec(new Runnable() {
+						public void run() {
+							if (checkboxViewer.getTree().isDisposed())
+								return;
+							checkboxViewer.restoreLeafCheckState();
+						}
+					});
+				}
+			}
+		});
+		return filterJob;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateFilterText(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Text doCreateFilterText(Composite parent) {
+		// Overridden so the text gets create using the toolkit if we have one
+		Text parentText = super.doCreateFilterText(parent);
+		if (fToolkit != null) {
+			int style = parentText.getStyle();
+			parentText.dispose();
+			return fToolkit.createText(parent, null, style);
+		}
+		return parentText;
+	}
+
+	public CachedCheckboxTreeViewer getCheckboxTreeViewer() {
+		return checkboxViewer;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.FilteredTree#getRefreshJobDelay()
+	 */
+	protected long getRefreshJobDelay() {
+		return FILTER_DELAY;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddBundleContainerSelectionPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddBundleContainerSelectionPage.java
index 9e7d20f..7fafa47 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddBundleContainerSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddBundleContainerSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,12 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.shared.target;
 
+import org.eclipse.equinox.p2.engine.IProfile;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.wizard.*;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
index 6170f2a..80bb121 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/AddFeatureContainersPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -253,7 +253,7 @@ public class AddFeatureContainersPage extends EditDirectoryContainerPage {
 		for (int i = 0; i < dirs.length; i++) {
 			File dir = dirs[i];
 			if (dir.isDirectory()) {
-				File manifest = new File(dir, "feature.xml"); //$NON-NLS-1$
+				File manifest = new File(dir, ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 				if (manifest.exists()) {
 					IStatus status = doLoadFeature(dir, manifest, result);
 					if (status != null)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ArgumentsFromContainerSelectionDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ArgumentsFromContainerSelectionDialog.java
index 1f8a111..c0a7835 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ArgumentsFromContainerSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/ArgumentsFromContainerSelectionDialog.java
@@ -45,8 +45,6 @@ public class ArgumentsFromContainerSelectionDialog extends TrayDialog {
 
 	public ArgumentsFromContainerSelectionDialog(Shell shell, ITargetDefinition target) {
 		super(shell);
-
-		// TODO Add help documentation
 		fTarget = target;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditDirectoryContainerPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditDirectoryContainerPage.java
index b9e094a..3408bac 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditDirectoryContainerPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditDirectoryContainerPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.target.AbstractBundleContainer;
-import org.eclipse.pde.internal.core.target.DirectoryBundleContainer;
 import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
 import org.eclipse.pde.internal.core.target.provisional.ITargetPlatformService;
 import org.eclipse.pde.internal.ui.*;
@@ -341,12 +340,7 @@ public class EditDirectoryContainerPage extends WizardPage implements IEditBundl
 	 * @throws CoreException
 	 */
 	protected IBundleContainer createContainer(IBundleContainer previous) throws CoreException {
-		IBundleContainer container = getTargetPlatformService().newDirectoryContainer(fInstallLocation.getText());
-		if (previous instanceof DirectoryBundleContainer) {
-			container.setIncludedBundles(previous.getIncludedBundles());
-			container.setOptionalBundles(previous.getOptionalBundles());
-		}
-		return container;
+		return getTargetPlatformService().newDirectoryContainer(fInstallLocation.getText());
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditIUContainerPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditIUContainerPage.java
index 5351482..947e48b 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditIUContainerPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditIUContainerPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,23 +7,27 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Sonatype, Inc. - ongoing development
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.shared.target;
 
 import java.net.URI;
 import java.net.URISyntaxException;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
-import org.eclipse.equinox.internal.provisional.p2.ui.actions.PropertyDialogAction;
-import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.provisional.p2.ui.policy.*;
+import org.eclipse.equinox.internal.p2.ui.ProvUI;
+import org.eclipse.equinox.internal.p2.ui.actions.PropertyDialogAction;
+import org.eclipse.equinox.internal.p2.ui.dialogs.*;
+import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.ui.Policy;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.window.SameShellProvider;
 import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.target.IUBundleContainer;
 import org.eclipse.pde.internal.core.target.provisional.*;
@@ -80,6 +84,7 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 
 	private RepositorySelectionGroup fRepoSelector;
 	private AvailableIUGroup fAvailableIUGroup;
+	private Label fSelectionCount;
 	private Button fPropertiesButton;
 	private IAction fPropertyAction;
 	private Button fShowCategoriesButton;
@@ -87,6 +92,7 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 	private Button fIncludeRequiredButton;
 	private Button fAllPlatformsButton;
 	private Text fDetailsText;
+	private ProvisioningUI profileUI;
 
 	/**
 	 * Constructor for creating a new container
@@ -98,6 +104,11 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 		setMessage(Messages.EditIUContainerPage_6);
 		fTarget = definition;
 		fProfile = profile;
+		ProvisioningUI selfProvisioningUI = ProvisioningUI.getDefaultUI();
+		// TODO we use the service session from the self profile.  In the future we may want
+		// to set up our own services for the profile (separate repo managers, etc).
+		// We use our own new policy so we don't bash the SDK's settings.
+		profileUI = new ProvisioningUI(selfProvisioningUI.getSession(), profile.getProfileId(), new Policy());
 	}
 
 	/**
@@ -150,7 +161,6 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 		createDetailsArea(composite);
 		createCheckboxArea(composite);
 
-		setPageComplete(false);
 		restoreWidgetState();
 		setControl(composite);
 		setPageComplete(false);
@@ -166,9 +176,8 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 	 * @param parent parent composite
 	 */
 	private void createRepositoryComboArea(Composite parent) {
-		Policy policy = new Policy();
-		policy.setRepositoryManipulator(new ColocatedRepositoryManipulator(policy, null));
-		fRepoSelector = new RepositorySelectionGroup(getContainer(), parent, policy, fQueryContext);
+		profileUI.getPolicy().setRepositoryPreferencePageId(null);
+		fRepoSelector = new RepositorySelectionGroup(profileUI, getContainer(), parent, fQueryContext);
 		fRepoSelector.addRepositorySelectionListener(new IRepositorySelectionListener() {
 			public void repositorySelectionChanged(int repoChoice, URI repoLocation) {
 				fAvailableIUGroup.setRepositoryFilter(repoChoice, repoLocation);
@@ -191,13 +200,22 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 	 * @param parent parent composite
 	 */
 	private void createAvailableIUArea(Composite parent) {
-		fAvailableIUGroup = new AvailableIUGroup(parent);
+		int filterConstant = AvailableIUGroup.AVAILABLE_NONE;
+		if (!profileUI.getPolicy().getRepositoriesVisible())
+			filterConstant = AvailableIUGroup.AVAILABLE_ALL;
+		fAvailableIUGroup = new AvailableIUGroup(profileUI, parent, parent.getFont(), fQueryContext, null, filterConstant);
 		fAvailableIUGroup.getCheckboxTreeViewer().addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
 				IInstallableUnit[] units = fAvailableIUGroup.getCheckedLeafIUs();
 				if (units.length > 0) {
+					if (units.length == 1) {
+						fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemSelected, Integer.toString(units.length)));
+					} else {
+						fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemsSelected, Integer.toString(units.length)));
+					}
 					fSelectedIUStatus = Status.OK_STATUS;
 				} else {
+					fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemsSelected, Integer.toString(0)));
 					fSelectedIUStatus = BAD_IU_SELECTION;
 				}
 				pageChanged();
@@ -213,6 +231,8 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 		fAvailableIUGroup.setUseBoldFontForFilteredItems(true);
 		GridData data = (GridData) fAvailableIUGroup.getStructuredViewer().getControl().getLayoutData();
 		data.heightHint = 200;
+
+		fSelectionCount = SWTFactory.createLabel(parent, NLS.bind(Messages.EditIUContainerPage_itemsSelected, Integer.toString(0)), 1);
 	}
 
 	/**
@@ -309,7 +329,7 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 	 * Creates a default query context to setup the available IU Group
 	 */
 	private void createQueryContext() {
-		fQueryContext = Policy.getDefault().getQueryContext();
+		fQueryContext = ProvUI.getQueryContext(ProvisioningUI.getDefaultUI().getPolicy());
 		fQueryContext.setInstalledProfileId(fProfile.getProfileId());
 		fQueryContext.showAlreadyInstalled();
 	}
@@ -331,14 +351,14 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 	 * Update the details section of the page using the currently selected IU
 	 */
 	private void updateDetails() {
-		IInstallableUnit[] selected = fAvailableIUGroup.getSelectedIUs();
+		IInstallableUnit[] selected = (IInstallableUnit[]) fAvailableIUGroup.getSelectedIUs().toArray(new IInstallableUnit[0]);
 		if (selected.length == 1) {
 			StringBuffer result = new StringBuffer();
-			String description = IUPropertyUtils.getIUProperty(selected[0], IInstallableUnit.PROP_DESCRIPTION);
+			String description = selected[0].getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
 			if (description != null) {
 				result.append(description);
 			} else {
-				String name = IUPropertyUtils.getIUProperty(selected[0], IInstallableUnit.PROP_NAME);
+				String name = selected[0].getProperty(IInstallableUnit.PROP_NAME, null);
 				if (name != null)
 					result.append(name);
 				else
@@ -377,6 +397,9 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 		if (fSelectedIUStatus.getSeverity() == IStatus.ERROR) {
 			setErrorMessage(fSelectedIUStatus.getMessage());
 			setPageComplete(false);
+		} else if (fAvailableIUGroup != null && fAvailableIUGroup.getCheckedLeafIUs().length == 0) {
+			// On page load and when sites are selected, we might not have an error status, but we want finish to remain disabled
+			setPageComplete(false);
 		} else {
 			setErrorMessage(null);
 			setPageComplete(true);
@@ -406,6 +429,9 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 					PDEPlugin.log(e);
 				}
 			}
+		}
+
+		if (settings != null) {
 			if (settings.get(SETTINGS_GROUP_BY_CATEGORY) != null) {
 				showCategories = settings.getBoolean(SETTINGS_GROUP_BY_CATEGORY);
 			}
@@ -474,6 +500,13 @@ public class EditIUContainerPage extends WizardPage implements IEditBundleContai
 				IInstallableUnit[] units = fAvailableIUGroup.getCheckedLeafIUs();
 				if (units.length > 0) {
 					fAvailableIUGroup.getCheckboxTreeViewer().setSelection(new StructuredSelection(units[0]), true);
+					if (units.length == 1) {
+						fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemSelected, Integer.toString(units.length)));
+					} else {
+						fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemsSelected, Integer.toString(units.length)));
+					}
+				} else {
+					fSelectionCount.setText(NLS.bind(Messages.EditIUContainerPage_itemsSelected, Integer.toString(0))); //$NON-NLS-1$
 				}
 				fAvailableIUGroup.getCheckboxTreeViewer().collapseAll();
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditProfileContainerPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditProfileContainerPage.java
index 661db95..46204af 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditProfileContainerPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/EditProfileContainerPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -278,12 +278,7 @@ public class EditProfileContainerPage extends EditDirectoryContainerPage {
 	 * @see org.eclipse.pde.internal.ui.shared.target.EditDirectoryContainerPage#refreshContainer(org.eclipse.pde.internal.core.target.provisional.IBundleContainer)
 	 */
 	protected IBundleContainer createContainer(IBundleContainer previous) throws CoreException {
-		IBundleContainer container = getTargetPlatformService().newProfileContainer(fInstallLocation.getText(), fConfigLocation.isEnabled() ? fConfigLocation.getText() : null);
-		if (previous instanceof ProfileBundleContainer) {
-			container.setIncludedBundles(previous.getIncludedBundles());
-			container.setOptionalBundles(previous.getOptionalBundles());
-		}
-		return container;
+		return getTargetPlatformService().newProfileContainer(fInstallLocation.getText(), fConfigLocation.isEnabled() ? fConfigLocation.getText() : null);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
index 34915d2..993f511 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2009 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -62,7 +62,6 @@ public class Messages extends NLS {
 	public static String BundleContainerTable_14;
 	public static String BundleContainerTable_15;
 	public static String BundleContainerTable_2;
-	public static String BundleContainerTable_3;
 	public static String BundleContainerTable_8;
 	public static String BundleContainerTable_9;
 	public static String EditBundleContainerWizard_0;
@@ -91,6 +90,8 @@ public class Messages extends NLS {
 	public static String EditIUContainerPage_7;
 	public static String EditIUContainerPage_8;
 	public static String EditIUContainerPage_9;
+	public static String EditIUContainerPage_itemSelected;
+	public static String EditIUContainerPage_itemsSelected;
 	public static String EditProfileContainerPage_1;
 	public static String EditProfileContainerPage_2;
 	public static String EditProfileContainerPage_3;
@@ -110,14 +111,18 @@ public class Messages extends NLS {
 	public static String TargetContentsGroup_1;
 	public static String TargetContentsGroup_10;
 	public static String TargetContentsGroup_11;
-	public static String TargetContentsGroup_12;
-	public static String TargetContentsGroup_13;
 	public static String TargetContentsGroup_2;
 	public static String TargetContentsGroup_3;
 	public static String TargetContentsGroup_4;
 	public static String TargetContentsGroup_5;
 	public static String TargetContentsGroup_8;
 	public static String TargetContentsGroup_9;
+	public static String TargetContentsGroup_collapseAll;
+	public static String TargetContentsGroup_FeatureMode;
+	public static String TargetContentsGroup_ManageUsing;
+	public static String TargetContentsGroup_OtherPluginsParent;
+	public static String TargetContentsGroup_PluginMode;
+	public static String TargetContentsGroup_resolveCancelled;
 	public static String TargetLocationsGroup_1;
 	static {
 		// initialize resource bundle
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/PreviewContainerPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/PreviewContainerPage.java
index ce858a7..f52ea64 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/PreviewContainerPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/PreviewContainerPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ public class PreviewContainerPage extends WizardPage {
 		}
 
 		if (container.isResolved()) {
-			fInput = container.getAllBundles();
+			fInput = container.getBundles();
 			fPreviewTable.setInput(fInput);
 			return;
 		}
@@ -83,7 +83,7 @@ public class PreviewContainerPage extends WizardPage {
 					} else if (!result.isOK() && !result.isMultiStatus()) {
 						fInput = new Object[] {result};
 					} else {
-						fInput = container.getAllBundles();
+						fInput = container.getBundles();
 					}
 
 				}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
index d31e964..88f1f36 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/StyledBundleLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,16 +13,17 @@ package org.eclipse.pde.internal.ui.shared.target;
 import com.ibm.icu.text.MessageFormat;
 import java.net.URI;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.ui.IUPropertyUtils;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
 import org.eclipse.pde.internal.core.target.*;
-import org.eclipse.pde.internal.core.target.provisional.IBundleContainer;
-import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
+import org.eclipse.pde.internal.core.target.provisional.*;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.pde.internal.ui.shared.target.TargetLocationsGroup.IUWrapper;
 import org.eclipse.pde.internal.ui.util.SharedLabelProvider;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.ISharedImages;
@@ -37,6 +38,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 
 	private boolean fShowVersion = true;
 	private boolean fAppendResolvedVariables = false;
+	private TranslationSupport fTranslations;
 
 	/**
 	 * Creates a label provider.
@@ -49,6 +51,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 		PDEPlugin.getDefault().getLabelProvider().connect(this);
 		fShowVersion = showVersion;
 		fAppendResolvedVariables = appendResolvedVariables;
+		fTranslations = TranslationSupport.getInstance();
 	}
 
 	/* (non-Javadoc)
@@ -75,6 +78,8 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 		StyledString styledString = new StyledString();
 		if (element instanceof BundleInfo) {
 			appendBundleInfo(styledString, ((BundleInfo) element));
+		} else if (element instanceof NameVersionDescriptor) {
+			appendBundleInfo(styledString, new BundleInfo(((NameVersionDescriptor) element).getId(), ((NameVersionDescriptor) element).getVersion(), null, BundleInfo.NO_LEVEL, false));
 		} else if (element instanceof IResolvedBundle) {
 			IResolvedBundle bundle = ((IResolvedBundle) element);
 			if (bundle.getStatus().isOK()) {
@@ -87,6 +92,9 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			styledString.append(((IStatus) element).getMessage());
 		} else if (element instanceof IPath) {
 			styledString.append(((IPath) element).removeFirstSegments(1).toString());
+		} else if (element instanceof IFeatureModel) {
+			// Use a bundle info to reuse existing code
+			appendBundleInfo(styledString, new BundleInfo(((IFeatureModel) element).getFeature().getId(), ((IFeatureModel) element).getFeature().getVersion(), null, BundleInfo.NO_LEVEL, false));
 		} else if (element instanceof FeatureBundleContainer) {
 			FeatureBundleContainer container = (FeatureBundleContainer) element;
 			styledString.append(container.getFeatureId());
@@ -101,7 +109,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 				appendLocation(styledString, container, true);
 			}
 			appendLocation(styledString, container, false);
-			appendIncludedBundles(styledString, container);
+			appendBundleCount(styledString, container);
 		} else if (element instanceof DirectoryBundleContainer) {
 			DirectoryBundleContainer container = (DirectoryBundleContainer) element;
 			try {
@@ -112,7 +120,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			if (fAppendResolvedVariables) {
 				appendLocation(styledString, container, true);
 			}
-			appendIncludedBundles(styledString, container);
+			appendBundleCount(styledString, container);
 		} else if (element instanceof ProfileBundleContainer) {
 			ProfileBundleContainer container = (ProfileBundleContainer) element;
 			try {
@@ -123,7 +131,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			if (fAppendResolvedVariables) {
 				appendLocation(styledString, container, true);
 			}
-			appendIncludedBundles(styledString, container);
+			appendBundleCount(styledString, container);
 		} else if (element instanceof IUBundleContainer) {
 			IUBundleContainer container = (IUBundleContainer) element;
 			URI[] repos = container.getRepositories();
@@ -132,10 +140,12 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			} else {
 				styledString.append(repos[0].toString());
 			}
-			appendIncludedBundles(styledString, container);
+			appendBundleCount(styledString, container);
+		} else if (element instanceof IUWrapper) {
+			styledString = getStyledString(((IUWrapper) element).getIU());
 		} else if (element instanceof IInstallableUnit) {
 			IInstallableUnit iu = (IInstallableUnit) element;
-			String name = IUPropertyUtils.getIUProperty(iu, IInstallableUnit.PROP_NAME);
+			String name = fTranslations.getIUProperty(iu, IInstallableUnit.PROP_NAME);
 			if (name == null) {
 				name = iu.getId();
 			}
@@ -144,6 +154,8 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			styledString.append(iu.getVersion().toString(), StyledString.QUALIFIER_STYLER);
 		} else if (element instanceof String) {
 			styledString.append((String) element);
+		} else {
+			styledString.append(element.toString());
 		}
 		return styledString;
 	}
@@ -158,7 +170,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 		styledString.append(info.getSymbolicName());
 		if (fShowVersion) {
 			String version = info.getVersion();
-			if (version != null) {
+			if (version != null && !version.equals(BundleInfo.EMPTY_VERSION)) {
 				styledString.append(' ');
 				styledString.append('(', StyledString.QUALIFIER_STYLER);
 				styledString.append(version, StyledString.QUALIFIER_STYLER);
@@ -189,21 +201,15 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 	 * @param styledString label to append to
 	 * @param container bundle container to check for inclusions
 	 */
-	private void appendIncludedBundles(StyledString styledString, IBundleContainer container) {
-		if (!container.isResolved() || (!container.getBundleStatus().isOK() && !container.getBundleStatus().isMultiStatus()) || container.getBundles() == null) {
+	private void appendBundleCount(StyledString styledString, IBundleContainer container) {
+		if (!container.isResolved() || (!container.getStatus().isOK() && !container.getStatus().isMultiStatus()) || container.getBundles() == null) {
 			return;
 		}
-		BundleInfo[] restrictions = container.getIncludedBundles();
-		int bundleCount = container.getAllBundles().length;
+		int bundleCount = container.getBundles().length;
 		String bundleCountString = Integer.toString(bundleCount);
 
-		if (restrictions != null && restrictions.length > bundleCount) {
-			// If some bundles are missing, the bundleCount is likely wrong, just do the best we can
-			return;
-		}
-
 		styledString.append(' ');
-		styledString.append(MessageFormat.format(Messages.BundleContainerTable_10, new String[] {restrictions != null ? Integer.toString(restrictions.length) : bundleCountString, bundleCountString}), StyledString.COUNTER_STYLER);
+		styledString.append(MessageFormat.format(Messages.BundleContainerTable_10, new String[] {bundleCountString}), StyledString.COUNTER_STYLER);
 	}
 
 	/**
@@ -214,6 +220,7 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 	 */
 	public Image getImage(Object element) {
 		if (element instanceof IResolvedBundle) {
+
 			IResolvedBundle bundle = (IResolvedBundle) element;
 			int flag = 0;
 			if (bundle.getStatus().getSeverity() == IStatus.WARNING || bundle.getStatus().getSeverity() == IStatus.INFO) {
@@ -222,7 +229,10 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 				flag = SharedLabelProvider.F_ERROR;
 			}
 
-			if (bundle.isFragment()) {
+			if (bundle.getStatus().getSeverity() == IStatus.ERROR && bundle.getStatus().getCode() == IResolvedBundle.STATUS_FEATURE_DOES_NOT_EXIST) {
+				// Missing features are represented by resolved bundles in the tree
+				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FEATURE_OBJ, flag);
+			} else if (bundle.isFragment()) {
 				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FRAGMENT_OBJ, flag);
 			} else if (bundle.isSourceBundle()) {
 				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PLUGIN_MF_OBJ, flag);
@@ -231,6 +241,12 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			}
 		} else if (element instanceof BundleInfo) {
 			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PLUGIN_OBJ);
+		} else if (element instanceof NameVersionDescriptor) {
+			if (((NameVersionDescriptor) element).getType() == NameVersionDescriptor.TYPE_FEATURE) {
+				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FEATURE_OBJ);
+			} else if (((NameVersionDescriptor) element).getType() == NameVersionDescriptor.TYPE_PLUGIN) {
+				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PLUGIN_OBJ);
+			}
 		} else if (element instanceof IStatus) {
 			int severity = ((IStatus) element).getSeverity();
 			if (severity == IStatus.WARNING || severity == IStatus.INFO) {
@@ -240,11 +256,13 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			}
 		} else if (element instanceof IPath) {
 			return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
+		} else if (element instanceof IFeatureModel) {
+			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FEATURE_OBJ);
 		} else if (element instanceof IBundleContainer) {
 			int flag = 0;
 			IBundleContainer container = (IBundleContainer) element;
 			if (container.isResolved()) {
-				IStatus status = container.getBundleStatus();
+				IStatus status = container.getStatus();
 				if (status.getSeverity() == IStatus.WARNING || status.getSeverity() == IStatus.INFO) {
 					flag = SharedLabelProvider.F_WARNING;
 				} else if (status.getSeverity() == IStatus.ERROR) {
@@ -261,6 +279,8 @@ public class StyledBundleLabelProvider extends StyledCellLabelProvider implement
 			} else if (element instanceof IUBundleContainer) {
 				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_REPOSITORY_OBJ, flag);
 			}
+		} else if (element instanceof IUWrapper) {
+			return getImage(((IUWrapper) element).getIU());
 		} else if (element instanceof IInstallableUnit) {
 			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_NOREF_FEATURE_OBJ);
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
index ec60a4b..9b0c449 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetContentsGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,9 @@ import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.*;
@@ -29,11 +30,15 @@ import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.DependencyManager;
 import org.eclipse.pde.internal.core.PDEState;
+import org.eclipse.pde.internal.core.ifeature.*;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
 import org.eclipse.pde.internal.core.target.provisional.*;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.SWTFactory;
 import org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor;
 import org.eclipse.pde.internal.ui.parts.ComboPart;
+import org.eclipse.pde.internal.ui.shared.CachedCheckboxTreeViewer;
+import org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree;
 import org.eclipse.pde.internal.ui.wizards.target.TargetDefinitionContentPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -41,11 +46,9 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.progress.WorkbenchJob;
 import org.osgi.framework.BundleException;
 
 /**
@@ -58,14 +61,18 @@ import org.osgi.framework.BundleException;
  * @see ITargetDefinition
  * @see IResolvedBundle
  */
-public class TargetContentsGroup extends FilteredTree {
+public class TargetContentsGroup {
 
-	private CheckboxTreeViewer fTree;
+	private CachedCheckboxTreeViewer fTree;
+	private MenuManager fMenuManager;
 	private Button fSelectButton;
 	private Button fDeselectButton;
 	private Button fSelectAllButton;
 	private Button fDeselectAllButton;
 	private Button fSelectRequiredButton;
+	private Label fModeLabel;
+	private Button fPluginModeButton;
+	private Button fFeaureModeButton;
 	private Label fShowLabel;
 	private Button fShowSourceButton;
 	private Button fShowPluginsButton;
@@ -77,21 +84,23 @@ public class TargetContentsGroup extends FilteredTree {
 	private ViewerFilter fSourceFilter;
 	private ViewerFilter fPluginFilter;
 
-	/*
-	 * TODO This could likely be done better with fewer datastructures by using a 
-	 * similar structure to FilteredCheckboxTree.  Instead of storing resolved bundles
-	 * store a special object which remembers it's check state.
+	private ITargetDefinition fTargetDefinition;
+	/**
+	 * Maps file paths to a list of bundles that reside in that location, use {@link #getFileBundleMapping()} rather than accessing the field directly
 	 */
-	private List fAllBundles;
-	private Set fAllChecked;
-	private Map fContainerBundles;
-	private Map fContainerChecked;
-	private Map fFileBundles;
-	private Map fFileChecked;
+	private Map fFileBundleMapping;
 
-	private ITargetDefinition fTargetDefinition;
+	/**
+	 * List of IResolvedBundles that are being used to display error statuses for missing plug-ins/features, possibly <code>null</code>
+	 */
+	private List fMissing;
+
+	private static final NameVersionDescriptor OTHER_CATEGORY = new NameVersionDescriptor(Messages.TargetContentsGroup_OtherPluginsParent, null);
 
-	private FormToolkit fToolkit;
+	/**
+	 * Cached list of all bundles, used to quickly obtain bundle counts.
+	 */
+	private List fAllBundles = new ArrayList();
 
 	private int fGrouping;
 	private static final int GROUP_BY_NONE = 0;
@@ -99,20 +108,35 @@ public class TargetContentsGroup extends FilteredTree {
 	private static final int GROUP_BY_CONTAINER = 2;
 	private ListenerList fChangeListeners = new ListenerList();
 
-	public TargetContentsGroup(Composite parent) {
-		super(parent, SWT.NONE, null, true);
-		PatternFilter filter = new PatternFilter();
-		filter.setIncludeLeadingWildcard(true);
-		super.init(SWT.NONE, filter);
+	/**
+	 * Creates this part using the form toolkit and adds it to the given composite.
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit toolkit to create the widgets with
+	 * @return generated instance of the table part
+	 */
+	public static TargetContentsGroup createInForm(Composite parent, FormToolkit toolkit) {
+		TargetContentsGroup contentTable = new TargetContentsGroup();
+		contentTable.createFormContents(parent, toolkit);
+		return contentTable;
 	}
 
-	public TargetContentsGroup(Composite parent, FormToolkit toolkit) {
-		// Hack to setup the toolkit before creating the controls
-		super(parent, SWT.NONE, null, true);
-		fToolkit = toolkit;
-		PatternFilter filter = new PatternFilter();
-		filter.setIncludeLeadingWildcard(true);
-		super.init(SWT.NONE, filter);
+	/**
+	 * Creates this part using standard dialog widgets and adds it to the given composite.
+	 * 
+	 * @param parent parent composite
+	 * @return generated instance of the table part
+	 */
+	public static TargetContentsGroup createInDialog(Composite parent) {
+		TargetContentsGroup contentTable = new TargetContentsGroup();
+		contentTable.createDialogContents(parent);
+		return contentTable;
+	}
+
+	/**
+	 * Use {@link #createInDialog(Composite)} or {@link #createInDialog(Composite)}
+	 */
+	protected TargetContentsGroup() {
 	}
 
 	/**
@@ -135,76 +159,75 @@ public class TargetContentsGroup extends FilteredTree {
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.dialogs.FilteredTree#init(int, org.eclipse.ui.dialogs.PatternFilter)
+	/**
+	 * Disposes the contents of this group
 	 */
-	protected void init(int treeStyle, PatternFilter filter) {
-		// Overridden to do nothing to avoid creating the controls when we don't have a form toolkit
+	public void dispose() {
+		if (fMenuManager != null) {
+			fMenuManager.dispose();
+		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.dialogs.FilteredTree#createTreeControl(org.eclipse.swt.widgets.Composite, int)
+	/**
+	 * Creates the contents of this group, using the given toolkit where appropriate so that the controls
+	 * have the form editor look and feel.
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit toolkit to create controls with
 	 */
-	protected Control createTreeControl(Composite parent, int style) {
+	protected void createFormContents(Composite parent, FormToolkit toolkit) {
 		fGrouping = GROUP_BY_NONE;
-		Composite treeComp = null;
-		if (fToolkit != null) {
-			treeComp = fToolkit.createComposite(parent);
-			GridLayout layout = new GridLayout(2, false);
-			layout.marginWidth = layout.marginHeight = 0;
-			treeComp.setLayout(layout);
-			treeComp.setLayoutData(new GridData(GridData.FILL_BOTH));
-		} else {
-			treeComp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH, 0, 0);
-		}
-		super.createTreeControl(treeComp, style);
-		((GridData) fTree.getControl().getLayoutData()).heightHint = 300;
-		createButtons(treeComp);
 
-		if (fToolkit != null) {
-			fCountLabel = fToolkit.createLabel(treeComp, ""); //$NON-NLS-1$
-			GridData data = new GridData(GridData.FILL_HORIZONTAL);
-			data.horizontalSpan = 2;
-			fCountLabel.setLayoutData(data);
-		} else {
-			fCountLabel = SWTFactory.createLabel(treeComp, "", 2); //$NON-NLS-1$
-		}
+		Composite comp = toolkit.createComposite(parent);
+		GridLayout layout = new GridLayout(2, false);
+		layout.marginWidth = layout.marginHeight = 0;
+		comp.setLayout(layout);
+		comp.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		createTree(comp, toolkit);
+		createButtons(comp, toolkit);
+
+		fCountLabel = toolkit.createLabel(comp, ""); //$NON-NLS-1$
+		GridData data = new GridData(GridData.FILL_HORIZONTAL);
+		data.horizontalSpan = 2;
+		fCountLabel.setLayoutData(data);
 
 		updateButtons();
 		initializeFilters();
-		return treeComp;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateRefreshJob()
+	/**
+	 * Creates the contents of this group in the normal dialog style
+	 * 
+	 * @param parent parent composite
 	 */
-	protected WorkbenchJob doCreateRefreshJob() {
-		WorkbenchJob job = super.doCreateRefreshJob();
-		job.addJobChangeListener(new JobChangeAdapter() {
-			public void done(IJobChangeEvent event) {
-				// Don't update the tree if no filtering has been done yet
-				if (event.getResult().getSeverity() != IStatus.CANCEL && fAllBundles != null) {
-					fTree.expandAll();
-					updateCheckState();
-				}
-			}
-		});
-		return job;
+	protected void createDialogContents(Composite parent) {
+		fGrouping = GROUP_BY_NONE;
+
+		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH, 0, 0);
+
+		createTree(comp, null);
+		createButtons(comp, null);
+
+		fCountLabel = SWTFactory.createLabel(comp, "", 2); //$NON-NLS-1$
+
+		updateButtons();
+		initializeFilters();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateTreeViewer(org.eclipse.swt.widgets.Composite, int)
+	/**
+	 * Creates the tree in this group
+	 * 
+	 * @param parent parent composite
+	 * @param style toolkit for form style or <code>null</code> for dialog style
 	 */
-	protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
-		Tree tree = null;
-		if (fToolkit != null) {
-			tree = fToolkit.createTree(parent, SWT.CHECK | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
-		} else {
-			tree = new Tree(parent, style | SWT.CHECK | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
-		}
-
+	private TreeViewer createTree(Composite parent, FormToolkit toolkit) {
+		FilteredCheckboxTree tree = new FilteredCheckboxTree(parent, toolkit);
 		tree.setLayoutData(new GridData(GridData.FILL_BOTH));
-		fTree = new CheckboxTreeViewer(tree);
+		tree.getPatternFilter().setIncludeLeadingWildcard(true);
+
+		fTree = tree.getCheckboxTreeViewer();
+		((GridData) fTree.getControl().getLayoutData()).heightHint = 300;
 		fTree.setUseHashlookup(true);
 		fTree.setContentProvider(new TreeContentProvider());
 		fTree.setLabelProvider(new StyledBundleLabelProvider(true, false));
@@ -212,12 +235,19 @@ public class TargetContentsGroup extends FilteredTree {
 			public void doubleClick(DoubleClickEvent event) {
 				IStructuredSelection selection = (IStructuredSelection) event.getSelection();
 				Object first = selection.getFirstElement();
-				handleCheck(new Object[] {selection.getFirstElement()}, !fTree.getChecked(first));
+				fTree.setChecked(first, !fTree.getChecked(first));
+				saveIncludedBundleState();
+				contentChanged();
+				updateButtons();
+				fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 			}
 		});
 		fTree.addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
-				handleCheck(new Object[] {event.getElement()}, fTree.getChecked(event.getElement()));
+				saveIncludedBundleState();
+				contentChanged();
+				updateButtons();
+				fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 			}
 		});
 		fTree.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -227,6 +257,20 @@ public class TargetContentsGroup extends FilteredTree {
 		});
 		fTree.setSorter(new ViewerSorter() {
 			public int compare(Viewer viewer, Object e1, Object e2) {
+				if (fFeaureModeButton.getSelection()) {
+					if (e1 == OTHER_CATEGORY) {
+						return 1;
+					}
+					if (e2 == OTHER_CATEGORY) {
+						return -1;
+					}
+				}
+				if (e1 instanceof IResolvedBundle && !(e2 instanceof IResolvedBundle)) {
+					return -1;
+				}
+				if (e2 instanceof IResolvedBundle && !(e1 instanceof IResolvedBundle)) {
+					return 1;
+				}
 				if (e1 instanceof IResolvedBundle && e2 instanceof IResolvedBundle) {
 					IStatus status1 = ((IResolvedBundle) e1).getStatus();
 					IStatus status2 = ((IResolvedBundle) e2).getStatus();
@@ -241,34 +285,36 @@ public class TargetContentsGroup extends FilteredTree {
 			}
 
 		});
+
+		fMenuManager = new MenuManager();
+		fMenuManager.add(new Action(Messages.TargetContentsGroup_collapseAll, PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_ELCL_COLLAPSEALL)) {
+			public void run() {
+				fTree.collapseAll();
+			}
+		});
+		Menu contextMenu = fMenuManager.createContextMenu(tree);
+		tree.setMenu(contextMenu);
+
 		return fTree;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.dialogs.FilteredTree#doCreateFilterText(org.eclipse.swt.widgets.Composite)
+	/**
+	 * Creates the buttons in this group inside a new composite
+	 * 
+	 * @param parent parent composite
+	 * @param toolkit toolkit to give form style or <code>null</code> for dialog style
 	 */
-	protected Text doCreateFilterText(Composite parent) {
-		// Overridden so the text gets create using the toolkit if we have one
-		Text parentText = super.doCreateFilterText(parent);
-		if (fToolkit != null) {
-			int style = parentText.getStyle();
-			parentText.dispose();
-			return fToolkit.createText(parent, null, style);
-		}
-		return parentText;
-	}
-
-	private void createButtons(Composite parent) {
-		if (fToolkit != null) {
-			Composite buttonComp = fToolkit.createComposite(parent);
+	private void createButtons(Composite parent, FormToolkit toolkit) {
+		if (toolkit != null) {
+			Composite buttonComp = toolkit.createComposite(parent);
 			GridLayout layout = new GridLayout();
 			layout.marginWidth = layout.marginHeight = 0;
 			buttonComp.setLayout(layout);
 			buttonComp.setLayoutData(new GridData(GridData.FILL_VERTICAL));
 
-			fSelectButton = fToolkit.createButton(buttonComp, Messages.IncludedBundlesTree_0, SWT.PUSH);
+			fSelectButton = toolkit.createButton(buttonComp, Messages.IncludedBundlesTree_0, SWT.PUSH);
 			fSelectButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			fDeselectButton = fToolkit.createButton(buttonComp, Messages.IncludedBundlesTree_1, SWT.PUSH);
+			fDeselectButton = toolkit.createButton(buttonComp, Messages.IncludedBundlesTree_1, SWT.PUSH);
 			fDeselectButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
 			Label emptySpace = new Label(buttonComp, SWT.NONE);
@@ -276,9 +322,9 @@ public class TargetContentsGroup extends FilteredTree {
 			gd.widthHint = gd.heightHint = 5;
 			emptySpace.setLayoutData(gd);
 
-			fSelectAllButton = fToolkit.createButton(buttonComp, Messages.IncludedBundlesTree_2, SWT.PUSH);
+			fSelectAllButton = toolkit.createButton(buttonComp, Messages.IncludedBundlesTree_2, SWT.PUSH);
 			fSelectAllButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			fDeselectAllButton = fToolkit.createButton(buttonComp, Messages.IncludedBundlesTree_3, SWT.PUSH);
+			fDeselectAllButton = toolkit.createButton(buttonComp, Messages.IncludedBundlesTree_3, SWT.PUSH);
 			fDeselectAllButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
 			emptySpace = new Label(buttonComp, SWT.NONE);
@@ -286,20 +332,32 @@ public class TargetContentsGroup extends FilteredTree {
 			gd.widthHint = gd.heightHint = 5;
 			emptySpace.setLayoutData(gd);
 
-			fSelectRequiredButton = fToolkit.createButton(buttonComp, Messages.TargetContentsGroup_4, SWT.PUSH);
+			fSelectRequiredButton = toolkit.createButton(buttonComp, Messages.TargetContentsGroup_4, SWT.PUSH);
 			fSelectRequiredButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-			Composite filterComp = fToolkit.createComposite(buttonComp);
+			Composite filterComp = toolkit.createComposite(buttonComp);
 			layout = new GridLayout();
 			layout.marginWidth = layout.marginHeight = 0;
 			filterComp.setLayout(layout);
 			filterComp.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, true, true));
 
-			fShowLabel = fToolkit.createLabel(filterComp, Messages.BundleContainerTable_9);
+			fModeLabel = toolkit.createLabel(filterComp, Messages.TargetContentsGroup_ManageUsing);
+
+			fPluginModeButton = toolkit.createButton(filterComp, Messages.TargetContentsGroup_PluginMode, SWT.RADIO);
+			fPluginModeButton.setSelection(true);
+			fFeaureModeButton = toolkit.createButton(filterComp, Messages.TargetContentsGroup_FeatureMode, SWT.RADIO);
+			fFeaureModeButton.setSelection(true);
+
+			emptySpace = new Label(filterComp, SWT.NONE);
+			gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+			gd.widthHint = gd.heightHint = 5;
+			emptySpace.setLayoutData(gd);
+
+			fShowLabel = toolkit.createLabel(filterComp, Messages.BundleContainerTable_9);
 
-			fShowPluginsButton = fToolkit.createButton(filterComp, Messages.BundleContainerTable_14, SWT.CHECK);
+			fShowPluginsButton = toolkit.createButton(filterComp, Messages.BundleContainerTable_14, SWT.CHECK);
 			fShowPluginsButton.setSelection(true);
-			fShowSourceButton = fToolkit.createButton(filterComp, Messages.BundleContainerTable_15, SWT.CHECK);
+			fShowSourceButton = toolkit.createButton(filterComp, Messages.BundleContainerTable_15, SWT.CHECK);
 			fShowSourceButton.setSelection(true);
 
 			emptySpace = new Label(filterComp, SWT.NONE);
@@ -307,10 +365,10 @@ public class TargetContentsGroup extends FilteredTree {
 			gd.widthHint = gd.heightHint = 5;
 			emptySpace.setLayoutData(gd);
 
-			fGroupLabel = fToolkit.createLabel(filterComp, Messages.TargetContentsGroup_0);
+			fGroupLabel = toolkit.createLabel(filterComp, Messages.TargetContentsGroup_0);
 
 			fGroupComboPart = new ComboPart();
-			fGroupComboPart.createControl(filterComp, fToolkit, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
+			fGroupComboPart.createControl(filterComp, toolkit, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY);
 			gd = new GridData(GridData.FILL_HORIZONTAL);
 			gd.horizontalIndent = 10;
 			fGroupComboPart.getControl().setLayoutData(gd);
@@ -346,6 +404,16 @@ public class TargetContentsGroup extends FilteredTree {
 			Composite filterComp = SWTFactory.createComposite(buttonComp, 1, 1, SWT.NONE, 0, 0);
 			filterComp.setLayoutData(new GridData(SWT.LEFT, SWT.BOTTOM, true, true));
 
+			fModeLabel = SWTFactory.createLabel(filterComp, Messages.TargetContentsGroup_ManageUsing, 1);
+
+			fPluginModeButton = SWTFactory.createRadioButton(filterComp, Messages.TargetContentsGroup_PluginMode);
+			fFeaureModeButton = SWTFactory.createRadioButton(filterComp, Messages.TargetContentsGroup_FeatureMode);
+
+			emptySpace = new Label(filterComp, SWT.NONE);
+			gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+			gd.widthHint = gd.heightHint = 5;
+			emptySpace.setLayoutData(gd);
+
 			fShowLabel = SWTFactory.createLabel(filterComp, Messages.BundleContainerTable_9, 1);
 
 			fShowPluginsButton = SWTFactory.createCheckButton(filterComp, Messages.BundleContainerTable_14, null, true, 1);
@@ -373,7 +441,13 @@ public class TargetContentsGroup extends FilteredTree {
 			public void widgetSelected(SelectionEvent e) {
 				if (!fTree.getSelection().isEmpty()) {
 					Object[] selected = ((IStructuredSelection) fTree.getSelection()).toArray();
-					handleCheck(selected, true);
+					for (int i = 0; i < selected.length; i++) {
+						fTree.setChecked(selected[i], true);
+					}
+					saveIncludedBundleState();
+					contentChanged();
+					updateButtons();
+					fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 				}
 			}
 		});
@@ -382,30 +456,109 @@ public class TargetContentsGroup extends FilteredTree {
 			public void widgetSelected(SelectionEvent e) {
 				if (!fTree.getSelection().isEmpty()) {
 					Object[] selected = ((IStructuredSelection) fTree.getSelection()).toArray();
-					handleCheck(selected, false);
+					for (int i = 0; i < selected.length; i++) {
+						fTree.setChecked(selected[i], false);
+					}
+					saveIncludedBundleState();
+					contentChanged();
+					updateButtons();
+					fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 				}
 			}
 		});
 
 		fSelectAllButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				Object[] elements = ((ITreeContentProvider) fTree.getContentProvider()).getElements(fTree.getInput());
-				handleCheck(elements, true);
+				fTree.setAllChecked(true);
+				saveIncludedBundleState();
+				contentChanged();
+				updateButtons();
+				fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 			}
 		});
 
 		fDeselectAllButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				Object[] elements = ((ITreeContentProvider) fTree.getContentProvider()).getElements(fTree.getInput());
-				handleCheck(elements, false);
+				fTree.setAllChecked(false);
+				saveIncludedBundleState();
+				contentChanged();
+				updateButtons();
+				fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
 			}
 		});
 
 		fSelectRequiredButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				handleCheck(getRequiredElements(fAllBundles, fAllChecked), true);
+				Object[] allChecked = fTree.getCheckedLeafElements();
+				Object[] required = null;
+				if (fFeaureModeButton.getSelection()) {
+					required = getRequiredFeatures(fTargetDefinition.getAllFeatures(), allChecked);
+				} else {
+					required = getRequiredPlugins(fAllBundles, allChecked);
+				}
+				for (int i = 0; i < required.length; i++) {
+					fTree.setChecked(required[i], true);
+				}
+				saveIncludedBundleState();
+				contentChanged();
+				updateButtons();
+				fTree.update(fTargetDefinition.getBundleContainers(), new String[] {IBasicPropertyConstants.P_TEXT});
+			}
+		});
+
+		fPluginModeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				// Moving from feature based filtering to plug-in based, need to update storage
+				((TargetDefinition) fTargetDefinition).setUIMode(TargetDefinition.MODE_PLUGIN);
+				contentChanged();
+				fTargetDefinition.setIncluded(null);
+
+				fGroupLabel.setEnabled(true);
+				if (fGroupCombo != null) {
+					fGroupCombo.setEnabled(true);
+				} else {
+					fGroupComboPart.getControl().setEnabled(true);
+				}
+
+				fTree.getControl().setRedraw(false);
+				fTree.refresh(false);
+				fTree.expandAll();
+				updateCheckState();
+				updateButtons();
+				fTree.getControl().setRedraw(true);
+			}
+		});
+		fPluginModeButton.setSelection(true);
+		GridData gd = new GridData();
+		gd.horizontalIndent = 10;
+		fPluginModeButton.setLayoutData(gd);
+
+		fFeaureModeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				// Moving from plug-in based filtering to feature based, need to update storage
+				((TargetDefinition) fTargetDefinition).setUIMode(TargetDefinition.MODE_FEATURE);
+				contentChanged();
+				fTargetDefinition.setIncluded(null);
+
+				fGroupLabel.setEnabled(false);
+				if (fGroupCombo != null) {
+					fGroupCombo.setEnabled(false);
+				} else {
+					fGroupComboPart.getControl().setEnabled(false);
+				}
+
+				fTree.getControl().setRedraw(false);
+				fTree.refresh(false);
+				fTree.expandAll();
+				updateCheckState();
+				updateButtons();
+				fTree.getControl().setRedraw(true);
 			}
 		});
+		fFeaureModeButton.setSelection(false);
+		gd = new GridData();
+		gd.horizontalIndent = 10;
+		fFeaureModeButton.setLayoutData(gd);
 
 		fShowPluginsButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
@@ -420,7 +573,7 @@ public class TargetContentsGroup extends FilteredTree {
 			}
 		});
 		fShowPluginsButton.setSelection(true);
-		GridData gd = new GridData();
+		gd = new GridData();
 		gd.horizontalIndent = 10;
 		fShowPluginsButton.setLayoutData(gd);
 
@@ -484,9 +637,6 @@ public class TargetContentsGroup extends FilteredTree {
 	}
 
 	/**
-	 * 
-	 * TODO SHOULD BE EQUIVALENT METHOD ELSEWHERE IN PDE
-	 * 
 	 * Parses a bunlde's manifest into a dictionary. The bundle may be in a jar
 	 * or in a directory at the specified location.
 	 * 
@@ -539,9 +689,11 @@ public class TargetContentsGroup extends FilteredTree {
 	 * Uses the target state to determine all bundles required by the
 	 * currently checked bundles and returns them so they can be checked in the tree.
 	 * 
-	 * @return list of plug-ins required by the currently checked plug-ins
+	 * @param allBundles list of all bundles to search requirements in
+	 * @param checkedBundles list of bundles to get requirements for
+	 * @return list of resolved bundles from the collection to be checked
 	 */
-	private Object[] getRequiredElements(final Collection allBundles, final Collection checkedBundles) {
+	private Object[] getRequiredPlugins(final Collection allBundles, final Object[] checkedBundles) {
 		final Set dependencies = new HashSet();
 		IRunnableWithProgress op = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) {
@@ -577,13 +729,15 @@ public class TargetContentsGroup extends FilteredTree {
 
 					// Figure out which of the models have been checked
 					IPluginModelBase[] models = state.getTargetModels();
-					List checkedModels = new ArrayList(checkedBundles.size());
-					for (Iterator iterator = checkedBundles.iterator(); iterator.hasNext();) {
-						BundleInfo bundle = ((IResolvedBundle) iterator.next()).getBundleInfo();
-						for (int j = 0; j < models.length; j++) {
-							if (models[j].getBundleDescription().getSymbolicName().equals(bundle.getSymbolicName()) && models[j].getBundleDescription().getVersion().toString().equals(bundle.getVersion())) {
-								checkedModels.add(models[j]);
-								break;
+					List checkedModels = new ArrayList(checkedBundles.length);
+					for (int i = 0; i < checkedBundles.length; i++) {
+						if (checkedBundles[i] instanceof IResolvedBundle) {
+							BundleInfo bundle = ((IResolvedBundle) checkedBundles[i]).getBundleInfo();
+							for (int j = 0; j < models.length; j++) {
+								if (models[j].getBundleDescription().getSymbolicName().equals(bundle.getSymbolicName()) && models[j].getBundleDescription().getVersion().toString().equals(bundle.getVersion())) {
+									checkedModels.add(models[j]);
+									break;
+								}
 							}
 						}
 					}
@@ -594,17 +748,18 @@ public class TargetContentsGroup extends FilteredTree {
 
 					// Get implicit dependencies as a list of strings
 					// This is wasteful since the dependency calculation puts them back into BundleInfos
-					BundleInfo[] implicitDependencies = fTargetDefinition.getImplicitDependencies();
+					NameVersionDescriptor[] implicitDependencies = fTargetDefinition.getImplicitDependencies();
 					List implicitIDs = new ArrayList();
 					if (implicitDependencies != null) {
 						for (int i = 0; i < implicitDependencies.length; i++) {
-							implicitIDs.add(implicitDependencies[i].getSymbolicName());
+							implicitIDs.add(implicitDependencies[i].getId());
 						}
 					}
 					monitor.worked(10);
 
 					// Get all dependency bundles
-					dependencies.addAll(DependencyManager.getDependencies(checkedModels.toArray(), (String[]) implicitIDs.toArray(new String[implicitIDs.size()]), state.getState()));
+					// exclude "org.eclipse.ui.workbench.compatibility" - it is only needed for pre-3.0 bundles
+					dependencies.addAll(DependencyManager.getDependencies(checkedModels.toArray(), (String[]) implicitIDs.toArray(new String[implicitIDs.size()]), state.getState(), new String[] {"org.eclipse.ui.workbench.compatibility"})); //$NON-NLS-1$
 					monitor.worked(50);
 
 				} finally {
@@ -614,13 +769,14 @@ public class TargetContentsGroup extends FilteredTree {
 		};
 		try {
 			// Calculate the dependencies
-			new ProgressMonitorDialog(getShell()).run(true, true, op);
+			new ProgressMonitorDialog(fTree.getControl().getShell()).run(true, true, op);
 
 			// We want to check the dependents, the source of the dependents, and the source of the originally checked
-			Set checkedNames = new HashSet(checkedBundles.size());
-			for (Iterator iterator = checkedBundles.iterator(); iterator.hasNext();) {
-				IResolvedBundle current = (IResolvedBundle) iterator.next();
-				checkedNames.add(current.getBundleInfo().getSymbolicName());
+			Set checkedNames = new HashSet(checkedBundles.length);
+			for (int i = 0; i < checkedBundles.length; i++) {
+				if (checkedBundles[i] instanceof IResolvedBundle) {
+					checkedNames.add(((IResolvedBundle) checkedBundles[i]).getBundleInfo().getSymbolicName());
+				}
 			}
 
 			List toCheck = new ArrayList();
@@ -645,103 +801,52 @@ public class TargetContentsGroup extends FilteredTree {
 	}
 
 	/**
-	 * Sets the check state of the given elements to the given state.  Updates
-	 * all the datastructures that store the current check state and updates any
-	 * parent items in the tree.
+	 * Uses the feature model to determine the set of features required by the
+	 * given list of checked features
 	 * 
-	 * @param changedElements list of changed elements
-	 * @param checkState new check state for the elements
+	 * @param allFeatures list of all features to search requirements in
+	 * @param checkedFeatures list of features to get requirements for
+	 * @return list of features to be checked
 	 */
-	private void handleCheck(Object[] changedElements, boolean checkState) {
-		if (changedElements.length > 0) {
-			if (changedElements[0] instanceof IResolvedBundle) {
-				Set changedContainers = new HashSet();
-				Set changedFiles = new HashSet();
-				for (int i = 0; i < changedElements.length; i++) {
-					Object parent = ((IResolvedBundle) changedElements[i]).getParentContainer();
-					changedContainers.add(parent);
-					Set containerChecked = ((Set) fContainerChecked.get(parent));
-
-					parent = getParentPath((IResolvedBundle) changedElements[i]);
-					changedFiles.add(parent);
-					Set fileChecked = ((Set) fFileChecked.get(parent));
-
-					if (checkState) {
-						fAllChecked.add(changedElements[i]);
-						containerChecked.add(changedElements[i]);
-						fileChecked.add(changedElements[i]);
-					} else {
-						fAllChecked.remove(changedElements[i]);
-						containerChecked.remove(changedElements[i]);
-						fileChecked.remove(changedElements[i]);
-					}
-					fTree.setChecked(changedElements[i], checkState);
-				}
-				if (fGrouping != GROUP_BY_NONE) {
-					Iterator iterator = fGrouping == GROUP_BY_CONTAINER ? changedContainers.iterator() : changedFiles.iterator();
-					while (iterator.hasNext()) {
-						Object parent = iterator.next();
-						if (getChecked(parent).size() == 0) {
-							fTree.setGrayChecked(parent, false);
-						} else if (getChecked(parent).size() == getBundleChildren(parent).size()) {
-							fTree.setGrayed(parent, false);
-							fTree.setChecked(parent, true);
-						} else {
-							fTree.setGrayChecked(parent, true);
-						}
-					}
-				}
-				saveIncludedBundleState(changedContainers.toArray());
-			} else {
-				Set totalChanged = new HashSet();
-				for (int i = 0; i < changedElements.length; i++) {
-					fTree.setGrayed(changedElements[i], false);
-					fTree.setChecked(changedElements[i], checkState);
-					fTree.setSubtreeChecked(changedElements[i], checkState);
-
-					Set checked;
-					List all;
-					if (fGrouping == GROUP_BY_CONTAINER) {
-						checked = (Set) fContainerChecked.get(changedElements[i]);
-						all = (List) fContainerBundles.get(changedElements[i]);
-					} else {
-						checked = (Set) fFileChecked.get(changedElements[i]);
-						all = (List) fFileBundles.get(changedElements[i]);
-					}
-					if (checkState) {
-						checked.addAll(all);
-					} else {
-						checked.removeAll(all);
-					}
-					totalChanged.addAll(all);
-				}
-				// Update the maps that we are not currently displaying
-				Iterator iterator = fGrouping == GROUP_BY_CONTAINER ? fFileChecked.values().iterator() : fContainerChecked.values().iterator();
-				while (iterator.hasNext()) {
-					Set current = (Set) iterator.next();
-					if (checkState) {
-						current.addAll(totalChanged);
-					} else {
-						current.removeAll(totalChanged);
+	private Object[] getRequiredFeatures(final IFeatureModel[] allFeatures, final Object[] checkedFeatures) {
+		ArrayList required = new ArrayList();
+		for (int j = 0; j < checkedFeatures.length; j++) {
+			if (checkedFeatures[j] instanceof IFeatureModel) {
+				getFeatureDependencies((IFeatureModel) checkedFeatures[j], allFeatures, required);
+			}
+		}
+		return required.toArray();
+	}
+
+	/**
+	 * Recursively gets the ID of required features of this feature and adds them to the list
+	 * @param model feature model to get requirements of
+	 * @param requiredFeatureList collector for the required features
+	 */
+	private void getFeatureDependencies(IFeatureModel model, IFeatureModel[] allFeatures, ArrayList requiredFeatureList) {
+		IFeature feature = model.getFeature();
+		IFeatureImport[] featureImports = feature.getImports();
+		for (int i = 0; i < featureImports.length; i++) {
+			if (featureImports[i].getType() == IFeatureImport.FEATURE) {
+				for (int j = 0; j < allFeatures.length; j++) {
+					if (allFeatures[j].getFeature().getId().equals(featureImports[i].getId())) {
+						requiredFeatureList.add(allFeatures[j]);
+						getFeatureDependencies(allFeatures[j], allFeatures, requiredFeatureList);
+						break;
 					}
 				}
-				if (checkState) {
-					fAllChecked.addAll(totalChanged);
-				} else {
-					fAllChecked.removeAll(totalChanged);
-				}
-				if (fGrouping == GROUP_BY_CONTAINER) {
-					saveIncludedBundleState(changedElements);
-				} else {
-					// Easier to just save everything than loop through every bundle that changed and find its parent
-					saveIncludedBundleState(fTargetDefinition.getBundleContainers());
-				}
+
 			}
-			contentChanged();
-			updateButtons();
-			// Update the parent container labels with the new count
-			if (fGrouping == GROUP_BY_CONTAINER) {
-				fTree.update(fContainerBundles.keySet().toArray(), new String[] {IBasicPropertyConstants.P_TEXT});
+		}
+		IFeatureChild[] featureIncludes = feature.getIncludedFeatures();
+		for (int i = 0; i < featureIncludes.length; i++) {
+			requiredFeatureList.add(featureIncludes[i].getId());
+			for (int j = 0; j < allFeatures.length; j++) {
+				if (allFeatures[j].getFeature().getId().equals(featureIncludes[i].getId())) {
+					requiredFeatureList.add(allFeatures[j]);
+					getFeatureDependencies(allFeatures[j], allFeatures, requiredFeatureList);
+					break;
+				}
 			}
 		}
 	}
@@ -754,6 +859,7 @@ public class TargetContentsGroup extends FilteredTree {
 			index = fGroupComboPart.getSelectionIndex();
 		}
 		if (index != fGrouping) {
+			// Refresh tree
 			fGrouping = index;
 			fTree.getControl().setRedraw(false);
 			fTree.refresh(false);
@@ -764,37 +870,6 @@ public class TargetContentsGroup extends FilteredTree {
 		}
 	}
 
-	private void updateCheckState() {
-		for (Iterator iterator = fAllChecked.iterator(); iterator.hasNext();) {
-			fTree.setChecked(iterator.next(), true);
-		}
-		if (fGrouping != GROUP_BY_NONE) {
-			Map bundleMap = null;
-			Map checkedMap = null;
-			if (fGrouping == GROUP_BY_CONTAINER) {
-				bundleMap = fContainerBundles;
-				checkedMap = fContainerChecked;
-			} else if (fGrouping == GROUP_BY_FILE_LOC) {
-				bundleMap = fFileBundles;
-				checkedMap = fFileChecked;
-			}
-			for (Iterator iterator = bundleMap.keySet().iterator(); iterator.hasNext();) {
-				Object currentParent = iterator.next();
-				Set checked = (Set) checkedMap.get(currentParent);
-				if (checked.size() == 0) {
-					fTree.setGrayed(currentParent, false);
-					fTree.setChecked(currentParent, false);
-				} else if (checked.size() == ((List) bundleMap.get(currentParent)).size()) {
-					fTree.setGrayed(currentParent, false);
-					fTree.setChecked(currentParent, true);
-				} else {
-					fTree.setGrayChecked(currentParent, true);
-				}
-			}
-		}
-
-	}
-
 	private void updateButtons() {
 		if (fTargetDefinition != null && !fTree.getSelection().isEmpty()) {
 			Object[] selection = ((IStructuredSelection) fTree.getSelection()).toArray();
@@ -817,7 +892,7 @@ public class TargetContentsGroup extends FilteredTree {
 					allSelected = false;
 				}
 			}
-			// Selection is available is not everything is already selected and not both a parent and child item are selected
+			// Selection is available if not everything is already selected and not both a parent and child item are selected
 			fSelectButton.setEnabled(!allSelected && !(hasResolveBundle && hasParent));
 			fDeselectButton.setEnabled(!noneSelected && !(hasResolveBundle && hasParent));
 		} else {
@@ -825,12 +900,22 @@ public class TargetContentsGroup extends FilteredTree {
 			fDeselectButton.setEnabled(false);
 		}
 
-		fSelectAllButton.setEnabled(fTargetDefinition != null && fAllChecked.size() != fAllBundles.size());
-		fDeselectAllButton.setEnabled(fTargetDefinition != null && fAllChecked.size() != 0);
-		fSelectRequiredButton.setEnabled(fTargetDefinition != null && fAllChecked.size() > 0 && fAllChecked.size() != fAllBundles.size());
+		int total = fAllBundles.size();
+		if (fFeaureModeButton.getSelection()) {
+			if (fTargetDefinition == null) {
+				total = 0;
+			} else {
+				total = fTargetDefinition.getAllFeatures().length;
+				total += ((TargetDefinition) fTargetDefinition).getOtherBundles().length;
+			}
+		}
+
+		fSelectAllButton.setEnabled(fTargetDefinition != null && fTree.getCheckedLeafCount() != total);
+		fDeselectAllButton.setEnabled(fTargetDefinition != null && fTree.getCheckedLeafCount() != 0);
+		fSelectRequiredButton.setEnabled(fTargetDefinition != null && fTree.getCheckedLeafCount() > 0 && fTree.getCheckedLeafCount() != total);
 
 		if (fTargetDefinition != null) {
-			fCountLabel.setText(MessageFormat.format(Messages.TargetContentsGroup_9, new String[] {Integer.toString(fAllChecked.size()), Integer.toString(fAllBundles.size())}));
+			fCountLabel.setText(MessageFormat.format(Messages.TargetContentsGroup_9, new String[] {Integer.toString(fTree.getCheckedLeafCount()), Integer.toString(total)}));
 		} else {
 			fCountLabel.setText(""); //$NON-NLS-1$
 		}
@@ -843,6 +928,10 @@ public class TargetContentsGroup extends FilteredTree {
 	public void setInput(ITargetDefinition input) {
 		fTargetDefinition = input;
 
+		// Update the cached data
+		fFileBundleMapping = null;
+		fAllBundles.clear();
+
 		if (input == null || !input.isResolved()) {
 			fTree.setInput(Messages.TargetContentsGroup_10);
 			setEnabled(false);
@@ -856,135 +945,92 @@ public class TargetContentsGroup extends FilteredTree {
 			return;
 		}
 
-		fTree.setInput(Messages.TargetContentsGroup_12);
-		setEnabled(false);
-		Job initJob = new InitalizeJob();
-		initJob.addJobChangeListener(new JobChangeAdapter() {
-			public void done(IJobChangeEvent event) {
-				Job refreshJob = new UIJob(Messages.TargetContentsGroup_13) {
-					public IStatus runInUIThread(IProgressMonitor monitor) {
-						fTree.setInput(fTargetDefinition);
-						fTree.expandAll();
-						updateCheckState();
-						updateButtons();
-						setEnabled(true);
-						return Status.OK_STATUS;
-					}
-				};
-				refreshJob.setSystem(true);
-				refreshJob.schedule();
-			}
-		});
-		initJob.schedule();
-	}
-
-	private class InitalizeJob extends Job {
-
-		public InitalizeJob() {
-			super(Messages.TargetContentsGroup_13);
-			setSystem(true);
+		for (int i = 0; i < allResolvedBundles.length; i++) {
+			fAllBundles.add(allResolvedBundles[i]);
 		}
 
-		protected IStatus run(IProgressMonitor monitor) {
-			fAllBundles = new ArrayList();
-			fAllChecked = new HashSet();
-			fContainerBundles = new HashMap();
-			fContainerChecked = new HashMap();
-			IBundleContainer[] containers = fTargetDefinition.getBundleContainers();
-			// Iterate through each container, adding bundles to the map and list
-			for (int i = 0; i < containers.length; i++) {
-				Object[] containerBundlesArray = containers[i].getAllBundles();
-				List containerBundles = new ArrayList(containerBundlesArray.length);
-				for (int j = 0; j < containerBundlesArray.length; j++) {
-					containerBundles.add(containerBundlesArray[j]);
-				}
-				fAllBundles.addAll(containerBundles);
-				fContainerBundles.put(containers[i], containerBundles);
-
-				// Determine which of the bundles are checked (included)
-				if (containers[i].getIncludedBundles() == null) {
-					// Everything is included
-					Set checked = new HashSet();
-					checked.addAll(containerBundles);
-					fContainerChecked.put(containers[i], checked);
-					fAllChecked.addAll(checked);
-				} else {
-					// Mark the included bundles as checked
-					List includedBundles = Arrays.asList(containers[i].getBundles());
-					// If an included bundle has errors it must be explicitly added to the bundle list as getAllBundles does not return it.
-					for (Iterator iterator = includedBundles.iterator(); iterator.hasNext();) {
-						IResolvedBundle currentIncluded = (IResolvedBundle) iterator.next();
-						if (!currentIncluded.getStatus().isOK()) {
-							((List) fContainerBundles.get(containers[i])).add(currentIncluded);
-							fAllBundles.add(currentIncluded);
-						}
-					}
-					Set checked = new HashSet();
-					checked.addAll(includedBundles);
-					fContainerChecked.put(containers[i], checked);
-					fAllChecked.addAll(checked);
-				}
-			}
+		boolean isFeatureMode = ((TargetDefinition) fTargetDefinition).getUIMode() == TargetDefinition.MODE_FEATURE;
+		fFeaureModeButton.setSelection(isFeatureMode);
+		fPluginModeButton.setSelection(!isFeatureMode);
+		fGroupLabel.setEnabled(!isFeatureMode);
 
-			// Map the bundles into their file locations
-			fFileBundles = new HashMap();
-			fFileChecked = new HashMap();
-			for (Iterator iterator = fAllBundles.iterator(); iterator.hasNext();) {
-				IResolvedBundle currentBundle = (IResolvedBundle) iterator.next();
-				IPath parentPath = getParentPath(currentBundle);
-				List bundles = (List) fFileBundles.get(parentPath);
-				if (bundles == null) {
-					bundles = new ArrayList();
-					bundles.add(currentBundle);
-					fFileBundles.put(parentPath, bundles);
-					// Some paths may have nothing checked, but we still need a set stored in the map
-					fFileChecked.put(parentPath, new HashSet());
-				} else {
-					bundles.add(currentBundle);
-				}
-				// Determine whether the current bundle is checked
-				if (fAllChecked.contains(currentBundle)) {
-					Set checked = (Set) fFileChecked.get(parentPath);
-					if (checked == null) {
-						checked = new HashSet();
-						checked.add(currentBundle);
-						fFileChecked.put(parentPath, checked);
-					} else {
-						checked.add(currentBundle);
-					}
-				}
-			}
+		fTree.getControl().setRedraw(false);
+		fTree.setInput(fTargetDefinition);
+		fTree.expandAll();
+		updateCheckState();
+		updateButtons();
+		setEnabled(true);
+		fTree.getControl().setRedraw(true);
+	}
 
-			return Status.OK_STATUS;
+	private void updateCheckState() {
+		List result = new ArrayList();
+		// Checked error statuses
+		if (fMissing != null) {
+			result.addAll(fMissing);
+		}
+		if (fFeaureModeButton.getSelection()) {
+			// Checked features and plugins
+			result.addAll(((TargetDefinition) fTargetDefinition).getFeaturesAndBundles());
+		} else {
+			result.addAll(Arrays.asList(fTargetDefinition.getBundles()));
 		}
+		fTree.setCheckedElements(result.toArray());
 	}
 
-	private Set getChecked(Object parent) {
-		Set result = null;
-		if (parent == null) {
-			result = fAllChecked;
-		} else if (fGrouping == GROUP_BY_CONTAINER) {
-			result = (Set) fContainerChecked.get(parent);
-		} else if (fGrouping == GROUP_BY_FILE_LOC) {
-			result = (Set) fFileChecked.get(parent);
+	/**
+	 * This method clears any current target information and puts "Resolve Cancelled" into the
+	 * tree.  Setting the input to null results in "Resolving..." to be put into the table which 
+	 * may not be accurate.
+	 */
+	public void setCancelled() {
+		fTargetDefinition = null;
+		fTree.setInput(Messages.TargetContentsGroup_resolveCancelled);
+		setEnabled(false);
+	}
+
+	/**
+	 * @return a map connecting IPath to the resolved bundles in that path
+	 */
+	private Map getFileBundleMapping() {
+		if (fFileBundleMapping != null) {
+			return fFileBundleMapping;
 		}
-		if (result == null) {
-			return new HashSet(0);
+
+		// Map the bundles into their file locations
+		fFileBundleMapping = new HashMap();
+		for (Iterator iterator = fAllBundles.iterator(); iterator.hasNext();) {
+			IResolvedBundle currentBundle = (IResolvedBundle) iterator.next();
+			IPath parentPath = getParentPath(currentBundle);
+			List bundles = (List) fFileBundleMapping.get(parentPath);
+			if (bundles == null) {
+				bundles = new ArrayList();
+				bundles.add(currentBundle);
+				fFileBundleMapping.put(parentPath, bundles);
+			} else {
+				bundles.add(currentBundle);
+			}
 		}
-		return result;
+		return fFileBundleMapping;
 	}
 
-	private List getBundleChildren(Object parent) {
-		List result = null;
+	private Object[] getBundleChildren(Object parent) {
+		Object[] result = null;
 		if (parent == null) {
-			result = fAllBundles;
-		} else if (fGrouping == GROUP_BY_CONTAINER) {
-			result = (List) fContainerBundles.get(parent);
-		} else if (fGrouping == GROUP_BY_FILE_LOC) {
-			result = (List) fFileBundles.get(parent);
+			result = fAllBundles.toArray();
+		} else if (fFeaureModeButton.getSelection() && parent == OTHER_CATEGORY) {
+			return ((TargetDefinition) fTargetDefinition).getOtherBundles();
+		} else if (fGrouping == GROUP_BY_CONTAINER && parent instanceof IBundleContainer) {
+			IBundleContainer container = (IBundleContainer) parent;
+			return container.getBundles();
+		} else if (fGrouping == GROUP_BY_FILE_LOC && parent instanceof IPath) {
+			List bundles = (List) getFileBundleMapping().get(parent);
+			if (bundles != null && bundles.size() > 0) {
+				result = bundles.toArray();
+			}
 		}
 		if (result == null) {
-			return new ArrayList(0);
+			return new Object[0];
 		}
 		return result;
 	}
@@ -993,7 +1039,7 @@ public class TargetContentsGroup extends FilteredTree {
 	 * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
 	 */
 	public void setEnabled(boolean enabled) {
-		super.setEnabled(enabled);
+		fTree.getControl().setEnabled(enabled);
 		if (enabled) {
 			updateButtons();
 		} else {
@@ -1004,33 +1050,86 @@ public class TargetContentsGroup extends FilteredTree {
 			fSelectRequiredButton.setEnabled(false);
 			fCountLabel.setText(""); //$NON-NLS-1$
 		}
+		fModeLabel.setEnabled(enabled);
+		fPluginModeButton.setEnabled(enabled);
+		fFeaureModeButton.setEnabled(enabled);
 		fShowLabel.setEnabled(enabled);
 		fShowPluginsButton.setEnabled(enabled);
 		fShowSourceButton.setEnabled(enabled);
-		fGroupLabel.setEnabled(enabled);
+		boolean isPluginMode = !fFeaureModeButton.getSelection();
+		fGroupLabel.setEnabled(enabled && isPluginMode);
 		if (fGroupCombo != null) {
-			fGroupCombo.setEnabled(enabled);
+			fGroupCombo.setEnabled(enabled && isPluginMode);
 		} else {
-			fGroupComboPart.setEnabled(enabled);
+			fGroupComboPart.setEnabled(enabled && isPluginMode);
 		}
-		super.setEnabled(enabled);
 	}
 
-	public void saveIncludedBundleState(Object[] changeContainers) {
-		for (int i = 0; i < changeContainers.length; i++) {
-			if (changeContainers[i] instanceof IBundleContainer) {
-				Set checked = (Set) fContainerChecked.get(changeContainers[i]);
-				if (checked.size() == ((Collection) fContainerBundles.get(changeContainers[i])).size()) {
-					((IBundleContainer) changeContainers[i]).setIncludedBundles(null);
-				} else {
-					List included = new ArrayList(checked.size());
-					for (Iterator iterator = checked.iterator(); iterator.hasNext();) {
-						IResolvedBundle currentBundle = (IResolvedBundle) iterator.next();
-						included.add(new BundleInfo(currentBundle.getBundleInfo().getSymbolicName(), null, null, BundleInfo.NO_BUNDLEID, false));
+	public void saveIncludedBundleState() {
+		if (fFeaureModeButton.getSelection()) {
+			// Create a list of checked bundle infos
+			List included = new ArrayList();
+			Object[] checked = fTree.getCheckedLeafElements();
+			for (int i = 0; i < checked.length; i++) {
+				if (checked[i] instanceof IFeatureModel) {
+					included.add(new NameVersionDescriptor(((IFeatureModel) checked[i]).getFeature().getId(), null, NameVersionDescriptor.TYPE_FEATURE));
+				}
+				if (checked[i] instanceof IResolvedBundle) {
+					// Missing features are included as IResolvedBundles, save them as features instead
+					if (((IResolvedBundle) checked[i]).getStatus().getCode() == IResolvedBundle.STATUS_PLUGIN_DOES_NOT_EXIST) {
+						included.add(new NameVersionDescriptor(((IResolvedBundle) checked[i]).getBundleInfo().getSymbolicName(), null, NameVersionDescriptor.TYPE_PLUGIN));
+					} else if (((IResolvedBundle) checked[i]).getStatus().getCode() == IResolvedBundle.STATUS_FEATURE_DOES_NOT_EXIST) {
+						included.add(new NameVersionDescriptor(((IResolvedBundle) checked[i]).getBundleInfo().getSymbolicName(), null, NameVersionDescriptor.TYPE_FEATURE));
+					} else {
+						included.add(new NameVersionDescriptor(((IResolvedBundle) checked[i]).getBundleInfo().getSymbolicName(), null));
+					}
+				}
+			}
+
+			if (included == null || included.size() == 0) {
+				fTargetDefinition.setIncluded(new NameVersionDescriptor[0]);
+			} else if (included.size() == fTargetDefinition.getAllFeatures().length + ((TargetDefinition) fTargetDefinition).getOtherBundles().length) {
+				fTargetDefinition.setIncluded(null);
+			} else {
+				fTargetDefinition.setIncluded((NameVersionDescriptor[]) included.toArray(new NameVersionDescriptor[included.size()]));
+			}
+		} else {
+			// Figure out if there are multiple bundles sharing the same id
+			Set multi = new HashSet(); // BSNs of bundles with multiple versions available
+			Set all = new HashSet();
+			for (Iterator iterator = fAllBundles.iterator(); iterator.hasNext();) {
+				IResolvedBundle rb = (IResolvedBundle) iterator.next();
+				if (!all.add(rb.getBundleInfo().getSymbolicName())) {
+					multi.add(rb.getBundleInfo().getSymbolicName());
+				}
+			}
+
+			// Create a list of checked bundle infos
+			List included = new ArrayList();
+			Object[] checked = fTree.getCheckedLeafElements();
+			for (int i = 0; i < checked.length; i++) {
+				if (checked[i] instanceof IResolvedBundle) {
+					// Create the bundle info object
+					String bsn = ((IResolvedBundle) checked[i]).getBundleInfo().getSymbolicName();
+					NameVersionDescriptor info = null;
+					if (multi.contains(bsn)) {
+						// include version info
+						info = new NameVersionDescriptor(bsn, ((IResolvedBundle) checked[i]).getBundleInfo().getVersion());
+					} else {
+						// don't store version info
+						info = new NameVersionDescriptor(bsn, null);
 					}
-					((IBundleContainer) changeContainers[i]).setIncludedBundles((BundleInfo[]) included.toArray(new BundleInfo[included.size()]));
+					included.add(info);
 				}
 			}
+
+			if (included == null || included.size() == 0) {
+				fTargetDefinition.setIncluded(new NameVersionDescriptor[0]);
+			} else if (included.size() == fAllBundles.size()) {
+				fTargetDefinition.setIncluded(null);
+			} else {
+				fTargetDefinition.setIncluded((NameVersionDescriptor[]) included.toArray(new NameVersionDescriptor[included.size()]));
+			}
 		}
 	}
 
@@ -1040,7 +1139,7 @@ public class TargetContentsGroup extends FilteredTree {
 	 */
 	class TreeContentProvider implements ITreeContentProvider {
 		public Object[] getChildren(Object parentElement) {
-			return getBundleChildren(parentElement).toArray();
+			return getBundleChildren(parentElement);
 		}
 
 		public Object getParent(Object element) {
@@ -1048,24 +1147,52 @@ public class TargetContentsGroup extends FilteredTree {
 		}
 
 		public boolean hasChildren(Object element) {
+			if (fFeaureModeButton.getSelection() && element == OTHER_CATEGORY) {
+				return true;
+			}
 			if (fGrouping == GROUP_BY_NONE || element instanceof IResolvedBundle) {
 				return false;
 			}
 			if (element instanceof IBundleContainer || element instanceof IPath) {
-				return getBundleChildren(element).size() > 0;
+				return getBundleChildren(element).length > 0;
 			}
 			return false;
 		}
 
 		public Object[] getElements(Object inputElement) {
 			if (inputElement instanceof ITargetDefinition) {
-				if (fGrouping == GROUP_BY_NONE) {
-					return fAllBundles.toArray();
+				List result = new ArrayList();
+
+				// Check if there are any errors for missing features/bundles to display
+				if (fMissing == null) {
+					fMissing = new ArrayList();
+				} else {
+					fMissing.clear();
+				}
+				IResolvedBundle[] bundles = fTargetDefinition.getBundles();
+				for (int i = 0; i < bundles.length; i++) {
+					if (!bundles[i].getStatus().isOK()) {
+						fMissing.add(bundles[i]);
+						result.add(bundles[i]);
+					}
+				}
+
+				if (fFeaureModeButton.getSelection()) {
+					IFeatureModel[] features = fTargetDefinition.getAllFeatures();
+					result.addAll(Arrays.asList(features));
+
+					// Check if we need the other category
+					if (((TargetDefinition) fTargetDefinition).getOtherBundles().length > 0) {
+						result.add(OTHER_CATEGORY);
+					}
 				} else if (fGrouping == GROUP_BY_CONTAINER) {
-					return fContainerBundles.keySet().toArray();
+					result.addAll(Arrays.asList(fTargetDefinition.getBundleContainers()));
+				} else if (fGrouping == GROUP_BY_NONE) {
+					result.addAll(Arrays.asList(fTargetDefinition.getAllBundles()));
 				} else {
-					return fFileBundles.keySet().toArray();
+					result.addAll(Arrays.asList(getFileBundleMapping().keySet().toArray()));
 				}
+				return result.toArray();
 			}
 			return new Object[] {inputElement};
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
index 1e14067..4772ac4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/TargetLocationsGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,11 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.shared.target;
 
-import java.util.ArrayList;
+import java.util.*;
+import java.util.List;
 import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
@@ -24,8 +26,7 @@ import org.eclipse.pde.internal.ui.editor.FormLayoutFactory;
 import org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor;
 import org.eclipse.pde.internal.ui.wizards.target.TargetDefinitionContentPage;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
@@ -47,7 +48,6 @@ public class TargetLocationsGroup {
 	private Button fAddButton;
 	private Button fEditButton;
 	private Button fRemoveButton;
-	private Button fRemoveAllButton;
 	private Button fShowContentButton;
 
 	private ITargetDefinition fTarget;
@@ -58,7 +58,6 @@ public class TargetLocationsGroup {
 	 * 
 	 * @param parent parent composite
 	 * @param toolkit toolkit to create the widgets with
-	 * @param reporter reporter implementation that will handle resolving and changes to the containers
 	 * @return generated instance of the table part
 	 */
 	public static TargetLocationsGroup createInForm(Composite parent, FormToolkit toolkit) {
@@ -71,7 +70,6 @@ public class TargetLocationsGroup {
 	 * Creates this part using standard dialog widgets and adds it to the given composite.
 	 * 
 	 * @param parent parent composite
-	 * @param reporter reporter implementation that will handle resolving and changes to the containers
 	 * @return generated instance of the table part
 	 */
 	public static TargetLocationsGroup createInDialog(Composite parent) {
@@ -110,10 +108,18 @@ public class TargetLocationsGroup {
 		comp.setLayout(FormLayoutFactory.createSectionClientGridLayout(false, 2));
 		comp.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
 
-		Tree atree = toolkit.createTree(comp, SWT.V_SCROLL | SWT.H_SCROLL);
+		Tree atree = toolkit.createTree(comp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
 		atree.setLayout(new GridLayout());
 		GridData gd = new GridData(GridData.FILL_BOTH);
 		atree.setLayoutData(gd);
+		atree.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL && fRemoveButton.getEnabled()) {
+					handleRemove();
+				}
+
+			}
+		});
 
 		Composite buttonComp = toolkit.createComposite(comp);
 		GridLayout layout = new GridLayout();
@@ -124,7 +130,6 @@ public class TargetLocationsGroup {
 		fAddButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_0, SWT.PUSH);
 		fEditButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_1, SWT.PUSH);
 		fRemoveButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_2, SWT.PUSH);
-		fRemoveAllButton = toolkit.createButton(buttonComp, Messages.BundleContainerTable_3, SWT.PUSH);
 
 		fShowContentButton = toolkit.createButton(comp, Messages.TargetLocationsGroup_1, SWT.CHECK);
 
@@ -141,11 +146,18 @@ public class TargetLocationsGroup {
 	private void createDialogContents(Composite parent) {
 		Composite comp = SWTFactory.createComposite(parent, 2, 1, GridData.FILL_BOTH, 0, 0);
 
-		Tree atree = new Tree(comp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
+		Tree atree = new Tree(comp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.MULTI);
 		atree.setLayout(new GridLayout());
 		GridData gd = new GridData(GridData.FILL_BOTH);
 		gd.widthHint = 200;
 		atree.setLayoutData(gd);
+		atree.addKeyListener(new KeyAdapter() {
+			public void keyPressed(KeyEvent e) {
+				if (e.keyCode == SWT.DEL && fRemoveButton.getEnabled()) {
+					handleRemove();
+				}
+			}
+		});
 
 		Composite buttonComp = SWTFactory.createComposite(comp, 2, 1, GridData.FILL_BOTH);
 		GridLayout layout = new GridLayout();
@@ -157,7 +169,6 @@ public class TargetLocationsGroup {
 		fAddButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_0, null);
 		fEditButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_1, null);
 		fRemoveButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_2, null);
-		fRemoveAllButton = SWTFactory.createPushButton(buttonComp, Messages.BundleContainerTable_3, null);
 
 		fShowContentButton = SWTFactory.createCheckButton(comp, Messages.TargetLocationsGroup_1, null, false, 2);
 
@@ -173,7 +184,18 @@ public class TargetLocationsGroup {
 		fTreeViewer = new TreeViewer(tree);
 		fTreeViewer.setContentProvider(new BundleContainerContentProvider());
 		fTreeViewer.setLabelProvider(new StyledBundleLabelProvider(true, false));
-		fTreeViewer.setComparator(new ViewerComparator());
+		fTreeViewer.setComparator(new ViewerComparator() {
+			public int compare(Viewer viewer, Object e1, Object e2) {
+				// Status at the end of the list
+				if (e1 instanceof IStatus && !(e2 instanceof IStatus)) {
+					return 1;
+				}
+				if (e2 instanceof IStatus && !(e1 instanceof IStatus)) {
+					return -1;
+				}
+				return super.compare(viewer, e1, e2);
+			}
+		});
 		fTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
 			public void selectionChanged(SelectionChangedEvent event) {
 				updateButtons();
@@ -219,14 +241,6 @@ public class TargetLocationsGroup {
 		fRemoveButton.setEnabled(false);
 		SWTFactory.setButtonDimensionHint(fRemoveButton);
 
-		fRemoveAllButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				handleRemoveAll();
-			}
-		});
-		fRemoveAllButton.setLayoutData(new GridData());
-		SWTFactory.setButtonDimensionHint(fRemoveAllButton);
-
 		fShowContentButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				fTreeViewer.refresh();
@@ -266,6 +280,8 @@ public class TargetLocationsGroup {
 			IBundleContainer oldContainer = null;
 			if (selected instanceof IBundleContainer) {
 				oldContainer = (IBundleContainer) selected;
+			} else if (selected instanceof IUWrapper) {
+				oldContainer = ((IUWrapper) selected).getParent();
 			} else if (selected instanceof IResolvedBundle) {
 				TreeItem[] treeSelection = fTreeViewer.getTree().getSelection();
 				if (treeSelection.length > 0) {
@@ -306,41 +322,71 @@ public class TargetLocationsGroup {
 
 	private void handleRemove() {
 		IStructuredSelection selection = (IStructuredSelection) fTreeViewer.getSelection();
-		if (!selection.isEmpty()) {
-			Object selected = selection.getFirstElement();
-			IBundleContainer container = null;
-			if (selected instanceof IBundleContainer) {
-				container = (IBundleContainer) selected;
-				IBundleContainer[] currentContainers = fTarget.getBundleContainers();
-				ArrayList newBundleContainers = new ArrayList(currentContainers.length);
-				for (int i = 0; i < currentContainers.length; i++) {
-					if (!currentContainers[i].equals(container)) {
-						newBundleContainers.add(currentContainers[i]);
+		IBundleContainer[] containers = fTarget.getBundleContainers();
+		if (!selection.isEmpty() && containers != null && containers.length > 0) {
+			List toRemove = new ArrayList();
+			boolean removedSite = false;
+			boolean removedContainer = false;
+			for (Iterator iterator = selection.iterator(); iterator.hasNext();) {
+				Object currentSelection = iterator.next();
+				if (currentSelection instanceof IBundleContainer) {
+					if (currentSelection instanceof IUBundleContainer) {
+						removedSite = true;
 					}
+					removedContainer = true;
+					toRemove.add(currentSelection);
+				}
+				if (currentSelection instanceof IUWrapper) {
+					toRemove.add(currentSelection);
+				}
+			}
+
+			if (removedContainer) {
+				Set newContainers = new HashSet();
+				newContainers.addAll(Arrays.asList(fTarget.getBundleContainers()));
+				newContainers.removeAll(toRemove);
+				if (newContainers.size() > 0) {
+					fTarget.setBundleContainers((IBundleContainer[]) newContainers.toArray(new IBundleContainer[newContainers.size()]));
+				} else {
+					fTarget.setBundleContainers(null);
 				}
-				fTarget.setBundleContainers((IBundleContainer[]) newBundleContainers.toArray(new IBundleContainer[newBundleContainers.size()]));
 
-				// If we remove a site container, we must force a re-resolve bug 275458 / bug 275401
-				contentsChanged(container instanceof IUBundleContainer);
+				// If we remove a site container, the content change update must force a re-resolve bug 275458 / bug 275401
+				contentsChanged(removedSite);
 				fTreeViewer.refresh(false);
 				updateButtons();
+			} else {
+				for (Iterator iterator = toRemove.iterator(); iterator.hasNext();) {
+					Object current = iterator.next();
+					if (current instanceof IUWrapper) {
+						((IUWrapper) current).getParent().removeInstallableUnit(((IUWrapper) current).getIU());
+					}
+				}
+				contentsChanged(removedSite);
+				fTreeViewer.refresh(true);
+				updateButtons();
 			}
 		}
 	}
 
-	private void handleRemoveAll() {
-		// Force the target to resolve to cancel any resolve jobs
-		fTarget.setBundleContainers(null);
-		contentsChanged(true);
-		fTreeViewer.refresh(false);
-		updateButtons();
-	}
-
 	private void updateButtons() {
 		IStructuredSelection selection = (IStructuredSelection) fTreeViewer.getSelection();
-		fEditButton.setEnabled(!selection.isEmpty() && selection.getFirstElement() instanceof IBundleContainer);
-		fRemoveButton.setEnabled(!selection.isEmpty() && selection.getFirstElement() instanceof IBundleContainer);
-		fRemoveAllButton.setEnabled(fTarget != null && fTarget.getBundleContainers() != null && fTarget.getBundleContainers().length > 0);
+		fEditButton.setEnabled(!selection.isEmpty() && (selection.getFirstElement() instanceof IBundleContainer || selection.getFirstElement() instanceof IUWrapper));
+		// If any container is selected, allow the remove (the remove ignores non-container entries)
+		boolean removeAllowed = false;
+		Iterator iter = selection.iterator();
+		while (iter.hasNext()) {
+			Object current = iter.next();
+			if (current instanceof IBundleContainer) {
+				removeAllowed = true;
+				break;
+			}
+			if (current instanceof IUWrapper) {
+				removeAllowed = true;
+				break;
+			}
+		}
+		fRemoveButton.setEnabled(removeAllowed);
 	}
 
 	/**
@@ -366,7 +412,7 @@ public class TargetLocationsGroup {
 			} else if (parentElement instanceof IBundleContainer) {
 				IBundleContainer container = (IBundleContainer) parentElement;
 				if (container.isResolved()) {
-					IStatus status = container.getBundleStatus();
+					IStatus status = container.getStatus();
 					if (!status.isOK() && !status.isMultiStatus()) {
 						return new Object[] {status};
 					}
@@ -382,17 +428,28 @@ public class TargetLocationsGroup {
 						// TODO See if we can get the profile using API
 						try {
 							IProfile profile = ((TargetDefinition) fTarget).getProfile();
-							return ((IUBundleContainer) parentElement).getInstallableUnits(profile);
+							IInstallableUnit[] units = ((IUBundleContainer) parentElement).getInstallableUnits(profile);
+							// Wrap the units so that they remember their parent container
+							List wrappedUnits = new ArrayList(units.length);
+							for (int i = 0; i < units.length; i++) {
+								wrappedUnits.add(new IUWrapper(units[i], (IUBundleContainer) parentElement));
+							}
+							return wrappedUnits.toArray();
 						} catch (CoreException e) {
 							return new Object[] {e.getStatus()};
 						}
 					}
 				}
+			} else if (parentElement instanceof MultiStatus) {
+				return ((MultiStatus) parentElement).getChildren();
 			}
 			return new Object[0];
 		}
 
 		public Object getParent(Object element) {
+			if (element instanceof IUWrapper) {
+				return ((IUWrapper) element).getParent();
+			}
 			return null;
 		}
 
@@ -403,10 +460,25 @@ public class TargetLocationsGroup {
 
 		public Object[] getElements(Object inputElement) {
 			if (inputElement instanceof ITargetDefinition) {
+				boolean hasContainerStatus = false;
+				Collection result = new ArrayList();
 				IBundleContainer[] containers = ((ITargetDefinition) inputElement).getBundleContainers();
 				if (containers != null) {
-					return containers;
+					for (int i = 0; i < containers.length; i++) {
+						result.add(containers[i]);
+						if (containers[i].getStatus() != null && !containers[i].getStatus().isOK()) {
+							hasContainerStatus = true;
+						}
+					}
 				}
+				// If a container has a problem, it is displayed as a child, if there is a status outside of the container status (missing bundle, etc.) put it as a separate item
+				if (!hasContainerStatus) {
+					IStatus status = ((ITargetDefinition) inputElement).getBundleStatus();
+					if (status != null && !status.isOK()) {
+						result.add(status);
+					}
+				}
+				return result.toArray();
 			} else if (inputElement instanceof String) {
 				return new Object[] {inputElement};
 			}
@@ -421,4 +493,26 @@ public class TargetLocationsGroup {
 
 	}
 
+	/**
+	 * Wraps an installable unit so that it knows what bundle container parent it belongs to
+	 * in the tree.
+	 */
+	class IUWrapper {
+		private IInstallableUnit fIU;
+		private IUBundleContainer fParent;
+
+		public IUWrapper(IInstallableUnit unit, IUBundleContainer parent) {
+			fIU = unit;
+			fParent = parent;
+		}
+
+		public IInstallableUnit getIU() {
+			return fIU;
+		}
+
+		public IUBundleContainer getParent() {
+			return fParent;
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
index 099deb5..c439645 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/shared/target/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-#  Copyright (c) 2005, 2009 IBM Corporation and others.
+#  Copyright (c) 2005, 2010 IBM Corporation and others.
 #  All rights reserved. This program and the accompanying materials
 #  are made available under the terms of the Eclipse Public License v1.0
 #  which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
 ###############################################################################
 AddBundleContainerSelectionPage_0=Error Creating Container
 AddBundleContainerSelectionPage_1=Add Content
-AddBundleContainerSelectionPage_10=One or more features (groups of plug-ins) from an installation. The plug-ins included in the features will be added to the target definition.
+AddBundleContainerSelectionPage_10=One or more features (groups of plug-ins) taken from an installation. The plug-ins included in the features will be added to the target definition.
 AddBundleContainerSelectionPage_11=Download plug-ins from a software site such as a p2 repository or update site.
 AddBundleContainerSelectionPage_2=Select a source of plug-ins.
 AddBundleContainerSelectionPage_3=Directory
@@ -53,15 +53,14 @@ ArgumentsFromContainerSelectionDialog_5=No arguments could be found in the insta
 BundleContainerTable_0=&Add...
 BundleContainerTable_1=&Edit...
 BundleContainerTable_2=&Remove
-BundleContainerTable_3=Re&move All
 
 BundleContainerTable_8=Unspecified Site
-# Styled label section describing included number of bundles added at end of label
-# example: (12 of 15 included)
-BundleContainerTable_10=({0} of {1} included)
+# Styled label section describing number of plug-ins in the location
+# example: 12 plug-ins
+BundleContainerTable_10={0} plug-ins available
 
 BundleContainerTable_14=&Plug-ins
-BundleContainerTable_15=So&urce Bundles
+BundleContainerTable_15=So&urce bundles
 BundleContainerTable_9=Show:
 EditBundleContainerWizard_0=Edit Content
 EditDirectoryContainerPage_0=Edit Directory
@@ -89,6 +88,8 @@ EditIUContainerPage_6=Select content from a software site to be added to your ta
 EditIUContainerPage_7=Edit Software Site
 EditIUContainerPage_8=Include all environments
 EditIUContainerPage_9=The target platform service could not be acquired.
+EditIUContainerPage_itemSelected={0} item selected
+EditIUContainerPage_itemsSelected={0} items selected
 EditProfileContainerPage_1=Var&iables...
 EditProfileContainerPage_2=Select a configuration directory
 EditProfileContainerPage_3=Edit Installation
@@ -108,12 +109,16 @@ TargetContentsGroup_0=Gr&oup by:
 TargetContentsGroup_1=None
 TargetContentsGroup_10=Resolving...
 TargetContentsGroup_11=< no plug-ins found in the target >
-TargetContentsGroup_12=Initializing...
-TargetContentsGroup_13=Refreshing Tree Contents
 TargetContentsGroup_2=File Path
 TargetContentsGroup_3=Location
 TargetContentsGroup_4=Add &Required
 TargetContentsGroup_5=Calculating dependencies...
 TargetContentsGroup_8=Unknown
 TargetContentsGroup_9={0} of {1} selected
-TargetLocationsGroup_1=Show Plug-in Content
+TargetContentsGroup_collapseAll=&Collapse All
+TargetContentsGroup_FeatureMode=Features
+TargetContentsGroup_ManageUsing=Manage using:
+TargetContentsGroup_OtherPluginsParent=Other Plug-ins
+TargetContentsGroup_PluginMode=Plug-ins
+TargetContentsGroup_resolveCancelled=Resolve Cancelled
+TargetLocationsGroup_1=&Show location content
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ModelModification.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ModelModification.java
index 7c74d50..0923d65 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ModelModification.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/ModelModification.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,6 +14,8 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.pde.core.IBaseModel;
+import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 
 /**
  * ModelModification class used my the PDEModelUtility
@@ -54,12 +56,12 @@ public abstract class ModelModification {
 	 * @param project
 	 */
 	public ModelModification(IProject project) {
-		IFile xml = project.getFile(PDEModelUtility.F_PLUGIN);
+		IFile xml = PDEProject.getPluginXml(project);
 		if (!xml.exists())
-			xml = project.getFile(PDEModelUtility.F_FRAGMENT);
+			xml = PDEProject.getFragmentXml(project);
 		if (!xml.exists())
 			xml = null;
-		IFile manifest = project.getFile(PDEModelUtility.F_MANIFEST_FP);
+		IFile manifest = PDEProject.getManifest(project);
 		if (!manifest.exists() && xml != null)
 			singleFileModification(xml);
 		else if (manifest.exists())
@@ -74,7 +76,7 @@ public abstract class ModelModification {
 			fModelFile = fXMLFile;
 		else if (fPropertiesFile != null)
 			fModelFile = fPropertiesFile;
-		fIsBundleModel = file.getName().equals(PDEModelUtility.F_MANIFEST);
+		fIsBundleModel = file.getName().equals(ICoreConstants.MANIFEST_FILENAME);
 	}
 
 	private void createFullBundleModification(IFile bundleFile, IFile xmlFile) {
@@ -90,9 +92,9 @@ public abstract class ModelModification {
 		if (file == null)
 			return;
 		String name = file.getName();
-		if (name.equals(PDEModelUtility.F_MANIFEST))
+		if (name.equals(ICoreConstants.MANIFEST_FILENAME))
 			fManifestFile = file;
-		else if (name.equals(PDEModelUtility.F_PLUGIN) || name.equals(PDEModelUtility.F_FRAGMENT))
+		else if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 			fXMLFile = file;
 		else if (name.endsWith(PDEModelUtility.F_PROPERTIES))
 			fPropertiesFile = file;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsole.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsole.java
new file mode 100644
index 0000000..77df9a0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsole.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <caniszczyk at gmail.com> - initial API and implementation
+ *     IBM Corporation - ongoing enhancements and bug fixing
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.util;
+
+import java.io.*;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.framework.console.ConsoleSession;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.ui.console.IOConsole;
+import org.eclipse.ui.console.IOConsoleOutputStream;
+import org.osgi.framework.BundleContext;
+
+/**
+ * OSGi console connected to the Host/Running Eclipse.
+ * 
+ * @since 3.6
+ */
+public class OSGiConsole extends IOConsole {
+
+	public final static String TYPE = "osgiConsole"; //$NON-NLS-1$
+	private final ConsoleSession session;
+
+	public OSGiConsole(final OSGiConsoleFactory factory) {
+		super(NLS.bind(PDEUIMessages.OSGiConsole_name, Platform.getInstallLocation().getURL().getPath()), TYPE, null, true);
+		session = new ConsoleSession() {
+
+			public OutputStream getOutput() {
+				return newOutputStream();
+			}
+
+			public InputStream getInput() {
+				return getInputStream();
+			}
+
+			protected void doClose() {
+				factory.closeConsole(OSGiConsole.this);
+			}
+		};
+	}
+
+	protected void init() {
+		super.init();
+		IOConsoleOutputStream info = newOutputStream(); // create a stream to write info message to
+		try {
+			info.write(PDEUIMessages.OSGiConsoleFactory_title);
+		} catch (IOException e) {
+		} finally {
+			try {
+				info.close();
+			} catch (IOException e) {
+				PDEPlugin.log(e);
+			}
+		}
+
+		BundleContext context = PDEPlugin.getDefault().getBundle().getBundleContext();
+		context.registerService(ConsoleSession.class.getName(), session, null);
+	}
+
+	protected void dispose() {
+		super.dispose();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsoleFactory.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsoleFactory.java
new file mode 100644
index 0000000..e957351
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsoleFactory.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <caniszczyk at gmail.com> - initial API and implementation
+ *     IBM Corporation - ongoing enhancements and bug fixes
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.util;
+
+import org.eclipse.ui.console.*;
+
+/**
+ * Console factory extension used to create a "Host OSGi Console".
+ * 
+ * @since 3.6
+ */
+public class OSGiConsoleFactory implements IConsoleFactory {
+	private final IConsoleManager fConsoleManager;
+	private IOConsole fConsole = null;
+
+	public OSGiConsoleFactory() {
+		fConsoleManager = ConsolePlugin.getDefault().getConsoleManager();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.console.IConsoleFactory#openConsole()
+	 */
+	public void openConsole() {
+		IOConsole console = getConsole();
+
+		IConsole[] existing = fConsoleManager.getConsoles();
+		boolean exists = false;
+		for (int i = 0; i < existing.length; i++) {
+			if (console == existing[i])
+				exists = true;
+		}
+		if (!exists)
+			fConsoleManager.addConsoles(new IConsole[] {console});
+		fConsoleManager.showConsoleView(console);
+	}
+
+	private synchronized IOConsole getConsole() {
+		if (fConsole != null)
+			return fConsole;
+		fConsole = new OSGiConsole(this);
+		return fConsole;
+	}
+
+	void closeConsole(OSGiConsole console) {
+		synchronized (this) {
+			if (console != fConsole)
+				throw new IllegalArgumentException("Wrong console instance!"); //$NON-NLS-1$
+			fConsole = null;
+		}
+		fConsoleManager.removeConsoles(new IConsole[] {console});
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsolePageParticipant.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsolePageParticipant.java
new file mode 100644
index 0000000..a6fcbbe
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/OSGiConsolePageParticipant.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.util;
+
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.ui.console.*;
+import org.eclipse.ui.console.actions.CloseConsoleAction;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+/**
+ * Page participant extension for an OSGi console. Contributes a close action.
+ * 
+ * @since 3.6
+ */
+public class OSGiConsolePageParticipant implements IConsolePageParticipant {
+
+	private CloseConsoleAction fCloseAction;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+	 */
+	public Object getAdapter(Class adapter) {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.console.IConsolePageParticipant#init(org.eclipse.ui.part.IPageBookViewPage, org.eclipse.ui.console.IConsole)
+	 */
+	public void init(IPageBookViewPage page, IConsole console) {
+		fCloseAction = new CloseConsoleAction(console);
+		IToolBarManager manager = page.getSite().getActionBars().getToolBarManager();
+		manager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, fCloseAction);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.console.IConsolePageParticipant#dispose()
+	 */
+	public void dispose() {
+		fCloseAction = null;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.console.IConsolePageParticipant#activated()
+	 */
+	public void activated() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.console.IConsolePageParticipant#deactivated()
+	 */
+	public void deactivated() {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEJavaHelperUI.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEJavaHelperUI.java
index 3c7b243..1c94e8e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEJavaHelperUI.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEJavaHelperUI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.jdt.core.search.IJavaSearchScope;
 import org.eclipse.jdt.core.search.SearchEngine;
 import org.eclipse.jdt.ui.JavaUI;
 import org.eclipse.jface.fieldassist.*;
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
@@ -32,7 +33,6 @@ import org.eclipse.pde.internal.ui.editor.contentassist.*;
 import org.eclipse.pde.internal.ui.editor.contentassist.display.JavaDocCommentReader;
 import org.eclipse.pde.internal.ui.editor.plugin.JavaAttributeValue;
 import org.eclipse.pde.internal.ui.editor.plugin.JavaAttributeWizard;
-import org.eclipse.pde.internal.ui.editor.text.HTMLPrinter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Text;
@@ -71,7 +71,7 @@ public class PDEJavaHelperUI {
 				IJavaProject javaProject = JavaCore.create(project);
 				IType superType = javaProject.findType(superTypeName);
 				if (superType != null)
-					searchScope = SearchEngine.createHierarchyScope(superType);
+					searchScope = SearchEngine.createStrictHierarchyScope(javaProject, superType, true, false, null);
 			}
 			if (searchScope == null)
 				searchScope = PDEJavaHelper.getSearchScope(project);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
index 9a5b070..09c47f2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PDEModelUtility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.ltk.core.refactoring.TextFileChange;
 import org.eclipse.pde.core.IBaseModel;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.ISharedExtensionsModel;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.bundle.BundleFragmentModel;
 import org.eclipse.pde.internal.core.bundle.BundlePluginModel;
 import org.eclipse.pde.internal.core.ibundle.IBundleModel;
@@ -54,12 +55,7 @@ import org.osgi.framework.Constants;
  */
 public class PDEModelUtility {
 
-	public static final String F_MANIFEST = "MANIFEST.MF"; //$NON-NLS-1$
-	public static final String F_MANIFEST_FP = "META-INF/" + F_MANIFEST; //$NON-NLS-1$
-	public static final String F_PLUGIN = "plugin.xml"; //$NON-NLS-1$
-	public static final String F_FRAGMENT = "fragment.xml"; //$NON-NLS-1$
 	public static final String F_PROPERTIES = ".properties"; //$NON-NLS-1$
-	public static final String F_BUILD = "build" + F_PROPERTIES; //$NON-NLS-1$
 
 	// bundle / xml various Object[] indices
 	private static final int F_Bi = 0; // the manifest.mf-related object will always be 1st
@@ -405,10 +401,8 @@ public class PDEModelUtility {
 			return;
 		// mark a plugin.xml or a fragment.xml as PLUGIN2 type so they will be compared
 		// with the PluginContentMergeViewer
-		String textType = name.equals("plugin.xml") || //$NON-NLS-1$
-				name.equals("fragment.xml") ? //$NON-NLS-1$
-		"PLUGIN2" //$NON-NLS-1$
-				: file.getFileExtension(); 
+		String textType = name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) ? "PLUGIN2" //$NON-NLS-1$
+				: file.getFileExtension();
 		// if the file extension is null, the setTextType method will use type "txt", so no null guard needed
 		change.setTextType(textType);
 	}
@@ -438,9 +432,9 @@ public class PDEModelUtility {
 	private static PDEFormEditor getOpenEditor(ModelModification modification) {
 		IProject project = modification.getFile().getProject();
 		String name = modification.getFile().getName();
-		if (name.equals(F_PLUGIN) || name.equals(F_FRAGMENT) || name.equals(F_MANIFEST)) {
+		if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.MANIFEST_FILENAME)) {
 			return getOpenManifestEditor(project);
-		} else if (name.equals(F_BUILD)) {
+		} else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			PDEFormEditor openEditor = getOpenBuildPropertiesEditor(project);
 			if (openEditor == null)
 				openEditor = getOpenManifestEditor(project);
@@ -454,11 +448,11 @@ public class PDEModelUtility {
 			return null;
 		String name = modification.getFile().getName();
 		IBaseModel model = null;
-		if (name.equals(F_PLUGIN) || name.equals(F_FRAGMENT)) {
+		if (name.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || name.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR)) {
 			model = openEditor.getAggregateModel();
 			if (model instanceof IBundlePluginModelBase)
 				model = ((IBundlePluginModelBase) model).getExtensionsModel();
-		} else if (name.equals(F_BUILD)) {
+		} else if (name.equals(ICoreConstants.BUILD_FILENAME_DESCRIPTOR)) {
 			if (openEditor instanceof BuildEditor) {
 				model = openEditor.getAggregateModel();
 			} else if (openEditor instanceof ManifestEditor) {
@@ -466,7 +460,7 @@ public class PDEModelUtility {
 				if (page instanceof BuildSourcePage)
 					model = ((BuildSourcePage) page).getInputContext().getModel();
 			}
-		} else if (name.equals(F_MANIFEST)) {
+		} else if (name.equals(ICoreConstants.MANIFEST_FILENAME)) {
 			model = openEditor.getAggregateModel();
 			if (model instanceof IBundlePluginModelBase)
 				return model;
@@ -477,9 +471,9 @@ public class PDEModelUtility {
 	}
 
 	private static IModelTextChangeListener createListener(String filename, IDocument doc, boolean generateEditNames) {
-		if (filename.equals(F_PLUGIN) || filename.equals(F_FRAGMENT))
+		if (filename.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || filename.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 			return new XMLTextChangeListener(doc, generateEditNames);
-		else if (filename.equals(F_MANIFEST))
+		else if (filename.equals(ICoreConstants.MANIFEST_FILENAME))
 			return new BundleTextChangeListener(doc, generateEditNames);
 		else if (filename.endsWith(F_PROPERTIES))
 			return new PropertiesTextChangeListener(doc, generateEditNames);
@@ -489,11 +483,11 @@ public class PDEModelUtility {
 	private static AbstractEditingModel prepareAbstractEditingModel(IFile file, IDocument doc, boolean generateEditNames) {
 		AbstractEditingModel model;
 		String filename = file.getName();
-		if (filename.equals(F_MANIFEST))
+		if (filename.equals(ICoreConstants.MANIFEST_FILENAME))
 			model = new BundleModel(doc, true);
-		else if (filename.equals(F_FRAGMENT))
+		else if (filename.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR))
 			model = new FragmentModel(doc, true);
-		else if (filename.equals(F_PLUGIN))
+		else if (filename.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR))
 			model = new PluginModel(doc, true);
 		else if (filename.endsWith(F_PROPERTIES))
 			model = new BuildModel(doc, true);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PluginWorkingSet.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PluginWorkingSet.java
index 825cd94..20d4f86 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PluginWorkingSet.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/util/PluginWorkingSet.java
@@ -265,6 +265,7 @@ public class PluginWorkingSet extends WizardPage implements IWorkingSetPage {
 	 */
 	public void dispose() {
 		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+		super.dispose();
 	}
 
 	private void validatePage() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
index 82719eb..0ce6420 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/ImportActionGroup.java
@@ -1,25 +1,31 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.views.plugins;
 
-import java.util.ArrayList;
-import java.util.Iterator;
+import java.util.*;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.pde.core.plugin.*;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.importing.provisional.IBundleImporterDelegate;
+import org.eclipse.pde.internal.core.project.BundleProjectService;
+import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation;
-import org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard;
+import org.eclipse.pde.internal.ui.wizards.imports.*;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.actions.ActionGroup;
 
@@ -42,6 +48,9 @@ public class ImportActionGroup extends ActionGroup {
 				case PluginImportOperation.IMPORT_WITH_SOURCE :
 					setText(PDEUIMessages.PluginsView_asSourceProject);
 					break;
+				case PluginImportOperation.IMPORT_FROM_REPOSITORY :
+					setText(PDEUIMessages.ImportActionGroup_Repository_project);
+					break;
 			}
 		}
 
@@ -64,6 +73,7 @@ public class ImportActionGroup extends ActionGroup {
 			importMenu.add(new ImportAction(PluginImportOperation.IMPORT_BINARY, sSelection));
 			importMenu.add(new ImportAction(PluginImportOperation.IMPORT_BINARY_WITH_LINKS, sSelection));
 			importMenu.add(new ImportAction(PluginImportOperation.IMPORT_WITH_SOURCE, sSelection));
+			importMenu.add(new ImportAction(PluginImportOperation.IMPORT_FROM_REPOSITORY, sSelection));
 			menu.add(importMenu);
 		}
 	}
@@ -79,8 +89,39 @@ public class ImportActionGroup extends ActionGroup {
 		if (display == null)
 			display = Display.getDefault();
 		IPluginModelBase[] models = (IPluginModelBase[]) externalModels.toArray(new IPluginModelBase[externalModels.size()]);
+		if (importType == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+			Map importMap = getImportDescriptions(display.getActiveShell(), models);
+			if (importMap != null) {
+				RepositoryImportWizard wizard = new RepositoryImportWizard(importMap);
+				WizardDialog dialog = new WizardDialog(display.getActiveShell(), wizard);
+				dialog.open();
+			}
+		} else {
+			PluginImportWizard.doImportOperation(display.getActiveShell(), importType, models, false);
+		}
+	}
 
-		PluginImportWizard.doImportOperation(display.getActiveShell(), importType, models, false);
+	/**
+	 * Return a map of {@link IBundleImporterDelegate} > Array of {@link BundleImportDescription} to be imported.
+	 * 
+	 * @param shell shell to open message dialogs on, if required
+	 * @param models candidate models
+	 * @return  map of importer delegates to import descriptions
+	 */
+	private Map getImportDescriptions(Shell shell, IPluginModelBase[] models) {
+		BundleProjectService service = (BundleProjectService) BundleProjectService.getDefault();
+		try {
+			Map descriptions = service.getImportDescriptions(models); // all possible descriptions
+			if (!descriptions.isEmpty()) {
+				return descriptions;
+			}
+			// no applicable importers for selected models
+			MessageDialog.openInformation(shell, PDEUIMessages.ImportWizard_title, PDEUIMessages.ImportActionGroup_cannot_import);
+		} catch (CoreException e) {
+			PDEPlugin.log(e);
+			MessageDialog.openError(shell, PDEUIMessages.ImportWizard_title, e.getMessage());
+		}
+		return null;
 	}
 
 	public static boolean canImport(IStructuredSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
index 9035b2c..eeb41ae 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/JavaSearchActionGroup.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.views.plugins;
@@ -15,14 +15,15 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.SearchablePluginsManager;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.*;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.actions.ActionGroup;
@@ -42,7 +43,16 @@ public class JavaSearchActionGroup extends ActionGroup {
 		}
 
 		public void run() {
-			handleJavaSearch(add);
+			IPreferenceStore store = PDEPlugin.getDefault().getPreferenceStore();
+			if (!add && store.getBoolean(IPreferenceConstants.ADD_TO_JAVA_SEARCH)) {
+				boolean confirm = MessageDialog.openConfirm(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.JavaSearchActionGroup_RemoveJavaSearchTitle, PDEUIMessages.JavaSearchActionGroup_RemoveJavaSearchMessage);
+				if (confirm) {
+					store.setValue(IPreferenceConstants.ADD_TO_JAVA_SEARCH, false);
+					handleJavaSearch(add);
+				}
+			} else {
+				handleJavaSearch(add);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
index c873d2c..4fa9f9d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/views/plugins/PluginsView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -502,9 +502,7 @@ public class PluginsView extends ViewPart implements IPluginModelListener {
 		String fileName = adapter.getFile().getName();
 		String lcFileName = fileName.toLowerCase(Locale.ENGLISH);
 		ImageDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor(fileName);
-		if (lcFileName.equals("plugin.xml") //$NON-NLS-1$
-				|| lcFileName.equals("fragment.xml") //$NON-NLS-1$
-				|| lcFileName.equals("manifest.mf")) { //$NON-NLS-1$
+		if (lcFileName.equals(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR) || lcFileName.equals(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) || lcFileName.equals(ICoreConstants.MANIFEST_FILENAME_LOWER_CASE)) {
 			fOpenManifestAction.setImageDescriptor(desc);
 			manager.add(fOpenManifestAction);
 			manager.add(new Separator());
@@ -623,7 +621,8 @@ public class PluginsView extends ViewPart implements IPluginModelListener {
 
 		IPluginModelBase[] models = new IPluginModelBase[selection.size()];
 		System.arraycopy(selection.toArray(), 0, models, 0, selection.size());
-		Set set = DependencyManager.getSelfandDependencies(models);
+		// exclude "org.eclipse.ui.workbench.compatibility" - it is only needed for pre-3.0 bundles
+		Set set = DependencyManager.getSelfandDependencies(models, new String[] {"org.eclipse.ui.workbench.compatibility"}); //$NON-NLS-1$
 		Object[] symbolicNames = set.toArray();
 		ArrayList result = new ArrayList(set.size());
 		for (int i = 0; i < symbolicNames.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AbstractExportTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AbstractExportTab.java
index 00f0c1a..482da2a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AbstractExportTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AbstractExportTab.java
@@ -53,13 +53,13 @@ public abstract class AbstractExportTab {
 		}
 	}
 
-	protected void chooseFile(Combo combo, String filter) {
+	protected void chooseFile(Combo combo, String[] filters) {
 		FileDialog dialog = new FileDialog(fPage.getShell(), SWT.SAVE);
 		String path = combo.getText();
 		if (path.trim().length() == 0)
 			path = PDEPlugin.getWorkspace().getRoot().getLocation().toString();
 		dialog.setFileName(path);
-		dialog.setFilterExtensions(new String[] {filter});
+		dialog.setFilterExtensions(filters);
 		String res = dialog.open();
 		if (res != null) {
 			if (combo.indexOf(res) == -1)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AntGeneratingExportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AntGeneratingExportWizard.java
index acbdc62..983e51c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AntGeneratingExportWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/AntGeneratingExportWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.pde.internal.core.XMLPrintHandler;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.feature.WorkspaceFeatureModel;
 import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.build.BaseBuildAction;
 import org.eclipse.swt.SWT;
@@ -75,7 +76,7 @@ public abstract class AntGeneratingExportWizard extends BaseExportWizard {
 					File file = new File(installLocation, "build.xml"); //$NON-NLS-1$
 					if (file.exists()) {
 						try {
-							IFile buildFile = underlyingResource.getProject().getFile("build.properties"); //$NON-NLS-1$
+							IFile buildFile = PDEProject.getBuildProperties(underlyingResource.getProject());
 							IBuildModel buildModel = new WorkspaceBuildModel(buildFile);
 							buildModel.load();
 							if (buildModel != null) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/BaseExportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/BaseExportWizard.java
index 9a228f8..6671dda 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/BaseExportWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/BaseExportWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,10 +14,12 @@ import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.ui.*;
 
-public abstract class BaseExportWizard extends Wizard implements IExportWizard, IPreferenceConstants {
+public abstract class BaseExportWizard extends Wizard implements IExportWizard, ILaunchingPreferenceConstants {
 
 	protected IStructuredSelection fSelection;
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportActiveTargetJob.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportActiveTargetJob.java
new file mode 100644
index 0000000..1d47228
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportActiveTargetJob.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2010 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <caniszczyk at gmail.com> - initial API and implementation
+ *     Ian Bull <irbull at eclipsesource.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.exports;
+
+import java.net.URI;
+import org.eclipse.core.filesystem.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.core.FeatureModelManager;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.feature.ExternalFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
+import org.eclipse.pde.internal.core.target.TargetPlatformService;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
+/**
+ * This job exports the bundles and features that make up your target. 
+ */
+public class ExportActiveTargetJob extends Job {
+
+	private URI fDestination;
+	private boolean fclearDestinationDirectory = false;
+
+	public ExportActiveTargetJob(URI destination, boolean clearDestinationDirectory) {
+		super("Export Current Target Definition Job"); //$NON-NLS-1$
+		fDestination = destination;
+		fclearDestinationDirectory = clearDestinationDirectory;
+	}
+
+	protected IStatus run(IProgressMonitor monitor) {
+
+		IFileSystem fileSystem = EFS.getLocalFileSystem();
+		if (!fileSystem.canWrite()) {
+			return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Destination directory not writable."); //$NON-NLS-1$ 
+		}
+		IFileStore destination = fileSystem.getStore(fDestination);
+
+		FeatureModelManager featureManager = PDECore.getDefault().getFeatureModelManager();
+		IFeatureModel[] featureModels = featureManager.getModels();
+		IPluginModelBase[] pluginModels = PluginRegistry.getExternalModels();
+
+		IFileStore featureDir = destination.getChild("features"); //$NON-NLS-1$
+		IFileStore pluginDir = destination.getChild("plugins"); //$NON-NLS-1$
+		IFileStore metadataXML = destination.getChild("content.xml"); //$NON-NLS-1$
+		IFileStore metadataJAR = destination.getChild("content.jar"); //$NON-NLS-1$
+
+		int totalWork = featureModels.length + pluginModels.length;
+
+		try {
+			monitor.beginTask(PDEUIMessages.ExportTargetDefinition_task, totalWork);
+			if (fclearDestinationDirectory) {
+				monitor.subTask(PDEUIMessages.ExportTargetDeleteOldData); //Deleting old data...
+			}
+			IProvisioningAgent agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+			ExportTargetMetadata component = null;
+
+			if (agent != null) {
+				component = new ExportTargetMetadata(agent);
+			}
+			try {
+				if (fclearDestinationDirectory) {
+					if (component != null) {
+						// If p2 is available, clear the existing repositories
+						component.clearExporedRepository(fDestination);
+					}
+					if (featureDir.fetchInfo().exists()) {
+						featureDir.delete(EFS.NONE, new NullProgressMonitor());
+					}
+					if (pluginDir.fetchInfo().exists()) {
+						pluginDir.delete(EFS.NONE, new NullProgressMonitor());
+					}
+					if (metadataJAR.fetchInfo().exists()) {
+						metadataJAR.delete(EFS.NONE, new NullProgressMonitor());
+					}
+					if (metadataXML.fetchInfo().exists()) {
+						metadataXML.delete(EFS.NONE, new NullProgressMonitor());
+					}
+				}
+
+				if (!featureDir.fetchInfo().exists()) {
+					featureDir.mkdir(EFS.NONE, new NullProgressMonitor());
+				}
+				if (!pluginDir.fetchInfo().exists()) {
+					pluginDir.mkdir(EFS.NONE, new NullProgressMonitor());
+				}
+			} catch (CoreException e1) {
+				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to create destination directory.", e1); //$NON-NLS-1$
+			}
+
+			monitor.subTask(PDEUIMessages.ExportTargetExportFeatures);
+			for (int i = 0; i < featureModels.length; i++) {
+				IFeatureModel model = featureModels[i];
+				if (model.isEnabled() && model instanceof ExternalFeatureModel) {
+					copy(model.getInstallLocation(), featureDir, fileSystem, monitor);
+				}
+			}
+
+			monitor.subTask(PDEUIMessages.ExportTargetExportPlugins);
+			for (int i = 0; i < pluginModels.length; i++) {
+				IPluginModelBase model = pluginModels[i];
+				//if (model.isEnabled()) {
+				copy(model.getInstallLocation(), pluginDir, fileSystem, monitor);
+				//}
+			}
+
+			try {
+				if (component != null) {
+					// If p2 is available, export the metadata
+					TargetDefinition definition = ((TargetDefinition) TargetPlatformService.getDefault().getWorkspaceTargetHandle().getTargetDefinition());
+					IProfile profile = definition.getProfile();
+					IStatus status = component.exportMetadata(profile, fDestination, definition.getName());
+					if (status.isOK()) {
+						return status;
+					}
+					return Status.OK_STATUS;
+				}
+			} catch (CoreException e) {
+				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to export the target", e); //$NON-NLS-1$ 
+			}
+		} catch (CoreException e) {
+			return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to export the target", e); //$NON-NLS-1$ 
+		}
+
+		finally {
+			monitor.done();
+		}
+		return Status.OK_STATUS;
+	}
+
+	private IStatus copy(String src, IFileStore destinationParent, IFileSystem fileSystem, IProgressMonitor monitor) throws CoreException {
+		Path srcPath = new Path(src);
+		IFileStore source = fileSystem.getStore(srcPath);
+		String elementName = srcPath.segment(srcPath.segmentCount() - 1);
+		IFileStore destinationDirectory = destinationParent.getChild(elementName);
+		if (destinationDirectory.fetchInfo().exists()) {
+			monitor.worked(1);
+			return Status.OK_STATUS;
+		}
+		if (source.fetchInfo().isDirectory()) {
+			destinationDirectory.mkdir(EFS.NONE, new NullProgressMonitor());
+		}
+		source.copy(destinationDirectory, EFS.OVERWRITE, new SubProgressMonitor(monitor, 1));
+		return Status.OK_STATUS;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportDestinationTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportDestinationTab.java
index d3d9d4a..e4b8e05 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportDestinationTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportDestinationTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,6 +93,11 @@ public class ExportDestinationTab extends AbstractExportTab {
 		initializeCombo(settings, S_DESTINATION, fDirectoryCombo);
 		initializeCombo(settings, S_ZIP_FILENAME, fArchiveCombo);
 		initializeCombo(settings, S_INSTALL_DESTINATION, fInstallCombo);
+		// Always add a default repo location to the install combo
+		String defaultRepo = PDEPlugin.getWorkspace().getRoot().getLocation() + "/.metadata/.plugins/org.eclipse.pde.core/install/"; //$NON-NLS-1$
+		if (fInstallCombo.indexOf(defaultRepo) == -1) {
+			fInstallCombo.add(defaultRepo);
+		}
 		hookListeners();
 	}
 
@@ -123,7 +128,7 @@ public class ExportDestinationTab extends AbstractExportTab {
 		});
 		fBrowseFile.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				chooseFile(fArchiveCombo, "*" + ZIP_EXTENSION); //$NON-NLS-1$
+				chooseFile(fArchiveCombo, new String[] {"*" + ZIP_EXTENSION}); //$NON-NLS-1$
 			}
 		});
 		fArchiveCombo.addModifyListener(new ModifyListener() {
@@ -147,8 +152,8 @@ public class ExportDestinationTab extends AbstractExportTab {
 		fInstallButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				updateExportType();
-				if (fInstallCombo.getText().trim().length() == 0) {
-					fInstallCombo.setText(PDEPlugin.getWorkspace().getRoot().getLocation() + "/.metadata/.plugins/org.eclipse.pde.core/install/"); //$NON-NLS-1$
+				if (fInstallCombo.getText().trim().length() == 0 && fInstallCombo.getItemCount() > 0) {
+					fInstallCombo.select(0);
 				}
 			}
 		});
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportOptionsTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportOptionsTab.java
index 418ec99..5daf6bb 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportOptionsTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportOptionsTab.java
@@ -230,7 +230,7 @@ public class ExportOptionsTab extends AbstractExportTab {
 
 		fBrowseAnt.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				chooseFile(fAntCombo, "*.xml"); //$NON-NLS-1$
+				chooseFile(fAntCombo, new String[] {"*.xml"}); //$NON-NLS-1$
 			}
 		});
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportTargetMetadata.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportTargetMetadata.java
new file mode 100644
index 0000000..8211dc6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ExportTargetMetadata.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2010 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Ian Bull <irbull at eclipsesource.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.exports;
+
+import java.net.URI;
+import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+
+public class ExportTargetMetadata {
+
+	IProvisioningAgent agent = null;
+	public static ExportTargetMetadata instance = null;
+
+	public ExportTargetMetadata(IProvisioningAgent agent) {
+		this.agent = agent;
+	}
+
+	public synchronized void clearExporedRepository(URI destination) {
+		agent = (IProvisioningAgent) PDECore.getDefault().acquireService(IProvisioningAgent.SERVICE_NAME);
+		if (agent == null)
+			return;
+		if (((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).contains(destination))
+			((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).removeRepository(destination);
+	}
+
+	public synchronized IStatus exportMetadata(IProfile profile, URI destination, String targetName) {
+		if (agent == null)
+			return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to mirror the metadata."); //$NON-NLS-1$
+		boolean removeRepoAfterLoad = false;
+		try {
+			IMetadataRepository repository = null;
+
+			try {
+				//TODO: There appears to be a small (5 byte) difference from when I do the load vs. the create
+				//      The create gives the repo a version 1, while the load gives it 1.0.0
+				//      this might be worth looking into
+				removeRepoAfterLoad = !((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).contains(destination);
+				repository = ((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).loadRepository(destination, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE, new NullProgressMonitor());
+			} catch (ProvisionException e) {
+				// The repository cannot be loaded
+			}
+			if (repository == null) {
+				repository = ((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).createRepository(destination, targetName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
+			}
+
+			if (repository != null) {
+				mirrorMetadata(profile, repository);
+			} else {
+				return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to mirror the metadata."); //$NON-NLS-1$
+			}
+
+		} catch (ProvisionException e) {
+			return new Status(IStatus.ERROR, PDEPlugin.getPluginId(), "Failed to mirror the metadata.", e); //$NON-NLS-1$
+		} finally {
+			if (removeRepoAfterLoad) {
+				((IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME)).removeRepository(destination);
+			}
+		}
+
+		return Status.OK_STATUS;
+	}
+
+	private void mirrorMetadata(IProfile profile, IMetadataRepository repository) {
+		IQueryResult results = profile.query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor());
+		repository.addInstallableUnits(results.toUnmodifiableSet());
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java
index dd9ae26..4093d10 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureOptionsTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -178,7 +178,20 @@ public class FeatureOptionsTab extends ExportOptionsTab {
 
 		String selected = settings.get(S_EXPORT_METADATA);
 		fExportMetadata.setSelection(selected == null ? true : Boolean.TRUE.toString().equals(selected));
+
+		// This enablement depends on both the jar button being selected and the destination setting being something other than install (bug 276989)
 		fExportMetadata.setEnabled(fJarButton.getSelection());
+		String exportType = settings.get(ExportDestinationTab.S_EXPORT_TYPE);
+		if (exportType != null && exportType.length() > 0) {
+			try {
+				int exportTypeCode = Integer.parseInt(exportType);
+				if (exportTypeCode == ExportDestinationTab.TYPE_INSTALL) {
+					fExportMetadata.setEnabled(false);
+				}
+			} catch (NumberFormatException e) {
+			}
+		}
+
 		selected = settings.get(S_CREATE_CATEGORIES);
 
 		fCategoryButton.setEnabled(fExportMetadata.getSelection() && fJarButton.getSelection());
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizardPage.java
index 753aa06..1c522d4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,8 +20,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.pde.core.IModel;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.WorkspaceModelManager;
+import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.util.PersistablePluginObject;
@@ -59,7 +58,7 @@ public class PluginExportWizardPage extends BaseExportWizardPage {
 	}
 
 	private boolean hasBuildProperties(IPluginModelBase model) {
-		File file = new File(model.getInstallLocation(), "build.properties"); //$NON-NLS-1$
+		File file = new File(model.getInstallLocation(), ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
 		return file.exists();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductDestinationGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductDestinationGroup.java
index e1936af..a6be29d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductDestinationGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductDestinationGroup.java
@@ -30,6 +30,7 @@ public class ProductDestinationGroup extends AbstractExportTab {
 	protected static final String S_ZIP_FILENAME = "zipFileName"; //$NON-NLS-1$
 
 	protected static String ZIP_EXTENSION = ".zip"; //$NON-NLS-1$
+	protected static String WAR_EXTENSION = ".war"; //$NON-NLS-1$
 
 	protected Button fArchiveFileButton;
 	protected Combo fArchiveCombo;
@@ -142,7 +143,7 @@ public class ProductDestinationGroup extends AbstractExportTab {
 
 		fBrowseFile.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				chooseFile(fArchiveCombo, "*" + ZIP_EXTENSION); //$NON-NLS-1$
+				chooseFile(fArchiveCombo, new String[] {"*" + ZIP_EXTENSION, "*" + WAR_EXTENSION}); //$NON-NLS-1$ //$NON-NLS-2$
 			}
 		});
 
@@ -223,7 +224,7 @@ public class ProductDestinationGroup extends AbstractExportTab {
 			String path = fArchiveCombo.getText();
 			if (path != null && path.length() > 0) {
 				String fileName = new Path(path).lastSegment();
-				if (!fileName.endsWith(ZIP_EXTENSION)) {
+				if (!fileName.endsWith(ZIP_EXTENSION) && !fileName.endsWith(WAR_EXTENSION)) {
 					fileName += ZIP_EXTENSION;
 				}
 				return fileName;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java
index 682edf7..9a1341f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java
@@ -1,167 +1,167 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.wizards.exports;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.service.resolver.State;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
-import org.eclipse.pde.internal.core.exports.ProductExportOperation;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.pde.internal.core.iproduct.IProductFeature;
-import org.eclipse.pde.internal.core.iproduct.IProductPlugin;
-import org.eclipse.pde.internal.core.product.WorkspaceProductModel;
-import org.eclipse.pde.internal.ui.PDEPluginImages;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.internal.ui.wizards.product.SynchronizationOperation;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.osgi.framework.Version;
-
-public class ProductExportWizard extends BaseExportWizard {
-
-	private static final String STORE_SECTION = "ProductExportWizard"; //$NON-NLS-1$
-	private WorkspaceProductModel fProductModel;
-	private CrossPlatformExportPage fPage2;
-	private ProductExportWizardPage fPage;
-	private IProject fProject;
-
-	public ProductExportWizard() {
-		this(null);
-	}
-
-	public ProductExportWizard(IProject project) {
-		setDefaultPageImageDescriptor(PDEPluginImages.DESC_PRODUCT_EXPORT_WIZ);
-		fProject = project;
-	}
-
-	public void addPages() {
-		fPage = new ProductExportWizardPage(getSelection());
-		addPage(fPage);
-
-		IFeatureModel model = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature();
-		if (model != null) {
-			fPage2 = new CrossPlatformExportPage("environment", model); //$NON-NLS-1$
-			addPage(fPage2);
-		}
-	}
-
-	protected String getSettingsSectionName() {
-		return STORE_SECTION;
-	}
-
-	protected void scheduleExportJob() {
-		FeatureExportInfo info = new FeatureExportInfo();
-		info.toDirectory = fPage.doExportToDirectory();
-		info.exportSource = fPage.doExportSource();
-		info.exportSourceBundle = fPage.doExportSourceBundles();
-		info.allowBinaryCycles = fPage.doBinaryCycles();
-		info.exportMetadata = fPage.doExportMetadata();
-		info.destinationDirectory = fPage.getDestination();
-		info.zipFileName = fPage.getFileName();
-		if (fPage2 != null && fPage.doMultiPlatform())
-			info.targets = fPage2.getTargets();
-		if (fProductModel.getProduct().useFeatures())
-			info.items = getFeatureModels();
-		else
-			info.items = getPluginModels();
-
-		String rootDirectory = fPage.getRootDirectory();
-		if ("".equals(rootDirectory.trim())) //$NON-NLS-1$
-			rootDirectory = "."; //$NON-NLS-1$
-		ProductExportOperation job = new ProductExportOperation(info, PDEUIMessages.ProductExportJob_name, fProductModel.getProduct(), rootDirectory);
-		job.setUser(true);
-		job.setRule(ResourcesPlugin.getWorkspace().getRoot());
-		job.schedule();
-		job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_FEATURE_OBJ);
-	}
-
-	private IFeatureModel[] getFeatureModels() {
-		ArrayList list = new ArrayList();
-		FeatureModelManager manager = PDECore.getDefault().getFeatureModelManager();
-		IProductFeature[] features = fProductModel.getProduct().getFeatures();
-		for (int i = 0; i < features.length; i++) {
-			IFeatureModel model = manager.findFeatureModel(features[i].getId(), features[i].getVersion());
-			if (model != null)
-				list.add(model);
-		}
-		return (IFeatureModel[]) list.toArray(new IFeatureModel[list.size()]);
-	}
-
-	private BundleDescription[] getPluginModels() {
-		ArrayList list = new ArrayList();
-		State state = TargetPlatformHelper.getState();
-		IProductPlugin[] plugins = fProductModel.getProduct().getPlugins();
-		for (int i = 0; i < plugins.length; i++) {
-			BundleDescription bundle = null;
-			String v = plugins[i].getVersion();
-			if (v != null && v.length() > 0) {
-				bundle = state.getBundle(plugins[i].getId(), Version.parseVersion(v));
-			}
-			// if there's no version, just grab a bundle like before
-			if (bundle == null)
-				bundle = state.getBundle(plugins[i].getId(), null);
-			if (bundle != null)
-				list.add(bundle);
-		}
-		return (BundleDescription[]) list.toArray(new BundleDescription[list.size()]);
-	}
-
-	protected boolean performPreliminaryChecks() {
-		fProductModel = new WorkspaceProductModel(fPage.getProductFile(), false);
-		try {
-			fProductModel.load();
-			if (!fProductModel.isLoaded()) {
-				MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_error, PDEUIMessages.ProductExportWizard_corrupt); // 
-				return false;
-			}
-		} catch (CoreException e) {
-			MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_error, PDEUIMessages.ProductExportWizard_corrupt); // 
-			return false;
-		}
-
-		if (fPage.doSync()) {
-			try {
-				getContainer().run(false, false, new SynchronizationOperation(fProductModel.getProduct(), getContainer().getShell(), fProject));
-			} catch (InvocationTargetException e) {
-				MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_syncTitle, e.getTargetException().getMessage());
-				return false;
-			} catch (InterruptedException e) {
-				return false;
-			}
-		}
-		return true;
-	}
-
-	protected boolean confirmDelete() {
-		if (!fPage.doExportToDirectory()) {
-			File zipFile = new File(fPage.getDestination(), fPage.getFileName());
-			if (zipFile.exists()) {
-				if (!MessageDialog.openQuestion(getContainer().getShell(), PDEUIMessages.BaseExportWizard_confirmReplace_title, NLS.bind(PDEUIMessages.BaseExportWizard_confirmReplace_desc, zipFile.getAbsolutePath())))
-					return false;
-				zipFile.delete();
-			}
-		}
-		return true;
-	}
-
-	public boolean canFinish() {
-		return (fPage.getNextPage() != null) ? super.canFinish() : fPage.isPageComplete();
-	}
-
-}
+/*******************************************************************************
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.exports;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.State;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.exports.FeatureExportInfo;
+import org.eclipse.pde.internal.core.exports.ProductExportOperation;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.core.iproduct.IProductFeature;
+import org.eclipse.pde.internal.core.iproduct.IProductPlugin;
+import org.eclipse.pde.internal.core.product.WorkspaceProductModel;
+import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.wizards.product.SynchronizationOperation;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.osgi.framework.Version;
+
+public class ProductExportWizard extends BaseExportWizard {
+
+	private static final String STORE_SECTION = "ProductExportWizard"; //$NON-NLS-1$
+	private WorkspaceProductModel fProductModel;
+	private CrossPlatformExportPage fPage2;
+	private ProductExportWizardPage fPage;
+	private IProject fProject;
+
+	public ProductExportWizard() {
+		this(null);
+	}
+
+	public ProductExportWizard(IProject project) {
+		setDefaultPageImageDescriptor(PDEPluginImages.DESC_PRODUCT_EXPORT_WIZ);
+		fProject = project;
+	}
+
+	public void addPages() {
+		fPage = new ProductExportWizardPage(getSelection());
+		addPage(fPage);
+
+		IFeatureModel model = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature();
+		if (model != null) {
+			fPage2 = new CrossPlatformExportPage("environment", model); //$NON-NLS-1$
+			addPage(fPage2);
+		}
+	}
+
+	protected String getSettingsSectionName() {
+		return STORE_SECTION;
+	}
+
+	protected void scheduleExportJob() {
+		FeatureExportInfo info = new FeatureExportInfo();
+		info.toDirectory = fPage.doExportToDirectory();
+		info.exportSource = fPage.doExportSource();
+		info.exportSourceBundle = fPage.doExportSourceBundles();
+		info.allowBinaryCycles = fPage.doBinaryCycles();
+		info.exportMetadata = fPage.doExportMetadata();
+		info.destinationDirectory = fPage.getDestination();
+		info.zipFileName = fPage.getFileName();
+		if (fPage2 != null && fPage.doMultiPlatform())
+			info.targets = fPage2.getTargets();
+		if (fProductModel.getProduct().useFeatures())
+			info.items = getFeatureModels();
+		else
+			info.items = getPluginModels();
+
+		String rootDirectory = fPage.getRootDirectory();
+		if ("".equals(rootDirectory.trim())) //$NON-NLS-1$
+			rootDirectory = "."; //$NON-NLS-1$
+		ProductExportOperation job = new ProductExportOperation(info, PDEUIMessages.ProductExportJob_name, fProductModel.getProduct(), rootDirectory);
+		job.setUser(true);
+		job.setRule(ResourcesPlugin.getWorkspace().getRoot());
+		job.schedule();
+		job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_FEATURE_OBJ);
+	}
+
+	private IFeatureModel[] getFeatureModels() {
+		ArrayList list = new ArrayList();
+		FeatureModelManager manager = PDECore.getDefault().getFeatureModelManager();
+		IProductFeature[] features = fProductModel.getProduct().getFeatures();
+		for (int i = 0; i < features.length; i++) {
+			IFeatureModel model = manager.findFeatureModel(features[i].getId(), features[i].getVersion());
+			if (model != null)
+				list.add(model);
+		}
+		return (IFeatureModel[]) list.toArray(new IFeatureModel[list.size()]);
+	}
+
+	private BundleDescription[] getPluginModels() {
+		ArrayList list = new ArrayList();
+		State state = TargetPlatformHelper.getState();
+		IProductPlugin[] plugins = fProductModel.getProduct().getPlugins();
+		for (int i = 0; i < plugins.length; i++) {
+			BundleDescription bundle = null;
+			String v = plugins[i].getVersion();
+			if (v != null && v.length() > 0) {
+				bundle = state.getBundle(plugins[i].getId(), Version.parseVersion(v));
+			}
+			// if there's no version, just grab a bundle like before
+			if (bundle == null)
+				bundle = state.getBundle(plugins[i].getId(), null);
+			if (bundle != null)
+				list.add(bundle);
+		}
+		return (BundleDescription[]) list.toArray(new BundleDescription[list.size()]);
+	}
+
+	protected boolean performPreliminaryChecks() {
+		fProductModel = new WorkspaceProductModel(fPage.getProductFile(), false);
+		try {
+			fProductModel.load();
+			if (!fProductModel.isLoaded()) {
+				MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_error, PDEUIMessages.ProductExportWizard_corrupt); // 
+				return false;
+			}
+		} catch (CoreException e) {
+			MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_error, PDEUIMessages.ProductExportWizard_corrupt); // 
+			return false;
+		}
+
+		if (fPage.doSync()) {
+			try {
+				getContainer().run(false, false, new SynchronizationOperation(fProductModel.getProduct(), getContainer().getShell(), fProject));
+			} catch (InvocationTargetException e) {
+				MessageDialog.openError(getContainer().getShell(), PDEUIMessages.ProductExportWizard_syncTitle, e.getTargetException().getMessage());
+				return false;
+			} catch (InterruptedException e) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	protected boolean confirmDelete() {
+		if (!fPage.doExportToDirectory()) {
+			File zipFile = new File(fPage.getDestination(), fPage.getFileName());
+			if (zipFile.exists()) {
+				if (!MessageDialog.openQuestion(getContainer().getShell(), PDEUIMessages.BaseExportWizard_confirmReplace_title, NLS.bind(PDEUIMessages.BaseExportWizard_confirmReplace_desc, zipFile.getAbsolutePath())))
+					return false;
+				zipFile.delete();
+			}
+		}
+		return true;
+	}
+
+	public boolean canFinish() {
+		return (fPage.getNextPage() != null) ? super.canFinish() : fPage.isPageComplete();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizardPage.java
index 2dc2285..536970f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizardPage.java
@@ -43,6 +43,7 @@ public class ProductExportWizardPage extends AbstractExportWizardPage {
 	private Button fMultiPlatform;
 	private Button fExportMetadata;
 	private Button fAllowBinaryCycles;
+	private boolean fPageInitialized = false;
 
 	public ProductExportWizardPage(IStructuredSelection selection) {
 		super("productExport"); //$NON-NLS-1$
@@ -70,6 +71,7 @@ public class ProductExportWizardPage extends AbstractExportWizardPage {
 		Dialog.applyDialogFont(container);
 
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.PRODUCT_EXPORT_WIZARD);
+		fPageInitialized = true;
 	}
 
 	private void createConfigurationSection(Composite parent) {
@@ -183,7 +185,10 @@ public class ProductExportWizardPage extends AbstractExportWizardPage {
 		String error = fConfigurationGroup.validate();
 		if (error == null)
 			error = fExportGroup.validate();
-		setErrorMessage(error);
+		if (fPageInitialized)
+			setErrorMessage(error);
+		else
+			setMessage(error);
 		setPageComplete(error == null);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizard.java
new file mode 100644
index 0000000..0cd6f7b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizard.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2010 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <caniszczyk at gmail.com> - initial API and implementation
+ *     Ian Bull <irbull at eclipsesource.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.exports;
+
+import java.io.File;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.pde.internal.ui.PDEPluginImages;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.ui.IExportWizard;
+import org.eclipse.ui.IWorkbench;
+
+public class TargetDefinitionExportWizard extends Wizard implements IExportWizard {
+
+	private TargetDefinitionExportWizardPage fPage = null;
+
+	public TargetDefinitionExportWizard() {
+		setNeedsProgressMonitor(true);
+		setWindowTitle(PDEUIMessages.ExportActiveTargetDefinition);
+		setDefaultPageImageDescriptor(PDEPluginImages.DESC_TARGET_WIZ);
+	}
+
+	public void addPages() {
+		fPage = new TargetDefinitionExportWizardPage();
+		addPage(fPage);
+	}
+
+	public boolean performFinish() {
+		String destDir = fPage.getDestinationDirectory();
+		boolean clearDestDir = fPage.isClearDestinationDirectory();
+		File file = new File(destDir);
+
+		Job job = new ExportActiveTargetJob(file.toURI(), clearDestDir);
+		job.schedule(200);
+
+		return true;
+	}
+
+	public void init(IWorkbench workbench, IStructuredSelection selection) {
+		// do nothing atm
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizardPage.java
new file mode 100644
index 0000000..cf6be7c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/TargetDefinitionExportWizardPage.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2010 EclipseSource Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <caniszczyk at gmail.com> - initial API and implementation
+ *     Ian Bull <irbull at eclipsesource.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.exports;
+
+import java.io.File;
+import java.io.IOException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.pde.internal.core.target.TargetDefinition;
+import org.eclipse.pde.internal.core.target.TargetPlatformService;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+
+public class TargetDefinitionExportWizardPage extends WizardPage {
+
+	private static final String PAGE_ID = "org.eclipse.pde.target.exportPage"; //$NON-NLS-1$
+	private Button fBrowseButton = null;
+	private Combo fDestinationCombo = null;
+	private Button fClearDestinationButton = null;
+
+	protected TargetDefinitionExportWizardPage() {
+		super(PAGE_ID);
+		setPageComplete(false);
+		setTitle(PDEUIMessages.ExportActiveTargetDefinition);
+		setMessage(PDEUIMessages.ExportActiveTargetDefinition_message);
+	}
+
+	public void createControl(Composite parent) {
+		Composite container = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(1, false);
+		container.setLayout(layout);
+		createExportDirectoryControl(container);
+		setControl(container);
+		Dialog.applyDialogFont(container);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.TARGET_EXPORT_WIZARD);
+	}
+
+	private void createExportDirectoryControl(Composite parent) {
+		parent.setLayout(new GridLayout(3, false));
+		parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		new Label(parent, SWT.NONE).setText(PDEUIMessages.ExportTargetCurrentTarget);
+		Label l = new Label(parent, SWT.NONE);
+
+		try {
+			// TODO this is a bit dirty
+			TargetDefinition definition = ((TargetDefinition) TargetPlatformService.getDefault().getWorkspaceTargetHandle().getTargetDefinition());
+			l.setText(definition.getName());
+		} catch (CoreException e) {
+			// TODO log something?
+		}
+
+		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+		gd.horizontalSpan = 2;
+		l.setLayoutData(gd);
+		new Label(parent, SWT.NONE).setText(PDEUIMessages.ExportTargetChooseFolder);
+
+		fDestinationCombo = SWTFactory.createCombo(parent, SWT.BORDER, 1, null);
+		fDestinationCombo.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				controlChanged();
+			}
+		});
+
+		fBrowseButton = new Button(parent, SWT.PUSH);
+		fBrowseButton.setText(PDEUIMessages.ExportTargetBrowse);
+		fBrowseButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				DirectoryDialog dialog = new DirectoryDialog(getShell());
+				dialog.setText(PDEUIMessages.ExportTargetSelectDestination);
+				dialog.setMessage(PDEUIMessages.ExportTargetSpecifyDestination);
+				String dir = fDestinationCombo.getText();
+				dialog.setFilterPath(dir);
+				dir = dialog.open();
+				if (dir == null || dir.equals("")) { //$NON-NLS-1$
+					return;
+				}
+				fDestinationCombo.setText(dir);
+				controlChanged();
+			}
+		});
+
+		fClearDestinationButton = new Button(parent, SWT.CHECK);
+		fClearDestinationButton.setText(PDEUIMessages.ExportTargetClearDestination);
+		gd = new GridData();
+		gd.horizontalSpan = 2;
+		gd.horizontalIndent = 15;
+		fClearDestinationButton.setLayoutData(gd);
+	}
+
+	public String getDestinationDirectory() {
+		return fDestinationCombo.getText();
+	}
+
+	public boolean isClearDestinationDirectory() {
+		return fClearDestinationButton.getSelection();
+	}
+
+	public void controlChanged() {
+		setPageComplete(validate());
+	}
+
+	protected boolean validate() {
+		setMessage(null);
+
+		if (fDestinationCombo.getText().equals("")) { //$NON-NLS-1$
+			setMessage(PDEUIMessages.ExportTargetError_ChooseDestination, IStatus.ERROR);
+			return false;
+		} else if (!isValidLocation(fDestinationCombo.getText().trim())) {
+			setMessage(PDEUIMessages.ExportTargetError_validPath, IStatus.ERROR);
+			return false;
+		}
+
+		return true;
+	}
+
+	protected void initializeCombo(IDialogSettings settings, String key, Combo combo) {
+		for (int i = 0; i < 6; i++) {
+			String curr = settings.get(key + String.valueOf(i));
+			if (curr != null && combo.indexOf(curr) == -1) {
+				combo.add(curr);
+			}
+		}
+		if (combo.getItemCount() > 0)
+			combo.setText(combo.getItem(0));
+	}
+
+	protected void saveCombo(IDialogSettings settings, String key, Combo combo) {
+		if (combo.getText().trim().length() > 0) {
+			settings.put(key + String.valueOf(0), combo.getText().trim());
+			String[] items = combo.getItems();
+			int nEntries = Math.min(items.length, 5);
+			for (int i = 0; i < nEntries; i++) {
+				settings.put(key + String.valueOf(i + 1), items[i].trim());
+			}
+		}
+	}
+
+	protected boolean isValidLocation(String location) {
+		try {
+			String destinationPath = new File(location).getCanonicalPath();
+			if (destinationPath == null || destinationPath.length() == 0)
+				return false;
+		} catch (IOException e) {
+			return false;
+		}
+
+		return true;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
index 9ff4155..de3b213 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/extension/PointSelectionPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.extension;
@@ -16,14 +16,16 @@ import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
+import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.IWizardNode;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.ischema.ISchema;
 import org.eclipse.pde.internal.core.ischema.ISchemaElement;
 import org.eclipse.pde.internal.core.schema.*;
 import org.eclipse.pde.internal.core.text.plugin.PluginExtensionNode;
@@ -32,10 +34,10 @@ import org.eclipse.pde.internal.core.util.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog;
 import org.eclipse.pde.internal.ui.editor.contentassist.XMLInsertionComputer;
-import org.eclipse.pde.internal.ui.editor.text.HTMLPrinter;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.elements.ElementLabelProvider;
 import org.eclipse.pde.internal.ui.search.ShowDescriptionAction;
+import org.eclipse.pde.internal.ui.util.SharedLabelProvider;
 import org.eclipse.pde.internal.ui.util.TextUtil;
 import org.eclipse.pde.internal.ui.wizards.*;
 import org.eclipse.pde.internal.ui.wizards.templates.NewExtensionTemplateWizard;
@@ -178,7 +180,16 @@ public class PointSelectionPage extends BaseWizardSelectionPage {
 				return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_NEWEXP_WIZ_TOOL, 0);
 			}
 
-			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_EXT_POINT_OBJ, 0);
+			// If the schema is deprecated add a warning flag
+			int flags = 0;
+			SchemaRegistry reg = PDECore.getDefault().getSchemaRegistry();
+			ISchema schema = reg.getSchema(exp.getFullId());
+			if (schema != null && schema.isDeperecated()) {
+				PDEPlugin.getDefault().getLabelProvider();
+				flags = SharedLabelProvider.F_WARNING;
+			}
+
+			return PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_EXT_POINT_OBJ, flags);
 		}
 	}
 
@@ -368,7 +379,7 @@ public class PointSelectionPage extends BaseWizardSelectionPage {
 		initialize();
 		setControl(tabFolder);
 		Dialog.applyDialogFont(outerContainer);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(outerContainer, IHelpContextIds.ADD_EXTENSIONS_SCHEMA_BASED);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(outerContainer.getParent(), IHelpContextIds.ADD_EXTENSIONS_SCHEMA_BASED);
 	}
 
 	private Control createWizardsPage(Composite parent) {
@@ -522,7 +533,15 @@ public class PointSelectionPage extends BaseWizardSelectionPage {
 		if (name == null) {
 			name = fullPointID;
 		}
-		setDescription(NLS.bind(PDEUIMessages.NewExtensionWizard_PointSelectionPage_pluginDescription, name));
+		// Check if the extension point is deprecated and display a warning
+		SchemaRegistry reg = PDECore.getDefault().getSchemaRegistry();
+		ISchema schema = reg.getSchema(fCurrentPoint.getFullId());
+		if (schema != null && schema.isDeperecated()) {
+			setMessage(NLS.bind(PDEUIMessages.NewExtensionWizard_PointSelectionPage_pluginDescription_deprecated, name), IMessageProvider.WARNING);
+		} else {
+			setMessage(null);
+			setDescription(NLS.bind(PDEUIMessages.NewExtensionWizard_PointSelectionPage_pluginDescription, name));
+		}
 		setDescriptionText(""); //$NON-NLS-1$
 		fTemplateLabel.setText(NLS.bind(PDEUIMessages.NewExtensionWizard_PointSelectionPage_contributedTemplates_label, name.toLowerCase(Locale.ENGLISH)));
 		fDescLink.setText(NLS.bind(PDEUIMessages.PointSelectionPage_extPointDesc, name));
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/AbstractCreateFeatureOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/AbstractCreateFeatureOperation.java
index 3dfc72f..f064d46 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/AbstractCreateFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/AbstractCreateFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,10 +20,12 @@ import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.internal.build.IBuildPropertiesConstants;
+import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.feature.WorkspaceFeatureModel;
 import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.widgets.Shell;
@@ -73,7 +75,7 @@ public abstract class AbstractCreateFeatureOperation extends WorkspaceModifyOper
 		} else {
 			fProject.create(monitor);
 			fProject.open(monitor);
-			file = fProject.getFile("feature.xml"); //$NON-NLS-1$
+			file = PDEProject.getFeatureXml(fProject);
 			monitor.worked(3);
 		}
 		if (file.exists())
@@ -105,11 +107,11 @@ public abstract class AbstractCreateFeatureOperation extends WorkspaceModifyOper
 	}
 
 	protected void createBuildProperties() throws CoreException {
-		IFile file = fProject.getFile("build.properties"); //$NON-NLS-1$
+		IFile file = PDEProject.getBuildProperties(fProject);
 		if (!file.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(file);
 			IBuildEntry ientry = model.getFactory().createEntry("bin.includes"); //$NON-NLS-1$
-			ientry.addToken("feature.xml"); //$NON-NLS-1$
+			ientry.addToken(ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
 			String library = fFeatureData.library;
 			if (library != null) {
 				String source = fFeatureData.getSourceFolderName();
@@ -138,7 +140,7 @@ public abstract class AbstractCreateFeatureOperation extends WorkspaceModifyOper
 	}
 
 	protected IFile createFeature() throws CoreException {
-		IFile file = fProject.getFile("feature.xml"); //$NON-NLS-1$
+		IFile file = PDEProject.getFeatureXml(fProject);
 		WorkspaceFeatureModel model = new WorkspaceFeatureModel();
 		model.setFile(file);
 		IFeature feature = model.getFeature();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/CreateFeatureProjectFromLaunchOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/CreateFeatureProjectFromLaunchOperation.java
index 2b30f50..d4dbcb4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/CreateFeatureProjectFromLaunchOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/CreateFeatureProjectFromLaunchOperation.java
@@ -12,6 +12,10 @@
 
 package org.eclipse.pde.internal.ui.wizards.feature;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -21,9 +25,7 @@ import org.eclipse.pde.core.plugin.IPluginBase;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.feature.WorkspaceFeatureModel;
 import org.eclipse.pde.internal.core.ifeature.IFeature;
-import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
 import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.widgets.Shell;
 
 public class CreateFeatureProjectFromLaunchOperation extends CreateFeatureProjectOperation {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java
index 3f77a15..9892677 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/feature/PluginListPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.feature;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import com.ibm.icu.text.Collator;
 import java.util.TreeSet;
 import org.eclipse.core.runtime.CoreException;
@@ -25,7 +27,6 @@ import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.wizards.ListUtil;
 import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
index 71ea39e..959b217 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/BaseImportWizardSecondPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2009 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,9 +10,11 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.imports;
 
+import org.eclipse.pde.internal.ui.PDEUIMessages;
+
 import java.util.ArrayList;
+import java.util.Set;
 import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.wizard.WizardPage;
@@ -21,14 +23,14 @@ import org.eclipse.pde.core.IModelProviderListener;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.ClasspathUtilCore;
 import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.wizards.ListUtil;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
+import org.osgi.framework.Version;
 
 public abstract class BaseImportWizardSecondPage extends WizardPage implements IModelProviderListener {
 
@@ -38,6 +40,7 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 	protected PluginImportWizardFirstPage fPage1;
 	protected IPluginModelBase[] fModels = new IPluginModelBase[0];
 	private Object fImportSource;
+	private int fImportType;
 	protected Button fAddFragmentsButton;
 	private Button fAutoBuildButton;
 	protected TableViewer fImportListViewer;
@@ -52,7 +55,6 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 	public BaseImportWizardSecondPage(String pageName, PluginImportWizardFirstPage page) {
 		super(pageName);
 		fPage1 = page;
-		PDEPlugin.getDefault().getLabelProvider().connect(this);
 		PDECore.getDefault().getModelManager().getExternalModelManager().addModelProviderListener(this);
 	}
 
@@ -73,40 +75,26 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 		table.setLayoutData(gd);
 
 		fImportListViewer = new TableViewer(table);
-		fImportListViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
+		fImportListViewer.setLabelProvider(new PluginImportLabelProvider());
 		fImportListViewer.setContentProvider(new ContentProvider());
 		fImportListViewer.setInput(PDECore.getDefault().getModelManager().getExternalModelManager());
 		fImportListViewer.setComparator(ListUtil.PLUGIN_COMPARATOR);
 		return container;
 	}
 
-	protected Composite createComputationsOption(Composite parent, int span) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setLayout(GridLayoutFactory.swtDefaults().margins(5, 0).create());
-		GridData gd = new GridData();
-		gd.horizontalSpan = span;
-		composite.setLayoutData(gd);
-
-		fAddFragmentsButton = new Button(composite, SWT.CHECK);
-		fAddFragmentsButton.setText(PDEUIMessages.ImportWizard_SecondPage_addFragments);
-		fAddFragmentsButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+	protected void createComputationsOption(Composite parent) {
+		fAddFragmentsButton = SWTFactory.createCheckButton(parent, PDEUIMessages.ImportWizard_SecondPage_addFragments, null, true, 1);
 		if (getDialogSettings().get(SETTINGS_ADD_FRAGMENTS) != null)
 			fAddFragmentsButton.setSelection(getDialogSettings().getBoolean(SETTINGS_ADD_FRAGMENTS));
 		else
 			fAddFragmentsButton.setSelection(true);
 
 		if (!PDEPlugin.getWorkspace().isAutoBuilding()) {
-			fAutoBuildButton = new Button(composite, SWT.CHECK);
-			fAutoBuildButton.setText(PDEUIMessages.BaseImportWizardSecondPage_autobuild);
-			fAutoBuildButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-			fAutoBuildButton.setSelection(getDialogSettings().getBoolean(SETTINGS_AUTOBUILD));
+			fAutoBuildButton = SWTFactory.createCheckButton(parent, PDEUIMessages.BaseImportWizardSecondPage_autobuild, null, getDialogSettings().getBoolean(SETTINGS_AUTOBUILD), 1);
 		}
-		return composite;
-
 	}
 
 	public void dispose() {
-		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
 		PDECore.getDefault().getModelManager().getExternalModelManager().removeModelProviderListener(this);
 	}
 
@@ -124,6 +112,7 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 		if (fRefreshNeeded) {
 			fRefreshNeeded = false;
 			fImportSource = fPage1.getImportSource();
+			fImportType = fPage1.getImportType();
 			return true;
 		}
 		Object currSource = fPage1.getImportSource();
@@ -131,16 +120,53 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 			fImportSource = fPage1.getImportSource();
 			return true;
 		}
+		// If the import type was changed to/from repository need refresh to filter available models
+		int currType = fPage1.getImportType();
+		if (currType != fImportType) {
+			if (currType == PluginImportOperation.IMPORT_FROM_REPOSITORY || fImportType == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+				fImportType = currType;
+				return true;
+			}
+			fImportType = currType;
+		}
 		return fPage1.isRefreshNeeded();
 	}
 
-	private IPluginModelBase findModel(String id) {
+	/**
+	 * Find the model that best matches the given string id and version.  If there is a
+	 * bundle that matches the name and version it returns.  If there is a bundle with the
+	 * correct name but no matching version, the highest version available will be returned.
+	 * If no match could be found this method returns <code>null</code>
+	 * 
+	 * @param id id of the bundle to find
+	 * @param version version of the bundle to find, may be <code>null</code>
+	 * @return the best matching bundle or <code>null</code>
+	 */
+	private IPluginModelBase findModel(String id, String version) {
+		// Look for a matching version, if one cannot be found, take the highest version
+		IPluginModelBase bestMatch = null;
 		for (int i = 0; i < fModels.length; i++) {
 			String modelId = fModels[i].getPluginBase().getId();
-			if (modelId != null && modelId.equals(id))
-				return fModels[i];
+			if (modelId != null && modelId.equals(id)) {
+				String modelVersion = fModels[i].getPluginBase().getVersion();
+				if (modelVersion != null && modelVersion.equals(version)) {
+					// Strict version match, return this model
+					return fModels[i];
+				}
+				if (bestMatch == null || bestMatch.getPluginBase().getVersion() == null || version == null) {
+					// No good match yet, use current model
+					bestMatch = fModels[i];
+				} else {
+					// At least one good match, use highest version
+					Version bestVersion = Version.parseVersion(bestMatch.getPluginBase().getVersion());
+					Version currentVersion = Version.parseVersion(version);
+					if (bestVersion.compareTo(currentVersion) < 0) {
+						bestMatch = fModels[i];
+					}
+				}
+			}
 		}
-		return null;
+		return bestMatch;
 	}
 
 	private IFragmentModel[] findFragments(IPlugin plugin) {
@@ -180,7 +206,7 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 		IPluginImport[] required = model.getPluginBase().getImports();
 		if (required.length > 0) {
 			for (int i = 0; i < required.length; i++) {
-				IPluginModelBase found = findModel(required[i].getId());
+				IPluginModelBase found = findModel(required[i].getId(), required[i].getVersion());
 				if (found != null) {
 					addPluginAndDependencies(found, selected, addFragments);
 				}
@@ -195,7 +221,7 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 				}
 			} else {
 				IFragment fragment = ((IFragmentModel) model).getFragment();
-				IPluginModelBase found = findModel(fragment.getPluginId());
+				IPluginModelBase found = findModel(fragment.getPluginId(), fragment.getVersion());
 				if (found != null) {
 					addPluginAndDependencies(found, selected, addFragments);
 				}
@@ -230,4 +256,24 @@ public abstract class BaseImportWizardSecondPage extends WizardPage implements I
 		return fAutoBuildButton != null && getDialogSettings().getBoolean(SETTINGS_AUTOBUILD);
 	}
 
+	/**
+	 * Adds a warning if importing from a repository and not all bundles are available in
+	 * a repository.
+	 */
+	protected void checkRepositoryAvailability() {
+		PluginImportWizardFirstPage page = (PluginImportWizardFirstPage) getPreviousPage();
+		if (page.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+			if (getMessageType() != ERROR && getMessageType() != WARNING) {
+				IPluginModelBase[] selected = getModelsToImport();
+				Set available = page.repositoryModels;
+				for (int i = 0; i < selected.length; i++) {
+					if (!available.contains(selected[i])) {
+						setMessage(PDEUIMessages.BaseImportWizardSecondPage_0, WARNING);
+						return;
+					}
+				}
+			}
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/CVSBundleImportPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/CVSBundleImportPage.java
new file mode 100644
index 0000000..62353be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/CVSBundleImportPage.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.imports;
+
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * Allows specific versions versus HEAD to be imported into the workspace.
+ */
+public class CVSBundleImportPage extends WizardPage implements IBundeImportWizardPage {
+
+	private BundleImportDescription[] descriptions;
+	private Button useHead;
+	private TableViewer bundlesViewer;
+	private Label counterLabel;
+
+	private static final String CVS_PAGE_USE_HEAD = "org.eclipse.pde.ui.cvs.import.page.head"; //$NON-NLS-1$
+
+	class CvsLabelProvider extends StyledCellLabelProvider implements ILabelProvider {
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+		 */
+		public Image getImage(Object element) {
+			return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+		 */
+		public String getText(Object element) {
+			return getStyledText(element).getString();
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.StyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
+		 */
+		public void update(ViewerCell cell) {
+			StyledString string = getStyledText(cell.getElement());
+			cell.setText(string.getString());
+			cell.setStyleRanges(string.getStyleRanges());
+			cell.setImage(getImage(cell.getElement()));
+			super.update(cell);
+		}
+
+		private StyledString getStyledText(Object element) {
+			StyledString styledString = new StyledString();
+			if (element instanceof CvsBundleImportDescription) {
+				CvsBundleImportDescription description = (CvsBundleImportDescription) element;
+				String project = description.getProject();
+				String version = description.getTag();
+				String host = description.getServer();
+				styledString.append(project);
+				if (version != null && !useHead.getSelection()) {
+					styledString.append(' ');
+					styledString.append(version, StyledString.DECORATIONS_STYLER);
+				}
+				styledString.append(' ');
+				styledString.append('[', StyledString.DECORATIONS_STYLER);
+				styledString.append(host, StyledString.DECORATIONS_STYLER);
+				styledString.append(']', StyledString.DECORATIONS_STYLER);
+				return styledString;
+			}
+			styledString.append(element.toString());
+			return styledString;
+		}
+	}
+
+	/**
+	 * Constructs the page.
+	 */
+	public CVSBundleImportPage() {
+		super("cvs", PDEUIMessages.CVSBundleImportPage_0, null); //$NON-NLS-1$
+		setDescription(PDEUIMessages.CVSBundleImportPage_1);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
+		Composite group = SWTFactory.createComposite(comp, 1, 1, GridData.FILL_HORIZONTAL);
+
+		Button versions = SWTFactory.createRadioButton(group, PDEUIMessages.CVSBundleImportPage_3);
+		useHead = SWTFactory.createRadioButton(group, PDEUIMessages.CVSBundleImportPage_2);
+		SelectionListener listener = new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				bundlesViewer.refresh(true);
+			}
+		};
+		versions.addSelectionListener(listener);
+		useHead.addSelectionListener(listener);
+
+		Table table = new Table(comp, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		gd.heightHint = 200;
+		gd.widthHint = 225;
+		table.setLayoutData(gd);
+
+		bundlesViewer = new TableViewer(table);
+		bundlesViewer.setLabelProvider(new CvsLabelProvider());
+		bundlesViewer.setContentProvider(new ArrayContentProvider());
+		bundlesViewer.setComparator(new ViewerComparator());
+		counterLabel = new Label(comp, SWT.NONE);
+		counterLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		setControl(comp);
+		setPageComplete(true);
+
+		// initialize versions versus HEAD
+		IDialogSettings settings = getWizard().getDialogSettings();
+		boolean head = false;
+		boolean found = false;
+		if (settings != null) {
+			String string = settings.get(CVS_PAGE_USE_HEAD);
+			if (string != null) {
+				found = true;
+				head = settings.getBoolean(CVS_PAGE_USE_HEAD);
+			}
+		}
+
+		if (!found) {
+			for (int i = 0; i < descriptions.length; i++) {
+				CvsBundleImportDescription description = (CvsBundleImportDescription) descriptions[i];
+				if (description.getTag() != null) {
+					head = false;
+					break;
+				}
+			}
+		}
+		useHead.setSelection(head);
+		versions.setSelection(!head);
+
+		if (descriptions != null) {
+			bundlesViewer.setInput(descriptions);
+			updateCount();
+		}
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.PLUGIN_IMPORT_CVS_PAGE);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.DialogPage#setVisible(boolean)
+	 */
+	public void setVisible(boolean visible) {
+		super.setVisible(visible);
+		setPageComplete(true);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.IBundeImportWizardPage#finish()
+	 */
+	public boolean finish() {
+		boolean head = false;
+		if (getControl() != null) {
+			head = useHead.getSelection();
+			// store settings
+			IDialogSettings settings = getWizard().getDialogSettings();
+			if (settings != null) {
+				settings.put(CVS_PAGE_USE_HEAD, head);
+			}
+		} else {
+			// use whatever was used last time
+			IDialogSettings settings = getWizard().getDialogSettings();
+			if (settings != null) {
+				head = settings.getBoolean(CVS_PAGE_USE_HEAD);
+			}
+		}
+
+		if (head) {
+			// modify tags on bundle import descriptions
+			for (int i = 0; i < descriptions.length; i++) {
+				CvsBundleImportDescription description = (CvsBundleImportDescription) descriptions[i];
+				description.setTag(null);
+			}
+		}
+		return true;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.IBundeImportWizardPage#getSelection()
+	 */
+	public BundleImportDescription[] getSelection() {
+		return descriptions;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.pde.ui.IBundeImportWizardPage#setSelection(org.eclipse.pde.core.importing.BundleImportDescription[])
+	 */
+	public void setSelection(BundleImportDescription[] descriptions) {
+		this.descriptions = descriptions;
+		// fill viewer
+		if (bundlesViewer != null) {
+			bundlesViewer.setInput(descriptions);
+			updateCount();
+		}
+	}
+
+	/**
+	 * Updates the count of bundles that will be imported
+	 */
+	private void updateCount() {
+		counterLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_expressPage_total, new Integer(descriptions.length)));
+		counterLabel.getParent().layout();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
index d0ec553..fc12aa9 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.ifeature.*;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.team.core.RepositoryProvider;
@@ -226,7 +227,7 @@ public class FeatureImportOperation implements IWorkspaceRunnable {
 	}
 
 	private void createBuildProperties(IProject project) {
-		IFile file = project.getFile("build.properties"); //$NON-NLS-1$
+		IFile file = PDEProject.getBuildProperties(project);
 		if (!file.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(file);
 			IBuildEntry ientry = model.getFactory().createEntry("bin.includes"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
index 02e6a32..c1c9318 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/FeatureImportWizardPage.java
@@ -1,448 +1,561 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.pde.internal.ui.wizards.imports;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.feature.ExternalFeatureModel;
-import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
-import org.eclipse.pde.internal.ui.parts.WizardCheckboxTablePart;
-import org.eclipse.pde.internal.ui.util.SWTUtil;
-import org.eclipse.pde.internal.ui.wizards.ListUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.progress.IProgressService;
-
-public class FeatureImportWizardPage extends WizardPage {
-
-	private static final String SETTINGS_DROPLOCATION = "droplocation"; //$NON-NLS-1$
-	private static final String SETTINGS_DOOTHER = "doother"; //$NON-NLS-1$
-	private static final String SETTINGS_NOT_BINARY = "notbinary"; //$NON-NLS-1$
-
-	private Label fOtherLocationLabel;
-	private Button fRuntimeLocationButton;
-	private Button fBrowseButton;
-	private Combo fDropLocation;
-	private boolean fSelfSetLocation;
-	private String fCurrDropLocation;
-
-	private CheckboxTableViewer fFeatureViewer;
-	private TablePart fTablePart;
-	private IFeatureModel[] fModels;
-
-	private Button fBinaryButton;
-
-	class ContentProvider extends DefaultContentProvider implements IStructuredContentProvider {
-		public Object[] getElements(Object parent) {
-			if (fModels != null)
-				return fModels;
-			return new Object[0];
-		}
-	}
-
-	class TablePart extends WizardCheckboxTablePart {
-		public TablePart() {
-			super(null, new String[] {PDEUIMessages.FeatureImportWizardPage_reload, PDEUIMessages.WizardCheckboxTablePart_selectAll, PDEUIMessages.WizardCheckboxTablePart_deselectAll});
-			setSelectAllIndex(1);
-			setDeselectAllIndex(2);
-		}
-
-		public void updateCounter(int count) {
-			super.updateCounter(count);
-			dialogChanged();
-		}
-
-		protected StructuredViewer createStructuredViewer(Composite parent, int style, FormToolkit toolkit) {
-			StructuredViewer viewer = super.createStructuredViewer(parent, style, toolkit);
-			viewer.setComparator(ListUtil.FEATURE_COMPARATOR);
-			return viewer;
-		}
-
-		protected void buttonSelected(Button button, int index) {
-			if (index == 0)
-				loadFeatureTable();
-			else
-				super.buttonSelected(button, index);
-		}
-	}
-
-	public FeatureImportWizardPage() {
-		super("FeatureImportWizardPage"); //$NON-NLS-1$
-		setTitle(PDEUIMessages.FeatureImportWizard_FirstPage_title);
-		setDescription(PDEUIMessages.FeatureImportWizard_FirstPage_desc);
-		fTablePart = new TablePart();
-		PDEPlugin.getDefault().getLabelProvider().connect(this);
-	}
-
-	/*
-	 * @see IDialogPage#createControl(Composite)
-	 */
-	public void createControl(Composite parent) {
-		initializeDialogUnits(parent);
-
-		Composite composite = new Composite(parent, SWT.NONE);
-		composite.setLayout(new GridLayout(3, false));
-
-		fRuntimeLocationButton = new Button(composite, SWT.CHECK);
-		fillHorizontal(fRuntimeLocationButton, 3, false);
-		fRuntimeLocationButton.setText(PDEUIMessages.FeatureImportWizard_FirstPage_runtimeLocation);
-
-		fOtherLocationLabel = new Label(composite, SWT.NULL);
-		fOtherLocationLabel.setText(PDEUIMessages.FeatureImportWizard_FirstPage_otherFolder);
-
-		fDropLocation = new Combo(composite, SWT.DROP_DOWN);
-		fillHorizontal(fDropLocation, 1, true);
-
-		fBrowseButton = new Button(composite, SWT.PUSH);
-		fBrowseButton.setText(PDEUIMessages.FeatureImportWizard_FirstPage_browse);
-		fBrowseButton.setLayoutData(new GridData());
-		SWTUtil.setButtonDimensionHint(fBrowseButton);
-
-		creatFeatureTable(composite);
-
-		fBinaryButton = new Button(composite, SWT.CHECK);
-		GridData gd = fillHorizontal(fBinaryButton, 3, false);
-		gd.verticalIndent = 5;
-		fBinaryButton.setText(PDEUIMessages.FeatureImportWizard_FirstPage_binaryImport);
-
-		initializeFields(getDialogSettings());
-		hookListeners();
-
-		setControl(composite);
-		dialogChanged();
-		Dialog.applyDialogFont(composite);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.FEATURE_IMPORT_FIRST_PAGE);
-	}
-
-	private String getTargetHome() {
-		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
-		return preferences.getString(ICoreConstants.PLATFORM_PATH);
-	}
-
-	private void hookListeners() {
-		fRuntimeLocationButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				setOtherEnabled(!fRuntimeLocationButton.getSelection());
-				setLocation(fRuntimeLocationButton.getSelection() ? getTargetHome() : fCurrDropLocation);
-				loadFeatureTable();
-			}
-		});
-		fDropLocation.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				validateDropLocation();
-				if (!fRuntimeLocationButton.getSelection()) {
-					String newLoc = fDropLocation.getText();
-					if (getMessageType() != WARNING && !newLoc.equals(fCurrDropLocation) && !fSelfSetLocation)
-						setMessage(PDEUIMessages.FeatureImportWizardPage_reloadLocation, WARNING);
-					fCurrDropLocation = newLoc;
-				}
-			}
-		});
-		fBrowseButton.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				IPath chosen = chooseDropLocation();
-				if (chosen != null) {
-					setLocation(chosen.toOSString());
-					loadFeatureTable();
-				}
-			}
-		});
-	}
-
-	private GridData fillHorizontal(Control control, int span, boolean grab) {
-		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		gd.horizontalSpan = span;
-		gd.grabExcessHorizontalSpace = grab;
-		control.setLayoutData(gd);
-		return gd;
-	}
-
-	private void initializeFields(IDialogSettings initialSettings) {
-		String[] dropItems = new String[0];
-		boolean doOther = false;
-		boolean binary = true;
-
-		if (initialSettings != null) {
-			doOther = initialSettings.getBoolean(SETTINGS_DOOTHER);
-			binary = !initialSettings.getBoolean(SETTINGS_NOT_BINARY);
-
-			ArrayList items = new ArrayList();
-			for (int i = 0; i < 6; i++) {
-				String curr = initialSettings.get(SETTINGS_DROPLOCATION + String.valueOf(i));
-				if (curr != null && !items.contains(curr))
-					items.add(curr);
-			}
-			if (items.size() == 0)
-				items.add(""); //$NON-NLS-1$
-			dropItems = (String[]) items.toArray(new String[items.size()]);
-		}
-		fDropLocation.setItems(dropItems);
-		fRuntimeLocationButton.setSelection(!doOther);
-		setOtherEnabled(doOther);
-		fCurrDropLocation = doOther ? dropItems[0] : getTargetHome();
-		setLocation(fCurrDropLocation);
-		fBinaryButton.setSelection(binary);
-
-		validateDropLocation();
-
-		loadFeatureTable();
-	}
-
-	private void setOtherEnabled(boolean enabled) {
-		fOtherLocationLabel.setEnabled(enabled);
-		fDropLocation.setEnabled(enabled);
-		fBrowseButton.setEnabled(enabled);
-	}
-
-	public void storeSettings(boolean finishPressed) {
-		IDialogSettings settings = getDialogSettings();
-		boolean other = !fRuntimeLocationButton.getSelection();
-		boolean binary = fBinaryButton.getSelection();
-		if (finishPressed || fDropLocation.getText().length() > 0 && other) {
-			settings.put(SETTINGS_DROPLOCATION + String.valueOf(0), fDropLocation.getText());
-			String[] items = fDropLocation.getItems();
-			int nEntries = Math.min(items.length, 5);
-			for (int i = 0; i < nEntries; i++)
-				settings.put(SETTINGS_DROPLOCATION + String.valueOf(i + 1), items[i]);
-		}
-		if (finishPressed) {
-			settings.put(SETTINGS_DOOTHER, other);
-			settings.put(SETTINGS_NOT_BINARY, !binary);
-		}
-	}
-
-	/**
-	 * Browses for a drop location.
-	 */
-	private IPath chooseDropLocation() {
-		DirectoryDialog dialog = new DirectoryDialog(getShell());
-		dialog.setFilterPath(fDropLocation.getText());
-		dialog.setText(PDEUIMessages.FeatureImportWizard_messages_folder_title);
-		dialog.setMessage(PDEUIMessages.FeatureImportWizard_messages_folder_message);
-		String res = dialog.open();
-		return res != null ? new Path(res) : null;
-	}
-
-	private void validateDropLocation() {
-		String errorMessage = null;
-		if (isOtherLocation()) {
-			IPath curr = getDropLocation();
-			if (curr.segmentCount() == 0)
-				errorMessage = PDEUIMessages.FeatureImportWizard_errors_locationMissing;
-			else if (!Path.ROOT.isValidPath(fDropLocation.getText()))
-				errorMessage = PDEUIMessages.FeatureImportWizard_errors_buildFolderInvalid;
-			else {
-				File file = curr.toFile();
-				if (!file.exists() || !file.isDirectory())
-					errorMessage = PDEUIMessages.FeatureImportWizard_errors_buildFolderMissing;
-			}
-		}
-		setErrorMessage(errorMessage);
-		setPageComplete(errorMessage == null);
-		fTablePart.setButtonEnabled(0, errorMessage == null);
-	}
-
-	public boolean isBinary() {
-		return fBinaryButton.getSelection();
-	}
-
-	/**
-	 * Returns the drop location.
-	 */
-	public IPath getDropLocation() {
-		return new Path(fDropLocation.getText().trim());
-	}
-
-	public boolean isOtherLocation() {
-		return !fRuntimeLocationButton.getSelection();
-	}
-
-	private void loadFeatureTable() {
-		IFeatureModel[] models = getModels();
-		fFeatureViewer.setInput(PDEPlugin.getDefault());
-		if (models != null) {
-			// warning had been issued for unreloaded location
-			if (getMessageType() == WARNING)
-				setMessage(null, WARNING);
-			if (!fRuntimeLocationButton.getSelection()) {
-				String currItem = fDropLocation.getText();
-				if (fDropLocation.indexOf(currItem) == -1) {
-					fDropLocation.add(currItem, 0);
-					if (fDropLocation.getItemCount() > 6)
-						fDropLocation.remove(6);
-					storeSettings(false);
-				}
-			}
-			fFeatureViewer.setCheckedElements(models);
-		}
-		fTablePart.updateCounter(models != null ? models.length : 0);
-		fTablePart.getTableViewer().refresh();
-
-		fTablePart.setButtonEnabled(1, models != null && models.length > 0);
-		fTablePart.setButtonEnabled(2, models != null && models.length > 0);
-
-		dialogChanged();
-	}
-
-	public void creatFeatureTable(Composite parent) {
-		Composite container = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.marginHeight = layout.marginWidth = 0;
-		container.setLayout(layout);
-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-		gd.horizontalSpan = 3;
-		gd.verticalIndent = 5;
-		gd.heightHint = gd.widthHint = 300;
-		container.setLayoutData(gd);
-
-		fTablePart.createControl(container);
-		fFeatureViewer = fTablePart.getTableViewer();
-		fFeatureViewer.setContentProvider(new ContentProvider());
-		fFeatureViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
-	}
-
-	public void dispose() {
-		super.dispose();
-		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
-	}
-
-	public IFeatureModel[] getModels() {
-		final IPath home = getDropLocation();
-		final boolean useRuntimeLocation = fRuntimeLocationButton.getSelection() || getTargetHome().equals(fDropLocation.getText().trim());
-		IRunnableWithProgress runnable = new IRunnableWithProgress() {
-			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-				monitor.beginTask(PDEUIMessages.FeatureImportWizard_messages_updating, IProgressMonitor.UNKNOWN);
-				ArrayList result = new ArrayList();
-				if (useRuntimeLocation) {
-					IFeatureModel[] allModels = PDECore.getDefault().getFeatureModelManager().getModels();
-					for (int i = 0; i < allModels.length; i++)
-						if (allModels[i].getUnderlyingResource() == null)
-							result.add(allModels[i]);
-				} else {
-					MultiStatus errors = doLoadFeatures(result, createPath(home));
-					if (errors != null && errors.getChildren().length > 0)
-						PDEPlugin.log(errors);
-				}
-				fModels = (IFeatureModel[]) result.toArray(new IFeatureModel[result.size()]);
-				monitor.done();
-			}
-		};
-		IProgressService pservice = PlatformUI.getWorkbench().getProgressService();
-		try {
-			pservice.busyCursorWhile(runnable);
-		} catch (InvocationTargetException e) {
-		} catch (InterruptedException e) {
-		}
-		return fModels;
-	}
-
-	private File createPath(IPath dropLocation) {
-		File featuresDir = new File(dropLocation.toFile(), ICoreConstants.FEATURE_FOLDER_NAME);
-		if (featuresDir.exists())
-			return featuresDir;
-		return null;
-	}
-
-	private MultiStatus doLoadFeatures(ArrayList result, File path) {
-		if (path == null)
-			return null;
-		File[] dirs = path.listFiles();
-		if (dirs == null)
-			return null;
-		ArrayList resultStatus = new ArrayList();
-		for (int i = 0; i < dirs.length; i++) {
-			File dir = dirs[i];
-			if (dir.isDirectory()) {
-				File manifest = new File(dir, "feature.xml"); //$NON-NLS-1$
-				if (manifest.exists()) {
-					IStatus status = doLoadFeature(dir, manifest, result);
-					if (status != null)
-						resultStatus.add(status);
-				}
-			}
-		}
-		return new MultiStatus(IPDEUIConstants.PLUGIN_ID, IStatus.OK, (IStatus[]) resultStatus.toArray(new IStatus[resultStatus.size()]), PDEUIMessages.FeatureImportWizard_DetailedPage_problemsLoading, null);
-	}
-
-	private IStatus doLoadFeature(File dir, File manifest, ArrayList result) {
-		ExternalFeatureModel model = new ExternalFeatureModel();
-		model.setInstallLocation(dir.getAbsolutePath());
-		IStatus status = null;
-
-		InputStream stream = null;
-
-		try {
-			stream = new BufferedInputStream(new FileInputStream(manifest));
-			model.load(stream, false);
-			if (!model.isValid()) {
-				status = new Status(IStatus.WARNING, IPDEUIConstants.PLUGIN_ID, IStatus.OK, NLS.bind(PDEUIMessages.FeatureImportWizardPage_importHasInvalid, dir), null);
-			}
-		} catch (Exception e) {
-			// Errors in the file
-			status = new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, IStatus.OK, e.getMessage(), e);
-		}
-		if (stream != null) {
-			try {
-				stream.close();
-			} catch (IOException e) {
-			}
-		}
-		if (status == null)
-			result.add(model);
-		return status;
-	}
-
-	public IFeatureModel[] getSelectedModels() {
-		Object[] selected = fFeatureViewer.getCheckedElements();
-		IFeatureModel[] result = new IFeatureModel[selected.length];
-		System.arraycopy(selected, 0, result, 0, selected.length);
-		return result;
-	}
-
-	private void dialogChanged() {
-		String message = null;
-		if (fFeatureViewer != null && fFeatureViewer.getTable().getItemCount() == 0)
-			message = PDEUIMessages.FeatureImportWizard_messages_noFeatures;
-
-		setMessage(message, IMessageProvider.INFORMATION);
-		setPageComplete(fTablePart.getSelectionCount() > 0);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
-	 */
-	public boolean isPageComplete() {
-		return fTablePart.getSelectionCount() > 0;
-	}
-
-	private void setLocation(String location) {
-		fSelfSetLocation = true;
-		fDropLocation.setText(location);
-		fSelfSetLocation = false;
-	}
-}
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.imports;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.feature.ExternalFeatureModel;
+import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
+import org.eclipse.pde.internal.ui.shared.CachedCheckboxTreeViewer;
+import org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree;
+import org.eclipse.pde.internal.ui.shared.target.Messages;
+import org.eclipse.pde.internal.ui.util.SWTUtil;
+import org.eclipse.pde.internal.ui.wizards.ListUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.progress.IProgressService;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * Wizard page used when importing features.  Allows the user to choose a location (Default or a folder) to load features from
+ * then select one or more features to import into the workspace.
+ * 
+ * @see FeatureImportWizard
+ */
+public class FeatureImportWizardPage extends WizardPage {
+
+	private static final String SETTINGS_DROPLOCATION = "droplocation"; //$NON-NLS-1$
+	private static final String SETTINGS_DOOTHER = "doother"; //$NON-NLS-1$
+	private static final String SETTINGS_NOT_BINARY = "notbinary"; //$NON-NLS-1$
+
+	/**
+	 * How long to wait before validating the directory
+	 */
+	protected static final int TYPING_DELAY = 300;
+
+	private Label fOtherLocationLabel;
+	private Button fRuntimeLocationButton;
+	private Button fBrowseButton;
+	private Combo fDropLocation;
+	private boolean fSelfSetLocation;
+	private String fCurrDropLocation;
+	private Job fTextChangedJob;
+	private CachedCheckboxTreeViewer fFeatureViewer;
+	private Label fCounterLabel;
+	private Button fSelectAllButton;
+	private Button fDeselectAllButton;
+
+	private IFeatureModel[] fModels;
+
+	private Button fBinaryButton;
+
+	class ContentProvider extends DefaultContentProvider implements IStructuredContentProvider {
+		public Object[] getElements(Object parent) {
+			if (fModels != null)
+				return fModels;
+			return new Object[0];
+		}
+	}
+
+	private class LocationChangedJob extends UIJob {
+		public LocationChangedJob(Display jobDisplay, String name) {
+			super(jobDisplay, name);
+		}
+
+		public IStatus runInUIThread(IProgressMonitor monitor) {
+			if (monitor.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+
+			validateDropLocation();
+			if (!fRuntimeLocationButton.getSelection()) {
+				String newLoc = fDropLocation.getText();
+				if (getMessageType() != WARNING && !newLoc.equals(fCurrDropLocation) && !fSelfSetLocation) {
+					handleReload();
+				}
+				fCurrDropLocation = newLoc;
+			}
+
+			return Status.OK_STATUS;
+		}
+	}
+
+	public FeatureImportWizardPage() {
+		super("FeatureImportWizardPage"); //$NON-NLS-1$
+		setTitle(PDEUIMessages.FeatureImportWizard_FirstPage_title);
+		setDescription(PDEUIMessages.FeatureImportWizard_FirstPage_desc);
+		PDEPlugin.getDefault().getLabelProvider().connect(this);
+	}
+
+	/*
+	 * @see IDialogPage#createControl(Composite)
+	 */
+	public void createControl(Composite parent) {
+		initializeDialogUnits(parent);
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		composite.setLayout(new GridLayout(1, false));
+
+		fRuntimeLocationButton = new Button(composite, SWT.CHECK);
+		fillHorizontal(fRuntimeLocationButton, 1, false);
+		fRuntimeLocationButton.setText(PDEUIMessages.FeatureImportWizard_FirstPage_runtimeLocation);
+
+		Composite otherLocationComposite = SWTFactory.createComposite(composite, 3, 1, GridData.FILL_HORIZONTAL, 0, 0);
+
+		fOtherLocationLabel = new Label(otherLocationComposite, SWT.NULL);
+		fOtherLocationLabel.setText(PDEUIMessages.FeatureImportWizard_FirstPage_otherFolder);
+
+		fDropLocation = new Combo(otherLocationComposite, SWT.DROP_DOWN);
+		fillHorizontal(fDropLocation, 1, true);
+
+		fBrowseButton = new Button(otherLocationComposite, SWT.PUSH);
+		fBrowseButton.setText(PDEUIMessages.FeatureImportWizard_FirstPage_browse);
+		fBrowseButton.setLayoutData(new GridData());
+		SWTUtil.setButtonDimensionHint(fBrowseButton);
+
+		createFeatureTable(composite);
+
+		Composite underTableComp = SWTFactory.createComposite(composite, 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
+
+		fCounterLabel = SWTFactory.createLabel(underTableComp, "", 1); //$NON-NLS-1$
+		fCounterLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
+		Composite buttonComp = SWTFactory.createComposite(underTableComp, 2, 1, SWT.NONE, 0, 0);
+		buttonComp.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));
+
+		fSelectAllButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.WizardCheckboxTablePart_selectAll, null);
+		fSelectAllButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fFeatureViewer.setAllChecked(true);
+				updateCounter();
+				dialogChanged();
+			}
+		});
+		fDeselectAllButton = SWTFactory.createPushButton(buttonComp, PDEUIMessages.WizardCheckboxTablePart_deselectAll, null);
+		fDeselectAllButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				fFeatureViewer.setAllChecked(false);
+				updateCounter();
+				dialogChanged();
+			}
+		});
+
+		fBinaryButton = SWTFactory.createCheckButton(composite, PDEUIMessages.FeatureImportWizard_FirstPage_binaryImport, null, true, 1);
+
+		initializeFields(getDialogSettings());
+		hookListeners();
+
+		setControl(composite);
+		updateCounter();
+		dialogChanged();
+		Dialog.applyDialogFont(composite);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.FEATURE_IMPORT_FIRST_PAGE);
+	}
+
+	private String getTargetHome() {
+		PDEPreferencesManager preferences = PDECore.getDefault().getPreferencesManager();
+		return preferences.getString(ICoreConstants.PLATFORM_PATH);
+	}
+
+	private void hookListeners() {
+		fRuntimeLocationButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setOtherEnabled(!fRuntimeLocationButton.getSelection());
+				setLocation(fRuntimeLocationButton.getSelection() ? getTargetHome() : fCurrDropLocation);
+				handleReload();
+			}
+		});
+
+		fDropLocation.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				// If the text is a combo item, immediately try to resolve, otherwise wait in case they type more
+				boolean isItem = false;
+				String[] items = fDropLocation.getItems();
+				for (int i = 0; i < items.length; i++) {
+					if (fDropLocation.getText().equals(items[i])) {
+						isItem = true;
+						break;
+					}
+				}
+				locationChanged(isItem ? 0 : TYPING_DELAY);
+			}
+		});
+
+		fBrowseButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				IPath chosen = chooseDropLocation();
+				if (chosen != null) {
+					setLocation(chosen.toOSString());
+					handleReload();
+				}
+			}
+		});
+	}
+
+	/**
+	 * Called whenever the location or another aspect of the container has changed
+	 * in the UI.  Will schedule a UIJob to verify and resolve the container 
+	 * reporting any problems to the user.  If a previous job is running or sleeping
+	 * it will be cancelled.
+	 * 
+	 * @param delay a delay to add to the job scheduling
+	 */
+	protected void locationChanged(long delay) {
+		if (fTextChangedJob == null) {
+			fTextChangedJob = new LocationChangedJob(getShell().getDisplay(), Messages.EditDirectoryContainerPage_3);
+		} else {
+			fTextChangedJob.cancel();
+		}
+		fTextChangedJob.schedule(delay);
+	}
+
+	private GridData fillHorizontal(Control control, int span, boolean grab) {
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd.horizontalSpan = span;
+		gd.grabExcessHorizontalSpace = grab;
+		control.setLayoutData(gd);
+		return gd;
+	}
+
+	private void initializeFields(IDialogSettings initialSettings) {
+		String[] dropItems = new String[0];
+		boolean doOther = false;
+		boolean binary = true;
+
+		if (initialSettings != null) {
+			doOther = initialSettings.getBoolean(SETTINGS_DOOTHER);
+			binary = !initialSettings.getBoolean(SETTINGS_NOT_BINARY);
+
+			ArrayList items = new ArrayList();
+			for (int i = 0; i < 6; i++) {
+				String curr = initialSettings.get(SETTINGS_DROPLOCATION + String.valueOf(i));
+				if (curr != null && !items.contains(curr))
+					items.add(curr);
+			}
+			if (items.size() == 0)
+				items.add(""); //$NON-NLS-1$
+			dropItems = (String[]) items.toArray(new String[items.size()]);
+		}
+		fDropLocation.setItems(dropItems);
+		fRuntimeLocationButton.setSelection(!doOther);
+		setOtherEnabled(doOther);
+		fCurrDropLocation = doOther ? dropItems[0] : getTargetHome();
+		setLocation(fCurrDropLocation);
+		fBinaryButton.setSelection(binary);
+
+		validateDropLocation();
+
+		handleReload();
+	}
+
+	private void setOtherEnabled(boolean enabled) {
+		fOtherLocationLabel.setEnabled(enabled);
+		fDropLocation.setEnabled(enabled);
+		fBrowseButton.setEnabled(enabled);
+	}
+
+	public void storeSettings(boolean finishPressed) {
+		IDialogSettings settings = getDialogSettings();
+		boolean other = !fRuntimeLocationButton.getSelection();
+		boolean binary = fBinaryButton.getSelection();
+		if (finishPressed || fDropLocation.getText().length() > 0 && other) {
+			settings.put(SETTINGS_DROPLOCATION + String.valueOf(0), fDropLocation.getText());
+			String[] items = fDropLocation.getItems();
+			int nEntries = Math.min(items.length, 5);
+			for (int i = 0; i < nEntries; i++)
+				settings.put(SETTINGS_DROPLOCATION + String.valueOf(i + 1), items[i]);
+		}
+		if (finishPressed) {
+			settings.put(SETTINGS_DOOTHER, other);
+			settings.put(SETTINGS_NOT_BINARY, !binary);
+		}
+	}
+
+	/**
+	 * Browses for a drop location.
+	 */
+	private IPath chooseDropLocation() {
+		DirectoryDialog dialog = new DirectoryDialog(getShell());
+		dialog.setFilterPath(fDropLocation.getText());
+		dialog.setText(PDEUIMessages.FeatureImportWizard_messages_folder_title);
+		dialog.setMessage(PDEUIMessages.FeatureImportWizard_messages_folder_message);
+		String res = dialog.open();
+		return res != null ? new Path(res) : null;
+	}
+
+	private void validateDropLocation() {
+		String errorMessage = null;
+		if (isOtherLocation()) {
+			IPath curr = getDropLocation();
+			if (curr.segmentCount() == 0)
+				errorMessage = PDEUIMessages.FeatureImportWizard_errors_locationMissing;
+			else if (!Path.ROOT.isValidPath(fDropLocation.getText()))
+				errorMessage = PDEUIMessages.FeatureImportWizard_errors_buildFolderInvalid;
+			else {
+				File file = curr.toFile();
+				if (!file.exists() || !file.isDirectory())
+					errorMessage = PDEUIMessages.FeatureImportWizard_errors_buildFolderMissing;
+			}
+		}
+		setErrorMessage(errorMessage);
+		setPageComplete(errorMessage == null);
+	}
+
+	public boolean isBinary() {
+		return fBinaryButton.getSelection();
+	}
+
+	/**
+	 * Returns the drop location.
+	 */
+	public IPath getDropLocation() {
+		return new Path(fDropLocation.getText().trim());
+	}
+
+	public boolean isOtherLocation() {
+		return !fRuntimeLocationButton.getSelection();
+	}
+
+	private void handleReload() {
+		IFeatureModel[] models = getModels();
+		fFeatureViewer.setInput(models);
+		if (models != null) {
+			if (!fRuntimeLocationButton.getSelection()) {
+				String currItem = fDropLocation.getText();
+				if (models.length > 0 && fDropLocation.indexOf(currItem) == -1) {
+					fDropLocation.add(currItem, 0);
+					if (fDropLocation.getItemCount() > 6)
+						fDropLocation.remove(6);
+					storeSettings(false);
+				}
+
+				// When the models are loaded, the entire contents of the combo get selected.  This can easily lead to overwriting the contents so we instead select the end.
+				fDropLocation.setSelection(new Point(fDropLocation.getText().length(), fDropLocation.getText().length()));
+
+			}
+			fFeatureViewer.setCheckedElements(models);
+
+		}
+		updateCounter();
+		dialogChanged();
+	}
+
+	public void createFeatureTable(Composite parent) {
+		Composite container = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = layout.marginWidth = 0;
+		container.setLayout(layout);
+		GridData gd = new GridData(GridData.FILL_BOTH);
+		gd.verticalIndent = 5;
+		gd.heightHint = gd.widthHint = 300;
+		container.setLayoutData(gd);
+
+		PatternFilter filter = new PatternFilter();
+		filter.setIncludeLeadingWildcard(true);
+		FilteredCheckboxTree tree = new FilteredCheckboxTree(container, null, SWT.NONE, filter);
+		fFeatureViewer = tree.getCheckboxTreeViewer();
+		fFeatureViewer.setContentProvider(new ITreeContentProvider() {
+			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+			}
+
+			public void dispose() {
+			}
+
+			public Object[] getElements(Object inputElement) {
+				if (inputElement instanceof Object[]) {
+					return (Object[]) inputElement;
+				}
+				return new Object[0];
+			}
+
+			public boolean hasChildren(Object element) {
+				return false;
+			}
+
+			public Object getParent(Object element) {
+				return null;
+			}
+
+			public Object[] getChildren(Object parentElement) {
+				return new Object[0];
+			}
+		});
+		fFeatureViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
+		fFeatureViewer.setComparator(ListUtil.FEATURE_COMPARATOR);
+		fFeatureViewer.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				updateCounter();
+				dialogChanged();
+			}
+		});
+		fFeatureViewer.addDoubleClickListener(new IDoubleClickListener() {
+			public void doubleClick(DoubleClickEvent event) {
+				ISelection selection = fFeatureViewer.getSelection();
+				if (!selection.isEmpty()) {
+					Object selected = ((IStructuredSelection) selection).getFirstElement();
+					fFeatureViewer.setChecked(selected, !fFeatureViewer.getChecked(selected));
+					updateCounter();
+					dialogChanged();
+				}
+			}
+		});
+
+	}
+
+	private void updateCounter() {
+		int total = 0;
+		if (fModels != null) {
+			total = fModels.length;
+		}
+		int checked = fFeatureViewer.getCheckedLeafCount();
+		fCounterLabel.setText(NLS.bind(PDEUIMessages.WizardCheckboxTablePart_counter, new String[] {new Integer(checked).toString(), new Integer(total).toString()}));
+	}
+
+	public void dispose() {
+		super.dispose();
+		PDEPlugin.getDefault().getLabelProvider().disconnect(this);
+	}
+
+	public IFeatureModel[] getModels() {
+		final IPath home = getDropLocation();
+		final boolean useRuntimeLocation = fRuntimeLocationButton.getSelection() || getTargetHome().equals(fDropLocation.getText().trim());
+		IRunnableWithProgress runnable = new IRunnableWithProgress() {
+			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+				monitor.beginTask(PDEUIMessages.FeatureImportWizard_messages_updating, IProgressMonitor.UNKNOWN);
+				ArrayList result = new ArrayList();
+				if (useRuntimeLocation) {
+					IFeatureModel[] allModels = PDECore.getDefault().getFeatureModelManager().getModels();
+					for (int i = 0; i < allModels.length; i++)
+						if (allModels[i].getUnderlyingResource() == null)
+							result.add(allModels[i]);
+				} else {
+					MultiStatus errors = doLoadFeatures(result, createPath(home));
+					if (errors != null && errors.getChildren().length > 0)
+						PDEPlugin.log(errors);
+				}
+				fModels = (IFeatureModel[]) result.toArray(new IFeatureModel[result.size()]);
+				monitor.done();
+			}
+		};
+
+		IProgressService pservice = PlatformUI.getWorkbench().getProgressService();
+		try {
+			pservice.busyCursorWhile(runnable);
+		} catch (InvocationTargetException e) {
+		} catch (InterruptedException e) {
+		}
+		return fModels;
+	}
+
+	private File createPath(IPath dropLocation) {
+		File featuresDir = new File(dropLocation.toFile(), ICoreConstants.FEATURE_FOLDER_NAME);
+		if (featuresDir.exists())
+			return featuresDir;
+		return null;
+	}
+
+	private MultiStatus doLoadFeatures(ArrayList result, File path) {
+		if (path == null)
+			return null;
+		File[] dirs = path.listFiles();
+		if (dirs == null)
+			return null;
+		ArrayList resultStatus = new ArrayList();
+		for (int i = 0; i < dirs.length; i++) {
+			File dir = dirs[i];
+			if (dir.isDirectory()) {
+				File manifest = new File(dir, ICoreConstants.FEATURE_FILENAME_DESCRIPTOR);
+				if (manifest.exists()) {
+					IStatus status = doLoadFeature(dir, manifest, result);
+					if (status != null)
+						resultStatus.add(status);
+				}
+			}
+		}
+		return new MultiStatus(IPDEUIConstants.PLUGIN_ID, IStatus.OK, (IStatus[]) resultStatus.toArray(new IStatus[resultStatus.size()]), PDEUIMessages.FeatureImportWizard_DetailedPage_problemsLoading, null);
+	}
+
+	private IStatus doLoadFeature(File dir, File manifest, ArrayList result) {
+		ExternalFeatureModel model = new ExternalFeatureModel();
+		model.setInstallLocation(dir.getAbsolutePath());
+		IStatus status = null;
+
+		InputStream stream = null;
+
+		try {
+			stream = new BufferedInputStream(new FileInputStream(manifest));
+			model.load(stream, false);
+			if (!model.isValid()) {
+				status = new Status(IStatus.WARNING, IPDEUIConstants.PLUGIN_ID, IStatus.OK, NLS.bind(PDEUIMessages.FeatureImportWizardPage_importHasInvalid, dir), null);
+			}
+		} catch (Exception e) {
+			// Errors in the file
+			status = new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, IStatus.OK, e.getMessage(), e);
+		}
+		if (stream != null) {
+			try {
+				stream.close();
+			} catch (IOException e) {
+			}
+		}
+		if (status == null)
+			result.add(model);
+		return status;
+	}
+
+	public IFeatureModel[] getSelectedModels() {
+		Object[] selected = fFeatureViewer.getCheckedElements();
+		IFeatureModel[] result = new IFeatureModel[selected.length];
+		System.arraycopy(selected, 0, result, 0, selected.length);
+		return result;
+	}
+
+	private void dialogChanged() {
+		String message = null;
+		if (fFeatureViewer != null && (fModels == null || fModels.length == 0)) {
+			message = PDEUIMessages.FeatureImportWizard_messages_noFeatures;
+		}
+
+		setMessage(message, IMessageProvider.INFORMATION);
+		setPageComplete(fFeatureViewer.getCheckedLeafCount() > 0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
+	 */
+	public boolean isPageComplete() {
+		return fFeatureViewer.getCheckedLeafCount() > 0;
+	}
+
+	private void setLocation(String location) {
+		fSelfSetLocation = true;
+		fDropLocation.setText(location);
+		fSelfSetLocation = false;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java
new file mode 100644
index 0000000..47d0538
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/OverwriteProjectsSelectionDialog.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.imports;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.shared.CachedCheckboxTreeViewer;
+import org.eclipse.pde.internal.ui.shared.FilteredCheckboxTree;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+import org.eclipse.ui.ide.IDE;
+import org.osgi.framework.Version;
+
+/**
+ * This dialog expects a list of plug-in projects. It displays a filtered list to help 
+ * select the projects to be deleted during the import process.
+ * The returned results are the list of projects that shall be deleted.
+ * 
+ * @see PluginImportWizardDetailedPage
+ * @see PluginImportOperation
+ * @since 3.6
+ */
+public class OverwriteProjectsSelectionDialog extends SelectionStatusDialog {
+
+	private static final String ID = "id"; //$NON-NLS-1$
+
+	private class PluginContentProvider implements ITreeContentProvider {
+
+		public Object[] getChildren(Object parentElement) {
+			return new Object[0];
+		}
+
+		public Object getParent(Object element) {
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			return false;
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return (IPluginModelBase[]) inputElement;
+		}
+
+		public void dispose() {
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+
+	}
+
+	private class StyledPluginLabelProvider extends StyledCellLabelProvider implements ILabelProvider {
+
+		public Image getImage(Object element) {
+			return PlatformUI.getWorkbench().getSharedImages().getImage(IDE.SharedImages.IMG_OBJ_PROJECT);
+		}
+
+		public String getText(Object element) {
+			return getStyledText(element).getString();
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.StyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
+		 */
+		public void update(ViewerCell cell) {
+			StyledString string = getStyledText(cell.getElement());
+			cell.setText(string.getString());
+			cell.setStyleRanges(string.getStyleRanges());
+			cell.setImage(getImage(cell.getElement()));
+			super.update(cell);
+		}
+
+		private StyledString getStyledText(Object element) {
+			StyledString styledString = new StyledString();
+			IPluginModelBase plugin = (IPluginModelBase) element;
+			String symbolicName = plugin.getBundleDescription().getSymbolicName();
+			Version version = plugin.getBundleDescription().getVersion();
+			String versionString = String.valueOf(version.getMajor()) + '.' + String.valueOf(version.getMinor()) + '.' + String.valueOf(version.getMicro());
+			String projectName = plugin.getUnderlyingResource().getProject().getName();
+
+			styledString.append(projectName);
+			styledString.append(' ');
+			styledString.append('(', StyledString.DECORATIONS_STYLER);
+			styledString.append(symbolicName, StyledString.DECORATIONS_STYLER);
+			styledString.append(' ');
+			styledString.append(versionString, StyledString.DECORATIONS_STYLER);
+			styledString.append(')', StyledString.DECORATIONS_STYLER);
+
+			return styledString;
+		}
+
+	}
+
+	/**
+	 * Common listener for the Select All and Deselect All buttons
+	 */
+	private class ButtonSelectionListener extends SelectionAdapter {
+		public void widgetSelected(SelectionEvent e) {
+			String buttonID = (String) e.widget.getData(ID);
+			if (PDEUIMessages.DuplicatePluginResolutionDialog_selectAll.equals(buttonID)) {
+				fCheckboxTreeViewer.setAllChecked(true);
+			} else if (PDEUIMessages.DuplicatePluginResolutionDialog_deselectAll.equals(buttonID)) {
+				fCheckboxTreeViewer.setAllChecked(false);
+			}
+		}
+	}
+
+	private ArrayList fPluginProjectList;
+	private FilteredCheckboxTree fFilteredTree;
+	private CachedCheckboxTreeViewer fCheckboxTreeViewer;
+
+	/**
+	 * Constructor
+	 * @param parent shell to create this dialog on top of
+	 * @param plugins list of IPluginModelBase objects that have conflicts
+	 */
+	public OverwriteProjectsSelectionDialog(Shell parent, ArrayList plugins) {
+		super(parent);
+		setTitle(PDEUIMessages.PluginImportOperation_OverwritePluginProjects);
+		Assert.isNotNull(plugins);
+		fPluginProjectList = plugins;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.SelectionStatusDialog#configureShell(org.eclipse.swt.widgets.Shell)
+	 */
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IHelpContextIds.PLUGIN_IMPORT_OVERWRITE_DIALOG);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+	 */
+	protected void computeResult() {
+		java.util.List result = Arrays.asList(fCheckboxTreeViewer.getCheckedLeafElements());
+		setResult(result);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		Composite tableComposite = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH, 15, 15);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+		gd.heightHint = 400;
+		gd.widthHint = 500;
+		tableComposite.setLayoutData(gd);
+
+		if (fPluginProjectList != null && fPluginProjectList.size() == 1) {
+			setMessage(PDEUIMessages.DuplicatePluginResolutionDialog_messageSingular);
+		} else {
+			setMessage(PDEUIMessages.DuplicatePluginResolutionDialog_message);
+		}
+		SWTFactory.createWrapLabel(tableComposite, getMessage(), 1, 400);
+		SWTFactory.createVerticalSpacer(tableComposite, 1);
+		SWTFactory.createLabel(tableComposite, PDEUIMessages.OverwriteProjectsSelectionDialog_0, 1);
+
+		createTableArea(tableComposite);
+
+		Composite buttonComposite = SWTFactory.createComposite(tableComposite, 2, 1, GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END, 0, 5);
+		Button buttonSelectAll = SWTFactory.createPushButton(buttonComposite, PDEUIMessages.DuplicatePluginResolutionDialog_selectAll, null);
+		Button buttonDeselectAll = SWTFactory.createPushButton(buttonComposite, PDEUIMessages.DuplicatePluginResolutionDialog_deselectAll, null);
+		buttonSelectAll.addSelectionListener(new ButtonSelectionListener());
+		buttonSelectAll.setData(ID, PDEUIMessages.DuplicatePluginResolutionDialog_selectAll);
+		buttonDeselectAll.addSelectionListener(new ButtonSelectionListener());
+		buttonDeselectAll.setData(ID, PDEUIMessages.DuplicatePluginResolutionDialog_deselectAll);
+
+		return tableComposite;
+	}
+
+	private void createTableArea(Composite parent) {
+		fFilteredTree = new FilteredCheckboxTree(parent, null);
+		fFilteredTree.getPatternFilter().setIncludeLeadingWildcard(true);
+		fCheckboxTreeViewer = fFilteredTree.getCheckboxTreeViewer();
+		fCheckboxTreeViewer.setContentProvider(new PluginContentProvider());
+		fCheckboxTreeViewer.setLabelProvider(new StyledPluginLabelProvider());
+		fCheckboxTreeViewer.setUseHashlookup(true);
+		fCheckboxTreeViewer.setInput(fPluginProjectList.toArray(new IPluginModelBase[fPluginProjectList.size()]));
+		for (int i = 0; i < fPluginProjectList.size(); i++) {
+			fCheckboxTreeViewer.setChecked(fPluginProjectList.get(i), true);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportLabelProvider.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportLabelProvider.java
new file mode 100644
index 0000000..d2f9882
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportLabelProvider.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.imports;
+
+import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.ui.PDEPlugin;
+import org.eclipse.swt.graphics.Image;
+import org.osgi.framework.Version;
+
+/**
+ * Label provider for lists of plug-ins in the plug-in import wizard.  Uses images
+ * from the PDELabelProvider, but uses a styled string for the text to colour the 
+ * versions in a different colour.
+ * 
+ * @since 3.6
+ */
+public class PluginImportLabelProvider extends StyledCellLabelProvider implements ILabelProvider {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+	 */
+	public Image getImage(Object element) {
+		return PDEPlugin.getDefault().getLabelProvider().getImage(element);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+	 */
+	public String getText(Object element) {
+		return getStyledText(element).getString();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.StyledCellLabelProvider#update(org.eclipse.jface.viewers.ViewerCell)
+	 */
+	public void update(ViewerCell cell) {
+		StyledString string = getStyledText(cell.getElement());
+		cell.setText(string.getString());
+		cell.setStyleRanges(string.getStyleRanges());
+		cell.setImage(getImage(cell.getElement()));
+		super.update(cell);
+	}
+
+	private StyledString getStyledText(Object element) {
+		StyledString styledString = new StyledString();
+		if (element instanceof IPluginModelBase) {
+			IPluginModelBase plugin = (IPluginModelBase) element;
+			String symbolicName = plugin.getBundleDescription().getSymbolicName();
+			Version version = plugin.getBundleDescription().getVersion();
+			styledString.append(symbolicName);
+			styledString.append(' ');
+			styledString.append('(', StyledString.QUALIFIER_STYLER);
+			styledString.append(version.toString(), StyledString.QUALIFIER_STYLER);
+			styledString.append(')', StyledString.QUALIFIER_STYLER);
+			return styledString;
+		}
+		styledString.append(element.toString());
+		return styledString;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
index 70bcd61..b8c244c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,17 +13,14 @@ package org.eclipse.pde.internal.ui.wizards.imports;
 import java.io.File;
 import java.io.IOException;
 import java.util.*;
-import java.util.jar.JarFile;
+import java.util.Map.Entry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.util.ManifestElement;
 import org.eclipse.osgi.util.NLS;
@@ -34,13 +31,17 @@ import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
 import org.eclipse.pde.internal.core.bundle.WorkspaceBundleModel;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
+import org.eclipse.pde.internal.core.importing.IBundleImporter;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.team.core.RepositoryProvider;
 import org.eclipse.team.core.TeamException;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.*;
+import org.eclipse.ui.progress.UIJob;
 import org.eclipse.ui.wizards.datatransfer.*;
 import org.osgi.framework.BundleException;
 
@@ -54,17 +55,24 @@ public class PluginImportOperation extends WorkspaceJob {
 	public static final int IMPORT_BINARY = 1;
 	public static final int IMPORT_BINARY_WITH_LINKS = 2;
 	public static final int IMPORT_WITH_SOURCE = 3;
+	public static final int IMPORT_FROM_REPOSITORY = 4;
 
 	private static final String DEFAULT_SOURCE_DIR = "src"; //$NON-NLS-1$
 	private static final String DEFAULT_LIBRARY_NAME = "."; //$NON-NLS-1$
 
 	private IPluginModelBase[] fModels;
 	private int fImportType;
-	private ImportQuery fReplaceQuery;
-	private ImportQuery fExecutionQuery;
 	private Hashtable fProjectClasspaths = new Hashtable();
+
+	/**
+	 * Maps project ids to a List of IWorkingSets, the map is filled when determining what projects to delete
+	 */
+	private Map fProjectWorkingSets = new HashMap();
 	private boolean fForceAutobuild;
 
+	// used when importing from a repository
+	private Map fImportDescriptions;
+
 	/**
 	 * Used to find source locations when not found in default locations.
 	 * Possibly <code>null</code>
@@ -85,8 +93,6 @@ public class PluginImportOperation extends WorkspaceJob {
 		super(PDEUIMessages.ImportWizard_title);
 		fModels = models;
 		fImportType = importType;
-		fReplaceQuery = new ImportQuery();
-		fExecutionQuery = new ImportQuery();
 		fForceAutobuild = forceAutobuild;
 	}
 
@@ -116,30 +122,47 @@ public class PluginImportOperation extends WorkspaceJob {
 	 */
 	public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
 		try {
-			monitor.beginTask(PDEUIMessages.ImportWizard_operation_creating, fModels.length + 1);
+
+			monitor.beginTask("", fModels.length + 5); //$NON-NLS-1$
 			MultiStatus multiStatus = new MultiStatus(PDEPlugin.getPluginId(), IStatus.OK, PDEUIMessages.ImportWizard_operation_multiProblem, null);
 
-			for (int i = 0; i < fModels.length; i++) {
-				monitor.setTaskName(NLS.bind(PDEUIMessages.PluginImportOperation_Importing_plugin, fModels[i].getPluginBase().getId()));
-				try {
-					importPlugin(fModels[i], fImportType, new SubProgressMonitor(monitor, 1));
-				} catch (CoreException e) {
-					multiStatus.merge(e.getStatus());
+			deleteConflictingProjects(new SubProgressMonitor(monitor, 2));
+			if (monitor.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+			// TODO: more than one importer
+
+			if (fImportType == IMPORT_FROM_REPOSITORY) {
+				Iterator iterator = fImportDescriptions.entrySet().iterator();
+				while (iterator.hasNext()) {
+					Entry entry = (Entry) iterator.next();
+					IBundleImporter importer = (IBundleImporter) entry.getKey();
+					BundleImportDescription[] descriptions = (BundleImportDescription[]) entry.getValue();
+					importer.performImport(descriptions, new SubProgressMonitor(monitor, descriptions.length));
 				}
-				if (monitor.isCanceled()) {
+			} else {
+				for (int i = 0; i < fModels.length; i++) {
+					monitor.setTaskName(NLS.bind(PDEUIMessages.PluginImportOperation_Importing_plugin, fModels[i].getPluginBase().getId()));
 					try {
-						setClasspaths(new SubProgressMonitor(monitor, 1));
-					} catch (JavaModelException e) {
-						/* Do nothing as we are already cancelled */
+						importPlugin(fModels[i], fImportType, new SubProgressMonitor(monitor, 1));
+					} catch (CoreException e) {
+						multiStatus.merge(e.getStatus());
+					}
+					if (monitor.isCanceled()) {
+						try {
+							setClasspaths(new SubProgressMonitor(monitor, 3));
+						} catch (JavaModelException e) {
+							/* Do nothing as we are already cancelled */
+						}
+						return Status.CANCEL_STATUS;
 					}
-					return Status.CANCEL_STATUS;
 				}
-			}
-			monitor.setTaskName(PDEUIMessages.PluginImportOperation_Set_up_classpaths);
-			try {
-				setClasspaths(new SubProgressMonitor(monitor, 1));
-			} catch (JavaModelException e) {
-				multiStatus.merge(e.getStatus());
+				monitor.setTaskName(PDEUIMessages.PluginImportOperation_Set_up_classpaths);
+				try {
+					setClasspaths(new SubProgressMonitor(monitor, 1));
+				} catch (JavaModelException e) {
+					multiStatus.merge(e.getStatus());
+				}
 			}
 			if (!ResourcesPlugin.getWorkspace().isAutoBuilding() && fForceAutobuild)
 				runBuildJob();
@@ -150,6 +173,117 @@ public class PluginImportOperation extends WorkspaceJob {
 	}
 
 	/**
+	 * If there are existing projects in the workspace with the same sybmolic name, open a dialog
+	 * asking the user if they would like to delete those projects.  The projects are deleted before
+	 * the import continues so the individual imports can do a simple search for an allowed plug-in name.
+	 * 
+	 * @param monitor progress monitor, must not be null
+	 */
+	private void deleteConflictingProjects(IProgressMonitor monitor) throws CoreException {
+		monitor.beginTask("", 5); //$NON-NLS-1$
+		try {
+			IPluginModelBase[] workspacePlugins = PluginRegistry.getWorkspaceModels();
+			HashMap workspacePluginMap = new HashMap();
+			for (int i = 0; i < workspacePlugins.length; i++) {
+				IPluginModelBase plugin = workspacePlugins[i];
+				if (plugin.getBundleDescription() != null) {
+					String symbolicName = plugin.getBundleDescription().getSymbolicName();
+					ArrayList pluginsWithSameSymbolicName = (ArrayList) workspacePluginMap.get(symbolicName);
+					if (pluginsWithSameSymbolicName == null) {
+						pluginsWithSameSymbolicName = new ArrayList();
+						workspacePluginMap.put(symbolicName, pluginsWithSameSymbolicName);
+					}
+					pluginsWithSameSymbolicName.add(plugin);
+				}
+			}
+			monitor.worked(1);
+
+			final ArrayList conflictingPlugins = new ArrayList();
+			for (int i = 0; i < fModels.length; i++) {
+				if (fModels[i].getBundleDescription() == null) {
+					continue;
+				}
+				String symbolicName = fModels[i].getBundleDescription().getSymbolicName();
+				ArrayList plugins = (ArrayList) workspacePluginMap.get(symbolicName);
+				if (plugins == null || plugins.size() == 0) {
+					continue;
+				}
+				if (!conflictingPlugins.containsAll(plugins)) {
+					conflictingPlugins.addAll(plugins);
+				}
+			}
+			monitor.worked(1);
+
+			final ArrayList overwriteProjectList = new ArrayList();
+			if (conflictingPlugins.size() > 0) {
+
+				UIJob job = new UIJob(PDEUIMessages.PluginImportOperation_OverwritePluginProjects) {
+
+					public IStatus runInUIThread(IProgressMonitor monitor) {
+						OverwriteProjectsSelectionDialog dialog = new OverwriteProjectsSelectionDialog(getDisplay().getActiveShell(), conflictingPlugins);
+						dialog.setBlockOnOpen(true);
+						if (dialog.open() == Window.OK) {
+							overwriteProjectList.addAll(Arrays.asList(dialog.getResult()));
+							return Status.OK_STATUS;
+						}
+						return Status.CANCEL_STATUS;
+					}
+				};
+
+				try {
+					job.schedule();
+					job.join();
+				} catch (InterruptedException e1) {
+				}
+
+				if (job.getResult() == null || !job.getResult().isOK()) {
+					monitor.setCanceled(true);
+					return;
+				}
+				monitor.worked(1);
+
+				// collect working set information
+				IWorkingSetManager wsManager = PlatformUI.getWorkbench().getWorkingSetManager();
+				IWorkingSet[] sets = wsManager.getAllWorkingSets();
+				for (int i = 0; i < sets.length; i++) {
+					IAdaptable[] contents = sets[i].getElements();
+					for (int j = 0; j < contents.length; j++) {
+						IResource resource = (IResource) contents[j].getAdapter(IResource.class);
+						if (resource instanceof IProject) {
+							// TODO For now just list everything in the map
+							String id = ((IProject) resource).getName();
+							List workingSets = (List) fProjectWorkingSets.get(id);
+							if (workingSets == null) {
+								workingSets = new ArrayList();
+								fProjectWorkingSets.put(id, workingSets);
+							}
+							workingSets.add(sets[i]);
+						}
+					}
+				}
+
+				//delete the selected projects
+				for (int i = 0; i < overwriteProjectList.size(); i++) {
+					IPluginModelBase plugin = (IPluginModelBase) overwriteProjectList.get(i);
+					monitor.setTaskName(NLS.bind(PDEUIMessages.PluginImportOperation_Importing_plugin, plugin.getPluginBase().getId()));
+					IProject project = plugin.getUnderlyingResource().getProject();
+					if (RepositoryProvider.isShared(project))
+						RepositoryProvider.unmap(project);
+					if (!safeDeleteCheck(project, monitor)) {
+						throw new CoreException(new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.PluginImportOperation_could_not_delete_project, project.getName())));
+					}
+					project.delete(true, true, monitor);
+				}
+				monitor.worked(2);
+			} else {
+				monitor.worked(3);
+			}
+		} finally {
+			monitor.done();
+		}
+	}
+
+	/**
 	 * Sets the raw classpath of projects that need to be updated
 	 * @param monitor
 	 * @throws JavaModelException if a classpath could not be set
@@ -174,6 +308,7 @@ public class PluginImportOperation extends WorkspaceJob {
 	 * environment is supported and also checks if the project already exists and 
 	 * needs to be replaced.
 	 * @param model model representing the plugin to import
+	 * @param instructions instructions for how to import from repository
 	 * @param monitor progress monitor
 	 * @throws CoreException if a problem occurs while importing a plugin
 	 */
@@ -181,11 +316,6 @@ public class PluginImportOperation extends WorkspaceJob {
 		try {
 			monitor.beginTask("", 5); //$NON-NLS-1$
 
-			// Test is the required execution environment is supported
-			if (!testExecutionEnvironment(model)) {
-				return;
-			}
-
 			// Create the project or ask to overwrite if project exists
 			IProject project = createProject(model, new SubProgressMonitor(monitor, 1));
 			if (project == null) {
@@ -193,6 +323,7 @@ public class PluginImportOperation extends WorkspaceJob {
 			}
 
 			// Target Weaving: if we are importing plug-ins in the runtime workbench from the host workbench, import everything as-is and return
+			// Target weaving will also break things when importing from a non-default target because the dev.properties changes the libraries to 'bin/' see bug 294005
 			if (Platform.inDevelopmentMode()) {
 				File location = new File(model.getInstallLocation());
 				if (location.isDirectory()) {
@@ -321,7 +452,7 @@ public class PluginImportOperation extends WorkspaceJob {
 			monitor.beginTask("", 4); //$NON-NLS-1$
 
 			// Extract the source, track build entries and package locations
-			WorkspaceBuildModel buildModel = new WorkspaceBuildModel(project.getFile("build.properties")); //$NON-NLS-1$
+			WorkspaceBuildModel buildModel = new WorkspaceBuildModel(PDEProject.getBuildProperties(project));
 			Map packageLocations = new HashMap(); // maps package path to a src folder 
 			boolean sourceFound = extractSourceFolders(project, model, buildModel, packageLocations, new SubProgressMonitor(monitor, 1));
 			// If no source was found previously, check if there was a source folder (src) inside the binary plug-in
@@ -399,26 +530,46 @@ public class PluginImportOperation extends WorkspaceJob {
 			monitor.beginTask("", 2); //$NON-NLS-1$
 			IProject project = findProject(model.getPluginBase().getId());
 			if (project.exists() || new File(project.getParent().getLocation().toFile(), project.getName()).exists()) {
-				// Query the user to see if we should overwrite
-				switch (fReplaceQuery.doQuery(NLS.bind(PDEUIMessages.ImportWizard_messages_exists, project.getName()))) {
-					case IDialogConstants.CANCEL_ID :
-						throw new OperationCanceledException();
-					case IDialogConstants.NO_ID :
-						return null;
-				}
-				if (RepositoryProvider.isShared(project))
-					RepositoryProvider.unmap(project);
-				if (!project.exists())
-					project.create(new SubProgressMonitor(monitor, 1));
-				if (!safeDeleteCheck(project, monitor)) {
-					throw new CoreException(new Status(IStatus.ERROR, PDEPlugin.getPluginId(), NLS.bind(PDEUIMessages.PluginImportOperation_could_not_delete_project, project.getName())));
+
+				project = PDEPlugin.getWorkspace().getRoot().getProject(model.getPluginBase().getId());
+				if (project.exists()) {
+					File installLocation = new File(model.getInstallLocation());
+					String projectName = installLocation.getName();
+					int jarIndex = projectName.toLowerCase().lastIndexOf(".jar"); //$NON-NLS-1$
+					if (jarIndex >= 0) {
+						projectName = projectName.substring(0, jarIndex);
+					}
+					project = PDEPlugin.getWorkspace().getRoot().getProject(projectName);
+					int index = 0;
+					while (project.exists() == true) {
+						index++;
+						project = PDEPlugin.getWorkspace().getRoot().getProject(projectName + '_' + index);
+					}
 				}
-				project.delete(true, true, monitor);
 			}
 
 			project.create(monitor);
 			if (!project.isOpen())
 				project.open(monitor);
+
+			// If we know that a previous project of the same name belonged to one or more working sets, add the new project to them
+			List workingSets = (List) fProjectWorkingSets.get(project.getName());
+			if (workingSets != null) {
+				for (Iterator iterator = workingSets.iterator(); iterator.hasNext();) {
+					IWorkingSet ws = (IWorkingSet) iterator.next();
+					IAdaptable newElement = project;
+					IAdaptable[] projectAdaptables = ws.adaptElements(new IAdaptable[] {project});
+					if (projectAdaptables.length > 0) {
+						newElement = projectAdaptables[0];
+					}
+					IAdaptable[] currentElements = ws.getElements();
+					IAdaptable[] newElements = new IAdaptable[currentElements.length + 1];
+					System.arraycopy(currentElements, 0, newElements, 0, currentElements.length);
+					newElements[currentElements.length] = newElement;
+					ws.setElements(newElements);
+				}
+			}
+
 			monitor.worked(1);
 
 			return project;
@@ -432,8 +583,9 @@ public class PluginImportOperation extends WorkspaceJob {
 		IPluginModelBase model = PluginRegistry.findModel(id);
 		if (model != null) {
 			IResource resource = model.getUnderlyingResource();
-			if (resource != null)
+			if (resource != null && resource.exists()) {
 				return resource.getProject();
+			}
 		}
 		return PDEPlugin.getWorkspace().getRoot().getProject(id);
 	}
@@ -472,23 +624,11 @@ public class PluginImportOperation extends WorkspaceJob {
 	 * @return true if source was found for at least one library, false otherwise
 	 */
 	private boolean canFindSource(IPluginModelBase model) {
-		SourceLocationManager manager = PDECore.getDefault().getSourceLocationManager();
-
-		// Check for a source bundle
-		if (manager.hasBundleManifestLocation(model.getPluginBase())) {
+		// Check the manager(s) for source
+		if (getSourceManager(model) != null) {
 			return true;
 		}
 
-		// Check for an old style source plug-in
-		String[] libraries = getLibraryNames(model);
-		for (int i = 0; i < libraries.length; i++) {
-			String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
-			IPath srcPath = manager.findSourcePath(model.getPluginBase(), new Path(zipName));
-			if (srcPath != null) {
-				return true;
-			}
-		}
-
 		// Check for source inside the binary plug-in
 		ZipFile zip = null;
 		try {
@@ -524,34 +664,52 @@ public class PluginImportOperation extends WorkspaceJob {
 	}
 
 	/**
-	 * Tests whether the required execution environment of the given plugin is supported by
-	 * the current known JREs.  If not, ask the user whether to continue.
-	 * @param model the plug-in model to test
-	 * @return true is the import should continue, false if the plug-in should be skipped
-	 * @throws OperationCanceledException if the user chooses to cancel the operation
+	 * Should be used inside this class rather than PDEPlugin.getSourceLocationManager as it checks if the alternate
+	 * source manager has source for the given plug-in.  The alternate source manager is set if we are importing from
+	 * a location other than the active target platform.  In that case we want to use source from the import location
+	 * if available.  If this method returns <code>null</code> no seperate source feature/bundle could be found.  There
+	 * may still be source stored internally in the plug-in.
+	 * 
+	 * @return the most relevant source manager than contains source for the plug-in or <code>null</code> if no separate source could be found
 	 */
-	private boolean testExecutionEnvironment(IPluginModelBase model) throws OperationCanceledException {
-		BundleDescription desc = model.getBundleDescription();
-		if (desc != null) {
-			IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
-			String[] envs = desc.getExecutionEnvironments();
-			boolean found = false;
-			for (int i = 0; i < envs.length; i++) {
-				if (manager.getEnvironment(envs[i]) != null) {
-					found = true;
-					break;
-				}
+	private SourceLocationManager getSourceManager(IPluginModelBase model) {
+		// Check the alternate source manager first
+		if (fAlternateSource != null) {
+			// Check for a source bundle
+			if (fAlternateSource.hasBundleManifestLocation(model.getPluginBase())) {
+				return fAlternateSource;
 			}
-			if (envs.length > 0 && !found) {
-				switch (fExecutionQuery.doQuery(NLS.bind(PDEUIMessages.PluginImportOperation_executionEnvironment, model.getPluginBase().getId(), envs[0]))) {
-					case IDialogConstants.CANCEL_ID :
-						throw new OperationCanceledException();
-					case IDialogConstants.NO_ID :
-						return false;
+
+			// Check for an old style source plug-in
+			String[] libraries = getLibraryNames(model);
+			for (int i = 0; i < libraries.length; i++) {
+				String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
+				IPath srcPath = fAlternateSource.findSourcePath(model.getPluginBase(), new Path(zipName));
+				if (srcPath != null) {
+					return fAlternateSource;
 				}
 			}
 		}
-		return true;
+
+		// Check the pde default source manager second
+		SourceLocationManager manager = PDECore.getDefault().getSourceLocationManager();
+
+		// Check for a source bundle
+		if (manager.hasBundleManifestLocation(model.getPluginBase())) {
+			return manager;
+		}
+
+		// Check for an old style source plug-in
+		String[] libraries = getLibraryNames(model);
+		for (int i = 0; i < libraries.length; i++) {
+			String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
+			IPath srcPath = manager.findSourcePath(model.getPluginBase(), new Path(zipName));
+			if (srcPath != null) {
+				return manager;
+			}
+		}
+
+		return null;
 	}
 
 	/**
@@ -613,26 +771,24 @@ public class PluginImportOperation extends WorkspaceJob {
 			monitor.beginTask(PDEUIMessages.ImportWizard_operation_importingSource, libraries.length);
 
 			Map sourceMap = new HashMap(libraries.length);
-			SourceLocationManager manager = PDECore.getDefault().getSourceLocationManager();
-			for (int i = 0; i < libraries.length; i++) {
-				String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
-				IPluginBase pluginBase = model.getPluginBase();
-				// check default locations
-				IPath srcPath = manager.findSourcePath(pluginBase, new Path(zipName));
-				// check alternate locations
-				if (srcPath == null && fAlternateSource != null) {
-					srcPath = fAlternateSource.findSourcePath(pluginBase, new Path(zipName));
-				}
-				if (srcPath != null) {
-					zipName = srcPath.lastSegment();
-					IPath dstPath = new Path(zipName);
-					sourceMap.put(libraries[i], dstPath);
-					if (project.findMember(dstPath) == null) {
-						if (mode == IMPORT_BINARY) {
-							PluginImportHelper.copyArchive(new File(srcPath.toOSString()), project.getFile(dstPath), new SubProgressMonitor(monitor, 1));
-						} else if (mode == IMPORT_BINARY_WITH_LINKS) {
-							IFile dstFile = project.getFile(dstPath);
-							dstFile.createLink(srcPath, IResource.NONE, new SubProgressMonitor(monitor, 1));
+			SourceLocationManager manager = getSourceManager(model);
+			if (manager != null) {
+				for (int i = 0; i < libraries.length; i++) {
+					String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
+					IPluginBase pluginBase = model.getPluginBase();
+					// check default locations
+					IPath srcPath = manager.findSourcePath(pluginBase, new Path(zipName));
+					if (srcPath != null) {
+						zipName = srcPath.lastSegment();
+						IPath dstPath = new Path(zipName);
+						sourceMap.put(libraries[i], dstPath);
+						if (project.findMember(dstPath) == null) {
+							if (mode == IMPORT_BINARY) {
+								PluginImportHelper.copyArchive(new File(srcPath.toOSString()), project.getFile(dstPath), new SubProgressMonitor(monitor, 1));
+							} else if (mode == IMPORT_BINARY_WITH_LINKS) {
+								IFile dstFile = project.getFile(dstPath);
+								dstFile.createLink(srcPath, IResource.NONE, new SubProgressMonitor(monitor, 1));
+							}
 						}
 					}
 				}
@@ -660,64 +816,67 @@ public class PluginImportOperation extends WorkspaceJob {
 			String[] libraries = getLibraryNames(model);
 			monitor.beginTask(PDEUIMessages.ImportWizard_operation_importingSource, libraries.length);
 
-			SourceLocationManager manager = PDECore.getDefault().getSourceLocationManager();
-
-			// Check if we have new style individual source bundles
-			if (manager.hasBundleManifestLocation(model.getPluginBase())) {
-				File srcFile = manager.findSourcePlugin(model.getPluginBase());
-				Set sourceRoots = manager.findSourceRoots(model.getPluginBase());
-				for (int i = 0; i < libraries.length; i++) {
-					if (libraries[i].equals(DEFAULT_LIBRARY_NAME)) {
-						// Need to pull out any java source that is not in another source root
-						IResource destination = project.getFolder(DEFAULT_SOURCE_DIR);
-						if (!destination.exists()) {
-							List excludeFolders = new ArrayList(sourceRoots.size());
-							for (Iterator iterator = sourceRoots.iterator(); iterator.hasNext();) {
-								String root = (String) iterator.next();
-								if (!root.equals(DEFAULT_LIBRARY_NAME)) {
-									excludeFolders.add(new Path(root));
+			SourceLocationManager manager = getSourceManager(model);
+			if (manager != null) {
+
+				// Check if we have new style individual source bundles
+				if (manager.hasBundleManifestLocation(model.getPluginBase())) {
+					File srcFile = manager.findSourcePlugin(model.getPluginBase());
+					Set sourceRoots = manager.findSourceRoots(model.getPluginBase());
+					for (int i = 0; i < libraries.length; i++) {
+						if (libraries[i].equals(DEFAULT_LIBRARY_NAME)) {
+							// Need to pull out any java source that is not in another source root
+							IResource destination = project.getFolder(DEFAULT_SOURCE_DIR);
+							if (!destination.exists()) {
+								List excludeFolders = new ArrayList(sourceRoots.size());
+								for (Iterator iterator = sourceRoots.iterator(); iterator.hasNext();) {
+									String root = (String) iterator.next();
+									if (!root.equals(DEFAULT_LIBRARY_NAME)) {
+										excludeFolders.add(new Path(root));
+									}
 								}
-							}
-							Set collectedPackages = new HashSet();
-							PluginImportHelper.extractJavaSourceFromArchive(srcFile, excludeFolders, destination.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
-							addBuildEntry(buildModel, "source." + DEFAULT_LIBRARY_NAME, DEFAULT_SOURCE_DIR + "/"); //$NON-NLS-1$ //$NON-NLS-2$
-							addPackageEntries(collectedPackages, new Path(DEFAULT_SOURCE_DIR), packageLocations);
+								Set collectedPackages = new HashSet();
+								PluginImportHelper.extractJavaSourceFromArchive(srcFile, excludeFolders, destination.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
+								addBuildEntry(buildModel, "source." + DEFAULT_LIBRARY_NAME, DEFAULT_SOURCE_DIR + "/"); //$NON-NLS-1$ //$NON-NLS-2$
+								addPackageEntries(collectedPackages, new Path(DEFAULT_SOURCE_DIR), packageLocations);
 
-						}
-					} else if (sourceRoots.contains(getSourceDirName(libraries[i]))) {
-						IPath sourceDir = new Path(getSourceDirName(libraries[i]));
-						if (!project.getFolder(sourceDir).exists()) {
-							Set collectedPackages = new HashSet();
-							PluginImportHelper.extractFolderFromArchive(srcFile, sourceDir, project.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
-							addBuildEntry(buildModel, "source." + libraries[i], sourceDir.toString()); //$NON-NLS-1$
-							addPackageEntries(collectedPackages, sourceDir, packageLocations);
+							}
+						} else if (sourceRoots.contains(getSourceDirName(libraries[i]))) {
+							IPath sourceDir = new Path(getSourceDirName(libraries[i]));
+							if (!project.getFolder(sourceDir).exists()) {
+								Set collectedPackages = new HashSet();
+								PluginImportHelper.extractFolderFromArchive(srcFile, sourceDir, project.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
+								addBuildEntry(buildModel, "source." + libraries[i], sourceDir.toString()); //$NON-NLS-1$
+								addPackageEntries(collectedPackages, sourceDir, packageLocations);
+							}
 						}
 					}
+					return true;
 				}
-				return true;
-			}
 
-			// Old style, zips in folders, determine the source zip name/location and extract it to the project
-			boolean sourceFound = false;
-			for (int i = 0; i < libraries.length; i++) {
-				String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
-				IPath srcPath = manager.findSourcePath(model.getPluginBase(), new Path(zipName));
-				if (srcPath != null) {
-					sourceFound = true;
-					IPath dstPath = new Path(getSourceDirName(libraries[i]));
-					IResource destination = project.getFolder(dstPath);
-					if (!destination.exists()) {
-						Set collectedPackages = new HashSet();
-						PluginImportHelper.extractArchive(new File(srcPath.toOSString()), destination.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
-						addBuildEntry(buildModel, "source." + libraries[i], dstPath.toString()); //$NON-NLS-1$
-						addPackageEntries(collectedPackages, dstPath, packageLocations);
+				// Old style, zips in folders, determine the source zip name/location and extract it to the project
+				boolean sourceFound = false;
+				for (int i = 0; i < libraries.length; i++) {
+					String zipName = ClasspathUtilCore.getSourceZipName(libraries[i]);
+					IPath srcPath = manager.findSourcePath(model.getPluginBase(), new Path(zipName));
+					if (srcPath != null) {
+						sourceFound = true;
+						IPath dstPath = new Path(getSourceDirName(libraries[i]));
+						IResource destination = project.getFolder(dstPath);
+						if (!destination.exists()) {
+							Set collectedPackages = new HashSet();
+							PluginImportHelper.extractArchive(new File(srcPath.toOSString()), destination.getFullPath(), collectedPackages, new SubProgressMonitor(monitor, 1));
+							addBuildEntry(buildModel, "source." + libraries[i], dstPath.toString()); //$NON-NLS-1$
+							addPackageEntries(collectedPackages, dstPath, packageLocations);
+						}
 					}
 				}
+				return sourceFound;
 			}
-			return sourceFound;
 		} finally {
 			monitor.done();
 		}
+		return false;
 	}
 
 	/**
@@ -737,33 +896,37 @@ public class PluginImportOperation extends WorkspaceJob {
 	private boolean handleInternalSource(IPluginModelBase model, WorkspaceBuildModel buildModel, Map packageLocations) throws CoreException, ZipException, IOException {
 		IImportStructureProvider provider;
 		Object root;
-
+		IPath prefixPath;
+		IPath defaultSourcePath = new Path(DEFAULT_SOURCE_DIR);
 		ZipFile zip = null;
 		try {
 			if (isJARd(model)) {
 				zip = new ZipFile(new File(model.getInstallLocation()));
 				provider = new ZipFileStructureProvider(zip);
 				root = ((ZipFileStructureProvider) provider).getRoot();
+				prefixPath = defaultSourcePath;
 			} else {
 				provider = FileSystemStructureProvider.INSTANCE;
-				root = new File(model.getInstallLocation());
+				File rootFile = new File(model.getInstallLocation());
+				root = rootFile;
+				prefixPath = new Path(rootFile.getPath()).append(defaultSourcePath);
 			}
-			IPath defaultSourcePath = new Path(DEFAULT_SOURCE_DIR);
+
 			ArrayList collected = new ArrayList();
 			PluginImportHelper.collectResourcesFromFolder(provider, root, defaultSourcePath, collected);
 			if (collected.size() > 0) {
 				Set packages = new HashSet();
-				PluginImportHelper.collectJavaPackages(provider, collected, defaultSourcePath, packages);
+				PluginImportHelper.collectJavaPackages(provider, collected, prefixPath, packages);
 				addPackageEntries(packages, defaultSourcePath, packageLocations);
 				addBuildEntry(buildModel, "source." + DEFAULT_LIBRARY_NAME, DEFAULT_SOURCE_DIR + "/"); //$NON-NLS-1$ //$NON-NLS-2$
 				return true;
 			}
+			return false;
 		} finally {
 			if (zip != null) {
 				zip.close();
 			}
 		}
-		return false;
 	}
 
 	/**
@@ -800,31 +963,34 @@ public class PluginImportOperation extends WorkspaceJob {
 	 * @throws CoreException is there is a problem importing the files
 	 */
 	private void importAdditionalSourceFiles(IProject project, IPluginModelBase model, SubProgressMonitor monitor) throws CoreException {
-		File sourceLocation = PDECore.getDefault().getSourceLocationManager().findSourcePlugin(model.getPluginBase());
-		if (sourceLocation != null) {
-			if (sourceLocation.isFile()) {
-				ZipFile zip = null;
-				try {
-					zip = new ZipFile(sourceLocation);
-					ZipFileStructureProvider provider = new ZipFileStructureProvider(zip);
-					ArrayList collected = new ArrayList();
-					PluginImportHelper.collectNonJavaNonBuildFiles(provider, provider.getRoot(), collected);
-					PluginImportHelper.importContent(provider.getRoot(), project.getFullPath(), provider, collected, monitor);
-				} catch (IOException e) {
-					IStatus status = new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, e.getMessage(), e);
-					throw new CoreException(status);
-				} finally {
-					if (zip != null) {
-						try {
-							zip.close();
-						} catch (IOException e) {
+		SourceLocationManager manager = getSourceManager(model);
+		if (manager != null) {
+			File sourceLocation = manager.findSourcePlugin(model.getPluginBase());
+			if (sourceLocation != null) {
+				if (sourceLocation.isFile()) {
+					ZipFile zip = null;
+					try {
+						zip = new ZipFile(sourceLocation);
+						ZipFileStructureProvider provider = new ZipFileStructureProvider(zip);
+						ArrayList collected = new ArrayList();
+						PluginImportHelper.collectNonJavaNonBuildFiles(provider, provider.getRoot(), collected);
+						PluginImportHelper.importContent(provider.getRoot(), project.getFullPath(), provider, collected, monitor);
+					} catch (IOException e) {
+						IStatus status = new Status(IStatus.ERROR, PDEPlugin.getPluginId(), IStatus.ERROR, e.getMessage(), e);
+						throw new CoreException(status);
+					} finally {
+						if (zip != null) {
+							try {
+								zip.close();
+							} catch (IOException e) {
+							}
 						}
 					}
+				} else {
+					ArrayList collected = new ArrayList();
+					PluginImportHelper.collectNonJavaNonBuildFiles(FileSystemStructureProvider.INSTANCE, sourceLocation, collected);
+					PluginImportHelper.importContent(sourceLocation, project.getFullPath(), FileSystemStructureProvider.INSTANCE, collected, monitor);
 				}
-			} else {
-				ArrayList collected = new ArrayList();
-				PluginImportHelper.collectNonJavaNonBuildFiles(FileSystemStructureProvider.INSTANCE, sourceLocation, collected);
-				PluginImportHelper.importContent(sourceLocation, project.getFullPath(), FileSystemStructureProvider.INSTANCE, collected, monitor);
 			}
 		}
 	}
@@ -936,7 +1102,7 @@ public class PluginImportOperation extends WorkspaceJob {
 	 * @param base
 	 */
 	private void modifyBundleClasspathHeader(IProject project, IPluginModelBase base) {
-		IFile file = project.getFile(JarFile.MANIFEST_NAME);
+		IFile file = PDEProject.getManifest(project);
 		if (file.exists()) {
 			WorkspaceBundleModel bmodel = new WorkspaceBundleModel(file);
 			IBundle bundle = bmodel.getBundle();
@@ -981,7 +1147,7 @@ public class PluginImportOperation extends WorkspaceJob {
 		}
 
 		// If the build.properties file has a default source folder we need a java nature
-		IFile buildProperties = project.getFile("build.properties"); //$NON-NLS-1$
+		IFile buildProperties = PDEProject.getBuildProperties(project);
 		if (buildProperties.exists()) {
 			WorkspaceBuildModel buildModel = new WorkspaceBuildModel(buildProperties);
 			buildModel.load();
@@ -1010,6 +1176,10 @@ public class PluginImportOperation extends WorkspaceJob {
 	/**
 	 * Gets the list of libraries from the model and returns an array of their expanded
 	 * names.  Will add the default library name if no libraries are specified.
+	 * 
+	 * <p>If run in dev mode (target workbench), and the plug-in is in the host workspace
+	 * the library names will be replaced with 'bin/'.  See bug 294005.</p>
+	 * 
 	 * @param model
 	 * @return list of library names
 	 */
@@ -1045,45 +1215,13 @@ public class PluginImportOperation extends WorkspaceJob {
 		return new File(model.getInstallLocation()).isFile();
 	}
 
-	private static class ImportQuery {
-		// If 0, ask the user in a dialog, if -1 users has chosen no to all, if +1 user has chosen yes to all
-		private int fCreateDialog = 0;
-
-		/**
-		 * @return returns one of IDialogConstants.YES_ID, IDialogConstants.NO_ID, IDialogConstants.CANCEL_ID
-		 */
-		public int doQuery(final String message) {
-			if (fCreateDialog > 0) {
-				return IDialogConstants.YES_ID;
-			}
-			if (fCreateDialog < 0) {
-				return IDialogConstants.NO_ID;
-			}
-
-			final int[] result = {IDialogConstants.CANCEL_ID};
-
-			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), PDEUIMessages.ImportWizard_messages_title, null, message, MessageDialog.QUESTION, new String[] {IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.NO_TO_ALL_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
-					result[0] = dialog.open();
-				}
-			});
-
-			switch (result[0]) {
-				case 0 :
-					return IDialogConstants.YES_ID;
-				case 1 :
-					fCreateDialog = +1;
-					return IDialogConstants.YES_ID;
-				case 2 :
-					return IDialogConstants.NO_ID;
-				case 3 :
-					fCreateDialog = -1;
-					return IDialogConstants.NO_ID;
-				default :
-					return IDialogConstants.CANCEL_ID;
-			}
-		}
+	/**
+	 * Sets the import descriptions to use when importing from a repository.
+	 * 
+	 * @param descriptions map of {@link IBundleImporter} to arrays of {@link BundleImportDescription}.
+	 */
+	public void setImportDescriptions(Map descriptions) {
+		fImportDescriptions = descriptions;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizard.java
index 3287465..90269aa 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,18 +16,19 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.*;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.*;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.internal.core.SourceLocationManager;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IImportWizard;
 import org.eclipse.ui.IWorkbench;
 
-public class PluginImportWizard extends Wizard implements IImportWizard {
+public class PluginImportWizard extends Wizard implements IImportWizard, IPageChangingListener {
 
 	private static final String STORE_SECTION = "PluginImportWizard"; //$NON-NLS-1$
 
@@ -47,6 +48,18 @@ public class PluginImportWizard extends Wizard implements IImportWizard {
 		this.selection = selection;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createPageControls(Composite pageContainer) {
+		super.createPageControls(pageContainer);
+		IWizardContainer container = getContainer();
+		if (container instanceof WizardDialog) {
+			WizardDialog dialog = (WizardDialog) container;
+			dialog.addPageChangingListener(this);
+		}
+	}
+
 	public void addPages() {
 		setNeedsProgressMonitor(true);
 		page1 = new PluginImportWizardFirstPage("first"); //$NON-NLS-1$
@@ -83,7 +96,17 @@ public class PluginImportWizard extends Wizard implements IImportWizard {
 				return false;
 
 		}
-		doImportOperation(getShell(), page1.getImportType(), models, page2.forceAutoBuild(), launchedConfiguration > 0, page1.getAlternateSourceLocations());
+		if (page1.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+			if (getContainer().getCurrentPage() instanceof BaseImportWizardSecondPage) {
+				// ensure to set the models to import when finished is pressed without advancing to the repository pages
+				page1.configureBundleImportPages(models);
+			}
+		}
+		// finish contributed pages
+		if (!page1.finishPages()) {
+			return false;
+		}
+		doImportOperation(page1.getImportType(), models, page2.forceAutoBuild(), launchedConfiguration > 0, page1.getAlternateSourceLocations(), page1.getImportDescriptions());
 		return true;
 	}
 
@@ -128,22 +151,25 @@ public class PluginImportWizard extends Wizard implements IImportWizard {
 	}
 
 	public static void doImportOperation(Shell shell, int importType, IPluginModelBase[] models, boolean forceAutobuild) {
-		doImportOperation(shell, importType, models, forceAutobuild, false, null);
+		doImportOperation(importType, models, forceAutobuild, false, null, null);
 	}
 
 	/**
+	 * Performs the import.
 	 * 
-	 * @param shell
-	 * @param importType
-	 * @param models
-	 * @param forceAutobuild
-	 * @param launchedConfiguration
+	 * @param importType one of the import operation types
+	 * @param models models being imported
+	 * @param forceAutobuild whether to force a build after the import
+	 * @param launchedConfiguration if there is a launched target currently running 
 	 * @param alternateSource used to locate source attachments or <code>null</code> if default
 	 * 	source locations should be used (from active target platform).
+	 * @param importerToDescriptions map of bundle importers to import descriptions if importing
+	 *  from a repository, else <code>null</code>
 	 *  
 	 */
-	private static void doImportOperation(Shell shell, int importType, IPluginModelBase[] models, boolean forceAutobuild, boolean launchedConfiguration, SourceLocationManager alternateSource) {
+	public static void doImportOperation(int importType, IPluginModelBase[] models, boolean forceAutobuild, boolean launchedConfiguration, SourceLocationManager alternateSource, Map importerToDescriptions) {
 		PluginImportOperation job = new PluginImportOperation(models, importType, forceAutobuild);
+		job.setImportDescriptions(importerToDescriptions);
 		job.setAlternateSource(alternateSource);
 		job.setPluginsInUse(launchedConfiguration);
 		job.setRule(ResourcesPlugin.getWorkspace().getRoot());
@@ -158,14 +184,37 @@ public class PluginImportWizard extends Wizard implements IImportWizard {
 			}
 			return page2;
 		}
+		if (page.equals(page2) || page.equals(page3)) {
+			return page1.getNextPage(page);
+		}
 		return null;
 	}
 
 	public IWizardPage getPreviousPage(IWizardPage page) {
-		return page.equals(page1) ? null : page1;
+		if (page.equals(page1)) {
+			return null;
+		}
+		if (page.equals(page2) || page.equals(page3)) {
+			return page1;
+		}
+		IWizardPage prev = page1.getPreviousPage(page);
+		if (prev == null) {
+			return page3;
+		}
+		return prev;
 	}
 
 	public boolean canFinish() {
-		return !page1.isCurrentPage() && page1.getNextPage().isPageComplete();
+		return !page1.isCurrentPage() && page1.getNextPage().isPageComplete() && page1.arePagesComplete();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.IPageChangingListener#handlePageChanging(org.eclipse.jface.dialogs.PageChangingEvent)
+	 */
+	public void handlePageChanging(PageChangingEvent event) {
+		if (event.getCurrentPage() instanceof BaseImportWizardSecondPage && event.getTargetPage() instanceof IBundeImportWizardPage) {
+			IPluginModelBase[] models = getModelsToImport();
+			page1.configureBundleImportPages(models);
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
index 030d9fe..4cc9029 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardDetailedPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,6 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridLayoutFactory;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
@@ -52,11 +51,13 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 	}
 
 	private Label fCountLabel;
+	private int fCountTotal;
 	private TableViewer fAvailableListViewer;
 	private Text fFilterText;
 	private VersionFilter fVersionFilter;
 	private AvailableFilter fAvailableFilter;
 	private SourcePluginFilter fSourceFilter;
+	private ViewerFilter fRepositoryFilter;
 	// fSelected is used to track the selection in a hash set so we can efficiently
 	// filter selected items out of the available item list
 	private Set fSelected;
@@ -71,6 +72,18 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 
 	private static final String SETTINGS_SHOW_LATEST = "showLatestPluginsOnly"; //$NON-NLS-1$
 
+	private class RepositoryFilter extends ViewerFilter {
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+		 */
+		public boolean select(Viewer viewer, Object parentElement, Object element) {
+			if (fPage1.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+				return fPage1.repositoryModels.contains(element);
+			}
+			return true;
+		}
+	}
+
 	private class AvailableFilter extends ViewerFilter {
 		private Pattern fPattern;
 
@@ -159,10 +172,9 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 		updateCount();
 
 		// create container for buttons
-		Composite buttonContainer = new Composite(container, SWT.NONE);
-		buttonContainer.setLayout(GridLayoutFactory.fillDefaults().create());
-		createComputationsOption(buttonContainer, 3);
-		createFilterOptions(buttonContainer, 3);
+		Composite optionComp = SWTFactory.createComposite(container, 1, 3, GridData.FILL_HORIZONTAL, 5, 0);
+		createComputationsOption(optionComp);
+		createFilterOptions(optionComp);
 
 		addViewerListeners();
 		initialize();
@@ -172,15 +184,8 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(container, IHelpContextIds.PLUGIN_IMPORT_SECOND_PAGE);
 	}
 
-	private void createFilterOptions(Composite container, int span) {
-		Composite parent = new Composite(container, SWT.NONE);
-		parent.setLayout(GridLayoutFactory.swtDefaults().margins(5, 0).create());
-		fFilterOldVersionButton = new Button(parent, SWT.CHECK);
-		fFilterOldVersionButton.setSelection(true);
-		fFilterOldVersionButton.setText(PDEUIMessages.ImportWizard_DetailedPage_filterDesc);
-		GridData gData = new GridData(GridData.FILL_HORIZONTAL);
-		gData.horizontalSpan = span;
-		fFilterOldVersionButton.setLayoutData(gData);
+	private void createFilterOptions(Composite container) {
+		fFilterOldVersionButton = SWTFactory.createCheckButton(container, PDEUIMessages.ImportWizard_DetailedPage_filterDesc, null, true, 1);
 
 		if (getDialogSettings().get(SETTINGS_SHOW_LATEST) != null)
 			fFilterOldVersionButton.setSelection(getDialogSettings().getBoolean(SETTINGS_SHOW_LATEST));
@@ -205,8 +210,12 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 		fSourceFilter = new SourcePluginFilter(fPage1.getState());
 		fAvailableFilter = new AvailableFilter();
 		fAvailableListViewer.addFilter(fAvailableFilter);
-		fAvailableListViewer.addFilter(fVersionFilter);
+		if (fFilterOldVersionButton.getSelection()) {
+			fAvailableListViewer.addFilter(fVersionFilter);
+		}
 		fAvailableListViewer.addFilter(fSourceFilter);
+		fRepositoryFilter = new RepositoryFilter();
+		fAvailableListViewer.addFilter(fRepositoryFilter);
 
 		fFilterJob = new WorkbenchJob("FilterJob") { //$NON-NLS-1$
 			public IStatus runInUIThread(IProgressMonitor monitor) {
@@ -274,7 +283,7 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 		table.setLayoutData(gd);
 
 		fAvailableListViewer = new TableViewer(table);
-		fAvailableListViewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
+		fAvailableListViewer.setLabelProvider(new PluginImportLabelProvider());
 		fAvailableListViewer.setContentProvider(new ContentProvider());
 		fAvailableListViewer.setInput(PDECore.getDefault().getModelManager());
 		fAvailableListViewer.setComparator(ListUtil.PLUGIN_COMPARATOR);
@@ -409,10 +418,10 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 
 	public void setVisible(boolean visible) {
 		super.setVisible(visible);
-		if (visible)
+		if (visible) {
 			fFilterText.setFocus();
-		setPageComplete(visible && fImportListViewer.getTable().getItemCount() > 0);
-
+			setPageComplete(fImportListViewer.getTable().getItemCount() > 0);
+		}
 	}
 
 	protected void refreshPage() {
@@ -433,10 +442,17 @@ public class PluginImportWizardDetailedPage extends BaseImportWizardSecondPage {
 	protected void pageChanged(boolean doAddEnablement, boolean doRemoveEnablement) {
 		updateButtonEnablement(doAddEnablement, doRemoveEnablement);
 		setPageComplete(fImportListViewer.getTable().getItemCount() > 0);
+		setMessage(PDEUIMessages.ImportWizard_DetailedPage_desc);
+		checkRepositoryAvailability();
 	}
 
 	private void updateCount() {
-		fCountLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_DetailedPage_count, (new String[] {new Integer(fImportListViewer.getTable().getItemCount()).toString(), new Integer(fAvailableListViewer.getTable().getItemCount()).toString()})));
+		if (fCountTotal <= 0) {
+			// Since we filter the list of available plug-ins the total may differ from the model count
+			fCountTotal = fAvailableListViewer.getTable().getItemCount();
+		}
+
+		fCountLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_DetailedPage_count, (new String[] {Integer.toString(fImportListViewer.getTable().getItemCount()), Integer.toString(fCountTotal)})));
 		fCountLabel.getParent().layout();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardExpressPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardExpressPage.java
index b487f9d..1268559 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardExpressPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardExpressPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2008 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
 import org.eclipse.pde.internal.core.WorkspaceModelManager;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.elements.DefaultContentProvider;
 import org.eclipse.pde.internal.ui.parts.WizardCheckboxTablePart;
@@ -50,7 +51,7 @@ public class PluginImportWizardExpressPage extends BaseImportWizardSecondPage {
 			for (int i = 0; i < projects.length; i++) {
 				if (WorkspaceModelManager.isPluginProject(projects[i]) && !WorkspaceModelManager.isBinaryProject(projects[i])) {
 					IPluginModelBase model = PluginRegistry.findModel(projects[i]);
-					if (model != null)
+					if (model != null && model.getBundleDescription() != null)
 						result.add(model);
 				}
 			}
@@ -104,7 +105,8 @@ public class PluginImportWizardExpressPage extends BaseImportWizardSecondPage {
 
 		createButtons(container);
 
-		createComputationsOption(container, 2);
+		Composite optionsComp = SWTFactory.createComposite(container, 1, 2, GridData.FILL_HORIZONTAL, 5, 0);
+		createComputationsOption(optionsComp);
 
 		fAddFragmentsButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
@@ -163,7 +165,7 @@ public class PluginImportWizardExpressPage extends BaseImportWizardSecondPage {
 		fTablePart.getControl().setLayoutData(gd);
 
 		CheckboxTableViewer viewer = fTablePart.getTableViewer();
-		viewer.setLabelProvider(PDEPlugin.getDefault().getLabelProvider());
+		viewer.setLabelProvider(new PluginImportLabelProvider());
 		viewer.setContentProvider(new PluginContentProvider());
 		viewer.setComparator(ListUtil.PLUGIN_COMPARATOR);
 		viewer.setInput(PDEPlugin.getWorkspace().getRoot());
@@ -240,7 +242,7 @@ public class PluginImportWizardExpressPage extends BaseImportWizardSecondPage {
 		try {
 			IBuildModel buildModel = model.getBuildModel();
 			if (buildModel == null) {
-				IFile buildFile = model.getUnderlyingResource().getProject().getFile("build.properties"); //$NON-NLS-1$
+				IFile buildFile = PDEProject.getBuildProperties(model.getUnderlyingResource().getProject());
 				if (buildFile.exists()) {
 					buildModel = new WorkspaceBuildModel(buildFile);
 					buildModel.load();
@@ -276,6 +278,8 @@ public class PluginImportWizardExpressPage extends BaseImportWizardSecondPage {
 		computeModelsToImport();
 		updateCount();
 		setPageComplete(fImportListViewer.getTable().getItemCount() > 0);
+		setMessage(PDEUIMessages.ImportWizard_expressPage_desc);
+		checkRepositoryAvailability();
 	}
 
 	private void updateCount() {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java
index 5a57948..8ac3df9 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
+import java.util.Map.Entry;
 import java.util.List;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.Dialog;
@@ -22,12 +23,16 @@ import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.preference.*;
 import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.jface.wizard.*;
 import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
+import org.eclipse.pde.internal.core.importing.IBundleImporter;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.project.BundleProjectService;
 import org.eclipse.pde.internal.core.target.provisional.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.preferences.TargetPlatformPreferenceNode;
+import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.events.*;
@@ -65,6 +70,7 @@ public class PluginImportWizardFirstPage extends WizardPage {
 	private Button binaryButton;
 	private Button binaryWithLinksButton;
 	private Button sourceButton;
+	private Button repositoryButton;
 
 	public static String TARGET_PLATFORM = "targetPlatform"; //$NON-NLS-1$
 	private IPluginModelBase[] models = new IPluginModelBase[0];
@@ -75,6 +81,26 @@ public class PluginImportWizardFirstPage extends WizardPage {
 	private PDEState state;
 	private boolean canceled = false;
 
+	/**
+	 * Models that can be imported from a repository
+	 */
+	protected Set repositoryModels = new HashSet();
+
+	/**
+	 * Maps bundle importers to import instructions
+	 */
+	private Map importerToInstructions = new HashMap();
+
+	/**
+	 * Map of bundle importer extension id to associated wizard page
+	 */
+	private Map importIdToWizardPage = new HashMap();
+
+	/**
+	 * Array of next wizard pages (in order)
+	 */
+	private List nextPages = new ArrayList();
+
 	public PluginImportWizardFirstPage(String name) {
 		super(name);
 		setTitle(PDEUIMessages.ImportWizard_FirstPage_title);
@@ -120,6 +146,7 @@ public class PluginImportWizardFirstPage extends WizardPage {
 		binaryButton = SWTFactory.createRadioButton(options, PDEUIMessages.ImportWizard_FirstPage_binary);
 		binaryWithLinksButton = SWTFactory.createRadioButton(options, PDEUIMessages.ImportWizard_FirstPage_binaryLinks);
 		sourceButton = SWTFactory.createRadioButton(options, PDEUIMessages.ImportWizard_FirstPage_source);
+		repositoryButton = SWTFactory.createRadioButton(options, PDEUIMessages.PluginImportWizardFirstPage_3);
 	}
 
 	/**
@@ -156,8 +183,10 @@ public class PluginImportWizardFirstPage extends WizardPage {
 			binaryButton.setSelection(true);
 		} else if (importType == PluginImportOperation.IMPORT_BINARY_WITH_LINKS) {
 			binaryWithLinksButton.setSelection(true);
-		} else {
+		} else if (importType == PluginImportOperation.IMPORT_WITH_SOURCE) {
 			sourceButton.setSelection(true);
+		} else {
+			repositoryButton.setSelection(true);
 		}
 
 		boolean scan = true;
@@ -214,8 +243,11 @@ public class PluginImportWizardFirstPage extends WizardPage {
 			});
 			String[] names = new String[targetDefinitions.size()];
 			for (int i = 0; i < targetDefinitions.size(); i++) {
-				String name = ((ITargetDefinition) targetDefinitions.get(i)).getName();
-				names[i] = name == null ? "" : name; //$NON-NLS-1$
+				ITargetDefinition currentTarget = (ITargetDefinition) targetDefinitions.get(i);
+				names[i] = currentTarget.getName();
+				if (names[i] == null || names[i].trim().length() == 0) {
+					names[i] = currentTarget.getHandle().toString();
+				}
 			}
 			targetDefinitionCombo.setItems(names);
 		}
@@ -254,6 +286,12 @@ public class PluginImportWizardFirstPage extends WizardPage {
 			}
 		});
 		targetDefinitionCombo = SWTFactory.createCombo(composite, SWT.DROP_DOWN | SWT.READ_ONLY, 1, GridData.FILL_HORIZONTAL, null);
+		targetDefinitionCombo.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				validateDropLocation();
+			}
+		});
+
 		openTargetPrefsButton = SWTFactory.createPushButton(composite, PDEUIMessages.ImportWizard_FirstPage_goToTarget, null);
 		openTargetPrefsButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
@@ -375,7 +413,9 @@ public class PluginImportWizardFirstPage extends WizardPage {
 		if (binaryWithLinksButton.getSelection()) {
 			return PluginImportOperation.IMPORT_BINARY_WITH_LINKS;
 		}
-
+		if (repositoryButton.getSelection()) {
+			return PluginImportOperation.IMPORT_FROM_REPOSITORY;
+		}
 		return PluginImportOperation.IMPORT_WITH_SOURCE;
 	}
 
@@ -472,13 +512,19 @@ public class PluginImportWizardFirstPage extends WizardPage {
 
 	/**
 	 * Resolves the target platform
+	 * @param type import type
 	 */
-	private void resolveTargetPlatform() {
+	private void resolveTargetPlatform(final int type) {
 		IRunnableWithProgress op = new IRunnableWithProgress() {
-			public void run(IProgressMonitor monitor) {
+			public void run(IProgressMonitor monitor) throws InvocationTargetException {
 				models = PluginRegistry.getExternalModels();
 				state = PDECore.getDefault().getModelManager().getState();
 				alternateSource = null;
+				try {
+					buildImportDescriptions(monitor, type);
+				} catch (CoreException e) {
+					throw new InvocationTargetException(e);
+				}
 				monitor.done();
 			}
 		};
@@ -507,7 +553,7 @@ public class PluginImportWizardFirstPage extends WizardPage {
 			}
 			ITargetDefinition target = service.newTarget(); // temporary target
 			target.setBundleContainers(new IBundleContainer[] {container});
-			resolveTargetDefinition(target);
+			resolveTargetDefinition(target, getImportType());
 		}
 	}
 
@@ -515,10 +561,11 @@ public class PluginImportWizardFirstPage extends WizardPage {
 	 * Resolves the plug-in locations for a target definition.
 	 * 
 	 * @param target target definition
+	 * @param type import operation type
 	 */
-	private void resolveTargetDefinition(final ITargetDefinition target) {
+	private void resolveTargetDefinition(final ITargetDefinition target, final int type) {
 		IRunnableWithProgress op = new IRunnableWithProgress() {
-			public void run(IProgressMonitor monitor) {
+			public void run(IProgressMonitor monitor) throws InvocationTargetException {
 				monitor.beginTask(PDEUIMessages.PluginImportWizardFirstPage_1, 100);
 				SubProgressMonitor pm = new SubProgressMonitor(monitor, 50);
 				target.resolve(pm);
@@ -558,6 +605,11 @@ public class PluginImportWizardFirstPage extends WizardPage {
 					}
 				}
 				alternateSource = new AlternateSourceLocations((IPluginModelBase[]) sourceModels.toArray(new IPluginModelBase[sourceModels.size()]), (IResolvedBundle[]) sourceBundles.toArray(new IResolvedBundle[sourceBundles.size()]));
+				try {
+					buildImportDescriptions(pm, type);
+				} catch (CoreException e) {
+					throw new InvocationTargetException(e);
+				}
 				pm.done();
 				canceled = monitor.isCanceled();
 				monitor.done();
@@ -571,16 +623,182 @@ public class PluginImportWizardFirstPage extends WizardPage {
 		}
 	}
 
+	private void buildImportDescriptions(IProgressMonitor monitor, int type) throws CoreException {
+		// build import instructions
+		BundleProjectService service = (BundleProjectService) BundleProjectService.getDefault();
+		repositoryModels.clear();
+		importerToInstructions.clear();
+		nextPages.clear();
+		if (type == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+			if (models != null) {
+				importerToInstructions = service.getImportDescriptions(models);
+				Iterator iterator = importerToInstructions.entrySet().iterator();
+				while (iterator.hasNext()) {
+					if (!monitor.isCanceled()) {
+						Entry entry = (Entry) iterator.next();
+						BundleImportDescription[] descriptions = (BundleImportDescription[]) entry.getValue();
+						for (int i = 0; i < descriptions.length; i++) {
+							repositoryModels.add(descriptions[i].getProperty(BundleProjectService.PLUGIN));
+						}
+					}
+				}
+			}
+			if (!monitor.isCanceled()) {
+				// contributed wizard pages
+				Iterator iterator = importerToInstructions.entrySet().iterator();
+				while (iterator.hasNext()) {
+					Entry entry = (Entry) iterator.next();
+					IBundleImporter importer = (IBundleImporter) entry.getKey();
+					IBundeImportWizardPage page = (IBundeImportWizardPage) importIdToWizardPage.get(importer.getId());
+					if (page == null) {
+						page = getPage(importer.getId());
+						if (page != null) {
+							importIdToWizardPage.put(importer.getId(), page);
+							((Wizard) getWizard()).addPage(page);
+						}
+					}
+					if (page != null) {
+						nextPages.add(page);
+//						page.setSelection((BundleImportDescription[]) entry.getValue());
+					}
+				}
+			}
+		}
+		if (monitor.isCanceled()) {
+			importerToInstructions.clear();
+			repositoryModels.clear();
+			nextPages.clear();
+		}
+	}
+
+	/**
+	 * Returns whether the contributed pages are complete.
+	 * 
+	 * @return whether the contributed pages are complete
+	 */
+	boolean arePagesComplete() {
+		Iterator iterator = nextPages.iterator();
+		while (iterator.hasNext()) {
+			IBundeImportWizardPage page = (IBundeImportWizardPage) iterator.next();
+			if (!page.isPageComplete()) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Finishes contributed pages.
+	 * 
+	 * @return whether finish was successful
+	 */
+	boolean finishPages() {
+		Iterator iterator = nextPages.iterator();
+		while (iterator.hasNext()) {
+			IBundeImportWizardPage page = (IBundeImportWizardPage) iterator.next();
+			if (!page.finish()) {
+				return false;
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Returns a map of importers to their bundle import descriptions to process.
+	 * 
+	 * @return map of bundle import descriptions to process, by importers
+	 */
+	Map getImportDescriptions() {
+		Map map = new HashMap();
+		if (getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
+			IBundleImporter[] importers = ((BundleProjectService) BundleProjectService.getDefault()).getBundleImporters();
+			for (int i = 0; i < importers.length; i++) {
+				IBundleImporter importer = importers[i];
+				if (importerToInstructions.containsKey(importer)) {
+					IBundeImportWizardPage page = (IBundeImportWizardPage) importIdToWizardPage.get(importer.getId());
+					if (page != null && nextPages.contains(page)) {
+						map.put(importer, page.getSelection());
+					}
+				}
+			}
+		}
+		return map;
+	}
+
+	/**
+	 * Returns the next page to display or <code>null</code> if none.
+	 * 
+	 * @param page current page
+	 * @return next page or <code>null</code>
+	 */
+	IWizardPage getNextPage(IWizardPage page) {
+		if (nextPages.isEmpty()) {
+			return null;
+		}
+		if (page instanceof IBundeImportWizardPage) {
+			int index = nextPages.indexOf(page);
+			if (index >= 0 && index < (nextPages.size() - 2)) {
+				return (IWizardPage) nextPages.get(index + 1);
+			}
+		}
+		if (page instanceof PluginImportWizardDetailedPage || page instanceof PluginImportWizardExpressPage) {
+			return (IWizardPage) nextPages.get(0);
+		}
+		return null;
+	}
+
+	/**
+	 * Returns the previous page to display or <code>null</code> if none.
+	 * 
+	 * @param page current page
+	 * @return previous page or <code>null</code>
+	 */
+	IWizardPage getPreviousPage(IWizardPage page) {
+		if (page instanceof IBundeImportWizardPage) {
+			int index = nextPages.indexOf(page);
+			if (index > 0) {
+				return (IWizardPage) nextPages.get(index - 1);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Creates and returns a wizard page associated with the given bundle importer extension identifier
+	 * or <code>null</code> of none.
+	 * 
+	 * @param importerId org.eclipse.pde.core.bundleImporters extension identifier
+	 * @return associated bundle import wizard page or <code>null</code>
+	 */
+	private IBundeImportWizardPage getPage(String importerId) {
+		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(IPDEUIConstants.EXTENSION_POINT_BUNDLE_IMPORT_PAGES);
+		if (point != null) {
+			IConfigurationElement[] infos = point.getConfigurationElements();
+			for (int i = 0; i < infos.length; i++) {
+				IConfigurationElement element = infos[i];
+				String id = element.getAttribute("bundleImporter"); //$NON-NLS-1$
+				if (id != null && importerId.equals(id)) {
+					try {
+						return (IBundeImportWizardPage) element.createExecutableExtension("class"); //$NON-NLS-1$
+					} catch (CoreException e) {
+						PDEPlugin.log(e);
+					}
+				}
+			}
+		}
+		return null;
+	}
+
 	/**
 	 * @return the complete set of {@link IPluginModelBase}s for the given drop location
 	 */
 	public IPluginModelBase[] getModels() {
 		switch (getImportOrigin()) {
 			case FROM_ACTIVE_PLATFORM :
-				resolveTargetPlatform();
+				resolveTargetPlatform(getImportType());
 				break;
 			case FROM_TARGET_DEFINITION :
-				resolveTargetDefinition(getTargetDefinition());
+				resolveTargetDefinition(getTargetDefinition(), getImportType());
 				break;
 			case FROM_DIRECTORY :
 				resolveArbitraryLocation(getDropLocation());
@@ -644,4 +862,46 @@ public class PluginImportWizardFirstPage extends WizardPage {
 				return getDropLocation();
 		}
 	}
+
+	/**
+	 * Notifies the contributed bundle import pages of the bundles to import.
+	 * 
+	 * @param models the models selected for import
+	 */
+	public void configureBundleImportPages(IPluginModelBase[] models) {
+		// make a set of the models to import for quick lookup
+		Set modelsSet = new HashSet();
+		for (int i = 0; i < models.length; i++) {
+			modelsSet.add(models[i]);
+		}
+		Map importerToImportees = new HashMap();
+		Iterator iterator = importerToInstructions.entrySet().iterator();
+		while (iterator.hasNext()) {
+			Entry entry = (Entry) iterator.next();
+			IBundleImporter importer = (IBundleImporter) entry.getKey();
+			BundleImportDescription[] descriptions = (BundleImportDescription[]) entry.getValue();
+			for (int i = 0; i < descriptions.length; i++) {
+				IPluginModelBase model = (IPluginModelBase) descriptions[i].getProperty(BundleProjectService.PLUGIN);
+				if (modelsSet.contains(model)) {
+					List importees = (List) importerToImportees.get(importer);
+					if (importees == null) {
+						importees = new ArrayList();
+						importerToImportees.put(importer, importees);
+					}
+					importees.add(descriptions[i]);
+				}
+			}
+		}
+		iterator = importerToImportees.entrySet().iterator();
+		while (iterator.hasNext()) {
+			Entry entry = (Entry) iterator.next();
+			IBundleImporter importer = (IBundleImporter) entry.getKey();
+			List list = (List) entry.getValue();
+			BundleImportDescription[] descriptions = (BundleImportDescription[]) list.toArray(new BundleImportDescription[list.size()]);
+			IBundeImportWizardPage page = (IBundeImportWizardPage) importIdToWizardPage.get(importer.getId());
+			if (page != null) {
+				page.setSelection(descriptions);
+			}
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java
new file mode 100644
index 0000000..97c2535
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/imports/RepositoryImportWizard.java
@@ -0,0 +1,149 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.ui.wizards.imports;
+
+import java.util.*;
+import java.util.Map.Entry;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.pde.core.plugin.IPluginModelBase;
+import org.eclipse.pde.internal.core.importing.IBundleImporter;
+import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
+import org.eclipse.pde.internal.core.project.BundleProjectService;
+import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
+
+/**
+ * Wizard to import plug-ins from a repository.
+ * 
+ * @since 3.6
+ */
+public class RepositoryImportWizard extends Wizard {
+
+	/**
+	 * Map of import delegates to import descriptions as provided by the {@link BundleProjectService}
+	 */
+	private Map fImportMap;
+
+	/**
+	 * Map of importer identifier to associated wizard import page
+	 */
+	private Map fIdToPages = new HashMap();
+
+	private static final String STORE_SECTION = "RepositoryImportWizard"; //$NON-NLS-1$
+
+	/**
+	 * Map of import delegates to import descriptions.
+	 * 
+	 * @param importMap
+	 */
+	public RepositoryImportWizard(Map importMap) {
+		IDialogSettings masterSettings = PDEPlugin.getDefault().getDialogSettings();
+		setDialogSettings(getSettingsSection(masterSettings));
+		setDefaultPageImageDescriptor(PDEPluginImages.DESC_PLUGIN_IMPORT_WIZ);
+		setWindowTitle(PDEUIMessages.ImportWizard_title);
+		fImportMap = importMap;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#addPages()
+	 */
+	public void addPages() {
+		Iterator iterator = fImportMap.entrySet().iterator();
+		while (iterator.hasNext()) {
+			Entry entry = (Entry) iterator.next();
+			IBundleImporter importer = (IBundleImporter) entry.getKey();
+			BundleImportDescription[] descriptions = (BundleImportDescription[]) entry.getValue();
+			IBundeImportWizardPage page = (IBundeImportWizardPage) fIdToPages.get(importer.getId());
+			if (page == null) {
+				page = getImportPage(importer.getId());
+				if (page != null) {
+					fIdToPages.put(importer.getId(), page);
+					addPage(page);
+					page.setSelection(descriptions);
+				}
+			}
+		}
+	}
+
+	/**
+	 * Creates and returns a wizard page associated with the given bundle importer extension identifier
+	 * or <code>null</code> of none.
+	 * 
+	 * @param importerId org.eclipse.pde.core.bundleImporters extension identifier
+	 * @return associated bundle import wizard page or <code>null</code>
+	 */
+	private IBundeImportWizardPage getImportPage(String importerId) {
+		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(IPDEUIConstants.EXTENSION_POINT_BUNDLE_IMPORT_PAGES);
+		if (point != null) {
+			IConfigurationElement[] infos = point.getConfigurationElements();
+			for (int i = 0; i < infos.length; i++) {
+				IConfigurationElement element = infos[i];
+				String id = element.getAttribute("bundleImporter"); //$NON-NLS-1$
+				if (id != null && importerId.equals(id)) {
+					try {
+						return (IBundeImportWizardPage) element.createExecutableExtension("class"); //$NON-NLS-1$
+					} catch (CoreException e) {
+						PDEPlugin.log(e);
+					}
+				}
+			}
+		}
+		return null;
+	}
+
+	private IDialogSettings getSettingsSection(IDialogSettings master) {
+		IDialogSettings setting = master.getSection(STORE_SECTION);
+		if (setting == null) {
+			setting = master.addNewSection(STORE_SECTION);
+		}
+		return setting;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.wizard.Wizard#performFinish()
+	 */
+	public boolean performFinish() {
+		// collect the bundle descriptions from each page and import
+		Map importMap = new HashMap();
+		List plugins = new ArrayList();
+		IWizardPage[] pages = getPages();
+		for (int i = 0; i < pages.length; i++) {
+			IBundeImportWizardPage page = (IBundeImportWizardPage) pages[i];
+			if (page.finish()) {
+				BundleImportDescription[] descriptions = page.getSelection();
+				if (descriptions != null && descriptions.length > 0) {
+					for (int j = 0; j < descriptions.length; j++) {
+						BundleImportDescription description = descriptions[j];
+						if (j == 0) {
+							Object importer = description.getProperty(BundleProjectService.BUNDLE_IMPORTER);
+							if (importer != null) {
+								importMap.put(importer, descriptions);
+							}
+						}
+						Object plugin = description.getProperty(BundleProjectService.PLUGIN);
+						if (plugin != null) {
+							plugins.add(plugin);
+						}
+					}
+				}
+			} else {
+				return false;
+			}
+		}
+		if (!importMap.isEmpty()) {
+			PluginImportWizard.doImportOperation(PluginImportOperation.IMPORT_FROM_REPOSITORY, (IPluginModelBase[]) plugins.toArray(new IPluginModelBase[plugins.size()]), false, false, null, importMap);
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/ContentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/ContentPage.java
index 27fd485..4657b6c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/ContentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/ContentPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -103,12 +103,6 @@ public abstract class ContentPage extends WizardPage {
 			return errorMessage;
 		}
 
-		// Validate Name
-		errorMessage = validateName();
-		if (errorMessage != null) {
-			return errorMessage;
-		}
-
 		return null;
 	}
 
@@ -124,15 +118,6 @@ public abstract class ContentPage extends WizardPage {
 		return null;
 	}
 
-	/**
-	 */
-	private String validateName() {
-		if (fNameText.getText().trim().length() == 0) {
-			return PDEUIMessages.ContentPage_noname;
-		}
-		return null;
-	}
-
 	private String validateId() {
 		String id = fIdText.getText().trim();
 		if (id.length() == 0)
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
index be4da62..5831bc4 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@ import org.eclipse.pde.internal.core.ibundle.IBundle;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.natures.PDE;
 import org.eclipse.pde.internal.core.plugin.WorkspacePluginModelBase;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.search.dependencies.AddNewBinaryDependenciesOperation;
 import org.eclipse.pde.internal.ui.wizards.IProjectProvider;
@@ -81,9 +82,7 @@ public class NewLibraryPluginCreationOperation extends NewProjectCreationOperati
 			if (resources[j] instanceof IFile) {
 				if (".project".equals(resources[j].getName()) //$NON-NLS-1$
 						|| ".classpath".equals(resources[j] //$NON-NLS-1$
-								.getName()) || "plugin.xml".equals(resources[j] //$NON-NLS-1$
-								.getName()) || "build.properties".equals(resources[j] //$NON-NLS-1$
-								.getName())) {
+								.getName()) || ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR.equals(resources[j].getName()) || ICoreConstants.BUILD_FILENAME_DESCRIPTOR.equals(resources[j].getName())) {
 					continue;
 				}
 				// resource at the root, export root
@@ -149,7 +148,7 @@ public class NewLibraryPluginCreationOperation extends NewProjectCreationOperati
 		}
 		if (requiredProjects.size() <= 0)
 			return;
-		IFile file = javaProject.getProject().getFile(ICoreConstants.MANIFEST_PATH);
+		IFile file = PDEProject.getManifest(javaProject.getProject());
 		try {
 			// TODO format manifest
 			Manifest manifest = new Manifest(file.getContents());
@@ -185,10 +184,10 @@ public class NewLibraryPluginCreationOperation extends NewProjectCreationOperati
 		IProject other = workspaceRoot.getProject(entry.getPath().segment(0));
 		if (!PDE.hasPluginNature(other))
 			return false;
-		if (other.findMember(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR) != null)
+		if (PDEProject.getFragmentXml(other).exists())
 			return false;
 		try {
-			InputStream is = other.getFile(ICoreConstants.MANIFEST_PATH).getContents();
+			InputStream is = PDEProject.getManifest(other).getContents();
 			try {
 				Manifest mf = new Manifest(is);
 				if (mf.getMainAttributes().getValue(Constants.FRAGMENT_HOST) != null)
@@ -275,7 +274,7 @@ public class NewLibraryPluginCreationOperation extends NewProjectCreationOperati
 		}
 
 		// delete manifest.mf imported from libraries
-		IFile importedManifest = project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR);
+		IFile importedManifest = PDEProject.getManifest(project);
 		if (importedManifest.exists()) {
 			importedManifest.delete(true, false, monitor);
 			if (!fData.hasBundleStructure()) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationPage.java
index 13c7c97..66e8e4c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewLibraryPluginCreationPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,7 +133,7 @@ public class NewLibraryPluginCreationPage extends WizardNewProjectCreationPage {
 		});
 
 		fTargetCombo = new Combo(group, SWT.READ_ONLY | SWT.SINGLE);
-		fTargetCombo.setItems(new String[] {ICoreConstants.TARGET35, ICoreConstants.TARGET34, ICoreConstants.TARGET33, ICoreConstants.TARGET32, ICoreConstants.TARGET31, ICoreConstants.TARGET30});
+		fTargetCombo.setItems(new String[] {ICoreConstants.TARGET36, ICoreConstants.TARGET35, ICoreConstants.TARGET34, ICoreConstants.TARGET33, ICoreConstants.TARGET32, ICoreConstants.TARGET31, ICoreConstants.TARGET30});
 		fTargetCombo.setText(TargetPlatformHelper.getTargetVersionString());
 
 		fOSGIButton = createButton(group, SWT.RADIO, 1, 30);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java
index d3d45ea..6eb38b5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.pde.internal.core.bundle.*;
 import org.eclipse.pde.internal.core.ibundle.*;
 import org.eclipse.pde.internal.core.natures.PDE;
 import org.eclipse.pde.internal.core.plugin.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
@@ -90,7 +91,7 @@ public class NewProjectCreationOperation extends WorkspaceModifyOperation {
 	}
 
 	private void createBuildPropertiesFile(IProject project) throws CoreException {
-		IFile file = project.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile file = PDEProject.getBuildProperties(project);
 		if (!file.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(file);
 			IBuildModelFactory factory = model.getFactory();
@@ -133,17 +134,20 @@ public class NewProjectCreationOperation extends WorkspaceModifyOperation {
 	}
 
 	private void createManifest(IProject project) throws CoreException {
+		IFile fragmentXml = PDEProject.getFragmentXml(project);
+		IFile pluginXml = PDEProject.getPluginXml(project);
 		if (fData.hasBundleStructure()) {
+			IFile manifest = PDEProject.getManifest(project);
 			if (fData instanceof IFragmentFieldData) {
-				fModel = new WorkspaceBundleFragmentModel(project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR), project.getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR));
+				fModel = new WorkspaceBundleFragmentModel(manifest, fragmentXml);
 			} else {
-				fModel = new WorkspaceBundlePluginModel(project.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR), project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR));
+				fModel = new WorkspaceBundlePluginModel(manifest, pluginXml);
 			}
 		} else {
 			if (fData instanceof IFragmentFieldData) {
-				fModel = new WorkspaceFragmentModel(project.getFile(ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR), false);
+				fModel = new WorkspaceFragmentModel(fragmentXml, false);
 			} else {
-				fModel = new WorkspacePluginModel(project.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR), false);
+				fModel = new WorkspacePluginModel(pluginXml, false);
 			}
 		}
 		IPluginBase pluginBase = fModel.getPluginBase();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationPage.java
index 8bb63e7..8b57f8d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/NewProjectCreationPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -131,7 +131,7 @@ public class NewProjectCreationPage extends WizardNewProjectCreationPage {
 		});
 
 		fEclipseCombo = new Combo(group, SWT.READ_ONLY | SWT.SINGLE);
-		fEclipseCombo.setItems(new String[] {ICoreConstants.TARGET35, ICoreConstants.TARGET34, ICoreConstants.TARGET33, ICoreConstants.TARGET32, ICoreConstants.TARGET31});
+		fEclipseCombo.setItems(new String[] {ICoreConstants.TARGET36, ICoreConstants.TARGET35, ICoreConstants.TARGET34, ICoreConstants.TARGET33, ICoreConstants.TARGET32, ICoreConstants.TARGET31});
 		boolean comboInitialized = false;
 		if (settings != null && !osgiProject) {
 			String text = settings.get(S_TARGET_NAME);
@@ -143,7 +143,7 @@ public class NewProjectCreationPage extends WizardNewProjectCreationPage {
 			if (PDECore.getDefault().areModelsInitialized())
 				fEclipseCombo.setText(TargetPlatformHelper.getTargetVersionString());
 			else
-				fEclipseCombo.setText(ICoreConstants.TARGET35);
+				fEclipseCombo.setText(ICoreConstants.TARGET36);
 		}
 
 		fOSGIButton = createButton(group, SWT.RADIO, 1, 30);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginClassCodeGenerator.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginClassCodeGenerator.java
index 37df854..69c7065 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginClassCodeGenerator.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginClassCodeGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Peter Friese <peter.friese at itemis.de> - bug 241074
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.plugin;
 
@@ -19,6 +20,7 @@ import org.eclipse.pde.core.plugin.IPluginReference;
 import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.ui.templates.PluginReference;
+
 public class PluginClassCodeGenerator {
 	private PluginFieldData fPluginData;
 	private IProject fProject;
@@ -46,7 +48,8 @@ public class PluginClassCodeGenerator {
 		IFile file = fProject.getFile(path.append(className + ".java")); //$NON-NLS-1$
 		StringWriter swriter = new StringWriter();
 		PrintWriter writer = new PrintWriter(swriter);
-		if (fPluginData.getOSGiFramework() != null) {
+		// only generate/extend plug-in classes if it's a IU plug-in
+		if (fPluginData.getOSGiFramework() != null || !fPluginData.isUIPlugin()) {
 			generateActivatorClass(packageName, className, writer);
 		} else {
 			generatePluginClass(packageName, className, writer);
@@ -89,7 +92,7 @@ public class PluginClassCodeGenerator {
 			writer.println("public class " + className + " extends Plugin {"); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println();
 		writer.println("\t// The plug-in ID"); //$NON-NLS-1$
-		writer.println("\tpublic static final String PLUGIN_ID = \"" + fPluginData.getId() + "\";"); //$NON-NLS-1$ //$NON-NLS-2$
+		writer.println("\tpublic static final String PLUGIN_ID = \"" + fPluginData.getId() + "\"; //$NON-NLS-1$"); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println();
 		writer.println("\t// The shared instance"); //$NON-NLS-1$
 		writer.println("\tprivate static " + className + " plugin;"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -161,18 +164,26 @@ public class PluginClassCodeGenerator {
 		writer.println();
 		writer.println("public class " + className + " implements BundleActivator {"); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println();
+		writer.println("\tprivate static BundleContext context;"); //$NON-NLS-1$
+		writer.println();
+		writer.println("\tstatic BundleContext getContext() {"); //$NON-NLS-1$
+		writer.println("\t\treturn context;"); //$NON-NLS-1$
+		writer.println("\t}"); //$NON-NLS-1$
+		writer.println();
 		writer.println("\t/*"); //$NON-NLS-1$
 		writer.println("\t * (non-Javadoc)"); //$NON-NLS-1$
 		writer.println("\t * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)"); //$NON-NLS-1$
 		writer.println("\t */"); //$NON-NLS-1$
-		writer.println("\tpublic void start(BundleContext context) throws Exception {"); //$NON-NLS-1$
+		writer.println("\tpublic void start(BundleContext bundleContext) throws Exception {"); //$NON-NLS-1$
+		writer.println("\t\t" + className + ".context = bundleContext;"); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println("\t}"); //$NON-NLS-1$
 		writer.println();
 		writer.println("\t/*"); //$NON-NLS-1$
 		writer.println("\t * (non-Javadoc)"); //$NON-NLS-1$
 		writer.println("\t * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)"); //$NON-NLS-1$
 		writer.println("\t */"); //$NON-NLS-1$
-		writer.println("\tpublic void stop(BundleContext context) throws Exception {"); //$NON-NLS-1$
+		writer.println("\tpublic void stop(BundleContext bundleContext) throws Exception {"); //$NON-NLS-1$
+		writer.println("\t\t" + className + ".context = null;"); //$NON-NLS-1$ //$NON-NLS-2$
 		writer.println("\t}"); //$NON-NLS-1$
 		writer.println();
 		writer.println("}"); //$NON-NLS-1$		
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
index 8fe8507..f3da36a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/plugin/PluginContentPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -237,7 +237,8 @@ public class PluginContentPage extends ContentPage {
 		data.setUIPlugin(fUIPlugin.getSelection());
 		data.setDoGenerateClass(fGenerateActivator.getSelection());
 		data.setRCPApplicationPlugin(!fData.isSimple() && !isPureOSGi() && fYesButton.getSelection());
-		data.setEnableAPITooling(fApiAnalysisButton.getSelection());
+		// Don't turn on API analysis if disabled (no java project available)
+		data.setEnableAPITooling(fApiAnalysisButton.isVisible() && fApiAnalysisButton.getSelection());
 		if (fEEChoice.isEnabled() && !fEEChoice.getText().equals(NO_EXECUTION_ENVIRONMENT)) {
 			fData.setExecutionEnvironment(fEEChoice.getText().trim());
 		} else {
@@ -312,7 +313,7 @@ public class PluginContentPage extends ContentPage {
 			// plugin class group
 			if (((fChangedGroups & P_CLASS_GROUP) == 0)) {
 				int oldfChanged = fChangedGroups;
-				fClassText.setText(computeId().toLowerCase(Locale.ENGLISH) + ".Activator"); //$NON-NLS-1$
+				fClassText.setText(computeId().replaceAll("-", "_").toLowerCase(Locale.ENGLISH) + ".Activator"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				fChangedGroups = oldfChanged;
 			}
 
@@ -322,11 +323,6 @@ public class PluginContentPage extends ContentPage {
 			fExeEnvButton.setEnabled(allowEESelection);
 			// API tooling only works for osgi bundles with java natures
 			fApiAnalysisButton.setEnabled(allowEESelection);
-			if (allowEESelection && getDialogSettings() != null) {
-				fApiAnalysisButton.setSelection(getDialogSettings().getBoolean(S_API_ANALYSIS));
-			} else {
-				fApiAnalysisButton.setSelection(false);
-			}
 
 			fRCPGroup.setVisible(!fData.isSimple() && !isPureOSGi());
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/BaseManifestOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/BaseManifestOperation.java
index 07b46b5..e072188 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/BaseManifestOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/BaseManifestOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.ibundle.*;
 import org.eclipse.pde.internal.core.plugin.WorkspaceFragmentModel;
 import org.eclipse.pde.internal.core.plugin.WorkspacePluginModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.bundle.BundleSymbolicNameHeader;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
@@ -46,12 +47,11 @@ public abstract class BaseManifestOperation implements IRunnableWithProgress {
 	protected IFile getFile() {
 		IPluginModelBase model = PluginRegistry.findModel(fPluginId);
 		IProject project = model.getUnderlyingResource().getProject();
-		String filename = model instanceof IFragmentModel ? ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR : ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR;
-		return project.getFile(filename);
+		return model instanceof IFragmentModel ? PDEProject.getFragmentXml(project) : PDEProject.getPluginXml(project);
 	}
 
 	protected IPluginModelBase getModel(IFile file) {
-		if ("plugin.xml".equals(file.getName())) //$NON-NLS-1$
+		if (ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR.equals(file.getName()))
 			return new WorkspacePluginModel(file, false);
 		return new WorkspaceFragmentModel(file, false);
 	}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFileWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFileWizardPage.java
index bb20d1a..88269bd 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFileWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFileWizardPage.java
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.product;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import java.util.ArrayList;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -24,7 +26,6 @@ import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.wizards.PDEWizardNewFileCreationPage;
 import org.eclipse.pde.ui.launcher.EclipseLaunchShortcut;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFromConfigOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFromConfigOperation.java
index 67c7eef..b5eef07 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFromConfigOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductFromConfigOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,14 +15,16 @@ import java.util.*;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.pde.core.plugin.TargetPlatform;
+import org.eclipse.pde.internal.core.ifeature.IEnvironment;
 import org.eclipse.pde.internal.core.iproduct.*;
 import org.eclipse.pde.internal.core.iproduct.IProduct;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
 import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
-import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 
 /**
  * This operation generates a product configuration filling in fields based on information
@@ -106,8 +108,23 @@ public class ProductFromConfigOperation extends BaseProductCreationOperation {
 					arguments = factory.createLauncherArguments();
 				if (vmargs != null)
 					arguments.setVMArguments(vmargs, IArgumentsInfo.L_ARGS_ALL);
-				if (programArgs != null)
-					arguments.setProgramArguments(programArgs, IArgumentsInfo.L_ARGS_ALL);
+				if (programArgs != null) {
+					String[] parsedArgs = DebugPlugin.parseArguments(programArgs);
+					List unwantedArgs = Arrays.asList(new String[] {'-' + IEnvironment.P_ARCH, '-' + IEnvironment.P_NL, '-' + IEnvironment.P_OS, '-' + IEnvironment.P_WS});
+					StringBuffer filteredArgs = new StringBuffer();
+					for (int i = 0; i < parsedArgs.length; i++) {
+						if (unwantedArgs.contains(parsedArgs[i].toLowerCase())) {
+							if (!parsedArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
+								i++; // skip its value too
+								continue;
+							}
+						}
+						filteredArgs.append(parsedArgs[i] + ' ');
+					}
+					programArgs = filteredArgs.toString().trim();
+					if (programArgs.length() > 0)
+						arguments.setProgramArguments(programArgs, IArgumentsInfo.L_ARGS_ALL);
+				}
 				product.setLauncherArguments(arguments);
 			}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroOperation.java
index b431565..3c8c426 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -166,7 +166,7 @@ public class ProductIntroOperation extends BaseManifestOperation implements IVar
 		PDEModelUtility.modifyModel(mod, monitor);
 	}
 
-	private IPluginExtension getExtension(IPluginModelBase model, String tPoint) throws CoreException {
+	private IPluginExtension getExtension(IPluginModelBase model, String tPoint) {
 		IPluginExtension[] extensions = model.getPluginBase().getExtensions();
 		for (int i = 0; i < extensions.length; i++) {
 			String point = extensions[i].getPoint();
@@ -186,9 +186,6 @@ public class ProductIntroOperation extends BaseManifestOperation implements IVar
 		} catch (MalformedURLException e1) {
 			return;
 		}
-		if (locationUrl == null) {
-			return;
-		}
 		try {
 			locationUrl = FileLocator.resolve(locationUrl);
 			locationUrl = FileLocator.toFileURL(locationUrl);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroWizardPage.java
index d3a6caa..49c2c5f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/ProductIntroWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.product;
 
-import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog;
-
 import java.util.TreeSet;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -24,6 +22,7 @@ import org.eclipse.pde.internal.core.PDECore;
 import org.eclipse.pde.internal.core.iproduct.IProduct;
 import org.eclipse.pde.internal.ui.IHelpContextIds;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.dialogs.PluginSelectionDialog;
 import org.eclipse.pde.internal.ui.search.ShowDescriptionAction;
 import org.eclipse.pde.internal.ui.util.SWTUtil;
 import org.eclipse.swt.SWT;
@@ -64,7 +63,9 @@ public class ProductIntroWizardPage extends WizardPage implements IHyperlinkList
 		layout.verticalSpacing = 20;
 		comp.setLayout(layout);
 
-		createProductGroup(comp);
+		FormToolkit toolkit = new FormToolkit(parent.getDisplay());
+		createProductGroup(toolkit, comp);
+		toolkit.dispose();
 
 		setControl(comp);
 		setPageComplete(getPluginId() != null);
@@ -72,13 +73,12 @@ public class ProductIntroWizardPage extends WizardPage implements IHyperlinkList
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(comp, IHelpContextIds.PRODUCT_DEFINITIONS_WIZARD);
 	}
 
-	private void createProductGroup(Composite comp) {
+	private void createProductGroup(FormToolkit toolkit, Composite comp) {
 		Group group = new Group(comp, SWT.NONE);
 		group.setText(PDEUIMessages.ProductIntroWizardPage_groupText);
 		group.setLayout(new GridLayout(3, false));
 		group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-		FormToolkit toolkit = new FormToolkit(group.getDisplay());
 		FormText text = toolkit.createFormText(group, false);
 		text.setText(PDEUIMessages.ProductIntroWizardPage_formText, true, false);
 		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/UpdateSplashProgressOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/UpdateSplashProgressOperation.java
index d64ddaa..16bcba0 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/UpdateSplashProgressOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/product/UpdateSplashProgressOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007,2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,8 @@ import org.eclipse.jface.text.IDocument;
 import org.eclipse.pde.core.build.IBuildEntry;
 import org.eclipse.pde.core.build.IBuildModel;
 import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.build.WorkspaceBuildModel;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.text.build.BuildModel;
 import org.eclipse.pde.internal.core.text.build.PropertiesTextChangeListener;
 import org.eclipse.pde.internal.core.util.PDETextHelper;
@@ -476,7 +476,7 @@ public class UpdateSplashProgressOperation implements IWorkspaceRunnable {
 		pluginCustomModel.save();
 
 		// add the file to build.properties
-		IFile buildProps = fProject.getFile(ICoreConstants.BUILD_FILENAME_DESCRIPTOR);
+		IFile buildProps = PDEProject.getBuildProperties(fProject);
 		if (buildProps.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(buildProps);
 			model.load();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/NewTargetDefinitionWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/NewTargetDefinitionWizard.java
index ca5f6dd..060d37c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/NewTargetDefinitionWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/NewTargetDefinitionWizard.java
@@ -10,13 +10,12 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.wizards.target;
 
-import org.eclipse.pde.internal.core.target.WorkspaceFileTargetHandle;
-
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.pde.internal.core.PDECore;
+import org.eclipse.pde.internal.core.target.WorkspaceFileTargetHandle;
 import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.ui.*;
@@ -45,6 +44,15 @@ public class NewTargetDefinitionWizard extends BasicNewResourceWizard {
 			ITargetDefinition targetDef = ftargetCreationPage.createTarget(option);
 			fFilePath = fPage.getContainerFullPath().append(fPage.getFileName());
 			IFile targetFile = PDECore.getWorkspace().getRoot().getFile(fFilePath);
+			if (option == TargetDefinitionWizardPage.USE_EMPTY) {
+				//extract the file name
+				String name = targetFile.getName();
+				int index = name.lastIndexOf(targetFile.getFileExtension()) - 1;
+				if (index > 0) {
+					name = name.substring(0, index);
+					targetDef.setName(name);
+				}
+			}
 			WorkspaceFileTargetHandle wrkspcTargetHandle = new WorkspaceFileTargetHandle(targetFile);
 			wrkspcTargetHandle.save(targetDef);
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java
index f19113e..751a49f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/target/TargetDefinitionContentPage.java
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.debug.ui.StringVariableSelectionDialog;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo;
+import org.eclipse.equinox.frameworkadmin.BundleInfo;
 import org.eclipse.jdt.launching.JavaRuntime;
 import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
 import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
@@ -26,8 +26,7 @@ import org.eclipse.jface.viewers.*;
 import org.eclipse.jface.window.Window;
 import org.eclipse.pde.internal.core.ICoreConstants;
 import org.eclipse.pde.internal.core.PDECore;
-import org.eclipse.pde.internal.core.target.provisional.IResolvedBundle;
-import org.eclipse.pde.internal.core.target.provisional.ITargetDefinition;
+import org.eclipse.pde.internal.core.target.provisional.*;
 import org.eclipse.pde.internal.core.util.VMUtil;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.elements.DefaultTableProvider;
@@ -91,7 +90,7 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 
 	/**
 	 * Wrappers the default progress monitor to avoid opening a dialog if the
-	 * operation is blocked.  Instead the blocked message is set as a sbutask. 
+	 * operation is blocked.  Instead the blocked message is set as a subtask. 
 	 * See bug 276904 [Progress] WizardDialog opens second dialog when blocked
 	 */
 	class ResolutionProgressMonitor extends ProgressMonitorWrapper {
@@ -158,7 +157,7 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 		fLocationTab.setText(PDEUIMessages.LocationSection_0);
 
 		Composite pluginTabContainer = SWTFactory.createComposite(tabs, 1, 1, GridData.FILL_BOTH);
-		SWTFactory.createWrapLabel(pluginTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
+		SWTFactory.createWrapLabel(pluginTabContainer, PDEUIMessages.TargetDefinitionContentPage_LocationDescription, 2, 400);
 		fLocationTree = TargetLocationsGroup.createInDialog(pluginTabContainer);
 		fLocationTab.setControl(pluginTabContainer);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(pluginTabContainer, IHelpContextIds.EDIT_TARGET_WIZARD_LOCATIONS_TAB);
@@ -167,7 +166,7 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 		contentTab.setText(PDEUIMessages.TargetDefinitionContentPage_6);
 		Composite contentTabContainer = SWTFactory.createComposite(tabs, 1, 1, GridData.FILL_BOTH);
 		SWTFactory.createWrapLabel(contentTabContainer, PDEUIMessages.ContentSection_1, 2, 400);
-		fContentTree = new TargetContentsGroup(contentTabContainer);
+		fContentTree = TargetContentsGroup.createInDialog(contentTabContainer);
 		contentTab.setControl(contentTabContainer);
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(contentTabContainer, IHelpContextIds.EDIT_TARGET_WIZARD_CONTENT_TAB);
 
@@ -198,6 +197,7 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 	private void initializeListeners() {
 		ITargetChangedListener listener = new ITargetChangedListener() {
 			public void contentsChanged(ITargetDefinition definition, Object source, boolean resolve, boolean forceResolve) {
+				boolean setCancelled = false;
 				if (forceResolve || (resolve && !definition.isResolved())) {
 					try {
 						getContainer().run(true, true, new IRunnableWithProgress() {
@@ -211,11 +211,15 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 					} catch (InvocationTargetException e) {
 						PDECore.log(e);
 					} catch (InterruptedException e) {
-						// Do nothing, op cancelled
+						setCancelled = true;
 					}
 				}
 				if (fContentTree != source) {
-					fContentTree.setInput(definition);
+					if (setCancelled) {
+						fContentTree.setCancelled(); // If the user cancelled the resolve, change the text to say it was cancelled
+					} else {
+						fContentTree.setInput(definition);
+					}
 				}
 				if (fLocationTree != source) {
 					fLocationTree.setInput(definition);
@@ -254,6 +258,7 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 						} catch (InvocationTargetException e) {
 							PDECore.log(e);
 						} catch (InterruptedException e) {
+							fContentTree.setCancelled();
 							return Status.CANCEL_STATUS;
 						}
 					}
@@ -328,6 +333,8 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 
 		initializeChoices();
 
+		SWTFactory.createWrapLabel(group, PDEUIMessages.EnvironmentSection_description, 2);
+
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_os, 1);
 
 		fOSCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, (String[]) fOSChoices.toArray(new String[fOSChoices.size()]));
@@ -336,12 +343,6 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 				getTargetDefinition().setOS(getModelValue(fOSCombo.getText()));
 			}
 		});
-		// see bug 292068
-		fOSCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				getTargetDefinition().setOS(getModelValue(fOSCombo.getText()));
-			}
-		});
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_ws, 1);
 
@@ -351,12 +352,6 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 				getTargetDefinition().setWS(getModelValue(fWSCombo.getText()));
 			}
 		});
-		// see bug 292068
-		fWSCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				getTargetDefinition().setWS(getModelValue(fWSCombo.getText()));
-			}
-		});
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_arch, 1);
 
@@ -366,12 +361,6 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 				getTargetDefinition().setArch(getModelValue(fArchCombo.getText()));
 			}
 		});
-		// see bug 292068
-		fArchCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				getTargetDefinition().setArch(getModelValue(fArchCombo.getText()));
-			}
-		});
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_nl, 1);
 
@@ -385,16 +374,6 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 				getTargetDefinition().setNL(getModelValue(value));
 			}
 		});
-		// see bug 292068
-		fNLCombo.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				String value = fNLCombo.getText();
-				int index = value.indexOf("-"); //$NON-NLS-1$
-				if (index > 0)
-					value = value.substring(0, index);
-				getTargetDefinition().setNL(getModelValue(value));
-			}
-		});
 	}
 
 	/**
@@ -415,10 +394,10 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 	}
 
 	/**
-	 * Delimits a comma separated preference and add the items to the given set
-	 * @param set
-	 * @param preference
-	 */
+	* Delimits a comma separated preference and add the items to the given set
+	* @param set
+	* @param preference
+	*/
 	private void addExtraChoices(Set set, String preference) {
 		StringTokenizer tokenizer = new StringTokenizer(preference, ","); //$NON-NLS-1$
 		while (tokenizer.hasMoreTokens()) {
@@ -550,9 +529,9 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 			}
 		});
 
-		Button programVars = new Button(programGroup, SWT.NONE);
-		programVars.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-		programVars.setText(PDEUIMessages.JavaArgumentsTab_programVariables);
+		Composite programButtons = SWTFactory.createComposite(programGroup, 1, 1, GridData.HORIZONTAL_ALIGN_END, 0, 0);
+
+		Button programVars = SWTFactory.createPushButton(programButtons, PDEUIMessages.JavaArgumentsTab_programVariables, null, GridData.HORIZONTAL_ALIGN_END);
 		programVars.addSelectionListener(getVariablesListener(fProgramArgs));
 
 		Group vmGroup = new Group(container, SWT.NONE);
@@ -653,21 +632,21 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 			public Object[] getElements(Object inputElement) {
 				ITargetDefinition target = getTargetDefinition();
 				if (target != null) {
-					BundleInfo[] bundles = target.getImplicitDependencies();
+					NameVersionDescriptor[] bundles = target.getImplicitDependencies();
 					if (bundles != null) {
 						return bundles;
 					}
 				}
-				return new BundleInfo[0];
+				return new NameVersionDescriptor[0];
 			}
 		});
 		fElementViewer.setLabelProvider(new StyledBundleLabelProvider(false, false));
 		fElementViewer.setInput(PDEPlugin.getDefault());
 		fElementViewer.setComparator(new ViewerComparator() {
 			public int compare(Viewer viewer, Object e1, Object e2) {
-				BundleInfo bundle1 = (BundleInfo) e1;
-				BundleInfo bundle2 = (BundleInfo) e2;
-				return super.compare(viewer, bundle1.getSymbolicName(), bundle2.getSymbolicName());
+				NameVersionDescriptor bundle1 = (NameVersionDescriptor) e1;
+				NameVersionDescriptor bundle2 = (NameVersionDescriptor) e2;
+				return super.compare(viewer, bundle1.getId(), bundle2.getId());
 			}
 		});
 		fElementViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@@ -737,15 +716,15 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 			ArrayList pluginsToAdd = new ArrayList();
 			for (int i = 0; i < models.length; i++) {
 				BundleInfo desc = ((BundleInfo) models[i]);
-				pluginsToAdd.add(new BundleInfo(desc.getSymbolicName(), null, null, BundleInfo.NO_LEVEL, false));
+				pluginsToAdd.add(new NameVersionDescriptor(desc.getSymbolicName(), null));
 			}
 			Set allDependencies = new HashSet();
 			allDependencies.addAll(pluginsToAdd);
-			BundleInfo[] currentBundles = getTargetDefinition().getImplicitDependencies();
+			NameVersionDescriptor[] currentBundles = getTargetDefinition().getImplicitDependencies();
 			if (currentBundles != null) {
 				allDependencies.addAll(Arrays.asList(currentBundles));
 			}
-			getTargetDefinition().setImplicitDependencies((BundleInfo[]) allDependencies.toArray(new BundleInfo[allDependencies.size()]));
+			getTargetDefinition().setImplicitDependencies((NameVersionDescriptor[]) allDependencies.toArray(new NameVersionDescriptor[allDependencies.size()]));
 			fElementViewer.refresh();
 			updateImpButtons();
 		}
@@ -756,12 +735,12 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 	 * @return list of possible dependencies
 	 */
 	protected BundleInfo[] getValidBundles() throws CoreException {
-		BundleInfo[] current = getTargetDefinition().getImplicitDependencies();
+		NameVersionDescriptor[] current = getTargetDefinition().getImplicitDependencies();
 		Set currentBundles = new HashSet();
 		if (current != null) {
 			for (int i = 0; i < current.length; i++) {
-				if (!currentBundles.contains(current[i].getSymbolicName())) {
-					currentBundles.add(current[i].getSymbolicName());
+				if (!currentBundles.contains(current[i].getId())) {
+					currentBundles.add(current[i].getId());
 				}
 			}
 		}
@@ -788,11 +767,11 @@ public class TargetDefinitionContentPage extends TargetDefinitionPage {
 		Object[] removeBundles = ((IStructuredSelection) fElementViewer.getSelection()).toArray();
 		if (removeBundles.length > 0) {
 			for (int i = 0; i < removeBundles.length; i++) {
-				if (removeBundles[i] instanceof BundleInfo) {
+				if (removeBundles[i] instanceof NameVersionDescriptor) {
 					bundles.remove(removeBundles[i]);
 				}
 			}
-			getTargetDefinition().setImplicitDependencies((BundleInfo[]) bundles.toArray((new BundleInfo[bundles.size()])));
+			getTargetDefinition().setImplicitDependencies((NameVersionDescriptor[]) bundles.toArray((new NameVersionDescriptor[bundles.size()])));
 			fElementViewer.refresh();
 			updateImpButtons();
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java
index 4e13429..2aadfc5 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/ConvertProjectToPluginOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ import org.eclipse.pde.internal.core.bundle.WorkspaceBundlePluginModel;
 import org.eclipse.pde.internal.core.ibundle.IBundle;
 import org.eclipse.pde.internal.core.ibundle.IBundlePluginModelBase;
 import org.eclipse.pde.internal.core.natures.PDE;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.core.util.IdUtil;
 import org.eclipse.pde.internal.ui.PDEPlugin;
@@ -105,16 +106,16 @@ public class ConvertProjectToPluginOperation extends WorkspaceModifyOperation {
 		loadClasspathEntries(projectToConvert, monitor);
 		loadLibraryName(projectToConvert);
 
-		createManifestFile(projectToConvert.getFile(PDEModelUtility.F_MANIFEST_FP), monitor);
+		createManifestFile(PDEProject.getManifest(projectToConvert), monitor);
 
-		IFile buildFile = projectToConvert.getFile(PDEModelUtility.F_BUILD);
+		IFile buildFile = PDEProject.getBuildProperties(projectToConvert);
 		if (!buildFile.exists()) {
 			WorkspaceBuildModel model = new WorkspaceBuildModel(buildFile);
 			IBuild build = model.getBuild(true);
 			IBuildEntry entry = model.getFactory().createEntry(IBuildEntry.BIN_INCLUDES);
-			if (projectToConvert.getFile(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR).exists())
+			if (PDEProject.getPluginXml(projectToConvert).exists())
 				entry.addToken(ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR);
-			if (projectToConvert.getFile(ICoreConstants.BUNDLE_FILENAME_DESCRIPTOR).exists())
+			if (PDEProject.getManifest(projectToConvert).exists())
 				entry.addToken(ICoreConstants.MANIFEST_FOLDER_NAME);
 			for (int i = 0; i < fLibEntries.length; i++) {
 				entry.addToken(fLibEntries[i]);
@@ -191,7 +192,7 @@ public class ConvertProjectToPluginOperation extends WorkspaceModifyOperation {
 	}
 
 	private void organizeExports(final IProject project) {
-		PDEModelUtility.modifyModel(new ModelModification(project.getFile(PDEModelUtility.F_MANIFEST_FP)) {
+		PDEModelUtility.modifyModel(new ModelModification(PDEProject.getManifest(project)) {
 			protected void modifyModel(IBaseModel model, IProgressMonitor monitor) throws CoreException {
 				if (!(model instanceof IBundlePluginModelBase))
 					return;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
index 0f11678..5d90865 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.pde.core.plugin.*;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.ibundle.*;
 import org.eclipse.pde.internal.core.ischema.*;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.core.schema.SchemaRegistry;
 import org.eclipse.pde.internal.core.text.*;
 import org.eclipse.pde.internal.core.text.bundle.*;
@@ -188,8 +189,7 @@ public class OrganizeManifest implements IOrganizeManifestsSettings {
 		IExtensions ext = modelBase.getExtensions();
 		if (ext.getExtensionPoints().length > 0 || ext.getExtensions().length > 0)
 			return null;
-		String name = (modelBase instanceof IBundleFragmentModel) ? ICoreConstants.FRAGMENT_FILENAME_DESCRIPTOR : ICoreConstants.PLUGIN_FILENAME_DESCRIPTOR;
-		IFile pluginFile = project.getFile(name);
+		IFile pluginFile = (modelBase instanceof IBundleFragmentModel) ? PDEProject.getFragmentXml(project) : PDEProject.getPluginXml(project);
 		return new DeleteResourceChange(pluginFile.getFullPath(), true);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsAction.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsAction.java
index df1cda2..7442401 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
-import org.eclipse.pde.internal.core.ICoreConstants;
+import org.eclipse.pde.internal.core.project.PDEProject;
 import org.eclipse.pde.internal.ui.PDEPlugin;
 import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.refactoring.PDERefactor;
@@ -55,7 +55,7 @@ public class OrganizeManifestsAction implements IWorkbenchWindowActionDelegate {
 					proj = ((IFile) element).getProject();
 				else if (element instanceof IProject)
 					proj = (IProject) element;
-				if (proj != null && proj.exists(ICoreConstants.MANIFEST_PATH))
+				if (proj != null && PDEProject.getManifest(proj).exists())
 					projects.add(proj);
 			}
 			if (projects.size() > 0) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
index 67301ac..1226ada 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/tools/OrganizeManifestsWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,9 @@ package org.eclipse.pde.internal.ui.wizards.tools;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
-import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.internal.launching.ILaunchingPreferenceConstants;
+import org.eclipse.pde.internal.ui.IHelpContextIds;
+import org.eclipse.pde.internal.ui.PDEUIMessages;
 import org.eclipse.pde.internal.ui.refactoring.PDERefactor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
@@ -23,7 +25,7 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.ui.PlatformUI;
 
-public class OrganizeManifestsWizardPage extends UserInputWizardPage implements IPreferenceConstants, IOrganizeManifestsSettings {
+public class OrganizeManifestsWizardPage extends UserInputWizardPage implements ILaunchingPreferenceConstants, IOrganizeManifestsSettings {
 
 	private Button fRemoveUnresolved;
 	private Button fCalculateUses;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLaunchShortcut.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLaunchShortcut.java
index ff5f425..1b79410 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLaunchShortcut.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.debug.core.*;
 import org.eclipse.debug.ui.*;
 import org.eclipse.jface.window.Window;
 import org.eclipse.pde.internal.ui.*;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.ui.dialogs.ElementListSelectionDialog;
 
 /**
@@ -128,7 +129,7 @@ public abstract class AbstractLaunchShortcut implements ILaunchShortcut {
 		try {
 			ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
 			ILaunchConfigurationType type = lm.getLaunchConfigurationType(getLaunchConfigurationTypeName());
-			String name = lm.generateUniqueLaunchConfigurationNameFrom(getName(type));
+			String name = lm.generateLaunchConfigurationName(getName(type));
 			ILaunchConfigurationWorkingCopy wc = type.newInstance(null, name);
 			initializeConfiguration(wc);
 			// set a flag to know the information in the new config was generated by PDE
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLauncherTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLauncherTab.java
index 82042fb..34e6d4c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLauncherTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractLauncherTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2008 IBM Corporation and others.
+ *  Copyright (c) 2005, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -74,6 +74,13 @@ public abstract class AbstractLauncherTab extends AbstractLaunchConfigurationTab
 		super.updateLaunchConfigurationDialog();
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#scheduleUpdateJob()
+	 */
+	public void scheduleUpdateJob() {
+		super.scheduleUpdateJob();
+	}
+
 	/**
 	 * Validates the data entered on the tab.
 	 *
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfiguration.java
index 7a2bbcb..426837c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfiguration.java
@@ -10,414 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.jdt.core.IJavaModelMarker;
-import org.eclipse.jdt.launching.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.pde.core.plugin.TargetPlatform;
-import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.eclipse.pde.internal.core.builders.PDEMarkerFactory;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.*;
-
 /**
  * An abstract launch delegate for PDE-based launch configurations
  * <p>
  * Clients may subclass this class.
  * </p>
  * @since 3.2
+ * @deprecated use {@link org.eclipse.pde.launching.AbstractPDELaunchConfiguration}
+ * @see org.eclipse.pde.launching.AbstractPDELaunchConfiguration
  */
-public abstract class AbstractPDELaunchConfiguration extends LaunchConfigurationDelegate {
-
-	protected File fConfigDir = null;
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#isLaunchProblem(org.eclipse.core.resources.IMarker)
-	 */
-	protected boolean isLaunchProblem(IMarker problemMarker) throws CoreException {
-		return super.isLaunchProblem(problemMarker) && (problemMarker.getType().equals(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER) || problemMarker.getType().equals(PDEMarkerFactory.MARKER_ID));
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		try {
-			fConfigDir = null;
-			monitor.beginTask("", 4); //$NON-NLS-1$
-			try {
-				preLaunchCheck(configuration, launch, new SubProgressMonitor(monitor, 2));
-			} catch (CoreException e) {
-				if (e.getStatus().getSeverity() == IStatus.CANCEL) {
-					monitor.setCanceled(true);
-					return;
-				}
-				throw e;
-			}
-			// if restarting, remove the restart flag from the launch config
-			if (configuration.getAttribute(IPDEUIConstants.RESTART, false) && configuration instanceof ILaunchConfigurationWorkingCopy) {
-				((ILaunchConfigurationWorkingCopy) configuration).setAttribute(IPDEUIConstants.RESTART, false);
-				((ILaunchConfigurationWorkingCopy) configuration).doSave();
-			}
-			VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration));
-			runnerConfig.setVMArguments(getVMArguments(configuration));
-			runnerConfig.setProgramArguments(getProgramArguments(configuration));
-			runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath());
-			runnerConfig.setEnvironment(getEnvironment(configuration));
-			runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration));
-
-			monitor.worked(1);
-
-			setDefaultSourceLocator(configuration);
-			manageLaunch(launch);
-			IVMRunner runner = getVMRunner(configuration, mode);
-			if (runner != null)
-				runner.run(runnerConfig, launch, monitor);
-			else
-				monitor.setCanceled(true);
-			monitor.done();
-		} catch (final CoreException e) {
-			monitor.setCanceled(true);
-			LauncherUtils.getDisplay().syncExec(new Runnable() {
-				public void run() {
-					MessageDialog.openError(LauncherUtils.getActiveShell(), PDEUIMessages.Launcher_error_title, e.getMessage());
-				}
-			});
-		}
-	}
-
-	/**
-	 * Returns the VM runner for the given launch mode to use when launching the
-	 * given configuration.
-	 *  
-	 * @param configuration launch configuration
-	 * @param mode launch node
-	 * @return VM runner to use when launching the given configuration in the given mode
-	 * @throws CoreException if a VM runner cannot be determined
-	 */
-	public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
-		IVMInstall launcher = VMHelper.createLauncher(configuration);
-		return launcher.getVMRunner(mode);
-	}
-
-	/**
-	 * Assigns a default source locator to the given launch if a source locator
-	 * has not yet been assigned to it, and the associated launch configuration
-	 * does not specify a source locator.
-	 * 
-	 * @param configuration
-	 *            configuration being launched
-	 * @exception CoreException
-	 *                if unable to set the source locator
-	 */
-	protected void setDefaultSourceLocator(ILaunchConfiguration configuration) throws CoreException {
-		ILaunchConfigurationWorkingCopy wc = null;
-		if (configuration.isWorkingCopy()) {
-			wc = (ILaunchConfigurationWorkingCopy) configuration;
-		} else {
-			wc = configuration.getWorkingCopy();
-		}
-		String id = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null);
-		if (!PDESourcePathProvider.ID.equals(id)) {
-			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
-			wc.doSave();
-		}
-	}
-
-	/**
-	 * Returns the entries that should appear on boot classpath.
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the location of startup.jar and 
-	 * 		the bootstrap classpath specified by the given launch configuration
-	 *        
-	 * @exception CoreException
-	 *                if unable to find startup.jar
-	 */
-	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
-		String[] classpath = LaunchArgumentsHelper.constructClasspath(configuration);
-		if (classpath == null) {
-			String message = PDEUIMessages.WorkbenchLauncherConfigurationDelegate_noStartup;
-			throw new CoreException(LauncherUtils.createErrorStatus(message));
-		}
-		return classpath;
-	}
-
-	/** 
-	 * Returns an array of environment variables to be used when
-	 * launching the given configuration or <code>null</code> if unspecified.
-	 * 
-	 * @param configuration launch configuration
-	 * @throws CoreException if unable to access associated attribute or if
-	 * unable to resolve a variable in an environment variable's value
-	 */
-	public String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException {
-		return DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
-	}
-
-	/**
-	 * Returns the working directory path specified by the given launch
-	 * configuration, or <code>null</code> if none.
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the working directory path specified by the given launch
-	 *         configuration, or <code>null</code> if none
-	 * @exception CoreException
-	 *                if unable to retrieve the attribute
-	 */
-	public File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
-		return LaunchArgumentsHelper.getWorkingDirectory(configuration);
-	}
-
-	/**
-	 * Returns the Map of VM-specific attributes specified by the given launch
-	 * configuration, or <code>null</code> if none.
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the <code>Map</code> of VM-specific attributes
-	 * @exception CoreException
-	 *                if unable to retrieve the attribute
-	 */
-	public Map getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException {
-		return LaunchArgumentsHelper.getVMSpecificAttributesMap(configuration);
-	}
-
-	/**
-	 * Returns the VM arguments specified by the given launch configuration, as
-	 * an array of strings. 
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the VM arguments specified by the given launch configuration,
-	 *         possibly an empty array
-	 * @exception CoreException
-	 *                if unable to retrieve the attribute
-	 */
-	public String[] getVMArguments(ILaunchConfiguration configuration) throws CoreException {
-		String[] vmArgs = new ExecutionArguments(LaunchArgumentsHelper.getUserVMArguments(configuration), "").getVMArgumentsArray(); //$NON-NLS-1$
-		// For p2 target, add "-Declipse.p2.data.area=@config.dir/p2" unless already specified by user
-		Map bundleMap = BundleLauncherHelper.getMergedBundleMap(configuration, false);
-		if (bundleMap.containsKey("org.eclipse.equinox.p2.core")) { //$NON-NLS-1$
-			for (int i = 0; i < vmArgs.length; i++) {
-				String arg = vmArgs[i];
-				if (arg.startsWith("-Declipse.p2.data.area=")) { //$NON-NLS-1$
-					return vmArgs;
-				}
-			}
-			String[] temp = new String[vmArgs.length + 1];
-			System.arraycopy(vmArgs, 0, temp, 0, vmArgs.length);
-			temp[vmArgs.length] = "-Declipse.p2.data.area=@config.dir" + File.separator + "p2"; //$NON-NLS-1$ //$NON-NLS-2$
-			return temp;
-		}
-		return vmArgs;
-	}
-
-	/**
-	 * Returns the program arguments to launch with.
-	 * This list is a combination of arguments computed by PDE based on attributes
-	 * specified in the given launch configuration, followed by the program arguments
-	 * that the entered directly into the launch configuration.
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the program arguments necessary for launching
-	 * 
-	 * @exception CoreException
-	 *                if unable to retrieve the attribute or create the
-	 *                necessary configuration files      
-	 */
-	public String[] getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
-		ArrayList programArgs = new ArrayList();
-
-		// add tracing, if turned on	
-		if (configuration.getAttribute(IPDELauncherConstants.TRACING, false) && !IPDELauncherConstants.TRACING_NONE.equals(configuration.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null))) {
-			programArgs.add("-debug"); //$NON-NLS-1$
-			programArgs.add(LaunchArgumentsHelper.getTracingFileArgument(configuration, getConfigDir(configuration).toString() + IPath.SEPARATOR + ".options")); //$NON-NLS-1$
-		}
-
-		// add the program args specified by the user
-		String[] userArgs = LaunchArgumentsHelper.getUserProgramArgumentArray(configuration);
-		ArrayList userDefined = new ArrayList();
-		for (int i = 0; i < userArgs.length; i++) {
-			// be forgiving if people have tracing turned on and forgot
-			// to remove the -debug from the program args field.
-			if (userArgs[i].equals("-debug") && programArgs.contains("-debug")) //$NON-NLS-1$ //$NON-NLS-2$
-				continue;
-			userDefined.add(userArgs[i]);
-		}
-
-		if (!configuration.getAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, false)) {
-
-			if (!userDefined.contains("-os")) { //$NON-NLS-1$
-				programArgs.add("-os"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getOS());
-			}
-			if (!userDefined.contains("-ws")) { //$NON-NLS-1$
-				programArgs.add("-ws"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getWS());
-			}
-			if (!userDefined.contains("-arch")) { //$NON-NLS-1$
-				programArgs.add("-arch"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getOSArch());
-			}
-		}
-
-		if (userDefined.size() > 0) {
-			programArgs.addAll(userDefined);
-		}
-
-		return (String[]) programArgs.toArray(new String[programArgs.size()]);
-	}
-
-	/**
-	 * Does sanity checking before launching.  The criteria whether the launch should 
-	 * proceed or not is specific to the launch configuration type.
-	 * 
-	 * @param configuration launch configuration
-	 * @param launch the launch object to contribute processes and debug targets to
-	 * @param monitor a progress monitor
-	 * 
-	 * @throws CoreException exception thrown if launch fails or canceled or if unable to retrieve attributes
-	 * from the launch configuration
-	 * 				
-	 */
-	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		boolean autoValidate = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false);
-		monitor.beginTask("", autoValidate ? 3 : 4); //$NON-NLS-1$
-		if (autoValidate)
-			validatePluginDependencies(configuration, new SubProgressMonitor(monitor, 1));
-		validateProjectDependencies(configuration, new SubProgressMonitor(monitor, 1));
-		clear(configuration, new SubProgressMonitor(monitor, 1));
-		launch.setAttribute(IPDELauncherConstants.CONFIG_LOCATION, getConfigDir(configuration).toString());
-		synchronizeManifests(configuration, new SubProgressMonitor(monitor, 1));
-	}
-
-	/**
-	 * Returns the configuration area specified by the given launch
-	 * configuration.
-	 * 
-	 * @param configuration
-	 *            launch configuration
-	 * @return the directory path specified by the given launch
-	 *         configuration
-	 */
-	protected File getConfigDir(ILaunchConfiguration configuration) {
-		if (fConfigDir == null)
-			fConfigDir = LaunchConfigurationHelper.getConfigurationArea(configuration);
-		return fConfigDir;
-	}
-
-	/*
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
-		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException {
-		return LaunchPluginValidator.getAffectedProjects(configuration);
-	}
-
-	/**
-	 * Returns the fully-qualified name of the class to launch. 
-	 * 
-	 * @return the fully-qualified name of the class to launch.  Must not return <code>null</code>. 
-	 * @since 3.3
-	 */
-	public String getMainClass() {
-		if (TargetPlatformHelper.getTargetVersion() >= 3.3)
-			return "org.eclipse.equinox.launcher.Main"; //$NON-NLS-1$
-		return "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
-	}
-
-	/**
-	 * Adds a listener to the launch to be notified at interesting launch lifecycle
-	 * events such as when the launch terminates.
-	 * 
-	 * @param launch
-	 * 			the launch 		
-	 * 
-	 * @since 3.3	
-	 */
-	protected void manageLaunch(ILaunch launch) {
-		PDEPlugin.getDefault().getLaunchListener().manage(launch);
-	}
-
-	/**
-	 * Checks for old-style plugin.xml files that have become stale since the last launch.
-	 * For any stale plugin.xml files found, the corresponding MANIFEST.MF is deleted 
-	 * from the runtime configuration area so that it gets regenerated upon startup.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			a progress monitor
-	 * 
-	 * @since 3.3
-	 */
-	protected void synchronizeManifests(ILaunchConfiguration configuration, IProgressMonitor monitor) {
-		LaunchConfigurationHelper.synchronizeManifests(configuration, getConfigDir(configuration));
-		monitor.done();
-	}
-
-	/**
-	 * Checks if the Automated Management of Dependencies option is turned on.
-	 * If so, it makes aure all manifests are updated with the correct dependencies.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			a progress monitor
-	 * 
-	 * @since 3.3
-	 */
-	protected void validateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) {
-		LauncherUtils.validateProjectDependencies(configuration, monitor);
-	}
-
-	/**
-	 * By default, this method does nothing.  Clients should override, if appropriate.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			the progress monitor
-	 * @throws CoreException
-	 * 			if unable to retrieve launch attribute values
-	 * @since 3.3
-	 */
-	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-	}
-
-	/**
-	 * Validates inter-bundle dependencies automatically prior to launching
-	 * if that option is turned on.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			a progress monitor
-	 * @since 3.3
-	 */
-	protected void validatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		EclipsePluginValidationOperation op = new EclipsePluginValidationOperation(configuration);
-		LaunchPluginValidator.runValidationOperation(op, monitor);
-	}
+public abstract class AbstractPDELaunchConfiguration extends org.eclipse.pde.launching.AbstractPDELaunchConfiguration {
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfigurationTabGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfigurationTabGroup.java
index 70b80d9..ccfaa4d 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfigurationTabGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/AbstractPDELaunchConfigurationTabGroup.java
@@ -11,6 +11,9 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.launching.PDESourcePathProvider;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
@@ -18,9 +21,9 @@ import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
 import org.eclipse.debug.ui.ILaunchConfigurationTab;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
-import org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Display;
 
@@ -110,9 +113,9 @@ public abstract class AbstractPDELaunchConfigurationTabGroup extends AbstractLau
 	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
 		super.setDefaults(configuration);
 		if (TargetPlatformHelper.usesNewApplicationModel())
-			configuration.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$ 
+			configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$ 
 		else if (TargetPlatformHelper.getTargetVersion() >= 3.2)
-			configuration.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$ 
+			configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$ 
 
 		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
 
@@ -125,7 +128,7 @@ public abstract class AbstractPDELaunchConfigurationTabGroup extends AbstractLau
 		if (vmArgs.length() > 0)
 			configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs);
 
-		configuration.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
+		configuration.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/BundlesTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/BundlesTab.java
index 4361f88..08b7487 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/BundlesTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/BundlesTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,8 +15,8 @@ import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.OSGiBundleBlock;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkBlock;
+import org.eclipse.pde.internal.ui.launcher.*;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridLayout;
@@ -36,13 +36,16 @@ import org.eclipse.ui.PlatformUI;
 public class BundlesTab extends AbstractLauncherTab {
 
 	private Image fImage;
-	private OSGiBundleBlock fPluginBlock;
+	private BlockAdapter fBlock;
 	OSGiFrameworkBlock fFrameworkBlock;
 
+	private static final int PLUGIN_SELECTION = 1;
+	private static final int FEATURE_SELECTION = 2;
+
 	public BundlesTab() {
 		fImage = PDEPluginImages.DESC_PLUGINS_FRAGMENTS.createImage();
-		fPluginBlock = new OSGiBundleBlock(this);
-		fFrameworkBlock = new OSGiFrameworkBlock(this);
+		fBlock = new BlockAdapter(new OSGiBundleBlock(this), new FeatureBlock(this));
+		fFrameworkBlock = new OSGiFrameworkBlock(this, fBlock);
 	}
 
 	/**
@@ -50,7 +53,7 @@ public class BundlesTab extends AbstractLauncherTab {
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
 	 */
 	public void dispose() {
-		fPluginBlock.dispose();
+		fBlock.dispose();
 		fImage.dispose();
 		super.dispose();
 	}
@@ -64,7 +67,7 @@ public class BundlesTab extends AbstractLauncherTab {
 		composite.setLayout(new GridLayout(2, false));
 
 		fFrameworkBlock.createControl(composite);
-		fPluginBlock.createControl(composite, 2, 5);
+		fBlock.createControl(composite, 2, 5);
 
 		setControl(composite);
 		Dialog.applyDialogFont(composite);
@@ -78,8 +81,15 @@ public class BundlesTab extends AbstractLauncherTab {
 	 */
 	public void initializeFrom(ILaunchConfiguration config) {
 		try {
+			int index = PLUGIN_SELECTION;
+			if (config.getAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false)) {
+				index = FEATURE_SELECTION;
+			} else {
+				index = PLUGIN_SELECTION;
+			}
+			fBlock.setActiveBlock(index);
 			fFrameworkBlock.initializeFrom(config);
-			fPluginBlock.initializeFrom(config);
+			fBlock.initializeFrom(config);
 		} catch (CoreException e) {
 			PDEPlugin.log(e);
 		}
@@ -90,7 +100,7 @@ public class BundlesTab extends AbstractLauncherTab {
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
 	 */
 	public void setDefaults(ILaunchConfigurationWorkingCopy config) {
-		fPluginBlock.setDefaults(config);
+		fBlock.setDefaults(config);
 	}
 
 	/*
@@ -99,7 +109,7 @@ public class BundlesTab extends AbstractLauncherTab {
 	 */
 	public void performApply(ILaunchConfigurationWorkingCopy config) {
 		fFrameworkBlock.performApply(config);
-		fPluginBlock.performApply(config);
+		fBlock.performApply(config);
 	}
 
 	/*
@@ -138,5 +148,4 @@ public class BundlesTab extends AbstractLauncherTab {
 	public String getId() {
 		return IPDELauncherConstants.TAB_BUNDLES_ID;
 	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
index 1581298..350b7ca 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/ConfigurationTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,8 +15,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.ConfigurationAreaBlock;
-import org.eclipse.pde.internal.ui.launcher.ConfigurationTemplateBlock;
+import org.eclipse.pde.internal.ui.launcher.*;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
@@ -38,6 +37,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 
 	private ConfigurationAreaBlock fConfigurationArea;
 	private ConfigurationTemplateBlock fTemplateArea;
+	private SoftwareInstallBlock fSoftwareInstallArea;
 	private Image fImage;
 	private boolean fJUnitConfig;
 
@@ -59,6 +59,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 		fImage = PDEPluginImages.DESC_SETTINGS_OBJ.createImage();
 		fConfigurationArea = new ConfigurationAreaBlock(this);
 		fTemplateArea = new ConfigurationTemplateBlock(this);
+		fSoftwareInstallArea = new SoftwareInstallBlock(this);
 		fJUnitConfig = isJUnitConfig;
 	}
 
@@ -73,6 +74,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 
 		fConfigurationArea.createControl(container);
 		fTemplateArea.createControl(container);
+		fSoftwareInstallArea.createControl(container);
 
 		Dialog.applyDialogFont(container);
 		setControl(container);
@@ -85,6 +87,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
 		fConfigurationArea.setDefaults(configuration, fJUnitConfig);
 		fTemplateArea.setDefaults(configuration);
+		fSoftwareInstallArea.setDefaults(configuration);
 	}
 
 	/* (non-Javadoc)
@@ -94,6 +97,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 		try {
 			fConfigurationArea.initializeFrom(configuration);
 			fTemplateArea.initializeFrom(configuration);
+			fSoftwareInstallArea.initializeFrom(configuration);
 		} catch (CoreException e) {
 		}
 	}
@@ -105,6 +109,7 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		fConfigurationArea.performApply(configuration);
 		fTemplateArea.performApply(configuration);
+		fSoftwareInstallArea.performApply(configuration);
 	}
 
 	/*
@@ -142,6 +147,9 @@ public class ConfigurationTab extends AbstractLauncherTab implements IPDELaunche
 		String error = fConfigurationArea.validate();
 		if (error == null)
 			error = fTemplateArea.validate();
+		if (error == null) {
+			error = fSoftwareInstallArea.validate();
+		}
 		setErrorMessage(error);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java
index cd159b7..ce8d947 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java
@@ -23,9 +23,9 @@ import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.core.*;
 import org.eclipse.pde.internal.core.util.CoreUtility;
 import org.eclipse.pde.internal.core.util.VersionUtil;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.*;
 import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.internal.ui.launcher.*;
 import org.osgi.framework.Version;
 
 /**
@@ -34,6 +34,8 @@ import org.osgi.framework.Version;
  * Clients may subclass and instantiate this class.
  * </p>
  * @since 3.2
+ * @deprecated use {@link org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration}
+ * @see org.eclipse.pde.launching.AbstractPDELaunchConfiguration
  */
 public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConfiguration {
 
@@ -58,19 +60,19 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 		ArrayList programArgs = new ArrayList();
 
 		// If a product is specified, then add it to the program args
-		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
-			String product = configuration.getAttribute(IPDELauncherConstants.PRODUCT, ""); //$NON-NLS-1$
+		if (configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.USE_PRODUCT, false)) {
+			String product = configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.PRODUCT, ""); //$NON-NLS-1$
 			if (product.length() > 0) {
 				programArgs.add("-product"); //$NON-NLS-1$
 				programArgs.add(product);
 			} else { // TODO product w/o an application and product... how to handle gracefully?
 				programArgs.add("-application"); //$NON-NLS-1$
-				programArgs.add(configuration.getAttribute(IPDELauncherConstants.APPLICATION, "")); //$NON-NLS-1$
+				programArgs.add(configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.APPLICATION, "")); //$NON-NLS-1$
 			}
 		} else {
 			// specify the application to launch
 			programArgs.add("-application"); //$NON-NLS-1$
-			programArgs.add(configuration.getAttribute(IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication()));
+			programArgs.add(configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.APPLICATION, TargetPlatform.getDefaultApplication()));
 		}
 
 		// specify the workspace location for the runtime workbench
@@ -83,12 +85,12 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 		}
 
 		boolean showSplash = true;
-		if (configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
+		if (configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.USEFEATURES, false)) {
 			validateFeatures();
 			IPath installPath = PDEPlugin.getWorkspace().getRoot().getLocation();
 			programArgs.add("-install"); //$NON-NLS-1$
 			programArgs.add("file:" + installPath.removeLastSegments(1).addTrailingSeparator().toString()); //$NON-NLS-1$
-			if (!configuration.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
+			if (!configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
 				programArgs.add("-configuration"); //$NON-NLS-1$
 				programArgs.add("file:" + new Path(getConfigDir(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
 			}
@@ -158,7 +160,7 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 					|| !featuresPath.toFile().exists();
 		}
 		if (badStructure) {
-			throw new CoreException(LauncherUtils.createErrorStatus(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_badFeatureSetup));
+			throw new CoreException(LauncherUtils.createErrorStatus(PDEMessages.WorkbenchLauncherConfigurationDelegate_badFeatureSetup));
 		}
 		// Ensure important files are present
 		ensureProductFilesExist(getProductPath());
@@ -196,7 +198,7 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 	protected File getConfigDir(ILaunchConfiguration config) {
 		if (fConfigDir == null) {
 			try {
-				if (config.getAttribute(IPDELauncherConstants.USEFEATURES, false) && config.getAttribute(IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
+				if (config.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.USEFEATURES, false) && config.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_USE_DEFAULT_AREA, true)) {
 					String root = getProductPath().toString();
 					root += "/configuration"; //$NON-NLS-1$
 					fConfigDir = new File(root);
@@ -233,7 +235,7 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 			throw new CoreException(Status.CANCEL_STATUS);
 
 		// clear config area, if necessary
-		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
+		if (configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
 			CoreUtility.deleteContent(getConfigDir(configuration));
 	}
 
@@ -255,8 +257,8 @@ public class EclipseApplicationLaunchConfiguration extends AbstractPDELaunchConf
 	}
 
 	private void validateConfigIni(ILaunchConfiguration configuration) throws CoreException {
-		if (!configuration.getAttribute(IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
-			String templateLoc = configuration.getAttribute(IPDELauncherConstants.CONFIG_TEMPLATE_LOCATION, ""); //$NON-NLS-1$
+		if (!configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_GENERATE_DEFAULT, true)) {
+			String templateLoc = configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_TEMPLATE_LOCATION, ""); //$NON-NLS-1$
 			IStringVariableManager mgr = VariablesPlugin.getDefault().getStringVariableManager();
 			templateLoc = mgr.performStringSubstitution(templateLoc);
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLaunchShortcut.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLaunchShortcut.java
index 1f3b42a..f14c95e 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLaunchShortcut.java
@@ -25,9 +25,15 @@ import org.eclipse.pde.internal.core.DependencyManager;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
 import org.eclipse.pde.internal.core.product.WorkspaceProductModel;
 import org.eclipse.pde.internal.core.util.IdUtil;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.BundleLauncherHelper;
+import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
 import org.eclipse.pde.internal.ui.IPDEUIConstants;
 import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.launcher.*;
+import org.eclipse.pde.internal.ui.launcher.ApplicationSelectionDialog;
+import org.eclipse.pde.internal.ui.launcher.LaunchAction;
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.launching.PDESourcePathProvider;
 import org.eclipse.ui.IEditorPart;
 
 /**
@@ -41,7 +47,7 @@ import org.eclipse.ui.IEditorPart;
  */
 public class EclipseLaunchShortcut extends AbstractLaunchShortcut {
 
-	public static final String CONFIGURATION_TYPE = "org.eclipse.pde.ui.RuntimeWorkbench"; //$NON-NLS-1$
+	public static final String CONFIGURATION_TYPE = IPDELauncherConstants.ECLIPSE_APPLICATION_LAUNCH_CONFIGURATION_TYPE;
 
 	private IPluginModelBase fModel = null;
 
@@ -214,16 +220,16 @@ public class EclipseLaunchShortcut extends AbstractLaunchShortcut {
 	 */
 	protected void initializeConfiguration(ILaunchConfigurationWorkingCopy wc) {
 		if (TargetPlatformHelper.usesNewApplicationModel())
-			wc.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
+			wc.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$
 		else if (TargetPlatformHelper.getTargetVersion() >= 3.2)
-			wc.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$
+			wc.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$
 		wc.setAttribute(IPDELauncherConstants.LOCATION, LaunchArgumentsHelper.getDefaultWorkspaceLocation(wc.getName()));
 		initializeProgramArguments(wc);
 		initializeVMArguments(wc);
 		wc.setAttribute(IPDELauncherConstants.USEFEATURES, false);
 		wc.setAttribute(IPDELauncherConstants.DOCLEAR, false);
 		wc.setAttribute(IPDELauncherConstants.ASKCLEAR, true);
-		wc.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
+		wc.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
 		wc.setAttribute(IPDELauncherConstants.TRACING_CHECKED, IPDELauncherConstants.TRACING_NONE);
 		wc.setAttribute(IPDELauncherConstants.USE_DEFAULT, fApplicationName == null);
 		if (fApplicationName != null) {
@@ -281,7 +287,8 @@ public class EclipseLaunchShortcut extends AbstractLaunchShortcut {
 	private void initializePluginsList(ILaunchConfigurationWorkingCopy wc) {
 		StringBuffer wsplugins = new StringBuffer();
 		StringBuffer explugins = new StringBuffer();
-		Set plugins = DependencyManager.getSelfAndDependencies(fModel);
+		// exclude "org.eclipse.ui.workbench.compatibility" - it is only needed for pre-3.0 bundles
+		Set plugins = DependencyManager.getSelfAndDependencies(fModel, new String[] {"org.eclipse.ui.workbench.compatibility"}); //$NON-NLS-1$
 		Iterator iter = plugins.iterator();
 		while (iter.hasNext()) {
 			String id = iter.next().toString();
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLauncherTabGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLauncherTabGroup.java
index ce17b38..d964cfe 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLauncherTabGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseLauncherTabGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.*;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.pde.internal.launching.IPDEConstants;
 import org.eclipse.pde.internal.ui.IPDEUIConstants;
 
 /**
@@ -51,8 +52,8 @@ public class EclipseLauncherTabGroup extends AbstractPDELaunchConfigurationTabGr
 			// is present in the original copy.  We do this by querying the config twice, with different default values.  If the values == eachother, we 
 			// we know the value is present.  Since generated configs don't contain DOCLEARLOG, we know if DOCLEARLOG is present in the original copy the 
 			// perform apply so save the initialization values has already been run and this is a user modification.
-			boolean firstQuery = original.getAttribute(IPDEUIConstants.DOCLEARLOG, false);
-			boolean secondQuery = original.getAttribute(IPDEUIConstants.DOCLEARLOG, true);
+			boolean firstQuery = original.getAttribute(IPDEConstants.DOCLEARLOG, false);
+			boolean secondQuery = original.getAttribute(IPDEConstants.DOCLEARLOG, true);
 			if (original != null && firstQuery == secondQuery)
 				configuration.setAttribute(IPDEUIConstants.GENERATED_CONFIG, false);
 		} catch (CoreException e) {
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EquinoxLaunchConfiguration.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EquinoxLaunchConfiguration.java
index 2ee16f8..b1fad04 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EquinoxLaunchConfiguration.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EquinoxLaunchConfiguration.java
@@ -22,9 +22,9 @@ import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.internal.core.ClasspathHelper;
 import org.eclipse.pde.internal.core.P2Utils;
 import org.eclipse.pde.internal.core.util.CoreUtility;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
-import org.eclipse.pde.internal.ui.launcher.*;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.PDEMessages;
+import org.eclipse.pde.internal.launching.launcher.*;
 
 /**
  * A launch delegate for launching the Equinox framework
@@ -32,6 +32,8 @@ import org.eclipse.pde.internal.ui.launcher.*;
  * Clients may subclass and instantiate this class.
  * </p>
  * @since 3.2
+ * @deprecated use {@link org.eclipse.pde.launching.EquinoxLaunchConfiguration} instead.
+ * @see org.eclipse.pde.launching.EquinoxLaunchConfiguration
  */
 public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
 
@@ -68,9 +70,9 @@ public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
 		properties.setProperty("osgi.install.area", "file:" + TargetPlatform.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
 		properties.setProperty("osgi.configuration.cascaded", "false"); //$NON-NLS-1$ //$NON-NLS-2$
 		properties.put("osgi.framework", LaunchConfigurationHelper.getBundleURL(IPDEBuildConstants.BUNDLE_OSGI, fAllBundles, false)); //$NON-NLS-1$
-		int start = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
+		int start = configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
 		properties.put("osgi.bundles.defaultStartLevel", Integer.toString(start)); //$NON-NLS-1$
-		boolean autostart = configuration.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
+		boolean autostart = configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.DEFAULT_AUTO_START, true);
 
 		String bundles = null;
 		if (fAllBundles.containsKey(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
@@ -93,7 +95,7 @@ public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
 		if (bundles.length() > 0)
 			properties.put("osgi.bundles", bundles); //$NON-NLS-1$
 
-		if (!"3.3".equals(configuration.getAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, ""))) { //$NON-NLS-1$ //$NON-NLS-2$
+		if (!"3.3".equals(configuration.getAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, ""))) { //$NON-NLS-1$ //$NON-NLS-2$
 			properties.put("eclipse.ignoreApp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 			properties.put("osgi.noShutdown", "true"); //$NON-NLS-1$ //$NON-NLS-2$
 		}
@@ -169,7 +171,7 @@ public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
 				fModels.put(model, "default:default"); //$NON-NLS-1$
 				fAllBundles.put(IPDEBuildConstants.BUNDLE_OSGI, model);
 			} else {
-				String message = PDEUIMessages.EquinoxLaunchConfiguration_oldTarget;
+				String message = PDEMessages.EquinoxLaunchConfiguration_oldTarget;
 				throw new CoreException(LauncherUtils.createErrorStatus(message));
 			}
 		}
@@ -198,7 +200,7 @@ public class EquinoxLaunchConfiguration extends AbstractPDELaunchConfiguration {
 	 */
 	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
 		// clear config area, if necessary
-		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
+		if (configuration.getAttribute(org.eclipse.pde.launching.IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
 			CoreUtility.deleteContent(getConfigDir(configuration));
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/IPDELauncherConstants.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/IPDELauncherConstants.java
index c8b8c36..a664283 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/IPDELauncherConstants.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/IPDELauncherConstants.java
@@ -19,380 +19,9 @@ package org.eclipse.pde.ui.launcher;
  * 
  * @noimplement This interface is not intended to be implemented by clients.
  * @noextend This interface is not intended to be extended by clients.
+ * @deprecated use {@link org.eclipse.pde.launching.IPDELauncherConstants} instead.
+ * @see org.eclipse.pde.launching.IPDELauncherConstants
  */
-public interface IPDELauncherConstants {
+public interface IPDELauncherConstants extends org.eclipse.pde.launching.IPDELauncherConstants {
 
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * workspace data location for an Eclipse application.
-	 */
-	String LOCATION = "location"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * workspace data location for an Eclipse application should be cleared
-	 * prior to launching.
-	 */
-	String DOCLEAR = "clearws"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * whether the user should be prompted prior to clearing the workspace.
-	 * 
-	 * @see IPDELauncherConstants#DOCLEAR
-	 */
-	String ASKCLEAR = "askclear"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * the application to run.  If the value is <code>null</code>, the default 
-	 * application as specified in the target platform will be used.
-	 */
-	String APPLICATION = "application"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * the product to run.
-	 * 
-	 * @see IPDELauncherConstants#APPLICATION
-	 */
-	String PRODUCT = "product"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * if the launch should appear in product-mode.  If the value is <code>false</code>,
-	 * the launch takes place in application-mode.
-	 * 
-	 * @see IPDELauncherConstants#PRODUCT
-	 * @see IPDELauncherConstants#APPLICATION
-	 */
-	String USE_PRODUCT = "useProduct"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key used in Plug-in JUnit launch configurations only. 
-	 * The value is a string specifying the application to be tested.  
-	 * If the value is <code>null</code>, the default UI workbench application is tested.
-	 */
-	String APP_TO_TEST = "testApplication"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * the name of the VM to launch with.  If the value is <code>null</code>,
-	 * the default workspace VM is used.
-	 * 
-	 * @deprecated use IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH
-	 */
-	String VMINSTALL = "vminstall"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * the user-entered bootstrap classpath entries. 
-	 */
-	String BOOTSTRAP_ENTRIES = "bootstrap"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * if the default self-hosting mode should be used when launching.
-	 * The default being to launch with all workspace plug-ins and all the 
-	 * plug-ins that are explicitly checked on the Target Platform preference page.
-	 */
-	String USE_DEFAULT = "default"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * if the feature-based self-hosting mode should be used.
-	 * The workspace must be set up properly for the feature-based self-hosting
-	 * to succeed.
-	 * Check the PDE Tips and Tricks section for how to set up feature-based self-hosting.
-	 */
-	String USEFEATURES = "usefeatures"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * a comma-separated list of IDs of workspace plug-ins to launch with.
-	 * This value is only used when the Automatic Add option is off.
-	 * 
-	 * @see IPDELauncherConstants#AUTOMATIC_ADD
-	 */
-	String SELECTED_WORKSPACE_PLUGINS = "selected_workspace_plugins"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * a comma-separated list of IDs of workspace plug-ins that are to be excluded from
-	 * the launch.
-	 * This value is only used when the Automatic Add option is on.
-	 * 
-	 * @see IPDELauncherConstants#AUTOMATIC_ADD
-	 */
-	String DESELECTED_WORKSPACE_PLUGINS = "deselected_workspace_plugins"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * whether workspace plug-in created after the creation of a launch configuration
-	 * should be added to the list of plug-ins to launch with.
-	 * 
-	 * If the value is <code>true</code>, then DESELECTED_WORKSPACE_PLUGINS should be used.
-	 * Otherwise, SELECTED_WORKSPACE_PLUGINS should be used.
-	 * 
-	 * @see IPDELauncherConstants#DESELECTED_WORKSPACE_PLUGINS
-	 * @see IPDELauncherConstants#SELECTED_WORKSPACE_PLUGINS
-	 */
-	String AUTOMATIC_ADD = "automaticAdd"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying
-	 * whether the list of plug-ins to run should be validate prior to launching.
-	 * If problems are found, they will be reported and the user will be able to cancel or
-	 * continue.
-	 * If no problems are found, the launch continues as normal.
-	 */
-	String AUTOMATIC_VALIDATE = "automaticValidate"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying
-	 * a comma-separated list of IDs of target platform plug-ins to launch with.
-	 * This value is only used when the Automatic Add option is off.
-	 */
-	String SELECTED_TARGET_PLUGINS = "selected_target_plugins"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean indicating
-	 * whether the computation of required plug-ins on the Plug-ins tab should include
-	 * the traversal of optional dependencies.
-	 */
-	String INCLUDE_OPTIONAL = "includeOptional"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean indicating
-	 * whether tracing is enabled or disabled.
-	 */
-	String TRACING = "tracing"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a map containing the list
-	 * of options to debug with.
-	 */
-	String TRACING_OPTIONS = "tracingOptions"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is the id of the last plug-in 
-	 * that was selected on the Tracing tab.
-	 */
-	String TRACING_SELECTED_PLUGIN = "selectedPlugin"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is the IDs of all plug-ins
-	 * checked on the Tracing tab.  The value may also be "[NONE]"
-	 * 
-	 * @see IPDELauncherConstants#TRACING_NONE
-	 */
-	String TRACING_CHECKED = "checked"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute value indicating that, although tracing is enabled,
-	 * no plug-ins have been selected to be traced.
-	 */
-	String TRACING_NONE = "[NONE]"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying 
-	 * if PDE should generate a default configuration area for the launch.
-	 * 
-	 * If <code>true</code>, a configuration location in the PDE metadata area 
-	 * is created.  Otherwise, the user is expected to specify a location.
-	 * 
-	 * @see IPDELauncherConstants#CONFIG_LOCATION
-	 */
-	String CONFIG_USE_DEFAULT_AREA = "useDefaultConfigArea"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying 
-	 * the configuration area location for an Eclipse application launch.
-	 * 
-	 * This key is only used when CONFIG_USE_DEFAULT_AREA is <code>false</code>.
-	 * 
-	 * @see IPDELauncherConstants#CONFIG_USE_DEFAULT_AREA
-	 */
-	String CONFIG_LOCATION = "configLocation"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying 
-	 * if the configuration area location should be cleared prior to launching
-	*/
-	String CONFIG_CLEAR_AREA = "clearConfig"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration atribute key.  The value is a boolean specifying
-	 * if PDE should generate a default config.ini file for the launch.
-	 * 
-	 * If <code>true</code>, a configuration file is created.  
-	 * Otherwise, the user is expected to specify a config.ini to be used as a template.
-	 * 
-	 * @see IPDELauncherConstants#CONFIG_TEMPLATE_LOCATION
-	 */
-	String CONFIG_GENERATE_DEFAULT = "useDefaultConfig"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying 
-	 * the location of the config.ini file to be used as a template for an 
-	 * Eclipse application launch.
-	 * 
-	 * This key is only used when CONFIG_GENERATE_DEFAULT is <code>false</code>.
-	 * 
-	 * @see IPDELauncherConstants#CONFIG_GENERATE_DEFAULT
-	 */
-	String CONFIG_TEMPLATE_LOCATION = "templateConfig"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a string specifying 
-	 * the location of the .product file with which this launch configuration 
-	 * is associated.
-	 */
-	String PRODUCT_FILE = "productFile"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is the ID of an OSGi framework
-	 * declared in an <code>org.eclipse.pde.ui.osgiLaunchers</code> extension point.
-	 * 
-	 * @since 3.3
-	 */
-	String OSGI_FRAMEWORK_ID = "osgi_framework_id"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is a boolean specifying
-	 * if the default Auto-Start for an OSGi Framework launch configuration 
-	 * is <code>true</code> or <code>false</code>
-	 * 
-	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
-	 */
-	String DEFAULT_AUTO_START = "default_auto_start"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is an integer specifying
-	 * the default start level for bundles in an OSGi Framework launch configuration.
-	 * 
-	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
-	 */
-	String DEFAULT_START_LEVEL = "default_start_level"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is a comma-separated list
-	 * of workspace bundles to launch with the OSGi framework.
-	 * 
-	 * Each token in the list is of the format:
-	 * <plugin-id>@<start-level>:<auto-start>
-	 * 
-	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
-	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
-	 */
-	String WORKSPACE_BUNDLES = "workspace_bundles"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value is a comma-separated list
-	 * of non-workspace bundles to launch with the OSGi framework.
-	 * 
-	 * Each token in the list is of the format:
-	 * <plugin-id>@<start-level>:<auto-start>
-	 * 
-	 * @see IPDELauncherConstants#DEFAULT_AUTO_START
-	 * @see IPDELauncherConstants#DEFAULT_START_LEVEL
-	 */
-	String TARGET_BUNDLES = "target_bundles"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key.  The value can be either the full path
-	 * to the workspace location of a Target Definition (ie. .target file), or
-	 * the ID of a target defined in an org.eclipse.pde.core.targets extension.
-	 */
-	String DEFINED_TARGET = "defined_target"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean indicating
-	 * whether or not to display only selected plug-ins. 
-	 * 
-	 * @since 3.4
-	 */
-	String SHOW_SELECTED_ONLY = "show_selected_only"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the bundles tab
-	 * 
-	 * @since 3.5
-	 * @see BundlesTab
-	 */
-	String TAB_BUNDLES_ID = "org.eclipse.pde.ui.launch.tab.osgi.bundles"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the configuration tab
-	 * 
-	 * @since 3.5
-	 * @see ConfigurationTab
-	 */
-	String TAB_CONFIGURATION_ID = "org.eclipse.pde.ui.launch.tab.configuration"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the main tab
-	 * 
-	 * @since 3.5
-	 * @see MainTab
-	 */
-	String TAB_MAIN_ID = "org.eclipse.pde.ui.launch.tab.main"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the osgi settings tab
-	 * 
-	 * @since 3.5
-	 * @see OSGiSettingsTab
-	 */
-	String TAB_OSGI_SETTINGS_ID = "org.eclipse.pde.ui.launch.tab.osgi.settings"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the plug-in junit tab
-	 * 
-	 * @since 3.5
-	 * @see PluginJUnitMainTab
-	 */
-	String TAB_PLUGIN_JUNIT_MAIN_ID = "org.eclipse.pde.ui.launch.tab.junit.main"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the plug-ins tab
-	 * 
-	 * @since 3.5
-	 * @see PluginsTab
-	 */
-	String TAB_PLUGINS_ID = "org.eclipse.pde.ui.launch.tab.plugins"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the tracing tab
-	 * 
-	 * @since 3.5
-	 * @see TracingTab
-	 */
-	String TAB_TRACING_ID = "org.eclipse.pde.ui.launch.tab.tracing"; //$NON-NLS-1$
-
-	/**
-	 * The unique tab identifier for the tracing tab
-	 * 
-	 * @since 3.5
-	 * @see TestTab
-	 */
-	String TAB_TEST_ID = "org.eclipse.pde.ui.launch.tab.test"; //$NON-NLS-1$
-
-	/**
-	 * The launch configuration type id for OSGi launches.
-	 * 
-	 * @since 3.5
-	 * @see OSGiLaunchShortcut
-	 */
-	String OSGI_CONFIGURATION_TYPE = "org.eclipse.pde.ui.EquinoxLauncher"; //$NON-NLS-1$
-
-	/**
-	 * Launch configuration attribute key. The value is a boolean specifying 
-	 * whether the tests should run on the UI thread.
-	 * 
-	 * The default value is <code>true</code>
-	 * 
-	 * @since 3.5
-	 */
-	String RUN_IN_UI_THREAD = "run_in_ui_thread"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitLaunchConfigurationDelegate.java
index 6ee117d..34c81d2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitLaunchConfigurationDelegate.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitLaunchConfigurationDelegate.java
@@ -13,480 +13,13 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.*;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.internal.junit.launcher.*;
-import org.eclipse.jdt.launching.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.core.plugin.*;
-import org.eclipse.pde.internal.core.*;
-import org.eclipse.pde.internal.core.util.CoreUtility;
-import org.eclipse.pde.internal.core.util.VersionUtil;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.*;
-import org.osgi.framework.Version;
-
 /**
  * A launch delegate for launching JUnit Plug-in tests.
  *
  * @since 3.3
+ * @deprecated use {@link org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate} instead.
+ * @see org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate
  */
-public class JUnitLaunchConfigurationDelegate extends org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate {
-
-	/**
-	 * To avoid duplicating variable substitution (and duplicate prompts)
-	 * this variable will store the substituted workspace location.
-	 */
-	private String fWorkspaceLocation;
-
-	protected File fConfigDir = null;
-
-	// used to generate the dev classpath entries
-	// key is bundle ID, value is a model
-	private Map fAllBundles;
-
-	// key is a model, value is startLevel:autoStart
-	private Map fModels;
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMRunner(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
-		IVMInstall launcher = VMHelper.createLauncher(configuration);
-		return launcher.getVMRunner(mode);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String verifyMainTypeName(ILaunchConfiguration configuration) throws CoreException {
-		if (TargetPlatformHelper.getTargetVersion() >= 3.3)
-			return "org.eclipse.equinox.launcher.Main"; //$NON-NLS-1$
-		return "org.eclipse.core.launcher.Main"; //$NON-NLS-1$
-	}
-
-	private String getTestPluginId(ILaunchConfiguration configuration) throws CoreException {
-		IJavaProject javaProject = getJavaProject(configuration);
-		IPluginModelBase model = PluginRegistry.findModel(javaProject.getProject());
-		if (model == null)
-			abort(NLS.bind(PDEUIMessages.JUnitLaunchConfiguration_error_notaplugin, javaProject.getProject().getName()), null, IStatus.OK);
-		if (model instanceof IFragmentModel)
-			return ((IFragmentModel) model).getFragment().getPluginId();
-
-		return model.getPluginBase().getId();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.junit.launcher.JUnitBaseLaunchConfiguration#abort(java.lang.String, java.lang.Throwable, int)
-	 */
-	protected void abort(String message, Throwable exception, int code) throws CoreException {
-		throw new CoreException(new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, code, message, exception));
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#collectExecutionArguments(org.eclipse.debug.core.ILaunchConfiguration, java.util.List, java.util.List)
-	 */
-	protected void collectExecutionArguments(ILaunchConfiguration configuration, List/*String*/vmArguments, List/*String*/programArgs) throws CoreException {
-		super.collectExecutionArguments(configuration, vmArguments, programArgs);
-
-		// Specify the JUnit Plug-in test application to launch
-		programArgs.add("-application"); //$NON-NLS-1$
-		String application = getApplication(configuration);
-
-		programArgs.add(application);
-
-		// If a product is specified, then add it to the program args
-		if (configuration.getAttribute(IPDELauncherConstants.USE_PRODUCT, false)) {
-			programArgs.add("-product"); //$NON-NLS-1$
-			programArgs.add(configuration.getAttribute(IPDELauncherConstants.PRODUCT, "")); //$NON-NLS-1$
-		} else {
-			// Specify the application to test
-			String defaultApplication = IPDEUIConstants.CORE_TEST_APPLICATION.equals(application) ? null : TargetPlatform.getDefaultApplication();
-			String testApplication = configuration.getAttribute(IPDELauncherConstants.APP_TO_TEST, defaultApplication);
-			if (testApplication != null) {
-				programArgs.add("-testApplication"); //$NON-NLS-1$
-				programArgs.add(testApplication);
-			}
-		}
-
-		// Specify the location of the runtime workbench
-		if (fWorkspaceLocation == null) {
-			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
-		}
-		if (fWorkspaceLocation.length() > 0) {
-			programArgs.add("-data"); //$NON-NLS-1$
-			programArgs.add(fWorkspaceLocation);
-		}
-
-		// Create the platform configuration for the runtime workbench
-		String productID = LaunchConfigurationHelper.getProductID(configuration);
-		LaunchConfigurationHelper.createConfigIniFile(configuration, productID, fAllBundles, fModels, getConfigurationDirectory(configuration));
-		String brandingId = LaunchConfigurationHelper.getContributingPlugin(productID);
-		TargetPlatform.createPlatformConfiguration(getConfigurationDirectory(configuration), (IPluginModelBase[]) fAllBundles.values().toArray(new IPluginModelBase[fAllBundles.size()]), brandingId != null ? (IPluginModelBase) fAllBundles.get(brandingId) : null);
-		TargetPlatformHelper.checkPluginPropertiesConsistency(fAllBundles, getConfigurationDirectory(configuration));
-
-		programArgs.add("-configuration"); //$NON-NLS-1$
-		programArgs.add("file:" + new Path(getConfigurationDirectory(configuration).getPath()).addTrailingSeparator().toString()); //$NON-NLS-1$
-
-		// Specify the output folder names
-		programArgs.add("-dev"); //$NON-NLS-1$
-		programArgs.add(ClasspathHelper.getDevEntriesProperties(getConfigurationDirectory(configuration).toString() + "/dev.properties", fAllBundles)); //$NON-NLS-1$
-
-		// necessary for PDE to know how to load plugins when target platform = host platform
-		// see PluginPathFinder.getPluginPaths()
-		IPluginModelBase base = findPlugin(PDECore.PLUGIN_ID);
-		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) < 0) //$NON-NLS-1$
-			programArgs.add("-pdelaunch"); //$NON-NLS-1$				
-
-		// Create the .options file if tracing is turned on
-		if (configuration.getAttribute(IPDELauncherConstants.TRACING, false) && !IPDELauncherConstants.TRACING_NONE.equals(configuration.getAttribute(IPDELauncherConstants.TRACING_CHECKED, (String) null))) {
-			programArgs.add("-debug"); //$NON-NLS-1$
-			String path = getConfigurationDirectory(configuration).getPath() + IPath.SEPARATOR + ".options"; //$NON-NLS-1$
-			programArgs.add(LaunchArgumentsHelper.getTracingFileArgument(configuration, path));
-		}
-
-		// add the program args specified by the user
-		String[] userArgs = LaunchArgumentsHelper.getUserProgramArgumentArray(configuration);
-		for (int i = 0; i < userArgs.length; i++) {
-			// be forgiving if people have tracing turned on and forgot
-			// to remove the -debug from the program args field.
-			if (userArgs[i].equals("-debug") && programArgs.contains("-debug")) //$NON-NLS-1$ //$NON-NLS-2$
-				continue;
-			programArgs.add(userArgs[i]);
-		}
-
-		if (!configuration.getAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, false)) {
-			if (!programArgs.contains("-os")) { //$NON-NLS-1$
-				programArgs.add("-os"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getOS());
-			}
-			if (!programArgs.contains("-ws")) { //$NON-NLS-1$
-				programArgs.add("-ws"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getWS());
-			}
-			if (!programArgs.contains("-arch")) { //$NON-NLS-1$
-				programArgs.add("-arch"); //$NON-NLS-1$
-				programArgs.add(TargetPlatform.getOSArch());
-			}
-		}
-
-		programArgs.add("-testpluginname"); //$NON-NLS-1$
-		programArgs.add(getTestPluginId(configuration));
-	}
-
-	/**
-	 * Returns the application to launch plug-in tests with
-	 * 
-	 * @since 3.5
-	 * 
-	 * @param configuration
-	 * @return the application
-	 */
-	protected String getApplication(ILaunchConfiguration configuration) {
-		String application = null;
-
-		boolean shouldRunInUIThread = true;
-		try {
-			shouldRunInUIThread = configuration.getAttribute(IPDELauncherConstants.RUN_IN_UI_THREAD, true);
-		} catch (CoreException e) {
-		}
-
-		if (!shouldRunInUIThread) {
-			return IPDEUIConstants.NON_UI_THREAD_APPLICATION;
-		}
-
-		try {
-			// if application is set, it must be a headless app.
-			application = configuration.getAttribute(IPDELauncherConstants.APPLICATION, (String) null);
-		} catch (CoreException e) {
-		}
-
-		// if application is not set, we should launch the default UI test app
-		// Check to see if we should launch the legacy UI app
-		if (application == null) {
-			IPluginModelBase model = (IPluginModelBase) fAllBundles.get("org.eclipse.pde.junit.runtime"); //$NON-NLS-1$
-			BundleDescription desc = model != null ? model.getBundleDescription() : null;
-			if (desc != null) {
-				Version version = desc.getVersion();
-				int major = version.getMajor();
-				// launch legacy UI app only if we are launching a target that does 
-				// not use the new application model and we are launching with a 
-				// org.eclipse.pde.junit.runtime whose version is >= 3.3
-				if (major >= 3 && version.getMinor() >= 3 && !TargetPlatformHelper.usesNewApplicationModel()) {
-					application = IPDEUIConstants.LEGACY_UI_TEST_APPLICATION;
-				}
-			}
-		}
-
-		// launch the UI test application
-		if (application == null)
-			application = IPDEUIConstants.UI_TEST_APPLICATION;
-		return application;
-	}
-
-	private IPluginModelBase findPlugin(String id) throws CoreException {
-		IPluginModelBase model = PluginRegistry.findModel(id);
-		if (model == null)
-			model = PDECore.getDefault().findPluginInHost(id);
-		if (model == null)
-			abort(NLS.bind(PDEUIMessages.JUnitLaunchConfiguration_error_missingPlugin, id), null, IStatus.OK);
-		return model;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
-		return LaunchArgumentsHelper.getUserProgramArguments(configuration);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMArguments(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String getVMArguments(ILaunchConfiguration configuration) throws CoreException {
-		String vmArgs = LaunchArgumentsHelper.getUserVMArguments(configuration);
-
-		// necessary for PDE to know how to load plugins when target platform = host platform
-		IPluginModelBase base = (IPluginModelBase) fAllBundles.get(PDECore.PLUGIN_ID);
-		if (base != null && VersionUtil.compareMacroMinorMicro(base.getBundleDescription().getVersion(), new Version("3.3.1")) >= 0) { //$NON-NLS-1$
-			vmArgs = concatArg(vmArgs, "-Declipse.pde.launch=true"); //$NON-NLS-1$
-		}
-		// For p2 target, add "-Declipse.p2.data.area=@config.dir/p2" unless already specified by user
-		if (fAllBundles.containsKey("org.eclipse.equinox.p2.core")) { //$NON-NLS-1$
-			if (vmArgs.indexOf("-Declipse.p2.data.area=") < 0) { //$NON-NLS-1$
-				vmArgs = concatArg(vmArgs, "-Declipse.p2.data.area=@config.dir" + File.separator + "p2"); //$NON-NLS-1$ //$NON-NLS-2$
-			}
-		}
-		return vmArgs;
-	}
-
-	/**
-	 * Returns the result of concatenating the given argument to the
-	 * specified vmArgs.
-	 * 
-	 * @param vmArgs existing VM arguments
-	 * @param arg argument to concatenate
-	 * @return result of concatenation
-	 */
-	private String concatArg(String vmArgs, String arg) {
-		if (vmArgs.length() > 0 && !vmArgs.endsWith(" ")) //$NON-NLS-1$
-			vmArgs = vmArgs.concat(" "); //$NON-NLS-1$
-		return vmArgs.concat(arg);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getEnvironment(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String[] getEnvironment(ILaunchConfiguration configuration) throws CoreException {
-		return DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getClasspath(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
-		String[] classpath = LaunchArgumentsHelper.constructClasspath(configuration);
-		if (classpath == null) {
-			abort(PDEUIMessages.WorkbenchLauncherConfigurationDelegate_noStartup, null, IStatus.OK);
-		}
-		return classpath;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public File getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
-		return LaunchArgumentsHelper.getWorkingDirectory(configuration);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getVMSpecificAttributesMap(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public Map getVMSpecificAttributesMap(ILaunchConfiguration configuration) throws CoreException {
-		return LaunchArgumentsHelper.getVMSpecificAttributesMap(configuration);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#setDefaultSourceLocator(org.eclipse.debug.core.ILaunch, org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	protected void setDefaultSourceLocator(ILaunch launch, ILaunchConfiguration configuration) throws CoreException {
-		ILaunchConfigurationWorkingCopy wc = null;
-		if (configuration.isWorkingCopy()) {
-			wc = (ILaunchConfigurationWorkingCopy) configuration;
-		} else {
-			wc = configuration.getWorkingCopy();
-		}
-		String id = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, (String) null);
-		if (!PDESourcePathProvider.ID.equals(id)) {
-			wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
-			wc.doSave();
-		}
-
-		manageLaunch(launch);
-	}
-
-	/**
-	 * Returns the location of the configuration area
-	 * 
-	 * @param configuration
-	 * 				the launch configuration
-	 * @return a directory where the configuration area is located
-	 */
-	protected File getConfigurationDirectory(ILaunchConfiguration configuration) {
-		if (fConfigDir == null)
-			fConfigDir = LaunchConfigurationHelper.getConfigurationArea(configuration);
-		return fConfigDir;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
-		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate#getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getProjectsForProblemSearch(ILaunchConfiguration configuration, String mode) throws CoreException {
-		return LaunchPluginValidator.getAffectedProjects(configuration);
-	}
-
-	/**
-	 * Adds a listener to the launch to be notified at interesting launch lifecycle
-	 * events such as when the launch terminates.
-	 * 
-	 * @param launch
-	 * 			the launch 			
-	 */
-	protected void manageLaunch(ILaunch launch) {
-		PDEPlugin.getDefault().getLaunchListener().manage(launch);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected void preLaunchCheck(ILaunchConfiguration configuration, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		fWorkspaceLocation = null;
-		fModels = BundleLauncherHelper.getMergedBundleMap(configuration, false);
-		fAllBundles = new HashMap(fModels.size());
-		Iterator iter = fModels.keySet().iterator();
-		while (iter.hasNext()) {
-			IPluginModelBase model = (IPluginModelBase) iter.next();
-			fAllBundles.put(model.getPluginBase().getId(), model);
-		}
-
-		// implicitly add the plug-ins required for JUnit testing if necessary
-		String[] requiredPlugins = getRequiredPlugins(configuration);
-		for (int i = 0; i < requiredPlugins.length; i++) {
-			String id = requiredPlugins[i];
-			if (!fAllBundles.containsKey(id)) {
-				IPluginModelBase model = findPlugin(id);
-				fAllBundles.put(id, model);
-				fModels.put(model, "default:default"); //$NON-NLS-1$
-			}
-		}
-
-		boolean autoValidate = configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_VALIDATE, false);
-		monitor.beginTask("", autoValidate ? 3 : 4); //$NON-NLS-1$
-		if (autoValidate)
-			validatePluginDependencies(configuration, new SubProgressMonitor(monitor, 1));
-		validateProjectDependencies(configuration, new SubProgressMonitor(monitor, 1));
-		clear(configuration, new SubProgressMonitor(monitor, 1));
-		launch.setAttribute(IPDELauncherConstants.CONFIG_LOCATION, getConfigurationDirectory(configuration).toString());
-		synchronizeManifests(configuration, new SubProgressMonitor(monitor, 1));
-	}
-
-	private String[] getRequiredPlugins(ILaunchConfiguration configuration) {
-		// if we are using JUnit4, we need to include the junit4 specific bundles
-		ITestKind testKind = JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
-		if (TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId()))
-			return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime", "org.junit4", "org.eclipse.jdt.junit4.runtime"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-		return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-	}
-
-	/**
-	 * Checks for old-style plugin.xml files that have become stale since the last launch.
-	 * For any stale plugin.xml files found, the corresponding MANIFEST.MF is deleted 
-	 * from the runtime configuration area so that it gets regenerated upon startup.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			the progress monitor
-	 */
-	protected void synchronizeManifests(ILaunchConfiguration configuration, IProgressMonitor monitor) {
-		LaunchConfigurationHelper.synchronizeManifests(configuration, getConfigurationDirectory(configuration));
-		monitor.done();
-	}
-
-	/**
-	 * Clears the workspace prior to launching if the workspace exists and the option to 
-	 * clear it is turned on.  Also clears the configuration area if that option is chosen.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			the progress monitor
-	 * @throws CoreException
-	 * 			if unable to retrieve launch attribute values
-	 * @since 3.3
-	 */
-	protected void clear(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		if (fWorkspaceLocation == null) {
-			fWorkspaceLocation = LaunchArgumentsHelper.getWorkspaceLocation(configuration);
-		}
-		// Clear workspace and prompt, if necessary
-		if (!LauncherUtils.clearWorkspace(configuration, fWorkspaceLocation, new SubProgressMonitor(monitor, 1))) {
-			monitor.setCanceled(true);
-			return;
-		}
-
-		// clear config area, if necessary
-		if (configuration.getAttribute(IPDELauncherConstants.CONFIG_CLEAR_AREA, false))
-			CoreUtility.deleteContent(getConfigurationDirectory(configuration));
-	}
-
-	/**
-	 * Checks if the Automated Management of Dependencies option is turned on.
-	 * If so, it makes aure all manifests are updated with the correct dependencies.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			a progress monitor
-	 */
-	protected void validateProjectDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) {
-		LauncherUtils.validateProjectDependencies(configuration, monitor);
-	}
+public class JUnitLaunchConfigurationDelegate extends org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate {
 
-	/**
-	 * Validates inter-bundle dependencies automatically prior to launching
-	 * if that option is turned on.
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @param monitor
-	 * 			a progress monitor
-	 */
-	protected void validatePluginDependencies(ILaunchConfiguration configuration, IProgressMonitor monitor) throws CoreException {
-		EclipsePluginValidationOperation op = new EclipsePluginValidationOperation(configuration);
-		LaunchPluginValidator.runValidationOperation(op, monitor);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitTabGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitTabGroup.java
index 6ac2937..a55eaaa 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitTabGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitTabGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ public class JUnitTabGroup extends AbstractPDELaunchConfigurationTabGroup {
 	 */
 	public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
 		ILaunchConfigurationTab[] tabs = null;
-		tabs = new ILaunchConfigurationTab[] {new TestTab(), new PluginJUnitMainTab(), new JavaArgumentsTab(), new PluginsTab(false), new ConfigurationTab(true), new TracingTab(), new EnvironmentTab(), new CommonTab()};
+		tabs = new ILaunchConfigurationTab[] {new TestTab(), new PluginJUnitMainTab(), new JavaArgumentsTab(), new PluginsTab(), new ConfigurationTab(true), new TracingTab(), new EnvironmentTab(), new CommonTab()};
 		setTabs(tabs);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitWorkbenchLaunchShortcut.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitWorkbenchLaunchShortcut.java
index 98ab4e5..7cec14f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitWorkbenchLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/JUnitWorkbenchLaunchShortcut.java
@@ -10,6 +10,9 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+import org.eclipse.pde.launching.PDESourcePathProvider;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jdt.core.IJavaElement;
@@ -17,9 +20,9 @@ import org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.pde.core.plugin.TargetPlatform;
 import org.eclipse.pde.internal.core.TargetPlatformHelper;
-import org.eclipse.pde.internal.ui.IPDEUIConstants;
-import org.eclipse.pde.internal.ui.launcher.LaunchArgumentsHelper;
-import org.eclipse.pde.internal.ui.launcher.LauncherUtils;
+import org.eclipse.pde.internal.launching.IPDEConstants;
+import org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper;
+import org.eclipse.pde.internal.launching.launcher.LauncherUtils;
 
 /**
  * A launch shortcut capable of launching a Plug-in JUnit test.
@@ -43,13 +46,13 @@ public class JUnitWorkbenchLaunchShortcut extends JUnitLaunchShortcut {
 	protected ILaunchConfigurationWorkingCopy createLaunchConfiguration(IJavaElement element) throws CoreException {
 		ILaunchConfigurationWorkingCopy configuration = super.createLaunchConfiguration(element);
 		if (TargetPlatformHelper.usesNewApplicationModel())
-			configuration.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$ 
+			configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.3"); //$NON-NLS-1$ 
 		else if (TargetPlatformHelper.getTargetVersion() >= 3.2)
-			configuration.setAttribute(IPDEUIConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$
+			configuration.setAttribute(IPDEConstants.LAUNCHER_PDE_VERSION, "3.2a"); //$NON-NLS-1$
 		configuration.setAttribute(IPDELauncherConstants.LOCATION, LaunchArgumentsHelper.getDefaultJUnitWorkspaceLocation());
 		configuration.setAttribute(IPDELauncherConstants.DOCLEAR, true);
 		configuration.setAttribute(IPDELauncherConstants.ASKCLEAR, false);
-		configuration.setAttribute(IPDEUIConstants.APPEND_ARGS_EXPLICITLY, true);
+		configuration.setAttribute(IPDEConstants.APPEND_ARGS_EXPLICITLY, true);
 
 		// Program to launch
 		if (LauncherUtils.requiresUI(configuration)) {
@@ -59,7 +62,7 @@ public class JUnitWorkbenchLaunchShortcut extends JUnitLaunchShortcut {
 				configuration.setAttribute(IPDELauncherConstants.PRODUCT, product);
 			}
 		} else {
-			configuration.setAttribute(IPDELauncherConstants.APPLICATION, IPDEUIConstants.CORE_TEST_APPLICATION);
+			configuration.setAttribute(IPDELauncherConstants.APPLICATION, IPDEConstants.CORE_TEST_APPLICATION);
 		}
 
 		// Plug-ins to launch
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationDelegate.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationDelegate.java
index 6b985a1..f22bf9c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationDelegate.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationDelegate.java
@@ -10,52 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.LaunchPluginValidator;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
-
 /**
  * A launch delegate for launching OSGi frameworks
  * <p>
  * Clients may subclass and instantiate this class.
  * </p>
  * @since 3.3
+ * @deprecated use {@link org.eclipse.pde.launching.OSGiLaunchConfigurationDelegate} instead.
+ * @see org.eclipse.pde.launching.OSGiLaunchConfigurationDelegate
  */
-public class OSGiLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
-
-	/**
-	 * Delegates to the launcher delegate associated with the OSGi framework
-	 * selected in the launch configuration.
-	 * 
-	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
-		String id = configuration.getAttribute(IPDELauncherConstants.OSGI_FRAMEWORK_ID, manager.getDefaultFramework());
-		LaunchConfigurationDelegate launcher = manager.getFrameworkLauncher(id);
-		if (launcher != null) {
-			launcher.launch(configuration, mode, launch, monitor);
-		} else {
-			String name = manager.getFrameworkName(id);
-			if (name == null)
-				name = PDEUIMessages.OSGiLaunchConfiguration_selected;
-			String message = NLS.bind(PDEUIMessages.OSGiLaunchConfiguration_cannotFindLaunchConfiguration, name);
-			IStatus status = new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, IStatus.OK, message, null);
-			throw new CoreException(status);
-		}
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
-		return computeBuildOrder(LaunchPluginValidator.getAffectedProjects(configuration));
-	}
+public class OSGiLaunchConfigurationDelegate extends org.eclipse.pde.launching.OSGiLaunchConfigurationDelegate {
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationInitializer.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationInitializer.java
index 744cc1f..2979d01 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationInitializer.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchConfigurationInitializer.java
@@ -10,12 +10,6 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.pde.core.plugin.IPluginModelBase;
-import org.eclipse.pde.core.plugin.PluginRegistry;
-import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
-
 /**
  * Initializes launch configuration attributes for newly-created OSGi Framework 
  * launch configurations
@@ -25,90 +19,9 @@ import org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper;
  * </p>
  * 
  * @since 3.3
+ * @deprecated use {@link org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer} instead.
+ * @see org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer
  */
-public class OSGiLaunchConfigurationInitializer {
-
-	protected static final String DEFAULT = "default"; //$NON-NLS-1$
-
-	/**
-	 * Initializes some attributes on a newly-created launch configuration
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 */
-	public void initialize(ILaunchConfigurationWorkingCopy configuration) {
-		initializeFrameworkDefaults(configuration);
-		initializeBundleState(configuration);
-		initializeSourcePathProvider(configuration);
-	}
-
-	/**
-	 * Sets the source provider ID
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 */
-	protected void initializeSourcePathProvider(ILaunchConfigurationWorkingCopy configuration) {
-		configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH_PROVIDER, PDESourcePathProvider.ID);
-	}
-
-	/**
-	 * Initializes the start level and auto-start attributes
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 */
-	protected void initializeFrameworkDefaults(ILaunchConfigurationWorkingCopy configuration) {
-		configuration.setAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, true);
-		configuration.setAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
-	}
-
-	/**
-	 * Initializes the checked/unchecked state of bundles
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 */
-	protected void initializeBundleState(ILaunchConfigurationWorkingCopy configuration) {
-		StringBuffer explugins = new StringBuffer();
-		StringBuffer wsplugins = new StringBuffer();
-		IPluginModelBase[] models = PluginRegistry.getActiveModels();
-		for (int i = 0; i < models.length; i++) {
-			boolean inWorkspace = models[i].getUnderlyingResource() != null;
-			appendBundle(inWorkspace ? wsplugins : explugins, models[i]);
-		}
-		configuration.setAttribute(IPDELauncherConstants.WORKSPACE_BUNDLES, wsplugins.toString());
-		configuration.setAttribute(IPDELauncherConstants.TARGET_BUNDLES, explugins.toString());
-		configuration.setAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true);
-	}
-
-	private void appendBundle(StringBuffer buffer, IPluginModelBase model) {
-		if (buffer.length() > 0)
-			buffer.append(","); //$NON-NLS-1$
-		String id = model.getPluginBase().getId();
-		String value = BundleLauncherHelper.writeBundleEntry(model, getStartLevel(id), getAutoStart(id));
-		buffer.append(value);
-	}
-
-	/**
-	 * Returns the bundle's start level
-	 * 
-	 * @param bundleID
-	 * 			the bundle ID
-	 * @return the start level for the given bundle or the string <code>default</code>
-	 */
-	protected String getStartLevel(String bundleID) {
-		return DEFAULT;
-	}
-
-	/**
-	 * Returns whether the bundle should be started automatically
-	 * @param bundleID
-	 * 			the bundle ID
-	 * @return <code>true</code>, <code>false</code>, or <code>default</code>
-	 */
-	protected String getAutoStart(String bundleID) {
-		return DEFAULT;
-	}
+public class OSGiLaunchConfigurationInitializer extends org.eclipse.pde.launching.OSGiLaunchConfigurationInitializer {
 
 }
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchShortcut.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchShortcut.java
index 864e957..96b198f 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchShortcut.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLaunchShortcut.java
@@ -10,11 +10,13 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
 import org.eclipse.ui.IEditorPart;
 
 /**
@@ -59,7 +61,7 @@ public class OSGiLaunchShortcut extends AbstractLaunchShortcut {
 	 * @see org.eclipse.pde.ui.launcher.AbstractLaunchShortcut#initializeConfiguration(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
 	 */
 	protected void initializeConfiguration(ILaunchConfigurationWorkingCopy configuration) {
-		OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
+		OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager();
 		manager.getDefaultInitializer().initialize(configuration);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLauncherTabGroup.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLauncherTabGroup.java
index 150f1d4..611da43 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLauncherTabGroup.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiLauncherTabGroup.java
@@ -13,8 +13,8 @@ package org.eclipse.pde.ui.launcher;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.*;
 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
+import org.eclipse.pde.internal.launching.PDELaunchingPlugin;
+import org.eclipse.pde.internal.launching.launcher.OSGiFrameworkManager;
 
 /**
  * Creates and initializes the tabs on the OSGi Framework launch configuration.
@@ -49,7 +49,7 @@ public class OSGiLauncherTabGroup extends AbstractLaunchConfigurationTabGroup {
 	 */
 	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
 		super.setDefaults(configuration);
-		OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
+		OSGiFrameworkManager manager = PDELaunchingPlugin.getDefault().getOSGiFrameworkManager();
 		manager.getDefaultInitializer().initialize(configuration);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiSettingsTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiSettingsTab.java
index 06060bf..98498d2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiSettingsTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/OSGiSettingsTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PDESourcePathProvider.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PDESourcePathProvider.java
index c76cead..6b11c0c 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PDESourcePathProvider.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PDESourcePathProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,130 +10,15 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.core.*;
-import org.eclipse.jdt.launching.*;
-import org.eclipse.pde.internal.core.util.PDEJavaHelper;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.launcher.LaunchPluginValidator;
-import org.eclipse.pde.internal.ui.launcher.VMHelper;
-
 /**
  * Generates a source lookup path for all PDE-based launch configurations
  * <p>
  * Clients may subclass this class.
  * </p>
  * @since 3.3
+ * @deprecated use {@link org.eclipse.pde.launching.PDESourcePathProvider} instead.
+ * @see org.eclipse.pde.launching.PDESourcePathProvider
  */
-public class PDESourcePathProvider extends StandardSourcePathProvider {
-
-	public static final String ID = "org.eclipse.pde.ui.workbenchClasspathProvider"; //$NON-NLS-1$
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.StandardSourcePathProvider#computeUnresolvedClasspath(org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
-		List sourcePath = new ArrayList();
-		sourcePath.add(getJREEntry(configuration));
-		IProject[] projects = getJavaProjects(configuration);
-		for (int i = 0; i < projects.length; i++) {
-			sourcePath.add(JavaRuntime.newProjectRuntimeClasspathEntry(JavaCore.create(projects[i])));
-		}
-		return (IRuntimeClasspathEntry[]) sourcePath.toArray(new IRuntimeClasspathEntry[sourcePath.size()]);
-	}
-
-	/**
-	 * Returns a JRE runtime classpath entry
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @return a JRE runtime classpath entry
-	 * @throws CoreException
-	 * 			if the JRE associated with the launch configuration cannot be found
-	 * 			or if unable to retrieve the launch configuration attributes
-	 */
-	private IRuntimeClasspathEntry getJREEntry(ILaunchConfiguration configuration) throws CoreException {
-		IVMInstall jre = VMHelper.createLauncher(configuration);
-		IPath containerPath = new Path(JavaRuntime.JRE_CONTAINER);
-		containerPath = containerPath.append(jre.getVMInstallType().getId());
-		containerPath = containerPath.append(jre.getName());
-		return JavaRuntime.newRuntimeContainerClasspathEntry(containerPath, IRuntimeClasspathEntry.BOOTSTRAP_CLASSES);
-	}
-
-	/**
-	 * Returns an array of sorted plug-in projects that represent plug-ins participating
-	 * in the launch
-	 * 
-	 * @param configuration
-	 * 			the launch configuration
-	 * @return an array of ordered projects
-	 * @throws CoreException
-	 * 			if unable to retrieve attributes from the launch configuration or if 
-	 * 			an error occurs when checking the nature of the project
-	 * 			
-	 */
-	private IProject[] getJavaProjects(ILaunchConfiguration configuration) throws CoreException {
-		IProject[] projects = LaunchPluginValidator.getAffectedProjects(configuration);
-		return PDEPlugin.getWorkspace().computeProjectOrder(projects).projects;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.jdt.launching.StandardSourcePathProvider#resolveClasspath(org.eclipse.jdt.launching.IRuntimeClasspathEntry[], org.eclipse.debug.core.ILaunchConfiguration)
-	 */
-	public IRuntimeClasspathEntry[] resolveClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException {
-		List all = new ArrayList(entries.length);
-		for (int i = 0; i < entries.length; i++) {
-			if (entries[i].getType() == IRuntimeClasspathEntry.PROJECT) {
-				// a project resolves to itself for source lookup (rather than
-				// the class file output locations)
-				all.add(entries[i]);
-				// also add non-JRE libraries
-				IResource resource = entries[i].getResource();
-				if (resource instanceof IProject) {
-					addBinaryPackageFragmentRoots(JavaCore.create((IProject) resource), all);
-				}
-			} else {
-				IRuntimeClasspathEntry[] resolved = JavaRuntime.resolveRuntimeClasspathEntry(entries[i], configuration);
-				for (int j = 0; j < resolved.length; j++) {
-					all.add(resolved[j]);
-				}
-			}
-		}
-		return (IRuntimeClasspathEntry[]) all.toArray(new IRuntimeClasspathEntry[all.size()]);
-	}
-
-	/**
-	 * Adds runtime classpath entries for binary package fragment roots contained within
-	 * the project
-	 * 
-	 * @param jProject
-	 * 			the Java project whose roots are to be enumerated
-	 * @param all
-	 * 			a list of accumulated runtime classpath entries
-	 * @throws CoreException
-	 * 			if unable to evaluate the package fragment roots
-	 */
-	private void addBinaryPackageFragmentRoots(IJavaProject jProject, List all) throws CoreException {
-		IPackageFragmentRoot[] roots = jProject.getPackageFragmentRoots();
-		for (int j = 0; j < roots.length; j++) {
-			if (roots[j].getKind() == IPackageFragmentRoot.K_BINARY && !PDEJavaHelper.isJRELibrary(roots[j])) {
-				IRuntimeClasspathEntry rte = JavaRuntime.newArchiveRuntimeClasspathEntry(roots[j].getPath());
-				IPath path = roots[j].getSourceAttachmentPath();
-				if (path != null) {
-					rte.setSourceAttachmentPath(path);
-					rte.setSourceAttachmentRootPath(roots[j].getSourceAttachmentRootPath());
-				}
-				if (!all.contains(rte))
-					all.add(rte);
-			}
-		}
+public class PDESourcePathProvider extends org.eclipse.pde.launching.PDESourcePathProvider {
 
-	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
index be3e238..dd8fb81 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/PluginsTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,12 @@
 package org.eclipse.pde.ui.launcher;
 
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.pde.internal.ui.*;
-import org.eclipse.pde.internal.ui.launcher.PluginBlock;
+import org.eclipse.pde.internal.ui.launcher.*;
+import org.eclipse.pde.launching.IPDELauncherConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.Image;
@@ -38,22 +38,22 @@ public class PluginsTab extends AbstractLauncherTab {
 
 	private Image fImage;
 
-	private boolean fShowFeatures = true;
 	private Combo fSelectionCombo;
-	private PluginBlock fPluginBlock;
+	private BlockAdapter fBlock;
 	private Combo fDefaultAutoStart;
 	private Spinner fDefaultStartLevel;
 	private Listener fListener;
 
 	private static final int DEFAULT_SELECTION = 0;
-	private static final int CUSTOM_SELECTION = 1;
+	private static final int PLUGIN_SELECTION = 1;
 	private static final int FEATURE_SELECTION = 2;
 
 	class Listener extends SelectionAdapter implements ModifyListener {
 		public void widgetSelected(SelectionEvent e) {
 			int index = fSelectionCombo.getSelectionIndex();
 			try {
-				fPluginBlock.initialize(index == CUSTOM_SELECTION);
+				fBlock.setActiveBlock(index);
+				fBlock.initialize(index == PLUGIN_SELECTION);
 			} catch (CoreException ex) {
 				PDEPlugin.log(ex);
 			}
@@ -72,7 +72,9 @@ public class PluginsTab extends AbstractLauncherTab {
 	 *
 	 */
 	public PluginsTab() {
-		this(true);
+		fImage = PDEPluginImages.DESC_PLUGINS_FRAGMENTS.createImage();
+		fBlock = new BlockAdapter(new PluginBlock(this), new FeatureBlock(this));
+		fListener = new Listener();
 	}
 
 	/**
@@ -80,12 +82,10 @@ public class PluginsTab extends AbstractLauncherTab {
 	 * 
 	 * @param showFeatures  a flag indicating if the tab should present the feature-based 
 	 * self-hosting option.
+	 * @deprecated As of 3.6 the feature-based workspace launch option is no longer available, so there is no need to set this flag
 	 */
 	public PluginsTab(boolean showFeatures) {
-		fShowFeatures = showFeatures;
-		fImage = PDEPluginImages.DESC_PLUGINS_FRAGMENTS.createImage();
-		fPluginBlock = new PluginBlock(this);
-		fListener = new Listener();
+		this();
 	}
 
 	/*
@@ -93,7 +93,7 @@ public class PluginsTab extends AbstractLauncherTab {
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
 	 */
 	public void dispose() {
-		fPluginBlock.dispose();
+		fBlock.dispose();
 		fImage.dispose();
 		super.dispose();
 	}
@@ -109,8 +109,8 @@ public class PluginsTab extends AbstractLauncherTab {
 
 		SWTFactory.createLabel(buttonComp, PDEUIMessages.PluginsTab_launchWith, 1);
 
-		fSelectionCombo = SWTFactory.createCombo(buttonComp, SWT.READ_ONLY | SWT.BORDER, 1, GridData.HORIZONTAL_ALIGN_BEGINNING, new String[] {PDEUIMessages.PluginsTab_allPlugins, PDEUIMessages.PluginsTab_selectedPlugins, PDEUIMessages.PluginsTab_featureMode});
-		fSelectionCombo.select(0);
+		fSelectionCombo = SWTFactory.createCombo(buttonComp, SWT.READ_ONLY | SWT.BORDER, 1, GridData.HORIZONTAL_ALIGN_BEGINNING, new String[] {PDEUIMessages.PluginsTab_allPlugins, PDEUIMessages.PluginsTab_selectedPlugins, PDEUIMessages.PluginsTab_customFeatureMode});
+		fSelectionCombo.select(DEFAULT_SELECTION);
 		fSelectionCombo.addSelectionListener(fListener);
 
 		Label label = SWTFactory.createLabel(buttonComp, PDEUIMessages.EquinoxPluginsTab_defaultStart, 1);
@@ -134,8 +134,7 @@ public class PluginsTab extends AbstractLauncherTab {
 		Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
 		separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
-		Composite blockComposite = SWTFactory.createComposite(composite, 7, 1, GridData.FILL_BOTH, 0, 0);
-		fPluginBlock.createControl(blockComposite, 7, 10);
+		fBlock.createControl(composite, 7, 10);
 
 		setControl(composite);
 		Dialog.applyDialogFont(composite);
@@ -149,14 +148,17 @@ public class PluginsTab extends AbstractLauncherTab {
 	public void initializeFrom(ILaunchConfiguration configuration) {
 		try {
 			int index = DEFAULT_SELECTION;
-			if (fShowFeatures && configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
+			if (configuration.getAttribute(IPDELauncherConstants.USEFEATURES, false)) {
+				index = FEATURE_SELECTION;
+			} else if (configuration.getAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false)) {
 				index = FEATURE_SELECTION;
 			} else if (!configuration.getAttribute(IPDELauncherConstants.USE_DEFAULT, true)) {
-				index = CUSTOM_SELECTION;
+				index = PLUGIN_SELECTION;
 			}
-			fSelectionCombo.setText(fSelectionCombo.getItem(index));
-			boolean custom = fSelectionCombo.getSelectionIndex() == CUSTOM_SELECTION;
-			fPluginBlock.initializeFrom(configuration, custom);
+			fSelectionCombo.select(index);
+			fBlock.setActiveBlock(index);
+			boolean custom = fSelectionCombo.getSelectionIndex() == PLUGIN_SELECTION;
+			fBlock.initializeFrom(configuration, custom);
 			boolean auto = configuration.getAttribute(IPDELauncherConstants.DEFAULT_AUTO_START, false);
 			fDefaultAutoStart.setText(Boolean.toString(auto));
 			int level = configuration.getAttribute(IPDELauncherConstants.DEFAULT_START_LEVEL, 4);
@@ -172,9 +174,10 @@ public class PluginsTab extends AbstractLauncherTab {
 	 */
 	public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
 		configuration.setAttribute(IPDELauncherConstants.USE_DEFAULT, true);
-		if (fShowFeatures)
-			configuration.setAttribute(IPDELauncherConstants.USEFEATURES, false);
-		fPluginBlock.setDefaults(configuration);
+		// The use features option was removed in 3.6
+		configuration.removeAttribute(IPDELauncherConstants.USEFEATURES);
+		configuration.setAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, false);
+		fBlock.setDefaults(configuration);
 	}
 
 	/*
@@ -184,9 +187,8 @@ public class PluginsTab extends AbstractLauncherTab {
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		int index = fSelectionCombo.getSelectionIndex();
 		configuration.setAttribute(IPDELauncherConstants.USE_DEFAULT, index == DEFAULT_SELECTION);
-		if (fShowFeatures)
-			configuration.setAttribute(IPDELauncherConstants.USEFEATURES, index == FEATURE_SELECTION);
-		fPluginBlock.performApply(configuration);
+		configuration.setAttribute(IPDELauncherConstants.USE_CUSTOM_FEATURES, index == FEATURE_SELECTION);
+		fBlock.performApply(configuration);
 		// clear default values for auto-start and start-level if default
 		String autoText = fDefaultAutoStart.getText();
 		if (Boolean.toString(false).equals(autoText)) {
@@ -229,13 +231,6 @@ public class PluginsTab extends AbstractLauncherTab {
 	 */
 	public void validateTab() {
 		String errorMessage = null;
-		if (fShowFeatures && fSelectionCombo.getSelectionIndex() == FEATURE_SELECTION) {
-			IPath workspacePath = PDEPlugin.getWorkspace().getRoot().getLocation();
-			IPath featurePath = workspacePath.removeLastSegments(1).append("features"); //$NON-NLS-1$
-			if (!workspacePath.lastSegment().equalsIgnoreCase("plugins") //$NON-NLS-1$
-					|| !featurePath.toFile().exists())
-				errorMessage = PDEUIMessages.AdvancedLauncherTab_error_featureSetup;
-		}
 		setErrorMessage(errorMessage);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TestTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TestTab.java
index 46b45f9..240089a 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TestTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TestTab.java
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
index 6376d05..90ca849 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/TracingTab.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.pde.ui.launcher;
 
+import org.eclipse.pde.launching.IPDELauncherConstants;
+
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.jface.dialogs.Dialog;
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/NewPluginProjectFromTemplateWizard.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/NewPluginProjectFromTemplateWizard.java
index a4b46ce..a39a7f2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/NewPluginProjectFromTemplateWizard.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/NewPluginProjectFromTemplateWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.ui.*;
 import org.eclipse.pde.internal.ui.wizards.*;
@@ -105,7 +106,10 @@ public abstract class NewPluginProjectFromTemplateWizard extends NewWizard imple
 			fTemplateWizard = (IPluginContentWizard) templateWizardElement.createExecutableExtension();
 			fTemplateWizard.init(fPluginData);
 			fTemplateWizard.addPages();
-			addPage(fTemplateWizard.getStartingPage());
+			IWizardPage[] pages = fTemplateWizard.getPages();
+			for (int i = 0; i < pages.length; i++) {
+				addPage(pages[i]);
+			}
 		} catch (CoreException e) {
 			MessageDialog.openError(getShell(), PDEUIMessages.NewPluginProjectFromTemplateWizard_1, NLS.bind(PDEUIMessages.NewPluginProjectFromTemplateWizard_0, getTemplateID()));
 		}
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
index c5f2bbb..c82a819 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src/org/eclipse/pde/ui/templates/OptionTemplateWizardPage.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.pde.ui.templates;
@@ -71,6 +71,7 @@ public class OptionTemplateWizardPage extends WizardPage {
 			PlatformUI.getWorkbench().getHelpSystem().setHelp(container, helpContextId);
 		setControl(container);
 		Dialog.applyDialogFont(container);
+		container.forceFocus();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ReviewPage.java b/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ReviewPage.java
index ba820d9..d9ad1b2 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ReviewPage.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ReviewPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -70,6 +70,7 @@ public class ReviewPage extends WizardPage {
 		Composite container = new Composite(parent, SWT.NULL);
 		GridLayout layout = new GridLayout();
 		container.setLayout(layout);
+		container.setLayoutData(new GridData(GridData.FILL_BOTH));
 		formText = new ScrolledFormText(container, true);
 		formText.setBackground(parent.getBackground());
 		GridData gd = new GridData(GridData.FILL_BOTH);
diff --git a/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ShowSampleAction.java b/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ShowSampleAction.java
index 649d6e0..dec79eb 100644
--- a/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ShowSampleAction.java
+++ b/eclipse/plugins/org.eclipse.pde.ui/src_samples/org/eclipse/pde/internal/ui/samples/ShowSampleAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -10,26 +10,37 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.ui.samples;
 
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Collection;
 import java.util.Properties;
 import org.eclipse.core.runtime.*;
+import org.eclipse.equinox.internal.provisional.configurator.Configurator;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.operations.InstallOperation;
+import org.eclipse.equinox.p2.operations.ProvisioningJob;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.pde.internal.core.util.VersionUtil;
-import org.eclipse.pde.internal.ui.PDEPlugin;
-import org.eclipse.pde.internal.ui.PDEUIMessages;
+import org.eclipse.pde.internal.ui.*;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.intro.IIntroSite;
 import org.eclipse.ui.intro.config.*;
-import org.eclipse.update.configurator.ConfiguratorUtils;
-import org.eclipse.update.configurator.IPlatformConfiguration;
-import org.eclipse.update.standalone.InstallCommand;
-import org.osgi.framework.Version;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
 
 public class ShowSampleAction extends Action implements IIntroAction {
 	private static final String SAMPLE_FEATURE_ID = "org.eclipse.sdk.samples"; //$NON-NLS-1$
@@ -37,10 +48,13 @@ public class ShowSampleAction extends Action implements IIntroAction {
 	private static final String UPDATE_SITE = "http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/pde-ui-home/samples/"; //$NON-NLS-1$
 	private String sampleId;
 
+	private ProvisioningUI provUI;
+
 	/**
 	 *  
 	 */
 	public ShowSampleAction() {
+		provUI = ProvisioningUI.getDefaultUI();
 	}
 
 	public void run(IIntroSite site, Properties params) {
@@ -109,8 +123,17 @@ public class ShowSampleAction extends Action implements IIntroAction {
 	private void enableActivities(IConfigurationElement sample) {
 	}
 
+	/**
+	 * Ensure the sample feature is present. If not present, attempt to install it.
+	 * 
+	 * @return <code>true</code> if the sample features are present, and
+	 * <code>false</code> otherwise.
+	 */
 	private boolean ensureSampleFeaturePresent() {
-		if (checkFeature())
+		IProfile profile = getProfile();
+		if (profile == null)
+			return false;
+		if (checkFeature(profile))
 			return true;
 		// the feature is not present - ask to download
 		if (MessageDialog.openQuestion(PDEPlugin.getActiveWorkbenchShell(), PDEUIMessages.ShowSampleAction_msgTitle, PDEUIMessages.ShowSampleAction_msgDesc)) {
@@ -119,29 +142,52 @@ public class ShowSampleAction extends Action implements IIntroAction {
 		return false;
 	}
 
-	private boolean checkFeature() {
-		IPlatformConfiguration config = ConfiguratorUtils.getCurrentPlatformConfiguration();
-		IPlatformConfiguration.IFeatureEntry[] features = config.getConfiguredFeatureEntries();
-		Version sampleVersion = new Version(SAMPLE_FEATURE_VERSION);
-		for (int i = 0; i < features.length; i++) {
-			String id = features[i].getFeatureIdentifier();
-			if (SAMPLE_FEATURE_ID.equals(id)) {
-				String version = features[i].getFeatureVersion();
-				Version fversion = Version.parseVersion(version);
-				if (VersionUtil.isCompatibleWith(fversion, sampleVersion))
-					return true;
-			}
-		}
-		return false;
+	private boolean checkFeature(IProfile profile) {
+		return !profile.query(getSampleFeatureQuery(), null).isEmpty();
+	}
+
+	/**
+	 * Returns <code>true</code> if the sample feature is already installed, or if
+	 * it won't be possible to install the feature (required services are missing). Returns
+	 * <code>false</code> if the features are missing and should be installed.
+	 */
+	private IProfile getProfile() {
+		IProvisioningAgent agent = provUI.getSession().getProvisioningAgent();
+		if (agent == null)
+			return null;
+		IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
+		if (registry == null)
+			return null;
+		return registry.getProfile(provUI.getProfileId());
+	}
+
+	IQuery getSampleFeatureQuery() {
+		return QueryUtil.createIUQuery(SAMPLE_FEATURE_ID, org.eclipse.equinox.p2.metadata.Version.parseVersion(SAMPLE_FEATURE_VERSION));
 	}
 
+	/**
+	 * Download the sample feature, returning <code>true</code> if the feature
+	 * was installed successfully, and <code>false</code> otherwise.
+	 */
 	private boolean downloadFeature() {
 		IRunnableWithProgress op = new IRunnableWithProgress() {
-			public void run(IProgressMonitor monitor) throws InvocationTargetException {
+			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
 				try {
-					InstallCommand command = new InstallCommand(SAMPLE_FEATURE_ID, SAMPLE_FEATURE_VERSION, UPDATE_SITE, null, "false"); //$NON-NLS-1$
-					command.run(monitor);
-					command.applyChangesNow();
+					SubMonitor sub = SubMonitor.convert(monitor, PDEUIMessages.ShowSampleAction_installing, 100);
+					InstallOperation operation = createInstallOperation(sub.newChild(10));
+					operation.resolveModal(sub.newChild(20));
+					IStatus status = operation.getResolutionResult();
+					if (status.getSeverity() == IStatus.CANCEL) {
+						throw new InterruptedException();
+					} else if (!(status.isOK() || status.getSeverity() == IStatus.INFO)) {
+						throw new CoreException(status);
+					}
+					ProvisioningJob job = operation.getProvisioningJob(null);
+					status = job.runModal(sub.newChild(70));
+					if (!(status.isOK() || status.getSeverity() == IStatus.INFO)) {
+						throw new CoreException(status);
+					}
+					applyConfiguration();
 				} catch (Exception e) {
 					throw new InvocationTargetException(e);
 				}
@@ -157,4 +203,41 @@ public class ShowSampleAction extends Action implements IIntroAction {
 		}
 		return true;
 	}
+
+	/**
+	 * Returns a Collection<IInstallableUnit> of the installable units that contain the samples
+	 * to be installed.
+	 */
+	protected Collection findSampleIUs(URI location, SubMonitor monitor) throws ProvisionException {
+		IMetadataRepository repository = provUI.loadMetadataRepository(location, false, monitor.newChild(5));
+		return repository.query(getSampleFeatureQuery(), monitor.newChild(5)).toUnmodifiableSet();
+	}
+
+	/**
+	 * Creates the operation that will install the sample features in the running platform.
+	 */
+	InstallOperation createInstallOperation(SubMonitor monitor) throws URISyntaxException, ProvisionException {
+		URI repositoryLocation = new URI(UPDATE_SITE);
+		Collection sampleIUs = findSampleIUs(repositoryLocation, monitor);
+		URI[] repos = new URI[] {repositoryLocation};
+		InstallOperation operation = provUI.getInstallOperation(sampleIUs, repos);
+		return operation;
+	}
+
+	/**
+	 * Apply the profile changes to the currently running configuration.
+	 */
+	void applyConfiguration() throws CoreException {
+		BundleContext context = PDEPlugin.getDefault().getBundle().getBundleContext();
+		ServiceReference reference = context.getServiceReference(Configurator.class.getName());
+		Configurator configurator = (Configurator) context.getService(reference);
+		try {
+			configurator.applyConfiguration();
+		} catch (IOException e) {
+			throw new CoreException(new Status(IStatus.ERROR, IPDEUIConstants.PLUGIN_ID, "Unexpected failure applying configuration", e)); //$NON-NLS-1$
+		} finally {
+			context.ungetService(reference);
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.pde/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.pde/META-INF/MANIFEST.MF
index 3edcd48..cb84fd3 100644
--- a/eclipse/plugins/org.eclipse.pde/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.pde/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.pde; singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.pde/about.properties b/eclipse/plugins/org.eclipse.pde/about.properties
index 729f063..6b13031 100644
--- a/eclipse/plugins/org.eclipse.pde/about.properties
+++ b/eclipse/plugins/org.eclipse.pde/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,6 +19,6 @@ blurb=Eclipse Plug-in Development Environment\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2009.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
 Visit http://www.eclipse.org/pde
 
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-create.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-create.xml
index 8381f0f..2acec7f 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-create.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-create.xml
@@ -63,7 +63,7 @@
       </subitem>
       <subitem label="Accept the rest of the default preloaded values on the "Plug-in Project" page and click "Next >"" skip="false">
       </subitem>
-      <subitem label="Accept the default preloaded values on the "Plug-in Content" page and click "Next >"" skip="false">
+      <subitem label="Accept the default preloaded values on the "Content" page. Verify that  "Rich Client Applications" section marks No. Click "Next >"" skip="false">
       </subitem>
       <subitem label="Select the "Hello, World" template from the list of "Available Templates" and click "Finish"" skip="false">
       </subitem>
@@ -86,11 +86,11 @@
       </subitem>
       <subitem label="Select the "Sample Menu" entry" skip="false">
       </subitem>
-      <subitem label="Replace the content of the "label" text box under the "Extension Element Details" heading with "Hello!"" skip="false">
+      <subitem label="Replace the content of the "label" text box under the "Extension Element Details" heading with "Hello Menu"" skip="false">
       </subitem>
       <subitem label="Select the "Sample Action" entry under the "All Extensions" heading" skip="false">
       </subitem>
-      <subitem label="Replace the content of the "label" text box under the "Extension Element Details" heading with "Display Hello World!"" skip="false">
+      <subitem label="Replace the content of the "label" text box under the "Extension Element Details" heading with "Display Hello World"" skip="false">
       </subitem>
       <subitem label="Select "File->Save" from the main menu" skip="false">
       </subitem>
@@ -108,18 +108,22 @@
                serialization="org.eclipse.ui.navigate.openResource(filePath=/com.example.helloworld/META-INF/MANIFEST.MF)">
          </command>
       </subitem>
-      <subitem label="Click the "Launch an Eclipse application" hyperlink under the "Testing" heading" skip="false">
+      <subitem label="Click the "Launch an Eclipse application" hyperlink under the "Testing" heading." skip="false">
       </subitem>
-      <subitem label="Note the "Hello!" entry in the main menu in the newly launched Eclipse platform" skip="true">
+      <subitem label="Note the "Hello Menu" entry in the main menu in the newly launched Eclipse platform." skip="true">
       </subitem>
-      <subitem label="Select "Hello!->Display Hello World!" from the main menu" skip="false">
+      <subitem label="Select "Hello Menu->Display Hello World" from the main menu." skip="false">
+      </subitem>
+      <subitem label="Verify that a dialog box is displayed with the title "Helloworld" and message as "Hello, Eclipse world". Click "OK" to close it." skip="false">
       </subitem>
       <subitem label="Click on the "Workbench"  icon to close the "Welcome" view and go to the Eclipse workbench." skip="true">
       </subitem>
-      <subitem label="Note the icon with the Eclipse logo in the main toolbar in the newly launched Eclipse platform" skip="true">
+      <subitem label="Note the icon with the Eclipse logo in the main toolbar in the newly launched Eclipse platform." skip="true">
       </subitem>
-      <subitem label="Click the icon with the Eclipse logo in the main toolbar" skip="false">
+      <subitem label="Click the icon with the Eclipse logo in the main toolbar." skip="false">
       </subitem>
+      <subitem label="Verify that a dialog box is displayed with the title "Helloworld" and message as "Hello, Eclipse world". Click "OK" to close it." skip="false">
+      </subitem>      
       <subitem label="Select "File->Exit" from the main menu to exit the target Eclipse platform" skip="false">
       </subitem>
    </item>
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-feature.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-feature.xml
index 0fe712b..52380ac 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-feature.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-feature.xml
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -62,7 +62,7 @@
                skip="false"/>
       <subitem label="Input "Hello World! Feature" into the "Feature Name" text box and click "Next >"" 
                skip="false"/>
-      <subitem label="Select the "com.example.helloworld" checkbox on the "Refererenced Plug-ins and Fragements" page and click "Finish"" 
+      <subitem label="Select the "com.example.helloworld" checkbox on the "Referenced Plug-ins and Fragments" page and click "Finish"" 
                skip="false"/>  
    </item>
 
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-install.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-install.xml
index ba21b2c..d93aac9 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-install.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-install.xml
@@ -54,6 +54,10 @@
       <description>
          To install the feature, perform the following steps:
       </description>
+      <subitem
+            label="Ensure that 'Install' wizard is open. If not, launch it by selecting "Help->Install New Software..." from the main menu"
+            skip="true">
+      </subitem>
       <subitem label="Select the "C:\helloworld.site" site in the "Work with" combo" 
                skip="false"/>              
       <subitem label="If the "Group items by category" option is checked, the "Hello World!" feature category should be visible" 
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-update.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-update.xml
index 9c78f9b..4021f7d 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-update.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/helloworld/helloworld-update.xml
@@ -60,7 +60,7 @@
       </subitem>
       <subitem label="Input "helloworld.site" into the "Project Name" text box on the "Update Site Project" page" 
                skip="false"/>
-      <subitem label="Deselect the "Use default location" text box" 
+      <subitem label="Deselect the "Use default location" check box"
                skip="false"/>  
       <subitem label="Note:  For the purpose of this cheat sheet we will define a Windows pathname for our update site location.  For Unix platforms, adjust accordingly." 
                skip="true"/>  
@@ -103,9 +103,9 @@
                skip="false"/>  
       <subitem label="Click the "New Category" button" 
                skip="false"/>  
-      <subitem label="Input "Hello World!" into the "Name" text box" 
+      <subitem label="Input "Hello World!" into the "ID" text box" 
                skip="false"/>
-      <subitem label="Input "Hello World!" into the "Label" text box" 
+      <subitem label="Input "Hello World!" into the "Name" text box" 
                skip="false"/>
       <subitem label="Click "File->Save" from the main menu" 
                skip="false"/>  
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-create.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-create.xml
index b2ebe43..7af1073 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-create.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-create.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -61,11 +61,8 @@
                skip="false"/>
       <subitem label="Select the "Yes" radio button under the "Rich Client Application" heading on the "Plug-in Content" page and click "Next >"" 
                skip="false"/>
-      <subitem label="Select the "Hello RCP" template from the list of "Available Templates" and click "Next"" 
+      <subitem label="Select the "Hello RCP" template from the list of "Available Templates" and click "Finish"" 
                skip="false"/>
-      <subitem
-            label="Select the "Add branding" check box and click "Finish"">
-      </subitem>           
    </item>
 
    <!-- Item -->
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-customize.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-customize.xml
index 04e72ce..6db3d7b 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-customize.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-customize.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -124,8 +124,8 @@
                skip="true"/>
       <subitem label="Select "File->Save" from the main menu" 
                skip="false"/>
-      <subitem label="Note:  Eclipse expects a file called "splash.bmp" to be located in the root of the specified plug-in. Verify that the root folder of "com.example.rcpapp" plug-in has the "splash.bmp'." 
-               skip="true"/>
+      <subitem label="Note:  Eclipse expects a file called "splash.bmp" to be located in the root of the specified plug-in. Verify that the root folder of "com.example.rcpapp" plug-in has the "splash.bmp"." 
+               skip="false"/>
    </item>   
 
    <!-- Item -->
@@ -167,7 +167,7 @@
                skip="false"/>
       <subitem label="Select the "win32" tab under the "Program Launcher" heading" 
                skip="true"/>
-      <subitem label="Select the "Use a single ICO file containing 7 images as specified above" radio button" 
+      <subitem label="Select the "Use a single ICO file containing 6 images as specified above" radio button" 
                skip="true"/>
       <subitem label="Click the "Browse..." button adjacent to the "File" text box" 
                skip="true"/>
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-export.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-export.xml
index 184a70f..dc89042 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-export.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-export.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -83,7 +83,7 @@
       <subitem label="Select the checkbox corresponding to the "icons" directory under the "Binary Build" heading" 
                skip="false"/>
       <subitem label="Select the checkbox corresponding to the "splash.bmp" file under the "Binary Build" heading" 
-               skip="false"/>
+               skip="true"/>
       <subitem label="Select "File->Save" from the main menu" 
                skip="false"/>
    </item>
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-feature-product.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-feature-product.xml
index 3c3af77..7612c8f 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-feature-product.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-feature-product.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -89,13 +89,13 @@
       </description>
       <subitem label="Select the "Dependencies" tab to display the "Dependencies" page" 
                skip="false"/>
-      <subitem label="Select the "New Feature..." button under the "Features" heading" 
+      <subitem label="Select the "New Feature..." tool button in the "Features" section." 
                skip="false"/>
       <subitem label="Input "com.example.feature" into the "Project Name" text box on the "Feature Properties" page" 
                skip="false"/>
       <subitem label="Input "RCP Application Feature" into the "Feature Name" text box and click "Next >"" 
                skip="false"/>
-      <subitem label="Select the "com.example.rcpapp" checkbox on the "Refererenced Plug-ins and Fragements" page and click "Finish"" 
+      <subitem label="Select the "com.example.rcpapp" checkbox on the "Refererenced Plug-ins and Fragments" page and click "Finish"" 
                skip="false"/>  
    </item>
 
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-plugin-product.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-plugin-product.xml
index 226467e..6636e8b 100644
--- a/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-plugin-product.xml
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/rcpapp/rcpapp-plugin-product.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@
                skip="false"/>
       <subitem label="Input "rcpapp.product" into the "File name" text box" 
                skip="false"/>
-      <subitem label="Select the "Use a launch configuration" radio button inside the "Initialize the file content" group and click "Finish"" 
+      <subitem label="Select the "Use a launch configuration" radio button inside the "Initialize the file content" group and verify that "com.example.rcpapp.application" is selected in the  combo box. Click "Finish"" 
                skip="false"/>
    </item>
 
@@ -94,13 +94,13 @@
       <description>
          To define the product, perform the following steps:
       </description>
-      <subitem label="Input "RCP Application" into the "Name" text box on the "General Information" section" 
+      <subitem label="Click the "New..." button next to the "Product ID" drop down menu to open the "New Product Definition" dialog box" 
                skip="false"/>
-      <subitem label="Click the "New..." button next to the "Product" drop down menu to open the "New Product Definition" dialog box" 
+      <subitem label="Input "RCP Application" into the "Product Name" text box" 
                skip="false"/>
-      <subitem label="Verify "com.example.rcpapp" is the inputted value for the "Defining Plug-in" text box" 
+      <subitem label="Verify "com.example.rcpapp" is the value entered for the "Defining Plug-in" text box" 
                skip="true"/>        
-      <subitem label="Verify "product" is the inputted value for the "Product ID" text box" 
+      <subitem label="Verify "product" is the value entered for the "Product ID" text box" 
                skip="true"/>        
       <subitem label="Accept the defaults and click "Finish"" 
                skip="false"/>        
diff --git a/eclipse/plugins/org.eclipse.pde/cheatsheets/setup-apitools-existing-projects.xml b/eclipse/plugins/org.eclipse.pde/cheatsheets/setup-apitools-existing-projects.xml
new file mode 100644
index 0000000..78ceb7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.pde/cheatsheets/setup-apitools-existing-projects.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/-->
+<cheatsheet
+      title="Setting up API Tooling for existing plug-in projects">
+   <intro href="/org.eclipse.platform.doc.user/reference/ref-cheatsheets.htm">
+      <description>
+         This cheat sheet will help in setting up API Tooling for existing plug-in projects.
+      </description>
+   </intro>
+   <item
+         skip="true"
+         title="Prerequisite">
+      <description>
+         The plug-in projects should be located in the workspace and be in open state. The API is public and the relevant packages are exported through the "Exported Packages" on the "Runtime" tab of the Manifest Editor.
+      </description>
+   </item>
+   <item
+         href="/org.eclipse.pde.doc.user/reference/api-tooling/actions/ref-apitooling-setup-action.htm"
+         title="Setting up API Tooling">
+      <description>
+      </description>
+      <subitem
+            label="Select any project in package explorer and invoke the "API Tooling Setup" wizard from "PDE Tools" in the right-click context menu.">
+      </subitem>
+      <subitem
+            label="Select all the projects for which API Tooling is to be enabled. Click "Finish".">
+      </subitem>
+      <subitem
+            label="When prompted for setting up an API Baseline, select "Yes".">
+      </subitem>
+      <subitem
+            label="You are now presented with the "API Baseline" preference page. Click "Add Baseline" to create a default baseline. Provide a name and location, where the location contains an older version of the bundle(s) you are enabling API Tooling for. Click "Reset". Click "Finish". This will trigger a full build.">
+      </subitem>
+   </item>
+   <item
+         title="Testing API Tooling">
+      <description>
+         This is optional and is there just to make sure everything is in place properly.
+         
+      </description>
+      <subitem
+            label="Open any class in one of the exported packages. Add a public function to it and save it."
+            skip="false">
+      </subitem>
+      <subitem
+            label="There will be two problems generated. Use a quick-fix to fix them. First, quick-fix the version change in MANIFEST.MF and then the @since tag to the newly added method."
+            skip="false">
+      </subitem>
+      <subitem
+            label="Select the class or project in the package explorer and select "API Baseline" from the "Compare with" right-click context menu.">
+      </subitem>
+      <subitem
+            label="Let the default baseline "1.0" be selected and click "Finish".">
+      </subitem>
+      <subitem
+            label="The "API Tooling" view will open displaying the newly added method.">
+      </subitem>
+   </item>
+</cheatsheet>
diff --git a/eclipse/plugins/org.eclipse.pde/plugin.properties b/eclipse/plugins/org.eclipse.pde/plugin.properties
index 8d596ca..6fc07fc 100644
--- a/eclipse/plugins/org.eclipse.pde/plugin.properties
+++ b/eclipse/plugins/org.eclipse.pde/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,4 +19,7 @@ cheatsheet.helloworld.desc = This cheat sheet helps you to create a plug-in, a p
 It also helps you install and uninstall a feature using Install/Update.
 
 cheatsheet.rcpapp.name = Creating a Rich Client Application
-cheatsheet.rcpapp.desc = This cheat sheet helps you to create, define, test and export a fully-branded standalone RCP product.
\ No newline at end of file
+cheatsheet.rcpapp.desc = This cheat sheet helps you to create, define, test and export a fully-branded standalone RCP product.
+
+cheatsheet.apitools.setupexisting.name = Set up API Tools on Existing Projects
+cheatsheet.apitools.setupexisting.description = This cheat sheet will help you set up API Tools on existing projects in your workspace.
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde/plugin.xml b/eclipse/plugins/org.eclipse.pde/plugin.xml
index 3770f2c..3c68829 100644
--- a/eclipse/plugins/org.eclipse.pde/plugin.xml
+++ b/eclipse/plugins/org.eclipse.pde/plugin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.0"?><!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+     Copyright (c) 2005, 2009 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -54,6 +54,16 @@
             %cheatsheet.rcpapp.desc
          </description>
       </cheatsheet>
+      <cheatsheet
+            category="org.eclipse.pde"
+            composite="false"
+            contentFile="cheatsheets/setup-apitools-existing-projects.xml"
+            id="org.eclipse.pde.cheatsheet.setup.apitools.existing"
+            name="%cheatsheet.apitools.setupexisting.name">
+         <description>
+            %cheatsheet.apitools.setupexisting.description
+         </description>
+      </cheatsheet>
    </extension>
    
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.platform.doc.isv/META-INF/MANIFEST.MF
index 7f21aa4..5998cf3 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.platform.doc.isv; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.help;bundle-version="[3.2.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/buildDoc.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
index 3706821..9706f25 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
@@ -99,7 +99,8 @@
 		<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
 	</target>
 
-	<target name="generateJavadoc" depends="getJavadocPath" if="javadoc">
+	<target name="generateJavadoc" depends="getJavadocPath">
+		<property name="javadoc15" value="${javadoc}" />
 
 		<property name="optionsFile" value="platformOptions.tmp.txt" />
 		<copy file="platformOptions.txt" tofile="${optionsFile}" overwrite="true" />
@@ -118,7 +119,7 @@
 		<delete dir="reference/api"/>
 		<mkdir dir="reference/api"/>
 
-		<exec dir="." executable="${javadoc}" output="doc.bin.log">
+		<exec dir="." executable="${javadoc15}" output="doc.bin.log">
 			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
 		</exec>
 		
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch.htm
index 881a6ea..106da1e 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch.htm
@@ -17,7 +17,7 @@ Platform architecture
 <h1>Platform architecture </h1>
 
 <p>The Eclipse platform is structured around the concept of <b>plug-ins</b>.  Plug-ins are
-structured bundles of code and/or data that contribute function to the system.  Function can be
+structured bundles of code and/or data that contribute functionality to the system.  Functionality can be
 contributed in the form of code libraries (Java classes with public API), platform <b>extensions</b>,
 or even documentation.  Plug-ins can define <b>extension points</b>, well-defined places 
 where other plug-ins can add functionality.</p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch_struct.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch_struct.htm
index 5973848..24583f8 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch_struct.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/arch_struct.htm
@@ -21,7 +21,7 @@ Platform SDK roadmap</H2>
 The platform runtime core implements the runtime engine that starts the platform base and dynamically discovers and runs plug-ins. A
 <b> plug-in</b> is a structured component that describes itself to the system using
 an OSGi manifest (<b>MANIFEST.MF</b>) file and a plug-in manifest
-(<b>plugin.xml</b>) file. The platform maintains a registry of installed plug-ins and the function they provide.</P>
+(<b>plugin.xml</b>) file. The platform maintains a registry of installed plug-ins and the functionality they provide.</P>
 
 <P >
 A general goal of the runtime is that the end user should not pay a memory or performance penalty for plug-ins that are installed, but not used. A plug-in can be installed and added to the registry, but the plug-in will not be activated unless
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/bundle_security.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/bundle_security.html
index fe4d97d..09c3117 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/bundle_security.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/bundle_security.html
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -60,7 +60,7 @@
 
 <p>The 'Ant' build tool has a built-in task for automating the signing of code. For more information, see the related Ant documentation at:</p>
 <p>
-<a href="http://ant.apache.org/manual/CoreTasks/signjar.html">http://ant.apache.org/manual/CoreTasks/signjar.html</a></p>
+<a href="http://ant.apache.org/manual/Tasks/signjar.html">http://ant.apache.org/manual/Tasks/signjar.html</a></p>
 </li><li>The Eclipse 'export deployable plug-ins and fragments' functionality
 
 <p>Eclipse ships with the ability to export Eclipse plug-ins  and sign them at the same time. When exporting deployable plug-ins and fragments, there is a JAR Signing tab available. In the tab, the exporter can specify a KeyStore (a password-protected key storage) containing a private key to use for the signing.</p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/compare_contentviewer.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/compare_contentviewer.htm
index 9718638..41a238e 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/compare_contentviewer.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/compare_contentviewer.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -157,8 +157,7 @@ TextMergeViewer that provide syntax highlighting must implement both the <code>g
 <p> 
 <a href="../reference/api/org/eclipse/compare/rangedifferencer/RangeDifferencer.html"><b>RangeDifferencer</b></a>
  finds the longest sequences of matching and
-non-matching comparable entities in text content. Its implementation is based on
-an objectified version of the algorithm by Eugene W. Myers found <a href="http://citeseer.ist.psu.edu/myers86ond.html">here</a>.
+non-matching comparable entities in text content.
  Clients must supply
 an input to the differencer that implements the
 <a href="../reference/api/org/eclipse/compare/rangedifferencer/IRangeComparator.html"><b>IRangeComparator</b></a>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_breakpoints.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_breakpoints.htm
index ec69461..233fa6b 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_breakpoints.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_breakpoints.htm
@@ -36,7 +36,7 @@ for your particular debug model by defining a class that implements
 <p>Breakpoints are implemented using <a href="resAdv_markers.htm">resource markers</a>.
 Recall that resource markers allow you to associate meta information about a 
 resource in the form of named attributes. By implementing a breakpoint 
-using markers, the debug model can make use of all the existing marker function 
+using markers, the debug model can make use of all the existing marker functionality 
 such as persistence, searching, adding, deleting, and displaying in editors.</p>
 <p>Why is it important to know about markers when using breakpoints?  When
 you create a breakpoint type, you must also specify an associated marker
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_ui.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_ui.htm
index b452c98..3e41d6f 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_ui.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/debug_ui.htm
@@ -27,7 +27,7 @@ groups many of these utilities and includes methods for the following:</p>
   <li>Enabling or disabling the use of step filters</li>
 </ul>
 <p><a href="../reference/api/org/eclipse/debug/ui/IDebugView.html"><b>IDebugView</b></a>
-provides common function for debug views. It provides access to an
+provides common functionality for debug views. It provides access to an
 underlying viewer and its debug model presentation. Typically, clients
 should extend <a href="../reference/api/org/eclipse/debug/ui/AbstractDebugView.html"><b>AbstractDebugView</b></a>
 rather than implement the interface from scratch. <a href="../reference/api/org/eclipse/debug/ui/AbstractDebugView.html"><b>AbstractDebugView</b></a>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/forms_editors.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/forms_editors.htm
index 8c5b490..ae03201 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/forms_editors.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/forms_editors.htm
@@ -84,7 +84,7 @@ proficiency of your users. There are two ways you can approach it:</p>
 	In turn, add complex value-add functionality in the form pages that are hard 
 	to achieve from source. We have learned from experience that it is very hard 
 	to convince seasoned users to switch from source editing if the value-add is 
-	marginal or debatable. However, function that was only available in GUI 
+	marginal or debatable. However, functionality that was only available in GUI 
 	pages and was very high-quality was used readily.</p></li>
 </ol>
 <p align="left">Creating a high quality multi-page editor with mixed GUI and 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundles.png b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundles.png
new file mode 100644
index 0000000..3a65b5c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundles.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundlesinstalled.png b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundlesinstalled.png
new file mode 100644
index 0000000..f30fde3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2allbundlesinstalled.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2cloudinstall.png b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2cloudinstall.png
new file mode 100644
index 0000000..5184c9c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2cloudinstall.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2forcedupdate.png b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2forcedupdate.png
new file mode 100644
index 0000000..024e193
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2forcedupdate.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2reuse.png b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2reuse.png
new file mode 100644
index 0000000..7e5e39a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/images/p2reuse.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/int_eclipse.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/int_eclipse.htm
index fad7457..41b3c9e 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/int_eclipse.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/int_eclipse.htm
@@ -46,7 +46,7 @@ plug into the workbench using well defined hooks called <b>extension points</b>.
 <P >
 The platform itself is built in layers of plug-ins, each one defining extensions to the extension points of 
 lower-level plug-ins, and in turn defining their own extension points for further customization.  This extension 
-model allows plug-in developers to add a variety of function to the basic tooling platform. The artifacts for each 
+model allows plug-in developers to add a variety of functionality to the basic tooling platform. The artifacts for each 
 tool, such as files and other data, are coordinated by a common platform resource model.</P>
 <P >
 The platform gives the users a common way to work with the tools, and provides integrated management o
@@ -102,7 +102,7 @@ Workbench UI</H4>
     <td width="71%">Implements the user cockpit for navigating the platform. It defines extension points for adding UI components such as views or menu actions. 
       It supplies additional toolkits (JFace and SWT) for building user
       interfaces. The UI services are structured so that a subset of the UI plug-ins can be used to build rich client applications that are
-      independent of the resource management and workspace model.  IDE-centric plug-ins define additional function for 
+      independent of the resource management and workspace model.  IDE-centric plug-ins define additional functionality for 
       navigating and manipulating resources.</td>
   </tr>
   <tr>
@@ -137,7 +137,7 @@ Help system</H4>
   
 <h4>Other utilities</h4>
     </td>
-    <td width="60%">Other utility plug-ins supply function such as searching and comparing resources, performing builds using XML configuration files,
+    <td width="60%">Other utility plug-ins supply functionality such as searching and comparing resources, performing builds using XML configuration files,
     and dynamically updating the platform from a server.</td>
   </tr>
 </table>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/jface.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/jface.htm
index fbc4e90..37d01ba 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/jface.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/jface.htm
@@ -14,7 +14,7 @@
 <BODY BGCOLOR="#ffffff">
 <H1>The JFace UI framework</H1>
 <P >
-We've seen that the workbench defines extension points for plug-ins to contribute UI function to the platform. Many of these extension points,
+We've seen that the workbench defines extension points for plug-ins to contribute UI functionality to the platform. Many of these extension points,
 particularly wizard extensions, are implemented using classes in the
 <b>
 org.eclipse.jface.*</b> packages. What's the distinction? </P>
@@ -68,7 +68,7 @@ using background threads.  See <a href="swt_threading.htm#workbench_threads">The
 <P >
 The lines between SWT and JFace are much cleaner. SWT does not depend on any JFace or platform code at all. Many of the SWT examples show how you can build a standalone application. </P>
 <P >
-JFace is designed to provide common application UI function on top of the SWT
+JFace is designed to provide common application UI functionality on top of the SWT
 library. JFace does not try to "hide" SWT or replace its function. It provides classes and interfaces that handle many of the common tasks associated with programming a dynamic UI using
 SWT.</P>
 <P >
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html
new file mode 100644
index 0000000..8395e44
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html
@@ -0,0 +1,627 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright"
+	content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1"
+	TYPE="text/css">
+<title>Provisioning Actions and Touchpoints</title>
+</head>
+<body>
+<h1>Provisioning Actions and Touchpoints</h1>
+<h2>Introduction</h2>
+<p>A p2 Installable Unit (IU) is installed using the facilities
+provided by a <i>touchpoint</i>. The IU metadata consists of a reference
+to the touchpoint (Touchpoint Type) which also defines the version of
+the touchpoint (i.e an expectancy that it supports a certain set of
+operations), and describes instructions to execute in various p2 engine
+phases. The instructions are named after the phases - the phases
+"install", "uninstall", "configure", "unconfigure" are of interest when
+authoring, but there are also some internal phases such as "collect" and
+"checktrust" executed by the engine. Each instruction (e.g. "install")
+describes a sequence of actions to execute on the referenced touchpoint.
+Examples of actions are: create and remove directories, change
+permissions, install and remove bundles. Currently, two touchpoints
+(native, and eclipse) have been implemented. The native touchpoint has
+approximately 5 different actions, and the eclipse touchpoint has
+approximately 20. Most of these actions take parameters.</p>
+<p>The instructions are grouped and described in a Touchpoint Data
+Element. The touchpoint data element uses a Map where the key is the
+name of a p2 engine phase (such as "install"), and the value is a string
+representation of a sequence of actions. Using multiple touchpoint data
+elements is useful as it allows separation between sets of actions for
+install/uninstall/configure/unconfigure which makes it easier to
+maintain the meta data.</p>
+<h2>Actions</h2>
+<h3>Fully Qualified Action Names and Importing Actions</h3>
+<p>Each action has a fully qualified name; for example
+"org.eclipse.equinox.p2.touchpoint.eclipse.installBundle" is the FQN for
+the Eclipse touchpoints "installBundle" action. One can use the short
+name of an action if the action is imported or if the IUs "touchpoint
+type" matches the action.</p>
+Most bundle IUs use the Eclipse touchpoint type so you may be able to
+use:
+<table>
+	<tr>
+		<td><pre> installBundle(bundle:${artifact}) 
+</pre></td>
+	</tr>
+</table>
+However, if you get an error such as the following, use the fully
+qualified name.
+<table>
+	<tr>
+		<td><pre>java.lang.IllegalArgumentException: No action found for: installBundle.
+</pre></td>
+	</tr>
+</table>
+A valid call of this action using FQN might be something like:
+<table>
+	<tr>
+		<td><pre> org.eclipse.equinox.p2.touchpoint.eclipse.installBundle(bundle:${artifact}) 
+</pre></td>
+	</tr>
+</table>
+<h3>Native Touchpoint Actions</h3>
+<p><b>Action Fully Qualified Name:</b></p>
+<pre>org.eclipse.equinox.p2.touchpoint.natives.<i>action_name</i> 
+</pre>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>action</b></td>
+		<td><b>parameters</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">collect</td>
+		<td>-</td>
+		<td>collects all associated artifacts for an IU and places them
+		in a local touchpoint addressable cache. This action may be called
+		explicitly during the collect phase but is typically called as the
+		"default" action called for IUs with the Native Touchpoint Type as
+		part of the main Collect and Sizing phases.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold">cleanupzip
+		</td>
+		<td><code>source, target</code></td>
+		<td>removes unzipped files and directories that where unzipped
+		from <i>source</i> into <i>target</i> - i.e. an "undo operation" of an
+		<i>unzip</i> instruction.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">unzip</td>
+		<td>source, target</td>
+		<td>unzips the <i>source</i> into the <i>target</i> directory.
+		The <i>source</i> can be the special <code>@artifact</code> source
+		path, which denotes the download cache location for the first artifact
+		key in the IU. <i>Comments in code indicates that the use of <code>@artifact</code>
+		may be deprecated.</i></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">mkdir</td>
+		<td>path</td>
+		<td>Creates the directory specified by the parameter <i>path</i>.
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">rmdir</td>
+		<td>path</td>
+		<td>Removes the directory specified by the parameter <i>path</i>.
+		Action has no effect if the referenced directory contains files. Use
+		the <i>remove</i> action for a forced recursive remove.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">link</td>
+		<td>targetDir, linkTarget,
+		linkName, force</td>
+		<td>Performs the system action <code>ln -s</code> with the
+		parameters <i>linkTarget</i> being the source-file, <i>targetDir</i>
+		is the directory where the symbolic link will be created, and <i>linkName</i>
+		is the name of the resulting link in the <i>targetDir</i>. The <i>force</i>
+		parameter is a boolean in string form (i.e. "true"/"false") and
+		indicates if an existing link with the same name should be removed
+		before the new link is created.
+		<div style="border: 2px solid #8E87EB; padding: 6px;">This
+		action executes the system command <i>ln -s</i>, and is not available
+		on platforms that do not have this (i.e. Windows)</div>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">chmod</td>
+		<td>targetDir, targetFile,
+		permissions, options</td>
+		<td>Changes permission on a file using the system chmod command.
+		The <i>targetDir</i> parameter is either a path, or the special <code>@artifact</code>
+		which is a reference to the directory where the first artifact
+		included in the installable unit is located. The parameter <i>targetFile</i>
+		is the name of a file, and <i>permissions</i> is written like for the
+		<i>chmod</i> system command. The options parameter allows passing
+		additional options like "-R" for recursive operation. If multiple
+		parameters are needed separate them with a space (like on the command
+		line).
+		<div style="border: 2px solid #8E87EB; padding: 6px;">This
+		action executes the system command <i>chmod</i>, and is not available
+		on platforms that do not have this (i.e. Windows)</div>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">remove</td>
+		<td>path</td>
+		<td>Removes a file, or a directory (and all files under this
+		directory) as referenced by the parameter <i>path</i>.
+		<p><br>
+		(Since 3.5)</p>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">copy</td>
+		<td>source, target, overwrite</td>
+		<td>Copies a file or a directory (and all of its content) denoted
+		by <i>source</i> path to the <i>target</i> path.
+		<p>The boolean flag <i>overwrite</i> should be set to <i>true</i>
+		if the copy action should overwrite existing files. If overwrite is <i>false</i>
+		the operation will fail with an IO error in the files already exists.
+		<br>
+		(Since 3.5)</p>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">cleanupcopy
+		</td>
+		<td>source, target</td>
+		<td>Cleans up what was installed earlier with a <i>copy</i> from
+		<i>source</i> to <i>target</i>. I.e. this is an "undo" of a <i>copy</i>
+		operation.
+		<p><br>
+		(Since 3.5)</p>
+		</td>
+	</tr>
+</table>
+<h3>Eclipse Touchpoint Actions</h3>
+<p><b>Action Fully Qualified Name:</b></p>
+<pre>org.eclipse.equinox.p2.touchpoint.eclipse.<i>action_name</i> 
+</pre>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>instruction</b></td>
+		<td><b>parameters</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">collect</td>
+		<td>-</td>
+		<td>collects all associated artifacts for an IU and places them
+		in a local touchpoint addressable cache. This action may be called
+		explicitly during the collect phase but is typically called as the
+		"default" action called for IUs with the Eclipse Touchpoint Type as
+		part of the main Collect and Sizing phases.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">installBundle
+		</td>
+		<td>bundle</td>
+		<td>Installs a bundle artifact specified by the parameter <i>bundle</i>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">uninstallBundle
+		</td>
+		<td>bundle</td>
+		<td>Uninstalls a bundle artifact with a bundle-id specified by
+		the paramter <i>bundle</i></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">addSourceBundle
+		</td>
+		<td>bundle</td>
+		<td>Installs a source bundle artifact with the bundle-id
+		specified by the parameter <i>bundle</i></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">removeSourceBundle
+		</td>
+		<td>bundle</td>
+		<td>Removes/uninstalls the source bundle artifact with the
+		bundle-id specified by the parameter <i>bundle</i></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">installFeature
+		</td>
+		<td>feature, featureId, version</td>
+		<td>Installs the feature referenced by the parameter <i>feature</i>
+		(matched against artifacts in the iu). The feature is installed with
+		the id specified by the parameter <i>featureId</i>, or if this
+		parameter has the value <code>default</code>, with the id specified in
+		the artifact referenced by <i>feature</i>. The features is installed
+		with the version specified in <i>version</i>, or with the version
+		specified in the artifact referenced by the <i>feature</i> parameter
+		if the <i>version</i> parameter has the value <code>default</code></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">uninstallFeature
+		</td>
+		<td>feature, featureId, version</td>
+		<td>Uninstalls a feature. Parameters have the same meaning as for
+		the command <code>installFeature</code></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">setLauncherName
+		</td>
+		<td>name</td>
+		<td>Sets the name of the launcher to <code>name</code>. The
+		launcher name is used to configure launcher name specific ini files.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">addProgramArg
+		</td>
+		<td>programArg</td>
+		<td>Adds the string specified in the parameter <i>programArg</i>
+		as an argument to the program. If the parameters is the special value
+		<code>@artifact</code>, the location of the artifact referenced by the
+		first artifact key in the IU is used as the parameter value.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">removeProgramArg
+		</td>
+		<td>programArg</td>
+		<td>Removes the program argument specified in the string <i>programArg</i>
+		- if the parameters is the special value <code>@artifact</code>, the
+		location of the artifact referenced by the first artifact key in the
+		IU is used as the parameter value.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">setStartLevel
+		</td>
+		<td>startLevel</td>
+		<td>Sets the start level to the integer value specified in the
+		parameter <i>startValue</i></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">markStarted
+		</td>
+		<td>started</td>
+		<td>Marks the bundle referenced by the first artifact key in the
+		IU as started / not started, as controlled by the boolean parameter <i>started</i>
+		(in string form i.e. "true"/"false").</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">setFrameworkDependentProperty
+		</td>
+		<td>propName, propValue</td>
+		<td>Sets the framework dependant property named <i>propName</i>
+		to the value specified in <i>propValue</i>. Framework dependent
+		properties are properties specific to the Equinox implementation of
+		the OSGi framework.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">setFrameworkIndependentProperty
+		</td>
+		<td>propName, propValue</td>
+		<td>Sets the framework independant property named <i>propName</i>
+		to the value specified in <i>propValue</i>. Framework independent
+		properties do not specifically target Eclipse and are generally
+		applicable to other OSGi frameworks.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">setProgramProperty
+		</td>
+		<td>propName, propValue</td>
+		<td>Sets the program property named <i>propName</i> to the value
+		specified in <i>propValue</i>. Program properties are used by the
+		executable program to among other things locate the jars needed to
+		start Eclipse.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">addJVMArg
+		</td>
+		<td>jvmArg</td>
+		<td>Adds the string specified in the parameter <i>jvmArg</i> to
+		the arguments passed to the JVM.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">removeJVMArg
+		</td>
+		<td>jvmArg</td>
+		<td>Removes the string specified in the parameter <i>jvmArg</i>
+		from the arguments passed to the JVM.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">checkTrust
+		</td>
+		<td>-</td>
+		<td>collects the set of bundle files on which the signature trust
+		check should be performed. The checkTrust action is not meant to be
+		user callable and is done as part of the CheckTrust phase.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">addRepository
+		</td>
+		<td>location, type, enabled</td>
+		<td>Adds the repository at <i>location</i> of type <i>type</i> to
+		the list of known repositories. The repository will then be available
+		when installing or updating the profile in the future. The <i>enabled</i>
+		parameter takes a boolean value ("true" or "false") indicating whether
+		the add repository should be enabled. The value of the <i>location</i>
+		parameter must be a well-formed URI. The <i>type</i> parameter value
+		must be the value of one of the IRepository.TYPE_* constants,
+		Specifically, type "0" indicates a metadata repository, and type "1"
+		indicates an artifact repository.
+		<p><i>Example:</i></p>
+		<pre>instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/birt/update-site/2.5/,type:0,name:BIRT 2.5,enabled:true); \
+  org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/birt/update-site/2.5/,type:1,name:BIRT 2.5,enabled:true);
+</pre></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">removeRepository
+		</td>
+		<td>location, type</td>
+		<td>Removes the repository at <i>location</i> of type <i>type</i>
+		from the list of known
+		<p>repositories. The value of the <i>location</i> parameter must
+		be a well-formed URI. The <i>type</i> parameter value must be the
+		value of one of the IRepository.TYPE_* constants, Specifically, type
+		"0" indicates a metadata repository, and type "1" indicates an
+		artifact repository.</p>
+		</td>
+	</tr>
+</table>
+<h2>Action Format</h2>
+<p>The Touchpoint Data Element has a Map that describes the actions
+to execute in the various p2 engine phases (e.g. "install", "uninstall",
+"configure", "unconfigure", "collect" and "checktrust"). The key of the
+Map entry is the name of a phase (i.e. when the actions should be
+executed), and the value is a <i>statement-sequence</i>:</p>
+<pre>  statement-sequence :
+      | statement ';'
+      | statement-sequence statement
+      ;
+</pre>
+<p>Where a statement is of the format:</p>
+<pre>  statement :
+      | actionName '(' parameters ')'
+      ;
+</pre>
+<pre>  parameters :
+      | // empty
+      | parameter
+      | parameters ',' parameter
+      ;
+</pre>
+<pre>   parameter : 
+      | paramName ':' paramValue
+      ;
+ 
+ actionName, paramName, paramValue :
+      | String 
+      ;
+</pre>
+<p>In the p2 engine, the Phase will lookup the "actionName" using
+it's own phase specific actions (e.g. "collect") and also those made
+available by the associated touchpoint (e.g. "mkdir" in the native
+touchpoint, and "installBundle" in the Eclipse touchpoint) .</p>
+<p>As an example - an "install" instruction for a bundle might
+consist of the following statement:</p>
+<pre>  installBundle(bundle:${artifact});
+</pre>
+<ul>
+	<li><i>installBundle</i> is the action name</li>
+	<li><i>bundle</i> is the parameter name</li>
+	<li><i>${artifact}</i> is the parameter value. The value
+	${artifact} signifies the use of a pre-defined variable named
+	"artifact".</li>
+</ul>
+<h2>Built-in Action Variables</h2>
+<p>What follows is a catalog of the variables made available by the
+phases and touchpoints. Many of these are mostly useful to the
+implementor of new actions and touchpoint types.</p>
+<h3>Variables Available in all phases</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">#nnnn</td>
+		<td>the unicode value of a character.
+		<p><i>Note: This is especially important for the six
+		characters that require escaping.</i></p>
+		<ol>
+			<li>$ = ${#36}</li>
+			<li>, = ${#44}</li>
+			<li> : = ${#58}</li>
+			<li> ; = ${#59}</li>
+			<li>{ = ${#123}</li>
+			<li>} = ${#125}</li>
+		</ol>
+		</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">profile</td>
+		<td>the profile being modified.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">phaseId</td>
+		<td>the name of the phase e.g. collect, install, etc.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">operand</td>
+		<td>the actions operand (e.g. IU pair)</td>
+	</tr>
+</table>
+<h3>Variables Available in all installable unit phases</h3>
+<p><i>e.g. collect, unconfigure, uninstall, install, configure,
+...</i></p>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">installFolder
+		</td>
+		<td>the root folder for this profile.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">touchpoint
+		</td>
+		<td>the touchpoint associated with the IUs in the operand if
+		applicable</td>
+	</tr>
+</table>
+<h3>Collect Phase Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">artifactRequests
+		</td>
+		<td>A list that a touchpoints "collect" action will use to add
+		mirroring requests to.</td>
+	</tr>
+</table>
+<h3>Unconfigure Phase Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">iu</td>
+		<td>The IU being unconfigured. This is set from the first IU of
+		the operand pair.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">artifact</td>
+		<td>The artifact id of the first artifact listed in the IU.</td>
+	</tr>
+</table>
+<h3>Uninstall Phase Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">iu</td>
+		<td>The IU being uninstalled. This is set from the first IU of
+		the operand pair.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">artifact</td>
+		<td>The artifact id of the first artifact listed in the IU.</td>
+	</tr>
+</table>
+<h3>Install Phase Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">iu</td>
+		<td>The IU being installed. This is set from the second IU of the
+		operand pair.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">artifact</td>
+		<td>The artifact id of the first artifact listed in the IU.</td>
+	</tr>
+</table>
+<h3>Configure Phase Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">iu</td>
+		<td>The IU being configured. This is set from the second IU of
+		the operand pair.</td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">artifact</td>
+		<td>The artifact id of the first artifact listed in the IU.</td>
+	</tr>
+</table>
+<h3>Eclipse Touchpoint Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">manipulator
+		</td>
+		<td>an instance of the Manipulator class used to alter the
+		configuration of an Eclipse install.</td>
+	</tr>
+</table>
+<h3>Native Touchpoint Variables</h3>
+<table border="1px solid #CCC" cellpadding="5px"
+	style="border: 1px solid #CCC; border-collapse: collapse;">
+
+	<tr valign="top" style="background-color: #eeeeee; color: #444444;">
+		<td><b>variable</b></td>
+		<td><b>description</b></td>
+	</tr>
+	<tr valign="top">
+		<td style="font-weight: bold;">backup</td>
+		<td>the BackupStore used to save transaction state during native
+		file operations.</td>
+	</tr>
+</table>
+<h2>Additional Notes on Backup for File Operation Actions</h2>
+<p>The Native Touchpoint stores a temporary backup of files that are
+deleted or overwritten during the installation process. If an
+installation succeeds the backup is simply removed. If however the
+installation fails, the files in backup are restored to their original
+location. If the restore works as expected, the backup copy is also
+removed. Two "disaster" cases remain:</p>
+<ul>
+	<li>It was not possible to restore files (probably because of
+	faulty hardware, running out of disk, or manual tampering with files
+	during the installation).</li>
+	<li>The system crashed during the install</li>
+</ul>
+<p>The backup is placed in a directory under the directory
+referenced by the system property "java.io.tmpdir". The backup directory
+has a name with the prefix ".p2bu" which is followed by a unique key per
+running backup instance. Under the ".p2bu..." directory files are stored
+in a hierarchy that reflects their original location.</p>
+<p>In both of the disaster cases, the backup store under
+java.io.tempdir will contain copies of all files that were not
+automatically restored. If a restore is wanted, this can be performed
+manually by copying the content back to their original position (which
+is evident from the structure under ".p2bu"). This can be made with
+tools like zip (simply zip everything relative to .p2bu, and then unzip
+it from the real file system root).</p>
+<p>In case something goes wrong during restore of a backup, the
+event is logged with details of what needs to be manually restored. This
+is best effort support so in the case of a system crash file loss is possible.</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_api_overview.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_api_overview.htm
new file mode 100644
index 0000000..11f3c6a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_api_overview.htm
@@ -0,0 +1,217 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+<head>
+  <meta name="copyright"
+ content="Copyright (c) Sonatype Inc and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=ISO-8859-1">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+  <link REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+  <title>Overview of the p2 API</title>
+</head>
+<body>
+<H1>API overview</H1>
+<p>
+This section provides an overview of the p2 API and introduces some of the key concepts that should be understood to work with
+the p2 API.  The API can be generally thought of as three layers of API.  The top most layer requires understanding of very
+few concepts, and each successive layer provides more flexibility, but is a bit more complex.
+</p> 
+<ul> 
+<li>The User Interface API </li>
+<li>The Operations API </li>
+<li>The Core API</li>
+</ul>
+<p>
+This section provides a description of each of these categories and introduces some of the key concepts.
+</p>
+<h3>The User Interface API</h3>
+<p>The UI provides wizards for installing, updating, and uninstalling software in a system.  It also
+provides dialog pages for describing the installation and manipulating the repositories that are used
+to access software.  Most of these building blocks are private ("black box") implementations, not intended
+to be extended by clients.  A small package, 
+<a href="../reference/api/org/eclipse/equinox/p2/ui/package-summary.html">org.eclipse.equinox.p2.ui</a>,
+defines the API, which provides hooks for customizing the behaviour of the UI components, and class definitions that
+can be used in a plug-in's UI contributions.  </p>
+<p>Applications that simply want to provide their users a way to update or install additional software into the system
+need only include the relevant UI bundles.  No deep knowledge of the p2 API is required.  
+<a href="p2_ui.htm">Customizing the p2 UI</a> 
+describes this level of working with the p2 UI.  The The <a href="../reference/api/org/eclipse/equinox/p2/ui/Policy.html">Policy</a> class defines 
+aspects of the UI that can be customized.
+</p>
+<h3>Operations API</h3>
+<p>The <a href="../reference/api/org/eclipse/equinox/p2/operations/package-summary.html">operations API</a> provides high-level API for 
+installing, updating, and uninstalling software in a headless system.  The operations API is defined with "progressive disclosure" in mind.
+That is, the simplest and most common operations require little knowledge of underlying concepts.  
+</p>
+<p>Clients work with the operation in two passes.  The operation must first be <b>resolved</b>, which means that the requirements
+and dependencies are calculated to determine if the desired operation is compatible with what is already installed in the system.
+If the operation can be resolved, then the actual provisioning work (downloading of artifacts, updating the system) can be performed.
+The two-pass nature of an operation allows the resolution status to be reported to a client to determine whether the operation
+should proceed.  For example, the client can determine if the resolution is acceptable, or examine the detailed plan of what needs
+to be installed in order to continue with the operation.  The resolution and provisioning phases can be performed synchronously or 
+in the background as a job.</p>
+<p>A simple example can help demonstrate the simplicity of operations.
+A common operation in many applications is to simply update the application to get the latest version of everything.  This is
+possible with very little code.  The following snippet shows the sequence for updating everything in the running
+application.
+</p>
+<code>
+   // create an operation.  We already have a provisioning agent (to be explained later)<br>
+   UpdateOperation op = new UpdateOperation(new ProvisioningSession(agent)); <br>
+   // resolve the operation to see if we can update<br>
+   IStatus result = op.resolveModal(new NullProgressMonitor()); <br>
+   if (result.isOK()) {<br>
+     // get a job that will perform the actual work and schedule it<br>
+     op.getProvisioningJob(monitor).schedule(); <br>
+   }<br>
+</code>
+<p>If there is a problem resolving an operation, or the client code wants to do something slightly different, then a little more code might be needed.
+For example, an operation can be configured to update an application that is not the running application, or to consult a specific
+list of software repositories for the update.  
+</p>
+<p>Inside the operation, the 
+underlying p2 <a href="../reference/api/org/eclipse/equinox/p2/planner/IPlanner.html">IPlanner</a> is performing the resolution
+phase, and the underlying p2 <a href="../reference/api/org/eclipse/equinox/p2/engine/IEngine.html">IEngine</a> is performing the
+actual install.  However, these subsystems do not need to be understood by a client working with operations.
+</p>
+<p>For more information about operations, consult the javadoc for
+<a href="../reference/api/org/eclipse/equinox/p2/operations/ProfileChangeOperation.html">ProfileChangeOperation</a>. 
+Code snippets for working with operations can be found in the javadoc for
+<a href="../reference/api/org/eclipse/equinox/p2/operations/InstallOperation.html">InstallOperation</a>, 
+<a href="../reference/api/org/eclipse/equinox/p2/operations/UpdateOperation.html">UpdateOperation</a>, and
+<a href="../reference/api/org/eclipse/equinox/p2/operations/UninstallOperation.html">UninstallOperation</a>.
+</p>
+<h3>The Core API</h3>
+<p>The core API contains all the subsystems on which the Operation and UI APIs are built.  Some of these constructs
+feed into the other API layers.  For example, we saw above that an <b>agent</b> was needed in order to build an update
+operation.  Now we'll take a look at these core concepts.</p>
+<h4>The Provisioning Agent</h4>
+<p>
+All access to the p2 API happens through the agent, <a href="../reference/api/org/eclipse/equinox/p2/core/IProvisioningAgent.html">
+IProvisioningAgent</a>. The agent is the starting point of everything.  One way to think about 
+the <a href="../reference/api/org/eclipse/equinox/p2/core/IProvisioningAgent.html">IProvisioningAgent</a> 
+is that it is an "executable" representation of the p2 area (e.g. the p2 folder at the root of an eclipse installation).  
+Among other things, the agent can be used to 
+acquire p2 services for managing repositories, creating provisioning plans and perform installation requests. 
+</p>
+<p>
+The provisioning agent is acquired using the IProvisioningAgentProvider. 
+This is generally done in one place in the client code, with the rest of the code simply accessing
+the agent through some variable or helper code.  The following snippet shows how to acquire the provisioning agent.
+</p>
+<code>
+   ServiceReference sr = Activator.sContext.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);<br>
+   IProvisioningAgentProvider agentProvider = null;<br>
+   if (sr == null)<br>
+      return;<br>
+   agentProvider = (IProvisioningAgentProvider) Activator.sContext.getService(sr);<br>
+   IProvisioningAgent agent = agentProvider.createAgent(new URI("file:/Applications/eclipse36/p2"));<br>
+</code>
+<p>Accessing all p2 services through an agent allows for multiple instances of p2
+to be running in isolation in the same VM.  Note that
+the client creating the agent is responsible for destroying it.
+</p>
+<h4>Metadata</h4>
+<p>
+The <b>Installable Unit</b> (IU) is a chunk of metadata describing something that is installable.  An IU is used
+throughout the API to describe something that is being installed, updated, or removed.  An IU describes something
+that can be installed, including the name, description, license, copyright information, installation 
+processing steps, and the requirements that must be satisfied.  The 
+<a href="../reference/api/org/eclipse/equinox/p2/metadata/IInstallableUnit.html">IInstallableUnit</a> javadoc describes all
+of the things one can do with an IU.  You will notice that you can't change the properties of an IU.  That is because
+an IU is immutable.  Once created, it should never change.
+</p>
+<p>An IU can be obtained either by querying a source of metadata (e.g. a repository) 
+or by creating one programmatically.  
+</p>
+<h4>Queries and Queriables</h4>
+<p>Every source of metadata is usually queryable
+(see <a href="../reference/api/org/eclipse/equinox/p2/query/IQueryable.html">org.eclipse.equinox.p2.query.IQueryable</a>). 
+To discover an IU, you can execute a query 
+(see <a href="../reference/api/org/eclipse/equinox/p2/query/IQuery.html">IQuery</a>) against a metadata source.  The result of
+a query is a collection of all of the IUs that meet the criteria of the query.  </p>
+<p>Queries can be created in multiple ways.
+The simplest way is to create a query using the QueryUtil.  The following snippet creates a query that
+searches for all IUs that have the ID <tt>"org.eclipse.jdt"</tt>:
+</p>
+<code>
+   QueryUtil.createIUQuery("org.eclipse.jdt");
+</code>
+<p>
+Depending on the specificity of the query, there may be one or many IUs that satisfy the query.
+For example, you could query for a specific version of a specific IU, or you could use a wildcard to query
+for IUs that match a particular pattern.  <a href="../reference/api/org/eclipse/equinox/p2/query/QueryUtil.html">QueryUtil</a> has
+API for retrieving the most commonly used queries.  Additional queries that are OSGi specific can be found in the package
+<a href="../reference/api/org/eclipse/equinox/p2/touchpoint/eclipse/query/package-summary.html">org.eclipse.equinox.p2.eclipse.touchpoint</a>.
+Finally, should you need to write more complex queries, 
+p2 comes with a query language called <a href="http://wiki.eclipse.org/Query_Language_for_p2">p2 QL</a>
+</p>
+<h4>Repositories and Repository Managers</h4>
+<p>There are two main types of repositories, <b>Metadata Repositories</b> and <b>Artifact Repositories</b>.  Metadata repositories
+hold metadata (Installable Units), while artifact repositories hold "artifacts" (the actual downloadable bytes that make up an install).  
+Repositories can be remote or local.  They can be edited and queried.  The javadoc for
+<a href="../reference/api/org/eclipse/equinox/p2/repository/metadata/IMetadataRepository.html">IMetadataRepository</a> and
+<a href="../reference/api/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.html">IArtifactRepository</a> describe the
+repository API in more detail.
+</p>
+<p>Repositories are managed (created, loaded, removed, cached, etc...) using a 
+<a href="../reference/api/org/eclipse/equinox/p2/repository/IRepositoryManager.html">Repository Manager</a>.  The repository
+manager can be acquired using the provisioning agent.
+</p>
+<p>The following snippet shows how to acquire the metadata repository manager using the agent, and subsequently load the Helios repository.
+</p>
+<code>
+   IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);<br>
+   IMetadataRepository repository = manager.loadRepository(new URI("http://download.eclipse.org/releases/helios"), new NullProgressMonitor());<br>
+</code>
+<h4>Profiles and Profile Registries</h4>
+<p>
+A p2 profile tracks the set of software that composes the executable application. For example,
+your Eclipse Install has a profile that contains all the IUs that that comprise Eclipse.
+When you attempt to install new IUs, p2 modifies your current profile.  If the new
+IUs conflict with your existing profile (or dependencies cannot be resolved), then p2 will report
+an error and the installation will not proceed.  See the <a href="../reference/api/org/eclipse/equinox/p2/engine/IProfile.html">IProfile</a> 
+javadoc for a complete list of the Profile APIs.
+</p>
+<p>The profile is managed by a profile registry.  <a href="../reference/api/org/eclipse/equinox/p2/engine/IProfileRegistry.html">IProfileRegistry</a>
+manages all the profiles for a given p2 agent. It can be acquired through the agent.
+</p>
+<h3>Putting it all together</h3>
+<p>
+The following snippet demonstrates everything that must be done to trigger the installation
+of an IU into the running application.  We use the operations API to perform the install, so we don't
+have to work with the profile, planner, or engine subsystems.  However, we do need to know enough 
+about the core API to obtain an agent, and get some
+IUs from a repository.  The operation manages the rest of the detail.
+</p>
+<br>
+<code>
+   //get the agent<br>
+   ServiceReference sr = Activator.sContext.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);<br>
+   IProvisioningAgentProvider agentProvider = null;<br>
+   if (sr == null)<br>
+      return;<br>
+   agentProvider = (IProvisioningAgentProvider) Activator.sContext.getService(sr);<br>
+   IProvisioningAgent agent = agentProvider.createAgent(new URI("file:/Applications/eclipse36/p2"));<br>
+<br>
+   //get the repository managers and define our repositories<br>
+   IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);<br>
+   IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);<br>
+   manager.addRepository(new URI("file:/Users/Pascal/tmp/demo/"));<br>
+   artifactManager.addRepository(new URI("file:/Users/Pascal/tmp/demo/"));<br>
+<br>
+   //Load and query the metadata<br>
+   IMetadataRepository metadataRepo = manager.loadRepository(new URI("file:/Users/Pascal/tmp/demo/"), new NullProgressMonitor());<br>
+   Collection toInstall = metadataRepo.query(QueryUtil.createIUQuery("org.eclipse.equinox.p2.demo.feature.group"), new NullProgressMonitor()).toUnmodifiableSet();<br>
+<br>
+   //Creating an operation<br>
+   InstallOperation installOperation = new InstallOperation(new ProvisioningSession(agent), toInstall);<br>
+   if (installOperation.resolveModal(new NullProgressMonitor()).isOK()) {<br>
+      Job job = installOperation.getProvisioningJob(new NullProgressMonitor());<br>
+      job.addJobChangeListener(new JobChangeAdapter() {<br>
+        public void done(IJobChangeEvent event) {agent.close()}});<br>
+      job.schedule();<br>
+   }<br>
+</code>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html
index b64e2a1..f530bbe 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_customizing_metadata.html
@@ -12,14 +12,14 @@
 <body>
 <h1>Customizing p2 metadata</h1>
 <p>
-<i> Disclaimer: Authoring p2 metadata is new in 3.5 and something we expect to support with better tooling in a future release.
+<i> Disclaimer: Authoring p2 metadata is something we expect to support with better tooling in a future release.
 The support for customizing metadata with a p2.inf file is provisional although we expect to maintain a basic level
 of compatibility for common tasks.</i>
 </p>
 <p>
 On occasion the metadata that is automatically generated by p2 for bundles, features and products 
 does not provide everything required to successfully provision an installable unit.
-For those cases in the 3.5 release p2 supports the use of an advice file (a p2.inf file) that can be used to augment the metadata for an installable unit.
+For those cases p2 supports the use of an advice file (a p2.inf file) that can be used to augment the metadata for an installable unit.
 In this release the p2.inf file will allow an author to customize capabilities, properties, and instructions. 
 In addition support is provided for defining additional installable units that are related to the container IU.
 </p> 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_director.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_director.html
index 3f3bfaa..cd68bb8 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_director.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_director.html
@@ -3,7 +3,7 @@
 <head>
 
 <meta name="copyright"
-	content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+	content="Copyright (c) IBM Corporation and others 2008, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <link REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -51,7 +51,7 @@ into the SDK.</p>
 <code>
   <targetProductFolder>/eclipsec.exe 
    -application org.eclipse.equinox.p2.director 
-   -repository http://download.eclipse.org/releases/galileo/
+   -repository http://download.eclipse.org/releases/helios/
    -installIU org.eclipse.cdt.feature.group/<version>
 </code>
 </pre>
@@ -80,7 +80,7 @@ the builder, you want to install CDT into an existing SDK located into
 <code>
    d:\builder\eclipsec.exe
    -application org.eclipse.equinox.p2.director
-   -repository http://download.eclipse.org/releases/galileo/
+   -repository http://download.eclipse.org/releases/helios/
    -installIU org.eclipse.cdt.feature.group
    -destination d:/eclipse/
    -profile SDKProfile</code>
@@ -104,7 +104,7 @@ a director application located in "d:\builder".</p>
 <code>
    d:\builder\eclipsec.exe
    -application org.eclipse.equinox.p2.director
-   -repository http://download.eclipse.org/eclipse/updates/3.5
+   -repository http://download.eclipse.org/eclipse/updates/3.6
    -installIU org.eclipse.sdk.ide
    -destination d:/eclipse/
    -profile SDKProfile
@@ -134,9 +134,11 @@ artifact repository URLs where the software artifacts can be found.</li>
 If you are looking to install a feature, the identifier of
 the feature has to be suffixed with ".feature.group".</li>
 <li><b>-uninstallIU</b>: a comma separated list of IUs to uninstall. Each entry in the list is in the form <id> [ '/' <version> ].</li>
+<li><b>-revert</b>: Revert the installation to a previous state [ the number representing the previous state of the profile  as found in p2/org.eclipse.equinox.p2.engine/<profileId>/ ].</li>
+<li><b>-purgeHistory</b>: Remove the history of the profile registry.</li>
 <li><b>-destination</b>: the path of a folder in which the targeted
 product is located.</li>
-<li><b>-list</b>: lists all IU's found in the given repositories.</li>
+<li><b>-list</b>: lists all IU's found in the given repositories in a property like format. IUs can optionally be listed. Each entry in the list is in the form <id> [ '/' <version> ].</li>
 <li><b>-profile</b>: the profile id containing the
 description of the targeted product. This ID is is defined by the 
 <tt>eclipse.p2.profile</tt> property contained in the config.ini of the targeted
@@ -159,8 +161,7 @@ is created. This will be used to filter which architecture specific
 installable units need to be installed.</li>
 <li><b>-roaming</b>: indicates that the product resulting
 from the installation can be moved. This property only makes sense when
-the destination, bundle pool are in the same location and
-eclipse.p2.data.area is set to destination/p2. This value is only taken
+the destination and bundle pool are in the same location. This value is only taken
 into account when the profile is created.</li>
 <li><b>-shared</b>: use a shared location for the install. The path defaults to ${user.home}/.p2.</li>
 <li><b>-verifyOnly</b>: only verify that the actions can be performed. Don't actually install or remove anything.</li>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_metadata.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_metadata.html
index 67ae703..469ab68 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_metadata.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_metadata.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
   <meta name="copyright"
- content="Copyright (c) IBM Corporation and others 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+ content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
   <meta http-equiv="Content-Type"
  content="text/html; charset=ISO-8859-1">
   <meta http-equiv="Content-Style-Type" content="text/css">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_overview.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_overview.htm
index 23fe20a..7da94a1 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_overview.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_overview.htm
@@ -47,7 +47,7 @@ your own Eclipse-based applications and extensions.
 <ul>
 <li><a href="p2_metadata.html">Metadata management</a></li>
 <li><a href="p2_director.html">Installation management</a></li>
-<li>Repository management</li>
+<li><a href="p2_repositorytasks.htm">Repository management</a></li>
 </ul>
 </p>
 </BODY>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publisher.html b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publisher.html
index 03ea110..53b1dc1 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publisher.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publisher.html
@@ -54,7 +54,7 @@ The publisher can be used in two ways:
 
 <h2><a name="headless_applications">Command Line Applications</a></h2>
 <p>
-Since Eclipse 3.5, p2 ships with four command line publisher applications that plug-in developers can run. The applications are contained
+p2 ships with four command line publisher applications that plug-in developers can run. The applications are contained
 in <code>org.eclipse.equinox.p2.publisher</code> and <code>org.eclipse.equinox.p2.updatesite</code>.  These bundles are
 part of the Eclipse SDK. The four applications are:
 </p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publishingtasks.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publishingtasks.htm
index 65f7533..f18d5e4 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publishingtasks.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_publishingtasks.htm
@@ -10,7 +10,7 @@
 </head>
 <body>
 <h1>Ant tasks for publishing p2 metadata</h1>
-<p>Since Eclipse 3.5, p2 ships with two publisher ant tasks. The ant tasks are contained
+<p>p2 ships with two publisher ant tasks. The ant tasks are contained
 in <code>org.eclipse.equinox.p2.publisher</code>.  This bundles is
 part of the Eclipse SDK.</p>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm
index e0f57a4..82de8e2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm
@@ -15,7 +15,7 @@
 	<tr><td><p>Several p2 tasks accept "source" repositories.  Source repositories can be specified in several different ways:</p>
 	<ul>
 	<li>A <b><tt>source</tt></b> attribute directly on the ant task.  The value is a URL to a location that contains both a metadata and artifact repository.  For example:
-	<div align="center"><tt><p2.mirror source="http://download.eclipse.org/releases/galileo" .... /></tt></div>
+	<div align="center"><tt><p2.mirror source="http://download.eclipse.org/releases/helios" .... /></tt></div>
 	</li>
 	<li>A <b><tt><source></tt></b> element nested in the ant task.  This element is an ant fileset, with additional <i>location</i> and <i>kind</i> attributes.
 	<ul>
@@ -25,12 +25,12 @@
 	If no <i>location</i> attribute is set, all directories matched by the fileset are added as repositories and all *.zip files are treated as zipped repositories 
 	(accessed using a jar: URL). For example:
 <pre><source kind="metatata" dir="/build/input" includes="*.zip" />
-<source location="http://download.eclipse.org/releases/galileo" />
+<source location="http://download.eclipse.org/releases/helios" />
 </pre>
 	</li>
 	<li>A <b><tt><source></tt></b> element containing a list of repositories.  Each nested element is again a fileset with an additional <i>kind</i> attribute.  For example:
 <pre><source>
-   <repository location="http://download.eclipse.org/releases/galileo" />
+   <repository location="http://download.eclipse.org/releases/helios" />
    <repository kind="metadata" file="/build/repos/cdt-master-6.0.0-I200903161435.zip" />
    <repository kind="artifact" dir="/build/repos" includes="*repo" />
 </source>
@@ -69,7 +69,7 @@
 <h2>Ant Tasks</h2>
 <br>
 <table cellspacing="1" cellpadding="2" width="95%" align="center">
-	<tr><td><b><a name="p2_mirror"><tt>p2.mirror</tt></a></b></td></tr>
+	<tr><td><b><a name="p2_mirror"><h3>p2.mirror</h3></a></b></td></tr>
 	<tr><td><p>This task mirrors artifacts and metadata from the given source repositories to the destination.  
 	  This task will traverse the source repository and recursively include all IUs that match the requirements of IUs being mirrored (this is called <em>slicing</em> the repository).</p>
 	  </td>
@@ -77,7 +77,7 @@
 	<tr><td><p>This task supports the following attributes and elements:</p>
 		<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
 			<tr><td><tt>source</tt></td><td>Source repositories, as outlined <a href="#source_repositories">above</a></td></tr>
-			<tr><td><tt>desination</tt></td><td>Destination repositories, as outlined <a href="#destination_repositories">above</a></td></tr>
+			<tr><td><tt>destination</tt></td><td>Destination repositories, as outlined <a href="#destination_repositories">above</a></td></tr>
 			<tr><td><tt><iu></tt></td><td>Nested IU elements, as outlined <a href="#installable_units">above</a>.  
 			  The installable units to mirror.  If none are specified, all IUs contained in the source repositories are mirrored.</td></tr>
 			<tr><td><tt>log</tt></td><td>A file to use for logging the results.</td></tr>
@@ -93,6 +93,33 @@
 			<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
 				<tr><td><tt><baseline></tt></td><td>A nested element specifying the baseline repository.  
 				  See <a href="#destination_repositories"><i>destination repositories</i></a> above.</td></tr>
+				<tr><td><tt><exclude></tt></td><td>A nested element specifying artifacts to exclude from the comparison.
+				Contains nested <artifact> elements which support the following attributes:
+				<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
+					<tr><td><tt>id</tt></td><td>The artifact id.</td></tr>
+					<tr><td><tt>classifier</tt></td><td>The artifact classifier</td></tr>
+					<tr><td><tt>version</tt></td><td>The version to exclude.</td></tr>
+					<tr><td><tt>range;</tt></td><td>A range of versions to exclude</td></tr>
+					<tr><td><tt><property></tt></td><td>Nested <property> elements specifying properties that the artifact descriptor must have.</td></tr>
+				</table>
+				<br>
+Example: Exclude all pack.gz artifacts:
+<pre>
+	   <exclude>
+	      <artifact>
+	         <property name="format" value="packed" />
+	      </artifact>
+	   </exclude>
+</pre>
+Exclude the specified documentation bundles:
+<pre>
+	   <exclude>
+	      <artifact id="org.eclispe.jdt.doc.isv" classifier="osgi.bundle" />
+	      <artifact id="org.eclispe.jdt.doc.usr" classifier="osgi.bundle" />
+	      <artifact id="org.eclispe.pde.doc.isv" classifier="osgi.bundle" />
+	   </exclude>
+</pre>
+				</td></tr>
 				<tr><td><tt>comparator</tt></td><td>Id of a comparator to use if the baseline artifacts should be compared 
 				  against the source artifacts.  These are extensions to the <i>org.eclipse.equinox.p2.artifact.repository.artifactComparators</i> extension point.  
 				  Comparators provided by p2 are:
@@ -118,6 +145,8 @@
 				  IUs not matching the filter will not be mirrored.</td></tr>
 				<tr><td><tt>filter</tt></td><td>Set additional filter properties.  Format is a comma separated list of "key=value" pairs.</td></tr>
 				<tr><td><tt>followOnlyFilteredRequirements</tt></td><td>Invert the filters, include only the IUs that <b>don't</b> match.</td></tr>
+				<tr><td><tt>latestVersionOnly</tt></td><td>Set to "true" to filter the resulting set of IUs to only included the latest version of each Installable Unit.
+				By default, all versions satisfying dependencies are included.</td></tr>
 			</table>
 			</td></tr>
 		</table>
@@ -139,7 +168,7 @@ Examples:
 </pre>
 <p>Mirror the org.eclipse.equinox.p2.user.ui feature and other required bundles locally (perhaps in preparation for a build).</p>
 <pre>
-	<p2.mirror source="http://download.eclipse.org/releases/galileo" destination="${p2Repo}">
+	<p2.mirror source="http://download.eclipse.org/releases/helios" destination="${p2Repo}">
 	   <slicingOptions followStrict="true" />
 	   <iu id="org.eclipse.equinox.p2.user.ui.feature.group" />
 	   <iu id="org.eclipse.ecf"/>
@@ -168,7 +197,7 @@ Examples:
 </pre>
 
 <table cellspacing="1" cellpadding="2" width="95%" align="center">
-	<tr><td><b><a name="p2_repo2runnable"><tt>p2.repo2runnable</tt></a></b></td></tr>
+	<tr><td><b><a name="p2_repo2runnable"><h3>p2.repo2runnable</h3></a></b></td></tr>
 	<tr><td><p>Transform IUs into their installed form and add them to the destination repository.  This allows compiling against folder 
 	  shaped bundles that contain nested jars.  This task is the main mechanism by which headless PDE/Builds can reuse metadata.</p>
 	</td></tr>
@@ -176,6 +205,7 @@ Examples:
 		<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
 			<tr><td><tt>source</tt></td><td>Source repositories, as outlined <a href="#source_repositories">above</a></td></tr>
 			<tr><td><tt>desination</tt></td><td>Destination repositories, as outlined <a href="#destination_repositories">above</a></td></tr>
+			<tr><td><tt>failOnError</tt></td><td>Default is true.  Set to "false" to ignore errors and complete the operation.</td></tr>
 			<tr><td><tt><iu></tt></td><td>Nested IU elements, as outlined <a href="#installable_units">above</a>.  
 			  The installable units to transform.  If none are specified, all IUs contained in the source repositories are transformed.</td></tr>
 		</table>
@@ -183,7 +213,7 @@ Examples:
 </table>
 <br>
 <table cellspacing="1" cellpadding="2" width="95%" align="center">
-	<tr><td><b><tt>p2.process.artifacts</tt></b></td></tr>
+	<tr><td><b><h3>p2.process.artifacts</h3></b></td></tr>
 	<tr><td><p>Process a local, file-based artifact repository.  This task will (optionally) sign and pack artifacts, 
 	  as well as update the MD5 sums in the repository to match the actual artifacts on disk (since signing/conditioning will change the MD5 sums).
 	This task will use the jarProcessor, which in turn uses ant's SignJar task which requires the <i>jarsigner</i> command line tool.</p></td></tr>
@@ -193,7 +223,6 @@ Examples:
 			<tr><td><tt>pack</tt></td><td>Whether or not to create pack.gz artifacts.  (Default is false)</td></tr>
 			<tr><td><tt>normalize</tt></td><td>Whether or not to do pack200(pack + unpack) conditioning on the artifacts.  
 			  (Default is false, however sign + pack will imply a normalize.)</td></tr>
-			<tr><td><tt>repositoryPath</tt></td><td>A URL to an artifact repository to process.  This must be a local, file-based repository.</td></tr>
 			<tr><td><tt><sign></tt></td><td>A nested element to enable signing.  This element supports the following attributes:
 			<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
 				<tr><td><tt>alias</tt></td><td>The alias to sign with</td></tr>
@@ -214,7 +243,20 @@ Examples:
 </table>		
 <br>
 <table cellspacing="1" cellpadding="2" width="95%" align="center">
-	<tr><td><b><tt>p2.composite.repository</tt></b></td></tr>
+	<tr><td><b><h3>p2.remove.iu</h3></b></td></tr>
+	<tr><td><p>Remove Installable Units from the given metadata and artifact repositories.  The provided repositories must be modifiable.</p></td></tr>
+	<tr><td><p>This task supports the following attributes and elements:</p>
+		<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
+			<tr><td><tt><repository></tt></td><td>Nested elements specifying metadata and artifact repositories to remove Installable Units from.  See <a href="#destination_repositories">destination repositories</a> above.  
+			A metadata repository is required, the artifact repository is optional.</td></tr>
+			<tr><td><tt><iu></tt></td><td>Nested IU elements, as outlined <a href="#installable_units">above</a>.  
+			  The installable units to remove.  Matching IUs are removed from the metadata repository, and all associated artifacts are removed from the artifact repository (if provided).</td></tr>
+		</table>
+	</td></tr>
+</table>		
+<br>
+<table cellspacing="1" cellpadding="2" width="95%" align="center">
+	<tr><td><b><h3>p2.composite.repository</h3></b></td></tr>
 	<tr><td><p>Create a composite repository</p></td></tr>
 	<tr><td><p>This task supports the following attributes and elements:</p>
 		<table border="5" cellspacing="0" cellpadding="1" width="95%" align="center">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_startup.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_startup.htm
new file mode 100644
index 0000000..e627d0c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_startup.htm
@@ -0,0 +1,82 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>Forced update on startup</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>
+Forced update on startup</H2>
+<p>
+Sometimes the simplest UI is no UI.  In a highly-managed product installation, it may be desirable to 
+automatically update the application each time it is started, with no intervention from the user.  
+In this case, the update is not truly "headless," since a progress indicator is shown while searching for updates.  
+The user may cancel the update, but otherwise cannot intervene with the update.  If no updates are found, the user is notified.
+</p>
+<p><img border="0" src="images/p2forcedupdate.png" alt="Progress Indicator showing update search" >
+</p>
+<p>
+In this configuration, the p2 UI class libraries bundle (<b>org.eclipse.equinox.p2.ui</b>) is not needed at all.  
+Only the p2 core code is used to achieve the update. An example RCP application that uses this approach can be
+found <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/?root=RT_Project">here</a>.  
+</p>
+<p>In this kind of scenario, you need to ensure that all of the p2 services are available at startup time, when the update check is
+to be performed.  The example bundle itself must be started.  Less obvious is that the <b>org.eclipse.equinox.ds</b> bundle must be 
+started so that all of the declared services will be found.  This can be accomplished in a number of ways, depending on how you are 
+running the example:
+<ul>
+<li>set the bundle start level in the Configuration tab of the product editor (the .product file for your build)</li>
+<li>force a start of the bundle in the config.ini of the already built app</li>
+<li>set the bundle start level in the launch configuration if you are simply launching the example in Eclipse</li>
+</ul>
+</p>
+<p>The update check is performed in the <b>postWindowOpen()</b> method of the example's <b>ApplicationWorkbenchWindowAdvisor</b> 
+class.  This method sets up the progress monitoring, invokes the update search, and handles any errors or notifications.  It uses a 
+preference to remember if it is restarting after an update, so that the update search is not repeated when the application
+is restarted after updating.
+</p>
+<p>The update check method itself is rather simple, because it does not attempt to involve the user in making any choices about the updates.
+It uses the <b><a href="../reference/api/org/eclipse/equinox/p2/operations/package-summary.html">p2 Operations API</a></b> (new in Eclipse 3.6) to 
+search for updates and perform the update.
+</p>
+<pre>
+public class P2Util {
+	// XXX Check for updates to this application and return a status.
+	static IStatus checkForUpdates(IProvisioningAgent agent, IProgressMonitor monitor) throws OperationCanceledException {
+		ProvisioningSession session = new ProvisioningSession(agent);
+		// the default update operation looks for updates to the currently
+		// running profile, using the default profile root marker. To change
+		// which installable units are being updated, use the more detailed
+		// constructors.
+		UpdateOperation operation = new UpdateOperation(session);
+		SubMonitor sub = SubMonitor.convert(monitor,
+				"Checking for application updates...", 200);
+		IStatus status = operation.resolveModal(sub.newChild(100));
+		if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
+			return status;
+		}
+		if (status.getSeverity() == IStatus.CANCEL)
+			throw new OperationCanceledException();
+		
+		if (status.getSeverity() != IStatus.ERROR) {
+			// More complex status handling might include showing the user what updates
+			// are available if there are multiples, differentiating patches vs. updates, etc.
+			// In this example, we simply update as suggested by the operation.
+			ProvisioningJob job = operation.getProvisioningJob(null);
+			status = job.runModal(sub.newChild(100));
+			if (status.getSeverity() == IStatus.CANCEL)
+				throw new OperationCanceledException();
+		}
+		return status;
+	}
+}
+</pre>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_ui.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_ui.htm
new file mode 100644
index 0000000..df84a9b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_ui.htm
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>Customizing the p2 UI</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>
+Customizing the p2 UI</H2>
+<p>
+There are several different levels of integration with the p2 UI, depending on what kind of support you want to surface 
+to your users.
+<ul>
+<li>If your goal is to <a href="p2_uireuse.htm">reuse the Eclipse SDK UI</a> inside your own product, you can
+include the <b>org.eclipse.equinox.p2.user.ui</b> feature in your product.  If you want only a subset of the functionality, such as providing
+update support but not installation support, you can use a subset of the bundles in that feature and
+use the Eclipse SDK UI contributions as a model for your
+own contributions.</li>
+<li>If your goal is to <a href="p2_uipolicy.htm">customize the way information is presented</a>, you can configure a p2 UI <b>Policy</b> that
+changes aspects of the UI.</li>
+<li>If you want to <a href="p2_startup.htm">force update of your application</a>, you can use the p2 <b>Operations</b> API to perform a customized
+search for updates on startup.</li>
+</ul>
+</p>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uipolicy.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uipolicy.htm
new file mode 100644
index 0000000..695703c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uipolicy.htm
@@ -0,0 +1,260 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>Configuring the UI Policy</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>
+Configuring the UI Policy</H2>
+<p>
+Some aspects of what the p2 UI presents and how it behaves are configurable using
+the <b><a href="../reference/api/org/eclipse/equinox/p2/ui/Policy.html">Policy</a></b> class.
+You can configure an instance of this class (or subclass) in order to customize the UI
+for your application.  This policy is registered as an OSGi service, and retrieved by the UI
+in order to make decisions about presentation.  
+</p>
+<p>Depending on the application requirements, 
+the policy instance may be configured in code, configured using internal preferences,
+or even by exposing some of the decisions to a user in a preference page.  The policy 
+allows you to control things such as
+<ul>
+<li>whether repositories (sites) are visible to the user, and whether the user 
+is permitted to manipulate (add, enable, disable, remove) the sites that are used for install and update</li>
+<li>what software (installable units) is visible to the user when browsing software sites</li>
+<li>what software (installable units) is shown as the roots of the 'Installed Software' page</li>
+<li>whether restart is required after updating an application</li>
+</ul>
+</p>
+<h3>Example: Installing from the Cloud</h3>
+<p>
+This kind of customization is best described by example.  A common scenario in RCP applications is that the user should be able
+to update the application, or install additional software, from a controlled set of update sites.  This is common in managed installations, 
+where a systems administrator is maintaining an internal update site.  From the user point of view, updates come from one "cloud" rather 
+than individual software sites, and there is no visibility of software sites.
+</p>
+<p>In this example, we want the UI to behave in the following ways:</p>
+<ul>
+<li>we do not want to expose any site management function or site preferences</li>
+<li>we do not want to expose the standard SDK update preferences, but instead use our own values</li>
+<li>we want to contribute the standard installation pages (allowing access to uninstall, update, and revert) </li> 
+<li>we want to allow automatic updating using the standard preference page</li>
+<li>we group the application preferences and update menu items in a <b>Tools</b> menu</li>
+</ul>
+<p>A sample RCP Mail application which does this kind of customization can be found
+<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud/?root=RT_Project">in CVS</a>.
+The most important aspect of this example is that we need to configure the p2 UI <b><a href="../reference/api/org/eclipse/equinox/p2/ui/Policy.html">Policy</a></b>
+according to our requirements and register it.  
+</p>
+<p>We will register our policy in the startup code of the existing RCP Mail bundle 
+class.
+</p>
+
+<pre>
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+		// XXX register the p2 UI policy
+		registerP2Policy(context);
+		getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
+	}
+</pre>
+<p>
+The registration method creates a default policy instance, updates it according to some preference values, and registers it.
+</p>
+<pre>
+	private void registerP2Policy(BundleContext context) {
+		policy = new CloudPolicy();
+		policy.updateForPreferences();
+		policyRegistration = context.registerService(Policy.class.getName(), policy, null);
+	}
+</pre>
+<p>
+In this example, we wish to initialize a policy instance that prevents the user from manipulating the repositories.  
+There are several ways to go about this.  The most direct way is that the policy initializes its desired values on construction.
+</p>
+<pre>
+public class CloudPolicy extends Policy {
+	public CloudPolicy() {
+		// XXX User has no visibility for repos
+		setRepositoriesVisible(false);
+	}
+}
+</pre>
+<p>
+A more general approach is for the policy to derive its values from preference settings.  These preferences are not exposed to the end 
+user, but are used to control how the policy initializes itself.  This is the approach taken in the cloud example.  
+The advantage of such an approach is that the policy can be configured by altering the preference values in the 
+<b>plugin_customization.ini</b> file for the application.
+</p>
+<p>
+The policy code simply reads preference settings and adjusts the policy accordingly.
+</p>
+<pre>
+	public void updateForPreferences() {
+		IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
+		setRepositoriesVisible(prefs
+				.getBoolean(PreferenceConstants.REPOSITORIES_VISIBLE));
+		setRestartPolicy(prefs.getInt(PreferenceConstants.RESTART_POLICY));
+		setShowLatestVersionsOnly(prefs
+				.getBoolean(PreferenceConstants.SHOW_LATEST_VERSION_ONLY));
+		setGroupByCategory(prefs
+				.getBoolean(PreferenceConstants.AVAILABLE_GROUP_BY_CATEGORY));
+		setShowDrilldownRequirements(prefs
+				.getBoolean(PreferenceConstants.SHOW_DRILLDOWN_REQUIREMENTS));
+		if (prefs.getBoolean(PreferenceConstants.AVAILABLE_SHOW_ALL_BUNDLES))
+			setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
+		else
+			setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
+		if (prefs.getBoolean(PreferenceConstants.INSTALLED_SHOW_ALL_BUNDLES))
+			setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
+		else
+			setVisibleAvailableIUQuery(new UserVisibleRootQuery());
+
+	}
+</pre>
+<p>
+Now, the <b>plugin_customization.ini</b> file can be edited according to the desired policy.  
+A sample file that explains all of the configurable aspects of the policy is included in the example.
+It looks something like this.
+</p>
+<pre>
+# we can configure the update UI by using application preferences to initialize the default UI policy
+
+# should user be able to see and manipulate repositories in the install wizard
+org.eclipse.equinox.p2.examples.rcp.cloud/repositoriesVisible=false
+
+# force restart after a provisioning operation (see possible values in org.eclipse.equinox.p2.ui.Policy.restartPolicy())
+org.eclipse.equinox.p2.examples.rcp.cloud/restartPolicy=1
+
+# show only latest versions when browsing for updates
+org.eclipse.equinox.p2.examples.rcp.cloud/showLatestVersionOnly=true
+
+# software should be grouped by category by default
+org.eclipse.equinox.p2.examples.rcp.cloud/groupByCategory=true
+
+# show only groups (features) in the available list, not every bundle
+org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesAvailable=false
+
+# show only the install roots in the installed software list
+org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesInstalled=false
+
+# do not drilldown into requirements in the wizards, just show the high level things
+org.eclipse.equinox.p2.examples.rcp.cloud/showDrilldownRequirements=false
+
+# automatic update options are defined in org.eclipse.equinox.p2.sdk.scheduler.PreferenceConstants
+
+# check for updates on startup
+org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true
+org.eclipse.equinox.p2.ui.sdk.scheduler/schedule=on-startup
+
+# remind the user every 4 hours
+org.eclipse.equinox.p2.ui.sdk.scheduler/remindOnSchedule=true
+# see AutomaticUpdatesPopup, values can be "30 minutes", "Hour", "4 Hours"
+org.eclipse.equinox.p2.ui.sdk.scheduler/remindElapsedTime=4 Hours
+
+# download updates before notifying the user
+org.eclipse.equinox.p2.ui.sdk.scheduler/download=true
+</pre>
+<p>The rest of the UI code in the cloud example is based on code from <b>org.eclipse.equinox.p2.ui.sdk</b>.
+We copy the command handlers for install and update, and choose not to use any of the preference pages.  
+The <b>plugin.xml</b> contributions for the standard installation pages are also included.
+The page implementations are contained in the p2 UI bundle, so we only need to define the names of the pages and 
+point to the existing implementations.
+</p>
+<p>The end result is an application whose install and update UI looks familiar.  The most significant change is that the 
+<b>Install New Software...</b> wizard no longer provides any control over which sites are shown.  
+Only the content from sites preconfigured in the product (using the <b>p2.inf</b> file in our example) are shown.
+</p>
+<p><img border="0" src="images/p2cloudinstall.png" alt="Example Install Wizard" >
+</p>
+<h3>Example: Customizing the UI Queries</h3>
+<p>The Eclipse SDK and the examples shown so far use the default p2 
+UI Policy queries that control the visibility of software items.
+In practice, this means that only Eclipse features are shown when 
+browsing the various update sites.  However, p2 does not have any 
+specific knowledge of Eclipse features, nor does it require that 
+installation and update operations be based on features.  
+Similarly, only items actually installed by the end user, (or defined as installed items at 
+product-build time), are shown in the <b>Installed Software</b> page.  
+This is done to simplify the view of the installation.
+</p>
+<p>
+Your application can change the visibility of items in the UI by defining customized
+queries for obtaining the available or installed software.  
+In this example, we'll replace the filtered queries normally used by the Eclipse SDK with queries that show everything available.  
+(We'll also show how this can be achieved by altering the preference settings in the Cloud example.  
+The approach taken in this example is shown in order to demonstrate how the queries can be replaced with application-defined queries.  
+For example, the query could be modified to show only IU's with a certain property, or only those whose ids are associated with the 
+application).
+</p>
+<p>A complete example is available in 
+<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/?root=RT_Project">CVS</a>.
+When installing new software, every available bundle is shown in the install wizard.  (Note that you must uncheck the 
+<b>Group items by category</b> checkbox to see this list.)
+</p>
+<p><img border="0" src="images/p2allbundles.png" alt="Example Install Wizard showing all bundles in the repository" >
+</p>
+<p>Likewise, the <b>Installed Software</b> page shows every bundle in the installation, not just the "root" of the product 
+and the user-installed items.
+</p>
+<p><img border="0" src="images/p2allbundlesinstalled.png" alt="Example Installed Software page showing all bundles that are installed" >
+</p>
+<p>
+The steps for building the contributions are similar to those for the Cloud example above.  This time, the
+policy class is called <b>AllIUsAreVisiblePolicy</b>.
+</p>
+<pre>
+public class AllIUsAreVisiblePolicy extends Policy {
+	public AllIUsAreVisiblePolicy() {
+		// XXX Use the pref-based repository manipulator
+		setRepositoryPreferencePageId(PreferenceConstants.PREF_PAGE_SITES);
+		
+		// XXX All available IU's should be shown, not just groups/features
+		setVisibleAvailableIUQuery(InstallableUnitQuery.ANY);
+		// XXX All installed IU's should be shown, not just the user-installed.
+		setVisibleInstalledIUQuery(InstallableUnitQuery.ANY);
+	}
+}
+</pre>
+<p>
+The queries that retrieve the visible available software, and the visible installed
+software, are set so that all Installable Units are shown.
+</p>
+<p>
+In this example, we use OSGi declarative services to register the policy.  Rather than manually register the 
+service when our example Activator starts, we instead declare the service in a <b>policy_component.xml</b> file.  
+Using declarative services is not necessary in this particular example, but could become necessary if we were to
+separate our p2 UI contributions into another bundle.  In that case, it becomes possible for p2 UI components that 
+use the policy (the preference page or installation pages) to be invoked before the bundle that configures the 
+policy starts.  Declarative services ensures that the policy is found and the bundle starts when the service is needed. 
+</p>
+<p>
+As mentioned previously, the Cloud example preferences may also be used to make everything visible in the UI.  
+This can be done by editing the <b>plugin_customization.ini</b> file in the example.
+</p>
+
+<pre>
+# show only groups (features) in the available list, not every bundle
+org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesAvailable=true
+
+# show only the install roots in the installed software list
+org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesInstalled=true
+</pre>
+<h3>Modifying the p2 UI Policy while reusing the p2 UI feature</h3>
+<p>
+Because the p2 UI Policy is defined as an OSGi service, products that ship with the <b>org.eclipse.equinox.p2.user.ui</b> feature 
+unmodified can still provide an alternate implementation of the UI Policy.  The <b>org.eclipse.equinox.p2.ui.sdk</b> bundle declares the 
+service with a default ranking value (0).  This means that the product must supply a policy implementation with a higher service ranking.  
+When the policy service is found, the highest ranking policy will win.  A sample file that declares a policy with a ranking of 1000 can be 
+found <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml?root=RT_Project&view=markup">here</a>.
+</p>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uireuse.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uireuse.htm
new file mode 100644
index 0000000..83343df
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/p2_uireuse.htm
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2008, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>Reusing parts of the UI</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>
+Reusing parts of the UI</H2>
+<p>
+You may reuse the p2 UI in its entirety, or you may pick and choose which aspects of the UI you want to include in your application.
+</p>
+<h3>Reusing the Eclipse SDK UI in its entirety</h3>
+<p>If your goal is to simply use the same update UI used in the SDK inside your RCP app, very few modifications are required. You'll 
+need to include the org.eclipse.equinox.p2.user.ui feature in your application.  This will add the following UI bundles to your 
+application (in addition to all of the p2 core and other required bundles):
+<ul>
+<li>org.eclipse.equinox.p2.ui</li>
+<li>org.eclipse.equinox.p2.ui.sdk</li>
+<li>org.eclipse.equinox.p2.ui.sdk.scheduler</li>
+</ul>
+</p>
+<p>The contributions made in the <b>org.eclipse.equinox.p2.ui.sdk</b> assume that the application has defined a <b>Help</b> menu and
+an <b>additions</b> group for adding menu contributions.
+</p>
+<p>
+A sample RCP Mail application which shows this kind of reuse can be found 
+<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/?root=RT_Project">
+in CVS</a>.</p>
+<p><img border="0" src="images/p2reuse.png" alt="Example RCP Application with p2 UI" >
+</p>
+<h3>Reusing the Eclipse SDK UI without automatic updating</h3>
+<p>
+If you want to use the SDK UI, but do not wish to add automatic update support, the application is modified as above.  
+However, the following bundles can be eliminated from the product:
+<ul>
+<li>org.eclipse.equinox.p2.ui.sdk.scheduler</li>
+<li>org.eclipse.equinox.p2.updatechecker</li>
+</ul>
+</p>
+<p>
+A sample RCP Mail application which shows how to do this can also be found 
+<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/?root=RT_Project">in CVS</a>.  
+</p>
+<h3>Modifying the UI contributions</h3>
+<p>
+If you want to include p2 update functionality in the UI, but you don't want these items to appear in exactly the 
+same way as they do in the SDK, you can provide your own bundle that makes p2 UI contributions in lieu of the SDK bundle.  
+This allows you to simply rearrange the way users encounter the install/update functionality, or provide more precise 
+control of what can be done by the user.  For example, you may wish to expose a subset of functionality, such as 
+permitting updating, but not allowing the user to uninstall, install, or revert configurations.  
+</p>
+<p>The general approach for this kind of reuse is as follows:
+<ul>
+<li>Decide which p2 UI bundles to include in your product</li>
+<ul>
+<li>Always include <b>org.eclipse.equinox.p2.ui</b></li>
+<li>If you wish to use automatic update checking, include <b>org.eclipse.equinox.p2.updatechecker</b></li>
+<li>If you wish to reuse the SDK UI for automatic update checking (the same pref page, popup, etc.), then you can also include 
+<b>org.eclipse.equinox.p2.ui.sdk.scheduler</b></li>
+</ul>
+<li>Your application must replace the functionality provided by <b>org.eclipse.equinox.p2.ui.sdk</b> according to what functionality 
+is needed. </li>
+</ul>
+</p>
+<p>
+Use the <b>org.eclipse.equinox.p2.ui.sdk</b> bundle as a model when determining which contributions to make.  For example, if you are exposing 
+user preferences, and you are including the SDK's automatic update support (and pref page), then you probably want the automatic 
+update preferences to appear underneath your application's update preferences. If so, then you'll want to use the same preference page 
+ID as used by <b>org.eclipse.equinox.p2.ui.sdk</b> so that the automatic update preference page contribution falls underneath it.
+</p>
+<p>
+The <b>IHandler</b> classes in <b>org.eclipse.equinox.p2.ui.sdk</b> invoke the update and install function.  If you are simply 
+rearranging the menus in your application, you can copy these handler classes and command contributions to your bundle and 
+revise the menu contributions as you wish.  Or you can invoke the UI in a completely different way.
+</p>
+<p>The <b>org.eclipse.ui.about.installationPages</b> contributions made by the SDK UI provide access to update functionality.  
+Consider replacing or modifying the installation page contributions if some of the actions are not relevant.
+</p>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product.htm
index dafdd92..97d4372 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product.htm
@@ -15,7 +15,7 @@
 <H1>
 Packaging and delivering Eclipse based products</H1>
 <p>
-  The Eclipse platform is designed so you can add plug-ins that provide function
+  The Eclipse platform is designed so you can add plug-ins that provide functionality
   for the software development tools community.  Commercial software
   vendors can build, brand, and package products using the platform as a base
   technology.  These products can be sold and supported commercially. 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_feature.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_feature.htm
index 538d9fd..076aca4 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_feature.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_feature.htm
@@ -17,7 +17,7 @@
 that makes up a product. Grouping plug-ins into features allows the product to be
 installed and updated using the Eclipse update server and related support.</p>  
 <p>Features do not contain any code.  They merely describe a set of
-plug-ins that provide the function for the feature and information about how to
+plug-ins that provide the functionality for the feature and information about how to
 update it. Features are packaged in a <a href="../reference/misc/feature_archive.html">feature
 archive</a> file and described using a <a href="../reference/misc/feature_manifest.html">feature
 manifest file</a>, feature.xml. The following is the first part of the manifest for
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_plugins.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_plugins.htm
index dc89d2f..3896cc2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_plugins.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_def_plugins.htm
@@ -18,8 +18,8 @@ This means that plug-ins are the fundamental unit for packaging
 function.  </p>
 <p>While features are organized for the purposes of distributing and updating
 products, plug-ins are organized to facilitate the development of the product
-function among the product team.  The development team determines when to
-carve up program function into a separate plug-in.  </p>
+functionality among the product team.  The development team determines when to
+carve up program functionality into a separate plug-in.  </p>
 <p>Plug-ins are packaged in a <a href="../reference/misc/plugin_archive.html">plug-in
 archive</a> file and described using a <a href="../reference/misc/plugin_manifest.html">plug-in
 manifest file</a>, <b>plugin.xml</b>.  </p>
@@ -27,12 +27,12 @@ manifest file</a>, <b>plugin.xml</b>.  </p>
 treated as if they were in the original plug-in archive file.  They are
 useful for adding plug-in functionality, such as additional national language
 translations, to an existing plug-in after it has been installed. 
-Fragments are ideal for shipping function that may trail the initial product
-release, since they can be used to add function without repackaging or
+Fragments are ideal for shipping functionality that may trail the initial product
+release, since they can be used to add functionality without repackaging or
 reinstalling the original plug-in.  When a fragment is detected by the
-platform, its contents are merged with the function in the original
+platform, its contents are merged with the functionality in the original
 plug-in.  In other words, if you query the platform plug-in registry, you
-would see the extensions and other function provided in the fragment as if it
+would see the extensions and other functionality provided in the fragment as if it
 was in the original plug-in.</p>
 <p>Fragments are described using a fragment manifest file, <b>fragment.xml.</b> 
 It is similar to the plug-in manifest file.  Since a fragment shares many
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_extension.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_extension.htm
index 921dc56..f038154 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_extension.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_extension.htm
@@ -22,7 +22,7 @@ need to install a JRE, the Eclipse platform, or a primary feature.  The
 recommended directory structure for extensions allows a single installation to be
 used with multiple Eclipse based products.</p>
 <p>The following directory structure shows how an extension for a hypothetical
-product, <b>betterwebs</b>, could be used to extend the function of the <b>acmeweb</b>
+product, <b>betterwebs</b>, could be used to extend the functionality of the <b>acmeweb</b>
 product.</p>
 <pre>betterwebs/
 	eclipse/			<i>(directory for installed Eclipse files)</i>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_open_file.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_open_file.htm
new file mode 100644
index 0000000..4199ded
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/product_open_file.htm
@@ -0,0 +1,174 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>Open Files</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<h2>Associate and Open Files</h2>
+<p>
+An Eclipse based <b>product</b> is a stand-alone program built with the
+Eclipse platform.  In many cases such a program would like to be associated with
+particular file types or extensions.  For example, the Eclipse IDE  
+could be configured to open all Java files.  This would allow a user 
+to double click on a Java file and have it be opened in a running Eclipse
+IDE instance or start a new instance of the Eclipse IDE if it was not 
+previously running.  In order to support this coordination is needed 
+between the Eclipse native launcher, SWT, the workbench and the RCP
+application.
+</p>
+<p>
+New command line options have been added to support this scenario:
+</p>
+<ul>
+  <li><a href="../reference/misc/runtime-options.html#launcheropenfile">--launcher.openFile</a>
+      Specifies a file to be opened.
+  </li>
+  <li><a href="../reference/misc/runtime-options.html#launcherdefaultaction">--launcher.defaultAction</a>
+      Specifies an action to take when the launcher is started witout any "-" arguments on 
+      the command line.
+  </li>
+</ul>
+<p>
+The openFile argument opens the specified file in an instance of 
+Eclipse.  If an instance is not already running then a new instance will be started.
+</p>
+
+<pre>  eclipse --launcher.openFile myFile.txt</pre>
+
+<p>
+A second option is needed to configure the launcher to automatically perform the open file 
+request without requiring the user to always specify --launcher.openFile.  A new "default action" argument has been introduced to accomplish this.  This option
+can go in the launcher.ini (eclipse.ini) file, the value must be "openFile":
+</p>
+
+<pre>  ...
+  -showsplash
+  org.eclipse.platform
+  --launcher.defaultAction
+  openFile
+  -vmargs
+  -Xms256m
+  -Xmx768m</pre>
+
+<p>
+This tells the launcher that if none of the command line arguments start with "-" then all command line arguments should be treated as if they
+followed the "--launcher.openFile" argument.
+</p>
+
+<pre>  eclipse myFile.txt</pre>
+
+<p>
+This option was added because without registry changes, this is the kind of command line the launcher will receive on windows when you double click a file that 
+is associated with eclipse, or you select files and choose "Open With" or "Send To" Eclipse.
+</p>
+
+<h3>Talking to SWT</h3>
+
+<p>
+The launcher talks to SWT through the use of a hidden window. The launcher and SWT both need to agree on 
+the name of this window. This allows the launcher to find an already running eclipse and tell it to open 
+the file. Any RCP application will need to ensure they get this right for things to work.
+</p>
+<p>
+The launcher bases this on its "official name". The official name can be set with the -name argument.
+If -name is not set, then the official name is derived from the launcher executable, the extension is removed
+and the first letter is capitalized: rcp.exe becomes Rcp.
+</p>
+<p>
+SWT bases this on the value set with the Display.setAppName() function. Normally, this is set by the
+Workbench when it creates the display and the value is the "appName" taken from the product extension point.
+</p>
+
+<h3>Listening to SWT.OpenDocument events</h3>
+<p>
+The launcher communicates with SWT to inform SWT about a request to open one or more files.  SWT then
+can fire the SWT.OpenDocument event.  For an RCP application to take advantage of this it must register
+a listener for the SWT.OpenDocument event.  It should register this listener before calling
+PlatformUI.createAndRunWorkbench so that the listener is in place before the workbench starts running 
+the event loop.
+</p>
+<p>
+The event loop will start running while the splash screen is still up, so events may arrive before the 
+workbench is ready to actually open an editor for the file. This means that the listener should save 
+the file paths it gets from the OpenDocument events so they can be opened at some later time. 
+WorkbenchAdvisor.eventLoopIdle can be a good place to check for saved open file events.
+</p>
+
+<p>
+Here is an example RCP application that does this.  First is the IApplication implementation:
+</p>
+<pre>public class Application implements IApplication {	
+
+	public Object start(IApplicationContext context) {
+		OpenDocumentEventProcessor openDocProcessor = 
+			new OpenDocumentEventProcessor();
+
+		Display display = PlatformUI.createDisplay();
+		display.addListener(SWT.OpenDocument, openDocProcessor);
+
+		try {
+			int returnCode = PlatformUI.createAndRunWorkbench(display, new 
+				ApplicationWorkbenchAdvisor(openDocProcessor));
+			if (returnCode == PlatformUI.RETURN_RESTART) {
+				return IApplication.EXIT_RESTART;
+			}
+			return IApplication.EXIT_OK;
+		} finally {
+			display.dispose();
+		}
+	}
+	...
+}</pre>
+
+<p>
+Next is an example SWT Listener that listens to the SWT.OpenDocument event:
+</p>
+<pre>public class OpenDocumentEventProcessor implements Listener {
+	private ArrayList<String> filesToOpen = new ArrayList<String>(1);
+	
+	public void handleEvent(Event event) {
+		if (event.text != null)
+			filesToOpen.add(event.text);
+	}
+
+	public void openFiles() {
+		if (filesToOpen.isEmpty())
+			return;
+
+		String[] filePaths = filesToOpen.toArray(
+			new String[filesToOpen.size()]);
+		filesToOpen.clear();
+		
+		for (String path : filePaths) {
+			// open the file path
+		}
+	}
+}</pre>
+<p>
+Finally we need a WorkbenchAdvisor that will open the files durying eventLoopIdle:
+</p>
+<pre>public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
+	private OpenDocumentEventProcessor openDocProcessor;
+
+	public ApplicationWorkbenchAdvisor(
+			OpenDocumentEventProcessor openDocProcessor) {
+		this.openDocProcessor = openDocProcessor;
+	}
+
+	...
+
+	public void eventLoopIdle(Display display) {
+		openDocProcessor.openFiles();
+		super.eventLoopIdle(display);
+	}
+}</pre>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp.htm
index f5a34ef..770c7c8 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp.htm
@@ -24,7 +24,7 @@ known as the <b>Rich Client Platform</b>.
 Applications that don't require a common resource model can be built using a subset of the platform.  These rich applications
 are still based on a dynamic plug-in model, and the UI is built using the same toolkits and extension points.  The layout and
 function of the workbench is under fine-grained control of the plug-in developer in this case.  Up until now, we've been adding
-all of our visible function to the platform SDK workbench.  In a rich client application, we are responsible for defining the
+all of our visible functionality to the platform SDK workbench.  In a rich client application, we are responsible for defining the
 application and its workbench.
 </P>
 <p>
@@ -33,7 +33,7 @@ a UI, we mean that your application need only require two plug-ins, <b>org.eclip
 However, rich client applications are free to use any API deemed necessary 
 for their feature set, and can require any plug-ins above the bare minimum.  The 
 <a href="../reference/misc/overview-platform.html">Map of platform plug-ins</a> is a useful 
-reference when determing what plug-ins should be required when using various platform
+reference when determining what plug-ins should be required when using various platform
 API.</P>
 <p>The main thing that differentiates a rich client application from the platform workbench is that the application
 is responsible for defining which class should be run as the main application.  We'll look at how this is done in
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_browser.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_browser.htm
index 1095d7d..ea9c717 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_browser.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_browser.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -23,7 +23,7 @@ We will look at how to build a Rich Client Platform application by going through
 web browser example.  This example is not included in the R3.0 SDK, but can be downloaded from the project
 <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ui.examples.rcp.browser/">org.eclipse.ui.examples.rcp.browser</a>.
 If you are working in Eclipse, you may simply check out the project from the Eclipse CVS repository (see the
-<a href="http://dev.eclipse.org/cvshowto.html">Eclipse CVS How-To</a> if you are not familiar with the procedure for
+<a href="http://wiki.eclipse.org/index.php/CVS_Howto">Eclipse CVS How-To</a> if you are not familiar with the procedure for
 checking out projects from CVS).
 </p>
 <p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_define.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_define.htm
index 6052636..f245fde 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_define.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_define.htm
@@ -38,7 +38,7 @@ Eclipse-LazyStart: true
 </pre>
 
 <p>
-Up to now, we've contributed function to the platform workbench by declaring extensions that
+Up to now, we've contributed functionality to the platform workbench by declaring extensions that
 add elements to the workbench.  In all of the <tt>plugin.xml</tt> content that we've reviewed so far,
 we've only looked at individual contributions to a workbench that is assumed to be there.  On the rich
 client platform, there is no application already defined.  Your rich client plug-in is the one
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_extensions.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_extensions.htm
index e7fca58..9ed0eac 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_extensions.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/rcp_extensions.htm
@@ -24,7 +24,7 @@ workbench window that is configured appropriately.  What else is different about
 client application?  Not much, actually.
 </p>
 <p>Once the infrastructure for the application workbench is in place, the techniques for 
-adding function to the workbench are the same as those we used when we were extending the
+adding functionality to the workbench are the same as those we used when we were extending the
 platform SDK workbench.  The workbench UI extension points are used to add views, editors,
 menus, and all of the other contributions we know and love.  In the case of the browser example,
 we'll be adding extensions for a perspective and a couple of views. </p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv.htm
index b767f13..691b881 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv.htm
@@ -35,6 +35,7 @@ features, take a gander at some of these topics:
        <li><a href="wrkAdv_efs_resources.htm">User interface support for alternative file systems</a></li>
     </ul>
   </li>
+  <li><a href="resAdv_variables.htm">Dynamic path variables</a></li>
 </ul>
 </BODY>
 </HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_natures.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_natures.htm
index a2514be..c646533 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_natures.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_natures.htm
@@ -141,7 +141,7 @@ proposed combinations of project natures using workspace API. </P>
       String[] newNatures = new String[natures.length + 1];
       System.arraycopy(natures, 0, newNatures, 0, natures.length);
 <b>      newNatures[natures.length] = "com.example.natures.myOtherNature";
-</b>      IStatus status = <b>workspace.validateNatureSet(natures);
+</b>      IStatus status = <b>workspace.validateNatureSet(newNatures);
 </b>
       // check the status and decide what to do
       if (status.getCode() == IStatus.OK) {
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_variables.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_variables.htm
new file mode 100644
index 0000000..8538fc1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resAdv_variables.htm
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>
+Dynamic Path Variables
+</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>
+Dynamic path variables</H2>
+<P >
+Each linked resource in the workspace can be specified relative to a path variable.
+</P>
+<P >
+Each IResource has a dedicated path variable manager, accessible from <b>IResource.getPathVariableManager()</b>.  
+The path variable manager allows reading, creating and changing path variables, along with resolving URIs that may be relative 
+to a path variable, as opposed to be defined as an absolute path. 
+</P>
+<P >
+Currently, each project has a separate list of path variables, so all resources under a given project have path variable managers
+that contain the same list of path variables, although that could change in the future.  Still variables <i>values</i> can be different
+between two path variable managers of two different resources.  For example, the variable "PARENT_LOC" contains the location of 
+the workspace parent of the current resource for which the path variable manager was created. 
+</P>
+<P >
+The default path variable list can be extended through the  <a href="../reference/extension-points/org_eclipse_core_resources_variableResolvers.html"><b>org.eclipse.core.resources.variablesResolvers</b></a> extension point.
+</p>
+<P >
+Because of limitations and backward compatibilities in the legacy <b>IPathVariableManager</b>, the path variable values cannot contain
+parent path lexical element ("..").  Instead, the methods <b>IPathVariableManager.convertToUserEditableFormat</b> and <b>IPathVariableManager.convertFromUserEditableFormat</b>
+can be used to convert a path that contains the ".." element into an internal format that can be stored in the URI of a variable. The UI
+automatically converts user provided strings into the internal format and vice versa.
+</p>
+</BODY>
+</HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt.htm
index 3ec9334..0f436f7 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt.htm
@@ -27,6 +27,8 @@ Resources overview</H1>
   <li><a href="resInt_preferences.htm">Project-scoped preferences</a></li>
   <li><a href="resInt_content.htm">File encoding and content types</a></li>
   <li><a href="resInt_linked.htm">Linked resources</a></li>
+  <li><a href="resInt_virtual.htm">Virtual folders</a></li>
+  <li><a href="resInt_filters.htm">Resources filters</a></li>
   <li><a href="resAdv_markers.htm">Resource markers</a></li>
   <li><a href="resAdv_modify.htm">Modifying the workspace </a> 
     <ul>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_filters.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_filters.htm
new file mode 100644
index 0000000..2fb3101
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_filters.htm
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>
+Linked resources
+</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>Resource Filters</H2>
+<P >Resource filters allow the user to configure which files and folders are included automatically in a project resource hierarchy when refresh is performed. 
+</p>
+<P >By adding resource filters to a project or folder, the user can systematically prevent some file system entries to be displayed in the resource tree. 
+</P>
+<P >Resource filters can be created using the <b>IContainer.createFilter</b> method.</P>
+<P>
+The <b>FileInfoMatcherDescription</b> object has to be initialized with the ID of a <b>filterMatchers</b> extension point.  The org.eclipse.core.resources plugin
+specifiy one default filter matcher, of ID <b>org.eclipse.core.resources.regexFilterMatcher</b>, which accepts regular expressions Strings as argument.  Other plugins distributed with the workbench (such as the <b>org.eclipse.ui.ide</b> plugin) define other reusable filter matchers. 
+</p>
+<P>
+Filter matchers are extensible through the <b>org.eclipse.core.resources.filterMatchers</b> extension point.
+</p>
+</BODY>
+</HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_virtual.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_virtual.htm
new file mode 100644
index 0000000..1aab077
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/resInt_virtual.htm
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<TITLE>
+Linked resources
+</TITLE>
+
+<link rel="stylesheet" type="text/css" HREF="../book.css">
+</HEAD>
+<BODY BGCOLOR="#ffffff">
+<H2>Virtual Folders</H2>
+<p>
+Virtual folders are folders that do not exist in the file system.
+They are shown to the user with a unique folder icon.</p>
+<p>
+The method <b>IResource.isLinked</b> returns true for virtual folders, and 
+<b>IResource.getLocation</b>/<b>IResource.getLocationURI</b> always returns null.</p>
+<p>
+Virtual folders can be created by passing the <b>IResource.VIRTUAL</b> flag to the <b>IResource.create</b> method.</p>
+<p>
+By design, virtual folders can only have linked resources or other virtual folders as children.
+</p>
+</BODY>
+</HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm
index e0719a5..92026e2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_jobs.htm
@@ -217,6 +217,15 @@ be used to locate instances of all running, waiting, and sleeping jobs at any
 given time.
 </p>
 
+<h3>Completing jobs before shutdown</h3>
+<p>
+Since jobs run concurrently, it is possible for your jobs to be still running when the platform
+begins to shutdown. This is a dangerous situation, since after your plug-in stops it
+may not behave correctly or be able to load classes. For this reason, it is important
+for you to ensure all your jobs are canceled and completed in your plug-in's <code>stop</code>
+method. As in the previous example, you can use a job family to ensure all jobs
+scheduled by your plug-in are canceled and joined before your plug-in stops running.
+</p>
 
 </BODY>
 </HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model.htm
index 8cd7d9a..d41e496 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model.htm
@@ -17,7 +17,7 @@ The runtime plug-in model</H2>
 <P >
 The platform runtime engine is started when a user starts an application developed with Eclipse.  
 The runtime implements the basic <b>plug-in</b> model and infrastructure used by the platform.  
-It keeps track of all of the installed plug-ins and the function that they provide. 
+It keeps track of all installed plug-ins and the functionality that they provide. 
 </p>
 <p>A plug-in is a structured component that contributes code (or documentation or both) to the system and describes
 it in a structured way. Plug-ins can define <b>extension points</b>, well-defined 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model_bundles.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model_bundles.htm
index 0c9cf95..4632acb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model_bundles.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/runtime_model_bundles.htm
@@ -24,7 +24,7 @@ the terms <b>plug-in</b> and <b>bundle</b> interchangeably, unless discussing a
 <p>
 The <b><a href="../reference/api/org/eclipse/core/runtime/Plugin.html">Plugin</a></b> class represents a plug-in that
 is running in the platform.  It is a convenient place to centralize the life-cycle aspects and overall 
-semantics of a plug-in.  A plug-in can implement specialized function for the <b>start</b> and <b>stop</b>
+semantics of a plug-in.  A plug-in can implement specialized functionality for the <b>start</b> and <b>stop</b>
 aspects of its life-cycle.  Each life-cycle method includes a reference to a  
 <b><a href="http://www.osgi.org/javadoc/r4v42/org/osgi/framework/BundleContext.html">BundleContext</a></b> which can supply
 additional information.</p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/swt_widgets_events.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/swt_widgets_events.htm
index d71ca9c..7eeb468 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/swt_widgets_events.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/swt_widgets_events.htm
@@ -152,6 +152,16 @@ or by user.</td>
 </TR>
 
 <tr>
+<td><strong>OpenDocument</strong></td>
+<td>The operating system has requested that a document be opened.</td>
+</tr>
+
+<tr>
+<td><strong>OrientationChange</strong></td>
+<td>The orientation of a Text control is changing.</td>
+</tr>
+
+<tr>
 <td><strong>PaintItem</strong></td>
 <td>A TableItem or TreeItem is about to have its foreground drawn.</td>
 </tr>
@@ -177,6 +187,11 @@ on a row in a Table or by keyboard navigating through the items.</td>
 <td>A control's visibility has changed.</td>
 </tr>
 
+<tr>
+<td><strong>Skin</strong></td>
+<td>A control needs to be skinned.</td>
+</tr>
+
 <TR>
 <td><strong>Traverse</strong></td>
 <td>The user is trying to traverse out of the control using a keystroke.  For
@@ -233,7 +248,7 @@ control.</td>
 </TR>
 
 <TR>
-<td><strong>MouseWheel</strong></td>
+<td><strong>MouseHorizontalWheel, MouseVerticalWheel, MouseWheel</strong></td>
 <td>The mouse wheel has been rotated.</td>
 </TR>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_howto.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_howto.htm
index 0228a0d..a045f62 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_howto.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_howto.htm
@@ -27,7 +27,7 @@ introduced by the team plug-in.) It's a matter of understanding <a
  href="workbench.htm">workbench integration</a>. So let's start
 with the big picture. We'll be using the CVS client as a case
 study for integrating a team provider with the platform. Let's look at
-some of the function the CVS provider supplies and what workbench and
+some of the functionality the CVS provider supplies and what workbench and
 team facilities you can use to achieve similar levels of integration.</p>
 <p>
 <img
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_model.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_model.htm
index ae13795..ae240c9 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_model.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_model.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 <meta name="copyright"
-	content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+	content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
 <meta content="text/css" http-equiv="Content-Style-Type">
 <link type="text/css" charset="ISO-8859-1" href="../book.css"
@@ -41,7 +41,7 @@ of the Team logical model support:</p>
 	API to ensure proper decoration of model elements that do not have a
 	one-to-one mapping to resources.</li>
 	<li>Use the <a href="#Saveable">Saveable</a>
-	API to manage the save life cycle of model elements.)</li>
+	API to manage the save life cycle of model elements.</li>
     <li>Use the <a href="#ElementHistory">ElementLocalHistoryPageSource</a>
 	API to show local history for sub-file model elements (e.g. Java methods)</li>
 	<li>Use the <a href="#ChangeTracker">ChangeTracker</a>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_repo.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_repo.htm
index 58d1893..8f7792b 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_repo.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_model_repo.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 <meta name="copyright"
-	content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+	content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
 <meta content="text/css" http-equiv="Content-Style-Type">
 <link type="text/css" charset="ISO-8859-1" href="../book.css"
@@ -434,7 +434,7 @@ display logical models:</p>
 	several ways to tailor the preview.</li>
 </ul>
 <p>The <code>ModelSynchronizeParticipant</code> provides integration
-into the Synchronize view or any container that can display <code>iSynchronizePages</code>.
+into the Synchronize view or any container that can display <code>ISynchronizePage</code>s.
 The participant makes use of both the pre-existing synchronization
 participant capabilities and the Common Navigator capabilities to allow
 for team providers and models to tailor the toolbar, context menu and
@@ -445,12 +445,12 @@ provides the following:</p>
 	manager, merge context and team content providers.</li>
 	<li>Toolbar actions for displaying direction modes (Incoming,
 	Outgoing, Both and Conflicting modes).</li>
-	<li>Toolbar action for cycling through models involves (i.e. Show
+	<li>Toolbar action for cycling through models involved (i.e. Show
 	All, Show Resources, Show Java, etc).</li>
 	<li>Refresh and scheduled refresh actions.</li>
 	<li>Action to open elements in a compare editor.</li>
 	<li>Change Navigation actions.</li>
-	<li>Standard Merge actions (Merge, Overwrite and MarkasMerged) for
+	<li>Standard Merge actions (Merge, Overwrite and Mark as Merged) for
 	which models can register handlers and team providers can provide
 	appropriate labels (e.g. Update for CVS).</li>
 </ul>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_provider_repository.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_provider_repository.htm
index 2edf102..65c9d81 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_provider_repository.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/team_provider_repository.htm
@@ -236,7 +236,7 @@ Project...</span> wizard which allows filtering of repository providers
 based on the enabled/disabled state of workbench capabilities, and the
 other is the Team plug-in auto-enablement trigger.</p>
 <h3>Resource modification hooks<a name="hooks"></a></h3>
-<p>Most of the interesting function associated with a repository
+<p>Most of the interesting functionality associated with a repository
 provider occurs as the user works with resources in the project that is
 configured for the provider.  In order to be aware of changes the
 user makes to a resource, the provider can implement <a
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_dynamic_filters.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_dynamic_filters.htm
index 3e11e79..3b823fc 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_dynamic_filters.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_dynamic_filters.htm
@@ -491,14 +491,16 @@ match is assumed. If it should <i>not</i> match, set the modifier to "<code>!</c
    </a>
 </pre>
 
-<h3>Infocenter</h3>
+<h3>Information Center</h3>
 
 <p>
-Filtering support is turned <strong>off</strong> when running help in
-<a href="ua_help_setup_infocenter.htm">infocenter</a> mode, causing all content,
+Filtering support is turned <strong>off</strong> by default when running help in
+<a href="ua_help_setup_infocenter.htm">information center</a> mode, causing all content,
 including filtered content, to be visible. If you intend to host your
-documentation in both workbench and infocenter modes, you should use filters in
-a way that makes sense even if filtering is turned off.
+documentation in both workbench and information center modes, you should use filters in
+a way that makes sense even if filtering is turned off. If you wish to turn on filtering
+in an information center set the customization preference <code>filterInfocenter</code> to true,
+see <a href="ua_help_setup_preferences.htm">help system customization</a>. 
 </p>
 
 <h3>Where can I use filters?</h3>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_abstract_scope.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_abstract_scope.htm
new file mode 100644
index 0000000..dc632da
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_abstract_scope.htm
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
+<title>Using AbstractHelpScope to filter an information center</title>
+</head>
+<body>
+
+<h2>Using AbstractHelpScope to filter an information center</h2>
+
+<p>
+An information center can be used to serve information for more than one product. Using the AbstractHelpScope 
+class it is possible to define documentation subsets called help scopes which allow for users to see only the information which 
+applies to one or more specific products. </p>
+
+<p>
+A help scope consists of an id and a class which subclasses AbstractHelpScope and is defined in the extension 
+point <code>org.eclipse.ua.tests.help.scope</code>. The AbstractHelpScope class contains methods for determining 
+whether a table of contents, topic or index entry should be included in the scope. Once a help scope with an id of myId
+has been declared it can be applied by opening an infocenter with a url of this form: 
+<pre>http://<host>:<port>/help/index.jsp?scope=myId</pre>
+This will present an infocenter which shows only those topics which fall within the scope myId.
+</p>
+
+
+<p>
+Scopes can be joined together to retrieve the intersection or union of multiple scopes.  A basic query language can be used
+to perform these multi-scope operations.
+<dl>Examples:
+	<dt>Filter help info to include anything in A,B, or C:</dt>
+   	<dd>scope=A|B|C</dd>
+   	<dd>scope=(A|B|C)</dd>
+	<dt>Filter help info to include anything in A,B, and C:</dt>
+	<dd>scope=A^B^C</dd>
+	<dd>scope=(A^B^C)</dd>
+	<dd>scope=A&scope=B&scope=C</dd>
+	<dt>Filter help to include A or B, and C:</dt>
+	<dd>scope=(A|B)^C</dd>
+	<dd>scope=A|B&scope=C</dd>
+	<dd><b>Note:</b> (A|B^C) will not be recognized by the parser, and will only use the last operation, so it will look like (A^B^C)</dd>
+	<dt>Filter help to include A and B, or, A and C:</dt>
+	<dd>scope=(A^B)|(A^C)</dd>
+</dl>
+The URL character for 'and' (intersection) is '^', and 'or' (union)
+is '|'.  
+</p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_child_links.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_child_links.htm
new file mode 100644
index 0000000..055bb4c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_child_links.htm
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<title>Adding Child Links to Help Pages</title>
+</head>
+<body>
+
+<h2>Adding Child Links to Help Pages</h2>
+
+<p>
+The Eclipse Help System recognizes two special comments in the source code which can be used to 
+cause child links to appear in help topics. This is useful in the case of a help topic which is
+the parent of an anchor. 
+</p>
+<p>
+If the sequence <pre><!--INSERT_CHILD_LINKS--></pre> appears in the source code it will be replaced
+with html containing hyperlinks to all child topics.
+</p>
+<p>
+If the sequence <pre><!--INSERT_CHILD_LINK_STYLE--></pre> appears in the source code it will be replaced
+by either <code>"has_child_topics"</code> or <code>"no_child_topics"</code> depending on whether or not
+the topic has children. This can be used to assign a style to a section of html so that it will only be
+shown if the topic has children.
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_criteria.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_criteria.htm
new file mode 100644
index 0000000..2a8ab65
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_criteria.htm
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<title>Adding criteria to help content</title> 	
+</head>
+<body>
+
+<h2>Adding criteria to help content</h2>
+
+<p>This page will explain how to activate criteria. To enable criteria you need define which criteria are associated 
+with each topic and also set preferences which tell the help system to show criteria. The association between criteria and topics can be
+either in a toc file or using a criteria provider class. </p>
+
+<h3>What are criteria?</h3>
+
+<p>Some topics of the plug-in might only be of interest to certain users, for example a topic may be specific to the linux platform.
+The document writer can define a criterion "platform" with values such as "linux", "windows" etc applied to different topics. The user can
+then filter the documentation to show only documents applicable to a specific platform.
+</p>
+
+<h3>How to define criteria in a table of contents file</h3>
+
+<p>When defining a table of contents file criteria information can be appended according to these steps:</p>
+<ul>
+<li>Add criteria tag as children to the topic.</li>
+<li>Use id to define 'name' and 'value' attribute of the criteria element</li>
+</ul>
+<p>For example:</p>
+<pre>
+ <toc href="tochref">
+      <criteria  name="platform"  value="AIX">
+      <criteria  name="platform"  value="Windows">
+      <topic label="label1" href="href1">
+          <criteria  name="platform" value="Windows">
+      </topic>
+      <topic label="label2" href="href2">
+          <criteria name="platform" value="AIX">      
+      </topic>
+ </toc>
+</pre>
+<p>Some rules to follow when adding criteria:</p>
+<ul>
+<li>The criteria name is case insensitive but the criteria value is case sensitive.</li>
+<li>It is important to ensure that parent topics contain all of the criteria of any of their children,
+ the parent and child will not show in the  
+table of contents if filtered using criteria which only the child satisfies.</li>
+<li>Any criterion with an empty value is invalid and will be ignored.</li>
+<li>Multiple comma separated values can be specified in a single <criteria> element, for example 
+<criteria name="Platform" value="AIX,Linux"/>. The name attribute takes a single value.</li>
+</ul>
+
+<h3>How to define criteria using a criteria provider</h3>
+<p>As an alternative to defining criteria in a table of contents file the extension point
+<a href="../reference/extension-points/org_eclipse_help_criteriaProvider.html">org.eclipse.criteriaProvider</a>
+can be used to define a class which will associate criteria with topics.
+Criteria defined using this extension point will be merged with those defined in the table of contents 
+and if multiple criteria providers are defined each will contribute to the criteria of an ITopic or IToc.
+</p>
+
+
+<h3>Criteria localization</h3>
+<p>The names and values of criteria can be localized.
+Follow these steps to add localization information for criteria:</p>
+<ul>
+<li>In plugin.xml, use the extension point 
+<a href="../reference/extension-points/org_eclipse_help_criteriaDefinition.html">org.eclipse.help.criteriaDefinition</a> 
+to provide the criteria definition file. (if no translation file is provided, then the id of criteria name and value will be displayed). 
+For example:
+<pre>
+ <extension point="org.eclipse.help.criteriaDefinition">
+      <criteriaDefinition file="criteria.xml"/>
+ </extension>
+</pre>
+</li>
+
+<li>In the definition file, define the translation of criteria information. 
+Node 'criterion' represents the criterion name.
+Node 'criterion-value' represents the criterion value.
+All 'id' attributes represent the id of criterion name or value.
+All 'name' attributes represent the display name of criteria name or value in one specific locale. 
+For example:
+<pre>
+ <criteriaDefinition>
+      <criterion id="platform" name="Platform">
+          <criterion-value id="AIX" name="AIX Server"/>
+          <criterion-value id="Windows" name="Windows Server"/>
+      </criterion>
+ </criteriaDefinition>
+</pre>
+</li>
+
+</ul>
+<h3>How to set the preferences to enable criteria</h3>
+<p>Define the necessary preferences in your plugin customization file.</p>
+<ul>
+<li>enableCriteria. This preference must be true to enable filtering by criteria.
+<pre>example: org.eclipse.help/enableCriteria = true</pre></li>
+
+<li>supportedCriteria. A comma separated list of the criteria which will be supported in the help system. 
+<pre>example: org.eclipse.help/supportedCriteria = platform,version</pre>
+which means that 'platform' and 'version' are the supported criteria in help system.
+</li>
+</ul>
+<p> 	
+See Also:
+<br>
+<a href="../reference/extension-points/org_eclipse_help_criteriaDefinition.html">The criteria definition extension point.</a>
+<br>	
+<a href="../reference/extension-points/org_eclipse_help_criteriaProvider.html">The criteria provider extension point.</a>	
+</p>
+</body>	
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_nested.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_nested.htm
index c1f5064..5a632e1 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_nested.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_nested.htm
@@ -12,7 +12,7 @@
 
 <h2>Building nested documentation structures</h2>
 
-<p>As plug-ins contribute function to the platform, it's common to add
+<p>As plug-ins contribute functionality to the platform, it's common to add
 documentation that describes the new function.  How can this documentation
 be structured so that the user sees a cohesive and complete set of documentation
 instead of many individual contributions?  The table of contents definition
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_process.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_process.htm
index d38cf2f..4c57802 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_process.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_process.htm
@@ -14,8 +14,8 @@
 
 <p>
 The Eclipse help system performs preprocessing on html and xhtml pages to add breadcrumbs 
-and JavaScript. The processing is performed by output filter which operate on the output stream. Since Eclipse 3.5 
-Eclipse has had an extension point to allow user defined filters to be added. This can be used for example to inject javascript 
+and JavaScript. The processing is performed by output filter which operate on the output stream. 
+Eclipse has an extension point to allow user defined filters to be added. This can be used for example to inject javascript 
 into every help page. See the extension point <a href = 
 "../reference/extension-points/org_eclipse_help_webapp_contentFilter.html"> org.eclipse.help.webapp.contentFilter</a> 
 for more information.
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_remote.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_remote.htm
index 1f0b8d1..bd9ed66 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_remote.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_remote.htm
@@ -17,7 +17,7 @@
 <p>
 The help system provides the ability to retrieve content, not only from plug-ins
 installed in the local instance of Eclipse, but also from one or more remote servers running
-help in <a href="ua_help_setup_infocenter.htm">infocenter</a> mode. This allows
+help in <a href="ua_help_setup_infocenter.htm">information center</a> mode. This allows
 products to ship without help content and provide it from a server to reduce their
 download and install size. It also allows user the ability to include help content
 from plug-ins not installed in their environment.
@@ -38,7 +38,7 @@ are available, local content will be supplied rather than remote content.
 
 <p>
 All you have to do to setup a remote help server is run the help system (version 3.3
-or later) in <a href="ua_help_setup_infocenter.htm">infocenter</a> mode.
+or later) in <a href="ua_help_setup_infocenter.htm">information center</a> mode.
 </p>
 
 <p><b>How do I access a remote help server?</b></p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_xhtml.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_xhtml.htm
index e276bed..b26ee40 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_xhtml.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_content_xhtml.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -26,29 +26,9 @@ available when using HTML.
 <p><b>How to contribute XHTML</b></p>
 
 <p>
-XHTML help documents are contributed in much the same way as HTML, except there 
-is an important difference that must be there in order to support dynamic content.
-</p>
-
-<ul>
-   <li>
-      <p>
-         If using dyamic content, you <b>must</b> bind the XHTML dynamic content
-         producer to your doc plugin.
-      </p>
-      <p>
-         If you want to produce dynamic content using the XML annotations, you need
-         to tell the help system that it should process your documents. This is
-         done by binding the XHTML dynamic content producer to your plugin.
-      </p>
-      <pre>   <extension
-         point="org.eclipse.help.contentProducer">
-      <binding producerId="org.eclipse.help.dynamic"/>
-   </extension></pre>
-      <p>Since Eclipse 3.4 it is no longer necessary to bind the "org.eclipse.help.base.xhtml" search participant to your
+XHTML help documents are contributed in exactly the same way as HTML documents by referencing them from a table of contents (TOC) file.
+Since Eclipse 3.4 it is no longer necessary to bind the "org.eclipse.help.base.xhtml" search participant to your
          doc plugin.</p> 
-   </li>
-</ul>
 
 <p><a name="include_format"><b>XHTML include format</b></a></p>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm
index c05922d..c5611dc 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_infocenter_preferences.htm
@@ -5,14 +5,14 @@
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>Infocenter customization</title>
+<title>Information center customization</title>
 
 </head>
 <body>
 
-<h2>Infocenter customization</h2>
+<h2>Information center customization</h2>
 
-<p>All of the customizations which can apply to the Eclipse help system can also be applied to an Eclipse infocenter including
+<p>All of the customizations which can apply to the Eclipse help system can also be applied to an Eclipse information center including
 product specific branding, style sheets, banner and ordering of books. The easiest way to do this is to 
 create a plug-in which implements
 the org.eclipse.core.runtime.products extension point and place all the customization in that plugin.
@@ -51,10 +51,10 @@ the following.
 <h3>Installing the product plug-in</h3>
 <p>
     Export the product plug-in as a deployable plug-in. Copy the jar file for the exported plug-in 
-    to the "dropins" folder in the eclipse installation which will be used to start the infocenter.
-    Start the infocenter with an additional argument to specify the product. For example if the 
+    to the "dropins" folder in the eclipse installation which will be used to start the information center.
+    Start the information center with an additional argument to specify the product. For example if the 
     product plugin is called help.product and it's product id is "custom" add the argument 
-    "-product help.product.custom". Open the infocenter, the title will now show the customized product name.
+    "-product help.product.custom". Open the information center, the title will now show the customized product name.
 </p>
 <h3>Additional customization</h3>
 <p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup.htm
index 9960fe0..d7d2864 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup.htm
@@ -21,13 +21,13 @@ the help system to work in different environments and products.
 
 <p>
 The help system can run in three modes: workbench (normal),
-<a href="ua_help_setup_infocenter.htm">infocenter</a>, and
+<a href="ua_help_setup_infocenter.htm">information center</a>, and
 <a href="ua_help_setup_standalone.htm">standalone</a>. Workbench mode is used
 for serving help integrated with the product, usually via a Help menu. This mode
 also offers context help and the help view, which are not available in the two other
 modes. <strong>Standalone</strong> mode has the same goal as workbench mode, but is
 for products that are not eclipse-based (the help will be less integrated).
-<strong>Infocenter</strong> mode is used to serve help content to the masses
+<strong>Information center</strong> mode is used to serve help content to the masses
 over the Web. Consult the links above for details.
 </p>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_about.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_about.htm
index 9494ba3..4e28880 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_about.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_about.htm
@@ -1,15 +1,15 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Using about.html to debug infocenters</title>
+<title>Using about.html to debug information centers</title>
 <link rel="stylesheet" href="../book.css" charset="utf-8" type="text/css">
 </head>
 <body>
 
-<h1>Using about.html to debug infocenters</h1>
+<h1>Using about.html to debug information centers</h1>
 
 <p>
-When developing an infocenter sometimes not all of the books show as expected or 
+When developing an information center sometimes not all of the books show as expected or 
 customizations do not have the desired effect. The about.html page can be used to get information 
 about installed plug-ins and help system preferences. If the home page of the help system is 
 <pre>http://<hostname>:<port>/help/index.jsp</pre> the about page has a url of 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm
index a40bdaa..38663fb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_infocenter.htm
@@ -1,30 +1,30 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
 <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
-<title>Infocenter</title>
+<title>Information Center</title>
 </head>
 <body>
 
-<h2>Infocenter</h2>
+<h2>Information Center</h2>
 
 <p>
 You can allow your users to access the help system over the Internet or an 
-intranet by installing an infocenter and the documentation plug-ins on a
+intranet by installing an information center and the documentation plug-ins on a
 server. Clients view help by navigating to a URL, and the help system is shown
-in their Web browser. The infocenter help system can be used for both client
+in their Web browser. The information center help system can be used for both client
 and web applications, either of which can have their help accessed remotely.
 All features of help system except context help, active help, command support,
 and the help view are supported.
 </p>
 
 <p>
-The infocenter help system allows passing number of options that can be used to
-customize various aspects of the infocenter. The following options are
+The information center help system allows passing number of options that can be used to
+customize various aspects of the information center. The following options are
 supported:
 </p>
 
@@ -33,7 +33,7 @@ supported:
 	<strong>-eclipsehome</strong> <em>eclipseInstallPath</em> - specifies
 	the Eclipse installation directory. This directory is the parent of the
 	plugins directory and Eclipse executable. The option must be provided when
-	the current directory from which the infocenter is launched is not the same
+	the current directory from which the information center is launched is not the same
 	as the Eclipse installation	directory.
 	</li>
 
@@ -60,10 +60,10 @@ supported:
 
 	<li>
 	<strong>-locales</strong> <em>localeList</em> - specifies a list of locales
-	that the infocenter	will recognize and provide customized content for. If
-	the option is not specified, the infocenter will build navigation and index
+	that the information center	will recognize and provide customized content for. If
+	the option is not specified, the information center will build navigation and index
 	documents for each preferred locale of the browsers accessing the
-	infocenter. When the option is present, locales from browser requests will
+	information center. When the option is present, locales from browser requests will
 	be matched with locales in the list. If no browser preferred locale exists
 	in the list, but its language part does, it will be used instead.
 	Subsequently, additional browser locales in decreased order of preference
@@ -71,7 +71,7 @@ supported:
 	language part) match any locale on the list, the client will be served
 	content in the default locale - server locale or locale passed with -nl
 	option. For example, using options <code>-nl en -locales de en es fr it ja
-	ko pt_BR zh_CN zh_TW</code> will cause infocenter to operate in 10 locales.
+	ko pt_BR zh_CN zh_TW</code> will cause the information center to operate in 10 locales.
 	All	other locales will receive content from the <code>en</code> locale.
 	</li>
 
@@ -94,7 +94,7 @@ supported:
 	options accepted by the Eclipse executable</a> are allowed. They are
 	especially useful during debugging and for applying customization to
 	Eclipse. For example, passing options <code>-vmargs -Xmx256M</code>
-	increases memory available to the infocenter and will allow serving of a
+	increases memory available to the information center and will allow serving of a
 	larger book collection.
 	</li>
 </ul>
@@ -122,42 +122,42 @@ system.
 	</li>
 </ol>
 
-<h3>How to start or stop infocenter from command line</h3>
+<h3>How to start or stop information center from command line</h3>
 
 <p>
 The <code>org.eclipse.help.standalone.Infocenter</code> class has a <code>
-main()</code> method that you can use to launch the infocenter from the command
+main()</code> method that you can use to launch the information center from the command
 line. The command line argument syntax is:
 </p>
 
 <pre>-command start | shutdown | [-eclipsehome eclipseInstallPath] [-data instanceArea] [-host helpServerHost] [-locales localeList] [-port helpServerPort] [-dir rtl] [-noexec] [platform options] [-vmargs JavaVMarguments]</pre>
 
 <p>
-To start an infocenter on port 8081, issue a <code>start</code> command by running
+To start an information center on port 8081, issue a <code>start</code> command by running
 </p>
 
 <pre>java -classpath d:\myApp\eclipse\plugins\org.eclipse.help.base_[version].jar org.eclipse.help.standalone.Infocenter -command start -eclipsehome d:\myApp\eclipse -port 8081</pre>
 
 <p>
-To shut down the infocenter issue a <code>shutdown</code> command by running
+To shut down the information center issue a <code>shutdown</code> command by running
 </p>
 
 <pre>java -classpath d:\myApp\eclipse\plugins\org.eclipse.help.base_[version].jar org.eclipse.help.standalone.Infocenter -command shutdown -eclipsehome d:\myApp\eclipse</pre>
 
-<h3>Using the infocenter</h3>
+<h3>Using the information center</h3>
 
 <p>
-Start the infocenter using the instructions above. Point a web browser to the
+Start the information center using the instructions above. Point a web browser to the
 "/help/index.jsp" starting point for the Web application running on
-the port specified when starting the infocenter (e.g. 8081). For example, from
-the machine on which the infocenter is installed, this would be
+the port specified when starting the information center (e.g. 8081). For example, from
+the machine on which the information center is installed, this would be
 <code>http://localhost:8081/help/index.jsp</code>.
 </p>
 
-<h3>How to start and stop an infocenter from Java</h3>
+<h3>How to start and stop an information center from Java</h3>
 
 <p>
-When including an infocenter as part of another application, it may be more
+When including an information center as part of another application, it may be more
 convenient to start it and stop it using Java API calls instead of system
 commands. If this is the case, follow the steps:
 </p>
@@ -166,13 +166,13 @@ commands. If this is the case, follow the steps:
 	<li>
 	Make sure <code>d:\myApp\eclipse\plugins\org.eclipse.help.base_[version].jar
 	</code> is on your application's classpath. The class you use to start and
-	shut down the infocenter is <code>org.eclipse.help.standalone.Infocenter
+	shut down the information center is <code>org.eclipse.help.standalone.Infocenter
 	</code>.
 	</li>
 	
 	<li>
 	Create an array of <code>String</code> objects containing options that you
-	want to pass to the infocenter. Typically, the <code>eclipsehome</code> and
+	want to pass to the information center. Typically, the <code>eclipsehome</code> and
 	<code>port</code> options are needed.
 	<pre>String[] options = new String[] { "-eclipsehome", "d:\\myApp\\eclipse" , "-port", "8081" };</pre>
 	</li>
@@ -189,22 +189,22 @@ commands. If this is the case, follow the steps:
 	</li>
 	
 	<li>
-	To shut down the infocenter:
+	To shut down the information center:
 	<pre>infocenter.shutdown();</pre>
 	</li>
 </ol>
 
-<h3>Making infocenter available on the web</h3>
+<h3>Making information center available on the web</h3>
 
 <p>
-Eclipse contains a complete infocenter and does not require any other server
+Eclipse contains a complete information center and does not require any other server
 software to run. However, in an unsecure environment like the Internet, it is
 not recommended to allow direct access by the clients, but instead made
 available through an HTTP server or an application server. Most servers come
 with modules or servlets for delegating certain request to other Web resources.
-For example, one may configure a proxy module of the Apache HTTP Server to
+For example, you can configure a proxy module of the Apache HTTP Server to
 redirect requests made to <code>http://mycompany.com/myproduct/infocenter</code>
-to <code>http://internalserver:8081/help</code> that runs an infocenter. Adding
+to <code>http://internalserver:8081/help</code> that runs an information center. Adding
 the lines
 </p>
 
@@ -228,10 +228,10 @@ directive enabled in configuration file. Remove the directive or replace it with
 to have browsers display documents using correct character set.
 </p>
 
-<h3>Running multiple instances of an infocenter</h3>
+<h3>Running multiple instances of an information center</h3>
 
 <p>
-Multiple instances of an infocenter can be run on a machine from one
+Multiple instances of an information center can be run on a machine from one
 installation. Each started instance must use its own port and must be provided
 with a workspace, hence the <code>-port</code> and <code>-data</code> options
 must be specified. The instances can serve documentation from different sets of
@@ -241,10 +241,10 @@ plug-ins by providing a valid platform configuration with the
 
 <p>
 If <code>-configuration</code> is not used and the configuration directory is
-shared among multiple infocenter instances with overlapping sets of locales,
-you must be ensure that all search indexes are created by one infocenter
+shared among multiple information center instances with overlapping sets of locales,
+you must be ensure that all search indexes are created by one information center
 instance before another instance is started. Indexes are saved in the
-configuration directory, and write access is not synchronized across infocenter
+configuration directory, and write access is not synchronized across information center
 instances.
 </p>
 
@@ -252,16 +252,16 @@ instances.
 
 <p>
 <a href="ua_dynamic_filters.htm">Filtering</a> support is turned
-<strong>off</strong> when running in infocenter mode, causing all content,
+<strong>off</strong> when running in information center mode, causing all content,
 including filtered content, to be visible. If you intent to host your
-documentation in both workbench and infocenter modes, you should use filters in
+documentation in both workbench and information center modes, you should use filters in
 a way that makes sense even if filtering is turned off.
 </p>
 
 <h3>[Optional] Installing a minimal set of plug-ins</h3>
 
-<p>The infocenter does not require the entire Eclipse Platform package. It is
-possible to run an infocenter with the following plug-ins (located in the
+<p>The information center does not require the entire Eclipse Platform package. It is
+possible to run an information center with the following plug-ins (located in the
 <code>eclipse\plugins</code> directory):
 </p>
 
@@ -282,7 +282,7 @@ org.eclipse.update.configurator<br>
 <p>
 Some documentation plug-ins may have dependencies on other plug-ins, usually by
 specifying the required plug-ins in their bundle manifest. The dependent
-plug-ins need to be installed on the infocenter as well.
+plug-ins need to be installed on the information center as well.
 </p>
 
 <p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm
index 4541116..6961238 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_preferences.htm
@@ -52,6 +52,12 @@ defines them.
       "<code>helpData.xml</code>" or "PLUGINS_ROOT/org.eclipse.platform/helpData.xml". Consult the
       <a href="ua_help_setup_help_data.htm">schema documentation</a> for details.</td>
       <td><br></td>
+    </tr> 
+    <tr>
+      <td><code>filterInfocenter</code></td>
+      <td>Specifies whether enablement filters should apply to an information center. 
+      Enablement filters are always applied to help in workbench and standalone mode.</td>
+      <td>false</td>
     </tr>
     <tr>
       <td><code class="deprecated">baseTOCS</code> <span class="warning">(deprecated; use <code>HELP_DATA</code> instead)</span></td>
@@ -111,6 +117,20 @@ Example: <code>banner_height=60</code></td>
       </td>
     </tr>
     <tr>
+      <td><code>footer</code></td>
+      <td>Location of the footer page to display in the bottom frame<br>
+Example: <code>footer=/org.eclipse.help.webapp/advanced/banner.html</code></td>
+      <td><br>
+      </td>
+    </tr>
+    <tr>
+      <td><code>footer_height</code></td>
+      <td>Height of the footer frame<br>
+Example: <code>footer_height=60</code></td>
+      <td><br>
+      </td>
+    </tr>
+    <tr>
       <td><code>titleResource</code></td>
       <td>The name of a project resource of the form <plugin_name>/<resource_name> which contains
       the title of the help page.<br>
@@ -141,7 +161,7 @@ Specify your html page as <code>/pluginId/path/to/home.html</code>.</td>
       <td><code>bookmarksView</code></td>
       <td>Set to <code>true</code> or <code>false</code> to control the 
       visibility of the bookmarks view.<br>
-      Note: this option has no effect in the infocenter.</td>
+      Note: this option has no effect in the information center.</td>
       <td><code>true</code></td>
     </tr>
     <tr>
@@ -216,7 +236,7 @@ browsers displaying basic help UI.</td>
     </tr>
     <tr>
       <td><code>locales</code></td>
-      <td>List of locales that infocenter will recognize and
+      <td>List of locales that information center will recognize and
 provide a customized content for; if locales (or languages) accepted by
 client browser are not matched with any locales in this list, the
 browser will be served content for default locale - the server locale,
@@ -226,7 +246,7 @@ specified, the browser will be served contents for its preferred
 locale; note: not providing this option may result in a large
 memory and disk space requirements as navigations and indexes will be
 created for each distinct preferred locale among browsers accessing the
-infocenter.<br>
+information center.<br>
 Example: <code>locales=en ja zh_CN
 zh_TW</code></td>
       <td><br>
@@ -298,7 +318,7 @@ disabled)</td>
     <tr>
       <td><code>activeHelp</code></td>
       <td>Allows enabling and disabling execution of active help.
-The option has no effect in the infocenter setup, where active help is
+The option has no effect in the information center setup, where active help is
 disabled.<br>
 Accepted values:<br>
  <code>true</code> - default
@@ -311,7 +331,7 @@ framework disabled</td>
       <td><code>restrictTopicParameter</code></td>
       <td>Since 3.4. When true prevents topic parameters with an http or other 
       protocol from causing an external URL to open in the content frame of the 
-      infocenter. This improves security and the recommended setting is true.</td>
+      information center. This improves security and the recommended setting is true.</td>
       <td><code>true</code></td>
     </tr>
     <tr>
@@ -352,12 +372,12 @@ Accepted values:<br>
       <td><code>false</code><br></td>
     </tr>
     <tr>
-      <td colspan="3">The 5 remote help preferences below can each have multiple 
-      comma separated values if there is more than one infocenter contributing 
+      <td colspan="3">The 6 remote help preferences below can each have multiple 
+      comma separated values if there is more than one information center contributing 
       remote content. </td>
     </tr>
     <tr>
-      <td>remoteHostName</td>
+      <td>remoteHelpName</td>
       <td>Specifies a name for this remote host which will appear in the table 
       on the preference page</td>
       <td> </td>
@@ -371,10 +391,17 @@ Accepted values:<br>
     <tr>
       <td><code>remoteHelpPath</code><br>
       </td>
-      <td>Specifies the context root of the Infocenter application running on the
+      <td>Specifies the context root of the information center application running on the
       specified host.</td>
       <td> </td>
     </tr>
+     <tr>
+      <td><code>remoteHelpProtocol</code><br>
+      </td>
+      <td>Specifies the protocol of the information center application running on the
+      specified host.  If no protocol is specified, http will be used.  Supported protocols are http and https.</td>
+      <td> </td>
+    </tr>
     <tr>
       <td><code>remoteHelpPort</code><br>
       </td>
@@ -383,7 +410,7 @@ Accepted values:<br>
     </tr>   
     <tr>
       <td>remoteHelpICEnabled</td>
-      <td>Specifies that the infocenter will contribute remote content</td>
+      <td>Specifies that the information center will contribute remote content</td>
       <td> </td>
     </tr>   
     <tr>
@@ -418,6 +445,23 @@ Accepted values:<br>
       <td>A list of  css file(s) to include in every page 
       served by help system from a capability that is not enabled..</td>
       <td><code>/PRODUCT_PLUGIN/disabled_book.css</code></td>
+    </tr>
+    <tr>
+      <td colspan="3">These two parameters allow for the restriction of the number of print operation.</td>
+    </tr>
+    <tr>
+      <td><code>maxConnections</code></td>
+      <td>Maximum number of connections for concurrent print(print selected topic and all subtopics).<br>
+          Assign a value no greater than Integer.MAX_VALUE.<br>
+          Example: maxConnections=20</td>
+      <td >10</td>
+    </tr>
+    <tr>
+      <td><code>maxTopics</code></td>
+      <td>Maximum number of topics allowed for print in one request.<br>
+          Assign a value no greater than Integer.MAX_VALUE.<br>
+          Example: maxTopics=200</td>
+      <td >500</td>
     </tr>   
   </tbody>
 </table>
@@ -446,7 +490,7 @@ port is picked by the system.</p>
       <td><p class="deprecated">The host address or name to use
   for connecting to the server. The default is nothing, and eclipse will
   pick up an available local address.</p>
-        <p class="deprecated">Products using help in local mode (workbench or stand-alone, not infocenter),
+        <p class="deprecated">Products using help in local mode (workbench or stand-alone, not information center),
           can set this preference to "<code>127.0.0.1</code>" to
           ensure help server is not exposed to other users on the network.<br>
         </p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm
index 1e262c9..98a5559 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -27,7 +27,7 @@ line options instead of calling Java APIs.</p>
 	<LI><B>-eclipsehome</B> <I>eclipseInstallPath</I> - specifies Eclipse
 	installation directory. This directory is a parent to "plugins" directory
 	and eclipse executable.  The option must be provided, when current directory
-	from which infocenter is launched, is
+	from which the information center is launched, is
 	not the same as Eclipse installation directory.</LI>
 	<LI><B>-host</B> <I>helpServerHost</I> - specifies host name of the
 	interface that help server will use. It overrides host name specified
@@ -129,12 +129,13 @@ org.eclipse.help. To do this perform the following steps.</p>
   <li>Download an eclipse SDK build and upzip it into two different locations, 
   <location1> and <location1></li>
   <li>Remove the eclipse plugins directory from location1</li>
-  <li>Start Eclipse in location2 and import the org.eclipse.help feature into 
+  <li>Start Eclipse in location2 and import the org.eclipse.help and org.eclipse.rcp features into 
   your workspace using File/Import/Plug-in Development/Features</li>
-  <li>Export the help feature and it's plugins to location1/eclipse using 
-  File/Export/Plug-in Development/Deployable Features. The plugins directory 
-  which was just deleted will be replaced by a directory containing a smaller 
-  number of plugins.</li>
+  <li>Export the help and rcp features and their plugins to a newly created directory location3 using 
+  File/Export/Plug-in Development/Deployable Features. </li>
+  <li>Replace the plugins and features directories under the location1/eclipse directory 
+  with those from location3.</li>
+  <li>copy org.eclipse.equinox.launcher.* from location2/eclipse/plugins to location1/eclipse/plugins.</li>
   <li>From location1 start standalone help from the command line as described in 
   the previous section.</li>
 </ol>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_war.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_war.htm
index 7aa879b..ca93497 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_war.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/ua_help_war.htm
@@ -1,20 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
 <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
-<title>Deploying the infocenter as a Web Archive</title>
+<title>Deploying the information center as a Web Archive</title>
 </head>
 <body>
 
-<h2>Deploying the infocenter as a Web Archive</h2>
+<h2>Deploying the information center as a Web Archive</h2>
 
 <p>Using Eclipse 3.4 or later it is possible to configure the help plugins to be deployed 
 as a web archive (war file) which will act as a fully <br>
-functioning infocenter. The instructions below assume a Tomcat server has been 
+functioning information center. The instructions below assume a Tomcat server has been 
 installed, but with minor modifications <br>
 these steps should work for any full featured server. <br>
 <br>
@@ -30,20 +30,19 @@ there will be two directories titled "help" and <br>
 Project.</li>
   <li>Export org.eclipse.help.infocenter-feature as a deployable feature and set 
 the destination to be
-web-archive/help/WEB-INF/eclipse in the area where org.eclipse.help.webapp.<version>.jar 
+web-archive/help/WEB-INF in the area where org.eclipse.help.webapp.<version>.jar 
 was unzipped.</li>
-  <li>Add some documentation plugins to the webapps/help/WEB-INF/eclipse/plugins 
+  <li>Add some documentation plugins to the webapps/help/WEB-INF/plugins 
 directory.</li>
   <li>Download org.eclipse.equinox.http.servletbridge_<version>.jar and 
   org.eclipse.equinox.servletbridge_<version>.jar from the
   <a href="http://download.eclipse.org/eclipse/equinox/">equinox download site</a>. 
   Select a version of Equinox that matches the version of Eclipse you are 
   running to take you to the downloads page.</li>
-  <li>Extract servletbridge.jar from org.eclipse.equinox.servletbridge_<version>.jar.</li>
-  <li>Add the file servletbridge.jar to the help/WEB-INF/lib directory. You may 
+  <li>Add the file org.eclipse.equinox.servletbridge_<version>.jar. to the help/WEB-INF/lib directory. You may 
 need to create this directory.</li>
   <li>Add the file org.eclipse.equinox.http.servletbridge_<version>.jar to the 
-help/WEB-INFeclipse/plugins directory</li>
+help/WEB-INF/plugins directory</li>
   <li>At this stage you can create a war file from the help directory or you can 
 copy the directory and its contents to the webapps 
 folder of your Tomcat installation.</li>
@@ -53,7 +52,7 @@ folder of your Tomcat installation.</li>
 search will fail if the search term contains non ASCII characters.
  </li>
   <li>Start Tomcat and see the help system start up.</li>
-</ol>Notes: If you look in the config.ini in the help.war file under directory help/WEB_INF/eclipse/configuration 
+</ol>Notes: If you look in the config.ini in the help.war file under directory help/WEB_INF/configuration 
 you will notice the <br>
 line eclipse.product=org.eclipse.productname. If your product has help system 
 customizations in a product plugin you can <br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench.htm
index 6a2998e..1ace215 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench.htm
@@ -26,7 +26,7 @@ UI.</P>
 <h2>
 Quick tour of the workbench</h2>
 <P >
-The workbench is the cockpit for navigating all of the function provided by plug-ins.
+The workbench is the cockpit for navigating all of the functionality provided by plug-ins.
 By using the workbench, we can navigate resources and we can view and edit
 the content and properties of these resources. </P>
 <P >
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_activities.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_activities.htm
index 0949141..c17385b 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_activities.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_activities.htm
@@ -15,7 +15,7 @@
 </head>
 
 <body bgcolor="#ffffff">
-  <h3>Activities</h3>An <b>activity</b> is a logical grouping of function that
+  <h3>Activities</h3>An <b>activity</b> is a logical grouping of functionality that
   is centered around a certain kind of task. For example, developing Java
   software is an activity commonly performed by users of the platform, and the
   JDT defines many UI contributions (views, editors, perspectives, preferences,
@@ -50,7 +50,7 @@
   <p>Certain user
   operations serve as <b>trigger points</b> for enabling an activity. For
   example, creating a new Java project could trigger the enabling of the Java
-  development activity. In this way, users are exposed to new function as they
+  development activity. In this way, users are exposed to new functionality as they
   need it, and gradually learn about the activities that are available to them
   and how they affect the UI. When a user first starts the platform, it is
   desirable for as many activities as possible to be disabled, so that the
@@ -98,7 +98,7 @@
   as platform integration/configuration or product install. Individual plug-ins
   typically do not define new activities, unless the plug-in is a systems-level
   plug-in defined by a systems integrator. In a typical scenario, a systems
-  integrator determines how function is grouped into activities and which ones
+  integrator determines how functions are grouped into activities and which ones
   are enabled by default. Activities are associated with UI contributions using
   <b>activity pattern bindings</b>, patterns that are matched against the id of
   the UI contributions made by plug-ins. An example will help demonstrate these
@@ -267,7 +267,7 @@ Developer Guide" book.
   with all defined activities (to some extent also expression-based
   activities) and changing the enabled state (only for conventional
   activities). Most plug-ins need not be concerned with this API, but it is
-  useful when implementing function that allows the user to work with
+  useful when implementing functions that allow the user to work with
   activities, or for implementing the trigger points that enable a particular
   conventional activity. It is assumed that any plug-in that is
   manipulating activities through API is quite aware of the ways that
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_contexts.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_contexts.htm
index 2ead60d..c6106bd 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_contexts.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_contexts.htm
@@ -17,7 +17,7 @@
 Contexts</h3>
 <P >
 A <b>context</b> can be used to influence what commands are available to the user at any given moment.
-Contexts are much more dynamic than activities.  While an activity represents a broad set of function that
+Contexts are much more dynamic than activities.  While an activity represents a broad set of functionality that
 is available to the user most of the time, contexts describe a focus of the user at a specific point
 in time.  For example, the commands available to a user while editing text might be different than those
 available to a user while editing Java text or browsing packages in the package explorer.
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_decorators.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_decorators.htm
index 683ba66..50982b1 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_decorators.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_advext_decorators.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -26,7 +26,7 @@ Many of the standard workbench views participate in showing decorations. &n
 binary and source projects.</p>
 
 
-<p><img src="images/workbenchdecorators.png" alt="Package explorer view with PDE decorators" border="0"></p>
+<p><img src="images/workbenchdecorators.png" alt="Package Explorer view with PDE decorators" border="0"></p>
 
 
 <p>The <b>com.example.helloworld  </b>project is the only source project
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm
index 5b4ad1d..51fdcb2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_basicext_popupMenus.htm
@@ -113,7 +113,8 @@ action is contributed to an editor's or view's popup menu. </P>
 
 
 <P >
-The <b>targetID</b> specifies the view whose popup menu will be altered.  In this
+The <b>targetID</b> specifies the popup menu that will be altered.  If not specified
+in the call to <code>getSite().registerContextMenu(*)</code> the popup menu's ID will default to the view or editor ID.  In this
 case, we are adding an action to one of the readme tool views, the
 outliner.  The action itself is similar to others that we've seen.  We specify the <b>id</b>,
 <b>definitionId</b>, <b>label</b>, and <b>icon</b> of the action, and
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_cmd_menus.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_cmd_menus.htm
index f4e6c11..ff83ba8 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_cmd_menus.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_cmd_menus.htm
@@ -367,11 +367,13 @@ one or more controls (using the same mechanism as contributing controls into the
 <p>
 Controls contributed to the trim must be a subclass of 
 <b><a href="../reference/api/org/eclipse/ui/menus/WorkbenchWindowControlContribution.html">WorkbenchWindowControlContribution</a></b>.
-This class will manage the life-cycle of the contribution, disposing and re-creating the contribution as necessary (such as when the user moves the control to another trim area). Note that the <code>getCurSide()</code> and <code>getOrientation()</code> methods
-allow the implementation of <code>createControl(parent)</code> to adjust the created control to it's current locaton in the trim.
+This class will manage the life-cycle of the contribution, disposing and re-creating the contribution as necessary 
+(such as when the user moves the control to another trim area). Note that the <code>getCurSide()</code> and <code>getOrientation()</code> methods
+allow the implementation of <code>createControl(parent)</code> to adjust the created control to its current location in the trim.
 </p>
 <p>
-For this example we've contributed a fairly naive trim widget that simply displays a string and an indication of which side the trim iscurrently docked on.
+For this example we've contributed a simple trim widget that simply displays a string 
+and an indication of which side the trim is currently docked on.
 </p>
 <p>
 <img src="images/readmetrim.png" alt="" border="0">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_perspectives.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_perspectives.htm
index 4d84e19..6d98131 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_perspectives.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_perspectives.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -56,11 +56,11 @@ editor. Views are added to the layout relative to (top, bottom, left, right) ano
 items that are not initially shown.</P>
 <P >
 To organize related views and reduce clutter, you can use <a href="../reference/api/org/eclipse/ui/IFolderLayout.html"><b>IFolderLayout</b></a> to group views into tabbed folders. For example, the Resource perspective
-places the resource navigator inside a folder at the top left corner of the
+places the Project Explorer inside a folder at the top left corner of the
 workbench.  Placeholders are commonly used with folder layouts.
-The Resource perspective defines a placeholder for the bookmarks view in the
-same folder as the resource navigator. If the user shows the bookmarks view, it will appear in the same folder with the
-navigator, with a tab for each view.</P>
+The Resource perspective defines a placeholder for the Bookmarks view in the
+same folder as the Project Explorer. If the user shows the Bookmarks view, it will appear in the same folder with the
+Project Explorer, with a tab for each view.</P>
 <P >
  <b><a href="../reference/api/org/eclipse/ui/IPageLayout.html"> IPageLayout</a></b>
 also allows you to define the available actions and shortcuts inside a
@@ -98,7 +98,7 @@ view.  This can be accomplished using the workbench <b>Navigate > Show
 In</b> menu.  This command allows the user to jump to one of any number of
 related views in the context of the currently edited (or selected) object. 
 For example, a user editing a file may want to jump over to that file in the
-resource navigator. </p>
+Project Explorer.</p>
 
 
 
@@ -167,11 +167,9 @@ indicated.</p>
 
 
 <p>How is the list of available targets determined?  You can specify the
-available targets for your perspective in its <b><a href="../reference/api/org/eclipse/ui/IPageLayout.html"> IPageLayout</a></b>. 
-Recall that a "show in" navigation may open a view that is not already
-present in the perspective.  Using <b><a href="../reference/api/org/eclipse/ui/IPageLayout.html">IPageLayout</a>.addShowInPart</b>,
-you can specify a valid "show in" target by id.  In this way, the
-valid targets can be established without unnecessarily creating any views. </p>
+available targets for your perspective by using the <b>showInPart</b> element of the <b><a href="../reference/extension-points/org_eclipse_ui_perspectiveExtensions.html">Perspective Extensions</a></b>
+extension point.
+Recall that a "Show In" navigation may open a view that is not already present in the perspective.</p>
 
 
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_scalability.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_scalability.htm
index 71d2218..03efc27 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_scalability.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/workbench_scalability.htm
@@ -28,11 +28,11 @@ The activity and context mechanisms address the problem of too much clutter in t
 <ul>
 <li><a href="../reference/extension-points/org_eclipse_ui_activities.html">
 <b>Activities</b></a>
-allow platform integrators to define large-grained groupings of function that are only
+allow platform integrators to define large-grained groupings of functionality that are only
 shown when a particular user activity is enabled. Users can explicitly (or implicitly through trigger points)
 enable or disable activities.</li>
 <li><a href="../reference/extension-points/org_eclipse_ui_contexts.html">
-<b>Contexts</b></a> are used to dynamically enable function while the user is performing a specific task.
+<b>Contexts</b></a> are used to dynamically enable functionality while the user is performing a specific task.
 They influence what commands are available to the user at any given moment.</li>
 </ul>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/wrkAdv_services.htm b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/wrkAdv_services.htm
index ee0e72d..4fd85e3 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/guide/wrkAdv_services.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/guide/wrkAdv_services.htm
@@ -90,9 +90,11 @@ activation and definitions.</td>
 <tr>
 <td><a href="../reference/api/org/eclipse/ui/model/IContributionService.html">IContributionService</a>
 </td>
-<td>Instances of this service are capable of providing standard mechanisms that
-clients may use to order, display, and generally work with contributions to
-the Workbench.</td>
+<td>The IContributionService is a service provided at the workbench level that
+provides mechanisms that clients may use to work with user interface
+contributions. Currently, this is limited to providing sorters for particular
+contribution types but this may be expanded on in the future. An instance of
+this service is present for the entire lifetime of the workbench.</td>
 <td>Globally</td>
 </tr>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/notices.html b/eclipse/plugins/org.eclipse.platform.doc.isv/notices.html
index b2201a7..f2293eb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/notices.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/notices.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -13,7 +13,7 @@
 <h3>
 <a NAME="Notices"></a>Notices</h3>
 <p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2009.
+The material in this guide is Copyright (c) Eclipse contributors 2000, 2010.
 </p>
 <p>
 <a href="about.html">Terms and conditions regarding the use of this guide.</a>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/platformOptions.txt b/eclipse/plugins/org.eclipse.platform.doc.isv/platformOptions.txt
index 582634d..84e5f77 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/platformOptions.txt
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/platformOptions.txt
@@ -1,137 +1,145 @@
 -quiet
 -encoding "iso-8859-1"
 -charset "iso-8859-1"
-../org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
 -sourcepath "
+;../org.eclipse.ant.core/src
+;../org.eclipse.compare.core/src
+;../org.eclipse.compare/compare
+;../org.eclipse.core.commands/src
+;../org.eclipse.core.contenttype/src
+;../org.eclipse.core.databinding.beans/src
+;../org.eclipse.core.databinding.observable/src
+;../org.eclipse.core.databinding.property/src
+;../org.eclipse.core.databinding/src
+;../org.eclipse.core.expressions/src
+;../org.eclipse.core.filebuffers/src
+;../org.eclipse.core.filesystem/src
+;../org.eclipse.core.jobs/src
+;../org.eclipse.core.net/src
+;../org.eclipse.core.resources/src
+;../org.eclipse.core.runtime.compatibility/src-model
+;../org.eclipse.core.runtime.compatibility/src-runtime
+;../org.eclipse.core.runtime/src
+;../org.eclipse.core.variables/src
+;../org.eclipse.debug.core/core
+;../org.eclipse.debug.ui/ui
 ;../org.eclipse.equinox.app/src
+;../org.eclipse.equinox.ds/src
 ;../org.eclipse.equinox.common/src
 ;../org.eclipse.equinox.http.jetty_2.0.0/src
 ;../org.eclipse.equinox.http.registry/src
 ;../org.eclipse.equinox.http.servlet/src
-;../org.eclipse.equinox.jsp.jasper/src
 ;../org.eclipse.equinox.jsp.jasper.registry/src
+;../org.eclipse.equinox.jsp.jasper/src
 ;../org.eclipse.equinox.preferences/src
+;../org.eclipse.equinox.p2.core/src
+;../org.eclipse.equinox.p2.director/src
+;../org.eclipse.equinox.p2.engine/src
+;../org.eclipse.equinox.p2.metadata/src
+;../org.eclipse.equinox.p2.metadata.repository/src
+;../org.eclipse.equinox.p2.operations/src
+;../org.eclipse.equinox.p2.ql/src
+;../org.eclipse.equinox.p2.repository/src
+;../org.eclipse.equinox.p2.touchpoint.eclipse/src
+;../org.eclipse.equinox.p2.ui/src
 ;../org.eclipse.equinox.registry/src
 ;../org.eclipse.equinox.security/src
-;../org.eclipse.core.jobs/src
-;../org.eclipse.core.contenttype/src
-;../org.eclipse.core.runtime.compatibility/src-runtime
-;../org.eclipse.core.runtime.compatibility/src-model
-;../org.eclipse.core.commands/src
-;../org.eclipse.platform/src
-;../org.eclipse.ant.core/src
-;../org.eclipse.compare/compare
-;../org.eclipse.compare.core/src
-;../org.eclipse.core.databinding/src
-;../org.eclipse.core.databinding.beans/src
-;../org.eclipse.core.databinding.observable/src
-;../org.eclipse.core.databinding.property/src
-;../org.eclipse.jface.databinding/src
-;../org.eclipse.debug.core/core
-;../org.eclipse.debug.ui/ui
-;../org.eclipse.help/src
 ;../org.eclipse.help.base/src
 ;../org.eclipse.help.base/src_demo
 ;../org.eclipse.help.ui/src
 ;../org.eclipse.help.webapp/src
-;../org.eclipse.core.runtime/src
-;../org.eclipse.core.resources/src
-;../org.eclipse.pde/src
-;../org.eclipse.jface/src
-;../org.eclipse.jface.text/src
+;../org.eclipse.help/src
+;../org.eclipse.jface.databinding/src
 ;../org.eclipse.jface.text/projection
-;../org.eclipse.text/src
+;../org.eclipse.jface.text/src
+;../org.eclipse.jface/src
+;../org.eclipse.jsch.core/src
+;../org.eclipse.jsch.ui/src
+;../org.eclipse.ltk.core.refactoring/src
+;../org.eclipse.ltk.ui.refactoring/src
+;../org.eclipse.osgi/core/adaptor
+;../org.eclipse.osgi/core/framework
+;../org.eclipse.osgi/eclipseAdaptor/src
+;../org.eclipse.osgi/security/src
+;../org.eclipse.osgi/supplement/src
+;../org.eclipse.pde/src
+;../org.eclipse.platform/src
+;../org.eclipse.search/new search
+;../org.eclipse.search/search
+;../org.eclipse.swt/Eclipse SWT Accessibility/common/
+;../org.eclipse.swt/Eclipse SWT Accessibility/win32/
+;../org.eclipse.swt/Eclipse SWT AWT/common/
+;../org.eclipse.swt/Eclipse SWT AWT/win32/
+;../org.eclipse.swt/Eclipse SWT Browser/common/
+;../org.eclipse.swt/Eclipse SWT Browser/win32/
+;../org.eclipse.swt/Eclipse SWT Custom Widgets/common/
+;../org.eclipse.swt/Eclipse SWT Drag and Drop/common/
+;../org.eclipse.swt/Eclipse SWT Drag and Drop/win32/
+;../org.eclipse.swt/Eclipse SWT OLE Win32/win32/
+;../org.eclipse.swt/Eclipse SWT OpenGL/common
+;../org.eclipse.swt/Eclipse SWT OpenGL/emulated
+;../org.eclipse.swt/Eclipse SWT OpenGL/glx
+;../org.eclipse.swt/Eclipse SWT OpenGL/win32
+;../org.eclipse.swt/Eclipse SWT PI/common/
+;../org.eclipse.swt/Eclipse SWT PI/common_j2se/
+;../org.eclipse.swt/Eclipse SWT PI/win32/
+;../org.eclipse.swt/Eclipse SWT Printing/common/
+;../org.eclipse.swt/Eclipse SWT Printing/win32/
+;../org.eclipse.swt/Eclipse SWT Program/common/
+;../org.eclipse.swt/Eclipse SWT Program/win32/
+;../org.eclipse.swt/Eclipse SWT/common/
+;../org.eclipse.swt/Eclipse SWT/common_j2se/
+;../org.eclipse.swt/Eclipse SWT/win32/
+;../org.eclipse.team.core/src
+;../org.eclipse.team.ui/src
 ;../org.eclipse.text/projection
-;../org.eclipse.ui/src
+;../org.eclipse.text/src
 ;../org.eclipse.ui.cheatsheets/src
-;../org.eclipse.ui.intro/src
-;../org.eclipse.ui.intro.universal/src
 ;../org.eclipse.ui.console/src
 ;../org.eclipse.ui.editors/src
 ;../org.eclipse.ui.forms/src
-;../org.eclipse.ui.ide/src
 ;../org.eclipse.ui.ide/extensions
-;../org.eclipse.ui.views/src
+;../org.eclipse.ui.ide/src
+;../org.eclipse.ui.intro.universal/src
+;../org.eclipse.ui.intro/src
+;../org.eclipse.ui.navigator.resources/src
+;../org.eclipse.ui.navigator/src
 ;../org.eclipse.ui.views.properties.tabbed/src
+;../org.eclipse.ui.views/src
+;../org.eclipse.ui.workbench.texteditor/src
 ;../org.eclipse.ui.workbench/Eclipse UI
 ;../org.eclipse.ui.workbench/Eclipse UI Editor Support
-;../org.eclipse.ui.navigator/src
-;../org.eclipse.ui.navigator.resources/src
-;../org.eclipse.ui.workbench.texteditor/src
-;../org.eclipse.swt/Eclipse SWT/win32/
-;../org.eclipse.swt/Eclipse SWT/common/
-;../org.eclipse.swt/Eclipse SWT/common_j2se/
-;../org.eclipse.swt/Eclipse SWT AWT/win32/
-;../org.eclipse.swt/Eclipse SWT AWT/common/
-;../org.eclipse.swt/Eclipse SWT Custom Widgets/common/
-;../org.eclipse.swt/Eclipse SWT Drag and Drop/win32/
-;../org.eclipse.swt/Eclipse SWT Drag and Drop/common/
-;../org.eclipse.swt/Eclipse SWT OLE Win32/win32/
-;../org.eclipse.swt/Eclipse SWT Printing/win32/
-;../org.eclipse.swt/Eclipse SWT Printing/common/
-;../org.eclipse.swt/Eclipse SWT Program/win32/
-;../org.eclipse.swt/Eclipse SWT Program/common/
-;../org.eclipse.swt/Eclipse SWT PI/win32/
-;../org.eclipse.swt/Eclipse SWT PI/common/
-;../org.eclipse.swt/Eclipse SWT PI/common_j2se/
-;../org.eclipse.swt/Eclipse SWT Accessibility/win32/
-;../org.eclipse.swt/Eclipse SWT Accessibility/common/
-;../org.eclipse.swt/Eclipse SWT Browser/win32/
-;../org.eclipse.swt/Eclipse SWT Browser/common/
-;../org.eclipse.team.core/src
-;../org.eclipse.team.ui/src
-;../org.eclipse.core.net/src
-;../org.eclipse.jsch.core/src
-;../org.eclipse.jsch.ui/src
+;../org.eclipse.ui/src
 ;../org.eclipse.update.configurator/src
-;../org.eclipse.update.core/src
 ;../org.eclipse.update.core/jarprocessor
-;../org.eclipse.search/search
-;../org.eclipse.search/new search
-;../org.eclipse.core.filebuffers/src
-;../org.eclipse.core.variables/src
-;../org.eclipse.core.expressions/src
-;../org.eclipse.ltk.core.refactoring/src
-;../org.eclipse.ltk.ui.refactoring/src
-;../org.eclipse.osgi/core/adaptor
-;../org.eclipse.osgi/supplement/src
-;../org.eclipse.osgi/eclipseAdaptor/src
-;../org.eclipse.osgi/security/src
-;../org.eclipse.core.filesystem/src
-;../org.eclipse.swt/Eclipse SWT OpenGL/common
-;../org.eclipse.swt/Eclipse SWT OpenGL/emulated
-;../org.eclipse.swt/Eclipse SWT OpenGL/glx
-;../org.eclipse.swt/Eclipse SWT OpenGL/win32"
+;../org.eclipse.update.core/src"
 -d reference/api
 -classpath @rt@
-;../com.ibm.icu_4.0.1.v20090822.jar
+;../com.ibm.icu_4.2.1.v20100412.jar
+;../com.jcraft.jsch_0.1.41.v200903070017.jar
+;../javax.servlet_2.5.0.v200910301333.jar
 ;../org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar
-;../org.eclipse.osgi/@dot
-;../org.eclipse.osgi.services/@dot
-;../javax.servlet_2.5.0.v200806031605.jar
-;../org.mortbay.jetty.server_6.1.15.v200905151201.jar
-;../org.mortbay.jetty.util_6.1.15.v200905182336.jar
-;../org.apache.lucene_1.9.1.v20080530-1600.jar
-;../org.apache.lucene.analysis_1.9.1.v20080530-1600.jar
-;../org.eclipse.help/@dot
-;../org.eclipse.help.appserver/@dot
-;../org.eclipse.help.base/@dot
-;../org.eclipse.help.webapp/@dot
-;../org.eclipse.update.ui/@dot
-;../org.eclipse.core.filesystem/@dot
-;../org.eclipse.core.jobs/@dot
+;../org.apache.lucene.analysis_1.9.1.v20100518-1140.jar
+;../org.apache.lucene_1.9.1.v20100518-1140.jar
 ;../org.eclipse.core.runtime.compatibility.auth/@dot
-;../org.eclipse.equinox.registry/@dot
-;../org.eclipse.equinox.security/@dot
-;../org.eclipse.equinox.app/@dot
-;../org.eclipse.equinox.common/@dot
-;../org.eclipse.equinox.preferences/@dot
+;../org.eclipse.ecf.provider.filetransfer_3.1.0.v20100906-1425.jar
+;../org.eclipse.ecf.filetransfer_4.0.0.v20100906-1425.jar
+;../org.eclipse.ecf_3.1.0.v20100906-1425.jar
+;../org.eclipse.equinox.frameworkadmin/@dot
+;../org.eclipse.equinox.p2.director/@dot
+;../org.eclipse.equinox.p2.garbagecollector/@dot
+;../org.eclipse.equinox.p2.metadata.repository/@dot
+;../org.eclipse.equinox.p2.publisher/@dot
+;../org.eclipse.equinox.simpleconfigurator/@dot
 ;../org.eclipse.equinox.supplement/@dot
-;../org.eclipse.core.contenttype/@dot
-;../org.eclipse.ui.forms/@dot
-;../org.eclipse.ui.navigator.resources/@dot
-;../org.eclipse.ui.intro/@dot
-;../com.jcraft.jsch_0.1.41.v200903070017.jar
+;../org.eclipse.help.appserver/@dot
+;../org.eclipse.osgi.services/@dot
+;../org.eclipse.osgi/@dot
+;../org.eclipse.update.ui/@dot
+;../org.mortbay.jetty.server_6.1.23.v201004211559.jar
+;../org.mortbay.jetty.util_6.1.23.v201004211559.jar
+;../org.sat4j.core_2.2.0.v20100429.jar
+;../org.sat4j.pb_2.2.0.v20100429.jar
 -breakiterator
 -use
 -splitIndex
@@ -141,19 +149,23 @@
 -tag 'noreference:a:Restriction:'
 -tag 'noinstantiate:a:Restriction:'
 -tag 'nooverride:a:Restriction:'
+-tag 'Immutable:t'
 -windowtitle "Eclipse Platform API Specification"
 -doctitle "Eclipse Platform API Specification"
--header "<b>Eclipse Platform</b><br>Release 3.5"
--bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using Eclipse APIs</a>.</p><p>Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.</p></font>'
--link http://java.sun.com/j2se/1.4.2/docs/api
+-header "<b>Eclipse Platform</b><br>Release 3.6"
+-bottom '<font size="-1"><p><a href="{@docRoot}/../misc/api-usage-rules.html">Guidelines for using Eclipse APIs</a>.</p><p>Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.</p></font>'
+-link http://download.oracle.com/javase/1.5.0/docs/api
 -link http://www.osgi.org/javadoc/r4v42
 
+../org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+
 org.eclipse.ant.core
 org.eclipse.compare
 org.eclipse.compare.contentmergeviewer
 org.eclipse.compare.patch
 org.eclipse.compare.rangedifferencer
 org.eclipse.compare.structuremergeviewer
+
 org.eclipse.core.commands
 org.eclipse.core.commands.common
 org.eclipse.core.commands.contexts
@@ -181,9 +193,11 @@ org.eclipse.core.filesystem
 org.eclipse.core.filesystem.provider
 org.eclipse.core.net.proxy
 org.eclipse.core.resources
+org.eclipse.core.resources.filtermatchers
+org.eclipse.core.resources.mapping
 org.eclipse.core.resources.refresh
 org.eclipse.core.resources.team
-org.eclipse.core.resources.mapping
+org.eclipse.core.resources.variableresolvers
 org.eclipse.core.runtime
 org.eclipse.core.runtime.content
 org.eclipse.core.runtime.dynamichelpers
@@ -192,6 +206,7 @@ org.eclipse.core.runtime.model
 org.eclipse.core.runtime.preferences
 org.eclipse.core.runtime.spi
 org.eclipse.core.variables
+
 org.eclipse.debug.core
 org.eclipse.debug.core.commands
 org.eclipse.debug.core.model
@@ -203,17 +218,41 @@ org.eclipse.debug.ui.console
 org.eclipse.debug.ui.contexts
 org.eclipse.debug.ui.memory
 org.eclipse.debug.ui.sourcelookup
+
 org.eclipse.equinox.app
 org.eclipse.equinox.http.jetty
 org.eclipse.equinox.http.registry
 org.eclipse.equinox.http.servlet
 org.eclipse.equinox.jsp.jasper
 org.eclipse.equinox.jsp.jasper.registry
+
+org.eclipse.equinox.p2.core
+org.eclipse.equinox.p2.core.spi 
+org.eclipse.equinox.p2.engine 
+org.eclipse.equinox.p2.engine.query 
+org.eclipse.equinox.p2.engine.spi 
+org.eclipse.equinox.p2.metadata 
+org.eclipse.equinox.p2.metadata.expression 
+org.eclipse.equinox.p2.metadata.index
+org.eclipse.equinox.p2.operations 
+org.eclipse.equinox.p2.planner
+org.eclipse.equinox.p2.ql 
+org.eclipse.equinox.p2.query 
+org.eclipse.equinox.p2.repository 
+org.eclipse.equinox.p2.repository.artifact 
+org.eclipse.equinox.p2.repository.artifact.spi 
+org.eclipse.equinox.p2.repository.metadata 
+org.eclipse.equinox.p2.repository.metadata.spi 
+org.eclipse.equinox.p2.repository.spi 
+org.eclipse.equinox.p2.touchpoint.eclipse.query 
+org.eclipse.equinox.p2.ui 
+
 org.eclipse.equinox.security.auth
 org.eclipse.equinox.security.auth.credentials
 org.eclipse.equinox.security.auth.module
 org.eclipse.equinox.security.storage
 org.eclipse.equinox.security.storage.provider
+
 org.eclipse.help
 org.eclipse.help.browser
 org.eclipse.help.search
@@ -222,6 +261,7 @@ org.eclipse.help.standalone
 org.eclipse.help.ui
 org.eclipse.help.ui.browser
 org.eclipse.help.webapp
+
 org.eclipse.jface.action
 org.eclipse.jface.bindings
 org.eclipse.jface.bindings.keys
@@ -278,9 +318,19 @@ org.eclipse.ltk.ui.refactoring.history
 org.eclipse.ltk.ui.refactoring.model
 org.eclipse.ltk.ui.refactoring.resource
 
+org.eclipse.osgi.framework.console
+org.eclipse.osgi.framework.eventmgr
+org.eclipse.osgi.framework.log
+org.eclipse.osgi.launch
 org.eclipse.osgi.service.datalocation
+org.eclipse.osgi.service.debug
+org.eclipse.osgi.service.environment
+org.eclipse.osgi.service.localization
+org.eclipse.osgi.service.resolver
+org.eclipse.osgi.service.runnable
 org.eclipse.osgi.service.security
 org.eclipse.osgi.signedcontent
+org.eclipse.osgi.storagemanager
 org.eclipse.osgi.util
 
 org.eclipse.search.core.text
@@ -289,8 +339,8 @@ org.eclipse.search.ui.actions
 org.eclipse.search.ui.text
 
 org.eclipse.swt
-org.eclipse.swt.awt
 org.eclipse.swt.accessibility
+org.eclipse.swt.awt
 org.eclipse.swt.browser
 org.eclipse.swt.custom
 org.eclipse.swt.dnd
@@ -369,13 +419,13 @@ org.eclipse.ui.splash
 org.eclipse.ui.statushandlers
 org.eclipse.ui.swt
 org.eclipse.ui.testing
-org.eclipse.ui.themes
 org.eclipse.ui.texteditor
 org.eclipse.ui.texteditor.link
 org.eclipse.ui.texteditor.quickdiff
 org.eclipse.ui.texteditor.rulers
 org.eclipse.ui.texteditor.spelling
 org.eclipse.ui.texteditor.templates
+org.eclipse.ui.themes
 org.eclipse.ui.views
 org.eclipse.ui.views.bookmarkexplorer
 org.eclipse.ui.views.contentoutline
@@ -389,10 +439,12 @@ org.eclipse.ui.wizards
 org.eclipse.ui.wizards.datatransfer
 org.eclipse.ui.wizards.newresource
 
-org.eclipse.update.configurator
 org.eclipse.update.configuration
+org.eclipse.update.configurator
 org.eclipse.update.core
 org.eclipse.update.core.model
 org.eclipse.update.operations
 org.eclipse.update.search
 org.eclipse.update.standalone
+
+org.apache.felix.scr
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/plugin.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/plugin.xml
index 52ed2af..3d451c5 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/plugin.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/plugin.xml
@@ -71,6 +71,14 @@
            <plugin id="org.eclipse.equinox.jsp.jasper"/>
            <plugin id="org.eclipse.equinox.jsp.jasper.registry"/>           
            <plugin id="org.eclipse.equinox.preferences"/>
+           <plugin id="org.eclipse.equinox.p2.core"/>
+           <plugin id="org.eclipse.equinox.p2.engine"/>
+           <plugin id="org.eclipse.equinox.p2.metadata"/>
+           <plugin id="org.eclipse.equinox.p2.operations"/>
+           <plugin id="org.eclipse.equinox.p2.ql"/>
+           <plugin id="org.eclipse.equinox.p2.repository"/>
+           <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
+           <plugin id="org.eclipse.equinox.p2.ui"/>
            <plugin id="org.eclipse.equinox.registry"/>
            <plugin id="org.eclipse.help"/>
            <plugin id="org.eclipse.help.base"/>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/faq.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/faq.html
deleted file mode 100644
index 58f05db..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/faq.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
-<title>Eclipse 3.3 Plug-in Migration FAQ</title>
-</head>
-
-<body>
-
-<h1>Eclipse 3.3 Plug-in Migration FAQ</h1>
-<ol>
-	<li><a href="#signing">Impact of JAR signing</a></li>
-</ol>
-<h2><a name="signing">Impact of JAR signing</a></h2>
-<p>
-In Eclipse 3.3, plug-ins in the Eclipse platform are signed with a cryptographic
-signature supplied by the Eclipse Foundation. Signing of plug-ins can have an impact
-in three areas:</p>
-  <ul>
-    <li>Code that uses non-Eclipse class loaders.  Eclipse class loaders have a flag
-    that controls load-time verification of signature, and it is turned off by default.  Loaders in
-    the JDK such as URLClassLoader do not have this option, and will always verify
-    any JAR file that contains signatures.  If this performance impact is not acceptable,
-    the only solution is to avoid signing of JARs that are loaded by other class loaders.
-    A common example is JARs that are intended to be run with Ant. </li>
-    <li> Use of the constructor <tt>java.util.jar.JarFile(File)</tt> (i.e., without verify = false). 
-    JarFile will perform verification of signatures unless explicitly told not to. This will
-    have a performance impact when the JAR is signed. If you don't need signature verification,
-    be sure to use the <tt>JarFile</tt> API that does not perform verification.</li>
-    <li>Use of <tt>java.util.jar.Manifest</tt>.  Since the manifest file of a signed JAR can
-    be quite large, anyone reading and parsing entire manifest.mf files will see a
-    performance hit. The best solution in this case is to only read the manifest
-    main attribute rather than parsing the entire file.</li>
-  </ul>
-
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/incompatibilities.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/incompatibilities.html
deleted file mode 100644
index ff596ba..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/incompatibilities.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
-<title>Incompatibilities between Eclipse 3.2 and 3.3</title>
-</head>
-<body>
-<h1>Incompatibilities between Eclipse 3.2 and 3.3</h1>
-
-<p> Eclipse changed in incompatible ways between 3.2 and 3.3 in ways that affect 
-  plug-ins. The following entries describe the areas that changed and provide 
-  instructions for migrating 3.2 plug-ins to 3.3. Note that you only need to look 
-  here if you are experiencing problems running your 3.2 plug-in on 3.3.</p>
-<p></p>
-<ol>
-  <li><a href="#launchConfigWorkingCopies">Nested Launch Configuration Working Copies</a></li>
-  <li><a href="#FileEditorInput">Incompatible source change to getStorage() on FileEditorInput</a></li>
-  <li><a href="#BootDelegation">Boot delegation changes</a></li>
-  <li><a href="#LazyActivation">Lazy activation changes</a></li>
-  <li><a href="#getEntryPaths">Clarification to Bundle.getEntryPaths</a></li>
-  <li><a href="#HistoryView">History View didn't follow spec of IHistoryPageSource</a></li>
-  <li><a href="#Proxy">Proxy settings are now managed by the platform</a></li>
-  <li><a href="#startup.jar">Launching Eclipse with startup.jar</a></li>
-  <li><a href="#DeviceResourceDescriptor">Incompatible source change to DeviceResourceDescriptor#createResource</a></li>
-  <li><a href="#ResourceManager">Incompatible source change to ResourceManager resource creation methods</a></li>
-   <li><a href="#jface-backcalls">JFace viewers and recursive back-calls</a></li>
-   <li><a href="#IIDEActionConstants">IIDEActionConstants.FIND_EXT corrected to conform to specification</a></li>
-   <li><a href="#IDEEncoding">IDEEncoding#setResourceEncoding deleted</a></li>
-   <li><a href="#ErrorDialog">ErrorDialog client area has a potential extra column</a></li>
-   <li><a href="#IIndexEntry">Binary incompatibility in IIndexEntry</a></li>
-   <li><a href="#FormColors">Constant changed in FormColors</a></li>
-   <li><a href="#ActionHandler">UI ActionHandler depends on IAction#ENABLED</a></li>
-</ol>
-<hr>
-
-<!-- ############################################## -->
-<h2>1. <a name="launchConfigWorkingCopies">Nested Launch Configuration Working Copies</a></h2>
-<p><strong>What is affected:</strong> Launch configuration working copies support 
-  nesting in 3.3. Clients that programmatically create and save launch configurations 
-  may be affected by the change in behavior of the <code>ILaunchConfigurationWorkingCopy.doSave() 
-  </code> method. </p>
-<p><strong>Description:</strong> When a working copy (B) is created from a working 
-  copy (A) which was created from a launch configuration (X), the newly created 
-  working copy (B) is initialized with the attributes from the first working copy 
-  (A). In 3.3, whenever a working copy is saved, it is written back to the configuration 
-  from which it was created. In this example working copy B will saves changes 
-  back to working copy A, and A will save changes back to the original launch 
-  configuration. A nested working copy has a parent working copy that can be retrieved 
-  by calling <code>getParent()</code> (newly added in 3.3). In 3.2, working copies 
-  were not nested and saving a working copy always resulted in the changes being 
-  saved back to the original launch configuration.</p>
-<p><strong>Action required:</strong> APIs are binary compatible but clients should 
-  examine calls to <code>ILaunchConfiguration.getWorkingCopy()</code> and <code>ILaunchConfigurationWorkingCopy.doSave()</code> 
-  to determine if nested working copies might be created. Note that saving a nested 
-  working copy will not save changes back to the original launch configuration.</p>
-<!-- ############################################## -->
-<h2>2. <a name="FileEditorInput">Incompatible source change to getStorage() on FileEditorInput</a></h2>
-<p><strong>What is affected:</strong> Clients that call getStorage() on FileEditorInput.</p>
-<p><strong>Description:</strong> The signature of getStorage() was changed to
-no longer throw a checked exception. This may cause compile errors in source code
-previously compiled against Eclipse 3.2 that is recompiled against 3.3. This change
-does not break binary compatibility - existing clients built against Eclipse 3.2 or
-earlier will continue to function normally.</p>
-<p><strong>Action required:</strong> Clients should recompile against Eclipse 3.3,
-and remove any catch block that is now unnecessary due to the removed exception.</p>
-<!-- ############################################## -->
-<h2>3. <a name="BootDelegation">Boot delegation changes</a></h2>
-<p><strong>What is affected:</strong> The boot delegation order has changed in 3.3.  Bundles that depend on delegating 
-to the boot (parent) class loader first may be affected by this change.</p>
-<p><strong>Description:</strong> In Eclipse 3.3 the default class loader delegation model has been changed to the following order:</p>
-<ol>
-<li>Imported packages (i.e. packages specified in the Import-Package manifest header).</li>
-<li>Required bundles (i.e. bundles specified in the Require-Bundle manifest header).</li>
-<li>Local bundle and fragments.</li>
-<li>Boot (parent) class loader as a last resort.  This is only done if no source was found in the previous steps. </li>
-</ol>
-<p>In 3.2 the boot (parent) class loader is always delegated to first.  This provides no isolation from the 
-classes provided by the VM.  It also affects performance because the boot class loader must be delegated to for every 
-load even though it is known that the class or resource is located in a bundle.  Because of the boot delegation changes 
-in 3.3, a bundle can now provide their own version of a package which is also available from the VM boot classpath.
-See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162231"> bug 162231</a>.</p>
-
-<p><strong>Action required:</strong> Bundles that export packages which may be available by the boot (parent) class loader 
-need to evaluate whether the classes/resources they export should be added to the content from the boot class loader or replace it.
-If the exporting bundle should replace the content of the boot class loader then no action is required.  If the exporting bundle should 
-add to the content of the boot class loader then the exporting bundle should add "system.bundle" as a required bundle
-(i.e. Require-Bundle: system.bundle).  To revert back to the behavior in 3.2 the configuration property 
-"org.osgi.framework.bootdelegation=*" can be added to the config.ini file. </p>
-<!-- ############################################## -->
-<h2>4. <a name="LazyActivation">Lazy activation changes</a></h2>
-<p><strong>What is affected:</strong> Bundles that use the lazy activation policy (i.e. "Eclipse-LazyStart: true") 
-will enter the Bundle.STARTING state as soon as they are eligible for lazy activation.  Clients that monitor the Bundle.STARTING 
-state may be affected by this change.
-</p>
-<p><strong>Description:</strong> Eclipse 3.3 implements the OSGi R4.1 specification.  The OSGi R4.1 specification  
-standardizes the lazy activation policy implemented in Eclipse.  Part of the standardization work changed the behavior of how 
-bundles states are transitioned when a lazy activation policy is used.  When a bundle becomes available for lazy activation the bundle 
-enters the Bundle.STATING state and a BundleEvent.LAZY_ACTIVATION event is fired.  This occurs before any class load 
-request is made to the bundle.  The bundle will remain in the Bundle.STARTING state until the first class load is made and 
-the bundle is activated.  When the bundle is activated a BundleEvent.STARTING event is fired and the BundleActivator.start method
-is called.  See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=135885">bug 135885</a>.
-</p>
-<p>
-Bundles with a lazy activation policy could remain in the Bundle.STARTING state for a long time waiting for the first class load 
-(trigger load) to occur.  Entering the Bundle.STARTING state does not mean the BundleActivator.start method has been called.  
-The BundleActivator.start method is only called right after the BundleEvent.STARTING event is fired.  Bundles that monitor calls to 
-BundleActivators must use a SynchronousBundleListener to listen for the BundleEvent.STARTING and BundleEvent.STOPPING 
-events.
-</p>
-<p><strong>Action required:</strong> A SynchronousBundleListener must be used to monitor BundleEvent.STARTING and 
-BundleEvent.STOPPING events for clients that are monitoring the calls to BundleActivators.</p>
-<!-- ############################################## -->
-<h2>5. <a name="getEntryPaths">Clarification to Bundle.getEntryPaths</a></h2>
-<p><strong>What is affected:</strong> Clients of the Bundle.getEntryPaths method.
-</p>
-<p><strong>Description:</strong> The OSGi R4.1 specification has made a clarification on the behavior of the 
-org.osgi.framework.Bundle#getEntryPaths method.  The javadoc for the method Bundle#getEntryPaths did not 
-make it clear whether the String paths returned had a leading "/" character or not.  The following clarification has 
-been made:</p> 
-<p>
-The returned paths are all relative to the root of this bundle and must not begin with "/". 
-</p>
-Eclipse 3.2 had a bug for directory (non-jarred) bundles where a leading "/" character was included in the result if 
-the client used a path argument that contained a leading "/".  For jarred bundles Eclipse 3.2 always ensures 
-the returned paths do not have a leading "/" character.  This is inconsistent behavior.  Directory bundles have  
-been fixed to be consistent with jarred bundles.  See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=174101"> bug 174101</a>.
-
-<p><strong>Action required:</strong> Some clients may have a dependency on the old behavior for directory bundles.  If a client 
-uses the method Bundle#getEntryPaths then ensure that it can handle returned paths that do not begin with a "/" character.
-This dependency is a bug in the client code because it would have failed for jarred bundles.
-</p>
-<!-- ############################################## -->
-<h2>6. <a name="HistoryView">History View didn't follow spec of IHistoryPageSource</a></h2>
-<p><strong>What is affected:</strong> The History view may no longer show the history for certain elements.
-</p>
-<p><strong>Description:</strong> In 3.2, the History view did not follow the specification of IHistoryPageSource in 
-the sense that, in some situations, it did not call canShowHistoryFor(Object) before requesting a history page. 
-In 3.3, this was corrected which has lead to a situation where client code may have worked in 3.2 even though their implementation of
-IHistoryPageSource did not follow the specification in the javadoc. 
-</p>
-<p><strong>Action required:</strong> Implementors of IHistoryPageSource need to ensure that their implementation follows
-the specification defined in the javadoc of the interface.
-</p>
-<!-- ############################################## -->
-<h2>7. <a name="Proxy">Proxy settings are now managed by the platform</a></h2>
-<p><strong>What is affected:</strong> plug-ins in Eclipse that provided their own support for proxy specification 
-(e.g HTTP, SSL or SOCKS).</p>
-<p><strong>Description:</strong> A preference page and API was added in 3.3 to support the specification 
-of HTTP, SSL and SOCKS proxies. Any tooling that provided their own support for this may conflict with the new
-settings being managed by the Platform. The fix should be for tooling to remove their support for specifying
-proxies and adopt the support provided by the Platform.
-</p>
-<!-- ############################################## -->
-<h2>8. <a name="startup.jar">Launching Eclipse with startup.jar</a></h2>
-<p><strong>What is affected:</strong> Eclipse can no longer be started
-with <tt>java -jar startup.jar</tt>.<br>
-</p>
-<p><strong>Description:</strong> In 3.2, Eclipse was started using
-startup.jar from the root of the Eclipse install. In 3.3, this jar is a
-bundle in the plugins directory named org.eclipse.equinox.launcher. </p>
-<p><strong>Action required:</strong> Change the command to <tt>java
--jar
-plugins/org.eclipse.equinox.launcher_1.0.0.<version>.jar</tt> or
-use
-the eclipse launcher executable.
-</p>
-<!-- ############################################## -->
-<h2>9. <a name="DeviceResourceDescriptor">Incompatible source change to DeviceResourceDescriptor#createResource</a></h2>
-<p><strong>What is affected:</strong> Clients that call createResource(Device) on 
-DeviceResourceDescriptor.</p>
-<p><strong>Description:</strong> The DeviceResourceException thrown by JFace has been
-changed to a runtime exception.  As part of this change, the method signature of 
-createResource(Device) was changed to no longer throw the exception. This may cause 
-compile errors in source code
-previously compiled against Eclipse 3.2 that is recompiled against 3.3. This change
-does not break binary compatibility - existing clients built against Eclipse 3.2 or
-earlier will continue to function normally.</p>
-<p><strong>Action required:</strong> Clients should recompile against Eclipse 3.3,
-and remove any catch block that is now unnecessary due to the removed exception.</p>
-<!-- ############################################## -->
-<h2>10. <a name="ResourceManager">Incompatible source change to ResourceManager resource creation methods</a></h2>
-<p><strong>What is affected:</strong> Clients that call resource creation methods on 
-ResourceManager.</p>
-<p><strong>Description:</strong> The DeviceResourceException thrown by JFace has been
-changed to a runtime exception.  As part of this change, the following method signatures
-were changed to no longer throw the exception. 
-</p>
-<ul>
-<li>ResourceManager#create(DeviceResourceDescriptor)</li>
-<li>ResourceManager#createColor(ColorDescriptor)</li>
-<li>ResourceManager#createColor(RGB)</li>
-<li>ResourceManager#createFont(FontDescriptor)</li>
-<li>ResourceManager#createImage(ImageDescriptor)</li>
-</ul>
-<p>
-These changes may cause compile errors in source code
-previously compiled against Eclipse 3.2 that is recompiled against 3.3. This change
-does not break binary compatibility - existing clients built against Eclipse 3.2 or
-earlier will continue to function normally.</p>
-<p><strong>Action required:</strong> Clients should recompile against Eclipse 3.3,
-and remove any catch block that is now unnecessary due to the removed exception.</p>
-<!-- ############################################## -->
-
-<h2>11. <a name="jface-backcalls">JFace viewers and recursive back-calls</a></h2>
-<p><strong>What is affected:</strong> Clients of <tt>TableViewer</tt> and <tt>TreeViewer</tt>, implementers of <tt>IStructuredContentProvider</tt> or <tt>IBaseLabelProvider</tt></p>
-<p><strong>Description:</strong> <tt>StructuredViewer</tt> and its subclasses were never designed to handle
-recursive back-calls to methods such as <tt>setInput()</tt>, <tt>refresh()</tt>, <tt>add()</tt>,
-<tt>remove()</tt>, <tt>update()</tt> etc. In the past, calls to one of these update
-methods that happened while the viewer was already in the process of
-processing another update, lead to unpredictable behavior or even
-runtime errors later on that were hard to debug. Starting with 3.3,
-subclasses of ColumnViewer detect recursive back-calls, log an error and
-ignore the nested update request. This helps uncover programming errors
-such as spinning the event loop from a content provider or label
-provider, but potentially changes the behavior in cases where clients
-used recursive back-calls but didn't see immediate problems in the past in
-their particular usage scenarios. See <a
-	href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=154571">bug
-154571</a> for details.</p>
-<p><strong>Action required:</strong> No action required if you don't see
-entries about ignored calls in the .log file. If you do see log entries,
-the provided stack trace should have sufficient information to find the
-problematic back-call. Depending on the situation, you might need to post
-an asyncExec runnable to avoid the back-call.</p>
-<!-- ############################################## -->
-<h2>12. <a name="IIDEActionConstants"> IIDEActionConstants.FIND_EXT corrected to conform to specification</a></h2>
-<p><strong>What is affected:</strong> Clients of <tt>IIDEActionConstants</tt> who use the values directly instead of via the constant.</p>
-<p><strong>Description:</strong> Edit menu: name of group for extra Find-like actions (value <code>"find.ext"</code>).</p>
-<p>The value of this constant has changed in 3.3 to match the specification; before 3.3, its value was incorrect (<code>"cut.ext"</code>).
-See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=155856">bug 155856</a> for details.</p>
-<p><strong>Action required:</strong> No action required if you refer to the constant rather than its value.</p>
-<!-- ############################################## -->
-<h2>13. <a name="IDEEncoding">IDEEncoding#setResourceEncoding deleted</a></h2>
-<p><strong>What is affected:</strong> Clients of <tt>IDEEncoding</tt>.</p>
-<p><strong>Description:</strong> <code>IDEEncoding#setResourceEncoding</code> was deprecated in 3.2 (the same release it was 
-added in) in favor of setting the ResourcesPlugin.PREF_ENCODING value
-in the Resources plug-ins preference store. It was not deleted in the 3.2 release despite never having been valid API. 
-It was deleted in the 3.3 release. </p>
-<p><strong>Action required:</strong> Update references to <code>IDEEncoding#setEncoding</code> to calls to 
-<code>ResourcesPlugin#getPlugin()#getPluginPreferences()#setValue(ResourcesPlugin.PREF_ENCODING,value)</code>.</p>
-<!-- ############################################## -->
-<h2>14. <a name="ErrorDialog">ErrorDialog client area has a potential extra column</a></h2>
-<p><strong>What is affected:</strong> Subclasses of <tt>ErrorDialog</tt>.</p>
-<p><strong>Description:</strong> <code>ErrorDialogs</code> will have an extra column in their client area
-if there is an <code>ErrorSupportProvider</code> registered in an install. ErrorDialog subclasses that assume
-there are 2 columns should call <code>IconAndMessageDialog#getColumnCount</code> instead.</p>
-<p><strong>Action required:</strong> Update hard coded column counts to call to  <code>IconAndMessageDialog#getColumnCount</code> .</p>
-<!-- ############################################## -->
-<h2>15. <a name="IIndexEntry">Binary incompatibility in IIndexEntry</a></h2>
-<p><strong>What is affected:</strong> Clients of IIndexEntry who rely on binary compatibility.</p>
-<p><strong>Description:</strong> The return type of function getTopics() has changed from IHelpResource[] to the subclass ITopic[].
-See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191224">bug 191224</a> for details.</p>
-<p><strong>Action required:</strong> Source which uses this interface must be recompiled.</p>
-<!-- ############################################## -->
-<h2>16. <a name="FormColors">Constant changed in FormColors</a></h2>
-<p><strong>What is affected:</strong> Clients of FormColors who rely on binary compatibility.</p>
-<p><strong>Description:</strong> The value of the constant org.eclipse.ui.forms.FormColors.TB_GBG changed in Eclipse 3.3.
-See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=191233">bug 191233</a> for details.</p>
-<p><strong>Action required:</strong> Update hard coded column counts to call to  <code>IconAndMessageDialog#getColumnCount</code> .</p>
-<!-- ############################################## -->
-<h2>17. <a name="ActionHandler">UI ActionHandler depends on IAction#ENABLED</a></h2>
-<p><strong>What is affected:</strong> Clients using <code>IKeyBindingService#registerAction(IAction)</code> or using <code>org.eclipse.ui.commands.ActionHandler</code> 
-to submit <code>IActions</code> to the handler service.</p>
-<p><strong>Description:</strong> Commands now add listeners to their handlers.  The <code>ActionHandler</code> will now depend on
-the IAction firing the property change for <b>ENABLED</b> to update its enabled state.  One side effect is that
-<code>IAction#isEnabled()</code> will not be called frequently.</p>
-<p><strong>Action required:</strong>  Clients must ensure their <code>IActions</code> do not require frequent callings of <code>isEnabled()</code> to manage their enabled state,
-and must fire the <b>ENABLED</b> property at the appropriate times.</p>
-<!-- ############################################## -->
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/recommended.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/recommended.html
deleted file mode 100644
index d4c65d8..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.3/recommended.html
+++ /dev/null
@@ -1,231 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
-<title>Adopting 3.3 mechanisms and APIs</title>
-</head>
-
-<body>
-
-<h2>Adopting 3.3 mechanisms and APIs</h2>
-<p>This section describes changes that are required if you are trying to change 
-  your 3.2 plug-in to adopt the 3.3 mechanisms and APIs.</p>
-  
-<ol>
-  <li><a href="#AppModel">Application model changes</a></li>
-  <li><a href="#ContextLaunch">Launch selection versus launch last</a></li>
-  <li><a href="#HyperlinkDetector">Replacing a hard-coded <code>IHyperlinkDetector</code> 
-    with an extension</a></li>
-  <li><a href="#FileBufferPerformance">Improve performance when working with file 
-    buffers</a></li>
-  <li><a href="#LaunchDelegate">Launch delegate names and descriptions</a></li>
-  <li><a href="#Compare">Support for file buffers added to Compare</a></li>
-  <li><a href="#Presentation">New Minimize/Maximize behavior</a></li>
-  <li><a href="#MenuContribution">Menu contributions and commands</a></li>
-</ol>
-<hr>
-
-<!-- ############################################## -->
-<h2><a name="AppModel">1. Application model changes</a></h2>
-<p>The Eclipse application container has been moved from <b>org.eclipse.core.runtime</b> 
-into the new bundle <b>org.eclipse.equinox.app</b>. The Eclipse application container included in the 
-org.eclipse.equinox.app bundle implements the Application Admin Service specification from the OSGi R4 specification.  
-</p>
-<p>
-The following extension points have also been moved into the org.eclipse.equinox.app bundle. Note that
-the fully qualified extension point ids are unchanged:</p>
-<ul>
- <li>org.eclipse.core.runtime.applications</li>
- <li>org.eclipse.core.runtime.products</li>
-</ul>
-The interface <b>org.eclipse.core.runtime.IPlatformRunnable</b> has been deprecated and the 
-org.eclipse.equinox.app.IApplication interface should be used instead.  IPlatformRunnable is supported for 
-backwards compatibility, and clients are encouraged to move to the new IApplication API
-instead.
-<p>
-As a result of the code move, custom configurations and scripts that explicitly 
-reference <b>org.eclipse.core.runtime</b> might need to add the <b>org.eclipse.equinox.app</b> bundle.
-</p>
-<p>See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=109893">bug 109893</a> 
-  for more details. </p> 
-<!-- ############################################## -->
-<p> </p>
-<h2><a name="ContextLaunch">2. Launch selection versus launch last</a></h2>
-<p>By default, running and debugging applications has been simplified to run or 
-  debug the selected file or active editor. When the selected resource (or active 
-  editor) is not executable, users can opt to launch the associated project or 
-  re-launch the previous launch. These settings are managed on the <strong>Run/Debug 
-  > Launching</strong> preference page. Users can also revert to the 3.2 behavior 
-  of always launching the previous application.</p>
-<p>Pressing the <strong>Run</strong> or <strong>Debug</strong> toolbar button 
-  will launch the selected resource (as will the <strong>Run</strong> or <strong>Debug</strong> 
-  action in the top level Run menu). When no launch configuration exists for a 
-  file and there is only one way to launch it, the file will simply be launched 
-  in the mode selected. When there is more than one way to launch a file, the 
-  user will be prompted to select how to run or debug the application. For example, 
-  when running a JUnit test it can be run as a Java application or JUnit test. 
-  A launch configuration will be created and an entry will be added to the launch 
-  history for the application. When the same resource is launched again, it will 
-  use the most recent configuration in the launch history associated with that 
-  resource.</p>
-<p>The underlying infrastructure for selection based launching relies on the launch 
-  shortcuts applicable to a resource (or editor) and the resource mappings associated 
-  with existing launch configurations. As well, API (a new extension element) 
-  has been added to the <code>launchShortcuts</code> extension to associate a 
-  launch shortcut with one or more types of launch configurations. For example, 
-  this tells the platform that the "Java Application" launch shortcut 
-  is associated with "Java Application" launch configurations.</p>
-<p>The contextual launch support uses the following approach to determine how 
-  a selection or active editor should be launched.</p>
-<ol>
-  <li>An <code>IResource</code> adapter is retrieved from the selection or active 
-    editor (which can be <code>null</code>).</li>
-  <li>A set of applicable launch configuration types are computed from the set 
-    of launch shortcuts applicable to the selection/editor (using the new launch 
-    configuration type elements defined by launch shortcuts).</li>
-  <li>A set of applicable launch configurations is computed based on the launch 
-    configuration types applicable to the selection/editor and the existing launch 
-    configurations in the workspace.</li>
-  <li>The set of applicable launch configurations is reduced to those that have 
-    a resource mapping equal to or contained by the retrieved resource adapter</li>
-  <li>The set of applicable launch configurations is compared to the launch history 
-    and the most recently launched configuration in the set is selected for launching.</li>
-  <li>When there are applicable launch configurations, but none are in the recent 
-    launch history, the user is prompted to select one of the applicable configurations 
-    to launch.</li>
-  <li>When there are applicable launch shortcuts and no applicable launch configurations, 
-    the user is prompted on how they want to launch the selection (i.e. which 
-    shortcut they want to use).</li>
-</ol>
-<p>When there are no applicable launch configurations or launch shortcuts, the 
-  platform either attempts to launch the associated project or launches last, 
-  based on user preference settings. When the user has chosen to launch the associated 
-  project, the same steps as above are followed, except the resource used is the 
-  project.</p>
-<p>For selection based launching to work well, plug-in providers should ensure 
-  the following.</p>
-<ol>
-  <li>Resource mappings for launch configurations should be scoped to the appropriate 
-    resource. For example, to support projects with multiple Java executables, 
-    Java application launch configurations are associated with the the .java file 
-    containing the main class.</li>
-  <li>Launch shortcut extensions should be updated with <code>configurationType</code> 
-    elements so the platform can infer which launch configuration types to consider 
-    when resolving launch configurations applicable to a selection/editor. As 
-    well, launch shortcuts should be updated with the new <code>description</code> 
-    attribute. This attribute is used when presenting the user with a list of 
-    shortcuts to choose from.</li>
-  <li>Launch configuration migration delegates should be updated to create appropriate 
-    resource mappings for existing launch configurations. For example, if launch 
-    your launch configuration resource mappings in 3.2 were always associated 
-    with a project, but now you want to associated them with specific files in 
-    a project to better support context launching, your migration delegate should 
-    be updated to update resource mappings.</li>
-</ol>
-<!-- ############################################## -->
-<p> </p>
-<h2><a name="HyperlinkDetector">3. Replacing a hard-coded <code>IHyperlinkDetector</code> with an extension</a></h2>
-Before 3.3 it was not possible to contribute hyperlink detectors to existing source viewers and textual editors. Only
-their implementors could add them directly through code by providing their hyper link detectors via
-<code>SourceViewerConfiguration.getHyperlinkDetectors(ISourceViewer)</code>.
-<p>
-As of 3.3, clients can define hyperlink detector targets for their viewers and editors and they can contribute
-their own hyperlink detectors to such targets via the following extension points:</p>
-<ul>
-	<li><a href="../../reference/extension-points/org_eclipse_ui_workbench_texteditor_hyperlinkDetectorTargets.html">org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets</a></li>
-	<li><a href="../../reference/extension-points/org_eclipse_ui_workbench_texteditor_hyperlinkDetectors.html">org.eclipse.ui.workbench.texteditor.hyperlinkDetectors</a></li>
-</ul>
-<!-- ############################################## -->
-<h2><a name="FileBufferPerformance">4. Improve performance when working with file buffers</a></h2>
-<p>In earlier versions file buffer manager API methods used to take an <code>IPath</code> and it was
-up to the file buffer manager to detect whether that path pointed to a workspace or an external location.
-Those API methods have been deprecated in 3.3 in order to improve performance as in most cases clients already
-know whether their path is a workspace path or an external path. New methods with same names have been added
-that take one of the following location kind arguments:</p>
-<ul>
-  <li><a href="../../reference/api/org/eclipse/core/filebuffers/LocationKind.html#IFILE">IFILE</a></li>
-  <li><a href="../../reference/api/org/eclipse/core/filebuffers/LocationKind.html#LOCATION">LOCATION</a></li>
-  <li><a href="../../reference/api/org/eclipse/core/filebuffers/LocationKind.html#NORMALIZE">NORMALIZE</a></li>
-</ul>
-<p>Clients using the deprecated methods are encouraged to adopt the new API in order
-to take advantage of the performance improvement.
-</p>
-<!-- ############################################## -->
-<p> </p>
-<h2><a name="LaunchDelegate">5. Launch delegate names and descriptions</a></h2>
-<p>New attributes have been added to the <code>launchConfigurationTypes</code> 
-  and <code>launchDelegates</code> extension points to provide names and descriptions 
-  for launch delegates. Since 3.3, the debug platform allows for more than one 
-  launcher to be contributed for the same kind of launch configuration type and 
-  launch mode. When more than one launcher is available the user must choose a 
-  preferred launcher and is presented with names and descriptions of available 
-  launchers. Clients contributing launch delegates with either of these extension 
-  points are encouraged to provide meaningful names and descriptions.</p>
-<p>Clients contributing to the <code>org.eclipse.debug.core.launchConfigruationTypes</code> 
-  extension point should define the following new attributes:</p>
-<ul>
-  <li><code>delegateName</code></li>
-  <li><code>delegateDescription</code></li>
-</ul>
-<p>Clients contributing to the <code>org.eclipse.debug.core.launchDelegates </code>extension 
-  point should define the following new attributes:</p>
-<ul>
-  <li><code>name</code></li>
-  <li><code>delegateDescription</code></li>
-</ul>
-
-<h2><a name="Compare">6. Support for file buffers added to Compare</a></h2>
-
-<p>Compare editors can now be configured to use the same file buffers that are used by regular editors.
-This means that changes made in a compare editor will immediately be reflected in any other
-editor on the same file buffer or vice versa. Both the compare client and the provider of the compare
-viewer must make changes to enable this feature.</p>
-
-<ul>
-<li>In order for compare viewer providers to enable this feature, they must subclass TextMergeViewer and
-override both the getDocumentPartitioning and getDocumentPartitioning methods if they provide custom syntax highlighting.
-File buffer support in the basic TextMergeViewer is enabled. It is only subclasses that provide syntax highlighting that
-need to makes changes to adopt the feature. Also, providers of structure creators should subclass StructureCreator and
-override the getDocumentPartition and getDocumentPartitioning in order for their structure merge viewer to use the file buffer
-as well. This is described in more detail in the 
-<a href="../../guide/compare_contentviewer.htm">Implementing a Content Viewer</a> section.</li>
-<li>Client can enable the use of file buffers by using the SaveableCompareEditorInput. The static method
-<code>createFileElement</code> can be used to create a typed element that wraps a file in order to enable the 
-file buffer support for the file. This is described in more detail in the 
-<a href="../../guide/compare_beyond.htm">Advanced compare techniques</a> section.</li>
-</ul>
-
-<h2><a name="Presentation">7. New Minimize/Maximize behavior</a></h2>
-
-<p>All RCP applications will, by default, get the new min/max behavior regardless of the presentation that is defined as long as it is capable of supporting the necessary operations (i.e. supports trim...). If the pre-3.3 min/max behavior is desired then the application should explicitly set the preference to false by adding the following line to their preference customization file (as defined by the product extension):
-</p>
-<p>
-org.eclipse.ui/ENABLE_MIN_MAX=false
-</p>
-
-
-<h2><a name="MenuContribution">8.  Menu contributions and commands</a></h2>
-
-<p>
-Support is now available to place commands in menus and toolbars through the
-<a href="../../reference/extension-points/org_eclipse_ui_menus.html">org.eclipse.ui.menus</a>
-extension point.
-</p>
-<p>
-<b>org.eclipse.ui.menus</b> focuses on the appearance (label, tooltip, icon),
-location, and visibility of the command in the menu or toolbar.  Command
-enabled state is still controlled via the <b>org.eclipse.ui.handlers</b> extension
-point or the <code>IHandlerService</code>.  
-</p>
-<p>
-In 3.2 placing a command in a toolbar or menu involved using one of the
-<code>IActionDelegate</code> extensions and coding the run method to use the
-<code>IHandlerService</code> to execute the command.
-</p>
-
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/faq.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/faq.html
new file mode 100644
index 0000000..bbdef3c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/faq.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Eclipse 3.6 Plug-in Migration FAQ</title>
+</head>
+
+<body>
+
+<h1>Eclipse 3.6 Plug-in Migration FAQ</h1>
+
+<ol>
+	<li><a href="#ds">Why aren't provisioning related services available in my application? </a></li>
+	<li><a href="#p2api">How do I migrate from the provisional p2 API in 3.5 to the new p2 API in 3.6?</a></li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+<h2><a name="ds">Why aren't provisioning related services available in my application?</a></h2>
+<p>
+	OSGi services provided by p2 and Update Manager are now registered using the
+	OSGi declarative services mechanism. If you are writing your own application
+	that makes use of these services, you need to make sure the declarative
+	services bundle (<tt>org.eclipse.equinox.ds</tt>), is being started in your application.
+</p>
+<!-- ############################################## -->
+<h2><a name="p2api">How do I migrate from the provisional p2 API in 3.5 to the new p2 API in 3.6?</a></h2>
+<p>
+	In the 3.4 and 3.5 releases, p2 provided a provisional API for accessing its
+	functionality programmatically. This provisional API has largely been replaced in
+	the 3.6 release with a fully supported mature p2 API. While there is generally 
+	no migration support for clients who used provisional APIs, you can find some
+	help with migration on the <a href="http://wiki.eclipse.org/Equinox/p2/Helios_Migration_Guide">p2 Helios Migration Guide</a>.
+</p>
+<!-- ############################################## -->
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/incompatibilities.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/incompatibilities.html
new file mode 100644
index 0000000..d195fd4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/incompatibilities.html
@@ -0,0 +1,131 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Incompatibilities between Eclipse 3.5 and 3.6</title>
+</head>
+<body>
+<h1>Incompatibilities between Eclipse 3.5 and 3.6</h1>
+
+<p>
+  Eclipse changed in incompatible ways between 3.5 and 3.6 in ways that affect 
+  plug-ins. The following entries describe the areas that changed and provide 
+  instructions for migrating 3.5 plug-ins to 3.6. Note that you only need to look 
+  here if you are experiencing problems compiling or running your 3.5 plug-in on 3.6.
+</p>
+
+<ol>
+ <li><a href="#dialogSettings">DialogSettings.save(Writer writer) can throw an
+ IOException</a></li>
+ <li><a href="#minTextCellWidth">The TextCellEditor no longer sets a default width of 50</a></li>
+ <li><a href="#FileSystemFetchTree">The method FileSystem.fetchFileTree now throws CoreException</a></li>
+ <li><a href="#exemplarySetup">The bundle org.eclipse.equinox.p2.exemplarysetup has been removed</a></li>
+ <li><a href="#objectContribution">Object Contributions will not execute from a keybinding</a></li>
+ <li><a href="#spinner">Spinner now allows setting equal minimum and maximum values</a></li>
+ <li><a href="#safari">Browser on OS X now returns "webkit" as its type</a></li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+<h2>1. <a name="dialogSettings">DialogSettings.save(Writer writer) can throw an IOException</a></h2>
+<p><strong>What is affected:</strong> Clients that call DialogSettings.save(Writer writer) in code that is compiled against release 3.5</p>
+<p><strong>Description:</strong> In release 3.4 and earlier, DialogSettings.save(Writer writer) was specified
+to throw an <code>IOException</code>.  In release 3.5, the method signature was changed to not throw the
+exception.  In release 3.6, the method is specified to throw the exception (restoring it to the release 3.4 
+and earlier specification).  Clients that do not catch the IOException when calling DialogSettings.save(Writer writer)
+should update the code to catch the exception.  Note that this source incompatibility only applies to clients who
+directly use <code>DialogSettings</code>, the default implementation class.  The interface type, <code>IDialogSettings</code>,
+has remained consistent in throwing the IOException in the method signature, so clients using the interface type are not
+affected.</p>
+
+<!-- ############################################## -->
+
+<h2>2. <a name="minTextCellWidth">The TextCellEditor no longer sets a default width of 50</a></h2>
+<p><strong>What is affected:</strong> Clients relying on the default value for the minimum width of a
+ TextCellEditor.</p>
+<p><strong>Description:</strong> The javadoc for <tt>TextCellEditor#getLayoutData()</tt> states explicitly that
+there is no minimum width set but it was inheriting a default width of 50. Clients who were relying on
+the previous value of 50 should override the <tt>minimumWidth</tt> field of the cell's <tt>LayoutData</tt> explicitly.
+</p>
+
+<!-- ############################################## -->
+
+<h2>3. <a name="FileSystemFetchTree">The method FileSystem.fetchFileTree now throws CoreException</a></h2>
+<p><strong>What is affected:</strong> Subclasses of <tt>org.eclipse.core.filesystem.provider.FileSystem</tt>
+that invoked super in their implementation of <tt>fetchFileTree(IFileStore, IProgressMonitor)</tt></p>
+<p><strong>Description:</strong> This method previously did not declare a throws clause, even
+though the base interface <tt>IFileSystem</tt> method did. This prevented clients from ever
+throwing <tt>CoreException</tt> in their implementations of this method, so the method signature
+was changed to be consistent with the base interface. This is a binary compatible change,
+but results in a source incompatibility for clients originally implemented against Eclipse 3.5 or earlier.
+</p>
+
+<!-- ############################################## -->
+
+<h2>4. <a name="exemplarySetup">The bundle org.eclipse.equinox.p2.exemplarysetup has been removed</a></h2>
+<p><strong>What is affected:</strong> Applications or features including p2 or manually
+starting p2.</p>
+<p><strong>Description:</strong> The bundle <tt>org.eclipse.equinox.p2.exemplarysetup</tt> 
+has been removed from the Eclipse platform in the 3.6 release. This bundle never contained any API, 
+either real or provisional, and just contained some classes used to initialize p2 that are no longer needed. 
+There are some client applications that may be affected:</p> 
+<ol>
+	<li>If you have a custom product or feature that incorporates p2 bundles directly rather 
+	than through the <tt>org.eclipse.equinox.p2.user.ui</tt> feature provided by the platform, 
+	you will need to remove this extra bundle from your .product file or feature.xml.</li>
+	<li>Some advanced client applications were manually starting this bundle in order to ensure p2 
+	was started. Manual initialization of p2 is no longer needed and any such code can be removed.</li>
+</ol>
+
+<!-- ############################################## -->
+
+<h2>5. <a name="objectContribution">Object Contributions will not execute from a key binding</a></h2>
+<p><strong>What is affected:</strong> Key bindings assigned to a command backed by an object contribution action.</p>
+<p><strong>Description:</strong> A fundamental flaw in the legacy action/command bridge was fixed 
+in the 3.6 release.  While command definitionIds have been allowed on objectContributions
+so they can display key bindings while the context
+menu is up, objectContributions do not support execution using key bindings and objectContributions
+cannot be handlers for commands.  In 3.4 a leak was
+introduced that allowed some IResource based objectContributions to execute from a key binding.
+With this leak now fixed, plug-ins that wish to provide default behaviour for a key binding for
+their command must provide a handler.  This does not affect ActionSets, which will continue to
+work with key bindings when active within a perspective. 
+</p>
+An example of writing a core expression that's similar to an objectContribution can be found at
+<a href="http://wiki.eclipse.org/Menu_Contributions/IFile_objectContribution">IFile objectContribution
+Example</a>.
+<p>
+
+</p>
+
+<!-- ############################################## -->
+
+<h2>6. <a name="spinner">Spinner now allows setting equal minimum and maximum values</a></h2>
+<p><strong>What is affected:</strong> Clients dependent on the setting of a Spinner control's valid range to a single value to fail.</p>
+<p><strong>Description:</strong> Prior to Eclipse 3.6 it was not possible to set a Spinner's range of valid
+integer values to a single value.  This was done in order to be consistent with other range-based controls
+in SWT.  However the case of specifying a single integer value as the valid range for a Spinner is valid,
+so this can now be done.  Clients that were dependent on this case failing now need to check for this
+condition before setting a Spinner's maximum to a value that would match its minimum value (or vice versa),
+and not set the value in such cases.
+</p>
+
+<!-- ############################################## -->
+
+<h2>7. <a name="safari">Browser on OS X now returns "webkit" as its type</a></h2>
+<p><strong>What is affected:</strong> Clients using the result of <code>Browser.getBrowserType()</code> on OS X.</p>
+<p><strong>Description:</strong> In Eclipse 3.5.x the Browser returned "safari" as its type on OS X.  However this
+return value was not accurate since it is the WebKit framework that is embedded by the Browser control on OS X, not
+the Safari application, so it has been changed accordingly.  Clients that were using this return value to detect the
+use of a WebKit-based native browser on OS X should now detect a return value of "webkit" from <code>Browser.getBrowserType()</code>
+<em>and</em> check <code>SWT.getPlatform()</code> for a return value of either "carbon" or "cocoa".
+</p>
+
+<!-- ############################################## -->
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/recommended.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/recommended.html
new file mode 100644
index 0000000..e625a11
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/3.6/recommended.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../../book.css" charset="ISO-8859-1" type="text/css">
+<title>Adopting 3.6 mechanisms and APIs</title>
+</head>
+
+<body>
+
+<h1>Adopting 3.6 mechanisms and APIs</h1>
+<p>
+  This section describes changes that are required if you are trying to change 
+  your 3.5 plug-in to adopt the 3.6 mechanisms and APIs.
+</p>
+
+<ol>
+  <li><a href="#setDerived">Use IResource#setDerived(boolean, IProgressMonitor)</a></li>
+  <li><a href="#createResourceInVirtualFolderException">A new cause of IFile#create and IFolder#create failure</a></li>
+  <li><a href="#workbenchWizardFilter">Keywords support in Workbench Wizards</a></li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+
+<h2>1. <a name="setDerived">Use IResource#setDerived(boolean, IProgressMonitor)</a></h2>
+<p>
+As of 3.6, the <code>IResource#setDerived(boolean)</code> is deprecated. <code>IResource#setDerived(boolean, IProgressMonitor)</code>
+should be used instead and this change will be reported in a subsequent resource change event.</p>
+
+<h2>2. <a name="createResourceInVirtualFolderException">A new cause of IFile#create and IFolder#create failure</a></h2>
+<p>
+As of 3.6, there is a new cause when <code>IFile#create</code> and <code>IFolder#create</code> fail, i.e. when a non-virtual resource 
+is created in a virtual folder. Callers of this API that do preliminary verification before <code>#create</code> is called, 
+should adapt to this change and support the new case. In particular, wizards that create new resources and show errors in the title area 
+when <code>#create</code> may fail, should handle the case by showing a new error rather than failing and writing to the log.</p>
+
+<h2>3. <a name="workbenchWizardFilter">Keywords support in Workbench Wizards</a></h2>
+<p>
+As of 3.6, the New/Import/Export wizards support the org.eclipse.ui.keywords extension. It is recommended to add keywords and associate
+with these wizards, so that the users can easily filter</p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_3_porting_guide.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_3_porting_guide.html
deleted file mode 100644
index 96fe278..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_3_porting_guide.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
-<head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
-<title>Eclipse 3.3 Plug-in Migration Guide</title>
-</head>
-
-<body>
-
-<h1>Eclipse 3.3 Plug-in Migration Guide</h1>
-<p>This guide covers migrating Eclipse 3.2 plug-ins to Eclipse 3.3.</p>
-<p>One of the goals of Eclipse 3.3 was to move Eclipse forward while remaining compatible 
-  with previous versions to the greatest extent possible. That is, plug-ins written 
-  against the Eclipse 3.2 APIs should continue to work in 3.3 in spite of any API changes.</p>
-<p>The key kinds of compatibility are API contract compatibility and binary compatibility. 
-  API contract compatibility means that valid use of 3.2 APIs remains valid for 
-  3.3, so there is no need to revisit working code. Binary compatibility means 
-  that the API method signatures, etc. did not change in ways that would cause 
-  existing compiled ("binary") code to no longer link and run with the 
-  new 3.3 libraries.</p>
-<p>While every effort was made to avoid breakage, there are a few areas of incompatibility. 
-  This document describes the areas where Eclipse changed in incompatible ways 
-  between 3.2 and 3.3, and provides instructions for migrating 3.2 plug-ins to 
-  3.3.</p>
-<ul>
-  <li><a href="3.3/faq.html">Eclipse 3.3 Plug-in Migration FAQ</a></li>
-  <li><a href="3.3/incompatibilities.html">Incompatibilities between Eclipse 3.2 
-    and 3.3</a></li>
-  <li><a href="3.3/recommended.html">Adopting 3.3 mechanisms and API</a></li>
-</ul>
-
-</body>
-</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html
new file mode 100644
index 0000000..d10391b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<title>Eclipse 3.6 Plug-in Migration Guide</title>
+</head>
+
+<body>
+
+<h1>Eclipse 3.6 Plug-in Migration Guide</h1>
+<p>This guide covers migrating Eclipse 3.5 plug-ins to Eclipse 3.6.</p>
+<p>One of the goals of Eclipse 3.6 was to move Eclipse forward while remaining compatible 
+  with previous versions to the greatest extent possible. That is, plug-ins written 
+  against the Eclipse 3.5 APIs should continue to work in 3.6 in spite of any API changes.</p>
+<p>The key kinds of compatibility are API contract compatibility and binary compatibility. 
+  API contract compatibility means that valid use of 3.5 APIs remains valid for 
+  3.6, so there is no need to revisit working code. Binary compatibility means 
+  that the API method signatures, etc. did not change in ways that would cause 
+  existing compiled ("binary") code to no longer link and run with the 
+  new 3.6 libraries.</p>
+<p>While every effort was made to avoid breakage, there are a few areas of incompatibility or new
+  APIs that should be adopted by clients. 
+  This document describes those areas and provides instructions for migrating 3.5 plug-ins to 
+  3.6.</p>
+<ul>
+  <li><a href="3.6/faq.html">Eclipse 3.6 Plug-in Migration FAQ</a></li>
+  <li><a href="3.6/incompatibilities.html">Incompatibilities between Eclipse 3.5 and 3.6</a></li>
+  <li><a href="3.6/recommended.html">Adopting 3.6 mechanisms and API</a></li>
+</ul>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/porting/removals.html b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/removals.html
new file mode 100644
index 0000000..0c536e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/porting/removals.html
@@ -0,0 +1,123 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
+<title>Deprecated API removals</title>
+</head>
+<body>
+<h1>Deprecated API removals</h1>
+
+<p>
+  Often there is no sufficiently compelling reason to ever remove deprecated API, so the 
+  API may remain in place indefinitely after the release in which it was deprecated. 
+  However, there are situations where continuing to maintain the deprecated API 
+  creates too high a burden for both API developers and clients: the code bloat of 
+  keeping old implementations, the added complexity of multiple redundant APIs, etc.
+  For this reason the Eclipse project has a 
+  <a href="http://wiki.eclipse.org/Eclipse/API_Central/Deprecation_Policy">policy</a> 
+  to occasionally delete deprecated API after providing two years advance notice to clients. 
+  This section describes API removals that occurred in this release, and upcoming 
+  removals in future releases.
+</p>
+
+<h2>API removals in this release</h2>
+<p>
+There are no API removals planned for the Eclipse project Helios (3.6) release.
+</p>
+
+<h2>API removals after June 2012</h2>
+<ol>
+ <li><a href="#workspaceLock">WorkspaceLock</a></li>
+ <li><a href="#updateManager">Update Manager</a></li>
+ <li><a href="#incrementalProjectBuilder_getRule">IncrementalProjectBuilder#getRule()</a></li>
+ <li><a href="#luceneSearchParticipants">luceneSearchParticipants</a></li>
+</ol>
+
+<hr>
+
+<!-- ############################################## -->
+
+<h3>1. <a name="workspaceLock">WorkspaceLock</a></h3>
+<p>
+The <code>WorkspaceLock</code> API allowed a special client (usually platform UI) to
+hook into the locking protocols used by the workspace implementation. This hook
+was used to mitigate deadlocks due to interaction with synchronous SWT events,
+and was never intended to be used by other clients. In the 3.0 release this API
+was deprecated in favor of a more general API provided by the <code>org.eclipse.core.jobs</code>
+bundle. Invoking this API has had no effect since the 3.0 release. The specific API
+to be removed includes:
+</p>
+<ul>
+<li>The <code>org.eclipse.core.resources.WorkspaceLock</code> class.</li>
+<li>The method <code>org.eclipse.core.resources.IWorkspace#setWorkspaceLock</code></li>
+</ul>
+<p>
+For further details or to provide feedback on this change, see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311240">bug 311240</a>.
+</p>
+
+<!-- ############################################## -->
+
+<h3>2. <a name="updateManager">Update Manager</a></h3>
+<p>
+The functionality provided by the <code>org.eclipse.update</code> component (known as 
+<i>Update Manager</i>), was replaced in the Eclipse 3.4 (June 2008) release by Equinox p2. The bundles that
+comprise this component will be removed from the Eclipse platform and RCP features
+after the June 2012 release. Equinox p2 will continue to provide full compatibility
+for features and update sites created for Update Manager. The bundles to be removed
+are:
+</p>
+<ul>
+<li>org.eclipse.update.configurator</li>
+<li>org.eclipse.update.core</li>
+<li>org.eclipse.update.scheduler</li>
+<li>org.eclipse.update.ui</li>
+</ul>
+<p>
+For further details or to provide feedback on this change, see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311590">bug 311240</a>.
+</p>
+<!-- ############################################## -->
+
+<h3>3. <a name="incrementalProjectBuilder_getRule">IncrementalProjectBuilder#getRule()</a></h3>
+<p>
+The <code>IncrementalProjectBuilder#getRule()</code> method returned a scheduling rule 
+that was required for building the project by the builder. This method was intended to be used by the builder framework only.
+In the 3.6 release this method was deprecated in favor of a more general method <code>IncrementalProjectBuilder#getRule(int, Map)</code>. 
+The specific API to be removed includes:
+</p>
+<ul>
+<li>The method <code>org.eclipse.core.resources.IncrementalProjectBuilder#getRule()</code></li>
+</ul>
+<p>
+For further details or to provide feedback on this change, see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310072">bug 310072</a>.
+</p>
+<!-- ############################################## -->
+
+<h3>4. <a name="luceneSearchParticipants">luceneSearchParticipants</a></h3>
+<p>
+The extension point <code>org.eclipse.help.base.luceneSearchParticipants</code> used API classes which exposed classes from 
+Apache Lucene in their method parameters. This means that clients would be impacted with at least binary incompatibility
+if the Eclipse 
+Help system switched from Lucene 1.x to 2.x or 3.x and has caused the help system to stay on an old version of Lucene.
+In the 3.6 release this extension point and the classes it requires were deprecated. The replacement extension point
+ <code>org.eclipse.help.base.searchParticipant</code> should be used instead. 
+The specific API to be removed includes:
+</p>
+<ul>
+
+<li>The extension point org.eclipse.help.base.luceneSearchParticipants</li>
+<li>The class org.eclipse.help.search.LuceneSearchParticipant</li>
+<li>The class org.eclipse.help.search.ISearchIndex</li>
+<li>The class org.eclipse.help.search.XMLSearchParticipant</li>
+
+</ul>
+<p>
+For further details or to provide feedback on this change, see <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311931">bug 311931</a>.
+</p>
+<!-- ############################################## -->
+
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/questions/index.html b/eclipse/plugins/org.eclipse.platform.doc.isv/questions/index.html
index aaeaf45..4b88742 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/questions/index.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/questions/index.html
@@ -91,7 +91,7 @@ Platform questions index</h1>
     wizard if I'm not adding it as a workbench extension?</a></li>
   <li><a href="../guide/dialogs_wizards_multipage.htm">How do I build a wizard
     with multiple pages?</a></li>
-  <li><a href="../guide/swt_widgets_controls.htm">What widgets are available in
+  <li><a href="../guide/swt_widgets_controls.htm">Which widgets are available in
     SWT?</a></li>
   <li><a href="../guide/swt_layouts.htm">How do I implement an SWT layout?</a></li>
   <li><a href="http://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm">How do I implement an
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/extension-points/index.html b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/extension-points/index.html
index 1ff2723..0e91a52 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/extension-points/index.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/extension-points/index.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Platform Extension Points</title>
@@ -28,16 +28,19 @@ of the platform infrastructure:
 </ul>
 <h3><a name="workspace"></a>Workspace</h3>
 <ul>
+  <li><a href="org_eclipse_core_filesystem_filesystems.html">org.eclipse.core.filesystem.filesystems</a></li>
   <li><a href="org_eclipse_core_resources_builders.html">org.eclipse.core.resources.builders</a>
   </li>
    <li><a href="org_eclipse_core_resources_fileModificationValidator.html">org.eclipse.core.resources.fileModificationValidator</a>
   </li>
+  <li><a href="org_eclipse_core_resources_filterMatchers.html">org.eclipse.core.resources.filterMatchers</a></li>
   <li><a href="org_eclipse_core_resources_markers.html">org.eclipse.core.resources.markers</a></li>
   <li><a href="org_eclipse_core_resources_moveDeleteHook.html">org.eclipse.core.resources.moveDeleteHook</a></li>
   <li><a href="org_eclipse_core_resources_natures.html">org.eclipse.core.resources.natures</a></li>
   <li><a href="org_eclipse_core_resources_refreshProviders.html">org.eclipse.core.resources.refreshProviders</a></li>
   <li><a href="org_eclipse_core_resources_teamHook.html">org.eclipse.core.resources.teamHook</a></li>
-  <li><a href="org_eclipse_core_filesystem_filesystems.html">org.eclipse.core.filesystem.filesystems</a></li>
+  <li><a href="org_eclipse_core_resources_variableResolvers.html">org.eclipse.core.resources.variableResolvers</a></li>
+  <li><a href="org_eclipse_core_resources_filterMatchers.html">org.eclipse.core.resources.filterMatchers</a></li>
 </ul>
 
 <h3><a name="text"></a>Platform Text</h3>
@@ -105,7 +108,9 @@ of the platform infrastructure:
   <li><a href="org_eclipse_ui_preferencePages.html">org.eclipse.ui.preferencePages</a></li>
   <li><a href="org_eclipse_ui_preferenceTransfer.html">org.eclipse.ui.preferenceTransfer</a></li>
   <li><a href="org_eclipse_ui_presentationFactories.html">org.eclipse.ui.presentationFactories</a></li>
+  <li><a href="org_eclipse_ui_propertiesView.html">org.eclipse.ui.propertiesView</a></li>    
   <li><a href="org_eclipse_ui_propertyPages.html">org.eclipse.ui.propertyPages</a></li>
+  <li><a href="org_eclipse_ui_services.html">org.eclipse.ui.services</a></li>
   <li><a href="org_eclipse_ui_splashHandlers.html">org.eclipse.ui.splashHandlers</a></li>
   <li><a href="org_eclipse_ui_startup.html">org.eclipse.ui.startup</a></li>
   <li><a href="org_eclipse_ui_statusHandlers.html">org.eclipse.ui.statusHandlers</a></li>
@@ -113,9 +118,9 @@ of the platform infrastructure:
   <li><a href="org_eclipse_ui_themes.html">org.eclipse.ui.themes</a></li>
   <li><a href="org_eclipse_ui_viewActions.html">org.eclipse.ui.viewActions</a></li>
   <li><a href="org_eclipse_ui_views.html">org.eclipse.ui.views</a></li>
-  <li><a href="org_eclipse_ui_views_properties_tabbed_propertyContributor.html">org.eclipse.ui.views.properties.tabbed.propertyContributor.html</a></li>
-  <li><a href="org_eclipse_ui_views_properties_tabbed_propertySections.html">org.eclipse.ui.views.properties.tabbed.propertySections.html</a></li>
-  <li><a href="org_eclipse_ui_views_properties_tabbed_propertyTabs.html">org.eclipse.ui.views.properties.tabbed.propertyTabs.html</a></li>
+  <li><a href="org_eclipse_ui_views_properties_tabbed_propertyContributor.html">org.eclipse.ui.views.properties.tabbed.propertyContributor</a></li>
+  <li><a href="org_eclipse_ui_views_properties_tabbed_propertySections.html">org.eclipse.ui.views.properties.tabbed.propertySections</a></li>
+  <li><a href="org_eclipse_ui_views_properties_tabbed_propertyTabs.html">org.eclipse.ui.views.properties.tabbed.propertyTabs</a></li>
   <li><a href="org_eclipse_ui_workingSets.html">org.eclipse.ui.workingSets</a></li>
 </ul>
 <h3><a name="team"></a>Team</h3>
@@ -177,15 +182,22 @@ of the platform infrastructure:
   <li><a href="org_eclipse_help_contentExtension.html">org.eclipse.help.contentExtension</a></li>
   <li><a href="org_eclipse_help_contentProducer.html">org.eclipse.help.contentProducer</a></li>
   <li><a href="org_eclipse_help_contexts.html">org.eclipse.help.contexts</a></li>
+  <li><a href="org_eclipse_help_criteriaDefinition.html">org.eclipse.help.criteriaDefinition</a></li>
+  <li><a href="org_eclipse_help_criteriaProvider.html">org.eclipse.help.criteriaProvider</a></li>
   <li><a href="org_eclipse_help_index.html">org.eclipse.help.index</a></li>
   <li><a href="org_eclipse_help_toc.html">org.eclipse.help.toc</a></li>
   <li><a href="org_eclipse_help_base_activitySupport.html">org.eclipse.help.base.activitySupport</a></li>
   <li><a href="org_eclipse_help_base_browser.html">org.eclipse.help.base.browser</a></li>
   <li><a href="org_eclipse_help_base_luceneAnalyzer.html">org.eclipse.help.base.luceneAnalyzer</a></li>
   <li><a href="org_eclipse_help_base_luceneSearchParticipants.html">org.eclipse.help.base.luceneSearchParticipants</a></li>
+  <li><a href="org_eclipse_help_base_searchParticipant.html">org.eclipse.help.base.searchParticipant</a></li>
   <li><a href="org_eclipse_help_base_server.html">org.eclipse.help.base.server</a></li>
+  <li><a href="org_eclipse_help_base_scope.html">org.eclipse.help.base.scope</a></li>
   <li><a href="org_eclipse_help_ui_searchEngine.html">org.eclipse.help.ui.searchEngine</a></li>
   <li><a href="org_eclipse_help_webapp_contentFilter.html">org.eclipse.help.webapp.contentFilter</a></li>
+  <li><a href="org_eclipse_help_webapp_frame.html">org.eclipse.help.webapp.frame</a></li>
+  <li><a href="org_eclipse_help_webapp_toolbarButton.html">org.eclipse.help.webapp.toolbarButton</a></li>
+  <li><a href="org_eclipse_help_webapp_view.html">org.eclipse.help.webapp.view</a></li>
   <li><a href="org_eclipse_ui_cheatsheets_cheatSheetContent.html">org.eclipse.ui.cheatsheets.cheatSheetContent</a></li>
   <li><a href="org_eclipse_ui_cheatsheets_cheatSheetItemExtension.html">org.eclipse.ui.cheatsheets.cheatSheetItemExtension</a></li>
   <li><a href="org_eclipse_ui_intro_config.html">org.eclipse.ui.intro.config</a></li>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html
index 94fd391..96db7bc 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/bundle_manifest.html
@@ -2,7 +2,7 @@
 <html lang="en">
 
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2008. This page is made available under license. Full for details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2005, 2010. This page is made available under license. Full for details see the LEGAL in the documentation book that contains this page." >
 
 <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
 <link REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -268,8 +268,25 @@ Eclipse-BuddyPolicy: dependent
 <h3>The Eclipse-RegisterBuddy Header</h3>
 
 <p>
-The Eclipse-RegisterBuddy header is used to specify a list of bundles for which this bundle is 
-a registered buddy.  The Eclipse-RegisterBuddy header must use the following syntax:
+The Eclipse-RegisterBuddy header is used to declare a comma-separated list of symbolic names of 
+bundles that this bundle should be a registered buddy to. The bundles with the specified 
+symbolic names must use the <b>registered</b> buddy policy (specified by the Eclipse-BuddyPolicy)
+header) in order for this bundle to be a registered buddy.
+</p>
+<p>
+Note that the following conditions must be met before a bundle <b>X</b> can become a registered 
+buddy of another bundle <b>Y</b>: 
+</p>
+<ul>
+ <li>The bundle <b>Y</b> must specify the <b>registered</b> buddy policy (i.e. Eclipse-BuddyPolicy: 
+     registered) </li>
+ <li>The bundle <b>X</b> must specify the symbolic name of <b>Y</b> in the Eclipse-RegisterBuddy 
+     header (i.e Eclipse-RegisterBuddy: Y) </li>
+ <li>The bundle <b>X</b> must be dependent on a package exported by bundle <b>Y</b>. This can 
+     happen through either a Require-Bundle or Import-Package constraint. </li>
+</ul>
+<p>
+The syntax of the Eclipse-RegisterBuddy header is the following:
 </p>
 
 <pre>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/eclipsestarter.html b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/eclipsestarter.html
index 46992f1..f1a7147 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/eclipsestarter.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/eclipsestarter.html
@@ -24,7 +24,7 @@ invoking functionality defined in plug-ins, and shutting down the platform when
 </p>
 <p>
 Clients that do not need to access any particular function, but just need to start the platform, can use
-<tt>org.eclipse.equinox.launcher.Main.run()</tt> in the bundle <tt>org.eclipse.equinox.launcher</tt>.  However, clients that need to invoke specific function should use
+<tt>org.eclipse.equinox.launcher.Main.run()</tt> in the bundle <tt>org.eclipse.equinox.launcher</tt>.  However, clients that need to invoke specific functionality should use
 <b>EclipseStarter</b>.  See the javadoc inside this class for details.
 </p>  
 </body>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/overview-platform.html b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/overview-platform.html
index 704ff7a..8021ff7 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/overview-platform.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/overview-platform.html
@@ -2,7 +2,7 @@
 
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
@@ -132,9 +132,11 @@ determining which plug-ins a given plug-in should include as prerequisites.</p>
   </tr>
   <tr>
     <td><tt>org.eclipse.core.resources<br>
+    org.eclipse.core.resources.filtermatchers<br>
     org.eclipse.core.resources.mapping<br>
     org.eclipse.core.resources.refresh<br>
-    org.eclipse.core.resources.team</tt></td>
+    org.eclipse.core.resources.team<br>
+    org.eclipse.core.resources.variableresolvers</tt></td>
     <td><tt>org.eclipse.core.resources</tt></td>
     <td> </td>
   </tr>
@@ -203,6 +205,11 @@ determining which plug-ins a given plug-in should include as prerequisites.</p>
     <td> </td>
   </tr>
   <tr>
+    <td><tt>org.eclipse.equinox.ds</tt></td>
+    <td><tt>org.apache.felix.scr</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
     <td><tt>org.eclipse.equinox.http.jetty<br>
     org.eclipse.equinox.http.servlet<br></tt></td>
     <td><tt>org.eclipse.equinox.http.servlet</tt></td>
@@ -219,6 +226,62 @@ determining which plug-ins a given plug-in should include as prerequisites.</p>
     <td> </td>
   </tr>
   <tr>
+    <td><tt>org.eclipse.equinox.p2.core<br>
+    org.eclipse.equinox.p2.core.spi</tt></td>
+    <td><tt>org.eclipse.equinox.p2.core</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.engine<br>
+    org.eclipse.equinox.p2.engine.query<br>
+    org.eclipse.equinox.p2.engine.spi</tt></td>
+    <td><tt>org.eclipse.equinox.p2.engine</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.metadata<br>
+    org.eclipse.equinox.p2.metadata.expression<br>
+    org.eclipse.equinox.p2.metadata.index<br>
+    org.eclipse.equinox.p2.query</tt></td>
+    <td><tt>org.eclipse.equinox.p2.metadata</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.operations</tt></td>
+    <td><tt>org.eclipse.equinox.p2.operations</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.planner</tt></td>
+    <td><tt>org.eclipse.equinox.p2.director</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.ql</tt></td>
+    <td><tt>org.eclipse.equinox.p2.ql</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.repository<br>
+    org.eclipse.equinox.p2.repository.artifact<br>
+    org.eclipse.equinox.p2.repository.artifact.spi<br>
+    org.eclipse.equinox.p2.repository.metadata<br>
+    org.eclipse.equinox.p2.repository.metadata.spi<br>
+    org.eclipse.equinox.p2.repository.spi</tt></td>
+    <td><tt>org.eclipse.equinox.p2.repository</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.touchpoint.eclipse.query</tt></td>
+    <td><tt>org.eclipse.equinox.p2.touchpoint.eclipse</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
+    <td><tt>org.eclipse.equinox.p2.ui</tt></td>
+    <td><tt>org.eclipse.equinox.p2.ui</tt></td>
+    <td> </td>
+  </tr>
+  <tr>
     <td><tt>org.eclipse.equinox.security.auth<br>
     org.eclipse.equinox.security.auth.credentials<br>
     org.eclipse.equinox.security.auth.module<br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
index 34e15b9..b6080fb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
@@ -3,7 +3,7 @@
 
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <meta http-equiv="Content-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
@@ -14,7 +14,7 @@
 <body>
 
 <h1>The Eclipse runtime options</h1>
-<p>Version 3.5.2 - Last revised January 18, 2010</p>
+<p>Version 3.6 - Last revised August 5, 2009</p>
 <p>The Eclipse platform is highly configurable. Configuration input takes the
   form of command line arguments and System property settings. In many cases
   the command line arguments are simply short cuts for setting the related System
@@ -43,9 +43,7 @@ line arguments. </p>
   <dd>equivalent to setting <a href="#osgiconfigurationarea">osgi.configuration.area</a>
     to <location></dd>
   <dt>-console [port] (OSGi) </dt>
-  <dd>equivalent to setting <a href="#osgiconsole">osgi.console</a> to [port]
-    or the empty string if the default port is to be used (i.e., when the port
-    is not specified)</dd>
+  <dd>equivalent to setting <a href="#osgiconsole">osgi.console</a> to [port].</dd>
   <dt>-consoleLog (Runtime)</dt>
   <dd>equivalent to setting <a href="#eclipseconsolelog">eclipse.consoleLog</a> to
     "true"</dd>
@@ -82,6 +80,25 @@ line arguments. </p>
   <dt>-keyring <location> (Runtime)</dt>
   <dd>the location of the authorization database on disk. This argument has to
     be used together with the -password argument. </dd>
+  <dt><a name="launcherdefaultaction" id="launcherdefaultaction"></a>--launcher.defaultAction <option> (Executable)</dt>
+  <dd>specifies the default action to take when the launcher is started without
+  any "-" arguments on the command line.  Currently the only supported 
+  value is "openFile".  The "openFile" option tells the 
+  launcher that if it is called with a command line that only contains arguments 
+  that do not start with "-", then those arguments should be treated as if they 
+  followed "--launcher.openFile".
+  <pre>  eclipse myFile.txt</pre>
+  This is the kind of command line the launcher will receive on windows when you double click a 
+  file that is associated with eclipse, or you select and choose "Open With" or
+  "Send To" Eclipse.
+  </dd>
+
+  <dt><a name="launcheropenfile" id="launcheropenfile"></a>--launcher.openFile <space separated list of files> (Executable)</dt>
+  <dd>a space separated list of files to pass to the application.  This option is
+  typically used to pass a list of files to be opened by an Eclipse application.
+  This option requires SWT in order to fire the necessary SWT_OPENDOC event for
+  the files that are specified.  Relative paths will be resolved first against the current
+  working directory, and second against the eclipse program directory.</dd>
   <dt>--launcher.library <location> (Executable)</dt>
   <dd>the location of the eclipse executable's companion shared
 library.  If not specified the executable looks in the plugins
@@ -103,6 +120,11 @@ unattended situation.</dd>
 secondary thread.  This should used if a swing application is
 being run. <span style="font-weight: bold;">SWT will NOT work</span>
 if this option is specified.</dd>
+  <dt><a name="launchertimeout" id="launchertimeout"></a>--launcher.timeout <value> (Executable)</dt>
+  <dd>a timeout value for how long the launcher should spend trying to 
+  communicate with an already running eclipse before the launcher gives up and 
+  launches a new eclipse instance. Default is 60 (seconds).
+  </dd>
   <dt>--launcher.XXMaxPermSize <value> (Executable)</dt>
   <dd>If specified, and the executable detects that the VM being used
 is a Sun VM, then the launcher will automatically add the
@@ -110,7 +132,8 @@ is a Sun VM, then the launcher will automatically add the
 capable of detecting Sun VMs on all platforms.<br>
   </dd>
   <dt>-name <string></dt>
-  <dd>The name to be displayed in task bar item when the application starts up. When not set, the name is the name of the executable.</dd>
+  <dd>The name to be displayed in the task bar item for the splash screen when the application starts up (not applicable on Windows). 
+  Also used as the title of error dialogs opened by the launcher.  When not set, the name is the name of the executable.</dd>
   <dt>-nl <locale> (OSGi)</dt>
   <dd>equivalent to setting <a href="#osginl">osgi.nl</a> to <locale></dd>
   <dt>-noExit (OSGi)</dt>
@@ -134,6 +157,9 @@ capable of detecting Sun VMs on all platforms.<br>
   <dt> -product <id> (OSGi) </dt>
   <dd>equivalent to setting  <a href="#eclipseproduct">eclipse.product</a> to
   <id></dd>
+  <dt> -registryMultiLanguage  (Runtime) </dt>
+  <dd>equivalent to setting <a href="#registrymultilang">eclipse.registry.MultiLanguage</a> to
+  "true"</dd>
   <dt>-showSplash <bitmap> (Executable, Main)
   </dt>
   <dd>specifies the bitmap to use in the splash screen. If specified,
@@ -311,10 +337,13 @@ in <a href="#eclipsevm">eclipse.vm</a>.</dd>
   <dd>the file system location of a properties file containing default settings
       for plug-in preferences. These default settings override default settings
       specified in the primary feature. Relative paths are interpreted relative
-  to the current working directory for eclipse itself.</dd>
+  to the current working directory for Eclipse itself.</dd>
   <dt><a name="eclipseproduct" id="eclipseproduct"></a>eclipse.product {-product}</dt>
   <dd>the identifier of the product being run. This controls various branding
   information and what application is used.</dd>
+  <dt><a name="registrymultilang" id="registrymultilang"></a>eclipse.registry.MultiLanguage {-registryMultiLanguage}</dt>
+  <dd>if "true", extension registry supports translation to multiple languages. By default extension registry provides 
+  translation only to the Eclipse locale specified by the <a href="#osginl">osgi.nl</a>.</dd>
   <dt><a name="serviceJobs" id="serviceJobs"></a>eclipse.service.jobs</dt>
   <dd>controls registration of OSGi services. Set to "false" to suppress registration of OSGi 
     services by the <code>org.eclipse.core.jobs</code> plug-in</dd>
@@ -322,7 +351,7 @@ in <a href="#eclipsevm">eclipse.vm</a>.</dd>
   <dd>Controls registration of OSGi services. Set to "false" to suppress registration of OSGi 
      services by the <code>org.eclipse.equinox.preferences</code> plug-in</dd>
   <dt><a name="eclipsestarttime" id="eclipsestarttime"></a>eclipse.startTime</dt>
-  <dd>This property is set at the time eclipse is started.  The value of this property a string 
+  <dd>This property is set at the time Eclipse is started.  The value of this property a string 
       representation of the value returned by System.currentTimeMillis().  This value is not
       intended to be set by users.</dd>
   <dt><a name="eclipsestateSaveDelayInterval" id="eclipsestateSaveDelayInterval"></a>eclipse.stateSaveDelayInterval</dt>
@@ -356,7 +385,8 @@ in <a href="#eclipsevm">eclipse.vm</a>.</dd>
   <dt><a name="osgiadaptor"></a>osgi.adaptor</dt>
   <dd>the class name of the OSGi framework adaptor to use.</dd>
   <dt><a name="osgiarch"></a>osgi.arch {-arch}</dt>
-  <dd>see -arch</dd>
+  <dd>the processor architecture value. The value should be one of the processor architecture
+  names known to Eclipse (e.g., x86, ppc, sparc, ...). See <tt>org.eclipse.osgi.service.environment.Constants</tt> for known values.</dd>
   <dt><a name="osgibaseconfigurationarea"></a>osgi.baseConfiguration.area</dt>
   <dd>specifies a base configuration that is used when 
       <a href="#osgiconfigurationarea">osgi.configuration.area</a> is not specified.</dd>
@@ -456,9 +486,11 @@ will force eclipse to reinitialize these caches.</dd>
     more details.</dd>
   <dt><a name="osgiconsole"></a>osgi.console {-console} </dt>
   <dd>if set to a non-null value, the OSGi console (if installed) is enabled.
+    This is handy for investigating the state of the system.
     If the value is a suitable integer, it is interpreted as the port on which
-    the console listens and directs its output to the given port. Handy for investigating
-    the state of the system.</dd>
+    the console listens and directs its output to the given port.  If the value is 
+    not a suitable interger (including the empty string) then the console will
+    listen to System.in and direct its output to System.out.</dd>
   <dt><a name="osgiconsoleclass"></a>osgi.console.class</dt>
   <dd>the class name of the console to run if requested</dd>
   <dt><a name="osgiconsoleencoding"></a>osgi.console.encoding</dt>
@@ -645,12 +677,12 @@ will force eclipse to reinitialize these caches.</dd>
   <dt><a name="osginluser"></a>osgi.nl.user</dt>
   <dd>the name of the locale when the user explicitly adds -nl to the command-line arguments.</dd>
   <dt><a name="osginoshutdown"></a>osgi.noShutdown {-noExit}</dt>
-  <dd>if "true", the OSGi Framework will not be shut down after the eclipse application has ended.  This
+  <dd>if "true", the OSGi Framework will not be shut down after the Eclipse application has ended.  This
       is useful for examining the OSGi Framework after the Eclipse application has ended.  Note that the VM will terminate
       if no active non-daemon threads exists. See <a href="#osgiframeworkactiveThreadType">osgi.framework.activeThreadType</a>.</dd>
   <dt><a name="osgios"></a>osgi.os {-os}</dt>
-  <dd>the operating system value. The value should be one of the Eclipse processor
-    architecture names known to Eclipse (e.g., x86, sparc, ...).</dd>
+  <dd>the operating system value. The value should be one of the operating system
+  names known to Eclipse (e.g., win32, linux, ...). See <tt>org.eclipse.osgi.service.environment.Constants</tt> for known values.</dd>
   <dt><a name="osgiparentclassloader"></a>osgi.parentClassloader</dt>
   <dd>the classloader type to use as the parent classloader for all bundles installed
   in the Framework.  The valid types are the following:
@@ -799,7 +831,7 @@ will force eclipse to reinitialize these caches.</dd>
   even if they are listed as possible. For example, it is unreasonable to expect
   a plug-in focused on user data (e.g., the Eclipse Resources plug-in) to do much
   if the instance area is not defined. It is up to plug-in developers to choose
-  the setups they support and design their function accordingly.</p>
+  the setups they support and design their functionality accordingly.</p>
 <dl>
     <dt>@none</dt>
     <dd>Indicates that the corresponding location should never be set either
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/toc.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/toc.xml
index d844acb..54c2c85 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/toc.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/toc.xml
@@ -12,7 +12,7 @@
 		<link toc="topics_Reference.xml" />
 	</topic>
 	<topic label="What's new" href="whatsNew/platform_isv_whatsnew.html"/>
-	<topic label="3.5 Plug-in Migration Guide">
+	<topic label="3.6 Plug-in Migration Guide">
 		<link toc="topics_Porting.xml"/>
 	</topic>
 	<topic label="Examples Guide">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Guide.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Guide.xml
index 1b76e99..2985435 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Guide.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Guide.xml
@@ -171,6 +171,8 @@
 		<topic label="Project-scoped preferences" href="guide/resInt_preferences.htm" />
 		<topic label="File encoding and content types" href="guide/resInt_content.htm" />
 		<topic label="Linked resources" href="guide/resInt_linked.htm" />
+		<topic label="Virtual folders" href="guide/resInt_virtual.htm" />
+		<topic label="Resources filters" href="guide/resInt_filters.htm" />
 		<topic label="Resource markers" href="guide/resAdv_markers.htm" />
 		<topic label="Modifying the workspace" href="guide/resAdv_modify.htm" >
 			<topic label="Batching resource changes" href="guide/resAdv_batching.htm" />
@@ -192,6 +194,7 @@
 			<topic label="User interface support in other file systems" href="guide/wrkAdv_efs_resources.htm" />
 			<topic label="File system providers" href="guide/resAdv_efs_providers.htm" />
 		</topic>
+		<topic label="Dynamic path variables" href="guide/resAdv_variables.htm" />
 	</topic>
 
 	<topic label="Advanced workbench concepts" href="guide/wrkAdv.htm">
@@ -365,15 +368,17 @@
 			<topic label="Configuration/setup" href="guide/ua_help_setup.htm" >
 				<topic label="Rich Client Platform (RCP) help" href="guide/ua_help_setup_rcp.htm"/>
 				<topic label="Standalone help" href="guide/ua_help_setup_standalone.htm"/>
-				<topic label="Infocenter" href="guide/ua_help_setup_infocenter.htm"/>
+				<topic label="Information center" href="guide/ua_help_setup_infocenter.htm"/>
 				<topic label="Help system customization" href="guide/ua_help_setup_preferences.htm">
 					<topic label="Help data XML format" href="guide/ua_help_setup_help_data.htm"/>
 					<topic label="Generated navigation topics" href="guide/ua_help_setup_nav.htm"/>
      <topic href="guide/ua_help_menu.htm" label="The Help Menu">
      </topic>
-               <topic href="guide/ua_help_infocenter_preferences.htm" label="Infocenter customization">
+               <topic href="guide/ua_help_infocenter_preferences.htm" label="Information center customization">
                </topic>
-               <topic href="guide/ua_help_setup_about.htm" label="Using about.html to debug infocenters">
+               <topic href="guide/ua_help_setup_about.htm" label="Using about.html to debug information centers">
+               </topic>
+               <topic href="guide/ua_help_abstract_scope.htm" label="Using AbstractHelpScope to filter an information center">
                </topic>
 				</topic>
 				<topic label="Pre-indexing documentation" href="guide/ua_help_setup_preindex.htm"/>
@@ -382,6 +387,8 @@
 				<topic label="Table of contents (toc) files" href="guide/ua_help_content_toc.htm" />
 				<topic label="Help server and file locations" href="guide/ua_help_content_files.htm" />
 				<topic label="Completing the plug-in manifest" href="guide/ua_help_content_manifest.htm" />
+    <topic href="guide/ua_help_content_criteria.htm" label="Adding criteria to help content">
+    </topic>
 				<topic label="Building nested documentation structures" href="guide/ua_help_content_nested.htm" />
 				<topic label="Contributing XHTML help documents" href="guide/ua_help_content_xhtml.htm" />
 				<topic label="Remote Help" href="guide/ua_help_content_remote.htm" />				
@@ -395,6 +402,8 @@
 				</topic>
             <topic href="guide/ua_help_content_process.htm" label="Processing Help Content">
             </topic>
+            <topic href="guide/ua_help_content_child_links.htm" label="Adding child links to help topics">
+            </topic>
 			</topic>
 			<topic label="Context-sensitive help" href="guide/ua_help_context.htm" >
 				<topic label="Declaring a context id" href="guide/ua_help_context_id.htm" />
@@ -405,7 +414,7 @@
 			<topic label="Help search" href="guide/ua_help_search.htm">
 			   <topic label="Plugging in search engines" href="guide/ua_help_search_types.htm"/>		
 			</topic>
-   <topic href="guide/ua_help_war.htm" label="Deploying the infocenter as a Web Archive">
+   <topic href="guide/ua_help_war.htm" label="Deploying the information center as a Web Archive">
    </topic>
 		</topic>
 		<topic label="Cheat sheets" href="guide/ua_cheatsheet.htm" >
@@ -426,6 +435,8 @@
 		</topic>
 	</topic>
  <topic href="guide/p2_overview.htm" label="Provisioning platform, p2">
+    <topic href="guide/p2_api_overview.htm" label="API Overview">
+    </topic>
     <topic href="guide/p2_metadata.html" label="Metadata management">
        <topic href="guide/p2_publisher.html" label="Publishing metadata">
        </topic>
@@ -433,6 +444,8 @@
        </topic>
        <topic href="guide/p2_customizing_metadata.html" label="Customizing metadata">
        </topic>
+       <topic href="guide/p2_actions_touchpoints.html" label="Provisioning Actions and Touchpoints">
+       </topic>
     </topic>
     <topic href="guide/p2_director.html" label="Installation management">
     </topic>
@@ -446,6 +459,12 @@
        <topic href="guide/p2_repositorytasks.htm" label="Ant tasks for managing repositories">
        </topic>
     </topic>
+    <topic label="Customizing the p2 UI" href="guide/p2_ui.htm">
+		<topic label="Reusing parts of the UI" href="guide/p2_uireuse.htm" />
+		<topic label="Configuring the UI Policy" href="guide/p2_uipolicy.htm" />
+		<topic label="Forced update on startup" href="guide/p2_startup.htm" />
+	</topic>
+    
  </topic>
 
 	<topic label="Packaging and delivering Eclipse based products" href="guide/product.htm">
@@ -460,6 +479,7 @@
 		<topic label="Product extensions" href="guide/product_extension.htm" />
 		<topic label="Updating a product or extension" href="guide/product_update.htm" />
 		<topic label="Deploying eclipse based application with Java Web Start" href="guide/java_web_start.htm"/>
+		<topic label="Associate and open files with an eclipse based application" href="guide/product_open_file.htm"/>
 	</topic>
 	
 	<topic label="Building a Rich Client Platform application" href="guide/rcp.htm">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Porting.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Porting.xml
index 2fe0a67..e20f3da 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Porting.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Porting.xml
@@ -4,6 +4,12 @@
 <!-- Define topics for the porting guide index                                     -->
 <!-- ============================================================================= -->
 <toc label="Migration">
+	<topic label="Migrating to Eclipse 3.6 from 3.5">
+		<topic label="Introduction" href="porting/eclipse_3_6_porting_guide.html"/>
+		<topic label="FAQ" href="porting/3.6/faq.html" />
+		<topic label="Incompatibilities" href="porting/3.6/incompatibilities.html" />
+		<topic label="Adopting 3.6 mechanisms and API" href="porting/3.6/recommended.html" />
+	</topic>
 	<topic label="Migrating to Eclipse 3.5 from 3.4">
 		<topic label="Introduction" href="porting/eclipse_3_5_porting_guide.html"/>
 		<topic label="FAQ" href="porting/3.5/faq.html" />
@@ -16,10 +22,5 @@
 		<topic label="Incompatibilities" href="porting/3.4/incompatibilities.html" />
 		<topic label="Adopting 3.4 mechanisms and API" href="porting/3.4/recommended.html" />
 	</topic>
-	<topic label="Migrating to Eclipse 3.3 from 3.2">
-		<topic label="Introduction" href="porting/eclipse_3_3_porting_guide.html"/>
-		<topic label="FAQ" href="porting/3.3/faq.html" />
-		<topic label="Incompatibilities" href="porting/3.3/incompatibilities.html" />
-		<topic label="Adopting 3.3 Mechanisms and API" href="porting/3.3/recommended.html" />
-	</topic>
+	<topic label="Deprecated API removals" href="porting/removals.html"/>
 </toc>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Reference.xml b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Reference.xml
index 3db5f18..25a72fd 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Reference.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/topics_Reference.xml
@@ -39,9 +39,12 @@
       <topic label="org.eclipse.core.filesystem.provider" href="reference/api/org/eclipse/core/filesystem/provider/package-summary.html"/>
       <topic label="org.eclipse.core.net.proxy" href="reference/api/org/eclipse/core/net/proxy/package-summary.html"/>
       <topic label="org.eclipse.core.resources" href="reference/api/org/eclipse/core/resources/package-summary.html"/>
+      <topic label="org.eclipse.core.resources.filtermatchers" href="reference/api/org/eclipse/core/resources/filtermatchers/package-summary.html"/>
       <topic label="org.eclipse.core.resources.refresh" href="reference/api/org/eclipse/core/resources/refresh/package-summary.html"/>
-      <topic label="org.eclipse.core.resources.team" href="reference/api/org/eclipse/core/resources/team/package-summary.html"/>
       <topic label="org.eclipse.core.resources.mapping" href="reference/api/org/eclipse/core/resources/mapping/package-summary.html"/>
+      <topic label="org.eclipse.core.resources.team" href="reference/api/org/eclipse/core/resources/team/package-summary.html"/>
+      <topic label="org.eclipse.core.resources.variableresolvers" href="reference/api/org/eclipse/core/resources/variableresolvers/package-summary.html"/>
+      <topic label="org.eclipse.core.resources.filterMatchers" href="reference/api/org/eclipse/core/resources/variableresolvers/package-summary.html"/>
       <topic label="org.eclipse.core.runtime" href="reference/api/org/eclipse/core/runtime/package-summary.html"/>
       <topic label="org.eclipse.core.runtime.adaptor" href="reference/api/org/eclipse/core/runtime/adaptor/package-summary.html"/>
       <topic label="org.eclipse.core.runtime.content" href="reference/api/org/eclipse/core/runtime/content/package-summary.html"/>
@@ -68,6 +71,26 @@
       <topic label="org.eclipse.equinox.http.servlet" href="reference/api/org/eclipse/equinox/http/servlet/package-summary.html"/>
       <topic label="org.eclipse.equinox.jsp.jasper" href="reference/api/org/eclipse/equinox/jsp/jasper/package-summary.html"/>
       <topic label="org.eclipse.equinox.jsp.jasper.registry" href="reference/api/org/eclipse/equinox/jsp/jasper/registry/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.core" href="reference/api/org/eclipse/equinox/p2/core/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.core.spi" href="reference/api/org/eclipse/equinox/p2/core/spi/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.engine" href="reference/api/org/eclipse/equinox/p2/engine/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.engine.query" href="reference/api/org/eclipse/equinox/p2/engine/query/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.engine.spi" href="reference/api/org/eclipse/equinox/p2/engine/spi/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.metadata" href="reference/api/org/eclipse/equinox/p2/metadata/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.metadata.expression" href="reference/api/org/eclipse/equinox/p2/metadata/expression/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.metadata.index" href="reference/api/org/eclipse/equinox/p2/metadata/index/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.operations" href="reference/api/org/eclipse/equinox/p2/operations/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.planner" href="reference/api/org/eclipse/equinox/p2/planner/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.ql" href="reference/api/org/eclipse/equinox/p2/ql/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.query" href="reference/api/org/eclipse/equinox/p2/query/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository" href="reference/api/org/eclipse/equinox/p2/repository/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository.artifact" href="reference/api/org/eclipse/equinox/p2/repository/artifact/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository.artifact.spi" href="reference/api/org/eclipse/equinox/p2/repository/artifact/spi/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository.metadata" href="reference/api/org/eclipse/equinox/p2/repository/metadata/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository.metadata.spi" href="reference/api/org/eclipse/equinox/p2/repository/metadata/spi/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.repository.spi" href="reference/api/org/eclipse/equinox/p2/repository/spi/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.touchpoint.eclipse.query" href="reference/api/org/eclipse/equinox/p2/touchpoint/eclipse/query/package-summary.html"/>
+      <topic label="org.eclipse.equinox.p2.ui" href="reference/api/org/eclipse/equinox/p2/ui/package-summary.html"/>
       <topic label="org.eclipse.equinox.security.auth" href="reference/api/org/eclipse/equinox/security/auth/package-summary.html"/>
       <topic label="org.eclipse.equinox.security.auth.credentials" href="reference/api/org/eclipse/equinox/security/auth/credentials/package-summary.html"/>
       <topic label="org.eclipse.equinox.security.auth.module" href="reference/api/org/eclipse/equinox/security/auth/module/package-summary.html"/>
@@ -134,9 +157,19 @@
       <topic label="org.eclipse.ltk.ui.refactoring.history" href="reference/api/org/eclipse/ltk/ui/refactoring/history/package-summary.html"/>
       <topic label="org.eclipse.ltk.ui.refactoring.model" href="reference/api/org/eclipse/ltk/ui/refactoring/model/package-summary.html"/>
       <topic label="org.eclipse.ltk.ui.refactoring.resource" href="reference/api/org/eclipse/ltk/ui/refactoring/resource/package-summary.html"/>
+      <topic label="org.eclipse.osgi.framework.console" href="reference/api/org/eclipse/osgi/framework/console/package-summary.html"/>
+      <topic label="org.eclipse.osgi.framework.eventmgr" href="reference/api/org/eclipse/osgi/framework/eventmgr/package-summary.html"/>
+      <topic label="org.eclipse.osgi.framework.log" href="reference/api/org/eclipse/osgi/framework/log/package-summary.html"/>
+      <topic label="org.eclipse.osgi.launch" href="reference/api/org/eclipse/osgi/launch/package-summary.html"/>
       <topic label="org.eclipse.osgi.service.datalocation" href="reference/api/org/eclipse/osgi/service/datalocation/package-summary.html"/>
+      <topic label="org.eclipse.osgi.service.debug" href="reference/api/org/eclipse/osgi/service/debug/package-summary.html"/>
+      <topic label="org.eclipse.osgi.service.environment" href="reference/api/org/eclipse/osgi/service/environment/package-summary.html"/>
+      <topic label="org.eclipse.osgi.service.localization" href="reference/api/org/eclipse/osgi/service/localization/package-summary.html"/>
+      <topic label="org.eclipse.osgi.service.resolver" href="reference/api/org/eclipse/osgi/service/resolver/package-summary.html"/>
+      <topic label="org.eclipse.osgi.service.runnable" href="reference/api/org/eclipse/osgi/service/runnable/package-summary.html"/>
       <topic label="org.eclipse.osgi.service.security" href="reference/api/org/eclipse/osgi/service/security/package-summary.html"/>
       <topic label="org.eclipse.osgi.signedcontent" href="reference/api/org/eclipse/osgi/signedcontent/package-summary.html"/>
+      <topic label="org.eclipse.osgi.storagemanager" href="reference/api/org/eclipse/osgi/storagemanager/package-summary.html"/>
       <topic label="org.eclipse.osgi.util" href="reference/api/org/eclipse/osgi/util/package-summary.html"/>
       <topic label="org.eclipse.search.core.text" href="reference/api/org/eclipse/search/core/text/package-summary.html"/>
       <topic label="org.eclipse.search.ui" href="reference/api/org/eclipse/search/ui/package-summary.html"/>
@@ -246,6 +279,7 @@
       <topic label="org.eclipse.update.operations" href="reference/api/org/eclipse/update/operations/package-summary.html"/>
       <topic label="org.eclipse.update.search" href="reference/api/org/eclipse/update/search/package-summary.html"/>
       <topic label="org.eclipse.update.standalone" href="reference/api/org/eclipse/update/standalone/package-summary.html"/>
+      <topic label="org.apache.felix.scr" href="reference/api/org/apache/felix/scr/package-summary.html"/>
     </topic>
 
 	<topic label="Extension Points Reference" href="reference/extension-points/index.html">
@@ -267,11 +301,15 @@
        <topic label="org.eclipse.core.filesystem.filesystems" href="reference/extension-points/org_eclipse_core_filesystem_filesystems.html"/>
        <topic label="org.eclipse.core.resources.builders" href="reference/extension-points/org_eclipse_core_resources_builders.html"/>
        <topic label="org.eclipse.core.resources.fileModificationValidator" href="reference/extension-points/org_eclipse_core_resources_fileModificationValidator.html"/>
+       <topic label="org.eclipse.core.resources.filterMatchers" href="reference/extension-points/org_eclipse_core_resources_filterMatchers.html"/>
        <topic label="org.eclipse.core.resources.markers" href="reference/extension-points/org_eclipse_core_resources_markers.html"/>
+       <topic label="org.eclipse.core.resources.modelProviders" href="reference/extension-points/org_eclipse_core_resources_modelProviders.html"/>
        <topic label="org.eclipse.core.resources.moveDeleteHook" href="reference/extension-points/org_eclipse_core_resources_moveDeleteHook.html"/>
        <topic label="org.eclipse.core.resources.natures" href="reference/extension-points/org_eclipse_core_resources_natures.html"/>
        <topic label="org.eclipse.core.resources.refreshProviders" href="reference/extension-points/org_eclipse_core_resources_refreshProviders.html"/>
        <topic label="org.eclipse.core.resources.teamHook" href="reference/extension-points/org_eclipse_core_resources_teamHook.html"/>
+       <topic label="org.eclipse.core.resources.variableResolvers" href="reference/extension-points/org_eclipse_core_resources_variableResolvers.html"/>
+       <topic label="org.eclipse.core.resources.filterMatchers" href="reference/extension-points/org_eclipse_core_resources_filterMatchers.html"/>
        <topic label="org.eclipse.core.runtime.adapters" href="reference/extension-points/org_eclipse_core_runtime_adapters.html"/>
        <topic label="org.eclipse.core.runtime.applications" href="reference/extension-points/org_eclipse_core_runtime_applications.html"/>
        <topic label="org.eclipse.core.runtime.contentTypes" href="reference/extension-points/org_eclipse_core_runtime_contentTypes.html"/>
@@ -321,6 +359,8 @@
        <topic label="org.eclipse.equinox.security.secureStorage" href="reference/extension-points/org_eclipse_equinox_security_secureStorage.html"/>
        <topic label="org.eclipse.help.contentExtension" href="reference/extension-points/org_eclipse_help_contentExtension.html"/>
        <topic label="org.eclipse.help.contentProducer" href="reference/extension-points/org_eclipse_help_contentProducer.html"/>
+       <topic label="org.eclipse.help.criteriaDefinition" href="reference/extension-points/org_eclipse_help_criteriaDefinition.html"/>
+       <topic label="org.eclipse.help.criteriaProvider" href="reference/extension-points/org_eclipse_help_criteriaProvider.html"/>
        <topic label="org.eclipse.help.contexts" href="reference/extension-points/org_eclipse_help_contexts.html"/>
        <topic label="org.eclipse.help.index" href="reference/extension-points/org_eclipse_help_index.html"/>
        <topic label="org.eclipse.help.toc" href="reference/extension-points/org_eclipse_help_toc.html"/>
@@ -328,9 +368,14 @@
        <topic label="org.eclipse.help.base.browser" href="reference/extension-points/org_eclipse_help_base_browser.html"/>
        <topic label="org.eclipse.help.base.luceneAnalyzer" href="reference/extension-points/org_eclipse_help_base_luceneAnalyzer.html"/>
        <topic label="org.eclipse.help.base.luceneSearchParticipants" href="reference/extension-points/org_eclipse_help_base_luceneSearchParticipants.html"/>
+       <topic label="org.eclipse.help.base.searchParticipant" href="reference/extension-points/org_eclipse_help_base_searchParticipant.html"/>
        <topic label="org.eclipse.help.base.server" href="reference/extension-points/org_eclipse_help_base_server.html"/>
+       <topic label="org.eclipse.help.base.scope" href="reference/extension-points/org_eclipse_help_base_scope.html"/>
        <topic label="org.eclipse.help.ui.searchEngine" href="reference/extension-points/org_eclipse_help_ui_searchEngine.html"/>
        <topic label="org.eclipse.help.webapp.contentFilter" href="reference/extension-points/org_eclipse_help_webapp_contentFilter.html"/>
+       <topic label="org.eclipse.help.webapp.frame" href="reference/extension-points/org_eclipse_help_webapp_frame.html"/>
+       <topic label="org.eclipse.help.webapp.toolbarButton" href="reference/extension-points/org_eclipse_help_webapp_toolbarButton.html"/>
+       <topic label="org.eclipse.help.webapp.view" href="reference/extension-points/org_eclipse_help_webapp_view.html"/>
        <topic label="org.eclipse.ltk.core.refactoring.copyParticipants" href="reference/extension-points/org_eclipse_ltk_core_refactoring_copyParticipants.html"/>
        <topic label="org.eclipse.ltk.core.refactoring.createParticipants" href="reference/extension-points/org_eclipse_ltk_core_refactoring_createParticipants.html"/>
        <topic label="org.eclipse.ltk.core.refactoring.deleteParticipants" href="reference/extension-points/org_eclipse_ltk_core_refactoring_deleteParticipants.html"/>
@@ -413,7 +458,9 @@
        <topic label="org.eclipse.ui.preferencePages" href="reference/extension-points/org_eclipse_ui_preferencePages.html"/>
        <topic label="org.eclipse.ui.preferenceTransfer" href="reference/extension-points/org_eclipse_ui_preferenceTransfer.html"/>
        <topic label="org.eclipse.ui.presentationFactories" href="reference/extension-points/org_eclipse_ui_presentationFactories.html"/>
+       <topic label="org.eclipse.ui.propertiesView" href="reference/extension-points/org_eclipse_ui_propertiesView.html"/>
        <topic label="org.eclipse.ui.propertyPages" href="reference/extension-points/org_eclipse_ui_propertyPages.html"/>
+       <topic label="org.eclipse.ui.services" href="reference/extension-points/org_eclipse_ui_services.html"/>
        <topic label="org.eclipse.ui.splashHandlers" href="reference/extension-points/org_eclipse_ui_splashHandlers.html"/>
        <topic label="org.eclipse.ui.startup" href="reference/extension-points/org_eclipse_ui_startup.html"/>
        <topic label="org.eclipse.ui.statusHandlers" href="reference/extension-points/org_eclipse_ui_statusHandlers.html"/>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/blockselection.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/blockselection.png
deleted file mode 100644
index e0e9b68..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/blockselection.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/browserclose.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/browserclose.png
new file mode 100644
index 0000000..5de069c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/browserclose.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/button-order.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/button-order.png
deleted file mode 100644
index f55c0be..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/button-order.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cairoaix.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cairoaix.png
deleted file mode 100644
index 809e361..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cairoaix.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cocoartl.PNG b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cocoartl.PNG
new file mode 100644
index 0000000..fb0d40c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/cocoartl.PNG differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/datetime-dropdown.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/datetime-dropdown.png
deleted file mode 100644
index 83cf860..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/datetime-dropdown.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/dnd.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/dnd.png
deleted file mode 100644
index f7f7ae2..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/dnd.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/editor.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/editor.png
deleted file mode 100644
index 6600d0d..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/editor.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/filtered-tree.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/filtered-tree.png
deleted file mode 100644
index a3feda3..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/filtered-tree.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/footer.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/footer.png
new file mode 100644
index 0000000..6558b14
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/footer.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/injection_graph_func.js b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/injection_graph_func.js
deleted file mode 100644
index 7216ce4..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/injection_graph_func.js
+++ /dev/null
@@ -1,463 +0,0 @@
-var skype_injection_path = 'chrome://skype_ff_toolbar_win/content/';
-var skype_tool = null;
-
-/*window.addEventListener("click",skype_click_handler,true);
-function skype_click_handler(event)
-{
-	if (skype_tool)
-		skype_tool.closemenu();
-	//HideSkypeMenuFull();
-} */
-
-//CALL BUTTON
-var SkypeActiveCallButtonPart = 0;
-function SkypeSetCallButtonPart(obj)
-{
-	if (obj.getAttribute('id') == '__skype_highlight_id_left')
-	{
-		SkypeActiveCallButtonPart = 0;
-	}
-	else if (obj.getAttribute('id') == '__skype_highlight_id_right')
-	{
-		SkypeActiveCallButtonPart = 1;
-	}
-}
-
-function SkypeSetCallButton(obj, hl, isInternational, isFax)
-{
-	var cb_part_l = null;
-	var cb_part_ml = null;
-	var cb_part_mr = null;
-	var cb_part_r = null;
-	if (obj.getAttribute('rtl') == 'false')
-	{
-		cb_part_l = obj.firstChild.firstChild;
-		cb_part_ml = obj.firstChild.lastChild;
-		cb_part_mr = obj.lastChild.firstChild;
-		cb_part_r = obj.lastChild.lastChild;
-
-		cb_flag = obj.firstChild.lastChild.firstChild;
-		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
-			cb_flag = null;
-	}
-	else
-	{
-		cb_part_l = obj.lastChild.lastChild;
-		cb_part_ml = obj.lastChild.firstChild;
-		cb_part_mr = obj.firstChild.lastChild;
-		cb_part_r = obj.firstChild.firstChild;
-
-		cb_flag = obj.lastChild.firstChild.lastChild;
-		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
-			cb_flag = null;
-	}
-
-	if (hl == 1)
-	{
-		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_l.gif')";
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";
-		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";
-
-
-		if (isInternational == "0")
-		{
-			if (SkypeActiveCallButtonPart == 0)    //left
-			{
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseonflag_r"+(isFax?"_fax":"")+".gif')";
-				//shadow
-				if (cb_flag)
-				{
-					cb_flag.style.top = '1px';
-					cb_flag.style.left = '1px';
-					/*top right bottom left*/
-					cb_flag.style.padding = '1px 0px 0px 1px';//'2px 0px 0px 0px';
-				}
-			}
-			else                            //right
-			{
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
-				//flag
-				if (cb_flag)
-				{
-					cb_flag.style.top = '0px';
-					cb_flag.style.left = '0px';
-					cb_flag.style.padding = '0px 1px 1px 0px';//'0px 1px 1px 0px';
-					cb_flag.style.margin = '0px 0px 2px 0px;';
-				}
-			}
-		}
-		else
-		{
-			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
-			//flag
-			if (cb_flag)
-			{
-				cb_flag.style.top = '0px';
-				cb_flag.style.left = '0px';
-				cb_flag.style.padding = '0px 1px 1px 0px';
-				cb_flag.style.margin = '0px 0px 2px 0px;';
-			}
-		}
-	}
-	else
-	{
-		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_l.gif')";
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
-		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
-		cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_r"+(isFax?"_fax":"")+".gif')";
-
-		//flag
-		if (cb_flag)
-		{
-			cb_flag.style.top = '0px';
-			cb_flag.left = '0px';
-			cb_flag.style.padding = '0px 1px 1px 0px';
-			cb_flag.style.margin = '0px 0px 2px 0px;';
-		}
-	}
-}
-var skype_cb_l = '';
-var skype_cb_m = '';
-var skype_cb_r = '';
-
-function SkypeSetCallButtonPressed(obj, pr, isInternational, isFax)
-{
-	var cb_part_l = null;
-	var cb_part_ml = null;
-	var cb_part_mr = null;
-	var cb_part_r = null;
-	if (obj.getAttribute('rtl') == 'false')
-	{
-		cb_part_l = obj.firstChild.firstChild;
-		cb_part_ml = obj.firstChild.lastChild;
-		cb_part_mr = obj.lastChild.firstChild;
-		cb_part_r = obj.lastChild.lastChild;
-
-		cb_flag = obj.firstChild.lastChild.firstChild;
-		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
-			cb_flag = null;
-	}
-	else
-	{
-		cb_part_l = obj.lastChild.lastChild;
-		cb_part_ml = obj.lastChild.firstChild;
-		cb_part_mr = obj.firstChild.lastChild;
-		cb_part_r = obj.firstChild.firstChild;
-
-		cb_flag = obj.lastChild.firstChild.lastChild;
-		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
-			cb_flag = null;
-	}
-	if (pr == 1)
-	{
-		skype_cb_l = cb_part_l.style.backgroundImage;//getAttribute('src');
-		skype_cb_m = cb_part_mr.style.backgroundImage;
-		skype_cb_r = cb_part_r.style.backgroundImage;//getAttribute('src');
-
-		if (isInternational == "0")
-		{
-			if (SkypeActiveCallButtonPart == 0)    //left
-			{
-				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-				if (cb_part_l.isSameNode(cb_part_ml) != true)
-					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-			}
-			else                            //right
-			{
-				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-				if (cb_part_l.isSameNode(cb_part_ml) != true)
-					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
-			}
-		}
-		else
-		{
-			//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-			cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-			if (cb_part_l.isSameNode(cb_part_ml) != true)
-				cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-			cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
-			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
-		}
-	}
-	else
-	{
-		//obj.firstChild.firstChild.setAttribute('src', skype_cb_l);
-		cb_part_l.style.backgroundImage = skype_cb_l;
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = skype_cb_m;
-		cb_part_mr.style.backgroundImage = skype_cb_m;
-		//obj.lastChild.lastChild.setAttribute('src', skype_cb_r);
-		cb_part_r.style.backgroundImage = skype_cb_r;
-	}
-}
-
-//COMMANDS
-function SkypeToolBarInit(tb)
-{
-	skype_tool = tb;
-}
-
-function doRunCMDSkype(event, link, id, name)
-{
-	if (skype_tool)
-	{
-		if (link == 'chdial')
-		{
-			var obj=event.originalTarget;
-			if (!obj)
-				obj=event;
-
-			/*var brd=SkypeGetBounds(obj);
-		   var docelem = document.documentElement;
-		   if ((docelem.scrollTop == 0 && document.body.scrollTop != 0) || (docelem.scrollLeft == 0 && document.body.scrollLeft != 0))
-			   docelem=document.body;
-   
-		   scrollY=docelem.scrollTop;
-		   scrollX=docelem.scrollLeft;
-   
-		   var my=brd.top+16, mx=brd.left;/*brd.height*/
-
-			//var oDoc = obj.ownerDocument;
-
-			/*var obj2 = document.getBoxObjectFor(element);
-   
-		   var html_box = new XPCNativeWrapper(obj2).wrappedJSObject;
-		   if (!html_box)
-			 html_box = obj2;
-   
-		   var screenX = html_box.screenX;
-		   var screenY = html_box.screenY;
-			   */
-
-			SkypeFlagColor='rgb(184, 203, 255)';
-			skype_tool.chprefix(id, document, obj, screenY);
-		}
-		else if (link == 'copy')
-			skype_tool.copy_num(id, document);
-		else if (link == 'sms')
-			skype_tool.sms(id);
-		else if (link == 'add')
-			skype_tool.add(id, name);
-		else
-			skype_tool.call(id);
-	}
-}
-
-function runCMDSkype(link)
-{
-	HideSkypeFull();
-	doRunCMDSkype(null, link, skype_curid, skype_cur_name);
-}
-
-//FLAG TOOLTIP
-function HideSkypeFull()
-{
-	//   skype_active=false;
-	document.getElementById('skype_dc').style.visibility = "hidden";
-}
-
-function ShowSkype(event, title)
-{
-	//  skype_active=true;
-	DoShowSkype(event.pageX, event.pageY + 20, title);
-}
-
-function DoShowSkype(cX, cY, title)
-{
-	var menu = document.getElementById('skype_dc');
-	menu.firstChild.nodeValue = title;
-	menu.style.visibility = "visible";
-
-	menu.style.left = cX + 'px';
-	menu.style.top = cY + 'px';
-
-}
-var SkypeFlagColor = 'rgb(184, 203, 255)';
-function doSkypeFlag(obj, brd)
-{
-	SkypeFlagColor = brd;
-}
-
-//MENU
-var skype_curid = 0,skype_active = false,skype_showseed = 0,skype_ctm = 0,skype_cur_name = '';
-var skype_curbutton = null;
-function SkypeCheckCallButton(obj)
-{
-	var res = false;
-	if (skype_curbutton && skype_curbutton.isSameNode(obj) == true)
-		res = true;
-
-	skype_curbutton = obj;
-	return res;
-}
-
-function HideSkypeMenu()
-{                       //skype_tool.sd('HideSkypeMenu skype_active='+skype_active);
-	if (!skype_active)
-		HideSkypeMenuFull();
-	else
-		setTimeout("HideSkypeMenu()", 1000);
-}
-
-function HideSkypeMenu2(event)
-{
-	skype_showseed = 0;
-	if (!skype_active)
-		HideSkypeMenuFull();
-	else
-	{
-		skype_active = false;
-		setTimeout("HideSkypeMenu()", 1000);
-	}
-}
-
-function HideSkypeMenuFull()
-{                                 //skype_tool.sd('HideSkypeMenuFull skype_active='+skype_active);
-	/*   skype_active=false;
-	document.getElementById('skype_menu').style.visibility="hidden";*/
-}
-
-function CheckSkype()
-{
-	skype_active = true;
-}
-
-function ShowSkypeMenu(event, call_msg, id, callto, isMobile, name, x, y)
-{
-	try {
-		/*  	skype_active=true;       						//skype_tool.sd('ShowSkypeMenu skype_curid='+skype_curid+'   callto='+callto+'  id='+id);
-		if(document.getElementById('skype_menu').style.visibility!="hidden" && skype_curid==callto)//id
-		  return;
-		skype_showseed=Math.random();
-		clearTimeout(skype_ctm);
-	  var obj=event.originalTarget;
-	  if (!obj)
-		  obj=event;
-  //  	var brd=SkypeGetBounds(obj);
-		//var pcx=brd.left, pcy=brd.top+16;/*brd.height;* /   //alert(pcx+'--'+pcy);
-  
-	  scrolls=SkypeGetDivScroll(obj);
-  
-		var pcx = x+scrolls.left, pcy = y+scrolls.top;
-  
-		skype_ctm=setTimeout('DoShowSkypeMenu(\''+call_msg+'\','+skype_showseed+',"'+callto+'",'+pcx+','+pcy+','+isMobile+',"'+name+'")',0);*/
-	} catch(e) {
-	}
-}
-
-function DoShowSkypeMenu(call_msg, seed, callto, pcx, pcy, isMobile, name)
-{
-	try {                                                        //skype_tool.sd('DoShowSkypeMenu seed='+seed+'   skype_showseed='+skype_showseed);
-		/*  	if(seed!=skype_showseed)
-		  return;
-		skype_showseed=0;
-		skype_curid=callto;
-	  skype_cur_name=name;
-		var menu=document.getElementById('skype_menu');
-  
-		var my=pcy, mx=pcx;
-  
-	  var menubox=document.getBoxObjectFor(menu);
-	  //var docelem = document.documentElement;
-									//alert(menubox.height);
-									//alert('doc h='+document.height + ' y='+my+' menu h='+menubox.height);
-	  var docH=document.height;
-	  if (docH < document.documentElement.clientHeight) docH=document.documentElement.clientHeight;
-	  if (docH < document.documentElement.scrollHeight) docH=document.documentElement.scrollHeight;
-	  if (docH < document.body.clientHeight) docH=document.body.clientHeight;
-	  if (docH < document.body.scrollHeight) docH=document.body.scrollHeight;
-	  if ((my + menubox.height) > docH)
-		  my=my - 16 - menubox.height;
-	  if (my < 0) my=0;
-  //    if (document.height != 0 && (my + menubox.height) > document.height && (my + menubox.height) > document.documentElement.scrollHeight)//docelem.clientHeight)
-		  //my=document.height - menubox.height;
-  
-	  var docW=document.width;
-	  if (docW < document.documentElement.clientWidth) docW=document.documentElement.clientWidth;
-	  if (docW < document.documentElement.scrollWidth) docW=document.documentElement.scrollWidth;
-	  if (docW < document.body.clientWidth) docW=document.body.clientWidth;
-	  if (docW < document.body.scrollWidth) docW=document.body.scrollWidth;
-	  if ((mx + menubox.width) > docW)
-		  mx=document.width - menubox.width;
-	  if (mx < 0) mx=0;
-  //	if (document.width != 0 && (mx + menubox.width) > document.width && (mx + menubox.width) > document.documentElement.scrollWidth)//docelem.clientWidth)
-  
-		menu.style.left=mx+'px';
-		menu.style.top=my+'px';
-  
-	  skype_tool.doFixMenu(menu, isMobile, document);
-  
-	  menu.style.visibility="visible";  */
-	} catch(e) {
-	}
-}
-
-function SkypeSetBgColor(obj, color)
-{
-	try {
-		obj.lastChild.style.backgroundColor = color;
-	} catch(e) {
-	}
-}
-
-//UTIL
-function SkypeGetBounds(element)
-{
-	try {
-		var left = element.left;
-		var top = element.top;
-		while (!(element.tagName.toLowerCase() == 'span' && element.getAttribute('id') == '__skype_highlight_id'))
-		{
-			element = element.parentNode;
-		}
-		left = element.offsetLeft;
-		top = element.offsetTop;
-		for (var parent = element.offsetParent; parent; parent = parent.offsetParent)
-		{
-			left += parent.offsetLeft;
-			top += parent.offsetTop;
-			if (parent.tagName.toLowerCase() == 'div')
-			{
-				left -= parent.scrollLeft;
-				top -= parent.scrollTop;
-			}
-		}
-
-
-		return {left: left, top: top, width: element.offsetWidth, height: element.offsetHeight};
-	} catch(e) {
-	}
-}
-
-function SkypeGetDivScroll(element)
-{
-	try {
-		var left = 0;
-		var top = 0;
-		while (!(element.tagName.toLowerCase() == 'span' && element.getAttribute('id') == '__skype_highlight_id'))
-		{
-			element = element.parentNode;
-		}
-
-		for (var parent = element.offsetParent; parent; parent = parent.offsetParent)
-		{
-			if (parent.tagName.toLowerCase() == 'div')
-			{
-				left -= parent.scrollLeft;
-				top -= parent.scrollTop;
-			}
-		}
-
-
-		return {left: left, top: top};
-	} catch(e) {
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/jnigen.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/jnigen.png
deleted file mode 100644
index 6dd493f..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/jnigen.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/link.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/link.png
deleted file mode 100644
index 952fce1..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/link.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/margins.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/margins.png
deleted file mode 100644
index e42745f..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/margins.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-mac.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-mac.png
new file mode 100644
index 0000000..f0c6717
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-mac.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-win32.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-win32.png
new file mode 100644
index 0000000..e18465a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/menu-win32.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/modified.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/modified.png
deleted file mode 100644
index f43bcbe..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/modified.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/multi-font-labels.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/multi-font-labels.png
deleted file mode 100644
index 430ecac..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/multi-font-labels.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/nautiluscopy.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/nautiluscopy.png
deleted file mode 100644
index bd491da..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/nautiluscopy.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newctab.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newctab.png
new file mode 100644
index 0000000..5fd4a5a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newctab.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newscope.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newscope.png
new file mode 100644
index 0000000..29f3e70
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/newscope.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlayimage.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlayimage.png
new file mode 100644
index 0000000..1ac7f99
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlayimage.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlaytext.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlaytext.png
new file mode 100644
index 0000000..b888539
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/overlaytext.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/printdialog.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/printdialog.png
deleted file mode 100644
index e72548f..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/printdialog.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/progress.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/progress.png
new file mode 100644
index 0000000..4abb309
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/progress.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/rss.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/rss.png
new file mode 100644
index 0000000..6ebc35c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/rss.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/search.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/search.png
deleted file mode 100644
index bbd6eee..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/search.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/see.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/see.png
new file mode 100644
index 0000000..2beb87a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/see.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/segments-chars.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/segments-chars.png
new file mode 100644
index 0000000..c29ea11
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/segments-chars.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet-prompt.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet-prompt.png
deleted file mode 100644
index ca022e8..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet-prompt.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet.png
deleted file mode 100644
index 26ca3d7..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sheet.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/showwelcome.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/showwelcome.png
deleted file mode 100644
index b5e3d16..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/showwelcome.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-intro.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-intro.png
deleted file mode 100644
index 2d6d150..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-intro.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-overview.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-overview.png
deleted file mode 100644
index b1d51e4..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/slate-overview.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/solarisx86-browser.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/solarisx86-browser.png
deleted file mode 100644
index 7495671..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/solarisx86-browser.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sttabs.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sttabs.png
new file mode 100644
index 0000000..367a814
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/sttabs.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/tablednd.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/tablednd.png
new file mode 100644
index 0000000..293dd5c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/tablednd.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/text_search.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/text_search.png
new file mode 100644
index 0000000..09a9e4e
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/text_search.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout1.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout1.png
deleted file mode 100644
index c74901a..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout1.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout2.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout2.png
deleted file mode 100644
index addd05e..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/uiabout2.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/variable-tab-stops.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/variable-tab-stops.png
new file mode 100644
index 0000000..e8248b2
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/variable-tab-stops.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webappextn.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webappextn.png
new file mode 100644
index 0000000..b252810
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webappextn.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webkitgtk.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webkitgtk.png
new file mode 100644
index 0000000..ef51c49
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/webkitgtk.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/wrap-indent.png b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/wrap-indent.png
new file mode 100644
index 0000000..8ae6df1
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/images/wrap-indent.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew.html b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew.html
index 59ecbe6..be8e6ed 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.isv/whatsNew/platform_isv_whatsnew.html
@@ -1,25 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) Eclipse contributors and others 2009. This page is made available under license. For full details, see the LEGAL section in the documentation that contains this page.">
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" href="../book.css"  type="text/css">
+<meta name="copyright" content="Copyright (c) Eclipse contributors and others 2010. This page is made available under license. For full details, see the LEGAL section in the documentation that contains this page."/>
+<meta http-equiv="Content-Language" content="en-us"/>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<link rel="STYLESHEET" href="../book.css"  type="text/css"/>
 <style type="text/css">
 td {border-top: solid thin black;}
 img[alt] {background-color:#ffdddd;}
 tr {vertical-align: top;}
 </style>
-<title>Eclipse Platform What's New in 3.5</title>
+<title>Eclipse Platform What's New in 3.6</title>
 </head>
 
 <body>
 
-<h1>What's New in 3.5</h1>
+<h1>What's New in 3.6</h1>
 
 <p>Here are descriptions of some of the changes of interest to plug-in developers
 made to the Eclipse <a href="#Platform">Platform</a>, <a href="#Equinox">Equinox</a> and
-<a href="#SWT">SWT</a> for the 3.5 release of Eclipse.</p>
+<a href="#SWT">SWT</a> for the 3.6 release of Eclipse.</p>
 
 <p>
 There are also many new features oriented towards end-users of the platform
@@ -31,8 +31,8 @@ section of the Workbench User Guide.
 <!-- ****************** START OF N&N TABLE ****************** -->
 <table cellpadding="10" cellspacing="0" width="600">
   <colgroup>
-  <col width="20%">
-  <col width="80%">
+  <col width="20%"/>
+  <col width="80%"/>
   </colgroup>
   <tbody>
 
@@ -44,530 +44,481 @@ section of the Workbench User Guide.
 </td>
 </tr>
 
-  <tr id="added-ds">
-    <td width="30%" valign="top" align="left"><b>Declarative services added to the platform</b></td>
-    <td width="70%" valign="top">The Eclipse rich client platform now includes an implementation 
-    of OSGi declarative services (DS). This allows a lazy-starting plug-in to make OSGi services available
-    to other plug-ins before it has been started. Finally the powerful OSGi dynamic service architecture
-    can be fully exploited in the Eclipse world of lazy activation. DS also includes support for
-    dependency injection, so services can be injected into plain old Java objects (POJOs),
-    without adding a dependency on the OSGi framework into your application code. This
-    new platform bundle is complemented by new tooling support in PDE for declarative services.
+  <tr id="test-framework-junit4"> 
+    <td width="30%" valign="top" align="left">
+      <b>Platform test framework support for JUnit 4</b>
+    </td>
+    <td width="70%" valign="top">
+      The platform's automated testing framework now supports running tests with JUnit 4.
+      The test framework previously only allowed running with JUnit version 3.
     </td>
   </tr>
 
-    <TR id="comparePlugin">
-      <TD vAlign=top align=left width="30%"><B>Compare Core Plug-in</B></TD>
-      <TD vAlign=top width="70%">Some of the patching functionality provided
-        by the compare plug-in has been refactored into a separate <code>org.eclipse.compare.core</code> plug-in
-        that can be used by headless Eclipse applications</TD>
-    </TR>
+  <tr id="headless-ext-tools">
+    <td width="30%" valign="top" align="left"><b>Headless external tool builders</b></td>
+    <td width="70%" valign="top">
+    	Launching support for Ant and external tools is provided by the new headless plug-ins
+    	<code>org.eclipse.ant.launching</code> and <code>org.eclipse.core.externaltools</code>.
+    	This allows applications without a user interface to leverage the launch support programmatically
+    	and it allows projects configured with external tool builders to be built in headless
+    	environments.
+    </td>
+   </tr>
+
+  <tr id="equinox.event.admin">
+    <td width="30%" valign="top" align="left"><b>Event admin added</b></td>
+    <td width="70%" valign="top">The OSGi event admin specification provides 
+        a general purpose event bus for posting and sending events to event 
+        handlers.  The Equinox event admin implementation has been 
+        added to the platform feature.</td>
+  </tr>
+
+  <tr id="webappextension">
+    <td width="30%" valign="top" align="left"><b>Help UI extensibility</b></td>
+    <td width="70%" valign="top">New extension points allow additional buttons and 
+    frames to be added to the help web application. In the image below the title search frame, 
+    the rightmost button and the frame below the content page are all contributed.
+      <p><img src="images/webappextn.png" alt="Help webapp showing extensions" /></p>
+    </td>
+  </tr>
 
-  <tr id="filteredtree">
-    <td width="30%" valign="top" align="left"><b>Improved look for filtered tree</b></td>
-    <td width="70%" valign="top">The button for clearing the filter field of filtered trees has
-     been moved into the text box, even for platforms that don't have a native search field with
-     this functionality. 
-     <p>For backwards compatibility reasons, existing subclasses of <code>FilteredTree</code>
-     will not get the new look automatically. Clients of the <code>FilteredTree</code> 
-     are encouraged to switch to the new look as recommended in the 
-     <a href="../porting/3.5/recommended.html#NewFilteredTreeLook">porting guide</a>.</p>  
-     <p><img src="images/filtered-tree.png" alt="New look of filter field"></p>
+  <tr id="helpfooter">
+    <td width="30%" valign="top" align="left"><b>Customizable help footer</b></td>
+    <td width="70%" valign="top"><p>The customization <tt>org.eclipse.help.base/footer</tt> allows
+    a footer to be added to the Eclipse help system. This can be used for infocenters or 
+    in Eclipse-based products.</p>
+      <p><img src="images/footer.png" alt="Eclipse Help showing footer" />.</p>
     </td>
   </tr>
 
-  <tr id="multifontlabels">
-    <td width="30%" valign="top" align="left"><b>Multiple fonts in one cell</b></td>
-    <td width="70%" valign="top">The existing owner draw support for JFace <code>TableViewer</code> and
-    <code>TreeViewer</code> has been extended to allow multiple fonts within cells. For example, this can be used to
-    highlight matching text in search results using a bold font.
-      <p><img src="images/multi-font-labels.png" alt="Table with normal and bold font within the same cells"></p>
+  <tr id="help-scoping-criteria">
+    <td width="30%" valign="top" align="left"><b>Scoping by criteria in help system</b></td>
+    <td width="70%" valign="top">The help web application now allows the table of contents, the 
+		index and the search results to be filtered by book/topic or by criteria. Criteria are defined in 
+		the table of contents or using the extension point <tt>org.eclipse.help.criteriaDefinition</tt>. The list of 
+		displayed criteria is defined at the product level. Products which do not define criteria (including 
+		the Eclipse SDK) will not show any UI for criteria.
+      <p><img src="images/newscope.png" alt="Scope dialog showing criteria." /></p>
     </td>
   </tr>
 
-  <tr id="sheets">
-    <td width="30%" valign="top" align="left"><b>Using sheets on Mac Cocoa</b></td>
-    <td width="70%" valign="top">For general prompts and dialogs regarding editors, or
-    the current Workbench window, sheets are now used on Mac Cocoa. In addition to the 
-    new style bit <code>SWT.SHEET</code>, new API has been added to <code>MessageDialog</code> 
-    and <code>MessageDialogWithToggle</code> so that clients can set the appropriate style for their dialogs.
-      <p><img src="images/sheet-prompt.png" alt="Prompting to save using a sheet" ></p>
-  </td>
+  <tr id="helpsort">
+    <td width="30%" valign="top" align="left"><b>Sorting help topics</b></td>
+    <td width="70%" valign="top">A new attribute "sort" has been added to the <toc> and
+    <topic> elements in a table of contents which causes subtopics to be sorted alphabetically when 
+    the value is set to "true".</td>
   </tr>
 
-  <tr id="jface-button-order">
-    <td width="30%" valign="top" align="left"><b>JFace dialog button order on GTK+</b></td>
-    <td width="70%" valign="top">JFace dialogs now respect the default button
-    order on the GTK+ platform.  Example: "Cancel" "OK".  It is possible to revert
-    the order used by SWT and JFace, see
-    <a href="../../org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html#buttonorder">Alternate button order</a>.
-    <p><img src="images/button-order.png" alt="Preference Dialog showing Cancel, OK"></p>
+  <tr id="rsswidget">
+    <td width="30%" valign="top" align="left"><b>Reusable intro news reader</b></td>
+    <td width="70%" valign="top">The <tt>EclipseRSSViewer</tt> class allows multiple RSS news readers to
+be easily added to an intro page.
+      <p><img src="images/rss.png" alt="RSS reader on Intro page" /></p>
     </td>
   </tr>
 
-  <tr id="checkstateprovider">
-    <td width="30%" valign="top" align="left"><b>New "check state" provider</b></td>
-    <td width="70%" valign="top">
-      JFace now has a new type of provider, called <code>ICheckStateProvider</code>, that can be used to
-      manage the checked and gray states of elements in <code>CheckboxTableViewer</code> or <code>CheckboxTreeViewer</code>
-      objects. This is useful in situations where the viewer should come up with pre-checked
-      elements, or when the check state changes are not always triggered by the user.
+
+  <tr id="see">
+    <td width="30%" valign="top" align="left"><b>See entries in keyword index</b></td>
+    <td width="70%" valign="top">See entries can now be added to the help system keyword index.
+      <p><img src="images/see.png" alt="Help webapp showing extensions" /></p>
     </td>
   </tr>
 
-  <tr id="showWelcomeCheckbox">
-    <td width="30%" valign="top" align="left"><b>Show welcome checkbox</b></td>
-    <td width="70%" valign="top">A checkbox can be added to a welcome page that will cause the 
-      welcome to show when Eclipse is restarted, even if it was closed previously. The 
-      unextended Eclipse platform does not show this checkbox, but it can be added using 
-      an intro extension that uses the class <code>AlwaysWelcomeCheckbox</code> as a content provider.
-      <p>The example below shows this checkbox added to the <b>What's New</b> page.</p>
-      <p> <img src="images/showwelcome.png" alt="Show Welcome checkbox"></p>
-     </td>
+  <tr id="helpsearchprovider">
+    <td width="30%" valign="top" align="left"><b>Extension point  for help search</b></td>
+    <td width="70%" valign="top">A new extension point <tt>org.eclipse.help.base.searchParticipant</tt>
+    has been added. This allows clients to add documents not in the html or xhtml format to the search
+    index used by the help system. This should be used in place of the deprecated extension point 
+    <tt>org.eclipse.help.base.luceneSearchParticipants</tt> which is not binary compatible across Lucene versions.	  
+	</td>
   </tr>
 
-  <tr id="helpContentFilter">
-    <td width="30%" valign="top" align="left"><b>Help content filter</b></td>
-    <td width="70%" valign="top">A new extension point <code>org.eclipse.help.webapp.contentFilter</code> 
-    allows for pre-processing of help content before it is delivered from the help server.</td>
-  </tr>
+<!-- ******************** Equinox ********************** -->
+<tr>
+<td colspan="2"><a name="Equinox"></a>
+<div style="font-size: 20px; font-weight: bold;">Equinox Changes</div>
+</td>
+</tr>
 
-   <tr id="jetty">
-    <td width="30%" valign="top" align="left"><b>Jetty version 6.1</b></td>
-    <td width="70%" valign="top">Version 6.1 of the <a href="http://www.mortbay.org/jetty/">Jetty</a> Web server is now included in the platform,
-    replacing the 5.1 version in the previous release. This brings along an implementation
-    of version 2.5 of the <code>javax.servlet</code> API, replacing the 2.4 version in the Ganymede release.
+  <tr id="multi-locale-registry"> 
+    <td width="30%" valign="top" align="left"><b>Multi-locale support in extension registry</b></td>
+    <td width="70%" valign="top">The Equinox extension registry now supports running
+    in a multi-locale mode. When running in this mode, translated extension attributes can be
+    obtained for any locale, whereas they were previously only available for the system's
+    current locale. Multi-locale mode is enabled via the <tt>-registryMultiLanguage</tt>
+    command line argument, or by setting the Java system property <tt>eclipse.registry.MultiLanguage=true</tt>.
+    <p>
+    The registry also uses a new <tt>LocaleProvider</tt> service for
+    obtaining the locale for a given execution context. This allows a system to provide
+    an alternative mechanism for computing the current locale, rather than using the
+    singleton locale defined by the Java runtime environment.
+    </p>
     </td>
   </tr>
 
-  <tr id="new-icu4j">
-    <td valign="top" align="left"><b>New release of ICU4J</b></td>
-    <td valign="top">The platform has adopted a major new release of the
-    <a href="http://icu-project.org/">ICU4J</a> localization library: version 4.0. This
-    release includes support for Unicode 5.1, and the Unicode standard 
-    <a href="http://www.unicode.org/press/pr-cldr1.6.html">Common Locale Data Repository (CLDR) 1.6</a>
-    See the ICU4J 4.0 <a href="http://icu-project.org/download/4.0.html">release notes</a> for more details.
+  <tr id="equinox.weaving">
+    <td width="30%" valign="top" align="left"><b>New Equinox weaving feature</b></td>
+    <td width="70%" valign="top">The byte code weaving work in the Equinox incubator has passed the 
+        graduation review and the major parts of the work are now part of the Equinox distribution.
+      <p>Equinox Weaving provides a general infrastructure for load-time byte code 
+        weaving for the Equinox OSGi runtime. Currently Equinox Weaving includes 
+        a weaver for AspectJ to load-time weave aspects into bundles (AspectJ Development Tools and 
+        the Scala IDE for Eclipse already use this to realize deeper integration 
+        with the Eclipse Java development tools, for example).</p>
+      <p>These four bundles are contained in the distribution:</p>
+      <ul>
+        <li><tt>org.eclipse.equinox.weaving.hook:</tt> The framework extension project 
+          containing the hooks to insert byte code weaving and caching at 
+          load-time.</li>
+        <li><tt>org.eclipse.equinox.weaving.aspectj:</tt> Contains the bridge to use 
+          AspectJ as load-time weaving implementation.</li>
+        <li><tt>org.eclipse.equinox.weaving.caching:</tt> Provides caching for woven 
+          byte code for standard Java virtual machines.</li>
+        <li><tt>org.eclipse.equinox.weaving.caching.j9:</tt> Contains an alternative 
+          cache implementation that uses IBM J9 VM shared classes for caching woven 
+          classes.</li>
+      </ul>
     </td>
   </tr>
 
-  <tr id="extensible-about">
-    <td width="30%" valign="top" align="left"><b>Extensible installation details</b></td>
-    <td width="70%" valign="top">The <b>About Dialog</b> now provides a mechanism for plug-ins to 
-       contribute <b>installation pages</b> to the platform about dialog.  The buttons for showing feature, 
-       plug-in, and configuration details have been replaced by a single <b>Installation Details</b> button.
-       <p> <img src="images/uiabout1.png" alt="About Dialog with Installation Details button" title="About Dialog"></p>
-       <p>Pushing this button will launch a dialog that shows all of the installation pages contributed by
-       plug-ins in a single <b>Installation Details</b> dialog.  Plug-ins may contribute installation pages and
-       define buttons that operate on the information in the installation page.</p>
-       <p> <img src="images/uiabout2.png" alt="Installation Details dialog showing contributions from multiple plug-ins" title="Installation Details Dialog"></p>
-       <p>The new extension point is <b>org.eclipse.platform.ui.installationPages</b>.  Example implementations
-       can be found by browsing the hierarchy of <b>org.eclipse.ui.about.InstallationPage</b>.</p>
+  <tr id="equinox.console">
+    <td width="30%" valign="top" align="left"><b>Multi-session Equinox console</b></td>
+    <td width="70%" valign="top">The Equinox console has been enhanced to 
+        allow multiple console sessions to be connected.  Previous versions of the 
+        Equinox console would only allow a single session to be connected at a time.   
+        The console only allowed for connections from two built connection types,
+        through standard in/out or though a telnet port.
+      <p>A new service interface has been introduced: 
+        <tt>org.eclipse.osgi.framework.console.ConsoleSession</tt>.  
+        Implementers of a console session register themselves as an OSGi service.
+        The console implementation will then automatically use the console session
+        for input and output of a console connection.</p>
     </td>
   </tr>
 
-  <tr id="intro_slate_theme">
-    <td width="30%" valign="top" align="left"><b>New intro theme</b></td>
-    <td width="70%" valign="top">A new intro theme called "Slate" has been added. 
-     Slate is not the default theme for Eclipse but can be specified using the 
-        preference <code>org.eclipse.ui.intro/INTRO_THEME=org.eclipse.ui.intro.universal.slate</code>. The main differences in the root page between the new
-      theme and the two existing themes are:
-      <ul>
-        <li>Each link has a label.</li>
-        <li>The images are transparent and will display well if a background is
-        added using an extension.</li>
-        <li>The page displays well at high screen resolutions.</li>
-      </ul>
-      <p> <img src="images/slate-intro.png" alt="Slate intro theme"></p>
-      <p>Non root pages also have a label for each link.</p>
-      <p> <img src="images/slate-overview.png" alt="Slate overview page."></p>
-     </td>
+  <tr id="equinox.p2.revert">
+    <td width="30%" valign="top" align="left"><b>Revert support in p2 director</b></td>
+    <td width="70%" valign="top">The p2 director application now supports reverting
+    to an earlier profile state from the command line. Use the new <tt>-revert</tt>
+    argument to specify a previous profile state to revert to.
+    </td>
   </tr>
 
-<!-- ******************** Equinox ********************** -->
+<!-- *********************** SWT *********************** -->
 <tr>
-
-<td colspan="2"><a name="Equinox"></a>
-<div style="font-size: 20px; font-weight: bold;">Equinox Changes</div>
+<td colspan="2"><a name="SWT"></a>
+<div style="font-size: 20px; font-weight: bold;">SWT Changes</div>
 </td>
 </tr>
 
-  <tr id="p2-publisher"> 
-    <td width="30%" valign="top" align="left"><b>New publisher bundle</b></td>
-    <td width="70%" valign="top"><a href="http://wiki.eclipse.org/p2">p2</a> has introduced a new bundle
-    called the publisher, which provides infrastructure for generating, packaging, and publishing metadata and artifacts
-    into p2 repositories. The publisher provides an extensible API that clients
-    can extend to perform customized publishing to repositories, and includes an <i>advice</i> mechanism for injecting
-    additional metadata into the generation and packaging process.</td>
+  <tr>
+    <td width="30%" valign="top" align="left"><b>Browser can use WebKitGTK+</b></td>
+    <td width="70%" valign="top">Linux users can now use WebKitGTK+ instead of Mozilla as the Browser control's native renderer.
+      See <a href="http://www.eclipse.org/swt/faq.php#browserwebkitgtk">Can the Browser use the WebKit renderer on GTK?</a>.
+      <p><img src="images/webkitgtk.png" alt="WebKitGTK+ Image"/></p>
+	</td>
   </tr>
 
-  <tr id="equinox-concurrency"> 
-    <td width="30%" valign="top" align="left"><b>New Equinox concurrency API</b></td>
-    <td width="70%" valign="top">This release includes a new provisional API for futures. Futures 
-      facilitate handling of concurrency and synchronization in multi-threaded and/or 
-      distributed systems. They serve as a proxy for a result that is not known, 
-      because the computation of the result is not yet complete. See the 
-      <a href="http://wiki.eclipse.org/Equinox/Futures">wiki documentation</a>
-      for more details on this new experimental concurrency API.
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Icon support for GTK Text widgets</b></td>
+    <td width="70%" valign="top">The text widget can now display the search and cancel icons inside the widget. This runs on Linux platforms with a GTK version of 2.16 or greater.
+     <p><img src="images/text_search.png" alt="Icon support"/></p>
     </td>
   </tr>
 
-  <tr id="dynamicDebugOptions"> 
-    <td width="30%" valign="top" align="left"><b>Enhanced DebugOptions</b></td>
-    <td width="70%" valign="top">The Equinox <code>DebugOptions</code> API has been enhanced
-    to support dynamic changes to option settings. Now debug option settings can be modified while
-    an application is running to facilitate problem determination and support. A new interface,
-    <code>DebugOptionsListener</code>, can be registered as a service to enable your plug-in to
-    respond to dynamic debug option changes.
-    </td>
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Mozilla browser support on Solaris SPARC</b></td>
+    <td width="70%" valign="top">Mozilla browser support has been added for the Solaris SPARC platform (Solaris 10, GTK+).</td>
   </tr>
 
-  <tr id="debugTrace"> 
-    <td width="30%" valign="top" align="left"><b>New tracing API</b></td>
-    <td width="70%" valign="top">A new debug tracing API, <code>org.eclipse.osgi.service.debug.DebugTrace</code>,
-    has been added to enhance and simply writing of debug trace messages in your code. 
-    The <code>DebugTrace</code> object will take care of writing additional trace information along
-    with your message, such as your bundle symbolic name, and the class, method, and line
-    in which the tracing message was written. This reduces clutter in the code being traced, while ensuring
-    that consistent and complete contextual information is recorded. The tracing data can
-    either be directed to a file, or written on stdout, depending on the setting of <code>DebugOptions#setFile</code>.
-    By default the Eclipse platform will write trace data to the file <code>trace.log</code> in the workspace
-    metadata location (next to the platform log file).
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Browser closing API</b></td>
+    <td width="70%" valign="top">The new API method <tt>Browser.close()</tt> is used to 
+    close a browser, but allows the close to be cancelled by an <i>onbeforeunload</i> handler.  
+	See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet326.java">Snippet 326</a>.
+     <p><img src="images/browserclose.png" alt="Browser close"/></p>
     </td>
   </tr>
 
-  <tr id="permission-admin"> 
-    <td width="30%" valign="top" align="left"><b>Security Manager enhancements</b></td>
-    <td width="70%" valign="top">This release includes an implementation of the updated Conditional Permission Admin
-    Specification included in the OSGi Service Platform Core Specification Release 4, Version 4.2.
-    This version of the specification includes enhancements to the Conditional Permission Admin service which is used to manage 
-    the permissions assigned to bundles.  The enhancements include adding the ability to grant or deny permissions based on conditions,
-    and to manage conditions as an ordered list of rules.  For more information see the <a href="http://www.osgi.org/Release4/Download">OSGi Release 4 Version 4.2 specification</a>.</td>
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Key events for F16-F20 </b></td>
+    <td width="70%" valign="top">New key event constants have been added for the keyboard function keys F16 to F20.</td> 
   </tr>
 
-  <tr id="service-hooks">
-    <td width="30%" valign="top" align="left"><b>OSGi service registry enhancements</b></td>
-    <td width="70%" valign="top">
-       This release includes an implementation of the new Service Hooks Specification
-       included in the OSGi Service Platform Core Specification Release 4, Version 4.2.  
-       Certain specialized bundles need to be able to alter 
-       output results of service layer's find and event delivery operations to 
-       affect their purpose.  The Service Hooks Specification enhances the service registry to allow 
-       service registry hooks to affect the service registry's find and event 
-       delivery operations.  
-    <p>The Service Hooks Specification is targeted at bundles which need to observe and react to
-       selected service layer operations. In general these will be highly 
-       specialized bundles written by systems programmers.  The service hooks are not 
-       intended to be used by so-called "normal" application bundles.
-       For more information see the <a href="http://www.osgi.org/Release4/Download">OSGi Release 4 Version 4.2 specification</a>.</p></td>
-  </tr>
-
-  <tr id="framework-launching">
-    <td width="30%" valign="top" align="left"><b>OSGi framework launching</b></td>
-    <td width="70%" valign="top">
-       The OSGi Service Platform Core Specification Release 4, Version 4.2 defines a standard 
-       way to launch an OSGi framework implementation.
-       This release of Equinox includes an implementation the OSGi standard launching APIs.
-       A framework implementation must provide a factory class. A factory class is 
-       an indirection to create a framework implementation object. The implementation factory 
-       class must implement the FrameworkFactory interface.  A launcher can use the following ways 
-       to get this class name:
-       <ul>
-        <li>The Java-SE Service Provider Configuration model.</li>
-        <li>Get it from some configuration and use Class.forName.</li>
-        <li>Hardcode the factory name.</li>
-       </ul>
-       To create a framework instance a launcher uses the FrameworkFactory to constructs the 
-       implementation's Framework object.  The Framework can then be
-       used to control the lifecycle of the framework (e.g. start, stop, update
-       etc.)  The <code>org.eclipse.osgi.launch.EquinoxFactory</code> class is the public
-       class in Equinox which implements the new 
-       <code>org.osgi.framework.launch.FrameworkFactory</code> interface.  
-    <p>This Release 4, Version 4.2 specification also defines standard configuration properties which all 
-       framework implementations must recognize.  This allows for a generic
-       framework launcher to be implemented that can launch any framework 
-       implementation. 
-       For more information see the <a href="http://www.osgi.org/Release4/Download">OSGi Release 4 Version 4.2 specification</a>.</p></td>
-  </tr>
-
-  <tr id="declarative-services">
-    <td width="30%" valign="top" align="left"><b>OSGi Declarative Services Changes</b></td>
-    <td width="70%" valign="top">
-      This release includes an implementation of the updated Declarative Services
-      Specification included in the OSGi Service Platform Core Specification Release 4, Version 4.2.
-      The following list highlights the changes to Declarative Services for Version 4.2 of the 
-      OSGi Specification:
-      <ul>
-        <li>The definition of the <code>Service-Component</code> header now uses the definition of a 
-	  header from the module layer. It also allows wild-cards to be used in the 
-	  last component of  the path of a header entry.</li>
-        <li>The DS runtime now follows the recommendations of Property Propagation and
-	   does not propagate properties whose names start with '.' to service properties. </li>
-        <li>The component description now allows for a configuration policy to 
-	  control whether component configurations are activated when configuration 
-	  objects are present or not.</li>
-        <li>The component description now allows the names of the activate and 
-	  deactivate methods to be specified. The signatures of the activate and 
-	  deactivate methods are also modified.</li>
-        <li>Additional signatures of the bind and unbind methods have been added.</li>
-        <li>The definition of accessible methods for activate, deactivate, bind and 
-	  unbind methods is expanded to include any method accessible from the 
-	  component implementation class. This allows private and package 
-	  private method declared in the component implementation class to be 
-	  used.</li>
-        <li>The XML schema and name space have been updated to v1.1.0. It now 
-	  allows for wild-carded attributes and elements for extensibility. The 
-	  name attribute of the component element is now optional and the 
-	  default value of this attribute is the value of the class attribute of the 
-	  nested implementation element. The name attribute of the reference 
-	  element is now optional and the default value of this attribute is the 
-	  value of the interface attribute of the reference element. The Char type 
-	  for the property element has been renamed Character to match the Java 
-	  type name. The attributes configuration-policy, activate and deactivate 
-	  have been added to the component element.</li>
-        <li>When logging error messages, SCR now uses a <code>LogService</code> obtained 
-	  using the component's bundle context so that the resulting log entry is 
-	  associated with the component's bundle. </li>
-        <li>Target properties are now component properties that can be set 
-	  wherever component properties can be set, including configurations.</li>
-      </ul>
-    <p>
-       For more information see the <a href="http://www.osgi.org/Release4/Download">OSGi Release 4 Version 4.2 specification</a>.
-    </p></td>
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>DND insertion feedback for tables</b></td>
+    <td width="70%" valign="top">The default drop target effect for Table now supports <tt>DND.FEEDBACK_INSERT_BEFORE</tt>
+      and <tt>DND.FEEDBACK_INSERT_AFTER</tt>.
+     <p><img src="images/tablednd.png" alt="desc"/></p>
+    </td> 
   </tr>
 
-  <tr id="OSGiR42">
-    <td width="30%" valign="top" align="left"><b>New core framework API</b></td>
-    <td width="70%" valign="top">
-        The OSGi Service Platform Core Specification Release 4, Version 4.2 is adding a number of small API additions
-        to the core Framework.  The following is a list of API additions included in this release.
-        <br>
-        <dl>
-          <dt><b>org.osgi.framework.Bundle#getVersion()</b></dt> 
-            <dd>Returns the Version of a bundle.</dd>
-          <dt><b>org.osgi.framework.Bundle#getSignerCertificates()</b></dt>
-            <dd>Returns the signers of a bundle.</dd>
-          <dt><b>org.osgi.framework.BundleException#getType()</b></dt>
-            <dd>Returns the error type for a BundleException.  For example, a resolver error.</dd>
-          <dt><b>org.osgi.framework.BundleReference</b></dt>
-            <dd>Interface which must be implemented by bundle classloaders.  This gives clients the ability to determine what bundle a ClassLoader is for.</dd>
-          <dt><b>org.osgi.framework.Constants</b></dt>
-            <dd>A number of new constants have been added to define standard launching configuration properties.</dd>
-          <dt><b>org.osgi.framework.FrameworkEvent</b></dt>
-            <dd>A number of new FrameworkEvent types have been added give launchers standard notification when a framework is stopped or restarted.</dd>
-          <dt><b>org.osgi.framework.FrameworkUtil#getBundle(Class)</b></dt>
-            <dd>Utility to get a Bundle object for a given class.  A static method equivalent to the PackageAdmin#getBundle(Class) method.</dd>
-          <dt><b>org.osgi.framework.FrameworkUtil#matchDistinguishedNameChain(String, List)</b></dt>
-            <dd>Utility to match a certificate chain against a pattern.  This is used for permission and condition checks against signed bundles.</dd>
-          <dt><b>org.osgi.framework.ServiceEvent</b></dt>
-            <dd>A new ServiceEvent type has been added to indicate the properties of a registered service have been modified and the new
-            properties no longer match a listener's filter.</dd>
-          <dt><b>org.osgi.framework.ServiceException</b></dt>
-            <dd>A new ServiceException type has been added to indicate that a service problem occurred.</dd>
-          <dt><b>org.osgi.util.tracker.BundleTracker</b></dt>
-            <dd>The BundleTracker class simplifies tracking bundles much like the ServiceTracker simplifies tracking services.</dd>     
-        </dl>
-    </td>
-  </tr>
-
-  <tr id="rfc132">
-    <td width="30%" valign="top" align="left"><b>Composite bundles</b></td>
-    <td width="70%" valign="top">
-        This release includes an implementation of the Composite Bundles specification.  
-        The Composite Bundles specification is a proposed specification for the OSGi 
-        Release 4, Version 4.2 specification.  In a large system built upon a large number of modules, 
-        sometimes it is necessary to provide a mechanism for isolating the various 
-        modules from each other at runtime. Composite Bundles introduces a concept  
-        to provide isolation for a group of bundles.
-        <p>  
-        Conceptually a composite bundle is composed of 
-        a set of bundles which are contained in another (nested) framework instance.
-        New API is introduced in the <code>org.osgi.service.framework</code> package to 
-        manage composite bundles.  The <code>CompositeBundleFactory</code> service interface is 
-        used to install composite bundles.  The <code>CompositeBundle</code> interface is used to 
-        manage the bundles which compose a composite bundle.
-        </p>
-        <p>
-        For more information see the <a href="http://www.osgi.org/Release4/Download">OSGi Release 4 Version 4.2 specification</a>.
-        </p>
-        <p>
-        <b>Note:</b> The API introduced in the <code>org.osgi.service.framework</code> package 
-        is a proposed OSGi API.  This API is considered provisional in Equinox and 
-        may change drastically or be dropped altogether in a future release of 
-        Equinox.  We encourage use of the API and any feedback on the 
-        specification, but consumers must be aware that breaking changes may occur
-        in a future release. 
-        </p>  
-    </td>
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Horizontal mouse wheel</b></td>
+    <td width="70%" valign="top">New event constants have been added for horizontal
+    mouse wheels. See <tt>SWT.MouseHorizontalWheel</tt> and <tt>SWT.MouseVerticalWheel</tt>.</td> 
   </tr>
 
-<!-- *********************** SWT *********************** -->
-<tr>
-<td colspan="2"><a name="SWT"></a>
-<div style="font-size: 20px; font-weight: bold;">SWT Changes</div>
-</td>
-</tr>
+  <tr> 
+    <td width="30%" valign="top" align="left"><b>Variable tab stops in StyledText</b></td>
+    <td width="70%" valign="top">New API in StyledText allows the application to specify a non-uniform sequence of tab stops.
+	See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet325.java">Snippet 325</a>.
+     <p><img src="images/sttabs.png" alt="desc"/></p>
+    </td> 
+   </tr>
+
+  <tr id="styledtext-variable-tab-stops">
+    <td width="30%" valign="top" align="left">
+      <b>StyledText: per line variable tab stops</b>
+    </td>
+    <td width="70%" valign="top">
+      Tab stop support in <tt>StyledText</tt> has been improved to allow each line to have its own sequence of tab stops.
+	  <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet328.java">Snippet 328</a> 
+	  has been modified from Snippet325 to show this.
+     <p><img src="images/variable-tab-stops.png" alt="Multi-line variable tab stops in a StyledText"/></p>
+    </td> 
+  </tr>
 
-    <TR id="cairoAIX">
-      <TD vAlign=top align=left width="30%"><B>Cairo on AIX</B></TD>
-      <TD vAlign=top width="70%">Cairo support has been added to Eclipse on AIX.
-        This enables advanced graphics support on AIX.
-        <P><IMG alt="Cairo on AIX" src="images/cairoaix.png" ></p></TD>
-    </tr>
-	<tr id="jni-generator"> 
-    <td width="30%" valign="top" align="left"><b>JNI Generator</b></td>
-    <td width="70%" valign="top">A new plug-in based tool has been added to simplify the process of generating the SWT JNI code. 
-    	For more info click <a href="http://www.eclipse.org/swt/jnigen.php">here</a>.
-     <p><img src="images/jnigen.png" alt="Cairo on AIX"></p>
-	 </td>
+  <tr id="swt-clabel-margins">
+    <td width="30%" valign="top" align="left"><b>CLabel set/get margins</b></td>
+    <td width="70%" valign="top">New API has been added to <tt>CLabel</tt> to set and get the left, top, right and bottom margin spacing.
+    </td> 
   </tr>
 
-  <tr id="blockselection">
-    <td width="30%" valign="top" align="left"><b>Block selection in StyledText</b></td>
-    <td width="70%" valign="top"><code>StyledText</code> can be switched into block selection mode with new API <code>StyledText.setBlockSelection(true)</code>.
-	<p>
-	  <img src="images/blockselection.png" alt="Block Selection in StyledText">
-	</p>
+  <tr id="swt-key-location">
+    <td width="30%" valign="top" align="left">
+      <b>Key location</b>
     </td>
+    <td width="70%" valign="top">
+		A new field has been added to <code>KeyEvent</code> to allow the application 
+		to identify which keyboard key originated the event, for example, right or left shift key.
+		See <code>KeyEvent.keyLocation</code> for details.
+    </td> 
   </tr>
 
-   <tr id="jstojava">
-    <td width="30%" valign="top" align="left"><b>JavaScript-to-Java</b></td>
-    <td width="70%" valign="top">JavaScript can now call out to Java in the <code>Browser</code> widget.
-    Supported types are numbers, booleans, strings, null, and arrays (example 
-    <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java?view=co">
-    snippet</a>).
+  <tr id="swt-scrollbar-api">
+    <td width="30%" valign="top" align="left">
+      <b>New API in Scrollbar</b>
     </td>
+    <td width="70%" valign="top">
+      New methods have been added to <tt>Scrollbar</tt> to return the bounds for the thumb and its track.
+      See <code>ScrollBar.getThumbBounds()</code> and <code>ScrollBar.getThumbTrackBounds()</code>.
+    </td> 
   </tr>
 
-   <tr id="javatojs">
-    <td width="30%" valign="top" align="left"><b>Improved Java-to-JavaScript</b></td>
-    <td width="70%" valign="top">Java can now call into JavaScript.  An expression is evaluated in the context of a Browser document and 
-     a value is returned.  Supported types are numbers, booleans, strings, null's, and arrays (example 
-    <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet308.java?view=co">
-    snippet</a>).
+  <tr id="state-mask-selection-event">
+    <td width="30%" valign="top" align="left">
+      <b>State mask for selection events</b>
     </td>
-  </tr>  
+    <td width="70%" valign="top">
+	<tt>SelectionEvent.stateMask</tt> is now set on selection and default selection events for all native controls.
+    </td> 
+  </tr>
 
-   <tr id="caretListener">
-    <td width="30%" valign="top" align="left"><b>New caret listener</b></td>
-    <td width="70%" valign="top">New API has been added to <code>StyledText</code> to allow you to listen for changes in the caret offset.
-    See <code>StyledText.addCaretListener()</code> and <code>StyledText.removeCaretListener()</code> for more information.
+  <tr id="styledtext-orientation-event">
+    <td width="30%" valign="top" align="left">
+      <b>Orientation event</b>
     </td>
+    <td width="70%" valign="top">
+	A new event has been added to <tt>Text</tt>, <tt>Combo</tt>, and <tt>StyledText</tt>. It is sent when the writing direction is changed via keyboard shortcut.
+        See <code>SWT.OrientationChanged</code>
+    </td> 
+  </tr>
+
+  <tr id="browser-post-data">
+    <td width="30%" valign="top" align="left"><b>Browser.setUrl() can specify post data and headers</b></td>
+    <td width="70%" valign="top">The new API <code>Browser.setUrl(String url, String postData, String[] headers)</code> allows clients
+      to include post data and add/override header values when initiating HTTP requests.  See
+      <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet330.java">Snippet 330</a> for an example.
+    </td> 
   </tr>
 
-   <tr id="texteditor">
-    <td width="30%" valign="top" align="left"><b>New text editor demo</b></td>
-    <td width="70%" valign="top">This new example makes extensive use of <code>StyledText</code> to demonstrate how it can be
-	used to create a multi-font rich text editor with bullets, links and embedded objects.
-    	<p>
-	  		<img src="images/editor.png" alt="Text Editor">
-		</p>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Wrap indent in StyledText</b>
     </td>
-  </tr>    
+    <td width="70%" valign="top">
+      <tt>StyledText</tt> and <tt>TextLayout</tt> now offer API to allow the application 
+      to control the amount of indent space for wrapped lines.
+      See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet331.java">Snippet 331</a>.
+      <p><img src="images/wrap-indent.png" alt="Wrap Indent"/></p>
+    </td> 
+  </tr>
 
-  <tr id="swtsearch">
-    <td width="30%" valign="top" align="left"><b>Improved search field</b></td>
-    <td width="70%" valign="top">The <code>SWT.SEARCH</code> style is now supported on 
-	all platforms, allowing the application to display a text message when 
-	the control is awaiting input. The <code>SWT.ICON_SEARCH</code> and 
-	<code>SWT.ICON_CANCEL</code> hints control the appearance of the search field (example 
-	<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet309.java?view=co">
-	snippet</a>).
-	<p><img src="images/search.png" alt="Text with SWT.SEARCH"></p></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Improved bidi segments support</b>
+    </td>
+    <td width="70%" valign="top">
+      The bidi segments support in <tt>StyledText</tt> and <tt>TextLayout</tt> was changed 
+      to allow the application to specify which Unicode Control Characters to use in the segments boundaries.
+      See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet332.java">Snippet 332</a>.
+      <p><img src="images/segments-chars.png" alt="Improved Bidi Segments support"/></p>
+    </td> 
   </tr>
 
-  <tr id="nautilus-copypaste"> 
-    <td width="30%" valign="top" align="left"><b>Improved copy and paste 
-	support</b></td>
-    <td width="70%" valign="top">Support has been added to the <code>FileTransfer</code> 
-	class to allow for copy/paste operations between the Explorer and 
-	the Nautilus file manager.
-     <p><img src="images/nautiluscopy.png" alt="Nautilus copy"></p></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Right-to-Left text support on Cocoa</b>
+    </td>
+    <td width="70%" valign="top">
+      On Cocoa, setting the <code>SWT.RIGHT_TO_LEFT</code> flag changes the default text reading direction to right to left. 
+      <p><img src="images/cocoartl.PNG" alt="Right-to-Left text support on Cocoa"/></p>
+    </td> 
   </tr>
 
-  <tr id="stlinks"> 
-    <td width="30%" valign="top" align="left"><b>Links in StyledText</b></td>
-    <td width="70%" valign="top"><code>StyledText</code> now allows users to add
-	hyperlinks to the text in the widget. 
-     <p><img src="images/link.png" alt="Link in StyledText"></p></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Skin engine support</b>
+    </td>
+    <td width="70%" valign="top">
+      New API added to allow CSS engines to skin widgets at the appropriate time 
+      (See <code>SWT.Skin</code> and <code>Widget.reskin(int)</code>). For more info see 
+      <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java">Snippet 333</a>. 
+
+    </td> 
   </tr>
 
-  <tr id="setMargins">
-    <td width="30%" valign="top" align="left"><b>StyledText margin spacing and color</b></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>New layout API</b>
+    </td>
     <td width="70%" valign="top">
-		New API has been added to <code>StyledText</code> to set margin spacing and color. 
-		See <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet316.java?revision=1.1&view=markup">Snippet316</a>.
-		<p><img src="images/margins.png" alt="StyledText with margins"></p>
-	</td>
+	New API added to <code>Composite</code> to support automatic deferred layout.
+        See <code>Composite.layout(Control[], int)</code>.
+    </td> 
   </tr>
   
-  <tr id="disablescript">
-    <td width="30%" valign="top" align="left"><b>Disabling Javascript</b></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Browser.setText() can restrict content permissions</b>
+    </td>
     <td width="70%" valign="top">
-		Javascript can be disabled from running in a Browser with the new API <code>Browser.setJavascriptEnabled(boolean)</code>.
-	</td>
+        New Browser API <code>setText(String html, boolean trusted)</code> allows clients to 
+        restrict the permissions that are given to Browser content that is set from a String.  
+        Restricting permissions is suggested when the source of the content is not trusted.
+    </td> 
   </tr>
 
-  <tr id="cookies">
-    <td width="30%" valign="top" align="left"><b>Browser wants a cookie</b></td>
+  <tr id="swt-accessibility"> 
+    <td width="30%" valign="top" align="left">
+      <b>Accessibility upgrade</b>
+    </td>
     <td width="70%" valign="top">
-		Cookies can be created and accessed in the Browser with new API <code>Browser.setCookie()</code> and <code>Browser.getCookie()</code>.
-	</td>
+    SWT Accessibility has new API for making applications more accessible to Assistive 
+    Technology products such as screen readers.
+    The new API can be found in the <code>org.eclipse.swt.accessibility</code> package.
+    For examples, see the <code>org.eclipse.swt.examples.accessibility</code> package, and the 
+    <a href="http://www.eclipse.org/swt/snippets/#accessibility">Accessibility snippets</a>.
+	</td> 
   </tr>
 
-  <tr id="authlistener">
-    <td width="30%" valign="top" align="left"><b>Authentication listener</b></td>
+  <tr id="swt.opendoc.event"> 
+    <td width="30%" valign="top" align="left">
+      <b>SWT.OpenDoc Event</b>
+    </td>
     <td width="70%" valign="top">
-		Browser clients can now provide a listener that responds to basic authentication challenges.  This is 
-		useful for enabling users to access sites without presenting them with a manual authentication prompter.
-		See <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet317.java?revision=1.1&view=markup">Snippet317</a>.
-	</td>
+    A new event type has been added to SWT to notify applications that a document 
+    should be opened. Listeners for <tt>OpenDoc</tt> events can be added to a <tt>Display</tt>.
+    <p>Support has also been added to the Equinox launcher, and the Eclipse workbench. 
+    Users are now able to associate file types with Eclipse and have Eclipse launched when 
+    they open a file of an associated type.</p>
+    </td> 
   </tr>
 
-  <tr id="modifiedshell">
-    <td width="30%" valign="top" align="left"><b>Shell modified state hint</b></td>
+ <tr id="swt-program-working-directory"> 
+    <td width="30%" valign="top" align="left">
+      <b>Program working directory</b>
+    </td>
     <td width="70%" valign="top">
-		New API has been added to <code>Shell</code> to provide a user hint that the window is in a modified state.
-		See <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet314.java?revision=1.1&view=markup">Snippet314</a>.
-		<p><img src="images/modified.png" alt="Shell.setModified"></p>
-	</td>
+    New API has been added to <tt>Program</tt> to allow the working directory to be 
+    specified when launching an executable. See <code>Program.launch(String fileName, String workingDir)</code> for more details.
+    </td> 
+  </tr>
+ 
+ <tr id="swt-xul-runner"> 
+    <td width="30%" valign="top" align="left">
+      <b>XULRunner 1.9.2 support</b>
+    </td>
+    <td width="70%" valign="top">
+    The <tt>Browser</tt> widget now has full support for the recent release of XULRunner 1.9.2.
+    </td> 
+  </tr>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>TaskItem overlay image</b>
+    </td>
+    <td width="70%" valign="top">
+      The new API <code>TaskItem#setOverlayImage(Image)</code> allows clients to set an image to be displayed on top of the application button in the taskbar.
+      See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java">Snippet 336</a> for an example.
+      <p><img src="images/overlayimage.png" alt="Overlay Image"/></p>
+    </td> 
   </tr>
 
-  <tr id="datetimedropdown"> 
-    <td width="30%" valign="top" align="left"><b>DateTime DROP_DOWN</b></td>
-    <td width="70%" valign="top"><code>DateTime</code> widgets created with <code>SWT.DATE</code> style can now also have <code>SWT.DROP_DOWN</code> style.
-     <p><img src="images/datetime-dropdown.png" alt="DateTime with DROP_DOWN style"></p></td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>TaskItem overlay text</b>
+    </td>
+    <td width="70%" valign="top">
+      The new API <code>TaskItem#setOverlayText(String)</code> allows clients to set a short text to be displayed on top of the application button in the taskbar.
+      See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java">Snippet 336</a> for an example. 
+      <p><img src="images/overlaytext.png" alt="Overlay Text"/></p>
+    </td> 
   </tr>
 
-  <tr id="sheet">
-    <td width="30%" valign="top" align="left"><b>SWT.SHEET style for Shell and Dialog</b></td>
-	<td width="70%" valign="top">Sheet windows are now supported on Mac OS X Cocoa.
-      <p><img src='images/sheet.png' alt="Shell with SWT.SHEET style"></p>
-	</td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>TaskItem progress</b>
+    </td>
+    <td width="70%" valign="top">
+      The new APIs <code>TaskItem#setProgress(int)</code> and <code>TaskItem#setProgressState(int)</code> allows clients to show progress indication in the application button in the taskbar.
+      See <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java">Snippet 336</a> for an example.
+      <p><img src="images/progress.png" alt="Progress"/></p>
+    </td> 
   </tr>
 
   <tr> 
-    <td width="30%" valign="top" align="left"><b>Mozilla browser support on Solaris x86</b></td>
-    <td width="70%" valign="top">Mozilla browser support has been added to the Solaris x86 platform.
-		<p><img src="images/solarisx86-browser.png" alt="Solaris x86 Browser"></p>
-	</td>
+    <td width="30%" valign="top" align="left">
+      <b>TaskItem menu</b>
+    </td>
+    <td width="70%" valign="top">
+      The new API <code>TaskItem#setMenu(Menu)</code> allows clients to specify a menu for the application button in the taskbar.
+      Running on Windows 7:<br/> 
+     <p><img src="images/menu-win32.png" alt="Menu on Windows"/></p>
+      Running on Mac OS X:<br/> 
+     <p><img src="images/menu-mac.png" alt="Menu on Mac"/></p>
+    </td> 
   </tr>
 
-  <tr id="cocoadnd">
-    <td width="30%" valign="top" align="left"><b>Improved DND feedback on Cocoa</b></td>
-    <td width="70%" valign="top">Cocoa drag and drop in trees and tables is now fully supported. Aside
-	from the visual feedback, other native features are supported, such as automatic collapse of tree items
-	when the drag is finished.
-	<p><img src='images/dnd.png' alt='Cocoa drag and drop feedback'></p>
-	</td>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>CTabFolder renderer</b>
+    </td>
+    <td width="70%" valign="top">
+      <tt>CTabFolder</tt> has been improved and now allows clients to change its look by implementing their own renderers.
+	<p><img src="images/newctab.png" alt="New CTabFolder"/></p>
+    </td> 
   </tr>
 
-  <tr id="paperorientation"> 
-    <td width="30%" valign="top" align="left"><b>Paper orientation</b></td>
-    <td width="70%" valign="top">Applications can now programmatically select portrait or landscape mode when printing,
-    or when opening a PrintDialog.
-     See <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet318.java?view=co">Snippet318</a>.
-     <p><img src="images/printdialog.png" alt="PrintDialog seeded with Landscape orientation"></p></td>
+  <tr> 	
+    <td width="30%" valign="top" align="left">
+      <b>Custom traversals</b>
+    </td>
+    <td width="70%" valign="top">
+      New API <code>Control.traverse(int, event)</code> enables clients to request that a customized traversal be performed.  For an example of this see
+        <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet338.java">Snippet 338</a>.
+    </td> 
+  </tr>
+
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>Draw background at an offset</b>
+    </td>
+    <td width="70%" valign="top">
+      New API was added in <code>Composite.drawBackground</code> that allows for drawing of a parent background at an offset specified by the child. This
+	is useful for aligning patterns between the parent and child when dealing with non-rectangular shapes. 
+    </td> 
   </tr>
 
 <!-- ****************** END OF N&N TABLE ****************** -->
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.platform.doc.user/META-INF/MANIFEST.MF
index 9d85d03..a6858de 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.platform.doc.user; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.help;bundle-version="[3.2.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/build.properties b/eclipse/plugins/org.eclipse.platform.doc.user/build.properties
index a0fd002..b3f5b88 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/build.properties
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/accessibility/text_editor.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/accessibility/text_editor.htm
index 27313b7..bd07600 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/accessibility/text_editor.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/accessibility/text_editor.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2009, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
   <LINK REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> 
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
@@ -13,29 +13,74 @@
 <body>
 
 <h1>Configuring accessibility options for textual editors</h1>
-Besides the options to change colors and fonts as shown by the related tasks listed below, textual editors in Eclipse can be configured to better fit the needs of people with a physical disability. This document describes the relevant options.
+Textual editors in Eclipse can be configured to better fit the needs of people using Accessible Technology such as screen readers and magnifiers. This document describes the relevant options.
 
 <h2>Accessing Annotations</h2>
-<p>You can navigate to the next annotation by pressing <b>Ctrl+.</b> and to the previous ony by pressing <b>Ctrl+,</b>. Out of the box not all available annotation types are included in that navigation,
-e.g. breakpoints are not part of it. Breakpoints and other annotation types can either be enabled via the <b>Next Annotation</b> toolbar button drop-down menu or by checking <b>Include in next/previous navigation</b> on the
+<p>You can navigate to the next annotation by pressing <b>Ctrl+.</b> and to the previous one by pressing <b>Ctrl+,</b>. Out of the box not all available annotation types are included in that navigation,
+for example, breakpoints are not part of it. Breakpoints and other annotation types can either be enabled via the <b>Next Annotation</b> toolbar button drop-down menu or by checking <b>Include in next/previous navigation</b> on the
 <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.editors.preferencePages.Annotations)")'>
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
    <strong>General > Editors > Text Editors > Annotations</strong></a> preference page.</p>
-<p>Navigating to an annotation lets its text appear in the status line. The next section explains how to read the status line under Windows.</p>
-<p>Some annotation types like e.g. warnings and errors, can
+<p>Navigating to an annotation moves the text caret to the annotated line, and displays the annotation text in the status line. The next section explains how to read the status line under Windows.</p>
+<p>Some annotation types, for example warnings and errors, can
 be accessed by pressing <b>F2</b> after having navigated to one of them or setting the caret inside the annotation.</p> 
 
 <h2><img src="../../images/win_only.png" alt="Windows only" border="0" >Reading the status line with JAWS</h2>
 JAWS desktop users press <b>Insert+PageDown</b> to read the Eclipse status line and JAWS laptop users press <b>Caps Lock+PageDown</b>.
 
-
+<h2>Accessing the Current Line Number</h2>
+<p>You can get the current line number by pressing <b>Ctrl+L</b> or via <b>Navigate > Go To Line...</b>.</p>
+ 
 <h2>Quick Diff Hover</h2>
-Like normal hovers can be shown by pressing <b>F2</b>, the quick diff diff and revision hovers that appear when hovering over the quick diff ruler on the left can also be shown by pressing a key sequence.
+Like normal hovers can be shown by pressing <b>F2</b>, the quick diff and revision hovers that appear when hovering over the quick diff ruler on the left can also be shown by pressing a key sequence.
 However, out of the box no key sequence is defined for that. Go to the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Keys)")'>
    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
    <strong>General > Keys</strong></a> preference page to assign a key sequence to the <b>Show Quick Diff Ruler Tooltip</b> command.
 
+<h2>Annotation Hover</h2>
+Like normal hovers can be shown by pressing <b>F2</b>, the annotation hover that appears when hovering over the vertical ruler on the left can also be shown by pressing a key sequence.
+However, out of the box no key sequence is defined for that. Go to the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Keys)")'>
+   <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+   <strong>General > Keys</strong></a> preference page to assign a key sequence to the <b>Show Ruler Annotation Tooltip</b> command.
 
+<h2>Reading Words in the Java Editor</h2>
+<p>In order to get correct results when letting the screen reader read words in the Java editor it is recommended to
+disable <b>Smart caret positioning in Java names</b> on the <b>Java > Editor</b> preference page.</p>
+
+<h2>Reading Java Code in the Java Editor</h2>
+<p>Some screen readers do not read punctuation by default, however it is useful to hear punctuation when reading code.
+When using a Java Editor with a screen reader, you can do the following:
+<ul>
+	<li>JAWS:<ul>
+		JAWS reads most punctuation out of the box, however it does not say commas. To change this:
+		<li><b>Utilities > Configuration Manager</b></li>
+		<li><b>Set Options > Customize Punctuation...</b></li>
+		<li>Select <b>comma</b> in the list, and change the setting from <b>All</b> to <b>Most</b></li>
+		<li><b>OK</b></li>
+		<li><b>File > Save</b> (to save the configuration)</li>
+		<li><b>File > Exit</b> (to exit the JAWS Configuration Manager)</li>
+	</ul></li>
+	<li>NVDA:<ul>
+		<li>NVDA menu (<b>Insert+n</b>) <b>> Preferences > Voice settings...</b>: enable <b>Speak all punctuation</b></li>
+		<li>NVDA menu (<b>Insert+n</b>) <b>> Save configuration</b></li>
+	</ul></li>
+	<li>Orca:<ul>
+		<li><b>Preferences > Speech > Punctuation level: All</b></li>
+		<li><b>OK</b></li>
+	</ul></li>
+	<li>VoiceOver:<ul>
+		VoiceOver reads most punctuation out of the box, however it does not say commas. To change this:
+		<li><b>VoiceOver Utility</b></li>
+		<li><b>Verbosity</b> tab</li>
+		<li><b>Punctuation: All</b></li>
+	</ul></li>
+	<li>Window-Eyes:<ul>
+		<li><b>Global > Menu level</b>: <b>Advanced</b></li>
+		<li><b>Screen > Punctuation</b>: enable <b>Textual</b>, <b>Math</b>, and <b>Miscellaneous</b></li>
+		<li><b>File > Save</b></li>
+	</ul></li>
+</ul>
+</p>
 
 <p><img src="../../images/ngrelt.png" alt="Related tasks" border="0" ><br>
 <a href="accessmain.htm">Accessibility features in Eclipse</a><br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-13.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-13.htm
index 89dc570..2074640 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-13.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-13.htm
@@ -34,6 +34,18 @@ in the file system to be deleted.  However, deleting child resources of linked f
 <em>will</em> cause them to be removed from the file system.
 </p>
 <p>
+Linked resource target paths can be either defined as absolute paths, or relative to a path variable.
+</p>
+<p>
+The linked resource target path can be changed by selecting the <b>Edit...</b>  button in the
+<b>File > Properties > Resource</b> property page of the linked resource.
+</p>
+<p>
+A list of all linked resources that exist in a project can be seen and edited from the 
+<b>File > Properties > Resource > Linked Resources</b> property page, under the
+<b>Linked Resources</b> tab.
+</p>
+<p>
 Some plug-ins built on top of the Eclipse platform are not compatible with linked resources.
 If this is the case, you can completely disable the linked resource feature to prevent them
 from being created in your workspace.  Linked resources can be disabled from the
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-21.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-21.htm
index b1c0f21..fa182b4 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-21.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/concepts-21.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -30,7 +30,13 @@ for details.
   left of the Workbench window. When you click the toolbar button for a fast view, 
   that view opens temporarily in the current perspective (overlaying it). As soon as you click 
   outside that view or the view loses focus it is hidden again. The fast view bar can also be docked 
-  on the other sides of the Workbench window.</P>
+  on the other sides of the Workbench window.</P> 
+<P CLASS="Para" Label=Type>  
+ By default the fast view bar is always visible. You can use the
+<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Perspectives)")'>
+<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+<b>General > Perspectives</b></a>
+  preference page to hide the fast view bar if it is empty.</P>
 <P CLASS="Para" Label=Type>
 You can create a new fast view by dragging any open view to the
 fast view bar or by selecting <b>Fast View</b> from the menu that opens when you
@@ -48,6 +54,9 @@ Toolbars</a></P>
 Moving and docking views</a><br>
 <a href="../gettingStarted/qs-39g.htm">Maximizing a view or editor</a></P>
 
+<p><img border="0" src="../images/ngrelr.png" alt="Related reference." ><br>
+<a href="../reference/ref-3a.htm">Fast View bar</a></P>
+
 
 </body>
 </HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/cpathvars.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/cpathvars.htm
index abc408f..96a0ced 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/cpathvars.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/cpathvars.htm
@@ -25,10 +25,23 @@ team members without requiring the exact same directory structure as on your fil
 system.
 </p>
 <p>
+Path variables can be either defined at the project level or at the workspace level.  Creating
+path variables at the project level ensures that projects that contain linked resources using
+those path variables remain portable across workspace and computers.
+</p>
+<p>
+Each project contain a pre-defined set of path variables available for defining linked resources,
+including <b>ECLIPSE_HOME</b>, <b>PARENT_LOC</b>, <b>PROJECT_LOC</b> and <b>WORKSPACE_LOC</b>.
+</p>
+<p>
+New path variables can be defined relative to existing path variables by using the ${VAR} syntax.
+For example, a path variable FOO can be defined relative to BAR by defining it to "${BAR}../foo".
+</p>
+<p>
 You can load a project that uses path variables even if you do not currently have all 
-the path variables defined in your workspace. A linked resource that uses a missing path
+the path variables defined in the project or workspace. A linked resource that uses a missing path
 variable is flagged using a special decorator icon. In addition, the
-<b>File > Properties > Info</b> 
+<b>File > Properties > Resource</b> 
 property page and the Properties view
 (<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.ui.views.PropertySheet)")'>
 <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
@@ -39,7 +52,9 @@ location that does not currently exist on the file system. Linked resources that
 a path variable are indicated using the same decorator icon mentioned above.
 </p>
 <p>
-You can create new path variables and edit and remove existing path variables on the
+You can create new path variables and edit and remove existing path variables in 
+the <b>File > Properties > Resource > Linked Resources</b> property page for a project resource
+and at the workspace level on the
 <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.LinkedResources)")'>
 <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
 <b>General > Workspace > Linked Resources</b></a> preference page.
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/resourcefilters.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/resourcefilters.htm
new file mode 100644
index 0000000..667fb48
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/resourcefilters.htm
@@ -0,0 +1,77 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Freescale Semiconductor and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Resource filters</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+</HEAD>
+
+<BODY BGCOLOR="#ffffff">
+<H1 CLASS="Head">Resource filters</H1>
+<p>
+Resource filters allow you to configure which files and folders are included automatically
+in a project resource hierarchy when refresh is performed.
+</p>
+<p>
+By adding resource filters to a project or folder, you can systematically prevent some file 
+system entries to be displayed in the resource tree. 
+</p>
+<p>
+A resource filter is either of <b>Include Only</b> or <b>Exclude All</b> type, and can apply to either files,
+folders, or both.
+</p>
+<p>
+Resource filters only apply to files and/or folders that are implicitly included in the workspace
+by the refresh operation.  Link files and folders are not affected by resource filters, since they 
+need to be created explicitly by the user.
+</p>
+<p>
+An "Include" resource filter allows only files and/or folders that match the filter condition
+to be included in the workspace during the refresh operation. If multiple "Include" filters exist, 
+the elements included will be those who match any of the existing "Include" filters. 
+</p>
+<p>
+An "Exclude" resource filter prevent all files and/or folders that match the filter condition
+to be included in the workspace during the refresh operation. If multiple "Exclude" filters exist, 
+the elements excluded will be those who match any of the existing "Exclude" filters. 
+</p>
+<p>
+If both "Exclude" and "Include" resource filters exist in a given folder or project, only files 
+and/or folders that match any of the "Include" filters <b>and </b> do not match any of the "Exclude"
+filters will be included in the workspace. 
+</p>
+<p>
+A resource filter can apply recursively to all children of the project or folder it is created on.  In 
+such case, the resource filter will apply to a sub-folder as if it was created in that sub-folder 
+itself, following the rules mentioned above.
+</p>
+<p>
+Resource filters can be created, edited and removed in 
+the <b>File > Properties > Resource > Resources Filters</b> property page for a project or
+folder resource.
+</p>
+<p>
+Resource filters can also be created on a folder before that folder is created in the workspace by 
+selecting the "Resource Filters..." button in the "Advanced" section of the <b>New Folder wizard</b>.
+</p>
+<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
+<a href="concepts-13.htm">Linked resources</a><br>
+</p>
+
+<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
+<a href="../tasks/tasks-97.htm">Creating resource filters</a><br>
+<a href="../tasks/tasks-49.htm">Viewing resource properties</a><br>
+</p>
+
+<p><img border="0" src="../images/ngrelr.png" alt="Related references" >
+<br>
+  <a href="../reference/ref-14b.htm">Linked resources</a> </p>
+
+</BODY>
+</HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/virtualfolders.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/virtualfolders.htm
new file mode 100644
index 0000000..857b994
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/virtualfolders.htm
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Virtual folders</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+</HEAD>
+
+<BODY BGCOLOR="#ffffff">
+<H1 CLASS="Head">Virtual folders</H1>
+<p>
+Virtual folders are folders that exist only in the Eclipse workspace tree, and 
+have no file system location.
+</p>
+<p>
+By using virtual folders, file and folders can be organized in a project 
+hierarchy independently of the file system location of those resources.
+</p>
+<p>
+Regular file and folder resources can not be created under a virtual folder, since
+they need a file system location as their parent in order to exist in the file system.  Only
+other virtual folders, or linked resources can be created directly under a virtual folder.
+</p>
+<p><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
+<a href="concepts-13.htm">Linked resources</a><br>
+</p>
+
+<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
+<a href="../tasks/tasks-45a.htm">Creating virtual folders</a><br>
+</p>
+
+<p><img border="0" src="../images/ngrelr.png" alt="Related references" >
+<br>
+  <a href="../reference/ref-38.htm">New Folder Wizard</a> </p>
+
+
+
+</BODY>
+</HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/welcome.htm b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/welcome.htm
index 18eec86..8c65c82 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/concepts/welcome.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/concepts/welcome.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -14,13 +14,14 @@
 
 <p>
 The welcome page is the first page you see when you first launch eclipse. Its purpose
-is to introduce you to the product. Welcome content typically includes an overview
+is to introduce you to the product. Welcome content will vary from one Eclipse based product to 
+another, it typically includes an overview of
 the product and its features, tutorials to guide you through some basic tasks,
 samples to get you started, etc.
 </p>
 
 <p align="center">
-<img src="../images/welcome.png" alt="Welcome screenshot" width="508" height="384">
+<img src="../images/welcome.png" alt="Welcome screenshot">
 </p>
 
 <p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/contexts_UserAssistance.xml b/eclipse/plugins/org.eclipse.platform.doc.user/contexts_UserAssistance.xml
index 49c1461..e3230b0 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/contexts_UserAssistance.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/contexts_UserAssistance.xml
@@ -26,7 +26,7 @@
   </context>
 
   <context id="prefPageHelpContent">
-    <description>Use this preference page to configure help to download help content from a remote server (an infocenter).</description>
+    <description>Use this preference page to configure help to download help content from a remote server (an information center).</description>
 	<topic label="Help Content preferences" href="/org.eclipse.platform.doc.user/reference/help_preferences_content.htm"/>
 	<topic label="Remote Help" href="/org.eclipse.platform.doc.isv/guide/ua_help_content_remote.htm"/>
   </context>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/contexts_Workbench.xml b/eclipse/plugins/org.eclipse.platform.doc.user/contexts_Workbench.xml
index 1cf279f..9d92823 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/contexts_Workbench.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/contexts_Workbench.xml
@@ -230,7 +230,7 @@
     </context>
     <context id="open_preferences_action_context">
         <description>This opens the preferences dialog.</description>
-        <topic label="Workbench - Preferences" href="reference/ref-10.htm"/>
+        <topic label="General - Preferences" href="reference/ref-10.htm"/>
     </context>
     <context id="open_new_window_action_context">
         <description>This opens a new window.</description>
@@ -514,6 +514,11 @@
         <description>Dialog to switch workspaces.</description>
 		<topic label="Switching Workspaces" href="reference/ref-workspaceswitch.htm" />
     </context>
+    <context id="open_resource_dialog">
+        <description>Dialog to open files by name or path.</description>
+        <topic label="Open Resource dialog" href="reference/ref-dialog-open-resource.htm"/>
+        <topic label="Opening Resources" href="tasks/tasks-46.htm"/>
+    </context>
     <!-- Editors -->
     <context id="welcome_editor_context">
         <description>A quick, simple guide to introduce new users to some basic tasks.</description>
@@ -597,6 +602,26 @@
         <topic label="Project Explorer View - Properties Page" href="reference/ref-27.htm"/>
         <topic label="Viewing Resource Properties" href="tasks/tasks-49.htm"/>
     </context>
+    <context id="linked_resource_page_context">
+        <description>Allows you to view path variables and linked resources in the project</description>
+        <topic label="Path Variables" href="concepts/cpathvars.htm"/>
+        <topic label="Virtual Folders" href="concepts/virtualfolders.htm"/>
+        <topic label="Linked Resources" href="concepts/concepts-13.htm"/>
+    </context>
+    <context id="resource_filter_property_page_context">
+        <description>Allows you to view and configure resources filters on a project or folder</description>
+        <topic label="Resource Filters" href="concepts/resourcefilters.htm"/>
+    </context>
+    <context id="edit_resource_filter_property_page_context">
+        <description>Allows you to create and edit resources filters</description>
+        <topic label="Create Resource Filters" href="tasks/tasks-97.htm"/>
+        <topic label="Resource Filters" href="concepts/resourcefilters.htm"/>
+    </context>
+    <context id="edit_resource_filter_dialog_context">
+        <description>Allows you to create and edit resources filters</description>
+        <topic label="Create Resource Filters" href="tasks/tasks-97.htm"/>
+        <topic label="Resource Filters" href="concepts/resourcefilters.htm"/>
+    </context>
     <!-- Views -->
     <context id="bookmark_view_context">
         <description>View to show all bookmarks.</description>
@@ -628,10 +653,6 @@
         <topic label="Problems View" href="reference/ref-31a.htm"/>
         <topic label="Quick Fix" href="tasks/tquickfix.htm"/>
     </context>    
-    <context id="markers_view_context">
-        <description>This view shows markers associated with resources in the workspace.</description>
-        <topic label="Views" href="concepts/concepts-5.htm"/>
-    </context>
     <!-- Property sheet -->
     <context id="property_sheet_page_help_context">
         <description>The Properties view displays the properties of the selected resource.</description>
@@ -667,6 +688,8 @@
         <description>Wizard to guide you through creation of a new folder resource.</description>
         <topic label="New Folder Wizard" href="reference/ref-38.htm"/>
         <topic label="Resources" href="concepts/concepts-12.htm"/>
+        <topic label="Virtual Folders" href="concepts/virtualfolders.htm"/>
+        <topic label="Linked Resources" href="concepts/concepts-13.htm"/>
         <topic label="Creating Resources - Folders" href="tasks/tasks-43.htm"/>
     </context>
     <context id="new_folder_dialog">
@@ -695,25 +718,35 @@
         <topic label="Importing resources with the Import Wizard" href="tasks/tasks-55.htm"/>
     </context>
     <context id="file_system_export_wizard_page">
-        <description>This page helps you provide all the information required to export resources to the file system.</description>
+        <description>This page helps you to provide all the information required to export resources to the file system.</description>
         <topic label="Using the Export Wizard" href="tasks/tasks-59.htm"/>
         <topic label="Export Wizard" href="reference/ref-71.htm"/>
     </context>
     <context id="file_system_import_wizard_page">
-        <description>This page helps you provide all the information required to import files from the file system.</description>
+        <description>This page helps you to provide all the information required to import files from the file system.</description>
         <topic label="Importing from File System" href="tasks/tasks-55.htm"/>
         <topic label="Import Wizard" href="reference/ref-70.htm"/>
     </context>
     <context id="zip_file_export_wizard_page">
-        <description>This page helps you provide all the information required to export resources from the workspace to an archive file.</description>
+        <description>This page helps you to provide all the information required to export resources from the workspace to an archive file.</description>
         <topic label="Exporting to a Zip File" href="tasks/tasks-59ag.htm"/>
         <topic label="Export Wizard" href="reference/ref-71.htm"/>
     </context>
     <context id="zip_file_import_wizard_page">
-        <description>This page helps you provide all the information required to import files from an archive file into the workspace.</description>
+        <description>This page helps you to provide all the information required to import files from an archive file into the workspace.</description>
         <topic label="Importing from a Zip File" href="tasks/tasks-55bg.htm"/>
         <topic label="Import Wizard" href="reference/ref-70.htm"/>
     </context>
+    <context id="preferences_export_wizard_page">
+        <description>This page helps you to provide all the information required to export preferences from the workspace to a file system.</description>
+        <topic label="Importing and Exporting Preferences" href="tasks/timpandexp.htm"/>
+        <topic label="Export Wizard" href="reference/ref-71.htm"/>
+    </context>
+    <context id="preferences_import_wizard_page">
+        <description>This page helps you to provide all the information required to import preferences from a file system into the workspace.</description>
+        <topic label="Importing and Exporting Preferences" href="tasks/timpandexp.htm"/>
+        <topic label="Import Wizard" href="reference/ref-70.htm"/>
+    </context>
     <!-- Wizards -->
     <context id="new_wizard_context">
         <description>These wizards allow you to create new resources and/or elements</description>
@@ -1213,4 +1246,16 @@
         <description>This view allows you to display web pages. By default, it is used to display web pages when they are opened from the workbench. You can modify this setting in the Web Browser preferences available from the link below.</description>
         <topic label="Web Browser preferences" href="/org.eclipse.platform.doc.user/reference/ref-42.htm"/>
     </context>
+    <context id="import_type_dialog">
+        <description>This dialog allows you to customize how a file and folder hierarchy is recreated in a project.</description>
+    </context>
+    <context id="project_explorer_customization_dialog" title="Project Explorer View Customization Dialog">
+       <description>This dialog allows you to set filters and select content for the Project Explorer.</description>
+       <topic href="tasks/tasks-48b.htm" label="Project Explorer Customization Dialog"/>
+    </context>
+    <context id="project_explorer_context" title="Project Explorer">
+       <description>The Project Explorer allows you to navigate the contents of your workspace.</description>
+       <topic label="Project Explorer" href="reference/ref-73.htm"/>
+       <topic label="Views" href="concepts/concepts-5.htm"/>
+    </context>
 </contexts>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-12.htm b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-12.htm
index d2c2e9e..04d1f33 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-12.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-12.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -21,8 +21,8 @@ Navigating resources </h2>
 One important view to become familiar with is one of the navigation views, which displays information 
 about the contents of the Workbench and how the resources relate to each other in a hierarchy.</P>
 <P CLASS="Para">
-In the Workbench, all resources reside in projects. Projects can contain folders and/or individual
-files.</P>
+The Workbench contains projects, which in turn contain folders and/or files.
+Projects, folders, and files are collectively called resources.</P>
 <blockquote>
   <blockquote>
 <P CLASS="Para" align="center">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-24a.xhtml b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-24a.xhtml
index e3f4c20..c55f888 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-24a.xhtml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-24a.xhtml
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 	<head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
 
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
 <meta http-equiv="Content-Style-Type" content="text/css" />
@@ -17,9 +17,8 @@
 Exporting files </h1>
 <p class="Para">Files can be exported from the Workbench either by:</p>
 <ul>
-  <li> Dragging and dropping to the file system (Windows and Linux GTK only), or</li>
-  <li filter="ws=win32"> <img align="texttop" border="0" src="../images/win_only.png" alt="Windows only" />
-    Copying and pasting to the file system, or</li>
+  <li> Dragging and dropping to the file system (on most platforms), or</li>
+  <li> Copying and pasting to the file system, or</li>
   <li> Using the
   <a class="command-link" href="javascript:executeCommand("org.eclipse.ui.file.export")">
   <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png"/>
@@ -27,7 +26,7 @@ Exporting files </h1>
 </ul>
 <h2>
 Drag and drop or copy and paste</h2>
-<p class="Para" filter="ws=win32"> <img align="texttop" border="0" src="../images/win_only.png" alt="Windows only" /> 
+<p class="Para">
   The operating system's file system explorer can be used to export a copy of 
   a folder or file from the Workbench to the file system.</p>
 <ol>
@@ -44,7 +43,7 @@ Drag and drop or copy and paste</h2>
       Look for a small plus sign on the drag cursor to know whether the file is 
       being copied or moved. </p>
   </li>
-  <li filter="ws=win32"> 
+  <li> 
     <p class="Para"> The export can also be achieved by selecting the file in 
       the Project Explorer and choosing <b>Edit > Copy</b>, then</p> 
     <p class="Para">pasting it in the file system explorer.</p> </li>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-31b.htm b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-31b.htm
index beaca2a..c6f5727 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-31b.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-31b.htm
@@ -29,6 +29,13 @@ Drag and drop or copy and paste</h3>
     <P CLASS="Para"> Locate the file JanesFile.txt that was recently exported 
       and drag it to a specific location in one of the navigation views in the 
       Workbench.  </P>
+    <P CLASS="Para"> A dialog appears that allows to determine how the file will be
+    added to the project, either as a simple copy of the original file or as a link file.</P>
+	<blockquote> 
+	  <blockquote> 
+	    <P CLASS="Para"> <img src="../images/Image_file_operation.png"  alt="File and Folder Operation dialog" border="0"></P>
+	  </blockquote>
+	</blockquote>
     <P CLASS="Para">When dragging resources into one of the navigation views, 
       the project/folder that the resource is being dropped into will be selected.</P>
     <blockquote> 
@@ -46,8 +53,13 @@ Drag and drop or copy and paste</h3>
     then selecting the destination in the navigation view and choosing <b>Edit 
     > Paste</b>. </li>
 </ol>
-
-
-
+<P CLASS="Para">Generally, files and folders can be imported in a project by making a 
+copies under the project folder, or by linking to the original file by creating link files and folders.
+When folders are drag and dropped (not only files), the dialog allows also to create a project hierarchy with virtual folders.</P>
+<blockquote> 
+  <blockquote> 
+    <P CLASS="Para"> <img src="../images/Image_file_folder_operation.png"  alt="File and Folder Operation dialog" border="0"></P>
+  </blockquote>
+</blockquote>
 </BODY>
 </HTML>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-36b.htm b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-36b.htm
index 0763ca8..991aa1a 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-36b.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-36b.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 	<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -32,7 +32,7 @@
     The Search view's popup menu allows you to do this using <b>Remove Selected 
     Matches</b> which removes any selected file entries (and all matches in them) 
     from the Search view. Note that this <strong>only</strong> removes the entries 
-    in the Search view, it does <strong>not</strong> effect the files themselves. 
+    in the Search view, it does <strong>not</strong> affect the files themselves. 
     Select JanesFile.txt and choose <b>Remove Selected Matches</b> from the popup 
     menu. The Search view now shows only the matches for JanesText.txt 
     <blockquote><img src="../images/Image51_search_reduced.png"  alt="Search view. One match in Workspace." border="0"></blockquote>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-responsiveUI.htm b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-responsiveUI.htm
index e7ad021..5e93e08 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-responsiveUI.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/gettingStarted/qs-responsiveUI.htm
@@ -27,14 +27,16 @@
   you to carry on with other tasks in Eclipse.</p>
 <p><img src="../images/res_build.png" alt="Image of the Building Workspace window" border="0" ></p>
 <p>For information on the status of the action and additional operations that 
-  are currently running, click <strong>Details</strong>.</p>
-<p><img src="../images/res_details.png" alt="Image of the Building Workspace window with the Details displayed" border="0" ></p>
-<p>The <strong>Details </strong>panel displays the status information of the operation 
+  are currently running, click <strong>Details</strong>.
+  The <strong>Details </strong>panel displays the status information of the operation 
   at hand as well as any additional operations that may be running simultaneously.</P>
 <p><img src="../images/res_otherjobs.png" alt="Image of the Building Workspace window with the Details showing simultaneous operations" border="0" ></P>
 <p>The Progress Information dialog also indicates when one operation is being 
   blocked by another. </P>
 <p><img src="../images/res_blocked.png" alt="Image of Progress Information view with an operation that is waiting for another to complete." border="0" ></P>
+<p>Information about operations that are currently running in the background may also be
+accessed at any time using the <strong>Progress View</strong>.</p>
+<p><img src="../images/res_details.png" alt="Image of the Progress View showing the Building Workspace operation running" border="0" ></p>
 <p>To have operations running in the background set as the default, select <strong>Window 
   > Preferences > General </strong> and check <strong>Always run in background.</strong> 
 </P>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image209_workspace.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image209_workspace.png
index 546a158..1858ec1 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image209_workspace.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image209_workspace.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image219_pref_cv2.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image219_pref_cv2.png
index dae82a1..e4bab41 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image219_pref_cv2.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image219_pref_cv2.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image222_pref_lh.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image222_pref_lh.png
index 3c5aef9..db9c612 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image222_pref_lh.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image222_pref_lh.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image223_pref_persp.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image223_pref_persp.png
index 3b54320..b5d4d0b 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image223_pref_persp.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image223_pref_persp.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image262_import_file.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image262_import_file.png
index 33414d9..fca4c94 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image262_import_file.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image262_import_file.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image36_linkedresources.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image36_linkedresources.png
index 81d5d18..b2be431 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image36_linkedresources.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image36_linkedresources.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image39_import_tree.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image39_import_tree.png
index 2b9502d..bbcd27e 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image39_import_tree.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image39_import_tree.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_folder_operation.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_folder_operation.png
new file mode 100644
index 0000000..ebe85ab
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_folder_operation.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_operation.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_operation.png
new file mode 100644
index 0000000..1719beb
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_file_operation.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_team_pref.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_team_pref.png
index 3ff5544..bbf299c 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_team_pref.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/Image_team_pref.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference.png
index 8d6fab0..8c4d95b 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_content.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_content.png
index 5856d55..5d40742 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_content.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_content.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_infocenter.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_infocenter.png
index 59e1acf..1e87a58 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_infocenter.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_infocenter.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_server.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_server.png
deleted file mode 100644
index 55a04d4..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_preference_server.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_criteria.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_criteria.png
new file mode 100644
index 0000000..76761d3
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_criteria.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_link.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_link.png
new file mode 100644
index 0000000..36ad528
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_link.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_new.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_new.png
new file mode 100644
index 0000000..5a6db2f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_new.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_select.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_select.png
new file mode 100644
index 0000000..b0c3de4
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_scope_select.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_view_context.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_view_context.png
index 3883710..54b4f47 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_view_context.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_view_context.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_window.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_window.png
index 8bc27e9..d130dc1 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/help_window.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/help_window.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_blocked.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_blocked.png
index 196b25b..aab3ebc 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_blocked.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_blocked.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png
index 0aac923..30eb447 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_details.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_details.png
index 2371d52..9f0785a 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_details.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_details.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_otherjobs.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_otherjobs.png
index d236a35..58389de 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_otherjobs.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_otherjobs.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_pref.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_pref.png
index 7b41927..f3f7c1b 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_pref.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/res_pref.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/welcome.png b/eclipse/plugins/org.eclipse.platform.doc.user/images/welcome.png
index 4bc9491..f3d2290 100644
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/images/welcome.png and b/eclipse/plugins/org.eclipse.platform.doc.user/images/welcome.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/notices.html b/eclipse/plugins/org.eclipse.platform.doc.user/notices.html
index b2201a7..f2293eb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/notices.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/notices.html
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <LINK REL="STYLESHEET" HREF="book.css" CHARSET="ISO-8859-1" TYPE="text/css">
@@ -13,7 +13,7 @@
 <h3>
 <a NAME="Notices"></a>Notices</h3>
 <p>
-The material in this guide is Copyright (c) IBM Corporation and others 2000, 2009.
+The material in this guide is Copyright (c) Eclipse contributors 2000, 2010.
 </p>
 <p>
 <a href="about.html">Terms and conditions regarding the use of this guide.</a>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences.htm
index aef9c2e..a525934 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -28,11 +28,21 @@ preferences page, you can indicate how to display help information.</P>
       <TH ROWSPAN="1" COLSPAN="1"> <P CLASS="Para"> Default</P></TH>
     </TR>
     <TR> 
-      <TH align="left"> <span style="font-weight: 400">Use external browsers</span></TH>
-      <TH align="left"> <span style="font-weight: 400">If embedded web browser 
-        is supported on your system, help window uses an embedded help browser
-        to display help contents, whenever possible, and this option is available.
-        Select it, to force help to use external browsers.  Use "Web
+      <TH align="left"> <span style="font-weight: 400">Open Help Search</span></TH>
+      <TH align="left"> <span style="font-weight: 400">Configures whether Help/Search (and Help/Index if configured) opens the help view or help contents.</span></TH>
+      <TH align="left"> <span style="font-weight: 400">In the dynamic help view</span></TH>
+    </TR>
+    <TR> 
+      <TH align="left"> <span style="font-weight: 400">Open help view documents</span></TH>
+      <TH align="left"><span style="font-weight: 400">This option allows you to 
+        determine whether the documents selected in the help view will be opened
+        in-place, in the editor area or in a browser.</span></TH>
+      <TH align="left"> <span style="font-weight: 400">in-place </span></TH>
+    </TR>
+    <TR> 
+      <TH align="left"> <span style="font-weight: 400">Open Help Contents</span></TH>
+      <TH align="left"> <span style="font-weight: 400">Allows you to open help contents
+      in an external web browser or in the Eclipse help browser.  Use "Web
         Browser" preference page to select browser to use.</span> </TH>
       <TH align="left"> <span style="font-weight: 400">Off</span></TH>
     </TR>
@@ -52,13 +62,6 @@ preferences page, you can indicate how to display help information.</P>
         help section of help view or in an infopop.</span></TH>
       <TH align="left"> <span style="font-weight: 400">in dialog tray</span></TH>
     </TR>
-    <TR> 
-      <TH align="left"> <span style="font-weight: 400">Open help view documents</span></TH>
-      <TH align="left"><span style="font-weight: 400">This option allows you to 
-        determine whether the documents selected in the help view will be opened
-        in-place or in the editor area.</span></TH>
-      <TH align="left"> <span style="font-weight: 400">in-place </span></TH>
-    </TR>
   </THEAD>
   <TBODY>
   </TBODY>
@@ -73,10 +76,6 @@ preferences page, you can indicate how to display help information.</P>
 <img src="../images/help_preference.png" alt="Help Preference Page" border="0">
 </P>
 
-<p>
-<b>Note:</b>  Selection performed on this page can affect how the help view is presented.  If the selected browser is not fully compatible with Internet Explorer or Mozilla, or has JavaScript disabled, the help view shown in the browser might be a simplified version.
-</p>
-
 <p><img border="0" src="../images/ngrelc.png" alt="Related concepts"><br>
 <a href="../concepts/help.htm">Help</a><br>
 <a href="../concepts/help_view.htm">Help view</a><br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences_content.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences_content.htm
index ae3e591..91446c3 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences_content.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/help_preferences_content.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
@@ -20,7 +20,7 @@ Use the
 <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
 <strong>Help > Content</strong></a>
 
-preference page to configure one or more remote server to include content from.
+preference page to configure one or more remote servers from which to include content.
 </P>
 <TABLE BORDER="1" cellspacing="0">
 <THEAD>
@@ -36,16 +36,32 @@ Description</P>
 </TR>
 <TR>
 <TH align="left">
-<span style="font-weight: 400">Include help content from a remote infocenter</span></TH>
+<span style="font-weight: 400">Include local help only</span></TH>
 <TH align="left">
-<span style="font-weight: 400">If checked, this option enables the use of remote
-help content. The rest of the fields on the page are only enabled if this option
-is checked.</span>
+<span style="font-weight: 400">Remote help content is not enabled.</span>
 </TH>
 </TR>
 <TR>
 <TH align="left">
-<span style="font-weight: 400">Add/Edit/Delete</span></TH>
+<span style="font-weight: 400">Include remote help and give local help priority</span></TH>
+<TH align="left">
+<span style="font-weight: 400">The help system will show locally installed help contents as well as help
+contents from the information centers specified in the table. If the same page exists both locally and 
+on the remote information center the local page will be shown.</span>
+</TH>
+</TR>
+<TR>
+<TH align="left">
+<span style="font-weight: 400">Include remote help and give it priority</span></TH>
+<TH align="left">
+<span style="font-weight: 400">The help system will show locally installed help contents as well as help
+contents from the information centers specified in the table. If the same page exists both locally and 
+on the remote information center the remote page will be shown.</span>
+</TH>
+</TR>
+<TR>
+<TH align="left">
+<span style="font-weight: 400">New/Edit/Delete</span></TH>
 <TH align="left">
 <span style="font-weight: 400">Add, edit or delete a remote data source</span></TH>
 </TR>
@@ -80,12 +96,12 @@ system will not try to read topics from that source.</span></TH>
 
 
 <P>
-<img src="../images/help_preference_content.png" alt="Help Content Preference Page" border="0" width="737" height="543"></P>
+<img src="../images/help_preference_content.png" alt="Help Content Preference Page" border="0" ></P>
 
 
 <P>
-Pressing the "Add" button opens a dialog to add a new infocenter, these are the 
-fields that can be entered in the Add new infocenter dialog. 
+Pressing the "New" button opens a dialog to add a new information center, these are the 
+fields that can be entered in the Add new information center dialog. 
 </P>
 
 <TABLE BORDER="1" cellspacing="0">
@@ -103,14 +119,14 @@ Description</P>
 <TH align="left">
 <span style="font-weight: 400">Name</span></TH>
 <TH align="left">
-<span style="font-weight: 400">A name for this infocenter</span></TH>
+<span style="font-weight: 400">A name for this information center</span></TH>
 </TR>
 <TR>
 <TH align="left">
 <span style="font-weight: 400">Host</span></TH>
 <TH align="left">
 <span style="font-weight: 400">Specifies the host name of the system that is running the
-infocenter to server remote help content. This must be a host name and cannot be a URL
+information center to server remote help content. This must be a host name and cannot be a URL
 (i.e. it cannot start with "http://")</span>
 </TH>
 </TR>
@@ -118,7 +134,7 @@ infocenter to server remote help content. This must be a host name and cannot be
 <TH align="left">
 <span style="font-weight: 400">Path</span></TH>
 <TH align="left">
-<span style="font-weight: 400">Specifies the context root of the Infocenter application
+<span style="font-weight: 400">Specifies the context root of the information center application
 running on the host.</span>
 </TH>
 </TR>
@@ -135,20 +151,20 @@ be selected and the correct port must be specified in the text field.</span>
 
 
 <P>
- <img border="0" src="../images/help_preference_infocenter.png" width="407" height="345"></P>
+ <img border="0" src="../images/help_preference_infocenter.png" ></P>
 
 <p>
-<img border="0" src="../images/ngrelc.png" alt="Related concepts" width="159" height="27"><br>
+<img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
 <a href="../concepts/help.htm">Help</a><br>
 </p>
 
 <p>
-<img border="0" src="../images/ngrelt.png" alt="Related tasks" width="159" height="27"><br>
+<img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
 <a href="../tasks/help.xhtml">Accessing help</a><br>
 </p>
 
 <p>
-<img border="0" src="../images/ngrelr.png" alt="Related reference" width="159" height="27"><br>
+<img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
 <a href="help_preferences.htm">Help preferences</a><br>
 <a href="ref-42.htm">Web Browser preferences</a><br>
 </p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-11.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-11.htm
index fd248b7..4b3909d 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-11.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-11.htm
@@ -153,6 +153,13 @@ page.</p>
 		<td style="vertical-align: top;">On </td>
 	</tr>
 	<tr> 
+		<td style="vertical-align: top; width: 25%;">Disable capping when comparing 
+		 large documents</td>
+		<td style="vertical-align: top;">The capping mechanism is used to speed up finding differences in large files. In that case, the result may be inaccurate and contain too many changes.
+		Turn this option on, if you prefer a precise result in favour of possibly longer calculation time.</td>
+		<td style="vertical-align: top;">Off </td>
+	</tr>
+	<tr> 
 		<td style="vertical-align: top; width: 25%;">When the end/beginning is 
 		reached while navigating an element</td>
 		<td style="vertical-align: top;">Use this option to configure what occurs when
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-14.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-14.htm
index 82079fb..91babc5 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-14.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-14.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -41,6 +41,17 @@ Default</P>
 <TBODY>
 <TR>
 <TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">Limit history size</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">If enabled, then options below will be used to limit the local history size on disk.</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">Enabled</P>
+</TD>
+</TR>
+<TR>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
 <P CLASS="Para"> Days to keep files</P>
 </TD>
 <TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-15.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-15.htm
index 1bcd2df..7efe4e2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-15.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-15.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -76,6 +76,24 @@ and docked to the side of the current perspective.
 Within the perspective
 </TD>
 </TR>
+
+<TR>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Hide empty fast view bar
+</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Use this option to specify visibility of an empty fast view bar. If this preference is set and the current perspective 
+doesn't contain any fast views, the fast view bar becomes invisible.
+</P>
+</TD>
+<TD>
+Fast view bar is always visible
+</TD>
+</TR>
+
 <TR>
 <TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
 <P CLASS="Para">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-19.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-19.htm
index ac1f1ae..40b3980 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-19.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-19.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -65,6 +65,11 @@ preferences page contains options which
       <TD COLSPAN="1" valign="top" align="left">Use this option to run Project Set import in the background.</TD>
       <TD COLSPAN="1" valign="top" align="left">Disabled</TD>
     </TR>         
+  	<TR> 
+      <TD COLSPAN="1" valign="top" align="left">Apply Patch in Synchronize view</TD>
+      <TD COLSPAN="1" valign="top" align="left">Use this option to preview patch changes in the Synchronize view.</TD>
+      <TD COLSPAN="1" valign="top" align="left">Disabled</TD>
+    </TR>
     <TR> 
       <TD COLSPAN="1" valign="top" align="left">Choose the presentation to be used when displaying 
         Workspace projects</TD>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-32.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-32.htm
index 28a5a86..34a7480 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-32.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-32.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
          
   <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -178,7 +178,7 @@ all projects that were previously mapped to this repository must first be unmapp
 <h3>Add to Branch List...</h3>
 <p> This command adds the selected project to the list of projects that are displayed 
   under the specified branch in the repositories view. This command only modifies 
-  the repositories view and does not effect the repository in any way. If you 
+  the repositories view and does not affect the repository in any way. If you 
   want to add the project to a branch, you can perform a <strong>Tag with Existing</strong> 
   after performing this operation.</p>
   
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-37.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-37.htm
index 8f1444b..f09327c 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-37.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-37.htm
@@ -109,7 +109,7 @@ New Project perspective options</h2>
 
   <div CLASS="Para">On the preferences page (<strong>Window > Preferences > General 
     > Perspectives</strong>), you can change the way that new projects are initially 
-    displayed. For details on how to change this option see <a href="ref-10.htm">Workbench</a>.</div>
+    displayed. For details on how to change this option see <a href="ref-10.htm">General</a>.</div>
 </div>
 
 <p><img border="0" src="../images/ngrelr.png" alt="Related reference" >
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-38.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-38.htm
index 134e0c1..c265c3f 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-38.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-38.htm
@@ -71,14 +71,16 @@ The name for the new folder. </P>
 </TABLE>
 <H2>Advanced</H2>
 <P>The <B>Advanced</B> button reveals or hides a section of the wizard used 
-to create a linked folder. Check the <B>Link to folder in the file system</B> 
-checkbox if you want the new folder to reference a folder in the file
-system. Use the field below the checkbox to enter a folder path or the
+to create a virtual or linked folder. Select the <B>Folder is not located in the file system</B>
+radio buton to create a virtual folder.  Select the <B>Link to folder in the file system</B> 
+radio button if you want the new folder to reference a folder in the file
+system. Use the field below the radio button to enter a folder path or the
 name of a path variable. Use the <B>Browse...</B> button to browse for a folder 
 in the file system. Use the <B>Variables...</B> button if you want to use a path 
 variable to reference a file system folder.</P>
 
 <P><IMG border="0" src="../images/ngrelc.png" alt="Related concepts" >
+<br><A href="../concepts/virtualfolders.htm">Virtual Folders</A>
 <br><A href="../concepts/concepts-13.htm">Linked resources</A>
 <br><A href="../concepts/cpathvars.htm">Path variables</A>
 </P>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-3a.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-3a.htm
index 81198c9..3ac162b 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-3a.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-3a.htm
@@ -17,7 +17,12 @@
 <p>Here is an example of what a fast view bars looks like: </P> 
 <P CLASS="Para">
 <img src="../images/Image211_fastview.png" alt="Fast View Bar" border="0"></P>
-
+<P CLASS="Para">
+By default the fast view bar is always visible. You can use the
+<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Perspectives)")'>
+<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+<b>General > Perspectives</b></a>
+  preference page to hide the fast view bar if it is empty.</P>
 <DIV CLASS="Topic">
 <h3>
 View Buttons</h3>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-58.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-58.htm
index d7f7d8d..d314a67 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-58.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-58.htm
@@ -98,6 +98,10 @@ This command navigates to undo the effect of the previous
 <a href="../tasks/tasks-46ag.htm">Finding a resource quickly</a>
 </p>
 
+<p><img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
+<a href="ref-dialog-open-resource.htm">Open Resource dialog</a>
+</p>
+
 
 
 </BODY>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-70.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-70.htm
index 58f6bd9..034201d 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-70.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-70.htm
@@ -467,6 +467,47 @@ resources being imported. </P>
 <P CLASS="Para">On</P>
 </TD>
 </TR>
+<TR>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Create links in workspace</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Create links to the original files and folders instead of copying them under the project folder. </P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">Off</P>
+</TD>
+</TR>
+<TR>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Create virtual folders</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Create hierarchy (folder) structure in the Workbench to accommodate the
+resources being imported. </P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">Off, unless the selection is a partial hierarchy, or the 'into folder' field is a virtual folder</P>
+</TD>
+</TR>
+<TR>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+Create link location relative to: PROJECT_LOC</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">
+When the 'Create links in workspace' option is set, the link file and folder locations are automatically set to be relative 
+to a variable instead of being an absolute path</P>
+</TD>
+<TD ROWSPAN="1" COLSPAN="1" valign="top" align="left">
+<P CLASS="Para">On</P>
+</TD>
+</TR>
 </TBODY>
 </TABLE>
 </DIV>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-73.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-73.htm
index e1b736b..fefed13 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-73.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-73.htm
@@ -3,14 +3,14 @@
 <HEAD>
 
 <meta name="copyright"
-	content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
+	content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
 
 <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1"
 	TYPE="text/css">
-<title>Navigator view</title>
+<title>Project Explorer view</title>
 <script language="JavaScript"
 	src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
 </HEAD>
@@ -36,19 +36,19 @@ perspective, click <a class="command-link"
 <P>This command collapses the tree expansion state of all resources
 in the view.</P>
 <H3>Link with Editor</H3>
-<P>This command toggles whether the Navigator view selection is
+<P>This command toggles whether the Project Explorer selection is
 linked to the active editor. When this option is selected, changing the
-active editor will automatically update the Navigator selection to the
+active editor will automatically update the Project Explorer selection to the
 resource being edited.</P>
 <P><BR>
 </P>
 <H2>Menus</H2>
 <P>Click the black upside-down triangle icon to open a menu of items
-specific to the Navigator view. Right-click inside the view to open a
+specific to the Project Explorer. Right-click inside the view to open a
 context menu. </P>
 <H3>Select Working Set</H3>
 <P>Opens the <B>Select Working Set</B> dialog to allow selecting a
-working set for the Navigator view.</P>
+working set for the Project Explorer.</P>
 <H3>Deselect Working Set</H3>
 <P>Deselects the current working set.</P>
 <H3>Edit Active Working Set</H3>
@@ -72,7 +72,7 @@ will be determined by your workbench configuration:</P>
 <H3>Link with Editor</H3>
 <P>See the toolbar item description above.</P>
 <P><BR>
-In addition to these menu items, the Navigator view menu shows a list of
+In addition to these menu items, the Project Explorer menu shows a list of
 recently used working sets that have been selected in the view.</P>
 <P><BR>
 </P>
@@ -121,7 +121,7 @@ to export resources to an external location.</P>
 <P CLASS="Para">This command refreshes the Workbench's view of the
 selected resource and its children. For example, this is used when you
 create a new file for an existing project outside the Workbench and want
-the file to appear in the Navigator view.</P>
+the file to appear in the Project Explorer view.</P>
 <DIV CLASS="Topic">
 <h3 CLASS="Head">Close Project</H3>
 <P CLASS="Para">The close project command is visible when an open
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-9.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-9.htm
index e7cff59..b609bc0 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-9.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-9.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
@@ -43,6 +43,13 @@
     <td>Off<br></td>
   </tr>
   <tr> 
+    <td>Always close unrelated projects without prompt</td>
+    <td>If this option is selected, unrelated projects will be closed without prompt.
+    <br>Uncheck this option if you want to be asked first.
+     </td>
+    <td>Off</td>
+  </tr>
+  <tr> 
     <td>Workspace save interval (in minutes) </td>
     <td>This number indicates how often the state of the workspace is automatically 
       saved to disk.</td>
@@ -78,7 +85,7 @@
         File line delimiter</P></TD>
     <TD ROWSPAN="1" COLSPAN="1" valign="top" align="left"> <P CLASS="Para"> Use 
         this option to specify the line delimiter to use for new text files. <strong>Note:</strong> 
-        This will generally not effect the file line delimiter for<br>
+        This will generally not affect the file line delimiter for<br>
         existing files.</P></TD>
     <TD ROWSPAN="1" COLSPAN="1" valign="top" align="left"> <P CLASS="Para">Default 
       </P></TD>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-anteditor.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-anteditor.htm
index 4e9efa4..63b3a32 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-anteditor.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-anteditor.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 <meta http-equiv="Content-Style-Type" content="text/css">
 
@@ -28,7 +28,7 @@ The editor includes the following features:
 </ul> 
 <p>
 	The most common way to invoke the Ant editor is to open an Ant buildfile from 
-  	one of the navigation views or <b><a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/ref-view-package-explorer.htm">Package explorer</a></b> using pop-up menus or by clicking 
+  	one of the navigation views or <b><a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/ref-view-package-explorer.htm">Package Explorer</a></b> using pop-up menus or by clicking 
   	the file (single or double-click depending on your preference settings).
 </p>  
 <p>
@@ -46,8 +46,8 @@ The editor includes the following features:
 	<img border="0" src="../images/ngrelr.png" alt="Related reference"><br>
     <a href="ref-anteditorprefs.htm">Ant editor preferences</a><br>
     <a href="ref-anticons.htm">External Tools and Ant icons</a><br>
-    <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/ref-view-outline.htm">Outline view</a><br>
-    <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/ref-view-package-explorer.htm">Package explorer</a>
+    <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/ref-view-outline.htm">Outline view</a><br>
+    <a href="PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/ref-view-package-explorer.htm">Package Explorer</a>
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm
index f441d27..dd0d645 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-cvs-decorations.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -13,7 +13,7 @@
 <BODY BGCOLOR="#ffffff">
 <H1 CLASS="Head">CVS Label Decorations</H1>
 <P CLASS="Para"> Label Decorations are used by CVS to show important synchronization 
-  information about workspace resources. Decorations can effect the text or the 
+  information about workspace resources. Decorations can affect the text or the 
   icon of the label associated with a resource. The text decorators are configurable 
   on the <a href="../tasks/tasks-107b.htm">CVS Label Decorations Preference page</a> which can also be used to indicate 
   which icons are to be enabled. Here is a description of the icons used by CVS.</P>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-dialog-open-resource.htm b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-dialog-open-resource.htm
new file mode 100644
index 0000000..9191552
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/reference/ref-dialog-open-resource.htm
@@ -0,0 +1,170 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+    <meta http-equiv="Content-Style-Type" content="text/css">
+    <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
+    <title>
+      Open Resource
+    </title>
+  </head>
+  <body>
+    <h1>
+      Open Resource
+    </h1>
+    <p>
+      This dialog allows you to browse the workbench for a file to open in an editor
+    </p>
+    <ul>
+      <li>
+        <strong>Select an item to open</strong>: In this field, type the first few
+        characters of the name of the file you want to select.
+        <p>The following pattern kinds are supported:</p>
+        <br>
+        <strong>Wildcards</strong>:<br>
+        <ul>
+          <li>
+            "*" for any string and "?" for any character
+          </li>
+          <li>
+            terminating "<" or " " (space)
+            to prevent the automatic prefix matching, e.g. "M*file<"
+            to match <code>Makefile</code> and <code>MockFile</code> but not <code>MakeTheFiles</code>
+          </li>
+        </ul>
+        <strong>Camel case</strong>:<br>
+        <ul>
+          <li>
+            "CS" for file names containing "C" and "S"
+            as upper-case letters in camel-case notation, e.g. <code>CreateStuff.java</code>
+          </li>
+          <li>
+            "CreSNo" for file names containing "Cre", "S",
+            and "No" as parts in camel-case notation, e.g.
+            <code>CreateStuffNow.jsp</code>
+          </li>
+          <li>
+              terminating "<" or " " (space) to fix the number of camel-case parts,
+              e.g. "CreS<"
+              matches "CreateStuff.java", but not
+              "CreateStuffNow.jsp" nor "Createstuff.txt".
+          </li>
+        </ul>
+        <strong>Folder prefixes</strong>:<br>
+        <p>
+        Both pattern kinds also support <strong>folder prefixes</strong>.
+        If the pattern contains a /, the part before the last / is used to match a path in the workspace, e.g.
+        "org.eclipse.ui/plugin.xml".<br>
+        Or a bit more complex: "*/ui</pack*.html" matches e.g. files called "package.html"
+        in a folder named "ui" (but not in folders like "uitools" or "*/ui/internal").
+        </p>
+        <br>
+        <strong>Relative paths</strong>:<br>
+        <p>
+        For example, "./Mak" matches all files starting with "Mak" in the folder of the active editor or selection, while
+        "../Mak" matches such files in the parent folder.
+        </p>
+        <br>
+      </li>
+      <li>
+        <strong>Matching items</strong>: This list displays matches for the pattern you type in the <strong>Select an item to open</strong> field.
+        <ul>
+          <li>Recently opened files show up in a history section at the top of the list.</li>
+          <li>If the pattern matches many files with the same name, the files that are closer to
+              the currently edited or selected resource are shown on top of the matching items list.</li>
+        </ul>
+      </li>
+    </ul>
+    
+    <p>
+    The <b>Open</b> button opens the file with the default editor for the chosen file.
+    A different editor can be selected in the context menu on a file or in the drop-down button besides the <b>Open</b> button.
+    </p>
+    
+    <p>
+      The behavior of the <strong>Open Resource</strong> dialog can be further customized using the dialog menu:
+    </p>
+    <table border="1" cellspacing="0" cellpadding="5" summary="Open resource options">
+      <caption>
+        Open Resource Options
+      </caption>
+      <thead>
+        <tr>
+          <th>
+            <p>
+              Option
+            </p>
+          </th>
+          <th>
+            <p>
+              Description
+            </p>
+          </th>
+          <th>
+            <p>
+              Default
+            </p>
+          </th>
+        </tr>
+      </thead>
+      <tbody>
+
+        <tr>
+          <td valign="top">
+            Show Status Line
+          </td>
+          <td valign="top">
+            When selected, the <strong>Open Resource</strong> dialog shows an additional bar at the bottom of the dialog which displays the
+            full path of the selected file.
+          </td>
+          <td valign="top">
+            Show status line
+          </td>
+        </tr>
+      
+        <tr>
+          <td valign="top">
+            Show Derived Resources
+          </td>
+          <td valign="top">
+            When selected, the <strong>Open Resource</strong> dialog also shows derived resources.
+          </td>
+          <td valign="top">
+            Do not show derived resources
+          </td>
+        </tr>
+      
+        <tr>
+          <td valign="top">
+            Working Set actions
+          </td>
+          <td valign="top">
+            The search scope can be restricted by selecting one or more working sets
+            or the global Window Working Set.
+          </td>
+          <td valign="top">
+            Show all files in the workspace.
+          </td>
+        </tr>
+        
+      </tbody>
+    </table>
+    
+    <p>
+      <img src="../images/ngrelt.png" alt="Related tasks" border="0" >
+    </p>
+    <p>
+      <a href="../tasks/tasks-46.htm">Opening Resources</a><br>
+    </p>
+    <p>
+      <img src="../images/ngrelr.png"  alt="Related reference">
+    </p>
+    <p>
+      <a href="../concepts/cworkset.htm">Working sets</a><br>
+      <a href="../reference/ref-58.htm">Navigate actions</a>
+    </p>
+    
+  </body>
+</html>
+
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_navigate.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_navigate.htm
index b3102df..999f811 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_navigate.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_navigate.htm
@@ -86,16 +86,6 @@ The
 <a href="../concepts/help_view.htm">Help view</a> provides the same features as the Help window, but in the same window as the workbench instead of a separate one.
 </p>
 
-<h4>Capabilities</h4>
-
-<p>
-To show documentation about capabilities that are disabled in the application,
-select the <img src="../images/help_icon_capabilities.png" alt="Show All Topics button"
-border="0"> <b>Show All Topics</b> button. When you choose to show all topics in
-the table of contents, the headings for documentation about any disabled
-activities are shown in the table of contents and also appear in search results.
-</p>
-
 <h4>Show in table of contents</h4>
 
 <p>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_scope.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_scope.htm
new file mode 100644
index 0000000..f013db9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/help_scope.htm
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2006. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." />
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css" />
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+<title>Using help scopes</title>
+</head>
+<body>
+
+<h2>Using help scopes</h2>
+
+<p>Help scopes allow you to restrict the scope of a search and limit the topics which show in 
+help contents. In the help view help the active scope only affects search results, in the help 
+browser it also affects the table of contents and keyword index. A scope can be defined to include 
+only specific books or topics from the table of contents. If the documentation set has been configured
+to allow scoping by criteria it is possible also to define scopes which satisfy specific criteria such 
+as "platform" = "linux".
+</p>
+
+<h3>Defining a topic based scope in help contents</h3>
+<p>From help contents the scope is changed by clicking on the link labelled "Scope" next to the search type in area.</p>
+<p> <img src="../images/help_scope_link.png" alt="Scope selection link." border="0" /> </p>
+<p>This opens a scope selection dialog, click "New ..." to create a new scope.</p>
+<p> <img src="../images/help_scope_select.png" alt="Scope selection dialog." border="0" /> </p>
+<p>This opens a new scope dialog which allow you to select which topics to show. If the documentation
+set does not support scoping by criteria the dialog will be similar to the one below, in this case
+only the topics in the Workbench Users Guide will be shown.</p>
+<p> <img src="../images/help_scope_new.png" alt="New scope dialog." border="0" /> </p>
+
+<h3>Defining a scope using criteria</h3>
+If the documentation has been set up to allow for scoping using criteria an additional 
+set of checkboxes is displayed 
+to the right of the topic selection area. In the screen shot below the documentation set has two criteria
+which can be used to define a scope, platform and version. In this example the scope would include
+all topics which were in the one of the two books on Java Development and which were identified by
+the documentation writer as being applicable to Windows or Linux.
+<p> <img src="../images/help_scope_criteria.png" alt="New scope dialog with criteria." border="0" /> </p>
+
+<p><img border="0" src="../images/ngrelc.png" alt="Related concepts"/><br/>
+<a href="../concepts/help.htm">Help</a><br/>
+</p>
+
+<p><img border="0" src="../images/ngrelt.png" alt="Related tasks"/><br/>
+<a href="help_navigate.htm">Navigating help topics</a><br/>
+</p>
+
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/running_eclipse.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/running_eclipse.htm
index 2599657..cfbd8e3 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/running_eclipse.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/running_eclipse.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2008. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -18,13 +18,13 @@
 by running the Eclipse executable included with the release (you also need a 1.4.2
 JRE, not included with the Eclipse SDK). On Windows, the executable file is called <samp>eclipse.exe</samp>,
 and is located in the <code>eclipse</code> sub-directory of the install. If
-installed at <code>c:\eclipse-SDK-3.5-win32</code>, the executable is <code>c:\eclipse-SDK-3.5-win32\eclipse\eclipse.exe</code>.
+installed at <code>c:\eclipse-SDK-3.6-win32</code>, the executable is <code>c:\eclipse-SDK-3.6-win32\eclipse\eclipse.exe</code>.
 
 <b>Note:</b> Set-up on most other operating environments is analogous. Special
 instructions for Mac OS X are listed <a href="#macosx">below</a>.</p>
 
 <h3>Allocating enough memory and solving OutOfMemoryErrors</h3>
-<p>By default, Eclipse will allocate up to 256 megabytes of Java heap memory. This should
+<p>By default, Eclipse will allocate up to 384 megabytes of Java heap memory. This should
 be ample for all typical development tasks. However, depending on the JRE
 that you are running, the number of additional plug-ins you are using, and
 the number of files you will be working with, you could conceivably have to increase this amount. 
@@ -35,10 +35,10 @@ Thus, to increase the available heap memory, you would typically use:</p>
   <p><code>eclipse -vmargs -Xmx<memory size></code></p>
 </blockquote>
 <p>with the <code><memory size></code> value set to greater than
-"256M" (256 megabytes -- the default). 
+"384M" (384 megabytes -- the default). 
 </p>
 <p>
-When using a Sun VM, you may also need to increase the size of the permanent
+When using an Oracle (Sun) VM, you may also need to increase the size of the permanent
 generation memory.  The default maximum is 64 megabytes, but more may
 be needed depending on your plug-in configuration and use.  When the VM runs
 out of permanent generation memory, it may crash or hang during class loading.
@@ -312,7 +312,7 @@ option from an account that has a write access to the install directory.</p>
       <TD vAlign=top> <PRE><b>-vm</b><strong>args</strong> <em>args</em></PRE></TD>
       <TD>When passed to the Eclipse, this option is used to customize the operation 
         of the Java VM used to run Eclipse. If specified, this option must come 
-        at the end of the command line. The given arguments are dependant on VM 
+        at the end of the command line. The given arguments are dependent on VM 
         that is being run.</TD>
       <TD>1.0</TD>
     </tr>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-126.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-126.htm
index eaef0c3..ea98016 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-126.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-126.htm
@@ -6,13 +6,14 @@
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<META name="keywords" content="uninstall,uninstalling,uninstalling features, uninstall features">
 <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
-<title>Uninstalling software</title>
+<title>Uninstalling software (formerly uninstalling features)</title>
 <script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
 </HEAD>
 
 <BODY BGCOLOR="#ffffff">
-<H1>Uninstalling software</H1>
+<H1>Uninstalling software (aka uninstalling features)</H1>
 <p>The <b>Uninstall</b> wizard allows you to review and uninstall items in your
 configuration.  This wizard is shown when you select items and press <b>Uninstall...</b> from the
 <b>Installed Software</b> page.  To uninstall software from your system:  
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-132.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-132.htm
index 66e39e7..85e958f 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-132.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-132.htm
@@ -42,7 +42,7 @@ what installed software item required that feature.  To browse the feature detai
 <a href="tasks-126.htm">Uninstalling software</a><br>
 </p>
 <P><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
-<a href="concepts-25.htm">Features</a><br>
+<a href="../concepts/concepts-25.htm">Features</a><br>
 </p>
 </BODY>
 </HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-1e.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-1e.htm
index c01bcb2..84fc2eb 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-1e.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-1e.htm
@@ -28,7 +28,8 @@ outside of the project's location.  These special folders and files are called
 <a href="../concepts/concepts-2.htm">Workbench</a><br>
 <a href="../concepts/concepts-12.htm">Resources</a><br>
 <a href="../concepts/concepts-17.htm">Resource hierarchies</a><br>
-<a href="../concepts/concepts-13.htm">Linked resources</a>
+<a href="../concepts/concepts-13.htm">Linked resources</a><br>
+<a href="../concepts/resourcefilters.htm">Resource filters</a>
 </p>
 
 <p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
@@ -42,7 +43,8 @@ outside of the project's location.  These special folders and files are called
 <a href="tasks-63cg.htm">Copying resources</a><br>
 <a href="tasks-66.htm">Renaming resources</a><br>
 <a href="tasks-67.htm">Deleting resources</a><br>
-<a href="tasks-49.htm">Viewing resources properties</a>
+<a href="tasks-49.htm">Viewing resources properties</a><br>
+<a href="tasks-97.htm">Creating resource filters</a>
 </p>
 
 </BODY>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-3.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-3.htm
index 04b3668..bf168bc 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-3.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-3.htm
@@ -39,7 +39,7 @@
 <a href="tasks-3e.htm">Moving and docking views</a><br>
 <a href="tasks-9b.htm">Creating fast views</a><br>
 <a href="tasks-9l.htm">Detaching views</a><br>
-<a href="../gettingStarted\qs-39g.htm">Maximizing a view or editor</a><br>
+<a href="../gettingStarted/qs-39g.htm">Maximizing a view or editor</a><br>
 <a href="tasks-9j.htm">Resetting perspectives</a>
 </p>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45.htm
index 0c67f91..06e85ad 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45.htm
@@ -32,7 +32,7 @@ outside of the project's location.  These special folders and files are called
   <li>Specify the name of the folder as it will appear in the workbench.  This 
   name can be different from the name of the folder in the file system.</li>
   <li>Click <b>Advanced</b>.</li>
-  <li>Check <b>Link to folder in the file system</b>.</li>
+  <li>Check <b>Link to alternate location (Linked Folder)</b>.</li>
   <li>Enter a file system path, or click <b>Browse</b> to select a folder in the file system.</li>
   <li>Click <b>Finish</b>.</li>
 </ol>
@@ -67,8 +67,11 @@ above:
 <b>General > Workspace > Linked Resources</b></a>
 preference page also allows you to define path variables. 
 </p>
-<P>Note that, once you create a linked resource you will not be able to change
-the link target path that you entered in step 6. or 8. above.</P>
+<P>Note that, once you create a linked resource you will be able to change
+the link target path that you entered in step 6. or 8. above. by selecting the
+<b>Edit...</b>  button in the
+<b>File > Properties > Resource</b> property page of the linked resource.
+</P>
 <P><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
 <a href="../concepts/concepts-12.htm">Resources</a><br>
 <a href="../concepts/concepts-17.htm">Resource hierarchies</a><br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45a.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45a.htm
new file mode 100644
index 0000000..ad43c85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-45a.htm
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Creating virtual folders</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+</HEAD>
+
+<BODY BGCOLOR="#ffffff">
+<H1>Creating virtual folders</H1>
+<p>
+Virtual folders are folders that exist only in the Eclipse workspace tree.
+</p>
+
+<P>To create a virtual folder:
+</P>
+
+<ol>
+  <li>In one of the navigation views, right-click the project or folder
+    where you want to create the virtual folder.</li>
+  <li>From the pop-up menu, select
+  <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.ui.wizards.new.folder)")'>
+  <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+  <b>New > Folder</b></a>.</li>
+  <li>Specify the name of the folder as it will appear in the workbench.  This 
+  name can be different from the name of the folder in the file system.</li>
+  <li>Click <b>Advanced</b>.</li>
+  <li>Select <b>Folder is not located in the file system (Virtual Folder)</b>.</li>
+  <li>Click <b>Finish</b>.</li>
+</ol>
+
+<P><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
+<a href="tasks-42.htm">Creating a project</a><br>
+<a href="tasks-44.htm">Creating a file</a><br>
+<a href="tasks-43.htm">Creating a folder</a><br>
+</P>
+
+<p><img border="0" src="../images/ngrelr.png" alt="Related references" >
+<br><a href="../reference/ref-38.htm">New Folder wizard</a> 
+<br><a href="../reference/ref-39.htm">New File wizard</a> 
+</p>
+
+<p><img border="0" src="../images/ngrelc.png" alt="Related Concepts" >
+<br><a href="../concepts/virtualfolders.htm">Virtual Folders</a> 
+</p>
+
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-46ag.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-46ag.htm
index b997f0b..3df374d 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-46ag.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-46ag.htm
@@ -50,6 +50,9 @@ but immediately opens the matching resource for editing.
 <a href="tasks-48b.htm">Showing or hiding files in the Project Explorer view</a>
 </p>
 
+<p><img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
+<a href="../reference/ref-dialog-open-resource.htm">Open Resource dialog</a>
+</p>
 
 
 </BODY>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-68c.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-68c.htm
index 0d004ce..7c11525 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-68c.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-68c.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -69,8 +69,11 @@
 <ol>
   <li>Select the resource that the patch was generated on. This resource should 
     contain the same file revisions as the line-up on which the patch was generated.</li>
-  <li>From the pop-up menu, select <b>Team > Apply Patch...</b>. The Resource 
-    Patcher wizard will open.</li>
+  <li>From the pop-up menu, select <b>Team > Apply Patch...</b>. The Apply 
+    Patch wizard will open.<br><br>
+    This can also be achieved by copying the patch contents to the clipboard 
+    and pasting it directly into the Package Explorer view by choosing <b>Edit > Paste</b>. 
+    In this case, you can skip the next step.</li>
   <li>Indicate where the patch is to be found:
     <ol type="a">
       <li><i>File</i> - the patch is in a file on the local file system. Either 
@@ -80,10 +83,15 @@
         is safer to use a file based patch. Line endings may not be handled properly 
         if the clipboard is used and the patch was generated on a different platform 
         (i.e. Linux vs. Windows).</li>
+       <li><i>URL</i> - the patch is located under the given URL. <b>Warning:</b>
+       Make sure the URL you entered is valid and contains a proper patch. 
+       Otherwise you won't be able to apply it. Also, please keep in mind that 
+       applying a patch directly from a URL may take some time.
+       </li> 
        <li><i>Workspace</i> - the patch has been saved somewhere in the workspace.</li>
     </ol> Click <b>Next</b> to see the effect of applying the patch.</li>
   <li>
-  <b>Optional Step</b>: <i>this step only applies if you have a patch rooted at the project or selection level - workspace
+  <b>Optional Step</b>: <i>this step applies, only if you have a patch rooted at the project or selection level - workspace
   rooted patches will automatically proceed to the Patch Preview Page.</i> In the Patch Target Specification page, you should
   select the resource that is to act as the root of the patch.
   </li>
@@ -111,6 +119,50 @@
     now contain outgoing changes for each file modified by the patch.</li>
 </ol>
 
+<p>Patches can be applied by synchronizing them with a local content</p>   
+
+<H3>To synchronize with a patch:</H3>
+<ol>
+	<li>
+  		From the Team Synchronizing perspective select the <strong>Synchronize...</strong> 
+		action from the Synchronize <img src="../images/synch_participants.png" alt="" border="0" > 
+		button drop down.
+	</li>
+	<li>
+		Select <strong>Synchronize with Patch</strong> from the list of possible synchronization types 
+		and click <strong>Next</strong>.
+	</li>
+	<li>Indicate where the patch is to be found:
+    <ol type="a">
+      <li><i>File</i> - the patch is in a file on the local file system. Either 
+        type in the full path to the file or use the <b>Browse...</b> button to 
+        find the file.</li>
+      <li><i>Clipboard</i> - the patch is on the clipboard. <b>Warning:</b> It 
+        is safer to use a file based patch. Line endings may not be handled properly 
+        if the clipboard is used and the patch was generated on a different platform 
+        (i.e. Linux vs. Windows).</li>
+       <li><i>URL</i> - the patch is located under the given URL. <b>Warning:</b>
+       Make sure the URL you entered is valid and contains a proper patch. 
+       Otherwise you won't be able to apply the patch. Also, please keep in mind that 
+       applying a patch directly from a URL may take some time.
+       </li>
+       <li><i>Workspace</i> - the patch has been saved somewhere in the workspace.</li>
+    </ol> Click <b>Next</b> to see the effect of applying the patch.
+    </li>
+	<li>
+		<b>Optional Step</b>: <i>this step applies, only if you have a patch rooted at the project or selection level - workspace
+		rooted patches will automatically proceed to the Patch Preview Page.</i> In the Patch Target Specification page, you should
+		select the resource that is to act as the root of the patch.
+	</li>
+	<li>
+		<b>Optional Step</b>: <i>this step applies, only if your patch refers to projects that are inaccessible - if all projects from the patch are present in the workspace
+		and are open, this page will be skipped.</i> In the Inaccessible Projects page you can open any closed projects. Moreover, details about non-existing projects will be displayed.
+		Projects that are closed or do not exist in the workspace cannot be patched.
+	</li>
+	<li>
+		On the final page, click <b>Finish</b> to preview patch changes in the Synchronize view.
+	</li>
+</ol>
 
 <H3>Options for applying a patch</H3>
 
@@ -144,15 +196,21 @@
    	  		Use the <i>Reverse patch</i> option for patch files that already have been applied to your
    	  		workspace. This option is also useful to undo or redo a patch.
   		</li>
-  		
+
   		<li>
   			For Workspace patches, you can select another project in your workspace
   			to apply the patch changes to. To do this, select a project in the top pane and select <b>Move</b> from the context menu. This will launch a dialog with a list of all available projects in your
   			workspace. Select a project and click <b>OK</b>; the patch changes will be applied to your selected project.
   		</li>
+
   		<li>
-  		Use the <i>Show Excluded</i> 
-  		option to show the hunks which you have already selected to not include in the patch.</li>
+			Use the <i>Show Excluded</i> option to show the hunks which you have already selected to not include in the patch.
+		</li>
+
+		<li>
+			When synchronizing with a patch, the options above are available in the Synchronize View's pull down menu.
+			You can also switch between available models to get extra information about the changes being applied.
+  		</li>
 
    	</ol>
 
@@ -162,11 +220,13 @@
 </p>
 
 <p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
-<a href="tasks-68.htm">Comparing resources</a>
+<a href="tasks-68.htm">Comparing resources</a><br>
+<a href="tasks-115.htm">Synchronizing with the repository</a>
 </p>
 
 
 <p><img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
+<a href="../reference/ref-19.htm">Team</a>
 <a href="../reference/ref-47.htm">CVS</a>
 </p>
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-88.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-88.htm
index b4f734b..4265d78 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-88.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-88.htm
@@ -23,6 +23,8 @@ each resource in the Workbench:
   <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.FileStates)")'>
   <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
   <b>General > Workspace > Local History</b></a> preference page.</li>
+  <li>In the <b>Limit history size</b> field, specify whether you want
+  to limit the local history size using following options.</li>
   <li>In the <b>Days to keep files</b> field, type the number of days that you 
     want to keep records for any one Workbench resource. For example, if you type 
     7, then a history of saved states from the last seven days will be kept.</li>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-97.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-97.htm
new file mode 100644
index 0000000..7ff46bd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-97.htm
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html lang="en">
+<HEAD>
+
+<meta name="copyright" content="Copyright (c) Freescale Semiconductor and others 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
+<title>Creating resource filters</title>
+<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>
+</HEAD>
+
+<BODY BGCOLOR="#ffffff">
+<H1>Creating resource filters</H1>
+<p>
+<a href="../concepts/resourcefilters.htm">Resource filters</a> allow the user to configure 
+systematically which file system files and folders are included in the workspace during the 
+refresh operation.
+</p>
+
+<P>To create a resource filter:
+</P>
+
+<ol>
+  <li>In one of the navigation views, right-click the project or folder
+    where you want to create the resource filter.</li>
+  <li>From the pop-up menu, select <b>Properties</b>. The properties dialog will open.</li>
+  <li>Expand the <b>Resource</b> section.</li>
+  <li>Click the <b>Resource Filters</b> section.</li>
+  <li>Click <b>Add...</b>.</li>
+  <li>Specify the filter type, to what entries it applies to, and enter the condition.</li>
+  <li>Click <b>OK</b>.</li>
+  <li>Click <b>OK</b>.</li>
+</ol>
+
+<P>
+</P>
+<P><img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
+<a href="../concepts/resourcefilters.htm">Resources Filters</a><br>
+<a href="../concepts/concepts-12.htm">Resources</a><br>
+<a href="../concepts/concepts-17.htm">Resource hierarchies</a><br>
+</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-9c.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-9c.htm
index e98c711..6708d92 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-9c.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/tasks-9c.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -84,6 +84,12 @@ the fast view's toolbar </P>
   bar (or close the fast view and then drag its button from the shortcut bar) 
   and drop it on the workbench like a normal view.</P>
 <p></p>
+<P CLASS="Para">
+An empty fast view bar can be hidden using the 'Hide empty fast view bar' preference on the
+<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Perspectives)")'>
+<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
+<b>General > Perspectives</b></a>
+  preference page.</P>
 
 <P><img border="0" src="../images/ngrelc.png" alt="Related concepts."  ><br>
   <a href="../concepts/concepts-5.htm">Views</a><br>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/timpandexp.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/timpandexp.htm
index 39e06f3..47726aa 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/timpandexp.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/timpandexp.htm
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -15,8 +15,7 @@
 <h1>Importing and exporting preferences</h1>
 <p CLASS="Para">Preference files can be both imported to and exported from the 
   Workbench allowing you to easily share individual or group preferences. </p>
-<p CLASS="Para">The Import wizard can be used to import preferences from the local 
-  file system to the Workbench.</p>
+<p CLASS="Para">The Import wizard can be used to import preferences from the file system to the Workbench.</p>
 <p CLASS="Para">To import a preference file:</p>
 <ol>
   <li>Select 
@@ -24,21 +23,14 @@
   <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
   <strong>File > Import</strong></a>.</li>
   <li>In the Import wizard select <strong>General > Preferences</strong> and click <strong>Next</strong>.</li>
-  <li>Click <strong>Browse...</strong> and locate the Preferences file on the 
-    local file system.</li>
-  <li>Select one of the following: 
-    <ul>
-      <li><strong>Import all</strong> to accept all of the preferences defined 
-        in the file.</li>
-      <li><strong>Choose specific preferences to import</strong> to select only 
-        specified preferences defined in the file.</li>
-    </ul>
-  </li>
+  <li>Click <strong>Browse...</strong> and locate the Preferences file on the file system.</li>
+  <li>Click <strong>Import all</strong> to accept all of the preferences defined in the file.</li>
+  <li>If you want to import only few preferences, choose them from the list.</li>
   <li>Click <strong>Finish</strong>.</li>
 </ol>
 <p CLASS="Para"> </p>
 <p CLASS="Para">The Export wizard can be used to export preferences from the Workbench 
-  to the local file system.</p>
+  to the file system.</p>
 <p CLASS="Para">To export a preference file:</p>
 <ol>
   <li>Select
@@ -46,15 +38,9 @@
   <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
   <strong>File > Export</strong></a>.</li>
   <li>In the Export wizard select <strong>General > Preferences</strong> and click <strong>Next</strong>.</li>
-  <li>Select one of the following: 
-    <ul>
-      <li><strong>Export all</strong> to add all of the preferences to the file.</li>
-      <li><strong>Choose specific preferences to export</strong> to add only specified 
-        preferences to the file.</li>
-    </ul>
-  </li>
-  <li>Click <strong>Browse...</strong> and locate the preferences file on the 
-    local file system.</li>
+  <li>Click <strong>Export all</strong> to add all of the preferences to the file.</li>  
+  <li>If you want to export only few preferences, choose them from the list.</li>
+  <li>Click <strong>Browse...</strong> and locate the preferences file on the file system.</li>
   <li>Click <strong>Finish</strong></li>
 </ol>
 <p><strong>Note:</strong> If no changes have been made to the original preference 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/topenmode.htm b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/topenmode.htm
index 633c344..9df8b19 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tasks/topenmode.htm
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tasks/topenmode.htm
@@ -2,7 +2,7 @@
 <html lang="en">
 <HEAD>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
@@ -46,7 +46,7 @@ navigate to it.
 </p>
 
 <p><img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
-<a href="../reference/ref-10.htm">Workbench</a><br>
+<a href="../reference/ref-10.htm">General</a><br>
 </p>
 
 
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tips/images/preference-transfer-compiler.png b/eclipse/plugins/org.eclipse.platform.doc.user/tips/images/preference-transfer-compiler.png
new file mode 100644
index 0000000..0221293
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/tips/images/preference-transfer-compiler.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png b/eclipse/plugins/org.eclipse.platform.doc.user/tips/images/res_build.png
similarity index 100%
copy from eclipse/plugins/org.eclipse.platform.doc.user/images/res_build.png
copy to eclipse/plugins/org.eclipse.platform.doc.user/tips/images/res_build.png
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/tips/platform_tips.html b/eclipse/plugins/org.eclipse.platform.doc.user/tips/platform_tips.html
index e9621d0..eacd732 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/tips/platform_tips.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/tips/platform_tips.html
@@ -3,7 +3,7 @@
 
 <head>
 
-<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2010. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
 
 <meta http-equiv="Content-Language" content="en-us">
 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -394,6 +394,14 @@ productivity. They are divided into the following sections:</p>
       resources are not affected. Copy and paste also work.</td>
   </tr>
   <tr> 
+    <td width="20%" valign="top" align="left"><b>Transfer preferences</b></td>
+    <td width="80%" valign="top" align="left">The preferences can be transferred from
+    one workspace to another by exporting and importing them. In addition, it is possible
+    to only do this for selected categories:
+    <p><img src="images/preference-transfer-compiler.png" alt="New Java Compiler Preference transfer"></p> 
+    </td>
+  </tr>
+  <tr> 
     <td width="20%" valign="top" align="left"><b>Workspace project management</b></td>
     <td width="80%" valign="top" align="left">Use the <b>Project > Close Project</b> 
       command to manage projects within your workspace. When a project is closed, 
@@ -519,7 +527,7 @@ productivity. They are divided into the following sections:</p>
     </td>
     <td valign="top" align="left">Many operations can be optionally 
         run in the background so that you can continue working while they complete.
-      <p><img src="../images/res_build.png" alt="Progress dialog with Run in background button"></p>
+      <p><img src="images/res_build.png" alt="Progress dialog with Run in background button"></p>
       <p>Click <b>Always run in background</b> or toggle this on the
       
       <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Workbench)")'>
@@ -998,6 +1006,13 @@ productivity. They are divided into the following sections:</p>
       characters) and display all the tags that match what you have typed so far. 
       This greatly simplifies finding the desired tag when performing these operations.</TD>
   </TR>
+  <TR>
+    <TD valign="top" align="left"><strong>Applying patches in Sync View</strong>
+      </TD>
+    <TD valign="top" align="left">You can apply patches using the Synchronize view.
+    	This way of applying patches allows to work with other Eclipse features simultaneously, 
+    	so editing files in order to match the patch is possible.</TD>
+  </TR>   
 </table>
 
 </body>
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Concepts.xml b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Concepts.xml
index 430f36f..9564452 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Concepts.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Concepts.xml
@@ -14,7 +14,9 @@
       <topic label="Resources" href="concepts/concepts-12.htm" />
       <topic label="Resource hierarchies" href="concepts/concepts-17.htm" />
       <topic label="Linked resources" href="concepts/concepts-13.htm" />
+      <topic label="Virtual folders" href="concepts/virtualfolders.htm" />
       <topic label="Path variables" href="concepts/cpathvars.htm" />
+      <topic label="Resource filters" href="concepts/resourcefilters.htm" />
       <topic label="Working sets" href="concepts/cworkset.htm"/>
       <topic label="Builds" href="concepts/concepts-22.htm" />
       <topic label="Local history" href="concepts/concepts-17a.htm" />
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Reference.xml b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Reference.xml
index a0bbaec..c7f0ad7 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Reference.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Reference.xml
@@ -287,6 +287,7 @@
 
 	<topic label="Search">
 		<topic label="File search" href="reference/ref-45.htm"></topic>
+        <topic label="Open Resource dialog" href="reference/ref-dialog-open-resource.htm"/>
 	</topic>
 
 	<topic label="Workbench menus">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Tasks.xml b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Tasks.xml
index 05ee934..b4b9d38 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/topics_Tasks.xml
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/topics_Tasks.xml
@@ -68,11 +68,13 @@
   <topic label="Creating a folder" href="tasks/tasks-43.htm" />
   <topic label="Creating a file" href="tasks/tasks-44.htm" />
   <topic label="Creating linked resources" href="tasks/tasks-45.htm" />
+  <topic label="Creating virtual folders" href="tasks/tasks-45a.htm" />
   <topic label="Moving resources" href="tasks/tasks-63.htm" />
   <topic label="Copying resources" href="tasks/tasks-63cg.htm" />
   <topic label="Renaming resources" href="tasks/tasks-66.htm" />
   <topic label="Deleting resources" href="tasks/tasks-67.htm" />
   <topic label="Viewing resources properties" href="tasks/tasks-49.htm" />
+  <topic label="Creating resource filters" href="tasks/tasks-97.htm" />
 </topic>
 
 <anchor id="t_afterworking_projects" />
@@ -161,7 +163,10 @@
 <!-- help topics -->
 <topic label="Accessing help" href="tasks/help.xhtml" >
   <topic label="Navigating help topics" href="tasks/help_navigate.htm" />
-  <topic label="Searching help" href="tasks/help_search.htm" />
+  <topic href="tasks/help_search.htm" label="Searching help">
+  </topic>
+  <topic href="tasks/help_scope.htm" label="Using help scopes">
+  </topic>
   <topic label="Accessing context-sensitive help" href="tasks/help_context.htm" />
   <topic label="Help display settings" href="tasks/help_settings.htm" />
   <topic label="Help accessibility" href="tasks/help_accessibility.htm">
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/alternate.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/alternate.png
deleted file mode 100644
index bdcbdbd..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/alternate.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-in-sync-view-preference.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-in-sync-view-preference.png
new file mode 100644
index 0000000..f25ac10
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-in-sync-view-preference.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-syncview.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-syncview.png
deleted file mode 100644
index 80efd92..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-syncview.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-ws.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-ws.png
new file mode 100644
index 0000000..5da82d5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/apply-patch-ws.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/block-selection-mode.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/block-selection-mode.png
deleted file mode 100644
index 2f46941..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/block-selection-mode.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/breakpoint-details.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/breakpoint-details.png
new file mode 100644
index 0000000..736c3a5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/breakpoint-details.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cnf-gointo.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cnf-gointo.png
deleted file mode 100644
index ad95363..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cnf-gointo.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cocoa.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cocoa.png
deleted file mode 100644
index 3b6c5b5..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/cocoa.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/collapse-projection.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/collapse-projection.png
deleted file mode 100644
index 9f5b6a9..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/collapse-projection.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/commitWizardLogicalModels.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/commitWizardLogicalModels.png
new file mode 100644
index 0000000..ee950d5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/commitWizardLogicalModels.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/configure-branches.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/configure-branches.png
new file mode 100644
index 0000000..0c76b68
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/configure-branches.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/contentMergeViewerSwitching.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/contentMergeViewerSwitching.png
deleted file mode 100644
index d04da64..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/contentMergeViewerSwitching.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customicon.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customicon.png
deleted file mode 100644
index 8b33158..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customicon.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customize-perspective.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customize-perspective.png
deleted file mode 100644
index 58565ca..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/customize-perspective.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-1.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-1.png
deleted file mode 100644
index 0d90897..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-1.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-2.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-2.png
deleted file mode 100644
index de5f8bc..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-2.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-3.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-3.png
deleted file mode 100644
index 10cacfc..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/debug-breadcrumb-3.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/dynamicPathVariables.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/dynamicPathVariables.png
new file mode 100644
index 0000000..121aabc
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/dynamicPathVariables.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/edit-button-in-property.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/edit-button-in-property.png
new file mode 100644
index 0000000..7f439c8
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/edit-button-in-property.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/expressions-columns.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/expressions-columns.png
new file mode 100644
index 0000000..85b354f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/expressions-columns.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-attributes-ui.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-attributes-ui.png
new file mode 100644
index 0000000..57c5536
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-attributes-ui.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-system-import.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-system-import.png
new file mode 100644
index 0000000..0781f1c
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/file-system-import.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/gotoLine.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/gotoLine.png
deleted file mode 100644
index 8baa697..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/gotoLine.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/hide-fvb.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/hide-fvb.png
new file mode 100644
index 0000000..cf66ebd
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/hide-fvb.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-type-dialog.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-type-dialog.png
new file mode 100644
index 0000000..ef8a7e0
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-type-dialog.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-zip.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-zip.png
new file mode 100644
index 0000000..0876756
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/import-zip.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/inaccessible-projects-page.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/inaccessible-projects-page.png
new file mode 100644
index 0000000..7174268
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/inaccessible-projects-page.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/injection_graph_func.js b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/injection_graph_func.js
deleted file mode 100644
index 7216ce4..0000000
--- a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/injection_graph_func.js
+++ /dev/null
@@ -1,463 +0,0 @@
-var skype_injection_path = 'chrome://skype_ff_toolbar_win/content/';
-var skype_tool = null;
-
-/*window.addEventListener("click",skype_click_handler,true);
-function skype_click_handler(event)
-{
-	if (skype_tool)
-		skype_tool.closemenu();
-	//HideSkypeMenuFull();
-} */
-
-//CALL BUTTON
-var SkypeActiveCallButtonPart = 0;
-function SkypeSetCallButtonPart(obj)
-{
-	if (obj.getAttribute('id') == '__skype_highlight_id_left')
-	{
-		SkypeActiveCallButtonPart = 0;
-	}
-	else if (obj.getAttribute('id') == '__skype_highlight_id_right')
-	{
-		SkypeActiveCallButtonPart = 1;
-	}
-}
-
-function SkypeSetCallButton(obj, hl, isInternational, isFax)
-{
-	var cb_part_l = null;
-	var cb_part_ml = null;
-	var cb_part_mr = null;
-	var cb_part_r = null;
-	if (obj.getAttribute('rtl') == 'false')
-	{
-		cb_part_l = obj.firstChild.firstChild;
-		cb_part_ml = obj.firstChild.lastChild;
-		cb_part_mr = obj.lastChild.firstChild;
-		cb_part_r = obj.lastChild.lastChild;
-
-		cb_flag = obj.firstChild.lastChild.firstChild;
-		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
-			cb_flag = null;
-	}
-	else
-	{
-		cb_part_l = obj.lastChild.lastChild;
-		cb_part_ml = obj.lastChild.firstChild;
-		cb_part_mr = obj.firstChild.lastChild;
-		cb_part_r = obj.firstChild.firstChild;
-
-		cb_flag = obj.lastChild.firstChild.lastChild;
-		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
-			cb_flag = null;
-	}
-
-	if (hl == 1)
-	{
-		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_l.gif')";
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";
-		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_m.gif')";
-
-
-		if (isInternational == "0")
-		{
-			if (SkypeActiveCallButtonPart == 0)    //left
-			{
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseonflag_r"+(isFax?"_fax":"")+".gif')";
-				//shadow
-				if (cb_flag)
-				{
-					cb_flag.style.top = '1px';
-					cb_flag.style.left = '1px';
-					/*top right bottom left*/
-					cb_flag.style.padding = '1px 0px 0px 1px';//'2px 0px 0px 0px';
-				}
-			}
-			else                            //right
-			{
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
-				//flag
-				if (cb_flag)
-				{
-					cb_flag.style.top = '0px';
-					cb_flag.style.left = '0px';
-					cb_flag.style.padding = '0px 1px 1px 0px';//'0px 1px 1px 0px';
-					cb_flag.style.margin = '0px 0px 2px 0px;';
-				}
-			}
-		}
-		else
-		{
-			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_mouseover_r"+(isFax?"_fax":"")+".gif')";
-			//flag
-			if (cb_flag)
-			{
-				cb_flag.style.top = '0px';
-				cb_flag.style.left = '0px';
-				cb_flag.style.padding = '0px 1px 1px 0px';
-				cb_flag.style.margin = '0px 0px 2px 0px;';
-			}
-		}
-	}
-	else
-	{
-		cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_l.gif')";
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
-		cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_m.gif')";
-		cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_normal_r"+(isFax?"_fax":"")+".gif')";
-
-		//flag
-		if (cb_flag)
-		{
-			cb_flag.style.top = '0px';
-			cb_flag.left = '0px';
-			cb_flag.style.padding = '0px 1px 1px 0px';
-			cb_flag.style.margin = '0px 0px 2px 0px;';
-		}
-	}
-}
-var skype_cb_l = '';
-var skype_cb_m = '';
-var skype_cb_r = '';
-
-function SkypeSetCallButtonPressed(obj, pr, isInternational, isFax)
-{
-	var cb_part_l = null;
-	var cb_part_ml = null;
-	var cb_part_mr = null;
-	var cb_part_r = null;
-	if (obj.getAttribute('rtl') == 'false')
-	{
-		cb_part_l = obj.firstChild.firstChild;
-		cb_part_ml = obj.firstChild.lastChild;
-		cb_part_mr = obj.lastChild.firstChild;
-		cb_part_r = obj.lastChild.lastChild;
-
-		cb_flag = obj.firstChild.lastChild.firstChild;
-		if (cb_flag && cb_flag.isSameNode(obj.firstChild.firstChild.firstChild) == true)
-			cb_flag = null;
-	}
-	else
-	{
-		cb_part_l = obj.lastChild.lastChild;
-		cb_part_ml = obj.lastChild.firstChild;
-		cb_part_mr = obj.firstChild.lastChild;
-		cb_part_r = obj.firstChild.firstChild;
-
-		cb_flag = obj.lastChild.firstChild.lastChild;
-		if (cb_flag && cb_flag.isSameNode(obj.lastChild.lastChild.lastChild) == true)
-			cb_flag = null;
-	}
-	if (pr == 1)
-	{
-		skype_cb_l = cb_part_l.style.backgroundImage;//getAttribute('src');
-		skype_cb_m = cb_part_mr.style.backgroundImage;
-		skype_cb_r = cb_part_r.style.backgroundImage;//getAttribute('src');
-
-		if (isInternational == "0")
-		{
-			if (SkypeActiveCallButtonPart == 0)    //left
-			{
-				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-				if (cb_part_l.isSameNode(cb_part_ml) != true)
-					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-			}
-			else                            //right
-			{
-				//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-				cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-				if (cb_part_l.isSameNode(cb_part_ml) != true)
-					cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
-				cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
-			}
-		}
-		else
-		{
-			//obj.firstChild.firstChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_l.gif');
-			cb_part_l.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_l.gif')";
-			if (cb_part_l.isSameNode(cb_part_ml) != true)
-				cb_part_ml.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-			cb_part_mr.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_m.gif')";
-				//obj.lastChild.lastChild.setAttribute('src', 'chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif');
-			cb_part_r.style.backgroundImage = "url('chrome://skype_ff_toolbar_win/content/cb_down_r"+(isFax?"_fax":"")+".gif')";
-		}
-	}
-	else
-	{
-		//obj.firstChild.firstChild.setAttribute('src', skype_cb_l);
-		cb_part_l.style.backgroundImage = skype_cb_l;
-		if (cb_part_l.isSameNode(cb_part_ml) != true)
-			cb_part_ml.style.backgroundImage = skype_cb_m;
-		cb_part_mr.style.backgroundImage = skype_cb_m;
-		//obj.lastChild.lastChild.setAttribute('src', skype_cb_r);
-		cb_part_r.style.backgroundImage = skype_cb_r;
-	}
-}
-
-//COMMANDS
-function SkypeToolBarInit(tb)
-{
-	skype_tool = tb;
-}
-
-function doRunCMDSkype(event, link, id, name)
-{
-	if (skype_tool)
-	{
-		if (link == 'chdial')
-		{
-			var obj=event.originalTarget;
-			if (!obj)
-				obj=event;
-
-			/*var brd=SkypeGetBounds(obj);
-		   var docelem = document.documentElement;
-		   if ((docelem.scrollTop == 0 && document.body.scrollTop != 0) || (docelem.scrollLeft == 0 && document.body.scrollLeft != 0))
-			   docelem=document.body;
-   
-		   scrollY=docelem.scrollTop;
-		   scrollX=docelem.scrollLeft;
-   
-		   var my=brd.top+16, mx=brd.left;/*brd.height*/
-
-			//var oDoc = obj.ownerDocument;
-
-			/*var obj2 = document.getBoxObjectFor(element);
-   
-		   var html_box = new XPCNativeWrapper(obj2).wrappedJSObject;
-		   if (!html_box)
-			 html_box = obj2;
-   
-		   var screenX = html_box.screenX;
-		   var screenY = html_box.screenY;
-			   */
-
-			SkypeFlagColor='rgb(184, 203, 255)';
-			skype_tool.chprefix(id, document, obj, screenY);
-		}
-		else if (link == 'copy')
-			skype_tool.copy_num(id, document);
-		else if (link == 'sms')
-			skype_tool.sms(id);
-		else if (link == 'add')
-			skype_tool.add(id, name);
-		else
-			skype_tool.call(id);
-	}
-}
-
-function runCMDSkype(link)
-{
-	HideSkypeFull();
-	doRunCMDSkype(null, link, skype_curid, skype_cur_name);
-}
-
-//FLAG TOOLTIP
-function HideSkypeFull()
-{
-	//   skype_active=false;
-	document.getElementById('skype_dc').style.visibility = "hidden";
-}
-
-function ShowSkype(event, title)
-{
-	//  skype_active=true;
-	DoShowSkype(event.pageX, event.pageY + 20, title);
-}
-
-function DoShowSkype(cX, cY, title)
-{
-	var menu = document.getElementById('skype_dc');
-	menu.firstChild.nodeValue = title;
-	menu.style.visibility = "visible";
-
-	menu.style.left = cX + 'px';
-	menu.style.top = cY + 'px';
-
-}
-var SkypeFlagColor = 'rgb(184, 203, 255)';
-function doSkypeFlag(obj, brd)
-{
-	SkypeFlagColor = brd;
-}
-
-//MENU
-var skype_curid = 0,skype_active = false,skype_showseed = 0,skype_ctm = 0,skype_cur_name = '';
-var skype_curbutton = null;
-function SkypeCheckCallButton(obj)
-{
-	var res = false;
-	if (skype_curbutton && skype_curbutton.isSameNode(obj) == true)
-		res = true;
-
-	skype_curbutton = obj;
-	return res;
-}
-
-function HideSkypeMenu()
-{                       //skype_tool.sd('HideSkypeMenu skype_active='+skype_active);
-	if (!skype_active)
-		HideSkypeMenuFull();
-	else
-		setTimeout("HideSkypeMenu()", 1000);
-}
-
-function HideSkypeMenu2(event)
-{
-	skype_showseed = 0;
-	if (!skype_active)
-		HideSkypeMenuFull();
-	else
-	{
-		skype_active = false;
-		setTimeout("HideSkypeMenu()", 1000);
-	}
-}
-
-function HideSkypeMenuFull()
-{                                 //skype_tool.sd('HideSkypeMenuFull skype_active='+skype_active);
-	/*   skype_active=false;
-	document.getElementById('skype_menu').style.visibility="hidden";*/
-}
-
-function CheckSkype()
-{
-	skype_active = true;
-}
-
-function ShowSkypeMenu(event, call_msg, id, callto, isMobile, name, x, y)
-{
-	try {
-		/*  	skype_active=true;       						//skype_tool.sd('ShowSkypeMenu skype_curid='+skype_curid+'   callto='+callto+'  id='+id);
-		if(document.getElementById('skype_menu').style.visibility!="hidden" && skype_curid==callto)//id
-		  return;
-		skype_showseed=Math.random();
-		clearTimeout(skype_ctm);
-	  var obj=event.originalTarget;
-	  if (!obj)
-		  obj=event;
-  //  	var brd=SkypeGetBounds(obj);
-		//var pcx=brd.left, pcy=brd.top+16;/*brd.height;* /   //alert(pcx+'--'+pcy);
-  
-	  scrolls=SkypeGetDivScroll(obj);
-  
-		var pcx = x+scrolls.left, pcy = y+scrolls.top;
-  
-		skype_ctm=setTimeout('DoShowSkypeMenu(\''+call_msg+'\','+skype_showseed+',"'+callto+'",'+pcx+','+pcy+','+isMobile+',"'+name+'")',0);*/
-	} catch(e) {
-	}
-}
-
-function DoShowSkypeMenu(call_msg, seed, callto, pcx, pcy, isMobile, name)
-{
-	try {                                                        //skype_tool.sd('DoShowSkypeMenu seed='+seed+'   skype_showseed='+skype_showseed);
-		/*  	if(seed!=skype_showseed)
-		  return;
-		skype_showseed=0;
-		skype_curid=callto;
-	  skype_cur_name=name;
-		var menu=document.getElementById('skype_menu');
-  
-		var my=pcy, mx=pcx;
-  
-	  var menubox=document.getBoxObjectFor(menu);
-	  //var docelem = document.documentElement;
-									//alert(menubox.height);
-									//alert('doc h='+document.height + ' y='+my+' menu h='+menubox.height);
-	  var docH=document.height;
-	  if (docH < document.documentElement.clientHeight) docH=document.documentElement.clientHeight;
-	  if (docH < document.documentElement.scrollHeight) docH=document.documentElement.scrollHeight;
-	  if (docH < document.body.clientHeight) docH=document.body.clientHeight;
-	  if (docH < document.body.scrollHeight) docH=document.body.scrollHeight;
-	  if ((my + menubox.height) > docH)
-		  my=my - 16 - menubox.height;
-	  if (my < 0) my=0;
-  //    if (document.height != 0 && (my + menubox.height) > document.height && (my + menubox.height) > document.documentElement.scrollHeight)//docelem.clientHeight)
-		  //my=document.height - menubox.height;
-  
-	  var docW=document.width;
-	  if (docW < document.documentElement.clientWidth) docW=document.documentElement.clientWidth;
-	  if (docW < document.documentElement.scrollWidth) docW=document.documentElement.scrollWidth;
-	  if (docW < document.body.clientWidth) docW=document.body.clientWidth;
-	  if (docW < document.body.scrollWidth) docW=document.body.scrollWidth;
-	  if ((mx + menubox.width) > docW)
-		  mx=document.width - menubox.width;
-	  if (mx < 0) mx=0;
-  //	if (document.width != 0 && (mx + menubox.width) > document.width && (mx + menubox.width) > document.documentElement.scrollWidth)//docelem.clientWidth)
-  
-		menu.style.left=mx+'px';
-		menu.style.top=my+'px';
-  
-	  skype_tool.doFixMenu(menu, isMobile, document);
-  
-	  menu.style.visibility="visible";  */
-	} catch(e) {
-	}
-}
-
-function SkypeSetBgColor(obj, color)
-{
-	try {
-		obj.lastChild.style.backgroundColor = color;
-	} catch(e) {
-	}
-}
-
-//UTIL
-function SkypeGetBounds(element)
-{
-	try {
-		var left = element.left;
-		var top = element.top;
-		while (!(element.tagName.toLowerCase() == 'span' && element.getAttribute('id') == '__skype_highlight_id'))
-		{
-			element = element.parentNode;
-		}
-		left = element.offsetLeft;
-		top = element.offsetTop;
-		for (var parent = element.offsetParent; parent; parent = parent.offsetParent)
-		{
-			left += parent.offsetLeft;
-			top += parent.offsetTop;
-			if (parent.tagName.toLowerCase() == 'div')
-			{
-				left -= parent.scrollLeft;
-				top -= parent.scrollTop;
-			}
-		}
-
-
-		return {left: left, top: top, width: element.offsetWidth, height: element.offsetHeight};
-	} catch(e) {
-	}
-}
-
-function SkypeGetDivScroll(element)
-{
-	try {
-		var left = 0;
-		var top = 0;
-		while (!(element.tagName.toLowerCase() == 'span' && element.getAttribute('id') == '__skype_highlight_id'))
-		{
-			element = element.parentNode;
-		}
-
-		for (var parent = element.offsetParent; parent; parent = parent.offsetParent)
-		{
-			if (parent.tagName.toLowerCase() == 'div')
-			{
-				left -= parent.scrollLeft;
-				top -= parent.scrollTop;
-			}
-		}
-
-
-		return {left: left, top: top};
-	} catch(e) {
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/installhistory.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/installhistory.png
new file mode 100644
index 0000000..159963a
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/installhistory.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/linkedResourcesPropPage.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/linkedResourcesPropPage.png
new file mode 100644
index 0000000..2247866
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/linkedResourcesPropPage.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/localHistoryLimitSize.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/localHistoryLimitSize.png
new file mode 100644
index 0000000..6d7fbcb
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/localHistoryLimitSize.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/matching-might-not-be-optimal.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/matching-might-not-be-optimal.png
new file mode 100644
index 0000000..83012dc
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/matching-might-not-be-optimal.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/multi-instance-properties.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/multi-instance-properties.png
deleted file mode 100644
index cca62c2..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/multi-instance-properties.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-in-compare-editor.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-in-compare-editor.png
new file mode 100644
index 0000000..e94b310
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-in-compare-editor.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-boosting.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-boosting.png
new file mode 100644
index 0000000..252a4ab
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-boosting.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-dialog.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-dialog.png
deleted file mode 100644
index c8c52e6..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-dialog.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path-relative.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path-relative.png
new file mode 100644
index 0000000..fe92f55
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path-relative.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path.png
new file mode 100644
index 0000000..982c6af
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/open-resource-path.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2-license.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2-license.png
new file mode 100644
index 0000000..8e52625
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2-license.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install-details-wizard.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install-details-wizard.png
deleted file mode 100644
index 08e9967..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install-details-wizard.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install.png
deleted file mode 100644
index c8fd4a1..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2install.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2installwizard.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2installwizard.png
deleted file mode 100644
index 10198a3..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2installwizard.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2menu.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2menu.png
deleted file mode 100644
index b2f8e75..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2menu.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2repoprefs2.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2repoprefs2.png
deleted file mode 100644
index f61a80d..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2repoprefs2.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2revert.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2revert.png
deleted file mode 100644
index db8a4c1..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2revert.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard1.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard1.png
deleted file mode 100644
index db40c26..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard1.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard2.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard2.png
deleted file mode 100644
index 6cdd07e..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/p2updatewizard2.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/patch-options-in-sync-view.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/patch-options-in-sync-view.png
new file mode 100644
index 0000000..551bf7e
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/patch-options-in-sync-view.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/proxy-settings-ui.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/proxy-settings-ui.png
deleted file mode 100644
index e77f108..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/proxy-settings-ui.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quickaccess-bindings.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quickaccess-bindings.png
new file mode 100644
index 0000000..d4733fe
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quickaccess-bindings.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quicksearch.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quicksearch.png
deleted file mode 100644
index 49dd156..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/quicksearch.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resize-popups-gtk.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resize-popups-gtk.png
new file mode 100644
index 0000000..74c2b15
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resize-popups-gtk.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resourceFilters.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resourceFilters.png
new file mode 100644
index 0000000..70e4377
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/resourceFilters.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/save-dialog.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/save-dialog.png
new file mode 100644
index 0000000..4159383
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/save-dialog.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/show-ruler-annotation-tooltip.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/show-ruler-annotation-tooltip.png
new file mode 100644
index 0000000..dda4ab8
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/show-ruler-annotation-tooltip.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/solarisx86.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/solarisx86.png
deleted file mode 100644
index 63c9604..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/solarisx86.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/switch-editors.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/switch-editors.png
deleted file mode 100644
index 8a62e84..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/switch-editors.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/sync-schedule.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/sync-schedule.png
deleted file mode 100644
index 9844107..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/sync-schedule.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/syncViewLinkWithEditor.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/syncViewLinkWithEditor.png
new file mode 100644
index 0000000..0f03527
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/syncViewLinkWithEditor.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/tag-history.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/tag-history.png
deleted file mode 100644
index 103186f..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/tag-history.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/taskbarprogress.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/taskbarprogress.png
new file mode 100644
index 0000000..c19c78d
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/taskbarprogress.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/textSelection.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/textSelection.png
deleted file mode 100644
index cf7b955..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/textSelection.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder-properties.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder-properties.png
new file mode 100644
index 0000000..4d02ad5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder-properties.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder.png
new file mode 100644
index 0000000..2bf3eb6
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/virtual-folder.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/visible-folded-annotations.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/visible-folded-annotations.png
new file mode 100644
index 0000000..d7041fc
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/visible-folded-annotations.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/webkitgtk.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/webkitgtk.png
new file mode 100644
index 0000000..ef51c49
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/webkitgtk.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/welcomescale.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/welcomescale.png
deleted file mode 100644
index 6d337d5..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/welcomescale.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wizardstop.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wizardstop.png
new file mode 100644
index 0000000..7546fda
Binary files /dev/null and b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wizardstop.png differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wordinplace.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wordinplace.png
deleted file mode 100644
index 2acd93e..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/wordinplace.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/workspaces-preference-page.png b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/workspaces-preference-page.png
deleted file mode 100644
index a4f7a4c..0000000
Binary files a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/images/workspaces-preference-page.png and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html
index 0b8d0a0..5b3d0b2 100644
--- a/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html
+++ b/eclipse/plugins/org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html
@@ -1,24 +1,24 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
 <head>
-<meta name="copyright" content="Copyright (c) Eclipse contributors and others 2009. This page is made available under license. For full details, see the LEGAL section in the documentation that contains this page.">
-<meta http-equiv="Content-Language" content="en-us">
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<link rel="STYLESHEET" href="../book.css"  type="text/css">
+<meta name="copyright" content="Copyright (c) Eclipse contributors and others 2010. This page is made available under license. For full details, see the LEGAL section in the documentation that contains this page."/>
+<meta http-equiv="Content-Language" content="en-us"/>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<link rel="STYLESHEET" href="../book.css"  type="text/css"/>
 <style type="text/css">
 td {border-top: solid thin black;}
 img[alt] {background-color:#ffdddd;}
 tr {vertical-align: top;}
 </style>
-<title>Eclipse Platform What's New in 3.5</title>
+<title>Eclipse Platform What's New in 3.6</title>
 </head>
 
 <body>
 
-<h2>What's New in 3.5</h2>
+<h2>What's New in 3.6</h2>
 
 <p>Here are descriptions of some of the more interesting or significant changes 
-made to the Eclipse Platform for the 3.5 release of Eclipse. They are grouped into:</p>
+made to the Eclipse Platform for the 3.6 release of Eclipse. They are grouped into:</p>
 
 <ul>
 <li><a href="#Platform">Platform Changes</a></li>
@@ -37,8 +37,8 @@ document in the plug-in developer's guide.
 <!-- ****************** START OF N&N TABLE ****************** -->
 <table cellpadding="10" cellspacing="0" width="600">
   <colgroup>
-  <col width="30%">
-  <col width="70%">
+  <col width="30%"/>
+  <col width="70%"/>
   </colgroup>
   <tbody>
     <!-- ******************** Platform ********************** -->
@@ -47,190 +47,204 @@ document in the plug-in developer's guide.
           Changes</div></td>
     </tr>
 
-  <tr id="cocoa">
-    <td width="30%" valign="top" align="left"><b>Eclipse on Cocoa</b></td>
-    <td width="70%" valign="top">32 and 64-bit OSX Cocoa have joined the line-up of supported configurations for which SWT and Eclipse are routinely
-	built. Cocoa is now a first class Eclipse configuration, including advanced libraries such as OpenGL for SWT. Cocoa replaces Carbon
-	as the primary toolkit for Eclipse and SWT on Mac.
-	<p>
-	  <img src="images/cocoa.png" alt="Eclipse on Cocoa">
-	</p>
+  <tr> 
+    <td width="30%" valign="top" align="left">
+      <b>New platforms</b>
     </td>
+    <td width="70%" valign="top">
+     PowerPC 64-bit, Windows 7, and Ubuntu LTS 10.04 have joined the line-up of supported configurations 
+     for which SWT and Eclipse are routinely built and tested.
+    </td> 
   </tr>
 
-  <tr id="solaris-x86"> 
-    <td width="30%" valign="top" align="left"><b>Solaris x86</b></td>
-    <td width="70%" valign="top">Solaris x86 has joined the line-up of supported configurations for which SWT and Eclipse are routinely built.
-		<p><img src="images/solarisx86.png" alt="Solaris x86"></p>
+  <tr id="platform-open-file">
+    <td width="30%" valign="top" align="left"><b>Opening a file from the command line</b></td>
+    <td width="70%" valign="top">Based on work in SWT and the native launcher, the 
+    Eclipse IDE now supports opening a file from the command line, or opening a file that 
+    has been associated with the Eclipse executable. If an instance of Eclipse is already running, 
+    that instance will open the file. Otherwise, a new instance will be started.
+	</td>
+	</tr>
+
+  <tr id="resource-filters">
+    <td width="30%" valign="top" align="left"><b>Resource filters</b></td>
+    <td width="70%" valign="top">Projects and folders can now be configured to omit some of their
+    children in the file system from the workspace. The filtered files and directories will not
+    appear in views such as the <b>Project Explorer</b>, and won't be processed by 
+    workspace facilities such as builders. Filters can be configured on the <b>Resource Filters</b> 
+    page in the <b>Properties</b> dialog. When a filter is added, the following attributes have to be set.
+    <ul>
+    	<li><b>Filter type</b> - determines whether only matching resources should be visible (<b>Include</b>) or whether all matching resources should be hidden (<b>Exclude</b>)</li>
+    	<li><b>Applies to</b> - determines the type of resources that should be affected (files, folders, or both)</li>
+    	<li><b>All children (recursive)</b> - indicates that the filter should be used for the entire resource subtree</li>
+    	<li><b>File and Folder Attributes</b> - specifies the filter condition</li>
+	</ul>
+    <p><img src="images/resourceFilters.png" alt="Resource Filters" /></p></td>
+  </tr> 
+
+  <tr id="dynamic_path_variables">
+    <td width="30%" valign="top" align="left"><b>Dynamic path variables</b></td>
+    <td width="70%" valign="top">Linked resources can define their locations 
+    relative to user-defined <i>path variables</i>.
+    Now, a set of predefined path variables are available:
+    <ul>
+  		<li><b>PROJECT_LOC</b> - pointing out the project location</li>
+  		<li><b>WORKSPACE_LOC</b> - pointing out the workspace location</li>
+	</ul>
+	<p>When these variables are used, they are dynamically resolved based on the context 
+	of a linked resource. Those predefined variables may be also used to build user-defined variables.
+	</p>
+    <p><img src="images/dynamicPathVariables.png" alt="Dynamic Path Variables" /></p>
+    <p><img src="images/linkedResourcesPropPage.png" alt="Linked Resources Property Page" /></p>
 	</td>
   </tr>
 
-  <tr id="s390"> 
-    <td width="30%" valign="top" align="left"><b>Eclipse on s390 and s390x</b></td>
-    <td width="70%" valign="top">It's time to dust off that old mainframe in your basement, because Eclipse has
-    arrived on the s390 and s390x architectures. This new port is still early access, so give
-    it a spin and report any problems you encounter in bugzilla.
-	</td>
+  <tr id="virtual_folders">
+    <td width="30%" valign="top" align="left"><b>Virtual folders</b></td>
+    <td width="70%" valign="top"><b>Virtual folders</b> are a new type of resource that exist only in the workspace and
+    are not backed by a directory in your file system. These folders can be used to create more flexible project structures
+    by bringing together links to files spread throughout your file system.
+    <p>
+    Since virtual folders do not exist in the local file system, they can only
+    contain other virtual folders and linked resources.
+    </p>
+    <p><img src="images/virtual-folder.png" alt="Virtual Folders" /></p>
+    <p><img src="images/virtual-folder-properties.png" alt="Virtual Folders Properties" /></p></td>
+  </tr> 
+
+  <tr id="filesystem_import">
+    <td width="30%" valign="top" align="left"><b>File system import wizard</b></td>
+    <td width="70%" valign="top">The file system import wizard now supports creating
+    	virtual folders and linked files and folders.
+      <p><img src="images/file-system-import.png" alt="File System Import Wizard" /></p>
+      <p>Linked files and folders can also be created relative to a path variable.</p></td>
   </tr>
 
-  <tr id="buttonorder">
-    <td width="30%" valign="top" align="left"><b>Alternate button order</b></td>
+  <tr id="webkitgtk">
+    <td width="30%" valign="top" align="left"><b>Browser can use WebKitGTK+</b></td>
     <td width="70%" valign="top">
-		On GTK, it is now possible to change the default button order for Eclipse.  
-		To have the <b>OK</b> button on the left, edit the ~/.gtkrc-2.0 file and include the line 
-		"gtk-alternative-button-order=1".
-		<p><img src="images/alternate.png" alt="Alternate button order"></p>
+      Linux users can now use WebKitGTK+ instead of Mozilla as the Browser control's native renderer.  See
+      <a href="http://www.eclipse.org/swt/faq.php#browserwebkitgtk">Can the Browser use the WebKit renderer on GTK?</a>.
+      <p><img src="images/webkitgtk.png" alt="WebKitGTK+ Image"/></p>
 	</td>
   </tr>
 
-  <tr id="customize-perspective">
-    <td width="30%" valign="top" align="left"><b>Customize menus and toolbars</b></td>
-    <td width="70%" valign="top">The customize perspective dialog has been improved and
-      extended with new functionality. It can now be used to hide or show individual menu 
-      or toolbar items.
-      <p><img src="images/customize-perspective.png" alt="Customize Perspective dialog"></p>
-   </td>
-  </tr>
-
-  <tr id="multi-instance-properties">
-    <td width="30%" valign="top" align="left"><b>Multi-instance Properties view</b></td>
-    <td width="70%" valign="top">You can now pin the Properties view to a given selection.
-    This allows you to see the properties of a particular selection while 
-    having the freedom to select alternate items.
-    <p>You can now create new instances of the Properties view from an existing 
-    one. The existing one will be pinned to the contents it is currently 
-    displaying and the new view will be set to follow the workbench's 
-    selection.</p>
-    <p><img src="images/multi-instance-properties.png" alt="The Multi-instance Properties View"></p>
+  <tr id="unix-file-permissions">
+    <td width="30%" valign="top" align="left"><b>UNIX file permissions</b></td>
+    <td width="70%" valign="top">The full set of UNIX file permissions are now supported.
+	The attributes can be managed from the <b>Resource Properties</b> page.
+        <p><img src="images/file-attributes-ui.png" alt="File attributes UI" /></p>
     </td>
   </tr>
 
-  <tr id="workspace-compare-editor-enhancements">
-    <td width="30%" valign="top" align="left"><b>Compare Editor enhancements</b></td>
-    <td width="70%" valign="top"> 
-    New features have been added to the Compare Editor:
-    <ul>
-    	<li>The <b>Go to Line</b> action added to the context menu allows for rapid navigation</li>
-    	<li>The current text selection will be used to populate the filter field of the <b>Open Type</b> and <b>Open Resource</b> dialogs</li>
-    	<li>The current line is now highlighted in each viewer</li>
-    	<li>Background and foreground color preferences are now honored</li>
-    	<li> The <b>Set Encoding...</b> action has been added to the context menu. 
-    	This allows you to change the encoding of each side of the comparison</li>
-   	</ul>
-    <p><img src="images/gotoLine.png" alt="Go to Line" ></p>
-    <p><img src="images/textSelection.png" alt="TextSelection" ></p>
-	</td>
-  </tr>
-
-    <TR id="compare-word">
-      <TD vAlign=top align=left width="30%"><B>Compare Word documents</B></TD>
-      <TD vAlign=top width="70%">Comparing Word document changes in Eclipse now
-        uses the Word compare support to show you the changes as revisions.
-        <P><IMG alt="Compare Word documents" 
-      src="images/wordinplace.png" ></p></TD>
-    </TR>
-
-  <tr id="workspace-compare-switch-viewer">
-    <td width="30%" valign="top" align="left"><b>Switching compare viewers</b></td>
-    <td width="70%" valign="top">The <b>Compare Editor</b> allows you to switch to 
-      optional merge viewers available for the compared content. For instance, while comparing 
-      two Java files, you can use the simple <b>Text Compare</b> viewer instead of the default <b>Java 
-      Source Compare</b>.
-      <p>You can also switch between content-specific merge viewers; 
-      for example when an alternative Java compare viewer is available, you can use it instead of the default one.</p>
-      <p><img src="images/contentMergeViewerSwitching.png" alt="Viewer switching" ></p>
-	</td>
-  </tr>
-
-  <tr id="open-resource-open-with">
+  <tr id="open-resource-paths">
     <td width="30%" valign="top" align="left">
-        <b>Open Resource dialog allows choice of editor</b>
+        <b>New features in Open Resource dialog</b>
     </td>
     <td width="70%" valign="top">
-        The Open Resource dialog now allows you to open files with the the editor of your choice.
-        You can either choose the editor from the <b>Open With</b> context menu or
-        use the drop-down menu besides the <b>Open</b> button.
-        <p><img src="images/open-resource-dialog.png" alt="Open Resource dialog"></p>
+        The <b>Open Resource</b> dialog supports three new features:
+        <p>• <b>Path patterns:</b> If the pattern contains a /, the part before the last / is used to match a path in the workspace:</p> 
+          <p><img src="images/open-resource-path.png" alt="Open Resource dialog with pattern '*/jface/w*/pa.html'"/></p> 
+        <br/>
+        <p>• <b>Relative paths:</b> For example, "./T" matches all files starting with T in the folder of the active editor or selection:</p>
+          <p><img src="images/open-resource-path-relative.png" alt="Open Resource dialog with pattern './T'"/></p> 
+        <br/>
+        <p>• <b>Closer items on top:</b> If the pattern matches many files with the same name, the files that are closer
+          to the currently edited or selected resource are shown on top of the matching items list.</p>
+          <p><img src="images/open-resource-boosting.png" alt="Open Resource dialog with pattern 'mak', matching many makefiles"/></p> 
     </td>
   </tr>
 
-  <tr id="switch-editors">
-    <td width="30%" valign="top" align="left">
-        <b>Switch editors and multi-page editors</b>
-    </td>
-    <td width="70%" valign="top">
-        Switching between open editors and multiple editor pages has been streamlined.
-        <b>Ctrl</b>+<b>PageDown</b> and <b>Ctrl</b>+<b>PageUp</b> now always activate the next or
-        previous editor tab, even in multi-page editors. To switch between pages of a multi-page
-        editor, use <b>Alt</b>+<b>PageDown</b> and <b>Alt</b>+<b>PageUp</b>.
-        <p><img src="images/switch-editors.png" alt="Multi-page editor (PDE manifest editor)"></p>
+   <tr id="platui-2">
+    <td width="30%" valign="top" align="left"><b>Progress shown in platform task bar</b></td>
+    <td width="70%" valign="top">Progress for long running operations is now shown in 
+    the platform task bar on platforms that support this feature.  Progress is shown for
+    long running tasks such as workbench startup, install, update, and repository synchronization.
+    <p> <img src="images/taskbarprogress.png" alt="Progress View and Win 7 Task Bar indicating the same progress" title="Progress in Win7 Task Bar"/></p>
     </td>
   </tr>
 
-  <tr id="workspace_team-proxy-settings-ui">
-    <td width="30%" valign="top" align="left"><b>Improved Network Connections page</b></td>
-    <td width="70%" valign="top">
-	The <b>Network Connection</b> page has been changed to better show the current
-	proxy configuration. Now if you go to <b>Preferences > General > Network Connections</b>,
-	you are able to see and change Eclipse proxy settings as well as see 
-	settings provided by the operating system. If you want to use your browser
-	or Gnome settings, or you have your proxy configured using environmental variables on Linux, 
-	you can see them all in this new UI.
-    <p><img src="images/proxy-settings-ui.png" alt="New Proxy Settings UI" ></p>
-	</td>
+   <tr id="platui-1">
+    <td width="30%" valign="top" align="left"><b>Canceling long-running operations in wizards</b></td>
+    <td width="70%" valign="top">There is now a stop button adjacent to the progress bar when a wizard is running
+       a long operation.  You can press the stop button (or the <b>Enter</b> or <b>Space</b> key) to cancel the operation
+       being shown in the progress bar.
+       <p> <img src="images/wizardstop.png" alt="Wizard with a progress bar and stop button" title="Wizard with Stop Button"/></p>
+    </td>
   </tr>
 
-  <tr id="workspaces_preference_page">
-    <td width="30%" valign="top" align="left"><b>Workspaces preference page</b></td>
-    <td width="70%" valign="top">A new preference page supports managing the startup prompt to select a
-    workspace: <b>General > Startup and Shutdown > Workspaces</b>. You can
-    enable or disable the prompt altogether (this setting used to be on 
-    <b>General > Startup and Shutdown</b>) and specify the maximum number of
-    recent workspaces to be remembered. The page also lists the recently used
-    workspaces and allows you to remove unwanted workspaces from that list.
-    <p><img src="images/workspaces-preference-page.png" alt="The Workspaces preference page"></p></td>
+  <tr id="quick-access-keybindings">
+    <td width="30%" valign="top" align="left"><b>Quick Access now shows keybindings for commands</b></td>
+    <td width="70%" valign="top"><b>Quick Access</b> (<b>Ctrl+3</b>) now shows keybindings for commands so you can
+        save yourself from all that typing and just use the keyboard shortcut the next time you need
+        to run a command.
+      <p><img src="images/quickaccess-bindings.png"
+      alt="Quick Access dialog displaying two commands and their associated keybindings at the end of the command's description."/></p></td>
   </tr>
 
-  <tr id="platform-ui.cnf.gointo">
-    <td width="30%" valign="top" align="left"><b>Project Explorer improvements</b></td>
-    <td width="70%" valign="top">As a step in the campaign to bring
-    the <b>Project Explorer</b> up to parity with the <b>Package Explorer</b>, the
-    <b>Go Into</b> and <b>Go To</b> functionality has been added.  You can now
-    go into any folder/project/etc. and have that be the only contents of the <b>Project Explorer</b>.
-    <p><img src="images/cnf-gointo.png" alt="Showing the Project Explorer after Go Into selected" title="Go Into" border="1"></p>
-    </td>
+  <tr id="wizard-keywords">
+    <td width="30%" valign="top" align="left"><b>Search keywords in wizards</b></td>
+    <td width="70%" valign="top">The <b>File > New</b>, <b>File > Import...</b>,
+    and <b>File > Export...</b> wizards now support searching by keyword. You can type
+    a search term that doesn't appear in the wizard name, and the term will match against
+    search keywords registered for that wizard. For example if you search for "zip" or
+    "directory" in the import wizard, you will be shown the wizards for importing from
+    archives or the file system, respectively.
+    <p><img src="images/import-zip.png" alt="Keyword search in wizards"/></p>
+	</td>
   </tr>
 
-      <!-- ******************** User Assistance ********************** -->
-
-  <tr id="customIcons">
-    <td width="30%" valign="top" align="left"><b>Custom icons in help system</b></td>
-    <td width="70%" valign="top">Custom icons can be specified for books and topics in the help system using
-	the <tocIcon> element in the <tt>org.eclipse.help.toc</tt> extension point. 
-      <p><img src="images/customicon.png" alt="table of contents"></p></td>
+  <tr id="workspace_local-history-limit-size">
+    <td width="30%" valign="top" align="left"><b>Local History pruning can be disabled</b></td>
+    <td width="70%" valign="top">The local history size constraints can now be disabled. 
+    Users that never want to discard history no longer need to wait on shutdown for 
+    history cleanup to occur. To disable history cleaning, go to
+    <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.FileStates)")'>
+    <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the preference page"/>
+    <b>Preferences > General > Workspace > Local History</b></a>
+    and disable <b>Limit history size</b>.
+	Note that when this option is chosen, disk usage for the workspace local history 
+	will continue to grow indefinitely.
+	<p><img src="images/localHistoryLimitSize.png" alt="Limit history size"/></p></td>
+  </tr> 
+
+  <tr id="hideFVB">
+    <td width="30%" valign="top" align="left"><b>Hide empty fast view bars</b></td>
+    <td width="70%" valign="top">
+	In order to clean up the UI and gain some space in the trim area, there is a new preference on the
+	<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Perspectives)")'>
+	<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the preference page"/>
+	<strong>General > Perspectives</strong></a>
+	page that allows you to
+	hide the Fast View Bar when it's empty. Note that this option does not inhibit the functionality; if there are
+	fast views in the perspective (or you make a view a fast view) the bar will be shown regardless of the preference
+	setting.
+	<p>	<img src="images/hide-fvb.png" alt="Hide the fast view bar" /></p></td>
   </tr>
 
-  <tr id="welcomeFont">
-    <td width="30%" valign="top" align="left"><b>Buttons to change font size in Welcome</b></td>
-    <td width="70%" valign="top">To improve accessibility two new buttons (a large and a small 'A') have been 
-    added above the welcome area which can be used to increase or decrease the font size on the welcome pages. 
-    <p><img src="images/welcomescale.png" alt="welcome page"></p></td>
+  <tr id="edit-link-location">
+    <td width="30%" valign="top" align="left"><b>Edit linked resource location</b></td>
+    <td width="70%" valign="top">Linked resource locations can now be changed
+    	by selecting the <b>Edit...</b> button in the <b>Resource Properties</b> page.
+    	<p><img src="images/edit-button-in-property.png" border="0" alt="Edit Button"/></p>
+    </td>
   </tr>
 
-  <tr id="abouthtml">
-    <td width="30%" valign="top" align="left"><b>About page in help system</b></td>
-    <td width="70%" valign="top">It is now possible to open a web page, about.html from 
-    the help system that shows plug-in version information. This makes it possible to determine 
-    the versions of plug-ins running in a Help infocenter.</td>
+  <tr id="file-drag-dialog">
+    <td width="30%" valign="top" align="left"><b>File and folder operation dialog</b></td>
+    <td width="70%" valign="top">When dragging files and folders from the operating system 
+    	shell (such as Windows Explorer) onto <b>Project Explorer</b>, a dialog appears 
+    	to let you choose how the files should be imported.
+    	<p>The dialog allows you to simply copy files and folders (the traditional operation)
+    	but also easily create linked resources and virtual folders hierarchies in a project folder 
+    	by simply drag and dropping files and folders.</p>
+    	<img src="images/import-type-dialog.png" border="0" alt="Import File Operation Dialog" />
+      <p>The dialog also creates project path variable relative linked resources automatically,
+      	so that projects remains portable while using linked resources.</p>
+      </td>
   </tr>
 
-  <tr id="helpQuickSearch">
-    <td width="30%" valign="top" align="left"><b>Help quick search</b></td>
-    <td width="70%" valign="top">A search of the help system can be initiated with a  
-      scope limited to the selected book or topic.
-      <p> <img src="images/quicksearch.png" alt="help quick search"></p>
-    </td>
-  </tr>
+      <!-- ******************** User Assistance ********************** -->
 
       <!-- ******************** Install/Update ********************** -->
 
@@ -238,124 +252,95 @@ document in the plug-in developer's guide.
       <td colspan="2"><a name="Install"></a> <div style="font-size: 20px; font-weight: bold;">Install/Update Changes</div></td>
     </tr>
 
-  <tr id="p2ui-software-updates">
-    <td width="30%" valign="top" align="left"><b>Software updates menu items</b></td>
-    <td width="70%" valign="top">New menu items have been added to the <b>Help</b> menu, allowing you to
-       invoke the most common software management tasks immediately.  Instead of launching a single updates dialog and navigating pages with
-       action buttons, you can now perform common tasks immediately from the <b>Help</b> menu.
-       <p> <img src="images/p2menu.png" alt="Software updates menu items in the Help menu" title="Software Updates Menu Items"></p>
-       <p>For example, you can now check for software updates in one step using <b>Help > Check for Updates</b>.
-       This menu command will check for updates (in the foreground or background depending on your 
-       <b>General > Always run in background</b> preference), and launch the software updates wizard if updates are available.</p>
+  <tr id="p2-license"> 
+    <td width="30%" valign="top" align="left"><b>Grouping by license in install wizard</b></td>
+    <td width="70%" valign="top">Software to install is now grouped by license
+    in the <b>Review Licenses</b> page of the install wizard. This means you no longer need to select each item being
+    installed to ensure all applicable licenses have been reviewed.
+     <p><img src="images/p2-license.png" alt="Install wizard license review page"/></p>
     </td>
   </tr>
 
-  <tr id="p2ui-installing-new-software">
-    <td width="30%" valign="top" align="left"><b>Installing new software</b></td>
-    <td width="70%" valign="top">The <b>Available Software</b> page has been merged into the install wizard and
-       can be accessed using <b>Help > Install New Software...</b>.   The same navigation features previously 
-       appearing in the <b>Available Software</b> page, such as filtering and viewing by site, category, or name, 
-       are now on the first page of the wizard.
-       <p> <img src="images/p2installwizard.png" alt="Available Software Page in the Install Wizard" title="Available Software Wizard Page"></p>
-       <p>Some of the most common workflow and usability complaints have also been addressed:</p>
-       <ul><li>The wizard will now open immediately without waiting to connect to any update sites.
-       This makes the view itself much more responsive once the wizard is opened.</li>
-       <li>A description field has been added to the page to show more information about the selected item.</li>
-       <li>You can now change many selections at once without computing the install results on each change.  Once 
-       you've selected the items to install, the <b>Next</b> button will take you to the review page.  If there
-       is an error or you otherwise want to change your selections, you can now go back and change the selections in the first
-       page, and the resulting changes won't be computed until you move forward again.</li>
-       </ul>
-    </td>
+  <tr id="ntlm-support"> 
+    <td width="30%" valign="top" align="left"><b>NTLMv2 proxy support</b></td>
+    <td width="70%" valign="top">Support has been added to the platform for communicating
+    with NT Lan Manager proxies (NTLMv2). You can now install and update software
+    in the Eclipse user interface when running behind proxies that use this protocol.</td>
   </tr>
 
-  <tr id="p2ui-install-from-new-site">
-    <td width="30%" valign="top" align="left"><b>Installing software from a new site</b></td>
-    <td width="70%" valign="top">The install wizard has been reorganized to make it simpler to
-       add a new site and install software from it.  You can add a new site by typing, pasting, or
-       dragging a URL link into the <b>Work with</b> combo box.  You can also use the <b>Add...</b> button
-       to add a site. Auto-completion on names and locations is supported when typing in the <b>Work with</b> field,
-       including completion of repositories that are currently disabled.
-       <p>Only the content for a newly added site will be shown, making it simpler to find
-       what you want to install.  You can also use the combo to change the filtering of the available software by any
-       site.  The wizard has also been streamlined by placing the links to other views closer to the
-       relevant information in the wizard.</p>
-       <p> <img src="images/p2install.png" alt="Available Software view in Install Wizard" title="Install Wizard"></p>
-       <p>A new checkbox at the bottom of the page lets you control whether all sites will be used when
-       searching for the new software's requirements, or whether only the site selected will be
-       consulted.  Previously, all sites were always used when gathering the requirements.</p>
+  <tr id="p2ui-1">
+    <td width="30%" valign="top" align="left"><b>Comparing configurations in the Installation History</b></td>
+    <td width="70%" valign="top">The <b>Installation History</b> page now allows you to compare two different
+       installation history configurations.  Now you can more easily see what was installed, uninstalled, or updated
+       in the various installation configurations.  You can also delete unwanted installation configurations
+       in order to reduce clutter and free up disk space.
+       <p> <img src="images/installhistory.png" alt="Compare button in the Installation History Page" title="Installation History Page"/></p>
     </td>
   </tr>
 
-  <tr id="p2ui-install-wizard">
-    <td width="30%" valign="top" align="left"><b>More detail in install wizards</b></td>
-    <td width="70%" valign="top">The wizards for installing, updating, and uninstalling software now provide
-       more detailed information about the software required to complete an operation.  For example, when you 
-       install a feature, you will see a list of the other features required that will also be installed.
-       <p> <img src="images/p2install-details-wizard.png" alt="Install wizard with detail" title="Install Wizard"></p>
-       <p>The update wizard has also been reorganized so that you can change your update selections
-       in a separate selection page.  When available updates are shown, the wizard will open directly
-       on the details page.</p>
-       <p> <img src="images/p2updatewizard1.png" alt="Update wizard detail" title="Update Wizard Detail Page"></p>
-       <p>From this page, use the wizard <b>< Back</b> button to see all of the possible update proposals and
-       change the selections.</p>
-       <p> <img src="images/p2updatewizard2.png" alt="Update wizard with multiple proposals" title="Update Wizard Selection Page"></p>
-    </td>
-  </tr>
+    <!-- ******************** Text ********************** -->
+    <tr> 
+      <td colspan="2"><a name="Text"></a> <div style="font-size: 20px; font-weight: bold;">Editor Changes</div>
+      <p>
+      <em>These changes apply to all textual editors in the SDK.</em></p></td>
+    </tr>
 
-  <tr id="p2ui-info-in-about">
-    <td width="30%" valign="top" align="left"><b>Installation information now appears in About</b></td>
-    <td width="70%" valign="top">The <b>Installed Software</b> and <b>Installation History</b> pages
-       have been moved into the new <b>Installation Details</b> dialog.  To access these pages, choose <b>Help>About</b>
-       and press the <b>Installation Details</b> button. In addition, you can now expand the top level items in the 
-       <b>Installed Software</b> page to see what software each item requires. From the
-       <b>Installation History</b> page you can browse previous install configurations, and
-       <b>Revert</b> to previous configurations.
-       <p> <img src="images/p2revert.png" alt="Installation History page in Installation Information dialog" title="Installation History"></p>
+  <tr id="resize-popups-gtk">
+    <td width="30%" valign="top" align="left">
+        <b>Resize content assist and hover pop-ups under Linux</b>
+    </td>
+    <td width="70%" valign="top">
+        Content assist and most hover pop-ups are now resizable in textual editors under Linux/GTK.
+       <p><img src="images/resize-popups-gtk.png" alt="Content assist popup with resize trim"/></p>
     </td>
   </tr>
 
-  <tr id="p2ui-software-sites-preferences">
-    <td width="30%" valign="top" align="left"><b>Software sites preference page</b></td>
+  <tr id="all-folded-annotations-visible">
+    <td width="30%" valign="top" align="left">
+        <b>All folded annotations are now visible in the rulers</b>
+    </td>
     <td width="70%" valign="top">
-       The available sites for installing and updating software are now managed from 
-       a preference page (<b>Preferences > Install/Update > Available Software Sites</b>). 
-       To find a particular site quickly, you can sort by name, location, or enablement.  You can also use the filter field to filter the list of sites.
-	   
-	   <p>This preference page also allows you to define your own name for available
-	   software sites. Names can be defined when adding a new site, or edited from the available
-	   sites preference page. If you don't provide a name, the name defined by the site itself will be used.
-	   </p>
-       <p> <img src="images/p2repoprefs2.png" alt="Available Software Sites preference page" title="Available Software Sites"></p>
+        Until now, only errors and warnings were shown in the vertical and overview ruler when code is folded. As of this release,
+        all annotations from the folded region are visible:
+        <p><img src="images/visible-folded-annotations.png" alt="Vertical and overview ruler annotations for folded code"/></p> 
     </td>
   </tr>
 
-    <!-- ******************** Text ********************** -->
-    <tr> 
-      <td colspan="2"><a name="Text"></a> <div style="font-size: 20px; font-weight: bold;">Editor Changes</div>
-      <p>
-      <em>These changes apply to all textual editors in the SDK.</em></p></td>
-    </tr>
+  <tr id="ruler-annotation-tooltip">
+    <td width="30%" valign="top" align="left"><b>Show ruler annotation tooltip command</b></td>
+    <td width="70%" valign="top">The annotation tooltip that appears when you hover over 
+    an icon in the vertical ruler on the left of a textual editor can now also be shown by pressing a key sequence. 
+        However, out of the box no key sequence is defined for that. Go to the
+        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.ui.preferencePages.Keys)")'>
+        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the preference page"/>
+        <strong>General > Keys</strong></a>
+        preference page to assign a key sequence to the <b>Show Ruler Annotation Tooltip</b> command.      
+        <p><img src="images/show-ruler-annotation-tooltip.png" alt="Text editor with ruler annotation tooltip"/></p>         
+    </td>
+  </tr>
 
-  <tr id="block-selection-mode">
+  <tr id="save-unmappable-chars">
     <td width="30%" valign="top" align="left">
-        <b>Block selection mode in textual editors</b>
+        <b>Better handling of unmappable characters on save</b>
     </td>
     <td width="70%" valign="top">
-    	Textual editors now support block (aka column or rectangular) selection mode:
-       <p> <img src="images/block-selection-mode.png" alt="Block selection in text editor"></p>
-       <p>To enable it either use <b>Alt+Shift+A</b> or activate the 'Editor Presentation' action set to get
-       		a tool bar button for toggling the block selection mode.</p>  
+        There is now better support for characters that cannot be saved with the current encoding:
+       <p><img src="images/save-dialog.png" alt="Save dialog in case of unmappable characters"/></p> 
     </td>
   </tr>
 
-  <tr id="collapse-projection">
+
+  <tr id="print-dialog-remembers-options">
     <td width="30%" valign="top" align="left">
-        <b>Double-click on folding line collapses the folding region</b>
+        <b>Print dialog remembers user selected options </b>
     </td>
     <td width="70%" valign="top">
-        Double-click on the vertical folding line now collapses the folding region:
-       <p><img src="images/collapse-projection.png" alt="Double-click collapses the folding region" ></p>
+    	The <b>Print</b> dialog now remembers the following user selected options for all textual editors until the workbench is shutdown:
+    	<ul>
+    		<li>Selected printer</li>
+    		<li>Print to file</li>
+    		<li>Printer preferences: These are printer specific options like paper size, page order orientation etc.</li>
+    	</ul>
     </td>
   </tr>
 
@@ -365,28 +350,80 @@ document in the plug-in developer's guide.
           Changes</div></td>
     </tr>
 
-    <TR id=tagHistory>
-      <TD vAlign=top align=left width="30%"><B>History in Tag Resources dialog</B></TD>
-      <TD vAlign=top width="70%">When tagging a project you can now choose a
-        previously used tag.
-        <P><IMG alt="The Tag Resources dialog with the history list" 
-      src="images/tag-history.png" ></p></TD>
-    </TR>
-
-    <TR id=applyPatch>
-      <TD vAlign=top align=left width="30%"><B>Apply patch in the Synchronize
-          view</B></TD>
-      <TD vAlign=top width="70%">You can now apply a patch directly in the Synchronize
-        view.
-        <P><IMG alt="Apply patch in the Synchronize view" 
-      src="images/apply-patch-syncview.png" ></p></TD>
-    </TR>
-
-  <tr id="workspace_sync-schedule">
-    <td width="30%" valign="top" align="left"><b>More options for synchronization scheduling</b></td>
-    <td width="70%" valign="top">New options are available in the Configure Synchronize Schedule dialog.
-    Synchronization can be started at a specified time, run once or repeated at selected intervals.
-    <p><img src="images/sync-schedule.png" alt="Synchronize schedule dialog" ></p></td>
+  <tr id="open-in-compare-editor.png">
+    <td width="30%" valign="top" align="left"><b>Enhanced Open in Compare editor menu</b></td>
+    <td width="70%" valign="top">    
+    The context menu of the <b>Compare</b> editor contains <b>Open</b> and <b>Open With</b> actions, 
+    which open the file in full-fledged editors. Now, these actions set the selection and the caret position 
+    in the newly opened editor based on the selection in <b>Compare Editor</b>.
+    <p><img src="images/open-in-compare-editor.png" alt="Open in Compare Editor" />
+    </p>
+      </td>
+  </tr>
+
+  <tr id="patch-sync-view">
+    <td width="30%" valign="top" align="left"><b>Apply patch in Synchronize view</b></td>
+    <td width="70%" valign="top">
+    	The <b>Synchronize</b> view now allows to synchronize with a patch either by pasting
+    	the patch into the view or by using the <b>Synchronize</b> wizard. If you prefer
+    	this new way of applying patches, you can replace the modal <b>Apply Patch</b>
+    	dialog with the <b>Synchronize</b> view by selecting the 
+    	new <b>Apply patch in Synchronize view</b> option on the
+        <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.team.ui.TeamPreferences)")'>
+        <img src="PLUGINS_ROOT/org.eclipse.help/command_link.png" alt="Opens the preference page"/>
+    	<b>Team</b></a>
+    	preference page:
+		<p><img alt="Apply patch in Synchronize view preference" title="Apply patch in Synchronize view preference"
+		src="images/apply-patch-in-sync-view-preference.png"/></p>
+
+		<p>When synchronizing with a patch the drop-down menu in the <b>Synchronize</b> view offers patch options
+		including <b>Reverse</b>, <b>Fuzz Factor...</b>, <b>Generate .rej File</b> 
+		and <b>Ignore Leading Path Segments...</b>.</p>
+    	<p><img src="images/patch-options-in-sync-view.png" alt="Patch options in Synchronize view"/></p>
+		<p>Moreover the <b>Synchronize with Patch</b> wizard displays a page with inaccessible projects 
+		referred from within the patch. Projects selected on this page will be opened prior to synchronization.</p>	
+        <p><img src="images/inaccessible-projects-page.png" alt="Inaccessible Projects page" /></p>
+    </td>
+  </tr>
+
+  <tr id="workspace_sync-view-link-with-editor">
+    <td width="30%" valign="top" align="left"><b>"Link with Editor" in Synchronize view</b></td>
+    <td width="70%" valign="top">The <b>Synchronize</b> view can now be linked 
+    with the active editor. Moreover, the view is now one of the 'Show In' targets when in the Synchronize perspective.
+    <p><img src="images/syncViewLinkWithEditor.png" alt="Link with Editor" /></p></td>
+  </tr>
+
+  <tr id="workspace_commit-wizard-logical-models">
+    <td width="30%" valign="top" align="left"><b>Logical models in Commit wizard</b></td>
+    <td width="70%" valign="top">The <b>Commit</b> wizard now shows logical 
+    models just like the <b>Synchronize</b> view does.
+    <p><img src="images/commitWizardLogicalModels.png" alt="Commit Wizard" /></p></td>
+  </tr>
+
+  <tr id="workspace_sorted-diffs-in-patch">
+    <td width="30%" valign="top" align="left"><b>Sorted diffs in patches</b></td>
+    <td width="70%" valign="top">The <b>Create Patch</b> action now creates patches 
+    that contain changes sorted by project and file path. This makes comparing patches much easier.</td>
+  </tr>
+
+  <tr id="config-branches">
+    <td width="30%" valign="top" align="left"><b>Usability enhancement to Configure Branches and Versions</b></td>
+    <td width="70%" valign="top">
+      	Now the <b>Configure Branches and Versions</b> action in the repository view is enabled for multiple selections. 
+      	This means that you are able to choose any file in the selection as a tag source for all selected folders.
+		<p><img src="images/configure-branches.png" alt="Configure Branches and Versions for multiple selection"/></p>
+	</td>
+  </tr>
+
+  <tr id="matching-might-not-be-optimal">
+    <td width="30%" valign="top" align="left"><b>Warning about possible inaccuracy in comparison result</b></td>
+    <td width="70%" valign="top">
+	The compare framework caps the result accuracy for large files. This used to happen silently, which
+	confused users. Now when the faster algorithm is used a warning label appears.
+	<p><img alt="Mathing might not be optimal label" title="Matching might not be optimal label"
+		src="images/matching-might-not-be-optimal.png"/>
+	</p>
+    </td>
   </tr>
 
     <!-- ******************** Debug ********************* -->
@@ -395,32 +432,39 @@ document in the plug-in developer's guide.
           Changes</div></td>
     </tr>
 
-  <tr id="debug-view-breadcrumb">
-    <td align="left" valign="top" width="30%"><b>Debug view breadcrumb</b></td>
-    <td valign="top" width="70%">Debug view now offers a breadcrumb
-      which shows the current active debug context. The breadcrumb is
-      activated automatically when the Debug view is resized to show only one
-      line of text.
-      <p><img alt="Debug view Breadcrumb" title="Debug view Breadcrumb"
-      src="images/debug-breadcrumb-1.png"><br><br></p>
-      <p>Each element in the breadcrumb can be selected and actions can
-      be invoked through a context menu or keyboard short cuts.
-      </p>
-      <p><img alt="Debug Breadcrumb Popup Menu"
-      title="Debug Breadcrumb Popup Menu" src="images/debug-breadcrumb-2.png"><br><br>
-      </p>
-      <p>Finally, a drop-down menu allows navigating to a new
-      element and changing the active debug context.
-      </p>
-      <p><img alt="Debug view Breadcrumb Drop-Down"
-      title="Debug view Breadcrumb Drop-Down"
-      src="images/debug-breadcrumb-3.png"></p>
-    </td>
-  </tr>
+	<tr id="expressionsviewcolumnsupport">
+	<td align="left" valign="top" width="30%"><b>Columns in Expressions view
+	</b></td>
+	<td valign="top" width="70%">The <b>Expressions</b> view now supports column display
+	just like the <b>Variables</b> view. To switch to a column 
+	presentation select <b>Layout > Show Columns</b> from the view's menu.
+	<p><img alt="Expressions View with Columns" title="Expressions View with Columns"
+	src="images/expressions-columns.png"/><br/><br/></p>
+	<p>Users can also quickly edit existing expressions in-line by clicking on the 
+	expression in the <b>Name</b> column.  To add a	new expression, click on the
+	<b><i>Add new expression</i></b> place-holder at the bottom of the list.
+	</p>
+	</td>
+	</tr>
+
+	<tr id="breakpointdetails">
+	<td align="left" valign="top" width="30%"><b>Breakpoint detail panes
+	</b></td>
+	<td valign="top" width="70%">The breakpoints view now provides detail panes
+	to display and edit breakpoint properties. Use the view's <b>Layout</b> menu
+	to configure the orientation of the detail pane or hide it. 
+	<p><img alt="Breakpoint Detail Panes" title="Breakpoint Detail Panes"
+	src="images/breakpoint-details.png"/><br/><br/></p>
+	<p>For example, the detail pane for a Java line breakpoint allows its
+	condition to be edited in place with content assist. Use the <b>File > Save (Ctrl-S)</b>
+	action to save a condition that has been edited. Check box and radio button properties are
+	saved immediately.
+	</p>
+	</td>
+	</tr>
 
     <!-- ****************** END OF N&N TABLE ****************** -->
-  </tbody>
+</tbody>
 </table>
-
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.platform/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.platform/META-INF/MANIFEST.MF
index 917625b..54485c6 100644
--- a/eclipse/plugins/org.eclipse.platform/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.platform/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.platform; singleton:=true
-Bundle-Version: 3.3.202.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: platform.jar
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -10,14 +10,8 @@ Require-Bundle: org.eclipse.ui.intro;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.cheatsheets;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
- org.eclipse.update.ui;bundle-version="[3.1.0,4.0.0)";resolution:=optional,
- org.eclipse.ui.intro.universal;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.ide.application;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4,
  CDC-1.0/Foundation-1.0,
  J2SE-1.3
-Import-Package: javax.xml.parsers,
- org.xml.sax,
- org.xml.sax.helpers
 Export-Package: org.eclipse.platform.internal;x-internal:=true
diff --git a/eclipse/plugins/org.eclipse.platform/about.properties b/eclipse/plugins/org.eclipse.platform/about.properties
index 8bf09c1..f1924a0 100644
--- a/eclipse/plugins/org.eclipse.platform/about.properties
+++ b/eclipse/plugins/org.eclipse.platform/about.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ blurb=Eclipse Platform\n\
 Version: {featureVersion}\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2011.  All rights reserved.\n\
 Visit http://www.eclipse.org/platform\n\
 \n\
 This product includes software developed by the\n\
diff --git a/eclipse/plugins/org.eclipse.platform/cheatsheets/cvs_checkout.xml b/eclipse/plugins/org.eclipse.platform/cheatsheets/cvs_checkout.xml
index 4f6270c..af369e4 100644
--- a/eclipse/plugins/org.eclipse.platform/cheatsheets/cvs_checkout.xml
+++ b/eclipse/plugins/org.eclipse.platform/cheatsheets/cvs_checkout.xml
@@ -67,7 +67,7 @@
     <description>
       To see the project in your workspace, switch to the <b>Resource</b>
       perspective via Window > Open Perspective > Resource to see the
-      project in the <b>Navigator</b> view. You can now view and work with the
+      project in the <b>Project Explorer</b> view. You can now view and work with the
       contents of the project.
     </description>
   </item>
diff --git a/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent2.xml b/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent2.xml
index ad54e41..490435d 100644
--- a/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent2.xml
+++ b/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent2.xml
@@ -9,7 +9,7 @@
           		<text>Join the community, read articles and news on Eclipse.org</text>
        		</link>
 			<group id="rss-news" label="Latest News" expandable="true" expanded="true">
-				<contentProvider id="rss-viewer" pluginId="org.eclipse.platform" class="org.eclipse.platform.internal.EclipseRSSViewer">
+				<contentProvider id="url=http://www.eclipse.org/home/eclipsenews.rss##welcome_items=5##no_news_url=http://www.eclipse.org/community/##no_news_text=Welcome to the Eclipse Community Page" pluginId="org.eclipse.ui.intro" class="org.eclipse.ui.intro.contentproviders.EclipseRSSViewer">
 				</contentProvider>
 			</group>
        </group>
diff --git a/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent3.xml b/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent3.xml
index 6d52765..899529d 100644
--- a/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent3.xml
+++ b/eclipse/plugins/org.eclipse.platform/intro/whatsnewExtensionContent3.xml
@@ -2,8 +2,8 @@
 <introContent>
   	<extensionContent id="org.eclipse.ui.workbench.migration" name="Porting Guide" alt-style="css/whatsnew.properties" style="css/whatsnew.css" path="whatsnew/@">
 		<group filter="plugin=org.eclipse.platform.doc.isv" style-id="content-group" id="content-group">
-       		<link label="Migration from the previous release" url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.isv/porting/eclipse_3_5_porting_guide.html" id="migration" style-id="content-link">
-          		<text>Learn what you need to do to make your old code work in Eclipse 3.5</text>
+       		<link label="Migration from the previous release" url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.platform.doc.isv/porting/eclipse_3_6_porting_guide.html" id="migration" style-id="content-link">
+          		<text>Learn what you need to do to make your old code work in Eclipse 3.6</text>
        		</link>
        	</group>
   	</extensionContent>
diff --git a/eclipse/plugins/org.eclipse.platform/plugin.properties b/eclipse/plugins/org.eclipse.platform/plugin.properties
index 16681ba..5a10b42 100644
--- a/eclipse/plugins/org.eclipse.platform/plugin.properties
+++ b/eclipse/plugins/org.eclipse.platform/plugin.properties
@@ -14,10 +14,10 @@ providerName=Eclipse.org
 productName=Eclipse Platform
 productBlurb=Eclipse Platform\n\
 \n\
-Version: 3.5.2\n\
+Version: 3.6.2\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2011.  All rights reserved.\n\
 Visit http://www.eclipse.org/platform\n\
 \n\
 This product includes software developed by the\n\
diff --git a/eclipse/plugins/org.eclipse.platform/plugin_customization.ini b/eclipse/plugins/org.eclipse.platform/plugin_customization.ini
index 5ce362d..de51636 100644
--- a/eclipse/plugins/org.eclipse.platform/plugin_customization.ini
+++ b/eclipse/plugins/org.eclipse.platform/plugin_customization.ini
@@ -25,7 +25,7 @@ org.eclipse.ui/DOCK_PERSPECTIVE_BAR=topRight
 org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true
 
 # Welcome theme to use
-org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.circles
+org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.slate
 
 # Root page links to show in the Universal Welcome
 org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew
diff --git a/eclipse/plugins/org.eclipse.platform/splash.bmp b/eclipse/plugins/org.eclipse.platform/splash.bmp
index 4546d9e..cd72727 100644
Binary files a/eclipse/plugins/org.eclipse.platform/splash.bmp and b/eclipse/plugins/org.eclipse.platform/splash.bmp differ
diff --git a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/EclipseRSSViewer.java b/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/EclipseRSSViewer.java
deleted file mode 100644
index 15e4650..0000000
--- a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/EclipseRSSViewer.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.platform.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Stack;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.intro.config.IIntroContentProvider;
-import org.eclipse.ui.intro.config.IIntroContentProviderSite;
-import org.eclipse.ui.intro.config.IIntroURL;
-import org.eclipse.ui.intro.config.IntroURLFactory;
-import org.osgi.framework.Bundle;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-public class EclipseRSSViewer implements IIntroContentProvider {
-	private static final String NEWS_URL = "http://www.eclipse.org/home/eclipsenews.rss"; //$NON-NLS-1$
-	private static final String INTRO_SHOW_IN_BROWSER = "http://org.eclipse.ui.intro/openBrowser?url="; //$NON-NLS-1$
-	private static final int MAX_NEWS_ITEMS = 5;
-	private static final String HREF_BULLET = "bullet"; //$NON-NLS-1$
-
-	private IIntroContentProviderSite site;
-
-	private boolean disposed;
-
-	private String id;
-
-	private FormToolkit toolkit;
-
-	private Composite parent;
-
-	private Image bulletImage;
-
-	private List items;
-
-	private FormText formText;
-
-	static class NewsItem {
-		String label;
-
-		String url;
-
-		void setLabel(String label) {
-			this.label = label;
-		}
-
-		void setUrl(String url) {
-			this.url = url;
-		}
-	}
-
-	class NewsFeed implements Runnable {
-		public void run() {
-			// important: don't do the work if the
-			// part gets disposed in the process
-			if (disposed)
-				return;
-			createNewsItems();
-			if (disposed)
-				return;
-			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
-				public void run() {
-					if (parent != null) {
-						// we must recreate the content
-						// for SWT because we will use
-						// a gentle incremental reflow.
-						// HTML reflow will simply reload the page.
-						createContent(id, parent, toolkit);
-						reflow(formText);
-					}
-					site.reflow(EclipseRSSViewer.this, true);
-				}
-			});
-		}
-	}
-
-	/**
-	 * Handles RSS XML and populates the items list with at most
-	 * MAX_NEWS_ITEMS items.
-	 */
-	private class RSSHandler extends DefaultHandler {
-
-		private static final String ELEMENT_RSS = "rss"; //$NON-NLS-1$
-		private static final String ELEMENT_CHANNEL = "channel"; //$NON-NLS-1$
-		private static final String ELEMENT_ITEM = "item"; //$NON-NLS-1$
-		private static final String ELEMENT_TITLE = "title"; //$NON-NLS-1$
-		private static final String ELEMENT_LINK = "link"; //$NON-NLS-1$
-
-		private Stack stack = new Stack();
-		private StringBuffer buf;
-		private NewsItem item;
-		
-		public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-			stack.push(qName);
-			// it's a title/link in an item
-			if ((ELEMENT_TITLE.equals(qName) || ELEMENT_LINK.equals(qName))
-					&& (item != null)) {
-				// prepare the buffer; we're expecting chars
-				buf = new StringBuffer();
-			}
-			// it's an item in a channel in rss
-			else if (ELEMENT_ITEM.equals(qName)
-					&& (ELEMENT_CHANNEL.equals(stack.get(1)))
-					&& (ELEMENT_RSS.equals(stack.get(0)))
-					&& (stack.size() == 3)
-					&& (items.size() < MAX_NEWS_ITEMS)) {
-				// prepare the item
-				item = new NewsItem();
-			}
-		}
-		
-		public void endElement(String uri, String localName, String qName) throws SAXException {
-			stack.pop();
-			if (item != null) {
-				if (buf != null) {
-					if (ELEMENT_TITLE.equals(qName)) {
-						item.setLabel(buf.toString().trim());
-						buf = null;
-					}
-					else if (ELEMENT_LINK.equals(qName)) {
-						item.setUrl(buf.toString().trim());
-						buf = null;
-					}
-				}
-				else {
-					if (ELEMENT_ITEM.equals(qName)) {
-						// ensure we have a valid item
-						if (item.label != null && item.label.length() > 0 &&
-								item.url != null && item.url.length() > 0) {
-							items.add(item);
-						}
-						item = null;
-					}
-				}
-			}
-		}
-		
-		public void characters(char[] ch, int start, int length) throws SAXException {
-			// were we expecting chars?
-			if (buf != null) {
-				buf.append(new String(ch, start, length));
-			}
-		}
-	}
-
-	
-	public void init(IIntroContentProviderSite site) {
-		this.site = site;
-		Thread newsWorker = new Thread(new NewsFeed());
-		newsWorker.start();
-	}
-
-	public void createContent(String id, PrintWriter out) {
-		if (disposed)
-			return;
-		this.id = id;
-		if (items == null) {
-			out.print("<p class=\"status-text\">"); //$NON-NLS-1$
-			out.print(Messages.getString("EclipseRSSViewer_loading")); //$NON-NLS-1$
-			out.println("</p>"); //$NON-NLS-1$
-		} else {
-			if (items.size() > 0) {
-				out.println("<ul id=\"eclipse-news\">"); //$NON-NLS-1$
-				for (int i = 0; i < items.size(); i++) {
-					NewsItem item = (NewsItem) items.get(i);
-					out.print("<li>"); //$NON-NLS-1$
-					out.print("<a class=\"topicList\" href=\""); //$NON-NLS-1$
-					out.print(createExternalURL(item.url));
-					out.print("\">"); //$NON-NLS-1$
-					out.print(item.label);
-					out.print("</a>"); //$NON-NLS-1$
-					out.println("</li>"); //$NON-NLS-1$
-				}
-			} else {
-				out.print("<p class=\"status-text\">"); //$NON-NLS-1$
-				out.print(Messages.getString("EclipseRSSViewer_noNews")); //$NON-NLS-1$
-				out.println("</p>"); //$NON-NLS-1$
-			}
-			out.println("</ul>"); //$NON-NLS-1$
-		}
-	}
-
-	public void createContent(String id, Composite parent, FormToolkit toolkit) {
-		if (disposed)
-			return;
-		if (formText == null) {
-			// a one-time pass
-			formText = toolkit.createFormText(parent, true);
-			formText.addHyperlinkListener(new HyperlinkAdapter() {
-				public void linkActivated(HyperlinkEvent e) {
-					doNavigate((String) e.getHref());
-				}
-			});
-			bulletImage = createImage(new Path("images/topiclabel/arrow.gif")); //$NON-NLS-1$
-			if (bulletImage!=null)
-				formText.setImage(HREF_BULLET, bulletImage);
-			this.parent = parent;
-			this.toolkit = toolkit;
-			this.id = id;
-		}
-		StringBuffer buffer = new StringBuffer();
-		buffer.append("<form>"); //$NON-NLS-1$
-		if (items == null) {
-			buffer.append("<p>"); //$NON-NLS-1$
-			buffer.append(Messages.getString("EclipseRSSViewer_loading")); //$NON-NLS-1$
-			buffer.append("</p>"); //$NON-NLS-1$
-		} else {
-			if (items.size() > 0) {
-				for (int i = 0; i < items.size(); i++) {
-					NewsItem item = (NewsItem) items.get(i);
-					buffer.append("<li style=\"image\" value=\""); //$NON-NLS-1$
-					buffer.append(HREF_BULLET);
-					buffer.append("\">"); //$NON-NLS-1$
-					buffer.append("<a href=\""); //$NON-NLS-1$
-					buffer.append(item.url);
-					buffer.append("\">"); //$NON-NLS-1$
-					buffer.append(item.label);
-					buffer.append("</a>"); //$NON-NLS-1$
-					buffer.append("</li>"); //$NON-NLS-1$
-				}
-			} else {
-				buffer.append("<p>"); //$NON-NLS-1$
-				buffer.append(Messages.getString("EclipseRSSViewer_noNews")); //$NON-NLS-1$
-				buffer.append("</p>"); //$NON-NLS-1$
-			}
-		}
-		buffer.append("</form>"); //$NON-NLS-1$
-		formText.setText(buffer.toString(), true, false);
-	}
-
-	private String createExternalURL(String url) {
-		//TODO don't know which encoding to pass here - revisit
-		return INTRO_SHOW_IN_BROWSER+
-							URLEncoder.encode(url);
-	}
-
-	private Image createImage(IPath path) {
-		Bundle bundle = Platform.getBundle("org.eclipse.platform"); //$NON-NLS-1$
-		URL url = FileLocator.find(bundle, path, null);
-		try {
-			url = FileLocator.toFileURL(url);
-			ImageDescriptor desc = ImageDescriptor.createFromURL(url);
-			return desc.createImage();
-		} catch (IOException e) {
-			return null;
-		}
-	}
-
-	private void doNavigate(final String url) {
-		BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(),
-				new Runnable() {
-					public void run() {
-						IIntroURL introUrl = IntroURLFactory
-								.createIntroURL(url);
-						if (introUrl != null) {
-							// execute the action embedded in the IntroURL
-							introUrl.execute();
-							return;
-						}
-						// delegate to the browser support
-						openBrowser(url);
-					}
-				});
-	}
-
-	private void openBrowser(String href) {
-		try {
-			URL url = new URL(href);
-			IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
-					.getBrowserSupport();
-			support.getExternalBrowser().openURL(url);
-		} catch (PartInitException e) {
-		} catch (MalformedURLException e) {
-		}
-	}
-
-	private void createNewsItems() {
-		items = Collections.synchronizedList(new ArrayList());
-		InputStream in = null;
-		try {
-			URL url = new URL(NEWS_URL);
-			in = url.openStream();
-			SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
-			parser.parse(in, new RSSHandler());
-		}
-		catch (Exception e) {
-			// if anything goes wrong, fail silently; it will show a
-			// "no news available" message.
-		}
-		finally {
-			try {
-				if (in != null) {
-					in.close();
-				}
-			}
-			catch (IOException e) {
-				// nothing we can do here
-			}
-		}
-	}
-
-	/*
-	 * This method is copied from Section and seems useful in general. Perhaps
-	 * we should move it into content provider site, something like
-	 * 'reflow(Control startingControl)'
-	 */
-
-	private void reflow(Control initiator) {
-		Control c = initiator;
-		while (c != null) {
-			c.setRedraw(false);
-			c = c.getParent();
-			if (c instanceof ScrolledForm) {
-				break;
-			}
-		}
-		c = initiator;
-		while (c != null) {
-			if (c instanceof Composite)
-				((Composite) c).layout(true);
-			c = c.getParent();
-			if (c instanceof ScrolledForm) {
-				((ScrolledForm) c).reflow(true);
-				break;
-			}
-		}
-		c = initiator;
-		while (c != null) {
-			c.setRedraw(true);
-			c = c.getParent();
-			if (c instanceof ScrolledForm) {
-				break;
-			}
-		}
-	}
-
-	public void dispose() {
-		if (bulletImage != null) {
-			bulletImage.dispose();
-			bulletImage = null;
-		}
-		disposed = true;
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/Messages.java b/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/Messages.java
deleted file mode 100644
index 058bf8d..0000000
--- a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.platform.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
-	private static final String BUNDLE_NAME = "org.eclipse.platform.internal.messages"; //$NON-NLS-1$
-
-	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
-			.getBundle(BUNDLE_NAME);
-
-	private Messages() {
-	}
-
-	public static String getString(String key) {
-		try {
-			return RESOURCE_BUNDLE.getString(key);
-		} catch (MissingResourceException e) {
-			return '!' + key + '!';
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/messages.properties b/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/messages.properties
deleted file mode 100644
index f4422c3..0000000
--- a/eclipse/plugins/org.eclipse.platform/src-intro/org/eclipse/platform/internal/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-EclipseRSSViewer_loading=Loading the news...
-EclipseRSSViewer_noNews=No news at this time.
diff --git a/eclipse/plugins/org.eclipse.rcp/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.rcp/META-INF/MANIFEST.MF
index e77afc7..a50060c 100644
--- a/eclipse/plugins/org.eclipse.rcp/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.rcp/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.rcp; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Eclipse-AutoStart: true
diff --git a/eclipse/plugins/org.eclipse.releng.tools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.releng.tools/META-INF/MANIFEST.MF
index bf6aa60..e421337 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.releng.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %PluginName
 Bundle-SymbolicName: org.eclipse.releng.tools; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.5.200.qualifier
 Bundle-ClassPath: tools.jar
 Bundle-Activator: org.eclipse.releng.tools.RelEngPlugin
 Bundle-Vendor: %PluginProvider
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/BuildNotesPage.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/BuildNotesPage.java
index 8c80142..11e2a79 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/BuildNotesPage.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/BuildNotesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,16 +19,33 @@ import java.util.Date;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.eclipse.core.internal.resources.WorkspaceRoot;
+import org.eclipse.team.core.synchronize.SyncInfoSet;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
+
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -36,34 +53,24 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+
 import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
+import org.eclipse.ui.internal.texteditor.SWTUtil;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
 
+
 public class BuildNotesPage extends WizardPage {
 
-	private static final String FOLDER_BIN = "bin";
+	private static final String FOLDER_BIN = "bin"; //$NON-NLS-1$
 
-	private static final String EXT_HTML = "html";
+	private static final String EXT_HTML = "html"; //$NON-NLS-1$
 
-	private static final String BUILD_NOTES_HTML = "/build_notes.html";
+	private static final String BUILD_NOTES_HTML = "/build_notes.html"; //$NON-NLS-1$
 
-	private String FILE_PATH_KEY = "BuildNotesPage.filePath";
+	private String FILE_PATH_KEY = "BuildNotesPage.filePath"; //$NON-NLS-1$
 
-	private String UPDATE_FILE_KEY = "BuildNotesPage.updateNotesButton";
+	private String UPDATE_FILE_KEY = "BuildNotesPage.updateNotesButton"; //$NON-NLS-1$
 
 	private Button updateNotesButton;
 
@@ -129,8 +136,7 @@ public class BuildNotesPage extends WizardPage {
 				Path path = new Path(filePath.getText());
 				validPath = false;
 				if (!path.isEmpty()) {
-					IFile file = ((WorkspaceRoot) ResourcesPlugin
-							.getWorkspace().getRoot()).getFile(path);
+					IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
 					if (path.isValidPath(filePath.getText())
 							&& file.getParent().exists()) {
 						if (path.getFileExtension().equals(EXT_HTML)) {
@@ -171,6 +177,7 @@ public class BuildNotesPage extends WizardPage {
 				}
 			}
 		});
+		SWTUtil.setButtonDimensionHint(browse);
 
 		data = new GridData(GridData.FILL_BOTH);
 		data.horizontalSpan = 3;
@@ -223,10 +230,9 @@ public class BuildNotesPage extends WizardPage {
 	 * write to existing file
 	 */
 	public void updateNotesFile() {
-		if (!filePath.isDisposed()) {
+		if (bugSummaryMap != null && !filePath.isDisposed()) {
 			Path path = new Path(filePath.getText());
-			WorkspaceRoot root = (WorkspaceRoot) ResourcesPlugin.getWorkspace()
-					.getRoot();
+			IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 			final IFile file = root.getFile(path);
 			if (file.exists()) {
 				writeUpdate(file);
@@ -378,9 +384,11 @@ public class BuildNotesPage extends WizardPage {
 			GetBugsOperation getBugsOperation = new GetBugsOperation(
 					(ReleaseWizard) getWizard(), syncInfoSet);
 			getBugsOperation.run(this);
-			String tempText = outputReport();
-			if (tempText != null) {
-				reportText.setText(tempText);
+			if (bugSummaryMap != null) {
+				String tempText = outputReport();
+				if (tempText != null) {
+					reportText.setText(tempText);
+				}
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/FixCopyrightAction.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/FixCopyrightAction.java
index b2e50dd..fb1b4f2 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/FixCopyrightAction.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/FixCopyrightAction.java
@@ -265,6 +265,10 @@ public class FixCopyrightAction implements IObjectActionDelegate {
 						return 0;
 
 					}
+					else if (swt && logComment.indexOf("restore HEAD after accidental deletion by error in automated build script") != -1) {
+						// the last modification was the recovery when SWT was accidentally deleted from HEAD in July 2009, so ignore
+						return 0;
+					}
 					else if (filterString != null && logComment.indexOf(filterString) != -1) {
 						//the last update was a copyright checkin - ignore
 						return 0;
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/GetBugsOperation.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/GetBugsOperation.java
index a4711c9..a5fce52 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/GetBugsOperation.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/GetBugsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,8 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.team.core.synchronize.SyncInfo;
@@ -42,6 +44,7 @@ import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
 import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
 import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation;
 import org.eclipse.team.internal.ccvs.ui.operations.RemoteLogOperation.LogEntryCache;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 public class GetBugsOperation {
 	private static final CVSTag TAG_1_1 = new CVSTag("1.1", CVSTag.VERSION);
@@ -272,7 +275,10 @@ public class GetBugsOperation {
 					}					
 				}
 			} catch (IOException e) {
-				CVSUIPlugin.openError(wizard.getShell(), null, null, e);
+				StatusManager.getManager().handle(
+						new Status(IStatus.ERROR, RelEngPlugin.ID, Messages
+								.getString("GetBugsOperation.Error"), e),
+						StatusManager.SHOW | StatusManager.LOG);
 			}
 			monitor.worked(1);
 		}
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectSelectionPage.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectSelectionPage.java
index f88fab5..1c98d90 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,13 +10,20 @@
  *******************************************************************************/
 package org.eclipse.releng.tools;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -25,10 +32,13 @@ import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceComparator;
 
 
 /**
@@ -96,6 +106,13 @@ public class ProjectSelectionPage extends WizardPage {
 		viewer.getTree().setFont(font);
 		viewer.setLabelProvider(new MapFileLabelProvider());
 		viewer.setContentProvider(getContentProvider());
+		viewer.setComparator(new ResourceComparator(ResourceComparator.NAME) {
+			public int compare(Viewer viewer, Object o1, Object o2) {
+				if (o1 instanceof MapFile && o2 instanceof MapFile) {
+					return super.compare(viewer, ((MapFile) o1).getFile(), ((MapFile) o2).getFile()); 
+				}
+				return super.compare(viewer, o1, o2);
+			}});
 		viewer.setInput(mapProject);
 		viewer.expandAll();
 		viewer.addCheckStateListener(new ICheckStateListener(){
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectValidationDialog.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectValidationDialog.java
index a19d7c2..8d2691b 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectValidationDialog.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ProjectValidationDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,6 @@
  *******************************************************************************/
 package org.eclipse.releng.tools;
 
-import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.team.core.TeamException;
 import org.eclipse.team.internal.ccvs.core.CVSCompareSubscriber;
 import org.eclipse.team.internal.ccvs.core.CVSTag;
@@ -27,6 +21,18 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
 import org.eclipse.team.ui.synchronize.ParticipantPageDialog;
 import org.eclipse.team.ui.synchronize.ParticipantPageSaveablePart;
 
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.core.resources.IProject;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.compare.CompareConfiguration;
+
+
 /**
  *It extends <code>Dialog<code>. This dialog will show up if <code>isValidateButtonSelected()<code> 
  *in <code>TagPage<code> returns true
@@ -36,14 +42,15 @@ public class ProjectValidationDialog extends ParticipantPageDialog {
 	private String title = Messages.getString("ProjectValidationDialog.2"); //$NON-NLS-1$
 	
 	public static void validateRelease(final Shell shell, final IProject[] p, final CVSTag[] tags, IProgressMonitor monitor) throws TeamException{
-		final CompareParticipant participant = new CompareParticipant(new CVSCompareSubscriber(p, tags, Messages.getString("ReleaseWizard.20"))); //$NON-NLS-1$
+		final CompareParticipant participant = new CompareParticipant(new CVSCompareSubscriber(p, tags, Messages.getString("ReleaseWizard.26"))); //$NON-NLS-1$
 		try {
 			participant.refreshNow(p, Messages.getString("ReleaseWizard.20"), monitor); //$NON-NLS-1$
-			if (!participant.getSyncInfoSet().isEmpty()) {
+			
+			if (!monitor.isCanceled() && !participant.getSyncInfoSet().isEmpty()) {
 				Display.getDefault().syncExec(new Runnable() {
 					public void run() {
-                        if (MessageDialog.openQuestion(shell, "Workspace Differs From Released",
-                                "The local workspace contents do not match what is released. There is a good chance that the release failed. Do you want to see the difference?"))
+                        if (MessageDialog.openQuestion(shell, "Workspace Differs From Released Contents",
+                                "The local workspace contents does not match what is released. There is a good chance that the release failed. Do you want to see the difference?"))
                             openValidationFailedDialog(shell, participant);
 					}
 				});	
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ReleaseWizard.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ReleaseWizard.java
index fc9dd25..0e524c9 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ReleaseWizard.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ReleaseWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,24 +13,15 @@ package org.eclipse.releng.tools;
 import java.lang.reflect.InvocationTargetException;
 import java.util.HashSet;
 import java.util.Set;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.*;
+
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.releng.tools.preferences.MapProjectPreferencePage;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.team.core.TeamException;
 import org.eclipse.team.internal.ccvs.core.CVSTag;
 import org.eclipse.team.internal.ccvs.core.client.Command;
-import org.eclipse.team.internal.ccvs.ui.*;
+import org.eclipse.team.internal.ccvs.ui.CVSLightweightDecorator;
+import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
 import org.eclipse.team.internal.ccvs.ui.operations.CommitOperation;
 import org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation;
 import org.eclipse.team.internal.ui.ITeamUIImages;
@@ -38,6 +29,35 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
 import org.eclipse.team.internal.ui.dialogs.IPromptCondition;
 import org.eclipse.team.internal.ui.dialogs.PromptingDialog;
 
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardDialog;
+
 
 public class ReleaseWizard extends Wizard {
 
@@ -54,6 +74,7 @@ public class ReleaseWizard extends Wizard {
 	private MapFileComparePage mapComparePage;
 	private CommitCommentPage commentPage;
 	private BuildNotesPage buildNotesPage;
+	private ValidatePage validatePage;
 
 	private Dialog parentDialog;
 	private IDialogSettings section;
@@ -138,42 +159,53 @@ public class ReleaseWizard extends Wizard {
 		
 		if (!defaultBeingUsed) addMapSelectionPage();
 		
-		projectSelectionPage = new ProjectSelectionPage(Messages.getString("ReleaseWizard.5"), //$NON-NLS-1$
-				Messages.getString("ReleaseWizard.6"),  //$NON-NLS-1$
+		ImageDescriptor wizardPageImageDescriptor= TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE);
+		
+		projectSelectionPage = new ProjectSelectionPage("ProjectSelectionPage", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.6"), //$NON-NLS-1$
 				section, 
-				TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+				wizardPageImageDescriptor);
 		projectSelectionPage.setDescription(Messages.getString("ReleaseWizard.7")); //$NON-NLS-1$
 		addPage(projectSelectionPage);
 		
-		tagPage = new TagPage(Messages.getString("ReleaseWizard.8"),  //$NON-NLS-1$
-				Messages.getString("ReleaseWizard.9"),  //$NON-NLS-1$
+		tagPage = new TagPage("TagPage", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.9"), //$NON-NLS-1$
 				section, 
-				TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+				wizardPageImageDescriptor);
 		tagPage.setDescription(Messages.getString("ReleaseWizard.10")); //$NON-NLS-1$
 		addPage(tagPage);
 		
-		projectComparePage = new ProjectComparePage(Messages.getString("ReleaseWizard.11"), //$NON-NLS-1$
-				Messages.getString("ReleaseWizard.12"),  //$NON-NLS-1$
-				section, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+		projectComparePage = new ProjectComparePage("ProjectComparePage", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.12"), //$NON-NLS-1$
+				section,
+				wizardPageImageDescriptor);
 		projectComparePage.setDescription(Messages.getString("ReleaseWizard.13")); //$NON-NLS-1$
 		addPage(projectComparePage);
 		
-		buildNotesPage = new BuildNotesPage(Messages.getString("ReleaseWizard.2"), //$NON-NLS-1$
-				Messages.getString("ReleaseWizard.1"), section, TeamUIPlugin //$NON-NLS-1$
-				.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+		buildNotesPage = new BuildNotesPage("Build Notes Page", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.1"), //$NON-NLS-1$
+				section,
+				wizardPageImageDescriptor);
 		buildNotesPage.setDescription(Messages.getString("ReleaseWizard.0")); //$NON-NLS-1$
 		addPage(buildNotesPage);
 		
-		mapComparePage = new MapFileComparePage(Messages.getString("ReleaseWizard.14"), //$NON-NLS-1$
+		mapComparePage = new MapFileComparePage("MapComparePage", //$NON-NLS-1$
 				Messages.getString("ReleaseWizard.15"),  //$NON-NLS-1$
-				TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE));
+				wizardPageImageDescriptor);
 		mapComparePage.setDescription(Messages.getString("ReleaseWizard.16")); //$NON-NLS-1$
 		addPage(mapComparePage);
 		
-		commentPage = new CommitCommentPage(parentDialog, Messages.getString("ReleaseWizard.17"), //$NON-NLS-1$
-				Messages.getString("ReleaseWizard.18"), TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE), Messages.getString("ReleaseWizard.19")); //$NON-NLS-1$ //$NON-NLS-2$
+		commentPage = new CommitCommentPage(parentDialog, "Commit", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.18"), //$NON-NLS-1$
+				wizardPageImageDescriptor,
+				Messages.getString("ReleaseWizard.19")); //$NON-NLS-1$
 		addPage(commentPage);
 		
+		validatePage = new ValidatePage(parentDialog, "ValidatePage", //$NON-NLS-1$
+				Messages.getString("ReleaseWizard.validatePageTitle"), //$NON-NLS-1$
+				wizardPageImageDescriptor);
+		addPage(validatePage);
+		
 		if (defaultBeingUsed) broadcastMapProjectChange(mapProject);
 	}
 	
@@ -262,6 +294,12 @@ public class ReleaseWizard extends Wizard {
 						try {						
 							if(tagPage.isValidateButtonSelected()){
 								try {
+									getShell().getDisplay().asyncExec(new Runnable() {
+										public void run() {
+											if (parentDialog instanceof WizardDialog)
+												((WizardDialog)parentDialog).showPage(validatePage);
+										}
+									});
 									validateRelease(new SubProgressMonitor(monitor, 10));
 								} catch (TeamException e) {
 									throw new InvocationTargetException(e);
@@ -460,8 +498,11 @@ public class ReleaseWizard extends Wizard {
 		if (!tagPage.isPageComplete()) {
 			return false;
 		}
-		// Force map comparison if option set by user
 		IWizardPage currentPage = getContainer().getCurrentPage();
+		if (currentPage == validatePage)
+			return false;
+		
+		// Force map comparison if option set by user
 		if(currentPage == tagPage){
 			if(tagPage.compareButtonSelected()){
 				return false;
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/TagPage.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/TagPage.java
index c45affb..44e7fd0 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/TagPage.java
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/TagPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,10 +15,8 @@ import java.util.Arrays;
 import java.util.Calendar;
 import java.util.List;
 
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.team.internal.ccvs.core.CVSTag;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -32,7 +30,13 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
-import org.eclipse.team.internal.ccvs.core.CVSTag;
+
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.WizardPage;
+
 
 /**
  *This class extends <code>WizardPage<code>. It allows user to enter a tag name and make some additional 
@@ -122,12 +126,10 @@ public class TagPage extends WizardPage{
 		
 		Group group = new Group(composite, SWT.LEFT);
 		group.setLayout(new GridLayout());
-		group.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+		GridData layoutData= new GridData(GridData.FILL, GridData.CENTER, true, false);
+		group.setLayoutData(layoutData);
 		group.setFont(font);
-		
-		Label mapLabel = new Label(group, SWT.HORIZONTAL);	 
-		mapLabel.setText(Messages.getString("TagPage.9")); //$NON-NLS-1$
-		mapLabel.setFont(font);
+		group.setText(Messages.getString("TagPage.9")); //$NON-NLS-1$
 		
 		compareButton = new Button(group,SWT.RADIO);
 		compareButton.setText(Messages.getString("TagPage.10")); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ValidatePage.java b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ValidatePage.java
new file mode 100644
index 0000000..52ad3c4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/ValidatePage.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.releng.tools;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardPage;
+
+
+/**
+ * Validate page which is shown while the release is being validated.
+ * 
+ * @since 3.6
+ */
+public class ValidatePage extends WizardPage {
+
+	public ValidatePage(Dialog parentDialog, String pageName, String title, ImageDescriptor image) {
+		super(pageName, title, image);
+		setDescription(Messages.getString("ValidatePage.description")); //$NON-NLS-1$
+	}
+
+	public void createControl(Composite parent) {
+		setControl(new Label(parent, SWT.NONE));
+	}
+	
+	/*
+	 * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
+	 */
+	public boolean canFlipToNextPage() {
+		return false;
+	}
+	
+	/*
+	 * @see org.eclipse.jface.wizard.WizardPage#getPreviousPage()
+	 */
+	public IWizardPage getPreviousPage() {
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/messages.properties b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/messages.properties
index f0eb72d..366f8d0 100644
--- a/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/messages.properties
+++ b/eclipse/plugins/org.eclipse.releng.tools/src/org/eclipse/releng/tools/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,60 +8,53 @@
 # Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
-ReleaseWizard.5=ProjectSelectionPage
 ReleaseWizard.6=Project Selection
-ReleaseWizard.7=Select the projects to be considered for release
-ReleaseWizard.8=TagPage
+ReleaseWizard.7=Select the projects to be considered for release.
 ReleaseWizard.9=Release Tag
 ReleaseWizard.4=Map Project Selection
 ReleaseWizard.3=Specify a map project to release projects
-ReleaseWizard.0=List of Changes for Build
-ReleaseWizard.10=Enter the tag to be used for this release
-ReleaseWizard.11=ProjectComparePage
+ReleaseWizard.0=List of changes for this build.
+ReleaseWizard.10=Enter the tag to be used for this release.
 ReleaseWizard.12=Changed Projects
-ReleaseWizard.13=Review the changes that will be released
-ReleaseWizard.14=MapComparePage
-ReleaseWizard.15=Configuration File Changes
-ReleaseWizard.16=Review changes applied to release configuration files
-ReleaseWizard.17=Commit
+ReleaseWizard.13=Review the changes that will be released.
+ReleaseWizard.15=Map File Changes
+ReleaseWizard.16=Review changes applied to map files.
 ReleaseWizard.18=Commit Comment
-ReleaseWizard.19=Enter the commit comment for changed configuration files
+ReleaseWizard.19=Enter the commit comment for changed map files.
 ReleaseWizard.1=Notes for Build Changes
-ReleaseWizard.20=Releng Release
-ReleaseWizard.2=Build Notes Page
-ReleaseWizard.20=Releasing build notes file
+ReleaseWizard.20=Releasing build notes file...
 ReleaseWizard.21=Releasing
 ReleaseWizard.22=Map file was not committed
 ReleaseWizard.23=Errors occurred during release
 ReleaseWizard.24=Release Failed
 ReleaseWizard.25=There were errors reported during the release. The map files have not been updated
+ReleaseWizard.26=Releng Release
+ReleaseWizard.validatePageTitle=Release Validation
 MapProjectSelectionWizard.1=Map Project Selection
 MapProjectSelectionWizard.2=Specify a map project to perform action with local file
-MapProjectSelectionPage.0=Always use this map project
+MapProjectSelectionPage.0=&Always use this map project
 MapProjectSelectionPage.1=Invalid map project selected
 MapProjectSelectionPage.2=Project 
 MapProjectSelectionPage.3=\ is not shared
 ProjectSelectionPage.0=ProjectSelectionPage.selected
 ProjectSelectionPage.1=ProjectSelectionPage.compareButton
-ProjectSelectionPage.2=&Select the projects to be release
+ProjectSelectionPage.2=&Select the projects to be released:
 ProjectSelectionPage.3=&Release only projects that have changed since the last release
 TagPage.1=TagPage.Tag
 TagPage.2=TagPage.Compare
 TagPage.3=TagPage.Commmit
 TagPage.4=TagPage.move
 TagPage.5=TagePage.validate
-TagPage.6=Tag name:
-TagPage.7=Move tag if it already exists
-TagPage.8=Validate the release once completed
-TagPage.9=For changed release configuration files...
-TagPage.10=Show the file change before committing
-TagPage.11=Commit the files without showing changes
-ProjectCompareDialog.0=The following projects still have differences between the local and released copies
+TagPage.6=&Tag name:
+TagPage.7=&Move tag if it already exists
+TagPage.8=&Validate the release once completed
+TagPage.9=Action for changed map files
+TagPage.10=&Show the file change before committing
+TagPage.11=&Commit the files without showing changes
 RepositorySelectionDialog.0=Select Repository Location
 RepositorySelectionDialog.1=Select the repository location to be used for tagging
-ProjectComparePage.0=Changes since last release
 ProjectComparePage.1=There were no changes in the selected projects.
-ProjectComparePage.2=Generate Build Notes
+ProjectComparePage.2=&Generate Build Notes
 ProjectComparePage.3=RelEng Release
 RelEngPlugin.1=org.eclipse.releng
 RelEngPlugin.2=maps
@@ -71,31 +64,31 @@ RelEngPreferenceInitializer.0=Copyright (c) ${date} IBM Corporation and others.\
 CopyrightPreferencePage.0=Use "${date}" to substitute in "creation_year, revision_year"
 CopyrightPreferencePage.1=Default creation year:
 CopyrightPreferencePage.2=Replace all existing copyright comments with this copyright template
-CopyrightPreferencePage.3=Fix up existing copyright comments to follow copyright template format
 CopyrightPreferencePage.4=Skip over properties files
 CopyrightPreferencePage.5=Copyright template
 CopyrightPreferencePage.6=Default year must be a positive number
 CopyrightPreferencePage.7=Default revision year:
 CopyrightPreferencePage.8=Always use default revision year instead of repository lookup
 CopyrightPreferencePage.9=Skip over XML files
-BuildNotesPage.2=Update Build Notes File
-BuildNotesPage.3=Build Notes File:
+BuildNotesPage.2=&Update Build Notes file
+BuildNotesPage.3=Build Notes &file:
 BuildNotesPage.5=Invalid file extension.
 BuildNotesPage.6=Invalid path.
 BuildNotesPage.7=Input a file path.
-BuildNotesPage.8=Browse
+BuildNotesPage.8=&Browse...
 BuildNotesPage.11=Creating file...
 BuildNotesPage.38=Updating File...
 BuildNotesPage.42=Select Build Notes File
-BuildNotesPage.43=Select the file to update with the new build notes.
+BuildNotesPage.43=&Select the file to update with the new build notes:
 GetBugsOperation.0=Beginning Bug Operation
 GetBugsOperation.1=Fetching Bugzilla Summaries.
+GetBugsOperation.Error=Problem while fetching Bugzilla summaries
 CopyrightDialog.1=Fix Copyrights
 CopyrightDialog.2=&Enter a search string:
 CopyrightDialog.3=Any file whose last CVS commit comment contained the above as a substring will be excluded from this copyright update.\nThis is to prevent these files from being updated multiple times if the copyright update needs to be run again in the near future.\nLeave the field empty to include all files in this update.
 MapProjectPreferencePage.1=Choose the name of the project which contains your map files.
-MapProjectPreferencePage.2=Select one of the following to be used as your default map project
-MapProjectPreferencePage.0=Always prompt
+MapProjectPreferencePage.2=&Select one of the following to be used as your default map project:
+MapProjectPreferencePage.0=&Always prompt
 MapProjectPreferencePage.3=Invalid map project selected
 MapProjectPreferencePage.4=Project 
 MapProjectPreferencePage.5=\ is not shared
@@ -106,3 +99,4 @@ CVSTagHelper.2=Map file entry not found
 ReplaceLocalFromMap.1=Map file entry was not found for the following project(s), replacement will be done from HEAD
 ReplaceLocalFromMap.0=Replace With
 SourceFile.0=The file buffer could not be acquired for: {0}
+ValidatePage.description=Projects tagged and map files released. Validating the release...
diff --git a/eclipse/plugins/org.eclipse.sdk/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.sdk/META-INF/MANIFEST.MF
index 7db6fc9..afe0233 100644
--- a/eclipse/plugins/org.eclipse.sdk/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.sdk/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.sdk; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.sdk/plugin.properties b/eclipse/plugins/org.eclipse.sdk/plugin.properties
index 438fd19..9e5e26a 100644
--- a/eclipse/plugins/org.eclipse.sdk/plugin.properties
+++ b/eclipse/plugins/org.eclipse.sdk/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -14,10 +14,10 @@ providerName=Eclipse.org
 productName=Eclipse SDK
 productBlurb=Eclipse SDK\n\
 \n\
-Version: 3.5.2\n\
+Version: 3.6.2\n\
 Build id: {0}\n\
 \n\
-(c) Copyright Eclipse contributors and others 2000, 2010.  All rights reserved.\n\
+(c) Copyright Eclipse contributors and others 2000, 2011.  All rights reserved.\n\
 Visit http://www.eclipse.org/platform\n\
 \n\
 This product includes software developed by the\n\
@@ -58,9 +58,6 @@ TriggerPointAdvisor.proceedSingle = Enable the required capability?
 TriggerPointAdvisor.dontAsk = &Always enable capabilities and don't ask me again
 TriggerPointAdvisor.noDetails = Select a capability to view its description.
 
-search.Google.label = Google
-search.Google.desc = Performs a Google web search
-
 search.Eclipse.label = Eclipse.org 
 search.Eclipse.desc = Searches mailing lists, news groups, articles and other documents on Eclipse.org
 
diff --git a/eclipse/plugins/org.eclipse.sdk/plugin.xml b/eclipse/plugins/org.eclipse.sdk/plugin.xml
index df5ca36..703c07e 100644
--- a/eclipse/plugins/org.eclipse.sdk/plugin.xml
+++ b/eclipse/plugins/org.eclipse.sdk/plugin.xml
@@ -38,7 +38,7 @@
 				value="%introDescription-samples"/>
     <property
           name="buildIdLocation"
-          value="303,190">
+          value="312,190">
     </property>
       </product> 
     </extension> 
diff --git a/eclipse/plugins/org.eclipse.sdk/plugin_customization.ini b/eclipse/plugins/org.eclipse.sdk/plugin_customization.ini
index c928f49..e3d93bb 100644
--- a/eclipse/plugins/org.eclipse.sdk/plugin_customization.ini
+++ b/eclipse/plugins/org.eclipse.sdk/plugin_customization.ini
@@ -28,7 +28,7 @@ org.eclipse.ui/USE_WINDOW_WORKING_SET_BY_DEFAULT=true
 # Intro-related preferences (since 3.2)
 
 # Welcome theme to use
-org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.circles
+org.eclipse.ui.intro/INTRO_THEME = org.eclipse.ui.intro.universal.slate
 
 # Root page links to show in the Universal Welcome
 org.eclipse.ui.intro.universal/INTRO_ROOT_PAGES = overview,tutorials,samples,whatsnew
diff --git a/eclipse/plugins/org.eclipse.search/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.search/META-INF/MANIFEST.MF
index c6e06e9..3163b08 100644
--- a/eclipse/plugins/org.eclipse.search/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.search/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.search; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.0.qualifier
 Bundle-Activator: org.eclipse.search.internal.ui.SearchPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
@@ -29,6 +29,6 @@ Require-Bundle:
  org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
  org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ltk.ui.refactoring;bundle-version="[3.4.100,4.0.0)"
+ org.eclipse.ltk.ui.refactoring;bundle-version="[3.5.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
index 9480b18..919740b 100644
--- a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java	
+++ b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,8 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
 
+import org.eclipse.core.resources.IFile;
+
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuListener;
@@ -61,8 +63,11 @@ import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.Region;
 
 import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.OpenAndLinkWithEditorHelper;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
@@ -78,6 +83,7 @@ import org.eclipse.search.internal.ui.CopyToClipboardAction;
 import org.eclipse.search.internal.ui.SearchPlugin;
 import org.eclipse.search.internal.ui.SearchPluginImages;
 import org.eclipse.search.internal.ui.SelectAllAction;
+import org.eclipse.search.internal.ui.text.EditorOpener;
 import org.eclipse.search.ui.IContextMenuConstants;
 import org.eclipse.search.ui.IQueryListener;
 import org.eclipse.search.ui.ISearchQuery;
@@ -241,6 +247,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
 	private Integer fElementLimit;
 
 	/**
+	 * The editor opener.
+	 * @since 3.6
+	 */
+	private EditorOpener fEditorOpener= new EditorOpener();
+
+	/**
 	 * Flag (<code>value 1</code>) denoting flat list layout.
 	 */
 	public static final int FLAG_LAYOUT_FLAT = 1;
@@ -412,6 +424,48 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
 	}
 
 	/**
+	 * Opens an editor on the given file resource and tries to select the given offset and length.
+	 * <p>
+	 * If the page already has an editor open on the target object then that editor is brought to
+	 * front; otherwise, a new editor is opened. If <code>activate == true</code> the editor will be
+	 * activated.
+	 * <p>
+	 * 
+	 * @param page the workbench page in which the editor will be opened
+	 * @param file the file to open
+	 * @param offset the offset to select in the editor
+	 * @param length the length to select in the editor
+	 * @param activate if <code>true</code> the editor will be activated
+	 * @return an open editor or <code>null</code> if an external editor was opened
+	 * @throws PartInitException if the editor could not be initialized
+	 * @see org.eclipse.ui.IWorkbenchPage#openEditor(IEditorInput, String, boolean)
+	 * @since 3.6
+	 */
+	protected final IEditorPart openAndSelect(IWorkbenchPage page, IFile file, int offset, int length, boolean activate) throws PartInitException {
+		return fEditorOpener.openAndSelect(page, file, offset, length, activate);
+	}
+
+	/**
+	 * Opens an editor on the given file resource.
+	 * <p>
+	 * If the page already has an editor open on the target object then that editor is brought to
+	 * front; otherwise, a new editor is opened. If <code>activate == true</code> the editor will be
+	 * activated.
+	 * <p>
+	 * 
+	 * @param page the workbench page in which the editor will be opened
+	 * @param file the file to open
+	 * @param activate if <code>true</code> the editor will be activated
+	 * @return an open editor or <code>null</code> if an external editor was opened
+	 * @throws PartInitException if the editor could not be initialized
+	 * @see org.eclipse.ui.IWorkbenchPage#openEditor(IEditorInput, String, boolean)
+	 * @since 3.6
+	 */
+	protected final IEditorPart open(IWorkbenchPage page, IFile file, boolean activate) throws PartInitException {
+		return fEditorOpener.open(page, file, activate);
+	}
+
+	/**
 	 * This method is called whenever the set of matches for the given elements
 	 * changes. This method is guaranteed to be called in the UI thread. Note
 	 * that this notification is asynchronous. i.e. further changes may have
diff --git a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java
index 25d0f2a..bd95ce7 100644
--- a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java	
+++ b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchHistorySelectionDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -168,7 +168,7 @@ public class SearchHistorySelectionDialog extends SelectionDialog {
 				status= new Status(IStatus.ERROR, SearchPlugin.getID(), IStatus.ERROR, SearchMessages.SearchHistorySelectionDialog_history_size_error, null);
 			}
 			if (status == null) {
-				status= new Status(IStatus.OK, SearchPlugin.getID(), IStatus.OK, new String(), null);
+				status= Status.OK_STATUS;
 			}
 			updateStatus(status);
 			return !status.matches(IStatus.ERROR);
diff --git a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java
index 0715c3f..4568226 100644
--- a/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java	
+++ b/eclipse/plugins/org.eclipse.search/new search/org/eclipse/search2/internal/ui/SearchView.java	
@@ -43,6 +43,7 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.action.GroupMarker;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -434,7 +435,7 @@ public class SearchView extends PageBookView implements ISearchResultViewPart, I
 		ISearchResultPage page= getActivePage();
 		String label= ""; //$NON-NLS-1$
 		if (page != null) {
-			label= page.getLabel();
+			label= LegacyActionTools.escapeMnemonics(page.getLabel());
 		}
 		if (!fPageContent.isDisposed()) {
 			if (label.length() == 0) {
diff --git a/eclipse/plugins/org.eclipse.search/schema/searchPages.exsd b/eclipse/plugins/org.eclipse.search/schema/searchPages.exsd
index 4ba1d26..17c2b22 100644
--- a/eclipse/plugins/org.eclipse.search/schema/searchPages.exsd
+++ b/eclipse/plugins/org.eclipse.search/schema/searchPages.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.search">
+<schema targetNamespace="org.eclipse.search" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.search" id="searchPages" name="Search Pages"/>
@@ -14,6 +14,11 @@ locates the most specific registered search page for it.
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="page" minOccurs="0" maxOccurs="unbounded"/>
@@ -132,13 +137,8 @@ page comes first
          <attribute name="extensions" type="string">
             <annotation>
                <documentation>
-                  a comma separated list with file extensions on which 
-the search page can operate. Each extension must 
-also include a weight (0 meaning lowest weight) 
-which enables the search infrastructure to find the 
-best fitting page. The weight is separated from 
-the extension by a colon. If a search page can 
-search all possible resources then "*" can be used.
+                  a comma separated list with file extensions on which the search page can operate. Each extension must also include a weight (0 meaning lowest weight) which enables the search infrastructure to find the best fitting page. The weight is separated from the extension by a colon. If a search page can search all possible resources then "*" can be used.
+<br><b>Note:</b> If there is an <code>org.eclipse.search.ui.ISearchPageScoreComputer</code> adapter for the selected element which returns a higher weight, then this higher weight will be used.
                </documentation>
             </annotation>
          </attribute>
@@ -213,6 +213,7 @@ definition:
       </documentation>
    </annotation>
 
+
    <annotation>
       <appInfo>
          <meta.section type="implementation"/>
@@ -228,7 +229,7 @@ for full-text search.
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2001, 2004 IBM Corporation and others.<br>
+         Copyright (c) 2001, 2009 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
       </documentation>
    </annotation>
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileCharSequenceProvider.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileCharSequenceProvider.java
index 40db65a..66a8a6a 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileCharSequenceProvider.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/core/text/FileCharSequenceProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -285,7 +285,7 @@ public class FileCharSequenceProvider {
 				if (CHARSET_UTF_8.equals(charset)) {
 					/*
 					 * This is a workaround for a corresponding bug in Java readers and writer,
-					 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+					 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 					 * we remove the BOM before passing the stream to the reader
 					 */
 					IContentDescription description= fFile.getContentDescription();
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/CopyToClipboardAction.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/CopyToClipboardAction.java
index 98d6710..761278d 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/CopyToClipboardAction.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/CopyToClipboardAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,8 @@ package org.eclipse.search.internal.ui;
 import java.util.Collections;
 import java.util.Iterator;
 
+import org.eclipse.osgi.util.TextProcessor;
+
 import org.eclipse.swt.SWTError;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
@@ -115,6 +117,7 @@ public class CopyToClipboardAction extends Action {
 	}
 
 	private void copyToClipboard(String text, Shell shell) {
+		text= TextProcessor.deprocess(text);
 		Clipboard clipboard= new Clipboard(shell.getDisplay());
 		try {
 			copyToClipboard(clipboard, text, shell);
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
index 96200c4..ce585ea 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/ScopePart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -178,10 +178,8 @@ public class ScopePart {
 			} else if (!fUseProject.isEnabled()) {
 				scope= ISearchPageContainer.WORKSPACE_SCOPE;
 			}
-		} else if (scope == ISearchPageContainer.SELECTION_SCOPE) {
-			if (!fUseSelection.isEnabled()) {
-				scope= ISearchPageContainer.SELECTED_PROJECTS_SCOPE;
-			}
+		} else if (scope == ISearchPageContainer.SELECTION_SCOPE && !fUseSelection.isEnabled()) {
+			scope= fUseProject.isEnabled() ? ISearchPageContainer.SELECTED_PROJECTS_SCOPE : ISearchPageContainer.WORKSPACE_SCOPE;
 		}
 		fScope= scope;
 
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
index 238cb20..d104c31 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -527,6 +527,9 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
 		if (fCurrentPage != null) {
 			fCurrentPage.setVisible(true);
 		}
+		Control pageControl= fCurrentPage.getControl();
+		if (pageControl instanceof Composite)
+			((Composite)pageControl).layout(false, true);
 		fReplaceButton.setVisible(fCurrentPage instanceof IReplacePage);
 		notifyPageChanged();
 	}
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
index 23f6bf5..9ea4905 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,13 +42,14 @@ import org.eclipse.search.internal.ui.util.ExceptionHandler;
 import org.eclipse.search.ui.IGroupByKeyComputer;
 import org.eclipse.search.ui.SearchUI;
 
+
 /**
  * Manage search results
  * 	@deprecated old search
  */
 public class SearchManager implements IResourceChangeListener {
 
-	static final SearchManager fgDefault= new SearchManager();
+	static SearchManager fgDefault;
 
 	Search fCurrentSearch= null;
 
@@ -60,7 +61,9 @@ public class SearchManager implements IResourceChangeListener {
 	private LinkedList fPreviousSearches= new LinkedList();
 	private boolean fIsRemoveAll= false;
 
-	public static SearchManager getDefault() {
+	public static synchronized SearchManager getDefault() {
+		if (fgDefault == null)
+			fgDefault= new SearchManager();
 		return fgDefault;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
index 0905945..eccd2fd 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -54,7 +54,7 @@ SearchDialog_error_pageCreationFailed=The creation of the page ''{0}'' failed.
 SearchPlugin_internal_error= Internal Error
 
 Search_Error_search_title= Search Error
-Search_Error_search_message= An error occurred during the search operation
+Search_Error_search_message= An error occurred during the search operation.
 
 Search_Error_setDescription_title= Search Error
 Search_Error_setDescription_message= Cannot save workspace description
@@ -63,21 +63,21 @@ Search_Error_openResultView_title= Search Error
 Search_Error_openResultView_message= Could not open the search results view
 
 Search_Error_deleteMarkers_title= Search Error
-Search_Error_deleteMarkers_message= An error occurred while deleting search markers
+Search_Error_deleteMarkers_message= An error occurred while deleting search markers.
 
 Search_Error_createMarker_title= Search Error
 Search_Error_createMarker_message= Could not create a search marker
 
 Search_Error_markerAttributeAccess_title= Search Error
-Search_Error_markerAttributeAccess_message= An error occurred while accessing a marker attribute
+Search_Error_markerAttributeAccess_message= An error occurred while accessing a marker attribute.
 
 Search_Error_switchSearch_title= Search Error
-Search_Error_switchSearch_message= An error occurred while switching to a previous search result
+Search_Error_switchSearch_message= An error occurred while switching to a previous search result.
 
 Search_Error_createSearchPage_title=Search Dialog Problem
 Search_Error_createSearchPage_message=An error occurred while creating the search page ''{0}''.
 Search_Error_createSorter_title= Search Error
-Search_Error_createSorter_message= An error occurred while creating a sorter
+Search_Error_createSorter_message= An error occurred while creating a sorter.
 
 SearchPage_containingText_text= Containing &text:
 SearchPage_containingText_hint= (* = any string, ? = any character, \\ = escape for literals: * ? \\)
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
index bab41bf..28c8b88 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPageDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -311,17 +311,20 @@ class SearchPageDescriptor implements IPluginContribution, Comparable {
 	 */
 	public int computeScore(Object element) {
 		if (element instanceof IAdaptable) {
+			int score= ISearchPageScoreComputer.UNKNOWN;
+
+			ISearchPageScoreComputer tester= (ISearchPageScoreComputer)((IAdaptable)element).getAdapter(ISearchPageScoreComputer.class);
+			if (tester != null)
+				score= tester.computeScore(getId(), element);
+
 			IResource resource= (IResource)((IAdaptable)element).getAdapter(IResource.class);
 			if (resource != null && resource.getType() == IResource.FILE) {
 				String extension= ((IFile)resource).getFileExtension();
 				if (extension != null)
-					return getScoreForFileExtension(extension);
-			} else {
-				ISearchPageScoreComputer tester=
-					(ISearchPageScoreComputer)((IAdaptable)element).getAdapter(ISearchPageScoreComputer.class);
-				if (tester != null)
-					return tester.computeScore(getId(), element);
+					score= Math.max(score, getScoreForFileExtension(extension));
 			}
+			if (score != ISearchPageScoreComputer.UNKNOWN)
+				return score;
 		}
 		if (fWildcardScore != ISearchPageScoreComputer.UNKNOWN)
 			return fWildcardScore;
@@ -339,10 +342,8 @@ class SearchPageDescriptor implements IPluginContribution, Comparable {
 			if (extension.equals(p.extension))
 				return p.score;
 		}
-		if (fWildcardScore != ISearchPageScoreComputer.UNKNOWN)
-			return fWildcardScore;
 
-		return ISearchPageScoreComputer.LOWEST;
+		return ISearchPageScoreComputer.UNKNOWN;
 	}
 
 	private void readExtensionScorePairs() {
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
index f918f72..aa01759 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@ import org.eclipse.search.ui.NewSearchUI;
 import org.eclipse.search2.internal.ui.InternalSearchUI;
 import org.eclipse.search2.internal.ui.text2.TextSearchQueryProviderRegistry;
 
+
 /**
  * The plug-in runtime class for Search plug-in
  */
@@ -220,7 +221,8 @@ public class SearchPlugin extends AbstractUIPlugin {
 	 * @deprecated old search
 	 */
 	private void disposeOldSearchManager() {
-		SearchManager.getDefault().dispose();
+		if (SearchManager.fgDefault != null)
+			SearchManager.fgDefault.dispose();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
index 945d9e6..4a10d52 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/FileSearchPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,9 @@
  *******************************************************************************/
 package org.eclipse.search.internal.ui.text;
 
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Set;
 
 import org.eclipse.swt.dnd.DND;
@@ -27,9 +30,12 @@ import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TreeViewer;
@@ -43,8 +49,10 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.actions.ActionGroup;
 import org.eclipse.ui.part.IPageSite;
+import org.eclipse.ui.part.IShowInSource;
 import org.eclipse.ui.part.IShowInTargetList;
 import org.eclipse.ui.part.ResourceTransfer;
+import org.eclipse.ui.part.ShowInContext;
 import org.eclipse.ui.views.navigator.NavigatorDragAdapter;
 
 import org.eclipse.search.internal.ui.Messages;
@@ -112,8 +120,6 @@ public class FileSearchPage extends AbstractTextSearchViewPage implements IAdapt
 	private SortAction fSortByNameAction;
 	private SortAction fSortByPathAction;
 
-	private EditorOpener fEditorOpener= new EditorOpener();
-
 
 	private static final String[] SHOW_IN_TARGETS= new String[] { IPageLayout.ID_RES_NAV };
 	private  static final IShowInTargetList SHOW_IN_TARGET_LIST= new IShowInTargetList() {
@@ -169,9 +175,9 @@ public class FileSearchPage extends AbstractTextSearchViewPage implements IAdapt
 		IFile file= (IFile) match.getElement();
 		IWorkbenchPage page= getSite().getPage();
 		if (offset >= 0 && length != 0) {
-			fEditorOpener.openAndSelect(page, file, offset, length, activate);
+			openAndSelect(page, file, offset, length, activate);
 		} else {
-			fEditorOpener.open(page, file, activate);
+			open(page, file, activate);
 		}
 	}
 
@@ -181,7 +187,7 @@ public class FileSearchPage extends AbstractTextSearchViewPage implements IAdapt
 			if (firstElement instanceof IFile) {
 				if (getDisplayedMatchCount(firstElement) == 0) {
 					try {
-						fEditorOpener.open(getSite().getPage(), (IFile) firstElement, false);
+						open(getSite().getPage(), (IFile)firstElement, false);
 					} catch (PartInitException e) {
 						ErrorDialog.openError(getSite().getShell(), SearchMessages.FileSearchPage_open_file_dialog_title, SearchMessages.FileSearchPage_open_file_failed, e.getStatus());
 					}
@@ -292,6 +298,33 @@ public class FileSearchPage extends AbstractTextSearchViewPage implements IAdapt
 		if (IShowInTargetList.class.equals(adapter)) {
 			return SHOW_IN_TARGET_LIST;
 		}
+
+		if (adapter == IShowInSource.class) {
+			ISelectionProvider selectionProvider= getSite().getSelectionProvider();
+			if (selectionProvider == null)
+				return null;
+
+			ISelection selection= selectionProvider.getSelection();
+			if (selection instanceof IStructuredSelection) {
+				IStructuredSelection structuredSelection= ((StructuredSelection)selection);
+				final Set newSelection= new HashSet(structuredSelection.size());
+				Iterator iter= structuredSelection.iterator();
+				while (iter.hasNext()) {
+					Object element= iter.next();
+					if (element instanceof LineElement)
+						element= ((LineElement)element).getParent();
+					newSelection.add(element);
+				}
+
+				return new IShowInSource() {
+					public ShowInContext getShowInContext() {
+						return new ShowInContext(null, new StructuredSelection(new ArrayList(newSelection)));
+					}
+				};
+			}
+			return null;
+		}
+
 		return null;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
index 4a7a7bc..c8a5046 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceConfigurationPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,7 +126,7 @@ public class ReplaceConfigurationPage extends UserInputWizardPage {
 				fTextField,
 				contentAdapter, replaceProposer,
 				ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
-				new char[] {'$', '\\'},
+				new char[0],
 				true);
 
 		new Label(result, SWT.NONE);
diff --git a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
index e4dc3bf..7473882 100644
--- a/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
+++ b/eclipse/plugins/org.eclipse.search/search/org/eclipse/search/internal/ui/text/TextSearchPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,9 @@ import java.io.StringReader;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.regex.PatternSyntaxException;
 
 import org.eclipse.swt.SWT;
@@ -87,7 +89,7 @@ import org.eclipse.search.ui.text.TextSearchQueryProvider.TextSearchInput;
 
 public class TextSearchPage extends DialogPage implements ISearchPage, IReplacePage {
 
-    private static final int HISTORY_SIZE= 12;
+	private static final int HISTORY_SIZE= 12;
 	public static final String EXTENSION_POINT_ID= "org.eclipse.search.internal.ui.text.TextSearchPage"; //$NON-NLS-1$
 
 	// Dialog store id constants
@@ -98,7 +100,13 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 	private static final String STORE_HISTORY= "HISTORY"; //$NON-NLS-1$
 	private static final String STORE_HISTORY_SIZE= "HISTORY_SIZE"; //$NON-NLS-1$
 
-	private List fPreviousSearchPatterns= new ArrayList(20);
+	/**
+	 * Section name for the stored file extensions.
+	 * @since 3.6
+	 */
+	private static final String STORE_EXTENSIONS= "EXTENSIONS"; //$NON-NLS-1$
+
+	private List fPreviousSearchPatterns= new ArrayList(HISTORY_SIZE);
 
 	private boolean fFirstTime= true;
 	private boolean fIsCaseSensitive;
@@ -117,6 +125,13 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 
 	private ContentAssistCommandAdapter fPatterFieldContentAssist;
 
+	/**
+	 * The previous file extensions.
+	 * @since 3.6
+	 */
+	private String[] fPreviousExtensions;
+
+	
 	private static class SearchPatternData {
 		public final boolean isCaseSensitive;
 		public final boolean isRegExSearch;
@@ -306,6 +321,10 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 							resources.add(resource);
 						}
 					}
+				} else if (curr instanceof LineElement) {
+					IResource resource= ((LineElement)curr).getParent();
+					if (resource != null && resource.isAccessible())
+						resources.add(resource);
 				} else if (curr instanceof IAdaptable) {
 					IResource resource= (IResource) ((IAdaptable)curr).getAdapter(IResource.class);
 					if (resource != null && resource.isAccessible()) {
@@ -365,16 +384,16 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 		return match;
 	}
 
-	private String[] getPreviousExtensions() {
+	private String[] getPreviousExtensionsOldStyle() {
 		List extensions= new ArrayList(fPreviousSearchPatterns.size());
 		int size= fPreviousSearchPatterns.size();
 		for (int i= 0; i < size; i++) {
-			SearchPatternData data= (SearchPatternData) fPreviousSearchPatterns.get(i);
+			SearchPatternData data= (SearchPatternData)fPreviousSearchPatterns.get(i);
 			String text= FileTypeEditor.typesToString(data.fileNamePatterns);
 			if (!extensions.contains(text))
 				extensions.add(text);
 		}
-		return (String[]) extensions.toArray(new String[extensions.size()]);
+		return (String[])extensions.toArray(new String[extensions.size()]);
 	}
 
 	private String[] getPreviousSearchPatterns() {
@@ -402,7 +421,7 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 				fFirstTime= false;
 				// Set item and text here to prevent page from resizing
 				fPattern.setItems(getPreviousSearchPatterns());
-				fExtensions.setItems(getPreviousExtensions());
+				fExtensions.setItems(fPreviousExtensions);
 //				if (fExtensions.getItemCount() == 0) {
 //					loadFilePatternDefaults();
 //				}
@@ -507,7 +526,7 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 				contentAdapter,
 				findProposer,
 				ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
-				new char[] {'\\', '[', '('},
+				new char[0],
 				true);
 		fPatterFieldContentAssist.setEnabled(fIsRegExSearch);
 
@@ -556,8 +575,10 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 		if (!fPattern.getText().equals(patternData.textPattern))
 			return;
 		fIsCaseSensitiveCheckbox.setSelection(patternData.isCaseSensitive);
-		fIsRegExCheckbox.setSelection(patternData.isRegExSearch);
+		fIsRegExSearch= patternData.isRegExSearch;
+		fIsRegExCheckbox.setSelection(fIsRegExSearch);
 		fPattern.setText(patternData.textPattern);
+		fPatterFieldContentAssist.setEnabled(fIsRegExSearch);
 		fFileTypeEditor.setFileTypes(patternData.fileNamePatterns);
 		if (patternData.workingSets != null)
 			getContainer().setSelectedWorkingSets(patternData.workingSets);
@@ -575,8 +596,8 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 				else
 					fPattern.setText(insertEscapeChars(text));
 
-				if (getPreviousExtensions().length > 0) {
-					fExtensions.setText(getPreviousExtensions()[0]);
+				if (fPreviousExtensions.length > 0) {
+					fExtensions.setText(fPreviousExtensions[0]);
 				} else {
 					String extension= getExtensionFromEditor();
 					if (extension != null)
@@ -743,6 +764,21 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 		} catch (NumberFormatException e) {
 			// ignore
 		}
+
+		Set previousExtensions= new LinkedHashSet(HISTORY_SIZE);
+		IDialogSettings extensionsSettings= s.getSection(STORE_EXTENSIONS);
+		if (extensionsSettings != null) {
+			for (int i= 0; i < HISTORY_SIZE; i++) {
+				String extension= extensionsSettings.get(Integer.toString(i));
+				if (extension == null)
+					break;
+				previousExtensions.add(extension);
+			}
+			fPreviousExtensions= new String[previousExtensions.size()];
+			previousExtensions.toArray(fPreviousExtensions);
+		} else
+			fPreviousExtensions= getPreviousExtensionsOldStyle();
+
 	}
 
 	/**
@@ -761,6 +797,19 @@ public class TextSearchPage extends DialogPage implements ISearchPage, IReplaceP
 			SearchPatternData data= ((SearchPatternData) fPreviousSearchPatterns.get(i));
 			data.store(histSettings);
 		}
+
+		IDialogSettings extensionsSettings= s.addNewSection(STORE_EXTENSIONS);
+		extensionsSettings.put(Integer.toString(0), fExtensions.getText());
+		Set extensions= new HashSet(HISTORY_SIZE);
+		extensions.add(fExtensions.getText());
+		int length= Math.min(fExtensions.getItemCount(), HISTORY_SIZE - 1);
+		int j= 1;
+		for (int i= 0; i < length; i++) {
+			String extension= fExtensions.getItem(i);
+			if (extensions.add(extension))
+				extensionsSettings.put(Integer.toString(j++), extension);
+		}
+
 	}
 
 	private void statusMessage(boolean error, String message) {
diff --git a/eclipse/plugins/org.eclipse.swt.carbon.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.carbon.macosx/META-INF/MANIFEST.MF
index 563f960..493c638 100644
--- a/eclipse/plugins/org.eclipse.swt.carbon.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.carbon.macosx/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.carbon.macosx; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.carbon.macosx/build.xml b/eclipse/plugins/org.eclipse.swt.carbon.macosx/build.xml
index a9d41d6..e54746f 100644
--- a/eclipse/plugins/org.eclipse.swt.carbon.macosx/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.carbon.macosx/build.xml
@@ -1,368 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.carbon.macosx" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="carbon" />
-		<property name="os" value="macosx" />
-		<property name="fragment" value="org.eclipse.swt.carbon.macosx" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/carbon/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/carbon/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Browser/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/carbon/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/carbon/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT Printing/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/carbon/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Theme/carbon/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/carbon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/carbon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,java_swt,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="carbon" />
+	<property name="swt.os" value="macosx" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/.project b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/.project
index 9993d4b..a132c29 100644
--- a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/.project
+++ b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/.project
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>org.eclipse.swt.cocoa.macosx</name>
+	<name>org.eclipse.swt.cocoa.macosx.x86_64</name>
 	<comment></comment>
 	<projects>
 	</projects>
diff --git a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
index 3ec6489..dcfcf81 100644
--- a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.cocoa.macosx.x86_64; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/build.xml b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/build.xml
index b393a3b..5ce91de 100644
--- a/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.cocoa.macosx.x86_64/build.xml
@@ -1,407 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.cocoa.macosx.x86_64" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="cocoa" />
-		<property name="os" value="macosx" />
-		<property name="arch" value="x86_64" />
-		<property name="fragment" value="org.eclipse.swt.cocoa.macosx.x86_64" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${basedir}/src/Eclipse SWT/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/bidi/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/coolbar/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/expand/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/tooltip/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/common/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/common/" />
-			<src path="${basedir}/src/Eclipse SWT Custom Widgets/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/common/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/common/" />
-			<src path="${basedir}/src/Eclipse SWT Program/cocoa/" />
-			<src path="${basedir}/src/Eclipse SWT Program/common/" />
-			<src path="${basedir}/src/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.extras,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${basedir}/src/Eclipse SWT/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/expand/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/tooltip/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<available property="source.present" file="${basedir}/src" type="dir" />
-		<antcall target="copy.source" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="copy.source" unless="source.present">
-		<echo>Copying source from org.eclipse.swt project to folder ${basedir}/src folder ${temp.folder}.</echo>
-		<delete dir="${basedir}/src" />
-		<mkdir dir="${basedir}/src" />
-
-		<!-- Copy the existing 32 bit SWT source folders to the 64 bit source folder -->
-		<copy todir="${basedir}/src">
-			<fileset dir="${plugindir}" includes="Eclipse*/**" />
-		</copy>
-
-		<antcall target="replace.32.to.64" />
-	</target>
-
-	<!-- Convert SWT 32 bit java and C source to 64 bit  -->
-	<target name="replace.32.to.64" depends="init">
-		<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-		<replace dir="${basedir}/src" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="float /*double*/" value="double /*float*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/" />
-		<antcall target="init" />
-	</target>
-
-	<!-- Convert SWT 64 bit java and C source to 32 bit  -->
-	<target name="replace.64.to.32" depends="init">
-		<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-		<replace dir="${basedir}/src" includes="**/*.java" token="long /*int*/" value="int /*long*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="long[] /*int[]*/" value="int[] /*long[]*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="double /*float*/" value="float /*double*/" />
-		<replace dir="${basedir}/src" includes="**/*.java" token="double[] /*float[]*/" value="float[] /*double[]*/" />
-		<antcall target="init" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${basedir}/src/Eclipse SWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cocoa/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${basedir}/src/Eclipse SWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cocoa/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,java_swt,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${plugindir}" depth="infinite" />
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="cocoa" />
+	<property name="swt.os" value="macosx" />
+	<property name="swt.arch" value="x86_64" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.cocoa.macosx/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.cocoa.macosx/META-INF/MANIFEST.MF
index 2ea0d6c..6eec22f 100644
--- a/eclipse/plugins/org.eclipse.swt.cocoa.macosx/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.cocoa.macosx/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.cocoa.macosx; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.cocoa.macosx/build.xml b/eclipse/plugins/org.eclipse.swt.cocoa.macosx/build.xml
index 3fe0d93..8333be3 100644
--- a/eclipse/plugins/org.eclipse.swt.cocoa.macosx/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.cocoa.macosx/build.xml
@@ -1,370 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.cocoa.macosx" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="cocoa" />
-		<property name="os" value="macosx" />
-		<property name="fragment" value="org.eclipse.swt.cocoa.macosx" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Browser/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT Printing/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/cocoa/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.extras,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cocoa/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cocoa/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,java_swt,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="cocoa" />
+	<property name="swt.os" value="macosx" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/.project b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/.project
new file mode 100644
index 0000000..ea89217
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.swt.gtk.aix.ppc64</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..eb5cad1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.swt.gtk.aix.ppc64;singleton:=true
+Bundle-Version: 3.6.2.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Localization: fragment
+Export-Package: 
+ org.eclipse.swt.internal.accessibility.gtk; x-internal:=true,
+ org.eclipse.swt.internal.cairo; x-internal:=true,
+ org.eclipse.swt.internal.cde; x-internal:=true,
+ org.eclipse.swt.internal.gnome; x-internal:=true,
+ org.eclipse.swt.internal.gtk; x-internal:=true,
+ org.eclipse.swt.internal.mozilla; x-internal:=true,
+ org.eclipse.swt.internal.opengl.glx; x-internal:=true
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=aix) (osgi.arch=ppc64))
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
+ J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about.html b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about.html
new file mode 100644
index 0000000..6c5fbd8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about.html
@@ -0,0 +1,301 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>August 17, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you 
+did not receive this Content directly from the Eclipse Foundation, the following is provided 
+for informational purposes only, and you should look to the Redistributor’s license for 
+terms and conditions of use.</p>
+
+<h4>Gnome Binding</h4>
+
+<p>The "Gnome Binding" is a binding to the Gnome API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Gnome Binding:</p>
+<ul>
+	<li>libswt-gnome-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Gnome Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/gnome (but not including any sub-directories)</li>
+</ul>
+
+<p>The Gnome Binding contains portions of Gnome ("Library").  Gnome is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
+conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the Gnome Binding on a standalone
+basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
+<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
+
+<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
+containing portions of the Library (e.g. the Gnome Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
+other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the Gnome Binding such modifications shall be
+governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
+work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
+
+<h4>GTK+ Binding</h4>
+
+<p>The "GTK+ Binding" is a binding to the GTK+ API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the GTK+ Binding:</p>
+<ul>
+	<li>libswt-atk-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-pi-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the GTK+ Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
+	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
+</ul>
+
+<p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
+conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the GTK+ Binding on a standalone
+basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
+<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
+
+<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
+containing portions of the Library (e.g. the GTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
+other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the GTK+ Binding such modifications shall be
+governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
+work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
+
+<h4>WebKitGTK+ Binding</h4>
+
+<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>
+The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<p>
+In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by the terms and conditions of the LGPL. Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined work is provided for debugging purposes so there is no need to reverse engineer the combined work.<p>
+
+<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_blank">http://webkit.org/coding/bsd-license.html</a>. </p>
+
+<h4>libsoup</h4>
+
+<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<h4>Mozilla Binding</h4>
+
+<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
+<ul>
+	<li>libswt-mozilla-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-xulrunner-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-xpcominit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
+</ul>
+
+<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
+conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
+<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
+
+<h4>XULRunner 1.9 (subset, derivative work)</h4>
+
+The libraries libswt-xulrunner-gtk-xxxx.so, libswt-mozilla-gtk-xxxx.so, and libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number) contain a small portion of XULRunner 1.9 content (header files)
+that have been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
+the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
+and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
+<p>The changed files are:
+<ul>
+  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
+  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
+</ul>
+Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
+
+<h4>Cairo Binding</h4>
+
+<p>The "Cairo Binding" is a binding to the Cairo API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Cairo Binding:</p>
+<ul>
+	<li>libswt-cairo-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Cairo Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/cairo (but not including any sub-directories)</li>
+</ul>
+
+<p>The Cairo Binding contains portions of Cairo ("Cairo").  Cairo is made available by the Cairo project at
+<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>.  Use of Cairo by the Cairo Binding is governed by the terms and
+conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is
+provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
+
+<h4>Cairo for Linux</h4>
+
+<p>Refer to the file <a href="about_files/about_cairo.html">about_files/about_cairo.html</a> for licensing details about "Cairo for Linux."
+
+<h4>Independent JPEG Group's JPEG software release 6b</h4>
+
+<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
+LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
+
+<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
+with the Content.</p>
+
+<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
+
+<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
+
+<ul>
+    <li>cderror.h</li>
+    <li>cdjpeg.h</li>
+    <li>jchuff.h</li>
+    <li>jdcolor.c</li>
+    <li>jdct.h</li>
+    <li>jdhuff.h</li>
+    <li>jerror.h</li>
+    <li>jidctint.c</li>
+    <li>jinclude.h</li>
+    <li>jmemsys.h</li>
+    <li>jmorecfg.h</li>
+    <li>jpegint.h</li>
+    <li>jpeglib.h</li>
+    <li>jversion.h</li>
+    <li>transupp.h</li>
+</ul>
+
+<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
+
+<ul>
+	<li>jcapimin.c</li>
+	<li>jcapistd.c</li>
+	<li>jccoefct.c</li>
+	<li>jccolor.c</li>
+	<li>jcdctmgr.c</li>
+	<li>jchuff.c</li>
+	<li>jcinit.c</li>
+	<li>jcmainct.c</li>
+	<li>jcmarker.c</li>
+	<li>jcmaster.c</li>
+	<li>jcomapi.c</li>
+	<li>jcparam.c</li>
+	<li>jcphuff.c</li>
+	<li>jcprepct.c</li>
+	<li>jcsample.c</li>
+	<li>jctrans.c</li>
+	<li>jdapimin.c</li>
+	<li>jdapistd.c</li>
+	<li>jdatadst.c</li>
+	<li>jdatasrc.c</li>
+	<li>jdcoefct.c</li>
+	<li>jdcolor.c</li>
+	<li>jddctmgr.c</li>
+	<li>jdhuff.c</li>
+	<li>jdinput.c</li>
+	<li>jdmainct.c</li>
+	<li>jdmarker.c</li>
+	<li>jdmaster.c</li>
+	<li>jdmerge.c</li>
+	<li>jdphuff.c</li>
+	<li>jdpostct.c</li>
+	<li>jdsample.c</li>
+	<li>jdtrans.c</li>
+	<li>jerror.c</li>
+	<li>jfdctflt.c</li>
+	<li>jfdctfst.c</li>
+	<li>jfdctint.c</li>
+	<li>jidctflt.c</li>
+	<li>jidctfst.c</li>
+	<li>jidctint.c</li>
+	<li>jidctred.c</li>
+	<li>jpegtran.c</li>
+	<li>jquant1.c</li>
+	<li>jquant2.c</li>
+	<li>jutils.c</li>
+	<li>cderror.h</li>
+	<li>cdjpeg.h</li>
+	<li>jchuff.h</li>
+	<li>jconfig.h</li>
+	<li>jdct.h</li>
+	<li>jdhuff.h</li>
+	<li>jerror.h</li>
+	<li>jinclude.h</li>
+	<li>jmorecfg.h</li>
+	<li>jpegint.h</li>
+	<li>jpeglib.h</li>
+	<li>jversion.h</li>
+	<li>transupp.h</li>
+</ul>
+	
+<p>The following changes were made to the LIBJPEG code in the Content:</p>
+
+<ol>
+	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
+	<li>Function pointers were replaced with switch statements.</li>
+	<li>The virtual memory, tracing and progress monitoring were removed.</li>
+	<li>The error handling was simplified and now uses Java exceptions.</li>
+</ol>
+
+<h4>PuTTY 0.58 (derivative work)</h4>
+
+<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
+conditions of the the following MIT-style license:  </p>
+<blockquote>
+  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
+  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
+  <p><em>Permission is hereby granted, free of charge, to any person  obtaining a copy of this software and associated documentation files  (the "Software"), to deal in the Software without restriction,  including without limitation the rights to use, copy, modify, merge,  publish, distribute, sublicense, and/or sell copies of the Software,  and to permit persons to whom the Software is furnished to do so,  subject to the following conditions:</em> </p>
+  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
+  <p><em>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</em> </p>
+</blockquote>
+<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
+
+<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/about_files/IJG_README b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/IJG_README
similarity index 100%
rename from eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/about_files/IJG_README
rename to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/IJG_README
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/about_cairo.html b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/about_cairo.html
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/about_cairo.html
copy to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/about_cairo.html
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about_files/lgpl-v21.txt b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/lgpl-v21.txt
similarity index 100%
copy from eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about_files/lgpl-v21.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/lgpl-v21.txt
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/mpl-v11.txt b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/mpl-v11.txt
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/mpl-v11.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/mpl-v11.txt
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/pixman-licenses.txt b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/pixman-licenses.txt
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/pixman-licenses.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/pixman-licenses.txt
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/webkit-bsd.txt b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/webkit-bsd.txt
new file mode 100644
index 0000000..b3b07c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/about_files/webkit-bsd.txt
@@ -0,0 +1,20 @@
+BSD License
+
+Copyright (C) 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/build.properties b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/build.properties
similarity index 100%
rename from eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/build.properties
rename to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/build.properties
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/build.xml
new file mode 100644
index 0000000..3a437a1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/build.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.swt.gtk.linux.x86" default="build.jars" basedir=".">
+
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="aix" />
+	<property name="swt.arch" value="ppc64" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/fragment.properties b/eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/fragment.properties
similarity index 100%
copy from eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/fragment.properties
copy to eclipse/plugins/org.eclipse.swt.gtk.aix.ppc64/fragment.properties
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/META-INF/MANIFEST.MF
index 0ef624d..963de57 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.linux.ppc; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/about.html
index 57d0b3c..3a9d4d6 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.xml
index 39a1e54..3d7d687 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.xml
@@ -1,391 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.linux.ppc" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="linux" />
-		<property name="arch" value="ppc" />
-		<property name="fragment" value="org.eclipse.swt.gtk.linux.ppc" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="ppc" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/buildLibraries.csh
deleted file mode 100644
index 93fdb7f..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/buildLibraries.csh
+++ /dev/null
@@ -1,21 +0,0 @@
-echo Building LINUX PPC GTK
-
-# These variables must be set to reflect the compilation context
-setenv CAIROPATH /bluebird/teamswt/swt-builddir/cairo/ppc/cairo-1.0.2/lib/pkgconfig/
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-ppc-142
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk/
-
-setenv MODEL ppc
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"
-setenv MOZILLA_LIBS "-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla make_xulrunner make_xpcominit install
-
-setenv PKG_CONFIG_PATH ${CAIROPATH}
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/console.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/console.txt
deleted file mode 100644
index 3ea3b6c..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/console.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-LINUX PPC GTK on eclipsebuildserv
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux ppc
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux ppc
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  -c swt.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3336.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib  -lXtst -o libswt-pi-gtk-3336.so swt.o os.o os_structs.o os_custom.o os_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3336.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3336.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3336.so swt.o glx.o glx_structs.o glx_stats.o
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L cairo` -lcairo -o libswt-cairo-gtk-3336.so swt.o cairo.o cairo_structs.o cairo_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/jre/bin -ljawt -shared -s -o libswt-awt-gtk-3336.so swt_awt.o
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -DNO_XPCOMGlueShutdown -DNO_XPCOMGlueStartup -include /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include -c xpcom.cpp
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include -c xpcom_custom.cpp
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include -c xpcom_structs.cpp
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/include -c xpcom_stats.cpp
-g++ -o libswt-mozilla-gtk-3336.so swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/lib -L/bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk/bin -lxpcom -lnspr4 -lplds4 -lplc4
-g++ -o xpcomxul.o -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcom.cpp
-g++ -o xpcomxul_custom.o -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcom_custom.cpp
-g++ -o xpcomxul_structs.o -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcom_structs.cpp
-g++ -o xpcomxul_stats.o -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcom_stats.cpp
-g++ -o libswt-xulrunner-gtk-3336.so swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//lib -lxpcomglue
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcominit.cpp
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcominit_structs.cpp
-g++ -O -DSWT_VERSION=3336  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux  -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//include -c xpcominit_stats.cpp
-g++ -o libswt-xpcominit-gtk-3336.so swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk//lib -lxpcomglue
-cp *.so ../../../org.eclipse.swt.gtk.linux.ppc
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux ppc
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux ppc
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  -c swt.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3336.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib  -lXtst -o libswt-pi-gtk-3336.so swt.o os.o os_structs.o os_custom.o os_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3336.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3336.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC   -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3336.so swt.o glx.o glx_structs.o glx_stats.o
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo_structs.c
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC  `pkg-config --cflags cairo` -c cairo_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L cairo` -lcairo -o libswt-cairo-gtk-3336.so swt.o cairo.o cairo_structs.o cairo_stats.o
-gcc -O -Wall -DSWT_VERSION=3336  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include -I/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/include/linux -fPIC    -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142/jre/bin -ljawt -shared -s -o libswt-awt-gtk-3336.so swt_awt.o
-cp *.so ../../../org.eclipse.swt.gtk.linux.ppc
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/.project b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/.project
similarity index 100%
copy from eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/.project
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/.project
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..d4e70d4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.eclipse.swt.gtk.linux.ppc64;singleton:=true
+Bundle-Version: 3.6.2.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Localization: fragment
+Export-Package: 
+ org.eclipse.swt.internal.accessibility.gtk; x-internal:=true,
+ org.eclipse.swt.internal.cairo; x-internal:=true,
+ org.eclipse.swt.internal.cde; x-internal:=true,
+ org.eclipse.swt.internal.gnome; x-internal:=true,
+ org.eclipse.swt.internal.gtk; x-internal:=true,
+ org.eclipse.swt.internal.mozilla; x-internal:=true,
+ org.eclipse.swt.internal.opengl.glx; x-internal:=true
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=ppc64))
+Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
+ J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about.html
new file mode 100644
index 0000000..3a9d4d6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about.html
@@ -0,0 +1,261 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>August 17, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you 
+did not receive this Content directly from the Eclipse Foundation, the following is provided 
+for informational purposes only, and you should look to the Redistributor’s license for 
+terms and conditions of use.</p>
+
+<h4>Gnome Binding</h4>
+
+<p>The "Gnome Binding" is a binding to the Gnome API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Gnome Binding:</p>
+<ul>
+	<li>libswt-gnome-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Gnome Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/gnome (but not including any sub-directories)</li>
+</ul>
+
+<p>The Gnome Binding contains portions of Gnome ("Library").  Gnome is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
+conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the Gnome Binding on a standalone
+basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
+<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
+
+<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
+containing portions of the Library (e.g. the Gnome Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
+other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the Gnome Binding such modifications shall be
+governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
+work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
+
+<h4>GTK+ Binding</h4>
+
+<p>The "GTK+ Binding" is a binding to the GTK+ API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the GTK+ Binding:</p>
+<ul>
+	<li>libswt-atk-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-pi-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the GTK+ Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
+	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
+</ul>
+
+<p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
+conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the GTK+ Binding on a standalone
+basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
+<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
+
+<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
+containing portions of the Library (e.g. the GTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
+other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the GTK+ Binding such modifications shall be
+governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
+work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
+
+<h4>Mozilla Binding</h4>
+
+<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
+<ul>
+	<li>libswt-mozilla-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-xulrunner-gtk-xxxx.so (where "xxxx" is the version number)</li>
+	<li>libswt-xpcominit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
+</ul>
+
+<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
+conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
+<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
+
+<h4>XULRunner 1.9 (subset, derivative work)</h4>
+
+The library libswt-xulrunner-gtk-xxxx.so (where "xxxx" is the version number) contains a small portion of XULRunner 1.9 content (header files) that have
+been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
+the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
+and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
+<p>The changed files are:
+<ul>
+  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
+  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
+</ul>
+Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
+
+<h4>Cairo Binding</h4>
+
+<p>The "Cairo Binding" is a binding to the Cairo API.  The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the Cairo Binding:</p>
+<ul>
+	<li>libswt-cairo-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Cairo Binding:</p>
+<ul>
+	<li>The contents of the directory org/eclipse/swt/internal/cairo (but not including any sub-directories)</li>
+</ul>
+
+<p>The Cairo Binding contains portions of Cairo ("Cairo").  Cairo is made available by the Cairo project at
+<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>.  Use of Cairo by the Cairo Binding is governed by the terms and
+conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is
+provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
+
+<h4>Cairo for Linux</h4>
+
+<p>Refer to the file <a href="about_files/about_cairo.html">about_files/about_cairo.html</a> for licensing details about "Cairo for Linux."
+
+<h4>Independent JPEG Group's JPEG software release 6b</h4>
+
+<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
+LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
+
+<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
+with the Content.</p>
+
+<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
+
+<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
+
+<ul>
+    <li>cderror.h</li>
+    <li>cdjpeg.h</li>
+    <li>jchuff.h</li>
+    <li>jdcolor.c</li>
+    <li>jdct.h</li>
+    <li>jdhuff.h</li>
+    <li>jerror.h</li>
+    <li>jidctint.c</li>
+    <li>jinclude.h</li>
+    <li>jmemsys.h</li>
+    <li>jmorecfg.h</li>
+    <li>jpegint.h</li>
+    <li>jpeglib.h</li>
+    <li>jversion.h</li>
+    <li>transupp.h</li>
+</ul>
+
+<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
+
+<ul>
+	<li>jcapimin.c</li>
+	<li>jcapistd.c</li>
+	<li>jccoefct.c</li>
+	<li>jccolor.c</li>
+	<li>jcdctmgr.c</li>
+	<li>jchuff.c</li>
+	<li>jcinit.c</li>
+	<li>jcmainct.c</li>
+	<li>jcmarker.c</li>
+	<li>jcmaster.c</li>
+	<li>jcomapi.c</li>
+	<li>jcparam.c</li>
+	<li>jcphuff.c</li>
+	<li>jcprepct.c</li>
+	<li>jcsample.c</li>
+	<li>jctrans.c</li>
+	<li>jdapimin.c</li>
+	<li>jdapistd.c</li>
+	<li>jdatadst.c</li>
+	<li>jdatasrc.c</li>
+	<li>jdcoefct.c</li>
+	<li>jdcolor.c</li>
+	<li>jddctmgr.c</li>
+	<li>jdhuff.c</li>
+	<li>jdinput.c</li>
+	<li>jdmainct.c</li>
+	<li>jdmarker.c</li>
+	<li>jdmaster.c</li>
+	<li>jdmerge.c</li>
+	<li>jdphuff.c</li>
+	<li>jdpostct.c</li>
+	<li>jdsample.c</li>
+	<li>jdtrans.c</li>
+	<li>jerror.c</li>
+	<li>jfdctflt.c</li>
+	<li>jfdctfst.c</li>
+	<li>jfdctint.c</li>
+	<li>jidctflt.c</li>
+	<li>jidctfst.c</li>
+	<li>jidctint.c</li>
+	<li>jidctred.c</li>
+	<li>jpegtran.c</li>
+	<li>jquant1.c</li>
+	<li>jquant2.c</li>
+	<li>jutils.c</li>
+	<li>cderror.h</li>
+	<li>cdjpeg.h</li>
+	<li>jchuff.h</li>
+	<li>jconfig.h</li>
+	<li>jdct.h</li>
+	<li>jdhuff.h</li>
+	<li>jerror.h</li>
+	<li>jinclude.h</li>
+	<li>jmorecfg.h</li>
+	<li>jpegint.h</li>
+	<li>jpeglib.h</li>
+	<li>jversion.h</li>
+	<li>transupp.h</li>
+</ul>
+	
+<p>The following changes were made to the LIBJPEG code in the Content:</p>
+
+<ol>
+	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
+	<li>Function pointers were replaced with switch statements.</li>
+	<li>The virtual memory, tracing and progress monitoring were removed.</li>
+	<li>The error handling was simplified and now uses Java exceptions.</li>
+</ol>
+
+<h4>PuTTY 0.58 (derivative work)</h4>
+
+<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
+conditions of the the following MIT-style license:  </p>
+<blockquote>
+  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
+  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
+  <p><em>Permission is hereby granted, free of charge, to any person  obtaining a copy of this software and associated documentation files  (the "Software"), to deal in the Software without restriction,  including without limitation the rights to use, copy, modify, merge,  publish, distribute, sublicense, and/or sell copies of the Software,  and to permit persons to whom the Software is furnished to do so,  subject to the following conditions:</em> </p>
+  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
+  <p><em>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</em> </p>
+</blockquote>
+<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
+
+<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/about_files/IJG_README b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/IJG_README
similarity index 100%
rename from eclipse/plugins/org.eclipse.swt.wpf.win32.x86/about_files/IJG_README
rename to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/IJG_README
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/about_cairo.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/about_cairo.html
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/about_cairo.html
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/about_cairo.html
diff --git a/eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about_files/lgpl-v21.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/lgpl-v21.txt
similarity index 100%
copy from eclipse/features/org.eclipse.platform/about_files/linux.gtk.ppc/about_files/lgpl-v21.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/lgpl-v21.txt
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/mpl-v11.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/mpl-v11.txt
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/mpl-v11.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/mpl-v11.txt
diff --git a/eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/pixman-licenses.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/pixman-licenses.txt
similarity index 100%
copy from eclipse/features/org.eclipse.equinox.executable/gtk_root/about_files/pixman-licenses.txt
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/about_files/pixman-licenses.txt
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.properties b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/build.properties
similarity index 100%
copy from eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/build.properties
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/build.properties
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/build.xml
new file mode 100644
index 0000000..7d061ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/build.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.swt.gtk.linux.ppc" default="build.jars" basedir=".">
+
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="ppc64" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/fragment.properties b/eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/fragment.properties
similarity index 100%
copy from eclipse/plugins/org.eclipse.swt.gtk.linux.ppc/fragment.properties
copy to eclipse/plugins/org.eclipse.swt.gtk.linux.ppc64/fragment.properties
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/META-INF/MANIFEST.MF
index b2dc432..bf836c1 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.linux.s390; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/about.html
index e395b7c..9b03555 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/build.xml
index 65ee7fa..8e28e60 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390/build.xml
@@ -1,416 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.linux.s390" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="linux" />
-		<property name="arch" value="s390" />
-		<property name="fragment" value="org.eclipse.swt.gtk.linux.s390" />
-		<property name="version.suffix" value="3.3.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="build.cfiles" depends="init">
-		<mkdir dir="${build.result.folder}/library" />
-		<copy todir="${build.result.folder}/library">
-			<fileset dir="${plugindir}/Eclipse SWT/common/library" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library" />
-		</copy>
-	</target>
-
-	<target name="build.jnilibs" depends="build.cfiles">
-		<exec dir="${build.result.folder}/library" executable="sh">
-			<env key="OUTPUT_DIR" value="${build.result.folder}" />
-			<arg line="${build.result.folder}/library/build.sh" />
-			<arg line="install" />
-		</exec>
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="s390" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/META-INF/MANIFEST.MF
index 939aabf..b76d48c 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.linux.s390x; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/about.html
index e395b7c..9b03555 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml
index cc59c4d..532c98a 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml
@@ -1,503 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.swt.gtk.linux.s390x" default="build.nativeLibraries" basedir=".">
-
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="linux" />
-		<property name="arch" value="s390x" />
-		<property name="fragment" value="org.eclipse.swt.gtk.linux.s390x" />
-		<property name="version.suffix" value="3.3.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="temp.folder.64" value="${basedir}/temp.folder/64" />
-		<property name="toolsplugindir" value="../org.eclipse.swt.tools" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		<!--compile the jar in org.eclipse.swt.tools-->
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${basedir}/src/Eclipse SWT/cairo/" />
-			<src path="${basedir}/src/Eclipse SWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/bidi/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/coolbar/" />
-			<src path="${basedir}/src/Eclipse SWT/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/common/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Custom Widgets/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/glx/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/cairo/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT PI/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/common/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Program/cde/" />
-			<src path="${basedir}/src/Eclipse SWT Program/common/" />
-			<src path="${basedir}/src/Eclipse SWT Program/gnome/" />
-			<src path="${basedir}/src/Eclipse SWT Program/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<available property="source.present" file="${basedir}/src" type="dir" />
-		<antcall target="copy.source" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="copy.source" unless="source.present">
-		<echo>Copying source from org.eclipse.swt project to folder ${basedir}/src folder ${temp.folder}.</echo>
-		<delete dir="${basedir}/src" />
-		<mkdir dir="${basedir}/src" />
-
-		<!-- Copy the existing 32 bit SWT source folders to the 64 bit source folder -->
-		<copy todir="${basedir}/src">
-			<fileset dir="${plugindir}" includes="Eclipse*/**" />
-		</copy>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${basedir}/src" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-	</target>
-
-	<target name="replace.32.to.64" depends="init">
-		<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-	</target>
-
-	<target name="replace.64.to.32" depends="init">
-		<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 64 bit java source to 32 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="long /*int*/" value="int /*long*/" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="build.cfiles">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.cfiles" depends="build.jars">
-		<!-- generate the C code from the (64 bit) SWT PI java classes -->
-		<!-- assumes the swt.jar has already been built  -->
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.C" />
-			<arg value="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.gtk.OS" />
-			<arg value="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.accessibility.gtk.ATK" />
-			<arg value="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.cairo.Cairo" />
-			<arg value="${basedir}/src/Eclipse SWT PI/cairo/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.gnome.GNOME" />
-			<arg value="${basedir}/src/Eclipse SWT Program/gnome/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.cde.CDE" />
-			<arg value="${basedir}/src/Eclipse SWT Program/cde/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.mozilla.XPCOM" />
-			<arg value="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-			<arg value="org.eclipse.swt.internal.opengl.glx.GLX" />
-			<arg value="${basedir}/src/Eclipse SWT OpenGL/glx/library/" />
-			<arg value="${build.result.folder}/swt.jar" />
-		</java>
-
-		<!-- copy all the files into /library folders into a temporary bin/library folder  -->
-		<!-- since this is the structure assumed by the native makefile and given that     -->
-		<!-- this script needs to work outside of the Eclipse workspace without modifying  -->
-		<!-- the content of the org.eclipse.swt project.                                   -->
-		<mkdir dir="${basedir}/src/bin/library" />
-		<copy todir="${basedir}/src/bin/library">
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library" />
-		</copy>
-	</target>
-
-	<target name="build.nativeLibraries" depends="build.cfiles" description="Build 64 bit native libraries without changing the content of org.eclipse.swt">
-		<property name="sourcedir" value="${basedir}/src/bin/library" />
-		<property name="lib_destdir" value="${sourcedir}/../../../../${fragment}" />
-		<tstamp />
-		<exec dir="${sourcedir}" executable="sh">
-			<arg line="./build.sh" />
-			<arg line="clean" />
-		</exec>
-		<mkdir dir="${lib_destdir}" />
-		<exec dir="${sourcedir}" executable="sh">
-			<arg line="./build.sh" />
-			<arg line="all" />
-		</exec>
-		<copy todir="${lib_destdir}">
-			<fileset dir="${sourcedir}/" includes="*.so" />
-		</copy>
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
+<project name="org.eclipse.swt.gtk.linux.s390x" default="build.jars" basedir=".">
+
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="s390x" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/META-INF/MANIFEST.MF
index fd3e4ad..bf452ce 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.linux.x86; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about.html
index eab9b35..6c5fbd8 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
@@ -85,6 +84,45 @@ other terms and conditions of Section 6 as well as other Sections of the LGPL.
 governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
 work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
 
+<h4>WebKitGTK+ Binding</h4>
+
+<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>
+The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<p>
+In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by the terms and conditions of the LGPL. Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined work is provided for debugging purposes so there is no need to reverse engineer the combined work.<p>
+
+<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_blank">http://webkit.org/coding/bsd-license.html</a>. </p>
+
+<h4>libsoup</h4>
+
+<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
 <h4>Mozilla Binding</h4>
 
 <p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about_files/webkit-bsd.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about_files/webkit-bsd.txt
new file mode 100644
index 0000000..b3b07c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/about_files/webkit-bsd.txt
@@ -0,0 +1,20 @@
+BSD License
+
+Copyright (C) 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/build.xml
index 19db4f6..4e27917 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/build.xml
@@ -1,418 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.linux.x86" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="linux" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.gtk.linux.x86" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="build.cfiles" depends="init">
-		<mkdir dir="${build.result.folder}/library" />
-		<copy todir="${build.result.folder}/library">
-			<fileset dir="${plugindir}/Eclipse SWT/common/library" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library" />
-		</copy>
-	</target>
-
-	<target name="build.jnilibs" depends="build.cfiles">
-		<exec dir="${build.result.folder}/library" executable="sh">
-			<env key="OUTPUT_DIR" value="${build.result.folder}" />
-			<arg line="${build.result.folder}/library/build.sh" />
-			<arg line="install" />
-		</exec>
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" excludes="**/*.sh" />
-			<zipfileset filemode="755" dir="${plugindir}/Eclipse SWT PI/gtk/library/" includes="**/*.sh" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<!--<zipfileset filemode="755" dir="${plugindir}/Eclipse SWT PI/gtk/library/" includes="**/*.sh"/> -->
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="x86" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel3.csh b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel3.csh
deleted file mode 100644
index b3d8ab9..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel3.csh
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file should be run on RHEL3
-
-# Use buildLibraries_rhel4.csh to compile and release only these 3 libraries:
-#   libswt-mozilla-gtk-XXXX.so
-#   libswt-xpcominit-gtk-XXXX.so
-#   libswt-xulrunner-gtk-XXXX.so
-# Use this file (buildLibraries_rhel3.csh) to compile and release the remaining libraries
-
-echo Building LINUX X86 GTK on RHEL3
-
-# These variables must be set to reflect the compilation context
-setenv CAIROPATH /usr/local/cairo-1.0.2/lib/pkgconfig/
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-141
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk
-
-setenv GCC_VERSION -gcc3
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
-setenv MOZILLA_LIBS "${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla install
-
-setenv PKG_CONFIG_PATH ${CAIROPATH}
-sh build.sh clean
-sh build.sh make_cairo install
-setenv PKG_CONFIG_PATH
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel4.csh b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel4.csh
deleted file mode 100644
index b285ca5..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel4.csh
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file should be run on RHEL4
-
-# Use this file (buildLibraries_rhel4.csh) to compile and release only these 3 libraries:
-#   libswt-mozilla-gtk-XXXX.so
-#   libswt-xpcominit-gtk-XXXX.so
-#   libswt-xulrunner-gtk-XXXX.so
-# Use buildLibraries_rhel3.csh to compile and release the remaining libraries
-
-echo Building Mozilla X86 GTK on RHEL4
-
-# These variables must be set to reflect the compilation context
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-141
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk
-
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
-setenv MOZILLA_LIBS "${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla make_xulrunner make_xpcominit install
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/console.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/console.txt
deleted file mode 100644
index a3c0fdb..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86/console.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Mozilla X86 GTK on RH EL4
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  -c swt.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC    -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC    -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3337.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib  -lXtst -o libswt-pi-gtk-3337.so swt.o os.o os_structs.o os_custom.o os_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3337.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC  `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3337.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC   -c glx.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC   -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC   -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3337.so swt.o glx.o glx_structs.o glx_stats.o
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux -fPIC    -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/IBMJava2-141/jre/bin -ljawt -shared -s -o libswt-awt-gtk-3337.so swt_awt.o
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -DNO_XPCOMGlueShutdown -DNO_XPCOMGlueStartup -include /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/xpcom -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/nspr -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embed_base -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embedstring -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/string -c xpcom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/xpcom -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/nspr -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embed_base -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embedstring -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/string -c xpcom_custom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/xpcom -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/nspr -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embed_base -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embedstring -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/string -c xpcom_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/xpcom -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/nspr -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embed_base -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/embedstring -I/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../include/string -c xpcom_stats.cpp
-g++ -o libswt-mozilla-gtk-3337.so swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../lib/libembedstring.a -L/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../bin -L/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4
-g++ -o xpcomxul.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcom.cpp
-g++ -o xpcomxul_custom.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcom_custom.cpp
-g++ -o xpcomxul_structs.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcom_structs.cpp
-g++ -o xpcomxul_stats.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcom_stats.cpp
-g++ -o libswt-xulrunner-gtk-3337.so swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/lib -lxpcomglue
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcominit.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcominit_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include -I/bluebird/teamswt/swt-builddir/IBMJava2-141/include/linux  -include /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/include -c xpcominit_stats.cpp
-g++ -o libswt-xpcominit-gtk-3337.so swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk/lib -lxpcomglue
-cp *.so ../../../org.eclipse.swt.gtk.linux.x86
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF
index 54a2cd1..403baa1 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.linux.x86_64; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about.html b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about.html
index eab9b35..6c5fbd8 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about.html
@@ -70,8 +70,7 @@ work is provided for debugging purposes so there is no need to reverse engineer
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
@@ -85,6 +84,45 @@ other terms and conditions of Section 6 as well as other Sections of the LGPL.
 governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
 work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
 
+<h4>WebKitGTK+ Binding</h4>
+
+<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>
+The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
+<p>
+In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by the terms and conditions of the LGPL. Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined work is provided for debugging purposes so there is no need to reverse engineer the combined work.<p>
+
+<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_blank">http://webkit.org/coding/bsd-license.html</a>. </p>
+
+<h4>libsoup</h4>
+
+<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
+
+<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
+</ul>
+
+<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
+<ul>
+    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
+</ul>
+
+<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at <a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>. </p>
+
 <h4>Mozilla Binding</h4>
 
 <p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about_files/webkit-bsd.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about_files/webkit-bsd.txt
new file mode 100644
index 0000000..b3b07c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/about_files/webkit-bsd.txt
@@ -0,0 +1,20 @@
+BSD License
+
+Copyright (C) 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml
index 12fa0e8..603f376 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml
@@ -1,426 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.linux.x86_64" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="linux" />
-		<property name="arch" value="x86_64" />
-		<property name="fragment" value="org.eclipse.swt.gtk.linux.x86_64" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="temp.folder.64" value="${basedir}/temp.folder/64" />
-		<property name="toolsplugindir" value="../org.eclipse.swt.tools" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		<!--compile the jar in org.eclipse.swt.tools-->
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${basedir}/src/Eclipse SWT/cairo/" />
-			<src path="${basedir}/src/Eclipse SWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/bidi/" />
-			<src path="${basedir}/src/Eclipse SWT/emulated/coolbar/" />
-			<src path="${basedir}/src/Eclipse SWT/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/common/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Custom Widgets/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/glx/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/cairo/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT PI/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/common/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Program/cde/" />
-			<src path="${basedir}/src/Eclipse SWT Program/common/" />
-			<src path="${basedir}/src/Eclipse SWT Program/gnome/" />
-			<src path="${basedir}/src/Eclipse SWT Program/gtk/" />
-			<src path="${basedir}/src/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<available property="source.present" file="${basedir}/src" type="dir" />
-		<antcall target="copy.source" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="copy.source" unless="source.present">
-		<echo>Copying source from org.eclipse.swt project to folder ${basedir}/src folder ${temp.folder}.</echo>
-		<delete dir="${basedir}/src" />
-		<mkdir dir="${basedir}/src" />
-
-		<!-- Copy the existing 32 bit SWT source folders to the 64 bit source folder -->
-		<copy todir="${basedir}/src">
-			<fileset dir="${plugindir}" includes="Eclipse*/**" />
-		</copy>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${basedir}/src" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-	</target>
-
-	<target name="replace.32.to.64" depends="init">
-		<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-		<antcall target="refresh" />
-	</target>
-
-	<target name="replace.64.to.32" depends="init">
-		<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 64 bit java source to 32 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="long /*int*/" value="int /*long*/" />
-		<antcall target="refresh" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${basedir}/src/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${plugindir}" depth="infinite" />
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="x86_64" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel3.csh b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel3.csh
deleted file mode 100644
index 5604153..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel3.csh
+++ /dev/null
@@ -1,38 +0,0 @@
-# This file should be run on RHEL3
-
-# before running this file the replace.32.to.64 and build.cfiles targets
-# in this project's build.xml ant script must be run first
-
-# Use buildLibraries_rhel4.csh to compile and release only these 3 libraries:
-#   libswt-mozilla-gtk-XXXX.so
-#   libswt-xpcominit-gtk-XXXX.so
-#   libswt-xulrunner-gtk-XXXX.so
-# Use this file (buildLibraries_rhel3.csh) to compile and release the remaining libraries
-
-echo Building LINUX X86_64 GTK on RHEL3
-
-# These variables must be set to reflect the compilation context
-setenv CAIROPATH /usr/local/cairo-1.0.2/lib/pkgconfig
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/jdk1.5.0
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk/
-setenv PKG_CONFIG_PATH /usr/lib64/pkgconfig
-
-setenv GCC_VERSION -gcc3
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"
-setenv MOZILLA_LIBS "-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
-
-# See Bug 84673
-sh build.sh make_mozilla install
-
-setenv PKG_CONFIG_PATH ${CAIROPATH}
-sh build.sh clean
-sh build.sh make_cairo install
-
-setenv PKG_CONFIG_PATH
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel4.csh b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel4.csh
deleted file mode 100644
index 748691d..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/buildLibraries_rhel4.csh
+++ /dev/null
@@ -1,24 +0,0 @@
-# This file should be run on RHEL4
-
-# Use this file (buildLibraries_rhel4.csh) to compile and release only these 3 libraries:
-#   libswt-mozilla-gtk-XXXX.so
-#   libswt-xpcominit-gtk-XXXX.so
-#   libswt-xulrunner-gtk-XXXX.so
-# Use buildLibraries_rhel3.csh to compile and release the remaining libraries
-
-echo Building Mozilla X86_64 GTK on RHEL4
-
-# These variables must be set to reflect the compilation context
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/jdk1.5.0
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk/
-
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"
-setenv MOZILLA_LIBS "-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla make_xulrunner make_xpcominit install
-
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/console.txt b/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/console.txt
deleted file mode 100644
index 9b1f13d..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64/console.txt
+++ /dev/null
@@ -1,163 +0,0 @@
-Building LINUX X86_64 GTK on tswtrh3x64
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86_64
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86_64
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -c swt.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3337.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib -L/usr/X11R6/lib64 -lXtst -o libswt-pi-gtk-3337.so swt.o os.o os_structs.o os_custom.o os_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.so when searching for -lXtst
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.a when searching for -lXtst
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3337.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3337.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3337.so swt.o glx.o glx_structs.o glx_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.so when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.a when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.a when searching for -lGLU
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/jdk1.5.0/jre/lib/amd64 -ljawt -shared -s -o libswt-awt-gtk-3337.so swt_awt.o
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86_64
-make: *** Warning: File `atk.o' has modification time in the future (2007-04-26 16:24:43 > 2007-04-26 16:06:53.37)
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3337.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-make: Nothing to be done for `make_gnome'.
-make: Nothing to be done for `make_awt'.
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -DNO_XPCOMGlueShutdown -DNO_XPCOMGlueStartup -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_custom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_stats.cpp
-g++ -o libswt-mozilla-gcc3-gtk-3337.so swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/lib -L/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/bin -lxpcom -lnspr4 -lplds4 -lplc4
-g++ -o xpcomxul.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom.cpp
-g++ -o xpcomxul_custom.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_custom.cpp
-g++ -o xpcomxul_structs.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_structs.cpp
-g++ -o xpcomxul_stats.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_stats.cpp
-g++ -o libswt-xulrunner-gcc3-gtk-3337.so swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//lib -lxpcomglue
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit_stats.cpp
-g++ -o libswt-xpcominit-gcc3-gtk-3337.so swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//lib -lxpcomglue
-make: warning:  Clock skew detected.  Your build may be incomplete.
-cp: overwrite `../../.././libswt-atk-gtk-3337.so'? cp: overwrite `../../.././libswt-awt-gtk-3337.so'? cp: overwrite `../../.././libswt-glx-gtk-3337.so'? cp: overwrite `../../.././libswt-gnome-gtk-3337.so'? cp: overwrite `../../.././libswt-gtk-3337.so'? cp: overwrite `../../.././libswt-mozilla-gcc3-gtk-3337.so'? cp: overwrite `../../.././libswt-pi-gtk-3337.so'? cp: overwrite `../../.././libswt-xpcominit-gcc3-gtk-3337.so'? cp: overwrite `../../.././libswt-xulrunner-gcc3-gtk-3337.so'? libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux x86_64
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo found, compiling SWT support for the cairo graphics library.
-Building SWT/GTK+ for linux x86_64
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -c swt.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3337.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib -L/usr/X11R6/lib64 -lXtst -o libswt-pi-gtk-3337.so swt.o os.o os_structs.o os_custom.o os_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.so when searching for -lXtst
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.a when searching for -lXtst
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3337.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3337.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3337.so swt.o glx.o glx_structs.o glx_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.so when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.a when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.a when searching for -lGLU
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags cairo` -c cairo.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags cairo` -c cairo_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags cairo` -c cairo_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L cairo` -lcairo -o libswt-cairo-gtk-3337.so swt.o cairo.o cairo_structs.o cairo_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/jdk1.5.0/jre/lib/amd64 -ljawt -shared -s -o libswt-awt-gtk-3337.so swt_awt.o
-make: Nothing to be done for `make_cairo'.
-cp: overwrite `../../.././libswt-atk-gtk-3337.so'? cp: overwrite `../../.././libswt-awt-gtk-3337.so'? cp: overwrite `../../.././libswt-glx-gtk-3337.so'? cp: overwrite `../../.././libswt-gnome-gtk-3337.so'? cp: overwrite `../../.././libswt-gtk-3337.so'? cp: overwrite `../../.././libswt-pi-gtk-3337.so'? Building MOZILLA X86_64 GTK on tswtrh4x64
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86_64
-rm -f *.o *.so
-libgnomeui-2.0 found, compiling SWT program support using GNOME
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Building SWT/GTK+ for linux x86_64
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -c swt.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c.o c.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o c_stats.o c_stats.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 -DUSE_ASSEMBLER -c callback.c
-gcc -shared -fPIC -s -o libswt-gtk-3337.so swt.o c.o c_stats.o callback.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gtk+-2.0` -c os_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib -L/usr/X11R6/lib64 -lXtst -o libswt-pi-gtk-3337.so swt.o os.o os_structs.o os_custom.o os_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.so when searching for -lXtst
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXtst.a when searching for -lXtst
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3337.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64 `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -c gnome_stats.c
-gcc -shared -fPIC -s `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -o libswt-gnome-gtk-3337.so swt.o gnome.o gnome_structs.o gnome_stats.o
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_structs.c
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64  -c glx_stats.c
-gcc -shared -fPIC -s -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm -o libswt-glx-gtk-3337.so swt.o glx.o glx_structs.o glx_stats.o
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.so when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.a when searching for -lGL
-/usr/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.a when searching for -lGLU
-make: Nothing to be done for `make_gnome'.
-gcc -O -Wall -DSWT_VERSION=3337  -DLINUX -DGTK -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -fPIC -DSWT_PTR_SIZE_64   -c -o swt_awt.o swt_awt.c
-gcc -L/bluebird/teamswt/swt-builddir/jdk1.5.0/jre/lib/amd64 -ljawt -shared -s -o libswt-awt-gtk-3337.so swt_awt.o
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -DNO_XPCOMGlueShutdown -DNO_XPCOMGlueStartup -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_custom.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/include -c xpcom_stats.cpp
-g++ -o libswt-mozilla-gtk-3337.so swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/lib -L/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk/bin -lxpcom -lnspr4 -lplds4 -lplc4
-g++ -o xpcomxul.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom.cpp
-g++ -o xpcomxul_custom.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_custom.cpp
-g++ -o xpcomxul_structs.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_structs.cpp
-g++ -o xpcomxul_stats.o -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcom_stats.cpp
-g++ -o libswt-xulrunner-gtk-3337.so swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//lib -lxpcomglue
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit_structs.cpp
-g++ -O -DSWT_VERSION=3337  -DMOZILLA_STRICT_API=1 -fno-rtti -fno-exceptions -Wall -Wno-non-virtual-dtor -fPIC -I. -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include -I/bluebird/teamswt/swt-builddir/jdk1.5.0/include/linux -DSWT_PTR_SIZE_64 -include /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include/mozilla-config.h -I/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//include -c xpcominit_stats.cpp
-g++ -o libswt-xpcominit-gtk-3337.so swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o -shared -Wl,--version-script=mozilla_exports -Bsymbolic -s -L/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk//lib -lxpcomglue
-cp: overwrite `../../.././libswt-atk-gtk-3337.so'? cp: overwrite `../../.././libswt-awt-gtk-3337.so'? cp: overwrite `../../.././libswt-glx-gtk-3337.so'? cp: overwrite `../../.././libswt-gnome-gtk-3337.so'? cp: overwrite `../../.././libswt-gtk-3337.so'? cp: overwrite `../../.././libswt-pi-gtk-3337.so'? 
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/META-INF/MANIFEST.MF
index 016a294..a44ce66 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.solaris.sparc; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/about.html b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/about.html
index 5ad75a9..59b1450 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/about.html
@@ -45,8 +45,7 @@ terms and conditions of use.</p>
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/build.xml
index 30a13d4..3122656 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/build.xml
@@ -1,390 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.solaris.sparc" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="solaris" />
-		<property name="arch" value="sparc" />
-		<property name="fragment" value="org.eclipse.swt.gtk.solaris.sparc" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="solaris" />
+	<property name="swt.arch" value="sparc" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/buildLibraries.csh
deleted file mode 100644
index 7a8915a..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/buildLibraries.csh
+++ /dev/null
@@ -1,15 +0,0 @@
-echo Building SOLARIS SPARC GTK
-
-# These variables must be set to reflect the compilation context
-setenv CAIROPATH /usr/local/cairo-1.4.10/lib/pkgconfig/
-setenv CCPATH /export/home/SUNWspro/bin
-
-setenv CC cc
-setenv CDE_HOME /usr/dt
-setenv JAVA_HOME /usr/j2se
-setenv PATH ${CCPATH}:/usr/ccs/bin:/usr/local/bin:${PATH}
-setenv PKG_CONFIG_PATH ${CAIROPATH}
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/console.txt b/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/console.txt
deleted file mode 100644
index e031057..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.sparc/console.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-SOLARIS SPARC GTK on lswtsunblade
-
-libgnome-2.0 and libgnomeui-2.0 not found:
-    *** SWT Program support for GNOME will not be compiled.
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Mozilla/XPCOM or Firefox/XPCOM libraries not found:
-    *** Mozilla embedding support will not be compiled.
-Building SWT/GTK+ for solaris sparc
-rm -f *.o *.so
-libgnome-2.0 and libgnomeui-2.0 not found:
-    *** SWT Program support for GNOME will not be compiled.
-Cairo not found:
-    *** Advanced graphics support using cairo will not be compiled.
-Mozilla/XPCOM or Firefox/XPCOM libraries not found:
-    *** Mozilla embedding support will not be compiled.
-    
-Building SWT/GTK+ for solaris sparc
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include -c swt.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  c.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  c_stats.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include -c callback.c
-cc -G -K PIC -s -o libswt-gtk-3336.so swt.o c.o c_stats.o callback.o
-
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags gtk+-2.0` -c os.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags gtk+-2.0` -c os_structs.c 
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags gtk+-2.0` -c os_custom.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags gtk+-2.0` -c os_stats.c
-cc -G -K PIC -s `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/openwin/lib -Wl,-R -Wl,/usr/openwin/lib -lXtst -o libswt-pi-gtk-3336.so swt.o os.o os_structs.o os_custom.o os_stats.o
-
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags atk gtk+-2.0` -c atk.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags atk gtk+-2.0` -c atk_structs.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags atk gtk+-2.0` -c atk_custom.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include `pkg-config --cflags atk gtk+-2.0` -c atk_stats.c
-cc -G -K PIC -s `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 -o libswt-atk-gtk-3336.so swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
-
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  swt_awt.c
-cc -L/usr/j2se/jre/lib/sparc -ljawt -G -s -o libswt-awt-gtk-3336.so swt_awt.o
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  cde.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  cde_structs.c
-cc -O  -DSWT_VERSION=3336    -DSOLARIS -DGTK -DCDE  -I/usr/j2se/include  -I/usr/j2se/include/solaris  -K PIC    -I/usr/dt/include  -c  cde_stats.c
-cc -G -K PIC -s -L/usr/dt/lib -R/usr/dt/lib -lXt -lX11 -lDtSvc -o libswt-cde-gtk-3336.so swt.o cde.o cde_structs.o cde_stats.o
-
-cp *.so ../../../org.eclipse.swt.gtk.solaris.sparc
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/META-INF/MANIFEST.MF
index a745aca..d0586a7 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.gtk.solaris.x86; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/about.html b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/about.html
index 5a06c72..e877863 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/about.html
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/about.html
@@ -45,8 +45,7 @@ terms and conditions of use.</p>
 <ul>
 	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
 	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/kde (but not including any sub-directories)</li>				
+	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
 </ul>
 
 <p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/build.xml b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/build.xml
index 8a86247..0a79ee0 100644
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/build.xml
@@ -1,393 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.gtk.solaris.x86" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="gtk" />
-		<property name="os" value="solaris" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.gtk.solaris.x86" />
-		<property name="version.suffix" value="3.3.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/gtk/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/gtk/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/gtk/" />
-			<src path="${plugindir}/Eclipse SWT Theme/gtk/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-			<fileset dir="${basedir}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		</copy>
-		<chmod dir="${temp.folder}/swtdownload" perm="755" includes="**/lib*" />
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="gtk" />
+	<property name="swt.os" value="solaris" />
+	<property name="swt.arch" value="x86" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/buildLibraries.csh
deleted file mode 100644
index 789ae5d..0000000
--- a/eclipse/plugins/org.eclipse.swt.gtk.solaris.x86/buildLibraries.csh
+++ /dev/null
@@ -1,22 +0,0 @@
-# This file should be run on Solaris x86
-
-# Use this file (buildLibraries.csh) to compile and release all libraries for Solaris x86
-
-echo Building Solaris x86 GTK
-
-# These variables must be set to reflect the compilation context
-setenv CC cc
-setenv CXX CC
-
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-141
-setenv MOZILLA_SDK /bluebird/teamswt/bog/mozilla/solaris_x86/1.7/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/solaris-x86/mozilla/dist/sdk
-
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"
-setenv MOZILLA_LIBS "-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla install
diff --git a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/META-INF/MANIFEST.MF
index a849434..ac18d16 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.motif.aix.ppc; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/build.xml b/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/build.xml
index a127a5a..95642d8 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/build.xml
@@ -1,424 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.motif.aix.ppc" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="motif" />
-		<property name="os" value="aix" />
-		<property name="arch" value="ppc" />
-		<property name="fragment" value="org.eclipse.swt.motif.aix.ppc" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tabfolder" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime" />
-			<src path="${plugindir}/Eclipse SWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/motif/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif_gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/motif/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/motif/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="motif" />
+	<property name="swt.os" value="aix" />
+	<property name="swt.arch" value="ppc" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/buildLibraries.csh
deleted file mode 100644
index dbf8f16..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.aix.ppc/buildLibraries.csh
+++ /dev/null
@@ -1,13 +0,0 @@
-echo Building AIX PPC Motif
-
-# These variables must be set to reflect the compilation context
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/aixj9_r5
-setenv AWT_HOME /bluebird/teamswt/swt-builddir/aix_jre_r6/sdk/jre/lib/ppc
-setenv MOTIF_HOME /bluebird/teamswt/swt-builddir/motif21
-setenv PKG_CONFIG_PATH /usr/local/cairo1.6.0/lib/pkgconfig/
-
-setenv LANG en_US
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/.project b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/.project
deleted file mode 100644
index c51dec8..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.swt.motif.hpux.PA_RISC</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
deleted file mode 100644
index 073f022..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
-Bundle-Name: %fragmentName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.swt.motif.hpux.PA_RISC; singleton:=true
-Bundle-Version: 3.5.0.HEAD
-Bundle-ManifestVersion: 2
-Bundle-Localization: fragment
-Export-Package: 
- org.eclipse.swt.internal.cairo; x-internal:=true,
- org.eclipse.swt.internal.cde; x-internal:=true,
- org.eclipse.swt.internal.gnome; x-internal:=true,
- org.eclipse.swt.internal.gtk; x-internal:=true,
- org.eclipse.swt.internal.motif; x-internal:=true,
- org.eclipse.swt.internal.mozilla; x-internal:=true,
- org.eclipse.swt.internal.opengl.glx; x-internal:=true
-Eclipse-PlatformFilter: (& (osgi.ws=motif) (osgi.os=hpux) (osgi.arch=PA_RISC))
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/about.html b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/about.html
deleted file mode 100644
index 0973f70..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/about.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>Permission is hereby granted, free of charge, to any person  obtaining a copy of this software and associated documentation files  (the "Software"), to deal in the Software without restriction,  including without limitation the rights to use, copy, modify, merge,  publish, distribute, sublicense, and/or sell copies of the Software,  and to permit persons to whom the Software is furnished to do so,  subject to the following conditions:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/build.xml b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/build.xml
deleted file mode 100644
index c22c6d4..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/build.xml
+++ /dev/null
@@ -1,412 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.swt.motif.hpux.PA_RISC" default="build.jars" basedir=".">
-
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="motif" />
-		<property name="os" value="hpux" />
-		<property name="arch" value="PA_RISC" />
-		<property name="fragment" value="org.eclipse.swt.motif.hpux.PA_RISC" />
-		<property name="version.suffix" value="3.3.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tabfolder" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime" />
-			<src path="${plugindir}/Eclipse SWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/motif/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif_gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/motif/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/motif/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/buildLibraries.csh
deleted file mode 100644
index 4b63325..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/buildLibraries.csh
+++ /dev/null
@@ -1,8 +0,0 @@
-echo Building HPUX IA64_32 Motif
-
-# These variables must be set to reflect the compilation context
-setenv JAVA_HOME /opt/jdk14101
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/fragment.properties b/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/fragment.properties
deleted file mode 100644
index d7c7965..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.PA_RISC/fragment.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-fragmentName = Standard Widget Toolkit for Motif
-providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/META-INF/MANIFEST.MF
index 3f34e2c..c2fb563 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.motif.hpux.ia64_32; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/build.xml b/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/build.xml
index 2aaa05c..04f5811 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/build.xml
@@ -1,424 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.motif.hpux.ia64_32" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="motif" />
-		<property name="os" value="hpux" />
-		<property name="arch" value="ia64_32" />
-		<property name="fragment" value="org.eclipse.swt.motif.hpux.ia64_32" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tabfolder" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime" />
-			<src path="${plugindir}/Eclipse SWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/motif/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif_gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/motif/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/motif/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<exec dir="${temp.folder}/swtdownload" executable="zip">
-			<arg line="-r -q -y ${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip ." />
-		</exec>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="motif" />
+	<property name="swt.os" value="hpux" />
+	<property name="swt.arch" value="ia64_32" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/buildLibraries.csh
deleted file mode 100644
index 4cb1324..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.hpux.ia64_32/buildLibraries.csh
+++ /dev/null
@@ -1,8 +0,0 @@
-echo Building HPUX PA_RISC Motif
-
-setenv JAVA_HOME /opt/java1.5/
-setenv AWT_HOME /opt/java1.5/jre/lib/IA64N/
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/META-INF/MANIFEST.MF
index d35449d..cb14ec7 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.motif.linux.x86; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/build.xml b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/build.xml
index f3a48de..136672b 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/build.xml
@@ -1,428 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.motif.linux.x86" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="motif" />
-		<property name="os" value="linux" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.motif.linux.x86" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tabfolder" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime" />
-			<src path="${plugindir}/Eclipse SWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/motif/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif_gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/motif/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/motif/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="motif" />
+	<property name="swt.os" value="linux" />
+	<property name="swt.arch" value="x86" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel3.csh b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel3.csh
deleted file mode 100644
index 280ef7f..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel3.csh
+++ /dev/null
@@ -1,31 +0,0 @@
-# This file should be run on RHEL3
-
-# Use buildLibraries_rhel4.csh to compile and release only these 3 libraries:
-#   libswt-mozilla-motif-XXXX.so
-#   libswt-xpcominit-motif-XXXX.so
-#   libswt-xulrunner-motif-XXXX.so
-# Use this file (buildLibraries_rhel3.csh) to compile and release the remaining libraries
-
-echo Building Linux X86 Motif on RHEL3
-
-# These variables must be set to reflect the compilation context
-setenv CAIROPATH /usr/local/cairo-1.0/lib/pkgconfig
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-141
-setenv MOTIF_HOME /bluebird/teamswt/swt-builddir/motif21
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk
-
-setenv GCC_VERSION -gcc3
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
-setenv MOZILLA_LIBS "${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla install
-
-setenv PKG_CONFIG_PATH ${CAIROPATH}
-sh build.sh clean
-sh build.sh make_cairo install
-setenv PKG_CONFIG_PATH
diff --git a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel4.csh b/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel4.csh
deleted file mode 100644
index f344c67..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.linux.x86/buildLibraries_rhel4.csh
+++ /dev/null
@@ -1,23 +0,0 @@
-# This file should be run on RHEL4
-
-# Use this file (buildLibraries_rhel4.csh) to compile and release only these 3 libraries:
-#   libswt-mozilla-motif-XXXX.so
-#   libswt-xpcominit-motif-XXXX.so
-#   libswt-xulrunner-motif-XXXX.so
-# Use buildLibraries_rhel3.csh to compile and release the remaining libraries
-
-echo Building Mozilla X86 Motif on RHEL4
-
-# These variables must be set to reflect the compilation context
-setenv JAVA_HOME /bluebird/teamswt/swt-builddir/IBMJava2-141
-setenv MOZILLA_SDK /bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk
-setenv XULRUNNER_SDK /bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk
-
-setenv MOZILLA_INCLUDES "-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
-setenv MOZILLA_LIBS "${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4"
-setenv XULRUNNER_INCLUDES "-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
-setenv XULRUNNER_LIBS "-L${XULRUNNER_SDK}/lib -lxpcomglue"
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh make_mozilla make_xulrunner make_xpcominit install
diff --git a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/META-INF/MANIFEST.MF
index 663048c..16236d0 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.motif.solaris.sparc; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/build.xml b/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/build.xml
index c8e7a6e..8f8db4b 100644
--- a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/build.xml
@@ -1,424 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.motif.solaris.sparc" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="motif" />
-		<property name="os" value="solaris" />
-		<property name="arch" value="sparc" />
-		<property name="fragment" value="org.eclipse.swt.motif.solaris.sparc" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/cairo/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tabfolder" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime" />
-			<src path="${plugindir}/Eclipse SWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/motif/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/motif/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/motif/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/glx/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/cairo/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif/" />
-			<src path="${plugindir}/Eclipse SWT PI/motif_gtk/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/motif/" />
-			<src path="${plugindir}/Eclipse SWT Program/cde/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/gnome/" />
-			<src path="${plugindir}/Eclipse SWT Program/motif/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/motif/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="motif" />
+	<property name="swt.os" value="solaris" />
+	<property name="swt.arch" value="sparc" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/buildLibraries.csh b/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/buildLibraries.csh
deleted file mode 100644
index fcca7d0..0000000
--- a/eclipse/plugins/org.eclipse.swt.motif.solaris.sparc/buildLibraries.csh
+++ /dev/null
@@ -1,11 +0,0 @@
-echo Building SOLARIS SPARC Motif
-
-# These variables must be set to reflect the compilation context
-setenv CCPATH /export/home/SUNWspro/bin
-setenv PKG_CONFIG_PATH /usr/local/cairo-1.4.6/lib/pkgconfig/
-
-setenv PATH ${CCPATH}:/usr/ccs/bin:${PATH}
-
-cd ../org.eclipse.swt/bin/library/
-sh build.sh clean
-sh build.sh install
diff --git a/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/META-INF/MANIFEST.MF
index 578749a..42f33a4 100644
--- a/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.photon.qnx.x86; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/build.xml b/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/build.xml
index f41716b..0d50d37 100644
--- a/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.photon.qnx.x86/build.xml
@@ -1,375 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.photon.qnx.x86" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="photon" />
-		<property name="os" value="qnx" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.photon.qnx.x86" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/coolbar/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime" />
-			<src path="${plugindir}/Eclipse SWT/emulated/graphics/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/textlayout/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tray/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/treetable/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/expand/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime/" />
-			<src path="${plugindir}/Eclipse SWT/photon/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Browser/photon/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/photon/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/emulated/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/photon/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/photon/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/photon/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/graphics/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/textlayout/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/photon/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/graphics/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/textlayout/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/photon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/graphics/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/textlayout/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/photon/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/photon/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="photon" />
+	<property name="swt.os" value="qnx" />
+	<property name="swt.arch" value="x86" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.tools/.classpath b/eclipse/plugins/org.eclipse.swt.tools/.classpath
deleted file mode 100644
index 22ab26b..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/.classpath
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="JNI Generation"/>
-	<classpathentry kind="src" path="Mac Generation"/>
-	<classpathentry kind="src" path="Sleak"/>
-	<classpathentry kind="src" path="Mozilla Generation"/>
-	<classpathentry kind="src" path="NativeStats"/>
-	<classpathentry kind="src" path="Icon Exe"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.eclipse.swt.tools/.project b/eclipse/plugins/org.eclipse.swt.tools/.project
deleted file mode 100644
index d03eade..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/.project
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.swt.tools</name>
-	<comment></comment>
-	<projects>
-		<project>org.apache.ant</project>
-		<project>org.eclipse.swt</project>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7f64b31..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Mon Dec 11 15:13:24 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
deleted file mode 100644
index d8cb468..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java	
+++ /dev/null
@@ -1,3290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.util.Vector;
-
-/**
- * Customize the icon of a Windows exe
- * 
- * WARNING! This class is not part of SWT API. It is NOT API. It is an internal
- * tool that may be changed or removed at anytime.
- * 
- * Based on MSDN "An In-Depth Look into the Win32 Portable Executable File Format"
- */
-public class IconExe {
-	
-	 /**
-	 * Replace the Desktop icons provided in the Windows executable program
-	 * with matching icons provided by the user.
-	 *
- 	 * Takes 2 arguments
-	 * argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
-	 * argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
-	 *
-	 * Note 1. Write access to the executable program is required. As a result, that
-	 * program must not be currently running or edited elsewhere.
-	 * 
-	 * Note 2.  The Eclipse 3.1 launcher requires a .ico file with the following 6 images
-	 * 1. 32x32, 4 bit (Windows 16 colors palette)
-	 * 2. 16x16, 4 bit (Windows 16 colors palette)
-	 * 3. 16x16, 8 bit (256 colors)
-	 * 4. 32x32, 8 bit (256 colors)
-	 * 5. 48x48, 4 bit (Windows 16 colors palette)
-	 * 6. 48x48, 8 bit (256 colors)
-	 * A user icon matching exactly the width/height/depth of an executable icon will be written
-	 * to the executable and will replace that executable icon. If an executable icon
-	 * does not match a user icon, it is silently left as is.
-	 * 
-	 * Note 3. This function modifies the content of the executable program and may cause
-	 * its corruption.
-	 */
-	public static void main(String[] args) {
-		if (args.length < 2) {
-			System.err.println("Usage: IconExe <windows executable> <ico file>");
-			return;
-		}
-		ImageLoader loader = new ImageLoader();
-		try {
-			ImageData[] data = null;
-			
-			if (args.length == 2) {
-				/* ICO case */
-				data = loader.load(args[1]);
-			} else {
-				/* BMP case - each following argument is a single BMP file
-				 * BMP is handled for testing purpose only. The ICO file is the
-				 * official Microsoft format for image resources.
-				 */
-				data = new ImageData[args.length - 1];
-				for (int i = 1; i < args.length; i++) {
-					ImageData[] current = loader.load(args[i]);
-					data[i - 1] = current[0];
-				}
-			}
-			int nMissing = unloadIcons(args[0], data);
-			if (nMissing != 0) System.err.println("Error - "+nMissing+" icon(s) not replaced in "+args[0]+" using "+args[1]);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	
-	/* Implementation */
-
-	/** 
-	 * Retrieve the Desktop icons provided in the Windows executable program.
-	 * These icons are typically shown in various places of the Windows desktop.
-	 * 
-	 * Note.  The Eclipse 3.1 launcher returns the following 6 images
-	 * 1. 32x32, 4 bit (Windows 16 colors palette)
-	 * 2. 16x16, 4 bit (Windows 16 colors palette)
-	 * 3. 16x16, 8 bit (256 colors)
-	 * 4. 32x32, 8 bit (256 colors)
-	 * 5. 48x48, 4 bit (Windows 16 colors palette)
-	 * 6. 48x48, 8 bit (256 colors)
-	 * 
-	 * @param program the Windows executable e.g c:/eclipse/eclipse.exe
-	 */	
-	static ImageData[] loadIcons(String program) throws FileNotFoundException, IOException {
-		RandomAccessFile raf = new RandomAccessFile(program, "r");
-		IconExe iconExe = new IconExe();
-		IconResInfo[] iconInfo = iconExe.getIcons(raf);
-		ImageData[] data = new ImageData[iconInfo.length];
-		for (int i = 0; i < data.length; i++) data[i] = iconInfo[i].data;
-		raf.close();
-		return data;
-	}
-	
-	/** 
-	 * Replace the Desktop icons provided in the Windows executable program
-	 * with icons provided by the user.
-	 * 
-	 * Note 1. Write access to the executable program is required. As a result, that
-	 * program must not be currently running or edited elsewhere.
-	 * 
-	 * Note 2. Use loadIcons to determine which set of icons (width, height, depth)
-	 * is required to replace the icons in the executable program. A user icon
-	 * matching exactly the width/height/depth of an executable icon will be written
-	 * to the executable and will replace that executable icon. If an executable icon
-	 * does not match a user icon, it is left as is. Verify the return value matches
-	 * the number of icons to write. Finally, use loadIcons after this operation
-	 * to verify the icons have changed as expected.
-	 * 
-	 * Note 3. The Eclipse 3.1 launcher requires the following 6 images (in any order).
-	 * 1. 32x32, 4 bit (Windows 16 colors palette)
-	 * 2. 16x16, 4 bit (Windows 16 colors palette)
-	 * 3. 16x16, 8 bit (256 colors)
-	 * 4. 32x32, 8 bit (256 colors)
-	 * 5. 48x48, 4 bit (Windows 16 colors palette)
-	 * 6. 48x48, 8 bit (256 colors)
-	 * 
-	 * Note 4. This function modifies the content of the executable program and may cause
-	 * its corruption. 
-	 * 
-	 * @param program the Windows executable e.g c:/eclipse/eclipse.exe
-	 * @param icons to write to the given executable
-	 * @return the number of icons from the original program that were not successfully replaced (0 if success)
-	 */	
-	static int unloadIcons(String program, ImageData[] icons) throws FileNotFoundException, IOException {
-		RandomAccessFile raf = new RandomAccessFile(program, "rw");
-		IconExe iconExe = new IconExe();
-		IconResInfo[] iconInfo = iconExe.getIcons(raf);
-		int cnt = 0;
-		for (int i = 0; i < iconInfo.length; i++) {
-			for (int j = 0; j < icons.length; j++)
-			if (iconInfo[i].data.width == icons[j].width && 
-				iconInfo[i].data.height == icons[j].height && 
-				iconInfo[i].data.depth == icons[j].depth) {
-				raf.seek(iconInfo[i].offset);
-				unloadIcon(raf, icons[j]);
-				cnt++;
-			}
-		}
-		raf.close();
-		return iconInfo.length - cnt;
-	}
-	
-	public static final String VERSION = "20050124";
-	
-	static final boolean DEBUG = false;
-	public static class IconResInfo {
-		ImageData data;
-		int offset;
-		int size;
-	}
-	
-	IconResInfo[] iconInfo = null;
-	int iconCnt;
-	
-	IconResInfo[] getIcons(RandomAccessFile raf) throws IOException {
-		iconInfo = new IconResInfo[4];
-		iconCnt = 0;
-		IMAGE_DOS_HEADER imageDosHeader = new IMAGE_DOS_HEADER();
-		read(raf, imageDosHeader);
-		if (imageDosHeader.e_magic != IMAGE_DOS_SIGNATURE) return null;
-		int imageNtHeadersOffset = imageDosHeader.e_lfanew;
-		raf.seek(imageNtHeadersOffset);
-		IMAGE_NT_HEADERS imageNtHeaders = new IMAGE_NT_HEADERS();
-		read(raf, imageNtHeaders);
-		if (imageNtHeaders.Signature != IMAGE_NT_SIGNATURE) return null;
-		
-		// DumpResources
-		int resourcesRVA = imageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
-		if (resourcesRVA == 0) return null;
-		if (DEBUG) System.out.println("* Resources (RVA= "+resourcesRVA+")");
-		IMAGE_SECTION_HEADER imageSectionHeader = new IMAGE_SECTION_HEADER();
-		int firstSectionOffset = imageNtHeadersOffset + IMAGE_NT_HEADERS.FIELD_OFFSET_OptionalHeader + imageNtHeaders.FileHeader.SizeOfOptionalHeader;
-		raf.seek(firstSectionOffset);
-		boolean found = false;
-		for (int i = 0; i < imageNtHeaders.FileHeader.NumberOfSections; i++) {
-			read(raf, imageSectionHeader);
-			if (resourcesRVA >= imageSectionHeader.VirtualAddress && resourcesRVA < imageSectionHeader.VirtualAddress + imageSectionHeader.Misc_VirtualSize) {
-				// could check the imageSectionHeader name is .rsrc
-				found = true;
-				break;
-			}
-		}
-		if (!found) return null;
-		int delta = imageSectionHeader.VirtualAddress - imageSectionHeader.PointerToRawData;
-		int imageResourceDirectoryOffset = resourcesRVA - delta;
-		dumpResourceDirectory(raf, imageResourceDirectoryOffset, imageResourceDirectoryOffset, delta, 0, 0, false);
-		if (iconCnt < iconInfo.length) {
-			IconResInfo[] newArray = new IconResInfo[iconCnt];
-			System.arraycopy(iconInfo, 0, newArray, 0, iconCnt);
-			iconInfo = newArray;
-		}
-		return iconInfo;
-	}
-
-void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException {
-	if (DEBUG) System.out.println("** LEVEL "+level);
-
-	IMAGE_RESOURCE_DIRECTORY imageResourceDirectory = new IMAGE_RESOURCE_DIRECTORY();
-	raf.seek(imageResourceDirectoryOffset);
-	read(raf, imageResourceDirectory);
-
-	if (DEBUG) {
-		String sType = ""+type;
-		// level 1 resources are resource types
-		if (level == 1) {
-			System.out.println("___________________________");
-			if (type == RT_ICON) sType = "RT_ICON";
-			if (type == RT_GROUP_ICON) sType = "RT_GROUP_ICON";
-		}
-		System.out.println("Resource Directory ["+sType+"]"+" (Named "+imageResourceDirectory.NumberOfNamedEntries+", ID "+imageResourceDirectory.NumberOfIdEntries+")");
-	}
-//	int IRDE_StartOffset = imageResourceDirectoryOffset + IMAGE_RESOURCE_DIRECTORY.SIZEOF;	
-	IMAGE_RESOURCE_DIRECTORY_ENTRY[] imageResourceDirectoryEntries = new IMAGE_RESOURCE_DIRECTORY_ENTRY[imageResourceDirectory.NumberOfIdEntries];
-	for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
-		imageResourceDirectoryEntries[i] = new IMAGE_RESOURCE_DIRECTORY_ENTRY();
-		read(raf, imageResourceDirectoryEntries[i]);
-	}
-	for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
-		if (imageResourceDirectoryEntries[i].DataIsDirectory) {
-			dumpResourceDirectory(raf, imageResourceDirectoryEntries[i].OffsetToDirectory + resourceBase, resourceBase, delta, imageResourceDirectoryEntries[i].Id, level + 1, rt_icon_root ? true : type == RT_ICON);
-		} else {
-			// Resource found
-			/// pResDirEntry->Name
-			IMAGE_RESOURCE_DIRECTORY_ENTRY irde = imageResourceDirectoryEntries[i];
-			IMAGE_RESOURCE_DATA_ENTRY data = new IMAGE_RESOURCE_DATA_ENTRY();
-			raf.seek(imageResourceDirectoryEntries[i].OffsetToData + resourceBase);
-			read(raf, data);
-			if (DEBUG) System.out.println("Resource Id "+irde.Id+" Data Offset RVA "+data.OffsetToData+", Size "+data.Size);
-			if (rt_icon_root) {
-				if (DEBUG) System.out.println("iconcnt "+iconCnt+" |"+iconInfo.length);
-				iconInfo[iconCnt] = new IconResInfo();
-				iconInfo[iconCnt].data = parseIcon(raf, data.OffsetToData - delta, data.Size);
-				iconInfo[iconCnt].offset = data.OffsetToData - delta;
-				iconInfo[iconCnt].size = data.Size;	
-				iconCnt++;
-				if (iconCnt == iconInfo.length) {
-					IconResInfo[] newArray = new IconResInfo[iconInfo.length + 4];
-					System.arraycopy(iconInfo, 0, newArray, 0, iconInfo.length);
-					iconInfo = newArray;
-				}
-			}
-		}
- 	}
-}
-
-static ImageData parseIcon(RandomAccessFile raf, int offset, int size) throws IOException {
-	raf.seek(offset);
-	BITMAPINFO bitmapInfo = new BITMAPINFO();
-	read(raf, bitmapInfo);
-	bitmapInfo.bmiHeader.biHeight /= 2;
-	int width = bitmapInfo.bmiHeader.biWidth;
-	int height = bitmapInfo.bmiHeader.biHeight;
-	int depth = bitmapInfo.bmiHeader.biBitCount;
-
-	PaletteData palette = loadPalette(bitmapInfo.bmiHeader, raf);
-	byte[] shapeData = loadData(bitmapInfo.bmiHeader, raf);
-	bitmapInfo.bmiHeader.biBitCount = 1;
-	byte[] maskData = loadData(bitmapInfo.bmiHeader, raf);
-	maskData = convertPad(maskData, width, height, 1, 4, 2);
-	bitInvertData(maskData, 0, maskData.length);
-	return ImageData.internal_new(
-		width,
-		height,
-		depth,
-		palette,
-		4,
-		shapeData,
-		2,
-		maskData,
-		null,
-		-1,
-		-1,
-		SWT.IMAGE_ICO,
-		0,
-		0,
-		0,
-		0);
-}
-
-static byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
-	// Destructively bit invert data in the given byte array.
-	for (int i = startIndex; i < endIndex; i++) {
-		data[i] = (byte)(255 - data[i - startIndex]);
-	}
-	return data;
-}
-
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
-static PaletteData loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
-	int depth = bih.biBitCount;
-	if (depth <= 8) {
-		int numColors = bih.biClrUsed;
-		if (numColors == 0) {
-			numColors = 1 << depth;
-		} else {
-			if (numColors > 256)
-				numColors = 256;
-		}
-		byte[] buf = new byte[numColors * 4];
-		raf.read(buf);
-		return paletteFromBytes(buf, numColors);
-	}
-	if (depth == 16) return new PaletteData(0x7C00, 0x3E0, 0x1F);
-	if (depth == 24) return new PaletteData(0xFF, 0xFF00, 0xFF0000);
-	return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
-}
-static PaletteData paletteFromBytes(byte[] bytes, int numColors) {
-	int bytesOffset = 0;
-	RGB[] colors = new RGB[numColors];
-	for (int i = 0; i < numColors; i++) {
-		colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF,
-			bytes[bytesOffset + 1] & 0xFF,
-			bytes[bytesOffset] & 0xFF);
-		bytesOffset += 4;
-	}
-	return new PaletteData(colors);
-}
-static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
-	int stride = (bih.biWidth * bih.biBitCount + 7) / 8;
-	stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
-	byte[] data = loadData(bih, raf, stride);
-	flipScanLines(data, stride, bih.biHeight);
-	return data;
-}
-static void flipScanLines(byte[] data, int stride, int height) {
-	int i1 = 0;
-	int i2 = (height - 1) * stride;
-	for (int i = 0; i < height / 2; i++) {
-		for (int index = 0; index < stride; index++) {
-			byte b = data[index + i1];
-			data[index + i1] = data[index + i2];
-			data[index + i2] = b;
-		}
-		i1 += stride;
-		i2 -= stride;
-	}
-}
-static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) throws IOException {
-	int dataSize = bih.biHeight * stride;
-	byte[] data = new byte[dataSize];
-	int cmp = bih.biCompression;
-	if (cmp == 0) { // BMP_NO_COMPRESSION
-		raf.read(data);
-	} else {
-		if (DEBUG) System.out.println("ICO cannot be compressed?");
-	}
-	return data;
-}
-
-static void unloadIcon(RandomAccessFile raf, ImageData icon) throws IOException {
-	int sizeImage = (((icon.width * icon.depth + 31) / 32 * 4) +
-		((icon.width + 31) / 32 * 4)) * icon.height;
-	write4(raf, BMPHeaderFixedSize);
-	write4(raf, icon.width);
-	write4(raf, icon.height * 2);
-	writeU2(raf, 1);
-	writeU2(raf, icon.depth);
-	write4(raf, 0);
-	write4(raf, sizeImage);
-	write4(raf, 0);
-	write4(raf, 0);
-	write4(raf, icon.palette.colors != null ? icon.palette.colors.length : 0);
-	write4(raf, 0);
-	
-	byte[] rgbs = paletteToBytes(icon.palette);
-	raf.write(rgbs);
-	unloadShapeData(raf, icon);
-	unloadMaskData(raf, icon);
-}
-static byte[] paletteToBytes(PaletteData pal) {
-	int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
-	byte[] bytes = new byte[n * 4];
-	int offset = 0;
-	for (int i = 0; i < n; i++) {
-		RGB col = pal.colors[i];
-		bytes[offset] = (byte)col.blue;
-		bytes[offset + 1] = (byte)col.green;
-		bytes[offset + 2] = (byte)col.red;
-		offset += 4;
-	}
-	return bytes;
-}
-static void unloadMaskData(RandomAccessFile raf, ImageData icon) {
-	ImageData mask = icon.getTransparencyMask();
-	int bpl = (icon.width + 7) / 8;
-	int pad = mask.scanlinePad;
-	int srcBpl = (bpl + pad - 1) / pad * pad;
-	int destBpl = (bpl + 3) / 4 * 4;
-	byte[] buf = new byte[destBpl];
-	int offset = (icon.height - 1) * srcBpl;
-	byte[] data = mask.data;
-	try {
-		for (int i = 0; i < icon.height; i++) {
-			System.arraycopy(data, offset, buf, 0, bpl);
-			bitInvertData(buf, 0, bpl);
-			raf.write(buf, 0, destBpl);
-			offset -= srcBpl;
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-}
-static void unloadShapeData(RandomAccessFile raf, ImageData icon) {
-	int bpl = (icon.width * icon.depth + 7) / 8;
-	int pad = icon.scanlinePad;
-	int srcBpl = (bpl + pad - 1) / pad * pad;
-	int destBpl = (bpl + 3) / 4 * 4;
-	byte[] buf = new byte[destBpl];
-	int offset = (icon.height - 1) * srcBpl;
-	byte[] data = icon.data;
-	try {
-		for (int i = 0; i < icon.height; i++) {
-			System.arraycopy(data, offset, buf, 0, bpl);
-			raf.write(buf, 0, destBpl);
-			offset -= srcBpl;
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-}
-static boolean readIconGroup(RandomAccessFile raf, int offset, int size) throws IOException {
-	raf.seek(offset);
-	NEWHEADER newHeader = new NEWHEADER();
-	read(raf, newHeader);
-	if (newHeader.ResType != RES_ICON) return false;
-	RESDIR[] resDir = new RESDIR[newHeader.ResCount];
-	for (int i = 0; i < newHeader.ResCount; i++) {
-		resDir[i] = new RESDIR();
-		read(raf, resDir[i]);
-	}
-	return true;
-}
-
-static void copyFile(String src, String dst) throws FileNotFoundException, IOException {
-	File srcFile = new File(src);
-	File dstFile = new File(dst);
-	FileInputStream in = new FileInputStream(srcFile);
-	FileOutputStream out = new FileOutputStream(dstFile);
-	int c;
-	while ((c = in.read()) != -1) out.write(c); 
-	in.close();
-	out.close();
-}
-
-/* IO utilities to parse Windows executable */
-static final int IMAGE_DOS_SIGNATURE = 0x5a4d;
-static final int IMAGE_NT_SIGNATURE = 0x00004550;
-static final int IMAGE_DIRECTORY_ENTRY_RESOURCE = 2;
-static final int RES_ICON = 1;
-static final int RT_ICON = 3;
-static final int RT_GROUP_ICON = 14;
-static final int BMPHeaderFixedSize = 40;
-	
-public static class IMAGE_DOS_HEADER {
-	int e_magic; // WORD
-	int e_cblp; // WORD
-	int e_cp; // WORD
-	int e_crlc; // WORD
-	int e_cparhdr; // WORD
-	int e_minalloc; // WORD
-	int e_maxalloc; // WORD
-	int e_ss; // WORD
-	int e_sp; // WORD
-	int e_csum; // WORD
-	int e_ip; // WORD
-	int e_cs; // WORD
-	int e_lfarlc; // WORD
-	int e_ovno; // WORD
-	int[] e_res = new int[4]; // WORD[4]
-	int e_oemid; // WORD
-	int e_oeminfo; // WORD
-	int[] e_res2 = new int[10]; // WORD[10]
-	int e_lfanew; // LONG
-}
-
-public static class IMAGE_FILE_HEADER {
-	int Machine; // WORD
-	int NumberOfSections; // WORD
-	int TimeDateStamp; // DWORD
-	int PointerToSymbolTable; // DWORD
-	int NumberOfSymbols; // DWORD
-	int SizeOfOptionalHeader; // WORD
-	int Characteristics; // WORD
-};
-
-public static class IMAGE_DATA_DIRECTORY {
-	int VirtualAddress; // DWORD
-	int Size; // DWORD
-}
-
-public static class IMAGE_OPTIONAL_HEADER {
-	int Magic; // WORD
-	int MajorLinkerVersion; // BYTE
-	int MinorLinkerVersion; // BYTE
-	int SizeOfCode; // DWORD
-	int SizeOfInitializedData; // DWORD
-	int SizeOfUninitializedData; // DWORD
-	int AddressOfEntryPoint; // DWORD
-	int BaseOfCode; // DWORD
-	int BaseOfData; // DWORD
-	int ImageBase; // DWORD
-	int SectionAlignment; // DWORD
-	int FileAlignment; // DWORD
-	int MajorOperatingSystemVersion; // WORD
-	int MinorOperatingSystemVersion; // WORD
-	int MajorImageVersion; // WORD
-	int MinorImageVersion; // WORD
-	int MajorSubsystemVersion; // WORD
-	int MinorSubsystemVersion; // WORD
-	int Win32VersionValue; // DWORD
-	int SizeOfImage; // DWORD
-	int SizeOfHeaders; // DWORD
-	int CheckSum; // DWORD
-	int Subsystem; // WORD
-	int DllCharacteristics; // WORD
-	int SizeOfStackReserve; // DWORD
-	int SizeOfStackCommit; // DWORD
-	int SizeOfHeapReserve; // DWORD
-	int SizeOfHeapCommit; // DWORD
-	int LoaderFlags; // DWORD
-	int NumberOfRvaAndSizes; // DWORD
-	IMAGE_DATA_DIRECTORY[] DataDirectory = new IMAGE_DATA_DIRECTORY[16];
-}
-public static class IMAGE_NT_HEADERS {
-	int Signature; // DWORD
-	IMAGE_FILE_HEADER FileHeader = new IMAGE_FILE_HEADER();
-	IMAGE_OPTIONAL_HEADER OptionalHeader = new IMAGE_OPTIONAL_HEADER();
-	final static int FIELD_OFFSET_OptionalHeader = 24;  
-}
-	
-public static class IMAGE_SECTION_HEADER {
-	int[] Name = new int[8]; // BYTE[8]
-	int Misc_VirtualSize; // DWORD (union Misc { DWORD PhysicalAddress; DWORD VirtualSize }
-	int VirtualAddress; // DWORD
-	int SizeOfRawData; // DWORD
-	int PointerToRawData; // DWORD
-	int PointerToRelocations; // DWORD
-	int PointerToLinenumbers; // DWORD
-	int NumberOfRelocations; // WORD
-	int NumberOfLinenumbers; // WORD
-	int Characteristics; // DWORD
-};
-
-public static class IMAGE_RESOURCE_DIRECTORY {
-	int Characteristics; // DWORD
-	int TimeDateStamp; // DWORD
-	int MajorVersion; // WORD
-	int MinorVersion; // WORD
-	int NumberOfNamedEntries; // WORD - used
-	int NumberOfIdEntries; // WORD - used
-	final static int SIZEOF = 16;
-}
-
-public static class IMAGE_RESOURCE_DIRECTORY_ENTRY {
-	// union
-	int NameOffset; // DWORD 31 bits
-	boolean NameIsString; // DWORD 1 bit
-	int Name; // DWORD
-	int Id; // WORD
-	// union
-	int OffsetToData; // DWORD
-	int OffsetToDirectory; // DWORD 31 bits
-	boolean DataIsDirectory; // DWORD 1 bit
-}
-
-public static class IMAGE_RESOURCE_DATA_ENTRY {
-	int OffsetToData; // DWORD
-	int Size; // DWORD
-	int CodePage; // DWORD
-	int Reserved; // DWORD
-}
-
-public static class NEWHEADER {
-	int Reserved; // WORD
-	int ResType; // WORD
-	int ResCount; // WORD
-}
-
-public static class ICONRESDIR {
-	int Width; // BYTE
-	int Height; // BYTE
-	int ColorCount; // BYTE
-	int reserved; // BYTE
-}
-
-public static class CURSORDIR {
-	int Width; // WORD
-	int Height; // WORD
-}
-
-public static class RESDIR {
-	// union
-	ICONRESDIR Icon = new ICONRESDIR();
-	CURSORDIR Cursor = new CURSORDIR();
-	int Planes; // WORD
-	int BitCount; // WORD
-	int BytesInRes; // DWORD
-	int IconCursorId; // WORD
-}
-
-public static class BITMAPINFOHEADER {
-	int biSize; // DWORD
-	int biWidth; // LONG
-	int biHeight; // LONG
-	int biPlanes; // WORD
-	int biBitCount; // WORD
-	int biCompression; // DWORD
-	int biSizeImage; // DWORD
-	int biXPelsPerMeter; // LONG
-	int biYPelsPerMeter; // LONG
-	int biClrUsed; // DWORD
-	int biClrImportant; // DWORD
-}
-
-static class RGBQUAD {
-	int rgBlue; // BYTE
-	int rgbGreen; // BYTE
-	int rgbRed; // BYTE
-	int rgbReserved; // BYTE
-}
-static class BITMAPINFO {
-	BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
-	RGBQUAD[] bmiColors = null;
-}
-static void read(RandomAccessFile raf, BITMAPINFOHEADER bih) throws IOException {
-	bih.biSize = read4(raf);
-	bih.biWidth = read4(raf);
-	bih.biHeight = read4(raf);
-	bih.biPlanes = readU2(raf);
-	bih.biBitCount = readU2(raf);
-	bih.biCompression = read4(raf);
-	bih.biSizeImage = read4(raf);
-	bih.biXPelsPerMeter = read4(raf);
-	bih.biYPelsPerMeter = read4(raf);
-	bih.biClrUsed = read4(raf);
-	bih.biClrImportant = read4(raf);
-}
-static void read(RandomAccessFile raf, BITMAPINFO bi) throws IOException {
-	read(raf, bi.bmiHeader);
-}
-/* Little Endian helpers */
-static int readU2(RandomAccessFile raf) throws IOException {
-	int b0 = raf.readByte() & 0xFF;
-	int b1 = raf.readByte() & 0xFF;
-	return (b1 << 8 | b0);
-}
-static int read4(RandomAccessFile raf) throws IOException {
-	int b0 = raf.readByte() & 0xFF;;
-	int b1 = raf.readByte() & 0xFF;;
-	int b2 = raf.readByte() & 0xFF;;
-	int b3 = raf.readByte() & 0xFF;;
-	return b3 << 24 | b2 << 16 | b1 << 8 | b0;
-}
-static void write4(RandomAccessFile raf, int value) throws IOException {
-	raf.write(value & 0xFF);
-	raf.write((value >> 8) & 0xFF);
-	raf.write((value >> 16) & 0xFF);
-	raf.write((value >> 24) & 0xFF);
-}
-static void writeU2(RandomAccessFile raf, int value) throws IOException {
-	raf.write(value & 0xFF);
-	raf.write((value >> 8) & 0xFF);
-}
-static void read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) throws IOException {
-	idh.e_magic = readU2(raf);
-	idh.e_cblp = readU2(raf);
-	idh.e_cp = readU2(raf);
-	idh.e_crlc = readU2(raf);
-	idh.e_cparhdr = readU2(raf);
-	idh.e_minalloc = readU2(raf);
-	idh.e_maxalloc = readU2(raf);
-	idh.e_ss = readU2(raf);
-	idh.e_sp = readU2(raf);
-	idh.e_csum = readU2(raf);
-	idh.e_ip = readU2(raf);
-	idh.e_cs = readU2(raf);
-	idh.e_lfarlc = readU2(raf);
-	idh.e_ovno = readU2(raf);
-	for (int i = 0; i < idh.e_res.length; i++) idh.e_res[i] = readU2(raf);
-	idh.e_oemid = readU2(raf);
-	idh.e_oeminfo = readU2(raf);
-	for (int i = 0; i < idh.e_res2.length; i++) idh.e_res2[i] = readU2(raf);
-	idh.e_lfanew = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) throws IOException {
-	ifh.Machine = readU2(raf);
-	ifh.NumberOfSections = readU2(raf);
-	ifh.TimeDateStamp = read4(raf);
-	ifh.PointerToSymbolTable = read4(raf);
-	ifh.NumberOfSymbols = read4(raf);
-	ifh.SizeOfOptionalHeader = readU2(raf);
-	ifh.Characteristics  = readU2(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) throws IOException {
-	idd.VirtualAddress = read4(raf);
-	idd.Size = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) throws IOException {
-	ioh.Magic = readU2(raf);
-	ioh.MajorLinkerVersion = raf.read();
-	ioh.MinorLinkerVersion = raf.read();
-	ioh.SizeOfCode = read4(raf);
-	ioh.SizeOfInitializedData = read4(raf);
-	ioh.SizeOfUninitializedData = read4(raf);
-	ioh.AddressOfEntryPoint = read4(raf);
-	ioh.BaseOfCode = read4(raf);
-	ioh.BaseOfData = read4(raf);
-	ioh.ImageBase = read4(raf);
-	ioh.SectionAlignment = read4(raf);
-	ioh.FileAlignment = read4(raf);
-	ioh.MajorOperatingSystemVersion = readU2(raf);
-	ioh.MinorOperatingSystemVersion = readU2(raf);
-	ioh.MajorImageVersion = readU2(raf);
-	ioh.MinorImageVersion = readU2(raf);
-	ioh.MajorSubsystemVersion = readU2(raf);
-	ioh.MinorSubsystemVersion = readU2(raf);
-	ioh.Win32VersionValue = read4(raf);
-	ioh.SizeOfImage = read4(raf);
-	ioh.SizeOfHeaders = read4(raf);
-	ioh.CheckSum = read4(raf);
-	ioh.Subsystem = readU2(raf);
-	ioh.DllCharacteristics = readU2(raf);
-	ioh.SizeOfStackReserve = read4(raf);
-	ioh.SizeOfStackCommit = read4(raf);
-	ioh.SizeOfHeapReserve = read4(raf);
-	ioh.SizeOfHeapCommit = read4(raf);
-	ioh.LoaderFlags = read4(raf);
-	ioh.NumberOfRvaAndSizes = read4(raf);
-	for (int i = 0 ; i < ioh.DataDirectory.length; i++) {
-		ioh.DataDirectory[i] = new IMAGE_DATA_DIRECTORY();
-		read(raf, ioh.DataDirectory[i]);
-	}
-}
-static void read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) throws IOException {
-	inh.Signature = read4(raf);
-	read(raf, inh.FileHeader);
-	read(raf, inh.OptionalHeader);
-}
-static void read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) throws IOException {
-	for (int i = 0 ; i < ish.Name.length; i++) ish.Name[i] = raf.read();
-	ish.Misc_VirtualSize = read4(raf);
-	ish.VirtualAddress = read4(raf);
-	ish.SizeOfRawData = read4(raf);
-	ish.PointerToRawData = read4(raf);
-	ish.PointerToRelocations = read4(raf);
-	ish.PointerToLinenumbers = read4(raf);
-	ish.NumberOfRelocations = readU2(raf);
-	ish.NumberOfLinenumbers = readU2(raf);
-	ish.Characteristics = read4(raf);
-}
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) throws IOException {
-	ird.Characteristics = read4(raf);
-	ird.TimeDateStamp = read4(raf);
-	ird.MajorVersion = readU2(raf);
-	ird.MinorVersion = readU2(raf);
-	ird.NumberOfNamedEntries = readU2(raf);
-	ird.NumberOfIdEntries = readU2(raf);
-};
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) throws IOException {
-	irde.Name = read4(raf);
-	irde.OffsetToData = read4(raf);
-	// construct other union members
-	irde.NameOffset = irde.Name & ~ (1 << 31);
-	irde.NameIsString = (irde.Name & (1 << 31)) != 0;
-	irde.Id = irde.Name & 0xFFFF;
-	irde.OffsetToDirectory = irde.OffsetToData & ~ (1 << 31);
-	irde.DataIsDirectory = (irde.OffsetToData & (1 << 31)) != 0;
-}
-static void read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) throws IOException {
-	irde.OffsetToData = read4(raf);
-	irde.Size = read4(raf);
-	irde.CodePage = read4(raf);
-	irde.Reserved = read4(raf);
-}
-static void read(RandomAccessFile raf, NEWHEADER nh) throws IOException {
-	nh.Reserved = readU2(raf);
-	nh.ResType = readU2(raf);
-	nh.ResCount = readU2(raf);
-}
-static void read(RandomAccessFile raf, ICONRESDIR i) throws IOException {
-	i.Width = raf.read();
-	i.Height = raf.read();
-	i.ColorCount = raf.read();
-	i.reserved = raf.read();
-}
-static void read(RandomAccessFile raf, CURSORDIR c) throws IOException {
-	c.Width = readU2(raf);
-	c.Height = readU2(raf);
-}
-static void read(RandomAccessFile raf, RESDIR rs) throws IOException {
-	long start = raf.getFilePointer();
-	read(raf, rs.Icon);
-	raf.seek(start);
-	read(raf, rs.Cursor);
-	rs.Planes = readU2(raf);
-	rs.BitCount = readU2(raf);
-	rs.BytesInRes = read4(raf);
-	rs.IconCursorId = readU2(raf);
-}
-
-/* ImageData and Image Decoder inlining to avoid dependency on SWT 
- * The following section can be entirely removed if SWT can be used.
- */
-
-static class RGB {
-	
-	/**
-	 * the red component of the RGB
-	 */
-	public int red;
-	
-	/**
-	 * the green component of the RGB
-	 */
-	public int green;
-	
-	/**
-	 * the blue component of the RGB
-	 */
-	public int blue;
-	
-	static final long serialVersionUID = 3258415023461249074L;
-	
-/**
- * Constructs an instance of this class with the given
- * red, green and blue values.
- *
- * @param red the red component of the new instance
- * @param green the green component of the new instance
- * @param blue the blue component of the new instance
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
- * </ul>
- */
-public RGB(int red, int green, int blue) {
-	if ((red > 255) || (red < 0) ||
-		(green > 255) || (green < 0) ||
-		(blue > 255) || (blue < 0))
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	this.red = red;
-	this.green = green;
-	this.blue = blue;
-}
-
-/**
- * Compares the argument to the receiver, and returns true
- * if they represent the <em>same</em> object using a class
- * specific comparison.
- *
- * @param object the object to compare with this object
- * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise
- *
- * @see #hashCode()
- */
-public boolean equals (Object object) {
-	if (object == this) return true;
-	if (!(object instanceof RGB)) return false;
-	RGB rgb = (RGB)object;
-	return (rgb.red == this.red) && (rgb.green == this.green) && (rgb.blue == this.blue);
-}
-
-/**
- * Returns an integer hash code for the receiver. Any two 
- * objects which return <code>true</code> when passed to 
- * <code>equals</code> must return the same value for this
- * method.
- *
- * @return the receiver's hash
- *
- * @see #equals(Object)
- */
-public int hashCode () {
-	return (blue << 16) | (green << 8) | red;
-}
-
-/**
- * Returns a string containing a concise, human-readable
- * description of the receiver.
- *
- * @return a string representation of the <code>RGB</code>
- */
-public String toString () {
-	return "RGB {" + red + ", " + green + ", " + blue + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ 
-
-//$NON-NLS-4$
-}
-
-}
-static class PaletteData {
-	
-	/**
-	 * true if the receiver is a direct palette, 
-	 * and false otherwise
-	 */
-	public boolean isDirect;
-	
-	/**
-	 * the RGB values for an indexed palette, where the
-	 * indices of the array correspond to pixel values
-	 */
-	public RGB[] colors;
-	
-	/**
-	 * the red mask for a direct palette
-	 */
-	public int redMask;
-	
-	/**
-	 * the green mask for a direct palette
-	 */
-	public int greenMask;
-	
-	/**
-	 * the blue mask for a direct palette
-	 */
-	public int blueMask;
-	
-	/**
-	 * the red shift for a direct palette
-	 */
-	public int redShift;
-	
-	/**
-	 * the green shift for a direct palette
-	 */
-	public int greenShift;
-	
-	/**
-	 * the blue shift for a direct palette
-	 */
-	public int blueShift;
-
-/**
- * Constructs a new indexed palette given an array of RGB values.
- *
- * @param colors the array of <code>RGB</code>s for the palette
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public PaletteData(RGB[] colors) {
-	if (colors == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	this.colors = colors;
-	this.isDirect = false;
-}
-
-/**
- * Constructs a new direct palette given the red, green and blue masks.
- *
- * @param redMask the red mask
- * @param greenMask the green mask
- * @param blueMask the blue mask
- */
-public PaletteData(int redMask, int greenMask, int blueMask) {
-	this.redMask = redMask;
-	this.greenMask = greenMask;
-	this.blueMask = blueMask;
-	this.isDirect = true;
-	this.redShift = shiftForMask(redMask);
-	this.greenShift = shiftForMask(greenMask);
-	this.blueShift = shiftForMask(blueMask);
-}
-
-/**
- * Returns the pixel value corresponding to the given <code>RBG</code>.
- *
- * @param rgb the RGB to get the pixel value for
- * @return the pixel value for the given RGB
- * 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the RGB is not found in the palette</li>
- * </ul>
- */
-public int getPixel(RGB rgb) {
-	if (rgb == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (isDirect) {
-		int pixel = 0;
-		pixel |= (redShift < 0 ? rgb.red << -redShift : rgb.red >>> redShift) & redMask;
-		pixel |= (greenShift < 0 ? rgb.green << -greenShift : rgb.green >>> greenShift) & greenMask;
-		pixel |= (blueShift < 0 ? rgb.blue << -blueShift : rgb.blue >>> blueShift) & blueMask;
-		return pixel;
-	} else {
-		for (int i = 0; i < colors.length; i++) {
-			if (colors[i].equals(rgb)) return i;
-		}
-		/* The RGB did not exist in the palette */
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-		return 0;
-	}
-}
-
-/**
- * Returns an <code>RGB</code> corresponding to the given pixel value.
- *
- * @param pixel the pixel to get the RGB value for
- * @return the RGB value for the given pixel
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the pixel does not exist in the palette</li>
- * </ul>
- */
-public RGB getRGB(int pixel) {
-	if (isDirect) {
-		int r = pixel & redMask;
-		r = (redShift < 0) ? r >>> -redShift : r << redShift;
-		int g = pixel & greenMask;
-		g = (greenShift < 0) ? g >>> -greenShift : g << greenShift;
-		int b = pixel & blueMask;
-		b = (blueShift < 0) ? b >>> -blueShift : b << blueShift;
-		return new RGB(r, g, b);
-	} else {
-		if (pixel < 0 || pixel >= colors.length) {
-			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-		}
-		return colors[pixel];
-	}
-}
-
-/**
- * Returns all the RGB values in the receiver if it is an
- * indexed palette, or null if it is a direct palette.
- *
- * @return the <code>RGB</code>s for the receiver or null
- */
-public RGB[] getRGBs() {
-	return colors;
-}
-
-/**
- * Computes the shift value for a given mask.
- *
- * @param mask the mask to compute the shift for
- * @return the shift amount
- *
- * @see PaletteData
- */
-int shiftForMask(int mask) {
-	for (int i = 31; i >= 0; i--) { 
-		if (((mask >> i) & 0x1) != 0) return 7 - i;
-	}
-	return 32;
-}
-
-}
-static class ImageLoader {
-	
-	/**
-	 * the array of ImageData objects in this ImageLoader.
-	 * This array is read in when the load method is called,
-	 * and it is written out when the save method is called
-	 */
-	public ImageData[] data;
-	
-	/**
-	 * the width of the logical screen on which the images
-	 * reside, in pixels (this corresponds to the GIF89a
-	 * Logical Screen Width value)
-	 */
-	public int logicalScreenWidth;
-
-	/**
-	 * the height of the logical screen on which the images
-	 * reside, in pixels (this corresponds to the GIF89a
-	 * Logical Screen Height value)
-	 */
-	public int logicalScreenHeight;
-
-	/**
-	 * the background pixel for the logical screen (this 
-	 * corresponds to the GIF89a Background Color Index value).
-	 * The default is -1 which means 'unspecified background'
-	 * 
-	 */
-	public int backgroundPixel;
-
-	/**
-	 * the number of times to repeat the display of a sequence
-	 * of animated images (this corresponds to the commonly-used
-	 * GIF application extension for "NETSCAPE 2.0 01")
-	 */
-	public int repeatCount;
-		
-	/*
-	 * the set of ImageLoader event listeners, created on demand
-	 */
-	Vector imageLoaderListeners;
-
-/**
- * Construct a new empty ImageLoader.
- */
-public ImageLoader() {
-	reset();
-}
-
-/**
- * Resets the fields of the ImageLoader, except for the
- * <code>imageLoaderListeners</code> field.
- */
-void reset() {
-	data = null;
-	logicalScreenWidth = 0;
-	logicalScreenHeight = 0;
-	backgroundPixel = -1;
-	repeatCount = 1;
-}
-
-/**
- * Loads an array of <code>ImageData</code> objects from the
- * specified input stream. Throws an error if either an error
- * occurs while loading the images, or if the images are not
- * of a supported type. Returns the loaded image data array.
- *
- * @param stream the input stream to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified input stream
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO - if an input/output error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData[] load(InputStream stream) {
-	if (stream == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	reset();
-	data = FileFormat.load(stream, this);
-	return data;
-}
-
-/**
- * Loads an array of <code>ImageData</code> objects from the
- * file with the specified name. Throws an error if either
- * an error occurs while loading the images, or if the images are
- * not of a supported type. Returns the loaded image data array.
- *
- * @param filename the name of the file to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified file
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO - if an IO error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData[] load(String filename) {
-	if (filename == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	InputStream stream = null;
-	try {
-		stream = new FileInputStream(filename);
-		return load(stream);
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	} finally {
-		try {
-			if (stream != null) stream.close();
-		} catch (IOException e) {
-			// Ignore error
-		}
-	}
-	return null;
-}
-}
-static class ImageData {
-	
-	/**
-	 * The width of the image, in pixels.
-	 */
-	public int width;
-
-	/**
-	 * The height of the image, in pixels.
-	 */
-	public int height;
-
-	/**
-	 * The color depth of the image, in bits per pixel.
-	 * <p>
-	 * Note that a depth of 8 or less does not necessarily
-	 * mean that the image is palette indexed, or
-	 * conversely that a depth greater than 8 means that
-	 * the image is direct color.  Check the associated
-	 * PaletteData's isDirect field for such determinations.
-	 */
-	public int depth;
-
-	/**
-	 * The scanline padding.
-	 * <p>
-	 * If one scanline of the image is not a multiple of
-	 * this number, it will be padded with zeros until it is.
-	 * </p>
-	 */
-	public int scanlinePad;
-
-	/**
-	 * The number of bytes per scanline.
-	 * <p>
-	 * This is a multiple of the scanline padding.
-	 * </p>
-	 */
-	public int bytesPerLine;
-
-	/**
-	 * The pixel data of the image.
-	 * <p>
-	 * Note that for 16 bit depth images the pixel data is stored
-	 * in least significant byte order; however, for 24bit and
-	 * 32bit depth images the pixel data is stored in most
-	 * significant byte order.
-	 * </p>
-	 */
-	public byte[] data;
-
-	/**
-	 * The color table for the image.
-	 */
-	public PaletteData palette;
-
-	/**
-	 * The transparent pixel.
-	 * <p>
-	 * Pixels with this value are transparent.
-	 * </p><p>
-	 * The default is -1 which means 'no transparent pixel'.
-	 * </p>
-	 */
-	public int transparentPixel;
-
-	/**
-	 * An icon-specific field containing the data from the icon mask.
-	 * <p>
-	 * This is a 1 bit bitmap stored with the most significant
-	 * bit first.  The number of bytes per scanline is
-	 * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.
-	 * </p><p>
-	 * The default is null which means 'no transparency mask'.
-	 * </p>
-	 */
-	public byte[] maskData;
-
-	/**
-	 * An icon-specific field containing the scanline pad of the mask.
-	 * <p>
-	 * If one scanline of the transparency mask is not a
-	 * multiple of this number, it will be padded with zeros until
-	 * it is.
-	 * </p>
-	 */
-	public int maskPad;
-	
-	/**
-	 * The alpha data of the image.
-	 * <p>
-	 * Every pixel can have an <em>alpha blending</em> value that
-	 * varies from 0, meaning fully transparent, to 255 meaning
-	 * fully opaque.  The number of bytes per scanline is
-	 * 'width'.
-	 * </p>
-	 */
-	public byte[] alphaData;
-	
-	/**
-	 * The global alpha value to be used for every pixel.
-	 * <p>
-	 * If this value is set, the <code>alphaData</code> field
-	 * is ignored and when the image is rendered each pixel
-	 * will be blended with the background an amount
-	 * proportional to this value.
-	 * </p><p>
-	 * The default is -1 which means 'no global alpha value'
-	 * </p>
-	 */
-	public int alpha;
-
-	/**
-	 * The type of file from which the image was read.
-	 * 
-	 * It is expressed as one of the following values:
-	 * <dl>
-	 * <dt><code>IMAGE_BMP</code></dt>
-	 * <dd>Windows BMP file format, no compression</dd>
-	 * <dt><code>IMAGE_BMP_RLE</code></dt>
-	 * <dd>Windows BMP file format, RLE compression if appropriate</dd>
-	 * <dt><code>IMAGE_GIF</code></dt>
-	 * <dd>GIF file format</dd>
-	 * <dt><code>IMAGE_ICO</code></dt>
-	 * <dd>Windows ICO file format</dd>
-	 * <dt><code>IMAGE_JPEG</code></dt>
-	 * <dd>JPEG file format</dd>
-	 * <dt><code>IMAGE_PNG</code></dt>
-	 * <dd>PNG file format</dd>
-	 * </dl>
-	 */
-	public int type;
-
-	/**
-	 * The x coordinate of the top left corner of the image
-	 * within the logical screen (this field corresponds to
-	 * the GIF89a Image Left Position value).
-	 */
-	public int x;
-
-	/**
-	 * The y coordinate of the top left corner of the image
-	 * within the logical screen (this field corresponds to
-	 * the GIF89a Image Top Position value).
-	 */
-	public int y;
-
-	/**
-	 * A description of how to dispose of the current image
-	 * before displaying the next.
-	 * 
-	 * It is expressed as one of the following values:
-	 * <dl>
-	 * <dt><code>DM_UNSPECIFIED</code></dt>
-	 * <dd>disposal method not specified</dd>
-	 * <dt><code>DM_FILL_NONE</code></dt>
-	 * <dd>do nothing - leave the image in place</dd>
-	 * <dt><code>DM_FILL_BACKGROUND</code></dt>
-	 * <dd>fill with the background color</dd>
-	 * <dt><code>DM_FILL_PREVIOUS</code></dt>
-	 * <dd>restore the previous picture</dd>
-	 * </dl>
-	 * (this field corresponds to the GIF89a Disposal Method value)
-	 */
-	public int disposalMethod;
-
-	/**
-	 * The time to delay before displaying the next image
-	 * in an animation (this field corresponds to the GIF89a
-	 * Delay Time value).
-	 */
-	public int delayTime;
-
-	/**
-	 * Arbitrary channel width data to 8-bit conversion table.
-	 */
-	static final byte[][] ANY_TO_EIGHT = new byte[9][];
-	static {
-		for (int b = 0; b < 9; ++b) {
-			byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
-			if (b == 0) continue;
-			int inc = 0;
-			for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;
-			for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = (byte)(v >> 8);
-		}
-	}
-	static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
-
-	/**
-	 * Scaled 8x8 Bayer dither matrix.
-	 */
-	static final int[][] DITHER_MATRIX = {
-		{ 0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000 },
-		{ 0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000 },
-		{ 0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000 },
-		{ 0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000 },
-		{ 0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000 },
-		{ 0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000 },
-		{ 0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000 },
-		{ 0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000 }
-	};
-
-/**
- * Constructs a new, empty ImageData with the given width, height,
- * depth and palette. The data will be initialized to an (all zero)
- * array of the appropriate size.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
- *    <li>ERROR_NULL_ARGUMENT - if the palette is null</li>
- * </ul>
- */
-public ImageData(int width, int height, int depth, PaletteData palette) {
-	this(width, height, depth, palette,
-		4, null, 0, null,
-		null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-}
-
-/**
- * Constructs a new, empty ImageData with the given width, height,
- * depth, palette, scanlinePad and data.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image
- * @param scanlinePad the padding of each line, in bytes
- * @param data the data of the image
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- *        	one of 1, 2, 4, 8, 16, 24 or 32</li>
- *    <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li>
- *    <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li>
- * </ul>
- */
-public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {
-	this(width, height, depth, palette,
-		scanlinePad, checkData(data), 0, null,
-		null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-}
-
-/**
- * Constructs an <code>ImageData</code> loaded from a file with the
- * specified name. Throws an error if an error occurs loading the
- * image, or if the image has an unsupported type.
- * <p>
- * This constructor is provided for convenience when loading a single
- * image only. If the file contains multiple images, only the first
- * one will be loaded. To load multiple images, use 
- * <code>ImageLoader.load()</code>.
- * </p>
- *
- * @param filename the name of the file to load the image from (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- *    <li>ERROR_IO if an IO error occurs while reading data</li>
- *    <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
-public ImageData(String filename) {
-	ImageData[] data = new ImageLoader().load(filename);
-	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);
-	ImageData i = data[0];
-	setAllFields(
-		i.width,
-		i.height,
-		i.depth,
-		i.scanlinePad,
-		i.bytesPerLine,
-		i.data,
-		i.palette,
-		i.transparentPixel,
-		i.maskData,
-		i.maskPad,
-		i.alphaData,
-		i.alpha,
-		i.type,
-		i.x,
-		i.y,
-		i.disposalMethod,
-		i.delayTime);
-}
-
-/**
- * Prevents uninitialized instances from being created outside the package.
- */
-ImageData() {
-}
-
-/**
- * Constructs an image data by giving values for all non-computable fields.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-ImageData(
-	int width, int height, int depth, PaletteData palette,
-	int scanlinePad, byte[] data, int maskPad, byte[] maskData,
-	byte[] alphaData, int alpha, int transparentPixel, int type,
-	int x, int y, int disposalMethod, int delayTime)
-{
-
-	if (palette == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8
-		|| depth == 16 || depth == 24 || depth == 32)) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	}
-	if (width <= 0 || height <= 0) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	}
-	if (scanlinePad == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);
-
-	int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1))
-		/ scanlinePad * scanlinePad;
-	setAllFields(
-		width,
-		height,
-		depth,
-		scanlinePad,
-		bytesPerLine,
-		data != null ? data : new byte[bytesPerLine * height],
-		palette,
-		transparentPixel,
-		maskData,
-		maskPad,
-		alphaData,
-		alpha,
-		type,
-		x,
-		y,
-		disposalMethod,
-		delayTime);
-}
-
-/**
- * Initializes all fields in the receiver. This method must be called
- * by all public constructors to ensure that all fields are initialized
- * for a new ImageData object. If a new field is added to the class,
- * then it must be added to this method.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-void setAllFields(int width, int height, int depth, int scanlinePad,
-	int bytesPerLine, byte[] data, PaletteData palette, int transparentPixel,
-	byte[] maskData, int maskPad, byte[] alphaData, int alpha,
-	int type, int x, int y, int disposalMethod, int delayTime) {
-
-	this.width = width;
-	this.height = height;
-	this.depth = depth;
-	this.scanlinePad = scanlinePad;
-	this.bytesPerLine = bytesPerLine;
-	this.data = data;
-	this.palette = palette;
-	this.transparentPixel = transparentPixel;
-	this.maskData = maskData;
-	this.maskPad = maskPad;
-	this.alphaData = alphaData;
-	this.alpha = alpha;
-	this.type = type;
-	this.x = x;
-	this.y = y;
-	this.disposalMethod = disposalMethod;
-	this.delayTime = delayTime;
-}
-
-/**	 
- * Invokes internal SWT functionality to create a new instance of
- * this class.
- * <p>
- * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- * API for <code>ImageData</code>. It is marked public only so that it
- * can be shared within the packages provided by SWT. It is subject
- * to change without notice, and should never be called from
- * application code.
- * </p>
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
-public static ImageData internal_new(
-	int width, int height, int depth, PaletteData palette,
-	int scanlinePad, byte[] data, int maskPad, byte[] maskData,
-	byte[] alphaData, int alpha, int transparentPixel, int type,
-	int x, int y, int disposalMethod, int delayTime)
-{
-	return new ImageData(
-		width, height, depth, palette, scanlinePad, data, maskPad, maskData,
-		alphaData, alpha, transparentPixel, type, x, y, disposalMethod, delayTime);
-}
-
-ImageData colorMaskImage(int pixel) {
-	ImageData mask = new ImageData(width, height, 1, bwPalette(),
-		2, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED,
-		0, 0, 0, 0);
-	int[] row = new int[width];
-	for (int y = 0; y < height; y++) {
-		getPixels(0, y, width, row, 0);
-		for (int i = 0; i < width; i++) {
-			if (pixel != -1 && row[i] == pixel) {
-				row[i] = 0;
-			} else {
-				row[i] = 1;
-			}
-		}
-		mask.setPixels(0, y, width, row, 0);
-	}
-	return mask;
-}
-
-static byte[] checkData(byte [] data) {
-	if (data == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	return data;
-}
-
-/**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the byte array to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4 or 8
- *        (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
-public void getPixels(int x, int y, int getWidth, byte[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error
-
-(SWT.ERROR_INVALID_ARGUMENT);
-	if (getWidth == 0) return;
-	int index;
-	int theByte;
-	int mask = 0;
-	int n = getWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		theByte = data[index] & 0xFF;
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((theByte & mask) == 0) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-					if (n > 0) theByte = data[index] & 0xFF;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 2) {
-		index = (y * bytesPerLine) + (x >> 2);
-		theByte = data[index] & 0xFF;
-		int offset;
-		while (n > 0) {
-			offset = 3 - (srcX % 4);
-			mask = 3 << (offset * 2);
-			pixels[i] = (byte)((theByte & mask) >> (offset * 2));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					theByte = data[index] & 0xFF;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		if ((x & 0x1) == 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte & 0x0F);
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		while (n > 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte >> 4);
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				pixels[i] = (byte)(theByte & 0x0F);
-				i++;
-				n--;
-				srcX++;
-				if (srcX >= width) {
-					srcY++;
-					index = srcY * bytesPerLine;
-					srcX = 0;
-				} else {
-					index++;
-				}
-			}
-		}
-		if (n > 0) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = (byte)(theByte >> 4);
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = data[index];
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
-
-/**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the buffer to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
-public void getPixels(int x, int y, int getWidth, int[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error
-
-(SWT.ERROR_INVALID_ARGUMENT);
-	if (getWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = getWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		theByte = data[index] & 0xFF;
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((theByte & mask) == 0) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-					if (n > 0) theByte = data[index] & 0xFF;
-				}
-			}
-		}
-		return;
-	}		
-	if (depth == 2) {
-		index = (y * bytesPerLine) + (x >> 2);
-		theByte = data[index] & 0xFF;
-		int offset;
-		while (n > 0) {
-			offset = 3 - (srcX % 4);
-			mask = 3 << (offset * 2);
-			pixels[i] = (byte)((theByte & mask) >> (offset * 2));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				if (n > 0) theByte = data[index] & 0xFF;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					theByte = data[index] & 0xFF;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		if ((x & 0x1) == 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte & 0x0F;
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		while (n > 1) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte >> 4;
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				pixels[i] = theByte & 0x0F;
-				i++;
-				n--;
-				srcX++;
-				if (srcX >= width) {
-					srcY++;
-					index = srcY * bytesPerLine;
-					srcX = 0;
-				} else {
-					index++;
-				}
-			}
-		}
-		if (n > 0) {
-			theByte = data[index] & 0xFF;
-			pixels[i] = theByte >> 4;
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = data[index] & 0xFF;
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		return;
-	}
-	if (depth == 16) {
-		index = (y * bytesPerLine) + (x * 2);
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index+1] & 0xFF) << 8) + (data[index] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 2;
-			}
-		}
-		return;
-	}
-	if (depth == 24) {
-		index = (y * bytesPerLine) + (x * 3);
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index] & 0xFF) << 16) | ((data[index+1] & 0xFF) << 8)
-				| (data[index+2] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 3;
-			}
-		}
-		return;
-	}
-	if (depth == 32) {
-		index = (y * bytesPerLine) + (x * 4);
-		i = startIndex;
-		for (int j = 0; j < getWidth; j++) {
-			pixels[i] = ((data[index] & 0xFF) << 24) | ((data[index+1] & 0xFF) << 16)
-				| ((data[index+2] & 0xFF) << 8) | (data[index+3] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 4;
-			}
-		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
-
-/**
- * Returns an array of <code>RGB</code>s which comprise the
- * indexed color table of the receiver, or null if the receiver
- * has a direct color model.
- *
- * @return the RGB values for the image or null if direct color
- *
- * @see PaletteData#getRGBs()
- */
-public RGB[] getRGBs() {
-	return palette.getRGBs();
-}
-
-/**
- * Returns an <code>ImageData</code> which specifies the
- * transparency mask information for the receiver, or null if the
- * receiver has no transparency and is not an icon.
- *
- * @return the transparency mask or null if none exists
- */
-public ImageData getTransparencyMask() {
-	if (getTransparencyType() == SWT.TRANSPARENCY_MASK) {
-		return new ImageData(width, height, 1, bwPalette(), maskPad, maskData);
-	} else {
-		return colorMaskImage(transparentPixel);
-	}
-}
-
-/**
- * Returns the image transparency type.
- *
- * @return the receiver's transparency type
- */
-public int getTransparencyType() {
-	if (maskData != null) return SWT.TRANSPARENCY_MASK;
-	if (transparentPixel != -1) return SWT.TRANSPARENCY_PIXEL;
-	if (alphaData != null) return SWT.TRANSPARENCY_ALPHA;
-	return SWT.TRANSPARENCY_NONE;
-}
-
-/**
- * Returns the byte order of the receiver.
- * 
- * @return MSB_FIRST or LSB_FIRST
- */
-int getByteOrder() {
-	return depth != 16 ? MSB_FIRST : LSB_FIRST;
-}
-
-/**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8
- *        (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
-public void setPixels(int x, int y, int putWidth, byte[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	if (putWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = putWidth;
-	int i = startIndex;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((pixels[i] & 0x1) == 1) {
-				data[index] = (byte)((data[index] & 0xFF) | mask);
-			} else {
-				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 2) {
-		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };
-		index = (y * bytesPerLine) + (x >> 2);
-		int offset = 3 - (x % 4);
-		while (n > 0) {
-			theByte = pixels[i] & 0x3;
-			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				offset = 0;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					offset = 3;
-				} else {
-					offset--;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		boolean high = (x & 0x1) == 0;
-		while (n > 0) {
-			theByte = pixels[i] & 0x0F;
-			if (high) {
-				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));
-			} else {
-				data[index] = (byte)((data[index] & 0xF0) | theByte);
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				high = true;
-				srcX = 0;
-			} else {
-				if (!high) index++;
-				high = !high;
-			}
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < putWidth; j++) {
-			data[index] = (byte)(pixels[i] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
-
-/**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- *    <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception SWTException <ul>
- *    <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
-public void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex) {
-	if (pixels == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-	if (putWidth == 0) return;
-	int index;
-	int theByte;
-	int mask;
-	int n = putWidth;
-	int i = startIndex;
-	int pixel;
-	int srcX = x, srcY = y;
-	if (depth == 1) {
-		index = (y * bytesPerLine) + (x >> 3);
-		while (n > 0) {
-			mask = 1 << (7 - (srcX & 0x7));
-			if ((pixels[i] & 0x1) == 1) {
-				data[index] = (byte)((data[index] & 0xFF) | mask);
-			} else {
-				data[index] = (byte)((data[index] & 0xFF) & (mask ^ -1));
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				if (mask == 1) {
-					index++;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 2) {
-		byte [] masks = { (byte)0xFC, (byte)0xF3, (byte)0xCF, (byte)0x3F };
-		index = (y * bytesPerLine) + (x >> 2);
-		int offset = 3 - (x % 4);
-		while (n > 0) {
-			theByte = pixels[i] & 0x3;
-			data[index] = (byte)((data[index] & masks[offset]) | (theByte << (offset * 2)));
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				offset = 3;
-				srcX = 0;
-			} else {
-				if (offset == 0) {
-					index++;
-					offset = 3;
-				} else {
-					offset--;
-				}
-			}
-		}
-		return;
-	}
-	if (depth == 4) {
-		index = (y * bytesPerLine) + (x >> 1);
-		boolean high = (x & 0x1) == 0;
-		while (n > 0) {
-			theByte = pixels[i] & 0x0F;
-			if (high) {
-				data[index] = (byte)((data[index] & 0x0F) | (theByte << 4));
-			} else {
-				data[index] = (byte)((data[index] & 0xF0) | theByte);
-			}
-			i++;
-			n--;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				high = true;
-				srcX = 0;
-			} else {
-				if (!high) index++;
-				high = !high;
-			}
-		}
-		return;
-	}
-	if (depth == 8) {
-		index = (y * bytesPerLine) + x;
-		for (int j = 0; j < putWidth; j++) {
-			data[index] = (byte)(pixels[i] & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index++;
-			}
-		}
-		return;
-
-	}
-	if (depth == 16) {
-		index = (y * bytesPerLine) + (x * 2);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)(pixel & 0xFF);
-			data[index + 1] = (byte)((pixel >> 8) & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 2;
-			}
-		}
-		return;
-	}
-	if (depth == 24) {
-		index = (y * bytesPerLine) + (x * 3);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)((pixel >> 16) & 0xFF);
-			data[index + 1] = (byte)((pixel >> 8) & 0xFF);
-			data[index + 2] = (byte)(pixel & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 3;
-			}
-		}
-		return;
-	}
-	if (depth == 32) {
-		index = (y * bytesPerLine) + (x * 4);
-		for (int j = 0; j < putWidth; j++) {
-			pixel = pixels[i];
-			data[index] = (byte)((pixel >> 24) & 0xFF);
-			data[index + 1] = (byte)((pixel >> 16) & 0xFF);
-			data[index + 2] = (byte)((pixel >> 8) & 0xFF);
-			data[index + 3] = (byte)(pixel & 0xFF);
-			i++;
-			srcX++;
-			if (srcX >= width) {
-				srcY++;
-				index = srcY * bytesPerLine;
-				srcX = 0;
-			} else {
-				index += 4;
-			}
-		}
-		return;
-	}
-	SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
-}
-
-/**
- * Returns a palette with 2 colors: black & white.
- */
-static PaletteData bwPalette() {
-	return new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
-}
-
-/**
- * Gets the offset of the most significant bit for
- * the given mask.
- */
-static int getMSBOffset(int mask) {
-	for (int i = 31; i >= 0; i--) {
-		if (((mask >> i) & 0x1) != 0) return i + 1;
-	}
-	return 0;
-}
-
-/**
- * Finds the closest match.
- */
-static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues) {
-	if (depth > 8) {
-		int rshift = 32 - getMSBOffset(redMask);
-		int gshift = 32 - getMSBOffset(greenMask);
-		int bshift = 32 - getMSBOffset(blueMask);
-		return (((red << 24) >>> rshift) & redMask) |
-			(((green << 24) >>> gshift) & greenMask) |
-			(((blue << 24) >>> bshift) & blueMask);
-	}
-	int r, g, b;
-	int minDistance = 0x7fffffff;
-	int nearestPixel = 0;
-	int n = reds.length;
-	for (int j = 0; j < n; j++) {
-		r = (reds[j] & 0xFF) - (red & 0xFF);
-		g = (greens[j] & 0xFF) - (green & 0xFF);
-		b = (blues[j] & 0xFF) - (blue & 0xFF);
-		int distance = r*r + g*g + b*b;
-		if (distance < minDistance) {
-			nearestPixel = j;
-			if (distance == 0) break;
-			minDistance = distance;
-		}
-	}
-	return nearestPixel;
-}
-
-static final ImageData convertMask(ImageData mask) {
-	if (mask.depth == 1) return mask;
-	PaletteData palette = new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255,255,255)});
-	ImageData newMask = new ImageData(mask.width, mask.height, 1, palette);
-	/* Find index of black in mask palette */
-	int blackIndex = 0;
-	RGB[] rgbs = mask.getRGBs();
-	if (rgbs != null) {
-		while (blackIndex < rgbs.length) {
-			if (rgbs[blackIndex].equals(palette.colors[0])) break;
-			blackIndex++;
-		}
-	}
-	int[] pixels = new int[mask.width];
-	for (int y = 0; y < mask.height; y++) {
-		mask.getPixels(0, y, mask.width, pixels, 0);
-		for (int i = 0; i < pixels.length; i++) {
-			if (pixels[i] == blackIndex) {
-				pixels[i] = 0;
-			} else {
-				pixels[i] = 1;
-			}
-		}
-		newMask.setPixels(0, y, mask.width, pixels, 0);
-	}
-	return newMask;
-}
-
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;	
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, stride);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
-
-/**
- * Blit operation bits to be OR'ed together to specify the desired operation.
- */
-static final int
-	BLIT_SRC = 1,     // copy source directly, else applies logic operations
-	BLIT_ALPHA = 2,   // enable alpha blending
-	BLIT_DITHER = 4;  // enable dithering in low color modes
-
-/**
- * Alpha mode, values 0 - 255 specify global alpha level
- */
-static final int
-	ALPHA_OPAQUE = 255,           // Fully opaque (ignores any alpha data)
-	ALPHA_TRANSPARENT = 0,        // Fully transparent (ignores any alpha data)
-	ALPHA_CHANNEL_SEPARATE = -1,  // Use alpha channel from separate alphaData
-	ALPHA_CHANNEL_SOURCE = -2,    // Use alpha channel embedded in sourceData
-	ALPHA_MASK_UNPACKED = -3,     // Use transparency mask formed by bytes in alphaData (non-zero is opaque)
-	ALPHA_MASK_PACKED = -4,       // Use transparency mask formed by packed bits in alphaData
-	ALPHA_MASK_INDEX = -5,        // Consider source palette indices transparent if in alphaData array
-	ALPHA_MASK_RGB = -6;          // Consider source RGBs transparent if in RGB888 format alphaData array
-
-/**
- * Byte and bit order constants.
- */
-static final int LSB_FIRST = 0;
-static final int MSB_FIRST = 1;
-
-/**
- * Data types (internal)
- */
-//private static final int
-//	// direct / true color formats with arbitrary masks & shifts
-//	TYPE_GENERIC_8 = 0,
-//	TYPE_GENERIC_16_MSB = 1,
-//	TYPE_GENERIC_16_LSB = 2,
-//	TYPE_GENERIC_24 = 3,
-//	TYPE_GENERIC_32_MSB = 4,
-//	TYPE_GENERIC_32_LSB = 5,
-//	// palette indexed color formats
-//	TYPE_INDEX_8 = 6,
-//	TYPE_INDEX_4 = 7,
-//	TYPE_INDEX_2 = 8,
-//	TYPE_INDEX_1_MSB = 9,
-//	TYPE_INDEX_1_LSB = 10;
-
-/**
- * Computes the required channel shift from a mask.
- */
-static int getChannelShift(int mask) {
-	if (mask == 0) return 0;
-	int i;
-	for (i = 0; ((mask & 1) == 0) && (i < 32); ++i) {
-		mask >>>= 1;
-	}
-	return i;
-}
-
-/**
- * Computes the required channel width (depth) from a mask.
- */
-static int getChannelWidth(int mask, int shift) {
-	if (mask == 0) return 0;
-	int i;
-	mask >>>= shift;
-	for (i = shift; ((mask & 1) != 0) && (i < 32); ++i) {
-		mask >>>= 1;
-	}
-	return i - shift;
-}
-
-/**
- * Extracts a field from packed RGB data given a mask for that field.
- */
-static byte getChannelField(int data, int mask) {
-	final int shift = getChannelShift(mask);
-	return ANY_TO_EIGHT[getChannelWidth(mask, shift)][(data & mask) >>> shift];
-}
-
-/* 
- * Fill in dithered gradated values for a color channel
- */
-static final void buildDitheredGradientChannel(int from, int to, int steps,
-	int bandWidth, int bandHeight, boolean vertical,
-	byte[] bitmapData, int dp, int bytesPerLine, int bits) {
-	final int mask = 0xff00 >>> bits;
-	int val = from << 16;
-	final int inc = ((to << 16) - val) / steps + 1;
-	if (vertical) {
-		for (int dy = 0; dy < bandHeight; ++dy, dp += bytesPerLine) {
-			for (int dx = 0, dptr = dp; dx < bandWidth; ++dx, dptr += 4) {
-				final int thresh = DITHER_MATRIX[dy & 7][dx] >>> bits;
-				int temp = val + thresh;
-				if (temp > 0xffffff) bitmapData[dptr] = -1;
-				else bitmapData[dptr] = (byte)((temp >>> 16) & mask);
-			}
-			val += inc;
-		}
-	} else {
-		for (int dx = 0; dx < bandWidth; ++dx, dp += 4) {
-			for (int dy = 0, dptr = dp; dy < bandHeight; ++dy, dptr += bytesPerLine) {
-				final int thresh = DITHER_MATRIX[dy][dx & 7] >>> bits;
-				int temp = val + thresh;
-				if (temp > 0xffffff) bitmapData[dptr] = -1;
-				else bitmapData[dptr] = (byte)((temp >>> 16) & mask);
-			}
-			val += inc;
-		}
-	}
-}
-}
-
-static class LEDataInputStream extends InputStream {
-	int position;
-	InputStream in;
-
-	/**
-	 * The byte array containing the bytes to read.
-	 */
-	protected byte[] buf;
-	
-	/**
-	 * The current position within the byte array <code>buf</code>. A value
-	 * equal to buf.length indicates no bytes available.  A value of
-	 * 0 indicates the buffer is full.
-	 */
-	protected int pos;
-	
-
-	public LEDataInputStream(InputStream input) {
-		this(input, 512);
-	}
-	
-	public LEDataInputStream(InputStream input, int bufferSize) {
-		this.in = input;
-		if (bufferSize > 0) {
-			buf = new byte[bufferSize];
-			pos = bufferSize;
-		} 
-		else throw new IllegalArgumentException();
-	}
-	
-	public void close() throws IOException {
-		buf = null;
-		if (in != null) {
-			in.close();
-			in = null;
-		}
-	}
-	
-	/**
-	 * Answer how many bytes were read.
-	 */
-	public int getPosition() {
-		return position;
-	}
-	
-	/**
-	 * Answers how many bytes are available for reading without blocking
-	 */
-	public int available() throws IOException {
-		if (buf == null) throw new IOException();
-		return (buf.length - pos) + in.available();
-	}
-	
-	/**
-	 * Answer the next byte of the input stream.
-	 */
-	public int read() throws IOException {
-		if (buf == null) throw new IOException();
-		position++;
-		if (pos < buf.length) return (buf[pos++] & 0xFF);
-		return in.read();
-	}
-	
-	/**
-	 * Don't imitate the JDK behaviour of reading a random number
-	 * of bytes when you can actually read them all.
-	 */
-	public int read(byte b[], int off, int len) throws IOException {
-		int result;
-		int left = len;
-		result = readData(b, off, len);
-		while (true) {
-			if (result == -1) return -1;
-			position += result;
-			if (result == left) return len;
-			left -= result;
-			off += result;
-			result = readData(b, off, left);
-		}
-	}
-	
-	/**
- 	 * Reads at most <code>length</code> bytes from this LEDataInputStream and 
- 	 * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- 	 * <p>
- 	 * Answer the number of bytes actually read or -1 if no bytes were read and 
- 	 * end of stream was encountered.  This implementation reads bytes from 
- 	 * the pushback buffer first, then the target stream if more bytes are required
- 	 * to satisfy <code>count</code>.
-	 * </p>
-	 * @param buffer the byte array in which to store the read bytes.
-	 * @param offset the offset in <code>buffer</code> to store the read bytes.
-	 * @param length the maximum number of bytes to store in <code>buffer</code>.
-	 *
-	 * @return int the number of bytes actually read or -1 if end of stream.
-	 *
-	 * @exception java.io.IOException if an IOException occurs.
-	 */
-	private int readData(byte[] buffer, int offset, int length) throws IOException {
-		if (buf == null) throw new IOException();
-		if (offset < 0 || offset > buffer.length ||
-  		 	length < 0 || (length > buffer.length - offset)) {
-	 		throw new ArrayIndexOutOfBoundsException();
-		 	}
-				
-		int cacheCopied = 0;
-		int newOffset = offset;
-	
-		// Are there pushback bytes available?
-		int available = buf.length - pos;
-		if (available > 0) {
-			cacheCopied = (available >= length) ? length : available;
-			System.arraycopy(buf, pos, buffer, newOffset, cacheCopied);
-			newOffset += cacheCopied;
-			pos += cacheCopied;
-		}
-	
-		// Have we copied enough?
-		if (cacheCopied == length) return length;
-
-		int inCopied = in.read(buffer, newOffset, length - cacheCopied);
-
-		if (inCopied > 0) return inCopied + cacheCopied;
-		if (cacheCopied == 0) return inCopied;
-		return cacheCopied;
-	}
-	
-	/**
-	 * Answer an integer comprised of the next
-	 * four bytes of the input stream.
-	 */
-	public int readInt() throws IOException {
-		byte[] buf = new byte[4];
-		read(buf);
-		return ((((((buf[3] & 0xFF) << 8) | 
-			(buf[2] & 0xFF)) << 8) | 
-			(buf[1] & 0xFF)) << 8) | 
-			(buf[0] & 0xFF);
-	}
-	
-	/**
-	 * Answer a short comprised of the next
-	 * two bytes of the input stream.
-	 */
-	public short readShort() throws IOException {
-		byte[] buf = new byte[2];
-		read(buf);
-		return (short)(((buf[1] & 0xFF) << 8) | (buf[0] & 0xFF));
-	}
-	
-	/**
-	 * Push back the entire content of the given buffer <code>b</code>.
-	 * <p>
-	 * The bytes are pushed so that they would be read back b[0], b[1], etc. 
-	 * If the push back buffer cannot handle the bytes copied from <code>b</code>, 
-	 * an IOException will be thrown and no byte will be pushed back.
-	 * </p>
-	 * 
-	 * @param b the byte array containing bytes to push back into the stream
-	 *
-	 * @exception 	java.io.IOException if the pushback buffer is too small
-	 */
-	public void unread(byte[] b) throws IOException {
-		int length = b.length;
-		if (length > pos) throw new IOException();
-		position -= length;
-		pos -= length;
-		System.arraycopy(b, 0, buf, pos, length);
-	}
-}
-public static abstract class FileFormat {	
-	LEDataInputStream inputStream;
-	ImageLoader loader;
-	int compression;
-
-byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
-	// Destructively bit invert data in the given byte array.
-	for (int i = startIndex; i < endIndex; i++) {
-		data[i] = (byte)(255 - data[i - startIndex]);
-	}
-	return data;
-}
-
-/**
- * Return whether or not the specified input stream
- * represents a supported file format.
- */
-abstract boolean isFileFormat(LEDataInputStream stream);
-
-abstract ImageData[] loadFromByteStream();
-
-public ImageData[] loadFromStream(LEDataInputStream stream) {
-	try {
-		inputStream = stream;
-		return loadFromByteStream();
-	} catch (Exception e) {
-		SWT.error(SWT.ERROR_IO, e);
-		return null;
-	}
-}
-
-public static ImageData[] load(InputStream is, ImageLoader loader) {
-	LEDataInputStream stream = new LEDataInputStream(is);
-	boolean isSupported = false;	
-	FileFormat fileFormat = new WinICOFileFormat();
-	if (fileFormat.isFileFormat(stream)) isSupported = true;
-	else {
-		fileFormat = new WinBMPFileFormat();
-		if (fileFormat.isFileFormat(stream)) isSupported = true;
-	}
-	if (!isSupported) SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
-	fileFormat.loader = loader;
-	return fileFormat.loadFromStream(stream);
-}
-}
-static class WinBMPFileFormat extends FileFormat {
-	static final int BMPFileHeaderSize = 14;
-	static final int BMPHeaderFixedSize = 40;
-	int importantColors;
-
-void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
-	if (cmp == 1) { // BMP_RLE8_COMPRESSION
-		if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
-			SWT.error(SWT.ERROR_INVALID_IMAGE);
-		return;
-	}
-	if (cmp == 2) { // BMP_RLE4_COMPRESSION
-		if (decompressRLE4Data(src, src.length, stride, dest, dest.length) <= 0)
-			SWT.error(SWT.ERROR_INVALID_IMAGE);
-		return;
-	}
-	SWT.error(SWT.ERROR_INVALID_IMAGE);
-}
-int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
-	int sp = 0;
-	int se = numBytes;
-	int dp = 0;
-	int de = destSize;
-	int x = 0, y = 0;
-	while (sp < se) {
-		int len = src[sp] & 0xFF;
-		sp++;
-		if (len == 0) {
-			len = src[sp] & 0xFF;
-			sp++;
-			switch (len) {
-				case 0: /* end of line */
-					y++;
-					x = 0;
-					dp = y * stride;
-					if (dp >= de)
-						return -1;
-					break;
-				case 1: /* end of bitmap */
-					return 1;
-				case 2: /* delta */
-					x += src[sp] & 0xFF;
-					sp++;
-					y += src[sp] & 0xFF;
-					sp++;
-					dp = y * stride + x / 2;
-					if (dp >= de)
-						return -1;
-					break;
-				default: /* absolute mode run */
-					if ((len & 1) != 0) /* odd run lengths not currently supported */
-						return -1;
-					x += len;
-					len = len / 2;
-					if (len > (se - sp))
-						return -1;
-					if (len > (de - dp))
-						return -1;
-					for (int i = 0; i < len; i++) {
-						dest[dp] = src[sp];
-						dp++;
-						sp++;
-					}
-					if ((sp & 1) != 0)
-						sp++; /* word align sp? */
-					break;
-			}
-		} else {
-			if ((len & 1) != 0)
-				return -1;
-			x += len;
-			len = len / 2;
-			byte theByte = src[sp];
-			sp++;
-			if (len > (de - dp))
-				return -1;
-			for (int i = 0; i < len; i++) {
-				dest[dp] = theByte;
-				dp++;
-			}
-		}
-	}
-	return 1;
-}
-int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
-	int sp = 0;
-	int se = numBytes;
-	int dp = 0;
-	int de = destSize;
-	int x = 0, y = 0;
-	while (sp < se) {
-		int len = src[sp] & 0xFF;
-		sp++;
-		if (len == 0) {
-			len = src[sp] & 0xFF;
-			sp++;
-			switch (len) {
-				case 0: /* end of line */
-					y++;
-					x = 0;
-					dp = y * stride;
-					if (dp >= de)
-						return -1;
-					break;
-				case 1: /* end of bitmap */
-					return 1;
-				case 2: /* delta */
-					x += src[sp] & 0xFF;
-					sp++;
-					y += src[sp] & 0xFF;
-					sp++;
-					dp = y * stride + x;
-					if (dp >= de)
-						return -1;
-					break;
-				default: /* absolute mode run */
-					if (len > (se - sp))
-						return -1;
-					if (len > (de - dp))
-						return -1;
-					for (int i = 0; i < len; i++) {
-						dest[dp] = src[sp];
-						dp++;
-						sp++;
-					}
-					if ((sp & 1) != 0)
-						sp++; /* word align sp? */
-					x += len;
-					break;
-			}
-		} else {
-			byte theByte = src[sp];
-			sp++;
-			if (len > (de - dp))
-				return -1;
-			for (int i = 0; i < len; i++) {
-				dest[dp] = theByte;
-				dp++;
-			}
-			x += len;
-		}
-	}
-	return 1;
-}
-boolean isFileFormat(LEDataInputStream stream) {
-	try {
-		byte[] header = new byte[18];
-		stream.read(header);
-		stream.unread(header);
-		int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24);
-		return header[0] == 0x42 && header[1] == 0x4D && infoHeaderSize >= BMPHeaderFixedSize;
-	} catch (Exception e) {
-		return false;
-	}
-}
-byte[] loadData(byte[] infoHeader) {
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	int stride = (width * bitCount + 7) / 8;
-	stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
-	byte[] data = loadData(infoHeader, stride);
-	flipScanLines(data, stride, height);
-	return data;
-}
-byte[] loadData(byte[] infoHeader, int stride) {
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int dataSize = height * stride;
-	byte[] data = new byte[dataSize];
-	int cmp = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
-	if (cmp == 0) { // BMP_NO_COMPRESSION
-		try {
-			if (inputStream.read(data) != dataSize)
-				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-		}
-	} else {
-		int compressedSize = (infoHeader[20] & 0xFF) | ((infoHeader[21] & 0xFF) << 8) | ((infoHeader[22] & 0xFF) << 16) | ((infoHeader[23] & 0xFF) << 24);
-		byte[] compressed = new byte[compressedSize];
-		try {
-			if (inputStream.read(compressed) != compressedSize)
-				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-		}
-		decompressData(compressed, data, stride, cmp);
-	}
-	return data;
-}
-int[] loadFileHeader() {
-	int[] header = new int[5];
-	try {
-		header[0] = inputStream.readShort();
-		header[1] = inputStream.readInt();
-		header[2] = inputStream.readShort();
-		header[3] = inputStream.readShort();
-		header[4] = inputStream.readInt();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if (header[0] != 0x4D42)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return header;
-}
-ImageData[] loadFromByteStream() {
-	int[] fileHeader = loadFileHeader();
-	byte[] infoHeader = new byte[BMPHeaderFixedSize];
-	try {
-		inputStream.read(infoHeader);
-	} catch (Exception e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	PaletteData palette = loadPalette(infoHeader);
-	if (inputStream.getPosition() < fileHeader[4]) {
-		// Seek to the specified offset
-		try {
-			inputStream.skip(fileHeader[4] - inputStream.getPosition());
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-		}
-	}
-	byte[] data = loadData(infoHeader);
-	this.compression = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
-	this.importantColors = (infoHeader[36] & 0xFF) | ((infoHeader[37] & 0xFF) << 8) | ((infoHeader[38] & 0xFF) << 16) | ((infoHeader[39] & 0xFF) << 24);
-//	int xPelsPerMeter = (infoHeader[24] & 0xFF) | ((infoHeader[25] & 0xFF) << 8) | ((infoHeader[26] & 0xFF) << 16) | ((infoHeader[27] & 0xFF) << 24);
-//	int yPelsPerMeter = (infoHeader[28] & 0xFF) | ((infoHeader[29] & 0xFF) << 8) | ((infoHeader[30] & 0xFF) << 16) | ((infoHeader[31] & 0xFF) << 24);
-	int type = (this.compression == 1 /*BMP_RLE8_COMPRESSION*/) || (this.compression == 2 
-
-/*BMP_RLE4_COMPRESSION*/) ? SWT.IMAGE_BMP_RLE : SWT.IMAGE_BMP;
-	return new ImageData[] {
-		ImageData.internal_new(
-			width,
-			height,
-			bitCount,
-			palette,
-			4,
-			data,
-			0,
-			null,
-			null,
-			-1,
-			-1,
-			type,
-			0,
-			0,
-			0,
-			0)
-	};
-}
-PaletteData loadPalette(byte[] infoHeader) {
-	int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	if (depth <= 8) {
-		int numColors = (infoHeader[32] & 0xFF) | ((infoHeader[33] & 0xFF) << 8) | ((infoHeader[34] & 0xFF) << 16) | ((infoHeader[35] & 0xFF) << 24);
-		if (numColors == 0) {
-			numColors = 1 << depth;
-		} else {
-			if (numColors > 256)
-				numColors = 256;
-		}
-		byte[] buf = new byte[numColors * 4];
-		try {
-			if (inputStream.read(buf) != buf.length)
-				SWT.error(SWT.ERROR_INVALID_IMAGE);
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-		}
-		return paletteFromBytes(buf, numColors);
-	}
-	if (depth == 16) return new PaletteData(0x7C00, 0x3E0, 0x1F);
-	if (depth == 24) return new PaletteData(0xFF, 0xFF00, 0xFF0000);
-	return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
-}
-PaletteData paletteFromBytes(byte[] bytes, int numColors) {
-	int bytesOffset = 0;
-	RGB[] colors = new RGB[numColors];
-	for (int i = 0; i < numColors; i++) {
-		colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF,
-			bytes[bytesOffset + 1] & 0xFF,
-			bytes[bytesOffset] & 0xFF);
-		bytesOffset += 4;
-	}
-	return new PaletteData(colors);
-}
-/**
- * Answer a byte array containing the BMP representation of
- * the given device independent palette.
- */
-static byte[] paletteToBytes(PaletteData pal) {
-	int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
-	byte[] bytes = new byte[n * 4];
-	int offset = 0;
-	for (int i = 0; i < n; i++) {
-		RGB col = pal.colors[i];
-		bytes[offset] = (byte)col.blue;
-		bytes[offset + 1] = (byte)col.green;
-		bytes[offset + 2] = (byte)col.red;
-		offset += 4;
-	}
-	return bytes;
-}
-
-void flipScanLines(byte[] data, int stride, int height) {
-	int i1 = 0;
-	int i2 = (height - 1) * stride;
-	for (int i = 0; i < height / 2; i++) {
-		for (int index = 0; index < stride; index++) {
-			byte b = data[index + i1];
-			data[index + i1] = data[index + i2];
-			data[index + i2] = b;
-		}
-		i1 += stride;
-		i2 -= stride;
-	}
-}
-
-}
-
-static class WinICOFileFormat extends FileFormat {
-	
-static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
-	if (pad == newPad) return data;
-	int stride = (width * depth + 7) / 8;
-	int bpl = (stride + (pad - 1)) / pad * pad;
-	int newBpl = (stride + (newPad - 1)) / newPad * newPad;
-	byte[] newData = new byte[height * newBpl];
-	int srcIndex = 0, destIndex = 0;
-	for (int y = 0; y < height; y++) {
-		System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
-		srcIndex += bpl;
-		destIndex += newBpl;
-	}
-	return newData;
-}
-/**
- * Answer the size in bytes of the file representation of the given
- * icon
- */
-int iconSize(ImageData i) {
-	int shapeDataStride = (i.width * i.depth + 31) / 32 * 4;
-	int maskDataStride = (i.width + 31) / 32 * 4;
-	int dataSize = (shapeDataStride + maskDataStride) * i.height;
-	int paletteSize = i.palette.colors != null ? i.palette.colors.length * 4 : 0;
-	return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize;
-}
-boolean isFileFormat(LEDataInputStream stream) {
-	try {
-		byte[] header = new byte[4];
-		stream.read(header);
-		stream.unread(header);
-		return header[0] == 0 && header[1] == 0 && header[2] == 1 && header[3] == 0;
-	} catch (Exception e) {
-		return false;
-	}
-}
-boolean isValidIcon(ImageData i) {
-	switch (i.depth) {
-		case 1:
-		case 4:
-		case 8:
-			if (i.palette.isDirect) return false;
-			int size = i.palette.colors.length;
-			return size == 2 || size == 16 || size == 32 || size == 256;
-		case 24:
-		case 32:
-			return i.palette.isDirect;
-	}
-	return false;
-}
-int loadFileHeader(LEDataInputStream byteStream) {
-	int[] fileHeader = new int[3];
-	try {
-		fileHeader[0] = byteStream.readShort();
-		fileHeader[1] = byteStream.readShort();
-		fileHeader[2] = byteStream.readShort();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int numIcons = fileHeader[2];
-	if (numIcons <= 0)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return numIcons;
-}
-int loadFileHeader(LEDataInputStream byteStream, boolean hasHeader) {
-	int[] fileHeader = new int[3];
-	try {
-		if (hasHeader) {
-			fileHeader[0] = byteStream.readShort();
-			fileHeader[1] = byteStream.readShort();
-		} else {
-			fileHeader[0] = 0;
-			fileHeader[1] = 1;
-		}
-		fileHeader[2] = byteStream.readShort();
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int numIcons = fileHeader[2];
-	if (numIcons <= 0)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	return numIcons;
-}
-ImageData[] loadFromByteStream() {
-	int numIcons = loadFileHeader(inputStream);
-	int[][] headers = loadIconHeaders(numIcons);
-	ImageData[] icons = new ImageData[headers.length];
-	for (int i = 0; i < icons.length; i++) {
-		icons[i] = loadIcon(headers[i]);
-	}
-	return icons;
-}
-/**
- * Load one icon from the byte stream.
- */
-ImageData loadIcon(int[] iconHeader) {
-	byte[] infoHeader = loadInfoHeader(iconHeader);
-	WinBMPFileFormat bmpFormat = new WinBMPFileFormat();
-	bmpFormat.inputStream = inputStream;
-	PaletteData palette = bmpFormat.loadPalette(infoHeader);
-	byte[] shapeData = bmpFormat.loadData(infoHeader);
-	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	infoHeader[14] = 1;
-	infoHeader[15] = 0;
-	byte[] maskData = bmpFormat.loadData(infoHeader);
-	maskData = convertPad(maskData, width, height, 1, 4, 2);
-	bitInvertData(maskData, 0, maskData.length);
-	return ImageData.internal_new(
-		width,
-		height,
-		depth,
-		palette,
-		4,
-		shapeData,
-		2,
-		maskData,
-		null,
-		-1,
-		-1,
-		SWT.IMAGE_ICO,
-		0,
-		0,
-		0,
-		0);
-}
-int[][] loadIconHeaders(int numIcons) {
-	int[][] headers = new int[numIcons][7];
-	try {
-		for (int i = 0; i < numIcons; i++) {
-			headers[i][0] = inputStream.read();
-			headers[i][1] = inputStream.read();
-			headers[i][2] = inputStream.readShort();
-			headers[i][3] = inputStream.readShort();
-			headers[i][4] = inputStream.readShort();
-			headers[i][5] = inputStream.readInt();
-			headers[i][6] = inputStream.readInt();
-		}
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	return headers;
-}
-byte[] loadInfoHeader(int[] iconHeader) {
-	int width = iconHeader[0];
-	int height = iconHeader[1];
-	int numColors = iconHeader[2]; // the number of colors is in the low byte, but the high byte must be 0
-	if (numColors == 0) numColors = 256; // this is specified: '00' represents '256' (0x100) colors
-	if ((numColors != 2) && (numColors != 8) && (numColors != 16) &&
-		(numColors != 32) && (numColors != 256))
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	if (inputStream.getPosition() < iconHeader[6]) {
-		// Seek to the specified offset
-		try {
-			inputStream.skip(iconHeader[6] - inputStream.getPosition());
-		} catch (IOException e) {
-			SWT.error(SWT.ERROR_IO, e);
-			return null;
-		}
-	}
-	byte[] infoHeader = new byte[WinBMPFileFormat.BMPHeaderFixedSize];
-	try {
-		inputStream.read(infoHeader);
-	} catch (IOException e) {
-		SWT.error(SWT.ERROR_IO, e);
-	}
-	if (((infoHeader[12] & 0xFF) | ((infoHeader[13] & 0xFF) << 8)) != 1)
-		SWT.error(SWT.ERROR_INVALID_IMAGE);
-	int infoWidth = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
-	int infoHeight = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
-	int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
-	if (height == infoHeight && bitCount == 1) height /= 2;
-	if (!((width == infoWidth) && (height * 2 == infoHeight) &&
-		(bitCount == 1 || bitCount == 4 || bitCount == 8 || bitCount == 24 || bitCount == 32)))
-			SWT.error(SWT.ERROR_INVALID_IMAGE);
-	infoHeader[8] = (byte)(height & 0xFF);
-	infoHeader[9] = (byte)((height >> 8) & 0xFF);
-	infoHeader[10] = (byte)((height >> 16) & 0xFF);
-	infoHeader[11] = (byte)((height >> 24) & 0xFF);
-	return infoHeader;
-}
-}
-static class SWT {
-	public static final int IMAGE_ICO = 3;
-	public static final int ERROR_IO = 39;
-	public static final int ERROR_INVALID_IMAGE = 40;
-	public static final int ERROR_NULL_ARGUMENT = 4;
-	public static final int ERROR_INVALID_ARGUMENT = 5;
-	public static final int ERROR_CANNOT_BE_ZERO = 7;
-	public static final int IMAGE_UNDEFINED = -1;
-	public static final int ERROR_UNSUPPORTED_DEPTH = 38;
-	public static final int TRANSPARENCY_MASK = 1 << 1;
-	public static final int ERROR_UNSUPPORTED_FORMAT = 42;
-	public static final int TRANSPARENCY_ALPHA = 1 << 0;
-	public static final int TRANSPARENCY_NONE = 0x0;
-	public static final int TRANSPARENCY_PIXEL = 1 << 2;
-	public static final int IMAGE_BMP = 0;
-	public static final int IMAGE_BMP_RLE = 1;
-	
-	public static void error(int code) {
-		throw new RuntimeException("Error "+code);
-	}
-	public static void error(int code, Throwable t) {
-		throw new RuntimeException(t);
-	}
-}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_4.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_4.bmp
deleted file mode 100644
index 30a3d57..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_4.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_8.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_8.bmp
deleted file mode 100644
index 99a51da..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_16_8.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_4.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_4.bmp
deleted file mode 100644
index 19feb29..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_4.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_8.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_8.bmp
deleted file mode 100644
index a39406b..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_32_8.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_4.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_4.bmp
deleted file mode 100644
index c04abaf..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_4.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_8.bmp b/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_8.bmp
deleted file mode 100644
index f46677a..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/test_48_8.bmp and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java
deleted file mode 100644
index 219da19..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTClass.java	
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.eclipse.jdt.core.dom.ImportDeclaration;
-import org.eclipse.jdt.core.dom.Javadoc;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.TagElement;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
-import org.eclipse.swt.tools.internal.ASTType.TypeResolver;
-
-public class ASTClass extends ASTItem implements JNIClass {
-	String sourcePath;
-	MetaData metaData;
-
-	ASTClass superclass;
-	ASTField[] fields;
-	ASTMethod[] methods;
-	String name, simpleName, superclassName, packageName;
-	String[] imports;
-	String data;
-	int start;
-	
-	TypeResolver resolver = new TypeResolver() {
-		public String findPath(String simpleName) {
-			if (simpleName.equals(ASTClass.this.simpleName)) return sourcePath;
-			String basePath = sourcePath.substring(0, sourcePath.length() - name.length() - ".java".length());
-			File file = new File(basePath + packageName.replace('.', '/') + "/" + simpleName + ".java");
-			if (file.exists()) {
-				return file.getAbsolutePath();
-			}
-			for (int i = 0; i < imports.length; i++) {
-				file = new File(basePath + imports[i].replace('.', '/') + "/" + simpleName + ".java");
-				if (file.exists()) {
-					return file.getAbsolutePath();				
-				}
-			}
-			return "";
-		}
-		public String resolve(String simpleName) {
-			if (simpleName.equals(ASTClass.this.simpleName)) return packageName + "." + simpleName;
-			String basePath = sourcePath.substring(0, sourcePath.length() - name.length() - ".java".length());
-			File file = new File(basePath + packageName.replace('.', '/') + "/" + simpleName + ".java");
-			if (file.exists()) {
-				return packageName + "." + simpleName;				
-			}
-			for (int i = 0; i < imports.length; i++) {
-				file = new File(basePath + imports[i].replace('.', '/') + "/" + simpleName + ".java");
-				if (file.exists()) {
-					return imports[i] + "." + simpleName;				
-				}
-			}
-			return simpleName;
-		}
-	};
-
-public ASTClass(String sourcePath, MetaData metaData) {
-	this.sourcePath = sourcePath;
-	this.metaData = metaData;
-	
-	String source = JNIGenerator.loadFile(sourcePath);
-	ASTParser parser = ASTParser.newParser(AST.JLS3);
-	parser.setSource(source.toCharArray());
-	CompilationUnit unit = (CompilationUnit)parser.createAST(null);
-	TypeDeclaration type = (TypeDeclaration)unit.types().get(0);
-	simpleName = type.getName().getIdentifier();
-	packageName = unit.getPackage().getName().getFullyQualifiedName();
-	name = packageName + "." + simpleName;
-	superclassName = type.getSuperclassType() != null ? type.getSuperclassType().toString() : null;
-	List imports = unit.imports();
-	this.imports = new String[imports.size()];
-	int count = 0;
-	for (Iterator iterator = imports.iterator(); iterator.hasNext();) {
-		ImportDeclaration imp = (ImportDeclaration) iterator.next();
-		this.imports[count++] = imp.getName().getFullyQualifiedName();
-	}
-	start = type.getStartPosition();
-	
-	Javadoc doc = type.getJavadoc();
-	List tags = null;
-	if (doc != null) {
-		tags = doc.tags();
-		for (Iterator iterator = tags.iterator(); iterator.hasNext();) {
-			TagElement tag = (TagElement) iterator.next();
-			if ("@jniclass".equals(tag.getTagName())) {
-				String data = tag.fragments().get(0).toString();
-				setMetaData(data);
-				break;
-			}
-		}
-	}
-
-	FieldDeclaration[] fields = type.getFields();
-	ArrayList fid = new ArrayList();
-	for (int i = 0; i < fields.length; i++) {
-		FieldDeclaration field = fields[i];
-		List fragments = field.fragments();
-		for (Iterator iterator = fragments.iterator(); iterator.hasNext();) {
-			VariableDeclarationFragment fragment = (VariableDeclarationFragment) iterator.next();
-			fid.add(new ASTField(this, source, field, fragment));
-		}
-	}
-	this.fields = (ASTField[])fid.toArray(new ASTField[fid.size()]);
-	MethodDeclaration[] methods = type.getMethods();
-	ArrayList mid = new ArrayList();
-	for (int i = 0; i < methods.length; i++) {
-		if (methods[i].getReturnType2() == null) continue;
-		mid.add(new ASTMethod(this, source, methods[i]));
-	}
-	this.methods = (ASTMethod[])mid.toArray(new ASTMethod[mid.size()]);
-}
-
-public int hashCode() {
-	return getName().hashCode();
-}
-
-public boolean equals(Object obj) {
-	if (this == obj) return true;
-	if (!(obj instanceof ASTClass)) return false;
-	return ((ASTClass)obj).getName().equals(getName());
-}
-
-public JNIField[] getDeclaredFields() {
-	JNIField[] result = new JNIField[fields.length];
-	System.arraycopy(fields, 0, result, 0, result.length);
-	return result;
-}
-
-public JNIMethod[] getDeclaredMethods() {
-	JNIMethod[] result = new JNIMethod[methods.length];
-	System.arraycopy(methods, 0, result, 0, result.length);
-	return result;
-}
-
-public String getName() {
-	return name;
-}
-
-public JNIClass getSuperclass() {
-	if (superclassName == null) return new ReflectClass(Object.class);
-	if (superclass != null) return superclass;
-	String sourcePath = resolver.findPath(superclassName);
-	return superclass = new ASTClass(sourcePath, metaData);
-}
-
-public String getSimpleName() {
-	return simpleName;
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	if (data != null) return data;
-	String key = JNIGenerator.toC(getName());
-	return metaData.getMetaData(key, "");
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	data = value;
-}
-
-public String toString() {
-	return getName();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java
deleted file mode 100644
index 272dce0..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTField.java	
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.eclipse.jdt.core.dom.Javadoc;
-import org.eclipse.jdt.core.dom.TagElement;
-import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
-
-public class ASTField extends ASTItem implements JNIField {
-	ASTClass declaringClass;
-	String name;
-	int modifiers;
-	ASTType type, type64;
-	String data;
-	int start;
-	
-public ASTField(ASTClass declaringClass, String source, FieldDeclaration field, VariableDeclarationFragment fragment) {
-	this.declaringClass = declaringClass;	
-	name = fragment.getName().getIdentifier();
-	modifiers = field.getModifiers();
-	start = field.getStartPosition();
-	
-	Javadoc doc = field.getJavadoc();
-	List tags = null;
-	if (doc != null) {
-		tags = doc.tags();
-		for (Iterator iterator = tags.iterator(); iterator.hasNext();) {
-			TagElement tag = (TagElement) iterator.next();
-			if ("@field".equals(tag.getTagName())) {
-				String data = tag.fragments().get(0).toString();
-				setMetaData(data);
-				break;
-			}
-		}
-	}
-	type = new ASTType(declaringClass.resolver, field.getType(), fragment.getExtraDimensions());
-	type64 =  this.type;
-	if (GEN64) {
-		String s = source.substring(field.getStartPosition(), field.getStartPosition() + field.getLength());
-		if (type.isType("int") && s.indexOf("int /*long*/") != -1) type64 = new ASTType("J");
-		else if (type.isType("float") && s.indexOf("float /*double*/") != -1) type64 = new ASTType("D");
-		else if (type.isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) type64 = new ASTType("[J");
-		else if (type.isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) type64 = new ASTType("[D");
-		else if (type.isType("long") && s.indexOf("long /*int*/") != -1) type = new ASTType("I");
-		else if (type.isType("double") && s.indexOf("double /*float*/") != -1) type = new ASTType("F");
-		else if (type.isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) type = new ASTType("[I");
-		else if (type.isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) type = new ASTType("[F");
-	}
-}
-
-public int hashCode() {
-	return getName().hashCode();
-}
-
-public boolean equals(Object obj) {
-	if (this == obj) return true;
-	if (!(obj instanceof ASTField)) return false;
-	return ((ASTField)obj).getName().equals(getName());
-}
-
-public JNIClass getDeclaringClass() {
-	return declaringClass;
-}
-
-public int getModifiers() {
-	return modifiers;
-}
-
-public String getName() {
-	return name;
-}
-
-public JNIType getType() {
-	return type;
-}
-
-public JNIType getType64() {
-	return type64;
-}
-
-public String getAccessor() {
-	return (String)getParam("accessor");
-}
-
-public String getCast() {
-	String cast = ((String)getParam("cast")).trim();
-	if (cast.length() > 0) {
-		if (!cast.startsWith("(")) cast = "(" + cast;
-		if (!cast.endsWith(")")) cast = cast + ")";
-	}
-	return cast;
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	if (data != null) return data;
-	String className = getDeclaringClass().getSimpleName();
-	String key = className + "_" + getName();
-	return declaringClass.metaData.getMetaData(key, "");
-}
-
-public void setAccessor(String str) { 
-	setParam("accessor", str);
-}
-
-public void setCast(String str) {
-	setParam("cast", str);
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	data = value;
-}
-
-public String toString() {
-	return getName();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTItem.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTItem.java
deleted file mode 100644
index 9edfd7a..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTItem.java	
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Set;
-
-public abstract class ASTItem extends AbstractItem {
-
-public String flatten() {
-	checkParams();
-	StringBuffer buffer = new StringBuffer();
-	Set set = params.keySet();
-	String[] keys = (String[])set.toArray(new String[set.size()]);
-	Arrays.sort(keys);
-	for (int j = 0; j < keys.length; j++) {
-		String key = keys[j];
-		Object value = params.get(key);
-		String valueStr = "";
-		if (value instanceof String) {
-			valueStr = (String)value;
-		} else if (value instanceof String[]) {
-			String[] values = (String[])value;
-			StringBuffer valueBuffer = new StringBuffer();
-			for (int i = 0; i < values.length; i++) {
-				if (i != 0) valueBuffer.append(" ");
-				valueBuffer.append(values[i]);
-			}
-			valueStr = valueBuffer.toString();
-		} else {
-			valueStr = value.toString();
-		}
-		if (valueStr.length() > 0) {
-			if (buffer.length() != 0) buffer.append(",");
-			buffer.append(key);
-			buffer.append("=");
-			buffer.append(valueStr);
-		}
-	}
-	return buffer.toString();
-}
-
-public void parse(String str) {
-	this.params = new HashMap();
-	if (str.length() == 0) return;
-	String[] params = split(str, ",");
-	for (int i = 0; i < params.length; i++) {
-		String param = params[i];
-		int equals = param.indexOf('=');
-		if (equals ==  -1) {
-			System.out.println("Error: " + str + " param " + param);
-		}
-		String key = param.substring(0, equals).trim();
-		String value = param.substring(equals + 1).trim();
-		setParam(key, value);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java
deleted file mode 100644
index 0708c16..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTMethod.java	
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.Javadoc;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
-import org.eclipse.jdt.core.dom.TagElement;
-
-public class ASTMethod extends ASTItem implements JNIMethod {
-	String name, qualifiedName;
-	int modifiers;
-	ASTClass declaringClass;
-	ASTType[] paramTypes, paramTypes64;
-	ASTType returnType, returnType64;
-	ASTParameter[] parameters;
-	Boolean unique;
-	String data;
-	int start;
-	
-public ASTMethod(ASTClass declaringClass, String source, MethodDeclaration method) {
-	this.declaringClass = declaringClass;
-	
-	name = method.getName().getIdentifier();
-	modifiers = method.getModifiers();
-	start = method.getStartPosition();
-	
-	Javadoc doc = method.getJavadoc();
-	List tags = null;
-	if (doc != null) {
-		tags = doc.tags();
-		for (Iterator iterator = tags.iterator(); iterator.hasNext();) {
-			TagElement tag = (TagElement) iterator.next();
-			if ("@method".equals(tag.getTagName())) {
-				String data = tag.fragments().get(0).toString();
-				setMetaData(data);
-				break;
-			}
-		}
-	}
-	returnType = new ASTType(declaringClass.resolver, method.getReturnType2(), method.getExtraDimensions());
-	returnType64 = returnType;
-	if (GEN64) {
-		String s = source.substring(method.getReturnType2().getStartPosition(), method.getName().getStartPosition());
-		if (returnType.isType("int") && s.indexOf("int /*long*/") != -1) returnType64 = new ASTType("J");
-		else if (returnType.isType("float") && s.indexOf("float /*double*/") != -1) returnType64 = new ASTType("D");
-		else if (returnType.isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) returnType64 = new ASTType("[J");
-		else if (returnType.isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) returnType64 = new ASTType("[D");
-		else if (returnType.isType("long") && s.indexOf("long /*int*/") != -1) returnType = new ASTType("I");
-		else if (returnType.isType("double") && s.indexOf("double /*float*/") != -1) returnType = new ASTType("F");
-		else if (returnType.isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) returnType = new ASTType("[I");
-		else if (returnType.isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) returnType = new ASTType("[F");
-	}
-	
-	List parameters = method.parameters();
-	paramTypes = new ASTType[parameters.size()];
-	paramTypes64 = new ASTType[parameters.size()];
-	this.parameters = new ASTParameter[paramTypes.length];
-	int i = 0;
-	for (Iterator iterator = parameters.iterator(); iterator.hasNext(); i++) {
-		SingleVariableDeclaration param = (SingleVariableDeclaration) iterator.next();
-		paramTypes[i] = new ASTType(declaringClass.resolver, param.getType(), param.getExtraDimensions());
-		paramTypes64[i] = paramTypes[i];
-		this.parameters[i] = new ASTParameter(this, i, param.getName().getIdentifier());
-		if (GEN64) {
-			String s = source.substring(param.getStartPosition(), param.getStartPosition() + param.getLength());
-			if (paramTypes[i].isType("int") && s.indexOf("int /*long*/") != -1) paramTypes64[i] = new ASTType("J");
-			else if (paramTypes[i].isType("float") && s.indexOf("float /*double*/") != -1) paramTypes64[i] = new ASTType("D");
-			else if (paramTypes[i].isType("[I") && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) paramTypes64[i] = new ASTType("[J");
-			else if (paramTypes[i].isType("[F") && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) paramTypes64[i] = new ASTType("[D");
-			else if (paramTypes[i].isType("long") && s.indexOf("long /*int*/") != -1) paramTypes[i] = new ASTType("I");
-			else if (paramTypes[i].isType("double") && s.indexOf("double /*float*/") != -1) paramTypes[i] = new ASTType("F");
-			else if (paramTypes[i].isType("[J") && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) paramTypes[i] = new ASTType("[I");
-			else if (paramTypes[i].isType("[D") && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) paramTypes[i] = new ASTType("[F");
-		}
-		if (tags != null) {
-			String name = param.getName().getIdentifier();
-			for (Iterator iterator1 = tags.iterator(); iterator1.hasNext();) {
-				TagElement tag = (TagElement) iterator1.next();
-				if ("@param".equals(tag.getTagName())) {
-					List fragments = tag.fragments();
-					if (name.equals(fragments.get(0).toString())) {
-						String data = fragments.get(1).toString();
-						this.parameters[i].setMetaData(data);
-					}
-				}
-			}
-		}
-	}
-}
-
-public JNIClass getDeclaringClass() {
-	return declaringClass;
-}
-
-public int getModifiers() {
-	return modifiers;
-}
-
-public String getName() {
-	return name;
-}
-
-public boolean isNativeUnique() {
-	if (unique != null) return unique.booleanValue();
-	boolean result = true;
-	String name = getName();
-	JNIMethod[] methods = declaringClass.getDeclaredMethods();
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod mth = methods[i];
-		if ((mth.getModifiers() & Modifier.NATIVE) != 0 &&
-			this != mth && !this.equals(mth) &&
-			name.equals(mth.getName()))
-			{
-				result = false;
-				break;
-			}
-	}
-	unique = new Boolean(result);
-	return result;
-}
-
-public JNIType[] getParameterTypes() {
-	return paramTypes;
-}
-
-public JNIType[] getParameterTypes64() {
-	return paramTypes64;
-}
-
-public JNIParameter[] getParameters() {
-	return this.parameters;
-}
-
-public JNIType getReturnType() {
-	return returnType;
-}
-
-public JNIType getReturnType64() {
-	return returnType64;
-}
-
-public String getAccessor() {
-	return (String)getParam("accessor");
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	if (data != null) return data;
-	String className = getDeclaringClass().getSimpleName();
-	String key = className + "_" + JNIGenerator.getFunctionName(this);
-	MetaData metaData = declaringClass.metaData;
-	String value = metaData.getMetaData(key, null);
-	if (value == null) {
-		key = className + "_" + getName();
-		value = metaData.getMetaData(key, null);
-	}
-	/*
-	* Support for lock.
-	*/
-	if (value == null && getName().startsWith("_")) {
-		key = className + "_" + JNIGenerator.getFunctionName(this).substring(2);
-		value = metaData.getMetaData(key, null);
-		if (value == null) {
-			key = className + "_" + getName().substring(1);
-			value = metaData.getMetaData(key, null);
-		}
-	}
-	if (value == null) value = "";	
-	return value;
-}
-
-public void setAccessor(String str) { 
-	setParam("accessor", str);
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	data = value;
-}
-
-public String toString() {
-	return getName();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java
deleted file mode 100644
index ee217a5..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTParameter.java	
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public class ASTParameter extends ASTItem implements JNIParameter {
-	ASTMethod method;
-	int parameter;
-	String name;
-	String data;
-
-public ASTParameter(ASTMethod method, int parameter, String name) {
-	this.method = method;
-	this.parameter = parameter;
-	this.name = name;
-}
-
-public String getCast() {
-	String cast = ((String)getParam("cast")).trim();
-	if (cast.length() > 0) {
-		if (!cast.startsWith("(")) cast = "(" + cast;
-		if (!cast.endsWith(")")) cast = cast + ")";
-	}
-	return cast;
-}
-
-public String getMetaData() {
-	if (data != null) return data;
-	String className = method.getDeclaringClass().getSimpleName();
-	String key = className + "_" + JNIGenerator.getFunctionName(method) + "_" + parameter;
-	MetaData metaData = method.declaringClass.metaData;
-	String value = metaData.getMetaData(key, null);
-	if (value == null) {
-		key = className + "_" + method.getName() + "_" + parameter;
-		value = metaData.getMetaData(key, null);
-	}
-	/*
-	* Support for lock.
-	*/
-	if (value == null && method.getName().startsWith("_")) {
-		key = className + "_" + JNIGenerator.getFunctionName(method).substring(2) + "_" + parameter;
-		value = metaData.getMetaData(key, null);
-		if (value == null) {
-			key = className + "_" + method.getName().substring(1) + "_" + parameter;
-			value = metaData.getMetaData(key, null);
-		}
-	}
-	if (value == null) value = "";	
-	return value;
-}
-
-public JNIMethod getMethod() {
-	return method;
-}
-
-public String getName() {
-	return name;
-}
-
-public JNIClass getTypeClass() {
-	ASTType type = (ASTType)getType();
-	ASTClass declaringClass = method.declaringClass;
-	String sourcePath = declaringClass.resolver.findPath(type.getSimpleName());
-	return new ASTClass(sourcePath, declaringClass.metaData);
-}
-
-public JNIType getType() {
-	return method.getParameterTypes()[parameter];
-}
-
-public JNIType getType64() {
-	return method.getParameterTypes64()[parameter];
-}
-
-public int getParameter() {
-	return parameter;
-}
-
-public void setCast(String str) {
-	setParam("cast", str);
-}
-
-public void setMetaData(String value) {
-	data = value;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java
deleted file mode 100644
index a98ac50..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ASTType.java	
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import org.eclipse.jdt.core.dom.ArrayType;
-import org.eclipse.jdt.core.dom.Type;
-
-public class ASTType implements JNIType {
-	
-	static interface TypeResolver {
-		public String findPath(String simpleName);
-		public String resolve(String simpleName);
-	}	
-	
-	String name;
-
-public ASTType(String name) {
-	this.name = name;
-}
-
-public ASTType(TypeResolver resolver, Type type, int extraDimensions) {
-	name = from(resolver, type, extraDimensions);
-}
-
-String from(TypeResolver resolver, Type type, int extraDimensions) {
-	String name = "";
-	String str = type.toString();
-	if (type.isPrimitiveType()) {
-		if (str.equals("void")) name = "V";
-		else if (str.equals("int")) name = "I";
-		else if (str.equals("boolean")) name = "Z";
-		else if (str.equals("long")) name = "J";
-		else if (str.equals("short")) name = "S";
-		else if (str.equals("char")) name = "C";
-		else if (str.equals("byte")) name = "B";
-		else if (str.equals("float")) name = "F";
-		else if (str.equals("double")) name = "D";
-	} else if (type.isArrayType()) {
-		ArrayType arrayType = (ArrayType)type;
-		name = from(resolver, arrayType.getElementType(), arrayType.getDimensions());
-	} else if (str.indexOf('.') != -1) {
-		name = "L" + type.toString().replace('.', '/') + ";";
-	} else if (str.equals("String")){
-		name = "Ljava/lang/String;";
-	} else if (str.equals("Class")){
-		name = "Ljava/lang/Class;";
-	} else if (str.equals("Object")){
-		name = "Ljava/lang/Object;";
-	} else {
-		String qualifiedName = resolver != null  ? resolver.resolve(str) : str;
-		name = "L" + qualifiedName.replace('.', '/') + ";";
-	}
-	for (int i = 0; i < extraDimensions; i++) {
-		name = "[" + name;
-	}
-	return name;
-}
-
-public boolean equals(Object obj) {
-	if (obj == this) return true;
-	if (!(obj instanceof ASTType)) return false;
-	return ((ASTType)obj).name.equals(name);
-}
-
-public JNIType getComponentType() {
-	if (!name.startsWith("[")) throw new RuntimeException();
-	return new ASTType(name.substring(1));
-}
-
-public String getName() {
-	if (isPrimitive()) {
-		if (name.equals("V")) return "void";
-		if (name.equals("I")) return "int";
-		if (name.equals("Z")) return "boolean";
-		if (name.equals("J")) return "long";
-		if (name.equals("S")) return "short";
-		if (name.equals("C")) return "char";
-		if (name.equals("B")) return "byte";
-		if (name.equals("F")) return "float";
-		if (name.equals("D")) return "double";
-	}
-	if (isArray()) return name;
-	return name.substring(1, name.length() - 1).replace('/', '.');
-}
-
-public String getSimpleName() {
-	String name = getName();
-	if (isArray() || isPrimitive()) return name;
-	int index = name.lastIndexOf('.') + 1;
-	return name.substring(index, name.length());
-}
-
-public String getTypeSignature(boolean define) {
-	if (isPrimitive()) {
-		if (define) {
-			if (name.equals("I")) return "I_J";
-			if (name.equals("J")) return "I_J";
-			if (name.equals("F")) return "F_D";
-			if (name.equals("D")) return "F_D";
-		}
-		return name;
-	}
-	if (isArray()) {
-		if (define) return getComponentType().getTypeSignature(define) + "Array";
-		return "[" + getComponentType().getTypeSignature(define);
-	}
-	return name;
-}
-
-public String getTypeSignature1(boolean define) {
-	if (isPrimitive()) {
-		if (name.equals("V")) return "Void";
-		if (name.equals("I")) return define ? "IntLong" : "Int";
-		if (name.equals("Z")) return "Boolean";
-		if (name.equals("J")) return define ? "IntLong" : "Long";
-		if (name.equals("S")) return "Short";
-		if (name.equals("C")) return "Char";
-		if (name.equals("B")) return "Byte";
-		if (name.equals("F")) return define ? "FloatDouble" : "Float";
-		if (name.equals("D")) return define ? "FloatDouble" : "Double";
-	}
-	if (name.equals("Ljava/lang/String;")) return "String";
-	return "Object";
-}
-
-public String getTypeSignature2(boolean define) {
-	if (isPrimitive()) {
-		if (name.equals("V")) return "void";
-		if (name.equals("I")) return define ? "jintLong" : "jint";
-		if (name.equals("Z")) return "jboolean";
-		if (name.equals("J")) return define ? "jintLong" : "jlong";
-		if (name.equals("S")) return "jshort";
-		if (name.equals("C")) return "jchar";
-		if (name.equals("B")) return "jbyte";
-		if (name.equals("F")) return define ? "jfloatDouble" : "jfloat";
-		if (name.equals("D")) return define ? "jfloatDouble" : "jdouble";
-	}
-	if (name.equals("Ljava/lang/String;")) return "jstring";
-	if (name.equals("Ljava/lang/Class;")) return "jclass";
-	if (isArray()) {
-		return getComponentType().getTypeSignature2(define) + "Array";
-	}
-	return "jobject";
-}
-
-public String getTypeSignature3(boolean define) {
-	if (isPrimitive()) {
-		if (name.equals("V")) return "void";
-		if (name.equals("I")) return "int";
-		if (name.equals("Z")) return "boolean";
-		if (name.equals("J")) return "long";
-		if (name.equals("S")) return "short";
-		if (name.equals("C")) return "char";
-		if (name.equals("B")) return "byte";
-		if (name.equals("F")) return "float";
-		if (name.equals("D")) return "double";
-	}
-	if (name.equals("Ljava/lang/String;")) return "String";
-	if (isArray()) {
-		return getComponentType().getTypeSignature3(define) + "[]";
-	}
-	return getName();
-}
-
-public String getTypeSignature4(boolean define, boolean struct) {
-	if (isPrimitive()) {
-		if (name.equals("V")) return "void";
-		if (name.equals("I")) return define ? "jintLong" : "jint";
-		if (name.equals("Z")) return "jboolean";
-		if (name.equals("J")) return define ? "jintLong" : "jlong";
-		if (name.equals("S")) return "jshort";
-		if (name.equals("C")) return "jchar";
-		if (name.equals("B")) return "jbyte";
-		if (name.equals("F")) return define ? "jfloatDouble" : "jfloat";
-		if (name.equals("D")) return define ? "jfloatDouble" : "jdouble";
-	}
-	if (name.equals("Ljava/lang/String;")) return "jstring";
-	if (isArray()) {
-		String sig = getComponentType().getTypeSignature4(define, struct);
-		return struct ? sig : sig + " *";
-	}
-	String sig = getSimpleName(); 
-	return struct ? sig : sig + " *";
-}
-
-public int hashCode() {
-	return name.hashCode();
-}
-
-public boolean isArray() {
-	return name.startsWith("[");
-}
-
-public boolean isPrimitive() {
-	return !name.startsWith("L") && !name.startsWith("[");
-}
-
-public boolean isType(String type) {
-	return getName().equals(type);
-}
-
-public String toString() {
-	return name;
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java
deleted file mode 100644
index 8e566a2..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/AbstractItem.java	
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-
-public abstract class AbstractItem implements JNIItem {
-
-	HashMap params;
-
-static String[] split(String str, String separator) {
-	return JNIGenerator.split(str, separator);
-}
-
-void checkParams() {
-	if (params != null) return;
-	parse(getMetaData());
-}
-
-public abstract String flatten();
-
-public String[] getFlags() {
-	Object flags = getParam("flags");
-	if (flags == null) return new String[0];
-	if (flags instanceof String[]) return (String[])flags;
-	String[] result = split((String)flags, " ");
-	setParam("flags", result);
-	return result;
-}
-
-public boolean getFlag(String flag) {
-	String[] flags = getFlags();
-	for (int i = 0; i < flags.length; i++) {
-		if (flags[i].equals(flag)) return true;
-	}
-	return false;
-}
-
-public abstract String getMetaData();
-
-public Object getParam(String key) {
-	checkParams();
-	Object value = params.get(key);
-	return value == null ? "" : value;
-}
-
-public boolean getGenerate() {
-	return !getFlag(FLAG_NO_GEN);
-}
-
-public void setFlags(String[] flags) { 
-	setParam("flags", flags);
-}
-
-public abstract void parse(String str);
-
-public void setFlag(String flag, boolean value) {
-	String[] flags = getFlags();
-	HashSet set = new HashSet(Arrays.asList(flags));
-	if (value) {
-		set.add(flag);
-	} else {
-		set.remove(flag);
-	}
-	setFlags((String[])set.toArray(new String[set.size()]));
-}
-
-public void setGenerate(boolean value) {
-	setFlag(FLAG_NO_GEN, !value);
-}
-
-public abstract void setMetaData(String value);
-
-public void setParam(String key, Object value) {
-	checkParams();
-	params.put(key, value);
-	setMetaData(flatten());
-}
-	
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
deleted file mode 100644
index ee81cd2..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java	
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.util.*;
-
-public abstract class CleanupClass extends JNIGenerator {
-
-String classSourcePath;
-String[] sourcePath;
-String classSource;
-Hashtable files;
-int usedCount, unusedCount;
-
-String[] getArgNames(JNIMethod method) {
-	int n_args = method.getParameters().length;
-	if (n_args == 0) return new String[0];
-	String name = method.getName();
-	String params = "";
-	int index = 0;
-	while (true) {
-		index = classSource.indexOf(name, index + 1);
-		if (!Character.isWhitespace(classSource.charAt(index - 1))) continue;
-		if (index == -1) return null;
-		int parantesesStart = classSource.indexOf("(", index);
-		if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
-			int parantesesEnd = classSource.indexOf(")", parantesesStart);
- 			params = classSource.substring(parantesesStart + 1, parantesesEnd);
- 			break;
-		}
-	}
-	String[] names = new String[n_args];
-	StringTokenizer tk = new StringTokenizer(params, ",");
-	for (int i = 0; i < names.length; i++) {
-		String s = tk.nextToken().trim();
-		StringTokenizer tk1 = new StringTokenizer(s, " ");
-		String s1 = null;
-		while (tk1.hasMoreTokens()) {
-			s1 = tk1.nextToken();
-		}
-		names[i] = s1.trim();
-	}
-	return names;	
-}
-
-
-void loadClassSource() {
-	if (classSourcePath == null) return;
-	File f = new File(classSourcePath);
-	classSource = loadFile(f);
-}
-
-void loadFiles () {
-	// BAD - holds on to a lot of memory
-	if (sourcePath == null) return;
-	files = new Hashtable ();
-	for (int i = 0; i < sourcePath.length; i++) {
-		File file = new File(sourcePath[i]);
-		if (file.exists()) {
-			if (!file.isDirectory()) {
-				if (file.getAbsolutePath().endsWith(".java")) {
-					files.put(file, loadFile(file));
-				}
-			} else {
-				loadDirectory(file);
-			}		
-		}
-	}
-}
-
-String loadFile (File file) {
-	try {
-		FileReader fr = new FileReader(file);
-		BufferedReader br = new BufferedReader(fr);
-		StringBuffer str = new StringBuffer();
-		char[] buffer = new char[1024];
-		int read;
-		while ((read = br.read(buffer)) != -1) {
-			str.append(buffer, 0, read);
-		}
-		fr.close();
-		return str.toString();
-	} catch (IOException e) {
-		e.printStackTrace(System.out);
-	}
-	return "";
-}
-
-void loadDirectory(File file) {
-	String[] entries = file.list();
-	for (int i = 0; i < entries.length; i++) {
-		String entry = entries[i];
-		File f = new File(file, entry);
-		if (!f.isDirectory()) {
-			if (f.getAbsolutePath().endsWith(".java")) {
-				files.put(f, loadFile(f));
-			}
-		} else {
-			loadDirectory(f);
-		}					
-	}
-}
-
-public void generate(JNIClass clazz) {
-	loadFiles ();
-	loadClassSource();
-}
-
-public void setSourcePath(String[] sourcePath) {
-	this.sourcePath = sourcePath;
-	files = null;
-}
-
-public void setClassSourcePath(String classSourcePath) {
-	this.classSourcePath = classSourcePath;
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
deleted file mode 100644
index 1f0ade3..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java	
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.*;
-
-public class CleanupConstants extends CleanupClass {
-
-String getFieldValue(JNIField field) {
-	String name = field.getName();
-	int index = 0;
-	while (true) {
-		index = classSource.indexOf(name, index + 1);
-		if (index == -1) return null;
-		int equalsIndex = classSource.indexOf("=", index);
-		if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) {
-			int semiIndex = classSource.indexOf(";", equalsIndex);
- 			return classSource.substring(equalsIndex + 1, semiIndex).trim();
-		}
-	}
-}
-
-public void generate(JNIClass clazz) {
-	unusedCount = usedCount = 0;
-	super.generate(clazz);
-	JNIField[] fields = clazz.getDeclaredFields();
-	generate(fields);
-	output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount));
-}
-
-public void generate(JNIField[] fields) {
-	sort(fields);
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
-		generate(field);
-	}
-}
-
-public void generate(JNIField field) {
-	String name = field.getName();
-	Enumeration keys = files.keys();
-	while (keys.hasMoreElements()) {
-		Object key = keys.nextElement();
-		String str = (String)files.get(key);
-		if (str.indexOf(name) != -1) {
-			int modifiers = field.getModifiers();
-			String modifiersStr = Modifier.toString(modifiers);
-			output("\t");
-			output(modifiersStr);
-			if (modifiersStr.length() > 0) output(" ");
-			output(field.getType().getTypeSignature3(false));
-			output(" " );
-			output(field.getName());
-			output(" = ");
-			output(getFieldValue(field));
-			outputln(";");
-			usedCount++;
-			return;
-		}
-	}
-	unusedCount++;
-	//output("NOT USED=" + field.toString() + " \n");
-}
-
-public static void main(String[] args) {
-	if (args.length < 3) {
-		System.out.println("Usage: java CleanupConstants <OS className> <class source> <src path1> <src path2>");
-		return;
-	}
-	try {
-		CleanupConstants gen = new CleanupConstants();
-		String clazzName = args[0];
-		String classSource = args[1];
-		String[] sourcePath = new String[args.length - 2];
-		System.arraycopy(args, 2, sourcePath, 0, sourcePath.length);
-		Class clazz = Class.forName(clazzName);
-		gen.setSourcePath(sourcePath);
-		gen.setClassSourcePath(classSource);
-		gen.generate(new ReflectClass(clazz));
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
deleted file mode 100644
index a0c4e9d..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java	
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.*;
-import java.lang.reflect.*;
-
-public class CleanupNatives extends CleanupClass {
-	
-public CleanupNatives() {
-}
-
-public void generate(JNIClass clazz) {
-	unusedCount = usedCount = 0;
-	super.generate(clazz);
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	generate(methods);
-	output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount));
-}
-
-public void generate(JNIMethod[] methods) {
-	sort(methods);	
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		generate(method);
-	}
-}
-
-public void generate(JNIMethod method) {
-	String name = method.getName();
-	Enumeration keys = files.keys();
-	while (keys.hasMoreElements()) {
-		Object key = keys.nextElement();
-		String str = (String)files.get(key);
-		if (str.indexOf(name) != -1) {
-//			int modifiers = method.getModifiers();
-//			Class clazz = method.getDeclaringClass();
-//			String modifiersStr = Modifier.toString(modifiers);
-//			output(modifiersStr);
-//			if (modifiersStr.length() > 0) output(" ");
-//			output(getTypeSignature3(method.getReturnType()));
-//			output(" " );
-//			output(method.getName());
-//			output("(");
-//			Class[] paramTypes = method.getParameterTypes();
-//			String[] paramNames = getArgNames(method);
-//			for (int i = 0; i < paramTypes.length; i++) {
-//				Class paramType = paramTypes[i];
-//				if (i != 0) output(", ");
-//				String sig = getTypeSignature3(paramType);
-//				if (clazz.getPackage().equals(paramType.getPackage())) sig = getClassName(paramType);
-//				output(sig);
-//				output(" ");
-//				output(paramNames[i]);
-//			}
-//			outputln(");");
-			usedCount++;
-			return;
-		}
-	}
-	unusedCount++;
-	output("NOT USED=" + method.toString() + "\n");
-}
-
-public static void main(String[] args) {
-	if (args.length < 2) {
-		System.out.println("Usage: java CleanupNatives <OS className> <OS class source> <src path0> <src path1>");
-		return;
-	}
-	try {
-		CleanupNatives gen = new CleanupNatives();
-		String clazzName = args[0];
-		String classSource = args[1]; 
-		String[] sourcePath = new String[args.length - 2];
-		System.arraycopy(args, 2, sourcePath, 0, sourcePath.length);
-		Class clazz = Class.forName(clazzName);
-		gen.setSourcePath(sourcePath);
-		gen.setClassSourcePath(classSource);
-		gen.generate(new ReflectClass(clazz));
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
deleted file mode 100644
index 83bc94b..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java	
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-
-public class ConstantsGenerator extends JNIGenerator {
-
-public void generate(JNIClass clazz) {
-	JNIField[] fields = clazz.getDeclaredFields();
-	generate(fields);
-}
-
-public void generate(JNIField[] fields) {
-	sort(fields);
-	outputln("int main() {");
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
-		generate(field);
-	}
-	outputln("}");
-}
-
-public void generate(JNIField field) {
-	JNIType type = field.getType();
-	output("\tprintf(\"public static final ");
-	output(field.getType().getTypeSignature3(false));
-	output(" ");
-	output(field.getName());
-	output(" = ");
-	if (type.isType("java.lang.String") || type.isType("[B")) output("\"%s\"");
-	else output("0x%x");
-	output(";\\n\", ");
-	output(field.getName());
-	outputln(");");
-}
-
-public static void main(String[] args) {
-	if (args.length < 1) {
-		System.out.println("Usage: java ConstantsGenerator <className1> <className2>");
-		return;
-	}
-	try {
-		ConstantsGenerator gen = new ConstantsGenerator();
-		for (int i = 0; i < args.length; i++) {
-			String clazzName = args[i];
-			Class clazz = Class.forName(clazzName);
-			gen.generate(new ReflectClass(clazz));
-		}
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java
deleted file mode 100644
index 24b8507..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/EmbedMetaData.java	
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.ArrayList;
-
-public class EmbedMetaData extends JNIGenerator {
-	TreeMap inserts;
-
-public void generate(JNIClass clazz) {
-	inserts = new TreeMap();
-	String data = ((AbstractItem)clazz).flatten();
-	if (data != null && data.length() != 0) {
-		String doc = "/** @jniclass " + data + " */" + delimiter;
-		inserts.put(new Integer(((ASTClass)clazz).start), doc);
-	}
-	JNIField[] fields = clazz.getDeclaredFields();
-	generate(fields);
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	generate(methods);
-	if (inserts.size() == 0) return;
-	String sourcePath = ((ASTClass)clazz).sourcePath;
-	String source = JNIGenerator.loadFile(sourcePath);
-	Set set = inserts.keySet();
-	ArrayList keys = new ArrayList();
-	keys.addAll(set);
-	Collections.reverse(keys);
-	StringBuffer buffer = new StringBuffer(source);
-	for (Iterator iterator = keys.iterator(); iterator.hasNext();) {
-		Integer index = (Integer) iterator.next();
-		String doc = (String)inserts.get(index);
-		buffer.insert(index.intValue(), doc);
-	}
-	try {
-		output(buffer.toString().getBytes(), sourcePath);
-	} catch (Exception e) {
-		e.printStackTrace();
-	}
-	inserts = null;
-}
-
-public void generate(JNIField[] fields) {
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		int mods = field.getModifiers();
-		if ((mods & Modifier.PUBLIC) == 0) continue;
-		if ((mods & Modifier.FINAL) != 0) continue;
-		if ((mods & Modifier.STATIC) != 0) continue;
-		generate(field);
-	}
-}
-
-public void generate(JNIField field) {
-	//wrap cast with parentheses
-	field.setCast(field.getCast());
-	String data = ((AbstractItem)field).flatten();
-	if (data != null && data.length() != 0) {
-		String doc = "/** @field " + data + " */" + delimiter + "\t";
-		inserts.put(new Integer(((ASTField)field).start), doc);
-	}
-}
-
-public void generate(JNIMethod[] methods) {
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		generate(method);
-	}
-}
-
-public void generate(JNIMethod method) {
-	ArrayList tags = new ArrayList();
-	String data = ((AbstractItem)method).flatten();
-	if (data != null && data.length() != 0) {
-		tags.add("@method " + data);
-	}
-	JNIParameter[] params = method.getParameters();
-	for (int i = 0; i < params.length; i++) {
-		ASTParameter param = (ASTParameter)params[i];
-		//wrap cast with parentheses
-		param.setCast(param.getCast());
-		data = ((AbstractItem)param).flatten();
-		if (data != null && data.length() != 0) {
-			tags.add("@param " + param.getName() + " " + data);
-		}
-	}
-	if (tags.size() == 0) return;
-	if (tags.size() == 1) {
-		String doc = "/** " + (String)tags.get(0) + " */" + delimiter;
-		inserts.put(new Integer(((ASTMethod)method).start), doc);
-	} else {
-		StringBuffer buffer = new StringBuffer();
-		buffer.append("/**");
-		buffer.append(delimiter);
-		for (Iterator iterator = tags.iterator(); iterator.hasNext();) {
-			String tag = (String) iterator.next();
-			buffer.append(" * ");
-			buffer.append(tag);
-			buffer.append(delimiter);
-		}
-		buffer.append(" */");
-		buffer.append(delimiter);
-		inserts.put(new Integer(((ASTMethod)method).start), buffer.toString());
-	}
-}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java
deleted file mode 100644
index 770f869..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/Flags.java	
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface Flags {
-
-	public static final String FLAG_NO_GEN = "no_gen";
-	public static final String FLAG_NO_IN = "no_in";
-	public static final String FLAG_NO_OUT = "no_out";
-	public static final String FLAG_NO_WINCE = "no_wince";
-	public static final String FLAG_CRITICAL = "critical";
-	public static final String FLAG_INIT = "init";
-	public static final String FLAG_STRUCT = "struct";
-	public static final String FLAG_UNICODE = "unicode";
-	public static final String FLAG_SENTINEL = "sentinel";
-	public static final String FLAG_CPP = "cpp";
-	public static final String FLAG_NEW = "new";
-	public static final String FLAG_DELETE ="delete";
-	public static final String FLAG_CONST = "const";
-	public static final String FLAG_CAST = "cast";
-	public static final String FLAG_DYNAMIC = "dynamic";
-	public static final String FLAG_JNI = "jni";
-	public static final String FLAG_ADDRESS = "address";
-	public static final String FLAG_GCNEW = "gcnew";
-	public static final String FLAG_GCOBJECT = "gcobject";
-	public static final String FLAG_SETTER = "setter";
-	public static final String FLAG_GETTER = "getter";
-	public static final String FLAG_ADDER = "adder";
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIClass.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIClass.java
deleted file mode 100644
index 70ad183..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIClass.java	
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIClass extends JNIItem {
-	
-public static String[] FLAGS = {FLAG_NO_GEN, FLAG_CPP};
-
-public String getName();
-
-public String getSimpleName();
-
-public JNIClass getSuperclass();
-
-public JNIField[] getDeclaredFields();
-
-public JNIMethod[] getDeclaredMethods();
-
-public String getExclude();
-
-public void setExclude(String str);
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java
deleted file mode 100644
index 5e36593..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIField.java	
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIField extends JNIItem {
-	
-public static final String[] FLAGS = {FLAG_NO_GEN, FLAG_NO_WINCE};
-
-public String getName();
-	
-public int getModifiers();
-
-public JNIType getType();
-
-public JNIType getType64();
-
-public JNIClass getDeclaringClass();
-
-public String getAccessor();
-
-public String getCast();
-
-public String getExclude();
-
-public void setAccessor(String str);
-
-public void setCast(String str);
-
-public void setExclude(String str);
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
deleted file mode 100644
index cdddd0d..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java	
+++ /dev/null
@@ -1,322 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.Modifier;
-import java.util.*;
-
-public abstract class JNIGenerator implements Flags {
-
-	JNIClass mainClass;
-	JNIClass[] classes;
-	MetaData metaData;
-	boolean isCPP;
-	String delimiter;
-	PrintStream output;
-	ProgressMonitor progress;
-	
-	static final String JNI64 = "JNI64";
-
-public JNIGenerator() {
-	delimiter = System.getProperty("line.separator");
-	output = System.out;
-	metaData = new MetaData(new Properties());
-}
-
-public static String skipCopyrights(InputStream is) throws IOException {
-	int state = 0;
-	StringBuffer copyrights = new StringBuffer();
-	while (state != 5) {
-		int c = is.read();
-		if (c == -1) return null;
-		switch (state) {
-			case 0:
-				if (!Character.isWhitespace((char)c)) state = 1;
-			case 1:
-				if (c == '/') state = 2;
-				else return null;
-				break;
-			case 2:
-				if (c == '*') state = 3;
-				else return null;
-				break;
-			case 3:
-				if (c == '*') state = 4;
-				break;
-			case 4:
-				if (c == '/') state = 5;
-				else state = 3;
-				break;
-		}
-		if (state > 0) copyrights.append((char)c);
-	}
-	return copyrights.toString();
-}
-
-public static boolean compare(InputStream is1, InputStream is2) throws IOException {
-	skipCopyrights(is1);
-	skipCopyrights(is2);
-	while (true) {
-		int c1 = is1.read();
-		int c2 = is2.read();
-		if (c1 != c2) return false;
-		if (c1 == -1) break;
-	}
-	return true;
-}
-
-public static void output(byte[] bytes, String fileName) throws IOException {
-	FileInputStream is = null;
-	try {
-		is = new FileInputStream(fileName);
-		if (compare(new ByteArrayInputStream(bytes), new BufferedInputStream(is))) return;
-	} catch (FileNotFoundException e) {
-	} finally {
-		try {
-			if (is != null) is.close();
-		} catch (IOException e) {}
-	}
-	FileOutputStream out = new FileOutputStream(fileName);
-	out.write(bytes);
-	out.close();
-}
-
-String fixDelimiter(String str) {
-	if (delimiter.equals("\n")) return str;
-	int index = 0, length = str.length();
-	StringBuffer buffer = new StringBuffer();
-	while (index != -1) {
-		int start = index;
-		index = str.indexOf('\n', start);
-		if (index == -1) {
-			buffer.append(str.substring(start, length));
-		} else {
-			buffer.append(str.substring(start, index));
-			buffer.append(delimiter);
-			index++;
-		}
-	}
-	return buffer.toString();
-}
-
-static String getFunctionName(JNIMethod method) {
-	return getFunctionName(method, method.getParameterTypes());
-}
-
-static String getFunctionName(JNIMethod method, JNIType[] paramTypes) {
-	if ((method.getModifiers() & Modifier.NATIVE) == 0) return method.getName();
-	String function = toC(method.getName());
-	if (!method.isNativeUnique()) {
-		StringBuffer buffer = new StringBuffer();
-		buffer.append(function);
-		buffer.append("__");
-		for (int i = 0; i < paramTypes.length; i++) {
-			JNIType paramType = paramTypes[i];
-			buffer.append(toC(paramType.getTypeSignature(false)));
-		}
-		return buffer.toString();
-	}
-	return function;
-}
-
-static String loadFile (String file) {
-	try {
-		FileReader fr = new FileReader(file);
-		BufferedReader br = new BufferedReader(fr);
-		StringBuffer str = new StringBuffer();
-		char[] buffer = new char[1024];
-		int read;
-		while ((read = br.read(buffer)) != -1) {
-			str.append(buffer, 0, read);
-		}
-		fr.close();
-		return str.toString();
-	} catch (IOException e) {
-		throw new RuntimeException("File not found:" + file, e);
-	}
-}
-
-static void sort(JNIMethod[] methods) {
-	Arrays.sort(methods, new Comparator() {
-		public int compare(Object a, Object b) {
-			JNIMethod mth1 = (JNIMethod)a;
-			JNIMethod mth2 = (JNIMethod)b;
-			int result = mth1.getName().compareTo(mth2.getName());
-			return result != 0 ? result : getFunctionName(mth1).compareTo(getFunctionName(mth2));
-		}
-	});
-}
-
-static void sort(JNIField[] fields) {
-	Arrays.sort(fields, new Comparator() {
-		public int compare(Object a, Object b) {
-			return ((JNIField)a).getName().compareTo(((JNIField)b).getName());
-		}
-	});
-}
-
-static void sort(JNIClass[] classes) {
-	Arrays.sort(classes, new Comparator() {
-		public int compare(Object a, Object b) {
-			return ((JNIClass)a).getName().compareTo(((JNIClass)b).getName());
-		}
-	});	
-}
-
-static String[] split(String str, String separator) {
-	StringTokenizer tk = new StringTokenizer(str, separator);
-	ArrayList result = new ArrayList();
-	while (tk.hasMoreElements()) {
-		result.add(tk.nextElement());
-	}
-	return (String[])result.toArray(new String[result.size()]);
-}
-
-static String toC(String str) {
-	int length = str.length();
-	StringBuffer buffer = new StringBuffer(length * 2);
-	for (int i = 0; i < length; i++) {
-		char c = str.charAt(i);
-		switch (c) {
-			case '_': buffer.append("_1"); break;
-			case ';': buffer.append("_2"); break;
-			case '[': buffer.append("_3"); break;
-			case '.': buffer.append("_"); break;
-			case '/': buffer.append("_"); break;
-			default: buffer.append(c);
-		}
-	}
-	return buffer.toString();
-}
-
-public abstract void generate(JNIClass clazz);
-
-public void generateCopyright() {
-}
-
-public void generateIncludes() {
-}
-
-public void generate() {
-	if (classes == null) return;
-	generateCopyright();
-	generateIncludes();
-	sort(classes);
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		if (clazz.getFlag(FLAG_CPP)) {
-			isCPP = true;
-			break;
-		}
-	}
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		if (getGenerate(clazz)) generate(clazz);
-		if (progress != null) progress.step();
-	}
-	output.flush();
-}
-
-public void generateMetaData(String key) {
-	MetaData mt = getMetaData();
-	String data = mt.getMetaData(key, null);
-	if (data == null) return;
-	if (data.length() == 0) return;
-	outputln(fixDelimiter(data));
-}
-
-public JNIClass[] getClasses() {
-	return classes;
-}
-
-public boolean getCPP() {
-	return isCPP;
-}
-
-public String getDelimiter() {
-	return delimiter;
-}
-
-public String getExtension() {
-	return getCPP() ? ".cpp" : ".c";
-}
-
-public String getFileName() {
-	return getOutputName() + getSuffix() + getExtension();
-}
-
-protected boolean getGenerate(JNIItem item) {
-	return item.getGenerate();
-}
-
-public PrintStream getOutput() {
-	return output;
-}
-
-public String getOutputName() {
-	return getMainClass().getSimpleName().toLowerCase();
-}
-
-public JNIClass getMainClass() {
-	return mainClass;
-}
-
-public MetaData getMetaData() {
-	return metaData;
-}
-
-public ProgressMonitor getProgressMonitor() {
-	return progress;
-}
-
-public String getSuffix() {
-	return "";
-}
-
-public void output(String str) {
-	output.print(str);
-}
-
-public void outputln() {
-	output(getDelimiter());
-}
-
-public void outputln(String str) {
-	output(str);
-	output(getDelimiter());
-}
-
-public void setClasses(JNIClass[] classes) {
-	this.classes = classes;
-}
-
-public void setDelimiter(String delimiter) {
-	this.delimiter = delimiter;
-}
-
-public void setMainClass(JNIClass mainClass) {
-	this.mainClass = mainClass;
-}
-
-public void setMetaData(MetaData data) {
-	metaData = data;
-}
-
-public void setOutput(PrintStream output) {
-	this.output = output;
-}
-
-public void setProgressMonitor(ProgressMonitor progress) {
-	this.progress = progress;
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
deleted file mode 100644
index 8830185..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java	
+++ /dev/null
@@ -1,497 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.zip.*;
-import java.util.Arrays;
-
-import org.eclipse.swt.SWT;
-
-public class JNIGeneratorApp {
-
-	JNIClass mainClass;
-	JNIClass[] classes;
-	ProgressMonitor progress;
-	String mainClassName, outputDir, classpath;
-	MetaData metaData;
-	
-	static boolean USE_AST = true;
-
-public JNIGeneratorApp() {
-}
-
-public String getClasspath() {
-	return classpath;
-}
-
-public JNIClass getMainClass() {
-	return mainClass;
-}
-
-public String getMainClassName() {
-	return mainClassName;
-}
-
-public MetaData getMetaData() {
-	return metaData;
-}
-
-String getMetaDataDir() {
-	return "./JNI Generation/org/eclipse/swt/tools/internal/";
-}
-
-public String getOutputDir() {
-	return outputDir;
-}
-
-public void generateAll() {
-	String mainClasses = new MetaData(getDefaultMainClass()).getMetaData("swt_main_classes", null);
-	if (mainClasses != null) {
-		String[] list = JNIGenerator.split(mainClasses, ",");
-		for (int i = 0; i < list.length; i += 2) {
-			String className = list[i].trim();
-			if (!USE_AST) {
-				try {
-					Class.forName(className, false, getClass().getClassLoader());
-				} catch (Throwable e) {
-					continue;
-				}
-			}
-			System.out.println("Generating \"" + className + "\"");
-			setMainClassName(className);
-			generate();
-		}
-	}
-}
-
-void generateSTATS_C(JNIClass[] classes) {
-	try {
-		StatsGenerator gen = new StatsGenerator(false);
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		gen.generate();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), outputDir + gen.getFileName());
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-void generateSTATS_H(JNIClass[] classes) {
-	try {
-		StatsGenerator gen = new StatsGenerator(true);
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		gen.generate();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), outputDir + gen.getFileName());
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-void generateSTRUCTS_H(JNIClass[] classes) {
-	try {
-		StructsGenerator gen = new StructsGenerator(true);
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		gen.generate();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), outputDir + gen.getFileName());
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-
-}
-
-void generateSTRUCTS_C(JNIClass[] classes) {
-	try {
-		StructsGenerator gen = new StructsGenerator(false);
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		gen.generate();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), outputDir + gen.getFileName());
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-
-}
-
-void generateSWT_C(JNIClass[] classes) {
-	try {
-		NativesGenerator gen = new NativesGenerator();
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		gen.generate();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), outputDir + gen.getFileName());
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-
-void generateMetaData(JNIClass[] classes) {
-	try {
-		MetaDataGenerator gen = new MetaDataGenerator();
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.setProgressMonitor(progress);
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		gen.setOutput(new PrintStream(out));
-		if (new File(getMetaDataDir() + gen.getFileName()).exists()) {
-			gen.generate();
-			if (!new File(getMetaDataDir()).exists()) {
-				System.out.println("Warning: Meta data output dir does not exist");
-				return;
-			}
-			if (out.size() > 0) JNIGenerator.output(out.toByteArray(), getMetaDataDir() + gen.getFileName());
-		}
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-void generateEmbededMetaData(JNIClass[] classes) {
-	try {
-		EmbedMetaData gen = new EmbedMetaData();
-		gen.setMainClass(mainClass);
-		gen.setClasses(classes);
-		gen.setMetaData(metaData);
-		gen.generate();
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-public void generate() {
-	generate(null);
-}
-
-public void generate(ProgressMonitor progress) {
-	if (mainClass == null) return;
-	if (progress != null) progress.setMessage("Initializing...");
-	JNIClass[] classes = getClasses();
-	JNIClass[] natives = getNativesClasses(classes);
-	JNIClass[] structs = getStructureClasses(classes);
-	this.progress = progress;
-	if (progress != null) {
-		int nativeCount = 0;
-		for (int i = 0; i < natives.length; i++) {
-			JNIClass clazz = natives[i];
-			JNIMethod[] methods = clazz.getDeclaredMethods();
-			for (int j = 0; j < methods.length; j++) {
-				JNIMethod method = methods[j];
-				if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-				nativeCount++;
-			}
-		}
-		int total = nativeCount * 4;
-		total += classes.length;
-		total += natives.length * (3);
-		total += structs.length * 2;
-		progress.setTotal(total);
-		progress.setMessage("Generating structs.h ...");
-	}
-	generateSTRUCTS_H(structs);
-	if (progress != null) progress.setMessage("Generating structs.c ...");
-	generateSTRUCTS_C(structs);
-	if (progress != null) progress.setMessage("Generating natives ...");
-	generateSWT_C(natives);
-	if (progress != null) progress.setMessage("Generating stats.h ...");
-	generateSTATS_H(natives);
-	if (progress != null) progress.setMessage("Generating stats.c ...");
-	generateSTATS_C(natives);
-	if (progress != null) progress.setMessage("Generating meta data ...");
-	generateMetaData(classes);
-//	if (progress != null) progress.setMessage("Generating embeded meta data ...");
-//	generateEmbededMetaData(classes);
-	if (progress != null) progress.setMessage("Done.");
-	this.progress = null;
-}
-
-String getPackageName(String className) {
-	int dot = mainClassName.lastIndexOf('.');
-	if (dot == -1) return "";
-	return mainClassName.substring(0, dot);
-}
-
-String[] getClassNames(String mainClassName) {
-	String pkgName = getPackageName(mainClassName);
-	String classpath = getClasspath();
-	if (classpath == null) classpath = System.getProperty("java.class.path");
-	String pkgPath = pkgName.replace('.', File.separatorChar);
-	String pkgZipPath = pkgName.replace('.', '/');
-	ArrayList classes = new ArrayList();	
-	int start = 0;
-	int index = 0;
-	while (index < classpath.length()) {
-		index = classpath.indexOf(File.pathSeparatorChar, start);
-		if (index == -1) index = classpath.length();
-		String path = classpath.substring(start, index);
-		if (path.toLowerCase().endsWith(".jar")) {
-			ZipFile zipFile = null;
-			try {
-				zipFile = new ZipFile(path);
-				Enumeration entries = zipFile.entries();
-				while (entries.hasMoreElements()) {
-					ZipEntry entry = (ZipEntry)entries.nextElement();
-					String name = entry.getName();
-					if (name.startsWith(pkgZipPath) && name.indexOf('/', pkgZipPath.length() + 1) == -1 && name.endsWith(".class")) {
-						String className = name.substring(pkgZipPath.length() + 1, name.length() - 6);
-						className.replace('/', '.');
-						classes.add(className);
-					}
-				}
-			} catch (IOException e) {
-			} finally {
-				try {
-					if (zipFile != null) zipFile.close();
-				} catch (IOException ex) {}
-			}
-		} else {
-			File file = new File(path + File.separator + pkgPath);
-			if (file.exists()) {
-				String[] entries = file.list();
-				for (int i = 0; i < entries.length; i++) {
-					String entry = entries[i];
-					File f = new File(file, entry);
-					if (!f.isDirectory()) {
-						if (f.getAbsolutePath().endsWith(".class")) {
-							String className = entry.substring(0, entry.length() - 6);
-							classes.add(className);
-						}
-					}					
-				}
-			}
-		}
-		start = index + 1;
-	}
-	return (String[])classes.toArray(new String[classes.size()]);
-}
-
-public JNIClass[] getClasses() {
-	if (classes != null) return classes;
-	if (mainClassName == null) return new JNIClass[0];
-	if (USE_AST) return getASTClasses();
-	String[] classNames = getClassNames(mainClassName);
-	Arrays.sort(classNames);
-	String packageName = getPackageName(mainClassName);
-	JNIClass[] classes = new JNIClass[classNames.length];
-	for (int i = 0; i < classNames.length; i++) {
-		String className = classNames[i];
-		try {
-			String qualifiedName = packageName + "." + className;
-			if (qualifiedName.equals(mainClassName)) {
-				classes[i] = mainClass;
-			} else {
-				String sourcePath = new File(outputDir).getParent() + "/" + qualifiedName.replace('.', '/') + ".java";
-				classes[i] = new ReflectClass(Class.forName(qualifiedName, false, getClass().getClassLoader()), metaData, sourcePath);
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	return classes;
-}
-
-JNIClass[] getASTClasses() {
-	if (classes != null) return classes;
-	if (mainClassName == null) return new JNIClass[0];
-	String root = new File(outputDir).getParent();
-	String mainPath = new File(root + "/" + mainClassName.replace('.', '/') + ".java").getAbsolutePath();
-	ArrayList classes = new ArrayList();
-	String packageName = getPackageName(mainClassName);
-	File dir = new File(root + "/" + packageName.replace('.', '/'));
-	File[] files = dir.listFiles();
-	for (int i = 0; i < files.length; i++) {
-		File file = files[i];
-		try {
-			String path = file.getAbsolutePath().replace('\\', '/');
-			if (path.endsWith(".java")) {
-				if (mainPath.equals(path)){
-					classes.add(mainClass);
-				} else {
-					classes.add(new ASTClass(path, metaData));
-				}
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-	return (JNIClass[])classes.toArray(new JNIClass[classes.size()]);
-}
-
-public JNIClass[] getNativesClasses(JNIClass[] classes) {
-	if (mainClass == null) return new JNIClass[0];
-	ArrayList result = new ArrayList();
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		JNIMethod[] methods = clazz.getDeclaredMethods();
-		for (int j = 0; j < methods.length; j++) {
-			JNIMethod method = methods[j];
-			int mods = method.getModifiers();
-			if ((mods & Modifier.NATIVE) != 0) {
-				result.add(clazz);
-				break;
-			}
-		}
-	}
-	return (JNIClass[])result.toArray(new JNIClass[result.size()]);
-}
-
-public JNIClass[] getStructureClasses(JNIClass[] classes) {
-	if (mainClass == null) return new JNIClass[0];
-	ArrayList result = new ArrayList();
-	outer:
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		JNIMethod[] methods = clazz.getDeclaredMethods();
-		for (int j = 0; j < methods.length; j++) {
-			JNIMethod method = methods[j];
-			int mods = method.getModifiers();
-			if ((mods & Modifier.NATIVE) != 0) continue outer;
-		}
-		JNIField[] fields = clazz.getDeclaredFields();
-		boolean hasPublicFields = false;
-		for (int j = 0; j < fields.length; j++) {
-			JNIField field = fields[j];
-			int mods = field.getModifiers();
-			if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) == 0) {
-				hasPublicFields = true;
-				break;
-			}
-		}
-		if (!hasPublicFields) continue;
-		result.add(clazz);
-	}
-	return (JNIClass[])result.toArray(new JNIClass[result.size()]);
-}
-
-public void setClasspath(String classpath) {
-	this.classpath = classpath;
-}
-
-public void setMainClass(JNIClass mainClass) {
-	this.mainClass = mainClass;
-}
-
-public void setMetaData(MetaData data) {
-	this.metaData = data;
-}
-
-public void setClasses(JNIClass[] classes) {
-	this.classes = classes;
-}
-
-public void setMainClassName(String str) {
-	mainClassName = str;
-	metaData = new MetaData(mainClassName);
-	String mainClasses = getMetaData().getMetaData("swt_main_classes", null);
-	if (mainClasses != null) {
-		String[] list = JNIGenerator.split(mainClasses, ",");
-		for (int i = 0; i < list.length; i += 2) {
-			if (mainClassName.equals(list[i].trim())) {
-				setOutputDir(list[i + 1].trim());
-			}
-		}
-	}
-	if (mainClassName != null) {
-		try {
-			String sourcePath = new File(outputDir).getParent() + "/" + mainClassName.replace('.', '/') + ".java";
-			if (USE_AST) {
-				mainClass = new ASTClass(sourcePath, metaData);
-			} else {
-				mainClass = new ReflectClass(Class.forName(mainClassName, false, getClass().getClassLoader()), metaData, sourcePath);
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-}
-public void setMainClassName(String str, String outputDir) {
-	mainClassName = str;
-	setOutputDir(outputDir);
-	metaData = new MetaData(mainClassName);
-	try {
-		String sourcePath = new File(this.outputDir).getParent() + "/" + mainClassName.replace('.', '/') + ".java";
-		if (USE_AST) {
-			mainClass = new ASTClass(sourcePath, metaData);
-		} else {
-			mainClass = new ReflectClass(Class.forName(mainClassName, false, getClass().getClassLoader()), metaData, sourcePath);
-		}
-	} catch (Exception e) {
-		e.printStackTrace();
-	}
-}
-
-public void setOutputDir(String str) {
-	if (str != null) {
-		if (!str.endsWith("\\") && !str.endsWith("/") ) {
-			str += File.separator;
-		}
-	}
-	outputDir = str.replace('\\', '/');
-}
-
-public static String getDefaultMainClass() {
-	return "org.eclipse.swt.internal." + getDefaultPlatform() + ".OS";
-}
-
-public static String getDefaultPlatform() {
-	return SWT.getPlatform();
-}
-
-public static void main(String[] args) {
-	JNIGeneratorApp gen = new JNIGeneratorApp ();
-	if (args.length == 1 && (args[0].equals("*") || args[0].equals("all"))) {
-		gen.generateAll();
-		return;
-	}
-	if (args.length > 0) {
-		gen.setMainClassName(args[0]);
-		if (args.length > 1) gen.setOutputDir(args[1]);
-		if (args.length > 2) gen.setClasspath(args[2]);
-	} else {
-		gen.setMainClassName(getDefaultMainClass());
-	}
-	gen.generate();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
deleted file mode 100644
index ff548e5..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java	
+++ /dev/null
@@ -1,1241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-
-public class JNIGeneratorAppUI {
-
-	Display display;
-	Shell shell;
-	
-	Composite actionsPanel;
-	Combo mainClassCb, outputDirCb;
-	Table classesLt, membersLt, paramsLt;
-	ProgressBar progressBar;
-	Label progressLabel;
-	FileDialog fileDialog;
-	
-	TableEditor paramTextEditor, memberTextEditor, classTextEditor;
-	FlagsEditor paramListEditor, memberListEditor, classListEditor;
-	Text paramEditorTx, memberEditorTx, classEditorTx;
-	List paramEditorLt, memberEditorLt, classEditorLt;
-	
-	static class FlagsEditor {
-		Table parent;
-		int column = -1;
-		TableItem item;
-		
-		public FlagsEditor(Table parent) {
-			this.parent = parent;
-		}
-		
-		public int getColumn() {
-			return column;
-		}
-		
-		public TableItem getItem() {
-			return item;
-		}
-		
-		public void setColumn(int column) {
-			this.column = column;
-		}
-		
-		public void setItem(TableItem item) {
-			this.item = item;
-		}
-	}
-	
-	JNIGeneratorApp app;
-
-	static final int CLASS_NAME_COLUMN = 0;
-	static final int CLASS_FLAGS_COLUMN = 1;
-	static final int CLASS_EXCLUDE_COLUMN = 2;
-	
-	static final int FIELD_NAME_COLUMN = 0;
-	static final int FIELD_FLAGS_COLUMN = 1;
-	static final int FIELD_CAST_COLUMN = 2;
-	static final int FIELD_ACCESSOR_COLUMN = 3;
-	static final int FIELD_EXCLUDE_COLUMN = 4;
-	
-	static final int METHOD_NAME_COLUMN = 0;
-	static final int METHOD_FLAGS_COLUMN = 1;
-	static final int METHOD_ACCESSOR_COLUMN = 2;
-	static final int METHOD_EXCLUDE_COLUMN = 3;
-	
-	static final int PARAM_INDEX_COLUMN = 0;
-	static final int PARAM_TYPE_COLUMN = 1;
-	static final int PARAM_FLAGS_COLUMN = 2;
-	static final int PARAM_CAST_COLUMN = 3;
-	
-public JNIGeneratorAppUI() {
-	this (new JNIGeneratorApp());
-}
-
-public JNIGeneratorAppUI(JNIGeneratorApp app) {
-	this.app = app;
-}
-
-void cleanup() {
-	display.dispose();
-}
-
-void generateStructsHeader () {
-	StructsGenerator gen = new StructsGenerator(true);
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	gen.setClasses(getSelectedClasses());
-	gen.generate();
-}
-
-void generateStructs () {
-	StructsGenerator gen = new StructsGenerator(false);
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	gen.setClasses(getSelectedClasses());
-	gen.generate();
-}
-
-void generateSizeof () {
-	SizeofGenerator gen = new SizeofGenerator();
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	gen.setClasses(getSelectedClasses());
-	gen.generate();
-}
-
-void generateMetaData () {
-	MetaDataGenerator gen = new MetaDataGenerator();
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	JNIMethod[] methods = getSelectedMethods();
-	if (methods.length != 0) {
-		gen.generate(methods);
-	} else {
-		gen.setClasses(getSelectedClasses());
-		gen.generate();
-	}
-}
-
-void generateNatives () {
-	NativesGenerator gen = new NativesGenerator();
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	JNIMethod[] methods = getSelectedMethods();
-	if (methods.length != 0) {
-		gen.generate(methods);
-	} else {
-		gen.setClasses(getSelectedClasses());
-		gen.generate();
-	}
-}
-
-void generateAll() {
-	if (!updateOutputDir()) return;
-	Cursor cursor = display.getSystemCursor(SWT.CURSOR_WAIT);
-	shell.setCursor(cursor);
-	shell.setEnabled(false);
-	Control[] children = actionsPanel.getChildren();
-	for (int i = 0; i < children.length; i++) {
-		Control child = children[i];
-		if (child instanceof Button) child.setEnabled(false);				
-	}
-	boolean showProgress = true;
-	final boolean finalShowProgress = showProgress; /* avoid dead code warning below */
-	if (showProgress) {
-		progressLabel.setText("");
-		progressBar.setSelection(0);
-		progressLabel.setVisible(true);
-		progressBar.setVisible(true);
-	}
-	final boolean[] done = new boolean[1];
-	new Thread() {
-		public void run() {
-			try {
-				app.generate(!finalShowProgress ? null : new ProgressMonitor() {
-					int total, step, maximum = 100;
-					public void setTotal(final int total) {
-						this.total = total;
-						display.syncExec(new Runnable() {
-							public void run() {
-								progressBar.setMaximum(maximum);
-							}
-						});
-					}
-					public void step() {
-						int oldValue = step * maximum / total;
-						step++;
-						final int newValue = step * maximum / total;
-						if (oldValue == newValue) return;
-						display.syncExec(new Runnable() {
-							public void run() {
-								progressBar.setSelection(newValue);
-							}
-						});					
-					}
-					public void setMessage(final String message) {
-						display.syncExec(new Runnable() {
-							public void run() {
-								progressLabel.setText(message);
-								progressLabel.update();
-							}
-						});
-					}
-				});
-			} finally {
-				done[0] = true;
-				display.wake();
-			}
-		}
-	}.start();
-	while (!done[0]) {
-		if (!display.readAndDispatch()) display.sleep();
-	}
-	for (int i = 0; i < children.length; i++) {
-		Control child = children[i];
-		if (child instanceof Button) child.setEnabled(true);				
-	}
-	if (showProgress) {
-		progressBar.setVisible(false);
-		progressLabel.setVisible(false);
-	}
-	shell.setEnabled(true);
-	shell.setCursor(null);
-}
-
-void generateConstants () {
-	ConstantsGenerator gen = new ConstantsGenerator();
-	gen.setMainClass(app.getMainClass());
-	gen.setMetaData(app.getMetaData());
-	JNIField[] fields = getSelectedFields();
-	if (fields.length != 0) {
-		gen.generate(fields);
-	} else {
-		gen.setClasses(getSelectedClasses());
-		gen.generate();
-	}
-}
-
-JNIClass[] getSelectedClasses() {
-	TableItem[] items = classesLt.getSelection();
-	JNIClass[] classes = new JNIClass[items.length];
-	for (int i = 0; i < items.length; i++) {
-		TableItem item = items[i];
-		classes[i] = (JNIClass)item.getData();
-	}
-	return classes;
-}
-
-JNIMethod[] getSelectedMethods() {
-	TableItem[] selection = membersLt.getSelection();
-	JNIMethod[] methods = new JNIMethod[selection.length];
-	int count = 0;
-	for (int i = 0; i < selection.length; i++) {
-		TableItem item = selection [i];
-		Object data = item.getData();
-		if (data instanceof JNIMethod) {
-			methods[count++] = (JNIMethod)data;
-		}
-	}
-	if (count != methods.length) {
-		JNIMethod[] result = new JNIMethod[count];
-		System.arraycopy(methods, 0, result, 0, count);
-		methods = result;
-	}
-	return methods;
-}
-
-JNIField[] getSelectedFields() {
-	TableItem[] selection = membersLt.getSelection();
-	JNIField[] fields = new JNIField[selection.length];
-	int count = 0;
-	for (int i = 0; i < selection.length; i++) {
-		TableItem item = selection [i];
-		Object data = item.getData();
-		if (data instanceof JNIField) {
-			fields[count++] = (JNIField)data;
-		}
-	}
-	if (count != fields.length) {
-		JNIField[] result = new JNIField[count];
-		System.arraycopy(fields, 0, result, 0, count);
-		fields = result;
-	}
-	return fields;
-}
-
-public void open () {
-	display = new Display();
-	shell = new Shell(display);
-	shell.setText("JNI Generator");
-
-	GridData data;
-	GridLayout shellLayout = new GridLayout();
-	shellLayout.numColumns = 2;
-	shell.setLayout(shellLayout);
-	
-	Composite panel = new Composite(shell, SWT.NONE);
-	data = new GridData(GridData.FILL_BOTH);
-	panel.setLayoutData(data);
-	
-	GridLayout panelLayout = new GridLayout();
-	panelLayout.numColumns = 1;
-	panel.setLayout(panelLayout);
-	
-	Listener updateMainClassListener =  new Listener() {
-		public void handleEvent(Event e) {
-			updateMainClass();
-			if (!updateOutputDir()) return;
-			updateClasses();
-			updateMembers();
-			updateParameters();
-		}
-	};	
-	createMainClassPanel(panel, updateMainClassListener);
-	createClassesPanel(panel);
-	createMembersPanel(panel);
-	createParametersPanel(panel);
-	createActionButtons(shell);
-
-	Point preferredSize = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-	shell.setSize(shell.getSize().x, preferredSize.y);
-	
-	updateMainClass();
-	updateClasses();
-	updateMembers();
-	updateParameters();
-}
-
-void createMainClassPanel(Composite panel, Listener updateListener) {
-	Label mainClassLb = new Label(panel, SWT.NONE);
-	mainClassLb.setText("&Main Class:");
-
-	GridData data;
-	mainClassCb = new Combo(panel, SWT.DROP_DOWN);
-	String mainClass = app.getMainClassName();
-	mainClassCb.setText(mainClass == null ? "" : mainClass);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	mainClassCb.setLayoutData(data);
-	mainClassCb.addListener(SWT.Selection, updateListener);
-	mainClassCb.addListener(SWT.DefaultSelection, updateListener);
-
-	Label outputDirLb = new Label(panel, SWT.NONE);
-	outputDirLb.setText("&Output Dir:");
-	
-	outputDirCb = new Combo(panel, SWT.DROP_DOWN);
-	String outputDir = app.getOutputDir();
-	outputDirCb.setText(outputDir == null ? "" : outputDir);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	outputDirCb.setLayoutData(data);
-	outputDirCb.addListener(SWT.Selection, updateListener);
-	outputDirCb.addListener(SWT.DefaultSelection, updateListener);
-
-	String mainClasses = app.getMetaData().getMetaData("swt_main_classes", null);
-	if (mainClasses != null) {
-		String[] list = JNIGenerator.split(mainClasses, ",");
-		for (int i = 0; i < list.length; i += 2) {
-			String className = list[i].trim();
-			try {
-				Class.forName(className, false, getClass().getClassLoader());
-				mainClassCb.add(className);
-				outputDirCb.add(list[i + 1].trim());
-			} catch (Exception e) {}
-		}
-	}
-}
-
-void createClassesPanel(Composite panel) {
-	Label classesLb = new Label(panel, SWT.NONE);
-	classesLb.setText("&Classes:");
-
-	GridData data;
-	classesLt = new Table(panel, SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
-	data = new GridData(GridData.FILL_BOTH);
-	data.heightHint = classesLt.getItemHeight() * 6;
-	classesLt.setLayoutData(data);
-	classesLt.setHeaderVisible(true);
-	classesLt.addListener(SWT.Selection, new Listener() {
-		public void handleEvent(Event e) {
-			if (e.detail == SWT.CHECK) {
-				updateGenerate((TableItem)e.item);
-			} else {
-				updateMembers();
-				updateParameters();
-			}
-		}
-	});
-	TableColumn column;
-	column = new TableColumn(classesLt, SWT.NONE, CLASS_NAME_COLUMN);
-	column.setText("Class");
-	column = new TableColumn(classesLt, SWT.NONE, CLASS_FLAGS_COLUMN);
-	column.setText("Flags");
-	/*
-	column = new TableColumn(classesLt, SWT.NONE, CLASS_EXCLUDE_COLUMN);
-	column.setText("Exclude");
-	*/
-	
-	classTextEditor = new TableEditor(classesLt);
-	classTextEditor.grabHorizontal = true;
-	classEditorTx = new Text(classesLt, SWT.SINGLE);
-	classTextEditor.setEditor(classEditorTx);
-	Listener classTextListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_ESCAPE:
-						classTextEditor.setItem(null);
-						break;
-					default:
-						return;
-				}
-			}
-			classEditorTx.setVisible(false);
-			TableItem item = classTextEditor.getItem();
-			if (item == null) return;
-			int column = classTextEditor.getColumn();
-			JNIClass clazz = (JNIClass)item.getData();
-			if (column == CLASS_EXCLUDE_COLUMN) {
-				String text = classEditorTx.getText();
-				clazz.setExclude(text);
-				item.setText(column, clazz.getExclude());
-				classesLt.getColumn(column).pack();
-			}
-		}
-	};
-	classEditorTx.addListener(SWT.DefaultSelection, classTextListener);
-	classEditorTx.addListener(SWT.FocusOut, classTextListener);
-	classEditorTx.addListener(SWT.Traverse, classTextListener);
-	
-	final Shell floater = new Shell(shell, SWT.NO_TRIM);
-	floater.setLayout(new FillLayout());
-	classListEditor = new FlagsEditor(classesLt);
-	classEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
-	classEditorLt.setItems(JNIClass.FLAGS);
-	floater.pack();
-	floater.addListener(SWT.Close, new Listener() {
-		public void handleEvent(Event e) {
-			classListEditor.setItem(null);
-			e.doit = false;
-			floater.setVisible(false);
-		}
-	});
-	Listener classesListListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_RETURN:
-						break;
-					default:
-						return;
-				}
-			}
-			floater.setVisible(false);
-			TableItem item = classListEditor.getItem();
-			if (item == null) return;
-			int column = classListEditor.getColumn();
-			JNIClass clazz = (JNIClass)item.getData();
-			if (column == CLASS_FLAGS_COLUMN) {
-				String[] flags = classEditorLt.getSelection();
-				clazz.setFlags(flags);
-				item.setText(column, getFlagsString(clazz.getFlags()));
-				item.setChecked(clazz.getGenerate());
-				classesLt.getColumn(column).pack();
-			}
-		}
-	};
-	classEditorLt.addListener(SWT.DefaultSelection, classesListListener);
-	classEditorLt.addListener(SWT.FocusOut, classesListListener);
-	classEditorLt.addListener(SWT.Traverse, classesListListener);
-
-	classesLt.addListener(SWT.MouseDown, new Listener() {
-		public void handleEvent(final Event e) {
-			e.display.asyncExec (new Runnable () {
-				public void run () {
-					if (classesLt.isDisposed ()) return;
-					if (e.button != 1) return;
-					Point pt = new Point(e.x, e.y);
-					TableItem item = classesLt.getItem(pt);
-					if (item == null) return;
-					int column = -1;
-					for (int i = 0; i < classesLt.getColumnCount(); i++) {
-						if (item.getBounds(i).contains(pt)) {
-							column = i;
-							break;
-						}				
-					}
-					if (column == -1) return;
-					JNIClass data = (JNIClass)item.getData();
-					if (column == CLASS_EXCLUDE_COLUMN) {
-						classTextEditor.setColumn(column);
-						classTextEditor.setItem(item);
-						classEditorTx.setText(data.getExclude());
-						classEditorTx.selectAll();
-						classEditorTx.setVisible(true);
-						classEditorTx.setFocus();
-					} else if (column == CLASS_FLAGS_COLUMN) {
-						classListEditor.setColumn(column);
-						classListEditor.setItem(item);
-						classEditorLt.setSelection(data.getFlags());
-						floater.setLocation(classesLt.toDisplay(e.x, e.y));
-						floater.setVisible(true);
-						classEditorLt.setFocus();
-					}
-				}
-			});
-		}
-	});
-}
-
-void createMembersPanel(Composite panel) {
-	GridData data;
-	Composite comp = new Composite(panel, SWT.NONE);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	comp.setLayoutData(data);	
-	GridLayout layout = new GridLayout(2, false);
-	layout.marginWidth = layout.marginHeight = 0;
-	comp.setLayout(layout);
-	Label membersLb = new Label(comp, SWT.NONE);
-	membersLb.setText("Mem&bers [regex]:");
-	final Text searchText = new Text(comp, SWT.SINGLE | SWT.SEARCH);
-	searchText.setText(".*");
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	searchText.setLayoutData(data);
-	searchText.addListener(SWT.DefaultSelection, new Listener() {
-		boolean match (int index, String pattern) {
-			TableItem item = membersLt.getItem(index);
-			String text = item.getText();
-			try {
-				if (text.matches(pattern)) {
-					membersLt.setSelection(index);
-					return true;
-				}
-			} catch (Exception ex) {}
-			return false;
-		}
-		public void handleEvent(Event e) {
-			String pattern = searchText.getText();
-			int selection = membersLt.getSelectionIndex();
-			int count = membersLt.getItemCount();
-			selection++;
-			for (int i = selection; i < count; i++) {
-				if (match (i, pattern)) return;
-			}
-			for (int i = 0; i < selection; i++) {
-				if (match (i, pattern)) return;
-			}
-		}
-	});
-
-	membersLt = new Table(panel, SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
-	data = new GridData(GridData.FILL_BOTH);
-	data.heightHint = membersLt.getItemHeight() * 6;
-	membersLt.setLayoutData(data);
-	membersLt.addListener(SWT.Selection, new Listener() {
-		public void handleEvent(Event e) {
-			if (e.detail == SWT.CHECK) {
-				updateGenerate((TableItem)e.item);
-			} else {
-				updateParameters();
-			}
-		}
-	});
-	
-	memberTextEditor = new TableEditor(membersLt);
-	memberTextEditor.grabHorizontal = true;
-	memberEditorTx = new Text(membersLt, SWT.SINGLE);
-	memberTextEditor.setEditor(memberEditorTx);
-	Listener memberTextListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_ESCAPE:
-						memberTextEditor.setItem(null);
-						break;
-					default:
-						return;
-				}
-			}
-			memberEditorTx.setVisible(false);
-			TableItem item = memberTextEditor.getItem();
-			if (item == null) return;
-			int column = memberTextEditor.getColumn();
-			JNIItem memberData = (JNIItem)item.getData();
-			String text = memberEditorTx.getText();
-			if (memberData instanceof JNIField) {
-				JNIField field = (JNIField)memberData;
-				switch (column) {
-					case FIELD_CAST_COLUMN: {
-						field.setCast(text);
-						item.setText(column, field.getCast());
-						break;
-					}
-					case FIELD_ACCESSOR_COLUMN: {
-						field.setAccessor(text.equals(field.getName()) ? "" : text);
-						item.setText(column, field.getAccessor());
-						break;
-					}
-					case FIELD_EXCLUDE_COLUMN: {
-						field.setExclude(text);
-						item.setText(column, field.getExclude());
-						break;
-					}
-				}
-				membersLt.getColumn(column).pack();
-			} else if (memberData instanceof JNIMethod) {
-				JNIMethod method = (JNIMethod)memberData;
-				switch (column) {
-					case METHOD_ACCESSOR_COLUMN: {
-						method.setAccessor(text.equals(method.getName()) ? "" : text);
-						item.setText(column, method.getAccessor());
-						break;
-					}
-					case METHOD_EXCLUDE_COLUMN: {
-						method.setExclude(text);
-						item.setText(column, method.getExclude());
-						break;
-					}
-				}
-				membersLt.getColumn(column).pack();
-			}
-		}
-	};
-	memberEditorTx.addListener(SWT.DefaultSelection, memberTextListener);
-	memberEditorTx.addListener(SWT.FocusOut, memberTextListener);
-	memberEditorTx.addListener(SWT.Traverse, memberTextListener);
-	
-	final Shell floater = new Shell(shell, SWT.NO_TRIM);
-	floater.setLayout(new FillLayout());
-	memberListEditor = new FlagsEditor(membersLt);
-	memberEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
-	floater.addListener(SWT.Close, new Listener() {
-		public void handleEvent(Event e) {
-			memberListEditor.setItem(null);
-			e.doit = false;
-			floater.setVisible(false);
-		}
-	});
-	Listener memberListListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_RETURN:
-						break;
-					default:
-						return;
-				}
-			}
-			floater.setVisible(false);
-			TableItem item = memberListEditor.getItem();
-			if (item == null) return;
-			int column = memberListEditor.getColumn();
-			JNIItem data = (JNIItem)item.getData();
-			String[] flags = memberEditorLt.getSelection();
-			data.setFlags(flags);
-			item.setText(column, getFlagsString(data.getFlags()));
-			item.setChecked(data.getGenerate());
-			membersLt.getColumn(column).pack();
-		}
-	};
-	memberEditorLt.addListener(SWT.DefaultSelection, memberListListener);
-	memberEditorLt.addListener(SWT.FocusOut, memberListListener);
-	memberEditorLt.addListener(SWT.Traverse, memberListListener);
-	
-	membersLt.addListener(SWT.MouseDown, new Listener() {
-		public void handleEvent(final Event e) {
-			e.display.asyncExec (new Runnable () {
-				public void run () {
-					if (membersLt.isDisposed ()) return;
-					if (e.button != 1) return;
-					Point pt = new Point(e.x, e.y);
-					TableItem item = membersLt.getItem(pt);
-					if (item == null) return;
-					int column = -1;
-					for (int i = 0; i < membersLt.getColumnCount(); i++) {
-						if (item.getBounds(i).contains(pt)) {
-							column = i;
-							break;
-						}				
-					}
-					if (column == -1) return;
-					Object itemData = item.getData();
-					if (itemData instanceof JNIField) {
-						JNIField field = (JNIField)itemData;
-						if (column == FIELD_CAST_COLUMN || column == FIELD_ACCESSOR_COLUMN || column == FIELD_EXCLUDE_COLUMN) {
-							memberTextEditor.setColumn(column);
-							memberTextEditor.setItem(item);
-							String text = "";
-							switch (column) {
-								case FIELD_CAST_COLUMN: text = field.getCast(); break;
-								case FIELD_ACCESSOR_COLUMN: {
-									text = field.getAccessor(); 
-									if (text.length() == 0) {
-										text = field.getName();
-										int index = text.lastIndexOf('_');
-										if (index != -1) {
-											char[] chars = text.toCharArray();
-											chars[index] = '.';
-											text = new String(chars);
-										}
-									}
-									break;
-								}
-								case FIELD_EXCLUDE_COLUMN: text = field.getExclude(); break;
-							}
-							memberEditorTx.setText(text);
-							memberEditorTx.selectAll();
-							memberEditorTx.setVisible(true);
-							memberEditorTx.setFocus();
-						} else if (column == FIELD_FLAGS_COLUMN) {
-							memberListEditor.setColumn(column);
-							memberListEditor.setItem(item);
-							memberEditorLt.setItems(JNIField.FLAGS);
-							memberEditorLt.setSelection(field.getFlags());
-							floater.setLocation(membersLt.toDisplay(e.x, e.y));
-							floater.pack();
-							floater.setVisible(true);
-							memberEditorLt.setFocus();
-						}
-					} else if (itemData instanceof JNIMethod) {
-						JNIMethod method = (JNIMethod)itemData;
-						if (column == METHOD_EXCLUDE_COLUMN || column == METHOD_ACCESSOR_COLUMN) {
-							memberTextEditor.setColumn(column);
-							memberTextEditor.setItem(item);
-							String text = "";
-							switch (column) {
-								case METHOD_ACCESSOR_COLUMN: {
-									text = method.getAccessor();
-									if (text.length() == 0) text = method.getName();
-									break;
-								}
-								case METHOD_EXCLUDE_COLUMN: text = method.getExclude(); break;
-							}
-							memberEditorTx.setText(text);
-							memberEditorTx.selectAll();
-							memberEditorTx.setVisible(true);
-							memberEditorTx.setFocus();
-						} else if (column == METHOD_FLAGS_COLUMN) {
-							memberListEditor.setColumn(column);
-							memberListEditor.setItem(item);
-							memberEditorLt.setItems(JNIMethod.FLAGS);
-							memberEditorLt.setSelection(method.getFlags());
-							floater.setLocation(membersLt.toDisplay(e.x, e.y));
-							floater.pack();
-							floater.setVisible(true);
-							memberEditorLt.setFocus();
-						}
-					}
-				}
-			});
-		}
-	});
-}
-
-void createParametersPanel(Composite panel) {
-	Label paramsLb = new Label(panel, SWT.NONE);
-	paramsLb.setText("&Parameters:");
-	
-	GridData data;
-	paramsLt = new Table(panel, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
-	data = new GridData(GridData.FILL_BOTH);
-	int itemHeight = paramsLt.getItemHeight();
-	data.heightHint = itemHeight * 6;
-	paramsLt.setLayoutData(data);
-	paramsLt.addListener(SWT.Selection, new Listener() {
-		public void handleEvent(Event e) {
-			if (e.detail == SWT.CHECK) {
-				updateGenerate((TableItem)e.item);
-			}
-		}
-	});
-
-	TableColumn column;
-	column = new TableColumn(paramsLt, SWT.NONE, PARAM_INDEX_COLUMN);
-	column = new TableColumn(paramsLt, SWT.NONE, PARAM_TYPE_COLUMN);
-	column.setText("Type");
-	column = new TableColumn(paramsLt, SWT.NONE, PARAM_FLAGS_COLUMN);
-	column.setText("Flags");
-	column = new TableColumn(paramsLt, SWT.NONE, PARAM_CAST_COLUMN);
-	column.setText("Cast");
-	
-	paramTextEditor = new TableEditor(paramsLt);
-	paramTextEditor.grabHorizontal = true;
-	paramEditorTx = new Text(paramsLt, SWT.SINGLE);
-	paramTextEditor.setEditor(paramEditorTx);
-	Listener paramTextListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_ESCAPE:
-						paramTextEditor.setItem(null);
-						break;
-					default:
-						return;
-				}
-			}
-			paramEditorTx.setVisible(false);
-			TableItem item = paramTextEditor.getItem();
-			if (item == null) return;
-			int column = paramTextEditor.getColumn();
-			JNIParameter param = (JNIParameter)item.getData();
-			if (column == PARAM_CAST_COLUMN) {
-				String text = paramEditorTx.getText();
-				param.setCast(text);
-				item.setText(column, param.getCast());
-				paramsLt.getColumn(column).pack();
-			}
-		}
-	};
-	paramEditorTx.addListener(SWT.DefaultSelection, paramTextListener);
-	paramEditorTx.addListener(SWT.FocusOut, paramTextListener);
-	paramEditorTx.addListener(SWT.Traverse, paramTextListener);
-	
-	final Shell floater = new Shell(shell, SWT.NO_TRIM);
-	floater.setLayout(new FillLayout());
-	paramListEditor = new FlagsEditor(paramsLt);
-	paramEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
-	paramEditorLt.setItems(JNIParameter.FLAGS);
-	floater.pack();
-	floater.addListener(SWT.Close, new Listener() {
-		public void handleEvent(Event e) {
-			paramListEditor.setItem(null);
-			e.doit = false;
-			floater.setVisible(false);
-		}
-	});
-	Listener paramListListener = new Listener() {
-		public void handleEvent(Event e) {
-			if (e.type == SWT.Traverse) {
-				switch (e.detail) {
-					case SWT.TRAVERSE_RETURN:
-						break;
-					default:
-						return;
-				}
-			}
-			floater.setVisible(false);
-			TableItem item = paramListEditor.getItem();
-			if (item == null) return;
-			int column = paramListEditor.getColumn();
-			JNIParameter param = (JNIParameter)item.getData();
-			if (column == PARAM_FLAGS_COLUMN) {
-				String[] flags = paramEditorLt.getSelection();
-				param.setFlags(flags);
-				item.setText(column, getFlagsString(param.getFlags()));
-				paramsLt.getColumn(column).pack();
-			}
-		}
-	};
-	paramEditorLt.addListener(SWT.DefaultSelection, paramListListener);
-	paramEditorLt.addListener(SWT.FocusOut, paramListListener);
-	paramEditorLt.addListener(SWT.Traverse, paramListListener);
-
-	paramsLt.addListener(SWT.MouseDown, new Listener() {
-		public void handleEvent(final Event e) {
-			e.display.asyncExec (new Runnable () {
-				public void run () {
-					if (paramsLt.isDisposed ()) return;
-					if (e.button != 1) return;
-					Point pt = new Point(e.x, e.y);
-					TableItem item = paramsLt.getItem(pt);
-					if (item == null) return;
-					int column = -1;
-					for (int i = 0; i < paramsLt.getColumnCount(); i++) {
-						if (item.getBounds(i).contains(pt)) {
-							column = i;
-							break;
-						}				
-					}
-					if (column == -1) return;
-					JNIParameter param = (JNIParameter)item.getData();
-					if (column == PARAM_CAST_COLUMN) {
-						paramTextEditor.setColumn(column);
-						paramTextEditor.setItem(item);
-						paramEditorTx.setText(param.getCast());
-						paramEditorTx.selectAll();
-						paramEditorTx.setVisible(true);
-						paramEditorTx.setFocus();
-					} else if (column == PARAM_FLAGS_COLUMN) {
-						paramListEditor.setColumn(column);
-						paramListEditor.setItem(item);
-						paramEditorLt.setSelection(param.getFlags());
-						floater.setLocation(paramsLt.toDisplay(e.x, e.y));
-						floater.setVisible(true);
-						paramEditorLt.setFocus();
-					}
-				}
-			});
-		}
-	});
-}
-
-Button createActionButton(Composite parent, String text, Listener listener) {
-	Button action = new Button(parent, SWT.PUSH);
-	action.setText(text);
-	GridData data = new GridData(GridData.FILL_HORIZONTAL);
-	action.setLayoutData(data);
-	action.addListener(SWT.Selection, listener);
-	return action;
-}
-
-void createActionButtons(Composite parent) {		
-	actionsPanel = new Composite(parent, SWT.NONE);
-
-	GridData data = new GridData(GridData.FILL_VERTICAL);
-	actionsPanel.setLayoutData(data);
-		
-	GridLayout actionsLayout = new GridLayout();
-	actionsLayout.numColumns = 1;
-	actionsPanel.setLayout(actionsLayout);
-	
-	createActionButton(actionsPanel, "Generate &All", new Listener() {
-		public void handleEvent(Event e) {
-			generateAll();
-		}
-	});
-	
-	Label separator = new Label(actionsPanel, SWT.SEPARATOR | SWT.HORIZONTAL);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	separator.setLayoutData(data);
-	separator = new Label(actionsPanel, SWT.SEPARATOR | SWT.HORIZONTAL);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	separator.setLayoutData(data);
-	
-	createActionButton(actionsPanel, "Generate Structs &Header", new Listener() {
-		public void handleEvent(Event e) {
-			generateStructsHeader();
-		}
-	});
-	createActionButton(actionsPanel, "Generate &Structs", new Listener() {
-		public void handleEvent(Event e) {
-			generateStructs();
-		}
-	});
-	createActionButton(actionsPanel, "Generate &Natives", new Listener() {
-		public void handleEvent(Event e) {
-			generateNatives();
-		}
-	});
-	createActionButton(actionsPanel, "Generate Meta &Data", new Listener() {
-		public void handleEvent(Event e) {
-			generateMetaData();
-		}
-	});
-	createActionButton(actionsPanel, "Generate Cons&tants", new Listener() {
-		public void handleEvent(Event e) {
-			generateConstants();
-		}
-	});	
-	createActionButton(actionsPanel, "Generate Si&zeof", new Listener() {
-		public void handleEvent(Event e) {
-			generateSizeof();
-		}
-	});
-
-	Composite filler = new Composite(actionsPanel, SWT.NONE);
-	filler.setLayoutData(new GridData(GridData.FILL_BOTH));
-	
-	progressLabel = new Label(actionsPanel, SWT.NONE);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	progressLabel.setLayoutData(data);
-	progressLabel.setVisible(false);
-	
-	progressBar = new ProgressBar(actionsPanel, SWT.NONE);
-	data = new GridData(GridData.FILL_HORIZONTAL);
-	progressBar.setLayoutData(data);
-	progressBar.setVisible(false);
-}
-
-public void run() {
-	shell.open();
-	MessageBox box = new MessageBox(shell, SWT.YES | SWT.NO);
-	box.setText("Warning");
-	box.setMessage("This tool is obsolete as of Eclipse 3.5 M2.\nThe meta data has been embedded in java source files.\nThere is a new plugin tool that replaces this tool.\nSee http://www.eclipse.org/swt/jnigen.php.\n\n Continue?");
-	int result = box.open();
-	if (result == SWT.NO) {
-		shell.dispose();
-	}
-	while (!shell.isDisposed()) {
-		if (!display.readAndDispatch()) display.sleep ();
-	}
-	cleanup();
-}
-
-String getPackageString(String className) {
-	int dot = app.getMainClassName().lastIndexOf('.');
-	if (dot == -1) return "";
-	return app.getMainClassName().substring(0, dot);
-}
-
-String getClassString(JNIType type) {
-	String name = type.getTypeSignature3(false);
-	int index = name.lastIndexOf('.');
-	if (index == -1) return name;
-	return name.substring(index + 1, name.length());
-}
-
-String getFlagsString(String[] flags) {
-	if (flags.length == 0) return "";
-	StringBuffer buffer = new StringBuffer();
-	for (int j = 0; j < flags.length; j++) {
-		String flag = flags[j];
-		if (buffer.length() != 0) buffer.append(", ");
-		buffer.append(flag);
-	}
-	return buffer.toString();
-}
-
-String getMethodString(JNIMethod method) {
-	String pkgName = getPackageString(method.getDeclaringClass().getName());
-	StringBuffer buffer = new StringBuffer();
-	buffer.append(method.getName());
-	buffer.append("(");
-	JNIParameter[] params = method.getParameters();
-	for (int i = 0; i < params.length; i++) {
-		JNIParameter param = params[i];
-		if (i != 0) buffer.append(",");
-		String string = param.getType().getTypeSignature3(false);
-		if (string.startsWith(pkgName)) string = string.substring(pkgName.length() + 1);
-		buffer.append(string);
-	}
-	buffer.append(")");
-	return buffer.toString();
-}
-
-String getFieldString(JNIField field) {
-	return field.getName();
-}
-
-void updateClasses() {
-	classesLt.removeAll();
-	JNIClass[] classes = app.getClasses();
-	int mainIndex = 0;
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		if (clazz.equals(app.getMainClass())) mainIndex = i;
-		TableItem item = new TableItem(classesLt, SWT.NONE);
-		item.setData(clazz);
-		item.setText(CLASS_NAME_COLUMN, clazz.getSimpleName());
-		item.setText(CLASS_FLAGS_COLUMN, getFlagsString(clazz.getFlags()));
-		item.setChecked(clazz.getGenerate());
-	}
-	TableColumn[] columns = classesLt.getColumns();
-	for (int i = 0; i < columns.length; i++) {
-		TableColumn column = columns[i];
-		column.pack();
-	}
-	classesLt.setSelection(mainIndex);
-}
-
-void updateMembers() {
-	membersLt.removeAll();
-	membersLt.setHeaderVisible(false);
-	TableColumn[] columns = membersLt.getColumns();
-	for (int i = 0; i < columns.length; i++) {
-		TableColumn column = columns[i];
-		column.dispose();
-	}
-	int[] indices = classesLt.getSelectionIndices();
-	if (indices.length != 1) return;
-	TableItem classItem = classesLt.getItem(indices[0]);
-	JNIClass clazz = (JNIClass)classItem.getData();
-	boolean hasNatives = false;
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		int mods = method.getModifiers();
-		if (hasNatives =((mods & Modifier.NATIVE) != 0)) break;
-	}
-	membersLt.setRedraw(false);
-	if (hasNatives) {
-		TableColumn column;
-		column = new TableColumn(membersLt, SWT.NONE, METHOD_NAME_COLUMN);
-		column.setText("Method");
-		column = new TableColumn(membersLt, SWT.NONE, METHOD_FLAGS_COLUMN);
-		column.setText("Flags");
-		column = new TableColumn(membersLt, SWT.NONE, METHOD_ACCESSOR_COLUMN);
-		column.setText("Accessor");
-		/*
-		column = new TableColumn(membersLt, SWT.NONE, METHOD_EXCLUDE_COLUMN);
-		column.setText("Exclude");
-		*/
-		JNIGenerator.sort(methods);
-		for (int i = 0; i < methods.length; i++) {
-			JNIMethod method = methods[i];
-			if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-			TableItem item = new TableItem(membersLt, SWT.NONE);
-			item.setData(method);
-			item.setText(METHOD_NAME_COLUMN, getMethodString(method));
-			item.setChecked(method.getGenerate());
-			item.setText(METHOD_FLAGS_COLUMN, getFlagsString(method.getFlags()));
-			item.setText(METHOD_ACCESSOR_COLUMN, method.getAccessor());
-			/*
-			item.setText(METHOD_EXCLUDE_COLUMN, methodData.getExclude());
-			*/
-		}
-	} else {
-		TableColumn column;
-		column = new TableColumn(membersLt, SWT.NONE, FIELD_NAME_COLUMN);
-		column.setText("Field");
-		column = new TableColumn(membersLt, SWT.NONE, FIELD_FLAGS_COLUMN);
-		column.setText("Flags");
-		column = new TableColumn(membersLt, SWT.NONE, FIELD_CAST_COLUMN);
-		column.setText("Cast");
-		column = new TableColumn(membersLt, SWT.NONE, FIELD_ACCESSOR_COLUMN);
-		column.setText("Accessor");
-		/*
-		column = new TableColumn(membersLt, SWT.NONE, FIELD_EXCLUDE_COLUMN);
-		column.setText("Exclude");
-		*/
-		JNIField[] fields = clazz.getDeclaredFields();	
-		for (int i = 0; i < fields.length; i++) {
-			JNIField field = fields[i];
-			int mods = field.getModifiers(); 
-			if (((mods & Modifier.PUBLIC) == 0) ||
-				((mods & Modifier.FINAL) != 0) ||
-				((mods & Modifier.STATIC) != 0)) continue;
-			TableItem item = new TableItem(membersLt, SWT.NONE);
-			item.setData(field);
-			item.setText(FIELD_NAME_COLUMN, getFieldString(field));
-			item.setChecked(field.getGenerate());
-			item.setText(FIELD_CAST_COLUMN, field.getCast());
-			item.setText(FIELD_FLAGS_COLUMN, getFlagsString(field.getFlags()));
-			item.setText(FIELD_ACCESSOR_COLUMN, field.getAccessor());
-			/*
-			item.setText(FIELD_EXCLUDE_COLUMN, fieldData.getExclude());
-			*/
-		}
-	}
-	columns = membersLt.getColumns();
-	for (int i = 0; i < columns.length; i++) {
-		TableColumn column = columns[i];
-		column.pack();
-	}
-	membersLt.setHeaderVisible(true);
-	membersLt.setRedraw(true);
-}
-
-void updateParameters() {
-	paramsLt.removeAll();
-	int[] indices = membersLt.getSelectionIndices();
-	if (indices.length != 1) {
-		paramsLt.setHeaderVisible(false);
-		return;
-	}
-	TableItem memberItem = membersLt.getItem(indices[0]);
-	Object data = memberItem.getData();
-	if (!(data instanceof JNIMethod)) return;
-	paramsLt.setRedraw(false);
-	JNIMethod method = (JNIMethod)data;
-	JNIParameter[] params = method.getParameters();
-	for (int i = 0; i < params.length; i++) {
-		JNIParameter param = params[i];
-		TableItem item = new TableItem(paramsLt, SWT.NONE);
-		item.setData(param);
-		item.setText(PARAM_INDEX_COLUMN, String.valueOf(i));
-		item.setText(PARAM_TYPE_COLUMN, getClassString(param.getType()));
-		item.setText(PARAM_CAST_COLUMN, param.getCast());
-		item.setText(PARAM_FLAGS_COLUMN, getFlagsString(param.getFlags()));
-	}
-	TableColumn[] columns = paramsLt.getColumns();
-	for (int i = 0; i < columns.length; i++) {
-		TableColumn column = columns[i];
-		column.pack();
-	}
-	paramsLt.setRedraw(true);
-	paramsLt.setHeaderVisible(true);
-}
-
-void updateGenerate(TableItem item) {
-	JNIItem itemData = (JNIItem)item.getData();
-	itemData.setGenerate(item.getChecked());
-//	MetaData metaData = app.getMetaData();
-//	if (itemData instanceof JNIClass) {
-//		ClassData data = (ClassData)itemData;
-//		metaData.setMetaData(data.getClazz(), data);
-//	} else if (itemData instanceof FieldData) {
-//		FieldData data = (FieldData)itemData;
-//		item.setText(FIELD_FLAGS_COLUMN, getFlagsString(data.getFlags()));
-//		metaData.setMetaData(data.getField(), data);
-//	} else if (itemData instanceof MethodData) {
-//		MethodData data = (MethodData)itemData;
-//		item.setText(METHOD_FLAGS_COLUMN, getFlagsString(data.getFlags()));
-//		metaData.setMetaData(data.getMethod(), data);
-//	} else if (itemData instanceof ParameterData) {
-//		ParameterData data = (ParameterData)itemData;
-//		item.setText(PARAM_FLAGS_COLUMN, getFlagsString(data.getFlags()));
-//		metaData.setMetaData(data.getMethod(), data.getParameter(), data);
-//	}
-}
-
-boolean updateOutputDir() {
-	String outputDirStr = outputDirCb.getText();
-	File file = new File(outputDirStr);
-	if (!file.exists()) {
-		MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
-		dialog.setMessage("Output directory does not exist.");
-		dialog.open();
-		return false;
-	}
-	if (!file.isDirectory()) {
-		MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
-		dialog.setMessage("Output directory is not a directory.");
-		dialog.open();
-		return false;
-	}
-	if (outputDirStr.length() > 0) {
-		if (!outputDirStr.equals(app.getOutputDir())) {
-			app.setOutputDir(outputDirStr);
-		}
-		if (outputDirCb.indexOf(outputDirStr) == -1) {
-			outputDirCb.add(outputDirStr);
-		}
-	}
-	return true;
-}
-
-void updateMainClass() {
-	String mainClassStr = mainClassCb.getText();
-	if (mainClassStr.length() > 0) {
-		if (!mainClassStr.equals(app.getMainClassName())) {
-			app.setMainClassName(mainClassStr);
-		}
-		if (mainClassCb.indexOf(mainClassStr) == -1) {
-			mainClassCb.add(mainClassStr);
-		}
-		if (app.getOutputDir() != null) {
-			int index = outputDirCb.indexOf(app.getOutputDir());
-			if (index != -1) outputDirCb.select(index);
-		}
-	}
-}
-
-public static void main(String[] args) {
-	JNIGeneratorApp gen = new JNIGeneratorApp ();
-	if (args.length > 0) {
-		gen.setMainClassName(args[0]);
-		if (args.length > 1) gen.setOutputDir(args[1]);
-	} else {
-		gen.setMainClassName(JNIGeneratorApp.getDefaultMainClass());
-	}
-	JNIGeneratorAppUI ui = new JNIGeneratorAppUI(gen);
-	ui.open();
-	ui.run();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java
deleted file mode 100644
index 8558d47..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIItem.java	
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIItem extends Flags {
-	
-	public static final boolean GEN64 = true;
-
-public String[] getFlags();
-
-public boolean getFlag(String flag);
-
-public Object getParam(String key);
-
-public boolean getGenerate();
-
-public void setFlags(String[] flags);
-
-public void setFlag(String flag, boolean value);
-
-public void setGenerate(boolean value);
-
-public void setParam(String key, Object value);
-		
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java
deleted file mode 100644
index ab41c6c..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIMethod.java	
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIMethod extends JNIItem {
-
-	public static final String[] FLAGS = {FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CAST, FLAG_CPP, FLAG_NEW, FLAG_DELETE, FLAG_GCNEW, FLAG_GCOBJECT, FLAG_SETTER, FLAG_GETTER, FLAG_ADDER};
-	
-public String getName();
-
-public int getModifiers();
-
-public boolean isNativeUnique();
-
-public JNIParameter[] getParameters();
-
-public JNIType getReturnType();
-
-public JNIType getReturnType64();
-
-public JNIType[] getParameterTypes();
-
-public JNIType[] getParameterTypes64();
-
-public JNIClass getDeclaringClass();
-
-public String getAccessor();
-
-public String getExclude();
-
-public void setAccessor(String str);
-
-public void setExclude(String str);
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java
deleted file mode 100644
index 4212430..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIParameter.java	
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIParameter extends JNIItem {
-
-	public static final String[] FLAGS = {FLAG_NO_IN, FLAG_NO_OUT, FLAG_CRITICAL, FLAG_INIT, FLAG_STRUCT, FLAG_UNICODE, FLAG_SENTINEL, FLAG_GCOBJECT};
-
-public String getCast();
-
-public JNIMethod getMethod();
-
-public int getParameter();
-
-public JNIClass getTypeClass();
-
-public JNIType getType();
-
-public JNIType getType64();
-
-public void setCast(String str);
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java
deleted file mode 100644
index 805248a..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIType.java	
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface JNIType {
-
-public boolean isPrimitive();
-
-public boolean isArray();
-
-public JNIType getComponentType();
-
-public boolean isType(String type);
-
-public String getName();
-
-public String getSimpleName();
-
-public String getTypeSignature(boolean define);
-
-public String getTypeSignature1(boolean define);
-
-public String getTypeSignature2(boolean define);
-
-public String getTypeSignature3(boolean define);
-
-public String getTypeSignature4(boolean define, boolean struct);
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
deleted file mode 100644
index 11affd6..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java	
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class LockGenerator extends CleanupClass {
-	
-public LockGenerator() {
-}
-
-String getParams(JNIMethod method) {
-	int n_args = method.getParameters().length;
-	if (n_args == 0) return "";
-	String name = method.getName();
-	String params = "";
-	int index = 0;
-	while (true) {
-		index = classSource.indexOf(name, index + 1);
-		if (!Character.isWhitespace(classSource.charAt(index - 1))) continue;
-		if (index == -1) return null;
-		int parantesesStart = classSource.indexOf("(", index);
-		if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
-			int parantesesEnd = classSource.indexOf(")", parantesesStart);
- 			params = classSource.substring(parantesesStart + 1, parantesesEnd);
- 			break;
-		}
-	}
-	return params;
-}
-
-String getReturn(JNIMethod method) {
-	JNIType returnType = method.getReturnType();
-	if (!returnType.isType("int")) return returnType.getTypeSignature3(false);
-	String modifierStr = Modifier.toString(method.getModifiers());
-	String name = method.getName();
-	Pattern p = Pattern.compile(modifierStr + ".*" + name + ".*(.*)");
-	Matcher m = p.matcher(classSource);
-	if (m.find()) {
-		String methodStr = classSource.substring(m.start(), m.end());
-		int index = methodStr.indexOf("/*long*/");
-		if (index != -1 && index < methodStr.indexOf(name)) {
-			return new ReflectType(Integer.TYPE).getTypeSignature3(false) + " /*long*/";
-		}		
-	}
-	return new ReflectType(Integer.TYPE).getTypeSignature3(false);
-}
-
-public void generate(JNIClass clazz) {
-	super.generate(clazz);
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	generate(methods);
-}
-
-public void generate(JNIMethod[] methods) {
-	sort(methods);	
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		generate(method);
-	}
-}
-
-public void generate(JNIMethod method) {
-	int modifiers = method.getModifiers();
-	boolean lock = (modifiers & Modifier.SYNCHRONIZED) != 0;
-	String returnStr = getReturn(method);
-	String paramsStr = getParams(method);
-	if (lock) {
-		String modifiersStr = Modifier.toString(modifiers & ~Modifier.SYNCHRONIZED);
-		output(modifiersStr);
-		if (modifiersStr.length() > 0) output(" ");
-		output(returnStr);
-		output(" _");
-		output(method.getName());
-		output("(");
-		output(paramsStr);
-		outputln(");");
-	}
-	String modifiersStr = Modifier.toString(modifiers & ~(Modifier.SYNCHRONIZED | (lock ? Modifier.NATIVE : 0)));
-	output(modifiersStr);
-	if (modifiersStr.length() > 0) output(" ");
-	output(returnStr);
-	output(" ");
-	output(method.getName());
-	output("(");
-	output(paramsStr);
-	output(")");
-	if (lock) {
-		outputln(" {");
-		outputln("\tlock.lock();");
-		outputln("\ttry {");
-		output("\t\t");
-		if (!method.getReturnType().isType("void")) {
-			output("return ");
-		}
-		output("_");
-		output(method.getName());
-		output("(");
-		String[] paramNames = getArgNames(method);
-		for (int i = 0; i < paramNames.length; i++) {
-			if (i != 0) output(", ");
-			output(paramNames[i]);
-		}
-		outputln(");");
-		outputln("\t} finally {");
-		outputln("\t\tlock.unlock();");
-		outputln("\t}");
-		outputln("}");
-	} else {
-		outputln(";");
-	}
-}
-
-public static void main(String[] args) {
-	if (args.length < 2) {
-		System.out.println("Usage: java LockGenerator <OS className> <OS class source>");
-		return;
-	}
-	try {
-		LockGenerator gen = new LockGenerator();
-		String clazzName = args[0];
-		String classSource = args[1]; 
-		Class clazz = Class.forName(clazzName);
-		gen.setClassSourcePath(classSource);
-		gen.generate(new ReflectClass(clazz));
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java
deleted file mode 100644
index 0bb0c19..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java	
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import java.util.Calendar;
-
-public class MetaData {
-	
-	Properties data;
-
-public MetaData(String mainClass) {
-	data = new Properties();
-	int index = 0;
-	Class clazz = getClass();
-	int length = mainClass.length();
-	while (index < length) {
-		index = mainClass.indexOf('.', index);
-		if (index == -1) index = length;
-		InputStream is = clazz.getResourceAsStream(mainClass.substring(0, index) + ".properties");
-		if (is != null) {
-			try {
-				data.load(is);
-			} catch (IOException e) {
-			} finally {
-				try {
-					is.close();
-				} catch (IOException e) {}
-			}
-			
-		}
-		index++;
-	}
-}
-
-public MetaData(Properties data) {
-	this.data = data;
-}
-
-public String getCopyright() {
-	String copyright = getMetaData("swt_copyright", null);
-	if (copyright == null) return "";
-	if (copyright.length() == 0) return "";
-	String end_year_tag = "%END_YEAR";
-	int index = copyright.indexOf(end_year_tag);
-	if (index != -1) {
-		String temp = copyright.substring(0, index);
-		temp += Calendar.getInstance().get(Calendar.YEAR);
-		temp += copyright.substring(index + end_year_tag.length());
-		copyright = temp;
-	}
-	return copyright;
-}
-
-public String getMetaData(String key, String defaultValue) {
-	return data.getProperty(key, defaultValue);
-}
-
-public void setMetaData(String key, String value) {
-	data.setProperty(key, value);
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
deleted file mode 100644
index d90c663..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java	
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-
-public class MetaDataGenerator extends JNIGenerator {
-
-public void generateCopyright() {
-	generateMetaData("swt_properties_copyright");
-}
-
-public void generate(JNIClass clazz) {
-	output(toC(clazz.getName()));
-	output("=");
-	output(((AbstractItem)clazz).flatten());
-	outputln();
-	JNIField[] fields = clazz.getDeclaredFields();
-	generate(fields);
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	generate(methods);
-	outputln();
-}
-
-public void generate(JNIField[] fields) {
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		int mods = field.getModifiers();
-		if ((mods & Modifier.PUBLIC) == 0) continue;
-		if ((mods & Modifier.FINAL) != 0) continue;
-		if ((mods & Modifier.STATIC) != 0) continue;
-		generate(field);
-		outputln();
-	}
-}
-
-public void generate(JNIField field) {
-	output(field.getDeclaringClass().getSimpleName());
-	output("_");
-	output(field.getName());
-	output("=");
-	output(((AbstractItem)field).flatten());
-}
-
-public void generate(JNIMethod[] methods) {
-	sort(methods);
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		generate(method);
-		outputln();
-		if (progress != null) progress.step();
-	}
-}
-
-public void generate(JNIMethod method) {
-	StringBuffer buffer = new StringBuffer();
-	buffer.append(method.getDeclaringClass().getSimpleName());
-	buffer.append("_");
-	if (method.isNativeUnique()) {
-		buffer.append(method.getName());
-	} else {
-		buffer.append(getFunctionName(method));
-	}
-	String key = buffer.toString();
-	output(key);
-	output("=");
-	output(((AbstractItem)method).flatten());
-	outputln();
-	JNIParameter[] params = method.getParameters();
-	for (int i = 0; i < params.length; i++) {
-		output(key);
-		output("_");
-		output(i + "=");
-		output(((AbstractItem)params[i]).flatten());
-		outputln();		
-	}
-}
-
-public String getExtension() {
-	return ".properties";
-}
-
-protected boolean getGenerate(JNIItem item) {
-	return true;
-}
-
-public String getOutputName() {
-	return getMainClass().getName();
-}
-
-protected boolean getGenerate(JNIClass clazz) {
-	return true;
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
deleted file mode 100644
index a48d2fb..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java	
+++ /dev/null
@@ -1,982 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.HashSet;
-import java.util.Iterator;
-
-public class NativesGenerator extends JNIGenerator {
-
-boolean enterExitMacro;
-
-public NativesGenerator() {
-	enterExitMacro = true;
-}
-
-public void generateCopyright() {
-	outputln(fixDelimiter(getMetaData().getCopyright()));
-}
-
-public void generateIncludes() {
-	String outputName = getOutputName();
-	outputln("#include \"swt.h\"");
-	output("#include \"");
-	output(outputName);
-	outputln("_structs.h\"");
-	output("#include \"");
-	output(outputName);
-	outputln("_stats.h\"");
-	outputln();
-}
-
-public void generate(JNIClass clazz, String methodName) {
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	int count = 0;
-	for (int i = 0; i < methods.length; i++) {
-		if (methods[i].getName().startsWith(methodName)) count++;
-	}
-	JNIMethod[] result = new JNIMethod[count];
-	count = 0;
-	for (int i = 0; i < methods.length; i++) {
-		if (methods[i].getName().startsWith(methodName)) result[count++] = methods[i];
-	}
-	generate(result);
-}
-
-public void generate(JNIClass clazz) {
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	int i = 0;
-	for (; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) != 0) break;
-	}
-	if (i == methods.length) return;
-	sort(methods);
-	generateNativeMacro(clazz);
-	generateExcludes(methods);
-	generate(methods);
-}
-
-public void generate(JNIMethod[] methods) {
-	sort(methods);	
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		generate(method);
-		if (progress != null) progress.step();
-	}
-}
-
-boolean isStruct(String flagsStr) {
-	String[] flags = split(flagsStr, " ");
-	for (int i = 0; i < flags.length; i++) {
-		if (flags[i].equals(Flags.FLAG_STRUCT)) return true;
-	}
-	return false;
-}
-
-void generateCallback(JNIMethod method, String function, JNIParameter[] params, JNIType returnType) {
-	output("static jintLong ");
-	output(function);
-	outputln(";");
-	output("static ");
-	String[] types = split((String)method.getParam("callback_types"), ";");
-	String[] flags = split((String)method.getParam("callback_flags"), ";");
-	output(types[0]);
-	output(" ");
-	output("proc_");
-	output(function);
-	output("(");
-	boolean first = true;
-	for (int i = 1; i < types.length; i++) {
-		if (!first) output(", ");
-		output(types[i]);
-		output(" ");
-		output("arg");
-		output(String.valueOf(i - 1));
-		first = false;
-	}
-	outputln(") {");
-	
-	output("\t");
-	if (isStruct(flags[0])) {
-		output(types[0]);
-		output("* lprc = ");
-	} else if (!types[0].equals("void")) {
-		output("return ");
-	}
-	output("((");
-	output(types[0]);
-	if (isStruct(flags[0])) output("*");
-	output(" (*)(");
-	first = true;
-	for (int i = 1; i < types.length; i++) {
-		if (!first) output(", ");
-		first = false;
-		output(types[i]);
-		if (isStruct(flags[i])) output("*");
-	}
-	output("))");
-	output(function);
-	output(")(");
-	first = true;
-	for (int i = 1; i < types.length; i++) {
-		if (!first) output(", ");
-		first = false;
-		if (isStruct(flags[i])) output("&");
-		output("arg");
-		output(String.valueOf(i -1));
-	}
-	outputln(");");
-	if (isStruct(flags[0])) {
-		output("\t");
-		output(types[0]);
-		outputln(" rc;");
-		outputln("\tif (lprc) {");
-		outputln("\t\trc = *lprc;");
-		outputln("\t\tfree(lprc);");
-		outputln("\t} else {");
-		output("\t\tmemset(&rc, 0, sizeof(");
-		output(types[0]);
-		outputln("));");
-		outputln("\t}");
-		outputln("\treturn rc;");
-	}
-	outputln("}");
-	
-	output("static jintLong ");
-	output(method.getName());
-	outputln("(jintLong func) {");
-	output("\t");
-	output(function);
-	outputln(" = func;");
-	output("\treturn (jintLong)proc_");
-	output(function);
-	outputln(";");
-	outputln("}");
-}
-
-public void generate(JNIMethod method) {
-	if (method.getFlag(FLAG_NO_GEN)) return;
-	JNIType returnType = method.getReturnType(), returnType64 = method.getReturnType64();	
-	if (!(returnType.isType("void") || returnType.isPrimitive() || isSystemClass(returnType) || returnType.isType("java.lang.String"))) {
-		output("Warning: bad return type. :");
-		outputln(method.toString());
-		return;
-	}
-	JNIParameter[] params = method.getParameters();
-	String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());	
-	generateSourceStart(function, function64);
-	boolean sameFunction = function.equals(function64);
-	if (!sameFunction) {
-		output("#ifndef ");
-		output(JNI64);
-		outputln();
-	}
-	if (isCPP) {
-		output("extern \"C\" ");
-		generateFunctionPrototype(method, function, params, returnType, returnType64, true);
-		outputln(";");
-	}
-	if (function.startsWith("CALLBACK_")) {
-		generateCallback(method, function, params, returnType);
-	}
-	generateFunctionPrototype(method, function, params, returnType, returnType64, !sameFunction);
-	if (!function.equals(function64)) {
-		outputln();
-		outputln("#else");
-		if (isCPP) {
-			output("extern \"C\" ");
-			generateFunctionPrototype(method, function64, params, returnType, returnType64, true);
-			outputln(";");
-		}
-		generateFunctionPrototype(method, function64, params, returnType, returnType64, !sameFunction);
-		outputln();
-		outputln("#endif");
-	}
-	generateFunctionBody(method, function, function64, params, returnType, returnType64);
-	generateSourceEnd(function);
-	outputln();
-}
-
-public void setEnterExitMacro(boolean enterExitMacro) {
-	this.enterExitMacro = enterExitMacro;
-}
-
-void generateExcludes(JNIMethod[] methods) {
-	HashSet excludes = new HashSet();
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		String exclude = method.getExclude();
-		if (exclude.length() != 0) {
-			excludes.add(exclude);
-		}
-	}
-	for (Iterator iter = excludes.iterator(); iter.hasNext();) {
-		String exclude = (String)iter.next();
-		outputln(exclude);
-		for (int i = 0; i < methods.length; i++) {
-			JNIMethod method = methods[i];
-			if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-			String methodExclude = method.getExclude();
-			if (exclude.equals(methodExclude)) {
-				output("#define NO_");
-				outputln(getFunctionName(method));
-			}
-		}
-		outputln("#endif");
-		outputln();
-	}
-}
-
-void generateNativeMacro(JNIClass clazz) {
-	output("#define ");
-	output(clazz.getSimpleName());
-	output("_NATIVE(func) Java_");
-	output(toC(clazz.getName()));
-	outputln("_##func");
-	outputln();
-}
-
-boolean generateGetParameter(JNIMethod method, JNIParameter param, boolean critical, int indent) {
-	JNIType paramType = param.getType(), paramType64 = param.getType64();
-	if (paramType.isPrimitive() || isSystemClass(paramType)) return false;
-	String iStr = String.valueOf(param.getParameter());
-	for (int j = 0; j < indent; j++) output("\t");
-	output("if (arg");
-	output(iStr);
-	output(") if ((lparg");
-	output(iStr);
-	output(" = ");
-	if (paramType.isArray()) {
-		JNIType componentType = paramType.getComponentType();
-		if (componentType.isPrimitive()) {
-			if (critical) {
-				if (isCPP) {
-					output("(");
-					output(componentType.getTypeSignature2(!paramType.equals(paramType64)));
-					output("*)");
-					output("env->GetPrimitiveArrayCritical(arg");
-				} else {
-					output("(*env)->GetPrimitiveArrayCritical(env, arg");
-				}
-				output(iStr);
-				output(", NULL)");
-			} else {
-				if (isCPP) {
-					output("env->Get");
-				} else {
-					output("(*env)->Get");
-				}
-				output(componentType.getTypeSignature1(!paramType.equals(paramType64)));
-				if (isCPP) {
-					output("ArrayElements(arg");
-				} else {
-					output("ArrayElements(env, arg");
-				}
-				output(iStr);
-				output(", NULL)");
-			}
-		} else {
-			throw new Error("not done");
-		}
-	} else if (paramType.isType("java.lang.String")) {
-		if (param.getFlag(FLAG_UNICODE)) {
-			if (isCPP) {
-				output("env->GetStringChars(arg");
-			} else {
-				output("(*env)->GetStringChars(env, arg");
-			}
-			output(iStr);
-			output(", NULL)");
-		} else {
-			if (isCPP) {
-				output("env->GetStringUTFChars(arg");
-			} else {
-				output("(*env)->GetStringUTFChars(env, arg");
-			}
-			output(iStr);
-			output(", NULL)");
-		}
-	} else {
-		if (param.getFlag(FLAG_NO_IN)) {
-			output("&_arg");
-			output(iStr);
-		} else {
-			output("get");
-			output(paramType.getSimpleName());
-			output("Fields(env, arg");
-			output(iStr);
-			output(", &_arg");
-			output(iStr);
-			output(")");
-		}
-	}	
-	outputln(") == NULL) goto fail;");
-	return true;
-}
-
-void generateSetParameter(JNIParameter param, boolean critical) {
-	JNIType paramType = param.getType(), paramType64 = param.getType64();
-	if (paramType.isPrimitive() || isSystemClass(paramType)) return;
-	String iStr = String.valueOf(param.getParameter());
-	if (paramType.isArray()) {
-		output("\tif (arg");
-		output(iStr);
-		output(" && lparg");
-		output(iStr);
-		output(") ");
-		JNIType componentType = paramType.getComponentType();
-		if (componentType.isPrimitive()) {
-			if (critical) {
-				if (isCPP) {
-					output("env->ReleasePrimitiveArrayCritical(arg");
-				} else {
-					output("(*env)->ReleasePrimitiveArrayCritical(env, arg");
-				}
-				output(iStr);
-			} else {
-				if (isCPP) {
-					output("env->Release");
-				} else {
-					output("(*env)->Release");
-				}
-				output(componentType.getTypeSignature1(!paramType.equals(paramType64)));
-				if (isCPP) {
-					output("ArrayElements(arg");
-				} else {
-					output("ArrayElements(env, arg");
-				}
-				output(iStr);
-			}
-			output(", lparg");
-			output(iStr);
-			output(", ");
-			if (param.getFlag(FLAG_NO_OUT)) {
-				output("JNI_ABORT");
-			} else {				
-				output("0");
-			}
-			output(");");
-		} else {
-			throw new Error("not done");
-		}
-		outputln();
-	} else if (paramType.isType("java.lang.String")) {
-		output("\tif (arg");
-		output(iStr);
-		output(" && lparg");
-		output(iStr);
-		output(") ");
-		if (param.getFlag(FLAG_UNICODE)) {
-			if (isCPP) {
-				output("env->ReleaseStringChars(arg");
-			} else {
-				output("(*env)->ReleaseStringChars(env, arg");
-			}
-		} else {
-			if (isCPP) {
-				output("env->ReleaseStringUTFChars(arg");
-			} else {
-				output("(*env)->ReleaseStringUTFChars(env, arg");
-			}
-		}
-		output(iStr);
-		output(", lparg");
-		output(iStr);
-		outputln(");");
-	} else {
-		if (!param.getFlag(FLAG_NO_OUT)) {
-			output("\tif (arg");
-			output(iStr);
-			output(" && lparg");
-			output(iStr);
-			output(") ");
-			output("set");
-			output(paramType.getSimpleName());
-			output("Fields(env, arg");
-			output(iStr);
-			output(", lparg");
-			output(iStr);
-			outputln(");");
-		}
-	}
-}
-
-void generateEnterExitMacro(JNIMethod method, String function, String function64, boolean enter) {
-	if (!enterExitMacro) return;
-	if (!function.equals(function64)) {
-		output("#ifndef ");
-		output(JNI64);
-		outputln();
-	}
-	output("\t");
-	output(method.getDeclaringClass().getSimpleName());
-	output("_NATIVE_");
-	output(enter ? "ENTER" : "EXIT");
-	output("(env, that, ");
-	output(function);
-	outputln("_FUNC);");
-	if (!function.equals(function64)) {
-		outputln("#else");
-		output("\t");
-		output(method.getDeclaringClass().getSimpleName());
-		output("_NATIVE_");
-		output(enter ? "ENTER" : "EXIT");
-		output("(env, that, ");
-		output(function64);
-		outputln("_FUNC);");
-		outputln("#endif");
-	}
-}
-
-boolean generateLocalVars(JNIMethod method, JNIParameter[] params, JNIType returnType, JNIType returnType64) {
-	boolean needsReturn = enterExitMacro;
-	for (int i = 0; i < params.length; i++) {
-		JNIParameter param = params[i];
-		JNIType paramType = param.getType(), paramType64 = param.getType64();
-		if (paramType.isPrimitive() || isSystemClass(paramType)) continue;
-		output("\t");
-		if (paramType.isArray()) {
-			JNIType componentType = paramType.getComponentType();
-			if (componentType.isPrimitive()) {
-				output(componentType.getTypeSignature2(!paramType.equals(paramType64)));
-				output(" *lparg" + i);
-				output("=NULL;");
-			} else {
-				throw new Error("not done");
-			}
-		} else if (paramType.isType("java.lang.String")) {
-			if (param.getFlag(FLAG_UNICODE)) {
-				output("const jchar *lparg" + i);				
-			} else {
-				output("const char *lparg" + i);
-			}
-			output("= NULL;");
-		} else {
-			if (param.getTypeClass().getFlag(Flags.FLAG_STRUCT)) {
-				output("struct ");
-			}
-			output(paramType.getSimpleName());
-			output(" _arg" + i);
-			if (param.getFlag(FLAG_INIT)) output("={0}");
-			output(", *lparg" + i);
-			output("=NULL;");
-		}
-		outputln();
-		needsReturn = true;
-	}
-	if (needsReturn) {
-		if (!returnType.isType("void")) {
-			output("\t");
-			output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-			outputln(" rc = 0;");
-		}
-	}
-	return needsReturn;
-}
-
-boolean generateGetters(JNIMethod method, JNIParameter[] params) {
-	boolean genFailTag = false;
-	int criticalCount = 0;
-	for (int i = 0; i < params.length; i++) {
-		JNIParameter param = params[i];
-		if (!isCritical(param)) {
-			genFailTag |= generateGetParameter(method, param, false, 1);
-		} else {
-			criticalCount++;
-		}
-	}
-	if (criticalCount != 0) {
-		outputln("#ifdef JNI_VERSION_1_2");
-		outputln("\tif (IS_JNI_1_2) {");
-		for (int i = 0; i < params.length; i++) {
-			JNIParameter param = params[i];
-			if (isCritical(param)) {
-				genFailTag |= generateGetParameter(method, param, true, 2);
-			}
-		}
-		outputln("\t} else");
-		outputln("#endif");
-		outputln("\t{");
-		for (int i = 0; i < params.length; i++) {
-			JNIParameter param = params[i];
-			if (isCritical(param)) {
-				genFailTag |= generateGetParameter(method, param, false, 2);
-			}
-		}
-		outputln("\t}");
-	}
-	return genFailTag;
-}
-
-void generateSetters(JNIMethod method, JNIParameter[] params) {
-	int criticalCount = 0;
-	for (int i = params.length - 1; i >= 0; i--) {
-		JNIParameter param = params[i];
-		if (isCritical(param)) {
-			criticalCount++;
-		}
-	}
-	if (criticalCount != 0) {
-		outputln("#ifdef JNI_VERSION_1_2");
-		outputln("\tif (IS_JNI_1_2) {");
-		for (int i = params.length - 1; i >= 0; i--) {
-			JNIParameter param = params[i];
-			if (isCritical(param)) {
-				output("\t");
-				generateSetParameter(param, true);
-			}
-		}
-		outputln("\t} else");
-		outputln("#endif");
-		outputln("\t{");
-		for (int i = params.length - 1; i >= 0; i--) {
-			JNIParameter param = params[i];
-			if (isCritical(param)) {
-				output("\t");
-				generateSetParameter(param, false);
-			}
-		}
-		outputln("\t}");
-	}
-	for (int i = params.length - 1; i >= 0; i--) {
-		JNIParameter param = params[i];
-		if (!isCritical(param)) {
-			generateSetParameter(param, false);
-		}
-	}
-}
-
-void generateDynamicFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean needsReturn) {
-	outputln("/*");
-	generateFunctionCall(method, params, returnType, returnType64, needsReturn);
-	outputln("*/");
-	outputln("\t{");
-
-	String name = method.getName();
-	if (name.startsWith("_")) name = name.substring(1);
-	output("\t\tLOAD_FUNCTION(fp, ");
-	output(name);
-	outputln(")");
-	outputln("\t\tif (fp) {");
-	output("\t\t");
-	generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn);
-	output("((");
-	output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-	output(" (CALLING_CONVENTION*)(");
-	for (int i = 0; i < params.length; i++) {
-		if (i != 0) output(", ");
-		JNIParameter param = params[i];
-		String cast = param.getCast();
-		boolean isStruct = param.getFlag(FLAG_STRUCT);
-		if (cast.length() > 2) {
-			cast = cast.substring(1, cast.length() - 1);
-			if (isStruct) {
-				int index = cast.lastIndexOf('*');
-				if (index != -1) cast = cast.substring(0, index).trim();
-			}
-			output(cast);
-		} else {
-			JNIType paramType = param.getType(), paramType64 = param.getType64();
-			output(paramType.getTypeSignature4(!paramType.equals(paramType64), isStruct));
-		}
-	}
-	output("))");
-	output("fp");
-	output(")");
-	generateFunctionCallRightSide(method, params, 0);
-	output(";");
-	outputln();
-	outputln("\t\t}");
-	outputln("\t}");
-}
-
-void generateFunctionCallLeftSide(JNIMethod method, JNIType returnType, JNIType returnType64, boolean needsReturn) {
-	output("\t");
-	if (!returnType.isType("void")) {
-		if (needsReturn) {
-			output("rc = ");
-		} else {
-			output("return ");
-		}
-		output("(");
-		output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-		output(")");
-	}
-	if (method.getFlag(FLAG_ADDRESS)) {
-		output("&");
-	}	
-	if (method.getFlag(FLAG_JNI)) {
-		output(isCPP ? "env->" : "(*env)->");
-	}
-}
-
-void generateFunctionCallRightSide(JNIMethod method, JNIParameter[] params, int paramStart) {
-	if (!method.getFlag(FLAG_CONST)) {
-		output("(");
-		if (method.getFlag(FLAG_JNI)) {
-			if (!isCPP) output("env, ");
-		}
-		for (int i = paramStart; i < params.length; i++) {
-			JNIParameter param = params[i];
-			if (i != paramStart) output(", ");
-			if (param.getFlag(FLAG_STRUCT)) output("*");
-			output(param.getCast());
-			if (param.getFlag(FLAG_GCOBJECT)) output("TO_OBJECT(");
-			if (i == params.length - 1 && param.getFlag(FLAG_SENTINEL)) {
-				output("NULL");
-			} else {
-				JNIType paramType = param.getType();
-				if (!paramType.isPrimitive() && !isSystemClass(paramType)) output("lp");
-				output("arg" + i);
-			}
-			if (param.getFlag(FLAG_GCOBJECT)) output(")");
-		}
-		output(")");
-	}
-}
-
-void generateFunctionCall(JNIMethod method, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean needsReturn) {
-	String name = method.getName();
-	String copy = (String)method.getParam("copy");
-	boolean makeCopy = copy.length() != 0 && isCPP && !returnType.isType("void");
-	if (makeCopy) {
-		output("\t");
-		output(copy);
-		output(" temp = ");
-	} else {
-		generateFunctionCallLeftSide(method, returnType, returnType64, needsReturn);
-	}
-	int paramStart = 0;
-	if (name.startsWith("_")) name = name.substring(1);
-
-	boolean objc_struct = false;
-	if (name.equals("objc_msgSend_stret") || name.equals("objc_msgSendSuper_stret")) objc_struct = true;
-	if (objc_struct) {
-		outputln("if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {");
-		generate_objc_msgSend_stret (method, params, name);
-		paramStart = 1;
-	} else if (name.equalsIgnoreCase("call")) {
-		output("(");
-		String cast = params[0].getCast(); 
-		if (cast.length() != 0 && !cast.equals("()")) {
-			output(cast);
-		} else {
-			output("(");
-			output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-			output(" (*)())");
-		}
-		output("arg0)");
-		paramStart = 1;
-	} else if (name.startsWith("VtblCall") || name.startsWith("_VtblCall")) {
-		output("((");
-		output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-		output(" (STDMETHODCALLTYPE *)(");
-		for (int i = 1; i < params.length; i++) {
-			if (i != 1) output(", ");
-			JNIParameter param = params[i];
-			JNIType paramType = param.getType(), paramType64 = param.getType64();
-			output(paramType.getTypeSignature4(!paramType.equals(paramType64), false));
-		}
-		output("))(*(");
-		JNIType paramType = params[1].getType(), paramType64 = params[1].getType64();
-		output(paramType.getTypeSignature4(!paramType.equals(paramType64), false));
-		output(" **)arg1)[arg0])");
-		paramStart = 1;
-	} else if (method.getFlag(FLAG_CPP) || method.getFlag(FLAG_SETTER) || method.getFlag(FLAG_GETTER) || method.getFlag(FLAG_ADDER)) {
-		if (method.getFlag(FLAG_GCOBJECT)) {
-			output("TO_HANDLE(");
-		}
-		output("(");
-		JNIParameter param = params[0];
-		if (param.getFlag(FLAG_STRUCT)) output("*");
-		String cast = param.getCast(); 
-		if (cast.length() != 0 && !cast.equals("()")) {
-			output(cast);
-		}
-		if (param.getFlag(FLAG_GCOBJECT)) {
-			output("TO_OBJECT(");
-		}
-		output("arg0");
-		if (param.getFlag(FLAG_GCOBJECT)) {
-			output(")");
-		}
-		output(")->");
-		String accessor = method.getAccessor();
-		if (accessor.length() != 0) {
-			output(accessor);
-		} else {
-			int index = -1;
-			if ((index = name.indexOf('_')) != -1) {
-				output(name.substring(index + 1, name.length()));
-			} else {
-				output(name);
-			}
-		}
-		paramStart = 1;
-	} else if (method.getFlag(FLAG_GCNEW)) {
-		output("TO_HANDLE(gcnew ");
-		String accessor = method.getAccessor();
-		if (accessor.length() != 0) {
-			output(accessor);
-		} else {
-			int index = -1;
-			if ((index = name.indexOf('_')) != -1) {
-				output(name.substring(index + 1));
-			} else {
-				output(name);
-			}
-		}
-	} else if (method.getFlag(FLAG_NEW)) {
-		output("new ");
-		String accessor = method.getAccessor();
-		if (accessor.length() != 0) {
-			output(accessor);
-		} else {
-			int index = -1;
-			if ((index = name.indexOf('_')) != -1) {
-				output(name.substring(0, index));
-			} else {
-				output(name);
-			}
-		}
-	} else if (method.getFlag(FLAG_DELETE)) {
-		output("delete ");
-		JNIParameter param = params[0];
-		String cast = param.getCast(); 
-		if (cast.length() != 0 && !cast.equals("()")) {
-			output(cast);
-		} else {
-			output("(");
-			output(name.substring(0, name.indexOf("_")));
-			output(" *)");
-		}
-		outputln("arg0;");
-		return;
-	} else {
-		if (method.getFlag(FLAG_GCOBJECT)) {
-			output("TO_HANDLE(");				
-		}
-		if (method.getFlag(Flags.FLAG_CAST)) {
-			output("((");
-			String returnCast = returnType.getTypeSignature2(!returnType.equals(returnType64));
-			if (name.equals("objc_msgSend_bool") && returnCast.equals("jboolean")) {
-				returnCast = "BOOL";
-			}
-			output(returnCast);
-			output(" (*)(");
-			for (int i = 0; i < params.length; i++) {
-				if (i != 0) output(", ");
-				JNIParameter param = params[i];
-				String cast = param.getCast();
-				if (cast != null && cast.length() != 0) {
-					if (cast.startsWith("(")) cast = cast.substring(1);
-					if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1);
-					output(cast);
-				} else {
-					JNIType paramType = param.getType(), paramType64 = param.getType64();
-					if (!(paramType.isPrimitive() || paramType.isArray())) {
-						if (param.getTypeClass().getFlag(FLAG_STRUCT)) {
-							output("struct ");
-						}
-					}
-					output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT)));
-				}
-			}
-			output("))");
-		}
-		String accessor = method.getAccessor();
-		if (accessor.length() != 0) {
-			output(accessor);
-		} else {
-			output(name);
-		}
-		if (method.getFlag(Flags.FLAG_CAST)) {
-			output(")");
-		}
-	}
-	if ((method.getFlag(FLAG_SETTER) && params.length == 3) || (method.getFlag(FLAG_GETTER) && params.length == 2)) {
-		output("[arg1]");
-		paramStart++;
-	}
-	if (method.getFlag(FLAG_SETTER)) output(" = ");
-	if (method.getFlag(FLAG_ADDER)) output(" += ");
-	if (!method.getFlag(FLAG_GETTER)) {
-		generateFunctionCallRightSide(method, params, paramStart);
-	}
-	if (method.getFlag(FLAG_GCNEW) || method.getFlag(FLAG_GCOBJECT)) {
-		output(")");
-	}
-	output(";");
-	outputln();
-	if (makeCopy) {
-		outputln("\t{");
-		output("\t\t");
-		output(copy);
-		output("* copy = new ");
-		output(copy);
-		outputln("();");
-		outputln("\t\t*copy = temp;");
-		output("\t\trc = ");
-		output("(");
-		output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-		output(")");
-		outputln("copy;");
-		outputln("\t}");
-	}
-	if (objc_struct) {
-		outputln("\t} else {");
-		generate_objc_msgSend_stret (method, params, name.substring(0, name.length() - "_stret".length()));
-		generateFunctionCallRightSide(method, params, 1);
-		outputln(";");
-		outputln("\t}");
-	}
-}
-
-void generate_objc_msgSend_stret (JNIMethod method, JNIParameter[] params, String func) {
-	output("\t\t*lparg0 = (*(");
-	JNIType paramType = params[0].getType(), paramType64 = params[0].getType64();
-	output(paramType.getTypeSignature4(!paramType.equals(paramType64), true));
-	output(" (*)(");
-	for (int i = 1; i < params.length; i++) {
-		if (i != 1) output(", ");
-		JNIParameter param = params[i];
-		String cast = param.getCast();
-		if (cast != null && cast.length() != 0) {
-			if (cast.startsWith("(")) cast = cast.substring(1);
-			if (cast.endsWith(")")) cast = cast.substring(0, cast.length() - 1);
-			output(cast);
-		} else {
-			paramType = param.getType(); paramType64 = param.getType64();
-			if (!(paramType.isPrimitive() || paramType.isArray())) {
-				if (param.getTypeClass().getFlag(FLAG_STRUCT)) {
-					output("struct ");
-				}
-			}
-			output(paramType.getTypeSignature4(!paramType.equals(paramType64), param.getFlag(FLAG_STRUCT)));
-		}
-	}
-	output("))");
-	output(func);
-	output(")");
-}
-
-void generateReturn(JNIMethod method, JNIType returnType, boolean needsReturn) {
-	if (needsReturn && !returnType.isType("void")) {
-		outputln("\treturn rc;");
-	}
-}
-
-void generateMemmove(JNIMethod method, String function, String function64, JNIParameter[] params) {
-	generateEnterExitMacro(method, function, function64, true);
-	output("\t");
-	boolean get = params[0].getType().isPrimitive();
-	String className = params[get ? 1 : 0].getType().getSimpleName();
-	output(get ? "if (arg1) get" : "if (arg0) set");
-	output(className);
-	output(get ? "Fields(env, arg1, (" : "Fields(env, arg0, (");
-	output(className);
-	output(get ? " *)arg0)" : " *)arg1)");
-	outputln(";");
-	generateEnterExitMacro(method, function, function64, false);	
-}
-
-void generateFunctionBody(JNIMethod method, String function, String function64, JNIParameter[] params, JNIType returnType, JNIType returnType64) {
-	outputln("{");
-	
-	/* Custom GTK memmoves. */
-	String name = method.getName();
-	if (name.startsWith("_")) name = name.substring(1);
-	boolean isMemove = (name.equals("memmove") || name.equals("MoveMemory")) && params.length == 2 && returnType.isType("void");
-	if (isMemove) {
-		generateMemmove(method, function, function64, params);
-	} else {
-		boolean needsReturn = generateLocalVars(method, params, returnType, returnType64);
-		generateEnterExitMacro(method, function, function64, true);
-		boolean genFailTag = generateGetters(method, params);
-		if (method.getFlag(FLAG_DYNAMIC)) {
-			generateDynamicFunctionCall(method, params, returnType, returnType64, needsReturn);
-		} else {
-			generateFunctionCall(method, params, returnType, returnType64, needsReturn);
-		}
-		if (genFailTag) outputln("fail:");
-		generateSetters(method, params);
-		generateEnterExitMacro(method, function, function64, false);
-		generateReturn(method, returnType, needsReturn);
-	}
-	
-	outputln("}");
-}
-
-void generateFunctionPrototype(JNIMethod method, String function, JNIParameter[] params, JNIType returnType, JNIType returnType64, boolean singleLine) {
-	output("JNIEXPORT ");
-	output(returnType.getTypeSignature2(!returnType.equals(returnType64)));
-	output(" JNICALL ");
-	output(method.getDeclaringClass().getSimpleName());
-	output("_NATIVE(");
-	output(function);
-	if (singleLine) {
-		output(")");
-		output("(JNIEnv *env, ");
-	} else {
-		outputln(")");
-		output("\t(JNIEnv *env, ");
-	}
-	if ((method.getModifiers() & Modifier.STATIC) != 0) {
-		output("jclass");
-	} else {
-		output("jobject");
-	}
-	output(" that");
-	for (int i = 0; i < params.length; i++) {
-		output(", ");
-		JNIType paramType = params[i].getType(), paramType64 = params[i].getType64();
-		output(paramType.getTypeSignature2(!paramType.equals(paramType64)));
-		output(" arg" + i);
-	}
-	output(")");
-	if (!singleLine) outputln();
-}
-
-void generateSourceStart(String function, String function64) {
-	if (function.equals(function64)) {
-		output("#ifndef NO_");
-		outputln(function);
-	} else {
-		output("#if (!defined(NO_");
-		output(function);
-		output(") && !defined(");
-		output(JNI64);
-		output(")) || (!defined(NO_");
-		output(function64);
-		output(") && defined(");
-		output(JNI64);
-		outputln("))");
-	}
-}
-
-void generateSourceEnd(String function) {
-	outputln("#endif");
-}
-
-boolean isCritical(JNIParameter param) {
-	JNIType paramType = param.getType();
-	return paramType.isArray() && paramType.getComponentType().isPrimitive() && param.getFlag(FLAG_CRITICAL);
-}
-
-boolean isSystemClass(JNIType type) {
-	return type.isType("java.lang.Object") || type.isType("java.lang.Class") ;
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java
deleted file mode 100644
index c34cf75..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java	
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public interface ProgressMonitor {
-
-public void setTotal(int total);
-public void setMessage(String message);
-public void step();
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java
deleted file mode 100644
index 64321d1..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectClass.java	
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.File;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-
-public class ReflectClass extends ReflectItem implements JNIClass {
-	Class clazz;
-	ReflectField[] fields;
-	ReflectMethod[] methods;
-	MetaData metaData;
-	String sourcePath;
-
-public ReflectClass(Class clazz) {
-	this(clazz, null, null);
-}
-
-public ReflectClass(Class clazz, MetaData data, String sourcePath) {
-	this.clazz = clazz;
-	this.metaData = data;
-	this.sourcePath = sourcePath;
-}
-
-void checkMembers() {
-	if (fields != null) return;
-	String source = null;
-	CompilationUnit unit = null;
-	if (JNIItem.GEN64) {
-		source = JNIGenerator.loadFile(sourcePath);
-		ASTParser parser = ASTParser.newParser(AST.JLS3);
-		parser.setSource(source.toCharArray());
-		unit = (CompilationUnit)parser.createAST(null);
-	}
-	Field[] fields = clazz.getDeclaredFields();
-	this.fields = new ReflectField[fields.length];
-	for (int i = 0; i < fields.length; i++) {
-		this.fields[i] = new ReflectField(this, fields[i], source, unit);
-	}
-	Method[] methods = clazz.getDeclaredMethods();
-	this.methods = new ReflectMethod[methods.length];
-	for (int i = 0; i < methods.length; i++) {
-		this.methods[i] = new ReflectMethod(this, methods[i], source, unit);
-	}
-}
-
-public int hashCode() {
-	return clazz.hashCode();
-}
-
-public boolean equals(Object obj) {
-	if (!(obj instanceof ReflectClass)) return false;
-	return ((ReflectClass)obj).clazz.equals(clazz);
-}
-
-public JNIField[] getDeclaredFields() {
-	checkMembers();
-	JNIField[] result = new JNIField[fields.length];
-	System.arraycopy(fields, 0, result, 0, result.length);
-	return result;
-}
-
-public JNIMethod[] getDeclaredMethods() {
-	checkMembers();
-	JNIMethod[] result = new JNIMethod[methods.length];
-	System.arraycopy(methods, 0, result, 0, result.length);
-	return result;
-}
-
-public String getName() {
-	return clazz.getName();
-}
-
-public JNIClass getSuperclass() {
-	Class superclazz = clazz.getSuperclass();
-	String path = new File(sourcePath).getParent() + "/" + getSimpleName(superclazz) + ".java";
-	return new ReflectClass(superclazz, metaData, path);
-}
-
-String getSimpleName(Class type) {
-	String name = type.getName();
-	int index = name.lastIndexOf('.') + 1;
-	return name.substring(index, name.length());
-}
-
-public String getSimpleName() {
-	return getSimpleName(clazz);
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	String key = JNIGenerator.toC(clazz.getName());
-	return metaData.getMetaData(key, "");
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	String key = JNIGenerator.toC(clazz.getName());
-	metaData.setMetaData(key, value);
-}
-
-public String toString() {
-	return clazz.toString();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java
deleted file mode 100644
index 350662f..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectField.java	
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.File;
-import java.lang.reflect.Field;
-import java.util.Iterator;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.FieldDeclaration;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
-
-public class ReflectField extends ReflectItem implements JNIField {
-	Field field;
-	ReflectType type, type64;
-	ReflectClass declaringClass;
-	
-public ReflectField(ReflectClass declaringClass, Field field, String source, CompilationUnit unit) {
-	this.declaringClass = declaringClass;
-	this.field = field;
-	Class clazz = field.getType();
-	type = new ReflectType(clazz);
-	type64 = type;
-	boolean changes = canChange64(clazz);
-	if (changes && new File(declaringClass.sourcePath).exists()) {
-		TypeDeclaration type1 = (TypeDeclaration)unit.types().get(0);
-		Class result = null;
-		FieldDeclaration[] fields = type1.getFields();
-		for (int i = 0; i < fields.length && result == null; i++) {
-			FieldDeclaration node = fields[i];
-			for (Iterator iterator = node.fragments().iterator(); iterator.hasNext();) {
-				VariableDeclarationFragment decl = (VariableDeclarationFragment) iterator.next();
-				if (decl.getName().getIdentifier().equals(field.getName())) {
-					String s = source.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
-					if (clazz == int.class && s.indexOf("int /*long*/") != -1) type64 = new ReflectType(long.class);
-					else if (clazz == float.class && s.indexOf("float /*double*/") != -1) type64 = new ReflectType(double.class);
-					else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) type64 = new ReflectType(long[].class);
-					else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) type = new ReflectType(double[].class);
-					else if (clazz == long.class && s.indexOf("long /*int*/") != -1) type = new ReflectType(int.class);
-					else if (clazz == double.class && s.indexOf("double /*float*/") != -1) type = new ReflectType(float.class);
-					else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) type = new ReflectType(int[].class);
-					else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) type = new ReflectType(float[].class);
-					break;
-				}
-			}
-		}
-	}	
-}
-
-public int hashCode() {
-	return field.hashCode();
-}
-
-public boolean equals(Object obj) {
-	if (!(obj instanceof ReflectField)) return false;
-	return ((ReflectField)obj).field.equals(field);
-}
-
-public JNIClass getDeclaringClass() {
-	return declaringClass;
-}
-
-public int getModifiers() {
-	return field.getModifiers();
-}
-
-public String getName() {
-	return field.getName();
-}
-
-public JNIType getType() {
-	return type;
-}
-
-public JNIType getType64() {
-	return type64;
-}
-
-public String getAccessor() {
-	return (String)getParam("accessor");
-}
-
-public String getCast() {
-	String cast = ((String)getParam("cast")).trim();
-	if (cast.length() > 0) {
-		if (!cast.startsWith("(")) cast = "(" + cast;
-		if (!cast.endsWith(")")) cast = cast + ")";
-	}
-	return cast;
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	String className = getDeclaringClass().getSimpleName();
-	String key = className + "_" + field.getName();
-	return declaringClass.metaData.getMetaData(key, "");
-}
-
-public void setAccessor(String str) { 
-	setParam("accessor", str);
-}
-
-public void setCast(String str) {
-	setParam("cast", str);
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	String className = declaringClass.getSimpleName();
-	String key = className + "_" + field.getName();
-	declaringClass.metaData.setMetaData(key, value);
-}
-
-public String toString() {
-	return field.toString();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java
deleted file mode 100644
index acd9e67..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectItem.java	
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Set;
-
-public abstract class ReflectItem extends AbstractItem {
-
-static boolean convertTo32Bit(JNIType[] paramTypes, boolean floatingPointTypes) {
-	boolean changed = false;
-	for (int i = 0; i < paramTypes.length; i++) {
-		JNIType paramType = paramTypes[i];
-		if (paramType.isType("long")) {
-			paramTypes[i] = new ReflectType(Integer.TYPE);
-			changed = true;
-		}
-		if (paramType.isType("[J")) {
-			paramTypes[i] = new ReflectType(int[].class);
-			changed = true;
-		}
-		if (floatingPointTypes) {
-			if (paramType.isType("double")) {
-				paramTypes[i] = new ReflectType(Float.TYPE);
-				changed = true;
-			}
-			if (paramType.isType("[D")) {
-				paramTypes[i] = new ReflectType(float[].class);
-				changed = true;
-			}
-		}
-	}
-	return changed;	
-}
-
-boolean canChange64(Class clazz) {
-	if (!GEN64) return false;
-	return clazz == Integer.TYPE ||
-		clazz == Long.TYPE ||
-		clazz == Float.TYPE ||
-		clazz == Double.TYPE ||
-		clazz == int[].class ||
-		clazz == long[].class ||
-		clazz == float[].class ||
-		clazz == double[].class;
-}
-
-public String flatten() {
-	checkParams();
-	StringBuffer buffer = new StringBuffer();
-	Set set = params.keySet();
-	String[] keys = (String[])set.toArray(new String[set.size()]);
-	Arrays.sort(keys);
-	for (int j = 0; j < keys.length; j++) {
-		String key = keys[j];
-		Object value = params.get(key);
-		String valueStr = "";
-		if (value instanceof String) {
-			valueStr = (String)value;
-		} else if (value instanceof String[]) {
-			String[] values = (String[])value;
-			StringBuffer valueBuffer = new StringBuffer();
-			for (int i = 0; i < values.length; i++) {
-				if (i != 0) valueBuffer.append(" ");
-				valueBuffer.append(values[i]);
-			}
-			valueStr = valueBuffer.toString();
-		} else {
-			valueStr = value.toString();
-		}
-		if (valueStr.length() > 0) {
-			if (buffer.length() != 0) buffer.append(",");
-			buffer.append(key);
-			buffer.append("=");
-			buffer.append(valueStr);
-		}
-	}
-	return buffer.toString();
-}
-
-public void parse(String str) {
-	this.params = new HashMap();
-	if (str.length() == 0) return;
-	String[] params = split(str, ",");
-	for (int i = 0; i < params.length; i++) {
-		String param = params[i];
-		int equals = param.indexOf('=');
-		if (equals ==  -1) {
-			System.out.println("Error: " + str + " param " + param);
-		}
-		String key = param.substring(0, equals).trim();
-		String value = param.substring(equals + 1).trim();
-		setParam(key, value);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java
deleted file mode 100644
index 2120a29..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectMethod.java	
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.Modifier;
-import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-
-public class ReflectMethod extends ReflectItem implements JNIMethod {
-	Method method;
-	ReflectType returnType, returnType64;
-	ReflectType[] paramTypes, paramTypes64;
-	ReflectClass declaringClass;
-	Boolean unique;
-	
-public ReflectMethod(ReflectClass declaringClass, Method method, String source, CompilationUnit unit) {
-	this.method = method;
-	this.declaringClass = declaringClass;	
-	Class returnType = method.getReturnType();
-	Class[] paramTypes = method.getParameterTypes();
-	this.returnType = new ReflectType(returnType);
-	this.returnType64 = this.returnType;
-	this.paramTypes = new ReflectType[paramTypes.length];
-	this.paramTypes64 = new ReflectType[paramTypes.length];
-	for (int i = 0; i < this.paramTypes.length; i++) {
-		this.paramTypes[i] = this.paramTypes64[i] = new ReflectType(paramTypes[i]);
-	}
-	boolean changes = false;
-	if ((method.getModifiers() & Modifier.NATIVE) != 0) {
-		changes = canChange64(returnType);
-		if (!changes) {
-			for (int i = 0; i < paramTypes.length && !changes; i++) {
-				changes |= canChange64(paramTypes[i]);
-			}
-		}
-	}
-	if (changes && new File(declaringClass.sourcePath).exists()) {
-		String name = method.getName();
-		TypeDeclaration type = (TypeDeclaration)unit.types().get(0);
-		MethodDeclaration decl = null;
-		MethodDeclaration[] methods = type.getMethods();
-		for (int i = 0; i < methods.length && decl == null; i++) {
-			MethodDeclaration node = methods[i];
-			if (node.getName().getIdentifier().equals(name)) {
-				if (!declaringClass.getSimpleName(returnType).equals(node.getReturnType2().toString())) continue;
-				List parameters = node.parameters();
-				if (parameters.size() != paramTypes.length) continue;
-				decl = node;
-				for (int j = 0; j < paramTypes.length; j++) {
-					if (!declaringClass.getSimpleName(paramTypes[j]).equals(((SingleVariableDeclaration)parameters.get(j)).getType().toString())) {
-						decl = null;
-						break;
-					}
-				}
-			}
-		}
-		for (int i = 0; i < paramTypes.length; i++) {
-			if (canChange64(paramTypes[i])) {
-				Class clazz = paramTypes[i];
-				SingleVariableDeclaration node = (SingleVariableDeclaration)decl.parameters().get(i);
-				String s = source.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
-				if (clazz == int.class && s.indexOf("int /*long*/") != -1) this.paramTypes64[i] = new ReflectType(long.class);
-				else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) this.paramTypes64[i] = new ReflectType(long[].class);
-				else if (clazz == float.class && s.indexOf("float /*double*/") != -1) this.paramTypes64[i] = new ReflectType(double.class);
-				else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) this.paramTypes64[i] = new ReflectType(double[].class);
-				else if (clazz == long.class && s.indexOf("long /*int*/") != -1) this.paramTypes[i] = new ReflectType(int.class);
-				else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) this.paramTypes[i] = new ReflectType(int[].class);
-				else if (clazz == double.class && s.indexOf("double /*float*/") != -1) this.paramTypes[i] = new ReflectType(float.class);
-				else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) this.paramTypes[i] = new ReflectType(float[].class);
-			}
-		}
-		if (canChange64(returnType)) {
-			Class clazz = returnType;
-			ASTNode node = decl.getReturnType2();
-			String s = source.substring(node.getStartPosition(), decl.getName().getStartPosition());
-			if (clazz == int.class && s.indexOf("int /*long*/") != -1) this.returnType64 = new ReflectType(long.class);
-			else if (clazz == int[].class && (s.indexOf("int /*long*/") != -1 || s.indexOf("int[] /*long[]*/") != -1)) this.returnType64 = new ReflectType(long[].class);
-			else if (clazz == float.class && s.indexOf("float /*double*/") != -1) this.returnType64 = new ReflectType(double.class);
-			else if (clazz == float[].class && (s.indexOf("float /*double*/") != -1|| s.indexOf("float[] /*double[]*/") != -1)) this.returnType64 = new ReflectType(double[].class);
-			else if (clazz == long.class && s.indexOf("long /*int*/") != -1) this.returnType = new ReflectType(int.class);
-			else if (clazz == long[].class && (s.indexOf("long /*int*/") != -1|| s.indexOf("long[] /*int[]*/") != -1)) this.returnType = new ReflectType(int[].class);
-			else if (clazz == double.class && s.indexOf("double /*float*/") != -1) this.returnType = new ReflectType(float.class);
-			else if (clazz == double[].class && (s.indexOf("double /*float*/") != -1|| s.indexOf("double[] /*float[]*/") != -1)) this.returnType = new ReflectType(float[].class);
-		}		
-	}
-}
-
-public int hashCode() {
-	return method.hashCode();
-}
-
-public boolean equals(Object obj) {
-	if (!(obj instanceof ReflectMethod)) return false;
-	return ((ReflectMethod)obj).method.equals(method);
-}
-
-public JNIClass getDeclaringClass() {
-	return declaringClass;
-}
-
-public int getModifiers() {
-	return method.getModifiers();
-}
-
-public String getName() {
-	return method.getName();
-}
-
-public boolean isNativeUnique() {
-	if (unique != null) return unique.booleanValue();
-	boolean result = true;
-	String name = getName();
-	JNIMethod[] methods = declaringClass.getDeclaredMethods();
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod mth = methods[i];
-		if ((mth.getModifiers() & Modifier.NATIVE) != 0 &&
-			this != mth && !this.equals(mth) &&
-			name.equals(mth.getName()))
-			{
-				result = false;
-				break;
-			}
-	}
-	unique = new Boolean(result);
-	return result;
-}
-
-public JNIType[] getParameterTypes() {
-	return paramTypes;
-}
-
-public JNIType[] getParameterTypes64() {
-	return paramTypes64;
-}
-
-public JNIParameter[] getParameters() {
-	Class[] paramTypes = method.getParameterTypes();
-	ReflectParameter[] result = new ReflectParameter[paramTypes.length];
-	for (int i = 0; i < paramTypes.length; i++) {
-		result[i] = new ReflectParameter(this, i);
-	}
-	return result;
-}
-
-public JNIType getReturnType() {
-	return returnType;
-}
-
-public JNIType getReturnType64() {
-	return returnType64;
-}
-
-public String getAccessor() {
-	return (String)getParam("accessor");
-}
-
-public String getExclude() {
-	return (String)getParam("exclude");
-}
-
-public String getMetaData() {
-	String className = getDeclaringClass().getSimpleName();
-	String key = className + "_" + JNIGenerator.getFunctionName(this);
-	MetaData metaData = declaringClass.metaData;
-	String value = metaData.getMetaData(key, null);
-	if (value == null) {
-		key = className + "_" + method.getName();
-		value = metaData.getMetaData(key, null);
-	}
-	/*
-	* Support for 64 bit port.
-	*/
-	if (value == null) {
-		JNIType[] paramTypes = getParameterTypes();
-		if (convertTo32Bit(paramTypes, true)) {
-			key = className + "_" + JNIGenerator.getFunctionName(this, paramTypes);
-			value = metaData.getMetaData(key, null);
-		}
-		if (value == null) {
-			paramTypes = getParameterTypes();
-			if (convertTo32Bit(paramTypes, false)) {
-				key = className + "_" + JNIGenerator.getFunctionName(this, paramTypes);
-				value = metaData.getMetaData(key, null);
-			}
-		}
-	}
-	/*
-	* Support for lock.
-	*/
-	if (value == null && method.getName().startsWith("_")) {
-		key = className + "_" + JNIGenerator.getFunctionName(this).substring(2);
-		value = metaData.getMetaData(key, null);
-		if (value == null) {
-			key = className + "_" + method.getName().substring(1);
-			value = metaData.getMetaData(key, null);
-		}
-	}
-	if (value == null) value = "";	
-	return value;
-}
-
-public void setAccessor(String str) { 
-	setParam("accessor", str);
-}
-
-public void setExclude(String str) { 
-	setParam("exclude", str);
-}
-
-public void setMetaData(String value) {
-	String key;
-	String className = declaringClass.getSimpleName();
-	if (isNativeUnique()) {
-		key = className + "_" + method.getName ();
-	} else {
-		key = className + "_" + JNIGenerator.getFunctionName(this);
-	}
-	declaringClass.metaData.setMetaData(key, value);
-}
-
-public String toString() {
-	return method.toString();
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java
deleted file mode 100644
index 1fc669e..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectParameter.java	
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.File;
-
-public class ReflectParameter extends ReflectItem implements JNIParameter {
-	ReflectMethod method;
-	int parameter;
-
-public ReflectParameter(ReflectMethod method, int parameter) {
-	this.method = method;
-	this.parameter = parameter;
-}
-
-public String getCast() {
-	String cast = ((String)getParam("cast")).trim();
-	if (cast.length() > 0) {
-		if (!cast.startsWith("(")) cast = "(" + cast;
-		if (!cast.endsWith(")")) cast = cast + ")";
-	}
-	return cast;
-}
-
-public String getMetaData() {
-	String className = method.getDeclaringClass().getSimpleName();
-	String key = className + "_" + JNIGenerator.getFunctionName(method) + "_" + parameter;
-	MetaData metaData = method.declaringClass.metaData;
-	String value = metaData.getMetaData(key, null);
-	if (value == null) {
-		key = className + "_" + method.getName() + "_" + parameter;
-		value = metaData.getMetaData(key, null);
-	}
-	/*
-	* Support for 64 bit port.
-	*/
-	if (value == null) {
-		JNIType[] paramTypes = method.getParameterTypes();
-		if (ReflectItem.convertTo32Bit(paramTypes, true)) {
-			key = className + "_" + JNIGenerator.getFunctionName(method, paramTypes) + "_" + parameter;
-			value = metaData.getMetaData(key, null);
-		}
-		if (value == null) {
-			paramTypes = method.getParameterTypes();
-			if (ReflectItem.convertTo32Bit(paramTypes, false)) {
-				key = className + "_" + JNIGenerator.getFunctionName(method, paramTypes) + "_" + parameter;
-				value = metaData.getMetaData(key, null);
-			}
-		}
-	}
-	/*
-	* Support for lock.
-	*/
-	if (value == null && method.getName().startsWith("_")) {
-		key = className + "_" + JNIGenerator.getFunctionName(method).substring(2) + "_" + parameter;
-		value = metaData.getMetaData(key, null);
-		if (value == null) {
-			key = className + "_" + method.getName().substring(1) + "_" + parameter;
-			value = metaData.getMetaData(key, null);
-		}
-	}
-	if (value == null) value = "";	
-	return value;
-}
-
-public JNIMethod getMethod() {
-	return method;
-}
-
-public JNIClass getTypeClass() {
-	ReflectType type = (ReflectType)getType();
-	ReflectClass declaringClass = method.declaringClass;
-	String sourcePath  = declaringClass.sourcePath;
-	sourcePath = new File(sourcePath).getParent() + "/" + type.getSimpleName() + ".java";
-	return new ReflectClass(type.clazz, declaringClass.metaData, sourcePath);
-}
-
-public JNIType getType() {
-	return method.getParameterTypes()[parameter];
-}
-
-public JNIType getType64() {
-	return method.getParameterTypes64()[parameter];
-}
-
-public int getParameter() {
-	return parameter;
-}
-
-public void setCast(String str) {
-	setParam("cast", str);
-}
-
-public void setMetaData(String value) {
-	String key;
-	String className = method.getDeclaringClass().getSimpleName();
-	if (method.isNativeUnique()) {
-		key = className + "_" + method.getName () + "_" + parameter;
-	} else {
-		key = className + "_" + JNIGenerator.getFunctionName(method) + "_" + parameter;
-	}
-	method.declaringClass.metaData.setMetaData(key, value);
-}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java
deleted file mode 100644
index ce1f401..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ReflectType.java	
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public class ReflectType implements JNIType {
-	Class clazz;
-
-public ReflectType(Class clazz) {
-	this.clazz = clazz;
-}
-
-public boolean equals(Object obj) {
-	if (obj == this) return true;
-	if (!(obj instanceof ReflectType)) return false;
-	return ((ReflectType)obj).clazz == clazz;
-}
-
-public JNIType getComponentType() {
-	return new ReflectType(clazz.getComponentType());
-}
-
-public String getName() {
-	return clazz.getName();
-}
-
-public String getSimpleName() {
-	String name = clazz.getName();
-	int index = name.lastIndexOf('.') + 1;
-	return name.substring(index, name.length());
-}
-
-public String getTypeSignature(boolean define) {
-	if (clazz == Void.TYPE) return "V";
-	if (clazz == Integer.TYPE) return define ? "I_J" : "I";
-	if (clazz == Boolean.TYPE) return "Z";
-	if (clazz == Long.TYPE) return define ? "J_J" : "J";
-	if (clazz == Short.TYPE) return "S";
-	if (clazz == Character.TYPE) return "C";
-	if (clazz == Byte.TYPE) return "B";
-	if (clazz == Float.TYPE) return define ? "F_D" : "F";
-	if (clazz == Double.TYPE) return define ? "F_D" : "D";
-	if (clazz == String.class) return "Ljava/lang/String;";
-	if (clazz.isArray()) {
-		if (define) return getComponentType().getTypeSignature(define) + "Array";
-		return "[" + getComponentType().getTypeSignature(define);
-	}
-	return "L" + clazz.getName().replace('.', '/') + ";";
-}
-
-public String getTypeSignature1(boolean define) {
-	if (clazz == Void.TYPE) return "Void";
-	if (clazz == Integer.TYPE) return define ? "IntLong" : "Int";
-	if (clazz == Boolean.TYPE) return "Boolean";
-	if (clazz == Long.TYPE) return define ? "IntLong" : "Long";
-	if (clazz == Short.TYPE) return "Short";
-	if (clazz == Character.TYPE) return "Char";
-	if (clazz == Byte.TYPE) return "Byte";
-	if (clazz == Float.TYPE) return define ? "FloatDouble" : "Float";
-	if (clazz == Double.TYPE) return define ? "FloatDouble" : "Double";
-	if (clazz == String.class) return "String";
-	return "Object";
-}
-
-public String getTypeSignature2(boolean define) {
-	if (clazz == Void.TYPE) return "void";
-	if (clazz == Integer.TYPE) return define ? "jintLong" : "jint";
-	if (clazz == Boolean.TYPE) return "jboolean";
-	if (clazz == Long.TYPE) return define ? "jintLong" : "jlong";
-	if (clazz == Short.TYPE) return "jshort";
-	if (clazz == Character.TYPE) return "jchar";
-	if (clazz == Byte.TYPE) return "jbyte";
-	if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat";
-	if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble";
-	if (clazz == String.class) return "jstring";
-	if (clazz == Class.class) return "jclass";
-	if (clazz.isArray()) {
-		return getComponentType().getTypeSignature2(define) + "Array";
-	}
-	return "jobject";
-}
-
-public String getTypeSignature3(boolean define) {
-	if (clazz == Void.TYPE) return "void";
-	if (clazz == Integer.TYPE) return "int";
-	if (clazz == Boolean.TYPE) return "boolean";
-	if (clazz == Long.TYPE) return "long";
-	if (clazz == Short.TYPE) return "short";
-	if (clazz == Character.TYPE) return "char";
-	if (clazz == Byte.TYPE) return "byte";
-	if (clazz == Float.TYPE) return "float";
-	if (clazz == Double.TYPE) return "double";
-	if (clazz == String.class) return "String";
-	if (clazz.isArray()) {
-		return getComponentType().getTypeSignature3(define) + "[]";
-	}
-	return clazz.getName();
-}
-
-public String getTypeSignature4(boolean define, boolean struct) {
-	if (clazz == Void.TYPE) return "void";
-	if (clazz == Integer.TYPE) return define ? "jintLong" : "jint";
-	if (clazz == Boolean.TYPE) return "jboolean";
-	if (clazz == Long.TYPE) return define ? "jintLong" : "jlong";
-	if (clazz == Short.TYPE) return "jshort";
-	if (clazz == Character.TYPE) return "jchar";
-	if (clazz == Byte.TYPE) return "jbyte";
-	if (clazz == Float.TYPE) return define ? "jfloatDouble" : "jfloat";
-	if (clazz == Double.TYPE) return define ? "jfloatDouble" : "jdouble";
-	if (clazz == String.class) return "jstring";
-	if (clazz.isArray()) {
-		String sig = getComponentType().getTypeSignature4(define, struct);
-		return struct ? sig : sig + " *";
-	}
-	String sig = getSimpleName(); 
-	return struct ? sig : sig + " *";
-}
-
-public int hashCode() {
-	return clazz.hashCode();
-}
-
-public boolean isArray() {
-	return clazz.isArray();
-}
-
-public boolean isPrimitive() {
-	return clazz.isPrimitive();
-}
-
-public boolean isType(String type) {
-	return clazz.getName().equals(type);
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
deleted file mode 100644
index 408b220..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java	
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-
-public class SizeofGenerator extends JNIGenerator {
-
-
-public void generate(JNIClass clazz) {
-	String className = clazz.getSimpleName();
-	output("\tprintf(\"");
-	output(className);
-	output("=%d\\n\", sizeof(");
-	output(className);
-	outputln("));");
-//	Field[] fields = clazz.getDeclaredFields();
-//	generate(fields);	
-}
-	
-public void generate() {
-	outputln("int main() {");
-	super.generate();
-	outputln("}");
-}
-
-public void generate(JNIField[] fields) {
-	sort(fields);	
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
-		generate(field);
-	}
-}
-
-public void generate(JNIField field) {
-	output("\tprintf(\"");
-	output(field.getName());
-	output("=%d\\n\", sizeof(");
-	output(field.getName());
-	outputln("));");
-}
-
-public static void main(String[] args) {
-	if (args.length < 1) {
-		System.out.println("Usage: java SizeofGenerator <className1> <className2>");
-		return;
-	}
-	try {
-		SizeofGenerator gen = new SizeofGenerator();
-		for (int i = 0; i < args.length; i++) {
-			String clazzName = args[i];
-			Class clazz = Class.forName(clazzName);
-			gen.generate(new ReflectClass(clazz));
-		}
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
deleted file mode 100644
index 8a2bf8e..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java	
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-
-public class StatsGenerator extends JNIGenerator {
-
-	boolean header;
-	
-public StatsGenerator(boolean header) {
-	this.header = header;
-}
-
-public void generateCopyright() {
-	outputln(fixDelimiter(getMetaData().getCopyright()));
-}
-
-public void generateIncludes() {
-	if (!header) {
-		outputln("#include \"swt.h\"");
-		output("#include \"");
-		output(getOutputName());
-		outputln("_stats.h\"");
-		outputln();
-	}
-}
-
-public void generate(JNIClass clazz) {
-	if (header) {
-		generateHeaderFile(clazz);
-	} else {
-		generateSourceFile(clazz);
-	}
-}
-
-public String getExtension() {
-	return header ? ".h" : super.getExtension();
-}
-
-public String getSuffix() {
-	return "_stats";
-}
-
-void generateHeaderFile(JNIClass clazz){
-	generateNATIVEMacros(clazz);
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	sort(methods);
-	generateFunctionEnum(methods);	
-}
-
-void generateNATIVEMacros(JNIClass clazz) {
-	String className = clazz.getSimpleName();
-	outputln("#ifdef NATIVE_STATS");
-	output("extern int ");
-	output(className);
-	outputln("_nativeFunctionCount;");
-	output("extern int ");
-	output(className);
-	outputln("_nativeFunctionCallCount[];");
-	output("extern char* ");
-	output(className);
-	outputln("_nativeFunctionNames[];");
-	output("#define ");
-	output(className);
-	output("_NATIVE_ENTER(env, that, func) ");
-	output(className);
-	outputln("_nativeFunctionCallCount[func]++;");
-	output("#define ");
-	output(className);
-	outputln("_NATIVE_EXIT(env, that, func) ");
-	outputln("#else");
-	output("#ifndef ");
-	output(className);
-	outputln("_NATIVE_ENTER");
-	output("#define ");
-	output(className);
-	outputln("_NATIVE_ENTER(env, that, func) ");
-	outputln("#endif");
-	output("#ifndef ");
-	output(className);
-	outputln("_NATIVE_EXIT");
-	output("#define ");
-	output(className);
-	outputln("_NATIVE_EXIT(env, that, func) ");
-	outputln("#endif");
-	outputln("#endif");
-	outputln();	
-}
-
-void generateSourceFile(JNIClass clazz) {
-	outputln("#ifdef NATIVE_STATS");
-	outputln();
-	JNIMethod[] methods = clazz.getDeclaredMethods();
-	int methodCount = 0;
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		methodCount++;
-	}
-	String className = clazz.getSimpleName();
-	output("int ");
-	output(className);
-	output("_nativeFunctionCount = ");
-	output(String.valueOf(methodCount));
-	outputln(";");
-	output("int ");
-	output(className);
-	output("_nativeFunctionCallCount[");
-	output(String.valueOf(methodCount));
-	outputln("];");
-	output("char * ");
-	output(className);
-	outputln("_nativeFunctionNames[] = {");
-	sort(methods);
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());
-		if (!function.equals(function64)) {
-			output("#ifndef ");
-			output(JNI64);
-			outputln();
-		}
-		output("\t\"");
-		output(function);
-		outputln("\",");
-		if (!function.equals(function64)) {
-			outputln("#else");
-			output("\t\"");
-			output(function64);
-			outputln("\",");
-			outputln("#endif");
-		}
-		if (progress != null) progress.step();
-	}
-	outputln("};");
-	outputln();
-	generateStatsNatives(className);
-	outputln();
-	outputln("#endif");
-}
-
-void generateStatsNatives(String className) {
-	outputln("#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func");
-	outputln();
-
-	output("JNIEXPORT jint JNICALL STATS_NATIVE(");
-	output(toC(className + "_GetFunctionCount"));
-	outputln(")");
-	outputln("\t(JNIEnv *env, jclass that)");
-	outputln("{");
-	output("\treturn ");
-	output(className);
-	outputln("_nativeFunctionCount;");
-	outputln("}");
-	outputln();
-
-	output("JNIEXPORT jstring JNICALL STATS_NATIVE(");
-	output(toC(className + "_GetFunctionName"));
-	outputln(")");
-	outputln("\t(JNIEnv *env, jclass that, jint index)");
-	outputln("{");
-	output("\treturn ");
-	if (isCPP) {
-		output("env->NewStringUTF(");
-	} else {
-		output("(*env)->NewStringUTF(env, ");
-	}
-	output(className);
-	outputln("_nativeFunctionNames[index]);");
-	outputln("}");
-	outputln();
-
-	output("JNIEXPORT jint JNICALL STATS_NATIVE(");
-	output(toC(className + "_GetFunctionCallCount"));
-	outputln(")");
-	outputln("\t(JNIEnv *env, jclass that, jint index)");
-	outputln("{");
-	output("\treturn ");
-	output(className);
-	outputln("_nativeFunctionCallCount[index];");
-	outputln("}");
-}
-
-void generateFunctionEnum(JNIMethod[] methods) {
-	if (methods.length == 0) return;
-	outputln("typedef enum {");
-	for (int i = 0; i < methods.length; i++) {
-		JNIMethod method = methods[i];
-		if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
-		String function = getFunctionName(method), function64 = getFunctionName(method, method.getParameterTypes64());
-		if (!function.equals(function64)) {
-			output("#ifndef ");
-			output(JNI64);
-			outputln();
-		}
-		output("\t");
-		output(function);
-		outputln("_FUNC,");
-		if (!function.equals(function64)) {
-			outputln("#else");
-			output("\t");
-			output(function64);
-			outputln("_FUNC,");
-			outputln("#endif");
-		}
-		if (progress != null) progress.step();
-	}
-	JNIClass clazz = methods[0].getDeclaringClass();
-	output("} ");
-	output(clazz.getSimpleName());
-	outputln("_FUNCS;");
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
deleted file mode 100644
index 067aace..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java	
+++ /dev/null
@@ -1,579 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Modifier;
-import java.util.HashSet;
-import java.util.Iterator;
-
-public class StructsGenerator extends JNIGenerator {
-
-boolean header;
-
-static final boolean GLOBAL_REF = false;
-
-public StructsGenerator(boolean header) {
-	this.header = header;
-}
-
-public void generateCopyright() {
-	outputln(fixDelimiter(getMetaData().getCopyright()));
-}
-
-public void generateIncludes() {
-	if (header) {
-		output("#include \"");
-		output(getOutputName());
-		outputln(".h\"");
-	} else {
-		outputln("#include \"swt.h\"");
-		output("#include \"");
-		output(getOutputName());
-		outputln("_structs.h\"");
-	}
-	outputln();
-}
-
-public void generate(JNIClass clazz) {
-	int j = 0;
-	JNIField[] fields = clazz.getDeclaredFields();
-	for (; j < fields.length; j++) {
-		JNIField field = fields[j];
-		int mods = field.getModifiers();
-		if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) == 0) {
-			break;
-		}
-	}
-	if (j == fields.length) return;
-	if (header) {
-		generateHeaderFile(clazz);
-	} else {
-		generateSourceFile(clazz);
-	}
-}
-
-public void generate() {
-	if (!header && getClasses().length == 0) return;
-	super.generate();
-}
-
-public String getExtension() {
-	return header ? ".h" : super.getExtension();
-}
-
-public String getSuffix() {
-	return "_structs";
-}
-
-void generateExcludes(JNIClass[] classes) {
-	HashSet excludes = new HashSet();
-	for (int i = 0; i < classes.length; i++) {
-		JNIClass clazz = classes[i];
-		String exclude = clazz.getExclude();
-		if (exclude.length() != 0) {
-			excludes.add(exclude);
-		}
-	}
-	for (Iterator iter = excludes.iterator(); iter.hasNext();) {
-		String exclude = (String)iter.next();
-		outputln(exclude);
-		for (int i = 0; i < classes.length; i++) {
-			JNIClass clazz = classes[i];
-			String classExclude = clazz.getExclude();
-			if (exclude.equals(classExclude)) {
-				output("#define NO_");
-				outputln(clazz.getSimpleName());
-			}
-		}
-		outputln("#endif");
-		outputln();
-	}
-}
-
-void generateHeaderFile(JNIClass clazz) {
-	generateSourceStart(clazz);
-	generatePrototypes(clazz);
-	generateBlankMacros(clazz);
-	generateSourceEnd(clazz);	
-	outputln();
-}
-
-void generateSourceFile(JNIClass clazz) {
-	generateSourceStart(clazz);
-	generateFIDsStructure(clazz);
-	outputln();
-	generateGlobalVar(clazz);
-	outputln();
-	generateFunctions(clazz);
-	generateSourceEnd(clazz);
-	outputln();
-}
-
-void generateSourceStart(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output("#ifndef NO_");
-	outputln(clazzName);
-}
-
-void generateSourceEnd(JNIClass clazz) {
-	outputln("#endif");
-}
-
-void generateGlobalVar(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output(clazzName);
-	output("_FID_CACHE ");
-	output(clazzName);
-	outputln("Fc;");
-}
-
-void generateBlankMacros(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	outputln("#else");
-	output("#define cache");
-	output(clazzName);
-	outputln("Fields(a,b)");
-	output("#define get");
-	output(clazzName);
-	outputln("Fields(a,b,c) NULL");
-	output("#define set");
-	output(clazzName);
-	outputln("Fields(a,b,c)");
-	output("#define ");
-	output(clazzName);
-	outputln("_sizeof() 0");
-}
-
-void generatePrototypes(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output("void cache");
-	output(clazzName);
-	outputln("Fields(JNIEnv *env, jobject lpObject);");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	output(" *get");
-	output(clazzName);
-	output("Fields(JNIEnv *env, jobject lpObject, ");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	outputln(" *lpStruct);");
-	output("void set");
-	output(clazzName);
-	output("Fields(JNIEnv *env, jobject lpObject, ");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	outputln(" *lpStruct);");
-	output("#define ");
-	output(clazzName);
-	output("_sizeof() sizeof(");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	outputln(")");
-}
-
-void generateFIDsStructure(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output("typedef struct ");
-	output(clazzName);
-	outputln("_FID_CACHE {");
-	outputln("\tint cached;");
-	outputln("\tjclass clazz;");
-	output("\tjfieldID ");
-	JNIField[] fields = clazz.getDeclaredFields();
-	boolean first = true;
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if (ignoreField(field)) continue;
-		if (!first) output(", ");
-		output(field.getName());
-		first = false;
-	}
-	outputln(";");
-	output("} ");
-	output(clazzName);
-	outputln("_FID_CACHE;");
-}
-
-void generateCacheFunction(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output("void cache");
-	output(clazzName);
-	outputln("Fields(JNIEnv *env, jobject lpObject)");
-	outputln("{");
-	output("\tif (");
-	output(clazzName);
-	outputln("Fc.cached) return;");
-	JNIClass superclazz = clazz.getSuperclass();
-	if (!superclazz.getName().equals("java.lang.Object")) {
-		String superName = superclazz.getSimpleName();
-		output("\tcache");
-		output(superName);
-		outputln("Fields(env, lpObject);");
-	}
-	output("\t");
-	output(clazzName);
-	if (isCPP) {
-		if (GLOBAL_REF) {
-			output("Fc.clazz = (jclass)env->NewGlobalRef(env->GetObjectClass(lpObject));");
-		} else {
-			output("Fc.clazz = env->GetObjectClass(lpObject);");
-		}
-	} else {
-		if (GLOBAL_REF) {
-			output("Fc.clazz = (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, lpObject));");
-		} else {
-			output("Fc.clazz = (*env)->GetObjectClass(env, lpObject);");
-		}
-	}
-	outputln();
-	JNIField[] fields = clazz.getDeclaredFields();
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if (ignoreField(field)) continue;
-		output("\t");
-		output(clazzName);
-		output("Fc.");
-		output(field.getName());
-		if (isCPP) {
-			output(" = env->GetFieldID(");
-		} else {
-			output(" = (*env)->GetFieldID(env, ");
-		}
-		output(clazzName);
-		output("Fc.clazz, \"");
-		output(field.getName());
-		JNIType type = field.getType(), type64 = field.getType64();
-		output("\", ");
-		if (type.equals(type64)) output("\"");
-		output(type.getTypeSignature(!type.equals(type64)));
-		if (type.equals(type64)) output("\"");
-		outputln(");");
-	}
-	output("\t");
-	output(clazzName);
-	outputln("Fc.cached = 1;");
-	outputln("}");
-}
-
-void generateGetFields(JNIClass clazz) {
-	JNIClass superclazz = clazz.getSuperclass();
-	String clazzName = clazz.getSimpleName();
-	String superName = superclazz.getSimpleName();
-	if (!superclazz.getName().equals("java.lang.Object")) {
-		/* Windows exception - cannot call get/set function of super class in this case */
-		if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) {
-			output("\tget");
-			output(superName);
-			output("Fields(env, lpObject, (");
-			output(superName);
-			outputln(" *)lpStruct);");
-		} else {
-			generateGetFields(superclazz);
-		}
-	}
-	JNIField[] fields = clazz.getDeclaredFields();
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if (ignoreField(field)) continue;
-		String exclude = field.getExclude();
-		if (exclude.length() != 0) {
-			outputln(exclude);
-		}
-		boolean noWinCE = field.getFlag(FLAG_NO_WINCE);
-		if (noWinCE) {
-			outputln("#ifndef _WIN32_WCE");
-		}
-		JNIType type = field.getType(), type64 = field.getType64();
-		String typeName = type.getSimpleName();
-		String accessor = field.getAccessor();
-		if (accessor == null || accessor.length() == 0) accessor = field.getName();
-		if (type.isPrimitive()) {
-			output("\tlpStruct->");
-			output(accessor);
-			output(" = ");
-			output(field.getCast());
-			if (isCPP) {
-				output("env->Get");
-			} else {
-				output("(*env)->Get");
-			}
-			output(type.getTypeSignature1(!type.equals(type64)));
-			if (isCPP) {
-				output("Field(lpObject, ");
-			} else {
-				output("Field(env, lpObject, ");
-			}
-			output(field.getDeclaringClass().getSimpleName());
-			output("Fc.");
-			output(field.getName());
-			output(");");
-		} else if (type.isArray()) {
-			JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType();
-			if (componentType.isPrimitive()) {
-				outputln("\t{");
-				output("\t");				
-				output(type.getTypeSignature2(!type.equals(type64)));
-				output(" lpObject1 = (");
-				output(type.getTypeSignature2(!type.equals(type64)));
-				if (isCPP) {
-					output(")env->GetObjectField(lpObject, ");
-				} else {
-					output(")(*env)->GetObjectField(env, lpObject, ");
-				}
-				output(field.getDeclaringClass().getSimpleName());
-				output("Fc.");
-				output(field.getName());
-				outputln(");");
-				if (isCPP) {
-					output("\tenv->Get");
-				} else {
-					output("\t(*env)->Get");
-				}
-				output(componentType.getTypeSignature1(!componentType.equals(componentType64)));
-				if (isCPP) {
-					output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
-				} else {
-					output("ArrayRegion(env, lpObject1, 0, sizeof(lpStruct->");
-				}
-				output(accessor);
-				output(")");
-				if (!componentType.isType("byte")) {
-					output(" / sizeof(");
-					output(componentType.getTypeSignature2(!componentType.equals(componentType64)));
-					output(")");
-				}
-				output(", (");
-				output(type.getTypeSignature4(!type.equals(type64), false));				
-				output(")lpStruct->");
-				output(accessor);
-				outputln(");");
-				output("\t}");
-			} else {
-				throw new Error("not done");
-			}
-		} else {
-			outputln("\t{");
-			if (isCPP) {
-				output("\tjobject lpObject1 = env->GetObjectField(lpObject, ");
-			} else {
-				output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, ");
-			}
-			output(field.getDeclaringClass().getSimpleName());
-			output("Fc.");
-			output(field.getName());
-			outputln(");");
-			output("\tif (lpObject1 != NULL) get");
-			output(typeName);
-			output("Fields(env, lpObject1, &lpStruct->");
-			output(accessor);
-			outputln(");");
-			output("\t}");
-		}
-		outputln();
-		if (noWinCE) {
-			outputln("#endif");
-		}
-		if (exclude.length() != 0) {
-			outputln("#endif");
-		}
-	}
-}
-
-void generateGetFunction(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	output(" *get");
-	output(clazzName);
-	output("Fields(JNIEnv *env, jobject lpObject, ");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	outputln(" *lpStruct)");
-	outputln("{");
-	output("\tif (!");
-	output(clazzName);
-	output("Fc.cached) cache");
-	output(clazzName);
-	outputln("Fields(env, lpObject);");
-	generateGetFields(clazz);
-	outputln("\treturn lpStruct;");
-	outputln("}");
-}
-
-void generateSetFields(JNIClass clazz) {
-	JNIClass superclazz = clazz.getSuperclass();
-	String clazzName = clazz.getSimpleName();
-	String superName = superclazz.getSimpleName();
-	if (!superclazz.getName().equals("java.lang.Object")) {
-		/* Windows exception - cannot call get/set function of super class in this case */
-		if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) {
-			output("\tset");
-			output(superName);
-			output("Fields(env, lpObject, (");
-			output(superName);
-			outputln(" *)lpStruct);");
-		} else {
-			generateSetFields(superclazz);
-		}
-	}
-	JNIField[] fields = clazz.getDeclaredFields();
-	for (int i = 0; i < fields.length; i++) {
-		JNIField field = fields[i];
-		if (ignoreField(field)) continue;
-		String exclude = field.getExclude();
-		if (exclude.length() != 0) {
-			outputln(exclude);
-		}
-		boolean noWinCE = field.getFlag(FLAG_NO_WINCE);
-		if (noWinCE) {
-			outputln("#ifndef _WIN32_WCE");
-		}
-		JNIType type = field.getType(), type64 = field.getType64();
-		String typeName = type.getSimpleName();
-		String accessor = field.getAccessor();
-		if (accessor == null || accessor.length() == 0) accessor = field.getName();
-		if (type.isPrimitive()) {
-			if (isCPP) {
-				output("\tenv->Set");
-			} else {
-				output("\t(*env)->Set");
-			}
-			output(type.getTypeSignature1(!type.equals(type64)));
-			if (isCPP) {
-				output("Field(lpObject, ");
-			} else {
-				output("Field(env, lpObject, ");
-			}
-			output(field.getDeclaringClass().getSimpleName());
-			output("Fc.");
-			output(field.getName());
-			output(", (");
-			output(type.getTypeSignature2(!type.equals(type64)));
-			output(")lpStruct->");
-			output(accessor);
-			output(");");
-		} else if (type.isArray()) {
-			JNIType componentType = type.getComponentType(), componentType64 = type64.getComponentType();
-			if (componentType.isPrimitive()) {
-				outputln("\t{");
-				output("\t");				
-				output(type.getTypeSignature2(!type.equals(type64)));
-				output(" lpObject1 = (");
-				output(type.getTypeSignature2(!type.equals(type64)));
-				if (isCPP) {
-					output(")env->GetObjectField(lpObject, ");
-				} else {
-					output(")(*env)->GetObjectField(env, lpObject, ");
-				}
-				output(field.getDeclaringClass().getSimpleName());
-				output("Fc.");
-				output(field.getName());
-				outputln(");");
-				if (isCPP) {
-					output("\tenv->Set");
-				} else {
-					output("\t(*env)->Set");
-				}
-				output(componentType.getTypeSignature1(!componentType.equals(componentType64)));
-				if (isCPP) {
-					output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
-				} else {
-					output("ArrayRegion(env, lpObject1, 0, sizeof(lpStruct->");
-				}
-				output(accessor);
-				output(")");
-				if (!componentType.isType("byte")) {
-					output(" / sizeof(");
-					output(componentType.getTypeSignature2(!componentType.equals(componentType64)));
-					output(")");
-				}
-				output(", (");
-				output(type.getTypeSignature4(!type.equals(type64), false));				
-				output(")lpStruct->");
-				output(accessor);
-				outputln(");");
-				output("\t}");
-			} else {
-				throw new Error("not done");
-			}
-		} else {
-			outputln("\t{");
-			output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, ");
-			output(field.getDeclaringClass().getSimpleName());
-			output("Fc.");
-			output(field.getName());
-			outputln(");");
-			output("\tif (lpObject1 != NULL) set");
-			output(typeName);
-			output("Fields(env, lpObject1, &lpStruct->");
-			output(accessor);
-			outputln(");");
-			output("\t}");
-		}
-		outputln();
-		if (noWinCE) {
-			outputln("#endif");
-		}
-		if (exclude.length() != 0) {
-			outputln("#endif");
-		}
-	}
-}
-
-void generateSetFunction(JNIClass clazz) {
-	String clazzName = clazz.getSimpleName();
-	output("void set");
-	output(clazzName);
-	output("Fields(JNIEnv *env, jobject lpObject, ");
-	if (clazz.getFlag(Flags.FLAG_STRUCT)) {
-		output("struct ");
-	}
-	output(clazzName);
-	outputln(" *lpStruct)");
-	outputln("{");
-	output("\tif (!");
-	output(clazzName);
-	output("Fc.cached) cache");
-	output(clazzName);
-	outputln("Fields(env, lpObject);");
-	generateSetFields(clazz);
-	outputln("}");
-}
-
-void generateFunctions(JNIClass clazz) {
-	generateCacheFunction(clazz);
-	outputln();
-	generateGetFunction(clazz);
-	outputln();
-	generateSetFunction(clazz);
-}
-
-boolean ignoreField(JNIField field) {
-	int mods = field.getModifiers();
-	return
-		((mods & Modifier.PUBLIC) == 0) ||
-		((mods & Modifier.FINAL) != 0) ||
-		((mods & Modifier.STATIC) != 0);
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties
deleted file mode 100644
index 296709e..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties	
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2006, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n \
- * Copyright (c) 2000, %END_YEAR IBM Corporation and others. All rights reserved.\n \
- * The contents of this file are made available under the terms\n \
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that\n \
- * accompanies this distribution (lgpl-v21.txt).  The LGPL is also\n \
- * available at http://www.gnu.org/licenses/lgpl.html.  If the version\n \
- * of the LGPL at http://www.gnu.org is different to the version of\n \
- * the LGPL accompanying this distribution and there is any conflict\n \
- * between the two license versions, the terms of the LGPL accompanying\n \
- * this distribution shall govern.\n \
- * \n \
- * Contributors:\n \
- *     IBM Corporation - initial API and implementation\n \
- *******************************************************************************/\n
- 
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cairo.properties b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cairo.properties
deleted file mode 100644
index ab58993..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cairo.properties	
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/* ***** BEGIN LICENSE BLOCK *****\n \
- * Version: MPL 1.1\n \
- *\n \
- * The contents of this file are subject to the Mozilla Public License Version\n \
- * 1.1 (the "License"); you may not use this file except in compliance with\n \
- * the License. You may obtain a copy of the License at\n \
- * http://www.mozilla.org/MPL/\n \
- *\n \
- * Software distributed under the License is distributed on an "AS IS" basis,\n \
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n \
- * for the specific language governing rights and limitations under the\n \
- * License.\n \
- *\n \
- * Contributor(s):\n \
- *\n \
- * IBM\n \
- * -  Binding to permit interfacing between Cairo and SWT\n \
- * -  Copyright (C) 2005, %END_YEAR IBM Corp.  All Rights Reserved.\n \
- *\n \
- * ***** END LICENSE BLOCK ***** */\n
- 
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties
deleted file mode 100644
index afa0cf4..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties	
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n \
- * Copyright (c) 2000, %END_YEAR IBM Corporation and others. All rights reserved.\n \
- * The contents of this file are made available under the terms\n \
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that\n \
- * accompanies this distribution (lgpl-v21.txt).  The LGPL is also\n \
- * available at http://www.gnu.org/licenses/lgpl.html.  If the version\n \
- * of the LGPL at http://www.gnu.org is different to the version of\n \
- * the LGPL accompanying this distribution and there is any conflict\n \
- * between the two license versions, the terms of the LGPL accompanying\n \
- * this distribution shall govern.\n \
- * \n \
- * Contributors:\n \
- *     IBM Corporation - initial API and implementation\n \
- *******************************************************************************/\n
- 
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties
deleted file mode 100644
index 67885b3..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties	
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n \
-* Copyright (c) 2000, %END_YEAR IBM Corporation and others. All rights reserved.\n \
-* The contents of this file are made available under the terms\n \
-* of the GNU Lesser General Public License (LGPL) Version 2.1 that\n \
-* accompanies this distribution (lgpl-v21.txt).  The LGPL is also\n \
-* available at http://www.gnu.org/licenses/lgpl.html.  If the version\n \
-* of the LGPL at http://www.gnu.org is different to the version of\n \
-* the LGPL accompanying this distribution and there is any conflict\n \
-* between the two license versions, the terms of the LGPL accompanying\n \
-* this distribution shall govern.\n \
-* \n \
-* Contributors:\n \
-*     IBM Corporation - initial API and implementation\n \
-*******************************************************************************/\n
- 
diff --git a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties b/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
deleted file mode 100644
index d9c8b6b..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties	
+++ /dev/null
@@ -1,53 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n \
-* Copyright (c) 2000, %END_YEAR IBM Corporation and others.\n \
-* All rights reserved. This program and the accompanying materials\n \
-* are made available under the terms of the Eclipse Public License v1.0\n \
-* which accompanies this distribution, and is available at\n \
-* http://www.eclipse.org/legal/epl-v10.html\n \
-*\n \
-* Contributors:\n \
-*    IBM Corporation - initial API and implementation\n \
-*******************************************************************************/\n
-swt_properties_copyright=###############################################################################\n\
-# Copyright (c) 2000, %END_YEAR IBM Corporation and others.\n\
-# All rights reserved. This program and the accompanying materials\n\
-# are made available under the terms of the Eclipse Public License v1.0\n\
-# which accompanies this distribution, and is available at\n\
-# http://www.eclipse.org/legal/epl-v10.html\n\
-#\n\
-# Contributors:\n\
-#     IBM Corporation - initial API and implementation\n\
-###############################################################################
-swt_main_classes=\
-org.eclipse.swt.internal.accessibility.gtk.ATK,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
-org.eclipse.swt.internal.carbon.OS,../org.eclipse.swt/Eclipse SWT PI/carbon/library/,\
-org.eclipse.swt.internal.cde.CDE,../org.eclipse.swt/Eclipse SWT Program/cde/library/,\
-org.eclipse.swt.internal.gnome.GNOME,../org.eclipse.swt/Eclipse SWT Program/gnome/library/,\
-org.eclipse.swt.internal.gtk.GTK,../org.eclipse.swt/Eclipse SWT PI/motif_gtk/library/,\
-org.eclipse.swt.internal.gtk.OS,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
-org.eclipse.swt.internal.motif.OS,../org.eclipse.swt/Eclipse SWT PI/motif/library/,\
-org.eclipse.swt.internal.mozilla.XPCOM,../org.eclipse.swt/Eclipse SWT Mozilla/common/library/,\
-org.eclipse.swt.internal.mozilla.init.XPCOMInit,../org.eclipse.swt/Eclipse SWT Mozilla/common/library/,\
-org.eclipse.swt.internal.ole.win32.COM,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
-org.eclipse.swt.internal.photon.OS,../org.eclipse.swt/Eclipse SWT PI/photon/library/,\
-org.eclipse.swt.internal.win32.OS,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
-org.eclipse.swt.internal.gdip.Gdip,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
-org.eclipse.swt.internal.cairo.Cairo,../org.eclipse.swt/Eclipse SWT PI/cairo/library/,\
-org.eclipse.swt.internal.opengl.glx.GLX,../org.eclipse.swt/Eclipse SWT OpenGL/glx/library/,\
-org.eclipse.swt.internal.opengl.win32.WGL,../org.eclipse.swt/Eclipse SWT OpenGL/win32/library/,\
-org.eclipse.swt.internal.opengl.carbon.AGL,../org.eclipse.swt/Eclipse SWT OpenGL/carbon/library/,\
-org.eclipse.swt.internal.C,../org.eclipse.swt/Eclipse SWT PI/common/library/,\
-org.eclipse.swt.internal.wpf.OS,../org.eclipse.swt/Eclipse SWT PI/wpf/library/,\
-org.eclipse.swt.internal.win32.Win32,../org.eclipse.swt/Eclipse SWT PI/wpf_win32/library/,\
-org.eclipse.swt.internal.cocoa.Cocoa,../org.eclipse.swt/Eclipse SWT PI/carbon/library/,\
-org.eclipse.swt.internal.cocoa.OS,../org.eclipse.swt/Eclipse SWT PI/cocoa/library/
diff --git a/eclipse/plugins/org.eclipse.swt.tools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.tools/META-INF/MANIFEST.MF
deleted file mode 100644
index 3569c49..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.swt.tools; singleton:=true
-Bundle-Version: 3.5.0.qualifier
-Bundle-Activator: org.eclipse.swt.tools.Activator
-Bundle-ManifestVersion: 2
-Export-Package: org.eclipse.swt.tools,
- org.eclipse.swt.tools.internal; x-internal:=true
-Bundle-ActivationPolicy: lazy
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Require-Bundle: org.eclipse.swt;bundle-version="3.4.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
- org.eclipse.core.resources;bundle-version="3.4.0",
- org.eclipse.jdt.core;bundle-version="3.4.0",
- org.eclipse.ui;bundle-version="3.4.0",
- org.eclipse.ui.editors;bundle-version="3.4.0"
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java b/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java
deleted file mode 100644
index 71813bf..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/DOMWriter.java	
+++ /dev/null
@@ -1 +0,0 @@
-/*******************************************************************************
 * Copyright (c) 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.tools.internal;

import java.io.PrintStream;
import java.util.Arrays;
import java.util.Comparator;

import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class DOMWriter {

	static String ENCONDING = "UTF8";
	PrintStream out;
	String[] attributeFilter;
	String nodeFilter;

	public DOMWriter(PrintStream out) {
		this.out = new PrintStream(out);
	}

	String nodeName(Node node) {
		// TODO use getLocalName()?
		return node.getNodeName();
	}
	
	boolean filter(Attr attr) {
		if (attributeFilter == null) return false;
		String name = attr.getNodeName();
		for (int i = 0; i < attributeFilter.length; i++) {
			if (name.matches(attributeFilter[i])) return false;
		}
		return true;
	}
	
	void print(String str) {
		out.print(str);
	}
	void println() {
		out.println();
	}

	public void print(Node node) {
		print(node, 0);
	}
	
	public void print(Node node, int level) {
		if (node == null)
			return;
		int type = node.getNodeType();
		switch (type) {
			case Node.DOCUMENT_NODE: {
				print("<?xml version=\"1.0\" encoding=\"");
				print(ENCONDING);
				print("\"?>");
				println();
				print(((Document) node).getDocumentElement());
				break;
			}
			case Node.ELEMENT_NODE: {
				Attr attrs[] = sort(node.getAttributes());
				String name = nodeName(node);
				boolean gen = name.equals("arg") || name.equals("retval");
				for (int i = 0; i < attrs.length && !gen; i++) {
					Attr attr = attrs[i];
					if (nodeName(attr).startsWith(nodeFilter)) gen = true;
				}
				if (!gen) break;
				for (int i = 0; i < level; i++) print("\t");
				print("<");
				print(name);
				for (int i = 0; i < attrs.length; i++) {
					Attr attr = attrs[i];
					if (filter(attr)) continue;
					print(" ");
					print(nodeName(attr));
					print("=\"");
					print(normalize(attr.getNodeValue()));
					print("\"");
				}
				print(">");
				NodeList children = node.getChildNodes();
				int count = 0;
				if (children != null) {
					int len = children.getLength();
					for (int i = 0; i < len; i++) {
						if (children.item(i).getNodeType() == Node.ELEMENT_NODE) count++;
					}
					if (count > 0) println();
					for (int i = 0; i < len; i++) {
						print(children.item(i), level + 1);
					}
					if (count > 0) {
						for (int i = 0; i < level; i++) print("\t");
					}
				}
				print("</");
				print(nodeName(node));
				print(">");
				println();
				break;
			}
		}
		out.flush();
	}

	Attr[] sort(NamedNodeMap attrs) {
		if (attrs == null)
			return new Attr[0];
		Attr result[] = new Attr[attrs.getLength()];
		for (int i = 0; i < result.length; i++) {
			result[i] = (Attr) attrs.item(i);
		}
		Arrays.sort(result, new Comparator() {
			public int compare(Object arg0, Object arg1) {
				return nodeName((Node) arg0).compareTo(nodeName((Node) arg1));
			}
		});
		return result;
	}

	String normalize(String s) {
		if (s == null) return "";
		StringBuffer str = new StringBuffer();
		for (int i = 0, length = s.length(); i < length; i++) {
			char ch = s.charAt(i);
			switch (ch) {
				case '"': str.append("\""); break;
				case '\r':
				case '\n':
					// FALL THROUGH
				default: str.append(ch);
			}
		}
		return str.toString();
	}
	
	public void setNodeFilter(String filter) {
		
		nodeFilter = filter;
	}
	
	public void setAttributeFilter(String[] filter) {
		attributeFilter = filter;
	}
}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
deleted file mode 100644
index 45bddc0..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java	
+++ /dev/null
@@ -1,1675 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.util.*;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import org.w3c.dom.*;
-import org.xml.sax.InputSource;
-
-public class MacGenerator {
-	String[] xmls;
-	Document[] documents;
-	String outputDir, mainClassName;
-	String delimiter = System.getProperty("line.separator");
-
-	PrintStream out;
-	
-	public static boolean BUILD_C_SOURCE = true;
-
-public MacGenerator() {
-}
-
-static void list(File path, ArrayList list) {
-	if (path == null) return;
-	File[] frameworks = path.listFiles();
-	if (frameworks == null) return;
-	for (int i = 0; i < frameworks.length; i++) {
-		File file = frameworks[i];
-		String name = file.getName();
-		int index = name.lastIndexOf(".");
-		if (index != -1) {
-			String xml = file.getAbsolutePath() + "/Resources/BridgeSupport/" + name.substring(0, index) + "Full.bridgesupport";
-			if (new File(xml).exists()) {
-				list.add(xml);
-			}
-		}
-	}
-}
-
-int getLevel(Node node) {
-	int level = 0;
-	while (node != null) {
-		level++;
-		node = node.getParentNode();
-	}
-	return level;
-}
-
-void merge(Document document, Document extraDocument) {
-	if (extraDocument == null) return;
-	
-	/* Build a lookup table for extraDocument */
-	HashMap extras = new HashMap();
-	buildLookup(extraDocument, extras);
-
-	/* Merge attributes on existing elements building a lookup table for document */
-	HashMap lookup = new HashMap();
-	merge(document, extras, lookup);
-	
-	/* 
-	 * Merge new elements. Extras at this point contains only elements that were
-	 * not found in the document.
-	 */
-	ArrayList sortedNodes = Collections.list(Collections.enumeration(extras.values()));
-	Collections.sort(sortedNodes, new Comparator() {
-		public int compare(Object arg0, Object arg1) {
-			int compare = getLevel((Node)arg0) - getLevel((Node)arg1);
-			if (compare == 0) {
-				return ((Node)arg0).getNodeName().compareTo(((Node)arg1).getNodeName());
-			}
-			return compare;
-		}
-	});
-	String delimiter = System.getProperty("line.separator");
-	for (Iterator iterator = sortedNodes.iterator(); iterator.hasNext();) {
-		Node node = (Node) iterator.next();
-		String name = node.getNodeName();
-		if ("arg".equals(name) || "retval".equals(name)) {
-			if (!sortedNodes.contains(node.getParentNode())) continue;
-		}
-		Node parent = (Node)lookup.get(getKey(node.getParentNode()));
-		Element element = document.createElement(node.getNodeName());
-		String text = parent.getChildNodes().getLength() == 0 ? delimiter : "";
-		for (int i = 0, level = getLevel(parent) - 1; i < level; i++) {
-			text += "  ";
-		}
-		parent.appendChild(document.createTextNode(text));
-		parent.appendChild(element);
-		parent.appendChild(document.createTextNode(delimiter));
-		NamedNodeMap attributes = node.getAttributes();
-		for (int j = 0, length = attributes.getLength(); j < length; j++) {
-			Node attr = (Node)attributes.item(j);
-			element.setAttribute(attr.getNodeName(), attr.getNodeValue());
-		}
-		lookup.put(getKey(element), element);
-	}
-}
-
-public void generate(ProgressMonitor progress) {
-	if (progress != null) {
-		progress.setTotal(BUILD_C_SOURCE ? 4 : 3);
-		progress.setMessage("extra attributes...");
-	}
-	generateExtraAttributes();
-	if (progress != null) {
-		progress.step();
-		progress.setMessage(mainClassName);
-	}
-	generateMainClass();
-	if (progress != null) {
-		progress.step();
-		progress.setMessage("classes...");
-	}
-	generateClasses();
-	if (BUILD_C_SOURCE) {
-		if (progress != null) {
-			progress.step();
-			progress.setMessage("C source...");
-		}
-		generateCSource();
-	}
-	if (progress != null) {
-		progress.step();
-		progress.setMessage("Done.");
-	}
-}
-
-void generateCSource() {
-	JNIGeneratorApp app = new JNIGeneratorApp();
-	app.setMainClassName(mainClassName, outputDir + "/library");
-	app.generate();
-}
-
-String fixDelimiter(String str) {
-	if (delimiter.equals("\n")) return str;
-	int index = 0, length = str.length();
-	StringBuffer buffer = new StringBuffer();
-	while (index != -1) {
-		int start = index;
-		index = str.indexOf('\n', start);
-		if (index == -1) {
-			buffer.append(str.substring(start, length));
-		} else {
-			buffer.append(str.substring(start, index));
-			buffer.append(delimiter);
-			index++;
-		}
-	}
-	return buffer.toString();
-}
-
-void generateMethods(String className, ArrayList methods) {
-	for (Iterator iterator = methods.iterator(); iterator.hasNext();) {
-		Node method = (Node)iterator.next();
-		NamedNodeMap mthAttributes = method.getAttributes();
-		String sel = mthAttributes.getNamedItem("selector").getNodeValue();
-		out("public ");
-		boolean isStatic = isStatic(method); 
-		if (isStatic) out("static ");
-		Node returnNode = getReturnNode(method.getChildNodes());
-		if (getType(returnNode).equals("void")) returnNode = null;
-		String returnType = "", returnType64 = "";
-		if (returnNode != null) {
-			String type = returnType = getJavaType(returnNode), type64 = returnType64 = getJavaType64(returnNode);
-			out(type);
-			if (!type.equals(type64)) {
-				out(" /*");
-				out(type64);
-				out("*/");
-			}
-			out(" ");
-		} else {
-			out("void ");
-		}
-		String methodName = sel;
-		if (isUnique(method, methods)) {
-			int index = methodName.indexOf(":");
-			if (index != -1) methodName = methodName.substring(0, index);
-		} else {
-			//TODO improve this selector
-			methodName = methodName.replaceAll(":", "_");
-			if (isStatic) methodName = "static_" + methodName;
-		}
-		out(methodName);
-		out("(");
-		NodeList params = method.getChildNodes();
-		boolean first = true;
-		for (int k = 0; k < params.getLength(); k++) {
-			Node param = params.item(k);
-			if ("arg".equals(param.getNodeName())) {
-				NamedNodeMap paramAttributes = param.getAttributes();
-				if (!first) out(", ");
-				String type = getJavaType(param), type64 = getJavaType64(param);
-				out( type);
-				if (!type.equals(type64)) {
-					out(" /*");
-					out(type64);
-					out("*/");
-				}
-				first = false;
-				out(" ");
-				String paramName = paramAttributes.getNamedItem("name").getNodeValue();
-				if (paramName.length() == 0) paramName = "arg" + paramAttributes.getNamedItem("index").getNodeValue();
-				if (paramName.equals("boolean")) paramName = "b";
-				out(paramName);
-			}
-		}
-		out(") {");
-		outln();
-		if (returnNode != null && isStruct(returnNode)) {
-			out("\t");
-			out(returnType);
-			out(" result = new ");
-			out(returnType);
-			out("();");
-			outln();
-			out("\tOS.objc_msgSend_stret(result, ");
-		} else if (returnNode != null && isBoolean(returnNode)) {
-			out("\treturn ");
-			out("OS.objc_msgSend_bool(");
-		} else if (returnNode != null && isFloatingPoint(returnNode)) {
-			out("\treturn ");
-			if (returnType.equals("float")) out("(float)");
-			out("OS.objc_msgSend_fpret(");
-		} else if (returnNode != null && isObject(returnNode)) {
-			out("\tint /*long*/ result = OS.objc_msgSend(");
-		} else {
-			if (returnNode != null) {
-				out("\treturn ");
-				if ((returnType.equals("int") && returnType64.equals("int")) || !returnType.equals("int")) {
-					out("(");
-					out(returnType);
-					out(")");
-				}
-				if (returnType.equals("int") && returnType64.equals("int")) {
-					out("/*64*/");
-				}
-			} else {
-				out("\t");
-			}
-			out("OS.objc_msgSend(");
-		}
-		if (isStatic) {
-			out("OS.class_");
-			out(className);
-		} else {
-			out("this.id");
-		}
-		out(", OS.");
-		out(getSelConst(sel));
-		first = false;
-		for (int k = 0; k < params.getLength(); k++) {
-			Node param = params.item(k);
-			if ("arg".equals(param.getNodeName())) {
-				NamedNodeMap paramAttributes = param.getAttributes();
-				if (!first) out(", ");
-				first = false;
-				String paramName = paramAttributes.getNamedItem("name").getNodeValue();
-				if (paramName.length() == 0) paramName = "arg" + paramAttributes.getNamedItem("index").getNodeValue();
-				if (paramName.equals("boolean")) paramName = "b";
-				if (isObject(param)) {
-					out(paramName);
-					out(" != null ? ");
-					out(paramName);
-					out(".id : 0");
-				} else {
-					out(paramName);
-				}
-			}
-		}
-		out(")");
-		out(";");
-		outln();
-		if (returnNode != null && isObject(returnNode)) {
-			if (!isStatic && returnType.equals(className)) {
-				out("\treturn result == this.id ? this : (result != 0 ? new ");
-				out(returnType);
-				out("(result) : null);");
-			} else {
-				out("\treturn result != 0 ? new ");
-				NamedNodeMap attributes = returnNode.getAttributes();
-				Node swt_alloc = attributes.getNamedItem("swt_alloc");
-				if (swt_alloc != null && swt_alloc.getNodeValue().equals("true")) {
-					out(className);
-				} else {
-					out(returnType);
-				}
-				out("(result) : null;");
-			}
-			outln();
-		} else if (returnNode != null && isStruct(returnNode)) {
-			out("\treturn result;");
-			outln();
-		}
-		out("}");
-		outln();
-		outln();
-	}
-}
-
-void generateExtraMethods(String className) {
-	/* Empty constructor */
-	out("public ");
-	out(className);
-	out("() {");
-	outln();
-	out("\tsuper();");
-	outln();
-	out("}");
-	outln();
-	outln();
-	/* pointer constructor */
-	out("public ");
-	out(className);
-	out("(int /*long*/ id) {");
-	outln();
-	out("\tsuper(id);");
-	outln();
-	out("}");
-	outln();
-	outln();
-	/* object constructor */
-	out("public ");
-	out(className);
-	out("(id id) {");
-	outln();
-	out("\tsuper(id);");
-	outln();
-	out("}");
-	outln();
-	outln();
-	/* NSObject helpers */
-	if (className.equals("NSObject")) {
-		out("public NSObject alloc() {");
-		outln();
-		out("\tthis.id = OS.objc_msgSend(objc_getClass(), OS.sel_alloc);");
-		outln();
-		out("\treturn this;");
-		outln();
-		out("}");
-		outln();
-		outln();
-	}
-	/* NSString helpers */
-	if (className.equals("NSString")) {
-		/* Get java string */
-		out("public String getString() {");
-		outln();
-		out("\tchar[] buffer = new char[(int)/*64*/length()];");
-		outln();
-		out("\tgetCharacters(buffer);");
-		outln();
-		out("\treturn new String(buffer);");
-		outln();
-		out("}");
-		outln();
-		outln();
-		/* create NSString */
-		out("public static NSString stringWith(String str) {");
-		outln();
-		out("\tchar[] buffer = new char[str.length()];");
-		outln();
-		out("\tstr.getChars(0, buffer.length, buffer, 0);");
-		outln();
-		out("\treturn stringWithCharacters(buffer, buffer.length);");
-		outln();
-		out("}");
-		outln();
-		outln();
-	}	
-}
-
-TreeMap getGeneratedClasses() {
-	TreeMap classes = new TreeMap();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("class".equals(node.getNodeName()) && getGen(node)) {
-				ArrayList methods;
-				String name = node.getAttributes().getNamedItem("name").getNodeValue();
-				Object[] clazz = (Object[])classes.get(name);
-				if (clazz == null) {
-					methods = new ArrayList();
-					classes.put(name, new Object[]{node, methods});
-				} else {
-					methods = (ArrayList)clazz[1];
-				}
-				NodeList methodList = node.getChildNodes();
-				for (int j = 0; j < methodList.getLength(); j++) {
-					Node method = methodList.item(j);
-					if ("method".equals(method.getNodeName()) && getGen(method)) {
-						methods.add(method);
-					}					
-				}
-			}
-		}
-	}
-	return classes;
-}
-
-void copyClassMethodsDown(final Map classes) {
-	ArrayList sortedClasses = Collections.list(Collections.enumeration(classes.values()));
-	Collections.sort(sortedClasses, new Comparator() {
-		int getHierarchyLevel(Node node) {
-			String superclass = getSuperclassName(node);
-			int level = 0;
-			while (!superclass.equals("id")) {
-				level++;
-				superclass = getSuperclassName((Node)((Object[])classes.get(superclass))[0]);
-			}
-			return level;			
-		}
-		public int compare(Object arg0, Object arg1) {
-			return getHierarchyLevel((Node)((Object[])arg0)[0]) - getHierarchyLevel((Node)((Object[])arg1)[0]);  
-		}
-	});
-	for (Iterator iterator = sortedClasses.iterator(); iterator.hasNext();) {
-		Object[] clazz = (Object[]) iterator.next();
-		Node node = (Node)clazz[0];
-		ArrayList methods = (ArrayList)clazz[1];
-		Object[] superclass = (Object[])classes.get(getSuperclassName(node));
-		if (superclass != null) {
-			for (Iterator iterator2 = ((ArrayList)superclass[1]).iterator(); iterator2.hasNext();) {
-				Node method = (Node) iterator2.next();
-				if (isStatic(method)) {
-					methods.add(method);
-				}
-			}
-		}
-	}
-}
-
-String getSuperclassName (Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node superclass = attributes.getNamedItem("swt_superclass");
-	if (superclass != null) {
-		return superclass.getNodeValue();
-	} else {
-		Node name = attributes.getNamedItem("name");
-		if (name.getNodeValue().equals("NSObject")) {
-			return "id";
-		} else {
-			return "NSObject";
-		}
-	}
-}
-
-void generateClasses() {
-	MetaData metaData = new MetaData(mainClassName);	
-	TreeMap classes = getGeneratedClasses();
-	copyClassMethodsDown(classes);
-	
-	Set classNames = classes.keySet();
-	for (Iterator iterator = classNames.iterator(); iterator.hasNext();) {
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		this.out = new PrintStream(out);
-
-		out(fixDelimiter(metaData.getCopyright()));
-
-		String className = (String) iterator.next();
-		Object[] clazz = (Object[])classes.get(className);
-		Node node = (Node)clazz[0];
-		ArrayList methods = (ArrayList)clazz[1];
-		out("package ");
-		String packageName = getPackageName(mainClassName);
-		out(packageName);
-		out(";");
-		outln();
-		outln();
-		out("public class ");
-		out(className);
-		out(" extends ");
-		out(getSuperclassName(node));
-		out(" {");
-		outln();
-		outln();		
-		generateExtraMethods(className);
-		generateMethods(className, methods);		
-		out("}");
-		outln();
-		
-		String fileName = outputDir + packageName.replace('.', '/') + "/" + className + ".java";
-		try {
-			out.flush();
-			if (out.size() > 0) JNIGenerator.output(out.toByteArray(), fileName);
-		} catch (Exception e) {
-			System.out.println("Problem");
-			e.printStackTrace(System.out);
-		}
-		out = null;
-	}
-}
-
-void generateExtraAttributes() {
-	Document[] documents = getDocuments();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null || !getGen(document.getDocumentElement())) continue;
-		saveExtraAttributes(xmls[x], document);
-	}
-}
-
-void generateMainClass() {
-	ByteArrayOutputStream out = new ByteArrayOutputStream();
-	this.out = new PrintStream(out);
-
-	String header = "", footer = "";
-	String fileName = outputDir + mainClassName.replace('.', '/') + ".java";
-	FileInputStream is = null;
-	try {
-		InputStreamReader input = new InputStreamReader(new BufferedInputStream(is = new FileInputStream(fileName)));
-		StringBuffer str = new StringBuffer();
-		char[] buffer = new char[4096];
-		int read;
-		while ((read = input.read(buffer)) != -1) {
-			str.append(buffer, 0, read);
-		}
-		String section = "/** This section is auto generated */";
-		int start = str.indexOf(section) + section.length();
-		int end = str.indexOf(section, start);
-		header = str.substring(0, start);
-		footer = str.substring(end);
-	} catch (IOException e) {
-	} finally {
-		try {
-			if (is != null) is.close();
-		} catch (IOException e) {}
-	}
-	
-	out(header);
-	outln();
-	outln();
-
-	out("/** Custom callbacks */");
-	outln();
-	generateCustomCallbacks();
-	outln();	
-	out("/** Classes */");
-	outln();
-	generateClassesConst();
-	outln();
-	out("/** Protocols */");
-	outln();
-	generateProtocolsConst();
-	outln();
-	out("/** Selectors */");
-	outln();
-	generateSelectorsConst();
-	outln();
-	out("/** Constants */");
-	outln();
-	generateEnums();
-	outln();
-	out("/** Globals */");
-	outln();
-	generateConstants();
-	outln();
-	out("/** Functions */");
-	outln();
-	outln();
-	generateFunctions();
-	outln();
-	out("/** Super Sends */");
-	outln();
-	generateSends(true);
-	outln();
-	out("/** Sends */");
-	outln();
-	generateSends(false);
-	outln();
-	generateStructNatives();
-	
-	outln();
-	out(footer);
-	try {
-		out.flush();
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), fileName);
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-public Document[] getDocuments() {
-	if (documents == null) {
-		String[] xmls = getXmls();
-		documents = new Document[xmls.length];
-		for (int i = 0; i < xmls.length; i++) {
-			String xmlPath = xmls[i];
-			Document document = documents[i] = getDocument(xmlPath);
-			if (document == null) continue;
-			if (mainClassName != null && outputDir != null) {
-				String packageName = getPackageName(mainClassName);
-				String extrasPath = outputDir + packageName.replace('.', '/') + "/" + getFileName(xmlPath) + ".extras";
-				merge(document, getDocument(extrasPath));
-			}
-		}
-	}
-	return documents;
-}
-
-public String[] getXmls() {
-	if (xmls == null || xmls.length == 0) {
-		ArrayList array = new ArrayList();
-		list(new File("/System/Library/Frameworks"), array);
-		list(new File("/System/Library/Frameworks/CoreServices.framework/Frameworks"), array);
-		list(new File("/System/Library/Frameworks/ApplicationServices.framework/Frameworks"), array);
-		Collections.sort(array, new Comparator() {
-			public int compare(Object o1, Object o2) {
-				return new File((String)o1).getName().compareTo(new File((String)o2).getName());
-			}
-		});
-		xmls = (String[])array.toArray(new String[array.size()]);
-	}
-	return xmls;
-}
-
-void saveExtraAttributes(String xmlPath, Document document) {
-	try {
-		String packageName = getPackageName(mainClassName);
-		String fileName = outputDir + packageName.replace('.', '/') + "/" + getFileName(xmlPath) + ".extras";
-		ByteArrayOutputStream out = new ByteArrayOutputStream();
-		DOMWriter writer = new DOMWriter(new PrintStream(out));
-		String[] names = getIDAttributeNames();
-		String[] filter = new String[names.length + 2];
-		filter[0] = "class_method";
-		filter[1] = "swt_.*";
-		System.arraycopy(names, 0, filter, 2, names.length);
-		writer.setAttributeFilter(filter);
-		writer.setNodeFilter("swt_");
-		writer.print(document);
-		if (out.size() > 0) JNIGenerator.output(out.toByteArray(), fileName);
-	} catch (Exception e) {
-		System.out.println("Problem");
-		e.printStackTrace(System.out);
-	}
-}
-
-public void setOutputDir(String dir) {
-	if (dir != null) {
-		if (!dir.endsWith("\\") && !dir.endsWith("/") ) {
-			dir += "/";
-		}
-	}
-	this.outputDir = dir;
-}
-
-public void setXmls(String[] xmls) {
-	this.xmls = xmls;
-	this.documents = null;
-}
-
-public void setMainClass(String mainClassName) {
-	this.mainClassName = mainClassName;
-}
-
-Document getDocument(String xmlPath) {
-	try {
-		InputStream is = null;
-		if (xmlPath.indexOf(File.separatorChar) == -1) is = getClass().getResourceAsStream(xmlPath);
-		if (is == null) is = new BufferedInputStream(new FileInputStream(xmlPath));
-		if (is != null) return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(is));
-	} catch (Exception e) {
-//		e.printStackTrace();
-	}
-	return null;
-}
-
-public String[] getExtraAttributeNames(Node node) {
-	String name = node.getNodeName();
-	if (name.equals("method")) {
-		return new String[]{"swt_gen_super_msgSend", "swt_gen_custom_callback"};
-	} else if (name.equals("function")) {
-		NamedNodeMap attribs = node.getAttributes();
-		if (attribs != null && attribs.getNamedItem("variadic") != null) {
-			return new String[]{"swt_variadic_count","swt_variadic_java_types"};
-		}
-	} else if (name.equals("class")) {
-		return new String[]{"swt_superclass"};
-	} else if (name.equals("retval")) {
-		return new String[]{"swt_java_type", "swt_java_type64", "swt_alloc"};
-	} else if (name.equals("arg")) {
-		return new String[]{"swt_java_type", "swt_java_type64"};
-	}
-	return new String[0];
-}
-
-public String getFileName(String xmlPath) {
-	File file = new File(xmlPath);
-	return file.getName();
-}
-
-String getKey (Node node) {
-	StringBuffer buffer = new StringBuffer();
-	while (node != null) {
-		if (buffer.length() > 0) buffer.append("_");
-		String name = node.getNodeName();
-		StringBuffer key = new StringBuffer(name);
-		Node nameAttrib = getIDAttribute(node);
-		if (nameAttrib != null) {
-			key.append("-");
-			key.append(nameAttrib.getNodeValue());
-		}
-		NamedNodeMap attributes = node.getAttributes();
-		if (attributes != null) {
-			boolean isStatic = attributes.getNamedItem("class_method") != null;
-			if (isStatic) key.append("-static");
-		}
-		buffer.append(key.reverse());
-		node = node.getParentNode();
-	}
-	buffer.reverse();
-	return buffer.toString();
-}
-
-public Node getIDAttribute(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	if (attributes == null) return null;
-	String[] names = getIDAttributeNames();
-	for (int i = 0; i < names.length; i++) {
-		Node nameAttrib = attributes.getNamedItem(names[i]);
-		if (nameAttrib != null) return nameAttrib;
-	}
-	return null;
-}
-
-public String[] getIDAttributeNames() {
-	return new String[]{
-		"name",
-		"selector",
-		"path",
-	};
-}
-
-void merge(Node node, HashMap extras, HashMap docLookup) {
-	NodeList list = node.getChildNodes();
-	for (int i = 0; i < list.getLength(); i++) {
-		Node childNode = list.item(i);
-		if (childNode.getNodeType() == Node.ELEMENT_NODE) {
-			String key = getKey(childNode);
-			if (docLookup != null && docLookup.get(key) == null) {
-				docLookup.put(key, childNode);
-			}
-			Node extra = (Node)extras.remove(key);
-			if (extra != null) {
-				NamedNodeMap attributes = extra.getAttributes();
-				for (int j = 0, length = attributes.getLength(); j < length; j++) {
-					Node attr = (Node)attributes.item(j);
-					String name = attr.getNodeName();
-					if (name.startsWith("swt_")) {
-						((Element)childNode).setAttribute(name, attr.getNodeValue());
-					}
-				}
-			}
-		}
-		merge(childNode, extras, docLookup);
-	}
-}
-
-	
-void out(String str) {
-	PrintStream out = this.out;
-	if (out == null) out = System.out;
-	out.print(str);
-}
-
-void outln() {
-	PrintStream out = this.out;
-	if (out == null) out = System.out;
-	out.println();
-}
-
-void generateConstants() {
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("constant".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NamedNodeMap attributes = node.getAttributes();
-					String constName = attributes.getNamedItem("name").getNodeValue();
-					out("/** @method flags=const */");
-					outln();
-					out("public static final native ");
-					String type = getType(node), type64 = getType64(node);
-					out(type);
-					if (!type.equals(type64)) {
-						out(" /*");
-						out(type64);
-						out("*/");
-					}
-					out(" ");
-					out(constName);
-					out("();");
-					outln();
-					if (attributes.getNamedItem("declared_type").getNodeValue().equals("NSString*")) {
-						out("public static final NSString ");
-						out(constName);
-						out(" = new NSString(");
-						out(constName);
-						out("());");
-						outln();
-					}
-				}
-			}
-		}		
-	}
-}
-
-void generateEnums() {
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("enum".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NamedNodeMap attributes = node.getAttributes();
-					Node valueNode = attributes.getNamedItem("value");
-					if (valueNode != null) {
-						String value = valueNode.getNodeValue();
-						out("public static final ");
-						boolean isLong = false;
-						if (value.indexOf('.') != -1) {
-							out("double ");
-						} else {
-							try {
-								Integer.parseInt(value);
-								out("int ");
-							} catch (NumberFormatException e) {
-								isLong = true;
-								out("long ");
-							}
-						}
-						out(attributes.getNamedItem("name").getNodeValue());
-						out(" = ");
-						out(value);
-						if (isLong && !value.endsWith("L")) out("L");
-						out(";");
-						outln();
-					}
-				}
-			}
-		}
-	}
-}
-
-boolean getGen(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	if (attributes == null) return false;
-	Node gen = attributes.getNamedItem("swt_gen");
-	return gen != null && !gen.getNodeValue().equals("false");
-}
-
-boolean getGenSuper(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	if (attributes == null) return false;
-	Node gen = attributes.getNamedItem("swt_gen_super_msgSend");
-	return gen != null && !gen.getNodeValue().equals("false");
-}
-
-boolean getGenCallback(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	if (attributes == null) return false;
-	Node gen = attributes.getNamedItem("swt_gen_custom_callback");
-	return gen != null && !gen.getNodeValue().equals("false");
-}
-
-boolean isStatic(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node isStatic = attributes.getNamedItem("class_method");
-	return isStatic != null && isStatic.getNodeValue().equals("true");
-}
-
-boolean isStruct(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return code.startsWith("{");
-}
-
-boolean isFloatingPoint(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return code.equals("f") || code.equals("d");
-}
-
-boolean isObject(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return code.equals("@");
-}
-
-boolean isBoolean(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return code.equals("B");
-}
-
-void buildLookup(Node node, HashMap table) {
-	NodeList list = node.getChildNodes();
-	for (int i = 0; i < list.getLength(); i++) {
-		Node childNode = list.item(i);
-		if (childNode.getNodeType() == Node.ELEMENT_NODE) {
-			String key = getKey(childNode);
-			if (table.get(key) == null) table.put(key, childNode);
-			buildLookup(childNode, table);
-		}
-	}
-}
-
-boolean isUnique(Node method, ArrayList methods) {
-	String methodName = method.getAttributes().getNamedItem("selector").getNodeValue();
-	String signature = "";
-	NodeList params = method.getChildNodes();
-	for (int k = 0; k < params.getLength(); k++) {
-		Node param = params.item(k);
-		if ("arg".equals(param.getNodeName())) {
-			signature += getJavaType(param);
-		}
-	}
-	int index = methodName.indexOf(":");
-	if (index != -1) methodName = methodName.substring(0, index);
-	for (Iterator iterator = methods.iterator(); iterator.hasNext();) {
-		Node other = (Node) iterator.next();
-		NamedNodeMap attributes = other.getAttributes();
-		Node otherSel = null;
-		if (attributes != null) otherSel = attributes.getNamedItem("selector");
-		if (other != method && otherSel != null) {
-			String otherName = otherSel.getNodeValue();
-			index = otherName.indexOf(":");
-			if (index != -1) otherName = otherName.substring(0, index);
-			if (methodName.equals(otherName)) {
-				NodeList otherParams = other.getChildNodes();
-				String otherSignature = "";
-				for (int k = 0; k < otherParams.getLength(); k++) {
-					Node param = otherParams.item(k);
-					if ("arg".equals(param.getNodeName())) {
-						otherSignature += getJavaType(param);
-					}
-				}
-				if (signature.equals(otherSignature)) {
-					return false;
-				}
-			}
-		}
-	}
-	return true;
-}
-
-void generateSelectorsConst() {
-	TreeSet set = new TreeSet();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("class".equals(node.getNodeName()) || "informal_protocol".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NodeList methods = node.getChildNodes();
-					for (int j = 0; j < methods.getLength(); j++) {
-						Node method = methods.item(j);
-						if (getGen(method)) {
-							NamedNodeMap mthAttributes = method.getAttributes();
-							String sel = mthAttributes.getNamedItem("selector").getNodeValue();
-							set.add(sel);
-						}
-					}
-				}
-			}
-		}
-	}
-	set.add("alloc");
-	for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-		String sel = (String) iterator.next();
-		String selConst = getSelConst(sel);
-		out("public static final int /*long*/ ");
-		out(selConst);
-		out(" = ");
-		out("sel_registerName(\"");
-		out(sel);
-		out("\");");
-		outln();
-	}
-}
-
-void generateStructNatives() {
-	TreeSet set = new TreeSet();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("struct".equals(node.getNodeName()) && getGen(node)) {
-				set.add(getIDAttribute(node).getNodeValue());
-			}
-		}
-	}
-	out("/** Sizeof natives */");
-	outln();
-	for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-		String struct = (String) iterator.next();
-		out("public static final native int ");
-		out(struct);
-		out("_sizeof();");
-		outln();
-	}
-	outln();
-	out("/** Memmove natives */");
-	outln();
-	outln();
-	for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-		String struct = (String) iterator.next();
-		out("/**");
-		outln();
-		out(" * @param dest cast=(void *),flags=no_in critical");
-		outln();
-		out(" * @param src cast=(void *),flags=critical");
-//		out(" * @param src cast=(void *),flags=no_out critical");
-		outln();
-		out(" */");
-		outln();
-		out("public static final native void memmove(");
-		out("int /*long*/ dest, ");
-		out(struct);
-		out(" src, int /*long*/ size);");
-		outln();
-		out("/**");
-		outln();
-		out(" * @param dest cast=(void *),flags=no_in critical");
-		outln();
-		out(" * @param src cast=(void *),flags=critical");
-//		out(" * @param src cast=(void *),flags=no_out critical");
-		outln();
-		out(" */");
-		outln();
-		out("public static final native void memmove(");
-		out(struct);
-		out(" dest, int /*long*/ src, int /*long*/ size);");
-		outln();
-	}
-}
-
-String buildSend(Node method, boolean tags, boolean only64, boolean superCall) {
-	Node returnNode = getReturnNode(method.getChildNodes());
-	StringBuffer buffer = new StringBuffer();
-	buffer.append("public static final native "); 
-	if (returnNode != null && isStruct(returnNode)) {
-		buffer.append("void ");
-		buffer.append(superCall ? "objc_msgSendSuper_stret" : "objc_msgSend_stret");
-		buffer.append("(");
-		buffer.append(getJavaType(returnNode));
-		buffer.append(" result, ");
-	} else if (returnNode != null && isFloatingPoint(returnNode)) {
-		buffer.append("double ");
-		buffer.append(superCall ? "objc_msgSendSuper_fpret" : "objc_msgSend_fpret");
-		buffer.append("(");
-	} else if (returnNode != null && isBoolean(returnNode)) {
-		buffer.append("boolean ");
-		buffer.append(superCall ? "objc_msgSendSuper_bool" : "objc_msgSend_bool");
-		buffer.append("(");
-	} else {
-		if (only64) {
-			buffer.append("long");
-		} else {		
-			if (tags) {
-				buffer.append("int /*long*/");
-			} else {
-				buffer.append("int");
-			}
-		}
-		buffer.append(" ");
-		buffer.append(superCall ? "objc_msgSendSuper" : "objc_msgSend");
-		buffer.append("(");
-	}
-	if (superCall) {
-		if (only64) {
-			buffer.append("objc_super superId, long sel");
-		} else {
-			if (tags) {
-				buffer.append("objc_super superId, int /*long*/ sel");
-			} else {
-				buffer.append("objc_super superId, int sel");
-			}
-		}
-	} else {
-		if (only64) {
-			buffer.append("long id, long sel");
-		} else {
-			if (tags) {
-				buffer.append("int /*long*/ id, int /*long*/ sel");
-			} else {
-				buffer.append("int id, int sel");
-			}
-		}
-	}
-	NodeList params = method.getChildNodes();
-	boolean first = false;
-	int count = 0;
-	for (int k = 0; k < params.getLength(); k++) {
-		Node param = params.item(k);
-		if ("arg".equals(param.getNodeName())) {
-			if (!first) buffer.append(", ");
-			if (isStruct(param)) {
-				buffer.append(getJavaType(param));
-			} else {
-				String type = getType(param), type64 = getType64(param);
-				buffer.append(only64 ? type64 : type);
-				if (!only64 && tags && !type.equals(type64)) {
-					buffer.append(" /*");
-					buffer.append(type64);
-					buffer.append("*/");
-				}
-			}
-			first = false;
-			buffer.append(" arg");
-			buffer.append(String.valueOf(count++));
-		}
-	}
-	buffer.append(");");
-	return buffer.toString();
-}
-
-String getCType (Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	return attributes.getNamedItem("declared_type").getNodeValue();
-}
-
-Node findNSObjectMethod(Node method) {
-	NamedNodeMap methodAttributes = method.getAttributes();
-	String selector = methodAttributes.getNamedItem("selector").getNodeValue();
-	NodeList list = method.getParentNode().getParentNode().getChildNodes();
-	for (int i = 0; i < list.getLength(); i++) {
-		Node cls = list.item(i);
-		if ("class".equals(cls.getNodeName())) {
-			NamedNodeMap classAttributes = cls.getAttributes();
-			if ("NSObject".equals(classAttributes.getNamedItem("name").getNodeValue())) {
-				NodeList methods = cls.getChildNodes();
-				for (int j = 0; j < methods.getLength(); j++) {
-					Node mth = methods.item(j);
-					if ("method".equals(mth.getNodeName())) {
-						NamedNodeMap mthAttributes = mth.getAttributes();
-						if (selector.equals(mthAttributes.getNamedItem("selector").getNodeValue())) {
-							return mth;
-						}
-					}
-				}
-			}
-		}
-	}
-	return null;
-}
-
-void generateCustomCallbacks() {
-	TreeMap set = new TreeMap();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if (("class".equals(node.getNodeName()) || "informal_protocol".equals(node.getNodeName())) && getGen(node)) {
-				NodeList methods = node.getChildNodes();
-				for (int j = 0; j < methods.getLength(); j++) {
-					Node method = methods.item(j);
-					if ("method".equals(method.getNodeName()) && getGen(method) && getGenCallback(method)) {
-						NamedNodeMap mthAttributes = method.getAttributes();
-						String sel = mthAttributes.getNamedItem("selector").getNodeValue();
-						set.put(sel, method);
-					}
-				}
-			}
-		}
-	}
-	for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) {
-		String key = (String)iterator.next();
-		Node method = (Node)set.get(key);
-		if ("informal_protocol".equals(method.getParentNode().getNodeName())) {
-			method = findNSObjectMethod(method);
-			if (method == null) continue;
-		}		
-		String nativeMth = key.replaceAll(":", "_");
-		out("/** @method callback_types=");
-		Node returnNode = getReturnNode(method.getChildNodes());
-		out(returnNode == null ? "void" : getCType(returnNode));
-		out(";id;SEL;");
-		NodeList params = method.getChildNodes();
-		for (int k = 0; k < params.getLength(); k++) {
-			Node param = params.item(k);
-			if ("arg".equals(param.getNodeName())) {
-				out(getCType(param));
-				out(";");
-			}
-		}
-		out(",callback_flags=");
-		out(returnNode != null && isStruct(returnNode) ? "struct" : "none");
-		out(";none;none;");
-		for (int k = 0; k < params.getLength(); k++) {
-			Node param = params.item(k);
-			if ("arg".equals(param.getNodeName())) {
-				out (isStruct(param) ? "struct" : "none");
-				out(";");
-			}
-		}
-		out(" */");
-		outln();
-		out("public static final native int /*long*/ CALLBACK_");
-		out(nativeMth);
-		out("(int /*long*/ func);");
-		outln();
-	}
-}
-
-void generateSends(boolean superCall) {
-	TreeMap set = new TreeMap();
-	TreeMap set64 = new TreeMap();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("class".equals(node.getNodeName()) && getGen(node)) {
-				NodeList methods = node.getChildNodes();
-				for (int j = 0; j < methods.getLength(); j++) {
-					Node method = methods.item(j);
-					if ("method".equals(method.getNodeName()) && getGen(method) && (!superCall || getGenSuper(method))) {
-						String code = buildSend(method, false, false, superCall);
-						String code64 = buildSend(method, false, true, superCall);
-						if (set.get(code) == null) {
-							set.put(code, method);
-						}
-						if (set64.get(code64) == null) {
-							set64.put(code64, method);
-						}
-					}
-				}
-			}
-		}
-	}
-	outln();
-	TreeMap tagsSet = new TreeMap();
-	for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) {
-		String key = (String)iterator.next();
-		Node method = (Node)set.get(key);
-		String tagCode = buildSend(method, false, true, superCall);
-		if (set64.get(tagCode) != null) {
-			tagsSet.put(key, method);
-			iterator.remove();
-			set64.remove(tagCode);
-		}
-	}
-	TreeMap all = new TreeMap();
-	for (Iterator iterator = tagsSet.keySet().iterator(); iterator.hasNext();) {
-		String key = (String) iterator.next();
-		Node method = (Node)tagsSet.get(key);
-		all.put(buildSend(method, true, false, superCall), method);
-	}
-	for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) {
-		String key = (String) iterator.next();
-		all.put(key, set.get(key));
-	}
-	for (Iterator iterator = set64.keySet().iterator(); iterator.hasNext();) {
-		String key = (String) iterator.next();
-		all.put(key, set64.get(key));
-	}
-	for (Iterator iterator = all.keySet().iterator(); iterator.hasNext();) {
-		String key = (String)iterator.next();
-		Node method = (Node)all.get(key);
-		NodeList params = method.getChildNodes();
-		ArrayList tags = new ArrayList();
-		int count = 0;
-		for (int k = 0; k < params.getLength(); k++) {
-			Node param = params.item(k);
-			if ("arg".equals(param.getNodeName())) {
-				if (isStruct(param)) {
-					tags.add(" * @param arg" + count + " flags=struct");
-				}
-				count++;
-			}
-		}
-		out("/**");
-		if (tags.size() > 0) {
-			outln();
-			out(" *");
-		}
-		out(" @method flags=cast");
-		if (tags.size() > 0) outln();
-		for (Iterator iterator2 = tags.iterator(); iterator2.hasNext();) {
-			String tag = (String) iterator2.next();
-			out(tag);
-			outln();
-		}
-		out(" */");
-		outln();
-		out(key.toString());
-		outln();
-	}
-}
-
-String getSelConst(String sel) {
-	return "sel_" + sel.replaceAll(":", "_");
-}
-
-void generateClassesConst() {
-	TreeSet set = new TreeSet();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("class".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NamedNodeMap attributes = node.getAttributes();
-					String name = attributes.getNamedItem("name").getNodeValue();
-					set.add(name);
-				}
-			}
-		}
-	}
-	for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-		String cls = (String) iterator.next();
-		String clsConst = "class_" + cls;
-		out("public static final int /*long*/ ");
-		out(clsConst);
-		out(" = ");
-		out("objc_getClass(\"");
-		out(cls);
-		out("\");");
-		outln();
-	}
-}
-
-void generateProtocolsConst() {
-	TreeSet set = new TreeSet();
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("informal_protocol".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NamedNodeMap attributes = node.getAttributes();
-					String name = attributes.getNamedItem("name").getNodeValue();
-					set.add(name);
-				}
-			}
-		}
-	}
-	for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-		String cls = (String) iterator.next();
-		String clsConst = "protocol_" + cls;
-		out("public static final int /*long*/ ");
-		out(clsConst);
-		out(" = ");
-		out("objc_getProtocol(\"");
-		out(cls);
-		out("\");");
-		outln();
-	}
-}
-
-String getPackageName(String className) {
-	int dot = mainClassName.lastIndexOf('.');
-	if (dot == -1) return "";
-	return mainClassName.substring(0, dot);
-}
-
-String getClassName(String className) {
-	int dot = mainClassName.lastIndexOf('.');
-	if (dot == -1) return mainClassName;
-	return mainClassName.substring(dot + 1);
-}
-
-Node getReturnNode(NodeList list) {
-	for (int j = 0; j < list.getLength(); j++) {
-		Node node = list.item(j);
-		if ("retval".equals(node.getNodeName())) {
-			return node;
-		}
-	}
-	return null;
-}
-
-String getType(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node javaType = attributes.getNamedItem("swt_java_type");
-	if (javaType != null) return javaType.getNodeValue();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return getType(code, attributes, false);
-}
-
-String getType64(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node javaType = attributes.getNamedItem("swt_java_type");
-	if (javaType != null) {
-		Node javaType64 = attributes.getNamedItem("swt_java_type64");
-		return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue();
-	}
-	Node attrib = attributes.getNamedItem("type");
-	String code = attrib.getNodeValue();
-	Node attrib64 = attributes.getNamedItem("type64");
-	if (attrib64 != null) code = attrib64.getNodeValue();
-	return getType(code, attributes, true);
-}
-
-String getType(String code, NamedNodeMap attributes, boolean is64) {
-	if (code.equals("c")) return "byte";
-	if (code.equals("i")) return "int";
-	if (code.equals("s")) return "short";
-	if (code.equals("l")) return "int";
-	if (code.equals("q")) return "long";
-	if (code.equals("C")) return "byte";
-	if (code.equals("I")) return "int";
-	if (code.equals("S")) return "short";
-	if (code.equals("L")) return "int";
-	if (code.equals("Q")) return "long";
-	if (code.equals("f")) return "float";
-	if (code.equals("d")) return "double";
-	if (code.equals("B")) return "boolean";
-	if (code.equals("v")) return "void";
-	if (code.equals("*")) return is64 ? "long" : "int";
-	if (code.equals("@")) return is64 ? "long" : "int";
-	if (code.equals("#")) return is64 ? "long" : "int";
-	if (code.equals(":")) return is64 ? "long" : "int";
-	if (code.startsWith("^")) return is64 ? "long" : "int";
-	if (code.startsWith("{")) {		
-		return attributes.getNamedItem("declared_type").getNodeValue();
-	}
-	return "BAD " + code;
-}
-
-String getJNIType(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	if (code.equals("c")) return "B";
-	if (code.equals("i")) return "I";
-	if (code.equals("s")) return "S";
-	if (code.equals("l")) return "I";
-	if (code.equals("q")) return "J";
-	if (code.equals("C")) return "B";
-	if (code.equals("I")) return "I";
-	if (code.equals("S")) return "S";
-	if (code.equals("L")) return "I";
-	if (code.equals("Q")) return "J";
-	if (code.equals("f")) return "F";
-	if (code.equals("d")) return "D";
-	if (code.equals("B")) return "Z";
-	if (code.equals("v")) return "V";
-	if (code.equals("*")) return "I";
-	if (code.equals("@")) return "I";
-	if (code.equals("#")) return "I";
-	if (code.equals(":")) return "I";
-	if (code.startsWith("^")) return "I";
-	if (code.startsWith("[")) return "BAD " + code;
-	if (code.startsWith("{")) {		
-		return "BAD " + code;
-	}
-	if (code.startsWith("(")) return "BAD " + code;
-	return "BAD " + code;
-}
-
-String getJavaType(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node javaType = attributes.getNamedItem("swt_java_type");
-	if (javaType != null) return javaType.getNodeValue().trim();
-	String code = attributes.getNamedItem("type").getNodeValue();
-	return getJavaType(code, attributes, false);
-}
-
-String getJavaType64(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node javaType = attributes.getNamedItem("swt_java_type");
-	if (javaType != null) {
-		Node javaType64 = attributes.getNamedItem("swt_java_type64");
-		return javaType64 != null ? javaType64.getNodeValue() : javaType.getNodeValue();
-	}
-	Node attrib = attributes.getNamedItem("type");
-	String code = attrib.getNodeValue();
-	Node attrib64 = attributes.getNamedItem("type64");
-	if (attrib64 != null) code = attrib64.getNodeValue();
-	return getJavaType(code, attributes, true);
-}
-	
-String getJavaType(String code, NamedNodeMap attributes, boolean is64) {
-	if (code.equals("c")) return "byte";
-	if (code.equals("i")) return "int";
-	if (code.equals("s")) return "short";
-	if (code.equals("l")) return "int";
-	if (code.equals("q")) return "long";
-	if (code.equals("C")) return "byte";
-	if (code.equals("I")) return "int";
-	if (code.equals("S")) return "short";
-	if (code.equals("L")) return "int";
-	if (code.equals("Q")) return "long";
-	if (code.equals("f")) return "float";
-	if (code.equals("d")) return "double";
-	if (code.equals("B")) return "boolean";
-	if (code.equals("v")) return "void";
-	if (code.equals("*")) return is64 ? "long" : "int";
-	if (code.equals("#")) return is64 ? "long" : "int";
-	if (code.equals(":")) return is64 ? "long" : "int";
-	if (code.startsWith("^")) return is64 ? "long" : "int";
-	if (code.equals("@")) {
-		String type = attributes.getNamedItem("declared_type").getNodeValue();
-		int index = type.indexOf('*');
-		if (index != -1) type = type.substring(0, index);
-		index = type.indexOf('<');
-		if (index != -1) type = type.substring(0, index);
-		return type.trim();
-	}
-	if (code.startsWith("{")) {		
-		return attributes.getNamedItem("declared_type").getNodeValue().trim();
-	}
-	return "BAD " + code;
-}
-
-static String[] split(String str, String separator) {
-	StringTokenizer tk = new StringTokenizer(str, separator);
-	ArrayList result = new ArrayList();
-	while (tk.hasMoreElements()) {
-		result.add(tk.nextElement());
-	}
-	return (String[])result.toArray(new String[result.size()]);
-}
-
-void generateFunctions() {
-	for (int x = 0; x < xmls.length; x++) {
-		Document document = documents[x];
-		if (document == null) continue;
-		NodeList list = document.getDocumentElement().getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node node = list.item(i);
-			if ("function".equals(node.getNodeName())) {
-				if (getGen(node)) {
-					NamedNodeMap attributes = node.getAttributes();
-					String name = attributes.getNamedItem("name").getNodeValue();
-					NodeList params = node.getChildNodes();
-					int count = 0;
-					for (int j = 0; j < params.getLength(); j++) {
-						Node param = params.item(j);
-						if ("arg".equals(param.getNodeName())) {
-							count++;
-						}
-					}
-					if (count > 0) {
-						out("/**");
-						outln();
-					}
-					for (int j = 0; j < params.getLength(); j++) {
-						Node param = params.item(j);
-						if ("arg".equals(param.getNodeName())) {
-							NamedNodeMap paramAttributes = param.getAttributes();
-							out(" * @param ");
-							out(paramAttributes.getNamedItem("name").getNodeValue());
-							if (isStruct(param)) {
-								out(" flags=struct");
-							} else {
-								out(" cast=");
-								Node declaredType = paramAttributes.getNamedItem("declared_type");
-								String cast = declaredType.getNodeValue();
-								if (!cast.startsWith("(")) out("(");
-								out(cast);
-								if (!cast.endsWith(")")) out(")");
-							}
-							outln();
-						}
-					}
-					if (count > 0) {
-						out(" */");
-						outln();
-					}
-					out("public static final native ");
-					Node returnNode = getReturnNode(node.getChildNodes());
-					if (returnNode != null) {
-						String type = getType(returnNode), type64 = getType64(returnNode);
-						out(type);
-						if (!type.equals(type64)) {
-							out(" /*");
-							out(type64);
-							out("*/");
-						}
-						out(" ");
-					} else {
-						out("void ");
-					}
-					out(name);
-					out("(");
-					params = node.getChildNodes();
-					boolean first = true;
-					for (int j = 0; j < params.getLength(); j++) {
-						Node param = params.item(j);
-						if ("arg".equals(param.getNodeName())) {
-							NamedNodeMap paramAttributes = param.getAttributes();
-							if (!first) out(", ");
-							first = false;
-							String type = getType(param), type64 = getType64(param);
-							out(type);
-							if (!type.equals(type64)) {
-								out(" /*");
-								out(type64);
-								out("*/");
-							}
-							out(" ");
-							out(paramAttributes.getNamedItem("name").getNodeValue());
-						}
-					}
-					generateVariadics(node);
-					out(");");
-					outln();
-				}
-			}
-		}
-	}
-}
-
-void generateVariadics(Node node) {
-	NamedNodeMap attributes = node.getAttributes();
-	Node variadicCount = attributes.getNamedItem("swt_variadic_count");
-	if (variadicCount != null) {
-		Node variadicTypes = attributes.getNamedItem("swt_variadic_java_types");
-		String[] types = null;
-		if (variadicTypes != null) {
-			types = split(variadicTypes.getNodeValue(), ",");
-		}
-		int varCount = 0;
-		try {
-			varCount = Integer.parseInt(variadicCount.getNodeValue());
-		} catch (NumberFormatException e) {}
-		for (int j = 0; j < varCount; j++) {
-			out(", ");
-			if (types != null && types.length > j && !types[j].equals("*")) {
-				out(types[j]);
-			} else if (types != null && types[types.length - 1].equals("*")) {
-				out(types[types.length - 2]);
-			} else {
-				out("int /*long*/");
-			}
-			out(" varArg");
-			out("" + j);
-		}
-	}
-}
-
-public static void main(String[] args) {
-	try {
-		MacGenerator gen = new MacGenerator();
-		gen.setXmls(args);
-		gen.setOutputDir("../org.eclipse.swt/Eclipse SWT PI/cocoa/");
-		gen.setMainClass("org.eclipse.swt.internal.cocoa.OS");
-		gen.generate(null);
-	} catch (Throwable e) {
-		e.printStackTrace();
-	}
-}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java b/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
deleted file mode 100644
index 200986e..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java	
+++ /dev/null
@@ -1,622 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.ArrayList;
-import java.util.Collections;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class MacGeneratorUI {
-	MacGenerator gen;
-	boolean actions = true;
-
-	Tree nodesTree;
-	Table attribTable;
-
-	public MacGeneratorUI(MacGenerator gen) {
-		this.gen = gen;
-	}
-
-	TreeItem lastParent;
-	TreeItem addChild (Node node, TreeItem superItem) {
-		if (node.getNodeType() == Node.TEXT_NODE) return null;
-		String name = node.getNodeName();
-		TreeItem parentItem = null;
-		if (lastParent != null && !lastParent.isDisposed() && lastParent.getParentItem() == superItem && name.equals(lastParent.getData())) {
-			parentItem = lastParent;
-		} else {
-			TreeItem[] items = superItem.getItems();
-			for (int i = 0; i < items.length; i++) {
-				if (name.equals(items[i].getData())) {
-					parentItem = items[i];
-					break;
-				}
-			}
-			if (parentItem == null) {
-				parentItem = new TreeItem(superItem, SWT.NONE);
-				parentItem.setData(name);
-				parentItem.setText(getPrettyText(name));
-			}
-			lastParent = parentItem;
-		}
-		TreeItem item = new TreeItem(parentItem, SWT.NONE);
-		Node idAttrib = gen.getIDAttribute(node);
-		item.setText(idAttrib != null ? idAttrib.getNodeValue() : name);
-		item.setData(node);
-		checkItem(node, item);
-		NodeList childNodes = node.getChildNodes();
-		if (childNodes.getLength() > 0) new TreeItem(item, SWT.NONE);
-		return item;
-	}
-	
-	void checkPath(TreeItem item, boolean checked, boolean grayed) {
-	    if (item == null) return;
-	    if (grayed) {
-	        checked = true;
-	    } else {
-	        int index = 0;
-	        TreeItem[] items = item.getItems();
-	        while (index < items.length) {
-	            TreeItem child = items[index];
-	            if (child.getGrayed() || checked != child.getChecked()) {
-	                checked = grayed = true;
-	                break;
-	            }
-	            index++;
-	        }
-	    }
-	    item.setChecked(checked);
-	    item.setGrayed(grayed);
-	    updateGenAttribute(item);
-	    checkPath(item.getParentItem(), checked, grayed);
-	}
-	
-	void checkItem(Node node, TreeItem item) {
-		NamedNodeMap attributes = node.getAttributes();
-		Node gen = attributes.getNamedItem("swt_gen");
-		if (gen != null) {
-			String value = gen.getNodeValue();
-			boolean grayed = value.equals("mixed");
-			boolean checked = grayed || value.equals("true");
-			item.setChecked(checked);
-			item.setGrayed(grayed);
-		}
-	}
-	
-	boolean getEditable(TableItem item, int column) {
-		if (!(item.getData() instanceof Node)) return false;
-		String attribName = item.getText();
-		return attribName.startsWith("swt_");
-	}
-
-	String getPrettyText(String text) {
-		if (text.equals("class")) return "Classes";
-		if (text.equals("depends_on")) return "Depends_on";
-		return text.substring(0, 1).toUpperCase() + text.substring(1) + "s";
-	}
-
-	void checkChildren(TreeItem item) {
-		TreeItem dummy;
-		if (item.getItemCount() == 1 && (dummy = item.getItem(0)).getData() == null) {
-			dummy.dispose();
-			Node node = (Node)item.getData();
-			NodeList childNodes = node.getChildNodes();
-			for (int i = 0, length = childNodes.getLength(); i < length; i++) {
-				addChild(childNodes.item(i), item);
-			}
-			/* Figure out categories state */
-			TreeItem[] items = item.getItems();
-			for (int i = 0; i < items.length; i++) {
-				TreeItem[] children = items[i].getItems();
-				int checkedCount = 0;
-				for (int j = 0; j < children.length; j++) {
-					if (children[j].getChecked()) checkedCount++;
-					if (children[j].getGrayed()) break;
-				}
-				items[i].setChecked(checkedCount != 0);
-				items[i].setGrayed(checkedCount != children.length);
-			}
-		}
-	}
-	
-	void checkItems(TreeItem item, boolean checked) {
-	    item.setGrayed(false);
-	    item.setChecked(checked);
-	    updateGenAttribute(item);
-	    TreeItem[] items = item.getItems();
-	    if (items.length == 1 && items[0].getData() == null) {
-	    	/* Update model only if view is not created */
-			Node node = (Node)item.getData();
-			NodeList childNodes = node.getChildNodes();
-			for (int i = 0, length = childNodes.getLength(); i < length; i++) {
-				checkNodes(childNodes.item(i), checked);
-			}
-	    } else {
-		    for (int i = 0; i < items.length; i++) {
-		        checkItems(items[i], checked);
-		    }
-	    }
-	}
-	
-	void checkNodes(Node node, boolean checked) {
-		if (node instanceof Element) {
-			if (checked) {
-				((Element)node).setAttribute("swt_gen", "true");
-			} else {
-				((Element)node).removeAttribute("swt_gen");
-			}
-		}
-		NodeList childNodes = node.getChildNodes();
-		for (int i = 0, length = childNodes.getLength(); i < length; i++) {
-			checkNodes(childNodes.item(i), checked);
-		}
-	}
-	
-	void cleanup() {
-	}
-
-	Composite createSignaturesPanel(Composite parent) {
-		Composite comp = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout(2, false);
-		layout.marginLeft = 5;
-		layout.marginWidth = 0;
-		comp.setLayout(layout);
-		
-		Label label = new Label(comp, SWT.NONE);
-		label.setText("Signatures:");
-		
-		final Text search = new Text(comp, SWT.BORDER | SWT.SINGLE | SWT.SEARCH);
-		GridData data = new GridData(GridData.FILL_HORIZONTAL);
-		search.setLayoutData(data);
-		search.setText(".*");
-		search.addListener(SWT.DefaultSelection, new Listener() {
-			public void handleEvent(Event arg0) {
-				searchFor(search.getText());
-			}
-		});
-		search.addListener(SWT.KeyDown, new Listener() {
-			public void handleEvent(Event event) {
-				if (event.keyCode == SWT.F6) {
-					searchFor(search.getText());					
-				}
-			}
-		});
-		
-		nodesTree = new Tree(comp, SWT.SINGLE | SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION);
-		data = new GridData(GridData.FILL_BOTH);
-		data.horizontalSpan = 2;
-		nodesTree.setLayoutData(data);
-		
-		nodesTree.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				TreeItem item = (TreeItem)event.item;
-				if (item == null) return;
-				if (event.detail != SWT.CHECK) {
-					selectChild(item);
-					return;
-				}
-				boolean checked = item.getChecked();
-				item.getParent().setRedraw(false);
-                checkItems(item, checked);
-                checkPath(item.getParentItem(), checked, false);
-                item.getParent().setRedraw(true);
-			}
-		});
-		nodesTree.addListener(SWT.Expand, new Listener() {
-			public void handleEvent(Event event) {
-				checkChildren((TreeItem)event.item);				
-			}
-		});
-		
-		return comp;
-	}
-	
-	Composite createPropertiesPanel(Composite parent) {
-		Composite comp = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout(1, false);
-		layout.marginWidth = 0;
-		if (!actions) layout.marginRight = 5;
-		comp.setLayout(layout);
-		
-		Label label = new Label(comp, SWT.NONE);
-		label.setText("Properties:");
-		
-		attribTable = new Table(comp, SWT.BORDER | SWT.FULL_SELECTION);
-		GridData data = new GridData(GridData.FILL_BOTH);
-		attribTable.setLayoutData(data);
-		attribTable.setLinesVisible(true);
-		attribTable.setHeaderVisible(true);
-		TableColumn nameColumn = new TableColumn(attribTable, SWT.NONE);
-		nameColumn.setText("Name");
-		nameColumn.pack();
-		TableColumn valueColumn = new TableColumn(attribTable, SWT.NONE);
-		valueColumn.setText("Value");
-		valueColumn.pack();
-		
-		final Text editorTx = new Text(attribTable, SWT.SINGLE);
-		final TableEditor editor = new TableEditor(attribTable);
-		editor.grabHorizontal = true;
-		editor.setEditor(editorTx);
-		Listener textListener = new Listener() {
-			public void handleEvent(Event e) {
-				if (e.type == SWT.KeyDown) {
-					if (e.keyCode != SWT.F6) return;
-				}
-				if (e.type == SWT.Traverse) {
-					switch (e.detail) {
-						case SWT.TRAVERSE_ESCAPE:
-							editor.setItem(null);
-							break;
-						default:
-							return;
-					}
-				}
-				editorTx.setVisible(false);
-				TableItem item = editor.getItem();
-				if (item == null) return;
-				int column = editor.getColumn();
-				String value = editorTx.getText();
-				item.setText(column, value);
-				Element node = (Element)item.getData();
-				String name = item.getText();
-				if (value.length() != 0) {
-					node.setAttribute(name, value);
-				} else {
-					node.removeAttribute(name);
-				}
-			}
-		};
-		editorTx.addListener(SWT.DefaultSelection, textListener);
-//		editorTx.addListener(SWT.FocusOut, textListener);
-		editorTx.addListener(SWT.KeyDown, textListener);
-		editorTx.addListener(SWT.Traverse, textListener);
-		attribTable.addListener(SWT.MouseDown, new Listener() {
-			public void handleEvent(final Event e) {
-				e.display.asyncExec (new Runnable () {
-					public void run () {
-						if (attribTable.isDisposed ()) return;
-						if (e.button != 1) return;
-						Point pt = new Point(e.x, e.y);
-						TableItem item = attribTable.getItem(pt);
-						if (item == null) return;
-						int column = -1;
-						for (int i = 0; i < attribTable.getColumnCount(); i++) {
-							if (item.getBounds(i).contains(pt)) {
-								column = i;
-								break;
-							}				
-						}
-						if (column == -1) return;
-						if (!getEditable(item, column)) return;
-						editor.setColumn(column);
-						editor.setItem(item);
-						editorTx.setText(item.getText(column));
-						editorTx.selectAll();
-						editorTx.setVisible(true);
-						editorTx.setFocus();
-					}
-				});
-			}
-		});
-		
-		return comp;
-	}
-	
-	Composite createActionsPanel(Composite parent) {
-		Composite panel = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout(1, true);
-		layout.marginWidth = 10;
-		panel.setLayout(layout);
-		
-		Button generate = new Button(panel, SWT.PUSH);
-		generate.setText("Generate");
-		generate.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				generate(null);
-			}
-		});
-		return panel;
-	}
-	
-	public void generate(ProgressMonitor progress) {
-		gen.generate(progress);
-	}
-	
-	public boolean getActionsVisible() {
-		return actions;
-	}
-	
-	public void open(Composite parent) {
-		FormLayout layout = new FormLayout();
-		parent.setLayout(layout);
-		
-		Composite signaturePanel = createSignaturesPanel(parent);
-		final Sash sash = new Sash(parent, SWT.SMOOTH | SWT.VERTICAL);
-		Composite propertiesPanel = createPropertiesPanel(parent);
-		
-		Composite actionsPanel = null;
-		if (actions) {
-			actionsPanel = createActionsPanel(parent);
-		}
-
-		FormData data;
-		
-		data = new FormData();		
-		data.left = new FormAttachment(0, 0);
-		data.top = new FormAttachment(0, 0);
-		data.right = new FormAttachment(sash, 0);
-		data.bottom = new FormAttachment(100, 0);
-		signaturePanel.setLayoutData(data);
-		
-		data = new FormData();
-		data.left = new FormAttachment(null, Math.max(200, parent.getSize().x / 2));
-		data.top = new FormAttachment(0, 0);
-		data.bottom = new FormAttachment(100, 0);
-		sash.setLayoutData(data);
-		
-		data = new FormData();
-		data.left = new FormAttachment(sash, sash.computeSize(SWT.DEFAULT, SWT.DEFAULT).x);
-		data.top = new FormAttachment(0, 0);
-		data.right = actionsPanel != null ? new FormAttachment(actionsPanel, 0) : new FormAttachment(100, 0);
-		data.bottom = new FormAttachment(100, 0);
-		propertiesPanel.setLayoutData(data);
-
-		if (actionsPanel != null) {
-			data = new FormData();
-			data.top = new FormAttachment(0, 0);
-			data.right = new FormAttachment(100, 0);
-			data.bottom = new FormAttachment(100, 0);
-			actionsPanel.setLayoutData(data);
-		}
-		
-		sash.addListener(SWT.Selection, new Listener() {
-			public void handleEvent(Event event) {
-				Composite parent = sash.getParent();
-				Rectangle rect = parent.getClientArea();
-				event.x = Math.min (Math.max (event.x, 60), rect.width - 60);
-				if (event.detail != SWT.DRAG) {
-					FormData data = (FormData)sash.getLayoutData();
-					data.left.offset = event.x;
-					parent.layout(true);
-				}
-			}
-		});
-
-		updateNodes();
-	}
-
-	public void dispose() {
-		cleanup();
-	}
-	
-	ArrayList flatNodes;
-	void searchFor(String name) {
-		TreeItem[] selection = nodesTree.getSelection();
-		Node node = null;
-		if (selection.length != 0) {
-			if (selection[0].getData() instanceof Node) {
-				node = (Node)selection[0].getData();
-			} else {
-				if (selection[0].getItemCount() > 0 && selection[0].getItem(0).getData() instanceof Node) {
-					node = (Node)selection[0].getItem(0).getData();
-				}
-			}
-		}
-		Document[] documents = gen.getDocuments();
-		if (node == null && documents.length > 0) node = gen.getDocuments()[0];
-		if (flatNodes == null) {
-			flatNodes = new ArrayList();
-			for (int i = 0; i < documents.length; i++) {
-				addNodes(documents[i], flatNodes);
-			}
-		}
-		int index = 0;
-		while (flatNodes.get(index++) != node);		
-		int start = index;
-		while (index < flatNodes.size()) {
-			Node child = (Node)flatNodes.get(index);
-			Node attribName = gen.getIDAttribute(child);
-			if (attribName != null && attribName.getNodeValue().matches(name)) {
-				selectNode(child);
-				return;
-			}
-			index++;
-		}
-		index = 0;
-		while (index < start) {
-			Node child = (Node)flatNodes.get(index);
-			Node attribName = gen.getIDAttribute(child);
-			if (attribName != null && attribName.getNodeValue().matches(name)) {
-				selectNode(child);
-				return;
-			}
-			index++;
-		}
-		nodesTree.getDisplay().beep();
-	}
-	
-	void selectNode(Node node) {
-		ArrayList path = new ArrayList();
-		do {
-			path.add(node);
-			node = node.getParentNode();
-		} while (node != null);
-		TreeItem[] items = nodesTree.getItems();
-		Collections.reverse(path);
-		path.remove(0);
-		while (true) {
-			TreeItem item = findItem(items, (Node)path.remove(0));
-			if (item == null) return;
-			if (path.isEmpty()) {
-				nodesTree.setSelection(item);
-				selectChild(item);
-				return;
-			}
-			items = item.getItems();
-		}
-	}
-	
-	TreeItem findItem(TreeItem[] items, Node node) {
-		for (int i = 0; i < items.length; i++) {
-			TreeItem item = items[i];
-			checkChildren(item);
-			if (item.getData() == node) return item;
-		}
-		for (int i = 0; i < items.length; i++) {
-			TreeItem child = findItem(items[i].getItems(), node);
-			if (child != null) return child;
-		}
-		return null;
-	}
-	
-	void addNodes(Node node, ArrayList list) {
-		if (node.getNodeType() == Node.TEXT_NODE) return;
-		list.add(node);
-		NodeList children = node.getChildNodes();
-		for (int i = 0, length = children.getLength(); i < length; i++) {
-			Node child = children.item(i);
-			addNodes(child, list);
-		}	
-	}
-	
-	void selectChild(TreeItem item) {
-		attribTable.removeAll();
-		if (!(item.getData() instanceof Node)) return;
-		Node node = (Node)item.getData();
-		NamedNodeMap attributes = node.getAttributes();
-		String[] extraAttribs = gen.getExtraAttributeNames(node);
-		for (int i = 0; i < extraAttribs.length; i++) {
-			TableItem attribItem = new TableItem(attribTable, SWT.NONE);
-			attribItem.setText(extraAttribs[i]);
-			attribItem.setData(node);
-			attribItem.setForeground(item.getDisplay().getSystemColor(SWT.COLOR_BLUE));
-			Node attrib = attributes.getNamedItem(extraAttribs[i]);
-			if (attrib != null) {
-				attribItem.setText(1, attrib.getNodeValue());
-			}
-			
-		}
-		checkItem(node, item);
-		for (int i = 0, length = attributes.getLength(); i < length; i++) {
-			Node attrib = attributes.item(i);
-			String attribName = attrib.getNodeName();
-			if (attribName.startsWith("swt_")) continue;
-			TableItem attribItem = new TableItem(attribTable, SWT.NONE);
-			attribItem.setText(attribName);
-			attribItem.setText(1, attrib.getNodeValue());
-		}
-		attribTable.getColumn(0).pack();
-		attribTable.getColumn(1).setWidth(500);
-	}
-	
-	void updateGenAttribute (TreeItem item) {
-		if (item.getData() instanceof Element) {
-			Element node = (Element)item.getData();
-			if (item.getChecked()) {
-				if (item.getGrayed()) {
-					node.setAttribute("swt_gen", "mixed");
-				} else {
-					node.setAttribute("swt_gen", "true");
-				}
-			} else {
-				node.removeAttribute("swt_gen");
-			}
-		}
-	}
-	
-	void updateNodes() {
-		String[] xmls = gen.getXmls();
-		if (xmls == null) return;
-		Document[] documents = gen.getDocuments();
-		for (int x = 0; x < xmls.length; x++) {
-			String xmlPath = xmls[x];
-			Document document = documents[x];
-			if (document == null) {
-				System.out.println("Could not find: " + xmlPath);
-				continue;
-			}
-			TreeItem item = new TreeItem(nodesTree, SWT.NONE);
-			String fileName = gen.getFileName(xmlPath);
-			if (fileName.endsWith("Full.bridgesupport")) {
-				fileName =  fileName.substring(0, fileName.length() - "Full.bridgesupport".length());
-			}
-			item.setText(fileName);
-			Node node = document.getDocumentElement();
-			item.setData(node);
-			checkItem(node, item);
-			new TreeItem(item, SWT.NONE);
-		}
-		TreeColumn[] columns = nodesTree.getColumns();
-		for (int i = 0; i < columns.length; i++) {
-			columns[i].pack();
-		}
-	}
-	
-	public void refresh () {
-		if (nodesTree == null) return;
-		gen.setXmls(null);
-		flatNodes = null;
-		nodesTree.getDisplay().asyncExec(new Runnable() {
-			 public void run() {
-				 if (nodesTree == null || nodesTree.isDisposed()) return;
-				 nodesTree.removeAll();
-				 attribTable.removeAll();
-				 updateNodes();
-			}
-		});
-	}
-	
-	public void setActionsVisible(boolean visible) {
-		this.actions = visible;
-	}
-	
-	public void setFocus() {
-		nodesTree.setFocus();
-	}
-
-	public static void main(String[] args) {
-//		args = new String[]{
-//			"./Mac Generation/org/eclipse/swt/tools/internal/AppKitFull.bridgesupport",
-//			"./Mac Generation/org/eclipse/swt/tools/internal/FoundationFull.bridgesupport",
-//			"./Mac Generation/org/eclipse/swt/tools/internal/WebKitFull.bridgesupport",
-//		};
-		try {
-			Display display = new Display();
-			Shell shell = new Shell(display);
-			MacGenerator gen = new MacGenerator();
-			gen.setXmls(args);
-			gen.setOutputDir("../org.eclipse.swt/Eclipse SWT PI/cocoa/");
-			gen.setMainClass("org.eclipse.swt.internal.cocoa.OS");
-			MacGeneratorUI ui = new MacGeneratorUI(gen);
-			ui.open(shell);
-			shell.open();
-			while (!shell.isDisposed()) {
-				if (!display.readAndDispatch())
-					display.sleep();
-			}
-			ui.dispose();
-			display.dispose();
-		} catch (Throwable e) {
-			e.printStackTrace();
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Mozilla Generation/org/eclipse/swt/tools/internal/MozillaGenerator.java b/eclipse/plugins/org.eclipse.swt.tools/Mozilla Generation/org/eclipse/swt/tools/internal/MozillaGenerator.java
deleted file mode 100644
index 9a03084..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Mozilla Generation/org/eclipse/swt/tools/internal/MozillaGenerator.java	
+++ /dev/null
@@ -1,692 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-import java.io.*;
-import java.util.*;
-
-/* Produces the java classes mapping to XPCOM Mozilla objects */
-public class MozillaGenerator {
-	FileReader r = null;
-	FileWriter w = null;
-	int maxLines = 1000;
-	int cntLines = 0;
-	int n = 0;
-	String[] b = null;
-	String body = null;
-	int nMethods = 0;
-	String uuidName;
-	String uuidValue;
-	String className;
-	String parentName;
-	String[] constantNames;
-	String[] constantValues;
-	String[] methodNames;
-	String[][] argTypes;
-	String[][] argNames;
-	String bodyOrder;
-	Hashtable vtbls;
-
-	static boolean DEBUG = false;
-
-	// Contains the characters found before a method name
-	// Useful to extract the method name. e.g.
-	//  NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0;
-	//  NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
-	// method name follows: QueryInterface, AddRef etc.
-	static String[] BEFORE_METHOD_NAME = {
-		"  NS_IMETHOD ",
-		"  NS_IMETHOD_(nsrefcnt) ",
-		"  NS_IMETHOD_(void *) ",
-		"  NS_IMETHOD_(void) ",
-		"  NS_IMETHOD_(nsresult) ",
-		"  NS_SCRIPTABLE NS_IMETHOD ",
-		"  NS_SCRIPTABLE NS_IMETHOD_(nsrefcnt) ",
-		"  NS_SCRIPTABLE NS_IMETHOD_(void *) ",
-		"  NS_SCRIPTABLE NS_IMETHOD_(void) ",
-		"  NS_SCRIPTABLE NS_IMETHOD_(nsresult) ",
-	};
-	static String NO_SUPER_CLASS = "SWT_NO_SUPER_CLASS";
-	
-	static String[][] TYPES_C2JAVA = { 
-		{ "PRBool *", "int[]" },
-		{ "nsIID &", "nsID" },
-		{ "nsCID &", "nsID" },
-		{ "nsCID * *", "int /*long*/" }, // nsID[] not supported by jnigen
-		{ "* *", "int /*long*/[]" },
-		{ "**", "int /*long*/[]" },
-		{ "* &", "int /*long*/[]" },
-		{ "PRUint32 *", "int[]" }, 
-		{ "PRInt32 *", "int[]" },
-		{ "PRInt64 *", "long[]" },
-		{ "PRUnichar *", "char[]" },
-		{ "char *", "byte[]" },
-		{ "float *", "float[]" },
-		{ "PRUint16 *", "short[]" },
-		{ "nativeWindow *", "int /*long*/[]" },
-		{ "nsWriteSegmentFun", "int /*long*/" },
-		{ "nativeWindow", "int /*long*/" },
-
-		{ "*", "int /*long*/" }, // c type containing one or more * (and any other character, and did not match previous patterns) is a simple pointer
-		{ "&", "int /*long*/" }, 
-
-		{ "PRUint32", "int" },
-		{ "PRInt32", "int" }, 
-		{ "PRInt64", "long" }, 
-		{ "nsresult", "int" },
-		{ "PRBool", "int" },
-		{ "float", "float" },
-		{ "PRUint16", "short" },
-		{ "size_t", "int" },
-		};
-
-	static String GECKO = "/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/include/";
-	static String TARGET_FOLDER = "/bluebird/teamswt/chrisx/amd64/workspace/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/";
-	static String[] XPCOM_HEADERS = {
-		"profile/nsIProfile.h",
-		"widget/nsIAppShell.h",
-		"widget/nsIBaseWindow.h",
-		"xpcom/nsIComponentManager.h",
-		"xpcom/nsIComponentRegistrar.h",
-		"webbrwsr/nsIContextMenuListener.h", 
-		"docshell/nsIDocShell.h",
-		"dom/nsIDOMEvent.h",
-		"dom/nsIDOMMouseEvent.h",
-		"dom/nsIDOMUIEvent.h",
-		"dom/nsIDOMWindow.h",
-		"uriloader/nsIDownload.h", 
-		"webbrwsr/nsIEmbeddingSiteWindow.h",
-		"xpcom/nsIFactory.h", 
-		"xpcom/nsIFile.h",
-		"helperAppDlg/nsIHelperAppLauncherDialog.h",
-		"exthandler/nsIExternalHelperAppService.h", // contains nsIHelperAppLauncher
-		"xpcom/nsIInputStream.h", 
-		"xpcom/nsIInterfaceRequestor.h",
-		"necko/nsIIOService.h", 
-		"xpcom/nsILocalFile.h", 
-		"xpcom/nsIMemory.h",
-		"progressDlg/nsIProgressDialog.h",
-		"windowwatcher/nsIPromptService.h", 
-		"xpcom/nsIServiceManager.h",
-		"xpcom/nsISupports.h", 
-		"webbrwsr/nsITooltipListener.h", 
-		"necko/nsIURI.h",
-		"uriloader/nsIURIContentListener.h", 
-		"xpcom/nsIWeakReference.h",
-		"webbrwsr/nsIWebBrowser.h", 
-		"webbrwsr/nsIWebBrowserChrome.h",
-		"webbrwsr/nsIWebBrowserChromeFocus.h",
-		"webbrwsr/nsIWebBrowserFocus.h", 
-		"docshell/nsIWebNavigation.h",
-		"uriloader/nsIWebProgress.h", 
-		"uriloader/nsIWebProgressListener.h",
-		"embed_base/nsIWindowCreator.h", 
-		"windowwatcher/nsIWindowWatcher.h" };
-
-	public static void main(String[] args) {
-		MozillaGenerator x = new MozillaGenerator();
-		for (int i = 0; i < XPCOM_HEADERS.length; i++)
-			x.parse(GECKO + XPCOM_HEADERS[i], TARGET_FOLDER);
-		x.outputVtblCall();
-		System.out.println("done");
-	}
-
-	public MozillaGenerator() {
-		vtbls = new Hashtable();
-	}
-
-	/** Write callbacks */
-	public void write(String data) {
-		if (DEBUG) {
-			System.out.print(data);
-			return;
-		}
-		try {
-			w.write(data);
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-	}
-
-	public void writeLine() {
-		if (DEBUG) {
-			System.out.println();
-			return;
-		}
-		write("\r\n");
-	}
-
-	public void writeLine(String data) {
-		if (DEBUG) {
-			System.out.println(data);
-			return;
-		}
-		write(data + "\r\n");
-	}
-
-	public void writeCopyrights() {
-		writeLine(COPYRIGHTS);
-	}
-
-	public void writePackageDeclaration() {
-		writeLine(PACKAGE_DECLARATION);
-	}
-
-	public void writeClassDeclaration(String className, String parentName) {
-		String line = "public class " + className;
-		if (!parentName.equals(NO_SUPER_CLASS)) line += " extends " + parentName;
-		line += " {";
-		writeLine(line);
-	}
-
-	public void writeLastMethodId(String parentName, int nMethods) {
-		String line = "\tstatic final int LAST_METHOD_ID = ";
-		if (!parentName.equals(NO_SUPER_CLASS)) line += parentName + ".LAST_METHOD_ID + " + nMethods + ";";
-		else line += "" + (nMethods - 1)+ ";"; // zero indexed
-		writeLine(line);
-	}
-
-	public void writeIID(String uuidName, String uuidValue) {
-		writeLine("\tpublic static final String " + uuidName + " =");
-		writeLine("\t\t\"" + uuidValue + "\";");
-		writeLine();
-		String iid = uuidName.substring(0, uuidName.indexOf("_STR"));
-		writeLine("\tpublic static final nsID " + iid + " =");
-		writeLine("\t\tnew nsID(" + uuidName + ");");
-	}
-
-	public void writeAddressField() {
-		writeLine("\tint /*long*/ address;");
-	}
-	public void writeConstructor(String className, String parentName) {
-		writeLine("\tpublic " + className + "(int /*long*/ address) {");
-		if (!parentName.equals(NO_SUPER_CLASS)) {
-			writeLine("\t\tsuper(address);");
-		} else {
-			writeLine("\t\tthis.address = address;");
-		}
-		writeLine("\t}");
-	}
-
-	public void writeAddressGetter() {
-		writeLine("\tpublic int /*long*/ getAddress() {");
-		writeLine("\t\treturn this.address;");
-		writeLine("\t}");
-	}
-	
-	public void writeConstant(String name, String value) {
-		writeLine("\tpublic static final int " + name + " = " + value + ";");
-	}
-
-	public void writeMethod(String name, String parentName, int methodIndex, String[] argTypes, String[] argNames) {
-		write("\tpublic int " + name + "(");
-		for (int i = 0; i < argTypes.length; i++) {
-			write(argTypes[i] + " " + argNames[i]);
-			if (i < argTypes.length - 1)
-				write(", ");
-		}
-		write(") {");
-		writeLine();
-		String line = "\t\treturn XPCOM.VtblCall(";
-		if (!parentName.equals(NO_SUPER_CLASS)) line += parentName + ".LAST_METHOD_ID + " + (methodIndex + 1) + ", getAddress()";
-		else line += methodIndex + ", getAddress()"; // zero indexed
-		write(line);
-		if (argTypes.length > 0)
-			write(", ");
-		for (int i = 0; i < argTypes.length; i++) {
-			write(argNames[i]);
-			if (i < argTypes.length - 1)
-				write(", ");
-		}
-		writeLine(");");
-		writeLine("\t}");
-	}
-
-	public void writeClassEnd() {
-		write("}");
-	}
-
-	public void logVtblCall(String[] argTypes) {
-		String vtbl = "static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl";
-		if (argTypes.length > 0)
-			vtbl += ", ";
-		for (int i = 0; i < argTypes.length; i++) {
-			vtbl += argTypes[i] + " arg" + i;
-			if (i < argTypes.length - 1)
-				vtbl += ", ";
-		}
-		vtbl += ");";
-		Integer key = new Integer(argTypes.length);
-		Vector list = (Vector) vtbls.get(key);
-		if (list == null) {
-			list = new Vector();
-			vtbls.put(key, list);
-		}
-		boolean duplicate = false;
-		Enumeration e = list.elements();
-		while (e.hasMoreElements()) {
-			String s = (String) e.nextElement();
-			if (vtbl.equals(s)) {
-				duplicate = true;
-				break;
-			}
-		}
-		if (!duplicate)
-			list.add(vtbl);
-	}
-
-	public void outputVtblCall() {
-		Enumeration e = vtbls.keys();
-		int n = 0;
-		while (e.hasMoreElements()) {
-			e.nextElement();
-			n++;
-		}
-		Integer[] keys = new Integer[n];
-		e = vtbls.keys();
-		n = 0;
-		while (e.hasMoreElements()) {
-			keys[n] = (Integer) e.nextElement();
-			n++;
-		}
-		Arrays.sort(keys);
-		for (int i = 0; i < keys.length; i++) {
-			Vector list = (Vector) vtbls.get(keys[i]);
-			Object[] elts = (Object[]) list.toArray();
-			Arrays.sort(elts);
-			for (int j = 0; j < elts.length; j++) {
-				System.out.println(elts[j]);
-			}
-		}
-
-	}
-
-	/** Parsing invoking write callbacks */
-
-	/*
-	 * Convert a C header file into a Java source file matching SWT Mozilla
-	 binding.
-	 */
-	public void parse(String src, String destPath) {
-		if (DEBUG) writeLine("*** PARSING <"+src+"> to folder "+destPath);
-		b = new String[maxLines];
-		cntLines = 0;
-		try {
-			r = new FileReader(src);
-			BufferedReader br = new BufferedReader(r);
-			while ((b[cntLines] = br.readLine()) != null) {
-				cntLines++;
-			}
-			br.close();
-		} catch (IOException e) {
-			e.printStackTrace();
-			return;
-		}
-		n = 0;
-		boolean lookForClasses = true;
-		while (lookForClasses) {	
-			/* parsing */
-			lookForClasses = parse();
-	
-			String destFile = destPath + className + ".java";
-			try {
-				w = new FileWriter(destFile);
-				if (DEBUG) writeLine("** CREATED JAVA FILE <"+destFile+">");
-			} catch (IOException e) {
-				e.printStackTrace();
-				return;
-			}
-	
-			/* writing */
-			writeCopyrights();
-			writePackageDeclaration();
-			writeLine();
-			writeClassDeclaration(className, parentName);
-			writeLine();
-			writeLastMethodId(parentName, nMethods);
-			writeLine();
-			writeIID(uuidName, uuidValue);
-			writeLine();
-			if (parentName.equals(NO_SUPER_CLASS)) {
-				writeAddressField();
-				writeLine();
-			}
-			writeConstructor(className, parentName);
-			writeLine();
-			
-			if (parentName.equals(NO_SUPER_CLASS)) {
-				writeAddressGetter();
-				writeLine();
-			}
-	
-			int constantIndex = 0, methodIndex = 0;
-			for (int i = 0; i < bodyOrder.length(); i++) {
-				if (bodyOrder.charAt(i) == 'C') {
-					writeConstant(constantNames[constantIndex],
-							constantValues[constantIndex]);
-					if (i < bodyOrder.length() - 1) writeLine();
-					constantIndex++;
-				} else if (bodyOrder.charAt(i) == 'M') {
-					writeMethod(methodNames[methodIndex], parentName, methodIndex,
-							argTypes[methodIndex], argNames[methodIndex]);
-					if (i < bodyOrder.length() - 1) writeLine();
-					methodIndex++;
-				}
-			}
-	
-			writeClassEnd();
-	
-			try {
-				w.close();
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	public String getPackages() {
-		return "package org.eclipse.swt.internal.mozilla;";
-	}
-
-	public boolean parse() {
-		if (!jumpToUuidDeclaration()) return false;
-		uuidName = getUuidName(b[n]);
-		if (DEBUG)
-			System.out.println("UUID name: <" + uuidName + ">");
-		uuidValue = getUuidValue(b[n]);
-		if (DEBUG)
-			System.out.println("UUID value: <" + uuidValue + ">");
-		jumpToInterfaceDeclaration();
-		className = getClassName(b[n]);
-		if (DEBUG)
-			System.out.println("Interface name: <" + className + ">");
-		parentName = getParentName(b[n]);
-		if (DEBUG)
-			System.out.println("parentName: <" + parentName + ">");
-		parseBody();
-		return true;
-	}
-
-	boolean jumpToUuidDeclaration() {
-		// jump to line matching: "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c""
-		while (!(b[n].startsWith("#define ") && b[n].indexOf("_IID_STR \"") != -1)) {
-			n++;
-			if (n >= cntLines) return false;
-		}
-		return true;
-	}
-
-	//assume a declaration matching: "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c""
-	//returns NS_IWEBBROWSERCHROME_IID_STR
-	String getUuidName(String declaration) {
-		return declaration.substring(declaration.indexOf("#define ")
-				+ "#define ".length(), declaration.indexOf(" \""));
-	}
-
-	//assume a declaration matching: "#define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c""
-	//returns ba434c60-9d52-11d3-afb0-00a024ffc08c
-	String getUuidValue(String declaration) {
-		return declaration.substring(declaration.indexOf("_IID_STR \"")
-				+ "_IID_STR \"".length(), declaration.lastIndexOf('"'));
-	}
-
-	void jumpToInterfaceDeclaration() {
-		// jump to line matching: "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {"
-		while (!(b[n].startsWith("class NS_NO_VTABLE "))) {
-			n++;
-		}
-	}
-
-	// Assume a declaration matching: "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {"
-	// or "class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserChrome : public nsISupports {" returns nsIWebBrowserChrome.
-	// Special case for nsISupports that has no super class: class NS_NO_VTABLE nsISupports {
-	String getClassName(String declaration) {
-		int endIndex = declaration.indexOf(" :");
-		// nsISupports special case (no super class)
-		if (endIndex == -1) endIndex = declaration.indexOf(" {");
-		String searchString = "class NS_NO_VTABLE NS_SCRIPTABLE";
-		int startIndex = declaration.indexOf(searchString);
-		if (startIndex == -1) {
-			searchString = "class NS_NO_VTABLE ";
-			startIndex = declaration.indexOf(searchString);
-		}
-		return declaration.substring(startIndex + searchString.length(), endIndex);
-	}
-
-	// assume a declaration matching: "class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {"
-	// returns nsISupports
-	// special case for nsISupports that has no super class: class NS_NO_VTABLE nsISupports {
-	String getParentName(String declaration) {
-		if (declaration.indexOf(" :") == -1) return NO_SUPER_CLASS;
-		return declaration.substring(declaration.indexOf(": public ")
-				+ ": public ".length(), declaration.indexOf(" {"));
-	}
-
-	// parse methods and constants declarations starting at the current index
-	// out:
-	// .String body - contains the corresponding java content
-	// .n - set to the end of the interface body declaration ( line with the enclosing "};" )
-	// .nMethods    - set to the number of methods parsed
-	void parseBody() {
-		body = "";
-		bodyOrder = "";
-		int nConstants = 0;
-		nMethods = 0;
-
-		int tmp_n = n;
-		while (true) {
-			int type = jumpToNextConstantOrMethod();
-			if (type == CONSTANT)
-				nConstants++;
-			if (type == METHOD)
-				nMethods++;
-			if (type == END_BODY)
-				break;
-			n++;
-		}
-		n = tmp_n;
-		constantNames = new String[nConstants];
-		constantValues = new String[nConstants];
-		methodNames = new String[nMethods];
-		argTypes = new String[nMethods][];
-		argNames = new String[nMethods][];
-		int constantIndex = 0, methodIndex = 0;
-		while (true) {
-			int type = jumpToNextConstantOrMethod();
-			if (type == CONSTANT) {
-				parseConstant(b[n], constantIndex);
-				bodyOrder += "C";
-				constantIndex++;
-			}
-			if (type == METHOD) {
-				parseMethod(b[n], methodIndex);
-				logVtblCall(argTypes[methodIndex]);
-				bodyOrder += "M";
-				methodIndex++;
-			}
-			if (type == END_BODY)
-				return;
-			n++;
-		}
-	}
-
-	static int CONSTANT = 0;
-
-	static int METHOD = 1;
-
-	static int END_BODY = 2;
-
-	boolean isEndOfInterfaceBody() {
-		return b[n].startsWith("};");
-	}
-
-	int jumpToNextConstantOrMethod() {
-		while (!isEndOfInterfaceBody()) {
-			if (b[n].startsWith("  enum { ")) {
-				return CONSTANT;
-			}
-			if (methodNameStartIndexOf(b[n]) != -1) {
-				return METHOD;
-			}
-			n++;
-		}
-		return END_BODY;
-	}
-
-	void parseConstant(String constant, int constantIndex) {
-		String constantName = constant.substring(constant.indexOf(" enum { ")
-				+ " enum { ".length(), constant.indexOf(" ="));
-		if (DEBUG)
-			writeLine("constantName <" + constantName + ">");
-		constantNames[constantIndex] = constantName;
-		
-		// most constants values have a trailing U
-		// enum { APP_TYPE_UNKNOWN = 0U };
-		int endIndex = constant.indexOf("U };");
-		// a few others don't
-		// enum { ENUMERATE_FORWARDS = 0 };		
-		if (endIndex == -1) endIndex = constant.indexOf(" };");
-		String constantValue = constant.substring(constant.indexOf(" = ")
-				+ " = ".length(), endIndex);
-		if (DEBUG)
-			writeLine("constantValue <" + constantValue + ">");
-		constantValues[constantIndex] = constantValue;
-	}
-
-	// NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) = 0;
-	// identify:
-	// method name: <SetStatus>
-	// Nbr of arguments: 2
-	// Type of argument 0: PRUint32
-	// Name of argument 0: statusType
-	// Type of argument 1: const PRUnichar *
-	// Name of argument 1: status
-	void parseMethod(String line, int methodIndex) {
-		int start = methodNameStartIndexOf(line);
-		int end = methodNameEndIndexOf(line);
-		String methodName = line.substring(start, end);
-		if (DEBUG)
-			writeLine("method name: <" + methodName + ">");
-		methodNames[methodIndex] = methodName;
-		int argStart = end+"(".length();
-		int argEnd = line.indexOf(")", argStart);
-		parseArgs(line.substring(argStart, argEnd), methodIndex);
-	}
-
-	// Given a line, returns the start of the method name or -1
-	// if the line does not contain a method declaration.
-	int methodNameStartIndexOf(String line) {
-		for (int i = 0; i < BEFORE_METHOD_NAME.length; i++) {
-			int index = line.indexOf(BEFORE_METHOD_NAME[i]);
-			if (index != -1) return index + BEFORE_METHOD_NAME[i].length();
-		}
-		return -1;
-	}
-	int methodNameEndIndexOf(String line) {
-		int startIndex = methodNameStartIndexOf(line);
-		return line.indexOf("(", startIndex);
-	}
-	void parseArgs(String args, int methodIndex) {
-		int nArgs = -1;
-		// methods with no args look like: () or (void)
-		String[] noArgs = new String[] { "", "void" };
-		for (int i = 0; i < noArgs.length; i++) {
-			if (args.equals(noArgs[i])) {
-				nArgs = 0;
-				break;
-			}
-		}
-		if (nArgs == -1)
-			nArgs = count(args, ", ") + 1;
-		String[] argTypes = new String[nArgs];
-		this.argTypes[methodIndex] = argTypes;
-		String[] argNames = new String[nArgs];
-		this.argNames[methodIndex] = argNames;
-		int typeStart = 0;
-
-		// name is separated from its type by either of the following (sorted by decreasing size to find the most complete pattern */
-		String[] typeNameSep = new String[] { " * *", " **", " * & ", " * ", " *",
-				" & ", " " };
-		for (int i = 0; i < nArgs; i++) {
-			/* get the type */
-			int nextTypeStart = i < nArgs - 1 ? args.indexOf(", ", typeStart)
-					+ ", ".length() : args.length();
-			int typeNameSepIndex = 0;
-			int separatorIndex = 0;
-			for (; typeNameSepIndex < typeNameSep.length; typeNameSepIndex++) {
-				separatorIndex = args.indexOf(typeNameSep[typeNameSepIndex],
-						typeStart);
-				if (separatorIndex != -1 && separatorIndex < nextTypeStart)
-					break;
-			}
-			String separator = typeNameSep[typeNameSepIndex];
-			argTypes[i] = getC2JavaType(args.substring(typeStart,
-					separatorIndex + separator.length()));
-			if (DEBUG)
-				writeLine("arg type" + i + ": <" + argTypes[i] + ">");
-			/* get the name */
-			int nameStart = separatorIndex + separator.length();
-			int nameEnd = i < nArgs - 1 ? args.indexOf(", ", nameStart) : args
-					.length();
-			argNames[i] = args.substring(nameStart, nameEnd);
-			if (DEBUG)
-				writeLine("arg name" + i + ": <" + argNames[i] + ">");
-
-			typeStart = nextTypeStart;
-		}
-	}
-
-	String getC2JavaType(String cType) {
-		for (int i = 0; i < TYPES_C2JAVA.length; i++) {
-			if (cType.indexOf(TYPES_C2JAVA[i][0]) != -1)
-				return TYPES_C2JAVA[i][1];
-		}
-		return "!ERROR UNKNOWN C TYPE <" + cType + ">!";
-	}
-
-	// how many times part can be found in s
-	static int count(String s, String part) {
-		int index = -1, cnt = 0;
-		while ((index = s.indexOf(part, index + 1)) != -1)
-			cnt++;
-		return cnt;
-	}
-
-	static String COPYRIGHTS =
-		"/* ***** BEGIN LICENSE BLOCK *****\r\n"
-		+ " * Version: MPL 1.1\r\n"
-		+ " *\r\n"
-		+ " * The contents of this file are subject to the Mozilla Public License Version\r\n"
-		+ " * 1.1 (the \"License\"); you may not use this file except in compliance with\r\n"
-		+ " * the License. You may obtain a copy of the License at\r\n"
-		+ " * http://www.mozilla.org/MPL/\r\n"
-		+ " *\r\n"
-		+ " * Software distributed under the License is distributed on an \"AS IS\" basis,\r\n"
-		+ " * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\r\n"
-		+ " * for the specific language governing rights and limitations under the\r\n"
-		+ " * License.\r\n"
-		+ " *\r\n"
-		+ " * The Original Code is Mozilla Communicator client code, released March 31, 1998.\r\n"
-		+ " *\r\n"
-		+ " * The Initial Developer of the Original Code is\r\n"
-		+ " * Netscape Communications Corporation.\r\n"
-		+ " * Portions created by Netscape are Copyright (C) 1998-1999\r\n"
-		+ " * Netscape Communications Corporation.  All Rights Reserved.\r\n"
-		+ " *\r\n" 
-		+ " * Contributor(s):\r\n" 
-		+ " *\r\n" 
-		+ " * IBM\r\n"
-		+ " * -  Binding to permit interfacing between Mozilla and SWT\r\n"
-		+ " * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.\r\n"
-		+ " *\r\n" + " * ***** END LICENSE BLOCK ***** */";
-
-	static String PACKAGE_DECLARATION = "package org.eclipse.swt.internal.mozilla;";
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java b/eclipse/plugins/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
deleted file mode 100644
index 4b2573d..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-/**
- * Instructions on how to use the NativeStats tool with a standlaone SWT example:
- * 
- * 1) Compile the SWT native libraries defining the NATIVE_STATS flag (i.e. uncomment line in makefile).
- * 2) Add the following code around the sections of interest to dump the
- * native calls done in that section.
- * 
- * 		NativeStats stats = new NativeStats();
- * 		...
- * 		<code section>
- * 		...
- * 		stats.dumpDiff(System.out);
- * 
- * 3) Or add the following code at a given point to dump a snapshot of
- * the native calls done until that point.
- * 
- * 		new NativeStats().dumpSnapshot(System.out); 
- */
-public class NativeStats {
-	
-	Hashtable snapshot;
-	
-	final static String[] classes = new String[]{"OS", "ATK", "CDE", "GNOME", "GTK", "XPCOM", "COM", "AGL", "Gdip", "GLX", "Cairo", "WGL"};
-
-	
-	public static class NativeFunction implements Comparable {
-		String name;
-		int callCount;
-		
-	public NativeFunction(String name, int callCount) {
-		this.name = name;
-		this.callCount = callCount;
-	}
-
-	void subtract(NativeFunction func) {
-		this.callCount -= func.callCount;
-	}
-
-	public int getCallCount() {
-		return callCount;
-	}
-
-	public String getName() {
-		return name;
-	}
-	public int compareTo(Object func) {
-		return ((NativeFunction)func).callCount - callCount;
-	}
-	}
-	
-public NativeStats() {
-	snapshot = snapshot();
-}
-	
-public Hashtable diff() {
-	Hashtable newSnapshot = snapshot();
-	Enumeration keys = newSnapshot.keys();
-	while (keys.hasMoreElements()) {
-		String className = (String)keys.nextElement();
-		NativeFunction[] newFuncs = (NativeFunction[])newSnapshot.get(className);
-		NativeFunction[] funcs = (NativeFunction[])snapshot.get(className);
-		if (funcs != null) {
-			for (int i = 0; i < newFuncs.length; i++) {
-				newFuncs[i].subtract(funcs[i]);
-			}
-		}
-	}
-	return newSnapshot;
-}
-
-public void dumpDiff(PrintStream ps) {
-	dump(diff(), ps);
-}
-
-public void dumpSnapshot(PrintStream ps) {
-	dump(snapshot(), ps);
-}
-
-public void dumpSnapshot(String className, PrintStream ps) {
-	Hashtable snapshot = new Hashtable();
-	snapshot(className, snapshot);
-	dump(className, (NativeFunction[])snapshot.get(className), ps);
-}
-
-public void dump(Hashtable snapshot, PrintStream ps) {
-	Enumeration keys = snapshot.keys();
-	while (keys.hasMoreElements()) {
-		String className = (String)keys.nextElement();
-		dump(className, (NativeFunction[])snapshot.get(className), ps);
-	}
-}
-	
-void dump(String className, NativeFunction[] funcs, PrintStream ps) {
-	if (funcs == null) return;
-	Arrays.sort(funcs);
-	int total = 0;
-	for (int i = 0; i < funcs.length; i++) {
-		NativeFunction func = funcs[i];
-		total += func.getCallCount();
-	}
-	ps.print(className);
-	ps.print("=");
-	ps.print(total);
-	ps.println();
-	for (int i = 0; i < funcs.length; i++) {
-		NativeFunction func = funcs[i];
-		if (func.getCallCount() > 0) {
-			ps.print("\t");
-			ps.print(func.getName());
-			ps.print("=");
-			ps.print(func.getCallCount());
-			ps.println();
-		}
-	}
-}
-
-public void reset() {
-	snapshot = snapshot(); 
-}
-
-public Hashtable snapshot() {
-	Hashtable snapshot = new Hashtable();
-	for (int i = 0; i < classes.length; i++) {
-		String className = classes[i];
-		snapshot(className, snapshot);
-	}
-	return snapshot;
-}
-
-public Hashtable snapshot(String className, Hashtable snapshot) {
-	try {
-		Class clazz = getClass();
-		Method functionCount = clazz.getMethod(className + "_GetFunctionCount", new Class[0]);
-		Method functionCallCount = clazz.getMethod(className + "_GetFunctionCallCount", new Class[]{int.class});
-		Method functionName = clazz.getMethod(className + "_GetFunctionName", new Class[]{int.class});
-		int count = ((Integer)functionCount.invoke(clazz, new Object[0])).intValue();
-		NativeFunction[] funcs = new NativeFunction[count];
-		Object[] index = new Object[1];
-		for (int i = 0; i < count; i++) {
-			index[0] = new Integer(i);
-			int callCount = ((Integer)functionCallCount.invoke(clazz, index)).intValue();
-			String name = (String)functionName.invoke(clazz, index);
-			funcs[i] = new NativeFunction(name, callCount);
-		}
-		snapshot.put(className, funcs);
-	} catch (Throwable e) {
-//		e.printStackTrace(System.out);
-	}
-	return snapshot;
-}
-	
-public static final native int OS_GetFunctionCount();
-public static final native String OS_GetFunctionName(int index);
-public static final native int OS_GetFunctionCallCount(int index);
-
-public static final native int ATK_GetFunctionCount();
-public static final native String ATK_GetFunctionName(int index);
-public static final native int ATK_GetFunctionCallCount(int index);
-
-public static final native int AGL_GetFunctionCount();
-public static final native String AGL_GetFunctionName(int index);
-public static final native int AGL_GetFunctionCallCount(int index);
-
-public static final native int CDE_GetFunctionCount();
-public static final native String CDE_GetFunctionName(int index);
-public static final native int CDE_GetFunctionCallCount(int index);
-
-public static final native int Gdip_GetFunctionCount();
-public static final native String Gdip_GetFunctionName(int index);
-public static final native int Gdip_GetFunctionCallCount(int index);
-
-public static final native int GLX_GetFunctionCount();
-public static final native String GLX_GetFunctionName(int index);
-public static final native int GLX_GetFunctionCallCount(int index);
-
-public static final native int GNOME_GetFunctionCount();
-public static final native String GNOME_GetFunctionName(int index);
-public static final native int GNOME_GetFunctionCallCount(int index);
-
-public static final native int GTK_GetFunctionCount();
-public static final native String GTK_GetFunctionName(int index);
-public static final native int GTK_GetFunctionCallCount(int index);
-
-public static final native int XPCOM_GetFunctionCount();
-public static final native String XPCOM_GetFunctionName(int index);
-public static final native int XPCOM_GetFunctionCallCount(int index);
-
-public static final native int COM_GetFunctionCount();
-public static final native String COM_GetFunctionName(int index);
-public static final native int COM_GetFunctionCallCount(int index);
-
-public static final native int WGL_GetFunctionCount();
-public static final native String WGL_GetFunctionName(int index);
-public static final native int WGL_GetFunctionCallCount(int index);
-
-public static final native int Cairo_GetFunctionCount();
-public static final native String Cairo_GetFunctionName(int index);
-public static final native int Cairo_GetFunctionCallCount(int index);
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java b/eclipse/plugins/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java
deleted file mode 100644
index ac1ee2d..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import java.io.*;
-
-/**
- * Instructions on how to use the Sleak tool with a standlaone SWT example:
- * 
- * Modify the main method below to launch your application.
- * Run Sleak.
- * 
- */
-public class Sleak {
-	List list;
-	Canvas canvas;
-	Button start, stop, check;
-	Text text;
-	Label label;
-	
-	Object [] oldObjects = new Object [0];
-	Error [] oldErrors = new Error [0];
-	Object [] objects = new Object [0];
-	Error [] errors = new Error [0];
-
-public static void main (String [] args) {
-	DeviceData data = new DeviceData();
-	data.tracking = true;
-	Display display = new Display (data);
-	Sleak sleak = new Sleak ();
-	Shell shell = new Shell(display);
-	shell.setText ("S-Leak");
-	Point size = shell.getSize ();
-	shell.setSize (size.x / 2, size.y / 2);
-	sleak.create (shell);
-	shell.open();
-	
-	// Launch your application here
-	// e.g.		
-//	Shell shell = new Shell(display);
-//	Button button1 = new Button(shell, SWT.PUSH);
-//	button1.setBounds(10, 10, 100, 50);
-//	button1.setText("Hello World");
-//	Image image = new Image(display, 20, 20);
-//	Button button2 = new Button(shell, SWT.PUSH);
-//	button2.setBounds(10, 70, 100, 50);
-//	button2.setImage(image);
-//	shell.open();
-	
-	while (!shell.isDisposed ()) {
-		if (!display.readAndDispatch ()) display.sleep ();
-	}
-	display.dispose ();
-}
-
-public void create (Composite parent) {
-	list = new List (parent, SWT.BORDER | SWT.V_SCROLL);
-	list.addListener (SWT.Selection, new Listener () {
-		public void handleEvent (Event event) {
-			refreshObject ();
-		}
-	});
-	text = new Text (parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-	canvas = new Canvas (parent, SWT.BORDER);
-	canvas.addListener (SWT.Paint, new Listener () {
-		public void handleEvent (Event event) {
-			paintCanvas (event);
-		}
-	});
-	check = new Button (parent, SWT.CHECK);
-	check.setText ("Stack");
-	check.addListener (SWT.Selection, new Listener () {
-		public void handleEvent (Event e) {
-			toggleStackTrace ();
-		}
-	});
-	start = new Button (parent, SWT.PUSH);
-	start.setText ("Snap");
-	start.addListener (SWT.Selection, new Listener () {
-		public void handleEvent (Event event) {
-			refreshAll ();
-		}
-	});
-	stop = new Button (parent, SWT.PUSH);
-	stop.setText ("Diff");
-	stop.addListener (SWT.Selection, new Listener () {
-		public void handleEvent (Event event) {
-			refreshDifference ();
-		}
-	});
-	label = new Label (parent, SWT.BORDER);
-	label.setText ("0 object(s)");
-	parent.addListener (SWT.Resize, new Listener () {
-		public void handleEvent (Event e) {
-			layout ();
-		}
-	});
-	check.setSelection (false);
-	text.setVisible (false);
-	layout();
-}
-
-void refreshLabel () {
-	int colors = 0, cursors = 0, fonts = 0, gcs = 0, images = 0;
-	int paths = 0, patterns = 0, regions = 0, textLayouts = 0, transforms= 0;
-	for (int i=0; i<objects.length; i++) {
-		Object object = objects [i];
-		if (object instanceof Color) colors++;
-		if (object instanceof Cursor) cursors++;
-		if (object instanceof Font) fonts++;
-		if (object instanceof GC) gcs++;
-		if (object instanceof Image) images++;
-		if (object instanceof Path) paths++;
-		if (object instanceof Pattern) patterns++;
-		if (object instanceof Region) regions++;
-		if (object instanceof TextLayout) textLayouts++;
-		if (object instanceof Transform) transforms++;
-	}
-	String string = "";
-	if (colors != 0) string += colors + " Color(s)\n";
-	if (cursors != 0) string += cursors + " Cursor(s)\n";
-	if (fonts != 0) string += fonts + " Font(s)\n";
-	if (gcs != 0) string += gcs + " GC(s)\n";
-	if (images != 0) string += images + " Image(s)\n";
-	if (paths != 0) string += paths + " Paths(s)\n";
-	if (patterns != 0) string += patterns + " Pattern(s)\n";
-	if (regions != 0) string += regions + " Region(s)\n";
-	if (textLayouts != 0) string += textLayouts + " TextLayout(s)\n";
-	if (transforms != 0) string += transforms + " Transform(s)\n";
-	if (string.length () != 0) {
-		string = string.substring (0, string.length () - 1);
-	}
-	label.setText (string);
-}
-
-void refreshDifference () {
-	Display display = canvas.getDisplay();
-	DeviceData info = display.getDeviceData ();
-	if (!info.tracking) {
-		Shell shell = canvas.getShell();
-		MessageBox dialog = new MessageBox (shell, SWT.ICON_WARNING | SWT.OK);
-		dialog.setText (shell.getText ());
-		dialog.setMessage ("Warning: Device is not tracking resource allocation");
-		dialog.open ();
-	}
-	Object [] newObjects = info.objects;
-	Error [] newErrors = info.errors;
-	Object [] diffObjects = new Object [newObjects.length];
-	Error [] diffErrors = new Error [newErrors.length];
-	int count = 0;
-	for (int i=0; i<newObjects.length; i++) {
-		int index = 0;
-		while (index < oldObjects.length) {
-			if (newObjects [i] == oldObjects [index]) break;
-			index++;
-		}
-		if (index == oldObjects.length) {
-			diffObjects [count] = newObjects [i];
-			diffErrors [count] = newErrors [i];
-			count++;
-		}
-	}
-	objects = new Object [count];
-	errors = new Error [count];
-	System.arraycopy (diffObjects, 0, objects, 0, count);
-	System.arraycopy (diffErrors, 0, errors, 0, count);
-	list.removeAll ();
-	text.setText ("");
-	canvas.redraw ();
-	for (int i=0; i<objects.length; i++) {
-		list.add (objects [i].toString());
-	}
-	refreshLabel ();
-	layout ();
-}
-
-void toggleStackTrace () {
-	refreshObject ();
-	layout ();
-}
-
-void paintCanvas (Event event) {
-	canvas.setCursor (null);
-	int index = list.getSelectionIndex ();
-	if (index == -1) return;
-	GC gc = event.gc;
-	Object object = objects [index];
-	if (object instanceof Color) {
-		if (((Color)object).isDisposed ()) return;
-		gc.setBackground ((Color) object);
-		gc.fillRectangle (canvas.getClientArea());
-		return;
-	}
-	if (object instanceof Cursor) {
-		if (((Cursor)object).isDisposed ()) return;
-		canvas.setCursor ((Cursor) object);
-		return;
-	}
-	if (object instanceof Font) {
-		if (((Font)object).isDisposed ()) return;
-		gc.setFont ((Font) object);
-		FontData [] array = gc.getFont ().getFontData ();
-		String string = "";
-		String lf = text.getLineDelimiter ();
-		for (int i=0; i<array.length; i++) {
-			FontData data = array [i];
-			String style = "NORMAL";
-			int bits = data.getStyle ();
-			if (bits != 0) {
-				if ((bits & SWT.BOLD) != 0) style = "BOLD ";
-				if ((bits & SWT.ITALIC) != 0) style += "ITALIC";
-			}
-			string += data.getName () + " " + data.getHeight () + " " + style + lf;
-		}
-		gc.drawString (string, 0, 0);
-		return;
-	}
-	//NOTHING TO DRAW FOR GC
-//	if (object instanceof GC) {
-//		return;
-//	}
-	if (object instanceof Image) {
-		if (((Image)object).isDisposed ()) return;
-		gc.drawImage ((Image) object, 0, 0);
-		return;
-	}
-	if (object instanceof Path) {
-		if (((Path)object).isDisposed ()) return;
-		gc.drawPath ((Path) object);
-		return;
-	}
-	if (object instanceof Pattern) {
-		if (((Pattern)object).isDisposed ()) return;
-		gc.setBackgroundPattern ((Pattern)object);
-		gc.fillRectangle (canvas.getClientArea ());
-		gc.setBackgroundPattern (null);
-		return;
-	}
-	if (object instanceof Region) {
-		if (((Region)object).isDisposed ()) return;
-		String string = ((Region)object).getBounds().toString();
-		gc.drawString (string, 0, 0);
-		return;
-	}
-	if (object instanceof TextLayout) {
-		if (((TextLayout)object).isDisposed ()) return;
-		((TextLayout)object).draw (gc, 0, 0);
-		return;
-	}
-	if (object instanceof Transform) {
-		if (((Transform)object).isDisposed ()) return;
-		String string = ((Transform)object).toString();
-		gc.drawString (string, 0, 0);
-		return;
-	}
-}
-
-void refreshObject () {
-	int index = list.getSelectionIndex ();
-	if (index == -1) return;
-	if (check.getSelection ()) {
-		ByteArrayOutputStream stream = new ByteArrayOutputStream ();
-		PrintStream s = new PrintStream (stream);
-		errors [index].printStackTrace (s);
-		text.setText (stream.toString ());
-		text.setVisible (true);
-		canvas.setVisible (false);
-	} else {
-		canvas.setVisible (true);
-		text.setVisible (false);
-		canvas.redraw ();
-	}
-}
-
-void refreshAll () {
-	oldObjects = new Object [0];
-	oldErrors = new Error [0];
-	refreshDifference ();
-	oldObjects = objects;
-	oldErrors = errors;
-}
-
-void layout () {
-	Composite parent = canvas.getParent();
-	Rectangle rect = parent.getClientArea ();
-	int width = 0;
-	String [] items = list.getItems ();
-	GC gc = new GC (list);
-	for (int i=0; i<objects.length; i++) {
-		width = Math.max (width, gc.stringExtent (items [i]).x);
-	}
-	gc.dispose ();
-	Point size1 = start.computeSize (SWT.DEFAULT, SWT.DEFAULT);
-	Point size2 = stop.computeSize (SWT.DEFAULT, SWT.DEFAULT);
-	Point size3 = check.computeSize (SWT.DEFAULT, SWT.DEFAULT);
-	Point size4 = label.computeSize (SWT.DEFAULT, SWT.DEFAULT);
-	width = Math.max (size1.x, Math.max (size2.x, Math.max (size3.x, width)));
-	width = Math.max (64, Math.max (size4.x, list.computeSize (width, SWT.DEFAULT).x));
-	start.setBounds (0, 0, width, size1.y);
-	stop.setBounds (0, size1.y, width, size2.y);
-	check.setBounds (0, size1.y + size2.y, width, size3.y);
-	label.setBounds (0, rect.height - size4.y, width, size4.y);
-	int height = size1.y + size2.y + size3.y;
-	list.setBounds (0, height, width, rect.height - height - size4.y);
-	text.setBounds (width, 0, rect.width - width, rect.height);
-	canvas.setBounds (width, 0, rect.width - width, rect.height);
-}
-		
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/about.html b/eclipse/plugins/org.eclipse.swt.tools/about.html
deleted file mode 100644
index 4602330..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>June 2, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.tools/build.properties b/eclipse/plugins/org.eclipse.swt.tools/build.properties
deleted file mode 100644
index 6d6c721..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = about.html,\
-               plugin.xml,\
-               plugin.properties,\
-               META-INF/,\
-               templates/,\
-               icons/,\
-               .
-output.. = bin/
-source.. = src/,\
-           JNI Generation/,\
-           Mac Generation/,\
-           Icon Exe/,\
-           NativeStats/,\
-           Sleak/,\
-           Mozilla Generation/
diff --git a/eclipse/plugins/org.eclipse.swt.tools/icons/mac.gif b/eclipse/plugins/org.eclipse.swt.tools/icons/mac.gif
deleted file mode 100644
index 13102f6..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/icons/mac.gif and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/icons/sleak.gif b/eclipse/plugins/org.eclipse.swt.tools/icons/sleak.gif
deleted file mode 100644
index 444bd35..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/icons/sleak.gif and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/icons/spy.gif b/eclipse/plugins/org.eclipse.swt.tools/icons/spy.gif
deleted file mode 100644
index 98d6e2e..0000000
Binary files a/eclipse/plugins/org.eclipse.swt.tools/icons/spy.gif and /dev/null differ
diff --git a/eclipse/plugins/org.eclipse.swt.tools/plugin.properties b/eclipse/plugins/org.eclipse.swt.tools/plugin.properties
deleted file mode 100644
index 3065bf1..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = SWT Tools
-providerName = Eclipse.org
-macViewName = Mac Generator
-spyViewName = SWT Spy
-sleakViewName = Sleak
-jniBuilderName = JNI Builder
-enableCheck64Name = Report 64-bit Problems
diff --git a/eclipse/plugins/org.eclipse.swt.tools/plugin.xml b/eclipse/plugins/org.eclipse.swt.tools/plugin.xml
deleted file mode 100644
index ef0072b..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/plugin.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-   <extension
-         point="org.eclipse.ui.views">
-      <category
-            name="%pluginName"
-            id="org.eclipse.swt.swt.tools">
-      </category>
-      <view
-            allowMultiple="false"
-            category="org.eclipse.swt.swt.tools"
-            class="org.eclipse.swt.tools.views.MacGeneratorView"
-            icon="icons/mac.gif"
-            id="org.eclipse.swt.tools.views.MacGeneratorView"
-            name="%macViewName">
-      </view>
-      <view
-            allowMultiple="false"
-            category="org.eclipse.swt.swt.tools"
-            class="org.eclipse.swt.tools.views.SpyView"
-            icon="icons/spy.gif"
-            id="org.eclipse.swt.tools.views.SpyView"
-            name="%spyViewName">
-      </view>
-      <view
-            category="org.eclipse.swt.swt.tools"
-            class="org.eclipse.swt.tools.views.SleakView"
-            icon="icons/sleak.gif"
-            id="org.eclipse.swt.tools.views.SleakView"
-            name="%sleakViewName">
-      </view>
-   </extension>
-
-   <extension point="org.eclipse.ui.editors.templates">
-      <include
-            file="templates/jnitemplates.xml"
-            translations="$nl$/templates/jnitemplates.properties">
-      </include>
-   </extension>
-
-   <extension
-         id="jnibuilder"
-         name="%jniBuilderName"
-         point="org.eclipse.core.resources.builders">
-      <builder hasNature="false">
-		<run class="org.eclipse.swt.tools.builders.JNIBuilder"/>
-      </builder>
-   </extension>
-
-   <extension
-         point="org.eclipse.jdt.core.compilationParticipant">
-      <compilationParticipant
-            class="org.eclipse.swt.tools.builders.Check64CompilationParticipant"
-            id="org.eclipse.swt.tools.Check64CompilationParticipant">
-      </compilationParticipant>
-   </extension>
-
-   <extension
-         point="org.eclipse.ui.popupMenus">
-      <objectContribution
-            objectClass="org.eclipse.jdt.core.IJavaProject"
-            id="org.eclipse.swt.tools.contribution">
-         <menu
-               label="%pluginName"
-               path="additions"
-               id="org.eclipse.swt.tools.menu">
-            <separator
-                  name="group1">
-            </separator>
-         </menu>
-         <action
-               label="%enableCheck64Name"
-               class="org.eclipse.swt.tools.builders.Check64EnableAction"
-               menubarPath="org.eclipse.swt.tools.menu/group1"
-               style="toggle"
-               enablesFor="1"
-               id="org.eclipse.swt.tools.check64EnableAction">
-         </action>
-      </objectContribution>
-   </extension>
-
-</plugin>
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java
deleted file mode 100644
index 7b2de2b..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/Activator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
-	// The plug-in ID
-	public static final String PLUGIN_ID = "org.eclipse.swt.tools";
-
-	// The shared instance
-	private static Activator plugin;
-	
-	/**
-	 * The constructor
-	 */
-	public Activator() {
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		plugin = this;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-	 */
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 *
-	 * @return the shared instance
-	 */
-	public static Activator getDefault() {
-		return plugin;
-	}
-
-	/**
-	 * Returns an image descriptor for the image file at the given
-	 * plug-in relative path
-	 *
-	 * @param path the path
-	 * @return the image descriptor
-	 */
-	public static ImageDescriptor getImageDescriptor(String path) {
-		return imageDescriptorFromPlugin(PLUGIN_ID, path);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java
deleted file mode 100644
index f28a2ac..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64CompilationParticipant.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.builders;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModelMarker;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.compiler.BuildContext;
-import org.eclipse.jdt.core.compiler.CharOperation;
-import org.eclipse.jdt.core.compiler.CompilationParticipant;
-import org.eclipse.jdt.core.compiler.batch.BatchCompiler;
-import org.eclipse.swt.tools.Activator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-
-public class Check64CompilationParticipant extends CompilationParticipant {
-	HashSet sources;
-
-	static final char[] INT_LONG = "int /*long*/".toCharArray();
-	static final char[] INT_LONG_ARRAY = "int[] /*long[]*/".toCharArray();
-	static final char[] FLOAT_DOUBLE = "float /*double*/".toCharArray();
-	static final char[] FLOAT_DOUBLE_ARRAY = "float[] /*double[]*/".toCharArray();
-	static final char[] LONG_INT = "long /*int*/".toCharArray();
-	static final char[] LONG_INT_ARRAY = "long[] /*int[]*/".toCharArray();
-	static final char[] DOUBLE_FLOAT = "double /*float*/".toCharArray();
-	static final char[] DOUBLE_FLOAT_ARRAY = "double[] /*float[]*/".toCharArray();
-	static final String buildDir = "/.build64/";
-	static final String pluginDir = "/org.eclipse.swt/";
-	static final String plugin = "org.eclipse.swt";
-	static final String SOURCE_ID = "JNI";
-	static final String CHECK_64_ENABLED = Activator.PLUGIN_ID + "CHECK_64_ENABLED";
-	
-void build(IJavaProject project, String root) throws CoreException {
-	PrintWriter writer = null;
-	try {
-		StringBuffer sourcePath = new StringBuffer(), cp = new StringBuffer();
-		IClasspathEntry[] entries = project.getResolvedClasspath(true);
-		for (int i = 0; i < entries.length; i++) {
-			IClasspathEntry entry = entries[i]; 
-			String path = entry.getPath().toPortableString();
-			if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
-				if (path.startsWith(pluginDir)) {
-					if (sourcePath.length() > 0) sourcePath.append(File.pathSeparatorChar);
-					String dir = root + path.substring(pluginDir.length());
-					sourcePath.append(dir);
-				}
-			} else {
-				if (cp.length() > 0) cp.append(File.pathSeparator);
-				cp.append(path);
-			}
-		}
-		String bin = root + "/bin";
-		if (cp.length() > 0) cp.append(File.pathSeparator);
-		cp.append(bin);
-		ArrayList args = new ArrayList();
-		args.addAll(Arrays.asList(new String[]{
-			"-nowarn",
-//			"-verbose",
-			"-d", bin,
-			"-cp", cp.toString(),
-			"-log", root + "/log.xml",
-			"-sourcepath", sourcePath.toString(),
-		}));
-		args.addAll(sources);
-		sources = null;
-		writer = new PrintWriter(new BufferedOutputStream(new FileOutputStream(root + "/out.txt")));
-		BatchCompiler.compile((String[])args.toArray(new String[args.size()]), writer, writer, null);
-		writer.close();
-		writer = null;
-		project.getProject().findMember(new Path(buildDir)).refreshLocal(IResource.DEPTH_INFINITE, null);
-	} catch (Exception e) {
-		throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Problem building 64-bit code", e));
-	} finally {
-		if (writer != null) writer.close();
-	}
-}
-
-void create(IContainer file) throws CoreException {
-	if (file.exists()) return;
-	switch (file.getType()) {
-		case IResource.FOLDER:
-			create(file.getParent());
-			((IFolder)file).create(true, true, null);
-	}
-}
-
-void createProblems(IJavaProject project, String root) throws CoreException {
-	try {
-		InputStream is = new BufferedInputStream(new FileInputStream(root + "/log.xml"));
-		Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(is));
-		is.close();
-		IProject proj = project.getProject();	
-		String projPath = proj.getLocation().toPortableString();
-		NodeList sources = doc.getDocumentElement().getElementsByTagName("sources");
-		for (int i = 0; i < sources.getLength(); i++) {
-			NodeList src = ((Element)sources.item(i)).getElementsByTagName("source");
-			for (int j = 0; j < src.getLength(); j++) {
-				Element source = (Element)src.item(j);
-				String path = source.getAttribute("path").replace('\\', '/');
-				path = path.replaceAll(buildDir, "/");
-				if (path.startsWith(projPath)) {
-					path = path.substring(projPath.length());
-				}
-				IResource resource = proj.findMember(new Path(path));
-				boolean hasProblems = false;
-				IMarker[] markers = resource.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
-				for (int m = 0; m < markers.length; m++) {
-					IMarker marker = markers[m];
-					if (SOURCE_ID.equals(marker.getAttribute(IMarker.SOURCE_ID))) {
-						marker.delete();
-					} else {
-						Object severity = marker.getAttribute(IMarker.SEVERITY);
-						hasProblems |= severity != null && ((Integer)severity).intValue() == IMarker.SEVERITY_ERROR;
-					}
-				}
-				if (!hasProblems) {
-					NodeList problems = source.getElementsByTagName("problems");
-					for (int k = 0; k < problems.getLength(); k++) {
-						NodeList problem = ((Element)problems.item(k)).getElementsByTagName("problem");
-						for (int l = 0; l < problem.getLength(); l++) {
-							Element node = (Element)problem.item(l);
-							if (resource != null) {
-								int start = Integer.parseInt(node.getAttribute("charStart"));
-								int end = Integer.parseInt(node.getAttribute("charEnd"));
-								String message = "[64] " + ((Element)node.getElementsByTagName("message").item(0)).getAttribute("value");
-								IMarker marker = resource.createMarker(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER);
-								int severity = IMarker.SEVERITY_ERROR;
-								marker.setAttributes(
-									new String[] {IMarker.MESSAGE, IMarker.SEVERITY, IMarker.CHAR_START, IMarker.CHAR_END, IMarker.SOURCE_ID},
-									new Object[] {message, new Integer(severity), new Integer(start), new Integer(end), SOURCE_ID});
-							}
-						}
-					}
-				}
-			}
-		}
-	} catch (Exception e) {
-		throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Problem creating 64-bit problems", e));
-	}
-}
-
-boolean replace(char[] source, char[] src, char[] dest) {
-	boolean changed = false;
-	int start = 0;
-	while (start < source.length) {
-		int index = CharOperation.indexOf(src, source, true, start);
-		if (index == -1) break;
-		changed |= true;
-		System.arraycopy(dest, 0, source, index, dest.length);
-		start = index + 1;
-	}
-	return changed;
-}
-
-boolean replace(char[] source) {
-	boolean changed = false;
-	changed |= replace(source, INT_LONG, LONG_INT);
-	changed |= replace(source, INT_LONG_ARRAY, LONG_INT_ARRAY);
-	changed |= replace(source, FLOAT_DOUBLE, DOUBLE_FLOAT);
-	changed |= replace(source, FLOAT_DOUBLE_ARRAY, DOUBLE_FLOAT_ARRAY);
-	if (!changed) {
-		changed |= replace(source, LONG_INT, INT_LONG);
-		changed |= replace(source, LONG_INT_ARRAY, INT_LONG_ARRAY);
-		changed |= replace(source, DOUBLE_FLOAT, FLOAT_DOUBLE);
-		changed |= replace(source, DOUBLE_FLOAT_ARRAY, FLOAT_DOUBLE_ARRAY);
-	}
-	return changed;
-}
-
-public static boolean getEnabled() {
-	return Activator.getDefault().getPreferenceStore().getBoolean(CHECK_64_ENABLED);
-}
-
-public static void setEnabled(boolean enabled) {
-	Activator.getDefault().getPreferenceStore().setValue(CHECK_64_ENABLED, enabled);
-}
-
-boolean is64bit(IJavaProject project) {
-	try {
-		IClasspathEntry[] entries = project.getResolvedClasspath(true);
-		for (int i = 0; i < entries.length; i++) {
-			IClasspathEntry entry = entries[i];
-			if (entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
-				String path = entry.getPath().toPortableString();
-				System.out.println(path);
-				if (path.equals(pluginDir + "Eclipse SWT PI/win32") || 
-					path.equals(pluginDir + "Eclipse SWT PI/cocoa") || 
-					path.equals(pluginDir + "Eclipse SWT PI/gtk")
-				) 
-				{
-					return true;
-				}
-			}
-		}
-	} catch (JavaModelException e) {}
-	return false;
-}
-
-public void buildFinished(IJavaProject project) {
-	try {
-		if (sources == null) return;
-		if (!getEnabled() || !is64bit(project)) return;
-//		long time = System.currentTimeMillis();
-		String root = project.getProject().getLocation().toPortableString() + buildDir;
-		build(project, root);		
-		createProblems(project, root);
-//		System.out.println("compiling time=" + (System.currentTimeMillis() - time));
-	} catch (Exception e) {
-		e.printStackTrace();
-	}
-}
-	
-public void buildStarting(BuildContext[] files, boolean isBatch) {
-	if (sources == null) sources = new HashSet();
-//	long time = System.currentTimeMillis();
-	for (int i = 0; i < files.length; i++) {
-		BuildContext context = files[i];
-		IFile file = context.getFile();
-		IProject project = file.getProject();
-		Path path = new Path(buildDir + file.getProjectRelativePath().toPortableString());
-		IFile newFile = project.getFile(path);
-		sources.add(newFile.getLocation().toPortableString());
-		try {
-			if (newFile.exists()) {
-				newFile.delete(true, null);
-			}
-			create(newFile.getParent());
-			char[] source = context.getContents();
-			replace(source);
-			newFile.create(new ByteArrayInputStream(new String(source).getBytes()), true, null);
-		} catch (CoreException e) {
-			e.printStackTrace();
-		}
-	}
-//	System.out.println("copying time=" + (System.currentTimeMillis() - time));	
-}
-
-public void cleanStarting(IJavaProject project) {
-	if (!isActive(project)) return;
-	sources = null;
-	IResource resource = project.getProject().findMember(new Path(buildDir));
-	if (resource != null) {
-		try {
-			resource.delete(true, null);
-		} catch (CoreException e) {
-			e.printStackTrace();
-		}
-	}
-}
-
-public boolean isActive(IJavaProject project) {
-	if (project.getProject().getName().equals(plugin)) {
-		return true;
-	}
-	return super.isActive(project);
-}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java
deleted file mode 100644
index 02184d5..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/Check64EnableAction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.builders;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-public class Check64EnableAction implements IObjectActionDelegate {
-
-	public Check64EnableAction() {
-		super();
-	}
-
-	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
-		action.setChecked(Check64CompilationParticipant.getEnabled());
-	}
-
-	public void run(IAction action) {
-		Check64CompilationParticipant.setEnabled(action.isChecked());
-	}
-
-	public void selectionChanged(IAction action, ISelection selection) {
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java
deleted file mode 100644
index dc13562..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/builders/JNIBuilder.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.builders;
-
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.swt.tools.internal.JNIGeneratorApp;
-import org.eclipse.swt.tools.internal.MetaData;
-
-public class JNIBuilder extends IncrementalProjectBuilder {
-
-	MetaData metaData;
-	MainClass[] classes;
-	
-	static class MainClass {
-		public String mainClassName;
-		public String outputDir;
-		public String sourceDir;
-		public boolean build;
-		
-		public String toString() {
-			return mainClassName + "->" + outputDir;
-		}
-	}
-	
-	public JNIBuilder() {
-		metaData = new MetaData("org.eclipse.swt.internal");
-		String mainClasses = metaData.getMetaData("swt_main_classes", null);
-		if (mainClasses != null) {
-			String[] list = mainClasses.split(",");
-			classes = new MainClass[list.length / 2];
-			for (int i = 0; i < list.length; i += 2) {
-				MainClass clazz = classes[i/2] = new MainClass();
-				clazz.mainClassName = list[i];
-				clazz.outputDir = list[i+1].substring(2, list[i+1].length());
-				clazz.sourceDir = clazz.outputDir.substring(0, clazz.outputDir.length() - "library/".length());
-			}
-		}
-	}
-	
-	protected IProject[] build(int kind, Map args, final IProgressMonitor monitor) throws CoreException {
-		IResourceDelta delta = getDelta(getProject());
-		if (delta == null) return null;
-		delta.accept(new IResourceDeltaVisitor() {
-			public boolean visit(IResourceDelta delta) throws CoreException {
-				IPath ipath = delta.getFullPath();
-				if (!"java".equals(ipath.getFileExtension())) return true;
-				String path = ipath.toPortableString();
-				for (int i = 0; i < classes.length; i++) {
-					if (classes[i].build) continue;
-					if (path.startsWith(classes[i].sourceDir)) {
-						classes[i].build = true;
-					}
-				}
-				return true;
-			}
-		});
-		final IWorkspaceRoot root = getProject().getWorkspace().getRoot();
-		for (int i = 0; i < classes.length; i++) {
-			MainClass mainClass = classes[i];
-			if (mainClass.build) {
-				mainClass.build = false;
-				IResource library = root.findMember(mainClass.outputDir);
-				JNIGeneratorApp gen = new JNIGeneratorApp();
-				gen.setMainClassName(mainClass.mainClassName, library.getLocation().toPortableString());
-				gen.generate();
-				library.refreshLocal(IResource.DEPTH_INFINITE, null);
-			}
-		}
-		return null;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/MacGeneratorView.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/MacGeneratorView.java
deleted file mode 100644
index 3699313..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/MacGeneratorView.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.views;
-
-import java.util.*;
-
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.jface.action.*;
-import org.eclipse.swt.tools.internal.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-
-
-public class MacGeneratorView extends ViewPart {
-	private Action generateAction;
-	private MacGeneratorUI ui;
-	private IResource root;
-	IResourceChangeListener listener;
-	private Job job;
-	private String mainClassName = "org.eclipse.swt.internal.cocoa.OS";
-	
-	class GenJob extends Job {
-		public GenJob() {
-			super("Mac Generator");
-		}
-		protected IStatus run(final IProgressMonitor monitor) {
-			try {
-				ui.generate(new ProgressMonitor() {
-					public void setMessage(String message) {
-						monitor.subTask(message);
-					}
-					public void setTotal(int total) {
-						monitor.beginTask("Generating", total);
-					}
-					public void step() {
-						monitor.worked(1);
-					}
-				});
-				refresh();
-			} finally {
-				monitor.done();
-				MacGeneratorView.this.job = null;
-			}
-			return Status.OK_STATUS;
-		}
-	}
-	
-	/**
-	 * The constructor.
-	 */
-	public MacGeneratorView() {
-		MacGenerator.BUILD_C_SOURCE = false;
-		IWorkspace workspace = ResourcesPlugin.getWorkspace();
-		IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-		root = workspaceRoot.findMember(new Path("org.eclipse.swt/Eclipse SWT PI/cocoa"));		
-		listener = new IResourceChangeListener() {
-			public void resourceChanged(IResourceChangeEvent event) {
-				if (job != null) return;
-				if (event.getType() != IResourceChangeEvent.POST_CHANGE) return;
-				IResourceDelta rootDelta = event.getDelta();
-				IResourceDelta piDelta = rootDelta.findMember(root.getFullPath());
-				if (piDelta == null) return;
-				final ArrayList changed = new ArrayList();
-				IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() {
-					public boolean visit(IResourceDelta delta) {
-						if (delta.getKind() != IResourceDelta.CHANGED) return true;
-						if ((delta.getFlags() & IResourceDelta.CONTENT) == 0) return true;
-						IResource resource = delta.getResource();
-						if (resource.getType() == IResource.FILE && "extras".equalsIgnoreCase(resource.getFileExtension())) {
-							changed.add(resource);
-						}
-						return true;
-					}
-				};
-				try {
-					piDelta.accept(visitor);
-				} catch (CoreException e) {}
-				if (changed.size() > 0) {
-					ui.refresh();
-				}
-			}
-		};
-		workspace.addResourceChangeListener(listener);
-	}
-
-	/**
-	 * This is a callback that will allow us
-	 * to create the viewer and initialize it.
-	 */
-	public void createPartControl(Composite parent) {
-		MacGenerator gen = new MacGenerator();
-		gen.setOutputDir(root.getLocation().toPortableString());
-		gen.setMainClass(mainClassName);
-		ui = new MacGeneratorUI(gen);
-		ui.setActionsVisible(false);
-		ui.open(parent);
-
-		makeActions();
-		contributeToActionBars();
-	}
-
-	private void contributeToActionBars() {
-		IActionBars bars = getViewSite().getActionBars();
-		fillLocalPullDown(bars.getMenuManager());
-		fillLocalToolBar(bars.getToolBarManager());
-	}
-	
-	public void dispose() {
-		IWorkspace workspace = ResourcesPlugin.getWorkspace();
-		workspace.removeResourceChangeListener(listener);
-		super.dispose();
-	}
-
-	private void fillLocalPullDown(IMenuManager manager) {
-		manager.add(generateAction);
-	}
-
-	private void fillLocalToolBar(IToolBarManager manager) {
-		manager.add(generateAction);
-	}
-	
-	void refresh() {
-		try {
-			root.refreshLocal(IResource.DEPTH_INFINITE, null);
-		} catch (CoreException e) {
-//			e.printStackTrace();
-		}
-	}
-	
-	void generate() {
-		if (job != null) return;
-		job = new GenJob();
-		job.schedule();
-	}
-
-	private void makeActions() {
-		generateAction = new Action() {
-			public void run() {
-				generate();
-			}
-		};
-		generateAction.setText("Generate");
-		generateAction.setToolTipText("Generate");
-		generateAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
-			getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
-	}
-
-	/**
-	 * Passing the focus request to the viewer's control.
-	 */
-	public void setFocus() {
-		ui.setFocus();
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java
deleted file mode 100644
index 12e4219..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SleakView.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.views;
-
-import java.io.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.tools.internal.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.internal.UIPlugin;
-import org.eclipse.ui.part.*;
-
-/**
- * This sample class demonstrates how to plug-in a new
- * workbench view. The view shows data obtained from the
- * model. The sample creates a dummy model on the fly,
- * but a real implementation would connect to the model
- * available either in this or another plug-in (e.g. the workspace).
- * The view is connected to the model using a content provider.
- * <p>
- * The view uses a label provider to define how model
- * objects should be presented in the view. Each
- * view can present the same model objects using
- * different labels and icons, if needed. Alternatively,
- * a single label provider can be shared between views
- * in order to ensure that objects of the same type are
- * presented in the same way everywhere.
- * <p>
- */
-
-public class SleakView extends ViewPart {
-
-	Composite parent = null;
-	Sleak sleak = null;
-
-	/**
-	 * The constructor.
-	 */
-	public SleakView() {
-	}
-
-	/**
-	 * This is a callback that will allow us
-	 * to create the viewer and initialize it.
-	 */
-	public void createPartControl(Composite parent) {
-		this.parent = new Composite(parent, SWT.NONE);
-		sleak = new Sleak ();
-		sleak.create(this.parent);
-	}
-
-	/**
-	 * Passing the focus request to the viewer's control.
-	 */
-	public void setFocus() {
-		parent.setFocus();
-	}
-	
-	private boolean extractOptions (String fileName) {
-		FileOutputStream os = null;
-		InputStream is = null;
-		File file = new File(fileName);
-		try {
-			if (!file.exists ()) {
-				is = Class.forName("org.eclipse.ui.internal.UIPlugin").getResourceAsStream ("/.options"); //$NON-NLS-1$
-				if (is != null) {
-					int read;
-					byte [] buffer = new byte [4096];
-					os = new FileOutputStream (fileName);
-					while ((read = is.read (buffer)) != -1) {
-						os.write(buffer, 0, read);
-					}
-					os.close ();
-					is.close ();
-				}
-			}
-			return true;
-		} catch (Throwable e) {
-		} finally {
-			try {
-				if (os != null)
-					os.close();
-			} catch (IOException e1) {
-			}
-			try {
-				if (is != null)
-					is.close();
-			} catch (IOException e1) {
-			}
-		}
-		return false;
-	}
-
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SpyView.java b/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SpyView.java
deleted file mode 100644
index 8ab06d7..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/src/org/eclipse/swt/tools/views/SpyView.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.views;
-
-import java.io.*;
-import java.lang.reflect.*;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.tools.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-
-public class SpyView extends ViewPart {
-	private StyledText output;
-	private Action spyAction;
-	private Listener keyFilter;
-	private Runnable timer;
-	private Control lastControl;
-	private Field field;
-	
-	static final int TIMEOUT = 100;
-
-	/**
-	 * This is a callback that will allow us
-	 * to create the viewer and initialize it.
-	 */
-	public void createPartControl(Composite parent) {
-		output = new StyledText(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY);
-		
-		keyFilter = new Listener() {
-			public void handleEvent(Event e) {
-				// If this accelerator changes, change the tooltip text
-				if (e.keyCode == '.' && e.stateMask == (SWT.ALT | SWT.SHIFT | SWT.CONTROL)) {
-					if (spyAction.isChecked()) {
-						spyAction.setChecked(false);
-					} else {
-						spyAction.setChecked(true);
-						spyAction.run();
-					}
-					e.type = SWT.None;
-				};
-			}
-		};
-		parent.getDisplay().addFilter(SWT.KeyDown, keyFilter);
-		
-		timer = new Runnable() {
-			public void run() {
-				if (output == null || output.isDisposed() || !spyAction.isChecked()) return;
-				Display display = output.getDisplay();
-				Control control = display.getCursorControl();
-				if (control != lastControl) {
-					StringBuffer text = new StringBuffer();
-					if (control != null) {
-						text.append(control+"@"+getOSHandle(control)+"\n");
-						text.append("\tStyle: "+getStyle(control)+"\n");
-						text.append("\tLayout Data: "+control.getLayoutData()+"\n");
-						text.append("\tBounds: "+control.getBounds()+"\n");
-						text.append("\n");
-						if (control instanceof Composite) {
-							text.append("\nChildren:\n");
-							Control[] children = ((Composite)control).getChildren();
-							for (int i = 0; i < children.length; i++) {
-								text.append("\t"+children[i]+"\n");
-							}
-						}
-						Composite parent = control.getParent();
-						if (parent != null) {
-							text.append("\nPeers:\n");
-							Control[] peers = parent.getChildren();
-							for (int i = 0; i < peers.length; i++) {
-								text.append("\t");
-								if (peers[i] == control) text.append("*");
-								text.append(peers[i]+"@"+getOSHandle(peers[i]));
-								text.append(" Layout Data: "+peers[i].getLayoutData());
-								text.append(" Bounds: "+peers[i].getBounds());
-								text.append("\n");
-							}
-							text.append("\nParent Tree:\n");
-							Composite[] parents = new Composite[0];
-							while (parent != null) {
-								Composite[] newParents = new Composite[parents.length + 1];
-								System.arraycopy(parents, 0, newParents, 0, parents.length);
-								newParents[parents.length] = parent;
-								parents = newParents;
-								parent = parent.getParent();
-							}
-							for (int i = parents.length - 1; i >= 0; i--) {
-								String prefix = "\t";
-								for (int j = 0; j < parents.length - i - 1; j++) {
-									prefix += "\t";
-								}
-								text.append(prefix + parents[i]+"@"+getOSHandle(parents[i])+"\n");
-								text.append(prefix+"\t Style: "+getStyle(parents[i])+"\n");
-								text.append(prefix+"\t Bounds: "+parents[i].getBounds()+"\n");
-								text.append(prefix+"\t Layout: "+parents[i].getLayout()+"\n");
-								text.append(prefix+"\t LayoutData: "+parents[i].getLayoutData()+"\n");
-							}
-						}
-						Error error = (Error)control.getData("StackTrace");
-						if (error != null) {
-							text.append("\nCreation Stack Trace:\n");
-							ByteArrayOutputStream stream = new ByteArrayOutputStream();
-							PrintStream s = new PrintStream(stream);
-							error.printStackTrace(s);
-							text.append(stream.toString());
-						}
-					}
-					output.setText(text.toString());
-				}
-				lastControl = control;
-				display.timerExec(100, this);			
-			}
-		};
-		
-		makeActions();
-		contributeToActionBars();
-	}
-	
-	/**
-	 * Passing the focus request to the viewer's control.
-	 */
-	public void setFocus() {
-		if (output != null & !output.isDisposed()) output.setFocus();
-	}
-	
-	private String getOSHandle(Control control) {
-		if (field == null) {
-			String[] fieldNames = {"handle", "view"};
-			for (int i = 0; i < fieldNames.length; i++) {
-				try {
-					field = control.getClass().getField(fieldNames[i]);
-					if (field != null) break;
-				} catch (Throwable e) {}
-			}
-		}
-		try {
-			return field.get(control).toString();
-		} catch (Throwable e) {}
-		return "";
-	}
-	
-	private void contributeToActionBars() {
-		IActionBars bars = getViewSite().getActionBars();
-		fillLocalPullDown(bars.getMenuManager());
-		fillLocalToolBar(bars.getToolBarManager());
-	}
-	
-	public void dispose() {
-		Display.getCurrent().removeFilter(SWT.KeyDown, keyFilter);
-		super.dispose();
-	}
-
-	private void fillLocalPullDown(IMenuManager manager) {
-		manager.add(spyAction);
-	}
-
-	private void fillLocalToolBar(IToolBarManager manager) {
-		manager.add(spyAction);
-	}
-	
-	private void makeActions() {
-		spyAction = new Action() {
-			public void run() {
-				Display.getCurrent().timerExec(TIMEOUT, timer);
-			}
-		};
-		spyAction.setText("Spy");
-		spyAction.setToolTipText("Toggle Spy (CONTROL+ALT+SHIFT+.)");
-		spyAction.setImageDescriptor(Activator.getImageDescriptor("icons/spy.gif"));
-		spyAction.setChecked(false);
-	}
-	
-	private String getStyle(Widget w) {
-		//MODELESS = 0;
-		//BAR = 1 << 1;
-		//SEPARATOR = 1 << 1;
-		//TOGGLE = 1 << 1;
-		//MULTI = 1 << 1;
-		//INDETERMINATE = 1 << 1;
-		//DBCS = 1 << 1;
-		//ALPHA = 1 << 2;
-		//TOOL = 1 << 2; 
-		//SINGLE = 1 << 2;
-		//ARROW = 1 << 2;
-		//DROP_DOWN = 1 << 2;
-		//SHADOW_IN = 1 << 2;
-		//POP_UP = 1 << 3;
-		//PUSH = 1 << 3;
-		//READ_ONLY = 1 << 3;
-		//SHADOW_OUT = 1 << 3;
-		//NO_TRIM = 1 << 3;
-		//NATIVE = 1 << 3;
-		//RESIZE = 1 << 4;
-		//SHADOW_ETCHED_IN = 1 << 4;
-		//RADIO = 1 << 4;
-		//PHONETIC = 1 << 4;
-		//ROMAN = 1 << 5;
-		//CHECK = 1 << 5;
-		//SHADOW_NONE = 1 << 5;
-		//TITLE = 1 << 5;
-		//DATE = 1 << 5;
-		//CLOSE = 1 << 6;
-		//MENU = CLOSE;
-		//CASCADE = 1 << 6;
-		//WRAP = 1 << 6;
-		//SIMPLE = 1 << 6;
-		//SHADOW_ETCHED_OUT = 1 << 6;
-		//MIN = 1 << 7;
-		//UP = 1 << 7;
-		//TOP = UP;
-		//TIME = 1 << 7;
-		//HORIZONTAL = 1 << 8;
-		//H_SCROLL = 1 << 8;
-		//V_SCROLL = 1 << 9;
-		//VERTICAL = 1 << 9;
-		//MAX = 1 << 10;
-		//DOWN               = 1 << 10;
-		//BOTTOM             = DOWN;
-		//CALENDAR = 1 << 10;
-		//BORDER = 1 << 11;
-		//CLIP_CHILDREN = 1 << 12; 
-		//BALLOON = 1 << 12;
-		//CLIP_SIBLINGS = 1 << 13;
-		//ON_TOP = 1 << 14;
-		//LEAD               = 1 << 14;
-		//LEFT               = LEAD;
-		//PRIMARY_MODAL = 1 << 15;
-		//HIDE_SELECTION = 1 << 15;
-		//SHORT = 1 << 15;
-		//MEDIUM = 1 << 16;
-		//FULL_SELECTION = 1 << 16;
-		//SMOOTH = 1 << 16;
-		//APPLICATION_MODAL = 1 << 16;
-		//SYSTEM_MODAL = 1 << 17;
-		//TRAIL              = 1 << 17;	
-		//RIGHT              = TRAIL;
-		//NO_BACKGROUND = 1 << 18;
-		//NO_FOCUS = 1 << 19;
-		//NO_REDRAW_RESIZE = 1 << 20;
-		//NO_MERGE_PAINTS = 1 << 21;
-		//NO_RADIO_GROUP = 1 << 22;
-		//PASSWORD = 1 << 22;
-		//FLAT = 1 << 23;
-		//EMBEDDED = 1 << 24;
-		//CENTER = 1 << 24;
-		//LEFT_TO_RIGHT = 1 << 25;
-		//RIGHT_TO_LEFT = 1 << 26;
-		//MIRRORED = 1 << 27;
-		//VIRTUAL = 1 << 28;
-		//LONG = 1 << 28;
-		//DOUBLE_BUFFERED = 1 << 29;
-		
-		int style = w.getStyle();
-		String result = "";
-		if (style == SWT.DEFAULT) {
-			return "DEFAULT - bad!";
-		}
-		if ((style & 1 << 1) != 0) {
-			if (w instanceof CTabFolder || w instanceof StyledText || w instanceof List || w instanceof Text || w instanceof Table || w instanceof Tree) {
-				result += "MULTI | ";
-			} else if (w instanceof Menu) {
-				result += "BAR | ";
-			} else if (w instanceof Label || w instanceof MenuItem || w instanceof ToolItem) {
-				result += "SEPARATOR | ";
-			} else if (w instanceof Button) {
-				result += "TOGGLE | ";
-			} else if (w instanceof ProgressBar) {
-				result += "INDETERMINATE | ";
-			} else {
-				result += "BAR or SEPARATOR or TOGGLE or MULTI or INDETERMINATE or DBCS | ";	
-			}
-		}
-		if ((style & 1 << 2) != 0) {
-			if (w instanceof Menu || w instanceof ToolItem || w instanceof CoolItem || w instanceof Combo) {
-				result += "DROP_DOWN | ";
-			} else if (w instanceof Button) {
-				result += "ARROW | ";
-			} else if (w instanceof CTabFolder || w instanceof StyledText || w instanceof List || w instanceof Text || w instanceof Table || w instanceof Tree) {
-				result += "SINGLE | ";
-			} else if (w instanceof Label || w instanceof Group) {
-				result += "SHADOW_IN | ";
-			} else if (w instanceof Decorations) {
-				result += "TOOL | ";
-			} else {
-				result += "ALPHA or TOOL or SINGLE or ARROW or DROP_DOWN or SHADOW_IN | ";
-			}
-		}
-		if ((style & 1 << 3) != 0) {
-			if (w instanceof Menu) {
-				result += "POP_UP | ";
-			} else if (w instanceof Button || w instanceof MenuItem || w instanceof ToolItem) {
-				result += "PUSH | ";
-			} else if (w instanceof Combo || w instanceof Text || w instanceof StyledText) {
-				result += "READ_ONLY | ";
-			} else if (w instanceof Label || w instanceof Group || w instanceof ToolBar) {
-				result += "SHADOW_OUT | ";
-			} else if (w instanceof Decorations) {
-				result += "NO_TRIM | ";	
-			} else {
-				result += "POP_UP or PUSH or READ_ONLY or SHADOW_OUT or NO_TRIM or NATIVE | ";
-			}
-		}
-		if ((style & 1 << 4) != 0) {
-			if (w instanceof Button || w instanceof MenuItem || w instanceof ToolItem) {
-				result += "RADIO | ";
-			} else if (w instanceof Group) {
-				result += "SHADOW_ETCHED_IN | ";
-			} else if (w instanceof Decorations || w instanceof Tracker) {
-				result += "RESIZE | ";
-			} else {
-				result += "RESIZE or SHADOW_ETCHED_IN or RADIO or PHONETIC | ";
-			}
-		}
-		if ((style & 1 << 5) != 0) {
-			if (w instanceof Button || w instanceof MenuItem || w instanceof ToolItem || w instanceof Table || w instanceof Tree) {
-				result += "CHECK | ";
-			} else if (w instanceof Label || w instanceof Group) {
-				result += "SHADOW_NONE | ";
-			} else if (w instanceof Decorations) {
-				result += "TITLE | ";
-			} else if (w instanceof DateTime) {
-				result += "DATE | ";
-			} else {
-				result += "ROMAN or CHECK  or SHADOW_NONE or TITLE | ";
-			}
-		}
-		if ((style & 1 << 6) != 0) {
-			if (w instanceof MenuItem) {
-				result += "CASCADE | ";
-			} else if (w instanceof StyledText || w instanceof Label || w instanceof Text || w instanceof ToolBar) {
-				result += "WRAP | ";
-			} else if (w instanceof Combo) {
-				result += "SIMPLE | ";
-			} else if (w instanceof Group) {
-				result += "SHADOW_ETCHED_OUT | ";
-			} else if (w instanceof Decorations || w instanceof CTabFolder || w instanceof CTabItem) {
-				result += "CLOSE | ";
-			} else {
-				result += "CLOSE or MENU or CASCADE or WRAP or SIMPLE or SHADOW_ETCHED_OUT | ";
-			}
-		}
-		if ((style & 1 << 7) != 0) {
-			if (w instanceof Decorations) {
-				result += "MIN | ";
-			} else if (w instanceof Button || w instanceof Tracker) {
-				result += "UP | ";
-			} else if (w instanceof CTabFolder) {
-				result += "TOP | ";
-			} else if (w instanceof DateTime) {
-				result += "TIME | ";
-			} else {
-				result += "MIN or UP or TOP | ";
-			}
-		}
-		if ((style & 1 << 8) != 0) {
-			result += "HORIZONTAL | ";
-		}
-		if ((style & 1 << 9) != 0) {
-			result += "VERTICAL | ";
-		}
-		if ((style & 1 << 10) != 0) {
-			if (w instanceof Decorations) {
-				result += "MAX | ";
-			} else if (w instanceof Button || w instanceof Tracker) {
-				result += "DOWN | ";
-			} else if (w instanceof CTabFolder) {
-				result += "BOTTOM | ";
-			} else if (w instanceof DateTime) {
-				result += "CALENDAR | ";
-			} else {
-				result += "MAX or DOWN or BOTTOM | ";
-			}
-		}
-		if ((style & 1 << 11) != 0) {
-			result += "BORDER | ";
-		}
-		if ((style & 1 << 12) != 0) {
-			if (w instanceof ToolTip) {
-				result += "BALLOON | ";
-			} else {
-				result += "CLIP_CHILDREN | ";
-			}
-		}
-		if ((style & 1 << 13) != 0) {
-			result += "CLIP_SIBLINGS | ";
-		}
-		if ((style & 1 << 14) != 0) {
-			result += "ON_TOP or LEAD or LEFT | ";
-		}
-		if ((style & 1 << 15) != 0) {
-			if (w instanceof Shell) {
-				result += "PRIMARY_MODAL | ";
-			} else if (w instanceof Table || w instanceof Tree) {
-				result += "HIDE_SELECTION | ";
-			} else if (w instanceof DateTime) {
-				result += "SHORT | ";
-			} else {
-				result += "PRIMARY_MODAL or HIDE_SELECTION | ";
-			}
-		}
-		if ((style & 1 << 16) != 0) {
-			if (w instanceof StyledText || w instanceof Table || w instanceof Tree) {
-				result += "FULL_SELECTION | ";
-			} else if (w instanceof Shell) {
-				result += "APPLICATION_MODAL | ";
-			} else if (w instanceof ProgressBar) {
-				result += "SMOOTH | ";
-			} else if (w instanceof DateTime) {
-				result += "MEDIUM | ";
-			} else {
-				result += "FULL_SELECTION or SMOOTH or APPLICATION_MODAL | ";
-			}
-		}
-		if ((style & 1 << 17) != 0) {
-			if (w instanceof Shell) {
-				result += "SYSTEM_MODAL | ";
-			} else if (w instanceof Button || w instanceof Label || w instanceof TableColumn || w instanceof Tracker || w instanceof ToolBar) {
-				result += "TRAIL | ";
-			} else {
-				result += "SYSTEM_MODAL or TRAIL or RIGHT | ";
-			}
-		}
-		if ((style & 1 << 18) != 0) {
-			result += "NO_BACKGROUND | ";
-		}
-		if ((style & 1 << 19) != 0) {
-			result += "NO_FOCUS | ";
-		}
-		if ((style & 1 << 20) != 0) {
-			result += "NO_REDRAW_RESIZE | ";
-		}
-		if ((style & 1 << 21) != 0) {
-			result += "NO_MERGE_PAINTS | ";
-		}
-		if ((style & 1 << 22) != 0) {
-			if (w instanceof Text) {
-				result += "PASSWORD | ";
-			} else if (w instanceof Composite) {
-				result += "NO_RADIO_GROUP | ";
-			} else {
-				result += "NO_RADIO_GROUP or PASSWORD | ";
-			}
-		}
-		if ((style & 1 << 23) != 0) {
-			result += "FLAT | ";
-		}
-		if ((style & 1 << 24) != 0) {
-			if (w instanceof Button || w instanceof Label || w instanceof TableColumn) {
-				result += "CENTER | ";
-			} else {
-				result += "EMBEDDED or CENTER | ";
-			}
-		}
-		if ((style & 1 << 25) != 0) {
-			result += "LEFT_TO_RIGHT | ";
-		}
-		if ((style & 1 << 26) != 0) {
-			result += "RIGHT_TO_LEFT | ";
-		}
-		if ((style & 1 << 27) != 0) {
-			result += "MIRRORED | ";
-		}
-		if ((style & 1 << 28) != 0) {
-			if (w instanceof DateTime) {
-				result += "LONG | ";
-			} else {
-				result += "VIRTUAL | ";
-			}
-		}
-		if ((style & 1 << 29) != 0) {
-			result += "DOUBLE_BUFFERED | ";
-		}
-		int lastOr = result.lastIndexOf("|");
-		if (lastOr == result.length() - 2 ) result = result.substring(0, result.length() - 2);
-		return result;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.swt.tools/templates/jnitemplates.properties b/eclipse/plugins/org.eclipse.swt.tools/templates/jnitemplates.properties
deleted file mode 100644
index e69de29..0000000
diff --git a/eclipse/plugins/org.eclipse.swt.tools/templates/jnitemplates.xml b/eclipse/plugins/org.eclipse.swt.tools/templates/jnitemplates.xml
deleted file mode 100644
index 992f444..0000000
--- a/eclipse/plugins/org.eclipse.swt.tools/templates/jnitemplates.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<templates>
-	<template id="org.eclipse.swt.tools.templates.jniclass" autoinsert="true" context="java" deleted="false" description="" enabled="true" name="jniclass">/** @jniclass flags=${flags:link(no_gen,cpp)} */</template>
-	<template id="org.eclipse.swt.tools.templates.jnifield" autoinsert="true" context="java" deleted="false" description="" enabled="true" name="jnifield">/** @field accessor=${},flags=${flags:link(no_gen,no_wince)} */</template>
-	<template id="org.eclipse.swt.tools.templates.jnimethod" autoinsert="true" context="java" deleted="false" description="" enabled="true" name="jnimethod">/** @method accessor=${},flags=${flags:link(no_gen, address, const, 'const address', dynamic, jni, cast, cpp, 'no_gen cpp', new, 'no_gen new', delete, gcnew, gcobject, setter, getter, adder)} */</template>
-	<template id="org.eclipse.swt.tools.templates.jniparam" autoinsert="true" context="java" deleted="false" description="" enabled="true" name="jniparam">/** @param ${} cast=(${cursor}),flags=${flags:link(no_int,no_out,critical,init,struct,unicode,sentinel,gcobject,'no_in critical','no_out critical')} */</template>
-</templates>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/META-INF/MANIFEST.MF
index c8b539c..0fcc182 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.win32.wce_ppc.arm; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/build.xml b/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/build.xml
index 79e0b73..fafdbc4 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.win32.wce_ppc.arm/build.xml
@@ -1,254 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.win32.wce_ppc.arm" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="win32" />
-		<property name="os" value="wce_ppc" />
-		<property name="arch" value="arm" />
-		<property name="fragment" value="org.eclipse.swt.win32.wce_ppc.arm" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="on" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/win32/" />
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/win32/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT OLE Win32/win32/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/win32/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/win32/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/win32/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/win32/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/win32/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/win32/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Browser/win32/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
+	<property name="swt.ws" value="win32" />
+	<property name="swt.os" value="wce_ppc" />
+	<property name="swt.arch" value="arm" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
 
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 
 	<target name="swtdownload" depends="init">
 		<ant inheritAll="false" antfile="build_custom.xml" target="swtdownload">
@@ -258,53 +18,4 @@
 		</ant>
 	</target>
 
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.win32.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.win32.win32.x86/META-INF/MANIFEST.MF
index 81abcc2..ceec371 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.win32.x86/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.win32.win32.x86/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.win32.win32.x86; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.win32.win32.x86/build.xml b/eclipse/plugins/org.eclipse.swt.win32.win32.x86/build.xml
index ffe2c3d..fa087fe 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.win32.x86/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.win32.win32.x86/build.xml
@@ -1,365 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.win32.win32.x86" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="win32" />
-		<property name="os" value="win32" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.win32.win32.x86" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/win32/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/win32/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/win32/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Browser/win32/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/common/" />
-			<src path="${plugindir}/Eclipse SWT Mozilla/win32/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/win32/" />
-			<src path="${plugindir}/Eclipse SWT OLE Win32/win32/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/win32/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/win32/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/win32/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/win32/" />
-			<src path="${plugindir}/Eclipse SWT Theme/win32/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties,**/*.idl" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/components/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Mozilla/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin.xml" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
+	<property name="swt.ws" value="win32" />
+	<property name="swt.os" value="win32" />
+	<property name="swt.arch" value="x86" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
 </project>
diff --git a/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/META-INF/MANIFEST.MF
index fa33597..41e9e9f 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.win32.win32.x86_64; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: fragment
 Export-Package: 
diff --git a/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml b/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml
index 41c8bb4..b45aeec 100644
--- a/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml
+++ b/eclipse/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml
@@ -1,397 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="org.eclipse.swt.win32.win32.x86_64" default="build.jars" basedir=".">
 
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="win32" />
-		<property name="os" value="win32" />
-		<property name="arch" value="x86_64" />
-		<property name="fragment" value="org.eclipse.swt.win32.win32.x86_64" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="temp.folder.64" value="${basedir}/temp.folder/64" />
-		<property name="toolsplugindir" value="../org.eclipse.swt.tools" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		<!--compile the jar in org.eclipse.swt.tools-->
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${basedir}/src/Eclipse SWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/common/" />
-			<src path="${basedir}/src/Eclipse SWT Accessibility/win32/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/common/" />
-			<src path="${basedir}/src/Eclipse SWT AWT/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/common/" />
-			<src path="${basedir}/src/Eclipse SWT Browser/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/common/" />
-			<src path="${basedir}/src/Eclipse SWT Mozilla/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Custom Widgets/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/common/" />
-			<src path="${basedir}/src/Eclipse SWT Drag and Drop/win32/" />
-			<src path="${basedir}/src/Eclipse SWT OLE Win32/win32/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/win32/" />
-			<src path="${basedir}/src/Eclipse SWT OpenGL/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common_j2se/" />
-			<src path="${basedir}/src/Eclipse SWT PI/common/" />
-			<src path="${basedir}/src/Eclipse SWT PI/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/common/" />
-			<src path="${basedir}/src/Eclipse SWT Printing/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Program/common/" />
-			<src path="${basedir}/src/Eclipse SWT Program/win32/" />
-			<src path="${basedir}/src/Eclipse SWT Theme/win32/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OLE Win32/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/win32/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<available property="source.present" file="${basedir}/src" type="dir" />
-		<antcall target="copy.source" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="copy.source" unless="source.present">
-		<echo>Copying source from org.eclipse.swt project to folder ${basedir}/src folder ${temp.folder}.</echo>
-		<delete dir="${basedir}/src" />
-		<mkdir dir="${basedir}/src" />
-
-		<!-- Copy the existing 32 bit SWT source folders to the 64 bit source folder -->
-		<copy todir="${basedir}/src">
-			<fileset dir="${plugindir}" includes="Eclipse*/**" />
-		</copy>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${basedir}/src" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-	</target>
-
-	<target name="replace.32.to.64" depends="init">
-		<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 32 bit java source to 64 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="int /*long*/" value="long /*int*/" />
-
-	</target>
-
-	<target name="replace.64.to.32" depends="init">
-		<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-		<!-- Convert SWT 64 bit java source to 32 bit  -->
-		<replace dir="${plugindir}" includes="**/*.java" token="long /*int*/" value="int /*long*/" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Accessibility/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT AWT/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Browser/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Drag and Drop/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OLE Win32/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT PI/win32/library/" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Printing/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Program/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT Theme/win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${basedir}/src/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-			<fileset dir="${basedir}" includes="about.html" />
-			<fileset dir="${basedir}" includes="about_files/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin${logExtension}" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
+	<property name="swt.ws" value="win32" />
+	<property name="swt.os" value="win32" />
+	<property name="swt.arch" value="x86_64" />
+	
+	<!-- These properties are used by eclipse when exporting as Deployable plugin and fragments -->
+	<property name="version.suffix" value="3.6.2" />
+	
+	<import file="../org.eclipse.swt/buildFragment.xml"/>
+</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/.project b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/.project
deleted file mode 100644
index 24a3247..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.swt.wpf.win32.x86</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/META-INF/MANIFEST.MF
deleted file mode 100644
index c642ceb..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)"
-Bundle-Name: %fragmentName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.swt.wpf.win32.x86;singleton:=true
-Bundle-Version: 3.5.2.qualifier
-Bundle-ManifestVersion: 2
-Bundle-Localization: fragment
-Export-Package: 
- org.eclipse.swt.internal.wpf; x-internal:=true
-Eclipse-PlatformFilter: (& (osgi.ws=wpf) (osgi.os=win32) (osgi.arch=x86))
-Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,
- J2SE-1.3
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/about.html b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/about.html
deleted file mode 100644
index 0973f70..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/about.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>Permission is hereby granted, free of charge, to any person  obtaining a copy of this software and associated documentation files  (the "Software"), to deal in the Software without restriction,  including without limitation the rights to use, copy, modify, merge,  publish, distribute, sublicense, and/or sell copies of the Software,  and to permit persons to whom the Software is furnished to do so,  subject to the following conditions:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND  NONINFRINGEMENT.  IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR ANY  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.properties b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.properties
deleted file mode 100644
index dfe1069..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-custom = true
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.xml b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.xml
deleted file mode 100644
index 7b01875..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/build.xml
+++ /dev/null
@@ -1,373 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.swt.wpf.win32.x86" default="build.jars" basedir=".">
-
-	<target name="init" depends="properties">
-		<property name="compilerArg" value="" />
-		<property name="ws" value="wpf" />
-		<property name="os" value="win32" />
-		<property name="arch" value="x86" />
-		<property name="fragment" value="org.eclipse.swt.wpf.win32.x86" />
-		<property name="version.suffix" value="3.5.0" />
-		<property name="full.name" value="${fragment}_${version.suffix}" />
-		<property name="temp.folder" value="${basedir}/temp.folder" />
-		<property name="plugin.destination" value="${basedir}" />
-		<property name="build.result.folder" value="${basedir}" />
-		<property name="destination" value="${basedir}" />
-		<property name="plugindir" value="../org.eclipse.swt" />
-		<property name="bootclasspath" value="" />
-		<property name="javacVerbose" value="false" />
-		<property name="logExtension" value=".xml" />
-		<property name="javacSource" value="1.3" />
-		<property name="javacTarget" value="1.2" />
-		<path id="path_bootclasspath">
-			<fileset dir="${java.home}/lib">
-				<include name="*.jar" />
-			</fileset>
-		</path>
-		<property name="bootclasspath" refid="path_bootclasspath" />
-		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
-			<isset property="CDC-1.0/Foundation-1.0" />
-		</condition>
-		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
-			<isset property="J2SE-1.3" />
-		</condition>
-		<property name="bundleJavacSource" value="${javacSource}" />
-		<property name="bundleJavacTarget" value="${javacTarget}" />
-		<property name="bundleBootClasspath" value="${bootclasspath}" />
-		<condition property="p2.publish.parts" value="true">
-			<istrue value="${p2.gathering}" />
-		</condition>
-	</target>
-
-	<target name="properties" if="eclipse.running">
-		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
-	</target>
-
-	<target name="build.update.jar" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
-		<property name="destdir" value="${temp.folder}/@dot.bin" />
-		<property name="debug" value="true" />
-		<property name="jar.filename" value="swt.jar" />
-		<delete dir="${temp.folder}/@dot.bin" />
-		<mkdir dir="${temp.folder}/@dot.bin" />
-		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
-			<src path="${plugindir}/Eclipse SWT/common/" />
-			<src path="${plugindir}/Eclipse SWT/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT/wpf/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/datetime/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/bidi/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/tooltip/" />
-			<src path="${plugindir}/Eclipse SWT/emulated/ime/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/common/" />
-			<src path="${plugindir}/Eclipse SWT Accessibility/emulated/" />
-			<src path="${plugindir}/Eclipse SWT AWT/common/" />
-			<src path="${plugindir}/Eclipse SWT AWT/emulated/" />
-			<src path="${plugindir}/Eclipse SWT Browser/common/" />
-			<src path="${plugindir}/Eclipse SWT Browser/forms/" />
-			<src path="${plugindir}/Eclipse SWT Custom Widgets/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/common/" />
-			<src path="${plugindir}/Eclipse SWT Drag and Drop/wpf/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/emulated/" />
-			<src path="${plugindir}/Eclipse SWT OpenGL/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/common_j2se/" />
-			<src path="${plugindir}/Eclipse SWT PI/common/" />
-			<src path="${plugindir}/Eclipse SWT PI/wpf/" />
-			<src path="${plugindir}/Eclipse SWT PI/wpf_win32/" />
-			<src path="${plugindir}/Eclipse SWT Printing/common/" />
-			<src path="${plugindir}/Eclipse SWT Printing/wpf/" />
-			<src path="${plugindir}/Eclipse SWT Program/common/" />
-			<src path="${plugindir}/Eclipse SWT Program/wpf/" />
-			<src path="${plugindir}/Eclipse SWT Theme/emulated/" />
-			<src path="${plugindir}/Eclipse SWT Effects/emulated/" />
-			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
-		</javac>
-		<property name="includes" value="" />
-		<property name="excludes" value="**/*.java,**/library/,**/package.htm*,**/*._properties" />
-		<copy todir="${temp.folder}/@dot.bin">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/wpf/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/forms/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/wpf/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/wpf/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/wpf/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="${includes}" excludes="${excludes}" />
-			<fileset dir="${plugindir}/Eclipse SWT Effects/emulated/" includes="${includes}" excludes="${excludes}" />
-		</copy>
-		<antcall target="copy.translationfiles" />
-
-		<mkdir dir="${build.result.folder}/@dot" />
-		<copy todir="${build.result.folder}/@dot" failonerror="true">
-			<fileset dir="${temp.folder}/@dot.bin" />
-		</copy>
-		<!-- prepare a jar file solely for the download target -->
-		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
-		<delete dir="${temp.folder}/@dot.bin" />
-	</target>
-
-	<target name="build.jars" depends="init">
-		<available property="@dot" file="${build.result.folder}/@dot" />
-		<antcall target="@dot" />
-	</target>
-
-	<target name="src.zip" depends="init" unless="src.zip">
-		<mkdir dir="${build.result.folder}/" />
-		<zip zipfile="${build.result.folder}/src.zip">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/forms/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Effects/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</zip>
-	</target>
-
-	<target name="copy.src" depends="init">
-		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT AWT/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Browser/forms/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/common/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/library/" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Printing/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/common/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Program/wpf/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/" includes="**/*.java" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*.properties" excludes="" />
-			<fileset dir="${plugindir}/Eclipse SWT/common/" includes="**/version.txt" excludes="" />
-			<fileset dir="${basedir}" includes="about.html,about_files/" excludes="" />
-		</copy>
-	</target>
-
-	<target name="build.sources" depends="init">
-		<available property="src.zip" file="${build.result.folder}/src.zip" />
-		<antcall target="src.zip" />
-	</target>
-
-	<target name="build.zips" depends="init">
-	</target>
-
-	<target name="gather.sources" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.individual.sources" depends="init">
-		<antcall target="copy.src" />
-		<copy todir="${destination.temp.folder}">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-		</copy>
-	</target>
-
-	<target name="gather.logs" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
-	</target>
-
-	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${build.result.folder}" />
-		</antcall>
-		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
-	</target>
-
-	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
-		<mkdir dir="${destination.temp.folder}/${full.name}" />
-		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
-			<fileset dir="${build.result.folder}/@dot" includes="**" />
-		</copy>
-		<copy todir="${destination.temp.folder}/${full.name}">
-			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,META-INF/" />
-		</copy>
-		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib" />
-		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
-		<antcall target="apitools.generation">
-			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
-			<param name="projectLocation" value="${basedir}"/>
-			<param name="binary.folders" value="${build.result.folder}/@dot"/>
-			<param name="projectName" value="${full.name}"/>
-			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
-			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
-		</antcall>
-	</target>
-
-	<target name="swtdownload" depends="init">
-		<delete dir="${temp.folder}" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- ensure entry into @dot target -->
-		<mkdir dir="${temp.folder}/swtdownload/" />
-		<property name="includetranslationfiles" value="true" />
-		<antcall target="build.jars">
-			<param name="debug" value="true" />
-			<param name="jar.filename" value="swt-debug.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
-		<delete dir="${build.result.folder}/@dot" />
-		<!-- this is needed to re-enter @dot -->
-		<antcall target="build.jars">
-			<param name="debug" value="false" />
-			<param name="jar.filename" value="swt.jar" />
-		</antcall>
-		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
-		<antcall target="build.sources" />
-		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
-		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
-		<copy todir="${temp.folder}/swtdownload">
-			<fileset dir="${basedir}" includes="about.html,about_files/" />
-			<fileset dir="${basedir}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
-		</copy>
-		<chmod dir="${temp.folder}/swtdownload" perm="755" includes="**/lib*" />
-		<zip zipfile="${destination}/swt-${buildid}-${ws}-${os}-${arch}.zip">
-			<zipfileset dir="${temp.folder}/swtdownload/" prefix="swt-${buildid}-${ws}-${os}-${arch}" />
-		</zip>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="clean" depends="init">
-		<delete dir="${build.result.folder}/@dot" />
-		<delete file="${build.result.folder}/src.zip" />
-		<delete file="${plugin.destination}/${full.name}.jar" />
-		<delete file="${plugin.destination}/${full.name}.zip" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="refresh" depends="init" if="eclipse.running">
-		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
-	</target>
-
-	<target name="zip.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="build.sources" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<antcall target="gather.sources">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<delete>
-			<fileset dir="${temp.folder}" includes="**/*.bin.xml" />
-		</delete>
-		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="copy.translationfiles" if="includetranslationfiles">
-		<copy todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties" excludes="" />
-		</copy>
-		<move todir="${temp.folder}/@dot.bin" overwrite="true">
-			<fileset dir="${temp.folder}/@dot.bin/" includes="**/*._properties" excludes="" />
-			<mapper type="glob" from="*._properties" to="*.properties" />
-		</move>
-	</target>
-
-	<target name="jar.plugin" depends="init">
-		<delete dir="${temp.folder}" />
-		<mkdir dir="${temp.folder}" />
-		<antcall target="build.jars" />
-		<antcall target="gather.bin.parts">
-			<param name="destination.temp.folder" value="${temp.folder}/" />
-		</antcall>
-		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
-		<delete dir="${temp.folder}" />
-	</target>
-
-	<target name="apitools.generation" if="generateAPIDescription">
-		<apitooling.apigeneration
-			projectName="${projectName}"
-			project="${projectLocation}"
-			binary="${binary.folders}"
-			target="${target.folder}"
-			extraManifests="${extraManifests}"
-			extraSourceLocations="${extraSourceLocations}"/>
-	</target>
-</project>
diff --git a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/fragment.properties b/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/fragment.properties
deleted file mode 100644
index 2bc7b6b..0000000
--- a/eclipse/plugins/org.eclipse.swt.wpf.win32.x86/fragment.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-fragmentName = Standard Widget Toolkit for Windows
-providerName = Eclipse.org
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_carbon b/eclipse/plugins/org.eclipse.swt/.classpath_carbon
index 5b41c94..cdb68d6 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_carbon
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_carbon
@@ -7,6 +7,7 @@
     <classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT PI/common"/>
     <classpathentry kind="src" path="Eclipse SWT PI/carbon">
 	    <attributes>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_carbon_j2me b/eclipse/plugins/org.eclipse.swt/.classpath_carbon_j2me
index a6ac44c..22cc82f 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_carbon_j2me
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_carbon_j2me
@@ -6,6 +6,7 @@
     <classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/tray"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT/common"/>
     <classpathentry kind="src" path="Eclipse SWT/common_j2me"/>
     <classpathentry kind="src" path="Eclipse SWT PI/common"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_gtk b/eclipse/plugins/org.eclipse.swt/.classpath_gtk
index d49778a..a455a20 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_gtk
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_gtk
@@ -5,6 +5,7 @@
 	<classpathentry kind="src" path="Eclipse SWT/cairo"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
 	<classpathentry kind="src" path="Eclipse SWT/common"/>
 	<classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
 	<classpathentry kind="src" path="Eclipse SWT PI/gtk">
@@ -35,6 +36,7 @@
 	<classpathentry kind="src" path="Eclipse SWT OpenGL/glx"/>
 	<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
 	<classpathentry kind="src" path="Eclipse SWT Theme/gtk"/>
+	<classpathentry kind="src" path="Eclipse SWT WebKit/gtk"/>
 	<classpathentry kind="lib" path="extra_jars/exceptions.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_gtk_j2me b/eclipse/plugins/org.eclipse.swt/.classpath_gtk_j2me
index edb1b63..c715d37 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_gtk_j2me
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_gtk_j2me
@@ -4,6 +4,7 @@
     <classpathentry kind="src" path="Eclipse SWT/gtk"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/coolbar"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT/common"/>
     <classpathentry kind="src" path="Eclipse SWT/common_j2me"/>
     <classpathentry kind="src" path="Eclipse SWT PI/common"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_motif b/eclipse/plugins/org.eclipse.swt/.classpath_motif
index db459db..42051eb 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_motif
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_motif
@@ -12,6 +12,7 @@
 	<classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/ime"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
 	<classpathentry kind="src" path="Eclipse SWT/common"/>
 	<classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
 	<classpathentry kind="src" path="Eclipse SWT PI/motif">
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_motif_j2me b/eclipse/plugins/org.eclipse.swt/.classpath_motif_j2me
index bb3e94a..c653b03 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_motif_j2me
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_motif_j2me
@@ -11,6 +11,7 @@
     <classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/ime"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT/common"/>
     <classpathentry kind="src" path="Eclipse SWT/common_j2me"/>
     <classpathentry kind="src" path="Eclipse SWT PI/common"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_photon b/eclipse/plugins/org.eclipse.swt/.classpath_photon
index 4f3d4fa..3c7f884 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_photon
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_photon
@@ -12,6 +12,7 @@
 	<classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/ime"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
 	<classpathentry kind="src" path="Eclipse SWT/common"/>
 	<classpathentry kind="src" path="Eclipse SWT/common_j2se"/>
 	<classpathentry kind="src" path="Eclipse SWT PI/common"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_photon_j2me b/eclipse/plugins/org.eclipse.swt/.classpath_photon_j2me
index 4005c9a..ab62dee 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_photon_j2me
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_photon_j2me
@@ -11,6 +11,7 @@
 	<classpathentry kind="src" path="Eclipse SWT/emulated/expand"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/ime"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT/common"/>
     <classpathentry kind="src" path="Eclipse SWT/common_j2me"/>
     <classpathentry kind="src" path="Eclipse SWT PI/common"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.classpath_wpf b/eclipse/plugins/org.eclipse.swt/.classpath_wpf
index 3ecce1f..9d2426f 100644
--- a/eclipse/plugins/org.eclipse.swt/.classpath_wpf
+++ b/eclipse/plugins/org.eclipse.swt/.classpath_wpf
@@ -16,6 +16,7 @@
 	<classpathentry kind="src" path="Eclipse SWT/emulated/bidi"/>
 	<classpathentry kind="src" path="Eclipse SWT/emulated/tooltip"/>
     <classpathentry kind="src" path="Eclipse SWT/emulated/ime"/>
+    <classpathentry kind="src" path="Eclipse SWT/emulated/taskbar"/>
     <classpathentry kind="src" path="Eclipse SWT Accessibility/emulated"/>
     <classpathentry kind="src" path="Eclipse SWT Accessibility/common"/>
     <classpathentry kind="src" path="Eclipse SWT AWT/emulated"/>
diff --git a/eclipse/plugins/org.eclipse.swt/.settings/.api_filters b/eclipse/plugins/org.eclipse.swt/.settings/.api_filters
index 83bb5c8..c341e5a 100644
--- a/eclipse/plugins/org.eclipse.swt/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.swt/.settings/.api_filters
@@ -1,850 +1,1318 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.swt" version="2">
-<resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java" type="org.eclipse.swt.accessibility.AccessibleControlListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="AccessibleControlListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java" type="org.eclipse.swt.accessibility.AccessibleListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="AccessibleListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextListener.java" type="org.eclipse.swt.accessibility.AccessibleTextListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="AccessibleTextListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/AuthenticationListener.java" type="org.eclipse.swt.browser.AuthenticationListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="AuthenticationListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java" type="org.eclipse.swt.browser.Browser">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.browser.Browser"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/CloseWindowListener.java" type="org.eclipse.swt.browser.CloseWindowListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="CloseWindowListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java" type="org.eclipse.swt.browser.LocationListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="LocationListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/OpenWindowListener.java" type="org.eclipse.swt.browser.OpenWindowListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="OpenWindowListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/ProgressListener.java" type="org.eclipse.swt.browser.ProgressListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ProgressListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/StatusTextListener.java" type="org.eclipse.swt.browser.StatusTextListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="StatusTextListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/TitleListener.java" type="org.eclipse.swt.browser.TitleListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="TitleListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/VisibilityWindowListener.java" type="org.eclipse.swt.browser.VisibilityWindowListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="VisibilityWindowListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentListener.java" type="org.eclipse.swt.custom.BidiSegmentListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="BidiSegmentListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java" type="org.eclipse.swt.custom.CBanner">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.CBanner"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java" type="org.eclipse.swt.custom.CLabel">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.CLabel"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java" type="org.eclipse.swt.custom.CTabFolder">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.CTabFolder"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder2Listener.java" type="org.eclipse.swt.custom.CTabFolder2Listener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="CTabFolder2Listener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderListener.java" type="org.eclipse.swt.custom.CTabFolderListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="CTabFolderListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java" type="org.eclipse.swt.custom.CTabItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.CTabItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CaretListener.java" type="org.eclipse.swt.custom.CaretListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="CaretListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ExtendedModifyListener.java" type="org.eclipse.swt.custom.ExtendedModifyListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ExtendedModifyListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineBackgroundListener.java" type="org.eclipse.swt.custom.LineBackgroundListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="LineBackgroundListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleListener.java" type="org.eclipse.swt.custom.LineStyleListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="LineStyleListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MovementListener.java" type="org.eclipse.swt.custom.MovementListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MovementListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PaintObjectListener.java" type="org.eclipse.swt.custom.PaintObjectListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="PaintObjectListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java" type="org.eclipse.swt.custom.StyleRange">
-<filter id="576725006">
-<message_arguments>
-<message_argument value="CloneableCompatibility"/>
-<message_argument value="StyleRange"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java" type="org.eclipse.swt.custom.StyledText">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.StyledText"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TextChangeListener.java" type="org.eclipse.swt.custom.TextChangeListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="TextChangeListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/VerifyKeyListener.java" type="org.eclipse.swt.custom.VerifyKeyListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="VerifyKeyListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java" type="org.eclipse.swt.custom.ViewForm">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.custom.ViewForm"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceListener.java" type="org.eclipse.swt.dnd.DragSourceListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="DragSourceListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java" type="org.eclipse.swt.dnd.DropTargetListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="DropTargetListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java" type="org.eclipse.swt.dnd.Clipboard">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.dnd.Clipboard"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java" type="org.eclipse.swt.dnd.DragSource">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.dnd.DragSource"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java" type="org.eclipse.swt.dnd.DropTarget">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.dnd.DropTarget"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java" type="org.eclipse.swt.ole.win32.OleControlSite">
-<filter id="1227882500">
-<message_arguments>
-<message_argument value="OnUIDeactivate(int)"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java" type="org.eclipse.swt.ole.win32.Variant">
-<filter id="389242988">
-<message_arguments>
-<message_argument value="org.eclipse.swt.ole.win32.Variant"/>
-<message_argument value="sizeof"/>
-<message_argument value="16"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java" type="org.eclipse.swt.printing.PrintDialog">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.printing.PrintDialog"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ArmListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/ControlListener.java" type="org.eclipse.swt.events.ControlListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ControlListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/DisposeListener.java" type="org.eclipse.swt.events.DisposeListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="DisposeListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java" type="org.eclipse.swt.events.DragDetectListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="DragDetectListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/ExpandListener.java" type="org.eclipse.swt.events.ExpandListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ExpandListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/FocusListener.java" type="org.eclipse.swt.events.FocusListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="FocusListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/HelpListener.java" type="org.eclipse.swt.events.HelpListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="HelpListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/KeyListener.java" type="org.eclipse.swt.events.KeyListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="KeyListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MenuDetectListener.java" type="org.eclipse.swt.events.MenuDetectListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MenuDetectListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MenuListener.java" type="org.eclipse.swt.events.MenuListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MenuListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/ModifyListener.java" type="org.eclipse.swt.events.ModifyListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ModifyListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseListener.java" type="org.eclipse.swt.events.MouseListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MouseListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseMoveListener.java" type="org.eclipse.swt.events.MouseMoveListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MouseMoveListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseTrackListener.java" type="org.eclipse.swt.events.MouseTrackListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MouseTrackListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseWheelListener.java" type="org.eclipse.swt.events.MouseWheelListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="MouseWheelListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/PaintListener.java" type="org.eclipse.swt.events.PaintListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="PaintListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/SelectionListener.java" type="org.eclipse.swt.events.SelectionListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="SelectionListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/ShellListener.java" type="org.eclipse.swt.events.ShellListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ShellListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/TraverseListener.java" type="org.eclipse.swt.events.TraverseListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="TraverseListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/TreeListener.java" type="org.eclipse.swt.events.TreeListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="TreeListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/events/VerifyListener.java" type="org.eclipse.swt.events.VerifyListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="VerifyListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java" type="org.eclipse.swt.graphics.ImageData">
-<filter id="576725006">
-<message_arguments>
-<message_argument value="CloneableCompatibility"/>
-<message_argument value="ImageData"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/graphics/ImageLoaderListener.java" type="org.eclipse.swt.graphics.ImageLoaderListener">
-<filter id="576720909">
-<message_arguments>
-<message_argument value="SWTEventListener"/>
-<message_argument value="ImageLoaderListener"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/graphics/Point.java" type="org.eclipse.swt.graphics.Point">
-<filter id="576725006">
-<message_arguments>
-<message_argument value="SerializableCompatibility"/>
-<message_argument value="Point"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/graphics/RGB.java" type="org.eclipse.swt.graphics.RGB">
-<filter id="576725006">
-<message_arguments>
-<message_argument value="SerializableCompatibility"/>
-<message_argument value="RGB"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java" type="org.eclipse.swt.graphics.Rectangle">
-<filter id="576725006">
-<message_arguments>
-<message_argument value="SerializableCompatibility"/>
-<message_argument value="Rectangle"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java" type="org.eclipse.swt.widgets.Tray">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Tray"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java" type="org.eclipse.swt.graphics.GC">
-<filter id="338944126">
-<message_arguments>
-<message_argument value="org.eclipse.swt.graphics.GC"/>
-<message_argument value="getGCData()"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java" type="org.eclipse.swt.graphics.GCData">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.graphics.GCData"/>
-</message_arguments>
-</filter>
-<filter id="338755678">
-<message_arguments>
-<message_argument value="org.eclipse.swt.graphics.GCData"/>
-<message_argument value="hFont"/>
-</message_arguments>
-</filter>
-<filter id="1143996420">
-<message_arguments>
-<message_argument value="org.eclipse.swt.graphics.GCData"/>
-</message_arguments>
-</filter>
-<filter id="1143996420">
-<message_arguments>
-<message_argument value="hGDIFont"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java" type="org.eclipse.swt.widgets.Button">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Button"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java" type="org.eclipse.swt.widgets.Caret">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Caret"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java" type="org.eclipse.swt.widgets.ColorDialog">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ColorDialog"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java" type="org.eclipse.swt.widgets.Combo">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Combo"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java" type="org.eclipse.swt.widgets.Control">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Control"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java" type="org.eclipse.swt.widgets.CoolBar">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.CoolBar"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java" type="org.eclipse.swt.widgets.CoolItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.CoolItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java" type="org.eclipse.swt.widgets.DateTime">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.DateTime"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java" type="org.eclipse.swt.widgets.Decorations">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Decorations"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java" type="org.eclipse.swt.widgets.DirectoryDialog">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.DirectoryDialog"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Display"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java" type="org.eclipse.swt.widgets.ExpandBar">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ExpandBar"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java" type="org.eclipse.swt.widgets.ExpandItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ExpandItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java" type="org.eclipse.swt.widgets.FileDialog">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.FileDialog"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java" type="org.eclipse.swt.widgets.FontDialog">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.FontDialog"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java" type="org.eclipse.swt.widgets.Group">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Group"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java" type="org.eclipse.swt.widgets.IME">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.IME"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java" type="org.eclipse.swt.widgets.Label">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Label"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java" type="org.eclipse.swt.widgets.Link">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Link"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/List.java" type="org.eclipse.swt.widgets.List">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.List"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java" type="org.eclipse.swt.widgets.Menu">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Menu"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java" type="org.eclipse.swt.widgets.MenuItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.MenuItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java" type="org.eclipse.swt.widgets.MessageBox">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.MessageBox"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java" type="org.eclipse.swt.widgets.ProgressBar">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ProgressBar"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java" type="org.eclipse.swt.widgets.Sash">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Sash"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java" type="org.eclipse.swt.widgets.Scale">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Scale"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java" type="org.eclipse.swt.widgets.ScrollBar">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ScrollBar"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java" type="org.eclipse.swt.widgets.Scrollable">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Scrollable"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java" type="org.eclipse.swt.widgets.Slider">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Slider"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java" type="org.eclipse.swt.widgets.Spinner">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Spinner"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java" type="org.eclipse.swt.widgets.TabFolder">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TabFolder"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java" type="org.eclipse.swt.widgets.TabItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TabItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java" type="org.eclipse.swt.widgets.Table">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Table"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java" type="org.eclipse.swt.widgets.TableColumn">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TableColumn"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java" type="org.eclipse.swt.widgets.TableItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TableItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java" type="org.eclipse.swt.widgets.Text">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Text"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java" type="org.eclipse.swt.widgets.ToolBar">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ToolBar"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java" type="org.eclipse.swt.widgets.ToolItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ToolItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java" type="org.eclipse.swt.widgets.ToolTip">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.ToolTip"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java" type="org.eclipse.swt.widgets.Tracker">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Tracker"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java" type="org.eclipse.swt.widgets.TrayItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TrayItem"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java" type="org.eclipse.swt.widgets.Tree">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.Tree"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java" type="org.eclipse.swt.widgets.TreeColumn">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TreeColumn"/>
-</message_arguments>
-</filter>
-</resource>
-<resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java" type="org.eclipse.swt.widgets.TreeItem">
-<filter id="336744520">
-<message_arguments>
-<message_argument value="org.eclipse.swt.widgets.TreeItem"/>
-</message_arguments>
-</filter>
-</resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionListener.java" type="org.eclipse.swt.accessibility.AccessibleActionListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleActionListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeListener.java" type="org.eclipse.swt.accessibility.AccessibleAttributeListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleAttributeListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java" type="org.eclipse.swt.accessibility.AccessibleControlListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleControlListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkListener.java" type="org.eclipse.swt.accessibility.AccessibleHyperlinkListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleHyperlinkListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleListener.java" type="org.eclipse.swt.accessibility.AccessibleListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellListener.java" type="org.eclipse.swt.accessibility.AccessibleTableCellListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleTableCellListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableListener.java" type="org.eclipse.swt.accessibility.AccessibleTableListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleTableListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedListener.java" type="org.eclipse.swt.accessibility.AccessibleTextExtendedListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleTextExtendedListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextListener.java" type="org.eclipse.swt.accessibility.AccessibleTextListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleTextListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueListener.java" type="org.eclipse.swt.accessibility.AccessibleValueListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AccessibleValueListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java" type="org.eclipse.swt.accessibility.Accessible">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.accessibility.Accessible"/>
+                <message_argument value="internal_dispose_Accessible()"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.accessibility.Accessible"/>
+                <message_argument value="internal_new_Accessible(Control)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.accessibility.Accessible"/>
+                <message_argument value="internal_WM_GETOBJECT(int, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/AuthenticationListener.java" type="org.eclipse.swt.browser.AuthenticationListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="AuthenticationListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java" type="org.eclipse.swt.browser.Browser">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.browser.Browser"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/CloseWindowListener.java" type="org.eclipse.swt.browser.CloseWindowListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="CloseWindowListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/LocationListener.java" type="org.eclipse.swt.browser.LocationListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="LocationListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/OpenWindowListener.java" type="org.eclipse.swt.browser.OpenWindowListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="OpenWindowListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/ProgressListener.java" type="org.eclipse.swt.browser.ProgressListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ProgressListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/StatusTextListener.java" type="org.eclipse.swt.browser.StatusTextListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="StatusTextListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/TitleListener.java" type="org.eclipse.swt.browser.TitleListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="TitleListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Browser/common/org/eclipse/swt/browser/VisibilityWindowListener.java" type="org.eclipse.swt.browser.VisibilityWindowListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="VisibilityWindowListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentListener.java" type="org.eclipse.swt.custom.BidiSegmentListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="BidiSegmentListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java" type="org.eclipse.swt.custom.CBanner">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.CBanner"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java" type="org.eclipse.swt.custom.CLabel">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.CLabel"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java" type="org.eclipse.swt.custom.CTabFolder">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.CTabFolder"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder2Listener.java" type="org.eclipse.swt.custom.CTabFolder2Listener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="CTabFolder2Listener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderListener.java" type="org.eclipse.swt.custom.CTabFolderListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="CTabFolderListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java" type="org.eclipse.swt.custom.CTabItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.CTabItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CaretListener.java" type="org.eclipse.swt.custom.CaretListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="CaretListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ExtendedModifyListener.java" type="org.eclipse.swt.custom.ExtendedModifyListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ExtendedModifyListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineBackgroundListener.java" type="org.eclipse.swt.custom.LineBackgroundListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="LineBackgroundListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleListener.java" type="org.eclipse.swt.custom.LineStyleListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="LineStyleListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MovementListener.java" type="org.eclipse.swt.custom.MovementListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MovementListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/PaintObjectListener.java" type="org.eclipse.swt.custom.PaintObjectListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="PaintObjectListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyleRange.java" type="org.eclipse.swt.custom.StyleRange">
+        <filter id="576725006">
+            <message_arguments>
+                <message_argument value="CloneableCompatibility"/>
+                <message_argument value="StyleRange"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java" type="org.eclipse.swt.custom.StyledText">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.StyledText"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TextChangeListener.java" type="org.eclipse.swt.custom.TextChangeListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="TextChangeListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/VerifyKeyListener.java" type="org.eclipse.swt.custom.VerifyKeyListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="VerifyKeyListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java" type="org.eclipse.swt.custom.ViewForm">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.custom.ViewForm"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceListener.java" type="org.eclipse.swt.dnd.DragSourceListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="DragSourceListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java" type="org.eclipse.swt.dnd.DropTargetListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="DropTargetListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/Clipboard.java" type="org.eclipse.swt.dnd.Clipboard">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.Clipboard"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java" type="org.eclipse.swt.dnd.DragSource">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.DragSource"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java" type="org.eclipse.swt.dnd.DropTarget">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.DropTarget"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java" type="org.eclipse.swt.dnd.TransferData">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.TransferData"/>
+                <message_argument value="pIDataObject"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.TransferData"/>
+                <message_argument value="type"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.TransferData"/>
+                <message_argument value="stgmedium"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.TransferData"/>
+                <message_argument value="result"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.dnd.TransferData"/>
+                <message_argument value="formatetc"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java" type="org.eclipse.swt.ole.win32.OleClientSite">
+        <filter id="338948223">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.ole.win32.OleClientSite"/>
+                <message_argument value="OleClientSite(Composite, int, String, File)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java" type="org.eclipse.swt.ole.win32.OleControlSite">
+        <filter id="338948223">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.ole.win32.OleControlSite"/>
+                <message_argument value="OleControlSite(Composite, int, String, File)"/>
+            </message_arguments>
+        </filter>
+        <filter id="1227882500">
+            <message_arguments>
+                <message_argument value="OnUIDeactivate(int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java" type="org.eclipse.swt.ole.win32.Variant">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.ole.win32.Variant"/>
+                <message_argument value="win32_new(int)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.ole.win32.Variant"/>
+                <message_argument value="win32_copy(int, Variant)"/>
+            </message_arguments>
+        </filter>
+        <filter id="389242988">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.ole.win32.Variant"/>
+                <message_argument value="sizeof"/>
+                <message_argument value="16"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java" type="org.eclipse.swt.printing.PrintDialog">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.printing.PrintDialog"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java" type="org.eclipse.swt.printing.Printer">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.printing.Printer"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.printing.Printer"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.printing.Printer"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/ArmListener.java" type="org.eclipse.swt.events.ArmListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ArmListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/ControlListener.java" type="org.eclipse.swt.events.ControlListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ControlListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/DisposeListener.java" type="org.eclipse.swt.events.DisposeListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="DisposeListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/DragDetectListener.java" type="org.eclipse.swt.events.DragDetectListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="DragDetectListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/ExpandListener.java" type="org.eclipse.swt.events.ExpandListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ExpandListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/FocusListener.java" type="org.eclipse.swt.events.FocusListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="FocusListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/HelpListener.java" type="org.eclipse.swt.events.HelpListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="HelpListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/KeyListener.java" type="org.eclipse.swt.events.KeyListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="KeyListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MenuDetectListener.java" type="org.eclipse.swt.events.MenuDetectListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MenuDetectListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MenuListener.java" type="org.eclipse.swt.events.MenuListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MenuListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/ModifyListener.java" type="org.eclipse.swt.events.ModifyListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ModifyListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseListener.java" type="org.eclipse.swt.events.MouseListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MouseListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseMoveListener.java" type="org.eclipse.swt.events.MouseMoveListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MouseMoveListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseTrackListener.java" type="org.eclipse.swt.events.MouseTrackListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MouseTrackListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/MouseWheelListener.java" type="org.eclipse.swt.events.MouseWheelListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="MouseWheelListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/PaintListener.java" type="org.eclipse.swt.events.PaintListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="PaintListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/SelectionListener.java" type="org.eclipse.swt.events.SelectionListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="SelectionListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/ShellListener.java" type="org.eclipse.swt.events.ShellListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ShellListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/TraverseListener.java" type="org.eclipse.swt.events.TraverseListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="TraverseListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/TreeListener.java" type="org.eclipse.swt.events.TreeListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="TreeListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/events/VerifyListener.java" type="org.eclipse.swt.events.VerifyListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="VerifyListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java" type="org.eclipse.swt.graphics.Drawable">
+        <filter id="406052990">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Drawable"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="406052990">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Drawable"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java" type="org.eclipse.swt.graphics.ImageData">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.ImageData"/>
+                <message_argument value="internal_new(int, int, int, PaletteData, int, byte[], int, byte[], byte[], int, int, int, int, int, int, int)"/>
+            </message_arguments>
+        </filter>
+        <filter id="576725006">
+            <message_arguments>
+                <message_argument value="CloneableCompatibility"/>
+                <message_argument value="ImageData"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/ImageLoaderListener.java" type="org.eclipse.swt.graphics.ImageLoaderListener">
+        <filter id="576720909">
+            <message_arguments>
+                <message_argument value="SWTEventListener"/>
+                <message_argument value="ImageLoaderListener"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/Point.java" type="org.eclipse.swt.graphics.Point">
+        <filter id="576725006">
+            <message_arguments>
+                <message_argument value="SerializableCompatibility"/>
+                <message_argument value="Point"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/RGB.java" type="org.eclipse.swt.graphics.RGB">
+        <filter id="576725006">
+            <message_arguments>
+                <message_argument value="SerializableCompatibility"/>
+                <message_argument value="RGB"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/graphics/Rectangle.java" type="org.eclipse.swt.graphics.Rectangle">
+        <filter id="576725006">
+            <message_arguments>
+                <message_argument value="SerializableCompatibility"/>
+                <message_argument value="Rectangle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java" type="org.eclipse.swt.widgets.Tray">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Tray"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java" type="org.eclipse.swt.widgets.TypedListener">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TypedListener"/>
+                <message_argument value="getEventListener()"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TypedListener"/>
+                <message_argument value="handleEvent(Event)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338948223">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TypedListener"/>
+                <message_argument value="TypedListener(SWTEventListener)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java" type="org.eclipse.swt.graphics.Color">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Color"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Color"/>
+                <message_argument value="win32_new(Device, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java" type="org.eclipse.swt.graphics.Cursor">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Cursor"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Cursor"/>
+                <message_argument value="win32_new(Device, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java" type="org.eclipse.swt.graphics.Device">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Device"/>
+                <message_argument value="hPalette"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Device"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Device"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java" type="org.eclipse.swt.graphics.Font">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Font"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Font"/>
+                <message_argument value="win32_new(Device, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java" type="org.eclipse.swt.graphics.FontData">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.FontData"/>
+                <message_argument value="data"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.FontData"/>
+                <message_argument value="height"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.FontData"/>
+                <message_argument value="win32_new(LOGFONT, float)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java" type="org.eclipse.swt.graphics.FontMetrics">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.FontMetrics"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.FontMetrics"/>
+                <message_argument value="win32_new(TEXTMETRIC)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java" type="org.eclipse.swt.graphics.GC">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GC"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GC"/>
+                <message_argument value="win32_new(int, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GC"/>
+                <message_argument value="win32_new(Drawable, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GC"/>
+                <message_argument value="getGCData()"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/GCData.java" type="org.eclipse.swt.graphics.GCData">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GCData"/>
+            </message_arguments>
+        </filter>
+        <filter id="338755678">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GCData"/>
+                <message_argument value="hFont"/>
+            </message_arguments>
+        </filter>
+        <filter id="1143996420">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.GCData"/>
+            </message_arguments>
+        </filter>
+        <filter id="1143996420">
+            <message_arguments>
+                <message_argument value="hGDIFont"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java" type="org.eclipse.swt.graphics.Image">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Image"/>
+                <message_argument value="type"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Image"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Image"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Image"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Image"/>
+                <message_argument value="win32_new(Device, int, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java" type="org.eclipse.swt.graphics.Path">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Path"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java" type="org.eclipse.swt.graphics.Pattern">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Pattern"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java" type="org.eclipse.swt.graphics.Region">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Region"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Region"/>
+                <message_argument value="win32_new(Device, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java" type="org.eclipse.swt.graphics.Transform">
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.graphics.Transform"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java" type="org.eclipse.swt.widgets.Button">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Button"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Caret.java" type="org.eclipse.swt.widgets.Caret">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Caret"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ColorDialog.java" type="org.eclipse.swt.widgets.ColorDialog">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ColorDialog"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java" type="org.eclipse.swt.widgets.Combo">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Combo"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java" type="org.eclipse.swt.widgets.Control">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Control"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Control"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Control"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Control"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java" type="org.eclipse.swt.widgets.CoolBar">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.CoolBar"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/CoolItem.java" type="org.eclipse.swt.widgets.CoolItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.CoolItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java" type="org.eclipse.swt.widgets.DateTime">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.DateTime"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java" type="org.eclipse.swt.widgets.Decorations">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Decorations"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java" type="org.eclipse.swt.widgets.DirectoryDialog">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.DirectoryDialog"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java" type="org.eclipse.swt.widgets.Display">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+                <message_argument value="msg"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+                <message_argument value="internal_dispose_GC(int, GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+                <message_argument value="findWidget(int)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+                <message_argument value="internal_new_GC(GCData)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Display"/>
+                <message_argument value="findWidget(int, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java" type="org.eclipse.swt.widgets.ExpandBar">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ExpandBar"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java" type="org.eclipse.swt.widgets.ExpandItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ExpandItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java" type="org.eclipse.swt.widgets.FileDialog">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.FileDialog"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/FontDialog.java" type="org.eclipse.swt.widgets.FontDialog">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.FontDialog"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java" type="org.eclipse.swt.widgets.Group">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Group"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java" type="org.eclipse.swt.widgets.IME">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.IME"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java" type="org.eclipse.swt.widgets.Label">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Label"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java" type="org.eclipse.swt.widgets.Link">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Link"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/List.java" type="org.eclipse.swt.widgets.List">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.List"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java" type="org.eclipse.swt.widgets.Menu">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Menu"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Menu"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java" type="org.eclipse.swt.widgets.MenuItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.MenuItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/MessageBox.java" type="org.eclipse.swt.widgets.MessageBox">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.MessageBox"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java" type="org.eclipse.swt.widgets.ProgressBar">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ProgressBar"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java" type="org.eclipse.swt.widgets.Sash">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Sash"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java" type="org.eclipse.swt.widgets.Scale">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Scale"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java" type="org.eclipse.swt.widgets.ScrollBar">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ScrollBar"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java" type="org.eclipse.swt.widgets.Scrollable">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Scrollable"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java" type="org.eclipse.swt.widgets.Shell">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Shell"/>
+                <message_argument value="win32_new(Display, int)"/>
+            </message_arguments>
+        </filter>
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Shell"/>
+                <message_argument value="internal_new(Display, int)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java" type="org.eclipse.swt.widgets.Slider">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Slider"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java" type="org.eclipse.swt.widgets.Spinner">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Spinner"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java" type="org.eclipse.swt.widgets.TabFolder">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TabFolder"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TabItem.java" type="org.eclipse.swt.widgets.TabItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TabItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java" type="org.eclipse.swt.widgets.Table">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Table"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java" type="org.eclipse.swt.widgets.TableColumn">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TableColumn"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java" type="org.eclipse.swt.widgets.TableItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TableItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java" type="org.eclipse.swt.widgets.Text">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Text"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java" type="org.eclipse.swt.widgets.ToolBar">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ToolBar"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java" type="org.eclipse.swt.widgets.ToolItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ToolItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/ToolTip.java" type="org.eclipse.swt.widgets.ToolTip">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.ToolTip"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java" type="org.eclipse.swt.widgets.Tracker">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Tracker"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java" type="org.eclipse.swt.widgets.TrayItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TrayItem"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java" type="org.eclipse.swt.widgets.Tree">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Tree"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TreeColumn.java" type="org.eclipse.swt.widgets.TreeColumn">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TreeColumn"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java" type="org.eclipse.swt.widgets.TreeItem">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TreeItem"/>
+            </message_arguments>
+        </filter>
+        <filter id="338940029">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.TreeItem"/>
+                <message_argument value="handle"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java" type="org.eclipse.swt.widgets.Widget">
+        <filter id="338944126">
+            <message_arguments>
+                <message_argument value="org.eclipse.swt.widgets.Widget"/>
+                <message_argument value="removeListener(int, SWTEventListener)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="META-INF/MANIFEST.MF">
+        <filter id="923795461">
+            <message_arguments>
+                <message_argument value="3.6.0.qualifier"/>
+                <message_argument value="3.5.2.v3557f"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
diff --git a/eclipse/plugins/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs b/eclipse/plugins/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
index 1458bb3..c87951d 100644
--- a/eclipse/plugins/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
+++ b/eclipse/plugins/org.eclipse.swt/.settings/org.eclipse.pde.api.tools.prefs
@@ -1,13 +1,15 @@
-#Wed May 27 10:10:25 EDT 2009
+#Tue Apr 20 10:20:28 EDT 2010
 ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
 ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
 ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
 API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
 API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
 CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
 CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
 CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
 CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
@@ -16,7 +18,7 @@ CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
 CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
 CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
 CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Ignore
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
 CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
 CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
 CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
@@ -47,7 +49,7 @@ ILLEGAL_OVERRIDE=Warning
 ILLEGAL_REFERENCE=Warning
 INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
 INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
 INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
 INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
 INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
@@ -80,6 +82,7 @@ TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
 TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
 TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
 UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
 eclipse.preferences.version=1
 incompatible_api_component_version=Error
 incompatible_api_component_version_include_major_without_breaking_change=Disabled
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c
index 1bb23d9..cca746c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/library/swt_awt.c	
@@ -1,12 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    IBM Corporation - initial API and implementation
+ *    IBM Corporation - initial API
+ *    Adobe Systems, Inc. - initial implementation
  *******************************************************************************/
 
 #include "swt.h"
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java
index 64cab44..08b8e4a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT AWT/cocoa/org/eclipse/swt/awt/SWT_AWT.java	
@@ -11,20 +11,17 @@
  *******************************************************************************/
 package org.eclipse.swt.awt;
 
+import java.awt.*;
 import java.awt.Canvas;
-import java.awt.EventQueue;
-import java.awt.Frame;
-import java.awt.Toolkit;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
+import java.awt.event.*;
+import java.lang.reflect.*;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.internal.Library;
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.widgets.*;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
 
 /**
  * This class provides a bridge between SWT and AWT, so that it
@@ -36,27 +33,27 @@ import org.eclipse.swt.widgets.Shell;
  * @since 3.0
  */
 public class SWT_AWT {
-
+	
 	/**
 	 * The name of the embedded Frame class. The default class name
 	 * for the platform will be used if <code>null</code>. 
 	 */
 	public static String embeddedFrameClass;
-
+	
 	/**
 	 * Key for looking up the embedded frame for a Composite using
 	 * getData(). 
 	 */
 	static String EMBEDDED_FRAME_KEY = "org.eclipse.swt.awt.SWT_AWT.embeddedFrame";
-
+	
 	static {
 		System.setProperty("apple.awt.usingSWT", "true");
 	}
-
+	
 	static boolean loaded, swingInitialized;
-
+	
 	static native final int /*long*/ getAWTHandle (Canvas canvas);
-
+	
 	static synchronized void loadLibrary () {
 		if (loaded) return;
 		loaded = true;
@@ -72,7 +69,7 @@ public class SWT_AWT {
 		} catch (Throwable e) {}
 		Library.loadLibrary("swt-awt");
 	}
-
+	
 	static synchronized void initializeSwing() {
 		if (swingInitialized) return;
 		swingInitialized = true;
@@ -85,155 +82,232 @@ public class SWT_AWT {
 			if (method != null) method.invoke(clazz, emptyObject);
 		} catch (Throwable e) {}
 	}
-
-/**
- * Returns a <code>java.awt.Frame</code> which is the embedded frame
- * associated with the specified composite.
- * 
- * @param parent the parent <code>Composite</code> of the <code>java.awt.Frame</code>
- * @return a <code>java.awt.Frame</code> the embedded frame or <code>null</code>.
- * 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
- * </ul>
- * 
- * @since 3.2
- */
-public static Frame getFrame(Composite parent) {
-	if (parent == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if ((parent.getStyle() & SWT.EMBEDDED) == 0) return null;
-	return (Frame) parent.getData(EMBEDDED_FRAME_KEY);
-}
-
-/**
- * Creates a new <code>java.awt.Frame</code>. This frame is the root for
- * the AWT components that will be embedded within the composite. In order
- * for the embedding to succeed, the composite must have been created
- * with the SWT.EMBEDDED style.
- * <p>
- * IMPORTANT: As of JDK1.5, the embedded frame does not receive mouse events.
- * When a lightweight component is added as a child of the embedded frame,
- * the cursor does not change. In order to work around both these problems, it is
- * strongly recommended that a heavyweight component such as <code>java.awt.Panel</code>
- * be added to the frame as the root of all components.
- * </p>
- * 
- * @param parent the parent <code>Composite</code> of the new <code>java.awt.Frame</code>
- * @return a <code>java.awt.Frame</code> to be the parent of the embedded AWT components
- * 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the parent Composite does not have the SWT.EMBEDDED style</li> 
- * </ul>
- * 
- * @since 3.0
- */
-public static Frame new_Frame(final Composite parent) {
-	if (parent == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	if ((parent.getStyle() & SWT.EMBEDDED) == 0) {
-		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	
+	/**
+	 * Returns a <code>java.awt.Frame</code> which is the embedded frame
+	 * associated with the specified composite.
+	 * 
+	 * @param parent the parent <code>Composite</code> of the <code>java.awt.Frame</code>
+	 * @return a <code>java.awt.Frame</code> the embedded frame or <code>null</code>.
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @since 3.2
+	 */
+	public static Frame getFrame(Composite parent) {
+		if (parent == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if ((parent.getStyle() & SWT.EMBEDDED) == 0) return null;
+		return (Frame) parent.getData(EMBEDDED_FRAME_KEY);
 	}
-
-	final int /*long*/ handle = parent.view.id;
-
-	Class clazz = null;
-	try {
-		String className = embeddedFrameClass != null ? embeddedFrameClass : "apple.awt.CEmbeddedFrame";
-		if (embeddedFrameClass == null) {
-			clazz = Class.forName(className, true, ClassLoader.getSystemClassLoader());
-		} else {
-			clazz = Class.forName(className);
+	
+	/**
+	 * Creates a new <code>java.awt.Frame</code>. This frame is the root for
+	 * the AWT components that will be embedded within the composite. In order
+	 * for the embedding to succeed, the composite must have been created
+	 * with the SWT.EMBEDDED style.
+	 * <p>
+	 * IMPORTANT: As of JDK1.5, the embedded frame does not receive mouse events.
+	 * When a lightweight component is added as a child of the embedded frame,
+	 * the cursor does not change. In order to work around both these problems, it is
+	 * strongly recommended that a heavyweight component such as <code>java.awt.Panel</code>
+	 * be added to the frame as the root of all components.
+	 * </p>
+	 * 
+	 * @param parent the parent <code>Composite</code> of the new <code>java.awt.Frame</code>
+	 * @return a <code>java.awt.Frame</code> to be the parent of the embedded AWT components
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 *    <li>ERROR_INVALID_ARGUMENT - if the parent Composite does not have the SWT.EMBEDDED style</li> 
+	 * </ul>
+	 * 
+	 * @since 3.0
+	 */
+	public static Frame new_Frame(final Composite parent) {
+		if (parent == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if ((parent.getStyle() & SWT.EMBEDDED) == 0) {
+			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 		}
-	} catch (ClassNotFoundException cne) {
-		SWT.error (SWT.ERROR_NOT_IMPLEMENTED, cne);		
-	} catch (Throwable e) {
-		SWT.error (SWT.ERROR_UNSPECIFIED , e, " [Error while starting AWT]");		
-	}
-
-	Object value = null;
-	Constructor constructor = null;
-	try {
-		constructor = clazz.getConstructor (new Class [] {long.class});
-		value = constructor.newInstance (new Object [] {new Long(handle)});
-	} catch (Throwable e) {
-		SWT.error(SWT.ERROR_NOT_IMPLEMENTED, e);
-	}
-	final Frame frame = (Frame) value;
-	parent.setData(EMBEDDED_FRAME_KEY, frame);
-
-	Listener listener = new Listener() {
-		public void handleEvent(Event e) {
-			switch (e.type) {
-			case SWT.Dispose: {
-				parent.setVisible(false);
+		
+		final int /*long*/ handle = parent.view.id;
+		
+		Class clazz = null;
+		try {
+			String className = embeddedFrameClass != null ? embeddedFrameClass : "apple.awt.CEmbeddedFrame";
+			if (embeddedFrameClass == null) {
+				clazz = Class.forName(className, true, ClassLoader.getSystemClassLoader());
+			} else {
+				clazz = Class.forName(className);
+			}
+		} catch (ClassNotFoundException cne) {
+			SWT.error (SWT.ERROR_NOT_IMPLEMENTED, cne);		
+		} catch (Throwable e) {
+			SWT.error (SWT.ERROR_UNSPECIFIED , e, " [Error while starting AWT]");		
+		}
+		
+		initializeSwing();
+		Object value = null;
+		Constructor constructor = null;
+		try {
+			constructor = clazz.getConstructor (new Class [] {long.class});
+			value = constructor.newInstance (new Object [] {new Long(handle)});
+		} catch (Throwable e) {
+			SWT.error(SWT.ERROR_NOT_IMPLEMENTED, e);
+		}
+		final Frame frame = (Frame) value;
+		frame.addNotify();
+		
+		parent.setData(EMBEDDED_FRAME_KEY, frame);
+		
+		/* Forward the iconify and deiconify events */
+		final Listener shellListener = new Listener () {
+			public void handleEvent (Event e) {
+				switch (e.type) {
+					case SWT.Deiconify:
+						EventQueue.invokeLater(new Runnable () {
+							public void run () {
+								frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_DEICONIFIED));
+							}
+						});
+						break;
+					case SWT.Iconify:
+						EventQueue.invokeLater(new Runnable () {
+							public void run () {
+								frame.dispatchEvent (new WindowEvent (frame, WindowEvent.WINDOW_ICONIFIED));
+							}
+						});
+						break;
+				}
+			}
+		};
+		Shell shell = parent.getShell ();
+		shell.addListener (SWT.Deiconify, shellListener);
+		shell.addListener (SWT.Iconify, shellListener);
+		
+		/*
+		 * Generate the appropriate events to activate and deactivate
+		 * the embedded frame. This is needed in order to make keyboard
+		 * focus work properly for lightweights.
+		 */
+		Listener listener = new Listener () {
+			public void handleEvent (Event e) {
+				switch (e.type) {
+					case SWT.Dispose:
+						Shell shell = parent.getShell ();
+						shell.removeListener (SWT.Deiconify, shellListener);
+						shell.removeListener (SWT.Iconify, shellListener);
+						parent.setVisible(false);
+						EventQueue.invokeLater(new Runnable () {
+							public void run () {
+								try {
+									frame.dispose ();
+								} catch (Throwable e) {}
+							}
+						});
+						break;
+					case SWT.FocusIn:
+						EventQueue.invokeLater(new Runnable () {
+							public void run () {
+								if (frame.isActive()) return;
+								try {
+									Class clazz = frame.getClass();
+									Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
+									if (method != null) method.invoke(frame, new Object[]{new Boolean(true)});
+								} catch (Throwable e) {e.printStackTrace();}
+							}
+						});
+						break;
+					case SWT.Deactivate:
+						EventQueue.invokeLater(new Runnable () {
+							public void run () {
+								if (!frame.isActive()) return;
+								try {
+									Class clazz = frame.getClass();
+									Method method = clazz.getMethod("synthesizeWindowActivation", new Class[]{boolean.class});
+									if (method != null) method.invoke(frame, new Object[]{new Boolean(false)});
+								} catch (Throwable e) {e.printStackTrace();}
+							}
+						});
+						break;
+				}
+			}
+		};
+		
+		parent.addListener (SWT.FocusIn, listener);
+		parent.addListener (SWT.Deactivate, listener);
+		parent.addListener (SWT.Dispose, listener);
+		
+		parent.getDisplay().asyncExec(new Runnable() {
+			public void run () {
+				if (parent.isDisposed()) return;
+				final Rectangle clientArea = parent.getClientArea();
 				EventQueue.invokeLater(new Runnable () {
 					public void run () {
-						frame.dispose ();
+						frame.setSize (clientArea.width, clientArea.height);
+						frame.validate();
+						
+						// Bug in Cocoa AWT? For some reason the frame isn't showing up on first draw.
+						// Toggling visibility seems to be the only thing that works.
+						frame.setVisible(false);
+						frame.setVisible(true);
 					}
 				});
-				break;
-			}
 			}
+		});
+		
+		return frame;
+	}
+	
+	/**
+	 * Creates a new <code>Shell</code>. This Shell is the root for
+	 * the SWT widgets that will be embedded within the AWT canvas. 
+	 * 
+	 * @param display the display for the new Shell
+	 * @param parent the parent <code>java.awt.Canvas</code> of the new Shell
+	 * @return a <code>Shell</code> to be the parent of the embedded SWT widgets
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the display is null</li>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 *    <li>ERROR_INVALID_ARGUMENT - if the parent's peer is not created</li>
+	 * </ul>
+	 * 
+	 * @since 3.0
+	 */
+	public static Shell new_Shell(final Display display, final Canvas parent) {
+		if (display == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		int /*long*/ handle = 0;
+		
+		try {
+			loadLibrary ();
+			handle = getAWTHandle (parent);
+		} catch (Throwable e) {
+			SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
 		}
-	};
-
-	parent.addListener(SWT.Dispose, listener);
-
-	return frame;
-}
-
-/**
- * Creates a new <code>Shell</code>. This Shell is the root for
- * the SWT widgets that will be embedded within the AWT canvas. 
- * 
- * @param display the display for the new Shell
- * @param parent the parent <code>java.awt.Canvas</code> of the new Shell
- * @return a <code>Shell</code> to be the parent of the embedded SWT widgets
- * 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the display is null</li>
- *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the parent's peer is not created</li>
- * </ul>
- * 
- * @since 3.0
- */
-public static Shell new_Shell(final Display display, final Canvas parent) {
-	if (display == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
-	return null;
-
-// TODO: Uncomment this code once Display/Shell related issues are ironed out.
-//		int /*long*/ handle = 0;
-//
-//		try {
-//			loadLibrary ();
-//			handle = getAWTHandle (parent);
-//		} catch (Throwable e) {
-//			SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
-//		}
-//		if (handle == 0) SWT.error (SWT.ERROR_INVALID_ARGUMENT, null, " [peer not created]");
-//
-//		final Shell shell = Shell.cocoa_new (display, handle);
-//		final ComponentListener listener = new ComponentAdapter () {
-//			public void componentResized (ComponentEvent e) {
-//				display.asyncExec (new Runnable () {
-//					public void run () {
-//						if (shell.isDisposed()) return;
-//						Dimension dim = parent.getSize ();
-//						shell.setSize (dim.width, dim.height);
-//					}
-//				});
-//			}
-//		};
-//		parent.addComponentListener(listener);
-//		shell.addListener(SWT.Dispose, new Listener() {
-//			public void handleEvent(Event event) {
-//				parent.removeComponentListener(listener);
-//			}
-//		});
-//		shell.setVisible (true);
-//		return shell;
-}
+		if (handle == 0) SWT.error (SWT.ERROR_INVALID_ARGUMENT, null, " [peer not created]");
+		
+		final Shell shell = Shell.cocoa_new (display, handle);
+		final ComponentListener listener = new ComponentAdapter () {
+			public void componentResized (ComponentEvent e) {
+				display.asyncExec (new Runnable () {
+					public void run () {
+						if (shell.isDisposed()) return;
+						Dimension dim = parent.getSize ();
+						shell.setSize (dim.width, dim.height);
+					}
+				});
+			}
+		};
+		parent.addComponentListener(listener);
+		shell.addListener(SWT.Dispose, new Listener() {
+			public void handleEvent(Event event) {
+				parent.removeComponentListener(listener);
+			}
+		});
+		shell.setVisible (true);
+		return shell;
+	}
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/carbon/org/eclipse/swt/accessibility/Accessible.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/carbon/org/eclipse/swt/accessibility/Accessible.java
index 43e797e..1a85e8f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/carbon/org/eclipse/swt/accessibility/Accessible.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/carbon/org/eclipse/swt/accessibility/Accessible.java	
@@ -13,8 +13,8 @@ package org.eclipse.swt.accessibility;
 
 import java.util.Vector;
 import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
 import org.eclipse.swt.internal.carbon.*;
+import org.eclipse.swt.widgets.*;
 
 /**
  * Instances of this class provide a bridge between application
@@ -71,12 +71,41 @@ public class Accessible {
 	Vector accessibleListeners = new Vector();
 	Vector accessibleControlListeners = new Vector();
 	Vector accessibleTextListeners = new Vector ();
+	Vector accessibleActionListeners = new Vector();
+	Vector accessibleHyperlinkListeners = new Vector();
+	Vector accessibleTableListeners = new Vector();
+	Vector accessibleTableCellListeners = new Vector();
+	// This line is intentionally commented. See addAccessibleTextListener.
+	// Vector accessibleTextExtendedListeners = new Vector();
+	Vector accessibleValueListeners = new Vector();
+	Vector accessibleAttributeListeners = new Vector();
+	Accessible parent;
 	Control control;
 	int axuielementref = 0;
 	int[] osChildIDCache = new int[0];
 	
 	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent the Accessible parent, which must not be null
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @see Control#getAccessible
+	 * 
+	 * @since 3.6
+	 */
+	public Accessible(Accessible parent) {
+		this.parent = checkNull(parent);
+		this.control = parent.control;
+		// TODO
+	}
+
+	/**
 	 * @since 3.5
+	 * @deprecated
 	 */
 	protected Accessible() {
 	}
@@ -87,6 +116,11 @@ public class Accessible {
 		OS.HIObjectSetAccessibilityIgnored(control.handle, false);
 	}
 	
+	static Accessible checkNull (Accessible parent) {
+		if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		return parent;
+	}
+
 	/**
 	 * Invokes platform specific functionality to allocate a new accessible object.
 	 * <p>
@@ -99,6 +133,8 @@ public class Accessible {
 	 *
 	 * @param control the control to get the accessible object for
 	 * @return the platform specific accessible object
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public static Accessible internal_new_Accessible(Control control) {
 		return new Accessible(control);
@@ -163,7 +199,7 @@ public class Accessible {
 	 * be notified when an accessible client asks for custom text control
 	 * specific information. The listener is notified by sending it
 	 * one of the messages defined in the <code>AccessibleTextListener</code>
-	 * interface.
+	 * and <code>AccessibleTextExtendedListener</code> interfaces.
 	 *
 	 * @param listener the listener that should be notified when the receiver
 	 * is asked for custom text control specific information
@@ -177,6 +213,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #removeAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -184,10 +221,214 @@ public class Accessible {
 	public void addAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleTextListeners.addElement (listener);		
+		// Carbon won't be adding the additional extended listener features for 3.6
+		// so no need to segregate the two listener types.
+//		if (listener instanceof AccessibleTextExtendedListener) {
+//			accessibleTextExtendedListeners.addElement (listener);		
+//		} else {
+			accessibleTextListeners.addElement (listener);
+//		}
+	}
+	
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #removeAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #removeAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #removeAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #removeAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #removeAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #removeAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds a relation with the specified type and target
+	 * to the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void addRelation(int type, Accessible target) {
+		checkWidget();
+		// TODO
 	}
 	
 	/**
+	 * Disposes of the operating system resources associated with
+	 * the receiver, and removes the receiver from its parent's
+	 * list of children.
+	 * <p>
+	 * This method should be called when an accessible that was created
+	 * with the public constructor <code>Accessible(Accessible parent)</code>
+	 * is no longer needed. You do not need to call this when the receiver's
+	 * control is disposed, because all <code>Accessible</code> instances
+	 * associated with a control are released when the control is disposed.
+	 * It is also not necessary to call this for instances of <code>Accessible</code>
+	 * that were retrieved with <code>Control.getAccessible()</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public void dispose () {
+		if (parent == null) return;
+		// TODO: dispose children
+		parent = null;
+	}
+
+	/**
 	 * Returns the control for this Accessible object. 
 	 *
 	 * @return the receiver's control
@@ -206,6 +447,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void internal_dispose_Accessible() {
 		if (axuielementref != 0) {
@@ -227,6 +470,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public int internal_kEventAccessibleGetChildAtPoint (int nextHandler, int theEvent, int userData) {
 		if (axuielementref != 0) {
@@ -269,6 +514,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public int internal_kEventAccessibleGetFocusedChild (int nextHandler, int theEvent, int userData) {
 		if (axuielementref != 0) {
@@ -329,6 +576,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public int internal_kEventAccessibleGetAllAttributeNames (int nextHandler, int theEvent, int userData) {
 		int code = userData; // userData flags whether nextHandler has already been called
@@ -385,6 +634,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public int internal_kEventAccessibleGetNamedAttribute (int nextHandler, int theEvent, int userData) {
 		if (axuielementref != 0) {
@@ -1108,6 +1359,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #addAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -1115,7 +1367,241 @@ public class Accessible {
 	public void removeAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleTextListeners.removeElement (listener);
+		// Carbon won't be adding the additional extended listener features for 3.6
+		// so no need to segregate the two listener types.
+//		if (listener instanceof AccessibleTextExtendedListener) {
+//			accessibleTextExtendedListeners.removeElement (listener);
+//		} else {
+			accessibleTextListeners.removeElement (listener);
+//		}
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #addAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #addAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #addAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #addAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #addAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #addAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the relation with the specified type and target
+	 * from the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void removeRelation(int type, Accessible target) {
+		checkWidget();
+		// TODO
+	}
+	
+	/**
+	 * Sends a message with event-specific data to accessible clients
+	 * indicating that something has changed within a custom control.
+	 *
+	 * @param event an <code>ACC</code> constant beginning with EVENT_* indicating the message to send
+	 * @param eventData an object containing event-specific data, or null if there is no event-specific data
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#EVENT_ACTION_CHANGED
+	 * @see ACC#EVENT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_DOCUMENT_LOAD_COMPLETE
+	 * @see ACC#EVENT_DOCUMENT_LOAD_STOPPED
+	 * @see ACC#EVENT_DOCUMENT_RELOAD
+	 * @see ACC#EVENT_HYPERLINK_ACTIVATED
+	 * @see ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_END_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_START_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_SELECTED
+	 * @see ACC#EVENT_LOCATION_CHANGED
+	 * @see ACC#EVENT_NAME_CHANGED
+	 * @see ACC#EVENT_PAGE_CHANGED
+	 * @see ACC#EVENT_SECTION_CHANGED
+	 * @see ACC#EVENT_SELECTION_CHANGED
+	 * @see ACC#EVENT_STATE_CHANGED
+	 * @see ACC#EVENT_TABLE_CAPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_SUMMARY_CHANGED
+	 * @see ACC#EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_TEXT_CARET_MOVED
+	 * @see ACC#EVENT_TEXT_CHANGED
+	 * @see ACC#EVENT_TEXT_COLUMN_CHANGED
+	 * @see ACC#EVENT_TEXT_SELECTION_CHANGED
+	 * @see ACC#EVENT_VALUE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public void sendEvent(int event, Object eventData) {
+		checkWidget();
+		// TODO
 	}
 
 	/**
@@ -1179,8 +1665,8 @@ public class Accessible {
 	 * Sends a message to accessible clients that the text
 	 * within a custom control has changed.
 	 *
-	 * @param type the type of change, one of <code>ACC.NOTIFY_TEXT_INSERT</code>
-	 * or <code>ACC.NOTIFY_TEXT_DELETE</code>
+	 * @param type the type of change, one of <code>ACC.TEXT_INSERT</code>
+	 * or <code>ACC.TEXT_DELETE</code>
 	 * @param startIndex the text index within the control where the insertion or deletion begins
 	 * @param length the non-negative length in characters of the insertion or deletion
 	 *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
index c117dd0..1fb0b60 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java	
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.accessibility;
 
-
+import java.net.*;
 import java.util.*;
 
 import org.eclipse.swt.*;
@@ -43,8 +43,11 @@ import org.eclipse.swt.widgets.*;
  */
 public class Accessible {
 
+	static final int MAX_RELATION_TYPES = 15;
+
 	static NSString[] baseAttributes = { 
 		OS.NSAccessibilityRoleAttribute,
+		OS.NSAccessibilitySubroleAttribute,
 		OS.NSAccessibilityRoleDescriptionAttribute,
 		OS.NSAccessibilityHelpAttribute,
 		OS.NSAccessibilityFocusedAttribute,
@@ -53,25 +56,9 @@ public class Accessible {
 		OS.NSAccessibilityPositionAttribute,
 		OS.NSAccessibilitySizeAttribute,
 		OS.NSAccessibilityWindowAttribute,
-		OS.NSAccessibilityTopLevelUIElementAttribute
-	};
-
-	static NSString[] baseTextAttributes = {
-		OS.NSAccessibilityNumberOfCharactersAttribute,
-		OS.NSAccessibilitySelectedTextAttribute,
-		OS.NSAccessibilitySelectedTextRangeAttribute,
-		OS.NSAccessibilityInsertionPointLineNumberAttribute,
-		OS.NSAccessibilitySelectedTextRangesAttribute,
-		OS.NSAccessibilityVisibleCharacterRangeAttribute,
-		OS.NSAccessibilityValueAttribute,
+		OS.NSAccessibilityTopLevelUIElementAttribute,
 	};
 	
-	static NSString[] baseParameterizedAttributes = {
-		OS.NSAccessibilityStringForRangeParameterizedAttribute,
-		OS.NSAccessibilityRangeForLineParameterizedAttribute,
-	};
-	
-
 	NSMutableArray attributeNames = null;
 	NSMutableArray parameterizedAttributeNames = null;
 	NSMutableArray actionNames = null;
@@ -79,12 +66,48 @@ public class Accessible {
 	Vector accessibleListeners = new Vector();
 	Vector accessibleControlListeners = new Vector();
 	Vector accessibleTextListeners = new Vector ();
+	Vector accessibleActionListeners = new Vector();
+	Vector accessibleHyperlinkListeners = new Vector();
+	Vector accessibleTableListeners = new Vector();
+	Vector accessibleTableCellListeners = new Vector();
+	Vector accessibleTextExtendedListeners = new Vector();
+	Vector accessibleValueListeners = new Vector();
+	Vector accessibleAttributeListeners = new Vector();
+	Relation relations[] = new Relation[MAX_RELATION_TYPES];
+	Accessible parent;
 	Control control;
+	int currentRole = -1;
+
+	Map /*<Integer, SWTAccessibleDelegate>*/ childToIdMap = new HashMap();
+	SWTAccessibleDelegate delegate;
 
-	Map /*<Integer, SWTAccessibleDelegate>*/ children = new HashMap();
+	int index = -1;
+
+	TableAccessibleDelegate tableDelegate;
+	
+	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent the Accessible parent, which must not be null
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @see Control#getAccessible
+	 * 
+	 * @since 3.6
+	 */
+	public Accessible(Accessible parent) {
+		if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		this.parent = parent;
+		this.control = parent.control;
+		delegate = new SWTAccessibleDelegate(this, ACC.CHILDID_SELF);
+	}
 	
 	/**
 	 * @since 3.5
+	 * @deprecated
 	 */
 	protected Accessible() {
 	}
@@ -105,10 +128,22 @@ public class Accessible {
 	 *
 	 * @param control the control to get the accessible object for
 	 * @return the platform specific accessible object
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public static Accessible internal_new_Accessible(Control control) {
 		return new Accessible(control);
 	}
+	
+	id accessibleHandle(Accessible accessible) {
+		if (accessible.delegate != null) return accessible.delegate;
+		if (accessible.control != null) {
+			NSView view = accessible.control.view;
+			int /*long*/ handle = OS.objc_msgSend(view.id, OS.sel_accessibleHandle);
+			return new id(handle);
+		}
+		return null;
+	}
 
 	/**
 	 * Adds the listener to the collection of listeners who will
@@ -169,7 +204,7 @@ public class Accessible {
 	 * be notified when an accessible client asks for custom text control
 	 * specific information. The listener is notified by sending it
 	 * one of the messages defined in the <code>AccessibleTextListener</code>
-	 * interface.
+	 * and <code>AccessibleTextExtendedListener</code> interfaces.
 	 *
 	 * @param listener the listener that should be notified when the receiver
 	 * is asked for custom text control specific information
@@ -183,6 +218,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #removeAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -190,184 +226,927 @@ public class Accessible {
 	public void addAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleTextListeners.addElement (listener);		
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.addElement (listener);		
+		} else {
+			accessibleTextListeners.addElement (listener);
+		}
 	}
 	
-	public id internal_accessibilityActionDescription(NSString action, int childID) {
-		// TODO No action support for now.
-		return NSString.stringWith("");
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #removeAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.addElement(listener);
 	}
 
-	public NSArray internal_accessibilityActionNames(int childID) {
-		// The supported action list depends on the role played by the control.
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.detail = -1;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getRole(event);
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #removeAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #removeAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #removeAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #removeAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #removeAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.addElement(listener);
+	}
+
+	void addCGColor(float /*double*/ [] comps, NSMutableAttributedString inAttribString, NSString inAttribute, NSRange inRange) {
+		int /*long*/ cgColorSpace = OS.CGColorSpaceCreateDeviceRGB();
+		int /*long*/ cgColor = OS.CGColorCreate(cgColorSpace, comps);
+		OS.CGColorSpaceRelease(cgColorSpace);
+		inAttribString.addAttribute(inAttribute, new id(cgColor), inRange);
+	    OS.CGColorRelease(cgColor);
+	}
+
+	/**
+	 * Adds a relation with the specified type and target
+	 * to the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void addRelation(int type, Accessible target) {
+		checkWidget();
+		if (relations[type] == null) {
+			relations[type] = new Relation(this, type);
+		}
+		relations[type].addTarget(target);
+	}
+	
+	void checkRole(int role) {
+		// A lightweight control can change its role at any time, so track
+		// the current role for the control.  If it changes, reset the attribute list.
+		if (role != currentRole) {
+			currentRole = role;
+			
+			if (attributeNames != null) {
+				attributeNames.release();
+				attributeNames = null;
+			}
+			
+			if (parameterizedAttributeNames != null) {
+				parameterizedAttributeNames.release();
+				parameterizedAttributeNames = null;
+			}
+			
+			if (actionNames != null) {
+				actionNames.release();
+				actionNames = null;
+			}
 		}
+	}
 
-		// No accessible listener is overriding the role of the control, so let Cocoa return the default set for the control.
-		if (event.detail == -1) {
-			return null;
+	void createTableDelegate() {
+		if (tableDelegate == null) {
+			tableDelegate = new TableAccessibleDelegate(this);
 		}
-		
-		if ((childID == ACC.CHILDID_SELF) && (actionNames != null)) {
-			return retainedAutoreleased(actionNames);
+	}
+	
+	id getColumnIndexRangeAttribute(int childID) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getColumnIndex(event);
+			listener.getColumnSpan(event);
 		}
-		
-		NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(5);
-		
-		switch (event.detail) {
-		case ACC.ROLE_PUSHBUTTON:
-		case ACC.ROLE_RADIOBUTTON:
-		case ACC.ROLE_CHECKBUTTON:
-		case ACC.ROLE_TABITEM:
-			returnValue.addObject(OS.NSAccessibilityPressAction);
-			break;
+		NSRange range = new NSRange();
+		range.location = event.index;
+		range.length = event.count;
+		return NSValue.valueWithRange(range);
+	}
+
+	id getRowIndexRangeAttribute(int childID) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getRowIndex(event);
+			listener.getRowSpan(event);
 		}
+		NSRange range = new NSRange();
+		range.location = event.index;
+		range.length = event.count;
+		return NSValue.valueWithRange(range);
+	}
 
-		switch (event.detail) {
-		case ACC.ROLE_COMBOBOX:
-			returnValue.addObject(OS.NSAccessibilityConfirmAction);
-			break;
+	id getSelectedAttribute(int childID) {
+		if (accessibleTableListeners.size() > 0) {
+			AccessibleTableEvent event = new AccessibleTableEvent(this);
+			event.row = index;
+			for (int i = 0; i < accessibleTableListeners.size(); i++) {
+				AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+				if (currentRole == ACC.ROLE_ROW)
+					listener.isRowSelected(event);
+				else
+					listener.isColumnSelected(event);
+			}
+			return NSNumber.numberWithBool(event.isSelected);
 		}
 
+		return NSNumber.numberWithBool(false);
+	}
 
-		if (childID == ACC.CHILDID_SELF) {
-			actionNames = returnValue;
-			actionNames.retain();
-			return retainedAutoreleased(actionNames);
-		} else {
-			// Caller must retain if they want to hold on to it.
-			return returnValue;
-		}
+	id getIndexAttribute(int childID) {
+		return NSNumber.numberWithInt(index);
 	}
 
-	public NSArray internal_accessibilityAttributeNames(int childID) {
-		// The supported attribute set depends on the role played by the control.
-		// We may need to add or remove from the base set as needed.
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.detail = -1;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getRole(event);
+	id getHeaderAttribute(int childID) {
+		id returnValue = null;
+		AccessibleTableEvent tableEvent = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getColumnHeader(tableEvent);
 		}
-
-		// No accessible listener is overriding the role of the control, so let Cocoa
-		// return the default set for the control.
-		if (event.detail == -1)
-			return null;
+		if (tableEvent.accessible != null) returnValue = tableEvent.accessible.delegate;
 		
-		if ((childID == ACC.CHILDID_SELF) && (attributeNames != null)) {
-			return retainedAutoreleased(attributeNames);
+		return returnValue;
+	}
+	
+	id getVisibleColumnsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;		
+		id returnValue = null;
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getVisibleColumns(event);
+		}
+		if (event.accessibles != null) {
+			NSMutableArray array = NSMutableArray.arrayWithCapacity(event.accessibles.length);
+			Accessible[] accessibles = event.accessibles;
+			for (int i = 0; i < accessibles.length; i++) {
+				Accessible acc = accessibles[i];
+				array.addObject(acc.delegate);
+			}
+			returnValue = array;
 		}
-		
-		NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(baseAttributes.length);
+		return returnValue == null ? NSArray.array() : returnValue;
+	}
 
-		/* Add our list of supported attributes to the array.
-		 * Make sure each attribute name is not already in the array before appending.
-		 */
-		for (int i = 0; i < baseAttributes.length; i++) {
-			if (!returnValue.containsObject(baseAttributes[i])) {
-				returnValue.addObject(baseAttributes[i]);
+	id getVisibleRowsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;		
+		id returnValue = null;
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getVisibleRows(event);
+		}
+		if (event.accessibles != null) {
+			NSMutableArray array = NSMutableArray.arrayWithCapacity(event.accessibles.length);
+			Accessible[] accessibles = event.accessibles;
+			for (int i = 0; i < accessibles.length; i++) {
+				Accessible acc = accessibles[i];
+				array.addObject(acc.delegate);
 			}
+			returnValue = array;
 		}
-		
-		if (accessibleTextListeners.size() > 0) {
-			for (int i = 0; i < baseTextAttributes.length; i++) {
-				if (!returnValue.containsObject(baseTextAttributes[i])) {
-					returnValue.addObject(baseTextAttributes[i]);
+		return returnValue == null ? NSArray.array() : returnValue;
+	}
+
+	id getSelectedRowsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;		
+		id returnValue = null;
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getSelectedRows(event);
+		}
+		if (event.selected != null) {
+			int[] selected = (int[])event.selected;
+			NSMutableArray array = NSMutableArray.arrayWithCapacity(selected.length);
+			for (int i = 0; i < selected.length; i++) {
+				event.row = selected[i];
+				for (int j = 0; j < accessibleTableListeners.size(); j++) {
+					AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(j);
+					listener.getRow(event);	
 				}
+				if (event.accessible != null) array.addObject(event.accessible.delegate);
 			}
+			returnValue = array;
 		}
+		return returnValue == null ? NSArray.array() : returnValue;
+	}
+	
+
+	int getRowCount() {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
 		
-		// The following are expected to have a value (AXValue)
-		switch (event.detail) {
-		case ACC.ROLE_CHECKBUTTON:
-		case ACC.ROLE_RADIOBUTTON:
-		case ACC.ROLE_LABEL:
-		case ACC.ROLE_TABITEM:
-		case ACC.ROLE_TABFOLDER:
-			returnValue.addObject(OS.NSAccessibilityValueAttribute);
-			break;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getRowCount(event);
 		}
 		
-		// The following are expected to report their enabled status (AXEnabled)
-		switch (event.detail) {
-		case ACC.ROLE_CHECKBUTTON:
-		case ACC.ROLE_RADIOBUTTON:
-		case ACC.ROLE_LABEL:
-		case ACC.ROLE_TABITEM:
-		case ACC.ROLE_PUSHBUTTON:
-		case ACC.ROLE_COMBOBOX:
-			returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
-			break;
-		}
+		return event.count;
+	}
+
+	id getRowsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;
 		
-		// The following are expected to report a title (AXTitle)
-		switch (event.detail) {
-		case ACC.ROLE_CHECKBUTTON:
-		case ACC.ROLE_RADIOBUTTON:
-		case ACC.ROLE_PUSHBUTTON:
-		case ACC.ROLE_TABITEM:
-			returnValue.addObject(OS.NSAccessibilityTitleAttribute);
-			break;
-		}
-			
-		// Accessibility verifier says these attributes must be reported for combo boxes.
-		if (event.detail == ACC.ROLE_COMBOBOX) {
-			returnValue.addObject(OS.NSAccessibilityExpandedAttribute);
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getRowCount(event);
+			listener.getRows(event);
 		}
 		
-		// Accessibility verifier says these attributes must be reported for tab folders.
-		if (event.detail == ACC.ROLE_TABFOLDER) {
-			returnValue.addObject(OS.NSAccessibilityContentsAttribute);
-			returnValue.addObject(OS.NSAccessibilityTabsAttribute);
+		if (event.accessibles == null) event.accessibles = new Accessible[0];
+		
+		if (event.count != event.accessibles.length) {
+			createTableDelegate();
+
+			// Rerun the row query now that our accessible is in place.
+			for (int i = 0; i < accessibleTableListeners.size(); i++) {
+				AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+				listener.getRowCount(event);
+				listener.getRows(event);
+			}
 		}
 
-		/*
-		 * Only report back sub-roles when the SWT role maps to a sub-role.
-		 */
-		if (event.detail != -1) {
-			String osRole = roleToOs(event.detail);
-			
-			if (osRole.indexOf(':') == -1)
-				returnValue.removeObject(OS.NSAccessibilitySubroleAttribute);
+		NSMutableArray array = NSMutableArray.arrayWithCapacity(event.accessibles.length);
+		Object[] rows = event.accessibles;
+		for (int i = 0; i < rows.length; i++) {
+			Accessible acc = (Accessible) rows[i];
+			acc.index = i;
+			array.addObject(acc.delegate);
 		}
+		return array;
+	}
 
-		/*
-		 * Children never return their own children, so remove that attribute.
-		 */
-		if (childID != ACC.CHILDID_SELF) {
-			returnValue.removeObject(OS.NSAccessibilityChildrenAttribute);
+	id getSelectedColumnsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;
+		
+		id returnValue = null;
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getSelectedColumns(event);
+		}
+		if (event.selected != null) {
+			int[] selected = (int[])event.selected;
+			NSMutableArray array = NSMutableArray.arrayWithCapacity(selected.length);
+			for (int i = 0; i < selected.length; i++) {
+				event.column = selected[i];
+				for (int j = 0; j < accessibleTableListeners.size(); j++) {
+					AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(j);
+					listener.getColumn(event);	
+				}
+				if (event.accessible != null) array.addObject(event.accessible.delegate);
+			}
+			returnValue = array;
 		}
+		return returnValue == null ? NSArray.array() : returnValue;
+	}
+	
+	int getColumnCount() {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
 		
-		if (childID == ACC.CHILDID_SELF) {
-			attributeNames = returnValue;
-			attributeNames.retain();
-			return retainedAutoreleased(attributeNames);
-		} else {
-			// Caller must retain if necessary.
-			return returnValue;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getColumnCount(event);
 		}
+		
+		return event.count;
 	}
+	
+	id getColumnsAttribute(int childID) {
+		if (accessibleTableListeners.size() == 0) return null;
 
-	public id internal_accessibilityAttributeValue(NSString attribute, int childID) {
-		if (attribute.isEqualToString(OS.NSAccessibilityRoleAttribute)) return getRoleAttribute(childID);
-		if (attribute.isEqualToString(OS.NSAccessibilitySubroleAttribute)) return getSubroleAttribute(childID);
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+			listener.getColumnCount(event);
+			listener.getColumns(event);
+		}
+
+		if (event.accessibles == null) event.accessibles = new Accessible[0];
+
+		if (event.count != event.accessibles.length) {
+			createTableDelegate();
+
+			// Rerun the Column query, now that our adapter is in place.
+			for (int i = 0; i < accessibleTableListeners.size(); i++) {
+				AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+				listener.getColumnCount(event);
+				listener.getColumns(event);
+			}
+		}
+
+		NSMutableArray array = NSMutableArray.arrayWithCapacity(event.accessibles.length);
+		Accessible[] accessibles = event.accessibles;
+		for (int i = 0; i < accessibles.length; i++) {
+			Accessible acc = accessibles[i];
+			acc.index = i;
+			array.addObject(acc.delegate);
+		}
+		return array;
+	}
+	
+	/**
+	 * Gets the human-readable description of an action. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public id internal_accessibilityActionDescription(NSString action, int childID) {
+		NSString returnValue = NSString.string();
+		String actionName = action.getString();
+		if (accessibleActionListeners.size() > 0) {
+			AccessibleActionEvent event = new AccessibleActionEvent(this);
+			for (int i = 0; i < accessibleActionListeners.size(); i++) {
+				AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+				listener.getActionCount(event);
+			}
+			int index = -1;
+			for (int i = 0; i < event.count; i++) {
+				event.index = i;
+				for (int j = 0; j < accessibleActionListeners.size(); j++) {
+					AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(j);
+					listener.getName(event);
+				}
+				if (actionName.equals(event.result)) {
+					index = i;
+					break;
+				}
+			}
+			if (index != -1) {
+				event.index = index;
+				event.result = null;
+				for (int i = 0; i < accessibleActionListeners.size(); i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+					listener.getDescription(event);
+				}
+				if (event.result != null) returnValue = NSString.stringWith(event.result);
+			}
+		} 
+		return returnValue;
+	}
+	
+	/**
+	 * Gets the array of action names that this object can perform. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public NSArray internal_accessibilityActionNames(int childID) {
+		if (accessibleActionListeners.size() > 0) {
+			AccessibleActionEvent event = new AccessibleActionEvent(this);
+			for (int i = 0; i < accessibleActionListeners.size(); i++) {
+				AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+				listener.getActionCount(event);
+			}
+			NSMutableArray array = NSMutableArray.arrayWithCapacity(event.count);
+			for (int i = 0; i < event.count; i++) {
+				event.index = i;
+				for (int j = 0; j < accessibleActionListeners.size(); j++) {
+					AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(j);
+					listener.getName(event);
+				}
+				array.addObject(NSString.stringWith(event.result));	
+			}
+			return array;
+		} else {
+			// The supported action list depends on the role played by the control.
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.detail = -1;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getRole(event);
+			}
+	
+			// No accessible listener is overriding the role of the control, so let Cocoa return the default set for the control.
+			if (event.detail == -1) {
+				return null;
+			}
+	
+			checkRole(event.detail);
+			
+			if ((childID == ACC.CHILDID_SELF) && (actionNames != null)) {
+				return retainedAutoreleased(actionNames);
+			}
+			
+			NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(5);
+			
+			switch (event.detail) {
+				case ACC.ROLE_PUSHBUTTON:
+				case ACC.ROLE_RADIOBUTTON:
+				case ACC.ROLE_CHECKBUTTON:
+				case ACC.ROLE_TABITEM:
+				case ACC.ROLE_LINK:
+				case ACC.ROLE_CHECKMENUITEM:
+				case ACC.ROLE_RADIOMENUITEM:
+				case ACC.ROLE_SPLITBUTTON:
+					returnValue.addObject(OS.NSAccessibilityPressAction);
+					break;
+				case ACC.ROLE_COMBOBOX:
+					returnValue.addObject(OS.NSAccessibilityConfirmAction);
+					break;
+				case ACC.ROLE_WINDOW:
+				case ACC.ROLE_DIALOG:
+//					TODO
+//					returnValue.addObject(OS.NSAccessibilityRaiseAction);
+					break;
+			}
+	
+	
+			if (childID == ACC.CHILDID_SELF) {
+				actionNames = returnValue;
+				actionNames.retain();
+				return retainedAutoreleased(actionNames);
+			} else {
+				// Caller must retain if they want to hold on to it.
+				return returnValue;
+			}
+		}
+	}
+	
+	/**
+	 * Checks to see if the specified attribute can be set by a screen reader or other
+	 * assistive service. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public boolean internal_accessibilityIsAttributeSettable(NSString attribute, int childID) {
+		if (accessibleTextExtendedListeners.size() > 0) {
+			if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangeAttribute)) return true;
+			if (attribute.isEqualToString(OS.NSAccessibilityVisibleCharacterRangeAttribute)) return true;
+		}
+		if (accessibleValueListeners.size() > 0) {
+			if (attribute.isEqualToString(OS.NSAccessibilityValueAttribute)) return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Gets the array of attributes this object supports. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public NSArray internal_accessibilityAttributeNames(int childID) {
+		// The supported attribute set depends on the role played by the control.
+		// We may need to add or remove from the base set as needed.
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = childID;
+		event.detail = -1;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getRole(event);
+		}
+
+		// No accessible listener is overriding the role of the control, so let Cocoa
+		// return the default set for the control.
+		if (event.detail == -1)
+			return null;
+		
+		checkRole(event.detail);
+		
+		// If the attributes haven't changed return the cached list.
+		if (attributeNames != null) return retainedAutoreleased(attributeNames);
+		
+		// Set up the base set of attributes.
+		NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(baseAttributes.length);
+
+		for (int i = 0; i < baseAttributes.length; i++) {
+			returnValue.addObject(baseAttributes[i]);
+		}
+		
+		switch(event.detail) {
+			case ACC.ROLE_CLIENT_AREA:
+				break;
+			case ACC.ROLE_WINDOW:
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+//				TODO
+//				returnValue.addObject(OS.NSAccessibilityMainAttribute);
+//				returnValue.addObject(OS.NSAccessibilityMinimizedAttribute);
+				break;
+			case ACC.ROLE_MENUBAR:
+				returnValue.addObject(OS.NSAccessibilitySelectedChildrenAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleChildrenAttribute);
+				break;
+			case ACC.ROLE_MENU:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedChildrenAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleChildrenAttribute);
+				break;
+			case ACC.ROLE_MENUITEM:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				break;
+			case ACC.ROLE_SEPARATOR:
+				returnValue.addObject(OS.NSAccessibilityMaxValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityMinValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				//TODO
+//				returnValue.addObject(OS.NSAccessibilityOrientationAttribute);
+//				returnValue.addObject(OS.NSAccessibilityPreviousContentsAttribute);
+//				returnValue.addObject(OS.NSAccessibilityNextContentsAttribute);
+				break;
+			case ACC.ROLE_TOOLTIP:
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+				break;
+			case ACC.ROLE_SCROLLBAR:
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				//TODO
+//				returnValue.addObject(OS.NSAccessibilityOrientationAttribute);
+				break;
+			case ACC.ROLE_DIALOG:
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+//				TODO
+//				returnValue.addObject(OS.NSAccessibilityMainAttribute);
+//				returnValue.addObject(OS.NSAccessibilityMinimizedAttribute);
+				break;
+			case ACC.ROLE_LABEL:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				break;
+			case ACC.ROLE_PUSHBUTTON:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+				break;
+			case ACC.ROLE_CHECKBUTTON:
+			case ACC.ROLE_RADIOBUTTON:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+				break;
+			case ACC.ROLE_SPLITBUTTON:
+				break;
+			case ACC.ROLE_COMBOBOX:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityExpandedAttribute);
+				returnValue.addObject(OS.NSAccessibilityNumberOfCharactersAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedTextAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedTextRangeAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleCharacterRangeAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				break;
+			case ACC.ROLE_TEXT:
+			case ACC.ROLE_PARAGRAPH:
+			case ACC.ROLE_HEADING:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityNumberOfCharactersAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedTextAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedTextRangeAttribute);
+				returnValue.addObject(OS.NSAccessibilityInsertionPointLineNumberAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedTextRangesAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleCharacterRangeAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);				
+				break;
+			case ACC.ROLE_TOOLBAR:
+				break;
+			case ACC.ROLE_LIST:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityHeaderAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleChildrenAttribute);
+				break;
+			case ACC.ROLE_LISTITEM:
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				break;
+			case ACC.ROLE_TABLE:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityHeaderAttribute);
+				break;
+			case ACC.ROLE_TABLECELL:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				break;
+			case ACC.ROLE_TREE:
+				returnValue.addObject(OS.NSAccessibilityColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityHeaderAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleColumnsAttribute);
+				break;
+			case ACC.ROLE_TREEITEM:
+				returnValue.addObject(OS.NSAccessibilityColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedColumnsAttribute);
+				returnValue.addObject(OS.NSAccessibilityRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityHeaderAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleColumnsAttribute);
+			case ACC.ROLE_TABFOLDER:
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityContentsAttribute);
+				returnValue.addObject(OS.NSAccessibilityTabsAttribute);
+				break;
+			case ACC.ROLE_TABITEM:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+				break;
+			case ACC.ROLE_PROGRESSBAR:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityMaxValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityMinValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				break;
+			case ACC.ROLE_SLIDER:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityMaxValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityMinValueAttribute);
+				returnValue.addObject(OS.NSAccessibilityValueAttribute);
+				//TODO
+//				returnValue.addObject(OS.NSAccessibilityOrientationAttribute);
+//				increment
+//				decrement
+				break;
+			case ACC.ROLE_LINK:
+				//TODO
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+//				returnValue.addObject(OS.NSAccessibilityURLAttribute);
+//				visited
+				break;
+			case ACC.ROLE_ALERT:
+				break;
+			case ACC.ROLE_ANIMATION:
+				break;
+			case ACC.ROLE_CANVAS:
+				break;
+			case ACC.ROLE_COLUMN:
+				returnValue.removeObject(OS.NSAccessibilityChildrenAttribute);
+				returnValue.removeObject(OS.NSAccessibilityFocusedAttribute);
+				returnValue.addObject(OS.NSAccessibilityIndexAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedAttribute);
+				returnValue.addObject(OS.NSAccessibilityRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityVisibleRowsAttribute);
+				returnValue.addObject(OS.NSAccessibilityHeaderAttribute);
+				break;
+			case ACC.ROLE_DOCUMENT:
+				break;
+			case ACC.ROLE_GRAPHIC:
+				returnValue.addObject(OS.NSAccessibilityEnabledAttribute);
+				returnValue.addObject(OS.NSAccessibilityTitleAttribute);
+				returnValue.addObject(OS.NSAccessibilityDescriptionAttribute);
+				break;
+			case ACC.ROLE_GROUP:
+				break;
+			case ACC.ROLE_ROW:
+				returnValue.addObject(OS.NSAccessibilityVisibleChildrenAttribute);
+				returnValue.addObject(OS.NSAccessibilityIndexAttribute);
+				returnValue.addObject(OS.NSAccessibilitySelectedAttribute);
+				break;
+			case ACC.ROLE_SPINBUTTON:
+				break;
+			case ACC.ROLE_STATUSBAR:
+				break;
+			case ACC.ROLE_CHECKMENUITEM:
+				break;
+			case ACC.ROLE_RADIOMENUITEM:
+				break;
+			case ACC.ROLE_CLOCK:
+				break;
+			case ACC.ROLE_DATETIME:
+				break;
+			case ACC.ROLE_CALENDAR:
+				break;
+			case ACC.ROLE_FOOTER:
+				break;
+			case ACC.ROLE_HEADER:
+				break;
+			case ACC.ROLE_FORM:
+				break;
+			case ACC.ROLE_PAGE:
+				break;
+			case ACC.ROLE_SECTION:
+				break;
+		}
+		
+		
+		/*
+		 * Only report back sub-roles when the SWT role maps to a sub-role.
+		 */
+		if (event.detail != -1) {
+			String osRole = roleToOs(event.detail);
+			if (osRole.indexOf(':') == -1)
+				returnValue.removeObject(OS.NSAccessibilitySubroleAttribute);
+		}
+
+		/*
+		 * Children never return their own children, so remove that attribute.
+		 */
+		if (childID != ACC.CHILDID_SELF) {
+			returnValue.removeObject(OS.NSAccessibilityChildrenAttribute);
+		}
+		
+		if (childID == ACC.CHILDID_SELF) {
+			attributeNames = returnValue;
+			attributeNames.retain();
+			return retainedAutoreleased(attributeNames);
+		} else {
+			// Caller must retain if necessary.
+			return returnValue;
+		}
+	}
+
+	/**
+	 * Returns the value for the specified attribute. Return type depends on the attribute
+	 * being queried; see the implementations of the accessor methods for details. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public id internal_accessibilityAttributeValue(NSString attribute, int childID) {
+		if (attribute.isEqualToString(OS.NSAccessibilityRoleAttribute)) return getRoleAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilitySubroleAttribute)) return getSubroleAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityRoleDescriptionAttribute)) return getRoleDescriptionAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityExpandedAttribute)) return getExpandedAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityHelpAttribute)) return getHelpAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityTitleAttribute)) return getTitleAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityValueAttribute)) return getValueAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityMaxValueAttribute)) return getMaxValueAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityMinValueAttribute)) return getMinValueAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityEnabledAttribute)) return getEnabledAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityFocusedAttribute)) return getFocusedAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityParentAttribute)) return getParentAttribute(childID);
-		if (attribute.isEqualToString(OS.NSAccessibilityChildrenAttribute)) return getChildrenAttribute(childID);
-		if (attribute.isEqualToString(OS.NSAccessibilityContentsAttribute)) return getChildrenAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityChildrenAttribute)) return getChildrenAttribute(childID, false);
+		if (attribute.isEqualToString(OS.NSAccessibilityVisibleChildrenAttribute)) return getChildrenAttribute(childID, true);
+		if (attribute.isEqualToString(OS.NSAccessibilityContentsAttribute)) return getChildrenAttribute(childID, false);
 		// FIXME:  There's no specific API just for tabs, which won't include the buttons (if any.)
 		if (attribute.isEqualToString(OS.NSAccessibilityTabsAttribute)) return getTabsAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityWindowAttribute)) return getWindowAttribute(childID);
@@ -381,19 +1160,63 @@ public class Accessible {
 		if (attribute.isEqualToString(OS.NSAccessibilityInsertionPointLineNumberAttribute)) return getInsertionPointLineNumberAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangesAttribute)) return getSelectedTextRangesAttribute(childID);
 		if (attribute.isEqualToString(OS.NSAccessibilityVisibleCharacterRangeAttribute)) return getVisibleCharacterRangeAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityServesAsTitleForUIElementsAttribute)) return getServesAsTitleForUIElementsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityTitleUIElementAttribute)) return getTitleUIElementAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityColumnsAttribute)) return getColumnsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilitySelectedColumnsAttribute)) return getSelectedColumnsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityRowsAttribute)) return getRowsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilitySelectedRowsAttribute)) return getSelectedRowsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityVisibleRowsAttribute)) return getVisibleRowsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityVisibleColumnsAttribute)) return getVisibleColumnsAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityHeaderAttribute)) return getHeaderAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityIndexAttribute)) return getIndexAttribute(childID);
+		if (attribute.isEqualToString(OS.NSAccessibilitySelectedAttribute)) return getSelectedAttribute(childID);
+		if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityRowIndexRangeAttribute)) return getRowIndexRangeAttribute(childID);
+		if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityColumnIndexRangeAttribute)) return getColumnIndexRangeAttribute(childID);
 		
 		// If this object don't know how to get the value it's up to the control itself to return an attribute value.
 		return null;
 	}
 	
+	/**
+	 * Returns the value of the specified attribute, using the supplied parameter. Return
+	 * and parameter types vary depending on the attribute being queried. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
 	public id internal_accessibilityAttributeValue_forParameter(NSString attribute, id parameter, int childID) {
-		if (attribute.isEqualToString(OS.NSAccessibilityStringForRangeParameterizedAttribute)) return getStringForRangeAttribute(parameter, childID);
-		if (attribute.isEqualToString(OS.NSAccessibilityRangeForLineParameterizedAttribute)) return getRangeForLineParameterizedAttribute(parameter, childID);		
+		if (attribute.isEqualToString(OS.NSAccessibilityStringForRangeParameterizedAttribute)) return getStringForRangeParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityRangeForLineParameterizedAttribute)) return getRangeForLineParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityRangeForIndexParameterizedAttribute)) return getRangeForIndexParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityLineForIndexParameterizedAttribute)) return getLineForIndexParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityBoundsForRangeParameterizedAttribute)) return getBoundsForRangeParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityRangeForPositionParameterizedAttribute)) return getRangeForPositionParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityAttributedStringForRangeParameterizedAttribute)) return getAttributedStringForRangeParameterizedAttribute(parameter, childID);
+		if (attribute.isEqualToString(OS.NSAccessibilityStyleRangeForIndexParameterizedAttribute)) return getStyleRangeForIndexAttribute(parameter, childID);
+		if (OS.VERSION >= 0x1060 && attribute.isEqualToString(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute)) return getCellForColumnAndRowParameter(parameter, childID);
 		return null;
 	}
 
-	// Returns the UI Element that has the focus. You can assume that the search for the focus has already been narrowed down to the receiver.
-	// Override this method to do a deeper search with a UIElement - e.g. a NSMatrix would determine if one of its cells has the focus.
+	/**
+	 * Returns the UI Element that has the focus. You can assume that the search 
+	 * for the focus has already been narrowed down to the receiver.
+	 * Override this method to do a deeper search with a UIElement - 
+	 * e.g. a NSMatrix would determine if one of its cells has the focus. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
 	public id internal_accessibilityFocusedUIElement(int childID) {
 		AccessibleControlEvent event = new AccessibleControlEvent(this);
 		event.childID = ACC.CHILDID_MULTIPLE; // set to invalid value, to test if the application sets it in getFocus()
@@ -420,9 +1243,20 @@ public class Accessible {
 		return new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(event.childID).id));
 	}
 
-	// Returns the deepest descendant of the UIElement hierarchy that contains the point. 
-	// You can assume the point has already been determined to lie within the receiver.
-	// Override this method to do deeper hit testing within a UIElement - e.g. a NSMatrix would test its cells. The point is bottom-left relative screen coordinates.
+	/**
+	 * Returns the deepest descendant of the UIElement hierarchy that contains the point. 
+	 * You can assume the point has already been determined to lie within the receiver.
+	 * Override this method to do deeper hit testing within a UIElement - e.g. a NSMatrix 
+	 * would test its cells. The point is bottom-left relative screen coordinates.
+	 *
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
 	public id internal_accessibilityHitTest(NSPoint point, int childID) {
 		AccessibleControlEvent event = new AccessibleControlEvent(this);
 		event.x = (int) point.x;
@@ -437,11 +1271,11 @@ public class Accessible {
 		}
 		
 		// The listener did not respond, so let Cocoa figure it out.
-		if (event.childID == ACC.CHILDID_MULTIPLE)
+		if (event.childID == ACC.CHILDID_MULTIPLE && event.accessible == null)
 			return null;
 		
 		if (event.accessible != null) {
-			return new id(OS.NSAccessibilityUnignoredAncestor(event.accessible.control.view.id));
+			return new id(OS.NSAccessibilityUnignoredAncestor(event.accessible.delegate.id));
 		}
 	
 		if (event.childID == ACC.CHILDID_SELF || event.childID == ACC.CHILDID_NONE) {
@@ -451,27 +1285,86 @@ public class Accessible {
 		return new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(event.childID).id));
 	}
 
-	// Return YES if the UIElement doesn't show up to the outside world - i.e. its parent should return the UIElement's children as its own - cutting the UIElement out. E.g. NSControls are ignored when they are single-celled.
+	/**
+	 * Return YES if the UIElement doesn't show up to the outside world - 
+	 * i.e. its parent should return the UIElement's children as its own - 
+	 * cutting the UIElement out. E.g. NSControls are ignored when they are single-celled.
+	 *
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
 	public boolean internal_accessibilityIsIgnored(int childID) {
-		return false;
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = childID;
+		event.detail = -1;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getRole(event);
+		}
+
+		boolean shouldIgnore = (event.detail == -1);
+		
+		if (shouldIgnore) {
+			shouldIgnore = getTitleAttribute(childID) == null && getHelpAttribute(childID) == null && getDescriptionAttribute(childID) == null;
+		}
+		
+		return shouldIgnore;
 	}
 
-	// parameterized attribute methods
+	/**
+	 * Return the array of supported attributes that take parameters.
+	 *
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
 	public NSArray internal_accessibilityParameterizedAttributeNames(int childID) {
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = childID;
+		event.detail = -1;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getRole(event);
+		}
 
+		// No accessible listener is overriding the role of the control, so let Cocoa
+		// return the default set for the control.
+		if (event.detail == -1)
+			return null;
+		
+		checkRole(event.detail);
+		
 		if ((childID == ACC.CHILDID_SELF) && (parameterizedAttributeNames != null)) {
 			return retainedAutoreleased(parameterizedAttributeNames);
 		}
 
 		NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(4);
-
-		if (accessibleTextListeners.size() > 0) {
-			for (int i = 0; i < baseParameterizedAttributes.length; i++) {
-				if (!returnValue.containsObject(baseParameterizedAttributes[i])) {
-					returnValue.addObject(baseParameterizedAttributes[i]);
-				}
-			}
-
+		
+		switch(event.detail) {
+			case ACC.ROLE_TEXT:
+			case ACC.ROLE_PARAGRAPH:
+			case ACC.ROLE_HEADING:
+				returnValue.addObject(OS.NSAccessibilityStringForRangeParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityRangeForLineParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityRangeForIndexParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityLineForIndexParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityBoundsForRangeParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityRangeForPositionParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityAttributedStringForRangeParameterizedAttribute);
+				returnValue.addObject(OS.NSAccessibilityStyleRangeForIndexParameterizedAttribute);
+				break;
+			case ACC.ROLE_TABLE:
+				if (OS.VERSION >= 0x1060) returnValue.addObject(OS.NSAccessibilityCellForColumnAndRowParameterizedAttribute);
+				break;
 		}
 
 		if (childID == ACC.CHILDID_SELF) {
@@ -482,49 +1375,312 @@ public class Accessible {
 			// Caller must retain if they want to keep it.
 			return returnValue;
 		}
-	}
-
-	public void internal_accessibilityPerformAction(NSString action, int childID) {
-		// TODO Auto-generated method stub
-		// No action support for now.
-	}
+	}
+
+	/**
+	 * Performs the specified action.
+	 *
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public boolean internal_accessibilityPerformAction(NSString action, int childID) {
+		String actionName = action.getString();
+		if (accessibleActionListeners.size() > 0) {
+			AccessibleActionEvent event = new AccessibleActionEvent(this);
+			for (int i = 0; i < accessibleActionListeners.size(); i++) {
+				AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+				listener.getActionCount(event);
+			}
+			int index = -1;
+			for (int i = 0; i < event.count; i++) {
+				event.index = i;
+				for (int j = 0; j < accessibleActionListeners.size(); j++) {
+					AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(j);
+					listener.getName(event);
+				}
+				if (actionName.equals(event.result)) {
+					index = i;
+					break;
+				}
+			}
+			if (index != -1) {
+				event.index = index;
+				event.result = null;
+				for (int i = 0; i < accessibleActionListeners.size(); i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+					listener.doAction(event);
+				}
+				return ACC.OK.equals(event.result);
+			}
+		} 
+		return false;
+	}
+
+	/**
+	 * Set the value of the specified attribute to the given value.
+	 * Unsupported attributes are ignored.
+	 *
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void internal_accessibilitySetValue_forAttribute(id value, NSString attribute, int childId) {
+		if (attribute.isEqualToString(OS.NSAccessibilitySelectedTextRangeAttribute)) setSelectedTextRangeAttribute(value, childId);
+		if (attribute.isEqualToString(OS.NSAccessibilityVisibleCharacterRangeAttribute)) setVisibleCharacterRangeAttribute(value, childId);
+		
+		if (accessibleValueListeners.size() > 0) {
+			AccessibleValueEvent event = new AccessibleValueEvent(this);
+			NSNumber number = new NSNumber(value);
+			event.value = new Double(number.doubleValue());
+			for (int i = 0; i < accessibleValueListeners.size(); i++) {
+				AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+				listener.setCurrentValue(event);
+			}
+		}
+	}
+	
+	/**
+	 * Disposes of the operating system resources associated with
+	 * the receiver, and removes the receiver from its parent's
+	 * list of children.
+	 * <p>
+	 * This method should be called when an accessible that was created
+	 * with the public constructor <code>Accessible(Accessible parent)</code>
+	 * is no longer needed. You do not need to call this when the receiver's
+	 * control is disposed, because all <code>Accessible</code> instances
+	 * associated with a control are released when the control is disposed.
+	 * It is also not necessary to call this for instances of <code>Accessible</code>
+	 * that were retrieved with <code>Control.getAccessible()</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public void dispose () {
+		if (parent == null) return;
+		release(true);
+		parent = null;
+	}
+
+	/**
+	 * Returns the control for this Accessible object. 
+	 *
+	 * @return the receiver's control
+	 * @since 3.0
+	 */
+	public Control getControl() {
+		return control;
+	}
+
+	/**
+	 * Invokes platform specific functionality to dispose an accessible object.
+	 * <p>
+	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+	 * API for <code>Accessible</code>. It is marked public only so that it
+	 * can be shared within the packages provided by SWT. It is not
+	 * available on all platforms, and should never be called from
+	 * application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void internal_dispose_Accessible() {
+		release(true);
+	}
+
+	id getAttributedStringForRangeParameterizedAttribute(id parameter, int childID) {
+		if (accessibleAttributeListeners.size() == 0) return null;
+		
+		id stringFragment = getStringForRangeParameterizedAttribute(parameter, childID);
+		NSMutableAttributedString attribString = (NSMutableAttributedString)new NSMutableAttributedString().alloc();
+		attribString.initWithString(new NSString(stringFragment), null);
+		attribString.autorelease();
+		
+		// Parameter is an NSRange wrapped in an NSValue. 
+		NSValue parameterObject = new NSValue(parameter.id);
+		NSRange range = parameterObject.rangeValue();
+		
+		AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
+		
+		event.offset = (int) /*64*/ range.location;
+		event.start = event.end = -1;
+		
+		NSRange attributeRange = new NSRange();
+		
+		while (event.offset < range.location + range.length) {
+			if (accessibleAttributeListeners.size() > 0) {
+				for (int i = 0; i < accessibleAttributeListeners.size(); i++) {
+					AccessibleAttributeListener listener = (AccessibleAttributeListener) accessibleAttributeListeners.elementAt(i);
+					listener.getTextAttributes(event);
+				}
+			}
+
+			if (event.start == -1 && event.end == -1) return stringFragment;
+			
+			// The returned attributed string must have zero-based attributes.
+			attributeRange.location = event.start - range.location;
+			attributeRange.length = event.end - event.start;
+
+			// attributeRange.location can be negative if the start of the requested range falls in the middle of a style run.
+			// If that happens, clamp to zero and adjust the length by the amount of adjustment.
+			if (attributeRange.location < 0) {
+				attributeRange.length -= -attributeRange.location;
+				attributeRange.location = 0;
+			}
+
+			// Likewise, make sure the last attribute set does not run past the end of the requested range. 
+			if (attributeRange.location + attributeRange.length > range.length) {
+				attributeRange.length = range.length - attributeRange.location;
+			}
+
+			// Reset the offset so we pick up the next set of attributes that change.
+			event.offset = event.end;
+
+			if (event.textStyle != null) {
+				TextStyle ts = event.textStyle;
+				if (ts.font != null) {
+					NSMutableDictionary fontInfoDict = NSMutableDictionary.dictionaryWithCapacity(4);
+
+					NSFont fontUsed = ts.font.handle;
+					// Get font name and size from NSFont
+					NSString fontName = fontUsed.fontName();
+					fontInfoDict.setValue(fontName, OS.NSAccessibilityFontNameKey);
+					NSString familyName = fontUsed.familyName();
+					fontInfoDict.setValue(familyName, OS.NSAccessibilityFontFamilyKey);
+					NSString displayName = fontUsed.displayName();
+					fontInfoDict.setValue(displayName, OS.NSAccessibilityVisibleNameKey);
+					float /*double*/ fontSize = fontUsed.pointSize();
+					fontInfoDict.setValue(NSNumber.numberWithDouble(fontSize), OS.NSAccessibilityFontSizeKey);
+
+					attribString.addAttribute(OS.NSAccessibilityFontTextAttribute, fontInfoDict, attributeRange);
+				}
+				
+				if (ts.foreground != null) {
+					addCGColor(ts.foreground.handle, attribString, OS.NSAccessibilityForegroundColorTextAttribute, attributeRange);
+				}
+				
+				if (ts.background != null) {
+					addCGColor(ts.background.handle, attribString, OS.NSAccessibilityBackgroundColorTextAttribute, attributeRange);
+				}
+				
+				if (ts.underline) {
+					int style = ts.underlineStyle;
+					NSString attribute = OS.NSAccessibilityUnderlineTextAttribute;
+					NSNumber styleObj = null;
+					switch (style) {
+					case SWT.UNDERLINE_SINGLE:
+						styleObj = NSNumber.numberWithInt(OS.kAXUnderlineStyleSingle);
+						break;
+					case SWT.UNDERLINE_DOUBLE:
+						styleObj = NSNumber.numberWithInt(OS.kAXUnderlineStyleDouble);
+						break;
+					case SWT.UNDERLINE_SQUIGGLE:
+						attribute = OS.NSAccessibilityMisspelledTextAttribute;
+						styleObj = NSNumber.numberWithBool(true);
+						break;
+					default:
+						styleObj = NSNumber.numberWithInt(OS.kAXUnderlineStyleNone);
+					}
+					
+					attribString.addAttribute(attribute, styleObj, attributeRange);					
+				}
+				
+				if (ts.underlineColor != null) {
+					addCGColor(ts.underlineColor.handle, attribString, OS.NSAccessibilityUnderlineColorTextAttribute, attributeRange);
+				}
+				
+				if (ts.strikeout) {
+					attribString.addAttribute(OS.NSAccessibilityStrikethroughTextAttribute, NSNumber.numberWithBool(true), attributeRange);
+					
+					if (ts.strikeoutColor != null) {
+						addCGColor(ts.strikeoutColor.handle, attribString, OS.NSAccessibilityStrikethroughColorTextAttribute, attributeRange);
+					}
+				}
+				
+				if (ts.data != null) {
+					if (ts.data instanceof URL) {
+						URL dataAsURL = (URL)ts.data;
+						NSURL linkURL = NSURL.URLWithString(NSString.stringWith(dataAsURL.toExternalForm()));
+						attribString.addAttribute(OS.NSAccessibilityLinkTextAttribute, linkURL, attributeRange);
+					}
+				}
+			}
+		}
+		
+		// Now add the alignment, justification, and indent, if available.
+		AccessibleAttributeEvent docAttributes = new AccessibleAttributeEvent(this);
+		docAttributes.indent = Integer.MAX_VALUE; // if unchanged no listener filled it in.
+		if (accessibleAttributeListeners.size() > 0) {
+			for (int i = 0; i < accessibleAttributeListeners.size(); i++) {
+				AccessibleAttributeListener listener = (AccessibleAttributeListener) accessibleAttributeListeners.elementAt(i);
+				listener.getAttributes(docAttributes);
+			}
+		}
 
-	/**
-	 * Returns the control for this Accessible object. 
-	 *
-	 * @return the receiver's control
-	 * @since 3.0
-	 */
-	public Control getControl() {
-		return control;
+		if (docAttributes.indent != Integer.MAX_VALUE) {
+			NSMutableDictionary paragraphDict = NSMutableDictionary.dictionaryWithCapacity(3);
+			int osAlignment = 0;
+			// FIXME: Doesn't account for right-to-left text?
+			switch (docAttributes.alignment) {
+			case SWT.CENTER:
+				osAlignment = OS.NSCenterTextAlignment;
+				break;
+			case SWT.RIGHT:
+				osAlignment = OS.NSRightTextAlignment;
+				break;
+			case SWT.LEFT:
+			default:
+				osAlignment = OS.NSLeftTextAlignment;
+				break;
+			}
+			paragraphDict.setValue(NSNumber.numberWithInt(osAlignment), NSString.stringWith("AXTextAlignment"));
+			range.location = 0;
+			attribString.addAttribute(NSString.stringWith("AXParagraphStyle"), paragraphDict, range);
+		}
+		
+		return attribString;
 	}
 
-	/**
-	 * Invokes platform specific functionality to dispose an accessible object.
-	 * <p>
-	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
-	 * API for <code>Accessible</code>. It is marked public only so that it
-	 * can be shared within the packages provided by SWT. It is not
-	 * available on all platforms, and should never be called from
-	 * application code.
-	 * </p>
-	 */
-	public void internal_dispose_Accessible() {
-		if (actionNames != null) actionNames.release();
-		actionNames = null;
-		if (attributeNames != null) attributeNames.release();
-		attributeNames = null;
-		if (parameterizedAttributeNames != null) parameterizedAttributeNames.release();
-		parameterizedAttributeNames = null;
+	id getBoundsForRangeParameterizedAttribute(id parameter, int childID) {
+		if (accessibleTextExtendedListeners.size() == 0) return null;
 		
-		Collection delegates = children.values();
-		Iterator iter = delegates.iterator();
-		while (iter.hasNext()) {
-			SWTAccessibleDelegate childDelegate = (SWTAccessibleDelegate)iter.next();
-			childDelegate.internal_dispose_SWTAccessibleDelegate();
+		id returnValue = null;
+		NSValue parameterObject = new NSValue(parameter.id);
+		NSRange range = parameterObject.rangeValue();
+		NSRect rect = new NSRect();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event  = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.start = (int)/*64*/range.location;
+			event.end = (int)/*64*/(range.location + range.length);
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getTextBounds(event);
+			}
+			rect.x = event.x;
+			
+			// Flip y coordinate for Cocoa.
+			NSArray screens = NSScreen.screens();
+			NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+			NSRect frame = screen.frame();
+			rect.y = frame.height - event.y - event.height;
+			
+			rect.width = event.width;
+			rect.height = event.height;
+			returnValue = NSValue.valueWithRect(rect);
+		} else {
+			//FIXME???
+			//how to implement with old listener
 		}
-		
-		children.clear();
+		return returnValue;
 	}
 	
 	id getExpandedAttribute(int childID) {
@@ -547,6 +1703,34 @@ public class Accessible {
 		
 		return returnValue;
 	}
+
+	id getRangeForPositionParameterizedAttribute(id parameter, int childID) {
+		id returnValue = null;
+		NSValue parameterObject = new NSValue(parameter.id);
+		NSPoint point = parameterObject.pointValue();
+		NSRange range = new NSRange();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			NSArray screens = NSScreen.screens();
+			NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+			NSRect frame = screen.frame();
+			point.y = frame.height - point.y;
+			AccessibleTextEvent event  = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.x = (int)point.x;
+			event.y = (int)point.y;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getOffsetAtPoint(event);
+			}
+			range.location = event.offset;
+			range.length = 1;
+		} else {
+			//FIXME???
+			//how to implement with old listener
+		}
+		returnValue = NSValue.valueWithRange(range);
+		return returnValue;
+	}
 	
 	NSString getRoleAttribute(int childID) {
 		NSString returnValue = null;
@@ -597,25 +1781,29 @@ public class Accessible {
 			listener.getRole(event);
 		}
 		if (event.detail != -1) {
-			String appRole = roleToOs (event.detail);
-			String appSubrole = null;
-			int index = appRole.indexOf(':');
-			if (index != -1) {
-				appSubrole = appRole.substring(index + 1);
-				appRole = appRole.substring(0, index);
+			if (event.detail == ACC.ROLE_TABITEM) {
+				returnValue = new NSString(OS.NSAccessibilityRoleDescription (NSString.stringWith("AXTab").id, 0));
+			} else {
+				String appRole = roleToOs (event.detail);
+				String appSubrole = null;
+				int index = appRole.indexOf(':');
+				if (index != -1) {
+					appSubrole = appRole.substring(index + 1);
+					appRole = appRole.substring(0, index);
+				}
+				NSString nsAppRole = NSString.stringWith(appRole);
+				NSString nsAppSubrole = null;
+				
+				if (appSubrole != null) nsAppSubrole = NSString.stringWith(appSubrole);
+				returnValue = new NSString(OS.NSAccessibilityRoleDescription (((nsAppRole != null) ? nsAppRole.id : 0), (nsAppSubrole != null) ? nsAppSubrole.id : 0));
 			}
-			NSString nsAppRole = NSString.stringWith(appRole);
-			NSString nsAppSubrole = null;
-			
-			if (appSubrole != null) nsAppSubrole = NSString.stringWith(appSubrole);
-			returnValue = new NSString(OS.NSAccessibilityRoleDescription (((nsAppRole != null) ? nsAppRole.id : 0), (nsAppSubrole != null) ? nsAppSubrole.id : 0));
 		}
 		return returnValue;
 	}
 	
 	id getTitleAttribute (int childID) {
 		
-		id returnValue = null;//NSString.stringWith("");
+		id returnValue = null;
 		
 		/*
 		* Feature of the Macintosh.  The text of a Label is returned in its value,
@@ -643,114 +1831,134 @@ public class Accessible {
 		return returnValue;
 	}
 	
-	id getValueAttribute (int childID) {
+	id getTitleUIElementAttribute(int childID) {
 		id returnValue = null;
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.detail = -1;
-		event.result = null; //TODO: could pass the OS value to the app
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getRole(event);
-			listener.getValue(event);
+		Relation relation = relations[ACC.RELATION_LABELLED_BY]; 
+		if (relation != null) {
+			returnValue = relation.getTitleUIElement();
 		}
-		int role = event.detail;
-		String value = event.result;
-
-		switch (role) {
-		case ACC.ROLE_RADIOBUTTON: // 1 = on, 0 = off
-		case ACC.ROLE_CHECKBUTTON: // 1 = checked, 0 = unchecked, 2 = mixed
-		case ACC.ROLE_SCROLLBAR: // numeric value representing the position of the scroller
-		case ACC.ROLE_SLIDER: // the value associated with the position of the slider thumb
-		case ACC.ROLE_PROGRESSBAR: // the value associated with the fill level of the progress bar
-			if (value != null) {
-				try {
-					int number = Integer.parseInt(value);
-					returnValue = NSNumber.numberWithInt(number);
-				} catch (NumberFormatException ex) {
-					if (value.equalsIgnoreCase("true")) {
-						returnValue = NSNumber.numberWithBool(true);
-					} else if (value.equalsIgnoreCase("false")) {
-						returnValue = NSNumber.numberWithBool(false);
-					}
-				}
-			} else {
-				returnValue = NSNumber.numberWithBool(false);
+		return returnValue;
+	}
+	
+	id getValueAttribute (int childID) {
+		id returnValue = null;
+		if (accessibleValueListeners.size() > 0) {
+			AccessibleValueEvent event = new AccessibleValueEvent(this);
+			for (int i = 0; i < accessibleValueListeners.size(); i++) {
+				AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+				listener.getCurrentValue(event);
 			}
-			break;
-		case ACC.ROLE_TABFOLDER: // the accessibility object representing the currently selected tab item
-		case ACC.ROLE_TABITEM:  // 1 = selected, 0 = not selected
-			AccessibleControlEvent ace = new AccessibleControlEvent(this);
-			ace.childID = -4;
+			returnValue = NSNumber.numberWithDouble(event.value.doubleValue());
+		} else {
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.detail = -1;
+			event.result = null; //TODO: could pass the OS value to the app
 			for (int i = 0; i < accessibleControlListeners.size(); i++) {
 				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-				listener.getSelection(ace);
-			}
-			if (ace.childID >= ACC.CHILDID_SELF) {
-				if (role == ACC.ROLE_TABITEM) {
-			 		returnValue = NSNumber.numberWithBool(ace.childID == childID);
-				} else {
-					returnValue = new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(ace.childID).id));
-				}
-			} else {
-		 		returnValue = NSNumber.numberWithBool(false);				
-			}
-			break;
-		case ACC.ROLE_COMBOBOX: // text of the currently selected item
-		case ACC.ROLE_TEXT: // text in the text field
-			if (value != null) returnValue = NSString.stringWith(value);
-			break;
-		case ACC.ROLE_LABEL: // text in the label
-			/* On a Mac, the 'value' of a label is the same as the 'name' of the label. */
-			AccessibleEvent e = new AccessibleEvent(this);
-			e.childID = childID;
-			e.result = null;
-			for (int i = 0; i < accessibleListeners.size(); i++) {
-				AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
-				listener.getName(e);
+				listener.getRole(event);
+				listener.getValue(event);
 			}
-			if (e.result != null) {
-				returnValue = NSString.stringWith(e.result);
-			} else {
-				if (value != null) returnValue = NSString.stringWith(value);
+			int role = event.detail;
+			String value = event.result;
+	
+			switch (role) {
+				case ACC.ROLE_RADIOBUTTON: // 1 = on, 0 = off
+				case ACC.ROLE_CHECKBUTTON: // 1 = checked, 0 = unchecked, 2 = mixed
+				case ACC.ROLE_SCROLLBAR: // numeric value representing the position of the scroller
+				case ACC.ROLE_SLIDER: // the value associated with the position of the slider thumb
+				case ACC.ROLE_PROGRESSBAR: // the value associated with the fill level of the progress bar
+					if (value != null) {
+						try {
+							int number = Integer.parseInt(value);
+							returnValue = NSNumber.numberWithBool(number == 0 ? false : true);
+						} catch (NumberFormatException ex) {
+							if (value.equalsIgnoreCase("true")) {
+								returnValue = NSNumber.numberWithBool(true);
+							} else if (value.equalsIgnoreCase("false")) {
+								returnValue = NSNumber.numberWithBool(false);
+							}
+						}
+					} else {
+						returnValue = NSNumber.numberWithBool(false);
+					}
+					break;
+				case ACC.ROLE_TABFOLDER: // the accessibility object representing the currently selected tab item
+				case ACC.ROLE_TABITEM:  // 1 = selected, 0 = not selected
+					AccessibleControlEvent ace = new AccessibleControlEvent(this);
+					ace.childID = -4;
+					for (int i = 0; i < accessibleControlListeners.size(); i++) {
+						AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+						listener.getSelection(ace);
+					}
+					if (ace.childID >= ACC.CHILDID_SELF) {
+						if (role == ACC.ROLE_TABITEM) {
+					 		returnValue = NSNumber.numberWithBool(ace.childID == childID);
+						} else {
+							returnValue = new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(ace.childID).id));
+						}
+					} else {
+				 		returnValue = NSNumber.numberWithBool(false);				
+					}
+					break;
+				case ACC.ROLE_COMBOBOX: // text of the currently selected item
+				case ACC.ROLE_TEXT: // text in the text field
+				case ACC.ROLE_PARAGRAPH: // text in the text field
+				case ACC.ROLE_HEADING: // text in the text field
+					if (value != null) returnValue = NSString.stringWith(value);
+					break;
+				case ACC.ROLE_TABLECELL: // text in the cell
+				case ACC.ROLE_LABEL: // text in the label
+					/* On a Mac, the 'value' of a label is the same as the 'name' of the label. */
+					AccessibleEvent e = new AccessibleEvent(this);
+					e.childID = childID;
+					e.result = null;
+					for (int i = 0; i < accessibleListeners.size(); i++) {
+						AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+						listener.getName(e);
+					}
+					if (e.result != null) {
+						returnValue = NSString.stringWith(e.result);
+					} else {
+						if (value != null) returnValue = NSString.stringWith(value);
+					}
+					returnValue = returnValue == null ? NSString.string() : returnValue;
+					break;
 			}
-			break;
 		}
-		
 		return returnValue;
 	}
 	
 	id getEnabledAttribute (int childID) {
 		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.detail = -1;
+		event.detail = ACC.STATE_NORMAL;
+		event.childID = childID;
 		for (int i = 0; i < accessibleControlListeners.size(); i++) {
 			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
 			listener.getState(event);
 		}
-
-		return NSNumber.numberWithBool(control.isEnabled());
+		boolean enabled = (event.detail & ACC.STATE_DISABLED) == 0;
+		if (!enabled && delegate == null) enabled = control.isEnabled();
+		return NSNumber.numberWithBool(enabled);
 	}
 	
 	id getFocusedAttribute (int childID) {
 		AccessibleControlEvent event = new AccessibleControlEvent(this);
 		event.childID = ACC.CHILDID_MULTIPLE; // set to invalid value, to test if the application sets it in getFocus()
-		event.accessible = null;
 		for (int i = 0; i < accessibleControlListeners.size(); i++) {
 			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
 			listener.getFocus(event);
 		}
 
 		/* The application can optionally answer an accessible. */
-		// FIXME:
-//		if (event.accessible != null) {
-//			boolean hasFocus = (event.accessible.childID == childID) && (event.accessible.control == this.control);
-//			return NSNumber.numberWithBool(hasFocus);
-//		}
+		if (event.accessible != null) {
+			boolean hasFocus = (event.accessible.index == childID) && (event.accessible.control == this.control);
+			return NSNumber.numberWithBool(hasFocus);
+		}
 		
 		/* Or the application can answer a valid child ID, including CHILDID_SELF and CHILDID_NONE. */
 		if (event.childID == ACC.CHILDID_SELF) {
-			boolean hasFocus = (event.childID == childID);
-			return NSNumber.numberWithBool(hasFocus);
+			return NSNumber.numberWithBool(true);
 		}
 		if (event.childID == ACC.CHILDID_NONE) {
 			return NSNumber.numberWithBool(false);
@@ -762,21 +1970,40 @@ public class Accessible {
 
 		// Invalid childID at this point means the application did not implement getFocus, so 
 		// let the default handler return the native focus.
-		boolean hasFocus = (this.control.view.window().firstResponder() == control.view);
-		return NSNumber.numberWithBool(hasFocus);
+		return null;
 	}
 	
 	id getParentAttribute (int childID) {
-		// Returning null here means 'let Cocoa figure it out.'
-		if (childID == ACC.CHILDID_SELF)
-			return null;
-		else
-			return new id(OS.NSAccessibilityUnignoredAncestor(control.view.id));
+		id returnValue = null;
+		if (childID == ACC.CHILDID_SELF) {
+			if (parent != null) {
+				if (parent.delegate != null) {
+					returnValue = parent.delegate;
+				} else {
+					returnValue = new id(OS.NSAccessibilityUnignoredAncestor(accessibleHandle(parent).id));
+				}
+			} else {
+				// Returning null here means 'let Cocoa figure it out.'
+				returnValue = null;
+			}
+		} else {
+			returnValue = new id(OS.NSAccessibilityUnignoredAncestor(accessibleHandle(this).id));
+		}
+		return returnValue;
 	}
 	
-	id getChildrenAttribute (int childID) {
-		id returnValue = null;
+	id getChildrenAttribute (int childID, boolean visibleOnly) {
+		id returnValue = null; 
 		if (childID == ACC.CHILDID_SELF) {
+			// Test for a table first.
+			if (currentRole == ACC.ROLE_TABLE) {
+				// If the row count differs from the row elements returned,
+				// we need to create our own adapter to map the cells onto 
+				// rows and columns.  The rows and columns attributes determine that for us.
+				getRowsAttribute(childID);
+				getColumnsAttribute(childID);
+			}
+			
 			AccessibleControlEvent event = new AccessibleControlEvent(this);
 			event.childID = childID;
 			event.detail = -1; // set to impossible value to test if app resets
@@ -784,28 +2011,32 @@ public class Accessible {
 				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
 				listener.getChildCount(event);
 			}
-			if (event.detail > 0) {
+			int childCount = event.detail;
+			event.detail = (visibleOnly ? ACC.VISIBLE : 0);
+			if (childCount >= 0) {
 				for (int i = 0; i < accessibleControlListeners.size(); i++) {
 					AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
 					listener.getChildren(event);
 				}
-				Object [] appChildren = event.children;
-				if (appChildren != null && appChildren.length > 0) {
-					/* return an NSArray of NSAccessible objects. */
-					NSMutableArray childArray = NSMutableArray.arrayWithCapacity(appChildren.length);
-
-					for (int i = 0; i < appChildren.length; i++) {
-						Object child = appChildren[i];
+				Object[] children = event.children;
+				NSMutableArray childArray = NSMutableArray.arrayWithCapacity(childCount);
+				for (int i = 0; i < childCount; i++) {
+					Object child = children[i];
+					if (child instanceof Accessible) {
+						Accessible accessible = (Accessible)child;
+						if (accessible.delegate != null) {
+							childArray.addObject(accessible.delegate);
+						} else {
+							childArray.addObject(accessibleHandle(accessible));
+						}
+					} else {
 						if (child instanceof Integer) {
 							id accChild = childIDToOs(((Integer)child).intValue());							
 							childArray.addObject(accChild);
-						} else {
-							childArray.addObject(((Accessible)child).control.view);
-						}
+						} 
 					}
-
-					returnValue = new id(OS.NSAccessibilityUnignoredChildren(childArray.id));
 				}
+				returnValue = new id(OS.NSAccessibilityUnignoredChildren(childArray.id));
 			}
 		} else {
 			// Lightweight children have no children of their own.
@@ -944,6 +2175,22 @@ public class Accessible {
 		return returnValue;
 	}
 	
+	id getCellForColumnAndRowParameter(id parameter, int childID) {
+		id returnValue = null;
+		NSArray parameterObject = new NSArray(parameter.id);
+		if (parameterObject.count() == 2) {
+			AccessibleTableEvent event = new AccessibleTableEvent(this);
+			event.column = new NSNumber(parameterObject.objectAtIndex(0)).intValue();
+			event.row = new NSNumber(parameterObject.objectAtIndex(1)).intValue();
+			for (int i = 0; i < accessibleTableListeners.size(); i++) {
+				AccessibleTableListener listener = (AccessibleTableListener)accessibleTableListeners.elementAt(i);
+				listener.getCell(event);
+				returnValue = event.accessible.delegate;
+			}
+		}
+		return returnValue;
+	}
+
 	id getDescriptionAttribute (int childID) {
 		AccessibleEvent event = new AccessibleEvent(this);
 		event.childID = childID;
@@ -959,7 +2206,7 @@ public class Accessible {
 		// If no description was provided, and this is a composite or canvas, return a blank string
 		// -- otherwise, let the Cocoa control handle it.
 		if (returnValue == null) {
-			if (control instanceof Composite) returnValue = NSString.stringWith("");
+			if (control instanceof Composite) returnValue = NSString.string();
 		}
 
 		return returnValue;
@@ -967,178 +2214,429 @@ public class Accessible {
 	
 	id getInsertionPointLineNumberAttribute (int childID) {
 		id returnValue = null;
-		AccessibleControlEvent controlEvent = new AccessibleControlEvent(this);
-		controlEvent.childID = childID;
-		controlEvent.result = null;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(controlEvent);
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event  = new AccessibleTextEvent(this);
+			event.childID = childID;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getCaretOffset(event);
+			}
+			int caretOffset = event.offset;
+			event.start = caretOffset;
+			event.end = caretOffset;
+			event.count = Integer.MIN_VALUE;
+			event.type = ACC.TEXT_BOUNDARY_LINE;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getText(event);
+			}
+			returnValue = NSNumber.numberWithInt(Math.max(0, -event.count));
+		} else {
+			AccessibleControlEvent controlEvent = new AccessibleControlEvent(this);
+			controlEvent.childID = childID;
+			controlEvent.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(controlEvent);
+			}
+			AccessibleTextEvent textEvent = new AccessibleTextEvent(this);
+			textEvent.childID = childID;
+			textEvent.offset = -1;
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getCaretOffset(textEvent);
+			}
+			if (controlEvent.result != null && textEvent.offset != -1) {
+				int lineNumber = lineNumberForOffset (controlEvent.result, textEvent.offset);
+				returnValue = NSNumber.numberWithInt(lineNumber);
+			}
+		}
+		return returnValue;
+	}
+	
+	id getLineForIndexParameterizedAttribute (id parameter, int childID) {
+		id returnValue = null;
+		NSNumber charNumberObj = new NSNumber(parameter.id);		
+		int charNumber = charNumberObj.intValue();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.start = charNumber;
+			event.end = charNumber;
+			event.count = Integer.MIN_VALUE;
+			event.type = ACC.TEXT_BOUNDARY_LINE;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getText(event);
+			}
+			returnValue = NSNumber.numberWithInt(Math.max(0, -event.count));
+		} else {
+			AccessibleControlEvent controlEvent = new AccessibleControlEvent(this);
+			controlEvent.childID = childID;
+			controlEvent.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(controlEvent);
+			}
+			String text = controlEvent.result;
+			if (text != null) returnValue = NSNumber.numberWithInt(lineNumberForOffset(text, charNumber));
 		}
-		AccessibleTextEvent textEvent = new AccessibleTextEvent(this);
-		textEvent.childID = childID;
-		textEvent.offset = -1;
-		for (int i = 0; i < accessibleTextListeners.size(); i++) {
-			AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
-			listener.getCaretOffset(textEvent);
+		return returnValue;
+	}
+	
+	id getMaxValueAttribute(int childID) {
+		id returnValue = null;
+		if (accessibleValueListeners.size() > 0) {
+			AccessibleValueEvent event = new AccessibleValueEvent(this);
+			for (int i = 0; i < accessibleValueListeners.size(); i++) {
+				AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+				listener.getMaximumValue(event);
+			}
+			returnValue = NSNumber.numberWithDouble(event.value.doubleValue());
 		}
-		if (controlEvent.result != null && textEvent.offset != -1) {
-			int lineNumber = lineNumberForOffset (controlEvent.result, textEvent.offset);
-			returnValue = NSNumber.numberWithInt(lineNumber);
+		return returnValue;
+	}
+	
+	id getMinValueAttribute(int childID) {
+		id returnValue = null;
+		if (accessibleValueListeners.size() > 0) {
+			AccessibleValueEvent event = new AccessibleValueEvent(this);
+			for (int i = 0; i < accessibleValueListeners.size(); i++) {
+				AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+				listener.getMinimumValue(event);
+			}
+			returnValue = NSNumber.numberWithDouble(event.value.doubleValue());
 		}
 		return returnValue;
 	}
 	
 	id getNumberOfCharactersAttribute (int childID) {
 		id returnValue = null;
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.result = null;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(event);
-		}
-		String appValue = event.result;
-		if (appValue != null) {
-			returnValue = NSNumber.numberWithInt(appValue.length());
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getCharacterCount(event);
+			}
+			returnValue = NSNumber.numberWithInt(event.count);
+		} else {
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(event);
+			}
+			String appValue = event.result;
+			if (appValue != null) {
+				returnValue = NSNumber.numberWithInt(appValue.length());
+			}
 		}
 		return returnValue;
 	}
 	
 	id getRangeForLineParameterizedAttribute (id parameter, int childID) {
 		id returnValue = null;
-
 		// The parameter is an NSNumber with the line number.
 		NSNumber lineNumberObj = new NSNumber(parameter.id);		
 		int lineNumber = lineNumberObj.intValue();
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.result = null;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(event);
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.start = event.end = 0;
+			event.count = lineNumber;
+			event.type = ACC.TEXT_BOUNDARY_LINE;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getText(event);
+			}
+			NSRange range = new NSRange();
+			range.location = event.start;
+			range.length = event.end - event.start;
+			returnValue = NSValue.valueWithRange(range);
+		} else if (accessibleControlListeners.size() > 0){
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(event);
+			}
+			if (event.result != null) {
+				NSRange range = rangeForLineNumber (lineNumber, event.result);
+				if (range.location != -1) {
+					returnValue = NSValue.valueWithRange(range);
+				}
+			}
 		}
-		if (event.result != null) {
-			NSRange range = rangeForLineNumber (lineNumber, event.result);
-			if (range.location != -1) {
-				returnValue = NSValue.valueWithRange(range);
+		return returnValue;
+	}
+
+	id getRangeForIndexParameterizedAttribute (id parameter, int childID) {
+		id returnValue = null;
+		// The parameter is an NSNumber with the character number.
+		NSNumber charNumberObj = new NSNumber(parameter.id);		
+		int charNumber = charNumberObj.intValue();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.start = event.end = 0;
+			event.count = charNumber;
+			event.type = ACC.TEXT_BOUNDARY_CHAR;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getText(event);
 			}
+			NSRange range = new NSRange();
+			range.location = event.start;
+			range.length = event.end - event.start;
+			returnValue = NSValue.valueWithRange(range);
+		} else if (accessibleControlListeners.size() > 0) {
+//			AccessibleControlEvent event = new AccessibleControlEvent(this);
+//			event.childID = childID;
+//			event.result = null;
+//			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+//				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+//				listener.getValue(event);
+//			}
+//			if (event.result != null) {
+//				NSRange range = rangeForLineNumber (lineNumber, event.result);
+//				if (range.location != -1) {
+//					returnValue = NSValue.valueWithRange(range);
+//				}
+//			}
 		}
 		return returnValue;
 	}
-	
+
 	id getSelectedTextAttribute (int childID) {
-		id returnValue = NSString.stringWith("");
-		AccessibleTextEvent event = new AccessibleTextEvent(this);
-		event.childID = childID;
-		event.offset = -1;
-		event.length = -1;
-		for (int i = 0; i < accessibleTextListeners.size(); i++) {
-			AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
-			listener.getSelectionRange(event);
-		}
-		int offset = event.offset;
-		int length = event.length;
-		if (offset != -1 && length != -1 && length != 0) {  // TODO: do we need the && length != 0 ?
-			AccessibleControlEvent event2 = new AccessibleControlEvent(this);
-			event2.childID = event.childID;
-			event2.result = null;
-			for (int i = 0; i < accessibleControlListeners.size(); i++) {
-				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-				listener.getValue(event2);
+		id returnValue = NSString.string();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.index = 0;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getSelection(event);
 			}
-			String appValue = event2.result;
-			if (appValue != null) {
-				returnValue = NSString.stringWith(appValue.substring(offset, offset + length));
+			int start = event.start;
+			int end = event.end;
+			if (start != end) {
+				event.type = ACC.TEXT_BOUNDARY_ALL;
+				for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+					listener.getText(event);
+				}
+			}
+			String text = event.result;
+			if (text != null) returnValue = NSString.stringWith(text);
+		} else if (accessibleTextListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.offset = -1;
+			event.length = -1;
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getSelectionRange(event);
+			}
+			int offset = event.offset;
+			int length = event.length;
+			if (offset != -1 && length != -1 && length != 0) {  // TODO: do we need the && length != 0 ?
+				AccessibleControlEvent event2 = new AccessibleControlEvent(this);
+				event2.childID = event.childID;
+				event2.result = null;
+				for (int i = 0; i < accessibleControlListeners.size(); i++) {
+					AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+					listener.getValue(event2);
+				}
+				String appValue = event2.result;
+				if (appValue != null) {
+					returnValue = NSString.stringWith(appValue.substring(offset, offset + length));
+				}
+			}
+		}
+		return returnValue;
+	}
+	
+	id getSelectedTextRangeAttribute (int childID) {
+		id returnValue = null;
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.index = 0;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getSelection(event);
+			}
+			NSRange range = new NSRange();
+			range.location = event.start;
+			range.length = event.end - event.start;
+			returnValue = NSValue.valueWithRange(range);
+		} else if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.offset = -1;
+			event.length = 0;
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getSelectionRange(event);
+			}
+			if (event.offset != -1) {
+				NSRange range = new NSRange();
+				range.location = event.offset;
+				range.length = event.length;
+				returnValue = NSValue.valueWithRange(range);
 			}
 		}
 		return returnValue;
 	}
 	
-	id getSelectedTextRangeAttribute (int childID) {
+	id getServesAsTitleForUIElementsAttribute(int childID) {
 		id returnValue = null;
-		AccessibleTextEvent event = new AccessibleTextEvent(this);
-		event.childID = childID;
-		event.offset = -1;
-		event.length = 0;
-		for (int i = 0; i < accessibleTextListeners.size(); i++) {
-			AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
-			listener.getSelectionRange(event);
-		}
-		if (event.offset != -1) {
-			NSRange range = new NSRange();
-			range.location = event.offset;
-			range.length = event.length;
-			returnValue = NSValue.valueWithRange(range);
-		}
+		Relation relation = relations[ACC.RELATION_LABEL_FOR];
+		if (relation != null) returnValue = relation.getServesAsTitleForUIElements();
 		return returnValue;
 	}
 	
-	id getStringForRangeAttribute (id parameter, int childID) {
+	id getStringForRangeParameterizedAttribute (id parameter, int childID) {
 		id returnValue = null;
 		
 		// Parameter is an NSRange wrapped in an NSValue. 
 		NSValue parameterObject = new NSValue(parameter.id);
-		NSRange range = parameterObject.rangeValue();		
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.result = null;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(event);
-		}
-		String appValue = event.result;
-
-		if (appValue != null) {
-			returnValue = NSString.stringWith(appValue.substring((int)/*64*/range.location, (int)/*64*/(range.location + range.length)));
+		NSRange range = parameterObject.rangeValue();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.start = (int) /*64*/ range.location;
+			event.end = (int) /*64*/ (range.location + range.length);
+			event.type = ACC.TEXT_BOUNDARY_ALL;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getText(event);
+			}
+			if (event.result != null) returnValue = NSString.stringWith(event.result);
+		} else if (accessibleControlListeners.size() > 0) {
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(event);
+			}
+			String appValue = event.result;
+	
+			if (appValue != null) {
+				returnValue = NSString.stringWith(appValue.substring((int)/*64*/range.location, (int)/*64*/(range.location + range.length)));
+			}
 		}
-
 		return returnValue;
 	}
 	
 	id getSelectedTextRangesAttribute (int childID) {
-		NSMutableArray returnValue = null; 
-		AccessibleTextEvent event = new AccessibleTextEvent(this);
-		event.childID = childID;
-		event.offset = -1;
-		event.length = 0;
-		
-		for (int i = 0; i < accessibleTextListeners.size(); i++) {
-			AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
-			listener.getSelectionRange(event);
-		}
-		
-		if (event.offset != -1) {
-			returnValue = NSMutableArray.arrayWithCapacity(1);
-			NSRange range = new NSRange();
-			range.location = event.offset;
-			range.length = event.length;
-			returnValue.addObject(NSValue.valueWithRange(range));
+		NSMutableArray returnValue = null;
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getSelectionCount(event);
+			}
+			if (event.count > 0) {
+				returnValue = NSMutableArray.arrayWithCapacity(event.count);
+				for (int i = 0; i < event.count; i++) {
+					event.index = i;
+					for (int j = 0; j < accessibleTextExtendedListeners.size(); j++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(j);
+						listener.getSelection(event);
+					}				
+					NSRange range = new NSRange();
+					range.location = event.start;
+					range.length = event.end - event.start;
+					returnValue.addObject(NSValue.valueWithRange(range));
+				}
+			}
+		} else if (accessibleTextListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			event.offset = -1;
+			event.length = 0;
+
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getSelectionRange(event);
+			}
+
+			if (event.offset != -1) {
+				returnValue = NSMutableArray.arrayWithCapacity(1);
+				NSRange range = new NSRange();
+				range.location = event.offset;
+				range.length = event.length;
+				returnValue.addObject(NSValue.valueWithRange(range));
+			}
 		}
-		
 		return returnValue;
 	}
 	
-	id getVisibleCharacterRangeAttribute (int childID) {
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = childID;
-		event.result = null;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(event);
-		}
+	id getStyleRangeForIndexAttribute (id parameter, int childID) {
+		if (accessibleAttributeListeners.size() == 0) return null;
+
+		// Parameter is an NSRange wrapped in an NSValue. 
+		NSNumber parameterObject = new NSNumber(parameter.id);
+		int index = parameterObject.intValue();
 		
-		NSRange range = new NSRange();
+		AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
+		event.offset = (int) /*64*/ index;
 
-		if (event.result != null) {
-			range.location = 0;
-			range.length = event.result.length();
+		// Marker values -- if -1 after calling getTextAttributes, no one implemented it.
+		event.start = event.end = -1;
+
+		for (int i = 0; i < accessibleAttributeListeners.size(); i++) {
+			AccessibleAttributeListener listener = (AccessibleAttributeListener) accessibleAttributeListeners.elementAt(i);
+			listener.getTextAttributes(event);
+		}
+
+		NSRange range = new NSRange();
+		if (event.start == -1 && event.end == -1) {
+			range.location = index;
+			range.length = 0;
 		} else {
-			return null;
-//			range.location = range.length = 0;
+			range.location = event.start;
+			range.length = event.end - event.start;
 		}
 
 		return NSValue.valueWithRange(range);
 	}
+	
+	id getVisibleCharacterRangeAttribute (int childID) {
+		NSRange range = null;
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.childID = childID;
+			for (int i=0; i<accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.getVisibleRanges(event);
+			}
+			range = new NSRange();
+			range.location = event.start;
+			range.length = event.end - event.start;
+		} else if (accessibleControlListeners.size() > 0) {
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = childID;
+			event.result = null;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getValue(event);
+			}
+			if (event.result != null) {
+				range = new NSRange();
+				range.location = 0;
+				range.length = event.result.length();
+			}
+		}
+
+		return (range != null) ? NSValue.valueWithRange(range) : null;
+	}
 
 	int lineNumberForOffset (String text, int offset) {
 		int lineNumber = 1;
@@ -1250,6 +2748,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #addAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -1257,9 +2756,220 @@ public class Accessible {
 	public void removeAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleTextListeners.removeElement (listener);
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.removeElement (listener);
+		} else {
+			accessibleTextListeners.removeElement (listener);
+		}
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #addAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #addAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #addAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #addAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #addAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #addAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.removeElement(listener);
 	}
 
+	/**
+	 * Removes the relation with the specified type and target
+	 * from the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void removeRelation(int type, Accessible target) {
+		checkWidget();
+		if (relations[type] != null) {
+			relations[type].removeTarget(target);
+		}
+	}
+	
+	void release(boolean destroy) {
+		if (actionNames != null) actionNames.release();
+		actionNames = null;
+		if (attributeNames != null) attributeNames.release();
+		attributeNames = null;
+		if (parameterizedAttributeNames != null) parameterizedAttributeNames.release();
+		parameterizedAttributeNames = null;
+		if (delegate != null) {
+			delegate.internal_dispose_SWTAccessibleDelegate();
+			delegate.release();
+		}
+		delegate = null;
+		relations = null;
+		
+		if (childToIdMap != null) {
+			Collection delegates = childToIdMap.values();
+			Iterator iter = delegates.iterator();
+			while (iter.hasNext()) {
+				SWTAccessibleDelegate childDelegate = (SWTAccessibleDelegate)iter.next();
+				childDelegate.internal_dispose_SWTAccessibleDelegate();
+				childDelegate.release();
+			}
+			childToIdMap.clear();
+			childToIdMap = null;
+		}
+		
+		if (tableDelegate != null) tableDelegate.release();
+	}
+	
 	static NSArray retainedAutoreleased(NSArray inObject) {
 		id temp = inObject.retain();
 		id temp2 = new NSObject(temp.id).autorelease();
@@ -1267,6 +2977,111 @@ public class Accessible {
 	}
 	
 	/**
+	 * Sends a message with event-specific data to accessible clients
+	 * indicating that something has changed within a custom control.
+	 *
+	 * @param event an <code>ACC</code> constant beginning with EVENT_* indicating the message to send
+	 * @param eventData an object containing event-specific data, or null if there is no event-specific data
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#EVENT_ACTION_CHANGED
+	 * @see ACC#EVENT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_DOCUMENT_LOAD_COMPLETE
+	 * @see ACC#EVENT_DOCUMENT_LOAD_STOPPED
+	 * @see ACC#EVENT_DOCUMENT_RELOAD
+	 * @see ACC#EVENT_HYPERLINK_ACTIVATED
+	 * @see ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_END_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_START_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_SELECTED
+	 * @see ACC#EVENT_LOCATION_CHANGED
+	 * @see ACC#EVENT_NAME_CHANGED
+	 * @see ACC#EVENT_PAGE_CHANGED
+	 * @see ACC#EVENT_SECTION_CHANGED
+	 * @see ACC#EVENT_SELECTION_CHANGED
+	 * @see ACC#EVENT_STATE_CHANGED
+	 * @see ACC#EVENT_TABLE_CAPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_SUMMARY_CHANGED
+	 * @see ACC#EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_TEXT_CARET_MOVED
+	 * @see ACC#EVENT_TEXT_CHANGED
+	 * @see ACC#EVENT_TEXT_COLUMN_CHANGED
+	 * @see ACC#EVENT_TEXT_SELECTION_CHANGED
+	 * @see ACC#EVENT_VALUE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public void sendEvent(int event, Object eventData) {
+		checkWidget();
+
+		id eventSource = accessibleHandle(this);
+
+		switch (event) {
+		case ACC.EVENT_TEXT_CHANGED:
+		case ACC.EVENT_VALUE_CHANGED:
+		case ACC.EVENT_STATE_CHANGED:
+		case ACC.EVENT_PAGE_CHANGED:
+		case ACC.EVENT_SECTION_CHANGED:
+		case ACC.EVENT_ACTION_CHANGED:
+		case ACC.EVENT_HYPERLINK_START_INDEX_CHANGED:
+		case ACC.EVENT_HYPERLINK_END_INDEX_CHANGED:
+		case ACC.EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED:
+		case ACC.EVENT_HYPERLINK_SELECTED_LINK_CHANGED:
+		case ACC.EVENT_HYPERLINK_ACTIVATED:
+		case ACC.EVENT_HYPERTEXT_LINK_COUNT_CHANGED:
+		case ACC.EVENT_ATTRIBUTE_CHANGED:
+		case ACC.EVENT_TABLE_CAPTION_CHANGED:
+		case ACC.EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED:
+		case ACC.EVENT_TABLE_COLUMN_HEADER_CHANGED:
+		case ACC.EVENT_TABLE_ROW_DESCRIPTION_CHANGED:
+		case ACC.EVENT_TABLE_ROW_HEADER_CHANGED:
+		case ACC.EVENT_TABLE_SUMMARY_CHANGED:
+		case ACC.EVENT_TEXT_ATTRIBUTE_CHANGED:
+		case ACC.EVENT_TEXT_COLUMN_CHANGED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilityValueChangedNotification.id); break;
+
+		case ACC.EVENT_SELECTION_CHANGED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilitySelectedChildrenChangedNotification.id); break;
+		case ACC.EVENT_TEXT_SELECTION_CHANGED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilitySelectedTextChangedNotification.id); break;
+		case ACC.EVENT_LOCATION_CHANGED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilityMovedNotification.id); break;
+		case ACC.EVENT_NAME_CHANGED:
+		case ACC.EVENT_DESCRIPTION_CHANGED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilityTitleChangedNotification.id); break;
+		case ACC.EVENT_TEXT_CARET_MOVED:
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilitySelectedTextChangedNotification.id); break;
+		case ACC.EVENT_TABLE_CHANGED:
+			if (tableDelegate != null) {
+				tableDelegate.reset();
+				getRowsAttribute(ACC.CHILDID_SELF);
+				getColumnsAttribute(ACC.CHILDID_SELF);
+			}
+			OS.NSAccessibilityPostNotification(eventSource.id, OS.NSAccessibilityRowCountChangedNotification.id); break;
+			
+		// None of these correspond to anything in Cocoa. 
+		case ACC.EVENT_HYPERTEXT_LINK_SELECTED:
+		case ACC.EVENT_DOCUMENT_LOAD_COMPLETE:
+		case ACC.EVENT_DOCUMENT_LOAD_STOPPED:
+		case ACC.EVENT_DOCUMENT_RELOAD:
+			break;
+
+		}
+	}
+
+	/**
 	 * Sends a message to accessible clients that the child selection
 	 * within a custom container control has changed.
 	 *
@@ -1279,7 +3094,11 @@ public class Accessible {
 	 */
 	public void selectionChanged () {
 		checkWidget();
-		OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedChildrenChangedNotification.id);
+		if (currentRole == ACC.ROLE_TABLE) {
+			OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedRowsChangedNotification.id);
+		} else {
+			OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilitySelectedChildrenChangedNotification.id);
+		}
 	}
 
 	/**
@@ -1298,6 +3117,37 @@ public class Accessible {
 		OS.NSAccessibilityPostNotification(control.view.id, OS.NSAccessibilityFocusedUIElementChangedNotification.id);
 	}
 
+	void setSelectedTextRangeAttribute(id value, int childId) {
+		NSRange newRange = new NSValue(value.id).rangeValue();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.index = 0;
+			event.start = (int)newRange.location;
+			event.end = (int)(newRange.location + newRange.length);
+
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.removeSelection(event);
+				listener.addSelection(event);
+			}
+		} 
+	}
+
+	void setVisibleCharacterRangeAttribute(id value, int childId) {
+		NSRange newRange = new NSValue(value.id).rangeValue();
+		if (accessibleTextExtendedListeners.size() > 0) {
+			AccessibleTextEvent event = new AccessibleTextEvent(this);
+			event.type = ACC.SCROLL_TYPE_TOP_LEFT;
+			event.start = (int)newRange.location;
+			event.end = (int)(newRange.location + newRange.length);
+
+			for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+				AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+				listener.scrollText(event);
+			}
+		} 
+	}	
+
 	/**
 	 * Sends a message to accessible clients that the text
 	 * caret has moved within a custom control.
@@ -1320,8 +3170,8 @@ public class Accessible {
 	 * Sends a message to accessible clients that the text
 	 * within a custom control has changed.
 	 *
-	 * @param type the type of change, one of <code>ACC.NOTIFY_TEXT_INSERT</code>
-	 * or <code>ACC.NOTIFY_TEXT_DELETE</code>
+	 * @param type the type of change, one of <code>ACC.TEXT_INSERT</code>
+	 * or <code>ACC.TEXT_DELETE</code>
 	 * @param startIndex the text index within the control where the insertion or deletion begins
 	 * @param length the non-negative length in characters of the insertion or deletion
 	 *
@@ -1362,11 +3212,11 @@ public class Accessible {
 		}
 
 		/* Check cache for childID, if found, return corresponding osChildID. */
-		SWTAccessibleDelegate childRef = (SWTAccessibleDelegate) children.get(new Integer(childID));
+		SWTAccessibleDelegate childRef = (SWTAccessibleDelegate) childToIdMap.get(new Integer(childID));
 		
 		if (childRef == null) {
 			childRef = new SWTAccessibleDelegate(this, childID);
-			children.put(new Integer(childID), childRef);
+			childToIdMap.put(new Integer(childID), childRef);
 		}
 		
 		return childRef;
@@ -1412,10 +3262,12 @@ public class Accessible {
 			case ACC.ROLE_TOOLBAR: nsReturnValue = OS.NSAccessibilityToolbarRole; break;
 			case ACC.ROLE_LIST: nsReturnValue = OS.NSAccessibilityOutlineRole; break;
 			case ACC.ROLE_LISTITEM: nsReturnValue = OS.NSAccessibilityStaticTextRole; break;
+			case ACC.ROLE_COLUMN: nsReturnValue =  OS.NSAccessibilityColumnRole; break;
+			case ACC.ROLE_ROW: nsReturnValue =  concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole); break;
 			case ACC.ROLE_TABLE: nsReturnValue = OS.NSAccessibilityTableRole; break;
-			case ACC.ROLE_TABLECELL: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole); break;
-			case ACC.ROLE_TABLECOLUMNHEADER: nsReturnValue = OS.NSAccessibilitySortButtonRole; break;
-			case ACC.ROLE_TABLEROWHEADER: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole); break;
+			case ACC.ROLE_TABLECELL: nsReturnValue = OS.NSAccessibilityStaticTextRole; break; 
+			case ACC.ROLE_TABLECOLUMNHEADER: nsReturnValue = OS.NSAccessibilityGroupRole; break;
+			case ACC.ROLE_TABLEROWHEADER: nsReturnValue = OS.NSAccessibilityGroupRole; break;
 			case ACC.ROLE_TREE: nsReturnValue = OS.NSAccessibilityOutlineRole; break;
 			case ACC.ROLE_TREEITEM: nsReturnValue = concatStringsAsRole(OS.NSAccessibilityOutlineRole, OS.NSAccessibilityOutlineRowSubrole); break;
 			case ACC.ROLE_TABFOLDER: nsReturnValue = OS.NSAccessibilityTabGroupRole; break;
@@ -1423,46 +3275,42 @@ public class Accessible {
 			case ACC.ROLE_PROGRESSBAR: nsReturnValue = OS.NSAccessibilityProgressIndicatorRole; break;
 			case ACC.ROLE_SLIDER: nsReturnValue = OS.NSAccessibilitySliderRole; break;
 			case ACC.ROLE_LINK: nsReturnValue = OS.NSAccessibilityLinkRole; break;
+			
+			//10.6 only -> case ACC.ROLE_CANVAS: nsReturnValue = OS.NSAccessibilityLayoutAreaRole; break;
+			case ACC.ROLE_CANVAS: nsReturnValue = OS.NSAccessibilityGroupRole; break;
+			case ACC.ROLE_GRAPHIC: nsReturnValue = OS.NSAccessibilityImageRole; break;
+		
+			//CLIENT_AREA uses NSAccessibilityGroupRole already
+			case ACC.ROLE_GROUP: nsReturnValue = OS.NSAccessibilityGroupRole; break;  
+			//SPLIT_BUTTON uses NSAccessibilityMenuButtonRole already
+			case ACC.ROLE_CHECKMENUITEM: nsReturnValue = OS.NSAccessibilityMenuButtonRole; break;
+			case ACC.ROLE_RADIOMENUITEM: nsReturnValue = OS.NSAccessibilityMenuButtonRole; break;
+			//don't know the right answer for these:
+			case ACC.ROLE_FOOTER:
+			case ACC.ROLE_HEADER:
+			case ACC.ROLE_FORM:
+			case ACC.ROLE_PAGE:
+			case ACC.ROLE_SECTION:
+				nsReturnValue = OS.NSAccessibilityGroupRole;
+				break;
+			case ACC.ROLE_HEADING:
+			case ACC.ROLE_PARAGRAPH:
+				nsReturnValue = OS.NSAccessibilityTextAreaRole;
+				break;
+			case ACC.ROLE_CLOCK:
+			case ACC.ROLE_DATETIME:
+			case ACC.ROLE_CALENDAR:
+			case ACC.ROLE_ALERT: 
+			case ACC.ROLE_ANIMATION: 
+			case ACC.ROLE_DOCUMENT:
+			case ACC.ROLE_SPINBUTTON:
+			case ACC.ROLE_STATUSBAR:
+				nsReturnValue = OS.NSAccessibilityUnknownRole;
 		}
 
 		return nsReturnValue.getString();
 	}
 
-	int osToRole(NSString osRole) {
-		if (osRole == null) return 0;
-		if (osRole.isEqualToString(OS.NSAccessibilityWindowRole)) return ACC.ROLE_WINDOW;
-		if (osRole.isEqualToString(OS.NSAccessibilityMenuBarRole)) return ACC.ROLE_MENUBAR;
-		if (osRole.isEqualToString(OS.NSAccessibilityMenuRole)) return ACC.ROLE_MENU;
-		if (osRole.isEqualToString(OS.NSAccessibilityMenuItemRole)) return ACC.ROLE_MENUITEM;
-		if (osRole.isEqualToString(OS.NSAccessibilitySplitterRole)) return ACC.ROLE_SEPARATOR;
-		if (osRole.isEqualToString(OS.NSAccessibilityHelpTagRole)) return ACC.ROLE_TOOLTIP;
-		if (osRole.isEqualToString(OS.NSAccessibilityScrollBarRole)) return ACC.ROLE_SCROLLBAR;
-		if (osRole.isEqualToString(OS.NSAccessibilityScrollAreaRole)) return ACC.ROLE_LIST;
-		if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityWindowRole, OS.NSAccessibilityDialogSubrole))) return ACC.ROLE_DIALOG;
-		if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityWindowRole, OS.NSAccessibilitySystemDialogSubrole))) return ACC.ROLE_DIALOG;
-		if (osRole.isEqualToString(OS.NSAccessibilityStaticTextRole)) return ACC.ROLE_LABEL;
-		if (osRole.isEqualToString(OS.NSAccessibilityButtonRole)) return ACC.ROLE_PUSHBUTTON;
-		if (osRole.isEqualToString(OS.NSAccessibilityCheckBoxRole)) return ACC.ROLE_CHECKBUTTON;
-		if (osRole.isEqualToString(OS.NSAccessibilityRadioButtonRole)) return ACC.ROLE_RADIOBUTTON;
-		if (osRole.isEqualToString(OS.NSAccessibilityMenuButtonRole)) return ACC.ROLE_SPLITBUTTON;
-		if (osRole.isEqualToString(OS.NSAccessibilityComboBoxRole)) return ACC.ROLE_COMBOBOX;
-		if (osRole.isEqualToString(OS.NSAccessibilityTextFieldRole)) return ACC.ROLE_TEXT;
-		if (osRole.isEqualToString(OS.NSAccessibilityTextAreaRole)) return ACC.ROLE_TEXT;
-		if (osRole.isEqualToString(OS.NSAccessibilityToolbarRole)) return ACC.ROLE_TOOLBAR;
-		if (osRole.isEqualToString(OS.NSAccessibilityListRole)) return ACC.ROLE_LIST;
-		if (osRole.isEqualToString(OS.NSAccessibilityTableRole)) return ACC.ROLE_TABLE;
-		if (osRole.isEqualToString(OS.NSAccessibilityColumnRole)) return ACC.ROLE_TABLECOLUMNHEADER;
-		if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityButtonRole, OS.NSAccessibilitySortButtonRole))) return ACC.ROLE_TABLECOLUMNHEADER;
-		if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityRowRole, OS.NSAccessibilityTableRowSubrole))) return ACC.ROLE_TABLEROWHEADER;
-		if (osRole.isEqualToString(OS.NSAccessibilityOutlineRole)) return ACC.ROLE_TREE;
-		if (osRole.isEqualToString(concatStringsAsRole(OS.NSAccessibilityOutlineRole, OS.NSAccessibilityOutlineRowSubrole))) return ACC.ROLE_TREEITEM;
-		if (osRole.isEqualToString(OS.NSAccessibilityTabGroupRole)) return ACC.ROLE_TABFOLDER;
-		if (osRole.isEqualToString(OS.NSAccessibilityProgressIndicatorRole)) return ACC.ROLE_PROGRESSBAR;
-		if (osRole.isEqualToString(OS.NSAccessibilitySliderRole)) return ACC.ROLE_SLIDER;
-		if (osRole.isEqualToString(OS.NSAccessibilityLinkRole)) return ACC.ROLE_LINK;
-		return ACC.ROLE_CLIENT_AREA;
-	}
-	
 	/* checkWidget was copied from Widget, and rewritten to work in this package */
 	void checkWidget () {
 		if (!isValidThread ()) SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
@@ -1474,4 +3322,45 @@ public class Accessible {
 		return control.getDisplay ().getThread () == Thread.currentThread ();
 	}
 
+	/**
+	 * Adds relationship attributes if needed to the property list. 
+	 * <p>
+	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int /*long*/ internal_addRelationAttributes(int /*long*/ defaultAttributes) {
+		NSArray attributes = new NSArray(defaultAttributes);
+		NSMutableArray returnArray = NSMutableArray.arrayWithCapacity(attributes.count());
+		returnArray.addObjectsFromArray(attributes);
+		
+		if (getTitleAttribute(ACC.CHILDID_SELF) != null) {
+			if (!returnArray.containsObject(OS.NSAccessibilityTitleAttribute)) returnArray.addObject(OS.NSAccessibilityTitleAttribute);
+		}
+		
+		if (getDescriptionAttribute(ACC.CHILDID_SELF) != null) {
+			if (!returnArray.containsObject(OS.NSAccessibilityDescriptionAttribute)) returnArray.addObject(OS.NSAccessibilityDescriptionAttribute);
+		}
+		
+		// See if this object has a label or is a label for something else. If so, add that to the list.
+		if (relations[ACC.RELATION_LABEL_FOR] != null) {
+			if (!returnArray.containsObject(OS.NSAccessibilityServesAsTitleForUIElementsAttribute)) returnArray.addObject(OS.NSAccessibilityServesAsTitleForUIElementsAttribute);
+			if (!returnArray.containsObject(OS.NSAccessibilityTitleAttribute)) returnArray.addObject(OS.NSAccessibilityTitleAttribute);
+		} else {
+			returnArray.removeObject(OS.NSAccessibilityServesAsTitleForUIElementsAttribute);
+		}
+
+		if (relations[ACC.RELATION_LABELLED_BY] != null) {
+			if (!returnArray.containsObject(OS.NSAccessibilityTitleUIElementAttribute)) returnArray.addObject(OS.NSAccessibilityTitleUIElementAttribute);
+		} else {
+			returnArray.removeObject(OS.NSAccessibilityTitleUIElementAttribute);
+		}
+
+		return returnArray.id;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableColumn.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableColumn.java
new file mode 100644
index 0000000..a106d8e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableColumn.java	
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.cocoa.*;
+
+/**
+ * This class is used to describe a table column for objects that have an accessible
+ * role of ACC.ROLE_TABLE, but aren't implemented like NSTableViews. 
+ *
+ * Instances of this class represent one column in a table. Cocoa accessibility expects
+ * columns to report their location, number of rows, and elements in those rows.
+ * 
+ * @see TableAccessibleDelegate
+ */
+class AccessibleTableColumn extends Accessible {
+
+	public AccessibleTableColumn(Accessible accessible, int childID) {
+		super(accessible);
+		index = childID;
+		
+		addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getLocation(AccessibleControlEvent e) {
+				Accessible[] cells = AccessibleTableColumn.this.getColumnCells();
+
+				// Ask first row for position.
+				AccessibleControlEvent event = new AccessibleControlEvent(this);
+				event.childID = ACC.CHILDID_SELF;
+				event.width = -1;
+				Accessible child = cells[0];
+				
+				for (int i = 0; i < child.accessibleControlListeners.size(); i++) {
+					AccessibleControlListener listener = (AccessibleControlListener) child.accessibleControlListeners.elementAt(i);
+					listener.getLocation(event);
+				}
+
+				// Ask all children for size.
+				int height = 0;
+				int width = 0;
+				for (int j = 0; j < cells.length; j++) {
+					NSValue sizeObj = (NSValue)cells[j].getSizeAttribute(ACC.CHILDID_SELF);
+					NSSize size = sizeObj.sizeValue();
+					if (size.width > width) width = (int) size.width;
+					height += size.height;
+				}
+				
+				e.x = event.x;
+				e.y = event.y;
+				e.width = width;
+				e.height = height;
+			}
+			public void getRole(AccessibleControlEvent e) {
+				e.detail = ACC.ROLE_COLUMN;
+			}
+		});
+		addAccessibleTableListener(new AccessibleTableAdapter() {
+			public void getRowCount(AccessibleTableEvent e) {
+				e.count = getColumnCells().length;
+			}
+			public void getRow(AccessibleTableEvent e) {
+				int index = e.row;
+				Accessible[] children = getColumnCells();
+				int count = children.length;
+				if (0 <= index && index < count) {
+					e.accessible = children[index];
+				}
+			}
+			public void getRows(AccessibleTableEvent e) {
+				e.accessibles = getColumnCells();
+			}
+		});
+	}
+	
+	private Accessible[] getColumnCells() {
+		int validRowCount = Math.max (1, parent.getRowCount());
+		Accessible[] cells = new Accessible[validRowCount];
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < validRowCount; i++) {
+			event.column = index;
+			event.row = i;
+	
+			for (int j = 0; j < parent.accessibleTableListeners.size(); j++) {
+				AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(j);
+				listener.getCell(event);
+			}
+	
+			cells[i] = event.accessible;
+		}
+		return cells;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableHeader.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableHeader.java
new file mode 100644
index 0000000..ed9e5b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableHeader.java	
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.cocoa.*;
+
+/**
+ * This class is used to describe a table header for objects that have an accessible
+ * role of ACC.ROLE_TABLE, but aren't implemented like NSTableViews. That means they
+ * report back their children as a list of cells in row-major order instead of a list of
+ * rows with cells as children of those rows. The assumption is that the first 'row'
+ * of cells (cell 0 to cell 'column-count - 1') are the column headers of the table.
+ *
+ * This class works with the parent control to act as the header section of the table, 
+ * and reports the cells in the header so that screen readers (VoiceOver, mainly) can
+ * identify the column of the cell that the VoiceOver cursor is reading.
+ */
+class AccessibleTableHeader extends Accessible {
+
+	public AccessibleTableHeader(Accessible accessible, int childID) {
+		super(accessible);
+		index = childID;
+
+		addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getChildren(AccessibleControlEvent e) {
+				int validColumnCount = Math.max (1, parent.getColumnCount());
+				Accessible[] children = new Accessible[validColumnCount];
+				AccessibleControlEvent event = new AccessibleControlEvent(this);
+
+				for (int i = 0; i < validColumnCount; i++) {
+					event.childID = i;
+					event.detail = ACC.CHILDID_CHILD_AT_INDEX;
+
+					for (int j = 0; j < parent.accessibleControlListeners.size(); j++) {
+						AccessibleControlListener listener = (AccessibleControlListener) parent.accessibleControlListeners.elementAt(j);
+						listener.getChild(event);
+					}
+
+					event.accessible.parent = AccessibleTableHeader.this;
+					children[i] = event.accessible;
+				}
+				e.children = children; 
+			}
+			public void getChildCount(AccessibleControlEvent e) {
+				e.detail = Math.max (1, parent.getColumnCount());
+			}
+			public void getLocation(AccessibleControlEvent e) {
+				int validColumnCount = Math.max (1, parent.getColumnCount());
+				Accessible[] children = new Accessible[validColumnCount];
+				AccessibleControlEvent event = new AccessibleControlEvent(this);
+
+				for (int i = 0; i < validColumnCount; i++) {
+					event.childID = i;
+					event.detail = ACC.CHILDID_CHILD_AT_INDEX;
+
+					for (int j = 0; j < parent.accessibleControlListeners.size(); j++) {
+						AccessibleControlListener listener = (AccessibleControlListener) parent.accessibleControlListeners.elementAt(j);
+						listener.getChild(event);
+					}
+
+					event.accessible.parent = AccessibleTableHeader.this;
+					children[i] = event.accessible;
+				}
+
+				// Ask first child for position.
+				NSValue positionObj = (NSValue)children[0].getPositionAttribute(ACC.CHILDID_SELF);
+				NSPoint position = positionObj.pointValue();
+
+				// Ask all children for size.
+				int height = 0;
+				int width = 0;
+				for (int j = 0; j < children.length; j++) {
+					NSValue sizeObj = (NSValue)children[j].getSizeAttribute(ACC.CHILDID_SELF);
+					NSSize size = sizeObj.sizeValue();
+					if (size.height > height) height = (int) size.height;
+					width += size.width;
+				}
+				e.x = (int) position.x;
+				// Flip y coordinate for Cocoa.
+				NSArray screens = NSScreen.screens();
+				NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+				NSRect frame = screen.frame();
+				e.y = (int) (frame.height - position.y - height);
+				e.width = width;
+				e.height = height;
+			}
+
+			public void getRole(AccessibleControlEvent e) {
+				e.detail = ACC.ROLE_TABLECOLUMNHEADER;
+			}
+		});
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableRow.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableRow.java
new file mode 100644
index 0000000..b514898
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/AccessibleTableRow.java	
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.cocoa.*;
+
+/**
+ * This class is used to describe a table column for objects that have an accessible
+ * role of ACC.ROLE_TABLE, but aren't implemented like NSTableViews. 
+ *
+ * Instances of this class represent one row in a table. Cocoa accessibility expects
+ * rows to report their location, and assumes the cells of the table are children of the rows.
+ * 
+ * @see TableAccessibleDelegate
+ */
+class AccessibleTableRow extends Accessible {
+
+	public AccessibleTableRow(Accessible accessible, int childID) {
+		super(accessible);
+		index = childID;
+		
+		addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getChildCount(AccessibleControlEvent e) {
+				e.detail = Math.max (1, parent.getColumnCount());
+			}
+			public void getChildren(AccessibleControlEvent e) {
+				int validColumnCount = Math.max (1, parent.getColumnCount());
+				Object[] children = new Object[validColumnCount];
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				for (int i = 0; i < validColumnCount; i++) {
+					event.column = i;
+					event.row = index;
+					for (int j = 0; j < parent.accessibleTableListeners.size(); j++) {
+						AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(j);
+						listener.getCell(event);
+					}
+					
+					if (event.accessible != null) {
+						event.accessible.parent = AccessibleTableRow.this;
+					}
+					
+					children[i] = event.accessible;
+				}
+				
+				e.children = children;
+			}			
+			public void getLocation(AccessibleControlEvent e) {
+				int validColumnCount = Math.max (1, parent.getColumnCount());
+				Accessible[] children = new Accessible[validColumnCount];
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				for (int i = 0; i < validColumnCount; i++) {
+					event.column = i;
+					event.row = index;
+
+					for (int j = 0; j < parent.accessibleTableListeners.size(); j++) {
+						AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(j);
+						listener.getCell(event);
+					}
+
+					children[i] = event.accessible;
+				}
+
+				// Ask first child for position.
+				NSValue positionObj = (NSValue)children[0].getPositionAttribute(ACC.CHILDID_SELF);
+				NSPoint position = positionObj.pointValue();
+				
+				// Ask all children for size.
+				int height = 0;
+				int width = 0;
+				for (int j = 0; j < children.length; j++) {
+					NSValue sizeObj = (NSValue)children[j].getSizeAttribute(ACC.CHILDID_SELF);
+					NSSize size = sizeObj.sizeValue();
+					if (size.height > height) height = (int) size.height;
+					width += size.width;
+				}
+				e.x = (int) position.x;
+				// Flip y coordinate for Cocoa.
+				NSArray screens = NSScreen.screens();
+				NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+				NSRect frame = screen.frame();
+				e.y = (int) (frame.height - position.y - height);
+				e.width = width;
+				e.height = height;
+			}
+
+			public void getRole(AccessibleControlEvent e) {
+				int childID = e.childID;
+				if (childID == ACC.CHILDID_SELF) {
+					e.detail = ACC.ROLE_ROW;
+				} else {
+					e.detail = ACC.ROLE_TABLECELL;
+				}
+			}
+
+			public void getFocus(AccessibleControlEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				event.column = 0;
+				event.row = index;
+				for (int j = 0; j < parent.accessibleTableListeners.size(); j++) {
+					AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(j);
+					listener.getCell(event);
+				}
+				if (event.accessible != null) {
+					NSNumber focusedObj = (NSNumber) event.accessible.getFocusedAttribute(ACC.CHILDID_SELF);
+					e.childID = focusedObj.boolValue() ? ACC.CHILDID_SELF : ACC.CHILDID_NONE;
+				} else {
+					e.childID = ACC.CHILDID_NONE;
+				}
+			}
+		});
+		
+		addAccessibleTableListener(new AccessibleTableAdapter() {
+			public void isColumnSelected(AccessibleTableEvent e) {
+				e.isSelected = false;
+			}
+			public void isRowSelected(AccessibleTableEvent e) {
+				// Delegate to the parent table.
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				event.row = e.row;
+				for (int i = 0; i < parent.accessibleTableListeners.size(); i++) {
+					AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(i);
+					listener.isRowSelected(event);
+				}
+				e.isSelected = event.isSelected;
+			}			
+		});
+	}
+	
+	void getChildAtPoint(AccessibleControlEvent e) {
+		int validColumnCount = Math.max (1, parent.getColumnCount());
+		Accessible[] children = new Accessible[validColumnCount];
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < validColumnCount; i++) {
+			event.column = i;
+			event.row = index;
+
+			for (int j = 0; j < parent.accessibleTableListeners.size(); j++) {
+				AccessibleTableListener listener = (AccessibleTableListener)parent.accessibleTableListeners.elementAt(j);
+				listener.getCell(event);
+			}
+
+			children[i] = event.accessible;
+		}
+		
+		for (int j = 0; j < children.length; j++) {
+			NSValue positionObj = (NSValue)children[j].getPositionAttribute(index);
+			NSPoint position = positionObj.pointValue();
+			
+			NSValue sizeObj = (NSValue)children[j].getSizeAttribute(index);
+			NSSize size = sizeObj.sizeValue();
+
+			if (position.x <= e.x && e.x <= position.x + size.width) {
+				children[j].parent = this;
+				e.accessible = children[j];
+				break;
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Relation.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Relation.java
new file mode 100644
index 0000000..95e9b49
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Relation.java	
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.cocoa.*;
+
+class Relation {
+	Accessible accessible;
+	Accessible[] targets;
+	int type;
+
+	Relation(Accessible accessible, int type) {
+		this.accessible = accessible;
+		this.type = type;
+		this.targets = new Accessible[0];
+	}
+
+	void addTarget(Accessible target) {
+		if (containsTarget(target)) return;
+		Accessible[] newTargets = new Accessible[targets.length + 1];
+		System.arraycopy(targets, 0, newTargets, 0, targets.length);
+		newTargets[targets.length] = target;
+		targets = newTargets;
+	}
+
+	boolean containsTarget(Accessible target) {
+		for (int i = 0; i < targets.length; i++) {
+			if (targets[i] == target) return true;
+		}
+		return false;
+	}
+
+	void removeTarget(Accessible target) {
+		if (!containsTarget(target)) return;
+		Accessible[] newTargets = new Accessible[targets.length - 1];
+		int j = 0;
+		for (int i = 0; i < targets.length; i++) {
+			if (targets[i] != target) {
+				newTargets[j++] = targets[i];
+			}
+		}
+		targets = newTargets;
+	}
+
+	id getTitleUIElement() {
+		id result = null;
+		for (int i = 0; i < targets.length; i++) {
+			Accessible target = targets[i];			
+			result = target.accessibleHandle(target);
+		}
+		return result;
+	}
+
+	id getServesAsTitleForUIElements() {
+		NSMutableArray result = NSMutableArray.arrayWithCapacity(targets.length);
+		for (int i = 0; i < targets.length; i++) {
+			Accessible target = targets[i];			
+			id accessibleElement = target.accessibleHandle(target);
+			result.addObject(accessibleElement);
+		}
+		return result;
+	}
+
+	id getLinkedUIElements() {
+		NSMutableArray result = NSMutableArray.arrayWithCapacity(targets.length);
+		for (int i = 0; i < targets.length; i++) {
+			Accessible target = targets[i];			
+			id accessibleElement = target.accessibleHandle(target);
+			result.addObject(accessibleElement);
+		}
+		return result;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java
index e47c729..68d0bfd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/SWTAccessibleDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ class SWTAccessibleDelegate extends NSObject {
 	static Callback accessible2Args, accessible3Args, accessible4Args;
 	static int /*long*/ proc2Args, proc3Args, proc4Args;
 
-	Accessible accessibleParent;
+	Accessible accessible;
 	int /*long*/ delegateJniRef;
 	int childID;
 
@@ -88,7 +88,7 @@ class SWTAccessibleDelegate extends NSObject {
 
 	public SWTAccessibleDelegate(Accessible accessible, int childID) {
 		super(0);
-		this.accessibleParent = accessible;
+		this.accessible = accessible;
 		this.childID = childID;
 		alloc().init();
 		delegateJniRef = OS.NewGlobalRef(this);
@@ -101,7 +101,7 @@ class SWTAccessibleDelegate extends NSObject {
 		if (actionNames != null)
 			return retainedAutoreleased(actionNames);
 		
-		actionNames = accessibleParent.internal_accessibilityActionNames(childID);
+		actionNames = accessible.internal_accessibilityActionNames(childID);
 		actionNames.retain();
 		return retainedAutoreleased(actionNames);
 	}
@@ -111,13 +111,13 @@ class SWTAccessibleDelegate extends NSObject {
 		if (attributeNames != null)
 			return retainedAutoreleased(attributeNames);
 		
-		attributeNames = accessibleParent.internal_accessibilityAttributeNames(childID);
+		attributeNames = accessible.internal_accessibilityAttributeNames(childID);
 		attributeNames.retain();
 		return retainedAutoreleased(attributeNames);
 	}
 
 	id accessibilityAttributeValue(NSString attribute) {
-		return accessibleParent.internal_accessibilityAttributeValue(attribute, childID);
+		return accessible.internal_accessibilityAttributeValue(attribute, childID);
 	}
 	
 	// parameterized attribute methods
@@ -126,44 +126,44 @@ class SWTAccessibleDelegate extends NSObject {
 		if (parameterizedAttributeNames != null)
 			return retainedAutoreleased(parameterizedAttributeNames);
 		
-		parameterizedAttributeNames = accessibleParent.internal_accessibilityParameterizedAttributeNames(childID);
+		parameterizedAttributeNames = accessible.internal_accessibilityParameterizedAttributeNames(childID);
 		parameterizedAttributeNames.retain();
 		return retainedAutoreleased(parameterizedAttributeNames);
 	}
 	
 	id accessibilityAttributeValue_forParameter(NSString attribute, id parameter) {
-		return accessibleParent.internal_accessibilityAttributeValue_forParameter(attribute, parameter, childID);
+		return accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, childID);
 	}
 
 	// Return YES if the UIElement doesn't show up to the outside world - i.e. its parent should return the UIElement's children as its own - cutting the UIElement out. E.g. NSControls are ignored when they are single-celled.
 	boolean accessibilityIsIgnored() {
-		return accessibleParent.internal_accessibilityIsIgnored(childID);
+		return accessible.internal_accessibilityIsIgnored(childID);
 	}
 
 	boolean accessibilityIsAttributeSettable(NSString attribute) {
-		return false;
+		return accessible.internal_accessibilityIsAttributeSettable(attribute, childID);
 	}
 
 	// Returns the deepest descendant of the UIElement hierarchy that contains the point. You can assume the point has already been determined to lie within the receiver. Override this method to do deeper hit testing within a UIElement - e.g. a NSMatrix would test its cells. The point is bottom-left relative screen coordinates.
 	id accessibilityHitTest(NSPoint point) {
-		return accessibleParent.internal_accessibilityHitTest(point, childID);
+		return accessible.internal_accessibilityHitTest(point, childID);
 	}
 
 	// Returns the UI Element that has the focus. You can assume that the search for the focus has already been narrowed down to the reciever. Override this method to do a deeper search with a UIElement - e.g. a NSMatrix would determine if one of its cells has the focus.
 	id accessibilityFocusedUIElement() {
-		return accessibleParent.internal_accessibilityFocusedUIElement(childID);
+		return accessible.internal_accessibilityFocusedUIElement(childID);
 	}
 
 	void accessibilityPerformAction(NSString action) {
-		accessibleParent.internal_accessibilityPerformAction(action, childID);
+		accessible.internal_accessibilityPerformAction(action, childID);
 	}
 	
 	id accessibilityActionDescription(NSString action) {
-		return accessibleParent.internal_accessibilityActionDescription(action, childID);
+		return accessible.internal_accessibilityActionDescription(action, childID);
 	}
 	
-	
 	void accessibilitySetValue_forAttribute(id value, NSString attribute) {
+		accessible.internal_accessibilitySetValue_forAttribute(value, attribute, childID);
 	}
 	
 	static NSArray retainedAutoreleased(NSArray inObject) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/TableAccessibleDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/TableAccessibleDelegate.java
new file mode 100644
index 0000000..c8b246a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/TableAccessibleDelegate.java	
@@ -0,0 +1,288 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import java.util.*;
+
+import org.eclipse.swt.internal.cocoa.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class is used to describe a table for objects that have an accessible
+ * role of ACC.ROLE_TABLE, but aren't implemented like NSTableViews. That means they
+ * report back their children as a list of cells in row-major order instead of a list of
+ * rows with cells as children of those rows. The assumption is that the first 'row'
+ * of cells (cell 0 to cell 'column-count - 1') are the column headers of the table.
+
+ * Note that this class is NOT a subclass of Accessible, because it is not a child of the
+ * table accessible. It exists to factor out the logic when working with a lightweight table
+ * that doesn't conform to Cocoa's expectations. Specifically, it reports back a list of row
+ * and column objects and a header as its children, and identifies which cell the mouse is
+ * over.
+ */
+class TableAccessibleDelegate {
+
+	Map /*<Integer, AccessibleTableColumn>*/ childColumnToIdMap = new HashMap();
+	Map /*<Integer, AccessibleTableRow>*/ childRowToIdMap = new HashMap();
+	Accessible tableAccessible;
+	AccessibleTableHeader headerAccessible;
+	
+	public TableAccessibleDelegate(Accessible accessible) {
+		tableAccessible = accessible;
+		
+		tableAccessible.addAccessibleControlListener(new AccessibleControlAdapter() {
+			public void getChildCount(AccessibleControlEvent e) {
+				/* Return the number of row and column children.
+				 * If the CTable2 is being used as a list (i.e. if columns.length == 0) then add 1 column child.
+				 * If there is a column header (i.e. if columns.length > 0) then add 1 "column header" child.
+				 */
+				e.detail = childColumnToIdMap.size() + childRowToIdMap.size();
+				if (childColumnToIdMap.size() > 1) e.detail++;
+			}
+			public void getChildren(AccessibleControlEvent e) {
+				int childCount = childColumnToIdMap.size() + childRowToIdMap.size();
+				if (childColumnToIdMap.size() > 1) childCount++;
+				Accessible[] children = new Accessible[childCount];
+				int childIndex = 0;
+				
+				Iterator iter = childRowToIdMap.values().iterator();
+				while (iter.hasNext()) {
+					AccessibleTableRow row = (AccessibleTableRow)iter.next(); 
+					children[childIndex++] = row;
+				}
+	
+				iter = childColumnToIdMap.values().iterator();
+				while (iter.hasNext()) {
+					AccessibleTableColumn col = (AccessibleTableColumn)iter.next();
+					children[childIndex++] = col;
+				}
+	
+				if (childColumnToIdMap.size() > 1) children[childIndex] = headerAccessible();
+				
+				e.children = children;
+			}
+						
+			public void getChildAtPoint(AccessibleControlEvent e) {
+				NSPoint testPoint = new NSPoint();
+				testPoint.x = e.x;
+				Monitor primaryMonitor = Display.getCurrent().getPrimaryMonitor();
+				testPoint.y = (int) (primaryMonitor.getBounds().height - e.y);
+	
+				Iterator iter = childRowToIdMap.values().iterator();
+				
+				while (iter.hasNext()) {
+					AccessibleTableRow row = (AccessibleTableRow) iter.next();
+					NSValue locationValue = new NSValue(row.getPositionAttribute(ACC.CHILDID_SELF).id);
+					NSPoint location = locationValue.pointValue();
+					
+					NSValue sizeValue = new NSValue(row.getSizeAttribute(ACC.CHILDID_SELF));
+					NSSize size = sizeValue.sizeValue();
+					
+					if (location.y < testPoint.y && testPoint.y < (location.y + size.height)) {
+						AccessibleControlEvent e2 = new AccessibleControlEvent(e.getSource());
+						e2.x = (int) testPoint.x;
+						e2.y = (int) testPoint.y;
+						row.getChildAtPoint(e);
+						break;
+					}
+				}
+			}
+			
+			public void getState(AccessibleControlEvent e) {
+				int state = ACC.STATE_NORMAL | ACC.STATE_FOCUSABLE | ACC.STATE_SELECTABLE;
+	
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				for (int i = 0; i < tableAccessible.accessibleTableListeners.size(); i++) {
+					AccessibleTableListener listener = (AccessibleTableListener)tableAccessible.accessibleTableListeners.elementAt(i);
+					listener.getSelectedRows(event);
+				}
+				
+				if (event.selected != null) {
+					int[] selected = (int[])event.selected;
+	
+					for (int i = 0; i < selected.length; i++) {
+						if (selected[i] == tableAccessible.index) {
+							state |= ACC.STATE_SELECTED;
+							break;
+						}
+					}
+				}
+	
+				NSNumber focusedObject = (NSNumber)tableAccessible.getFocusedAttribute(ACC.CHILDID_SELF);
+				if (focusedObject.boolValue()) {
+					state |= ACC.STATE_FOCUSED;
+				}
+				
+				e.detail = state;
+			}
+		});
+		
+		tableAccessible.addAccessibleTableListener(new AccessibleTableAdapter() {
+			public void getColumnCount(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				
+				for (int i = 0; i < tableAccessible.accessibleTableListeners.size(); i++) {
+					AccessibleTableListener listener = (AccessibleTableListener)tableAccessible.accessibleTableListeners.elementAt(i);
+					if (listener != this) listener.getColumnCount(event);
+				}
+	
+				e.count = event.count;
+			}
+			public void getColumn(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				getColumns(event);
+				e.accessible = event.accessibles[e.column];
+			}
+			public void getColumns(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				getColumnCount(event);
+				
+				// This happens if the table listeners just report back a column count but don't have
+				// distinct objects for each of the column.
+				// When that happens we need to make 'fake' accessibles that represent the rows.
+				if (event.count != childColumnToIdMap.size()) {
+					childColumnToIdMap.clear();
+				}
+				
+				Accessible[] columns = new Accessible[event.count];
+				
+				for (int i = 0; i < event.count; i++) {
+					columns[i] = childColumnToOs(i);
+				}
+	
+				int columnCount = childColumnToIdMap.size() > 0 ? childColumnToIdMap.size() : 1;
+				Accessible[] accessibles = new Accessible[columnCount];
+				for (int i = 0; i < columnCount; i++) {
+					accessibles[i] = (Accessible) childColumnToIdMap.get(new Integer(i));
+				}
+				e.accessibles = accessibles;
+			}
+			public void getColumnHeader(AccessibleTableEvent e) {
+				e.accessible = (childColumnToIdMap.size() > 1 ? headerAccessible() : null);
+			}
+			public void getRowCount(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				
+				for (int i = 0; i < tableAccessible.accessibleTableListeners.size(); i++) {
+					AccessibleTableListener listener = (AccessibleTableListener)tableAccessible.accessibleTableListeners.elementAt(i);
+					if (listener != this) listener.getRowCount(event);
+				}
+	
+				e.count = event.count;
+			}
+			public void getRow(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				getRows(event);
+				e.accessible = event.accessibles[e.row];
+			}
+			public void getRows(AccessibleTableEvent e) {
+				AccessibleTableEvent event = new AccessibleTableEvent(this);
+				getRowCount(event);
+				
+				// This happens if the table listeners just report back a column count but don't have
+				// distinct objects for each of the column.
+				// When that happens we need to make 'fake' accessibles that represent the rows.
+				if (event.count != childRowToIdMap.size()) {
+					childRowToIdMap.clear();
+				}
+				
+				Accessible[] rows = new Accessible[event.count];
+				
+				for (int i = 0; i < event.count; i++) {
+					rows[i] = childRowToOs(i);
+				}
+	
+				int columnCount = childRowToIdMap.size() > 0 ? childRowToIdMap.size() : 1;
+				Accessible[] accessibles = new Accessible[columnCount];
+				for (int i = 0; i < columnCount; i++) {
+					accessibles[i] = (Accessible) childRowToIdMap.get(new Integer(i));
+				}
+				e.accessibles = accessibles;
+			}
+		});
+	
+	}
+
+	Accessible childColumnToOs(int childID) {
+		if (childID == ACC.CHILDID_SELF) {
+			return tableAccessible;
+		}
+	
+		/* Check cache for childID, if found, return corresponding osChildID. */
+		AccessibleTableColumn childRef = (AccessibleTableColumn) childColumnToIdMap.get(new Integer(childID));
+		
+		if (childRef == null) {
+			childRef = new AccessibleTableColumn(tableAccessible, childID);
+			childColumnToIdMap.put(new Integer(childID), childRef);
+		}
+		
+		return childRef;
+	}
+
+	Accessible childRowToOs(int childID) {
+		if (childID == ACC.CHILDID_SELF) {
+			return tableAccessible;
+		}
+
+		/* Check cache for childID, if found, return corresponding osChildID. */
+		AccessibleTableRow childRef = (AccessibleTableRow) childRowToIdMap.get(new Integer(childID));
+		
+		if (childRef == null) {
+			childRef = new AccessibleTableRow(tableAccessible, childID);
+			childRowToIdMap.put(new Integer(childID), childRef);
+		}
+		
+		return childRef;
+	}
+
+	AccessibleTableHeader headerAccessible() {
+		if (headerAccessible == null) headerAccessible = new AccessibleTableHeader(tableAccessible, ACC.CHILDID_SELF);
+		return headerAccessible;
+	}
+
+	void release() {
+		if (childRowToIdMap != null) {
+			Collection delegates = childRowToIdMap.values();
+			Iterator iter = delegates.iterator();
+			while (iter.hasNext()) {
+				SWTAccessibleDelegate childDelegate = ((Accessible)iter.next()).delegate;
+				if (childDelegate != null) {
+					childDelegate.internal_dispose_SWTAccessibleDelegate();
+					childDelegate.release();
+				}
+			}
+
+			childRowToIdMap.clear();
+			childRowToIdMap = null;
+		}
+
+		if (childColumnToIdMap != null) {
+			Collection delegates = childColumnToIdMap.values();
+			Iterator iter = delegates.iterator();
+			while (iter.hasNext()) {
+				SWTAccessibleDelegate childDelegate = ((Accessible)iter.next()).delegate;
+				if (childDelegate != null) {
+					childDelegate.internal_dispose_SWTAccessibleDelegate();
+					childDelegate.release();
+				}
+			}
+
+			childColumnToIdMap.clear();
+			childColumnToIdMap = null;
+		}
+	}
+	
+	void reset() {
+		release();
+		childColumnToIdMap = new HashMap();
+		childRowToIdMap = new HashMap();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/ACC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/ACC.java
index 79179c5..1cf770e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/ACC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/ACC.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,23 +20,37 @@ package org.eclipse.swt.accessibility;
  * @since 2.0
  */
 public class ACC {
-	public static final int STATE_NORMAL = 0x00000000;
-	public static final int STATE_SELECTED = 0x00000002;
-	public static final int STATE_SELECTABLE = 0x00200000;
-	public static final int STATE_MULTISELECTABLE = 0x1000000;
-	public static final int STATE_FOCUSED = 0x00000004;
-	public static final int STATE_FOCUSABLE = 0x00100000;
-	public static final int STATE_PRESSED = 0x8;
-	public static final int STATE_CHECKED = 0x10;
-	public static final int STATE_EXPANDED = 0x200;
-	public static final int STATE_COLLAPSED = 0x400;
-	public static final int STATE_HOTTRACKED = 0x80;
-	public static final int STATE_BUSY = 0x800;
-	public static final int STATE_READONLY = 0x40;
-	public static final int STATE_INVISIBLE = 0x8000;
-	public static final int STATE_OFFSCREEN = 0x10000;
-	public static final int STATE_SIZEABLE = 0x20000;
-	public static final int STATE_LINKED = 0x400000;
+	public static final int STATE_NORMAL = 			0x00000000;
+	public static final int STATE_SELECTED = 		0x00000002;
+	public static final int STATE_SELECTABLE = 		0x00200000;
+	public static final int STATE_MULTISELECTABLE = 0x01000000;
+	public static final int STATE_FOCUSED = 		0x00000004;
+	public static final int STATE_FOCUSABLE = 		0x00100000;
+	public static final int STATE_PRESSED = 		0x00000008;
+	public static final int STATE_CHECKED = 		0x00000010;
+	public static final int STATE_EXPANDED = 		0x00000200;
+	public static final int STATE_COLLAPSED = 		0x00000400;
+	public static final int STATE_HOTTRACKED = 		0x00000080;
+	public static final int STATE_BUSY = 			0x00000800;
+	public static final int STATE_READONLY = 		0x00000040;
+	public static final int STATE_INVISIBLE = 		0x00008000;
+	public static final int STATE_OFFSCREEN = 		0x00010000;
+	public static final int STATE_SIZEABLE = 		0x00020000;
+	public static final int STATE_LINKED = 			0x00400000;
+	/** @since 3.6 */
+	public static final int STATE_DISABLED = 		0x00000001;
+	/** @since 3.6 */
+	public static final int STATE_ACTIVE = 			0x04000000;
+	/** @since 3.6 */
+	public static final int STATE_SINGLELINE = 		0x08000000;
+	/** @since 3.6 */
+	public static final int STATE_MULTILINE = 		0x10000000;
+	/** @since 3.6 */
+	public static final int STATE_REQUIRED = 		0x02000000;
+	/** @since 3.6 */
+	public static final int STATE_INVALID_ENTRY = 	0x20000000;
+	/** @since 3.6 */
+	public static final int STATE_SUPPORTS_AUTOCOMPLETION = 0x40000000;
 
 	public static final int ROLE_CLIENT_AREA = 0xa;
 	public static final int ROLE_WINDOW = 0x9;
@@ -71,11 +85,638 @@ public class ACC {
 	public static final int ROLE_PROGRESSBAR = 0x30;
 	public static final int ROLE_SLIDER = 0x33;
 	public static final int ROLE_LINK = 0x1e;
+	/** @since 3.6 */
+	public static final int ROLE_ALERT = 0x08;
+	/** @since 3.6 */
+	public static final int ROLE_ANIMATION = 0x36;
+	/** @since 3.6 */
+	public static final int ROLE_CANVAS = 0x401;
+	/** @since 3.6 */
+	public static final int ROLE_COLUMN = 0x1b;
+	/** @since 3.6 */
+	public static final int ROLE_DOCUMENT = 0x0f;
+	/** @since 3.6 */
+	public static final int ROLE_GRAPHIC = 0x28;
+	/** @since 3.6 */
+	public static final int ROLE_GROUP = 0x14;
+	/** @since 3.6 */
+	public static final int ROLE_ROW = 0x1c;
+	/** @since 3.6 */
+	public static final int ROLE_SPINBUTTON = 0x34;
+	/** @since 3.6 */
+	public static final int ROLE_STATUSBAR = 0x17;
+	/** @since 3.6 */
+	public static final int ROLE_CHECKMENUITEM = 0x403;
+	/** @since 3.6 */
+	public static final int ROLE_RADIOMENUITEM = 0x431;
+	/** @since 3.6 */
+	public static final int ROLE_CLOCK = 0x3d;
+	/** @since 3.6 */
+	public static final int ROLE_CALENDAR = 0x2f;
+	/** @since 3.6 */
+	public static final int ROLE_DATETIME = 0x405;
+	/** @since 3.6 */
+	public static final int ROLE_FOOTER = 0x40E;
+	/** @since 3.6 */
+	public static final int ROLE_FORM = 0x410;
+	/** @since 3.6 */
+	public static final int ROLE_HEADER = 0x413;
+	/** @since 3.6 */
+	public static final int ROLE_HEADING = 0x414;
+	/** @since 3.6 */
+	public static final int ROLE_PAGE = 0x41D;
+	/** @since 3.6 */
+	public static final int ROLE_PARAGRAPH = 0x41E;
+	/** @since 3.6 */
+	public static final int ROLE_SECTION = 0x424;
 
 	public static final int CHILDID_SELF = -1;
 	public static final int CHILDID_NONE = -2;
 	public static final int CHILDID_MULTIPLE = -3;
+
+	/**
+	 * An AT is requesting the accessible child object at the specified index.
+	 * 
+	 * @see AccessibleControlListener#getChild
+	 * 
+	 * @since 3.6 */
+	public static final int CHILDID_CHILD_AT_INDEX = -4;
+	
+	/**
+	 * An AT is requesting the index of this accessible in its parent.
+	 * 
+	 * @see AccessibleControlListener#getChild
+	 * 
+	 * @since 3.6 */
+	public static final int CHILDID_CHILD_INDEX = -5;
+	
+	/**
+	 * A detail constant indicating visible accessible objects.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int VISIBLE = 0x01;
+	
+	/**
+	 * A type constant specifying that insertion occurred.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int INSERT = 0;
+
+	/**
+	 * A type constant specifying that deletion occurred.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int DELETE = 1;
+	
+	public static final int TEXT_INSERT = INSERT;
+	public static final int TEXT_DELETE = DELETE;
+
+	/**
+	 * A constant specifying that an operation succeeded.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String OK = "OK"; //$NON-NLS-1$
+
+	/**
+	 * Typically, a single character is returned. In some cases more than one
+	 * character is returned, for example, when a document contains field data
+	 * such as a field containing a date, time, or footnote reference. In this
+	 * case the caret can move over several characters in one movement of the
+	 * caret. Note that after the caret moves, the caret offset changes by the
+	 * number of characters in the field, e.g. by 8 characters in the following
+	 * date: 03/26/07.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_CHAR = 0;
+	
+	/**
+	 * The range provided matches the range observed when the application
+	 * processes the Ctrl + left arrow and Ctrl + right arrow key sequences.
+	 * Typically this is from the start of one word to the start of the next,
+	 * but various applications are inconsistent in the handling of the end of a
+	 * line.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_WORD = 1;
 	
-	public static final int TEXT_INSERT = 0;
-	public static final int TEXT_DELETE = 1;
+	/**
+	 * Range is from start of one sentence to the start of another sentence.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_SENTENCE = 2;
+
+	/**
+	 * Range is from start of one paragraph to the start of another paragraph.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_PARAGRAPH = 3;
+
+	/**
+	 * Range is from start of one line to the start of another line. This often
+	 * means that an end-of-line character will appear at the end of the range.
+	 * However in the case of some applications an end-of-line character
+	 * indicates the end of a paragraph and the lines composing the paragraph,
+	 * other than the last line, do not contain an end of line character.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_LINE = 4;
+
+	/**
+	 * Using this value will cause all text to be returned.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int TEXT_BOUNDARY_ALL = 5;
+
+	/**
+	 * Scroll the top left corner of the object or substring such that the top
+	 * left corner (and as much as possible of the rest of the object or
+	 * substring) is within the top level window. In cases where the entire
+	 * object or substring fits within the top level window, the placement of
+	 * the object or substring is dependent on the application. For example, the
+	 * object or substring may be scrolled to the closest edge, the furthest
+	 * edge, or midway between those two edges. In cases where there is a
+	 * hierarchy of nested scrollable controls, more than one control may have
+	 * to be scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_TOP_LEFT = 0;
+
+	/**
+	 * Scroll the bottom right corner of the object or substring such that the
+	 * bottom right corner (and as much as possible of the rest of the object or
+	 * substring) is within the top level window. In cases where the entire
+	 * object or substring fits within the top level window, the placement of
+	 * the object or substring is dependent on the application. For example, the
+	 * object or substring may be scrolled to the closest edge, the furthest
+	 * edge, or midway between those two edges. In cases where there is a
+	 * hierarchy of nested scrollable controls, more than one control may have
+	 * to be scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_BOTTOM_RIGHT = 1;
+
+	/**
+	 * Scroll the top edge of the object or substring such that the top edge
+	 * (and as much as possible of the rest of the object or substring) is
+	 * within the top level window. In cases where the entire object or substring
+	 * fits within the top level window, the placement of the object or
+	 * substring is dependent on the application. For example, the object or
+	 * substring may be scrolled to the closest edge, the furthest edge, or
+	 * midway between those two edges. In cases where there is a hierarchy of
+	 * nested scrollable controls, more than one control may have to be
+	 * scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_TOP_EDGE = 2;
+
+	/**
+	 * Scroll the bottom edge of the object or substring such that the bottom
+	 * edge (and as much as possible of the rest of the object or substring) is
+	 * within the top level window. In cases where the entire object or
+	 * substring fits within the top level window, the placement of the object
+	 * or substring is dependent on the application. For example, the object or
+	 * substring may be scrolled to the closest edge, the furthest edge, or
+	 * midway between those two edges. In cases where there is a hierarchy of
+	 * nested scrollable controls, more than one control may have to be
+	 * scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_BOTTOM_EDGE = 3;
+
+	/**
+	 * Scroll the left edge of the object or substring such that the left edge
+	 * (and as much as possible of the rest of the object or substring) is
+	 * within the top level window. In cases where the entire object or substring
+	 * fits within the top level window, the placement of the object or
+	 * substring is dependent on the application. For example, the object or
+	 * substring may be scrolled to the closest edge, the furthest edge, or
+	 * midway between those two edges. In cases where there is a hierarchy of
+	 * nested scrollable controls, more than one control may have to be
+	 * scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_LEFT_EDGE = 4;
+
+	/**
+	 * Scroll the right edge of the object or substring such that the right edge
+	 * (and as much as possible of the rest of the object or substring) is
+	 * within the top level window. In cases where the entire object or
+	 * substring fits within the top level window, the placement of the object
+	 * or substring is dependent on the application. For example, the object or
+	 * substring may be scrolled to the closest edge, the furthest edge, or
+	 * midway between those two edges. In cases where there is a hierarchy of
+	 * nested scrollable controls, more than one control may have to be
+	 * scrolled.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_RIGHT_EDGE =  5;
+
+	/**
+	 * Scroll the object or substring such that as much as possible of the
+	 * object or substring is within the top level window. The placement of the
+	 * object is dependent on the application. For example, the object or
+	 * substring may be scrolled to to closest edge, the furthest edge, or
+	 * midway between those two edges.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_ANYWHERE = 6;
+
+	/**
+	 * Scroll the top left corner of the object or substring to the specified point.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int SCROLL_TYPE_POINT = 7;
+
+	/**
+	 * Send when the selection within a container has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_SELECTION_CHANGED = 0x8009;
+	
+	/**
+	 * Send when an object's text selection has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TEXT_SELECTION_CHANGED = 0x8014;
+	
+	/**
+	 * Send when an object's state has changed, for example enabled/disabled, pressed/released, or checked/unchecked.
+	 * <p>
+	 * The eventData object is an array of 2 ints specifying the following:<ul>
+	 * <li>state - the STATE_* constant identifying the state that changed</li>
+	 * <li>newValue - either 1 or 0, indicating whether the state has changed to true or false</li>
+	 * </ul></p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_STATE_CHANGED = 0x800A;
+	
+	/**
+	 * Send when an object has moved.
+	 * <p>
+	 * Note: only send one notification for the topmost object that has changed.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_LOCATION_CHANGED = 0x800B;
+	
+	/**
+	 * Send when an object's name has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_NAME_CHANGED = 0x800C;
+	
+	/**
+	 * Send when an object's description has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_DESCRIPTION_CHANGED = 0x800D;
+	
+	/**
+	 * Send when an object's value has changed.
+	 * <p>
+	 * The eventData object is an array of 2 Numbers specifying the following:<ul>
+	 * <li>oldValue - the object's old value</li>
+	 * <li>newValue - the object's new value</li>
+	 * </ul></p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_VALUE_CHANGED = 0x800E;
+
+	/**
+	 * Send when the loading of a document has completed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_DOCUMENT_LOAD_COMPLETE = 0x105;
+
+	/**
+	 * Send when the loading of a document was interrupted.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_DOCUMENT_LOAD_STOPPED = 0x106;
+
+	/**
+	 * Send when the document contents are being reloaded.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_DOCUMENT_RELOAD = 0x107;
+
+	/**
+	 * Send when a slide changed in a presentation document
+	 * or a page boundary was crossed in a word processing document. 
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_PAGE_CHANGED = 0x111;
+
+	/**
+	 * Send when the caret moved from one section to the next.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_SECTION_CHANGED = 0x112;
+
+	/**
+	 * Send when the count or attributes of an accessible object's actions have changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_ACTION_CHANGED = 0x100;
+
+	/**
+	 * Send when the starting index of this link within the containing string has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERLINK_START_INDEX_CHANGED = 0x10d;
+
+	/**
+	 * Send when the ending index of this link within the containing string has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERLINK_END_INDEX_CHANGED = 0x108;
+
+	/**
+	 * Send when the number of anchors associated with this hyperlink object has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED = 0x109;
+
+	/**
+	 * Send when the hyperlink selected state changed from selected to unselected
+	 * or from unselected to selected.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x10a;
+
+	/**
+	 * Send when the hyperlink has been activated.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERLINK_ACTIVATED = 0x10b;
+
+	/**
+	 * Send when one of the links associated with the hypertext object has been selected.
+	 * <p>
+	 * The eventData object is an Integer that represents the index of the selected link
+	 * in the hypertext object.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERTEXT_LINK_SELECTED = 0x10c;
+
+	/**
+	 * Send when the number of hyperlinks associated with a hypertext object has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_HYPERTEXT_LINK_COUNT_CHANGED = 0x10f;
+
+	/**
+	 * Send when an object's attributes have changed.
+	 * 
+	 * @see #EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_ATTRIBUTE_CHANGED = 0x200;
+
+	/**
+	 * Send when a table caption has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_CAPTION_CHANGED = 0x203;
+
+	/**
+	 * Send when a table's column description has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x204;
+
+	/**
+	 * Send when a table's column header has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x205;
+
+	/**
+	 * Send when a table's data has changed.
+	 * <p>
+	 * The eventData object is an array of 5 ints specifying the following:<ul>
+	 * <li>type - {@link ACC#INSERT} or {@link ACC#DELETE} - the type of change</li>
+	 * <li>rowStart - the index of the first row that changed</li>
+	 * <li>rowCount - the number of contiguous rows that changed, or 0 if no rows changed</li>
+	 * <li>columnStart - the index of the first column that changed</li>
+	 * <li>columnCount - the number of contiguous columns that changed, or 0 if no columns changed</li>
+	 * </ul></p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_CHANGED = 0x206;
+
+	/**
+	 * Send when a table's row description has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x207;
+
+	/**
+	 * Send when a table's row header has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_ROW_HEADER_CHANGED = 0x208;
+
+	/**
+	 * Send when a table's summary has changed.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TABLE_SUMMARY_CHANGED = 0x209;
+
+	/**
+	 * Send when a text object's attributes have changed.
+	 * 
+	 * @see #EVENT_ATTRIBUTE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TEXT_ATTRIBUTE_CHANGED = 0x20a;
+	 
+	/**
+	 * Send when the caret has moved to a new position.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TEXT_CARET_MOVED = 0x11b;
+
+	/**
+	 * Send when the caret has moved from one column to the next.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TEXT_COLUMN_CHANGED = 0x11d;
+
+	/**
+	 * Send when text was inserted or deleted.
+	 * <p>
+	 * The eventData object is an array of 4 objects specifying the following:<ul>
+	 * <li>type - {@link ACC#INSERT} or {@link ACC#DELETE} - the type of change</li>
+	 * <li>start - the index of the first character that changed</li>
+	 * <li>end - the index of the last character that changed</li>
+	 * <li>text - the text string that was inserted or deleted</li>
+	 * </ul></p>
+	 * 
+	 * @since 3.6
+	 */
+	public static final int EVENT_TEXT_CHANGED = 0x20c;
+
+	/**
+	 * Some attribute of this object is affected by a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_CONTROLLED_BY = 0;
+
+	/**
+	 * This object is interactive and controls some attribute of a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_CONTROLLER_FOR = 1;
+
+	/**
+	 * This object is described by the target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_DESCRIBED_BY = 2;
+
+	/**
+	 * This object is describes the target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_DESCRIPTION_FOR = 3;
+
+	/**
+	 * This object is embedded by a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_EMBEDDED_BY = 4;
+
+	/**
+	 * This object embeds a target object. This relation can be used on a
+	 * control's accessible to show where the content areas are.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_EMBEDS = 5;
+
+	/**
+	 * Content flows to this object from a target object. 
+	 * This relation and RELATION_FLOWS_TO are useful to tie text and non-text
+	 * objects together in order to allow assistive technology to follow the
+	 * intended reading order.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_FLOWS_FROM = 6;
+
+	/**
+	 * Content flows from this object to a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_FLOWS_TO = 7;
+
+	/**
+	 * This object is label for a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_LABEL_FOR = 8;
+
+	/**
+	 * This object is labelled by a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_LABELLED_BY = 9;
+
+	/**
+	 * This object is a member of a group of one or more objects. When 
+	 * there is more than one object in the group each member may have one and the 
+	 * same target, e.g. a grouping object.  It is also possible that each member has 
+	 * multiple additional targets, e.g. one for every other member in the group.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_MEMBER_OF = 10;
+
+	/**
+	 * This object is a child of a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_NODE_CHILD_OF = 11;
+
+	/**
+	 * This object is a parent window of the target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_PARENT_WINDOW_OF = 12;
+
+	/**
+	 * This object is a transient component related to the target object. 
+	 * When this object is activated the target object doesn't lose focus.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_POPUP_FOR = 13;
+
+	/**
+	 * This object is a sub window of a target object.
+	 * 
+	 * @since 3.6
+	 */
+	public static final int RELATION_SUBWINDOW_OF = 14;	
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionAdapter.java
new file mode 100644
index 0000000..a8b9608
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionAdapter.java	
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleActionListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleAction</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleActionListener
+ * @see AccessibleActionEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleActionAdapter implements AccessibleActionListener {
+	/**
+	 * Returns the number of accessible actions available in this object.
+	 * <p>
+	 * If there are more than one, the first one (index 0) is considered the
+	 * "default" action of the object.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of actions, or zero if there are no actions</li>
+	 * </ul>
+	 */
+	public void getActionCount(AccessibleActionEvent e) {}
+
+	/**
+	 * Performs the specified action on the object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying the action to perform.
+	 * 		If the index lies outside the valid range no action is performed.</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the action was performed.</li>
+	 * </ul>
+	 */
+	public void doAction(AccessibleActionEvent e) {}
+
+	/**
+	 * Returns a description of the specified action.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's description to return</li>
+	 * <li>[out] result - a localized string describing the specified action,
+	 * 		or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getDescription(AccessibleActionEvent e) {}
+
+	/**
+	 * Returns a string representing one or more key bindings, if there
+	 * are any, associated with the specified action.
+	 * <p>
+	 * The returned string is of the following form: mnemonic;accelerator
+	 * for example: "C;CTRL+C" for the Copy item in a typical Edit menu.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's key bindings to return</li>
+	 * <li>[out] result - a semicolon-delimited string of localized key bindings
+	 * 		(example: "C;CTRL+C"), or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getKeyBinding(AccessibleActionEvent e) {}
+
+	/**
+	 * Returns the name of the specified action.
+	 * <p>
+	 * There is no need to implement this method for single action controls
+	 * since that would be redundant with AccessibleControlListener.getDefaultAction.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's name to return</li>
+	 * <li>[in] localized - a boolean indicating whether or not to return a localized name</li>
+	 * <li>[out] result - the name of the specified action,
+	 * 		or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getName(AccessibleActionEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionEvent.java
new file mode 100644
index 0000000..de96073
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionEvent.java	
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleAction messages to an accessible object.
+ *
+ * @see AccessibleActionListener
+ * @see AccessibleActionAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleActionEvent extends SWTEventObject {
+
+	/**
+	 * The value of this field must be set in the accessible action listener method
+	 * before returning. What to set it to depends on the listener method called.
+	 */
+	public String result;
+	public int count;
+	public int index;
+	public boolean localized;
+
+	static final long serialVersionUID = 2849066792640153087L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleActionEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleActionEvent {"
+		+ "string=" + result   //$NON-NLS-1$
+		+ " count=" + count   //$NON-NLS-1$
+		+ " index=" + index   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionListener.java
new file mode 100644
index 0000000..ab679ec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleActionListener.java	
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleAction events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleActionListener</code> method and removed using
+ * the <code>removeAccessibleActionListener</code> method.
+ * </p>
+ *
+ * @see AccessibleActionAdapter
+ * @see AccessibleActionEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleActionListener extends SWTEventListener {
+	/**
+	 * Returns the number of accessible actions available in this object.
+	 * <p>
+	 * If there are more than one, the first one (index 0) is considered the
+	 * "default" action of the object.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of actions, or zero if there are no actions</li>
+	 * </ul>
+	 */
+	public void getActionCount(AccessibleActionEvent e);
+
+	/**
+	 * Performs the specified action on the object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying the action to perform.
+	 * 		If the index lies outside the valid range no action is performed.</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the action was performed.</li>
+	 * </ul>
+	 */
+	public void doAction(AccessibleActionEvent e);
+
+	/**
+	 * Returns a description of the specified action.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's description to return</li>
+	 * <li>[out] result - a localized string describing the specified action,
+	 * 		or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getDescription(AccessibleActionEvent e);
+
+	/**
+	 * Returns a string representing one or more key bindings, if there
+	 * are any, associated with the specified action.
+	 * <p>
+	 * The returned string is of the following form: mnemonic;accelerator
+	 * for example: "C;CTRL+C" for the Copy item in a typical Edit menu.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's key bindings to return</li>
+	 * <li>[out] result - a semicolon-delimited string of localized key bindings
+	 * 		(example: "C;CTRL+C"), or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getKeyBinding(AccessibleActionEvent e);
+
+	/**
+	 * Returns the name of the specified action.
+	 * <p>
+	 * There is no need to implement this method for single action controls
+	 * since that would be redundant with AccessibleControlListener.getDefaultAction.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index specifying which action's name to return</li>
+	 * <li>[in] localized - a boolean indicating whether or not to return a localized name</li>
+	 * <li>[out] result - the name of the specified action,
+	 * 		or null if the index lies outside the valid range</li>
+	 * </ul>
+	 */
+	public void getName(AccessibleActionEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java
new file mode 100644
index 0000000..43df16e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java	
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleAttributeListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleAttribute</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleAttributeListener
+ * @see AccessibleAttributeEvent
+ * @see AccessibleTextAttributeEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleAttributeAdapter implements AccessibleAttributeListener {
+	/**
+	 * Returns attributes specific to this Accessible object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] topMargin - the top margin in pixels</li>
+	 * <li>[out] bottomMargin - the bottom margin in pixels</li>
+	 * <li>[out] leftMargin - the left margin in pixels</li>
+	 * <li>[out] rightMargin - the right margin in pixels</li>
+	 * <li>[out] tabStops - an array of pixel locations</li>
+	 * <li>[out] justify - whether or not to justify the text</li>
+	 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
+	 * <li>[out] indent - the indent in pixels</li>
+	 * <li>[out] attributes - an array of alternating key and value Strings
+	 * 		which represent additional (i.e. non predefined) attributes</li>
+	 * </ul>
+	 */
+	public void getAttributes(AccessibleAttributeEvent e) {}
+
+	/**
+	 * Returns text attributes specific to this Accessible object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the 0 based text offset</li>
+	 * <li>[out] start - the starting offset of the character range
+	 * 		over which all text attributes match those of offset</li>
+	 * <li>[out] end - the 0 based offset after the last character of the character range
+	 * 		over which all text attributes match those of offset</li>
+	 * <li>[out] textStyle - the TextStyle of the character range</li>
+	 * <li>[out] attributes - an array of alternating key and value Strings
+	 * 		which represent additional (i.e. non predefined) attributes</li>
+	 * </ul>
+	 */
+	public void getTextAttributes(AccessibleTextAttributeEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
new file mode 100644
index 0000000..b09ffb0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java	
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleAttribute messages to an accessible object.
+ *
+ * @see AccessibleAttributeListener
+ * @see AccessibleAttributeAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleAttributeEvent extends SWTEventObject {
+
+	public int topMargin;
+	public int bottomMargin;
+	public int leftMargin;
+	public int rightMargin;
+	public int[] tabStops;
+	public boolean justify;
+	public int alignment;
+	public int indent;
+	public String [] attributes;
+
+	static final long serialVersionUID = 2237016128901566049L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleAttributeEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleAttributeEvent {"
+		+ " topMargin=" + topMargin   //$NON-NLS-1$
+		+ " bottomMargin=" + bottomMargin   //$NON-NLS-1$
+		+ " leftMargin=" + leftMargin   //$NON-NLS-1$
+		+ " rightMargin=" + rightMargin   //$NON-NLS-1$
+		+ " tabStops=" + tabStops   //$NON-NLS-1$
+		+ " justify=" + justify   //$NON-NLS-1$
+		+ " alignment=" + alignment   //$NON-NLS-1$
+		+ " indent=" + indent   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeListener.java
new file mode 100644
index 0000000..6d08f26
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAttributeListener.java	
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleAttribute events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleAttributeListener</code> method and removed using
+ * the <code>removeAccessibleAttributeListener</code> method.
+ * </p>
+ *
+ * @see AccessibleAttributeAdapter
+ * @see AccessibleAttributeEvent
+ * @see AccessibleTextAttributeEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleAttributeListener extends SWTEventListener {
+	/**
+	 * Returns attributes specific to this Accessible object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] topMargin - the top margin in pixels</li>
+	 * <li>[out] bottomMargin - the bottom margin in pixels</li>
+	 * <li>[out] leftMargin - the left margin in pixels</li>
+	 * <li>[out] rightMargin - the right margin in pixels</li>
+	 * <li>[out] tabStops - an array of pixel locations</li>
+	 * <li>[out] justify - whether or not to justify the text</li>
+	 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
+	 * <li>[out] indent - the indent in pixels</li>
+	 * <li>[out] attributes - an array of alternating key and value Strings
+	 * 		which represent additional (i.e. non predefined) attributes</li>
+	 * </ul>
+	 */
+	public void getAttributes(AccessibleAttributeEvent e);
+
+	/**
+	 * Returns text attributes specific to this Accessible object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the 0 based text offset</li>
+	 * <li>[out] start - the starting offset of the character range
+	 * 		over which all text attributes match those of offset</li>
+	 * <li>[out] end - the 0 based offset after the last character of the character range
+	 * 		over which all text attributes match those of offset</li>
+	 * <li>[out] textStyle - the TextStyle of the character range</li>
+	 * <li>[out] attributes - an array of alternating key and value Strings
+	 * 		which represent additional (i.e. non predefined) attributes</li>
+	 * </ul>
+	 */
+	public void getTextAttributes(AccessibleTextAttributeEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
index 1dfc718..a9bc78a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,18 +80,22 @@ public abstract class AccessibleControlAdapter implements AccessibleControlListe
 	
 	/**
 	 * Sent when an accessibility client requests the accessible object
-	 * for a child of the control.
-	 * The default behavior is to do nothing.
+	 * for a child of the control by index or childID, or when a client
+	 * requests the index of an accessible object in its parent.
 	 * <p>
-	 * Return an <code>Accessible</code> for the specified control or
-	 * child in the <code>accessible</code> field of the event object.
-	 * Return null if the specified child does not have its own
-	 * <code>Accessible</code>.
-	 * </p>
+	 * The childID field in the event object can be one of the following:<ul>
+	 *    <li>an integer child ID - return the accessible object for the specified child ID,
+	 *    	or null if the specified child does not have its own accessible</li>
+	 *    <li>{@link ACC#CHILDID_CHILD_AT_INDEX} - return the accessible child object at the specified index,
+	 *    	or null if this object has no children</li>
+	 *    <li>{@link ACC#CHILDID_CHILD_INDEX} - return the index of this accessible in its parent</li>
+	 * </ul></p>
 	 *
 	 * @param e an event object containing the following fields:<ul>
-	 *    <li>childID [IN] - an identifier specifying a child of the control</li>
-	 *    <li>accessible [OUT] - an Accessible for the specified childID, or null if one does not exist</li>
+	 *    <li>childID [IN] - an identifier specifying a child of the control, or one of the predefined CHILDID constants</li>
+	 *    <li>detail [Optional IN] - the index of the child accessible to be returned when childID = CHILDID_CHILD_AT_INDEX</li>
+	 *    <li>detail [Optional OUT] - the index of this accessible in its parent when childID = CHILDID_CHILD_INDEX</li>
+	 *    <li>accessible [Optional OUT] - an Accessible for the specified childID or index, or null if one does not exist</li>
 	 * </ul>
 	 */
 	public void getChild(AccessibleControlEvent e) {
@@ -186,6 +190,7 @@ public abstract class AccessibleControlAdapter implements AccessibleControlListe
 	 *
 	 * @param e an event object containing the following fields:<ul>
 	 *    <li>childID [Typical OUT] - the ID of the selected child, or CHILDID_SELF, or CHILDID_MULTIPLE, or CHILDID_NONE</li>
+	 *    <li>children [Optional OUT] - the array of childIDs for the selected children if CHILDID_MULTIPLE is returned</li>
 	 *    <li>accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID</li>
 	 * </ul>
 	 */
@@ -235,16 +240,20 @@ public abstract class AccessibleControlAdapter implements AccessibleControlListe
 	}
 	
 	/**
-	 * Sent when an accessibility client requests the children of the control.
-	 * The default behavior is to do nothing.
+	 * Sent when an accessibility client requests the children, or visible children,
+	 * of the control. The default behavior is to do nothing.
 	 * <p>
-	 * Return the children as an array of childIDs in the <code>children</code>
-	 * field of the event object.
+	 * Return the children as an array of childIDs or accessibles in the
+	 * <code>children</code> field of the event object.
 	 * </p>
 	 *
 	 * @param e an event object containing the following fields:<ul>
+	 *    <li>detail [IN] - a flag that may have one of the following values:<ul>
+	 *    	<li>0 (default) - return all children</li>
+	 *    	<li>VISIBLE - return all visible children</li>
+	 *    </ul>
 	 *    <li>children [Typical OUT] - an array of childIDs</li>
-	 *    <li>accessible [Optional OUT] - an array of accessible objects for the children may be returned instead of the childIDs</li>
+	 *    <li>children [Optional OUT] - an array of accessible objects for the children may be returned instead of the childIDs</li>
 	 * </ul>
 	 */
 	public void getChildren(AccessibleControlEvent e) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
index 537f57b..8b50d4b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,17 +79,22 @@ public interface AccessibleControlListener extends SWTEventListener {
 	
 	/**
 	 * Sent when an accessibility client requests the accessible object
-	 * for a child of the control.
+	 * for a child of the control by index or childID, or when a client
+	 * requests the index of an accessible object in its parent.
 	 * <p>
-	 * Return an <code>Accessible</code> for the specified control or
-	 * child in the <code>accessible</code> field of the event object.
-	 * Return null if the specified child does not have its own
-	 * <code>Accessible</code>.
-	 * </p>
+	 * The childID field in the event object can be one of the following:<ul>
+	 *    <li>an integer child ID - return the accessible object for the specified child ID,
+	 *    	or null if the specified child does not have its own accessible</li>
+	 *    <li>{@link ACC#CHILDID_CHILD_AT_INDEX} - return the accessible child object at the specified index,
+	 *    	or null if this object has no children</li>
+	 *    <li>{@link ACC#CHILDID_CHILD_INDEX} - return the index of this accessible in its parent</li>
+	 * </ul></p>
 	 *
 	 * @param e an event object containing the following fields:<ul>
-	 *    <li>childID [IN] - an identifier specifying a child of the control</li>
-	 *    <li>accessible [OUT] - an Accessible for the specified childID, or null if one does not exist</li>
+	 *    <li>childID [IN] - an identifier specifying a child of the control, or one of the predefined CHILDID constants</li>
+	 *    <li>detail [Optional IN] - the index of the child accessible to be returned when childID = CHILDID_CHILD_AT_INDEX</li>
+	 *    <li>detail [Optional OUT] - the index of this accessible in its parent when childID = CHILDID_CHILD_INDEX</li>
+	 *    <li>accessible [Optional OUT] - an Accessible for the specified childID or index, or null if one does not exist</li>
 	 * </ul>
 	 */
 	public void getChild(AccessibleControlEvent e);
@@ -174,6 +179,7 @@ public interface AccessibleControlListener extends SWTEventListener {
 	 *
 	 * @param e an event object containing the following fields:<ul>
 	 *    <li>childID [Typical OUT] - the ID of the selected child, or CHILDID_SELF, or CHILDID_MULTIPLE, or CHILDID_NONE</li>
+	 *    <li>children [Optional OUT] - the array of childIDs for the selected children if CHILDID_MULTIPLE is returned</li>
 	 *    <li>accessible [Optional OUT] - the accessible object for the control or child may be returned instead of the childID</li>
 	 * </ul>
 	 */
@@ -218,13 +224,18 @@ public interface AccessibleControlListener extends SWTEventListener {
 	public void getValue(AccessibleControlEvent e);
 	
 	/**
-	 * Sent when an accessibility client requests the children of the control.
+	 * Sent when an accessibility client requests the children, or visible children,
+	 * of the control.
 	 * <p>
-	 * Return the children as an array of childIDs in the <code>children</code>
-	 * field of the event object.
+	 * Return the children as an array of childIDs or accessibles in the
+	 * <code>children</code> field of the event object.
 	 * </p>
 	 *
 	 * @param e an event object containing the following fields:<ul>
+	 *    <li>detail [IN] - a flag that may have one of the following values:<ul>
+	 *    	<li>0 (default) - return all children</li>
+	 *    	<li>VISIBLE - return all visible children</li>
+	 *    </ul>
 	 *    <li>children [Typical OUT] - an array of childIDs</li>
 	 *    <li>children [Optional OUT] - an array of accessible objects for the children may be returned instead of the childIDs</li>
 	 * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkAdapter.java
new file mode 100644
index 0000000..693cbc8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkAdapter.java	
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleHyperlinkListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleHyperlink</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleHyperlinkListener
+ * @see AccessibleHyperlinkEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleHyperlinkAdapter implements AccessibleHyperlinkListener {
+	/**
+	 * Returns the anchor for the link at the specified index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index identifying the anchor if this object
+	 * 		has more than one link, as in the case of an image map</li>
+	 * <li>[typical out] result - the returned anchor</li>
+	 * <li>[optional out] accessible - the returned anchor.
+	 * 		Note: The returned anchor can either be a string or an accessible.
+	 * 		For example, for a text link this could be the substring of the containing string
+	 * 		where the substring is overridden with link behavior, and for an image link this could be
+	 * 		the accessible for the image.</li>
+	 * </ul>
+	 */
+	public void getAnchor(AccessibleHyperlinkEvent e) {}
+
+	/**
+	 * Returns the target of the link at the specified index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index identifying the anchor if this object
+	 * 		has more than one link, as in the case of an image map</li>
+	 * <li>[typical out] result - the returned target</li>
+	 * <li>[optional out] accessible - the returned target.
+	 * 		Note: The returned target can either be a string or an accessible.
+	 * 		For example, this could be a string URI, or the accessible for the target
+	 * 		object to be activated when the link is activated.</li>
+	 * </ul>
+	 */
+	public void getAnchorTarget(AccessibleHyperlinkEvent e) {}
+
+	/**
+	 * Returns the 0 based character offset at which the textual representation of the hyperlink starts.
+	 * <p>
+	 * The returned value is related to the AccessibleTextExtended interface of the object that
+	 * owns this hyperlink.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index</li>
+	 * </ul>
+	 */
+	public void getStartIndex(AccessibleHyperlinkEvent e) {}
+
+	/**
+	 * Returns the 0 based character offset at which the textual representation of the hyperlink ends.
+	 * <p>
+	 * The returned value is related to the AccessibleTextExtended interface of the object that
+	 * owns this hyperlink. The character at the index is not part of the hypertext.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index</li>
+	 * </ul>
+	 */
+	public void getEndIndex(AccessibleHyperlinkEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkEvent.java
new file mode 100644
index 0000000..79df0ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkEvent.java	
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleHyperlink messages to an accessible object.
+ *
+ * @see AccessibleHyperlinkListener
+ * @see AccessibleHyperlinkAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleHyperlinkEvent extends SWTEventObject {
+
+	public Accessible accessible;
+
+	/**
+	 * The value of this field must be set in the accessible hyperlink listener method
+	 * before returning. What to set it to depends on the listener method called.
+	 */
+	public String result;
+
+	public int index;
+
+	static final long serialVersionUID = 6253098373844074544L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleHyperlinkEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleHyperlinkEvent {"
+		+ "accessible=" + accessible   //$NON-NLS-1$
+		+ " string=" + result   //$NON-NLS-1$
+		+ " index=" + index   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkListener.java
new file mode 100644
index 0000000..34a48fb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleHyperlinkListener.java	
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleHyperlink events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleHyperlinkListener</code> method and removed using
+ * the <code>removeAccessibleHyperlinkListener</code> method.
+ * </p>
+ *
+ * @see AccessibleHyperlinkAdapter
+ * @see AccessibleHyperlinkEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleHyperlinkListener extends SWTEventListener {
+	/**
+	 * Returns the anchor for the link at the specified index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index identifying the anchor if this object
+	 * 		has more than one link, as in the case of an image map</li>
+	 * <li>[typical out] result - the returned anchor</li>
+	 * <li>[optional out] accessible - the returned anchor.
+	 * 		Note: The returned anchor can either be a string or an accessible.
+	 * 		For example, for a text link this could be the substring of the containing string
+	 * 		where the substring is overridden with link behavior, and for an image link this could be
+	 * 		the accessible for the image.</li>
+	 * </ul>
+	 */
+	public void getAnchor(AccessibleHyperlinkEvent e);
+
+	/**
+	 * Returns the target of the link at the specified index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - a 0 based index identifying the anchor if this object
+	 * 		has more than one link, as in the case of an image map</li>
+	 * <li>[typical out] result - the returned target</li>
+	 * <li>[optional out] accessible - the returned target.
+	 * 		Note: The returned target can either be a string or an accessible.
+	 * 		For example, this could be a string URI, or the accessible for the target
+	 * 		object to be activated when the link is activated.</li>
+	 * </ul>
+	 */
+	public void getAnchorTarget(AccessibleHyperlinkEvent e);
+
+	/**
+	 * Returns the 0 based character offset at which the textual representation of the hyperlink starts.
+	 * <p>
+	 * The returned value is related to the AccessibleTextExtended interface of the object that
+	 * owns this hyperlink.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index</li>
+	 * </ul>
+	 */
+	public void getStartIndex(AccessibleHyperlinkEvent e);
+
+	/**
+	 * Returns the 0 based character offset at which the textual representation of the hyperlink ends.
+	 * <p>
+	 * The returned value is related to the AccessibleTextExtended interface of the object that
+	 * owns this hyperlink. The character at the index is not part of the hypertext.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index</li>
+	 * </ul>
+	 */
+	public void getEndIndex(AccessibleHyperlinkEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableAdapter.java
new file mode 100644
index 0000000..759efaa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableAdapter.java	
@@ -0,0 +1,341 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleTableListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleTable</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p><p>
+ * Many methods in this adapter return cell accessible objects,
+ * which should implement <code>AccessibleTableCellListener</code>.
+ * </p>
+ *
+ * @see AccessibleTableAdapter
+ * @see AccessibleTableEvent
+ * @see AccessibleTableCellListener
+ * @see AccessibleTableCellEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleTableAdapter implements AccessibleTableListener {
+	/**
+	 * Deselects one column, leaving other selected columns selected (if any).
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be unselected.</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was deselected.</li>
+	 * </ul>
+	 */
+	public void deselectColumn(AccessibleTableEvent e) {}
+
+	/**
+	 * Deselects one row, leaving other selected rows selected (if any).
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be unselected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was deselected.</li>
+	 * </ul>
+	 */
+	public void deselectRow(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the caption for the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the caption for the table, or null if the table does not have a caption</li>
+	 * </ul>
+	 */
+	public void getCaption(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the accessible object at the specified row and column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based row index for which to retrieve the accessible cell</li>
+	 * <li>[in] column - the 0 based column index for which to retrieve the accessible cell</li>
+	 * <li>[out] accessible - the table cell at the specified row and column index,
+	 * 		or null if the row or column index are not valid</li>
+	 * </ul>
+	 */
+	public void getCell(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the accessible object for the specified column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - the 0 based column index for which to retrieve the accessible column</li>
+	 * <li>[out] accessible - the table column at the specified column index,
+	 * 		or null if the column index is not valid</li>
+	 * </ul>
+	 */
+	public void getColumn(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the total number of columns in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of columns in the table</li>
+	 * </ul>
+	 */
+	public void getColumnCount(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the description text of the specified column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - the 0 based index of the column for which to retrieve the description</li>
+	 * <li>[out] result - the description text of the specified column in the table,
+	 * 		or null if the column does not have a description</li>
+	 * </ul>
+	 */
+	public void getColumnDescription(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the accessible object for the column header.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - an accessible object representing the column header,
+	 * 		or null if there is no column header</li>
+	 * </ul>
+	 */
+	public void getColumnHeader(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the column header cells as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing column header cells,
+	 * 		or null if there are no column header cells</li>
+	 * </ul>
+	 */
+	public void getColumnHeaderCells(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the columns as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing columns,
+	 * 		or null if there are no columns</li>
+	 * </ul>
+	 */
+	public void getColumns(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the accessible object for the specified row in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based row index for which to retrieve the accessible row</li>
+	 * <li>[out] accessible - the table row at the specified row index,
+	 * 		or null if the row index is not valid</li>
+	 * </ul>
+	 */
+	public void getRow(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the total number of rows in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of rows in the table</li>
+	 * </ul>
+	 */
+	public void getRowCount(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the description text of the specified row in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based index of the row for which to retrieve the description</li>
+	 * <li>[out] result - the description text of the specified row in the table,
+	 * 		or null if the row does not have a description</li>
+	 * </ul>
+	 */
+	public void getRowDescription(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the accessible object for the row header.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - an accessible object representing the row header,
+	 * 		or null if there is no row header</li>
+	 * </ul>
+	 */
+	public void getRowHeader(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the row header cells as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing row header cells,
+	 * 		or null if there are no row header cells</li>
+	 * </ul>
+	 */
+	public void getRowHeaderCells(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the rows as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing rows,
+	 * 		or null if there are no rows</li>
+	 * </ul>
+	 */
+	public void getRows(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the number of selected cells.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count -  the number of cells currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedCellCount(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the currently selected cells.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - array containing the selected accessible cells</li>
+	 * </ul>
+	 */
+	public void getSelectedCells(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the number of selected columns.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of columns currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedColumnCount(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the column indexes that are currently selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] selected - an array of 0 based column indexes of selected columns</li>
+	 * </ul>
+	 */
+	public void getSelectedColumns(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the number of selected rows.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of rows currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedRowCount(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the row indexes that are currently selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] selected - an array of 0 based row indexes of selected rows</li>
+	 * </ul>
+	 */
+	public void getSelectedRows(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the summary description of the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the summary for the table,
+	 * 		or null if the table does not have a summary</li>
+	 * </ul>
+	 */
+	public void getSummary(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the visible columns as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing visible columns,
+	 * 		or null if there are no visible columns</li>
+	 * </ul>
+	 */
+	public void getVisibleColumns(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns the visible rows as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing visible rows,
+	 * 		or null if there are no visible rows</li>
+	 * </ul>
+	 */
+	public void getVisibleRows(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns a boolean value indicating whether the specified column is
+	 * completely selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column for which to determine whether it is selected</li>
+	 * <li>[out] isSelected - true if the specified column is selected completely, and false otherwise</li>
+	 * </ul>
+	 */
+	public void isColumnSelected(AccessibleTableEvent e) {}
+
+	/**
+	 * Returns a boolean value indicating whether the specified row is
+	 * completely selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row for which to determine whether it is selected</li>
+	 * <li>[out] isSelected - true if the specified row is selected completely, and false otherwise</li>
+	 * </ul>
+	 */
+	public void isRowSelected(AccessibleTableEvent e) {}
+
+	/**
+	 * Selects a column.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
+	 * </ul>
+	 */
+	public void selectColumn(AccessibleTableEvent e) {}
+
+	/**
+	 * Selects a row.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
+	 * </ul>
+	 */
+	public void selectRow(AccessibleTableEvent e) {}
+
+	/**
+	 * Selects a column and deselects all previously selected columns.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
+	 * </ul>
+	 */
+	public void setSelectedColumn(AccessibleTableEvent e) {}
+
+	/**
+	 * Selects a row and deselects all previously selected rows.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
+	 * </ul>
+	 */
+	public void setSelectedRow(AccessibleTableEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellAdapter.java
new file mode 100644
index 0000000..cc0835f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellAdapter.java	
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleTableCellListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleTableCell</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleTableCellListener
+ * @see AccessibleTableCellEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleTableCellAdapter implements AccessibleTableCellListener {
+	/**
+	 * Returns the number of columns occupied by this cell accessible.
+	 * <p>
+	 * This is 1 if the specified cell is only in one column, or
+	 * more than 1 if the specified cell spans multiple columns.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the 1 based number of columns spanned by the specified cell
+	 * </ul>
+	 */
+	public void getColumnSpan(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Returns the column headers as an array of cell accessibles.
+	 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of cell accessibles, or null if there are no column headers
+	 * </ul>
+	 */
+	public void getColumnHeaders(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Translates this cell accessible into the corresponding column index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index - the 0 based column index of the specified cell,
+	 * 		or the index of the first column if the cell spans multiple columns
+	 * </ul>
+	 */
+	public void getColumnIndex(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Returns the number of rows occupied by this cell accessible.
+	 * <p>
+	 * This is 1 if the specified cell is only in one row, or
+	 * more than 1 if the specified cell spans multiple rows.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the 1 based number of rows spanned by the specified cell
+	 * </ul>
+	 */
+	public void getRowSpan(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Returns the row headers as an array of cell accessibles.
+	 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of cell accessibles, or null if there are no row headers
+	 * </ul>
+	 */
+	public void getRowHeaders(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Translates this cell accessible into the corresponding row index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index - the 0 based row index of the specified cell,
+	 * 		or the index of the first row if the cell spans multiple rows
+	 * </ul>
+	 */
+	public void getRowIndex(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Returns the accessible for the table containing this cell.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the accessible for the containing table
+	 * </ul>
+	 */
+	public void getTable(AccessibleTableCellEvent e) {}
+
+	/**
+	 * Returns a boolean value indicating whether this cell is selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] isSelected - true if the specified cell is selected and false otherwise
+	 * </ul>
+	 */
+	public void isSelected(AccessibleTableCellEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java
new file mode 100644
index 0000000..47ceff4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellEvent.java	
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleTableCell messages to an accessible object.
+ *
+ * @see AccessibleTableCellListener
+ * @see AccessibleTableCellAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleTableCellEvent extends SWTEventObject {
+
+	public Accessible accessible;
+	public Accessible[] accessibles;
+	public boolean isSelected;
+	public int count;
+	public int index;
+
+	static final long serialVersionUID = 7231059449172889781L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleTableCellEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleTableCellEvent {"
+		+ " accessibles=" + accessibles   //$NON-NLS-1$
+		+ " isSelected=" + isSelected   //$NON-NLS-1$
+		+ " count=" + count   //$NON-NLS-1$
+		+ " index=" + index   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellListener.java
new file mode 100644
index 0000000..93ed52e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableCellListener.java	
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleTableCell events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleTableCellListener</code> method and removed using
+ * the <code>removeAccessibleTableCellListener</code> method.
+ * </p>
+ *
+ * @see AccessibleTableCellAdapter
+ * @see AccessibleTableCellEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleTableCellListener extends SWTEventListener {
+	/**
+	 * Returns the number of columns occupied by this cell accessible.
+	 * <p>
+	 * This is 1 if the specified cell is only in one column, or
+	 * more than 1 if the specified cell spans multiple columns.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the 1 based number of columns spanned by the specified cell
+	 * </ul>
+	 */
+	public void getColumnSpan(AccessibleTableCellEvent e);
+
+	/**
+	 * Returns the column headers as an array of cell accessibles.
+	 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of cell accessibles, or null if there are no column headers
+	 * </ul>
+	 */
+	public void getColumnHeaders(AccessibleTableCellEvent e);
+
+	/**
+	 * Translates this cell accessible into the corresponding column index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index - the 0 based column index of the specified cell,
+	 * 		or the index of the first column if the cell spans multiple columns
+	 * </ul>
+	 */
+	public void getColumnIndex(AccessibleTableCellEvent e);
+
+	/**
+	 * Returns the number of rows occupied by this cell accessible.
+	 * <p>
+	 * This is 1 if the specified cell is only in one row, or
+	 * more than 1 if the specified cell spans multiple rows.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the 1 based number of rows spanned by the specified cell
+	 * </ul>
+	 */
+	public void getRowSpan(AccessibleTableCellEvent e);
+
+	/**
+	 * Returns the row headers as an array of cell accessibles.
+	 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of cell accessibles, or null if there are no row headers
+	 * </ul>
+	 */
+	public void getRowHeaders(AccessibleTableCellEvent e);
+
+	/**
+	 * Translates this cell accessible into the corresponding row index.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] index - the 0 based row index of the specified cell,
+	 * 		or the index of the first row if the cell spans multiple rows
+	 * </ul>
+	 */
+	public void getRowIndex(AccessibleTableCellEvent e);
+
+	/**
+	 * Returns the accessible for the table containing this cell.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the accessible for the containing table
+	 * </ul>
+	 */
+	public void getTable(AccessibleTableCellEvent e);
+
+	/**
+	 * Returns a boolean value indicating whether this cell is selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] isSelected - true if the specified cell is selected and false otherwise
+	 * </ul>
+	 */
+	public void isSelected(AccessibleTableCellEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java
new file mode 100644
index 0000000..a4dcc9b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableEvent.java	
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleTable messages to an accessible object.
+ *
+ * @see AccessibleTableListener
+ * @see AccessibleTableAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleTableEvent extends SWTEventObject {
+
+	public Accessible accessible;
+	public Accessible[] accessibles;
+	
+	/**
+	 * The value of this field must be set in the accessible table listener method
+	 * before returning. What to set it to depends on the listener method called.
+	 */
+	public String result;
+	
+	public int column;
+	public int row;
+	public int count;
+	public boolean isSelected;
+	public int[] selected;
+
+	static final long serialVersionUID = 1624586163666270447L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleTableEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleTableEvent {"
+		+ "accessible=" + accessible   //$NON-NLS-1$
+		+ " accessibles=" + accessibles   //$NON-NLS-1$
+		+ " string=" + result   //$NON-NLS-1$
+		+ " isSelected=" + isSelected   //$NON-NLS-1$
+		+ " column=" + column   //$NON-NLS-1$
+		+ " count=" + count   //$NON-NLS-1$
+		+ " row=" + row   //$NON-NLS-1$
+		+ " selected=" + selected   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableListener.java
new file mode 100644
index 0000000..65deb59
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTableListener.java	
@@ -0,0 +1,344 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleTable events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleTableListener</code> method and removed using
+ * the <code>removeAccessibleTableListener</code> method.
+ * </p><p>
+ * Many methods in this listener return cell accessible objects,
+ * which should implement <code>AccessibleTableCellListener</code>.
+ * </p>
+ *
+ * @see AccessibleTableAdapter
+ * @see AccessibleTableEvent
+ * @see AccessibleTableCellListener
+ * @see AccessibleTableCellEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleTableListener extends SWTEventListener {
+	/**
+	 * Deselects one column, leaving other selected columns selected (if any).
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be unselected.</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was deselected.</li>
+	 * </ul>
+	 */
+	public void deselectColumn(AccessibleTableEvent e);
+
+	/**
+	 * Deselects one row, leaving other selected rows selected (if any).
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be unselected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was deselected.</li>
+	 * </ul>
+	 */
+	public void deselectRow(AccessibleTableEvent e);
+
+	/**
+	 * Returns the caption for the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the caption for the table, or null if the table does not have a caption</li>
+	 * </ul>
+	 */
+	public void getCaption(AccessibleTableEvent e);
+
+	/**
+	 * Returns the accessible object at the specified row and column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based row index for which to retrieve the accessible cell</li>
+	 * <li>[in] column - the 0 based column index for which to retrieve the accessible cell</li>
+	 * <li>[out] accessible - the table cell at the specified row and column index,
+	 * 		or null if the row or column index are not valid</li>
+	 * </ul>
+	 */
+	public void getCell(AccessibleTableEvent e);
+
+	/**
+	 * Returns the accessible object for the specified column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - the 0 based column index for which to retrieve the accessible column</li>
+	 * <li>[out] accessible - the table column at the specified column index,
+	 * 		or null if the column index is not valid</li>
+	 * </ul>
+	 */
+	public void getColumn(AccessibleTableEvent e);
+
+	/**
+	 * Returns the total number of columns in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of columns in the table</li>
+	 * </ul>
+	 */
+	public void getColumnCount(AccessibleTableEvent e);
+
+	/**
+	 * Returns the description text of the specified column in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - the 0 based index of the column for which to retrieve the description</li>
+	 * <li>[out] result - the description text of the specified column in the table,
+	 * 		or null if the column does not have a description</li>
+	 * </ul>
+	 */
+	public void getColumnDescription(AccessibleTableEvent e);
+
+	/**
+	 * Returns the accessible object for the column header.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - an accessible object representing the column header,
+	 * 		or null if there is no column header</li>
+	 * </ul>
+	 */
+	public void getColumnHeader(AccessibleTableEvent e);
+
+	/**
+	 * Returns the column header cells as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing column header cells,
+	 * 		or null if there are no column header cells</li>
+	 * </ul>
+	 */
+	public void getColumnHeaderCells(AccessibleTableEvent e);
+
+	/**
+	 * Returns the columns as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing columns,
+	 * 		or null if there are no columns</li>
+	 * </ul>
+	 */
+	public void getColumns(AccessibleTableEvent e);
+
+	/**
+	 * Returns the accessible object for the specified row in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based row index for which to retrieve the accessible row</li>
+	 * <li>[out] accessible - the table row at the specified row index,
+	 * 		or null if the row index is not valid</li>
+	 * </ul>
+	 */
+	public void getRow(AccessibleTableEvent e);
+
+	/**
+	 * Returns the total number of rows in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of rows in the table</li>
+	 * </ul>
+	 */
+	public void getRowCount(AccessibleTableEvent e);
+
+	/**
+	 * Returns the description text of the specified row in the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - the 0 based index of the row for which to retrieve the description</li>
+	 * <li>[out] result - the description text of the specified row in the table,
+	 * 		or null if the row does not have a description</li>
+	 * </ul>
+	 */
+	public void getRowDescription(AccessibleTableEvent e);
+
+	/**
+	 * Returns the accessible object for the row header.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - an accessible object representing the row header,
+	 * 		or null if there is no row header</li>
+	 * </ul>
+	 */
+	public void getRowHeader(AccessibleTableEvent e);
+
+	/**
+	 * Returns the row header cells as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing row header cells,
+	 * 		or null if there are no row header cells</li>
+	 * </ul>
+	 */
+	public void getRowHeaderCells(AccessibleTableEvent e);
+
+	/**
+	 * Returns the rows as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing rows,
+	 * 		or null if there are no rows</li>
+	 * </ul>
+	 */
+	public void getRows(AccessibleTableEvent e);
+
+	/**
+	 * Returns the number of selected cells.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count -  the number of cells currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedCellCount(AccessibleTableEvent e);
+
+	/**
+	 * Returns the currently selected cells.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - array containing the selected accessible cells</li>
+	 * </ul>
+	 */
+	public void getSelectedCells(AccessibleTableEvent e);
+
+	/**
+	 * Returns the number of selected columns.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of columns currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedColumnCount(AccessibleTableEvent e);
+
+	/**
+	 * Returns the column indexes that are currently selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] selected - an array of 0 based column indexes of selected columns</li>
+	 * </ul>
+	 */
+	public void getSelectedColumns(AccessibleTableEvent e);
+
+	/**
+	 * Returns the number of selected rows.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of rows currently selected</li>
+	 * </ul>
+	 */
+	public void getSelectedRowCount(AccessibleTableEvent e);
+
+	/**
+	 * Returns the row indexes that are currently selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] selected - an array of 0 based row indexes of selected rows</li>
+	 * </ul>
+	 */
+	public void getSelectedRows(AccessibleTableEvent e);
+
+	/**
+	 * Returns the summary description of the table.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessible - the summary for the table,
+	 * 		or null if the table does not have a summary</li>
+	 * </ul>
+	 */
+	public void getSummary(AccessibleTableEvent e);
+
+	/**
+	 * Returns the visible columns as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing visible columns,
+	 * 		or null if there are no visible columns</li>
+	 * </ul>
+	 */
+	public void getVisibleColumns(AccessibleTableEvent e);
+
+	/**
+	 * Returns the visible rows as an array of accessible objects.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] accessibles - an array of accessible objects representing visible rows,
+	 * 		or null if there are no visible rows</li>
+	 * </ul>
+	 */
+	public void getVisibleRows(AccessibleTableEvent e);
+
+	/**
+	 * Returns a boolean value indicating whether the specified column is
+	 * completely selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column for which to determine whether it is selected</li>
+	 * <li>[out] isSelected - true if the specified column is selected completely, and false otherwise</li>
+	 * </ul>
+	 */
+	public void isColumnSelected(AccessibleTableEvent e);
+
+	/**
+	 * Returns a boolean value indicating whether the specified row is
+	 * completely selected.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row for which to determine whether it is selected</li>
+	 * <li>[out] isSelected - true if the specified row is selected completely, and false otherwise</li>
+	 * </ul>
+	 */
+	public void isRowSelected(AccessibleTableEvent e);
+
+	/**
+	 * Selects a column.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
+	 * </ul>
+	 */
+	public void selectColumn(AccessibleTableEvent e);
+
+	/**
+	 * Selects a row.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
+	 * </ul>
+	 */
+	public void selectRow(AccessibleTableEvent e);
+
+	/**
+	 * Selects a column and deselects all previously selected columns.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] column - 0 based index of the column to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
+	 * </ul>
+	 */
+	public void setSelectedColumn(AccessibleTableEvent e);
+
+	/**
+	 * Selects a row and deselects all previously selected rows.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] row - 0 based index of the row to be selected</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
+	 * </ul>
+	 */
+	public void setSelectedRow(AccessibleTableEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextAttributeEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextAttributeEvent.java
new file mode 100644
index 0000000..96dc631
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextAttributeEvent.java	
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleAttribute messages to an accessible object.
+ *
+ * @see AccessibleAttributeListener
+ * @see AccessibleAttributeAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleTextAttributeEvent extends SWTEventObject {
+
+	public int offset;
+	public int start, end;
+	public TextStyle textStyle;
+	public String [] attributes;
+
+	static final long serialVersionUID = 0L; // TODO: run serialver -show
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleTextAttributeEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleAttributeEvent {"
+		+ " offset=" + offset   //$NON-NLS-1$
+		+ " startOffset=" + start   //$NON-NLS-1$
+		+ " endOffset=" + end   //$NON-NLS-1$
+		+ " textStyle=" + textStyle   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextEvent.java
index 30e99eb..ce56485 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.swt.accessibility;
 
 
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.internal.*;
 
 /**
@@ -33,6 +34,30 @@ import org.eclipse.swt.internal.*;
 public class AccessibleTextEvent extends SWTEventObject {
 	public int childID;				// IN
 	public int offset, length;		// OUT
+	/** @since 3.6 */
+	public Accessible accessible;
+
+	/**
+	 * The value of this field must be set in the accessible text extended listener method
+	 * before returning. What to set it to depends on the listener method called.
+	 * @since 3.6
+	 */
+	public String result;
+	
+	/** @since 3.6 */
+	public int count;
+	/** @since 3.6 */
+	public int index;
+	/** @since 3.6 */
+	public int start, end;
+	/** @since 3.6 */
+	public int type;
+	/** @since 3.6 */
+	public int x, y, width, height;
+	/** @since 3.6 */
+	public int [] ranges;
+	/** @since 3.6 */
+	public Rectangle [] rectangles;
 	
 	static final long serialVersionUID = 3977019530868308275L;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedAdapter.java
new file mode 100644
index 0000000..d9fa74f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedAdapter.java	
@@ -0,0 +1,292 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleTextExtendedListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleTextExtended</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleTextExtendedListener
+ * @see AccessibleTextEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleTextExtendedAdapter extends AccessibleTextAdapter implements AccessibleTextExtendedListener {
+	/**
+	 * Adds a text selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the new selection</li>
+	 * <li>[in] end - the 0 based offset after the last character of the new selection</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the text selection was added</li>
+	 * </ul>
+	 */
+	public void addSelection(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the total number of characters in the text.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the total number of characters</li>
+	 * </ul>
+	 */
+	public void getCharacterCount(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the number of links and link groups contained within this hypertext
+	 * paragraph.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of links and link groups within this hypertext paragraph,
+	 * 		or 0 if there are none</li>
+	 * </ul>
+	 */
+	public void getHyperlinkCount(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the specified hyperlink.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the hyperlink to return</li>
+	 * <li>[out] accessible - the specified hyperlink object, or null if the index is invalid</li>
+	 * </ul>
+	 */
+	public void getHyperlink(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the index of the hyperlink that is associated with this character offset.
+	 * <p>
+	 * This is the case when a link spans the given character index.
+	 * </p>
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the 0 based offset of the character for which to return the link index</li>
+	 * <li>[out] index - the 0 based index of the hyperlink that is associated with this
+	 * 		character offset, or -1 if the offset is not in a link</li>
+	 * </ul>
+	 */
+	public void getHyperlinkIndex(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the offset of the character under the specified point.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] x - the X value in display coordinates for which to look up the offset of the character
+	 * 		that is rendered on the display at that point</li>
+	 * <li>[in] y - the position's Y value for which to look up the offset of the character
+	 * 		that is rendered on the display at that point</li>
+	 * <li>[out] offset - the 0 based offset of the character under the given point,
+	 * 		or -1 if the point is invalid or there is no character under the point</li>
+	 * </ul>
+	 */
+	public void getOffsetAtPoint(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the text range(s) contained within the given bounding box.
+	 * <p>
+	 * Partially visible characters are included in the returned ranges.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] x - the X coordinate of the top left corner of the bounding box, in display relative coordinates</li>
+	 * <li>[in] y - the Y coordinate of the top left corner of the bounding box, in display relative coordinates</li>
+	 * <li>[in] width - the width of the bounding box</li>
+	 * <li>[in] height - the height of the bounding box</li>
+	 * <li>[typical out] start - the 0 based offset of the first character of the substring in the bounding box</li>
+	 * <li>[typical out] end - the 0 based offset after the last character of the substring in the bounding box</li>
+	 * <li>[optional out] ranges - an array of pairs specifying the start and end offsets of each range,
+	 * 		if the text range is clipped by the bounding box</li>
+	 * </ul>
+	 */
+	public void getRanges(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the character offsets of the specified text selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the selection</li>
+	 * <li>[out] start - the 0 based offset of first selected character</li>
+	 * <li>[out] end - the 0 based offset after the last selected character</li>
+	 * </ul>
+	 */
+	public void getSelection(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the number of active non-contiguous selections.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of active non-contiguous selections</li>
+	 * </ul>
+	 */
+	public void getSelectionCount(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns a substring and its range for the given range, count and boundary type.
+	 * <p>
+	 * Returns the substring of the specified boundary type that is located count
+	 * positions from the given character range. Also returns the start and end
+	 * offsets of the returned substring.
+	 * </p><p>
+	 * For example, if the boundary type is TEXT_BOUNDARY_WORD, then the complete
+	 * word that is located count words from the specified range is returned.
+	 * If count is negative, then return the word that is count words before start.
+	 * If count is positive, then return the word that is count words after end.
+	 * If count is zero, start and end are the same, so return the word at start.
+	 * </p><p>
+	 * The whole text can be requested by passing start == 0 and end == getCharacterCount,
+	 * TEXT_BOUNDARY_ALL, and 0 for count. Alternatively the whole text can be requested
+	 * by calling AccessibleControlListener.getValue().
+	 * </p><p>
+	 * If start and end are valid, but no suitable word (or other boundary type) is found,
+	 * the returned string is null and the returned range is degenerate (start == end).
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] type - the boundary type of the substring to return. One of:<ul>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_CHAR}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_WORD}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_SENTENCE}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_PARAGRAPH}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_LINE}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_ALL}</li>
+	 * 		</ul></li>
+	 * <li>[in,out] start - the 0 based offset of first character of the substring</li>
+	 * <li>[in,out] end - the 0 based offset after the last character of the substring</li>
+	 * <li>[in,out] count - the number of boundary type units to move to find the substring:<ul>
+	 * 		<li>in - look count units before start if count < 0, or after end if count > 0. Look at start if count == 0</li>
+	 * 		<li>out - the actual number of boundary type units that were moved. This may be fewer than the input count</li>
+	 * 		</ul></li>
+	 * <li>[out] result - the requested substring.  This may be empty or null
+	 * 		when no appropriate substring is found, or if the type is invalid.</li>
+	 * </ul>
+	 */
+	public void getText(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the bounding box(es) of the specified text range in display coordinates.
+	 * <p>
+	 * Typically, the text range will represent a single character, i.e. end - start = 1,
+	 * therefore providers should optimize for this case.
+	 * </p><p>
+	 * Note: The virtual character after the last character of the represented text,
+	 * i.e. the one at offset getCharacterCount, is a special case. It represents the
+	 * current input position and will therefore typically be queried by AT more
+	 * often than other positions.  Because it does not represent an existing character
+	 * its bounding box is defined in relation to preceding characters.  It should be
+	 * roughly equivalent to the bounding box of some character when inserted at the
+	 * end of the text; its height typically being the maximal height of all the
+	 * characters in the text or the height of the preceding character, its width
+	 * being at least one pixel so that the bounding box is not degenerate.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the substring in the bounding box</li>
+	 * <li>[in] end - the 0 based offset after the last character of the substring in the bounding box</li>
+	 * <li>[typical out] x - the X coordinate of the top left corner of the bounding box of the specified substring</li>
+	 * <li>[typical out] y - the Y coordinate of the top left corner of the bounding box of the specified substring</li>
+	 * <li>[typical out] width - the width of the bounding box of the specified substring</li>
+	 * <li>[typical out] height - the height of the bounding box of the specified substring</li>
+	 * <li>[optional out] rectangles - a set of disjoint bounding rectangles, if the specified text range includes
+	 * 		partial lines</li>
+	 * </ul>
+	 */
+	public void getTextBounds(AccessibleTextEvent e) {}
+
+	/**
+	 * Returns the visible text range(s).
+	 * <p>
+	 * Partially visible characters are included in the returned ranges.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[typical out] start - the 0 based offset of the first character of the visible substring</li>
+	 * <li>[typical out] end - the 0 based offset after the last character of the visible substring</li>
+	 * <li>[optional out] ranges - an array of pairs specifying the start and end offsets of each range,
+	 * 		if the visible text range is clipped</li>
+	 * </ul>
+	 */
+	public void getVisibleRanges(AccessibleTextEvent e) {}
+
+	/**
+	 * Deselects a range of text.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of selection to remove</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the range of text was deselected</li>
+	 * </ul>
+	 */
+	public void removeSelection(AccessibleTextEvent e) {}
+
+	/**
+	 * Scrolls a specific part of a substring according to the scroll type.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the substring</li>
+	 * <li>[in] end - the 0 based offset after the last character of the substring</li>
+	 * <li>[in] type - a scroll type indicating where the substring should be placed
+	 * 		on the screen. One of:<ul>
+	 * 		<li> {@link ACC#SCROLL_TYPE_TOP_LEFT}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_BOTTOM_RIGHT}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_TOP_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_BOTTOM_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_LEFT_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_RIGHT_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_ANYWHERE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_POINT}</li>
+	 * 		</ul></li>
+	 * <li>[optional in] x - for SCROLL_TYPE_POINT, the X coordinate of the destination point in display coordinates</li>
+	 * <li>[optional in] y - for SCROLL_TYPE_POINT, the Y coordinate of the destination point in display coordinates</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the text was scrolled</li>
+	 * </ul>
+	 */
+	public void scrollText(AccessibleTextEvent e) {}
+
+	/**
+	 * Sets the position of the caret.
+	 * <p>
+	 * The caret position is that of the character logically following it,
+	 * e.g. to the right of it in a left to right language.
+	 * The caret is actually placed to the leading side of the character with
+	 * that offset. An offset of 0 places the caret so that the next insertion
+	 * goes before the first character. An offset of getCharacterCount places
+	 * the caret so that the next insertion goes after the last character.
+	 * </p><p>
+	 * Setting the caret position may or may not alter the current selection.  A
+	 * change of the selection is notified to the accessibility event listeners with
+	 * an EVENT_TEXT_SELECTION_CHANGED event.
+	 * </p><p>
+	 * When the new caret position differs from the old one, this is notified to the
+	 * accessibility event listeners with an EVENT_TEXT_CARET_MOVED event.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the new offset of the caret</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the caret position was set</li>
+	 * </ul>
+	 */
+	public void setCaretOffset(AccessibleTextEvent e) {}
+
+	/**
+	 * Changes the bounds of an existing selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the selection to change</li>
+	 * <li>[in] start - the new 0 based offset of the first character of the selection</li>
+	 * <li>[in] end - the new 0 based offset after the last character of the selection</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the selection was set</li>
+	 * </ul>
+	 */
+	public void setSelection(AccessibleTextEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedListener.java
new file mode 100644
index 0000000..c4374ef
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleTextExtendedListener.java	
@@ -0,0 +1,293 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleTextExtended events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleTextExtendedListener</code> method and removed using
+ * the <code>removeAccessibleTextExtendedListener</code> method.
+ * </p>
+ *
+ * @see AccessibleTextExtendedAdapter
+ * @see AccessibleTextEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleTextExtendedListener extends AccessibleTextListener {
+	/**
+	 * Adds a text selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the new selection</li>
+	 * <li>[in] end - the 0 based offset after the last character of the new selection</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the text selection was added</li>
+	 * </ul>
+	 */
+	public void addSelection(AccessibleTextEvent e);
+
+	/**
+	 * Returns the total number of characters in the text.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the total number of characters</li>
+	 * </ul>
+	 */
+	public void getCharacterCount(AccessibleTextEvent e);
+
+	/**
+	 * Returns the number of links and link groups contained within this hypertext
+	 * paragraph.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of links and link groups within this hypertext paragraph,
+	 * 		or 0 if there are none</li>
+	 * </ul>
+	 */
+	public void getHyperlinkCount(AccessibleTextEvent e);
+
+	/**
+	 * Returns the specified hyperlink.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the hyperlink to return</li>
+	 * <li>[out] accessible - the specified hyperlink object, or null if the index is invalid</li>
+	 * </ul>
+	 */
+	public void getHyperlink(AccessibleTextEvent e);
+
+	/**
+	 * Returns the index of the hyperlink that is associated with this character offset.
+	 * <p>
+	 * This is the case when a link spans the given character index.
+	 * </p>
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the 0 based offset of the character for which to return the link index</li>
+	 * <li>[out] index - the 0 based index of the hyperlink that is associated with this
+	 * 		character offset, or -1 if the offset is not in a link</li>
+	 * </ul>
+	 */
+	public void getHyperlinkIndex(AccessibleTextEvent e);
+
+	/**
+	 * Returns the offset of the character under the specified point.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] x - the X value in display coordinates for which to look up the offset of the character
+	 * 		that is rendered on the display at that point</li>
+	 * <li>[in] y - the position's Y value for which to look up the offset of the character
+	 * 		that is rendered on the display at that point</li>
+	 * <li>[out] offset - the 0 based offset of the character under the given point,
+	 * 		or -1 if the point is invalid or there is no character under the point</li>
+	 * </ul>
+	 */
+	public void getOffsetAtPoint(AccessibleTextEvent e);
+
+	/**
+	 * Returns the text range(s) contained within the given bounding box.
+	 * <p>
+	 * Partially visible characters are included in the returned ranges.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] x - the X coordinate of the top left corner of the bounding box, in display relative coordinates</li>
+	 * <li>[in] y - the Y coordinate of the top left corner of the bounding box, in display relative coordinates</li>
+	 * <li>[in] width - the width of the bounding box</li>
+	 * <li>[in] height - the height of the bounding box</li>
+	 * <li>[typical out] start - the 0 based offset of the first character of the substring in the bounding box</li>
+	 * <li>[typical out] end - the 0 based offset after the last character of the substring in the bounding box</li>
+	 * <li>[optional out] ranges - an array of pairs specifying the start and end offsets of each range,
+	 * 		if the text range is clipped by the bounding box</li>
+	 * </ul>
+	 */
+	public void getRanges(AccessibleTextEvent e);
+
+	/**
+	 * Returns the character offsets of the specified text selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the selection</li>
+	 * <li>[out] start - the 0 based offset of first selected character</li>
+	 * <li>[out] end - the 0 based offset after the last selected character</li>
+	 * </ul>
+	 */
+	public void getSelection(AccessibleTextEvent e);
+
+	/**
+	 * Returns the number of active non-contiguous selections.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] count - the number of active non-contiguous selections</li>
+	 * </ul>
+	 */
+	public void getSelectionCount(AccessibleTextEvent e);
+
+	/**
+	 * Returns a substring and its range for the given range, count and boundary type.
+	 * <p>
+	 * Returns the substring of the specified boundary type that is located count
+	 * positions from the given character range. Also returns the start and end
+	 * offsets of the returned substring.
+	 * </p><p>
+	 * For example, if the boundary type is TEXT_BOUNDARY_WORD, then the complete
+	 * word that is located count words from the specified range is returned.
+	 * If count is negative, then return the word that is count words before start.
+	 * If count is positive, then return the word that is count words after end.
+	 * If count is zero, start and end are the same, so return the word at start.
+	 * </p><p>
+	 * The whole text can be requested by passing start == 0 and end == getCharacterCount,
+	 * TEXT_BOUNDARY_ALL, and 0 for count. Alternatively the whole text can be requested
+	 * by calling AccessibleControlListener.getValue().
+	 * </p><p>
+	 * If start and end are valid, but no suitable word (or other boundary type) is found,
+	 * the returned string is null and the returned range is degenerate (start == end).
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] type - the boundary type of the substring to return. One of:<ul>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_CHAR}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_WORD}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_SENTENCE}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_PARAGRAPH}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_LINE}</li>
+	 * 		<li> {@link ACC#TEXT_BOUNDARY_ALL}</li>
+	 * 		</ul></li>
+	 * <li>[in,out] start - the 0 based offset of first character of the substring</li>
+	 * <li>[in,out] end - the 0 based offset after the last character of the substring</li>
+	 * <li>[in,out] count - the number of boundary type units to move to find the substring:<ul>
+	 * 		<li>in - look count units before start if count < 0, or after end if count > 0. Look at start if count == 0</li>
+	 * 		<li>out - the actual number of boundary type units that were moved. This may be fewer than the input count</li>
+	 * 		</ul></li>
+	 * <li>[out] result - the requested substring.  This may be empty or null
+	 * 		when no appropriate substring is found, or if the type is invalid.</li>
+	 * </ul>
+	 */
+	public void getText(AccessibleTextEvent e);
+
+	/**
+	 * Returns the bounding box(es) of the specified text range in display coordinates.
+	 * <p>
+	 * Typically, the text range will represent a single character, i.e. end - start = 1,
+	 * therefore providers should optimize for this case.
+	 * </p><p>
+	 * Note: The virtual character after the last character of the represented text,
+	 * i.e. the one at offset getCharacterCount, is a special case. It represents the
+	 * current input position and will therefore typically be queried by AT more
+	 * often than other positions.  Because it does not represent an existing character
+	 * its bounding box is defined in relation to preceding characters.  It should be
+	 * roughly equivalent to the bounding box of some character when inserted at the
+	 * end of the text; its height typically being the maximal height of all the
+	 * characters in the text or the height of the preceding character, its width
+	 * being at least one pixel so that the bounding box is not degenerate.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the substring in the bounding box</li>
+	 * <li>[in] end - the 0 based offset after the last character of the substring in the bounding box</li>
+	 * <li>[typical out] x - the X coordinate of the top left corner of the bounding box of the specified substring</li>
+	 * <li>[typical out] y - the Y coordinate of the top left corner of the bounding box of the specified substring</li>
+	 * <li>[typical out] width - the width of the bounding box of the specified substring</li>
+	 * <li>[typical out] height - the height of the bounding box of the specified substring</li>
+	 * <li>[optional out] rectangles - a set of disjoint bounding rectangles, if the specified text range includes
+	 * 		partial lines</li>
+	 * </ul>
+	 */
+	public void getTextBounds(AccessibleTextEvent e);
+
+	/**
+	 * Returns the visible text range(s).
+	 * <p>
+	 * Partially visible characters are included in the returned ranges.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[typical out] start - the 0 based offset of the first character of the visible substring</li>
+	 * <li>[typical out] end - the 0 based offset after the last character of the visible substring</li>
+	 * <li>[optional out] ranges - an array of pairs specifying the start and end offsets of each range,
+	 * 		if the visible text range is clipped</li>
+	 * </ul>
+	 */
+	public void getVisibleRanges(AccessibleTextEvent e);
+
+	/**
+	 * Deselects a range of text.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of selection to remove</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the range of text was deselected</li>
+	 * </ul>
+	 */
+	public void removeSelection(AccessibleTextEvent e);
+
+	/**
+	 * Scrolls a specific part of a substring according to the scroll type.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] start - the 0 based offset of the first character of the substring</li>
+	 * <li>[in] end - the 0 based offset after the last character of the substring</li>
+	 * <li>[in] type - a scroll type indicating where the substring should be placed
+	 * 		on the screen. One of:<ul>
+	 * 		<li> {@link ACC#SCROLL_TYPE_TOP_LEFT}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_BOTTOM_RIGHT}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_TOP_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_BOTTOM_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_LEFT_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_RIGHT_EDGE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_ANYWHERE}</li>
+	 * 		<li> {@link ACC#SCROLL_TYPE_POINT}</li>
+	 * 		</ul></li>
+	 * <li>[optional in] x - for SCROLL_TYPE_POINT, the X coordinate of the destination point in display coordinates</li>
+	 * <li>[optional in] y - for SCROLL_TYPE_POINT, the Y coordinate of the destination point in display coordinates</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the text was scrolled</li>
+	 * </ul>
+	 */
+	public void scrollText(AccessibleTextEvent e);
+
+	/**
+	 * Sets the position of the caret.
+	 * <p>
+	 * The caret position is that of the character logically following it,
+	 * e.g. to the right of it in a left to right language.
+	 * The caret is actually placed to the leading side of the character with
+	 * that offset. An offset of 0 places the caret so that the next insertion
+	 * goes before the first character. An offset of getCharacterCount places
+	 * the caret so that the next insertion goes after the last character.
+	 * </p><p>
+	 * Setting the caret position may or may not alter the current selection.  A
+	 * change of the selection is notified to the accessibility event listeners with
+	 * an EVENT_TEXT_SELECTION_CHANGED event.
+	 * </p><p>
+	 * When the new caret position differs from the old one, this is notified to the
+	 * accessibility event listeners with an EVENT_TEXT_CARET_MOVED event.
+	 * </p>
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] offset - the new offset of the caret</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the caret position was set</li>
+	 * </ul>
+	 */
+	public void setCaretOffset(AccessibleTextEvent e);
+
+	/**
+	 * Changes the bounds of an existing selection.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in] index - the 0 based index of the selection to change</li>
+	 * <li>[in] start - the new 0 based offset of the first character of the selection</li>
+	 * <li>[in] end - the new 0 based offset after the last character of the selection</li>
+	 * <li>[out] result - set to {@link ACC#OK} if the selection was set</li>
+	 * </ul>
+	 */
+	public void setSelection(AccessibleTextEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueAdapter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueAdapter.java
new file mode 100644
index 0000000..bb9600a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueAdapter.java	
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+/**
+ * This adapter class provides default implementations for the
+ * methods in the <code>AccessibleValueListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleValue</code> events can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleValueListener
+ * @see AccessibleValueEvent
+ *
+ * @since 3.6
+ */
+public class AccessibleValueAdapter implements AccessibleValueListener {
+	/**
+	 * Returns the value of this object as a number.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the current value of this object</li>
+	 * </ul>
+	 */
+	public void getCurrentValue(AccessibleValueEvent e) {}
+
+	/**
+	 * Sets the value of this object to the given number.
+	 * 
+	 * The argument is clipped to the valid interval whose upper and lower
+	 * bounds are returned by getMaximumValue and getMinimumValue,
+	 * i.e. if it is lower than the minimum value the new value will be the minimum,
+	 * and if it is greater than the maximum then the new value will be the maximum.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in/out] value - on input, the number that will be the new value of this object
+	 * 		<br>- on output, set to null if the value cannot be set</li>
+	 * </ul>
+	 */
+	public void setCurrentValue(AccessibleValueEvent e) {}
+
+	/**
+	 * Returns the maximum value that can be represented by this object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the maximum value that this object can represent.
+	 * 		If this object has no upper bound then null is returned.</li>
+	 * </ul>
+	 */
+	public void getMaximumValue(AccessibleValueEvent e) {}
+
+	/**
+	 * Returns the minimum value that can be represented by this object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the minimum value that this object can represent.
+	 * 		If this object has no lower bound then null is returned.</li>
+	 * </ul>
+	 */
+	public void getMinimumValue(AccessibleValueEvent e) {}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueEvent.java
new file mode 100644
index 0000000..de42982
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueEvent.java	
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.*;
+
+/**
+ * Instances of this class are sent as a result of accessibility clients
+ * sending AccessibleValue messages to an accessible object.
+ *
+ * @see AccessibleValueListener
+ * @see AccessibleValueAdapter
+ *
+ * @since 3.6
+ */
+public class AccessibleValueEvent extends SWTEventObject {
+
+	public Number value;
+
+	static final long serialVersionUID = -465979079760740668L;
+
+/**
+ * Constructs a new instance of this class.
+ *
+ * @param source the object that fired the event
+ */
+public AccessibleValueEvent(Object source) {
+	super(source);
+}
+
+/**
+ * Returns a string containing a concise, human-readable
+ * description of the receiver.
+ *
+ * @return a string representation of the event
+ */
+public String toString () {
+	return "AccessibleValueEvent {"
+		+ "value=" + value   //$NON-NLS-1$
+		+ "}";  //$NON-NLS-1$
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueListener.java
new file mode 100644
index 0000000..bd557f2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleValueListener.java	
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.internal.SWTEventListener;
+
+/**
+ * Classes which implement this interface provide methods
+ * that handle AccessibleValue events.
+ * <p>
+ * After creating an instance of a class that implements
+ * this interface it can be added to an accessible using the
+ * <code>addAccessibleValueListener</code> method and removed using
+ * the <code>removeAccessibleValueListener</code> method.
+ * </p>
+ *
+ * @see AccessibleValueAdapter
+ * @see AccessibleValueEvent
+ *
+ * @since 3.6
+ */
+public interface AccessibleValueListener extends SWTEventListener {
+	/**
+	 * Returns the value of this object as a number.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the current value of this object</li>
+	 * </ul>
+	 */
+	public void getCurrentValue(AccessibleValueEvent e);
+
+	/**
+	 * Sets the value of this object to the given number.
+	 * 
+	 * The argument is clipped to the valid interval whose upper and lower
+	 * bounds are returned by getMaximumValue and getMinimumValue,
+	 * i.e. if it is lower than the minimum value the new value will be the minimum,
+	 * and if it is greater than the maximum then the new value will be the maximum.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[in/out] value - on input, the number that will be the new value of this object
+	 * 		<br>- on output, set to null if the value cannot be set</li>
+	 * </ul>
+	 */
+	public void setCurrentValue(AccessibleValueEvent e);
+
+	/**
+	 * Returns the maximum value that can be represented by this object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the maximum value that this object can represent.
+	 * 		If this object has no upper bound then null is returned.</li>
+	 * </ul>
+	 */
+	public void getMaximumValue(AccessibleValueEvent e);
+
+	/**
+	 * Returns the minimum value that can be represented by this object.
+	 * 
+	 * @param e an event object containing the following fields:<ul>
+	 * <li>[out] value - the number that is the minimum value that this object can represent.
+	 * 		If this object has no lower bound then null is returned.</li>
+	 * </ul>
+	 */
+	public void getMinimumValue(AccessibleValueEvent e);
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java
index f93e22f..41eb5f5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/emulated/org/eclipse/swt/accessibility/Accessible.java	
@@ -11,7 +11,8 @@
 package org.eclipse.swt.accessibility;
 
 
-import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.*;
+import org.eclipse.swt.widgets.*;
 
 /**
  * Instances of this class provide a bridge between application
@@ -40,7 +41,24 @@ public class Accessible {
 	Control control;
 
 	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent the Accessible parent, which must not be null
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @see Control#getAccessible
+	 * 
+	 * @since 3.6
+	 */
+	public Accessible(Accessible parent) {
+	}
+
+	/**
 	 * @since 3.5
+	 * @deprecated
 	 */
 	protected Accessible() {
 	}
@@ -61,6 +79,8 @@ public class Accessible {
 	 *
 	 * @param control the control to get the accessible object for
 	 * @return the platform specific accessible object
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public static Accessible internal_new_Accessible(Control control) {
 		return new Accessible(control);
@@ -163,7 +183,7 @@ public class Accessible {
 	 * be notified when an accessible client asks for custom text control
 	 * specific information. The listener is notified by sending it
 	 * one of the messages defined in the <code>AccessibleTextListener</code>
-	 * interface.
+	 * and <code>AccessibleTextExtendedListener</code> interfaces.
 	 *
 	 * @param listener the listener that should be notified when the receiver
 	 * is asked for custom text control specific information
@@ -177,6 +197,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #removeAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -201,6 +222,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #addAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -209,6 +231,181 @@ public class Accessible {
 	}
 
 	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #removeAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleActionListener(AccessibleActionListener listener) {
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #removeAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #removeAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableListener(AccessibleTableListener listener) {
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #removeAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #removeAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleValueListener(AccessibleValueListener listener) {
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #removeAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
+	}
+
+	/**
+	 * Adds a relation with the specified type and target
+	 * to the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void addRelation(int type, Accessible target) {
+	}
+	
+	/**
+	 * Disposes of the operating system resources associated with
+	 * the receiver, and removes the receiver from its parent's
+	 * list of children.
+	 * <p>
+	 * This method should be called when an accessible that was created
+	 * with the public constructor <code>Accessible(Accessible parent)</code>
+	 * is no longer needed. You do not need to call this when the receiver's
+	 * control is disposed, because all <code>Accessible</code> instances
+	 * associated with a control are released when the control is disposed.
+	 * It is also not necessary to call this for instances of <code>Accessible</code>
+	 * that were retrieved with <code>Control.getAccessible()</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public void dispose () {
+	}
+
+	/**
 	 * Returns the control for this Accessible object. 
 	 *
 	 * @return the receiver's control
@@ -219,6 +416,212 @@ public class Accessible {
 	}
 
 	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #addAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleActionListener(AccessibleActionListener listener) {
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #addAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #addAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableListener(AccessibleTableListener listener) {
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #addAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #addAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleValueListener(AccessibleValueListener listener) {
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #addAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
+	}
+
+	/**
+	 * Removes the relation with the specified type and target
+	 * from the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void removeRelation(int type, Accessible target) {
+	}
+	
+	/**
+	 * Sends a message with event-specific data to accessible clients
+	 * indicating that something has changed within a custom control.
+	 *
+	 * @param event an <code>ACC</code> constant beginning with EVENT_* indicating the message to send
+	 * @param eventData an object containing event-specific data, or null if there is no event-specific data
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#EVENT_ACTION_CHANGED
+	 * @see ACC#EVENT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_DOCUMENT_LOAD_COMPLETE
+	 * @see ACC#EVENT_DOCUMENT_LOAD_STOPPED
+	 * @see ACC#EVENT_DOCUMENT_RELOAD
+	 * @see ACC#EVENT_HYPERLINK_ACTIVATED
+	 * @see ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_END_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_START_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_SELECTED
+	 * @see ACC#EVENT_LOCATION_CHANGED
+	 * @see ACC#EVENT_NAME_CHANGED
+	 * @see ACC#EVENT_PAGE_CHANGED
+	 * @see ACC#EVENT_SECTION_CHANGED
+	 * @see ACC#EVENT_SELECTION_CHANGED
+	 * @see ACC#EVENT_STATE_CHANGED
+	 * @see ACC#EVENT_TABLE_CAPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_SUMMARY_CHANGED
+	 * @see ACC#EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_TEXT_CARET_MOVED
+	 * @see ACC#EVENT_TEXT_CHANGED
+	 * @see ACC#EVENT_TEXT_COLUMN_CHANGED
+	 * @see ACC#EVENT_TEXT_SELECTION_CHANGED
+	 * @see ACC#EVENT_VALUE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public void sendEvent(int event, Object eventData) {
+	}
+
+	/**
 	 * Sends a message to accessible clients that the child selection
 	 * within a custom container control has changed.
 	 *
@@ -252,8 +655,8 @@ public class Accessible {
 	 * Sends a message to accessible clients that the text
 	 * within a custom control has changed.
 	 *
-	 * @param type the type of change, one of <code>ACC.NOTIFY_TEXT_INSERT</code>
-	 * or <code>ACC.NOTIFY_TEXT_DELETE</code>
+	 * @param type the type of change, one of <code>ACC.TEXT_INSERT</code>
+	 * or <code>ACC.TEXT_DELETE</code>
 	 * @param startIndex the text index within the control where the insertion or deletion begins
 	 * @param length the non-negative length in characters of the insertion or deletion
 	 *
@@ -307,6 +710,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public void internal_dispose_Accessible() {
 	}
@@ -320,6 +725,8 @@ public class Accessible {
 	 * available on all platforms, and should never be called from
 	 * application code.
 	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public int internal_WM_GETOBJECT (int wParam, int lParam) {
 		return 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
index 6a2a5d5..f1b21b9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java	
@@ -15,6 +15,7 @@ import java.util.*;
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.internal.gtk.*;
 
 /**
  * Instances of this class provide a bridge between application
@@ -41,23 +42,77 @@ import org.eclipse.swt.widgets.*;
  */
 public class Accessible {
 	Vector accessibleListeners = new Vector ();
-	Vector controlListeners = new Vector ();
-	Vector textListeners = new Vector ();
+	Vector accessibleControlListeners = new Vector ();
+	Vector accessibleTextListeners = new Vector ();
+	Vector accessibleActionListeners = new Vector();
+	Vector accessibleHyperlinkListeners = new Vector();
+	Vector accessibleTableListeners = new Vector();
+	Vector accessibleTableCellListeners = new Vector();
+	Vector accessibleTextExtendedListeners = new Vector();
+	Vector accessibleValueListeners = new Vector();
+	Vector accessibleAttributeListeners = new Vector();
+	Accessible parent;
 	AccessibleObject accessibleObject;
 	Control control;
+	Vector relations;
+	Vector children;
+	
+	static class Relation {
+		int type;
+		Accessible target;
+		
+		public Relation(int type, Accessible target) {
+			this.type = type;
+			this.target = target;
+		}
+
+		public boolean equals(Object object) {
+			if (object == this) return true;
+			if (!(object instanceof Relation)) return false;
+			Relation relation = (Relation)object;
+			return (relation.type == this.type) && (relation.target == this.target);
+		}
+	}
 	
 	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent the Accessible parent, which must not be null
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @see Control#getAccessible
+	 * 
+	 * @since 3.6
+	 */
+	public Accessible(Accessible parent) {
+		this.parent = checkNull(parent);
+		this.control = parent.control;
+		if (parent.children == null) parent.children = new Vector();
+		parent.children.addElement(this);
+	}
+
+	/**
 	 * @since 3.5
+	 * @deprecated
 	 */
 	protected Accessible() {
 	}
 
+	static Accessible checkNull (Accessible parent) {
+		if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		return parent;
+	}
+
 	Accessible (Control control) {
 		super ();
 		this.control = control;
 		AccessibleFactory.registerAccessible (this);
 		control.addDisposeListener (new DisposeListener () {
 			public void widgetDisposed (DisposeEvent e) {
+				AccessibleFactory.unregisterAccessible (Accessible.this);
 				release ();
 			}
 		});
@@ -114,7 +169,7 @@ public class Accessible {
 	public void addAccessibleControlListener (AccessibleControlListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		controlListeners.addElement (listener);		
+		accessibleControlListeners.addElement (listener);		
 	}
 
 	/**
@@ -122,7 +177,7 @@ public class Accessible {
 	 * be notified when an accessible client asks for custom text control
 	 * specific information. The listener is notified by sending it
 	 * one of the messages defined in the <code>AccessibleTextListener</code>
-	 * interface.
+	 * and <code>AccessibleTextExtendedListener</code> interfaces.
 	 *
 	 * @param listener the listener that should be notified when the receiver
 	 * is asked for custom text control specific information
@@ -136,6 +191,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #removeAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -143,10 +199,226 @@ public class Accessible {
 	public void addAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		textListeners.addElement (listener);		
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.addElement (listener);		
+		} else {
+			accessibleTextListeners.addElement (listener);
+		}
+	}
+	
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #removeAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #removeAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #removeAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #removeAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #removeAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #removeAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds a relation with the specified type and target
+	 * to the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void addRelation(int type, Accessible target) {
+		checkWidget();
+		if (relations == null) relations = new Vector();
+		Relation relation = new Relation(type, target);
+		if (relations.indexOf(relation) != -1) return;
+		relations.add(relation);
+		if (accessibleObject != null) accessibleObject.addRelation(type, target);
+	}
+	
+	void addRelations () {
+		if (relations == null) return;
+		if (accessibleObject == null) return;
+		for (int i = 0; i < relations.size(); i++) {
+			Relation relation = (Relation)relations.elementAt(i);
+			accessibleObject.addRelation(relation.type, relation.target);
+		}
 	}
 	
 	/**
+	 * Disposes of the operating system resources associated with
+	 * the receiver, and removes the receiver from its parent's
+	 * list of children.
+	 * <p>
+	 * This method should be called when an accessible that was created
+	 * with the public constructor <code>Accessible(Accessible parent)</code>
+	 * is no longer needed. You do not need to call this when the receiver's
+	 * control is disposed, because all <code>Accessible</code> instances
+	 * associated with a control are released when the control is disposed.
+	 * It is also not necessary to call this for instances of <code>Accessible</code>
+	 * that were retrieved with <code>Control.getAccessible()</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public void dispose () {
+		if (parent == null) return;
+		release();
+		parent.children.removeElement(this);
+		parent = null;
+	}
+
+	/**
 	 * Returns the control for this Accessible object. 
 	 *
 	 * @return the receiver's control
@@ -161,29 +433,36 @@ public class Accessible {
 		if (!isValidThread ()) SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
 		if (control.isDisposed ()) SWT.error (SWT.ERROR_WIDGET_DISPOSED);
 	}
-
-	AccessibleListener[] getAccessibleListeners () {
-		if (accessibleListeners == null) return null;
-		AccessibleListener[] result = new AccessibleListener [accessibleListeners.size ()];
-		accessibleListeners.copyInto (result);
-		return result;
+	
+	AccessibleObject getAccessibleObject () {
+		if (accessibleObject == null) {
+			if (parent == null) {
+				AccessibleFactory.createAccessible(this);
+			} else {
+				accessibleObject = AccessibleFactory.createChildAccessible(this, ACC.CHILDID_SELF);
+				accessibleObject.parent = parent.getAccessibleObject();
+			}
+		}
+		return accessibleObject;
 	}
 
 	int /*long*/ getControlHandle () {
-		return control.handle;
-	}
-
-	AccessibleControlListener[] getControlListeners () {
-		if (controlListeners == null) return null;
-		AccessibleControlListener[] result = new AccessibleControlListener [controlListeners.size ()];
-		controlListeners.copyInto (result);
-		return result;
-	}
-
-	AccessibleTextListener[] getTextListeners () {
-		if (textListeners == null) return null;
-		AccessibleTextListener[] result = new AccessibleTextListener [textListeners.size ()];
-		textListeners.copyInto (result);
+		int /*long*/ result = control.handle;
+		if (control instanceof Label) {
+			int /*long*/ list = OS.gtk_container_get_children (result);
+			if (list != 0) {
+				int /*long*/ temp = list;
+				while (temp != 0) {
+					int /*long*/ widget = OS.g_list_data( temp);
+					if (OS.GTK_WIDGET_VISIBLE (widget)) {
+						result = widget;
+						break;
+					}
+					temp = OS.g_list_next (temp);
+				}
+				OS.g_list_free (list);
+			}
+		}
 		return result;
 	}
 
@@ -199,6 +478,8 @@ public class Accessible {
 	 *
 	 * @param control the control to get the accessible object for
 	 * @return the platform specific accessible object
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public static Accessible internal_new_Accessible (Control control) {
 		return new Accessible (control);
@@ -210,7 +491,12 @@ public class Accessible {
 	}
 	
 	void release () {
-		AccessibleFactory.unregisterAccessible (Accessible.this);
+		if (children != null) {
+			for (int i = 0; i < children.size(); i++) {
+				Accessible child = (Accessible) children.elementAt(i);
+				child.dispose();
+			}
+		}
 		if (accessibleObject != null) {
 			accessibleObject.release ();
 			accessibleObject = null;
@@ -238,7 +524,7 @@ public class Accessible {
 	public void removeAccessibleControlListener (AccessibleControlListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		controlListeners.removeElement (listener);
+		accessibleControlListeners.removeElement (listener);
 	}
 
 	/**
@@ -283,6 +569,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #addAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -290,7 +577,246 @@ public class Accessible {
 	public void removeAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		textListeners.removeElement (listener);
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.removeElement (listener);
+		} else {
+			accessibleTextListeners.removeElement (listener);
+		}
+	}
+	
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #addAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleActionListener(AccessibleActionListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #addAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #addAccessibleTableListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #addAccessibleTableCellListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #addAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleValueListener(AccessibleValueListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #addAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the relation with the specified type and target
+	 * from the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void removeRelation(int type, Accessible target) {
+		checkWidget();
+		if (relations == null) return;
+		Relation relation = new Relation(type, target);
+		int index = relations.indexOf(relation);
+		if (index == -1) return;
+		relations.remove(index);
+		if (accessibleObject != null) accessibleObject.removeRelation(type, target);
+	}
+
+	/**
+	 * Sends a message with event-specific data to accessible clients
+	 * indicating that something has changed within a custom control.
+	 *
+	 * @param event an <code>ACC</code> constant beginning with EVENT_* indicating the message to send
+	 * @param eventData an object containing event-specific data, or null if there is no event-specific data
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#EVENT_ACTION_CHANGED
+	 * @see ACC#EVENT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_DOCUMENT_LOAD_COMPLETE
+	 * @see ACC#EVENT_DOCUMENT_LOAD_STOPPED
+	 * @see ACC#EVENT_DOCUMENT_RELOAD
+	 * @see ACC#EVENT_HYPERLINK_ACTIVATED
+	 * @see ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_END_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_START_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_SELECTED
+	 * @see ACC#EVENT_LOCATION_CHANGED
+	 * @see ACC#EVENT_NAME_CHANGED
+	 * @see ACC#EVENT_PAGE_CHANGED
+	 * @see ACC#EVENT_SECTION_CHANGED
+	 * @see ACC#EVENT_SELECTION_CHANGED
+	 * @see ACC#EVENT_STATE_CHANGED
+	 * @see ACC#EVENT_TABLE_CAPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_SUMMARY_CHANGED
+	 * @see ACC#EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_TEXT_CARET_MOVED
+	 * @see ACC#EVENT_TEXT_CHANGED
+	 * @see ACC#EVENT_TEXT_COLUMN_CHANGED
+	 * @see ACC#EVENT_TEXT_SELECTION_CHANGED
+	 * @see ACC#EVENT_VALUE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public void sendEvent(int event, Object eventData) {
+		checkWidget();
+		if (accessibleObject != null) {
+			accessibleObject.sendEvent(event, eventData);
+		}
 	}
 	
 	/**
@@ -353,8 +879,8 @@ public class Accessible {
 	 * Sends a message to accessible clients that the text
 	 * within a custom control has changed.
 	 *
-	 * @param type the type of change, one of <code>ACC.NOTIFY_TEXT_INSERT</code>
-	 * or <code>ACC.NOTIFY_TEXT_DELETE</code>
+	 * @param type the type of change, one of <code>ACC.TEXT_INSERT</code>
+	 * or <code>ACC.TEXT_DELETE</code>
 	 * @param startIndex the text index within the control where the insertion or deletion begins
 	 * @param length the non-negative length in characters of the insertion or deletion
 	 *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java
index c6f6300..47ed177 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,43 +18,53 @@ import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.*;
 
 class AccessibleFactory {
-	int /*long*/ handle;
-	int /*long*/ objectParentType;
-	int /*long*/ widgetTypeName;
-	Callback atkObjectFactoryCB_create_accessible;
-	Callback gTypeInfo_base_init_factory;
-	Hashtable accessibles = new Hashtable (9);
-	
-	static final Hashtable Types = new Hashtable (9);
+	static final Hashtable Accessibles = new Hashtable (9);
 	static final Hashtable Factories = new Hashtable (9);	
-	static final int /*long*/ DefaultParentType = OS.g_type_from_name (Converter.wcsToMbcs (null, "GtkAccessible", true)); //$NON-NLS-1$
-	static final byte[] FACTORY_PARENTTYPENAME = Converter.wcsToMbcs (null, "AtkObjectFactory", true); //$NON-NLS-1$
-	static final byte[] SWT_TYPE_PREFIX = Converter.wcsToMbcs (null, "SWT", false); //$NON-NLS-1$
-	static final byte[] CHILD_TYPENAME = Converter.wcsToMbcs (null, "Child", false); //$NON-NLS-1$
-	static final byte[] FACTORY_TYPENAME = Converter.wcsToMbcs (null, "SWTFactory", true); //$NON-NLS-1$
+	static final String SWT_TYPE_PREFIX = "SWTAccessible"; //$NON-NLS-1$
+	static final String CHILD_TYPENAME = "Child"; //$NON-NLS-1$
+	static final String FACTORY_TYPENAME = "SWTFactory"; //$NON-NLS-1$
 	static final int[] actionRoles = {
 		ACC.ROLE_CHECKBUTTON, ACC.ROLE_COMBOBOX, ACC.ROLE_LINK,
 		ACC.ROLE_MENUITEM, ACC.ROLE_PUSHBUTTON, ACC.ROLE_RADIOBUTTON,
-		ACC.ROLE_SPLITBUTTON,
+		ACC.ROLE_SPLITBUTTON, ACC.ROLE_SPINBUTTON,
+		ACC.ROLE_CHECKMENUITEM, ACC.ROLE_RADIOMENUITEM,
+	};
+	static final int[] hypertextRoles = {
+		ACC.ROLE_TEXT, ACC.ROLE_LINK, ACC.ROLE_PARAGRAPH,
 	};
-	static final int[] hypertextRoles = {ACC.ROLE_LINK};
 	static final int[] selectionRoles = {
 		ACC.ROLE_LIST, ACC.ROLE_TABFOLDER, ACC.ROLE_TABLE, ACC.ROLE_TREE,
 	};
 	static final int[] textRoles = {
-		ACC.ROLE_COMBOBOX, ACC.ROLE_LINK, ACC.ROLE_LABEL, ACC.ROLE_TEXT,
+		ACC.ROLE_COMBOBOX, ACC.ROLE_LINK, ACC.ROLE_LABEL, ACC.ROLE_TEXT, ACC.ROLE_STATUSBAR,
+		ACC.ROLE_PARAGRAPH,
+	};
+	static final int[] tableRoles = {
+		ACC.ROLE_TABLE, ACC.ROLE_TREE,
+	};
+	static final int[] valueRoles = {
+		ACC.ROLE_SCROLLBAR, ACC.ROLE_SPINBUTTON, ACC.ROLE_PROGRESSBAR,
 	};
 
-	/* AT callbacks*/
+	/* Action callbacks */
+	static final Callback AtkActionCB_do_action;
+	static final Callback AtkActionCB_get_n_actions;	
+	static final Callback AtkActionCB_get_description;
 	static final Callback AtkActionCB_get_keybinding;
 	static final Callback AtkActionCB_get_name;	
+	
+	/* Component callbacks */
 	static final Callback AtkComponentCB_get_extents;
 	static final Callback AtkComponentCB_get_position;
 	static final Callback AtkComponentCB_get_size;
 	static final Callback AtkComponentCB_ref_accessible_at_point;
+	
+	/* Hypertext callbacks */
 	static final Callback AtkHypertextCB_get_link;
 	static final Callback AtkHypertextCB_get_n_links;
 	static final Callback AtkHypertextCB_get_link_index;
+	
+	/* Object callbacks */
 	static final Callback AtkObjectCB_get_description;
 	static final Callback AtkObjectCB_get_index_in_parent;
 	static final Callback AtkObjectCB_get_n_children;
@@ -63,9 +73,47 @@ class AccessibleFactory {
 	static final Callback AtkObjectCB_get_role;
 	static final Callback AtkObjectCB_ref_child;
 	static final Callback AtkObjectCB_ref_state_set;
+	static final Callback AtkObjectCB_get_attributes;
+	
+	/* Selection callbacks */
 	static final Callback AtkSelectionCB_is_child_selected;
 	static final Callback AtkSelectionCB_ref_selection;
+
+	/* Table callbacks */
+	static final Callback AtkTableCB_ref_at;
+	static final Callback AtkTableCB_get_index_at;
+	static final Callback AtkTableCB_get_column_at_index;
+	static final Callback AtkTableCB_get_row_at_index;
+	static final Callback AtkTableCB_get_n_columns;
+	static final Callback AtkTableCB_get_n_rows;
+	static final Callback AtkTableCB_get_column_extent_at;
+	static final Callback AtkTableCB_get_row_extent_at;
+	static final Callback AtkTableCB_get_summary;
+	static final Callback AtkTableCB_get_caption;
+	static final Callback AtkTableCB_get_column_description;
+	static final Callback AtkTableCB_get_row_description;
+	static final Callback AtkTableCB_get_column_header;
+	static final Callback AtkTableCB_get_row_header;
+	static final Callback AtkTableCB_get_selected_columns;
+	static final Callback AtkTableCB_get_selected_rows;
+	static final Callback AtkTableCB_is_column_selected;
+	static final Callback AtkTableCB_is_row_selected;
+	static final Callback AtkTableCB_is_selected;
+	static final Callback AtkTableCB_add_column_selection;
+	static final Callback AtkTableCB_add_row_selection;
+	static final Callback AtkTableCB_remove_column_selection;
+	static final Callback AtkTableCB_remove_row_selection;
+	
+	/* Text callbacks */
+	static final Callback AtkTextCB_get_character_extents;
+	static final Callback AtkTextCB_get_range_extents;
+	static final Callback AtkTextCB_get_run_attributes;
+	static final Callback AtkTextCB_get_offset_at_point;
+	static final Callback AtkTextCB_add_selection;
+	static final Callback AtkTextCB_remove_selection;
+	static final Callback AtkTextCB_set_selection;
 	static final Callback AtkTextCB_get_caret_offset;
+	static final Callback AtkTextCB_set_caret_offset;
 	static final Callback AtkTextCB_get_n_selections;
 	static final Callback AtkTextCB_get_selection;
 	static final Callback AtkTextCB_get_text;
@@ -74,22 +122,39 @@ class AccessibleFactory {
 	static final Callback AtkTextCB_get_text_before_offset;
 	static final Callback AtkTextCB_get_character_at_offset;
 	static final Callback AtkTextCB_get_character_count;
+	static final Callback AtkTextCB_get_bounded_ranges;
+	
+	/* Value callbacks */
+	static final Callback AtkValueCB_get_current_value;
+	static final Callback AtkValueCB_get_maximum_value;
+	static final Callback AtkValueCB_get_minimum_value;
+	static final Callback AtkValueCB_set_current_value;
+	
 	static final Callback GObjectClass_finalize;
+	static final Callback AtkObjectFactoryCB_create_accessible;
+	
 	/* interface initialization callbacks */
 	static final Callback InitActionIfaceCB;		
 	static final Callback InitComponentIfaceCB;
 	static final Callback InitHypertextIfaceCB;
 	static final Callback GTypeInfo_base_init_type;
 	static final Callback InitSelectionIfaceCB;
+	static final Callback InitTableIfaceCB;
 	static final Callback InitTextIfaceCB;
+	static final Callback InitValueIfaceCB;
+	static final Callback GTypeInfo_base_init_factory;
 	/* interface definitions */
-	static int /*long*/ ObjectIfaceDefinition;
 	static final int /*long*/ ActionIfaceDefinition;
 	static final int /*long*/ ComponentIfaceDefinition;
 	static final int /*long*/ HypertextIfaceDefinition;
 	static final int /*long*/ SelectionIfaceDefinition;
+	static final int /*long*/ TableIfaceDefinition;
 	static final int /*long*/ TextIfaceDefinition;
+	static final int /*long*/ ValueIfaceDefinition;
 	static {
+		AtkActionCB_do_action = newCallback (AccessibleObject.class, "atkAction_do_action", 2); //$NON-NLS-1$
+		AtkActionCB_get_n_actions = newCallback (AccessibleObject.class, "atkAction_get_n_actions", 1); //$NON-NLS-1$
+		AtkActionCB_get_description = newCallback (AccessibleObject.class, "atkAction_get_description", 2); //$NON-NLS-1$
 		AtkActionCB_get_keybinding = newCallback (AccessibleObject.class, "atkAction_get_keybinding", 2); //$NON-NLS-1$
 		AtkActionCB_get_name = newCallback (AccessibleObject.class, "atkAction_get_name", 2); //$NON-NLS-1$
 		AtkComponentCB_get_extents = newCallback (AccessibleObject.class, "atkComponent_get_extents", 6); //$NON-NLS-1$
@@ -107,9 +172,41 @@ class AccessibleFactory {
 		AtkObjectCB_ref_state_set = newCallback (AccessibleObject.class, "atkObject_ref_state_set", 1); //$NON-NLS-1$
 		AtkObjectCB_get_index_in_parent = newCallback (AccessibleObject.class, "atkObject_get_index_in_parent", 1); //$NON-NLS-1$
 		AtkObjectCB_ref_child = newCallback (AccessibleObject.class, "atkObject_ref_child", 2); //$NON-NLS-1$
+		AtkObjectCB_get_attributes = newCallback (AccessibleObject.class, "atkObject_get_attributes", 1); //$NON-NLS-1$
 		AtkSelectionCB_is_child_selected = newCallback (AccessibleObject.class, "atkSelection_is_child_selected", 2); //$NON-NLS-1$
 		AtkSelectionCB_ref_selection = newCallback (AccessibleObject.class, "atkSelection_ref_selection", 2); //$NON-NLS-1$
+		AtkTableCB_ref_at = newCallback (AccessibleObject.class, "atkTable_ref_at", 3); //$NON-NLS-1$
+		AtkTableCB_get_index_at = newCallback (AccessibleObject.class, "atkTable_get_index_at", 3); //$NON-NLS-1$
+		AtkTableCB_get_column_at_index = newCallback (AccessibleObject.class, "atkTable_get_column_at_index", 2); //$NON-NLS-1$
+		AtkTableCB_get_row_at_index = newCallback (AccessibleObject.class, "atkTable_get_row_at_index", 2); //$NON-NLS-1$
+		AtkTableCB_get_n_columns = newCallback (AccessibleObject.class, "atkTable_get_n_columns", 1); //$NON-NLS-1$
+		AtkTableCB_get_n_rows = newCallback (AccessibleObject.class, "atkTable_get_n_rows", 1); //$NON-NLS-1$
+		AtkTableCB_get_column_extent_at = newCallback (AccessibleObject.class, "atkTable_get_column_extent_at", 3); //$NON-NLS-1$
+		AtkTableCB_get_row_extent_at = newCallback (AccessibleObject.class, "atkTable_get_row_extent_at", 3); //$NON-NLS-1$
+		AtkTableCB_get_caption = newCallback (AccessibleObject.class, "atkTable_get_caption", 1); //$NON-NLS-1$
+		AtkTableCB_get_summary = newCallback (AccessibleObject.class, "atkTable_get_summary", 1); //$NON-NLS-1$
+		AtkTableCB_get_column_description = newCallback (AccessibleObject.class, "atkTable_get_column_description", 2); //$NON-NLS-1$
+		AtkTableCB_get_row_description = newCallback (AccessibleObject.class, "atkTable_get_row_description", 2); //$NON-NLS-1$
+		AtkTableCB_get_column_header = newCallback (AccessibleObject.class, "atkTable_get_column_header", 2); //$NON-NLS-1$
+		AtkTableCB_get_row_header = newCallback (AccessibleObject.class, "atkTable_get_row_header", 2); //$NON-NLS-1$
+		AtkTableCB_get_selected_columns = newCallback (AccessibleObject.class, "atkTable_get_selected_columns", 2); //$NON-NLS-1$
+		AtkTableCB_get_selected_rows = newCallback (AccessibleObject.class, "atkTable_get_selected_rows", 2); //$NON-NLS-1$
+		AtkTableCB_is_column_selected = newCallback (AccessibleObject.class, "atkTable_is_column_selected", 2); //$NON-NLS-1$
+		AtkTableCB_is_row_selected = newCallback (AccessibleObject.class, "atkTable_is_row_selected", 2); //$NON-NLS-1$
+		AtkTableCB_is_selected = newCallback (AccessibleObject.class, "atkTable_is_selected", 3); //$NON-NLS-1$
+		AtkTableCB_add_column_selection = newCallback (AccessibleObject.class, "atkTable_add_column_selection", 2); //$NON-NLS-1$
+		AtkTableCB_add_row_selection = newCallback (AccessibleObject.class, "atkTable_add_row_selection", 2); //$NON-NLS-1$
+		AtkTableCB_remove_column_selection = newCallback (AccessibleObject.class, "atkTable_remove_column_selection", 2); //$NON-NLS-1$
+		AtkTableCB_remove_row_selection = newCallback (AccessibleObject.class, "atkTable_remove_row_selection", 2); //$NON-NLS-1$
+		AtkTextCB_get_character_extents = newCallback (AccessibleObject.class, "atkText_get_character_extents", 7); //$NON-NLS-1$
+		AtkTextCB_get_range_extents = newCallback (AccessibleObject.class, "atkText_get_range_extents", 5); //$NON-NLS-1$
+		AtkTextCB_get_run_attributes = newCallback (AccessibleObject.class, "atkText_get_run_attributes", 4); //$NON-NLS-1$
+		AtkTextCB_get_offset_at_point = newCallback (AccessibleObject.class, "atkText_get_offset_at_point", 4); //$NON-NLS-1$
+		AtkTextCB_add_selection = newCallback (AccessibleObject.class, "atkText_add_selection", 3); //$NON-NLS-1$
+		AtkTextCB_remove_selection = newCallback (AccessibleObject.class, "atkText_remove_selection", 2); //$NON-NLS-1$
+		AtkTextCB_set_selection = newCallback (AccessibleObject.class, "atkText_set_selection", 4); //$NON-NLS-1$
 		AtkTextCB_get_caret_offset = newCallback (AccessibleObject.class, "atkText_get_caret_offset", 1); //$NON-NLS-1$
+		AtkTextCB_set_caret_offset = newCallback (AccessibleObject.class, "atkText_set_caret_offset", 2); //$NON-NLS-1$
 		AtkTextCB_get_n_selections = newCallback (AccessibleObject.class, "atkText_get_n_selections", 1); //$NON-NLS-1$
 		AtkTextCB_get_selection = newCallback (AccessibleObject.class, "atkText_get_selection", 4); //$NON-NLS-1$
 		AtkTextCB_get_text = newCallback (AccessibleObject.class, "atkText_get_text", 3); //$NON-NLS-1$
@@ -118,8 +215,15 @@ class AccessibleFactory {
 		AtkTextCB_get_text_before_offset = newCallback (AccessibleObject.class, "atkText_get_text_before_offset", 5); //$NON-NLS-1$
 		AtkTextCB_get_character_at_offset = newCallback (AccessibleObject.class, "atkText_get_character_at_offset", 2); //$NON-NLS-1$
 		AtkTextCB_get_character_count = newCallback (AccessibleObject.class, "atkText_get_character_count", 1); //$NON-NLS-1$
+		AtkTextCB_get_bounded_ranges = newCallback (AccessibleObject.class, "atkText_get_bounded_ranges", 5); //$NON-NLS-1$
+		AtkValueCB_get_current_value = newCallback (AccessibleObject.class, "atkValue_get_current_value", 2); //$NON-NLS-1$
+		AtkValueCB_get_maximum_value = newCallback (AccessibleObject.class, "atkValue_get_maximum_value", 2); //$NON-NLS-1$
+		AtkValueCB_get_minimum_value = newCallback (AccessibleObject.class, "atkValue_get_minimum_value", 2); //$NON-NLS-1$
+		AtkValueCB_set_current_value = newCallback (AccessibleObject.class, "atkValue_set_current_value", 2); //$NON-NLS-1$
 		GObjectClass_finalize = newCallback (AccessibleObject.class, "gObjectClass_finalize", 1); //$NON-NLS-1$
 		GTypeInfo_base_init_type = newCallback (AccessibleFactory.class, "gTypeInfo_base_init_type", 1); //$NON-NLS-1$
+		GTypeInfo_base_init_factory = newCallback (AccessibleFactory.class, "gTypeInfo_base_init_factory", 1); //$NON-NLS-1$
+		AtkObjectFactoryCB_create_accessible = newCallback (AccessibleFactory.class, "atkObjectFactory_create_accessible", 1); //$NON-NLS-1$
 		/* Action interface */
 		InitActionIfaceCB = newCallback (AccessibleFactory.class, "initActionIfaceCB", 1); //$NON-NLS-1$
 		GInterfaceInfo interfaceInfo = new GInterfaceInfo ();
@@ -145,11 +249,23 @@ class AccessibleFactory {
 		SelectionIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof);  
 		OS.memmove (SelectionIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof);
 		/* Text interface */
+		InitTableIfaceCB = newCallback (AccessibleFactory.class, "initTableIfaceCB", 1); //$NON-NLS-1$
+		interfaceInfo = new GInterfaceInfo ();
+		interfaceInfo.interface_init = InitTableIfaceCB.getAddress ();
+		TableIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof);  
+		OS.memmove (TableIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof);
+		/* Text interface */
 		InitTextIfaceCB = newCallback (AccessibleFactory.class, "initTextIfaceCB", 1); //$NON-NLS-1$
 		interfaceInfo = new GInterfaceInfo ();
 		interfaceInfo.interface_init = InitTextIfaceCB.getAddress ();
 		TextIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof);  
 		OS.memmove (TextIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof);
+		/* Value interface */
+		InitValueIfaceCB = newCallback (AccessibleFactory.class, "initValueIfaceCB", 1); //$NON-NLS-1$
+		interfaceInfo = new GInterfaceInfo ();
+		interfaceInfo.interface_init = InitValueIfaceCB.getAddress ();
+		ValueIfaceDefinition = OS.g_malloc (GInterfaceInfo.sizeof);  
+		OS.memmove (ValueIfaceDefinition, interfaceInfo, GInterfaceInfo.sizeof);
 	}
 
 	static private Callback newCallback (Object object, String method, int argCount) {
@@ -158,51 +274,31 @@ class AccessibleFactory {
 		return callback;
 	}
 
-	private AccessibleFactory (int /*long*/ widgetType) {
-		super ();
-		widgetTypeName = OS.g_type_name (widgetType);
-		int widgetTypeNameLength = OS.strlen (widgetTypeName) + 1;
+	static String getTypeName (int /*long*/ type) {
+		int /*long*/ typeName = OS.g_type_name (type);
+		int widgetTypeNameLength = OS.strlen (typeName);
 		byte[] buffer = new byte [widgetTypeNameLength];
-		OS.memmove (buffer, widgetTypeName, widgetTypeNameLength);
-		byte[] factoryName = new byte [FACTORY_TYPENAME.length + widgetTypeNameLength - 1];
-		System.arraycopy (FACTORY_TYPENAME, 0, factoryName, 0, FACTORY_TYPENAME.length);
-		System.arraycopy (buffer, 0, factoryName, FACTORY_TYPENAME.length - 1, widgetTypeNameLength);
-		if (OS.g_type_from_name (factoryName) == 0) {
-			/* register the factory */
-			int /*long*/ registry = ATK.atk_get_default_registry ();
-			int /*long*/ previousFactory = ATK.atk_registry_get_factory (registry, widgetType);
-			objectParentType = ATK.atk_object_factory_get_accessible_type (previousFactory);
-			if (objectParentType == 0) objectParentType = DefaultParentType;
-			int /*long*/ factoryParentType = OS.g_type_from_name (FACTORY_PARENTTYPENAME);
-			gTypeInfo_base_init_factory  = new Callback (this, "gTypeInfo_base_init_factory", 1); //$NON-NLS-1$
-			int /*long*/ address = gTypeInfo_base_init_factory.getAddress ();
-			if (address == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-			GTypeInfo typeInfo = new GTypeInfo ();
-			typeInfo.base_init = address;
-			typeInfo.class_size = (short)ATK.AtkObjectFactoryClass_sizeof ();
-			typeInfo.instance_size = (short)ATK.AtkObjectFactory_sizeof ();
-			int /*long*/ info = OS.g_malloc (GTypeInfo.sizeof); 
-			OS.memmove (info, typeInfo, GTypeInfo.sizeof); 
-			int /*long*/ swtFactoryType = OS.g_type_register_static (factoryParentType, factoryName, info, 0);
-			ATK.atk_registry_set_factory_type (registry, widgetType, swtFactoryType);
-			handle = ATK.atk_registry_get_factory (registry, widgetType);
-		}
+		OS.memmove (buffer, typeName, widgetTypeNameLength);
+		return new String(Converter.mbcsToWcs(null, buffer));
 	}
-
-	void addAccessible (Accessible accessible) {
-		int /*long*/ controlHandle = accessible.getControlHandle ();
-		accessibles.put (new LONG (controlHandle), accessible);
-		ATK.atk_object_factory_create_accessible (handle, controlHandle);
+	
+	static int /*long*/ getParentType (int /*long*/ widgetType) {
+		LONG type = null;
+		while (widgetType != 0 && (type = (LONG)Factories.get(new LONG(widgetType))) == null) {
+			widgetType = OS.g_type_parent (widgetType);
+		}
+		if (type == null) return 0;
+		return ((LONG)type).value;
 	}
 
-	int /*long*/ atkObjectFactory_create_accessible (int /*long*/ widget) {
-		Accessible accessible = (Accessible) accessibles.get (new LONG (widget));
+	static int /*long*/ atkObjectFactory_create_accessible (int /*long*/ widget) {
+		Accessible accessible = (Accessible) Accessibles.get (new LONG (widget));
 		if (accessible == null) {
 			/*
 			* we don't care about this control, so create it with the parent's
 			* type so that its accessibility callbacks will not pass though here 
 			*/  
-			int /*long*/ result = OS.g_object_new (objectParentType, 0);
+			int /*long*/ result = OS.g_object_new (getParentType(OS.G_OBJECT_TYPE (widget)), 0);
 			ATK.atk_object_initialize (result, widget);
 			return result;
 		}
@@ -210,31 +306,35 @@ class AccessibleFactory {
 		if (accessible.accessibleObject != null) {
 			return accessible.accessibleObject.handle;
 		}
-		int typeNameLength = OS.strlen (widgetTypeName);
-		byte[] buffer = new byte [typeNameLength];
-		OS.memmove (buffer, widgetTypeName, typeNameLength);
-		int /*long*/ type = getType (buffer, accessible, objectParentType, ACC.CHILDID_SELF);
-		AccessibleObject object = new AccessibleObject (type, widget, accessible, objectParentType, false);
+		int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget);
+		int /*long*/ parentType = getParentType (widgetType);
+		if (parentType == 0) parentType = ATK.GTK_TYPE_ACCESSIBLE();
+		int /*long*/ type = getType (getTypeName(widgetType), accessible, parentType, ACC.CHILDID_SELF);
+		AccessibleObject object = new AccessibleObject (type, widget, accessible, false);
 		accessible.accessibleObject = object;
+		accessible.addRelations ();
 		return object.handle;
 	}
 	
-	static int /*long*/ getChildType (Accessible accessible, int childIndex) {
-		return getType (CHILD_TYPENAME, accessible, DefaultParentType, childIndex);
+	static AccessibleObject createChildAccessible (Accessible accessible, int childId) {
+		int /*long*/ childType = getType (CHILD_TYPENAME, accessible, ATK.GTK_TYPE_ACCESSIBLE(), childId);
+		return new AccessibleObject(childType, 0, accessible, true);
 	}
-
-	static int /*long*/ getDefaultParentType () {
-		return DefaultParentType;
+	
+	static void createAccessible (Accessible accessible) {
+		int /*long*/ controlHandle = accessible.getControlHandle ();
+		OS.gtk_widget_get_accessible(controlHandle);
 	}
 
-	static int /*long*/ getType (byte[] widgetTypeName, Accessible accessible, int /*long*/ parentType, int childId) {
+	static int /*long*/ getType (String widgetTypeName, Accessible accessible, int /*long*/ parentType, int childId) {
 		AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 		event.childID = childId;
-		AccessibleControlListener[] listeners = accessible.getControlListeners ();
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getRole (event);
+		Vector listeners = accessible.accessibleControlListeners;
+		for (int i = 0, length = listeners.size(); i < length; i++) {
+			AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+			listener.getRole (event);
 		}
-		boolean action = false, hypertext = false, selection = false, text = false;
+		boolean action = false, hypertext = false, selection = false, table = false, text = false, value = false;
 		if (event.detail != 0) {	/* a role was specified */
 			for (int i = 0; i < actionRoles.length; i++) {
 				if (event.detail == actionRoles [i]) {
@@ -254,27 +354,39 @@ class AccessibleFactory {
 					break;
 				}
 			}
+			for (int i = 0; i < tableRoles.length; i++) {
+				if (event.detail == tableRoles [i]) {
+					table = true;
+					break;
+				}
+			}
 			for (int i = 0; i < textRoles.length; i++) {
 				if (event.detail == textRoles [i]) {
 					text = true;
 					break;
 				}
 			}
+			for (int i = 0; i < valueRoles.length; i++) {
+				if (event.detail == valueRoles [i]) {
+					value = true;
+					break;
+				}
+			}
 		} else {
-			action = hypertext = selection = text = true;
+			action = hypertext = selection = table = text = value = true;
 		}
-		String swtTypeName = new String (SWT_TYPE_PREFIX);
-		swtTypeName += new String (widgetTypeName);
+		String swtTypeName = SWT_TYPE_PREFIX + widgetTypeName;
 		if (action) swtTypeName += "Action"; //$NON-NLS-1$
 		if (hypertext) swtTypeName += "Hypertext"; //$NON-NLS-1$
 		if (selection) swtTypeName += "Selection"; //$NON-NLS-1$
+		if (table) swtTypeName += "Table"; //$NON-NLS-1$
 		if (text) swtTypeName += "Text"; //$NON-NLS-1$
+		if (value) swtTypeName += "Value"; //$NON-NLS-1$
 
-		int /*long*/ type = 0;
-		LONG typeInt = (LONG)Types.get (swtTypeName);
-		if (typeInt != null) {
-			type = typeInt.value;
-		} else {
+		byte[] nameBytes = Converter.wcsToMbcs(null, swtTypeName, true);
+		int /*long*/ type = OS.g_type_from_name(nameBytes);
+		if (type == 0) {
+			if (AccessibleObject.DEBUG) AccessibleObject.print("-->New Type=" + swtTypeName); //$NON-NLS-1$
 			/* define the type */
 			int /*long*/ queryPtr = OS.g_malloc (GTypeQuery.sizeof);
 			OS.g_type_query (parentType, queryPtr);
@@ -285,29 +397,25 @@ class AccessibleFactory {
 			typeInfo.base_init = GTypeInfo_base_init_type.getAddress ();
 			typeInfo.class_size = (short) query.class_size;
 			typeInfo.instance_size = (short) query.instance_size;
-			ObjectIfaceDefinition = OS.g_malloc (GTypeInfo.sizeof); 
-			OS.memmove (ObjectIfaceDefinition, typeInfo, GTypeInfo.sizeof);
-			byte[] nameBytes = Converter.wcsToMbcs(null, swtTypeName, true);
-			type = OS.g_type_register_static (parentType, nameBytes, ObjectIfaceDefinition, 0);
-			OS.g_type_add_interface_static (type, AccessibleObject.ATK_COMPONENT_TYPE, ComponentIfaceDefinition);
-			if (action) OS.g_type_add_interface_static (type, AccessibleObject.ATK_ACTION_TYPE, ActionIfaceDefinition);
-			if (hypertext) OS.g_type_add_interface_static (type, AccessibleObject.ATK_HYPERTEXT_TYPE, HypertextIfaceDefinition);
-			if (selection) OS.g_type_add_interface_static (type, AccessibleObject.ATK_SELECTION_TYPE, SelectionIfaceDefinition);
-			if (text) OS.g_type_add_interface_static (type, AccessibleObject.ATK_TEXT_TYPE, TextIfaceDefinition);
-			Types.put (swtTypeName, new LONG (type));
+			int /*long*/ definition = OS.g_malloc (GTypeInfo.sizeof); 
+			OS.memmove (definition, typeInfo, GTypeInfo.sizeof);
+			type = OS.g_type_register_static (parentType, nameBytes, definition, 0);
+			OS.g_type_add_interface_static (type, ATK.ATK_TYPE_COMPONENT(), ComponentIfaceDefinition);
+			if (action) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_ACTION(), ActionIfaceDefinition);
+			if (hypertext) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_HYPERTEXT(), HypertextIfaceDefinition);
+			if (selection) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_SELECTION(), SelectionIfaceDefinition);
+			if (table) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_TABLE(), TableIfaceDefinition);
+			if (text) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_TEXT(), TextIfaceDefinition);
+			if (value) OS.g_type_add_interface_static (type, ATK.ATK_TYPE_VALUE(), ValueIfaceDefinition);
 		}
 		return type;
 	}
 
-	int /*long*/ gTypeInfo_base_init_factory (int /*long*/ klass) {
-		int /*long*/ atkObjectFactoryClass = ATK.ATK_OBJECT_FACTORY_CLASS (klass);
-		AtkObjectFactoryClass objectFactoryClassStruct = new AtkObjectFactoryClass ();
-		ATK.memmove (objectFactoryClassStruct, atkObjectFactoryClass);
-		atkObjectFactoryCB_create_accessible = new Callback (this, "atkObjectFactory_create_accessible", 1); //$NON-NLS-1$
-		int /*long*/ address = atkObjectFactoryCB_create_accessible.getAddress ();
-		if (address == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-		objectFactoryClassStruct.create_accessible = address;
-		ATK.memmove (atkObjectFactoryClass, objectFactoryClassStruct); 
+	static int /*long*/ gTypeInfo_base_init_factory (int /*long*/ klass) {
+		AtkObjectFactoryClass objectClass = new AtkObjectFactoryClass ();
+		ATK.memmove (objectClass, klass);
+		objectClass.create_accessible = AtkObjectFactoryCB_create_accessible.getAddress ();
+		ATK.memmove (klass, objectClass); 
 		return 0;
 	}
 	
@@ -322,6 +430,7 @@ class AccessibleFactory {
 		objectClass.ref_state_set = AtkObjectCB_ref_state_set.getAddress ();
 		objectClass.get_index_in_parent = AtkObjectCB_get_index_in_parent.getAddress ();
 		objectClass.ref_child = AtkObjectCB_ref_child.getAddress ();
+		objectClass.get_attributes = AtkObjectCB_get_attributes.getAddress ();
 		int /*long*/ gObjectClass = OS.G_OBJECT_CLASS (klass);
 		GObjectClass objectClassStruct = new GObjectClass ();
 		OS.memmove (objectClassStruct, gObjectClass);
@@ -332,83 +441,143 @@ class AccessibleFactory {
 	}
 	
 	static int /*long*/ initActionIfaceCB (int /*long*/ iface) {
-		AtkActionIface actionIface = new AtkActionIface ();
-		ATK.memmove (actionIface, iface);
-		actionIface.get_keybinding = AtkActionCB_get_keybinding.getAddress (); 
-		actionIface.get_name = AtkActionCB_get_name.getAddress ();
-		ATK.memmove (iface, actionIface);
+		AtkActionIface inter = new AtkActionIface ();
+		ATK.memmove (inter, iface);
+		inter.do_action = AtkActionCB_do_action.getAddress (); 
+		inter.get_n_actions = AtkActionCB_get_n_actions.getAddress ();
+		inter.get_description = AtkActionCB_get_description.getAddress ();
+		inter.get_keybinding = AtkActionCB_get_keybinding.getAddress (); 
+		inter.get_name = AtkActionCB_get_name.getAddress ();
+		ATK.memmove (iface, inter);
 		return 0;
 	}
 	
 	static int /*long*/ initComponentIfaceCB (int /*long*/ iface) {
-		AtkComponentIface componentIface = new AtkComponentIface ();
-		ATK.memmove (componentIface, iface);
-		componentIface.get_extents = AtkComponentCB_get_extents.getAddress ();
-		componentIface.get_position = AtkComponentCB_get_position.getAddress ();
-		componentIface.get_size = AtkComponentCB_get_size.getAddress ();
-		componentIface.ref_accessible_at_point = AtkComponentCB_ref_accessible_at_point.getAddress ();
-		ATK.memmove (iface, componentIface);
+		AtkComponentIface inter = new AtkComponentIface ();
+		ATK.memmove (inter, iface);
+		inter.get_extents = AtkComponentCB_get_extents.getAddress ();
+		inter.get_position = AtkComponentCB_get_position.getAddress ();
+		inter.get_size = AtkComponentCB_get_size.getAddress ();
+		inter.ref_accessible_at_point = AtkComponentCB_ref_accessible_at_point.getAddress ();
+		ATK.memmove (iface, inter);
 		return 0;
 	}
 
 	static int /*long*/ initHypertextIfaceCB (int /*long*/ iface) {
-		AtkHypertextIface hypertextIface = new AtkHypertextIface ();
-		ATK.memmove (hypertextIface, iface);
-		hypertextIface.get_link = AtkHypertextCB_get_link.getAddress (); 
-		hypertextIface.get_link_index = AtkHypertextCB_get_link_index.getAddress ();
-		hypertextIface.get_n_links = AtkHypertextCB_get_n_links.getAddress ();
-		ATK.memmove (iface, hypertextIface);
+		AtkHypertextIface inter = new AtkHypertextIface ();
+		ATK.memmove (inter, iface);
+		inter.get_link = AtkHypertextCB_get_link.getAddress (); 
+		inter.get_link_index = AtkHypertextCB_get_link_index.getAddress ();
+		inter.get_n_links = AtkHypertextCB_get_n_links.getAddress ();
+		ATK.memmove (iface, inter);
 		return 0;
 	}
 
 	static int /*long*/ initSelectionIfaceCB (int /*long*/ iface) {
-		AtkSelectionIface selectionIface = new AtkSelectionIface ();
-		ATK.memmove (selectionIface, iface);
-		selectionIface.is_child_selected = AtkSelectionCB_is_child_selected.getAddress ();
-		selectionIface.ref_selection = AtkSelectionCB_ref_selection.getAddress ();
-		ATK.memmove (iface, selectionIface);
+		AtkSelectionIface inter = new AtkSelectionIface ();
+		ATK.memmove (inter, iface);
+		inter.is_child_selected = AtkSelectionCB_is_child_selected.getAddress ();
+		inter.ref_selection = AtkSelectionCB_ref_selection.getAddress ();
+		ATK.memmove (iface, inter);
+		return 0;
+	}
+
+	static int /*long*/ initTableIfaceCB (int /*long*/ iface) {
+		AtkTableIface inter = new AtkTableIface ();
+		ATK.memmove (inter, iface);
+		inter.ref_at = AtkTableCB_ref_at.getAddress();
+		inter.get_index_at = AtkTableCB_get_index_at.getAddress();
+		inter.get_column_at_index = AtkTableCB_get_column_at_index.getAddress();
+		inter.get_row_at_index = AtkTableCB_get_row_at_index.getAddress();
+		inter.get_n_columns = AtkTableCB_get_n_columns.getAddress();
+		inter.get_n_rows = AtkTableCB_get_n_rows.getAddress();
+		inter.get_column_extent_at = AtkTableCB_get_column_extent_at.getAddress();
+		inter.get_row_extent_at = AtkTableCB_get_row_extent_at.getAddress();
+		inter.get_caption = AtkTableCB_get_caption.getAddress();
+		inter.get_summary = AtkTableCB_get_summary.getAddress();
+		inter.get_column_description = AtkTableCB_get_column_description.getAddress();
+		inter.get_row_description = AtkTableCB_get_row_description.getAddress();
+		inter.get_column_header = AtkTableCB_get_column_header.getAddress();
+		inter.get_row_header = AtkTableCB_get_row_header.getAddress();
+		inter.get_selected_columns = AtkTableCB_get_selected_columns.getAddress();
+		inter.get_selected_rows = AtkTableCB_get_selected_rows.getAddress();
+		inter.is_column_selected = AtkTableCB_is_column_selected.getAddress();
+		inter.is_row_selected = AtkTableCB_is_row_selected.getAddress();
+		inter.is_selected = AtkTableCB_is_selected.getAddress();
+		inter.add_column_selection = AtkTableCB_add_column_selection.getAddress();
+		inter.add_row_selection = AtkTableCB_add_row_selection.getAddress();
+		inter.remove_column_selection = AtkTableCB_remove_column_selection.getAddress();
+		inter.remove_row_selection = AtkTableCB_remove_row_selection.getAddress();
+		ATK.memmove (iface, inter);
 		return 0;
 	}
 
 	static int /*long*/ initTextIfaceCB (int /*long*/ iface) {
-		AtkTextIface textInterface = new AtkTextIface ();
-		ATK.memmove (textInterface, iface);
-		textInterface.get_caret_offset = AtkTextCB_get_caret_offset.getAddress ();
-		textInterface.get_character_at_offset = AtkTextCB_get_character_at_offset.getAddress ();
-		textInterface.get_character_count = AtkTextCB_get_character_count.getAddress ();
-		textInterface.get_n_selections = AtkTextCB_get_n_selections.getAddress ();
-		textInterface.get_selection = AtkTextCB_get_selection.getAddress ();
-		textInterface.get_text = AtkTextCB_get_text.getAddress ();
-		textInterface.get_text_after_offset = AtkTextCB_get_text_after_offset.getAddress ();
-		textInterface.get_text_at_offset = AtkTextCB_get_text_at_offset.getAddress ();
-		textInterface.get_text_before_offset = AtkTextCB_get_text_before_offset.getAddress ();
-		ATK.memmove (iface, textInterface);
+		AtkTextIface inter = new AtkTextIface ();
+		ATK.memmove (inter, iface);
+		inter.get_range_extents = AtkTextCB_get_range_extents.getAddress ();
+		inter.get_character_extents = AtkTextCB_get_character_extents.getAddress ();
+		inter.get_run_attributes= AtkTextCB_get_run_attributes.getAddress ();
+		inter.get_offset_at_point = AtkTextCB_get_offset_at_point.getAddress ();
+		inter.add_selection = AtkTextCB_add_selection.getAddress ();
+		inter.remove_selection = AtkTextCB_remove_selection.getAddress ();
+		inter.set_selection = AtkTextCB_set_selection.getAddress ();
+		inter.get_caret_offset = AtkTextCB_get_caret_offset.getAddress ();
+		inter.set_caret_offset = AtkTextCB_set_caret_offset.getAddress ();
+		inter.get_character_at_offset = AtkTextCB_get_character_at_offset.getAddress ();
+		inter.get_character_count = AtkTextCB_get_character_count.getAddress ();
+		inter.get_n_selections = AtkTextCB_get_n_selections.getAddress ();
+		inter.get_selection = AtkTextCB_get_selection.getAddress ();
+		inter.get_text = AtkTextCB_get_text.getAddress ();
+		inter.get_text_after_offset = AtkTextCB_get_text_after_offset.getAddress ();
+		inter.get_text_at_offset = AtkTextCB_get_text_at_offset.getAddress ();
+		inter.get_text_before_offset = AtkTextCB_get_text_before_offset.getAddress ();
+		inter.get_bounded_ranges = AtkTextCB_get_bounded_ranges.getAddress ();
+		ATK.memmove (iface, inter);
+		return 0;
+	}
+
+	static int /*long*/ initValueIfaceCB (int /*long*/ iface) {
+		AtkValueIface inter = new AtkValueIface ();
+		ATK.memmove (inter, iface);
+		inter.get_current_value = AtkValueCB_get_current_value.getAddress ();
+		inter.get_maximum_value = AtkValueCB_get_maximum_value.getAddress ();
+		inter.get_minimum_value = AtkValueCB_get_minimum_value.getAddress ();
+		inter.set_current_value = AtkValueCB_set_current_value.getAddress ();
+		ATK.memmove (iface, inter);
 		return 0;
 	}
 
 	static void registerAccessible (Accessible accessible) {
-		/* If DefaultParentType is 0 then OS accessibility is not active */
-		if (DefaultParentType == 0) return;
-		int /*long*/ controlHandle = accessible.getControlHandle ();
-		int /*long*/ widgetType = OS.G_OBJECT_TYPE (controlHandle);
-		AccessibleFactory factory = (AccessibleFactory) Factories.get (new LONG (widgetType));
-		if (factory == null) {
-			factory = new AccessibleFactory (widgetType);
-			Factories.put (new LONG (widgetType), factory);
+		int /*long*/ widget = accessible.getControlHandle ();
+		int /*long*/ widgetType = OS.G_OBJECT_TYPE (widget);
+		int /*long*/ registry = ATK.atk_get_default_registry ();
+		int /*long*/ factory = ATK.atk_registry_get_factory (registry, widgetType);
+		/* If NO_OP factory is registered then OS accessibility is not active */
+		if (ATK.ATK_IS_NO_OP_OBJECT_FACTORY(factory)) return;
+		String name = FACTORY_TYPENAME + getTypeName(widgetType);
+		byte[] factoryName = Converter.wcsToMbcs(null, name, true);
+		if (OS.g_type_from_name (factoryName) == 0) {
+			if (AccessibleObject.DEBUG) AccessibleObject.print("-->New Factory=" + name); //$NON-NLS-1$
+			/* register the factory */
+			GTypeInfo typeInfo = new GTypeInfo ();
+			typeInfo.base_init = GTypeInfo_base_init_factory.getAddress ();
+			typeInfo.class_size = (short)ATK.AtkObjectFactoryClass_sizeof ();
+			typeInfo.instance_size = (short)ATK.AtkObjectFactory_sizeof ();
+			int /*long*/ info = OS.g_malloc (GTypeInfo.sizeof); 
+			OS.memmove (info, typeInfo, GTypeInfo.sizeof); 
+			int /*long*/ swtFactoryType = OS.g_type_register_static (ATK.ATK_TYPE_OBJECT_FACTORY(), factoryName, info, 0);
+			int /*long*/ parentType = ATK.atk_object_factory_get_accessible_type(factory);
+			ATK.atk_registry_set_factory_type (registry, widgetType, swtFactoryType);
+			Factories.put (new LONG (widgetType), new LONG (parentType));
 		}
-		factory.addAccessible (accessible);
-	}
-	
-	void removeAccessible (Accessible accessible) {
-		accessibles.remove (new LONG (accessible.getControlHandle ()));
+		if (AccessibleObject.DEBUG) AccessibleObject.print("-->Register=" + accessible.control + " " + widget); //$NON-NLS-1$
+		Accessibles.put (new LONG (widget), accessible);
 	}
 	
 	static void unregisterAccessible (Accessible accessible) {
-		int /*long*/ controlHandle = accessible.getControlHandle ();
-		int /*long*/ widgetType = OS.G_OBJECT_TYPE (controlHandle);
-		AccessibleFactory factory = (AccessibleFactory) Factories.get (new LONG (widgetType));
-		if (factory != null) {
-			factory.removeAccessible (accessible);
-		}
+		int /*long*/ widget = accessible.getControlHandle ();
+		Accessibles.remove (new LONG (widget));
+		if (AccessibleObject.DEBUG) AccessibleObject.print("-->Deregister=" + accessible.control + " " + widget); //$NON-NLS-1$
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
index 1293d93..ec4c646 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,18 +12,20 @@ package org.eclipse.swt.accessibility;
 
 
 import java.util.*;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.accessibility.gtk.*;
 import org.eclipse.swt.internal.gtk.*;
-import org.eclipse.swt.widgets.*;
 
 class AccessibleObject {
 	int /*long*/ handle;
-	int /*long*/ parentType;
 	int index = -1, id = ACC.CHILDID_SELF;
 	Accessible accessible;
 	AccessibleObject parent;
-	Hashtable children = new Hashtable (9);
+	AccessibleObject[] children;
 	/*
 	* a lightweight object does not correspond to a concrete gtk widget, but
 	* to a logical child of a widget (eg.- a CTabItem, which is simply drawn)
@@ -35,1144 +37,2990 @@ class AccessibleObject {
 	static int /*long*/ keybindingPtr = -1;
 	static int /*long*/ namePtr = -1;
 	static final Hashtable AccessibleObjects = new Hashtable (9);
-	static final int /*long*/ ATK_ACTION_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkAction", true));
-	static final int /*long*/ ATK_COMPONENT_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkComponent", true));
-	static final int /*long*/ ATK_HYPERTEXT_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkHypertext", true));
-	static final int /*long*/ ATK_SELECTION_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkSelection", true));		
-	static final int /*long*/ ATK_TEXT_TYPE = ATK.g_type_from_name (Converter.wcsToMbcs (null, "AtkText", true));
-	static final boolean DEBUG = Display.DEBUG;
-
-	AccessibleObject (int /*long*/ type, int /*long*/ widget, Accessible accessible, int /*long*/ parentType, boolean isLightweight) {
+	static final boolean DEBUG = Device.DEBUG;
+	
+	static final int ROW_ROLE, COLUMN_ROLE;
+	static {
+		ROW_ROLE = ATK.atk_role_register(Converter.wcsToMbcs(null, "row", true)); //$NON-NLS-1$
+		COLUMN_ROLE = ATK.atk_role_register(Converter.wcsToMbcs(null, "column", true)); //$NON-NLS-1$
+	}
+
+	AccessibleObject (int /*long*/ type, int /*long*/ widget, Accessible accessible, boolean isLightweight) {
 		super ();
 		handle = ATK.g_object_new (type, 0);
-		this.parentType = parentType;
 		ATK.atk_object_initialize (handle, widget);
 		this.accessible = accessible;
 		this.isLightweight = isLightweight;
 		AccessibleObjects.put (new LONG (handle), this);
-		if (DEBUG) System.out.println("new AccessibleObject: " + handle);
+		if (DEBUG) print("new AccessibleObject: " + handle + " control=" + accessible.control + " lw=" + isLightweight);
+	}
+	
+	static void print (String str) {
+		System.out.println (str);
+	}
+	
+	static AtkActionIface getActionIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_ACTION())) {
+			AtkActionIface iface = new AtkActionIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
+	
+	static int /*long*/ atkAction_do_action (int /*long*/ atkObject, int /*long*/ index) {
+		if (DEBUG) print ("-->atkAction_do_action");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleActionListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
+				event.index = (int)/*64*/index;
+				for (int i = 0; i < length; i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) listeners.elementAt(i);
+					listener.doAction(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkActionIface iface = getActionIface (atkObject);
+		if (iface != null && iface.do_action != 0) {
+			parentResult = ATK.call (iface.do_action, atkObject, index);
+		}
+		return parentResult; 	
 	}
 
-	void addChild (AccessibleObject child) {
-		children.put (new LONG (child.handle), child);		
-		child.setParent (this);
+	static int /*long*/ atkAction_get_n_actions (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkAction_get_n_actions");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleActionListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) listeners.elementAt(i);
+					listener.getActionCount(event);
+				}
+				return event.count;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkActionIface iface = getActionIface (atkObject);
+		if (iface != null && iface.get_n_actions != 0) {
+			parentResult = ATK.call (iface.get_n_actions, atkObject);
+		}
+		return parentResult; 	
+	}
+	
+	static int /*long*/ atkAction_get_description (int /*long*/ atkObject, int /*long*/ index) {
+		if (DEBUG) print ("-->atkAction_get_description");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleActionListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
+				event.index = (int)/*64*/index;
+				for (int i = 0; i < length; i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) listeners.elementAt(i);
+					listener.getDescription(event);
+				}
+				if (event.result == null) return 0;
+				if (descriptionPtr != -1) OS.g_free (descriptionPtr);
+				return descriptionPtr = getStringPtr (event.result);
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkActionIface iface = getActionIface (atkObject);
+		if (iface != null && iface.get_description != 0) {
+			parentResult = ATK.call (iface.get_description, atkObject, index);
+		}
+		return parentResult; 	
 	}
 	
 	static int /*long*/ atkAction_get_keybinding (int /*long*/ atkObject, int /*long*/ index) {
-		if (DEBUG) System.out.println ("-->atkAction_get_keybinding");
+		if (DEBUG) print ("-->atkAction_get_keybinding");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_ACTION_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (object.handle));
-			AtkActionIface actionIface = new AtkActionIface ();
-			ATK.memmove (actionIface, superType);
-			if (actionIface.get_keybinding != 0) {
-				parentResult = ATK.call (actionIface.get_keybinding, object.handle, index);
-			}
-		}
-		AccessibleListener[] listeners = object.getAccessibleListeners ();
-		if (listeners.length == 0) return parentResult;
-
-		AccessibleEvent event = new AccessibleEvent (object.accessible);
-		event.childID = object.id;
-		if (parentResult != 0) {
-			int length = OS.strlen (parentResult);
-			byte [] buffer = new byte [length];
-			OS.memmove (buffer, parentResult, length);
-			event.result = new String (Converter.mbcsToWcs (null, buffer));
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getKeyboardShortcut (event);	
-		} 
-		if (event.result == null) return parentResult;
-		if (keybindingPtr != -1) OS.g_free (keybindingPtr);
-		byte[] name = Converter.wcsToMbcs (null, event.result, true);
-		keybindingPtr = OS.g_malloc (name.length);
-		OS.memmove (keybindingPtr, name, name.length);
-		return keybindingPtr; 	
+		AtkActionIface iface = getActionIface (atkObject);
+		if (iface != null && iface.get_keybinding != 0) {
+			parentResult = ATK.call (iface.get_keybinding, atkObject, index);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleActionListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
+				event.index = (int)/*64*/index;
+				for (int i = 0; i < length; i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) listeners.elementAt(i);
+					listener.getKeyBinding(event);
+				}
+				if (event.result != null) {
+					if (keybindingPtr != -1) OS.g_free (keybindingPtr);
+					return keybindingPtr = getStringPtr (event.result); 
+				}
+			}
+			listeners = accessible.accessibleListeners;
+			length = listeners.size();
+			if (length > 0) {
+				AccessibleEvent event = new AccessibleEvent (accessible);
+				event.childID = object.id;
+				if (parentResult != 0) event.result = getString (parentResult);
+				for (int i = 0; i < length; i++) {
+					AccessibleListener listener = (AccessibleListener) listeners.elementAt(i);
+					listener.getKeyboardShortcut (event);				
+				} 
+				if (event.result != null) {
+					if (keybindingPtr != -1) OS.g_free (keybindingPtr);
+					return keybindingPtr = getStringPtr (event.result); 
+				}
+			}
+		}
+		return parentResult;
 	}
 
 	static int /*long*/ atkAction_get_name (int /*long*/ atkObject, int /*long*/ index) {
-		if (DEBUG) System.out.println ("-->atkAction_get_name");
+		if (DEBUG) print ("-->atkAction_get_name");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_ACTION_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_ACTION_GET_IFACE (object.handle));
-			AtkActionIface actionIface = new AtkActionIface ();
-			ATK.memmove (actionIface, superType);
-			if (actionIface.get_name != 0) {
-				parentResult = ATK.call (actionIface.get_name, object.handle, index);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		if (parentResult != 0) {
-			int length = OS.strlen (parentResult);
-			byte [] buffer = new byte [length];
-			OS.memmove (buffer, parentResult, length);
-			event.result = new String (Converter.mbcsToWcs (null, buffer));
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getDefaultAction (event);				
-		} 
-		if (event.result == null) return parentResult;
-		if (actionNamePtr != -1) OS.g_free (actionNamePtr);
-		byte[] name = Converter.wcsToMbcs (null, event.result, true);
-		actionNamePtr = OS.g_malloc (name.length);
-		OS.memmove (actionNamePtr, name, name.length);
-		return actionNamePtr;
-	}	
+		AtkActionIface iface = getActionIface (atkObject);
+		if (iface != null && iface.get_name != 0) {
+			parentResult = ATK.call (iface.get_name, atkObject, index);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleActionListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
+				event.index = (int)/*64*/index;
+				for (int i = 0; i < length; i++) {
+					AccessibleActionListener listener = (AccessibleActionListener) listeners.elementAt(i);
+					listener.getName(event);
+				}
+				if (event.result != null) {
+					if (actionNamePtr != -1) OS.g_free (actionNamePtr);
+					return actionNamePtr = getStringPtr (event.result);
+				}
+			}
+			if (index == 0) {
+				listeners = accessible.accessibleControlListeners;
+				length = listeners.size();
+				if (length > 0) {
+					AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+					event.childID = object.id;
+					if (parentResult != 0) event.result = getString (parentResult);
+					for (int i = 0; i < length; i++) {
+						AccessibleControlListener listener = (AccessibleControlListener) listeners.elementAt(i);
+						listener.getDefaultAction (event);				
+					} 
+					if (event.result != null) {
+						if (actionNamePtr != -1) OS.g_free (actionNamePtr);
+						return actionNamePtr = getStringPtr (event.result);
+					}
+				}
+			}
+		}
+		return parentResult;
+	}
+	
+	static AtkComponentIface getComponentIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_COMPONENT())) {
+			AtkComponentIface iface = new AtkComponentIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
 
 	static int /*long*/ atkComponent_get_extents (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ width, int /*long*/ height, int /*long*/ coord_type) {
-		if (DEBUG) System.out.println ("-->atkComponent_get_extents");
+		if (DEBUG) print ("-->atkComponent_get_extents: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		OS.memmove (x, new int[] {0}, 4);
 		OS.memmove (y, new int[] {0}, 4);
 		OS.memmove (width, new int[] {0}, 4);
 		OS.memmove (height, new int[] {0}, 4);
-		if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
-			AtkComponentIface componentIface = new AtkComponentIface ();
-			ATK.memmove (componentIface, superType);
-			if (componentIface.get_extents != 0) {
-				ATK.call (componentIface.get_extents, object.handle, x, y, width, height, coord_type);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return 0;
-		
-		int[] parentX = new int [1], parentY = new int [1];
-		int[] parentWidth = new int [1], parentHeight = new int [1];
-		OS.memmove (parentX, x, 4);
-		OS.memmove (parentY, y, 4);
-		OS.memmove (parentWidth, width, 4);
-		OS.memmove (parentHeight, height, 4);
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.x = parentX [0]; event.y = parentY [0];
-		event.width = parentWidth [0]; event.height = parentHeight [0];
-		if (coord_type == ATK.ATK_XY_WINDOW) {
-			/* translate control -> display, for filling in event to be dispatched */
-			int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle);
-			GtkAccessible gtkAccessible = new GtkAccessible ();
-			ATK.memmove (gtkAccessible, gtkAccessibleHandle);
-			int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);				
-			int[] topWindowX = new int [1], topWindowY = new int [1];
-			OS.gdk_window_get_origin (window, topWindowX, topWindowY);
-			event.x += topWindowX [0];
-			event.y += topWindowY [0]; 
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getLocation (event);
-		}
-		if (coord_type == ATK.ATK_XY_WINDOW) {
-			/* translate display -> control, for answering to the OS */ 
-			int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle);
-			GtkAccessible gtkAccessible = new GtkAccessible ();
-			ATK.memmove (gtkAccessible, gtkAccessibleHandle);
-			int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);
-			int[] topWindowX = new int [1], topWindowY = new int [1];
-			OS.gdk_window_get_origin (window, topWindowX, topWindowY);
-			event.x -= topWindowX [0];
-			event.y -= topWindowY [0];
-		}
-		OS.memmove (x, new int[] {event.x}, 4);
-		OS.memmove (y, new int[] {event.y}, 4);
-		OS.memmove (width, new int[] {event.width}, 4);
-		OS.memmove (height, new int[] {event.height}, 4);
+		AtkComponentIface iface = getComponentIface (atkObject);
+		if (iface != null && iface.get_extents != 0) {
+			ATK.call (iface.get_extents, atkObject, x, y, width, height, coord_type);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int[] parentX = new int [1], parentY = new int [1];
+				int[] parentWidth = new int [1], parentHeight = new int [1];
+				OS.memmove (parentX, x, 4);
+				OS.memmove (parentY, y, 4);
+				OS.memmove (parentWidth, width, 4);
+				OS.memmove (parentHeight, height, 4);
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.x = parentX [0]; event.y = parentY [0];
+				event.width = parentWidth [0]; event.height = parentHeight [0];
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x += topWindowX [0];
+					event.y += topWindowY [0]; 
+				}
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getLocation (event);
+				}
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					event.x -= topWindowX [0];
+					event.y -= topWindowY [0];
+				}
+				OS.memmove (x, new int[] {event.x}, 4);
+				OS.memmove (y, new int[] {event.y}, 4);
+				OS.memmove (width, new int[] {event.width}, 4);
+				OS.memmove (height, new int[] {event.height}, 4);
+				if (DEBUG) print("--->" + event.x + "," + event.y + "," + event.width + "x" + event.height);
+			}
+		}
 		return 0;
 	}
 
 	static int /*long*/ atkComponent_get_position (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ coord_type) {
-		if (DEBUG) System.out.println ("-->atkComponent_get_position, object: " + atkObject + " x: " + x + " y: " + y + " coord: " + coord_type);
+		if (DEBUG) print ("-->atkComponent_get_position, object: " + atkObject + " x: " + x + " y: " + y + " coord: " + coord_type);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		OS.memmove (x, new int[] {0}, 4);
 		OS.memmove (y, new int[] {0}, 4);
-		if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
-			AtkComponentIface componentIface = new AtkComponentIface ();
-			ATK.memmove (componentIface, superType);
-			if (componentIface.get_extents != 0) {
-				ATK.call (componentIface.get_position, object.handle, x, y, coord_type);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return 0;
-		
-		int[] parentX = new int [1], parentY = new int [1];
-		OS.memmove (parentX, x, 4);
-		OS.memmove (parentY, y, 4);
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.x = parentX [0]; event.y = parentY [0];
-		if (coord_type == ATK.ATK_XY_WINDOW) {
-			/* translate control -> display, for filling in event to be dispatched */
-			int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle);
-			GtkAccessible gtkAccessible = new GtkAccessible ();
-			ATK.memmove (gtkAccessible, gtkAccessibleHandle);
-			int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);				
-			int[] topWindowX = new int [1], topWindowY = new int [1];
-			OS.gdk_window_get_origin (window, topWindowX, topWindowY);
-			event.x += topWindowX [0];
-			event.y += topWindowY [0]; 
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getLocation (event);
-		}
-		if (coord_type == ATK.ATK_XY_WINDOW) {
-			/* translate display -> control, for answering to the OS */ 
-			int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle);
-			GtkAccessible gtkAccessible = new GtkAccessible ();
-			ATK.memmove (gtkAccessible, gtkAccessibleHandle);
-			int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);
-			int[] topWindowX = new int [1], topWindowY = new int [1];
-			OS.gdk_window_get_origin (window, topWindowX, topWindowY);
-			event.x -= topWindowX [0];
-			event.y -= topWindowY [0];
-		}
-		OS.memmove (x, new int[] {event.x}, 4);
-		OS.memmove (y, new int[] {event.y}, 4);
+		AtkComponentIface iface = getComponentIface (atkObject);
+		if (iface != null && iface.get_position != 0) {
+			ATK.call (iface.get_position, atkObject, x, y, coord_type);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int[] parentX = new int [1], parentY = new int [1];
+				OS.memmove (parentX, x, 4);
+				OS.memmove (parentY, y, 4);
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.x = parentX [0]; event.y = parentY [0];
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x += topWindowX [0];
+					event.y += topWindowY [0]; 
+				}
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getLocation (event);
+				}
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					event.x -= topWindowX [0];
+					event.y -= topWindowY [0];
+				}
+				OS.memmove (x, new int[] {event.x}, 4);
+				OS.memmove (y, new int[] {event.y}, 4);
+			}
+		}
 		return 0;
 	}
 
 	static int /*long*/ atkComponent_get_size (int /*long*/ atkObject, int /*long*/ width, int /*long*/ height, int /*long*/ coord_type) {
-		if (DEBUG) System.out.println ("-->atkComponent_get_size");
+		if (DEBUG) print ("-->atkComponent_get_size");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		OS.memmove (width, new int[] {0}, 4);
 		OS.memmove (height, new int[] {0}, 4);
-		if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
-			AtkComponentIface componentIface = new AtkComponentIface ();
-			ATK.memmove (componentIface, superType);
-			if (componentIface.get_extents != 0) {
-				ATK.call (componentIface.get_size, object.handle, width, height, coord_type);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return 0;
-		
-		int[] parentWidth = new int [1], parentHeight = new int [1];
-		OS.memmove (parentWidth, width, 4);
-		OS.memmove (parentHeight, height, 4);
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.width = parentWidth [0]; event.height = parentHeight [0];
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getLocation (event);
-		}
-		OS.memmove (width, new int[] {event.width}, 4);
-		OS.memmove (height, new int[] {event.height}, 4);
+		AtkComponentIface iface = getComponentIface (atkObject);
+		if (iface != null && iface.get_size != 0) {
+			ATK.call (iface.get_size, atkObject, width, height, coord_type);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int[] parentWidth = new int [1], parentHeight = new int [1];
+				OS.memmove (parentWidth, width, 4);
+				OS.memmove (parentHeight, height, 4);
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.width = parentWidth [0]; event.height = parentHeight [0];
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getLocation (event);
+				}
+				OS.memmove (width, new int[] {event.width}, 4);
+				OS.memmove (height, new int[] {event.height}, 4);
+			}
+		}
 		return 0;
 	}
 
 	static int /*long*/ atkComponent_ref_accessible_at_point (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ coord_type) {
-		if (DEBUG) System.out.println ("-->atkComponent_ref_accessible_at_point");
+		if (DEBUG) print ("-->atkComponent_ref_accessible_at_point: " + atkObject + " " + x + "," + y);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.x = (int)/*64*/x; event.y = (int)/*64*/y;
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x += topWindowX [0];
+					event.y += topWindowY [0]; 
+				}
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getChildAtPoint (event);				
+				}
+				if (event.childID == object.id) event.childID = ACC.CHILDID_SELF;
+				Accessible result = event.accessible;
+				AccessibleObject accObj = result != null ? result.getAccessibleObject() : object.getChildByID (event.childID);
+				if (accObj != null) {
+					return OS.g_object_ref (accObj.handle);	
+				}
+			}
+		}
 		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_COMPONENT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_COMPONENT_GET_IFACE (object.handle));
-			AtkComponentIface componentIface = new AtkComponentIface ();
-			ATK.memmove (componentIface, superType);
-			if (componentIface.ref_accessible_at_point != 0) {
-				parentResult = ATK.call (componentIface.ref_accessible_at_point, object.handle, x, y, coord_type);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-		
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.x = (int)/*64*/x; event.y = (int)/*64*/y;
-		if (coord_type == ATK.ATK_XY_WINDOW) {
-			/* translate control -> display, for filling in the event to be dispatched */
-			int /*long*/ gtkAccessibleHandle = ATK.GTK_ACCESSIBLE (object.handle);
-			GtkAccessible gtkAccessible = new GtkAccessible ();
-			ATK.memmove (gtkAccessible, gtkAccessibleHandle);
-			int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);				
-			int[] topWindowX = new int [1], topWindowY = new int [1];
-			OS.gdk_window_get_origin (window, topWindowX, topWindowY);
-			event.x += topWindowX [0];
-			event.y += topWindowY [0]; 
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getChildAtPoint (event);				
-		}
-		if (event.childID == object.id) event.childID = ACC.CHILDID_SELF;
-		AccessibleObject accObj = object.getChildByID (event.childID);
-		if (accObj != null) {
-			if (parentResult > 0) OS.g_object_unref (parentResult);
-			OS.g_object_ref (accObj.handle);	
-			return accObj.handle;
+		AtkComponentIface iface = getComponentIface (atkObject);
+		if (iface != null && iface.ref_accessible_at_point != 0) {
+			parentResult = ATK.call (iface.ref_accessible_at_point, atkObject, x, y, coord_type);
 		}
 		return parentResult;
 	}	
 
+	static AtkHypertextIface getHypertextIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_HYPERTEXT())) {
+			AtkHypertextIface iface = new AtkHypertextIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_HYPERTEXT_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
+	
 	static int /*long*/ atkHypertext_get_link (int /*long*/ atkObject, int /*long*/ link_index) {
-		if (DEBUG) System.out.println ("-->atkHypertext_get_link");
-		return 0;
+		if (DEBUG) print ("-->atkHypertext_get_link");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.index = (int)/*int*/link_index;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getHyperlink(event);
+				}
+				Accessible result = event.accessible;
+				return result != null ? result.getAccessibleObject().handle : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkHypertextIface iface = getHypertextIface (atkObject);
+		if (iface != null && iface.get_link != 0) {
+			parentResult = ATK.call (iface.get_link, atkObject, link_index);
+		}
+		return parentResult;
 	}
 
 	static int /*long*/ atkHypertext_get_n_links (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkHypertext_get_n_links");
-		return 0;	/* read hyperlink's name */
+		if (DEBUG) print ("-->atkHypertext_get_n_links");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getHyperlinkCount(event);
+				}
+				return event.count;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkHypertextIface iface = getHypertextIface (atkObject);
+		if (iface != null && iface.get_n_links != 0) {
+			parentResult = ATK.call (iface.get_n_links, atkObject);
+		}
+		return parentResult;
 	}
 
 	static int /*long*/ atkHypertext_get_link_index (int /*long*/ atkObject, int /*long*/ char_index) {
-		if (DEBUG) System.out.println ("-->atkHypertext_get_link_index");
-		return 0;
+		if (DEBUG) print ("-->atkHypertext_get_link_index");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.offset = (int)/*int*/char_index;
+				event.index = -1;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getHyperlinkIndex(event);
+				}
+				return event.index;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkHypertextIface iface = getHypertextIface (atkObject);
+		if (iface != null && iface.get_link_index != 0) {
+			parentResult = ATK.call (iface.get_link_index, atkObject, char_index);
+		}
+		return parentResult;
+	}
+	
+	static AtkObjectClass getObjectClass (int /*long*/ atkObject) {
+		AtkObjectClass objectClass = new AtkObjectClass ();
+		ATK.memmove (objectClass, ATK.g_type_class_peek (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject))));
+		return objectClass;
 	}
 
 	static int /*long*/ atkObject_get_description (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_get_description");
+		if (DEBUG) print ("-->atkObject_get_description: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_description != 0) {
-			parentResult = ATK.call (objectClass.get_description, object.handle);
-		}
-		AccessibleListener[] listeners = object.getAccessibleListeners ();
-		if (listeners.length == 0) return parentResult;
-			
-		AccessibleEvent event = new AccessibleEvent (object.accessible);
-		event.childID = object.id;
-		if (parentResult != 0) {
-			int length = OS.strlen (parentResult);
-			byte [] buffer = new byte [length];
-			OS.memmove (buffer, parentResult, length);
-			event.result = new String (Converter.mbcsToWcs (null, buffer));
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getDescription (event);
-		} 
-		if (event.result == null) return parentResult;
-		if (descriptionPtr != -1) OS.g_free (descriptionPtr);
-		byte[] name = Converter.wcsToMbcs (null, event.result, true);
-		descriptionPtr = OS.g_malloc (name.length);
-		OS.memmove (descriptionPtr, name, name.length);
-		return descriptionPtr; 
+			parentResult = ATK.call (objectClass.get_description, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleEvent event = new AccessibleEvent (accessible);
+				event.childID = object.id;
+				if (parentResult != 0) event.result = getString (parentResult);
+				for (int i = 0; i < length; i++) {
+					AccessibleListener listener = (AccessibleListener)listeners.elementAt (i);
+					listener.getDescription (event);
+				}
+				if (DEBUG) print ("---> " + event.result);
+				if (event.result == null) return parentResult;
+				if (descriptionPtr != -1) OS.g_free (descriptionPtr);
+				return descriptionPtr = getStringPtr (event.result);
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkObject_get_attributes (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkObject_get_attributes: " + atkObject);
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkObjectClass objectClass = getObjectClass (atkObject);
+		if (objectClass.get_attributes != 0) {
+			parentResult = ATK.call (objectClass.get_attributes, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleAttributeListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleAttributeEvent event = new AccessibleAttributeEvent (accessible);
+				event.topMargin = event.bottomMargin = event.leftMargin = event.rightMargin = event.alignment = event.indent = -1;
+				for (int i = 0; i < length; i++) {
+					AccessibleAttributeListener listener = (AccessibleAttributeListener)listeners.elementAt (i);
+					listener.getAttributes (event);
+				}
+				AtkAttribute attr = new AtkAttribute();
+				if (event.leftMargin != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_LEFT_MARGIN));
+					attr.value = getStringPtr (String.valueOf(event.leftMargin));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (event.rightMargin != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_RIGHT_MARGIN));
+					attr.value = getStringPtr (String.valueOf(event.rightMargin));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (event.topMargin != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = getStringPtr ("top-margin"); //$NON-NLS-1$
+					attr.value = getStringPtr (String.valueOf(event.topMargin));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (event.bottomMargin != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = getStringPtr ("bottom-margin"); //$NON-NLS-1$
+					attr.value = getStringPtr (String.valueOf(event.bottomMargin));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (event.indent != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_INDENT));
+					attr.value = getStringPtr (String.valueOf(event.indent));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (event.justify) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_JUSTIFICATION));
+					attr.value = getStringPtr ("fill"); //$NON-NLS-1$
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				} else if (event.alignment != -1) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_JUSTIFICATION));
+					String str = "left"; //$NON-NLS-1$
+					switch (event.alignment) {
+						case SWT.LEFT: str = "left"; break; //$NON-NLS-1$
+						case SWT.RIGHT: str = "right"; break; //$NON-NLS-1$
+						case SWT.CENTER: str = "center"; break; //$NON-NLS-1$
+					}
+					attr.value = getStringPtr (str);
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				//TODO - tabStops
+				if (event.attributes != null) {
+					int end = event.attributes.length / 2 * 2;
+					for (int i = 0; i < end; i+= 2) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = getStringPtr (event.attributes[i]);
+						attr.value = getStringPtr (event.attributes[i + 1]);
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						parentResult = OS.g_slist_append(parentResult, attrPtr);
+					}
+				}
+			}
+		}
+		return parentResult;
 	}
 
 	static int /*long*/ atkObject_get_name (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_get_name: " + atkObject);
+		if (DEBUG) print ("-->atkObject_get_name: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_name != 0) {
-			parentResult = ATK.call (objectClass.get_name, object.handle);
-		}
-		AccessibleListener[] listeners = object.getAccessibleListeners ();
-		if (listeners.length == 0) return parentResult;
-		
-		AccessibleEvent event = new AccessibleEvent (object.accessible);
-		event.childID = object.id;
-		if (parentResult != 0) {
-			int length = OS.strlen (parentResult);
-			byte [] buffer = new byte [length];
-			OS.memmove (buffer, parentResult, length);
-			event.result = new String (Converter.mbcsToWcs (null, buffer));
-		}
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getName (event);				
-		} 
-		if (event.result == null) return parentResult;
-		if (namePtr != -1) OS.g_free (namePtr);
-		byte[] name = Converter.wcsToMbcs (null, event.result, true);
-		namePtr = OS.g_malloc (name.length);
-		OS.memmove (namePtr, name, name.length);
-		return namePtr; 
+			parentResult = ATK.call (objectClass.get_name, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleEvent event = new AccessibleEvent (accessible);
+				event.childID = object.id;
+				if (parentResult != 0) event.result = getString (parentResult);
+				for (int i = 0; i < length; i++) {
+					AccessibleListener listener = (AccessibleListener)listeners.elementAt (i);
+					listener.getName (event);				
+				}
+				if (DEBUG) print ("---> " + event.result);
+				if (event.result == null) return parentResult;
+				if (namePtr != -1) OS.g_free (namePtr);
+				return namePtr = getStringPtr (event.result);
+			}
+		}
+		return parentResult;
 	}	
 
 	static int /*long*/ atkObject_get_n_children (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_get_n_children: " + atkObject);
+		if (DEBUG) print ("-->atkObject_get_n_children: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_n_children != 0) { 
-			parentResult = ATK.call (objectClass.get_n_children, object.handle);
+			parentResult = ATK.call (objectClass.get_n_children, atkObject);
+		}
+		if (object != null && object.id == ACC.CHILDID_SELF) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.detail = (int)/*64*/parentResult;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getChildCount (event);
+				}
+				if (DEBUG) print ("--->" + event.detail);
+				return event.detail;
+			}
 		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-			
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.detail = (int)/*64*/parentResult;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getChildCount (event);
-		} 
-		return event.detail;
+		return parentResult;
 	}
 
 	static int /*long*/ atkObject_get_index_in_parent (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObjectCB_get_index_in_parent.  ");
+		if (DEBUG) print ("-->atkObject_get_index_in_parent: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		if (object.index != -1) return object.index;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			AccessibleControlEvent event = new AccessibleControlEvent(accessible);
+			event.childID = ACC.CHILDID_CHILD_INDEX;
+			event.detail = -1;
+			for (int i = 0; i < listeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) listeners.elementAt(i);
+				listener.getChild(event);
+			}
+			if (event.detail != -1) {
+				if (DEBUG) print ("---> " + object.index);
+				return event.detail;
+			}
+			if (object.index != -1) {
+				if (DEBUG) print ("---> " + object.index);
+				return object.index;
+			}
+		}
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_index_in_parent == 0) return 0;
-		return ATK.call (objectClass.get_index_in_parent,object. handle);
+		int /*long*/ result = ATK.call (objectClass.get_index_in_parent, atkObject);
+		if (DEBUG) print ("---*> " + result);
+		return result;
 	}
 
 	static int /*long*/ atkObject_get_parent (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_get_parent: " + atkObject);
+		if (DEBUG) print ("-->atkObject_get_parent: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		if (object.parent != null) return object.parent.handle;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		if (object != null) {
+			if (object.parent != null) {
+				if (DEBUG) print ("---> " + object.parent.accessible.accessibleObject.handle);
+				return object.parent.handle;
+			}
+		}
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_parent == 0) return 0;
-		return ATK.call (objectClass.get_parent, object.handle);
+		int /*long*/ parentResult = ATK.call (objectClass.get_parent, atkObject);
+		if (DEBUG) print ("---> " + parentResult);
+		return parentResult;
 	}
 
 	static int /*long*/ atkObject_get_role (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_get_role: " + atkObject);
+		if (DEBUG) print ("-->atkObject_get_role: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		if (object.getAccessibleListeners ().length != 0) {
-			AccessibleControlListener[] listeners = object.getControlListeners ();
-			AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-			event.childID = object.id;
-			event.detail = -1;
-			for (int i = 0; i < listeners.length; i++) {
-				listeners [i].getRole (event);				
-			} 
-			if (event.detail != -1) {
-				switch (event.detail) {
-					/* Convert from win32 role values to atk role values */
-					case ACC.ROLE_CHECKBUTTON: return ATK.ATK_ROLE_CHECK_BOX;
-					case ACC.ROLE_CLIENT_AREA: return ATK.ATK_ROLE_DRAWING_AREA;
-					case ACC.ROLE_COMBOBOX: return ATK.ATK_ROLE_COMBO_BOX;
-					case ACC.ROLE_DIALOG: return ATK.ATK_ROLE_DIALOG;
-					case ACC.ROLE_LABEL: return ATK.ATK_ROLE_LABEL;
-					case ACC.ROLE_LINK: return ATK.ATK_ROLE_TEXT;
-					case ACC.ROLE_LIST: return ATK.ATK_ROLE_LIST;
-					case ACC.ROLE_LISTITEM: return ATK.ATK_ROLE_LIST_ITEM;
-					case ACC.ROLE_MENU: return ATK.ATK_ROLE_MENU;
-					case ACC.ROLE_MENUBAR: return ATK.ATK_ROLE_MENU_BAR;
-					case ACC.ROLE_MENUITEM: return ATK.ATK_ROLE_MENU_ITEM;
-					case ACC.ROLE_PROGRESSBAR: return ATK.ATK_ROLE_PROGRESS_BAR;
-					case ACC.ROLE_PUSHBUTTON: return ATK.ATK_ROLE_PUSH_BUTTON;
-					case ACC.ROLE_SCROLLBAR: return ATK.ATK_ROLE_SCROLL_BAR;
-					case ACC.ROLE_SEPARATOR: return ATK.ATK_ROLE_SEPARATOR;
-					case ACC.ROLE_SLIDER: return ATK.ATK_ROLE_SLIDER;
-					case ACC.ROLE_TABLE: return ATK.ATK_ROLE_LIST;
-					case ACC.ROLE_TABLECELL: return ATK.ATK_ROLE_LIST_ITEM;
-					case ACC.ROLE_TABLECOLUMNHEADER: return ATK.ATK_ROLE_TABLE_COLUMN_HEADER;
-					case ACC.ROLE_TABLEROWHEADER: return ATK.ATK_ROLE_TABLE_ROW_HEADER;
-					case ACC.ROLE_TABFOLDER: return ATK.ATK_ROLE_PAGE_TAB_LIST;
-					case ACC.ROLE_TABITEM: return ATK.ATK_ROLE_PAGE_TAB;
-					case ACC.ROLE_TEXT: return ATK.ATK_ROLE_TEXT;
-					case ACC.ROLE_TOOLBAR: return ATK.ATK_ROLE_TOOL_BAR;
-					case ACC.ROLE_TOOLTIP: return ATK.ATK_ROLE_TOOL_TIP;
-					case ACC.ROLE_TREE: return ATK.ATK_ROLE_TREE;
-					case ACC.ROLE_TREEITEM: return ATK.ATK_ROLE_LIST_ITEM;
-					case ACC.ROLE_RADIOBUTTON: return ATK.ATK_ROLE_RADIO_BUTTON;
-					case ACC.ROLE_SPLITBUTTON: return ATK.ATK_ROLE_PUSH_BUTTON;
-					case ACC.ROLE_WINDOW: return ATK.ATK_ROLE_WINDOW;
-				}
-			}
-		} 
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.detail = -1;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getRole (event);				
+				}
+				if (DEBUG) print ("---> " + event.detail);
+				if (event.detail != -1) {
+					switch (event.detail) {
+						/* Convert from win32 role values to atk role values */
+						case ACC.ROLE_CHECKBUTTON: return ATK.ATK_ROLE_CHECK_BOX;
+						case ACC.ROLE_CLIENT_AREA: return ATK.ATK_ROLE_DRAWING_AREA;
+						case ACC.ROLE_COMBOBOX: return ATK.ATK_ROLE_COMBO_BOX;
+						case ACC.ROLE_DIALOG: return ATK.ATK_ROLE_DIALOG;
+						case ACC.ROLE_LABEL: return ATK.ATK_ROLE_LABEL;
+						case ACC.ROLE_LINK: return ATK.ATK_ROLE_TEXT;
+						case ACC.ROLE_LIST: return ATK.ATK_ROLE_LIST;
+						case ACC.ROLE_LISTITEM: return ATK.ATK_ROLE_LIST_ITEM;
+						case ACC.ROLE_MENU: return ATK.ATK_ROLE_MENU;
+						case ACC.ROLE_MENUBAR: return ATK.ATK_ROLE_MENU_BAR;
+						case ACC.ROLE_MENUITEM: return ATK.ATK_ROLE_MENU_ITEM;
+						case ACC.ROLE_PROGRESSBAR: return ATK.ATK_ROLE_PROGRESS_BAR;
+						case ACC.ROLE_PUSHBUTTON: return ATK.ATK_ROLE_PUSH_BUTTON;
+						case ACC.ROLE_SCROLLBAR: return ATK.ATK_ROLE_SCROLL_BAR;
+						case ACC.ROLE_SEPARATOR: return ATK.ATK_ROLE_SEPARATOR;
+						case ACC.ROLE_SLIDER: return ATK.ATK_ROLE_SLIDER;
+						case ACC.ROLE_TABLE: return ATK.ATK_ROLE_TABLE;
+						case ACC.ROLE_TABLECELL: return ATK.ATK_ROLE_TABLE_CELL;
+						case ACC.ROLE_TABLECOLUMNHEADER: return ATK.ATK_ROLE_TABLE_COLUMN_HEADER;
+						case ACC.ROLE_TABLEROWHEADER: return ATK.ATK_ROLE_TABLE_ROW_HEADER;
+						case ACC.ROLE_TABFOLDER: return ATK.ATK_ROLE_PAGE_TAB_LIST;
+						case ACC.ROLE_TABITEM: return ATK.ATK_ROLE_PAGE_TAB;
+						case ACC.ROLE_TEXT: return ATK.ATK_ROLE_TEXT;
+						case ACC.ROLE_TOOLBAR: return ATK.ATK_ROLE_TOOL_BAR;
+						case ACC.ROLE_TOOLTIP: return ATK.ATK_ROLE_TOOL_TIP;
+						case ACC.ROLE_TREE: return ATK.ATK_ROLE_TREE;
+						case ACC.ROLE_TREEITEM: return ATK.ATK_ROLE_LIST_ITEM;
+						case ACC.ROLE_RADIOBUTTON: return ATK.ATK_ROLE_RADIO_BUTTON;
+						case ACC.ROLE_SPLITBUTTON: return ATK.ATK_ROLE_PUSH_BUTTON;
+						case ACC.ROLE_WINDOW: return ATK.ATK_ROLE_WINDOW;
+						case ACC.ROLE_ROW: return ROW_ROLE;
+						case ACC.ROLE_COLUMN: return COLUMN_ROLE;
+						case ACC.ROLE_ALERT: return ATK.ATK_ROLE_ALERT;
+						case ACC.ROLE_ANIMATION: return ATK.ATK_ROLE_ANIMATION;
+						case ACC.ROLE_CANVAS: return ATK.ATK_ROLE_CANVAS;
+						case ACC.ROLE_GROUP: return ATK.ATK_ROLE_PANEL;
+						case ACC.ROLE_SPINBUTTON: return ATK.ATK_ROLE_SPIN_BUTTON;
+						case ACC.ROLE_STATUSBAR: return ATK.ATK_ROLE_STATUSBAR;
+						case ACC.ROLE_CHECKMENUITEM: return ATK.ATK_ROLE_CHECK_MENU_ITEM;
+						case ACC.ROLE_RADIOMENUITEM: return ATK.ATK_ROLE_RADIO_MENU_ITEM;
+						case ACC.ROLE_CLOCK: return ATK.ATK_ROLE_UNKNOWN;
+						case ACC.ROLE_CALENDAR: return ATK.ATK_ROLE_CALENDAR;
+						case ACC.ROLE_DATETIME: return ATK.ATK_ROLE_DATE_EDITOR;
+						case ACC.ROLE_FOOTER: return ATK.ATK_ROLE_FOOTER;
+						case ACC.ROLE_FORM: return ATK.ATK_ROLE_FORM;
+						case ACC.ROLE_HEADER: return ATK.ATK_ROLE_HEADER;
+						case ACC.ROLE_HEADING: return ATK.ATK_ROLE_HEADING;
+						case ACC.ROLE_PAGE: return ATK.ATK_ROLE_PAGE;
+						case ACC.ROLE_PARAGRAPH: return ATK.ATK_ROLE_PARAGRAPH;
+						case ACC.ROLE_SECTION: return ATK.ATK_ROLE_SECTION;
+						case ACC.ROLE_DOCUMENT: return ATK.ATK_ROLE_DOCUMENT_FRAME;
+						case ACC.ROLE_GRAPHIC: return ATK.ATK_ROLE_IMAGE;
+					}
+				}
+			}
+		}
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.get_role == 0) return 0;
-		return ATK.call (objectClass.get_role, object.handle);
+		return ATK.call (objectClass.get_role, atkObject);
 	}
 
 	static int /*long*/ atkObject_ref_child (int /*long*/ atkObject, int /*long*/ index) {
-		if (DEBUG) System.out.println ("-->atkObject_ref_child: " + index + " of: " + atkObject);
+		if (DEBUG) print ("-->atkObject_ref_child: " + index + " of: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		object.updateChildren ();
-		AccessibleObject accObject = object.getChildByIndex ((int)/*64*/index);	
-		if (accObject != null) {
-			OS.g_object_ref (accObject.handle);	
-			return accObject.handle;
+		if (object != null && object.id == ACC.CHILDID_SELF) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleControlEvent event = new AccessibleControlEvent(accessible);
+				event.childID = ACC.CHILDID_CHILD_AT_INDEX;
+				event.detail = (int)/*64*/index;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener) listeners.elementAt(i);
+					listener.getChild(event);
+				}
+				if (event.accessible != null) {
+					AccessibleObject accObject = event.accessible.getAccessibleObject();
+					if (accObject != null) {
+						return OS.g_object_ref (accObject.handle);	
+					}
+				}
+			}
+			object.updateChildren ();
+			AccessibleObject accObject = object.getChildByIndex ((int)/*64*/index);	
+			if (accObject != null) {
+				return OS.g_object_ref (accObject.handle);	
+			}
 		}
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.ref_child == 0) return 0;
-		return ATK.call (objectClass.ref_child, object.handle, index);
+		return ATK.call (objectClass.ref_child, atkObject, index);
 	}
 
 	static int /*long*/ atkObject_ref_state_set (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkObject_ref_state_set");
+		if (DEBUG) print ("-->atkObject_ref_state_set: " + atkObject);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-		AtkObjectClass objectClass = new AtkObjectClass ();
-		ATK.memmove (objectClass, superType);
+		AtkObjectClass objectClass = getObjectClass (atkObject);
 		if (objectClass.ref_state_set != 0) { 
-			parentResult = ATK.call (objectClass.ref_state_set, object.handle);
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-
-		int /*long*/ set = parentResult;
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		event.detail = -1;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getState (event);
-		} 
-		if (event.detail != -1) {
-			/*	Convert from win32 state values to atk state values */
-			int state = event.detail;
-			if ((state & ACC.STATE_BUSY) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_BUSY);
-			if ((state & ACC.STATE_CHECKED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_CHECKED);
-			if ((state & ACC.STATE_EXPANDED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_EXPANDED);
-			if ((state & ACC.STATE_FOCUSABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_FOCUSABLE);
-			if ((state & ACC.STATE_FOCUSED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_FOCUSED);
-			if ((state & ACC.STATE_HOTTRACKED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ARMED);
-			if ((state & ACC.STATE_INVISIBLE) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_VISIBLE);
-			if ((state & ACC.STATE_MULTISELECTABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_MULTISELECTABLE);
-			if ((state & ACC.STATE_OFFSCREEN) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SHOWING);												
-			if ((state & ACC.STATE_PRESSED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_PRESSED);
-			if ((state & ACC.STATE_READONLY) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_EDITABLE);
-			if ((state & ACC.STATE_SELECTABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SELECTABLE);
-			if ((state & ACC.STATE_SELECTED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SELECTED);
-			if ((state & ACC.STATE_SIZEABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_RESIZABLE);
-			/* Note: STATE_COLLAPSED, STATE_LINKED and STATE_NORMAL have no ATK equivalents */
-		}
-		return set;
+			parentResult = ATK.call (objectClass.ref_state_set, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int /*long*/ set = parentResult;
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				event.detail = -1;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getState (event);
+				} 
+				if (event.detail != -1) {
+					/*	Convert from win32 state values to atk state values */
+					int state = event.detail;
+					if ((state & ACC.STATE_BUSY) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_BUSY);
+					if ((state & ACC.STATE_CHECKED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_CHECKED);
+					if ((state & ACC.STATE_EXPANDED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_EXPANDED);
+					if ((state & ACC.STATE_FOCUSABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_FOCUSABLE);
+					if ((state & ACC.STATE_FOCUSED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_FOCUSED);
+					if ((state & ACC.STATE_HOTTRACKED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ARMED);
+					if ((state & ACC.STATE_INVISIBLE) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_VISIBLE);
+					if ((state & ACC.STATE_MULTISELECTABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_MULTISELECTABLE);
+					if ((state & ACC.STATE_OFFSCREEN) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SHOWING);												
+					if ((state & ACC.STATE_PRESSED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_PRESSED);
+					if ((state & ACC.STATE_READONLY) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_EDITABLE);
+					if ((state & ACC.STATE_SELECTABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SELECTABLE);
+					if ((state & ACC.STATE_SELECTED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SELECTED);
+					if ((state & ACC.STATE_SIZEABLE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_RESIZABLE);
+					if ((state & ACC.STATE_DISABLED) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ENABLED);
+					if ((state & ACC.STATE_ACTIVE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ACTIVE);
+					if ((state & ACC.STATE_SINGLELINE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SINGLE_LINE);
+					if ((state & ACC.STATE_MULTILINE) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_MULTI_LINE);
+					if ((state & ACC.STATE_REQUIRED) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_REQUIRED);
+					if ((state & ACC.STATE_INVALID_ENTRY) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_INVALID_ENTRY);
+					if ((state & ACC.STATE_SUPPORTS_AUTOCOMPLETION) != 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_SUPPORTS_AUTOCOMPLETION);
+					/* Note: STATE_COLLAPSED, STATE_LINKED and STATE_NORMAL have no ATK equivalents */
+				}
+				return set;
+			}
+		}
+		return parentResult;
 	}
-
+	
+	static AtkSelectionIface getSelectionIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_SELECTION())) {
+			AtkSelectionIface iface = new AtkSelectionIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
+	
 	static int /*long*/ atkSelection_is_child_selected (int /*long*/ atkObject, int /*long*/ index) {
-		if (DEBUG) System.out.println ("-->atkSelection_is_child_selected");
+		if (DEBUG) print ("-->atkSelection_is_child_selected");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_SELECTION_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (object.handle));
-			AtkSelectionIface selectionIface = new AtkSelectionIface ();
-			ATK.memmove (selectionIface, superType);
-			if (selectionIface.is_child_selected != 0) {
-				parentResult = ATK.call (selectionIface.is_child_selected, object.handle, index);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-			
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getSelection (event);
-		}
-		AccessibleObject accessibleObject = object.getChildByID (event.childID);
-		if (accessibleObject != null) { 
-			return accessibleObject.index == index ? 1 : 0;
+		AtkSelectionIface iface = getSelectionIface (atkObject);
+		if (iface != null && iface.is_child_selected != 0) {
+			parentResult = ATK.call (iface.is_child_selected, atkObject, index);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {	
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getSelection (event);
+				}
+				Accessible result = event.accessible;
+				AccessibleObject accessibleObject = result != null ? result.getAccessibleObject() : object.getChildByID (event.childID);
+				if (accessibleObject != null) { 
+					return accessibleObject.index == index ? 1 : 0;
+				}
+			}
 		}
 		return parentResult;
 	}
 
 	static int /*long*/ atkSelection_ref_selection (int /*long*/ atkObject, int /*long*/ index) {
-		if (DEBUG) System.out.println ("-->atkSelection_ref_selection");
+		if (DEBUG) print ("-->atkSelection_ref_selection");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
 		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_SELECTION_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_SELECTION_GET_IFACE (object.handle));
-			AtkSelectionIface selectionIface = new AtkSelectionIface ();
-			ATK.memmove (selectionIface, superType);
-			if (selectionIface.ref_selection != 0) {
-				parentResult = ATK.call (selectionIface.ref_selection, object.handle, index);
-			}
-		}
-		AccessibleControlListener[] listeners = object.getControlListeners ();
-		if (listeners.length == 0) return parentResult;
-			
-		AccessibleControlEvent event = new AccessibleControlEvent (object.accessible);
-		event.childID = object.id;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getSelection (event);
-		} 
-		AccessibleObject accObj = object.getChildByID (event.childID);
-		if (accObj != null) {
-			if (parentResult > 0) OS.g_object_unref (parentResult);
-			OS.g_object_ref (accObj.handle);	
-			return accObj.handle;
+		AtkSelectionIface iface = getSelectionIface (atkObject);
+		if (iface != null && iface.ref_selection != 0) {
+			parentResult = ATK.call (iface.ref_selection, atkObject, index);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleControlListeners;
+			int length = listeners.size();
+			if (length > 0) {	
+				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+				event.childID = object.id;
+				for (int i = 0; i < length; i++) {
+					AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+					listener.getSelection (event);
+				} 
+				AccessibleObject accObj = object.getChildByID (event.childID);
+				if (accObj != null) {
+					if (parentResult != 0) OS.g_object_unref (parentResult);
+					OS.g_object_ref (accObj.handle);	
+					return accObj.handle;
+				}
+			}
 		}
 		return parentResult;
 	}
 
-	static int /*long*/ atkText_get_caret_offset (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkText_get_caret_offset");
-		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (object.handle));
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			if (textIface.get_caret_offset != 0) {
-				parentResult = ATK.call (textIface.get_caret_offset, object.handle);
-			}
-		}
-		AccessibleTextListener[] listeners = object.getTextListeners ();
-		if (listeners.length == 0) return parentResult;
-		
-		AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
-		event.childID = object.id;
-		event.offset = (int)/*64*/parentResult;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getCaretOffset (event);	
-		} 
-		return event.offset; 	
+	static AtkTableIface getTableIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_TABLE())) {
+			AtkTableIface iface = new AtkTableIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_TABLE_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
 	}
 	
-	static int /*long*/ atkText_get_character_at_offset (int /*long*/ atkObject, int /*long*/ offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_character_at_offset");
+	static int /*long*/ atkTable_ref_at (int /*long*/ atkObject, int /*long*/ row, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_ref_at");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		String text = object.getText ();
-		if (text != null) return text.charAt ((int)/*64*/offset); // TODO
-		if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			if (textIface.get_character_at_offset != 0) {
-				return ATK.call (textIface.get_character_at_offset, object.handle, offset);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCell(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) {
+					AccessibleObject accessibleObject = result.getAccessibleObject();
+					OS.g_object_ref(accessibleObject.handle);
+					return accessibleObject.handle;
+				}
 			}
 		}
-		return 0;
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.ref_at != 0) {
+			parentResult = ATK.call (iface.ref_at, atkObject, row, column);
+		}
+		return parentResult;
 	}
 
-	static int /*long*/ atkText_get_character_count (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkText_get_character_count");
+	static int /*long*/ atkTable_get_index_at (int /*long*/ atkObject, int /*long*/ row, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_get_index_at");
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		String text = object.getText ();
-		if (text != null) return text.length ();
-		if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_class_peek (object.parentType);
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			if (textIface.get_character_count != 0) {
-				return ATK.call (textIface.get_character_count, object.handle);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCell(event);
+				}
+				Accessible result = event.accessible;
+				if (result == null) return -1;
+				event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getColumnCount(event);
+				}
+				return row * event.count + column;
 			}
 		}
-		return 0;
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_index_at != 0) {
+			parentResult = ATK.call (iface.get_index_at, atkObject, row, column);
+		}
+		return parentResult;
 	}
 
-	static int /*long*/ atkText_get_n_selections (int /*long*/ atkObject) {
-		if (DEBUG) System.out.println ("-->atkText_get_n_selections");
+	static int /*long*/ atkTable_get_column_at_index (int /*long*/ atkObject, int /*long*/ index) {
+		if (DEBUG) print ("-->atkTable_get_column_at_index: " + atkObject + " " + index);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		int /*long*/ parentResult = 0;
-		if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (object.handle));
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			if (textIface.get_n_selections != 0) {
-				parentResult = ATK.call (textIface.get_n_selections, object.handle);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getColumnCount(event);
+				}
+				int /*long*/ result = event.count == 0 ? -1 : index % event.count;
+				if (DEBUG) print ("---> " + result);
+				return result;
 			}
 		}
-		AccessibleTextListener[] listeners = object.getTextListeners ();
-		if (listeners.length == 0) return parentResult;
-
-		AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
-		event.childID = object.id;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getSelectionRange (event);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_column_at_index != 0) {
+			parentResult = ATK.call (iface.get_column_at_index, atkObject, index);
 		}
-		return event.length == 0 ? parentResult : 1;
+		return parentResult;
 	}
 
-	static int /*long*/ atkText_get_selection (int /*long*/ atkObject, int /*long*/ selection_num, int /*long*/ start_offset, int /*long*/ end_offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_selection");
+	static int /*long*/ atkTable_get_row_at_index (int /*long*/ atkObject, int /*long*/ index) {
+		if (DEBUG) print ("-->atkTable_get_row_at_index: " + atkObject + " " + index);
 		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		OS.memmove (start_offset, new int[] {0}, 4);
-		OS.memmove (end_offset, new int[] {0}, 4);
-		if (ATK.g_type_is_a (object.parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (object.handle));
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			if (textIface.get_selection != 0) {
-				ATK.call (textIface.get_selection, object.handle, selection_num, start_offset, end_offset);
-			}
-		}
-		AccessibleTextListener[] listeners = object.getTextListeners ();
-		if (listeners.length == 0) return 0;
-
-		AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
-		event.childID = object.id;
-		int[] parentStart = new int [1];
-		int[] parentEnd = new int [1];
-		OS.memmove (parentStart, start_offset, 4);
-		OS.memmove (parentEnd, end_offset, 4);
-		event.offset = parentStart [0];
-		event.length = parentEnd [0] - parentStart [0];
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getSelectionRange (event);
-		}
-		OS.memmove (start_offset, new int[] {event.offset}, 4);
-		OS.memmove (end_offset, new int[] {event.offset + event.length}, 4);
-		return 0;
-	}
-
-	static int /*long*/ atkText_get_text (int /*long*/ atkObject, int /*long*/ start_offset, int /*long*/ end_offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_text: " + start_offset + "," + end_offset);
-		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		String text = object.getText ();
-		if (text.length () > 0) {
-			if (end_offset == -1) {
-				end_offset = text.length ();
-			} else {
-				end_offset = Math.min (end_offset, text.length ());	
-			}
-			start_offset = Math.min (start_offset, end_offset);
-			text = text.substring ((int)/*64*/start_offset, (int)/*64*/end_offset);
-			byte[] bytes = Converter.wcsToMbcs (null, text, true);
-			int /*long*/ result = OS.g_malloc (bytes.length);
-			OS.memmove (result, bytes, bytes.length);
-			return result;
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getColumnCount(event);
+				}
+				int /*long*/ result = event.count == 0 ? -1 : index / event.count;
+				if (DEBUG) print ("---> " + result);
+				return result;
+			}
 		}
-		return 0;
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_row_at_index != 0) {
+			parentResult = ATK.call (iface.get_row_at_index, atkObject, index);
+		}
+		return parentResult;
 	}
 
-	static int /*long*/ atkText_get_text_after_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_text_after_offset");
-		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		int offset = (int)/*64*/offset_value;
-		String text = object.getText ();
-		if (text.length () > 0) {
-			int length = text.length ();
-			offset = Math.min (offset, length - 1);
-			int startBounds = offset;
-			int endBounds = offset;
-			switch ((int)/*64*/boundary_type) {
-				case ATK.ATK_TEXT_BOUNDARY_CHAR: {
-					if (length > offset) endBounds++;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
-					int wordStart1 = nextIndexOfChar (text, " !?.\n", offset - 1);
-					if (wordStart1 == -1) {
-						startBounds = endBounds = length;
-						break;
-					}
-					wordStart1 = nextIndexOfNotChar (text, " !?.\n", wordStart1);
-					if (wordStart1 == length) {
-						startBounds = endBounds = length;
-						break;
+	static int /*long*/ atkTable_get_n_columns (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkTable_get_n_columns");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_n_columns != 0) {
+			parentResult = ATK.call (iface.get_n_columns, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.count = (int)/*64*/parentResult;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getColumnCount(event);
+					parentResult = event.count;
+				}
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_n_rows (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkTable_get_n_rows");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_n_rows != 0) {
+			parentResult = ATK.call (iface.get_n_rows, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.count = (int)/*64*/parentResult;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getRowCount(event);
+					parentResult = event.count;
+				}
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_column_extent_at (int /*long*/ atkObject, int /*long*/ row, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_get_column_extent_at");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_column_extent_at != 0) {
+			parentResult = ATK.call (iface.get_column_extent_at, atkObject, row, column);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCell(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) {
+					listeners = result.accessibleTableCellListeners;
+					length = listeners.size();
+					if (length > 0) {
+						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
+						cellEvent.count = (int)/*64*/parentResult;
+						for (int i = 0; i < length; i++) {
+							AccessibleTableCellListener listener = (AccessibleTableCellListener) listeners.elementAt(i);
+							listener.getColumnSpan(cellEvent);
+						}
+						return cellEvent.count;
 					}
-					startBounds = wordStart1;
-					int wordStart2 = nextIndexOfChar (text, " !?.\n", wordStart1);
-					if (wordStart2 == -1) {
-						endBounds = length;
-						break;
+				}
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_row_extent_at (int /*long*/ atkObject, int /*long*/ row, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_get_row_extent_at");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_row_extent_at != 0) {
+			parentResult = ATK.call (iface.get_row_extent_at, atkObject, row, column);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCell(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) {
+					listeners = result.accessibleTableCellListeners;
+					length = listeners.size();
+					if (length > 0) {
+						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
+						cellEvent.count = (int)/*64*/parentResult;
+						for (int i = 0; i < length; i++) {
+							AccessibleTableCellListener listener = (AccessibleTableCellListener) listeners.elementAt(i);
+							listener.getRowSpan(cellEvent);
+						}
+						return cellEvent.count;
 					}
-					endBounds = nextIndexOfNotChar (text, " !?.\n", wordStart2);
-					break;
 				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
-					int previousWordEnd = previousIndexOfNotChar (text, " \n", offset); 
-					if (previousWordEnd == -1 || previousWordEnd != offset - 1) {
-						offset = nextIndexOfNotChar (text, " \n", offset);
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_caption (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkTable_get_caption");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCaption(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) return result.getAccessibleObject().handle;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_caption != 0) {
+			parentResult = ATK.call (iface.get_caption, atkObject);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_summary (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkTable_get_summary");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getSummary(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) return result.getAccessibleObject().handle;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_summary != 0) {
+			parentResult = ATK.call (iface.get_summary, atkObject);
+		}
+		return parentResult;
+	}
+	
+	static int /*long*/ atkTable_get_column_description (int /*long*/ atkObject, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_get_column_description");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_column_description != 0) {
+			parentResult = ATK.call (iface.get_column_description, atkObject, column);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.column = (int)/*64*/column;
+				if (parentResult != 0) event.result = getString (parentResult);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getColumnDescription(event);
+				}
+				if (event.result == null) return parentResult;
+				if (descriptionPtr != -1) OS.g_free (descriptionPtr);
+				return descriptionPtr = getStringPtr (event.result);
+			}
+		}
+		return parentResult;
+	}
+	
+	static int /*long*/ atkTable_get_column_header (int /*long*/ atkObject, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_get_column_header");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getRowHeaderCells(event);
+				}
+				Accessible[] accessibles = event.accessibles;
+				if (accessibles != null) {
+					if (0 <= column && column < accessibles.length) {
+						return accessibles[(int)/*64*/column].getAccessibleObject().handle;
 					}
-					if (offset == -1) {
-						startBounds = endBounds = length;
-						break;
+				}
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_column_header != 0) {
+			parentResult = ATK.call (iface.get_column_header, atkObject, column);
+		}
+		return parentResult;
+	}
+	
+	static int /*long*/ atkTable_get_row_description (int /*long*/ atkObject, int /*long*/ row) {
+		if (DEBUG) print ("-->atkTable_get_row_description");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_row_description != 0) {
+			parentResult = ATK.call (iface.get_row_description, atkObject, row);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				if (parentResult != 0) event.result = getString (parentResult);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getRowDescription(event);
+				}
+				if (event.result == null) return parentResult;
+				if (descriptionPtr != -1) OS.g_free (descriptionPtr);
+				return descriptionPtr = getStringPtr (event.result);
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_row_header (int /*long*/ atkObject, int /*long*/ row) {
+		if (DEBUG) print ("-->atkTable_get_row_header");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getRowHeaderCells(event);
+				}
+				Accessible[] accessibles = event.accessibles;
+				if (accessibles != null) {
+					if (0 <= row && row < accessibles.length) {
+						return accessibles[(int)/*64*/row].getAccessibleObject().handle;
 					}
-					int wordEnd1 = nextIndexOfChar (text, " !?.\n", (int)/*64*/offset);
-					if (wordEnd1 == -1) {
-						startBounds = endBounds = length;
-						break;
+				}
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_row_header != 0) {
+			parentResult = ATK.call (iface.get_row_header, atkObject, row);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_selected_columns (int /*long*/ atkObject, int /*long*/ selected) {
+		if (DEBUG) print ("-->atkTable_get_selected_columns");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getSelectedColumns(event);
+				}
+				int count = event.selected != null ? event.selected.length : 0;
+				int /*long*/ result = OS.g_malloc(count * 4);
+				if (event.selected != null) OS.memmove(result, event.selected, count * 4);
+				if (selected != 0) OS.memmove(selected, new int /*long*/[]{result}, C.PTR_SIZEOF);
+				return count;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_selected_columns != 0) {
+			parentResult = ATK.call (iface.get_selected_columns, atkObject, selected);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_get_selected_rows (int /*long*/ atkObject, int /*long*/ selected) {
+		if (DEBUG) print ("-->atkTable_get_selected_rows");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getSelectedRows(event);
+				}
+				int count = event.selected != null ? event.selected.length : 0;
+				int /*long*/ result = OS.g_malloc(count * 4);
+				if (event.selected != null) OS.memmove(result, event.selected, count * 4);
+				if (selected != 0) OS.memmove(selected, new int /*long*/[]{result}, C.PTR_SIZEOF);
+				return count;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.get_selected_rows != 0) {
+			parentResult = ATK.call (iface.get_selected_rows, atkObject, selected);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_is_column_selected (int /*long*/ atkObject, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_is_column_selected");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.is_column_selected != 0) {
+			parentResult = ATK.call (iface.is_column_selected, atkObject, column);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.isSelected = parentResult != 0;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.isColumnSelected(event);
+				}
+				return event.isSelected ? 1 : 0;
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_is_row_selected (int /*long*/ atkObject, int /*long*/ row) {
+		if (DEBUG) print ("-->atkTable_is_row_selected");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.is_row_selected != 0) {
+			parentResult = ATK.call (iface.is_row_selected, atkObject, row);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.isSelected = parentResult != 0;
+				event.row = (int)/*64*/row;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.isRowSelected(event);
+				}
+				return event.isSelected ? 1 : 0;
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_is_selected (int /*long*/ atkObject, int /*long*/ row, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_is_selected");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.is_selected != 0) {
+			parentResult = ATK.call (iface.is_selected, atkObject, row, column);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.getCell(event);
+				}
+				Accessible result = event.accessible;
+				if (result != null) {
+					listeners = result.accessibleTableCellListeners;
+					length = listeners.size();
+					if (length > 0) {
+						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
+						cellEvent.isSelected = parentResult != 0;
+						for (int i = 0; i < length; i++) {
+							AccessibleTableCellListener listener = (AccessibleTableCellListener) listeners.elementAt(i);
+							listener.isSelected(cellEvent);
+						}
+						return cellEvent.isSelected ? 1 : 0;
 					}
-					wordEnd1 = nextIndexOfNotChar (text, "!?.", wordEnd1);
-					if (wordEnd1 == length) {
-						startBounds = endBounds = length;
-						break;
+				}
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_add_row_selection (int /*long*/ atkObject, int /*long*/ row) {
+		if (DEBUG) print ("-->atkTable_add_row_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.selectRow(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.add_row_selection != 0) {
+			parentResult = ATK.call (iface.add_row_selection, atkObject, row);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_remove_row_selection (int /*long*/ atkObject, int /*long*/ row) {
+		if (DEBUG) print ("-->atkTable_remove_row_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.row = (int)/*64*/row;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.deselectRow(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.remove_row_selection != 0) {
+			parentResult = ATK.call (iface.remove_row_selection, atkObject, row);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_add_column_selection (int /*long*/ atkObject, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_add_column_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.selectColumn(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.add_column_selection != 0) {
+			parentResult = ATK.call (iface.add_column_selection, atkObject, column);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkTable_remove_column_selection (int /*long*/ atkObject, int /*long*/ column) {
+		if (DEBUG) print ("-->atkTable_remove_column_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTableListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
+				event.column = (int)/*64*/column;
+				for (int i = 0; i < length; i++) {
+					AccessibleTableListener listener = (AccessibleTableListener) listeners.elementAt(i);
+					listener.deselectColumn(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTableIface iface = getTableIface (atkObject);
+		if (iface != null && iface.remove_column_selection != 0) {
+			parentResult = ATK.call (iface.remove_column_selection, atkObject, column);
+		}
+		return parentResult;
+	}
+
+	static AtkTextIface getTextIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_TEXT())) {
+			AtkTextIface iface = new AtkTextIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
+	
+	static int /*long*/ atkText_get_character_extents (int /*long*/ atkObject, int /*long*/ offset, int /*long*/ x, int /*long*/ y, int /*long*/ width, int /*long*/ height, int /*long*/ coords) {
+		if (DEBUG) print ("-->atkText_get_character_extents");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = (int)/*64*/offset;
+				event.end = (int)/*64*/(offset + 1);
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getTextBounds(event);
+				}
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coords == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x -= topWindowX [0];
+					event.y -= topWindowY [0];
+				}
+				OS.memmove (x, new int[]{event.x}, 4);
+				OS.memmove (y, new int[]{event.y}, 4);
+				OS.memmove (width, new int[]{event.width}, 4);
+				OS.memmove (height, new int[]{event.height}, 4);				
+				return 0;
+			}
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_character_extents != 0) {
+			ATK.call (iface.get_character_extents, atkObject, offset, x, y, width, height, coords);
+		}
+		return 0;
+	}
+	
+	static String getString (int /*long*/ strPtr) {
+		int length = OS.strlen (strPtr);
+		byte [] buffer = new byte [length];
+		OS.memmove (buffer, strPtr, length);
+		return new String (Converter.mbcsToWcs (null, buffer));
+	}
+	
+	static int /*long*/ getStringPtr (String str) {
+		byte [] buffer = Converter.wcsToMbcs(null, str != null ? str : "", true); 
+		int /*long*/ ptr = OS.g_malloc(buffer.length);
+		OS.memmove(ptr, buffer, buffer.length);
+		return ptr;
+	}
+	
+	static int /*long*/ atkText_get_range_extents (int /*long*/ atkObject, int /*long*/ start_offset, int /*long*/ end_offset, int /*long*/ coord_type, int /*long*/ rect) {
+		if (DEBUG) print ("-->atkText_get_range_extents");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = (int)/*64*/start_offset;
+				event.end = (int)/*64*/end_offset;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getTextBounds(event);
+				}
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coord_type == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x -= topWindowX [0];
+					event.y -= topWindowY [0];
+				}
+				AtkTextRectangle atkRect = new AtkTextRectangle();
+				atkRect.x = event.x;
+				atkRect.y = event.y;
+				atkRect.width = event.width;
+				atkRect.height = event.height;
+				ATK.memmove (rect, atkRect, AtkTextRectangle.sizeof);
+				return 0;
+			}
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_range_extents != 0) {
+			ATK.call (iface.get_range_extents, atkObject, start_offset, end_offset, coord_type, rect);
+		}
+		return 0;
+	}
+	
+	static int /*long*/ atkText_get_run_attributes (int /*long*/ atkObject, int /*long*/ offset, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_get_run_attributes");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleAttributeListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(accessible);
+				event.offset = (int)/*64*/offset;
+				for (int i = 0; i < length; i++) {
+					AccessibleAttributeListener listener = (AccessibleAttributeListener) listeners.elementAt(i);
+					listener.getTextAttributes(event);
+				}
+				OS.memmove (start_offset, new int []{event.start}, 4);
+				OS.memmove (end_offset, new int []{event.end}, 4);
+				TextStyle style = event.textStyle;
+				int /*long*/ result = 0;
+				AtkAttribute attr = new AtkAttribute();
+				if (style != null) {
+					if (style.rise != 0) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_RISE));
+						attr.value = getStringPtr (String.valueOf(style.rise));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					startBounds = wordEnd1;
-					int wordEnd2 = nextIndexOfNotChar (text, " \n", wordEnd1);
-					if (wordEnd2 == length) {
-						startBounds = endBounds = length;
-						break;
+					if (style.underline) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_UNDERLINE));
+						String str = "none"; //$NON-NLS-1$
+						switch (style.underlineStyle) {
+							case SWT.UNDERLINE_DOUBLE: str = "double"; break; //$NON-NLS-1$
+							case SWT.UNDERLINE_SINGLE: str = "single"; break; //$NON-NLS-1$
+							case SWT.UNDERLINE_ERROR: str = "error"; break; //$NON-NLS-1$
+							case SWT.UNDERLINE_SQUIGGLE: str = "squiggle"; break; //$NON-NLS-1$
+						}
+						attr.value = getStringPtr (str);
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					wordEnd2 = nextIndexOfChar (text, " !?.\n", wordEnd2);
-					if (wordEnd2 == -1) {
-						endBounds = length;
-						break;
+					if (style.strikeout) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_STRIKETHROUGH));
+						attr.value = getStringPtr ("1");
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					endBounds = nextIndexOfNotChar (text, "!?.", wordEnd2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
-					int previousSentenceEnd = previousIndexOfChar (text, "!?.", offset);
-					int previousText = previousIndexOfNotChar (text, " !?.\n", offset);
-					int sentenceStart1 = 0;
-					if (previousSentenceEnd >= previousText) {
-						sentenceStart1 = nextIndexOfNotChar (text, " !?.\n", offset);
-					} else {
-						sentenceStart1 = nextIndexOfChar (text, "!?.", offset);
-						if (sentenceStart1 == -1) {
-							startBounds = endBounds = length;
-							break;
-						}
-						sentenceStart1 = nextIndexOfNotChar (text, " !?.\n", sentenceStart1);
+					Font font = style.font;
+					if (font != null && !font.isDisposed()) {
+						//TODO language and direction
+						int /*long*/ attrPtr;
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_FAMILY_NAME));
+						attr.value = ATK.g_strdup (OS.pango_font_description_get_family (font.handle));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+						
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_SIZE));
+						attr.value = getStringPtr (String.valueOf (OS.pango_font_description_get_size(font.handle) / OS.PANGO_SCALE));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+						
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_STYLE));
+						attr.value = ATK.g_strdup (ATK.atk_text_attribute_get_value(ATK.ATK_TEXT_ATTR_STYLE, OS.pango_font_description_get_style(font.handle)));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+						
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_VARIANT));
+						attr.value = ATK.g_strdup (ATK.atk_text_attribute_get_value(ATK.ATK_TEXT_ATTR_VARIANT, OS.pango_font_description_get_variant(font.handle)));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+						
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_STRETCH));
+						attr.value = ATK.g_strdup (ATK.atk_text_attribute_get_value(ATK.ATK_TEXT_ATTR_STRETCH, OS.pango_font_description_get_stretch(font.handle)));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+						
+						attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_WEIGHT));
+						attr.value = getStringPtr (String.valueOf (OS.pango_font_description_get_weight(font.handle)));
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					if (sentenceStart1 == length) {
-						startBounds = endBounds = length;
-						break;
+					Color color = style.foreground;
+					if (color != null && !color.isDisposed()) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_FG_COLOR));
+						attr.value = getStringPtr ((color.handle.red & 0xFFFF) + "," + (color.handle.blue & 0xFFFF) + "," + (color.handle.blue & 0xFFFF)); //$NON-NLS-1$ //$NON-NLS-2$
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					startBounds = sentenceStart1;
-					int sentenceStart2 = nextIndexOfChar (text, "!?.", sentenceStart1);
-					if (sentenceStart2 == -1) {
-						endBounds = length;
-						break;
+					color = style.background;
+					if (color != null && !color.isDisposed()) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = ATK.g_strdup (ATK.atk_text_attribute_get_name(ATK.ATK_TEXT_ATTR_BG_COLOR));
+						attr.value = getStringPtr ((color.handle.red & 0xFFFF) + "," + (color.handle.blue & 0xFFFF) + "," + (color.handle.blue & 0xFFFF)); //$NON-NLS-1$ //$NON-NLS-2$
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
 					}
-					endBounds = nextIndexOfNotChar (text, " !?.\n", sentenceStart2);
-					break;
 				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
-					int sentenceEnd1 = nextIndexOfChar (text, "!?.", offset);
-					if (sentenceEnd1 == -1) {
-						startBounds = endBounds = length;
-						break;
+				if (event.attributes != null) {
+					int end = event.attributes.length / 2 * 2;
+					for (int i = 0; i < end; i+= 2) {
+						int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+						attr.name = getStringPtr (event.attributes[i]);
+						attr.value = getStringPtr (event.attributes[i + 1]);
+						ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+						result = OS.g_slist_append(result, attrPtr);
+					}
+				}
+				return result;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_run_attributes != 0) {
+			parentResult = ATK.call (iface.get_run_attributes, atkObject, offset, start_offset, end_offset);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_get_offset_at_point (int /*long*/ atkObject, int /*long*/ x, int /*long*/ y, int /*long*/ coords) {
+		if (DEBUG) print ("-->atkText_get_offset_at_point");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.x = (int)/*64*/x;
+				event.y = (int)/*64*/y;
+				int[] topWindowX = new int [1], topWindowY = new int [1];
+				if (coords == ATK.ATK_XY_WINDOW) {
+					windowPoint (object, topWindowX, topWindowY);
+					event.x += topWindowX [0];
+					event.y += topWindowY [0]; 
+				}
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getOffsetAtPoint(event);
+				}
+				return event.offset;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_offset_at_point != 0) {
+			parentResult = ATK.call (iface.get_offset_at_point, atkObject, x, y, coords);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_add_selection (int /*long*/ atkObject, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_add_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = (int)/*64*/start_offset;
+				event.end = (int)/*64*/end_offset;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.addSelection(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.add_selection != 0) {
+			parentResult = ATK.call (iface.add_selection, atkObject, start_offset, end_offset);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_remove_selection (int /*long*/ atkObject, int /*long*/ selection_num) {
+		if (DEBUG) print ("-->atkText_remove_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.index = (int)/*64*/selection_num;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.removeSelection(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.remove_selection != 0) {
+			parentResult = ATK.call (iface.remove_selection, atkObject, selection_num);
+		}
+		return parentResult;
+	}
+	
+	static int /*long*/ atkText_set_caret_offset (int /*long*/ atkObject, int /*long*/ offset) {
+		if (DEBUG) print ("-->atkText_set_caret_offset");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.offset = (int)/*64*/offset;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.setCaretOffset(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.set_caret_offset != 0) {
+			return ATK.call (iface.set_caret_offset, atkObject, offset);
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkText_set_selection (int /*long*/ atkObject, int /*long*/ selection_num, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_set_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.index = (int)/*64*/selection_num;
+				event.start = (int)/*64*/start_offset;
+				event.end = (int)/*64*/end_offset;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.setSelection(event);
+				}
+				return ACC.OK.equals(event.result) ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.set_selection != 0) {
+			parentResult = ATK.call (iface.set_selection, atkObject, selection_num, start_offset, end_offset);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_get_caret_offset (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkText_get_caret_offset");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_caret_offset != 0) {
+			parentResult = ATK.call (iface.get_caret_offset, atkObject);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getCaretOffset (event);
+				}
+				return event.offset;
+			}
+			listeners = accessible.accessibleTextListeners;
+			length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
+				event.childID = object.id;
+				event.offset = (int)/*64*/parentResult;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextListener listener = (AccessibleTextListener) listeners.elementAt(i);
+					listener.getCaretOffset (event);	
+				}
+				return event.offset;
+			}
+		}
+		return parentResult; 	
+	}
+	
+	static int /*long*/ atkText_get_bounded_ranges (int /*long*/ atkObject, int /*long*/ rect, int /*long*/ coord_type, int /*long*/ x_clip_type, int /*long*/ y_clip_type) {
+		if (DEBUG) print ("-->atkText_get_bounded_ranges");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				AtkTextRectangle atkRect = new AtkTextRectangle();
+				ATK.memmove (atkRect, rect, AtkTextRectangle.sizeof);
+				event.x = atkRect.x;
+				event.y = atkRect.y;
+				event.width = atkRect.width;
+				event.height = atkRect.height;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getRanges (event);
+				}
+				int [] ranges = event.ranges;
+				int size = ranges == null ? 1 : ranges.length / 2;
+				int /*long*/ result = OS.malloc(size * AtkTextRange.sizeof);
+				AtkTextRange range = new AtkTextRange();
+				for (int j = 0, end = (ranges != null ? ranges.length / 2 : 1); j < end; j++) {
+					if (ranges != null) {
+						int index = j * 2;
+						event.start = ranges[index];
+						event.end = ranges[index+1];
+					}
+					event.count = 0;
+					event.type = ACC.TEXT_BOUNDARY_ALL;
+					for (int i = 0; i < length; i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+						listener.getText(event);
+					}
+					range.start_offset = event.start;
+					range.end_offset = event.end;
+					range.content = getStringPtr (event.result);
+					event.result = null;
+					event.count = event.type = event.x = event.y = event.width = event.height = 0;
+					for (int i = 0; i < length; i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+						listener.getTextBounds(event);
 					}
-					sentenceEnd1 = nextIndexOfNotChar (text, "!?.", sentenceEnd1);
-					if (sentenceEnd1 == length) {
-						startBounds = endBounds = length;
+					range.bounds.x = event.x;
+					range.bounds.y = event.y;
+					range.bounds.width = event.width;
+					range.bounds.height = event.height;
+					ATK.memmove(result + j * AtkTextRange.sizeof, range, AtkTextRange.sizeof);
+				}
+				return result;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_bounded_ranges != 0) {
+			parentResult = ATK.call (iface.get_bounded_ranges, atkObject);
+		}
+		return parentResult;
+	}
+	
+	static int /*long*/ atkText_get_character_at_offset (int /*long*/ atkObject, int /*long*/ offset) {
+		if (DEBUG) print ("-->atkText_get_character_at_offset");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = (int)/*64*/offset;
+				event.end = (int)/*64*/(offset + 1);
+				event.type = ACC.TEXT_BOUNDARY_CHAR;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				String text = event.result;
+				return text != null && text.length() > 0 ? text.charAt(0) : 0;
+			}
+			String text = object.getText ();
+			if (text != null && text.length() > offset) return text.charAt ((int)/*64*/offset);
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_character_at_offset != 0) {
+			return ATK.call (iface.get_character_at_offset, atkObject, offset);
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkText_get_character_count (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkText_get_character_count");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getCharacterCount(event);
+				}
+				return event.count;
+			}
+			String text = object.getText ();
+			if (text != null) return text.length ();
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_character_count != 0) {
+			return ATK.call (iface.get_character_count, atkObject);
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkText_get_n_selections (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->atkText_get_n_selections");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getSelectionCount (event);
+				}
+				return event.count;
+			}
+			listeners = accessible.accessibleTextListeners;
+			length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
+				event.childID = object.id;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextListener listener = (AccessibleTextListener) listeners.elementAt(i);
+					listener.getSelectionRange (event);
+				}
+				if (event.length > 0) return 1;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_n_selections != 0) {
+			parentResult = ATK.call (iface.get_n_selections, atkObject);
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_get_selection (int /*long*/ atkObject, int /*long*/ selection_num, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_get_selection");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		int /*long*/ parentResult = 0;
+		OS.memmove (start_offset, new int[] {0}, 4);
+		OS.memmove (end_offset, new int[] {0}, 4);
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_selection != 0) {
+			parentResult = ATK.call (iface.get_selection, atkObject, selection_num, start_offset, end_offset);
+		}
+		if (object != null) {
+			int[] parentStart = new int [1];
+			int[] parentEnd = new int [1];
+			OS.memmove (parentStart, start_offset, 4);
+			OS.memmove (parentEnd, end_offset, 4);
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.index = (int)/*64*/selection_num;
+				event.start = parentStart[0];
+				event.end = parentEnd[0];
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getSelection (event);
+				}
+				parentStart [0] = event.start;
+				parentEnd [0] = event.end;
+				OS.memmove (start_offset, parentStart, 4);
+				OS.memmove (end_offset, parentEnd, 4);
+				event.count = event.index = 0;
+				event.type = ACC.TEXT_BOUNDARY_ALL;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				if (parentResult != 0) OS.g_free(parentResult);
+				return getStringPtr (event.result);
+			}
+			if (selection_num == 0) {
+				listeners = accessible.accessibleTextListeners;
+				length = listeners.size();
+				if (length > 0) {
+					AccessibleTextEvent event = new AccessibleTextEvent (accessible);
+					event.childID = object.id;
+					event.offset = parentStart [0];
+					event.length = parentEnd [0] - parentStart [0];
+					for (int i = 0; i < length; i++) {
+						AccessibleTextListener listener = (AccessibleTextListener) listeners.elementAt(i);
+						listener.getSelectionRange (event);
+					}
+					OS.memmove (start_offset, new int[] {event.offset}, 4);
+					OS.memmove (end_offset, new int[] {event.offset + event.length}, 4);
+					if (parentResult != 0) OS.g_free(parentResult);
+					String text = object.getText();
+					if (text != null && text.length () > event.offset && text.length() >= event.offset + event.length) {
+						return getStringPtr (text.substring(event.offset, event.offset + event.length));
+					}
+					if (iface != null && iface.get_text != 0) {
+						return ATK.call (iface.get_text, atkObject, event.offset, event.offset + event.length);
+					}
+					return 0;
+				}
+			}
+		}
+		return parentResult;
+	}
+
+	static int /*long*/ atkText_get_text (int /*long*/ atkObject, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_get_text: " + atkObject + " " + start_offset + "," + end_offset);
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = (int)/*64*/start_offset;
+				event.end = (int)/*64*/end_offset;
+				event.type = ACC.TEXT_BOUNDARY_ALL;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				return getStringPtr (event.result);
+			}
+			String text = object.getText ();
+			if (text != null && text.length () > 0) {
+				if (end_offset == -1) {
+					end_offset = text.length ();
+				} else {
+					end_offset = Math.min (end_offset, text.length ());	
+				}
+				start_offset = Math.min (start_offset, end_offset);
+				text = text.substring ((int)/*64*/start_offset, (int)/*64*/end_offset);
+				return getStringPtr (text);
+			}
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_text != 0) {
+			return ATK.call (iface.get_text, atkObject, start_offset, end_offset);
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkText_get_text_after_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) {
+		if (DEBUG) print ("-->atkText_get_text_after_offset");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int /*long*/ charCount = atkText_get_character_count (atkObject);
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = event.end = (int)/*64*/offset_value;
+				event.count = 1;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+				}
+				int eventStart = event.start;
+				int eventEnd = event.end;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START:
+						if (event.end < charCount) {
+							int start = event.start;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = 2;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.end = event.start;
+							event.start = start;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					startBounds = sentenceEnd1;
-					int sentenceEnd2 = nextIndexOfNotChar (text, " \n", sentenceEnd1);
-					if (sentenceEnd2 == length) {
-						startBounds = endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END:
+						if (0 < event.start) {
+							int end = event.end;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.start = event.end;
+							event.end = end;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					sentenceEnd2 = nextIndexOfChar (text, "!?.", sentenceEnd2);
-					if (sentenceEnd2 == -1) {
-						endBounds = length;
+				}
+				OS.memmove (start_offset, new int[] {event.start}, 4);
+				OS.memmove (end_offset, new int[] {event.end}, 4);
+				return getStringPtr (event.result);
+			}
+			int offset = (int)/*64*/offset_value;
+			String text = object.getText ();
+			if (text != null && text.length () > 0) {
+				length = text.length ();
+				offset = Math.min (offset, length - 1);
+				int startBounds = offset;
+				int endBounds = offset;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: {
+						if (length > offset) endBounds++;
 						break;
 					}
-					endBounds = nextIndexOfNotChar (text, "!?.", sentenceEnd2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
-					int lineStart1 = text.indexOf ('\n', offset - 1);
-					if (lineStart1 == -1) {
-						startBounds = endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
+						int wordStart1 = nextIndexOfChar (text, " !?.\n", offset - 1);
+						if (wordStart1 == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						wordStart1 = nextIndexOfNotChar (text, " !?.\n", wordStart1);
+						if (wordStart1 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = wordStart1;
+						int wordStart2 = nextIndexOfChar (text, " !?.\n", wordStart1);
+						if (wordStart2 == -1) {
+							endBounds = length;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, " !?.\n", wordStart2);
 						break;
 					}
-					lineStart1 = nextIndexOfNotChar (text, "\n", lineStart1);
-					if (lineStart1 == length) {
-						startBounds = endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
+						int previousWordEnd = previousIndexOfNotChar (text, " \n", offset); 
+						if (previousWordEnd == -1 || previousWordEnd != offset - 1) {
+							offset = nextIndexOfNotChar (text, " \n", offset);
+						}
+						if (offset == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						int wordEnd1 = nextIndexOfChar (text, " !?.\n", (int)/*64*/offset);
+						if (wordEnd1 == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						wordEnd1 = nextIndexOfNotChar (text, "!?.", wordEnd1);
+						if (wordEnd1 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = wordEnd1;
+						int wordEnd2 = nextIndexOfNotChar (text, " \n", wordEnd1);
+						if (wordEnd2 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						wordEnd2 = nextIndexOfChar (text, " !?.\n", wordEnd2);
+						if (wordEnd2 == -1) {
+							endBounds = length;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, "!?.", wordEnd2);
 						break;
 					}
-					startBounds = lineStart1;
-					int lineStart2 = text.indexOf ('\n', lineStart1);
-					if (lineStart2 == -1) {
-						endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
+						int previousSentenceEnd = previousIndexOfChar (text, "!?.", offset);
+						int previousText = previousIndexOfNotChar (text, " !?.\n", offset);
+						int sentenceStart1 = 0;
+						if (previousSentenceEnd >= previousText) {
+							sentenceStart1 = nextIndexOfNotChar (text, " !?.\n", offset);
+						} else {
+							sentenceStart1 = nextIndexOfChar (text, "!?.", offset);
+							if (sentenceStart1 == -1) {
+								startBounds = endBounds = length;
+								break;
+							}
+							sentenceStart1 = nextIndexOfNotChar (text, " !?.\n", sentenceStart1);
+						}
+						if (sentenceStart1 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = sentenceStart1;
+						int sentenceStart2 = nextIndexOfChar (text, "!?.", sentenceStart1);
+						if (sentenceStart2 == -1) {
+							endBounds = length;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, " !?.\n", sentenceStart2);
 						break;
 					}
-					lineStart2 = nextIndexOfNotChar (text, "\n", lineStart2);
-					endBounds = lineStart2;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
-					int lineEnd1 = nextIndexOfChar (text, "\n", offset);
-					if (lineEnd1 == -1) {
-						startBounds = endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
+						int sentenceEnd1 = nextIndexOfChar (text, "!?.", offset);
+						if (sentenceEnd1 == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						sentenceEnd1 = nextIndexOfNotChar (text, "!?.", sentenceEnd1);
+						if (sentenceEnd1 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = sentenceEnd1;
+						int sentenceEnd2 = nextIndexOfNotChar (text, " \n", sentenceEnd1);
+						if (sentenceEnd2 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						sentenceEnd2 = nextIndexOfChar (text, "!?.", sentenceEnd2);
+						if (sentenceEnd2 == -1) {
+							endBounds = length;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, "!?.", sentenceEnd2);
 						break;
 					}
-					startBounds = lineEnd1;
-					if (startBounds == length) {
-						endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
+						int lineStart1 = text.indexOf ('\n', offset - 1);
+						if (lineStart1 == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						lineStart1 = nextIndexOfNotChar (text, "\n", lineStart1);
+						if (lineStart1 == length) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = lineStart1;
+						int lineStart2 = text.indexOf ('\n', lineStart1);
+						if (lineStart2 == -1) {
+							endBounds = length;
+							break;
+						}
+						lineStart2 = nextIndexOfNotChar (text, "\n", lineStart2);
+						endBounds = lineStart2;
 						break;
 					}
-					int lineEnd2 = nextIndexOfChar (text, "\n", lineEnd1 + 1);
-					if (lineEnd2 == -1) {
-						endBounds = length;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
+						int lineEnd1 = nextIndexOfChar (text, "\n", offset);
+						if (lineEnd1 == -1) {
+							startBounds = endBounds = length;
+							break;
+						}
+						startBounds = lineEnd1;
+						if (startBounds == length) {
+							endBounds = length;
+							break;
+						}
+						int lineEnd2 = nextIndexOfChar (text, "\n", lineEnd1 + 1);
+						if (lineEnd2 == -1) {
+							endBounds = length;
+							break;
+						}
+						endBounds = lineEnd2;
 						break;
 					}
-					endBounds = lineEnd2;
-					break;
-				}
-			}
-			OS.memmove (start_offset, new int[] {startBounds}, 4);
-			OS.memmove (end_offset, new int[] {endBounds}, 4);
-			text = text.substring (startBounds, endBounds);
-			byte[] bytes = Converter.wcsToMbcs (null, text, true);
-			int /*long*/ result = OS.g_malloc (bytes.length);
-			OS.memmove (result, bytes, bytes.length);
-			return result;
-		} 
+				}
+				OS.memmove (start_offset, new int[] {startBounds}, 4);
+				OS.memmove (end_offset, new int[] {endBounds}, 4);
+				text = text.substring (startBounds, endBounds);
+				return getStringPtr (text);
+			} 
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_text_after_offset != 0) {
+			return ATK.call (iface.get_text_after_offset, atkObject, offset_value, boundary_type, start_offset, end_offset);
+		}
 		return 0;
 	}
 
 	static int /*long*/ atkText_get_text_at_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_text_at_offset: " + offset_value + " start: " + start_offset + " end: " + end_offset);
-		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		int offset = (int)/*64*/offset_value;
-		String text = object.getText ();
-		if (text.length () > 0) {
-			int length = text.length ();
-			offset = Math.min (offset, length - 1);
-			int startBounds = offset;
-			int endBounds = offset;
-			switch ((int)/*64*/boundary_type) {
-				case ATK.ATK_TEXT_BOUNDARY_CHAR: {
-					if (length > offset) endBounds++;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
-					int wordStart1 = previousIndexOfNotChar (text, " !?.\n", offset);
-					if (wordStart1 == -1) {
-						startBounds = endBounds = 0;
-						break;
-					}
-					wordStart1 = previousIndexOfChar (text, " !?.\n", wordStart1) + 1;
-					if (wordStart1 == -1) {
-						startBounds = 0;
+		if (DEBUG) print ("-->atkText_get_text_at_offset: " + offset_value + " start: " + start_offset + " end: " + end_offset);
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int /*long*/ charCount = atkText_get_character_count (atkObject);
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = event.end = (int)/*64*/offset_value;
+				event.count = 0;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+				}
+				int eventStart = event.start;
+				int eventEnd = event.end;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START:
+						if (event.end < charCount) {
+							int start = event.start;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = 1;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.end = event.start;
+							event.start = start;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					startBounds = wordStart1;
-					int wordStart2 = nextIndexOfChar (text, " !?.\n", wordStart1);
-					endBounds = nextIndexOfNotChar (text, " !?.\n", wordStart2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
-					int wordEnd1 = previousIndexOfNotChar (text, "!?.", offset + 1);
-					wordEnd1 = previousIndexOfChar (text, " !?.\n", wordEnd1);
-					wordEnd1 = previousIndexOfNotChar (text, " \n", wordEnd1 + 1);
-					if (wordEnd1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END:
+						if (0 < event.start) {
+							int end = event.end;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = -1;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.start = event.end;
+							event.end = end;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					startBounds = wordEnd1 + 1;
-					int wordEnd2 = nextIndexOfNotChar (text, " \n", startBounds);
-					if (wordEnd2 == length) {
-						endBounds = startBounds;
+				}
+				OS.memmove (start_offset, new int[] {event.start}, 4);
+				OS.memmove (end_offset, new int[] {event.end}, 4);
+				return getStringPtr (event.result);
+			}
+			int offset = (int)/*64*/offset_value;
+			String text = object.getText ();
+			if (text != null && text.length () > 0) {
+				length = text.length ();
+				offset = Math.min (offset, length - 1);
+				int startBounds = offset;
+				int endBounds = offset;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: {
+						if (length > offset) endBounds++;
 						break;
 					}
-					wordEnd2 = nextIndexOfChar (text, " !?.\n", wordEnd2);
-					if (wordEnd2 == -1) {
-						endBounds = startBounds;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
+						int wordStart1 = previousIndexOfNotChar (text, " !?.\n", offset);
+						if (wordStart1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						wordStart1 = previousIndexOfChar (text, " !?.\n", wordStart1) + 1;
+						if (wordStart1 == -1) {
+							startBounds = 0;
+							break;
+						}
+						startBounds = wordStart1;
+						int wordStart2 = nextIndexOfChar (text, " !?.\n", wordStart1);
+						endBounds = nextIndexOfNotChar (text, " !?.\n", wordStart2);
 						break;
 					}
-					endBounds = nextIndexOfNotChar (text, "!?.", wordEnd2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
-					int sentenceStart1 = previousIndexOfNotChar (text, " !?.\n", offset + 1);
-					if (sentenceStart1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
+						int wordEnd1 = previousIndexOfNotChar (text, "!?.", offset + 1);
+						wordEnd1 = previousIndexOfChar (text, " !?.\n", wordEnd1);
+						wordEnd1 = previousIndexOfNotChar (text, " \n", wordEnd1 + 1);
+						if (wordEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						startBounds = wordEnd1 + 1;
+						int wordEnd2 = nextIndexOfNotChar (text, " \n", startBounds);
+						if (wordEnd2 == length) {
+							endBounds = startBounds;
+							break;
+						}
+						wordEnd2 = nextIndexOfChar (text, " !?.\n", wordEnd2);
+						if (wordEnd2 == -1) {
+							endBounds = startBounds;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, "!?.", wordEnd2);
 						break;
 					}
-					sentenceStart1 = previousIndexOfChar (text, "!?.", sentenceStart1) + 1;
-					startBounds = nextIndexOfNotChar (text, " \n", sentenceStart1);
-					int sentenceStart2 = nextIndexOfChar (text, "!?.", startBounds);
-					endBounds = nextIndexOfNotChar (text, " !?.\n", sentenceStart2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
-					int sentenceEnd1 = previousIndexOfNotChar (text, "!?.", offset + 1);
-					sentenceEnd1 = previousIndexOfChar (text, "!?.", sentenceEnd1);
-					sentenceEnd1 = previousIndexOfNotChar (text, " \n", sentenceEnd1 + 1);
-					if (sentenceEnd1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
+						int sentenceStart1 = previousIndexOfNotChar (text, " !?.\n", offset + 1);
+						if (sentenceStart1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						sentenceStart1 = previousIndexOfChar (text, "!?.", sentenceStart1) + 1;
+						startBounds = nextIndexOfNotChar (text, " \n", sentenceStart1);
+						int sentenceStart2 = nextIndexOfChar (text, "!?.", startBounds);
+						endBounds = nextIndexOfNotChar (text, " !?.\n", sentenceStart2);
 						break;
 					}
-					startBounds = sentenceEnd1 + 1;
-					int sentenceEnd2 = nextIndexOfNotChar (text, " \n", startBounds);
-					if (sentenceEnd2 == length) {
-						endBounds = startBounds;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
+						int sentenceEnd1 = previousIndexOfNotChar (text, "!?.", offset + 1);
+						sentenceEnd1 = previousIndexOfChar (text, "!?.", sentenceEnd1);
+						sentenceEnd1 = previousIndexOfNotChar (text, " \n", sentenceEnd1 + 1);
+						if (sentenceEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						startBounds = sentenceEnd1 + 1;
+						int sentenceEnd2 = nextIndexOfNotChar (text, " \n", startBounds);
+						if (sentenceEnd2 == length) {
+							endBounds = startBounds;
+							break;
+						}
+						sentenceEnd2 = nextIndexOfChar (text, "!?.", sentenceEnd2);
+						if (sentenceEnd2 == -1) {
+							endBounds = startBounds;
+							break;
+						}
+						endBounds = nextIndexOfNotChar (text, "!?.", sentenceEnd2);
 						break;
 					}
-					sentenceEnd2 = nextIndexOfChar (text, "!?.", sentenceEnd2);
-					if (sentenceEnd2 == -1) {
-						endBounds = startBounds;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
+						startBounds = previousIndexOfChar (text, "\n", offset) + 1;
+						int lineEnd2 = nextIndexOfChar (text, "\n", startBounds);
+						if (lineEnd2 < length) lineEnd2++;
+						endBounds = lineEnd2;
 						break;
 					}
-					endBounds = nextIndexOfNotChar (text, "!?.", sentenceEnd2);
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
-					startBounds = previousIndexOfChar (text, "\n", offset) + 1;
-					int lineEnd2 = nextIndexOfChar (text, "\n", startBounds);
-					if (lineEnd2 < length) lineEnd2++;
-					endBounds = lineEnd2;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
-					int lineEnd1 = previousIndexOfChar (text, "\n", offset);
-					if (lineEnd1 == -1) {
-						startBounds = endBounds = 0;
-						break;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
+						int lineEnd1 = previousIndexOfChar (text, "\n", offset);
+						if (lineEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						startBounds = lineEnd1;
+						endBounds = nextIndexOfChar (text, "\n", lineEnd1 + 1);
 					}
-					startBounds = lineEnd1;
-					endBounds = nextIndexOfChar (text, "\n", lineEnd1 + 1);
-				}
-			}
-			OS.memmove (start_offset, new int[] {startBounds}, 4);
-			OS.memmove (end_offset, new int[] {endBounds}, 4);
-			text = text.substring (startBounds, endBounds);
-			byte[] bytes = Converter.wcsToMbcs (null, text, true);
-			int /*long*/ result = OS.g_malloc (bytes.length);
-			OS.memmove (result, bytes, bytes.length);
-			return result;
-		} 
+				}
+				OS.memmove (start_offset, new int[] {startBounds}, 4);
+				OS.memmove (end_offset, new int[] {endBounds}, 4);
+				text = text.substring (startBounds, endBounds);
+				return getStringPtr (text);
+			} 
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_text_at_offset != 0) {
+			return ATK.call (iface.get_text_at_offset, atkObject, offset_value, boundary_type, start_offset, end_offset);
+		}
 		return 0;
 	}
 
 	static int /*long*/ atkText_get_text_before_offset (int /*long*/ atkObject, int /*long*/ offset_value, int /*long*/ boundary_type, int /*long*/ start_offset, int /*long*/ end_offset) {
-		if (DEBUG) System.out.println ("-->atkText_get_text_before_offset");
-		AccessibleObject object = getAccessibleObject (atkObject);
-		if (object == null) return 0;
-		int offset = (int)/*64*/offset_value;
-		String text = object.getText ();
-		if (text.length () > 0) {
-			int length = text.length ();
-			offset = Math.min (offset, length - 1);
-			int startBounds = offset;
-			int endBounds = offset;
-			switch ((int)/*64*/boundary_type) {
-				case ATK.ATK_TEXT_BOUNDARY_CHAR: {
-					if (length >= offset && offset > 0) startBounds--;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
-					int wordStart1 = previousIndexOfChar (text, " !?.\n", offset - 1);
-					if (wordStart1 == -1) {
-						startBounds = endBounds = 0;
-						break;
-					}
-					int wordStart2 = previousIndexOfNotChar (text, " !?.\n", wordStart1);
-					if (wordStart2 == -1) {
-						startBounds = endBounds = 0;
-						break;
-					}
-					endBounds = wordStart1 + 1;
-					startBounds = previousIndexOfChar (text, " !?.\n", wordStart2) + 1;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
-					int wordEnd1 =previousIndexOfChar (text, " !?.\n", offset);
-					if (wordEnd1 == -1) {
-						startBounds = endBounds = 0;
-						break;
-					}
-					wordEnd1 = previousIndexOfNotChar (text, " \n", wordEnd1 + 1);
-					if (wordEnd1 == -1) {
-						startBounds = endBounds = 0;
+		if (DEBUG) print ("-->atkText_get_text_before_offset");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleTextExtendedListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				int /*long*/ charCount = atkText_get_character_count (atkObject);
+				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
+				event.start = event.end = (int)/*64*/offset_value;
+				event.count = -1;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: event.type = ACC.TEXT_BOUNDARY_WORD; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: event.type = ACC.TEXT_BOUNDARY_LINE; break; 
+				}
+				int eventStart = event.start;
+				int eventEnd = event.end;
+				for (int i = 0; i < length; i++) {
+					AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+					listener.getText(event);
+				}
+				OS.memmove (start_offset, new int[] {event.start}, 4);
+				OS.memmove (end_offset, new int[] {event.end}, 4);
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START:
+						if (event.end < charCount) {
+							int start = event.start;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.end = event.start;
+							event.start = start;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					endBounds = wordEnd1 + 1;
-					int wordEnd2 = previousIndexOfNotChar (text, " !?.\n", endBounds);
-					wordEnd2 = previousIndexOfChar (text, " !?.\n", wordEnd2);
-					if (wordEnd2 == -1) {
-						startBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: 
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: 
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END:
+						if (0 < event.start) {
+							int end = event.end;
+							event.start = eventStart;
+							event.end = eventEnd;
+							event.count = -2;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+							event.start = event.end;
+							event.end = end;
+							event.type = ACC.TEXT_BOUNDARY_ALL;
+							event.count = 0;
+							for (int i = 0; i < length; i++) {
+								AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) listeners.elementAt(i);
+								listener.getText(event);
+							}
+						}
 						break;
-					}
-					startBounds = previousIndexOfNotChar (text, " \n", wordEnd2 + 1) + 1;
-					break;
 				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
-					int sentenceStart1 = previousIndexOfChar (text, "!?.", offset);
-					if (sentenceStart1 == -1) {
-						startBounds = endBounds = 0;
+				return getStringPtr (event.result);
+			}
+			int offset = (int)/*64*/offset_value;
+			String text = object.getText ();
+			if (text != null && text.length () > 0) {
+				length = text.length ();
+				offset = Math.min (offset, length - 1);
+				int startBounds = offset;
+				int endBounds = offset;
+				switch ((int)/*64*/boundary_type) {
+					case ATK.ATK_TEXT_BOUNDARY_CHAR: {
+						if (length >= offset && offset > 0) startBounds--;
 						break;
 					}
-					int sentenceStart2 = previousIndexOfNotChar (text, "!?.", sentenceStart1);
-					if (sentenceStart2 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_START: {
+						int wordStart1 = previousIndexOfChar (text, " !?.\n", offset - 1);
+						if (wordStart1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						int wordStart2 = previousIndexOfNotChar (text, " !?.\n", wordStart1);
+						if (wordStart2 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = wordStart1 + 1;
+						startBounds = previousIndexOfChar (text, " !?.\n", wordStart2) + 1;
 						break;
 					}
-					endBounds = sentenceStart1 + 1;
-					startBounds = previousIndexOfChar (text, "!?.", sentenceStart2) + 1;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
-					int sentenceEnd1 = previousIndexOfChar (text, "!?.", offset);
-					if (sentenceEnd1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_WORD_END: {
+						int wordEnd1 =previousIndexOfChar (text, " !?.\n", offset);
+						if (wordEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						wordEnd1 = previousIndexOfNotChar (text, " \n", wordEnd1 + 1);
+						if (wordEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = wordEnd1 + 1;
+						int wordEnd2 = previousIndexOfNotChar (text, " !?.\n", endBounds);
+						wordEnd2 = previousIndexOfChar (text, " !?.\n", wordEnd2);
+						if (wordEnd2 == -1) {
+							startBounds = 0;
+							break;
+						}
+						startBounds = previousIndexOfNotChar (text, " \n", wordEnd2 + 1) + 1;
 						break;
 					}
-					sentenceEnd1 = previousIndexOfNotChar (text, " \n", sentenceEnd1 + 1);
-					if (sentenceEnd1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_START: {
+						int sentenceStart1 = previousIndexOfChar (text, "!?.", offset);
+						if (sentenceStart1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						int sentenceStart2 = previousIndexOfNotChar (text, "!?.", sentenceStart1);
+						if (sentenceStart2 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = sentenceStart1 + 1;
+						startBounds = previousIndexOfChar (text, "!?.", sentenceStart2) + 1;
 						break;
 					}
-					endBounds = sentenceEnd1 + 1;
-					int sentenceEnd2 = previousIndexOfNotChar (text, "!?.", endBounds);
-					sentenceEnd2 = previousIndexOfChar (text, "!?.", sentenceEnd2);
-					if (sentenceEnd2 == -1) {
-						startBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_SENTENCE_END: {
+						int sentenceEnd1 = previousIndexOfChar (text, "!?.", offset);
+						if (sentenceEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						sentenceEnd1 = previousIndexOfNotChar (text, " \n", sentenceEnd1 + 1);
+						if (sentenceEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = sentenceEnd1 + 1;
+						int sentenceEnd2 = previousIndexOfNotChar (text, "!?.", endBounds);
+						sentenceEnd2 = previousIndexOfChar (text, "!?.", sentenceEnd2);
+						if (sentenceEnd2 == -1) {
+							startBounds = 0;
+							break;
+						}
+						startBounds = previousIndexOfNotChar (text, " \n", sentenceEnd2 + 1) + 1;
 						break;
 					}
-					startBounds = previousIndexOfNotChar (text, " \n", sentenceEnd2 + 1) + 1;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
-					int lineStart1 = previousIndexOfChar (text, "\n", offset);
-					if (lineStart1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_START: {
+						int lineStart1 = previousIndexOfChar (text, "\n", offset);
+						if (lineStart1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = lineStart1 + 1;
+						startBounds = previousIndexOfChar (text, "\n", lineStart1) + 1;
 						break;
 					}
-					endBounds = lineStart1 + 1;
-					startBounds = previousIndexOfChar (text, "\n", lineStart1) + 1;
-					break;
-				}
-				case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
-					int lineEnd1 = previousIndexOfChar (text, "\n", offset);
-					if (lineEnd1 == -1) {
-						startBounds = endBounds = 0;
+					case ATK.ATK_TEXT_BOUNDARY_LINE_END: {
+						int lineEnd1 = previousIndexOfChar (text, "\n", offset);
+						if (lineEnd1 == -1) {
+							startBounds = endBounds = 0;
+							break;
+						}
+						endBounds = lineEnd1;
+						startBounds = previousIndexOfChar (text, "\n", lineEnd1);
+						if (startBounds == -1) startBounds = 0;
 						break;
 					}
-					endBounds = lineEnd1;
-					startBounds = previousIndexOfChar (text, "\n", lineEnd1);
-					if (startBounds == -1) startBounds = 0;
-					break;
-				}
-			}
-			OS.memmove (start_offset, new int[] {startBounds}, 4);
-			OS.memmove (end_offset, new int[] {endBounds}, 4);
-			text = text.substring (startBounds, endBounds);
-			byte[] bytes = Converter.wcsToMbcs (null, text, true);
-			int /*long*/ result = OS.g_malloc (bytes.length);
-			OS.memmove (result, bytes, bytes.length);
-			return result;
-		} 
+				}
+				OS.memmove (start_offset, new int[] {startBounds}, 4);
+				OS.memmove (end_offset, new int[] {endBounds}, 4);
+				text = text.substring (startBounds, endBounds);
+				return getStringPtr (text);
+			}
+		}
+		AtkTextIface iface = getTextIface (atkObject);
+		if (iface != null && iface.get_text_before_offset != 0) {
+			return ATK.call (iface.get_text_before_offset, atkObject, offset_value, boundary_type, start_offset, end_offset);
+		}
+		return 0;
+	}
+	
+	static void setGValue (int /*long*/ value, Number number) {
+		if (number == null) return;
+		if (OS.G_VALUE_TYPE(value) != 0) OS.g_value_unset(value);
+		if (number instanceof Double) {
+			OS.g_value_init(value, OS.G_TYPE_DOUBLE());
+			OS.g_value_set_double(value, number.doubleValue());
+		} else if (number instanceof Float) {
+			OS.g_value_init(value, OS.G_TYPE_FLOAT());
+			OS.g_value_set_float(value, number.floatValue());
+		} else if (number instanceof Long) {
+			OS.g_value_init(value, OS.G_TYPE_INT64());
+			OS.g_value_set_int64(value, number.longValue());
+		} else {
+			OS.g_value_init(value, OS.G_TYPE_INT());
+			OS.g_value_set_int(value, number.intValue());
+		}
+	}
+
+	static Number getGValue (int /*long*/ value) {
+		int /*long*/ type = OS.G_VALUE_TYPE(value);
+		if (type == 0) return null;
+		if (type == OS.G_TYPE_DOUBLE()) return new Double(OS.g_value_get_double(value));
+		if (type == OS.G_TYPE_FLOAT()) return new Float(OS.g_value_get_float(value));
+		if (type == OS.G_TYPE_INT64()) return new Long(OS.g_value_get_int64(value));
+		return new Integer(OS.g_value_get_int(value));
+	}
+	
+	static AtkValueIface getValueIface (int /*long*/ atkObject) {
+		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_VALUE())) {
+			AtkValueIface iface = new AtkValueIface ();
+			ATK.memmove (iface, ATK.g_type_interface_peek_parent (ATK.ATK_VALUE_GET_IFACE (atkObject)));
+			return iface;
+		}
+		return null;
+	}
+	static int /*long*/ atkValue_get_current_value (int /*long*/ atkObject, int /*long*/ value) {
+		if (DEBUG) print ("-->atkValue_get_current_value");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		AtkValueIface iface = getValueIface (atkObject);
+		if (iface != null && iface.get_current_value != 0) {
+			ATK.call (iface.get_current_value, atkObject, value);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleValueListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
+				event.value = getGValue(value);
+				for (int i = 0; i < length; i++) {
+					AccessibleValueListener listener = (AccessibleValueListener) listeners.elementAt(i);
+					listener.getCurrentValue(event);
+				}
+				setGValue(value, event.value);
+			}
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkValue_get_maximum_value (int /*long*/ atkObject, int /*long*/ value) {
+		if (DEBUG) print ("-->atkValue_get_maximum_value");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		AtkValueIface iface = getValueIface (atkObject);
+		if (iface != null && iface.get_maximum_value != 0) {
+			ATK.call (iface.get_maximum_value, atkObject, value);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleValueListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
+				event.value = getGValue(value);
+				for (int i = 0; i < length; i++) {
+					AccessibleValueListener listener = (AccessibleValueListener) listeners.elementAt(i);
+					listener.getMaximumValue(event);
+				}
+				setGValue(value, event.value);
+			}
+		}
+		return 0;
+	}
+
+	static int /*long*/ atkValue_get_minimum_value (int /*long*/ atkObject, int /*long*/ value) {
+		if (DEBUG) print ("-->atkValue_get_minimum_value");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		AtkValueIface iface = getValueIface (atkObject);
+		if (iface != null && iface.get_minimum_value != 0) {
+			ATK.call (iface.get_minimum_value, atkObject, value);
+		}
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleValueListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
+				event.value = getGValue(value);
+				for (int i = 0; i < length; i++) {
+					AccessibleValueListener listener = (AccessibleValueListener) listeners.elementAt(i);
+					listener.getMinimumValue(event);
+				}
+				setGValue(value, event.value);
+			}
+		}
 		return 0;
 	}
 
-	AccessibleListener[] getAccessibleListeners () {
-		if (accessible == null) return new AccessibleListener [0];
-		AccessibleListener[] result = accessible.getAccessibleListeners ();
-		return result != null ? result : new AccessibleListener [0];
+	static int /*long*/ atkValue_set_current_value (int /*long*/ atkObject, int /*long*/ value) {
+		if (DEBUG) print ("-->atkValue_set_current_value");
+		AccessibleObject object = getAccessibleObject (atkObject);
+		if (object != null) {
+			Accessible accessible = object.accessible;
+			Vector listeners = accessible.accessibleValueListeners;
+			int length = listeners.size();
+			if (length > 0) {
+				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
+				event.value = getGValue(value);
+				for (int i = 0; i < length; i++) {
+					AccessibleValueListener listener = (AccessibleValueListener) listeners.elementAt(i);
+					listener.setCurrentValue(event);
+				}
+				return event.value != null ? 1 : 0;
+			}
+		}
+		int /*long*/ parentResult = 0;
+		AtkValueIface iface = getValueIface (atkObject);
+		if (iface != null && iface.set_current_value != 0) {
+			parentResult = ATK.call (iface.set_current_value, atkObject, value);
+		}
+		return parentResult;
 	}
 
 	static AccessibleObject getAccessibleObject (int /*long*/ atkObject) {
@@ -1184,74 +3032,53 @@ class AccessibleObject {
 		return object;
 	}
 	
-	AccessibleObject getChildByHandle (int /*long*/ handle) {
-		return (AccessibleObject) children.get (new LONG (handle));	
-	}	
-
 	AccessibleObject getChildByID (int childId) {
 		if (childId == ACC.CHILDID_SELF) return this;
-		Enumeration elements = children.elements ();
-		while (elements.hasMoreElements ()) {
-			AccessibleObject object = (AccessibleObject) elements.nextElement ();
-			if (object.id == childId) return object;
+		if (childId == ACC.CHILDID_NONE || childId == ACC.CHILDID_MULTIPLE) return null;
+		if (children != null) {
+			for (int i = 0; i < children.length; i++) {
+				AccessibleObject child = children[i];
+				if (child != null && child.id == childId) return child;
+			}
 		}
 		return null;
 	}
 	
 	AccessibleObject getChildByIndex (int childIndex) {
-		Enumeration elements = children.elements ();
-		while (elements.hasMoreElements ()) {
-			AccessibleObject object = (AccessibleObject) elements.nextElement ();
-			if (object.index == childIndex) return object;
-		}
+		if (children != null && childIndex < children.length) return children [childIndex];
 		return null;
 	}
 	
-	AccessibleControlListener[] getControlListeners () {
-		if (accessible == null) return new AccessibleControlListener [0];
-		AccessibleControlListener[] result = accessible.getControlListeners (); 
-		return result != null ? result : new AccessibleControlListener [0];
-	}
-
 	String getText () {
-		int /*long*/ parentResult = 0;
-		String parentText = "";	//$NON-NLS-1$
-		if (ATK.g_type_is_a (parentType, ATK_TEXT_TYPE)) {
-			int /*long*/ superType = ATK.g_type_interface_peek_parent (ATK.ATK_TEXT_GET_IFACE (handle));
-			AtkTextIface textIface = new AtkTextIface ();
-			ATK.memmove (textIface, superType);
-			int /*long*/ characterCount = 0;
-			if (textIface.get_character_count != 0) {
-				characterCount = ATK.call (textIface.get_character_count, handle);
-			}
-			if (characterCount > 0 && textIface.get_text != 0) {
-				parentResult = ATK.call (textIface.get_text, handle, 0, characterCount);
-				if (parentResult != 0) {
-					int length = OS.strlen (parentResult);
-					byte [] buffer = new byte [length];
-					OS.memmove (buffer, parentResult, length);
-					parentText = new String (Converter.mbcsToWcs (null, buffer));
-				}
-			}
-		}
-		AccessibleControlListener[] controlListeners = getControlListeners ();
-		if (controlListeners.length == 0) return parentText;
-		AccessibleControlEvent event = new AccessibleControlEvent (accessible);
-		event.childID = id;
-		event.result = parentText;
-		for (int i = 0; i < controlListeners.length; i++) {
-			controlListeners [i].getValue (event);				
+		Vector listeners = accessible.accessibleControlListeners;
+		int length = listeners.size();
+		if (length > 0) {
+			String parentText = "";	//$NON-NLS-1$
+			AtkTextIface iface = getTextIface (handle);
+			if (iface != null && iface.get_character_count != 0) {
+				int /*long*/ characterCount = ATK.call (iface.get_character_count, handle);
+				if (characterCount > 0 && iface.get_text != 0) {
+					int /*long*/ parentResult = ATK.call (iface.get_text, handle, 0, characterCount);
+					if (parentResult != 0) {
+						parentText = getString (parentResult);
+						OS.g_free(parentResult);
+					}
+				}
+			}
+			AccessibleControlEvent event = new AccessibleControlEvent (accessible);
+			event.childID = id;
+			event.result = parentText;
+			for (int i = 0; i < length; i++) {
+				AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+				listener.getValue (event);				
+			}
+			return event.result;
 		}
-		return event.result;
-	}
-	
-	AccessibleTextListener[] getTextListeners () {
-		if (accessible == null) return new AccessibleTextListener [0];
-		AccessibleTextListener[] result = accessible.getTextListeners (); 
-		return result != null ? result : new AccessibleTextListener [0];
+		return null;
 	}
 
 	static int /*long*/ gObjectClass_finalize (int /*long*/ atkObject) {
+		if (DEBUG) print ("-->gObjectClass_finalize: " + atkObject);
 		int /*long*/ superType = ATK.g_type_class_peek_parent (ATK.G_OBJECT_GET_CLASS (atkObject));
 		int /*long*/ gObjectClass = ATK.G_OBJECT_CLASS (superType);
 		GObjectClass objectClassStruct = new GObjectClass ();
@@ -1260,10 +3087,43 @@ class AccessibleObject {
 		AccessibleObject object = (AccessibleObject)AccessibleObjects.get (new LONG (atkObject));
 		if (object != null) {
 			AccessibleObjects.remove (new LONG (atkObject));
-			object.release ();
 		}
 		return 0;
 	}
+
+	static int toATKRelation (int relation) {
+		switch (relation) {
+			case ACC.RELATION_CONTROLLED_BY: return ATK.ATK_RELATION_CONTROLLED_BY;
+			case ACC.RELATION_CONTROLLER_FOR: return ATK.ATK_RELATION_CONTROLLER_FOR;
+			case ACC.RELATION_DESCRIBED_BY: return ATK.ATK_RELATION_DESCRIBED_BY;
+			case ACC.RELATION_DESCRIPTION_FOR: return ATK.ATK_RELATION_DESCRIPTION_FOR;
+			case ACC.RELATION_EMBEDDED_BY: return ATK.ATK_RELATION_EMBEDDED_BY;
+			case ACC.RELATION_EMBEDS: return ATK.ATK_RELATION_EMBEDS;
+			case ACC.RELATION_FLOWS_FROM: return ATK.ATK_RELATION_FLOWS_FROM;
+			case ACC.RELATION_FLOWS_TO: return ATK.ATK_RELATION_FLOWS_TO;
+			case ACC.RELATION_LABEL_FOR: return ATK.ATK_RELATION_LABEL_FOR;
+			case ACC.RELATION_LABELLED_BY: return ATK.ATK_RELATION_LABELLED_BY;
+			case ACC.RELATION_MEMBER_OF: return ATK.ATK_RELATION_MEMBER_OF;
+			case ACC.RELATION_NODE_CHILD_OF: return ATK.ATK_RELATION_NODE_CHILD_OF;
+			case ACC.RELATION_PARENT_WINDOW_OF: return ATK.ATK_RELATION_PARENT_WINDOW_OF;
+			case ACC.RELATION_POPUP_FOR: return ATK.ATK_RELATION_POPUP_FOR;
+			case ACC.RELATION_SUBWINDOW_OF: return ATK.ATK_RELATION_SUBWINDOW_OF;
+		}
+		return 0;
+	}
+	
+	static void windowPoint (AccessibleObject object, int [] x, int [] y) {
+		GtkAccessible gtkAccessible = new GtkAccessible ();
+		ATK.memmove (gtkAccessible, object.handle);
+		while (gtkAccessible.widget == 0 && object.parent != null) {
+			object = object.parent;
+			ATK.memmove (gtkAccessible, object.handle);
+		}
+		if (gtkAccessible.widget == 0) return;
+		int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
+		int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);				
+		OS.gdk_window_get_origin (window, x, y);
+	}
 	
 	static int nextIndexOfChar (String string, String searchChars, int startIndex) {
 		int result = string.length ();
@@ -1308,38 +3168,241 @@ class AccessibleObject {
 		}
 		return index;
 	}
+	
+	void addRelation (int type, Accessible target) {
+		OS.atk_object_add_relationship(handle, toATKRelation(type), target.getAccessibleObject().handle);
+	}
 
 	void release () {
-		if (DEBUG) System.out.println("AccessibleObject.release: " + handle);
+		if (DEBUG) print("AccessibleObject.release: " + handle);
 		accessible = null;
-		Enumeration elements = children.elements ();
-		while (elements.hasMoreElements ()) {
-			AccessibleObject child = (AccessibleObject) elements.nextElement ();
-			if (child.isLightweight) OS.g_object_unref (child.handle);
+		if (children != null) {
+			for (int i = 0; i < children.length; i++) {
+				AccessibleObject child = children [i];
+				if (child != null) OS.g_object_unref(child.handle);
+			}
+			children = null;
+		}
+		// TODO remove from children from parent?
+		if (isLightweight) {
+			OS.g_object_unref(handle);
 		}
-		if (parent != null) parent.removeChild (this, false);
 	}
 	
-	void removeChild (AccessibleObject child, boolean unref) {
-		children.remove (new LONG (child.handle));
-		if (unref && child.isLightweight) OS.g_object_unref (child.handle);
+	void removeRelation (int type, Accessible target) {
+		OS.atk_object_remove_relationship (handle, toATKRelation(type), target.getAccessibleObject().handle);
 	}
 	
 	void selectionChanged () {
 		OS.g_signal_emit_by_name (handle, ATK.selection_changed);
 	}
 	
+	void sendEvent(int event, Object eventData) {
+		switch (event) {
+			case ACC.EVENT_SELECTION_CHANGED:
+				OS.g_signal_emit_by_name (handle, ATK.selection_changed);
+				break;
+			case ACC.EVENT_TEXT_SELECTION_CHANGED:
+				OS.g_signal_emit_by_name (handle, ATK.text_selection_changed);
+				break;
+			case ACC.EVENT_STATE_CHANGED: {
+				if (!(eventData instanceof int[])) break;
+				int[] array = (int[])eventData;
+				int state =  array[0];
+				int value = array[1];
+				int atkState = -1;
+				switch (state) {
+					case ACC.STATE_SELECTED: atkState = ATK.ATK_STATE_SELECTED; break;
+					case ACC.STATE_SELECTABLE: atkState = ATK.ATK_STATE_SELECTABLE; break;
+					case ACC.STATE_MULTISELECTABLE: atkState = ATK.ATK_STATE_MULTISELECTABLE; break;
+					case ACC.STATE_FOCUSED: atkState = ATK.ATK_STATE_FOCUSED; break;
+					case ACC.STATE_FOCUSABLE: atkState = ATK.ATK_STATE_FOCUSABLE; break;
+					case ACC.STATE_PRESSED: atkState = ATK.ATK_STATE_PRESSED; break;
+					case ACC.STATE_CHECKED: atkState = ATK.ATK_STATE_CHECKED; break;
+					case ACC.STATE_EXPANDED: atkState = ATK.ATK_STATE_EXPANDED; break;
+					case ACC.STATE_COLLAPSED: atkState = ATK.ATK_STATE_EXPANDED; break;
+					case ACC.STATE_HOTTRACKED: atkState = ATK.ATK_STATE_ARMED; break;
+					case ACC.STATE_BUSY: atkState = ATK.ATK_STATE_BUSY; break;
+					case ACC.STATE_READONLY: atkState = ATK.ATK_STATE_EDITABLE; break;
+					case ACC.STATE_INVISIBLE: atkState = ATK.ATK_STATE_VISIBLE; break;
+					case ACC.STATE_OFFSCREEN: atkState = ATK.ATK_STATE_SHOWING; break;
+					case ACC.STATE_SIZEABLE: atkState = ATK.ATK_STATE_RESIZABLE; break;
+					case ACC.STATE_LINKED: break;
+					case ACC.STATE_DISABLED: atkState = ATK.ATK_STATE_ENABLED; break;
+					case ACC.STATE_ACTIVE: atkState = ATK.ATK_STATE_ACTIVE; break;
+					case ACC.STATE_SINGLELINE: atkState = ATK.ATK_STATE_SINGLE_LINE; break;
+					case ACC.STATE_MULTILINE: atkState = ATK.ATK_STATE_MULTI_LINE; break;
+					case ACC.STATE_REQUIRED: atkState = ATK.ATK_STATE_REQUIRED; break;
+					case ACC.STATE_INVALID_ENTRY: atkState = ATK.ATK_STATE_INVALID_ENTRY; break;
+					case ACC.STATE_SUPPORTS_AUTOCOMPLETION: atkState = ATK.ATK_STATE_SUPPORTS_AUTOCOMPLETION; break;
+				}
+				if (atkState == -1) break;
+				ATK.atk_object_notify_state_change(handle, atkState, value != 0);
+				break;
+			}
+			case ACC.EVENT_LOCATION_CHANGED: {
+				Vector listeners = accessible.accessibleControlListeners;
+				int length = listeners.size();
+				GdkRectangle rect = new GdkRectangle();
+				if (length > 0) {
+					AccessibleControlEvent e = new AccessibleControlEvent (accessible);
+					e.childID = id;
+					for (int i = 0; i < length; i++) {
+						AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+						listener.getLocation (e);
+					}
+					rect.x = e.x;
+					rect.y = e.y;
+					rect.width = e.width;
+					rect.height = e.height;
+				}
+				OS.g_signal_emit_by_name (handle, ATK.bounds_changed, rect);
+				break;
+			}
+			case ACC.EVENT_NAME_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_name);
+				break;
+			case ACC.EVENT_DESCRIPTION_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_description);
+				break;
+			case ACC.EVENT_VALUE_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_value);
+				break;
+			case ACC.EVENT_DOCUMENT_LOAD_COMPLETE:
+				OS.g_signal_emit_by_name (handle, ATK.load_complete);
+				break;
+			case ACC.EVENT_DOCUMENT_LOAD_STOPPED:
+				OS.g_signal_emit_by_name (handle, ATK.load_stopped);
+				break;
+			case ACC.EVENT_DOCUMENT_RELOAD:
+				OS.g_signal_emit_by_name (handle, ATK.reload);
+				break;
+			case ACC.EVENT_PAGE_CHANGED:
+				break;
+			case ACC.EVENT_SECTION_CHANGED:
+				break;
+			case ACC.EVENT_ACTION_CHANGED:
+				break;
+			case ACC.EVENT_HYPERLINK_END_INDEX_CHANGED:
+				OS.g_object_notify(handle, ATK.end_index);
+				break;
+			case ACC.EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED:
+				OS.g_object_notify(handle, ATK.number_of_anchors);
+				break;
+			case ACC.EVENT_HYPERLINK_SELECTED_LINK_CHANGED:
+				OS.g_object_notify(handle, ATK.selected_link);
+				break;
+			case ACC.EVENT_HYPERLINK_START_INDEX_CHANGED:
+				OS.g_object_notify(handle, ATK.start_index);
+				break;
+			case ACC.EVENT_HYPERLINK_ACTIVATED:
+				OS.g_signal_emit_by_name (handle, ATK.link_activated);
+				break;
+			case ACC.EVENT_HYPERTEXT_LINK_SELECTED:
+				if (!(eventData instanceof Integer)) break;
+				int index =  ((Integer)eventData).intValue();
+				OS.g_signal_emit_by_name (handle, ATK.link_selected, index);
+				break;
+			case ACC.EVENT_HYPERTEXT_LINK_COUNT_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_hypertext_nlinks);
+				break;
+			case ACC.EVENT_ATTRIBUTE_CHANGED:
+				OS.g_signal_emit_by_name (handle, ATK.attributes_changed);
+				break;
+			case ACC.EVENT_TABLE_CAPTION_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_caption_object);
+				break;
+			case ACC.EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_column_description);
+				break;
+			case ACC.EVENT_TABLE_COLUMN_HEADER_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_column_header);
+				break;
+			case ACC.EVENT_TABLE_CHANGED: {
+				if (!(eventData instanceof int[])) break;
+				int[] array = (int[])eventData;
+				int type =  array[0];
+				int rowStart = array[1];
+				int rowCount = array[2];
+				int columnStart = array[3];
+				int columnCount = array[4];
+				switch (type) {
+					case ACC.DELETE:
+						if (rowCount > 0) OS.g_signal_emit_by_name (handle, ATK.row_deleted, rowStart, rowCount);
+						if (columnCount > 0) OS.g_signal_emit_by_name (handle, ATK.column_deleted, columnStart, columnCount);
+						break;
+					case ACC.INSERT:
+						if (rowCount > 0) OS.g_signal_emit_by_name (handle, ATK.row_inserted, rowStart, rowCount);
+						if (columnCount > 0) OS.g_signal_emit_by_name (handle, ATK.column_inserted, columnStart, columnCount);
+						break;
+				}
+				break;
+			}
+			case ACC.EVENT_TABLE_ROW_DESCRIPTION_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_row_description);
+				break;
+			case ACC.EVENT_TABLE_ROW_HEADER_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_row_header);
+				break;
+			case ACC.EVENT_TABLE_SUMMARY_CHANGED:
+				OS.g_object_notify(handle, ATK.accessible_table_summary);
+				break;
+			case ACC.EVENT_TEXT_ATTRIBUTE_CHANGED:
+				OS.g_signal_emit_by_name (handle, ATK.text_attributes_changed);
+				break;
+			case ACC.EVENT_TEXT_CARET_MOVED:
+			case ACC.EVENT_TEXT_COLUMN_CHANGED: {
+				int offset = 0;
+				Vector listeners = accessible.accessibleTextExtendedListeners;
+				int length = listeners.size();
+				AccessibleTextEvent e = new AccessibleTextEvent (accessible);
+				if (length > 0) {
+					for (int i = 0; i < length; i++) {
+						AccessibleTextListener listener = (AccessibleTextListener) listeners.elementAt(i);
+						listener.getCaretOffset (e);
+					}
+				} else {
+					listeners = accessible.accessibleTextListeners;
+					length = listeners.size();
+					if (length > 0) {
+						e.childID = id;
+						for (int i = 0; i < length; i++) {
+							AccessibleTextListener listener = (AccessibleTextListener) listeners.elementAt(i);
+							listener.getCaretOffset (e);	
+						}
+					}
+				}
+				offset = e.offset;
+				OS.g_signal_emit_by_name (handle, ATK.text_caret_moved, offset);
+				break;
+			}
+			case ACC.EVENT_TEXT_CHANGED: {
+				if (!(eventData instanceof Object[])) break;
+				Object[] data = (Object[])eventData;
+				int type = ((Integer)data[0]).intValue();
+				int start = ((Integer)data[1]).intValue();
+				int end = ((Integer)data[2]).intValue();
+				switch (type) {
+					case ACC.DELETE:
+						OS.g_signal_emit_by_name (handle, ATK.text_changed_delete, start, end -start);
+						break;
+					case ACC.INSERT:
+						OS.g_signal_emit_by_name (handle, ATK.text_changed_insert, start, end -start);
+						break;
+				}
+				break;
+			}
+		}
+	}
+	
 	void setFocus (int childID) {
 		updateChildren ();
 		AccessibleObject accObject = getChildByID (childID);
 		if (accObject != null) {
-			ATK.atk_focus_tracker_notify (accObject.handle);
+			OS.g_signal_emit_by_name (accObject.handle, ATK.focus_event, 1, 0);
+			ATK.atk_object_notify_state_change(accObject.handle, ATK.ATK_STATE_FOCUSED, true);
 		}
 	}
-
-	void setParent (AccessibleObject parent) {
-		this.parent = parent;
-	}
 	
 	void textCaretMoved(int index) {
 		OS.g_signal_emit_by_name (handle, ATK.text_caret_moved, index);
@@ -1356,62 +3419,60 @@ class AccessibleObject {
 	void textSelectionChanged() {
 		OS.g_signal_emit_by_name (handle, ATK.text_selection_changed);
 	}
-
+	
 	void updateChildren () {
-		if (isLightweight) return;
-		AccessibleControlListener[] listeners = getControlListeners ();
-		if (listeners.length == 0) return;
-
+		Vector listeners = accessible.accessibleControlListeners;
+		int length = listeners.size();
 		AccessibleControlEvent event = new AccessibleControlEvent (accessible);
-		for (int i = 0; i < listeners.length; i++) {
-			listeners [i].getChildren (event);
-		}
-		if (event.children != null && event.children.length > 0) {
-			Vector idsToKeep = new Vector (children.size ());
-			if (event.children [0] instanceof Integer) {
-				/*	an array of child id's (Integers) was answered */
-				int /*long*/ parentType = AccessibleFactory.getDefaultParentType ();
-				for (int i = 0; i < event.children.length; i++) {
-					AccessibleObject object = getChildByIndex (i);
-					if (object == null) {
-						int /*long*/ childType = AccessibleFactory.getChildType (accessible, i);
-						object = new AccessibleObject (childType, 0, accessible, parentType, true);
-						AccessibleObjects.put (new LONG (object.handle), object);
-						addChild (object);
-						object.index = i;
-					}
-					try {
-						object.id = ((Integer)event.children[i]).intValue ();
-					} catch (ClassCastException e) {
-						/* a non-ID value was given so don't set the ID */
-					}
-					idsToKeep.addElement (new LONG (object.handle));
-				}
-			} else {
-				/* an array of Accessible children was answered */
-				int childIndex = 0;
-				for (int i = 0; i < event.children.length; i++) {
-					AccessibleObject object = null;
-					try {
-						object = ((Accessible)event.children [i]).accessibleObject;
-					} catch (ClassCastException e) {
-						/* a non-Accessible value was given so nothing to do here */ 
+		event.childID = id;
+		for (int i = 0; i < length; i++) {
+			AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
+			listener.getChildren (event);
+		}
+		Object[] children = event.children;
+		AccessibleObject[] oldChildren = this.children;
+		int count = children != null ? children.length : 0;
+		AccessibleObject[] newChildren = new AccessibleObject[count];
+		for (int i = 0; i < count; i++) {
+			Object child = children [i];
+			AccessibleObject object = null;
+			if (child instanceof Integer) {
+				int id = ((Integer)child).intValue();
+				object = oldChildren != null && i < oldChildren.length ? oldChildren [i] : null;
+				if (object == null || object.id != id) {
+					event = new AccessibleControlEvent (accessible);
+					event.childID = id;
+					for (int j = 0; j < length; j++) {
+						AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (j);
+						listener.getChild (event);
 					}
-					if (object != null) {
-						object.index = childIndex++;
-						idsToKeep.addElement (new LONG (object.handle));
+					if (event.accessible != null) {
+						object = event.accessible.getAccessibleObject();
+						if (object != null)	OS.g_object_ref(object.handle);
+					} else {
+						object = AccessibleFactory.createChildAccessible (accessible, id);
 					}
+					object.id = id;
+				} else {
+					OS.g_object_ref(object.handle);
 				}
+			} else if (child instanceof Accessible) {
+				object = ((Accessible)child).getAccessibleObject();
+				if (object != null)	OS.g_object_ref(object.handle);
 			}
-			/* remove old children that were not provided as children anymore */
-			Enumeration ids = children.keys ();
-			while (ids.hasMoreElements ()) {
-				LONG id = (LONG)ids.nextElement ();
-				if (!idsToKeep.contains (id)) {
-					AccessibleObject object = (AccessibleObject) children.get (id);
-					removeChild (object, true);
-				}
+			if (object != null) {
+				object.index = i;
+				object.parent = this;
+				newChildren[i] = object;
+			}
+		}
+		if (oldChildren != null) {
+			for (int i = 0; i < oldChildren.length; i++) {
+				AccessibleObject object = oldChildren [i];
+				if (object != null) OS.g_object_unref(object.handle);
 			}
 		}
+		this.children = newChildren;
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index f2d5adc..37d866a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,11 @@
  *******************************************************************************/
 package org.eclipse.swt.accessibility;
 
-
-import java.lang.reflect.Method;
+import java.util.Locale;
 import java.util.Vector;
 import org.eclipse.swt.*;
 import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.win32.*;
 import org.eclipse.swt.ole.win32.*;
 import org.eclipse.swt.internal.ole.win32.*;
@@ -43,18 +43,71 @@ import org.eclipse.swt.internal.ole.win32.*;
  * @since 2.0
  */
 public class Accessible {
+	static final int MAX_RELATION_TYPES = 15;
+	static final int TABLE_MODEL_CHANGE_SIZE = 5;
+	static final int TEXT_CHANGE_SIZE = 4;
+	static final boolean DEBUG = false;
+	static final String PROPERTY_USEIA2 = "org.eclipse.swt.accessibility.UseIA2"; //$NON-NLS-1$
+	static boolean UseIA2 = true;
+	static int UniqueID = -0x10;
 	int refCount = 0, enumIndex = 0;
-	COMObject objIAccessible, objIEnumVARIANT;
+	COMObject objIAccessible, objIEnumVARIANT, objIServiceProvider, objIAccessible2, objIAccessibleAction,
+		objIAccessibleApplication, /*objIAccessibleComponent,*/ /*objIAccessibleEditableText,*/ objIAccessibleHyperlink,
+		objIAccessibleHypertext, /*objIAccessibleImage,*/ objIAccessibleTable2, objIAccessibleTableCell,
+		objIAccessibleText, objIAccessibleValue; /* objIAccessibleRelation is defined in Relation class */
 	IAccessible iaccessible;
 	Vector accessibleListeners = new Vector();
 	Vector accessibleControlListeners = new Vector();
-	Vector textListeners = new Vector ();
+	Vector accessibleTextListeners = new Vector ();
+	Vector accessibleActionListeners = new Vector();
+	Vector accessibleHyperlinkListeners = new Vector();
+	Vector accessibleTableListeners = new Vector();
+	Vector accessibleTableCellListeners = new Vector();
+	Vector accessibleTextExtendedListeners = new Vector();
+	Vector accessibleValueListeners = new Vector();
+	Vector accessibleAttributeListeners = new Vector();
+	Relation relations[] = new Relation[MAX_RELATION_TYPES];
 	Object[] variants;
+	Accessible parent;
+	Vector children = new Vector();
 	Control control;
-	static String ALTERNATE_ACCESSIBLE_CLASS_NAME = "org.eclipse.swt.accessibility2.Accessible2";
+	int uniqueID = -1;
+	int [] tableChange; // type, rowStart, rowCount, columnStart, columnCount
+	Object [] textDeleted; // type, start, end, text
+	Object [] textInserted; // type, start, end, text
+	ToolItem item;
+
+	static {
+		String property = System.getProperty (PROPERTY_USEIA2);
+		if (property != null && property.equalsIgnoreCase ("false")) { //$NON-NLS-1$
+			UseIA2 = false;
+		}
+	}
+	
+	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent the Accessible parent, which must not be null
+	 * 
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+	 * </ul>
+	 * 
+	 * @see #dispose
+	 * @see Control#getAccessible
+	 * 
+	 * @since 3.6
+	 */
+	public Accessible(Accessible parent) {
+		this.parent = checkNull(parent);
+		this.control = parent.control;
+		parent.children.addElement(this);
+		AddRef();
+	}
 
 	/**
 	 * @since 3.5
+	 * @deprecated
 	 */
 	protected Accessible() {
 	}
@@ -72,7 +125,21 @@ public class Accessible {
 		if (ppvObject[0] == 0) return;
 		if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
 		iaccessible = new IAccessible(ppvObject[0]);
+		createIAccessible();
+		AddRef();
+	}
+
+	Accessible(Accessible parent, int /*long*/ iaccessible_address) {
+		this(parent);
+		iaccessible = new IAccessible(iaccessible_address);
+	}
+
+	static Accessible checkNull (Accessible parent) {
+		if (parent == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		return parent;
+	}
 
+	void createIAccessible() {
 		objIAccessible = new COMObject(new int[] {2,0,0,1,3,5,8,1,1,2,2,2,2,2,2,2,3,2,1,1,2,2,5,3,3,1,2,2}) {
 			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
 			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
@@ -103,8 +170,8 @@ public class Accessible {
 			public int /*long*/ method26(int /*long*/[] args) {return put_accName(args[0], args[1]);}
 			public int /*long*/ method27(int /*long*/[] args) {return put_accValue(args[0], args[1]);}
 		};
-
-		/* If the callback takes a struct parameter (for example, a variant),
+	
+		/* If the callback takes a struct parameter (for example, a VARIANT),
 		 * then create a custom callback that dereferences the struct and
 		 * passes a pointer to the original callback.
 		 */
@@ -130,7 +197,305 @@ public class Accessible {
 		funcs[26] = COM.put_accName_CALLBACK(funcs[26]);
 		funcs[27] = COM.put_accValue_CALLBACK(funcs[27]);
 		COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length);
+	}
+
+	void createIAccessible2() {
+		objIAccessible2 = new COMObject(new int[] {2,0,0,/*IA>>*/1,3,5,8,1,1,2,2,2,2,2,2,2,3,2,1,1,2,2,5,3,3,1,2,2,/*<<IA*/1,2,3,1,1,3,3,1,1,1,1,3,3,1,1,1,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			
+			/* 
+			 * Even though the IA2 spec says "AT's should not rely on IA inheritance",
+			 * some AT's do rely on it, so we need to implement the IAccessible methods here.
+			 */
+			// method3 GetTypeInfoCount - not implemented
+			// method4 GetTypeInfo - not implemented
+			// method5 GetIDsOfNames - not implemented
+			// method6 Invoke - not implemented
+			public int /*long*/ method7(int /*long*/[] args) {return get_accParent(args[0]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_accChildCount(args[0]);}
+			public int /*long*/ method9(int /*long*/[] args) {return get_accChild(args[0], args[1]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_accName(args[0], args[1]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_accValue(args[0], args[1]);}
+			public int /*long*/ method12(int /*long*/[] args) {return get_accDescription(args[0], args[1]);}
+			public int /*long*/ method13(int /*long*/[] args) {return get_accRole(args[0], args[1]);}
+			public int /*long*/ method14(int /*long*/[] args) {return get_accState(args[0], args[1]);}
+			public int /*long*/ method15(int /*long*/[] args) {return get_accHelp(args[0], args[1]);}
+			public int /*long*/ method16(int /*long*/[] args) {return get_accHelpTopic(args[0], args[1], args[2]);}
+			public int /*long*/ method17(int /*long*/[] args) {return get_accKeyboardShortcut(args[0], args[1]);}
+			public int /*long*/ method18(int /*long*/[] args) {return get_accFocus(args[0]);}
+			public int /*long*/ method19(int /*long*/[] args) {return get_accSelection(args[0]);}
+			public int /*long*/ method20(int /*long*/[] args) {return get_accDefaultAction(args[0], args[1]);}
+			public int /*long*/ method21(int /*long*/[] args) {return accSelect((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method22(int /*long*/[] args) {return accLocation(args[0], args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method23(int /*long*/[] args) {return accNavigate((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method24(int /*long*/[] args) {return accHitTest((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+			public int /*long*/ method25(int /*long*/[] args) {return accDoDefaultAction(args[0]);}
+			public int /*long*/ method26(int /*long*/[] args) {return put_accName(args[0], args[1]);}
+			public int /*long*/ method27(int /*long*/[] args) {return put_accValue(args[0], args[1]);}
+
+			// IAccessible2 methods
+			public int /*long*/ method28(int /*long*/[] args) {return get_nRelations(args[0]);}
+			public int /*long*/ method29(int /*long*/[] args) {return get_relation((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method30(int /*long*/[] args) {return get_relations((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method31(int /*long*/[] args) {return get_role(args[0]);}
+			public int /*long*/ method32(int /*long*/[] args) {return scrollTo((int)/*64*/args[0]);}
+			public int /*long*/ method33(int /*long*/[] args) {return scrollToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+			public int /*long*/ method34(int /*long*/[] args) {return get_groupPosition(args[0], args[1], args[2]);}
+			public int /*long*/ method35(int /*long*/[] args) {return get_states(args[0]);}
+			public int /*long*/ method36(int /*long*/[] args) {return get_extendedRole(args[0]);}
+			public int /*long*/ method37(int /*long*/[] args) {return get_localizedExtendedRole(args[0]);}
+			public int /*long*/ method38(int /*long*/[] args) {return get_nExtendedStates(args[0]);}
+			public int /*long*/ method39(int /*long*/[] args) {return get_extendedStates((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method40(int /*long*/[] args) {return get_localizedExtendedStates((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method41(int /*long*/[] args) {return get_uniqueID(args[0]);}
+			public int /*long*/ method42(int /*long*/[] args) {return get_windowHandle(args[0]);}
+			public int /*long*/ method43(int /*long*/[] args) {return get_indexInParent(args[0]);}
+			public int /*long*/ method44(int /*long*/[] args) {return get_locale(args[0]);}
+			public int /*long*/ method45(int /*long*/[] args) {return get_attributes(args[0]);}
+		};
+
+		/* If the callback takes a struct parameter (for example, a VARIANT),
+		 * then create a custom callback that dereferences the struct and
+		 * passes a pointer to the original callback.
+		 */
+		int /*long*/ ppVtable = objIAccessible2.ppVtable;
+		int /*long*/[] pVtable = new int /*long*/[1];
+		COM.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF);
+		int /*long*/[] funcs = new int /*long*/[28];
+		COM.MoveMemory(funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length);
+		funcs[9] = COM.get_accChild_CALLBACK(funcs[9]);
+		funcs[10] = COM.get_accName_CALLBACK(funcs[10]);
+		funcs[11] = COM.get_accValue_CALLBACK(funcs[11]);
+		funcs[12] = COM.get_accDescription_CALLBACK(funcs[12]);
+		funcs[13] = COM.get_accRole_CALLBACK(funcs[13]);
+		funcs[14] = COM.get_accState_CALLBACK(funcs[14]);
+		funcs[15] = COM.get_accHelp_CALLBACK(funcs[15]);
+		funcs[16] = COM.get_accHelpTopic_CALLBACK(funcs[16]);
+		funcs[17] = COM.get_accKeyboardShortcut_CALLBACK(funcs[17]);
+		funcs[20] = COM.get_accDefaultAction_CALLBACK(funcs[20]);
+		funcs[21] = COM.accSelect_CALLBACK(funcs[21]);
+		funcs[22] = COM.accLocation_CALLBACK(funcs[22]);
+		funcs[23] = COM.accNavigate_CALLBACK(funcs[23]);
+		funcs[25] = COM.accDoDefaultAction_CALLBACK(funcs[25]);
+		funcs[26] = COM.put_accName_CALLBACK(funcs[26]);
+		funcs[27] = COM.put_accValue_CALLBACK(funcs[27]);
+		COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length);
+	}
+
+	void createIAccessibleAction() {
+		objIAccessibleAction = new COMObject(new int[] {2,0,0,1,1,2,4,2,2}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_nActions(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return doAction((int)/*64*/args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_description((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_keyBinding((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_name((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_localizedName((int)/*64*/args[0], args[1]);}
+		};
+	}
+
+	void createIAccessibleApplication() {
+		objIAccessibleApplication = new COMObject(new int[] {2,0,0,1,1,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_appName(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_appVersion(args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_toolkitName(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_toolkitVersion(args[0]);}
+		};
+	}
+
+	// This method is intentionally commented. We are not providing IAccessibleComponent at this time.
+//	void createIAccessibleComponent() {
+//		objIAccessibleComponent = new COMObject(new int[] {2,0,0,2,1,1}) {
+//			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+//			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+//			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+//			public int /*long*/ method3(int /*long*/[] args) {return get_locationInParent(args[0], args[1]);}
+//			public int /*long*/ method4(int /*long*/[] args) {return get_foreground(args[0]);}
+//			public int /*long*/ method5(int /*long*/[] args) {return get_background(args[0]);}
+//		};
+//	}
+
+	// This method is intentionally commented. We are not providing IAccessibleEditableText at this time.
+//	void createIAccessibleEditableText() {
+//		objIAccessibleEditableText = new COMObject(new int[] {2,0,0,2,2,2,2,1,3,3}) {
+//			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+//			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+//			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+//			public int /*long*/ method3(int /*long*/[] args) {return copyText((int)/*64*/args[0], (int)/*64*/args[1]);}
+//			public int /*long*/ method4(int /*long*/[] args) {return deleteText((int)/*64*/args[0], (int)/*64*/args[1]);}
+//			public int /*long*/ method5(int /*long*/[] args) {return insertText((int)/*64*/args[0], args[1]);}
+//			public int /*long*/ method6(int /*long*/[] args) {return cutText((int)/*64*/args[0], (int)/*64*/args[1]);}
+//			public int /*long*/ method7(int /*long*/[] args) {return pasteText((int)/*64*/args[0]);}
+//			public int /*long*/ method8(int /*long*/[] args) {return replaceText((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+//			public int /*long*/ method9(int /*long*/[] args) {return setAttributes((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+//		};
+//	}
+
+	void createIAccessibleHyperlink() {
+		objIAccessibleHyperlink = new COMObject(new int[] {2,0,0,/*IAA>>*/1,1,2,4,2,2,/*<<IAA*/2,2,1,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			// IAccessibleAction
+			public int /*long*/ method3(int /*long*/[] args) {return get_nActions(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return doAction((int)/*64*/args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_description((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_keyBinding((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_name((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_localizedName((int)/*64*/args[0], args[1]);}
+			// IAccessibleHyperlink
+			public int /*long*/ method9(int /*long*/[] args) {return get_anchor((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_anchorTarget((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_startIndex(args[0]);}
+			public int /*long*/ method12(int /*long*/[] args) {return get_endIndex(args[0]);}
+			public int /*long*/ method13(int /*long*/[] args) {return get_valid(args[0]);}
+		};
+	}
+
+	void createIAccessibleHypertext() {
+		objIAccessibleHypertext = new COMObject(new int[] {2,0,0,/*IAT>>*/2,4,1,6,1,4,3,3,5,5,5,1,1,3,1,3,5,1,1,/*<<IAT*/1,2,2}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			// IAccessibleText
+			public int /*long*/ method3(int /*long*/[] args) {return addSelection((int)/*64*/args[0], (int)/*64*/args[1]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_attributes((int)/*64*/args[0], args[1], args[2], args[3]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_caretOffset(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_characterExtents((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4], args[5]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_nSelections(args[0]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_offsetAtPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);}
+			public int /*long*/ method9(int /*long*/[] args) {return get_selection((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_text((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_textBeforeOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method12(int /*long*/[] args) {return get_textAfterOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method13(int /*long*/[] args) {return get_textAtOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method14(int /*long*/[] args) {return removeSelection((int)/*64*/args[0]);}
+			public int /*long*/ method15(int /*long*/[] args) {return setCaretOffset((int)/*64*/args[0]);}
+			public int /*long*/ method16(int /*long*/[] args) {return setSelection((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+			public int /*long*/ method17(int /*long*/[] args) {return get_nCharacters(args[0]);}
+			public int /*long*/ method18(int /*long*/[] args) {return scrollSubstringTo((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+			public int /*long*/ method19(int /*long*/[] args) {return scrollSubstringToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4]);}
+			public int /*long*/ method20(int /*long*/[] args) {return get_newText(args[0]);}
+			public int /*long*/ method21(int /*long*/[] args) {return get_oldText(args[0]);}
+			// IAccessibleHypertext
+			public int /*long*/ method22(int /*long*/[] args) {return get_nHyperlinks(args[0]);}
+			public int /*long*/ method23(int /*long*/[] args) {return get_hyperlink((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method24(int /*long*/[] args) {return get_hyperlinkIndex((int)/*64*/args[0], args[1]);}
+		};
+	}
+
+	// This method is intentionally commented. We are not providing IAccessibleImage at this time.
+//	void createIAccessibleImage() {
+//		objIAccessibleImage = new COMObject(new int[] {2,0,0,1,3,2}) {
+//			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+//			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+//			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+//			public int /*long*/ method3(int /*long*/[] args) {return get_description(args[0]);}
+//			public int /*long*/ method4(int /*long*/[] args) {return get_imagePosition((int)/*64*/args[0], args[1], args[2]);}
+//			public int /*long*/ method5(int /*long*/[] args) {return get_imageSize(args[0], args[1]);}
+//		};
+//	}
+
+	void createIAccessibleTable2() {
+		objIAccessibleTable2 = new COMObject(new int[] {2,0,0,3,1,2,1,1,1,1,1,2,2,2,2,1,2,2,1,1,1,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_cellAt((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_caption(args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_columnDescription((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_nColumns(args[0]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_nRows(args[0]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_nSelectedCells(args[0]);}
+			public int /*long*/ method9(int /*long*/[] args) {return get_nSelectedColumns(args[0]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_nSelectedRows(args[0]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_rowDescription((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method12(int /*long*/[] args) {return get_selectedCells(args[0], args[1]);}
+			public int /*long*/ method13(int /*long*/[] args) {return get_selectedColumns(args[0], args[1]);}
+			public int /*long*/ method14(int /*long*/[] args) {return get_selectedRows(args[0], args[1]);}
+			public int /*long*/ method15(int /*long*/[] args) {return get_summary(args[0]);}
+			public int /*long*/ method16(int /*long*/[] args) {return get_isColumnSelected((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method17(int /*long*/[] args) {return get_isRowSelected((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method18(int /*long*/[] args) {return selectRow((int)/*64*/args[0]);}
+			public int /*long*/ method19(int /*long*/[] args) {return selectColumn((int)/*64*/args[0]);}
+			public int /*long*/ method20(int /*long*/[] args) {return unselectRow((int)/*64*/args[0]);}
+			public int /*long*/ method21(int /*long*/[] args) {return unselectColumn((int)/*64*/args[0]);}
+			public int /*long*/ method22(int /*long*/[] args) {return get_modelChange(args[0]);}
+		};
+	}
+
+	void createIAccessibleTableCell() {
+		objIAccessibleTableCell = new COMObject(new int[] {2,0,0,1,2,1,1,2,1,1,5,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_columnExtent(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_columnHeaderCells(args[0], args[1]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_columnIndex(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_rowExtent(args[0]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_rowHeaderCells(args[0], args[1]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_rowIndex(args[0]);}
+			public int /*long*/ method9(int /*long*/[] args) {return get_isSelected(args[0]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_rowColumnExtents(args[0], args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_table(args[0]);}
+		};
+	}
+
+	void createIAccessibleText() {
+		objIAccessibleText = new COMObject(new int[] {2,0,0,2,4,1,6,1,4,3,3,5,5,5,1,1,3,1,3,5,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return addSelection((int)/*64*/args[0], (int)/*64*/args[1]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_attributes((int)/*64*/args[0], args[1], args[2], args[3]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_caretOffset(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_characterExtents((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4], args[5]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_nSelections(args[0]);}
+			public int /*long*/ method8(int /*long*/[] args) {return get_offsetAtPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], args[3]);}
+			public int /*long*/ method9(int /*long*/[] args) {return get_selection((int)/*64*/args[0], args[1], args[2]);}
+			public int /*long*/ method10(int /*long*/[] args) {return get_text((int)/*64*/args[0], (int)/*64*/args[1], args[2]);}
+			public int /*long*/ method11(int /*long*/[] args) {return get_textBeforeOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method12(int /*long*/[] args) {return get_textAfterOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method13(int /*long*/[] args) {return get_textAtOffset((int)/*64*/args[0], (int)/*64*/args[1], args[2], args[3], args[4]);}
+			public int /*long*/ method14(int /*long*/[] args) {return removeSelection((int)/*64*/args[0]);}
+			public int /*long*/ method15(int /*long*/[] args) {return setCaretOffset((int)/*64*/args[0]);}
+			public int /*long*/ method16(int /*long*/[] args) {return setSelection((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+			public int /*long*/ method17(int /*long*/[] args) {return get_nCharacters(args[0]);}
+			public int /*long*/ method18(int /*long*/[] args) {return scrollSubstringTo((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2]);}
+			public int /*long*/ method19(int /*long*/[] args) {return scrollSubstringToPoint((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4]);}
+			public int /*long*/ method20(int /*long*/[] args) {return get_newText(args[0]);}
+			public int /*long*/ method21(int /*long*/[] args) {return get_oldText(args[0]);}
+		};
+	}
+
+	void createIAccessibleValue() {
+		objIAccessibleValue = new COMObject(new int[] {2,0,0,1,1,1,1}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_currentValue(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return setCurrentValue(args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_maximumValue(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_minimumValue(args[0]);}
+		};
+		/* Dereference VARIANT struct parameters. */
+		int /*long*/ ppVtable = objIAccessibleValue.ppVtable;
+		int /*long*/[] pVtable = new int /*long*/[1];
+		COM.MoveMemory(pVtable, ppVtable, OS.PTR_SIZEOF);
+		int /*long*/[] funcs = new int /*long*/[7];
+		COM.MoveMemory(funcs, pVtable[0], OS.PTR_SIZEOF * funcs.length);
+		funcs[4] = COM.CALLBACK_setCurrentValue(funcs[4]);
+		COM.MoveMemory(pVtable[0], funcs, OS.PTR_SIZEOF * funcs.length);
+	}
 
+	void createIEnumVARIANT() {
 		objIEnumVARIANT = new COMObject(new int[] {2,0,0,3,1,0,1}) {
 			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
 			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
@@ -140,9 +505,17 @@ public class Accessible {
 			public int /*long*/ method5(int /*long*/[] args) {return Reset();}
 			public int /*long*/ method6(int /*long*/[] args) {return Clone(args[0]);}
 		};
-		AddRef();
 	}
-	
+
+	void createIServiceProvider() {
+		objIServiceProvider = new COMObject(new int[] {2,0,0,3}) {
+		    public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+		    public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+		    public int /*long*/ method2(int /*long*/[] args) {return Release();}        
+		    public int /*long*/ method3(int /*long*/[] args) {return QueryService(args[0], args[1], args[2]);}
+		};
+	}
+
 	/**
 	 * Invokes platform specific functionality to allocate a new accessible object.
 	 * <p>
@@ -155,18 +528,10 @@ public class Accessible {
 	 *
 	 * @param control the control to get the accessible object for
 	 * @return the platform specific accessible object
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public static Accessible internal_new_Accessible(Control control) {
-		if (ALTERNATE_ACCESSIBLE_CLASS_NAME != null) {
-			try {
-				Class clazz = Class.forName(ALTERNATE_ACCESSIBLE_CLASS_NAME);
-				Method method = clazz.getDeclaredMethod ("internal_new_Accessible", new Class [] {Control.class});
-				Object value = method.invoke(clazz, new Object [] {control});
-				return (Accessible)value;
-			} catch (Throwable e) {
-				ALTERNATE_ACCESSIBLE_CLASS_NAME = null;
-			}
-		}
 		return new Accessible(control);
 	}
 
@@ -229,7 +594,7 @@ public class Accessible {
 	 * be notified when an accessible client asks for custom text control
 	 * specific information. The listener is notified by sending it
 	 * one of the messages defined in the <code>AccessibleTextListener</code>
-	 * interface.
+	 * and <code>AccessibleTextExtendedListener</code> interfaces.
 	 *
 	 * @param listener the listener that should be notified when the receiver
 	 * is asked for custom text control specific information
@@ -243,6 +608,7 @@ public class Accessible {
 	 * </ul>
 	 *
 	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
 	 * @see #removeAccessibleTextListener
 	 * 
 	 * @since 3.0
@@ -250,66 +616,20 @@ public class Accessible {
 	public void addAccessibleTextListener (AccessibleTextListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		textListeners.addElement (listener);		
-	}
-	
-	/**
-	 * Returns the control for this Accessible object. 
-	 *
-	 * @return the receiver's control
-	 * @since 3.0
-	 */
-	public Control getControl() {
-		return control;
-	}
-
-	/**
-	 * Invokes platform specific functionality to dispose an accessible object.
-	 * <p>
-	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
-	 * API for <code>Accessible</code>. It is marked public only so that it
-	 * can be shared within the packages provided by SWT. It is not
-	 * available on all platforms, and should never be called from
-	 * application code.
-	 * </p>
-	 */
-	public void internal_dispose_Accessible() {
-		if (iaccessible != null) {
-			iaccessible.Release();
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.addElement (listener);		
+		} else {
+			accessibleTextListeners.addElement (listener);
 		}
-		iaccessible = null;
-		Release();
 	}
 	
 	/**
-	 * Invokes platform specific functionality to handle a window message.
-	 * <p>
-	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
-	 * API for <code>Accessible</code>. It is marked public only so that it
-	 * can be shared within the packages provided by SWT. It is not
-	 * available on all platforms, and should never be called from
-	 * application code.
-	 * </p>
-	 */
-	public int /*long*/ internal_WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
-		if (objIAccessible == null) return 0;
-		if ((int)/*64*/lParam == COM.OBJID_CLIENT) {
-			/* LresultFromObject([in] riid, [in] wParam, [in] pAcc)
-			 * The argument pAcc is owned by the caller so reference count does not
-			 * need to be incremented.
-			 */
-			return COM.LresultFromObject(COM.IIDIAccessible, wParam, objIAccessible.getAddress());
-		}
-		return 0;
-	}
-
-	/**
-	 * Removes the listener from the collection of listeners who will
-	 * be notified when an accessible client asks for certain strings,
-	 * such as name, description, help, or keyboard shortcut.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
 	 *
-	 * @param listener the listener that should no longer be notified when the receiver
-	 * is asked for a name, description, help, or keyboard shortcut string
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
 	 *
 	 * @exception IllegalArgumentException <ul>
 	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -319,22 +639,24 @@ public class Accessible {
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
 	 *
-	 * @see AccessibleListener
-	 * @see #addAccessibleListener
+	 * @see AccessibleActionListener
+	 * @see #removeAccessibleActionListener
+	 * 
+	 * @since 3.6
 	 */
-	public void removeAccessibleListener(AccessibleListener listener) {
+	public void addAccessibleActionListener(AccessibleActionListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleListeners.removeElement(listener);
+		accessibleActionListeners.addElement(listener);
 	}
 
 	/**
-	 * Removes the listener from the collection of listeners who will
-	 * be notified when an accessible client asks for custom control
-	 * specific information.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
 	 *
-	 * @param listener the listener that should no longer be notified when the receiver
-	 * is asked for custom control specific information
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
 	 *
 	 * @exception IllegalArgumentException <ul>
 	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -344,22 +666,24 @@ public class Accessible {
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
 	 *
-	 * @see AccessibleControlListener
-	 * @see #addAccessibleControlListener
+	 * @see AccessibleHyperlinkListener
+	 * @see #removeAccessibleHyperlinkListener
+	 * 
+	 * @since 3.6
 	 */
-	public void removeAccessibleControlListener(AccessibleControlListener listener) {
+	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleControlListeners.removeElement(listener);
+		accessibleHyperlinkListeners.addElement(listener);
 	}
 
 	/**
-	 * Removes the listener from the collection of listeners who will
-	 * be notified when an accessible client asks for custom text control
-	 * specific information.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
 	 *
-	 * @param listener the listener that should no longer be notified when the receiver
-	 * is asked for custom text control specific information
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
 	 *
 	 * @exception IllegalArgumentException <ul>
 	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
@@ -369,983 +693,3767 @@ public class Accessible {
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
 	 *
-	 * @see AccessibleTextListener
-	 * @see #addAccessibleTextListener
+	 * @see AccessibleTableListener
+	 * @see #removeAccessibleTableListener
 	 * 
-	 * @since 3.0
+	 * @since 3.6
 	 */
-	public void removeAccessibleTextListener (AccessibleTextListener listener) {
-		checkWidget ();
-		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		textListeners.removeElement (listener);
+	public void addAccessibleTableListener(AccessibleTableListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.addElement(listener);
 	}
 
 	/**
-	 * Sends a message to accessible clients that the child selection
-	 * within a custom container control has changed.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
 	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
 	 * @exception SWTException <ul>
 	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
+	 *
+	 * @see AccessibleTableCellListener
+	 * @see #removeAccessibleTableCellListener
 	 * 
-	 * @since 3.0
+	 * @since 3.6
 	 */
-	public void selectionChanged () {
+	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
 		checkWidget();
-		COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, COM.CHILDID_SELF);
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.addElement(listener);
 	}
 
 	/**
-	 * Sends a message to accessible clients indicating that the focus
-	 * has changed within a custom control.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
 	 *
-	 * @param childID an identifier specifying a child of the control
-	 * 
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
 	 * @exception SWTException <ul>
 	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #removeAccessibleValueListener
+	 * 
+	 * @since 3.6
 	 */
-	public void setFocus(int childID) {
+	public void addAccessibleValueListener(AccessibleValueListener listener) {
 		checkWidget();
-		COM.NotifyWinEvent (COM.EVENT_OBJECT_FOCUS, control.handle, COM.OBJID_CLIENT, childIDToOs(childID));
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.addElement(listener);
 	}
 
 	/**
-	 * Sends a message to accessible clients that the text
-	 * caret has moved within a custom control.
+	 * Adds the listener to the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
 	 *
-	 * @param index the new caret index within the control
+	 * @param listener the listener that should be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #removeAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.addElement(listener);
+	}
+
+	/**
+	 * Adds a relation with the specified type and target
+	 * to the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void addRelation(int type, Accessible target) {
+		checkWidget();
+		if (relations[type] == null) {
+			relations[type] = new Relation(this, type);
+		}
+		relations[type].addTarget(target);
+	}
+	
+	/**
+	 * Disposes of the operating system resources associated with
+	 * the receiver, and removes the receiver from its parent's
+	 * list of children.
+	 * <p>
+	 * This method should be called when an accessible that was created
+	 * with the public constructor <code>Accessible(Accessible parent)</code>
+	 * is no longer needed. You do not need to call this when the receiver's
+	 * control is disposed, because all <code>Accessible</code> instances
+	 * associated with a control are released when the control is disposed.
+	 * It is also not necessary to call this for instances of <code>Accessible</code>
+	 * that were retrieved with <code>Control.getAccessible()</code>.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public void dispose () {
+		if (parent == null) return;
+		Release();
+		parent.children.removeElement(this);
+		parent = null;
+	}
+
+	int /*long*/ getAddress() {
+		/* The address of an Accessible is the address of its IAccessible COMObject. */
+		if (objIAccessible == null) createIAccessible();
+		return objIAccessible.getAddress();
+	}
+
+	/**
+	 * Returns the control for this Accessible object. 
+	 *
+	 * @return the receiver's control
+	 * @since 3.0
+	 */
+	public Control getControl() {
+		return control;
+	}
+	
+	/**
+	 * Invokes platform specific functionality to dispose an accessible object.
+	 * <p>
+	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+	 * API for <code>Accessible</code>. It is marked public only so that it
+	 * can be shared within the packages provided by SWT. It is not
+	 * available on all platforms, and should never be called from
+	 * application code.
+	 * </p>
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public void internal_dispose_Accessible() {
+		if (iaccessible != null) {
+			iaccessible.Release();
+		}
+		iaccessible = null;
+		Release();
+		for (int i = 0; i < children.size(); i++) {
+			Accessible child = (Accessible) children.elementAt(i);
+			child.dispose();
+		}
+	}
+	
+	/**
+	 * Invokes platform specific functionality to handle a window message.
+	 * <p>
+	 * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+	 * API for <code>Accessible</code>. It is marked public only so that it
+	 * can be shared within the packages provided by SWT. It is not
+	 * available on all platforms, and should never be called from
+	 * application code.
+	 * </p>
 	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	public int /*long*/ internal_WM_GETOBJECT (int /*long*/ wParam, int /*long*/ lParam) {
+		if (objIAccessible == null) return 0;
+		if ((int)/*64*/lParam == COM.OBJID_CLIENT) {
+			/* LresultFromObject([in] riid, [in] wParam, [in] pAcc)
+			 * The argument pAcc is owned by the caller so reference count does not
+			 * need to be incremented.
+			 */
+			return COM.LresultFromObject(COM.IIDIAccessible, wParam, objIAccessible.getAddress());
+		}
+		return 0;
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners who will
+	 * be notified when an accessible client asks for certain strings,
+	 * such as name, description, help, or keyboard shortcut.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for a name, description, help, or keyboard shortcut string
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleListener
+	 * @see #addAccessibleListener
+	 */
+	public void removeAccessibleListener(AccessibleListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners who will
+	 * be notified when an accessible client asks for custom control
+	 * specific information.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for custom control specific information
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleControlListener
+	 * @see #addAccessibleControlListener
+	 */
+	public void removeAccessibleControlListener(AccessibleControlListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleControlListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners who will
+	 * be notified when an accessible client asks for custom text control
+	 * specific information.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for custom text control specific information
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
 	 * @exception SWTException <ul>
 	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
 	 *
+	 * @see AccessibleTextListener
+	 * @see AccessibleTextExtendedListener
+	 * @see #addAccessibleTextListener
+	 * 
 	 * @since 3.0
 	 */
-	public void textCaretMoved (int index) {
+	public void removeAccessibleTextListener (AccessibleTextListener listener) {
+		checkWidget ();
+		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		if (listener instanceof AccessibleTextExtendedListener) {
+			accessibleTextExtendedListeners.removeElement (listener);
+		} else {
+			accessibleTextListeners.removeElement (listener);
+		}
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAction</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAction</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleActionListener
+	 * @see #addAccessibleActionListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleActionListener(AccessibleActionListener listener) {
 		checkWidget();
-		COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CARET, COM.CHILDID_SELF);
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleActionListeners.removeElement(listener);
 	}
-	
+
 	/**
-	 * Sends a message to accessible clients that the text
-	 * within a custom control has changed.
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleHyperlink</code> interface.
 	 *
-	 * @param type the type of change, one of <code>ACC.NOTIFY_TEXT_INSERT</code>
-	 * or <code>ACC.NOTIFY_TEXT_DELETE</code>
-	 * @param startIndex the text index within the control where the insertion or deletion begins
-	 * @param length the non-negative length in characters of the insertion or deletion
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleHyperlink</code> interface properties
 	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
 	 * @exception SWTException <ul>
 	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
+	 *
+	 * @see AccessibleHyperlinkListener
+	 * @see #addAccessibleHyperlinkListener
 	 * 
-	 * @see ACC#TEXT_INSERT
-	 * @see ACC#TEXT_DELETE
+	 * @since 3.6
+	 */
+	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleHyperlinkListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTable</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTable</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleTableListener
+	 * @see #addAccessibleTableListener
 	 * 
-	 * @since 3.0
+	 * @since 3.6
 	 */
-	public void textChanged (int type, int startIndex, int length) {
+	public void removeAccessibleTableListener(AccessibleTableListener listener) {
 		checkWidget();
-		COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, COM.CHILDID_SELF);
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableListeners.removeElement(listener);
 	}
-	
+
 	/**
-	 * Sends a message to accessible clients that the text
-	 * selection has changed within a custom control.
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleTableCell</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleTableCell</code> interface properties
 	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
 	 * @exception SWTException <ul>
 	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
 	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
 	 * </ul>
 	 *
-	 * @since 3.0
+	 * @see AccessibleTableCellListener
+	 * @see #addAccessibleTableCellListener
+	 * 
+	 * @since 3.6
 	 */
-	public void textSelectionChanged () {
+	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleTableCellListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleValue</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleValue</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleValueListener
+	 * @see #addAccessibleValueListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleValueListener(AccessibleValueListener listener) {
 		checkWidget();
-		// not an MSAA event
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleValueListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the listener from the collection of listeners that will be
+	 * notified when an accessible client asks for any of the properties
+	 * defined in the <code>AccessibleAttribute</code> interface.
+	 *
+	 * @param listener the listener that should no longer be notified when the receiver
+	 * is asked for <code>AccessibleAttribute</code> interface properties
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+	 * </ul>
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @see AccessibleAttributeListener
+	 * @see #addAccessibleAttributeListener
+	 * 
+	 * @since 3.6
+	 */
+	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
+		checkWidget();
+		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		accessibleAttributeListeners.removeElement(listener);
+	}
+
+	/**
+	 * Removes the relation with the specified type and target
+	 * from the receiver's set of relations.
+	 * 
+	 * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation
+	 * @param target the accessible that is the target for this relation
+	 * 
+	 * @since 3.6
+	 */
+	public void removeRelation(int type, Accessible target) {
+		checkWidget();
+		Relation relation = (Relation)relations[type];
+		if (relation != null) {
+			relation.removeTarget(target);
+			if (!relation.hasTargets()) {
+				relations[type].Release();
+				relations[type] = null;
+			}
+		}
+	}
+	
+	/**
+	 * Sends a message with event-specific data to accessible clients
+	 * indicating that something has changed within a custom control.
+	 *
+	 * @param event an <code>ACC</code> constant beginning with EVENT_* indicating the message to send
+	 * @param eventData an object containing event-specific data, or null if there is no event-specific data
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#EVENT_ACTION_CHANGED
+	 * @see ACC#EVENT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_DOCUMENT_LOAD_COMPLETE
+	 * @see ACC#EVENT_DOCUMENT_LOAD_STOPPED
+	 * @see ACC#EVENT_DOCUMENT_RELOAD
+	 * @see ACC#EVENT_HYPERLINK_ACTIVATED
+	 * @see ACC#EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_END_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_SELECTED_LINK_CHANGED
+	 * @see ACC#EVENT_HYPERLINK_START_INDEX_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_COUNT_CHANGED
+	 * @see ACC#EVENT_HYPERTEXT_LINK_SELECTED
+	 * @see ACC#EVENT_LOCATION_CHANGED
+	 * @see ACC#EVENT_NAME_CHANGED
+	 * @see ACC#EVENT_PAGE_CHANGED
+	 * @see ACC#EVENT_SECTION_CHANGED
+	 * @see ACC#EVENT_SELECTION_CHANGED
+	 * @see ACC#EVENT_STATE_CHANGED
+	 * @see ACC#EVENT_TABLE_CAPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_COLUMN_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_DESCRIPTION_CHANGED
+	 * @see ACC#EVENT_TABLE_ROW_HEADER_CHANGED
+	 * @see ACC#EVENT_TABLE_SUMMARY_CHANGED
+	 * @see ACC#EVENT_TEXT_ATTRIBUTE_CHANGED
+	 * @see ACC#EVENT_TEXT_CARET_MOVED
+	 * @see ACC#EVENT_TEXT_CHANGED
+	 * @see ACC#EVENT_TEXT_COLUMN_CHANGED
+	 * @see ACC#EVENT_TEXT_SELECTION_CHANGED
+	 * @see ACC#EVENT_VALUE_CHANGED
+	 * 
+	 * @since 3.6
+	 */
+	public void sendEvent(int event, Object eventData) {
+		checkWidget();
+		if (!UseIA2) return;
+		if (DEBUG) print(this + ".NotifyWinEvent " + getEventString(event) + " hwnd=" + control.handle + " childID=" + eventChildID());
+		switch (event) {
+			case ACC.EVENT_TABLE_CHANGED: {
+				if (!(eventData instanceof int[] && ((int[])eventData).length == TABLE_MODEL_CHANGE_SIZE)) break;
+				tableChange = (int[])eventData;
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID());
+				break;
+			}
+			case ACC.EVENT_TEXT_CHANGED: {
+				if (!(eventData instanceof Object[] && ((Object[])eventData).length == TEXT_CHANGE_SIZE)) break;
+				Object[] data = (Object[])eventData;
+				int type = ((Integer)data[0]).intValue();
+				switch (type) {
+					case ACC.DELETE:
+						textDeleted = (Object[])eventData;
+						COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_REMOVED, control.handle, COM.OBJID_CLIENT, eventChildID());
+						break;
+					case ACC.INSERT:
+						textInserted = (Object[])eventData;
+						COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_INSERTED, control.handle, COM.OBJID_CLIENT, eventChildID());
+						break;
+				}
+				break;
+			}
+			case ACC.EVENT_HYPERTEXT_LINK_SELECTED: {
+				if (!(eventData instanceof Integer)) break;
+	//			int index = ((Integer)eventData).intValue();
+				// TODO: IA2 currently does not use the index, however the plan is to use it in future
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_SELECTED, control.handle, COM.OBJID_CLIENT, eventChildID());
+				break;
+			}
+			case ACC.EVENT_VALUE_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_STATE_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_STATECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_SELECTION_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TEXT_SELECTION_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_TEXTSELECTIONCHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_LOCATION_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_NAME_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_NAMECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_DESCRIPTION_CHANGED:
+				COM.NotifyWinEvent (COM.EVENT_OBJECT_DESCRIPTIONCHANGE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_DOCUMENT_LOAD_COMPLETE:
+				COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_COMPLETE, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_DOCUMENT_LOAD_STOPPED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_LOAD_STOPPED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_DOCUMENT_RELOAD:
+				COM.NotifyWinEvent (COM.IA2_EVENT_DOCUMENT_RELOAD, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_PAGE_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_PAGE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_SECTION_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_SECTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_ACTION_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_ACTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERLINK_START_INDEX_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_START_INDEX_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERLINK_END_INDEX_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_END_INDEX_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERLINK_SELECTED_LINK_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERLINK_ACTIVATED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERLINK_ACTIVATED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_HYPERTEXT_LINK_COUNT_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_ATTRIBUTE_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_ATTRIBUTE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_CAPTION_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_CAPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_COLUMN_HEADER_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_ROW_DESCRIPTION_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_ROW_HEADER_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_ROW_HEADER_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TABLE_SUMMARY_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TABLE_SUMMARY_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TEXT_ATTRIBUTE_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_ATTRIBUTE_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TEXT_CARET_MOVED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+			case ACC.EVENT_TEXT_COLUMN_CHANGED:
+				COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_COLUMN_CHANGED, control.handle, COM.OBJID_CLIENT, eventChildID()); break;
+		}
+	}
+
+	/**
+	 * Sends a message to accessible clients that the child selection
+	 * within a custom container control has changed.
+	 *
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @since 3.0
+	 */
+	public void selectionChanged () {
+		checkWidget();
+		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_SELECTIONWITHIN hwnd=" + control.handle + " childID=" + eventChildID());
+		COM.NotifyWinEvent (COM.EVENT_OBJECT_SELECTIONWITHIN, control.handle, COM.OBJID_CLIENT, eventChildID());
+	}
+
+	/**
+	 * Sends a message to accessible clients indicating that the focus
+	 * has changed within a custom control.
+	 *
+	 * @param childID an identifier specifying a child of the control
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 */
+	public void setFocus(int childID) {
+		checkWidget();
+		int osChildID = childID == ACC.CHILDID_SELF ? eventChildID() : childIDToOs(childID);
+		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_FOCUS hwnd=" + control.handle + " childID=" + osChildID);
+		COM.NotifyWinEvent (COM.EVENT_OBJECT_FOCUS, control.handle, COM.OBJID_CLIENT, osChildID);
+	}
+
+	/**
+	 * Sends a message to accessible clients that the text
+	 * caret has moved within a custom control.
+	 *
+	 * @param index the new caret index within the control
+	 * 
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @since 3.0
+	 */
+	public void textCaretMoved (int index) {
+		checkWidget();
+		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_LOCATIONCHANGE hwnd=" + control.handle + " childID=" + eventChildID());
+		COM.NotifyWinEvent (COM.EVENT_OBJECT_LOCATIONCHANGE, control.handle, COM.OBJID_CARET, eventChildID());
+		if (!UseIA2) return;
+		if (DEBUG) print(this + ".NotifyWinEvent IA2_EVENT_TEXT_CARET_MOVED hwnd=" + control.handle + " childID=" + eventChildID());
+		COM.NotifyWinEvent (COM.IA2_EVENT_TEXT_CARET_MOVED, control.handle, COM.OBJID_CLIENT, eventChildID());
+	}
+	
+	/**
+	 * Sends a message to accessible clients that the text
+	 * within a custom control has changed.
+	 *
+	 * @param type the type of change, one of <code>ACC.TEXT_INSERT</code>
+	 * or <code>ACC.TEXT_DELETE</code>
+	 * @param startIndex the text index within the control where the insertion or deletion begins
+	 * @param length the non-negative length in characters of the insertion or deletion
+	 *
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 * 
+	 * @see ACC#TEXT_INSERT
+	 * @see ACC#TEXT_DELETE
+	 * 
+	 * @since 3.0
+	 */
+	public void textChanged (int type, int startIndex, int length) {
+		checkWidget();
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = startIndex;
+		event.end = startIndex + length;
+		event.count = 0;
+		event.type = ACC.TEXT_BOUNDARY_ALL;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getText(event);
+		}
+		if (event.result != null) {
+			Object[] eventData = new Object[] {
+					new Integer(type),
+					new Integer(startIndex),
+					new Integer(startIndex + length),
+					event.result};
+			sendEvent(ACC.EVENT_TEXT_CHANGED, eventData);
+			return;
+		}
+		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_VALUECHANGE hwnd=" + control.handle + " childID=" + eventChildID());
+		COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID());
+	}
+	
+	/**
+	 * Sends a message to accessible clients that the text
+	 * selection has changed within a custom control.
+	 *
+	 * @exception SWTException <ul>
+	 *    <li>ERROR_WIDGET_DISPOSED - if the receiver's control has been disposed</li>
+	 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver's control</li>
+	 * </ul>
+	 *
+	 * @since 3.0
+	 */
+	public void textSelectionChanged () {
+		checkWidget();
+		if (DEBUG) print(this + ".NotifyWinEvent EVENT_OBJECT_VALUECHANGE hwnd=" + control.handle + " childID=" + eventChildID());
+		COM.NotifyWinEvent (COM.EVENT_OBJECT_VALUECHANGE, control.handle, COM.OBJID_CLIENT, eventChildID());
+	}
+	
+	/* QueryInterface([in] iid, [out] ppvObject)
+	 * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject 
+	 * must be incremented before returning.  Caller is responsible for releasing ppvObject.
+	 */
+	int QueryInterface(int /*long*/ iid, int /*long*/ ppvObject) {
+		COM.MoveMemory(ppvObject, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+		GUID guid = new GUID();
+		COM.MoveMemory(guid, iid, GUID.sizeof);
+
+		if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
+			COM.MoveMemory(ppvObject, new int /*long*/[] { getAddress() }, OS.PTR_SIZEOF);
+			AddRef();
+			if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + getAddress() + hresult(COM.S_OK));
+			return COM.S_OK;
+		}
+
+		if (COM.IsEqualGUID(guid, COM.IIDIDispatch) || COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
+			if (objIAccessible == null) createIAccessible();
+			COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF);
+			AddRef();
+			if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK));
+			return COM.S_OK;
+		}
+
+		if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) {
+			if (objIEnumVARIANT == null) createIEnumVARIANT();
+			COM.MoveMemory(ppvObject, new int /*long*/[] { objIEnumVARIANT.getAddress() }, OS.PTR_SIZEOF);
+			AddRef();
+			enumIndex = 0;
+			if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIEnumVARIANT.getAddress() + hresult(COM.S_OK));
+			return COM.S_OK;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) {
+			if (!UseIA2) return COM.E_NOINTERFACE;
+			if (accessibleActionListeners.size() > 0 || accessibleAttributeListeners.size() > 0 ||
+				accessibleHyperlinkListeners.size() > 0 || accessibleTableListeners.size() > 0 ||
+				accessibleTableCellListeners.size() > 0 || accessibleTextExtendedListeners.size() > 0 ||
+				accessibleValueListeners.size() > 0 || getRelationCount() > 0) {
+				if (objIServiceProvider == null) createIServiceProvider();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIServiceProvider.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning " + objIServiceProvider.getAddress() + hresult(COM.S_OK));
+				return COM.S_OK;
+			}
+			if (DEBUG) if (interesting(guid)) print("QueryInterface guid=" + guidString(guid) + " returning" + hresult(COM.E_NOINTERFACE));
+			return COM.E_NOINTERFACE;
+		}
+
+		int code = queryAccessible2Interfaces(guid, ppvObject);
+		if (code != COM.S_FALSE) {
+			if (DEBUG) print(this + ".QueryInterface guid=" + guidString(guid) + " returning" + hresult(code));
+			return code;
+		}
+
+		if (iaccessible != null) {
+			/* Forward any other GUIDs to the OS proxy. */
+			int /*long*/[] ppv = new int /*long*/[1];
+			code = iaccessible.QueryInterface(guid, ppv);
+			COM.MoveMemory(ppvObject, ppv, OS.PTR_SIZEOF);
+			if (DEBUG) if (interesting(guid)) print("QueryInterface guid=" + guidString(guid) + " returning super" + hresult(code));
+			return code;
+		}
+		
+		if (DEBUG) if (interesting(guid)) print("QueryInterface guid=" + guidString(guid) + " returning" + hresult(COM.E_NOINTERFACE));
+		return COM.E_NOINTERFACE;
+	}
+
+	int AddRef() {
+		refCount++;
+		return refCount;
+	}
+
+	int Release() {
+		refCount--;
+
+		if (refCount == 0) {
+			if (objIAccessible != null)
+				objIAccessible.dispose();
+			objIAccessible = null;
+						
+			if (objIEnumVARIANT != null)
+				objIEnumVARIANT.dispose();
+			objIEnumVARIANT = null;
+
+			if (objIServiceProvider != null)
+				objIServiceProvider.dispose();
+			objIServiceProvider = null;
+
+			if (objIAccessible2 != null)
+				objIAccessible2.dispose();
+			objIAccessible2 = null;
+
+			if (objIAccessibleAction != null)
+				objIAccessibleAction.dispose();
+			objIAccessibleAction = null;
+
+			if (objIAccessibleApplication != null)
+				objIAccessibleApplication.dispose();
+			objIAccessibleApplication = null;
+
+			// The following lines are intentionally commented. We are not providing IAccessibleComponent at this time.
+//			if (objIAccessibleComponent != null)
+//				objIAccessibleComponent.dispose();
+//			objIAccessibleComponent = null;
+
+			// The following lines are intentionally commented. We are not providing IAccessibleEditableText at this time.
+//			if (objIAccessibleEditableText != null)
+//				objIAccessibleEditableText.dispose();
+//			objIAccessibleEditableText = null;
+
+			if (objIAccessibleHyperlink != null)
+				objIAccessibleHyperlink.dispose();
+			objIAccessibleHyperlink = null;
+
+			if (objIAccessibleHypertext != null)
+				objIAccessibleHypertext.dispose();
+			objIAccessibleHypertext = null;
+
+			// The following lines are intentionally commented. We are not providing IAccessibleImage at this time.
+//			if (objIAccessibleImage != null)
+//				objIAccessibleImage.dispose();
+//			objIAccessibleImage = null;
+
+			if (objIAccessibleTable2 != null)
+				objIAccessibleTable2.dispose();
+			objIAccessibleTable2 = null;
+
+			if (objIAccessibleTableCell != null)
+				objIAccessibleTableCell.dispose();
+			objIAccessibleTableCell = null;
+
+			if (objIAccessibleText != null)
+				objIAccessibleText.dispose();
+			objIAccessibleText = null;
+
+			if (objIAccessibleValue != null)
+				objIAccessibleValue.dispose();
+			objIAccessibleValue = null;
+
+			for (int i = 0; i < relations.length; i++) {
+				if (relations[i] != null) relations[i].Release();
+			}
+			// TODO: also remove all relations for which 'this' is a target??
+		}
+		return refCount;
+	}
+
+	/* QueryService([in] guidService, [in] riid, [out] ppvObject) */
+	int QueryService(int /*long*/ guidService, int /*long*/ riid, int /*long*/ ppvObject) {
+		COM.MoveMemory(ppvObject, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+		GUID service = new GUID();
+		COM.MoveMemory(service, guidService, GUID.sizeof);
+		GUID guid = new GUID();
+		COM.MoveMemory(guid, riid, GUID.sizeof);
+
+		if (COM.IsEqualGUID(service, COM.IIDIAccessible)) {
+			if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch) | COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
+				if (objIAccessible == null) createIAccessible();
+				if (DEBUG) print(this + ".QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning " + objIAccessible.getAddress() + hresult(COM.S_OK));
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			int code = queryAccessible2Interfaces(guid, ppvObject);
+			if (code != COM.S_FALSE) {
+				if (DEBUG) print(this + ".QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning" + hresult(code));
+				return code;
+			}
+		}
+
+		if (COM.IsEqualGUID(service, COM.IIDIAccessible2)) {
+			int code = queryAccessible2Interfaces(guid, ppvObject);
+			if (code != COM.S_FALSE) {
+				if (DEBUG) print(this + ".*QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning" + hresult(code));
+				return code;
+			}
+		}
+
+		if (iaccessible != null) {
+			/* Forward any other GUIDs to the OS proxy. */
+			int /*long*/ [] ppv = new int /*long*/ [1];
+			int code = iaccessible.QueryInterface(COM.IIDIServiceProvider, ppv);
+			if (code == COM.S_OK) {
+				IServiceProvider iserviceProvider = new IServiceProvider(ppv[0]);
+				int /*long*/ [] ppvx = new int /*long*/ [1];
+				code = iserviceProvider.QueryService(service, guid, ppvx);
+				COM.MoveMemory(ppvObject, ppvx, OS.PTR_SIZEOF);
+				if (DEBUG) if (interesting(service) && interesting(guid)) print("QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning super" + hresult(code));
+				return code;
+			}
+		}
+		
+		if (DEBUG) if (interesting(service) && interesting(guid)) print("QueryService service=" + guidString(service) + " guid=" + guidString(guid) + " returning" + hresult(COM.E_NOINTERFACE));
+		return COM.E_NOINTERFACE;
+	}
+
+	int queryAccessible2Interfaces(GUID guid, int /*long*/ ppvObject) {
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessible2)) {
+			if (accessibleActionListeners.size() > 0 || accessibleAttributeListeners.size() > 0 ||
+					accessibleHyperlinkListeners.size() > 0 || accessibleTableListeners.size() > 0 ||
+					accessibleTableCellListeners.size() > 0 || accessibleTextExtendedListeners.size() > 0 ||
+					accessibleValueListeners.size() > 0 || getRelationCount() > 0) {
+				if (objIAccessible2 == null) createIAccessible2();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible2.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleAction)) {
+			if (accessibleActionListeners.size() > 0) {
+				if (objIAccessibleAction == null) createIAccessibleAction();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleAction.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleApplication)) {
+			if (objIAccessibleApplication == null) createIAccessibleApplication();
+			COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleApplication.getAddress() }, OS.PTR_SIZEOF);
+			AddRef();
+			return COM.S_OK;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleComponent)) {
+			// The following lines are intentionally commented. We are not supporting IAccessibleComponent at this time.
+//			if (accessibleControlListeners.size() > 0) { // TO DO: can we reduce the scope of this somehow?
+//				if (objIAccessibleComponent == null) createIAccessibleComponent();
+//				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleComponent.getAddress() }, OS.PTR_SIZEOF);
+//				AddRef();
+//				return COM.S_OK;
+//			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleEditableText)) {
+			// The following lines are intentionally commented. We are not supporting IAccessibleEditableText at this time.
+//			if (accessibleEditableTextListeners.size() > 0) {
+//				if (objIAccessibleEditableText == null) createIAccessibleEditableText();
+//				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleEditableText.getAddress() }, OS.PTR_SIZEOF);
+//				AddRef();
+//				return COM.S_OK;
+//			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHyperlink)) {
+			if (accessibleHyperlinkListeners.size() > 0) {
+				if (objIAccessibleHyperlink == null) createIAccessibleHyperlink();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleHyperlink.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHypertext)) {
+			if (accessibleTextExtendedListeners.size() > 0) {
+				if (objIAccessibleHypertext == null) createIAccessibleHypertext();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleHypertext.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleImage)) {
+			// The following lines are intentionally commented. We are not supporting IAccessibleImage at this time.
+//			if (getRole() == ACC.ROLE_GRAPHIC && (accessibleListeners.size() > 0 || accessibleControlListeners.size() > 0)) {
+//				if (objIAccessibleImage == null) createIAccessibleImage();
+//				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleImage.getAddress() }, OS.PTR_SIZEOF);
+//				AddRef();
+//				return COM.S_OK;
+//			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable)) {
+			// We are not supporting IAccessibleTable at this time.
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable2)) {
+			if (accessibleTableListeners.size() > 0) {
+				if (objIAccessibleTable2 == null) createIAccessibleTable2();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleTable2.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTableCell)) {
+			if (accessibleTableCellListeners.size() > 0) {
+				if (objIAccessibleTableCell == null) createIAccessibleTableCell();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleTableCell.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleText)) {
+			if (accessibleTextExtendedListeners.size() > 0 /* || accessibleAttributeListeners.size() > 0*/) {
+				if (objIAccessibleText == null) createIAccessibleText();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleText.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+		
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleValue)) {
+			if (accessibleValueListeners.size() > 0) {
+				if (objIAccessibleValue == null) createIAccessibleValue();
+				COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessibleValue.getAddress() }, OS.PTR_SIZEOF);
+				AddRef();
+				return COM.S_OK;
+			}
+			return COM.E_NOINTERFACE;
+		}
+
+		return COM.S_FALSE;
+	}
+	
+	/* IAccessible::accDoDefaultAction([in] varChild) */
+	int accDoDefaultAction(int /*long*/ varChild) {
+		if (DEBUG) print(this + ".IAccessible::accDoDefaultAction");
+		if (accessibleActionListeners.size() > 0) {
+			VARIANT v = getVARIANT(varChild);
+			if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+			if (v.lVal == COM.CHILDID_SELF) return doAction(0);
+		}
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* If there were no action listeners, forward to the proxy. */
+			code = iaccessible.accDoDefaultAction(varChild);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+		}
+		return code;
+	}
+
+	/* IAccessible::accHitTest([in] xLeft, [in] yTop, [out] pvarChild) */
+	int accHitTest(int xLeft, int yTop, int /*long*/ pvarChild) {
+		int osChild = ACC.CHILDID_NONE;
+		int /*long*/ osChildObject = 0;
+		if (iaccessible != null) {
+			/* Get the default child at point (left, top) from the OS. */
+			int code = iaccessible.accHitTest(xLeft, yTop, pvarChild);
+			if (code == COM.S_OK) {
+				VARIANT v = getVARIANT(pvarChild);
+				if (v.vt == COM.VT_I4) osChild = v.lVal;
+				else if (v.vt == COM.VT_DISPATCH) {
+					osChildObject = v.lVal; // TODO: don't use struct. lVal is an int.
+					if (DEBUG) print(this + ".IAccessible::accHitTest() super returned VT_DISPATCH");
+				}
+			}
+			if (accessibleControlListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::accHitTest returning childID=" + osChild + " from super" + hresult(code));
+				return code;
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osChild == ACC.CHILDID_NONE ? ACC.CHILDID_NONE : osToChildID(osChild);
+		// TODO: event.accessible = Accessible for osChildObject;
+		event.x = xLeft;
+		event.y = yTop;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getChildAtPoint(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible != null) {
+			if (DEBUG) print(this + ".IAccessible::accHitTest returning " + accessible.getAddress() + hresult(COM.S_OK));
+			accessible.AddRef();
+			setPtrVARIANT(pvarChild, COM.VT_DISPATCH, accessible.getAddress());
+			return COM.S_OK;
+		}
+		int childID = event.childID;
+		if (childID == ACC.CHILDID_NONE) {
+			if (osChildObject != 0) {
+				if (DEBUG) print(this + ".IAccessible::accHitTest returning osChildObject " + osChildObject + " from super" + hresult(COM.S_OK));
+				return COM.S_OK;
+			}
+			if (DEBUG) print(this + ".IAccessible::accHitTest returning VT_EMPTY" + hresult(COM.S_FALSE));
+			setIntVARIANT(pvarChild, COM.VT_EMPTY, 0);
+			return COM.S_FALSE;
+		}
+		if (DEBUG) print(this + ".IAccessible::accHitTest returning " + childIDToOs(childID) + hresult(COM.S_OK));
+		setIntVARIANT(pvarChild, COM.VT_I4, childIDToOs(childID));
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::accLocation([out] pxLeft, [out] pyTop, [out] pcxWidth, [out] pcyHeight, [in] varChild) */
+	int accLocation(int /*long*/ pxLeft, int /*long*/ pyTop, int /*long*/ pcxWidth, int /*long*/ pcyHeight, int /*long*/ varChild) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int osLeft = 0, osTop = 0, osWidth = 0, osHeight = 0;
+		if (iaccessible != null) {
+			/* Get the default location from the OS. */
+			int code = iaccessible.accLocation(pxLeft, pyTop, pcxWidth, pcyHeight, varChild);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+			if (accessibleControlListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::accLocation returning from super" + hresult(code));
+				return code;
+			}
+			if (code == COM.S_OK) {
+				int[] pLeft = new int[1], pTop = new int[1], pWidth = new int[1], pHeight = new int[1];
+				COM.MoveMemory(pLeft, pxLeft, 4);
+				COM.MoveMemory(pTop, pyTop, 4);
+				COM.MoveMemory(pWidth, pcxWidth, 4);
+				COM.MoveMemory(pHeight, pcyHeight, 4);
+				osLeft = pLeft[0]; osTop = pTop[0]; osWidth = pWidth[0]; osHeight = pHeight[0];
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.x = osLeft;
+		event.y = osTop;
+		event.width = osWidth;
+		event.height = osHeight;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getLocation(event);
+		}
+		if (DEBUG) print(this + ".IAccessible::accLocation(" + v.lVal + ") returning x=" + event.x + " y=" + event.y + "w=" + event.width + "h=" + event.height + hresult(COM.S_OK));
+		OS.MoveMemory(pxLeft, new int[] { event.x }, 4);
+		OS.MoveMemory(pyTop, new int[] { event.y }, 4);
+		OS.MoveMemory(pcxWidth, new int[] { event.width }, 4);
+		OS.MoveMemory(pcyHeight, new int[] { event.height }, 4);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::accNavigate([in] navDir, [in] varStart, [out] pvarEndUpAt) */
+	int accNavigate(int navDir, int /*long*/ varStart, int /*long*/ pvarEndUpAt) {
+		if (DEBUG) print(this + ".IAccessible::accNavigate");
+		/* MSAA: "The accNavigate method is deprecated and should not be used." */
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* Since many of the native controls still handle accNavigate,
+			 * we will continue to send this through to the proxy. */
+			code = iaccessible.accNavigate(navDir, varStart, pvarEndUpAt);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+		}
+		return code;
+	}
+	
+	// TODO: Consider supporting this in future.
+	/* IAccessible::accSelect([in] flagsSelect, [in] varChild) */
+	int accSelect(int flagsSelect, int /*long*/ varChild) {
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* Currently, we don't expose this as API. Forward to the proxy. */
+			code = iaccessible.accSelect(flagsSelect, varChild);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+		}
+		if (DEBUG) print(this + ".IAccessible::accSelect(" + flagsSelect + ") returning" + hresult(code));
+		return code;
+	}
+
+	/* IAccessible::get_accChild([in] varChild, [out] ppdispChild)
+	 * Ownership of ppdispChild transfers from callee to caller so reference count on ppdispChild 
+	 * must be incremented before returning.  The caller is responsible for releasing ppdispChild.
+	 */
+	int get_accChild(int /*long*/ varChild, int /*long*/ ppdispChild) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		if (v.lVal == COM.CHILDID_SELF) {
+			if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + getAddress() + hresult(COM.S_OK));
+			AddRef();
+			COM.MoveMemory(ppdispChild, new int /*long*/[] { getAddress() }, OS.PTR_SIZEOF);
+			return COM.S_OK;
+		}
+		final int childID = osToChildID(v.lVal);
+		int code = COM.S_FALSE;
+		Accessible osAccessible = null;
+		if (iaccessible != null) {
+			/* Get the default child from the OS. */
+			code = iaccessible.get_accChild(varChild, ppdispChild);
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			if (code == COM.S_OK && control instanceof ToolBar) {
+				ToolBar toolBar = (ToolBar) control;
+				final ToolItem item = toolBar.getItem(childID);
+				if (item != null && (item.getStyle() & SWT.DROP_DOWN) != 0) {
+					int /*long*/[] addr = new int /*long*/[1];
+					COM.MoveMemory(addr, ppdispChild, OS.PTR_SIZEOF);
+					boolean found = false;
+					for (int i = 0; i < children.size(); i++) {
+						Accessible accChild = (Accessible)children.elementAt(i);
+						if (accChild.item == item) {
+							/* 
+							 * MSAA uses a new accessible for the child
+							 * so we dispose the old and use the new.
+							 */
+							accChild.dispose();
+							accChild.item = null;
+							found = true;
+							break;
+						}
+					}
+					osAccessible = new Accessible(this, addr[0]);
+					osAccessible.item = item;
+					if (!found) {
+						item.addListener(SWT.Dispose, new Listener() {
+							public void handleEvent(Event e) {
+								for (int i = 0; i < children.size(); i++) {
+									Accessible accChild = (Accessible)children.elementAt(i);
+									if (accChild.item == item) {
+										accChild.dispose();
+									}
+								}
+							}
+						});
+					}
+					osAccessible.addAccessibleListener(new AccessibleAdapter() {
+						public void getName(AccessibleEvent e) {
+							if (e.childID == ACC.CHILDID_SELF) {
+								AccessibleEvent event = new AccessibleEvent(Accessible.this);
+								event.childID = childID;
+								for (int i = 0; i < accessibleListeners.size(); i++) {
+									AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+									listener.getName(event);
+								}
+								e.result = event.result;
+							}
+						}
+					});
+				}
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = childID;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getChild(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible == null) accessible = osAccessible;
+		if (accessible != null) {
+			if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning " + accessible.getAddress() + hresult(COM.S_OK));
+			accessible.AddRef();
+			COM.MoveMemory(ppdispChild, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+			return COM.S_OK;
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accChild(" + v.lVal + ") returning from super" + hresult(code));
+		return code;
+	}
+	
+	/* IAccessible::get_accChildCount([out] pcountChildren) */
+	int get_accChildCount(int /*long*/ pcountChildren) {
+		int osChildCount = 0;
+		if (iaccessible != null) {
+			/* Get the default child count from the OS. */
+			int code = iaccessible.get_accChildCount(pcountChildren);
+			if (code == COM.S_OK) {
+				int[] pChildCount = new int[1];
+				COM.MoveMemory(pChildCount, pcountChildren, 4);
+				osChildCount = pChildCount[0];
+			}
+			if (accessibleControlListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::get_accChildCount() returning " + osChildCount + " from super" + hresult(code));
+				return code;
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = ACC.CHILDID_SELF;
+		event.detail = osChildCount;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getChildCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accChildCount() returning " + event.detail + hresult(COM.S_OK));
+		COM.MoveMemory(pcountChildren, new int[] { event.detail }, 4);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accDefaultAction([in] varChild, [out] pszDefaultAction) */
+	int get_accDefaultAction(int /*long*/ varChild, int /*long*/ pszDefaultAction) {
+		if (DEBUG) print(this + ".IAccessible::get_accDefaultAction");
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		String osDefaultAction = null;
+		if (iaccessible != null) {
+			/* Get the default defaultAction from the OS. */
+			code = iaccessible.get_accDefaultAction(varChild, pszDefaultAction);
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			if (accessibleControlListeners.size() == 0) return code;
+			if (code == COM.S_OK) {
+				int /*long*/[] pDefaultAction = new int /*long*/[1];
+				COM.MoveMemory(pDefaultAction, pszDefaultAction, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pDefaultAction[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pDefaultAction[0], size);
+					osDefaultAction = new String(buffer);
+				}
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osDefaultAction;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getDefaultAction(event);
+		}
+		if ((event.result == null || event.result.length() == 0) && v.lVal == COM.CHILDID_SELF) {
+			code = get_name(0, pszDefaultAction);
+		}
+		if (event.result == null) return code;
+		if (event.result.length() == 0) return COM.S_FALSE;
+		setString(pszDefaultAction, event.result);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accDescription([in] varChild, [out] pszDescription) */
+	int get_accDescription(int /*long*/ varChild, int /*long*/ pszDescription) {
+		if (DEBUG) print(this + ".IAccessible::get_accDescription");
+		/* 
+		 * MSAA: "The accDescription property is not supported in the transition to
+		 * UI Automation. MSAA servers and applications should not use it."
+		 * 
+		 * TODO: Description was exposed as SWT API. We will need to either deprecate this (?),
+		 * or find a suitable replacement. Also, check description property on other platforms.
+		 * If it is truly deprecated for MSAA, then perhaps it can be reused for IAccessibleImage.
+		 * Note that the trick to expose tree columns (below) was not supported by screen readers,
+		 * so it should be replaced.
+		 */
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		String osDescription = null;
+		if (iaccessible != null) {
+			/* Get the default description from the OS. */
+			code = iaccessible.get_accDescription(varChild, pszDescription);
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			// TEMPORARY CODE - process tree even if there are no apps listening
+			if (accessibleListeners.size() == 0 && !(control instanceof Tree)) return code;
+			if (code == COM.S_OK) {
+				int /*long*/[] pDescription = new int /*long*/[1];
+				COM.MoveMemory(pDescription, pszDescription, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pDescription[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pDescription[0], size);
+					osDescription = new String(buffer);
+				}
+			}
+		}
+		
+		AccessibleEvent event = new AccessibleEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osDescription;
+		
+		// TEMPORARY CODE
+		/* Currently our tree columns are emulated using custom draw,
+		 * so we need to create the description using the tree column
+		 * header text and tree item text. */
+		if (v.lVal != COM.CHILDID_SELF) {
+			if (control instanceof Tree) {
+				Tree tree = (Tree) control;
+				int columnCount = tree.getColumnCount ();
+				if (columnCount > 1) {
+					int /*long*/ hwnd = control.handle, hItem = 0;
+					if (OS.COMCTL32_MAJOR >= 6) {
+						hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
+					} else {
+						hItem = v.lVal;
+					}
+					Widget widget = tree.getDisplay ().findWidget (hwnd, hItem);
+					event.result = "";
+					if (widget != null && widget instanceof TreeItem) {
+						TreeItem item = (TreeItem) widget;
+						for (int i = 1; i < columnCount; i++) {
+							event.result += tree.getColumn(i).getText() + ": " + item.getText(i);
+							if (i + 1 < columnCount) event.result += ", ";
+						}
+					}
+				}
+			}
+		}
+		for (int i = 0; i < accessibleListeners.size(); i++) {
+			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+			listener.getDescription(event);
+		}
+		if (event.result == null) return code;
+		if (event.result.length() == 0) return COM.S_FALSE;
+		setString(pszDescription, event.result);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accFocus([out] pvarChild)
+	 * Ownership of pvarChild transfers from callee to caller so reference count on pvarChild 
+	 * must be incremented before returning.  The caller is responsible for releasing pvarChild.
+	 */
+	int get_accFocus(int /*long*/ pvarChild) {
+		int osChild = ACC.CHILDID_NONE;
+		if (iaccessible != null) {
+			/* Get the default focus child from the OS. */
+			int code = iaccessible.get_accFocus(pvarChild);
+			if (code == COM.S_OK) {
+				VARIANT v = getVARIANT(pvarChild);
+				if (v.vt == COM.VT_I4) osChild = v.lVal;
+				// TODO: need to check VT_DISPATCH (don't use struct)
+				if (DEBUG) if (v.vt == COM.VT_DISPATCH) print("IAccessible::get_accFocus() super returned VT_DISPATCH"); 
+			}
+			if (accessibleControlListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::get_accFocus() returning childID=" + osChild + " from super" + hresult(code));
+				return code;
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osChild == ACC.CHILDID_NONE ? ACC.CHILDID_NONE : osToChildID(osChild);
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getFocus(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible != null) {
+			if (DEBUG) print(this + ".IAccessible::get_accFocus() returning accessible " + accessible.getAddress() + hresult(COM.S_OK));
+			accessible.AddRef();
+			setPtrVARIANT(pvarChild, COM.VT_DISPATCH, accessible.getAddress());
+			return COM.S_OK;
+		}
+		int childID = event.childID;
+		if (childID == ACC.CHILDID_NONE) {
+			if (DEBUG) print(this + ".IAccessible::get_accFocus() returning VT_EMPTY" + hresult(COM.S_FALSE));
+			setIntVARIANT(pvarChild, COM.VT_EMPTY, 0);
+			return COM.S_FALSE;
+		}
+		if (childID == ACC.CHILDID_SELF) {
+			if (DEBUG) print(this + ".IAccessible::get_accFocus() returning CHILDID_SELF " + hresult(COM.S_OK));
+			AddRef();
+			setIntVARIANT(pvarChild, COM.VT_I4, COM.CHILDID_SELF);
+			return COM.S_OK;
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accFocus() returning childID " + childIDToOs(childID) + hresult(COM.S_OK));
+		setIntVARIANT(pvarChild, COM.VT_I4, childIDToOs(childID));
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accHelp([in] varChild, [out] pszHelp) */
+	int get_accHelp(int /*long*/ varChild, int /*long*/ pszHelp) {
+		if (DEBUG) print(this + ".IAccessible::get_accHelp");
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		String osHelp = null;
+		if (iaccessible != null) {
+			/* Get the default help string from the OS. */
+			code = iaccessible.get_accHelp(varChild, pszHelp);
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			if (accessibleListeners.size() == 0) return code;
+			if (code == COM.S_OK) {
+				int /*long*/[] pHelp = new int /*long*/[1];
+				COM.MoveMemory(pHelp, pszHelp, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pHelp[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pHelp[0], size);
+					osHelp = new String(buffer);
+				}
+			}
+		}
+
+		AccessibleEvent event = new AccessibleEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osHelp;
+		for (int i = 0; i < accessibleListeners.size(); i++) {
+			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+			listener.getHelp(event);
+		}
+		if (event.result == null) return code;
+		if (event.result.length() == 0) return COM.S_FALSE;
+		setString(pszHelp, event.result);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accHelpTopic([out] pszHelpFile, [in] varChild, [out] pidTopic) */
+	int get_accHelpTopic(int /*long*/ pszHelpFile, int /*long*/ varChild, int /*long*/ pidTopic) {
+		if (DEBUG) print(this + ".IAccessible::get_accHelpTopic");
+		/* MSAA: "The accHelpTopic property is deprecated and should not be used." */
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* Since it is possible that a native control might still handle get_accHelpTopic,
+			 * we will continue to send this through to the proxy. */
+			code = iaccessible.get_accHelpTopic(pszHelpFile, varChild, pidTopic);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+		}
+		return code;
+	}
+
+	/* IAccessible::get_accKeyboardShortcut([in] varChild, [out] pszKeyboardShortcut) */
+	int get_accKeyboardShortcut(int /*long*/ varChild, int /*long*/ pszKeyboardShortcut) {
+		if (DEBUG) print(this + ".IAccessible::get_accKeyboardShortcut");
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		String osKeyboardShortcut = null;
+		if (iaccessible != null) {
+			/* Get the default keyboard shortcut from the OS. */
+			code = iaccessible.get_accKeyboardShortcut(varChild, pszKeyboardShortcut);
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			if (accessibleListeners.size() == 0) return code;
+			if (code == COM.S_OK) {
+				int /*long*/[] pKeyboardShortcut = new int /*long*/[1];
+				COM.MoveMemory(pKeyboardShortcut, pszKeyboardShortcut, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pKeyboardShortcut[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pKeyboardShortcut[0], size);
+					osKeyboardShortcut = new String(buffer);
+				}
+			}
+		}
+
+		AccessibleEvent event = new AccessibleEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osKeyboardShortcut;
+		for (int i = 0; i < accessibleListeners.size(); i++) {
+			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+			listener.getKeyboardShortcut(event);
+		}
+		if (event.result == null) return code;
+		if (event.result.length() == 0) return COM.S_FALSE;
+		setString(pszKeyboardShortcut, event.result);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accName([in] varChild, [out] pszName) */
+	int get_accName(int /*long*/ varChild, int /*long*/ pszName) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.S_FALSE;
+		String osName = null;
+		if (iaccessible != null) {
+			/* Get the default name from the OS. */
+			code = iaccessible.get_accName(varChild, pszName);
+			if (code == COM.S_OK) {
+				int /*long*/[] pName = new int /*long*/[1];
+				COM.MoveMemory(pName, pszName, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pName[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pName[0], size);
+					osName = new String(buffer);
+				}
+			}
+			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
+			if (accessibleListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::get_accName(" + v.lVal + ") returning name=" + osName + " from super" + hresult(code));
+				return code;
+			}
+		}
+
+		AccessibleEvent event = new AccessibleEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osName;
+		for (int i = 0; i < accessibleListeners.size(); i++) {
+			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+			listener.getName(event);
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accName(" + v.lVal + ") returning " + event.result + hresult(event.result == null ? code : event.result.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		if (event.result == null) return code;
+		if (event.result.length() == 0) return COM.S_FALSE;
+		setString(pszName, event.result);
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accParent([out] ppdispParent)
+	 * Ownership of ppdispParent transfers from callee to caller so reference count on ppdispParent 
+	 * must be incremented before returning.  The caller is responsible for releasing ppdispParent.
+	 */
+	int get_accParent(int /*long*/ ppdispParent) {
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* Currently, we don't expose this as API. Forward to the proxy. */
+			code = iaccessible.get_accParent(ppdispParent);
+		}
+		if (parent != null) {
+			/* For lightweight accessibles, return the accessible's parent. */
+			parent.AddRef();
+			COM.MoveMemory(ppdispParent, new int /*long*/[] { parent.getAddress() }, OS.PTR_SIZEOF);
+			code = COM.S_OK;
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accParent() returning" + (parent != null ? " " + parent.getAddress() : " from super") + hresult(code));
+		return code;
+	}
+	
+	/* IAccessible::get_accRole([in] varChild, [out] pvarRole) */
+	int get_accRole(int /*long*/ varChild, int /*long*/ pvarRole) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int osRole = COM.ROLE_SYSTEM_CLIENT;
+		if (iaccessible != null) {
+			/* Get the default role from the OS. */
+			int code = iaccessible.get_accRole(varChild, pvarRole);
+			if (code == COM.S_OK) {
+				VARIANT v2 = getVARIANT(pvarRole);
+				if (v2.vt == COM.VT_I4) osRole = v2.lVal;
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.detail = osToRole(osRole);
+		// TEMPORARY CODE
+		/* Currently our checkbox table and tree are emulated using state mask images,
+		 * so we need to specify 'checkbox' role for the items. */
+		if (control instanceof Tree || control instanceof Table) {
+			if (v.lVal != COM.CHILDID_SELF && (control.getStyle() & SWT.CHECK) != 0) event.detail = ACC.ROLE_CHECKBUTTON;
+		}
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getRole(event);
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accRole(" + v.lVal + ") returning " + getRoleString(roleToOs(event.detail)) + hresult(COM.S_OK));
+		setIntVARIANT(pvarRole, COM.VT_I4, roleToOs(event.detail));
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accSelection([out] pvarChildren)
+	 * Ownership of pvarChildren transfers from callee to caller so reference count on pvarChildren 
+	 * must be incremented before returning.  The caller is responsible for releasing pvarChildren.
+	 */
+	int get_accSelection(int /*long*/ pvarChildren) {
+		if (DEBUG) print(this + ".IAccessible::get_accSelection");
+		int osChild = ACC.CHILDID_NONE;
+		int /*long*/ osChildObject = 0;
+		if (iaccessible != null) {
+			/* Get the default selection from the OS. */
+			int code = iaccessible.get_accSelection(pvarChildren);
+			if (accessibleControlListeners.size() == 0) return code;
+			if (code == COM.S_OK) {
+				VARIANT v = getVARIANT(pvarChildren);
+				if (v.vt == COM.VT_I4) {
+					osChild = osToChildID(v.lVal);
+				} else if (v.vt == COM.VT_DISPATCH) {
+					osChildObject = v.lVal; // TODO: don't use struct; lVal is an int
+				} else if (v.vt == COM.VT_UNKNOWN) {
+					osChild = ACC.CHILDID_MULTIPLE;
+					// TODO: Should get IEnumVARIANT from punkVal field, and enumerate children...
+				}
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osChild;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getSelection(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible != null) {
+			accessible.AddRef();
+			setPtrVARIANT(pvarChildren, COM.VT_DISPATCH, accessible.getAddress());
+			return COM.S_OK;
+		}
+		int childID = event.childID;
+		if (childID == ACC.CHILDID_NONE) {
+			if (osChildObject != 0) return COM.S_OK;
+			setIntVARIANT(pvarChildren, COM.VT_EMPTY, 0);
+			return COM.S_FALSE;
+		}
+		if (childID == ACC.CHILDID_MULTIPLE) {
+			// TODO: return an enumeration for event.children (currently just returns enumeration from proxy)
+			//AddRef();
+			//setPtrVARIANT(pvarChildren, COM.VT_UNKNOWN, getAddress());
+			return COM.S_OK;
+		}
+		if (childID == ACC.CHILDID_SELF) {
+			AddRef();
+			setPtrVARIANT(pvarChildren, COM.VT_DISPATCH, getAddress());
+			return COM.S_OK;
+		}
+		setIntVARIANT(pvarChildren, COM.VT_I4, childIDToOs(childID));
+		return COM.S_OK;
+	}
+	
+	/* IAccessible::get_accState([in] varChild, [out] pvarState) */
+	int get_accState(int /*long*/ varChild, int /*long*/ pvarState) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int osState = 0;
+		if (iaccessible != null) {
+			/* Get the default state from the OS. */
+			int code = iaccessible.get_accState(varChild, pvarState);
+			if (code == COM.S_OK) {
+				VARIANT v2 = getVARIANT(pvarState);
+				if (v2.vt == COM.VT_I4) osState = v2.lVal;
+			}
+		}
+		
+		boolean grayed = false;
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.detail = osToState(osState);
+		// TEMPORARY CODE
+		/* Currently our checkbox table and tree are emulated using state mask
+		 * images, so we need to determine if the item state is 'checked'. */
+		if (v.lVal != COM.CHILDID_SELF) {
+			if (control instanceof Tree && (control.getStyle() & SWT.CHECK) != 0) {
+				int /*long*/ hwnd = control.handle;
+				TVITEM tvItem = new TVITEM ();
+				tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
+				tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
+				if (OS.COMCTL32_MAJOR >= 6) {
+					tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
+				} else {
+					tvItem.hItem = v.lVal;
+				}
+				int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
+				boolean checked = (result != 0) && (((tvItem.state >> 12) & 1) == 0);
+				if (checked) event.detail |= ACC.STATE_CHECKED;
+				grayed = tvItem.state >> 12 > 2;
+			} else if (control instanceof Table && (control.getStyle() & SWT.CHECK) != 0) {
+				Table table = (Table) control;
+				int index = event.childID;
+				if (0 <= index && index < table.getItemCount()) {
+					TableItem item = table.getItem(index);
+					if (item.getChecked()) event.detail |= ACC.STATE_CHECKED;
+					if (item.getGrayed()) grayed = true;
+				}
+			}
+		}
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getState(event);
+		}
+		int state = stateToOs(event.detail);
+		if ((state & ACC.STATE_CHECKED) != 0 && grayed) {
+			state &= ~ COM.STATE_SYSTEM_CHECKED;
+			state |= COM.STATE_SYSTEM_MIXED;
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accState(" + v.lVal + ") returning" + getStateString(state) + hresult(COM.S_OK));
+		setIntVARIANT(pvarState, COM.VT_I4, state);
+		return COM.S_OK;
+	}
+
+	/* IAccessible::get_accValue([in] varChild, [out] pszValue) */
+	int get_accValue(int /*long*/ varChild, int /*long*/ pszValue) {
+		VARIANT v = getVARIANT(varChild);
+		if (v.vt != COM.VT_I4) return COM.E_INVALIDARG;
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		String osValue = null;
+		if (iaccessible != null) {
+			/* Get the default value string from the OS. */
+			code = iaccessible.get_accValue(varChild, pszValue);
+			if (code == COM.S_OK) {
+				int /*long*/[] pValue = new int /*long*/[1];
+				COM.MoveMemory(pValue, pszValue, OS.PTR_SIZEOF);
+				int size = COM.SysStringByteLen(pValue[0]);
+				if (size > 0) {
+					char[] buffer = new char[(size + 1) /2];
+					COM.MoveMemory(buffer, pValue[0], size);
+					osValue = new String(buffer);
+				}
+			}
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+			if (accessibleControlListeners.size() == 0) {
+				if (DEBUG) print(this + ".IAccessible::get_accValue(" + v.lVal + ") returning value=" + osValue + " from super" + hresult(code));
+				return code;
+			}
+		}
+
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = osToChildID(v.lVal);
+		event.result = osValue;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getValue(event);
+		}
+		if (DEBUG) print(this + ".IAccessible::get_accValue(" + v.lVal + ") returning " + event.result + hresult(event.result == null ? code : COM.S_OK));
+		if (event.result == null) return code;
+		// empty string is a valid value, so do not test for it
+		setString(pszValue, event.result);
+		return COM.S_OK;
+	}
+	
+	/* put_accName([in] varChild, [in] szName) */
+	int put_accName(int /*long*/ varChild, int /*long*/ szName) {
+		/* MSAA: "The IAccessible::put_accName method is no longer supported. Servers should return E_NOTIMPL." */
+		return COM.E_NOTIMPL;
+	}
+	
+	// We may support this method with IAccessibleEditableText, but we are not providing IAccessibleEditableText at this time.
+	/* put_accValue([in] varChild, [in] szValue) */
+	int put_accValue(int /*long*/ varChild, int /*long*/ szValue) {
+		/* MSAA: this method is typically only used for edit controls. */
+		int code = COM.DISP_E_MEMBERNOTFOUND;
+		if (iaccessible != null) {
+			/* Currently, we don't expose this as API. Forward to the proxy. */
+			code = iaccessible.put_accValue(varChild, szValue);
+			if (code == COM.E_INVALIDARG) code = COM.DISP_E_MEMBERNOTFOUND; // proxy doesn't know about app childID
+		}
+		return code;
+	}
+
+	/* IEnumVARIANT methods: Next, Skip, Reset, Clone */
+	/* Retrieve the next celt items in the enumeration sequence. 
+	 * If there are fewer than the requested number of elements left
+	 * in the sequence, retrieve the remaining elements.
+	 * The number of elements actually retrieved is returned in pceltFetched 
+	 * (unless the caller passed in NULL for that parameter).
+	 */
+	 
+	/* IEnumVARIANT::Next([in] celt, [out] rgvar, [in, out] pceltFetched)
+	 * Ownership of rgvar transfers from callee to caller so reference count on rgvar 
+	 * must be incremented before returning.  The caller is responsible for releasing rgvar.
+	 */
+	int Next(int celt, int /*long*/ rgvar, int /*long*/ pceltFetched) {
+		if (DEBUG) print(this + ".IEnumVARIANT::Next");
+		/* If there are no listeners, query the proxy for
+		 * its IEnumVariant, and get the Next items from it.
+		 */
+		if (iaccessible != null && accessibleControlListeners.size() == 0) {
+			int /*long*/[] ppvObject = new int /*long*/[1];
+			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
+			if (code != COM.S_OK) return code;
+			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
+			int[] celtFetched = new int[1];
+			code = ienumvariant.Next(celt, rgvar, celtFetched);
+			ienumvariant.Release();
+			COM.MoveMemory(pceltFetched, celtFetched, 4);
+			return code;
+		}
+
+		if (rgvar == 0) return COM.E_INVALIDARG;
+		if (pceltFetched == 0 && celt != 1) return COM.E_INVALIDARG;
+		if (enumIndex == 0) {
+			AccessibleControlEvent event = new AccessibleControlEvent(this);
+			event.childID = ACC.CHILDID_SELF;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getChildren(event);
+			}
+			variants = event.children;
+		}	
+		Object[] nextItems = null;
+		if (variants != null && celt >= 1) {
+			int endIndex = enumIndex + celt - 1;
+			if (endIndex > (variants.length - 1)) endIndex = variants.length - 1;
+			if (enumIndex <= endIndex) {
+				nextItems = new Object[endIndex - enumIndex + 1];
+				for (int i = 0; i < nextItems.length; i++) {
+					Object child = variants[enumIndex];
+					if (child instanceof Integer) {
+						nextItems[i] = new Integer(childIDToOs(((Integer)child).intValue()));
+					} else {
+						nextItems[i] = child;
+					}
+					enumIndex++;
+				}
+			}
+		}
+		if (nextItems != null) {
+			for (int i = 0; i < nextItems.length; i++) {
+				Object nextItem = nextItems[i];
+				if (nextItem instanceof Integer) {
+					int item = ((Integer) nextItem).intValue();
+					setIntVARIANT(rgvar + i * VARIANT.sizeof, COM.VT_I4, item);
+				} else {
+					Accessible accessible = (Accessible) nextItem;
+					accessible.AddRef();
+					setPtrVARIANT(rgvar + i * VARIANT.sizeof, COM.VT_DISPATCH, accessible.getAddress());
+				}
+			}
+			if (pceltFetched != 0)
+				COM.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4);
+			if (nextItems.length == celt) return COM.S_OK;
+		} else {
+			if (pceltFetched != 0)
+				COM.MoveMemory(pceltFetched, new int[] {0}, 4);
+		}
+		return COM.S_FALSE;
+	}
+
+	/* IEnumVARIANT::Skip([in] celt) over the specified number of elements in the enumeration sequence. */
+	int Skip(int celt) {
+		if (DEBUG) print(this + ".IEnumVARIANT::Skip");
+		/* If there are no listeners, query the proxy
+		 * for its IEnumVariant, and tell it to Skip.
+		 */
+		if (iaccessible != null && accessibleControlListeners.size() == 0) {
+			int /*long*/[] ppvObject = new int /*long*/[1];
+			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
+			if (code != COM.S_OK) return code;
+			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
+			code = ienumvariant.Skip(celt);
+			ienumvariant.Release();
+			return code;
+		}
+
+		if (celt < 1 ) return COM.E_INVALIDARG;
+		enumIndex += celt;
+		if (enumIndex > (variants.length - 1)) {
+			enumIndex = variants.length - 1;
+			return COM.S_FALSE;
+		}
+		return COM.S_OK;
+	}
+	
+	/* IEnumVARIANT::Reset() the enumeration sequence to the beginning. */
+	int Reset() {
+		if (DEBUG) print(this + ".IEnumVARIANT::Reset");
+		/* If there are no listeners, query the proxy
+		 * for its IEnumVariant, and tell it to Reset.
+		 */
+		if (iaccessible != null && accessibleControlListeners.size() == 0) {
+			int /*long*/[] ppvObject = new int /*long*/[1];
+			int code = (int)/*64*/iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
+			if (code != COM.S_OK) return code;
+			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
+			code = ienumvariant.Reset();
+			ienumvariant.Release();
+			return code;
+		}
+		
+		enumIndex = 0;
+		return COM.S_OK;
+	}
+
+	/* IEnumVARIANT::Clone([out] ppEnum)
+	 * Ownership of ppEnum transfers from callee to caller so reference count on ppEnum 
+	 * must be incremented before returning.  The caller is responsible for releasing ppEnum.
+	 */
+	int Clone(int /*long*/ ppEnum) {
+		if (DEBUG) print(this + ".IEnumVARIANT::Clone");
+		/* If there are no listeners, query the proxy for
+		 * its IEnumVariant, and get the Clone from it.
+		 */
+		if (iaccessible != null && accessibleControlListeners.size() == 0) {
+			int /*long*/[] ppvObject = new int /*long*/[1];
+			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
+			if (code != COM.S_OK) return code;
+			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
+			int /*long*/ [] pEnum = new int /*long*/ [1];
+			code = ienumvariant.Clone(pEnum);
+			ienumvariant.Release();
+			COM.MoveMemory(ppEnum, pEnum, OS.PTR_SIZEOF);
+			return code;
+		}
+
+		if (ppEnum == 0) return COM.E_INVALIDARG;
+		COM.MoveMemory(ppEnum, new int /*long*/[] { objIEnumVARIANT.getAddress() }, OS.PTR_SIZEOF);
+		AddRef();
+		return COM.S_OK;
+	}
+	
+	/* IAccessible2::get_nRelations([out] pNRelations) */
+	int get_nRelations(int /*long*/ pNRelations) {
+		int count = getRelationCount();
+		if (DEBUG) print(this + ".IAccessible2::get_nRelations returning " + count + hresult(COM.S_OK));
+		COM.MoveMemory(pNRelations, new int [] { count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_relation([in] relationIndex, [out] ppRelation) */
+	int get_relation(int relationIndex, int /*long*/ ppRelation) {
+		int i = -1;
+		for (int type = 0; type < MAX_RELATION_TYPES; type++) {
+			Relation relation = (Relation)relations[type];
+			if (relation != null) i++;
+			if (i == relationIndex) {
+				if (DEBUG) print(this + ".IAccessible2::get_relation(" + relationIndex + ") returning " + relation.getAddress() + hresult(COM.S_OK));
+				relation.AddRef();
+				COM.MoveMemory(ppRelation, new int /*long*/[] { relation.getAddress() }, OS.PTR_SIZEOF);
+				return COM.S_OK;
+			}
+		}
+		if (DEBUG) print(this + ".IAccessible2::get_relation(" + relationIndex + ") returning" + hresult(COM.E_INVALIDARG));
+		return COM.E_INVALIDARG;
+	}
+
+	/* IAccessible2::get_relations([in] maxRelations, [out] ppRelations, [out] pNRelations) */
+	int get_relations(int maxRelations, int /*long*/ ppRelations, int /*long*/ pNRelations) {
+		int count = 0;
+		for (int type = 0; type < MAX_RELATION_TYPES; type++) {
+			if (count == maxRelations) break;
+			Relation relation = (Relation)relations[type];
+			if (relation != null) {
+				relation.AddRef();
+				COM.MoveMemory(ppRelations + count * OS.PTR_SIZEOF, new int /*long*/[] { relation.getAddress() }, OS.PTR_SIZEOF);
+				count++;
+			}
+		}
+		if (DEBUG) print(this + ".IAccessible2::get_relations(" + maxRelations + ") returning " + count + hresult(COM.S_OK));
+		COM.MoveMemory(pNRelations, new int [] { count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_role([out] pRole) */
+	int get_role(int /*long*/ pRole) {
+		int role = getRole();
+		if (role == 0) role = getDefaultRole();
+		if (DEBUG) print(this + ".IAccessible2::get_role() returning " + getRoleString(role) + hresult(COM.S_OK));
+		COM.MoveMemory(pRole, new int [] { role }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::scrollTo([in] scrollType) */
+	int scrollTo(int scrollType) {
+		if (DEBUG) print(this + ".IAccessible2::scrollTo");
+		if (scrollType < ACC.SCROLL_TYPE_LEFT_EDGE || scrollType > ACC.SCROLL_TYPE_ANYWHERE) return COM.E_INVALIDARG;
+		return COM.E_NOTIMPL;
+	}
+
+	/* IAccessible2::scrollToPoint([in] coordinateType, [in] x, [in] y) */
+	int scrollToPoint(int coordinateType, int x, int y) {
+		if (DEBUG) print(this + ".IAccessible2::scrollToPoint");
+		if (coordinateType != COM.IA2_COORDTYPE_SCREEN_RELATIVE) return COM.E_INVALIDARG;
+		return COM.E_NOTIMPL;
+	}
+
+	/* IAccessible2::get_groupPosition([out] pGroupLevel, [out] pSimilarItemsInGroup, [out] pPositionInGroup) */
+	int get_groupPosition(int /*long*/ pGroupLevel, int /*long*/ pSimilarItemsInGroup, int /*long*/ pPositionInGroup) {
+		// TODO: handle where possible - maybe add AccessibleGroup later
+		//get the role
+		//if it has role tree, then the level is the value else 0 (for N/A)
+		int groupLevel = 0;
+		COM.MoveMemory(pGroupLevel, new int [] { groupLevel }, 4);
+		//get the children of the parent
+		//collect all children with the same role, if none, then 0 (for N/A)
+		int similarItemsInGroup = 0;
+		COM.MoveMemory(pSimilarItemsInGroup, new int [] { similarItemsInGroup }, 4);
+		//find this guy's 1-based index in the children of the parent (0 for N/A)
+		int positionInGroup = 0;
+		COM.MoveMemory(pPositionInGroup, new int [] { positionInGroup }, 4);
+		if (DEBUG) print(this + ".IAccessible2::get_groupPosition() returning" + hresult(groupLevel == 0 && similarItemsInGroup == 0 && positionInGroup == 0 ? COM.S_FALSE : COM.S_OK));
+		if (groupLevel == 0 && similarItemsInGroup == 0 && positionInGroup == 0) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_states([out] pStates) */
+	int get_states(int /*long*/ pStates) {
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = ACC.CHILDID_SELF;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getState(event);
+		}
+		int states = event.detail;
+		int ia2States = 0;
+		if ((states & ACC.STATE_ACTIVE) != 0) ia2States |= COM.IA2_STATE_ACTIVE;
+		if ((states & ACC.STATE_SINGLELINE) != 0) ia2States |= COM.IA2_STATE_SINGLE_LINE;
+		if ((states & ACC.STATE_MULTILINE) != 0) ia2States |= COM.IA2_STATE_MULTI_LINE;
+		if ((states & ACC.STATE_REQUIRED) != 0) ia2States |= COM.IA2_STATE_REQUIRED;
+		if ((states & ACC.STATE_INVALID_ENTRY) != 0) ia2States |= COM.IA2_STATE_INVALID_ENTRY;
+		if ((states & ACC.STATE_SUPPORTS_AUTOCOMPLETION) != 0) ia2States |= COM.IA2_STATE_SUPPORTS_AUTOCOMPLETION;
+		
+		/* If the role is text and there are TextExtendedListeners, then set IA2_STATE_EDITABLE.
+		 * Note that IA2_STATE_EDITABLE is not the opposite of STATE_READONLY.
+		 * Instead, it means: "has a caret, supports IAccessibleText, and is a text editing environment".
+		 */
+		if (getRole() == ACC.ROLE_TEXT && accessibleTextExtendedListeners.size() > 0) {
+			ia2States |= COM.IA2_STATE_EDITABLE;
+		}
+		if (DEBUG) print(this + ".IAccessible2::get_states returning" + getIA2StatesString(ia2States) + hresult(COM.S_OK));
+		COM.MoveMemory(pStates, new int [] { ia2States }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_extendedRole([out] pbstrExtendedRole) */
+	int get_extendedRole(int /*long*/ pbstrExtendedRole) {
+		/* This feature is not supported. */
+		setString(pbstrExtendedRole, null);
+		return COM.S_FALSE;
+	}
+
+	/* IAccessible2::get_localizedExtendedRole([out] pbstrLocalizedExtendedRole) */
+	int get_localizedExtendedRole(int /*long*/ pbstrLocalizedExtendedRole) {
+		/* This feature is not supported. */
+		setString(pbstrLocalizedExtendedRole, null);
+		return COM.S_FALSE;
+	}
+
+	/* IAccessible2::get_nExtendedStates([out] pNExtendedStates) */
+	int get_nExtendedStates(int /*long*/ pNExtendedStates) {
+		/* This feature is not supported. */
+		COM.MoveMemory(pNExtendedStates, new int [] { 0 }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_extendedStates([in] maxExtendedStates, [out] ppbstrExtendedStates, [out] pNExtendedStates) */
+	int get_extendedStates(int maxExtendedStates, int /*long*/ ppbstrExtendedStates, int /*long*/ pNExtendedStates) {
+		/* This feature is not supported. */
+		setString(ppbstrExtendedStates, null);
+		COM.MoveMemory(pNExtendedStates, new int [] { 0 }, 4);
+		return COM.S_FALSE;
+	}
+
+	/* IAccessible2::get_localizedExtendedStates([in] maxLocalizedExtendedStates, [out] ppbstrLocalizedExtendedStates, [out] pNLocalizedExtendedStates) */
+	int get_localizedExtendedStates(int maxLocalizedExtendedStates, int /*long*/ ppbstrLocalizedExtendedStates, int /*long*/ pNLocalizedExtendedStates) {
+		/* This feature is not supported. */
+		setString(ppbstrLocalizedExtendedStates, null);
+		COM.MoveMemory(pNLocalizedExtendedStates, new int [] { 0 }, 4);
+		return COM.S_FALSE;
+	}
+
+	/* IAccessible2::get_uniqueID([out] pUniqueID) */
+	int get_uniqueID(int /*long*/ pUniqueID) {
+		if (uniqueID == -1) uniqueID = UniqueID--;
+		if (DEBUG) print(this + ".IAccessible2::get_uniqueID returning " + uniqueID + hresult(COM.S_OK));
+		COM.MoveMemory(pUniqueID, new int /*long*/ [] { uniqueID }, 4);
+		return COM.S_OK;
 	}
-	
-	/* QueryInterface([in] iid, [out] ppvObject)
-	 * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject 
-	 * must be incremented before returning.  Caller is responsible for releasing ppvObject.
-	 */
-	int QueryInterface(int /*long*/ iid, int /*long*/ ppvObject) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		GUID guid = new GUID();
-		COM.MoveMemory(guid, iid, GUID.sizeof);
 
-		if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) {
-			COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible.getAddress()}, OS.PTR_SIZEOF);
-			AddRef();
-			return COM.S_OK;
-		}
+	/* IAccessible2::get_windowHandle([out] pWindowHandle) */
+	int get_windowHandle(int /*long*/ pWindowHandle) {
+		if (DEBUG) print(this + ".IAccessible2::get_windowHandle returning " + control.handle + hresult(COM.S_OK));
+		COM.MoveMemory(pWindowHandle, new int /*long*/ [] { control.handle }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
 
-		if (COM.IsEqualGUID(guid, COM.IIDIDispatch)) {
-			COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible.getAddress()}, OS.PTR_SIZEOF);
-			AddRef();
-			return COM.S_OK;
+	/* IAccessible2::get_indexInParent([out] pIndexInParent) */
+	int get_indexInParent(int /*long*/ pIndexInParent) {
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = ACC.CHILDID_CHILD_INDEX;
+		event.detail = -1;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getChild(event);
 		}
-
-		if (COM.IsEqualGUID(guid, COM.IIDIAccessible)) {
-			COM.MoveMemory(ppvObject, new int /*long*/[] { objIAccessible.getAddress()}, OS.PTR_SIZEOF);
-			AddRef();
-			return COM.S_OK;
+		int indexInParent = event.detail;
+		if (indexInParent == -1) {
+//			/* The application did not implement CHILDID_CHILD_INDEX,
+//			 * so determine the index by looping through the parent's
+//			 * children looking for this Accessible. This may be slow,
+//			 * so applications are strongly encouraged to implement
+//			 * getChild for CHILDID_CHILD_INDEX.
+//			 */
+//			// TODO: finish this. See also get_groupPosition
+			// this won't work because VARIANT.sizeof isn't big enough on 64-bit machines.
+			// just create an  int /*long*/ [] ppdispParent - it's not a variant anyhow... 
+//			int /*long*/ ppdispParent = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+//			int code = get_accParent(ppdispParent);
+//			if (code == COM.S_OK) {
+//				VARIANT v = getVARIANT(ppdispParent);
+//				if (v.vt == COM.VT_DISPATCH) {
+//					IAccessible accParent = new IAccessible(v.lVal);
+//					int /*long*/ pcountChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, 4);
+//					code = accParent.get_accChildCount(pcountChildren);
+//					if (code == COM.S_OK) {
+//						int [] childCount = new int[1];
+//						OS.MoveMemory(childCount, pcountChildren, 4);
+//						int[] pcObtained = new int[1];
+//						int /*long*/ rgVarChildren = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof * childCount[0]);
+//						System.out.println("Asking for AccessibleChildren");
+//						code = COM.AccessibleChildren(accParent.getAddress(), 0, childCount[0], rgVarChildren, pcObtained);
+//						if (code == COM.S_OK) {
+//							System.out.println("Got this far - now what?");
+//						} else {
+//							System.out.println("AccessibleChildren failed? code=" + code);
+//						}
+//						OS.GlobalFree(rgVarChildren);
+//					} else {
+//						System.out.println("get_accChildCount failed? code=" + code);
+//					}
+//					OS.GlobalFree (pcountChildren);
+//				} else {
+//					System.out.println("get_accParent did not return VT_DISPATCH? It returned: " + v.vt);
+//				}
+//				COM.VariantClear(ppdispParent);
+//				OS.GlobalFree (ppdispParent);
+//			} else {
+//				System.out.println("get_accParent failed? code=" + code);
+//			}
 		}
 
-		if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) {
-			COM.MoveMemory(ppvObject, new int /*long*/[] { objIEnumVARIANT.getAddress()}, OS.PTR_SIZEOF);
-			AddRef();
-			enumIndex = 0;
-			return COM.S_OK;
+		if (DEBUG) print(this + ".IAccessible2::get_indexInParent returning " + indexInParent + hresult(indexInParent == -1 ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pIndexInParent, new int [] { indexInParent }, 4);
+		return indexInParent == -1 ? COM.S_FALSE : COM.S_OK;
+	}
+
+	/* IAccessible2::get_locale([out] pLocale) */
+	int get_locale(int /*long*/ pLocale) {
+		/* Return the default locale for the JVM. */
+		Locale locale = Locale.getDefault();
+		
+		char[] data = (locale.getLanguage()+"\0").toCharArray();
+		int /*long*/ ptr = COM.SysAllocString(data);
+		COM.MoveMemory(pLocale, new int /*long*/[] {ptr}, OS.PTR_SIZEOF);
+
+		data = (locale.getCountry()+"\0").toCharArray();
+		ptr = COM.SysAllocString(data);
+		COM.MoveMemory(pLocale + OS.PTR_SIZEOF, new int /*long*/[] {ptr}, OS.PTR_SIZEOF);
+
+		data = (locale.getVariant()+"\0").toCharArray();
+		ptr = COM.SysAllocString(data);
+		COM.MoveMemory(pLocale + 2 * OS.PTR_SIZEOF, new int /*long*/[] {ptr}, OS.PTR_SIZEOF);
+		
+		if (DEBUG) print(this + ".IAccessible2::get_locale() returning" + hresult(COM.S_OK));
+		return COM.S_OK;
+	}
+
+	/* IAccessible2::get_attributes([out] pbstrAttributes) */
+	int get_attributes(int /*long*/ pbstrAttributes) {
+		AccessibleAttributeEvent event = new AccessibleAttributeEvent(this);
+		for (int i = 0; i < accessibleAttributeListeners.size(); i++) {
+			AccessibleAttributeListener listener = (AccessibleAttributeListener) accessibleAttributeListeners.elementAt(i);
+			listener.getAttributes(event);
+		}
+		String attributes = "";
+		attributes += "margin-left:" + event.leftMargin + ";";
+		attributes += "margin-top:" + event.topMargin + ";";
+		attributes += "margin-right:" + event.rightMargin + ";";
+		attributes += "margin-bottom:" + event.bottomMargin + ";";
+		if (event.tabStops != null) {
+			for (int i = 0; i < event.tabStops.length; i++) {
+				attributes += "tab-stop:position=" + event.tabStops[i] + ";";
+			}
+		}
+		if (event.justify) attributes += "text-align:justify;";
+		attributes += "text-align:" + (event.alignment == SWT.LEFT ? "left" : event.alignment == SWT.RIGHT ? "right" : "center") + ";";
+		attributes += "text-indent:" + event.indent + ";";
+		if (event.attributes != null) {
+			for (int i = 0; i + 1 < event.attributes.length; i += 2) {
+				attributes += event.attributes[i] + ":" + event.attributes[i+1] + ";";
+			}
 		}
 
-		int /*long*/[] ppv = new int /*long*/[1];
-		int result = iaccessible.QueryInterface(guid, ppv);
-		COM.MoveMemory(ppvObject, ppv, OS.PTR_SIZEOF);
-		return result;
+		/* If the role is text, then specify the text model for JAWS. */
+		if (getRole() == ACC.ROLE_TEXT) {
+			attributes += "text-model:a1;";
+		}
+		if (DEBUG) print(this + ".IAccessible2::get_attributes() returning " + attributes + hresult(attributes.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		setString(pbstrAttributes, attributes);
+		if (attributes.length() == 0) return COM.S_FALSE;
+		return COM.S_OK;
 	}
 
-	int AddRef() {
-		refCount++;
-		return refCount;
+	/* IAccessibleAction::get_nActions([out] pNActions) */
+	int get_nActions(int /*long*/ pNActions) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.getActionCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleAction::get_nActions() returning " + event.count + hresult(COM.S_OK));
+		COM.MoveMemory(pNActions, new int [] { event.count }, 4);
+		return COM.S_OK;
 	}
 
-	int Release() {
-		refCount--;
+	/* IAccessibleAction::doAction([in] actionIndex) */
+	int doAction(int actionIndex) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		event.index = actionIndex;
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.doAction(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleAction::doAction(" + actionIndex + ") returning" + hresult(event.result == null || !event.result.equals(ACC.OK) ? COM.E_INVALIDARG : COM.S_OK));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
 
-		if (refCount == 0) {
-			if (objIAccessible != null)
-				objIAccessible.dispose();
-			objIAccessible = null;
-						
-			if (objIEnumVARIANT != null)
-				objIEnumVARIANT.dispose();
-			objIEnumVARIANT = null;
+	/* IAccessibleAction::get_description([in] actionIndex, [out] pbstrDescription) */
+	int get_description(int actionIndex, int /*long*/ pbstrDescription) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		event.index = actionIndex;
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.getDescription(event);
 		}
-		return refCount;
+		if (DEBUG) print(this + ".IAccessibleAction::get_description(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		setString(pbstrDescription, event.result);
+		if (event.result == null || event.result.length() == 0) return COM.S_FALSE;
+		return COM.S_OK;
 	}
 
-	int accDoDefaultAction(int /*long*/ variant) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// Currently, we don't let the application override this. Forward to the proxy.
-		int code = iaccessible.accDoDefaultAction(variant);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+	/* IAccessibleAction::get_keyBinding([in] actionIndex, [in] nMaxBindings, [out] ppbstrKeyBindings, [out] pNBindings) */
+	int get_keyBinding(int actionIndex, int nMaxBindings, int /*long*/ ppbstrKeyBindings, int /*long*/ pNBindings) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		event.index = actionIndex;
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.getKeyBinding(event);
+		}
+		String keyBindings = event.result;
+		int length = 0;
+		if (keyBindings != null) length = keyBindings.length();
+		int i = 0, count = 0;
+		while (i < length) {
+			if (count == nMaxBindings) break;
+			int j = keyBindings.indexOf(';', i);
+			if (j == -1) j = length;
+			String keyBinding = keyBindings.substring(i, j);
+			if (keyBinding.length() > 0) {
+				setString(ppbstrKeyBindings + count * OS.PTR_SIZEOF, keyBinding);
+				count++;
+			}
+			i = j + 1;
+		}
+		if (DEBUG) print(this + ".IAccessibleAction::get_keyBinding(index=" + actionIndex + " max=" + nMaxBindings + ") returning count=" + count + hresult(count == 0 ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pNBindings, new int [] { count }, 4);
+		if (count == 0) {
+			setString(ppbstrKeyBindings, null);
+			return COM.S_FALSE;
+		}
+		return COM.S_OK;
 	}
 
-	int accHitTest(int xLeft, int yTop, int /*long*/ pvarChild) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		if (accessibleControlListeners.size() == 0) {
-			return iaccessible.accHitTest(xLeft, yTop, pvarChild);
+	/* IAccessibleAction::get_name([in] actionIndex, [out] pbstrName) */
+	int get_name(int actionIndex, int /*long*/ pbstrName) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		event.index = actionIndex;
+		event.localized = false;
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.getName(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleAction::get_name(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		if (event.result == null || event.result.length() == 0) {
+			setString(pbstrName, null);
+			return COM.S_FALSE;
 		}
+		setString(pbstrName, event.result);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = ACC.CHILDID_NONE;
-		event.x = xLeft;
-		event.y = yTop;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getChildAtPoint(event);
+	/* IAccessibleAction::get_localizedName([in] actionIndex, [out] pbstrLocalizedName) */
+	int get_localizedName(int actionIndex, int /*long*/ pbstrLocalizedName) {
+		AccessibleActionEvent event = new AccessibleActionEvent(this);
+		event.index = actionIndex;
+		event.localized = true;
+		for (int i = 0; i < accessibleActionListeners.size(); i++) {
+			AccessibleActionListener listener = (AccessibleActionListener) accessibleActionListeners.elementAt(i);
+			listener.getName(event);
 		}
-		int childID = event.childID;
-		if (childID == ACC.CHILDID_NONE) {
-			return iaccessible.accHitTest(xLeft, yTop, pvarChild);
+		if (DEBUG) print(this + ".IAccessibleAction::get_localizedName(" + actionIndex + ") returning " + event.result + hresult(event.result == null || event.result.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		if (event.result == null || event.result.length() == 0) {
+			setString(pbstrLocalizedName, null);
+			return COM.S_FALSE;
 		}
-		//TODO - use VARIANT structure
-		COM.MoveMemory(pvarChild, new short[] { COM.VT_I4 }, 2);
-		COM.MoveMemory(pvarChild + 8, new int[] { childIDToOs(childID) }, 4);
+		setString(pbstrLocalizedName, event.result);
 		return COM.S_OK;
 	}
-	
-	int accLocation(int /*long*/ pxLeft, int /*long*/ pyTop, int /*long*/ pcxWidth, int /*long*/ pcyHeight, int /*long*/ variant) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
 
-		/* Get the default location from the OS. */
-		int osLeft = 0, osTop = 0, osWidth = 0, osHeight = 0;
-		int code = iaccessible.accLocation(pxLeft, pyTop, pcxWidth, pcyHeight, variant);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int[] pLeft = new int[1], pTop = new int[1], pWidth = new int[1], pHeight = new int[1];
-			COM.MoveMemory(pLeft, pxLeft, 4);
-			COM.MoveMemory(pTop, pyTop, 4);
-			COM.MoveMemory(pWidth, pcxWidth, 4);
-			COM.MoveMemory(pHeight, pcyHeight, 4);
-			osLeft = pLeft[0]; osTop = pTop[0]; osWidth = pWidth[0]; osHeight = pHeight[0];
+	/* IAccessibleApplication::get_appName([out] pbstrName) */
+	int get_appName(int /*long*/ pbstrName) {
+		String appName = Display.getAppName();
+		if (DEBUG) print(this + ".IAccessibleApplication::get_appName() returning " + appName + hresult(appName == null || appName.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		if (appName == null || appName.length() == 0) {
+			setString(pbstrName, null);
+			return COM.S_FALSE;
 		}
+		setString(pbstrName, appName);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.x = osLeft;
-		event.y = osTop;
-		event.width = osWidth;
-		event.height = osHeight;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getLocation(event);
+	/* IAccessibleApplication::get_appVersion([out] pbstrVersion) */
+	int get_appVersion(int /*long*/ pbstrVersion) {
+		String appVersion = Display.getAppVersion();
+		if (DEBUG) print(this + ".IAccessibleApplication::get_appVersion() returning" + appVersion + hresult(appVersion == null || appVersion.length() == 0 ? COM.S_FALSE : COM.S_OK));
+		if (appVersion == null || appVersion.length() == 0) {
+			setString(pbstrVersion, null);
+			return COM.S_FALSE;
 		}
-		OS.MoveMemory(pxLeft, new int[] { event.x }, 4);
-		OS.MoveMemory(pyTop, new int[] { event.y }, 4);
-		OS.MoveMemory(pcxWidth, new int[] { event.width }, 4);
-		OS.MoveMemory(pcyHeight, new int[] { event.height }, 4);
+		setString(pbstrVersion, appVersion);
 		return COM.S_OK;
 	}
-	
-	int accNavigate(int navDir, int /*long*/ variant, int /*long*/ pvarEndUpAt) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// Currently, we don't let the application override this. Forward to the proxy.
-		int code = iaccessible.accNavigate(navDir, variant, pvarEndUpAt);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+
+	/* IAccessibleApplication::get_toolkitName([out] pbstrName) */
+	int get_toolkitName(int /*long*/ pbstrName) {
+		String toolkitName = "SWT";
+		if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitName() returning" + toolkitName + hresult(COM.S_OK));
+		setString(pbstrName, toolkitName);
+		return COM.S_OK;
 	}
-	
-	int accSelect(int flagsSelect, int /*long*/ variant) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// Currently, we don't let the application override this. Forward to the proxy.
-		int code = iaccessible.accSelect(flagsSelect, variant);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+
+	/* IAccessibleApplication::get_toolkitVersion([out] pbstrVersion) */
+	int get_toolkitVersion(int /*long*/ pbstrVersion) {
+		String toolkitVersion = "" + SWT.getVersion(); //$NON-NLS-1$
+		if (DEBUG) print(this + ".IAccessibleApplication::get_toolkitVersion() returning" + toolkitVersion + hresult(COM.S_OK));
+		setString(pbstrVersion, toolkitVersion);
+		return COM.S_OK;
 	}
 
-	/* get_accChild([in] varChild, [out] ppdispChild)
-	 * Ownership of ppdispChild transfers from callee to caller so reference count on ppdispChild 
-	 * must be incremented before returning.  The caller is responsible for releasing ppdispChild.
-	 */
-	int get_accChild(int /*long*/ variant, int /*long*/ ppdispChild) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		if (accessibleControlListeners.size() == 0) {
-			int code = iaccessible.get_accChild(variant, ppdispChild);
-			if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-			return code;
+	// The following 3 method are intentionally commented. We are not providing IAccessibleComponent at this time.
+//	/* IAccessibleComponent::get_locationInParent([out] pX, [out] pY) */
+//	int get_locationInParent(int /*long*/ pX, int /*long*/ pY) {
+//		if (DEBUG) print(this + ".IAccessibleComponent::get_locationInParent");
+//		// TO DO: support transparently (hard for lightweight parents - screen vs. parent coords)
+//		AccessibleControlEvent event = new AccessibleControlEvent(this);
+//		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+//			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+//			listener.getLocation (event);
+//		}
+//		COM.MoveMemory(pX, new int [] { event.x }, 4);
+//		COM.MoveMemory(pY, new int [] { event.y }, 4);
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleComponent::get_foreground([out] pForeground) */
+//	int get_foreground(int /*long*/ pForeground) {
+//		Color color = control.getForeground();
+//		if (DEBUG) print(this + ".IAccessibleComponent::get_foreground returning " + color.handle);
+//		COM.MoveMemory(pForeground, new int [] { color.handle }, 4);
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleComponent::get_background([out] pBackground) */
+//	int get_background(int /*long*/ pBackground) {
+//		Color color = control.getBackground();
+//		if (DEBUG) print(this + ".IAccessibleComponent::get_background returning " + color.handle);
+//		COM.MoveMemory(pBackground, new int [] { color.handle }, 4);
+//		return COM.S_OK;
+//	}
+
+	// The following 7 method are intentionally commented. We are not providing IAccessibleEditableText at this time.
+//	/* IAccessibleEditableText::copyText([in] startOffset, [in] endOffset) */
+//	int copyText(int startOffset, int endOffset) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::copyText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.start = startOffset;
+//		event.end = endOffset;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.copyText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::deleteText([in] startOffset, [in] endOffset) */
+//	int deleteText(int startOffset, int endOffset) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::deleteText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.start = startOffset;
+//		event.end = endOffset;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.deleteText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::insertText([in] offset, [in] pbstrText) */
+//	int insertText(int offset, int /*long*/ pbstrText) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::insertText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.offset = offset;
+//		event.string = pbstrText;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.insertText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::cutText([in] startOffset, [in] endOffset) */
+//	int cutText(int startOffset, int endOffset) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::cutText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.start = startOffset;
+//		event.end = endOffset;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.cutText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::pasteText([in] offset) */
+//	int pasteText(int offset) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::pasteText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.offset = offset;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.pasteText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::replaceText([in] startOffset, [in] endOffset, [in] pbstrText) */
+//	int replaceText(int startOffset, int endOffset, int /*long*/ pbstrText) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::replaceText");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.start = startOffset;
+//		event.end = endOffset;
+//		event.string = pbstrText;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.replaceText(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleEditableText::setAttributes([in] startOffset, [in] endOffset, [in] pbstrAttributes) */
+//	int setAttributes(int startOffset, int endOffset, int /*long*/ pbstrAttributes) {
+//		if (DEBUG) print(this + ".IAccessibleEditableText::setAttributes");
+//		AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(this);
+//		event.start = startOffset;
+//		event.end = endOffset;
+//		event.attributes = pbstrAttributes;
+//		for (int i = 0; i < accessibleEditableTextListeners.size(); i++) {
+//			AccessibleEditableTextListener listener = (AccessibleEditableTextListener) accessibleEditableTextListeners.elementAt(i);
+//			listener.setAttributes(event);
+//		}
+//		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+//		return COM.S_OK;
+//	}
+
+	/* IAccessibleHyperlink::get_anchor([in] index, [out] pAnchor) */
+	int get_anchor(int index, int /*long*/ pAnchor) {
+		if (DEBUG) print(this + ".IAccessibleHyperlink::get_anchor");
+		AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
+		event.index = index;
+		for (int i = 0; i < accessibleHyperlinkListeners.size(); i++) {
+			AccessibleHyperlinkListener listener = (AccessibleHyperlinkListener) accessibleHyperlinkListeners.elementAt(i);
+			listener.getAnchor(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible != null) {
+			accessible.AddRef();
+			setPtrVARIANT(pAnchor, COM.VT_DISPATCH, accessible.getAddress());
+			return COM.S_OK;
 		}
+		setStringVARIANT(pAnchor, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getChild(event);
+	/* IAccessibleHyperlink::get_anchorTarget([in] index, [out] pAnchorTarget) */
+	int get_anchorTarget(int index, int /*long*/ pAnchorTarget) {
+		if (DEBUG) print(this + ".IAccessibleHyperlink::get_anchorTarget");
+		AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
+		event.index = index;
+		for (int i = 0; i < accessibleHyperlinkListeners.size(); i++) {
+			AccessibleHyperlinkListener listener = (AccessibleHyperlinkListener) accessibleHyperlinkListeners.elementAt(i);
+			listener.getAnchorTarget(event);
 		}
 		Accessible accessible = event.accessible;
 		if (accessible != null) {
 			accessible.AddRef();
-			COM.MoveMemory(ppdispChild, new int /*long*/[] { accessible.objIAccessible.getAddress() }, OS.PTR_SIZEOF);
+			setPtrVARIANT(pAnchorTarget, COM.VT_DISPATCH, accessible.getAddress());
 			return COM.S_OK;
 		}
-		return COM.S_FALSE;
+		setStringVARIANT(pAnchorTarget, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
 	}
-	
-	int get_accChildCount(int /*long*/ pcountChildren) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
 
-		/* Get the default child count from the OS. */
-		int osChildCount = 0;
-		int code = iaccessible.get_accChildCount(pcountChildren);
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int[] pChildCount = new int[1];
-			COM.MoveMemory(pChildCount, pcountChildren, 4);
-			osChildCount = pChildCount[0];
+	/* IAccessibleHyperlink::get_startIndex([out] pIndex) */
+	int get_startIndex(int /*long*/ pIndex) {
+		if (DEBUG) print(this + ".IAccessibleHyperlink::get_startIndex");
+		AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
+		for (int i = 0; i < accessibleHyperlinkListeners.size(); i++) {
+			AccessibleHyperlinkListener listener = (AccessibleHyperlinkListener) accessibleHyperlinkListeners.elementAt(i);
+			listener.getStartIndex(event);
 		}
+		COM.MoveMemory(pIndex, new int [] { event.index }, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = ACC.CHILDID_SELF;
-		event.detail = osChildCount;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getChildCount(event);
+	/* IAccessibleHyperlink::get_endIndex([out] pIndex) */
+	int get_endIndex(int /*long*/ pIndex) {
+		if (DEBUG) print(this + ".IAccessibleHyperlink::get_endIndex");
+		AccessibleHyperlinkEvent event = new AccessibleHyperlinkEvent(this);
+		for (int i = 0; i < accessibleHyperlinkListeners.size(); i++) {
+			AccessibleHyperlinkListener listener = (AccessibleHyperlinkListener) accessibleHyperlinkListeners.elementAt(i);
+			listener.getEndIndex(event);
 		}
+		COM.MoveMemory(pIndex, new int [] { event.index }, 4);
+		return COM.S_OK;
+	}
 
-		COM.MoveMemory(pcountChildren, new int[] { event.detail }, 4);
+	/* IAccessibleHyperlink::get_valid([out] pValid) */
+	int get_valid(int /*long*/ pValid) {
+		/* Deprecated. */
+		return COM.E_NOTIMPL;
+	}
+
+	/* IAccessibleHypertext::get_nHyperlinks([out] pHyperlinkCount) */
+	int get_nHyperlinks(int /*long*/ pHyperlinkCount) {
+		if (DEBUG) print(this + ".IAccessibleHypertext::get_nHyperlinks");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getHyperlinkCount(event);
+		}
+		COM.MoveMemory(pHyperlinkCount, new int [] { event.count }, 4);
 		return COM.S_OK;
 	}
-	
-	int get_accDefaultAction(int /*long*/ variant, int /*long*/ pszDefaultAction) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		
-		/* Get the default defaultAction from the OS. */
-		String osDefaultAction = null;
-		int code = iaccessible.get_accDefaultAction(variant, pszDefaultAction);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pDefaultAction = new int /*long*/[1];
-			COM.MoveMemory(pDefaultAction, pszDefaultAction, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pDefaultAction[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pDefaultAction[0], size);
-				osDefaultAction = new String(buffer);
-			}
+
+	/* IAccessibleHypertext::get_hyperlink([in] index, [out] ppHyperlink) */
+	int get_hyperlink(int index, int /*long*/ ppHyperlink) {
+		if (DEBUG) print(this + ".IAccessibleHypertext::get_hyperlink");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.index = index;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getHyperlink(event);
 		}
+		Accessible accessible = event.accessible;
+		if (accessible == null) {
+			setIntVARIANT(ppHyperlink, COM.VT_EMPTY, 0);
+			return COM.E_INVALIDARG;
+		}
+		accessible.AddRef();
+		COM.MoveMemory(ppHyperlink, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osDefaultAction;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getDefaultAction(event);
+	/* IAccessibleHypertext::get_hyperlinkIndex([in] charIndex, [out] pHyperlinkIndex) */
+	int get_hyperlinkIndex(int charIndex, int /*long*/ pHyperlinkIndex) {
+		if (DEBUG) print(this + ".IAccessibleHypertext::get_hyperlinkIndex");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.offset = charIndex;
+		event.index = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getHyperlinkIndex(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszDefaultAction, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pHyperlinkIndex, new int [] { event.index }, 4);
+		if (event.index == -1) return COM.S_FALSE;
 		return COM.S_OK;
 	}
-	
-	int get_accDescription(int /*long*/ variant, int /*long*/ pszDescription) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		
-		/* Get the default description from the OS. */
-		String osDescription = null;
-		int code = iaccessible.get_accDescription(variant, pszDescription);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		// TEMPORARY CODE - process tree even if there are no apps listening
-		if (accessibleListeners.size() == 0 && !(control instanceof Tree)) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pDescription = new int /*long*/[1];
-			COM.MoveMemory(pDescription, pszDescription, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pDescription[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pDescription[0], size);
-				osDescription = new String(buffer);
-			}
+
+	// The following 3 method are intentionally commented. We are not providing IAccessibleImage at this time.
+//	/* IAccessibleImage::get_description([out] pbstrDescription) */
+//	int get_description(int /*long*/ pbstrDescription) {
+//		if (DEBUG) print(this + ".IAccessibleImage::get_description");
+//		// TO DO: Does it make sense to just reuse description?
+//		AccessibleEvent event = new AccessibleEvent(this);
+//		event.childID = ACC.CHILDID_SELF;
+//		for (int i = 0; i < accessibleListeners.size(); i++) {
+//			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
+//			listener.getDescription(event);
+//		}
+//		setString(pbstrDescription, event.result);
+//		if (event.result == null) return COM.S_FALSE;
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleImage::get_imagePosition([in] coordinateType, [out] pX, [out] pY) */
+//	int get_imagePosition(int coordinateType, int /*long*/ pX, int /*long*/ pY) {
+//		if (DEBUG) print(this + ".IAccessibleImage::get_imagePosition");
+//		// TO DO: does it make sense to just reuse getLocation?
+//		AccessibleControlEvent event = new AccessibleControlEvent(this);
+//		event.childID = ACC.CHILDID_SELF;
+//		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+//			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+//			listener.getLocation(event);
+//		}
+//		COM.MoveMemory(pX, new int [] { event.x }, 4);
+//		COM.MoveMemory(pY, new int [] { event.y }, 4);
+//		return COM.S_OK;
+//	}
+//
+//	/* IAccessibleImage::get_imageSize([out] pHeight, [out] pWidth) */
+//	int get_imageSize(int /*long*/ pHeight, int /*long*/ pWidth) {
+//		if (DEBUG) print(this + ".IAccessibleImage::get_imageSize");
+//		// TO DO: does it make sense to just reuse getLocation?
+//		AccessibleControlEvent event = new AccessibleControlEvent(this);
+//		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+//			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+//			listener.getLocation(event);
+//		}
+//		COM.MoveMemory(pHeight, new int [] { event.height }, 4);
+//		COM.MoveMemory(pWidth, new int [] { event.width }, 4);
+//		return COM.S_OK;
+//	}
+
+	/* IAccessibleTable2::get_cellAt([in] row, [in] column, [out] ppCell) */
+	int get_cellAt(int row, int column, int /*long*/ ppCell) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.row = row;
+		event.column = column;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getCell(event);
 		}
-		
-		AccessibleEvent event = new AccessibleEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osDescription;
-		
-		// TEMPORARY CODE
-		/* Currently our tree columns are emulated using custom draw,
-		 * so we need to create the description using the tree column
-		 * header text and tree item text. */
-		if (v.lVal != COM.CHILDID_SELF) {
-			if (control instanceof Tree) {
-				Tree tree = (Tree) control;
-				int columnCount = tree.getColumnCount ();
-				if (columnCount > 1) {
-					int /*long*/ hwnd = control.handle, hItem = 0;
-					if (OS.COMCTL32_MAJOR >= 6) {
-						hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
-					} else {
-						hItem = v.lVal;
-					}
-					Widget widget = tree.getDisplay ().findWidget (hwnd, hItem);
-					event.result = "";
-					if (widget != null && widget instanceof TreeItem) {
-						TreeItem item = (TreeItem) widget;
-						for (int i = 1; i < columnCount; i++) {
-							event.result += tree.getColumn(i).getText() + ": " + item.getText(i);
-							if (i + 1 < columnCount) event.result += ", ";
-						}
-					}
-				}
+		Accessible accessible = event.accessible;
+		if (DEBUG) print(this + ".IAccessibleTable2::get_cellAt(row=" + row + ", column=" + column + ") returning " + accessible);
+		if (accessible == null) return COM.E_INVALIDARG;
+		accessible.AddRef();
+		COM.MoveMemory(ppCell, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_caption([out] ppAccessible) */
+	int get_caption(int /*long*/ ppAccessible) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getCaption(event);
+		}
+		Accessible accessible = event.accessible;
+		if (DEBUG) print(this + ".IAccessibleTable2::get_caption() returning " + accessible);
+		if (accessible == null) {
+			COM.MoveMemory(ppAccessible, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			return COM.S_FALSE;
+		}
+		accessible.AddRef();
+		COM.MoveMemory(ppAccessible, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_columnDescription([in] column, [out] pbstrDescription) */
+	int get_columnDescription(int column, int /*long*/ pbstrDescription) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.column = column;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getColumnDescription(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_columnDescription(column=" + column + ") returning " + event.result);
+		setString(pbstrDescription, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_nColumns([out] pColumnCount) */
+	int get_nColumns(int /*long*/ pColumnCount) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getColumnCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_nColumns() returning " + event.count);
+		COM.MoveMemory(pColumnCount, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_nRows([out] pRowCount) */
+	int get_nRows(int /*long*/ pRowCount) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getRowCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_nRows() returning " + event.count);
+		COM.MoveMemory(pRowCount, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_nSelectedCells([out] pCellCount) */
+	int get_nSelectedCells(int /*long*/ pCellCount) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedCellCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedCells() returning " + event.count);
+		COM.MoveMemory(pCellCount, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_nSelectedColumns([out] pColumnCount) */
+	int get_nSelectedColumns(int /*long*/ pColumnCount) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedColumnCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedColumns() returning " + event.count);
+		COM.MoveMemory(pColumnCount, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_nSelectedRows([out] pRowCount) */
+	int get_nSelectedRows(int /*long*/ pRowCount) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedRowCount(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_nSelectedRows() returning " + event.count);
+		COM.MoveMemory(pRowCount, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_rowDescription([in] row, [out] pbstrDescription) */
+	int get_rowDescription(int row, int /*long*/ pbstrDescription) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.row = row;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getRowDescription(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_rowDescription(row=" + row + ") returning " + event.result);
+		setString(pbstrDescription, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_selectedCells([out] ppCells, [out] pNSelectedCells) */
+	int get_selectedCells(int /*long*/ ppCells, int /*long*/ pNSelectedCells) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedCells(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_selectedCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
+		if (event.accessibles == null || event.accessibles.length == 0) {
+			COM.MoveMemory(ppCells, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			COM.MoveMemory(pNSelectedCells, new int [] { 0 }, 4);
+			return COM.S_FALSE;
+		}
+		int length = event.accessibles.length;
+		int /*long*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF);
+		int count = 0;
+		for (int i = 0; i < length; i++) {
+			Accessible accessible = event.accessibles[i];
+			if (accessible != null) {
+				accessible.AddRef();
+				COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+				count++;
 			}
 		}
-		for (int i = 0; i < accessibleListeners.size(); i++) {
-			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
-			listener.getDescription(event);
+		COM.MoveMemory(ppCells, new int /*long*/ [] { pv }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pNSelectedCells, new int [] { count }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_selectedColumns([out] ppSelectedColumns, [out] pNColumns) */
+	int get_selectedColumns(int /*long*/ ppSelectedColumns, int /*long*/ pNColumns) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedColumns(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszDescription, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		int count = event.selected == null ? 0 : event.selected.length;
+		if (DEBUG) print(this + ".IAccessibleTable2::get_selectedColumns() returning " + (count == 0 ? "null" : "selected[" + count + "]"));
+		if (count == 0) {
+			COM.MoveMemory(ppSelectedColumns, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			COM.MoveMemory(pNColumns, new int [] { 0 }, 4);
+			return COM.S_FALSE;
+		}
+		int /*long*/ pv = COM.CoTaskMemAlloc(count * 4);
+		COM.MoveMemory(pv, event.selected, count * 4);
+		COM.MoveMemory(ppSelectedColumns, new int /*long*/ [] { pv }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pNColumns, new int [] { count }, 4);
 		return COM.S_OK;
 	}
-	
-	/* get_accFocus([out] int pvarChild)
-	 * Ownership of pvarChild transfers from callee to caller so reference count on pvarChild 
-	 * must be incremented before returning.  The caller is responsible for releasing pvarChild.
-	 */
-	int get_accFocus(int /*long*/ pvarChild) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
 
-		/* Get the default focus child from the OS. */
-		int osChild = ACC.CHILDID_NONE;
-		int code = iaccessible.get_accFocus(pvarChild);
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			//TODO - use VARIANT structure
-			short[] pvt = new short[1];
-			COM.MoveMemory(pvt, pvarChild, 2);
-			if (pvt[0] == COM.VT_I4) {
-				int[] pChild = new int[1];
-				COM.MoveMemory(pChild, pvarChild + 8, 4);
-				osChild = osToChildID(pChild[0]);
-			}
+	/* IAccessibleTable2::get_selectedRows([out] ppSelectedRows, [out] pNRows) */
+	int get_selectedRows(int /*long*/ ppSelectedRows, int /*long*/ pNRows) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSelectedRows(event);
+		}
+		int count = event.selected == null ? 0 : event.selected.length;
+		if (DEBUG) print(this + ".IAccessibleTable2::get_selectedRows() returning " + (count == 0 ? "null" : "selected[" + count + "]"));
+		if (count == 0) {
+			COM.MoveMemory(ppSelectedRows, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			COM.MoveMemory(pNRows, new int [] { 0 }, 4);
+			return COM.S_FALSE;
 		}
+		int /*long*/ pv = COM.CoTaskMemAlloc(count * 4);
+		COM.MoveMemory(pv, event.selected, count * 4);
+		COM.MoveMemory(ppSelectedRows, new int /*long*/ [] { pv }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pNRows, new int [] { count }, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osChild;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getFocus(event);
+	/* IAccessibleTable2::get_summary([out] ppAccessible) */
+	int get_summary(int /*long*/ ppAccessible) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.getSummary(event);
 		}
 		Accessible accessible = event.accessible;
-		if (accessible != null) {
-			accessible.AddRef();
-			COM.MoveMemory(pvarChild, new short[] { COM.VT_DISPATCH }, 2);
-			COM.MoveMemory(pvarChild + 8, new int /*long*/[] { accessible.objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-			return COM.S_OK;
+		if (DEBUG) print(this + ".IAccessibleTable2::get_summary() returning " + accessible);
+		if (accessible == null) {
+			COM.MoveMemory(ppAccessible, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			return COM.S_FALSE;
 		}
-		int childID = event.childID;
-		if (childID == ACC.CHILDID_NONE) {
-			COM.MoveMemory(pvarChild, new short[] { COM.VT_EMPTY }, 2);
+		accessible.AddRef();
+		COM.MoveMemory(ppAccessible, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_isColumnSelected([in] column, [out] pIsSelected) */
+	int get_isColumnSelected(int column, int /*long*/ pIsSelected) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.column = column;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.isColumnSelected(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_isColumnSelected() returning " + event.isSelected);
+		COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_isRowSelected([in] row, [out] pIsSelected) */
+	int get_isRowSelected(int row, int /*long*/ pIsSelected) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.row = row;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.isRowSelected(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::get_isRowSelected() returning " + event.isSelected);
+		COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::selectRow([in] row) */
+	int selectRow(int row) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.row = row;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.setSelectedRow(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::selectRow() returning " + (event.result == null ? "E_INVALIDARG" : event.result));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::selectColumn([in] column) */
+	int selectColumn(int column) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.column = column;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.setSelectedColumn(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::selectColumn() returning " + (event.result == null ? "E_INVALIDARG" : event.result));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::unselectRow([in] row) */
+	int unselectRow(int row) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.row = row;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.deselectRow(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::unselectRow() returning " + (event.result == null ? "E_INVALIDARG" : event.result));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::unselectColumn([in] column) */
+	int unselectColumn(int column) {
+		AccessibleTableEvent event = new AccessibleTableEvent(this);
+		event.column = column;
+		for (int i = 0; i < accessibleTableListeners.size(); i++) {
+			AccessibleTableListener listener = (AccessibleTableListener) accessibleTableListeners.elementAt(i);
+			listener.deselectColumn(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTable2::unselectColumn() returning " + (event.result == null ? "E_INVALIDARG" : event.result));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTable2::get_modelChange([out] pModelChange) */
+	int get_modelChange(int /*long*/ pModelChange) {
+		if (DEBUG) print(this + ".IAccessibleTable2::get_modelChange() returning " + (tableChange == null ? "null" : "tableChange=" + tableChange[0] + ", " + tableChange[1] + ", " + tableChange[2] + ", " + tableChange[3]));
+		if (tableChange == null) {
+			COM.MoveMemory(pModelChange, new int /*long*/ [] { 0 }, OS.PTR_SIZEOF);
 			return COM.S_FALSE;
 		}
-		if (childID == ACC.CHILDID_SELF) {
-			AddRef();
-			COM.MoveMemory(pvarChild, new short[] { COM.VT_DISPATCH }, 2);
-			COM.MoveMemory(pvarChild + 8, new int /*long*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-			return COM.S_OK;
+		COM.MoveMemory(pModelChange, tableChange, tableChange.length * 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleTableCell::get_columnExtent([out] pNColumnsSpanned) */
+	int get_columnExtent(int /*long*/ pNColumnsSpanned) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getColumnSpan(event);
 		}
-		COM.MoveMemory(pvarChild, new short[] { COM.VT_I4 }, 2);
-		COM.MoveMemory(pvarChild + 8, new int[] { childIDToOs(childID) }, 4);
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_columnExtent() returning " + event.count);
+		COM.MoveMemory(pNColumnsSpanned, new int [] { event.count }, 4);
 		return COM.S_OK;
 	}
-	
-	int get_accHelp(int /*long*/ variant, int /*long*/ pszHelp) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		
-		/* Get the default help string from the OS. */
-		String osHelp = null;
-		int code = iaccessible.get_accHelp(variant, pszHelp);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pHelp = new int /*long*/[1];
-			COM.MoveMemory(pHelp, pszHelp, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pHelp[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pHelp[0], size);
-				osHelp = new String(buffer);
+
+	/* IAccessibleTableCell::get_columnHeaderCells([out] ppCellAccessibles, [out] pNColumnHeaderCells) */
+	int get_columnHeaderCells(int /*long*/ ppCellAccessibles, int /*long*/ pNColumnHeaderCells) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getColumnHeaders(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_columnHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
+		if (event.accessibles == null || event.accessibles.length == 0) {
+			COM.MoveMemory(ppCellAccessibles, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			COM.MoveMemory(pNColumnHeaderCells, new int [] { 0 }, 4);
+			return COM.S_FALSE;
+		}
+		int length = event.accessibles.length;
+		int /*long*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF);
+		int count = 0;
+		for (int i = 0; i < length; i++) {
+			Accessible accessible = event.accessibles[i];
+			if (accessible != null) {
+				accessible.AddRef();
+				COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+				count++;
 			}
 		}
+		COM.MoveMemory(ppCellAccessibles, new int /*long*/ [] { pv }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pNColumnHeaderCells, new int [] { count }, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleEvent event = new AccessibleEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osHelp;
-		for (int i = 0; i < accessibleListeners.size(); i++) {
-			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
-			listener.getHelp(event);
+	/* IAccessibleTableCell::get_columnIndex([out] pColumnIndex) */
+	int get_columnIndex(int /*long*/ pColumnIndex) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getColumnIndex(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszHelp, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_columnIndex() returning " + event.index);
+		COM.MoveMemory(pColumnIndex, new int [] { event.index }, 4);
 		return COM.S_OK;
 	}
-	
-	int get_accHelpTopic(int /*long*/ pszHelpFile, int /*long*/ variant, int /*long*/ pidTopic) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// Currently, we don't let the application override this. Forward to the proxy.
-		int code = iaccessible.get_accHelpTopic(pszHelpFile, variant, pidTopic);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+
+	/* IAccessibleTableCell::get_rowExtent([out] pNRowsSpanned) */
+	int get_rowExtent(int /*long*/ pNRowsSpanned) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getRowSpan(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_rowExtent() returning " + event.count);
+		COM.MoveMemory(pNRowsSpanned, new int [] { event.count }, 4);
+		return COM.S_OK;
 	}
 
-	int get_accKeyboardShortcut(int /*long*/ variant, int /*long*/ pszKeyboardShortcut) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		
-		/* Get the default keyboard shortcut from the OS. */
-		String osKeyboardShortcut = null;
-		int code = iaccessible.get_accKeyboardShortcut(variant, pszKeyboardShortcut);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pKeyboardShortcut = new int /*long*/[1];
-			COM.MoveMemory(pKeyboardShortcut, pszKeyboardShortcut, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pKeyboardShortcut[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pKeyboardShortcut[0], size);
-				osKeyboardShortcut = new String(buffer);
+	/* IAccessibleTableCell::get_rowHeaderCells([out] ppCellAccessibles, [out] pNRowHeaderCells) */
+	int get_rowHeaderCells(int /*long*/ ppCellAccessibles, int /*long*/ pNRowHeaderCells) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getRowHeaders(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_rowHeaderCells() returning " + (event.accessibles == null ? "null" : "accessibles[" + event.accessibles.length + "]"));
+		if (event.accessibles == null || event.accessibles.length == 0) {
+			COM.MoveMemory(ppCellAccessibles, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			COM.MoveMemory(pNRowHeaderCells, new int [] { 0 }, 4);
+			return COM.S_FALSE;
+		}
+		int length = event.accessibles.length;
+		int /*long*/ pv = COM.CoTaskMemAlloc(length * OS.PTR_SIZEOF);
+		int count = 0;
+		for (int i = 0; i < length; i++) {
+			Accessible accessible = event.accessibles[i];
+			if (accessible != null) {
+				accessible.AddRef();
+				COM.MoveMemory(pv + i * OS.PTR_SIZEOF, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
+				count++;
 			}
 		}
+		COM.MoveMemory(ppCellAccessibles, new int /*long*/ [] { pv }, OS.PTR_SIZEOF);
+		COM.MoveMemory(pNRowHeaderCells, new int [] { count }, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleEvent event = new AccessibleEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osKeyboardShortcut;
-		for (int i = 0; i < accessibleListeners.size(); i++) {
-			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
-			listener.getKeyboardShortcut(event);
+	/* IAccessibleTableCell::get_rowIndex([out] pRowIndex) */
+	int get_rowIndex(int /*long*/ pRowIndex) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getRowIndex(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszKeyboardShortcut, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_rowIndex() returning " + event.index);
+		COM.MoveMemory(pRowIndex, new int [] { event.index }, 4);
 		return COM.S_OK;
 	}
-	
-	int get_accName(int /*long*/ variant, int /*long*/ pszName) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
 
-		/* Get the default name from the OS. */
-		String osName = null;
-		int code = iaccessible.get_accName(variant, pszName);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pName = new int /*long*/[1];
-			COM.MoveMemory(pName, pszName, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pName[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pName[0], size);
-				osName = new String(buffer);
-			}
+	/* IAccessibleTableCell::get_isSelected([out] pIsSelected) */
+	int get_isSelected(int /*long*/ pIsSelected) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.isSelected(event);
 		}
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_isSelected() returning " + event.isSelected);
+		COM.MoveMemory(pIsSelected, new int [] {event.isSelected ? 1 : 0}, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleEvent event = new AccessibleEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osName;
-		for (int i = 0; i < accessibleListeners.size(); i++) {
-			AccessibleListener listener = (AccessibleListener) accessibleListeners.elementAt(i);
-			listener.getName(event);
+	/* IAccessibleTableCell::get_rowColumnExtents([out] pRow, [out] pColumn, [out] pRowExtents, [out] pColumnExtents, [out] pIsSelected) */
+	int get_rowColumnExtents(int /*long*/ pRow, int /*long*/ pColumn, int /*long*/ pRowExtents, int /*long*/ pColumnExtents, int /*long*/ pIsSelected) {
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_rowColumnExtents");
+		// TODO: should we implement this? It is just a convenience function.
+		return COM.DISP_E_MEMBERNOTFOUND;
+//		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+//		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+//			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+//			listener.getRowColumnExtents(event);
+//		}
+//		COM.MoveMemory(pRow, new int [] { event.row }, 4);
+//		COM.MoveMemory(pColumn, new int [] { event.column }, 4);
+//		COM.MoveMemory(pRowExtents, new int [] { event.rowExtents }, 4);
+//		COM.MoveMemory(pColumnExtents, new int [] { event.columnExtents }, 4);
+//		return COM.S_OK;
+	}
+
+	/* IAccessibleTableCell::get_table([out] ppTable) */
+	int get_table(int /*long*/ ppTable) {
+		AccessibleTableCellEvent event = new AccessibleTableCellEvent(this);
+		for (int i = 0; i < accessibleTableCellListeners.size(); i++) {
+			AccessibleTableCellListener listener = (AccessibleTableCellListener) accessibleTableCellListeners.elementAt(i);
+			listener.getTable(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszName, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		Accessible accessible = event.accessible;
+		if (DEBUG) print(this + ".IAccessibleTableCell::get_table() returning " + accessible);
+		if (accessible == null) {
+			// TODO: This is not supposed to return S_FALSE. We need to lookup the table role parent and return that.
+			COM.MoveMemory(ppTable, new int /*long*/[] { 0 }, OS.PTR_SIZEOF);
+			return COM.S_FALSE;
+		}
+		accessible.AddRef();
+		COM.MoveMemory(ppTable, new int /*long*/[] { accessible.getAddress() }, OS.PTR_SIZEOF);
 		return COM.S_OK;
 	}
-	
-	/* get_accParent([out] ppdispParent)
-	 * Ownership of ppdispParent transfers from callee to caller so reference count on ppdispParent 
-	 * must be incremented before returning.  The caller is responsible for releasing ppdispParent.
-	 */
-	int get_accParent(int /*long*/ ppdispParent) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// Currently, we don't let the application override this. Forward to the proxy.
-		return iaccessible.get_accParent(ppdispParent);
+
+	/* IAccessibleText::addSelection([in] startOffset, [in] endOffset) */
+	int addSelection(int startOffset, int endOffset) {
+		if (DEBUG) print(this + ".IAccessibleText::addSelection(" + startOffset + ", " + endOffset + ")");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = startOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : startOffset;
+		event.end = endOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : endOffset;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.addSelection(event);
+		}
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
 	}
-	
-	int get_accRole(int /*long*/ variant, int /*long*/ pvarRole) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
 
-		/* Get the default role from the OS. */
-		int osRole = COM.ROLE_SYSTEM_CLIENT;
-		int code = iaccessible.get_accRole(variant, pvarRole);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		// TEMPORARY CODE - process tree and table even if there are no apps listening
-		if (accessibleControlListeners.size() == 0 && !(control instanceof Tree || control instanceof Table)) return code;
-		if (code == COM.S_OK) {
-			//TODO - use VARIANT structure
-			short[] pvt = new short[1];
-			COM.MoveMemory(pvt, pvarRole, 2);
-			if (pvt[0] == COM.VT_I4) {
-				int[] pRole = new int[1];
-				COM.MoveMemory(pRole, pvarRole + 8, 4);
-				osRole = pRole[0];
+	/* IAccessibleText::get_attributes([in] offset, [out] pStartOffset, [out] pEndOffset, [out] pbstrTextAttributes) */
+	int get_attributes(int offset, int /*long*/ pStartOffset, int /*long*/ pEndOffset, int /*long*/ pbstrTextAttributes) {
+		AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(this);
+		event.offset = offset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : offset;
+		for (int i = 0; i < accessibleAttributeListeners.size(); i++) {
+			AccessibleAttributeListener listener = (AccessibleAttributeListener) accessibleAttributeListeners.elementAt(i);
+			listener.getTextAttributes(event);
+		}
+		String textAttributes = "";
+		TextStyle style = event.textStyle;
+		if (style != null) {
+			if (style.rise != 0) {
+				textAttributes += "text-position:";
+				if (style.rise > 0) textAttributes += "super";
+				else textAttributes += "sub";
+			}
+			if (style.underline) {
+				textAttributes += "text-underline-type:";
+				switch (style.underlineStyle) {
+					case SWT.UNDERLINE_SINGLE: textAttributes += "single;"; break;
+					case SWT.UNDERLINE_DOUBLE: textAttributes += "double;"; break;
+					case SWT.UNDERLINE_SQUIGGLE: textAttributes += "single;text-underline-style:wave;"; break;
+					case SWT.UNDERLINE_ERROR: textAttributes += "single;text-underline-style:wave;invalid:true;"; break;
+					default: textAttributes += "none;"; break;
+				}
+				// style.underlineColor is not currently part of the IA2 spec. If provided, it would be "text-underline-color:rgb(n,n,n);"
+			}
+			if (style.strikeout) {
+				textAttributes += "text-line-through-type:single";
+				// style.strikeoutColor is not currently part of the IA2 spec. If provided, it would be "text-line-through-color:rgb(n,n,n);"
+			}
+			Font font = style.font;
+			if (font != null && !font.isDisposed()) {
+				FontData fontData = font.getFontData()[0];
+				textAttributes += "font-family:" + fontData.getName() + ";";
+				textAttributes += "font-size:" + fontData.getHeight() + "pt;";
+				textAttributes += "font-style:" + (fontData.data.lfItalic != 0 ? "italic" : "normal") + ";";
+				textAttributes += "font-weight:" + fontData.data.lfWeight + ";";
+			}
+			Color color = style.foreground;
+			if (color != null && !color.isDisposed()) {
+				textAttributes += "color:rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ");";
+			}
+			color = style.background;
+			if (color != null && !color.isDisposed()) {
+				textAttributes += "background-color:rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ");";
 			}
 		}
-
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.detail = osToRole(osRole);
-		// TEMPORARY CODE
-		/* Currently our checkbox table and tree are emulated using state mask
-		 * images, so we need to specify 'checkbox' role for the items. */
-		if (v.lVal != COM.CHILDID_SELF) {
-			if (control instanceof Tree || control instanceof Table) {
-				if ((control.getStyle() & SWT.CHECK) != 0) event.detail = ACC.ROLE_CHECKBUTTON;
+		if (event.attributes != null) {
+			for (int i = 0; i + 1 < event.attributes.length; i += 2) {
+				textAttributes += event.attributes[i] + ":" + event.attributes[i+1] + ";";
 			}
 		}
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getRole(event);
+		if (DEBUG) print(this + ".IAccessibleText::get_attributes(" + offset + ") returning start = " + event.start + ", end = " + event.end + ", attributes = " + textAttributes);
+		COM.MoveMemory(pStartOffset, new int [] { event.start }, 4);
+		COM.MoveMemory(pEndOffset, new int [] { event.end }, 4);
+		setString(pbstrTextAttributes, textAttributes);
+		if (textAttributes.length() == 0) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::get_caretOffset([out] pOffset) */
+	int get_caretOffset(int /*long*/ pOffset) {
+		int offset = getCaretOffset();
+		if (DEBUG) print(this + ".IAccessibleText::get_caretOffset returning " + offset + hresult(offset == -1 ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pOffset, new int [] { offset }, 4);
+		if (offset == -1) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	int get_characterExtents(int offset, int coordType, int /*long*/ pX, int /*long*/ pY, int /*long*/ pWidth, int /*long*/ pHeight) {
+		int length = getCharacterCount();
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? length : offset < 0 ? 0 : offset;
+		event.end = offset == COM.IA2_TEXT_OFFSET_LENGTH || offset >= length ? length : offset + 1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getTextBounds(event);
 		}
-		int role = roleToOs(event.detail);
-		COM.MoveMemory(pvarRole, new short[] { COM.VT_I4 }, 2);
-		COM.MoveMemory(pvarRole + 8, new int[] { role }, 4);
+		/* Note: event.rectangles is not used here, because IAccessibleText::get_characterExtents is just for one character. */
+		if (DEBUG) print(this + ".IAccessibleText::get_characterExtents(" + offset + ") returning " + event.x + ", " + event.y + ", " + event.width + ", " + event.height);
+		COM.MoveMemory(pX, new int [] { event.x }, 4);
+		COM.MoveMemory(pY, new int [] { event.y }, 4);
+		COM.MoveMemory(pWidth, new int [] { event.width }, 4);
+		COM.MoveMemory(pHeight, new int [] { event.height }, 4);
+		if (event.width == 0 && event.height == 0) return COM.E_INVALIDARG;
 		return COM.S_OK;
 	}
-	
-	/* get_accSelection([out] pvarChildren)
-	 * Ownership of pvarChildren transfers from callee to caller so reference count on pvarChildren 
-	 * must be incremented before returning.  The caller is responsible for releasing pvarChildren.
-	 */
-	int get_accSelection(int /*long*/ pvarChildren) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
 
-		/* Get the default selection from the OS. */
-		int osChild = ACC.CHILDID_NONE;
-		int code = iaccessible.get_accSelection(pvarChildren);
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			//TODO - use VARIANT structure
-			short[] pvt = new short[1];
-			COM.MoveMemory(pvt, pvarChildren, 2);
-			if (pvt[0] == COM.VT_I4) {
-				int[] pChild = new int[1];
-				COM.MoveMemory(pChild, pvarChildren + 8, 4);
-				osChild = osToChildID(pChild[0]);
-			} else if (pvt[0] == COM.VT_UNKNOWN) {
-				osChild = ACC.CHILDID_MULTIPLE;
-				/* Should get IEnumVARIANT from punkVal field, and enumerate children... */
+	/* IAccessibleText::get_nSelections([out] pNSelections) */
+	int get_nSelections(int /*long*/ pNSelections) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.count = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getSelectionCount(event);
+		}
+		if (event.count == -1) {
+			event.childID = ACC.CHILDID_SELF;
+			event.offset = -1;
+			event.length = 0;
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getSelectionRange (event);
 			}
+			event.count = event.offset != -1 && event.length > 0 ? 1 : 0;
 		}
+		if (DEBUG) print(this + ".IAccessibleText::get_nSelections returning " + event.count);
+		COM.MoveMemory(pNSelections, new int [] { event.count }, 4);
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osChild;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+	/* IAccessibleText::get_offsetAtPoint([in] x, [in] y, [in] coordType, [out] pOffset) */
+	int get_offsetAtPoint(int x, int y, int coordType, int /*long*/ pOffset) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.x = x;
+		event.y = y;
+		event.offset = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getOffsetAtPoint(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleText::get_offsetAtPoint(" + x + ", " + y + ") returning " + event.offset + hresult(event.offset == -1 ? COM.S_FALSE : COM.S_OK));
+		/*
+		 * Note that the current IA2 spec says to return 0 when there's nothing to return,
+		 * but since 0 is a valid return value, the spec is going to be updated to return -1.
+		 */
+		COM.MoveMemory(pOffset, new int [] { event.offset }, 4);
+		if (event.offset == -1) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::get_selection([in] selectionIndex, [out] pStartOffset, [out] pEndOffset) */
+	int get_selection(int selectionIndex, int /*long*/ pStartOffset, int /*long*/ pEndOffset) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.index = selectionIndex;
+		event.start = -1;
+		event.end = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
 			listener.getSelection(event);
 		}
-		Accessible accessible = event.accessible;
-		if (accessible != null) {
-			accessible.AddRef();
-			COM.MoveMemory(pvarChildren, new short[] { COM.VT_DISPATCH }, 2);
-			COM.MoveMemory(pvarChildren + 8, new int /*long*/[] { accessible.objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-			return COM.S_OK;
+		if (event.start == -1 && selectionIndex == 0) {
+			event.childID = ACC.CHILDID_SELF;
+			event.offset = -1;
+			event.length = 0;
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getSelectionRange (event);
+			}
+			event.start = event.offset;
+			event.end = event.offset + event.length;
 		}
-		int childID = event.childID;
-		if (childID == ACC.CHILDID_NONE) {
-			COM.MoveMemory(pvarChildren, new short[] { COM.VT_EMPTY }, 2);
-			return COM.S_FALSE;
+		if (DEBUG) print(this + ".IAccessibleText::get_selection(" + selectionIndex + ") returning " + event.start + ", " + event.end);
+		COM.MoveMemory(pStartOffset, new int [] { event.start }, 4);
+		COM.MoveMemory(pEndOffset, new int [] { event.end }, 4);
+		/*
+		 * Note that the current IA2 spec says to return 0,0 when there's nothing to return,
+		 * but since 0 is a valid return value, the spec is going to be updated to return -1,-1.
+		 */
+		if (event.start == -1) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::get_text([in] startOffset, [in] endOffset, [out] pbstrText) */
+	int get_text(int startOffset, int endOffset, int /*long*/ pbstrText) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = startOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : startOffset;
+		event.end = endOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : endOffset;
+		if (event.start > event.end) {
+			/* IA2 spec says that indices can be exchanged. */
+			int temp = event.start;
+			event.start = event.end;
+			event.end = temp;
 		}
-		if (childID == ACC.CHILDID_MULTIPLE) {
-			AddRef();
-			COM.MoveMemory(pvarChildren, new short[] { COM.VT_UNKNOWN }, 2);
-			COM.MoveMemory(pvarChildren + 8, new int /*long*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-			return COM.S_OK;
+		event.count = 0;
+		event.type = ACC.TEXT_BOUNDARY_ALL;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getText(event);
 		}
-		if (childID == ACC.CHILDID_SELF) {
-			AddRef();
-			COM.MoveMemory(pvarChildren, new short[] { COM.VT_DISPATCH }, 2);
-			COM.MoveMemory(pvarChildren + 8, new int /*long*/[] { objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-			return COM.S_OK;
+		if (event.result == null) {
+			AccessibleControlEvent e = new AccessibleControlEvent(this);
+			e.childID = ACC.CHILDID_SELF;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getRole(e);
+				listener.getValue(e);
+			}
+			// TODO: Consider passing the value through for other roles as well (i.e. combo, etc). Keep in sync with get_nCharacters.
+			if (e.detail == ACC.ROLE_TEXT) {
+				event.result = e.result;
+			}
 		}
-		COM.MoveMemory(pvarChildren, new short[] { COM.VT_I4 }, 2);
-		COM.MoveMemory(pvarChildren + 8, new int[] { childIDToOs(childID) }, 4);
+		if (DEBUG) print(this + ".IAccessibleText::get_text(" + startOffset + ", " + endOffset + ") returning " + event.result + hresult(event.result == null ? COM.E_INVALIDARG : COM.S_OK));
+		setString(pbstrText, event.result);
+		if (event.result == null) return COM.E_INVALIDARG;
 		return COM.S_OK;
 	}
-	
-	int get_accState(int /*long*/ variant, int /*long*/ pvarState) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
 
-		/* Get the default state from the OS. */
-		int osState = 0;
-		int code = iaccessible.get_accState(variant, pvarState);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		// TEMPORARY CODE - process tree and table even if there are no apps listening
-		if (accessibleControlListeners.size() == 0 && !(control instanceof Tree || control instanceof Table)) return code;
-		if (code == COM.S_OK) {
-			//TODO - use VARIANT structure
-			short[] pvt = new short[1];
-			COM.MoveMemory(pvt, pvarState, 2);
-			if (pvt[0] == COM.VT_I4) {
-				int[] pState = new int[1];
-				COM.MoveMemory(pState, pvarState + 8, 4);
-				osState = pState[0];
-			}
+	/* IAccessibleText::get_textBeforeOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
+	int get_textBeforeOffset(int offset, int boundaryType, int /*long*/ pStartOffset, int /*long*/ pEndOffset, int /*long*/ pbstrText) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		int charCount = getCharacterCount();
+		event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
+		event.end = event.start;
+		event.count = -1;
+		switch (boundaryType) {
+			case COM.IA2_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break;
+			case COM.IA2_TEXT_BOUNDARY_WORD: event.type = ACC.TEXT_BOUNDARY_WORD; break;
+			case COM.IA2_TEXT_BOUNDARY_SENTENCE: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break;
+			case COM.IA2_TEXT_BOUNDARY_PARAGRAPH: event.type = ACC.TEXT_BOUNDARY_PARAGRAPH; break;
+			case COM.IA2_TEXT_BOUNDARY_LINE: event.type = ACC.TEXT_BOUNDARY_LINE; break;
+			default: return COM.E_INVALIDARG;
 		}
-		boolean grayed = false;
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.detail = osToState(osState);
-		// TEMPORARY CODE
-		/* Currently our checkbox table and tree are emulated using state mask
-		 * images, so we need to determine if the item state is 'checked'. */
-		if (v.lVal != COM.CHILDID_SELF) {
-			if (control instanceof Tree && (control.getStyle() & SWT.CHECK) != 0) {
-				int /*long*/ hwnd = control.handle;
-				TVITEM tvItem = new TVITEM ();
-				tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
-				tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;
-				if (OS.COMCTL32_MAJOR >= 6) {
-					tvItem.hItem = OS.SendMessage (hwnd, OS.TVM_MAPACCIDTOHTREEITEM, v.lVal, 0);
-				} else {
-					tvItem.hItem = v.lVal;
-				}
-				int /*long*/ result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);
-				boolean checked = (result != 0) && (((tvItem.state >> 12) & 1) == 0);
-				if (checked) event.detail |= ACC.STATE_CHECKED;
-				grayed = tvItem.state >> 12 > 2;
-			} else if (control instanceof Table && (control.getStyle() & SWT.CHECK) != 0) {
-				Table table = (Table) control;
-				int index = event.childID;
-				if (0 <= index && index < table.getItemCount()) {
-					TableItem item = table.getItem(index);
-					if (item.getChecked()) event.detail |= ACC.STATE_CHECKED;
-					if (item.getGrayed()) grayed = true;
-				}
+		int eventStart = event.start;
+		int eventEnd = event.end;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getText(event);
+		}
+		if (event.end < charCount) {
+			switch (boundaryType) {
+				case COM.IA2_TEXT_BOUNDARY_WORD:
+				case COM.IA2_TEXT_BOUNDARY_SENTENCE:
+				case COM.IA2_TEXT_BOUNDARY_PARAGRAPH:
+				case COM.IA2_TEXT_BOUNDARY_LINE:
+					int start = event.start;
+					event.start = eventStart;
+					event.end = eventEnd;
+					event.count = 0;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
+					event.end = event.start;
+					event.start = start;
+					event.type = ACC.TEXT_BOUNDARY_ALL;
+					event.count = 0;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
 			}
 		}
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getState(event);
+		if (DEBUG) print(this + ".IAccessibleText::get_textBeforeOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pStartOffset, new int [] { event.start }, 4);
+		COM.MoveMemory(pEndOffset, new int [] { event.end }, 4);
+		setString(pbstrText, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::get_textAfterOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
+	int get_textAfterOffset(int offset, int boundaryType, int /*long*/ pStartOffset, int /*long*/ pEndOffset, int /*long*/ pbstrText) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		int charCount = getCharacterCount();
+		event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
+		event.end = event.start;
+		event.count = 1;
+		switch (boundaryType) {
+			case COM.IA2_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break;
+			case COM.IA2_TEXT_BOUNDARY_WORD: event.type = ACC.TEXT_BOUNDARY_WORD; break;
+			case COM.IA2_TEXT_BOUNDARY_SENTENCE: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break;
+			case COM.IA2_TEXT_BOUNDARY_PARAGRAPH: event.type = ACC.TEXT_BOUNDARY_PARAGRAPH; break;
+			case COM.IA2_TEXT_BOUNDARY_LINE: event.type = ACC.TEXT_BOUNDARY_LINE; break;
+			default: return COM.E_INVALIDARG;
 		}
-		int state = stateToOs(event.detail);
-		if ((state & ACC.STATE_CHECKED) != 0 && grayed) {
-			state &= ~ COM.STATE_SYSTEM_CHECKED;
-			state |= COM.STATE_SYSTEM_MIXED;
+		int eventStart = event.start;
+		int eventEnd = event.end;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getText(event);
+		}
+		if (event.end < charCount) {
+			switch (boundaryType) {
+				case COM.IA2_TEXT_BOUNDARY_WORD:
+				case COM.IA2_TEXT_BOUNDARY_SENTENCE:
+				case COM.IA2_TEXT_BOUNDARY_PARAGRAPH:
+				case COM.IA2_TEXT_BOUNDARY_LINE:
+					int start = event.start;
+					event.start = eventStart;
+					event.end = eventEnd;
+					event.count = 2;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
+					event.end = event.start;
+					event.start = start;
+					event.type = ACC.TEXT_BOUNDARY_ALL;
+					event.count = 0;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
+			}
 		}
-		COM.MoveMemory(pvarState, new short[] { COM.VT_I4 }, 2);
-		COM.MoveMemory(pvarState + 8, new int[] { state }, 4);
+		if (DEBUG) print(this + ".IAccessibleText::get_textAfterOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pStartOffset, new int [] { event.start }, 4);
+		COM.MoveMemory(pEndOffset, new int [] { event.end }, 4);
+		setString(pbstrText, event.result);
+		if (event.result == null) return COM.S_FALSE;
 		return COM.S_OK;
 	}
-	
-	int get_accValue(int /*long*/ variant, int /*long*/ pszValue) {
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		VARIANT v = new VARIANT();
-		COM.MoveMemory(v, variant, VARIANT.sizeof);
-		if ((v.vt & 0xFFFF) != COM.VT_I4) return COM.E_INVALIDARG;
-		
-		/* Get the default value string from the OS. */
-		String osValue = null;
-		int code = iaccessible.get_accValue(variant, pszValue);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		if (accessibleControlListeners.size() == 0) return code;
-		if (code == COM.S_OK) {
-			int /*long*/[] pValue = new int /*long*/[1];
-			COM.MoveMemory(pValue, pszValue, OS.PTR_SIZEOF);
-			int size = COM.SysStringByteLen(pValue[0]);
-			if (size > 0) {
-				char[] buffer = new char[(size + 1) /2];
-				COM.MoveMemory(buffer, pValue[0], size);
-				osValue = new String(buffer);
+
+	/* IAccessibleText::get_textAtOffset([in] offset, [in] boundaryType, [out] pStartOffset, [out] pEndOffset, [out] pbstrText) */
+	int get_textAtOffset(int offset, int boundaryType, int /*long*/ pStartOffset, int /*long*/ pEndOffset, int /*long*/ pbstrText) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		int charCount = getCharacterCount();
+		event.start = offset == COM.IA2_TEXT_OFFSET_LENGTH ? charCount : offset == COM.IA2_TEXT_OFFSET_CARET ? getCaretOffset() : offset;
+		event.end = event.start;
+		event.count = 0;
+		switch (boundaryType) {
+			case COM.IA2_TEXT_BOUNDARY_CHAR: event.type = ACC.TEXT_BOUNDARY_CHAR; break;
+			case COM.IA2_TEXT_BOUNDARY_WORD: event.type = ACC.TEXT_BOUNDARY_WORD; break;
+			case COM.IA2_TEXT_BOUNDARY_SENTENCE: event.type = ACC.TEXT_BOUNDARY_SENTENCE; break;
+			case COM.IA2_TEXT_BOUNDARY_PARAGRAPH: event.type = ACC.TEXT_BOUNDARY_PARAGRAPH; break;
+			case COM.IA2_TEXT_BOUNDARY_LINE: event.type = ACC.TEXT_BOUNDARY_LINE; break;
+			case COM.IA2_TEXT_BOUNDARY_ALL: {
+				event.type = ACC.TEXT_BOUNDARY_ALL;
+				event.start = 0;
+				event.end = charCount;
+				event.count = 0;
+				break;
+			}
+			default: return COM.E_INVALIDARG;
+		}
+		int eventStart = event.start;
+		int eventEnd = event.end;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getText(event);
+		}
+		if (event.end < charCount) {
+			switch (boundaryType) {
+				case COM.IA2_TEXT_BOUNDARY_WORD:
+				case COM.IA2_TEXT_BOUNDARY_SENTENCE:
+				case COM.IA2_TEXT_BOUNDARY_PARAGRAPH:
+				case COM.IA2_TEXT_BOUNDARY_LINE:
+					int start = event.start;
+					event.start = eventStart;
+					event.end = eventEnd;
+					event.count = 1;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
+					event.end = event.start;
+					event.start = start;
+					event.type = ACC.TEXT_BOUNDARY_ALL;
+					event.count = 0;
+					for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+						AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+						listener.getText(event);
+					}
 			}
 		}
+		if (DEBUG) print(this + ".IAccessibleText::get_textAtOffset(" + offset + ") returning start=" + event.start + ", end=" + event.end + " " + event.result + hresult(event.result == null ? COM.S_FALSE : COM.S_OK));
+		COM.MoveMemory(pStartOffset, new int [] { event.start }, 4);
+		COM.MoveMemory(pEndOffset, new int [] { event.end }, 4);
+		setString(pbstrText, event.result);
+		if (event.result == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
 
-		AccessibleControlEvent event = new AccessibleControlEvent(this);
-		event.childID = osToChildID(v.lVal);
-		event.result = osValue;
-		for (int i = 0; i < accessibleControlListeners.size(); i++) {
-			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-			listener.getValue(event);
+	/* IAccessibleText::removeSelection([in] selectionIndex) */
+	int removeSelection(int selectionIndex) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.index = selectionIndex;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.removeSelection(event);
 		}
-		if (event.result == null) return code;
-		char[] data = (event.result + "\0").toCharArray();
-		int /*long*/ ptr = COM.SysAllocString(data);
-		COM.MoveMemory(pszValue, new int /*long*/[] { ptr }, OS.PTR_SIZEOF);
+		if (DEBUG) print(this + ".IAccessibleText::removeSelection(" + selectionIndex + ") returning" + hresult(event.result == null || !event.result.equals(ACC.OK) ? COM.E_INVALIDARG : COM.S_OK));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
 		return COM.S_OK;
 	}
-	
-	int put_accName(int /*long*/ variant, int /*long*/ szName) {
-		// MSAA: this method is no longer supported
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// We don't implement this. Forward to the proxy.
-		int code = iaccessible.put_accName(variant, szName);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+
+	/* IAccessibleText::setCaretOffset([in] offset) */
+	int setCaretOffset(int offset) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.offset = offset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : offset;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.setCaretOffset(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleText::setCaretOffset(" + offset + ") returning" + hresult(event.result == null || !event.result.equals(ACC.OK) ? COM.E_INVALIDARG : COM.S_OK));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG; // TODO: @retval E_FAIL if the caret cannot be set ?
+		return COM.S_OK;
 	}
-	
-	int put_accValue(int /*long*/ variant, int /*long*/ szValue) {
-		// MSAA: this method is typically only used for edit controls
-		if (iaccessible == null) return COM.CO_E_OBJNOTCONNECTED;
-		// We don't implement this. Forward to the proxy.
-		int code = iaccessible.put_accValue(variant, szValue);
-		if (code == COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
-		return code;
+
+	/* IAccessibleText::setSelection([in] selectionIndex, [in] startOffset, [in] endOffset) */
+	int setSelection(int selectionIndex, int startOffset, int endOffset) {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.index = selectionIndex;
+		event.start = startOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : startOffset;
+		event.end = endOffset == COM.IA2_TEXT_OFFSET_LENGTH ? getCharacterCount() : endOffset;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.setSelection(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleText::setSelection(index=" + selectionIndex + ", start=" + event.start + ", end=" + event.end + ") returning " + (event.result.equals(ACC.OK) ? "OK" : "INVALIDARG"));
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
 	}
 
-	/* IEnumVARIANT methods: Next, Skip, Reset, Clone */
-	/* Retrieve the next celt items in the enumeration sequence. 
-	 * If there are fewer than the requested number of elements left
-	 * in the sequence, retrieve the remaining elements.
-	 * The number of elements actually retrieved is returned in pceltFetched 
-	 * (unless the caller passed in NULL for that parameter).
-	 */
-	 
-	 /* Next([in] celt, [out] rgvar, [in, out] pceltFetched)
-	 * Ownership of rgvar transfers from callee to caller so reference count on rgvar 
-	 * must be incremented before returning.  The caller is responsible for releasing rgvar.
-	 */
-	int Next(int celt, int /*long*/ rgvar, int /*long*/ pceltFetched) {
-		/* If there are no listeners, query the proxy for
-		 * its IEnumVariant, and get the Next items from it.
-		 */
-		if (accessibleControlListeners.size() == 0) {
-			int /*long*/[] ppvObject = new int /*long*/[1];
-			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
-			if (code != COM.S_OK) return code;
-			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
-			int[] celtFetched = new int[1];
-			code = ienumvariant.Next(celt, rgvar, celtFetched);
-			ienumvariant.Release();
-			COM.MoveMemory(pceltFetched, celtFetched, 4);
-			return code;
+	/* IAccessibleText::get_nCharacters([out] pNCharacters) */
+	int get_nCharacters(int /*long*/ pNCharacters) {
+		int count = getCharacterCount();
+		COM.MoveMemory(pNCharacters, new int [] { count }, 4);
+		if (DEBUG) print(this + ".IAccessibleText::get_nCharacters returning " + count);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::scrollSubstringTo([in] startIndex, [in] endIndex, [in] scrollType) */
+	int scrollSubstringTo(int startIndex, int endIndex, int scrollType) {
+		if (DEBUG) print(this + ".IAccessibleText::scrollSubstringTo");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = startIndex;
+		event.end = endIndex;
+		switch (scrollType) {
+			case COM.IA2_SCROLL_TYPE_TOP_LEFT: event.type = ACC.SCROLL_TYPE_TOP_LEFT; break;
+			case COM.IA2_SCROLL_TYPE_BOTTOM_RIGHT: event.type = ACC.SCROLL_TYPE_BOTTOM_RIGHT; break;
+			case COM.IA2_SCROLL_TYPE_TOP_EDGE: event.type = ACC.SCROLL_TYPE_TOP_EDGE; break;
+			case COM.IA2_SCROLL_TYPE_BOTTOM_EDGE: event.type = ACC.SCROLL_TYPE_BOTTOM_EDGE; break;
+			case COM.IA2_SCROLL_TYPE_LEFT_EDGE: event.type = ACC.SCROLL_TYPE_LEFT_EDGE; break;
+			case COM.IA2_SCROLL_TYPE_RIGHT_EDGE: event.type = ACC.SCROLL_TYPE_RIGHT_EDGE; break;
+			case COM.IA2_SCROLL_TYPE_ANYWHERE: event.type = ACC.SCROLL_TYPE_ANYWHERE; break;
+		}
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.scrollText(event);
 		}
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG;
+		return COM.S_OK;
+	}
 
-		if (rgvar == 0) return COM.E_INVALIDARG;
-		if (pceltFetched == 0 && celt != 1) return COM.E_INVALIDARG;
-		if (enumIndex == 0) {
-			AccessibleControlEvent event = new AccessibleControlEvent(this);
-			event.childID = ACC.CHILDID_SELF;
-			for (int i = 0; i < accessibleControlListeners.size(); i++) {
-				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
-				listener.getChildren(event);
-			}
-			variants = event.children;
-		}	
-		Object[] nextItems = null;
-		if (variants != null && celt >= 1) {
-			int endIndex = enumIndex + celt - 1;
-			if (endIndex > (variants.length - 1)) endIndex = variants.length - 1;
-			if (enumIndex <= endIndex) {
-				nextItems = new Object[endIndex - enumIndex + 1];
-				for (int i = 0; i < nextItems.length; i++) {
-					Object child = variants[enumIndex];
-					if (child instanceof Integer) {
-						nextItems[i] = new Integer(childIDToOs(((Integer)child).intValue()));
-					} else {
-						nextItems[i] = child;
-					}
-					enumIndex++;
-				}
-			}
+	/* IAccessibleText::scrollSubstringToPoint([in] startIndex, [in] endIndex, [in] coordinateType, [in] x, [in] y) */
+	int scrollSubstringToPoint(int startIndex, int endIndex, int coordinateType, int x, int y) {
+		if (DEBUG) print(this + ".IAccessibleText::scrollSubstringToPoint");
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.start = startIndex;
+		event.end = endIndex;
+		event.type = ACC.SCROLL_TYPE_POINT;
+		event.x = x;
+		event.y = y;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.scrollText(event);
 		}
-		if (nextItems != null) {
-			for (int i = 0; i < nextItems.length; i++) {
-				Object nextItem = nextItems[i];
-				if (nextItem instanceof Integer) {
-					int item = ((Integer) nextItem).intValue();
-					//TODO - use VARIANT struct
-					COM.MoveMemory(rgvar + i * VARIANT.sizeof, new short[] { COM.VT_I4 }, 2);
-					COM.MoveMemory(rgvar + i * VARIANT.sizeof + 8, new int[] { item }, 4);
-				} else {
-					Accessible accessible = (Accessible) nextItem;
-					accessible.AddRef();
-					COM.MoveMemory(rgvar + i * VARIANT.sizeof, new short[] { COM.VT_DISPATCH }, 2);
-					COM.MoveMemory(rgvar + i * VARIANT.sizeof + 8, new int /*long*/[] { accessible.objIAccessible.getAddress() }, OS.PTR_SIZEOF);
-				}
-			}
-			if (pceltFetched != 0)
-				COM.MoveMemory(pceltFetched, new int[] {nextItems.length}, 4);
-			if (nextItems.length == celt) return COM.S_OK;
-		} else {
-			if (pceltFetched != 0)
-				COM.MoveMemory(pceltFetched, new int[] {0}, 4);
+		if (event.result == null || !event.result.equals(ACC.OK)) return COM.E_INVALIDARG; // TODO: @retval S_FALSE if the object is already at the specified location.
+		return COM.S_OK;
+	}
+
+	/* IAccessibleText::get_newText([out] pNewText) */
+	int get_newText(int /*long*/ pNewText) {
+		if (DEBUG) print(this + ".IAccessibleText::get_newText");
+		String text = null;
+		int start = 0;
+		int end = 0;
+		if (textInserted != null) {
+			text = (String) textInserted[3];
+			start = ((Integer)textInserted[1]).intValue();
+			end = ((Integer)textInserted[2]).intValue();
 		}
-		return COM.S_FALSE;
+		setString(pNewText, text);
+		COM.MoveMemory(pNewText + OS.PTR_SIZEOF, new int [] {start}, 4);
+		COM.MoveMemory(pNewText + OS.PTR_SIZEOF + 4, new int [] {end}, 4);
+		if (textInserted == null) return COM.S_FALSE;
+		return COM.S_OK;
 	}
-	
-	/* Skip over the specified number of elements in the enumeration sequence. */
-	int Skip(int celt) {
-		/* If there are no listeners, query the proxy
-		 * for its IEnumVariant, and tell it to Skip.
-		 */
-		if (accessibleControlListeners.size() == 0) {
-			int /*long*/[] ppvObject = new int /*long*/[1];
-			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
-			if (code != COM.S_OK) return code;
-			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
-			code = ienumvariant.Skip(celt);
-			ienumvariant.Release();
-			return code;
+
+	/* IAccessibleText::get_oldText([out] pOldText) */
+	int get_oldText(int /*long*/ pOldText) {
+		if (DEBUG) print(this + ".IAccessibleText::get_oldText");
+		String text = null;
+		int start = 0;
+		int end = 0;
+		if (textDeleted != null) {
+			text = (String) textDeleted[3];
+			start = ((Integer)textDeleted[1]).intValue();
+			end = ((Integer)textDeleted[2]).intValue();
 		}
+		setString(pOldText, text);
+		COM.MoveMemory(pOldText + OS.PTR_SIZEOF, new int [] {start}, 4);
+		COM.MoveMemory(pOldText + OS.PTR_SIZEOF + 4, new int [] {end}, 4);
+		if (textDeleted == null) return COM.S_FALSE;
+		return COM.S_OK;
+	}
 
-		if (celt < 1 ) return COM.E_INVALIDARG;
-		enumIndex += celt;
-		if (enumIndex > (variants.length - 1)) {
-			enumIndex = variants.length - 1;
-			return COM.S_FALSE;
+	/* IAccessibleValue::get_currentValue([out] pCurrentValue) */
+	int get_currentValue(int /*long*/ pCurrentValue) {
+		AccessibleValueEvent event = new AccessibleValueEvent(this);
+		for (int i = 0; i < accessibleValueListeners.size(); i++) {
+			AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+			listener.getCurrentValue(event);
 		}
+		if (DEBUG) print(this + ".IAccessibleValue::get_currentValue returning " + event.value + hresult(event.value == null ? COM.S_FALSE : COM.S_OK));
+		setNumberVARIANT(pCurrentValue, event.value);
 		return COM.S_OK;
 	}
-	
-	/* Reset the enumeration sequence to the beginning. */
-	int Reset() {
-		/* If there are no listeners, query the proxy
-		 * for its IEnumVariant, and tell it to Reset.
-		 */
-		if (accessibleControlListeners.size() == 0) {
-			int /*long*/[] ppvObject = new int /*long*/[1];
-			int code = (int)/*64*/iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
-			if (code != COM.S_OK) return code;
-			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
-			code = ienumvariant.Reset();
-			ienumvariant.Release();
-			return code;
+
+	/* IAccessibleValue::setCurrentValue([in] value) */
+	int setCurrentValue(int /*long*/ value) {
+		if (DEBUG) print(this + ".IAccessibleValue::setCurrentValue");
+		AccessibleValueEvent event = new AccessibleValueEvent(this);
+		event.value = getNumberVARIANT(value);
+		for (int i = 0; i < accessibleValueListeners.size(); i++) {
+			AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+			listener.setCurrentValue(event);
 		}
-		
-		enumIndex = 0;
+		//if (event.value == null) return COM.S_FALSE;
 		return COM.S_OK;
 	}
 
-	 /* Clone([out] ppEnum)
-	 * Ownership of ppEnum transfers from callee to caller so reference count on ppEnum 
-	 * must be incremented before returning.  The caller is responsible for releasing ppEnum.
-	 */
-	int Clone(int /*long*/ ppEnum) {
-		/* If there are no listeners, query the proxy for
-		 * its IEnumVariant, and get the Clone from it.
-		 */
-		if (accessibleControlListeners.size() == 0) {
-			int /*long*/[] ppvObject = new int /*long*/[1];
-			int code = iaccessible.QueryInterface(COM.IIDIEnumVARIANT, ppvObject);
-			if (code != COM.S_OK) return code;
-			IEnumVARIANT ienumvariant = new IEnumVARIANT(ppvObject[0]);
-			int /*long*/ [] pEnum = new int /*long*/ [1];
-			code = ienumvariant.Clone(pEnum);
-			ienumvariant.Release();
-			COM.MoveMemory(ppEnum, pEnum, OS.PTR_SIZEOF);
-			return code;
+	/* IAccessibleValue::get_maximumValue([out] pMaximumValue) */
+	int get_maximumValue(int /*long*/ pMaximumValue) {
+		AccessibleValueEvent event = new AccessibleValueEvent(this);
+		for (int i = 0; i < accessibleValueListeners.size(); i++) {
+			AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+			listener.getMaximumValue(event);
 		}
+		if (DEBUG) print(this + ".IAccessibleValue::get_maximumValue returning " + event.value + hresult(event.value == null ? COM.S_FALSE : COM.S_OK));
+		setNumberVARIANT(pMaximumValue, event.value);
+		return COM.S_OK;
+	}
 
-		if (ppEnum == 0) return COM.E_INVALIDARG;
-		COM.MoveMemory(ppEnum, new int /*long*/[] { objIEnumVARIANT.getAddress()}, OS.PTR_SIZEOF);
-		AddRef();
+	/* IAccessibleValue::get_minimumValue([out] pMinimumValue) */
+	int get_minimumValue(int /*long*/ pMinimumValue) {
+		AccessibleValueEvent event = new AccessibleValueEvent(this);
+		for (int i = 0; i < accessibleValueListeners.size(); i++) {
+			AccessibleValueListener listener = (AccessibleValueListener) accessibleValueListeners.elementAt(i);
+			listener.getMinimumValue(event);
+		}
+		if (DEBUG) print(this + ".IAccessibleValue::get_minimumValue returning " + event.value + hresult(event.value == null ? COM.S_FALSE : COM.S_OK));
+		setNumberVARIANT(pMinimumValue, event.value);
 		return COM.S_OK;
 	}
+
+	int eventChildID() {
+		if (parent == null) return COM.CHILDID_SELF;
+		if (uniqueID == -1) uniqueID = UniqueID--;
+		return uniqueID;
+	}
+
+	void checkUniqueID(int childID) {
+		/* If the application is using child ids, check whether there's a corresponding
+		 * accessible, and if so, use the child id as that accessible's unique id. */
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = childID;
+		for (int l = 0; l < accessibleControlListeners.size(); l++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(l);
+			listener.getChild(event);
+		}
+		Accessible accessible = event.accessible;
+		if (accessible != null && accessible.uniqueID == -1) {
+			accessible.uniqueID = childID;
+		}
+	}
 	
 	int childIDToOs(int childID) {
 		if (childID == ACC.CHILDID_SELF) return COM.CHILDID_SELF;
-		/*
-		* Feature of Windows:
-		* In Windows XP, tree item ids are 1-based indices. Previous versions
-		* of Windows use the tree item handle for the accessible child ID.
-		* For backward compatibility, we still take a handle childID for tree
-		* items on XP. All other childIDs are 1-based indices.
-		*/
-		if (!(control instanceof Tree)) return childID + 1;
-		if (OS.COMCTL32_MAJOR < 6) return childID;
-		return (int)/*64*/OS.SendMessage (control.handle, OS.TVM_MAPHTREEITEMTOACCID, childID, 0);
+		/* ChildIDs are 1-based indices. */
+		int osChildID = childID + 1;
+		if (control instanceof Tree) {
+			/*
+			* Feature of Windows:
+			* Before Windows XP, tree item ids were 1-based indices.
+			* Windows XP and later use the tree item handle for the
+			* accessible child ID. For backward compatibility, we still
+			* take 1-based childIDs for tree items prior to Windows XP.
+			*/
+			if (OS.COMCTL32_MAJOR < 6) {
+				osChildID = childID;
+			} else {
+				osChildID = (int)/*64*/OS.SendMessage (control.handle, OS.TVM_MAPHTREEITEMTOACCID, childID, 0);
+			}
+		}
+		checkUniqueID(osChildID);
+		return osChildID;
 	}
 
 	int osToChildID(int osChildID) {
 		if (osChildID == COM.CHILDID_SELF) return ACC.CHILDID_SELF;
 		/*
 		* Feature of Windows:
-		* In Windows XP, tree item ids are 1-based indices. Previous versions
-		* of Windows use the tree item handle for the accessible child ID.
-		* For backward compatibility, we still take a handle childID for tree
-		* items on XP. All other childIDs are 1-based indices.
+		* Before Windows XP, tree item ids were 1-based indices.
+		* Windows XP and later use the tree item handle for the
+		* accessible child ID. For backward compatibility, we still
+		* take 1-based childIDs for tree items prior to Windows XP.
+		* All other childIDs are 1-based indices.
 		*/
 		if (!(control instanceof Tree)) return osChildID - 1;
 		if (OS.COMCTL32_MAJOR < 6) return osChildID;
@@ -1370,6 +4478,7 @@ public class Accessible {
 		if ((state & ACC.STATE_OFFSCREEN) != 0) osState |= COM.STATE_SYSTEM_OFFSCREEN;
 		if ((state & ACC.STATE_SIZEABLE) != 0) osState |= COM.STATE_SYSTEM_SIZEABLE;
 		if ((state & ACC.STATE_LINKED) != 0) osState |= COM.STATE_SYSTEM_LINKED;
+		if ((state & ACC.STATE_DISABLED) != 0) osState |= COM.STATE_SYSTEM_UNAVAILABLE;
 		return osState;
 	}
 	
@@ -1391,6 +4500,7 @@ public class Accessible {
 		if ((osState & COM.STATE_SYSTEM_OFFSCREEN) != 0) state |= ACC.STATE_OFFSCREEN;
 		if ((osState & COM.STATE_SYSTEM_SIZEABLE) != 0) state |= ACC.STATE_SIZEABLE;
 		if ((osState & COM.STATE_SYSTEM_LINKED) != 0) state |= ACC.STATE_LINKED;
+		if ((osState & COM.STATE_SYSTEM_UNAVAILABLE) != 0) state |= ACC.STATE_DISABLED;
 		return state;
 	}
 
@@ -1426,6 +4536,30 @@ public class Accessible {
 			case ACC.ROLE_PROGRESSBAR: return COM.ROLE_SYSTEM_PROGRESSBAR;
 			case ACC.ROLE_SLIDER: return COM.ROLE_SYSTEM_SLIDER;
 			case ACC.ROLE_LINK: return COM.ROLE_SYSTEM_LINK;
+			case ACC.ROLE_ALERT: return COM.ROLE_SYSTEM_ALERT;
+			case ACC.ROLE_ANIMATION: return COM.ROLE_SYSTEM_ANIMATION;
+			case ACC.ROLE_COLUMN: return COM.ROLE_SYSTEM_COLUMN;
+			case ACC.ROLE_DOCUMENT: return COM.ROLE_SYSTEM_DOCUMENT;
+			case ACC.ROLE_GRAPHIC: return COM.ROLE_SYSTEM_GRAPHIC;
+			case ACC.ROLE_GROUP: return COM.ROLE_SYSTEM_GROUPING;
+			case ACC.ROLE_ROW: return COM.ROLE_SYSTEM_ROW;
+			case ACC.ROLE_SPINBUTTON: return COM.ROLE_SYSTEM_SPINBUTTON;
+			case ACC.ROLE_STATUSBAR: return COM.ROLE_SYSTEM_STATUSBAR;
+			case ACC.ROLE_CLOCK: return COM.ROLE_SYSTEM_CLOCK;
+			case ACC.ROLE_CALENDAR: return COM.ROLE_SYSTEM_DROPLIST;
+
+			/* The rest are IA2 roles, so return the closest match. */
+			case ACC.ROLE_CANVAS: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_CHECKMENUITEM: return COM.ROLE_SYSTEM_MENUITEM;
+			case ACC.ROLE_RADIOMENUITEM: return COM.ROLE_SYSTEM_MENUITEM;
+			case ACC.ROLE_DATETIME: return COM.ROLE_SYSTEM_DROPLIST;
+			case ACC.ROLE_FOOTER: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_FORM: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_HEADER: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_HEADING: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_PAGE: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_PARAGRAPH: return COM.ROLE_SYSTEM_CLIENT;
+			case ACC.ROLE_SECTION: return COM.ROLE_SYSTEM_CLIENT;
 		}
 		return COM.ROLE_SYSTEM_CLIENT;
 	}
@@ -1462,10 +4596,162 @@ public class Accessible {
 			case COM.ROLE_SYSTEM_PROGRESSBAR: return ACC.ROLE_PROGRESSBAR;
 			case COM.ROLE_SYSTEM_SLIDER: return ACC.ROLE_SLIDER;
 			case COM.ROLE_SYSTEM_LINK: return ACC.ROLE_LINK;
+			case COM.ROLE_SYSTEM_ALERT: return ACC.ROLE_ALERT;
+			case COM.ROLE_SYSTEM_ANIMATION: return ACC.ROLE_ANIMATION;
+			case COM.ROLE_SYSTEM_COLUMN: return ACC.ROLE_COLUMN;
+			case COM.ROLE_SYSTEM_DOCUMENT: return ACC.ROLE_DOCUMENT;
+			case COM.ROLE_SYSTEM_GRAPHIC: return ACC.ROLE_GRAPHIC;
+			case COM.ROLE_SYSTEM_GROUPING: return ACC.ROLE_GROUP;
+			case COM.ROLE_SYSTEM_ROW: return ACC.ROLE_ROW;
+			case COM.ROLE_SYSTEM_SPINBUTTON: return ACC.ROLE_SPINBUTTON;
+			case COM.ROLE_SYSTEM_STATUSBAR: return ACC.ROLE_STATUSBAR;
+			case COM.ROLE_SYSTEM_CLOCK: return ACC.ROLE_CLOCK;
+			case COM.ROLE_SYSTEM_DROPLIST: return ACC.ROLE_CALENDAR;
 		}
 		return ACC.ROLE_CLIENT_AREA;
 	}
 
+	int getCaretOffset() {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.offset = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextListener listener = (AccessibleTextListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getCaretOffset (event);
+		}
+		if (event.offset == -1) {
+			for (int i = 0; i < accessibleTextListeners.size(); i++) {
+				event.childID = ACC.CHILDID_SELF;
+				AccessibleTextListener listener = (AccessibleTextListener) accessibleTextListeners.elementAt(i);
+				listener.getCaretOffset (event);
+			}
+		}
+		return event.offset;
+	}
+
+	/* IAccessibleText::get_characterExtents([in] offset, [in] coordType, [out] pX, [out] pY, [out] pWidth, [out] pHeight) */
+	int getCharacterCount() {
+		AccessibleTextEvent event = new AccessibleTextEvent(this);
+		event.count = -1;
+		for (int i = 0; i < accessibleTextExtendedListeners.size(); i++) {
+			AccessibleTextExtendedListener listener = (AccessibleTextExtendedListener) accessibleTextExtendedListeners.elementAt(i);
+			listener.getCharacterCount(event);
+		}
+		if (event.count == -1) {
+			AccessibleControlEvent e = new AccessibleControlEvent(this);
+			e.childID = ACC.CHILDID_SELF;
+			for (int i = 0; i < accessibleControlListeners.size(); i++) {
+				AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+				listener.getRole(e);
+				listener.getValue(e);
+			}
+			// TODO: Consider passing the value through for other roles as well (i.e. combo, etc). Keep in sync with get_text.
+			event.count = e.detail == ACC.ROLE_TEXT && e.result != null ? e.result.length() : 0;
+		}
+		return event.count;
+	}
+
+	int getRelationCount() {
+		int count = 0;
+		for (int type = 0; type < MAX_RELATION_TYPES; type++) {
+			if (relations[type] != null) count++;
+		}
+		return count;
+	}
+
+	int getRole() {
+		AccessibleControlEvent event = new AccessibleControlEvent(this);
+		event.childID = ACC.CHILDID_SELF;
+		for (int i = 0; i < accessibleControlListeners.size(); i++) {
+			AccessibleControlListener listener = (AccessibleControlListener) accessibleControlListeners.elementAt(i);
+			listener.getRole(event);
+		}
+		return event.detail;
+	}
+
+	int getDefaultRole() {
+		int role;
+		role = COM.ROLE_SYSTEM_CLIENT;
+		if (iaccessible != null) {
+			/* Get the default role from the OS. */
+			int /*long*/ varChild = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+			setIntVARIANT(varChild, COM.VT_I4, COM.CHILDID_SELF);
+			int /*long*/ pvarRole = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+			int code = iaccessible.get_accRole(varChild, pvarRole);
+			if (code == COM.S_OK) {
+				VARIANT v = getVARIANT(pvarRole);
+				if (v.vt == COM.VT_I4) role = v.lVal;
+			}
+			OS.GlobalFree(varChild);
+			OS.GlobalFree(pvarRole);
+		}
+		return role;
+	}
+
+	VARIANT getVARIANT(int /*long*/ variant) {
+		VARIANT v = new VARIANT();
+		COM.MoveMemory(v, variant, VARIANT.sizeof);
+		return v;
+	}
+	
+	Number getNumberVARIANT(int /*long*/ variant) {
+		VARIANT v = new VARIANT();
+		COM.MoveMemory(v, variant, VARIANT.sizeof);
+		if (v.vt == COM.VT_I8) return new Long(v.lVal); // TODO: Fix this - v.lVal is an int - don't use struct
+		return new Integer(v.lVal);
+	}
+
+	void setIntVARIANT(int /*long*/ variant, short vt, int lVal) {
+		if (vt == COM.VT_I4 || vt == COM.VT_EMPTY) {
+			COM.MoveMemory(variant, new short[] { vt }, 2);
+			COM.MoveMemory(variant + 8, new int[] { lVal }, 4);
+		}
+	}
+
+	void setPtrVARIANT(int /*long*/ variant, short vt, int /*long*/ lVal) {
+		if (vt == COM.VT_DISPATCH || vt == COM.VT_UNKNOWN) {
+			COM.MoveMemory(variant, new short[] { vt }, 2);
+			COM.MoveMemory(variant + 8, new int /*long*/ [] { lVal }, OS.PTR_SIZEOF);
+		}
+	}
+	
+	void setNumberVARIANT(int /*long*/ variant, Number number) {
+		if (number == null) {
+			COM.MoveMemory(variant, new short[] { COM.VT_EMPTY }, 2);
+			COM.MoveMemory(variant + 8, new int[] { 0 }, 4);
+		} else if (number instanceof Double) {
+			COM.MoveMemory(variant, new short[] { COM.VT_R8 }, 2);
+			COM.MoveMemory(variant + 8, new double[] { number.doubleValue() }, 8);
+		} else if (number instanceof Float) {
+			COM.MoveMemory(variant, new short[] { COM.VT_R4 }, 2);
+			COM.MoveMemory(variant + 8, new float[] { number.floatValue() }, 4);
+		} else if (number instanceof Long) {
+			COM.MoveMemory(variant, new short[] { COM.VT_I8 }, 2);
+			COM.MoveMemory(variant + 8, new long[] { number.longValue() }, 8);
+		} else {
+			COM.MoveMemory(variant, new short[] { COM.VT_I4 }, 2);
+			COM.MoveMemory(variant + 8, new int[] { number.intValue() }, 4);
+		}
+	}
+
+	void setString(int /*long*/ psz, String string) {
+		int /*long*/ ptr = 0;
+		if (string != null) {
+			char[] data = (string + "\0").toCharArray();
+			ptr = COM.SysAllocString(data);
+		}
+		COM.MoveMemory(psz, new int /*long*/ [] { ptr }, OS.PTR_SIZEOF);
+	}
+	
+	void setStringVARIANT(int /*long*/ variant, String string) {
+		int /*long*/ ptr = 0;
+		if (string != null) {
+			char[] data = (string + "\0").toCharArray();
+			ptr = COM.SysAllocString(data);
+		}
+		COM.MoveMemory(variant, new short[] { ptr == 0 ? COM.VT_EMPTY : COM.VT_BSTR }, 2);
+		COM.MoveMemory(variant + 8, new int /*long*/ [] { ptr }, OS.PTR_SIZEOF);
+	}
+	
 	/* checkWidget was copied from Widget, and rewritten to work in this package */
 	void checkWidget () {
 		if (!isValidThread ()) SWT.error (SWT.ERROR_THREAD_INVALID_ACCESS);
@@ -1476,4 +4762,425 @@ public class Accessible {
 	boolean isValidThread () {
 		return control.getDisplay ().getThread () == Thread.currentThread ();
 	}
+	
+	// START DEBUG CODE
+	static void print (String str) {
+		if (DEBUG) System.out.println (str);
+	}
+	String getRoleString(int role) {
+		if (DEBUG) switch (role) {
+			case COM.ROLE_SYSTEM_CLIENT: return "ROLE_SYSTEM_CLIENT";
+			case COM.ROLE_SYSTEM_WINDOW: return "ROLE_SYSTEM_WINDOW";
+			case COM.ROLE_SYSTEM_MENUBAR: return "ROLE_SYSTEM_MENUBAR";
+			case COM.ROLE_SYSTEM_MENUPOPUP: return "ROLE_SYSTEM_MENUPOPUP";
+			case COM.ROLE_SYSTEM_MENUITEM: return "ROLE_SYSTEM_MENUITEM";
+			case COM.ROLE_SYSTEM_SEPARATOR: return "ROLE_SYSTEM_SEPARATOR";
+			case COM.ROLE_SYSTEM_TOOLTIP: return "ROLE_SYSTEM_TOOLTIP";
+			case COM.ROLE_SYSTEM_SCROLLBAR: return "ROLE_SYSTEM_SCROLLBAR";
+			case COM.ROLE_SYSTEM_DIALOG: return "ROLE_SYSTEM_DIALOG";
+			case COM.ROLE_SYSTEM_STATICTEXT: return "ROLE_SYSTEM_STATICTEXT";
+			case COM.ROLE_SYSTEM_PUSHBUTTON: return "ROLE_SYSTEM_PUSHBUTTON";
+			case COM.ROLE_SYSTEM_CHECKBUTTON: return "ROLE_SYSTEM_CHECKBUTTON";
+			case COM.ROLE_SYSTEM_RADIOBUTTON: return "ROLE_SYSTEM_RADIOBUTTON";
+			case COM.ROLE_SYSTEM_SPLITBUTTON: return "ROLE_SYSTEM_SPLITBUTTON";
+			case COM.ROLE_SYSTEM_COMBOBOX: return "ROLE_SYSTEM_COMBOBOX";
+			case COM.ROLE_SYSTEM_TEXT: return "ROLE_SYSTEM_TEXT";
+			case COM.ROLE_SYSTEM_TOOLBAR: return "ROLE_SYSTEM_TOOLBAR";
+			case COM.ROLE_SYSTEM_LIST: return "ROLE_SYSTEM_LIST";
+			case COM.ROLE_SYSTEM_LISTITEM: return "ROLE_SYSTEM_LISTITEM";
+			case COM.ROLE_SYSTEM_TABLE: return "ROLE_SYSTEM_TABLE";
+			case COM.ROLE_SYSTEM_CELL: return "ROLE_SYSTEM_CELL";
+			case COM.ROLE_SYSTEM_COLUMNHEADER: return "ROLE_SYSTEM_COLUMNHEADER";
+			case COM.ROLE_SYSTEM_ROWHEADER: return "ROLE_SYSTEM_ROWHEADER";
+			case COM.ROLE_SYSTEM_OUTLINE: return "ROLE_SYSTEM_OUTLINE";
+			case COM.ROLE_SYSTEM_OUTLINEITEM: return "ROLE_SYSTEM_OUTLINEITEM";
+			case COM.ROLE_SYSTEM_PAGETABLIST: return "ROLE_SYSTEM_PAGETABLIST";
+			case COM.ROLE_SYSTEM_PAGETAB: return "ROLE_SYSTEM_PAGETAB";
+			case COM.ROLE_SYSTEM_PROGRESSBAR: return "ROLE_SYSTEM_PROGRESSBAR";
+			case COM.ROLE_SYSTEM_SLIDER: return "ROLE_SYSTEM_SLIDER";
+			case COM.ROLE_SYSTEM_LINK: return "ROLE_SYSTEM_LINK";
+			case COM.ROLE_SYSTEM_ALERT: return "ROLE_SYSTEM_ALERT";
+			case COM.ROLE_SYSTEM_ANIMATION: return "ROLE_SYSTEM_ANIMATION";
+			case COM.ROLE_SYSTEM_COLUMN: return "ROLE_SYSTEM_COLUMN";
+			case COM.ROLE_SYSTEM_DOCUMENT: return "ROLE_SYSTEM_DOCUMENT";
+			case COM.ROLE_SYSTEM_GRAPHIC: return "ROLE_SYSTEM_GRAPHIC";
+			case COM.ROLE_SYSTEM_GROUPING: return "ROLE_SYSTEM_GROUPING";
+			case COM.ROLE_SYSTEM_ROW: return "ROLE_SYSTEM_ROW";
+			case COM.ROLE_SYSTEM_SPINBUTTON: return "ROLE_SYSTEM_SPINBUTTON";
+			case COM.ROLE_SYSTEM_STATUSBAR: return "ROLE_SYSTEM_STATUSBAR";
+			case COM.ROLE_SYSTEM_CLOCK: return "ROLE_SYSTEM_CLOCK";
+			case COM.ROLE_SYSTEM_DROPLIST: return "ROLE_SYSTEM_DROPLIST";
+			// IA2 roles
+			case ACC.ROLE_CANVAS: return "IA2_ROLE_CANVAS";
+			case ACC.ROLE_CHECKMENUITEM: return "IA2_ROLE_CHECKMENUITEM";
+			case ACC.ROLE_RADIOMENUITEM: return "IA2_ROLE_RADIOMENUITEM";
+			case ACC.ROLE_DATETIME: return "IA2_ROLE_DATETIME";
+			case ACC.ROLE_FOOTER: return "IA2_ROLE_FOOTER";
+			case ACC.ROLE_FORM: return "IA2_ROLE_FORM";
+			case ACC.ROLE_HEADER: return "IA2_ROLE_HEADER";
+			case ACC.ROLE_HEADING: return "IA2_ROLE_HEADING";
+			case ACC.ROLE_PAGE: return "IA2_ROLE_PAGE";
+			case ACC.ROLE_PARAGRAPH: return "IA2_ROLE_PARAGRAPH";
+			case ACC.ROLE_SECTION: return "IA2_ROLE_SECTION";
+		}
+		return "Unknown role (" + role + ")";
+	}
+	String getStateString(int state) {
+		if (state == 0) return " no state bits set";
+		StringBuffer stateString = new StringBuffer();
+		if (DEBUG) {
+		if ((state & COM.STATE_SYSTEM_SELECTED) != 0) stateString.append(" STATE_SYSTEM_SELECTED");
+		if ((state & COM.STATE_SYSTEM_SELECTABLE) != 0) stateString.append(" STATE_SYSTEM_SELECTABLE");
+		if ((state & COM.STATE_SYSTEM_MULTISELECTABLE) != 0) stateString.append(" STATE_SYSTEM_MULTISELECTABLE");
+		if ((state & COM.STATE_SYSTEM_FOCUSED) != 0) stateString.append(" STATE_SYSTEM_FOCUSED");
+		if ((state & COM.STATE_SYSTEM_FOCUSABLE) != 0) stateString.append(" STATE_SYSTEM_FOCUSABLE");
+		if ((state & COM.STATE_SYSTEM_PRESSED) != 0) stateString.append(" STATE_SYSTEM_PRESSED");
+		if ((state & COM.STATE_SYSTEM_CHECKED) != 0) stateString.append(" STATE_SYSTEM_CHECKED");
+		if ((state & COM.STATE_SYSTEM_EXPANDED) != 0) stateString.append(" STATE_SYSTEM_EXPANDED");
+		if ((state & COM.STATE_SYSTEM_COLLAPSED) != 0) stateString.append(" STATE_SYSTEM_COLLAPSED");
+		if ((state & COM.STATE_SYSTEM_HOTTRACKED) != 0) stateString.append(" STATE_SYSTEM_HOTTRACKED");
+		if ((state & COM.STATE_SYSTEM_BUSY) != 0) stateString.append(" STATE_SYSTEM_BUSY");
+		if ((state & COM.STATE_SYSTEM_READONLY) != 0) stateString.append(" STATE_SYSTEM_READONLY");
+		if ((state & COM.STATE_SYSTEM_INVISIBLE) != 0) stateString.append(" STATE_SYSTEM_INVISIBLE");
+		if ((state & COM.STATE_SYSTEM_OFFSCREEN) != 0) stateString.append(" STATE_SYSTEM_OFFSCREEN");
+		if ((state & COM.STATE_SYSTEM_SIZEABLE) != 0) stateString.append(" STATE_SYSTEM_SIZEABLE");
+		if ((state & COM.STATE_SYSTEM_LINKED) != 0) stateString.append(" STATE_SYSTEM_LINKED");
+		if ((state & COM.STATE_SYSTEM_UNAVAILABLE) != 0) stateString.append(" STATE_SYSTEM_UNAVAILABLE");
+		if (stateString.length() == 0) stateString.append(" Unknown state[s] (" + Integer.toHexString(state) + ")");
+		}
+		return stateString.toString();
+	}
+	String getIA2StatesString(int ia2States) {
+		if (ia2States == 0) return " no state bits set";
+		StringBuffer stateString = new StringBuffer();
+		if (DEBUG) {
+		if ((ia2States & COM.IA2_STATE_ACTIVE) != 0) stateString.append(" IA2_STATE_ACTIVE");
+		if ((ia2States & COM.IA2_STATE_EDITABLE) != 0) stateString.append(" IA2_STATE_EDITABLE");
+		if ((ia2States & COM.IA2_STATE_SINGLE_LINE) != 0) stateString.append(" IA2_STATE_SINGLE_LINE");
+		if ((ia2States & COM.IA2_STATE_MULTI_LINE) != 0) stateString.append(" IA2_STATE_MULTI_LINE");
+		if ((ia2States & COM.IA2_STATE_REQUIRED) != 0) stateString.append(" IA2_STATE_REQUIRED");
+		if ((ia2States & COM.IA2_STATE_INVALID_ENTRY) != 0) stateString.append(" IA2_STATE_INVALID_ENTRY");
+		if ((ia2States & COM.IA2_STATE_SUPPORTS_AUTOCOMPLETION) != 0) stateString.append(" IA2_STATE_SUPPORTS_AUTOCOMPLETION");
+		if (stateString.length() == 0) stateString.append(" Unknown IA2 state[s] (" + ia2States + ")");
+		}
+		return stateString.toString();
+	}
+	String getEventString(int event) {
+		if (DEBUG) switch (event) {
+			case ACC.EVENT_TABLE_CHANGED: return "IA2_EVENT_TABLE_CHANGED";
+			case ACC.EVENT_TEXT_CHANGED: return "IA2_EVENT_TEXT_REMOVED or IA2_EVENT_TEXT_INSERTED";
+			case ACC.EVENT_HYPERTEXT_LINK_SELECTED: return "IA2_EVENT_HYPERTEXT_LINK_SELECTED";
+			case ACC.EVENT_VALUE_CHANGED: return "EVENT_OBJECT_VALUECHANGE";
+			case ACC.EVENT_STATE_CHANGED: return "EVENT_OBJECT_STATECHANGE";
+			case ACC.EVENT_SELECTION_CHANGED: return "EVENT_OBJECT_SELECTIONWITHIN";
+			case ACC.EVENT_TEXT_SELECTION_CHANGED: return "EVENT_OBJECT_TEXTSELECTIONCHANGED";
+			case ACC.EVENT_LOCATION_CHANGED: return "EVENT_OBJECT_LOCATIONCHANGE";
+			case ACC.EVENT_NAME_CHANGED: return "EVENT_OBJECT_NAMECHANGE";
+			case ACC.EVENT_DESCRIPTION_CHANGED: return "EVENT_OBJECT_DESCRIPTIONCHANGE";
+			case ACC.EVENT_DOCUMENT_LOAD_COMPLETE: return "IA2_EVENT_DOCUMENT_LOAD_COMPLETE";
+			case ACC.EVENT_DOCUMENT_LOAD_STOPPED: return "IA2_EVENT_DOCUMENT_LOAD_STOPPED";
+			case ACC.EVENT_DOCUMENT_RELOAD: return "IA2_EVENT_DOCUMENT_RELOAD";
+			case ACC.EVENT_PAGE_CHANGED: return "IA2_EVENT_PAGE_CHANGED";
+			case ACC.EVENT_SECTION_CHANGED: return "IA2_EVENT_SECTION_CHANGED";
+			case ACC.EVENT_ACTION_CHANGED: return "IA2_EVENT_ACTION_CHANGED";
+			case ACC.EVENT_HYPERLINK_START_INDEX_CHANGED: return "IA2_EVENT_HYPERLINK_START_INDEX_CHANGED";
+			case ACC.EVENT_HYPERLINK_END_INDEX_CHANGED: return "IA2_EVENT_HYPERLINK_END_INDEX_CHANGED";
+			case ACC.EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED: return "IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED";
+			case ACC.EVENT_HYPERLINK_SELECTED_LINK_CHANGED: return "IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED";
+			case ACC.EVENT_HYPERLINK_ACTIVATED: return "IA2_EVENT_HYPERLINK_ACTIVATED";
+			case ACC.EVENT_HYPERTEXT_LINK_COUNT_CHANGED: return "IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED";
+			case ACC.EVENT_ATTRIBUTE_CHANGED: return "IA2_EVENT_ATTRIBUTE_CHANGED";
+			case ACC.EVENT_TABLE_CAPTION_CHANGED: return "IA2_EVENT_TABLE_CAPTION_CHANGED";
+			case ACC.EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED: return "IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED";
+			case ACC.EVENT_TABLE_COLUMN_HEADER_CHANGED: return "IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED";
+			case ACC.EVENT_TABLE_ROW_DESCRIPTION_CHANGED: return "IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED";
+			case ACC.EVENT_TABLE_ROW_HEADER_CHANGED: return "IA2_EVENT_TABLE_ROW_HEADER_CHANGED";
+			case ACC.EVENT_TABLE_SUMMARY_CHANGED: return "IA2_EVENT_TABLE_SUMMARY_CHANGED";
+			case ACC.EVENT_TEXT_ATTRIBUTE_CHANGED: return "IA2_EVENT_TEXT_ATTRIBUTE_CHANGED";
+			case ACC.EVENT_TEXT_CARET_MOVED: return "IA2_EVENT_TEXT_CARET_MOVED";
+			case ACC.EVENT_TEXT_COLUMN_CHANGED: return "IA2_EVENT_TEXT_COLUMN_CHANGED";
+		}
+		return "Unknown event (" + event + ")";
+	}
+	private String hresult(int code) {
+		if (DEBUG) switch (code) {
+			case COM.S_OK: return " S_OK";
+			case COM.S_FALSE: return " S_FALSE";
+			case COM.E_ACCESSDENIED: return " E_ACCESSDENIED";
+			case COM.E_FAIL: return " E_FAIL";
+			case COM.E_INVALIDARG: return " E_INVALIDARG";
+			case COM.E_NOINTERFACE: return " E_NOINTERFACE";
+			case COM.E_NOTIMPL: return " E_NOTIMPL";
+			case COM.E_NOTSUPPORTED: return " E_NOTSUPPORTED";
+			case COM.E_OUTOFMEMORY: return " E_OUTOFMEMORY";
+			case COM.E_POINTER: return " E_POINTER";
+			case COM.DISP_E_EXCEPTION: return " DISP_E_EXCEPTION";
+			case COM.DISP_E_MEMBERNOTFOUND: return " DISP_E_MEMBERNOTFOUND";
+			case COM.DISP_E_UNKNOWNINTERFACE: return " DISP_E_UNKNOWNINTERFACE";
+			case COM.DISP_E_UNKNOWNNAME: return " DISP_E_UNKNOWNNAME";
+		}
+		return " HRESULT=" + code;
+	}
+	boolean interesting(GUID guid) {
+		if (DEBUG) {
+		if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessible)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessible2)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleRelation)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleAction)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleComponent)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleValue)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleText)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleEditableText)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHyperlink)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHypertext)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable2)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTableCell)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleImage)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleApplication)) return true;
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleContext)) return true;
+		}
+		return false;
+	}
+	String guidString(GUID guid) {
+		if (DEBUG) {
+		final GUID IIDIAccessibleHandler = IIDFromString("{03022430-ABC4-11D0-BDE2-00AA001A1953}"); //$NON-NLS-1$
+		final GUID IIDIAccessor = IIDFromString("{0C733A8C-2A1C-11CE-ADE5-00AA0044773D}"); //$NON-NLS-1$
+		final GUID IIDIAdviseSink2 = IIDFromString("{00000125-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIBindCtx = IIDFromString("{0000000E-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDICreateErrorInfo = IIDFromString("{22F03340-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
+		final GUID IIDICreateTypeInfo = IIDFromString("{00020405-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDICreateTypeLib = IIDFromString("{00020406-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIDataAdviseHolder = IIDFromString("{00000110-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumConnectionPoints = IIDFromString("{B196B285-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
+		final GUID IIDIEnumConnections = IIDFromString("{B196B287-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
+		final GUID IIDIEnumMoniker = IIDFromString("{00000102-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumOLEVERB = IIDFromString("{00000104-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumSTATDATA = IIDFromString("{00000105-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumSTATSTG = IIDFromString("{0000000D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumString = IIDFromString("{00000101-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIEnumUnknown = IIDFromString("{00000100-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIErrorInfo = IIDFromString("{1CF2B120-547D-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
+		final GUID IIDIErrorLog = IIDFromString("{3127CA40-446E-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
+		final GUID IIDIExternalConnection = IIDFromString("{00000019-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIFontDisp = IIDFromString("{BEF6E003-A874-101A-8BBA-00AA00300CAB}"); //$NON-NLS-1$
+		final GUID IIDILockBytes = IIDFromString("{0000000A-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIMalloc = IIDFromString("{00000002-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIMallocSpy = IIDFromString("{0000001D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIMarshal = IIDFromString("{00000003-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIMessageFilter = IIDFromString("{00000016-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIMoniker = IIDFromString("{0000000F-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIOleAdviseHolder = IIDFromString("{00000111-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIOleCache = IIDFromString("{0000011E-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIOleCache2 = IIDFromString("{00000128-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIOleCacheControl = IIDFromString("{00000129-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIOleItemContainer = IIDFromString("{0000011C-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIParseDisplayName = IIDFromString("{0000011A-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIPerPropertyBrowsing = IIDFromString("{376BD3AA-3845-101B-84ED-08002B2EC713}"); //$NON-NLS-1$
+		final GUID IIDIPersistMemory = IIDFromString("{BD1AE5E0-A6AE-11CE-BD37-504200C10000}"); //$NON-NLS-1$
+		final GUID IIDIPersistPropertyBag = IIDFromString("{37D84F60-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
+		final GUID IIDIPicture = IIDFromString("{7BF80980-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$
+		final GUID IIDIPictureDisp = IIDFromString("{7BF80981-BF32-101A-8BBB-00AA00300CAB}"); //$NON-NLS-1$
+		final GUID IIDIPropertyBag = IIDFromString("{55272A00-42CB-11CE-8135-00AA004BB851}"); //$NON-NLS-1$
+		final GUID IIDIPropertyPage = IIDFromString("{B196B28D-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
+		final GUID IIDIPropertyPage2 = IIDFromString("{01E44665-24AC-101B-84ED-08002B2EC713}"); //$NON-NLS-1$
+		final GUID IIDIPropertyPageSite = IIDFromString("{B196B28C-BAB4-101A-B69C-00AA00341D07}"); //$NON-NLS-1$
+		final GUID IIDIPSFactoryBuffer = IIDFromString("{D5F569D0-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
+		final GUID IIDIRootStorage = IIDFromString("{00000012-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIROTData = IIDFromString("{F29F6BC0-5021-11CE-AA15-00006901293F}"); //$NON-NLS-1$
+		final GUID IIDIRpcChannelBuffer = IIDFromString("{D5F56B60-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
+		final GUID IIDIRpcProxyBuffer = IIDFromString("{D5F56A34-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
+		final GUID IIDIRpcStubBuffer = IIDFromString("{D5F56AFC-593B-101A-B569-08002B2DBF7A}"); //$NON-NLS-1$
+		final GUID IIDIRunnableObject = IIDFromString("{00000126-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIRunningObjectTable = IIDFromString("{00000010-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDISimpleFrameSite = IIDFromString("{742B0E01-14E6-101B-914E-00AA00300CAB}"); //$NON-NLS-1$
+		final GUID IIDIStdMarshalInfo = IIDFromString("{00000018-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDISupportErrorInfo = IIDFromString("{DF0B3D60-548F-101B-8E65-08002B2BD119}"); //$NON-NLS-1$
+		final GUID IIDITypeComp = IIDFromString("{00020403-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDITypeLib = IIDFromString("{00020402-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIViewObject = IIDFromString("{0000010D-0000-0000-C000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDIdentityUnmarshal = IIDFromString("{0000001b-0000-0000-c000-000000000046}"); //$NON-NLS-1$
+		final GUID IIDInternalMSMarshaller = IIDFromString("{4c1e39e1-e3e3-4296-aa86-ec938d896e92}"); //$NON-NLS-1$
+		final GUID IIDIAccIdentity = IIDFromString("{7852B78D-1CFD-41C1-A615-9C0C85960B5F}"); //$NON-NLS-1$
+		final GUID IIDIAccPropServer = IIDFromString("{76C0DBBB-15E0-4E7B-B61B-20EEEA2001E0}"); //$NON-NLS-1$
+		final GUID IIDIAccPropServices = IIDFromString("{6E26E776-04F0-495D-80E4-3330352E3169}"); //$NON-NLS-1$
+		if (COM.IsEqualGUID(guid, COM.IID_IDropTargetHelper)) return "IID_IDropTargetHelper";
+		if (COM.IsEqualGUID(guid, COM.IID_IDragSourceHelper)) return "IID_IDragSourceHelper";
+		if (COM.IsEqualGUID(guid, COM.IID_IDragSourceHelper2)) return "IID_IDragSourceHelper2";
+		if (COM.IsEqualGUID(guid, COM.IIDJavaBeansBridge)) return "IIDJavaBeansBridge";
+		if (COM.IsEqualGUID(guid, COM.IIDShockwaveActiveXControl)) return "IIDShockwaveActiveXControl";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorSiteTime)) return "IIDIEditorSiteTime";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorSiteProperty)) return "IIDIEditorSiteProperty";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorBaseProperty)) return "IIDIEditorBaseProperty";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorSite)) return "IIDIEditorSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorService)) return "IIDIEditorService";
+		if (COM.IsEqualGUID(guid, COM.IIDIEditorManager)) return "IIDIEditorManager";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessible)) return "IIDIAccessible";
+		if (COM.IsEqualGUID(guid, IIDIAccessibleHandler)) return "IIDIAccessibleHandler";
+		if (COM.IsEqualGUID(guid, IIDIAccessor)) return "IIDIAccessor";
+		if (COM.IsEqualGUID(guid, COM.IIDIAdviseSink)) return "IIDIAdviseSink";
+		if (COM.IsEqualGUID(guid, IIDIAdviseSink2)) return "IIDIAdviseSink2";
+		if (COM.IsEqualGUID(guid, IIDIBindCtx)) return "IIDIBindCtx";
+		if (COM.IsEqualGUID(guid, COM.IIDIClassFactory)) return "IIDIClassFactory";
+		if (COM.IsEqualGUID(guid, COM.IIDIClassFactory2)) return "IIDIClassFactory2";
+		if (COM.IsEqualGUID(guid, COM.IIDIConnectionPoint)) return "IIDIConnectionPoint";
+		if (COM.IsEqualGUID(guid, COM.IIDIConnectionPointContainer)) return "IIDIConnectionPointContainer";
+		if (COM.IsEqualGUID(guid, IIDICreateErrorInfo)) return "IIDICreateErrorInfo";
+		if (COM.IsEqualGUID(guid, IIDICreateTypeInfo)) return "IIDICreateTypeInfo";
+		if (COM.IsEqualGUID(guid, IIDICreateTypeLib)) return "IIDICreateTypeLib";
+		if (COM.IsEqualGUID(guid, IIDIDataAdviseHolder)) return "IIDIDataAdviseHolder";
+		if (COM.IsEqualGUID(guid, COM.IIDIDataObject)) return "IIDIDataObject";
+		if (COM.IsEqualGUID(guid, COM.IIDIDispatch)) return "IIDIDispatch";
+		if (COM.IsEqualGUID(guid, COM.IIDIDispatchEx)) return "IIDIDispatchEx";
+		if (COM.IsEqualGUID(guid, COM.IIDIDocHostUIHandler)) return "IIDIDocHostUIHandler";	
+		if (COM.IsEqualGUID(guid, COM.IIDIDocHostShowUI)) return "IIDIDocHostShowUI";	
+		if (COM.IsEqualGUID(guid, COM.IIDIDropSource)) return "IIDIDropSource";
+		if (COM.IsEqualGUID(guid, COM.IIDIDropTarget)) return "IIDIDropTarget";
+		if (COM.IsEqualGUID(guid, IIDIEnumConnectionPoints)) return "IIDIEnumConnectionPoints";
+		if (COM.IsEqualGUID(guid, IIDIEnumConnections)) return "IIDIEnumConnections";
+		if (COM.IsEqualGUID(guid, COM.IIDIEnumFORMATETC)) return "IIDIEnumFORMATETC";
+		if (COM.IsEqualGUID(guid, IIDIEnumMoniker)) return "IIDIEnumMoniker";
+		if (COM.IsEqualGUID(guid, IIDIEnumOLEVERB)) return "IIDIEnumOLEVERB";
+		if (COM.IsEqualGUID(guid, IIDIEnumSTATDATA)) return "IIDIEnumSTATDATA";
+		if (COM.IsEqualGUID(guid, IIDIEnumSTATSTG)) return "IIDIEnumSTATSTG";
+		if (COM.IsEqualGUID(guid, IIDIEnumString)) return "IIDIEnumString";
+		if (COM.IsEqualGUID(guid, IIDIEnumUnknown)) return "IIDIEnumUnknown";
+		if (COM.IsEqualGUID(guid, COM.IIDIEnumVARIANT)) return "IIDIEnumVARIANT";
+		if (COM.IsEqualGUID(guid, IIDIErrorInfo)) return "IIDIErrorInfo";
+		if (COM.IsEqualGUID(guid, IIDIErrorLog)) return "IIDIErrorLog";
+		if (COM.IsEqualGUID(guid, IIDIExternalConnection)) return "IIDIExternalConnection";
+		if (COM.IsEqualGUID(guid, COM.IIDIFont)) return "IIDIFont";
+		if (COM.IsEqualGUID(guid, IIDIFontDisp)) return "IIDIFontDisp";
+	//	if (COM.IsEqualGUID(guid, COM.IIDIHTMLDocumentEvents2)) return "IIDIHTMLDocumentEvents2";
+		if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) return "IIDIInternetSecurityManager";
+		if (COM.IsEqualGUID(guid, COM.IIDIAuthenticate)) return "IIDIAuthenticate";
+		if (COM.IsEqualGUID(guid, COM.IIDIJScriptTypeInfo)) return "IIDIJScriptTypeInfo";
+		if (COM.IsEqualGUID(guid, IIDILockBytes)) return "IIDILockBytes";
+		if (COM.IsEqualGUID(guid, IIDIMalloc)) return "IIDIMalloc";
+		if (COM.IsEqualGUID(guid, IIDIMallocSpy)) return "IIDIMallocSpy";
+		if (COM.IsEqualGUID(guid, IIDIMarshal)) return "IIDIMarshal";
+		if (COM.IsEqualGUID(guid, IIDIMessageFilter)) return "IIDIMessageFilter";
+		if (COM.IsEqualGUID(guid, IIDIMoniker)) return "IIDIMoniker";
+		if (COM.IsEqualGUID(guid, IIDIOleAdviseHolder)) return "IIDIOleAdviseHolder";
+		if (COM.IsEqualGUID(guid, IIDIOleCache)) return "IIDIOleCache";
+		if (COM.IsEqualGUID(guid, IIDIOleCache2)) return "IIDIOleCache2";
+		if (COM.IsEqualGUID(guid, IIDIOleCacheControl)) return "IIDIOleCacheControl";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleClientSite)) return "IIDIOleClientSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) return "IIDIOleCommandTarget";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleContainer)) return "IIDIOleContainer";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleControl)) return "IIDIOleControl";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleControlSite)) return "IIDIOleControlSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleDocument)) return "IIDIOleDocument";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleDocumentSite)) return "IIDIOleDocumentSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceActiveObject)) return "IIDIOleInPlaceActiveObject";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceFrame)) return "IIDIOleInPlaceFrame";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceObject)) return "IIDIOleInPlaceObject";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceSite)) return "IIDIOleInPlaceSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleInPlaceUIWindow)) return "IIDIOleInPlaceUIWindow";
+		if (COM.IsEqualGUID(guid, IIDIOleItemContainer)) return "IIDIOleItemContainer";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleLink)) return "IIDIOleLink";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleObject)) return "IIDIOleObject";
+		if (COM.IsEqualGUID(guid, COM.IIDIOleWindow)) return "IIDIOleWindow";
+		if (COM.IsEqualGUID(guid, IIDIParseDisplayName)) return "IIDIParseDisplayName";
+		if (COM.IsEqualGUID(guid, IIDIPerPropertyBrowsing)) return "IIDIPerPropertyBrowsing";
+		if (COM.IsEqualGUID(guid, COM.IIDIPersist)) return "IIDIPersist";
+		if (COM.IsEqualGUID(guid, COM.IIDIPersistFile)) return "IIDIPersistFile";
+		if (COM.IsEqualGUID(guid, IIDIPersistMemory)) return "IIDIPersistMemory";
+		if (COM.IsEqualGUID(guid, IIDIPersistPropertyBag)) return "IIDIPersistPropertyBag";
+		if (COM.IsEqualGUID(guid, COM.IIDIPersistStorage)) return "IIDIPersistStorage";
+		if (COM.IsEqualGUID(guid, COM.IIDIPersistStream)) return "IIDIPersistStream";
+		if (COM.IsEqualGUID(guid, COM.IIDIPersistStreamInit)) return "IIDIPersistStreamInit";
+		if (COM.IsEqualGUID(guid, IIDIPicture)) return "IIDIPicture";
+		if (COM.IsEqualGUID(guid, IIDIPictureDisp)) return "IIDIPictureDisp";
+		if (COM.IsEqualGUID(guid, IIDIPropertyBag)) return "IIDIPropertyBag";
+		if (COM.IsEqualGUID(guid, COM.IIDIPropertyNotifySink)) return "IIDIPropertyNotifySink";
+		if (COM.IsEqualGUID(guid, IIDIPropertyPage)) return "IIDIPropertyPage";
+		if (COM.IsEqualGUID(guid, IIDIPropertyPage2)) return "IIDIPropertyPage2";
+		if (COM.IsEqualGUID(guid, IIDIPropertyPageSite)) return "IIDIPropertyPageSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIProvideClassInfo)) return "IIDIProvideClassInfo";
+		if (COM.IsEqualGUID(guid, COM.IIDIProvideClassInfo2)) return "IIDIProvideClassInfo2";
+		if (COM.IsEqualGUID(guid, IIDIPSFactoryBuffer)) return "IIDIPSFactoryBuffer";
+		if (COM.IsEqualGUID(guid, IIDIRootStorage)) return "IIDIRootStorage";
+		if (COM.IsEqualGUID(guid, IIDIROTData)) return "IIDIROTData";
+		if (COM.IsEqualGUID(guid, IIDIRpcChannelBuffer)) return "IIDIRpcChannelBuffer";
+		if (COM.IsEqualGUID(guid, IIDIRpcProxyBuffer)) return "IIDIRpcProxyBuffer";
+		if (COM.IsEqualGUID(guid, IIDIRpcStubBuffer)) return "IIDIRpcStubBuffer";
+		if (COM.IsEqualGUID(guid, IIDIRunnableObject)) return "IIDIRunnableObject";
+		if (COM.IsEqualGUID(guid, IIDIRunningObjectTable)) return "IIDIRunningObjectTable";
+		if (COM.IsEqualGUID(guid, IIDISimpleFrameSite)) return "IIDISimpleFrameSite";
+		if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) return "IIDIServiceProvider";
+		if (COM.IsEqualGUID(guid, COM.IIDISpecifyPropertyPages)) return "IIDISpecifyPropertyPages";
+		if (COM.IsEqualGUID(guid, IIDIStdMarshalInfo)) return "IIDIStdMarshalInfo";
+		if (COM.IsEqualGUID(guid, COM.IIDIStorage)) return "IIDIStorage";
+		if (COM.IsEqualGUID(guid, COM.IIDIStream)) return "IIDIStream";
+		if (COM.IsEqualGUID(guid, IIDISupportErrorInfo)) return "IIDISupportErrorInfo";
+		if (COM.IsEqualGUID(guid, IIDITypeComp)) return "IIDITypeComp";
+		if (COM.IsEqualGUID(guid, IIDITypeLib)) return "IIDITypeLib";
+		if (COM.IsEqualGUID(guid, COM.IIDIUnknown)) return "IIDIUnknown";
+		if (COM.IsEqualGUID(guid, IIDIViewObject)) return "IIDIViewObject";
+		if (COM.IsEqualGUID(guid, COM.IIDIViewObject2)) return "IIDIViewObject2";
+		if (COM.IsEqualGUID(guid, COM.CGID_DocHostCommandHandler)) return "CGID_DocHostCommandHandler";
+		if (COM.IsEqualGUID(guid, COM.CGID_Explorer)) return "CGID_Explorer";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessible2)) return "IIDIAccessible2";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleRelation)) return "IIDIAccessibleRelation";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleAction)) return "IIDIAccessibleAction";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleComponent)) return "IIDIAccessibleComponent";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleValue)) return "IIDIAccessibleValue";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleText)) return "IIDIAccessibleText";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleEditableText)) return "IIDIAccessibleEditableText";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHyperlink)) return "IIDIAccessibleHyperlink";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleHypertext)) return "IIDIAccessibleHypertext";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable)) return "IIDIAccessibleTable";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTable2)) return "IIDIAccessibleTable2";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleTableCell)) return "IIDIAccessibleTableCell";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleImage)) return "IIDIAccessibleImage";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleApplication)) return "IIDIAccessibleApplication";
+		if (COM.IsEqualGUID(guid, COM.IIDIAccessibleContext)) return "IIDIAccessibleContext";
+		if (COM.IsEqualGUID(guid, IIDIdentityUnmarshal)) return "IIDIdentityUnmarshal";
+		if (COM.IsEqualGUID(guid, IIDInternalMSMarshaller)) return "IIDInternalMSMarshaller";
+		if (COM.IsEqualGUID(guid, IIDIAccIdentity)) return "IIDIAccIdentity";
+		if (COM.IsEqualGUID(guid, IIDIAccPropServer)) return "IIDIAccPropServer";
+		if (COM.IsEqualGUID(guid, IIDIAccPropServices)) return "IIDIAccPropServices";
+		}
+		return StringFromIID(guid);
+	}
+	static GUID IIDFromString(String lpsz) {
+		if (DEBUG) {
+		int length = lpsz.length();
+		char[] buffer = new char[length + 1];
+		lpsz.getChars(0, length, buffer, 0);
+		GUID lpiid = new GUID();
+		if (COM.IIDFromString(buffer, lpiid) == COM.S_OK) return lpiid;
+		}
+		return null;
+	}
+	static String StringFromIID(GUID guid) {
+		return '{' + toHex(guid.Data1, 8) + "-" + 
+        toHex(guid.Data2, 4) + "-" + 
+        toHex(guid.Data3, 4) + "-" + 
+        toHex(guid.Data4[0], 2) + toHex(guid.Data4[1], 2) + "-" + 
+        toHex(guid.Data4[2], 2) + toHex(guid.Data4[3], 2) + toHex(guid.Data4[4], 2) + toHex(guid.Data4[5], 2) + toHex(guid.Data4[6], 2) + toHex(guid.Data4[7], 2) + '}';
+	}
+	static final String zeros = "00000000";
+	static String toHex(int v, int length) {
+		String t = Integer.toHexString(v).toUpperCase();
+		int tlen = t.length();
+		if (tlen > length) {
+			t = t.substring(tlen - length);
+		}
+		return zeros.substring(0, Math.max(0, length - tlen)) + t;
+	}
+	public String toString () {
+		String toString = super.toString();
+		if (DEBUG) {
+			int role = getRole();
+			if (role == 0) role = getDefaultRole();
+			return toString.substring(toString.lastIndexOf('.') + 1) + "(" + getRoleString(role) + ")";
+		}
+		return toString;
+	}
+	// END DEBUG CODE
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java
new file mode 100644
index 0000000..1e72c7a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java	
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.accessibility;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.internal.win32.*;
+import org.eclipse.swt.internal.ole.win32.*;
+
+class Relation {
+	Accessible accessible;
+	COMObject objIAccessibleRelation;
+	int refCount;
+	int type;
+	Accessible[] targets;
+	static final String[] relationTypeString = {
+		"controlledBy",		//$NON-NLS-1$
+		"controllerFor",	//$NON-NLS-1$
+		"describedBy",		//$NON-NLS-1$
+		"descriptionFor",	//$NON-NLS-1$
+		"embeddedBy",		//$NON-NLS-1$
+		"embeds",			//$NON-NLS-1$
+		"flowsFrom",		//$NON-NLS-1$
+		"flowsTo",			//$NON-NLS-1$
+		"labelFor",			//$NON-NLS-1$
+		"labelledBy",		//$NON-NLS-1$
+		"memberOf",			//$NON-NLS-1$
+		"nodeChildOf",		//$NON-NLS-1$
+		"parentWindowOf",	//$NON-NLS-1$
+		"popupFor",			//$NON-NLS-1$
+		"subwindowOf",		//$NON-NLS-1$
+	};
+	static final String[] localizedRelationTypeString = {
+		SWT.getMessage("SWT_Controlled_By"),	//$NON-NLS-1$
+		SWT.getMessage("SWT_Controller_For"),	//$NON-NLS-1$
+		SWT.getMessage("SWT_Described_By"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Description_For"),	//$NON-NLS-1$
+		SWT.getMessage("SWT_Embedded_By"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Embeds"),			//$NON-NLS-1$
+		SWT.getMessage("SWT_Flows_From"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Flows_To"),			//$NON-NLS-1$
+		SWT.getMessage("SWT_Label_For"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Labelled_By"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Member_Of"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Node_Child_Of"),	//$NON-NLS-1$
+		SWT.getMessage("SWT_Parent_Window_Of"),	//$NON-NLS-1$
+		SWT.getMessage("SWT_Popup_For"),		//$NON-NLS-1$
+		SWT.getMessage("SWT_Subwindow_Of"),		//$NON-NLS-1$
+	};
+
+	Relation(Accessible accessible, int type) {
+		this.accessible = accessible;
+		this.type = type;
+		this.targets = new Accessible[0];
+		AddRef();
+	}
+	
+	int /*long*/ getAddress() {
+		/* The address of a Relation is the address of its IAccessibleRelation COMObject. */
+		if (objIAccessibleRelation == null) createIAccessibleRelation();
+		return objIAccessibleRelation.getAddress();
+	}
+	
+	void createIAccessibleRelation() {
+		objIAccessibleRelation = new COMObject(new int[] {2,0,0,1,1,1,2,3}) {
+			public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
+			public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
+			public int /*long*/ method2(int /*long*/[] args) {return Release();}
+			public int /*long*/ method3(int /*long*/[] args) {return get_relationType(args[0]);}
+			public int /*long*/ method4(int /*long*/[] args) {return get_localizedRelationType(args[0]);}
+			public int /*long*/ method5(int /*long*/[] args) {return get_nTargets(args[0]);}
+			public int /*long*/ method6(int /*long*/[] args) {return get_target((int)/*64*/args[0], args[1]);}
+			public int /*long*/ method7(int /*long*/[] args) {return get_targets((int)/*64*/args[0], args[1], args[2]);}
+		};
+	}
+
+	/* QueryInterface([in] iid, [out] ppvObject)
+	 * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject 
+	 * must be incremented before returning.  Caller is responsible for releasing ppvObject.
+	 */
+	int QueryInterface(int /*long*/ iid, int /*long*/ ppvObject) {
+		GUID guid = new GUID();
+		COM.MoveMemory(guid, iid, GUID.sizeof);
+
+		if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIAccessibleRelation)) {
+			COM.MoveMemory(ppvObject, new int /*long*/[] { getAddress() }, OS.PTR_SIZEOF);
+			AddRef();
+			return COM.S_OK;
+		}
+
+		return COM.E_NOINTERFACE;
+	}
+
+	int AddRef() {
+		refCount++;
+		return refCount;
+	}
+
+	int Release() {
+		refCount--;
+
+		if (refCount == 0) {
+			if (objIAccessibleRelation != null)
+				objIAccessibleRelation.dispose();
+			objIAccessibleRelation = null;
+		}
+		return refCount;
+	}
+
+	/* IAccessibleRelation::get_relationType([out] pbstrRelationType) */
+	int get_relationType(int /*long*/ pbstrRelationType) {
+		setString(pbstrRelationType, relationTypeString[type]);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleRelation::get_localizedRelationType([out] pbstrLocalizedRelationType) */
+	int get_localizedRelationType(int /*long*/ pbstrLocalizedRelationType) {
+		setString(pbstrLocalizedRelationType, localizedRelationTypeString[type]);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleRelation::get_nTargets([out] pNTargets) */
+	int get_nTargets(int /*long*/ pNTargets) {
+		COM.MoveMemory(pNTargets, new int [] { targets.length }, 4);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleRelation::get_target([in] targetIndex, [out] ppTarget) */
+	int get_target(int targetIndex, int /*long*/ ppTarget) {
+		if (targetIndex < 0 || targetIndex >= targets.length) return COM.E_INVALIDARG;
+		Accessible target = targets[targetIndex];
+		target.AddRef();
+		COM.MoveMemory(ppTarget, new int /*long*/[] { target.getAddress() }, OS.PTR_SIZEOF);
+		return COM.S_OK;
+	}
+
+	/* IAccessibleRelation::get_targets([in] maxTargets, [out] ppTargets, [out] pNTargets) */
+	int get_targets(int maxTargets, int /*long*/ ppTargets, int /*long*/ pNTargets) {
+		int count = Math.min(targets.length, maxTargets);
+		for (int i = 0; i < count; i++) {
+			Accessible target = targets[i];
+			target.AddRef();
+			COM.MoveMemory(ppTargets + i * OS.PTR_SIZEOF, new int /*long*/[] { target.getAddress() }, OS.PTR_SIZEOF);
+		}
+		COM.MoveMemory(pNTargets, new int [] { count }, 4);
+		return COM.S_OK;
+	}
+
+	void addTarget(Accessible target) {
+		if (containsTarget(target)) return;
+		Accessible[] newTargets = new Accessible[targets.length + 1];
+		System.arraycopy(targets, 0, newTargets, 0, targets.length);
+		newTargets[targets.length] = target;
+		targets = newTargets;
+	}
+
+	boolean containsTarget(Accessible target) {
+		for (int i = 0; i < targets.length; i++) {
+			if (targets[i] == target) return true;
+		}
+		return false;
+	}
+
+	void removeTarget(Accessible target) {
+		if (!containsTarget(target)) return;
+		Accessible[] newTargets = new Accessible[targets.length - 1];
+		int j = 0;
+		for (int i = 0; i < targets.length; i++) {
+			if (targets[i] != target) {
+				newTargets[j++] = targets[i];
+			}
+		}
+		targets = newTargets;
+	}
+
+	boolean hasTargets() {
+		return targets.length > 0;
+	}
+
+	// setString copied from Accessible class
+	void setString(int /*long*/ psz, String string) {
+		char[] data = (string + "\0").toCharArray();
+		int /*long*/ ptr = COM.SysAllocString(data);
+		COM.MoveMemory(psz, new int /*long*/ [] { ptr }, OS.PTR_SIZEOF);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java
index ea1f2fa..21fe561 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.browser;
 
+import java.io.UnsupportedEncodingException;
 import java.util.Enumeration;
 
 import org.eclipse.swt.*;
@@ -31,7 +32,7 @@ class Safari extends WebBrowser {
 	int windowBoundsHandler;
 	int preferences;
 	
-	boolean changingLocation, hasNewFocusElement;
+	boolean loadingText, hasNewFocusElement, untrustedText;
 	String lastHoveredLinkURL, lastNavigateURL;
 	String html;
 	int identifier;
@@ -51,12 +52,14 @@ class Safari extends WebBrowser {
 	static final int MAX_PROGRESS = 100;
 	static final String WebElementLinkURLKey = "WebElementLinkURL"; //$NON-NLS-1$
 	static final String AGENT_STRING = "Safari/412.0"; /* Safari version on OSX 10.4 initial release */ //$NON-NLS-1$
-	static final String URI_FROMMEMORY = "file:///"; //$NON-NLS-1$
+	static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
 	static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
 	static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
 	static final String URI_APPLEWEBDATA = "applewebdata://"; //$NON-NLS-1$
 	static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
 	static final String HEADER_SETCOOKIE = "Set-Cookie"; //$NON-NLS-1$
+	static final String POST = "POST"; //$NON-NLS-1$
+	static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
 	static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
 	static final String BROWSER_WINDOW = "org.eclipse.swt.browser.Browser.Window"; //$NON-NLS-1$
 	static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
@@ -72,6 +75,8 @@ class Safari extends WebBrowser {
 	static final String DOMEVENT_FOCUSOUT = "DOMFocusOut"; //$NON-NLS-1$
 
 	static {
+		Cocoa.WebInitForCarbon();
+
 		NativeClearSessions = new Runnable() {
 			public void run() {
 				int storage = Cocoa.objc_msgSend (Cocoa.C_NSHTTPCookieStorage, Cocoa.S_sharedHTTPCookieStorage);
@@ -90,27 +95,21 @@ class Safari extends WebBrowser {
 		NativeGetCookie = new Runnable () {
 			public void run () {
 				int storage = Cocoa.objc_msgSend (Cocoa.C_NSHTTPCookieStorage, Cocoa.S_sharedHTTPCookieStorage);
-				int length = CookieUrl.length ();
-				char[] buffer = new char[length];
-				CookieUrl.getChars (0, length, buffer, 0);
-				int urlString = OS.CFStringCreateWithCharacters (0, buffer, length);
+				int urlString = createNSString (CookieUrl);
 				int url = Cocoa.objc_msgSend (Cocoa.C_NSURL, Cocoa.S_URLWithString, urlString);
 				OS.CFRelease (urlString);
 				int cookies = Cocoa.objc_msgSend (storage, Cocoa.S_cookiesForURL, url);
 				int count = Cocoa.objc_msgSend (cookies, Cocoa.S_count);
 				if (count == 0) return;
 
-				length = CookieName.length ();
-				buffer = new char[length];
-				CookieName.getChars (0, length, buffer, 0);
-				int name = OS.CFStringCreateWithCharacters (0, buffer, length);
+				int name = createNSString (CookieName);
 				for (int i = 0; i < count; i++) {
 					int current = Cocoa.objc_msgSend (cookies, Cocoa.S_objectAtIndex, i);
 					int currentName = Cocoa.objc_msgSend (current, Cocoa.S_name);
 					if (Cocoa.objc_msgSend (currentName, Cocoa.S_compare, name) == Cocoa.NSOrderedSame) {
 						int value = Cocoa.objc_msgSend (current, Cocoa.S_value);
-						length = OS.CFStringGetLength (value);
-						buffer = new char[length];
+						int length = OS.CFStringGetLength (value);
+						char[] buffer = new char[length];
 						CFRange range = new CFRange ();
 						range.length = length;
 						OS.CFStringGetCharacters (value, range, buffer);
@@ -125,21 +124,12 @@ class Safari extends WebBrowser {
 
 		NativeSetCookie = new Runnable () {
 			public void run () {
-				int length = CookieUrl.length ();
-				char[] buffer = new char[length];
-				CookieUrl.getChars (0, length, buffer, 0);
-				int urlString = OS.CFStringCreateWithCharacters (0, buffer, length);
+				int urlString = createNSString(CookieUrl);
 				int url = Cocoa.objc_msgSend (Cocoa.C_NSURL, Cocoa.S_URLWithString, urlString);
 				OS.CFRelease (urlString);
 
-				length = CookieValue.length ();
-				buffer = new char[length];
-				CookieValue.getChars (0, length, buffer, 0);
-				int value = OS.CFStringCreateWithCharacters (0, buffer, length);
-				length = HEADER_SETCOOKIE.length ();
-				buffer = new char[length];
-				HEADER_SETCOOKIE.getChars (0, length, buffer, 0);
-				int key = OS.CFStringCreateWithCharacters (0, buffer, length);
+				int value = createNSString (CookieValue);
+				int key = createNSString (HEADER_SETCOOKIE);
 				int headers = Cocoa.objc_msgSend (Cocoa.C_NSMutableDictionary, Cocoa.S_dictionaryWithCapacity, 1);
 				Cocoa.objc_msgSend (headers, Cocoa.S_setValue, value, key);
 				OS.CFRelease (key);
@@ -153,9 +143,14 @@ class Safari extends WebBrowser {
 				CookieResult = true;
 			}
 		};
+
+		if (NativePendingCookies != null) {
+			SetPendingCookies (NativePendingCookies);
+		}
+		NativePendingCookies = null;
 	}
 
-public void create (Composite parent, int style) {
+public boolean create (Composite parent, int style) {
 	/*
 	* Note.  Loading the webkit bundle on Jaguar causes a crash.
 	* The workaround is to detect any OS prior to 10.30 and fail
@@ -293,6 +288,11 @@ public void create (Composite parent, int style) {
 					browser.notifyListeners (e.type, e);
 					e.type = SWT.NONE;
 
+					/* invoke onbeforeunload handlers */
+					if (!browser.isClosing && !browser.isDisposed()) {
+						close (false);
+					}
+
 					OS.RemoveEventHandler(windowBoundsHandler);
 					windowBoundsHandler = 0;
 
@@ -387,10 +387,7 @@ public void create (Composite parent, int style) {
 	Cocoa.objc_msgSend(webView, Cocoa.S_setDownloadDelegate, delegate);
 
 	// [webView setApplicationNameForUserAgent:applicationName];
-	int length = AGENT_STRING.length();
-	char[] chars = new char[length];
-	AGENT_STRING.getChars(0, length, chars, 0);
-	int sHandle = OS.CFStringCreateWithCharacters(0, chars, length);
+	int sHandle = createNSString(AGENT_STRING);
 	Cocoa.objc_msgSend(webView, Cocoa.S_setApplicationNameForUserAgent, sHandle);
 	OS.CFRelease(sHandle);
 
@@ -404,6 +401,8 @@ public void create (Composite parent, int style) {
 		int preferences = Cocoa.objc_msgSend(Cocoa.C_WebPreferences, Cocoa.S_standardPreferences);
 		Cocoa.objc_msgSend(preferences, Cocoa.S_setJavaEnabled, 0);
 	}
+
+	return true;
 }
 
 static int eventProc3(int nextHandler, int theEvent, int userData) {
@@ -422,6 +421,13 @@ static int eventProc7(int webview, int userData, int selector, int arg0, int arg
 	return 0;
 }
 
+static int createNSString(String string) {
+	int length = string.length ();
+	char[] buffer = new char[length];
+	string.getChars (0, length, buffer, 0);
+	return OS.CFStringCreateWithCharacters (0, buffer, length);
+}
+
 static String getString (int ptr) {
 	int length = OS.CFStringGetLength (ptr);
 	char[] buffer = new char[length];
@@ -436,15 +442,58 @@ public boolean back() {
 	return Cocoa.objc_msgSend(webView, Cocoa.S_goBack) != 0;
 }
 
+public boolean close () {
+	return close (true);
+}
+
+boolean close (boolean showPrompters) {
+	if (!jsEnabled) return true;
+
+	String functionName = EXECUTE_ID + "CLOSE"; // $NON-NLS-1$
+	StringBuffer buffer = new StringBuffer ("function "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win) {\n"); // $NON-NLS-1$
+	buffer.append ("var fn = win.onbeforeunload; if (fn != null) {try {var str = fn(); "); // $NON-NLS-1$
+	if (showPrompters) {
+		buffer.append ("if (str != null) { "); // $NON-NLS-1$
+		buffer.append ("var result = window.external.callRunBeforeUnloadConfirmPanelWithMessage(str);"); // $NON-NLS-1$
+		buffer.append ("if (!result) return false;}"); // $NON-NLS-1$
+	}	
+	buffer.append ("} catch (e) {}}"); // $NON-NLS-1$
+	buffer.append ("try {for (var i = 0; i < win.frames.length; i++) {var result = "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win.frames[i]); if (!result) return false;}} catch (e) {} return true;"); // $NON-NLS-1$
+	buffer.append ("\n};"); // $NON-NLS-1$
+	execute (buffer.toString ());
+
+	Boolean result = (Boolean)evaluate ("return " + functionName +"(window);"); // $NON-NLS-1$ // $NON-NLS-2$
+	if (result == null) return false;
+	return result.booleanValue ();
+}
+
 public boolean execute(String script) {
-	int length = script.length();
-	char[] buffer = new char[length];
-	script.getChars(0, length, buffer, 0);
-	int string = OS.CFStringCreateWithCharacters(0, buffer, length);
+	int frame = Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
+	int context = Cocoa.objc_msgSend(frame, Cocoa.S_globalContext);
 
-	int value = Cocoa.objc_msgSend(webView, Cocoa.S_stringByEvaluatingJavaScriptFromString, string);
-	OS.CFRelease(string);
-	return value != 0;
+	byte[] bytes = null;
+	try {
+		bytes = (script + '\0').getBytes("UTF-8"); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = (script + '\0').getBytes();
+	}
+	int scriptString = OS.JSStringCreateWithUTF8CString(bytes);
+
+	try {
+		bytes = (getUrl() + '\0').getBytes("UTF-8"); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = (getUrl() + '\0').getBytes();
+	}
+	int urlString = OS.JSStringCreateWithUTF8CString(bytes);
+
+	int result = OS.JSEvaluateScript(context, scriptString, 0, urlString, 0, null);
+	OS.JSStringRelease(urlString);
+	OS.JSStringRelease(scriptString);
+	return result != 0;
 }
 
 public boolean forward() {
@@ -453,7 +502,7 @@ public boolean forward() {
 }
 
 public String getBrowserType () {
-	return "safari"; //$NON-NLS-1$
+	return "webkit"; //$NON-NLS-1$
 }
 
 public String getText() {
@@ -473,6 +522,9 @@ public String getText() {
 }
 
 public String getUrl() {
+	/* WebKit auto-navigates to about:blank at startup */
+	if (url.length() == 0) return ABOUT_BLANK;
+
 	return url;
 }
 
@@ -718,6 +770,9 @@ int handleCallback(int selector, int arg0, int arg1, int arg2, int arg3) {
 		case 33: windowScriptObjectAvailable(arg0); break;
 		case 34: ret = callJava(arg0, arg1, arg2); break;
 		case 35: didReceiveAuthenticationChallengefromDataSource(arg0, arg1, arg2); break;
+		case 36: ret = runBeforeUnloadConfirmPanelWithMessage(arg0, arg1); break;
+		case 37: ret = callRunBeforeUnloadConfirmPanelWithMessage(arg0, arg1); break;
+		case 38: createPanelDidEnd(arg0, arg1, arg2); break;
 	}
 	return ret;
 }
@@ -731,51 +786,30 @@ public boolean isForwardEnabled() {
 }
 
 public void refresh() {
+	html = null;
 	Cocoa.objc_msgSend(webView, Cocoa.S_reload, 0);
 }
 
-public boolean setText(String html) {
+public boolean setText(String html, boolean trusted) {
 	/*
-	* Bug in Safari.  The web view segment faults in some circumstances
-	* when the text changes during the location changing callback.  The
-	* fix is to defer the work until the callback is done. 
+	* If this.html is not null then the about:blank page is already being loaded,
+	* so no navigate is required.  Just set the html that is to be shown.
 	*/
-	if (changingLocation) {
-		this.html = html;
-	} else {
-		_setText(html);
-	}
-	return true;
-}
-	
-void _setText(String html) {	
-	int length = html.length();
-	char[] buffer = new char[length];
-	html.getChars(0, length, buffer, 0);
-	int string = OS.CFStringCreateWithCharacters(0, buffer, length);
-
-	length = URI_FROMMEMORY.length();
-	buffer = new char[length];
-	URI_FROMMEMORY.getChars(0, length, buffer, 0);
-	int URLString = OS.CFStringCreateWithCharacters(0, buffer, length);
-	
-	/*
-	* Note.  URLWithString uses autorelease.  The resulting URL
-	* does not need to be released.
-	* URL = [NSURL URLWithString:(NSString *)URLString]
-	*/	
-	int URL = Cocoa.objc_msgSend(Cocoa.C_NSURL, Cocoa.S_URLWithString, URLString);
-	OS.CFRelease(URLString);
-	
-	//mainFrame = [webView mainFrame];
+	boolean blankLoading = this.html != null;
+	this.html = html;
+	untrustedText = !trusted;
+	if (blankLoading) return true;
+
+	int str = createNSString(ABOUT_BLANK);
+	int inURL = Cocoa.objc_msgSend(Cocoa.C_NSURL, Cocoa.S_URLWithString, str); /* autoreleased */
+	OS.CFRelease (str);
+	int request = Cocoa.objc_msgSend(Cocoa.C_NSURLRequest, Cocoa.S_requestWithURL, inURL);
 	int mainFrame = Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
-	
-	//[mainFrame loadHTMLString:(NSString *) string baseURL:(NSURL *)URL];
-	Cocoa.objc_msgSend(mainFrame, Cocoa.S_loadHTMLStringbaseURL, string, URL);
-	OS.CFRelease(string);
+	Cocoa.objc_msgSend(mainFrame, Cocoa.S_loadRequest, request);
+	return true;
 }
 
-public boolean setUrl(String url) {
+public boolean setUrl(String url, String postData, String[] headers) {
 	html = null;
 
 	if (url.indexOf('/') == 0) {
@@ -785,9 +819,7 @@ public boolean setUrl(String url) {
 	}
 
 	int inURL = 0;
-	char[] chars = new char[url.length()];
-	url.getChars(0, chars.length, chars, 0);
-	int str = OS.CFStringCreateWithCharacters(0, chars, chars.length);
+	int str = createNSString(url);
 	if (str != 0) {
 		char[] unescapedChars = new char[] {'%', '#'};
 		int unescapedStr = OS.CFStringCreateWithCharacters(0, unescapedChars, unescapedChars.length);
@@ -801,16 +833,51 @@ public boolean setUrl(String url) {
 	}
 	if (inURL == 0) return false;
 
-	//request = [NSURLRequest requestWithURL:(NSURL*)inURL];
-	int request = Cocoa.objc_msgSend(Cocoa.C_NSURLRequest, Cocoa.S_requestWithURL, inURL);
+	int request = Cocoa.objc_msgSend(Cocoa.C_NSMutableURLRequest, Cocoa.S_requestWithURL, inURL);
 	OS.CFRelease(inURL);
 
-	//mainFrame = [webView mainFrame];
-	int mainFrame = Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
+	if (postData != null) {
+		int post = createNSString(POST);
+		Cocoa.objc_msgSend(request, Cocoa.S_setHTTPMethod, post);
+		OS.CFRelease (post);
+		byte[] bytes = postData.getBytes();
+		int data = Cocoa.objc_msgSend(Cocoa.C_NSData, Cocoa.S_dataWithBytes, bytes, bytes.length);
+		Cocoa.objc_msgSend(request, Cocoa.S_setHTTPBody, data);
+	}
+	if (headers != null) {
+		for (int i = 0; i < headers.length; i++) {
+			String current = headers[i];
+			if (current != null) {
+				int index = current.indexOf(':');
+				if (index != -1) {
+					String key = current.substring(0, index).trim();
+					String value = current.substring(index + 1).trim();
+					if (key.length() > 0 && value.length() > 0) {
+						if (key.equalsIgnoreCase(USER_AGENT)) {
+							/*
+							* Feature of Safari.  The user-agent header value cannot be overridden
+							* here.  The workaround is to temporarily set the value on the WebView
+							* and then remove it after the loading of the request has begun.
+							*/
+							int string = createNSString(value);
+							Cocoa.objc_msgSend(webView, Cocoa.S_setCustomUserAgent, string);
+							OS.CFRelease (string);
+						} else {
+							int keyString = createNSString(key);
+							int valueString = createNSString(value);
+							Cocoa.objc_msgSend(request, Cocoa.S_setValueForHTTPHeaderField, valueString, keyString);
+							OS.CFRelease (valueString);
+							OS.CFRelease (keyString);
+						}
+					}
+				}
+			}
+		}
+	}
 
-	//[mainFrame loadRequest:request];
+	int mainFrame = Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
 	Cocoa.objc_msgSend(mainFrame, Cocoa.S_loadRequest, request);
-
+	Cocoa.objc_msgSend(webView, Cocoa.S_setCustomUserAgent, 0);
 	return true;
 }
 
@@ -819,13 +886,17 @@ public void stop() {
 	Cocoa.objc_msgSend(webView, Cocoa.S_stopLoading, 0);
 }
 
+boolean translateMnemonics() {
+	return false;
+}
+
 /* WebFrameLoadDelegate */
 void didChangeLocationWithinPageForFrame(int frame) {
 	//id url= [[[[frame provisionalDataSource] request] URL] absoluteString];
 	int dataSource = Cocoa.objc_msgSend(frame, Cocoa.S_dataSource);
 	int request = Cocoa.objc_msgSend(dataSource, Cocoa.S_request);
 	int url = Cocoa.objc_msgSend(request, Cocoa.S_URL);
-	int s = Cocoa.objc_msgSend(url, Cocoa.S_absoluteString);	
+	int s = Cocoa.objc_msgSend(url, Cocoa.S_absoluteString);
 	int length = OS.CFStringGetLength(s);
 	if (length == 0) return;
 	char[] buffer = new char[length];
@@ -837,7 +908,14 @@ void didChangeLocationWithinPageForFrame(int frame) {
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
 	final Display display = browser.getDisplay();
 	boolean top = frame == Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
@@ -877,83 +955,147 @@ void didFailProvisionalLoadWithError(int error, int frame) {
 		*/
 		identifier = 0;
 	}
+
+	int errorCode = Cocoa.objc_msgSend(error, Cocoa.S_code);
+	if (Cocoa.NSURLErrorBadURL < errorCode) return;
+
+	int failingURL = 0;
+	int info = Cocoa.objc_msgSend(error, Cocoa.S_userInfo);
+	if (info != 0) {
+		int keyString = createNSString("NSErrorFailingURLKey"); //$NON-NLS-1$
+		failingURL = Cocoa.objc_msgSend(info, Cocoa.S_valueForKey, keyString);
+		OS.CFRelease(keyString);
+	}
+
+	if (failingURL != 0 && Cocoa.NSURLErrorServerCertificateNotYetValid <= errorCode && errorCode <= Cocoa.NSURLErrorSecureConnectionFailed) {
+		/* handle invalid certificate error */
+		int keyString = createNSString("NSErrorPeerCertificateChainKey"); //$NON-NLS-1$
+		int certificates = Cocoa.objc_msgSend(info, Cocoa.S_objectForKey, keyString);
+		OS.CFRelease(keyString);
+
+		int[] policySearch = new int[1];
+		int[] policyRef = new int[1];
+		int[] trustRef = new int[1];
+		boolean success = false;
+		int result = OS.SecPolicySearchCreate(OS.CSSM_CERT_X_509v3, 0, 0, policySearch);
+		if (result == 0 && policySearch[0] != 0) {
+			result = OS.SecPolicySearchCopyNext(policySearch[0], policyRef);
+			if (result == 0 && policyRef[0] != 0) {
+				result = OS.SecTrustCreateWithCertificates(certificates, policyRef[0], trustRef);
+				if (result == 0 && trustRef[0] != 0) {
+					int panel = Cocoa.objc_msgSend(Cocoa.C_SFCertificateTrustPanel, Cocoa.S_sharedCertificateTrustPanel);
+					String failingUrlString = getString(Cocoa.objc_msgSend(failingURL, Cocoa.S_absoluteString));
+					String message = Compatibility.getMessage("SWT_InvalidCert_Message", new Object[] {failingUrlString}); //$NON-NLS-1$
+					int nsString = createNSString(Compatibility.getMessage("SWT_Cancel")); //$NON-NLS-1$
+					Cocoa.objc_msgSend(panel, Cocoa.S_setAlternateButtonTitle, nsString);
+					OS.CFRelease(nsString);
+					Cocoa.objc_msgSend(panel, Cocoa.S_setShowsHelp, 1);
+					Cocoa.objc_msgSend(failingURL, Cocoa.S_retain);
+					int window = Cocoa.objc_msgSend(webView, Cocoa.S_window);
+					nsString = createNSString(message);
+					Cocoa.objc_msgSend(panel, Cocoa.S_beginSheetForWindow, window, delegate, Cocoa.S_createPanelDidEnd, failingURL, trustRef[0], nsString);
+					OS.CFRelease(nsString);
+					success = true;
+				}
+			}
+		}
+
+		if (trustRef[0] != 0) OS.CFRelease(trustRef[0]);
+		if (policyRef[0] != 0) OS.CFRelease(policyRef[0]);
+		if (policySearch[0] != 0) OS.CFRelease(policySearch[0]);
+		if (success) return;
+	}
+
+	/* handle other types of errors */
+	int description = Cocoa.objc_msgSend(error, Cocoa.S_localizedDescription);
+	if (description != 0) {
+		String descriptionString = getString(description);
+		String message = failingURL != 0 ? getString(Cocoa.objc_msgSend(failingURL, Cocoa.S_absoluteString)) + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
+		message += Compatibility.getMessage ("SWT_Page_Load_Failed", new Object[] {descriptionString}); //$NON-NLS-1$
+		MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.ICON_ERROR);
+		messageBox.setMessage(message);
+		messageBox.open();
+	}
+}
+
+void createPanelDidEnd(int sheet, int returnCode, int contextInfo) {
+	Cocoa.objc_msgSend(contextInfo, Cocoa.S_autorelease);
+	if (returnCode != Cocoa.NSFileHandlingPanelOKButton) return;	/* nothing more to do */
+
+	int /*long*/ method = Cocoa.class_getClassMethod(Cocoa.C_NSURLRequest, Cocoa.S_setAllowsAnyHTTPSCertificate);
+	if (method != 0) {
+		int host = Cocoa.objc_msgSend(contextInfo, Cocoa.S_host);
+		int urlString = Cocoa.objc_msgSend(contextInfo, Cocoa.S_absoluteString);
+		Cocoa.objc_msgSend(Cocoa.C_NSURLRequest, Cocoa.S_setAllowsAnyHTTPSCertificate, 1, host);
+		setUrl(getString(urlString), null, null);
+	}
 }
 
 void didFinishLoadForFrame(int frame) {
-	hookDOMFocusListeners(frame);
-	hookDOMMouseListeners(frame);
 	if (frame == Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame)) {
-		hookDOMKeyListeners(frame);
-
-		final Display display = browser.getDisplay();
 		/*
-		* To be consistent with other platforms a title event should be fired when a
-		* page has completed loading.  A page with a <title> tag will do this
-		* automatically when the didReceiveTitle callback is received.  However a page
-		* without a <title> tag will not do this by default, so fire the event
-		* here with the page's url as the title.
-		*/
-		int dataSource = Cocoa.objc_msgSend(frame, Cocoa.S_dataSource);
-		if (dataSource != 0) {
-			int title = Cocoa.objc_msgSend(dataSource, Cocoa.S_pageTitle);
-			if (title == 0) {	/* page has no title */
-				final TitleEvent newEvent = new TitleEvent(browser);
-				newEvent.display = display;
-				newEvent.widget = browser;
-				newEvent.title = url;
-				for (int i = 0; i < titleListeners.length; i++) {
-					final TitleListener listener = titleListeners[i];
-					/*
-					* Note on WebKit.  Running the event loop from a Browser
-					* delegate callback breaks the WebKit (stop loading or
-					* crash).  The workaround is to invoke Display.asyncExec()
-					* so that the Browser does not crash if this is attempted.
-					*/
-					display.asyncExec(
-						new Runnable() {
-							public void run() {
-								if (!display.isDisposed() && !browser.isDisposed()) {
-									listener.changed(newEvent);
-								}
-							}
-						}
-					);
+		 * If html is not null then there is html from a previous setText() call
+		 * waiting to be set into the about:blank page once it has completed loading. 
+		 */
+		if (html != null) {
+			if (getUrl().startsWith(ABOUT_BLANK)) {
+				loadingText = true;
+				int htmlString = createNSString(html);
+				int urlString;
+				if (untrustedText) {
+					urlString = createNSString(ABOUT_BLANK);
+				} else {
+					urlString = createNSString(URI_FILEROOT);
 				}
+				int url = Cocoa.objc_msgSend(Cocoa.C_NSURL, Cocoa.S_URLWithString, urlString); /* autoreleased */
+				int mainFrame = Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
+				Cocoa.objc_msgSend(mainFrame, Cocoa.S_loadHTMLStringBaseURL, htmlString, url);
+				OS.CFRelease(urlString);
+				OS.CFRelease(htmlString);
+				html = null;
 			}
 		}
-		final ProgressEvent progress = new ProgressEvent(browser);
-		progress.display = display;
-		progress.widget = browser;
-		progress.current = MAX_PROGRESS;
-		progress.total = MAX_PROGRESS;
-		for (int i = 0; i < progressListeners.length; i++) {
-			final ProgressListener listener = progressListeners[i];
+
+		/*
+		* The loadHTMLStringBaseURL invocation above will trigger a second didFinishLoadForFrame
+		* callback when it is completed.  If text was just set into the browser then wait
+		* for this second callback to come before sending the title or completed events.
+		*/
+		if (!loadingText) {
 			/*
-			* Note on WebKit.  Running the event loop from a Browser
-			* delegate callback breaks the WebKit (stop loading or
-			* crash).  The ProgressBar widget currently touches the
-			* event loop every time the method setSelection is called.  
-			* The workaround is to invoke Display.asyncExec() so that
-			* the Browser does not crash when the user updates the 
-			* selection of the ProgressBar.
+			* To be consistent with other platforms a title event should be fired when a
+			* page has completed loading.  A page with a <title> tag will do this
+			* automatically when the didReceiveTitle callback is received.  However a page
+			* without a <title> tag will not do this by default, so fire the event
+			* here with the page's url as the title.
 			*/
-			display.asyncExec(
-				new Runnable() {
-					public void run() {
-						if (!display.isDisposed() && !browser.isDisposed()) {
-							listener.completed(progress);
-						}
+			final Display display = browser.getDisplay();
+			int dataSource = Cocoa.objc_msgSend(frame, Cocoa.S_dataSource);
+			if (dataSource != 0) {
+				int title = Cocoa.objc_msgSend(dataSource, Cocoa.S_pageTitle);
+				if (title == 0) {	/* page has no title */
+					final TitleEvent newEvent = new TitleEvent(browser);
+					newEvent.display = display;
+					newEvent.widget = browser;
+					newEvent.title = getUrl();
+					for (int i = 0; i < titleListeners.length; i++) {
+						titleListeners[i].changed(newEvent);
 					}
+					if (browser.isDisposed()) return;
 				}
-			);
-		}
+			}
 
-		/* re-install registered functions */
-		Enumeration elements = functions.elements ();
-		while (elements.hasMoreElements ()) {
-			BrowserFunction function = (BrowserFunction)elements.nextElement ();
-			execute (function.functionString);
+			ProgressEvent progress = new ProgressEvent(browser);
+			progress.display = display;
+			progress.widget = browser;
+			progress.current = MAX_PROGRESS;
+			progress.total = MAX_PROGRESS;
+			for (int i = 0; i < progressListeners.length; i++) {
+				progressListeners[i].completed(progress);
+			}
 		}
+		loadingText = false;
+		if (browser.isDisposed()) return;
 
 		/*
 		* Feature on Safari.  The identifier is used here as a marker for the events 
@@ -984,19 +1126,11 @@ void hookDOMFocusListeners(int frame) {
 	int document = Cocoa.objc_msgSend(frame, Cocoa.S_DOMDocument);
 	if (document == 0) return;
 
-	String string = DOMEVENT_FOCUSIN;
-	int length = string.length();
-	char[] chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	int ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	int ptr = createNSString(DOMEVENT_FOCUSIN);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 
-	string = DOMEVENT_FOCUSOUT;
-	length = string.length();
-	chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	ptr = createNSString(DOMEVENT_FOCUSOUT);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 }
@@ -1011,19 +1145,11 @@ void hookDOMKeyListeners(int frame) {
 	int document = Cocoa.objc_msgSend(frame, Cocoa.S_DOMDocument);
 	if (document == 0) return;
 
-	String string = DOMEVENT_KEYDOWN;
-	int length = string.length();
-	char[] chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	int ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	int ptr = createNSString(DOMEVENT_KEYDOWN);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 
-	string = DOMEVENT_KEYUP;
-	length = string.length();
-	chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	ptr = createNSString(DOMEVENT_KEYUP);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 }
@@ -1038,35 +1164,19 @@ void hookDOMMouseListeners(int frame) {
 	int document = Cocoa.objc_msgSend(frame, Cocoa.S_DOMDocument);
 	if (document == 0) return;
 
-	String string = DOMEVENT_MOUSEDOWN;
-	int length = string.length();
-	char[] chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	int ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	int ptr = createNSString(DOMEVENT_MOUSEDOWN);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 
-	string = DOMEVENT_MOUSEUP;
-	length = string.length();
-	chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	ptr = createNSString(DOMEVENT_MOUSEUP);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 
-	string = DOMEVENT_MOUSEMOVE;
-	length = string.length();
-	chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	ptr = createNSString(DOMEVENT_MOUSEMOVE);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 
-	string = DOMEVENT_MOUSEWHEEL;
-	length = string.length();
-	chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	ptr = OS.CFStringCreateWithCharacters(0, chars, length);
+	ptr = createNSString(DOMEVENT_MOUSEWHEEL);
 	Cocoa.objc_msgSend(document, Cocoa.S_addEventListener, ptr, delegate, 0);
 	OS.CFRelease(ptr);
 }
@@ -1120,7 +1230,14 @@ void didCommitLoadForFrame(int frame) {
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
 	final Display display = browser.getDisplay();
 	boolean top = frame == Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame);
@@ -1128,32 +1245,31 @@ void didCommitLoadForFrame(int frame) {
 		/* reset resource status variables */
 		resourceCount = 0;		
 		this.url = url2;
-		
+
+		/*
+		* Each invocation of setText() causes didCommitLoadForFrame to be invoked twice,
+		* once for the initial navigate to about:blank, and once for the auto-navigate
+		* to about:blank that Safari does when loadHTMLStringBaseURL is invoked.  If
+		* this is the first didCommitLoadForFrame callback received for a setText()
+		* invocation then do not send any events or re-install registered BrowserFunctions. 
+		*/
+		if (url2.startsWith(ABOUT_BLANK) && html != null) return;
+
+		Enumeration elements = functions.elements ();
+		while (elements.hasMoreElements ()) {
+			BrowserFunction function = (BrowserFunction)elements.nextElement ();
+			execute (function.functionString);
+		}
+
 		final ProgressEvent progress = new ProgressEvent(browser);
 		progress.display = display;
 		progress.widget = browser;
 		progress.current = 1;
 		progress.total = MAX_PROGRESS;
 		for (int i = 0; i < progressListeners.length; i++) {
-			final ProgressListener listener = progressListeners[i];
-			/*
-			* Note on WebKit.  Running the event loop from a Browser
-			* delegate callback breaks the WebKit (stop loading or
-			* crash).  The widget ProgressBar currently touches the
-			* event loop every time the method setSelection is called.  
-			* The workaround is to invoke Display.asyncexec so that
-			* the Browser does not crash when the user updates the 
-			* selection of the ProgressBar.
-			*/
-			display.asyncExec(
-				new Runnable() {
-					public void run() {
-						if (!display.isDisposed() && !browser.isDisposed())
-							listener.changed(progress);
-					}
-				}
-			);
+			progressListeners[i].changed(progress);
 		}
+		if (browser.isDisposed()) return;
 		
 		StatusTextEvent statusText = new StatusTextEvent(browser);
 		statusText.display = display;
@@ -1162,7 +1278,14 @@ void didCommitLoadForFrame(int frame) {
 		for (int i = 0; i < statusTextListeners.length; i++) {
 			statusTextListeners[i].changed(statusText);
 		}
+		if (browser.isDisposed()) return;
+
+		hookDOMKeyListeners(frame);
 	}
+
+	hookDOMFocusListeners(frame);
+	hookDOMMouseListeners(frame);
+
 	LocationEvent location = new LocationEvent(browser);
 	location.display = display;
 	location.widget = browser;
@@ -1174,10 +1297,7 @@ void didCommitLoadForFrame(int frame) {
 }
 
 void windowScriptObjectAvailable (int windowScriptObject) {
-	String objectName = "external"; //$NON-NLS-1$
-	char[] chars = new char[objectName.length ()];
-	objectName.getChars (0, chars.length, chars, 0);
-	int str = OS.CFStringCreateWithCharacters (0, chars, chars.length);
+	int str = createNSString("external"); //$NON-NLS-1$
 	if (str != 0) {
 		Cocoa.objc_msgSend (windowScriptObject, Cocoa.S_setValue, delegate, str);
 		OS.CFRelease (str);
@@ -1241,14 +1361,8 @@ void didReceiveAuthenticationChallengefromDataSource (int identifier, int challe
 			}
 			if (event.user != null && event.password != null) {
 				int challengeSender = Cocoa.objc_msgSend (challenge, Cocoa.S_sender);
-				int length = event.user.length ();
-				char[] buffer = new char[length];
-				event.user.getChars (0, length, buffer, 0);
-				int user = OS.CFStringCreateWithCharacters (0, buffer, length);
-				length = event.password.length ();
-				buffer = new char[length];
-				event.password.getChars (0, length, buffer, 0);
-				int password = OS.CFStringCreateWithCharacters (0, buffer, length);
+				int user = createNSString(event.user);
+				int password = createNSString(event.password);
 				int credential = Cocoa.objc_msgSend (Cocoa.C_NSURLCredential, Cocoa.S_credentialWithUser, user, password, Cocoa.NSURLCredentialPersistenceForSession);
 				Cocoa.objc_msgSend (challengeSender, Cocoa.S_useCredential, credential, challenge);
 				OS.CFRelease (password);
@@ -1299,14 +1413,8 @@ void didReceiveAuthenticationChallengefromDataSource (int identifier, int challe
 		return;
 	}
 
-	int length = userReturn[0].length ();
-	char[] buffer = new char[length];
-	userReturn[0].getChars (0, length, buffer, 0);
-	int user = OS.CFStringCreateWithCharacters (0, buffer, length);
-	length = passwordReturn[0].length ();
-	buffer = new char[length];
-	passwordReturn[0].getChars (0, length, buffer, 0);
-	int password = OS.CFStringCreateWithCharacters (0, buffer, length);
+	int user = createNSString(userReturn[0]);
+	int password = createNSString(passwordReturn[0]);
 	int credential = Cocoa.objc_msgSend (Cocoa.C_NSURLCredential, Cocoa.S_credentialWithUser, user, password, Cocoa.NSURLCredentialPersistenceForSession);
 	Cocoa.objc_msgSend (challengeSender, Cocoa.S_useCredential, credential, challenge);
 	OS.CFRelease (password);
@@ -1394,25 +1502,9 @@ int identifierForInitialRequest(int request, int dataSource) {
 	progress.current = resourceCount;
 	progress.total = Math.max(resourceCount, MAX_PROGRESS);
 	for (int i = 0; i < progressListeners.length; i++) {
-		final ProgressListener listener = progressListeners[i];
-		/*
-		* Note on WebKit.  Running the event loop from a Browser
-		* delegate callback breaks the WebKit (stop loading or
-		* crash).  The widget ProgressBar currently touches the
-		* event loop every time the method setSelection is called.  
-		* The workaround is to invoke Display.asyncexec so that
-		* the Browser does not crash when the user updates the 
-		* selection of the ProgressBar.
-		*/
-		display.asyncExec(
-			new Runnable() {
-				public void run() {
-					if (!display.isDisposed() && !browser.isDisposed())
-						listener.changed(progress);
-				}
-			}
-		);
+		progressListeners[i].changed(progress);
 	}
+	if (browser.isDisposed()) return 0;
 
 	/*
 	* Note.  numberWithInt uses autorelease.  The resulting object
@@ -1426,7 +1518,6 @@ int identifierForInitialRequest(int request, int dataSource) {
 		if (frame == Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame)) this.identifier = identifier;
 	}
 	return identifier;
-		
 }
 
 int willSendRequest(int identifier, int request, int redirectResponse, int dataSource) {
@@ -1502,9 +1593,9 @@ void webViewShow(int sender) {
 	* the address bar.  The address bar is displayed
 	* if the tool bar is displayed. There is no separate
 	* notification for the address bar.
-	* Feature in Safari.  The menu bar is always
-	* displayed. There is no notification to hide
-	* the menu bar.
+	* 
+	* Feature of OSX.  The menu bar is always displayed.
+	* There is no notification to hide the menu bar.
 	*/
 	newEvent.addressBar = toolBar;
 	newEvent.menuBar = true;
@@ -1532,6 +1623,27 @@ void webViewFocus() {
 void webViewUnfocus() {
 }
 
+int callRunBeforeUnloadConfirmPanelWithMessage(int /*long*/ messageID, int /*long*/ arg) {
+	int result = runBeforeUnloadConfirmPanelWithMessage (messageID, 0);
+	return Cocoa.objc_msgSend (Cocoa.C_NSNumber, Cocoa.S_numberWithBool, result);
+}
+
+int runBeforeUnloadConfirmPanelWithMessage(int message, int frame) {
+	StringBuffer text = new StringBuffer(Compatibility.getMessage("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
+	text.append ("\n\n"); //$NON-NLS-1$
+	int length = OS.CFStringGetLength(message);
+	char[] buffer = new char[length];
+	CFRange range = new CFRange();
+	range.length = length;
+	OS.CFStringGetCharacters(message, range, buffer);
+	text.append(new String(buffer));
+	text.append("\n\n"); //$NON-NLS-1$
+	text.append(Compatibility.getMessage("SWT_OnBeforeUnload_Message2")); //$NON-NLS-1$
+	MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
+	messageBox.setMessage(text.toString());
+	return messageBox.open() == SWT.OK ? 1 : 0;
+}
+
 void runJavaScriptAlertPanelWithMessage(int message) {
 	int length = OS.CFStringGetLength(message);
 	char[] buffer = new char[length];
@@ -1567,10 +1679,7 @@ void runOpenPanelForFileButtonWithResultListener(int resultListener) {
 		Cocoa.objc_msgSend(resultListener, Cocoa.S_cancel);
 		return;
 	}
-	int length = result.length();
-	char[] buffer = new char[length];
-	result.getChars(0, length, buffer, 0);
-	int filename = OS.CFStringCreateWithCharacters(0, buffer, length);
+	int filename = createNSString(result);
 	Cocoa.objc_msgSend(resultListener, Cocoa.S_chooseFilename, filename);
 	OS.CFRelease(filename);
 }
@@ -1653,10 +1762,7 @@ void mouseDidMoveOverElement (int elementInformation, int modifierFlags) {
 	if (elementInformation == 0) return;
 	if (!browser.isEnabled ()) return;
 
-	int length = WebElementLinkURLKey.length();
-	char[] chars = new char[length];
-	WebElementLinkURLKey.getChars(0, length, chars, 0);
-	int key = OS.CFStringCreateWithCharacters(0, chars, length);
+	int key = createNSString(WebElementLinkURLKey);
 	int value = Cocoa.objc_msgSend(elementInformation, Cocoa.S_valueForKey, key);
 	OS.CFRelease(key);
 	if (value == 0) {
@@ -1674,12 +1780,12 @@ void mouseDidMoveOverElement (int elementInformation, int modifierFlags) {
 	}
 
 	int stringPtr = Cocoa.objc_msgSend(value, Cocoa.S_absoluteString);
-	length = OS.CFStringGetLength(stringPtr);
+	int length = OS.CFStringGetLength(stringPtr);
 	String urlString;
 	if (length == 0) {
 		urlString = "";	//$NON-NLS-1$
 	} else {
-		chars = new char[length];
+		char[] chars = new char[length];
 		CFRange range = new CFRange();
 		range.length = length;
 		OS.CFStringGetCharacters(stringPtr, range, chars);
@@ -1706,11 +1812,26 @@ void decidePolicyForMIMEType(int type, int request, int frame, int listener) {
 
 void decidePolicyForNavigationAction(int actionInformation, int request, int frame, int listener) {
 	int url = Cocoa.objc_msgSend(request, Cocoa.S_URL);
+	if (loadingText) {
+		/* 
+		 * Safari is auto-navigating to about:blank in response to a loadHTMLString()
+		 * invocation.  This navigate should always proceed without sending an event
+		 * since it is preceded by an explicit navigate to about:blank in setText().
+		 */
+		Cocoa.objc_msgSend(listener, Cocoa.S_use);
+		return;
+	}
 	if (url == 0) {
 		/* indicates that a URL with an invalid format was specified */
 		Cocoa.objc_msgSend(listener, Cocoa.S_ignore);
 		return;
 	}
+	boolean isFileURL = Cocoa.objc_msgSend(url, Cocoa.S_isFileURL) != 0;
+	if (isFileURL && getUrl().startsWith(ABOUT_BLANK) && untrustedText) {
+		/* indicates an attempt to access the local file system from untrusted content */
+		Cocoa.objc_msgSend(listener, Cocoa.S_ignore);
+		return;
+	}
 	int s = Cocoa.objc_msgSend(url, Cocoa.S_absoluteString);
 	int length = OS.CFStringGetLength(s);
 	char[] buffer = new char[length];
@@ -1722,7 +1843,14 @@ void decidePolicyForNavigationAction(int actionInformation, int request, int fra
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
 	if (url2.startsWith (URI_APPLEWEBDATA)) {
 		/* listeners should not be notified of internal transitions like this */
@@ -1734,11 +1862,9 @@ void decidePolicyForNavigationAction(int actionInformation, int request, int fra
 		newEvent.location = url2;
 		newEvent.doit = true;
 		if (locationListeners != null) {
-			changingLocation = true;
 			for (int i = 0; i < locationListeners.length; i++) {
 				locationListeners[i].changing(newEvent);
 			}
-			changingLocation = false;
 		}
 		if (newEvent.doit) {
 			if (jsEnabledChanged) {
@@ -1754,12 +1880,6 @@ void decidePolicyForNavigationAction(int actionInformation, int request, int fra
 		}
 		Cocoa.objc_msgSend(listener, newEvent.doit ? Cocoa.S_use : Cocoa.S_ignore);
 	}
-
-	if (html != null && !browser.isDisposed()) {
-		String html = this.html;
-		this.html = null;
-		_setText(html);
-	}
 }
 
 void decidePolicyForNewWindowAction(int actionInformation, int request, int frameName, int listener) {
@@ -1820,10 +1940,7 @@ void decideDestinationWithSuggestedFilename (int download, int filename) {
 		Cocoa.objc_msgSend(download, Cocoa.S_cancel);
 		return;
 	}
-	length = path.length();
-	char[] chars = new char[length];
-	path.getChars(0, length, chars, 0);
-	int result = OS.CFStringCreateWithCharacters(0, chars, length);
+	int result = createNSString(path);
 	Cocoa.objc_msgSend(download, Cocoa.S_setDestinationAllowOverwrite, result, 1);
 	OS.CFRelease(result);
 }
@@ -1878,13 +1995,19 @@ void handleEvent(int evt) {
 			keyEvent.character = (char)charCode;
 		}
 		keyEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
-		browser.notifyListeners(keyEvent.type, keyEvent);
+
+		boolean doit;
+		if (keyEvent.type == SWT.KeyDown) {
+			doit = sendKeyEvent(keyEvent);
+		} else { /* SWT.KeyUp */
+			browser.notifyListeners(keyEvent.type, keyEvent);
+			doit = keyEvent.doit;
+		}
 		if (browser.isDisposed()) {
 			Cocoa.objc_msgSend(evt, Cocoa.S_preventDefault);
 			return;
 		}
 
-		boolean doit = keyEvent.doit;
 		/*
 		* Bug in Safari.  As a result of using HIWebViewCreate on OSX versions < 10.5 (Leopard), attempting
 		* to traverse out of Safari backwards (Shift+Tab) leaves it in a strange state where Safari no
@@ -1898,7 +2021,6 @@ void handleEvent(int evt) {
 			Cocoa.objc_msgSend(evt, Cocoa.S_preventDefault);
 		} else {
 			if (!hasNewFocusElement && keyEvent.keyCode == SWT.TAB && DOMEVENT_KEYUP.equals(typeString)) {
-				browser.traverse(SWT.TRAVERSE_TAB_NEXT);
 				hasNewFocusElement = false;
 			}
 		}
@@ -1907,13 +2029,21 @@ void handleEvent(int evt) {
 
 	/* mouse event */
 
-	int clientX = Cocoa.objc_msgSend(evt, Cocoa.S_clientX);
-	int clientY = Cocoa.objc_msgSend(evt, Cocoa.S_clientY);
-	int detail = Cocoa.objc_msgSend(evt, Cocoa.S_detail);
+	/*
+	 * The position of mouse events is received in screen-relative coordinates
+	 * in order to handle pages with frames, since frames express their event
+	 * coordinates relative to themselves rather than relative to their top-
+	 * level page.  Convert screen-relative coordinates to be browser-relative.
+	 */
+	int screenX = Cocoa.objc_msgSend(evt, Cocoa.S_screenX);
+	int screenY = Cocoa.objc_msgSend(evt, Cocoa.S_screenY);
+	Point position = new Point(screenX, screenY);
+	position = browser.getDisplay().map(null, browser, position);
 
-	Event mouseEvent = new Event ();
+	int detail = Cocoa.objc_msgSend(evt, Cocoa.S_detail);
+	Event mouseEvent = new Event();
 	mouseEvent.widget = browser;
-	mouseEvent.x = clientX; mouseEvent.y = clientY;
+	mouseEvent.x = position.x; mouseEvent.y = position.y;
 	mouseEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 
 	if (DOMEVENT_MOUSEDOWN.equals (typeString)) {
@@ -1954,7 +2084,7 @@ void handleEvent(int evt) {
 		int button = Cocoa.objc_msgSend(evt, Cocoa.S_button);
 		mouseEvent = new Event ();
 		mouseEvent.widget = browser;
-		mouseEvent.x = clientX; mouseEvent.y = clientY;
+		mouseEvent.x = position.x; mouseEvent.y = position.y;
 		mouseEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 		mouseEvent.type = SWT.MouseDoubleClick;
 		mouseEvent.button = button + 1;
@@ -1986,10 +2116,7 @@ Object convertToJava (int value) {
 		}
 	}
 	if (Cocoa.objc_msgSend (value, Cocoa.S_isKindOfClass, Cocoa.C_WebScriptObject) != 0) {
-		String string = "length"; //$NON-NLS-1$
-		char[] chars = new char[string.length ()];
-		string.getChars (0, chars.length, chars, 0);
-		int str = OS.CFStringCreateWithCharacters (0, chars, chars.length);
+		int str = createNSString ("length"); //$NON-NLS-1$
 		int numberValue = Cocoa.objc_msgSend (value, Cocoa.S_valueForKey, str);
 		OS.CFRelease (str);
 		int length = Cocoa.objc_msgSend (numberValue, Cocoa.S_intValue);
@@ -2015,10 +2142,7 @@ int convertToJS (Object value) {
 		return Cocoa.objc_msgSend (Cocoa.C_WebUndefined, Cocoa.S_undefined);
 	}
 	if (value instanceof String) {
-		String result = (String)value;
-		char[] chars = new char[result.length ()];
-		result.getChars (0, chars.length, chars, 0);
-		return OS.CFStringCreateWithCharacters (0, chars, chars.length);
+		return createNSString((String)value);
 	}
 	if (value instanceof Boolean) {
 		int booleanValue = ((Boolean)value).booleanValue () ? 1 : 0;
@@ -2031,15 +2155,13 @@ int convertToJS (Object value) {
 	if (value instanceof Object[]) {
 		Object[] arrayValue = (Object[])value;
 		int length = arrayValue.length;
-		if (length > 0) {
-			int array = Cocoa.objc_msgSend (Cocoa.C_NSMutableArray, Cocoa.S_arrayWithCapacity, length);
-			for (int i = 0; i < length; i++) {
-				Object currentObject = arrayValue[i];
-				int jsObject = convertToJS (currentObject);
-				Cocoa.objc_msgSend (array, Cocoa.S_addObject, jsObject);
-			}
-			return array;
+		int array = Cocoa.objc_msgSend (Cocoa.C_NSMutableArray, Cocoa.S_arrayWithCapacity, length);
+		for (int i = 0; i < length; i++) {
+			Object currentObject = arrayValue[i];
+			int jsObject = convertToJS (currentObject);
+			Cocoa.objc_msgSend (array, Cocoa.S_addObject, jsObject);
 		}
+		return array;
 	}
 	SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
 	return 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java
index 24c7206..90ecf69 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.browser;
 
+import java.io.UnsupportedEncodingException;
 import java.util.Enumeration;
 
 import org.eclipse.swt.*;
@@ -23,7 +24,7 @@ class Safari extends WebBrowser {
 	WebView webView;
 	WebPreferences preferences;
 	SWTWebViewDelegate delegate;
-	boolean changingLocation;
+	boolean loadingText, untrustedText;
 	String lastHoveredLinkURL, lastNavigateURL;
 	String html;
 	int /*long*/ identifier;
@@ -44,12 +45,14 @@ class Safari extends WebBrowser {
 	static final int MIN_SIZE = 16;
 	static final int MAX_PROGRESS = 100;
 	static final String WebElementLinkURLKey = "WebElementLinkURL"; //$NON-NLS-1$
-	static final String AGENT_STRING = "Safari/unknown"; //$NON-NLS-1$
-	static final String URI_FROMMEMORY = "file:///"; //$NON-NLS-1$
+	static final String AGENT_STRING = "Safari/522.0"; /* Safari version on OSX 10.5 initial release */ //$NON-NLS-1$
+	static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
 	static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
 	static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
 	static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
 	static final String HEADER_SETCOOKIE = "Set-Cookie"; //$NON-NLS-1$
+	static final String POST = "POST"; //$NON-NLS-1$
+	static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
 	static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
 	static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
 	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
@@ -108,10 +111,15 @@ class Safari extends WebBrowser {
 				storage.setCookie (cookie);
 				CookieResult = true;
 			}
-		};	
+		};
+
+		if (NativePendingCookies != null) {
+			SetPendingCookies (NativePendingCookies);
+		}
+		NativePendingCookies = null;
 	}
 
-public void create (Composite parent, int style) {
+public boolean create (Composite parent, int style) {
 	if (delegateClass == 0) {
 		Class safariClass = this.getClass();
 		Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$
@@ -159,8 +167,11 @@ public void create (Composite parent, int style) {
 		OS.class_addMethod(delegateClass, OS.sel_webView_setStatusText_, proc4, "@:@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webViewFocus_, proc3, "@:@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webViewUnfocus_, proc3, "@:@"); //$NON-NLS-1$
+		OS.class_addMethod(delegateClass, OS.sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_, proc5, "@:@@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_runJavaScriptAlertPanelWithMessage_, proc4, "@:@@"); //$NON-NLS-1$
+		OS.class_addMethod(delegateClass, OS.sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_, proc5, "@:@@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_runJavaScriptConfirmPanelWithMessage_, proc4, "@:@@"); //$NON-NLS-1$
+		OS.class_addMethod(delegateClass, OS.sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_, proc5, "@:@@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_runOpenPanelForFileButtonWithResultListener_, proc4, "@:@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_mouseDidMoveOverElement_modifierFlags_, proc5, "@:@@I"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_printFrameView_, proc4, "@:@@"); //$NON-NLS-1$
@@ -173,6 +184,8 @@ public void create (Composite parent, int style) {
 		OS.class_addMethod(delegateClass, OS.sel_webView_setFrame_, setFrameProc, "@:@{NSRect}"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_webView_windowScriptObjectAvailable_, proc4, "@:@@"); //$NON-NLS-1$
 		OS.class_addMethod(delegateClass, OS.sel_callJava, proc5, "@:@@@"); //$NON-NLS-1$
+		OS.class_addMethod(delegateClass, OS.sel_callRunBeforeUnloadConfirmPanelWithMessage, proc4, "@:@@"); //$NON-NLS-1$
+		OS.class_addMethod(delegateClass, OS.sel_createPanelDidEnd, proc5, "@:@@@"); //$NON-NLS-1$
 		OS.objc_registerClassPair(delegateClass);
 
  		int /*long*/ metaClass = OS.objc_getMetaClass (className);
@@ -190,6 +203,9 @@ public void create (Composite parent, int style) {
 	if (webView == null) SWT.error(SWT.ERROR_NO_HANDLES);
 	webView.initWithFrame(browser.view.frame(), null, null);
 	webView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
+	if (webView.respondsToSelector(OS.sel__setDashboardBehavior)) {
+		OS.objc_msgSend(webView.id, OS.sel__setDashboardBehavior, 2, 1);
+	}
 	final SWTWebViewDelegate delegate = (SWTWebViewDelegate)new SWTWebViewDelegate().alloc().init();
 	Display display = browser.getDisplay();
 	display.setData(ADD_WIDGET_KEY, new Object[] {delegate, browser});
@@ -213,7 +229,15 @@ public void create (Composite parent, int style) {
 					browser.notifyListeners (e.type, e);
 					e.type = SWT.NONE;
 
-					e.display.setData(ADD_WIDGET_KEY, new Object[] {delegate, null});
+					/* Browser could have been disposed by one of the Dispose listeners */
+					if (!browser.isDisposed()) {
+						/* invoke onbeforeunload handlers */
+						if (!browser.isClosing) {
+							close (false);
+						}
+
+						e.display.setData(ADD_WIDGET_KEY, new Object[] {delegate, null});
+					}
 
 					Safari.this.webView.setFrameLoadDelegate(null);
 					Safari.this.webView.setResourceLoadDelegate(null);
@@ -242,8 +266,7 @@ public void create (Composite parent, int style) {
 		}
 	};
 	browser.addListener(SWT.Dispose, listener);
-	/* Needed to be able to tab into the browser */
-	browser.addListener(SWT.KeyDown, listener);
+	browser.addListener(SWT.KeyDown, listener); /* needed for tabbing into the Browser */
 	browser.addListener(SWT.FocusIn, listener);
 
 	webView.setFrameLoadDelegate(delegate);
@@ -258,6 +281,8 @@ public void create (Composite parent, int style) {
 		/* disable applets */
 		WebPreferences.standardPreferences().setJavaEnabled(false);
 	}
+
+	return true;
 }
 
 public boolean back() {
@@ -327,6 +352,8 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
 		safari.webView_printFrameView(arg0, arg1);
 	} else if (sel == OS.sel_webView_windowScriptObjectAvailable_) {
 		safari.webView_windowScriptObjectAvailable (arg0, arg1);
+	} else if (sel == OS.sel_callRunBeforeUnloadConfirmPanelWithMessage) {
+		return safari.callRunBeforeUnloadConfirmPanelWithMessage (arg0, arg1).id;
 	}
 	return 0;
 }
@@ -349,9 +376,17 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
 		safari.webView_mouseDidMoveOverElement_modifierFlags(arg0, arg1, arg2);
 	} else if (sel == OS.sel_webView_unableToImplementPolicyWithError_frame_) {
 		safari.webView_unableToImplementPolicyWithError_frame(arg0, arg1, arg2);
+	} else if (sel == OS.sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_) {
+		return safari.webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(arg0, arg1, arg2) ? 1 : 0;
+	} else if (sel == OS.sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_) {
+		safari.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
+	} else if (sel == OS.sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_) {
+		return safari.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
 	} else if (sel == OS.sel_callJava) {
-		id result = safari.callJava (arg0, arg1, arg2);
+		id result = safari.callJava(arg0, arg1, arg2);
 		return result == null ? 0 : result.id;
+	} else if (sel == OS.sel_createPanelDidEnd) {
+		safari.createPanelDidEnd(arg0, arg1, arg2);
 	}
 	return 0;
 }
@@ -385,18 +420,71 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
 }
 
 static boolean isSelectorExcludedFromWebScript (int /*long*/ aSelector) {
-	return aSelector != OS.sel_callJava;
+	return !(aSelector == OS.sel_callJava || aSelector == OS.sel_callRunBeforeUnloadConfirmPanelWithMessage);
 }
 
 static int /*long*/ webScriptNameForSelector (int /*long*/ aSelector) {
 	if (aSelector == OS.sel_callJava) {
 		return NSString.stringWith ("callJava").id; //$NON-NLS-1$
 	}
+	if (aSelector == OS.sel_callRunBeforeUnloadConfirmPanelWithMessage) {
+		return NSString.stringWith ("callRunBeforeUnloadConfirmPanelWithMessage").id; //$NON-NLS-1$
+	}
 	return 0;
 }
 
+public boolean close () {
+	return close (true);
+}
+
+boolean close (boolean showPrompters) {
+	if (!jsEnabled) return true;
+
+	String functionName = EXECUTE_ID + "CLOSE"; // $NON-NLS-1$
+	StringBuffer buffer = new StringBuffer ("function "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win) {\n"); // $NON-NLS-1$
+	buffer.append ("var fn = win.onbeforeunload; if (fn != null) {try {var str = fn(); "); // $NON-NLS-1$
+	if (showPrompters) {
+		buffer.append ("if (str != null) { "); // $NON-NLS-1$
+		buffer.append ("var result = window.external.callRunBeforeUnloadConfirmPanelWithMessage(str);"); // $NON-NLS-1$
+		buffer.append ("if (!result) return false;}"); // $NON-NLS-1$
+	}	
+	buffer.append ("} catch (e) {}}"); // $NON-NLS-1$
+	buffer.append ("try {for (var i = 0; i < win.frames.length; i++) {var result = "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win.frames[i]); if (!result) return false;}} catch (e) {} return true;"); // $NON-NLS-1$
+	buffer.append ("\n};"); // $NON-NLS-1$
+	execute (buffer.toString ());
+
+	Boolean result = (Boolean)evaluate ("return " + functionName +"(window);"); // $NON-NLS-1$ // $NON-NLS-2$
+	if (result == null) return false;
+	return result.booleanValue ();
+}
+
 public boolean execute (String script) {
-	return webView.stringByEvaluatingJavaScriptFromString (NSString.stringWith (script)) != null;
+	WebFrame frame = webView.mainFrame();
+	int /*long*/ context = frame.globalContext();
+
+	byte[] bytes = null;
+	try {
+		bytes = (script + '\0').getBytes("UTF-8"); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = (script + '\0').getBytes();
+	}
+	int /*long*/ scriptString = OS.JSStringCreateWithUTF8CString(bytes);
+
+	try {
+		bytes = (getUrl() + '\0').getBytes("UTF-8"); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = (getUrl() + '\0').getBytes();
+	}
+	int /*long*/ urlString = OS.JSStringCreateWithUTF8CString(bytes);
+
+	int /*long*/ result = OS.JSEvaluateScript(context, scriptString, 0, urlString, 0, null);
+	OS.JSStringRelease(urlString);
+	OS.JSStringRelease(scriptString);
+	return result != 0;
 }
 
 public boolean forward () {
@@ -405,7 +493,7 @@ public boolean forward () {
 }
 
 public String getBrowserType () {
-	return "safari"; //$NON-NLS-1$
+	return "webkit"; //$NON-NLS-1$
 }
 
 public String getText() {
@@ -420,6 +508,9 @@ public String getText() {
 }
 
 public String getUrl() {
+	/* WebKit auto-navigates to about:blank at startup */
+	if (url.length() == 0) return ABOUT_BLANK;
+
 	return url;
 }
 
@@ -432,33 +523,30 @@ public boolean isForwardEnabled() {
 }
 
 public void refresh() {
+	html = null;
 	webView.reload(null);
 }
 
-public boolean setText(String html) {
+public boolean setText(String html, boolean trusted) {
 	/*
-	* Bug in Safari.  The web view segment faults in some circumstances
-	* when the text changes during the location changing callback.  The
-	* fix is to defer the work until the callback is done. 
+	* If this.html is not null then the about:blank page is already being loaded,
+	* so no navigate is required.  Just set the html that is to be shown.
 	*/
-	if (changingLocation) {
-		this.html = html;
-	} else {
-		_setText(html);
-	}
-	return true;
-}
-	
-void _setText(String html) {	
-	NSString string = NSString.stringWith(html);
-	NSString URLString = NSString.stringWith(URI_FROMMEMORY);
-	NSURL URL = NSURL.URLWithString(URLString);
+	boolean blankLoading = this.html != null;
+	this.html = html;
+	untrustedText = !trusted;
+	if (blankLoading) return true;
+
+	NSURL inURL = NSURL.URLWithString(NSString.stringWith (ABOUT_BLANK));
+	NSURLRequest request = NSURLRequest.requestWithURL(inURL);
 	WebFrame mainFrame = webView.mainFrame();
-	mainFrame.loadHTMLString(string, URL);
+	mainFrame.loadRequest(request);
+	return true;
 }
 
-public boolean setUrl(String url) {
+public boolean setUrl(String url, String postData, String[] headers) {
 	html = null;
+	lastNavigateURL = url;
 
 	if (url.indexOf('/') == 0) {
 		url = PROTOCOL_FILE + url;
@@ -472,9 +560,40 @@ public boolean setUrl(String url) {
 	NSString escapedString = new NSString(ptr);
 	NSURL inURL = NSURL.URLWithString(escapedString);
 	OS.CFRelease(ptr);
-	NSURLRequest request = NSURLRequest.requestWithURL(inURL);
+	NSMutableURLRequest request = (NSMutableURLRequest)NSMutableURLRequest.requestWithURL(inURL);
+	if (postData != null) {
+		request.setHTTPMethod(NSString.stringWith(POST));
+		byte[] bytes = postData.getBytes();
+		NSData data = NSData.dataWithBytes(bytes, bytes.length);
+		request.setHTTPBody(data);
+	}
+	if (headers != null) {
+		for (int i = 0; i < headers.length; i++) {
+			String current = headers[i];
+			if (current != null) {
+				int index = current.indexOf(':');
+				if (index != -1) {
+					String key = current.substring(0, index).trim();
+					String value = current.substring(index + 1).trim();
+					if (key.length() > 0 && value.length() > 0) {
+						if (key.equalsIgnoreCase(USER_AGENT)) {
+							/*
+							* Feature of Safari.  The user-agent header value cannot be overridden
+							* here.  The workaround is to temporarily set the value on the WebView
+							* and then remove it after the loading of the request has begun.
+							*/
+							webView.setCustomUserAgent(NSString.stringWith(value));
+						} else {
+							request.setValue(NSString.stringWith(value), NSString.stringWith(key));						
+						}
+					}
+				}
+			}
+		}
+	}
 	WebFrame mainFrame = webView.mainFrame();
 	mainFrame.loadRequest(request);
+	webView.setCustomUserAgent(null);
 	return true;
 }
 
@@ -483,6 +602,10 @@ public void stop() {
 	webView.stopLoading(null);
 }
 
+boolean translateMnemonics() {
+	return false;
+}
+
 /* WebFrameLoadDelegate */
 
 void webView_didChangeLocationWithinPageForFrame(int /*long*/ sender, int /*long*/ frameID) {
@@ -498,7 +621,14 @@ void webView_didChangeLocationWithinPageForFrame(int /*long*/ sender, int /*long
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
 	final Display display = browser.getDisplay();
 	boolean top = frameID == webView.mainFrame().id;
@@ -542,104 +672,136 @@ void webView_didFailProvisionalLoadWithError_forFrame(int /*long*/ sender, int /
 
 	NSError nserror = new NSError(error);
 	int /*long*/ errorCode = nserror.code();
-	if (errorCode <= OS.NSURLErrorBadURL) {
-		NSString description = nserror.localizedDescription();
-		if (description != null) {
-			String descriptionString = description.getString();
-			String urlString = null;
-			NSDictionary info = nserror.userInfo();
-			if (info != null) {
-				NSString key = new NSString(OS.NSErrorFailingURLStringKey());
-				id id = info.valueForKey(key);
-				if (id != null) {
-					NSString url = new NSString(id);
-					urlString = url.getString();
+	if (OS.NSURLErrorBadURL < errorCode) return;
+
+	NSURL failingURL = null;
+	NSDictionary info = nserror.userInfo();
+	if (info != null) {
+		id id = info.valueForKey(NSString.stringWith("NSErrorFailingURLKey")); //$NON-NLS-1$
+		if (id != null) failingURL = new NSURL(id);
+	}
+
+	if (failingURL != null && OS.NSURLErrorServerCertificateNotYetValid <= errorCode && errorCode <= OS.NSURLErrorSecureConnectionFailed) {
+		/* handle invalid certificate error */
+		id certificates = info.objectForKey(NSString.stringWith("NSErrorPeerCertificateChainKey")); //$NON-NLS-1$
+
+		int /*long*/[] policySearch = new int /*long*/[1];
+		int /*long*/[] policyRef = new int /*long*/[1];
+		int /*long*/[] trustRef = new int /*long*/[1];
+		boolean success = false;
+		int result = OS.SecPolicySearchCreate(OS.CSSM_CERT_X_509v3, 0, 0, policySearch);
+		if (result == 0 && policySearch[0] != 0) {
+			result = OS.SecPolicySearchCopyNext(policySearch[0], policyRef);
+			if (result == 0 && policyRef[0] != 0) {
+				result = OS.SecTrustCreateWithCertificates(certificates.id, policyRef[0], trustRef);
+				if (result == 0 && trustRef[0] != 0) {
+					SFCertificateTrustPanel panel = SFCertificateTrustPanel.sharedCertificateTrustPanel();
+					String failingUrlString = failingURL.absoluteString().getString();
+					String message = Compatibility.getMessage("SWT_InvalidCert_Message", new Object[] {failingUrlString}); //$NON-NLS-1$
+					panel.setAlternateButtonTitle(NSString.stringWith(Compatibility.getMessage("SWT_Cancel"))); //$NON-NLS-1$
+					panel.setShowsHelp(true);
+					failingURL.retain();
+					NSWindow window = browser.getShell().view.window();
+					panel.beginSheetForWindow(window, delegate, OS.sel_createPanelDidEnd, failingURL.id, trustRef[0], NSString.stringWith(message));
+					success = true;
 				}
 			}
-			String message = urlString != null ? urlString + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
-			message += Compatibility.getMessage ("SWT_Page_Load_Failed", new Object[] {descriptionString}); //$NON-NLS-1$
-			MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.ICON_ERROR);
-			messageBox.setMessage(message);
-			messageBox.open();
 		}
+
+		if (trustRef[0] != 0) OS.CFRelease(trustRef[0]);
+		if (policyRef[0] != 0) OS.CFRelease(policyRef[0]);
+		if (policySearch[0] != 0) OS.CFRelease(policySearch[0]);
+		if (success) return;
+	}
+
+	/* handle other types of errors */
+	NSString description = nserror.localizedDescription();
+	if (description != null) {
+		String descriptionString = description.getString();
+		String message = failingURL != null ? failingURL.absoluteString().getString() + "\n\n" : ""; //$NON-NLS-1$ //$NON-NLS-2$
+		message += Compatibility.getMessage ("SWT_Page_Load_Failed", new Object[] {descriptionString}); //$NON-NLS-1$
+		MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.ICON_ERROR);
+		messageBox.setMessage(message);
+		messageBox.open();
+	}
+}
+
+void createPanelDidEnd(int /*long*/ sheet, int /*long*/ returnCode, int /*long*/ contextInfo) {
+	NSURL failingURL = new NSURL(contextInfo);
+	failingURL.autorelease();
+	if (returnCode != OS.NSFileHandlingPanelOKButton) return;	/* nothing more to do */
+
+	int /*long*/ method = OS.class_getClassMethod(OS.class_NSURLRequest, OS.sel_setAllowsAnyHTTPSCertificate);
+	if (method != 0) {
+		OS.objc_msgSend(OS.class_NSURLRequest, OS.sel_setAllowsAnyHTTPSCertificate, 1, failingURL.host().id);
+		setUrl(failingURL.absoluteString().getString(), null, null);
 	}
 }
 
 void webView_didFinishLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
-	hookDOMMouseListeners(frameID);
 	if (frameID == webView.mainFrame().id) {
-		hookDOMKeyListeners(frameID);
-
-		final Display display = browser.getDisplay();
 		/*
-		* To be consistent with other platforms a title event should be fired when a
-		* page has completed loading.  A page with a <title> tag will do this
-		* automatically when the didReceiveTitle callback is received.  However a page
-		* without a <title> tag will not do this by default, so fire the event
-		* here with the page's url as the title.
-		*/
-		WebFrame frame = new WebFrame(frameID);
-		WebDataSource dataSource = frame.dataSource();
-		if (dataSource != null) {
-			NSString title = dataSource.pageTitle();
-			if (title == null) {	/* page has no title */
-				final TitleEvent newEvent = new TitleEvent(browser);
-				newEvent.display = display;
-				newEvent.widget = browser;
-				newEvent.title = url;
-				for (int i = 0; i < titleListeners.length; i++) {
-					final TitleListener listener = titleListeners[i];
-					/*
-					* Note on WebKit.  Running the event loop from a Browser
-					* delegate callback breaks the WebKit (stop loading or
-					* crash).  The workaround is to invoke Display.asyncExec()
-					* so that the Browser does not crash if this is attempted.
-					*/
-					display.asyncExec(
-						new Runnable() {
-							public void run() {
-								if (!display.isDisposed() && !browser.isDisposed()) {
-									listener.changed(newEvent);
-								}
-							}
-						}
-					);
+		 * If html is not null then there is html from a previous setText() call
+		 * waiting to be set into the about:blank page once it has completed loading. 
+		 */
+		if (html != null) {
+			if (getUrl().startsWith(ABOUT_BLANK)) {
+				loadingText = true;
+				NSString string = NSString.stringWith(html);
+				NSString URLString;
+				if (untrustedText) {
+					URLString = NSString.stringWith(ABOUT_BLANK);
+				} else {
+					URLString = NSString.stringWith(URI_FILEROOT);
 				}
+				NSURL URL = NSURL.URLWithString(URLString);
+				WebFrame mainFrame = webView.mainFrame();
+				mainFrame.loadHTMLString(string, URL);
+				html = null;
 			}
 		}
-		final ProgressEvent progress = new ProgressEvent(browser);
-		progress.display = display;
-		progress.widget = browser;
-		progress.current = MAX_PROGRESS;
-		progress.total = MAX_PROGRESS;
-		for (int i = 0; i < progressListeners.length; i++) {
-			final ProgressListener listener = progressListeners[i];
+
+		/*
+		* The loadHTMLString() invocation above will trigger a second webView_didFinishLoadForFrame
+		* callback when it is completed.  If text was just set into the browser then wait for this
+		* second callback to come before sending the title or completed events.
+		*/
+		if (!loadingText) {
 			/*
-			* Note on WebKit.  Running the event loop from a Browser
-			* delegate callback breaks the WebKit (stop loading or
-			* crash).  The ProgressBar widget currently touches the
-			* event loop every time the method setSelection is called.  
-			* The workaround is to invoke Display.asyncExec() so that
-			* the Browser does not crash when the user updates the 
-			* selection of the ProgressBar.
+			* To be consistent with other platforms a title event should be fired when a
+			* page has completed loading.  A page with a <title> tag will do this
+			* automatically when the didReceiveTitle callback is received.  However a page
+			* without a <title> tag will not do this by default, so fire the event
+			* here with the page's url as the title.
 			*/
-			display.asyncExec(
-				new Runnable() {
-					public void run() {
-						if (!display.isDisposed() && !browser.isDisposed()) {
-							listener.completed(progress);
-						}
+			Display display = browser.getDisplay();
+			WebFrame frame = new WebFrame(frameID);
+			WebDataSource dataSource = frame.dataSource();
+			if (dataSource != null) {
+				NSString title = dataSource.pageTitle();
+				if (title == null) {	/* page has no title */
+					TitleEvent newEvent = new TitleEvent(browser);
+					newEvent.display = display;
+					newEvent.widget = browser;
+					newEvent.title = getUrl();
+					for (int i = 0; i < titleListeners.length; i++) {
+						titleListeners[i].changed(newEvent);
 					}
+					if (browser.isDisposed()) return;
 				}
-			);
-		}
+			}
 
-		/* re-install registered functions */
-		Enumeration elements = functions.elements ();
-		while (elements.hasMoreElements ()) {
-			BrowserFunction function = (BrowserFunction)elements.nextElement ();
-			execute (function.functionString);
+			ProgressEvent progress = new ProgressEvent(browser);
+			progress.display = display;
+			progress.widget = browser;
+			progress.current = MAX_PROGRESS;
+			progress.total = MAX_PROGRESS;
+			for (int i = 0; i < progressListeners.length; i++) {
+				progressListeners[i].completed(progress);
+			}
 		}
+		loadingText = false;
+		if (browser.isDisposed()) return;
 
 		/*
 		* Feature on Safari.  The identifier is used here as a marker for the events 
@@ -728,40 +890,47 @@ void webView_didCommitLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
-	final Display display = browser.getDisplay();
+	Display display = browser.getDisplay();
 	boolean top = frameID == webView.mainFrame().id;
 	if (top) {
 		/* reset resource status variables */
 		resourceCount = 0;		
 		this.url = url2;
 
-		final ProgressEvent progress = new ProgressEvent(browser);
+		/*
+		* Each invocation of setText() causes webView_didCommitLoadForFrame to be invoked
+		* twice, once for the initial navigate to about:blank, and once for the auto-navigate
+		* to about:blank that Safari does when loadHTMLString is invoked.  If this is the
+		* first webView_didCommitLoadForFrame callback received for a setText() invocation
+		* then do not send any events or re-install registered BrowserFunctions. 
+		*/
+		if (url2.startsWith(ABOUT_BLANK) && html != null) return;
+
+		/* re-install registered functions */
+		Enumeration elements = functions.elements ();
+		while (elements.hasMoreElements ()) {
+			BrowserFunction function = (BrowserFunction)elements.nextElement ();
+			execute (function.functionString);
+		}
+
+		ProgressEvent progress = new ProgressEvent(browser);
 		progress.display = display;
 		progress.widget = browser;
 		progress.current = 1;
 		progress.total = MAX_PROGRESS;
 		for (int i = 0; i < progressListeners.length; i++) {
-			final ProgressListener listener = progressListeners[i];
-			/*
-			* Note on WebKit.  Running the event loop from a Browser
-			* delegate callback breaks the WebKit (stop loading or
-			* crash).  The widget ProgressBar currently touches the
-			* event loop every time the method setSelection is called.  
-			* The workaround is to invoke Display.asyncexec so that
-			* the Browser does not crash when the user updates the 
-			* selection of the ProgressBar.
-			*/
-			display.asyncExec(
-				new Runnable() {
-					public void run() {
-						if (!display.isDisposed() && !browser.isDisposed())
-							listener.changed(progress);
-					}
-				}
-			);
+			progressListeners[i].changed(progress);
 		}
+		if (browser.isDisposed()) return;
 
 		StatusTextEvent statusText = new StatusTextEvent(browser);
 		statusText.display = display;
@@ -770,7 +939,13 @@ void webView_didCommitLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
 		for (int i = 0; i < statusTextListeners.length; i++) {
 			statusTextListeners[i].changed(statusText);
 		}
+		if (browser.isDisposed()) return;
+
+		hookDOMKeyListeners(frameID);
 	}
+
+	hookDOMMouseListeners(frameID);
+
 	LocationEvent location = new LocationEvent(browser);
 	location.display = display;
 	location.widget = browser;
@@ -966,32 +1141,15 @@ boolean showAuthenticationDialog (final String[] user, final String[] password,
 }
 
 int /*long*/ webView_identifierForInitialRequest_fromDataSource(int /*long*/ sender, int /*long*/ request, int /*long*/ dataSourceID) {
-	final Display display = browser.getDisplay();
-	final ProgressEvent progress = new ProgressEvent(browser);
-	progress.display = display;
+	ProgressEvent progress = new ProgressEvent(browser);
+	progress.display = browser.getDisplay();
 	progress.widget = browser;
 	progress.current = resourceCount;
 	progress.total = Math.max(resourceCount, MAX_PROGRESS);
 	for (int i = 0; i < progressListeners.length; i++) {
-		final ProgressListener listener = progressListeners[i];
-		/*
-		* Note on WebKit.  Running the event loop from a Browser
-		* delegate callback breaks the WebKit (stop loading or
-		* crash).  The widget ProgressBar currently touches the
-		* event loop every time the method setSelection is called.  
-		* The workaround is to invoke Display.asyncexec so that
-		* the Browser does not crash when the user updates the 
-		* selection of the ProgressBar.
-		*/
-		display.asyncExec(
-			new Runnable() {
-				public void run() {
-					if (!display.isDisposed() && !browser.isDisposed())
-						listener.changed(progress);
-				}
-			}
-		);
+		progressListeners[i].changed(progress);
 	}
+	if (browser.isDisposed()) return 0;
 
 	NSNumber identifier = NSNumber.numberWithInt(resourceCount++);
 	if (this.identifier == 0) {
@@ -1067,9 +1225,9 @@ void webViewShow(int /*long*/ sender) {
 	* the address bar.  The address bar is displayed
 	* if the tool bar is displayed. There is no separate
 	* notification for the address bar.
-	* Feature in Safari.  The menu bar is always
-	* displayed. There is no notification to hide
-	* the menu bar.
+	* 
+	* Feature of OSX.  The menu bar is always displayed.
+	* There is no notification to hide the menu bar.
 	*/
 	newEvent.addressBar = toolBar;
 	newEvent.menuBar = true;
@@ -1097,6 +1255,23 @@ void webViewFocus(int /*long*/ sender) {
 void webViewUnfocus(int /*long*/ sender) {
 }
 
+NSNumber callRunBeforeUnloadConfirmPanelWithMessage(int /*long*/ messageID, int /*long*/ arg) {
+	boolean result = webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame (0, messageID, 0);
+	return NSNumber.numberWithBool (result);
+}
+
+boolean webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(int /*long*/ sender, int /*long*/ messageID, int /*long*/ frame) {
+	NSString message = new NSString(messageID);
+	StringBuffer text = new StringBuffer(Compatibility.getMessage("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
+	text.append("\n\n"); //$NON-NLS-1$
+	text.append(message.getString());
+	text.append("\n\n"); //$NON-NLS-1$
+	text.append(Compatibility.getMessage("SWT_OnBeforeUnload_Message2")); //$NON-NLS-1$
+	MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION | SWT.SHEET);
+	messageBox.setMessage(text.toString());
+	return messageBox.open() == SWT.OK;
+}
+
 void webView_runJavaScriptAlertPanelWithMessage(int /*long*/ sender, int /*long*/ messageID) {
 	NSString message = new NSString(messageID);
 	String text = message.getString();
@@ -1265,18 +1440,40 @@ void webView_decidePolicyForMIMEType_request_frame_decisionListener(int /*long*/
 void webView_decidePolicyForNavigationAction_request_frame_decisionListener(int /*long*/ sender, int /*long*/ actionInformation, int /*long*/ request, int /*long*/ frame, int /*long*/ listenerID) {
 	NSURL url = new NSURLRequest(request).URL();
 	WebPolicyDecisionListener listener = new WebPolicyDecisionListener(listenerID);
+
+	if (loadingText) {
+		/* 
+		 * Safari is auto-navigating to about:blank in response to a loadHTMLString()
+		 * invocation.  This navigate should always proceed without sending an event
+		 * since it is preceded by an explicit navigate to about:blank in setText().
+		 */
+		listener.use();
+		return;
+	}
 	if (url == null) {
 		/* indicates that a URL with an invalid format was specified */
 		listener.ignore();
 		return;
 	}
+	if (url.isFileURL() && getUrl().startsWith(ABOUT_BLANK) && untrustedText) {
+		/* indicates an attempt to access the local file system from untrusted content */
+		listener.ignore();
+		return;
+	}
 	NSString s = url.absoluteString();
 	String url2 = s.getString();
 	/*
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (url2.equals (URI_FROMMEMORY)) url2 = ABOUT_BLANK;
+	if (url2.equals (URI_FILEROOT)) {
+		url2 = ABOUT_BLANK;
+	} else {
+		int length = URI_FILEROOT.length ();
+		if (url2.startsWith (URI_FILEROOT) && url2.charAt (length) == '#') {
+			url2 = ABOUT_BLANK + url2.substring (length);
+		}
+	}
 
 	LocationEvent newEvent = new LocationEvent(browser);
 	newEvent.display = browser.getDisplay();
@@ -1284,11 +1481,9 @@ void webView_decidePolicyForNavigationAction_request_frame_decisionListener(int
 	newEvent.location = url2;
 	newEvent.doit = true;
 	if (locationListeners != null) {
-		changingLocation = true;
 		for (int i = 0; i < locationListeners.length; i++) {
 			locationListeners[i].changing(newEvent);
 		}
-		changingLocation = false;
 	}
 	if (newEvent.doit) {
 		if (jsEnabledChanged) {
@@ -1304,11 +1499,6 @@ void webView_decidePolicyForNavigationAction_request_frame_decisionListener(int
 	} else {
 		listener.ignore();
 	}
-	if (html != null && !browser.isDisposed()) {
-		String html = this.html;
-		this.html = null;
-		_setText(html);
-	}
 }
 
 void webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(int /*long*/ sender, int /*long*/ actionInformation, int /*long*/ request, int /*long*/ frameName, int /*long*/ listenerID) {
@@ -1362,8 +1552,15 @@ void handleEvent(int /*long*/ evtId) {
 		keyEvent.character = (char)charCode;
 		int stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 		keyEvent.stateMask = stateMask;
-		browser.notifyListeners(keyEvent.type, keyEvent);
-		if (!keyEvent.doit) {
+
+		boolean doit = true;
+		if (keyEvent.type == SWT.KeyDown) {
+			doit = sendKeyEvent(keyEvent);
+		} else {
+			browser.notifyListeners(keyEvent.type, keyEvent);
+			doit = keyEvent.doit;
+		}
+		if (!doit) {
 			event.preventDefault();
 		} else {
 			if (eventType == SWT.KeyDown && stateMask == SWT.COMMAND) {
@@ -1381,8 +1578,18 @@ void handleEvent(int /*long*/ evtId) {
 
 	if (DOMEVENT_MOUSEWHEEL.equals(type)) {
 		DOMWheelEvent event = new DOMWheelEvent(evtId);
-		int clientX = event.clientX();
-		int clientY = event.clientY();
+
+		/*
+		 * The position of mouse events is received in screen-relative coordinates
+		 * in order to handle pages with frames, since frames express their event
+		 * coordinates relative to themselves rather than relative to their top-
+		 * level page.  Convert screen-relative coordinates to be browser-relative.
+		 */
+		int screenX = event.screenX();
+		int screenY = event.screenY();
+		Point position = new Point(screenX, screenY);
+		position = browser.getDisplay().map(null, browser, position);
+
 		int delta = event.wheelDelta();
 		boolean ctrl = event.ctrlKey();
 		boolean shift = event.shiftKey();
@@ -1391,7 +1598,7 @@ void handleEvent(int /*long*/ evtId) {
 		Event mouseEvent = new Event();
 		mouseEvent.type = SWT.MouseWheel;
 		mouseEvent.widget = browser;
-		mouseEvent.x = clientX; mouseEvent.y = clientY;
+		mouseEvent.x = position.x; mouseEvent.y = position.y;
 		mouseEvent.count = delta / 120;
 		mouseEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 		browser.notifyListeners (mouseEvent.type, mouseEvent);
@@ -1402,8 +1609,17 @@ void handleEvent(int /*long*/ evtId) {
 
 	DOMMouseEvent event = new DOMMouseEvent(evtId);
 
-	int clientX = event.clientX();
-	int clientY = event.clientY();
+	/*
+	 * The position of mouse events is received in screen-relative coordinates
+	 * in order to handle pages with frames, since frames express their event
+	 * coordinates relative to themselves rather than relative to their top-
+	 * level page.  Convert screen-relative coordinates to be browser-relative.
+	 */
+	int screenX = event.screenX();
+	int screenY = event.screenY();
+	Point position = new Point(screenX, screenY);
+	position = browser.getDisplay().map(null, browser, position);
+
 	int detail = event.detail();
 	int button = event.button();
 	boolean ctrl = event.ctrlKey();
@@ -1413,7 +1629,7 @@ void handleEvent(int /*long*/ evtId) {
 
 	Event mouseEvent = new Event ();
 	mouseEvent.widget = browser;
-	mouseEvent.x = clientX; mouseEvent.y = clientY;
+	mouseEvent.x = position.x; mouseEvent.y = position.y;
 	mouseEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 	if (DOMEVENT_MOUSEDOWN.equals (type)) {
 		mouseEvent.type = SWT.MouseDown;
@@ -1445,7 +1661,7 @@ void handleEvent(int /*long*/ evtId) {
 	if (detail == 2 && DOMEVENT_MOUSEDOWN.equals (type)) {
 		mouseEvent = new Event ();
 		mouseEvent.widget = browser;
-		mouseEvent.x = clientX; mouseEvent.y = clientY;
+		mouseEvent.x = position.x; mouseEvent.y = position.y;
 		mouseEvent.stateMask = (alt ? SWT.ALT : 0) | (ctrl ? SWT.CTRL : 0) | (shift ? SWT.SHIFT : 0) | (meta ? SWT.COMMAND : 0);
 		mouseEvent.type = SWT.MouseDoubleClick;
 		mouseEvent.button = button + 1;
@@ -1518,14 +1734,12 @@ NSObject convertToJS (Object value) {
 	if (value instanceof Object[]) {
 		Object[] arrayValue = (Object[]) value;
 		int length = arrayValue.length;
-		if (length > 0) {
-			NSMutableArray array = NSMutableArray.arrayWithCapacity (length);
-			for (int i = 0; i < length; i++) {
-				Object currentObject = arrayValue[i];
-				array.addObject (convertToJS (currentObject));
-			}
-			return array;
+		NSMutableArray array = NSMutableArray.arrayWithCapacity (length);
+		for (int i = 0; i < length; i++) {
+			Object currentObject = arrayValue[i];
+			array.addObject (convertToJS (currentObject));
 		}
+		return array;
 	}
 	SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
 	return null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
index 05fcc05..88c8297 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,9 +42,11 @@ import org.eclipse.swt.widgets.*;
 public class Browser extends Composite {
 	WebBrowser webBrowser;
 	int userStyle;
+	boolean isClosing;
 
-	static final String PACKAGE_PREFIX = "org.eclipse.swt.browser."; //$NON-NLS-1$
 	static final String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod"; //$NON-NLS-1$
+	static final String PACKAGE_PREFIX = "org.eclipse.swt.browser."; //$NON-NLS-1$
+	static final String PROPERTY_USEWEBKITGTK = "org.eclipse.swt.browser.UseWebKitGTK"; //$NON-NLS-1$
 
 /**
  * Constructs a new instance of this class given its parent
@@ -83,40 +85,46 @@ public Browser (Composite parent, int style) {
 	String platform = SWT.getPlatform ();
 	Display display = parent.getDisplay ();
 	if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$
-	String className = null;
+	String classNames[] = null;
 	if ((style & SWT.MOZILLA) != 0) {
-		className = "org.eclipse.swt.browser.Mozilla"; //$NON-NLS-1$
+		classNames = new String[] {"org.eclipse.swt.browser.Mozilla"}; //$NON-NLS-1$
 	} else {
 		if ("win32".equals (platform) || "wpf".equals (platform)) { //$NON-NLS-1$ $NON-NLS-2$
-			className = "org.eclipse.swt.browser.IE"; //$NON-NLS-1$
+			classNames = new String[] {"org.eclipse.swt.browser.IE"}; //$NON-NLS-1$
 		} else if ("motif".equals (platform)) { //$NON-NLS-1$
-			className = "org.eclipse.swt.browser.Mozilla"; //$NON-NLS-1$
+			classNames = new String[] {"org.eclipse.swt.browser.Mozilla"}; //$NON-NLS-1$
 		} else if ("gtk".equals (platform)) { //$NON-NLS-1$
-			className = "org.eclipse.swt.browser.Mozilla"; //$NON-NLS-1$
+			String property = System.getProperty (PROPERTY_USEWEBKITGTK);
+			if (property != null && property.equalsIgnoreCase ("true")) { //$NON-NLS-1$
+				classNames = new String[] {"org.eclipse.swt.browser.WebKit", "org.eclipse.swt.browser.Mozilla"}; //$NON-NLS-1$ //$NON-NLS-2$
+			} else {
+				classNames = new String[] {"org.eclipse.swt.browser.Mozilla"}; //$NON-NLS-1$
+			}
 		} else if ("carbon".equals (platform) || "cocoa".equals (platform)) { //$NON-NLS-1$
-			className = "org.eclipse.swt.browser.Safari"; //$NON-NLS-1$
+			classNames = new String[] {"org.eclipse.swt.browser.Safari"}; //$NON-NLS-1$
 		} else if ("photon".equals (platform)) { //$NON-NLS-1$
-			className = "org.eclipse.swt.browser.Voyager"; //$NON-NLS-1$
+			classNames = new String[] {"org.eclipse.swt.browser.Voyager"}; //$NON-NLS-1$
 		} else {
 			dispose ();
 			SWT.error (SWT.ERROR_NO_HANDLES);
 		}
 	}
 
-	try {
-		Class clazz = Class.forName (className);
-		webBrowser = (WebBrowser)clazz.newInstance ();
-	} catch (ClassNotFoundException e) {
-	} catch (IllegalAccessException e) {
-	} catch (InstantiationException e) {
-	}
-	if (webBrowser == null) {
-		dispose ();
-		SWT.error (SWT.ERROR_NO_HANDLES);
+	for (int i = 0; i < classNames.length; i++) {
+		try {
+			Class clazz = Class.forName (classNames[i]);
+			webBrowser = (WebBrowser)clazz.newInstance ();
+			if (webBrowser != null) {
+				webBrowser.setBrowser (this);
+				if (webBrowser.create (parent, style)) return;
+			}
+		} catch (ClassNotFoundException e) {
+		} catch (IllegalAccessException e) {
+		} catch (InstantiationException e) {
+		}
 	}
-
-	webBrowser.setBrowser (this);
-	webBrowser.create (parent, style);
+	dispose ();
+	SWT.error (SWT.ERROR_NO_HANDLES);
 }
 
 static Composite checkParent (Composite parent) {
@@ -198,7 +206,7 @@ public static String getCookie (String name, String url) {
  * Sets a cookie on a URL.  Note that cookies are shared amongst all Browser instances.
  * 
  * The <code>value</code> parameter must be a cookie header string that
- * complies with <a href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</code>.
+ * complies with <a href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</a>.
  * The value is passed through to the native browser unchanged.
  * <p>
  * Example value strings:
@@ -221,7 +229,7 @@ public static String getCookie (String name, String url) {
 public static boolean setCookie (String value, String url) {
 	if (value == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	if (url == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	return WebBrowser.SetCookie (value, url);
+	return WebBrowser.SetCookie (value, url, true);
 }
 
 /**	 
@@ -491,6 +499,33 @@ public boolean execute (String script) {
 }
 
 /**
+ * Attempts to dispose the receiver, but allows the dispose to be vetoed
+ * by the user in response to an <code>onbeforeunload</code> listener
+ * in the Browser's current page.
+ *
+ * @return <code>true</code> if the receiver was disposed, and <code>false</code> otherwise
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @see #dispose()
+ * 
+ * @since 3.6
+ */
+public boolean close () {
+	checkWidget();
+	if (webBrowser.close ()) {
+		isClosing = true;
+		dispose ();
+		isClosing = false;
+		return true;
+	}
+	return false;
+}
+
+/**
  * Returns the result, if any, of executing the specified script.
  * <p>
  * Evaluates a script containing javascript commands in the context of
@@ -560,7 +595,7 @@ public boolean forward () {
 
 /**
  * Returns the type of native browser being used by this instance.
- * Examples: "mozilla", "ie", "safari", "voyager"
+ * Examples: "ie", "mozilla", "voyager", "webkit"
  *
  * @return the type of the native browser
  * 
@@ -920,9 +955,10 @@ public void setJavascriptEnabled (boolean enabled) {
 
 /**
  * Renders a string containing HTML.  The rendering of the content occurs asynchronously.
- * 
+ * The rendered page will be given trusted permissions; to render the page with untrusted
+ * permissions use <code>setText(String html, boolean trusted)</code> instead.   
  * <p>
- * The html parameter is Unicode encoded since it is a java <code>String</code>.
+ * The html parameter is Unicode-encoded since it is a java <code>String</code>.
  * As a result, the HTML meta tag charset should not be set. The charset is implied
  * by the <code>String</code> itself.
  * 
@@ -939,14 +975,56 @@ public void setJavascriptEnabled (boolean enabled) {
  *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
  * </ul>
  *  
+ * @see #setText(String,boolean)
  * @see #setUrl
  * 
  * @since 3.0
  */
 public boolean setText (String html) {
 	checkWidget();
+	return setText (html, true);
+}
+
+/**
+ * Renders a string containing HTML.  The rendering of the content occurs asynchronously.
+ * The rendered page can be given either trusted or untrusted permissions. 
+ * <p>
+ * The <code>html</code> parameter is Unicode-encoded since it is a java <code>String</code>.
+ * As a result, the HTML meta tag charset should not be set. The charset is implied
+ * by the <code>String</code> itself.
+ * <p>
+ * The <code>trusted</code> parameter affects the permissions that will be granted to the rendered
+ * page.  Specifying <code>true</code> for trusted gives the page permissions equivalent
+ * to a page on the local file system, while specifying <code>false</code> for trusted
+ * gives the page permissions equivalent to a page from the internet.  Page content should
+ * be specified as trusted if the invoker created it or trusts its source, since this would
+ * allow (for instance) style sheets on the local file system to be referenced.  Page 
+ * content should be specified as untrusted if its source is not trusted or is not known.
+ * 
+ * @param html the HTML content to be rendered
+ * @param trusted <code>false</code> if the rendered page should be granted restricted
+ * permissions and <code>true</code> otherwise
+ *
+ * @return <code>true</code> if the operation was successful and <code>false</code> otherwise.
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the html is null</li>
+ * </ul>
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
+ *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
+ * </ul>
+ *
+ * @see #setText(String)
+ * @see #setUrl
+ * 
+ * @since 3.6
+ */
+public boolean setText (String html, boolean trusted) {
+	checkWidget();
 	if (html == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	return webBrowser.setText (html);
+	return webBrowser.setText (html, trusted);
 }
 
 /**
@@ -966,13 +1044,45 @@ public boolean setText (String html) {
  * </ul>
  *  
  * @see #getUrl
+ * @see #setUrl(String,String,String[])
  * 
  * @since 3.0
  */
 public boolean setUrl (String url) {
 	checkWidget();
+	return setUrl (url, null, null);
+}
+
+/**
+ * Begins loading a URL.  The loading of its content occurs asynchronously.
+ * <p>
+ * If the URL causes an HTTP request to be initiated then the provided
+ * <code>postData</code> and <code>header</code> arguments, if any, are
+ * sent with the request.  A value in the <code>headers</code> argument
+ * must be a name-value pair with a colon separator in order to be sent
+ * (for example: "<code>user-agent: custom</code>").
+ * 
+ * @param url the URL to be loaded
+ * @param postData post data to be sent with the request, or <code>null</code>
+ * @param headers header lines to be sent with the request, or <code>null</code> 
+ *
+ * @return <code>true</code> if the operation was successful and <code>false</code> otherwise.
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the url is null</li>
+ * </ul>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
+ *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public boolean setUrl (String url, String postData, String[] headers) {
+	checkWidget();
 	if (url == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	return webBrowser.setUrl (url);
+	return webBrowser.setUrl (url, postData, headers);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
index ea8ef4b..8b93b11 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,13 +26,15 @@ abstract class WebBrowser {
 	StatusTextListener[] statusTextListeners = new StatusTextListener[0];
 	TitleListener[] titleListeners = new TitleListener[0];
 	VisibilityWindowListener[] visibilityWindowListeners = new VisibilityWindowListener[0];
-	boolean jsEnabled = true;
-	boolean jsEnabledChanged;
+	boolean jsEnabledChanged, jsEnabled = true;
 	int nextFunctionIndex = 1;
 	Object evaluateResult;
 
 	static final String ERROR_ID = "org.eclipse.swt.browser.error"; // $NON-NLS-1$
 	static final String EXECUTE_ID = "SWTExecuteTemporaryFunction"; // $NON-NLS-1$
+
+	static Vector NativePendingCookies = new Vector ();
+	static Vector MozillaPendingCookies = new Vector ();
 	static String CookieName, CookieValue, CookieUrl;
 	static boolean CookieResult;
 	static Runnable MozillaClearSessions, NativeClearSessions;
@@ -169,7 +171,7 @@ abstract class WebBrowser {
 		{19,	SWT.PAUSE},
 		{3,		SWT.BREAK},
 
-		/* Safari-specific */
+		/* WebKit/Safari-specific */
 		{186,	';'},
 		{187,	'='},
 		{189,	'-'},
@@ -261,24 +263,44 @@ public static void clearSessions () {
 }
 
 public static String GetCookie (String name, String url) {
-	CookieName = name; CookieUrl = url;
+	CookieName = name; CookieUrl = url; CookieValue = null;
 	if (NativeGetCookie != null) NativeGetCookie.run ();
-	if (MozillaGetCookie != null) MozillaGetCookie.run ();
+	if (CookieValue == null && MozillaGetCookie != null) MozillaGetCookie.run ();
 	String result = CookieValue;
 	CookieName = CookieValue = CookieUrl = null;
 	return result;
 }
 
-public static boolean SetCookie (String value, String url) {
+public static boolean SetCookie (String value, String url, boolean addToPending) {
 	CookieValue = value; CookieUrl = url;
 	CookieResult = false;
-	if (NativeSetCookie != null) NativeSetCookie.run ();
-	if (MozillaSetCookie != null) MozillaSetCookie.run ();
+	if (NativeSetCookie != null) {
+		NativeSetCookie.run ();
+	} else {
+		if (addToPending && NativePendingCookies != null) {
+			NativePendingCookies.add (new String[] {value, url});
+		}
+	}
+	if (MozillaSetCookie != null) {
+		MozillaSetCookie.run ();
+	} else {
+		if (addToPending && MozillaPendingCookies != null) {
+			MozillaPendingCookies.add (new String[] {value, url});
+		}
+	}
 	CookieValue = CookieUrl = null;
 	return CookieResult;
 }
 
-public abstract void create (Composite parent, int style);
+static void SetPendingCookies (Vector pendingCookies) {
+	Enumeration elements = pendingCookies.elements ();
+	while (elements.hasMoreElements ()) {
+		String[] current = (String[])elements.nextElement ();
+		SetCookie (current[0], current[1], false);
+	}
+}
+
+public abstract boolean create (Composite parent, int style);
 
 static String CreateErrorString (String error) {
 	return ERROR_ID + error;
@@ -288,6 +310,10 @@ static String ExtractError (String error) {
 	return error.substring (ERROR_ID.length ());
 }
 
+public boolean close () {
+	return true;
+}
+
 public void createFunction (BrowserFunction function) {
 	/* 
 	 * If an existing function with the same name is found then
@@ -579,13 +605,83 @@ public void removeVisibilityWindowListener (VisibilityWindowListener listener) {
 	visibilityWindowListeners = newVisibilityWindowListeners;
 }
 
+boolean sendKeyEvent (Event event) {
+	int traversal = SWT.TRAVERSE_NONE;
+	boolean traverseDoit = true;
+	switch (event.keyCode) {
+		case SWT.ESC: {
+			traversal = SWT.TRAVERSE_ESCAPE;
+			traverseDoit = true;
+			break;
+		}
+		case SWT.CR: {
+			traversal = SWT.TRAVERSE_RETURN;
+			traverseDoit = false;
+			break;
+		}
+		case SWT.ARROW_DOWN:
+		case SWT.ARROW_RIGHT: {
+			traversal = SWT.TRAVERSE_ARROW_NEXT;
+			traverseDoit = false;
+			break;
+		}
+		case SWT.ARROW_UP:
+		case SWT.ARROW_LEFT: {
+			traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+			traverseDoit = false;
+			break;
+		}
+		case SWT.TAB: {
+			traversal = (event.stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+			traverseDoit = (event.stateMask & SWT.CTRL) != 0;
+			break;
+		}
+		case SWT.PAGE_DOWN: {
+			if ((event.stateMask & SWT.CTRL) != 0) {
+				traversal = SWT.TRAVERSE_PAGE_NEXT;
+				traverseDoit = true;
+			}
+			break;
+		}
+		case SWT.PAGE_UP: {
+			if ((event.stateMask & SWT.CTRL) != 0) {
+				traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+				traverseDoit = true;
+			}
+			break;
+		}
+		default: {
+			if (translateMnemonics ()) {
+				if (event.character != 0 && (event.stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+					traversal = SWT.TRAVERSE_MNEMONIC;
+					traverseDoit = true;
+				}
+			}
+			break;
+		}
+	}
+
+	boolean doit = true;
+	if (traversal != SWT.TRAVERSE_NONE) {
+		boolean oldEventDoit = event.doit;
+		event.doit = traverseDoit;	
+		doit = !browser.traverse (traversal, event);
+		event.doit = oldEventDoit;
+	}
+	if (doit) {
+		browser.notifyListeners (event.type, event);
+		doit = event.doit; 
+	}
+	return doit;
+}
+
 public void setBrowser (Browser browser) {
 	this.browser = browser;
 }
 
-public abstract boolean setText (String html);
+public abstract boolean setText (String html, boolean trusted);
 
-public abstract boolean setUrl (String url);
+public abstract boolean setUrl (String url, String postData, String[] headers);
 
 public abstract void stop ();
 
@@ -595,4 +691,9 @@ int translateKey (int key) {
 	}
 	return 0;
 }
+
+boolean translateMnemonics () {
+	return true;
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WindowEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WindowEvent.java
index a0c67ba..ae75515 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WindowEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WindowEvent.java	
@@ -161,7 +161,7 @@ public class WindowEvent extends TypedEvent {
 
 	/**
 	 * Specifies whether the <code>Shell</code> hosting the <code>Browser</code> should
-	 * display a menu bar.
+	 * display a menu bar.  Note that this is always <code>true</code> on OS X.
 	 * 
 	 * @since 3.1
 	 */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java
index 4a52398..30f73eb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/forms/org/eclipse/swt/browser/IE.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ class IE extends WebBrowser {
 		};
 	}
 
-public void create(Composite parent, int style) {
+public boolean create(Composite parent, int style) {
 	host = OS.gcnew_WindowsFormsHost();
 	if (host == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	webBrowser = OS.gcnew_WebBrowser();
@@ -87,6 +87,8 @@ public void create(Composite parent, int style) {
 	};
 	browser.addListener(SWT.Resize, listener);
 	browser.addListener(SWT.Dispose, listener);
+
+	return true;
 }
 
 public boolean back() {
@@ -245,7 +247,7 @@ public void refresh() {
 	OS.WebBrowser_Refresh(webBrowser);
 }
 
-public boolean setText(String html) {
+public boolean setText(String html, boolean trusted) {
 	int state = OS.WebBrowser_ReadyState(webBrowser);
 	if (!(state == OS.WebBrowserReadyState_Uninitialized || state == OS.WebBrowserReadyState_Complete)) {
 		OS.WebBrowser_Stop(webBrowser);
@@ -260,7 +262,7 @@ public boolean setText(String html) {
 	return true;
 }
 
-public boolean setUrl(String url) {
+public boolean setUrl(String url, String postData, String[] headers) {
 	int state = OS.WebBrowser_ReadyState(webBrowser);
 	if (!(state == OS.WebBrowserReadyState_Uninitialized || state == OS.WebBrowserReadyState_Complete)) {
 		OS.WebBrowser_Stop(webBrowser);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Voyager.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Voyager.java
index 075ac65..6be7a97 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Voyager.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/photon/org/eclipse/swt/browser/Voyager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ class Voyager extends WebBrowser {
 	/* Package Name */
 	static Callback callback;
 
-public void create(Composite parent, int style) {
+public boolean create(Composite parent, int style) {
 	/* use Photon's built-in anchoring for resizing */
 	int[] args = {
 			OS.Pt_ARG_ANCHOR_FLAGS,
@@ -108,6 +108,8 @@ public void create(Composite parent, int style) {
 		browser.addListener(folderEvents[i], listener);
 	}
 	OS.PtRealizeWidget(webHandle);
+
+	return true;
 }
 
 static int webProc(int handle, int data, int info) {
@@ -443,7 +445,7 @@ public void refresh() {
 	OS.PtSetResource(webHandle, OS.Pt_ARG_WEB_RELOAD, 1, 0);
 }
 
-public boolean setText(String html) {
+public boolean setText(String html, boolean trusted) {
 	text = html;
 	textOffset = 0;
 	byte[] buffer = Converter.wcsToMbcs(null, "client:", true); //$NON-NLS-1$
@@ -454,7 +456,7 @@ public boolean setText(String html) {
 	return true;
 }
 
-public boolean setUrl(String url) {
+public boolean setUrl(String url, String postData, String[] headers) {
 	byte[] buffer = Converter.wcsToMbcs(null, url, true);
 	int ptr = OS.malloc(buffer.length);
 	OS.memmove(ptr, buffer, buffer.length);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 199d44d..784d157 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,10 +10,12 @@
  *******************************************************************************/
 package org.eclipse.swt.browser;
 
+import java.net.*;
 import java.util.*;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.C;
 import org.eclipse.swt.internal.ole.win32.*;
 import org.eclipse.swt.internal.win32.*;
 import org.eclipse.swt.ole.win32.*;
@@ -22,27 +24,29 @@ import org.eclipse.swt.widgets.*;
 class IE extends WebBrowser {
 
 	OleFrame frame;
-	OleControlSite site;
+	WebSite site;
 	OleAutomation auto;
 	OleListener domListener;
 	OleAutomation[] documents = new OleAutomation[0];
 
-	boolean back, forward, navigate, delaySetText, ignoreDispose;
+	boolean back, forward, delaySetText, ignoreDispose, ignoreTraverse, performingInitialNavigate;
+	boolean installFunctionsOnDocumentComplete, untrustedText, isRefresh;
 	Point location;
 	Point size;
 	boolean addressBar = true, menuBar = true, statusBar = true, toolBar = true;
 	int /*long*/ globalDispatch;
-	String html, lastNavigateURL;
+	String html, lastNavigateURL, uncRedirect;
+	Object[] pendingText, pendingUrl;
 	int style, lastKeyCode, lastCharCode;
 	int lastMouseMoveX, lastMouseMoveY;
 
-	static int IEVersion;
+	static int IEVersion, PDFCount;
 	static String ProgId = "Shell.Explorer";	//$NON-NLS-1$
-	static int PDFCount;
 
 	static final int BeforeNavigate2 = 0xfa;
 	static final int CommandStateChange = 0x69;
 	static final int DocumentComplete = 0x103;
+	static final int DownloadComplete = 0x68;
 	static final int NavigateComplete2 = 0xfc;
 	static final int NewWindow2 = 0xfb;
 	static final int OnMenuBar = 0x100;
@@ -59,10 +63,12 @@ class IE extends WebBrowser {
 	static final int WindowSetResizable = 0x106;
 	static final int WindowSetTop = 0x109;
 	static final int WindowSetWidth = 0x10a;
+	static final int NavigateError = 0x10f;
 
 	static final short CSC_NAVIGATEFORWARD = 1;
 	static final short CSC_NAVIGATEBACK = 2;
 	static final int INET_E_DEFAULT_ACTION = 0x800C0011;
+	static final int INET_E_RESOURCE_NOT_FOUND = 0x800C0005;
 	static final int READYSTATE_COMPLETE = 4;
 	static final int URLPOLICY_ALLOW = 0x00;
 	static final int URLPOLICY_DISALLOW = 0x03;
@@ -73,6 +79,7 @@ class IE extends WebBrowser {
 	static final int URLACTION_ACTIVEX_MIN = 0x00001200;
 	static final int URLACTION_ACTIVEX_MAX = 0x000013ff;
 	static final int URLACTION_ACTIVEX_RUN = 0x00001200;
+	static final int URLACTION_FEATURE_ZONE_ELEVATION = 0x00002101;
 	static final int URLACTION_JAVA_MIN = 0x00001C00;
 	static final int URLACTION_JAVA_MAX = 0x00001Cff;
 	static final int URLACTION_SCRIPT_RUN = 0x00001400;
@@ -116,18 +123,20 @@ class IE extends WebBrowser {
 	static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
 	static final String PROPERTY_ALTKEY = "altKey"; //$NON-NLS-1$
 	static final String PROPERTY_BUTTON = "button"; //$NON-NLS-1$
-	static final String PROPERTY_CLIENTX = "clientX"; //$NON-NLS-1$
-	static final String PROPERTY_CLIENTY = "clientY"; //$NON-NLS-1$
 	static final String PROPERTY_CTRLKEY = "ctrlKey"; //$NON-NLS-1$
+	static final String PROPERTY_DOCUMENT = "Document"; //$NON-NLS-1$
 	static final String PROPERTY_FROMELEMENT = "fromElement"; //$NON-NLS-1$
 	static final String PROPERTY_KEYCODE = "keyCode"; //$NON-NLS-1$
 	static final String PROPERTY_REPEAT = "repeat"; //$NON-NLS-1$
 	static final String PROPERTY_RETURNVALUE = "returnValue"; //$NON-NLS-1$
+	static final String PROPERTY_SCREENX = "screenX"; //$NON-NLS-1$
+	static final String PROPERTY_SCREENY = "screenY"; //$NON-NLS-1$
 	static final String PROPERTY_SHIFTKEY = "shiftKey"; //$NON-NLS-1$
 	static final String PROPERTY_TOELEMENT = "toElement"; //$NON-NLS-1$
 	static final String PROPERTY_TYPE = "type"; //$NON-NLS-1$
 	static final String PROPERTY_WHEELDELTA = "wheelDelta"; //$NON-NLS-1$
 
+
 	static {
 		NativeClearSessions = new Runnable() {
 			public void run() {
@@ -238,9 +247,14 @@ class IE extends WebBrowser {
 			}
 			OS.RegCloseKey (phkResult [0]);
 		}
+
+		if (NativePendingCookies != null) {
+			SetPendingCookies (NativePendingCookies);
+		}
+		NativePendingCookies = null;
 	}
 
-public void create(Composite parent, int style) {
+public boolean create(Composite parent, int style) {
 	this.style = style;
 	frame = new OleFrame(browser, SWT.NONE);
 
@@ -273,6 +287,16 @@ public void create(Composite parent, int style) {
 					browser.notifyListeners (e.type, e);
 					e.type = SWT.NONE;
 
+					/* invoke onbeforeunload handlers */
+					if (!browser.isClosing) {
+						LocationListener[] oldLocationListeners = locationListeners;
+						locationListeners = new LocationListener[0];
+						site.ignoreAllMessages = true;
+						execute ("window.location.href='about:blank'"); //$NON-NLS-1$
+						site.ignoreAllMessages = false;
+						locationListeners = oldLocationListeners;
+					}
+
 					/*
 					* It is possible for the Browser's OLE frame to have been disposed
 					* by a Dispose listener that was invoked by notifyListeners above,
@@ -291,7 +315,7 @@ public void create(Composite parent, int style) {
 					}
 					functions = null;
 
-					lastNavigateURL = null;
+					lastNavigateURL = uncRedirect = null;
 					domListener = null;
 					if (auto != null) auto.dispose();
 					auto = null;
@@ -306,20 +330,37 @@ public void create(Composite parent, int style) {
 					e.doit = false;
 					break;
 				}
-				/* 
-				 * FocusIn and Traverse are hooked to handle traversal into
-				 * and out of the Browser when it has key listeners.
-				 */
 				case SWT.FocusIn: {
 					site.setFocus();
 					break;
 				}
 				case SWT.Traverse: {
-					if (browser.isListening(SWT.KeyDown) || browser.isListening(SWT.KeyUp)) {
-						if (e.detail == SWT.TRAVERSE_TAB_PREVIOUS) {
-							browser.traverse(SWT.TRAVERSE_TAB_PREVIOUS);
-							e.doit = false;
-						}
+					/*
+					 * Tabbing out of the browser can fail as a result of the WebSite
+					 * control embedded within the Browser.  The workaround is to
+					 * listen for traversals and re-perform the traversal on the
+					 * appropriate control.
+					 */
+					if (e.detail == SWT.TRAVERSE_TAB_PREVIOUS && e.widget instanceof WebSite) {
+						/* otherwise will traverse to the Browser control */
+						browser.traverse(SWT.TRAVERSE_TAB_PREVIOUS, e);
+						e.doit = false;
+					}
+					if (e.detail == SWT.TRAVERSE_TAB_NEXT && e.widget instanceof Browser) {
+						/* otherwise will traverse to the WebSite control */
+						site.traverse(SWT.TRAVERSE_TAB_NEXT, e);
+						e.doit = false;
+					}
+					/*
+					 * Return traversals can sometimes come through TranslateAccelerator,
+					 * depending on where focus is within the Browser.  Traversal
+					 * events should always be triggered by a key event from the DOM,
+					 * so if a Traversal from TranslateAccelerator is detected
+					 * (e.doit == true) then stop its propagation.
+					 */
+					if (e.detail == SWT.TRAVERSE_RETURN && e.doit && e.widget instanceof Browser) {
+						e.type = SWT.None;
+						e.doit = false;
 					}
 					break;
 				}
@@ -329,6 +370,7 @@ public void create(Composite parent, int style) {
 	browser.addListener(SWT.Dispose, listener);
 	browser.addListener(SWT.FocusIn, listener);
 	browser.addListener(SWT.Resize, listener);
+	browser.addListener(SWT.Traverse, listener);
 	site.addListener(SWT.MouseWheel, listener);
 	site.addListener(SWT.Traverse, listener);
 
@@ -338,10 +380,40 @@ public void create(Composite parent, int style) {
 			if (auto != null) {
 				switch (event.type) {
 					case BeforeNavigate2: {
+						isRefresh = false; /* refreshes do not come through here */
+
+						/* don't send client events if the initial navigate to about:blank has not completed */
+						if (performingInitialNavigate) break;
+
 						Variant varResult = event.arguments[1];
 						String url = varResult.getString();
+
+						if (uncRedirect != null) {
+							/*
+							* Silently allow the navigate to proceed if the url is the first segment of a
+							* UNC path being navigated to (initiated by the NavigateError listener to show
+							* a name/password prompter), or if the url is the full UNC path (initiated by
+							* the NavigateComplete listener to redirect from the UNC's first segment to its
+ 							* full path).
+							*/
+							if (uncRedirect.equals(url) || (uncRedirect.startsWith(url) && uncRedirect.indexOf('\\', 2) == url.length())) {
+								Variant cancel = event.arguments[6];
+								if (cancel != null) {
+									int /*long*/ pCancel = cancel.getByRef();
+									COM.MoveMemory(pCancel, new short[] {COM.VARIANT_FALSE}, 2);
+								}
+								break;
+							} else {
+								/*
+								* This navigate does not correspond to the previously-initiated
+								* UNC navigation so clear this state since it's no longer valid.
+								*/
+								uncRedirect = null;
+							}
+						}
+
 						/*
-						* Bug in IE.  For navigations on the local machine, BeforeNavigate2's url
+						* Feature in IE.  For navigations on the local machine, BeforeNavigate2's url
 						* field contains a string representing the file path in a non-URL format.
 						* In order to be consistent with the other Browser implementations, this
 						* case is detected and the string is changed to be a proper url string.
@@ -349,6 +421,17 @@ public void create(Composite parent, int style) {
 						if (url.indexOf(":/") == -1 && url.indexOf(":\\") != -1) { //$NON-NLS-1$ //$NON-NLS-2$
 							url = PROTOCOL_FILE + url.replace('\\', '/');
 						}
+
+						/* Disallow local file system accesses if the browser content is untrusted */
+						if (url.startsWith(PROTOCOL_FILE) && _getUrl().startsWith(ABOUT_BLANK) && untrustedText) {
+							Variant cancel = event.arguments[6];
+							if (cancel != null) {
+								int /*long*/ pCancel = cancel.getByRef();
+								COM.MoveMemory(pCancel, new short[] {COM.VARIANT_TRUE}, 2);
+							}
+							break;
+						}
+
 						LocationEvent newEvent = new LocationEvent(browser);
 						newEvent.display = browser.getDisplay();
 						newEvent.widget = browser;
@@ -378,7 +461,7 @@ public void create(Composite parent, int style) {
 								}
 								documents = new OleAutomation[0];
 							}
-						}
+							}
 						break;
 					}
 					case CommandStateChange: {
@@ -394,9 +477,23 @@ public void create(Composite parent, int style) {
 						break;
 					}
 					case DocumentComplete: {
+						if (performingInitialNavigate) {
+							/* this event marks the completion of the initial navigate to about:blank */
+							performingInitialNavigate = false;
+
+							/* if browser content has been provided by the client then set it now */
+							if (pendingText != null) {
+								setText((String)pendingText[0], ((Boolean)pendingText[1]).booleanValue());
+							} else if (pendingUrl != null) {
+								setUrl((String)pendingUrl[0], (String)pendingUrl[1], (String[])pendingUrl[2]);
+							}
+							pendingText = pendingUrl = null;
+							break;
+						}
+
 						Variant varResult = event.arguments[0];
 						IDispatch dispatch = varResult.getDispatch();
-	
+
 						varResult = event.arguments[1];
 						String url = varResult.getString();
 						/*
@@ -409,65 +506,18 @@ public void create(Composite parent, int style) {
 							url = PROTOCOL_FILE + url.replace('\\', '/');
 						}
 						if (html != null && url.equals(ABOUT_BLANK)) {
-							Runnable runnable = new Runnable () {
-								public void run() {
-									if (browser.isDisposed() || html == null) return;
-									int charCount = html.length();
-									char[] chars = new char[charCount];
-									html.getChars(0, charCount, chars, 0);
-									html = null;
-									int byteCount = OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, charCount, null, 0, null, null);
-									/*
-									* Note. Internet Explorer appears to treat the data loaded with 
-									* nsIPersistStreamInit.Load as if it were encoded using the default
-									* local charset.  There does not seem to be an API to set the
-									* desired charset explicitly in this case.  The fix is to
-									* prepend the UTF-8 Byte Order Mark signature to the data.
-									*/
-									byte[] UTF8BOM = {(byte)0xEF, (byte)0xBB, (byte)0xBF};
-									int /*long*/ hGlobal = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, UTF8BOM.length + byteCount);
-									if (hGlobal != 0) {
-										OS.MoveMemory(hGlobal, UTF8BOM, UTF8BOM.length);
-										OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, charCount, hGlobal + UTF8BOM.length, byteCount, null, null);							
-										int /*long*/ [] ppstm = new int /*long*/ [1];
-										/* 
-										* Note.  CreateStreamOnHGlobal is called with the flag fDeleteOnRelease.
-										* If the call succeeds the buffer hGlobal is freed automatically
-										* when the IStream object is released. If the call fails, free the buffer
-										* hGlobal.
-										*/
-										if (OS.CreateStreamOnHGlobal(hGlobal, true, ppstm) == OS.S_OK) {
-											int[] rgdispid = auto.getIDsOfNames(new String[] {"Document"}); //$NON-NLS-1$
-											Variant pVarResult = auto.getProperty(rgdispid[0]);
-											IDispatch dispatchDocument = pVarResult.getDispatch();
-											int /*long*/ [] ppvObject = new int /*long*/ [1];
-											int result = dispatchDocument.QueryInterface(COM.IIDIPersistStreamInit, ppvObject);
-											if (result == OS.S_OK) {
-												IPersistStreamInit persistStreamInit = new IPersistStreamInit(ppvObject[0]);
-												if (persistStreamInit.InitNew() == OS.S_OK) {
-													persistStreamInit.Load(ppstm[0]);
-												}
-												persistStreamInit.Release();
-											}
-											pVarResult.dispose();
-											/*
-											* This code is intentionally commented.  The IDispatch obtained from a Variant
-											* did not increase the reference count for the enclosed interface.
-											*/
-											//dispatchDocument.Release();
-											IUnknown stream = new IUnknown(ppstm[0]);
-											stream.Release();
-										} else {
-											OS.GlobalFree(hGlobal);
-										}
-									}
-								}
-							};
 							if (delaySetText) {
 								delaySetText = false;
-								browser.getDisplay().asyncExec(runnable);
+								browser.getDisplay().asyncExec(new Runnable() {
+									public void run() {
+										if (browser.isDisposed() || html == null) return;
+										setHTML(html);
+										html = null;
+									}
+								});
 							} else {
-								runnable.run();
+								setHTML(html);
+								html = null;
 							}
 						} else {
 							Variant variant = new Variant(auto);
@@ -498,11 +548,15 @@ public void create(Composite parent, int style) {
 								/* final document complete */
 								globalDispatch = 0;
 
-								/* re-install registered functions */
-								Enumeration elements = functions.elements ();
-								while (elements.hasMoreElements ()) {
-									BrowserFunction function = (BrowserFunction)elements.nextElement ();
-									execute (function.functionString);
+								/* re-install registered functions iff needed */
+								IE ie = (IE)browser.webBrowser;
+								if (ie.installFunctionsOnDocumentComplete) {
+									ie.installFunctionsOnDocumentComplete = false;
+									Enumeration elements = functions.elements ();
+									while (elements.hasMoreElements ()) {
+										BrowserFunction function = (BrowserFunction)elements.nextElement ();
+										execute (function.functionString);
+									}
 								}
 
 								ProgressEvent progressEvent = new ProgressEvent(browser);
@@ -522,10 +576,43 @@ public void create(Composite parent, int style) {
 						//dispatch.Release();
 						break;
 					}
+					case DownloadComplete: {
+						/*
+						 * IE feature.  Some events that swt relies on are not sent when
+						 * a page is refreshed as opposed to being navigated to.  The
+						 * workaround is to use DownloadComplete as an indication that a
+						 * refresh has completed.   
+						 */
+						if (!isRefresh) break;
+						isRefresh = false;
+
+						/*
+						* NavigateComplete is not received for refreshes, so re-hook
+						* BrowserFunctions here. 
+						*/
+						Enumeration elements = functions.elements ();
+						while (elements.hasMoreElements ()) {
+							BrowserFunction function = (BrowserFunction)elements.nextElement ();
+							execute (function.functionString);
+						}
+
+						/*
+						 * DocumentComplete is not received for refreshes, but clients may rely
+						 * on this event for tasks like hooking javascript listeners, so send the
+						 * event here.
+						 */
+						ProgressEvent progressEvent = new ProgressEvent(browser);
+						progressEvent.display = browser.getDisplay();
+						progressEvent.widget = browser;
+						for (int i = 0; i < progressListeners.length; i++) {
+							progressListeners[i].completed(progressEvent);
+						}						
+
+						break;
+					}
 					case NavigateComplete2: {
-						Variant varResult = event.arguments[0];
-						IDispatch dispatch = varResult.getDispatch();
-						if (globalDispatch == 0) globalDispatch = dispatch.getAddress();
+						Variant varResult = event.arguments[1];
+						String url = varResult.getString();
 
 						/*
 						* Bug in Acrobat Reader.  Opening > MAX_PDF PDF files causes Acrobat to not
@@ -535,27 +622,110 @@ public void create(Composite parent, int style) {
 						* workaround is to not unload the Acrobat libraries if > MAX_PDF PDF
 						* files have been opened.
 						*/
-						String url = event.arguments[1].getString();
-						int extensionIndex = url.lastIndexOf('.');
-						if (extensionIndex != -1) {
-							String extension = url.substring(extensionIndex);
-							if (extension.equalsIgnoreCase(EXTENSION_PDF)) {
-								PDFCount++;
-								if (PDFCount > MAX_PDF) {
-									COM.FreeUnusedLibraries = false;
+						boolean isPDF = false;
+						String path = null;
+						try {
+							path = new URL(url).getPath();
+						} catch (MalformedURLException e) {
+						}
+						if (path != null) {
+							int extensionIndex = path.lastIndexOf('.');
+							if (extensionIndex != -1) {
+								String extension = path.substring(extensionIndex);
+								if (extension.equalsIgnoreCase(EXTENSION_PDF)) {
+									isPDF = true;
+									PDFCount++;
+									if (PDFCount > MAX_PDF) {
+										COM.FreeUnusedLibraries = false;
+									}
 								}
 							}
 						}
 
+						if (uncRedirect != null) {
+							if (uncRedirect.equals(url)) {
+								/* full UNC path has been successfully navigated */
+								uncRedirect = null;
+								break;
+							}
+							if (uncRedirect.startsWith(url)) {
+								/*
+								* UNC first segment has been successfully navigated,
+								* now redirect to the full UNC path.
+								*/ 
+								navigate(uncRedirect, null, null, true);
+								break;
+							}
+							uncRedirect = null;
+						}
+
+						varResult = event.arguments[0];
+						IDispatch dispatch = varResult.getDispatch();
+						if (globalDispatch == 0) globalDispatch = dispatch.getAddress();
+	
 						OleAutomation webBrowser = varResult.getAutomation();
-						varResult = event.arguments[1];
 						Variant variant = new Variant(auto);
 						IDispatch top = variant.getDispatch();
 						boolean isTop = top.getAddress() == dispatch.getAddress();
-						hookDOMListeners(webBrowser, isTop);
+						if (isTop) {
+							/* re-install registered functions */
+							Enumeration elements = functions.elements ();
+							while (elements.hasMoreElements ()) {
+								BrowserFunction function = (BrowserFunction)elements.nextElement ();
+								execute (function.functionString);
+							}
+						}
+						if (!isPDF) {
+							hookDOMListeners(webBrowser, isTop);
+						}
 						webBrowser.dispose();
 						break;
 					}
+					case NavigateError: {
+						if (uncRedirect != null) {
+							/*
+							* This is the second error attempting to reach this UNC path, so
+							* it does not exist.  Don't override the default error handling.
+							*/
+							uncRedirect = null;
+							break;
+						}
+						Variant varResult = event.arguments[1];
+						final String url = varResult.getString();
+						if (url.startsWith("\\\\")) { //$NON-NLS-1$
+							varResult = event.arguments[3];
+							int statusCode = varResult.getInt();
+							if (statusCode == INET_E_RESOURCE_NOT_FOUND) {
+								int index = url.indexOf('\\', 2);
+								if (index != -1) {
+									final String host = url.substring(0, index);
+									Variant cancel = event.arguments[4];
+									if (cancel != null) {
+										int /*long*/ pCancel = cancel.getByRef();
+										COM.MoveMemory(pCancel, new short[] {COM.VARIANT_TRUE}, 2);
+									}
+									browser.getDisplay().asyncExec(new Runnable() {
+										public void run() {
+											if (browser.isDisposed()) return;
+											/*
+											* Feature of IE.  When a UNC path ends with a '\' character IE
+											* drops this character when providing the path as an argument
+											* to some IE listeners.  Remove this character here too in
+											* order to match these other listener argument values.
+											*/
+											if (url.endsWith("\\")) { //$NON-NLS-1$
+												uncRedirect = url.substring(0, url.length() - 1);
+											} else {
+												uncRedirect = url;
+											}
+											navigate(host, null, null, true);
+										}
+									});
+								}
+							}
+						}
+						break;
+					}
 					case NewWindow2: {
 						Variant cancel = event.arguments[1];
 						int /*long*/ pCancel = cancel.getByRef();
@@ -572,6 +742,14 @@ public void create(Composite parent, int style) {
 						}
 						boolean doit = browser != null && !browser.browser.isDisposed();
 						if (doit) {
+							/*
+							* When a Browser is opened in a new window, BrowserFunctions that are
+							* installed in it in the NavigateComplete2 callback are not retained
+							* through the loading of the page.  The workaround is to re-install
+							* the functions when DocumentComplete is received. 
+							*/
+							browser.installFunctionsOnDocumentComplete = true;
+
 							Variant variant = new Variant(browser.auto);
 							IDispatch iDispatch = variant.getDispatch();
 							Variant ppDisp = event.arguments[0];
@@ -660,6 +838,9 @@ public void create(Composite parent, int style) {
 						break;
 					}
 					case ProgressChange: {
+						/* don't send client events if the initial navigate to about:blank has not completed */
+						if (performingInitialNavigate) break;
+
 						Variant arg1 = event.arguments[0];
 						int nProgress = arg1.getType() != OLE.VT_I4 ? 0 : arg1.getInt(); // may be -1
 						Variant arg2 = event.arguments[1];
@@ -677,6 +858,9 @@ public void create(Composite parent, int style) {
 						break;
 					}
 					case StatusTextChange: {
+						/* don't send client events if the initial navigate to about:blank has not completed */
+						if (performingInitialNavigate) break;
+
 						Variant arg1 = event.arguments[0];
 						if (arg1.getType() == OLE.VT_BSTR) {
 							String text = arg1.getString();
@@ -691,6 +875,9 @@ public void create(Composite parent, int style) {
 						break;
 					}
 					case TitleChange: {
+						/* don't send client events if the initial navigate to about:blank has not completed */
+						if (performingInitialNavigate) break;
+
 						Variant arg1 = event.arguments[0];
 						if (arg1.getType() == OLE.VT_BSTR) {
 							String title = arg1.getString();
@@ -767,7 +954,9 @@ public void create(Composite parent, int style) {
 	site.addEventListener(BeforeNavigate2, oleListener);
 	site.addEventListener(CommandStateChange, oleListener);
 	site.addEventListener(DocumentComplete, oleListener);
+	site.addEventListener(DownloadComplete, oleListener);
 	site.addEventListener(NavigateComplete2, oleListener);
+	site.addEventListener(NavigateError, oleListener);
 	site.addEventListener(NewWindow2, oleListener);
 	site.addEventListener(OnMenuBar, oleListener);
 	site.addEventListener(OnStatusBar, oleListener);
@@ -781,15 +970,17 @@ public void create(Composite parent, int style) {
 	site.addEventListener(WindowSetLeft, oleListener);
 	site.addEventListener(WindowSetTop, oleListener);
 	site.addEventListener(WindowSetWidth, oleListener);
-	
+
 	Variant variant = new Variant(true);
 	auto.setProperty(RegisterAsBrowser, variant);
 	variant.dispose();
-	
+
 	variant = new Variant(false);
 	int[] rgdispid = auto.getIDsOfNames(new String[] {"RegisterAsDropTarget"}); //$NON-NLS-1$
 	if (rgdispid != null) auto.setProperty(rgdispid[0], variant);
 	variant.dispose();
+
+	return true;
 }
 
 public boolean back() {
@@ -799,9 +990,89 @@ public boolean back() {
 	return pVarResult != null && pVarResult.getType() == OLE.VT_EMPTY;
 }
 
+public boolean close() {
+	boolean result = true;
+	int[] rgdispid = auto.getIDsOfNames(new String[] {PROPERTY_DOCUMENT});
+	int dispIdMember = rgdispid[0];
+	Variant pVarResult = auto.getProperty(dispIdMember);
+	if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
+		if (pVarResult != null) pVarResult.dispose();
+	} else {
+		OleAutomation document = pVarResult.getAutomation();
+		pVarResult.dispose();
+		rgdispid = document.getIDsOfNames(new String[]{"parentWindow"}); //$NON-NLS-1$
+		/* rgdispid != null implies HTML content */
+		if (rgdispid != null) {
+			dispIdMember = rgdispid[0];
+			pVarResult = document.getProperty(dispIdMember);
+			if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
+				if (pVarResult != null) pVarResult.dispose();
+			} else {
+				OleAutomation window = pVarResult.getAutomation();
+				pVarResult.dispose();
+				rgdispid = window.getIDsOfNames(new String[]{"location"}); //$NON-NLS-1$
+				dispIdMember = rgdispid[0];
+				pVarResult = window.getProperty(dispIdMember);
+				if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
+					if (pVarResult != null) pVarResult.dispose();
+				} else {
+					OleAutomation location = pVarResult.getAutomation();
+					pVarResult.dispose();
+					LocationListener[] oldListeners = locationListeners;
+					locationListeners = new LocationListener[0];
+					rgdispid = location.getIDsOfNames(new String[]{"replace"}); //$NON-NLS-1$
+					dispIdMember = rgdispid[0];
+					Variant[] args = new Variant[] {new Variant("about:blank")}; //$NON-NLS-1$
+					pVarResult = location.invoke(dispIdMember, args);
+					if (pVarResult == null) {
+						/* cancelled by user */
+						result = false;
+					} else {
+						pVarResult.dispose();				
+					}
+					args[0].dispose();
+					locationListeners = oldListeners;
+					location.dispose();
+				}
+				window.dispose();
+			}
+		}
+		document.dispose();
+	}
+	return result;
+}
+
+static Variant createSafeArray(String string) {
+	/* Create a pointer and copy the data into it */
+	byte[] bytes = string.getBytes();
+	int length = bytes.length;
+	int /*long*/ pvData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, length);
+	C.memmove(pvData, bytes, length);
+	int cElements1 = length;
+
+	/* Create a SAFEARRAY in memory */
+	int /*long*/ pSafeArray = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, SAFEARRAY.sizeof);
+	SAFEARRAY safeArray = new SAFEARRAY();
+	safeArray.cDims = 1;
+	safeArray.fFeatures = OS.FADF_FIXEDSIZE | OS.FADF_HAVEVARTYPE;
+	safeArray.cbElements = 1;
+	safeArray.pvData = pvData;
+	SAFEARRAYBOUND safeArrayBound = new SAFEARRAYBOUND(); 
+	safeArray.rgsabound = safeArrayBound;
+	safeArrayBound.cElements = cElements1;
+	OS.MoveMemory (pSafeArray, safeArray, SAFEARRAY.sizeof);
+
+	/* Return a Variant that holds the SAFEARRAY */
+	int /*long*/ pVariant = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, Variant.sizeof);
+	short vt = (short)(OLE.VT_ARRAY | OLE.VT_UI1);
+	OS.MoveMemory(pVariant, new short[] {vt}, 2);
+	OS.MoveMemory(pVariant + 8, new int /*long*/[] {pSafeArray}, C.PTR_SIZEOF);
+	return new Variant(pVariant, (short)(OLE.VT_BYREF | OLE.VT_VARIANT));
+}
+
 public boolean execute(String script) {
 	/* get IHTMLDocument2 */
-	int[] rgdispid = auto.getIDsOfNames(new String[]{"Document"}); //$NON-NLS-1$
+	int[] rgdispid = auto.getIDsOfNames(new String[] {PROPERTY_DOCUMENT});
 	int dispIdMember = rgdispid[0];
 	Variant pVarResult = auto.getProperty(dispIdMember);
 	if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
@@ -854,7 +1125,7 @@ String getDeleteFunctionString (String functionName) {
 
 public String getText() {
 	/* get the document object */
-	int[] rgdispid = auto.getIDsOfNames(new String[]{"Document"}); //$NON-NLS-1$
+	int[] rgdispid = auto.getIDsOfNames(new String[] {PROPERTY_DOCUMENT});
 	Variant pVarResult = auto.getProperty(rgdispid[0]);
 	if (pVarResult == null || pVarResult.getType() == COM.VT_EMPTY) {
 		if (pVarResult != null) pVarResult.dispose ();
@@ -894,6 +1165,16 @@ public String getText() {
 }
 
 public String getUrl() {
+	/*
+	 * If the url is "" then return ABOUT_BLANK in order to be consistent
+	 * with the other Browser implementations which auto-navigate to ABOUT_BLANK
+	 * when opened.
+	 */
+	String result = _getUrl();
+	return result.length() != 0 ? result : ABOUT_BLANK;
+}
+
+String _getUrl() {
 	int[] rgdispid = auto.getIDsOfNames(new String[] { "LocationURL" }); //$NON-NLS-1$
 	Variant pVarResult = auto.getProperty(rgdispid[0]);
 	if (pVarResult == null || pVarResult.getType() != OLE.VT_BSTR) return ""; //$NON-NLS-1$
@@ -914,7 +1195,63 @@ public boolean isFocusControl () {
 	return site.isFocusControl() || frame.isFocusControl();
 }
 
+boolean navigate(String url, String postData, String headers[], boolean silent) {
+	int count = 1;
+	if (postData != null) count++;
+	if (headers != null) count++;
+	Variant[] rgvarg = new Variant[count];
+	int[] rgdispidNamedArgs = new int[count];
+	int[] rgdispid = auto.getIDsOfNames(new String[] { "Navigate", "URL", "PostData", "Headers" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	int index = 0;
+	rgvarg[index] = new Variant(url);
+	rgdispidNamedArgs[index++] = rgdispid[1];
+	if (postData != null) {
+		rgvarg[index] = createSafeArray(postData);
+		rgdispidNamedArgs[index++] = rgdispid[2];
+	}
+	if (headers != null) {
+		StringBuffer buffer = new StringBuffer();
+		for (int i = 0; i < headers.length; i++) {
+			String current = headers[i];
+			if (current != null) {
+				int sep = current.indexOf(':');
+				if (sep != -1) {
+					String key = current.substring(0, sep).trim();
+					String value = current.substring(sep + 1).trim();
+					if (key.length() > 0 && value.length() > 0) {
+						buffer.append(key);
+						buffer.append(':');
+						buffer.append(value);
+						buffer.append("\r\n");
+					}
+				}
+			}
+		}
+		rgvarg[index] = new Variant(buffer.toString());
+		rgdispidNamedArgs[index++] = rgdispid[3];
+	}
+	boolean oldValue = false;
+	if (silent && !OS.IsWinCE && IEVersion >= 7) {
+		int hResult = OS.CoInternetIsFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.GET_FEATURE_FROM_PROCESS);
+		oldValue = hResult == COM.S_OK;
+		OS.CoInternetSetFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.SET_FEATURE_ON_PROCESS, true);
+	}
+	Variant pVarResult = auto.invoke(rgdispid[0], rgvarg, rgdispidNamedArgs);
+	if (silent && !OS.IsWinCE && IEVersion >= 7) {
+		OS.CoInternetSetFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.SET_FEATURE_ON_PROCESS, oldValue);
+	}
+	for (int i = 0; i < count; i++) {
+		rgvarg[i].dispose();
+	}
+	if (pVarResult == null) return false;
+	boolean result = pVarResult.getType() == OLE.VT_EMPTY;
+	pVarResult.dispose();
+	return result;
+}
+
 public void refresh() {
+	uncRedirect = null;
+
 	/*
 	* Bug in Acrobat Reader.  Opening > MAX_PDF PDF files causes Acrobat to not
 	* clean up its shells properly when the container Browser is disposed.
@@ -923,7 +1260,7 @@ public void refresh() {
 	* workaround is to not unload the Acrobat libraries if > MAX_PDF PDF
 	* files have been opened.
 	*/
-	String url = getUrl();
+	String url = _getUrl();
 	int extensionIndex = url.lastIndexOf('.');
 	if (extensionIndex != -1) {
 		String extension = url.substring(extensionIndex);
@@ -935,20 +1272,85 @@ public void refresh() {
 		}
 	}
 
+	isRefresh = true;
 	int[] rgdispid = auto.getIDsOfNames(new String[] { "Refresh" }); //$NON-NLS-1$
 	auto.invoke(rgdispid[0]);
 }
 
-public boolean setText(String html) {
+void setHTML (String string) {
+	int charCount = string.length();
+	char[] chars = new char[charCount];
+	string.getChars(0, charCount, chars, 0);
+	int byteCount = OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, charCount, null, 0, null, null);
+	/*
+	* Internet Explorer appears to treat the data loaded with 
+	* nsIPersistStreamInit.Load as if it were encoded using the default
+	* local charset.  There does not seem to be an API to set the
+	* desired charset explicitly in this case.  The fix is to
+	* prepend the UTF-8 Byte Order Mark signature to the data.
+	*/
+	byte[] UTF8BOM = {(byte)0xEF, (byte)0xBB, (byte)0xBF};
+	int /*long*/ hGlobal = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, UTF8BOM.length + byteCount);
+	if (hGlobal != 0) {
+		OS.MoveMemory(hGlobal, UTF8BOM, UTF8BOM.length);
+		OS.WideCharToMultiByte(OS.CP_UTF8, 0, chars, charCount, hGlobal + UTF8BOM.length, byteCount, null, null);							
+		int /*long*/ [] ppstm = new int /*long*/ [1];
+		/* 
+		* CreateStreamOnHGlobal is called with the flag fDeleteOnRelease.
+		* If the call succeeds the buffer hGlobal is freed automatically
+		* when the IStream object is released. If the call fails, free the
+		* buffer hGlobal.
+		*/
+		if (OS.CreateStreamOnHGlobal(hGlobal, true, ppstm) == OS.S_OK) {
+			int[] rgdispid = auto.getIDsOfNames(new String[] {PROPERTY_DOCUMENT});
+			Variant pVarResult = auto.getProperty(rgdispid[0]);
+			IDispatch dispatchDocument = pVarResult.getDispatch();
+			int /*long*/ [] ppvObject = new int /*long*/ [1];
+			int result = dispatchDocument.QueryInterface(COM.IIDIPersistStreamInit, ppvObject);
+			if (result == OS.S_OK) {
+				IPersistStreamInit persistStreamInit = new IPersistStreamInit(ppvObject[0]);
+				if (persistStreamInit.InitNew() == OS.S_OK) {
+					persistStreamInit.Load(ppstm[0]);
+				}
+				persistStreamInit.Release();
+			}
+			pVarResult.dispose();
+			/*
+			* This code is intentionally commented.  The IDispatch obtained from a Variant
+			* did not increase the reference count for the enclosed interface.
+			*/
+			//dispatchDocument.Release();
+			IUnknown stream = new IUnknown(ppstm[0]);
+			stream.Release();
+		} else {
+			OS.GlobalFree(hGlobal);
+		}
+	}
+}
+
+public boolean setText(final String html, boolean trusted) {
+	/*
+	* If the browser is navigating to about:blank in response to its first
+	* setUrl() invocation then delay setting this text content until the
+	* navigate has completed.  about:blank will be re-navigated to in order
+	* to ensure that all expected client events are sent.
+	*/
+	if (performingInitialNavigate) {
+		pendingText = new Object[] {html, new Boolean (trusted)};
+		pendingUrl = null;
+		return true;
+	}
+
 	/*
 	* If the html field is non-null then the about:blank page is already being
-	* loaded, so no Stop or Navigate is required.  Just set the html that is to
-	* be shown.
+	* loaded from a previous setText() invocation, so no Stop or Navigate is
+	* required.  Just set the html that is to be shown.
 	*/
 	boolean blankLoading = this.html != null;
 	this.html = html;
+	untrustedText = !trusted;
 	if (blankLoading) return true;
-	
+
 	/*
 	* Navigate to the blank page and insert the given html when
 	* receiving the next DocumentComplete notification.  See the
@@ -965,17 +1367,17 @@ public boolean setText(String html) {
 	* workaround is to not invoke 'stop' when no request has been set since
 	* that instance was created.
 	*/
-	int[] rgdispid;
-	if (navigate) {
-		/*
-		* Stopping the loading of a page causes DocumentComplete events from previous
-		* requests to be received before the DocumentComplete for this page.  In such
-		* cases we must be sure to not set the html into the browser too soon, since
-		* doing so could result in its page being cleared out by a subsequent
-		* DocumentComplete.  The Browser's ReadyState can be used to determine whether
-		* these extra events will be received or not.
-		*/
-		rgdispid = auto.getIDsOfNames(new String[] { "ReadyState" }); //$NON-NLS-1$
+
+	/*
+	* Stopping the loading of a page causes DocumentComplete events from previous
+	* requests to be received before the DocumentComplete for this page.  In such
+	* cases we must be sure to not set the html into the browser too soon, since
+	* doing so could result in its page being cleared out by a subsequent
+	* DocumentComplete.  The Browser's ReadyState can be used to determine whether
+	* these extra events will be received or not.
+	*/
+	if (_getUrl().length() != 0) {
+		int[] rgdispid = auto.getIDsOfNames(new String[] { "ReadyState" }); //$NON-NLS-1$
 		Variant pVarResult = auto.getProperty(rgdispid[0]);
 		if (pVarResult == null) return false;
 		delaySetText = pVarResult.getInt() != READYSTATE_COMPLETE;
@@ -983,8 +1385,8 @@ public boolean setText(String html) {
 		rgdispid = auto.getIDsOfNames(new String[] { "Stop" }); //$NON-NLS-1$
 		auto.invoke(rgdispid[0]);
 	}
-	rgdispid = auto.getIDsOfNames(new String[] { "Navigate", "URL" }); //$NON-NLS-1$ //$NON-NLS-2$
-	navigate = true;
+
+	int[] rgdispid = auto.getIDsOfNames(new String[] { "Navigate", "URL" }); //$NON-NLS-1$ //$NON-NLS-2$
 	Variant[] rgvarg = new Variant[1];
 	rgvarg[0] = new Variant(ABOUT_BLANK);
 	int[] rgdispidNamedArgs = new int[1];
@@ -1006,8 +1408,21 @@ public boolean setText(String html) {
 	return result;
 }
 
-public boolean setUrl(String url) {
-	html = null;
+public boolean setUrl(String url, String postData, String headers[]) {
+	html = uncRedirect = null;
+
+	/*
+	* If the browser has not shown any content yet then first navigate to
+	* about:blank to work around IE bug http://support.microsoft.com/kb/320153,
+	* then navigate to the requested url once about:blank has loaded.
+	*/
+	if (_getUrl().length() == 0 && !ABOUT_BLANK.equalsIgnoreCase(url)) {
+		pendingText = null;
+		pendingUrl = new Object[] {url, postData, headers};
+		performingInitialNavigate = true;
+		navigate (ABOUT_BLANK, null, null, true);
+		return true;
+	}
 
 	/*
 	* Bug in Internet Explorer.  For some reason, Navigating to an xml document before
@@ -1017,53 +1432,40 @@ public boolean setUrl(String url) {
 	* navigating to any xml document. 
 	*/
 	if (url.endsWith(".xml")) {	//$NON-NLS-1$
-		/*
-		* Feature in Internet Explorer.  Stopping pending requests when no request has been
-		* issued causes a default 'Action cancelled' page to be displayed.  Since Stop must
-		* be issued here, the workaround is to first Navigate to the about:blank page before
-		* issuing Stop so that the 'Action cancelled' page is not displayed.
-		*/
-		if (!navigate) {
-			int[] rgdispid = auto.getIDsOfNames(new String[] { "Navigate", "URL" }); //$NON-NLS-1$ //$NON-NLS-2$
-			Variant[] rgvarg = new Variant[1];
-			rgvarg[0] = new Variant(ABOUT_BLANK);
-			int[] rgdispidNamedArgs = new int[1];
-			rgdispidNamedArgs[0] = rgdispid[1];
-			boolean oldValue = false;
-			if (!OS.IsWinCE && IEVersion >= 7) {
-				int hResult = OS.CoInternetIsFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.GET_FEATURE_FROM_PROCESS);
-				oldValue = hResult == COM.S_OK;
-				OS.CoInternetSetFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.SET_FEATURE_ON_PROCESS, true);
-			}
-			auto.invoke(rgdispid[0], rgvarg, rgdispidNamedArgs);
-			if (!OS.IsWinCE && IEVersion >= 7) {
-				OS.CoInternetSetFeatureEnabled(OS.FEATURE_DISABLE_NAVIGATION_SOUNDS, OS.SET_FEATURE_ON_PROCESS, oldValue);
-			}
-			rgvarg[0].dispose();
-		}
 		int[] rgdispid = auto.getIDsOfNames(new String[] { "Stop" }); //$NON-NLS-1$
 		auto.invoke(rgdispid[0]);
 	}
-
-	int[] rgdispid = auto.getIDsOfNames(new String[] { "Navigate", "URL" }); //$NON-NLS-1$ //$NON-NLS-2$
-	navigate = true;
-	Variant[] rgvarg = new Variant[1];
-	rgvarg[0] = new Variant(url);
-	int[] rgdispidNamedArgs = new int[1];
-	rgdispidNamedArgs[0] = rgdispid[1];
-	Variant pVarResult = auto.invoke(rgdispid[0], rgvarg, rgdispidNamedArgs);
-	rgvarg[0].dispose();
-	if (pVarResult == null) return false;
-	boolean result = pVarResult.getType() == OLE.VT_EMPTY;
-	pVarResult.dispose();
-	return result;
+	return navigate(url, postData, headers, false);
 }
 
 public void stop() {
+	/*
+	* If the browser has not completed its initial navigate to about:blank
+	* then do not issue Stop here, as this will display the IE error page.
+	* Just clear the pending url and text fields so that any pending content
+	* will not be set into the browser when the about:blank navigate completes.
+	*/
+	if (performingInitialNavigate) {
+		pendingText = pendingUrl = null;
+		return;
+	}
+
+	/*
+	* Feature of IE.  Invoking Stop in IE before any content has been shown
+	* displays a Navigation Cancelled error page.  The workaround is to not
+	* invoke Stop if no content has been shown yet. 
+	*/
+	if (_getUrl().length() == 0) return;
+
+	uncRedirect = null;
 	int[] rgdispid = auto.getIDsOfNames(new String[] { "Stop" }); //$NON-NLS-1$
 	auto.invoke(rgdispid[0]);
 }
 
+boolean translateMnemonics () {
+	return false;
+}
+
 void handleDOMEvent (OleEvent e) {
 	if (e.arguments == null || e.arguments.length == 0) return; /* for IE5 */
 
@@ -1082,14 +1484,28 @@ void handleDOMEvent (OleEvent e) {
 		lastKeyCode = translateKey (pVarResult.getInt());
 		pVarResult.dispose();
 
+		rgdispid = event.getIDsOfNames (new String[] {PROPERTY_RETURNVALUE});
+		pVarResult = event.getProperty (rgdispid[0]);
+		boolean consume = pVarResult != null && pVarResult.getType () == OLE.VT_BOOL && !pVarResult.getBoolean ();
+		pVarResult.dispose ();
+
 		MSG msg = new MSG ();
-		int flags = OS.PM_NOREMOVE | OS.PM_NOYIELD;
+		int flags = OS.PM_NOYIELD | (consume ? OS.PM_REMOVE : OS.PM_NOREMOVE);
 		if (OS.PeekMessage (msg, frame.handle, OS.WM_CHAR, OS.WM_CHAR, flags)) {
 			/* a keypress will be received for this key so don't send KeyDown here */
 			event.dispose();
 			return;
 		}
 
+		if (consume) {
+			/* 
+			 * an event should not be sent if another listener has vetoed the
+			 * KeyDown (this is for non-character cases like arrow keys, etc.)
+			 */
+			event.dispose();
+			return;
+		}
+
 		/* if this is a repeating key then an event should not be fired for it */
 		rgdispid = event.getIDsOfNames(new String[] { PROPERTY_REPEAT });
 		dispIdMember = rgdispid[0];
@@ -1127,18 +1543,19 @@ void handleDOMEvent (OleEvent e) {
 		keyEvent.stateMask = mask;
 		keyEvent.stateMask &= ~lastKeyCode;		/* remove current keydown if it's a state key */
 		/*
-		* keypress events are not received for Enter, Delete and Tab, so
-		* KeyDown events are sent for them here.  Set the KeyDown event's
-		* character field and IE's lastCharCode field for these keys so
-		* that the Browser's key events are consistent with other controls.
+		* keypress events are not received for Backspace, Enter, Delete and
+		* Tab, so KeyDown events are sent for them here.  Set the KeyDown
+		* event's character field and IE's lastCharCode field for these keys
+		* so that the Browser's key events are consistent with other controls.
 		*/
 		switch (lastKeyCode) {
+			case SWT.BS: lastCharCode = keyEvent.character = SWT.BS; break;
 			case SWT.CR: lastCharCode = keyEvent.character = SWT.CR; break;
 			case SWT.DEL: lastCharCode = keyEvent.character = SWT.DEL; break;
 			case SWT.TAB: lastCharCode = keyEvent.character = SWT.TAB; break;
 		}
-		browser.notifyListeners (keyEvent.type, keyEvent);
-		if (!keyEvent.doit) {
+
+		if (!sendKeyEvent(keyEvent)) {
 			rgdispid = event.getIDsOfNames(new String[] { PROPERTY_RETURNVALUE });
 			dispIdMember = rgdispid[0];
 			Variant pVarFalse = new Variant(false);
@@ -1146,6 +1563,13 @@ void handleDOMEvent (OleEvent e) {
 			pVarFalse.dispose();
 		}
 
+		/*
+		* Pressing F5 refreshes the current page.  If this is about to happen
+		* then set isRefresh to true so that received IE events will be treated
+		* accordingly.
+		*/
+		if (lastKeyCode == SWT.F5) isRefresh = true;
+
 		event.dispose();
 		return;
 	}
@@ -1182,10 +1606,10 @@ void handleDOMEvent (OleEvent e) {
 		* keys, so the PeekMessage check in the keydown handler always allows a
 		* KeyDown to be sent for this key.  However, keydown and keypress events are 
 		* both sometimes received for OS.VK_RETURN, depending on the page's focus
-		* control.  To handle this, do not send a KeyDown for OS.VK_RETURN here since
-		* one is always sent for it from the keydown handler. 
+		* control.  To handle this, do not send a KeyDown for CR or LF here since
+		* one is always sent for it from the keydown handler.
 		*/
-		if (lastCharCode == OS.VK_RETURN) {
+		if (lastCharCode == SWT.CR || lastCharCode == SWT.LF) {
 			event.dispose();
 			return;
 		}
@@ -1196,8 +1620,7 @@ void handleDOMEvent (OleEvent e) {
 		keyEvent.keyCode = lastKeyCode;
 		keyEvent.character = (char)lastCharCode;
 		keyEvent.stateMask = mask;
-		browser.notifyListeners (keyEvent.type, keyEvent);
-		if (!keyEvent.doit) {
+		if (!sendKeyEvent(keyEvent)) {
 			rgdispid = event.getIDsOfNames(new String[] { PROPERTY_RETURNVALUE });
 			dispIdMember = rgdispid[0];
 			Variant pVarFalse = new Variant(false);
@@ -1309,23 +1732,31 @@ void handleDOMEvent (OleEvent e) {
 		}
 	}
 
-	int x, y, mask = 0;
+	int mask = 0;
 	Event newEvent = new Event();
 	newEvent.widget = browser;
 
-	rgdispid = event.getIDsOfNames(new String[] { PROPERTY_CLIENTX });
+	/*
+	 * The position of mouse events is received in screen-relative coordinates
+	 * in order to handle pages with frames, since frames express their event
+	 * coordinates relative to themselves rather than relative to their top-
+	 * level page.  Convert screen-relative coordinates to be browser-relative.
+	 */
+	rgdispid = event.getIDsOfNames(new String[] { PROPERTY_SCREENX });
 	dispIdMember = rgdispid[0];
 	pVarResult = event.getProperty(dispIdMember);
-	x = pVarResult.getInt();
-	newEvent.x = x;
+	int screenX = pVarResult.getInt();
 	pVarResult.dispose();
 
-	rgdispid = event.getIDsOfNames(new String[] { PROPERTY_CLIENTY });
+	rgdispid = event.getIDsOfNames(new String[] { PROPERTY_SCREENY });
 	dispIdMember = rgdispid[0];
 	pVarResult = event.getProperty(dispIdMember);
-	y = pVarResult.getInt();
-	newEvent.y = y;
+	int screenY = pVarResult.getInt();
 	pVarResult.dispose();
+	
+	Point position = new Point(screenX, screenY);
+	position = browser.getDisplay().map(null, browser, position);
+	newEvent.x = position.x; newEvent.y = position.y;
 
 	rgdispid = event.getIDsOfNames(new String[] { PROPERTY_CTRLKEY });
 	dispIdMember = rgdispid[0];
@@ -1356,7 +1787,7 @@ void handleDOMEvent (OleEvent e) {
 		case 1: button = 1; break;
 		case 2: button = 3; break;
 		case 4: button = 2; break;
-	};
+	}
 
 	if (eventType.equals(EVENT_MOUSEDOWN)) {
 		newEvent.type = SWT.MouseDown;
@@ -1405,7 +1836,7 @@ void handleDOMEvent (OleEvent e) {
 		newEvent = new Event ();
 		newEvent.widget = browser;
 		newEvent.type = SWT.MouseDoubleClick;
-		newEvent.x = x; newEvent.y = y;
+		newEvent.x = position.x; newEvent.y = position.y;
 		newEvent.stateMask = mask;
 		newEvent.type = SWT.MouseDoubleClick;
 		newEvent.button = 1; /* dblclick only comes for button 1 and does not set the button property */
@@ -1415,7 +1846,7 @@ void handleDOMEvent (OleEvent e) {
 }
 
 void hookDOMListeners(OleAutomation webBrowser, final boolean isTop) {
-	int[] rgdispid = webBrowser.getIDsOfNames(new String[]{ "Document" }); //$NON-NLS-1$
+	int[] rgdispid = webBrowser.getIDsOfNames(new String[] { PROPERTY_DOCUMENT });
 	int dispIdMember = rgdispid[0];
 	Variant	pVarResult = webBrowser.getProperty(dispIdMember);
 	if (pVarResult == null) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
index 38571fa..a62a9a1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.swt.browser;
 
+import java.util.Hashtable;
+
 import org.eclipse.swt.*;
 import org.eclipse.swt.internal.C;
 import org.eclipse.swt.internal.ole.win32.*;
@@ -25,7 +27,7 @@ class WebSite extends OleControlSite {
 	COMObject iOleCommandTarget;
 	COMObject iAuthenticate;
 	COMObject iDispatch;
-	boolean ignoreNextMessage;
+	boolean ignoreNextMessage, ignoreAllMessages;
 	Boolean canExecuteApplets;
 
 	static final int OLECMDID_SHOWSCRIPTERROR = 40;
@@ -224,21 +226,10 @@ int GetHostInfo(int /*long*/ pInfo) {
 	int info = IE.DOCHOSTUIFLAG_THEME;
 	IE browser = (IE)((Browser)getParent().getParent()).webBrowser;
 	if ((browser.style & SWT.BORDER) == 0) info |= IE.DOCHOSTUIFLAG_NO3DOUTERBORDER;
-	OS.MoveMemory(pInfo + 4, new int[] {info}, 4);
-
-	/*
-	* TODO replace the implementation above with the one commented below
-	* when 32-bit swt starts compiling with a newer mssdk whose definition
-	* of DOCHOSTUIINFO includes the last two OLECHAR* fields.
-	*/ 
-//	int info = IE.DOCHOSTUIFLAG_THEME;
-//	Browser browser = (Browser)getParent().getParent();
-//	if ((browser.getStyle() & SWT.BORDER) == 0) info |= IE.DOCHOSTUIFLAG_NO3DOUTERBORDER;
-//
-//	DOCHOSTUIINFO uiInfo = new DOCHOSTUIINFO ();
-//	OS.MoveMemory(uiInfo, pInfo, DOCHOSTUIINFO.sizeof);
-//	uiInfo.dwFlags = info;
-//	OS.MoveMemory(pInfo, uiInfo, DOCHOSTUIINFO.sizeof);
+	DOCHOSTUIINFO uiInfo = new DOCHOSTUIINFO ();
+	OS.MoveMemory(uiInfo, pInfo, DOCHOSTUIINFO.sizeof);
+	uiInfo.dwFlags = info;
+	OS.MoveMemory(pInfo, uiInfo, DOCHOSTUIINFO.sizeof);
 	return COM.S_OK;
 }
 
@@ -294,7 +285,7 @@ int ShowUI(int dwID, int /*long*/ pActiveObject, int /*long*/ pCommandTarget, in
 
 int TranslateAccelerator(int /*long*/ lpMsg, int /*long*/ pguidCmdGroup, int nCmdID) {
 	/*
-	* Feature on Internet Explorer.  By default the embedded Internet Explorer control runs
+	* Feature in Internet Explorer.  By default the embedded Internet Explorer control runs
 	* the Internet Explorer shortcuts (e.g. Ctrl+F for Find).  This overrides the shortcuts
 	* defined by SWT.  The workaround is to forward the accelerator keys to the parent window
 	* and have Internet Explorer ignore the ones handled by the parent window.
@@ -344,12 +335,13 @@ int TranslateAccelerator(int /*long*/ lpMsg, int /*long*/ pguidCmdGroup, int nCm
 				 * if it will be within IE or out to another Control.
 				 */
 				break;
+			case OS.VK_BACK:
 			case OS.VK_RETURN:
 				/*
-				* Translating OS.VK_RETURN results in the native control handling it
-				* twice (eg.- inserting two lines instead of one).  So this key is not
-				* translated here, and instead is explicitly handled in the keypress
-				* handler.
+				* Translating OS.VK_BACK or OS.VK_RETURN results in the native control
+				* handling them twice (eg.- inserting two lines instead of one).  So
+				* these keys are not translated here, and instead are explicitly handled
+				* in the keypress handler.
 				*/
 				break;
 			case OS.VK_L:
@@ -408,7 +400,7 @@ int TranslateAccelerator(int /*long*/ lpMsg, int /*long*/ pguidCmdGroup, int nCm
 						}
 						break;
 					}
-				};
+				}
 				if (isAccent) result = COM.S_OK;
 			}
 		}
@@ -427,7 +419,7 @@ int UpdateUI() {
 /* IDocHostShowUI */
 
 int ShowMessage(int /*long*/ hwnd, int /*long*/ lpstrText, int /*long*/ lpstrCaption, int dwType, int /*long*/ lpstrHelpFile, int dwHelpContext, int /*long*/ plResult) {
-	boolean ignore = ignoreNextMessage;
+	boolean ignore = ignoreNextMessage || ignoreAllMessages;
 	ignoreNextMessage = false;
 	return ignore ? COM.S_OK : COM.S_FALSE;
 }
@@ -492,17 +484,23 @@ int GetSecuritySite(int /*long*/ ppSite) {
 	return IE.INET_E_DEFAULT_ACTION;
 }
 
-int MapUrlToZone(int /*long*/ pwszUrl, int /*long*/ pdwZone, int dwFlags) {	
+int MapUrlToZone(int /*long*/ pwszUrl, int /*long*/ pdwZone, int dwFlags) {
 	/*
-	* Feature in IE 6 sp1.  HTML rendered in memory
-	* does not enable local links but the exact same
-	* HTML document loaded through a local file is
-	* permitted to follow local links.  The workaround is
-	* to return URLZONE_INTRANET instead of the default
-	* value URLZONE_LOCAL_MACHINE.
-	*/	
-	COM.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4);
-	return COM.S_OK;
+	* Feature in IE.  HTML rendered in memory does not enable local links
+	* but the same HTML document loaded through a local file is permitted
+	* to follow local links.  The workaround is to return URLZONE_INTRANET
+	* instead of the default value URLZONE_LOCAL_MACHINE.
+	*/
+	IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
+	/*
+	* For some reason IE8 invokes this function after the Browser has
+	* been disposed.  To detect this case check for ie.auto != null. 
+	*/
+	if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
+		COM.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4);
+		return COM.S_OK;
+	}
+	return IE.INET_E_DEFAULT_ACTION;
 }
 
 int GetSecurityId(int /*long*/ pwszUrl, int /*long*/ pbSecurityId, int /*long*/ pcbSecurityId, int /*long*/ dwReserved) {
@@ -513,19 +511,18 @@ int ProcessUrlAction(int /*long*/ pwszUrl, int dwAction, int /*long*/ pPolicy, i
 	ignoreNextMessage = false;
 
 	/*
-	* Feature in IE 6 sp1.  HTML rendered in memory
-	* containing an OBJECT tag referring to a local file
-	* brings up a warning dialog asking the user whether
-	* it should proceed or not.  The workaround is to
-	* set the policy to URLPOLICY_ALLOW in this case (dwAction
-	* value of 0x1406).
-	* 
-	* Feature in IE. Security Patches and user settings
-	* affect the way the embedded web control behaves.  The current
-	* approach is to consider the content trusted and allow
-	* all URLs by default.
+	* If the current page is about:blank and is trusted then
+	* override default zone elevation settings to allow the action.  
 	*/
-	int policy = IE.URLPOLICY_ALLOW;
+	if (dwAction == IE.URLACTION_FEATURE_ZONE_ELEVATION) {
+	    IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
+	    if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
+			if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4);
+			return COM.S_OK;
+	    }
+	}
+
+	int policy = IE.INET_E_DEFAULT_ACTION;
 
 	if (dwAction >= IE.URLACTION_JAVA_MIN && dwAction <= IE.URLACTION_JAVA_MAX) {
 		if (canExecuteApplets ()) {
@@ -549,11 +546,10 @@ int ProcessUrlAction(int /*long*/ pwszUrl, int dwAction, int /*long*/ pPolicy, i
 	}
 	if (dwAction == IE.URLACTION_SCRIPT_RUN) {
 		IE browser = (IE)((Browser)getParent ().getParent ()).webBrowser;
-		if (!browser.jsEnabled) {
-			policy = IE.URLPOLICY_DISALLOW;
-		}
+		policy = browser.jsEnabled ? IE.URLPOLICY_ALLOW : IE.URLPOLICY_DISALLOW;
 	}
 
+	if (policy == IE.INET_E_DEFAULT_ACTION) return IE.INET_E_DEFAULT_ACTION;
 	if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {policy}, 4);
 	return policy == IE.URLPOLICY_ALLOW ? COM.S_OK : COM.S_FALSE;
 }
@@ -704,6 +700,15 @@ int GetIDsOfNames (int riid, int /*long*/ rgszNames, int cNames, int lcid, int /
 }
 
 int Invoke (int dispIdMember, int /*long*/ riid, int lcid, int dwFlags, int /*long*/ pDispParams, int /*long*/ pVarResult, int /*long*/ pExcepInfo, int /*long*/ pArgErr) {
+	IE ie = (IE)((Browser)getParent ().getParent ()).webBrowser;
+	Hashtable functions = ie.functions;
+	if (functions == null) {
+		if (pVarResult != 0) {
+			COM.MoveMemory (pVarResult, new int /*long*/[] {0}, C.PTR_SIZEOF);
+		}
+		return COM.S_OK;
+	}
+
 	DISPPARAMS dispParams = new DISPPARAMS ();
 	COM.MoveMemory (dispParams, pDispParams, DISPPARAMS.sizeof);
 	if (dispParams.cArgs != 2) {
@@ -715,6 +720,13 @@ int Invoke (int dispIdMember, int /*long*/ riid, int lcid, int dwFlags, int /*lo
 
 	int /*long*/ ptr = dispParams.rgvarg + Variant.sizeof;
 	Variant variant = Variant.win32_new (ptr);
+	if (variant.getType () != COM.VT_I4) {
+		variant.dispose ();
+		if (pVarResult != 0) {
+			COM.MoveMemory (pVarResult, new int /*long*/[] {0}, C.PTR_SIZEOF);
+		}
+		return COM.S_OK;
+	}
 	int index = variant.getInt ();
 	variant.dispose ();
 	if (index <= 0) {
@@ -725,9 +737,8 @@ int Invoke (int dispIdMember, int /*long*/ riid, int lcid, int dwFlags, int /*lo
 	}
 
 	variant = Variant.win32_new (dispParams.rgvarg);
-	IE ie = (IE)((Browser)getParent ().getParent ()).webBrowser;
 	Object key = new Integer (index);
-	BrowserFunction function = (BrowserFunction)ie.functions.get (key);
+	BrowserFunction function = (BrowserFunction)functions.get (key);
 	Object returnValue = null;
 	if (function != null) {
 		try {
@@ -840,86 +851,84 @@ Variant convertToJS (Object value) {
 		return new Variant (((Number)value).doubleValue ());
 	}
 	if (value instanceof Object[]) {
-		Object[] arrayValue = (Object[])value;
-		int length = arrayValue.length;
-		if (length > 0) {
-			/* get IHTMLDocument2 */
-			IE browser = (IE)((Browser)getParent ().getParent ()).webBrowser;
-			OleAutomation auto = browser.auto;
-			int[] rgdispid = auto.getIDsOfNames (new String[] {"Document"}); //$NON-NLS-1$
-			if (rgdispid == null) return new Variant ();
-			Variant pVarResult = auto.getProperty (rgdispid[0]);
-			if (pVarResult == null) return new Variant ();
-			if (pVarResult.getType () == COM.VT_EMPTY) {
-				pVarResult.dispose ();
-				return new Variant ();
-			}
-			OleAutomation document = pVarResult.getAutomation ();
+		/* get IHTMLDocument2 */
+		IE browser = (IE)((Browser)getParent ().getParent ()).webBrowser;
+		OleAutomation auto = browser.auto;
+		int[] rgdispid = auto.getIDsOfNames (new String[] {"Document"}); //$NON-NLS-1$
+		if (rgdispid == null) return new Variant ();
+		Variant pVarResult = auto.getProperty (rgdispid[0]);
+		if (pVarResult == null) return new Variant ();
+		if (pVarResult.getType () == COM.VT_EMPTY) {
 			pVarResult.dispose ();
+			return new Variant ();
+		}
+		OleAutomation document = pVarResult.getAutomation ();
+		pVarResult.dispose ();
 
-			/* get IHTMLWindow2 */
-			rgdispid = document.getIDsOfNames (new String[] {"parentWindow"}); //$NON-NLS-1$
-			if (rgdispid == null) {
-				document.dispose ();
-				return new Variant ();
-			}
-			pVarResult = document.getProperty (rgdispid[0]);
-			if (pVarResult == null || pVarResult.getType () == COM.VT_EMPTY) {
-				if (pVarResult != null) pVarResult.dispose ();
-				document.dispose ();
-				return new Variant ();	
-			}
-			OleAutomation ihtmlWindow2 = pVarResult.getAutomation ();
-			pVarResult.dispose ();
+		/* get IHTMLWindow2 */
+		rgdispid = document.getIDsOfNames (new String[] {"parentWindow"}); //$NON-NLS-1$
+		if (rgdispid == null) {
 			document.dispose ();
+			return new Variant ();
+		}
+		pVarResult = document.getProperty (rgdispid[0]);
+		if (pVarResult == null || pVarResult.getType () == COM.VT_EMPTY) {
+			if (pVarResult != null) pVarResult.dispose ();
+			document.dispose ();
+			return new Variant ();	
+		}
+		OleAutomation ihtmlWindow2 = pVarResult.getAutomation ();
+		pVarResult.dispose ();
+		document.dispose ();
 
-			/* create a new JS array to be returned */
-			rgdispid = ihtmlWindow2.getIDsOfNames (new String[] {"Array"}); //$NON-NLS-1$
-			if (rgdispid == null) {
-				ihtmlWindow2.dispose ();
-				return new Variant ();
-			}
-			Variant arrayType = ihtmlWindow2.getProperty (rgdispid[0]);
+		/* create a new JS array to be returned */
+		rgdispid = ihtmlWindow2.getIDsOfNames (new String[] {"Array"}); //$NON-NLS-1$
+		if (rgdispid == null) {
 			ihtmlWindow2.dispose ();
-			IDispatch arrayTypeDispatch = arrayType.getDispatch ();
-			arrayType.dispose ();
-
-			int /*long*/[] result = new int /*long*/[1];
-			int rc = arrayTypeDispatch.QueryInterface (COM.IIDIDispatchEx, result);
-			if (rc != COM.S_OK) return new Variant ();
-			IDispatchEx arrayTypeDispatchEx = new IDispatchEx (result[0]);
-			result[0] = 0;
-			int /*long*/ resultPtr = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
-			DISPPARAMS params = new DISPPARAMS ();
-			rc = arrayTypeDispatchEx.InvokeEx (COM.DISPID_VALUE, COM.LOCALE_USER_DEFAULT, COM.DISPATCH_CONSTRUCT, params, resultPtr, null, 0);
-			if (rc != COM.S_OK) {
-				OS.GlobalFree (resultPtr);
-				return new Variant ();	
-			}
-			Variant array = Variant.win32_new (resultPtr);
+			return new Variant ();
+		}
+		Variant arrayType = ihtmlWindow2.getProperty (rgdispid[0]);
+		ihtmlWindow2.dispose ();
+		IDispatch arrayTypeDispatch = arrayType.getDispatch ();
+		arrayType.dispose ();
+
+		int /*long*/[] result = new int /*long*/[1];
+		int rc = arrayTypeDispatch.QueryInterface (COM.IIDIDispatchEx, result);
+		if (rc != COM.S_OK) return new Variant ();
+		IDispatchEx arrayTypeDispatchEx = new IDispatchEx (result[0]);
+		result[0] = 0;
+		int /*long*/ resultPtr = OS.GlobalAlloc (OS.GMEM_FIXED | OS.GMEM_ZEROINIT, VARIANT.sizeof);
+		DISPPARAMS params = new DISPPARAMS ();
+		rc = arrayTypeDispatchEx.InvokeEx (COM.DISPID_VALUE, COM.LOCALE_USER_DEFAULT, COM.DISPATCH_CONSTRUCT, params, resultPtr, null, 0);
+		if (rc != COM.S_OK) {
 			OS.GlobalFree (resultPtr);
+			return new Variant ();	
+		}
+		Variant array = Variant.win32_new (resultPtr);
+		OS.GlobalFree (resultPtr);
 
-			/* populate the array */
-			auto = array.getAutomation ();
-			int[] rgdispids = auto.getIDsOfNames (new String[] {"push"}); //$NON-NLS-1$
-			if (rgdispids != null) {
-				for (int i = 0; i < length; i++) {
-					Object currentObject = arrayValue[i];
-					try {
-						Variant variant = convertToJS (currentObject);
-						auto.invoke (rgdispids[0], new Variant[] {variant});
-						variant.dispose ();
-					} catch (SWTException e) {
-						/* invalid return value type */
-						auto.dispose ();
-						array.dispose ();
-						throw e;
-					}
+		/* populate the array */
+		Object[] arrayValue = (Object[])value;
+		int length = arrayValue.length;
+		auto = array.getAutomation ();
+		int[] rgdispids = auto.getIDsOfNames (new String[] {"push"}); //$NON-NLS-1$
+		if (rgdispids != null) {
+			for (int i = 0; i < length; i++) {
+				Object currentObject = arrayValue[i];
+				try {
+					Variant variant = convertToJS (currentObject);
+					auto.invoke (rgdispids[0], new Variant[] {variant});
+					variant.dispose ();
+				} catch (SWTException e) {
+					/* invalid return value type */
+					auto.dispose ();
+					array.dispose ();
+					throw e;
 				}
 			}
-			auto.dispose ();
-			return array;
 		}
+		auto.dispose ();
+		return array;
 	}
 	SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
 	return null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/wpf/org/eclipse/swt/browser/IE.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/wpf/org/eclipse/swt/browser/IE.java
index babe61d..72ac7de 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/wpf/org/eclipse/swt/browser/IE.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Browser/wpf/org/eclipse/swt/browser/IE.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ class IE extends WebBrowser {
 		};
 	}
 
-public void create(Composite parent, int style) {
+public boolean create(Composite parent, int style) {
 	frame = OS.gcnew_Frame();
 	if (frame == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	OS.Frame_NavigationUIVisibility(frame, OS.NavigationUIVisibility_Hidden);
@@ -64,6 +64,8 @@ public void create(Composite parent, int style) {
 	};
 	browser.addListener(SWT.Resize, listener);
 	browser.addListener(SWT.Dispose, listener);
+
+	return true;
 }
 
 public boolean back() {
@@ -142,7 +144,7 @@ public void refresh() {
 	OS.Frame_Refresh(frame);
 }
 
-public boolean setText(String html) {
+public boolean setText(String html, boolean trusted) {
 	return true;
 //	/*
 //	* If the html field is non-null then the about:blank page is already being
@@ -201,7 +203,7 @@ public boolean setText(String html) {
 //	return result;
 }
 
-public boolean setUrl(String url) {
+public boolean setUrl(String url, String postData, String[] headers) {
 	if (url.indexOf(':') == -1) url = "http://" + url;
 	int length = url.length ();
 	char [] buffer = new char [length + 1];
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentEvent.java
index cafd31f..d632d41 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/BidiSegmentEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,10 +15,12 @@ import org.eclipse.swt.events.*;
 
 /**
  * This event is sent to BidiSegmentListeners when a line is to
- * be measured or rendered in a bidi locale.  The segments field is 
- * used to specify text ranges in the line that should be treated as 
- * separate segments for bidi reordering.  Each segment will be reordered 
- * and rendered separately.
+ * be measured or rendered in a bidi locale.  
+ * The segments field can be used in conjunction with the segmentsChars
+ * field or by itself. Setting only the segmentsChars field has no effect.
+ * When used by itself, the segments field specify text ranges in the line
+ * that should be treated as separate segments for bidi reordering.  Each 
+ * segment will be reordered and rendered separately.
  * <p>
  * The elements in the segments field specify the start offset of 
  * a segment relative to the start of the line. They must follow
@@ -56,6 +58,18 @@ import org.eclipse.swt.events.*;
  * 		"R4R5R6". 
  *		visual line = "R3R2R1" + "R6R5R4"
  * </pre>
+ * 
+ * <p>
+ * The segments and segementsChars fields can be used together to obtain different
+ * types of bidi reordering and text display. The application can use these two fields
+ * to insert Unicode Control Characters in specific offsets in the line, the character
+ * at segmentsChars[i] is inserted at the offset specified by segments[i]. When both fields 
+ * are set, the rules for the segments field are less restrictive:
+ * <ul>
+ * <li>elements must be in ascending order, duplicates are allowed
+ * <li>elements must not exceed the line length
+ * </ul>
+ * </p>
  *
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
@@ -75,6 +89,13 @@ public class BidiSegmentEvent extends TypedEvent {
 	 * bidi segments, see above 
 	 */
 	public int[] segments;
+
+	/** 
+	 * characters to be used in the segment boundaries (optional)
+	 * 
+	 * @since 3.6
+	 */
+	public char[] segmentsChars;
 		
 	static final long serialVersionUID = 3257846571587547957L;
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index f07a52a..aceaced 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -136,6 +136,12 @@ public CCombo (Composite parent, int style) {
 	filter = new Listener() {
 		public void handleEvent(Event event) {
 			if (isDisposed ()) return;
+			if (event.type == SWT.Selection) {
+				if (event.widget instanceof ScrollBar) {
+					handleScroll(event);
+				}
+				return;
+			}
 			Shell shell = ((Control)event.widget).getShell ();
 			if (shell == CCombo.this.getShell ()) {
 				handleFocus (SWT.FocusOut);
@@ -146,10 +152,13 @@ public CCombo (Composite parent, int style) {
 	int [] comboEvents = {SWT.Dispose, SWT.FocusIn, SWT.Move, SWT.Resize};
 	for (int i=0; i<comboEvents.length; i++) this.addListener (comboEvents [i], listener);
 	
-	int [] textEvents = {SWT.DefaultSelection, SWT.KeyDown, SWT.KeyUp, SWT.MenuDetect, SWT.Modify, SWT.MouseDown, SWT.MouseUp, SWT.MouseDoubleClick, SWT.MouseWheel, SWT.Traverse, SWT.FocusIn, SWT.Verify};
+	int [] textEvents = {SWT.DefaultSelection, SWT.DragDetect, SWT.KeyDown, SWT.KeyUp, SWT.MenuDetect, SWT.Modify,
+		SWT.MouseDown, SWT.MouseUp, SWT.MouseDoubleClick, SWT.MouseEnter, SWT.MouseExit, SWT.MouseHover,
+		SWT.MouseMove, SWT.MouseWheel, SWT.Traverse, SWT.FocusIn, SWT.Verify};
 	for (int i=0; i<textEvents.length; i++) text.addListener (textEvents [i], listener);
 	
-	int [] arrowEvents = {SWT.MouseDown, SWT.MouseUp, SWT.Selection, SWT.FocusIn};
+	int [] arrowEvents = {SWT.DragDetect, SWT.MouseDown, SWT.MouseEnter, SWT.MouseExit, SWT.MouseHover,
+		SWT.MouseMove, SWT.MouseUp, SWT.MouseWheel, SWT.Selection, SWT.FocusIn};
 	for (int i=0; i<arrowEvents.length; i++) arrow.addListener (arrowEvents [i], listener);
 	
 	createPopup(null, -1);
@@ -296,26 +305,42 @@ void arrowEvent (Event event) {
 			handleFocus (SWT.FocusIn);
 			break;
 		}
-		case SWT.MouseDown: {
-			Event mouseEvent = new Event ();
-			mouseEvent.button = event.button;
-			mouseEvent.count = event.count;
-			mouseEvent.stateMask = event.stateMask;
-			mouseEvent.time = event.time;
-			mouseEvent.x = event.x; mouseEvent.y = event.y;
-			notifyListeners (SWT.MouseDown, mouseEvent);
-			event.doit = mouseEvent.doit;
+		case SWT.DragDetect:
+		case SWT.MouseDown:
+		case SWT.MouseUp:
+		case SWT.MouseMove:
+		case SWT.MouseEnter:
+		case SWT.MouseExit:
+		case SWT.MouseHover: {
+			Point pt = getDisplay ().map (arrow, this, event.x, event.y);
+			event.x = pt.x; event.y = pt.y;
+			notifyListeners (event.type, event);
+			event.type = SWT.None;
 			break;
 		}
-		case SWT.MouseUp: {
-			Event mouseEvent = new Event ();
-			mouseEvent.button = event.button;
-			mouseEvent.count = event.count;
-			mouseEvent.stateMask = event.stateMask;
-			mouseEvent.time = event.time;
-			mouseEvent.x = event.x; mouseEvent.y = event.y;
-			notifyListeners (SWT.MouseUp, mouseEvent);
-			event.doit = mouseEvent.doit;
+		case SWT.MouseWheel: {
+			Point pt = getDisplay ().map (arrow, this, event.x, event.y);
+			event.x = pt.x; event.y = pt.y;
+			notifyListeners (SWT.MouseWheel, event);
+			event.type = SWT.None;
+			if (isDisposed ()) break;
+			if (!event.doit) break;
+			if (event.count != 0) {
+				event.doit = false;
+				int oldIndex = getSelectionIndex ();
+				if (event.count > 0) {
+					select (Math.max (oldIndex - 1, 0));
+				} else {
+					select (Math.min (oldIndex + 1, getItemCount () - 1));
+				}
+				if (oldIndex != getSelectionIndex ()) {
+					Event e = new Event();
+					e.time = event.time;
+					e.stateMask = event.stateMask;
+					notifyListeners (SWT.Selection, e);
+				}
+				if (isDisposed ()) break;
+			}
 			break;
 		}
 		case SWT.Selection: {
@@ -513,7 +538,9 @@ public void deselectAll () {
 }
 void dropDown (boolean drop) {
 	if (drop == isDropped ()) return;
+	Display display = getDisplay ();
 	if (!drop) {
+		display.removeFilter (SWT.Selection, filter);
 		popup.setVisible (false);
 		if (!isDisposed () && isFocusControl()) {
 			text.setFocus();
@@ -540,7 +567,6 @@ void dropDown (boolean drop) {
 	
 	int index = list.getSelectionIndex ();
 	if (index != -1) list.setTopIndex (index);
-	Display display = getDisplay ();
 	Rectangle listRect = list.getBounds ();
 	Rectangle parentRect = display.map (getParent (), null, getBounds ());
 	Point comboSize = getSize ();
@@ -554,6 +580,14 @@ void dropDown (boolean drop) {
 	popup.setBounds (x, y, width, height);
 	popup.setVisible (true);
 	if (isFocusControl()) list.setFocus ();
+	
+	/*
+	 * Add a filter to listen to scrolling of the parent composite, when the
+	 * drop-down is visible. Remove the filter when drop-down is not
+	 * visible.
+	 */
+	display.removeFilter (SWT.Selection, filter);
+	display.addFilter (SWT.Selection, filter);
 }
 /*
  * Return the lowercase of the first non-'&' character following
@@ -576,13 +610,16 @@ char _findMnemonic (String string) {
  * Return the Label immediately preceding the receiver in the z-order, 
  * or null if none. 
  */
-Label getAssociatedLabel () {
+String getAssociatedLabel () {
 	Control[] siblings = getParent ().getChildren ();
 	for (int i = 0; i < siblings.length; i++) {
 		if (siblings [i] == this) {
-			if (i > 0 && siblings [i-1] instanceof Label) {
-				return (Label) siblings [i-1];
+			if (i > 0) {
+				Control sibling = siblings [i-1];
+				if (sibling instanceof Label) return ((Label) sibling).getText();
+				if (sibling instanceof CLabel) return ((CLabel) sibling).getText();
 			}
+			break;
 		}
 	}
 	return null;
@@ -846,6 +883,12 @@ void handleFocus (int type) {
 		}
 	}
 }
+void handleScroll(Event event) {
+	ScrollBar scrollBar = (ScrollBar)event.widget;
+	Control scrollableParent = scrollBar.getParent();
+	if (scrollableParent.equals(list)) return;
+	if (isParentScrolling(scrollableParent)) dropDown(false);
+}
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -897,22 +940,19 @@ void initAccessible() {
 	AccessibleAdapter accessibleAdapter = new AccessibleAdapter () {
 		public void getName (AccessibleEvent e) {
 			String name = null;
-			Label label = getAssociatedLabel ();
-			if (label != null) {
-				name = stripMnemonic (label.getText());
+			String text = getAssociatedLabel ();
+			if (text != null) {
+				name = stripMnemonic (text);
 			}
 			e.result = name;
 		}
 		public void getKeyboardShortcut(AccessibleEvent e) {
 			String shortcut = null;
-			Label label = getAssociatedLabel ();
-			if (label != null) {
-				String text = label.getText ();
-				if (text != null) {
-					char mnemonic = _findMnemonic (text);
-					if (mnemonic != '\0') {
-						shortcut = "Alt+"+mnemonic; //$NON-NLS-1$
-					}
+			String text = getAssociatedLabel ();
+			if (text != null) {
+				char mnemonic = _findMnemonic (text);
+				if (mnemonic != '\0') {
+					shortcut = "Alt+"+mnemonic; //$NON-NLS-1$
 				}
 			}
 			e.result = shortcut;
@@ -1004,6 +1044,15 @@ public boolean isFocusControl () {
 	} 
 	return super.isFocusControl ();
 }
+boolean isParentScrolling(Control scrollableParent) {
+	Control parent = this.getParent();
+	while (parent != null) {
+		if (parent.equals(scrollableParent))
+			return true;
+		parent = parent.getParent();
+	}
+	return false;
+}
 void internalLayout (boolean changed) {
 	if (isDropped ()) dropDown (false);
 	Rectangle rect = getClientArea ();
@@ -1068,6 +1117,7 @@ void listEvent (Event event) {
 			e.doit = event.doit;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			notifyListeners (SWT.Traverse, e);
 			event.doit = e.doit;
 			event.detail = e.detail;
@@ -1078,8 +1128,10 @@ void listEvent (Event event) {
 			e.time = event.time;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			e.stateMask = event.stateMask;
 			notifyListeners (SWT.KeyUp, e);
+			event.doit = e.doit;
 			break;
 		}
 		case SWT.KeyDown: {
@@ -1105,8 +1157,10 @@ void listEvent (Event event) {
 			e.time = event.time;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			e.stateMask = event.stateMask;
 			notifyListeners(SWT.KeyDown, e);
+			event.doit = e.doit;
 			break;
 			
 		}
@@ -1617,11 +1671,24 @@ void textEvent (Event event) {
 			notifyListeners (SWT.DefaultSelection, e);
 			break;
 		}
+		case SWT.DragDetect:
+		case SWT.MouseDoubleClick:
+		case SWT.MouseMove:
+		case SWT.MouseEnter:
+		case SWT.MouseExit:
+		case SWT.MouseHover: {
+			Point pt = getDisplay ().map (text, this, event.x, event.y);
+			event.x = pt.x; event.y = pt.y;
+			notifyListeners (event.type, event);
+			event.type = SWT.None;
+			break;
+		}
 		case SWT.KeyDown: {
 			Event keyEvent = new Event ();
 			keyEvent.time = event.time;
 			keyEvent.character = event.character;
 			keyEvent.keyCode = event.keyCode;
+			keyEvent.keyLocation = event.keyLocation;
 			keyEvent.stateMask = event.stateMask;
 			notifyListeners (SWT.KeyDown, keyEvent);
 			if (isDisposed ()) break;
@@ -1661,6 +1728,7 @@ void textEvent (Event event) {
 			e.time = event.time;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			e.stateMask = event.stateMask;
 			notifyListeners (SWT.KeyUp, e);
 			event.doit = e.doit;
@@ -1680,12 +1748,13 @@ void textEvent (Event event) {
 			break;
 		}
 		case SWT.MouseDown: {
+			Point pt = getDisplay ().map (text, this, event.x, event.y);
 			Event mouseEvent = new Event ();
 			mouseEvent.button = event.button;
 			mouseEvent.count = event.count;
 			mouseEvent.stateMask = event.stateMask;
 			mouseEvent.time = event.time;
-			mouseEvent.x = event.x; mouseEvent.y = event.y;
+			mouseEvent.x = pt.x; mouseEvent.y = pt.y;
 			notifyListeners (SWT.MouseDown, mouseEvent);
 			if (isDisposed ()) break;
 			event.doit = mouseEvent.doit;
@@ -1699,12 +1768,13 @@ void textEvent (Event event) {
 			break;
 		}
 		case SWT.MouseUp: {
+			Point pt = getDisplay ().map (text, this, event.x, event.y);
 			Event mouseEvent = new Event ();
 			mouseEvent.button = event.button;
 			mouseEvent.count = event.count;
 			mouseEvent.stateMask = event.stateMask;
 			mouseEvent.time = event.time;
-			mouseEvent.x = event.x; mouseEvent.y = event.y;
+			mouseEvent.x = pt.x; mouseEvent.y = pt.y;
 			notifyListeners (SWT.MouseUp, mouseEvent);
 			if (isDisposed ()) break;
 			event.doit = mouseEvent.doit;
@@ -1714,24 +1784,10 @@ void textEvent (Event event) {
 			text.selectAll ();
 			break;
 		}
-		case SWT.MouseDoubleClick: {
-			Event mouseEvent = new Event ();
-			mouseEvent.button = event.button;
-			mouseEvent.count = event.count;
-			mouseEvent.stateMask = event.stateMask;
-			mouseEvent.time = event.time;
-			mouseEvent.x = event.x; mouseEvent.y = event.y;
-			notifyListeners (SWT.MouseDoubleClick, mouseEvent);
-			break;
-		}
 		case SWT.MouseWheel: {
-			Event keyEvent = new Event ();
-			keyEvent.time = event.time;
-			keyEvent.keyCode = event.count > 0 ? SWT.ARROW_UP : SWT.ARROW_DOWN;
-			keyEvent.stateMask = event.stateMask;
-			notifyListeners (SWT.KeyDown, keyEvent);
+			notifyListeners (SWT.MouseWheel, event);
+			event.type = SWT.None;
 			if (isDisposed ()) break;
-			event.doit = keyEvent.doit;
 			if (!event.doit) break;
 			if (event.count != 0) {
 				event.doit = false;
@@ -1771,6 +1827,7 @@ void textEvent (Event event) {
 			e.doit = event.doit;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			notifyListeners (SWT.Traverse, e);
 			event.doit = e.doit;
 			event.detail = e.detail;
@@ -1783,11 +1840,25 @@ void textEvent (Event event) {
 			e.end = event.end;
 			e.character = event.character;
 			e.keyCode = event.keyCode;
+			e.keyLocation = event.keyLocation;
 			e.stateMask = event.stateMask;
 			notifyListeners (SWT.Verify, e);
+			event.text = e.text;
 			event.doit = e.doit;
 			break;
 		}
 	}
 }
+public boolean traverse(int event){
+    /*
+     * When the traverse event is sent to the CCombo, it will create a list of
+     * controls to tab to next. Since the CCombo is a composite, the next control is
+     * the Text field which is a child of the CCombo. It will set focus to the text
+     * field which really is itself. So, call the traverse next events directly on the text.
+     */
+    if (event == SWT.TRAVERSE_ARROW_NEXT || event == SWT.TRAVERSE_TAB_NEXT) {
+    	return text.traverse(event);
+    }
+    return super.traverse(event);
+}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
index ddd3c6a..b45797e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,13 +48,15 @@ public class CLabel extends Canvas {
 	/** Gap between icon and text */
 	private static final int GAP = 5;
 	/** Left and right margins */
-	private static final int INDENT = 3;
+	private static final int DEFAULT_MARGIN = 3;
 	/** a string inserted in the middle of text that has been shortened */
 	private static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026"
 	/** the alignment. Either CENTER, RIGHT, LEFT. Default is LEFT*/
 	private int align = SWT.LEFT;
-	private int hIndent = INDENT;
-	private int vIndent = INDENT;
+	private int leftMargin = DEFAULT_MARGIN;
+	private int topMargin = DEFAULT_MARGIN;
+	private int rightMargin = DEFAULT_MARGIN;
+	private int bottomMargin = DEFAULT_MARGIN;
 	/** the current text */
 	private String text;
 	/** the current icon */
@@ -65,13 +67,13 @@ public class CLabel extends Canvas {
 	// The appToolTip stores the tooltip set by the application.  Control.tooltiptext 
 	// contains whatever tooltip is currently being displayed.
 	private String appToolTipText;
+	private boolean ignoreDispose;
 	
 	private Image backgroundImage;
 	private Color[] gradientColors;
 	private int[] gradientPercents;
 	private boolean gradientVertical;
 	private Color background;
-	private Listener disposeListener;
 	
 	private static int DRAW_FLAGS = SWT.DRAW_MNEMONIC | SWT.DRAW_TAB | SWT.DRAW_TRANSPARENT | SWT.DRAW_DELIMITER;
 
@@ -113,7 +115,7 @@ public CLabel(Composite parent, int style) {
 	if ((style & SWT.RIGHT) != 0)  align = SWT.RIGHT;
 	if ((style & SWT.LEFT) != 0)   align = SWT.LEFT;
 	
-	addPaintListener(new PaintListener(){
+	addPaintListener(new PaintListener() {
 		public void paintControl(PaintEvent event) {
 			onPaint(event);
 		}
@@ -127,11 +129,11 @@ public CLabel(Composite parent, int style) {
 		}
 	});
 	
-	disposeListener = new Listener() {
+	addListener(SWT.Dispose, new Listener() {
 		public void handleEvent(Event event) {
 			onDispose(event);
 		}
-	};
+	});
 	
 	initAccessible();
 
@@ -158,12 +160,12 @@ public Point computeSize(int wHint, int hHint, boolean changed) {
 	checkWidget();
 	Point e = getTotalSize(image, text);
 	if (wHint == SWT.DEFAULT){
-		e.x += 2*hIndent;
+		e.x += leftMargin + rightMargin;
 	} else {
 		e.x = wHint;
 	}
 	if (hHint == SWT.DEFAULT) {
-		e.y += 2*vIndent;
+		e.y += topMargin + bottomMargin;
 	} else {
 		e.y = hHint;
 	}
@@ -199,7 +201,7 @@ char _findMnemonic (String string) {
  	return '\0';
 }
 /**
- * Returns the alignment.
+ * Returns the horizontal alignment.
  * The alignment style (LEFT, CENTER or RIGHT) is returned.
  * 
  * @return SWT.LEFT, SWT.RIGHT or SWT.CENTER
@@ -209,6 +211,17 @@ public int getAlignment() {
 	return align;
 }
 /**
+ * Return the CLabel's bottom margin.
+ * 
+ * @return the bottom margin of the label
+ * 
+ * @since 3.6
+ */
+public int getBottomMargin() {
+	//checkWidget();
+	return bottomMargin;
+}
+/**
  * Return the CLabel's image or <code>null</code>.
  * 
  * @return the image of the label or null
@@ -218,6 +231,28 @@ public Image getImage() {
 	return image;
 }
 /**
+ * Return the CLabel's left margin.
+ * 
+ * @return the left margin of the label
+ * 
+ * @since 3.6
+ */
+public int getLeftMargin() {
+	//checkWidget();
+	return leftMargin;
+}
+/**
+ * Return the CLabel's right margin.
+ * 
+ * @return the right margin of the label
+ * 
+ * @since 3.6
+ */
+public int getRightMargin() {
+	//checkWidget();
+	return rightMargin;
+}
+/**
  * Compute the minimum size.
  */
 private Point getTotalSize(Image image, String text) {
@@ -265,6 +300,17 @@ public String getToolTipText () {
 	checkWidget();
 	return appToolTipText;
 }
+/**
+ * Return the CLabel's top margin.
+ *  
+ * @return the top margin of the label
+ * 
+ * @since 3.6
+ */
+public int getTopMargin() {
+	//checkWidget();
+	return topMargin;
+}
 private void initAccessible() {
 	Accessible accessible = getAccessible();
 	accessible.addAccessibleListener(new AccessibleAdapter() {
@@ -311,9 +357,14 @@ private void initAccessible() {
 	});
 }
 void onDispose(Event event) {
-	removeListener(SWT.Dispose, disposeListener);
-	notifyListeners(SWT.Dispose, event);
-	event.type = SWT.None;
+	/* make this handler run after other dispose listeners */
+	if (ignoreDispose) {
+		ignoreDispose = false;
+		return;
+	}
+	ignoreDispose = true;
+	notifyListeners (event.type, event);
+	event.type = SWT.NONE;
 
 	gradientColors = null;
 	gradientPercents = null;
@@ -352,7 +403,7 @@ void onPaint(PaintEvent event) {
 	boolean shortenText = false;
 	String t = text;
 	Image img = image;
-	int availableWidth = Math.max(0, rect.width - 2*hIndent);
+	int availableWidth = Math.max(0, rect.width - (leftMargin + rightMargin));
 	Point extent = getTotalSize(img, t);
 	if (extent.x > availableWidth) {
 		img = null;
@@ -385,12 +436,12 @@ void onPaint(PaintEvent event) {
 	}
 		
 	// determine horizontal position
-	int x = rect.x + hIndent;
+	int x = rect.x + leftMargin;
 	if (align == SWT.CENTER) {
 		x = (rect.width - extent.x)/2;
 	}
 	if (align == SWT.RIGHT) {
-		x = rect.width - hIndent - extent.x;
+		x = rect.width - rightMargin - extent.x;
 	}
 	
 	// draw a background image behind the text
@@ -466,19 +517,47 @@ void onPaint(PaintEvent event) {
 		paintBorder(gc, rect);
 	}
 
+	/*
+	 * Compute text height and image height. If image height is more than
+	 * the text height, draw image starting from top margin. Else draw text
+	 * starting from top margin.
+	 */
+	Rectangle imageRect = null;
+	int lineHeight = 0, textHeight = 0, imageHeight = 0;
+	
+	if (img != null) {
+	    imageRect = img.getBounds();
+	    imageHeight = imageRect.height;
+	}
+	if (lines != null) {
+	    lineHeight = gc.getFontMetrics().getHeight();
+	    textHeight = lines.length * lineHeight;
+	}
+	
+	int imageY = 0, midPoint = 0, lineY = 0;
+	if (imageHeight > textHeight ) {
+	    if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) imageY = rect.y + (rect.height - imageHeight) / 2;
+	    else imageY = topMargin;
+	    midPoint = imageY + imageHeight/2;
+	    lineY = midPoint - textHeight / 2;
+	}
+	else {
+	    if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) lineY = rect.y + (rect.height - textHeight) / 2;
+	    else lineY = topMargin;
+	    midPoint = lineY + textHeight/2;
+	    imageY = midPoint - imageHeight / 2;
+	}
+	
 	// draw the image
 	if (img != null) {
-		Rectangle imageRect = img.getBounds();
-		gc.drawImage(img, 0, 0, imageRect.width, imageRect.height, 
-		                x, (rect.height-imageRect.height)/2, imageRect.width, imageRect.height);
+		gc.drawImage(img, 0, 0, imageRect.width, imageHeight, 
+		                x, imageY, imageRect.width, imageHeight);
 		x +=  imageRect.width + GAP;
 		extent.x -= imageRect.width + GAP;
 	}
+	
 	// draw the text
 	if (lines != null) {
-		int lineHeight = gc.getFontMetrics().getHeight();
-		int textHeight = lines.length * lineHeight;
-		int lineY = Math.max(vIndent, rect.y + (rect.height - textHeight) / 2);
 		gc.setForeground(getForeground());
 		for (int i = 0; i < lines.length; i++) {
 			int lineX = x;
@@ -489,7 +568,7 @@ void onPaint(PaintEvent event) {
 				}
 				if (align == SWT.RIGHT) {
 					int lineWidth = gc.textExtent(lines[i], DRAW_FLAGS).x;
-					lineX = Math.max(x, rect.x + rect.width - hIndent - lineWidth);
+					lineX = Math.max(x, rect.x + rect.width - rightMargin - lineWidth);
 				}
 			}
 			gc.drawText(lines[i], lineX, lineY, DRAW_FLAGS);
@@ -522,7 +601,7 @@ private void paintBorder(GC gc, Rectangle r) {
 	}
 }
 /**
- * Set the alignment of the CLabel.
+ * Set the horizontal alignment of the CLabel.
  * Use the values LEFT, CENTER and RIGHT to align image and text within the available space.
  * 
  * @param align the alignment style of LEFT, RIGHT or CENTER
@@ -703,6 +782,24 @@ public void setBackground(Image image) {
 	redraw();
 	
 }
+/**
+ * Set the label's bottom margin, in pixels.
+ * 
+ * @param bottomMargin the bottom margin of the label, which must be equal to or greater than zero
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void setBottomMargin(int bottomMargin) {
+    checkWidget();
+    if (this.bottomMargin == bottomMargin || bottomMargin < 0) return;
+    this.bottomMargin = bottomMargin;
+    redraw();
+}
 public void setFont(Font font) {
 	super.setFont(font);
 	redraw();
@@ -726,6 +823,64 @@ public void setImage(Image image) {
 	}
 }
 /**
+ * Set the label's horizontal left margin, in pixels.
+ * 
+ * @param leftMargin the left margin of the label, which must be equal to or greater than zero
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void setLeftMargin(int leftMargin) {
+    checkWidget();
+    if (this.leftMargin == leftMargin || leftMargin < 0) return;
+    this.leftMargin = leftMargin;
+    redraw();
+}
+/** 
+ * Set the label's margins, in pixels.
+ * 
+ * @param leftMargin the left margin.
+ * @param topMargin the top margin.
+ * @param rightMargin the right margin.
+ * @param bottomMargin the bottom margin.
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void setMargins (int leftMargin, int topMargin, int rightMargin, int bottomMargin) {
+	checkWidget();
+	this.leftMargin = Math.max(0, leftMargin);
+	this.topMargin = Math.max(0, topMargin);
+	this.rightMargin = Math.max(0, rightMargin);
+	this.bottomMargin = Math.max(0, bottomMargin);
+	redraw();
+}
+/**
+ * Set the label's right margin, in pixels.
+ * 
+ * @param rightMargin the right margin of the label, which must be equal to or greater than zero
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void setRightMargin(int rightMargin) {
+    checkWidget();
+    if (this.rightMargin == rightMargin || rightMargin < 0) return;
+    this.rightMargin = rightMargin;
+    redraw();
+}
+/**
  * Set the label's text.
  * The value <code>null</code> clears it.
  * <p>
@@ -759,6 +914,24 @@ public void setToolTipText (String string) {
 	appToolTipText = super.getToolTipText();
 }
 /**
+ * Set the label's top margin, in pixels.
+ * 
+ * @param topMargin the top margin of the label, which must be equal to or greater than zero
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void setTopMargin(int topMargin) {
+    checkWidget();
+    if (this.topMargin == topMargin || topMargin < 0) return;
+    this.topMargin = topMargin;
+    redraw();
+}
+/**
  * Shorten the given text <code>t</code> so that its length doesn't exceed
  * the given width. The default implementation replaces characters in the
  * center of the original string with an ellipsis ("...").
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 9d26184..6549c46 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,15 +107,16 @@ public class CTabFolder extends Composite {
 	public static RGB borderOutsideRGB = new RGB (171, 168, 165); 
 
 	/* sizing, positioning */
-	int xClient, yClient;
 	boolean onBottom = false;
 	boolean single = false;
 	boolean simple = true;
 	int fixedTabHeight = SWT.DEFAULT;
 	int tabHeight;
 	int minChars = 20;
+	boolean borderVisible = false;
 	
 	/* item management */
+	CTabFolderRenderer renderer;
 	CTabItem items[] = new CTabItem[0];
 	int firstIndex = -1; // index of the left most visible tab.
 	int selectedIndex = -1;
@@ -127,7 +128,7 @@ public class CTabFolder extends Composite {
 	/* External Listener management */
 	CTabFolder2Listener[] folderListeners = new CTabFolder2Listener[0];
 	// support for deprecated listener mechanism
-	CTabFolderListener[] tabListeners = new CTabFolderListener[0]; 
+	CTabFolderListener[] tabListeners = new CTabFolderListener[0];
 	
 	/* Selected item appearance */
 	Image selectionBgImage;
@@ -135,63 +136,37 @@ public class CTabFolder extends Composite {
 	int[] selectionGradientPercents;
 	boolean selectionGradientVertical;
 	Color selectionForeground;
-	Color selectionBackground;  //selection fade end
-	Color selectionFadeStart;
-	
-	Color selectionHighlightGradientBegin = null;  //null == no highlight
-	//Although we are given new colours all the time to show different states (active, etc),
-	//some of which may have a highlight and some not, we'd like to retain the highlight colours
-	//as a cache so that we can reuse them if we're again told to show the highlight.
-	//We are relying on the fact that only one tab state usually gets a highlight, so only
-	//a single cache is required. If that happens to not be true, cache simply becomes less effective,
-	//but we don't leak colours.
-	Color[] selectionHighlightGradientColorsCache = null;  //null is a legal value, check on access
+	Color selectionBackground;
 	
 	/* Unselected item appearance */
-	Color[] gradientColors;
+	Color[] gradientColors; 
 	int[] gradientPercents;
 	boolean gradientVertical;
 	boolean showUnselectedImage = true;
 	
 	// close, min/max and chevron buttons
-	Color fillColor;
 	boolean showClose = false;
 	boolean showUnselectedClose = true;
 	
 	Rectangle chevronRect = new Rectangle(0, 0, 0, 0);
-	int chevronImageState = NORMAL;
+	int chevronImageState = SWT.NONE;
 	boolean showChevron = false;
 	Menu showMenu;
 	
 	boolean showMin = false;
 	Rectangle minRect = new Rectangle(0, 0, 0, 0);
 	boolean minimized = false;
-	int minImageState = NORMAL;
+	int minImageState = SWT.NONE;
 	
 	boolean showMax = false;
 	Rectangle maxRect = new Rectangle(0, 0, 0, 0);
 	boolean maximized = false;
-	int maxImageState = NORMAL;
+	int maxImageState = SWT.NONE;
 	
 	Control topRight;
 	Rectangle topRightRect = new Rectangle(0, 0, 0, 0);
 	int topRightAlignment = SWT.RIGHT;
 	
-	// borders and shapes
-	int borderLeft = 0;
-	int borderRight = 0;
-	int borderTop = 0;
-	int borderBottom = 0;
-	
-	int highlight_margin = 0;
-	int highlight_header = 0;
-	
-	int[] curve;
-	int[] topCurveHighlightStart;
-	int[] topCurveHighlightEnd;
-	int curveWidth = 0;
-	int curveIndent = 0;
-	
 	// when disposing CTabFolder, don't try to layout the items or 
 	// change the selection as each child is destroyed.
 	boolean inDispose = false;
@@ -204,54 +179,18 @@ public class CTabFolder extends Composite {
 	// internal constants
 	static final int DEFAULT_WIDTH = 64;
 	static final int DEFAULT_HEIGHT = 64;
-	static final int BUTTON_SIZE = 18;
-
-	static final int[] TOP_LEFT_CORNER = new int[] {0,6, 1,5, 1,4, 4,1, 5,1, 6,0};
-
-	//TOP_LEFT_CORNER_HILITE is laid out in reverse (ie. top to bottom)
-	//so can fade in same direction as right swoop curve
-	static final int[] TOP_LEFT_CORNER_HILITE = new int[] {5,2, 4,2, 3,3, 2,4, 2,5, 1,6};
-
-	static final int[] TOP_RIGHT_CORNER = new int[] {-6,0, -5,1, -4,1, -1,4, -1,5, 0,6};
-	static final int[] BOTTOM_LEFT_CORNER = new int[] {0,-6, 1,-5, 1,-4, 4,-1, 5,-1, 6,0};
-	static final int[] BOTTOM_RIGHT_CORNER = new int[] {-6,0, -5,-1, -4,-1, -1,-4, -1,-5, 0,-6};
-
-	static final int[] SIMPLE_TOP_LEFT_CORNER = new int[] {0,2, 1,1, 2,0};
-	static final int[] SIMPLE_TOP_RIGHT_CORNER = new int[] {-2,0, -1,1, 0,2};
-	static final int[] SIMPLE_BOTTOM_LEFT_CORNER = new int[] {0,-2, 1,-1, 2,0};
-	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER = new int[] {-2,0, -1,-1, 0,-2};
-	static final int[] SIMPLE_UNSELECTED_INNER_CORNER = new int[] {0,0};
-
-	static final int[] TOP_LEFT_CORNER_BORDERLESS = new int[] {0,6, 1,5, 1,4, 4,1, 5,1, 6,0};
-	static final int[] TOP_RIGHT_CORNER_BORDERLESS = new int[] {-7,0, -6,1, -5,1, -2,4, -2,5, -1,6};
-	static final int[] BOTTOM_LEFT_CORNER_BORDERLESS = new int[] {0,-6, 1,-6, 1,-5, 2,-4, 4,-2, 5,-1, 6,-1, 6,0};
-	static final int[] BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-7,0, -7,-1, -6,-1, -5,-2, -3,-4, -2,-5, -2,-6, -1,-6};
-
-	static final int[] SIMPLE_TOP_LEFT_CORNER_BORDERLESS = new int[] {0,2, 1,1, 2,0};
-	static final int[] SIMPLE_TOP_RIGHT_CORNER_BORDERLESS= new int[] {-3,0, -2,1, -1,2};
-	static final int[] SIMPLE_BOTTOM_LEFT_CORNER_BORDERLESS = new int[] {0,-3, 1,-2, 2,-1, 3,0};
-	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-4,0, -3,-1, -2,-2, -1,-3};
-
+	
 	static final int SELECTION_FOREGROUND = SWT.COLOR_LIST_FOREGROUND;
 	static final int SELECTION_BACKGROUND = SWT.COLOR_LIST_BACKGROUND;
-	static final int BORDER1_COLOR = SWT.COLOR_WIDGET_NORMAL_SHADOW;
+	
 	static final int FOREGROUND = SWT.COLOR_WIDGET_FOREGROUND;
 	static final int BACKGROUND = SWT.COLOR_WIDGET_BACKGROUND;
-	static final int BUTTON_BORDER = SWT.COLOR_WIDGET_DARK_SHADOW;
-	static final int BUTTON_FILL = SWT.COLOR_LIST_BACKGROUND;
-	
-	static final int NONE = 0;
-	static final int NORMAL = 1;
-	static final int HOT = 2;
-	static final int SELECTED = 3;
-	static final RGB CLOSE_FILL = new RGB(252, 160, 160);
 	
 	static final int CHEVRON_CHILD_ID = 0;
 	static final int MINIMIZE_CHILD_ID = 1;
 	static final int MAXIMIZE_CHILD_ID = 2;
 	static final int EXTRA_CHILD_ID_COUNT = 3;
 	
-
 /**
  * Constructs a new instance of this class given its parent
  * and a style value describing its behavior and appearance.
@@ -297,19 +236,14 @@ void init(int style) {
 //	showMin = (style2 & SWT.MIN) != 0; - conflicts with SWT.TOP
 //	showMax = (style2 & SWT.MAX) != 0; - conflicts with SWT.BOTTOM
 	single = (style2 & SWT.SINGLE) != 0;
-	borderLeft = borderRight = (style & SWT.BORDER) != 0 ? 1 : 0;
-	borderTop = onBottom ? borderLeft : 0;
-	borderBottom = onBottom ? 0 : borderLeft;
-	highlight_header = (style & SWT.FLAT) != 0 ? 1 : 3;
-	highlight_margin = (style & SWT.FLAT) != 0 ? 0 : 2;
+	borderVisible = (style & SWT.BORDER) != 0;
 	//set up default colors
 	Display display = getDisplay();
 	selectionForeground = display.getSystemColor(SELECTION_FOREGROUND);
 	selectionBackground = display.getSystemColor(SELECTION_BACKGROUND);
+	renderer = new CTabFolderRenderer(this);
 	updateTabHeight(false);
 	
-	initAccessible();
-	
 	// Add all listeners
 	listener = new Listener() {
 		public void handleEvent(Event event) {
@@ -351,6 +285,8 @@ void init(int style) {
 	for (int i = 0; i < folderEvents.length; i++) {
 		addListener(folderEvents[i], listener);
 	}
+	
+	initAccessible();
 }
 static int checkStyle (Composite parent, int style) {
 	int mask = SWT.CLOSE | SWT.TOP | SWT.BOTTOM | SWT.FLAT | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT | SWT.SINGLE | SWT.MULTI;
@@ -363,16 +299,6 @@ static int checkStyle (Composite parent, int style) {
 	if ((style & SWT.MULTI) != 0) style = style & ~SWT.SINGLE;
 	// reduce the flash by not redrawing the entire area on a Resize event
 	style |= SWT.NO_REDRAW_RESIZE;
-	//TEMPORARY CODE
-	/*
-	 * The default background on carbon and some GTK themes is not a solid color 
-	 * but a texture.  To show the correct default background, we must allow
-	 * the operating system to draw it and therefore, we can not use the 
-	 * NO_BACKGROUND style.  The NO_BACKGROUND style is not required on platforms
-	 * that use double buffering which is true in both of these cases.
-	 */
-	String platform = SWT.getPlatform();
-	if ("cocoa".equals(platform) || "carbon".equals(platform) || "gtk".equals(platform)) return style; //$NON-NLS-1$ //$NON-NLS-2$
 	
 	//TEMPORARY CODE
 	/*
@@ -384,18 +310,9 @@ static int checkStyle (Composite parent, int style) {
 	if ((style & SWT.RIGHT_TO_LEFT) != 0) return style;
 	if ((parent.getStyle() & SWT.MIRRORED) != 0 && (style & SWT.LEFT_TO_RIGHT) == 0) return style;
 	
-	return style | SWT.NO_BACKGROUND;
-}
-static void fillRegion(GC gc, Region region) {
-	// NOTE: region passed in to this function will be modified
-	Region clipping = new Region();
-	gc.getClipping(clipping);
-	region.intersect(clipping);
-	gc.setClipping(region);
-	gc.fillRectangle(region.getBounds());
-	gc.setClipping(clipping);
-	clipping.dispose();
+	return style | SWT.DOUBLE_BUFFERED;
 }
+
 /**
  * 
  * Adds the listener to the collection of listeners who will
@@ -495,63 +412,7 @@ public void addSelectionListener(SelectionListener listener) {
 	addListener(SWT.Selection, typedListener);
 	addListener(SWT.DefaultSelection, typedListener);
 }
-void antialias (int[] shape, RGB lineRGB, RGB innerRGB, RGB outerRGB, GC gc){
-	// Don't perform anti-aliasing on Mac and WPF because the platform
-	// already does it.  The simple style also does not require anti-aliasing.
-	if (simple) return;
-	String platform = SWT.getPlatform();
-	if ("cocoa".equals(platform)) return; //$NON-NLS-1$
-	if ("carbon".equals(platform)) return; //$NON-NLS-1$
-	if ("wpf".equals(platform)) return; //$NON-NLS-1$
-	// Don't perform anti-aliasing on low resolution displays
-	if (getDisplay().getDepth() < 15) return;
-	if (outerRGB != null) {
-		int index = 0;
-		boolean left = true;
-		int oldY = onBottom ? 0 : getSize().y;
-		int[] outer = new int[shape.length];
-		for (int i = 0; i < shape.length/2; i++) {
-			if (left && (index + 3 < shape.length)) {
-				left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3];
-				oldY = shape[index+1];
-			}
-			outer[index] = shape[index++] + (left ? -1 : +1);
-			outer[index] = shape[index++];
-		}
-		RGB from = lineRGB;
-		RGB to = outerRGB;
-		int red = from.red + 2*(to.red - from.red)/3;
-		int green = from.green + 2*(to.green - from.green)/3;
-		int blue = from.blue + 2*(to.blue - from.blue)/3;
-		Color color = new Color(getDisplay(), red, green, blue);
-		gc.setForeground(color);
-		gc.drawPolyline(outer);
-		color.dispose();
-	}
-	if (innerRGB != null) {
-		int[] inner = new int[shape.length];
-		int index = 0;
-		boolean left = true;
-		int oldY = onBottom ? 0 : getSize().y;
-		for (int i = 0; i < shape.length/2; i++) {
-			if (left && (index + 3 < shape.length)) {
-				left = onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3];
-				oldY = shape[index+1];
-			}
-			inner[index] = shape[index++] + (left ? +1 : -1);
-			inner[index] = shape[index++];
-		}
-		RGB from = lineRGB;
-		RGB to = innerRGB;
-		int red = from.red + 2*(to.red - from.red)/3;
-		int green = from.green + 2*(to.green - from.green)/3;
-		int blue = from.blue + 2*(to.blue - from.blue)/3;
-		Color color = new Color(getDisplay(), red, green, blue);
-		gc.setForeground(color);
-		gc.drawPolyline(inner);
-		color.dispose();
-	}
-}
+
 /*
 * This class was not intended to be subclassed but this restriction
 * cannot be enforced without breaking backward compatibility.
@@ -565,17 +426,7 @@ void antialias (int[] shape, RGB lineRGB, RGB innerRGB, RGB outerRGB, GC gc){
 //}
 public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget();
-	int trimX = x - marginWidth - highlight_margin - borderLeft;
-	int trimWidth = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin;
-	if (minimized) {
-		int trimY = onBottom ? y - borderTop : y - highlight_header - tabHeight - borderTop;
-		int trimHeight = borderTop + borderBottom + tabHeight + highlight_header;
-		return new Rectangle (trimX, trimY, trimWidth, trimHeight);
-	} else {
-		int trimY = onBottom ? y - marginHeight - highlight_margin - borderTop: y - marginHeight - highlight_header - tabHeight - borderTop;
-		int trimHeight = height + borderTop + borderBottom + 2*marginHeight + tabHeight + highlight_header + highlight_margin;
-		return new Rectangle (trimX, trimY, trimWidth, trimHeight);
-	}
+	return renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, x, y, width, height);
 }
 void createItem (CTabItem item, int index) {
 	if (0 > index || index > getItemCount ())SWT.error (SWT.ERROR_INVALID_RANGE);
@@ -621,7 +472,9 @@ void destroyItem (CTabItem item) {
 			control.setVisible(false);
 		}
 		setToolTipText(null);
-		setButtonBounds();
+		GC gc = new GC(this);
+		setButtonBounds(gc);
+		gc.dispose();
 		redraw();
 		return;
 	} 
@@ -655,518 +508,7 @@ void destroyItem (CTabItem item) {
 	updateItems();
 	redrawTabs();
 }
-void drawBackground(GC gc, int[] shape, boolean selected) {
-	Color defaultBackground = selected ? selectionBackground : getBackground();
-	Image image = selected ? selectionBgImage : null;
-	Color[] colors = selected ? selectionGradientColors : gradientColors;
-	int[] percents = selected ? selectionGradientPercents : gradientPercents;
-	boolean vertical = selected ? selectionGradientVertical : gradientVertical; 
-	Point size = getSize();
-	int width = size.x;
-	int height = tabHeight + highlight_header;
-	int x = 0;
-	if (borderLeft > 0) {
-		x += 1; width -= 2;
-	}
-	int y = onBottom ? size.y - borderBottom - height : borderTop;
-	drawBackground(gc, shape, x, y, width, height, defaultBackground, image, colors, percents, vertical);
-}
-void drawBackground(GC gc, int[] shape, int x, int y, int width, int height, Color defaultBackground, Image image, Color[] colors, int[] percents, boolean vertical) {
-	Region clipping = new Region();
-	gc.getClipping(clipping);
-	Region region = new Region();
-	region.add(shape);
-	region.intersect(clipping);
-	gc.setClipping(region);
-	
-	if (image != null) {
-		// draw the background image in shape
-		gc.setBackground(defaultBackground);
-		gc.fillRectangle(x, y, width, height);
-		Rectangle imageRect = image.getBounds();
-		gc.drawImage(image, imageRect.x, imageRect.y, imageRect.width, imageRect.height, x, y, width, height);
-	} else if (colors != null) {
-		// draw gradient
-		if (colors.length == 1) {
-			Color background = colors[0] != null ? colors[0] : defaultBackground;
-			gc.setBackground(background);
-			gc.fillRectangle(x, y, width, height);
-		} else {
-			if (vertical) {
-				if (onBottom) {
-					int pos = 0;
-					if (percents[percents.length - 1] < 100) {
-						pos = (100 - percents[percents.length - 1]) * height / 100;
-						gc.setBackground(defaultBackground);
-						gc.fillRectangle(x, y, width, pos);
-					}
-					Color lastColor = colors[colors.length-1];
-					if (lastColor == null) lastColor = defaultBackground;
-					for (int i = percents.length-1; i >= 0; i--) {
-						gc.setForeground(lastColor);
-						lastColor = colors[i];
-						if (lastColor == null) lastColor = defaultBackground;
-						gc.setBackground(lastColor);
-						int percentage = i > 0 ? percents[i] - percents[i-1] : percents[i];
-						int gradientHeight = percentage * height / 100;
-						gc.fillGradientRectangle(x, y+pos, width, gradientHeight, true);
-						pos += gradientHeight;
-					}
-				} else {
-					Color lastColor = colors[0];
-					if (lastColor == null) lastColor = defaultBackground;
-					int pos = 0;
-					for (int i = 0; i < percents.length; i++) {
-						gc.setForeground(lastColor);
-						lastColor = colors[i + 1];
-						if (lastColor == null) lastColor = defaultBackground;
-						gc.setBackground(lastColor);
-						int percentage = i > 0 ? percents[i] - percents[i-1] : percents[i];
-						int gradientHeight = percentage * height / 100;
-						gc.fillGradientRectangle(x, y+pos, width, gradientHeight, true);
-						pos += gradientHeight;
-					}
-					if (pos < height) {
-						gc.setBackground(defaultBackground);
-						gc.fillRectangle(x, pos, width, height-pos+1);
-					}
-				}
-			} else { //horizontal gradient
-				y = 0;
-				height = getSize().y;
-				Color lastColor = colors[0];
-				if (lastColor == null) lastColor = defaultBackground;
-				int pos = 0;
-				for (int i = 0; i < percents.length; ++i) {
-					gc.setForeground(lastColor);
-					lastColor = colors[i + 1];
-					if (lastColor == null) lastColor = defaultBackground;
-					gc.setBackground(lastColor);
-					int gradientWidth = (percents[i] * width / 100) - pos;
-					gc.fillGradientRectangle(x+pos, y, gradientWidth, height, false);
-					pos += gradientWidth;
-				}
-				if (pos < width) {
-					gc.setBackground(defaultBackground);
-					gc.fillRectangle(x+pos, y, width-pos, height);
-				}
-			}
-		}
-	} else {
-		// draw a solid background using default background in shape
-		if ((getStyle() & SWT.NO_BACKGROUND) != 0 || !defaultBackground.equals(getBackground())) {
-			gc.setBackground(defaultBackground);
-			gc.fillRectangle(x, y, width, height);
-		}
-	}
-	gc.setClipping(clipping);
-	clipping.dispose();
-	region.dispose();
-}
-void drawBody(Event event) {
-	GC gc = event.gc;
-	Point size = getSize();
-	
-	// fill in body
-	if (!minimized){
-		int width = size.x  - borderLeft - borderRight - 2*highlight_margin;
-		int height = size.y - borderTop - borderBottom - tabHeight - highlight_header - highlight_margin;
-		// Draw highlight margin
-		if (highlight_margin > 0) {
-			int[] shape = null;
-			if (onBottom) {
-				int x1 = borderLeft;
-				int y1 = borderTop;
-				int x2 = size.x - borderRight;
-				int y2 = size.y - borderBottom - tabHeight - highlight_header;
-				shape = new int[] {x1,y1, x2,y1, x2,y2, x2-highlight_margin,y2,
-						           x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
-								   x1+highlight_margin,y2, x1,y2};
-			} else {	
-				int x1 = borderLeft;
-				int y1 = borderTop + tabHeight + highlight_header;
-				int x2 = size.x - borderRight;
-				int y2 = size.y - borderBottom;
-				shape = new int[] {x1,y1, x1+highlight_margin,y1, x1+highlight_margin,y2-highlight_margin, 
-						           x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
-								   x2,y1, x2,y2, x1,y2};
-			}
-			// If horizontal gradient, show gradient across the whole area
-			if (selectedIndex != -1 && selectionGradientColors != null && selectionGradientColors.length > 1 && !selectionGradientVertical) {
-				drawBackground(gc, shape, true);
-			} else if (selectedIndex == -1 && gradientColors != null && gradientColors.length > 1 && !gradientVertical) {
-				drawBackground(gc, shape, false);
-			} else {
-				gc.setBackground(selectedIndex == -1 ? getBackground() : selectionBackground);
-				gc.fillPolygon(shape);
-			}
-		}
-		//Draw client area
-		if ((getStyle() & SWT.NO_BACKGROUND) != 0) {
-			gc.setBackground(getBackground());
-			gc.fillRectangle(xClient - marginWidth, yClient - marginHeight, width, height);
-		}
-	} else {
-		if ((getStyle() & SWT.NO_BACKGROUND) != 0) {
-			int height = borderTop + tabHeight + highlight_header + borderBottom;
-			if (size.y > height) {
-				gc.setBackground(getParent().getBackground());
-				gc.fillRectangle(0, height, size.x, size.y - height);
-			}
-		}
-	}
-	
-	//draw 1 pixel border around outside
-	if (borderLeft > 0) {
-		gc.setForeground(getDisplay().getSystemColor(BORDER1_COLOR));
-		int x1 = borderLeft - 1;
-		int x2 = size.x - borderRight;
-		int y1 = onBottom ? borderTop - 1 : borderTop + tabHeight;
-		int y2 = onBottom ? size.y - tabHeight - borderBottom - 1 : size.y - borderBottom;
-		gc.drawLine(x1, y1, x1, y2); // left
-		gc.drawLine(x2, y1, x2, y2); // right
-		if (onBottom) {
-			gc.drawLine(x1, y1, x2, y1); // top
-		} else {
-			gc.drawLine(x1, y2, x2, y2); // bottom
-		}
-	}
-}
-
-void drawChevron(GC gc) {
-	if (chevronRect.width == 0 || chevronRect.height == 0) return;
-	// draw chevron (10x7)
-	Display display = getDisplay();
-	Point dpi = display.getDPI();
-	int fontHeight = 72 * 10 / dpi.y;
-	FontData fd = getFont().getFontData()[0];
-	fd.setHeight(fontHeight);
-	Font f = new Font(display, fd);
-	int fHeight = f.getFontData()[0].getHeight() * dpi.y / 72;
-	int indent = Math.max(2, (chevronRect.height - fHeight - 4) /2);
-	int x = chevronRect.x + 2;
-	int y = chevronRect.y + indent;
-	int count;
-	if (single) {
-		count = selectedIndex == -1 ? items.length : items.length - 1;
-	} else {
-		int showCount = 0;
-		while (showCount < priority.length && items[priority[showCount]].showing) {
-			showCount++;
-		}
-		count = items.length - showCount;
-	}
-	String chevronString = count > 99 ? "99+" : String.valueOf(count); //$NON-NLS-1$
-	switch (chevronImageState) {
-		case NORMAL: {
-			Color chevronBorder = single ? getSelectionForeground() : getForeground();
-			gc.setForeground(chevronBorder);
-			gc.setFont(f);
-			gc.drawLine(x,y,     x+2,y+2);
-			gc.drawLine(x+2,y+2, x,y+4);
-			gc.drawLine(x+1,y,   x+3,y+2);
-			gc.drawLine(x+3,y+2, x+1,y+4);
-			gc.drawLine(x+4,y,   x+6,y+2);
-			gc.drawLine(x+6,y+2, x+5,y+4);
-			gc.drawLine(x+5,y,   x+7,y+2);
-			gc.drawLine(x+7,y+2, x+4,y+4);
-			gc.drawString(chevronString, x+7, y+3, true);
-			break;
-		}
-		case HOT: {
-			gc.setForeground(display.getSystemColor(BUTTON_BORDER));
-			gc.setBackground(display.getSystemColor(BUTTON_FILL));
-			gc.setFont(f);
-			gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);
-			gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);
-			gc.drawLine(x,y,     x+2,y+2);
-			gc.drawLine(x+2,y+2, x,y+4);
-			gc.drawLine(x+1,y,   x+3,y+2);
-			gc.drawLine(x+3,y+2, x+1,y+4);
-			gc.drawLine(x+4,y,   x+6,y+2);
-			gc.drawLine(x+6,y+2, x+5,y+4);
-			gc.drawLine(x+5,y,   x+7,y+2);
-			gc.drawLine(x+7,y+2, x+4,y+4);
-			gc.drawString(chevronString, x+7, y+3, true);
-			break;
-		}
-		case SELECTED: {
-			gc.setForeground(display.getSystemColor(BUTTON_BORDER));
-			gc.setBackground(display.getSystemColor(BUTTON_FILL));
-			gc.setFont(f);
-			gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);
-			gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);
-			gc.drawLine(x+1,y+1, x+3,y+3);
-			gc.drawLine(x+3,y+3, x+1,y+5);
-			gc.drawLine(x+2,y+1, x+4,y+3);
-			gc.drawLine(x+4,y+3, x+2,y+5);
-			gc.drawLine(x+5,y+1, x+7,y+3);
-			gc.drawLine(x+7,y+3, x+6,y+5);
-			gc.drawLine(x+6,y+1, x+8,y+3);
-			gc.drawLine(x+8,y+3, x+5,y+5);
-			gc.drawString(chevronString, x+8, y+4, true);
-			break;
-		}
-	}
-	f.dispose();
-}
-void drawMaximize(GC gc) {
-	if (maxRect.width == 0 || maxRect.height == 0) return;
-	Display display = getDisplay();
-	// 5x4 or 7x9
-	int x = maxRect.x + (CTabFolder.BUTTON_SIZE - 10)/2;
-	int y = maxRect.y + 3;
-	
-	gc.setForeground(display.getSystemColor(BUTTON_BORDER));
-	gc.setBackground(display.getSystemColor(BUTTON_FILL));
-	
-	switch (maxImageState) {
-		case NORMAL: {
-			if (!maximized) {
-				gc.fillRectangle(x, y, 9, 9);
-				gc.drawRectangle(x, y, 9, 9);
-				gc.drawLine(x+1, y+2, x+8, y+2);				
-			} else {
-				gc.fillRectangle(x, y+3, 5, 4);
-				gc.fillRectangle(x+2, y, 5, 4);
-				gc.drawRectangle(x, y+3, 5, 4);
-				gc.drawRectangle(x+2, y, 5, 4);
-				gc.drawLine(x+3, y+1, x+6, y+1);
-				gc.drawLine(x+1, y+4, x+4, y+4);
-			}
-			break;
-		}
-		case HOT: {
-			gc.fillRoundRectangle(maxRect.x, maxRect.y, maxRect.width, maxRect.height, 6, 6);
-			gc.drawRoundRectangle(maxRect.x, maxRect.y, maxRect.width - 1, maxRect.height - 1, 6, 6);
-			if (!maximized) {
-				gc.fillRectangle(x, y, 9, 9);
-				gc.drawRectangle(x, y, 9, 9);
-				gc.drawLine(x+1, y+2, x+8, y+2);
-			} else {
-				gc.fillRectangle(x, y+3, 5, 4);
-				gc.fillRectangle(x+2, y, 5, 4);
-				gc.drawRectangle(x, y+3, 5, 4);
-				gc.drawRectangle(x+2, y, 5, 4);
-				gc.drawLine(x+3, y+1, x+6, y+1);
-				gc.drawLine(x+1, y+4, x+4, y+4);
-			}
-			break;
-		}
-		case SELECTED: {
-			gc.fillRoundRectangle(maxRect.x, maxRect.y, maxRect.width, maxRect.height, 6, 6);
-			gc.drawRoundRectangle(maxRect.x, maxRect.y, maxRect.width - 1, maxRect.height - 1, 6, 6);
-			if (!maximized) {
-				gc.fillRectangle(x+1, y+1, 9, 9);
-				gc.drawRectangle(x+1, y+1, 9, 9);
-				gc.drawLine(x+2, y+3, x+9, y+3);
-			} else {
-				gc.fillRectangle(x+1, y+4, 5, 4);
-				gc.fillRectangle(x+3, y+1, 5, 4);
-				gc.drawRectangle(x+1, y+4, 5, 4);
-				gc.drawRectangle(x+3, y+1, 5, 4);
-				gc.drawLine(x+4, y+2, x+7, y+2);
-				gc.drawLine(x+2, y+5, x+5, y+5);
-			}
-			break;
-		}
-	}
-}
-void drawMinimize(GC gc) {
-	if (minRect.width == 0 || minRect.height == 0) return;
-	Display display = getDisplay();
-	// 5x4 or 9x3
-	int x = minRect.x + (BUTTON_SIZE - 10)/2;
-	int y = minRect.y + 3;
-	
-	gc.setForeground(display.getSystemColor(BUTTON_BORDER));
-	gc.setBackground(display.getSystemColor(BUTTON_FILL));
-	
-	switch (minImageState) {
-		case NORMAL: {
-			if (!minimized) {
-				gc.fillRectangle(x, y, 9, 3);
-				gc.drawRectangle(x, y, 9, 3);
-			} else {
-				gc.fillRectangle(x, y+3, 5, 4);
-				gc.fillRectangle(x+2, y, 5, 4);
-				gc.drawRectangle(x, y+3, 5, 4);
-				gc.drawRectangle(x+2, y, 5, 4);
-				gc.drawLine(x+3, y+1, x+6, y+1);
-				gc.drawLine(x+1, y+4, x+4, y+4);
-			}
-			break;
-		}
-		case HOT: {
-			gc.fillRoundRectangle(minRect.x, minRect.y, minRect.width, minRect.height, 6, 6);
-			gc.drawRoundRectangle(minRect.x, minRect.y, minRect.width - 1, minRect.height - 1, 6, 6);
-			if (!minimized) {
-				gc.fillRectangle(x, y, 9, 3);
-				gc.drawRectangle(x, y, 9, 3);
-			} else {
-				gc.fillRectangle(x, y+3, 5, 4);
-				gc.fillRectangle(x+2, y, 5, 4);
-				gc.drawRectangle(x, y+3, 5, 4);
-				gc.drawRectangle(x+2, y, 5, 4);
-				gc.drawLine(x+3, y+1, x+6, y+1);
-				gc.drawLine(x+1, y+4, x+4, y+4);
-			}
-			break;
-		}
-		case SELECTED: {
-			gc.fillRoundRectangle(minRect.x, minRect.y, minRect.width, minRect.height, 6, 6);
-			gc.drawRoundRectangle(minRect.x, minRect.y, minRect.width - 1, minRect.height - 1, 6, 6);
-			if (!minimized) {
-				gc.fillRectangle(x+1, y+1, 9, 3);
-				gc.drawRectangle(x+1, y+1, 9, 3);
-			} else {
-				gc.fillRectangle(x+1, y+4, 5, 4);
-				gc.fillRectangle(x+3, y+1, 5, 4);
-				gc.drawRectangle(x+1, y+4, 5, 4);
-				gc.drawRectangle(x+3, y+1, 5, 4);
-				gc.drawLine(x+4, y+2, x+7, y+2);
-				gc.drawLine(x+2, y+5, x+5, y+5);
-			}
-			break;
-		}
-	}
-}
-void drawTabArea(Event event) {
-	GC gc = event.gc;
-	Point size = getSize();
-	int[] shape = null;
-	Color borderColor = getDisplay().getSystemColor(BORDER1_COLOR);
-	
-	if (tabHeight == 0) {
-		int style = getStyle();
-		if ((style & SWT.FLAT) != 0 && (style & SWT.BORDER) == 0) return;
-		int x1 = borderLeft - 1;
-		int x2 = size.x - borderRight;
-		int y1 = onBottom ? size.y - borderBottom - highlight_header - 1 : borderTop + highlight_header;
-		int y2 = onBottom ? size.y - borderBottom : borderTop;
-		if (borderLeft > 0 && onBottom) y2 -= 1;
-		
-		shape = new int[] {x1, y1, x1,y2, x2,y2, x2,y1};
 
-		// If horizontal gradient, show gradient across the whole area
-		if (selectedIndex != -1 && selectionGradientColors != null && selectionGradientColors.length > 1 && !selectionGradientVertical) {
-			drawBackground(gc, shape, true);
-		} else if (selectedIndex == -1 && gradientColors != null && gradientColors.length > 1 && !gradientVertical) {
-			drawBackground(gc, shape, false);
-		} else {
-			gc.setBackground(selectedIndex == -1 ? getBackground() : selectionBackground);
-			gc.fillPolygon(shape);
-		}
-		
-		//draw 1 pixel border
-		if (borderLeft > 0) {
-			gc.setForeground(borderColor);
-			gc.drawPolyline(shape); 
-		}
-		return;
-	}
-	
-	int x = Math.max(0, borderLeft - 1);
-	int y = onBottom ? size.y - borderBottom - tabHeight : borderTop;
-	int width = size.x - borderLeft - borderRight + 1;
-	int height = tabHeight - 1;
-	
-	// Draw Tab Header
-	if (onBottom) {
-		int[] left, right;
-		if ((getStyle() & SWT.BORDER) != 0) {
-			left = simple ? SIMPLE_BOTTOM_LEFT_CORNER : BOTTOM_LEFT_CORNER;
-			right = simple ? SIMPLE_BOTTOM_RIGHT_CORNER : BOTTOM_RIGHT_CORNER;
-		} else {
-			left = simple ? SIMPLE_BOTTOM_LEFT_CORNER_BORDERLESS : BOTTOM_LEFT_CORNER_BORDERLESS;
-			right = simple ? SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS : BOTTOM_RIGHT_CORNER_BORDERLESS;
-		}
-		shape = new int[left.length + right.length + 4];
-		int index = 0;
-		shape[index++] = x;
-		shape[index++] = y-highlight_header;
-		for (int i = 0; i < left.length/2; i++) {
-			shape[index++] = x+left[2*i];
-			shape[index++] = y+height+left[2*i+1];
-			if (borderLeft == 0) shape[index-1] += 1;
-		}
-		for (int i = 0; i < right.length/2; i++) {
-			shape[index++] = x+width+right[2*i];
-			shape[index++] = y+height+right[2*i+1];
-			if (borderLeft == 0) shape[index-1] += 1;
-		}
-		shape[index++] = x+width;
-		shape[index++] = y-highlight_header;
-	} else {
-		int[] left, right;
-		if ((getStyle() & SWT.BORDER) != 0) {
-			left = simple ? SIMPLE_TOP_LEFT_CORNER : TOP_LEFT_CORNER;
-			right = simple ? SIMPLE_TOP_RIGHT_CORNER : TOP_RIGHT_CORNER;
-		} else {
-			left = simple ? SIMPLE_TOP_LEFT_CORNER_BORDERLESS : TOP_LEFT_CORNER_BORDERLESS;
-			right = simple ? SIMPLE_TOP_RIGHT_CORNER_BORDERLESS : TOP_RIGHT_CORNER_BORDERLESS;
-		}
-		shape = new int[left.length + right.length + 4];
-		int index = 0;
-		shape[index++] = x;
-		shape[index++] = y+height+highlight_header + 1;
-		for (int i = 0; i < left.length/2; i++) {
-			shape[index++] = x+left[2*i];
-			shape[index++] = y+left[2*i+1];
-		}
-		for (int i = 0; i < right.length/2; i++) {
-			shape[index++] = x+width+right[2*i];
-			shape[index++] = y+right[2*i+1];
-		}
-		shape[index++] = x+width;
-		shape[index++] = y+height+highlight_header + 1;
-	}
-	// Fill in background
-	boolean bkSelected = single && selectedIndex != -1;
-	drawBackground(gc, shape, bkSelected);
-	// Fill in parent background for non-rectangular shape
-	Region r = new Region();
-	r.add(new Rectangle(x, y, width + 1, height + 1));
-	r.subtract(shape);
-	gc.setBackground(getParent().getBackground());
-	fillRegion(gc, r);
-	r.dispose();
-	
-	// Draw the unselected tabs.
-	if (!single) {
-		for (int i=0; i < items.length; i++) {
-			if (i != selectedIndex && event.getBounds().intersects(items[i].getBounds())) {
-				items[i].onPaint(gc, false);
-			}
-		}
-	}
-	
-	// Draw selected tab
-	if (selectedIndex != -1) {
-		CTabItem item = items[selectedIndex];
-		item.onPaint(gc, true);
-	} else {
-		// if no selected tab - draw line across bottom of all tabs
-		int x1 = borderLeft;
-		int y1 = (onBottom) ? size.y - borderBottom - tabHeight - 1 : borderTop + tabHeight;
-		int x2 = size.x - borderRight;
-		gc.setForeground(borderColor);
-		gc.drawLine(x1, y1, x2, y1);
-	}
-	
-	// Draw Buttons
-	drawChevron(gc);
-	drawMinimize(gc);
-	drawMaximize(gc);
-	
-	// Draw border line
-	if (borderLeft > 0) {
-		RGB outside = getParent().getBackground().getRGB();
-		antialias(shape, borderColor.getRGB(), null, outside, gc);
-		gc.setForeground(borderColor);
-		gc.drawPolyline(shape);
-	}	
-}
 /**
  * Returns <code>true</code> if the receiver's border is visible.
  *
@@ -1181,23 +523,18 @@ void drawTabArea(Event event) {
  */
 public boolean getBorderVisible() {
 	checkWidget();
-	return borderLeft == 1;
+	return borderVisible;
 }
 public Rectangle getClientArea() {
 	checkWidget();
-	if (minimized) return new Rectangle(xClient, yClient, 0, 0);
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, 0, 0, 0, 0);
+	if (minimized) return new Rectangle(-trim.x, -trim.y, 0, 0);
 	Point size = getSize();
-	int width = size.x  - borderLeft - borderRight - 2*marginWidth - 2*highlight_margin;
-	int height = size.y - borderTop - borderBottom - 2*marginHeight - highlight_margin - highlight_header;
-	height -= tabHeight;
-	return new Rectangle(xClient, yClient, width, height);
-}
-Color getFillColor() {
-	if (fillColor == null) {
-		fillColor = new Color(getDisplay(), CTabFolder.CLOSE_FILL);
-	}
-	return fillColor;
+	int width = size.x - trim.width;
+	int height = size.y - trim.height;
+	return new Rectangle(-trim.x, -trim.y, width, height);
 }
+
 /**
  * Return the tab that is located at the specified index.
  * 
@@ -1233,7 +570,8 @@ public CTabItem getItem (Point pt) {
 	//checkWidget();
 	if (items.length == 0) return null;
 	Point size = getSize();
-	if (size.x <= borderLeft + borderRight) return null;
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+	if (size.x <= trim.width) return null;
 	if (showChevron && chevronRect.contains(pt)) return null;
 	for (int i = 0; i < priority.length; i++) {
 		CTabItem item = items[priority[i]];
@@ -1272,6 +610,7 @@ public CTabItem [] getItems() {
 	System.arraycopy(items, 0, tabItems, 0, items.length);
 	return tabItems;
 }
+
 /*
  * Return the lowercase of the first non-'&' character following
  * an '&' character in the given string. If there are no '&'
@@ -1347,6 +686,7 @@ public int getMinimumCharacters() {
 	checkWidget();
 	return minChars;
 }
+
 /**
  * Returns <code>true</code> if the receiver is maximized.
  * <p>
@@ -1414,11 +754,31 @@ public boolean getMRUVisible() {
 	checkWidget();
 	return mru;
 }
-int getRightItemEdge (){
-	int x = getSize().x - borderRight - 3;
-	if (showMin) x -= BUTTON_SIZE;
-	if (showMax) x -= BUTTON_SIZE;
-	if (showChevron) x -= 3*BUTTON_SIZE/2;
+/**
+ * Returns the receiver's renderer.
+ * 
+ * @return the receiver's renderer
+ *
+ * @exception SWTException <ul>
+ *		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
+ *		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
+ *	</ul>
+ *
+ * @see #setRenderer(CTabFolderRenderer)
+ * @see CTabFolderRenderer
+ * 
+ * @since 3.6
+ */
+public CTabFolderRenderer getRenderer() {
+	checkWidget();
+	return renderer;
+}
+int getRightItemEdge (GC gc){
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+	int x = getSize().x - (trim.width + trim.x) - 3; //TODO: add setter for spacing?
+	if (showMin) x -= renderer.computeSize(CTabFolderRenderer.PART_MIN_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+	if (showMax) x -= renderer.computeSize(CTabFolderRenderer.PART_MAX_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+	if (showChevron) x -= renderer.computeSize(CTabFolderRenderer.PART_CHEVRON_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 	if (topRight != null && topRightAlignment != SWT.FILL) {
 		Point rightSize = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT);
 		x -= rightSize.x + 3;
@@ -1518,7 +878,7 @@ public int getStyle() {
 	style |= onBottom ? SWT.BOTTOM : SWT.TOP;
 	style &= ~(SWT.SINGLE | SWT.MULTI);
 	style |= single ? SWT.SINGLE : SWT.MULTI;
-	if (borderLeft != 0) style |= SWT.BORDER;
+	if (borderVisible) style |= SWT.BORDER;
 	style &= ~SWT.CLOSE;
 	if (showClose) style |= SWT.CLOSE;
 	return style;
@@ -1536,7 +896,7 @@ public int getStyle() {
 public int getTabHeight(){
 	checkWidget();
 	if (fixedTabHeight != SWT.DEFAULT) return fixedTabHeight;
-	return tabHeight - 1; // -1 for line drawn across top of tab
+	return tabHeight - 1; // -1 for line drawn across top of tab //TODO: replace w/ computeTrim of tab area?
 }
 /**
  * Returns the position of the tab.  Possible values are SWT.TOP or SWT.BOTTOM.
@@ -1570,6 +930,23 @@ public Control getTopRight() {
 	return topRight;
 }
 /**
+ * Returns the alignment of the top right control. 
+ *
+ * @return the alignment of the top right control which is either
+ * <code>SWT.RIGHT</code> or <code>SWT.FILL</code> 
+ * 
+ * @exception  SWTException <ul>
+ *		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
+ *		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
+ *	</ul>
+ *
+ * @since 3.6
+ */
+public int getTopRightAlignment() {
+	checkWidget();
+	return topRightAlignment;
+}
+/**
  * Returns <code>true</code> if the close button appears 
  * when the user hovers over an unselected tabs.
  * 
@@ -1896,10 +1273,7 @@ void onDispose(Event event) {
 			items[i].dispose();
 		}
 	}
-	if (fillColor != null) {
-	    fillColor.dispose();
-	    fillColor = null;
-	}
+
 	
 	selectionGradientColors = null;
 	selectionGradientPercents = null;
@@ -1907,7 +1281,9 @@ void onDispose(Event event) {
 
 	selectionBackground = null;
 	selectionForeground = null;
-	disposeSelectionHighlightGradientColors();	
+	
+	if (renderer != null) renderer.dispose();
+	renderer = null;
 }
 void onDragDetect(Event event) {
 	boolean consume = false;
@@ -1942,7 +1318,10 @@ boolean onMnemonic (Event event, boolean doit) {
 			char mnemonic = _findMnemonic (items[i].getText ());
 			if (mnemonic != '\0') {
 				if (Character.toLowerCase (key) == mnemonic) {
-					if (doit) setSelection(i, true);
+					if (doit) {
+					    setSelection(i, true);
+					    forceFocus();
+					}
 					return true;
 				}
 			}
@@ -1968,26 +1347,30 @@ void onMouse(Event event) {
 			break;
 		}
 		case SWT.MouseExit: {
-			if (minImageState != NORMAL) {
-				minImageState = NORMAL;
+			if (minImageState != SWT.NONE) {
+				minImageState = SWT.NONE;
 				redraw(minRect.x, minRect.y, minRect.width, minRect.height, false);
 			}
-			if (maxImageState != NORMAL) {
-				maxImageState = NORMAL;
+			if (maxImageState != SWT.NONE) {
+				maxImageState = SWT.NONE;
 				redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false);
 			}
-			if (chevronImageState != NORMAL) {
-				chevronImageState = NORMAL;
+			if (chevronImageState != SWT.NONE) {
+				chevronImageState = SWT.NONE;
 				redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false);
 			}
 			for (int i=0; i<items.length; i++) {
 				CTabItem item = items[i];
-				if (i != selectedIndex && item.closeImageState != NONE) {
-					item.closeImageState = NONE;
+				if (i != selectedIndex && item.closeImageState != SWT.BACKGROUND) {
+					item.closeImageState = SWT.BACKGROUND;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 				}
-				if (i == selectedIndex && item.closeImageState != NORMAL) {
-					item.closeImageState = NORMAL;
+				if ((item.state & SWT.HOT) != 0) {
+					item.state &= ~SWT.HOT;
+					redraw(item.x, item.y, item.width, item.height, false);
+				}
+				if (i == selectedIndex && item.closeImageState != SWT.NONE) {
+					item.closeImageState = SWT.NONE;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 				}
 			}
@@ -1996,22 +1379,22 @@ void onMouse(Event event) {
 		case SWT.MouseDown: {
 			if (event.button != 1) return;
 			if (minRect.contains(x, y)) {
-				minImageState = SELECTED;
+				minImageState = SWT.SELECTED;
 				redraw(minRect.x, minRect.y, minRect.width, minRect.height, false);
 				update();
 				return;
 			}
 			if (maxRect.contains(x, y)) {
-				maxImageState = SELECTED;
+				maxImageState = SWT.SELECTED;
 				redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false);
 				update();
 				return;
 			}
 			if (chevronRect.contains(x, y)) {
-				if (chevronImageState != HOT) {
-					chevronImageState = HOT;
+				if (chevronImageState != SWT.HOT) {
+					chevronImageState = SWT.HOT;
 				} else {
-					chevronImageState = SELECTED;
+					chevronImageState = SWT.SELECTED;
 				}
 				redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false);
 				update();
@@ -2035,14 +1418,19 @@ void onMouse(Event event) {
 			}
 			if (item != null) {
 				if (item.closeRect.contains(x,y)){
-					item.closeImageState = SELECTED;
+					item.closeImageState = SWT.SELECTED;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 					update();
 					return;
 				}
 				int index = indexOf(item);
 				if (item.showing){
-					setSelection(index, true);
+				    	int oldSelectedIndex = selectedIndex;
+				    	setSelection(index, true);
+				    	if (oldSelectedIndex == selectedIndex) {
+				    	    /* If the click is on the selected tabitem, then set focus to the tabfolder */
+				    	    forceFocus();
+				    	}
 				}
 				return;
 			}
@@ -2053,35 +1441,35 @@ void onMouse(Event event) {
 			boolean close = false, minimize = false, maximize = false, chevron = false;
 			if (minRect.contains(x, y)) {
 				minimize = true;
-				if (minImageState != SELECTED && minImageState != HOT) {
-					minImageState = HOT;
+				if (minImageState != SWT.SELECTED && minImageState != SWT.HOT) {
+					minImageState = SWT.HOT;
 					redraw(minRect.x, minRect.y, minRect.width, minRect.height, false);
 				}
 			}
 			if (maxRect.contains(x, y)) {
 				maximize = true;
-				if (maxImageState != SELECTED && maxImageState != HOT) {
-					maxImageState = HOT;
+				if (maxImageState != SWT.SELECTED && maxImageState != SWT.HOT) {
+					maxImageState = SWT.HOT;
 					redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false);
 				}
 			}
 			if (chevronRect.contains(x, y)) {
 				chevron = true;
-				if (chevronImageState != SELECTED && chevronImageState != HOT) {
-					chevronImageState = HOT;
+				if (chevronImageState != SWT.SELECTED && chevronImageState != SWT.HOT) {
+					chevronImageState = SWT.HOT;
 					redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false);
 				}
 			}
-			if (minImageState != NORMAL && !minimize) {
-				minImageState = NORMAL;
+			if (minImageState != SWT.NONE && !minimize) {
+				minImageState = SWT.NONE;
 				redraw(minRect.x, minRect.y, minRect.width, minRect.height, false);
 			}
-			if (maxImageState != NORMAL && !maximize) {
-				maxImageState = NORMAL;
+			if (maxImageState != SWT.NONE && !maximize) {
+				maxImageState = SWT.NONE;
 				redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false);
 			}
-			if (chevronImageState != NORMAL && !chevron) {
-				chevronImageState = NORMAL;
+			if (chevronImageState != SWT.NONE && !chevron) {
+				chevronImageState = SWT.NONE;
 				redraw(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, false);
 			}
 			for (int i=0; i<items.length; i++) {
@@ -2090,23 +1478,31 @@ void onMouse(Event event) {
 				if (item.getBounds().contains(x, y)) {
 					close = true;
 					if (item.closeRect.contains(x, y)) {
-						if (item.closeImageState != SELECTED && item.closeImageState != HOT) {
-							item.closeImageState = HOT;
+						if (item.closeImageState != SWT.SELECTED && item.closeImageState != SWT.HOT) {
+							item.closeImageState = SWT.HOT;
 							redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 						}
 					} else {
-						if (item.closeImageState != NORMAL) {
-							item.closeImageState = NORMAL;
+						if (item.closeImageState != SWT.NONE) {
+							item.closeImageState = SWT.NONE;
 							redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 						}
 					}
-				} 
-				if (i != selectedIndex && item.closeImageState != NONE && !close) {
-					item.closeImageState = NONE;
+					if ((item.state & SWT.HOT) == 0) {
+						item.state |= SWT.HOT;
+						redraw(item.x, item.y, item.width, item.height, false);
+					}
+				}
+				if (i != selectedIndex && item.closeImageState != SWT.BACKGROUND && !close) {
+					item.closeImageState = SWT.BACKGROUND;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 				}
-				if (i == selectedIndex && item.closeImageState != NORMAL && !close) {
-					item.closeImageState = NORMAL;
+				if ((item.state & SWT.HOT) != 0 && !close) {
+					item.state &= ~SWT.HOT;
+					redraw(item.x, item.y, item.width, item.height, false);
+				}
+				if (i == selectedIndex && item.closeImageState != SWT.NONE && !close) {
+					item.closeImageState = SWT.NONE;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 				}
 			}
@@ -2115,7 +1511,7 @@ void onMouse(Event event) {
 		case SWT.MouseUp: {
 			if (event.button != 1) return;
 			if (chevronRect.contains(x, y)) {
-				boolean selected = chevronImageState == SELECTED;
+				boolean selected = chevronImageState == SWT.SELECTED;
 				if (!selected) return;
 				CTabFolderEvent e = new CTabFolderEvent(this);
 				e.widget = this;
@@ -2134,8 +1530,8 @@ void onMouse(Event event) {
 				return;
 			}
 			if (minRect.contains(x, y)) {
-				boolean selected = minImageState == SELECTED;
-				minImageState = HOT;
+				boolean selected = minImageState == SWT.SELECTED;
+				minImageState = SWT.HOT;
 				redraw(minRect.x, minRect.y, minRect.width, minRect.height, false);
 				if (!selected) return;
 				CTabFolderEvent e = new CTabFolderEvent(this);
@@ -2151,8 +1547,8 @@ void onMouse(Event event) {
 				return;
 			}
 			if (maxRect.contains(x, y)) {
-				boolean selected = maxImageState == SELECTED;
-				maxImageState = HOT;
+				boolean selected = maxImageState == SWT.SELECTED;
+				maxImageState = SWT.HOT;
 				redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false);
 				if (!selected) return;
 				CTabFolderEvent e = new CTabFolderEvent(this);
@@ -2185,8 +1581,8 @@ void onMouse(Event event) {
 			}
 			if (item != null) {
 				if (item.closeRect.contains(x,y)) {
-					boolean selected = item.closeImageState == SELECTED;
-					item.closeImageState = HOT;
+					boolean selected = item.closeImageState == SWT.SELECTED;
+					item.closeImageState = SWT.HOT;
 					redraw(item.closeRect.x, item.closeRect.y, item.closeRect.width, item.closeRect.height, false);
 					if (!selected) return;
 					CTabFolderEvent e = new CTabFolderEvent(this);
@@ -2210,13 +1606,13 @@ void onMouse(Event event) {
 						CTabItem nextItem = getItem(pt);
 						if (nextItem != null) {
 							if (nextItem.closeRect.contains(pt)) {
-								if (nextItem.closeImageState != SELECTED && nextItem.closeImageState != HOT) {
-									nextItem.closeImageState = HOT;
+								if (nextItem.closeImageState != SWT.SELECTED && nextItem.closeImageState != SWT.HOT) {
+									nextItem.closeImageState = SWT.HOT;
 									redraw(nextItem.closeRect.x, nextItem.closeRect.y, nextItem.closeRect.width, nextItem.closeRect.height, false);
 								}
 							} else {
-								if (nextItem.closeImageState != NORMAL) {
-									nextItem.closeImageState = NORMAL;
+								if (nextItem.closeImageState != SWT.NONE) {
+									nextItem.closeImageState = SWT.NONE;
 									redraw(nextItem.closeRect.x, nextItem.closeRect.y, nextItem.closeRect.width, nextItem.closeRect.height, false);
 								}
 							} 
@@ -2297,14 +1693,45 @@ void onPaint(Event event) {
 //gc.fillRectangle(-10, -10, size.x + 20, size.y+20);
 //}
 
-	drawBody(event);
-	
+	Point size = getSize();
+	Rectangle bodyRect = new Rectangle(0, 0, size.x, size.y); 
+	renderer.draw(CTabFolderRenderer.PART_BODY, SWT.BACKGROUND | SWT.FOREGROUND, bodyRect, gc); 
+
 	gc.setFont(gcFont);
 	gc.setForeground(gcForeground);
 	gc.setBackground(gcBackground);
 	
-	drawTabArea(event);
+	renderer.draw(CTabFolderRenderer.PART_HEADER, SWT.BACKGROUND | SWT.FOREGROUND, bodyRect, gc);
+	
+	gc.setFont(gcFont);
+	gc.setForeground(gcForeground);
+	gc.setBackground(gcBackground);	
+	
+	if (!single) {
+		for (int i=0; i < items.length; i++) {
+			Rectangle itemBounds = items[i].getBounds();
+			if (i != selectedIndex && event.getBounds().intersects(itemBounds)) {
+				renderer.draw(i, SWT.BACKGROUND | SWT.FOREGROUND | items[i].state , itemBounds, gc);
+			}
+		}
+	}
+	
+	gc.setFont(gcFont);
+	gc.setForeground(gcForeground);
+	gc.setBackground(gcBackground);	
+	
+	if (selectedIndex != -1) { 
+		renderer.draw(selectedIndex, items[selectedIndex].state | SWT.BACKGROUND | SWT.FOREGROUND, items[selectedIndex].getBounds(), gc);
+	}
+	
+	gc.setFont(gcFont);
+	gc.setForeground(gcForeground);
+	gc.setBackground(gcBackground);	
 	
+	renderer.draw(CTabFolderRenderer.PART_MAX_BUTTON, maxImageState, maxRect, gc);
+	renderer.draw(CTabFolderRenderer.PART_MIN_BUTTON, minImageState, minRect, gc);
+	renderer.draw(CTabFolderRenderer.PART_CHEVRON_BUTTON, chevronImageState, chevronRect, gc);
+
 	gc.setFont(gcFont);
 	gc.setForeground(gcForeground);
 	gc.setBackground(gcBackground);	
@@ -2321,10 +1748,11 @@ void onResize() {
 			redraw();
 		} else {
 			int x1 = Math.min(size.x, oldSize.x);
-			if (size.x != oldSize.x) x1 -= borderRight + highlight_margin + 2;
+			Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, 0, 0, 0, 0);
+			if (size.x != oldSize.x) x1 -= trim.width + trim.x - marginWidth + 2;
 			if (!simple) x1 -= 5; // rounded top right corner
 			int y1 = Math.min(size.y, oldSize.y);
-			if (size.y != oldSize.y) y1 -= borderBottom + highlight_margin;
+			if (size.y != oldSize.y) y1 -= trim.height + trim.y - marginHeight;
 			int x2 = Math.max(size.x, oldSize.x);
 			int y2 = Math.max(size.y, oldSize.y);		
 			redraw(0, y1, x2, y2 - y1, false);
@@ -2371,10 +1799,12 @@ void onTraverse (Event event) {
 }
 void redrawTabs() {
 	Point size = getSize();
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, 0, 0, 0, 0);
 	if (onBottom) {
-		redraw(0, size.y - borderBottom - tabHeight - highlight_header - 1, size.x, borderBottom + tabHeight + highlight_header + 1, false);
+		int h = trim.height + trim.y - marginHeight;
+		redraw(0, size.y - h - 1, size.x, h + 1, false);
 	} else {
-		redraw(0, 0, size.x, borderTop + tabHeight + highlight_header + 1, false);
+		redraw(0, 0, size.x, -trim.y - marginHeight + 1, false);
 	}
 }
 /**	 
@@ -2478,12 +1908,21 @@ public void removeSelectionListener(SelectionListener listener) {
 	removeListener(SWT.Selection, listener);
 	removeListener(SWT.DefaultSelection, listener);	
 }
+
+public void reskin(int flags) {
+	super.reskin(flags);
+	for (int i = 0; i < items.length; i++) {
+		items[i].reskin(flags);
+	}
+}
+
 public void setBackground (Color color) {
 	super.setBackground(color);
+	renderer.createAntialiasColors(); //TODO: need better caching strategy
 	redraw();
 }
 /**
- * Specify a gradient of colours to be drawn in the background of the unselected tabs.
+ * Specify a gradient of colors to be drawn in the background of the unselected tabs.
  * For example to draw a gradient that varies from dark blue to blue and then to
  * white, use the following call to setBackground:
  * <pre>
@@ -2499,21 +1938,21 @@ public void setBackground (Color color) {
  *               background gradient. The value <code>null</code> can be used inside the array of 
  *               Color to specify the background color.
  * @param percents an array of integers between 0 and 100 specifying the percent of the width 
- *                 of the widget at which the color should change.  The size of the percents array must be one 
- *                 less than the size of the colors array.
+ *                 of the widget at which the color should change.  The size of the <code>percents</code>
+ *                 array must be one less than the size of the <code>colors</code> array.
  * 
  * @exception SWTException <ul>
  *		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
  *		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
  *	</ul>
  *
- * @since 3.0
+ * @since 3.6
  */
-void setBackground(Color[] colors, int[] percents) {
+public void setBackground(Color[] colors, int[] percents) {
 	setBackground(colors, percents, false);
 }
 /**
- * Specify a gradient of colours to be drawn in the background of the unselected tab.
+ * Specify a gradient of colors to be drawn in the background of the unselected tab.
  * For example to draw a vertical gradient that varies from dark blue to blue and then to
  * white, use the following call to setBackground:
  * <pre>
@@ -2529,19 +1968,19 @@ void setBackground(Color[] colors, int[] percents) {
  *               background gradient. The value <code>null</code> can be used inside the array of 
  *               Color to specify the background color.
  * @param percents an array of integers between 0 and 100 specifying the percent of the width 
- *                 of the widget at which the color should change.  The size of the percents array must be one 
- *                 less than the size of the colors array.
+ *                 of the widget at which the color should change.  The size of the <code>percents</code>
+ *                 array must be one less than the size of the <code>colors</code> array.
  * 
- * @param vertical indicate the direction of the gradient.  True is vertical and false is horizontal. 
+ * @param vertical indicate the direction of the gradient. <code>True</code> is vertical and <code>false</code> is horizontal. 
  * 
  * @exception SWTException <ul>
  *		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
  *		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
  *	</ul>
  *
- * @since 3.0
+ * @since 3.6
  */
-void setBackground(Color[] colors, int[] percents, boolean vertical) {
+public void setBackground(Color[] colors, int[] percents, boolean vertical) {
 	checkWidget();
 	if (colors != null) {
 		if (percents == null || percents.length != colors.length - 1) {
@@ -2604,6 +2043,11 @@ void setBackground(Color[] colors, int[] percents, boolean vertical) {
 	// Refresh with the new settings
 	redraw();
 }
+public void setBackgroundImage(Image image) {
+    	super.setBackgroundImage(image);
+    	renderer.createAntialiasColors(); //TODO: need better caching strategy
+    	redraw();
+}
 /**
  * Toggle the visibility of the border
  * 
@@ -2616,10 +2060,8 @@ void setBackground(Color[] colors, int[] percents, boolean vertical) {
  */
 public void setBorderVisible(boolean show) {
 	checkWidget();
-	if ((borderLeft == 1) == show) return;
-	borderLeft = borderRight = show ? 1 : 0;
-	borderTop = onBottom ? borderLeft : 0;
-	borderBottom = onBottom ? 0 : borderLeft;
+	if (borderVisible == show) return;
+	this.borderVisible = show;
 	Rectangle rectBefore = getClientArea();
 	updateItems();
 	Rectangle rectAfter = getClientArea();
@@ -2628,9 +2070,15 @@ public void setBorderVisible(boolean show) {
 	}
 	redraw();
 }
-void setButtonBounds() {
+void setButtonBounds(GC gc) {
 	Point size = getSize();
 	int oldX, oldY, oldWidth, oldHeight;
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+	int borderRight = trim.width + trim.x;
+	int borderLeft = -trim.x;
+	int borderBottom = trim.height + trim.y;
+	int borderTop = -trim.y;
+	
 	// max button
 	oldX = maxRect.x;
 	oldY = maxRect.y;
@@ -2638,11 +2086,12 @@ void setButtonBounds() {
 	oldHeight = maxRect.height;
 	maxRect.x = maxRect.y = maxRect.width = maxRect.height = 0;
 	if (showMax) {
-		maxRect.x = size.x - borderRight - BUTTON_SIZE - 3;
+		Point maxSize = renderer.computeSize(CTabFolderRenderer.PART_MAX_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT);
+		maxRect.x = size.x - borderRight - maxSize.x - 3;
 		if (borderRight > 0) maxRect.x += 1;
-		maxRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - BUTTON_SIZE)/2: borderTop + (tabHeight - BUTTON_SIZE)/2;
-		maxRect.width = BUTTON_SIZE;
-		maxRect.height = BUTTON_SIZE;
+		maxRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - maxSize.y)/2: borderTop + (tabHeight - maxSize.y)/2;
+		maxRect.width = maxSize.x;
+		maxRect.height = maxSize.y;
 	}
 	if (oldX != maxRect.x || oldWidth != maxRect.width ||
 	    oldY != maxRect.y || oldHeight != maxRect.height) {
@@ -2651,7 +2100,7 @@ void setButtonBounds() {
 		int top = onBottom ? size.y - borderBottom - tabHeight: borderTop + 1;
 		redraw(left, top, right - left, tabHeight, false); 
 	}
-	
+
 	// min button
 	oldX = minRect.x;
 	oldY = minRect.y;
@@ -2659,11 +2108,12 @@ void setButtonBounds() {
 	oldHeight = minRect.height;
 	minRect.x = minRect.y = minRect.width = minRect.height = 0;
 	if (showMin) {
-		minRect.x = size.x - borderRight - maxRect.width - BUTTON_SIZE - 3;
+		Point minSize = renderer.computeSize(CTabFolderRenderer.PART_MIN_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT);
+		minRect.x = size.x - borderRight - maxRect.width - minSize.x - 3;
 		if (borderRight > 0) minRect.x += 1;
-		minRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - BUTTON_SIZE)/2: borderTop + (tabHeight - BUTTON_SIZE)/2;
-		minRect.width = BUTTON_SIZE;
-		minRect.height = BUTTON_SIZE;
+		minRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - minSize.y)/2: borderTop + (tabHeight - minSize.y)/2;
+		minRect.width = minSize.x;
+		minRect.height = minSize.y;
 	}
 	if (oldX != minRect.x || oldWidth != minRect.width ||
 	    oldY != minRect.y || oldHeight != minRect.height) {
@@ -2691,8 +2141,9 @@ void setButtonBounds() {
 					} else {
 						// fill size is 0 if item compressed
 						CTabItem item = items[selectedIndex];
-						if (item.x + item.width + 7 + 3*BUTTON_SIZE/2 >= rightEdge) break;
-						topRightRect.x = item.x + item.width + 7 + 3*BUTTON_SIZE/2;
+						int chevronWidth = renderer.computeSize(CTabFolderRenderer.PART_CHEVRON_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+						if (item.x + item.width + 7 + chevronWidth >= rightEdge) break;
+						topRightRect.x = item.x + item.width + 7 + chevronWidth;
 						topRightRect.width = rightEdge - topRightRect.x;
 					}
 				} else {
@@ -2701,9 +2152,9 @@ void setButtonBounds() {
 					if (items.length == 0) {
 						topRightRect.x = borderLeft + 3;
 					} else {
-						CTabItem item = items[items.length - 1];
-						topRightRect.x = item.x + item.width;
-						if (!simple && items.length - 1 == selectedIndex) topRightRect.x += curveWidth - curveIndent;
+						int lastIndex = items.length - 1;
+						CTabItem lastItem = items[lastIndex];
+						topRightRect.x = lastItem.x + lastItem.width;
 					}
 					topRightRect.width = Math.max(0, rightEdge - topRightRect.x);
 				}
@@ -2737,10 +2188,11 @@ void setButtonBounds() {
 	oldWidth = chevronRect.width;
 	oldHeight = chevronRect.height;
 	chevronRect.x = chevronRect.y = chevronRect.height = chevronRect.width = 0;
+	Point chevronSize = renderer.computeSize(CTabFolderRenderer.PART_CHEVRON_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT);
 	if (single) {
 		if (selectedIndex == -1 || items.length > 1) {
-			chevronRect.width = 3*BUTTON_SIZE/2;
-			chevronRect.height = BUTTON_SIZE;
+			chevronRect.width = chevronSize.x;
+			chevronRect.height = chevronSize.y;
 			chevronRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - chevronRect.height)/2 : borderTop + (tabHeight - chevronRect.height)/2;
 			if (selectedIndex == -1) {
 				chevronRect.x = size.x - borderRight - 3 - minRect.width - maxRect.width - topRightRect.width - chevronRect.width;
@@ -2754,8 +2206,8 @@ void setButtonBounds() {
 		}
 	} else {
 		if (showChevron) {
-			chevronRect.width = 3*BUTTON_SIZE/2;
-			chevronRect.height = BUTTON_SIZE;
+			chevronRect.width = chevronSize.x;
+			chevronRect.height = chevronSize.y;
 			int i = 0, lastIndex = -1;
 			while (i < priority.length && items[priority[i]].showing) {
 				lastIndex = Math.max(lastIndex, priority[i++]);
@@ -2763,8 +2215,8 @@ void setButtonBounds() {
 			if (lastIndex == -1) lastIndex = firstIndex;
 			CTabItem lastItem = items[lastIndex];
 			int w = lastItem.x + lastItem.width + 3;
-			if (!simple && lastIndex == selectedIndex) w += curveWidth - 2*curveIndent;
-			chevronRect.x = Math.min(w, getRightItemEdge());
+			if (!simple && lastIndex == selectedIndex) w -= renderer.curveIndent;  //TODO: fix chevron position
+			chevronRect.x = Math.min(w, getRightItemEdge(gc));
 			chevronRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - chevronRect.height)/2 : borderTop + (tabHeight - chevronRect.height)/2;
 		}
 	}
@@ -2830,11 +2282,16 @@ public void setInsertMark(int index, boolean after) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
 }
-boolean setItemLocation() {
+boolean setItemLocation(GC gc) {
 	boolean changed = false;
 	if (items.length == 0) return false;
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+	int borderLeft = -trim.x;
+	int borderBottom = trim.height + trim.y;
+	int borderTop = -trim.y;
 	Point size = getSize();
 	int y = onBottom ? Math.max(borderBottom, size.y - borderBottom - tabHeight) : borderTop;
+	Point closeButtonSize = renderer.computeSize(CTabFolderRenderer.PART_CLOSE_BUTTON, 0, gc, SWT.DEFAULT, SWT.DEFAULT);
 	if (single) {
 		int defaultX = getDisplay().getBounds().width + 10; // off screen
 		for (int i = 0; i < items.length; i++) {
@@ -2846,8 +2303,8 @@ boolean setItemLocation() {
 				item.y = y;
 				item.showing = true;
 				if (showClose || item.showClose) {
-					item.closeRect.x = borderLeft + CTabItem.LEFT_MARGIN;
-					item.closeRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - BUTTON_SIZE)/2: borderTop + (tabHeight - BUTTON_SIZE)/2;
+					item.closeRect.x = borderLeft - renderer.computeTrim(i, SWT.NONE, 0, 0, 0, 0).x;
+					item.closeRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - closeButtonSize.y)/2: borderTop + (tabHeight - closeButtonSize.y)/2;
 				}
 				if (item.x != oldX || item.y != oldY) changed = true;
 			} else {
@@ -2856,16 +2313,15 @@ boolean setItemLocation() {
 			}
 		}
 	} else {
-		int rightItemEdge = getRightItemEdge();
+		int rightItemEdge = getRightItemEdge(gc);
 		int maxWidth = rightItemEdge - borderLeft;
 		int width = 0;
 		for (int i = 0; i < priority.length; i++) {
 			CTabItem item = items[priority[i]];
 			width += item.width;
 			item.showing = i == 0 ? true : item.width > 0 && width <= maxWidth;
-			if (!simple && priority[i] == selectedIndex) width += curveWidth - 2*curveIndent;
 		}
-		int x = 0;
+		int x = -renderer.computeTrim(CTabFolderRenderer.PART_HEADER, SWT.NONE, 0, 0, 0, 0).x;
 		int defaultX = getDisplay().getBounds().width + 10; // off screen
 		firstIndex = items.length - 1;
 		for (int i = 0; i < items.length; i++) {
@@ -2878,40 +2334,35 @@ boolean setItemLocation() {
 				if (item.x != x || item.y != y) changed = true;
 				item.x = x;
 				item.y = y;
-				if (i == selectedIndex) {
-					int edge = Math.min(item.x + item.width, rightItemEdge);
-					item.closeRect.x = edge - CTabItem.RIGHT_MARGIN - BUTTON_SIZE;
-				} else {
-					item.closeRect.x = item.x + item.width - CTabItem.RIGHT_MARGIN - BUTTON_SIZE;
-				}
-				item.closeRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - BUTTON_SIZE)/2: borderTop + (tabHeight - BUTTON_SIZE)/2;
+				int state = SWT.NONE;
+				if (i == selectedIndex) state |= SWT.SELECTED;
+				Rectangle edgeTrim = renderer.computeTrim(i, state, 0, 0, 0, 0);
+				item.closeRect.x = item.x + item.width  - (edgeTrim.width + edgeTrim.x) - closeButtonSize.x;
+				item.closeRect.y = onBottom ? size.y - borderBottom - tabHeight + (tabHeight - closeButtonSize.y)/2: borderTop + (tabHeight - closeButtonSize.y)/2;
 				x = x + item.width;
-				if (!simple && i == selectedIndex) x += curveWidth - 2*curveIndent;
+				if (!simple && i == selectedIndex) x -= renderer.curveIndent; //TODO: fix next item position 
 			}
 		}
 	}
 	return changed;
 }
-boolean setItemSize() {
+boolean setItemSize(GC gc) {
 	boolean changed = false;
 	if (isDisposed()) return changed;
 	Point size = getSize();
 	if (size.x <= 0 || size.y <= 0) return changed;
-	xClient = borderLeft + marginWidth + highlight_margin;
-	if (onBottom) {
-		yClient = borderTop + highlight_margin + marginHeight;
-	} else {
-		yClient = borderTop + tabHeight + highlight_header + marginHeight; 
-	}
+
+	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+	int borderRight = trim.width + trim.x;
+	int borderLeft = -trim.x;
+	
 	showChevron = false;
 	if (single) {
 		showChevron = true;
 		if (selectedIndex != -1) {
 			CTabItem tab = items[selectedIndex];
-			GC gc = new GC(this);
-			int width = tab.preferredWidth(gc, true, false);
-			gc.dispose();
-			width = Math.min(width, getRightItemEdge() - borderLeft);
+			int width = renderer.computeSize(selectedIndex, SWT.SELECTED, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+			width = Math.min(width, getRightItemEdge(gc) - borderLeft);
 			if (tab.height != tabHeight || tab.width != width) {
 				changed = true;
 				tab.shortenedText = null;
@@ -2920,8 +2371,9 @@ boolean setItemSize() {
 				tab.width = width;
 				tab.closeRect.width = tab.closeRect.height = 0;
 				if (showClose || tab.showClose) {
-					tab.closeRect.width = BUTTON_SIZE;
-					tab.closeRect.height = BUTTON_SIZE;
+					Point closeSize = renderer.computeSize(CTabFolderRenderer.PART_CLOSE_BUTTON, SWT.SELECTED, gc, SWT.DEFAULT, SWT.DEFAULT);
+					tab.closeRect.width = closeSize.x;
+					tab.closeRect.height = closeSize.y;
 				}
 			}
 		}
@@ -2931,30 +2383,30 @@ boolean setItemSize() {
 	if (items.length == 0) return changed;
 
 	int[] widths;
-	GC gc = new GC(this);
 	int tabAreaWidth = size.x - borderLeft - borderRight - 3;
-	if (showMin) tabAreaWidth -= BUTTON_SIZE;
-	if (showMax) tabAreaWidth -= BUTTON_SIZE;
+	if (showMin) tabAreaWidth -= renderer.computeSize(CTabFolderRenderer.PART_MIN_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+	if (showMax) tabAreaWidth -= renderer.computeSize(CTabFolderRenderer.PART_MAX_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 	if (topRightAlignment == SWT.RIGHT && topRight != null) {
 		Point rightSize = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT, false);
 		tabAreaWidth -= rightSize.x + 3;
 	}
-	if (!simple) tabAreaWidth -= curveWidth - 2*curveIndent;
 	tabAreaWidth = Math.max(0, tabAreaWidth);
-	
+
 	// First, try the minimum tab size at full compression.
 	int minWidth = 0;
 	int[] minWidths = new int[items.length];	
 	for (int i = 0; i < priority.length; i++) {
 		int index = priority[i];
-		minWidths[index] = items[index].preferredWidth(gc, index == selectedIndex, true);
+		int state = CTabFolderRenderer.MINIMUM_SIZE;
+		if (index == selectedIndex) state |= SWT.SELECTED;
+		minWidths[index] = renderer.computeSize(index, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 		minWidth += minWidths[index];
 		if (minWidth > tabAreaWidth) break;
 	}
 	if (minWidth > tabAreaWidth) {
 		// full compression required and a chevron
 		showChevron = items.length > 1;
-		if (showChevron) tabAreaWidth -= 3*BUTTON_SIZE/2;
+		if (showChevron) tabAreaWidth -= renderer.computeSize(CTabFolderRenderer.PART_CHEVRON_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 		widths = minWidths;
 		int index = selectedIndex != -1 ? selectedIndex : 0;
 		if (tabAreaWidth < widths[index]) {
@@ -2964,7 +2416,9 @@ boolean setItemSize() {
 		int maxWidth = 0;
 		int[] maxWidths = new int[items.length];
 		for (int i = 0; i < items.length; i++) {
-			maxWidths[i] = items[i].preferredWidth(gc, i == selectedIndex, false);
+			int state = 0;
+			if (i == selectedIndex) state |= SWT.SELECTED;
+			maxWidths[i] = renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 			maxWidth += maxWidths[i];
 		}
 		if (maxWidth <= tabAreaWidth) {
@@ -2996,7 +2450,6 @@ boolean setItemSize() {
 			}
 		}
 	}
-	gc.dispose();
 
 	for (int i = 0; i < items.length; i++) {
 		CTabItem tab = items[i];
@@ -3010,8 +2463,9 @@ boolean setItemSize() {
 			tab.closeRect.width = tab.closeRect.height = 0;
 			if (showClose || tab.showClose) {
 				if (i == selectedIndex || showUnselectedClose) {
-					tab.closeRect.width = BUTTON_SIZE;
-					tab.closeRect.height = BUTTON_SIZE;
+					Point closeSize = renderer.computeSize(CTabFolderRenderer.PART_CLOSE_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT);
+					tab.closeRect.width = closeSize.x;
+					tab.closeRect.height = closeSize.y;
 				}
 			}
 		}
@@ -3183,6 +2637,37 @@ public void setMRUVisible(boolean show) {
 	}
 }
 /**
+ * Sets the renderer which is associated with the receiver to be
+ * the argument which may be null. In the case of null, the default
+ * renderer is used.
+ *
+ * @param renderer a new renderer
+ * 
+ * @exception SWTException <ul>
+ *		<li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread</li>
+ *		<li>ERROR_WIDGET_DISPOSED when the widget has been disposed</li>
+ *	</ul>
+ *
+ * @see CTabFolderRenderer
+ * 
+ * @since 3.6
+ */
+public void setRenderer(CTabFolderRenderer renderer) {
+	checkWidget();
+	if (this.renderer == renderer) return;
+	if (this.renderer != null) this.renderer.dispose();
+	if (renderer == null) renderer = new CTabFolderRenderer(this);
+	this.renderer = renderer;
+	updateTabHeight(false);
+	Rectangle rectBefore = getClientArea();
+	updateItems();
+	Rectangle rectAfter = getClientArea();
+	if (!rectBefore.equals(rectAfter)) {
+		notifyListeners(SWT.Resize, new Event());
+	}
+	redraw();
+}
+/**
  * Set the selection to the tab at the specified item.
  * 
  * @param item the tab item to be selected
@@ -3224,10 +2709,12 @@ public void setSelection(int index) {
 	int oldIndex = selectedIndex;
 	selectedIndex = index;
 	if (oldIndex != -1) {
-		items[oldIndex].closeImageState = NONE;
+		items[oldIndex].closeImageState = SWT.BACKGROUND;
+		items[oldIndex].state &= ~SWT.SELECTED;
 	}
-	selection.closeImageState = NORMAL;
+	selection.closeImageState = SWT.NONE;
 	selection.showing = false;
+	selection.state |= SWT.SELECTED;
 
 	Control newControl = selection.control;
 	Control oldControl = null;
@@ -3279,6 +2766,7 @@ public void setSelectionBackground (Color color) {
 	if (selectionBackground == color) return;
 	if (color == null) color = getDisplay().getSystemColor(SELECTION_BACKGROUND);
 	selectionBackground = color;
+	renderer.createAntialiasColors(); //TODO:  need better caching strategy
 	if (selectedIndex > -1) redraw();
 }
 /**
@@ -3429,58 +2917,8 @@ public void setSelectionBackground(Color[] colors, int[] percents, boolean verti
  * Set the color for the highlight start for selected tabs.
  * Update the cache of highlight gradient colors if required.
  */
-
 void setSelectionHighlightGradientColor(Color start) {
-	//Set to null to match all the early return cases.
-	//For early returns, don't realloc the cache, we may get a cache hit next time we're given the highlight
-	selectionHighlightGradientBegin = null;
-
-	if(start == null)
-		return;
-
-	//don't bother on low colour
-	if (getDisplay().getDepth() < 15)
-		return;
-	
-	//don't bother if we don't have a background gradient
-	if(selectionGradientColors.length < 2) 
-		return;
-
-	//OK we know its a valid gradient now
-	selectionHighlightGradientBegin = start;
-
-	if(! isSelectionHighlightColorsCacheHit(start))
-		createSelectionHighlightGradientColors(start);  //if no cache hit then compute new ones
-}
-
-/*
- * Return true if given start color, the cache of highlight colors we have
- * would match the highlight colors we'd compute.
- */
-boolean isSelectionHighlightColorsCacheHit(Color start) {
-
-	if(selectionHighlightGradientColorsCache == null)
-		return false;
-	
-	//this case should never happen but check to be safe before accessing array indexes
-	if(selectionHighlightGradientColorsCache.length < 2)
-		return false;
-
-	Color highlightBegin = selectionHighlightGradientColorsCache[0];
-	Color highlightEnd = selectionHighlightGradientColorsCache[selectionHighlightGradientColorsCache.length - 1];
-
-	if(! highlightBegin.equals(start))
-		return false;	
-	
-	//Compare number of colours we have vs. we'd compute
-	if(selectionHighlightGradientColorsCache.length != tabHeight)
-		return false;
-	
-	//Compare existing highlight end to what it would be (selectionBackground)
-	if(! highlightEnd.equals(selectionBackground))
-		return false;
-	
-	return true;
+	renderer.setSelectionHighlightGradientColor(start);  //TODO: need better caching strategy
 }
 
 /**
@@ -3501,9 +2939,10 @@ public void setSelectionBackground(Image image) {
 	if (image != null) {
 		selectionGradientColors = null;
 		selectionGradientPercents = null;
-		disposeSelectionHighlightGradientColors();
+		renderer.disposeSelectionHighlightGradientColors(); //TODO: need better caching strategy
 	}
 	selectionBgImage = image;
+	renderer.createAntialiasColors(); //TODO:  need better caching strategy
 	if (selectedIndex > -1) redraw();
 }
 /**
@@ -3524,59 +2963,6 @@ public void setSelectionForeground (Color color) {
 	if (selectedIndex > -1) redraw();
 }
 
-/*
- * Allocate colors for the highlight line.
- * Colours will be a gradual blend ranging from to.
- * Blend length will be tab height.
- * Recompute this if tab height changes.
- * Could remain null if there'd be no gradient (start=end or low colour display)
- */
-void createSelectionHighlightGradientColors(Color start) {
-	disposeSelectionHighlightGradientColors(); //dispose if existing
-
-	if(start == null)  //shouldn't happen but just to be safe
-		return;
-
-	//alloc colours for entire height to ensure it matches wherever we stop drawing
-	int fadeGradientSize = tabHeight;
-
-	RGB from = start.getRGB();
-	RGB to = selectionBackground.getRGB();
-
-	selectionHighlightGradientColorsCache = new Color[fadeGradientSize];
-	int denom = fadeGradientSize - 1;
-
-	for (int i = 0; i < fadeGradientSize; i++) {
-		int propFrom = denom - i;
-		int propTo = i;
-		int red = (to.red * propTo + from.red * propFrom) / denom;
-		int green = (to.green * propTo  + from.green * propFrom) / denom;
-		int blue = (to.blue * propTo  + from.blue * propFrom) / denom;
-		selectionHighlightGradientColorsCache[i] = new Color(getDisplay(), red, green, blue);
-	}
-}
-
-void disposeSelectionHighlightGradientColors() {
-	if(selectionHighlightGradientColorsCache == null)
-		return;
-	for (int i = 0; i < selectionHighlightGradientColorsCache.length; i++) {
-		selectionHighlightGradientColorsCache[i].dispose();
-	}
-	selectionHighlightGradientColorsCache = null;
-}
-
-/*
- * Return the gradient start color for selected tabs, which is the start of the tab fade
- * (end is selectionBackground).
- */
-Color getSelectionBackgroundGradientBegin() {
-	if (selectionGradientColors == null)
-		return getSelectionBackground();
-	if (selectionGradientColors.length == 0)
-		return getSelectionBackground();
-	return selectionGradientColors[0];
-}
-
 /**
  * Sets the shape that the CTabFolder will use to render itself.  
  * 
@@ -3620,8 +3006,8 @@ public void setSingle(boolean single) {
 		this.single = single;
 		if (!single) {
 			for (int i = 0; i < items.length; i++) {
-				if (i != selectedIndex && items[i].closeImageState == NORMAL) {
-					items[i].closeImageState = NONE;
+				if (i != selectedIndex && items[i].closeImageState == SWT.NONE) {
+					items[i].closeImageState = SWT.BACKGROUND;
 				}
 			}
 		}
@@ -3676,8 +3062,6 @@ public void setTabPosition(int position) {
 	}
 	if (onBottom != (position == SWT.BOTTOM)) {
 		onBottom = position == SWT.BOTTOM;
-		borderTop = onBottom ? borderLeft : 0;
-		borderBottom = onBottom ? 0 : borderRight;
 		updateTabHeight(true);
 		Rectangle rectBefore = getClientArea();
 		updateItems();
@@ -3832,7 +3216,7 @@ public void showItem (CTabItem item) {
 void showList (Rectangle rect) {
 	if (items.length == 0 || !showChevron) return;
 	if (showMenu == null || showMenu.isDisposed()) {
-		showMenu = new Menu(this);
+		showMenu = new Menu(getShell(), getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
 	} else {
 		MenuItem[] items = showMenu.getItems();
 		for (int i = 0; i < items.length; i++) {
@@ -3895,24 +3279,29 @@ boolean updateItems() {
 }
 
 boolean updateItems(int showIndex) {
+	GC gc = new GC(this);
 	if (!single && !mru && showIndex != -1) {
 		// make sure selected item will be showing
 		int firstIndex = showIndex;
 		if (priority[0] < showIndex) {
-			int maxWidth = getRightItemEdge() - borderLeft;
-			if (!simple) maxWidth -= curveWidth - 2*curveIndent;
+			Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+			int borderLeft = -trim.x;
+			int maxWidth = getRightItemEdge(gc) - borderLeft;
 			int width = 0;
 			int[] widths = new int[items.length];
-			GC gc = new GC(this);
 			for (int i = priority[0]; i <= showIndex; i++) {
-				widths[i] = items[i].preferredWidth(gc, i == selectedIndex, true);
+				int state = CTabFolderRenderer.MINIMUM_SIZE;
+				if (i == selectedIndex) state |= SWT.SELECTED;
+				widths[i] = renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 				width += widths[i];
 				if (width > maxWidth) break;
 			}
 			if (width > maxWidth) {
 				width = 0;
 				for (int i = showIndex; i >= 0; i--) {
-					if (widths[i] == 0) widths[i] = items[i].preferredWidth(gc, i == selectedIndex, true);
+					int state = CTabFolderRenderer.MINIMUM_SIZE;
+					if (i == selectedIndex) state |= SWT.SELECTED;
+					if (widths[i] == 0) widths[i] = renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 					width += widths[i];
 					if (width > maxWidth) break;
 					firstIndex = i;
@@ -3920,20 +3309,24 @@ boolean updateItems(int showIndex) {
 			} else {
 				firstIndex = priority[0];
 				for (int i = showIndex + 1; i < items.length; i++) {
-					widths[i] = items[i].preferredWidth(gc, i == selectedIndex, true);
+					int state = CTabFolderRenderer.MINIMUM_SIZE;
+					if (i == selectedIndex) state |= SWT.SELECTED;
+					widths[i] = renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 					width += widths[i];
 					if (width >= maxWidth) break;
 				}
 				if (width < maxWidth) {
 					for (int i = priority[0] - 1; i >= 0; i--) {
-						if (widths[i] == 0) widths[i] = items[i].preferredWidth(gc, i == selectedIndex, true);
+						int state = CTabFolderRenderer.MINIMUM_SIZE;
+						if (i == selectedIndex) state |= SWT.SELECTED;
+						if (widths[i] == 0) widths[i] = renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 						width += widths[i];
 						if (width > maxWidth) break;
 						firstIndex = i;
 					}
 				}
 			}
-			gc.dispose();
+		
 		}
 		if (firstIndex != priority[0]) {
 			int index = 0;
@@ -3947,72 +3340,25 @@ boolean updateItems(int showIndex) {
 	}
 	
 	boolean oldShowChevron = showChevron;
-	boolean changed = setItemSize();
-	changed |= setItemLocation();
-	setButtonBounds();
+	boolean changed = setItemSize(gc);
+	changed |= setItemLocation(gc);
+	setButtonBounds(gc);
 	changed |= showChevron != oldShowChevron;
 	if (changed && getToolTipText() != null) {
 		Point pt = getDisplay().getCursorLocation();
 		pt = toControl(pt);
 		_setToolTipText(pt.x, pt.y);
 	}
+	gc.dispose();
 	return changed;
 }
 boolean updateTabHeight(boolean force){
-	int style = getStyle();
-	if (fixedTabHeight == 0 && (style & SWT.FLAT) != 0 && (style & SWT.BORDER) == 0) highlight_header = 0;		
 	int oldHeight = tabHeight;
-	if (fixedTabHeight != SWT.DEFAULT) {
-		tabHeight = fixedTabHeight == 0 ? 0 : fixedTabHeight + 1; // +1 for line drawn across top of tab
-	} else {
-		int tempHeight = 0;
-		GC gc = new GC(this);
-		if (items.length == 0) {
-			tempHeight = gc.textExtent("Default", CTabItem.FLAGS).y + CTabItem.TOP_MARGIN + CTabItem.BOTTOM_MARGIN; //$NON-NLS-1$
-		} else {
-			for (int i=0; i < items.length; i++) {
-				tempHeight = Math.max(tempHeight, items[i].preferredHeight(gc));
-			}
-		}
-		gc.dispose();
-		tabHeight =  tempHeight;
-	}
+	GC gc = new GC(this);
+	tabHeight = renderer.computeSize(CTabFolderRenderer.PART_HEADER, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).y;
+	gc.dispose();
 	if (!force && tabHeight == oldHeight) return false;
-	
 	oldSize = null;
-	if (onBottom) {
-		int d = tabHeight - 12;
-		curve = new int[]{0,13+d, 0,12+d, 2,12+d, 3,11+d, 5,11+d, 6,10+d, 7,10+d, 9,8+d, 10,8+d,
-				          11,7+d, 11+d,7,
-						  12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1}; 
-		curveWidth = 26+d;
-		curveIndent = curveWidth/3;	
-	} else {
-		int d = tabHeight - 12;
-		curve = new int[]{0,0, 0,1, 2,1, 3,2, 5,2, 6,3, 7,3, 9,5, 10,5,
-				          11,6, 11+d,6+d,
-				          12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
-		curveWidth = 26+d;
-		curveIndent = curveWidth/3;
-		
-		//this could be static but since values depend on curve, better to keep in one place
-		topCurveHighlightStart = new int[] { 
-				0, 2,  1, 2,  2, 2,    
-				3, 3,  4, 3,  5, 3, 
-				6, 4,  7, 4,
-				8, 5, 
-				9, 6, 10, 6};
-		
-		//also, by adding in 'd' here we save some math cost when drawing the curve
-		topCurveHighlightEnd = new int[] { 
-				10+d, 6+d,
-				11+d, 7+d,
-				12+d, 8+d,  13+d, 8+d,
-				14+d, 9+d,
-				15+d, 10+d,  16+d, 10+d,
-				17+d, 11+d,  18+d, 11+d,  19+d, 11+d,
-				20+d, 12+d,  21+d, 12+d,  22+d,  12+d }; 
-	}
 	notifyListeners(SWT.Resize, new Event());
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java
index e01fac6..a9fbf02 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderLayout.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,26 +23,32 @@ class CTabFolderLayout extends Layout {
 protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
 	CTabFolder folder = (CTabFolder)composite;
 	CTabItem[] items = folder.items;
+	CTabFolderRenderer renderer = folder.renderer;
 	// preferred width of tab area to show all tabs
 	int tabW = 0;
+	int selectedIndex = folder.selectedIndex;
+	if (selectedIndex == -1) selectedIndex = 0;
 	GC gc = new GC(folder);
 	for (int i = 0; i < items.length; i++) {
 		if (folder.single) {
-			tabW = Math.max(tabW, items[i].preferredWidth(gc, true, false));
+			tabW = Math.max(tabW, renderer.computeSize(i, SWT.SELECTED, gc, SWT.DEFAULT, SWT.DEFAULT).x);
 		} else {
-			tabW += items[i].preferredWidth(gc, i == folder.selectedIndex, false);
+			int state = 0;
+			if (i == selectedIndex) state |= SWT.SELECTED;
+			tabW += renderer.computeSize(i, state, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 		}
 	}
-	gc.dispose();
 	tabW += 3;
-	if (folder.showMax) tabW += CTabFolder.BUTTON_SIZE;
-	if (folder.showMin) tabW += CTabFolder.BUTTON_SIZE;
-	if (folder.single) tabW += 3*CTabFolder.BUTTON_SIZE/2; //chevron
+	
+	if (folder.showMax) tabW += renderer.computeSize(CTabFolderRenderer.PART_MAX_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+	if (folder.showMin) tabW += renderer.computeSize(CTabFolderRenderer.PART_MIN_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+	if (folder.single) tabW += renderer.computeSize(CTabFolderRenderer.PART_CHEVRON_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
 	if (folder.topRight != null) {
 		Point pt = folder.topRight.computeSize(SWT.DEFAULT, folder.tabHeight, flushCache);
 		tabW += 3 + pt.x;
 	}
-	if (!folder.single && !folder.simple) tabW += folder.curveWidth - 2*folder.curveIndent;
+
+	gc.dispose();
 	
 	int controlW = 0;
 	int controlH = 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
new file mode 100644
index 0000000..1a05182
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java	
@@ -0,0 +1,1755 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * Instances of this class provide all of the measuring and drawing functionality 
+ * required by <code>CTabFolder</code>. This class can be subclassed in order to
+ * customize the look of a CTabFolder.
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * @since 3.6
+ */
+public class CTabFolderRenderer {
+	
+	protected CTabFolder parent;
+	
+	int[] curve;
+	int[] topCurveHighlightStart;
+	int[] topCurveHighlightEnd;
+	int curveWidth = 0;
+	int curveIndent = 0;
+	int lastTabHeight = -1;
+	
+	Color fillColor;
+	/* Selected item appearance */
+	Color selectionHighlightGradientBegin = null;  //null == no highlight
+	//Although we are given new colours all the time to show different states (active, etc),
+	//some of which may have a highlight and some not, we'd like to retain the highlight colours
+	//as a cache so that we can reuse them if we're again told to show the highlight.
+	//We are relying on the fact that only one tab state usually gets a highlight, so only
+	//a single cache is required. If that happens to not be true, cache simply becomes less effective,
+	//but we don't leak colours.
+	Color[] selectionHighlightGradientColorsCache = null;  //null is a legal value, check on access
+	/* Colors for anti-aliasing */
+	Color selectedOuterColor = null;
+	Color selectedInnerColor = null;
+	Color tabAreaColor = null;
+	/* 
+	 * Border color that was used in computing the cached anti-alias Colors.
+	 * We have to recompute the colors if the border color changes
+	 */
+	Color lastBorderColor = null;
+	
+	//TOP_LEFT_CORNER_HILITE is laid out in reverse (ie. top to bottom)
+	//so can fade in same direction as right swoop curve
+	static final int[] TOP_LEFT_CORNER_HILITE = new int[] {5,2, 4,2, 3,3, 2,4, 2,5, 1,6};
+
+	static final int[] TOP_LEFT_CORNER = new int[] {0,6, 1,5, 1,4, 4,1, 5,1, 6,0};
+	static final int[] TOP_RIGHT_CORNER = new int[] {-6,0, -5,1, -4,1, -1,4, -1,5, 0,6};
+	static final int[] BOTTOM_LEFT_CORNER = new int[] {0,-6, 1,-5, 1,-4, 4,-1, 5,-1, 6,0};
+	static final int[] BOTTOM_RIGHT_CORNER = new int[] {-6,0, -5,-1, -4,-1, -1,-4, -1,-5, 0,-6};
+
+	static final int[] SIMPLE_TOP_LEFT_CORNER = new int[] {0,2, 1,1, 2,0};
+	static final int[] SIMPLE_TOP_RIGHT_CORNER = new int[] {-2,0, -1,1, 0,2};
+	static final int[] SIMPLE_BOTTOM_LEFT_CORNER = new int[] {0,-2, 1,-1, 2,0};
+	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER = new int[] {-2,0, -1,-1, 0,-2};
+	static final int[] SIMPLE_UNSELECTED_INNER_CORNER = new int[] {0,0};
+
+	static final int[] TOP_LEFT_CORNER_BORDERLESS = new int[] {0,6, 1,5, 1,4, 4,1, 5,1, 6,0};
+	static final int[] TOP_RIGHT_CORNER_BORDERLESS = new int[] {-7,0, -6,1, -5,1, -2,4, -2,5, -1,6};
+	static final int[] BOTTOM_LEFT_CORNER_BORDERLESS = new int[] {0,-6, 1,-6, 1,-5, 2,-4, 4,-2, 5,-1, 6,-1, 6,0};
+	static final int[] BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-7,0, -7,-1, -6,-1, -5,-2, -3,-4, -2,-5, -2,-6, -1,-6};
+
+	static final int[] SIMPLE_TOP_LEFT_CORNER_BORDERLESS = new int[] {0,2, 1,1, 2,0};
+	static final int[] SIMPLE_TOP_RIGHT_CORNER_BORDERLESS= new int[] {-3,0, -2,1, -1,2};
+	static final int[] SIMPLE_BOTTOM_LEFT_CORNER_BORDERLESS = new int[] {0,-3, 1,-2, 2,-1, 3,0};
+	static final int[] SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS = new int[] {-4,0, -3,-1, -2,-2, -1,-3};
+	
+	static final RGB CLOSE_FILL = new RGB(252, 160, 160);
+	
+	static final int BUTTON_SIZE = 18;
+	
+	static final int BUTTON_BORDER = SWT.COLOR_WIDGET_DARK_SHADOW;
+	static final int BUTTON_FILL = SWT.COLOR_LIST_BACKGROUND;
+	static final int BORDER1_COLOR = SWT.COLOR_WIDGET_NORMAL_SHADOW;
+	
+	static final int ITEM_TOP_MARGIN = 2;
+	static final int ITEM_BOTTOM_MARGIN = 2;
+	static final int ITEM_LEFT_MARGIN = 4;
+	static final int ITEM_RIGHT_MARGIN = 4;
+	static final int INTERNAL_SPACING = 4;
+	static final int FLAGS = SWT.DRAW_TRANSPARENT | SWT.DRAW_MNEMONIC;
+	static final String ELLIPSIS = "..."; //$NON-NLS-1$ 
+	
+	//Part constants
+	public static final int PART_BODY = -1;
+	public static final int PART_HEADER = -2;
+	public static final int PART_BORDER = -3;
+	public static final int PART_BACKGROUND = -4;
+	public static final int PART_MAX_BUTTON = -5;
+	public static final int PART_MIN_BUTTON = -6;
+	public static final int PART_CHEVRON_BUTTON = -7;
+	public static final int PART_CLOSE_BUTTON = -8;
+
+	public static final int MINIMUM_SIZE = 1 << 24; //TODO: Should this be a state?
+
+
+	/**
+	 * Constructs a new instance of this class given its parent.
+	 * 
+	 * @param parent CTabFolder
+	 *
+	 * @exception IllegalArgumentException <ul>
+	 *    <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li>
+	 * </ul>
+	 * 
+	 * @see Widget#getStyle
+	 */
+	protected CTabFolderRenderer(CTabFolder parent) {
+		if (parent == null) return;
+		if (parent.isDisposed ()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+		this.parent = parent;
+	}
+	
+	void antialias (int[] shape, Color innerColor, Color outerColor, GC gc){
+		// Don't perform anti-aliasing on Mac and WPF because the platform
+		// already does it.  The simple style also does not require anti-aliasing.
+		if (parent.simple) return;
+		String platform = SWT.getPlatform();
+		if ("cocoa".equals(platform)) return; //$NON-NLS-1$
+		if ("carbon".equals(platform)) return; //$NON-NLS-1$
+		if ("wpf".equals(platform)) return; //$NON-NLS-1$
+		// Don't perform anti-aliasing on low resolution displays
+		if (parent.getDisplay().getDepth() < 15) return;
+		if (outerColor != null) {
+			int index = 0;
+			boolean left = true;
+			int oldY = parent.onBottom ? 0 : parent.getSize().y;
+			int[] outer = new int[shape.length];
+			for (int i = 0; i < shape.length/2; i++) {
+				if (left && (index + 3 < shape.length)) {
+					left = parent.onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3];
+					oldY = shape[index+1];
+				}
+				outer[index] = shape[index++] + (left ? -1 : +1);
+				outer[index] = shape[index++];
+			}
+			gc.setForeground(outerColor);
+			gc.drawPolyline(outer);
+		}
+		if (innerColor != null) {
+			int[] inner = new int[shape.length];
+			int index = 0;
+			boolean left = true;
+			int oldY = parent.onBottom ? 0 : parent.getSize().y;
+			for (int i = 0; i < shape.length/2; i++) {
+				if (left && (index + 3 < shape.length)) {
+					left = parent.onBottom ? oldY <= shape[index+3] : oldY >= shape[index+3];
+					oldY = shape[index+1];
+				}
+				inner[index] = shape[index++] + (left ? +1 : -1);
+				inner[index] = shape[index++];
+			}
+			gc.setForeground(innerColor);
+			gc.drawPolyline(inner);
+		}
+	}
+
+	/**
+	 * Returns the preferred size of a part.
+	 * <p>
+	 * The <em>preferred size</em> of a part is the size that it would
+	 * best be displayed at. The width hint and height hint arguments
+	 * allow the caller to ask a control questions such as "Given a particular
+	 * width, how high does the part need to be to show all of the contents?"
+	 * To indicate that the caller does not wish to constrain a particular 
+	 * dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. 
+	 * </p><p>
+	 * The <code>part</code> value indicated what component the preferred size is 
+	 * to be calculated for. Valid values are any of the part constants:
+	 * <ul> 
+	 * <li>PART_BODY</li>
+	 * <li>PART_HEADER</li> 
+	 * <li>PART_BORDER</li>
+	 * <li>PART_BACKGROUND</li> 
+	 * <li>PART_MAX_BUTTON</li> 
+	 * <li>PART_MIN_BUTTON</li> 
+	 * <li>PART_CHEVRON_BUTTON</li>
+	 * <li>PART_CLOSE_BUTTON</li> 
+	 * <li>A positive integer which is the index of an item in the CTabFolder.</li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * The <code>state</code> parameter may be one of the following: 
+	 * <ul>
+	 * <li>SWT.NONE</li>
+	 * <li>SWT.SELECTED - whether the part is selected</li>
+	 * </ul>
+	 * </p>
+	 * @param part a part constant 
+	 * @param state current state 
+	 * @param gc the gc to use for measuring
+	 * @param wHint the width hint (can be <code>SWT.DEFAULT</code>)
+	 * @param hHint the height hint (can be <code>SWT.DEFAULT</code>)
+	 * @return the preferred size of the part
+	 * 
+	 * @since 3.6
+	 */
+	protected Point computeSize (int part, int state, GC gc, int wHint, int hHint) {
+		int width = 0, height = 0; 
+		switch (part) {
+			case PART_HEADER:
+				if (parent.fixedTabHeight != SWT.DEFAULT) {
+					height = parent.fixedTabHeight == 0 ? 0 : parent.fixedTabHeight + 1; // +1 for line drawn across top of tab
+				} else {
+					CTabItem[] items = parent.items;
+					if (items.length == 0) {
+						height = gc.textExtent("Default", FLAGS).y + ITEM_TOP_MARGIN + ITEM_BOTTOM_MARGIN; //$NON-NLS-1$
+					} else {
+						for (int i=0; i < items.length; i++) {
+							height = Math.max(height, computeSize(i, SWT.NONE, gc, wHint, hHint).y);
+						}
+					}
+					gc.dispose();
+				}
+				break;
+			case PART_MAX_BUTTON:
+			case PART_MIN_BUTTON:
+			case PART_CLOSE_BUTTON:
+				width = height = BUTTON_SIZE;
+				break;
+			case PART_CHEVRON_BUTTON:
+				width = 3*BUTTON_SIZE/2;
+				height = BUTTON_SIZE;
+				break;
+			default:
+				if (0 <= part && part < parent.getItemCount()) {
+					updateCurves();
+					CTabItem item = parent.items[part]; 
+					if (item.isDisposed()) return new Point(0,0);
+					Image image = item.getImage();
+					if (image != null) { 
+						Rectangle bounds = image.getBounds();
+						if ((state & SWT.SELECTED) != 0 || parent.showUnselectedImage) {
+							width += bounds.width;
+						}
+						height =  bounds.height;
+					}
+					String text = null;
+					if ((state & MINIMUM_SIZE) != 0) {
+						int minChars = parent.minChars;
+						text = minChars == 0 ? null : item.getText();
+						if (text != null && text.length() > minChars) {
+							if (useEllipses()) {
+								int end = minChars < ELLIPSIS.length() + 1 ? minChars : minChars - ELLIPSIS.length();
+								text = text.substring(0, end);
+								if (minChars > ELLIPSIS.length() + 1) text += ELLIPSIS;
+							} else {
+								int end = minChars;
+								text = text.substring(0, end);
+							}
+						}
+					} else {
+						text = item.getText();
+					}
+					if (text != null) {
+						if (width > 0) width += INTERNAL_SPACING;
+						if (item.font == null) {
+							Point size = gc.textExtent(text, FLAGS);
+							width += size.x;
+							height = Math.max(height, size.y);
+						} else {
+							Font gcFont = gc.getFont();
+							gc.setFont(item.font);
+							Point size = gc.textExtent(text, FLAGS);
+							width += size.x;
+							height = Math.max(height, size.y);
+							gc.setFont(gcFont);
+						}
+					}
+					if (parent.showClose || item.showClose) {
+						if ((state & SWT.SELECTED) != 0 || parent.showUnselectedClose) {
+							if (width > 0) width += INTERNAL_SPACING;
+							width += computeSize(PART_CLOSE_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x;
+						}
+					}	
+				}
+				break;
+		}
+		Rectangle trim = computeTrim(part, state, 0, 0, width, height);
+		width = trim.width;
+		height = trim.height;
+		return new Point(width, height);
+	}
+
+	/**
+	 * Given a desired <em>client area</em> for the part
+	 * (as described by the arguments), returns the bounding
+	 * rectangle which would be required to produce that client
+	 * area.
+	 * <p>
+	 * In other words, it returns a rectangle such that, if the
+	 * part's bounds were set to that rectangle, the area
+	 * of the part which is capable of displaying data
+	 * (that is, not covered by the "trimmings") would be the
+	 * rectangle described by the arguments (relative to the
+	 * receiver's parent).
+	 * </p>
+	 * 
+	 * @param part one of the part constants 
+	 * @param state the state of the part
+	 * @param x the desired x coordinate of the client area
+	 * @param y the desired y coordinate of the client area
+	 * @param width the desired width of the client area
+	 * @param height the desired height of the client area
+	 * @return the required bounds to produce the given client area
+	 *
+	 * @see CTabFolderRenderer#computeSize(int, int, GC, int, int) valid part and state values
+	 *  
+	 * @since 3.6
+	 */
+	protected Rectangle computeTrim (int part, int state, int x, int y, int width, int height) {
+		int borderLeft = parent.borderVisible ? 1 : 0;
+		int borderRight = borderLeft;
+		int borderTop = parent.onBottom ? borderLeft : 0;
+		int borderBottom = parent.onBottom ? 0 : borderLeft;
+		int tabHeight = parent.tabHeight;
+		switch (part) {
+			case PART_BODY:
+				int style = parent.getStyle();
+				int highlight_header = (style & SWT.FLAT) != 0 ? 1 : 3;
+				int highlight_margin = (style & SWT.FLAT) != 0 ? 0 : 2;
+				if (parent.fixedTabHeight == 0 && (style & SWT.FLAT) != 0 && (style & SWT.BORDER) == 0) {
+					highlight_header = 0;	
+				}
+				int marginWidth = parent.marginWidth;
+				int marginHeight = parent.marginHeight;
+				x = x - marginWidth - highlight_margin - borderLeft;
+				width = width + borderLeft + borderRight + 2*marginWidth + 2*highlight_margin;
+				if (parent.minimized) {
+					y = parent.onBottom ? y - borderTop : y - highlight_header - tabHeight - borderTop;
+					height = borderTop + borderBottom + tabHeight + highlight_header;
+				} else {
+					y = parent.onBottom ? y - marginHeight - highlight_margin - borderTop: y - marginHeight - highlight_header - tabHeight - borderTop;
+					height = height + borderTop + borderBottom + 2*marginHeight + tabHeight + highlight_header + highlight_margin;
+				}
+				break;
+			case PART_HEADER:
+				//no trim 
+				break;
+			case PART_BORDER:
+				x = x - borderLeft;
+				width = width + borderLeft + borderRight; 
+				y = y - borderTop;
+				height = height + borderTop + borderBottom;
+				break;
+			default:
+				if (0 <= part && part < parent.getItemCount()) {
+					updateCurves();
+					x = x - ITEM_LEFT_MARGIN;
+					width = width + ITEM_LEFT_MARGIN + ITEM_RIGHT_MARGIN;
+					if (!parent.simple && !parent.single && (state & SWT.SELECTED) != 0) {
+						width += curveWidth - curveIndent;
+					}
+					y = y - ITEM_TOP_MARGIN;
+					height = height + ITEM_TOP_MARGIN + ITEM_BOTTOM_MARGIN;
+				}
+				break;
+		}
+		return new Rectangle(x, y, width, height);
+	}
+	
+	void createAntialiasColors() {
+	    disposeAntialiasColors();
+	    lastBorderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
+	    RGB lineRGB = lastBorderColor.getRGB();
+	    /* compute the selected color */
+	    RGB innerRGB = parent.selectionBackground.getRGB();
+	    if (parent.selectionBgImage != null || 
+		    (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
+		    innerRGB = null;
+	    }
+	    RGB outerRGB = parent.getBackground().getRGB();		
+	    if (parent.gradientColors != null && parent.gradientColors.length > 1) {
+		    outerRGB = null;
+	    }
+	    if (outerRGB != null) {
+			RGB from = lineRGB;
+			RGB to = outerRGB;
+			int red = from.red + 2*(to.red - from.red)/3;
+			int green = from.green + 2*(to.green - from.green)/3;
+			int blue = from.blue + 2*(to.blue - from.blue)/3;
+			selectedOuterColor = new Color(parent.getDisplay(), red, green, blue);
+	    }
+	    if (innerRGB != null) {
+			RGB from = lineRGB;
+			RGB to = innerRGB;
+			int red = from.red + 2*(to.red - from.red)/3;
+			int green = from.green + 2*(to.green - from.green)/3;
+			int blue = from.blue + 2*(to.blue - from.blue)/3;
+			selectedInnerColor = new Color(parent.getDisplay(), red, green, blue);
+	    }
+	    /* compute the tabArea color */
+	    outerRGB = parent.getParent().getBackground().getRGB();
+	    if (outerRGB != null) {
+			RGB from = lineRGB;
+			RGB to = outerRGB;
+			int red = from.red + 2*(to.red - from.red)/3;
+			int green = from.green + 2*(to.green - from.green)/3;
+			int blue = from.blue + 2*(to.blue - from.blue)/3;
+			tabAreaColor = new Color(parent.getDisplay(), red, green, blue);
+	    }
+	}
+
+	/*
+	 * Allocate colors for the highlight line.
+	 * Colours will be a gradual blend ranging from to.
+	 * Blend length will be tab height.
+	 * Recompute this if tab height changes.
+	 * Could remain null if there'd be no gradient (start=end or low colour display)
+	 */
+	void createSelectionHighlightGradientColors(Color start) {
+		disposeSelectionHighlightGradientColors(); //dispose if existing
+
+		if(start == null)  //shouldn't happen but just to be safe
+			return;
+
+		//alloc colours for entire height to ensure it matches wherever we stop drawing
+		int fadeGradientSize = parent.tabHeight;
+
+		RGB from = start.getRGB();
+		RGB to = parent.selectionBackground.getRGB();
+
+		selectionHighlightGradientColorsCache = new Color[fadeGradientSize];
+		int denom = fadeGradientSize - 1;
+
+		for (int i = 0; i < fadeGradientSize; i++) {
+			int propFrom = denom - i;
+			int propTo = i;
+			int red = (to.red * propTo + from.red * propFrom) / denom;
+			int green = (to.green * propTo  + from.green * propFrom) / denom;
+			int blue = (to.blue * propTo  + from.blue * propFrom) / denom;
+			selectionHighlightGradientColorsCache[i] = new Color(parent.getDisplay(), red, green, blue);
+		}
+	}
+	
+	/**
+	 * Dispose of any operating system resources associated with
+	 * the renderer. Called by the CTabFolder parent upon receiving
+	 * the dispose event or when changing the renderer.
+	 * 
+	 * @since 3.6
+	 */
+	protected void dispose() {
+		disposeAntialiasColors();
+		disposeSelectionHighlightGradientColors();
+		if (fillColor != null) {
+		    fillColor.dispose();
+		    fillColor = null;
+		}
+	}
+	
+	void disposeAntialiasColors() {
+	    if (tabAreaColor != null) tabAreaColor.dispose();
+	    if (selectedInnerColor != null) selectedInnerColor.dispose();
+	    if (selectedOuterColor != null) selectedOuterColor.dispose();
+	    tabAreaColor = selectedInnerColor = selectedOuterColor = null;
+	}
+
+	void disposeSelectionHighlightGradientColors() {
+		if(selectionHighlightGradientColorsCache == null)
+			return;
+		for (int i = 0; i < selectionHighlightGradientColorsCache.length; i++) {
+			selectionHighlightGradientColorsCache[i].dispose();
+		}
+		selectionHighlightGradientColorsCache = null;
+	}
+	
+	/**
+	 * Draw a specified <code>part</code> of the CTabFolder using the provided <code>bounds</code> and <code>GC</code>. 
+	 * <p>The valid CTabFolder <code>part</code> constants are:
+	 * <ul>
+	 * <li>PART_BODY - the entire body of the CTabFolder</li>
+	 * <li>PART_HEADER - the upper tab area of the CTabFolder</li>
+	 * <li>PART_BORDER - the border of the CTabFolder</li>
+	 * <li>PART_BACKGROUND - the background of the CTabFolder</li>
+	 * <li>PART_MAX_BUTTON</li> 
+	 * <li>PART_MIN_BUTTON</li>
+	 * <li>PART_CHEVRON_BUTTON</li>
+	 * <li>PART_CLOSE_BUTTON</li>
+	 * <li>A positive integer which is the index of an item in the CTabFolder.</li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * The <code>state</code> parameter may be a combination of: 
+	 * <ul>
+	 * <li>SWT.BACKGROUND - whether the background should be drawn</li>
+	 * <li>SWT.FOREGROUND - whether the foreground should be drawn</li>
+	 * <li>SWT.SELECTED - whether the part is selected</li>
+	 * <li>SWT.HOT - whether the part is hot (i.e. mouse is over the part)</li>
+	 * </ul>
+	 * </p>
+	 * 
+	 * @param part part to draw 
+	 * @param state state of the part 
+	 * @param bounds the bounds of the part
+	 * @param gc the gc to draw the part on
+	 * 
+	 * @since 3.6
+	 */
+	protected void draw (int part, int state, Rectangle bounds, GC gc) {
+		switch (part) {
+			case PART_BACKGROUND:
+				this.drawBackground(gc, bounds, state);
+				break;
+			case PART_BODY:
+				drawBody(gc, bounds, state);
+				break;
+			case PART_HEADER:
+				drawTabArea(gc, bounds, state);
+				break;
+			case PART_MAX_BUTTON:
+				drawMaximize(gc, bounds, state);
+				break;
+			case PART_MIN_BUTTON:
+				drawMinimize(gc, bounds, state);
+				break;
+			case PART_CHEVRON_BUTTON:
+				drawChevron(gc, bounds, state);
+				break;
+			default:
+				if (0 <= part && part < parent.getItemCount()) {
+					if (bounds.width == 0 || bounds.height == 0) return;
+					if ((state & SWT.SELECTED) != 0 ) {
+						drawSelected(part, gc, bounds, state);
+					} else {
+						drawUnselected(part, gc, bounds, state);
+					}
+				}
+				break;
+		}
+	}
+	
+	void drawBackground(GC gc, Rectangle bounds, int state) {
+		boolean selected = (state & SWT.SELECTED) != 0;
+		Color defaultBackground = selected ? parent.selectionBackground : parent.getBackground();
+		Image image = selected ? parent.selectionBgImage : null;
+		Color[] colors = selected ? parent.selectionGradientColors : parent.gradientColors;
+		int[] percents = selected ? parent.selectionGradientPercents : parent.gradientPercents;
+		boolean vertical = selected ? parent.selectionGradientVertical : parent.gradientVertical; 
+		
+		drawBackground(gc, null, bounds.x, bounds.y, bounds.width, bounds.height, defaultBackground, image, colors, percents, vertical);
+	}
+	
+	void drawBackground(GC gc, int[] shape, boolean selected) {
+		Color defaultBackground = selected ? parent.selectionBackground : parent.getBackground();
+		Image image = selected ? parent.selectionBgImage : null;
+		Color[] colors = selected ? parent.selectionGradientColors : parent.gradientColors;
+		int[] percents = selected ? parent.selectionGradientPercents : parent.gradientPercents;
+		boolean vertical = selected ? parent.selectionGradientVertical : parent.gradientVertical; 
+		Point size = parent.getSize();
+		int width = size.x;
+		int height = parent.tabHeight + ((parent.getStyle() & SWT.FLAT) != 0 ? 1 : 3);
+		int x = 0;
+
+		int borderLeft = parent.borderVisible ? 1 : 0;
+		int borderTop = parent.onBottom ? borderLeft : 0;
+		int borderBottom = parent.onBottom ? 0 : borderLeft;
+		
+		if (borderLeft > 0) {
+			x += 1; width -= 2;
+		}
+		int y = parent.onBottom ? size.y - borderBottom - height : borderTop;
+		drawBackground(gc, shape, x, y, width, height, defaultBackground, image, colors, percents, vertical);
+	}
+	
+	void drawBackground(GC gc, int[] shape, int x, int y, int width, int height, Color defaultBackground, Image image, Color[] colors, int[] percents, boolean vertical) {
+		Region clipping = null, region = null;
+		if (shape != null) { 
+			clipping = new Region();
+			gc.getClipping(clipping);
+			region = new Region();
+			region.add(shape);
+			region.intersect(clipping);
+			gc.setClipping(region);
+		}
+		if (image != null) {
+			// draw the background image in shape
+			gc.setBackground(defaultBackground);
+			gc.fillRectangle(x, y, width, height);
+			Rectangle imageRect = image.getBounds();
+			gc.drawImage(image, imageRect.x, imageRect.y, imageRect.width, imageRect.height, x, y, width, height);
+		} else if (colors != null) {
+			// draw gradient
+			if (colors.length == 1) {
+				Color background = colors[0] != null ? colors[0] : defaultBackground;
+				gc.setBackground(background);
+				gc.fillRectangle(x, y, width, height);
+			} else {
+				if (vertical) {
+					if (parent.onBottom) {
+						int pos = 0;
+						if (percents[percents.length - 1] < 100) {
+							pos = (100 - percents[percents.length - 1]) * height / 100;
+							gc.setBackground(defaultBackground);
+							gc.fillRectangle(x, y, width, pos);
+						}
+						Color lastColor = colors[colors.length-1];
+						if (lastColor == null) lastColor = defaultBackground;
+						for (int i = percents.length-1; i >= 0; i--) {
+							gc.setForeground(lastColor);
+							lastColor = colors[i];
+							if (lastColor == null) lastColor = defaultBackground;
+							gc.setBackground(lastColor);
+							int percentage = i > 0 ? percents[i] - percents[i-1] : percents[i];
+							int gradientHeight = percentage * height / 100;
+							gc.fillGradientRectangle(x, y+pos, width, gradientHeight, true);
+							pos += gradientHeight;
+						}
+					} else {
+						Color lastColor = colors[0];
+						if (lastColor == null) lastColor = defaultBackground;
+						int pos = 0;
+						for (int i = 0; i < percents.length; i++) {
+							gc.setForeground(lastColor);
+							lastColor = colors[i + 1];
+							if (lastColor == null) lastColor = defaultBackground;
+							gc.setBackground(lastColor);
+							int percentage = i > 0 ? percents[i] - percents[i-1] : percents[i];
+							int gradientHeight = percentage * height / 100;
+							gc.fillGradientRectangle(x, y+pos, width, gradientHeight, true);
+							pos += gradientHeight;
+						}
+						if (pos < height) {
+							gc.setBackground(defaultBackground);
+							gc.fillRectangle(x, pos, width, height-pos+1);
+						}
+					}
+				} else { //horizontal gradient
+					y = 0;
+					height = parent.getSize().y;
+					Color lastColor = colors[0];
+					if (lastColor == null) lastColor = defaultBackground;
+					int pos = 0;
+					for (int i = 0; i < percents.length; ++i) {
+						gc.setForeground(lastColor);
+						lastColor = colors[i + 1];
+						if (lastColor == null) lastColor = defaultBackground;
+						gc.setBackground(lastColor);
+						int gradientWidth = (percents[i] * width / 100) - pos;
+						gc.fillGradientRectangle(x+pos, y, gradientWidth, height, false);
+						pos += gradientWidth;
+					}
+					if (pos < width) {
+						gc.setBackground(defaultBackground);
+						gc.fillRectangle(x+pos, y, width-pos, height);
+					}
+				}
+			}
+		} else {
+			// draw a solid background using default background in shape
+			if ((parent.getStyle() & SWT.NO_BACKGROUND) != 0 || !defaultBackground.equals(parent.getBackground())) {
+				gc.setBackground(defaultBackground);
+				gc.fillRectangle(x, y, width, height);
+			}
+		}
+		if (shape != null) {
+			gc.setClipping(clipping);
+			clipping.dispose();
+			region.dispose();
+		}
+	}
+	
+	/*
+	 * Draw the border of the tab
+	 * 
+	 * @param gc
+	 * @param shape
+	 */
+	void drawBorder(GC gc, int[] shape) {
+	
+		gc.setForeground(parent.getDisplay().getSystemColor(BORDER1_COLOR));
+		gc.drawPolyline(shape);
+	}
+
+	void drawBody(GC gc, Rectangle bounds, int state) {
+		Point size = new Point(bounds.width, bounds.height);
+		int selectedIndex = parent.selectedIndex;
+		int tabHeight = parent.tabHeight;
+		
+		int borderLeft = parent.borderVisible ? 1 : 0;
+		int borderRight = borderLeft;
+		int borderTop = parent.onBottom ? borderLeft : 0;
+		int borderBottom = parent.onBottom ? 0 : borderLeft;
+		
+		int style = parent.getStyle();
+		int highlight_header = (style & SWT.FLAT) != 0 ? 1 : 3;
+		int highlight_margin = (style & SWT.FLAT) != 0 ? 0 : 2;
+		
+		// fill in body
+		if (!parent.minimized){
+			int width = size.x  - borderLeft - borderRight - 2*highlight_margin;
+			int height = size.y - borderTop - borderBottom - tabHeight - highlight_header - highlight_margin;
+			// Draw highlight margin
+			if (highlight_margin > 0) {
+				int[] shape = null;
+				if (parent.onBottom) {
+					int x1 = borderLeft;
+					int y1 = borderTop;
+					int x2 = size.x - borderRight;
+					int y2 = size.y - borderBottom - tabHeight - highlight_header;
+					shape = new int[] {x1,y1, x2,y1, x2,y2, x2-highlight_margin,y2,
+							           x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
+									   x1+highlight_margin,y2, x1,y2};
+				} else {	
+					int x1 = borderLeft;
+					int y1 = borderTop + tabHeight + highlight_header;
+					int x2 = size.x - borderRight;
+					int y2 = size.y - borderBottom;
+					shape = new int[] {x1,y1, x1+highlight_margin,y1, x1+highlight_margin,y2-highlight_margin, 
+							           x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
+									   x2,y1, x2,y2, x1,y2};
+				}
+				// If horizontal gradient, show gradient across the whole area
+				if (selectedIndex != -1 && parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1 && !parent.selectionGradientVertical) {
+					drawBackground(gc, shape, true);
+				} else if (selectedIndex == -1 && parent.gradientColors != null && parent.gradientColors.length > 1 && !parent.gradientVertical) {
+					drawBackground(gc, shape, false);
+				} else {
+					gc.setBackground(selectedIndex == -1 ? parent.getBackground() : parent.selectionBackground);
+					gc.fillPolygon(shape);
+				}
+			}
+			//Draw client area
+			if ((parent.getStyle() & SWT.NO_BACKGROUND) != 0) {
+				gc.setBackground(parent.getBackground());
+				int marginWidth = parent.marginWidth;
+				int marginHeight = parent.marginHeight;
+				int xClient = borderLeft + marginWidth + highlight_margin, yClient;
+				if (parent.onBottom) {
+					yClient = borderTop + highlight_margin + marginHeight;
+				} else {
+					yClient = borderTop + tabHeight + highlight_header + marginHeight; 
+				}
+				gc.fillRectangle(xClient - marginWidth, yClient - marginHeight, width, height);
+			}
+		} else {
+			if ((parent.getStyle() & SWT.NO_BACKGROUND) != 0) {
+				int height = borderTop + tabHeight + highlight_header + borderBottom;
+				if (size.y > height) {
+					gc.setBackground(parent.getParent().getBackground());
+					gc.fillRectangle(0, height, size.x, size.y - height);
+				}
+			}
+		}
+		
+		//draw 1 pixel border around outside
+		if (borderLeft > 0) {
+			gc.setForeground(parent.getDisplay().getSystemColor(BORDER1_COLOR));
+			int x1 = borderLeft - 1;
+			int x2 = size.x - borderRight;
+			int y1 = parent.onBottom ? borderTop - 1 : borderTop + tabHeight;
+			int y2 = parent.onBottom ? size.y - tabHeight - borderBottom - 1 : size.y - borderBottom;
+			gc.drawLine(x1, y1, x1, y2); // left
+			gc.drawLine(x2, y1, x2, y2); // right
+			if (parent.onBottom) {
+				gc.drawLine(x1, y1, x2, y1); // top
+			} else {
+				gc.drawLine(x1, y2, x2, y2); // bottom
+			}
+		}
+	}
+	
+	void drawClose(GC gc, Rectangle closeRect, int closeImageState) {
+		if (closeRect.width == 0 || closeRect.height == 0) return;
+		Display display = parent.getDisplay();
+	
+		// draw X 9x9
+		int x = closeRect.x + Math.max(1, (closeRect.width-9)/2);
+		int y = closeRect.y + Math.max(1, (closeRect.height-9)/2);
+		y += parent.onBottom ? -1 : 1;
+		
+		Color closeBorder = display.getSystemColor(BUTTON_BORDER);
+		switch (closeImageState & (SWT.HOT | SWT.SELECTED | SWT.BACKGROUND)) {
+			case SWT.NONE: {
+				int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y, 
+						                 x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
+				                         x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
+				                         x,y+7, x+2,y+5, x+2,y+4, x,y+2};
+				gc.setBackground(display.getSystemColor(BUTTON_FILL));
+				gc.fillPolygon(shape);
+				gc.setForeground(closeBorder);
+				gc.drawPolygon(shape);
+				break;
+			}
+			case SWT.HOT: {
+				int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y, 
+						                 x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
+				                         x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
+				                         x,y+7, x+2,y+5, x+2,y+4, x,y+2};
+				gc.setBackground(getFillColor());
+				gc.fillPolygon(shape);
+				gc.setForeground(closeBorder);
+				gc.drawPolygon(shape);
+				break;
+			}
+			case SWT.SELECTED: {
+				int[] shape = new int[] {x+1,y+1, x+3,y+1, x+5,y+3, x+6,y+3, x+8,y+1, x+10,y+1, 
+						                 x+10,y+3, x+8,y+5, x+8,y+6, x+10,y+8, x+10,y+10,
+				                         x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
+				                         x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
+				gc.setBackground(getFillColor());
+				gc.fillPolygon(shape);
+				gc.setForeground(closeBorder);
+				gc.drawPolygon(shape);
+				break;
+			}
+			case SWT.BACKGROUND: {
+				int[] shape = new int[] {x,y, x+10,y, x+10,y+10, x,y+10};
+				drawBackground(gc, shape, false);
+				break;
+			}
+		}
+	}
+
+	void drawChevron(GC gc, Rectangle chevronRect, int chevronImageState) {
+		if (chevronRect.width == 0 || chevronRect.height == 0) return;
+		int selectedIndex = parent.selectedIndex;
+		// draw chevron (10x7)
+		Display display = parent.getDisplay();
+		Point dpi = display.getDPI();
+		int fontHeight = 72 * 10 / dpi.y;
+		FontData fd = parent.getFont().getFontData()[0];
+		fd.setHeight(fontHeight);
+		Font f = new Font(display, fd);
+		int fHeight = f.getFontData()[0].getHeight() * dpi.y / 72;
+		int indent = Math.max(2, (chevronRect.height - fHeight - 4) /2);
+		int x = chevronRect.x + 2;
+		int y = chevronRect.y + indent;
+		int count;
+		int itemCount = parent.getItemCount();
+		if (parent.single) {
+			count = selectedIndex == -1 ? itemCount : itemCount - 1;
+		} else {
+			int showCount = 0;
+			while (showCount < parent.priority.length && parent.items[parent.priority[showCount]].showing) {
+				showCount++;
+			}
+			count = itemCount - showCount;
+		}
+		String chevronString = count > 99 ? "99+" : String.valueOf(count); //$NON-NLS-1$
+		switch (chevronImageState & (SWT.HOT | SWT.SELECTED)) {
+			case SWT.NONE: {
+				Color chevronBorder = parent.single ? parent.getSelectionForeground() : parent.getForeground();
+				gc.setForeground(chevronBorder);
+				gc.setFont(f);
+				gc.drawLine(x,y,     x+2,y+2);
+				gc.drawLine(x+2,y+2, x,y+4);
+				gc.drawLine(x+1,y,   x+3,y+2);
+				gc.drawLine(x+3,y+2, x+1,y+4);
+				gc.drawLine(x+4,y,   x+6,y+2);
+				gc.drawLine(x+6,y+2, x+5,y+4);
+				gc.drawLine(x+5,y,   x+7,y+2);
+				gc.drawLine(x+7,y+2, x+4,y+4);
+				gc.drawString(chevronString, x+7, y+3, true);
+				break;
+			}
+			case SWT.HOT: {
+				gc.setForeground(display.getSystemColor(BUTTON_BORDER));
+				gc.setBackground(display.getSystemColor(BUTTON_FILL));
+				gc.setFont(f);
+				gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);
+				gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);
+				gc.drawLine(x,y,     x+2,y+2);
+				gc.drawLine(x+2,y+2, x,y+4);
+				gc.drawLine(x+1,y,   x+3,y+2);
+				gc.drawLine(x+3,y+2, x+1,y+4);
+				gc.drawLine(x+4,y,   x+6,y+2);
+				gc.drawLine(x+6,y+2, x+5,y+4);
+				gc.drawLine(x+5,y,   x+7,y+2);
+				gc.drawLine(x+7,y+2, x+4,y+4);
+				gc.drawString(chevronString, x+7, y+3, true);
+				break;
+			}
+			case SWT.SELECTED: {
+				gc.setForeground(display.getSystemColor(BUTTON_BORDER));
+				gc.setBackground(display.getSystemColor(BUTTON_FILL));
+				gc.setFont(f);
+				gc.fillRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width, chevronRect.height, 6, 6);
+				gc.drawRoundRectangle(chevronRect.x, chevronRect.y, chevronRect.width - 1, chevronRect.height - 1, 6, 6);
+				gc.drawLine(x+1,y+1, x+3,y+3);
+				gc.drawLine(x+3,y+3, x+1,y+5);
+				gc.drawLine(x+2,y+1, x+4,y+3);
+				gc.drawLine(x+4,y+3, x+2,y+5);
+				gc.drawLine(x+5,y+1, x+7,y+3);
+				gc.drawLine(x+7,y+3, x+6,y+5);
+				gc.drawLine(x+6,y+1, x+8,y+3);
+				gc.drawLine(x+8,y+3, x+5,y+5);
+				gc.drawString(chevronString, x+8, y+4, true);
+				break;
+			}
+		}
+		f.dispose();
+	}
+
+	/*
+	 * Draw a highlight effect along the left, top, and right edges of the tab.
+	 * Only for curved tabs, on top.
+	 * Do not draw if insufficient colors.
+	 */
+	void drawHighlight(GC gc, Rectangle bounds, int state, int rightEdge) {
+		//only draw for curvy tabs and only draw for top tabs
+		if(parent.simple || parent.onBottom)
+			return;
+		
+		if(selectionHighlightGradientBegin == null)
+			return;
+
+		Color[] gradients = selectionHighlightGradientColorsCache;
+		if(gradients == null)
+			return;
+		int gradientsSize = gradients.length;
+		if(gradientsSize == 0)
+			return;		//shouldn't happen but just to be tidy
+
+		int x = bounds.x;
+		int y = bounds.y;
+		
+		gc.setForeground(gradients[0]);
+		
+		//draw top horizontal line
+		gc.drawLine(
+				TOP_LEFT_CORNER_HILITE[0] + x + 1, //rely on fact that first pair is top/right of curve
+				1 + y,
+				rightEdge - curveIndent,
+				1 + y);
+		
+		int[] leftHighlightCurve = TOP_LEFT_CORNER_HILITE;
+
+		int d = parent.tabHeight - topCurveHighlightEnd.length /2;
+
+		int lastX = 0;
+		int lastY = 0;
+		int lastColorIndex = 0;
+		
+		//draw upper left curve highlight
+		for (int i = 0; i < leftHighlightCurve.length /2; i++) {
+			int rawX = leftHighlightCurve[i * 2];
+			int rawY = leftHighlightCurve[i * 2 + 1];
+			lastX = rawX + x;
+			lastY = rawY + y;
+			lastColorIndex = rawY - 1;
+			gc.setForeground(gradients[lastColorIndex]);
+			gc.drawPoint(lastX, lastY);
+		}
+		//draw left vertical line highlight
+		for(int i = lastColorIndex; i < gradientsSize; i++) {
+			gc.setForeground(gradients[i]);
+			gc.drawPoint(lastX, 1 + lastY++);
+		}
+		
+		int rightEdgeOffset = rightEdge - curveIndent;
+		
+		//draw right swoop highlight up to diagonal portion
+		for (int i = 0; i < topCurveHighlightStart.length /2; i++) {
+			int rawX = topCurveHighlightStart[i * 2];
+			int rawY = topCurveHighlightStart[i * 2 + 1];
+			lastX = rawX + rightEdgeOffset;
+			lastY = rawY + y;
+			lastColorIndex = rawY - 1;
+			if(lastColorIndex >= gradientsSize)
+				break;	//can happen if tabs are unusually short and cut off the curve
+			gc.setForeground(gradients[lastColorIndex]);
+			gc.drawPoint(lastX, lastY);
+		}
+		//draw right diagonal line highlight
+		for(int i = lastColorIndex; i < lastColorIndex + d; i++) {
+			if(i >= gradientsSize)
+				break;	//can happen if tabs are unusually short and cut off the curve
+			gc.setForeground(gradients[i]);
+			gc.drawPoint(1 + lastX++, 1 + lastY++);
+		}
+
+		//draw right swoop highlight from diagonal portion to end
+		for (int i = 0; i < topCurveHighlightEnd.length /2; i++) {
+			int rawX = topCurveHighlightEnd[i * 2]; //d is already encoded in this value
+			int rawY = topCurveHighlightEnd[i * 2 + 1]; //d already encoded
+			lastX = rawX + rightEdgeOffset;
+			lastY = rawY + y;
+			lastColorIndex = rawY - 1;
+			if(lastColorIndex >= gradientsSize)
+				break;	//can happen if tabs are unusually short and cut off the curve
+			gc.setForeground(gradients[lastColorIndex]);
+			gc.drawPoint(lastX, lastY);
+		}	
+	}
+
+	/*
+	 * Draw the unselected border for the receiver on the left.
+	 * 
+	 * @param gc
+	 */
+	void drawLeftUnselectedBorder(GC gc, Rectangle bounds, int state) {
+		int x = bounds.x;
+		int y = bounds.y;
+		int height = bounds.height;
+		
+		int[] shape = null;
+		if (parent.onBottom) {
+			int[] left = parent.simple
+				? SIMPLE_UNSELECTED_INNER_CORNER
+				: BOTTOM_LEFT_CORNER;
+			
+			shape = new int[left.length + 2];
+			int index = 0;
+			shape[index++] = x;
+			shape[index++] = y - 1;
+			for (int i = 0; i < left.length / 2; i++) {
+				shape[index++] = x + left[2 * i];
+				shape[index++] = y + height + left[2 * i + 1] - 1;
+			}
+		} else {
+			int[] left = parent.simple
+				? SIMPLE_UNSELECTED_INNER_CORNER
+				: TOP_LEFT_CORNER;
+
+			shape = new int[left.length + 2];
+			int index = 0;
+			shape[index++] = x;
+			shape[index++] = y + height;
+			for (int i = 0; i < left.length / 2; i++) {
+				shape[index++] = x + left[2 * i];
+				shape[index++] = y + left[2 * i + 1];
+			}
+
+		}
+
+		drawBorder(gc, shape);
+	}
+
+	void drawMaximize(GC gc, Rectangle maxRect, int maxImageState) {
+		if (maxRect.width == 0 || maxRect.height == 0) return;
+		Display display = parent.getDisplay();
+		// 5x4 or 7x9
+		int x = maxRect.x + (maxRect.width - 10)/2;
+		int y = maxRect.y + 3;
+		
+		gc.setForeground(display.getSystemColor(BUTTON_BORDER));
+		gc.setBackground(display.getSystemColor(BUTTON_FILL));
+		
+		switch (maxImageState & (SWT.HOT | SWT.SELECTED)) {
+			case SWT.NONE: {
+				if (!parent.getMaximized()) {
+					gc.fillRectangle(x, y, 9, 9);
+					gc.drawRectangle(x, y, 9, 9);
+					gc.drawLine(x+1, y+2, x+8, y+2);				
+				} else {
+					gc.fillRectangle(x, y+3, 5, 4);
+					gc.fillRectangle(x+2, y, 5, 4);
+					gc.drawRectangle(x, y+3, 5, 4);
+					gc.drawRectangle(x+2, y, 5, 4);
+					gc.drawLine(x+3, y+1, x+6, y+1);
+					gc.drawLine(x+1, y+4, x+4, y+4);
+				}
+				break;
+			}
+			case SWT.HOT: {
+				gc.fillRoundRectangle(maxRect.x, maxRect.y, maxRect.width, maxRect.height, 6, 6);
+				gc.drawRoundRectangle(maxRect.x, maxRect.y, maxRect.width - 1, maxRect.height - 1, 6, 6);
+				if (!parent.getMaximized()) {
+					gc.fillRectangle(x, y, 9, 9);
+					gc.drawRectangle(x, y, 9, 9);
+					gc.drawLine(x+1, y+2, x+8, y+2);
+				} else {
+					gc.fillRectangle(x, y+3, 5, 4);
+					gc.fillRectangle(x+2, y, 5, 4);
+					gc.drawRectangle(x, y+3, 5, 4);
+					gc.drawRectangle(x+2, y, 5, 4);
+					gc.drawLine(x+3, y+1, x+6, y+1);
+					gc.drawLine(x+1, y+4, x+4, y+4);
+				}
+				break;
+			}
+			case SWT.SELECTED: {
+				gc.fillRoundRectangle(maxRect.x, maxRect.y, maxRect.width, maxRect.height, 6, 6);
+				gc.drawRoundRectangle(maxRect.x, maxRect.y, maxRect.width - 1, maxRect.height - 1, 6, 6);
+				if (!parent.getMaximized()) {
+					gc.fillRectangle(x+1, y+1, 9, 9);
+					gc.drawRectangle(x+1, y+1, 9, 9);
+					gc.drawLine(x+2, y+3, x+9, y+3);
+				} else {
+					gc.fillRectangle(x+1, y+4, 5, 4);
+					gc.fillRectangle(x+3, y+1, 5, 4);
+					gc.drawRectangle(x+1, y+4, 5, 4);
+					gc.drawRectangle(x+3, y+1, 5, 4);
+					gc.drawLine(x+4, y+2, x+7, y+2);
+					gc.drawLine(x+2, y+5, x+5, y+5);
+				}
+				break;
+			}
+		}
+	}
+	void drawMinimize(GC gc, Rectangle minRect, int minImageState) {
+		if (minRect.width == 0 || minRect.height == 0) return;
+		Display display = parent.getDisplay();
+		// 5x4 or 9x3
+		int x = minRect.x + (minRect.width - 10)/2;
+		int y = minRect.y + 3;
+		
+		gc.setForeground(display.getSystemColor(BUTTON_BORDER));
+		gc.setBackground(display.getSystemColor(BUTTON_FILL));
+		
+		switch (minImageState & (SWT.HOT | SWT.SELECTED)) {
+			case SWT.NONE: {
+				if (!parent.getMinimized()) {
+					gc.fillRectangle(x, y, 9, 3);
+					gc.drawRectangle(x, y, 9, 3);
+				} else {
+					gc.fillRectangle(x, y+3, 5, 4);
+					gc.fillRectangle(x+2, y, 5, 4);
+					gc.drawRectangle(x, y+3, 5, 4);
+					gc.drawRectangle(x+2, y, 5, 4);
+					gc.drawLine(x+3, y+1, x+6, y+1);
+					gc.drawLine(x+1, y+4, x+4, y+4);
+				}
+				break;
+			}
+			case SWT.HOT: {
+				gc.fillRoundRectangle(minRect.x, minRect.y, minRect.width, minRect.height, 6, 6);
+				gc.drawRoundRectangle(minRect.x, minRect.y, minRect.width - 1, minRect.height - 1, 6, 6);
+				if (!parent.getMinimized()) {
+					gc.fillRectangle(x, y, 9, 3);
+					gc.drawRectangle(x, y, 9, 3);
+				} else {
+					gc.fillRectangle(x, y+3, 5, 4);
+					gc.fillRectangle(x+2, y, 5, 4);
+					gc.drawRectangle(x, y+3, 5, 4);
+					gc.drawRectangle(x+2, y, 5, 4);
+					gc.drawLine(x+3, y+1, x+6, y+1);
+					gc.drawLine(x+1, y+4, x+4, y+4);
+				}
+				break;
+			}
+			case SWT.SELECTED: {
+				gc.fillRoundRectangle(minRect.x, minRect.y, minRect.width, minRect.height, 6, 6);
+				gc.drawRoundRectangle(minRect.x, minRect.y, minRect.width - 1, minRect.height - 1, 6, 6);
+				if (!parent.getMinimized()) {
+					gc.fillRectangle(x+1, y+1, 9, 3);
+					gc.drawRectangle(x+1, y+1, 9, 3);
+				} else {
+					gc.fillRectangle(x+1, y+4, 5, 4);
+					gc.fillRectangle(x+3, y+1, 5, 4);
+					gc.drawRectangle(x+1, y+4, 5, 4);
+					gc.drawRectangle(x+3, y+1, 5, 4);
+					gc.drawLine(x+4, y+2, x+7, y+2);
+					gc.drawLine(x+2, y+5, x+5, y+5);
+				}
+				break;
+			}
+		}
+	}
+
+	/*
+	 * Draw the unselected border for the receiver on the right.
+	 * 
+	 * @param gc
+	 */
+	void drawRightUnselectedBorder(GC gc, Rectangle bounds, int state) {
+		int x = bounds.x;
+		int y = bounds.y;
+		int width = bounds.width;
+		int height = bounds.height;
+		
+		int[] shape = null;
+		int startX = x + width - 1;
+	
+		if (parent.onBottom) {
+			int[] right = parent.simple
+				? SIMPLE_UNSELECTED_INNER_CORNER
+				: BOTTOM_RIGHT_CORNER;
+			
+			shape = new int[right.length + 2];
+			int index = 0;
+			
+			for (int i = 0; i < right.length / 2; i++) {
+				shape[index++] = startX + right[2 * i];
+				shape[index++] = y + height + right[2 * i + 1] - 1;
+			}
+			shape[index++] = startX;
+			shape[index++] = y - 1;
+		} else {
+			int[] right = parent.simple
+				? SIMPLE_UNSELECTED_INNER_CORNER
+				: TOP_RIGHT_CORNER;
+			
+			shape = new int[right.length + 2];
+			int index = 0;
+	
+			for (int i = 0; i < right.length / 2; i++) {
+				shape[index++] = startX + right[2 * i];
+				shape[index++] = y + right[2 * i + 1];
+			}
+	
+			shape[index++] = startX;
+			shape[index++] = y + height;
+	
+		}
+	
+		drawBorder(gc, shape);
+	
+	}
+
+	void drawSelected(int itemIndex, GC gc, Rectangle bounds, int state ) {
+		CTabItem item = parent.items[itemIndex];
+		int x = bounds.x;
+		int y = bounds.y;
+		int height = bounds.height;
+		int width = bounds.width;
+		if (!parent.simple && !parent.single) width -= (curveWidth - curveIndent);
+		int borderLeft = parent.borderVisible ? 1 : 0;
+		int borderRight = borderLeft;
+		int borderTop = parent.onBottom ? borderLeft : 0;
+		int borderBottom = parent.onBottom ? 0 : borderLeft;
+		
+		Point size = parent.getSize();
+	
+		int rightEdge = Math.min (x + width, parent.getRightItemEdge(gc));
+		//	 Draw selection border across all tabs
+		
+		if ((state & SWT.BACKGROUND) != 0) {
+			int highlight_header = (parent.getStyle() & SWT.FLAT) != 0 ? 1 : 3;
+			int xx = borderLeft;
+			int yy = parent.onBottom ? size.y - borderBottom - parent.tabHeight - highlight_header : borderTop + parent.tabHeight + 1;
+			int ww = size.x - borderLeft - borderRight;
+			int hh = highlight_header - 1;
+			int[] shape = new int[] {xx,yy, xx+ww,yy, xx+ww,yy+hh, xx,yy+hh};
+			if (parent.selectionGradientColors != null && !parent.selectionGradientVertical) {
+				drawBackground(gc, shape, true);
+			} else {
+				gc.setBackground(parent.selectionBackground);
+				gc.fillRectangle(xx, yy, ww, hh);
+			}
+			
+			if (parent.single) {
+				if (!item.showing) return;
+			} else {
+				// if selected tab scrolled out of view or partially out of view
+				// just draw bottom line
+				if (!item.showing){
+					int x1 = Math.max(0, borderLeft - 1);
+					int y1 = (parent.onBottom) ? y - 1 : y + height;
+					int x2 = size.x - borderRight;
+					gc.setForeground(parent.getDisplay().getSystemColor(BORDER1_COLOR));
+					gc.drawLine(x1, y1, x2, y1);
+					return;
+				}
+					
+				// draw selected tab background and outline
+				shape = null;
+				if (parent.onBottom) {
+					int[] left = parent.simple ? SIMPLE_BOTTOM_LEFT_CORNER : BOTTOM_LEFT_CORNER;
+					int[] right = parent.simple ? SIMPLE_BOTTOM_RIGHT_CORNER : curve;
+					if (borderLeft == 0 && itemIndex == parent.firstIndex) {
+						left = new int[]{x, y+height};
+					}
+					shape = new int[left.length+right.length+8];
+					int index = 0;
+					shape[index++] = x; // first point repeated here because below we reuse shape to draw outline
+					shape[index++] = y - 1;
+					shape[index++] = x;
+					shape[index++] = y - 1;
+					for (int i = 0; i < left.length/2; i++) {
+						shape[index++] = x + left[2*i];
+						shape[index++] = y + height + left[2*i+1] - 1;
+					}
+					for (int i = 0; i < right.length/2; i++) {
+						shape[index++] = parent.simple ? rightEdge - 1 + right[2*i] : rightEdge - curveIndent + right[2*i];
+						shape[index++] = parent.simple ? y + height + right[2*i+1] - 1 : y + right[2*i+1] - 2;
+					}
+					shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + curveWidth - curveIndent;
+					shape[index++] = y - 1;
+					shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + curveWidth - curveIndent;
+					shape[index++] = y - 1;
+				} else {
+					int[] left = parent.simple ? SIMPLE_TOP_LEFT_CORNER : TOP_LEFT_CORNER;
+					int[] right = parent.simple ? SIMPLE_TOP_RIGHT_CORNER : curve;
+					if (borderLeft == 0 && itemIndex == parent.firstIndex) {
+						left = new int[]{x, y};
+					}
+					shape = new int[left.length+right.length+8];
+					int index = 0;
+					shape[index++] = x; // first point repeated here because below we reuse shape to draw outline
+					shape[index++] = y + height + 1;
+					shape[index++] = x;
+					shape[index++] = y + height + 1;
+					for (int i = 0; i < left.length/2; i++) {
+						shape[index++] = x + left[2*i];
+						shape[index++] = y + left[2*i+1];
+					}
+					for (int i = 0; i < right.length/2; i++) {
+						shape[index++] = parent.simple ? rightEdge - 1 + right[2*i] : rightEdge - curveIndent + right[2*i];
+						shape[index++] = y + right[2*i+1];
+					}
+					shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + curveWidth - curveIndent;
+					shape[index++] = y + height + 1;
+					shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + curveWidth - curveIndent;
+					shape[index++] = y + height + 1;
+				}
+				
+				Rectangle clipping = gc.getClipping();
+				Rectangle clipBounds = item.getBounds();
+				clipBounds.height += 1;
+				if (parent.onBottom) clipBounds.y -= 1;
+				boolean tabInPaint = clipping.intersects(clipBounds);
+				
+				if (tabInPaint) {
+					// fill in tab background
+					if (parent.selectionGradientColors != null && !parent.selectionGradientVertical) {
+						drawBackground(gc, shape, true);
+					} else {
+						Color defaultBackground = parent.selectionBackground;
+						Image image = parent.selectionBgImage;
+						Color[] colors = parent.selectionGradientColors;
+						int[] percents = parent.selectionGradientPercents;
+						boolean vertical = parent.selectionGradientVertical;
+						xx = x;
+						yy = parent.onBottom ? y -1 : y + 1;
+						ww = width;
+						hh = height;
+						if (!parent.single && !parent.simple) ww += curveWidth - curveIndent;
+						drawBackground(gc, shape, xx, yy, ww, hh, defaultBackground, image, colors, percents, vertical);
+					}
+				}
+				
+				//Highlight MUST be drawn before the outline so that outline can cover it in the right spots (start of swoop)
+				//otherwise the curve looks jagged
+				drawHighlight(gc, bounds, state, rightEdge);
+	
+				// draw outline
+				shape[0] = Math.max(0, borderLeft - 1);
+				if (borderLeft == 0 && itemIndex == parent.firstIndex) {
+					shape[1] = parent.onBottom ? y + height - 1 : y; 
+					shape[5] = shape[3] = shape[1];
+				}
+				shape[shape.length - 2] = size.x - borderRight + 1;
+				for (int i = 0; i < shape.length/2; i++) {
+					if (shape[2*i + 1] == y + height + 1) shape[2*i + 1] -= 1;
+				}
+				Color borderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
+				if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
+				antialias(shape, selectedInnerColor, selectedOuterColor, gc);
+				gc.setForeground(borderColor);
+				gc.drawPolyline(shape);
+				
+				if (!tabInPaint) return;
+			}
+		}
+		
+		if ((state & SWT.FOREGROUND) != 0) {
+			// draw Image
+			Rectangle trim = computeTrim(itemIndex, SWT.NONE, 0, 0, 0, 0);
+			int xDraw = x - trim.x;
+			if (parent.single && (parent.showClose || item.showClose)) xDraw += item.closeRect.width; 
+			Image image = item.getImage();
+			if (image != null) {
+				Rectangle imageBounds = image.getBounds();
+				// only draw image if it won't overlap with close button
+				int maxImageWidth = rightEdge - xDraw - (trim.width + trim.x);
+				if (!parent.single && item.closeRect.width > 0) maxImageWidth -= item.closeRect.width + INTERNAL_SPACING;
+				if (imageBounds.width < maxImageWidth) {
+					int imageX = xDraw;
+					int imageY = y + (height - imageBounds.height) / 2;
+					imageY += parent.onBottom ? -1 : 1;
+					gc.drawImage(image, imageX, imageY);
+					xDraw += imageBounds.width + INTERNAL_SPACING;
+				}
+			}
+			
+			// draw Text
+			int textWidth = rightEdge - xDraw - (trim.width + trim.x);
+			if (!parent.single && item.closeRect.width > 0) textWidth -= item.closeRect.width + INTERNAL_SPACING;
+			if (textWidth > 0) {
+				Font gcFont = gc.getFont();
+				gc.setFont(item.font == null ? parent.getFont() : item.font);
+				
+				if (item.shortenedText == null || item.shortenedTextWidth != textWidth) {
+					item.shortenedText = shortenText(gc, item.getText(), textWidth);
+					item.shortenedTextWidth = textWidth;
+				}
+				Point extent = gc.textExtent(item.shortenedText, FLAGS);	
+				int textY = y + (height - extent.y) / 2;
+				textY += parent.onBottom ? -1 : 1;
+				
+				gc.setForeground(parent.selectionForeground);
+				gc.drawText(item.shortenedText, xDraw, textY, FLAGS);
+				gc.setFont(gcFont);
+				
+				// draw a Focus rectangle
+				if (parent.isFocusControl()) {
+					Display display = parent.getDisplay();
+					if (parent.simple || parent.single) {
+						gc.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
+						gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
+						gc.drawFocus(xDraw-1, textY-1, extent.x+2, extent.y+2);
+					} else {
+						gc.setForeground(display.getSystemColor(BUTTON_BORDER));
+						gc.drawLine(xDraw, textY+extent.y+1, xDraw+extent.x+1, textY+extent.y+1);
+					}
+				}
+			}
+			if (parent.showClose || item.showClose) drawClose(gc, item.closeRect, item.closeImageState);
+		}
+	}
+
+	void drawTabArea(GC gc, Rectangle bounds, int state) {
+		Point size = parent.getSize();
+		int[] shape = null;
+		Color borderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
+		int tabHeight = parent.tabHeight;
+		int style = parent.getStyle();
+		
+		int borderLeft = parent.borderVisible ? 1 : 0;
+		int borderRight = borderLeft;
+		int borderTop = parent.onBottom ? borderLeft : 0;
+		int borderBottom = parent.onBottom ? 0 : borderLeft;
+		
+		int selectedIndex = parent.selectedIndex;
+		int highlight_header = (style & SWT.FLAT) != 0 ? 1 : 3;
+		if (tabHeight == 0) {
+			if ((style & SWT.FLAT) != 0 && (style & SWT.BORDER) == 0) return;
+			int x1 = borderLeft - 1;
+			int x2 = size.x - borderRight;
+			int y1 = parent.onBottom ? size.y - borderBottom - highlight_header - 1 : borderTop + highlight_header;
+			int y2 = parent.onBottom ? size.y - borderBottom : borderTop;
+			if (borderLeft > 0 && parent.onBottom) y2 -= 1;
+			
+			shape = new int[] {x1, y1, x1,y2, x2,y2, x2,y1};
+	
+			// If horizontal gradient, show gradient across the whole area
+			if (selectedIndex != -1 && parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1 && !parent.selectionGradientVertical) {
+				drawBackground(gc, shape, true);
+			} else if (selectedIndex == -1 && parent.gradientColors != null && parent.gradientColors.length > 1 && !parent.gradientVertical) {
+				drawBackground(gc, shape, false);
+			} else {
+				gc.setBackground(selectedIndex == -1 ? parent.getBackground() : parent.selectionBackground);
+				gc.fillPolygon(shape);
+			}
+			
+			//draw 1 pixel border
+			if (borderLeft > 0) {
+				gc.setForeground(borderColor);
+				gc.drawPolyline(shape); 
+			}
+			return;
+		}
+		
+		int x = Math.max(0, borderLeft - 1);
+		int y = parent.onBottom ? size.y - borderBottom - tabHeight : borderTop;
+		int width = size.x - borderLeft - borderRight + 1;
+		int height = tabHeight - 1;
+		boolean simple = parent.simple;
+		// Draw Tab Header
+		if (parent.onBottom) {
+			int[] left, right;
+			if ((style & SWT.BORDER) != 0) {
+				left = simple ? SIMPLE_BOTTOM_LEFT_CORNER : BOTTOM_LEFT_CORNER;
+				right = simple ? SIMPLE_BOTTOM_RIGHT_CORNER : BOTTOM_RIGHT_CORNER;
+			} else {
+				left = simple ? SIMPLE_BOTTOM_LEFT_CORNER_BORDERLESS : BOTTOM_LEFT_CORNER_BORDERLESS;
+				right = simple ? SIMPLE_BOTTOM_RIGHT_CORNER_BORDERLESS : BOTTOM_RIGHT_CORNER_BORDERLESS;
+			}
+			shape = new int[left.length + right.length + 4];
+			int index = 0;
+			shape[index++] = x;
+			shape[index++] = y-highlight_header;
+			for (int i = 0; i < left.length/2; i++) {
+				shape[index++] = x+left[2*i];
+				shape[index++] = y+height+left[2*i+1];
+				if (borderLeft == 0) shape[index-1] += 1;
+			}
+			for (int i = 0; i < right.length/2; i++) {
+				shape[index++] = x+width+right[2*i];
+				shape[index++] = y+height+right[2*i+1];
+				if (borderLeft == 0) shape[index-1] += 1;
+			}
+			shape[index++] = x+width;
+			shape[index++] = y-highlight_header;
+		} else {
+			int[] left, right;
+			if ((style & SWT.BORDER) != 0) {
+				left = simple ? SIMPLE_TOP_LEFT_CORNER : TOP_LEFT_CORNER;
+				right = simple ? SIMPLE_TOP_RIGHT_CORNER : TOP_RIGHT_CORNER;
+			} else {
+				left = simple ? SIMPLE_TOP_LEFT_CORNER_BORDERLESS : TOP_LEFT_CORNER_BORDERLESS;
+				right = simple ? SIMPLE_TOP_RIGHT_CORNER_BORDERLESS : TOP_RIGHT_CORNER_BORDERLESS;
+			}
+			shape = new int[left.length + right.length + 4];
+			int index = 0;
+			shape[index++] = x;
+			shape[index++] = y+height+highlight_header + 1;
+			for (int i = 0; i < left.length/2; i++) {
+				shape[index++] = x+left[2*i];
+				shape[index++] = y+left[2*i+1];
+			}
+			for (int i = 0; i < right.length/2; i++) {
+				shape[index++] = x+width+right[2*i];
+				shape[index++] = y+right[2*i+1];
+			}
+			shape[index++] = x+width;
+			shape[index++] = y+height+highlight_header + 1;
+		}
+		// Fill in background
+		boolean single = parent.single;
+		boolean bkSelected = single && selectedIndex != -1;
+		drawBackground(gc, shape, bkSelected);
+		// Fill in parent background for non-rectangular shape
+		Region r = new Region();
+		r.add(new Rectangle(x, y, width + 1, height + 1));
+		r.subtract(shape);
+		gc.setBackground(parent.getParent().getBackground());
+		fillRegion(gc, r);
+		r.dispose();
+		
+		// Draw selected tab
+		if (selectedIndex == -1) {
+			// if no selected tab - draw line across bottom of all tabs
+			int x1 = borderLeft;
+			int y1 = (parent.onBottom) ? size.y - borderBottom - tabHeight - 1 : borderTop + tabHeight;
+			int x2 = size.x - borderRight;
+			gc.setForeground(borderColor);
+			gc.drawLine(x1, y1, x2, y1);
+		}
+	
+		// Draw border line
+		if (borderLeft > 0) {
+	    	if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
+	    	antialias(shape, null, tabAreaColor, gc);
+			gc.setForeground(borderColor);
+			gc.drawPolyline(shape);
+		}		
+	}
+
+	void drawUnselected(int index, GC gc, Rectangle bounds, int state) {
+		CTabItem item = parent.items[index];
+		int x = bounds.x;
+		int y = bounds.y;
+		int height = bounds.height;
+		int width = bounds.width;
+		
+		// Do not draw partial items
+		if (!item.showing) return;
+		
+		Rectangle clipping = gc.getClipping();
+		if (!clipping.intersects(bounds)) return;
+		
+		if ((state & SWT.BACKGROUND) != 0) {
+			if (index > 0 && index < parent.selectedIndex)
+				drawLeftUnselectedBorder(gc, bounds, state);
+			// If it is the last one then draw a line
+			if (index > parent.selectedIndex)
+				drawRightUnselectedBorder(gc, bounds, state);
+		}
+		
+		if ((state & SWT.FOREGROUND) != 0) {
+			// draw Image
+			Rectangle trim = computeTrim(index, SWT.NONE, 0, 0, 0, 0);
+			int xDraw = x - trim.x;
+			Image image = item.getImage();
+			if (image != null && parent.showUnselectedImage) {
+				Rectangle imageBounds = image.getBounds();
+				// only draw image if it won't overlap with close button
+				int maxImageWidth = x + width - xDraw - (trim.width + trim.x);
+				if (parent.showUnselectedClose && (parent.showClose || item.showClose)) {
+					maxImageWidth -= item.closeRect.width + INTERNAL_SPACING;
+				}
+				if (imageBounds.width < maxImageWidth) {		
+					int imageX = xDraw;
+					int imageHeight = imageBounds.height;
+					int imageY = y + (height - imageHeight) / 2;
+					imageY += parent.onBottom ? -1 : 1;
+					int imageWidth = imageBounds.width * imageHeight / imageBounds.height;
+					gc.drawImage(image, 
+						         imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
+						         imageX, imageY, imageWidth, imageHeight);
+					xDraw += imageWidth + INTERNAL_SPACING;
+				}
+			}
+			// draw Text
+			int textWidth = x + width - xDraw - (trim.width + trim.x);
+			if (parent.showUnselectedClose && (parent.showClose || item.showClose)) {
+				textWidth -= item.closeRect.width + INTERNAL_SPACING;
+			}
+			if (textWidth > 0) {
+				Font gcFont = gc.getFont();
+				gc.setFont(item.font == null ? parent.getFont() : item.font);
+				if (item.shortenedText == null || item.shortenedTextWidth != textWidth) {
+					item.shortenedText = shortenText(gc, item.getText(), textWidth);
+					item.shortenedTextWidth = textWidth;
+				}	
+				Point extent = gc.textExtent(item.shortenedText, FLAGS);
+				int textY = y + (height - extent.y) / 2;
+				textY += parent.onBottom ? -1 : 1;
+				gc.setForeground(parent.getForeground());
+				gc.drawText(item.shortenedText, xDraw, textY, FLAGS);
+				gc.setFont(gcFont);
+			}
+			// draw close
+			if (parent.showUnselectedClose && (parent.showClose || item.showClose)) drawClose(gc, item.closeRect, item.closeImageState);
+		}
+	}
+
+	void fillRegion(GC gc, Region region) {
+		// NOTE: region passed in to this function will be modified
+		Region clipping = new Region();
+		gc.getClipping(clipping);
+		region.intersect(clipping);
+		gc.setClipping(region);
+		gc.fillRectangle(region.getBounds());
+		gc.setClipping(clipping);
+		clipping.dispose();
+	}
+		
+	Color getFillColor() {
+		if (fillColor == null) {
+			fillColor = new Color(parent.getDisplay(), CLOSE_FILL);
+		}
+		return fillColor;
+	}
+		
+	/*
+	 * Return true if given start color, the cache of highlight colors we have
+	 * would match the highlight colors we'd compute.
+	 */
+	boolean isSelectionHighlightColorsCacheHit(Color start) {
+
+		if(selectionHighlightGradientColorsCache == null)
+			return false;
+		
+		//this case should never happen but check to be safe before accessing array indexes
+		if(selectionHighlightGradientColorsCache.length < 2)
+			return false;
+
+		Color highlightBegin = selectionHighlightGradientColorsCache[0];
+		Color highlightEnd = selectionHighlightGradientColorsCache[selectionHighlightGradientColorsCache.length - 1];
+
+		if(! highlightBegin.equals(start))
+			return false;	
+		
+		//Compare number of colours we have vs. we'd compute
+		if(selectionHighlightGradientColorsCache.length != parent.tabHeight)
+			return false;
+		
+		//Compare existing highlight end to what it would be (selectionBackground)
+		if(! highlightEnd.equals(parent.selectionBackground))
+			return false;
+		
+		return true;
+	}
+
+	void setSelectionHighlightGradientColor(Color start) {
+		//
+		//Set to null to match all the early return cases.
+		//For early returns, don't realloc the cache, we may get a cache hit next time we're given the highlight
+		selectionHighlightGradientBegin = null;
+	
+		if(start == null)
+			return;
+	
+		//don't bother on low colour
+		if (parent.getDisplay().getDepth() < 15)
+			return;
+		
+		//don't bother if we don't have a background gradient
+		if(parent.selectionGradientColors.length < 2) 
+			return;
+	
+		//OK we know its a valid gradient now
+		selectionHighlightGradientBegin = start;
+	
+		if(! isSelectionHighlightColorsCacheHit(start))
+			createSelectionHighlightGradientColors(start);  //if no cache hit then compute new ones
+	}
+	
+	String shortenText(GC gc, String text, int width) {
+		return useEllipses()
+			? shortenText(gc, text, width, ELLIPSIS)
+			: shortenText(gc, text, width, ""); //$NON-NLS-1$
+	}
+
+	String shortenText(GC gc, String text, int width, String ellipses) {
+		if (gc.textExtent(text, FLAGS).x <= width) return text;
+		int ellipseWidth = gc.textExtent(ellipses, FLAGS).x;
+		int length = text.length();
+		TextLayout layout = new TextLayout(parent.getDisplay());
+		layout.setText(text);
+		int end = layout.getPreviousOffset(length, SWT.MOVEMENT_CLUSTER);
+		while (end > 0) {
+			text = text.substring(0, end);
+			int l = gc.textExtent(text, FLAGS).x;
+			if (l + ellipseWidth <= width) {
+				break;
+			}
+			end = layout.getPreviousOffset(end, SWT.MOVEMENT_CLUSTER);
+		}
+		layout.dispose();
+		return end == 0 ? text.substring(0, 1) : text + ellipses;
+	}
+	
+	void updateCurves () {
+		int tabHeight = parent.tabHeight;
+		if (tabHeight == lastTabHeight) return;
+		if (parent.onBottom) {
+			int d = tabHeight - 12;
+			curve = new int[]{0,13+d, 0,12+d, 2,12+d, 3,11+d, 5,11+d, 6,10+d, 7,10+d, 9,8+d, 10,8+d,
+					          11,7+d, 11+d,7,
+							  12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1}; 
+			curveWidth = 26+d;
+			curveIndent = curveWidth/3;	
+		} else {
+			int d = tabHeight - 12;
+			curve = new int[]{0,0, 0,1, 2,1, 3,2, 5,2, 6,3, 7,3, 9,5, 10,5,
+					          11,6, 11+d,6+d,
+					          12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
+			curveWidth = 26+d;
+			curveIndent = curveWidth/3;
+			
+			//this could be static but since values depend on curve, better to keep in one place
+			topCurveHighlightStart = new int[] { 
+					0, 2,  1, 2,  2, 2,    
+					3, 3,  4, 3,  5, 3, 
+					6, 4,  7, 4,
+					8, 5, 
+					9, 6, 10, 6};
+			
+			//also, by adding in 'd' here we save some math cost when drawing the curve
+			topCurveHighlightEnd = new int[] { 
+					10+d, 6+d,
+					11+d, 7+d,
+					12+d, 8+d,  13+d, 8+d,
+					14+d, 9+d,
+					15+d, 10+d,  16+d, 10+d,
+					17+d, 11+d,  18+d, 11+d,  19+d, 11+d,
+					20+d, 12+d,  21+d, 12+d,  22+d,  12+d }; 
+		}
+	}
+
+	/*
+	 * Return whether to use ellipses or just truncate labels
+	 */
+	boolean useEllipses() {
+		return parent.simple;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index ffe19d2..1d1185d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,19 +47,11 @@ public class CTabItem extends Item {
 	Image disabledImage; 
 	
 	Rectangle closeRect = new Rectangle(0, 0, 0, 0);
-	int closeImageState = CTabFolder.NONE;
+	int closeImageState = SWT.BACKGROUND;
+	int state = SWT.NONE;
 	boolean showClose = false;
 	boolean showing = false;
 
-	// internal constants
-	static final int TOP_MARGIN = 2;
-	static final int BOTTOM_MARGIN = 2;
-	static final int LEFT_MARGIN = 4;
-	static final int RIGHT_MARGIN = 4;
-	static final int INTERNAL_SPACING = 4;
-	static final int FLAGS = SWT.DRAW_TRANSPARENT | SWT.DRAW_MNEMONIC;
-	static final String ELLIPSIS = "..."; //$NON-NLS-1$ // could use the ellipsis glyph on some platforms "\u2026"
-	
 /**
  * Constructs a new instance of this class given its parent
  * (which must be a <code>CTabFolder</code>) and a style value
@@ -127,37 +119,6 @@ public CTabItem (CTabFolder parent, int style, int index) {
 	parent.createItem (this, index);
 }
 
-/*
- * Return whether to use ellipses or just truncate labels
- */
-boolean useEllipses() {
-	return parent.simple;
-}
-
-String shortenText(GC gc, String text, int width) {
-	return useEllipses()
-		? shortenText(gc, text, width, ELLIPSIS)
-		: shortenText(gc, text, width, ""); //$NON-NLS-1$
-}
-
-String shortenText(GC gc, String text, int width, String ellipses) {
-	if (gc.textExtent(text, FLAGS).x <= width) return text;
-	int ellipseWidth = gc.textExtent(ellipses, FLAGS).x;
-	int length = text.length();
-	TextLayout layout = new TextLayout(getDisplay());
-	layout.setText(text);
-	int end = layout.getPreviousOffset(length, SWT.MOVEMENT_CLUSTER);
-	while (end > 0) {
-		text = text.substring(0, end);
-		int l = gc.textExtent(text, FLAGS).x;
-		if (l + ellipseWidth <= width) {
-			break;
-		}
-		end = layout.getPreviousOffset(end, SWT.MOVEMENT_CLUSTER);
-	}
-	layout.dispose();
-	return end == 0 ? text.substring(0, 1) : text + ellipses;
-}
 
 public void dispose() {
 	if (isDisposed ()) return;
@@ -170,506 +131,7 @@ public void dispose() {
 	shortenedText = null;
 	font = null;
 }
-void drawClose(GC gc) {
-	if (closeRect.width == 0 || closeRect.height == 0) return;
-	Display display = getDisplay();
-
-	// draw X 9x9
-	int indent = Math.max(1, (CTabFolder.BUTTON_SIZE-9)/2);
-	int x = closeRect.x + indent;
-	int y = closeRect.y + indent;
-	y += parent.onBottom ? -1 : 1;
-	
-	Color closeBorder = display.getSystemColor(CTabFolder.BUTTON_BORDER);
-	switch (closeImageState) {
-		case CTabFolder.NORMAL: {
-			int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y, 
-					                 x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
-			                         x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
-			                         x,y+7, x+2,y+5, x+2,y+4, x,y+2};
-			gc.setBackground(display.getSystemColor(CTabFolder.BUTTON_FILL));
-			gc.fillPolygon(shape);
-			gc.setForeground(closeBorder);
-			gc.drawPolygon(shape);
-			break;
-		}
-		case CTabFolder.HOT: {
-			int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y, 
-					                 x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
-			                         x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
-			                         x,y+7, x+2,y+5, x+2,y+4, x,y+2};
-			gc.setBackground(parent.getFillColor());
-			gc.fillPolygon(shape);
-			gc.setForeground(closeBorder);
-			gc.drawPolygon(shape);
-			break;
-		}
-		case CTabFolder.SELECTED: {
-			int[] shape = new int[] {x+1,y+1, x+3,y+1, x+5,y+3, x+6,y+3, x+8,y+1, x+10,y+1, 
-					                 x+10,y+3, x+8,y+5, x+8,y+6, x+10,y+8, x+10,y+10,
-			                         x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
-			                         x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
-			gc.setBackground(parent.getFillColor());
-			gc.fillPolygon(shape);
-			gc.setForeground(closeBorder);
-			gc.drawPolygon(shape);
-			break;
-		}
-		case CTabFolder.NONE: {
-			int[] shape = new int[] {x,y, x+10,y, x+10,y+10, x,y+10};
-			if (parent.gradientColors != null && !parent.gradientVertical) {
-				parent.drawBackground(gc, shape, false);
-			} else {
-				Color defaultBackground = parent.getBackground();
-				Color[] colors = parent.gradientColors;
-				int[] percents = parent.gradientPercents;
-				boolean vertical = parent.gradientVertical; 
-				parent.drawBackground(gc, shape, x, y, 10, 10, defaultBackground, null, colors, percents, vertical);
-			}
-			break;
-		}
-	}
-}
-void drawSelected(GC gc ) {
-	Point size = parent.getSize();
-	int rightEdge = Math.min (x + width, parent.getRightItemEdge());
-	
-	//	 Draw selection border across all tabs
-	int xx = parent.borderLeft;
-	int yy = parent.onBottom ? size.y - parent.borderBottom - parent.tabHeight - parent.highlight_header : parent.borderTop + parent.tabHeight + 1;
-	int ww = size.x - parent.borderLeft - parent.borderRight;
-	int hh = parent.highlight_header - 1;
-	int[] shape = new int[] {xx,yy, xx+ww,yy, xx+ww,yy+hh, xx,yy+hh};
-	if (parent.selectionGradientColors != null && !parent.selectionGradientVertical) {
-		parent.drawBackground(gc, shape, true);
-	} else {
-		gc.setBackground(parent.selectionBackground);
-		gc.fillRectangle(xx, yy, ww, hh);
-	}
-	
-	if (parent.single) {
-		if (!showing) return;
-	} else {
-		// if selected tab scrolled out of view or partially out of view
-		// just draw bottom line
-		if (!showing){
-			int x1 = Math.max(0, parent.borderLeft - 1);
-			int y1 = (parent.onBottom) ? y - 1 : y + height;
-			int x2 = size.x - parent.borderRight;
-			gc.setForeground(getDisplay().getSystemColor(CTabFolder.BORDER1_COLOR));
-			gc.drawLine(x1, y1, x2, y1);
-			return;
-		}
-			
-		// draw selected tab background and outline
-		shape = null;
-		if (this.parent.onBottom) {
-			int[] left = parent.simple ? CTabFolder.SIMPLE_BOTTOM_LEFT_CORNER : CTabFolder.BOTTOM_LEFT_CORNER;
-			int[] right = parent.simple ? CTabFolder.SIMPLE_BOTTOM_RIGHT_CORNER : parent.curve;
-			if (parent.borderLeft == 0 && parent.indexOf(this) == parent.firstIndex) {
-				left = new int[]{x, y+height};
-			}
-			shape = new int[left.length+right.length+8];
-			int index = 0;
-			shape[index++] = x; // first point repeated here because below we reuse shape to draw outline
-			shape[index++] = y - 1;
-			shape[index++] = x;
-			shape[index++] = y - 1;
-			for (int i = 0; i < left.length/2; i++) {
-				shape[index++] = x + left[2*i];
-				shape[index++] = y + height + left[2*i+1] - 1;
-			}
-			for (int i = 0; i < right.length/2; i++) {
-				shape[index++] = parent.simple ? rightEdge - 1 + right[2*i] : rightEdge - parent.curveIndent + right[2*i];
-				shape[index++] = parent.simple ? y + height + right[2*i+1] - 1 : y + right[2*i+1] - 2;
-			}
-			shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + parent.curveWidth - parent.curveIndent;
-			shape[index++] = y - 1;
-			shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + parent.curveWidth - parent.curveIndent;
-			shape[index++] = y - 1;
-		} else {
-			int[] left = parent.simple ? CTabFolder.SIMPLE_TOP_LEFT_CORNER : CTabFolder.TOP_LEFT_CORNER;
-			int[] right = parent.simple ? CTabFolder.SIMPLE_TOP_RIGHT_CORNER : parent.curve;
-			if (parent.borderLeft == 0 && parent.indexOf(this) == parent.firstIndex) {
-				left = new int[]{x, y};
-			}
-			shape = new int[left.length+right.length+8];
-			int index = 0;
-			shape[index++] = x; // first point repeated here because below we reuse shape to draw outline
-			shape[index++] = y + height + 1;
-			shape[index++] = x;
-			shape[index++] = y + height + 1;
-			for (int i = 0; i < left.length/2; i++) {
-				shape[index++] = x + left[2*i];
-				shape[index++] = y + left[2*i+1];
-			}
-			for (int i = 0; i < right.length/2; i++) {
-				shape[index++] = parent.simple ? rightEdge - 1 + right[2*i] : rightEdge - parent.curveIndent + right[2*i];
-				shape[index++] = y + right[2*i+1];
-			}
-			shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + parent.curveWidth - parent.curveIndent;
-			shape[index++] = y + height + 1;
-			shape[index++] = parent.simple ? rightEdge - 1 : rightEdge + parent.curveWidth - parent.curveIndent;
-			shape[index++] = y + height + 1;
-		}
-		
-		Rectangle clipping = gc.getClipping();
-		Rectangle bounds = getBounds();
-		bounds.height += 1;
-		if (parent.onBottom) bounds.y -= 1;
-		boolean tabInPaint = clipping.intersects(bounds);
-		
-		if (tabInPaint) {
-			// fill in tab background
-			if (parent.selectionGradientColors != null && !parent.selectionGradientVertical) {
-				parent.drawBackground(gc, shape, true);
-			} else {
-				Color defaultBackground = parent.selectionBackground;
-				Image image = parent.selectionBgImage;
-				Color[] colors = parent.selectionGradientColors;
-				int[] percents = parent.selectionGradientPercents;
-				boolean vertical = parent.selectionGradientVertical;
-				xx = x;
-				yy = parent.onBottom ? y -1 : y + 1;
-				ww = width;
-				hh = height;
-				if (!parent.single && !parent.simple) ww += parent.curveWidth - parent.curveIndent;
-				parent.drawBackground(gc, shape, xx, yy, ww, hh, defaultBackground, image, colors, percents, vertical);
-			}
-		}
-		
-		//Highlight MUST be drawn before the outline so that outline can cover it in the right spots (start of swoop)
-		//otherwise the curve looks jagged
-		drawHighlight(gc, rightEdge);
-
-		// draw outline
-		shape[0] = Math.max(0, parent.borderLeft - 1);
-		if (parent.borderLeft == 0 && parent.indexOf(this) == parent.firstIndex) {
-			shape[1] = parent.onBottom ? y + height - 1 : y; 
-			shape[5] = shape[3] = shape[1];
-		}
-		shape[shape.length - 2] = size.x - parent.borderRight + 1;
-		for (int i = 0; i < shape.length/2; i++) {
-			if (shape[2*i + 1] == y + height + 1) shape[2*i + 1] -= 1;
-		}
-		RGB inside = parent.selectionBackground.getRGB();
-		if (parent.selectionBgImage != null || 
-		    (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
-		    inside = null;
-		}
-		RGB outside = parent.getBackground().getRGB();		
-		if (parent.gradientColors != null && parent.gradientColors.length > 1) {
-		    outside = null;
-		}
-		Color borderColor = getDisplay().getSystemColor(CTabFolder.BORDER1_COLOR);
-		parent.antialias(shape, borderColor.getRGB(), inside, outside, gc);
-		gc.setForeground(borderColor);
-		gc.drawPolyline(shape);
-		
-		if (!tabInPaint) return;
-	}
-	
-	// draw Image
-	int xDraw = x + LEFT_MARGIN;
-	if (parent.single && (parent.showClose || showClose)) xDraw += CTabFolder.BUTTON_SIZE; 
-	Image image = getImage();
-	if (image != null) {
-		Rectangle imageBounds = image.getBounds();
-		// only draw image if it won't overlap with close button
-		int maxImageWidth = rightEdge - xDraw - RIGHT_MARGIN;
-		if (!parent.single && closeRect.width > 0) maxImageWidth -= closeRect.width + INTERNAL_SPACING;
-		if (imageBounds.width < maxImageWidth) {
-			int imageX = xDraw;
-			int imageY = y + (height - imageBounds.height) / 2;
-			imageY += parent.onBottom ? -1 : 1;
-			gc.drawImage(image, imageX, imageY);
-			xDraw += imageBounds.width + INTERNAL_SPACING;
-		}
-	}
-	
-	// draw Text
-	int textWidth = rightEdge - xDraw - RIGHT_MARGIN;
-	if (!parent.single && closeRect.width > 0) textWidth -= closeRect.width + INTERNAL_SPACING;
-	if (textWidth > 0) {
-		Font gcFont = gc.getFont();
-		gc.setFont(font == null ? parent.getFont() : font);
-		
-		if (shortenedText == null || shortenedTextWidth != textWidth) {
-			shortenedText = shortenText(gc, getText(), textWidth);
-			shortenedTextWidth = textWidth;
-		}
-		Point extent = gc.textExtent(shortenedText, FLAGS);	
-		int textY = y + (height - extent.y) / 2;
-		textY += parent.onBottom ? -1 : 1;
-		
-		gc.setForeground(parent.selectionForeground);
-		gc.drawText(shortenedText, xDraw, textY, FLAGS);
-		gc.setFont(gcFont);
-		
-		// draw a Focus rectangle
-		if (parent.isFocusControl()) {
-			Display display = getDisplay();
-			if (parent.simple || parent.single) {
-				gc.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
-				gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
-				gc.drawFocus(xDraw-1, textY-1, extent.x+2, extent.y+2);
-			} else {
-				gc.setForeground(display.getSystemColor(CTabFolder.BUTTON_BORDER));
-				gc.drawLine(xDraw, textY+extent.y+1, xDraw+extent.x+1, textY+extent.y+1);
-			}
-		}
-	}
-	if (parent.showClose || showClose) drawClose(gc);
-}
 
-/*
- * Draw a highlight effect along the left, top, and right edges of the tab.
- * Only for curved tabs, on top.
- * Do not draw if insufficient colors.
- */
-void drawHighlight(GC gc, int rightEdge) {
-	//only draw for curvy tabs and only draw for top tabs
-	if(parent.simple || this.parent.onBottom)
-		return;
-	
-	if(parent.selectionHighlightGradientBegin == null)
-		return;
-	
-	Color[] gradients = parent.selectionHighlightGradientColorsCache;
-	if(gradients == null)
-		return;
-	int gradientsSize = gradients.length;
-	if(gradientsSize == 0)
-		return;		//shouldn't happen but just to be tidy
-
-	gc.setForeground(gradients[0]);
-	
-	//draw top horizontal line
-	gc.drawLine(
-			CTabFolder.TOP_LEFT_CORNER_HILITE[0] + x + 1, //rely on fact that first pair is top/right of curve
-			1 + y,
-			rightEdge - parent.curveIndent,
-			1 + y);
-	
-	int[] leftHighlightCurve = CTabFolder.TOP_LEFT_CORNER_HILITE;
-
-	int d = parent.tabHeight - parent.topCurveHighlightEnd.length /2;
-
-	int lastX = 0;
-	int lastY = 0;
-	int lastColorIndex = 0;
-	
-	//draw upper left curve highlight
-	for (int i = 0; i < leftHighlightCurve.length /2; i++) {
-		int rawX = leftHighlightCurve[i * 2];
-		int rawY = leftHighlightCurve[i * 2 + 1];
-		lastX = rawX + x;
-		lastY = rawY + y;
-		lastColorIndex = rawY - 1;
-		gc.setForeground(gradients[lastColorIndex]);
-		gc.drawPoint(lastX, lastY);
-	}
-	//draw left vertical line highlight
-	for(int i = lastColorIndex; i < gradientsSize; i++) {
-		gc.setForeground(gradients[i]);
-		gc.drawPoint(lastX, 1 + lastY++);
-	}
-	
-	int rightEdgeOffset = rightEdge - parent.curveIndent;
-	
-	//draw right swoop highlight up to diagonal portion
-	for (int i = 0; i < parent.topCurveHighlightStart.length /2; i++) {
-		int rawX = parent.topCurveHighlightStart[i * 2];
-		int rawY = parent.topCurveHighlightStart[i * 2 + 1];
-		lastX = rawX + rightEdgeOffset;
-		lastY = rawY + y;
-		lastColorIndex = rawY - 1;
-		if(lastColorIndex >= gradientsSize)
-			break;	//can happen if tabs are unusually short and cut off the curve
-		gc.setForeground(gradients[lastColorIndex]);
-		gc.drawPoint(lastX, lastY);
-	}
-	//draw right diagonal line highlight
-	for(int i = lastColorIndex; i < lastColorIndex + d; i++) {
-		if(i >= gradientsSize)
-			break;	//can happen if tabs are unusually short and cut off the curve
-		gc.setForeground(gradients[i]);
-		gc.drawPoint(1 + lastX++, 1 + lastY++);
-	}
-
-	//draw right swoop highlight from diagonal portion to end
-	for (int i = 0; i < parent.topCurveHighlightEnd.length /2; i++) {
-		int rawX = parent.topCurveHighlightEnd[i * 2]; //d is already encoded in this value
-		int rawY = parent.topCurveHighlightEnd[i * 2 + 1]; //d already encoded
-		lastX = rawX + rightEdgeOffset;
-		lastY = rawY + y;
-		lastColorIndex = rawY - 1;
-		if(lastColorIndex >= gradientsSize)
-			break;	//can happen if tabs are unusually short and cut off the curve
-		gc.setForeground(gradients[lastColorIndex]);
-		gc.drawPoint(lastX, lastY);
-	}	
-}
-
-/*
- * Draw the unselected border for the receiver on the right.
- * 
- * @param gc
- */
-void drawRightUnselectedBorder(GC gc) {
-
-	int[] shape = null;
-	int startX = x + width - 1;
-
-	if (this.parent.onBottom) {
-		int[] right = parent.simple
-			? CTabFolder.SIMPLE_UNSELECTED_INNER_CORNER
-			: CTabFolder.BOTTOM_RIGHT_CORNER;
-		
-		shape = new int[right.length + 2];
-		int index = 0;
-		
-		for (int i = 0; i < right.length / 2; i++) {
-			shape[index++] = startX + right[2 * i];
-			shape[index++] = y + height + right[2 * i + 1] - 1;
-		}
-		shape[index++] = startX;
-		shape[index++] = y - 1;
-	} else {
-		int[] right = parent.simple
-			? CTabFolder.SIMPLE_UNSELECTED_INNER_CORNER
-			: CTabFolder.TOP_RIGHT_CORNER;
-		
-		shape = new int[right.length + 2];
-		int index = 0;
-
-		for (int i = 0; i < right.length / 2; i++) {
-			shape[index++] = startX + right[2 * i];
-			shape[index++] = y + right[2 * i + 1];
-		}
-
-		shape[index++] = startX;
-		shape[index++] = y + height;
-
-	}
-
-	drawBorder(gc, shape);
-
-}
-
-/*
- * Draw the border of the tab
- * 
- * @param gc
- * @param shape
- */
-void drawBorder(GC gc, int[] shape) {
-
-	gc.setForeground(getDisplay().getSystemColor(CTabFolder.BORDER1_COLOR));
-	gc.drawPolyline(shape);
-}
-
-/*
- * Draw the unselected border for the receiver on the left.
- * 
- * @param gc
- */
-void drawLeftUnselectedBorder(GC gc) {
-
-	int[] shape = null;
-	if (this.parent.onBottom) {
-		int[] left = parent.simple
-			? CTabFolder.SIMPLE_UNSELECTED_INNER_CORNER
-			: CTabFolder.BOTTOM_LEFT_CORNER;
-		
-		shape = new int[left.length + 2];
-		int index = 0;
-		shape[index++] = x;
-		shape[index++] = y - 1;
-		for (int i = 0; i < left.length / 2; i++) {
-			shape[index++] = x + left[2 * i];
-			shape[index++] = y + height + left[2 * i + 1] - 1;
-		}
-	} else {
-		int[] left = parent.simple
-			? CTabFolder.SIMPLE_UNSELECTED_INNER_CORNER
-			: CTabFolder.TOP_LEFT_CORNER;
-
-		shape = new int[left.length + 2];
-		int index = 0;
-		shape[index++] = x;
-		shape[index++] = y + height;
-		for (int i = 0; i < left.length / 2; i++) {
-			shape[index++] = x + left[2 * i];
-			shape[index++] = y + left[2 * i + 1];
-		}
-
-	}
-
-	drawBorder(gc, shape);
-}
-
-void drawUnselected(GC gc) {
-	// Do not draw partial items
-	if (!showing) return;
-	
-	Rectangle clipping = gc.getClipping();
-	Rectangle bounds = getBounds();
-	if (!clipping.intersects(bounds)) return;
-	
-	// draw border
-	int index = parent.indexOf(this);
-
-	if (index > 0 && index < parent.selectedIndex)
-		drawLeftUnselectedBorder(gc);
-	// If it is the last one then draw a line
-	if (index > parent.selectedIndex)
-		drawRightUnselectedBorder(gc);
-
-	// draw Image
-	int xDraw = x + LEFT_MARGIN;
-	Image image = getImage();
-	if (image != null && parent.showUnselectedImage) {
-		Rectangle imageBounds = image.getBounds();
-		// only draw image if it won't overlap with close button
-		int maxImageWidth = x + width - xDraw - RIGHT_MARGIN;
-		if (parent.showUnselectedClose && (parent.showClose || showClose)) {
-			maxImageWidth -= closeRect.width + INTERNAL_SPACING;
-		}
-		if (imageBounds.width < maxImageWidth) {		
-			int imageX = xDraw;
-			int imageHeight = imageBounds.height;
-			int imageY = y + (height - imageHeight) / 2;
-			imageY += parent.onBottom ? -1 : 1;
-			int imageWidth = imageBounds.width * imageHeight / imageBounds.height;
-			gc.drawImage(image, 
-				         imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
-				         imageX, imageY, imageWidth, imageHeight);
-			xDraw += imageWidth + INTERNAL_SPACING;
-		}
-	}
-	// draw Text
-	int textWidth = x + width - xDraw - RIGHT_MARGIN;
-	if (parent.showUnselectedClose && (parent.showClose || showClose)) {
-		textWidth -= closeRect.width + INTERNAL_SPACING;
-	}
-	if (textWidth > 0) {
-		Font gcFont = gc.getFont();
-		gc.setFont(font == null ? parent.getFont() : font);
-		if (shortenedText == null || shortenedTextWidth != textWidth) {
-			shortenedText = shortenText(gc, getText(), textWidth);
-			shortenedTextWidth = textWidth;
-		}	
-		Point extent = gc.textExtent(shortenedText, FLAGS);
-		int textY = y + (height - extent.y) / 2;
-		textY += parent.onBottom ? -1 : 1;
-		gc.setForeground(parent.getForeground());
-		gc.drawText(shortenedText, xDraw, textY, FLAGS);
-		gc.setFont(gcFont);
-	}
-	// draw close
-	if (parent.showUnselectedClose && (parent.showClose || showClose)) drawClose(gc);
-}
 /**
  * Returns a rectangle describing the receiver's size and location
  * relative to its parent.
@@ -683,9 +145,7 @@ void drawUnselected(GC gc) {
  */
 public Rectangle getBounds () {
 	//checkWidget();
-	int w = width;
-	if (!parent.simple && !parent.single && parent.indexOf(this) == parent.selectedIndex) w += parent.curveWidth - parent.curveIndent;
-	return new Rectangle(x, y, w, height);
+	return new Rectangle(x, y, width, height);
 }
 /**
 * Gets the control that is displayed in the content area of the tab item.
@@ -801,73 +261,7 @@ public boolean isShowing () {
 	checkWidget();
 	return showing;
 }
-void onPaint(GC gc, boolean isSelected) {
-	if (width == 0 || height == 0) return;
-	if (isSelected) {
-		drawSelected(gc);
-	} else {
-		drawUnselected(gc);
-	}
-}
-int preferredHeight(GC gc) {
-	Image image = getImage();
-	int h = (image == null) ? 0 : image.getBounds().height;
-	String text = getText();
-	if (font == null) {
-		h = Math.max(h, gc.textExtent(text, FLAGS).y);
-	} else {
-		Font gcFont = gc.getFont();
-		gc.setFont(font);
-		h = Math.max(h, gc.textExtent(text, FLAGS).y);
-		gc.setFont(gcFont);
-	}
-	return h + TOP_MARGIN + BOTTOM_MARGIN;
-}
-int preferredWidth(GC gc, boolean isSelected, boolean minimum) {
-	// NOTE: preferred width does not include the "dead space" caused
-	// by the curve.
-	if (isDisposed()) return 0;
-	int w = 0;
-	Image image = getImage();
-	if (image != null && (isSelected || parent.showUnselectedImage)) {
-		w += image.getBounds().width;
-	}
-	String text = null;
-	if (minimum) {
-		int minChars = parent.minChars;
-		text = minChars == 0 ? null : getText();
-		if (text != null && text.length() > minChars) {
-			if (useEllipses()) {
-				int end = minChars < ELLIPSIS.length() + 1 ? minChars : minChars - ELLIPSIS.length();
-				text = text.substring(0, end);
-				if (minChars > ELLIPSIS.length() + 1) text += ELLIPSIS;
-			} else {
-				int end = minChars;
-				text = text.substring(0, end);
-			}
-		}
-	} else {
-		text = getText();
-	}
-	if (text != null) {
-		if (w > 0) w += INTERNAL_SPACING;
-		if (font == null) {
-			w += gc.textExtent(text, FLAGS).x;
-		} else {
-			Font gcFont = gc.getFont();
-			gc.setFont(font);
-			w += gc.textExtent(text, FLAGS).x;
-			gc.setFont(gcFont);
-		}
-	}
-	if (parent.showClose || showClose) {
-		if (isSelected || parent.showUnselectedClose) {
-			if (w > 0) w += INTERNAL_SPACING;
-			w += CTabFolder.BUTTON_SIZE;
-		}
-	}
-	return w + LEFT_MARGIN + RIGHT_MARGIN;
-}
+
 /**
  * Sets the control that is used to fill the client area of
  * the tab folder when the user selects the tab item.
@@ -899,7 +293,14 @@ public void setControl (Control control) {
 			this.control.setBounds(parent.getClientArea ());
 			this.control.setVisible(true);
 		} else {
-			this.control.setVisible(false);
+		    int selectedIndex = parent.getSelectionIndex();
+		    Control selectedControl = null;
+		    if (selectedIndex != -1) {
+		    	selectedControl = parent.getItem(selectedIndex).getControl();
+		    }
+		    if (this.control != selectedControl) {
+		    	this.control.setVisible(false);
+		    }
 		}
 	}
 }
@@ -970,18 +371,25 @@ public void setImage (Image image) {
 			Rectangle bounds = image.getBounds();
 			if (bounds.width == oldBounds.width && bounds.height == oldBounds.height) {
 				if (showing) {
-					boolean selected = parent.indexOf(this) == parent.selectedIndex;
+					int index = parent.indexOf(this);
+					boolean selected = index == parent.selectedIndex;
 					if (selected || parent.showUnselectedImage) {
-						int imageX = x + LEFT_MARGIN, maxImageWidth;
+						CTabFolderRenderer renderer = parent.renderer;
+						Rectangle trim = renderer.computeTrim(index, SWT.NONE, 0, 0, 0, 0);
+						int imageX = x - trim.x, maxImageWidth;
 						if (selected) {
-							if (parent.single && (parent.showClose || showClose)) imageX += CTabFolder.BUTTON_SIZE; 
-							int rightEdge = Math.min (x + width, parent.getRightItemEdge());
-							maxImageWidth = rightEdge - imageX - RIGHT_MARGIN;
-							if (!parent.single && closeRect.width > 0) maxImageWidth -= closeRect.width + INTERNAL_SPACING;
+							GC gc = new GC(parent);
+							if (parent.single && (parent.showClose || showClose)) {
+								imageX += renderer.computeSize(CTabFolderRenderer.PART_CLOSE_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x; 
+							}
+							int rightEdge = Math.min (x + width, parent.getRightItemEdge(gc));
+							gc.dispose();
+							maxImageWidth = rightEdge - imageX - (trim.width + trim.x);
+							if (!parent.single && closeRect.width > 0) maxImageWidth -= closeRect.width + CTabFolderRenderer.INTERNAL_SPACING;
 						} else {
-							maxImageWidth = x + width - imageX - RIGHT_MARGIN;
+							maxImageWidth = x + width - imageX  - (trim.width + trim.x);
 							if (parent.showUnselectedClose && (parent.showClose || showClose)) {
-								maxImageWidth -= closeRect.width + INTERNAL_SPACING;
+								maxImageWidth -= closeRect.width + CTabFolderRenderer.INTERNAL_SPACING;
 							}
 						}
 						if (bounds.width < maxImageWidth) {
@@ -1037,6 +445,11 @@ public void setText (String string) {
  * tool tip, such as the Tree control on Windows, setting
  * the tool tip text to an empty string replaces the default,
  * causing no tool tip text to be shown.
+ * <p>
+ * The mnemonic indicator (character '&') is not displayed in a tool tip.
+ * To display a single '&' in the tool tip, the character '&' can be 
+ * escaped by doubling it in the string.
+ * </p>
  *
  * @param string the new tool tip text (or null)
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleEvent.java
index 7b5e2b3..bfa853e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/LineStyleEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,13 @@ public class LineStyleEvent extends TypedEvent {
 	 */
 	public int indent;
 
+	/**
+	 * line wrap indent (input, output)
+	 * 
+	 * @since 3.6
+	 */
+	public int wrapIndent;
+
 	/** 
 	 * line justification (input, output)
 	 * 
@@ -79,6 +86,13 @@ public class LineStyleEvent extends TypedEvent {
 	 * @since 3.2
 	 */
 	public int bulletIndex;
+
+	/**
+	 * line tab stops (output)
+	 * @since 3.6
+	 */
+	public int[] tabStops;
+
 	
 	static final long serialVersionUID = 3906081274027192884L;
 
@@ -97,7 +111,9 @@ public LineStyleEvent(StyledTextEvent e) {
 	alignment = e.alignment;
 	justify = e.justify;
 	indent = e.indent;
+	wrapIndent = e.wrapIndent;
 	bullet = e.bullet;
 	bulletIndex = e.bulletIndex;
+	tabStops = e.tabStops;
 }
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
index cc76e97..afa0ad5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,7 +119,6 @@ protected void layout(Composite composite, boolean flushCache) {
 	for (int i = 0; i < children.length; i++) {
 		children[i].setBounds(rect);
 		children[i].setVisible(children[i] == topControl);
-			
 	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 914a473..c6915a2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,7 +68,7 @@ import org.eclipse.swt.widgets.*;
  * </p><p>
  * <dl>
  * <dt><b>Styles:</b><dd>FULL_SELECTION, MULTI, READ_ONLY, SINGLE, WRAP
- * <dt><b>Events:</b><dd>ExtendedModify, LineGetBackground, LineGetSegments, LineGetStyle, Modify, Selection, Verify, VerifyKey
+ * <dt><b>Events:</b><dd>ExtendedModify, LineGetBackground, LineGetSegments, LineGetStyle, Modify, Selection, Verify, VerifyKey, OrientationChange
  * </dl>
  * </p><p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -117,6 +117,7 @@ public class StyledText extends Canvas {
 	int clientAreaHeight = 0;			// the client area height. Needed to calculate content width for new visible lines during Resize callback
 	int clientAreaWidth = 0;			// the client area width. Needed during Resize callback to determine if line wrap needs to be recalculated
 	int tabLength = 4;					// number of characters in a tab
+	int [] tabs;
 	int leftMargin;
 	int topMargin;
 	int rightMargin;
@@ -162,9 +163,11 @@ public class StyledText extends Canvas {
 	Cursor cursor;
 	int alignment;
 	boolean justify;
-	int indent;
+	int indent, wrapIndent;
 	int lineSpacing;
 	int alignmentMargin;
+	int newOrientation = SWT.NONE;
+	int accCaretOffset;
 	
 	//block selection
 	boolean blockSelection;
@@ -203,6 +206,7 @@ public class StyledText extends Canvas {
 		int pageWidth;									// width of a printer page in pixels
 		int startPage;									// first page to print
 		int endPage;									// last page to print
+		int scope;										// scope of print job
 		int startLine;									// first (wrapped) line to print
 		int endLine;									// last (wrapped) line to print
 		boolean singleLine;								// widget single line mode
@@ -228,7 +232,8 @@ public class StyledText extends Canvas {
 		startPage = 1;
 		endPage = Integer.MAX_VALUE;
 		PrinterData data = printer.getPrinterData();
-		if (data.scope == PrinterData.PAGE_RANGE) {
+		scope = data.scope;
+		if (scope == PrinterData.PAGE_RANGE) {
 			startPage = data.startPage;
 			endPage = data.endPage;
 			if (endPage < startPage) {
@@ -236,7 +241,7 @@ public class StyledText extends Canvas {
 				endPage = startPage;
 				startPage = temp;
 			}
-		} else if (data.scope == PrinterData.SELECTION) {
+		} else if (scope == PrinterData.SELECTION) {
 			selection = styledText.getSelectionRange();
 		}
 		printerRenderer = new StyledTextRenderer(printer, null);
@@ -265,9 +270,12 @@ public class StyledText extends Canvas {
 					printerRenderer.setLineBackground(i, 1, event.lineBackground);
 				}
 				if (styledText.isBidi()) {
-					int[] segments = styledText.getBidiSegments(lineOffset, line);
-					printerRenderer.setLineSegments(i, 1, segments);
-				}			
+					event = styledText.getBidiSegments(lineOffset, line);
+					if (event != null) {
+						printerRenderer.setLineSegments(i, 1, event.segments);
+						printerRenderer.setLineSegmentChars(i, 1, event.segmentsChars);
+					}
+				}
 				event = styledText.getLineStyleData(lineOffset, line);
 				if (event != null) {
 					printerRenderer.setLineIndent(i, 1, event.indent);
@@ -432,11 +440,10 @@ public class StyledText extends Canvas {
 		StyledTextContent content = printerRenderer.content;
 		startLine = 0;
 		endLine = singleLine ? 0 : content.getLineCount() - 1;
-		PrinterData data = printer.getPrinterData();
-		if (data.scope == PrinterData.PAGE_RANGE) {
+		if (scope == PrinterData.PAGE_RANGE) {
 			int pageSize = clientArea.height / lineHeight;//WRONG
 			startLine = (startPage - 1) * pageSize;
-		} else if (data.scope == PrinterData.SELECTION) {
+		} else if (scope == PrinterData.SELECTION) {
 			startLine = content.getLineAtOffset(selection.x);
 			if (selection.y > 0) {
 				endLine = content.getLineAtOffset(selection.x + selection.y - 1);
@@ -787,7 +794,7 @@ public class StyledText extends Canvas {
 	void write(String string, int start, int end) {
 		for (int index = start; index < end; index++) {
 			char ch = string.charAt(index);
-			if (ch > 0xFF && WriteUnicode) {
+			if (ch > 0x7F && WriteUnicode) {
 				// write the sub string from the last escaped character 
 				// to the current one. Fixes bug 21698.
 				if (index > start) {
@@ -2244,9 +2251,18 @@ void doBackspace() {
 			event.start = lineOffset + content.getLine(lineIndex - 1).length();
 			event.end = caretOffset;
 		} else {
+			boolean isSurrogate = false;
+			String lineText = content.getLine(lineIndex);
+			char ch = lineText.charAt(caretOffset - lineOffset - 1);
+			if (0xDC00 <= ch && ch <= 0xDFFF) {
+				if (caretOffset - lineOffset - 2 >= 0) {
+					ch = lineText.charAt(caretOffset - lineOffset - 2);
+					isSurrogate = 0xD800 <= ch && ch <= 0xDBFF;
+				}
+			}
 			TextLayout layout = renderer.getTextLayout(lineIndex);
-			int start = layout.getPreviousOffset(caretOffset - lineOffset, SWT.MOVEMENT_CHAR);
-			renderer.disposeTextLayout(layout); 
+			int start = layout.getPreviousOffset(caretOffset - lineOffset, isSurrogate ? SWT.MOVEMENT_CLUSTER : SWT.MOVEMENT_CHAR);
+			renderer.disposeTextLayout(layout);
 			event.start = start + lineOffset;
 			event.end = caretOffset;
 		}
@@ -2393,6 +2409,7 @@ void doBlockSelection(boolean sendEvent) {
 	if (sendEvent) {
 		sendSelectionEvent();
 	}
+	sendAccessibleTextCaretMoved();
 }
 /**
  * Replaces the selection with the character or insert the character at the 
@@ -3201,6 +3218,7 @@ void doSelection(int direction) {
 		internalRedrawRange(redrawStart, redrawEnd - redrawStart);
 		sendSelectionEvent();
 	}
+	sendAccessibleTextCaretMoved();
 }
 /**
  * Moves the caret to the next character or to the beginning of the 
@@ -3484,7 +3502,7 @@ public boolean getBlockSelection() {
 	checkWidget();
 	return blockSelection;
 }
-Rectangle getBlockSelectonPosition() {
+Rectangle getBlockSelectionPosition() {
 	int firstLine = getLineIndex(blockYAnchor - getVerticalScrollOffset());
 	int lastLine = getLineIndex(blockYLocation - getVerticalScrollOffset()); 
 	if (firstLine > lastLine) {
@@ -3531,14 +3549,14 @@ public Rectangle getBlockSelectionBounds() {
 	return rect;
 }
 Rectangle getBlockSelectionRectangle() {
-	Rectangle rect = getBlockSelectonPosition();
+	Rectangle rect = getBlockSelectionPosition();
 	rect.y = getLinePixel(rect.y);
 	rect.width = rect.width - rect.x;
 	rect.height =  getLinePixel(rect.height + 1) - rect.y;
 	return rect;
 }
 String getBlockSelectionText(String delimiter) {
-	Rectangle rect = getBlockSelectonPosition();
+	Rectangle rect = getBlockSelectionPosition();
 	int firstLine = rect.y;
 	int lastLine = rect.height;
 	int left = rect.x;
@@ -4215,6 +4233,64 @@ public int getLineIndex(int y) {
 	}
 	return line;
 }
+/**
+ * Returns the tab stops of the line at the given <code>index</code>.
+ * 
+ * @param index the index of the line
+ * 
+ * @return the tab stops for the line 
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT when the index is invalid</li>
+ * </ul>
+ * 
+ * @see #getTabStops()
+ * 
+ * @since 3.6
+ */
+public int[] getLineTabStops(int index) {
+	checkWidget();
+	if (index < 0 || index > content.getLineCount()) {
+		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	}
+	if (isListening(LineGetStyle)) return null;
+	int[] tabs = renderer.getLineTabStops(index, null);
+	if (tabs == null) tabs = this.tabs;
+	if (tabs == null) return new int [] {renderer.tabWidth};
+	int[] result = new int[tabs.length];
+	System.arraycopy(tabs, 0, result, 0, tabs.length);
+	return result;
+}
+/**
+ * Returns the wrap indentation of the line at the given <code>index</code>.
+ * 
+ * @param index the index of the line
+ * 
+ * @return the wrap indentation
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT when the index is invalid</li>
+ * </ul>
+ * 
+ * @see #getWrapIndent()
+ * 
+ * @since 3.6
+ */
+public int getLineWrapIndent(int index) {
+	checkWidget();
+	if (index < 0 || index > content.getLineCount()) {
+		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	}
+	return isListening(LineGetStyle) ? 0 : renderer.getLineWrapIndent(index, wrapIndent);
+}
 /** 
  * Returns the left margin.
  *
@@ -4396,6 +4472,10 @@ int getOffsetAtPoint(int x, int y, int[] trailing, boolean inTextOnly) {
  */
 public int getOrientation () {
 	checkWidget();
+	if (IS_MAC) {
+		int style = super.getStyle();
+		return style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
+	}
 	return isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
 }
 /** 
@@ -4600,7 +4680,7 @@ public Point getSelectionRange() {
 public int[] getSelectionRanges() {
 	checkWidget();
 	if (blockSelection && blockXLocation != -1) {
-		Rectangle rect = getBlockSelectonPosition();
+		Rectangle rect = getBlockSelectionPosition();
 		int firstLine = rect.y;
 		int lastLine = rect.height;
 		int left = rect.x;
@@ -4693,63 +4773,48 @@ public String getSelectionText() {
 public int getStyle() {
 	int style = super.getStyle();
 	style &= ~(SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT | SWT.MIRRORED);
-	if (isMirrored()) {
-		style |= SWT.RIGHT_TO_LEFT | SWT.MIRRORED;
-	} else {
-		style |= SWT.LEFT_TO_RIGHT;
-	}
+	style |= getOrientation();
+	if (isMirrored()) style |= SWT.MIRRORED;
 	return style;
 }
 
-/**
- * Returns the text segments that should be treated as if they 
- * had a different direction than the surrounding text.
- *
- * @param lineOffset offset of the first character in the line. 
- * 	0 based from the beginning of the document.
- * @param line text of the line to specify bidi segments for
- * @return text segments that should be treated as if they had a
- * 	different direction than the surrounding text. Only the start 
- * 	index of a segment is specified, relative to the start of the 
- * 	line. Always starts with 0 and ends with the line length. 
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_INVALID_ARGUMENT - if the segment indices returned 
- * 		by the listener do not start with 0, are not in ascending order,
- * 		exceed the line length or have duplicates</li>
- * </ul>
- */
-int [] getBidiSegments(int lineOffset, String line) {
+StyledTextEvent getBidiSegments(int lineOffset, String line) {
 	if (!isBidi()) return null;
 	if (!isListening(LineGetSegments)) {
-		return getBidiSegmentsCompatibility(line, lineOffset);
+		StyledTextEvent event = new StyledTextEvent(content);
+		event.segments = getBidiSegmentsCompatibility(line, lineOffset);
+		return event;
 	}
 	StyledTextEvent event = sendLineEvent(LineGetSegments, lineOffset, line);
+	if (event == null || event.segments == null || event.segments.length == 0) return null;
 	int lineLength = line.length();
-	int[] segments;
-	if (event == null || event.segments == null || event.segments.length == 0) {
-		segments = new int[] {0, lineLength};
-	} else {
-		int segmentCount = event.segments.length;
-		
+	int[] segments = event.segments;
+	int segmentCount = segments.length;
+	if (event.segmentsChars == null) {
 		// test segment index consistency
-		if (event.segments[0] != 0) {
+		if (segments[0] != 0) {
 			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-		} 	
+		}
 		for (int i = 1; i < segmentCount; i++) {
-			if (event.segments[i] <= event.segments[i - 1] || event.segments[i] > lineLength) {
+			if (segments[i] <= segments[i - 1] || segments[i] > lineLength) {
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
-			} 	
+			}
 		}
 		// ensure that last segment index is line end offset
-		if (event.segments[segmentCount - 1] != lineLength) {
+		if (segments[segmentCount - 1] != lineLength) {
 			segments = new int[segmentCount + 1];
 			System.arraycopy(event.segments, 0, segments, 0, segmentCount);
 			segments[segmentCount] = lineLength;
-		} else {
-			segments = event.segments;
+		}
+		event.segments = segments;
+	} else {
+		for (int i = 1; i < segmentCount; i++) {
+			if (event.segments[i] < event.segments[i - 1] || event.segments[i] > lineLength) {
+				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			}
 		}
 	}
-	return segments;
+	return event;
 }
 /**
  * @see #getBidiSegments
@@ -4995,11 +5060,33 @@ public StyleRange[] getStyleRanges(int start, int length, boolean includeRanges)
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
+ * 
+ * @see #getTabStops()
  */
 public int getTabs() {
 	checkWidget();
 	return tabLength;
 }
+
+/**
+ * Returns the tab list of the receiver.
+ *
+ * @return the tab list
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public int[] getTabStops() {
+	checkWidget();
+	if (tabs == null) return new int [] {renderer.tabWidth};
+	int[] result = new int[tabs.length];
+	System.arraycopy(tabs, 0, result, 0, tabs.length);
+	return result;
+}
+
 /**
  * Returns a copy of the widget content.
  *
@@ -5248,6 +5335,9 @@ int getWrapWidth () {
 	return -1;
 }
 int getWordNext (int offset, int movement) {
+	return getWordNext(offset, movement, false);
+}
+int getWordNext (int offset, int movement, boolean ignoreListener) {
 	int newOffset, lineOffset;
 	String lineText;
 	if (offset >= getCharCount()) {
@@ -5260,7 +5350,7 @@ int getWordNext (int offset, int movement) {
 		lineOffset = content.getOffsetAtLine(lineIndex);
 		lineText = content.getLine(lineIndex);
 		int lineLength = lineText.length();
-		if (offset == lineOffset + lineLength) {
+		if (offset >= lineOffset + lineLength) {
 			newOffset = content.getOffsetAtLine(lineIndex + 1);
 		} else {
 			TextLayout layout = renderer.getTextLayout(lineIndex);
@@ -5268,9 +5358,13 @@ int getWordNext (int offset, int movement) {
 			renderer.disposeTextLayout(layout);
 		}
 	}
+	if (ignoreListener) return newOffset; 
 	return sendWordBoundaryEvent(WordNext, movement, offset, newOffset, lineText, lineOffset);
 }
 int getWordPrevious(int offset, int movement) {
+	return getWordPrevious(offset, movement, false); 
+}
+int getWordPrevious(int offset, int movement, boolean ignoreListener) {
 	int newOffset, lineOffset;
 	String lineText;
 	if (offset <= 0) {
@@ -5287,11 +5381,13 @@ int getWordPrevious(int offset, int movement) {
 			int nextLineOffset = content.getOffsetAtLine(lineIndex - 1); 
 			newOffset = nextLineOffset + nextLineText.length();
 		} else {
+			int layoutOffset = Math.min(offset - lineOffset, lineText.length());
 			TextLayout layout = renderer.getTextLayout(lineIndex);
-			newOffset = lineOffset + layout.getPreviousOffset(offset - lineOffset, movement);
+			newOffset = lineOffset + layout.getPreviousOffset(layoutOffset, movement);
 			renderer.disposeTextLayout(layout); 
 		}
 	}
+	if (ignoreListener) return newOffset;
 	return sendWordBoundaryEvent(WordPrevious, movement, offset, newOffset, lineText, lineOffset);
 }
 /**
@@ -5304,6 +5400,24 @@ public boolean getWordWrap() {
 	checkWidget();
 	return wordWrap;
 }
+/**
+ * Returns the wrap indentation of the widget.
+ * 
+ * @return the wrap indentation
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *  
+ * @see #getLineWrapIndent(int)
+ * 
+ * @since 3.6
+ */
+public int getWrapIndent() {
+	checkWidget();
+	return wrapIndent;
+}
 /** 
  * Returns the location of the given offset.
  * <p>
@@ -5412,7 +5526,7 @@ int insertBlockSelectionText(String text, boolean fillWithSpaces) {
 			String line = lines[i];
 			int length = line.length();
 			if (length < maxLength) {
-				int numSpaces = maxLength - length;;
+				int numSpaces = maxLength - length;
 				StringBuffer buffer = new StringBuffer(length + numSpaces);
 				buffer.append(line);
 				for (int j = 0; j < numSpaces; j++) buffer.append(' ');
@@ -5422,7 +5536,7 @@ int insertBlockSelectionText(String text, boolean fillWithSpaces) {
 	}
 	int firstLine, lastLine, left, right;
 	if (blockXLocation != -1) {
-		Rectangle rect = getBlockSelectonPosition();
+		Rectangle rect = getBlockSelectionPosition();
 		firstLine = rect.y;
 		lastLine = rect.height;
 		left = rect.x;
@@ -5449,7 +5563,7 @@ int insertBlockSelectionText(String text, boolean fillWithSpaces) {
 }
 void insertBlockSelectionText(char key, int action) {
 	if (key == SWT.CR || key == SWT.LF) return;
-	Rectangle rect = getBlockSelectonPosition();
+	Rectangle rect = getBlockSelectionPosition();
 	int firstLine = rect.y;
 	int lastLine = rect.height;
 	int left = rect.x;
@@ -5749,6 +5863,7 @@ void handleDispose(Event event) {
 	background = null;
 	foreground = null;
 	clipboard = null;
+	tabs = null;
 }
 /** 
  * Scrolls the widget horizontally.
@@ -5831,14 +5946,19 @@ void handleKeyDown(Event event) {
 	if (clipboardSelection == null) {
 		clipboardSelection = new Point(selection.x, selection.y);
 	}
+	newOrientation = SWT.NONE;
 	
 	Event verifyEvent = new Event();
 	verifyEvent.character = event.character;
 	verifyEvent.keyCode = event.keyCode;
+	verifyEvent.keyLocation = event.keyLocation;
 	verifyEvent.stateMask = event.stateMask;
 	verifyEvent.doit = true;
 	notifyListeners(VerifyKey, verifyEvent);
 	if (verifyEvent.doit) {
+		if ((event.stateMask & SWT.MODIFIER_MASK) == SWT.CTRL && event.keyCode == SWT.SHIFT && isBidiCaret()) {
+			newOrientation = event.keyLocation == SWT.LEFT ? SWT.LEFT_TO_RIGHT : SWT.RIGHT_TO_LEFT; 
+		}
 		handleKey(event);
 	}
 }
@@ -5854,6 +5974,18 @@ void handleKeyUp(Event event) {
 		}
 	}
 	clipboardSelection = null;
+	
+	if (newOrientation != SWT.NONE) {
+		if (newOrientation != getOrientation()) {
+			Event e = new Event();
+			e.doit = true;
+			notifyListeners(SWT.OrientationChange, e);
+			if (e.doit) {
+				setOrientation(newOrientation);
+			}
+		}
+		newOrientation = SWT.NONE;
+	}
 }
 /** 
  * Updates the caret location and selection if mouse button 1 has been 
@@ -6101,7 +6233,7 @@ void handleTextChanged(TextChangedEvent event) {
 		claimRightFreeSpace();
 	}
 	
-	sendAccessibleTextChanged(lastTextChangeStart, lastTextChangeNewCharCount, lastTextChangeReplaceCharCount);
+	sendAccessibleTextChanged(lastTextChangeStart, lastTextChangeNewCharCount, 0);
 	lastCharCount += lastTextChangeNewCharCount;
 	lastCharCount -= lastTextChangeReplaceCharCount;
 	setAlignment();
@@ -6139,7 +6271,7 @@ void handleTextChanging(TextChangingEvent event) {
 	} else {
 		scrollText(srcY, destY);
 	}
-
+	sendAccessibleTextChanged(lastTextChangeStart, 0, lastTextChangeReplaceCharCount);
 	renderer.textChanging(event);
 	
 	// Update the caret offset if it is greater than the length of the content.
@@ -6207,9 +6339,9 @@ void initializeAccessible() {
 	accessible.addAccessibleListener(new AccessibleAdapter() {
 		public void getName (AccessibleEvent e) {
 			String name = null;
-			Label label = getAssociatedLabel ();
-			if (label != null) {
-				name = stripMnemonic (label.getText());
+			String text = getAssociatedLabel ();
+			if (text != null) {
+				name = stripMnemonic (text);
 			}
 			e.result = name;
 		}
@@ -6218,28 +6350,426 @@ void initializeAccessible() {
 		}
 		public void getKeyboardShortcut(AccessibleEvent e) {
 			String shortcut = null;
-			Label label = getAssociatedLabel ();
-			if (label != null) {
-				String text = label.getText ();
-				if (text != null) {
-					char mnemonic = _findMnemonic (text);
-					if (mnemonic != '\0') {
-						shortcut = "Alt+"+mnemonic; //$NON-NLS-1$
-					}
+			String text = getAssociatedLabel ();
+			if (text != null) {
+				char mnemonic = _findMnemonic (text);
+				if (mnemonic != '\0') {
+					shortcut = "Alt+"+mnemonic; //$NON-NLS-1$
 				}
 			}
 			e.result = shortcut;
 		}
 	});
-	accessible.addAccessibleTextListener(new AccessibleTextAdapter() {
+	accessible.addAccessibleTextListener(new AccessibleTextExtendedAdapter() {
 		public void getCaretOffset(AccessibleTextEvent e) {
 			e.offset = StyledText.this.getCaretOffset();
 		}
+		public void setCaretOffset(AccessibleTextEvent e) {
+			StyledText.this.setCaretOffset(e.offset);
+			e.result = ACC.OK;
+		}
 		public void getSelectionRange(AccessibleTextEvent e) {
 			Point selection = StyledText.this.getSelectionRange();
 			e.offset = selection.x;
 			e.length = selection.y;
 		}
+		public void addSelection(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			Point point = st.getSelection();
+			if (point.x == point.y) {
+				int end = e.end;
+				if (end == -1) end = st.getCharCount();
+				st.setSelection(e.start, end);
+				e.result = ACC.OK;
+			}
+		}
+		public void getSelection(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			if (st.blockSelection && st.blockXLocation != -1) {
+				Rectangle rect = st.getBlockSelectionPosition();
+				int lineIndex = rect.y + e.index;
+				int linePixel = st.getLinePixel(lineIndex);
+				e.ranges = getRanges(rect.x, linePixel, rect.width, linePixel);
+				if (e.ranges.length > 0) {
+					e.start = e.ranges[0];
+					e.end = e.ranges[e.ranges.length - 1];
+				}
+			} else {
+				if (e.index == 0) {
+					Point point = st.getSelection();
+					e.start = point.x;
+					e.end = point.y;
+					if (e.start > e.end) {
+						int temp = e.start;
+						e.start = e.end;
+						e.end = temp;
+					}
+				}
+			}
+		}
+		public void getSelectionCount(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			if (st.blockSelection && st.blockXLocation != -1) {
+				Rectangle rect = st.getBlockSelectionPosition();
+				e.count = rect.height - rect.y + 1;
+			} else {
+				Point point = st.getSelection();
+				e.count = point.x == point.y ? 0 : 1; 
+			}
+		}
+		public void removeSelection(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			if (e.index == 0) {
+				if (st.blockSelection) {
+					st.clearBlockSelection(true, false);
+				} else {
+					st.clearSelection(false);
+				}
+				e.result = ACC.OK;
+			}
+		}
+		public void setSelection(AccessibleTextEvent e) {
+			if (e.index != 0) return;
+			StyledText st = StyledText.this;
+			Point point = st.getSelection();
+			if (point.x == point.y) return;
+			int end = e.end;
+			if (end == -1) end = st.getCharCount();
+			st.setSelection(e.start, end);
+			e.result = ACC.OK;
+		}
+		public void getCharacterCount(AccessibleTextEvent e) {
+			e.count = StyledText.this.getCharCount();
+		}
+		public void getOffsetAtPoint(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			Point point = new Point (e.x, e.y);
+			Display display = st.getDisplay();
+			point = display.map(null, st, point);
+			e.offset = st.getOffsetAtPoint(point.x, point.y, null, true);
+		}
+		public void getTextBounds(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			int start = e.start;
+			int end = e.end;
+			int contentLength = st.getCharCount();
+			start = Math.max(0, Math.min(start, contentLength));
+			end = Math.max(0, Math.min(end, contentLength));
+			if (start > end) {
+				int temp = start;
+				start = end;
+				end = temp;
+			}
+			int startLine = st.getLineAtOffset(start);
+			int endLine = st.getLineAtOffset(end);
+			Rectangle[] rects = new Rectangle[endLine - startLine + 1];
+			Rectangle bounds = null;
+			int index = 0;
+			Display display = st.getDisplay();
+			for (int lineIndex = startLine; lineIndex <= endLine; lineIndex++) {
+				Rectangle rect = new Rectangle(0, 0, 0, 0);
+				rect.y = st.getLinePixel(lineIndex);
+				rect.height = st.renderer.getLineHeight(lineIndex);
+				if (lineIndex == startLine) {
+					rect.x = st.getPointAtOffset(start).x;
+				} else {
+					rect.x = st.leftMargin - st.horizontalScrollOffset;
+				}
+				if (lineIndex == endLine) {
+					rect.width = st.getPointAtOffset(end).x - rect.x;
+				} else {
+					TextLayout layout = st.renderer.getTextLayout(lineIndex);
+					rect.width = layout.getBounds().width - rect.x;
+					st.renderer.disposeTextLayout(layout);
+				}
+				rects [index++] = rect = display.map(st, null, rect);
+				if (bounds == null) {
+					bounds = new Rectangle(rect.x, rect.y, rect.width, rect.height);
+				} else {
+					bounds.add(rect);
+				}
+			}
+			e.rectangles = rects;
+			if (bounds != null) {
+				e.x = bounds.x;
+				e.y = bounds.y;
+				e.width = bounds.width;
+				e.height = bounds.height;
+			}
+		}
+		int[] getRanges(int left, int top, int right, int bottom) {
+			StyledText st = StyledText.this;
+			int lineStart = st.getLineIndex(top);
+			int lineEnd = st.getLineIndex(bottom);
+			int count = lineEnd - lineStart + 1;
+			int[] ranges = new int [count * 2];
+			int index = 0;
+			for (int lineIndex = lineStart; lineIndex <= lineEnd; lineIndex++) {
+				String line = st.content.getLine(lineIndex);
+				int lineOffset = st.content.getOffsetAtLine(lineIndex);
+				int lineEndOffset = lineOffset + line.length();
+				int linePixel = st.getLinePixel(lineIndex);
+				int start = st.getOffsetAtPoint(left, linePixel, null, true);
+				if (start == -1) {
+					start = left < st.leftMargin ? lineOffset : lineEndOffset;
+				}
+				int[] trailing = new int[1];
+				int end = st.getOffsetAtPoint(right, linePixel, trailing, true);
+				if (end == -1) {
+					end = right < st.leftMargin ? lineOffset : lineEndOffset; 
+				} else {
+					end += trailing[0];
+				}
+				if (start > end) {
+					int temp = start;
+					start = end;
+					end = temp;
+				}
+				ranges[index++] = start;
+				ranges[index++] = end;
+			}
+			return ranges;
+		}
+		public void getRanges(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			Point point = new Point (e.x, e.y);
+			Display display = st.getDisplay();
+			point = display.map(null, st, point);
+			e.ranges = getRanges(point.x, point.y, point.x + e.width, point.y + e.height);
+			if (e.ranges.length > 0) {
+				e.start = e.ranges[0];
+				e.end = e.ranges[e.ranges.length - 1];
+			}
+		}
+		public void getText(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			int start = e.start;
+			int end = e.end;
+			int contentLength = st.getCharCount();
+			if (end == -1) end = contentLength;
+			start = Math.max(0, Math.min(start, contentLength));
+			end = Math.max(0, Math.min(end, contentLength));
+			if (start > end) {
+				int temp = start;
+				start = end;
+				end = temp;
+			}
+			int count = e.count;
+			switch (e.type) {
+				case ACC.TEXT_BOUNDARY_ALL:
+					//nothing to do
+					break;
+				case ACC.TEXT_BOUNDARY_CHAR: {
+					int newCount = 0;
+					if (count > 0) {
+						while (count-- > 0) {
+							int newEnd = st.getWordNext(end, SWT.MOVEMENT_CLUSTER);
+							if (newEnd == contentLength) break;
+							if (newEnd == end) break;
+							end = newEnd;
+							newCount++;
+						}
+						start = end;
+						end = st.getWordNext(end, SWT.MOVEMENT_CLUSTER);
+					} else {
+						while (count++ < 0) {
+							int newStart = st.getWordPrevious(start, SWT.MOVEMENT_CLUSTER);
+							if (newStart == start) break;
+							start = newStart;
+							newCount--;
+						}
+						end = st.getWordNext(start, SWT.MOVEMENT_CLUSTER);
+					}
+					count = newCount;
+					break;
+				}
+				case ACC.TEXT_BOUNDARY_WORD: {
+					int newCount = 0;
+					if (count > 0) {
+						while (count-- > 0) { 
+							int newEnd = st.getWordNext(end, SWT.MOVEMENT_WORD_START, true);
+							if (newEnd == end) break;
+							newCount++;
+							end = newEnd;
+						}
+						start = end;
+						end = st.getWordNext(start, SWT.MOVEMENT_WORD_END, true);
+					} else {
+						if (st.getWordPrevious(Math.min(start + 1, contentLength), SWT.MOVEMENT_WORD_START, true) == start) {
+							//start is a word start already
+							count++;
+						}
+						while (count <= 0) {
+							int newStart = st.getWordPrevious(start, SWT.MOVEMENT_WORD_START, true);
+							if (newStart == start) break;
+							count++;
+							start = newStart;
+							if (count != 0) newCount--;
+						}
+						if (count <= 0 && start == 0) {
+							end = start;
+						} else {
+							end = st.getWordNext(start, SWT.MOVEMENT_WORD_END, true);
+						}
+					}
+					count = newCount;
+					break;
+				}
+				case ACC.TEXT_BOUNDARY_LINE:
+					//TODO implement line
+				case ACC.TEXT_BOUNDARY_PARAGRAPH:
+				case ACC.TEXT_BOUNDARY_SENTENCE: {
+					int offset = count > 0 ? end : start;
+					int lineIndex = st.getLineAtOffset(offset) + count;
+					lineIndex = Math.max(0, Math.min(lineIndex, st.getLineCount() - 1));
+					start = st.getOffsetAtLine(lineIndex);
+					String line = st.getLine(lineIndex);
+					end = start + line.length();
+					count = lineIndex - st.getLineAtOffset(offset);
+					break;
+				}
+			}
+			e.start = start;
+			e.end = end;
+			e.count = count;
+			e.result = st.content.getTextRange(start, end - start);
+		}
+		public void getVisibleRanges(AccessibleTextEvent e) {
+			e.ranges = getRanges(leftMargin, topMargin, clientAreaWidth - rightMargin, clientAreaHeight - bottomMargin);
+			if (e.ranges.length > 0) {
+				e.start = e.ranges[0];
+				e.end = e.ranges[e.ranges.length - 1];
+			}
+		}
+		public void scrollText(AccessibleTextEvent e) {
+			StyledText st = StyledText.this;
+			int topPixel = getTopPixel(), horizontalPixel = st.getHorizontalPixel();
+			switch (e.type) {
+				case ACC.SCROLL_TYPE_ANYWHERE:
+				case ACC.SCROLL_TYPE_TOP_LEFT:
+				case ACC.SCROLL_TYPE_LEFT_EDGE:
+				case ACC.SCROLL_TYPE_TOP_EDGE: {
+					Rectangle rect = st.getBoundsAtOffset(e.start);
+					if (e.type != ACC.SCROLL_TYPE_TOP_EDGE) {
+						horizontalPixel = horizontalPixel + rect.x - st.leftMargin;
+					}
+					if (e.type != ACC.SCROLL_TYPE_LEFT_EDGE) {
+						topPixel = topPixel + rect.y - st.topMargin;
+					}
+					break;
+				}
+				case ACC.SCROLL_TYPE_BOTTOM_RIGHT:
+				case ACC.SCROLL_TYPE_BOTTOM_EDGE:
+				case ACC.SCROLL_TYPE_RIGHT_EDGE: {
+					Rectangle rect = st.getBoundsAtOffset(e.end - 1);
+					if (e.type != ACC.SCROLL_TYPE_BOTTOM_EDGE) {
+						horizontalPixel = horizontalPixel - st.clientAreaWidth + rect.x + rect.width + st.rightMargin;
+					}
+					if (e.type != ACC.SCROLL_TYPE_RIGHT_EDGE) {
+						topPixel = topPixel - st.clientAreaHeight + rect.y +rect.height + st.bottomMargin;
+					}
+					break;
+				}
+				case ACC.SCROLL_TYPE_POINT: {
+					Point point = new Point(e.x, e.y);
+					Display display = st.getDisplay();
+					point = display.map(null, st, point);
+					Rectangle rect = st.getBoundsAtOffset(e.start);
+					topPixel = topPixel - point.y + rect.y;
+					horizontalPixel = horizontalPixel - point.x + rect.x;
+					break;
+				}
+			}
+			st.setTopPixel(topPixel);
+			st.setHorizontalPixel(horizontalPixel);
+			e.result = ACC.OK;
+		}
+	});
+	accessible.addAccessibleAttributeListener(new AccessibleAttributeAdapter() {
+		public void getAttributes(AccessibleAttributeEvent e) {
+			StyledText st = StyledText.this;
+			e.leftMargin = st.getLeftMargin();
+			e.topMargin = st.getTopMargin();
+			e.rightMargin = st.getRightMargin();
+			e.bottomMargin = st.getBottomMargin();
+			e.tabStops = st.getTabStops();
+			e.justify = st.getJustify();
+			e.alignment = st.getAlignment();
+			e.indent = st.getIndent(); 
+		}
+		public void getTextAttributes(AccessibleTextAttributeEvent e) {
+			StyledText st = StyledText.this;
+			int contentLength = st.getCharCount();
+			if (!isListening(LineGetStyle) && st.renderer.styleCount == 0) {
+				e.start = 0;
+				e.end = contentLength;
+				e.textStyle = new TextStyle(st.getFont(), st.foreground, st.background);
+				return;
+			}
+			int offset = Math.max(0, Math.min(e.offset, contentLength - 1));
+			int lineIndex = st.getLineAtOffset(offset);
+			int lineOffset = st.getOffsetAtLine(lineIndex);
+			int lineCount = st.getLineCount();
+			offset = offset - lineOffset;
+			
+			TextLayout layout = st.renderer.getTextLayout(lineIndex);
+			int lineLength = layout.getText().length();
+			if (lineLength > 0) {
+				e.textStyle = layout.getStyle(Math.max(0, Math.min(offset, lineLength - 1)));
+			}
+			
+			// If no override info available, use defaults. Don't supply default colors, though.
+			if (e.textStyle == null) {
+				e.textStyle = new TextStyle(st.getFont(), st.foreground, st.background);
+			} else {
+				if (e.textStyle.foreground == null || e.textStyle.background == null || e.textStyle.font == null) {
+					TextStyle textStyle = new TextStyle(e.textStyle);
+					if (textStyle.foreground == null) textStyle.foreground = st.foreground;
+					if (textStyle.background == null) textStyle.background = st.background;
+					if (textStyle.font == null) textStyle.font = st.getFont();
+					e.textStyle = textStyle;
+				}
+			}
+			
+			//offset at line delimiter case
+			if (offset >= lineLength) {
+				e.start = lineOffset + lineLength;
+				if (lineIndex + 1 < lineCount) {
+					e.end = st.getOffsetAtLine(lineIndex + 1);
+				} else  {
+					e.end = contentLength;
+				}
+				return;
+			}
+			
+			int[] ranges = layout.getRanges();
+			st.renderer.disposeTextLayout(layout);
+			int index = 0;
+			int end = 0;
+			while (index < ranges.length) {
+				int styleStart = ranges[index++];
+				int styleEnd = ranges[index++];
+				if (styleStart <= offset && offset <= styleEnd) {
+					e.start = lineOffset + styleStart;
+					e.end = lineOffset + styleEnd + 1;
+					return;
+				}
+				if (styleStart > offset) {
+					e.start = lineOffset + end;
+					e.end = lineOffset + styleStart;
+					return;
+				}
+				end = styleEnd + 1;
+			}
+			if (index == ranges.length) {
+				e.start = lineOffset + end;
+				if (lineIndex + 1 < lineCount) {
+					e.end = st.getOffsetAtLine(lineIndex + 1);
+				} else  {
+					e.end = contentLength;
+				}
+			}
+		}
 	});
 	accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
 		public void getRole(AccessibleControlEvent e) {
@@ -6251,6 +6781,8 @@ void initializeAccessible() {
 			if (isFocusControl()) state |= ACC.STATE_FOCUSED;
 			if (!isVisible()) state |= ACC.STATE_INVISIBLE;
 			if (!getEditable()) state |= ACC.STATE_READONLY;
+			if (isSingleLine()) state |= ACC.STATE_SINGLELINE;
+			else state |= ACC.STATE_MULTILINE;
 			e.detail = state;
 		}
 		public void getValue(AccessibleControlEvent e) {
@@ -6267,13 +6799,16 @@ void initializeAccessible() {
  * Return the Label immediately preceding the receiver in the z-order, 
  * or null if none. 
  */
-Label getAssociatedLabel () {
+String getAssociatedLabel () {
 	Control[] siblings = getParent ().getChildren ();
 	for (int i = 0; i < siblings.length; i++) {
 		if (siblings [i] == StyledText.this) {
-			if (i > 0 && siblings [i-1] instanceof Label) {
-				return (Label) siblings [i-1];
+			if (i > 0) {
+				Control sibling = siblings [i-1];
+				if (sibling instanceof Label) return ((Label) sibling).getText();
+				if (sibling instanceof CLabel) return ((CLabel) sibling).getText();
 			}
+			break;
 		}
 	}
 	return null;
@@ -6849,7 +7384,7 @@ void redrawLines(int startLine, int lineCount, boolean bottomChanged) {
 		startLine = partialTopIndex;
 	}
 	if (endLine > partialBottomIndex) {
-		endLine = partialBottomIndex;;
+		endLine = partialBottomIndex;
 	}
 	int redrawTop = getLinePixel(startLine);
 	int redrawBottom = getLinePixel(endLine + 1);
@@ -7263,6 +7798,7 @@ void resetCache(int firstLine, int count) {
 void resetSelection() {
 	selection.x = selection.y = caretOffset;
 	selectionAnchor = -1;
+	sendAccessibleTextCaretMoved();
 }
 
 public void scroll(int destX, int destY, int x, int y, int width, int height, boolean all) {
@@ -7291,9 +7827,7 @@ public void scroll(int destX, int destY, int x, int y, int width, int height, bo
  *	false=the widget was not scrolled, the given offset is not valid.
  */
 boolean scrollHorizontal(int pixels, boolean adjustScrollBar) {
-	if (pixels == 0) {
-		return false;
-	}
+	if (pixels == 0) return false;
 	if (wordWrap) return false;
 	ScrollBar horizontalBar = getHorizontalBar();
 	if (horizontalBar != null && adjustScrollBar) {
@@ -7399,6 +7933,12 @@ void scrollText(int srcY, int destY) {
 		super.redraw(leftMargin, clientAreaHeight - bottomMargin, scrollWidth, bottomMargin, false);
 	}
 }
+void sendAccessibleTextCaretMoved() {
+	if (caretOffset != accCaretOffset) {
+		accCaretOffset = caretOffset;
+		getAccessible().textCaretMoved(caretOffset);
+	}
+}
 void sendAccessibleTextChanged(int start, int newCharCount, int replaceCharCount) {
 	Accessible accessible = getAccessible();
 	if (replaceCharCount != 0) {
@@ -7470,6 +8010,7 @@ StyledTextEvent sendLineEvent(int eventType, int lineOffset, String line) {
 		event.text = line;
 		event.alignment = alignment;
 		event.indent = indent;
+		event.wrapIndent = wrapIndent;
 		event.justify = justify;
 		notifyListeners(eventType, event);
 	}
@@ -7836,7 +8377,6 @@ void setCaretLocation(Point location, int direction) {
 		} else {
 			caret.setLocation(location);
 		}
-		getAccessible().textCaretMoved(getCaretOffset());
 		if (direction != caretDirection) {
 			caretDirection = direction;
 			if (isDefaultCaret) {
@@ -7867,8 +8407,8 @@ void setCaretLocation(Point location, int direction) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_INVALID_ARGUMENT when either the start or the end of the selection range is inside a 
- * multi byte line delimiter (and thus neither clearly in front of or after the line delimiter)
+ *   <li>ERROR_INVALID_ARGUMENT when the offset is inside a multi byte line 
+ *   delimiter (and thus neither clearly in front of or after the line delimiter)
  * </ul>
  */
 public void setCaretOffset(int offset) {
@@ -8517,6 +9057,113 @@ public void setLineSpacing(int lineSpacing) {
 	setCaretLocation();
 	super.redraw();
 }
+/**
+ * Sets the tab stops of the specified lines.
+ * <p>
+ * Should not be called if a <code>LineStyleListener</code> has been set since the listener 
+ * maintains the line attributes.
+ * </p><p>
+ * All line attributes are maintained relative to the line text, not the 
+ * line index that is specified in this method call.
+ * During text changes, when entire lines are inserted or removed, the line 
+ * attributes that are associated with the lines after the change 
+ * will "move" with their respective text. An entire line is defined as 
+ * extending from the first character on a line to the last and including the 
+ * line delimiter. 
+ * </p><p>
+ * When two lines are joined by deleting a line delimiter, the top line 
+ * attributes take precedence and the attributes of the bottom line are deleted. 
+ * For all other text changes line attributes will remain unchanged.
+ * </p>
+ *  
+ * @param startLine first line the justify is applied to, 0 based
+ * @param lineCount number of lines the justify applies to.
+ * @param tabStops tab stops
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_INVALID_ARGUMENT when the specified line range is invalid</li>
+ * </ul>
+ * @see #setTabStops(int[])
+ * @since 3.6
+ */
+public void setLineTabStops(int startLine, int lineCount, int[] tabStops) {
+	checkWidget();
+	if (isListening(LineGetStyle)) return;
+	if (startLine < 0 || startLine + lineCount > content.getLineCount()) {
+		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	}
+	if (tabStops != null) {
+		int pos = 0;
+		int[] newTabs = new int[tabStops.length];
+		for (int i = 0; i < tabStops.length; i++) {
+			if (tabStops[i] < pos) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			newTabs[i] = pos = tabStops[i];
+		}
+		renderer.setLineTabStops(startLine, lineCount, newTabs);
+	} else {
+		renderer.setLineTabStops(startLine, lineCount, null);
+	}
+	resetCache(startLine, lineCount);
+	redrawLines(startLine, lineCount, false);
+	int caretLine = getCaretLine();
+	if (startLine <= caretLine && caretLine < startLine + lineCount) {
+		setCaretLocation();
+	}
+}
+/**
+ * Sets the wrap indent of the specified lines.
+ * <p>
+ * Should not be called if a <code>LineStyleListener</code> has been set since the listener 
+ * maintains the line attributes.
+ * </p><p>
+ * All line attributes are maintained relative to the line text, not the 
+ * line index that is specified in this method call.
+ * During text changes, when entire lines are inserted or removed, the line 
+ * attributes that are associated with the lines after the change 
+ * will "move" with their respective text. An entire line is defined as 
+ * extending from the first character on a line to the last and including the 
+ * line delimiter. 
+ * </p><p>
+ * When two lines are joined by deleting a line delimiter, the top line 
+ * attributes take precedence and the attributes of the bottom line are deleted. 
+ * For all other text changes line attributes will remain unchanged.
+ * </p>
+ *
+ * @param startLine first line the wrap indent is applied to, 0 based
+ * @param lineCount number of lines the wrap indent applies to.
+ * @param wrapIndent line wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_INVALID_ARGUMENT when the specified line range is invalid</li>
+ * </ul>
+ * @see #setWrapIndent(int)
+ * @since 3.6
+ */
+public void setLineWrapIndent(int startLine, int lineCount, int wrapIndent) {
+	checkWidget();
+	if (isListening(LineGetStyle)) return;
+	if (startLine < 0 || startLine + lineCount > content.getLineCount()) {
+		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	}
+	int oldBottom = getLinePixel(startLine + lineCount);
+	renderer.setLineWrapIndent(startLine, lineCount, wrapIndent);
+	resetCache(startLine, lineCount);
+	int newBottom = getLinePixel(startLine + lineCount);
+	redrawLines(startLine, lineCount, oldBottom != newBottom);
+	int caretLine = getCaretLine();
+	if (startLine <= caretLine && caretLine < startLine + lineCount) {
+		setCaretLocation();
+	}
+}
+
 /** 
  * Sets the color of the margins.
  * 
@@ -8842,6 +9489,7 @@ void setSelection(int start, int length, boolean sendEvent, boolean doBlock) {
 				setCaretOffset(end, PREVIOUS_OFFSET_TRAILING);
 			}
 			internalRedrawRange(selection.x, selection.y - selection.x);
+			sendAccessibleTextCaretMoved();
 		}
 	}
 }
@@ -9089,7 +9737,9 @@ void setStyleRanges(int start, int length, int[] ranges, StyleRange[] styles, bo
 			super.redraw(0, top, clientAreaWidth, bottom - top, false);		
 		}
 	}
+	int oldColumnX = columnX;
 	setCaretLocation();
+	columnX = oldColumnX;
 	doMouseLinkCursor();
 }
 /** 
@@ -9134,6 +9784,8 @@ public void setStyleRanges(StyleRange[] ranges) {
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
+ * 
+ * @see #setTabStops(int[])
  */
 public void setTabs(int tabs) {
 	checkWidget();	
@@ -9143,6 +9795,44 @@ public void setTabs(int tabs) {
 	setCaretLocation();
 	super.redraw();
 }
+
+/**
+ * Sets the receiver's tab list. Each value in the tab list specifies
+ * the space in pixels from the origin of the document to the respective
+ * tab stop.  The last tab stop width is repeated continuously.
+ * 
+ * @param tabs the new tab list (or null)
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if a tab stop is negavite or less than the previous stop in the list</li>
+ * </ul>
+ * 
+ * @see StyledText#getTabStops()
+ * 
+ * @since 3.6
+ */
+public void setTabStops(int [] tabs) {
+	checkWidget();
+	if (tabs != null) {
+		int pos = 0;
+		int[] newTabs = new int[tabs.length];
+		for (int i = 0; i < tabs.length; i++) {
+			if (tabs[i] < pos) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+			newTabs[i] = pos = tabs[i];
+		}
+		this.tabs = newTabs;
+	} else {
+		this.tabs = null;
+	}
+	resetCache(0, content.getLineCount());
+	setCaretLocation();
+	super.redraw();
+}
+
 /** 
  * Sets the widget content. 
  * If the widget has the SWT.SINGLE style and "text" contains more than 
@@ -9337,6 +10027,33 @@ public void setWordWrap(boolean wrap) {
 	setCaretLocation();
 	super.redraw();
 }
+/**
+ * Sets the wrap line indentation of the widget.
+ * <p>
+ * It is the amount of blank space, in pixels, at the beginning of each wrapped line.
+ * When a line wraps in several lines all the lines but the first one is indented
+ * by this amount. 
+ * </p>
+ * 
+ * @param wrapIndent the new wrap indent
+ *  
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @see #setLineWrapIndent(int, int, int)
+ *  
+ * @since 3.6
+ */
+public void setWrapIndent(int wrapIndent) {
+	checkWidget();
+	if (this.wrapIndent == wrapIndent || wrapIndent < 0) return;
+	this.wrapIndent = wrapIndent;
+	resetCache(0, content.getLineCount());
+	setCaretLocation();
+	super.redraw();	
+}
 boolean showLocation(Rectangle rect, boolean scrollPage) {
 	boolean scrolled = false;
 	if (rect.y < topMargin) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextEvent.java
index 84e3331..98ee4ef 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,13 +22,16 @@ class StyledTextEvent extends Event {
 	StyleRange[] styles;
 	int alignment;
 	int indent;
+	int wrapIndent;
 	boolean justify;
 	Bullet bullet;
 	int bulletIndex;
+	int[] tabStops;
 	// used by LineBackgroundEvent
 	Color lineBackground;
 	// used by BidiSegmentEvent
 	int[] segments;	
+	char[] segmentsChars;
 	// used by TextChangedEvent
 	int replaceCharCount; 	
 	int newCharCount; 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java
index 166e911..d9f026b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@ public void handleEvent(Event e) {
 			BidiSegmentEvent segmentEvent = new BidiSegmentEvent((StyledTextEvent) e);
 			((BidiSegmentListener) eventListener).lineGetSegments(segmentEvent);
 			((StyledTextEvent) e).segments = segmentEvent.segments;
+			((StyledTextEvent) e).segmentsChars = segmentEvent.segmentsChars;
 			break;		
 		case StyledText.LineGetStyle:
 			LineStyleEvent lineStyleEvent = new LineStyleEvent((StyledTextEvent) e);
@@ -49,9 +50,11 @@ public void handleEvent(Event e) {
 			((StyledTextEvent) e).styles = lineStyleEvent.styles;
 			((StyledTextEvent) e).alignment = lineStyleEvent.alignment;
 			((StyledTextEvent) e).indent = lineStyleEvent.indent;
+			((StyledTextEvent) e).wrapIndent = lineStyleEvent.wrapIndent;
 			((StyledTextEvent) e).justify = lineStyleEvent.justify;
 			((StyledTextEvent) e).bullet = lineStyleEvent.bullet;
 			((StyledTextEvent) e).bulletIndex = lineStyleEvent.bulletIndex;
+			((StyledTextEvent) e).tabStops = lineStyleEvent.tabStops;
 			break;
 		case StyledText.PaintObject:
 			PaintObjectEvent paintObjectEvent = new PaintObjectEvent((StyledTextEvent) e);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java
index 86dcf4d..f1e2fba 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextRenderer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -67,14 +67,20 @@ class StyledTextRenderer {
 	final static int INDENT = 1 << 2;
 	final static int JUSTIFY = 1 << 3;
 	final static int SEGMENTS = 1 << 5;
+	final static int TABSTOPS = 1 << 6;
+	final static int WRAP_INDENT = 1 << 7;
+	final static int SEGMENT_CHARS = 1 << 8;
 	
 	static class LineInfo {
 		int flags;
 		Color background;
 		int alignment;
 		int indent;
+		int wrapIndent;
 		boolean justify;
 		int[] segments;
+		char[] segmentsChars;
+		int[] tabStops;
 
 		public LineInfo() {
 		}
@@ -84,8 +90,11 @@ class StyledTextRenderer {
 				background = info.background;
 				alignment = info.alignment;
 				indent = info.indent;
+				wrapIndent = info.wrapIndent;
 				justify = info.justify;
 				segments = info.segments;
+				segmentsChars = info.segmentsChars;
+				tabStops = info.tabStops;
 			}
 		}
 	}
@@ -267,7 +276,7 @@ void clearLineStyle(int startLine, int count) {
 	for (int i = startLine; i < startLine + count; i++) {
 		LineInfo info = lines[i];
 		if (info != null) {
-			info.flags &= ~(ALIGNMENT | INDENT | JUSTIFY);
+			info.flags &= ~(ALIGNMENT | INDENT | WRAP_INDENT | JUSTIFY | TABSTOPS);
 			if (info.flags == 0) lines[i] = null;
 		}
 	}
@@ -333,7 +342,7 @@ void drawBullet(Bullet bullet, GC gc, int paintX, int paintY, int index, int lin
 	int type = bullet.type & (ST.BULLET_DOT|ST.BULLET_NUMBER|ST.BULLET_LETTER_LOWER|ST.BULLET_LETTER_UPPER);
 	switch (type) {
 		case ST.BULLET_DOT: string = "\u2022"; break;
-		case ST.BULLET_NUMBER: string = String.valueOf(index); break;
+		case ST.BULLET_NUMBER: string = String.valueOf(index + 1); break;
 		case ST.BULLET_LETTER_LOWER: string = String.valueOf((char) (index % 26 + 97)); break;
 		case ST.BULLET_LETTER_UPPER: string = String.valueOf((char) (index % 26 + 65)); break;
 	}
@@ -428,7 +437,7 @@ int drawLine(int lineIndex, int paintX, int paintY, GC gc, Color widgetBackgroun
 		if (styles[i].metrics != null) {
 			if (ranges == null) ranges = layout.getRanges();
 			int start = ranges[i << 1];
-			int length = ranges[(i << 1) + 1] - start;
+			int length = ranges[(i << 1) + 1] - start + 1;
 			Point point = layout.getLocation(start, false);
 			FontMetrics metrics = layout.getLineMetrics(layout.getLineIndex(start));
 			StyleRange style = (StyleRange)((StyleRange)styles[i]).clone();
@@ -568,6 +577,14 @@ int getLineIndent(int index, int defaultIndent) {
 	}
 	return defaultIndent;
 }
+int getLineWrapIndent(int index, int defaultWrapIndent) {
+	if (lines == null) return defaultWrapIndent;
+	LineInfo info = lines[index];
+	if (info != null && (info.flags & WRAP_INDENT) != 0) {
+		return info.wrapIndent;
+	}
+	return defaultWrapIndent;
+}
 boolean getLineJustify(int index, boolean defaultJustify) {
 	if (lines == null) return defaultJustify;
 	LineInfo info = lines[index];
@@ -576,13 +593,13 @@ boolean getLineJustify(int index, boolean defaultJustify) {
 	}
 	return defaultJustify;
 }
-int[] getLineSegments(int index, int[] defaultSegments) {
-	if (lines == null) return defaultSegments;
+int[] getLineTabStops(int index, int[] defaultTabStops) {
+	if (lines == null) return defaultTabStops;
 	LineInfo info = lines[index];
-	if (info != null && (info.flags & SEGMENTS) != 0) {
-		return info.segments;
+	if (info != null && (info.flags & TABSTOPS) != 0) {
+		return info.tabStops;
 	}
-	return defaultSegments;
+	return defaultTabStops;
 }
 int getRangeIndex(int offset, int low, int high) {
 	if (styleCount == 0) return 0;
@@ -756,28 +773,39 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
 	String line = content.getLine(lineIndex);
 	int lineOffset = content.getOffsetAtLine(lineIndex);
 	int[] segments = null;
+	char[] segmentChars = null;
 	int indent = 0;
+	int wrapIndent = 0;
 	int alignment = SWT.LEFT;
 	boolean justify = false;
+	int[] tabs = {tabWidth};
 	Bullet bullet = null;
 	int[] ranges = null;
 	StyleRange[] styles = null;
 	int rangeStart = 0, styleCount = 0;
 	StyledTextEvent event = null;
 	if (styledText != null) {
+		event = styledText.getBidiSegments(lineOffset, line);
+		if (event != null) {
+			segments = event.segments;
+			segmentChars = event.segmentsChars;
+		}
 		event = styledText.getLineStyleData(lineOffset, line);
-		segments = styledText.getBidiSegments(lineOffset, line);
 		indent = styledText.indent;
+		wrapIndent = styledText.wrapIndent;
 		alignment = styledText.alignment;
 		justify = styledText.justify;
+		if (styledText.tabs != null) tabs = styledText.tabs;
 	}
 	if (event != null) {
 		indent = event.indent;
+		wrapIndent = event.wrapIndent;
 		alignment = event.alignment;
 		justify = event.justify;
 		bullet = event.bullet;
 		ranges = event.ranges;
 		styles = event.styles;
+		if (event.tabStops != null) tabs = event.tabStops;
 		if (styles != null) {
 			styleCount = styles.length;
 			if (styledText.isFixedLineHeight()) {
@@ -805,9 +833,12 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
 			LineInfo info = lines[lineIndex];
 			if (info != null) {
 				if ((info.flags & INDENT) != 0) indent = info.indent;
+				if ((info.flags & WRAP_INDENT) != 0) wrapIndent = info.wrapIndent;
 				if ((info.flags & ALIGNMENT) != 0) alignment = info.alignment;
 				if ((info.flags & JUSTIFY) != 0) justify = info.justify;
 				if ((info.flags & SEGMENTS) != 0) segments = info.segments;
+				if ((info.flags & SEGMENT_CHARS) != 0) segmentChars = info.segmentsChars;
+				if ((info.flags & TABSTOPS) != 0) tabs = info.tabStops;
 			}
 		}
 		if (bulletsIndices != null) {
@@ -842,10 +873,12 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
 	layout.setText(line);
 	layout.setOrientation(orientation);
 	layout.setSegments(segments);
+	layout.setSegmentsChars(segmentChars);
 	layout.setWidth(width);
 	layout.setSpacing(lineSpacing);
-	layout.setTabs(new int[]{tabWidth});
+	layout.setTabs(tabs);
 	layout.setIndent(indent);
+	layout.setWrapIndent(wrapIndent);
 	layout.setAlignment(alignment);
 	layout.setJustify(justify);
 	
@@ -1135,6 +1168,16 @@ void setLineIndent(int startLine, int count, int indent) {
 		lines[i].indent = indent;
 	}
 }
+void setLineWrapIndent(int startLine, int count, int wrapIndent) {
+	if (lines == null) lines = new LineInfo[lineCount];
+	for (int i = startLine; i < startLine + count; i++) {
+		if (lines[i] == null) {
+			lines[i] = new LineInfo();
+		}
+		lines[i].flags |= WRAP_INDENT;
+		lines[i].wrapIndent = wrapIndent;
+	}
+}
 void setLineJustify(int startLine, int count, boolean justify) {
 	if (lines == null) lines = new LineInfo[lineCount];
 	for (int i = startLine; i < startLine + count; i++) {
@@ -1155,6 +1198,26 @@ void setLineSegments(int startLine, int count, int[] segments) {
 		lines[i].segments = segments;
 	}
 }
+void setLineSegmentChars(int startLine, int count, char[] segmentChars) {
+	if (lines == null) lines = new LineInfo[lineCount];
+	for (int i = startLine; i < startLine + count; i++) {
+		if (lines[i] == null) {
+			lines[i] = new LineInfo();
+		}
+		lines[i].flags |= SEGMENT_CHARS;
+		lines[i].segmentsChars = segmentChars;
+	}
+}
+void setLineTabStops(int startLine, int count, int[] tabStops) {
+	if (lines == null) lines = new LineInfo[lineCount];
+	for (int i = startLine; i < startLine + count; i++) {
+		if (lines[i] == null) {
+			lines[i] = new LineInfo();
+		}
+		lines[i].flags |= TABSTOPS;
+		lines[i].tabStops = tabStops;
+	}
+}
 void setStyleRanges (int[] newRanges, StyleRange[] newStyles) {
 	if (newStyles == null) {
 		stylesSetCount = styleCount = 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
index 18d4b6d..20522f5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java	
@@ -156,7 +156,10 @@ protected void layout(Composite composite, boolean flushCache) {
 			top = true;
 			int trim = computeTrim(center);
 			int w = rect.width - 2*form.marginWidth - 2*form.highlight - trim;
-			centerSize = computeChildSize(center, w, SWT.DEFAULT, false);
+			Point size = computeChildSize(center, w, SWT.DEFAULT, false);
+			if (size.x < centerSize.x) {
+				centerSize = size;
+			}
 			center.setBounds(rect.x + rect.width - form.marginWidth - form.highlight - centerSize.x, y, centerSize.x, centerSize.y);
 			y += centerSize.y + form.verticalSpacing;
 		}		
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java
index 414c209..7aa900b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DragSource.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,6 +110,7 @@ public class DragSource extends Widget {
 	DragSourceEffect dragEffect;
 
 	static final String DEFAULT_DRAG_SOURCE_EFFECT = "DEFAULT_DRAG_SOURCE_EFFECT"; //$NON-NLS-1$
+	static final String DRAG_STARTED = "org.eclipse.swt.internal.dragStarted";	//$NON-NLS-1$
 	static Callback DragSendDataProc;
 	
 	static {
@@ -283,30 +284,8 @@ void drag(Event dragEvent) {
 		Transfer transfer = transferAgents[i];
 		if (transfer != null) {
 			int[] types = transfer.getTypeIds();
-			if (transfer instanceof FileTransfer) {
-				TransferData transferData = new TransferData();
-				transferData.type = types[0];
-				DNDEvent event2 = new DNDEvent();
-				event2.widget = this;
-				event2.time = (int)System.currentTimeMillis(); 
-				event2.dataType = transferData; 
-				notifyListeners(DND.DragSetData, event2);
-				if (event2.data != null) {
-					for (int j = 0; j < types.length; j++) {
-						transferData.type = types[j];
-						transfer.javaToNative(event2.data, transferData);
-						if (transferData.result == OS.noErr) {
-							for (int k = 0; k < transferData.data.length; k++) {
-								byte[] datum = transferData.data[k];
-								OS.AddDragItemFlavor(theDrag[0], 1 + k, types[j], datum, datum.length, 0);
-							}
-						}
-					}
-				}
-			} else {
-				for (int j = 0; j < types.length; j++) {
-					OS.AddDragItemFlavor(theDrag[0], 1, types[j], null, 0, 0);	
-				}	
+			for (int j = 0; j < types.length; j++) {
+				OS.AddDragItemFlavor(theDrag[0], 1, types[j], null, 0, 0);
 			}
 		}
 	}
@@ -349,7 +328,9 @@ void drag(Event dragEvent) {
 		theEvent.what = (short)OS.osEvt;
 		theEvent.where_h = pt.h;
 		theEvent.where_v = pt.v;	
+		control.setData(DRAG_STARTED, new Object());
 		int result = OS.TrackDrag(theDrag[0], theEvent, theRegion);
+		control.setData(DRAG_STARTED, null);
 		int operation = DND.DROP_NONE;
 		if (result == OS.noErr) { 
 			int[] outAction = new int[1];
@@ -390,11 +371,18 @@ int dragSendDataProc(int theType, int dragSendRefCon, int theItemRef, int theDra
 	if (transfer == null) return OS.badDragFlavorErr;
 	transfer.javaToNative(event.data, transferData);
 	if (transferData.result != OS.noErr) return transferData.result;
-	// Except for FileTransfer (see #drag), only one item can be transferred
-	// in a Drag operation
 	byte[] datum = transferData.data[0];
 	if (datum == null) return OS.cantGetFlavorErr;
-	return OS.SetDragItemFlavorData(theDrag, theItemRef, theType, datum, datum.length, 0);
+	int rc = OS.SetDragItemFlavorData(theDrag, theItemRef, theType, datum, datum.length, 0);
+	if (rc == OS.noErr && transfer instanceof FileTransfer) {
+		for (int i = 1; i < transferData.data.length; i++) {
+			datum = transferData.data[i];
+			if (datum == null) return OS.cantGetFlavorErr;
+			rc = OS.AddDragItemFlavor(theDrag, 1 + i, theType, datum, datum.length, 0);
+			if (rc != OS.noErr) break;
+		}
+	}
+	return rc;
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java
index e4669a8..af52555 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java	
@@ -99,7 +99,7 @@ public class DropTarget extends Widget {
 	
 	static final String DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$
 	static final int DRAGOVER_HYSTERESIS = 50;
-	
+	static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive";	 //$NON-NLS-1$
 	static Callback DragTrackingHandler;
 	static Callback DragReceiveHandler;
 	
@@ -279,10 +279,17 @@ static DropTarget FindDropTarget(int theWindow, int theDrag) {
 	OS.SetEventParameter (event[0], OS.kEventParamWindowMouseLocation, OS.typeHIPoint, CGPoint.sizeof, inPoint);
 	OS.HIViewGetViewForMouseEvent (theRoot [0], event [0], theControl);
 	OS.ReleaseEvent(event[0]);
-	if (!OS.IsControlEnabled(theControl[0])) return null;				
-	Widget widget = display.findWidget(theControl[0]);
-	if (widget == null) return null;
-	return (DropTarget)widget.getData(DND.DROP_TARGET_KEY);
+	if (!OS.IsControlEnabled(theControl[0])) return null;
+	DropTarget dropTarget = null;
+	do {
+		Widget widget = display.findWidget(theControl[0]);
+		if (widget != null) {
+			dropTarget = (DropTarget) widget.getData(DND.DROP_TARGET_KEY);
+			if (dropTarget != null) break;
+		}
+		OS.GetSuperControl (theControl [0], theControl);
+	} while (theControl [0] != 0);
+	return dropTarget;
 }
 /**
  * Adds the listener to the collection of listeners who will
@@ -449,7 +456,7 @@ int dragTrackingHandler(int message, int theWindow, int handlerRefCon, int theDr
 	}
 	
 	DNDEvent event = new DNDEvent();
-	if (!setEventData(theDrag, event)) {
+	if (!setEventData(theDrag, event) || ((Boolean)control.getData(IS_ACTIVE)).booleanValue() == false)  {
 		keyOperation = -1;
 		OS.SetThemeCursor(OS.kThemeNotAllowedCursor);
 		return OS.dragNotAcceptedErr;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/HTMLTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/HTMLTransfer.java
index f3e21ff..34b9ccf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/HTMLTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/HTMLTransfer.java	
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.dnd;
  
+import org.eclipse.swt.internal.carbon.CFRange;
 import org.eclipse.swt.internal.carbon.OS;
 
 /**
@@ -58,11 +59,26 @@ public void javaToNative (Object object, TransferData transferData){
 		DND.error(DND.ERROR_INVALID_DATA);
 	}
 	String string = (String)object;
-	int count = string.length();
-	char[] chars = new char[count];
-	string.getChars(0, count, chars, 0);
-	byte[] buffer = new byte[chars.length * 2];
-	OS.memmove(buffer, chars, buffer.length);
+	char[] chars = new char[string.length()];
+	string.getChars (0, chars.length, chars, 0);
+	transferData.result = -1;
+
+	int encoding = OS.CFStringGetSystemEncoding();
+	int cfstring = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
+	if (cfstring == 0) return;
+	byte[] buffer = null;
+	try {
+		CFRange range = new CFRange();
+		range.length = chars.length;
+		int[] size = new int[1];
+		int numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', false, null, 0, size);
+		if (numChars == 0) return;
+		buffer = new byte[size[0]];
+		numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', false, buffer, size [0], size);
+		if (numChars == 0) return;
+	} finally {
+		OS.CFRelease(cfstring);
+	}
 	transferData.data = new byte[1][];
 	transferData.data[0] = buffer;
 	transferData.result = OS.noErr;
@@ -82,9 +98,20 @@ public Object nativeToJava(TransferData transferData){
 	if (!isSupportedType(transferData) || transferData.data == null) return null;
 	if (transferData.data.length == 0 || transferData.data[0].length == 0) return null;
 	byte[] buffer = transferData.data[0];
-	char[] chars = new char[(buffer.length + 1) / 2];
-	OS.memmove(chars, buffer, buffer.length);
-	return new String(chars);
+	int encoding = OS.CFStringGetSystemEncoding();
+	int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
+	if (cfstring == 0) return null;
+	try {
+		int length = OS.CFStringGetLength(cfstring);
+		if (length == 0) return null;
+		char[] chars = new char[length];
+		CFRange range = new CFRange();
+		range.length = length;
+		OS.CFStringGetCharacters(cfstring, range, chars);
+		return new String(chars);
+	} finally {
+		OS.CFRelease(cfstring);
+	}
 }
 
 protected int[] getTypeIds() {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TextTransfer.java
index f9c17e8..81414b1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TextTransfer.java	
@@ -25,15 +25,21 @@ import org.eclipse.swt.internal.carbon.OS;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
 
 	static TextTransfer _instance = new TextTransfer();
-	static final String UT16 = "ut16"; //$NON-NLS-1$
-	static final String UTF8 = "utf8"; //$NON-NLS-1$
-	static final int UT16ID = OS.kScrapFlavorTypeUTF16External;
-	static final int UTF8ID = ('u'<<24) + ('t'<<16) + ('f'<<8) + '8';
+	static final String UTXT = "utxt"; //$NON-NLS-1$
+	static final String TEXT = "TEXT"; //$NON-NLS-1$
+	static final int UTXTID = OS.kScrapFlavorTypeUnicode;
+	static final int TEXTID = OS.kScrapFlavorTypeText;
 
 TextTransfer() {}
 
@@ -66,9 +72,9 @@ public void javaToNative (Object object, TransferData transferData) {
 	transferData.result = -1;
 	
 	switch (transferData.type) {
-		case UTF8ID: 
-		case UT16ID: {
-			int encoding = transferData.type == UTF8ID ? OS.kCFStringEncodingUTF8 : OS.kCFStringEncodingUnicode;
+		case TEXTID: 
+		case UTXTID: {
+			int encoding = transferData.type == TEXTID ? OS.CFStringGetSystemEncoding(): OS.kCFStringEncodingUnicode;
 			int cfstring = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
 			if (cfstring == 0) return;
 			byte[] buffer = null;
@@ -76,10 +82,10 @@ public void javaToNative (Object object, TransferData transferData) {
 				CFRange range = new CFRange();
 				range.length = chars.length;
 				int[] size = new int[1];
-				int numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', true, null, 0, size);
+				int numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', false, null, 0, size);
 				if (numChars == 0) return;
 				buffer = new byte[size[0]];
-				numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', true, buffer, size [0], size);
+				numChars = OS.CFStringGetBytes(cfstring, range, encoding, (byte)'?', false, buffer, size [0], size);
 				if (numChars == 0) return;
 			} finally {
 				OS.CFRelease(cfstring);
@@ -106,10 +112,10 @@ public Object nativeToJava(TransferData transferData){
 	if (transferData.data.length == 0 || transferData.data[0].length == 0) return null;
 	byte[] buffer = transferData.data[0];
 	switch (transferData.type) {
-		case UTF8ID: 
-		case UT16ID: {
-			int encoding = transferData.type == UTF8ID ? OS.kCFStringEncodingUTF8 : OS.kCFStringEncodingUnicode;
-			int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
+		case TEXTID: 
+		case UTXTID: {
+			int encoding = transferData.type == TEXTID ? OS.CFStringGetSystemEncoding() : OS.kCFStringEncodingUnicode;
+			int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
 			if (cfstring == 0) return null;
 			try {
 				int length = OS.CFStringGetLength(cfstring);
@@ -128,11 +134,11 @@ public Object nativeToJava(TransferData transferData){
 }
 
 protected int[] getTypeIds() {
-	return new int[] {UT16ID, UTF8ID};
+	return new int[] {UTXTID, TEXTID};
 }
 
 protected String[] getTypeNames() {
-	return new String[] {UT16, UTF8};
+	return new String[] {UTXT, TEXT};
 }
 
 boolean checkText(Object object) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TransferData.java
index 8fddd9f..bd4dc37 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -50,6 +52,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public byte[][] data;
 	
@@ -65,6 +69,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int result;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java
index a9f6255..28bec96 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java	
@@ -170,7 +170,7 @@ public void clearContents(int clipboards) {
 	checkWidget();
 	if ((clipboards & DND.CLIPBOARD) == 0) return;
 	NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
-	pasteboard.declareTypes(NSMutableArray.arrayWithCapacity(0), null);
+	if (pasteboard != null) pasteboard.declareTypes(NSMutableArray.arrayWithCapacity(0), null);
 }
 
 /**
@@ -517,6 +517,7 @@ public TransferData[] getAvailableTypes(int clipboards) {
 	checkWidget();
 	if ((clipboards & DND.CLIPBOARD) == 0) return new TransferData[0];
 	NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+	if (pasteboard == null) return new TransferData[0];
 	NSArray types = pasteboard.types();
 	int count = (int)/*64*/types.count();
 	TransferData[] result = new TransferData[count];
@@ -546,6 +547,7 @@ public TransferData[] getAvailableTypes(int clipboards) {
 public String[] getAvailableTypeNames() {
 	checkWidget();
 	NSPasteboard pasteboard = NSPasteboard.generalPasteboard();
+	if (pasteboard == null) return new String[0];
 	NSArray types = pasteboard.types();
 	int count = (int)/*64*/types.count();
 	String[] result = new String[count];
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
index efecaca..28d0696 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -107,6 +107,9 @@ public class DragSource extends Widget {
 	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
 	static int /*long*/ proc2 = 0, proc3 = 0, proc4 = 0, proc5 = 0, proc6 = 0;
 	
+	NSString paths[];
+	boolean exist[];
+	
 	static {
 		String className = "SWTDragSourceDelegate";
 
@@ -309,21 +312,21 @@ public void addDragListener(DragSourceListener listener) {
 	addListener (DND.DragEnd, typedListener);
 }
 
-void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, NSPoint arg1, int /*long*/ arg2) {
+void dndCallSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, NSPoint arg1, int /*long*/ arg2) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
 	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
 	OS.objc_msgSendSuper(super_struct, sel, arg0, arg1, arg2);
 }
 
-void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+void dndCallSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
 	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
 	OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
 }
 
-int /*long*/ callSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
+int /*long*/ dndCallSuperObject(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
 	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -412,22 +415,40 @@ void dragOutlineViewStart(Event dragDetectEvent) {
 
 void draggedImage_beganAt(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
 	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		callSuper(id, sel, arg0, arg1);
+		dndCallSuper(id, sel, arg0, arg1);
 	}
 }
 
 void draggedImage_endedAt_operation(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, NSPoint arg1, int /*long*/ arg2) {
 	int swtOperation = osOpToOp(arg2);
-	Event event = new DNDEvent();
-	event.widget = this;
-	event.time = (int)System.currentTimeMillis();	
-	event.doit = swtOperation != DND.DROP_NONE;
-	event.detail = swtOperation; 
-	notifyListeners(DND.DragEnd, event);
-	dragImageFromListener = null;
-
-	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		callSuper(id, sel, arg0, arg1, arg2);
+	NSFileManager fileManager = NSFileManager.defaultManager();
+	if (paths != null) {
+		for (int i = 0; i < paths.length; i++) {
+			if (paths[i] != null && exist[i]) {
+				if (!fileManager.fileExistsAtPath(paths[i])) {
+					swtOperation &= ~DND.DROP_MOVE;
+					swtOperation |= DND.DROP_TARGET_MOVE;
+				}
+			}
+		}
+		paths = null;
+		exist = null;
+	}
+	OS.objc_msgSend(id, OS.sel_retain);
+	try {
+		Event event = new DNDEvent();
+		event.widget = this;
+		event.time = (int)System.currentTimeMillis();	
+		event.doit = swtOperation != DND.DROP_NONE;
+		event.detail = swtOperation; 
+		notifyListeners(DND.DragEnd, event);
+		dragImageFromListener = null;
+	
+		if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
+			dndCallSuper(id, sel, arg0, arg1, arg2);
+		}
+	} finally { 
+		OS.objc_msgSend(id, OS.sel_release);
 	}
 }
 
@@ -439,7 +460,7 @@ int /*long*/ dragImageForRowsWithIndexes_tableColumns_event_offset(int /*long*/
 		OS.memmove(arg3, point, NSPoint.sizeof);
 		return dragImageFromListener.handle.id;
 	} else {
-		return callSuperObject(id, sel, arg0, arg1, arg2, arg3);
+		return dndCallSuperObject(id, sel, arg0, arg1, arg2, arg3);
 	}
 }
 
@@ -821,6 +842,10 @@ DNDEvent startDrag(Event dragEvent) {
 		dragBoard.declareTypes(nativeTypeArray, dragSourceDelegate);
 
 	if (fileTrans != null) {
+		NSFileManager fileManager = NSFileManager.defaultManager();
+		int index = 0;
+		paths = new NSString[4];
+		exist = new boolean[4];
 		int[] types = fileTrans.getTypeIds();
 		TransferData transferData = new TransferData();
 		transferData.type = types[0];
@@ -834,6 +859,22 @@ DNDEvent startDrag(Event dragEvent) {
 				transferData.type = types[j];
 				fileTrans.javaToNative(event2.data, transferData);
 				if (transferData.data != null) {
+					NSArray array = (NSArray) transferData.data;
+					int count = (int) /*64*/ array.count();
+					for (int i = 0; i < count; i++) {
+						if (index == paths.length) {
+							NSString newPaths [] = new NSString[paths.length + 4];
+							System.arraycopy(paths, 0, newPaths, 0, index);
+							paths = newPaths;
+							boolean newExists[] = new boolean [paths.length];
+							System.arraycopy(exist, 0, newExists, 0, index);
+							exist = newExists;
+						}
+						NSString filePath = new NSString(array.objectAtIndex(i));
+						paths[index] = filePath;
+						exist[index] = fileManager.fileExistsAtPath(filePath);
+						index++;
+					}
 					dragBoard.setPropertyList(transferData.data, OS.NSFilenamesPboardType);
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
index 236c549..46b5e46 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -111,6 +111,7 @@ public class DropTarget extends Widget {
 	int keyOperation = -1;
 	
 	static final String DEFAULT_DROP_TARGET_EFFECT = "DEFAULT_DROP_TARGET_EFFECT"; //$NON-NLS-1$
+	static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
 	
 void addDragHandlers() {
 	// Our strategy here is to dynamically add methods to the control's class that are required 
@@ -189,7 +190,7 @@ public void addDropListener(DropTargetListener listener) {
 	addListener (DND.DropAccept, typedListener);
 }
 
-int /*long*/ callSuper (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+int /*long*/ dndCallSuper (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
 	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
@@ -247,11 +248,15 @@ int draggingEntered(int /*long*/ id, int /*long*/ sel, NSObject sender) {
 	if ((selectedOperation == DND.DROP_NONE) && (OS.PTR_SIZEOF == 4)) {
 		setDropNotAllowed();
 	} else {
-		clearDropNotAllowed();
+		if(((Boolean)control.getData(IS_ACTIVE)).booleanValue() == false) {
+			setDropNotAllowed();
+		} else {
+			clearDropNotAllowed();
+		}
 	}
 
 	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		return (int)/*64*/callSuper(id, sel, sender.id);
+		return (int)/*64*/dndCallSuper(id, sel, sender.id);
 	}
 	return opToOsOp(selectedOperation);
 }
@@ -268,7 +273,7 @@ void draggingExited(int /*long*/ id, int /*long*/ sel, NSObject sender) {
 	notifyListeners(DND.DragLeave, event);
 	
 	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		callSuper(id, sel, sender.id);
+		dndCallSuper(id, sel, sender.id);
 	}
 }
 
@@ -319,11 +324,15 @@ int draggingUpdated(int /*long*/ id, int /*long*/ sel, NSObject sender) {
 	if ((selectedOperation == DND.DROP_NONE) && (OS.PTR_SIZEOF == 4)) {
 		setDropNotAllowed();
 	} else {
-		clearDropNotAllowed();
+		if(((Boolean)control.getData(IS_ACTIVE)).booleanValue() == false) {
+			setDropNotAllowed();
+		} else {
+			clearDropNotAllowed();
+		}
 	}
 
 	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		return (int)/*64*/callSuper(id, sel, sender.id);
+		return (int)/*64*/dndCallSuper(id, sel, sender.id);
 	}
 
 	return opToOsOp(selectedOperation);
@@ -614,7 +623,7 @@ boolean drop(NSObject sender) {
 	notifyListeners(DND.DragLeave, event);
 	
 	event = new DNDEvent();
-	if (!setEventData(sender, event)) {
+	if (!setEventData(sender, event) || (((Boolean)control.getData(IS_ACTIVE)).booleanValue() == false)) {
 		return false;
 	}
 	
@@ -714,7 +723,7 @@ boolean drop(NSObject sender) {
 
 boolean performDragOperation(int /*long*/ id, int /*long*/ sel, NSObject sender) {
 	if (new NSObject(id).isKindOfClass(OS.class_NSTableView)) {
-		return callSuper(id, sel, sender.id) != 0;
+		return dndCallSuper(id, sel, sender.id) != 0;
 	}
 	
 	return drop (sender);
@@ -941,7 +950,20 @@ int tableView_validateDrop_proposedRow_proposedDropOperation(int /*long*/ id, in
 	//TODO stop scrolling and expansion when app does not set FEEDBACK_SCROLL and/or FEEDBACK_EXPAND
 	NSTableView widget = new NSTableView(tableView);
 	if (0 <= row && row < widget.numberOfRows()) {
-		widget.setDropRow(row, OS.NSTableViewDropOn);
+		if (feedback == 0) {
+			widget.setDropRow(-1, OS.NSTableViewDropOn);		
+		} else {
+			if ((feedback & DND.FEEDBACK_SELECT) != 0) {
+				widget.setDropRow(row, OS.NSTableViewDropOn);
+			} else {
+				if ((feedback & DND.FEEDBACK_INSERT_AFTER) != 0) {
+					widget.setDropRow(row + 1, OS.NSTableViewDropAbove);
+				}
+				if ((feedback & DND.FEEDBACK_INSERT_BEFORE) != 0) {
+					widget.setDropRow(row, OS.NSTableViewDropAbove);
+				}
+			}
+		}
 	}
 	return opToOsOp(selectedOperation);	
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TextTransfer.java
index ac7ab05..e69e101 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TextTransfer.java	
@@ -24,6 +24,12 @@ import org.eclipse.swt.internal.cocoa.*;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TransferData.java
index 31a52da..2b3ee68 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -52,6 +54,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSObject data;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DND.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DND.java
index 6879423..0cfec0a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DND.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DND.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.swt.dnd;
 import org.eclipse.swt.*;
 
 /**
- *
  * Class DND contains all the constants used in defining a 
  * DragSource or a DropTarget.
  *
@@ -151,19 +150,19 @@ public class DND {
 	
 	/**
 	 * DropTarget drag under effect: An insertion mark is shown before the item under the cursor; applies to 
-	 * trees (value is 2).
+	 * tables and trees (value is 2).
 	 */
 	public static final int FEEDBACK_INSERT_BEFORE = 2;
 	
 	/**
-	 * DropTarget drag under effect:An insertion mark is shown after the item under the cursor; applies to
-	 * trees (value is 4).
+	 * DropTarget drag under effect: An insertion mark is shown after the item under the cursor; applies to
+	 * tables and trees (value is 4).
 	 */	
 	public static final int FEEDBACK_INSERT_AFTER = 4;
 	
 	/**
 	 * DropTarget drag under effect: The widget is scrolled up or down to allow the user to drop on items that 
-	 * are not currently visible;  applies to tables and trees (value is 8).
+	 * are not currently visible; applies to tables and trees (value is 8).
 	 */	
 	public static final int FEEDBACK_SCROLL = 8;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java
index 531a0de..9f30c84 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DropTargetListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public interface DropTargetListener extends SWTEventListener {
  * <li>(in,out)feedback
  * </ul></p>
  *
- * <p>The <code>operation</code> value is determined by the modifier keys pressed by the user.  
+ * <p>The <code>operations</code> value is determined by the modifier keys pressed by the user.  
  * If no keys are pressed the <code>event.detail</code> field is set to DND.DROP_DEFAULT.  
  * If the application does not set the <code>event.detail</code> to something other 
  * than <code>DND.DROP_DEFAULT</code> the operation will be set to the platform defined standard 
@@ -116,7 +116,7 @@ public void dragLeave(DropTargetEvent event);
  * <li>(in,out)feedback
  * </ul></p>
  *
- * <p>The <code>operation</code> value is determined by the modifier keys pressed by the user.  
+ * <p>The <code>operations</code> value is determined by the modifier keys pressed by the user.  
  * If no keys are pressed the <code>event.detail</code> field is set to DND.DROP_DEFAULT.  
  * If the application does not set the <code>event.detail</code> to something other than 
  * <code>DND.DROP_DEFAULT</code> the operation will be set to the platform defined standard default.</p>
@@ -154,7 +154,7 @@ public void dragOperationChanged(DropTargetEvent event);
  * <li>(in,out)feedback
  * </ul></p>
  *
- * <p>The <code>operation</code> value is determined by the value assigned to 
+ * <p>The <code>operations</code> value is determined by the value assigned to 
  * <code>currentDataType</code> in previous dragEnter and dragOver calls.</p>
  * 
  * <p>The <code>currentDataType</code> value is determined by the value assigned to 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TextTransfer.java
index 21ef001..2ab0e06 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TextTransfer.java	
@@ -23,6 +23,12 @@ package org.eclipse.swt.dnd;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TransferData.java
index ff9d294..7a0dd5f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/emulated/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -57,6 +59,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	int result;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
index 6e122cc..1c53f72 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ class ClipboardProxy {
 	Object[] primaryClipboardData;
 	Transfer[] primaryClipboardDataTypes;
 
+	int /*long*/ clipboardOwner = OS.gtk_window_new(0);
 	Display display;
 	Clipboard activeClipboard = null;
 	Clipboard activePrimaryClipboard = null;
@@ -98,6 +99,8 @@ void dispose () {
 	clipboardDataTypes = null;
 	primaryClipboardData = null;
 	primaryClipboardDataTypes = null;
+	if (clipboardOwner != 0) OS.gtk_widget_destroy (clipboardOwner);
+	clipboardOwner = 0;
 }
 
 /**
@@ -158,23 +161,31 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
 			offset += GtkTargetEntry.sizeof;
 		}
 		if ((clipboards & DND.CLIPBOARD) != 0) {
-			if (activeClipboard != null) OS.gtk_clipboard_clear(Clipboard.GTKCLIPBOARD);
 			clipboardData = data;
 			clipboardDataTypes = dataTypes;
 			int /*long*/ getFuncProc = getFunc.getAddress();
 			int /*long*/ clearFuncProc = clearFunc.getAddress();
-			if (!OS.gtk_clipboard_set_with_data(Clipboard.GTKCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, 0)) {
+			/*
+			* Feature in GTK. When the contents are set again, clipboard_set_with_data() 
+			* invokes clearFunc and then, getFunc is not sequentially called. 
+			* If we clear the content before calling set_with_data(), then there is a fair 
+			* chance for other apps like Klipper to claim the ownership of the clipboard.
+			* The fix is to make sure that the content is not cleared before the data is
+			* set again. GTK does not invoke clearFunc for clipboard_set_with_owner()
+			* though we set the data again. So, this API has to be used whenever we
+			* are setting the contents.
+			*/
+			if (!OS.gtk_clipboard_set_with_owner (Clipboard.GTKCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
 				return false;
 			}
 			activeClipboard = owner;
 		}
 		if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) {
-			if (activePrimaryClipboard != null) OS.gtk_clipboard_clear(Clipboard.GTKPRIMARYCLIPBOARD);
 			primaryClipboardData = data;
 			primaryClipboardDataTypes = dataTypes;
 			int /*long*/ getFuncProc = getFunc.getAddress();
 			int /*long*/ clearFuncProc = clearFunc.getAddress();
-			if (!OS.gtk_clipboard_set_with_data(Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, 0)) {
+			if (!OS.gtk_clipboard_set_with_owner (Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
 				return false;
 			}
 			activePrimaryClipboard = owner;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
index cf28027..c4875c1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java	
@@ -141,7 +141,6 @@ public Object nativeToJava(TransferData transferData) {
 		OS.gdk_pixbuf_loader_close(loader, null);
 		int /*long*/ pixbuf = OS.gdk_pixbuf_loader_get_pixbuf(loader);
 		if (pixbuf != 0) {
-			OS.g_object_ref(pixbuf);
 			int /*long*/ [] pixmap_return = new int /*long*/ [1];
 			OS.gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap_return, null, 0);
 			int /*long*/ handle = pixmap_return[0];
@@ -156,11 +155,11 @@ public Object nativeToJava(TransferData transferData) {
 }
 
 protected int[] getTypeIds(){
-	return new int[]{JPEG_ID, PNG_ID, BMP_ID, EPS_ID, PCX_ID, PPM_ID, RGB_ID, TGA_ID, XBM_ID, XPM_ID, XV_ID};	
+	return new int[]{PNG_ID, BMP_ID, EPS_ID, JPEG_ID, PCX_ID, PPM_ID, RGB_ID, TGA_ID, XBM_ID, XPM_ID, XV_ID};	
 }
 
 protected String[] getTypeNames(){
-	return new String[]{JPEG, PNG, BMP, EPS, PCX, PPM, RGB, TGA, XBM, XPM, XV};
+	return new String[]{PNG, BMP, EPS, JPEG, PCX, PPM, RGB, TGA, XBM, XPM, XV};
 }
 
 boolean checkImage(Object object) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java
index f4ab889..dc81136 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDropTargetEffect.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -169,12 +169,12 @@ public class TableDropTargetEffect extends DropTargetEffect {
 			}
 		}
 		if (path[0] != 0) {
-			int position = 0;
+			int position = -1;
 			if ((effect & DND.FEEDBACK_SELECT) != 0) position = OS.GTK_TREE_VIEW_DROP_INTO_OR_BEFORE;
-			//if ((effect & DND.FEEDBACK_INSERT_BEFORE) != 0) position = OS.GTK_TREE_VIEW_DROP_BEFORE;
-			//if ((effect & DND.FEEDBACK_INSERT_AFTER) != 0) position = OS.GTK_TREE_VIEW_DROP_AFTER;
-			if (position != 0) {
-				OS.gtk_tree_view_set_drag_dest_row(handle, path[0], OS.GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
+			if ((effect & DND.FEEDBACK_INSERT_BEFORE) != 0) position = OS.GTK_TREE_VIEW_DROP_BEFORE;
+			if ((effect & DND.FEEDBACK_INSERT_AFTER) != 0) position = OS.GTK_TREE_VIEW_DROP_AFTER;
+			if (position != -1) {
+				OS.gtk_tree_view_set_drag_dest_row(handle, path[0], position);
 			} else {
 				OS.gtk_tree_view_set_drag_dest_row(handle, 0, OS.GTK_TREE_VIEW_DROP_BEFORE);
 			}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java
index 6a6dabc..63ce761 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java	
@@ -25,6 +25,12 @@ import org.eclipse.swt.internal.gtk.*;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
index 275a9da..dc8fcfb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ type;
 	
@@ -51,6 +53,8 @@ public class TransferData {
 	 * </p>
 	 * 
 	 * @see TransferData#format for the size of one unit
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int length;
 	
@@ -65,6 +69,8 @@ public class TransferData {
 	 * </p>
  	 * 
  	 * This is most commonly 8 bits.
+ 	 * 
+ 	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int format;
 	
@@ -77,6 +83,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ pValue;
 
@@ -92,6 +100,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int result;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TextTransfer.java
index da99125..f61960f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TextTransfer.java	
@@ -27,6 +27,12 @@ import org.eclipse.swt.internal.motif.XTextProperty;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TransferData.java
index 7985cb8..60d6bef 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -51,6 +53,8 @@ public class TransferData {
 	 * </p>
 	 * 
 	 * @see TransferData#format for the size of one unit
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int length;
 	
@@ -65,6 +69,8 @@ public class TransferData {
 	 * </p>
  	 * 
  	 * This is most commonly 8 bits.
+ 	 * 
+ 	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int format;
 	
@@ -77,6 +83,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int pValue;
 
@@ -92,6 +100,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int result;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TextTransfer.java
index 568f1e5..056d74a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TextTransfer.java	
@@ -26,6 +26,12 @@ import org.eclipse.swt.internal.photon.OS;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TransferData.java
index 3f26604..03766a9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/photon/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -50,6 +52,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int pData;
 	
@@ -62,6 +66,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int length;
 	
@@ -77,6 +83,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int result;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java
index bfe4acb..b4f06ff 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/OleEnumFORMATETC.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java
index 6d27948..c53d8e5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDropTargetEffect.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,6 +50,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
 	int scrollIndex = -1;
 	long scrollBeginTime;
 	TableItem dropHighlight;
+	int iItemInsert = -1;
 
 	/**
 	 * Creates a new <code>TableDropTargetEffect</code> to handle the drag under effect on the specified 
@@ -86,6 +87,7 @@ public class TableDropTargetEffect extends DropTargetEffect {
 		scrollBeginTime = 0;
 		scrollIndex = -1;
 		dropHighlight = null;
+		iItemInsert = -1;
 	}
 	
 	/**
@@ -111,6 +113,15 @@ public class TableDropTargetEffect extends DropTargetEffect {
 			OS.SendMessage(handle, OS.LVM_SETITEMSTATE, -1, lvItem);		
 			dropHighlight = null;
 		}
+		if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(5, 1)) {
+			if (iItemInsert != -1) {
+				LVINSERTMARK plvim = new LVINSERTMARK ();
+				plvim.cbSize = LVINSERTMARK.sizeof;
+				plvim.iItem = -1;
+				OS.SendMessage(handle, OS.LVM_SETINSERTMARK, 0, plvim);
+				iItemInsert = -1;
+			}
+		}
 		scrollBeginTime = 0;
 		scrollIndex = -1;
 	}
@@ -200,5 +211,24 @@ public class TableDropTargetEffect extends DropTargetEffect {
 				dropHighlight = null;
 			}
 		}
+		if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(5, 1)) {
+			if (pinfo.iItem != -1 && (effect & (DND.FEEDBACK_INSERT_BEFORE | DND.FEEDBACK_INSERT_AFTER)) != 0) {
+					LVINSERTMARK plvim = new LVINSERTMARK ();
+					plvim.cbSize = LVINSERTMARK.sizeof;
+					plvim.dwFlags = (effect & DND.FEEDBACK_INSERT_AFTER) != 0 ? OS.LVIM_AFTER : 0;
+					plvim.iItem = pinfo.iItem;
+					if (OS.SendMessage(handle, OS.LVM_SETINSERTMARK, 0, plvim) != 0) {
+						iItemInsert = pinfo.iItem;
+					}
+			} else {
+				if (iItemInsert != -1) {
+					LVINSERTMARK plvim = new LVINSERTMARK ();
+					plvim.cbSize = LVINSERTMARK.sizeof;
+					plvim.iItem = -1;
+					OS.SendMessage(handle, OS.LVM_SETINSERTMARK, 0, plvim);
+					iItemInsert = -1;
+				}
+			}
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java
index 94b3cf0..97b3a17 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TextTransfer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,12 @@ import org.eclipse.swt.internal.win32.*;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
index a1c57b8..aa9fbe7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -52,6 +54,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public FORMATETC formatetc;
 	
@@ -65,6 +69,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public STGMEDIUM stgmedium;
 
@@ -80,6 +86,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int result = COM.E_FAIL;
 
@@ -93,6 +101,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ pIDataObject;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java
index 5aedfb1..223677b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/URLTransfer.java	
@@ -31,6 +31,8 @@ import org.eclipse.swt.internal.win32.*;
 public class URLTransfer extends ByteArrayTransfer {
 
 	static URLTransfer _instance = new URLTransfer();
+	static final String CFSTR_INETURLW = "UniformResourceLocatorW"; //$NON-NLS-1$
+	static final int CFSTR_INETURLIDW = registerType(CFSTR_INETURLW);
 	static final String CFSTR_INETURL = "UniformResourceLocator"; //$NON-NLS-1$
 	static final int CFSTR_INETURLID = registerType(CFSTR_INETURL);
 
@@ -62,24 +64,37 @@ public void javaToNative (Object object, TransferData transferData){
 	transferData.result = COM.E_FAIL;
 	// URL is stored as a null terminated byte array
 	String url = ((String)object);
-	int count = url.length();
-	char[] chars = new char[count + 1];
-	url.getChars(0, count, chars, 0);
-	int codePage = OS.GetACP();
-	int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, null, null);
-	if (cchMultiByte == 0) {
+	if (transferData.type == CFSTR_INETURLIDW) {
+		int charCount = url.length ();
+		char[] chars = new char[charCount+1];
+		url.getChars (0, charCount, chars, 0);
+		int byteCount = chars.length * 2;
+		int /*long*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, byteCount);
+		OS.MoveMemory(newPtr, chars, byteCount);
 		transferData.stgmedium = new STGMEDIUM();
-		transferData.result = COM.DV_E_STGMEDIUM;
-		return;
+		transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
+		transferData.stgmedium.unionField = newPtr;
+		transferData.stgmedium.pUnkForRelease = 0;
+		transferData.result = COM.S_OK;
+	} else if (transferData.type == CFSTR_INETURLID) {
+		int count = url.length();
+		char[] chars = new char[count + 1];
+		url.getChars(0, count, chars, 0);
+		int codePage = OS.GetACP();
+		int cchMultiByte = OS.WideCharToMultiByte(codePage, 0, chars, -1, null, 0, null, null);
+		if (cchMultiByte == 0) {
+			transferData.stgmedium = new STGMEDIUM();
+			transferData.result = COM.DV_E_STGMEDIUM;
+			return;
+		}
+		int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
+		OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
+		transferData.stgmedium = new STGMEDIUM();
+		transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
+		transferData.stgmedium.unionField = lpMultiByteStr;
+		transferData.stgmedium.pUnkForRelease = 0;
+		transferData.result = COM.S_OK;
 	}
-	int /*long*/ lpMultiByteStr = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, cchMultiByte);
-	OS.WideCharToMultiByte(codePage, 0, chars, -1, lpMultiByteStr, cchMultiByte, null, null);
-	transferData.stgmedium = new STGMEDIUM();
-	transferData.stgmedium.tymed = COM.TYMED_HGLOBAL;
-	transferData.stgmedium.unionField = lpMultiByteStr;
-	transferData.stgmedium.pUnkForRelease = 0;
-	transferData.result = COM.S_OK;
-	return;
 }
 
 /**
@@ -104,29 +119,52 @@ public Object nativeToJava(TransferData transferData){
 	if (transferData.result != COM.S_OK) return null;
 	int /*long*/ hMem = stgmedium.unionField;
 	try {
-		int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
-		if (lpMultiByteStr == 0) return null;
-		try {
-			int codePage = OS.GetACP();
-			int cchWideChar  = OS.MultiByteToWideChar (codePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0);
-			if (cchWideChar == 0) return null;
-			char[] lpWideCharStr = new char [cchWideChar - 1];
-			OS.MultiByteToWideChar (codePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, lpWideCharStr, lpWideCharStr.length);
-			return new String(lpWideCharStr);
-		} finally {
-			OS.GlobalUnlock(hMem);
+		if (transferData.type == CFSTR_INETURLIDW) {
+			/* Ensure byteCount is a multiple of 2 bytes */
+			int size = OS.GlobalSize(hMem) / 2 * 2;
+			if (size == 0) return null;
+			char[] chars = new char[size/2];
+			int /*long*/ ptr = OS.GlobalLock(hMem);
+			if (ptr == 0) return null;
+			try {
+				OS.MoveMemory(chars, ptr, size);
+				int length = chars.length;
+				for (int i=0; i<chars.length; i++) {
+					if (chars [i] == '\0') {
+						length = i;
+						break;
+					}
+				}
+				return new String (chars, 0, length);
+			} finally {
+				OS.GlobalUnlock(hMem);	
+			}
+		} else if (transferData.type == CFSTR_INETURLID) {
+			int /*long*/ lpMultiByteStr = OS.GlobalLock(hMem);
+			if (lpMultiByteStr == 0) return null;
+			try {
+				int codePage = OS.GetACP();
+				int cchWideChar  = OS.MultiByteToWideChar (codePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0);
+				if (cchWideChar == 0) return null;
+				char[] lpWideCharStr = new char [cchWideChar - 1];
+				OS.MultiByteToWideChar (codePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, lpWideCharStr, lpWideCharStr.length);
+				return new String(lpWideCharStr);
+			} finally {
+				OS.GlobalUnlock(hMem);
+			}
 		}
 	} finally {
 		OS.GlobalFree(hMem);
 	}
+	return null;
 }
 
 protected int[] getTypeIds(){
-	return new int[] {CFSTR_INETURLID};
+	return new int[] {CFSTR_INETURLIDW, CFSTR_INETURLID};
 }
 
 protected String[] getTypeNames(){
-	return new String[] {CFSTR_INETURL}; 
+	return new String[] {CFSTR_INETURLW, CFSTR_INETURL}; 
 }
 
 boolean checkURL(Object object) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TextTransfer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TextTransfer.java
index 3dfc44c..8fef1f9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TextTransfer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TextTransfer.java	
@@ -25,6 +25,12 @@ import org.eclipse.swt.internal.wpf.*;
  *     String textData = "Hello World";
  * </code></pre>
  * 
+ * <p>Note the <code>TextTransfer</code> does not change the content of the text
+ * data. For a better integration with the platform, the application should convert
+ * the line delimiters used in the text data to the standard line delimiter used by the
+ * platform.
+ * </p>
+ * 
  * @see Transfer
  */
 public class TextTransfer extends ByteArrayTransfer {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TransferData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TransferData.java
index a3ef016..50c909b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TransferData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Drag and Drop/wpf/org/eclipse/swt/dnd/TransferData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,8 @@ public class TransferData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -55,6 +57,8 @@ public class TransferData {
 	 * </p>
  	 * <p>The value of result is 1 if the conversion was successful.
 	 * The value of result is 0 if the conversion failed.</p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	int result;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
index ad94e4c..16b769d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ class MozillaDelegate {
 	boolean hasFocus;
 	static Callback Callback3;
 	static Hashtable handles = new Hashtable ();
-	
+
 MozillaDelegate (Browser browser) {
 	super ();
 	this.browser = browser;
@@ -41,6 +41,10 @@ static Browser findBrowser (int handle) {
 	return null;
 }
 
+static String getLibraryName () {
+	return "libxpcom.dylib"; //$NON-NLS-1$
+}
+
 static char[] mbcsToWcs (String codePage, byte [] buffer) {
 	int encoding = OS.CFStringGetSystemEncoding ();
 	int cfstring = OS.CFStringCreateWithBytes (OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
@@ -95,9 +99,32 @@ static int eventProc3 (int nextHandler, int theEvent, int userData) {
 				* DOM listener is handling the event, in case the Browser gets disposed in a
 				* callback.
 				*/
+				int result = OS.noErr;
 				int handle = browser.handle;
 				OS.CFRetain (handle);
-				int result = OS.CallNextEventHandler (nextHandler, theEvent);
+
+				/*
+				* Pressing the OSX shortcut to put focus into the menu bar does not work in
+				* embedded mozilla.  If this shortcut is not handled here then it falls through
+				* all of the key handlers for some reason.  The workaround is to detect this
+				* shortcut here and put focus into the menu bar.
+				*/
+				int [] modifiers = new int [1];
+				OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, modifiers.length * 4, null, modifiers);
+				int [] keyCode = new int [1];
+				OS.GetEventParameter (theEvent, OS.kEventParamKeyCode, OS.typeUInt32, null, keyCode.length * 4, null, keyCode);
+				if (keyCode [0] == 120 /* F2 */ && (modifiers[0] & (OS.controlKey | OS.cmdKey | OS.optionKey)) == OS.controlKey) {
+					int[] event = new int[1];
+					OS.CreateEvent (0, OS.kEventClassApplication, OS.kEventAppFocusMenuBar, 0.0, 0, event);
+					if (event [0] != 0) {
+						OS.SetEventParameter (event [0], OS.kEventParamKeyModifiers, OS.typeUInt32, 4, modifiers);
+						result = OS.SendEventToEventTarget (event [0], OS.GetApplicationEventTarget ());
+						OS.ReleaseEvent (event [0]);
+					}
+				} else {
+					result = OS.CallNextEventHandler (nextHandler, theEvent);
+				}
+
 				OS.CFRelease (handle);
 				return result;
 		}
@@ -116,10 +143,14 @@ int createBaseWindow (nsIBaseWindow baseWindow) {
 	*/
 	int application = Cocoa.objc_msgSend (Cocoa.C_NSApplication, Cocoa.S_sharedApplication);
 	int mainMenu = Cocoa.objc_msgSend (application, Cocoa.S_mainMenu);
-	Cocoa.objc_msgSend (mainMenu, Cocoa.S_retain);
+	if (mainMenu != 0) {
+		Cocoa.objc_msgSend (mainMenu, Cocoa.S_retain);
+	}
 	int rc = baseWindow.Create ();
-	Cocoa.objc_msgSend (application, Cocoa.S_setMainMenu, mainMenu);
-	Cocoa.objc_msgSend (mainMenu, Cocoa.S_release);
+	if (mainMenu != 0) {
+		Cocoa.objc_msgSend (application, Cocoa.S_setMainMenu, mainMenu);
+		Cocoa.objc_msgSend (mainMenu, Cocoa.S_release);
+	}
 	return rc;
 }
 
@@ -198,8 +229,9 @@ String getJSLibraryName () {
 	return "libmozjs.dylib"; //$NON-NLS-1$
 }
 
-String getLibraryName () {
-	return "libxpcom.dylib"; //$NON-NLS-1$
+String getProfilePath () {
+	String baseDir = System.getProperty ("user.home"); //$NON-NLS-1$
+	return baseDir + Mozilla.SEPARATOR_OS + ".mozilla" + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
 String getSWTInitLibraryName () {
@@ -253,6 +285,10 @@ void onDispose (int embedHandle) {
 void removeWindowSubclass () {
 }
 
+boolean sendTraverse () {
+	return true;
+}
+
 void setSize (int embedHandle, int width, int height) {
 	// TODO
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java
index cc24444..40ef94f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/cocoa/org/eclipse/swt/browser/MozillaDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,6 +32,10 @@ static Browser findBrowser (int /*long*/ handle) {
 	return (Browser)display.findWidget (handle);
 }
 
+static String getLibraryName () {
+	return "libxpcom.dylib"; //$NON-NLS-1$
+}
+
 static char[] mbcsToWcs (String codePage, byte [] buffer) {
 //	int encoding = OS.CFStringGetSystemEncoding ();
 //	int cfstring = OS.CFStringCreateWithBytes (OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
@@ -85,10 +89,11 @@ int createBaseWindow (nsIBaseWindow baseWindow) {
 	*/
 	NSApplication application = NSApplication.sharedApplication ();
 	NSMenu mainMenu = application.mainMenu ();
-	mainMenu.retain ();
+	if (mainMenu != null) mainMenu.retain ();
 	int rc = baseWindow.Create ();
 	application.setMainMenu (mainMenu);
-	mainMenu.release ();
+	if (mainMenu != null) mainMenu.release ();
+	((Mozilla)browser.webBrowser).Activate ();
 	return rc;
 }
 
@@ -100,8 +105,9 @@ String getJSLibraryName () {
 	return "libmozjs.dylib"; //$NON-NLS-1$
 }
 
-String getLibraryName () {
-	return "libxpcom.dylib"; //$NON-NLS-1$
+String getProfilePath () {
+	String baseDir = System.getProperty ("user.home"); //$NON-NLS-1$
+	return baseDir + Mozilla.SEPARATOR_OS + ".mozilla" + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
 String getSWTInitLibraryName () {
@@ -154,6 +160,10 @@ void onDispose (int /*long*/ embedHandle) {
 void removeWindowSubclass () {
 }
 
+boolean sendTraverse () {
+	return true;
+}
+
 void setSize (int /*long*/ embedHandle, int width, int height) {
 	// TODO
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/swt_xpcom.rc b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/swt_xpcom.rc
index 8293e74..f5598d4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/swt_xpcom.rc	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/swt_xpcom.rc	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.cpp b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.cpp
index c27048e..32741cf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.cpp	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.cpp	
@@ -85,4 +85,46 @@ fail:
 }
 #endif
 
+#ifndef NO__1NS_1Free
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1NS_1Free)
+	(JNIEnv *env, jclass that, jbyteArray mozillaPath, jintLong arg0)
+{
+	jbyte *lpmozillaPath=NULL;
+	jint rc = 0;
+	XPCOM_NATIVE_ENTER(env, that, _1NS_1Free_FUNC);
+	if (mozillaPath) if ((lpmozillaPath = env->GetByteArrayElements(mozillaPath, NULL)) == NULL) goto fail;
+/*
+	NS_Free((void*)arg0);
+*/
+	{
+	
+#ifdef _WIN32
+		LOAD_FUNCTION(fp, NS_Free)
+		if (fp) {
+			((jint (*)(void *))fp)((void *)arg0);
+			rc = 1;
+		}
+#else
+#define CALLING_CONVENTION
+		static int initialized = 0;
+		static void *fp = NULL;
+		if (!initialized) {
+			void* handle = dlopen((const char *)lpmozillaPath, RTLD_LAZY);
+			if (handle) {
+				fp = dlsym(handle, "NS_Free");
+			}
+			initialized = 1;
+		}
+		if (fp) {
+			((jint (CALLING_CONVENTION*)(void *))fp)((void *)arg0);
+			rc = 1;
+		}
+#endif /* _WIN32 */
+	}
+fail:
+	if (mozillaPath && lpmozillaPath) env->ReleaseByteArrayElements(mozillaPath, lpmozillaPath, 0);
+	XPCOM_NATIVE_EXIT(env, that, _1NS_1Free_FUNC);
+	return rc;
+}
+#endif
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.h
index c11fe30..21bc338 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_custom.h	
@@ -12,6 +12,7 @@
 #ifdef _WIN32
 #include <windows.h>
 #define JS_EvaluateUCScriptForPrincipals_LIB "js3250.dll"
+#define NS_Free_LIB "xpcom.dll"
 #define XP_WIN
 #else
 #include <dlfcn.h>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp
index 3e9979b..f0ac6ad 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@
 int XPCOM_nativeFunctionCount = 226;
 int XPCOM_nativeFunctionCallCount[226];
 char * XPCOM_nativeFunctionNames[] = {
-	"GetAddress",
 #ifndef JNI64
 	"_1Call__I",
 #else
@@ -34,6 +33,7 @@ char * XPCOM_nativeFunctionNames[] = {
 	"_1Call__JJJ_3BII_3I",
 #endif
 	"_1JS_1EvaluateUCScriptForPrincipals",
+	"_1NS_1Free",
 	"_1NS_1GetComponentManager",
 	"_1NS_1GetServiceManager",
 	"_1NS_1InitXPCOM2",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h
index 0e0c0dc..eef0e1b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,6 @@ extern char* XPCOM_nativeFunctionNames[];
 #endif
 
 typedef enum {
-	GetAddress_FUNC,
 #ifndef JNI64
 	_1Call__I_FUNC,
 #else
@@ -42,6 +41,7 @@ typedef enum {
 	_1Call__JJJ_3BII_3I_FUNC,
 #endif
 	_1JS_1EvaluateUCScriptForPrincipals_FUNC,
+	_1NS_1Free_FUNC,
 	_1NS_1GetComponentManager_FUNC,
 	_1NS_1GetServiceManager_FUNC,
 	_1NS_1InitXPCOM2_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java
index 8971565..ecb412a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,10 +20,10 @@ class AppFileLocProvider {
 	XPCOMObject directoryServiceProvider;
 	XPCOMObject directoryServiceProvider2;	
 	int refCount = 0;
-	String mozillaPath, profilePath, componentsPath;
+	String mozillaPath, profilePath;
 	String[] pluginDirs;
 	boolean isXULRunner;
-	
+
 	static final String SEPARATOR_OS = System.getProperty ("file.separator"); //$NON-NLS-1$
 	static final String CHROME_DIR = "chrome"; //$NON-NLS-1$
 	static final String COMPONENTS_DIR = "components"; //$NON-NLS-1$
@@ -41,8 +41,23 @@ class AppFileLocProvider {
 		IsSparc = (osName.startsWith ("sunos") || osName.startsWith ("solaris")) && osArch.startsWith("sparc"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	}
 	
-AppFileLocProvider (String path) {
-	mozillaPath = path + SEPARATOR_OS;
+AppFileLocProvider (String mozillaPath, String profilePath, boolean isXULRunner) {
+	this.mozillaPath = mozillaPath + SEPARATOR_OS;
+	this.profilePath = profilePath + SEPARATOR_OS;
+	this.isXULRunner = isXULRunner;
+	if (!Compatibility.fileExists (profilePath, "")) { //$NON-NLS-1$
+		int /*long*/[] result = new int /*long*/[1];
+		nsEmbedString pathString = new nsEmbedString (profilePath);
+		int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result);
+		if (rc != XPCOM.NS_OK) Mozilla.error (rc);
+		if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
+		pathString.dispose ();
+
+		nsILocalFile file = new nsILocalFile (result [0]);
+		rc = file.Create (nsILocalFile.DIRECTORY_TYPE, 0700);
+		if (rc != XPCOM.NS_OK) Mozilla.error (rc);
+		file.Release ();
+	}
 	createCOMInterfaces ();
 }
 
@@ -125,27 +140,6 @@ int Release () {
 	return refCount;
 }
 
-void setComponentsPath (String path) {
-	componentsPath = path;
-}
-
-void setProfilePath (String path) {
-	profilePath = path;
-	if (!Compatibility.fileExists (path, "")) { //$NON-NLS-1$
-		int /*long*/[] result = new int /*long*/[1];
-		nsEmbedString pathString = new nsEmbedString (path);
-		int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result);
-		if (rc != XPCOM.NS_OK) Mozilla.error (rc);
-		if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
-		pathString.dispose ();
-
-		nsILocalFile file = new nsILocalFile (result [0]);
-		rc = file.Create (nsILocalFile.DIRECTORY_TYPE, 0700);
-		if (rc != XPCOM.NS_OK) Mozilla.error (rc);
-		file.Release ();
-	}
-}
-
 /* nsIDirectoryServiceProvider2 */
 
 int getFiles (int /*long*/ prop, int /*long*/ _retval) {
@@ -285,7 +279,7 @@ int getFile(int /*long*/ prop, int /*long*/ persistent, int /*long*/ _retval) {
 	} else if (propertyName.equals (XPCOM.NS_GRE_DIR)) {
 		propertyValue = mozillaPath;
 	} else if (propertyName.equals (XPCOM.NS_GRE_COMPONENT_DIR)) {
-		propertyValue = componentsPath != null ? componentsPath : mozillaPath + COMPONENTS_DIR;
+		propertyValue = profilePath + COMPONENTS_DIR;
 	} else if (propertyName.equals (XPCOM.NS_XPCOM_INIT_CURRENT_PROCESS_DIR)) {
 		propertyValue = mozillaPath;
 	} else if (propertyName.equals (XPCOM.NS_OS_CURRENT_PROCESS_DIR)) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download.java
index b648b33..3114c9a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -238,8 +238,8 @@ int Init (int /*long*/ aSource, int /*long*/ aTarget, int /*long*/ aDisplayName,
 	gridLayout.verticalSpacing = 20;
 	shell.setLayout(gridLayout);
 	msg = Compatibility.getMessage ("SWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
-	new Label (shell, SWT.SIMPLE).setText (msg);
-	status = new Label (shell, SWT.SIMPLE);
+	new Label (shell, SWT.WRAP).setText (msg);
+	status = new Label (shell, SWT.WRAP);
 	msg = Compatibility.getMessage ("SWT_Download_Started"); //$NON-NLS-1$
 	status.setText (msg);
 	GridData data = new GridData ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download_1_8.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download_1_8.java
index 82819f1..3ec20e7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download_1_8.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Download_1_8.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -256,8 +256,8 @@ int Init (int /*long*/ aSource, int /*long*/ aTarget, int /*long*/ aDisplayName,
 	gridLayout.verticalSpacing = 20;
 	shell.setLayout (gridLayout);
 	msg = Compatibility.getMessage ("SWT_Download_Location", new Object[] {filename, url}); //$NON-NLS-1$
-	new Label (shell, SWT.SIMPLE).setText (msg);
-	status = new Label (shell, SWT.SIMPLE);
+	new Label (shell, SWT.WRAP).setText (msg);
+	status = new Label (shell, SWT.WRAP);
 	msg = Compatibility.getMessage ("SWT_Download_Started"); //$NON-NLS-1$
 	status.setText (msg);
 	GridData data = new GridData ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/External.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/External.java
index 53ed58f..e888c32 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/External.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/External.java	
@@ -503,7 +503,10 @@ nsIVariant convertToJS (Object value, nsIComponentManager componentManager) {
 	if (value instanceof Object[]) {
 		Object[] arrayValue = (Object[])value;
 		int length = arrayValue.length;
-		if (length > 0) {
+		if (length == 0) {
+			rc = variant.SetAsEmptyArray ();
+			if (rc != XPCOM.NS_OK) Mozilla.error (rc);
+		} else {
 			int /*long*/ arrayPtr = C.malloc (C.PTR_SIZEOF * length);
 			for (int i = 0; i < length; i++) {
 				Object currentObject = arrayValue[i];
@@ -529,8 +532,8 @@ nsIVariant convertToJS (Object value, nsIComponentManager componentManager) {
 			C.free (idPtr);
 			C.free (arrayPtr);
 			if (rc != XPCOM.NS_OK) Mozilla.error (rc);
-			return variant;
 		}
+		return variant;
 	}
 
 	variant.Release ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/InputStream.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/InputStream.java
index 3440fbb..8a5d967 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/InputStream.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/InputStream.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -108,7 +108,10 @@ int Read(int /*long*/ aBuf, int aCount, int /*long*/ _retval) {
 }
 
 int ReadSegments (int /*long*/ aWriter, int /*long*/ aClosure, int aCount, int /*long*/ _retval) {
-	int max = Math.min (aCount, buffer == null ? 0 : buffer.length - index);
+	int max = buffer == null ? 0 : buffer.length - index;
+	if (aCount != -1) {
+		max = Math.min (max, aCount);
+	}
 	int cnt = max;
 	while (cnt > 0) {
 		int[] aWriteCount = new int[1];
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index 7f20d97..af44dda 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,11 +42,13 @@ class Mozilla extends WebBrowser {
 	XPCOMObject tooltipListener;
 	XPCOMObject domEventListener;
 	XPCOMObject badCertListener;
+
 	int chromeFlags = nsIWebBrowserChrome.CHROME_DEFAULT;
+	int registerFunctionsOnState = 0;
 	int refCount, lastKeyCode, lastCharCode, authCount;
 	int /*long*/ request;
 	Point location, size;
-	boolean visible, isChild, ignoreDispose, isRetrievingBadCert, isViewingErrorPage;
+	boolean visible, isChild, ignoreDispose, isRetrievingBadCert, isViewingErrorPage, ignoreAllMessages, untrustedText;
 	boolean updateLastNavigateUrl;
 	Shell tip = null;
 	Listener listener;
@@ -58,8 +60,13 @@ class Mozilla extends WebBrowser {
 	static AppFileLocProvider LocationProvider;
 	static WindowCreator2 WindowCreator;
 	static int BrowserCount, NextJSFunctionIndex = 1;
-	static Hashtable AllFunctions = new Hashtable (); 
+	static Hashtable AllFunctions = new Hashtable ();
+	static Listener DisplayListener;
 	static boolean Initialized, IsPre_1_8, IsPre_1_9, PerformedVersionCheck, XPCOMWasGlued, XPCOMInitWasGlued;
+	static String oldProxyHostFTP, oldProxyHostHTTP, oldProxyHostSSL;
+	static int oldProxyPortFTP = -1, oldProxyPortHTTP = -1, oldProxyPortSSL = -1, oldProxyType = -1;
+	static byte[] pathBytes_JSEvaluateUCScriptForPrincipals;
+	static byte[] pathBytes_NSFree;
 
 	/* XULRunner detect constants */
 	static final String GRERANGE_LOWER = "1.8.1.2"; //$NON-NLS-1$
@@ -69,13 +76,18 @@ class Mozilla extends WebBrowser {
 	static final boolean UpperRangeInclusive = true;
 
 	static final int MAX_PORT = 65535;
+	static final String DEFAULTVALUE_STRING = "default"; //$NON-NLS-1$
 	static final String SEPARATOR_OS = System.getProperty ("file.separator"); //$NON-NLS-1$
 	static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
 	static final String DISPOSE_LISTENER_HOOKED = "org.eclipse.swt.browser.Mozilla.disposeListenerHooked"; //$NON-NLS-1$
+	static final String HEADER_CONTENTTYPE = "Content-Type"; //$NON-NLS-1
+	static final String MIMETYPE_FORMURLENCODED = "application/x-www-form-urlencoded"; //$NON-NLS-1$
 	static final String PREFIX_JAVASCRIPT = "javascript:"; //$NON-NLS-1$
 	static final String PREFERENCE_CHARSET = "intl.charset.default"; //$NON-NLS-1$
 	static final String PREFERENCE_DISABLEOPENDURINGLOAD = "dom.disable_open_during_load"; //$NON-NLS-1$
+	static final String PREFERENCE_DISABLEOPENWINDOWSTATUSHIDE = "dom.disable_window_open_feature.status"; //$NON-NLS-1$
 	static final String PREFERENCE_DISABLEWINDOWSTATUSCHANGE = "dom.disable_window_status_change"; //$NON-NLS-1$
+	static final String PREFERENCE_JAVASCRIPTENABLED = "javascript.enabled"; //$NON-NLS-1$
 	static final String PREFERENCE_LANGUAGES = "intl.accept_languages"; //$NON-NLS-1$
 	static final String PREFERENCE_PROXYHOST_FTP = "network.proxy.ftp"; //$NON-NLS-1$
 	static final String PREFERENCE_PROXYPORT_FTP = "network.proxy.ftp_port"; //$NON-NLS-1$
@@ -94,13 +106,217 @@ class Mozilla extends WebBrowser {
 	static final String SHUTDOWN_PERSIST = "shutdown-persist"; //$NON-NLS-1$
 	static final String STARTUP = "startup"; //$NON-NLS-1$
 	static final String TOKENIZER_LOCALE = ","; //$NON-NLS-1$
-	static final String URI_FROMMEMORY = "file:///"; //$NON-NLS-1$
+	static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
 	static final String XULRUNNER_PATH = "org.eclipse.swt.browser.XULRunnerPath"; //$NON-NLS-1$
 
 	// TEMPORARY CODE
 	static final String GRE_INITIALIZED = "org.eclipse.swt.browser.XULRunnerInitialized"; //$NON-NLS-1$
 
 	static {
+		DisplayListener = new Listener () {
+			public void handleEvent (Event event) {
+				if (BrowserCount > 0) return; /* another display is still active */
+
+				int /*long*/[] result = new int /*long*/[1];
+				int rc = XPCOM.NS_GetServiceManager (result);
+				if (rc != XPCOM.NS_OK) error (rc);
+				if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+				nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
+				result[0] = 0;		
+				byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_OBSERVER_CONTRACTID, true);
+				rc = serviceManager.GetServiceByContractID (buffer, nsIObserverService.NS_IOBSERVERSERVICE_IID, result);
+				if (rc != XPCOM.NS_OK) error (rc);
+				if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+				nsIObserverService observerService = new nsIObserverService (result[0]);
+				result[0] = 0;
+				buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_BEFORE_CHANGE, true);
+				int length = SHUTDOWN_PERSIST.length ();
+				char[] chars = new char [length + 1];
+				SHUTDOWN_PERSIST.getChars (0, length, chars, 0);
+				rc = observerService.NotifyObservers (0, buffer, chars);
+				if (rc != XPCOM.NS_OK) error (rc);
+				observerService.Release ();
+
+				if (LocationProvider != null) {
+					String prefsLocation = LocationProvider.profilePath + AppFileLocProvider.PREFERENCES_FILE;
+					nsEmbedString pathString = new nsEmbedString (prefsLocation);
+					rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result);
+					if (rc != XPCOM.NS_OK) Mozilla.error (rc);
+					if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
+					pathString.dispose ();
+
+					nsILocalFile localFile = new nsILocalFile (result [0]);
+					result[0] = 0;
+					rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); 
+					if (rc != XPCOM.NS_OK) Mozilla.error (rc);
+					if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE);
+					localFile.Release ();
+
+					nsIFile prefFile = new nsIFile (result[0]);
+					result[0] = 0;
+
+					buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFSERVICE_CONTRACTID, true);
+					rc = serviceManager.GetServiceByContractID (buffer, nsIPrefService.NS_IPREFSERVICE_IID, result);
+					if (rc != XPCOM.NS_OK) error (rc);
+					if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+					nsIPrefService prefService = new nsIPrefService (result[0]);
+					result[0] = 0;
+					revertProxySettings (prefService);
+					rc = prefService.SavePrefFile (prefFile.getAddress ());
+					prefService.Release ();
+
+					prefFile.Release ();
+				}
+				serviceManager.Release ();
+
+				if (XPCOMWasGlued) {
+					/*
+					* The following is intentionally commented because it causes subsequent
+					* browser instantiations within the process to fail.  Mozilla does not
+					* support being unloaded and then re-initialized in a process, see
+					* http://www.mail-archive.com/dev-embedding@lists.mozilla.org/msg01732.html . 
+					*/
+
+//					int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
+//					/* alloc memory for two structs, the second is empty to signify the end of the list */
+//					int /*long*/ ptr = C.malloc (size * 2);
+//					C.memset (ptr, 0, size * 2);
+//					nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
+//					byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_TermEmbedding", true); //$NON-NLS-1$
+//					functionLoad.functionName = C.malloc (bytes.length);
+//					C.memmove (functionLoad.functionName, bytes, bytes.length);
+//					functionLoad.function = C.malloc (C.PTR_SIZEOF);
+//					C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
+//					XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
+//					XPCOM.XPCOMGlueLoadXULFunctions (ptr);
+//					C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
+//					int /*long*/ functionPtr = result[0];
+//					result[0] = 0;
+//					C.free (functionLoad.function);
+//					C.free (functionLoad.functionName);
+//					C.free (ptr);
+//					XPCOM.Call (functionPtr);
+
+//					XPCOM.XPCOMGlueShutdown ();
+					XPCOMWasGlued = false;
+				}
+				if (XPCOMInitWasGlued) {
+					XPCOMInit.XPCOMGlueShutdown ();
+					XPCOMInitWasGlued = false;
+				}
+				Initialized = false;
+			}
+
+			void revertProxySettings (nsIPrefService prefService) {
+				/* the proxy settings are typically not set, so check for this first */
+				boolean hostSet = oldProxyHostFTP != null || oldProxyHostHTTP != null || oldProxyHostSSL != null;
+				if (!hostSet && oldProxyPortFTP == -1 && oldProxyPortHTTP == -1 && oldProxyPortSSL == -1 && oldProxyType == -1) return;
+
+				int /*long*/[] result = new int /*long*/[1];
+				byte[] buffer = new byte[1];
+				int rc = prefService.GetBranch (buffer, result);	/* empty buffer denotes root preference level */
+				if (rc != XPCOM.NS_OK) error (rc);
+				if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+				nsIPrefBranch prefBranch = new nsIPrefBranch (result[0]);
+				result[0] = 0;
+
+				if (hostSet) {
+					rc = XPCOM.NS_GetComponentManager (result);
+					if (rc != XPCOM.NS_OK) error (rc);
+					if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+					nsIComponentManager componentManager = new nsIComponentManager (result[0]);
+					result[0] = 0;
+
+					byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
+					rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+					if (rc != XPCOM.NS_OK) error (rc);
+					if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+					nsIPrefLocalizedString localizedString = new nsIPrefLocalizedString (result[0]);
+					result[0] = 0;
+
+					if (oldProxyHostFTP != null) {
+						buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_FTP, true);
+						if (oldProxyHostFTP.equals (DEFAULTVALUE_STRING)) {
+							rc = prefBranch.ClearUserPref (buffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+						} else {
+							int length = oldProxyHostFTP.length ();
+							char[] charBuffer = new char[length];
+							oldProxyHostFTP.getChars (0, length, charBuffer, 0);
+							rc = localizedString.SetDataWithLength (length, charBuffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+							rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+							if (rc != XPCOM.NS_OK) error (rc);
+						}
+					}
+
+					if (oldProxyHostHTTP != null) {
+						buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_HTTP, true);
+						if (oldProxyHostHTTP.equals (DEFAULTVALUE_STRING)) {
+							rc = prefBranch.ClearUserPref (buffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+						} else {
+							int length = oldProxyHostHTTP.length ();
+							char[] charBuffer = new char[length];
+							oldProxyHostHTTP.getChars (0, length, charBuffer, 0);
+							rc = localizedString.SetDataWithLength (length, charBuffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+							rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+							if (rc != XPCOM.NS_OK) error (rc);
+						}
+					}
+
+					if (oldProxyHostSSL != null) {
+						buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_SSL, true);
+						if (oldProxyHostSSL.equals (DEFAULTVALUE_STRING)) {
+							rc = prefBranch.ClearUserPref (buffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+						} else {
+							int length = oldProxyHostSSL.length ();
+							char[] charBuffer = new char[length];
+							oldProxyHostSSL.getChars (0, length, charBuffer, 0);
+							rc = localizedString.SetDataWithLength (length, charBuffer);
+							if (rc != XPCOM.NS_OK) error (rc);
+							rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+							if (rc != XPCOM.NS_OK) error (rc);
+						}
+					}
+
+					localizedString.Release ();
+					componentManager.Release ();
+				}
+
+				if (oldProxyPortFTP != -1) {
+					buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_FTP, true);
+					rc = prefBranch.SetIntPref (buffer, oldProxyPortFTP);
+					if (rc != XPCOM.NS_OK) error (rc);
+				}
+				if (oldProxyPortHTTP != -1) {
+					buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_HTTP, true);
+					rc = prefBranch.SetIntPref (buffer, oldProxyPortHTTP);
+					if (rc != XPCOM.NS_OK) error (rc);
+				}
+				if (oldProxyPortSSL != -1) {
+					buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_SSL, true);
+					rc = prefBranch.SetIntPref (buffer, oldProxyPortSSL);
+					if (rc != XPCOM.NS_OK) error (rc);
+				}
+				if (oldProxyType != -1) {
+					buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYTYPE, true);
+					rc = prefBranch.SetIntPref (buffer, oldProxyType);
+					if (rc != XPCOM.NS_OK) error (rc);
+				}
+
+				prefBranch.Release ();
+			}
+		};
+
 		MozillaClearSessions = new Runnable () {
 			public void run () {
 				if (!Initialized) return;
@@ -224,7 +440,24 @@ class Mozilla extends WebBrowser {
 				int length = C.strlen (cookieString);
 				bytes = new byte[length];
 				XPCOM.memmove (bytes, cookieString, length);
-				C.free (cookieString);
+
+				/*
+				 * NS_Free was introduced in mozilla 1.8, prior to this the standard free() call
+				 * was to be used.  Try to free the cookie string with NS_Free first, and if it fails
+				 * then assume that an older mozilla is being used, and use C's free() instead. 
+				 */
+				if (pathBytes_NSFree == null) {
+					String mozillaPath = getMozillaPath () + MozillaDelegate.getLibraryName () + '\0';
+					try {
+						pathBytes_NSFree = mozillaPath.getBytes ("UTF-8"); //$NON-NLS-1$
+					} catch (UnsupportedEncodingException e) {
+						pathBytes_NSFree = mozillaPath.getBytes ();
+					}
+				}
+				if (!XPCOM.NS_Free (pathBytes_NSFree, cookieString)) {
+					C.free (cookieString);
+				}
+
 				String allCookies = new String (MozillaDelegate.mbcsToWcs (null, bytes));
 				StringTokenizer tokenizer = new StringTokenizer (allCookies, ";"); //$NON-NLS-1$
 				while (tokenizer.hasMoreTokens ()) {
@@ -295,14 +528,14 @@ class Mozilla extends WebBrowser {
 		};
 	}
 
-public void create (Composite parent, int style) {
+public boolean create (Composite parent, int style) {
 	delegate = new MozillaDelegate (browser);
 	final Display display = parent.getDisplay ();
 
 	int /*long*/[] result = new int /*long*/[1];
 	if (!Initialized) {
 		boolean initLoaded = false;
-		boolean IsXULRunner = false;
+		boolean isXULRunner = false;
 
 		String greInitialized = System.getProperty (GRE_INITIALIZED); 
 		if ("true".equals (greInitialized)) { //$NON-NLS-1$
@@ -346,125 +579,71 @@ public void create (Composite parent, int style) {
 				*/
 			}
 		} else {
-			mozillaPath += SEPARATOR_OS + delegate.getLibraryName ();
-			IsXULRunner = true;
+			mozillaPath += SEPARATOR_OS + MozillaDelegate.getLibraryName ();
+			isXULRunner = true;
 		}
 
 		if (initLoaded) {
 			/* attempt to discover a XULRunner to use as the GRE */
-			GREVersionRange range = new GREVersionRange ();
-			byte[] bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_LOWER, true);
-			int /*long*/ lower = C.malloc (bytes.length);
-			C.memmove (lower, bytes, bytes.length);
-			range.lower = lower;
-			range.lowerInclusive = LowerRangeInclusive;
-
-			bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_UPPER, true);
-			int /*long*/ upper = C.malloc (bytes.length);
-			C.memmove (upper, bytes, bytes.length);
-			range.upper = upper;
-			range.upperInclusive = UpperRangeInclusive;
-
-			int length = XPCOMInit.PATH_MAX;
-			int /*long*/ greBuffer = C.malloc (length);
-			int /*long*/ propertiesPtr = C.malloc (2 * C.PTR_SIZEOF);
-			int rc = XPCOMInit.GRE_GetGREPathWithProperties (range, 1, propertiesPtr, 0, greBuffer, length);
+			mozillaPath = initDiscoverXULRunner ();
+			isXULRunner = mozillaPath.length () > 0;
 
 			/*
-			 * A XULRunner was not found that supports wrapping of XPCOM handles as JavaXPCOM objects.
-			 * Drop the lower version bound and try to detect an earlier XULRunner installation.
+			 * Test whether the detected XULRunner can be used as the GRE before loading swt's
+			 * XULRunner library.  If it cannot be used then fall back to attempting to use
+			 * the GRE pointed to by MOZILLA_FIVE_HOME.
+			 * 
+			 * One case where this will fail is attempting to use a 64-bit xulrunner while swt
+			 * is running in 32-bit mode, or vice versa.
 			 */
-			if (rc != XPCOM.NS_OK) {
-				C.free (lower);
-				bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_LOWER_FALLBACK, true);
-				lower = C.malloc (bytes.length);
-				C.memmove (lower, bytes, bytes.length);
-				range.lower = lower;
-				rc = XPCOMInit.GRE_GetGREPathWithProperties (range, 1, propertiesPtr, 0, greBuffer, length);
-			}
-
-			C.free (lower);
-			C.free (upper);
-			C.free (propertiesPtr);
-			if (rc == XPCOM.NS_OK) {
-				/* indicates that a XULRunner was found */
-				length = C.strlen (greBuffer);
-				bytes = new byte[length];
-				C.memmove (bytes, greBuffer, length);
-				mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, bytes));
-				IsXULRunner = mozillaPath.length () > 0;
-
-				/*
-				 * Test whether the detected XULRunner can be used as the GRE before loading swt's
-				 * XULRunner library.  If it cannot be used then fall back to attempting to use
-				 * the GRE pointed to by MOZILLA_FIVE_HOME.
-				 * 
-				 * One case where this will fail is attempting to use a 64-bit xulrunner while swt
-				 * is running in 32-bit mode, or vice versa.
-				 */
-				if (IsXULRunner) {
-					byte[] path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
-					rc = XPCOMInit.XPCOMGlueStartup (path);
-					if (rc != XPCOM.NS_OK) {
-						mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
-						if (Device.DEBUG) System.out.println ("cannot use detected XULRunner: " + mozillaPath); //$NON-NLS-1$
-
-						/* attempt to XPCOMGlueStartup the GRE pointed at by MOZILLA_FIVE_HOME */
-						int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_FIVE_HOME, true));
-						if (ptr == 0) {
-							IsXULRunner = false;
+			if (isXULRunner) {
+				byte[] path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
+				int rc = XPCOMInit.XPCOMGlueStartup (path);
+				if (rc != XPCOM.NS_OK) {
+					mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
+					if (Device.DEBUG) System.out.println ("cannot use detected XULRunner: " + mozillaPath); //$NON-NLS-1$
+
+					/* attempt to XPCOMGlueStartup the GRE pointed at by MOZILLA_FIVE_HOME */
+					int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_FIVE_HOME, true));
+					if (ptr == 0) {
+						isXULRunner = false;
+					} else {
+						int length = C.strlen (ptr);
+						byte[] buffer = new byte[length];
+						C.memmove (buffer, ptr, length);
+						mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, buffer));
+						/*
+						 * Attempting to XPCOMGlueStartup a mozilla-based GRE != xulrunner can
+						 * crash, so don't attempt unless the GRE appears to be xulrunner.
+						 */
+						if (mozillaPath.indexOf("xulrunner") == -1) { //$NON-NLS-1$
+							isXULRunner = false;	
 						} else {
-							length = C.strlen (ptr);
-							byte[] buffer = new byte[length];
-							C.memmove (buffer, ptr, length);
-							mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, buffer));
-							/*
-							 * Attempting to XPCOMGlueStartup a mozilla-based GRE != xulrunner can
-							 * crash, so don't attempt unless the GRE appears to be xulrunner.
-							 */
-							if (mozillaPath.indexOf("xulrunner") == -1) { //$NON-NLS-1$
-								IsXULRunner = false;	
-							} else {
-								mozillaPath += SEPARATOR_OS + delegate.getLibraryName ();
-								path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
-								rc = XPCOMInit.XPCOMGlueStartup (path);
-								if (rc != XPCOM.NS_OK) {
-									IsXULRunner = false;
-									mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
-									if (Device.DEBUG) System.out.println ("failed to start as XULRunner: " + mozillaPath); //$NON-NLS-1$
-								}
+							mozillaPath += SEPARATOR_OS + MozillaDelegate.getLibraryName ();
+							path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
+							rc = XPCOMInit.XPCOMGlueStartup (path);
+							if (rc != XPCOM.NS_OK) {
+								isXULRunner = false;
+								mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
+								if (Device.DEBUG) System.out.println ("failed to start as XULRunner: " + mozillaPath); //$NON-NLS-1$
 							}
-						} 
-					}
-					if (IsXULRunner) {
-						XPCOMInitWasGlued = true;
-					}
+						}
+					} 
+				}
+				if (isXULRunner) {
+					XPCOMInitWasGlued = true;
 				}
 			}
-			C.free (greBuffer);
 		}
 
-		if (IsXULRunner) {
-			if (Device.DEBUG) System.out.println ("XULRunner path: " + mozillaPath); //$NON-NLS-1$
-			try {
-				Library.loadLibrary ("swt-xulrunner"); //$NON-NLS-1$
-			} catch (UnsatisfiedLinkError e) {
-				SWT.error (SWT.ERROR_NO_HANDLES, e);
-			}
-			byte[] path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
-			int rc = XPCOM.XPCOMGlueStartup (path);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			XPCOMWasGlued = true;
-
-			/*
-			 * Remove the trailing xpcom lib name from mozillaPath because the
-			 * Mozilla.initialize and NS_InitXPCOM2 invocations require a directory name only.
-			 */ 
-			mozillaPath = mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
+		if (isXULRunner) {
+			/* load swt's xulrunner library and invoke XPCOMGlueStartup to load xulrunner's dependencies */
+			mozillaPath = initXULRunner (mozillaPath);
 		} else {
+			/*
+			* If style SWT.MOZILLA was specified then this initialization has already
+			* failed, because SWT.MOZILLA-style Browsers must utilize XULRunner.
+			*/
 			if ((style & SWT.MOZILLA) != 0) {
 				browser.dispose ();
 				String errorString = (mozillaPath != null && mozillaPath.length () > 0) ?
@@ -473,161 +652,27 @@ public void create (Composite parent, int style) {
 				SWT.error (SWT.ERROR_NO_HANDLES, null, errorString);
 			}
 
-			/* attempt to use the GRE pointed at by MOZILLA_FIVE_HOME */
-			int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_FIVE_HOME, true));
-			if (ptr != 0) {
-				int length = C.strlen (ptr);
-				byte[] buffer = new byte[length];
-				C.memmove (buffer, ptr, length);
-				mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, buffer));
-			} else {
-				browser.dispose ();
-				SWT.error (SWT.ERROR_NO_HANDLES, null, " [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]"); //$NON-NLS-1$
-			}
-			if (Device.DEBUG) System.out.println ("Mozilla path: " + mozillaPath); //$NON-NLS-1$
-
-			/*
-			* Note.  Embedding a Mozilla GTK1.2 causes a crash.  The workaround
-			* is to check the version of GTK used by Mozilla by looking for
-			* the libwidget_gtk.so library used by Mozilla GTK1.2. Mozilla GTK2
-			* uses the libwidget_gtk2.so library.   
-			*/
-			if (Compatibility.fileExists (mozillaPath, "components/libwidget_gtk.so")) { //$NON-NLS-1$
-				browser.dispose ();
-				SWT.error (SWT.ERROR_NO_HANDLES, null, " [Mozilla GTK2 required (GTK1.2 detected)]"); //$NON-NLS-1$							
-			}
-
-			try {
-				Library.loadLibrary ("swt-mozilla"); //$NON-NLS-1$
-			} catch (UnsatisfiedLinkError e) {
-				try {
-					/* 
-					 * The initial loadLibrary attempt may have failed as a result of the user's
-					 * system not having libstdc++.so.6 installed, so try to load the alternate
-					 * swt mozilla library that depends on libswtc++.so.5 instead.
-					 */
-					Library.loadLibrary ("swt-mozilla-gcc3"); //$NON-NLS-1$
-				} catch (UnsatisfiedLinkError ex) {
-					browser.dispose ();
-					/*
-					 * Print the error from the first failed attempt since at this point it's
-					 * known that the failure was not due to the libstdc++.so.6 dependency.
-					 */
-					SWT.error (SWT.ERROR_NO_HANDLES, e, " [MOZILLA_FIVE_HOME='" + mozillaPath + "']"); //$NON-NLS-1$ //$NON-NLS-2$
-				}
-			}
+			/* load swt's mozilla library */
+			mozillaPath = initMozilla (mozillaPath);
 		}
 
 		if (!Initialized) {
-			LocationProvider = new AppFileLocProvider (mozillaPath);
+			/* create LocationProvider, which tells mozilla where to find things on the file system */
+			String profilePath = delegate.getProfilePath ();
+			LocationProvider = new AppFileLocProvider (mozillaPath, profilePath, isXULRunner);
 			LocationProvider.AddRef ();
 
-			/* extract external.xpt to temp */
-			String tempPath = System.getProperty ("java.io.tmpdir"); //$NON-NLS-1$
-			File componentsDir = new File (tempPath, "eclipse/mozillaComponents"); //$NON-NLS-1$
-			java.io.InputStream is = Library.class.getResourceAsStream ("/external.xpt"); //$NON-NLS-1$
-			if (is != null) {
-				if (!componentsDir.exists ()) {
-					componentsDir.mkdirs ();
-				}
-				int read;
-				byte [] buffer = new byte [4096];
-				File file = new File (componentsDir, "external.xpt"); //$NON-NLS-1$
-				try {
-					FileOutputStream os = new FileOutputStream (file);
-					while ((read = is.read (buffer)) != -1) {
-						os.write(buffer, 0, read);
-					}
-					os.close ();
-					is.close ();
-				} catch (FileNotFoundException e) {
-				} catch (IOException e) {
-				}
-			}
-			if (componentsDir.exists () && componentsDir.isDirectory ()) {
-				LocationProvider.setComponentsPath (componentsDir.getAbsolutePath ());
-			}
-
-			int /*long*/[] retVal = new int /*long*/[1];
-			nsEmbedString pathString = new nsEmbedString (mozillaPath);
-			int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, retVal);
-			pathString.dispose ();
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (retVal[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_ERROR_NULL_POINTER);
-			}
+			/* write external.xpt to the file system if needed */
+			initExternal (profilePath);
 
-			nsIFile localFile = new nsILocalFile (retVal[0]);
-			if (IsXULRunner) {
-				int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
-				/* alloc memory for two structs, the second is empty to signify the end of the list */
-				int /*long*/ ptr = C.malloc (size * 2);
-				C.memset (ptr, 0, size * 2);
-				nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
-				byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_InitEmbedding", true); //$NON-NLS-1$
-				functionLoad.functionName = C.malloc (bytes.length);
-				C.memmove (functionLoad.functionName, bytes, bytes.length);
-				functionLoad.function = C.malloc (C.PTR_SIZEOF);
-				C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
-				XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
-				XPCOM.XPCOMGlueLoadXULFunctions (ptr);
-				C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
-				int /*long*/ functionPtr = result[0];
-				result[0] = 0;
-				C.free (functionLoad.function);
-				C.free (functionLoad.functionName);
-				C.free (ptr);
-				if (functionPtr == 0) {
-            		browser.dispose ();
-            		error (XPCOM.NS_ERROR_NULL_POINTER);
-				}
-				rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress (), 0, 0);
-				if (rc == XPCOM.NS_OK) {
-					System.setProperty (XULRUNNER_PATH, mozillaPath);
-				}
-			} else {
-				rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
-			}
-			localFile.Release ();
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				SWT.error (SWT.ERROR_NO_HANDLES, null, " [MOZILLA_FIVE_HOME may not point at an embeddable GRE] [NS_InitEmbedding " + mozillaPath + " error " + rc + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			}
-			System.setProperty (GRE_INITIALIZED, "true"); //$NON-NLS-1$
+			/* load swt's mozilla/xulrunner library and invoke appropriate Init function */
+			initXPCOM (mozillaPath, isXULRunner);
 		}
 
-		/* If JavaXPCOM is detected then attempt to initialize it with the XULRunner being used */
-		if (IsXULRunner) {
-			try {
-				Class clazz = Class.forName ("org.mozilla.xpcom.Mozilla"); //$NON-NLS-1$
-				Method method = clazz.getMethod ("getInstance", new Class[0]); //$NON-NLS-1$
-				Object mozilla = method.invoke (null, new Object[0]);
-				method = clazz.getMethod ("getComponentManager", new Class[0]); //$NON-NLS-1$
-				try {
-					method.invoke (mozilla, new Object[0]);
-				} catch (InvocationTargetException e) {
-					/* indicates that JavaXPCOM has not been initialized yet */
-					Class fileClass = Class.forName ("java.io.File"); //$NON-NLS-1$
-					method = clazz.getMethod ("initialize", new Class[] {fileClass}); //$NON-NLS-1$
-					Constructor constructor = fileClass.getDeclaredConstructor (new Class[] {String.class});
-					Object argument = constructor.newInstance (new Object[] {mozillaPath});
-					method.invoke (mozilla, new Object[] {argument});
-				}
-			} catch (ClassNotFoundException e) {
-				/* JavaXPCOM is not on the classpath */
-			} catch (NoSuchMethodException e) {
-				/* the JavaXPCOM on the classpath does not implement initialize() */
-			} catch (IllegalArgumentException e) {
-			} catch (IllegalAccessException e) {
-			} catch (InvocationTargetException e) {
-			} catch (InstantiationException e) {
-			}
-		}
+		/* attempt to initialize JavaXPCOM in the detected XULRunner */
+		if (isXULRunner) initJavaXPCOM (mozillaPath);
 
+		/* get the nsIComponentManager and nsIServiceManager, used throughout initialization */
 		int rc = XPCOM.NS_GetComponentManager (result);
 		if (rc != XPCOM.NS_OK) {
 			browser.dispose ();
@@ -637,40 +682,9 @@ public void create (Composite parent, int style) {
 			browser.dispose ();
 			error (XPCOM.NS_NOINTERFACE);
 		}
-		
 		nsIComponentManager componentManager = new nsIComponentManager (result[0]);
 		result[0] = 0;
-		if (delegate.needsSpinup ()) {
-			/* nsIAppShell is discontinued as of xulrunner 1.9, so do not fail if it is not found */
-			rc = componentManager.CreateInstance (XPCOM.NS_APPSHELL_CID, 0, nsIAppShell.NS_IAPPSHELL_IID, result);
-			if (rc != XPCOM.NS_ERROR_NO_INTERFACE) {
-				if (rc != XPCOM.NS_OK) {
-					browser.dispose ();
-					error (rc);
-				}
-				if (result[0] == 0) {
-					browser.dispose ();
-					error (XPCOM.NS_NOINTERFACE);
-				}
-	
-				AppShell = new nsIAppShell (result[0]);
-				rc = AppShell.Create (0, null);
-				if (rc != XPCOM.NS_OK) {
-					browser.dispose ();
-					error (rc);
-				}
-				rc = AppShell.Spinup ();
-				if (rc != XPCOM.NS_OK) {
-					browser.dispose ();
-					error (rc);
-				}
-			}
-			result[0] = 0;
-		}
 
-		WindowCreator = new WindowCreator2 ();
-		WindowCreator.AddRef ();
-		
 		rc = XPCOM.NS_GetServiceManager (result);
 		if (rc != XPCOM.NS_OK) {
 			browser.dispose ();
@@ -680,425 +694,79 @@ public void create (Composite parent, int style) {
 			browser.dispose ();
 			error (XPCOM.NS_NOINTERFACE);
 		}
-		
 		nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
-		result[0] = 0;		
-		byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WINDOWWATCHER_CONTRACTID, true);
-		rc = serviceManager.GetServiceByContractID (aContractID, nsIWindowWatcher.NS_IWINDOWWATCHER_IID, result);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		if (result[0] == 0) {
-			browser.dispose ();
-			error (XPCOM.NS_NOINTERFACE);		
-		}
+		result[0] = 0;	
 
-		nsIWindowWatcher windowWatcher = new nsIWindowWatcher (result[0]);
-		result[0] = 0;
-		rc = windowWatcher.SetWindowCreator (WindowCreator.getAddress());
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		windowWatcher.Release ();
+		/* init the event handler if needed */
+		initSpinup (componentManager);
 
-		/* compute the profile directory and set it on the AppFileLocProvider */
-		if (LocationProvider != null) {
-			byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DIRECTORYSERVICE_CONTRACTID, true);
-			rc = serviceManager.GetServiceByContractID (buffer, nsIDirectoryService.NS_IDIRECTORYSERVICE_IID, result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-
-			nsIDirectoryService directoryService = new nsIDirectoryService (result[0]);
-			result[0] = 0;
-			rc = directoryService.QueryInterface (nsIProperties.NS_IPROPERTIES_IID, result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			directoryService.Release ();
-
-			nsIProperties properties = new nsIProperties (result[0]);
-			result[0] = 0;
-			buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_APP_APPLICATION_REGISTRY_DIR, true);
-			rc = properties.Get (buffer, nsIFile.NS_IFILE_IID, result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			properties.Release ();
-
-			nsIFile profileDir = new nsIFile (result[0]);
-			result[0] = 0;
-			int /*long*/ path = XPCOM.nsEmbedCString_new ();
-			rc = profileDir.GetNativePath (path);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			int length = XPCOM.nsEmbedCString_Length (path);
-			int /*long*/ ptr = XPCOM.nsEmbedCString_get (path);
-			buffer = new byte [length];
-			XPCOM.memmove (buffer, ptr, length);
-			String profilePath = new String (MozillaDelegate.mbcsToWcs (null, buffer)) + PROFILE_DIR;
-			LocationProvider.setProfilePath (profilePath);
-			LocationProvider.isXULRunner = IsXULRunner;
-			XPCOM.nsEmbedCString_delete (path);
-			profileDir.Release ();
-
-			/* notify observers of a new profile directory being used */
-			buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_OBSERVER_CONTRACTID, true);
-			rc = serviceManager.GetServiceByContractID (buffer, nsIObserverService.NS_IOBSERVERSERVICE_IID, result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-
-			nsIObserverService observerService = new nsIObserverService (result[0]);
-			result[0] = 0;
-			buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_DO_CHANGE, true);
-			length = STARTUP.length ();
-			char[] chars = new char [length + 1];
-			STARTUP.getChars (0, length, chars, 0);
-			rc = observerService.NotifyObservers (0, buffer, chars);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_AFTER_CHANGE, true);
-			rc = observerService.NotifyObservers (0, buffer, chars);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			observerService.Release ();
-
-	        if (IsXULRunner) {
-				int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
-				/* alloc memory for two structs, the second is empty to signify the end of the list */
-				ptr = C.malloc (size * 2);
-				C.memset (ptr, 0, size * 2);
-				nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
-				byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_NotifyProfile", true); //$NON-NLS-1$
-				functionLoad.functionName = C.malloc (bytes.length);
-				C.memmove (functionLoad.functionName, bytes, bytes.length);
-				functionLoad.function = C.malloc (C.PTR_SIZEOF);
-				C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
-				XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
-				XPCOM.XPCOMGlueLoadXULFunctions (ptr);
-				C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
-				int /*long*/ functionPtr = result[0];
-				result[0] = 0;
-				C.free (functionLoad.function);
-				C.free (functionLoad.functionName);
-				C.free (ptr);
-				/* functionPtr == 0 for xulrunner < 1.9 */
-				if (functionPtr != 0) {
-					rc = XPCOM.Call (functionPtr);
-	            	if (rc != XPCOM.NS_OK) {
-	            		browser.dispose ();
-	            		error (rc);
-	            	}
-				}
-	        }
-		}
-
-		/*
-		 * As a result of using a common profile the user cannot change their locale
-		 * and charset.  The fix for this is to set mozilla's locale and charset
-		 * preference values according to the user's current locale and charset.
-		 */
-		aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFSERVICE_CONTRACTID, true);
-		rc = serviceManager.GetServiceByContractID (aContractID, nsIPrefService.NS_IPREFSERVICE_IID, result);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		if (result[0] == 0) {
-			browser.dispose ();
-			error (XPCOM.NS_NOINTERFACE);
-		}
-
-		nsIPrefService prefService = new nsIPrefService (result[0]);
-		result[0] = 0;
-		byte[] buffer = new byte[1];
-		rc = prefService.GetBranch (buffer, result);	/* empty buffer denotes root preference level */
-		prefService.Release ();
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		if (result[0] == 0) {
-			browser.dispose ();
-			error (XPCOM.NS_NOINTERFACE);
-		}
-
-		nsIPrefBranch prefBranch = new nsIPrefBranch (result[0]);
-		result[0] = 0;
-
-		/* get Mozilla's current locale preference value */
-		String prefLocales = null;
-		nsIPrefLocalizedString localizedString = null;
-		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_LANGUAGES, true);
-		rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
-		/* 
-		 * Feature of Debian.  For some reason attempting to query for the current locale
-		 * preference fails on Debian.  The workaround for this is to assume a value of
-		 * "en-us,en" since this is typically the default value when mozilla is used without
-		 * a profile.
-		 */
-		if (rc != XPCOM.NS_OK) {
-			prefLocales = "en-us,en" + TOKENIZER_LOCALE;	//$NON-NLS-1$
-		} else {
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			localizedString = new nsIPrefLocalizedString (result[0]);
-			result[0] = 0;
-			rc = localizedString.ToString (result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			int length = XPCOM.strlen_PRUnichar (result[0]);
-			char[] dest = new char[length];
-			XPCOM.memmove (dest, result[0], length * 2);
-			prefLocales = new String (dest) + TOKENIZER_LOCALE;
-		}
-		result[0] = 0;
+		/* init our WindowCreator, which mozilla uses for the creation of child browsers in external Shells */
+		initWindowCreator (serviceManager);
 
-		/*
-		 * construct the new locale preference value by prepending the
-		 * user's current locale and language to the original value 
-		 */
-		Locale locale = Locale.getDefault ();
-		String language = locale.getLanguage ();
-		String country = locale.getCountry ();
-		StringBuffer stringBuffer = new StringBuffer (language);
-		stringBuffer.append (SEPARATOR_LOCALE);
-		stringBuffer.append (country.toLowerCase ());
-		stringBuffer.append (TOKENIZER_LOCALE);
-		stringBuffer.append (language);
-		stringBuffer.append (TOKENIZER_LOCALE);
-		String newLocales = stringBuffer.toString ();
-
-		int start, end = -1;
-		do {
-			start = end + 1;
-			end = prefLocales.indexOf (TOKENIZER_LOCALE, start);
-			String token;
-			if (end == -1) {
-				token = prefLocales.substring (start);
-			} else {
-				token = prefLocales.substring (start, end);
-			}
-			if (token.length () > 0) {
-				token = (token + TOKENIZER_LOCALE).trim ();
-				/* ensure that duplicate locale values are not added */
-				if (newLocales.indexOf (token) == -1) {
-					stringBuffer.append (token);
-				}
-			}
-		} while (end != -1);
-		newLocales = stringBuffer.toString ();
-		if (!newLocales.equals (prefLocales)) {
-			/* write the new locale value */
-			newLocales = newLocales.substring (0, newLocales.length () - TOKENIZER_LOCALE.length ()); /* remove trailing tokenizer */
-			int length = newLocales.length ();
-			char[] charBuffer = new char[length + 1];
-			newLocales.getChars (0, length, charBuffer, 0);
-			if (localizedString == null) {
-				byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
-				rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
-				if (rc != XPCOM.NS_OK) {
-					browser.dispose ();
-					error (rc);
-				}
-				if (result[0] == 0) {
-					browser.dispose ();
-					error (XPCOM.NS_NOINTERFACE);
-				}
-				localizedString = new nsIPrefLocalizedString (result[0]);
-				result[0] = 0;
-			}
-			localizedString.SetDataWithLength (length, charBuffer);
-			rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress());
-		}
-		if (localizedString != null) {
-			localizedString.Release ();
-			localizedString = null;
-		}
+		/* notify mozilla that the profile directory has been changed from its default value */
+		initProfile (serviceManager, isXULRunner);
 
-		/* get Mozilla's current charset preference value */
-		String prefCharset = null;
-		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_CHARSET, true);
-		rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
-		/* 
-		 * Feature of Debian.  For some reason attempting to query for the current charset
-		 * preference fails on Debian.  The workaround for this is to assume a value of
-		 * "ISO-8859-1" since this is typically the default value when mozilla is used
-		 * without a profile.
-		 */
-		if (rc != XPCOM.NS_OK) {
-			prefCharset = "ISO-8859-1";	//$NON_NLS-1$
-		} else {
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			localizedString = new nsIPrefLocalizedString (result[0]);
-			result[0] = 0;
-			rc = localizedString.ToString (result);
-			if (rc != XPCOM.NS_OK) {
-				browser.dispose ();
-				error (rc);
-			}
-			if (result[0] == 0) {
-				browser.dispose ();
-				error (XPCOM.NS_NOINTERFACE);
-			}
-			int length = XPCOM.strlen_PRUnichar (result[0]);
-			char[] dest = new char[length];
-			XPCOM.memmove (dest, result[0], length * 2);
-			prefCharset = new String (dest);
-		}
-		result[0] = 0;
+		/* init preference values that give desired mozilla behaviours */ 
+		initPreferences (serviceManager, componentManager);
 
-		String newCharset = System.getProperty ("file.encoding");	// $NON-NLS-1$
-		if (!newCharset.equals (prefCharset)) {
-			/* write the new charset value */
-			int length = newCharset.length ();
-			char[] charBuffer = new char[length + 1];
-			newCharset.getChars (0, length, charBuffer, 0);
-			if (localizedString == null) {
-				byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
-				rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
-				if (rc != XPCOM.NS_OK) {
-					browser.dispose ();
-					error (rc);
-				}
-				if (result[0] == 0) {
-					browser.dispose ();
-					error (XPCOM.NS_NOINTERFACE);
-				}
-				localizedString = new nsIPrefLocalizedString (result[0]);
-				result[0] = 0;
-			}
-			localizedString.SetDataWithLength (length, charBuffer);
-			rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
-		}
-		if (localizedString != null) localizedString.Release ();
+		/* init our various factories that mozilla can invoke as needed */ 
+		initFactories (serviceManager, componentManager, isXULRunner);
 
-		/*
-		* Check for proxy values set as documented java properties and update mozilla's
-		* preferences with these values if needed.
-		*/
-		String proxyHost = System.getProperty (PROPERTY_PROXYHOST);
-		String proxyPortString = System.getProperty (PROPERTY_PROXYPORT);
+		serviceManager.Release ();
+		componentManager.Release ();
 
-		int port = -1;
-		if (proxyPortString != null) {
-			try {
-				int value = Integer.valueOf (proxyPortString).intValue ();
-				if (0 <= value && value <= MAX_PORT) port = value;
-			} catch (NumberFormatException e) {
-				/* do nothing, java property has non-integer value */
-			}
+		/* add cookies that were set by a client before the first Mozilla instance was created */
+		if (MozillaPendingCookies != null) {
+			SetPendingCookies (MozillaPendingCookies);
 		}
+		MozillaPendingCookies = null;
 
-		if (proxyHost != null) {
-			byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
-			rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
-			if (rc != XPCOM.NS_OK) error (rc);
-			if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+		Initialized = true;
+	}
 
-			localizedString = new nsIPrefLocalizedString (result[0]);
-			result[0] = 0;
-			int length = proxyHost.length ();
-			char[] charBuffer = new char[length + 1];
-			proxyHost.getChars (0, length, charBuffer, 0);
-			rc = localizedString.SetDataWithLength (length, charBuffer);
-			if (rc != XPCOM.NS_OK) error (rc);
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_FTP, true);
-			rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
-			if (rc != XPCOM.NS_OK) error (rc);
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_HTTP, true);
-			rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
-			if (rc != XPCOM.NS_OK) error (rc);
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_SSL, true);
-			rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
-			if (rc != XPCOM.NS_OK) error (rc);
-			localizedString.Release ();
-		}
+	BrowserCount++;
 
-		if (port != -1) {
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_FTP, true);
-			rc = prefBranch.SetIntPref (buffer, port);
-			if (rc != XPCOM.NS_OK) error (rc);
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_HTTP, true);
-			rc = prefBranch.SetIntPref (buffer, port);
-			if (rc != XPCOM.NS_OK) error (rc);
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_SSL, true);
-			rc = prefBranch.SetIntPref (buffer, port);
-			if (rc != XPCOM.NS_OK) error (rc);
-		}
+	if (display.getData (DISPOSE_LISTENER_HOOKED) == null) {
+		display.setData (DISPOSE_LISTENER_HOOKED, DISPOSE_LISTENER_HOOKED);
+		display.addListener (SWT.Dispose, DisplayListener);
+	}
 
-		if (proxyHost != null || port != -1) {
-			buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYTYPE, true);
-			rc = prefBranch.SetIntPref (buffer, 1);
-			if (rc != XPCOM.NS_OK) error (rc);
-		}
+	/* get the nsIComponentManager, used throughout initialization */
+	int rc = XPCOM.NS_GetComponentManager (result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);
+	}
+	nsIComponentManager componentManager = new nsIComponentManager (result[0]);
+	result[0] = 0;
 
-		/*
-		* Ensure that windows that are shown during page loads are not blocked.  Firefox may
-		* try to block these by default since such windows are often unwelcome, but this
-		* assumption should not be made in the Browser's context.  Since the Browser client
-		* is responsible for creating the new Browser and Shell in an OpenWindowListener,
-		* they should decide whether the new window is unwelcome or not and act accordingly. 
-		*/
-		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_DISABLEOPENDURINGLOAD, true);
-		rc = prefBranch.SetBoolPref (buffer, 0);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
+	/* create the nsIWebBrowser instance */
+	nsID NS_IWEBBROWSER_CID = new nsID ("F1EAC761-87E9-11d3-AF80-00A024FFC08C"); //$NON-NLS-1$
+	rc = componentManager.CreateInstance (NS_IWEBBROWSER_CID, 0, nsIWebBrowser.NS_IWEBBROWSER_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);	
+	}
+	webBrowser = new nsIWebBrowser (result[0]);
+	result[0] = 0;
 
-		/* Ensure that the status text can be set through means like javascript */ 
-		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_DISABLEWINDOWSTATUSCHANGE, true);
-		rc = prefBranch.SetBoolPref (buffer, 0);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
+	/* create the instance-based callback interfaces */
+	createCOMInterfaces ();
+	AddRef ();
 
-		prefBranch.Release ();
+	/* init the nsIWebBrowser's container and base windows */
+	initWebBrowserWindows ();
 
-		PromptService2Factory factory = new PromptService2Factory ();
-		factory.AddRef ();
+	if (!PerformedVersionCheck) {
+		PerformedVersionCheck = true;
 
 		rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
 		if (rc != XPCOM.NS_OK) {
@@ -1109,307 +777,50 @@ public void create (Composite parent, int style) {
 			browser.dispose ();
 			error (XPCOM.NS_NOINTERFACE);
 		}
-		
 		nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
 		result[0] = 0;
-		componentRegistrar.AutoRegister (0);	 /* detect the External component */ 
 
-		aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PROMPTSERVICE_CONTRACTID, true); 
-		byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "Prompt Service", true); //$NON-NLS-1$
-		rc = componentRegistrar.RegisterFactory (XPCOM.NS_PROMPTSERVICE_CID, aClassName, aContractID, factory.getAddress ());
+		HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
+		dialogFactory.AddRef ();
+		byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID, true);
+		byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "swtHelperAppLauncherDialog", true); //$NON-NLS-1$
+		rc = componentRegistrar.RegisterFactory (XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CID, aClassName, aContractID, dialogFactory.getAddress ());
 		if (rc != XPCOM.NS_OK) {
 			browser.dispose ();
 			error (rc);
 		}
-		factory.Release ();
+		dialogFactory.Release ();
 
-		ExternalFactory externalFactory = new ExternalFactory ();
-		externalFactory.AddRef ();
-		aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.EXTERNAL_CONTRACTID, true); 
-		aClassName = MozillaDelegate.wcsToMbcs (null, "External", true); //$NON-NLS-1$
-		rc = componentRegistrar.RegisterFactory (XPCOM.EXTERNAL_CID, aClassName, aContractID, externalFactory.getAddress ());
+		/*
+		* Check for the availability of the pre-1.8 implementation of nsIDocShell
+		* to determine if the GRE's version is < 1.8.
+		*/
+		rc = webBrowser.QueryInterface (nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID, result);
 		if (rc != XPCOM.NS_OK) {
 			browser.dispose ();
-			error (rc);
+			error (XPCOM.NS_ERROR_FAILURE);
 		}
-		externalFactory.Release ();
-
-		rc = serviceManager.GetService (XPCOM.NS_CATEGORYMANAGER_CID, nsICategoryManager.NS_ICATEGORYMANAGER_IID, result);
-		if (rc != XPCOM.NS_OK) error (rc);
-		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-		serviceManager.Release ();
-
-		nsICategoryManager categoryManager = new nsICategoryManager (result[0]);
+		if (result[0] == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_ERROR_NO_INTERFACE);
+		}
+		nsIInterfaceRequestor interfaceRequestor = new nsIInterfaceRequestor (result[0]);
 		result[0] = 0;
-		byte[] category = MozillaDelegate.wcsToMbcs (null, "JavaScript global property", true); //$NON-NLS-1$
-		byte[] entry = MozillaDelegate.wcsToMbcs (null, "external", true); //$NON-NLS-1$
-		rc = categoryManager.AddCategoryEntry(category, entry, aContractID, 1, 1, result);
+
+		rc = interfaceRequestor.GetInterface (nsIDocShell.NS_IDOCSHELL_IID, result);
+		if (rc == XPCOM.NS_OK && result[0] != 0) {
+			IsPre_1_8 = true;
+			new nsISupports (result[0]).Release ();
+		}
 		result[0] = 0;
-		categoryManager.Release ();
+		IsPre_1_9 = true;
 
 		/*
-		* This Download factory will be used if the GRE version is < 1.8.
-		* If the GRE version is 1.8.x then the Download factory that is registered later for
-		*   contract "Transfer" will be used.
-		* If the GRE version is >= 1.9 then no Download factory is registered because this
-		*   functionality is provided by the GRE.
-		*/
-		DownloadFactory downloadFactory = new DownloadFactory ();
-		downloadFactory.AddRef ();
-		aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DOWNLOAD_CONTRACTID, true);
-		aClassName = MozillaDelegate.wcsToMbcs (null, "Download", true); //$NON-NLS-1$
-		rc = componentRegistrar.RegisterFactory (XPCOM.NS_DOWNLOAD_CID, aClassName, aContractID, downloadFactory.getAddress ());
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		downloadFactory.Release ();
-
-		FilePickerFactory pickerFactory = IsXULRunner ? new FilePickerFactory_1_8 () : new FilePickerFactory ();
-		pickerFactory.AddRef ();
-		aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_FILEPICKER_CONTRACTID, true);
-		aClassName = MozillaDelegate.wcsToMbcs (null, "FilePicker", true); //$NON-NLS-1$
-		rc = componentRegistrar.RegisterFactory (XPCOM.NS_FILEPICKER_CID, aClassName, aContractID, pickerFactory.getAddress ());
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		pickerFactory.Release ();
-
-		componentRegistrar.Release ();
-		componentManager.Release ();
-
-		Initialized = true;
-	}
-
-	if (display.getData (DISPOSE_LISTENER_HOOKED) == null) {
-		display.setData (DISPOSE_LISTENER_HOOKED, DISPOSE_LISTENER_HOOKED);
-		display.addListener (SWT.Dispose, new Listener () {
-			public void handleEvent (Event event) {
-				if (BrowserCount > 0) return; /* another display is still active */
-
-				int /*long*/[] result = new int /*long*/[1];
-				int rc = XPCOM.NS_GetServiceManager (result);
-				if (rc != XPCOM.NS_OK) error (rc);
-				if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-
-				nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
-				result[0] = 0;		
-				byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_OBSERVER_CONTRACTID, true);
-				rc = serviceManager.GetServiceByContractID (buffer, nsIObserverService.NS_IOBSERVERSERVICE_IID, result);
-				if (rc != XPCOM.NS_OK) error (rc);
-				if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-
-				nsIObserverService observerService = new nsIObserverService (result[0]);
-				result[0] = 0;
-				buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_BEFORE_CHANGE, true);
-				int length = SHUTDOWN_PERSIST.length ();
-				char[] chars = new char [length + 1];
-				SHUTDOWN_PERSIST.getChars (0, length, chars, 0);
-				rc = observerService.NotifyObservers (0, buffer, chars);
-				if (rc != XPCOM.NS_OK) error (rc);
-				observerService.Release ();
-
-				if (LocationProvider != null) {
-					String prefsLocation = LocationProvider.profilePath + AppFileLocProvider.PREFERENCES_FILE;
-					nsEmbedString pathString = new nsEmbedString (prefsLocation);
-					rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result);
-					if (rc != XPCOM.NS_OK) Mozilla.error (rc);
-					if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER);
-					pathString.dispose ();
-
-					nsILocalFile localFile = new nsILocalFile (result [0]);
-					result[0] = 0;
-				    rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); 
-					if (rc != XPCOM.NS_OK) Mozilla.error (rc);
-					if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE);
-					localFile.Release ();
-
-					nsIFile prefFile = new nsIFile (result[0]);
-					result[0] = 0;
-
-					buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFSERVICE_CONTRACTID, true);
-					rc = serviceManager.GetServiceByContractID (buffer, nsIPrefService.NS_IPREFSERVICE_IID, result);
-					if (rc != XPCOM.NS_OK) error (rc);
-					if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-
-					nsIPrefService prefService = new nsIPrefService (result[0]);
-					result[0] = 0;
-					rc = prefService.SavePrefFile (prefFile.getAddress ());
-					prefService.Release ();
-					prefFile.Release ();
-				}
-				serviceManager.Release ();
-
-				if (XPCOMWasGlued) {
-					/*
-					* The following is intentionally commented because it causes subsequent
-					* browser instantiations within the process to fail.  Mozilla does not
-					* support being unloaded and then re-initialized in a process, see
-					* http://www.mail-archive.com/dev-embedding@lists.mozilla.org/msg01732.html . 
-					*/
-
-//					int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
-//					/* alloc memory for two structs, the second is empty to signify the end of the list */
-//					int /*long*/ ptr = C.malloc (size * 2);
-//					C.memset (ptr, 0, size * 2);
-//					nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
-//					byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_TermEmbedding", true); //$NON-NLS-1$
-//					functionLoad.functionName = C.malloc (bytes.length);
-//					C.memmove (functionLoad.functionName, bytes, bytes.length);
-//					functionLoad.function = C.malloc (C.PTR_SIZEOF);
-//					C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
-//					XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
-//					XPCOM.XPCOMGlueLoadXULFunctions (ptr);
-//					C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
-//					int /*long*/ functionPtr = result[0];
-//					result[0] = 0;
-//					C.free (functionLoad.function);
-//					C.free (functionLoad.functionName);
-//					C.free (ptr);
-//					XPCOM.Call (functionPtr);
-
-//					XPCOM.XPCOMGlueShutdown ();
-					XPCOMWasGlued = false;
-				}
-				if (XPCOMInitWasGlued) {
-					XPCOMInit.XPCOMGlueShutdown ();
-					XPCOMInitWasGlued = false;
-				}
-				Initialized = false;
-			}
-		});
-	}
-
-	BrowserCount++;
-	int rc = XPCOM.NS_GetComponentManager (result);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (rc);
-	}
-	if (result[0] == 0) {
-		browser.dispose ();
-		error (XPCOM.NS_NOINTERFACE);
-	}
-	
-	nsIComponentManager componentManager = new nsIComponentManager (result[0]);
-	result[0] = 0;
-	nsID NS_IWEBBROWSER_CID = new nsID ("F1EAC761-87E9-11d3-AF80-00A024FFC08C"); //$NON-NLS-1$
-	rc = componentManager.CreateInstance (NS_IWEBBROWSER_CID, 0, nsIWebBrowser.NS_IWEBBROWSER_IID, result);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (rc);
-	}
-	if (result[0] == 0) {
-		browser.dispose ();
-		error (XPCOM.NS_NOINTERFACE);	
-	}
-	
-	webBrowser = new nsIWebBrowser (result[0]);
-	result[0] = 0;
-
-	createCOMInterfaces ();
-	AddRef ();
-
-	rc = webBrowser.SetContainerWindow (webBrowserChrome.getAddress());
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (rc);
-	}
-			
-	rc = webBrowser.QueryInterface (nsIBaseWindow.NS_IBASEWINDOW_IID, result);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (rc);
-	}
-	if (result[0] == 0) {
-		browser.dispose ();
-		error (XPCOM.NS_ERROR_NO_INTERFACE);
-	}
-	
-	nsIBaseWindow baseWindow = new nsIBaseWindow (result[0]);
-	result[0] = 0;
-	Rectangle rect = browser.getClientArea ();
-	if (rect.isEmpty ()) {
-		rect.width = 1;
-		rect.height = 1;
-	}
-
-	embedHandle = delegate.getHandle ();
-
-	rc = baseWindow.InitWindow (embedHandle, 0, 0, 0, rect.width, rect.height);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (XPCOM.NS_ERROR_FAILURE);
-	}
-	rc = delegate.createBaseWindow (baseWindow);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (XPCOM.NS_ERROR_FAILURE);
-	}
-	rc = baseWindow.SetVisibility (1);
-	if (rc != XPCOM.NS_OK) {
-		browser.dispose ();
-		error (XPCOM.NS_ERROR_FAILURE);
-	}
-	baseWindow.Release ();
-
-	if (!PerformedVersionCheck) {
-		PerformedVersionCheck = true;
-
-		rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		if (result[0] == 0) {
-			browser.dispose ();
-			error (XPCOM.NS_NOINTERFACE);
-		}
-		nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
-		result[0] = 0;
-
-		HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
-		dialogFactory.AddRef ();
-		byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID, true);
-		byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "Helper App Launcher Dialog", true); //$NON-NLS-1$
-		rc = componentRegistrar.RegisterFactory (XPCOM.NS_HELPERAPPLAUNCHERDIALOG_CID, aClassName, aContractID, dialogFactory.getAddress ());
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (rc);
-		}
-		dialogFactory.Release ();
-
-		/*
-		* Check for the availability of the pre-1.8 implementation of nsIDocShell
-		* to determine if the GRE's version is < 1.8.
-		*/
-		rc = webBrowser.QueryInterface (nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID, result);
-		if (rc != XPCOM.NS_OK) {
-			browser.dispose ();
-			error (XPCOM.NS_ERROR_FAILURE);
-		}
-		if (result[0] == 0) {
-			browser.dispose ();
-			error (XPCOM.NS_ERROR_NO_INTERFACE);
-		}
-		nsIInterfaceRequestor interfaceRequestor = new nsIInterfaceRequestor (result[0]);
-		result[0] = 0;
-
-		rc = interfaceRequestor.GetInterface (nsIDocShell.NS_IDOCSHELL_IID, result);
-		if (rc == XPCOM.NS_OK && result[0] != 0) {
-			IsPre_1_8 = true;
-			new nsISupports (result[0]).Release ();
-		}
-		result[0] = 0;
-		IsPre_1_9 = true;
-
-		/*
-		* A Download factory for contract "Transfer" must be registered iff the GRE's version is 1.8.x.
-		*   Check for the availability of the 1.8 implementation of nsIDocShell to determine if the
-		*   GRE's version is 1.8.x.
-		* If the GRE version is < 1.8 then the previously-registered Download factory for contract
-		*   "Download" will be used.
+		* A Download factory for contract "Transfer" must be registered iff the GRE's version is 1.8.x.
+		*   Check for the availability of the 1.8 implementation of nsIDocShell to determine if the
+		*   GRE's version is 1.8.x.
+		* If the GRE version is < 1.8 then the previously-registered Download factory for contract
+		*   "Download" will be used.
 		* If the GRE version is >= 1.9 then no Download factory is registered because this
 		*   functionality is provided by the GRE.
 		*/
@@ -1422,7 +833,7 @@ public void create (Composite parent, int style) {
 				DownloadFactory_1_8 downloadFactory_1_8 = new DownloadFactory_1_8 ();
 				downloadFactory_1_8.AddRef ();
 				aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_TRANSFER_CONTRACTID, true);
-				aClassName = MozillaDelegate.wcsToMbcs (null, "Transfer", true); //$NON-NLS-1$
+				aClassName = MozillaDelegate.wcsToMbcs (null, "swtTransfer", true); //$NON-NLS-1$
 				rc = componentRegistrar.RegisterFactory (XPCOM.NS_DOWNLOAD_CID, aClassName, aContractID, downloadFactory_1_8.getAddress ());
 				if (rc != XPCOM.NS_OK) {
 					browser.dispose ();
@@ -1451,12 +862,12 @@ public void create (Composite parent, int style) {
 		delegate.addWindowSubclass ();
 	}
 
+	/* add listeners for progress and content */
 	rc = webBrowser.AddWebBrowserListener (weakReference.getAddress (), nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID);
 	if (rc != XPCOM.NS_OK) {
 		browser.dispose ();
 		error (rc);
 	}
-
 	rc = webBrowser.SetParentURIContentListener (uriContentListener.getAddress ());
 	if (rc != XPCOM.NS_OK) {
 		browser.dispose ();
@@ -1514,11 +925,13 @@ public void create (Composite parent, int style) {
 		SWT.Activate,
 		SWT.Deactivate,
 		SWT.Show,
-		SWT.KeyDown		// needed to make browser traversable
+		SWT.KeyDown,		/* needed to make browser traversable */
 	};
 	for (int i = 0; i < folderEvents.length; i++) {
 		browser.addListener (folderEvents[i], listener);
 	}
+
+	return true;
 }
 
 public boolean back () {
@@ -1535,6 +948,22 @@ public boolean back () {
 	return rc == XPCOM.NS_OK;
 }
 
+public boolean close () {
+	final boolean[] result = new boolean[] {false};
+	LocationListener[] oldListeners = locationListeners;
+	locationListeners = new LocationListener[] {
+		new LocationAdapter () {
+			public void changing (LocationEvent event) {
+				/* implies that the user did not veto the page unload */
+				result[0] = true;
+			}
+		} 
+	};
+	execute ("window.location.replace('about:blank');"); //$NON-NLS-1$
+	locationListeners = oldListeners;
+	return result[0];
+}
+
 void createCOMInterfaces () {
 	// Create each of the interfaces that this object implements
 	supports = new XPCOMObject (new int[] {2, 0, 0}) {
@@ -1816,12 +1245,13 @@ public boolean execute (String script) {
 								int /*long*/ principals = result[0];
 								result[0] = 0;
 								principal.Release ();
-								String mozillaPath = LocationProvider.mozillaPath + delegate.getJSLibraryName () + '\0';
-								byte[] pathBytes = null;
-								try {
-									pathBytes = mozillaPath.getBytes ("UTF-8"); //$NON-NLS-1$
-								} catch (UnsupportedEncodingException e) {
-									pathBytes = mozillaPath.getBytes ();
+								if (pathBytes_JSEvaluateUCScriptForPrincipals == null) {
+									String mozillaPath = getMozillaPath () + delegate.getJSLibraryName () + '\0';
+									try {
+										pathBytes_JSEvaluateUCScriptForPrincipals = mozillaPath.getBytes ("UTF-8"); //$NON-NLS-1$
+									} catch (UnsupportedEncodingException e) {
+										pathBytes_JSEvaluateUCScriptForPrincipals = mozillaPath.getBytes ();
+									}
 								}
 
 								aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_CONTEXTSTACK_CONTRACTID, true);
@@ -1834,7 +1264,7 @@ public boolean execute (String script) {
 								result[0] = 0;
 								rc = stack.Push (nativeContext);
 								if (rc != XPCOM.NS_OK) error (rc);
-								boolean success = XPCOM.JS_EvaluateUCScriptForPrincipals (pathBytes, nativeContext, globalJSObject, principals, scriptChars, length, urlbytes, 0, result) != 0;
+								boolean success = XPCOM.JS_EvaluateUCScriptForPrincipals (pathBytes_JSEvaluateUCScriptForPrincipals, nativeContext, globalJSObject, principals, scriptChars, length, urlbytes, 0, result) != 0;
 								result[0] = 0;
 								rc = stack.Pop (result);
 								if (rc != XPCOM.NS_OK) error (rc);
@@ -1859,9 +1289,9 @@ public boolean execute (String script) {
 	if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
 
 	nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);
-    char[] arg = url.toCharArray (); 
-    char[] c = new char[arg.length+1];
-    System.arraycopy (arg, 0, c, 0, arg.length);
+	char[] arg = url.toCharArray (); 
+	char[] c = new char[arg.length+1];
+	System.arraycopy (arg, 0, c, 0, arg.length);
 	rc = webNavigation.LoadURI (c, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0);
 	webNavigation.Release ();
 	return rc == XPCOM.NS_OK;
@@ -1935,130 +1365,1025 @@ public String getBrowserType () {
 	return "mozilla"; //$NON-NLS-1$
 }
 
-int getNextFunctionIndex () {
-	return NextJSFunctionIndex++;
-}
+static String getMozillaPath () {
+	if (LocationProvider != null) return LocationProvider.mozillaPath;
+	if (!Initialized) return "";
 
-public String getText () {
 	int /*long*/[] result = new int /*long*/[1];
-	int rc = webBrowser.GetContentDOMWindow (result);
+	int rc = XPCOM.NS_GetServiceManager (result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 
-	nsIDOMWindow window = new nsIDOMWindow (result[0]);
+	nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
 	result[0] = 0;
-	rc = window.GetDocument (result);
+	byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DIRECTORYSERVICE_CONTRACTID, true);
+	rc = serviceManager.GetServiceByContractID (buffer, nsIDirectoryService.NS_IDIRECTORYSERVICE_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-	window.Release ();
+	serviceManager.Release();
 
-	int /*long*/ document = result[0];
+	nsIDirectoryService directoryService = new nsIDirectoryService (result[0]);
 	result[0] = 0;
-	rc = XPCOM.NS_GetComponentManager (result);
+	rc = directoryService.QueryInterface (nsIProperties.NS_IPROPERTIES_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+	directoryService.Release ();
+
+	nsIProperties properties = new nsIProperties (result[0]);
+	result[0] = 0;
+	buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_GRE_DIR, true);
+	rc = properties.Get (buffer, nsIFile.NS_IFILE_IID, result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+	properties.Release ();
+
+	nsIFile mozillaDir = new nsIFile (result[0]);
+	result[0] = 0;
+	int /*long*/ path = XPCOM.nsEmbedCString_new ();
+	rc = mozillaDir.GetNativePath (path);
+	if (rc != XPCOM.NS_OK) error (rc);
+	int length = XPCOM.nsEmbedCString_Length (path);
+	int /*long*/ ptr = XPCOM.nsEmbedCString_get (path);
+	buffer = new byte[length];
+	XPCOM.memmove (buffer, ptr, length);
+	XPCOM.nsEmbedCString_delete (path);
+	mozillaDir.Release ();
+
+	return new String (MozillaDelegate.mbcsToWcs (null, buffer)) + SEPARATOR_OS;
+}
+
+int getNextFunctionIndex () {
+	return NextJSFunctionIndex++;
+}
+
+public String getText () {
+	int /*long*/[] result = new int /*long*/[1];
+	int rc = webBrowser.GetContentDOMWindow (result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+	nsIDOMWindow window = new nsIDOMWindow (result[0]);
+	result[0] = 0;
+	rc = window.GetDocument (result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+	window.Release ();
+
+	int /*long*/ document = result[0];
+	result[0] = 0;
+	rc = XPCOM.NS_GetComponentManager (result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+	nsIComponentManager componentManager = new nsIComponentManager (result[0]);
+	result[0] = 0;
+	byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DOMSERIALIZER_CONTRACTID, true);
+	char[] chars = null;
+
+	rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIDOMSerializer_1_7.NS_IDOMSERIALIZER_IID, result);
+	if (rc == XPCOM.NS_OK) {	/* mozilla >= 1.7 */
+		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+		nsIDOMSerializer_1_7 serializer = new nsIDOMSerializer_1_7 (result[0]);
+		result[0] = 0;
+		int /*long*/ string = XPCOM.nsEmbedString_new ();
+		rc = serializer.SerializeToString (document, string);
+		serializer.Release ();
+
+		int length = XPCOM.nsEmbedString_Length (string);
+		int /*long*/ buffer = XPCOM.nsEmbedString_get (string);
+		chars = new char[length];
+		XPCOM.memmove (chars, buffer, length * 2);
+		XPCOM.nsEmbedString_delete (string);
+	} else {	/* mozilla < 1.7 */
+		rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIDOMSerializer.NS_IDOMSERIALIZER_IID, result);
+		if (rc != XPCOM.NS_OK) error (rc);
+		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+		nsIDOMSerializer serializer = new nsIDOMSerializer (result[0]);
+		result[0] = 0;
+		rc = serializer.SerializeToString (document, result);
+		serializer.Release ();
+
+		int length = XPCOM.strlen_PRUnichar (result[0]);
+		chars = new char[length];
+		XPCOM.memmove (chars, result[0], length * 2);
+	}
+
+	componentManager.Release ();
+	new nsISupports (document).Release ();
+	return new String (chars);
+}
+
+public String getUrl () {
+	int /*long*/[] result = new int /*long*/[1];
+	int rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
+
+	nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);
+	int /*long*/[] aCurrentURI = new int /*long*/[1];
+	rc = webNavigation.GetCurrentURI (aCurrentURI);
+	if (rc != XPCOM.NS_OK) error (rc);
+	webNavigation.Release ();
+
+	byte[] dest = null;
+	if (aCurrentURI[0] != 0) {
+		nsIURI uri = new nsIURI (aCurrentURI[0]);
+		int /*long*/ aSpec = XPCOM.nsEmbedCString_new ();
+		rc = uri.GetSpec (aSpec);
+		if (rc != XPCOM.NS_OK) error (rc);
+		int length = XPCOM.nsEmbedCString_Length (aSpec);
+		int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec);
+		dest = new byte[length];
+		XPCOM.memmove (dest, buffer, length);
+		XPCOM.nsEmbedCString_delete (aSpec);
+		uri.Release ();
+	}
+	if (dest == null) return ""; //$NON-NLS-1$
+
+	String location = new String (dest);
+	/*
+	 * If the URI indicates that the page is being rendered from memory
+	 * (via setText()) then set it to about:blank to be consistent with IE.
+	 */
+	if (location.equals (URI_FILEROOT)) {
+		location = ABOUT_BLANK;
+	} else {
+		int length = URI_FILEROOT.length ();
+		if (location.startsWith (URI_FILEROOT) && location.charAt (length) == '#') {
+			location = ABOUT_BLANK + location.substring (length);
+		}
+	}
+	return location;
+}
+
+public Object getWebBrowser () {
+	if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
+	if (webBrowserObject != null) return webBrowserObject;
+
+	try {
+		Class clazz = Class.forName ("org.mozilla.xpcom.Mozilla"); //$NON-NLS-1$
+		Method method = clazz.getMethod ("getInstance", new Class[0]); //$NON-NLS-1$
+		Object mozilla = method.invoke (null, new Object[0]);
+		method = clazz.getMethod ("wrapXPCOMObject", new Class[] {Long.TYPE, String.class}); //$NON-NLS-1$
+		webBrowserObject = method.invoke (mozilla, new Object[] {new Long (webBrowser.getAddress ()), nsIWebBrowser.NS_IWEBBROWSER_IID_STR});
+		/*
+		 * The following AddRef() is needed to offset the automatic Release() that
+		 * will be performed by JavaXPCOM when webBrowserObject is finalized.
+		 */
+		webBrowser.AddRef ();
+		return webBrowserObject;
+	} catch (ClassNotFoundException e) {
+	} catch (NoSuchMethodException e) {
+	} catch (IllegalArgumentException e) {
+	} catch (IllegalAccessException e) {
+	} catch (InvocationTargetException e) {
+	}
+	return null;
+}
+
+String initDiscoverXULRunner () {
+	GREVersionRange range = new GREVersionRange ();
+	byte[] bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_LOWER, true);
+	int /*long*/ lower = C.malloc (bytes.length);
+	C.memmove (lower, bytes, bytes.length);
+	range.lower = lower;
+	range.lowerInclusive = LowerRangeInclusive;
+
+	bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_UPPER, true);
+	int /*long*/ upper = C.malloc (bytes.length);
+	C.memmove (upper, bytes, bytes.length);
+	range.upper = upper;
+	range.upperInclusive = UpperRangeInclusive;
+
+	int length = XPCOMInit.PATH_MAX;
+	int /*long*/ greBuffer = C.malloc (length);
+	int /*long*/ propertiesPtr = C.malloc (2 * C.PTR_SIZEOF);
+	int rc = XPCOMInit.GRE_GetGREPathWithProperties (range, 1, propertiesPtr, 0, greBuffer, length);
+
+	/*
+	 * A XULRunner was not found that supports wrapping of XPCOM handles as JavaXPCOM objects.
+	 * Drop the lower version bound and try to detect an earlier XULRunner installation.
+	 */
+	if (rc != XPCOM.NS_OK) {
+		C.free (lower);
+		bytes = MozillaDelegate.wcsToMbcs (null, GRERANGE_LOWER_FALLBACK, true);
+		lower = C.malloc (bytes.length);
+		C.memmove (lower, bytes, bytes.length);
+		range.lower = lower;
+		rc = XPCOMInit.GRE_GetGREPathWithProperties (range, 1, propertiesPtr, 0, greBuffer, length);
+	}
+	C.free (lower);
+	C.free (upper);
+	C.free (propertiesPtr);
+
+	String result = null;
+	if (rc == XPCOM.NS_OK) {
+		/* indicates that a XULRunner was found */
+		length = C.strlen (greBuffer);
+		bytes = new byte[length];
+		C.memmove (bytes, greBuffer, length);
+		result = new String (MozillaDelegate.mbcsToWcs (null, bytes));
+	} else {
+		result = ""; //$NON-NLS-1$
+	}
+	C.free (greBuffer);
+	return result;
+}
+
+void initExternal (String profilePath) {
+	File componentsDir = new File (profilePath, AppFileLocProvider.COMPONENTS_DIR);
+	java.io.InputStream is = Library.class.getResourceAsStream ("/external.xpt"); //$NON-NLS-1$
+	if (is != null) {
+		if (!componentsDir.exists ()) {
+			componentsDir.mkdirs ();
+		}
+		int read;
+		byte [] buffer = new byte [4096];
+		File file = new File (componentsDir, "external.xpt"); //$NON-NLS-1$
+		try {
+			FileOutputStream os = new FileOutputStream (file);
+			while ((read = is.read (buffer)) != -1) {
+				os.write(buffer, 0, read);
+			}
+			os.close ();
+			is.close ();
+		} catch (FileNotFoundException e) {
+		} catch (IOException e) {
+		}
+	}
+}
+
+void initFactories (nsIServiceManager serviceManager, nsIComponentManager componentManager, boolean isXULRunner) {
+	int /*long*/[] result = new int /*long*/[1];
+
+	PromptService2Factory factory = new PromptService2Factory ();
+	factory.AddRef ();
+
+	int rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);
+	}
+	
+	nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
+	result[0] = 0;
+	componentRegistrar.AutoRegister (0);	 /* detect the External component */ 
+
+	byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PROMPTSERVICE_CONTRACTID, true); 
+	byte[] aClassName = MozillaDelegate.wcsToMbcs (null, "swtPromptService", true); //$NON-NLS-1$
+	rc = componentRegistrar.RegisterFactory (XPCOM.NS_PROMPTSERVICE_CID, aClassName, aContractID, factory.getAddress ());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	factory.Release ();
+
+	ExternalFactory externalFactory = new ExternalFactory ();
+	externalFactory.AddRef ();
+	aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.EXTERNAL_CONTRACTID, true); 
+	aClassName = MozillaDelegate.wcsToMbcs (null, "External", true); //$NON-NLS-1$
+	rc = componentRegistrar.RegisterFactory (XPCOM.EXTERNAL_CID, aClassName, aContractID, externalFactory.getAddress ());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	externalFactory.Release ();
+
+	rc = serviceManager.GetService (XPCOM.NS_CATEGORYMANAGER_CID, nsICategoryManager.NS_ICATEGORYMANAGER_IID, result);
+	if (rc != XPCOM.NS_OK) error (rc);
+	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+	nsICategoryManager categoryManager = new nsICategoryManager (result[0]);
+	result[0] = 0;
+	byte[] category = MozillaDelegate.wcsToMbcs (null, "JavaScript global property", true); //$NON-NLS-1$
+	byte[] entry = MozillaDelegate.wcsToMbcs (null, "external", true); //$NON-NLS-1$
+	rc = categoryManager.AddCategoryEntry(category, entry, aContractID, 1, 1, result);
+	result[0] = 0;
+	categoryManager.Release ();
+
+	/*
+	* This Download factory will be used if the GRE version is < 1.8.
+	* If the GRE version is 1.8.x then the Download factory that is registered later for
+	*   contract "Transfer" will be used.
+	* If the GRE version is >= 1.9 then no Download factory is registered because this
+	*   functionality is provided by the GRE.
+	*/
+	DownloadFactory downloadFactory = new DownloadFactory ();
+	downloadFactory.AddRef ();
+	aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DOWNLOAD_CONTRACTID, true);
+	aClassName = MozillaDelegate.wcsToMbcs (null, "swtDownload", true); //$NON-NLS-1$
+	rc = componentRegistrar.RegisterFactory (XPCOM.NS_DOWNLOAD_CID, aClassName, aContractID, downloadFactory.getAddress ());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	downloadFactory.Release ();
+
+	FilePickerFactory pickerFactory = isXULRunner ? new FilePickerFactory_1_8 () : new FilePickerFactory ();
+	pickerFactory.AddRef ();
+	aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_FILEPICKER_CONTRACTID, true);
+	aClassName = MozillaDelegate.wcsToMbcs (null, "swtFilePicker", true); //$NON-NLS-1$
+	rc = componentRegistrar.RegisterFactory (XPCOM.NS_FILEPICKER_CID, aClassName, aContractID, pickerFactory.getAddress ());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	pickerFactory.Release ();
+
+	componentRegistrar.Release ();
+}
+
+void initJavaXPCOM (String mozillaPath) {
+	try {
+		Class clazz = Class.forName ("org.mozilla.xpcom.Mozilla"); //$NON-NLS-1$
+		Method method = clazz.getMethod ("getInstance", new Class[0]); //$NON-NLS-1$
+		Object mozilla = method.invoke (null, new Object[0]);
+		method = clazz.getMethod ("getComponentManager", new Class[0]); //$NON-NLS-1$
+		try {
+			method.invoke (mozilla, new Object[0]);
+		} catch (InvocationTargetException e) {
+			/* indicates that JavaXPCOM has not been initialized yet */
+			Class fileClass = Class.forName ("java.io.File"); //$NON-NLS-1$
+			method = clazz.getMethod ("initialize", new Class[] {fileClass}); //$NON-NLS-1$
+			Constructor constructor = fileClass.getDeclaredConstructor (new Class[] {String.class});
+			Object argument = constructor.newInstance (new Object[] {mozillaPath});
+			method.invoke (mozilla, new Object[] {argument});
+		}
+	} catch (ClassNotFoundException e) {
+		/* JavaXPCOM is not on the classpath */
+	} catch (NoSuchMethodException e) {
+		/* the JavaXPCOM on the classpath does not implement initialize() */
+	} catch (IllegalArgumentException e) {
+	} catch (IllegalAccessException e) {
+	} catch (InvocationTargetException e) {
+	} catch (InstantiationException e) {
+	}
+}
+
+String initMozilla (String mozillaPath) {
+	/* attempt to use the GRE pointed at by MOZILLA_FIVE_HOME */
+	int /*long*/ ptr = C.getenv (MozillaDelegate.wcsToMbcs (null, XPCOM.MOZILLA_FIVE_HOME, true));
+	if (ptr != 0) {
+		int length = C.strlen (ptr);
+		byte[] buffer = new byte[length];
+		C.memmove (buffer, ptr, length);
+		mozillaPath = new String (MozillaDelegate.mbcsToWcs (null, buffer));
+	} else {
+		browser.dispose ();
+		SWT.error (SWT.ERROR_NO_HANDLES, null, " [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]"); //$NON-NLS-1$
+	}
+	if (Device.DEBUG) System.out.println ("Mozilla path: " + mozillaPath); //$NON-NLS-1$
+
+	/*
+	* Note.  Embedding a Mozilla GTK1.2 causes a crash.  The workaround
+	* is to check the version of GTK used by Mozilla by looking for
+	* the libwidget_gtk.so library used by Mozilla GTK1.2. Mozilla GTK2
+	* uses the libwidget_gtk2.so library.   
+	*/
+	if (Compatibility.fileExists (mozillaPath, "components/libwidget_gtk.so")) { //$NON-NLS-1$
+		browser.dispose ();
+		SWT.error (SWT.ERROR_NO_HANDLES, null, " [Mozilla GTK2 required (GTK1.2 detected)]"); //$NON-NLS-1$							
+	}
+
+	try {
+		Library.loadLibrary ("swt-mozilla"); //$NON-NLS-1$
+	} catch (UnsatisfiedLinkError e) {
+		try {
+			/* 
+			 * The initial loadLibrary attempt may have failed as a result of the user's
+			 * system not having libstdc++.so.6 installed, so try to load the alternate
+			 * swt mozilla library that depends on libswtc++.so.5 instead.
+			 */
+			Library.loadLibrary ("swt-mozilla-gcc3"); //$NON-NLS-1$
+		} catch (UnsatisfiedLinkError ex) {
+			browser.dispose ();
+			/*
+			 * Print the error from the first failed attempt since at this point it's
+			 * known that the failure was not due to the libstdc++.so.6 dependency.
+			 */
+			SWT.error (SWT.ERROR_NO_HANDLES, e, " [MOZILLA_FIVE_HOME='" + mozillaPath + "']"); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+	}
+
+	return mozillaPath;
+}
+
+void initXPCOM (String mozillaPath, boolean isXULRunner) {
+	int /*long*/[] result = new int /*long*/[1];
+
+	nsEmbedString pathString = new nsEmbedString (mozillaPath);
+	int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), 1, result);
+	pathString.dispose ();
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_ERROR_NULL_POINTER);
+	}
+
+	nsILocalFile localFile = new nsILocalFile (result[0]);
+	result[0] = 0;
+	if (isXULRunner) {
+		int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
+		/* alloc memory for two structs, the second is empty to signify the end of the list */
+		int /*long*/ ptr = C.malloc (size * 2);
+		C.memset (ptr, 0, size * 2);
+		nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
+		byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_InitEmbedding", true); //$NON-NLS-1$
+		functionLoad.functionName = C.malloc (bytes.length);
+		C.memmove (functionLoad.functionName, bytes, bytes.length);
+		functionLoad.function = C.malloc (C.PTR_SIZEOF);
+		C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
+		XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
+		XPCOM.XPCOMGlueLoadXULFunctions (ptr);
+		C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
+		int /*long*/ functionPtr = result[0];
+		result[0] = 0;
+		C.free (functionLoad.function);
+		C.free (functionLoad.functionName);
+		C.free (ptr);
+		if (functionPtr == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_ERROR_NULL_POINTER);
+		}
+		rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress (), 0, 0);
+		if (rc == XPCOM.NS_OK) {
+			System.setProperty (XULRUNNER_PATH, mozillaPath);
+		}
+	} else {
+		rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
+	}
+	localFile.Release ();
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		SWT.error (SWT.ERROR_NO_HANDLES, null, " [MOZILLA_FIVE_HOME may not point at an embeddable GRE] [NS_InitEmbedding " + mozillaPath + " error " + rc + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
+	System.setProperty (GRE_INITIALIZED, "true"); //$NON-NLS-1$
+}
+
+void initPreferences (nsIServiceManager serviceManager, nsIComponentManager componentManager) {
+	int /*long*/[] result = new int /*long*/[1];
+
+	/*
+	 * As a result of using a common profile the user cannot change their locale
+	 * and charset.  The fix for this is to set mozilla's locale and charset
+	 * preference values according to the user's current locale and charset.
+	 */
+	byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFSERVICE_CONTRACTID, true);
+	int rc = serviceManager.GetServiceByContractID (aContractID, nsIPrefService.NS_IPREFSERVICE_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);
+	}
+
+	nsIPrefService prefService = new nsIPrefService (result[0]);
+	result[0] = 0;
+	byte[] buffer = new byte[1];
+	rc = prefService.GetBranch (buffer, result);	/* empty buffer denotes root preference level */
+	prefService.Release ();
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);
+	}
+
+	nsIPrefBranch prefBranch = new nsIPrefBranch (result[0]);
+	result[0] = 0;
+
+	/* get Mozilla's current locale preference value */
+	String prefLocales = null;
+	nsIPrefLocalizedString localizedString = null;
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_LANGUAGES, true);
+	rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+	/* 
+	 * Feature of Debian.  For some reason attempting to query for the current locale
+	 * preference fails on Debian.  The workaround for this is to assume a value of
+	 * "en-us,en" since this is typically the default value when mozilla is used without
+	 * a profile.
+	 */
+	if (rc != XPCOM.NS_OK) {
+		prefLocales = "en-us,en" + TOKENIZER_LOCALE;	//$NON-NLS-1$
+	} else {
+		if (result[0] == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_NOINTERFACE);
+		}
+		localizedString = new nsIPrefLocalizedString (result[0]);
+		result[0] = 0;
+		rc = localizedString.ToString (result);
+		if (rc != XPCOM.NS_OK) {
+			browser.dispose ();
+			error (rc);
+		}
+		if (result[0] == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_NOINTERFACE);
+		}
+		int length = XPCOM.strlen_PRUnichar (result[0]);
+		char[] dest = new char[length];
+		XPCOM.memmove (dest, result[0], length * 2);
+		prefLocales = new String (dest) + TOKENIZER_LOCALE;
+	}
+	result[0] = 0;
+
+	/*
+	 * construct the new locale preference value by prepending the
+	 * user's current locale and language to the original value 
+	 */
+	Locale locale = Locale.getDefault ();
+	String language = locale.getLanguage ();
+	String country = locale.getCountry ();
+	StringBuffer stringBuffer = new StringBuffer (language);
+	stringBuffer.append (SEPARATOR_LOCALE);
+	stringBuffer.append (country.toLowerCase ());
+	stringBuffer.append (TOKENIZER_LOCALE);
+	stringBuffer.append (language);
+	stringBuffer.append (TOKENIZER_LOCALE);
+	String newLocales = stringBuffer.toString ();
+
+	int start, end = -1;
+	do {
+		start = end + 1;
+		end = prefLocales.indexOf (TOKENIZER_LOCALE, start);
+		String token;
+		if (end == -1) {
+			token = prefLocales.substring (start);
+		} else {
+			token = prefLocales.substring (start, end);
+		}
+		if (token.length () > 0) {
+			token = (token + TOKENIZER_LOCALE).trim ();
+			/* ensure that duplicate locale values are not added */
+			if (newLocales.indexOf (token) == -1) {
+				stringBuffer.append (token);
+			}
+		}
+	} while (end != -1);
+	newLocales = stringBuffer.toString ();
+	if (!newLocales.equals (prefLocales)) {
+		/* write the new locale value */
+		newLocales = newLocales.substring (0, newLocales.length () - TOKENIZER_LOCALE.length ()); /* remove trailing tokenizer */
+		int length = newLocales.length ();
+		char[] charBuffer = new char[length + 1];
+		newLocales.getChars (0, length, charBuffer, 0);
+		if (localizedString == null) {
+			byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
+			rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+			if (result[0] == 0) {
+				browser.dispose ();
+				error (XPCOM.NS_NOINTERFACE);
+			}
+			localizedString = new nsIPrefLocalizedString (result[0]);
+			result[0] = 0;
+		}
+		localizedString.SetDataWithLength (length, charBuffer);
+		rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress());
+	}
+	if (localizedString != null) {
+		localizedString.Release ();
+		localizedString = null;
+	}
+
+	/* get Mozilla's current charset preference value */
+	String prefCharset = null;
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_CHARSET, true);
+	rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+	/* 
+	 * Feature of Debian.  For some reason attempting to query for the current charset
+	 * preference fails on Debian.  The workaround for this is to assume a value of
+	 * "ISO-8859-1" since this is typically the default value when mozilla is used
+	 * without a profile.
+	 */
+	if (rc != XPCOM.NS_OK) {
+		prefCharset = "ISO-8859-1";	//$NON-NLS-1$
+	} else {
+		if (result[0] == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_NOINTERFACE);
+		}
+		localizedString = new nsIPrefLocalizedString (result[0]);
+		result[0] = 0;
+		rc = localizedString.ToString (result);
+		if (rc != XPCOM.NS_OK) {
+			browser.dispose ();
+			error (rc);
+		}
+		if (result[0] == 0) {
+			browser.dispose ();
+			error (XPCOM.NS_NOINTERFACE);
+		}
+		int length = XPCOM.strlen_PRUnichar (result[0]);
+		char[] dest = new char[length];
+		XPCOM.memmove (dest, result[0], length * 2);
+		prefCharset = new String (dest);
+	}
+	result[0] = 0;
+
+	String newCharset = System.getProperty ("file.encoding");	// $NON-NLS-1$
+	if (!newCharset.equals (prefCharset)) {
+		/* write the new charset value */
+		int length = newCharset.length ();
+		char[] charBuffer = new char[length + 1];
+		newCharset.getChars (0, length, charBuffer, 0);
+		if (localizedString == null) {
+			byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
+			rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+			if (result[0] == 0) {
+				browser.dispose ();
+				error (XPCOM.NS_NOINTERFACE);
+			}
+			localizedString = new nsIPrefLocalizedString (result[0]);
+			result[0] = 0;
+		}
+		localizedString.SetDataWithLength (length, charBuffer);
+		rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+	}
+	if (localizedString != null) localizedString.Release ();
+
+	/*
+	* Check for proxy values set as documented java properties and update mozilla's
+	* preferences with these values if needed.
+	*/
+	String proxyHost = System.getProperty (PROPERTY_PROXYHOST);
+	String proxyPortString = System.getProperty (PROPERTY_PROXYPORT);
+
+	int port = -1;
+	if (proxyPortString != null) {
+		try {
+			int value = Integer.valueOf (proxyPortString).intValue ();
+			if (0 <= value && value <= MAX_PORT) port = value;
+		} catch (NumberFormatException e) {
+			/* do nothing, java property has non-integer value */
+		}
+	}
+
+	if (proxyHost != null) {
+		byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_PREFLOCALIZEDSTRING_CONTRACTID, true);
+		rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+		if (rc != XPCOM.NS_OK) error (rc);
+		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+
+		localizedString = new nsIPrefLocalizedString (result[0]);
+		result[0] = 0;
+		
+		int length = proxyHost.length ();
+		char[] charBuffer = new char[length];
+		proxyHost.getChars (0, length, charBuffer, 0);
+		rc = localizedString.SetDataWithLength (length, charBuffer);
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_FTP, true);
+		rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+		if (rc == XPCOM.NS_OK && result[0] != 0) {
+			nsIPrefLocalizedString value = new nsIPrefLocalizedString (result[0]);
+			result[0] = 0;
+			rc = value.ToString (result);
+			if (rc != XPCOM.NS_OK) error (rc);
+			if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER);
+			length = XPCOM.strlen_PRUnichar (result[0]);
+			char[] dest = new char[length];
+			XPCOM.memmove (dest, result[0], length * 2);
+			oldProxyHostFTP = new String (dest);
+		} else {
+			/* value is default */
+			oldProxyHostFTP = DEFAULTVALUE_STRING;
+		}
+		result[0] = 0;
+		rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_HTTP, true);
+		rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+		if (rc == XPCOM.NS_OK && result[0] != 0) {
+			nsIPrefLocalizedString value = new nsIPrefLocalizedString (result[0]);
+			result[0] = 0;
+			rc = value.ToString (result);
+			if (rc != XPCOM.NS_OK) error (rc);
+			if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER);
+			length = XPCOM.strlen_PRUnichar (result[0]);
+			char[] dest = new char[length];
+			XPCOM.memmove (dest, result[0], length * 2);
+			oldProxyHostHTTP = new String (dest);
+		} else {
+			/* value is default */
+			oldProxyHostHTTP = DEFAULTVALUE_STRING;
+		}
+		result[0] = 0;
+		rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYHOST_SSL, true);
+		rc = prefBranch.GetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, result);
+		if (rc == XPCOM.NS_OK && result[0] != 0) {
+			nsIPrefLocalizedString value = new nsIPrefLocalizedString (result[0]);
+			result[0] = 0;
+			rc = value.ToString (result);
+			if (rc != XPCOM.NS_OK) error (rc);
+			if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER);
+			length = XPCOM.strlen_PRUnichar (result[0]);
+			char[] dest = new char[length];
+			XPCOM.memmove (dest, result[0], length * 2);
+			oldProxyHostSSL = new String (dest);
+		} else {
+			/* value is default */
+			oldProxyHostSSL = DEFAULTVALUE_STRING;
+		}
+		result[0] = 0;
+		rc = prefBranch.SetComplexValue (buffer, nsIPrefLocalizedString.NS_IPREFLOCALIZEDSTRING_IID, localizedString.getAddress ());
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		localizedString.Release ();
+	}
+
+	int[] intResult = new int[1]; /* C long*/
+	if (port != -1) {
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_FTP, true);
+		rc = prefBranch.GetIntPref (buffer, intResult);
+		if (rc != XPCOM.NS_OK) error (rc);
+		oldProxyPortFTP = intResult[0];
+		intResult[0] = 0;
+		rc = prefBranch.SetIntPref (buffer, port);
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_HTTP, true);
+		rc = prefBranch.GetIntPref (buffer, intResult);
+		if (rc != XPCOM.NS_OK) error (rc);
+		oldProxyPortHTTP = intResult[0];
+		intResult[0] = 0;
+		rc = prefBranch.SetIntPref (buffer, port);
+		if (rc != XPCOM.NS_OK) error (rc);
+
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYPORT_SSL, true);
+		rc = prefBranch.GetIntPref (buffer, intResult);
+		if (rc != XPCOM.NS_OK) error (rc);
+		oldProxyPortSSL = intResult[0];
+		intResult[0] = 0;
+		rc = prefBranch.SetIntPref (buffer, port);
+		if (rc != XPCOM.NS_OK) error (rc);
+	}
+
+	if (proxyHost != null || port != -1) {
+		buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_PROXYTYPE, true);
+		rc = prefBranch.GetIntPref (buffer, intResult);
+		if (rc != XPCOM.NS_OK) error (rc);
+		oldProxyType = intResult[0];
+		intResult[0] = 0;
+		rc = prefBranch.SetIntPref (buffer, 1);
+		if (rc != XPCOM.NS_OK) error (rc);
+	}
+
+	/*
+	* Ensure that windows that are shown during page loads are not blocked.  Firefox may
+	* try to block these by default since such windows are often unwelcome, but this
+	* assumption should not be made in the Browser's context.  Since the Browser client
+	* is responsible for creating the new Browser and Shell in an OpenWindowListener,
+	* they should decide whether the new window is unwelcome or not and act accordingly. 
+	*/
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_DISABLEOPENDURINGLOAD, true);
+	rc = prefBranch.SetBoolPref (buffer, 0);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+
+	/* Ensure that the status text can be set through means like javascript */ 
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_DISABLEWINDOWSTATUSCHANGE, true);
+	rc = prefBranch.SetBoolPref (buffer, 0);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+
+	/* Ensure that the status line can be hidden when opening a window from javascript */ 
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_DISABLEOPENWINDOWSTATUSHIDE, true);
+	rc = prefBranch.SetBoolPref (buffer, 0);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+
+	/* Ensure that javascript execution is enabled since this is the Browser's default behaviour */ 
+	buffer = MozillaDelegate.wcsToMbcs (null, PREFERENCE_JAVASCRIPTENABLED, true);
+	rc = prefBranch.SetBoolPref (buffer, 1);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
 
-	nsIComponentManager componentManager = new nsIComponentManager (result[0]);
-	result[0] = 0;
-	byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DOMSERIALIZER_CONTRACTID, true);
-	char[] chars = null;
+	prefBranch.Release ();
+}
 
-	rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIDOMSerializer_1_7.NS_IDOMSERIALIZER_IID, result);
-	if (rc == XPCOM.NS_OK) {	/* mozilla >= 1.7 */
-		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+void initProfile (nsIServiceManager serviceManager, boolean isXULRunner) {
+	int /*long*/[] result = new int /*long*/[1];
 
-		nsIDOMSerializer_1_7 serializer = new nsIDOMSerializer_1_7 (result[0]);
+	byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_OBSERVER_CONTRACTID, true);
+	int rc = serviceManager.GetServiceByContractID (buffer, nsIObserverService.NS_IOBSERVERSERVICE_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);
+	}
+
+	nsIObserverService observerService = new nsIObserverService (result[0]);
+	result[0] = 0;
+	buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_DO_CHANGE, true);
+	int length = STARTUP.length ();
+	char[] chars = new char [length + 1];
+	STARTUP.getChars (0, length, chars, 0);
+	rc = observerService.NotifyObservers (0, buffer, chars);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	buffer = MozillaDelegate.wcsToMbcs (null, PROFILE_AFTER_CHANGE, true);
+	rc = observerService.NotifyObservers (0, buffer, chars);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	observerService.Release ();
+
+	if (isXULRunner) {
+		int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
+		/* alloc memory for two structs, the second is empty to signify the end of the list */
+		int /*long*/ ptr = C.malloc (size * 2);
+		C.memset (ptr, 0, size * 2);
+		nsDynamicFunctionLoad functionLoad = new nsDynamicFunctionLoad ();
+		byte[] bytes = MozillaDelegate.wcsToMbcs (null, "XRE_NotifyProfile", true); //$NON-NLS-1$
+		functionLoad.functionName = C.malloc (bytes.length);
+		C.memmove (functionLoad.functionName, bytes, bytes.length);
+		functionLoad.function = C.malloc (C.PTR_SIZEOF);
+		C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
+		XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
+		XPCOM.XPCOMGlueLoadXULFunctions (ptr);
+		C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
+		int /*long*/ functionPtr = result[0];
 		result[0] = 0;
-		int /*long*/ string = XPCOM.nsEmbedString_new ();
-		rc = serializer.SerializeToString (document, string);
-		serializer.Release ();
+		C.free (functionLoad.function);
+		C.free (functionLoad.functionName);
+		C.free (ptr);
+		/* functionPtr == 0 for xulrunner < 1.9 */
+		if (functionPtr != 0) {
+			rc = XPCOM.Call (functionPtr);
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+		}
+	}
+}
 
-		int length = XPCOM.nsEmbedString_Length (string);
-		int /*long*/ buffer = XPCOM.nsEmbedString_get (string);
-		chars = new char[length];
-		XPCOM.memmove (chars, buffer, length * 2);
-		XPCOM.nsEmbedString_delete (string);
-	} else {	/* mozilla < 1.7 */
-		rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIDOMSerializer.NS_IDOMSERIALIZER_IID, result);
-		if (rc != XPCOM.NS_OK) error (rc);
-		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+void initSpinup (nsIComponentManager componentManager) {
+	if (delegate.needsSpinup ()) {
+		int /*long*/[] result = new int /*long*/[1];
 
-		nsIDOMSerializer serializer = new nsIDOMSerializer (result[0]);
-		result[0] = 0;
-		rc = serializer.SerializeToString (document, result);
-		serializer.Release ();
+		/* nsIAppShell is discontinued as of xulrunner 1.9, so do not fail if it is not found */
+		int rc = componentManager.CreateInstance (XPCOM.NS_APPSHELL_CID, 0, nsIAppShell.NS_IAPPSHELL_IID, result);
+		if (rc != XPCOM.NS_ERROR_NO_INTERFACE) {
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+			if (result[0] == 0) {
+				browser.dispose ();
+				error (XPCOM.NS_NOINTERFACE);
+			}
 
-		int length = XPCOM.strlen_PRUnichar (result[0]);
-		chars = new char[length];
-		XPCOM.memmove (chars, result[0], length * 2);
+			AppShell = new nsIAppShell (result[0]);
+			result[0] = 0;
+			rc = AppShell.Create (0, null);
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+			rc = AppShell.Spinup ();
+			if (rc != XPCOM.NS_OK) {
+				browser.dispose ();
+				error (rc);
+			}
+		}
 	}
-
-	componentManager.Release ();
-	new nsISupports (document).Release ();
-	return new String (chars);
 }
 
-public String getUrl () {
+void initWebBrowserWindows () {
+	int rc = webBrowser.SetContainerWindow (webBrowserChrome.getAddress());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+
 	int /*long*/[] result = new int /*long*/[1];
-	int rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result);
-	if (rc != XPCOM.NS_OK) error (rc);
-	if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
+	rc = webBrowser.QueryInterface (nsIBaseWindow.NS_IBASEWINDOW_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_ERROR_NO_INTERFACE);
+	}
+	
+	nsIBaseWindow baseWindow = new nsIBaseWindow (result[0]);
+	result[0] = 0;
+	Rectangle rect = browser.getClientArea ();
+	if (rect.isEmpty ()) {
+		rect.width = 1;
+		rect.height = 1;
+	}
 
-	nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);
-	int /*long*/[] aCurrentURI = new int /*long*/[1];
-	rc = webNavigation.GetCurrentURI (aCurrentURI);
-	if (rc != XPCOM.NS_OK) error (rc);
-	webNavigation.Release ();
+	embedHandle = delegate.getHandle ();
 
-	byte[] dest = null;
-	if (aCurrentURI[0] != 0) {
-		nsIURI uri = new nsIURI (aCurrentURI[0]);
-		int /*long*/ aSpec = XPCOM.nsEmbedCString_new ();
-		rc = uri.GetSpec (aSpec);
-		if (rc != XPCOM.NS_OK) error (rc);
-		int length = XPCOM.nsEmbedCString_Length (aSpec);
-		int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec);
-		dest = new byte[length];
-		XPCOM.memmove (dest, buffer, length);
-		XPCOM.nsEmbedCString_delete (aSpec);
-		uri.Release ();
+	rc = baseWindow.InitWindow (embedHandle, 0, 0, 0, rect.width, rect.height);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (XPCOM.NS_ERROR_FAILURE);
 	}
-	if (dest == null) return ""; //$NON-NLS-1$
-
-	String location = new String (dest);
-	/*
-	 * If the URI indicates that the page is being rendered from memory
-	 * (via setText()) then set it to about:blank to be consistent with IE.
-	 */
-	if (location.equals (URI_FROMMEMORY)) location = ABOUT_BLANK;
-	return location;
+	rc = delegate.createBaseWindow (baseWindow);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (XPCOM.NS_ERROR_FAILURE);
+	}
+	rc = baseWindow.SetVisibility (1);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (XPCOM.NS_ERROR_FAILURE);
+	}
+	baseWindow.Release ();
 }
 
-public Object getWebBrowser () {
-	if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
-	if (webBrowserObject != null) return webBrowserObject;
+void initWindowCreator (nsIServiceManager serviceManager) {
+	WindowCreator = new WindowCreator2 ();
+	WindowCreator.AddRef ();
+	
+	int /*long*/[] result = new int /*long*/[1];
+	byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WINDOWWATCHER_CONTRACTID, true);
+	int rc = serviceManager.GetServiceByContractID (aContractID, nsIWindowWatcher.NS_IWINDOWWATCHER_IID, result);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	if (result[0] == 0) {
+		browser.dispose ();
+		error (XPCOM.NS_NOINTERFACE);		
+	}
 
-	try {
-		Class clazz = Class.forName ("org.mozilla.xpcom.Mozilla"); //$NON-NLS-1$
-		Method method = clazz.getMethod ("getInstance", new Class[0]); //$NON-NLS-1$
-		Object mozilla = method.invoke (null, new Object[0]);
-		method = clazz.getMethod ("wrapXPCOMObject", new Class[] {Long.TYPE, String.class}); //$NON-NLS-1$
-		webBrowserObject = method.invoke (mozilla, new Object[] {new Long (webBrowser.getAddress ()), nsIWebBrowser.NS_IWEBBROWSER_IID_STR});
-		/*
-		 * The following AddRef() is needed to offset the automatic Release() that
-		 * will be performed by JavaXPCOM when webBrowserObject is finalized.
-		 */
-		webBrowser.AddRef ();
-		return webBrowserObject;
-	} catch (ClassNotFoundException e) {
-	} catch (NoSuchMethodException e) {
-	} catch (IllegalArgumentException e) {
-	} catch (IllegalAccessException e) {
-	} catch (InvocationTargetException e) {
+	nsIWindowWatcher windowWatcher = new nsIWindowWatcher (result[0]);
+	result[0] = 0;
+	rc = windowWatcher.SetWindowCreator (WindowCreator.getAddress());
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
 	}
-	return null;
+	windowWatcher.Release ();
 }
 
+String initXULRunner (String mozillaPath) {
+	if (Device.DEBUG) System.out.println ("XULRunner path: " + mozillaPath); //$NON-NLS-1$
+	try {
+		Library.loadLibrary ("swt-xulrunner"); //$NON-NLS-1$
+	} catch (UnsatisfiedLinkError e) {
+		SWT.error (SWT.ERROR_NO_HANDLES, e);
+	}
+	byte[] path = MozillaDelegate.wcsToMbcs (null, mozillaPath, true);
+	int rc = XPCOM.XPCOMGlueStartup (path);
+	if (rc != XPCOM.NS_OK) {
+		browser.dispose ();
+		error (rc);
+	}
+	XPCOMWasGlued = true;
+
+	/*
+	 * Remove the trailing xpcom lib name from mozillaPath because the
+	 * Mozilla.initialize and NS_InitXPCOM2 invocations require a directory name only.
+	 */ 
+	return mozillaPath.substring (0, mozillaPath.lastIndexOf (SEPARATOR_OS));
+}
 public boolean isBackEnabled () {
 	int /*long*/[] result = new int /*long*/[1];
 	int rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result);
@@ -2090,6 +2415,16 @@ static String error (int code) {
 }
 
 void onDispose (Display display) {
+	/* invoke onbeforeunload handlers */
+	if (!browser.isClosing && !browser.isDisposed()) {
+		LocationListener[] oldLocationListeners = locationListeners;
+		locationListeners = new LocationListener[0];
+		ignoreAllMessages = true;
+		execute ("window.location.replace('about:blank');"); //$NON-NLS-1$
+		ignoreAllMessages = false;
+		locationListeners = oldLocationListeners;	
+	}
+
 	int rc = webBrowser.RemoveWebBrowserListener (weakReference.getAddress (), nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID);
 	if (rc != XPCOM.NS_OK) error (rc);
 
@@ -2100,21 +2435,6 @@ void onDispose (Display display) {
 	if (rc != XPCOM.NS_OK) error (rc);
 
 	unhookDOMListeners ();
-	if (listener != null) {
-		int[] folderEvents = new int[] {
-			SWT.Dispose,
-			SWT.Resize,  
-			SWT.FocusIn,
-			SWT.Activate,
-			SWT.Deactivate,
-			SWT.Show,
-			SWT.KeyDown,
-		};
-		for (int i = 0; i < folderEvents.length; i++) {
-			browser.removeListener (folderEvents[i], listener);
-		}
-		listener = null;
-	}
 
 	int /*long*/[] result = new int /*long*/[1];
 	rc = webBrowser.QueryInterface (nsIBaseWindow.NS_IBASEWINDOW_IID, result);
@@ -2132,6 +2452,7 @@ void onDispose (Display display) {
 	webBrowserObject = null;
 	lastNavigateURL = null;
 	htmlBytes = null;
+	listener = null;
 
 	if (tip != null && !tip.isDisposed ()) tip.dispose ();
 	tip = null;
@@ -2211,18 +2532,26 @@ public void refresh () {
 	nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);		 	
 	rc = webNavigation.Reload (nsIWebNavigation.LOAD_FLAGS_NONE);
 	webNavigation.Release ();
-	if (rc == XPCOM.NS_OK) return;
+
 	/*
-	* Feature in Mozilla.  Reload returns an error code NS_ERROR_INVALID_POINTER
-	* when it is called immediately after a request to load a new document using
-	* LoadURI.  The workaround is to ignore this error code.
-	*
-	* Feature in Mozilla.  Attempting to reload a file that no longer exists
-	* returns an error code of NS_ERROR_FILE_NOT_FOUND.  This is equivalent to
-	* attempting to load a non-existent local url, which is not a Browser error,
-	* so this error code should be ignored. 
+	* The following error conditions do not indicate unrecoverable problems:
+	* 
+	* - NS_ERROR_INVALID_POINTER: happens when Reload is called immediately
+	* after calling LoadURI.
+	* - NS_ERROR_FILE_NOT_FOUND: happens when attempting to reload a file that
+	* no longer exists.
+	* - NS_BINDING_ABORTED: happens when the user aborts the load (eg.- chooses
+	* to not resubmit a page with form data).
 	*/
-	if (rc != XPCOM.NS_ERROR_INVALID_POINTER && rc != XPCOM.NS_ERROR_FILE_NOT_FOUND) error (rc);
+	switch (rc) {
+		case XPCOM.NS_OK:
+		case XPCOM.NS_ERROR_INVALID_POINTER:
+		case XPCOM.NS_ERROR_FILE_NOT_FOUND:
+		case XPCOM.NS_BINDING_ABORTED: {
+			return;
+		}
+	}
+	error (rc);
 }
 
 void registerFunction (BrowserFunction function) {
@@ -2230,7 +2559,7 @@ void registerFunction (BrowserFunction function) {
 	AllFunctions.put (new Integer (function.index), function);
 }
 
-public boolean setText (String html) {
+public boolean setText (String html, boolean trusted) {
 	/*
 	*  Feature in Mozilla.  The focus memory of Mozilla must be 
 	*  properly managed through the nsIWebBrowserFocus interface.
@@ -2283,6 +2612,7 @@ public boolean setText (String html) {
 		*/
 		boolean blankLoading = htmlBytes != null;
 		htmlBytes = data;
+		untrustedText = !trusted;
 		if (blankLoading) return true;
 
 		/* navigate to about:blank */
@@ -2291,15 +2621,15 @@ public boolean setText (String html) {
 		if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
 		nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);
 		result[0] = 0;
-	    char[] uri = new char[ABOUT_BLANK.length () + 1];
-	    ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0);
+		char[] uri = new char[ABOUT_BLANK.length () + 1];
+		ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0);
 		rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0);
 		if (rc != XPCOM.NS_OK) error (rc);
 		webNavigation.Release ();
 	} else {
-		byte[] contentCharsetBuffer = MozillaDelegate.wcsToMbcs (null, "UTF-8", true);	//$NON-NLS-1$
+		byte[] contentCharsetBuffer = MozillaDelegate.wcsToMbcs (null, "UTF-8", false);	//$NON-NLS-1$
 		int /*long*/ aContentCharset = XPCOM.nsEmbedCString_new (contentCharsetBuffer, contentCharsetBuffer.length);
-		byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", true); // $NON-NLS-1$
+		byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", false); // $NON-NLS-1$
 		int /*long*/ aContentType = XPCOM.nsEmbedCString_new (contentTypeBuffer, contentTypeBuffer.length);
 
 		rc = XPCOM.NS_GetServiceManager (result);
@@ -2311,16 +2641,15 @@ public boolean setText (String html) {
 		rc = serviceManager.GetService (XPCOM.NS_IOSERVICE_CID, nsIIOService.NS_IIOSERVICE_IID, result);
 		if (rc != XPCOM.NS_OK) error (rc);
 		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
-		serviceManager.Release ();
 
 		nsIIOService ioService = new nsIIOService (result[0]);
 		result[0] = 0;
-		/*
-		* Note.  Mozilla ignores LINK tags used to load CSS stylesheets
-		* when the URI protocol for the nsInputStreamChannel
-		* is about:blank.  The fix is to specify the file protocol.
-		*/
-		byte[] aString = MozillaDelegate.wcsToMbcs (null, URI_FROMMEMORY, false);
+		byte[] aString;
+		if (trusted) {
+			aString = MozillaDelegate.wcsToMbcs (null, URI_FILEROOT, false);
+		} else {
+			aString = MozillaDelegate.wcsToMbcs (null, ABOUT_BLANK, false);
+		}
 		int /*long*/ aSpec = XPCOM.nsEmbedCString_new (aString, aString.length);
 		rc = ioService.NewURI (aSpec, null, 0, result);
 		if (rc != XPCOM.NS_OK) error (rc);
@@ -2363,7 +2692,7 @@ public boolean setText (String html) {
 	return true;
 }
 
-public boolean setUrl (String url) {
+public boolean setUrl (String url, String postData, String[] headers) {
 	htmlBytes = null;
 
 	int /*long*/[] result = new int /*long*/[1];
@@ -2379,9 +2708,71 @@ public boolean setUrl (String url) {
 	delegate.removeWindowSubclass ();
 
 	nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]);
-    char[] uri = new char[url.length () + 1];
-    url.getChars (0, url.length (), uri, 0);
-	rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0);
+	result[0] = 0;
+	char[] uri = new char[url.length () + 1];
+	url.getChars (0, url.length (), uri, 0);
+
+	nsIMIMEInputStream postDataStream = null;
+	InputStream dataStream = null;
+	if (postData != null) {
+		rc = XPCOM.NS_GetComponentManager (result);
+		if (rc != XPCOM.NS_OK) error (rc);
+		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
+		nsIComponentManager componentManager = new nsIComponentManager (result[0]);
+		result[0] = 0;
+		byte[] contractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_MIMEINPUTSTREAM_CONTRACTID, true);
+		rc = componentManager.CreateInstanceByContractID (contractID, 0, nsIMIMEInputStream.NS_IMIMEINPUTSTREAM_IID, result);
+		componentManager.Release();
+
+		if (rc == XPCOM.NS_OK && result[0] != 0) { /* nsIMIMEInputStream is not in mozilla 1.4 */
+			byte[] bytes = MozillaDelegate.wcsToMbcs (null, postData, false);
+			dataStream = new InputStream (bytes);
+			dataStream.AddRef ();
+			postDataStream = new nsIMIMEInputStream (result[0]);
+			rc = postDataStream.SetData (dataStream.getAddress ());
+			if (rc != XPCOM.NS_OK) error (rc);
+			rc = postDataStream.SetAddContentLength (1);
+			if (rc != XPCOM.NS_OK) error (rc);
+			byte[] name = MozillaDelegate.wcsToMbcs (null, HEADER_CONTENTTYPE, true);
+			byte[] value = MozillaDelegate.wcsToMbcs (null, MIMETYPE_FORMURLENCODED, true);
+			rc = postDataStream.AddHeader (name, value);
+			if (rc != XPCOM.NS_OK) error (rc);
+		}
+		result[0] = 0;
+	}
+
+	InputStream headersStream = null;
+    if (headers != null) {
+		StringBuffer buffer = new StringBuffer ();
+		for (int i = 0; i < headers.length; i++) {
+			String current = headers[i];
+			if (current != null) {
+				int sep = current.indexOf (':');
+				if (sep != -1) {
+					String key = current.substring (0, sep).trim ();
+					String value = current.substring (sep + 1).trim ();
+					if (key.length () > 0 && value.length () > 0) {
+						buffer.append (key);
+						buffer.append (':');
+						buffer.append (value);
+						buffer.append ("\r\n");
+					}
+				}
+			}
+		}
+		byte[] bytes = MozillaDelegate.wcsToMbcs (null, buffer.toString (), true);
+		headersStream = new InputStream (bytes);
+		headersStream.AddRef ();
+    }
+
+	rc = webNavigation.LoadURI (
+		uri,
+		nsIWebNavigation.LOAD_FLAGS_NONE,
+		0,
+		postDataStream == null ? 0 : postDataStream.getAddress (),
+		headersStream == null ? 0 : headersStream.getAddress ());
+	if (dataStream != null) dataStream.Release ();
+	if (headersStream != null) headersStream.Release ();
 	webNavigation.Release ();
 	return rc == XPCOM.NS_OK;
 }
@@ -2652,6 +3043,15 @@ int GetWeakReference (int /*long*/ ppvObject) {
 /* nsIWebProgressListener */
 
 int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateFlags, int aStatus) {
+	if (registerFunctionsOnState != 0 && ((aStateFlags & registerFunctionsOnState) == registerFunctionsOnState)) {
+		registerFunctionsOnState = 0;
+		Enumeration elements = functions.elements ();
+		while (elements.hasMoreElements ()) {
+			BrowserFunction function = (BrowserFunction)elements.nextElement ();
+			execute (function.functionString);
+		}
+	}
+
 	/*
 	* Feature of Mozilla.  When a redirect occurs to a site with an invalid
 	* certificate, no STATE_IS_DOCUMENT state transitions are received for the
@@ -2663,7 +3063,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 	* transition.  When this comes, if the request's name appears to be a
 	* url then take this to be the new site, in case our invalid certificate
 	* handler is about to be invoked.
-	*
+	* 
 	* Note that updateLastNavigateUrl is not reset to false here so that in
 	* typical contexts where a redirect occurs without an accompanying invalid
 	* certificate, the updated site will be retrieved from the channel (this
@@ -2708,6 +3108,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 		}
 
 		if (request == 0) request = aRequest;
+		registerFunctionsOnState = nsIWebProgressListener.STATE_IS_REQUEST | nsIWebProgressListener.STATE_START;
 		/*
 		 * Add the page's nsIDOMWindow to the collection of windows that will
 		 * have DOM listeners added to them later on in the page loading
@@ -2721,6 +3122,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 		unhookedDOMWindows.addElement (new LONG (result[0]));
 	} else if ((aStateFlags & nsIWebProgressListener.STATE_REDIRECTING) != 0) {
 		if (request == aRequest) request = 0;
+		registerFunctionsOnState = nsIWebProgressListener.STATE_TRANSFERRING;
 		updateLastNavigateUrl = true;
 	} else if ((aStateFlags & nsIWebProgressListener.STATE_STOP) != 0) {
 		/*
@@ -2803,12 +3205,12 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 
 				nsIIOService ioService = new nsIIOService (result[0]);
 				result[0] = 0;
-				/*
-				* Note.  Mozilla ignores LINK tags used to load CSS stylesheets
-				* when the URI protocol for the nsInputStreamChannel
-				* is about:blank.  The fix is to specify the file protocol.
-				*/
-				byte[] aString = MozillaDelegate.wcsToMbcs (null, URI_FROMMEMORY, false);
+				byte[] aString;
+				if (untrustedText) {
+					aString = MozillaDelegate.wcsToMbcs (null, ABOUT_BLANK, false);
+				} else {
+					aString = MozillaDelegate.wcsToMbcs (null, URI_FILEROOT, false);
+				}
 				int /*long*/ aSpec = XPCOM.nsEmbedCString_new (aString, aString.length);
 				rc = ioService.NewURI (aSpec, null, 0, result);
 				if (rc != XPCOM.NS_OK) error (rc);
@@ -2826,11 +3228,29 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 				nsIWebBrowserStream stream = new nsIWebBrowserStream (result[0]);
 				result[0] = 0;
 
-				byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", true); // $NON-NLS-1$
+				byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", false); // $NON-NLS-1$
 				int /*long*/ aContentType = XPCOM.nsEmbedCString_new (contentTypeBuffer, contentTypeBuffer.length);
 
 				rc = stream.OpenStream (uri.getAddress (), aContentType);
 				if (rc != XPCOM.NS_OK) error (rc);
+
+				/*
+				* For Mozilla < 1.9.2, when content is being set via nsIWebBrowserStream, this
+				* is the only place where registered functions can be re-installed such that
+				* they will be invokable at load time by JS contained in the text.
+				*/
+				Enumeration elements = functions.elements ();
+				while (elements.hasMoreElements ()) {
+					BrowserFunction function = (BrowserFunction)elements.nextElement ();
+					execute (function.functionString);
+				}
+				/* 
+				* For Mozilla >= 1.9.2, when content is being set via nsIWebBrowserStream,
+				* registered functions must be re-installed in the subsequent Start Request
+				* in order to be invokable at load time by JS contained in the text.
+				*/
+				registerFunctionsOnState = nsIWebProgressListener.STATE_IS_REQUEST | nsIWebProgressListener.STATE_START;
+
 				int /*long*/ ptr = C.malloc (htmlBytes.length);
 				XPCOM.memmove (ptr, htmlBytes, htmlBytes.length);
 				int pageSize = 8192;
@@ -2873,6 +3293,8 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 				result[0] = 0;
 				hookDOMListeners (target, isTop);
 				target.Release ();
+			} else {
+				registerFunctionsOnState = 0;
 			}
 		}
 		domWindow.Release ();
@@ -2896,13 +3318,6 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 				statusTextListeners[i].changed (event);
 			}
 
-			/* re-install registered functions */
-			Enumeration elements = functions.elements ();
-			while (elements.hasMoreElements ()) {
-				BrowserFunction function = (BrowserFunction)elements.nextElement ();
-				execute (function.functionString);
-			}
-
 			final Display display = browser.getDisplay ();
 			final ProgressEvent event2 = new ProgressEvent (browser);
 			event2.display = display;
@@ -3063,7 +3478,14 @@ int OnLocationChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int /*lo
 	 * If the URI indicates that the page is being rendered from memory
 	 * (via setText()) then set it to about:blank to be consistent with IE.
 	 */
-	if (event.location.equals (URI_FROMMEMORY)) event.location = ABOUT_BLANK;
+	if (event.location.equals (URI_FILEROOT)) {
+		event.location = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (event.location.startsWith (URI_FILEROOT) && event.location.charAt (length) == '#') {
+			event.location = ABOUT_BLANK + event.location.substring (length);
+		}
+	}
 	event.top = aTop[0] == aDOMWindow[0];
 	for (int i = 0; i < locationListeners.length; i++) {
 		locationListeners[i].changed (event);
@@ -3280,7 +3702,9 @@ int SetVisibility (int aVisibility) {
 				event.location = location;
 				event.size = size;
 				event.addressBar = (chromeFlags & nsIWebBrowserChrome.CHROME_LOCATIONBAR) != 0;
-				event.menuBar = (chromeFlags & nsIWebBrowserChrome.CHROME_MENUBAR) != 0;
+				/* Feature of OSX.  The menu bar is always displayed. */
+				boolean isOSX = Platform.PLATFORM.equals ("cocoa") || Platform.PLATFORM.equals ("carbon");
+				event.menuBar = isOSX || (chromeFlags & nsIWebBrowserChrome.CHROME_MENUBAR) != 0;
 				event.statusBar = (chromeFlags & nsIWebBrowserChrome.CHROME_STATUSBAR) != 0;
 				event.toolBar = (chromeFlags & nsIWebBrowserChrome.CHROME_TOOLBAR) != 0;
 				for (int i = 0; i < visibilityWindowListeners.length; i++) {
@@ -3295,8 +3719,6 @@ int SetVisibility (int aVisibility) {
 				visibilityWindowListeners[i].hide (event);
 			}
 		}
-	} else {
-		visible = aVisibility != 0;
 	}
 	return XPCOM.NS_OK;     	
 }
@@ -3433,7 +3855,7 @@ int OnStartURIOpen (int /*long*/ aURI, int /*long*/ retval) {
 	if (value.indexOf ("aboutCertError.xhtml") != -1 || (isViewingErrorPage && value.indexOf ("javascript:showSecuritySection") != -1)) { //$NON-NLS-1$ //$NON-NLS-2$
 		XPCOM.memmove (retval, new int[] {1}, 4); /* PRBool */
 		isRetrievingBadCert = true;
-		setUrl (lastNavigateURL);
+		setUrl (lastNavigateURL, null, null);
 		return XPCOM.NS_OK;
 	}
 	isViewingErrorPage = value.indexOf ("netError.xhtml") != -1; //$NON-NLS-1$
@@ -3454,7 +3876,14 @@ int OnStartURIOpen (int /*long*/ aURI, int /*long*/ retval) {
 				 * If the URI indicates that the page is being rendered from memory
 				 * (via setText()) then set it to about:blank to be consistent with IE.
 				 */
-				if (event.location.equals (URI_FROMMEMORY)) event.location = ABOUT_BLANK;
+				if (event.location.equals (URI_FILEROOT)) {
+					event.location = ABOUT_BLANK;
+				} else {
+					length = URI_FILEROOT.length ();
+					if (event.location.startsWith (URI_FILEROOT) && event.location.charAt (length) == '#') {
+						event.location = ABOUT_BLANK + event.location.substring (length);
+					}
+				}
 				event.doit = doit;
 				for (int i = 0; i < locationListeners.length; i++) {
 					locationListeners[i].changing (event);
@@ -3511,7 +3940,7 @@ int IsPreferred (int /*long*/ aContentType, int /*long*/ aDesiredContentType, in
 			byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_WEBNAVIGATIONINFO_CONTRACTID, true);
 			rc = serviceManager.GetServiceByContractID (aContractID, nsIWebNavigationInfo.NS_IWEBNAVIGATIONINFO_IID, result);
 			if (rc == XPCOM.NS_OK) {
-				byte[] bytes = MozillaDelegate.wcsToMbcs (null, contentType, true);
+				byte[] bytes = MozillaDelegate.wcsToMbcs (null, contentType, false);
 				int /*long*/ typePtr = XPCOM.nsEmbedCString_new (bytes, bytes.length);
 				nsIWebNavigationInfo info = new nsIWebNavigationInfo (result[0]);
 				result[0] = 0;
@@ -3788,8 +4217,14 @@ int HandleEvent (int /*long*/ event) {
 		keyEvent.keyCode = lastKeyCode;
 		keyEvent.character = (char)lastCharCode;
 		keyEvent.stateMask = (aAltKey[0] != 0 ? SWT.ALT : 0) | (aCtrlKey[0] != 0 ? SWT.CTRL : 0) | (aShiftKey[0] != 0 ? SWT.SHIFT : 0) | (aMetaKey[0] != 0 ? SWT.COMMAND : 0);
-		browser.notifyListeners (keyEvent.type, keyEvent);
-		if (!keyEvent.doit || browser.isDisposed ()) {
+		boolean doit = true;
+		if (delegate.sendTraverse ()) {
+			doit = sendKeyEvent (keyEvent);
+		} else {
+			browser.notifyListeners (keyEvent.type, keyEvent);
+			doit = keyEvent.doit; 
+		}
+		if (!doit || browser.isDisposed ()) {
 			domEvent.PreventDefault ();
 		}
 		return XPCOM.NS_OK;
@@ -3876,11 +4311,22 @@ int HandleEvent (int /*long*/ event) {
 		}
 	}
 
-	int[] aClientX = new int[1], aClientY = new int[1], aDetail = new int[1]; /* PRInt32 */
-	rc = domMouseEvent.GetClientX (aClientX);
+	int[] aScreenX = new int[1], aScreenY = new int[1]; /* PRInt32 */
+
+	/*
+	 * The position of mouse events is received in screen-relative coordinates
+	 * in order to handle pages with frames, since frames express their event
+	 * coordinates relative to themselves rather than relative to their top-
+	 * level page.  Convert screen-relative coordinates to be browser-relative.
+	 */
+	rc = domMouseEvent.GetScreenX (aScreenX);
 	if (rc != XPCOM.NS_OK) error (rc);
-	rc = domMouseEvent.GetClientY (aClientY);
+	rc = domMouseEvent.GetScreenY (aScreenY);
 	if (rc != XPCOM.NS_OK) error (rc);
+	Point position = new Point (aScreenX[0], aScreenY[0]);
+	position = browser.getDisplay ().map (null, browser, position);
+
+	int[] aDetail = new int[1]; /* PRInt32 */
 	rc = domMouseEvent.GetDetail (aDetail);
 	if (rc != XPCOM.NS_OK) error (rc);
 	short[] aButton = new short[1]; /* PRUint16 */
@@ -3899,7 +4345,7 @@ int HandleEvent (int /*long*/ event) {
 
 	Event mouseEvent = new Event ();
 	mouseEvent.widget = browser;
-	mouseEvent.x = aClientX[0]; mouseEvent.y = aClientY[0];
+	mouseEvent.x = position.x; mouseEvent.y = position.y;
 	mouseEvent.stateMask = (aAltKey[0] != 0 ? SWT.ALT : 0) | (aCtrlKey[0] != 0 ? SWT.CTRL : 0) | (aShiftKey[0] != 0 ? SWT.SHIFT : 0) | (aMetaKey[0] != 0 ? SWT.COMMAND : 0);
 
 	if (XPCOM.DOMEVENT_MOUSEDOWN.equals (typeString)) {
@@ -3947,7 +4393,7 @@ int HandleEvent (int /*long*/ event) {
 	if (aDetail[0] == 2 && XPCOM.DOMEVENT_MOUSEDOWN.equals (typeString)) {
 		mouseEvent = new Event ();
 		mouseEvent.widget = browser;
-		mouseEvent.x = aClientX[0]; mouseEvent.y = aClientY[0];
+		mouseEvent.x = position.x; mouseEvent.y = position.y;
 		mouseEvent.stateMask = (aAltKey[0] != 0 ? SWT.ALT : 0) | (aCtrlKey[0] != 0 ? SWT.CTRL : 0) | (aShiftKey[0] != 0 ? SWT.SHIFT : 0) | (aMetaKey[0] != 0 ? SWT.COMMAND : 0);
 		mouseEvent.type = SWT.MouseDoubleClick;
 		mouseEvent.button = aButton[0] + 1;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java
index df42674..02e0946 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -138,7 +138,7 @@ class PromptDialog extends Dialog {
 
 		Button viewCertButton = new Button(buttonsComposite, SWT.PUSH);
 		viewCertButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
-		viewCertButton.setText(Compatibility.getMessage("View Certificate")); //$NON-NLS-1$
+		viewCertButton.setText(Compatibility.getMessage("SWT_ViewCertificate")); //$NON-NLS-1$
 		viewCertButton.addListener(SWT.Selection, new Listener() {
 			public void handleEvent(Event event) {
 				int /*long*/[] result = new int /*long*/[1];
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java
index b1c74b2..7f1d718 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/PromptService2.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ class PromptService2 {
 	XPCOMObject promptService;
 	XPCOMObject promptService2;
 	int refCount = 0;
-
+	
 	static final String[] certErrorCodes = new String[] {
 		"ssl_error_bad_cert_domain",
 		"sec_error_ca_cert_invalid",
@@ -232,7 +232,12 @@ int AsyncPromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int /*long*/ aC
 
 int Confirm (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int /*long*/ _retval) {
 	Browser browser = getBrowser (aParent);
-	
+
+	if (browser != null && ((Mozilla)browser.webBrowser).ignoreAllMessages) {
+		XPCOM.memmove (_retval, new int[] {1}, 4); /* PRBool */
+		return XPCOM.NS_OK;
+	}
+
 	int length = XPCOM.strlen_PRUnichar (aDialogTitle);
 	char[] dest = new char[length];
 	XPCOM.memmove (dest, aDialogTitle, length * 2);
@@ -249,7 +254,7 @@ int Confirm (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText
 	messageBox.setMessage (textLabel);
 	int id = messageBox.open ();
 	int[] result = {id == SWT.OK ? 1 : 0};
-	XPCOM.memmove (_retval, result, 4);
+	XPCOM.memmove (_retval, result, 4); /* PRBool */
 	return XPCOM.NS_OK;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java
index 17ca051..4a176e0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,7 +152,11 @@ int CreateChromeWindow2 (int /*long*/ parent, int chromeFlags, int contextFlags,
 		* dialog that is not available to it (eg.- a print dialog on Linux).  For this
 		* reason modal requests are handled here so that the user is not exposed to them.
 		*/
-		int style = SWT.DIALOG_TRIM;
+		int style = SWT.NONE;
+		if ((chromeFlags & nsIWebBrowserChrome.CHROME_WINDOW_POPUP) == 0) {
+			/* add dialog trim for all windows except pop-ups */
+			style |= SWT.DIALOG_TRIM;
+		}
 		if ((chromeFlags & nsIWebBrowserChrome.CHROME_MODAL) != 0) style |= SWT.APPLICATION_MODAL; 
 		final Shell shell = src == null ?
 			new Shell (style) :
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java
index f474386..79be3c2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java	
@@ -44,9 +44,9 @@ public class XPCOM extends C {
 	public static final String DOMEVENT_MOUSEWHEEL = "DOMMouseScroll"; //$NON-NLS-1$
 	public static final String DOMEVENT_MOUSEOVER = "mouseover"; //$NON-NLS-1$
 	public static final String DOMEVENT_MOUSEOUT = "mouseout"; //$NON-NLS-1$
-	public static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
 	public static final String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
 	public static final String DOMEVENT_KEYPRESS = "keypress"; //$NON-NLS-1$
+	public static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
 	
 	/* CID constants */
 	public static final nsID EXTERNAL_CID = new nsID ("f2c59ad0-bd76-11dd-ad8b-0800200c9a66"); //$NON-NLS-1$
@@ -72,6 +72,7 @@ public class XPCOM extends C {
 	public static final String NS_FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1"; //$NON-NLS-1$
 	public static final String NS_HELPERAPPLAUNCHERDIALOG_CONTRACTID = "@mozilla.org/helperapplauncherdialog;1"; //$NON-NLS-1$
 	public static final String NS_MEMORY_CONTRACTID = "@mozilla.org/xpcom/memory-service;1"; //$NON-NLS-1$
+	public static final String NS_MIMEINPUTSTREAM_CONTRACTID = "@mozilla.org/network/mime-input-stream;1"; //$NON-NLS-1$
 	public static final String NS_SCRIPTSECURITYMANAGER_CONTRACTID = "@mozilla.org/scriptsecuritymanager;1"; //$NON-NLS-1$
 	public static final String NS_OBSERVER_CONTRACTID = "@mozilla.org/observer-service;1"; //$NON-NLS-1$
 	public static final String NS_PREFLOCALIZEDSTRING_CONTRACTID = "@mozilla.org/pref-localizedstring;1"; //$NON-NLS-1$
@@ -165,7 +166,16 @@ public static final int JS_EvaluateUCScriptForPrincipals(byte[] mozillaPath, int
 		lock.unlock();
 	}
 }
-
+/** @method flags=no_gen */
+public static final native boolean _NS_Free(byte[] mozillaPath, int /*long*/ aPtr);
+public static final boolean NS_Free(byte[] mozillaPath, int /*long*/ aPtr) {
+	lock.lock();
+	try {
+		return _NS_Free(mozillaPath, aPtr);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param result cast=(nsIComponentManager**) */
 public static final native int _NS_GetComponentManager(int /*long*/[] result);
 public static final int NS_GetComponentManager(int /*long*/[] result) {
@@ -2259,9 +2269,4 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1
 	}
 }
 
-/**
- * @method flags=no_gen
- */
-public static final native int GetAddress(int ptr, int index);
-
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService.java
index f3faf9b..eebe8ab 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService.java	
@@ -1,64 +1,63 @@
-package org.eclipse.swt.internal.mozilla;
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-public class nsICookieService extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
-
-	public static final String NS_ICOOKIESERVICE_IID_STR =
-		"011c3190-1434-11d6-a618-0010a401eb10";
-
-	public static final nsID NS_ICOOKIESERVICE_IID =
-		new nsID(NS_ICOOKIESERVICE_IID_STR);
-
-	public nsICookieService(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetCookieString(int /*long*/ aURI, int /*long*/ aChannel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, aChannel, _retval);
-	}
-
-	public int GetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aChannel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aURI, aFirstURI, aChannel, _retval);
-	}
-
-	public int SetCookieString(int /*long*/ aURI, int /*long*/ aPrompt, byte[] aCookie, int /*long*/ aChannel) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aPrompt, aCookie, aChannel);
-	}
-
-	public int SetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aPrompt, byte[] aCookie, byte[] aServerTime, int /*long*/ aChannel) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel);
-	}
-
-	public int GetCookieIconIsVisible(int[] aCookieIconIsVisible) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aCookieIconIsVisible);
-	}
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class nsICookieService extends nsISupports {
+
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 5;
+
+	public static final String NS_ICOOKIESERVICE_IID_STR =
+		"011c3190-1434-11d6-a618-0010a401eb10";
+
+	public static final nsID NS_ICOOKIESERVICE_IID =
+		new nsID(NS_ICOOKIESERVICE_IID_STR);
+
+	public nsICookieService(int /*long*/ address) {
+		super(address);
+	}
+
+	public int GetCookieString(int /*long*/ aURI, int /*long*/ aChannel, int /*long*/[] _retval) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, aChannel, _retval);
+	}
+
+	public int GetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aChannel, int /*long*/[] _retval) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aURI, aFirstURI, aChannel, _retval);
+	}
+
+	public int SetCookieString(int /*long*/ aURI, int /*long*/ aPrompt, byte[] aCookie, int /*long*/ aChannel) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aPrompt, aCookie, aChannel);
+	}
+
+	public int SetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aPrompt, byte[] aCookie, byte[] aServerTime, int /*long*/ aChannel) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel);
+	}
+
+	public int GetCookieIconIsVisible(int[] aCookieIconIsVisible) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aCookieIconIsVisible);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java
index 0824f34..429bba2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java	
@@ -1,59 +1,59 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class  nsICookieService_1_9 extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
-
-	public static final String NS_ICOOKIESERVICE_IID_STR =
-		"2aaa897a-293c-4d2b-a657-8c9b7136996d";
-
-	public static final nsID NS_ICOOKIESERVICE_IID =
-		new nsID(NS_ICOOKIESERVICE_IID_STR);
-
-	public  nsICookieService_1_9(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetCookieString(int /*long*/ aURI, int /*long*/ aChannel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, aChannel, _retval);
-	}
-
-	public int GetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aChannel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aURI, aFirstURI, aChannel, _retval);
-	}
-
-	public int SetCookieString(int /*long*/ aURI, int /*long*/ aPrompt, byte[] aCookie, int /*long*/ aChannel) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aPrompt, aCookie, aChannel);
-	}
-
-	public int SetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aPrompt, byte[] aCookie, byte[] aServerTime, int /*long*/ aChannel) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel);
-	}
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class  nsICookieService_1_9 extends nsISupports {
+
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+
+	public static final String NS_ICOOKIESERVICE_IID_STR =
+		"2aaa897a-293c-4d2b-a657-8c9b7136996d";
+
+	public static final nsID NS_ICOOKIESERVICE_IID =
+		new nsID(NS_ICOOKIESERVICE_IID_STR);
+
+	public  nsICookieService_1_9(int /*long*/ address) {
+		super(address);
+	}
+
+	public int GetCookieString(int /*long*/ aURI, int /*long*/ aChannel, int /*long*/[] _retval) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, aChannel, _retval);
+	}
+
+	public int GetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aChannel, int /*long*/[] _retval) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aURI, aFirstURI, aChannel, _retval);
+	}
+
+	public int SetCookieString(int /*long*/ aURI, int /*long*/ aPrompt, byte[] aCookie, int /*long*/ aChannel) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aPrompt, aCookie, aChannel);
+	}
+
+	public int SetCookieStringFromHttp(int /*long*/ aURI, int /*long*/ aFirstURI, int /*long*/ aPrompt, byte[] aCookie, byte[] aServerTime, int /*long*/ aChannel) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aURI, aFirstURI, aPrompt, aCookie, aServerTime, aChannel);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsID.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsID.java
index a5fd6d8..716aab3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsID.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsID.java	
@@ -54,24 +54,68 @@ public boolean Equals(nsID other) {
 	return result;
 }
 
-public void Parse (String aIDStr) {
-	if (aIDStr == null) throw new Error ();
+public void Parse(String aIDStr) {
+	if(aIDStr == null) throw new Error ();
 	int i = 0;
-	for (; i < 8; i++) m0 = (m0 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16);
+	for (; i < 8; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m0 = (m0 << 4) + digit;
+	}
 	if (aIDStr.charAt (i++) != '-') throw new Error ();
-	for (; i < 13; i++) m1 = (short)((m1 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+	for (; i < 13; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m1 = (short)((m1 << 4) + digit);
+	}
 	if (aIDStr.charAt (i++) != '-') throw new Error ();
-	for (; i < 18; i++) m2 = (short)((m2 << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+	for (; i < 18; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m2 = (short)((m2 << 4) + digit);
+	}
 	if (aIDStr.charAt (i++) != '-') throw new Error ();
-	for (; i < 21; i++) m3[0] = (byte)((m3[0] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 23; i++) m3[1] = (byte)((m3[1] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+	for (; i < 21; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[0] = (byte)((m3[0] << 4) + digit);
+	}
+	for (; i < 23; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[1] = (byte)((m3[1] << 4) + digit);
+	}
 	if (aIDStr.charAt (i++) != '-') throw new Error ();
-	for (; i < 26; i++) m3[2] = (byte)((m3[2] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 28; i++) m3[3] = (byte)((m3[3] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 30; i++) m3[4] = (byte)((m3[4] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 32; i++) m3[5] = (byte)((m3[5] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 34; i++) m3[6] = (byte)((m3[6] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
-	for (; i < 36; i++) m3[7] = (byte)((m3[7] << 4) + Integer.parseInt (aIDStr.substring (i, i + 1), 16));
+	for (; i < 26; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[2] = (byte)((m3[2] << 4) + digit);
+	}
+	for (; i < 28; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[3] = (byte)((m3[3] << 4) + digit);
+	}
+	for (; i < 30; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[4] = (byte)((m3[4] << 4) + digit);
+	}
+	for (; i < 32; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[5] = (byte)((m3[5] << 4) + digit);
+	}
+	for (; i < 34; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[6] = (byte)((m3[6] << 4) + digit);
+	}
+	for (; i < 36; i++) {
+		int digit = Character.digit (aIDStr.charAt (i), 16);
+		if (digit == -1) throw new Error ();
+		m3[7] = (byte)((m3[7] << 4) + digit);
+	}
 }
 
-}
\ No newline at end of file
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDataType.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDataType.java
index 88e6093..d54f3d7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDataType.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIDataType.java	
@@ -1,6 +1,32 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-
 public class nsIDataType extends nsISupports {
 
 	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java
new file mode 100644
index 0000000..2d1d44e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java	
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
+package org.eclipse.swt.internal.mozilla;
+
+public class  nsIMIMEInputStream extends nsIInputStream {
+
+	static final int LAST_METHOD_ID = nsIInputStream.LAST_METHOD_ID + 4;
+
+	public static final String NS_IMIMEINPUTSTREAM_IID_STR =
+		"dcbce63c-1dd1-11b2-b94d-91f6d49a3161";
+
+	public static final nsID NS_IMIMEINPUTSTREAM_IID =
+		new nsID(NS_IMIMEINPUTSTREAM_IID_STR);
+
+	public  nsIMIMEInputStream(int /*long*/ address) {
+		super(address);
+	}
+
+	public int GetAddContentLength(int[] aAddContentLength) {
+		return XPCOM.VtblCall(nsIInputStream.LAST_METHOD_ID + 1, getAddress(), aAddContentLength);
+	}
+
+	public int SetAddContentLength(int aAddContentLength) {
+		return XPCOM.VtblCall(nsIInputStream.LAST_METHOD_ID + 2, getAddress(), aAddContentLength);
+	}
+
+	public int AddHeader(byte[] name, byte[] value) {
+		return XPCOM.VtblCall(nsIInputStream.LAST_METHOD_ID + 3, getAddress(), name, value);
+	}
+
+	public int SetData(int /*long*/ stream) {
+		return XPCOM.VtblCall(nsIInputStream.LAST_METHOD_ID + 4, getAddress(), stream);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISecurityCheckedComponent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISecurityCheckedComponent.java
index bc58ffa..017ed67 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISecurityCheckedComponent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsISecurityCheckedComponent.java	
@@ -1,6 +1,32 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-
 public class nsISecurityCheckedComponent extends nsISupports {
 
 	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java
index 30b340c..76566dd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java	
@@ -1,6 +1,32 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code, released March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by Netscape are Copyright (C) 1998-1999
+ * Netscape Communications Corporation.  All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * IBM
+ * -  Binding to permit interfacing between Mozilla and SWT
+ * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.
+ *
+ * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-
 public class nsIWritableVariant extends nsIVariant {
 
 	static final int LAST_METHOD_ID = nsIVariant.LAST_METHOD_ID + 31;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
index 76a5d83..e2dda62 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,6 +68,10 @@ static Browser findBrowser (int /*long*/ handle) {
 	return (Browser)display.findWidget (parent); 
 }
 
+static String getLibraryName () {
+	return "libxpcom.so"; //$NON-NLS-1$
+}
+
 static char[] mbcsToWcs (String codePage, byte [] buffer) {
 	return Converter.mbcsToWcs (codePage, buffer);
 }
@@ -104,8 +108,9 @@ String getJSLibraryName () {
 	return "libmozjs.so"; //$NON-NLS-1$
 }
 
-String getLibraryName () {
-	return "libxpcom.so"; //$NON-NLS-1$
+String getProfilePath () {
+	String baseDir = System.getProperty ("user.home"); //$NON-NLS-1$
+	return baseDir + Mozilla.SEPARATOR_OS + ".mozilla" + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
 String getSWTInitLibraryName () {
@@ -216,6 +221,10 @@ void onDispose (int /*long*/ embedHandle) {
 void removeWindowSubclass () {
 }
 
+boolean sendTraverse () {
+	return true;
+}
+
 void setSize (int /*long*/ embedHandle, int width, int height) {
 	OS.gtk_widget_set_size_request (embedHandle, width, height);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java
index 8fcdf91..3a6c5bd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/motif/org/eclipse/swt/browser/MozillaDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,6 +77,10 @@ static Browser findBrowser (Control control, int gtkHandle) {
 	return null;
 }
 
+static String getLibraryName () {
+	return "libxpcom.so"; //$NON-NLS-1$
+}
+
 static char[] mbcsToWcs (String codePage, byte [] buffer) {
 	return Converter.mbcsToWcs (codePage, buffer);
 }
@@ -116,8 +120,9 @@ String getJSLibraryName () {
 	return "libmozjs.so"; //$NON-NLS-1$
 }
 
-String getLibraryName () {
-	return "libxpcom.so"; //$NON-NLS-1$
+String getProfilePath () {
+	String baseDir = System.getProperty ("user.home"); //$NON-NLS-1$
+	return baseDir + Mozilla.SEPARATOR_OS + ".mozilla" + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
 String getSWTInitLibraryName () {
@@ -183,6 +188,10 @@ void onDispose (int embedHandle) {
 void removeWindowSubclass () {
 }
 
+boolean sendTraverse () {
+	return true;
+}
+
 void setSize(int embedHandle, int width, int height) {
 }
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java
index 9eb0169..f7bb342 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Mozilla/win32/org/eclipse/swt/browser/MozillaDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,10 @@ static Browser findBrowser (int /*long*/ handle) {
 	return (Browser)display.findWidget (handle);
 }
 
+static String getLibraryName () {
+	return "xpcom.dll"; //$NON-NLS-1$
+}
+
 static char[] mbcsToWcs (String codePage, byte[] buffer) {
 	char[] chars = new char[buffer.length];
 	int charCount = OS.MultiByteToWideChar (OS.CP_ACP, OS.MB_PRECOMPOSED, buffer, buffer.length, chars, chars.length);
@@ -90,8 +94,16 @@ String getJSLibraryName () {
 	return "js3250.dll"; //$NON-NLS-1$
 }
 
-String getLibraryName () {
-	return "xpcom.dll"; //$NON-NLS-1$
+String getProfilePath () {
+	String baseDir;
+	/* Use the character encoding for the default locale */
+	TCHAR buffer = new TCHAR (0, OS.MAX_PATH);
+	if (OS.SHGetFolderPath (0, OS.CSIDL_APPDATA, 0, OS.SHGFP_TYPE_CURRENT, buffer) == OS.S_OK) {
+		baseDir = buffer.toString (0, buffer.strlen ());
+	} else {
+		baseDir = System.getProperty("user.home"); //$NON-NLS-1$
+	}
+	return baseDir + Mozilla.SEPARATOR_OS + "Mozilla" + Mozilla.SEPARATOR_OS + "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
 String getSWTInitLibraryName () {
@@ -126,6 +138,10 @@ void removeWindowSubclass () {
 	OS.SetWindowLongPtr (hwndChild, OS.GWL_WNDPROC, MozillaProc);
 }
 
+boolean sendTraverse () {
+	return false;
+}
+
 void setSize (int /*long*/ embedHandle, int width, int height) {
 }
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java
index 9199b4a..96856e3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleAutomation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.swt.ole.win32;
 
 
+import org.eclipse.swt.*;
 import org.eclipse.swt.internal.ole.win32.*;
 import org.eclipse.swt.internal.win32.*;
 
@@ -83,6 +84,7 @@ import org.eclipse.swt.internal.win32.*;
  * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Examples: OLEExample, OleWebBrowser</a>
  */
 public final class OleAutomation {
+	private IUnknown objIUnknown;
 	private IDispatch objIDispatch;
 	private String exceptionDescription;
 	private ITypeInfo objITypeInfo;
@@ -111,7 +113,7 @@ OleAutomation(IDispatch idispatch) {
  *		<li>ERROR_INVALID_INTERFACE_ADDRESS when called with an invalid client site
  *	</ul>
  */
- public OleAutomation(OleClientSite clientSite) {
+public OleAutomation(OleClientSite clientSite) {
 	if (clientSite == null) OLE.error(OLE.ERROR_INVALID_INTERFACE_ADDRESS);
 	objIDispatch = clientSite.getAutomationObject();
 
@@ -123,7 +125,55 @@ OleAutomation(IDispatch idispatch) {
 	if (result == OLE.S_OK) {
 		objITypeInfo = new ITypeInfo(ppv[0]);
 	}
- }
+}
+/**
+ * Creates an OleAutomation object for the specified <code>progID</code>.
+ *
+ * @param progId the unique program identifier of an OLE Document application; 
+ *               the value of the ProgID key or the value of the VersionIndependentProgID key specified
+ *               in the registry for the desired OLE Document (for example, the VersionIndependentProgID
+ *               for Word is Word.Document)
+ *               
+ * @exception SWTException
+ * <ul><li>ERROR_INVALID_CLASSID when the progId does not map to a registered CLSID
+ *     <li>ERROR_CANNOT_CREATE_OBJECT when failed to create OLE Object
+ *     <li>ERROR_INTERFACE_NOT_FOUND when the OLE object specified does not implement IDispatch
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public OleAutomation(String progId) {
+	try {
+		OS.OleInitialize(0);
+		GUID appClsid = getClassID(progId);
+		if (appClsid == null) {
+			OS.OleUninitialize();
+			OLE.error(OLE.ERROR_INVALID_CLASSID);
+		}
+		
+		int /*long*/[] ppvObject = new int /*long*/[1];
+		int result = COM.CoCreateInstance(appClsid, 0, COM.CLSCTX_INPROC_SERVER, COM.IIDIUnknown, ppvObject); 
+		if (result != COM.S_OK) {
+			OS.OleUninitialize();
+			OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
+		}
+		objIUnknown = new IUnknown(ppvObject[0]);
+		
+		ppvObject[0] = 0;
+		result = objIUnknown.QueryInterface(COM.IIDIDispatch, ppvObject); 
+		if (result != COM.S_OK) OLE.error(OLE.ERROR_INTERFACE_NOT_FOUND);
+		objIDispatch = new IDispatch(ppvObject[0]);
+
+		ppvObject[0] = 0;
+		result = objIDispatch.GetTypeInfo(0, COM.LOCALE_USER_DEFAULT, ppvObject);
+		if (result == OLE.S_OK) {
+			objITypeInfo = new ITypeInfo(ppvObject[0]);
+		}
+	} catch (SWTException e) {
+		dispose();
+		throw e;
+	}
+}
 /**
  * Disposes the automation object.
  * <p>
@@ -141,11 +191,33 @@ public void dispose() {
 		objITypeInfo.Release();
 	}
 	objITypeInfo = null;
-
+	
+	if (objIUnknown != null){
+		objIUnknown.Release();
+		OS.OleUninitialize();
+	}
+	objIUnknown = null;
 }
 int /*long*/ getAddress() {	
 	return objIDispatch.getAddress();
 }
+GUID getClassID(String clientName) {
+	// create a GUID struct to hold the result
+	GUID guid = new GUID();
+
+	// create a null terminated array of char
+	char[] buffer = null;
+	if (clientName != null) {
+		int count = clientName.length();
+		buffer = new char[count + 1];
+		clientName.getChars(0, count, buffer, 0);
+	}
+	if (COM.CLSIDFromProgID(buffer, guid) != COM.S_OK){
+		int result = COM.CLSIDFromString(buffer, guid);
+		if (result != COM.S_OK) return null;
+	}
+	return guid;
+}
 /**
  * Returns the fully qualified name of the Help file for the given member ID.
  * 
@@ -397,7 +469,18 @@ public Variant getProperty(int dispIdMember, Variant[] rgvarg, int[] rgdispidNam
 	int result = invoke(dispIdMember, COM.DISPATCH_PROPERTYGET, rgvarg, rgdispidNamedArgs, pVarResult);
 	return (result == OLE.S_OK) ? pVarResult : null;
 }
-
+public boolean equals(Object object) {
+	if (object == this) return true;
+	if (object instanceof OleAutomation) {
+		if (objIDispatch == null) return false;
+		OleAutomation oleAutomation = ((OleAutomation) object); 
+		if (oleAutomation.objIDispatch == null) return false;
+		int /*long*/ address1 = objIDispatch.getAddress();
+		int /*long*/ address2 = oleAutomation.objIDispatch.getAddress();
+		return address1 == address2;
+	}
+	return false;
+}
 /** 
  * Invokes a method on the OLE Object; the method has no parameters.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
index 7907060..f05b576 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -202,7 +202,7 @@ public OleClientSite(Composite parent, int style, File file) {
  *
  * @param parent a composite widget; must be an OleFrame
  * @param style the bitwise OR'ing of widget styles
- * @param progId the unique program identifier of am OLE Document application; 
+ * @param progId the unique program identifier of an OLE Document application; 
  *               the value of the ProgID key or the value of the VersionIndependentProgID key specified
  *               in the registry for the desired OLE Document (for example, the VersionIndependentProgID
  *               for Word is Word.Document)
@@ -230,7 +230,14 @@ public OleClientSite(Composite parent, int style, String progId) {
 	
 		// Create ole object with storage object
 		int /*long*/[] address = new int /*long*/[1];
-		int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, iOleClientSite.getAddress(), tempStorage.getAddress(), address);
+		/*
+		* Bug in ICA Client 2.7. The creation of the IOleObject fails if the client
+		* site is provided to OleCreate().  The fix is to detect that the program
+		* id is an ICA Client and do not pass a client site to OleCreate().
+		* IOleObject.SetClientSite() is called later on.  
+		*/
+		int /*long*/ clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
+		int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, clientSite, tempStorage.getAddress(), address);
 		if (result != COM.S_OK)
 			OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
 
@@ -274,6 +281,8 @@ public OleClientSite(Composite parent, int style, String progId) {
  *     <li>ERROR_CANNOT_CREATE_OBJECT when failed to create OLE Object
  *     <li>ERROR_CANNOT_OPEN_FILE when failed to open file
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public OleClientSite(Composite parent, int style, String progId, File file) {
 	this(parent, style);
@@ -819,6 +828,9 @@ private int GetWindowContext(int /*long*/ ppFrame, int /*long*/ ppDoc, int /*lon
 	
 	return COM.S_OK;
 }
+boolean isICAClient() {
+	return getProgramID().startsWith("Citrix.ICAClient"); //$NON-NLS-1$ 
+}
 /**
  * Returns whether ole document is dirty by checking whether the content 
  * of the file representing the document is dirty.
@@ -1126,7 +1138,7 @@ protected void releaseObjectInterfaces() {
 		objIUnknown.Release();
 	}
 	objIUnknown = null;
-
+	
 	if (COM.FreeUnusedLibraries) {
 		COM.CoFreeUnusedLibraries();
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java
index 5bb981e..b5dda3f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleControlSite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -137,7 +137,14 @@ public OleControlSite(Composite parent, int style, String progId) {
 	
 			// Create ole object with storage object
 			int /*long*/[] address = new int /*long*/[1];
-			int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, iOleClientSite.getAddress(), tempStorage.getAddress(), address);
+			/*
+			* Bug in ICA Client 2.7. The creation of the IOleObject fails if the client
+			* site is provided to OleCreate().  The fix is to detect that the program
+			* id is an ICA Client and do not pass a client site to OleCreate().
+			* IOleObject.SetClientSite() is called later on.  
+			*/
+			int /*long*/ clientSite = isICAClient() ? 0 : iOleClientSite.getAddress();
+			int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, clientSite, tempStorage.getAddress(), address);
 			if (result != COM.S_OK)
 				OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result);
 	
@@ -217,6 +224,8 @@ public OleControlSite(Composite parent, int style, String progId) {
  *     <li>ERROR_CANNOT_OPEN_FILE when failed to open file
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.5
  */
 public OleControlSite(Composite parent, int style, String progId, File file) {
@@ -656,6 +665,9 @@ private int OnControlInfoChanged() {
 	}
 	return COM.S_OK;
 }
+protected int OnUIDeactivate(int fUndoable) {
+	return super.OnUIDeactivate(fUndoable);
+}
 void onFocusIn(Event e) {
 	String progID = getProgramID();
 	if (progID == null) return;
@@ -679,6 +691,13 @@ void onFocusOut(Event e) {
 		super.onFocusOut(e);
 		return;
 	}
+
+	/*
+	* FocusOut is received when focus is reassigned between handles within
+	* our site.  In such cases the site should not be UIDeactivated.
+	*/
+	if (isFocusControl()) return;
+
 	/*
 	* Bug in Windows.  When IE7 loses focus and UIDeactivate()
 	* is called, IE destroys the caret even though it is
@@ -718,19 +737,6 @@ void onFocusOut(Event e) {
 private int OnFocus(int fGotFocus) {
 	return COM.S_OK;
 }
-protected int OnUIDeactivate(int fUndoable) {
-	// controls don't need to do anything for
-	// border space or menubars
-	if (frame == null || frame.isDisposed()) return COM.S_OK;
-	state = STATE_INPLACEACTIVE;
-	frame.SetActiveObject(0,0);
-	redraw();
-	Shell shell = getShell();
-	if (isFocusControl() || frame.isFocusControl()) {
-		shell.traverse(SWT.TRAVERSE_TAB_NEXT);
-	}
-	return COM.S_OK;
-}
 protected int QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
 	int result = super.QueryInterface(riid, ppvObject);
 	if (result == COM.S_OK)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java
index 9e4a5f4..cbc6210 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleFrame.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,6 +65,7 @@ final public class OleFrame extends Composite
 	private static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'};
 	
 	private static final String CONSUME_KEY = "org.eclipse.swt.OleFrame.ConsumeKey"; //$NON-NLS-1$
+	private static final String ACCEL_KEY_HIT = "org.eclipse.swt.internal.win32.accelKeyHit"; //$NON-NLS-1$
 
 /**
  * Create an OleFrame child widget using style bits
@@ -217,7 +218,12 @@ static int /*long*/ getMsgProc(int /*long*/ code, int /*long*/ wParam, int /*lon
 					if (!rc || (lpgui.flags & mask) == 0) {
 						OleFrame frame = site.frame;
 						frame.setData(CONSUME_KEY, null);
+						display.setData(ACCEL_KEY_HIT, Boolean.TRUE);
 						consumed = frame.translateOleAccelerator(msg);
+						/* translateOleAccelerator() may send client events, ensure that the frame and display are still valid */
+						if (display.isDisposed()) return 0;
+						display.setData(ACCEL_KEY_HIT, Boolean.FALSE);
+						if (frame.isDisposed()) return 0;
 						String value = (String)frame.getData(CONSUME_KEY); 
 						if (value != null) consumed = value.equals("true"); //$NON-NLS-1$
 						frame.setData(CONSUME_KEY, null);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
index 0cb028d..26c2ec7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,6 +55,8 @@ public final class Variant {
  * @param pVarDest destination pointer to a variant
  * @param varSrc source <code>Variant</code>
  *
+ * @noreference This method is not intended to be referenced by clients.
+ *
  * @since 3.3
  */
 public static void win32_copy (int /*long*/ pVarDest, Variant varSrc) {
@@ -75,6 +77,8 @@ public static void win32_copy (int /*long*/ pVarDest, Variant varSrc) {
  * @param pVariant pointer to a variant
  *
  * @return a new <code>Variant</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  *
  * @since 3.3
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h
index 9d0ae8d..44c5e55 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h	
@@ -20,7 +20,15 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* Libraries for dynamic loaded functions */
-#define cairo_pdf_surface_set_size_LIB "libcairo.so.2"
-#define cairo_ps_surface_set_size_LIB "libcairo.so.2"
-#define cairo_surface_set_fallback_resolution_LIB "libcairo.so.2"
-#define cairo_surface_get_type_LIB "libcairo.so.2"
+#ifdef AIX
+#define LIB_CAIRO "libcairo.a(libcairo.so.2)"
+#elif HPUX
+#define LIB_CAIRO "libcairo.so"
+#else
+#define LIB_CAIRO "libcairo.so.2"
+#endif
+
+#define cairo_pdf_surface_set_size_LIB LIB_CAIRO
+#define cairo_ps_surface_set_size_LIB LIB_CAIRO
+#define cairo_surface_set_fallback_resolution_LIB LIB_CAIRO
+#define cairo_surface_get_type_LIB LIB_CAIRO
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.xml
deleted file mode 100644
index 34d3343..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/build.xml	
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_carbon_lib" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />	
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-	
-<target name="build_carbon_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.carbon.macosx" depth="infinite" />		
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="clean"/>
-	</exec>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa.c
index 0609152..b79006f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,6 +79,25 @@ JNIEXPORT jint JNICALL Cocoa_NATIVE(NSDeviceRGBColorSpace)
 }
 #endif
 
+#ifndef NO_NSPointInRect
+JNIEXPORT jboolean JNICALL Cocoa_NATIVE(NSPointInRect)
+	(JNIEnv *env, jclass that, jobject arg0, jobject arg1)
+{
+	NSPoint _arg0, *lparg0=NULL;
+	NSRect _arg1, *lparg1=NULL;
+	jboolean rc = 0;
+	Cocoa_NATIVE_ENTER(env, that, NSPointInRect_FUNC);
+	if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = getNSRectFields(env, arg1, &_arg1)) == NULL) goto fail;
+	rc = (jboolean)NSPointInRect(*lparg0, *lparg1);
+fail:
+	if (arg1 && lparg1) setNSRectFields(env, arg1, lparg1);
+	if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
+	Cocoa_NATIVE_EXIT(env, that, NSPointInRect_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSSearchPathForDirectoriesInDomains
 JNIEXPORT jint JNICALL Cocoa_NATIVE(NSSearchPathForDirectoriesInDomains)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jboolean arg2)
@@ -269,6 +288,18 @@ JNIEXPORT jint JNICALL Cocoa_NATIVE(objc_1msgSend__IIIIII)
 }
 #endif
 
+#ifndef NO_objc_1msgSend__IIIIIIII
+JNIEXPORT jint JNICALL Cocoa_NATIVE(objc_1msgSend__IIIIIIII)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
+{
+	jint rc = 0;
+	Cocoa_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIII_FUNC);
+	rc = (jint)objc_msgSend((id)arg0, (SEL)arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+	Cocoa_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIII_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2
 JNIEXPORT jint JNICALL Cocoa_NATIVE(objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jobject arg3)
@@ -419,6 +450,22 @@ fail:
 }
 #endif
 
+#ifndef NO_objc_1msgSend__II_3BI
+JNIEXPORT jint JNICALL Cocoa_NATIVE(objc_1msgSend__II_3BI)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jbyteArray arg2, jint arg3)
+{
+	jbyte *lparg2=NULL;
+	jint rc = 0;
+	Cocoa_NATIVE_ENTER(env, that, objc_1msgSend__II_3BI_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (*)(jint, jint, jbyte *, jint))objc_msgSend)(arg0, arg1, lparg2, arg3);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	Cocoa_NATIVE_EXIT(env, that, objc_1msgSend__II_3BI_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_objc_1msgSend__II_3C
 JNIEXPORT jint JNICALL Cocoa_NATIVE(objc_1msgSend__II_3C)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2)
@@ -463,6 +510,35 @@ JNIEXPORT jdouble JNICALL Cocoa_NATIVE(objc_1msgSend_1fpret)
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL Cocoa_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL Cocoa_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+	NSPoint _arg0, *lparg0=NULL;
+#ifndef JNI64
+	Cocoa_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
+#else
+	Cocoa_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
+		*lparg0 = (*(NSPoint (*)(jintLong, jintLong))objc_msgSend_stret)(arg1, arg2);
+	} else {
+		*lparg0 = (*(NSPoint (*)(jintLong, jintLong))objc_msgSend)(arg1, arg2);
+	}
+fail:
+	if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0);
+#ifndef JNI64
+	Cocoa_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC);
+#else
+	Cocoa_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC);
+#endif
+}
+#endif
+
 #ifndef NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II
 JNIEXPORT void JNICALL Cocoa_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II)
 	(JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c
index e298bd6..b7b7438 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,6 +86,21 @@ fail:
 	proc((int)self, user_data, 3, &rect);
 	[super drawRect: rect];
 }
+
+- (void)rightMouseUp:(NSEvent *)event
+{
+	proc((int)self, user_data, 4, event);
+}
+
+- (void)mouseDragged:(NSEvent *)event
+{
+	proc((int)self, user_data, 5, event);
+}
+
+- (void)rightMouseDragged:(NSEvent *)event
+{
+	proc((int)self, user_data, 6, event);
+}
 @end
 
 @interface WebKitDelegate : NSObject
@@ -233,16 +248,31 @@ fail:
 	proc((int)sender, user_data, 25, 0, 0, 0, 0);
 }
 
+- (BOOL)webView:(WebView *)sender runBeforeUnloadConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+	return proc((int)sender, user_data, 36, (int)message, (int)frame, 0, 0);
+}
+
 - (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message
 {
 	proc((int)sender, user_data, 26, (int)message, 0, 0, 0);
 }
 
+- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+	proc((int)sender, user_data, 26, (int)message, 0, 0, 0);
+}
+
 - (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message
 {
 	return (BOOL) proc((int)sender, user_data, 27, (int)message, 0, 0, 0);
 }
 
+- (BOOL)webView:(WebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+	return (BOOL) proc((int)sender, user_data, 27, (int)message, 0, 0, 0);
+}
+
 - (void)webView:(WebView *)sender runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
 {
 	proc((int)sender, user_data, 28, (int)resultListener, 0, 0, 0);
@@ -294,7 +324,7 @@ fail:
 
 + (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector
 {
-	return aSelector != @selector(callJava:index:arg:);
+	return !(aSelector == @selector(callJava:index:arg:) || aSelector == @selector(callRunBeforeUnloadConfirmPanelWithMessage:arg:));
 }
 
 + (NSString *)webScriptNameForSelector:(SEL)aSelector
@@ -302,6 +332,9 @@ fail:
 	if (aSelector == @selector(callJava:index:arg:)) {
 		return @"callJava";
 	}
+	if (aSelector == @selector(callRunBeforeUnloadConfirmPanelWithMessage:arg:)) {
+		return @"callRunBeforeUnloadConfirmPanelWithMessage";
+	}
 	return 0;
 }
 
@@ -312,5 +345,16 @@ fail:
 	return (id)proc(0, user_data, 34, (int)arg, (int)index, (int)arg0, 0);
 }
 
- at end
+- (id)callRunBeforeUnloadConfirmPanelWithMessage:(NSString *)arg arg:(NSObject *)arg0
+{
+	return (id)proc(0, user_data, 37, (int)arg, (int)arg0, 0, 0);
+}
+
+/* invalid certificate handler */
+
+-(void)createPanelDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
+{
+	proc(0, user_data, 38, (int)sheet, returnCode, (int)contextInfo, 0);
+}
 
+ at end
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.c
index 71c8ec3..2261d5c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,14 +14,15 @@
 
 #ifdef NATIVE_STATS
 
-int Cocoa_nativeFunctionCount = 35;
-int Cocoa_nativeFunctionCallCount[35];
+int Cocoa_nativeFunctionCount = 39;
+int Cocoa_nativeFunctionCallCount[39];
 char * Cocoa_nativeFunctionNames[] = {
 	"HICocoaViewCreate",
 	"HIJavaViewCreateWithCocoaView",
 	"HIWebViewCreate",
 	"HIWebViewGetWebView",
 	"NSDeviceRGBColorSpace",
+	"NSPointInRect",
 	"NSSearchPathForDirectoriesInDomains",
 	"WebInitForCarbon",
 	"class_1getClassMethod",
@@ -37,6 +38,7 @@ char * Cocoa_nativeFunctionNames[] = {
 	"objc_1msgSend__IIII",
 	"objc_1msgSend__IIIII",
 	"objc_1msgSend__IIIIII",
+	"objc_1msgSend__IIIIIIII",
 	"objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2",
 	"objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I",
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
@@ -46,9 +48,15 @@ char * Cocoa_nativeFunctionNames[] = {
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II",
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2",
+	"objc_1msgSend__II_3BI",
 	"objc_1msgSend__II_3C",
 	"objc_1msgSend__II_3IIIIIIIIIII",
 	"objc_1msgSend_1fpret",
+#ifndef JNI64
+	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II",
+#else
+	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ",
+#endif
 	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II",
 	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I",
 	"sel_1registerName",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.h
index 18345a3..c954f25 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ typedef enum {
 	HIWebViewCreate_FUNC,
 	HIWebViewGetWebView_FUNC,
 	NSDeviceRGBColorSpace_FUNC,
+	NSPointInRect_FUNC,
 	NSSearchPathForDirectoriesInDomains_FUNC,
 	WebInitForCarbon_FUNC,
 	class_1getClassMethod_FUNC,
@@ -45,6 +46,7 @@ typedef enum {
 	objc_1msgSend__IIII_FUNC,
 	objc_1msgSend__IIIII_FUNC,
 	objc_1msgSend__IIIIII_FUNC,
+	objc_1msgSend__IIIIIIII_FUNC,
 	objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
 	objc_1msgSend__IIILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
@@ -54,9 +56,15 @@ typedef enum {
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC,
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSSize_2_FUNC,
+	objc_1msgSend__II_3BI_FUNC,
 	objc_1msgSend__II_3C_FUNC,
 	objc_1msgSend__II_3IIIIIIIIIII_FUNC,
 	objc_1msgSend_1fpret_FUNC,
+#ifndef JNI64
+	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II_FUNC,
+#else
+	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSPoint_2JJ_FUNC,
+#endif
 	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2II_FUNC,
 	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2IILorg_eclipse_swt_internal_cocoa_NSRect_2I_FUNC,
 	sel_1registerName_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak
index e92742f..bf0cf51 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ XULRUNNER_LIB=lib$(SWTXULRUNNER_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).jnilib
 
 #SWT_DEBUG = -g
 ARCHS = -arch i386 -arch ppc
-CFLAGS = -c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCARBON -I /System/Library/Frameworks/JavaVM.framework/Headers
-LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Carbon 
+CFLAGS = -c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCARBON -I /System/Library/Frameworks/JavaVM.framework/Headers -I /System/Library/Frameworks/JavaScriptCore.framework/Headers
+LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Carbon -framework JavaScriptCore -framework Security -framework SecurityInterface
 COCOACFLAGS = $(CFLAGS) -xobjective-c -I /System/Library/Frameworks/Cocoa.framework/Headers -I /System/Library/Frameworks/WebKit.framework/Headers
 COCOALFLAGS = $(LFLAGS) -framework WebKit -framework Cocoa
 AGLLFLAGS = $(LFLAGS) -framework OpenGL -framework AGL
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c
index edd7280..08d6923 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,11 +17,15 @@
 
 #ifndef NO_AECoerceDesc
 JNIEXPORT jint JNICALL OS_NATIVE(AECoerceDesc)
-	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
 {
+	AEDesc _arg2, *lparg2=NULL;
 	jint rc = 0;
 	OS_NATIVE_ENTER(env, that, AECoerceDesc_FUNC);
-	rc = (jint)AECoerceDesc((AEDesc *)arg0, arg1, (AEDesc *)arg2);
+	if (arg2) if ((lparg2 = getAEDescFields(env, arg2, &_arg2)) == NULL) goto fail;
+	rc = (jint)AECoerceDesc((AEDesc *)arg0, arg1, (AEDesc *)lparg2);
+fail:
+	if (arg2 && lparg2) setAEDescFields(env, arg2, lparg2);
 	OS_NATIVE_EXIT(env, that, AECoerceDesc_FUNC);
 	return rc;
 }
@@ -83,15 +87,18 @@ fail:
 
 #ifndef NO_AEGetDescData
 JNIEXPORT jint JNICALL OS_NATIVE(AEGetDescData)
-	(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2)
+	(JNIEnv *env, jclass that, jobject arg0, jbyteArray arg1, jint arg2)
 {
+	AEDesc _arg0, *lparg0=NULL;
 	jbyte *lparg1=NULL;
 	jint rc = 0;
 	OS_NATIVE_ENTER(env, that, AEGetDescData_FUNC);
+	if (arg0) if ((lparg0 = getAEDescFields(env, arg0, &_arg0)) == NULL) goto fail;
 	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	rc = (jint)AEGetDescData((AEDesc *)arg0, (void *)lparg1, arg2);
+	rc = (jint)AEGetDescData((AEDesc *)lparg0, (void *)lparg1, arg2);
 fail:
 	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	if (arg0 && lparg0) setAEDescFields(env, arg0, lparg0);
 	OS_NATIVE_EXIT(env, that, AEGetDescData_FUNC);
 	return rc;
 }
@@ -122,6 +129,22 @@ fail:
 }
 #endif
 
+#ifndef NO_AEGetParamDesc
+JNIEXPORT jint JNICALL OS_NATIVE(AEGetParamDesc)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jobject arg3)
+{
+	AEDesc _arg3, *lparg3=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, AEGetParamDesc_FUNC);
+	if (arg3) if ((lparg3 = getAEDescFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jint)AEGetParamDesc((const AppleEvent *)arg0, (AEKeyword)arg1, (DescType)arg2, (AEDesc *)lparg3);
+fail:
+	if (arg3 && lparg3) setAEDescFields(env, arg3, lparg3);
+	OS_NATIVE_EXIT(env, that, AEGetParamDesc_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_AEInstallEventHandler
 JNIEXPORT jint JNICALL OS_NATIVE(AEInstallEventHandler)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jboolean arg4)
@@ -1236,6 +1259,71 @@ JNIEXPORT jint JNICALL OS_NATIVE(CFArrayGetValueAtIndex)
 }
 #endif
 
+#ifndef NO_CFBundleCreateBundlesFromDirectory
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleCreateBundlesFromDirectory)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFBundleCreateBundlesFromDirectory_FUNC);
+	rc = (jint)CFBundleCreateBundlesFromDirectory((CFAllocatorRef)arg0, (CFURLRef)arg1, (CFStringRef)arg2);
+	OS_NATIVE_EXIT(env, that, CFBundleCreateBundlesFromDirectory_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFBundleGetIdentifier
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleGetIdentifier)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFBundleGetIdentifier_FUNC);
+	rc = (jint)CFBundleGetIdentifier((CFBundleRef)arg0);
+	OS_NATIVE_EXIT(env, that, CFBundleGetIdentifier_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFBundleGetMainBundle
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleGetMainBundle)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFBundleGetMainBundle_FUNC);
+	rc = (jint)CFBundleGetMainBundle();
+	OS_NATIVE_EXIT(env, that, CFBundleGetMainBundle_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFBundleGetPackageInfo
+JNIEXPORT void JNICALL OS_NATIVE(CFBundleGetPackageInfo)
+	(JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
+{
+	jint *lparg1=NULL;
+	jint *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, CFBundleGetPackageInfo_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	CFBundleGetPackageInfo((CFBundleRef)arg0, (UInt32 *)lparg1, (UInt32 *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CFBundleGetPackageInfo_FUNC);
+}
+#endif
+
+#ifndef NO_CFBundleGetValueForInfoDictionaryKey
+JNIEXPORT jint JNICALL OS_NATIVE(CFBundleGetValueForInfoDictionaryKey)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFBundleGetValueForInfoDictionaryKey_FUNC);
+	rc = (jint)CFBundleGetValueForInfoDictionaryKey((CFBundleRef)arg0, (CFStringRef)arg1);
+	OS_NATIVE_EXIT(env, that, CFBundleGetValueForInfoDictionaryKey_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CFDataGetBytePtr
 JNIEXPORT jint JNICALL OS_NATIVE(CFDataGetBytePtr)
 	(JNIEnv *env, jclass that, jint arg0)
@@ -1471,6 +1559,64 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopWakeUp)
 }
 #endif
 
+#ifndef NO_CFSetAddValue
+JNIEXPORT void JNICALL OS_NATIVE(CFSetAddValue)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, CFSetAddValue_FUNC);
+	CFSetAddValue((CFMutableSetRef)arg0, (const void *)arg1);
+	OS_NATIVE_EXIT(env, that, CFSetAddValue_FUNC);
+}
+#endif
+
+#ifndef NO_CFSetCreateMutable
+JNIEXPORT jint JNICALL OS_NATIVE(CFSetCreateMutable)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFSetCreateMutable_FUNC);
+	rc = (jint)CFSetCreateMutable((CFAllocatorRef)arg0, (CFIndex)arg1, (const CFSetCallBacks *)arg2);
+	OS_NATIVE_EXIT(env, that, CFSetCreateMutable_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFSetGetCount
+JNIEXPORT jint JNICALL OS_NATIVE(CFSetGetCount)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFSetGetCount_FUNC);
+	rc = (jint)CFSetGetCount((CFMutableSetRef)arg0);
+	OS_NATIVE_EXIT(env, that, CFSetGetCount_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFSetGetValues
+JNIEXPORT void JNICALL OS_NATIVE(CFSetGetValues)
+	(JNIEnv *env, jclass that, jint arg0, jintArray arg1)
+{
+	jint *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, CFSetGetValues_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	CFSetGetValues((CFMutableSetRef)arg0, (const void **)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CFSetGetValues_FUNC);
+}
+#endif
+
+#ifndef NO_CFSetRemoveValue
+JNIEXPORT void JNICALL OS_NATIVE(CFSetRemoveValue)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, CFSetRemoveValue_FUNC);
+	CFSetRemoveValue((CFMutableSetRef)arg0, (const void *)arg1);
+	OS_NATIVE_EXIT(env, that, CFSetRemoveValue_FUNC);
+}
+#endif
+
 #ifndef NO_CFStringCreateWithBytes
 JNIEXPORT jint JNICALL OS_NATIVE(CFStringCreateWithBytes)
 	(JNIEnv *env, jclass that, jint arg0, jbyteArray arg1, jint arg2, jint arg3, jboolean arg4)
@@ -1626,6 +1772,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(CFURLCreateCopyAppendingPathComponent)
 }
 #endif
 
+#ifndef NO_CFURLCreateCopyAppendingPathExtension
+JNIEXPORT jint JNICALL OS_NATIVE(CFURLCreateCopyAppendingPathExtension)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFURLCreateCopyAppendingPathExtension_FUNC);
+	rc = (jint)CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)arg0, (CFURLRef)arg1, (CFStringRef)arg2);
+	OS_NATIVE_EXIT(env, that, CFURLCreateCopyAppendingPathExtension_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CFURLCreateCopyDeletingLastPathComponent
 JNIEXPORT jint JNICALL OS_NATIVE(CFURLCreateCopyDeletingLastPathComponent)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1)
@@ -7507,6 +7665,18 @@ fail:
 }
 #endif
 
+#ifndef NO_HIGrowBoxViewSetTransparent
+JNIEXPORT jint JNICALL OS_NATIVE(HIGrowBoxViewSetTransparent)
+	(JNIEnv *env, jclass that, jint arg0, jboolean arg1)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, HIGrowBoxViewSetTransparent_FUNC);
+	rc = (jint)HIGrowBoxViewSetTransparent((HIViewRef)arg0, (Boolean)arg1);
+	OS_NATIVE_EXIT(env, that, HIGrowBoxViewSetTransparent_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_HIObjectCopyClassID
 JNIEXPORT jint JNICALL OS_NATIVE(HIObjectCopyClassID)
 	(JNIEnv *env, jclass that, jint arg0)
@@ -9402,6 +9572,48 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowVisible)
 }
 #endif
 
+#ifndef NO_JSEvaluateScript
+JNIEXPORT jint JNICALL OS_NATIVE(JSEvaluateScript)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
+{
+	jint *lparg5=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC);
+	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jint)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+	OS_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_JSStringCreateWithUTF8CString
+JNIEXPORT jint JNICALL OS_NATIVE(JSStringCreateWithUTF8CString)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jint)JSStringCreateWithUTF8CString((const char *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_JSStringRelease
+JNIEXPORT void JNICALL OS_NATIVE(JSStringRelease)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	OS_NATIVE_ENTER(env, that, JSStringRelease_FUNC);
+	JSStringRelease((JSStringRef)arg0);
+	OS_NATIVE_EXIT(env, that, JSStringRelease_FUNC);
+}
+#endif
+
 #ifndef NO_KLGetCurrentKeyboardLayout
 JNIEXPORT jint JNICALL OS_NATIVE(KLGetCurrentKeyboardLayout)
 	(JNIEnv *env, jclass that, jintArray arg0)
@@ -9511,6 +9723,25 @@ fail:
 }
 #endif
 
+#ifndef NO_LSCopyItemAttribute
+JNIEXPORT jint JNICALL OS_NATIVE(LSCopyItemAttribute)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jint arg2, jintArray arg3)
+{
+	jbyte *lparg0=NULL;
+	jint *lparg3=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, LSCopyItemAttribute_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)LSCopyItemAttribute((const FSRef *)lparg0, (LSRolesMask)arg1, (CFStringRef)arg2, (CFTypeRef *)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, LSCopyItemAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_LSFindApplicationForInfo
 JNIEXPORT jint JNICALL OS_NATIVE(LSFindApplicationForInfo)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jbyteArray arg3, jintArray arg4)
@@ -9822,6 +10053,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(NavDialogGetUserAction)
 }
 #endif
 
+#ifndef NO_NavDialogGetWindow
+JNIEXPORT jint JNICALL OS_NATIVE(NavDialogGetWindow)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, NavDialogGetWindow_FUNC);
+	rc = (jint)NavDialogGetWindow((NavDialogRef)arg0);
+	OS_NATIVE_EXIT(env, that, NavDialogGetWindow_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NavDialogRun
 JNIEXPORT jint JNICALL OS_NATIVE(NavDialogRun)
 	(JNIEnv *env, jclass that, jint arg0)
@@ -11419,6 +11662,54 @@ fail:
 }
 #endif
 
+#ifndef NO_SecPolicySearchCopyNext
+JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCopyNext)
+	(JNIEnv *env, jclass that, jint arg0, jintArray arg1)
+{
+	jint *lparg1=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecPolicySearchCopyNext_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jint)SecPolicySearchCopyNext((SecPolicySearchRef)arg0, (SecPolicyRef *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, SecPolicySearchCopyNext_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SecPolicySearchCreate
+JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCreate)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
+{
+	jint *lparg3=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecPolicySearchCreate_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)SecPolicySearchCreate((CSSM_CERT_TYPE)arg0, (CSSM_OID *)arg1, (CSSM_DATA *)arg2, (SecPolicySearchRef *)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, SecPolicySearchCreate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SecTrustCreateWithCertificates
+JNIEXPORT jint JNICALL OS_NATIVE(SecTrustCreateWithCertificates)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
+{
+	jint *lparg2=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecTrustCreateWithCertificates_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)SecTrustCreateWithCertificates((CFArrayRef)arg0, (CFTypeRef)arg1, (SecTrustRef *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, SecTrustCreateWithCertificates_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SectRect
 JNIEXPORT jboolean JNICALL OS_NATIVE(SectRect)
 	(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jobject arg2)
@@ -13337,6 +13628,18 @@ fail:
 }
 #endif
 
+#ifndef NO_UTTypeConformsTo
+JNIEXPORT jboolean JNICALL OS_NATIVE(UTTypeConformsTo)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, UTTypeConformsTo_FUNC);
+	rc = (jboolean)UTTypeConformsTo((CFStringRef)arg0, (CFStringRef)arg1);
+	OS_NATIVE_EXIT(env, that, UTTypeConformsTo_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_UTTypeCreateAllIdentifiersForTag
 JNIEXPORT jint JNICALL OS_NATIVE(UTTypeCreateAllIdentifiersForTag)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
@@ -13361,6 +13664,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(UTTypeCreatePreferredIdentifierForTag)
 }
 #endif
 
+#ifndef NO_UTTypeEqual
+JNIEXPORT jboolean JNICALL OS_NATIVE(UTTypeEqual)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, UTTypeEqual_FUNC);
+	rc = (jboolean)UTTypeEqual((CFStringRef)arg0, (CFStringRef)arg1);
+	OS_NATIVE_EXIT(env, that, UTTypeEqual_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_UnionRect
 JNIEXPORT void JNICALL OS_NATIVE(UnionRect)
 	(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jobject arg2)
@@ -13528,6 +13843,30 @@ JNIEXPORT jint JNICALL OS_NATIVE(kCFRunLoopDefaultMode)
 }
 #endif
 
+#ifndef NO_kCFTypeArrayCallBacks
+JNIEXPORT jint JNICALL OS_NATIVE(kCFTypeArrayCallBacks)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFTypeArrayCallBacks_FUNC);
+	rc = (jint)&kCFTypeArrayCallBacks;
+	OS_NATIVE_EXIT(env, that, kCFTypeArrayCallBacks_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCFTypeSetCallBacks
+JNIEXPORT jint JNICALL OS_NATIVE(kCFTypeSetCallBacks)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFTypeSetCallBacks_FUNC);
+	rc = (jint)&kCFTypeSetCallBacks;
+	OS_NATIVE_EXIT(env, that, kCFTypeSetCallBacks_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_kFontPanelAttributeSizesKey
 JNIEXPORT jint JNICALL OS_NATIVE(kFontPanelAttributeSizesKey)
 	(JNIEnv *env, jclass that)
@@ -13588,6 +13927,30 @@ JNIEXPORT jint JNICALL OS_NATIVE(kHIViewWindowContentID)
 }
 #endif
 
+#ifndef NO_kHIViewWindowGrowBoxID
+JNIEXPORT jint JNICALL OS_NATIVE(kHIViewWindowGrowBoxID)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, kHIViewWindowGrowBoxID_FUNC);
+	rc = (jint)&kHIViewWindowGrowBoxID;
+	OS_NATIVE_EXIT(env, that, kHIViewWindowGrowBoxID_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kLSItemContentType
+JNIEXPORT jint JNICALL OS_NATIVE(kLSItemContentType)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, kLSItemContentType_FUNC);
+	rc = (jint)kLSItemContentType;
+	OS_NATIVE_EXIT(env, that, kLSItemContentType_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_kPMDocumentFormatPDF
 JNIEXPORT jint JNICALL OS_NATIVE(kPMDocumentFormatPDF)
 	(JNIEnv *env, jclass that)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h
index d236f83..e8664d0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,9 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <JavaScriptCore/JSBase.h>
+#include <JavaScriptCore/JSStringRef.h>
+
 #include "os_custom.h"
 
 extern jint CPSEnableForegroundOperation(jint *, jint, jint, jint, jint);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.c
index 0006bf4..4b2cd36 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -207,6 +207,24 @@ fail:
 }
 #endif
 
+#ifndef NO_CGRectUnion
+JNIEXPORT void JNICALL OS_NATIVE(CGRectUnion)
+	(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jobject arg2)
+{
+	CGRect _arg0, *lparg0=NULL;
+	CGRect _arg1, *lparg1=NULL;
+	CGRect _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, CGRectUnion_FUNC);
+	if (arg0) if ((lparg0 = getCGRectFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = getCGRectFields(env, arg1, &_arg1)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail;
+	*lparg2 = CGRectUnion(*lparg0, *lparg1);
+fail:
+	if (arg2 && lparg2) setCGRectFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, CGRectUnion_FUNC);
+}
+#endif
+
 #ifndef NO_CGPathGetBoundingBox
 JNIEXPORT void JNICALL OS_NATIVE(CGPathGetBoundingBox)
 	(JNIEnv *env, jclass that, jint arg0, jobject arg1)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h
index c94b2fb..f77483f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_custom.h	
@@ -1,34 +1,34 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/* Libraries for dynamic loaded functions */
-#define CGBitmapContextCreateImage_LIB "com.apple.Carbon"
-#define CGImageCreateWithImageInRect_LIB "com.apple.Carbon"
-#define CGContextSetBlendMode_LIB "com.apple.Carbon"
-#define DataBrowserChangeAttributes_LIB "com.apple.Carbon"
-#define DataBrowserGetAttributes_LIB "com.apple.Carbon"
-#define DataBrowserGetMetric_LIB "com.apple.Carbon"
-#define DataBrowserSetMetric_LIB "com.apple.Carbon"
-#define GetIconRefFromIconFamilyPtr_LIB "com.apple.Carbon"
-#define HIComboBoxSetListVisible_LIB "com.apple.Carbon"
-#define HIComboBoxIsListVisible_LIB "com.apple.Carbon"
-#define HICreateTransformedCGImage_LIB "com.apple.Carbon"
-#define HIThemeSetFill_LIB "com.apple.Carbon"
-#define HIThemeSetTextFill_LIB "com.apple.Carbon"
-#define LSCopyAllRoleHandlersForContentType_LIB "com.apple.Carbon"
-#define LSOpenItemsWithRole_LIB "com.apple.Carbon"
-#define NavDialogSetFilterTypeIdentifiers_LIB "com.apple.Carbon"
-#define HIShapeCreateWithQDRgn_LIB "com.apple.Carbon"
-#define HIShapeReplacePathInCGContext_LIB "com.apple.Carbon"
-#define AXUIElementGetDataBrowserItemInfo_LIB "com.apple.Carbon"
-#define AXUIElementCreateWithDataBrowserAndItemInfo_LIB "com.apple.Carbon"
-#define PMPrinterGetOutputResolution_LIB "com.apple.Carbon"
-#define PMShowPrintDialogWithOptions_LIB "com.apple.Carbon"
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/* Libraries for dynamic loaded functions */
+#define CGBitmapContextCreateImage_LIB "com.apple.Carbon"
+#define CGImageCreateWithImageInRect_LIB "com.apple.Carbon"
+#define CGContextSetBlendMode_LIB "com.apple.Carbon"
+#define DataBrowserChangeAttributes_LIB "com.apple.Carbon"
+#define DataBrowserGetAttributes_LIB "com.apple.Carbon"
+#define DataBrowserGetMetric_LIB "com.apple.Carbon"
+#define DataBrowserSetMetric_LIB "com.apple.Carbon"
+#define GetIconRefFromIconFamilyPtr_LIB "com.apple.Carbon"
+#define HIComboBoxSetListVisible_LIB "com.apple.Carbon"
+#define HIComboBoxIsListVisible_LIB "com.apple.Carbon"
+#define HICreateTransformedCGImage_LIB "com.apple.Carbon"
+#define HIThemeSetFill_LIB "com.apple.Carbon"
+#define HIThemeSetTextFill_LIB "com.apple.Carbon"
+#define LSCopyAllRoleHandlersForContentType_LIB "com.apple.Carbon"
+#define LSOpenItemsWithRole_LIB "com.apple.Carbon"
+#define NavDialogSetFilterTypeIdentifiers_LIB "com.apple.Carbon"
+#define HIShapeCreateWithQDRgn_LIB "com.apple.Carbon"
+#define HIShapeReplacePathInCGContext_LIB "com.apple.Carbon"
+#define AXUIElementGetDataBrowserItemInfo_LIB "com.apple.Carbon"
+#define AXUIElementCreateWithDataBrowserAndItemInfo_LIB "com.apple.Carbon"
+#define PMPrinterGetOutputResolution_LIB "com.apple.Carbon"
+#define PMShowPrintDialogWithOptions_LIB "com.apple.Carbon"
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c
index a085d68..3bc62d6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,8 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 985;
-int OS_nativeFunctionCallCount[985];
+int OS_nativeFunctionCount = 1013;
+int OS_nativeFunctionCallCount[1013];
 char * OS_nativeFunctionNames[] = {
 	"AECoerceDesc",
 	"AECountItems",
@@ -23,6 +23,7 @@ char * OS_nativeFunctionNames[] = {
 	"AEDisposeDesc",
 	"AEGetDescData",
 	"AEGetNthPtr",
+	"AEGetParamDesc",
 	"AEInstallEventHandler",
 	"AEProcessAppleEvent",
 	"ATSFontActivateFromFileSpecification",
@@ -94,6 +95,11 @@ char * OS_nativeFunctionNames[] = {
 	"CFArrayCreateMutable",
 	"CFArrayGetCount",
 	"CFArrayGetValueAtIndex",
+	"CFBundleCreateBundlesFromDirectory",
+	"CFBundleGetIdentifier",
+	"CFBundleGetMainBundle",
+	"CFBundleGetPackageInfo",
+	"CFBundleGetValueForInfoDictionaryKey",
 	"CFDataGetBytePtr",
 	"CFDataGetBytes",
 	"CFDataGetLength",
@@ -114,6 +120,11 @@ char * OS_nativeFunctionNames[] = {
 	"CFRunLoopSourceSignal",
 	"CFRunLoopStop",
 	"CFRunLoopWakeUp",
+	"CFSetAddValue",
+	"CFSetCreateMutable",
+	"CFSetGetCount",
+	"CFSetGetValues",
+	"CFSetRemoveValue",
 	"CFStringCreateWithBytes",
 	"CFStringCreateWithCharacters__III",
 	"CFStringCreateWithCharacters__I_3CI",
@@ -125,6 +136,7 @@ char * OS_nativeFunctionNames[] = {
 	"CFURLCopyLastPathComponent",
 	"CFURLCopyPathExtension",
 	"CFURLCreateCopyAppendingPathComponent",
+	"CFURLCreateCopyAppendingPathExtension",
 	"CFURLCreateCopyDeletingLastPathComponent",
 	"CFURLCreateData",
 	"CFURLCreateFromFSRef",
@@ -261,6 +273,7 @@ char * OS_nativeFunctionNames[] = {
 	"CGPostMouseEvent",
 	"CGPostScrollWheelEvent",
 	"CGRectContainsPoint",
+	"CGRectUnion",
 	"CGShadingCreateAxial",
 	"CGShadingCreateRadial",
 	"CGShadingRelease",
@@ -542,6 +555,7 @@ char * OS_nativeFunctionNames[] = {
 	"HIComboBoxSetListVisible",
 	"HICopyAccessibilityRoleDescription",
 	"HICreateTransformedCGImage",
+	"HIGrowBoxViewSetTransparent",
 	"HIObjectCopyClassID",
 	"HIObjectCreate",
 	"HIObjectRegisterSubclass",
@@ -668,6 +682,9 @@ char * OS_nativeFunctionNames[] = {
 	"IsWindowModified",
 	"IsWindowVisible",
 	"JNIGetObject",
+	"JSEvaluateScript",
+	"JSStringCreateWithUTF8CString",
+	"JSStringRelease",
 	"KLGetCurrentKeyboardLayout",
 	"KLGetKeyboardLayoutProperty",
 	"KeyTranslate",
@@ -675,6 +692,7 @@ char * OS_nativeFunctionNames[] = {
 	"LMGetKbdType",
 	"LSCopyAllRoleHandlersForContentType",
 	"LSCopyDisplayNameForRef",
+	"LSCopyItemAttribute",
 	"LSFindApplicationForInfo",
 	"LSGetApplicationForInfo",
 	"LSOpenApplication",
@@ -696,6 +714,7 @@ char * OS_nativeFunctionNames[] = {
 	"NavDialogGetReply",
 	"NavDialogGetSaveFileName",
 	"NavDialogGetUserAction",
+	"NavDialogGetWindow",
 	"NavDialogRun",
 	"NavDialogSetFilterTypeIdentifiers",
 	"NavDialogSetSaveFileName",
@@ -810,6 +829,9 @@ char * OS_nativeFunctionNames[] = {
 	"RunStandardAlert",
 	"SameProcess",
 	"ScrollRect",
+	"SecPolicySearchCopyNext",
+	"SecPolicySearchCreate",
+	"SecTrustCreateWithCertificates",
 	"SectRect",
 	"SectRgn",
 	"SelectWindow",
@@ -957,8 +979,10 @@ char * OS_nativeFunctionNames[] = {
 	"TrackDrag",
 	"TrackMouseLocationWithOptions",
 	"UCKeyTranslate",
+	"UTTypeConformsTo",
 	"UTTypeCreateAllIdentifiersForTag",
 	"UTTypeCreatePreferredIdentifierForTag",
+	"UTTypeEqual",
 	"UnionRect",
 	"UnionRgn",
 	"UpdateDataBrowserItems",
@@ -972,11 +996,15 @@ char * OS_nativeFunctionNames[] = {
 	"kCFNumberFormatterDecimalSeparator",
 	"kCFRunLoopCommonModes",
 	"kCFRunLoopDefaultMode",
+	"kCFTypeArrayCallBacks",
+	"kCFTypeSetCallBacks",
 	"kFontPanelAttributeSizesKey",
 	"kFontPanelAttributeTagsKey",
 	"kFontPanelAttributeValuesKey",
 	"kFontPanelAttributesKey",
 	"kHIViewWindowContentID",
+	"kHIViewWindowGrowBoxID",
+	"kLSItemContentType",
 	"kPMDocumentFormatPDF",
 	"kPMGraphicsContextCoreGraphics",
 	"kUTTagClassFilenameExtension",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h
index 682e38b..8bc2379 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ typedef enum {
 	AEDisposeDesc_FUNC,
 	AEGetDescData_FUNC,
 	AEGetNthPtr_FUNC,
+	AEGetParamDesc_FUNC,
 	AEInstallEventHandler_FUNC,
 	AEProcessAppleEvent_FUNC,
 	ATSFontActivateFromFileSpecification_FUNC,
@@ -102,6 +103,11 @@ typedef enum {
 	CFArrayCreateMutable_FUNC,
 	CFArrayGetCount_FUNC,
 	CFArrayGetValueAtIndex_FUNC,
+	CFBundleCreateBundlesFromDirectory_FUNC,
+	CFBundleGetIdentifier_FUNC,
+	CFBundleGetMainBundle_FUNC,
+	CFBundleGetPackageInfo_FUNC,
+	CFBundleGetValueForInfoDictionaryKey_FUNC,
 	CFDataGetBytePtr_FUNC,
 	CFDataGetBytes_FUNC,
 	CFDataGetLength_FUNC,
@@ -122,6 +128,11 @@ typedef enum {
 	CFRunLoopSourceSignal_FUNC,
 	CFRunLoopStop_FUNC,
 	CFRunLoopWakeUp_FUNC,
+	CFSetAddValue_FUNC,
+	CFSetCreateMutable_FUNC,
+	CFSetGetCount_FUNC,
+	CFSetGetValues_FUNC,
+	CFSetRemoveValue_FUNC,
 	CFStringCreateWithBytes_FUNC,
 	CFStringCreateWithCharacters__III_FUNC,
 	CFStringCreateWithCharacters__I_3CI_FUNC,
@@ -133,6 +144,7 @@ typedef enum {
 	CFURLCopyLastPathComponent_FUNC,
 	CFURLCopyPathExtension_FUNC,
 	CFURLCreateCopyAppendingPathComponent_FUNC,
+	CFURLCreateCopyAppendingPathExtension_FUNC,
 	CFURLCreateCopyDeletingLastPathComponent_FUNC,
 	CFURLCreateData_FUNC,
 	CFURLCreateFromFSRef_FUNC,
@@ -269,6 +281,7 @@ typedef enum {
 	CGPostMouseEvent_FUNC,
 	CGPostScrollWheelEvent_FUNC,
 	CGRectContainsPoint_FUNC,
+	CGRectUnion_FUNC,
 	CGShadingCreateAxial_FUNC,
 	CGShadingCreateRadial_FUNC,
 	CGShadingRelease_FUNC,
@@ -550,6 +563,7 @@ typedef enum {
 	HIComboBoxSetListVisible_FUNC,
 	HICopyAccessibilityRoleDescription_FUNC,
 	HICreateTransformedCGImage_FUNC,
+	HIGrowBoxViewSetTransparent_FUNC,
 	HIObjectCopyClassID_FUNC,
 	HIObjectCreate_FUNC,
 	HIObjectRegisterSubclass_FUNC,
@@ -676,6 +690,9 @@ typedef enum {
 	IsWindowModified_FUNC,
 	IsWindowVisible_FUNC,
 	JNIGetObject_FUNC,
+	JSEvaluateScript_FUNC,
+	JSStringCreateWithUTF8CString_FUNC,
+	JSStringRelease_FUNC,
 	KLGetCurrentKeyboardLayout_FUNC,
 	KLGetKeyboardLayoutProperty_FUNC,
 	KeyTranslate_FUNC,
@@ -683,6 +700,7 @@ typedef enum {
 	LMGetKbdType_FUNC,
 	LSCopyAllRoleHandlersForContentType_FUNC,
 	LSCopyDisplayNameForRef_FUNC,
+	LSCopyItemAttribute_FUNC,
 	LSFindApplicationForInfo_FUNC,
 	LSGetApplicationForInfo_FUNC,
 	LSOpenApplication_FUNC,
@@ -704,6 +722,7 @@ typedef enum {
 	NavDialogGetReply_FUNC,
 	NavDialogGetSaveFileName_FUNC,
 	NavDialogGetUserAction_FUNC,
+	NavDialogGetWindow_FUNC,
 	NavDialogRun_FUNC,
 	NavDialogSetFilterTypeIdentifiers_FUNC,
 	NavDialogSetSaveFileName_FUNC,
@@ -818,6 +837,9 @@ typedef enum {
 	RunStandardAlert_FUNC,
 	SameProcess_FUNC,
 	ScrollRect_FUNC,
+	SecPolicySearchCopyNext_FUNC,
+	SecPolicySearchCreate_FUNC,
+	SecTrustCreateWithCertificates_FUNC,
 	SectRect_FUNC,
 	SectRgn_FUNC,
 	SelectWindow_FUNC,
@@ -965,8 +987,10 @@ typedef enum {
 	TrackDrag_FUNC,
 	TrackMouseLocationWithOptions_FUNC,
 	UCKeyTranslate_FUNC,
+	UTTypeConformsTo_FUNC,
 	UTTypeCreateAllIdentifiersForTag_FUNC,
 	UTTypeCreatePreferredIdentifierForTag_FUNC,
+	UTTypeEqual_FUNC,
 	UnionRect_FUNC,
 	UnionRgn_FUNC,
 	UpdateDataBrowserItems_FUNC,
@@ -980,11 +1004,15 @@ typedef enum {
 	kCFNumberFormatterDecimalSeparator_FUNC,
 	kCFRunLoopCommonModes_FUNC,
 	kCFRunLoopDefaultMode_FUNC,
+	kCFTypeArrayCallBacks_FUNC,
+	kCFTypeSetCallBacks_FUNC,
 	kFontPanelAttributeSizesKey_FUNC,
 	kFontPanelAttributeTagsKey_FUNC,
 	kFontPanelAttributeValuesKey_FUNC,
 	kFontPanelAttributesKey_FUNC,
 	kHIViewWindowContentID_FUNC,
+	kHIViewWindowGrowBoxID_FUNC,
+	kLSItemContentType_FUNC,
 	kPMDocumentFormatPDF_FUNC,
 	kPMGraphicsContextCoreGraphics_FUNC,
 	kUTTagClassFilenameExtension_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
index 67a03b5..95f92d1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2003, 2009 IBM Corp.
+ * Copyright (c) 2003, 2010 IBM Corp.
  * Portions Copyright (c) 1983-2002, Apple Computer, Inc.
  *
  * All rights reserved.  This program and the accompanying materials
@@ -28,6 +28,7 @@ public class OS extends C {
 	}
 
 	/** Constants */
+	public static final int APPL = ('A'<<24) + ('P'<<16) + ('P'<<8) + 'L';
 	public static final int RGBDirect = 16;
 	public static final int alphaLock = 0x0400;
 	public static final int badDragFlavorErr = -1852;
@@ -36,6 +37,7 @@ public class OS extends C {
 	public static final int checkMark = 18;
 	public static final int cmdKey = 1 << 8;
 	public static final int controlKey = 1 << 12;
+	public static final int CSSM_CERT_X_509v3 = 0x3;
 	public static final int diamondMark = 19;
 	public static final int dragNotAcceptedErr = -1857;
 	public static final int errControlIsNotEmbedder = -30590;
@@ -61,6 +63,9 @@ public class OS extends C {
 	public static final int kAESmallSystemFontChanged = ('s'<<24) + ('s'<<16) + ('f'<<8) + 'n';
 	public static final int kAEViewsFontChanged = ('v'<<24) + ('f'<<16) + ('n'<<8) + 't';
 	public static final int kAEQuitApplication = ('q'<<24) + ('u'<<16) + ('i'<<8) + 't';
+	public static final int kAEOpenDocuments = ('o' << 24) + ('d' << 16) + ('o' << 8) + 'c';
+	public static final int keyDirectObject = ('-' << 24) + ('-' << 16) + ('-' << 8) + '-';
+	public static final int typeAEList = ('l' << 24) + ('i' << 16) + ('s' << 8) + 't';
 	public static final int kCoreEventClass = ('a'<<24) + ('e'<<16) + ('v'<<8) + 't';
 	public static final int kAlertCautionAlert = 2;
 	public static final int kAlertCautionIcon = ('c'<<24) + ('a'<<16) + ('u'<<8) + 't';
@@ -368,7 +373,9 @@ public class OS extends C {
 	public static final int kDragTrackingLeaveWindow = 4;
 	public static final int kDragTrackingLeaveHandler = 5;
 	public static final int kEventAppleEvent = 1;
+	public static final int kEventAppDeactivated = 2;
 	public static final int kEventAppAvailableWindowBoundsChanged = 110;
+	public static final int kEventAppFocusMenuBar = 8;
 	public static final int kEventAttributeUserEvent = 1 << 0;
 	public static final int kEventClassAppleEvent = ('e'<<24) + ('p'<<16) + ('p'<<8) + 'c';
 	public static final int kEventClassApplication = ('a'<<24) + ('p'<<16) + ('p'<<8) + 'l';
@@ -523,6 +530,7 @@ public class OS extends C {
 	public static final int kEventWindowShown = 24;
 	public static final int kEventWindowToolbarSwitchMode = 150;
 	public static final int kEventWindowUpdate = 1;
+	public static final int kEventWindowZoom = 75;
 	public static final int kFMIterationCompleted = -980;
 	public static final int kFloatingWindowClass = 5;
 	public static final int kFontFamilyName = 1;
@@ -542,6 +550,7 @@ public class OS extends C {
 	public static final int kHICommandQuit = ('q'<<24) + ('u'<<16) + ('i'<<8) + 't';
 	public static final int kHILayoutBindMin = 1;
 	public static final int kHILayoutBindMax= 2;
+	public static final int kHILayoutPositionCenter = 1;
 	public static final int kHIModalClickIsModal = 1 << 0;
 	public static final int kHIModalClickAllowEvent = 1 << 1;
 	public static final int kHIModalClickAnnounce = 1 << 2;	
@@ -772,7 +781,7 @@ public class OS extends C {
 	public static final int kPMShowPageAttributesPDE = 1 << 8;
 	public static final int kQDUseCGTextMetrics = (1 << 2);
 	public static final int kQDUseCGTextRendering = (1 << 1);
-	public static final int kScrapFlavorTypeUTF16External = ('u'<<24) + ('t'<<16) + ('1'<<8) + '6';
+	public static final int kScrapFlavorTypeUnicode = ('u'<<24) + ('t'<<16) + ('x'<<8) + 't';
 	public static final int kScrapFlavorTypeText = ('T'<<24) + ('E'<<16) + ('X'<<8) + 'T';
 	public static final boolean kScrollBarsSyncAlwaysActive = true;
 	public static final boolean kScrollBarsSyncWithFocus = false;
@@ -799,6 +808,8 @@ public class OS extends C {
 	public static final int kTXNFlushLeft = 1;
 	public static final int kTXNFlushRight = 2;
 	public static final int kTXNCenter = 4;
+	public static final int kTXNLeftToRight = 0;
+	public static final int kTXNRightToLeft = 1;
 	public static final int kTXNDisableDragAndDropTag = ('d'<<24) + ('r'<<16) + ('a'<<8) + 'g';
 	public static final int kTXNDoFontSubstitution = ('f'<<24) + ('S'<<16) + ('u'<<8) + 'b';
 	public static final int kTXNDontDrawCaretWhenInactiveMask = 1 << 12;
@@ -806,6 +817,7 @@ public class OS extends C {
 	public static final int kTXNEndOffset = 2147483647;
 	public static final int kTXNIOPrivilegesTag = ('i'<<24) + ('o'<<16) + ('p'<<8) + 'v';
 	public static final int kTXNJustificationTag = ('j'<<24) + ('u'<<16) + ('s'<<8) + 't';
+	public static final int kTXNLineDirectionTag = ('l'<<24) + ('n'<<16) + ('d'<<8) + 'r';
 	public static final int kTXNMarginsTag = ('m'<<24) + ('a'<<16) + ('r'<<8) + 'g';
 	public static final int kTXNMonostyledTextMask = 1 << 17;
 	public static final int kTXNQDFontFamilyIDAttribute = ('f'<<24) + ('o'<<16) + ('n'<<8) + 't';
@@ -956,7 +968,8 @@ public class OS extends C {
 	public static final int kWindowCollapseBoxAttribute = (1 << 3);
 	public static final int kWindowCompositingAttribute = (1 << 19);
 	public static final int kWindowContentRgn = 33;
-	public static final int kWindowGroupAttrHideOnCollapse = 16;
+	public static final int kWindowGroupAttrHideOnCollapse = (1 << 4);
+	public static final int kWindowGroupAttrSelectAsLayer = (1 << 0);
 	public static final int kWindowHorizontalZoomAttribute = 1 << 1;
 	public static final int kWindowVerticalZoomAttribute  = 1 << 2;
 	public static final int kWindowFullZoomAttribute = (OS.kWindowVerticalZoomAttribute | OS.kWindowHorizontalZoomAttribute);
@@ -1069,6 +1082,10 @@ public static final native boolean __BIG_ENDIAN__();
 public static final native int kCFRunLoopCommonModes();
 /** @method flags=const */
 public static final native int kCFRunLoopDefaultMode();
+/** @method flags=const address */
+public static final native int kCFTypeArrayCallBacks();
+/** @method flags=const address */
+public static final native int kCFTypeSetCallBacks();
 /** @method flags=const */
 public static final native int kFontPanelAttributesKey();
 /** @method flags=const */
@@ -1078,9 +1095,13 @@ public static final native int kFontPanelAttributeSizesKey();
 /** @method flags=const */
 public static final native int kFontPanelAttributeValuesKey();	
 /** @method flags=const */
+public static final native int kLSItemContentType();
+/** @method flags=const */
 public static final native int kUTTagClassFilenameExtension();
 /** @method flags=const address */
 public static final native int kHIViewWindowContentID();
+/** @method flags=const address */
+public static final native int kHIViewWindowGrowBoxID();
 /** @method flags=const */
 public static final native int kPMDocumentFormatPDF();
 /** @method flags=const */
@@ -1097,7 +1118,7 @@ public static final native int AECountItems(AEDesc theAEDescList, int[] theCount
  * @param theAEDesc cast=(AEDesc *)
  * @param result cast=(AEDesc *)
  */
-public static final native int AECoerceDesc(int theAEDesc, int toType, int result);
+public static final native int AECoerceDesc(int theAEDesc, int toType, AEDesc result);
 /**
  * @param typeCode cast=(DescType)
  * @param dataPtr cast=(const void *)
@@ -1109,7 +1130,7 @@ public static final native int AEDisposeDesc(AEDesc theAEDesc);
  * @param theAEDesc cast=(AEDesc *)
  * @param dataPtr cast=(void *)
  */
-public static final native int AEGetDescData(int theAEDesc, byte[] dataPtr, int maximumSize);
+public static final native int AEGetDescData(AEDesc theAEDesc, byte[] dataPtr, int maximumSize);
 /**
  * @param theAEDescList cast=(const AEDescList *)
  * @param desiredType cast=(DescType)
@@ -1121,6 +1142,13 @@ public static final native int AEGetDescData(int theAEDesc, byte[] dataPtr, int
  */
 public static final native int AEGetNthPtr(AEDesc theAEDescList, int index, int desiredType, int[] theAEKeyword, int[] typeCode, int dataPtr, int maximumSize, int[] actualSize);
 /**
+ * @param theAppleEvent cast=(const AppleEvent *)
+ * @param theAEKeyword cast=(AEKeyword)
+ * @param desiredType cast=(DescType)
+ * @param result cast=(AEDesc *)
+ */
+public static final native int AEGetParamDesc (int theAppleEvent, int theAEKeyword, int desiredType, AEDesc result);
+/**
  * @param theAEEventClass cast=(AEEventClass)
  * @param theAEEventID cast=(AEEventID)
  * @param handler cast=(AEEventHandlerUPP)
@@ -1503,7 +1531,50 @@ public static final native int CFArrayCreateMutable(int allocator, int capacity,
 /** @param theArray cast=(CFArrayRef) */
 public static final native int CFArrayGetCount(int theArray);
 /** @param theArray cast=(CFArrayRef) */
-public static final native int CFArrayGetValueAtIndex(int theArray, int idx); 
+public static final native int CFArrayGetValueAtIndex(int theArray, int idx);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param value cast=(const void *)
+ */
+public static final native void CFSetAddValue(int theSet, int value);
+/**
+ * @param allocator cast=(CFAllocatorRef)
+ * @param capacity cast=(CFIndex)
+ * @param callBacks cast=(const CFSetCallBacks *)
+ */
+public static final native int CFSetCreateMutable(int allocator, int capacity, int callBacks);
+/** @param theSet cast=(CFMutableSetRef) */
+public static final native int CFSetGetCount(int theSet);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param values cast=(const void **)
+ */
+public static final native void CFSetGetValues(int theSet, int[] values);
+/**
+ * @param theSet cast=(CFMutableSetRef)
+ * @param value cast=(const void *)
+ */
+public static final native void CFSetRemoveValue(int theSet, int value);
+/** 
+ * @param allocater cast=(CFAllocatorRef)
+ * @param directoryURL cast=(CFURLRef)
+ * @param bundleType cast=(CFStringRef)
+ */
+public static final native int CFBundleCreateBundlesFromDirectory(int allocater, int directoryURL, int bundleType);
+/** 
+ * @param bundle cast=(CFBundleRef)
+ * @param cFBundleDocumentTypes cast=(CFStringRef)
+ */
+public static final native int CFBundleGetValueForInfoDictionaryKey(int bundle, int cFBundleDocumentTypes);
+public static final native int CFBundleGetMainBundle();
+/** @param bundle cast=(CFBundleRef) */
+public static final native int CFBundleGetIdentifier(int bundle);
+/**
+ * @param bundle cast=(CFBundleRef)
+ * @param packageType cast=(UInt32 *)
+ * @param packageCreator cast=(UInt32 *)
+ */
+public static final native void CFBundleGetPackageInfo(int bundle, int[] packageType, int[] packageCreator);
 /**
  * @param theData cast=(CFDataRef)
  * @param range flags=struct
@@ -1602,6 +1673,12 @@ public static final native int CFURLCreateCopyAppendingPathComponent(int allocat
 /**
  * @param allocator cast=(CFAllocatorRef)
  * @param url cast=(CFURLRef)
+ * @param extension cast=(CFStringRef)
+ */
+public static final native int CFURLCreateCopyAppendingPathExtension(int allocator, int url, int extension);
+/**
+ * @param allocator cast=(CFAllocatorRef)
+ * @param url cast=(CFURLRef)
  */
 public static final native int CFURLCreateCopyDeletingLastPathComponent(int allocator, int url);
 /**
@@ -2125,6 +2202,13 @@ public static final native int CGPostScrollWheelEvent(int wheelCount, int wheel1
  */
 public static final native int CGRectContainsPoint(CGRect rect, CGPoint point);
 /**
+ * @method flags=no_gen
+ * @param r1 flags=struct no_out
+ * @param r2 flags=struct no_out
+ * @param result flags=struct no_in
+ */
+public static final native void CGRectUnion (CGRect r1, CGRect r2, CGRect result);
+/**
  * @param colorspace cast=(CGColorSpaceRef)
  * @param start flags=struct
  * @param end flags=struct
@@ -3647,6 +3731,11 @@ public static final native int HIViewGetSuperview(int inView);
  * @param outView cast=(HIViewRef *)
  */
 public static final native int HIViewGetViewForMouseEvent(int inView, int inEvent, int[] outView);
+/** 
+ * @param inGrowBoxView cast=(HIViewRef) 
+ * @param inTransparent cast=(Boolean)
+ */
+public static final native int HIGrowBoxViewSetTransparent(int inGrowBoxView, boolean inTransparent);
 /** @param inView cast=(HIViewRef) */
 public static final native boolean HIViewIsDrawingEnabled (int inView);
 /** @param inView cast=(HIViewRef) */
@@ -3904,6 +3993,13 @@ public static final native int LSFindApplicationForInfo(int inCreator, int inBun
  */
 public static final native int LSCopyAllRoleHandlersForContentType(int inContentType, int inRoleMask);
 /**
+ * @param inItem cast=(const FSRef *)
+ * @param inRoles cast=(LSRolesMask)
+ * @param inAttributeName cast=(CFStringRef)
+ * @param outValue cast=(CFTypeRef *)
+ */
+public static final native int  LSCopyItemAttribute (byte[] inItem, int inRoles, int inAttributeName, int[] outValue);
+/**
  * @param inType cast=(OSType)
  * @param inCreator cast=(OSType)
  * @param inExtension cast=(CFStringRef)
@@ -3994,6 +4090,8 @@ public static final native void NavDialogDispose(int dialogHandle);
 public static final native int NavDialogGetSaveFileName(int dialogHandle);
 /** @param dialogHandle cast=(NavDialogRef) */
 public static final native int NavDialogGetUserAction(int dialogHandle);
+/** @param dialog cast=(NavDialogRef) */
+public static final native int NavDialogGetWindow(int dialog);
 /** @param dialogHandle cast=(NavDialogRef) */
 public static final native int NavDialogRun(int dialogHandle);
 /**
@@ -4493,6 +4591,28 @@ public static final native int SameProcess(int [] psn1, int[] psn2, boolean[] re
  * @param updateRgn cast=(RgnHandle)
  */
 public static final native void ScrollRect(Rect rect, short dh, short dv, int updateRgn);
+
+/**
+ * @param certType cast=(CSSM_CERT_TYPE)
+ * @param policyOID cast=(CSSM_OID *)
+ * @param value cast=(CSSM_DATA *)
+ * @param policySearch cast=(SecPolicySearchRef *) 
+ */
+public static final native int SecPolicySearchCreate(int certType, int policyOID, int value, int[] policySearch);
+
+/**
+ * @param searchRef cast=(SecPolicySearchRef)
+ * @param policyRef cast=(SecPolicyRef *)
+ */
+public static final native int SecPolicySearchCopyNext(int searchRef, int[] policyRef);
+
+/** 
+ * @param certificates cast=(CFArrayRef)
+ * @param policies cast=(CFTypeRef)
+ * @param trustRef cast=(SecTrustRef *) 
+ */
+public static final native int SecTrustCreateWithCertificates(int certificates, int policies, int[] trustRef);
+
 /**
  * @param src1 flags=no_out
  * @param src2 flags=no_out
@@ -5240,6 +5360,11 @@ public static final native int TrackDrag(int theDrag, EventRecord theEvent, int
  */
 public static final native int TrackMouseLocationWithOptions(int inPort, int inOptions, double inTime, Point outPt, int [] outModifiers, short[] outResult);
 /**
+ * @param inUTI cast=(CFStringRef)
+ * @param inConformsToUTI cast=(CFStringRef)
+ */
+public static final native boolean UTTypeConformsTo(int inUTI, int inConformsToUTI);
+/**
  * @param inTagClass cast=(CFStringRef)
  * @param inTag cast=(CFStringRef)
  * @param inConformingToUTI cast=(CFStringRef)
@@ -5252,6 +5377,11 @@ public static final native int UTTypeCreatePreferredIdentifierForTag(int inTagCl
  */
 public static final native int UTTypeCreateAllIdentifiersForTag(int inTagClass, int inTag, int inConformingToUTI);
 /**
+ * @param inUTI1 cast=(CFStringRef)
+ * @param inUTI2 cast=(CFStringRef)
+ */
+public static final native boolean UTTypeEqual(int inUTI1, int inUTI2);
+/**
  * @param srcA flags=no_out
  * @param srcB flags=no_out
  * @param dst flags=no_in
@@ -5476,6 +5606,27 @@ public static final native int HIObjectSetAuxiliaryAccessibilityAttribute(int in
  */
 public static final native int AXUIElementCopyAttributeValue (int element, int attribute, int [] value);
 
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param script cast=(JSStringRef)
+ * @param thisObject cast=(JSObjectRef)
+ * @param sourceURL cast=(JSStringRef)
+ * @param exception cast=(JSValueRef *)
+ */
+public static final native int JSEvaluateScript (int ctx, int script, int thisObject, int sourceURL, int startingLineNumber, int[] exception);
+
+/**
+ * @param string cast=(const char *)
+ */
+public static final native int JSStringCreateWithUTF8CString (byte[] string);
+
+/**
+ * @param string cast=(JSStringRef)
+ */
+public static final native void JSStringRelease (int string);
+
+
 public static final int kEventClassAccessibility = ('a'<<24) + ('c'<<16) + ('c'<<8) + 'e';
 
 public static final int kEventAccessibleGetChildAtPoint = 1;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
index 4478c3c..3239d4d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ public static final int C_NSNotificationCenter = Cocoa.objc_getClass("NSNotifica
 public static final int C_NSNumber = Cocoa.objc_getClass("NSNumber"); //$NON-NLS-1$
 public static final int C_NSURL = Cocoa.objc_getClass("NSURL"); //$NON-NLS-1$
 public static final int C_NSURLRequest = Cocoa.objc_getClass("NSURLRequest"); //$NON-NLS-1$
+public static final int C_NSMutableURLRequest = Cocoa.objc_getClass("NSMutableURLRequest"); //$NON-NLS-1$
 public static final int C_NSURLCredential = Cocoa.objc_getClass("NSURLCredential"); //$NON-NLS-1$
 public static final int C_WebKitDelegate = Cocoa.objc_getClass("WebKitDelegate"); //$NON-NLS-1$
 public static final int C_WebDownload = Cocoa.objc_getClass("WebDownload"); //$NON-NLS-1$
@@ -49,7 +50,9 @@ public static final int C_NSMutableDictionary = Cocoa.objc_getClass("NSMutableDi
 public static final int C_WebPanelAuthenticationHandler = Cocoa.objc_getClass("WebPanelAuthenticationHandler"); //$NON-NLS-1$
 public static final int C_WebScriptObject = Cocoa.objc_getClass("WebScriptObject"); //$NON-NLS-1$
 public static final int C_WebUndefined = Cocoa.objc_getClass("WebUndefined"); //$NON-NLS-1$
+public static final int C_NSData = Cocoa.objc_getClass("NSData"); //$NON-NLS-1$
 public static final int C_NSFileManager = Cocoa.objc_getClass("NSFileManager"); //$NON-NLS-1$
+public static final int C_SFCertificateTrustPanel = Cocoa.objc_getClass("SFCertificateTrustPanel"); //$NON-NLS-1$
 
 /* Objective-C method selectors */
 public static final int S_absoluteString = Cocoa.sel_registerName("absoluteString"); //$NON-NLS-1$
@@ -58,6 +61,7 @@ public static final int S_addObject = Cocoa.sel_registerName("addObject:"); //$N
 public static final int S_alloc = Cocoa.sel_registerName("alloc"); //$NON-NLS-1$
 public static final int S_arrayWithCapacity = Cocoa.sel_registerName("arrayWithCapacity:"); //$NON-NLS-1$
 public static final int S_autorelease = Cocoa.sel_registerName("autorelease"); //$NON-NLS-1$
+public static final int S_beginSheetForWindow = Cocoa.sel_registerName("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:"); //$NON-NLS-1$
 public static final int S_boolValue = Cocoa.sel_registerName("boolValue"); //$NON-NLS-1$
 public static final int S_cancel = Cocoa.sel_registerName("cancel"); //$NON-NLS-1$
 public static final int S_cancelAuthenticationChallenge = Cocoa.sel_registerName("cancelAuthenticationChallenge:"); //$NON-NLS-1$
@@ -65,14 +69,17 @@ public static final int S_canGoBack = Cocoa.sel_registerName("canGoBack"); //$NO
 public static final int S_canGoForward = Cocoa.sel_registerName("canGoForward"); //$NON-NLS-1$
 public static final int S_canShowMIMEType = Cocoa.sel_registerName("canShowMIMEType:"); //$NON-NLS-1$
 public static final int S_chooseFilename = Cocoa.sel_registerName("chooseFilename:"); //$NON-NLS-1$
+public static final int S_code = Cocoa.sel_registerName("code"); //$NON-NLS-1$
 public static final int S_compare = Cocoa.sel_registerName("compare:"); //$NON-NLS-1$
 public static final int S_cookies = Cocoa.sel_registerName("cookies"); //$NON-NLS-1$
 public static final int S_cookiesWithResponseHeaderFields = Cocoa.sel_registerName("cookiesWithResponseHeaderFields:forURL:"); //$NON-NLS-1$
 public static final int S_cookiesForURL = Cocoa.sel_registerName("cookiesForURL:"); //$NON-NLS-1$
 public static final int S_copy = Cocoa.sel_registerName("copy:"); //$NON-NLS-1$
 public static final int S_count = Cocoa.sel_registerName("count"); //$NON-NLS-1$
+public static final int S_createPanelDidEnd = Cocoa.sel_registerName("createPanelDidEnd:returnCode:contextInfo:"); //$NON-NLS-1$
 public static final int S_credentialWithUser = Cocoa.sel_registerName("credentialWithUser:password:persistence:"); //$NON-NLS-1$
 public static final int S_cut = Cocoa.sel_registerName("cut:"); //$NON-NLS-1$
+public static final int S_dataWithBytes = Cocoa.sel_registerName("dataWithBytes:length:"); //$NON-NLS-1$
 public static final int S_dataSource = Cocoa.sel_registerName("dataSource"); //$NON-NLS-1$
 public static final int S_defaultCenter = Cocoa.sel_registerName("defaultCenter"); //$NON-NLS-1$
 public static final int S_defaultManager = Cocoa.sel_registerName("defaultManager"); //$NON-NLS-1$
@@ -82,6 +89,9 @@ public static final int S_documentSource = Cocoa.sel_registerName("documentSourc
 public static final int S_doubleValue = Cocoa.sel_registerName("doubleValue"); //$NON-NLS-1$
 public static final int S_download = Cocoa.sel_registerName("download"); //$NON-NLS-1$
 public static final int S_fileExistsAtPath = Cocoa.sel_registerName("fileExistsAtPath:"); //$NON-NLS-1$
+public static final int S_isExecutableFileAtPath = Cocoa.sel_registerName("isExecutableFileAtPath:"); //$NON-NLS-1$
+public static final int S_fileExistsAtPath_isDirectory = Cocoa.sel_registerName("fileExistsAtPath:isDirectory:"); //$NON-NLS-1$
+public static final int S_globalContext = Cocoa.sel_registerName("globalContext"); //$NON-NLS-1$
 public static final int S_goBack = Cocoa.sel_registerName("goBack:"); //$NON-NLS-1$
 public static final int S_goForward = Cocoa.sel_registerName("goForward:"); //$NON-NLS-1$
 public static final int S_handleNotification = Cocoa.sel_registerName("handleNotification:"); //$NON-NLS-1$
@@ -95,8 +105,9 @@ public static final int S_intValue = Cocoa.sel_registerName("intValue"); //$NON-
 public static final int S_isFileURL = Cocoa.sel_registerName("isFileURL"); //$NON-NLS-1$
 public static final int S_isKindOfClass = Cocoa.sel_registerName("isKindOfClass:"); //$NON-NLS-1$
 public static final int S_isSessionOnly = Cocoa.sel_registerName("isSessionOnly"); //$NON-NLS-1$
-public static final int S_loadHTMLStringbaseURL = Cocoa.sel_registerName("loadHTMLString:baseURL:"); //$NON-NLS-1$
+public static final int S_loadHTMLStringBaseURL = Cocoa.sel_registerName("loadHTMLString:baseURL:"); //$NON-NLS-1$
 public static final int S_loadRequest = Cocoa.sel_registerName("loadRequest:"); //$NON-NLS-1$
+public static final int S_localizedDescription = Cocoa.sel_registerName("localizedDescription"); //$NON-NLS-1$
 public static final int S_length = Cocoa.sel_registerName("length"); //$NON-NLS-1$
 public static final int S_mainFrame = Cocoa.sel_registerName("mainFrame"); //$NON-NLS-1$
 public static final int S_mainMenu = Cocoa.sel_registerName("mainMenu"); //$NON-NLS-1$
@@ -106,6 +117,7 @@ public static final int S_numberWithBool = Cocoa.sel_registerName("numberWithBoo
 public static final int S_numberWithDouble = Cocoa.sel_registerName("numberWithDouble:"); //$NON-NLS-1$
 public static final int S_numberWithInt = Cocoa.sel_registerName("numberWithInt:"); //$NON-NLS-1$
 public static final int S_objectAtIndex = Cocoa.sel_registerName("objectAtIndex:"); //$NON-NLS-1$
+public static final int S_objectForKey = Cocoa.sel_registerName("objectForKey:"); //$NON-NLS-1$
 public static final int S_pageTitle = Cocoa.sel_registerName("pageTitle"); //$NON-NLS-1$
 public static final int S_password = Cocoa.sel_registerName("password"); //$NON-NLS-1$
 public static final int S_paste = Cocoa.sel_registerName("paste:"); //$NON-NLS-1$
@@ -125,6 +137,8 @@ public static final int S_requestWithURL = Cocoa.sel_registerName("requestWithUR
 public static final int S_request = Cocoa.sel_registerName("request"); //$NON-NLS-1$
 public static final int S_retainCount = Cocoa.sel_registerName("retainCount"); //$NON-NLS-1$
 public static final int S_sender = Cocoa.sel_registerName("sender"); //$NON-NLS-1$
+public static final int S_setAllowsAnyHTTPSCertificate = Cocoa.sel_registerName("setAllowsAnyHTTPSCertificate:forHost:"); //$NON-NLS-1$
+public static final int S_setAlternateButtonTitle = Cocoa.sel_registerName("setAlternateButtonTitle:"); //$NON-NLS-1$
 public static final int S_setApplicationNameForUserAgent = Cocoa.sel_registerName("setApplicationNameForUserAgent:"); //$NON-NLS-1$
 public static final int S_setCachePolicy = Cocoa.sel_registerName("setCachePolicy:"); //$NON-NLS-1$
 public static final int S_setCookie = Cocoa.sel_registerName("setCookie:"); //$NON-NLS-1$
@@ -137,19 +151,21 @@ public static final int S_setJavaScriptEnabled = Cocoa.sel_registerName("setJava
 public static final int S_setMainMenu = Cocoa.sel_registerName("setMainMenu:"); //$NON-NLS-1$
 public static final int S_setPolicyDelegate = Cocoa.sel_registerName("setPolicyDelegate:"); //$NON-NLS-1$
 public static final int S_setResourceLoadDelegate = Cocoa.sel_registerName("setResourceLoadDelegate:"); //$NON-NLS-1$
+public static final int S_setShowsHelp = Cocoa.sel_registerName("setShowsHelp:"); //$NON-NLS-1$
 public static final int S_setStatusText = Cocoa.sel_registerName("setStatusText:"); //$NON-NLS-1$
 public static final int S_setUIDelegate = Cocoa.sel_registerName("setUIDelegate:"); //$NON-NLS-1$
 public static final int S_sharedApplication = Cocoa.sel_registerName("sharedApplication"); //$NON-NLS-1$
+public static final int S_sharedCertificateTrustPanel = Cocoa.sel_registerName("sharedCertificateTrustPanel"); //$NON-NLS-1$
 public static final int S_sharedHTTPCookieStorage = Cocoa.sel_registerName("sharedHTTPCookieStorage"); //$NON-NLS-1$
 public static final int S_sharedHandler = Cocoa.sel_registerName("sharedHandler"); //$NON-NLS-1$
 public static final int S_standardPreferences = Cocoa.sel_registerName("standardPreferences"); //$NON-NLS-1$
 public static final int S_startAuthentication = sel_registerName("startAuthentication:window:"); //$NON-NLS-1$
 public static final int S_stopLoading = Cocoa.sel_registerName("stopLoading:"); //$NON-NLS-1$
-public static final int S_stringByEvaluatingJavaScriptFromString = Cocoa.sel_registerName("stringByEvaluatingJavaScriptFromString:"); //$NON-NLS-1$
 public static final int S_takeStringURLFrom = Cocoa.sel_registerName("takeStringURLFrom:"); //$NON-NLS-1$
 public static final int S_undefined = Cocoa.sel_registerName("undefined"); //$NON-NLS-1$
 public static final int S_use = Cocoa.sel_registerName("use"); //$NON-NLS-1$
 public static final int S_user = Cocoa.sel_registerName("user"); //$NON-NLS-1$
+public static final int S_userInfo = Cocoa.sel_registerName("userInfo"); //$NON-NLS-1$
 public static final int S_useCredential = Cocoa.sel_registerName("useCredential:forAuthenticationChallenge:"); //$NON-NLS-1$
 public static final int S_valueForKey = Cocoa.sel_registerName("valueForKey:"); //$NON-NLS-1$
 public static final int S_webFrame = Cocoa.sel_registerName("webFrame"); //$NON-NLS-1$
@@ -181,6 +197,7 @@ public static final int S_initWithImage_hotSpot = Cocoa.sel_registerName("initWi
 public static final int S_set = Cocoa.sel_registerName("set"); //$NON-NLS-1$
 public static final int S_init = Cocoa.sel_registerName("init"); //$NON-NLS-1$
 public static final int S_frame = Cocoa.sel_registerName("frame"); //$NON-NLS-1$
+public static final int S_display = Cocoa.sel_registerName("display"); //$NON-NLS-1$
 public static final int S_window = Cocoa.sel_registerName("window"); //$NON-NLS-1$
 public static final int S_makeKeyWindow = Cocoa.sel_registerName("makeKeyWindow"); //$NON-NLS-1$
 public static final int S_addRepresentation = Cocoa.sel_registerName("addRepresentation:"); //$NON-NLS-1$
@@ -202,8 +219,8 @@ public static final int S_addEventListener = Cocoa.sel_registerName("addEventLis
 public static final int S_altKey = Cocoa.sel_registerName("altKey"); //$NON-NLS-1$
 public static final int S_button = Cocoa.sel_registerName("button"); //$NON-NLS-1$
 public static final int S_charCode = Cocoa.sel_registerName("charCode"); //$NON-NLS-1$
-public static final int S_clientX = Cocoa.sel_registerName("clientX"); //$NON-NLS-1$
-public static final int S_clientY = Cocoa.sel_registerName("clientY"); //$NON-NLS-1$
+public static final int S_screenX = Cocoa.sel_registerName("screenX"); //$NON-NLS-1$
+public static final int S_screenY = Cocoa.sel_registerName("screenY"); //$NON-NLS-1$
 public static final int S_ctrlKey = Cocoa.sel_registerName("ctrlKey"); //$NON-NLS-1$
 public static final int S_detail = Cocoa.sel_registerName("detail"); //$NON-NLS-1$
 public static final int S_DOMDocument = Cocoa.sel_registerName("DOMDocument"); //$NON-NLS-1$
@@ -220,12 +237,19 @@ public static final int S_getCharacters_ = Cocoa.sel_registerName("getCharacters
 public static final int S_objCType = Cocoa.sel_registerName("objCType"); //$NON-NLS-1$
 public static final int S_setPreferences = Cocoa.sel_registerName("setPreferences:"); //$NON-NLS-1$
 public static final int S_value = Cocoa.sel_registerName("value"); //$NON-NLS-1$
+public static final int S_setHTTPBody = Cocoa.sel_registerName("setHTTPBody:"); //$NON-NLS-1$
+public static final int S_setHTTPMethod = Cocoa.sel_registerName("setHTTPMethod:"); //$NON-NLS-1$
+public static final int S_setCustomUserAgent = Cocoa.sel_registerName("setCustomUserAgent:"); //$NON-NLS-1$
+public static final int S_setValueForHTTPHeaderField = Cocoa.sel_registerName("setValue:forHTTPHeaderField:"); //$NON-NLS-1$
+public static final int S_locationInWindow = sel_registerName("locationInWindow");
 
 public static final int NSAlphaFirstBitmapFormat = 1 << 0;
 public static final int NSAlphaNonpremultipliedBitmapFormat = 1 << 1;
 public static final int NSControlKeyMask = 1 << 18;
 public static final int NSDeviceIndependentModifierFlagsMask = 0xffff0000;
 
+public static final int NSFileHandlingPanelOKButton = 1;
+
 public static final int NSMoveToBezierPathElement = 0;
 public static final int NSLineToBezierPathElement = 1;
 public static final int NSCurveToBezierPathElement = 2;
@@ -234,13 +258,24 @@ public static final int NSClosePathBezierPathElement = 3;
 public static final int NSOrderedSame = 0;
 
 public static final int NSURLCredentialPersistenceForSession = 1;
+public static final int NSURLErrorBadURL = -1000;
+public static final int NSURLErrorServerCertificateNotYetValid = -1204;
+public static final int NSURLErrorSecureConnectionFailed = -1200;
 public static final int NSURLRequestReloadIgnoringLocalCacheData = 1;
 
 public static final int NSAllDomainsMask = 0xffff;
+public static final int NSAllApplicationsDirectory = 100;
 public static final int NSDesktopDirectory = 12;
 public static final int NSDocumentDirectory = 9;
 public static final int NSDownloadsDirectory = 15;
 
+public static final int NSRightMouseDown = 3;
+public static final int NSRightMouseDragged = 7;
+public static final int NSRightMouseUp = 4;
+public static final int NSLeftMouseDown = 1;
+public static final int NSLeftMouseDragged = 6;
+public static final int NSLeftMouseUp = 2;
+
 /* WebKit */
 /** @param outView cast=(HIViewRef *) */
 public static final native int HIWebViewCreate(int[] outView);
@@ -289,6 +324,8 @@ public static final native int objc_msgSend(int object, int selector, float arg0
 public static final native int objc_msgSend(int object, int selector, double arg0);
 /** @method flags=cast */
 public static final native int objc_msgSend(int object, int selector, char[] arg0);
+/** @method flags=cast */
+public static final native int objc_msgSend(int object, int selector, byte[] arg0, int arg1);
 /**
  * @method flags=cast
  * @param object cast=(id)
@@ -370,6 +407,11 @@ public static final native int objc_msgSend(int object, int selector, int arg0,
  * @param object cast=(id)
  * @param selector cast=(SEL)
  */
+public static final native int objc_msgSend(int object, int selector, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5);
+/**
+ * @param object cast=(id)
+ * @param selector cast=(SEL)
+ */
 public static final native int objc_msgSend(int object, int selector, int[] arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, int arg10);
 /** @method flags=cast */
 public static final native double objc_msgSend_fpret(int /*long*/ id, int /*long*/ sel);
@@ -379,6 +421,8 @@ public static final native double objc_msgSend_fpret(int /*long*/ id, int /*long
  * @param selector cast=(SEL)
  */
 public static final native void objc_msgSend_stret(NSRect result, int object, int selector);
+/** @method flags=cast */
+public static final native void objc_msgSend_stret(NSPoint result, int /*long*/ id, int /*long*/ sel);
 /**
  * @param result cast=(void *)
  * @param object cast=(void *)
@@ -392,6 +436,11 @@ public static final native int sel_registerName(byte[] selectorName);
 /** @method flags=const */
 public static final native int NSDeviceRGBColorSpace();
 /**
+ * @param aPoint flags=struct
+ * @param aRect flags=struct
+ */
+public static final native boolean NSPointInRect(NSPoint aPoint, NSRect aRect);
+/**
  * @param directory cast=(NSSearchPathDirectory)
  * @param domainMask cast=(NSSearchPathDomainMask)
  * @param expandTilde cast=(BOOL)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.xml
deleted file mode 100644
index a388fd8..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.xml	
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_cocoa_lib" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-	
-<target name="build_cocoa_lib">
-	<antcall target="clean"/>
-	<antcall target="build_cocoa_lib_x86_and_ppc"/>
-	<antcall target="clean"/>
-	<antcall target="build_cocoa_lib_x86_64"/>
-</target>
-	
-<target name="build_cocoa_lib_x86_and_ppc" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build32.sh"/>
-		<arg value="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.cocoa.macosx" depth="infinite" />		
-</target>
-	
-<target name="build_cocoa_lib_x86_64" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build64.sh"/>
-		<arg value="install_x86_64"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.cocoa.macosx.x86_64" depth="infinite" />		
-</target>
-	
-<!-- Convert SWT 32 bit java and C source to 64 bit  -->
-<target name="replace.32.to.64" depends="init">
-	<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-	<replace dir="." includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
-	<replace dir="." includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/"/>
-	<replace dir="." includes="**/*.java" token="float /*double*/" value="double /*float*/"/>
-	<replace dir="." includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/"/>
-	<antcall target="init"/>
-</target>
-	
-<!-- Convert SWT 64 bit java and C source to 32 bit  -->
-<target name="replace.64.to.32" depends="init">
-	<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-	<replace dir="." includes="**/*.java" token="long /*int*/" value="int /*long*/"/>
-	<replace dir="." includes="**/*.java" token="long[] /*int[]*/" value="int[] /*long[]*/"/>
-	<replace dir="." includes="**/*.java" token="double /*float*/" value="float /*double*/"/>
-	<replace dir="." includes="**/*.java" token="double[] /*float[]*/" value="float[] /*double[]*/"/>
-	<antcall target="init"/>
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="clean"/>
-	</exec>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak
index 4c5d8a5..7520cd7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -33,21 +33,18 @@ AWT_OBJECTS   = swt_awt.o
 #SWT_DEBUG = -g
 CFLAGS = -c -xobjective-c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCOCOA -DATOMIC \
 	-I /System/Library/Frameworks/JavaVM.framework/Headers \
-	-I /System/Library/Frameworks/Cocoa.framework/Headers
-LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Cocoa -framework WebKit
+	-I /System/Library/Frameworks/Cocoa.framework/Headers \
+	-I /System/Library/Frameworks/JavaScriptCore.framework/Headers
+LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Cocoa -framework WebKit -framework CoreServices -framework JavaScriptCore -framework Security -framework SecurityInterface
 SWT_OBJECTS = swt.o c.o c_stats.o callback.o
 SWTPI_OBJECTS = swt.o os.o os_structs.o os_stats.o os_custom.o
 XULRUNNER_OBJECTS = swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
 
-XULRUNNER_SDK = /Users/Shared/xulrunner/1.8.0.1/mozilla/dist/i386/dist/sdk
-#XULRUNNER_SDK = /Users/Shared/gecko-sdk
-#XULRUNNER_LIBS = -L${XULRUNNER_SDK}/lib -lxpcomglue
-XULRUNNER_LIBS = $(XULRUNNER_SDK)/lib/libxpcomglue.a $(XULRUNNER_SDK)/../../../ppc/dist/sdk/lib/libxpcomglue.a
 XULRUNNERCFLAGS = -c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCOCOA -I /System/Library/Frameworks/JavaVM.framework/Headers \
 	-Wno-non-virtual-dtor -include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include 
 XULRUNNERLFLAGS = $(LFLAGS)
 
-all: $(SWT_LIB) $(SWTPI_LIB) $(AWT_LIB) $(XULRUNNER_LIB)
+all: $(SWT_LIB) $(SWTPI_LIB) $(AWT_LIB)
 
 all_x86_64: $(SWT_LIB) $(SWTPI_LIB) $(AWT_LIB)
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
index cbe15ab..4cb1a6e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,6 +62,34 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(AcquireRootMenu)
 }
 #endif
 
+#ifndef NO_CALLBACK_1NSTextAttachmentCell_1cellSize
+static jintLong CALLBACK_1NSTextAttachmentCell_1cellSize;
+static NSSize proc_CALLBACK_1NSTextAttachmentCell_1cellSize(id arg0, SEL arg1) {
+	NSSize* lprc = ((NSSize* (*)(id, SEL))CALLBACK_1NSTextAttachmentCell_1cellSize)(arg0, arg1);
+	NSSize rc;
+	if (lprc) {
+		rc = *lprc;
+		free(lprc);
+	} else {
+		memset(&rc, 0, sizeof(NSSize));
+	}
+	return rc;
+}
+static jintLong CALLBACK_NSTextAttachmentCell_cellSize(jintLong func) {
+	CALLBACK_1NSTextAttachmentCell_1cellSize = func;
+	return (jintLong)proc_CALLBACK_1NSTextAttachmentCell_1cellSize;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1NSTextAttachmentCell_1cellSize)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC);
+	rc = (jintLong)CALLBACK_NSTextAttachmentCell_cellSize(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1accessibilityHitTest_1
 static jintLong CALLBACK_1accessibilityHitTest_1;
 static id proc_CALLBACK_1accessibilityHitTest_1(id arg0, SEL arg1, NSPoint arg2) {
@@ -122,6 +150,34 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1canDragRowsWithIndexes_1atPoint_1
 }
 #endif
 
+#ifndef NO_CALLBACK_1cellBaselineOffset
+static jintLong CALLBACK_1cellBaselineOffset;
+static NSPoint proc_CALLBACK_1cellBaselineOffset(id arg0, SEL arg1) {
+	NSPoint* lprc = ((NSPoint* (*)(id, SEL))CALLBACK_1cellBaselineOffset)(arg0, arg1);
+	NSPoint rc;
+	if (lprc) {
+		rc = *lprc;
+		free(lprc);
+	} else {
+		memset(&rc, 0, sizeof(NSPoint));
+	}
+	return rc;
+}
+static jintLong CALLBACK_cellBaselineOffset(jintLong func) {
+	CALLBACK_1cellBaselineOffset = func;
+	return (jintLong)proc_CALLBACK_1cellBaselineOffset;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cellBaselineOffset)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1cellBaselineOffset_FUNC);
+	rc = (jintLong)CALLBACK_cellBaselineOffset(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1cellBaselineOffset_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1cellSize
 static jintLong CALLBACK_1cellSize;
 static NSSize proc_CALLBACK_1cellSize(id arg0, SEL arg1) {
@@ -230,6 +286,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1endedAt_1operation_
 }
 #endif
 
+#ifndef NO_CALLBACK_1drawBackgroundInClipRect_1
+static jintLong CALLBACK_1drawBackgroundInClipRect_1;
+static void proc_CALLBACK_1drawBackgroundInClipRect_1(id arg0, SEL arg1, NSRect arg2) {
+	((void (*)(id, SEL, NSRect*))CALLBACK_1drawBackgroundInClipRect_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_drawBackgroundInClipRect_(jintLong func) {
+	CALLBACK_1drawBackgroundInClipRect_1 = func;
+	return (jintLong)proc_CALLBACK_1drawBackgroundInClipRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawBackgroundInClipRect_1)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1drawBackgroundInClipRect_1_FUNC);
+	rc = (jintLong)CALLBACK_drawBackgroundInClipRect_(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1drawBackgroundInClipRect_1_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1drawImage_1withFrame_1inView_1
 static jintLong CALLBACK_1drawImage_1withFrame_1inView_1;
 static void proc_CALLBACK_1drawImage_1withFrame_1inView_1(id arg0, SEL arg1, NSImage* arg2, NSRect arg3, NSView* arg4) {
@@ -270,6 +346,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawInteriorWithFrame_1inView_1)
 }
 #endif
 
+#ifndef NO_CALLBACK_1drawLabel_1inRect_1
+static jintLong CALLBACK_1drawLabel_1inRect_1;
+static void proc_CALLBACK_1drawLabel_1inRect_1(id arg0, SEL arg1, BOOL arg2, NSRect arg3) {
+	((void (*)(id, SEL, BOOL, NSRect*))CALLBACK_1drawLabel_1inRect_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_drawLabel_inRect_(jintLong func) {
+	CALLBACK_1drawLabel_1inRect_1 = func;
+	return (jintLong)proc_CALLBACK_1drawLabel_1inRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawLabel_1inRect_1)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1drawLabel_1inRect_1_FUNC);
+	rc = (jintLong)CALLBACK_drawLabel_inRect_(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1drawLabel_1inRect_1_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1drawRect_1
 static jintLong CALLBACK_1drawRect_1;
 static void proc_CALLBACK_1drawRect_1(id arg0, SEL arg1, NSRect arg2) {
@@ -290,6 +386,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawRect_1)
 }
 #endif
 
+#ifndef NO_CALLBACK_1drawViewBackgroundInRect_1
+static jintLong CALLBACK_1drawViewBackgroundInRect_1;
+static void proc_CALLBACK_1drawViewBackgroundInRect_1(id arg0, SEL arg1, NSRect arg2) {
+	((void (*)(id, SEL, NSRect*))CALLBACK_1drawViewBackgroundInRect_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_drawViewBackgroundInRect_(jintLong func) {
+	CALLBACK_1drawViewBackgroundInRect_1 = func;
+	return (jintLong)proc_CALLBACK_1drawViewBackgroundInRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawViewBackgroundInRect_1)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1drawViewBackgroundInRect_1_FUNC);
+	rc = (jintLong)CALLBACK_drawViewBackgroundInRect_(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1drawViewBackgroundInRect_1_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1drawWithExpansionFrame_1inView_1
 static jintLong CALLBACK_1drawWithExpansionFrame_1inView_1;
 static void proc_CALLBACK_1drawWithExpansionFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
@@ -482,6 +598,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1markedRange)
 }
 #endif
 
+#ifndef NO_CALLBACK_1scrollClipView_1toPoint_1
+static jintLong CALLBACK_1scrollClipView_1toPoint_1;
+static void proc_CALLBACK_1scrollClipView_1toPoint_1(id arg0, SEL arg1, NSClipView* arg2, NSPoint arg3) {
+	((void (*)(id, SEL, NSClipView*, NSPoint*))CALLBACK_1scrollClipView_1toPoint_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_scrollClipView_toPoint_(jintLong func) {
+	CALLBACK_1scrollClipView_1toPoint_1 = func;
+	return (jintLong)proc_CALLBACK_1scrollClipView_1toPoint_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1scrollClipView_1toPoint_1)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1scrollClipView_1toPoint_1_FUNC);
+	rc = (jintLong)CALLBACK_scrollClipView_toPoint_(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1scrollClipView_1toPoint_1_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1selectedRange
 static jintLong CALLBACK_1selectedRange;
 static NSRange proc_CALLBACK_1selectedRange(id arg0, SEL arg1) {
@@ -630,6 +766,34 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1shouldChangeTextInRange_1replacem
 }
 #endif
 
+#ifndef NO_CALLBACK_1sizeOfLabel_1
+static jintLong CALLBACK_1sizeOfLabel_1;
+static NSSize proc_CALLBACK_1sizeOfLabel_1(id arg0, SEL arg1, BOOL arg2) {
+	NSSize* lprc = ((NSSize* (*)(id, SEL, BOOL))CALLBACK_1sizeOfLabel_1)(arg0, arg1, arg2);
+	NSSize rc;
+	if (lprc) {
+		rc = *lprc;
+		free(lprc);
+	} else {
+		memset(&rc, 0, sizeof(NSSize));
+	}
+	return rc;
+}
+static jintLong CALLBACK_sizeOfLabel_(jintLong func) {
+	CALLBACK_1sizeOfLabel_1 = func;
+	return (jintLong)proc_CALLBACK_1sizeOfLabel_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1sizeOfLabel_1)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CALLBACK_1sizeOfLabel_1_FUNC);
+	rc = (jintLong)CALLBACK_sizeOfLabel_(arg0);
+	OS_NATIVE_EXIT(env, that, CALLBACK_1sizeOfLabel_1_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1
 static jintLong CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
 static NSRange proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1(id arg0, SEL arg1, NSTextView* arg2, NSRange arg3, NSRange arg4) {
@@ -726,6 +890,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1webView_1setFrame_1)
 }
 #endif
 
+#ifndef NO_CFAttributedStringCreate
+JNIEXPORT jintLong JNICALL OS_NATIVE(CFAttributedStringCreate)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CFAttributedStringCreate_FUNC);
+	rc = (jintLong)CFAttributedStringCreate((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFDictionaryRef)arg2);
+	OS_NATIVE_EXIT(env, that, CFAttributedStringCreate_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CFDataGetBytePtr
 JNIEXPORT jintLong JNICALL OS_NATIVE(CFDataGetBytePtr)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -750,6 +926,40 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CFDataGetLength)
 }
 #endif
 
+#ifndef NO_CFDictionaryAddValue
+JNIEXPORT void JNICALL OS_NATIVE(CFDictionaryAddValue)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	OS_NATIVE_ENTER(env, that, CFDictionaryAddValue_FUNC);
+	CFDictionaryAddValue((CFMutableDictionaryRef)arg0, (void*)arg1, (void*)arg2);
+	OS_NATIVE_EXIT(env, that, CFDictionaryAddValue_FUNC);
+}
+#endif
+
+#ifndef NO_CFDictionaryCreateMutable
+JNIEXPORT jintLong JNICALL OS_NATIVE(CFDictionaryCreateMutable)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CFDictionaryCreateMutable_FUNC);
+	rc = (jintLong)CFDictionaryCreateMutable((CFAllocatorRef)arg0, (CFIndex)arg1, (CFDictionaryKeyCallBacks*)arg2, (CFDictionaryValueCallBacks*)arg3);
+	OS_NATIVE_EXIT(env, that, CFDictionaryCreateMutable_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFRange_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(CFRange_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFRange_1sizeof_FUNC);
+	rc = (jint)CFRange_sizeof();
+	OS_NATIVE_EXIT(env, that, CFRange_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CFRelease
 JNIEXPORT void JNICALL OS_NATIVE(CFRelease)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -804,6 +1014,60 @@ JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopObserverInvalidate)
 }
 #endif
 
+#ifndef NO_CFRunLoopRunInMode
+JNIEXPORT jint JNICALL OS_NATIVE(CFRunLoopRunInMode)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jboolean arg2)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CFRunLoopRunInMode_FUNC);
+	rc = (jint)CFRunLoopRunInMode((CFStringRef)arg0, (CFTimeInterval)arg1, (Boolean)arg2);
+	OS_NATIVE_EXIT(env, that, CFRunLoopRunInMode_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFRunLoopStop
+JNIEXPORT void JNICALL OS_NATIVE(CFRunLoopStop)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, CFRunLoopStop_FUNC);
+	CFRunLoopStop((CFRunLoopRef)arg0);
+	OS_NATIVE_EXIT(env, that, CFRunLoopStop_FUNC);
+}
+#endif
+
+#ifndef NO_CFStringCreateWithCharacters
+JNIEXPORT jintLong JNICALL OS_NATIVE(CFStringCreateWithCharacters)
+	(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2)
+{
+	jchar *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CFStringCreateWithCharacters_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jintLong)CFStringCreateWithCharacters((CFAllocatorRef)arg0, (UniChar*)lparg1, (CFIndex)arg2);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CFStringCreateWithCharacters_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CFURLCreateFromFSRef
+JNIEXPORT jintLong JNICALL OS_NATIVE(CFURLCreateFromFSRef)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CFURLCreateFromFSRef_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jintLong)CFURLCreateFromFSRef((CFAllocatorRef)arg0, (struct FSRef*)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CFURLCreateFromFSRef_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CFURLCreateStringByAddingPercentEscapes
 JNIEXPORT jintLong JNICALL OS_NATIVE(CFURLCreateStringByAddingPercentEscapes)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4)
@@ -816,6 +1080,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CFURLCreateStringByAddingPercentEscapes)
 }
 #endif
 
+#ifndef NO_CGAffineTransform_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(CGAffineTransform_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CGAffineTransform_1sizeof_FUNC);
+	rc = (jint)CGAffineTransform_sizeof();
+	OS_NATIVE_EXIT(env, that, CGAffineTransform_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CGBitmapContextCreate
 JNIEXPORT jintLong JNICALL OS_NATIVE(CGBitmapContextCreate)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jint arg6)
@@ -852,6 +1128,32 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(CGBitmapContextGetData)
 }
 #endif
 
+#ifndef NO_CGColorCreate
+JNIEXPORT jintLong JNICALL OS_NATIVE(CGColorCreate)
+	(JNIEnv *env, jclass that, jintLong arg0, jfloatDoubleArray arg1)
+{
+	jfloatDouble *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CGColorCreate_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetFloatDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jintLong)CGColorCreate((CGColorSpaceRef)arg0, (CGFloat*)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseFloatDoubleArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CGColorCreate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CGColorRelease
+JNIEXPORT void JNICALL OS_NATIVE(CGColorRelease)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, CGColorRelease_FUNC);
+	CGColorRelease((CGColorRef)arg0);
+	OS_NATIVE_EXIT(env, that, CGColorRelease_FUNC);
+}
+#endif
+
 #ifndef NO_CGColorSpaceCreateDeviceRGB
 JNIEXPORT jintLong JNICALL OS_NATIVE(CGColorSpaceCreateDeviceRGB)
 	(JNIEnv *env, jclass that)
@@ -1095,6 +1397,50 @@ JNIEXPORT void JNICALL OS_NATIVE(CGContextSetMiterLimit)
 }
 #endif
 
+#ifndef NO_CGContextSetShouldAntialias
+JNIEXPORT void JNICALL OS_NATIVE(CGContextSetShouldAntialias)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, CGContextSetShouldAntialias_FUNC);
+	CGContextSetShouldAntialias((CGContextRef)arg0, (_Bool)arg1);
+	OS_NATIVE_EXIT(env, that, CGContextSetShouldAntialias_FUNC);
+}
+#endif
+
+#ifndef NO_CGContextSetTextDrawingMode
+JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextDrawingMode)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, CGContextSetTextDrawingMode_FUNC);
+	CGContextSetTextDrawingMode((CGContextRef)arg0, (CGTextDrawingMode)arg1);
+	OS_NATIVE_EXIT(env, that, CGContextSetTextDrawingMode_FUNC);
+}
+#endif
+
+#ifndef NO_CGContextSetTextMatrix
+JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextMatrix)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	CGAffineTransform _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, CGContextSetTextMatrix_FUNC);
+	if (arg1) if ((lparg1 = getCGAffineTransformFields(env, arg1, &_arg1)) == NULL) goto fail;
+	CGContextSetTextMatrix((CGContextRef)arg0, *lparg1);
+fail:
+	if (arg1 && lparg1) setCGAffineTransformFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, CGContextSetTextMatrix_FUNC);
+}
+#endif
+
+#ifndef NO_CGContextSetTextPosition
+JNIEXPORT void JNICALL OS_NATIVE(CGContextSetTextPosition)
+	(JNIEnv *env, jclass that, jintLong arg0, jfloatDouble arg1, jfloatDouble arg2)
+{
+	OS_NATIVE_ENTER(env, that, CGContextSetTextPosition_FUNC);
+	CGContextSetTextPosition((CGContextRef)arg0, (CGFloat)arg1, (CGFloat)arg2);
+	OS_NATIVE_EXIT(env, that, CGContextSetTextPosition_FUNC);
+}
+#endif
+
 #ifndef NO_CGContextStrokePath
 JNIEXPORT void JNICALL OS_NATIVE(CGContextStrokePath)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -1351,6 +1697,20 @@ JNIEXPORT void JNICALL OS_NATIVE(CGPathAddLineToPoint)
 }
 #endif
 
+#ifndef NO_CGPathAddRect
+JNIEXPORT void JNICALL OS_NATIVE(CGPathAddRect)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
+{
+	CGRect _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, CGPathAddRect_FUNC);
+	if (arg2) if ((lparg2 = getCGRectFields(env, arg2, &_arg2)) == NULL) goto fail;
+	CGPathAddRect((CGMutablePathRef)arg0, (CGAffineTransform*)arg1, *lparg2);
+fail:
+	if (arg2 && lparg2) setCGRectFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, CGPathAddRect_FUNC);
+}
+#endif
+
 #ifndef NO_CGPathApply
 JNIEXPORT void JNICALL OS_NATIVE(CGPathApply)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -1559,6 +1919,150 @@ fail:
 }
 #endif
 
+#ifndef NO_CTFontGetAscent
+JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetAscent)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jfloatDouble rc = 0;
+	OS_NATIVE_ENTER(env, that, CTFontGetAscent_FUNC);
+	rc = (jfloatDouble)CTFontGetAscent((CTFontRef)arg0);
+	OS_NATIVE_EXIT(env, that, CTFontGetAscent_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTFontGetDescent
+JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetDescent)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jfloatDouble rc = 0;
+	OS_NATIVE_ENTER(env, that, CTFontGetDescent_FUNC);
+	rc = (jfloatDouble)CTFontGetDescent((CTFontRef)arg0);
+	OS_NATIVE_EXIT(env, that, CTFontGetDescent_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTFontGetLeading
+JNIEXPORT jfloatDouble JNICALL OS_NATIVE(CTFontGetLeading)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jfloatDouble rc = 0;
+	OS_NATIVE_ENTER(env, that, CTFontGetLeading_FUNC);
+	rc = (jfloatDouble)CTFontGetLeading((CTFontRef)arg0);
+	OS_NATIVE_EXIT(env, that, CTFontGetLeading_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTLineCreateWithAttributedString
+JNIEXPORT jintLong JNICALL OS_NATIVE(CTLineCreateWithAttributedString)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CTLineCreateWithAttributedString_FUNC);
+	rc = (jintLong)CTLineCreateWithAttributedString((CFAttributedStringRef)arg0);
+	OS_NATIVE_EXIT(env, that, CTLineCreateWithAttributedString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTLineDraw
+JNIEXPORT void JNICALL OS_NATIVE(CTLineDraw)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	OS_NATIVE_ENTER(env, that, CTLineDraw_FUNC);
+	CTLineDraw((CTLineRef)arg0, (CGContextRef)arg1);
+	OS_NATIVE_EXIT(env, that, CTLineDraw_FUNC);
+}
+#endif
+
+#ifndef NO_CTLineGetTypographicBounds
+JNIEXPORT jdouble JNICALL OS_NATIVE(CTLineGetTypographicBounds)
+	(JNIEnv *env, jclass that, jintLong arg0, jfloatDoubleArray arg1, jfloatDoubleArray arg2, jfloatDoubleArray arg3)
+{
+	jfloatDouble *lparg1=NULL;
+	jfloatDouble *lparg2=NULL;
+	jfloatDouble *lparg3=NULL;
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, CTLineGetTypographicBounds_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetFloatDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetFloatDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetFloatDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jdouble)CTLineGetTypographicBounds((CTLineRef)arg0, (CGFloat*)lparg1, (CGFloat*)lparg2, (CGFloat*)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseFloatDoubleArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseFloatDoubleArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseFloatDoubleArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, CTLineGetTypographicBounds_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTParagraphStyleCreate
+JNIEXPORT jintLong JNICALL OS_NATIVE(CTParagraphStyleCreate)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CTParagraphStyleCreate_FUNC);
+	rc = (jintLong)CTParagraphStyleCreate((CTParagraphStyleSetting*)arg0, (CFIndex)arg1);
+	OS_NATIVE_EXIT(env, that, CTParagraphStyleCreate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTParagraphStyleSetting_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(CTParagraphStyleSetting_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, CTParagraphStyleSetting_1sizeof_FUNC);
+	rc = (jint)CTParagraphStyleSetting_sizeof();
+	OS_NATIVE_EXIT(env, that, CTParagraphStyleSetting_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTTypesetterCreateLine
+JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterCreateLine)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	CFRange _arg1, *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CTTypesetterCreateLine_FUNC);
+	if (arg1) if ((lparg1 = getCFRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
+	rc = (jintLong)CTTypesetterCreateLine((CTTypesetterRef)arg0, *lparg1);
+fail:
+	if (arg1 && lparg1) setCFRangeFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, CTTypesetterCreateLine_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTTypesetterCreateWithAttributedString
+JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterCreateWithAttributedString)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CTTypesetterCreateWithAttributedString_FUNC);
+	rc = (jintLong)CTTypesetterCreateWithAttributedString((CFAttributedStringRef)arg0);
+	OS_NATIVE_EXIT(env, that, CTTypesetterCreateWithAttributedString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CTTypesetterSuggestLineBreak
+JNIEXPORT jintLong JNICALL OS_NATIVE(CTTypesetterSuggestLineBreak)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CTTypesetterSuggestLineBreak_FUNC);
+	rc = (jintLong)CTTypesetterSuggestLineBreak((CTTypesetterRef)arg0, (CFIndex)arg1, (double)arg2);
+	OS_NATIVE_EXIT(env, that, CTTypesetterSuggestLineBreak_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_CancelMenuTracking
 JNIEXPORT jint JNICALL OS_NATIVE(CancelMenuTracking)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jint arg2)
@@ -1875,6 +2379,48 @@ fail:
 }
 #endif
 
+#ifndef NO_JSEvaluateScript
+JNIEXPORT jintLong JNICALL OS_NATIVE(JSEvaluateScript)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+{
+	jintLong *lparg5=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC);
+	if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+	OS_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_JSStringCreateWithUTF8CString
+JNIEXPORT jintLong JNICALL OS_NATIVE(JSStringCreateWithUTF8CString)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSStringCreateWithUTF8CString((const char *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_JSStringRelease
+JNIEXPORT void JNICALL OS_NATIVE(JSStringRelease)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, JSStringRelease_FUNC);
+	JSStringRelease((JSStringRef)arg0);
+	OS_NATIVE_EXIT(env, that, JSStringRelease_FUNC);
+}
+#endif
+
 #ifndef NO_LMGetKbdType
 JNIEXPORT jbyte JNICALL OS_NATIVE(LMGetKbdType)
 	(JNIEnv *env, jclass that)
@@ -1895,6 +2441,25 @@ JNIEXPORT jbyte JNICALL OS_NATIVE(LMGetKbdType)
 }
 #endif
 
+#ifndef NO_LSGetApplicationForInfo
+JNIEXPORT jintLong JNICALL OS_NATIVE(LSGetApplicationForInfo)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1, jintLong arg2, jint arg3, jbyteArray arg4, jintArray arg5)
+{
+	jbyte *lparg4=NULL;
+	jint *lparg5=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, LSGetApplicationForInfo_FUNC);
+	if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jintLong)LSGetApplicationForInfo((OSType)arg0, (OSType)arg1, (CFStringRef)arg2, (LSRolesMask)arg3, (FSRef *)lparg4, (CFURLRef *)lparg5);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+	if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
+	OS_NATIVE_EXIT(env, that, LSGetApplicationForInfo_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_LineTo
 JNIEXPORT void JNICALL OS_NATIVE(LineTo)
 	(JNIEnv *env, jclass that, jshort arg0, jshort arg1)
@@ -1943,6 +2508,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityActionDescription)
 }
 #endif
 
+#ifndef NO_NSAccessibilityAttributedStringForRangeParameterizedAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityAttributedStringForRangeParameterizedAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityAttributedStringForRangeParameterizedAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityBackgroundColorTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityBackgroundColorTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityBackgroundColorTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityBackgroundColorTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityBackgroundColorTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityBoundsForRangeParameterizedAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityBoundsForRangeParameterizedAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityBoundsForRangeParameterizedAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityButtonRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityButtonRole)
 	(JNIEnv *env, jclass that)
@@ -1979,6 +2580,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityChildrenAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilityColorWellRole
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColorWellRole)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityColorWellRole_FUNC);
+	rc = (jintLong)NSAccessibilityColorWellRole;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityColorWellRole_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityColumnRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnRole)
 	(JNIEnv *env, jclass that)
@@ -1991,6 +2604,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnRole)
 }
 #endif
 
+#ifndef NO_NSAccessibilityColumnsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityColumnsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityColumnsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityColumnsAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityComboBoxRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityComboBoxRole)
 	(JNIEnv *env, jclass that)
@@ -2111,6 +2736,78 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFocusedUIElementChangedNotif
 }
 #endif
 
+#ifndef NO_NSAccessibilityFocusedWindowChangedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFocusedWindowChangedNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityFocusedWindowChangedNotification_FUNC);
+	rc = (jintLong)NSAccessibilityFocusedWindowChangedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityFocusedWindowChangedNotification_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityFontFamilyKey
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontFamilyKey)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityFontFamilyKey_FUNC);
+	rc = (jintLong)NSAccessibilityFontFamilyKey;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityFontFamilyKey_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityFontNameKey
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontNameKey)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityFontNameKey_FUNC);
+	rc = (jintLong)NSAccessibilityFontNameKey;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityFontNameKey_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityFontSizeKey
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontSizeKey)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityFontSizeKey_FUNC);
+	rc = (jintLong)NSAccessibilityFontSizeKey;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityFontSizeKey_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityFontTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityFontTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityFontTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityFontTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityFontTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityForegroundColorTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityForegroundColorTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityForegroundColorTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityForegroundColorTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityForegroundColorTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityGridRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityGridRole)
 	(JNIEnv *env, jclass that)
@@ -2135,6 +2832,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityGroupRole)
 }
 #endif
 
+#ifndef NO_NSAccessibilityHeaderAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHeaderAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityHeaderAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityHeaderAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityHeaderAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityHelpAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityHelpAttribute)
 	(JNIEnv *env, jclass that)
@@ -2207,6 +2916,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityIncrementorRole)
 }
 #endif
 
+#ifndef NO_NSAccessibilityIndexAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityIndexAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityIndexAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityIndexAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityIndexAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityInsertionPointLineNumberAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityInsertionPointLineNumberAttribute)
 	(JNIEnv *env, jclass that)
@@ -2267,6 +2988,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLinkTextAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilityLinkedUIElementsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityLinkedUIElementsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityLinkedUIElementsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityLinkedUIElementsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityLinkedUIElementsAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityListRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityListRole)
 	(JNIEnv *env, jclass that)
@@ -2339,14 +3072,38 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMenuRole)
 }
 #endif
 
-#ifndef NO_NSAccessibilityMinValueAttribute
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMinValueAttribute)
+#ifndef NO_NSAccessibilityMinValueAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMinValueAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityMinValueAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityMinValueAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityMinValueAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityMisspelledTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMisspelledTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityMisspelledTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityMisspelledTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityMisspelledTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityMovedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityMovedNotification)
 	(JNIEnv *env, jclass that)
 {
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, NSAccessibilityMinValueAttribute_FUNC);
-	rc = (jintLong)NSAccessibilityMinValueAttribute;
-	OS_NATIVE_EXIT(env, that, NSAccessibilityMinValueAttribute_FUNC);
+	OS_NATIVE_ENTER(env, that, NSAccessibilityMovedNotification_FUNC);
+	rc = (jintLong)NSAccessibilityMovedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityMovedNotification_FUNC);
 	return rc;
 }
 #endif
@@ -2575,6 +3332,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRangeForPositionParameterize
 }
 #endif
 
+#ifndef NO_NSAccessibilityResizedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityResizedNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityResizedNotification_FUNC);
+	rc = (jintLong)NSAccessibilityResizedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityResizedNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityRoleAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleAttribute)
 	(JNIEnv *env, jclass that)
@@ -2623,6 +3392,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRoleDescriptionForUIElement)
 }
 #endif
 
+#ifndef NO_NSAccessibilityRowCountChangedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowCountChangedNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
+	rc = (jintLong)NSAccessibilityRowCountChangedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityRowCountChangedNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityRowRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowRole)
 	(JNIEnv *env, jclass that)
@@ -2635,6 +3416,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowRole)
 }
 #endif
 
+#ifndef NO_NSAccessibilityRowsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityRowsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityRowsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityRowsAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityScrollAreaRole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityScrollAreaRole)
 	(JNIEnv *env, jclass that)
@@ -2695,6 +3488,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedChildrenChangedNotif
 }
 #endif
 
+#ifndef NO_NSAccessibilitySelectedColumnsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedColumnsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedColumnsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilitySelectedColumnsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedColumnsAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilitySelectedRowsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedRowsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilitySelectedRowsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedRowsAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilitySelectedRowsChangedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedRowsChangedNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilitySelectedRowsChangedNotification_FUNC);
+	rc = (jintLong)NSAccessibilitySelectedRowsChangedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilitySelectedRowsChangedNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilitySelectedTextAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySelectedTextAttribute)
 	(JNIEnv *env, jclass that)
@@ -2755,6 +3584,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityServesAsTitleForUIElementsAt
 }
 #endif
 
+#ifndef NO_NSAccessibilityShowMenuAction
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityShowMenuAction)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityShowMenuAction_FUNC);
+	rc = (jintLong)NSAccessibilityShowMenuAction;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityShowMenuAction_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilitySizeAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySizeAttribute)
 	(JNIEnv *env, jclass that)
@@ -2827,6 +3668,30 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStaticTextRole)
 }
 #endif
 
+#ifndef NO_NSAccessibilityStrikethroughColorTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStrikethroughColorTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityStrikethroughColorTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityStrikethroughColorTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityStrikethroughColorTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityStrikethroughTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStrikethroughTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityStrikethroughTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityStrikethroughTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityStrikethroughTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityStringForRangeParameterizedAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityStringForRangeParameterizedAttribute)
 	(JNIEnv *env, jclass that)
@@ -2863,6 +3728,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySubroleAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilitySuperscriptTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySuperscriptTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilitySuperscriptTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilitySuperscriptTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilitySuperscriptTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilitySystemDialogSubrole
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilitySystemDialogSubrole)
 	(JNIEnv *env, jclass that)
@@ -2971,6 +3848,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilityTitleChangedNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleChangedNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityTitleChangedNotification_FUNC);
+	rc = (jintLong)NSAccessibilityTitleChangedNotification;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityTitleChangedNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityTitleUIElementAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTitleUIElementAttribute)
 	(JNIEnv *env, jclass that)
@@ -3007,6 +3896,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityTopLevelUIElementAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilityURLAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityURLAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityURLAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityURLAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityURLAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityUnderlineColorTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnderlineColorTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityUnderlineColorTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityUnderlineColorTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityUnderlineColorTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityUnderlineTextAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnderlineTextAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityUnderlineTextAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityUnderlineTextAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityUnderlineTextAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityUnignoredAncestor
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityUnignoredAncestor)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -3175,6 +4100,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleChildrenAttribute)
 }
 #endif
 
+#ifndef NO_NSAccessibilityVisibleColumnsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleColumnsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleColumnsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityVisibleColumnsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleColumnsAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityVisibleNameKey
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleNameKey)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleNameKey_FUNC);
+	rc = (jintLong)NSAccessibilityVisibleNameKey;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleNameKey_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityVisibleRowsAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityVisibleRowsAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityVisibleRowsAttribute_FUNC);
+	rc = (jintLong)NSAccessibilityVisibleRowsAttribute;
+	OS_NATIVE_EXIT(env, that, NSAccessibilityVisibleRowsAttribute_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSAccessibilityWindowAttribute
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityWindowAttribute)
 	(JNIEnv *env, jclass that)
@@ -3223,6 +4184,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSApplicationDidChangeScreenParametersNotif
 }
 #endif
 
+#ifndef NO_NSAttachmentAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAttachmentAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAttachmentAttributeName_FUNC);
+	rc = (jintLong)NSAttachmentAttributeName;
+	OS_NATIVE_EXIT(env, that, NSAttachmentAttributeName_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSBackgroundColorAttributeName
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSBackgroundColorAttributeName)
 	(JNIEnv *env, jclass that)
@@ -3298,6 +4271,18 @@ fail:
 }
 #endif
 
+#ifndef NO_NSCursorAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSCursorAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSCursorAttributeName_FUNC);
+	rc = (jintLong)NSCursorAttributeName;
+	OS_NATIVE_EXIT(env, that, NSCursorAttributeName_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSDefaultRunLoopMode
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSDefaultRunLoopMode)
 	(JNIEnv *env, jclass that)
@@ -3480,6 +4465,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSLinkAttributeName)
 }
 #endif
 
+#ifndef NO_NSModalPanelRunLoopMode
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSModalPanelRunLoopMode)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSModalPanelRunLoopMode_FUNC);
+	rc = (jintLong)NSModalPanelRunLoopMode;
+	OS_NATIVE_EXIT(env, that, NSModalPanelRunLoopMode_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSNumberOfColorComponents
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSNumberOfColorComponents)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -3504,6 +4501,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSObliquenessAttributeName)
 }
 #endif
 
+#ifndef NO_NSOutlineViewColumnDidMoveNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSOutlineViewColumnDidMoveNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSOutlineViewColumnDidMoveNotification_FUNC);
+	rc = (jintLong)NSOutlineViewColumnDidMoveNotification;
+	OS_NATIVE_EXIT(env, that, NSOutlineViewColumnDidMoveNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSParagraphStyleAttributeName
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSParagraphStyleAttributeName)
 	(JNIEnv *env, jclass that)
@@ -3739,6 +4748,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(NSSize_1sizeof)
 }
 #endif
 
+#ifndef NO_NSSpellingStateAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSSpellingStateAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSSpellingStateAttributeName_FUNC);
+	rc = (jintLong)NSSpellingStateAttributeName;
+	OS_NATIVE_EXIT(env, that, NSSpellingStateAttributeName_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSStrikethroughColorAttributeName
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrikethroughColorAttributeName)
 	(JNIEnv *env, jclass that)
@@ -3811,6 +4832,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSTIFFPboardType)
 }
 #endif
 
+#ifndef NO_NSTableViewColumnDidMoveNotification
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSTableViewColumnDidMoveNotification)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSTableViewColumnDidMoveNotification_FUNC);
+	rc = (jintLong)NSTableViewColumnDidMoveNotification;
+	OS_NATIVE_EXIT(env, that, NSTableViewColumnDidMoveNotification_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_NSTemporaryDirectory
 JNIEXPORT jintLong JNICALL OS_NATIVE(NSTemporaryDirectory)
 	(JNIEnv *env, jclass that)
@@ -4137,6 +5170,54 @@ fail:
 }
 #endif
 
+#ifndef NO_SecPolicySearchCopyNext
+JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCopyNext)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+{
+	jintLong *lparg1=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecPolicySearchCopyNext_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jint)SecPolicySearchCopyNext((SecPolicySearchRef)arg0, (SecPolicyRef *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, SecPolicySearchCopyNext_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SecPolicySearchCreate
+JNIEXPORT jint JNICALL OS_NATIVE(SecPolicySearchCreate)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3)
+{
+	jintLong *lparg3=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecPolicySearchCreate_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)SecPolicySearchCreate((CSSM_CERT_TYPE)arg0, (CSSM_OID *)arg1, (CSSM_DATA *)arg2, (SecPolicySearchRef *)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, SecPolicySearchCreate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SecTrustCreateWithCertificates
+JNIEXPORT jint JNICALL OS_NATIVE(SecTrustCreateWithCertificates)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
+{
+	jintLong *lparg2=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SecTrustCreateWithCertificates_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)SecTrustCreateWithCertificates((CFArrayRef)arg0, (CFTypeRef)arg1, (SecTrustRef *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, SecTrustCreateWithCertificates_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SectRgn
 JNIEXPORT void JNICALL OS_NATIVE(SectRgn)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -4319,6 +5400,18 @@ fail:
 }
 #endif
 
+#ifndef NO_UTTypeEqual
+JNIEXPORT jboolean JNICALL OS_NATIVE(UTTypeEqual)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, UTTypeEqual_FUNC);
+	rc = (jboolean)UTTypeEqual((CFStringRef)arg0, (CFStringRef)arg1);
+	OS_NATIVE_EXIT(env, that, UTTypeEqual_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_UnionRgn
 JNIEXPORT void JNICALL OS_NATIVE(UnionRgn)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -4500,15 +5593,137 @@ JNIEXPORT void JNICALL OS_NATIVE(instrumentObjcMessageSends)
 }
 #endif
 
-#ifndef NO_kCFRunLoopCommonModes
-JNIEXPORT jintLong JNICALL OS_NATIVE(kCFRunLoopCommonModes)
-	(JNIEnv *env, jclass that)
+#ifndef NO_kCFAllocatorDefault
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCFAllocatorDefault)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFAllocatorDefault_FUNC);
+	rc = (jintLong)kCFAllocatorDefault;
+	OS_NATIVE_EXIT(env, that, kCFAllocatorDefault_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCFRunLoopCommonModes
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCFRunLoopCommonModes)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFRunLoopCommonModes_FUNC);
+	rc = (jintLong)kCFRunLoopCommonModes;
+	OS_NATIVE_EXIT(env, that, kCFRunLoopCommonModes_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCFTypeDictionaryKeyCallBacks
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCFTypeDictionaryKeyCallBacks)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFTypeDictionaryKeyCallBacks_FUNC);
+	rc = (jintLong)&kCFTypeDictionaryKeyCallBacks;
+	OS_NATIVE_EXIT(env, that, kCFTypeDictionaryKeyCallBacks_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCFTypeDictionaryValueCallBacks
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCFTypeDictionaryValueCallBacks)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
+	rc = (jintLong)&kCFTypeDictionaryValueCallBacks;
+	OS_NATIVE_EXIT(env, that, kCFTypeDictionaryValueCallBacks_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCTFontAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCTFontAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCTFontAttributeName_FUNC);
+	rc = (jintLong)kCTFontAttributeName;
+	OS_NATIVE_EXIT(env, that, kCTFontAttributeName_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCTForegroundColorAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCTForegroundColorAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCTForegroundColorAttributeName_FUNC);
+	rc = (jintLong)kCTForegroundColorAttributeName;
+	OS_NATIVE_EXIT(env, that, kCTForegroundColorAttributeName_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_kCTParagraphStyleAttributeName
+JNIEXPORT jintLong JNICALL OS_NATIVE(kCTParagraphStyleAttributeName)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kCTParagraphStyleAttributeName_FUNC);
+	rc = (jintLong)kCTParagraphStyleAttributeName;
+	OS_NATIVE_EXIT(env, that, kCTParagraphStyleAttributeName_FUNC);
+	return rc;
+}
+#endif
+
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#endif
+{
+	CFRange _arg1, *lparg1=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getCFRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (void *)lparg1, arg2);
+fail:
+	if (arg1 && lparg1) setCFRangeFields(env, arg1, lparg1);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#endif
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, kCFRunLoopCommonModes_FUNC);
-	rc = (jintLong)kCFRunLoopCommonModes;
-	OS_NATIVE_EXIT(env, that, kCFRunLoopCommonModes_FUNC);
-	return rc;
+	CGAffineTransform _arg1, *lparg1=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getCGAffineTransformFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (void *)lparg1, arg2);
+fail:
+	if (arg1 && lparg1) setCGAffineTransformFields(env, arg1, lparg1);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC);
+#endif
 }
 #endif
 
@@ -4612,6 +5827,31 @@ fail:
 }
 #endif
 
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+#endif
+{
+	CTParagraphStyleSetting _arg1, *lparg1=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getCTParagraphStyleSettingFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (void *)lparg1, arg2);
+fail:
+	if (arg1 && lparg1) setCTParagraphStyleSettingFields(env, arg1, lparg1);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
@@ -4737,6 +5977,56 @@ fail:
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+	CFRange _arg0, *lparg0=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+	memmove((void *)lparg0, (void *)arg1, arg2);
+fail:
+	if (arg0 && lparg0) setCFRangeFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+	CGAffineTransform _arg0, *lparg0=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+	memmove((void *)lparg0, (void *)arg1, arg2);
+fail:
+	if (arg0 && lparg0) setCGAffineTransformFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
@@ -4837,6 +6127,31 @@ fail:
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
+#endif
+{
+	CTParagraphStyleSetting _arg0, *lparg0=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
+	memmove((void *)lparg0, (void *)arg1, arg2);
+fail:
+	if (arg0 && lparg0) setCTParagraphStyleSettingFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
@@ -5273,6 +6588,29 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJ)(JNIEnv *env, jclass th
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend__IIIIDI) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJDJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIDI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jdouble arg4, jintLong arg5)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJDJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jdouble arg4, jintLong arg5)
+#endif
+{
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIDI_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJDJ_FUNC);
+#endif
+	rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jdouble, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIDI_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJDJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_objc_1msgSend__IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
@@ -5365,6 +6703,29 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJ)(JNIEnv *env, jclass
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend__IIIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+#endif
+{
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__IIIIIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJJJJJJJ_FUNC);
+#endif
+	rc = (jintLong)((jintLong (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__IIIIIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJJJJJJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_objc_1msgSend__IIIIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJJJJJJJJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7, jintLong arg8)
@@ -6007,28 +7368,31 @@ fail:
 }
 #endif
 
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ) && defined(JNI64))
+#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jbyteArray arg7)
 #else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jbyteArray arg7)
 #endif
 {
 	NSRange _arg2, *lparg2=NULL;
+	jbyte *lparg7=NULL;
 	jintLong rc = 0;
 #ifndef JNI64
-	OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII_FUNC);
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ_FUNC);
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC);
 #endif
 	if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
-	rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6, arg7);
+	if (arg7) if ((lparg7 = (*env)->GetByteArrayElements(env, arg7, NULL)) == NULL) goto fail;
+	rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, jintLong, jintLong, jintLong, jintLong, jbyte *))objc_msgSend)(arg0, arg1, *lparg2, arg3, arg4, arg5, arg6, lparg7);
 fail:
+	if (arg7 && lparg7) (*env)->ReleaseByteArrayElements(env, arg7, lparg7, 0);
 	if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
 #ifndef JNI64
-	OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII_FUNC);
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ_FUNC);
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC);
 #endif
 	return rc;
 }
@@ -6064,31 +7428,34 @@ fail:
 }
 #endif
 
-#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ) && defined(JNI64))
+#if (!defined(NO_objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLong arg5)
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLongArray arg5)
 #else
-JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLong arg5)
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jintLong arg4, jintLongArray arg5)
 #endif
 {
 	NSRange _arg2, *lparg2=NULL;
 	NSRange _arg3, *lparg3=NULL;
+	jintLong *lparg5=NULL;
 	jintLong rc = 0;
 #ifndef JNI64
-	OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC);
 #endif
 	if (arg2) if ((lparg2 = getNSRangeFields(env, arg2, &_arg2)) == NULL) goto fail;
 	if (arg3) if ((lparg3 = getNSRangeFields(env, arg3, &_arg3)) == NULL) goto fail;
-	rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, NSRange, jintLong, jintLong))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, arg5);
+	if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jintLong)((jintLong (*)(jintLong, jintLong, NSRange, NSRange, jintLong, jintLong *))objc_msgSend)(arg0, arg1, *lparg2, *lparg3, arg4, lparg5);
 fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
 	if (arg3 && lparg3) setNSRangeFields(env, arg3, lparg3);
 	if (arg2 && lparg2) setNSRangeFields(env, arg2, lparg2);
 #ifndef JNI64
-	OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC);
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC);
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC);
 #endif
 	return rc;
 }
@@ -6557,6 +7924,33 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJZJ)(JNIEnv *env, jclass th
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jobject arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jobject arg3)
+#endif
+{
+	NSRect _arg3, *lparg3=NULL;
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#endif
+	if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jintLong)((jintLong (*)(jintLong, jintLong, jboolean, NSRect))objc_msgSend)(arg0, arg1, arg2, *lparg3);
+fail:
+	if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_objc_1msgSend__II_3B) && !defined(JNI64)) || (!defined(NO_objc_1msgSend__JJ_3B) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSend__II_3B)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2)
@@ -6994,6 +8388,36 @@ fail:
 }
 #endif
 
+#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3)
+#endif
+{
+	struct objc_super _arg0, *lparg0=NULL;
+	NSPoint _arg3, *lparg3=NULL;
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = getNSPointFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jintLong, NSPoint))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
+fail:
+	if (arg3 && lparg3) setNSPointFields(env, arg3, lparg3);
+	if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jobject arg3, jintLong arg4)
@@ -7228,6 +8652,36 @@ fail:
 }
 #endif
 
+#if (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2, jobject arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jboolean arg2, jobject arg3)
+#endif
+{
+	struct objc_super _arg0, *lparg0=NULL;
+	NSRect _arg3, *lparg3=NULL;
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getobjc_superFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = getNSRectFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jintLong)((jintLong (*)(struct objc_super *, jintLong, jboolean, NSRect))objc_msgSendSuper)(lparg0, arg1, arg2, *lparg3);
+fail:
+	if (arg3 && lparg3) setNSRectFields(env, arg3, lparg3);
+	if (arg0 && lparg0) setobjc_superFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #ifndef NO_objc_1msgSendSuper_1bool
 JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSendSuper_1bool)
 	(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jobject arg2, jintLong arg3)
@@ -7349,6 +8803,38 @@ fail:
 }
 #endif
 
+#if (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jboolean arg3)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ)(JNIEnv *env, jclass that, jobject arg0, jobject arg1, jintLong arg2, jboolean arg3)
+#endif
+{
+	NSSize _arg0, *lparg0=NULL;
+	struct objc_super _arg1, *lparg1=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = getobjc_superFields(env, arg1, &_arg1)) == NULL) goto fail;
+	if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
+		*lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, jboolean))objc_msgSendSuper_stret)(lparg1, arg2, arg3);
+	} else {
+		*lparg0 = (*(NSSize (*)(struct objc_super *, jintLong, jboolean))objc_msgSendSuper)(lparg1, arg2, arg3);
+	}
+fail:
+	if (arg1 && lparg1) setobjc_superFields(env, arg1, lparg1);
+	if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_objc_1msgSend_1bool__II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -7441,6 +8927,29 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJ)(JNIEnv *env, jc
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend_1bool__IIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
+#else
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
+#endif
+{
+	jboolean rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJJJJJ_FUNC);
+#endif
+	rc = (jboolean)((BOOL (*)(jintLong, jintLong, jintLong, jintLong, jintLong, jintLong))objc_msgSend_bool)(arg0, arg1, arg2, arg3, arg4, arg5);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJJJJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_objc_1msgSend_1bool__IIIIIII) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJJJJJJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
@@ -8333,6 +9842,35 @@ fail:
 }
 #endif
 
+#if (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2, jboolean arg3)
+#endif
+{
+	NSSize _arg0, *lparg0=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getNSSizeFields(env, arg0, &_arg0)) == NULL) goto fail;
+	if (sizeof(_arg0) > STRUCT_SIZE_LIMIT) {
+		*lparg0 = (*(NSSize (*)(jintLong, jintLong, jboolean))objc_msgSend_stret)(arg1, arg2, arg3);
+	} else {
+		*lparg0 = (*(NSSize (*)(jintLong, jintLong, jboolean))objc_msgSend)(arg1, arg2, arg3);
+	}
+fail:
+	if (arg0 && lparg0) setNSSizeFields(env, arg0, lparg0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC);
+#endif
+}
+#endif
+
 #ifndef NO_objc_1registerClassPair
 JNIEXPORT void JNICALL OS_NATIVE(objc_1registerClassPair)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -8456,6 +9994,18 @@ fail:
 }
 #endif
 
+#ifndef NO_sel_1getName
+JNIEXPORT jintLong JNICALL OS_NATIVE(sel_1getName)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, sel_1getName_FUNC);
+	rc = (jintLong)sel_getName((SEL)arg0);
+	OS_NATIVE_EXIT(env, that, sel_1getName_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_sel_1registerName
 JNIEXPORT jintLong JNICALL OS_NATIVE(sel_1registerName)
 	(JNIEnv *env, jclass that, jstring arg0)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h
index 438ecf6..b3b3770 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,9 @@
 #include <WebKit/WebView.h>
 #import <objc/objc-runtime.h>
 
+#include <JavaScriptCore/JSBase.h>
+#include <JavaScriptCore/JSStringRef.h>
+
 #include "os_custom.h"
 
 extern jint CPSSetProcessName(void *, jintLong);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c
index a23d49c..a51b7fd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,15 @@
 
 #define OS_NATIVE(func) Java_org_eclipse_swt_internal_cocoa_OS_##func
 
+#define LOAD_CFSTR(var, name) \
+		static int initialized = 0; \
+		static CFStringRef *var = NULL; \
+		if (!initialized) { \
+			CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR(name##_LIB)); \
+			if (bundle) var = CFBundleGetDataPointerForName(bundle, CFSTR(#name)); \
+			initialized = 1; \
+		} 
+
 #ifndef NO_JNIGetObject
 JNIEXPORT jobject JNICALL OS_NATIVE(JNIGetObject)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -106,16 +115,99 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(isFlipped_1CALLBACK)
 JNIEXPORT jintLong JNICALL OS_NATIVE(kTISPropertyUnicodeKeyLayoutData)
 (JNIEnv *env, jclass that)
 {
-	// Technically this CFStringRef should be CFRetain'ed but we have no opportunity to release it.
-	// The pointer won't disappear unless the Carbon framework bundle is somehow unloaded, which is unlikely to happen.
-	static int initialized = 0;
-	static CFStringRef *var = NULL;
-	if (!initialized) {
-		CFBundleRef bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Carbon"));
-		if (bundle) var = (CFStringRef *)CFBundleGetDataPointerForName(bundle, CFSTR("kTISPropertyUnicodeKeyLayoutData"));
-		initialized = 1;
-	} 
-	
-	return (jintLong)(*var);
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, kTISPropertyUnicodeKeyLayoutData_FUNC);
+/*
+	rc = (jintLong) kTISPropertyUnicodeKeyLayoutData;
+*/
+	{
+		LOAD_CFSTR(data, kTISPropertyUnicodeKeyLayoutData)
+		if (data) {
+			rc = (jintLong)(*data);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, kTISPropertyUnicodeKeyLayoutData_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityCellRole
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityCellRole)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityCellRole_FUNC);
+/*
+	rc = (jintLong)NSAccessibilityCellRole;
+*/
+	{
+		LOAD_CFSTR(data, NSAccessibilityCellRole)
+		if (data) {
+			rc = (jintLong)(*data);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, NSAccessibilityCellRole_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityColumnIndexRangeAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityColumnIndexRangeAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
+/*
+	rc = (jintLong)NSAccessibilityColumnIndexRangeAttribute;
+*/
+	{
+		LOAD_CFSTR(data, NSAccessibilityColumnIndexRangeAttribute)
+		if (data) {
+			rc = (jintLong)(*data);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, NSAccessibilityColumnIndexRangeAttribute_FUNC);
+	return rc;
 }
 #endif
+
+#ifndef NO_NSAccessibilityCellForColumnAndRowParameterizedAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityCellForColumnAndRowParameterizedAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
+/*
+	rc = (jintLong)NSAccessibilityCellForColumnAndRowParameterizedAttribute;
+*/
+	{
+		LOAD_CFSTR(data, NSAccessibilityCellForColumnAndRowParameterizedAttribute)
+		if (data) {
+			rc = (jintLong)(*data);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_NSAccessibilityRowIndexRangeAttribute
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSAccessibilityRowIndexRangeAttribute)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
+/*
+	rc = (jintLong)NSAccessibilityRowIndexRangeAttribute;
+*/
+	{
+		LOAD_CFSTR(data, NSAccessibilityRowIndexRangeAttribute)
+		if (data) {
+			rc = (jintLong)(*data);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, NSAccessibilityRowIndexRangeAttribute_FUNC);
+	return rc;
+}
+#endif
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.h
index b6feb46..2ebf369 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,3 +47,8 @@
 #define CancelMenuTracking_LIB "com.apple.Carbon"
 #define SetSystemUIMode_LIB "com.apple.Carbon"
 #define GetSystemUIMode_LIB "com.apple.Carbon"
+#define kTISPropertyUnicodeKeyLayoutData_LIB "com.apple.Carbon"
+#define NSAccessibilityCellForColumnAndRowParameterizedAttribute_LIB "com.apple.Cocoa"
+#define NSAccessibilityCellRole_LIB "com.apple.Cocoa"
+#define NSAccessibilityColumnIndexRangeAttribute_LIB "com.apple.Cocoa"
+#define NSAccessibilityRowIndexRangeAttribute_LIB "com.apple.Cocoa"
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
index 01cbc92..85eddf1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,22 +14,27 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 482;
-int OS_nativeFunctionCallCount[482];
+int OS_nativeFunctionCount = 588;
+int OS_nativeFunctionCallCount[588];
 char * OS_nativeFunctionNames[] = {
 	"ATSFontActivateFromFileReference",
 	"AcquireRootMenu",
+	"CALLBACK_1NSTextAttachmentCell_1cellSize",
 	"CALLBACK_1accessibilityHitTest_1",
 	"CALLBACK_1attributedSubstringFromRange_1",
 	"CALLBACK_1canDragRowsWithIndexes_1atPoint_1",
+	"CALLBACK_1cellBaselineOffset",
 	"CALLBACK_1cellSize",
 	"CALLBACK_1characterIndexForPoint_1",
 	"CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1",
 	"CALLBACK_1draggedImage_1beganAt_1",
 	"CALLBACK_1draggedImage_1endedAt_1operation_1",
+	"CALLBACK_1drawBackgroundInClipRect_1",
 	"CALLBACK_1drawImage_1withFrame_1inView_1",
 	"CALLBACK_1drawInteriorWithFrame_1inView_1",
+	"CALLBACK_1drawLabel_1inRect_1",
 	"CALLBACK_1drawRect_1",
+	"CALLBACK_1drawViewBackgroundInRect_1",
 	"CALLBACK_1drawWithExpansionFrame_1inView_1",
 	"CALLBACK_1expansionFrameWithFrame_1inView_1",
 	"CALLBACK_1firstRectForCharacterRange_1",
@@ -38,6 +43,7 @@ char * OS_nativeFunctionNames[] = {
 	"CALLBACK_1hitTest_1",
 	"CALLBACK_1imageRectForBounds_1",
 	"CALLBACK_1markedRange",
+	"CALLBACK_1scrollClipView_1toPoint_1",
 	"CALLBACK_1selectedRange",
 	"CALLBACK_1setFrameOrigin_1",
 	"CALLBACK_1setFrameSize_1",
@@ -45,21 +51,33 @@ char * OS_nativeFunctionNames[] = {
 	"CALLBACK_1setMarkedText_1selectedRange_1",
 	"CALLBACK_1setNeedsDisplayInRect_1",
 	"CALLBACK_1shouldChangeTextInRange_1replacementString_1",
+	"CALLBACK_1sizeOfLabel_1",
 	"CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1",
 	"CALLBACK_1titleRectForBounds_1",
 	"CALLBACK_1view_1stringForToolTip_1point_1userData_1",
 	"CALLBACK_1webView_1setFrame_1",
+	"CFAttributedStringCreate",
 	"CFDataGetBytePtr",
 	"CFDataGetLength",
+	"CFDictionaryAddValue",
+	"CFDictionaryCreateMutable",
+	"CFRange_1sizeof",
 	"CFRelease",
 	"CFRunLoopAddObserver",
 	"CFRunLoopGetCurrent",
 	"CFRunLoopObserverCreate",
 	"CFRunLoopObserverInvalidate",
+	"CFRunLoopRunInMode",
+	"CFRunLoopStop",
+	"CFStringCreateWithCharacters",
+	"CFURLCreateFromFSRef",
 	"CFURLCreateStringByAddingPercentEscapes",
+	"CGAffineTransform_1sizeof",
 	"CGBitmapContextCreate",
 	"CGBitmapContextCreateImage",
 	"CGBitmapContextGetData",
+	"CGColorCreate",
+	"CGColorRelease",
 	"CGColorSpaceCreateDeviceRGB",
 	"CGColorSpaceRelease",
 	"CGContextAddPath",
@@ -80,6 +98,10 @@ char * OS_nativeFunctionNames[] = {
 	"CGContextSetLineJoin",
 	"CGContextSetLineWidth",
 	"CGContextSetMiterLimit",
+	"CGContextSetShouldAntialias",
+	"CGContextSetTextDrawingMode",
+	"CGContextSetTextMatrix",
+	"CGContextSetTextPosition",
 	"CGContextStrokePath",
 	"CGContextTranslateCTM",
 	"CGDataProviderCreateWithData",
@@ -103,6 +125,7 @@ char * OS_nativeFunctionNames[] = {
 	"CGImageRelease",
 	"CGPathAddCurveToPoint",
 	"CGPathAddLineToPoint",
+	"CGPathAddRect",
 	"CGPathApply",
 	"CGPathCloseSubpath",
 	"CGPathCreateCopy",
@@ -120,6 +143,17 @@ char * OS_nativeFunctionNames[] = {
 	"CGSize_1sizeof",
 	"CGWarpMouseCursorPosition",
 	"CPSSetProcessName",
+	"CTFontGetAscent",
+	"CTFontGetDescent",
+	"CTFontGetLeading",
+	"CTLineCreateWithAttributedString",
+	"CTLineDraw",
+	"CTLineGetTypographicBounds",
+	"CTParagraphStyleCreate",
+	"CTParagraphStyleSetting_1sizeof",
+	"CTTypesetterCreateLine",
+	"CTTypesetterCreateWithAttributedString",
+	"CTTypesetterSuggestLineBreak",
 	"CancelMenuTracking",
 	"CloseRgn",
 	"CopyRgn",
@@ -137,14 +171,26 @@ char * OS_nativeFunctionNames[] = {
 	"GetThemeMetric",
 	"HIThemeDrawFocusRect",
 	"JNIGetObject",
+	"JSEvaluateScript",
+	"JSStringCreateWithUTF8CString",
+	"JSStringRelease",
 	"LMGetKbdType",
+	"LSGetApplicationForInfo",
 	"LineTo",
 	"MoveTo",
 	"NSAccessibilityActionDescription",
+	"NSAccessibilityAttributedStringForRangeParameterizedAttribute",
+	"NSAccessibilityBackgroundColorTextAttribute",
+	"NSAccessibilityBoundsForRangeParameterizedAttribute",
 	"NSAccessibilityButtonRole",
+	"NSAccessibilityCellForColumnAndRowParameterizedAttribute",
+	"NSAccessibilityCellRole",
 	"NSAccessibilityCheckBoxRole",
 	"NSAccessibilityChildrenAttribute",
+	"NSAccessibilityColorWellRole",
+	"NSAccessibilityColumnIndexRangeAttribute",
 	"NSAccessibilityColumnRole",
+	"NSAccessibilityColumnsAttribute",
 	"NSAccessibilityComboBoxRole",
 	"NSAccessibilityConfirmAction",
 	"NSAccessibilityContentsAttribute",
@@ -155,19 +201,28 @@ char * OS_nativeFunctionNames[] = {
 	"NSAccessibilityFloatingWindowSubrole",
 	"NSAccessibilityFocusedAttribute",
 	"NSAccessibilityFocusedUIElementChangedNotification",
+	"NSAccessibilityFocusedWindowChangedNotification",
+	"NSAccessibilityFontFamilyKey",
+	"NSAccessibilityFontNameKey",
+	"NSAccessibilityFontSizeKey",
+	"NSAccessibilityFontTextAttribute",
+	"NSAccessibilityForegroundColorTextAttribute",
 	"NSAccessibilityGridRole",
 	"NSAccessibilityGroupRole",
+	"NSAccessibilityHeaderAttribute",
 	"NSAccessibilityHelpAttribute",
 	"NSAccessibilityHelpTagRole",
 	"NSAccessibilityHorizontalOrientationValue",
 	"NSAccessibilityHorizontalScrollBarAttribute",
 	"NSAccessibilityImageRole",
 	"NSAccessibilityIncrementorRole",
+	"NSAccessibilityIndexAttribute",
 	"NSAccessibilityInsertionPointLineNumberAttribute",
 	"NSAccessibilityLabelValueAttribute",
 	"NSAccessibilityLineForIndexParameterizedAttribute",
 	"NSAccessibilityLinkRole",
 	"NSAccessibilityLinkTextAttribute",
+	"NSAccessibilityLinkedUIElementsAttribute",
 	"NSAccessibilityListRole",
 	"NSAccessibilityMaxValueAttribute",
 	"NSAccessibilityMenuBarRole",
@@ -175,6 +230,8 @@ char * OS_nativeFunctionNames[] = {
 	"NSAccessibilityMenuItemRole",
 	"NSAccessibilityMenuRole",
 	"NSAccessibilityMinValueAttribute",
+	"NSAccessibilityMisspelledTextAttribute",
+	"NSAccessibilityMovedNotification",
 	"NSAccessibilityNextContentsAttribute",
 	"NSAccessibilityNumberOfCharactersAttribute",
 	"NSAccessibilityOrientationAttribute",
@@ -194,30 +251,41 @@ char * OS_nativeFunctionNames[] = {
 	"NSAccessibilityRangeForIndexParameterizedAttribute",
 	"NSAccessibilityRangeForLineParameterizedAttribute",
 	"NSAccessibilityRangeForPositionParameterizedAttribute",
+	"NSAccessibilityResizedNotification",
 	"NSAccessibilityRoleAttribute",
 	"NSAccessibilityRoleDescription",
 	"NSAccessibilityRoleDescriptionAttribute",
 	"NSAccessibilityRoleDescriptionForUIElement",
+	"NSAccessibilityRowCountChangedNotification",
+	"NSAccessibilityRowIndexRangeAttribute",
 	"NSAccessibilityRowRole",
+	"NSAccessibilityRowsAttribute",
 	"NSAccessibilityScrollAreaRole",
 	"NSAccessibilityScrollBarRole",
 	"NSAccessibilitySelectedAttribute",
 	"NSAccessibilitySelectedChildrenAttribute",
 	"NSAccessibilitySelectedChildrenChangedNotification",
+	"NSAccessibilitySelectedColumnsAttribute",
+	"NSAccessibilitySelectedRowsAttribute",
+	"NSAccessibilitySelectedRowsChangedNotification",
 	"NSAccessibilitySelectedTextAttribute",
 	"NSAccessibilitySelectedTextChangedNotification",
 	"NSAccessibilitySelectedTextRangeAttribute",
 	"NSAccessibilitySelectedTextRangesAttribute",
 	"NSAccessibilityServesAsTitleForUIElementsAttribute",
+	"NSAccessibilityShowMenuAction",
 	"NSAccessibilitySizeAttribute",
 	"NSAccessibilitySliderRole",
 	"NSAccessibilitySortButtonRole",
 	"NSAccessibilitySplitterRole",
 	"NSAccessibilityStandardWindowSubrole",
 	"NSAccessibilityStaticTextRole",
+	"NSAccessibilityStrikethroughColorTextAttribute",
+	"NSAccessibilityStrikethroughTextAttribute",
 	"NSAccessibilityStringForRangeParameterizedAttribute",
 	"NSAccessibilityStyleRangeForIndexParameterizedAttribute",
 	"NSAccessibilitySubroleAttribute",
+	"NSAccessibilitySuperscriptTextAttribute",
 	"NSAccessibilitySystemDialogSubrole",
 	"NSAccessibilityTabGroupRole",
 	"NSAccessibilityTableRole",
@@ -227,9 +295,13 @@ char * OS_nativeFunctionNames[] = {
 	"NSAccessibilityTextFieldRole",
 	"NSAccessibilityTextLinkSubrole",
 	"NSAccessibilityTitleAttribute",
+	"NSAccessibilityTitleChangedNotification",
 	"NSAccessibilityTitleUIElementAttribute",
 	"NSAccessibilityToolbarRole",
 	"NSAccessibilityTopLevelUIElementAttribute",
+	"NSAccessibilityURLAttribute",
+	"NSAccessibilityUnderlineColorTextAttribute",
+	"NSAccessibilityUnderlineTextAttribute",
 	"NSAccessibilityUnignoredAncestor",
 	"NSAccessibilityUnignoredChildren",
 	"NSAccessibilityUnignoredChildrenForOnlyChild",
@@ -244,16 +316,21 @@ char * OS_nativeFunctionNames[] = {
 	"NSAccessibilityVerticalScrollBarAttribute",
 	"NSAccessibilityVisibleCharacterRangeAttribute",
 	"NSAccessibilityVisibleChildrenAttribute",
+	"NSAccessibilityVisibleColumnsAttribute",
+	"NSAccessibilityVisibleNameKey",
+	"NSAccessibilityVisibleRowsAttribute",
 	"NSAccessibilityWindowAttribute",
 	"NSAccessibilityWindowRole",
 	"NSAffineTransformStruct_1sizeof",
 	"NSApplicationDidChangeScreenParametersNotification",
+	"NSAttachmentAttributeName",
 	"NSBackgroundColorAttributeName",
 	"NSBaselineOffsetAttributeName",
 	"NSBeep",
 	"NSBitsPerPixelFromDepth",
 	"NSCalibratedRGBColorSpace",
 	"NSCopyBits",
+	"NSCursorAttributeName",
 	"NSDefaultRunLoopMode",
 	"NSDeviceRGBColorSpace",
 	"NSDeviceResolution",
@@ -269,8 +346,10 @@ char * OS_nativeFunctionNames[] = {
 	"NSHTMLPboardType",
 	"NSIntersectionRect",
 	"NSLinkAttributeName",
+	"NSModalPanelRunLoopMode",
 	"NSNumberOfColorComponents",
 	"NSObliquenessAttributeName",
+	"NSOutlineViewColumnDidMoveNotification",
 	"NSParagraphStyleAttributeName",
 	"NSPointInRect",
 	"NSPoint_1sizeof",
@@ -290,12 +369,14 @@ char * OS_nativeFunctionNames[] = {
 	"NSRect_1sizeof",
 	"NSSearchPathForDirectoriesInDomains",
 	"NSSize_1sizeof",
+	"NSSpellingStateAttributeName",
 	"NSStrikethroughColorAttributeName",
 	"NSStrikethroughStyleAttributeName",
 	"NSStringPboardType",
 	"NSStrokeWidthAttributeName",
 	"NSSystemColorsDidChangeNotification",
 	"NSTIFFPboardType",
+	"NSTableViewColumnDidMoveNotification",
 	"NSTemporaryDirectory",
 	"NSToolbarCustomizeToolbarItemIdentifier",
 	"NSToolbarDidRemoveItemNotification",
@@ -318,6 +399,9 @@ char * OS_nativeFunctionNames[] = {
 	"QDRegionToRects",
 	"RectInRgn",
 	"RectRgn",
+	"SecPolicySearchCopyNext",
+	"SecPolicySearchCreate",
+	"SecTrustCreateWithCertificates",
 	"SectRgn",
 	"SetFrontProcess",
 	"SetRect",
@@ -327,6 +411,7 @@ char * OS_nativeFunctionNames[] = {
 	"TISGetInputSourceProperty",
 	"TransformProcessType",
 	"UCKeyTranslate",
+	"UTTypeEqual",
 	"UnionRgn",
 	"_1_1BIG_1ENDIAN_1_1",
 	"call",
@@ -342,9 +427,25 @@ char * OS_nativeFunctionNames[] = {
 	"getpid",
 	"instrumentObjcMessageSends",
 	"isFlipped_1CALLBACK",
+	"kCFAllocatorDefault",
 	"kCFRunLoopCommonModes",
+	"kCFTypeDictionaryKeyCallBacks",
+	"kCFTypeDictionaryValueCallBacks",
+	"kCTFontAttributeName",
+	"kCTForegroundColorAttributeName",
+	"kCTParagraphStyleAttributeName",
 	"kTISPropertyUnicodeKeyLayoutData",
 #ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J",
+#endif
+#ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J",
+#endif
+#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I",
 #else
 	"memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J",
@@ -365,6 +466,11 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J",
 #endif
 #ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J",
+#endif
+#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I",
 #else
 	"memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J",
@@ -390,6 +496,16 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ",
+#endif
+#ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II",
 #else
 	"memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ",
@@ -410,6 +526,11 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II",
 #else
 	"memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ",
@@ -487,6 +608,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend__JJJJ",
 #endif
 #ifndef JNI64
+	"objc_1msgSend__IIIIDI",
+#else
+	"objc_1msgSend__JJJJDJ",
+#endif
+#ifndef JNI64
 	"objc_1msgSend__IIIII",
 #else
 	"objc_1msgSend__JJJJJ",
@@ -507,6 +633,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend__JJJJJJJ",
 #endif
 #ifndef JNI64
+	"objc_1msgSend__IIIIIIII",
+#else
+	"objc_1msgSend__JJJJJJJJ",
+#endif
+#ifndef JNI64
 	"objc_1msgSend__IIIIIIIII",
 #else
 	"objc_1msgSend__JJJJJJJJJ",
@@ -627,9 +758,9 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J",
 #endif
 #ifndef JNI64
-	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII",
+	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B",
 #else
-	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ",
+	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B",
 #endif
 #ifndef JNI64
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
@@ -637,9 +768,9 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2",
 #endif
 #ifndef JNI64
-	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II",
+	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I",
 #else
-	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ",
+	"objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J",
 #endif
 #ifndef JNI64
 	"objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2",
@@ -727,6 +858,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend__JJZJ",
 #endif
 #ifndef JNI64
+	"objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2",
+#else
+	"objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2",
+#endif
+#ifndef JNI64
 	"objc_1msgSend__II_3B",
 #else
 	"objc_1msgSend__JJ_3B",
@@ -801,6 +937,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ",
 #endif
 #ifndef JNI64
+	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2",
+#else
+	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2",
+#endif
+#ifndef JNI64
 	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I",
 #else
 	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J",
@@ -840,6 +981,11 @@ char * OS_nativeFunctionNames[] = {
 #else
 	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ",
 #endif
+#ifndef JNI64
+	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2",
+#else
+	"objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2",
+#endif
 	"objc_1msgSendSuper_1bool",
 #ifndef JNI64
 	"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2",
@@ -857,6 +1003,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J",
 #endif
 #ifndef JNI64
+	"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ",
+#else
+	"objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ",
+#endif
+#ifndef JNI64
 	"objc_1msgSend_1bool__II",
 #else
 	"objc_1msgSend_1bool__JJ",
@@ -877,6 +1028,11 @@ char * OS_nativeFunctionNames[] = {
 	"objc_1msgSend_1bool__JJJJJ",
 #endif
 #ifndef JNI64
+	"objc_1msgSend_1bool__IIIIII",
+#else
+	"objc_1msgSend_1bool__JJJJJJ",
+#endif
+#ifndef JNI64
 	"objc_1msgSend_1bool__IIIIIII",
 #else
 	"objc_1msgSend_1bool__JJJJJJJ",
@@ -1031,6 +1187,11 @@ char * OS_nativeFunctionNames[] = {
 #else
 	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ",
 #endif
+#ifndef JNI64
+	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ",
+#else
+	"objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ",
+#endif
 	"objc_1registerClassPair",
 	"objc_1super_1sizeof",
 	"object_1getClass",
@@ -1038,6 +1199,7 @@ char * OS_nativeFunctionNames[] = {
 	"object_1getInstanceVariable",
 	"object_1setClass",
 	"object_1setInstanceVariable",
+	"sel_1getName",
 	"sel_1registerName",
 };
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
index 5912fae..abc2f51 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,17 +27,22 @@ extern char* OS_nativeFunctionNames[];
 typedef enum {
 	ATSFontActivateFromFileReference_FUNC,
 	AcquireRootMenu_FUNC,
+	CALLBACK_1NSTextAttachmentCell_1cellSize_FUNC,
 	CALLBACK_1accessibilityHitTest_1_FUNC,
 	CALLBACK_1attributedSubstringFromRange_1_FUNC,
 	CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC,
+	CALLBACK_1cellBaselineOffset_FUNC,
 	CALLBACK_1cellSize_FUNC,
 	CALLBACK_1characterIndexForPoint_1_FUNC,
 	CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC,
 	CALLBACK_1draggedImage_1beganAt_1_FUNC,
 	CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC,
+	CALLBACK_1drawBackgroundInClipRect_1_FUNC,
 	CALLBACK_1drawImage_1withFrame_1inView_1_FUNC,
 	CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC,
+	CALLBACK_1drawLabel_1inRect_1_FUNC,
 	CALLBACK_1drawRect_1_FUNC,
+	CALLBACK_1drawViewBackgroundInRect_1_FUNC,
 	CALLBACK_1drawWithExpansionFrame_1inView_1_FUNC,
 	CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC,
 	CALLBACK_1firstRectForCharacterRange_1_FUNC,
@@ -46,6 +51,7 @@ typedef enum {
 	CALLBACK_1hitTest_1_FUNC,
 	CALLBACK_1imageRectForBounds_1_FUNC,
 	CALLBACK_1markedRange_FUNC,
+	CALLBACK_1scrollClipView_1toPoint_1_FUNC,
 	CALLBACK_1selectedRange_FUNC,
 	CALLBACK_1setFrameOrigin_1_FUNC,
 	CALLBACK_1setFrameSize_1_FUNC,
@@ -53,21 +59,33 @@ typedef enum {
 	CALLBACK_1setMarkedText_1selectedRange_1_FUNC,
 	CALLBACK_1setNeedsDisplayInRect_1_FUNC,
 	CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC,
+	CALLBACK_1sizeOfLabel_1_FUNC,
 	CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC,
 	CALLBACK_1titleRectForBounds_1_FUNC,
 	CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC,
 	CALLBACK_1webView_1setFrame_1_FUNC,
+	CFAttributedStringCreate_FUNC,
 	CFDataGetBytePtr_FUNC,
 	CFDataGetLength_FUNC,
+	CFDictionaryAddValue_FUNC,
+	CFDictionaryCreateMutable_FUNC,
+	CFRange_1sizeof_FUNC,
 	CFRelease_FUNC,
 	CFRunLoopAddObserver_FUNC,
 	CFRunLoopGetCurrent_FUNC,
 	CFRunLoopObserverCreate_FUNC,
 	CFRunLoopObserverInvalidate_FUNC,
+	CFRunLoopRunInMode_FUNC,
+	CFRunLoopStop_FUNC,
+	CFStringCreateWithCharacters_FUNC,
+	CFURLCreateFromFSRef_FUNC,
 	CFURLCreateStringByAddingPercentEscapes_FUNC,
+	CGAffineTransform_1sizeof_FUNC,
 	CGBitmapContextCreate_FUNC,
 	CGBitmapContextCreateImage_FUNC,
 	CGBitmapContextGetData_FUNC,
+	CGColorCreate_FUNC,
+	CGColorRelease_FUNC,
 	CGColorSpaceCreateDeviceRGB_FUNC,
 	CGColorSpaceRelease_FUNC,
 	CGContextAddPath_FUNC,
@@ -88,6 +106,10 @@ typedef enum {
 	CGContextSetLineJoin_FUNC,
 	CGContextSetLineWidth_FUNC,
 	CGContextSetMiterLimit_FUNC,
+	CGContextSetShouldAntialias_FUNC,
+	CGContextSetTextDrawingMode_FUNC,
+	CGContextSetTextMatrix_FUNC,
+	CGContextSetTextPosition_FUNC,
 	CGContextStrokePath_FUNC,
 	CGContextTranslateCTM_FUNC,
 	CGDataProviderCreateWithData_FUNC,
@@ -111,6 +133,7 @@ typedef enum {
 	CGImageRelease_FUNC,
 	CGPathAddCurveToPoint_FUNC,
 	CGPathAddLineToPoint_FUNC,
+	CGPathAddRect_FUNC,
 	CGPathApply_FUNC,
 	CGPathCloseSubpath_FUNC,
 	CGPathCreateCopy_FUNC,
@@ -128,6 +151,17 @@ typedef enum {
 	CGSize_1sizeof_FUNC,
 	CGWarpMouseCursorPosition_FUNC,
 	CPSSetProcessName_FUNC,
+	CTFontGetAscent_FUNC,
+	CTFontGetDescent_FUNC,
+	CTFontGetLeading_FUNC,
+	CTLineCreateWithAttributedString_FUNC,
+	CTLineDraw_FUNC,
+	CTLineGetTypographicBounds_FUNC,
+	CTParagraphStyleCreate_FUNC,
+	CTParagraphStyleSetting_1sizeof_FUNC,
+	CTTypesetterCreateLine_FUNC,
+	CTTypesetterCreateWithAttributedString_FUNC,
+	CTTypesetterSuggestLineBreak_FUNC,
 	CancelMenuTracking_FUNC,
 	CloseRgn_FUNC,
 	CopyRgn_FUNC,
@@ -145,14 +179,26 @@ typedef enum {
 	GetThemeMetric_FUNC,
 	HIThemeDrawFocusRect_FUNC,
 	JNIGetObject_FUNC,
+	JSEvaluateScript_FUNC,
+	JSStringCreateWithUTF8CString_FUNC,
+	JSStringRelease_FUNC,
 	LMGetKbdType_FUNC,
+	LSGetApplicationForInfo_FUNC,
 	LineTo_FUNC,
 	MoveTo_FUNC,
 	NSAccessibilityActionDescription_FUNC,
+	NSAccessibilityAttributedStringForRangeParameterizedAttribute_FUNC,
+	NSAccessibilityBackgroundColorTextAttribute_FUNC,
+	NSAccessibilityBoundsForRangeParameterizedAttribute_FUNC,
 	NSAccessibilityButtonRole_FUNC,
+	NSAccessibilityCellForColumnAndRowParameterizedAttribute_FUNC,
+	NSAccessibilityCellRole_FUNC,
 	NSAccessibilityCheckBoxRole_FUNC,
 	NSAccessibilityChildrenAttribute_FUNC,
+	NSAccessibilityColorWellRole_FUNC,
+	NSAccessibilityColumnIndexRangeAttribute_FUNC,
 	NSAccessibilityColumnRole_FUNC,
+	NSAccessibilityColumnsAttribute_FUNC,
 	NSAccessibilityComboBoxRole_FUNC,
 	NSAccessibilityConfirmAction_FUNC,
 	NSAccessibilityContentsAttribute_FUNC,
@@ -163,19 +209,28 @@ typedef enum {
 	NSAccessibilityFloatingWindowSubrole_FUNC,
 	NSAccessibilityFocusedAttribute_FUNC,
 	NSAccessibilityFocusedUIElementChangedNotification_FUNC,
+	NSAccessibilityFocusedWindowChangedNotification_FUNC,
+	NSAccessibilityFontFamilyKey_FUNC,
+	NSAccessibilityFontNameKey_FUNC,
+	NSAccessibilityFontSizeKey_FUNC,
+	NSAccessibilityFontTextAttribute_FUNC,
+	NSAccessibilityForegroundColorTextAttribute_FUNC,
 	NSAccessibilityGridRole_FUNC,
 	NSAccessibilityGroupRole_FUNC,
+	NSAccessibilityHeaderAttribute_FUNC,
 	NSAccessibilityHelpAttribute_FUNC,
 	NSAccessibilityHelpTagRole_FUNC,
 	NSAccessibilityHorizontalOrientationValue_FUNC,
 	NSAccessibilityHorizontalScrollBarAttribute_FUNC,
 	NSAccessibilityImageRole_FUNC,
 	NSAccessibilityIncrementorRole_FUNC,
+	NSAccessibilityIndexAttribute_FUNC,
 	NSAccessibilityInsertionPointLineNumberAttribute_FUNC,
 	NSAccessibilityLabelValueAttribute_FUNC,
 	NSAccessibilityLineForIndexParameterizedAttribute_FUNC,
 	NSAccessibilityLinkRole_FUNC,
 	NSAccessibilityLinkTextAttribute_FUNC,
+	NSAccessibilityLinkedUIElementsAttribute_FUNC,
 	NSAccessibilityListRole_FUNC,
 	NSAccessibilityMaxValueAttribute_FUNC,
 	NSAccessibilityMenuBarRole_FUNC,
@@ -183,6 +238,8 @@ typedef enum {
 	NSAccessibilityMenuItemRole_FUNC,
 	NSAccessibilityMenuRole_FUNC,
 	NSAccessibilityMinValueAttribute_FUNC,
+	NSAccessibilityMisspelledTextAttribute_FUNC,
+	NSAccessibilityMovedNotification_FUNC,
 	NSAccessibilityNextContentsAttribute_FUNC,
 	NSAccessibilityNumberOfCharactersAttribute_FUNC,
 	NSAccessibilityOrientationAttribute_FUNC,
@@ -202,30 +259,41 @@ typedef enum {
 	NSAccessibilityRangeForIndexParameterizedAttribute_FUNC,
 	NSAccessibilityRangeForLineParameterizedAttribute_FUNC,
 	NSAccessibilityRangeForPositionParameterizedAttribute_FUNC,
+	NSAccessibilityResizedNotification_FUNC,
 	NSAccessibilityRoleAttribute_FUNC,
 	NSAccessibilityRoleDescription_FUNC,
 	NSAccessibilityRoleDescriptionAttribute_FUNC,
 	NSAccessibilityRoleDescriptionForUIElement_FUNC,
+	NSAccessibilityRowCountChangedNotification_FUNC,
+	NSAccessibilityRowIndexRangeAttribute_FUNC,
 	NSAccessibilityRowRole_FUNC,
+	NSAccessibilityRowsAttribute_FUNC,
 	NSAccessibilityScrollAreaRole_FUNC,
 	NSAccessibilityScrollBarRole_FUNC,
 	NSAccessibilitySelectedAttribute_FUNC,
 	NSAccessibilitySelectedChildrenAttribute_FUNC,
 	NSAccessibilitySelectedChildrenChangedNotification_FUNC,
+	NSAccessibilitySelectedColumnsAttribute_FUNC,
+	NSAccessibilitySelectedRowsAttribute_FUNC,
+	NSAccessibilitySelectedRowsChangedNotification_FUNC,
 	NSAccessibilitySelectedTextAttribute_FUNC,
 	NSAccessibilitySelectedTextChangedNotification_FUNC,
 	NSAccessibilitySelectedTextRangeAttribute_FUNC,
 	NSAccessibilitySelectedTextRangesAttribute_FUNC,
 	NSAccessibilityServesAsTitleForUIElementsAttribute_FUNC,
+	NSAccessibilityShowMenuAction_FUNC,
 	NSAccessibilitySizeAttribute_FUNC,
 	NSAccessibilitySliderRole_FUNC,
 	NSAccessibilitySortButtonRole_FUNC,
 	NSAccessibilitySplitterRole_FUNC,
 	NSAccessibilityStandardWindowSubrole_FUNC,
 	NSAccessibilityStaticTextRole_FUNC,
+	NSAccessibilityStrikethroughColorTextAttribute_FUNC,
+	NSAccessibilityStrikethroughTextAttribute_FUNC,
 	NSAccessibilityStringForRangeParameterizedAttribute_FUNC,
 	NSAccessibilityStyleRangeForIndexParameterizedAttribute_FUNC,
 	NSAccessibilitySubroleAttribute_FUNC,
+	NSAccessibilitySuperscriptTextAttribute_FUNC,
 	NSAccessibilitySystemDialogSubrole_FUNC,
 	NSAccessibilityTabGroupRole_FUNC,
 	NSAccessibilityTableRole_FUNC,
@@ -235,9 +303,13 @@ typedef enum {
 	NSAccessibilityTextFieldRole_FUNC,
 	NSAccessibilityTextLinkSubrole_FUNC,
 	NSAccessibilityTitleAttribute_FUNC,
+	NSAccessibilityTitleChangedNotification_FUNC,
 	NSAccessibilityTitleUIElementAttribute_FUNC,
 	NSAccessibilityToolbarRole_FUNC,
 	NSAccessibilityTopLevelUIElementAttribute_FUNC,
+	NSAccessibilityURLAttribute_FUNC,
+	NSAccessibilityUnderlineColorTextAttribute_FUNC,
+	NSAccessibilityUnderlineTextAttribute_FUNC,
 	NSAccessibilityUnignoredAncestor_FUNC,
 	NSAccessibilityUnignoredChildren_FUNC,
 	NSAccessibilityUnignoredChildrenForOnlyChild_FUNC,
@@ -252,16 +324,21 @@ typedef enum {
 	NSAccessibilityVerticalScrollBarAttribute_FUNC,
 	NSAccessibilityVisibleCharacterRangeAttribute_FUNC,
 	NSAccessibilityVisibleChildrenAttribute_FUNC,
+	NSAccessibilityVisibleColumnsAttribute_FUNC,
+	NSAccessibilityVisibleNameKey_FUNC,
+	NSAccessibilityVisibleRowsAttribute_FUNC,
 	NSAccessibilityWindowAttribute_FUNC,
 	NSAccessibilityWindowRole_FUNC,
 	NSAffineTransformStruct_1sizeof_FUNC,
 	NSApplicationDidChangeScreenParametersNotification_FUNC,
+	NSAttachmentAttributeName_FUNC,
 	NSBackgroundColorAttributeName_FUNC,
 	NSBaselineOffsetAttributeName_FUNC,
 	NSBeep_FUNC,
 	NSBitsPerPixelFromDepth_FUNC,
 	NSCalibratedRGBColorSpace_FUNC,
 	NSCopyBits_FUNC,
+	NSCursorAttributeName_FUNC,
 	NSDefaultRunLoopMode_FUNC,
 	NSDeviceRGBColorSpace_FUNC,
 	NSDeviceResolution_FUNC,
@@ -277,8 +354,10 @@ typedef enum {
 	NSHTMLPboardType_FUNC,
 	NSIntersectionRect_FUNC,
 	NSLinkAttributeName_FUNC,
+	NSModalPanelRunLoopMode_FUNC,
 	NSNumberOfColorComponents_FUNC,
 	NSObliquenessAttributeName_FUNC,
+	NSOutlineViewColumnDidMoveNotification_FUNC,
 	NSParagraphStyleAttributeName_FUNC,
 	NSPointInRect_FUNC,
 	NSPoint_1sizeof_FUNC,
@@ -298,12 +377,14 @@ typedef enum {
 	NSRect_1sizeof_FUNC,
 	NSSearchPathForDirectoriesInDomains_FUNC,
 	NSSize_1sizeof_FUNC,
+	NSSpellingStateAttributeName_FUNC,
 	NSStrikethroughColorAttributeName_FUNC,
 	NSStrikethroughStyleAttributeName_FUNC,
 	NSStringPboardType_FUNC,
 	NSStrokeWidthAttributeName_FUNC,
 	NSSystemColorsDidChangeNotification_FUNC,
 	NSTIFFPboardType_FUNC,
+	NSTableViewColumnDidMoveNotification_FUNC,
 	NSTemporaryDirectory_FUNC,
 	NSToolbarCustomizeToolbarItemIdentifier_FUNC,
 	NSToolbarDidRemoveItemNotification_FUNC,
@@ -326,6 +407,9 @@ typedef enum {
 	QDRegionToRects_FUNC,
 	RectInRgn_FUNC,
 	RectRgn_FUNC,
+	SecPolicySearchCopyNext_FUNC,
+	SecPolicySearchCreate_FUNC,
+	SecTrustCreateWithCertificates_FUNC,
 	SectRgn_FUNC,
 	SetFrontProcess_FUNC,
 	SetRect_FUNC,
@@ -335,6 +419,7 @@ typedef enum {
 	TISGetInputSourceProperty_FUNC,
 	TransformProcessType_FUNC,
 	UCKeyTranslate_FUNC,
+	UTTypeEqual_FUNC,
 	UnionRgn_FUNC,
 	_1_1BIG_1ENDIAN_1_1_FUNC,
 	call_FUNC,
@@ -350,9 +435,25 @@ typedef enum {
 	getpid_FUNC,
 	instrumentObjcMessageSends_FUNC,
 	isFlipped_1CALLBACK_FUNC,
+	kCFAllocatorDefault_FUNC,
 	kCFRunLoopCommonModes_FUNC,
+	kCFTypeDictionaryKeyCallBacks_FUNC,
+	kCFTypeDictionaryValueCallBacks_FUNC,
+	kCTFontAttributeName_FUNC,
+	kCTForegroundColorAttributeName_FUNC,
+	kCTParagraphStyleAttributeName_FUNC,
 	kTISPropertyUnicodeKeyLayoutData_FUNC,
 #ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_cocoa_CFRange_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_cocoa_CFRange_2J_FUNC,
+#endif
+#ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_cocoa_CGAffineTransform_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_cocoa_CGAffineTransform_2J_FUNC,
+#endif
+#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_cocoa_CGPathElement_2J_FUNC,
@@ -373,6 +474,11 @@ typedef enum {
 	memmove__JLorg_eclipse_swt_internal_cocoa_CGSize_2J_FUNC,
 #endif
 #ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2J_FUNC,
+#endif
+#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2I_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2J_FUNC,
@@ -398,6 +504,16 @@ typedef enum {
 	memmove__JLorg_eclipse_swt_internal_cocoa_NSSize_2J_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_cocoa_CFRange_2JJ_FUNC,
+#endif
+#ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_cocoa_CGAffineTransform_2JJ_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2II_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_cocoa_CGPathElement_2JJ_FUNC,
@@ -418,6 +534,11 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_cocoa_CGSize_2JJ_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_cocoa_CTParagraphStyleSetting_2JJ_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2II_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_cocoa_NSAffineTransformStruct_2JJ_FUNC,
@@ -495,6 +616,11 @@ typedef enum {
 	objc_1msgSend__JJJJ_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSend__IIIIDI_FUNC,
+#else
+	objc_1msgSend__JJJJDJ_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSend__IIIII_FUNC,
 #else
 	objc_1msgSend__JJJJJ_FUNC,
@@ -515,6 +641,11 @@ typedef enum {
 	objc_1msgSend__JJJJJJJ_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSend__IIIIIIII_FUNC,
+#else
+	objc_1msgSend__JJJJJJJJ_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSend__IIIIIIIII_FUNC,
 #else
 	objc_1msgSend__JJJJJJJJJ_FUNC,
@@ -635,9 +766,9 @@ typedef enum {
 	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2J_FUNC,
 #endif
 #ifndef JNI64
-	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIIII_FUNC,
+	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2IIII_3B_FUNC,
 #else
-	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJJ_FUNC,
+	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2JJJJ_3B_FUNC,
 #endif
 #ifndef JNI64
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
@@ -645,9 +776,9 @@ typedef enum {
 	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
 #endif
 #ifndef JNI64
-	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2II_FUNC,
+	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2I_3I_FUNC,
 #else
-	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2JJ_FUNC,
+	objc_1msgSend__JJLorg_eclipse_swt_internal_cocoa_NSRange_2Lorg_eclipse_swt_internal_cocoa_NSRange_2J_3J_FUNC,
 #endif
 #ifndef JNI64
 	objc_1msgSend__IILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
@@ -735,6 +866,11 @@ typedef enum {
 	objc_1msgSend__JJZJ_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSend__IIZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
+#else
+	objc_1msgSend__JJZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSend__II_3B_FUNC,
 #else
 	objc_1msgSend__JJ_3B_FUNC,
@@ -809,6 +945,11 @@ typedef enum {
 	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJJJZ_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
+#else
+	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IILorg_eclipse_swt_internal_cocoa_NSPoint_2I_FUNC,
 #else
 	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JJLorg_eclipse_swt_internal_cocoa_NSPoint_2J_FUNC,
@@ -848,6 +989,11 @@ typedef enum {
 #else
 	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC,
 #endif
+#ifndef JNI64
+	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
+#else
+	objc_1msgSendSuper__Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
+#endif
 	objc_1msgSendSuper_1bool_FUNC,
 #ifndef JNI64
 	objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSRect_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2ILorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
@@ -865,6 +1011,11 @@ typedef enum {
 	objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2J_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2IZ_FUNC,
+#else
+	objc_1msgSendSuper_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2Lorg_eclipse_swt_internal_cocoa_objc_1super_2JZ_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSend_1bool__II_FUNC,
 #else
 	objc_1msgSend_1bool__JJ_FUNC,
@@ -885,6 +1036,11 @@ typedef enum {
 	objc_1msgSend_1bool__JJJJJ_FUNC,
 #endif
 #ifndef JNI64
+	objc_1msgSend_1bool__IIIIII_FUNC,
+#else
+	objc_1msgSend_1bool__JJJJJJ_FUNC,
+#endif
+#ifndef JNI64
 	objc_1msgSend_1bool__IIIIIII_FUNC,
 #else
 	objc_1msgSend_1bool__JJJJJJJ_FUNC,
@@ -1039,6 +1195,11 @@ typedef enum {
 #else
 	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJLorg_eclipse_swt_internal_cocoa_NSSize_2ZZJ_FUNC,
 #endif
+#ifndef JNI64
+	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2IIZ_FUNC,
+#else
+	objc_1msgSend_1stret__Lorg_eclipse_swt_internal_cocoa_NSSize_2JJZ_FUNC,
+#endif
 	objc_1registerClassPair_FUNC,
 	objc_1super_1sizeof_FUNC,
 	object_1getClass_FUNC,
@@ -1046,5 +1207,6 @@ typedef enum {
 	object_1getInstanceVariable_FUNC,
 	object_1setClass_FUNC,
 	object_1setInstanceVariable_FUNC,
+	sel_1getName_FUNC,
 	sel_1registerName_FUNC,
 } OS_FUNCS;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c
index e249b01..4013ae7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.c	
@@ -12,6 +12,86 @@
 #include "swt.h"
 #include "os_structs.h"
 
+#ifndef NO_CFRange
+typedef struct CFRange_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID location, length;
+} CFRange_FID_CACHE;
+
+CFRange_FID_CACHE CFRangeFc;
+
+void cacheCFRangeFields(JNIEnv *env, jobject lpObject)
+{
+	if (CFRangeFc.cached) return;
+	CFRangeFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	CFRangeFc.location = (*env)->GetFieldID(env, CFRangeFc.clazz, "location", I_J);
+	CFRangeFc.length = (*env)->GetFieldID(env, CFRangeFc.clazz, "length", I_J);
+	CFRangeFc.cached = 1;
+}
+
+CFRange *getCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct)
+{
+	if (!CFRangeFc.cached) cacheCFRangeFields(env, lpObject);
+	lpStruct->location = (*env)->GetIntLongField(env, lpObject, CFRangeFc.location);
+	lpStruct->length = (*env)->GetIntLongField(env, lpObject, CFRangeFc.length);
+	return lpStruct;
+}
+
+void setCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct)
+{
+	if (!CFRangeFc.cached) cacheCFRangeFields(env, lpObject);
+	(*env)->SetIntLongField(env, lpObject, CFRangeFc.location, (jintLong)lpStruct->location);
+	(*env)->SetIntLongField(env, lpObject, CFRangeFc.length, (jintLong)lpStruct->length);
+}
+#endif
+
+#ifndef NO_CGAffineTransform
+typedef struct CGAffineTransform_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID a, b, c, d, tx, ty;
+} CGAffineTransform_FID_CACHE;
+
+CGAffineTransform_FID_CACHE CGAffineTransformFc;
+
+void cacheCGAffineTransformFields(JNIEnv *env, jobject lpObject)
+{
+	if (CGAffineTransformFc.cached) return;
+	CGAffineTransformFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	CGAffineTransformFc.a = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "a", F_D);
+	CGAffineTransformFc.b = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "b", F_D);
+	CGAffineTransformFc.c = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "c", F_D);
+	CGAffineTransformFc.d = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "d", F_D);
+	CGAffineTransformFc.tx = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "tx", F_D);
+	CGAffineTransformFc.ty = (*env)->GetFieldID(env, CGAffineTransformFc.clazz, "ty", F_D);
+	CGAffineTransformFc.cached = 1;
+}
+
+CGAffineTransform *getCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct)
+{
+	if (!CGAffineTransformFc.cached) cacheCGAffineTransformFields(env, lpObject);
+	lpStruct->a = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.a);
+	lpStruct->b = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.b);
+	lpStruct->c = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.c);
+	lpStruct->d = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.d);
+	lpStruct->tx = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.tx);
+	lpStruct->ty = (*env)->GetFloatDoubleField(env, lpObject, CGAffineTransformFc.ty);
+	return lpStruct;
+}
+
+void setCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct)
+{
+	if (!CGAffineTransformFc.cached) cacheCGAffineTransformFields(env, lpObject);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.a, (jfloatDouble)lpStruct->a);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.b, (jfloatDouble)lpStruct->b);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.c, (jfloatDouble)lpStruct->c);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.d, (jfloatDouble)lpStruct->d);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.tx, (jfloatDouble)lpStruct->tx);
+	(*env)->SetFloatDoubleField(env, lpObject, CGAffineTransformFc.ty, (jfloatDouble)lpStruct->ty);
+}
+#endif
+
 #ifndef NO_CGPathElement
 typedef struct CGPathElement_FID_CACHE {
 	int cached;
@@ -160,6 +240,43 @@ void setCGSizeFields(JNIEnv *env, jobject lpObject, CGSize *lpStruct)
 }
 #endif
 
+#ifndef NO_CTParagraphStyleSetting
+typedef struct CTParagraphStyleSetting_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID spec, valueSize, value;
+} CTParagraphStyleSetting_FID_CACHE;
+
+CTParagraphStyleSetting_FID_CACHE CTParagraphStyleSettingFc;
+
+void cacheCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject)
+{
+	if (CTParagraphStyleSettingFc.cached) return;
+	CTParagraphStyleSettingFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	CTParagraphStyleSettingFc.spec = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "spec", "I");
+	CTParagraphStyleSettingFc.valueSize = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "valueSize", I_J);
+	CTParagraphStyleSettingFc.value = (*env)->GetFieldID(env, CTParagraphStyleSettingFc.clazz, "value", I_J);
+	CTParagraphStyleSettingFc.cached = 1;
+}
+
+CTParagraphStyleSetting *getCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct)
+{
+	if (!CTParagraphStyleSettingFc.cached) cacheCTParagraphStyleSettingFields(env, lpObject);
+	lpStruct->spec = (CTParagraphStyleSpecifier)(*env)->GetIntField(env, lpObject, CTParagraphStyleSettingFc.spec);
+	lpStruct->valueSize = (*env)->GetIntLongField(env, lpObject, CTParagraphStyleSettingFc.valueSize);
+	lpStruct->value = (void *)(*env)->GetIntLongField(env, lpObject, CTParagraphStyleSettingFc.value);
+	return lpStruct;
+}
+
+void setCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct)
+{
+	if (!CTParagraphStyleSettingFc.cached) cacheCTParagraphStyleSettingFields(env, lpObject);
+	(*env)->SetIntField(env, lpObject, CTParagraphStyleSettingFc.spec, (jint)lpStruct->spec);
+	(*env)->SetIntLongField(env, lpObject, CTParagraphStyleSettingFc.valueSize, (jintLong)lpStruct->valueSize);
+	(*env)->SetIntLongField(env, lpObject, CTParagraphStyleSettingFc.value, (jintLong)lpStruct->value);
+}
+#endif
+
 #ifndef NO_NSAffineTransformStruct
 typedef struct NSAffineTransformStruct_FID_CACHE {
 	int cached;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h
index 31eb71f..009ded2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_structs.h	
@@ -11,6 +11,30 @@
 
 #include "os.h"
 
+#ifndef NO_CFRange
+void cacheCFRangeFields(JNIEnv *env, jobject lpObject);
+CFRange *getCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct);
+void setCFRangeFields(JNIEnv *env, jobject lpObject, CFRange *lpStruct);
+#define CFRange_sizeof() sizeof(CFRange)
+#else
+#define cacheCFRangeFields(a,b)
+#define getCFRangeFields(a,b,c) NULL
+#define setCFRangeFields(a,b,c)
+#define CFRange_sizeof() 0
+#endif
+
+#ifndef NO_CGAffineTransform
+void cacheCGAffineTransformFields(JNIEnv *env, jobject lpObject);
+CGAffineTransform *getCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct);
+void setCGAffineTransformFields(JNIEnv *env, jobject lpObject, CGAffineTransform *lpStruct);
+#define CGAffineTransform_sizeof() sizeof(CGAffineTransform)
+#else
+#define cacheCGAffineTransformFields(a,b)
+#define getCGAffineTransformFields(a,b,c) NULL
+#define setCGAffineTransformFields(a,b,c)
+#define CGAffineTransform_sizeof() 0
+#endif
+
 #ifndef NO_CGPathElement
 void cacheCGPathElementFields(JNIEnv *env, jobject lpObject);
 CGPathElement *getCGPathElementFields(JNIEnv *env, jobject lpObject, CGPathElement *lpStruct);
@@ -59,6 +83,18 @@ void setCGSizeFields(JNIEnv *env, jobject lpObject, CGSize *lpStruct);
 #define CGSize_sizeof() 0
 #endif
 
+#ifndef NO_CTParagraphStyleSetting
+void cacheCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject);
+CTParagraphStyleSetting *getCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct);
+void setCTParagraphStyleSettingFields(JNIEnv *env, jobject lpObject, CTParagraphStyleSetting *lpStruct);
+#define CTParagraphStyleSetting_sizeof() sizeof(CTParagraphStyleSetting)
+#else
+#define cacheCTParagraphStyleSettingFields(a,b)
+#define getCTParagraphStyleSettingFields(a,b,c) NULL
+#define setCTParagraphStyleSettingFields(a,b,c)
+#define CTParagraphStyleSetting_sizeof() 0
+#endif
+
 #ifndef NO_NSAffineTransformStruct
 void cacheNSAffineTransformStructFields(JNIEnv *env, jobject lpObject);
 NSAffineTransformStruct *getNSAffineTransformStructFields(JNIEnv *env, jobject lpObject, NSAffineTransformStruct *lpStruct);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 714e462..7d60f9c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras	
@@ -1,355 +1,5 @@
 <?xml version="1.0" encoding="UTF8"?>
 <signatures swt_gen="mixed">
-	<constant name="NSAccessibilityButtonRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityCheckBoxRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityChildrenAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityColumnRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityComboBoxRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityConfirmAction" swt_gen="true"></constant>
-	<constant name="NSAccessibilityContentsAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityDescriptionAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityDialogSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityEnabledAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityExpandedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityFloatingWindowSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityFocusedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityFocusedUIElementChangedNotification" swt_gen="true"></constant>
-	<constant name="NSAccessibilityGridRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityGroupRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityHelpAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityHelpTagRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityHorizontalOrientationValue" swt_gen="true"></constant>
-	<constant name="NSAccessibilityHorizontalScrollBarAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityImageRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityIncrementorRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityInsertionPointLineNumberAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityLabelValueAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityLineForIndexParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityLinkRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityLinkTextAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityListRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMaxValueAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMenuBarRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMenuButtonRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMenuItemRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMenuRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityMinValueAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityNextContentsAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityNumberOfCharactersAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityOrientationAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityOutlineRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityOutlineRowSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityParentAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityPopUpButtonRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityPositionAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityPressAction" swt_gen="true"></constant>
-	<constant name="NSAccessibilityPreviousContentsAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityProgressIndicatorRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRTFForRangeParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRadioButtonRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRadioGroupRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRangeForLineParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRangeForPositionParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRoleAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRoleDescriptionAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityRowRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityScrollAreaRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityScrollBarRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedChildrenAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedChildrenChangedNotification" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedTextAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedTextChangedNotification" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedTextRangeAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySelectedTextRangesAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityServesAsTitleForUIElementsAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySizeAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySliderRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySortButtonRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySplitterRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityStandardWindowSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityStaticTextRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityStringForRangeParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityStyleRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySubroleAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilitySystemDialogSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTabGroupRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTableRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTableRowSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTabsAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTextAreaRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTextFieldRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTextLinkSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTitleAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTitleUIElementAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityToolbarRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityTopLevelUIElementAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityUnknownRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityUnknownSubrole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityValueAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityValueChangedNotification" swt_gen="true"></constant>
-	<constant name="NSAccessibilityValueDescriptionAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityValueIndicatorRole" swt_gen="true"></constant>
-	<constant name="NSAccessibilityVerticalOrientationValue" swt_gen="true"></constant>
-	<constant name="NSAccessibilityVerticalScrollBarAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityVisibleCharacterRangeAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityVisibleChildrenAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityWindowAttribute" swt_gen="true"></constant>
-	<constant name="NSAccessibilityWindowRole" swt_gen="true"></constant>
-	<constant name="NSApplicationDidChangeScreenParametersNotification" swt_gen="true"></constant>
-	<constant name="NSBackgroundColorAttributeName" swt_gen="true"></constant>
-	<constant name="NSBaselineOffsetAttributeName" swt_gen="true"></constant>
-	<constant name="NSCalibratedRGBColorSpace" swt_gen="true"></constant>
-	<constant name="NSDeviceRGBColorSpace" swt_gen="true"></constant>
-	<constant name="NSDeviceResolution" swt_gen="true"></constant>
-	<constant name="NSDragPboard" swt_gen="true"></constant>
-	<constant name="NSEventTrackingRunLoopMode" swt_gen="true"></constant>
-	<constant name="NSFilenamesPboardType" swt_gen="true"></constant>
-	<constant name="NSFontAttributeName" swt_gen="true"></constant>
-	<constant name="NSForegroundColorAttributeName" swt_gen="true"></constant>
-	<constant name="NSHTMLPboardType" swt_gen="true"></constant>
-	<constant name="NSLinkAttributeName" swt_gen="true"></constant>
-	<constant name="NSObliquenessAttributeName" swt_gen="true"></constant>
-	<constant name="NSParagraphStyleAttributeName" swt_gen="true"></constant>
-	<constant name="NSPrintAllPages" swt_gen="true"></constant>
-	<constant name="NSPrintCopies" swt_gen="true"></constant>
-	<constant name="NSPrintFirstPage" swt_gen="true"></constant>
-	<constant name="NSPrintJobDisposition" swt_gen="true"></constant>
-	<constant name="NSPrintLastPage" swt_gen="true"></constant>
-	<constant name="NSPrintMustCollate" swt_gen="true"></constant>
-	<constant name="NSPrintPreviewJob" swt_gen="true"></constant>
-	<constant name="NSPrintSaveJob" swt_gen="true"></constant>
-	<constant name="NSPrintSavePath" swt_gen="true"></constant>
-	<constant name="NSPrintScalingFactor" swt_gen="true"></constant>
-	<constant name="NSPrintSpoolJob" swt_gen="true"></constant>
-	<constant name="NSRTFPboardType" swt_gen="true"></constant>
-	<constant name="NSStrikethroughColorAttributeName" swt_gen="true"></constant>
-	<constant name="NSStrikethroughStyleAttributeName" swt_gen="true"></constant>
-	<constant name="NSStringPboardType" swt_gen="true"></constant>
-	<constant name="NSStrokeWidthAttributeName" swt_gen="true"></constant>
-	<constant name="NSSystemColorsDidChangeNotification" swt_gen="true"></constant>
-	<constant name="NSTIFFPboardType" swt_gen="true"></constant>
-	<constant name="NSToolbarCustomizeToolbarItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarDidRemoveItemNotification" swt_gen="true"></constant>
-	<constant name="NSToolbarFlexibleSpaceItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarPrintItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarSeparatorItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarShowColorsItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarShowFontsItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarSpaceItemIdentifier" swt_gen="true"></constant>
-	<constant name="NSToolbarWillAddItemNotification" swt_gen="true"></constant>
-	<constant name="NSURLPboardType" swt_gen="true"></constant>
-	<constant name="NSUnderlineColorAttributeName" swt_gen="true"></constant>
-	<constant name="NSUnderlineStyleAttributeName" swt_gen="true"></constant>
-	<constant name="NSViewGlobalFrameDidChangeNotification" swt_gen="true"></constant>
-	<enum name="NSAlertFirstButtonReturn" swt_gen="true"></enum>
-	<enum name="NSAlertSecondButtonReturn" swt_gen="true"></enum>
-	<enum name="NSAlertThirdButtonReturn" swt_gen="true"></enum>
-	<enum name="NSAlphaFirstBitmapFormat" swt_gen="true"></enum>
-	<enum name="NSAlphaNonpremultipliedBitmapFormat" swt_gen="true"></enum>
-	<enum name="NSAlternateKeyMask" swt_gen="true"></enum>
-	<enum name="NSApplicationDefined" swt_gen="true"></enum>
-	<enum name="NSAtTop" swt_gen="true"></enum>
-	<enum name="NSBackingStoreBuffered" swt_gen="true"></enum>
-	<enum name="NSBackspaceCharacter" swt_gen="true"></enum>
-	<enum name="NSBevelLineJoinStyle" swt_gen="true"></enum>
-	<enum name="NSBezelBorder" swt_gen="true"></enum>
-	<enum name="NSBoldFontMask" swt_gen="true"></enum>
-	<enum name="NSBorderlessWindowMask" swt_gen="true"></enum>
-	<enum name="NSBottomTabsBezelBorder" swt_gen="true"></enum>
-	<enum name="NSBoxCustom" swt_gen="true"></enum>
-	<enum name="NSBoxSeparator" swt_gen="true"></enum>
-	<enum name="NSButtLineCapStyle" swt_gen="true"></enum>
-	<enum name="NSCancelButton" swt_gen="true"></enum>
-	<enum name="NSCarriageReturnCharacter" swt_gen="true"></enum>
-	<enum name="NSCenterTextAlignment" swt_gen="true"></enum>
-	<enum name="NSClockAndCalendarDatePickerStyle" swt_gen="true"></enum>
-	<enum name="NSClosableWindowMask" swt_gen="true"></enum>
-	<enum name="NSClosePathBezierPathElement" swt_gen="true"></enum>
-	<enum name="NSCommandKeyMask" swt_gen="true"></enum>
-	<enum name="NSCompositeClear" swt_gen="true"></enum>
-	<enum name="NSCompositeCopy" swt_gen="true"></enum>
-	<enum name="NSCompositeSourceOver" swt_gen="true"></enum>
-	<enum name="NSCompositeXOR" swt_gen="true"></enum>
-	<enum name="NSControlKeyMask" swt_gen="true"></enum>
-	<enum name="NSCriticalAlertStyle" swt_gen="true"></enum>
-	<enum name="NSCurveToBezierPathElement" swt_gen="true"></enum>
-	<enum name="NSDeleteCharacter" swt_gen="true"></enum>
-	<enum name="NSDeviceIndependentModifierFlagsMask" swt_gen="true"></enum>
-	<enum name="NSDragOperationCopy" swt_gen="true"></enum>
-	<enum name="NSDragOperationDelete" swt_gen="true"></enum>
-	<enum name="NSDragOperationEvery" swt_gen="true"></enum>
-	<enum name="NSDragOperationLink" swt_gen="true"></enum>
-	<enum name="NSDragOperationMove" swt_gen="true"></enum>
-	<enum name="NSDragOperationNone" swt_gen="true"></enum>
-	<enum name="NSEnterCharacter" swt_gen="true"></enum>
-	<enum name="NSEvenOddWindingRule" swt_gen="true"></enum>
-	<enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum>
-	<enum name="NSFlagsChanged" swt_gen="true"></enum>
-	<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
-	<enum name="NSHelpFunctionKey" swt_gen="true"></enum>
-	<enum name="NSHelpKeyMask" swt_gen="true"></enum>
-	<enum name="NSHourMinuteDatePickerElementFlag" swt_gen="true"></enum>
-	<enum name="NSHourMinuteSecondDatePickerElementFlag" swt_gen="true"></enum>
-	<enum name="NSImageAbove" swt_gen="true"></enum>
-	<enum name="NSImageAlignCenter" swt_gen="true"></enum>
-	<enum name="NSImageAlignLeft" swt_gen="true"></enum>
-	<enum name="NSImageAlignRight" swt_gen="true"></enum>
-	<enum name="NSImageCacheNever" swt_gen="true"></enum>
-	<enum name="NSImageInterpolationDefault" swt_gen="true"></enum>
-	<enum name="NSImageInterpolationHigh" swt_gen="true"></enum>
-	<enum name="NSImageInterpolationLow" swt_gen="true"></enum>
-	<enum name="NSImageInterpolationNone" swt_gen="true"></enum>
-	<enum name="NSImageLeft" swt_gen="true"></enum>
-	<enum name="NSImageOnly" swt_gen="true"></enum>
-	<enum name="NSImageOverlaps" swt_gen="true"></enum>
-	<enum name="NSInformationalAlertStyle" swt_gen="true"></enum>
-	<enum name="NSItalicFontMask" swt_gen="true"></enum>
-	<enum name="NSJustifiedTextAlignment" swt_gen="true"></enum>
-	<enum name="NSKeyDown" swt_gen="true"></enum>
-	<enum name="NSKeyUp" swt_gen="true"></enum>
-	<enum name="NSLandscapeOrientation" swt_gen="true"></enum>
-	<enum name="NSLeftMouseDown" swt_gen="true"></enum>
-	<enum name="NSLeftMouseDownMask" swt_gen="true"></enum>
-	<enum name="NSLeftMouseDragged" swt_gen="true"></enum>
-	<enum name="NSLeftMouseDraggedMask" swt_gen="true"></enum>
-	<enum name="NSLeftMouseUp" swt_gen="true"></enum>
-	<enum name="NSLeftMouseUpMask" swt_gen="true"></enum>
-	<enum name="NSLeftTabStopType" swt_gen="true"></enum>
-	<enum name="NSLeftTextAlignment" swt_gen="true"></enum>
-	<enum name="NSLineBreakByClipping" swt_gen="true"></enum>
-	<enum name="NSLineBreakByWordWrapping" swt_gen="true"></enum>
-	<enum name="NSLineToBezierPathElement" swt_gen="true"></enum>
-	<enum name="NSMiniaturizableWindowMask" swt_gen="true"></enum>
-	<enum name="NSMiterLineJoinStyle" swt_gen="true"></enum>
-	<enum name="NSMixedState" swt_gen="true"></enum>
-	<enum name="NSMomentaryLightButton" swt_gen="true"></enum>
-	<enum name="NSMouseEntered" swt_gen="true"></enum>
-	<enum name="NSMouseExited" swt_gen="true"></enum>
-	<enum name="NSMouseMoved" swt_gen="true"></enum>
-	<enum name="NSMoveToBezierPathElement" swt_gen="true"></enum>
-	<enum name="NSNewlineCharacter" swt_gen="true"></enum>
-	<enum name="NSNoBorder" swt_gen="true"></enum>
-	<enum name="NSNoImage" swt_gen="true"></enum>
-	<enum name="NSNoTitle" swt_gen="true"></enum>
-	<enum name="NSNonZeroWindingRule" swt_gen="true"></enum>
-	<enum name="NSOffState" swt_gen="true"></enum>
-	<enum name="NSOnState" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFAAccumSize" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFAAlphaSize" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFAColorSize" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFADepthSize" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFADoubleBuffer" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFASampleBuffers" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFASamples" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFAStencilSize" swt_gen="true"></enum>
-	<enum name="NSOpenGLPFAStereo" swt_gen="true"></enum>
-	<enum name="NSOtherMouseDown" swt_gen="true"></enum>
-	<enum name="NSOtherMouseDragged" swt_gen="true"></enum>
-	<enum name="NSOtherMouseUp" swt_gen="true"></enum>
-	<enum name="NSOutlineViewDropOnItemIndex" swt_gen="true"></enum>
-	<enum name="NSPageDownFunctionKey" swt_gen="true"></enum>
-	<enum name="NSPageUpFunctionKey" swt_gen="true"></enum>
-	<enum name="NSPortraitOrientation" swt_gen="true"></enum>
-	<enum name="NSPrintPanelShowsPageSetupAccessory" swt_gen="true"></enum>
-	<enum name="NSProgressIndicatorPreferredThickness" swt_gen="true"></enum>
-	<enum name="NSPushOnPushOffButton" swt_gen="true"></enum>
-	<enum name="NSRadioButton" swt_gen="true"></enum>
-	<enum name="NSRegularControlSize" swt_gen="true"></enum>
-	<enum name="NSResizableWindowMask" swt_gen="true"></enum>
-	<enum name="NSRightMouseDown" swt_gen="true"></enum>
-	<enum name="NSRightMouseDragged" swt_gen="true"></enum>
-	<enum name="NSRightMouseUp" swt_gen="true"></enum>
-	<enum name="NSRightTextAlignment" swt_gen="true"></enum>
-	<enum name="NSRoundLineCapStyle" swt_gen="true"></enum>
-	<enum name="NSRoundLineJoinStyle" swt_gen="true"></enum>
-	<enum name="NSRoundedBezelStyle" swt_gen="true"></enum>
-	<enum name="NSScaleNone" swt_gen="true"></enum>
-	<enum name="NSScrollWheel" swt_gen="true"></enum>
-	<enum name="NSScrollerDecrementLine" swt_gen="true"></enum>
-	<enum name="NSScrollerDecrementPage" swt_gen="true"></enum>
-	<enum name="NSScrollerIncrementLine" swt_gen="true"></enum>
-	<enum name="NSScrollerIncrementPage" swt_gen="true"></enum>
-	<enum name="NSScrollerKnob" swt_gen="true"></enum>
-	<enum name="NSShadowlessSquareBezelStyle" swt_gen="true"></enum>
-	<enum name="NSShiftKeyMask" swt_gen="true"></enum>
-	<enum name="NSSmallControlSize" swt_gen="true"></enum>
-	<enum name="NSSquareLineCapStyle" swt_gen="true"></enum>
-	<enum name="NSStatusWindowLevel" swt_gen="true"></enum>
-	<enum name="NSSwitchButton" swt_gen="true"></enum>
-	<enum name="NSSystemDefined" swt_gen="true"></enum>
-	<enum name="NSTabCharacter" swt_gen="true"></enum>
-	<enum name="NSTableColumnNoResizing" swt_gen="true"></enum>
-	<enum name="NSTableColumnUserResizingMask" swt_gen="true"></enum>
-	<enum name="NSTableViewDropAbove" swt_gen="true"></enum>
-	<enum name="NSTableViewDropOn" swt_gen="true"></enum>
-	<enum name="NSTableViewNoColumnAutoresizing" swt_gen="true"></enum>
-	<enum name="NSTextFieldAndStepperDatePickerStyle" swt_gen="true"></enum>
-	<enum name="NSTitledWindowMask" swt_gen="true"></enum>
-	<enum name="NSUnderlineStyleDouble" swt_gen="true"></enum>
-	<enum name="NSUnderlineStyleNone" swt_gen="true"></enum>
-	<enum name="NSUnderlineStyleSingle" swt_gen="true"></enum>
-	<enum name="NSUnderlineStyleThick" swt_gen="true"></enum>
-	<enum name="NSViewHeightSizable" swt_gen="true"></enum>
-	<enum name="NSViewWidthSizable" swt_gen="true"></enum>
-	<enum name="NSWarningAlertStyle" swt_gen="true"></enum>
-	<enum name="NSWindowAbove" swt_gen="true"></enum>
-	<enum name="NSWindowBelow" swt_gen="true"></enum>
-	<enum name="NSYearMonthDatePickerElementFlag" swt_gen="true"></enum>
-	<enum name="NSYearMonthDayDatePickerElementFlag" swt_gen="true"></enum>
-	<function name="NSAccessibilityActionDescription" swt_gen="true">
-		<arg name="action" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityPostNotification" swt_gen="true">
-		<arg name="element" swt_gen="true"></arg>
-		<arg name="notification" swt_gen="true"></arg>
-	</function>
-	<function name="NSAccessibilityRaiseBadArgumentException" swt_gen="true">
-		<arg name="element" swt_gen="true"></arg>
-		<arg name="attribute" swt_gen="true"></arg>
-		<arg name="value" swt_gen="true"></arg>
-	</function>
-	<function name="NSAccessibilityRoleDescription" swt_gen="true">
-		<arg name="role" swt_gen="true"></arg>
-		<arg name="subrole" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityRoleDescriptionForUIElement" swt_gen="true">
-		<arg name="element" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityUnignoredAncestor" swt_gen="true">
-		<arg name="element" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityUnignoredChildren" swt_gen="true">
-		<arg name="originalChildren" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityUnignoredChildrenForOnlyChild" swt_gen="true">
-		<arg name="originalChild" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSAccessibilityUnignoredDescendant" swt_gen="true">
-		<arg name="element" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSBeep" swt_gen="true"></function>
-	<function name="NSBitsPerPixelFromDepth" swt_gen="true">
-		<arg name="depth" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSCopyBits" swt_gen="true">
-		<arg name="srcGState" swt_gen="true"></arg>
-		<arg name="srcRect" swt_gen="true"></arg>
-		<arg name="destPoint" swt_gen="true"></arg>
-	</function>
-	<function name="NSNumberOfColorComponents" swt_gen="true">
-		<arg name="colorSpaceName" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
 	<class name="NSATSTypesetter" swt_superclass="NSTypesetter">
 	</class>
 	<class name="NSActionCell" swt_gen="mixed" swt_superclass="NSCell">
@@ -357,11 +7,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAction:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTarget:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="target" swt_gen="true">
@@ -373,73 +23,73 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithTransform:" swt_gen="true">
-			<arg name="transform" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSAffineTransform"></retval>
 		</method>
 		<method selector="invert" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="prependTransform:" swt_gen="true">
-			<arg name="transform" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rotateByDegrees:" swt_gen="true">
-			<arg name="angle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scaleXBy:yBy:" swt_gen="true">
-			<arg name="scaleX" swt_gen="true"></arg>
-			<arg name="scaleY" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="set" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTransformStruct:" swt_gen="true">
-			<arg name="transformStruct" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="transform" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="transformPoint:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="transformSize:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="transformStruct" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="translateXBy:yBy:" swt_gen="true">
-			<arg name="deltaX" swt_gen="true"></arg>
-			<arg name="deltaY" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSAlert" swt_gen="mixed">
 		<method selector="addButtonWithTitle:" swt_gen="true">
-			<arg name="title" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:" swt_gen="true">
-			<arg name="window" swt_gen="true"></arg>
-			<arg name="delegate" swt_gen="true"></arg>
-			<arg name="didEndSelector" swt_gen="true"></arg>
-			<arg name="contextInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runModal" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlertStyle:" swt_gen="true">
-			<arg name="style" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMessageText:" swt_gen="true">
-			<arg name="messageText" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="window" swt_gen="true">
@@ -448,34 +98,40 @@
 	</class>
 	<class name="NSApplication" swt_gen="mixed" swt_superclass="NSResponder">
 		<method selector="activateIgnoringOtherApps:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="applicationIconImage" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:" swt_gen="true">
-			<arg name="sheet" swt_gen="true"></arg>
-			<arg name="docWindow" swt_gen="true"></arg>
-			<arg name="modalDelegate" swt_gen="true"></arg>
-			<arg name="didEndSelector" swt_gen="true"></arg>
-			<arg name="contextInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="currentEvent" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="dockTile" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="endSheet:returnCode:" swt_gen="true">
-			<arg name="sheet" swt_gen="true"></arg>
-			<arg name="returnCode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="finishLaunching" swt_gen="true" swt_gen_super_msgSend="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hide:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hideOtherApplications:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isActive" swt_gen="true">
@@ -491,64 +147,68 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="nextEventMatchingMask:untilDate:inMode:dequeue:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="mask" swt_gen="true"></arg>
-			<arg name="expiration" swt_gen="true"></arg>
-			<arg name="mode" swt_gen="true"></arg>
-			<arg name="deqFlag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderFrontStandardAboutPanel:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderedWindows" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="postEvent:atStart:" swt_gen="true">
-			<arg name="event" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="replyToOpenOrPrint:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="run" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runModalForWindow:" swt_gen="true">
-			<arg name="theWindow" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sendEvent:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setApplicationIconImage:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMainMenu:" swt_gen="true">
-			<arg name="aMenu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setServicesMenu:" swt_gen="true">
-			<arg name="aMenu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedApplication" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stop:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="terminate:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="unhideAllApplications:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="windows" swt_gen="true">
@@ -559,35 +219,35 @@
 	</class>
 	<class name="NSAttributedString" swt_gen="mixed">
 		<method class_method="true" selector="attributedStringWithAttachment:" swt_gen="true">
-			<arg name="attachment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="attributesAtIndex:longestEffectiveRange:inRange:" swt_gen="true">
-			<arg name="location" swt_gen="true"></arg>
-			<arg name="range" swt_gen="true"></arg>
-			<arg name="rangeLimit" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="doubleClickAtIndex:" swt_gen="true">
-			<arg name="location" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawInRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithString:attributes:" swt_gen="true">
-			<arg name="str" swt_gen="true"></arg>
-			<arg name="attrs" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSAttributedString"></retval>
 		</method>
 		<method selector="nextWordFromIndex:forward:" swt_gen="true">
-			<arg name="location" swt_gen="true"></arg>
-			<arg name="isForward" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="size" swt_gen="true">
@@ -599,42 +259,42 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPath:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:" swt_gen="true">
-			<arg name="center" swt_gen="true"></arg>
-			<arg name="radius" swt_gen="true"></arg>
-			<arg name="startAngle" swt_gen="true"></arg>
-			<arg name="endAngle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:" swt_gen="true">
-			<arg name="center" swt_gen="true"></arg>
-			<arg name="radius" swt_gen="true"></arg>
-			<arg name="startAngle" swt_gen="true"></arg>
-			<arg name="endAngle" swt_gen="true"></arg>
-			<arg name="clockwise" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithGlyphs:count:inFont:" swt_gen="true">
-			<arg name="glyphs" swt_gen="true"></arg>
-			<arg name="count" swt_gen="true"></arg>
-			<arg name="font" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithOvalInRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="appendBezierPathWithRoundedRect:xRadius:yRadius:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
-			<arg name="xRadius" swt_gen="true"></arg>
-			<arg name="yRadius" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="bezierPath" swt_gen="true">
@@ -644,7 +304,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="bezierPathWithRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="bounds" swt_gen="true">
@@ -654,7 +314,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="containsPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="controlPointBounds" swt_gen="true">
@@ -664,17 +324,17 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="curveToPoint:controlPoint1:controlPoint2:" swt_gen="true">
-			<arg name="endPoint" swt_gen="true"></arg>
-			<arg name="controlPoint1" swt_gen="true"></arg>
-			<arg name="controlPoint2" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="defaultFlatness" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="elementAtIndex:associatedPoints:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
-			<arg name="points" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="elementCount" swt_gen="true">
@@ -684,18 +344,18 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="fillRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isEmpty" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="lineToPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="moveToPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeAllPoints" swt_gen="true">
@@ -705,44 +365,44 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="setDefaultFlatness:" swt_gen="true">
-			<arg name="flatness" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineCapStyle:" swt_gen="true">
-			<arg name="lineCapStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineDash:count:phase:" swt_gen="true">
-			<arg name="pattern" swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
-			<arg name="count" swt_gen="true"></arg>
-			<arg name="phase" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineJoinStyle:" swt_gen="true">
-			<arg name="lineJoinStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineWidth:" swt_gen="true">
-			<arg name="lineWidth" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMiterLimit:" swt_gen="true">
-			<arg name="miterLimit" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setWindingRule:" swt_gen="true">
-			<arg name="windingRule" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stroke" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="strokeRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="transformUsingAffineTransform:" swt_gen="true">
-			<arg name="transform" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -766,51 +426,51 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="colorAtX:y:" swt_gen="true">
-			<arg name="x" swt_gen="true"></arg>
-			<arg name="y" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getBitmapDataPlanes:" swt_gen="true">
-			<arg name="data" swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+			<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="imageRepWithData:" swt_gen="true">
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:" swt_gen="true">
-			<arg name="planes" swt_gen="true"></arg>
-			<arg name="width" swt_gen="true"></arg>
-			<arg name="height" swt_gen="true"></arg>
-			<arg name="bps" swt_gen="true"></arg>
-			<arg name="spp" swt_gen="true"></arg>
-			<arg name="alpha" swt_gen="true"></arg>
-			<arg name="isPlanar" swt_gen="true"></arg>
-			<arg name="colorSpaceName" swt_gen="true"></arg>
-			<arg name="bitmapFormat" swt_gen="true"></arg>
-			<arg name="rBytes" swt_gen="true"></arg>
-			<arg name="pBits" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
 		</method>
 		<method selector="initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:" swt_gen="true">
-			<arg name="planes" swt_gen="true"></arg>
-			<arg name="width" swt_gen="true"></arg>
-			<arg name="height" swt_gen="true"></arg>
-			<arg name="bps" swt_gen="true"></arg>
-			<arg name="spp" swt_gen="true"></arg>
-			<arg name="alpha" swt_gen="true"></arg>
-			<arg name="isPlanar" swt_gen="true"></arg>
-			<arg name="colorSpaceName" swt_gen="true"></arg>
-			<arg name="rBytes" swt_gen="true"></arg>
-			<arg name="pBits" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
 		</method>
 		<method selector="initWithData:" swt_gen="true">
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
 		</method>
 		<method selector="initWithFocusedViewRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSBitmapImageRep"></retval>
 		</method>
 		<method selector="isPlanar" swt_gen="true">
@@ -834,39 +494,43 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBorderType:" swt_gen="true">
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBorderWidth:" swt_gen="true">
-			<arg name="borderWidth" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBoxType:" swt_gen="true">
-			<arg name="boxType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setContentView:" swt_gen="true">
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setContentViewMargins:" swt_gen="true">
-			<arg name="offsetSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFillColor:" swt_gen="true">
-			<arg name="fillColor" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setFrameFromContentFrame:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitleFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitlePosition:" swt_gen="true">
-			<arg name="aPosition" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sizeToFit" swt_gen="true">
@@ -883,19 +547,19 @@
 	</class>
 	<class name="NSBrowserCell" swt_gen="mixed" swt_superclass="NSCell">
 		<method selector="highlightColorInView:" swt_gen="true">
-			<arg name="controlView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLeaf:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSBundle" swt_gen="mixed">
 		<method class_method="true" selector="loadNibFile:externalNameTable:withZone:" swt_gen="true">
-			<arg name="fileName" swt_gen="true"></arg>
-			<arg name="context" swt_gen="true"></arg>
-			<arg name="zone" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -904,43 +568,43 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsMixedState:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAttributedTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBezelStyle:" swt_gen="true">
-			<arg name="bezelStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBordered:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setButtonType:" swt_gen="true">
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImagePosition:" swt_gen="true">
-			<arg name="aPosition" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setKeyEquivalent:" swt_gen="true">
-			<arg name="charCode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setState:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="state" swt_gen="true">
@@ -948,22 +612,25 @@
 		</method>
 	</class>
 	<class name="NSButtonCell" swt_gen="mixed" swt_superclass="NSActionCell">
+		<method selector="backgroundColor" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="drawImage:withFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="image" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
-			<arg name="controlView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setButtonType:" swt_gen="true">
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImagePosition:" swt_gen="true">
-			<arg name="aPosition" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="title" swt_gen="true">
@@ -982,52 +649,52 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cellSizeForBounds:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawInteriorWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="controlView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawWithExpansionFrame:inView:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawWithFrame:inView:" swt_gen_custom_callback="true">
-			<arg name="cellFrame"></arg>
-			<arg name="controlView"></arg>
+			<arg></arg>
+			<arg></arg>
 			<retval></retval>
 		</method>
 		<method selector="drawingRectForBounds:" swt_gen="true">
-			<arg name="theRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="expansionFrameWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="font" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="highlightColorWithFrame:inView:" swt_gen="true">
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="controlView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hitTestForEvent:inRect:ofView:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="event" swt_gen="true"></arg>
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="controlView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="image" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="imageRectForBounds:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="theRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isEnabled" swt_gen="true">
@@ -1040,66 +707,70 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlignment:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsMixedState:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAttributedStringValue:" swt_gen="true">
-			<arg name="obj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setControlSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFormatter:" swt_gen="true">
-			<arg name="newFormatter" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHighlighted:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineBreakMode:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setObjectValue:" swt_gen="true">
-			<arg name="obj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setScrollable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setWraps:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="title" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="titleRectForBounds:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="theRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="wraps" swt_gen="true">
@@ -1114,19 +785,19 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollToPoint:" swt_gen="true">
-			<arg name="newOrigin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCopiesOnScroll:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDocumentCursor:" swt_gen="true">
-			<arg name="anObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDrawsBackground:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1152,22 +823,22 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="colorUsingColorSpace:" swt_gen="true">
-			<arg name="space" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="colorUsingColorSpaceName:" swt_gen="true">
-			<arg name="colorSpace" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="colorWithDeviceRed:green:blue:alpha:" swt_gen="true">
-			<arg name="red" swt_gen="true"></arg>
-			<arg name="green" swt_gen="true"></arg>
-			<arg name="blue" swt_gen="true"></arg>
-			<arg name="alpha" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="colorWithPatternImage:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="controlBackgroundColor" swt_gen="true">
@@ -1192,7 +863,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getComponents:" swt_gen="true">
-			<arg name="components" swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+			<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="greenComponent" swt_gen="true">
@@ -1249,7 +920,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedColorPanel" swt_gen="true">
@@ -1265,23 +936,26 @@
 	</class>
 	<class name="NSComboBox" swt_gen="mixed" swt_superclass="NSTextField">
 		<method selector="addItemWithObjectValue:" swt_gen="true">
-			<arg name="object" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="deselectItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="indexOfSelectedItem" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="insertItemWithObjectValue:atIndex:" swt_gen="true">
-			<arg name="object" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="itemHeight" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="itemObjectValueAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="numberOfItems" swt_gen="true">
@@ -1294,15 +968,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setNumberOfVisibleItems:" swt_gen="true">
-			<arg name="visibleItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1337,48 +1011,52 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sendAction:to:" swt_gen="true">
-			<arg name="theAction" swt_gen="true"></arg>
-			<arg name="theTarget" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAction:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlignment:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCell:" swt_gen="true">
-			<arg name="aCell" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="setCellClass:" swt_gen="true">
-			<arg name="factoryId" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDoubleValue:" swt_gen="true">
-			<arg name="aDouble" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFormatter:" swt_gen="true">
-			<arg name="newFormatter" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setStringValue:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTarget:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sizeToFit" swt_gen="true">
@@ -1405,8 +1083,8 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithImage:hotSpot:" swt_gen="true">
-			<arg name="newImage" swt_gen="true"></arg>
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSCursor"></retval>
 		</method>
 		<method class_method="true" selector="pointingHandCursor" swt_gen="true">
@@ -1440,11 +1118,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="setHiddenUntilMouseMoves:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setOnMouseEntered:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1453,27 +1131,27 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDatePickerElements:" swt_gen="true">
-			<arg name="elementFlags" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDatePickerStyle:" swt_gen="true">
-			<arg name="newStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDateValue:" swt_gen="true">
-			<arg name="newStartDate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDrawsBackground:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTextColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1481,6 +1159,15 @@
 	</class>
 	<class name="NSDictionaryController" swt_superclass="NSArrayController">
 	</class>
+	<class name="NSDockTile" swt_gen="mixed">
+		<method selector="badgeLabel" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBadgeLabel:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+	</class>
 	<class name="NSDrawer" swt_superclass="NSResponder">
 	</class>
 	<class name="NSEPSImageRep" swt_superclass="NSImageRep">
@@ -1508,15 +1195,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:" swt_gen="true">
-			<arg name="type" swt_gen="true"></arg>
-			<arg name="location" swt_gen="true"></arg>
-			<arg name="flags" swt_gen="true"></arg>
-			<arg name="time" swt_gen="true"></arg>
-			<arg name="wNum" swt_gen="true"></arg>
-			<arg name="context" swt_gen="true"></arg>
-			<arg name="eNum" swt_gen="true"></arg>
-			<arg name="tNum" swt_gen="true"></arg>
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="keyCode" swt_gen="true">
@@ -1532,15 +1219,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:" swt_gen="true">
-			<arg name="type" swt_gen="true"></arg>
-			<arg name="location" swt_gen="true"></arg>
-			<arg name="flags" swt_gen="true"></arg>
-			<arg name="time" swt_gen="true"></arg>
-			<arg name="wNum" swt_gen="true"></arg>
-			<arg name="context" swt_gen="true"></arg>
-			<arg name="subtype" swt_gen="true"></arg>
-			<arg name="d1" swt_gen="true"></arg>
-			<arg name="d2" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="timestamp" swt_gen="true">
@@ -1555,7 +1242,7 @@
 	</class>
 	<class name="NSFileWrapper" swt_gen="mixed">
 		<method selector="setIcon:" swt_gen="true">
-			<arg name="icon" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1564,12 +1251,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="controlContentFontOfSize:" swt_gen="true">
-			<arg name="fontSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="descender" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="displayName" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="familyName" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
@@ -1577,13 +1267,21 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="fontWithName:size:" swt_gen="true">
-			<arg name="fontName" swt_gen="true"></arg>
-			<arg name="fontSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="leading" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method class_method="true" selector="menuBarFontOfSize:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method class_method="true" selector="menuFontOfSize:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="pointSize" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
@@ -1591,14 +1289,14 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="systemFontOfSize:" swt_gen="true">
-			<arg name="fontSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="systemFontSize" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="systemFontSizeForControlSize:" swt_gen="true">
-			<arg name="controlSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1610,41 +1308,41 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="availableMembersOfFontFamily:" swt_gen="true">
-			<arg name="fam" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertFont:toHaveTrait:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
-			<arg name="trait" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="fontWithFamily:traits:weight:size:" swt_gen="true">
-			<arg name="family" swt_gen="true"></arg>
-			<arg name="traits" swt_gen="true"></arg>
-			<arg name="weight" swt_gen="true"></arg>
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedFontManager" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="traitsOfFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="weightOfFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSFontPanel" swt_gen="mixed" swt_superclass="NSPanel">
 		<method selector="panelConvertFont:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPanelFont:isMultiple:" swt_gen="true">
-			<arg name="fontObj" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedFontPanel" swt_gen="true">
@@ -1657,19 +1355,19 @@
 	</class>
 	<class name="NSGradient" swt_gen="mixed">
 		<method selector="drawFromPoint:toPoint:options:" swt_gen="true">
-			<arg name="startingPoint" swt_gen="true"></arg>
-			<arg name="endingPoint" swt_gen="true"></arg>
-			<arg name="options" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawInRect:angle:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
-			<arg name="angle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithStartingColor:endingColor:" swt_gen="true">
-			<arg name="startingColor" swt_gen="true"></arg>
-			<arg name="endingColor" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSGradient"></retval>
 		</method>
 	</class>
@@ -1681,16 +1379,16 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="graphicsContextWithBitmapImageRep:" swt_gen="true">
-			<arg name="bitmapRep" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="graphicsContextWithGraphicsPort:flipped:" swt_gen="true">
-			<arg name="graphicsPort" swt_gen="true"></arg>
-			<arg name="initialFlippedState" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="graphicsContextWithWindow:" swt_gen="true">
-			<arg name="window" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="graphicsPort" swt_gen="true">
@@ -1702,6 +1400,9 @@
 		<method selector="isDrawingToScreen" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="isFlipped" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="restoreGraphicsState" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
@@ -1715,23 +1416,23 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCompositingOperation:" swt_gen="true">
-			<arg name="operation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="setCurrentContext:" swt_gen="true">
-			<arg name="context" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImageInterpolation:" swt_gen="true">
-			<arg name="interpolation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPatternPhase:" swt_gen="true">
-			<arg name="phase" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setShouldAntialias:" swt_gen="true">
-			<arg name="antialias" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="shouldAntialias" swt_gen="true">
@@ -1743,63 +1444,63 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addRepresentation:" swt_gen="true">
-			<arg name="imageRep" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="bestRepresentationForDevice:" swt_gen="true">
-			<arg name="deviceDescription" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawAtPoint:fromRect:operation:fraction:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
-			<arg name="fromRect" swt_gen="true"></arg>
-			<arg name="op" swt_gen="true"></arg>
-			<arg name="delta" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawInRect:fromRect:operation:fraction:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
-			<arg name="fromRect" swt_gen="true"></arg>
-			<arg name="op" swt_gen="true"></arg>
-			<arg name="delta" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="imageNamed:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSImage"></retval>
 		</method>
 		<method selector="initByReferencingFile:" swt_gen="true">
-			<arg name="fileName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSImage"></retval>
 		</method>
 		<method selector="initWithContentsOfFile:" swt_gen="true">
-			<arg name="fileName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSImage"></retval>
 		</method>
 		<method selector="initWithData:" swt_gen="true">
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithSize:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSImage"></retval>
 		</method>
 		<method selector="lockFocus" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeRepresentation:" swt_gen="true">
-			<arg name="imageRep" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="representations" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCacheMode:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSize:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="size" swt_gen="true">
@@ -1819,7 +1520,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawInRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hasAlpha" swt_gen="true">
@@ -1832,7 +1533,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlpha:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1841,15 +1542,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:" swt_gen="true">
-			<arg name="newImage" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImageAlignment:" swt_gen="true">
-			<arg name="newAlign" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImageScaling:" swt_gen="true">
-			<arg name="newScaling" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1858,7 +1559,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="handleMouseEvent:" swt_gen="true">
-			<arg name="theMouseEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="wantsToHandleMouseEvents" swt_gen="true">
@@ -1867,124 +1568,135 @@
 	</class>
 	<class name="NSLayoutManager" swt_gen="mixed">
 		<method selector="addTemporaryAttribute:value:forCharacterRange:" swt_gen="true">
-			<arg name="attrName" swt_gen="true"></arg>
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="charRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addTextContainer:" swt_gen="true">
-			<arg name="container" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="boundingRectForGlyphRange:inTextContainer:" swt_gen="true">
-			<arg name="glyphRange" swt_gen="true"></arg>
-			<arg name="container" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="characterIndexForGlyphAtIndex:" swt_gen="true">
-			<arg name="glyphIndex" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="defaultBaselineOffsetForFont:" swt_gen="true">
-			<arg name="theFont" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="defaultLineHeightForFont:" swt_gen="true">
-			<arg name="theFont" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawBackgroundForGlyphRange:atPoint:" swt_gen="true">
-			<arg name="glyphsToShow" swt_gen="true"></arg>
-			<arg name="origin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawGlyphsForGlyphRange:atPoint:" swt_gen="true">
-			<arg name="glyphsToShow" swt_gen="true"></arg>
-			<arg name="origin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getGlyphs:range:" swt_gen="true">
-			<arg name="glyphArray" swt_gen="true"></arg>
-			<arg name="glyphRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:" swt_gen="true">
-			<arg name="glyphRange" swt_gen="true"></arg>
-			<arg name="glyphBuffer" swt_gen="true"></arg>
-			<arg name="charIndexBuffer" swt_gen="true"></arg>
-			<arg name="inscribeBuffer" swt_gen="true"></arg>
-			<arg name="elasticBuffer" swt_gen="true"></arg>
-			<arg name="bidiLevelBuffer" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="byte[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="glyphIndexForCharacterAtIndex:" swt_gen="true">
-			<arg name="charIndex" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
-			<arg name="container" swt_gen="true"></arg>
-			<arg name="partialFraction" swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="glyphRangeForCharacterRange:actualCharacterRange:" swt_gen="true">
-			<arg name="charRange" swt_gen="true"></arg>
-			<arg name="actualCharRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="glyphRangeForTextContainer:" swt_gen="true">
-			<arg name="container" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="lineFragmentUsedRectForGlyphAtIndex:effectiveRange:" swt_gen="true">
-			<arg name="glyphIndex" swt_gen="true"></arg>
-			<arg name="effectiveGlyphRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:" swt_gen="true">
-			<arg name="glyphIndex" swt_gen="true"></arg>
-			<arg name="effectiveGlyphRange" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="locationForGlyphAtIndex:" swt_gen="true">
-			<arg name="glyphIndex" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="numberOfGlyphs" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:" swt_gen="true">
-			<arg name="charRange" swt_gen="true"></arg>
-			<arg name="selCharRange" swt_gen="true"></arg>
-			<arg name="container" swt_gen="true"></arg>
-			<arg name="rectCount" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeTemporaryAttribute:forCharacterRange:" swt_gen="true">
-			<arg name="attrName" swt_gen="true"></arg>
-			<arg name="charRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundLayoutEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineFragmentRect:forGlyphRange:usedRect:" swt_gen="true">
-			<arg name="fragmentRect" swt_gen="true"></arg>
-			<arg name="glyphRange" swt_gen="true"></arg>
-			<arg name="usedRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTextStorage:" swt_gen="true">
-			<arg name="textStorage" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setUsesScreenFonts:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="typesetter" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="usedRectForTextContainer:" swt_gen="true">
-			<arg name="container" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1996,79 +1708,85 @@
 	</class>
 	<class name="NSMenu" swt_gen="mixed">
 		<method selector="addItem:" swt_gen="true">
-			<arg name="newItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addItemWithTitle:action:keyEquivalent:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
-			<arg name="aSelector" swt_gen="true"></arg>
-			<arg name="charCode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cancelTracking" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="indexOfItemWithTarget:andAction:" swt_gen="true">
-			<arg name="target" swt_gen="true"></arg>
-			<arg name="actionSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithTitle:" swt_gen="true">
-			<arg name="aTitle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMenu"></retval>
 		</method>
 		<method selector="insertItem:atIndex:" swt_gen="true">
-			<arg name="newItem" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="itemArray" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="itemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="numberOfItems" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="popUpContextMenu:withEvent:forView:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
-			<arg name="event" swt_gen="true"></arg>
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutoenablesItems:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSubmenu:forItem:" swt_gen="true">
-			<arg name="aMenu" swt_gen="true"></arg>
-			<arg name="anItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMenuItem" swt_gen="mixed">
+		<method selector="attributedTitle" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="image" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="initWithTitle:action:keyEquivalent:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
-			<arg name="aSelector" swt_gen="true"></arg>
-			<arg name="charCode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMenuItem"></retval>
 		</method>
 		<method selector="isHidden" swt_gen="true">
@@ -2084,47 +1802,51 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAction:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setAttributedTitle:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHidden:" swt_gen="true">
-			<arg name="hidden" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:" swt_gen="true">
-			<arg name="menuImage" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setKeyEquivalent:" swt_gen="true">
-			<arg name="aKeyEquivalent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setKeyEquivalentModifierMask:" swt_gen="true">
-			<arg name="mask" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMenu:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setState:" swt_gen="true">
-			<arg name="state" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSubmenu:" swt_gen="true">
-			<arg name="submenu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTarget:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="state" swt_gen="true">
@@ -2141,45 +1863,58 @@
 	</class>
 	<class name="NSMutableAttributedString" swt_gen="mixed" swt_superclass="NSAttributedString">
 		<method selector="appendAttributedString:" swt_gen="true">
-			<arg name="attrString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mutableString" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="replaceCharactersInRange:withString:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
-			<arg name="str" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:range:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableParagraphStyle" swt_gen="mixed" swt_superclass="NSParagraphStyle">
 		<method selector="addTabStop:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlignment:" swt_gen="true">
-			<arg name="alignment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDefaultTabInterval:" swt_gen="true">
-			<arg name="aFloat" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFirstLineHeadIndent:" swt_gen="true">
-			<arg name="aFloat" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setHeadIndent:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineBreakMode:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineSpacing:" swt_gen="true">
-			<arg name="aFloat" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTabStops:" swt_gen="true">
-			<arg name="array" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2187,19 +1922,19 @@
 	</class>
 	<class name="NSObject" swt_gen="mixed">
 		<method selector="accessibilityAttributeValue:forParameter:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="attribute" swt_gen="true"></arg>
-			<arg name="parameter" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="accessibilitySetOverrideValue:forAttribute:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="attribute" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="draggedImage:endedAt:operation:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="image" swt_gen="true"></arg>
-			<arg name="screenPoint" swt_gen="true"></arg>
-			<arg name="operation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="draggingDestinationWindow" swt_gen="true">
@@ -2214,6 +1949,30 @@
 		<method selector="draggingSourceOperationMask" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="outlineView:shouldSelectItem:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="outlineView:shouldTrackCell:forTableColumn:item:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="tableView:shouldSelectRow:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="tableView:shouldTrackCell:forTableColumn:row:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 	</class>
 	<class name="NSObjectController" swt_superclass="NSController">
 	</class>
@@ -2231,15 +1990,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithFormat:shareContext:" swt_gen="true">
-			<arg name="format" swt_gen="true"></arg>
-			<arg name="share" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSOpenGLContext"></retval>
 		</method>
 		<method selector="makeCurrentContext" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setView:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="update" swt_gen="true">
@@ -2251,13 +2010,13 @@
 	</class>
 	<class name="NSOpenGLPixelFormat" swt_gen="mixed">
 		<method selector="getValues:forAttribute:forVirtualScreen:" swt_gen="true">
-			<arg name="vals" swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
-			<arg name="attrib" swt_gen="true"></arg>
-			<arg name="screen" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithAttributes:" swt_gen="true">
-			<arg name="attribs" swt_gen="true" swt_java_type="int[]"></arg>
+			<arg swt_gen="true" swt_java_type="int[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2271,83 +2030,83 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsMultipleSelection:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCanChooseDirectories:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCanChooseFiles:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSOutlineView" swt_gen="mixed" swt_superclass="NSTableView">
 		<method selector="collapseItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="collapseItem:collapseChildren:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="collapseChildren" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="expandItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="expandItem:expandChildren:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="expandChildren" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="frameOfOutlineCellAtRow:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="indentationPerLevel" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isItemExpanded:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="itemAtRow:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="levelForItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="outlineTableColumn" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="reloadItem:reloadChildren:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="reloadChildren" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rowForItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutoresizesOutlineColumn:" swt_gen="true">
-			<arg name="resize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutosaveExpandedItems:" swt_gen="true">
-			<arg name="save" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDropItem:dropChildIndex:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setOutlineTableColumn:" swt_gen="true">
-			<arg name="outlineTableColumn" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2357,7 +2116,7 @@
 	</class>
 	<class name="NSPanel" swt_gen="mixed" swt_superclass="NSWindow">
 		<method selector="setWorksWhenModal:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="worksWhenModal" swt_gen="true">
@@ -2374,51 +2133,51 @@
 	</class>
 	<class name="NSPasteboard" swt_gen="mixed">
 		<method selector="addTypes:owner:" swt_gen="true">
-			<arg name="newTypes" swt_gen="true"></arg>
-			<arg name="newOwner" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="availableTypeFromArray:" swt_gen="true">
-			<arg name="types" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="dataForType:" swt_gen="true">
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="declareTypes:owner:" swt_gen="true">
-			<arg name="newTypes" swt_gen="true"></arg>
-			<arg name="newOwner" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="generalPasteboard" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="pasteboardWithName:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="propertyListForType:" swt_gen="true">
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setData:forType:" swt_gen="true">
-			<arg name="data" swt_gen="true"></arg>
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPropertyList:forType:" swt_gen="true">
-			<arg name="plist" swt_gen="true"></arg>
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setString:forType:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stringForType:" swt_gen="true">
-			<arg name="dataType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="types" swt_gen="true">
@@ -2438,16 +2197,16 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithFrame:pullsDown:" swt_gen="true">
-			<arg name="buttonFrame" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSPopUpButton"></retval>
 		</method>
 		<method selector="itemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="itemTitleAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="menu" swt_gen="true">
@@ -2460,23 +2219,23 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutoenablesItems:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPullsDown:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="titleOfSelectedItem" swt_gen="true">
@@ -2498,7 +2257,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithDictionary:" swt_gen="true">
-			<arg name="attributes" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSPrintInfo"></retval>
 		</method>
 		<method selector="jobDisposition" swt_gen="true">
@@ -2514,15 +2273,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setJobDisposition:" swt_gen="true">
-			<arg name="disposition" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setOrientation:" swt_gen="true">
-			<arg name="orientation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPrinter:" swt_gen="true">
-			<arg name="printer" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setUpPrintOperationDefaultValues" swt_gen="true">
@@ -2549,37 +2308,37 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="printOperationWithView:printInfo:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
-			<arg name="printInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runOperation" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="setCurrentOperation:" swt_gen="true">
-			<arg name="operation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setJobTitle:" swt_gen="true">
-			<arg name="jobTitle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setShowsPrintPanel:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setShowsProgressPanel:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSPrintPanel" swt_gen="mixed">
 		<method selector="beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:" swt_gen="true">
-			<arg name="printInfo" swt_gen="true"></arg>
-			<arg name="docWindow" swt_gen="true"></arg>
-			<arg name="delegate" swt_gen="true"></arg>
-			<arg name="didEndSelector" swt_gen="true"></arg>
-			<arg name="contextInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="options" swt_gen="true">
@@ -2589,11 +2348,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runModalWithPrintInfo:" swt_gen="true">
-			<arg name="printInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setOptions:" swt_gen="true">
-			<arg name="options" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2605,7 +2364,7 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="printerWithName:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2623,38 +2382,38 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setControlSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDoubleValue:" swt_gen="true">
-			<arg name="doubleValue" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setIndeterminate:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaxValue:" swt_gen="true">
-			<arg name="newMaximum" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinValue:" swt_gen="true">
-			<arg name="newMinimum" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setUsesThreadedAnimation:" swt_gen="true">
-			<arg name="threadedAnimation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sizeToFit" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="startAnimation:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stopAnimation:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2666,114 +2425,114 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cursorUpdate:" swt_gen="true">
-			<arg name="event" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="doCommandBySelector:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="flagsChanged:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="helpRequested:" swt_gen="true">
-			<arg name="eventPtr" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="insertText:" swt_gen="true">
-			<arg name="insertString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="interpretKeyEvents:" swt_gen="true">
-			<arg name="eventArray" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="keyDown:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="keyUp:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseDown:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseDragged:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseEntered:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseExited:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseMoved:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseUp:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="moveToBeginningOfParagraph:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="moveToEndOfParagraph:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="moveUp:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="noResponderFor:" swt_gen="true">
-			<arg name="eventSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="otherMouseDown:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="otherMouseDragged:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="otherMouseUp:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="pageDown:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="pageUp:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="resignFirstResponder" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rightMouseDown:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rightMouseDragged:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rightMouseUp:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollWheel:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2789,31 +2548,31 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runModalForDirectory:file:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
-			<arg name="name" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="savePanel" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAccessoryView:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCanCreateDirectories:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDirectory:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMessage:" swt_gen="true">
-			<arg name="message" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="title" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="validateVisibleColumns" swt_gen="true">
@@ -2836,6 +2595,9 @@
 		<method class_method="true" selector="screens" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="userSpaceScaleFactor" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="visibleFrame" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
@@ -2845,10 +2607,10 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:" swt_gen="true">
-			<arg name="fSize" swt_gen="true"></arg>
-			<arg name="hFlag" swt_gen="true"></arg>
-			<arg name="vFlag" swt_gen="true"></arg>
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="contentView" swt_gen="true">
@@ -2861,46 +2623,46 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:" swt_gen="true">
-			<arg name="cSize" swt_gen="true"></arg>
-			<arg name="hFlag" swt_gen="true"></arg>
-			<arg name="vFlag" swt_gen="true"></arg>
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="reflectScrolledClipView:" swt_gen="true">
-			<arg name="cView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutohidesScrollers:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBorderType:" swt_gen="true">
-			<arg name="aType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDocumentView:" swt_gen="true">
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDrawsBackground:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHasHorizontalScroller:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHasVerticalScroller:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHorizontalScroller:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setVerticalScroller:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2911,20 +2673,28 @@
 		<method selector="hitPart" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="rectForPart:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method class_method="true" selector="scrollerWidth" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="scrollerWidthForControlSize:" swt_gen="true">
-			<arg name="controlSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setControlSize:" swt_gen="true">
-			<arg name="controlSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFloatValue:knobProportion:" swt_gen="true">
-			<arg name="aFloat" swt_gen="true"></arg>
-			<arg name="proportion" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="testPart:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -2941,75 +2711,76 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="searchTextRectForBounds:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCancelButtonCell:" swt_gen="true">
-			<arg name="cell" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSearchButtonCell:" swt_gen="true">
-			<arg name="cell" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
+	<class name="NSSecureTextField" swt_gen="true" swt_superclass="NSTextField"></class>
 	<class name="NSSecureTextFieldCell" swt_superclass="NSTextFieldCell">
 	</class>
 	<class name="NSSegmentedCell" swt_gen="mixed" swt_superclass="NSActionCell">
 		<method selector="setEnabled:forSegment:" swt_gen="true">
-			<arg name="enabled" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:forSegment:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLabel:forSegment:" swt_gen="true">
-			<arg name="label" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMenu:forSegment:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSegmentCount:" swt_gen="true">
-			<arg name="count" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSegmentStyle:" swt_gen="true">
-			<arg name="segmentStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSelected:forSegment:" swt_gen="true">
-			<arg name="selected" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSelectedSegment:" swt_gen="true">
-			<arg name="selectedSegment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTag:forSegment:" swt_gen="true">
-			<arg name="tag" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setToolTip:forSegment:" swt_gen="true">
-			<arg name="toolTip" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTrackingMode:" swt_gen="true">
-			<arg name="trackingMode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setWidth:forSegment:" swt_gen="true">
-			<arg name="width" swt_gen="true"></arg>
-			<arg name="segment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3026,11 +2797,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaxValue:" swt_gen="true">
-			<arg name="aDouble" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinValue:" swt_gen="true">
-			<arg name="aDouble" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3040,37 +2811,40 @@
 	</class>
 	<class name="NSStatusBar" swt_gen="mixed">
 		<method selector="removeStatusItem:" swt_gen="true">
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="statusItemWithLength:" swt_gen="true">
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="systemStatusBar" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="thickness" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 	</class>
 	<class name="NSStatusItem" swt_gen="mixed">
 		<method selector="drawStatusBarBackgroundInRect:withHighlight:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
-			<arg name="highlight" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="popUpStatusItemMenu:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHighlightMode:" swt_gen="true">
-			<arg name="highlightMode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLength:" swt_gen="true">
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setView:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3085,19 +2859,19 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setIncrement:" swt_gen="true">
-			<arg name="increment" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaxValue:" swt_gen="true">
-			<arg name="maxValue" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinValue:" swt_gen="true">
-			<arg name="minValue" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setValueWraps:" swt_gen="true">
-			<arg name="valueWraps" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3105,63 +2879,72 @@
 	</class>
 	<class name="NSTabView" swt_gen="mixed" swt_superclass="NSView">
 		<method selector="addTabViewItem:" swt_gen="true">
-			<arg name="tabViewItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="contentRect" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="insertTabViewItem:atIndex:" swt_gen="true">
-			<arg name="tabViewItem" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="minimumSize" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeTabViewItem:" swt_gen="true">
-			<arg name="tabViewItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectTabViewItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectedTabViewItem" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setControlSize:" swt_gen="true">
-			<arg name="controlSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFont:" swt_gen="true">
-			<arg name="font" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTabViewType:" swt_gen="true">
-			<arg name="tabViewType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="tabViewItemAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSTabViewItem" swt_gen="mixed">
+		<method selector="drawLabel:inRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="initWithIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLabel:" swt_gen="true">
-			<arg name="label" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setView:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="sizeOfLabel:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3173,38 +2956,38 @@
 			<retval swt_gen="true" swt_java_type="NSTableHeaderCell"></retval>
 		</method>
 		<method selector="initWithIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSTableColumn"></retval>
 		</method>
 		<method selector="resizingMask" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDataCell:" swt_gen="true">
-			<arg name="cell" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEditable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHeaderCell:" swt_gen="true">
-			<arg name="cell" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinWidth:" swt_gen="true">
-			<arg name="minWidth" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setResizingMask:" swt_gen="true">
-			<arg name="resizingMask" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setWidth:" swt_gen="true">
-			<arg name="width" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="width" swt_gen="true">
@@ -3213,38 +2996,38 @@
 	</class>
 	<class name="NSTableHeaderCell" swt_gen="true" swt_superclass="NSTextFieldCell">
 		<method selector="drawSortIndicatorWithFrame:inView:ascending:priority:" swt_gen="true">
-			<arg name="cellFrame" swt_gen="true"></arg>
-			<arg name="controlView" swt_gen="true"></arg>
-			<arg name="ascending" swt_gen="true"></arg>
-			<arg name="priority" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sortIndicatorRectForBounds:" swt_gen="true">
-			<arg name="theRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSTableHeaderView" swt_gen="mixed" swt_superclass="NSView">
 		<method selector="columnAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="headerRectOfColumn:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSTableView" swt_gen="mixed" swt_superclass="NSControl">
 		<method selector="addTableColumn:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="column"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="allowsColumnReordering" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="canDragRowsWithIndexes:atPoint:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="rowIndexes" swt_gen="true"></arg>
-			<arg name="mouseDownPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="clickedColumn" swt_gen="true">
@@ -3253,55 +3036,55 @@
 		<method selector="clickedRow" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="columnAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
-			<retval swt_gen="true"></retval>
-		</method>
 		<method selector="columnIndexesInRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="columnWithIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="deselectAll:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="deselectRow:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="dragImageForRowsWithIndexes:tableColumns:event:offset:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="dragRows" swt_gen="true"></arg>
-			<arg name="tableColumns" swt_gen="true"></arg>
-			<arg name="dragEvent" swt_gen="true"></arg>
-			<arg name="dragImageOffset" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="drawBackgroundInClipRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="frameOfCellAtColumn:row:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="headerView" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="highlightSelectionInClipRect:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="clipRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="intercellSpacing" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isRowSelected:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="moveColumn:toColumn:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
-			<arg name="newIndex" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="column"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="noteNumberOfRowsChanged" swt_gen="true">
@@ -3316,47 +3099,52 @@
 		<method selector="numberOfSelectedRows" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="preparedCellAtColumn:row:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="rectOfColumn:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rectOfRow:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="reloadData" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeTableColumn:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="column"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rowAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rowHeight" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="rowsInRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollColumnToVisible:" swt_gen="true">
-			<arg name="column" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollRowToVisible:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectAll:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectRowIndexes:byExtendingSelection:" swt_gen="true">
-			<arg name="indexes" swt_gen="true"></arg>
-			<arg name="extend" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectedRow" swt_gen="true">
@@ -3366,61 +3154,65 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsColumnReordering:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsMultipleSelection:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setColumnAutoresizingStyle:" swt_gen="true">
-			<arg name="style" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDataSource:" swt_gen="true">
-			<arg name="aSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDoubleAction:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDropRow:dropOperation:" swt_gen="true">
-			<arg name="row" swt_gen="true"></arg>
-			<arg name="op" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="op"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setGridStyleMask:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHeaderView:" swt_gen="true">
-			<arg name="headerView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHighlightedTableColumn:" swt_gen="true">
-			<arg name="tc" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="tc"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setIndicatorImage:inTableColumn:" swt_gen="true">
-			<arg name="anImage" swt_gen="true"></arg>
-			<arg name="tc" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="tc"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setIntercellSpacing:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setRowHeight:" swt_gen="true">
-			<arg name="rowHeight" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setUsesAlternatingRowBackgroundColors:" swt_gen="true">
-			<arg name="useAlternatingRowColors" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="tableColumns" swt_gen="true">
@@ -3435,11 +3227,11 @@
 	</class>
 	<class name="NSText" swt_gen="mixed" swt_superclass="NSView">
 		<method selector="copy:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cut:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="delegate" swt_gen="true">
@@ -3448,76 +3240,83 @@
 		<method selector="font" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="isFieldEditor" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="paste:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="replaceCharactersInRange:withString:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollRangeToVisible:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectAll:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="selectedRange" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlignment:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDrawsBackground:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEditable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFont:" swt_gen="true">
-			<arg name="obj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHorizontallyResizable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaxSize:" swt_gen="true">
-			<arg name="newMaxSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinSize:" swt_gen="true">
-			<arg name="newMinSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSelectable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSelectedRange:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setString:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTextColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sizeToFit" swt_gen="true">
@@ -3529,7 +3328,11 @@
 	</class>
 	<class name="NSTextAttachment" swt_gen="mixed">
 		<method selector="initWithFileWrapper:" swt_gen="true">
-			<arg name="fileWrapper" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true" swt_java_type="NSTextAttachment" swt_java_type64="NSTextAttachment"></retval>
+		</method>
+		<method selector="setAttachmentCell:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3538,63 +3341,63 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithContainerSize:" swt_gen="mixed">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_java_type="NSTextContainer"></retval>
 		</method>
 		<method selector="setContainerSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLineFragmentPadding:" swt_gen="true">
-			<arg name="pad" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setWidthTracksTextView:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSTextField" swt_gen="mixed" swt_superclass="NSControl">
 		<method selector="selectText:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBordered:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDrawsBackground:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEditable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setSelectable:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTextColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSTextFieldCell" swt_gen="mixed" swt_superclass="NSActionCell">
 		<method selector="setPlaceholderString:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTextColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="textColor" swt_gen="true">
@@ -3603,7 +3406,7 @@
 	</class>
 	<class name="NSTextStorage" swt_gen="mixed" swt_superclass="NSMutableAttributedString">
 		<method selector="addLayoutManager:" swt_gen="true">
-			<arg name="obj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="paragraphs" swt_gen="true">
@@ -3612,8 +3415,8 @@
 	</class>
 	<class name="NSTextTab" swt_gen="mixed">
 		<method selector="initWithType:location:" swt_gen="true">
-			<arg name="type" swt_gen="true"></arg>
-			<arg name="loc" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSTextTab"></retval>
 		</method>
 		<method selector="location" swt_gen="true">
@@ -3629,16 +3432,20 @@
 	</class>
 	<class name="NSTextView" swt_gen="mixed" swt_superclass="NSText">
 		<method selector="characterIndexForInsertionAtPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="defaultParagraphStyle" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="dragSelectionWithEvent:offset:slideBack:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="event" swt_gen="true"></arg>
-			<arg name="mouseOffset" swt_gen="true"></arg>
-			<arg name="slideBack" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="drawViewBackgroundInRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
+			<arg swt_gen="true" swt_java_type="NSRect"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="layoutManager" swt_gen="true">
@@ -3650,21 +3457,44 @@
 		<method selector="markedTextAttributes" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="selectedTextAttributes" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBaseWritingDirection:range:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="setDefaultParagraphStyle:" swt_gen="true">
-			<arg name="paragraphStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setDisplaysLinkToolTips:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLinkTextAttributes:" swt_gen="true">
-			<arg name="attributeDictionary" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setRichText:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setSelectedTextAttributes:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setUsesFontPanel:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="shouldChangeTextInRange:replacementString:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="affectedCharRange" swt_gen="true"></arg>
-			<arg name="replacementString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="shouldDrawInsertionPoint" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="textContainer" swt_gen="true">
@@ -3680,81 +3510,81 @@
 	</class>
 	<class name="NSToolbar" swt_gen="mixed">
 		<method selector="initWithIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSToolbar"></retval>
 		</method>
 		<method selector="insertItemWithItemIdentifier:atIndex:" swt_gen="true">
-			<arg name="itemIdentifier" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItemAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsUserCustomization:" swt_gen="true">
-			<arg name="allowCustomization" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDisplayMode:" swt_gen="true">
-			<arg name="displayMode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setVisible:" swt_gen="true">
-			<arg name="shown" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSToolbarItem" swt_gen="mixed">
 		<method selector="initWithItemIdentifier:" swt_gen="true">
-			<arg name="itemIdentifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSToolbarItem"></retval>
 		</method>
 		<method selector="itemIdentifier" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAction:" swt_gen="true">
-			<arg name="action" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setEnabled:" swt_gen="true">
-			<arg name="enabled" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setImage:" swt_gen="true">
-			<arg name="image" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLabel:" swt_gen="true">
-			<arg name="label" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaxSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPaletteLabel:" swt_gen="true">
-			<arg name="paletteLabel" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTarget:" swt_gen="true">
-			<arg name="target" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setToolTip:" swt_gen="true">
-			<arg name="toolTip" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setView:" swt_gen="true">
-			<arg name="view" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3762,10 +3592,10 @@
 	</class>
 	<class name="NSTrackingArea" swt_gen="mixed">
 		<method selector="initWithRect:options:owner:userInfo:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
-			<arg name="options" swt_gen="true"></arg>
-			<arg name="owner" swt_gen="true"></arg>
-			<arg name="userInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSTrackingArea"></retval>
 		</method>
 		<method selector="owner" swt_gen="true">
@@ -3779,18 +3609,18 @@
 	</class>
 	<class name="NSTypesetter" swt_gen="mixed">
 		<method selector="baselineOffsetInLayoutManager:glyphIndex:" swt_gen="true">
-			<arg name="layoutMgr" swt_gen="true"></arg>
-			<arg name="glyphIndex" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSURL" swt_gen="true">
 		<method class_method="true" selector="URLFromPasteboard:" swt_gen="true">
-			<arg name="pasteBoard" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="writeToPasteboard:" swt_gen="true">
-			<arg name="pasteBoard" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -3798,31 +3628,31 @@
 	</class>
 	<class name="NSView" swt_gen="mixed" swt_superclass="NSResponder">
 		<method selector="acceptsFirstMouse:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addSubview:" swt_gen="true">
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addSubview:positioned:relativeTo:" swt_gen="true">
-			<arg name="aView" swt_gen="true"></arg>
-			<arg name="place" swt_gen="true"></arg>
-			<arg name="otherView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addToolTipRect:owner:userData:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
-			<arg name="anObject" swt_gen="true"></arg>
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="beginDocument" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="beginPageInRect:atPlacement:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
-			<arg name="location" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="bounds" swt_gen="true">
@@ -3832,57 +3662,57 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertPoint:fromView:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertPoint:toView:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertPointFromBase:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertPointToBase:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertRect:fromView:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertRect:toView:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertRectFromBase:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertRectToBase:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertSize:fromView:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertSize:toView:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertSizeFromBase:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertSizeToBase:" swt_gen="true">
-			<arg name="aSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="discardCursorRects" swt_gen="true">
@@ -3895,22 +3725,22 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="displayRectIgnoringOpacity:inContext:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
-			<arg name="context" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="dragImage:at:offset:event:pasteboard:source:slideBack:" swt_gen="true">
-			<arg name="anImage" swt_gen="true"></arg>
-			<arg name="viewLocation" swt_gen="true"></arg>
-			<arg name="initialOffset" swt_gen="true"></arg>
-			<arg name="event" swt_gen="true"></arg>
-			<arg name="pboard" swt_gen="true"></arg>
-			<arg name="sourceObj" swt_gen="true"></arg>
-			<arg name="slideFlag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="drawRect:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_param_name="rect"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="endDocument" swt_gen="true">
@@ -3923,11 +3753,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hitTest:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithFrame:" swt_gen="true">
-			<arg name="frameRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSView"></retval>
 		</method>
 		<method selector="isFlipped" swt_gen="true">
@@ -3946,73 +3776,82 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="menuForEvent:" swt_gen="true">
-			<arg name="event" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="registerForDraggedTypes:" swt_gen="true">
-			<arg name="newTypes" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeFromSuperview" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeTrackingArea:" swt_gen="true">
-			<arg name="trackingArea" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="resetCursorRects" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="scrollClipView:toPoint:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="scrollPoint:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="scrollRectToVisible:" swt_gen="true">
-			<arg name="aRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutoresizesSubviews:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAutoresizingMask:" swt_gen="true">
-			<arg name="mask" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setBoundsRotation:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFocusRingType:" swt_gen="true">
-			<arg name="focusRingType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrame:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="frameRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrameOrigin:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="newOrigin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrameSize:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="newSize" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHidden:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setNeedsDisplay:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setNeedsDisplayInRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="invalidRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setToolTip:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="shouldDelayWindowOrderingForEvent:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="subviews" swt_gen="true">
@@ -4049,8 +3888,8 @@
 	</class>
 	<class name="NSWindow" swt_gen="mixed" swt_superclass="NSResponder">
 		<method selector="addChildWindow:ordered:" swt_gen="true">
-			<arg name="childWin" swt_gen="true"></arg>
-			<arg name="place" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="alphaValue" swt_gen="true">
@@ -4066,56 +3905,68 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cascadeTopLeftFromPoint:" swt_gen="true">
-			<arg name="topLeftPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="close" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="contentRectForFrameRect:" swt_gen="true">
-			<arg name="frameRect" swt_gen="true"></arg>
-			<retval swt_gen="true"></retval>
-		</method>
 		<method selector="contentView" swt_gen="true">
 			<retval swt_gen="true" swt_java_type="NSView"></retval>
 		</method>
 		<method selector="convertBaseToScreen:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="convertScreenToBase:" swt_gen="true">
-			<arg name="aPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="defaultButtonCell" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="delegate" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="deminiaturize:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="disableCursorRects" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="disableFlushWindow" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="display" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="enableCursorRects" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="enableFlushWindow" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="endEditingFor:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="fieldEditor:forObject:" swt_gen="true">
-			<arg name="createFlag" swt_gen="true"></arg>
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="firstResponder" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="flushWindowIfNeeded" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="frame" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="frameRectForContentRect:" swt_gen="true">
-			<arg name="contentRect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="graphicsContext" swt_gen="true">
@@ -4125,18 +3976,18 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithContentRect:styleMask:backing:defer:" swt_gen="true">
-			<arg name="contentRect" swt_gen="true"></arg>
-			<arg name="aStyle" swt_gen="true"></arg>
-			<arg name="bufferingType" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSWindow"></retval>
 		</method>
 		<method selector="initWithContentRect:styleMask:backing:defer:screen:" swt_gen="true">
-			<arg name="contentRect" swt_gen="true"></arg>
-			<arg name="aStyle" swt_gen="true"></arg>
-			<arg name="bufferingType" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
-			<arg name="screen" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSWindow"></retval>
 		</method>
 		<method selector="invalidateShadow" swt_gen="true">
@@ -4161,156 +4012,163 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="makeFirstResponder:" swt_gen="true">
-			<arg name="aResponder" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="makeKeyAndOrderFront:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="minFrameWidthWithTitle:styleMask:" swt_gen="true">
-			<arg name="aTitle" swt_gen="true"></arg>
-			<arg name="aStyle" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="minSize" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="miniaturize:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mouseLocationOutsideOfEventStream" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderBack:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderFront:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderFrontRegardless" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderOut:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="orderWindow:relativeTo:" swt_gen="true">
-			<arg name="place" swt_gen="true"></arg>
-			<arg name="otherWin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="parentWindow" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeChildWindow:" swt_gen="true">
-			<arg name="childWin" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="screen" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="sendEvent:" swt_gen="true">
-			<arg name="theEvent" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAcceptsMouseMovedEvents:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAlphaValue:" swt_gen="true">
-			<arg name="windowAlpha" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setBackgroundColor:" swt_gen="true">
-			<arg name="color" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setCollectionBehavior:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setContentView:" swt_gen="true">
-			<arg name="aView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDefaultButtonCell:" swt_gen="true">
-			<arg name="defButt" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDelegate:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDocumentEdited:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrame:display:" swt_gen="true">
-			<arg name="frameRect" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrame:display:animate:" swt_gen="true">
-			<arg name="frameRect" swt_gen="true"></arg>
-			<arg name="displayFlag" swt_gen="true"></arg>
-			<arg name="animateFlag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setHasShadow:" swt_gen="true">
-			<arg name="hasShadow" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setLevel:" swt_gen="true">
-			<arg name="newLevel" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setOpaque:" swt_gen="true">
-			<arg name="isOpaque" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setReleasedWhenClosed:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setShowsResizeIndicator:" swt_gen="true">
-			<arg name="show" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setShowsToolbarButton:" swt_gen="true">
-			<arg name="show" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setTitle:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setToolbar:" swt_gen="true">
-			<arg name="toolbar" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="standardWindowButton:" swt_gen="true">
-			<arg name="b" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="styleMask" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="toggleToolbarShown:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="toolbar" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="userSpaceScaleFactor" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="windowNumber" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="zoom:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -4318,435 +4176,880 @@
 	</class>
 	<class name="NSWorkspace" swt_gen="mixed">
 		<method selector="fullPathForApplication:" swt_gen="true">
-			<arg name="appName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getInfoForFile:application:type:" swt_gen="true">
-			<arg name="fullPath" swt_gen="true"></arg>
-			<arg name="appName" swt_gen="true"></arg>
-			<arg name="type" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="iconForFile:" swt_gen="true">
-			<arg name="fullPath" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="iconForFileType:" swt_gen="true">
-			<arg name="fileType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isFilePackageAtPath:" swt_gen="true">
-			<arg name="fullPath" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="openFile:withApplication:" swt_gen="true">
-			<arg name="fullPath" swt_gen="true"></arg>
-			<arg name="appName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="openURL:" swt_gen="true">
-			<arg name="url" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:" swt_gen="true">
-			<arg name="urls" swt_gen="true"></arg>
-			<arg name="bundleIdentifier" swt_gen="true"></arg>
-			<arg name="options" swt_gen="true"></arg>
-			<arg name="descriptor" swt_gen="true"></arg>
-			<arg name="identifiers" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedWorkspace" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="type:conformsToType:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="typeOfFile:error:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 	</class>
+	<constant name="NSAccessibilityAttributedStringForRangeParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityBackgroundColorTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityBoundsForRangeParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityButtonRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityCheckBoxRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityChildrenAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityColorWellRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityColumnRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityColumnsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityComboBoxRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityConfirmAction" swt_gen="true"></constant>
+	<constant name="NSAccessibilityContentsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityDescriptionAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityDialogSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityEnabledAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityExpandedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFloatingWindowSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFocusedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFocusedUIElementChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFocusedWindowChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFontFamilyKey" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFontNameKey" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFontSizeKey" swt_gen="true"></constant>
+	<constant name="NSAccessibilityFontTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityForegroundColorTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityGridRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityGroupRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityHeaderAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityHelpAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityHelpTagRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityHorizontalOrientationValue" swt_gen="true"></constant>
+	<constant name="NSAccessibilityHorizontalScrollBarAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityImageRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityIncrementorRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityIndexAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityInsertionPointLineNumberAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityLabelValueAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityLineForIndexParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityLinkRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityLinkTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityLinkedUIElementsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityListRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMaxValueAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMenuBarRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMenuButtonRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMenuItemRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMenuRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMinValueAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMisspelledTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityMovedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityNextContentsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityNumberOfCharactersAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityOrientationAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityOutlineRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityOutlineRowSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityParentAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityPopUpButtonRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityPositionAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityPressAction" swt_gen="true"></constant>
+	<constant name="NSAccessibilityPreviousContentsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityProgressIndicatorRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRTFForRangeParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRadioButtonRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRadioGroupRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRangeForLineParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRangeForPositionParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityResizedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRoleAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRoleDescriptionAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRowCountChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRowRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityRowsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityScrollAreaRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityScrollBarRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedChildrenAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedChildrenChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedColumnsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedRowsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedRowsChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedTextChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedTextRangeAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySelectedTextRangesAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityServesAsTitleForUIElementsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityShowMenuAction" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySizeAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySliderRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySortButtonRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySplitterRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStandardWindowSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStaticTextRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStrikethroughColorTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStrikethroughTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStringForRangeParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityStyleRangeForIndexParameterizedAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySubroleAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySuperscriptTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilitySystemDialogSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTabGroupRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTableRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTableRowSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTabsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTextAreaRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTextFieldRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTextLinkSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTitleAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTitleChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTitleUIElementAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityToolbarRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityTopLevelUIElementAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityURLAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityUnderlineColorTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityUnderlineTextAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityUnknownRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityUnknownSubrole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityValueAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityValueChangedNotification" swt_gen="true"></constant>
+	<constant name="NSAccessibilityValueDescriptionAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityValueIndicatorRole" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVerticalOrientationValue" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVerticalScrollBarAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVisibleCharacterRangeAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVisibleChildrenAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVisibleColumnsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVisibleNameKey" swt_gen="true"></constant>
+	<constant name="NSAccessibilityVisibleRowsAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityWindowAttribute" swt_gen="true"></constant>
+	<constant name="NSAccessibilityWindowRole" swt_gen="true"></constant>
+	<constant name="NSApplicationDidChangeScreenParametersNotification" swt_gen="true"></constant>
+	<constant name="NSAttachmentAttributeName" swt_gen="true"></constant>
+	<constant name="NSBackgroundColorAttributeName" swt_gen="true"></constant>
+	<constant name="NSBaselineOffsetAttributeName" swt_gen="true"></constant>
+	<constant name="NSCalibratedRGBColorSpace" swt_gen="true"></constant>
+	<constant name="NSCursorAttributeName" swt_gen="true"></constant>
+	<constant name="NSDeviceRGBColorSpace" swt_gen="true"></constant>
+	<constant name="NSDeviceResolution" swt_gen="true"></constant>
+	<constant name="NSDragPboard" swt_gen="true"></constant>
+	<constant name="NSEventTrackingRunLoopMode" swt_gen="true"></constant>
+	<constant name="NSFilenamesPboardType" swt_gen="true"></constant>
+	<constant name="NSFontAttributeName" swt_gen="true"></constant>
+	<constant name="NSForegroundColorAttributeName" swt_gen="true"></constant>
+	<constant name="NSHTMLPboardType" swt_gen="true"></constant>
+	<constant name="NSLinkAttributeName" swt_gen="true"></constant>
+	<constant name="NSModalPanelRunLoopMode" swt_gen="true"></constant>
+	<constant name="NSObliquenessAttributeName" swt_gen="true"></constant>
+	<constant name="NSOutlineViewColumnDidMoveNotification" swt_gen="true"></constant>
+	<constant name="NSParagraphStyleAttributeName" swt_gen="true"></constant>
+	<constant name="NSPrintAllPages" swt_gen="true"></constant>
+	<constant name="NSPrintCopies" swt_gen="true"></constant>
+	<constant name="NSPrintFirstPage" swt_gen="true"></constant>
+	<constant name="NSPrintJobDisposition" swt_gen="true"></constant>
+	<constant name="NSPrintLastPage" swt_gen="true"></constant>
+	<constant name="NSPrintMustCollate" swt_gen="true"></constant>
+	<constant name="NSPrintPreviewJob" swt_gen="true"></constant>
+	<constant name="NSPrintSaveJob" swt_gen="true"></constant>
+	<constant name="NSPrintSavePath" swt_gen="true"></constant>
+	<constant name="NSPrintScalingFactor" swt_gen="true"></constant>
+	<constant name="NSPrintSpoolJob" swt_gen="true"></constant>
+	<constant name="NSRTFPboardType" swt_gen="true"></constant>
+	<constant name="NSSpellingStateAttributeName" swt_gen="true"></constant>
+	<constant name="NSStrikethroughColorAttributeName" swt_gen="true"></constant>
+	<constant name="NSStrikethroughStyleAttributeName" swt_gen="true"></constant>
+	<constant name="NSStringPboardType" swt_gen="true"></constant>
+	<constant name="NSStrokeWidthAttributeName" swt_gen="true"></constant>
+	<constant name="NSSystemColorsDidChangeNotification" swt_gen="true"></constant>
+	<constant name="NSTIFFPboardType" swt_gen="true"></constant>
+	<constant name="NSTableViewColumnDidMoveNotification" swt_gen="true"></constant>
+	<constant name="NSToolbarCustomizeToolbarItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarDidRemoveItemNotification" swt_gen="true"></constant>
+	<constant name="NSToolbarFlexibleSpaceItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarPrintItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarSeparatorItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarShowColorsItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarShowFontsItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarSpaceItemIdentifier" swt_gen="true"></constant>
+	<constant name="NSToolbarWillAddItemNotification" swt_gen="true"></constant>
+	<constant name="NSURLPboardType" swt_gen="true"></constant>
+	<constant name="NSUnderlineColorAttributeName" swt_gen="true"></constant>
+	<constant name="NSUnderlineStyleAttributeName" swt_gen="true"></constant>
+	<constant name="NSViewGlobalFrameDidChangeNotification" swt_gen="true"></constant>
+	<enum name="NSAlertFirstButtonReturn" swt_gen="true"></enum>
+	<enum name="NSAlertSecondButtonReturn" swt_gen="true"></enum>
+	<enum name="NSAlertThirdButtonReturn" swt_gen="true"></enum>
+	<enum name="NSAlphaFirstBitmapFormat" swt_gen="true"></enum>
+	<enum name="NSAlphaNonpremultipliedBitmapFormat" swt_gen="true"></enum>
+	<enum name="NSAlternateKeyMask" swt_gen="true"></enum>
+	<enum name="NSApplicationDefined" swt_gen="true"></enum>
+	<enum name="NSApplicationDelegateReplySuccess" swt_gen="true"></enum>
+	<enum name="NSAtTop" swt_gen="true"></enum>
+	<enum name="NSBackingStoreBuffered" swt_gen="true"></enum>
+	<enum name="NSBackspaceCharacter" swt_gen="true"></enum>
+	<enum name="NSBevelLineJoinStyle" swt_gen="true"></enum>
+	<enum name="NSBezelBorder" swt_gen="true"></enum>
+	<enum name="NSBoldFontMask" swt_gen="true"></enum>
+	<enum name="NSBorderlessWindowMask" swt_gen="true"></enum>
+	<enum name="NSBottomTabsBezelBorder" swt_gen="true"></enum>
+	<enum name="NSBoxCustom" swt_gen="true"></enum>
+	<enum name="NSBoxSeparator" swt_gen="true"></enum>
+	<enum name="NSButtLineCapStyle" swt_gen="true"></enum>
+	<enum name="NSCancelButton" swt_gen="true"></enum>
+	<enum name="NSCarriageReturnCharacter" swt_gen="true"></enum>
+	<enum name="NSCenterTextAlignment" swt_gen="true"></enum>
+	<enum name="NSClockAndCalendarDatePickerStyle" swt_gen="true"></enum>
+	<enum name="NSClosableWindowMask" swt_gen="true"></enum>
+	<enum name="NSClosePathBezierPathElement" swt_gen="true"></enum>
+	<enum name="NSCommandKeyMask" swt_gen="true"></enum>
+	<enum name="NSCompositeClear" swt_gen="true"></enum>
+	<enum name="NSCompositeCopy" swt_gen="true"></enum>
+	<enum name="NSCompositeSourceOver" swt_gen="true"></enum>
+	<enum name="NSCompositeXOR" swt_gen="true"></enum>
+	<enum name="NSControlKeyMask" swt_gen="true"></enum>
+	<enum name="NSCriticalAlertStyle" swt_gen="true"></enum>
+	<enum name="NSCurveToBezierPathElement" swt_gen="true"></enum>
+	<enum name="NSDeleteCharacter" swt_gen="true"></enum>
+	<enum name="NSDeviceIndependentModifierFlagsMask" swt_gen="true"></enum>
+	<enum name="NSDragOperationCopy" swt_gen="true"></enum>
+	<enum name="NSDragOperationDelete" swt_gen="true"></enum>
+	<enum name="NSDragOperationEvery" swt_gen="true"></enum>
+	<enum name="NSDragOperationLink" swt_gen="true"></enum>
+	<enum name="NSDragOperationMove" swt_gen="true"></enum>
+	<enum name="NSDragOperationNone" swt_gen="true"></enum>
+	<enum name="NSEnterCharacter" swt_gen="true"></enum>
+	<enum name="NSEvenOddWindingRule" swt_gen="true"></enum>
+	<enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum>
+	<enum name="NSFlagsChanged" swt_gen="true"></enum>
+	<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
+	<enum name="NSHelpFunctionKey" swt_gen="true"></enum>
+	<enum name="NSHelpKeyMask" swt_gen="true"></enum>
+	<enum name="NSHourMinuteDatePickerElementFlag" swt_gen="true"></enum>
+	<enum name="NSHourMinuteSecondDatePickerElementFlag" swt_gen="true"></enum>
+	<enum name="NSImageAbove" swt_gen="true"></enum>
+	<enum name="NSImageAlignCenter" swt_gen="true"></enum>
+	<enum name="NSImageAlignLeft" swt_gen="true"></enum>
+	<enum name="NSImageAlignRight" swt_gen="true"></enum>
+	<enum name="NSImageCacheNever" swt_gen="true"></enum>
+	<enum name="NSImageInterpolationDefault" swt_gen="true"></enum>
+	<enum name="NSImageInterpolationHigh" swt_gen="true"></enum>
+	<enum name="NSImageInterpolationLow" swt_gen="true"></enum>
+	<enum name="NSImageInterpolationNone" swt_gen="true"></enum>
+	<enum name="NSImageLeft" swt_gen="true"></enum>
+	<enum name="NSImageOnly" swt_gen="true"></enum>
+	<enum name="NSImageOverlaps" swt_gen="true"></enum>
+	<enum name="NSInformationalAlertStyle" swt_gen="true"></enum>
+	<enum name="NSItalicFontMask" swt_gen="true"></enum>
+	<enum name="NSJustifiedTextAlignment" swt_gen="true"></enum>
+	<enum name="NSKeyDown" swt_gen="true"></enum>
+	<enum name="NSKeyUp" swt_gen="true"></enum>
+	<enum name="NSLandscapeOrientation" swt_gen="true"></enum>
+	<enum name="NSLeftMouseDown" swt_gen="true"></enum>
+	<enum name="NSLeftMouseDownMask" swt_gen="true"></enum>
+	<enum name="NSLeftMouseDragged" swt_gen="true"></enum>
+	<enum name="NSLeftMouseDraggedMask" swt_gen="true"></enum>
+	<enum name="NSLeftMouseUp" swt_gen="true"></enum>
+	<enum name="NSLeftMouseUpMask" swt_gen="true"></enum>
+	<enum name="NSLeftTabStopType" swt_gen="true"></enum>
+	<enum name="NSLeftTextAlignment" swt_gen="true"></enum>
+	<enum name="NSLineBreakByClipping" swt_gen="true"></enum>
+	<enum name="NSLineBreakByTruncatingMiddle" swt_gen="true"></enum>
+	<enum name="NSLineBreakByWordWrapping" swt_gen="true"></enum>
+	<enum name="NSLineToBezierPathElement" swt_gen="true"></enum>
+	<enum name="NSMiniaturizableWindowMask" swt_gen="true"></enum>
+	<enum name="NSMiterLineJoinStyle" swt_gen="true"></enum>
+	<enum name="NSMixedState" swt_gen="true"></enum>
+	<enum name="NSMomentaryLightButton" swt_gen="true"></enum>
+	<enum name="NSMouseEntered" swt_gen="true"></enum>
+	<enum name="NSMouseExited" swt_gen="true"></enum>
+	<enum name="NSMouseMoved" swt_gen="true"></enum>
+	<enum name="NSMoveToBezierPathElement" swt_gen="true"></enum>
+	<enum name="NSNewlineCharacter" swt_gen="true"></enum>
+	<enum name="NSNoBorder" swt_gen="true"></enum>
+	<enum name="NSNoImage" swt_gen="true"></enum>
+	<enum name="NSNoTitle" swt_gen="true"></enum>
+	<enum name="NSNonZeroWindingRule" swt_gen="true"></enum>
+	<enum name="NSOffState" swt_gen="true"></enum>
+	<enum name="NSOnState" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFAAccumSize" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFAAlphaSize" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFAColorSize" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFADepthSize" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFADoubleBuffer" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFASampleBuffers" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFASamples" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFAStencilSize" swt_gen="true"></enum>
+	<enum name="NSOpenGLPFAStereo" swt_gen="true"></enum>
+	<enum name="NSOtherMouseDown" swt_gen="true"></enum>
+	<enum name="NSOtherMouseDragged" swt_gen="true"></enum>
+	<enum name="NSOtherMouseUp" swt_gen="true"></enum>
+	<enum name="NSOutlineViewDropOnItemIndex" swt_gen="true"></enum>
+	<enum name="NSPageDownFunctionKey" swt_gen="true"></enum>
+	<enum name="NSPageUpFunctionKey" swt_gen="true"></enum>
+	<enum name="NSPortraitOrientation" swt_gen="true"></enum>
+	<enum name="NSPrintPanelShowsPageSetupAccessory" swt_gen="true"></enum>
+	<enum name="NSProgressIndicatorPreferredThickness" swt_gen="true"></enum>
+	<enum name="NSPushOnPushOffButton" swt_gen="true"></enum>
+	<enum name="NSRadioButton" swt_gen="true"></enum>
+	<enum name="NSRegularControlSize" swt_gen="true"></enum>
+	<enum name="NSResizableWindowMask" swt_gen="true"></enum>
+	<enum name="NSRightMouseDown" swt_gen="true"></enum>
+	<enum name="NSRightMouseDragged" swt_gen="true"></enum>
+	<enum name="NSRightMouseUp" swt_gen="true"></enum>
+	<enum name="NSRightTextAlignment" swt_gen="true"></enum>
+	<enum name="NSRoundLineCapStyle" swt_gen="true"></enum>
+	<enum name="NSRoundLineJoinStyle" swt_gen="true"></enum>
+	<enum name="NSRoundedBezelStyle" swt_gen="true"></enum>
+	<enum name="NSScaleNone" swt_gen="true"></enum>
+	<enum name="NSScrollWheel" swt_gen="true"></enum>
+	<enum name="NSScrollerDecrementLine" swt_gen="true"></enum>
+	<enum name="NSScrollerDecrementPage" swt_gen="true"></enum>
+	<enum name="NSScrollerIncrementLine" swt_gen="true"></enum>
+	<enum name="NSScrollerIncrementPage" swt_gen="true"></enum>
+	<enum name="NSScrollerKnob" swt_gen="true"></enum>
+	<enum name="NSScrollerKnobSlot" swt_gen="true"></enum>
+	<enum name="NSShadowlessSquareBezelStyle" swt_gen="true"></enum>
+	<enum name="NSShiftKeyMask" swt_gen="true"></enum>
+	<enum name="NSSmallControlSize" swt_gen="true"></enum>
+	<enum name="NSSquareLineCapStyle" swt_gen="true"></enum>
+	<enum name="NSStatusWindowLevel" swt_gen="true"></enum>
+	<enum name="NSSwitchButton" swt_gen="true"></enum>
+	<enum name="NSSystemDefined" swt_gen="true"></enum>
+	<enum name="NSTabCharacter" swt_gen="true"></enum>
+	<enum name="NSTableColumnNoResizing" swt_gen="true"></enum>
+	<enum name="NSTableColumnUserResizingMask" swt_gen="true"></enum>
+	<enum name="NSTableViewDropAbove" swt_gen="true"></enum>
+	<enum name="NSTableViewDropOn" swt_gen="true"></enum>
+	<enum name="NSTableViewGridNone" swt_gen="true"></enum>
+	<enum name="NSTableViewNoColumnAutoresizing" swt_gen="true"></enum>
+	<enum name="NSTableViewSolidVerticalGridLineMask" swt_gen="true"></enum>
+	<enum name="NSTerminateCancel" swt_gen="true"></enum>
+	<enum name="NSTerminateNow" swt_gen="true"></enum>
+	<enum name="NSTextFieldAndStepperDatePickerStyle" swt_gen="true"></enum>
+	<enum name="NSTitledWindowMask" swt_gen="true"></enum>
+	<enum name="NSUnderlineStyleDouble" swt_gen="true"></enum>
+	<enum name="NSUnderlineStyleNone" swt_gen="true"></enum>
+	<enum name="NSUnderlineStyleSingle" swt_gen="true"></enum>
+	<enum name="NSUnderlineStyleThick" swt_gen="true"></enum>
+	<enum name="NSViewHeightSizable" swt_gen="true"></enum>
+	<enum name="NSViewMaxXMargin" swt_gen="true"></enum>
+	<enum name="NSViewMaxYMargin" swt_gen="true"></enum>
+	<enum name="NSViewMinXMargin" swt_gen="true"></enum>
+	<enum name="NSViewMinYMargin" swt_gen="true"></enum>
+	<enum name="NSViewWidthSizable" swt_gen="true"></enum>
+	<enum name="NSWarningAlertStyle" swt_gen="true"></enum>
+	<enum name="NSWindowAbove" swt_gen="true"></enum>
+	<enum name="NSWindowBelow" swt_gen="true"></enum>
+	<enum name="NSWindowCollectionBehaviorCanJoinAllSpaces" swt_gen="true"></enum>
+	<enum name="NSWindowCollectionBehaviorDefault" swt_gen="true"></enum>
+	<enum name="NSWindowCollectionBehaviorMoveToActiveSpace" swt_gen="true"></enum>
+	<enum name="NSWritingDirectionLeftToRight" swt_gen="true"></enum>
+	<enum name="NSWritingDirectionNatural" swt_gen="true"></enum>
+	<enum name="NSWritingDirectionRightToLeft" swt_gen="true"></enum>
+	<enum name="NSYearMonthDatePickerElementFlag" swt_gen="true"></enum>
+	<enum name="NSYearMonthDayDatePickerElementFlag" swt_gen="true"></enum>
+	<function name="NSAccessibilityActionDescription" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityPostNotification" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="NSAccessibilityRaiseBadArgumentException" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="NSAccessibilityRoleDescription" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityRoleDescriptionForUIElement" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityUnignoredAncestor" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityUnignoredChildren" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityUnignoredChildrenForOnlyChild" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSAccessibilityUnignoredDescendant" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSBeep" swt_gen="true"></function>
+	<function name="NSBitsPerPixelFromDepth" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSCopyBits" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="NSNumberOfColorComponents" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
 	<informal_protocol name="NSAccessibility" swt_gen="true">
 		<method selector="accessibilityActionDescription:" swt_gen="true">
-			<arg name="action" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilityActionNames" swt_gen="true"></method>
 		<method selector="accessibilityAttributeNames" swt_gen="true"></method>
 		<method selector="accessibilityAttributeValue:" swt_gen="true">
-			<arg name="attribute" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilityAttributeValue:forParameter:" swt_gen="true" swt_gen_super_msgSend="true">
-			<arg name="attribute" swt_gen="true"></arg>
-			<arg name="parameter" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilityFocusedUIElement" swt_gen="true"></method>
 		<method selector="accessibilityHitTest:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilityIsAttributeSettable:" swt_gen="true">
-			<arg name="attribute" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilityIsIgnored" swt_gen="true"></method>
 		<method selector="accessibilityParameterizedAttributeNames" swt_gen="true"></method>
 		<method selector="accessibilityPerformAction:" swt_gen="true">
-			<arg name="action" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="accessibilitySetValue:forAttribute:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="attribute" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSAccessibilityAdditions" swt_gen="true">
 		<method selector="accessibilitySetOverrideValue:forAttribute:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="attribute" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSApplicationDelegate" swt_gen="mixed">
+		<method selector="application:openFile:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="application:openFiles:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="applicationDockMenu:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="applicationShouldHandleReopen:hasVisibleWindows:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
 		<method selector="applicationShouldTerminate:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSApplicationNotifications" swt_gen="mixed">
 		<method selector="applicationDidBecomeActive:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="applicationDidFinishLaunching:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="applicationDidResignActive:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="applicationWillFinishLaunching:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="applicationWillTerminate:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSColorPanelResponderMethod" swt_gen="true">
 		<method selector="changeColor:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSComboBoxNotifications" swt_gen="mixed">
 		<method selector="comboBoxSelectionDidChange:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="comboBoxWillDismiss:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="comboBoxWillPopUp:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSDraggingDestination" swt_gen="mixed">
 		<method selector="draggingEnded:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="draggingEntered:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="draggingExited:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="draggingUpdated:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="performDragOperation:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="wantsPeriodicDraggingUpdates" swt_gen="true"></method>
 	</informal_protocol>
 	<informal_protocol name="NSDraggingSource" swt_gen="mixed">
 		<method selector="draggedImage:beganAt:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="image" swt_gen="true"></arg>
-			<arg name="screenPoint" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="draggedImage:endedAt:operation:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="image" swt_gen="true"></arg>
-			<arg name="screenPoint" swt_gen="true"></arg>
-			<arg name="operation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="draggingSourceOperationMaskForLocal:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="ignoreModifierKeysWhileDragging" swt_gen="true"></method>
 	</informal_protocol>
 	<informal_protocol name="NSFontManagerResponderMethod" swt_gen="true">
 		<method selector="changeFont:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSMenuDelegate" swt_gen="mixed">
 		<method selector="menu:willHighlightItem:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="menuDidClose:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="menuNeedsUpdate:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="menuWillOpen:" swt_gen="true">
-			<arg name="menu" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSOutlineViewDataSource" swt_gen="mixed">
 		<method selector="outlineView:acceptDrop:item:childIndex:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="info" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:child:ofItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:isItemExpandable:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:numberOfChildrenOfItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:objectValueForTableColumn:byItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:setObjectValue:forTableColumn:byItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="object" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:validateDrop:proposedItem:proposedChildIndex:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="info" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:writeItems:toPasteboard:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="items" swt_gen="true"></arg>
-			<arg name="pasteboard" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSOutlineViewDelegate" swt_gen="mixed">
 		<method selector="outlineView:didClickTableColumn:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:shouldCollapseItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:shouldExpandItem:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineView:willDisplayCell:forTableColumn:item:" swt_gen="true">
-			<arg name="outlineView" swt_gen="true"></arg>
-			<arg name="cell" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="item" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSOutlineViewNotifications" swt_gen="mixed">
 		<method selector="outlineViewColumnDidMove:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineViewColumnDidResize:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineViewItemDidExpand:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="outlineViewSelectionDidChange:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="outlineViewSelectionIsChanging:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSPasteboardOwner" swt_gen="mixed">
 		<method selector="pasteboard:provideDataForType:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="type" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSSavePanelDelegate" swt_gen="mixed">
 		<method selector="panel:shouldShowFilename:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="filename" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSTabViewDelegate" swt_gen="mixed">
 		<method selector="tabView:didSelectTabViewItem:" swt_gen="true">
-			<arg name="tabView" swt_gen="true"></arg>
-			<arg name="tabViewItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tabView:shouldSelectTabViewItem:" swt_gen="true">
-			<arg name="tabView" swt_gen="true"></arg>
-			<arg name="tabViewItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tabView:willSelectTabViewItem:" swt_gen="true">
-			<arg name="tabView" swt_gen="true"></arg>
-			<arg name="tabViewItem" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSTableDataSource" swt_gen="mixed">
 		<method selector="numberOfRowsInTableView:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:acceptDrop:row:dropOperation:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="info" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
-			<arg name="dropOperation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:objectValueForTableColumn:row:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:setObjectValue:forTableColumn:row:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="object" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:validateDrop:proposedRow:proposedDropOperation:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="info" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
-			<arg name="dropOperation" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:writeRowsWithIndexes:toPasteboard:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="rowIndexes" swt_gen="true"></arg>
-			<arg name="pboard" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSTableViewDelegate" swt_gen="mixed">
 		<method selector="tableView:didClickTableColumn:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:shouldEditTableColumn:row:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableView:willDisplayCell:forTableColumn:row:" swt_gen="true">
-			<arg name="tableView" swt_gen="true"></arg>
-			<arg name="cell" swt_gen="true"></arg>
-			<arg name="tableColumn" swt_gen="true"></arg>
-			<arg name="row" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
-	<informal_protocol name="NSTableViewNotifications" swt_gen="mixed">
+	<informal_protocol name="NSTableViewNotifications" swt_gen="true">
 		<method selector="tableViewColumnDidMove:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableViewColumnDidResize:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="tableViewSelectionDidChange:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="tableViewSelectionIsChanging:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSTextDelegate" swt_gen="mixed">
 		<method selector="textDidChange:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="textDidEndEditing:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+	</informal_protocol>
+	<informal_protocol name="NSTextInput" swt_gen="true">
+		<method selector="attributedSubstringFromRange:" swt_gen="true" swt_gen_custom_callback="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="characterIndexForPoint:" swt_gen="true" swt_gen_custom_callback="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="firstRectForCharacterRange:" swt_gen="true" swt_gen_custom_callback="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="hasMarkedText" swt_gen="true"></method>
+		<method selector="insertText:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="markedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
+		<method selector="selectedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
+		<method selector="setMarkedText:selectedRange:" swt_gen="true" swt_gen_custom_callback="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
+		<method selector="unmarkText" swt_gen="true"></method>
+		<method selector="validAttributesForMarkedText" swt_gen="true"></method>
 	</informal_protocol>
 	<informal_protocol name="NSTextViewDelegate" swt_gen="mixed">
 		<method selector="textView:clickedOnLink:atIndex:" swt_gen="true">
-			<arg name="textView" swt_gen="true"></arg>
-			<arg name="link" swt_gen="true"></arg>
-			<arg name="charIndex" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="textView:willChangeSelectionFromCharacterRange:toCharacterRange:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="textView" swt_gen="true"></arg>
-			<arg name="oldSelectedCharRange" swt_gen="true"></arg>
-			<arg name="newSelectedCharRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="textViewDidChangeSelection:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSToolTipOwner" swt_gen="true">
 		<method selector="view:stringForToolTip:point:userData:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="view" swt_gen="true"></arg>
-			<arg name="tag" swt_gen="true"></arg>
-			<arg name="point" swt_gen="true"></arg>
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSToolbarDelegate" swt_gen="true">
 		<method selector="toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:" swt_gen="true">
-			<arg name="toolbar" swt_gen="true"></arg>
-			<arg name="itemIdentifier" swt_gen="true"></arg>
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="toolbarAllowedItemIdentifiers:" swt_gen="true">
-			<arg name="toolbar" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="toolbarDefaultItemIdentifiers:" swt_gen="true">
-			<arg name="toolbar" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="toolbarSelectableItemIdentifiers:" swt_gen="true">
-			<arg name="toolbar" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSToolbarNotifications" swt_gen="true">
 		<method selector="toolbarDidRemoveItem:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="toolbarWillAddItem:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSWindowDelegate" swt_gen="mixed">
 		<method selector="windowShouldClose:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="NSWindowNotifications" swt_gen="mixed">
 		<method selector="windowDidBecomeKey:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="windowDidDeminiaturize:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="windowDidMiniaturize:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="windowDidMove:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="windowDidResignKey:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="windowDidResize:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="windowWillClose:" swt_gen="true">
-			<arg name="notification" swt_gen="true"></arg>
-		</method>
-	</informal_protocol>
-	<class name="NSSecureTextField" swt_gen="true" swt_superclass="NSTextField"></class>
-	<informal_protocol name="NSTextInput" swt_gen="true">
-		<method selector="markedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
-		<method selector="insertText:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
-		</method>
-		<method selector="unmarkText" swt_gen="true"></method>
-		<method selector="hasMarkedText" swt_gen="true"></method>
-		<method selector="validAttributesForMarkedText" swt_gen="true"></method>
-		<method selector="characterIndexForPoint:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="thePoint" swt_gen="true"></arg>
-		</method>
-		<method selector="attributedSubstringFromRange:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="theRange" swt_gen="true"></arg>
-		</method>
-		<method selector="selectedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
-		<method selector="setMarkedText:selectedRange:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="selRange" swt_gen="true"></arg>
-			<arg name="aString" swt_gen="true"></arg>
-		</method>
-		<method selector="firstRectForCharacterRange:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="theRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 </signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java
new file mode 100644
index 0000000..da171ad
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CFRange.java	
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class CFRange {
+	public int /*long*/ location;
+	public int /*long*/ length;
+	public static int sizeof = OS.CFRange_sizeof();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java
new file mode 100644
index 0000000..520553b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CGAffineTransform.java	
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class CGAffineTransform {
+	public float /*double*/ a;
+	public float /*double*/ b;
+	public float /*double*/ c;
+	public float /*double*/ d;
+	public float /*double*/ tx;
+	public float /*double*/ ty;
+	public static int sizeof = OS.CGAffineTransform_sizeof();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java
new file mode 100644
index 0000000..fafe146
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CTParagraphStyleSetting.java	
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.swt.internal.cocoa;
+
+public class CTParagraphStyleSetting {
+	/** @field cast=(CTParagraphStyleSpecifier) */
+	public int spec;
+	public int /*long*/ valueSize;
+	/** @field cast=(void *) */
+	public int /*long*/ value;
+	public static final int sizeof = OS.CTParagraphStyleSetting_sizeof();
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras
index 556ef89..9688a20 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreFoundationFull.bridgesupport.extras	
@@ -1,50 +1,93 @@
 <?xml version="1.0" encoding="UTF8"?>
 <signatures swt_gen="mixed">
+	<constant name="kCFAllocatorDefault" swt_gen="true"></constant>
 	<constant name="kCFRunLoopCommonModes" swt_gen="true"></constant>
 	<enum name="kCFRunLoopBeforeWaiting" swt_gen="true"></enum>
 	<enum name="kCFStringEncodingUTF8" swt_gen="true"></enum>
+	<function name="CFAttributedStringCreate" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
 	<function name="CFDataGetBytePtr" swt_gen="true">
-		<arg name="theData" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CFDataGetLength" swt_gen="true">
-		<arg name="theData" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CFDictionaryAddValue" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CFDictionaryCreateMutable" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CFRelease" swt_gen="true">
-		<arg name="cf" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CFRunLoopAddObserver" swt_gen="true">
-		<arg name="rl" swt_gen="true"></arg>
-		<arg name="observer" swt_gen="true"></arg>
-		<arg name="mode" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CFRunLoopGetCurrent" swt_gen="true">
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CFRunLoopObserverCreate" swt_gen="true">
-		<arg name="allocator" swt_gen="true"></arg>
-		<arg name="activities" swt_gen="true"></arg>
-		<arg name="repeats" swt_gen="true"></arg>
-		<arg name="order" swt_gen="true"></arg>
-		<arg name="callout" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true">
 			<arg swt_gen="true"></arg>
 			<arg></arg>
 			<arg></arg>
 			<retval swt_gen="true"></retval>
 		</arg>
-		<arg name="context" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CFRunLoopObserverInvalidate" swt_gen="true">
-		<arg name="observer" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CFRunLoopRunInMode" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CFRunLoopStop" swt_gen="true">
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CFStringCreateWithCharacters" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="char[]"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CFURLCreateFromFSRef" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="byte[]"></arg>
+		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CFURLCreateStringByAddingPercentEscapes" swt_gen="true">
-		<arg name="allocator" swt_gen="true"></arg>
-		<arg name="originalString" swt_gen="true"></arg>
-		<arg name="charactersToLeaveUnescaped" swt_gen="true"></arg>
-		<arg name="legalURLCharactersToBeEscaped" swt_gen="true"></arg>
-		<arg name="encoding" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
+	<struct name="CFRange" swt_gen="true">
+		<field name="length" swt_gen="true"></field>
+		<field name="location" swt_gen="true"></field>
+	</struct>
 </signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras
index 9a493c1..f08cef2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreGraphicsFull.bridgesupport.extras	
@@ -1,21 +1,5 @@
 <?xml version="1.0" encoding="UTF8"?>
 <signatures swt_gen="mixed">
-	<struct name="CGPathElement" swt_gen="true">
-		<field name="type" swt_gen="true"></field>
-		<field name="points" swt_gen="true"></field>
-	</struct>
-	<struct name="CGPoint" swt_gen="true">
-		<field name="x" swt_gen="true"></field>
-		<field name="y" swt_gen="true"></field>
-	</struct>
-	<struct name="CGRect" swt_gen="true">
-		<field name="origin" swt_gen="true"></field>
-		<field name="size" swt_gen="true"></field>
-	</struct>
-	<struct name="CGSize" swt_gen="true">
-		<field name="width" swt_gen="true"></field>
-		<field name="height" swt_gen="true"></field>
-	</struct>
 	<cftype name="CGMutablePathRef" swt_gen="true"></cftype>
 	<enum name="kCGBlendModeDifference" swt_gen="true"></enum>
 	<enum name="kCGEventFilterMaskPermitLocalKeyboardEvents" swt_gen="true"></enum>
@@ -42,107 +26,133 @@
 	<enum name="kCGPathElementMoveToPoint" swt_gen="true"></enum>
 	<enum name="kCGPathStroke" swt_gen="true"></enum>
 	<enum name="kCGSessionEventTap" swt_gen="true"></enum>
+	<enum name="kCGTextFillStroke" swt_gen="true"></enum>
 	<function name="CGBitmapContextCreate" swt_gen="true">
-		<arg name="data" swt_gen="true"></arg>
-		<arg name="width" swt_gen="true"></arg>
-		<arg name="height" swt_gen="true"></arg>
-		<arg name="bitsPerComponent" swt_gen="true"></arg>
-		<arg name="bytesPerRow" swt_gen="true"></arg>
-		<arg name="colorspace" swt_gen="true"></arg>
-		<arg name="bitmapInfo" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="colorspace"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGBitmapContextCreateImage" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="c"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGBitmapContextGetData" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="c"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
+	<function name="CGColorCreate" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CGColorRelease" swt_gen="true">
+		<arg swt_gen="true"></arg>
+	</function>
 	<function name="CGColorSpaceCreateDeviceRGB" swt_gen="true">
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGColorSpaceRelease" swt_gen="true">
-		<arg name="space" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextAddPath" swt_gen="true">
-		<arg name="context" swt_gen="true"></arg>
-		<arg name="path" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextDrawImage" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="rect" swt_gen="true"></arg>
-		<arg name="image" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextFillRect" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="rect" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextRelease" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextReplacePathWithStrokedPath" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextRestoreGState" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSaveGState" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextScaleCTM" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="sx" swt_gen="true"></arg>
-		<arg name="sy" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetBlendMode" swt_gen="true">
-		<arg name="context" swt_gen="true"></arg>
-		<arg name="mode" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetFillColor" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="components" swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+		<arg swt_gen="true" swt_param_name="c"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
 	</function>
 	<function name="CGContextSetFillColorSpace" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="colorspace" swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="c"></arg>
+		<arg swt_gen="true" swt_param_name="colorspace"></arg>
 	</function>
 	<function name="CGContextSetLineCap" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="cap" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetLineDash" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="phase" swt_gen="true"></arg>
-		<arg name="lengths" swt_gen="true" swt_java_type="float[]" swt_java_type64="float[]"></arg>
-		<arg name="count" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="float[]"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetLineJoin" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="join" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetLineWidth" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="width" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextSetMiterLimit" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="limit" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CGContextSetShouldAntialias" swt_gen="true">
+		<arg swt_gen="true" swt_param_name="c"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CGContextSetTextDrawingMode" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CGContextSetTextMatrix" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CGContextSetTextPosition" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextStrokePath" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGContextTranslateCTM" swt_gen="true">
-		<arg name="c" swt_gen="true"></arg>
-		<arg name="tx" swt_gen="true"></arg>
-		<arg name="ty" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGDataProviderCreateWithData" swt_gen="true">
-		<arg name="info" swt_gen="true"></arg>
-		<arg name="data" swt_gen="true"></arg>
-		<arg name="size" swt_gen="true"></arg>
-		<arg name="releaseData" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true">
 			<arg swt_gen="true"></arg>
 			<arg></arg>
 			<arg></arg>
@@ -151,161 +161,190 @@
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDataProviderRelease" swt_gen="true">
-		<arg name="provider" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGDisplayBaseAddress" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDisplayBitsPerPixel" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDisplayBitsPerSample" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDisplayBytesPerRow" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDisplayPixelsHigh" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGDisplayPixelsWide" swt_gen="true">
-		<arg name="display" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGEnableEventStateCombining" swt_gen="true">
-		<arg name="doCombineState" swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="doCombineState"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGEventCreateKeyboardEvent" swt_gen="true">
-		<arg name="source" swt_gen="true"></arg>
-		<arg name="virtualKey" swt_gen="true"></arg>
-		<arg name="keyDown" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGEventGetIntegerValueField" swt_gen="true">
-		<arg name="event" swt_gen="true"></arg>
-		<arg name="field" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGEventKeyboardSetUnicodeString" swt_gen="true">
-		<arg name="event" swt_gen="true"></arg>
-		<arg name="stringLength" swt_gen="true"></arg>
-		<arg name="unicodeString" swt_gen="true" swt_java_type="char[]"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="char[]"></arg>
 	</function>
 	<function name="CGEventPost" swt_gen="true">
-		<arg name="tap" swt_gen="true"></arg>
-		<arg name="event" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGGetDisplaysWithRect" swt_gen="true">
-		<arg name="rect" swt_gen="true"></arg>
-		<arg name="maxDisplays" swt_gen="true"></arg>
-		<arg name="dspys" swt_gen="true"></arg>
-		<arg name="dspyCnt" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_cast="CGDisplayCount"></arg>
+		<arg swt_gen="true" swt_param_name="dspys"></arg>
+		<arg swt_gen="true" swt_param_cast="CGDisplayCount*" swt_param_name="dspyCnt"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGImageCreate" swt_gen="true">
-		<arg name="width" swt_gen="true"></arg>
-		<arg name="height" swt_gen="true"></arg>
-		<arg name="bitsPerComponent" swt_gen="true"></arg>
-		<arg name="bitsPerPixel" swt_gen="true"></arg>
-		<arg name="bytesPerRow" swt_gen="true"></arg>
-		<arg name="colorspace" swt_gen="true"></arg>
-		<arg name="bitmapInfo" swt_gen="true"></arg>
-		<arg name="provider" swt_gen="true"></arg>
-		<arg name="decode" swt_gen="true"></arg>
-		<arg name="shouldInterpolate" swt_gen="true"></arg>
-		<arg name="intent" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_param_name="colorspace"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGImageGetHeight" swt_gen="true">
-		<arg name="image" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGImageGetWidth" swt_gen="true">
-		<arg name="image" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGImageRelease" swt_gen="true">
-		<arg name="image" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPathAddCurveToPoint" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
-		<arg name="m" swt_gen="true"></arg>
-		<arg name="cp1x" swt_gen="true"></arg>
-		<arg name="cp1y" swt_gen="true"></arg>
-		<arg name="cp2x" swt_gen="true"></arg>
-		<arg name="cp2y" swt_gen="true"></arg>
-		<arg name="x" swt_gen="true"></arg>
-		<arg name="y" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPathAddLineToPoint" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
-		<arg name="m" swt_gen="true"></arg>
-		<arg name="x" swt_gen="true"></arg>
-		<arg name="y" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CGPathAddRect" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPathApply" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
-		<arg name="info" swt_gen="true"></arg>
-		<arg name="function" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true">
 			<arg swt_gen="true"></arg>
 			<arg></arg>
 			<retval swt_gen="true"></retval>
 		</arg>
 	</function>
 	<function name="CGPathCloseSubpath" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPathCreateCopy" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGPathCreateMutable" swt_gen="true">
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGPathMoveToPoint" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
-		<arg name="m" swt_gen="true"></arg>
-		<arg name="x" swt_gen="true"></arg>
-		<arg name="y" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPathRelease" swt_gen="true">
-		<arg name="path" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 	</function>
 	<function name="CGPostKeyboardEvent" swt_gen="true">
-		<arg name="keyChar" swt_gen="true"></arg>
-		<arg name="virtualKey" swt_gen="true"></arg>
-		<arg name="keyDown" swt_gen="true" swt_java_type="boolean" swt_java_type64="boolean"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="boolean" swt_java_type64="boolean"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGPostMouseEvent" swt_gen="true" swt_variadic_count="4" swt_variadic_java_types="boolean,*">
-		<arg name="mouseCursorPosition" swt_gen="true"></arg>
-		<arg name="updateMouseCursorPosition" swt_gen="true" swt_java_type="boolean"></arg>
-		<arg name="buttonCount" swt_gen="true"></arg>
-		<arg name="mouseButtonDown" swt_gen="true" swt_java_type="boolean"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="boolean"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="boolean"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGPostScrollWheelEvent" swt_gen="true">
-		<arg name="wheelCount" swt_gen="true"></arg>
-		<arg name="wheel1" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGSetLocalEventsFilterDuringSuppressionState" swt_gen="true">
-		<arg name="filter" swt_gen="true"></arg>
-		<arg name="state" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGSetLocalEventsSuppressionInterval" swt_gen="true">
-		<arg name="seconds" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
 	<function name="CGWarpMouseCursorPosition" swt_gen="true">
-		<arg name="newCursorPosition" swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
 		<retval swt_gen="true"></retval>
 	</function>
+	<struct name="CGAffineTransform" swt_gen="true">
+		<field name="a" swt_gen="true"></field>
+		<field name="b" swt_gen="true"></field>
+		<field name="c" swt_gen="true"></field>
+		<field name="d" swt_gen="true"></field>
+		<field name="tx" swt_gen="true"></field>
+		<field name="ty" swt_gen="true"></field>
+	</struct>
+	<struct name="CGPathElement" swt_gen="true">
+		<field name="points" swt_gen="true"></field>
+		<field name="type" swt_gen="true"></field>
+	</struct>
+	<struct name="CGPoint" swt_gen="true">
+		<field name="x" swt_gen="true"></field>
+		<field name="y" swt_gen="true"></field>
+	</struct>
+	<struct name="CGRect" swt_gen="true">
+		<field name="origin" swt_gen="true"></field>
+		<field name="size" swt_gen="true"></field>
+	</struct>
+	<struct name="CGSize" swt_gen="true">
+		<field name="height" swt_gen="true"></field>
+		<field name="width" swt_gen="true"></field>
+	</struct>
 </signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras
new file mode 100644
index 0000000..6ce5f6d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/CoreTextFull.bridgesupport.extras	
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF8"?>
+<signatures swt_gen="mixed">
+	<constant name="kCTFontAttributeName" swt_gen="true"></constant>
+	<constant name="kCTForegroundColorAttributeName" swt_gen="true"></constant>
+	<constant name="kCTParagraphStyleAttributeName" swt_gen="true"></constant>
+	<enum name="kCTParagraphStyleSpecifierBaseWritingDirection" swt_gen="true"></enum>
+	<enum name="kCTWritingDirectionLeftToRight" swt_gen="true"></enum>
+	<enum name="kCTWritingDirectionNatural" swt_gen="true"></enum>
+	<enum name="kCTWritingDirectionRightToLeft" swt_gen="true"></enum>
+	<function name="CTFontGetAscent" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTFontGetDescent" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTFontGetLeading" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTLineCreateWithAttributedString" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTLineDraw" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+	</function>
+	<function name="CTLineGetTypographicBounds" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+		<arg swt_gen="true" swt_java_type="float[]" swt_java_type64="double[]"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTParagraphStyleCreate" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTTypesetterCreateLine" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTTypesetterCreateWithAttributedString" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="CTTypesetterSuggestLineBreak" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<struct name="CTParagraphStyleSetting" swt_gen="true">
+		<field name="spec" swt_gen="true"></field>
+		<field name="value" swt_gen="true"></field>
+		<field name="valueSize" swt_gen="true"></field>
+	</struct>
+</signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java
index efd23a5..503ee08 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMMouseEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,14 +32,6 @@ public short button() {
 	return (short)OS.objc_msgSend(this.id, OS.sel_button);
 }
 
-public int clientX() {
-	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientX);
-}
-
-public int clientY() {
-	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientY);
-}
-
 public boolean ctrlKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey);
 }
@@ -48,6 +40,14 @@ public boolean metaKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_metaKey);
 }
 
+public int screenX() {
+	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenX);
+}
+
+public int screenY() {
+	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenY);
+}
+
 public boolean shiftKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java
index 4d2aac4..9b99a8f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/DOMWheelEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,14 +28,6 @@ public boolean altKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_altKey);
 }
 
-public int clientX() {
-	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientX);
-}
-
-public int clientY() {
-	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_clientY);
-}
-
 public boolean ctrlKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey);
 }
@@ -44,6 +36,14 @@ public boolean metaKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_metaKey);
 }
 
+public int screenX() {
+	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenX);
+}
+
+public int screenY() {
+	return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_screenY);
+}
+
 public boolean shiftKey() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
index a94303e..e9ff140 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras	
@@ -1,68 +1,5 @@
 <?xml version="1.0" encoding="UTF8"?>
 <signatures swt_gen="mixed">
-	<struct name="NSAffineTransformStruct" swt_gen="true">
-		<field name="m11" swt_gen="true"></field>
-		<field name="m12" swt_gen="true"></field>
-		<field name="m21" swt_gen="true"></field>
-		<field name="m22" swt_gen="true"></field>
-		<field name="tX" swt_gen="true"></field>
-		<field name="tY" swt_gen="true"></field>
-	</struct>
-	<struct name="NSPoint" swt_gen="true">
-		<field name="x" swt_gen="true"></field>
-		<field name="y" swt_gen="true"></field>
-	</struct>
-	<struct name="NSRange" swt_gen="true">
-		<field name="location" swt_gen="true"></field>
-		<field name="length" swt_gen="true"></field>
-	</struct>
-	<struct name="NSRect" swt_gen="true">
-		<field name="origin" swt_gen="true"></field>
-		<field name="size" swt_gen="true"></field>
-	</struct>
-	<struct name="NSSize" swt_gen="true">
-		<field name="width" swt_gen="true"></field>
-		<field name="height" swt_gen="true"></field>
-	</struct>
-	<constant name="NSDefaultRunLoopMode" swt_gen="true"></constant>
-	<constant name="NSErrorFailingURLStringKey" swt_gen="true"></constant>
-	<enum name="NSAllApplicationsDirectory" swt_gen="true"></enum>
-	<enum name="NSAllDomainsMask" swt_gen="true"></enum>
-	<enum name="NSNotFound" swt_gen="true"></enum>
-	<enum name="NSOrderedSame" swt_gen="true"></enum>
-	<enum name="NSURLCredentialPersistenceForSession" swt_gen="true"></enum>
-	<enum name="NSURLErrorBadURL" swt_gen="true"></enum>
-	<enum name="NSURLRequestReloadIgnoringLocalCacheData" swt_gen="true"></enum>
-	<enum name="NSUTF8StringEncoding" swt_gen="true"></enum>
-	<function name="NSEqualRects" swt_gen="true">
-		<arg name="aRect" swt_gen="true"></arg>
-		<arg name="bRect" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSFileTypeForHFSTypeCode" swt_gen="true">
-		<arg name="hfsFileTypeCode" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSGetSizeAndAlignment" swt_gen="true">
-		<arg name="typePtr" swt_gen="true"></arg>
-		<arg name="sizep" swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
-		<arg name="alignp" swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSPointInRect" swt_gen="true">
-		<arg name="aPoint" swt_gen="true"></arg>
-		<arg name="aRect" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSSearchPathForDirectoriesInDomains" swt_gen="true">
-		<arg name="directory" swt_gen="true"></arg>
-		<arg name="domainMask" swt_gen="true"></arg>
-		<arg name="expandTilde" swt_gen="true"></arg>
-		<retval swt_gen="true"></retval>
-	</function>
-	<function name="NSTemporaryDirectory" swt_gen="true">
-		<retval swt_gen="true"></retval>
-	</function>
 	<class name="NSAppleEventDescriptor" swt_gen="mixed">
 		<method selector="initListDescriptor" swt_gen="true">
 			<retval swt_gen="true" swt_java_type="NSAppleEventDescriptor"></retval>
@@ -73,32 +10,52 @@
 			<retval swt_gen="true" swt_java_type="NSArray"></retval>
 		</method>
 		<method class_method="true" selector="arrayWithObject:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_alloc="true" swt_gen="true" swt_java_type="NSArray"></retval>
 		</method>
 		<method selector="containsObject:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="count" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="indexOfObjectIdenticalTo:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="objectAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+	</class>
+	<class name="NSAssertionHandler" swt_gen="true">
+		<method class_method="true" selector="currentHandler" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="handleFailureInFunction:file:lineNumber:description:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="handleFailureInMethod:object:file:lineNumber:description:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSAttributedString" swt_gen="mixed">
 		<method selector="attributedSubstringFromRange:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithString:" swt_gen="true">
-			<arg name="str" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSAttributedString"></retval>
 		</method>
 		<method selector="length" swt_gen="true">
@@ -110,7 +67,7 @@
 	</class>
 	<class name="NSAutoreleasePool" swt_gen="mixed">
 		<method class_method="true" selector="enableFreedObjectCheck:" swt_gen="true">
-			<arg name="enable" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -122,11 +79,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="bundleWithIdentifier:" swt_gen="true">
-			<arg name="identifier" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="bundleWithPath:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="infoDictionary" swt_gen="true">
@@ -136,12 +93,12 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="objectForInfoDictionaryKey:" swt_gen="true">
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="pathForResource:ofType:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
-			<arg name="ext" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="resourcePath" swt_gen="true">
@@ -153,13 +110,13 @@
 			<retval swt_gen="true" swt_java_type="NSCalendarDate"></retval>
 		</method>
 		<method class_method="true" selector="dateWithYear:month:day:hour:minute:second:timeZone:" swt_gen="true">
-			<arg name="year" swt_gen="true"></arg>
-			<arg name="month" swt_gen="true"></arg>
-			<arg name="day" swt_gen="true"></arg>
-			<arg name="hour" swt_gen="true"></arg>
-			<arg name="minute" swt_gen="true"></arg>
-			<arg name="second" swt_gen="true"></arg>
-			<arg name="aTimeZone" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSCalendarDate"></retval>
 		</method>
 		<method selector="dayOfMonth" swt_gen="true">
@@ -186,7 +143,7 @@
 	</class>
 	<class name="NSCharacterSet" swt_gen="mixed">
 		<method selector="characterIsMember:" swt_gen="true">
-			<arg name="aCharacter" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="decimalDigitCharacterSet" swt_gen="true">
@@ -215,17 +172,17 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="dataWithBytes:length:" swt_gen="true">
-			<arg name="bytes" swt_gen="true" swt_java_type="byte[]"></arg>
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="byte[]"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSData"></retval>
 		</method>
 		<method selector="getBytes:" swt_gen="true">
-			<arg name="buffer" swt_gen="true" swt_java_type="byte[]"></arg>
+			<arg swt_gen="true" swt_java_type="byte[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getBytes:length:" swt_gen="true">
-			<arg name="buffer" swt_gen="true"></arg>
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="length" swt_gen="true">
@@ -234,12 +191,12 @@
 	</class>
 	<class name="NSDate" swt_gen="mixed">
 		<method selector="dateWithCalendarFormat:timeZone:" swt_gen="true">
-			<arg name="format" swt_gen="true"></arg>
-			<arg name="aTimeZone" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="dateWithTimeIntervalSinceNow:" swt_gen="true">
-			<arg name="secs" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_alloc="true" swt_gen="true" swt_java_type="NSDate"></retval>
 		</method>
 		<method class_method="true" selector="distantFuture" swt_gen="true">
@@ -260,19 +217,19 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="dictionaryWithObject:forKey:" swt_gen="true">
-			<arg name="object" swt_gen="true"></arg>
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_alloc="true" swt_gen="true" swt_java_type="NSDictionary"></retval>
 		</method>
 		<method selector="objectEnumerator" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="objectForKey:" swt_gen="true">
-			<arg name="aKey" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="valueForKey:" swt_gen="true">
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -303,43 +260,47 @@
 	</class>
 	<class name="NSFileManager" swt_gen="mixed">
 		<method selector="createFileAtPath:contents:attributes:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
-			<arg name="data" swt_gen="true"></arg>
-			<arg name="attr" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="defaultManager" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="enumeratorAtPath:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="fileExistsAtPath:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="fileExistsAtPath:isDirectory:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
-			<arg name="isDirectory" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="isExecutableFileAtPath:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeItemAtPath:error:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
-			<arg name="error" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSFormatter" swt_gen="mixed">
 		<method selector="stringForObjectValue:" swt_gen="true">
-			<arg name="obj" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSHTTPCookie" swt_gen="mixed">
 		<method class_method="true" selector="cookiesWithResponseHeaderFields:forURL:" swt_gen="true">
-			<arg name="headerFields" swt_gen="true"></arg>
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isSessionOnly" swt_gen="true">
@@ -357,15 +318,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cookiesForURL:" swt_gen="true">
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="deleteCookie:" swt_gen="true">
-			<arg name="cookie" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setCookie:" swt_gen="true">
-			<arg name="cookie" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="sharedHTTPCookieStorage" swt_gen="true">
@@ -376,7 +337,7 @@
 	</class>
 	<class name="NSIndexSet" swt_gen="mixed">
 		<method selector="containsIndex:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="count" swt_gen="true">
@@ -386,17 +347,17 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getIndexes:maxCount:inIndexRange:" swt_gen="true">
-			<arg name="indexBuffer" swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
-			<arg name="bufferSize" swt_gen="true"></arg>
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithIndex:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSIndexSet"></retval>
 		</method>
 		<method selector="initWithIndexesInRange:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSIndexSet"></retval>
 		</method>
 	</class>
@@ -408,13 +369,13 @@
 	</class>
 	<class name="NSKeyedArchiver" swt_gen="mixed" swt_superclass="NSCoder">
 		<method class_method="true" selector="archivedDataWithRootObject:" swt_gen="true">
-			<arg name="rootObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSKeyedUnarchiver" swt_gen="mixed" swt_superclass="NSCoder">
 		<method class_method="true" selector="unarchiveObjectWithData:" swt_gen="true">
-			<arg name="data" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -430,42 +391,42 @@
 	</class>
 	<class name="NSMutableArray" swt_gen="mixed" swt_superclass="NSArray">
 		<method selector="addObject:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="addObjectsFromArray:" swt_gen="true">
-			<arg name="otherArray" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="arrayWithCapacity:" swt_gen="true">
-			<arg name="numItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMutableArray"></retval>
 		</method>
 		<method selector="initWithCapacity:" swt_gen="true">
-			<arg name="numItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMutableArray"></retval>
 		</method>
 		<method selector="removeLastObject" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeObject:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeObjectAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeObjectIdenticalTo:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableAttributedString" swt_gen="mixed" swt_superclass="NSAttributedString">
 		<method selector="addAttribute:value:range:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="beginEditing" swt_gen="true">
@@ -475,12 +436,12 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="removeAttribute:range:" swt_gen="true">
-			<arg name="name" swt_gen="true"></arg>
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAttributedString:" swt_gen="true">
-			<arg name="attrString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -490,57 +451,79 @@
 	</class>
 	<class name="NSMutableDictionary" swt_gen="mixed" swt_superclass="NSDictionary">
 		<method class_method="true" selector="dictionaryWithCapacity:" swt_gen="true">
-			<arg name="numItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMutableDictionary"></retval>
 		</method>
 		<method selector="initWithCapacity:" swt_gen="true">
-			<arg name="numItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSMutableDictionary"></retval>
 		</method>
 		<method selector="removeObjectForKey:" swt_gen="true">
-			<arg name="aKey" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDictionary:" swt_gen="true">
-			<arg name="otherDictionary" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setObject:forKey:" swt_gen="true">
-			<arg name="anObject" swt_gen="true"></arg>
-			<arg name="aKey" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setValue:forKey:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableIndexSet" swt_gen="mixed" swt_superclass="NSIndexSet">
 		<method selector="addIndex:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableSet" swt_gen="mixed" swt_superclass="NSSet">
 		<method selector="addObjectsFromArray:" swt_gen="true">
-			<arg name="array" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableString" swt_gen="mixed" swt_superclass="NSString">
 		<method selector="appendString:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="replaceCharactersInRange:withString:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setString:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="NSMutableURLRequest" swt_gen="mixed" swt_superclass="NSURLRequest">
 		<method selector="setCachePolicy:" swt_gen="true">
-			<arg name="policy" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setHTTPBody:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setHTTPMethod:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setURL:" swt_gen="true">
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setValue:forHTTPHeaderField:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -556,17 +539,23 @@
 	</class>
 	<class name="NSNotificationCenter" swt_gen="mixed">
 		<method selector="addObserver:selector:name:object:" swt_gen="true">
-			<arg name="observer" swt_gen="true"></arg>
-			<arg name="aSelector" swt_gen="true"></arg>
-			<arg name="aName" swt_gen="true"></arg>
-			<arg name="anObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="defaultCenter" swt_gen="true">
 			<retval swt_gen="true" swt_java_type="NSNotificationCenter"></retval>
 		</method>
 		<method selector="removeObserver:" swt_gen="true">
-			<arg name="observer" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="removeObserver:name:object:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -587,19 +576,19 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="numberWithBool:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="numberWithDouble:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="numberWithInt:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="numberWithInteger:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -626,39 +615,39 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setAllowsFloats:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaximum:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaximumFractionDigits:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMaximumIntegerDigits:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinimum:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinimumFractionDigits:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setMinimumIntegerDigits:" swt_gen="true">
-			<arg name="number" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setNumberStyle:" swt_gen="true">
-			<arg name="style" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPartialStringValidationEnabled:" swt_gen="true">
-			<arg name="b" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -667,14 +656,14 @@
 			<retval swt_gen="true" swt_java_type="NSObject"></retval>
 		</method>
 		<method selector="cancelAuthenticationChallenge:" swt_gen="true">
-			<arg name="challenge" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="className" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="conformsToProtocol:" swt_gen="true">
-			<arg name="aProtocol" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="copy" swt_gen="true">
@@ -687,31 +676,38 @@
 			<retval swt_gen="true" swt_java_type="NSObject"></retval>
 		</method>
 		<method selector="isEqual:" swt_gen="true">
-			<arg name="object" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isEqualTo:" swt_gen="true">
-			<arg name="object" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="isKindOfClass:" swt_gen="true">
-			<arg name="aClass" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="mutableCopy" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="performSelector:withObject:afterDelay:inModes:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="performSelectorOnMainThread:withObject:waitUntilDone:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
-			<arg name="arg" swt_gen="true"></arg>
-			<arg name="wait" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="release" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="respondsToSelector:" swt_gen="true">
-			<arg name="aSelector" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="retain" swt_gen="true">
@@ -721,20 +717,20 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setValue:forKey:" swt_gen="true">
-			<arg name="value" swt_gen="true"></arg>
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="superclass" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="useCredential:forAuthenticationChallenge:" swt_gen="true">
-			<arg name="credential" swt_gen="true"></arg>
-			<arg name="challenge" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="valueForKey:" swt_gen="true">
-			<arg name="key" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -752,8 +748,8 @@
 	</class>
 	<class name="NSRunLoop" swt_gen="mixed">
 		<method selector="addTimer:forMode:" swt_gen="true">
-			<arg name="timer" swt_gen="true"></arg>
-			<arg name="mode" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="currentRunLoop" swt_gen="true">
@@ -763,8 +759,8 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="runMode:beforeDate:" swt_gen="true">
-			<arg name="mode" swt_gen="true"></arg>
-			<arg name="limitDate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -794,32 +790,32 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="characterAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="int" swt_java_type64="long"></retval>
 		</method>
 		<method selector="compare:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="fileSystemRepresentation" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getCharacters:" swt_gen="true">
-			<arg name="buffer" swt_gen="true" swt_java_type="char[]"></arg>
+			<arg swt_gen="true" swt_java_type="char[]"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="getCharacters:range:" swt_gen="true">
-			<arg name="buffer" swt_gen="true" swt_java_type="char[]"></arg>
-			<arg name="aRange" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="char[]"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithCharacters:length:" swt_gen="true">
-			<arg name="characters" swt_gen="true" swt_java_type="char[]"></arg>
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="char[]"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSString"></retval>
 		</method>
 		<method selector="isEqualToString:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="lastPathComponent" swt_gen="true">
@@ -834,16 +830,23 @@
 		<method selector="pathExtension" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method class_method="true" selector="string" swt_gen="true">
+			<retval swt_gen="true" swt_java_type="NSString"></retval>
+		</method>
 		<method selector="stringByAddingPercentEscapesUsingEncoding:" swt_gen="true">
-			<arg name="enc" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stringByAppendingPathComponent:" swt_gen="true">
-			<arg name="str" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="stringByAppendingPathExtension:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stringByAppendingString:" swt_gen="true">
-			<arg name="aString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stringByDeletingLastPathComponent" swt_gen="true">
@@ -853,21 +856,21 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stringByReplacingOccurrencesOfString:withString:" swt_gen="true">
-			<arg name="target" swt_gen="true"></arg>
-			<arg name="replacement" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="stringWithCharacters:length:" swt_gen="true">
-			<arg name="characters" swt_gen="true" swt_java_type="char[]"></arg>
-			<arg name="length" swt_gen="true"></arg>
+			<arg swt_gen="true" swt_java_type="char[]"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_alloc="true" swt_gen="true" swt_java_type="NSString"></retval>
 		</method>
 		<method class_method="true" selector="stringWithFormat:" swt_gen="true">
-			<arg name="stringWithFormat" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSString"></retval>
 		</method>
 		<method class_method="true" selector="stringWithUTF8String:" swt_gen="true">
-			<arg name="nullTerminatedCString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSString"></retval>
 		</method>
 	</class>
@@ -892,15 +895,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:" swt_gen="true">
-			<arg name="ti" swt_gen="true"></arg>
-			<arg name="aTarget" swt_gen="true"></arg>
-			<arg name="aSelector" swt_gen="true"></arg>
-			<arg name="userInfo" swt_gen="true"></arg>
-			<arg name="yesOrNo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFireDate:" swt_gen="true">
-			<arg name="date" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="userInfo" swt_gen="true">
@@ -909,19 +912,25 @@
 	</class>
 	<class name="NSURL" swt_gen="mixed">
 		<method class_method="true" selector="URLWithString:" swt_gen="true">
-			<arg name="URLString" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSURL"></retval>
 		</method>
 		<method selector="absoluteString" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="fileURLWithPath:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSURL"></retval>
 		</method>
+		<method selector="host" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="isFileURL" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="path" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 	</class>
 	<class name="NSURLAuthenticationChallenge" swt_gen="mixed">
 		<method selector="previousFailureCount" swt_gen="true">
@@ -939,9 +948,9 @@
 	</class>
 	<class name="NSURLCredential" swt_gen="mixed">
 		<method class_method="true" selector="credentialWithUser:password:persistence:" swt_gen="true">
-			<arg name="user" swt_gen="true"></arg>
-			<arg name="password" swt_gen="true"></arg>
-			<arg name="persistence" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="hasPassword" swt_gen="true">
@@ -959,8 +968,8 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDestination:allowOverwrite:" swt_gen="true">
-			<arg name="path" swt_gen="true"></arg>
-			<arg name="allowOverwrite" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -980,11 +989,11 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithURL:" swt_gen="true">
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="NSURLRequest"></retval>
 		</method>
 		<method class_method="true" selector="requestWithURL:" swt_gen="true">
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_alloc="true" swt_gen="true" swt_java_type="NSURLRequest"></retval>
 		</method>
 	</class>
@@ -1009,19 +1018,19 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="valueWithPoint:" swt_gen="true">
-			<arg name="point" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="valueWithRange:" swt_gen="true">
-			<arg name="range" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="valueWithRect:" swt_gen="true">
-			<arg name="rect" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="valueWithSize:" swt_gen="true">
-			<arg name="size" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -1035,10 +1044,75 @@
 	</class>
 	<class name="NSXMLElement" swt_superclass="NSXMLNode">
 	</class>
+	<constant name="NSDefaultRunLoopMode" swt_gen="true"></constant>
+	<constant name="NSErrorFailingURLStringKey" swt_gen="true"></constant>
+	<enum name="NSAllApplicationsDirectory" swt_gen="true"></enum>
+	<enum name="NSAllDomainsMask" swt_gen="true"></enum>
+	<enum name="NSNotFound" swt_gen="true"></enum>
+	<enum name="NSOrderedSame" swt_gen="true"></enum>
+	<enum name="NSURLCredentialPersistenceForSession" swt_gen="true"></enum>
+	<enum name="NSURLErrorBadURL" swt_gen="true"></enum>
+	<enum name="NSURLErrorSecureConnectionFailed" swt_gen="true"></enum>
+	<enum name="NSURLErrorServerCertificateNotYetValid" swt_gen="true"></enum>
+	<enum name="NSURLRequestReloadIgnoringLocalCacheData" swt_gen="true"></enum>
+	<enum name="NSUTF8StringEncoding" swt_gen="true"></enum>
+	<function name="NSEqualRects" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSFileTypeForHFSTypeCode" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSGetSizeAndAlignment" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+		<arg swt_gen="true" swt_java_type="int[]" swt_java_type64="long[]"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSPointInRect" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSSearchPathForDirectoriesInDomains" swt_gen="true">
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<arg swt_gen="true"></arg>
+		<retval swt_gen="true"></retval>
+	</function>
+	<function name="NSTemporaryDirectory" swt_gen="true">
+		<retval swt_gen="true"></retval>
+	</function>
 	<informal_protocol name="NSURLDownloadDelegate" swt_gen="mixed">
 		<method selector="download:decideDestinationWithSuggestedFilename:" swt_gen="true">
-			<arg name="download" swt_gen="true"></arg>
-			<arg name="filename" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
+	<struct name="NSAffineTransformStruct" swt_gen="true">
+		<field name="m11" swt_gen="true"></field>
+		<field name="m12" swt_gen="true"></field>
+		<field name="m21" swt_gen="true"></field>
+		<field name="m22" swt_gen="true"></field>
+		<field name="tX" swt_gen="true"></field>
+		<field name="tY" swt_gen="true"></field>
+	</struct>
+	<struct name="NSPoint" swt_gen="true">
+		<field name="x" swt_gen="true"></field>
+		<field name="y" swt_gen="true"></field>
+	</struct>
+	<struct name="NSRange" swt_gen="true">
+		<field name="length" swt_gen="true"></field>
+		<field name="location" swt_gen="true"></field>
+	</struct>
+	<struct name="NSRect" swt_gen="true">
+		<field name="origin" swt_gen="true"></field>
+		<field name="size" swt_gen="true"></field>
+	</struct>
+	<struct name="NSSize" swt_gen="true">
+		<field name="height" swt_gen="true"></field>
+		<field name="width" swt_gen="true"></field>
+	</struct>
 </signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java
index 8c02f8a..4a1a001 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSApplication.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,6 +28,11 @@ public void activateIgnoringOtherApps(boolean flag) {
 	OS.objc_msgSend(this.id, OS.sel_activateIgnoringOtherApps_, flag);
 }
 
+public NSImage applicationIconImage() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_applicationIconImage);
+	return result != 0 ? new NSImage(result) : null;
+}
+
 public void beginSheet(NSWindow sheet, NSWindow docWindow, id modalDelegate, int /*long*/ didEndSelector, int /*long*/ contextInfo) {
 	OS.objc_msgSend(this.id, OS.sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_, sheet != null ? sheet.id : 0, docWindow != null ? docWindow.id : 0, modalDelegate != null ? modalDelegate.id : 0, didEndSelector, contextInfo);
 }
@@ -37,6 +42,11 @@ public NSEvent currentEvent() {
 	return result != 0 ? new NSEvent(result) : null;
 }
 
+public NSDockTile dockTile() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_dockTile);
+	return result != 0 ? new NSDockTile(result) : null;
+}
+
 public void endSheet(NSWindow sheet, int /*long*/ returnCode) {
 	OS.objc_msgSend(this.id, OS.sel_endSheet_returnCode_, sheet != null ? sheet.id : 0, returnCode);
 }
@@ -89,6 +99,10 @@ public void postEvent(NSEvent event, boolean flag) {
 	OS.objc_msgSend(this.id, OS.sel_postEvent_atStart_, event != null ? event.id : 0, flag);
 }
 
+public void replyToOpenOrPrint(int /*long*/ reply) {
+	OS.objc_msgSend(this.id, OS.sel_replyToOpenOrPrint_, reply);
+}
+
 public void run() {
 	OS.objc_msgSend(this.id, OS.sel_run);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAssertionHandler.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAssertionHandler.java
new file mode 100644
index 0000000..dbab4be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSAssertionHandler.java	
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class NSAssertionHandler extends NSObject {
+
+public NSAssertionHandler() {
+	super();
+}
+
+public NSAssertionHandler(int /*long*/ id) {
+	super(id);
+}
+
+public NSAssertionHandler(id id) {
+	super(id);
+}
+
+public static NSAssertionHandler currentHandler() {
+	int /*long*/ result = OS.objc_msgSend(OS.class_NSAssertionHandler, OS.sel_currentHandler);
+	return result != 0 ? new NSAssertionHandler(result) : null;
+}
+
+public void handleFailureInFunction(NSString functionName, NSString fileName, int /*long*/ line, NSString description) {
+	OS.objc_msgSend(this.id, OS.sel_handleFailureInFunction_file_lineNumber_description_, functionName != null ? functionName.id : 0, fileName != null ? fileName.id : 0, line, description != null ? description.id : 0);
+}
+
+public void handleFailureInMethod(int /*long*/ selector, id object, NSString fileName, int /*long*/ line, NSString description) {
+	OS.objc_msgSend(this.id, OS.sel_handleFailureInMethod_object_file_lineNumber_description_, selector, object != null ? object.id : 0, fileName != null ? fileName.id : 0, line, description != null ? description.id : 0);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
index 8888454..0594668 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java	
@@ -63,6 +63,10 @@ public void setFillColor(NSColor fillColor) {
 	OS.objc_msgSend(this.id, OS.sel_setFillColor_, fillColor != null ? fillColor.id : 0);
 }
 
+public void setFrameFromContentFrame(NSRect contentFrame) {
+	OS.objc_msgSend(this.id, OS.sel_setFrameFromContentFrame_, contentFrame);
+}
+
 public void setTitle(NSString aString) {
 	OS.objc_msgSend(this.id, OS.sel_setTitle_, aString != null ? aString.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java
index c179833..ee7586e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButtonCell.java	
@@ -24,6 +24,11 @@ public NSButtonCell(id id) {
 	super(id);
 }
 
+public NSColor backgroundColor() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_backgroundColor);
+	return result != 0 ? new NSColor(result) : null;
+}
+
 public void drawImage(NSImage image, NSRect frame, NSView controlView) {
 	OS.objc_msgSend(this.id, OS.sel_drawImage_withFrame_inView_, image != null ? image.id : 0, frame, controlView != null ? controlView.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
index 231448a..e7449ba 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java	
@@ -110,6 +110,10 @@ public void setAttributedStringValue(NSAttributedString obj) {
 	OS.objc_msgSend(this.id, OS.sel_setAttributedStringValue_, obj != null ? obj.id : 0);
 }
 
+public void setBaseWritingDirection(int /*long*/ writingDirection) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, writingDirection);
+}
+
 public void setControlSize(int /*long*/ size) {
 	OS.objc_msgSend(this.id, OS.sel_setControlSize_, size);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
index a0319aa..5bbc012 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,10 @@ public void insertItemWithObjectValue(id object, int /*long*/ index) {
 	OS.objc_msgSend(this.id, OS.sel_insertItemWithObjectValue_atIndex_, object != null ? object.id : 0, index);
 }
 
+public float /*double*/ itemHeight() {
+	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_itemHeight);
+}
+
 public id itemObjectValueAtIndex(int /*long*/ index) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_itemObjectValueAtIndex_, index);
 	return result != 0 ? new id(result) : null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
index 5807b08..50bf2f0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java	
@@ -71,6 +71,10 @@ public void setAlignment(int /*long*/ mode) {
 	OS.objc_msgSend(this.id, OS.sel_setAlignment_, mode);
 }
 
+public void setBaseWritingDirection(int /*long*/ writingDirection) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, writingDirection);
+}
+
 public void setCell(NSCell aCell) {
 	OS.objc_msgSend(this.id, OS.sel_setCell_, aCell != null ? aCell.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java
new file mode 100644
index 0000000..074d56b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDockTile.java	
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class NSDockTile extends NSObject {
+
+public NSDockTile() {
+	super();
+}
+
+public NSDockTile(int /*long*/ id) {
+	super(id);
+}
+
+public NSDockTile(id id) {
+	super(id);
+}
+
+public NSString badgeLabel() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_badgeLabel);
+	return result != 0 ? new NSString(result) : null;
+}
+
+public void setBadgeLabel(NSString string) {
+	OS.objc_msgSend(this.id, OS.sel_setBadgeLabel_, string != null ? string.id : 0);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java
index 85b4fdf..f1c1450 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFileManager.java	
@@ -46,6 +46,10 @@ public boolean fileExistsAtPath(NSString path, int /*long*/ isDirectory) {
 	return OS.objc_msgSend_bool(this.id, OS.sel_fileExistsAtPath_isDirectory_, path != null ? path.id : 0, isDirectory);
 }
 
+public boolean isExecutableFileAtPath(NSString path) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_isExecutableFileAtPath_, path != null ? path.id : 0);
+}
+
 public boolean removeItemAtPath(NSString path, int /*long*/ error) {
 	return OS.objc_msgSend_bool(this.id, OS.sel_removeItemAtPath_error_, path != null ? path.id : 0, error);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java
index 1b265d9..027f753 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSFont.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,11 @@ public float /*double*/ descender() {
 	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_descender);
 }
 
+public NSString displayName() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_displayName);
+	return result != 0 ? new NSString(result) : null;
+}
+
 public NSString familyName() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_familyName);
 	return result != 0 ? new NSString(result) : null;
@@ -56,6 +61,16 @@ public float /*double*/ leading() {
 	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_leading);
 }
 
+public static NSFont menuBarFontOfSize(float /*double*/ fontSize) {
+	int /*long*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuBarFontOfSize_, fontSize);
+	return result != 0 ? new NSFont(result) : null;
+}
+
+public static NSFont menuFontOfSize(float /*double*/ fontSize) {
+	int /*long*/ result = OS.objc_msgSend(OS.class_NSFont, OS.sel_menuFontOfSize_, fontSize);
+	return result != 0 ? new NSFont(result) : null;
+}
+
 public float /*double*/ pointSize() {
 	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_pointSize);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java
index 30b9c46..f00df86 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGraphicsContext.java	
@@ -60,6 +60,10 @@ public boolean isDrawingToScreen() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_isDrawingToScreen);
 }
 
+public boolean isFlipped() {
+	return OS.objc_msgSend_bool(this.id, OS.sel_isFlipped);
+}
+
 public void restoreGraphicsState() {
 	OS.objc_msgSend(this.id, OS.sel_restoreGraphicsState);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java
index 031646e..0746eb6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@ public int /*long*/ getGlyphs(int /*long*/ glyphArray, NSRange glyphRange) {
 	return OS.objc_msgSend(this.id, OS.sel_getGlyphs_range_, glyphArray, glyphRange);
 }
 
-public int /*long*/ getGlyphsInRange(NSRange glyphRange, int /*long*/ glyphBuffer, int /*long*/ charIndexBuffer, int /*long*/ inscribeBuffer, int /*long*/ elasticBuffer, int /*long*/ bidiLevelBuffer) {
+public int /*long*/ getGlyphsInRange(NSRange glyphRange, int /*long*/ glyphBuffer, int /*long*/ charIndexBuffer, int /*long*/ inscribeBuffer, int /*long*/ elasticBuffer, byte[] bidiLevelBuffer) {
 	return OS.objc_msgSend(this.id, OS.sel_getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_, glyphRange, glyphBuffer, charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
 }
 
@@ -108,10 +108,14 @@ public int /*long*/ numberOfGlyphs() {
 	return OS.objc_msgSend(this.id, OS.sel_numberOfGlyphs);
 }
 
-public int /*long*/ rectArrayForCharacterRange(NSRange charRange, NSRange selCharRange, NSTextContainer container, int /*long*/ rectCount) {
+public int /*long*/ rectArrayForCharacterRange(NSRange charRange, NSRange selCharRange, NSTextContainer container, int[] /*long[]*/ rectCount) {
 	return OS.objc_msgSend(this.id, OS.sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_, charRange, selCharRange, container != null ? container.id : 0, rectCount);
 }
 
+public int /*long*/ rectArrayForGlyphRange(NSRange glyphRange, NSRange selGlyphRange, NSTextContainer container, int[] /*long[]*/ rectCount) {
+	return OS.objc_msgSend(this.id, OS.sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_, glyphRange, selGlyphRange, container != null ? container.id : 0, rectCount);
+}
+
 public void removeTemporaryAttribute(NSString attrName, NSRange charRange) {
 	OS.objc_msgSend(this.id, OS.sel_removeTemporaryAttribute_forCharacterRange_, attrName != null ? attrName.id : 0, charRange);
 }
@@ -128,6 +132,10 @@ public void setTextStorage(NSTextStorage textStorage) {
 	OS.objc_msgSend(this.id, OS.sel_setTextStorage_, textStorage != null ? textStorage.id : 0);
 }
 
+public void setUsesScreenFonts(boolean flag) {
+	OS.objc_msgSend(this.id, OS.sel_setUsesScreenFonts_, flag);
+}
+
 public NSTypesetter typesetter() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_typesetter);
 	return result != 0 ? new NSTypesetter(result) : null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java
index 17fbdc7..2ed4c9c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMenuItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,16 @@ public NSMenuItem(id id) {
 	super(id);
 }
 
+public NSAttributedString attributedTitle() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_attributedTitle);
+	return result != 0 ? new NSAttributedString(result) : null;
+}
+
+public NSImage image() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_image);
+	return result != 0 ? new NSImage(result) : null;
+}
+
 public NSMenuItem initWithTitle(NSString aString, int /*long*/ aSelector, NSString charCode) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initWithTitle_action_keyEquivalent_, aString != null ? aString.id : 0, aSelector, charCode != null ? charCode.id : 0);
 	return result == this.id ? this : (result != 0 ? new NSMenuItem(result) : null);
@@ -51,6 +61,10 @@ public void setAction(int /*long*/ aSelector) {
 	OS.objc_msgSend(this.id, OS.sel_setAction_, aSelector);
 }
 
+public void setAttributedTitle(NSAttributedString string) {
+	OS.objc_msgSend(this.id, OS.sel_setAttributedTitle_, string != null ? string.id : 0);
+}
+
 public void setEnabled(boolean flag) {
 	OS.objc_msgSend(this.id, OS.sel_setEnabled_, flag);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java
index cc2d342..c0d6696 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableAttributedString.java	
@@ -37,6 +37,10 @@ public void replaceCharactersInRange(NSRange range, NSString str) {
 	OS.objc_msgSend(this.id, OS.sel_replaceCharactersInRange_withString_, range, str != null ? str.id : 0);
 }
 
+public void setBaseWritingDirection(int /*long*/ writingDirection, NSRange range) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_range_, writingDirection, range);
+}
+
 public void addAttribute(NSString name, id value, NSRange range) {
 	OS.objc_msgSend(this.id, OS.sel_addAttribute_value_range_, name != null ? name.id : 0, value != null ? value.id : 0, range);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java
index 8cd4eec..fce0c3c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableParagraphStyle.java	
@@ -32,6 +32,10 @@ public void setAlignment(int /*long*/ alignment) {
 	OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
 }
 
+public void setBaseWritingDirection(int /*long*/ writingDirection) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, writingDirection);
+}
+
 public void setDefaultTabInterval(float /*double*/ aFloat) {
 	OS.objc_msgSend(this.id, OS.sel_setDefaultTabInterval_, aFloat);
 }
@@ -40,6 +44,10 @@ public void setFirstLineHeadIndent(float /*double*/ aFloat) {
 	OS.objc_msgSend(this.id, OS.sel_setFirstLineHeadIndent_, aFloat);
 }
 
+public void setHeadIndent(float /*double*/ aFloat) {
+	OS.objc_msgSend(this.id, OS.sel_setHeadIndent_, aFloat);
+}
+
 public void setLineBreakMode(int /*long*/ mode) {
 	OS.objc_msgSend(this.id, OS.sel_setLineBreakMode_, mode);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java
index 9f3e67e..cee8f87 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableString.java	
@@ -28,6 +28,19 @@ public void appendString(NSString aString) {
 	OS.objc_msgSend(this.id, OS.sel_appendString_, aString != null ? aString.id : 0);
 }
 
+public void replaceCharactersInRange(NSRange range, NSString aString) {
+	OS.objc_msgSend(this.id, OS.sel_replaceCharactersInRange_withString_, range, aString != null ? aString.id : 0);
+}
+
+public void setString(NSString aString) {
+	OS.objc_msgSend(this.id, OS.sel_setString_, aString != null ? aString.id : 0);
+}
+
+public static NSString string() {
+	int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_string);
+	return result != 0 ? new NSString(result) : null;
+}
+
 public static NSString stringWithCharacters(char[] characters, int /*long*/ length) {
 	int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableString, OS.sel_stringWithCharacters_length_, characters, length);
 	return result != 0 ? new NSMutableString(result) : null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java
index 36ca289..4a89580 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java	
@@ -28,10 +28,22 @@ public void setCachePolicy(int /*long*/ policy) {
 	OS.objc_msgSend(this.id, OS.sel_setCachePolicy_, policy);
 }
 
+public void setHTTPBody(NSData data) {
+	OS.objc_msgSend(this.id, OS.sel_setHTTPBody_, data != null ? data.id : 0);
+}
+
+public void setHTTPMethod(NSString method) {
+	OS.objc_msgSend(this.id, OS.sel_setHTTPMethod_, method != null ? method.id : 0);
+}
+
 public void setURL(NSURL URL) {
 	OS.objc_msgSend(this.id, OS.sel_setURL_, URL != null ? URL.id : 0);
 }
 
+public void setValue(NSString value, NSString field) {
+	OS.objc_msgSend(this.id, OS.sel_setValue_forHTTPHeaderField_, value != null ? value.id : 0, field != null ? field.id : 0);
+}
+
 public static NSURLRequest requestWithURL(NSURL URL) {
 	int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0);
 	return result != 0 ? new NSMutableURLRequest(result) : null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java
index 611da6e..c383443 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSNotificationCenter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,4 +37,8 @@ public void removeObserver(id observer) {
 	OS.objc_msgSend(this.id, OS.sel_removeObserver_, observer != null ? observer.id : 0);
 }
 
+public void removeObserver(id observer, NSString aName, id anObject) {
+	OS.objc_msgSend(this.id, OS.sel_removeObserver_name_object_, observer != null ? observer.id : 0, aName != null ? aName.id : 0, anObject != null ? anObject.id : 0);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
index 94d0fbd..2fcca8e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,6 +62,22 @@ public int /*long*/ draggingSourceOperationMask() {
 	return OS.objc_msgSend(this.id, OS.sel_draggingSourceOperationMask);
 }
 
+public boolean outlineView(NSOutlineView outlineView, id item) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldSelectItem_, outlineView != null ? outlineView.id : 0, item != null ? item.id : 0);
+}
+
+public boolean outlineView(NSOutlineView outlineView, NSCell cell, NSTableColumn tableColumn, id item) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_outlineView_shouldTrackCell_forTableColumn_item_, outlineView != null ? outlineView.id : 0, cell != null ? cell.id : 0, tableColumn != null ? tableColumn.id : 0, item != null ? item.id : 0);
+}
+
+public boolean tableView(NSTableView tableView, int /*long*/ row) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_tableView_shouldSelectRow_, tableView != null ? tableView.id : 0, row);
+}
+
+public boolean tableView(NSTableView tableView, NSCell cell, NSTableColumn tableColumn, int /*long*/ row) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_tableView_shouldTrackCell_forTableColumn_row_, tableView != null ? tableView.id : 0, cell != null ? cell.id : 0, tableColumn != null ? tableColumn.id : 0, row);
+}
+
 public NSObject autorelease() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_autorelease);
 	return result == this.id ? this : (result != 0 ? new NSObject(result) : null);
@@ -112,6 +128,10 @@ public id mutableCopy() {
 	return result != 0 ? new id(result) : null;
 }
 
+public void performSelector(int /*long*/ aSelector, id anArgument, double delay, NSArray modes) {
+	OS.objc_msgSend(this.id, OS.sel_performSelector_withObject_afterDelay_inModes_, aSelector, anArgument != null ? anArgument.id : 0, delay, modes != null ? modes.id : 0);
+}
+
 public void performSelectorOnMainThread(int /*long*/ aSelector, id arg, boolean wait) {
 	OS.objc_msgSend(this.id, OS.sel_performSelectorOnMainThread_withObject_waitUntilDone_, aSelector, arg != null ? arg.id : 0, wait);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java
index f6bf26b..61f1535 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScreen.java	
@@ -49,6 +49,10 @@ public static NSArray screens() {
 	return result != 0 ? new NSArray(result) : null;
 }
 
+public float /*double*/ userSpaceScaleFactor() {
+	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_userSpaceScaleFactor);
+}
+
 public NSRect visibleFrame() {
 	NSRect result = new NSRect();
 	OS.objc_msgSend_stret(result, this.id, OS.sel_visibleFrame);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
index 95c8694..771e375 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java	
@@ -32,6 +32,12 @@ public int /*long*/ hitPart() {
 	return OS.objc_msgSend(this.id, OS.sel_hitPart);
 }
 
+public NSRect rectForPart(int /*long*/ partCode) {
+	NSRect result = new NSRect();
+	OS.objc_msgSend_stret(result, this.id, OS.sel_rectForPart_, partCode);
+	return result;
+}
+
 public static float /*double*/ scrollerWidth() {
 	return (float)OS.objc_msgSend_fpret(OS.class_NSScroller, OS.sel_scrollerWidth);
 }
@@ -48,6 +54,10 @@ public void setFloatValue(float aFloat, float /*double*/ proportion) {
 	OS.objc_msgSend(this.id, OS.sel_setFloatValue_knobProportion_, aFloat, proportion);
 }
 
+public int /*long*/ testPart(NSPoint thePoint) {
+	return OS.objc_msgSend(this.id, OS.sel_testPart_, thePoint);
+}
+
 public static int /*long*/ cellClass() {
 	return OS.objc_msgSend(OS.class_NSScroller, OS.sel_cellClass);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java
index c457ccf..6c96f80 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStatusBar.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,4 +38,8 @@ public static NSStatusBar systemStatusBar() {
 	return result != 0 ? new NSStatusBar(result) : null;
 }
 
+public float /*double*/ thickness() {
+	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_thickness);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
index 98eca71..c950f90 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java	
@@ -30,6 +30,12 @@ public String getString() {
 	return new String(buffer);
 }
 
+public NSString initWithString(String str) {
+	char[] buffer = new char[str.length()];
+	str.getChars(0, buffer.length, buffer, 0);
+	return initWithCharacters(buffer, buffer.length);
+}
+
 public static NSString stringWith(String str) {
 	char[] buffer = new char[str.length()];
 	str.getChars(0, buffer.length, buffer, 0);
@@ -88,6 +94,11 @@ public NSString pathExtension() {
 	return result == this.id ? this : (result != 0 ? new NSString(result) : null);
 }
 
+public static NSString string() {
+	int /*long*/ result = OS.objc_msgSend(OS.class_NSString, OS.sel_string);
+	return result != 0 ? new NSString(result) : null;
+}
+
 public NSString stringByAddingPercentEscapesUsingEncoding(int /*long*/ enc) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAddingPercentEscapesUsingEncoding_, enc);
 	return result == this.id ? this : (result != 0 ? new NSString(result) : null);
@@ -98,6 +109,11 @@ public NSString stringByAppendingPathComponent(NSString str) {
 	return result == this.id ? this : (result != 0 ? new NSString(result) : null);
 }
 
+public NSString stringByAppendingPathExtension(NSString str) {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingPathExtension_, str != null ? str.id : 0);
+	return result == this.id ? this : (result != 0 ? new NSString(result) : null);
+}
+
 public NSString stringByAppendingString(NSString aString) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringByAppendingString_, aString != null ? aString.id : 0);
 	return result == this.id ? this : (result != 0 ? new NSString(result) : null);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java
index c24dede..41d6445 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTabViewItem.java	
@@ -24,6 +24,10 @@ public NSTabViewItem(id id) {
 	super(id);
 }
 
+public void drawLabel(boolean shouldTruncateLabel, NSRect labelRect) {
+	OS.objc_msgSend(this.id, OS.sel_drawLabel_inRect_, shouldTruncateLabel, labelRect);
+}
+
 public id initWithIdentifier(id identifier) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0);
 	return result != 0 ? new id(result) : null;
@@ -37,4 +41,10 @@ public void setView(NSView view) {
 	OS.objc_msgSend(this.id, OS.sel_setView_, view != null ? view.id : 0);
 }
 
+public NSSize sizeOfLabel(boolean computeMin) {
+	NSSize result = new NSSize();
+	OS.objc_msgSend_stret(result, this.id, OS.sel_sizeOfLabel_, computeMin);
+	return result;
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
index 9a97576..d81fc2b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,10 +44,6 @@ public int /*long*/ clickedRow() {
 	return OS.objc_msgSend(this.id, OS.sel_clickedRow);
 }
 
-public int /*long*/ columnAtPoint(NSPoint point) {
-	return OS.objc_msgSend(this.id, OS.sel_columnAtPoint_, point);
-}
-
 public NSIndexSet columnIndexesInRect(NSRect rect) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_columnIndexesInRect_, rect);
 	return result != 0 ? new NSIndexSet(result) : null;
@@ -70,6 +66,10 @@ public NSImage dragImageForRowsWithIndexes(NSIndexSet dragRows, NSArray tableCol
 	return result != 0 ? new NSImage(result) : null;
 }
 
+public void drawBackgroundInClipRect(NSRect clipRect) {
+	OS.objc_msgSend(this.id, OS.sel_drawBackgroundInClipRect_, clipRect);
+}
+
 public NSRect frameOfCellAtColumn(int /*long*/ column, int /*long*/ row) {
 	NSRect result = new NSRect();
 	OS.objc_msgSend_stret(result, this.id, OS.sel_frameOfCellAtColumn_row_, column, row);
@@ -115,6 +115,11 @@ public int /*long*/ numberOfSelectedRows() {
 	return OS.objc_msgSend(this.id, OS.sel_numberOfSelectedRows);
 }
 
+public NSCell preparedCellAtColumn(int /*long*/ column, int /*long*/ row) {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_preparedCellAtColumn_row_, column, row);
+	return result != 0 ? new NSCell(result) : null;
+}
+
 public NSRect rectOfColumn(int /*long*/ column) {
 	NSRect result = new NSRect();
 	OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfColumn_, column);
@@ -206,6 +211,10 @@ public void setDropRow(int /*long*/ row, int /*long*/ op) {
 	OS.objc_msgSend(this.id, OS.sel_setDropRow_dropOperation_, row, op);
 }
 
+public void setGridStyleMask(int /*long*/ gridType) {
+	OS.objc_msgSend(this.id, OS.sel_setGridStyleMask_, gridType);
+}
+
 public void setHeaderView(NSTableHeaderView headerView) {
 	OS.objc_msgSend(this.id, OS.sel_setHeaderView_, headerView != null ? headerView.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java
index d995f8f..66a6f88 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSText.java	
@@ -42,6 +42,10 @@ public NSFont font() {
 	return result != 0 ? new NSFont(result) : null;
 }
 
+public boolean isFieldEditor() {
+	return OS.objc_msgSend_bool(this.id, OS.sel_isFieldEditor);
+}
+
 public void paste(id sender) {
 	OS.objc_msgSend(this.id, OS.sel_paste_, sender != null ? sender.id : 0);
 }
@@ -72,6 +76,10 @@ public void setBackgroundColor(NSColor color) {
 	OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color != null ? color.id : 0);
 }
 
+public void setBaseWritingDirection(int /*long*/ writingDirection) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, writingDirection);
+}
+
 public void setDelegate(id anObject) {
 	OS.objc_msgSend(this.id, OS.sel_setDelegate_, anObject != null ? anObject.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java
index 5f06a09..c7d04b2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextAttachment.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,9 +24,13 @@ public NSTextAttachment(id id) {
 	super(id);
 }
 
-public id initWithFileWrapper(NSFileWrapper fileWrapper) {
+public NSTextAttachment initWithFileWrapper(NSFileWrapper fileWrapper) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFileWrapper_, fileWrapper != null ? fileWrapper.id : 0);
-	return result != 0 ? new id(result) : null;
+	return result == this.id ? this : (result != 0 ? new NSTextAttachment(result) : null);
+}
+
+public void setAttachmentCell(id cell) {
+	OS.objc_msgSend(this.id, OS.sel_setAttachmentCell_, cell != null ? cell.id : 0);
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java
index 01a8a94..bf6c1ef 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,10 @@ public boolean dragSelectionWithEvent(NSEvent event, NSSize mouseOffset, boolean
 	return OS.objc_msgSend_bool(this.id, OS.sel_dragSelectionWithEvent_offset_slideBack_, event != null ? event.id : 0, mouseOffset, slideBack);
 }
 
+public void drawViewBackgroundInRect(NSRect rect) {
+	OS.objc_msgSend(this.id, OS.sel_drawViewBackgroundInRect_, rect);
+}
+
 public NSLayoutManager layoutManager() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_layoutManager);
 	return result != 0 ? new NSLayoutManager(result) : null;
@@ -52,10 +56,23 @@ public NSDictionary markedTextAttributes() {
 	return result != 0 ? new NSDictionary(result) : null;
 }
 
+public NSDictionary selectedTextAttributes() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_selectedTextAttributes);
+	return result != 0 ? new NSDictionary(result) : null;
+}
+
+public void setBaseWritingDirection(int /*long*/ writingDirection, NSRange range) {
+	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_range_, writingDirection, range);
+}
+
 public void setDefaultParagraphStyle(NSParagraphStyle paragraphStyle) {
 	OS.objc_msgSend(this.id, OS.sel_setDefaultParagraphStyle_, paragraphStyle != null ? paragraphStyle.id : 0);
 }
 
+public void setDisplaysLinkToolTips(boolean flag) {
+	OS.objc_msgSend(this.id, OS.sel_setDisplaysLinkToolTips_, flag);
+}
+
 public void setLinkTextAttributes(NSDictionary attributeDictionary) {
 	OS.objc_msgSend(this.id, OS.sel_setLinkTextAttributes_, attributeDictionary != null ? attributeDictionary.id : 0);
 }
@@ -64,10 +81,22 @@ public void setRichText(boolean flag) {
 	OS.objc_msgSend(this.id, OS.sel_setRichText_, flag);
 }
 
+public void setSelectedTextAttributes(NSDictionary attributeDictionary) {
+	OS.objc_msgSend(this.id, OS.sel_setSelectedTextAttributes_, attributeDictionary != null ? attributeDictionary.id : 0);
+}
+
+public void setUsesFontPanel(boolean flag) {
+	OS.objc_msgSend(this.id, OS.sel_setUsesFontPanel_, flag);
+}
+
 public boolean shouldChangeTextInRange(NSRange affectedCharRange, NSString replacementString) {
 	return OS.objc_msgSend_bool(this.id, OS.sel_shouldChangeTextInRange_replacementString_, affectedCharRange, replacementString != null ? replacementString.id : 0);
 }
 
+public boolean shouldDrawInsertionPoint() {
+	return OS.objc_msgSend_bool(this.id, OS.sel_shouldDrawInsertionPoint);
+}
+
 public NSTextContainer textContainer() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_textContainer);
 	return result != 0 ? new NSTextContainer(result) : null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
index 1345b4b..294d762 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,8 +48,18 @@ public static NSURL fileURLWithPath(NSString path) {
 	return result != 0 ? new NSURL(result) : null;
 }
 
+public NSString host() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_host);
+	return result != 0 ? new NSString(result) : null;
+}
+
 public boolean isFileURL() {
 	return OS.objc_msgSend_bool(this.id, OS.sel_isFileURL);
 }
 
+public NSString path() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_path);
+	return result != 0 ? new NSString(result) : null;
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java
index cdc963a..68ed879 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -219,6 +219,10 @@ public void resetCursorRects() {
 	OS.objc_msgSend(this.id, OS.sel_resetCursorRects);
 }
 
+public void scrollClipView(NSClipView aClipView, NSPoint aPoint) {
+	OS.objc_msgSend(this.id, OS.sel_scrollClipView_toPoint_, aClipView != null ? aClipView.id : 0, aPoint);
+}
+
 public void scrollPoint(NSPoint aPoint) {
 	OS.objc_msgSend(this.id, OS.sel_scrollPoint_, aPoint);
 }
@@ -235,6 +239,10 @@ public void setAutoresizingMask(int /*long*/ mask) {
 	OS.objc_msgSend(this.id, OS.sel_setAutoresizingMask_, mask);
 }
 
+public void setBoundsRotation(float /*double*/ angle) {
+	OS.objc_msgSend(this.id, OS.sel_setBoundsRotation_, angle);
+}
+
 public void setFocusRingType(int /*long*/ focusRingType) {
 	OS.objc_msgSend(this.id, OS.sel_setFocusRingType_, focusRingType);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
index 78a713e..538ff89 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,12 +54,6 @@ public void close() {
 	OS.objc_msgSend(this.id, OS.sel_close);
 }
 
-public NSRect contentRectForFrameRect(NSRect frameRect) {
-	NSRect result = new NSRect();
-	OS.objc_msgSend_stret(result, this.id, OS.sel_contentRectForFrameRect_, frameRect);
-	return result;
-}
-
 public NSView contentView() {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_contentView);
 	return result != 0 ? new NSView(result) : null;
@@ -82,6 +76,11 @@ public NSButtonCell defaultButtonCell() {
 	return result != 0 ? new NSButtonCell(result) : null;
 }
 
+public id delegate() {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_delegate);
+	return result != 0 ? new id(result) : null;
+}
+
 public void deminiaturize(id sender) {
 	OS.objc_msgSend(this.id, OS.sel_deminiaturize_, sender != null ? sender.id : 0);
 }
@@ -90,6 +89,10 @@ public void disableCursorRects() {
 	OS.objc_msgSend(this.id, OS.sel_disableCursorRects);
 }
 
+public void disableFlushWindow() {
+	OS.objc_msgSend(this.id, OS.sel_disableFlushWindow);
+}
+
 public void display() {
 	OS.objc_msgSend(this.id, OS.sel_display);
 }
@@ -98,6 +101,14 @@ public void enableCursorRects() {
 	OS.objc_msgSend(this.id, OS.sel_enableCursorRects);
 }
 
+public void enableFlushWindow() {
+	OS.objc_msgSend(this.id, OS.sel_enableFlushWindow);
+}
+
+public void endEditingFor(id anObject) {
+	OS.objc_msgSend(this.id, OS.sel_endEditingFor_, anObject != null ? anObject.id : 0);
+}
+
 public NSText fieldEditor(boolean createFlag, id anObject) {
 	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_fieldEditor_forObject_, createFlag, anObject != null ? anObject.id : 0);
 	return result != 0 ? new NSText(result) : null;
@@ -108,6 +119,10 @@ public NSResponder firstResponder() {
 	return result != 0 ? new NSResponder(result) : null;
 }
 
+public void flushWindowIfNeeded() {
+	OS.objc_msgSend(this.id, OS.sel_flushWindowIfNeeded);
+}
+
 public NSRect frame() {
 	NSRect result = new NSRect();
 	OS.objc_msgSend_stret(result, this.id, OS.sel_frame);
@@ -245,6 +260,10 @@ public void setBackgroundColor(NSColor color) {
 	OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, color != null ? color.id : 0);
 }
 
+public void setCollectionBehavior(int /*long*/ behavior) {
+	OS.objc_msgSend(this.id, OS.sel_setCollectionBehavior_, behavior);
+}
+
 public void setContentView(NSView aView) {
 	OS.objc_msgSend(this.id, OS.sel_setContentView_, aView != null ? aView.id : 0);
 }
@@ -323,6 +342,10 @@ public NSToolbar toolbar() {
 	return result != 0 ? new NSToolbar(result) : null;
 }
 
+public float /*double*/ userSpaceScaleFactor() {
+	return (float)OS.objc_msgSend_fpret(this.id, OS.sel_userSpaceScaleFactor);
+}
+
 public int /*long*/ windowNumber() {
 	return OS.objc_msgSend(this.id, OS.sel_windowNumber);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java
index 647ca08..d769cf0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWorkspace.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,4 +64,13 @@ public static NSWorkspace sharedWorkspace() {
 	return result != 0 ? new NSWorkspace(result) : null;
 }
 
+public boolean type(NSString firstTypeName, NSString secondTypeName) {
+	return OS.objc_msgSend_bool(this.id, OS.sel_type_conformsToType_, firstTypeName != null ? firstTypeName.id : 0, secondTypeName != null ? secondTypeName.id : 0);
+}
+
+public NSString typeOfFile(NSString absoluteFilePath, int /*long*/ outError) {
+	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_typeOfFile_error_, absoluteFilePath != null ? absoluteFilePath.id : 0, outError);
+	return result != 0 ? new NSString(result) : null;
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index b71065e..425dc72 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,7 +36,15 @@ public class OS extends C {
 	public static final int kUIModeNormal = 0;
 	public static final int kUIModeContentHidden = 2;
 	public static final int kUIModeAllHidden = 3;
-	
+	public static final int kLSUnknownType = 0;
+	public static final int kLSUnknownCreator = 0;
+	public static final int kLSRolesAll = 0xFFFFFFFF;
+	public static final int kAXUnderlineStyleNone = 0x0;
+	public static final int kAXUnderlineStyleSingle = 0x1; 
+	public static final int kAXUnderlineStyleThick = 0x2; 
+	public static final int kAXUnderlineStyleDouble = 0x9;
+
+
 	public static final int /*long*/ sel_sendSearchSelection = sel_registerName("sendSearchSelection");
 	public static final int /*long*/ sel_sendCancelSelection = sel_registerName("sendCancelSelection");
 	public static final int /*long*/ sel_sendSelection = sel_registerName("sendSelection");
@@ -47,7 +55,8 @@ public class OS extends C {
 	public static final int /*long*/ sel_timerProc_ = sel_registerName("timerProc:");
 	public static final int /*long*/ sel_handleNotification_ = sel_registerName("handleNotification:");
 	public static final int /*long*/ sel_callJava = sel_registerName("callJava:index:arg:");
-	public static final int /*long*/ sel_quitRequested_ = sel_registerName("quitRequested:");
+	public static final int /*long*/ sel_callRunBeforeUnloadConfirmPanelWithMessage = sel_registerName("callRunBeforeUnloadConfirmPanelWithMessage:arg:");
+	public static final int /*long*/ sel_createPanelDidEnd = sel_registerName("createPanelDidEnd:returnCode:contextInfo:");
 	public static final int /*long*/ sel_systemSettingsChanged_ = sel_registerName("systemSettingsChanged:");
 	public static final int /*long*/ sel_panelDidEnd_returnCode_contextInfo_ = sel_registerName("panelDidEnd:returnCode:contextInfo:");
 	public static final int /*long*/ sel_updateOpenGLContext_ = sel_registerName("updateOpenGLContext:");
@@ -61,15 +70,48 @@ public class OS extends C {
 
 	public static final int /*long*/ sel__drawThemeProgressArea_ = OS.sel_registerName("_drawThemeProgressArea:");
 	
+	public static final int /*long*/ sel__setDashboardBehavior = OS.sel_registerName("_setDashboardBehavior:to:");
+
 	public static final int /*long*/ sel__setNeedsToUseHeartBeatWindow_ = OS.sel_registerName("_setNeedsToUseHeartBeatWindow:");
 
 	public static final int /*long*/ class_WebPanelAuthenticationHandler = OS.objc_getClass("WebPanelAuthenticationHandler");
 	public static final int /*long*/ sel_sharedHandler = sel_registerName("sharedHandler");
 	public static final int /*long*/ sel_startAuthentication = sel_registerName("startAuthentication:window:");
+	public static final int /*long*/ sel_setAllowsAnyHTTPSCertificate = sel_registerName("setAllowsAnyHTTPSCertificate:forHost:");
+	
+	public static final int /*long*/ sel_accessibleHandle = sel_registerName("accessibleHandle");
+
+	public static final int /*long*/ sel_clearDeferFlushing = sel_registerName("clearDeferFlushing");
 
 	/* These are not generated in order to avoid creating static methods on all classes */
 	public static final int /*long*/ sel_isSelectorExcludedFromWebScript_ = sel_registerName("isSelectorExcludedFromWebScript:");
 	public static final int /*long*/ sel_webScriptNameForSelector_ = sel_registerName("webScriptNameForSelector:");
+	
+	public static final int /*long*/ sel_setColor_forAttribute_ = sel_registerName("setColor:forAttribute:");
+	
+	public static final int /*long*/ sel_javaRunLoopMode = sel_registerName("javaRunLoopMode");
+
+	/* NSTextAttachmentCell */
+	/** @method callback_types=NSPoint;id;SEL;,callback_flags=struct;none;none; */
+	public static final native int /*long*/ CALLBACK_cellBaselineOffset(int /*long*/ func);
+	/** @method callback_types=NSSize;id;SEL;,callback_flags=struct;none;none; */
+	public static final native int /*long*/ CALLBACK_NSTextAttachmentCell_cellSize(int /*long*/ func);
+	public static final int /*long*/ protocol_NSTextAttachmentCell = objc_getProtocol("NSTextAttachmentCell");
+	public static final int /*long*/ sel_cellBaselineOffset = sel_registerName("cellBaselineOffset");
+	
+	/*10.6 Accessibility Strings*/
+	/** @method flags=const dynamic no_gen*/
+	public static final native int /*long*/ NSAccessibilityRowIndexRangeAttribute();
+	public static final NSString NSAccessibilityRowIndexRangeAttribute = new NSString(NSAccessibilityRowIndexRangeAttribute());
+	/** @method flags=const dynamic no_gen*/
+	public static final native int /*long*/ NSAccessibilityColumnIndexRangeAttribute();
+	public static final NSString NSAccessibilityColumnIndexRangeAttribute = new NSString(NSAccessibilityColumnIndexRangeAttribute());
+	/** @method flags=const dynamic no_gen*/
+	public static final native int /*long*/ NSAccessibilityCellForColumnAndRowParameterizedAttribute();
+	public static final NSString NSAccessibilityCellForColumnAndRowParameterizedAttribute = new NSString(NSAccessibilityCellForColumnAndRowParameterizedAttribute());
+	/** @method flags=const dynamic no_gen*/
+	public static final native int /*long*/ NSAccessibilityCellRole();
+	public static final NSString NSAccessibilityCellRole = new NSString(NSAccessibilityCellRole());
 
 /** JNI natives */
 
@@ -137,6 +179,12 @@ public static final native int GetSystemUIMode(int[] outMode, int[] outOptions);
  */
 public static final native int UCKeyTranslate (int /*long*/ keyLayoutPtr, short virtualKeyCode, short keyAction, int modifierKeyState, int keyboardType, int keyTranslateOptions, int[] deadKeyState, int maxStringLength, int[] actualStringLength, char[] unicodeString);
 /**
+ * @param inUTI1 cast=(CFStringRef)
+ * @param inUTI2 cast=(CFStringRef)
+ */
+public static final native boolean UTTypeEqual(int /*long*/ inUTI1, int /*long*/ inUTI2);
+
+/**
  * @method flags=dynamic
  * @param metric cast=(SInt32 *)
 */
@@ -182,6 +230,15 @@ public static final native byte LMGetKbdType();
 public static final native int /*long*/ AcquireRootMenu ();
 /** @method flags=dynamic */
 public static final native int CancelMenuTracking (int /*long*/ inRootMenu, boolean inImmediate, int inDismissalReason);
+/**
+ * @param inType cast=(OSType)
+ * @param inCreator cast=(OSType)
+ * @param inExtension cast=(CFStringRef)
+ * @param inRoleMask cast=(LSRolesMask)
+ * @param outAppRef cast=(FSRef *)
+ * @param outAppURL cast=(CFURLRef *)
+ */
+public static final native int /*long*/ LSGetApplicationForInfo(int inType, int inCreator,int /*long*/ inExtension, int inRoleMask, byte[] outAppRef, int[] outAppURL);
 
 /** C calls */
 
@@ -254,6 +311,54 @@ public static final int kQDParseRegionFromRight = (1 << 3);
 public static final int kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft;
 public static final int kQDRegionToRectsMsgParse = 2;
 
+/** JavaScriptCore calls */
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param script cast=(JSStringRef)
+ * @param thisObject cast=(JSObjectRef)
+ * @param sourceURL cast=(JSStringRef)
+ * @param exception cast=(JSValueRef *)
+ */
+public static final native int /*long*/ JSEvaluateScript (int /*long*/ ctx, int /*long*/ script, int /*long*/ thisObject, int /*long*/ sourceURL, int startingLineNumber, int /*long*/[] exception);
+
+/**
+ * @param string cast=(const char *)
+ */
+public static final native int /*long*/ JSStringCreateWithUTF8CString (byte[] string);
+
+/**
+ * @param string cast=(JSStringRef)
+ */
+public static final native void JSStringRelease (int /*long*/ string);
+
+
+/** Certificate Security */
+
+/**
+ * @param certType cast=(CSSM_CERT_TYPE)
+ * @param policyOID cast=(CSSM_OID *)
+ * @param value cast=(CSSM_DATA *)
+ * @param policySearch cast=(SecPolicySearchRef *) 
+ */
+public static final native int SecPolicySearchCreate(int /*long*/ certType, int /*long*/ policyOID, int /*long*/ value, int /*long*/ [] policySearch);
+
+/**
+ * @param searchRef cast=(SecPolicySearchRef)
+ * @param policyRef cast=(SecPolicyRef *)
+ */
+public static final native int SecPolicySearchCopyNext(int /*long*/ searchRef, int /*long*/ [] policyRef);
+
+/** 
+ * @param certificates cast=(CFArrayRef)
+ * @param policies cast=(CFTypeRef)
+ * @param trustRef cast=(SecTrustRef *) 
+ */
+public static final native int SecTrustCreateWithCertificates(int /*long*/ certificates, int /*long*/ policies, int /*long*/ [] trustRef);
+
+public static final int CSSM_CERT_X_509v3 = 0x3;
+
+
 /** Custom callbacks */
 
 /** @method flags=no_gen */
@@ -269,6 +374,11 @@ public static final native void NSIntersectionRect (NSRect result, NSRect aRect,
  */
 public static final native void CGDisplayBounds(int display, CGRect rect);
 
+/** @method flags=const address*/
+public static final native int /*long*/ kCFTypeDictionaryKeyCallBacks();
+/** @method flags=const address*/
+public static final native int /*long*/ kCFTypeDictionaryValueCallBacks();
+
 /** Objective-C runtime */
 
 /**
@@ -312,6 +422,10 @@ public static final native int /*long*/ class_getSuperclass(int /*long*/ cls);
  */
 public static final native int /*long*/ method_setImplementation(int /*long*/ method, int /*long*/ imp);
 /**
+ * @param sel cast=(SEL)
+ */
+public static final native int /*long*/ sel_getName(int /*long*/ sel);
+/**
  * @param cls cast=(Class)
  * @param extraBytes cast=(size_t)
  */
@@ -374,12 +488,18 @@ public static final native int /*long*/ CALLBACK_dragSelectionWithEvent_offset_s
 public static final native int /*long*/ CALLBACK_draggedImage_beganAt_(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSImage*;NSPoint;NSDragOperation;,callback_flags=none;none;none;none;struct;none; */
 public static final native int /*long*/ CALLBACK_draggedImage_endedAt_operation_(int /*long*/ func);
+/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_drawBackgroundInClipRect_(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSImage*;NSRect;NSView*;,callback_flags=none;none;none;none;struct;none; */
 public static final native int /*long*/ CALLBACK_drawImage_withFrame_inView_(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
 public static final native int /*long*/ CALLBACK_drawInteriorWithFrame_inView_(int /*long*/ func);
+/** @method callback_types=void;id;SEL;BOOL;NSRect;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_drawLabel_inRect_(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
 public static final native int /*long*/ CALLBACK_drawRect_(int /*long*/ func);
+/** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_drawViewBackgroundInRect_(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
 public static final native int /*long*/ CALLBACK_drawWithExpansionFrame_inView_(int /*long*/ func);
 /** @method callback_types=NSRect;id;SEL;NSRect;NSView*;,callback_flags=struct;none;none;struct;none; */
@@ -396,6 +516,8 @@ public static final native int /*long*/ CALLBACK_hitTestForEvent_inRect_ofView_(
 public static final native int /*long*/ CALLBACK_imageRectForBounds_(int /*long*/ func);
 /** @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
 public static final native int /*long*/ CALLBACK_markedRange(int /*long*/ func);
+/** @method callback_types=void;id;SEL;NSClipView*;NSPoint;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_scrollClipView_toPoint_(int /*long*/ func);
 /** @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
 public static final native int /*long*/ CALLBACK_selectedRange(int /*long*/ func);
 /** @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
@@ -410,6 +532,8 @@ public static final native int /*long*/ CALLBACK_setMarkedText_selectedRange_(in
 public static final native int /*long*/ CALLBACK_setNeedsDisplayInRect_(int /*long*/ func);
 /** @method callback_types=BOOL;id;SEL;NSRange;NSString*;,callback_flags=none;none;none;struct;none; */
 public static final native int /*long*/ CALLBACK_shouldChangeTextInRange_replacementString_(int /*long*/ func);
+/** @method callback_types=NSSize;id;SEL;BOOL;,callback_flags=struct;none;none;none; */
+public static final native int /*long*/ CALLBACK_sizeOfLabel_(int /*long*/ func);
 /** @method callback_types=NSRange;id;SEL;NSTextView*;NSRange;NSRange;,callback_flags=struct;none;none;none;struct;struct; */
 public static final native int /*long*/ CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(int /*long*/ func);
 /** @method callback_types=NSRect;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
@@ -432,6 +556,7 @@ public static final int /*long*/ class_NSAlert = objc_getClass("NSAlert");
 public static final int /*long*/ class_NSAppleEventDescriptor = objc_getClass("NSAppleEventDescriptor");
 public static final int /*long*/ class_NSApplication = objc_getClass("NSApplication");
 public static final int /*long*/ class_NSArray = objc_getClass("NSArray");
+public static final int /*long*/ class_NSAssertionHandler = objc_getClass("NSAssertionHandler");
 public static final int /*long*/ class_NSAttributedString = objc_getClass("NSAttributedString");
 public static final int /*long*/ class_NSAutoreleasePool = objc_getClass("NSAutoreleasePool");
 public static final int /*long*/ class_NSBezierPath = objc_getClass("NSBezierPath");
@@ -458,6 +583,7 @@ public static final int /*long*/ class_NSDate = objc_getClass("NSDate");
 public static final int /*long*/ class_NSDatePicker = objc_getClass("NSDatePicker");
 public static final int /*long*/ class_NSDictionary = objc_getClass("NSDictionary");
 public static final int /*long*/ class_NSDirectoryEnumerator = objc_getClass("NSDirectoryEnumerator");
+public static final int /*long*/ class_NSDockTile = objc_getClass("NSDockTile");
 public static final int /*long*/ class_NSEnumerator = objc_getClass("NSEnumerator");
 public static final int /*long*/ class_NSError = objc_getClass("NSError");
 public static final int /*long*/ class_NSEvent = objc_getClass("NSEvent");
@@ -554,6 +680,8 @@ public static final int /*long*/ class_NSValue = objc_getClass("NSValue");
 public static final int /*long*/ class_NSView = objc_getClass("NSView");
 public static final int /*long*/ class_NSWindow = objc_getClass("NSWindow");
 public static final int /*long*/ class_NSWorkspace = objc_getClass("NSWorkspace");
+public static final int /*long*/ class_SFCertificatePanel = objc_getClass("SFCertificatePanel");
+public static final int /*long*/ class_SFCertificateTrustPanel = objc_getClass("SFCertificateTrustPanel");
 public static final int /*long*/ class_WebDataSource = objc_getClass("WebDataSource");
 public static final int /*long*/ class_WebFrame = objc_getClass("WebFrame");
 public static final int /*long*/ class_WebFrameView = objc_getClass("WebFrameView");
@@ -671,9 +799,14 @@ public static final int /*long*/ sel_appendBezierPathWithOvalInRect_ = sel_regis
 public static final int /*long*/ sel_appendBezierPathWithRect_ = sel_registerName("appendBezierPathWithRect:");
 public static final int /*long*/ sel_appendBezierPathWithRoundedRect_xRadius_yRadius_ = sel_registerName("appendBezierPathWithRoundedRect:xRadius:yRadius:");
 public static final int /*long*/ sel_appendString_ = sel_registerName("appendString:");
+public static final int /*long*/ sel_application_openFile_ = sel_registerName("application:openFile:");
+public static final int /*long*/ sel_application_openFiles_ = sel_registerName("application:openFiles:");
 public static final int /*long*/ sel_applicationDidBecomeActive_ = sel_registerName("applicationDidBecomeActive:");
 public static final int /*long*/ sel_applicationDidFinishLaunching_ = sel_registerName("applicationDidFinishLaunching:");
 public static final int /*long*/ sel_applicationDidResignActive_ = sel_registerName("applicationDidResignActive:");
+public static final int /*long*/ sel_applicationDockMenu_ = sel_registerName("applicationDockMenu:");
+public static final int /*long*/ sel_applicationIconImage = sel_registerName("applicationIconImage");
+public static final int /*long*/ sel_applicationShouldHandleReopen_hasVisibleWindows_ = sel_registerName("applicationShouldHandleReopen:hasVisibleWindows:");
 public static final int /*long*/ sel_applicationShouldTerminate_ = sel_registerName("applicationShouldTerminate:");
 public static final int /*long*/ sel_applicationWillFinishLaunching_ = sel_registerName("applicationWillFinishLaunching:");
 public static final int /*long*/ sel_applicationWillTerminate_ = sel_registerName("applicationWillTerminate:");
@@ -694,6 +827,8 @@ public static final int /*long*/ sel_availableFontFamilies = sel_registerName("a
 public static final int /*long*/ sel_availableFonts = sel_registerName("availableFonts");
 public static final int /*long*/ sel_availableMembersOfFontFamily_ = sel_registerName("availableMembersOfFontFamily:");
 public static final int /*long*/ sel_availableTypeFromArray_ = sel_registerName("availableTypeFromArray:");
+public static final int /*long*/ sel_backgroundColor = sel_registerName("backgroundColor");
+public static final int /*long*/ sel_badgeLabel = sel_registerName("badgeLabel");
 public static final int /*long*/ sel_baselineOffsetInLayoutManager_glyphIndex_ = sel_registerName("baselineOffsetInLayoutManager:glyphIndex:");
 public static final int /*long*/ sel_becomeFirstResponder = sel_registerName("becomeFirstResponder");
 public static final int /*long*/ sel_becomeKeyWindow = sel_registerName("becomeKeyWindow");
@@ -701,6 +836,7 @@ public static final int /*long*/ sel_beginDocument = sel_registerName("beginDocu
 public static final int /*long*/ sel_beginEditing = sel_registerName("beginEditing");
 public static final int /*long*/ sel_beginPageInRect_atPlacement_ = sel_registerName("beginPageInRect:atPlacement:");
 public static final int /*long*/ sel_beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_ = sel_registerName("beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:");
+public static final int /*long*/ sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_ = sel_registerName("beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:");
 public static final int /*long*/ sel_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ = sel_registerName("beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:");
 public static final int /*long*/ sel_beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo_ = sel_registerName("beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:");
 public static final int /*long*/ sel_bestRepresentationForDevice_ = sel_registerName("bestRepresentationForDevice:");
@@ -761,8 +897,6 @@ public static final int /*long*/ sel_clearDrawable = sel_registerName("clearDraw
 public static final int /*long*/ sel_clickCount = sel_registerName("clickCount");
 public static final int /*long*/ sel_clickedColumn = sel_registerName("clickedColumn");
 public static final int /*long*/ sel_clickedRow = sel_registerName("clickedRow");
-public static final int /*long*/ sel_clientX = sel_registerName("clientX");
-public static final int /*long*/ sel_clientY = sel_registerName("clientY");
 public static final int /*long*/ sel_close = sel_registerName("close");
 public static final int /*long*/ sel_closePath = sel_registerName("closePath");
 public static final int /*long*/ sel_code = sel_registerName("code");
@@ -780,6 +914,7 @@ public static final int /*long*/ sel_columnIndexesInRect_ = sel_registerName("co
 public static final int /*long*/ sel_columnWithIdentifier_ = sel_registerName("columnWithIdentifier:");
 public static final int /*long*/ sel_comboBoxSelectionDidChange_ = sel_registerName("comboBoxSelectionDidChange:");
 public static final int /*long*/ sel_comboBoxWillDismiss_ = sel_registerName("comboBoxWillDismiss:");
+public static final int /*long*/ sel_comboBoxWillPopUp_ = sel_registerName("comboBoxWillPopUp:");
 public static final int /*long*/ sel_compare_ = sel_registerName("compare:");
 public static final int /*long*/ sel_concat = sel_registerName("concat");
 public static final int /*long*/ sel_conformsToProtocol_ = sel_registerName("conformsToProtocol:");
@@ -788,7 +923,6 @@ public static final int /*long*/ sel_containsIndex_ = sel_registerName("contains
 public static final int /*long*/ sel_containsObject_ = sel_registerName("containsObject:");
 public static final int /*long*/ sel_containsPoint_ = sel_registerName("containsPoint:");
 public static final int /*long*/ sel_contentRect = sel_registerName("contentRect");
-public static final int /*long*/ sel_contentRectForFrameRect_ = sel_registerName("contentRectForFrameRect:");
 public static final int /*long*/ sel_contentSize = sel_registerName("contentSize");
 public static final int /*long*/ sel_contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType_ = sel_registerName("contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:");
 public static final int /*long*/ sel_contentView = sel_registerName("contentView");
@@ -834,6 +968,7 @@ public static final int /*long*/ sel_currentContext = sel_registerName("currentC
 public static final int /*long*/ sel_currentCursor = sel_registerName("currentCursor");
 public static final int /*long*/ sel_currentEditor = sel_registerName("currentEditor");
 public static final int /*long*/ sel_currentEvent = sel_registerName("currentEvent");
+public static final int /*long*/ sel_currentHandler = sel_registerName("currentHandler");
 public static final int /*long*/ sel_currentInputManager = sel_registerName("currentInputManager");
 public static final int /*long*/ sel_currentPoint = sel_registerName("currentPoint");
 public static final int /*long*/ sel_currentRunLoop = sel_registerName("currentRunLoop");
@@ -882,13 +1017,16 @@ public static final int /*long*/ sel_dictionary = sel_registerName("dictionary")
 public static final int /*long*/ sel_dictionaryWithCapacity_ = sel_registerName("dictionaryWithCapacity:");
 public static final int /*long*/ sel_dictionaryWithObject_forKey_ = sel_registerName("dictionaryWithObject:forKey:");
 public static final int /*long*/ sel_disableCursorRects = sel_registerName("disableCursorRects");
+public static final int /*long*/ sel_disableFlushWindow = sel_registerName("disableFlushWindow");
 public static final int /*long*/ sel_disabledControlTextColor = sel_registerName("disabledControlTextColor");
 public static final int /*long*/ sel_discardCursorRects = sel_registerName("discardCursorRects");
 public static final int /*long*/ sel_display = sel_registerName("display");
 public static final int /*long*/ sel_displayIfNeeded = sel_registerName("displayIfNeeded");
+public static final int /*long*/ sel_displayName = sel_registerName("displayName");
 public static final int /*long*/ sel_displayRectIgnoringOpacity_inContext_ = sel_registerName("displayRectIgnoringOpacity:inContext:");
 public static final int /*long*/ sel_distantFuture = sel_registerName("distantFuture");
 public static final int /*long*/ sel_doCommandBySelector_ = sel_registerName("doCommandBySelector:");
+public static final int /*long*/ sel_dockTile = sel_registerName("dockTile");
 public static final int /*long*/ sel_documentCursor = sel_registerName("documentCursor");
 public static final int /*long*/ sel_documentSource = sel_registerName("documentSource");
 public static final int /*long*/ sel_documentView = sel_registerName("documentView");
@@ -915,6 +1053,7 @@ public static final int /*long*/ sel_draggingUpdated_ = sel_registerName("draggi
 public static final int /*long*/ sel_drawAtPoint_ = sel_registerName("drawAtPoint:");
 public static final int /*long*/ sel_drawAtPoint_fromRect_operation_fraction_ = sel_registerName("drawAtPoint:fromRect:operation:fraction:");
 public static final int /*long*/ sel_drawBackgroundForGlyphRange_atPoint_ = sel_registerName("drawBackgroundForGlyphRange:atPoint:");
+public static final int /*long*/ sel_drawBackgroundInClipRect_ = sel_registerName("drawBackgroundInClipRect:");
 public static final int /*long*/ sel_drawFromPoint_toPoint_options_ = sel_registerName("drawFromPoint:toPoint:options:");
 public static final int /*long*/ sel_drawGlyphsForGlyphRange_atPoint_ = sel_registerName("drawGlyphsForGlyphRange:atPoint:");
 public static final int /*long*/ sel_drawImage_withFrame_inView_ = sel_registerName("drawImage:withFrame:inView:");
@@ -922,17 +1061,21 @@ public static final int /*long*/ sel_drawInRect_ = sel_registerName("drawInRect:
 public static final int /*long*/ sel_drawInRect_angle_ = sel_registerName("drawInRect:angle:");
 public static final int /*long*/ sel_drawInRect_fromRect_operation_fraction_ = sel_registerName("drawInRect:fromRect:operation:fraction:");
 public static final int /*long*/ sel_drawInteriorWithFrame_inView_ = sel_registerName("drawInteriorWithFrame:inView:");
+public static final int /*long*/ sel_drawLabel_inRect_ = sel_registerName("drawLabel:inRect:");
 public static final int /*long*/ sel_drawRect_ = sel_registerName("drawRect:");
 public static final int /*long*/ sel_drawSortIndicatorWithFrame_inView_ascending_priority_ = sel_registerName("drawSortIndicatorWithFrame:inView:ascending:priority:");
 public static final int /*long*/ sel_drawStatusBarBackgroundInRect_withHighlight_ = sel_registerName("drawStatusBarBackgroundInRect:withHighlight:");
+public static final int /*long*/ sel_drawViewBackgroundInRect_ = sel_registerName("drawViewBackgroundInRect:");
 public static final int /*long*/ sel_drawWithExpansionFrame_inView_ = sel_registerName("drawWithExpansionFrame:inView:");
 public static final int /*long*/ sel_drawingRectForBounds_ = sel_registerName("drawingRectForBounds:");
 public static final int /*long*/ sel_elementAtIndex_associatedPoints_ = sel_registerName("elementAtIndex:associatedPoints:");
 public static final int /*long*/ sel_elementCount = sel_registerName("elementCount");
 public static final int /*long*/ sel_enableCursorRects = sel_registerName("enableCursorRects");
+public static final int /*long*/ sel_enableFlushWindow = sel_registerName("enableFlushWindow");
 public static final int /*long*/ sel_enableFreedObjectCheck_ = sel_registerName("enableFreedObjectCheck:");
 public static final int /*long*/ sel_endDocument = sel_registerName("endDocument");
 public static final int /*long*/ sel_endEditing = sel_registerName("endEditing");
+public static final int /*long*/ sel_endEditingFor_ = sel_registerName("endEditingFor:");
 public static final int /*long*/ sel_endPage = sel_registerName("endPage");
 public static final int /*long*/ sel_endSheet_returnCode_ = sel_registerName("endSheet:returnCode:");
 public static final int /*long*/ sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = sel_registerName("enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:");
@@ -958,6 +1101,7 @@ public static final int /*long*/ sel_flagsChanged_ = sel_registerName("flagsChan
 public static final int /*long*/ sel_floatValue = sel_registerName("floatValue");
 public static final int /*long*/ sel_flushBuffer = sel_registerName("flushBuffer");
 public static final int /*long*/ sel_flushGraphics = sel_registerName("flushGraphics");
+public static final int /*long*/ sel_flushWindowIfNeeded = sel_registerName("flushWindowIfNeeded");
 public static final int /*long*/ sel_font = sel_registerName("font");
 public static final int /*long*/ sel_fontName = sel_registerName("fontName");
 public static final int /*long*/ sel_fontWithFamily_traits_weight_size_ = sel_registerName("fontWithFamily:traits:weight:size:");
@@ -980,6 +1124,7 @@ public static final int /*long*/ sel_getGlyphsInRange_glyphs_characterIndexes_gl
 public static final int /*long*/ sel_getIndexes_maxCount_inIndexRange_ = sel_registerName("getIndexes:maxCount:inIndexRange:");
 public static final int /*long*/ sel_getInfoForFile_application_type_ = sel_registerName("getInfoForFile:application:type:");
 public static final int /*long*/ sel_getValues_forAttribute_forVirtualScreen_ = sel_registerName("getValues:forAttribute:forVirtualScreen:");
+public static final int /*long*/ sel_globalContext = sel_registerName("globalContext");
 public static final int /*long*/ sel_glyphIndexForCharacterAtIndex_ = sel_registerName("glyphIndexForCharacterAtIndex:");
 public static final int /*long*/ sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ = sel_registerName("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:");
 public static final int /*long*/ sel_glyphRangeForCharacterRange_actualCharacterRange_ = sel_registerName("glyphRangeForCharacterRange:actualCharacterRange:");
@@ -993,6 +1138,8 @@ public static final int /*long*/ sel_graphicsContextWithWindow_ = sel_registerNa
 public static final int /*long*/ sel_graphicsPort = sel_registerName("graphicsPort");
 public static final int /*long*/ sel_greenComponent = sel_registerName("greenComponent");
 public static final int /*long*/ sel_handleEvent_ = sel_registerName("handleEvent:");
+public static final int /*long*/ sel_handleFailureInFunction_file_lineNumber_description_ = sel_registerName("handleFailureInFunction:file:lineNumber:description:");
+public static final int /*long*/ sel_handleFailureInMethod_object_file_lineNumber_description_ = sel_registerName("handleFailureInMethod:object:file:lineNumber:description:");
 public static final int /*long*/ sel_handleMouseEvent_ = sel_registerName("handleMouseEvent:");
 public static final int /*long*/ sel_hasAlpha = sel_registerName("hasAlpha");
 public static final int /*long*/ sel_hasMarkedText = sel_registerName("hasMarkedText");
@@ -1083,6 +1230,8 @@ public static final int /*long*/ sel_isEnabled = sel_registerName("isEnabled");
 public static final int /*long*/ sel_isEqual_ = sel_registerName("isEqual:");
 public static final int /*long*/ sel_isEqualTo_ = sel_registerName("isEqualTo:");
 public static final int /*long*/ sel_isEqualToString_ = sel_registerName("isEqualToString:");
+public static final int /*long*/ sel_isExecutableFileAtPath_ = sel_registerName("isExecutableFileAtPath:");
+public static final int /*long*/ sel_isFieldEditor = sel_registerName("isFieldEditor");
 public static final int /*long*/ sel_isFilePackageAtPath_ = sel_registerName("isFilePackageAtPath:");
 public static final int /*long*/ sel_isFileURL = sel_registerName("isFileURL");
 public static final int /*long*/ sel_isFlipped = sel_registerName("isFlipped");
@@ -1105,6 +1254,7 @@ public static final int /*long*/ sel_isZoomed = sel_registerName("isZoomed");
 public static final int /*long*/ sel_itemArray = sel_registerName("itemArray");
 public static final int /*long*/ sel_itemAtIndex_ = sel_registerName("itemAtIndex:");
 public static final int /*long*/ sel_itemAtRow_ = sel_registerName("itemAtRow:");
+public static final int /*long*/ sel_itemHeight = sel_registerName("itemHeight");
 public static final int /*long*/ sel_itemIdentifier = sel_registerName("itemIdentifier");
 public static final int /*long*/ sel_itemObjectValueAtIndex_ = sel_registerName("itemObjectValueAtIndex:");
 public static final int /*long*/ sel_itemTitleAtIndex_ = sel_registerName("itemTitleAtIndex:");
@@ -1150,7 +1300,9 @@ public static final int /*long*/ sel_maximumFractionDigits = sel_registerName("m
 public static final int /*long*/ sel_maximumIntegerDigits = sel_registerName("maximumIntegerDigits");
 public static final int /*long*/ sel_menu = sel_registerName("menu");
 public static final int /*long*/ sel_menu_willHighlightItem_ = sel_registerName("menu:willHighlightItem:");
+public static final int /*long*/ sel_menuBarFontOfSize_ = sel_registerName("menuBarFontOfSize:");
 public static final int /*long*/ sel_menuDidClose_ = sel_registerName("menuDidClose:");
+public static final int /*long*/ sel_menuFontOfSize_ = sel_registerName("menuFontOfSize:");
 public static final int /*long*/ sel_menuForEvent_ = sel_registerName("menuForEvent:");
 public static final int /*long*/ sel_menuNeedsUpdate_ = sel_registerName("menuNeedsUpdate:");
 public static final int /*long*/ sel_menuWillOpen_ = sel_registerName("menuWillOpen:");
@@ -1233,6 +1385,8 @@ public static final int /*long*/ sel_outlineView_objectValueForTableColumn_byIte
 public static final int /*long*/ sel_outlineView_setObjectValue_forTableColumn_byItem_ = sel_registerName("outlineView:setObjectValue:forTableColumn:byItem:");
 public static final int /*long*/ sel_outlineView_shouldCollapseItem_ = sel_registerName("outlineView:shouldCollapseItem:");
 public static final int /*long*/ sel_outlineView_shouldExpandItem_ = sel_registerName("outlineView:shouldExpandItem:");
+public static final int /*long*/ sel_outlineView_shouldSelectItem_ = sel_registerName("outlineView:shouldSelectItem:");
+public static final int /*long*/ sel_outlineView_shouldTrackCell_forTableColumn_item_ = sel_registerName("outlineView:shouldTrackCell:forTableColumn:item:");
 public static final int /*long*/ sel_outlineView_validateDrop_proposedItem_proposedChildIndex_ = sel_registerName("outlineView:validateDrop:proposedItem:proposedChildIndex:");
 public static final int /*long*/ sel_outlineView_willDisplayCell_forTableColumn_item_ = sel_registerName("outlineView:willDisplayCell:forTableColumn:item:");
 public static final int /*long*/ sel_outlineView_writeItems_toPasteboard_ = sel_registerName("outlineView:writeItems:toPasteboard:");
@@ -1240,6 +1394,7 @@ public static final int /*long*/ sel_outlineViewColumnDidMove_ = sel_registerNam
 public static final int /*long*/ sel_outlineViewColumnDidResize_ = sel_registerName("outlineViewColumnDidResize:");
 public static final int /*long*/ sel_outlineViewItemDidExpand_ = sel_registerName("outlineViewItemDidExpand:");
 public static final int /*long*/ sel_outlineViewSelectionDidChange_ = sel_registerName("outlineViewSelectionDidChange:");
+public static final int /*long*/ sel_outlineViewSelectionIsChanging_ = sel_registerName("outlineViewSelectionIsChanging:");
 public static final int /*long*/ sel_owner = sel_registerName("owner");
 public static final int /*long*/ sel_pageDown_ = sel_registerName("pageDown:");
 public static final int /*long*/ sel_pageTitle = sel_registerName("pageTitle");
@@ -1253,9 +1408,11 @@ public static final int /*long*/ sel_password = sel_registerName("password");
 public static final int /*long*/ sel_paste_ = sel_registerName("paste:");
 public static final int /*long*/ sel_pasteboard_provideDataForType_ = sel_registerName("pasteboard:provideDataForType:");
 public static final int /*long*/ sel_pasteboardWithName_ = sel_registerName("pasteboardWithName:");
+public static final int /*long*/ sel_path = sel_registerName("path");
 public static final int /*long*/ sel_pathExtension = sel_registerName("pathExtension");
 public static final int /*long*/ sel_pathForResource_ofType_ = sel_registerName("pathForResource:ofType:");
 public static final int /*long*/ sel_performDragOperation_ = sel_registerName("performDragOperation:");
+public static final int /*long*/ sel_performSelector_withObject_afterDelay_inModes_ = sel_registerName("performSelector:withObject:afterDelay:inModes:");
 public static final int /*long*/ sel_performSelectorOnMainThread_withObject_waitUntilDone_ = sel_registerName("performSelectorOnMainThread:withObject:waitUntilDone:");
 public static final int /*long*/ sel_pixelsHigh = sel_registerName("pixelsHigh");
 public static final int /*long*/ sel_pixelsWide = sel_registerName("pixelsWide");
@@ -1267,6 +1424,7 @@ public static final int /*long*/ sel_popUpContextMenu_withEvent_forView_ = sel_r
 public static final int /*long*/ sel_popUpStatusItemMenu_ = sel_registerName("popUpStatusItemMenu:");
 public static final int /*long*/ sel_port = sel_registerName("port");
 public static final int /*long*/ sel_postEvent_atStart_ = sel_registerName("postEvent:atStart:");
+public static final int /*long*/ sel_preparedCellAtColumn_row_ = sel_registerName("preparedCellAtColumn:row:");
 public static final int /*long*/ sel_prependTransform_ = sel_registerName("prependTransform:");
 public static final int /*long*/ sel_preventDefault = sel_registerName("preventDefault");
 public static final int /*long*/ sel_previousFailureCount = sel_registerName("previousFailureCount");
@@ -1285,6 +1443,8 @@ public static final int /*long*/ sel_rangeValue = sel_registerName("rangeValue")
 public static final int /*long*/ sel_realm = sel_registerName("realm");
 public static final int /*long*/ sel_recentSearches = sel_registerName("recentSearches");
 public static final int /*long*/ sel_rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount_ = sel_registerName("rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:");
+public static final int /*long*/ sel_rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount_ = sel_registerName("rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:");
+public static final int /*long*/ sel_rectForPart_ = sel_registerName("rectForPart:");
 public static final int /*long*/ sel_rectOfColumn_ = sel_registerName("rectOfColumn:");
 public static final int /*long*/ sel_rectOfRow_ = sel_registerName("rectOfRow:");
 public static final int /*long*/ sel_rectValue = sel_registerName("rectValue");
@@ -1309,6 +1469,7 @@ public static final int /*long*/ sel_removeObjectAtIndex_ = sel_registerName("re
 public static final int /*long*/ sel_removeObjectForKey_ = sel_registerName("removeObjectForKey:");
 public static final int /*long*/ sel_removeObjectIdenticalTo_ = sel_registerName("removeObjectIdenticalTo:");
 public static final int /*long*/ sel_removeObserver_ = sel_registerName("removeObserver:");
+public static final int /*long*/ sel_removeObserver_name_object_ = sel_registerName("removeObserver:name:object:");
 public static final int /*long*/ sel_removeRepresentation_ = sel_registerName("removeRepresentation:");
 public static final int /*long*/ sel_removeStatusItem_ = sel_registerName("removeStatusItem:");
 public static final int /*long*/ sel_removeTabViewItem_ = sel_registerName("removeTabViewItem:");
@@ -1316,6 +1477,7 @@ public static final int /*long*/ sel_removeTableColumn_ = sel_registerName("remo
 public static final int /*long*/ sel_removeTemporaryAttribute_forCharacterRange_ = sel_registerName("removeTemporaryAttribute:forCharacterRange:");
 public static final int /*long*/ sel_removeTrackingArea_ = sel_registerName("removeTrackingArea:");
 public static final int /*long*/ sel_replaceCharactersInRange_withString_ = sel_registerName("replaceCharactersInRange:withString:");
+public static final int /*long*/ sel_replyToOpenOrPrint_ = sel_registerName("replyToOpenOrPrint:");
 public static final int /*long*/ sel_representation = sel_registerName("representation");
 public static final int /*long*/ sel_representations = sel_registerName("representations");
 public static final int /*long*/ sel_request = sel_registerName("request");
@@ -1355,7 +1517,10 @@ public static final int /*long*/ sel_savePanel = sel_registerName("savePanel");
 public static final int /*long*/ sel_scaleXBy_yBy_ = sel_registerName("scaleXBy:yBy:");
 public static final int /*long*/ sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ = sel_registerName("scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:");
 public static final int /*long*/ sel_screen = sel_registerName("screen");
+public static final int /*long*/ sel_screenX = sel_registerName("screenX");
+public static final int /*long*/ sel_screenY = sel_registerName("screenY");
 public static final int /*long*/ sel_screens = sel_registerName("screens");
+public static final int /*long*/ sel_scrollClipView_toPoint_ = sel_registerName("scrollClipView:toPoint:");
 public static final int /*long*/ sel_scrollColumnToVisible_ = sel_registerName("scrollColumnToVisible:");
 public static final int /*long*/ sel_scrollPoint_ = sel_registerName("scrollPoint:");
 public static final int /*long*/ sel_scrollRangeToVisible_ = sel_registerName("scrollRangeToVisible:");
@@ -1381,6 +1546,7 @@ public static final int /*long*/ sel_selectedRange = sel_registerName("selectedR
 public static final int /*long*/ sel_selectedRow = sel_registerName("selectedRow");
 public static final int /*long*/ sel_selectedRowIndexes = sel_registerName("selectedRowIndexes");
 public static final int /*long*/ sel_selectedTabViewItem = sel_registerName("selectedTabViewItem");
+public static final int /*long*/ sel_selectedTextAttributes = sel_registerName("selectedTextAttributes");
 public static final int /*long*/ sel_selectedTextBackgroundColor = sel_registerName("selectedTextBackgroundColor");
 public static final int /*long*/ sel_selectedTextColor = sel_registerName("selectedTextColor");
 public static final int /*long*/ sel_sendAction_to_ = sel_registerName("sendAction:to:");
@@ -1400,8 +1566,10 @@ public static final int /*long*/ sel_setAllowsMultipleSelection_ = sel_registerN
 public static final int /*long*/ sel_setAllowsUserCustomization_ = sel_registerName("setAllowsUserCustomization:");
 public static final int /*long*/ sel_setAlpha_ = sel_registerName("setAlpha:");
 public static final int /*long*/ sel_setAlphaValue_ = sel_registerName("setAlphaValue:");
+public static final int /*long*/ sel_setAlternateButtonTitle_ = sel_registerName("setAlternateButtonTitle:");
 public static final int /*long*/ sel_setApplicationIconImage_ = sel_registerName("setApplicationIconImage:");
 public static final int /*long*/ sel_setApplicationNameForUserAgent_ = sel_registerName("setApplicationNameForUserAgent:");
+public static final int /*long*/ sel_setAttachmentCell_ = sel_registerName("setAttachmentCell:");
 public static final int /*long*/ sel_setAttributedString_ = sel_registerName("setAttributedString:");
 public static final int /*long*/ sel_setAttributedStringValue_ = sel_registerName("setAttributedStringValue:");
 public static final int /*long*/ sel_setAttributedTitle_ = sel_registerName("setAttributedTitle:");
@@ -1413,10 +1581,14 @@ public static final int /*long*/ sel_setAutoresizingMask_ = sel_registerName("se
 public static final int /*long*/ sel_setAutosaveExpandedItems_ = sel_registerName("setAutosaveExpandedItems:");
 public static final int /*long*/ sel_setBackgroundColor_ = sel_registerName("setBackgroundColor:");
 public static final int /*long*/ sel_setBackgroundLayoutEnabled_ = sel_registerName("setBackgroundLayoutEnabled:");
+public static final int /*long*/ sel_setBadgeLabel_ = sel_registerName("setBadgeLabel:");
+public static final int /*long*/ sel_setBaseWritingDirection_ = sel_registerName("setBaseWritingDirection:");
+public static final int /*long*/ sel_setBaseWritingDirection_range_ = sel_registerName("setBaseWritingDirection:range:");
 public static final int /*long*/ sel_setBezelStyle_ = sel_registerName("setBezelStyle:");
 public static final int /*long*/ sel_setBorderType_ = sel_registerName("setBorderType:");
 public static final int /*long*/ sel_setBorderWidth_ = sel_registerName("setBorderWidth:");
 public static final int /*long*/ sel_setBordered_ = sel_registerName("setBordered:");
+public static final int /*long*/ sel_setBoundsRotation_ = sel_registerName("setBoundsRotation:");
 public static final int /*long*/ sel_setBoxType_ = sel_registerName("setBoxType:");
 public static final int /*long*/ sel_setButtonType_ = sel_registerName("setButtonType:");
 public static final int /*long*/ sel_setCacheMode_ = sel_registerName("setCacheMode:");
@@ -1428,6 +1600,7 @@ public static final int /*long*/ sel_setCancelButtonCell_ = sel_registerName("se
 public static final int /*long*/ sel_setCell_ = sel_registerName("setCell:");
 public static final int /*long*/ sel_setCellClass_ = sel_registerName("setCellClass:");
 public static final int /*long*/ sel_setClip = sel_registerName("setClip");
+public static final int /*long*/ sel_setCollectionBehavior_ = sel_registerName("setCollectionBehavior:");
 public static final int /*long*/ sel_setColor_ = sel_registerName("setColor:");
 public static final int /*long*/ sel_setColumnAutoresizingStyle_ = sel_registerName("setColumnAutoresizingStyle:");
 public static final int /*long*/ sel_setCompositingOperation_ = sel_registerName("setCompositingOperation:");
@@ -1439,6 +1612,7 @@ public static final int /*long*/ sel_setCookie_ = sel_registerName("setCookie:")
 public static final int /*long*/ sel_setCopiesOnScroll_ = sel_registerName("setCopiesOnScroll:");
 public static final int /*long*/ sel_setCurrentContext_ = sel_registerName("setCurrentContext:");
 public static final int /*long*/ sel_setCurrentOperation_ = sel_registerName("setCurrentOperation:");
+public static final int /*long*/ sel_setCustomUserAgent_ = sel_registerName("setCustomUserAgent:");
 public static final int /*long*/ sel_setData_forType_ = sel_registerName("setData:forType:");
 public static final int /*long*/ sel_setDataCell_ = sel_registerName("setDataCell:");
 public static final int /*long*/ sel_setDataSource_ = sel_registerName("setDataSource:");
@@ -1454,6 +1628,7 @@ public static final int /*long*/ sel_setDestination_allowOverwrite_ = sel_regist
 public static final int /*long*/ sel_setDictionary_ = sel_registerName("setDictionary:");
 public static final int /*long*/ sel_setDirectory_ = sel_registerName("setDirectory:");
 public static final int /*long*/ sel_setDisplayMode_ = sel_registerName("setDisplayMode:");
+public static final int /*long*/ sel_setDisplaysLinkToolTips_ = sel_registerName("setDisplaysLinkToolTips:");
 public static final int /*long*/ sel_setDocumentCursor_ = sel_registerName("setDocumentCursor:");
 public static final int /*long*/ sel_setDocumentEdited_ = sel_registerName("setDocumentEdited:");
 public static final int /*long*/ sel_setDocumentView_ = sel_registerName("setDocumentView:");
@@ -1477,12 +1652,17 @@ public static final int /*long*/ sel_setFormatter_ = sel_registerName("setFormat
 public static final int /*long*/ sel_setFrame_ = sel_registerName("setFrame:");
 public static final int /*long*/ sel_setFrame_display_ = sel_registerName("setFrame:display:");
 public static final int /*long*/ sel_setFrame_display_animate_ = sel_registerName("setFrame:display:animate:");
+public static final int /*long*/ sel_setFrameFromContentFrame_ = sel_registerName("setFrameFromContentFrame:");
 public static final int /*long*/ sel_setFrameLoadDelegate_ = sel_registerName("setFrameLoadDelegate:");
 public static final int /*long*/ sel_setFrameOrigin_ = sel_registerName("setFrameOrigin:");
 public static final int /*long*/ sel_setFrameSize_ = sel_registerName("setFrameSize:");
+public static final int /*long*/ sel_setGridStyleMask_ = sel_registerName("setGridStyleMask:");
+public static final int /*long*/ sel_setHTTPBody_ = sel_registerName("setHTTPBody:");
+public static final int /*long*/ sel_setHTTPMethod_ = sel_registerName("setHTTPMethod:");
 public static final int /*long*/ sel_setHasHorizontalScroller_ = sel_registerName("setHasHorizontalScroller:");
 public static final int /*long*/ sel_setHasShadow_ = sel_registerName("setHasShadow:");
 public static final int /*long*/ sel_setHasVerticalScroller_ = sel_registerName("setHasVerticalScroller:");
+public static final int /*long*/ sel_setHeadIndent_ = sel_registerName("setHeadIndent:");
 public static final int /*long*/ sel_setHeaderCell_ = sel_registerName("setHeaderCell:");
 public static final int /*long*/ sel_setHeaderView_ = sel_registerName("setHeaderView:");
 public static final int /*long*/ sel_setHidden_ = sel_registerName("setHidden:");
@@ -1576,8 +1756,10 @@ public static final int /*long*/ sel_setSelectable_ = sel_registerName("setSelec
 public static final int /*long*/ sel_setSelected_forSegment_ = sel_registerName("setSelected:forSegment:");
 public static final int /*long*/ sel_setSelectedRange_ = sel_registerName("setSelectedRange:");
 public static final int /*long*/ sel_setSelectedSegment_ = sel_registerName("setSelectedSegment:");
+public static final int /*long*/ sel_setSelectedTextAttributes_ = sel_registerName("setSelectedTextAttributes:");
 public static final int /*long*/ sel_setServicesMenu_ = sel_registerName("setServicesMenu:");
 public static final int /*long*/ sel_setShouldAntialias_ = sel_registerName("setShouldAntialias:");
+public static final int /*long*/ sel_setShowsHelp_ = sel_registerName("setShowsHelp:");
 public static final int /*long*/ sel_setShowsPrintPanel_ = sel_registerName("setShowsPrintPanel:");
 public static final int /*long*/ sel_setShowsProgressPanel_ = sel_registerName("setShowsProgressPanel:");
 public static final int /*long*/ sel_setShowsResizeIndicator_ = sel_registerName("setShowsResizeIndicator:");
@@ -1608,7 +1790,10 @@ public static final int /*long*/ sel_setUIDelegate_ = sel_registerName("setUIDel
 public static final int /*long*/ sel_setURL_ = sel_registerName("setURL:");
 public static final int /*long*/ sel_setUpPrintOperationDefaultValues = sel_registerName("setUpPrintOperationDefaultValues");
 public static final int /*long*/ sel_setUsesAlternatingRowBackgroundColors_ = sel_registerName("setUsesAlternatingRowBackgroundColors:");
+public static final int /*long*/ sel_setUsesFontPanel_ = sel_registerName("setUsesFontPanel:");
+public static final int /*long*/ sel_setUsesScreenFonts_ = sel_registerName("setUsesScreenFonts:");
 public static final int /*long*/ sel_setUsesThreadedAnimation_ = sel_registerName("setUsesThreadedAnimation:");
+public static final int /*long*/ sel_setValue_forHTTPHeaderField_ = sel_registerName("setValue:forHTTPHeaderField:");
 public static final int /*long*/ sel_setValue_forKey_ = sel_registerName("setValue:forKey:");
 public static final int /*long*/ sel_setValueWraps_ = sel_registerName("setValueWraps:");
 public static final int /*long*/ sel_setVerticalScroller_ = sel_registerName("setVerticalScroller:");
@@ -1621,6 +1806,7 @@ public static final int /*long*/ sel_setWindingRule_ = sel_registerName("setWind
 public static final int /*long*/ sel_setWorksWhenModal_ = sel_registerName("setWorksWhenModal:");
 public static final int /*long*/ sel_setWraps_ = sel_registerName("setWraps:");
 public static final int /*long*/ sel_sharedApplication = sel_registerName("sharedApplication");
+public static final int /*long*/ sel_sharedCertificateTrustPanel = sel_registerName("sharedCertificateTrustPanel");
 public static final int /*long*/ sel_sharedColorPanel = sel_registerName("sharedColorPanel");
 public static final int /*long*/ sel_sharedFontManager = sel_registerName("sharedFontManager");
 public static final int /*long*/ sel_sharedFontPanel = sel_registerName("sharedFontPanel");
@@ -1631,7 +1817,9 @@ public static final int /*long*/ sel_shiftKey = sel_registerName("shiftKey");
 public static final int /*long*/ sel_shouldAntialias = sel_registerName("shouldAntialias");
 public static final int /*long*/ sel_shouldChangeTextInRange_replacementString_ = sel_registerName("shouldChangeTextInRange:replacementString:");
 public static final int /*long*/ sel_shouldDelayWindowOrderingForEvent_ = sel_registerName("shouldDelayWindowOrderingForEvent:");
+public static final int /*long*/ sel_shouldDrawInsertionPoint = sel_registerName("shouldDrawInsertionPoint");
 public static final int /*long*/ sel_size = sel_registerName("size");
+public static final int /*long*/ sel_sizeOfLabel_ = sel_registerName("sizeOfLabel:");
 public static final int /*long*/ sel_sizeToFit = sel_registerName("sizeToFit");
 public static final int /*long*/ sel_sizeValue = sel_registerName("sizeValue");
 public static final int /*long*/ sel_skipDescendents = sel_registerName("skipDescendents");
@@ -1648,10 +1836,10 @@ public static final int /*long*/ sel_stopLoading_ = sel_registerName("stopLoadin
 public static final int /*long*/ sel_string = sel_registerName("string");
 public static final int /*long*/ sel_stringByAddingPercentEscapesUsingEncoding_ = sel_registerName("stringByAddingPercentEscapesUsingEncoding:");
 public static final int /*long*/ sel_stringByAppendingPathComponent_ = sel_registerName("stringByAppendingPathComponent:");
+public static final int /*long*/ sel_stringByAppendingPathExtension_ = sel_registerName("stringByAppendingPathExtension:");
 public static final int /*long*/ sel_stringByAppendingString_ = sel_registerName("stringByAppendingString:");
 public static final int /*long*/ sel_stringByDeletingLastPathComponent = sel_registerName("stringByDeletingLastPathComponent");
 public static final int /*long*/ sel_stringByDeletingPathExtension = sel_registerName("stringByDeletingPathExtension");
-public static final int /*long*/ sel_stringByEvaluatingJavaScriptFromString_ = sel_registerName("stringByEvaluatingJavaScriptFromString:");
 public static final int /*long*/ sel_stringByReplacingOccurrencesOfString_withString_ = sel_registerName("stringByReplacingOccurrencesOfString:withString:");
 public static final int /*long*/ sel_stringForObjectValue_ = sel_registerName("stringForObjectValue:");
 public static final int /*long*/ sel_stringForType_ = sel_registerName("stringForType:");
@@ -1683,14 +1871,18 @@ public static final int /*long*/ sel_tableView_didClickTableColumn_ = sel_regist
 public static final int /*long*/ sel_tableView_objectValueForTableColumn_row_ = sel_registerName("tableView:objectValueForTableColumn:row:");
 public static final int /*long*/ sel_tableView_setObjectValue_forTableColumn_row_ = sel_registerName("tableView:setObjectValue:forTableColumn:row:");
 public static final int /*long*/ sel_tableView_shouldEditTableColumn_row_ = sel_registerName("tableView:shouldEditTableColumn:row:");
+public static final int /*long*/ sel_tableView_shouldSelectRow_ = sel_registerName("tableView:shouldSelectRow:");
+public static final int /*long*/ sel_tableView_shouldTrackCell_forTableColumn_row_ = sel_registerName("tableView:shouldTrackCell:forTableColumn:row:");
 public static final int /*long*/ sel_tableView_validateDrop_proposedRow_proposedDropOperation_ = sel_registerName("tableView:validateDrop:proposedRow:proposedDropOperation:");
 public static final int /*long*/ sel_tableView_willDisplayCell_forTableColumn_row_ = sel_registerName("tableView:willDisplayCell:forTableColumn:row:");
 public static final int /*long*/ sel_tableView_writeRowsWithIndexes_toPasteboard_ = sel_registerName("tableView:writeRowsWithIndexes:toPasteboard:");
 public static final int /*long*/ sel_tableViewColumnDidMove_ = sel_registerName("tableViewColumnDidMove:");
 public static final int /*long*/ sel_tableViewColumnDidResize_ = sel_registerName("tableViewColumnDidResize:");
 public static final int /*long*/ sel_tableViewSelectionDidChange_ = sel_registerName("tableViewSelectionDidChange:");
+public static final int /*long*/ sel_tableViewSelectionIsChanging_ = sel_registerName("tableViewSelectionIsChanging:");
 public static final int /*long*/ sel_target = sel_registerName("target");
 public static final int /*long*/ sel_terminate_ = sel_registerName("terminate:");
+public static final int /*long*/ sel_testPart_ = sel_registerName("testPart:");
 public static final int /*long*/ sel_textBackgroundColor = sel_registerName("textBackgroundColor");
 public static final int /*long*/ sel_textColor = sel_registerName("textColor");
 public static final int /*long*/ sel_textContainer = sel_registerName("textContainer");
@@ -1700,6 +1892,7 @@ public static final int /*long*/ sel_textStorage = sel_registerName("textStorage
 public static final int /*long*/ sel_textView_clickedOnLink_atIndex_ = sel_registerName("textView:clickedOnLink:atIndex:");
 public static final int /*long*/ sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_ = sel_registerName("textView:willChangeSelectionFromCharacterRange:toCharacterRange:");
 public static final int /*long*/ sel_textViewDidChangeSelection_ = sel_registerName("textViewDidChangeSelection:");
+public static final int /*long*/ sel_thickness = sel_registerName("thickness");
 public static final int /*long*/ sel_threadDictionary = sel_registerName("threadDictionary");
 public static final int /*long*/ sel_tile = sel_registerName("tile");
 public static final int /*long*/ sel_timeZone = sel_registerName("timeZone");
@@ -1726,6 +1919,8 @@ public static final int /*long*/ sel_transformStruct = sel_registerName("transfo
 public static final int /*long*/ sel_transformUsingAffineTransform_ = sel_registerName("transformUsingAffineTransform:");
 public static final int /*long*/ sel_translateXBy_yBy_ = sel_registerName("translateXBy:yBy:");
 public static final int /*long*/ sel_type = sel_registerName("type");
+public static final int /*long*/ sel_type_conformsToType_ = sel_registerName("type:conformsToType:");
+public static final int /*long*/ sel_typeOfFile_error_ = sel_registerName("typeOfFile:error:");
 public static final int /*long*/ sel_types = sel_registerName("types");
 public static final int /*long*/ sel_typesetter = sel_registerName("typesetter");
 public static final int /*long*/ sel_unarchiveObjectWithData_ = sel_registerName("unarchiveObjectWithData:");
@@ -1741,6 +1936,7 @@ public static final int /*long*/ sel_useCredential_forAuthenticationChallenge_ =
 public static final int /*long*/ sel_usedRectForTextContainer_ = sel_registerName("usedRectForTextContainer:");
 public static final int /*long*/ sel_user = sel_registerName("user");
 public static final int /*long*/ sel_userInfo = sel_registerName("userInfo");
+public static final int /*long*/ sel_userSpaceScaleFactor = sel_registerName("userSpaceScaleFactor");
 public static final int /*long*/ sel_usesAlternatingRowBackgroundColors = sel_registerName("usesAlternatingRowBackgroundColors");
 public static final int /*long*/ sel_validAttributesForMarkedText = sel_registerName("validAttributesForMarkedText");
 public static final int /*long*/ sel_validateVisibleColumns = sel_registerName("validateVisibleColumns");
@@ -1777,8 +1973,11 @@ public static final int /*long*/ sel_webView_resource_didFailLoadingWithError_fr
 public static final int /*long*/ sel_webView_resource_didFinishLoadingFromDataSource_ = sel_registerName("webView:resource:didFinishLoadingFromDataSource:");
 public static final int /*long*/ sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_ = sel_registerName("webView:resource:didReceiveAuthenticationChallenge:fromDataSource:");
 public static final int /*long*/ sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_ = sel_registerName("webView:resource:willSendRequest:redirectResponse:fromDataSource:");
+public static final int /*long*/ sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_ = sel_registerName("webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:");
 public static final int /*long*/ sel_webView_runJavaScriptAlertPanelWithMessage_ = sel_registerName("webView:runJavaScriptAlertPanelWithMessage:");
+public static final int /*long*/ sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_ = sel_registerName("webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:");
 public static final int /*long*/ sel_webView_runJavaScriptConfirmPanelWithMessage_ = sel_registerName("webView:runJavaScriptConfirmPanelWithMessage:");
+public static final int /*long*/ sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_ = sel_registerName("webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:");
 public static final int /*long*/ sel_webView_runOpenPanelForFileButtonWithResultListener_ = sel_registerName("webView:runOpenPanelForFileButtonWithResultListener:");
 public static final int /*long*/ sel_webView_setFrame_ = sel_registerName("webView:setFrame:");
 public static final int /*long*/ sel_webView_setResizable_ = sel_registerName("webView:setResizable:");
@@ -1797,6 +1996,8 @@ public static final int /*long*/ sel_width = sel_registerName("width");
 public static final int /*long*/ sel_window = sel_registerName("window");
 public static final int /*long*/ sel_windowBackgroundColor = sel_registerName("windowBackgroundColor");
 public static final int /*long*/ sel_windowDidBecomeKey_ = sel_registerName("windowDidBecomeKey:");
+public static final int /*long*/ sel_windowDidDeminiaturize_ = sel_registerName("windowDidDeminiaturize:");
+public static final int /*long*/ sel_windowDidMiniaturize_ = sel_registerName("windowDidMiniaturize:");
 public static final int /*long*/ sel_windowDidMove_ = sel_registerName("windowDidMove:");
 public static final int /*long*/ sel_windowDidResignKey_ = sel_registerName("windowDidResignKey:");
 public static final int /*long*/ sel_windowDidResize_ = sel_registerName("windowDidResize:");
@@ -1820,6 +2021,7 @@ public static final int NSAlphaFirstBitmapFormat = 1;
 public static final int NSAlphaNonpremultipliedBitmapFormat = 2;
 public static final int NSAlternateKeyMask = 524288;
 public static final int NSApplicationDefined = 15;
+public static final int NSApplicationDelegateReplySuccess = 0;
 public static final int NSAtTop = 2;
 public static final int NSBackingStoreBuffered = 2;
 public static final int NSBackspaceCharacter = 8;
@@ -1889,6 +2091,7 @@ public static final int NSLeftMouseUpMask = 4;
 public static final int NSLeftTabStopType = 0;
 public static final int NSLeftTextAlignment = 0;
 public static final int NSLineBreakByClipping = 2;
+public static final int NSLineBreakByTruncatingMiddle = 5;
 public static final int NSLineBreakByWordWrapping = 0;
 public static final int NSLineToBezierPathElement = 1;
 public static final int NSMiniaturizableWindowMask = 4;
@@ -1942,6 +2145,7 @@ public static final int NSScrollerDecrementPage = 1;
 public static final int NSScrollerIncrementLine = 5;
 public static final int NSScrollerIncrementPage = 3;
 public static final int NSScrollerKnob = 2;
+public static final int NSScrollerKnobSlot = 6;
 public static final int NSShadowlessSquareBezelStyle = 6;
 public static final int NSShiftKeyMask = 131072;
 public static final int NSSmallControlSize = 1;
@@ -1954,7 +2158,11 @@ public static final int NSTableColumnNoResizing = 0;
 public static final int NSTableColumnUserResizingMask = 2;
 public static final int NSTableViewDropAbove = 1;
 public static final int NSTableViewDropOn = 0;
+public static final int NSTableViewGridNone = 0;
 public static final int NSTableViewNoColumnAutoresizing = 0;
+public static final int NSTableViewSolidVerticalGridLineMask = 1;
+public static final int NSTerminateCancel = 0;
+public static final int NSTerminateNow = 1;
 public static final int NSTextFieldAndStepperDatePickerStyle = 0;
 public static final int NSTitledWindowMask = 1;
 public static final int NSUnderlineStyleDouble = 9;
@@ -1962,10 +2170,20 @@ public static final int NSUnderlineStyleNone = 0;
 public static final int NSUnderlineStyleSingle = 1;
 public static final int NSUnderlineStyleThick = 2;
 public static final int NSViewHeightSizable = 16;
+public static final int NSViewMaxXMargin = 4;
+public static final int NSViewMaxYMargin = 32;
+public static final int NSViewMinXMargin = 1;
+public static final int NSViewMinYMargin = 8;
 public static final int NSViewWidthSizable = 2;
 public static final int NSWarningAlertStyle = 0;
 public static final int NSWindowAbove = 1;
 public static final int NSWindowBelow = -1;
+public static final int NSWindowCollectionBehaviorCanJoinAllSpaces = 1;
+public static final int NSWindowCollectionBehaviorDefault = 0;
+public static final int NSWindowCollectionBehaviorMoveToActiveSpace = 2;
+public static final int NSWritingDirectionLeftToRight = 0;
+public static final int NSWritingDirectionNatural = -1;
+public static final int NSWritingDirectionRightToLeft = 1;
 public static final int NSYearMonthDatePickerElementFlag = 192;
 public static final int NSYearMonthDayDatePickerElementFlag = 224;
 public static final int kCFRunLoopBeforeWaiting = 32;
@@ -1995,17 +2213,33 @@ public static final int kCGPathElementCloseSubpath = 4;
 public static final int kCGPathElementMoveToPoint = 0;
 public static final int kCGPathStroke = 2;
 public static final int kCGSessionEventTap = 1;
+public static final int kCGTextFillStroke = 2;
+public static final int kCTParagraphStyleSpecifierBaseWritingDirection = 13;
+public static final int kCTWritingDirectionLeftToRight = 0;
+public static final int kCTWritingDirectionNatural = -1;
+public static final int kCTWritingDirectionRightToLeft = 1;
 public static final int NSAllApplicationsDirectory = 100;
 public static final int NSAllDomainsMask = 65535;
 public static final int NSNotFound = 2147483647;
 public static final int NSOrderedSame = 0;
 public static final int NSURLCredentialPersistenceForSession = 1;
 public static final int NSURLErrorBadURL = -1000;
+public static final int NSURLErrorSecureConnectionFailed = -1200;
+public static final int NSURLErrorServerCertificateNotYetValid = -1204;
 public static final int NSURLRequestReloadIgnoringLocalCacheData = 1;
 public static final int NSUTF8StringEncoding = 4;
 
 /** Globals */
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityAttributedStringForRangeParameterizedAttribute();
+public static final NSString NSAccessibilityAttributedStringForRangeParameterizedAttribute = new NSString(NSAccessibilityAttributedStringForRangeParameterizedAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityBackgroundColorTextAttribute();
+public static final NSString NSAccessibilityBackgroundColorTextAttribute = new NSString(NSAccessibilityBackgroundColorTextAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityBoundsForRangeParameterizedAttribute();
+public static final NSString NSAccessibilityBoundsForRangeParameterizedAttribute = new NSString(NSAccessibilityBoundsForRangeParameterizedAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityButtonRole();
 public static final NSString NSAccessibilityButtonRole = new NSString(NSAccessibilityButtonRole());
 /** @method flags=const */
@@ -2015,9 +2249,15 @@ public static final NSString NSAccessibilityCheckBoxRole = new NSString(NSAccess
 public static final native int /*long*/ NSAccessibilityChildrenAttribute();
 public static final NSString NSAccessibilityChildrenAttribute = new NSString(NSAccessibilityChildrenAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityColorWellRole();
+public static final NSString NSAccessibilityColorWellRole = new NSString(NSAccessibilityColorWellRole());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityColumnRole();
 public static final NSString NSAccessibilityColumnRole = new NSString(NSAccessibilityColumnRole());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityColumnsAttribute();
+public static final NSString NSAccessibilityColumnsAttribute = new NSString(NSAccessibilityColumnsAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityComboBoxRole();
 public static final NSString NSAccessibilityComboBoxRole = new NSString(NSAccessibilityComboBoxRole());
 /** @method flags=const */
@@ -2048,12 +2288,33 @@ public static final NSString NSAccessibilityFocusedAttribute = new NSString(NSAc
 public static final native int /*long*/ NSAccessibilityFocusedUIElementChangedNotification();
 public static final NSString NSAccessibilityFocusedUIElementChangedNotification = new NSString(NSAccessibilityFocusedUIElementChangedNotification());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityFocusedWindowChangedNotification();
+public static final NSString NSAccessibilityFocusedWindowChangedNotification = new NSString(NSAccessibilityFocusedWindowChangedNotification());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityFontFamilyKey();
+public static final NSString NSAccessibilityFontFamilyKey = new NSString(NSAccessibilityFontFamilyKey());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityFontNameKey();
+public static final NSString NSAccessibilityFontNameKey = new NSString(NSAccessibilityFontNameKey());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityFontSizeKey();
+public static final NSString NSAccessibilityFontSizeKey = new NSString(NSAccessibilityFontSizeKey());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityFontTextAttribute();
+public static final NSString NSAccessibilityFontTextAttribute = new NSString(NSAccessibilityFontTextAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityForegroundColorTextAttribute();
+public static final NSString NSAccessibilityForegroundColorTextAttribute = new NSString(NSAccessibilityForegroundColorTextAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityGridRole();
 public static final NSString NSAccessibilityGridRole = new NSString(NSAccessibilityGridRole());
 /** @method flags=const */
 public static final native int /*long*/ NSAccessibilityGroupRole();
 public static final NSString NSAccessibilityGroupRole = new NSString(NSAccessibilityGroupRole());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityHeaderAttribute();
+public static final NSString NSAccessibilityHeaderAttribute = new NSString(NSAccessibilityHeaderAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityHelpAttribute();
 public static final NSString NSAccessibilityHelpAttribute = new NSString(NSAccessibilityHelpAttribute());
 /** @method flags=const */
@@ -2072,6 +2333,9 @@ public static final NSString NSAccessibilityImageRole = new NSString(NSAccessibi
 public static final native int /*long*/ NSAccessibilityIncrementorRole();
 public static final NSString NSAccessibilityIncrementorRole = new NSString(NSAccessibilityIncrementorRole());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityIndexAttribute();
+public static final NSString NSAccessibilityIndexAttribute = new NSString(NSAccessibilityIndexAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityInsertionPointLineNumberAttribute();
 public static final NSString NSAccessibilityInsertionPointLineNumberAttribute = new NSString(NSAccessibilityInsertionPointLineNumberAttribute());
 /** @method flags=const */
@@ -2087,6 +2351,9 @@ public static final NSString NSAccessibilityLinkRole = new NSString(NSAccessibil
 public static final native int /*long*/ NSAccessibilityLinkTextAttribute();
 public static final NSString NSAccessibilityLinkTextAttribute = new NSString(NSAccessibilityLinkTextAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityLinkedUIElementsAttribute();
+public static final NSString NSAccessibilityLinkedUIElementsAttribute = new NSString(NSAccessibilityLinkedUIElementsAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityListRole();
 public static final NSString NSAccessibilityListRole = new NSString(NSAccessibilityListRole());
 /** @method flags=const */
@@ -2108,6 +2375,12 @@ public static final NSString NSAccessibilityMenuRole = new NSString(NSAccessibil
 public static final native int /*long*/ NSAccessibilityMinValueAttribute();
 public static final NSString NSAccessibilityMinValueAttribute = new NSString(NSAccessibilityMinValueAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityMisspelledTextAttribute();
+public static final NSString NSAccessibilityMisspelledTextAttribute = new NSString(NSAccessibilityMisspelledTextAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityMovedNotification();
+public static final NSString NSAccessibilityMovedNotification = new NSString(NSAccessibilityMovedNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityNextContentsAttribute();
 public static final NSString NSAccessibilityNextContentsAttribute = new NSString(NSAccessibilityNextContentsAttribute());
 /** @method flags=const */
@@ -2159,15 +2432,24 @@ public static final NSString NSAccessibilityRangeForLineParameterizedAttribute =
 public static final native int /*long*/ NSAccessibilityRangeForPositionParameterizedAttribute();
 public static final NSString NSAccessibilityRangeForPositionParameterizedAttribute = new NSString(NSAccessibilityRangeForPositionParameterizedAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityResizedNotification();
+public static final NSString NSAccessibilityResizedNotification = new NSString(NSAccessibilityResizedNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityRoleAttribute();
 public static final NSString NSAccessibilityRoleAttribute = new NSString(NSAccessibilityRoleAttribute());
 /** @method flags=const */
 public static final native int /*long*/ NSAccessibilityRoleDescriptionAttribute();
 public static final NSString NSAccessibilityRoleDescriptionAttribute = new NSString(NSAccessibilityRoleDescriptionAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityRowCountChangedNotification();
+public static final NSString NSAccessibilityRowCountChangedNotification = new NSString(NSAccessibilityRowCountChangedNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityRowRole();
 public static final NSString NSAccessibilityRowRole = new NSString(NSAccessibilityRowRole());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityRowsAttribute();
+public static final NSString NSAccessibilityRowsAttribute = new NSString(NSAccessibilityRowsAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityScrollAreaRole();
 public static final NSString NSAccessibilityScrollAreaRole = new NSString(NSAccessibilityScrollAreaRole());
 /** @method flags=const */
@@ -2183,6 +2465,15 @@ public static final NSString NSAccessibilitySelectedChildrenAttribute = new NSSt
 public static final native int /*long*/ NSAccessibilitySelectedChildrenChangedNotification();
 public static final NSString NSAccessibilitySelectedChildrenChangedNotification = new NSString(NSAccessibilitySelectedChildrenChangedNotification());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilitySelectedColumnsAttribute();
+public static final NSString NSAccessibilitySelectedColumnsAttribute = new NSString(NSAccessibilitySelectedColumnsAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilitySelectedRowsAttribute();
+public static final NSString NSAccessibilitySelectedRowsAttribute = new NSString(NSAccessibilitySelectedRowsAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilitySelectedRowsChangedNotification();
+public static final NSString NSAccessibilitySelectedRowsChangedNotification = new NSString(NSAccessibilitySelectedRowsChangedNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilitySelectedTextAttribute();
 public static final NSString NSAccessibilitySelectedTextAttribute = new NSString(NSAccessibilitySelectedTextAttribute());
 /** @method flags=const */
@@ -2198,6 +2489,9 @@ public static final NSString NSAccessibilitySelectedTextRangesAttribute = new NS
 public static final native int /*long*/ NSAccessibilityServesAsTitleForUIElementsAttribute();
 public static final NSString NSAccessibilityServesAsTitleForUIElementsAttribute = new NSString(NSAccessibilityServesAsTitleForUIElementsAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityShowMenuAction();
+public static final NSString NSAccessibilityShowMenuAction = new NSString(NSAccessibilityShowMenuAction());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilitySizeAttribute();
 public static final NSString NSAccessibilitySizeAttribute = new NSString(NSAccessibilitySizeAttribute());
 /** @method flags=const */
@@ -2216,6 +2510,12 @@ public static final NSString NSAccessibilityStandardWindowSubrole = new NSString
 public static final native int /*long*/ NSAccessibilityStaticTextRole();
 public static final NSString NSAccessibilityStaticTextRole = new NSString(NSAccessibilityStaticTextRole());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityStrikethroughColorTextAttribute();
+public static final NSString NSAccessibilityStrikethroughColorTextAttribute = new NSString(NSAccessibilityStrikethroughColorTextAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityStrikethroughTextAttribute();
+public static final NSString NSAccessibilityStrikethroughTextAttribute = new NSString(NSAccessibilityStrikethroughTextAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityStringForRangeParameterizedAttribute();
 public static final NSString NSAccessibilityStringForRangeParameterizedAttribute = new NSString(NSAccessibilityStringForRangeParameterizedAttribute());
 /** @method flags=const */
@@ -2225,6 +2525,9 @@ public static final NSString NSAccessibilityStyleRangeForIndexParameterizedAttri
 public static final native int /*long*/ NSAccessibilitySubroleAttribute();
 public static final NSString NSAccessibilitySubroleAttribute = new NSString(NSAccessibilitySubroleAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilitySuperscriptTextAttribute();
+public static final NSString NSAccessibilitySuperscriptTextAttribute = new NSString(NSAccessibilitySuperscriptTextAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilitySystemDialogSubrole();
 public static final NSString NSAccessibilitySystemDialogSubrole = new NSString(NSAccessibilitySystemDialogSubrole());
 /** @method flags=const */
@@ -2252,6 +2555,9 @@ public static final NSString NSAccessibilityTextLinkSubrole = new NSString(NSAcc
 public static final native int /*long*/ NSAccessibilityTitleAttribute();
 public static final NSString NSAccessibilityTitleAttribute = new NSString(NSAccessibilityTitleAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityTitleChangedNotification();
+public static final NSString NSAccessibilityTitleChangedNotification = new NSString(NSAccessibilityTitleChangedNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityTitleUIElementAttribute();
 public static final NSString NSAccessibilityTitleUIElementAttribute = new NSString(NSAccessibilityTitleUIElementAttribute());
 /** @method flags=const */
@@ -2261,6 +2567,15 @@ public static final NSString NSAccessibilityToolbarRole = new NSString(NSAccessi
 public static final native int /*long*/ NSAccessibilityTopLevelUIElementAttribute();
 public static final NSString NSAccessibilityTopLevelUIElementAttribute = new NSString(NSAccessibilityTopLevelUIElementAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityURLAttribute();
+public static final NSString NSAccessibilityURLAttribute = new NSString(NSAccessibilityURLAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityUnderlineColorTextAttribute();
+public static final NSString NSAccessibilityUnderlineColorTextAttribute = new NSString(NSAccessibilityUnderlineColorTextAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityUnderlineTextAttribute();
+public static final NSString NSAccessibilityUnderlineTextAttribute = new NSString(NSAccessibilityUnderlineTextAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityUnknownRole();
 public static final NSString NSAccessibilityUnknownRole = new NSString(NSAccessibilityUnknownRole());
 /** @method flags=const */
@@ -2291,6 +2606,15 @@ public static final NSString NSAccessibilityVisibleCharacterRangeAttribute = new
 public static final native int /*long*/ NSAccessibilityVisibleChildrenAttribute();
 public static final NSString NSAccessibilityVisibleChildrenAttribute = new NSString(NSAccessibilityVisibleChildrenAttribute());
 /** @method flags=const */
+public static final native int /*long*/ NSAccessibilityVisibleColumnsAttribute();
+public static final NSString NSAccessibilityVisibleColumnsAttribute = new NSString(NSAccessibilityVisibleColumnsAttribute());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityVisibleNameKey();
+public static final NSString NSAccessibilityVisibleNameKey = new NSString(NSAccessibilityVisibleNameKey());
+/** @method flags=const */
+public static final native int /*long*/ NSAccessibilityVisibleRowsAttribute();
+public static final NSString NSAccessibilityVisibleRowsAttribute = new NSString(NSAccessibilityVisibleRowsAttribute());
+/** @method flags=const */
 public static final native int /*long*/ NSAccessibilityWindowAttribute();
 public static final NSString NSAccessibilityWindowAttribute = new NSString(NSAccessibilityWindowAttribute());
 /** @method flags=const */
@@ -2300,6 +2624,9 @@ public static final NSString NSAccessibilityWindowRole = new NSString(NSAccessib
 public static final native int /*long*/ NSApplicationDidChangeScreenParametersNotification();
 public static final NSString NSApplicationDidChangeScreenParametersNotification = new NSString(NSApplicationDidChangeScreenParametersNotification());
 /** @method flags=const */
+public static final native int /*long*/ NSAttachmentAttributeName();
+public static final NSString NSAttachmentAttributeName = new NSString(NSAttachmentAttributeName());
+/** @method flags=const */
 public static final native int /*long*/ NSBackgroundColorAttributeName();
 public static final NSString NSBackgroundColorAttributeName = new NSString(NSBackgroundColorAttributeName());
 /** @method flags=const */
@@ -2309,6 +2636,9 @@ public static final NSString NSBaselineOffsetAttributeName = new NSString(NSBase
 public static final native int /*long*/ NSCalibratedRGBColorSpace();
 public static final NSString NSCalibratedRGBColorSpace = new NSString(NSCalibratedRGBColorSpace());
 /** @method flags=const */
+public static final native int /*long*/ NSCursorAttributeName();
+public static final NSString NSCursorAttributeName = new NSString(NSCursorAttributeName());
+/** @method flags=const */
 public static final native int /*long*/ NSDeviceRGBColorSpace();
 public static final NSString NSDeviceRGBColorSpace = new NSString(NSDeviceRGBColorSpace());
 /** @method flags=const */
@@ -2336,9 +2666,15 @@ public static final NSString NSHTMLPboardType = new NSString(NSHTMLPboardType())
 public static final native int /*long*/ NSLinkAttributeName();
 public static final NSString NSLinkAttributeName = new NSString(NSLinkAttributeName());
 /** @method flags=const */
+public static final native int /*long*/ NSModalPanelRunLoopMode();
+public static final NSString NSModalPanelRunLoopMode = new NSString(NSModalPanelRunLoopMode());
+/** @method flags=const */
 public static final native int /*long*/ NSObliquenessAttributeName();
 public static final NSString NSObliquenessAttributeName = new NSString(NSObliquenessAttributeName());
 /** @method flags=const */
+public static final native int /*long*/ NSOutlineViewColumnDidMoveNotification();
+public static final NSString NSOutlineViewColumnDidMoveNotification = new NSString(NSOutlineViewColumnDidMoveNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSParagraphStyleAttributeName();
 public static final NSString NSParagraphStyleAttributeName = new NSString(NSParagraphStyleAttributeName());
 /** @method flags=const */
@@ -2378,6 +2714,9 @@ public static final NSString NSPrintSpoolJob = new NSString(NSPrintSpoolJob());
 public static final native int /*long*/ NSRTFPboardType();
 public static final NSString NSRTFPboardType = new NSString(NSRTFPboardType());
 /** @method flags=const */
+public static final native int /*long*/ NSSpellingStateAttributeName();
+public static final NSString NSSpellingStateAttributeName = new NSString(NSSpellingStateAttributeName());
+/** @method flags=const */
 public static final native int /*long*/ NSStrikethroughColorAttributeName();
 public static final NSString NSStrikethroughColorAttributeName = new NSString(NSStrikethroughColorAttributeName());
 /** @method flags=const */
@@ -2396,6 +2735,9 @@ public static final NSString NSSystemColorsDidChangeNotification = new NSString(
 public static final native int /*long*/ NSTIFFPboardType();
 public static final NSString NSTIFFPboardType = new NSString(NSTIFFPboardType());
 /** @method flags=const */
+public static final native int /*long*/ NSTableViewColumnDidMoveNotification();
+public static final NSString NSTableViewColumnDidMoveNotification = new NSString(NSTableViewColumnDidMoveNotification());
+/** @method flags=const */
 public static final native int /*long*/ NSToolbarCustomizeToolbarItemIdentifier();
 public static final NSString NSToolbarCustomizeToolbarItemIdentifier = new NSString(NSToolbarCustomizeToolbarItemIdentifier());
 /** @method flags=const */
@@ -2435,8 +2777,16 @@ public static final NSString NSUnderlineStyleAttributeName = new NSString(NSUnde
 public static final native int /*long*/ NSViewGlobalFrameDidChangeNotification();
 public static final NSString NSViewGlobalFrameDidChangeNotification = new NSString(NSViewGlobalFrameDidChangeNotification());
 /** @method flags=const */
+public static final native int /*long*/ kCFAllocatorDefault();
+/** @method flags=const */
 public static final native int /*long*/ kCFRunLoopCommonModes();
 /** @method flags=const */
+public static final native int /*long*/ kCTFontAttributeName();
+/** @method flags=const */
+public static final native int /*long*/ kCTForegroundColorAttributeName();
+/** @method flags=const */
+public static final native int /*long*/ kCTParagraphStyleAttributeName();
+/** @method flags=const */
 public static final native int /*long*/ NSDefaultRunLoopMode();
 public static final NSString NSDefaultRunLoopMode = new NSString(NSDefaultRunLoopMode());
 /** @method flags=const */
@@ -2501,6 +2851,12 @@ public static final native void NSCopyBits(int /*long*/ srcGState, NSRect srcRec
  */
 public static final native int /*long*/ NSNumberOfColorComponents(int /*long*/ colorSpaceName);
 /**
+ * @param alloc cast=(CFAllocatorRef)
+ * @param str cast=(CFStringRef)
+ * @param attributes cast=(CFDictionaryRef)
+ */
+public static final native int /*long*/ CFAttributedStringCreate(int /*long*/ alloc, int /*long*/ str, int /*long*/ attributes);
+/**
  * @param theData cast=(CFDataRef)
  */
 public static final native int /*long*/ CFDataGetBytePtr(int /*long*/ theData);
@@ -2509,6 +2865,19 @@ public static final native int /*long*/ CFDataGetBytePtr(int /*long*/ theData);
  */
 public static final native int /*long*/ CFDataGetLength(int /*long*/ theData);
 /**
+ * @param theDict cast=(CFMutableDictionaryRef)
+ * @param key cast=(void*)
+ * @param value cast=(void*)
+ */
+public static final native void CFDictionaryAddValue(int /*long*/ theDict, int /*long*/ key, int /*long*/ value);
+/**
+ * @param allocator cast=(CFAllocatorRef)
+ * @param capacity cast=(CFIndex)
+ * @param keyCallBacks cast=(CFDictionaryKeyCallBacks*)
+ * @param valueCallBacks cast=(CFDictionaryValueCallBacks*)
+ */
+public static final native int /*long*/ CFDictionaryCreateMutable(int /*long*/ allocator, int /*long*/ capacity, int /*long*/ keyCallBacks, int /*long*/ valueCallBacks);
+/**
  * @param cf cast=(CFTypeRef)
  */
 public static final native void CFRelease(int /*long*/ cf);
@@ -2533,6 +2902,27 @@ public static final native int /*long*/ CFRunLoopObserverCreate(int /*long*/ all
  */
 public static final native void CFRunLoopObserverInvalidate(int /*long*/ observer);
 /**
+ * @param mode cast=(CFStringRef)
+ * @param seconds cast=(CFTimeInterval)
+ * @param returnAfterSourceHandled cast=(Boolean)
+ */
+public static final native int CFRunLoopRunInMode(int /*long*/ mode, double seconds, boolean returnAfterSourceHandled);
+/**
+ * @param rl cast=(CFRunLoopRef)
+ */
+public static final native void CFRunLoopStop(int /*long*/ rl);
+/**
+ * @param alloc cast=(CFAllocatorRef)
+ * @param chars cast=(UniChar*)
+ * @param numChars cast=(CFIndex)
+ */
+public static final native int /*long*/ CFStringCreateWithCharacters(int /*long*/ alloc, char[] chars, int /*long*/ numChars);
+/**
+ * @param allocator cast=(CFAllocatorRef)
+ * @param fsRef cast=(struct FSRef*)
+ */
+public static final native int /*long*/ CFURLCreateFromFSRef(int /*long*/ allocator, byte[] fsRef);
+/**
  * @param allocator cast=(CFAllocatorRef)
  * @param originalString cast=(CFStringRef)
  * @param charactersToLeaveUnescaped cast=(CFStringRef)
@@ -2558,6 +2948,15 @@ public static final native int /*long*/ CGBitmapContextCreateImage(int /*long*/
  * @param c cast=(CGContextRef)
  */
 public static final native int /*long*/ CGBitmapContextGetData(int /*long*/ c);
+/**
+ * @param space cast=(CGColorSpaceRef)
+ * @param components cast=(CGFloat*)
+ */
+public static final native int /*long*/ CGColorCreate(int /*long*/ space, float[] /*double[]*/ components);
+/**
+ * @param color cast=(CGColorRef)
+ */
+public static final native void CGColorRelease(int /*long*/ color);
 public static final native int /*long*/ CGColorSpaceCreateDeviceRGB();
 /**
  * @param space cast=(CGColorSpaceRef)
@@ -2645,6 +3044,27 @@ public static final native void CGContextSetLineWidth(int /*long*/ c, float /*do
 public static final native void CGContextSetMiterLimit(int /*long*/ c, float /*double*/ limit);
 /**
  * @param c cast=(CGContextRef)
+ * @param shouldAntialias cast=(_Bool)
+ */
+public static final native void CGContextSetShouldAntialias(int /*long*/ c, boolean shouldAntialias);
+/**
+ * @param c cast=(CGContextRef)
+ * @param mode cast=(CGTextDrawingMode)
+ */
+public static final native void CGContextSetTextDrawingMode(int /*long*/ c, int mode);
+/**
+ * @param c cast=(CGContextRef)
+ * @param t flags=struct
+ */
+public static final native void CGContextSetTextMatrix(int /*long*/ c, CGAffineTransform t);
+/**
+ * @param c cast=(CGContextRef)
+ * @param x cast=(CGFloat)
+ * @param y cast=(CGFloat)
+ */
+public static final native void CGContextSetTextPosition(int /*long*/ c, float /*double*/ x, float /*double*/ y);
+/**
+ * @param c cast=(CGContextRef)
  */
 public static final native void CGContextStrokePath(int /*long*/ c);
 /**
@@ -2766,6 +3186,12 @@ public static final native void CGPathAddCurveToPoint(int /*long*/ path, int /*l
  */
 public static final native void CGPathAddLineToPoint(int /*long*/ path, int /*long*/ m, float /*double*/ x, float /*double*/ y);
 /**
+ * @param path cast=(CGMutablePathRef)
+ * @param m cast=(CGAffineTransform*)
+ * @param rect flags=struct
+ */
+public static final native void CGPathAddRect(int /*long*/ path, int /*long*/ m, CGRect rect);
+/**
  * @param path cast=(CGPathRef)
  * @param info cast=(void*)
  * @param function cast=(CGPathApplierFunction)
@@ -2823,6 +3249,54 @@ public static final native int CGSetLocalEventsSuppressionInterval(double second
  */
 public static final native int CGWarpMouseCursorPosition(CGPoint newCursorPosition);
 /**
+ * @param font cast=(CTFontRef)
+ */
+public static final native float /*double*/ CTFontGetAscent(int /*long*/ font);
+/**
+ * @param font cast=(CTFontRef)
+ */
+public static final native float /*double*/ CTFontGetDescent(int /*long*/ font);
+/**
+ * @param font cast=(CTFontRef)
+ */
+public static final native float /*double*/ CTFontGetLeading(int /*long*/ font);
+/**
+ * @param string cast=(CFAttributedStringRef)
+ */
+public static final native int /*long*/ CTLineCreateWithAttributedString(int /*long*/ string);
+/**
+ * @param line cast=(CTLineRef)
+ * @param context cast=(CGContextRef)
+ */
+public static final native void CTLineDraw(int /*long*/ line, int /*long*/ context);
+/**
+ * @param line cast=(CTLineRef)
+ * @param ascent cast=(CGFloat*)
+ * @param descent cast=(CGFloat*)
+ * @param leading cast=(CGFloat*)
+ */
+public static final native double CTLineGetTypographicBounds(int /*long*/ line, float[] /*double[]*/ ascent, float[] /*double[]*/ descent, float[] /*double[]*/ leading);
+/**
+ * @param settings cast=(CTParagraphStyleSetting*)
+ * @param settingCount cast=(CFIndex)
+ */
+public static final native int /*long*/ CTParagraphStyleCreate(int /*long*/ settings, int /*long*/ settingCount);
+/**
+ * @param typesetter cast=(CTTypesetterRef)
+ * @param stringRange flags=struct
+ */
+public static final native int /*long*/ CTTypesetterCreateLine(int /*long*/ typesetter, CFRange stringRange);
+/**
+ * @param string cast=(CFAttributedStringRef)
+ */
+public static final native int /*long*/ CTTypesetterCreateWithAttributedString(int /*long*/ string);
+/**
+ * @param typesetter cast=(CTTypesetterRef)
+ * @param startIndex cast=(CFIndex)
+ * @param width cast=(double)
+ */
+public static final native int /*long*/ CTTypesetterSuggestLineBreak(int /*long*/ typesetter, int /*long*/ startIndex, double width);
+/**
  * @param aRect flags=struct
  * @param bRect flags=struct
  */
@@ -2881,12 +3355,22 @@ public static final native int /*long*/ objc_msgSendSuper(objc_super superId, in
 public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, NSSize arg0);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, boolean arg0);
+/**
+ * @method flags=cast
+ * @param arg1 flags=struct
+ */
+public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, boolean arg0, NSRect arg1);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, int /*long*/ arg0);
 /**
  * @method flags=cast
  * @param arg1 flags=struct
  */
+public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, int /*long*/ arg0, NSPoint arg1);
+/**
+ * @method flags=cast
+ * @param arg1 flags=struct
+ */
 public static final native int /*long*/ objc_msgSendSuper(objc_super superId, int /*long*/ sel, int /*long*/ arg0, NSPoint arg1, int /*long*/ arg2);
 /**
  * @method flags=cast
@@ -2913,6 +3397,8 @@ public static final native void objc_msgSendSuper_stret(NSRect result, objc_supe
 public static final native void objc_msgSendSuper_stret(NSRect result, objc_super superId, int /*long*/ sel, NSRect arg0, int /*long*/ arg1);
 /** @method flags=cast */
 public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, int /*long*/ sel);
+/** @method flags=cast */
+public static final native void objc_msgSendSuper_stret(NSSize result, objc_super superId, int /*long*/ sel, boolean arg0);
 
 /** Sends */
 
@@ -2950,6 +3436,8 @@ public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long
 /** @method flags=cast */
 public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2);
 /** @method flags=cast */
+public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3);
+/** @method flags=cast */
 public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4);
 /** @method flags=cast */
 public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, short arg0);
@@ -3021,7 +3509,7 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
  * @param arg0 flags=struct
  * @param arg1 flags=struct
  */
-public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, NSRange arg0, NSRange arg1, int /*long*/ arg2, int /*long*/ arg3);
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, NSRange arg0, NSRange arg1, int /*long*/ arg2, int[] /*long[]*/ arg3);
 /**
  * @method flags=cast
  * @param arg0 flags=struct
@@ -3031,7 +3519,7 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
  * @method flags=cast
  * @param arg0 flags=struct
  */
-public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, NSRange arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5);
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, NSRange arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, byte[] arg5);
 /**
  * @method flags=cast
  * @param arg0 flags=struct
@@ -3113,6 +3601,11 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, NSSize arg0);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, boolean arg0);
+/**
+ * @method flags=cast
+ * @param arg1 flags=struct
+ */
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, boolean arg0, NSRect arg1);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, boolean arg0, int /*long*/ arg1);
 /** @method flags=cast */
@@ -3194,6 +3687,8 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, boolean arg2);
 /** @method flags=cast */
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, double arg2, int /*long*/ arg3);
+/** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, boolean arg3);
@@ -3208,6 +3703,8 @@ public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, boolean arg5, boolean arg6, int /*long*/ arg7, int /*long*/ arg8, int /*long*/ arg9, int /*long*/ arg10);
 /** @method flags=cast */
+public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5);
+/** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5, int /*long*/ arg6);
 /** @method flags=cast */
 public static final native int /*long*/ objc_msgSend(int /*long*/ id, int /*long*/ sel, int[] /*long[]*/ arg0);
@@ -3298,12 +3795,17 @@ public static final native void objc_msgSend_stret(NSSize result, int /*long*/ i
  * @param arg0 flags=struct
  */
 public static final native void objc_msgSend_stret(NSSize result, int /*long*/ id, int /*long*/ sel, NSSize arg0, int /*long*/ arg1);
+/** @method flags=cast */
+public static final native void objc_msgSend_stret(NSSize result, int /*long*/ id, int /*long*/ sel, boolean arg0);
 
 /** Sizeof natives */
+public static final native int CFRange_sizeof();
+public static final native int CGAffineTransform_sizeof();
 public static final native int CGPathElement_sizeof();
 public static final native int CGPoint_sizeof();
 public static final native int CGRect_sizeof();
 public static final native int CGSize_sizeof();
+public static final native int CTParagraphStyleSetting_sizeof();
 public static final native int NSAffineTransformStruct_sizeof();
 public static final native int NSPoint_sizeof();
 public static final native int NSRange_sizeof();
@@ -3316,6 +3818,26 @@ public static final native int NSSize_sizeof();
  * @param dest cast=(void *),flags=no_in critical
  * @param src cast=(void *),flags=critical
  */
+public static final native void memmove(int /*long*/ dest, CFRange src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
+public static final native void memmove(CFRange dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
+public static final native void memmove(int /*long*/ dest, CGAffineTransform src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
+public static final native void memmove(CGAffineTransform dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
 public static final native void memmove(int /*long*/ dest, CGPathElement src, int /*long*/ size);
 /**
  * @param dest cast=(void *),flags=no_in critical
@@ -3356,6 +3878,16 @@ public static final native void memmove(CGSize dest, int /*long*/ src, int /*lon
  * @param dest cast=(void *),flags=no_in critical
  * @param src cast=(void *),flags=critical
  */
+public static final native void memmove(int /*long*/ dest, CTParagraphStyleSetting src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
+public static final native void memmove(CTParagraphStyleSetting dest, int /*long*/ src, int /*long*/ size);
+/**
+ * @param dest cast=(void *),flags=no_in critical
+ * @param src cast=(void *),flags=critical
+ */
 public static final native void memmove(int /*long*/ dest, NSAffineTransformStruct src, int /*long*/ size);
 /**
  * @param dest cast=(void *),flags=no_in critical
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java
new file mode 100644
index 0000000..52f15a3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificatePanel.java	
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class SFCertificatePanel extends NSPanel {
+
+public SFCertificatePanel() {
+	super();
+}
+
+public SFCertificatePanel(int /*long*/ id) {
+	super(id);
+}
+
+public SFCertificatePanel(id id) {
+	super(id);
+}
+
+public void setAlternateButtonTitle(NSString title) {
+	OS.objc_msgSend(this.id, OS.sel_setAlternateButtonTitle_, title != null ? title.id : 0);
+}
+
+public void setShowsHelp(boolean showsHelp) {
+	OS.objc_msgSend(this.id, OS.sel_setShowsHelp_, showsHelp);
+}
+
+public static float /*double*/ minFrameWidthWithTitle(NSString aTitle, int /*long*/ aStyle) {
+	return (float)OS.objc_msgSend_fpret(OS.class_SFCertificatePanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java
new file mode 100644
index 0000000..8517e30
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SFCertificateTrustPanel.java	
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class SFCertificateTrustPanel extends SFCertificatePanel {
+
+public SFCertificateTrustPanel() {
+	super();
+}
+
+public SFCertificateTrustPanel(int /*long*/ id) {
+	super(id);
+}
+
+public SFCertificateTrustPanel(id id) {
+	super(id);
+}
+
+public void beginSheetForWindow(NSWindow docWindow, id delegate, int /*long*/ didEndSelector, int /*long*/ contextInfo, int /*long*/ trust, NSString message) {
+	OS.objc_msgSend(this.id, OS.sel_beginSheetForWindow_modalDelegate_didEndSelector_contextInfo_trust_message_, docWindow != null ? docWindow.id : 0, delegate != null ? delegate.id : 0, didEndSelector, contextInfo, trust, message != null ? message.id : 0);
+}
+
+public static SFCertificateTrustPanel sharedCertificateTrustPanel() {
+	int /*long*/ result = OS.objc_msgSend(OS.class_SFCertificateTrustPanel, OS.sel_sharedCertificateTrustPanel);
+	return result != 0 ? new SFCertificateTrustPanel(result) : null;
+}
+
+public static float /*double*/ minFrameWidthWithTitle(NSString aTitle, int /*long*/ aStyle) {
+	return (float)OS.objc_msgSend_fpret(OS.class_SFCertificateTrustPanel, OS.sel_minFrameWidthWithTitle_styleMask_, aTitle != null ? aTitle.id : 0, aStyle);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabViewItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabViewItem.java
new file mode 100644
index 0000000..aa5d18a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTabViewItem.java	
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class SWTTabViewItem extends NSTabViewItem {
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextAttachmentCell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextAttachmentCell.java
new file mode 100644
index 0000000..175696b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SWTTextAttachmentCell.java	
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.cocoa;
+
+public class SWTTextAttachmentCell extends NSCell {
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SecurityInterfaceFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SecurityInterfaceFull.bridgesupport.extras
new file mode 100644
index 0000000..6b29a3e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/SecurityInterfaceFull.bridgesupport.extras	
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF8"?>
+<signatures swt_gen="mixed">
+	<class name="SFCertificatePanel" swt_gen="mixed" swt_superclass="NSPanel">
+		<method selector="setAlternateButtonTitle:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setShowsHelp:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+	</class>
+	<class name="SFCertificateTrustPanel" swt_gen="mixed" swt_superclass="SFCertificatePanel">
+		<method selector="beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:message:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method class_method="true" selector="sharedCertificateTrustPanel" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
+	</class>
+</signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java
index 951ebfb..8e0f16a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,10 @@ public WebDataSource dataSource() {
 	return result != 0 ? new WebDataSource(result) : null;
 }
 
+public int /*long*/ globalContext() {
+	return OS.objc_msgSend(this.id, OS.sel_globalContext);
+}
+
 public void loadHTMLString(NSString string, NSURL URL) {
 	OS.objc_msgSend(this.id, OS.sel_loadHTMLString_baseURL_, string != null ? string.id : 0, URL != null ? URL.id : 0);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras
index 2d1617c..5ae0bbc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras	
@@ -37,16 +37,16 @@
 		<method selector="button" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="clientX" swt_gen="true">
+		<method selector="ctrlKey" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="clientY" swt_gen="true">
+		<method selector="metaKey" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="ctrlKey" swt_gen="true">
+		<method selector="screenX" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="metaKey" swt_gen="true">
+		<method selector="screenY" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="shiftKey" swt_gen="true">
@@ -62,16 +62,16 @@
 		<method selector="altKey" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="clientX" swt_gen="true">
+		<method selector="ctrlKey" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="clientY" swt_gen="true">
+		<method selector="metaKey" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="ctrlKey" swt_gen="true">
+		<method selector="screenX" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
-		<method selector="metaKey" swt_gen="true">
+		<method selector="screenY" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="shiftKey" swt_gen="true">
@@ -83,13 +83,13 @@
 	</class>
 	<class name="NSObject" swt_gen="mixed">
 		<method selector="addEventListener:listener:useCapture:" swt_gen="true">
-			<arg name="type" swt_gen="true"></arg>
-			<arg name="listener" swt_gen="true"></arg>
-			<arg name="useCapture" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="handleEvent:" swt_gen="true">
-			<arg name="evt" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -114,13 +114,16 @@
 		<method selector="dataSource" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
+		<method selector="globalContext" swt_gen="true">
+			<retval swt_gen="true"></retval>
+		</method>
 		<method selector="loadHTMLString:baseURL:" swt_gen="true">
-			<arg name="string" swt_gen="true"></arg>
-			<arg name="URL" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="loadRequest:" swt_gen="true">
-			<arg name="request" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -132,17 +135,17 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="printOperationWithPrintInfo:" swt_gen="true">
-			<arg name="printInfo" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
 	<class name="WebPreferences" swt_gen="mixed">
 		<method selector="setJavaEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setJavaScriptEnabled:" swt_gen="true">
-			<arg name="flag" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="standardPreferences" swt_gen="true">
@@ -151,7 +154,7 @@
 	</class>
 	<class name="WebScriptObject" swt_gen="mixed">
 		<method selector="webScriptValueAtIndex:" swt_gen="true">
-			<arg name="index" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
@@ -168,15 +171,15 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method class_method="true" selector="canShowMIMEType:" swt_gen="true">
-			<arg name="MIMEType" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="copy:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="cut:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="goBack" swt_gen="true">
@@ -186,225 +189,240 @@
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="initWithFrame:frameName:groupName:" swt_gen="true">
-			<arg name="frame" swt_gen="true"></arg>
-			<arg name="frameName" swt_gen="true"></arg>
-			<arg name="groupName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true" swt_java_type="WebView"></retval>
 		</method>
 		<method selector="mainFrame" swt_gen="true">
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="paste:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="reload:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setApplicationNameForUserAgent:" swt_gen="true">
-			<arg name="applicationName" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<retval swt_gen="true"></retval>
+		</method>
+		<method selector="setCustomUserAgent:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setDownloadDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setFrameLoadDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPolicyDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setPreferences:" swt_gen="true">
-			<arg name="prefs" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setResourceLoadDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="setUIDelegate:" swt_gen="true">
-			<arg name="delegate" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 		<method selector="stopLoading:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<retval swt_gen="true"></retval>
-		</method>
-		<method selector="stringByEvaluatingJavaScriptFromString:" swt_gen="true">
-			<arg name="script" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 			<retval swt_gen="true"></retval>
 		</method>
 	</class>
+	<informal_protocol name="WebDocumentRepresentation" swt_gen="true">
+		<method selector="documentSource" swt_gen="true"></method>
+	</informal_protocol>
 	<informal_protocol name="WebFrameLoadDelegate" swt_gen="mixed">
 		<method selector="webView:didChangeLocationWithinPageForFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:didCommitLoadForFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:didFailProvisionalLoadWithError:forFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="error" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:didFinishLoadForFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:didReceiveTitle:forFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="title" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:didStartProvisionalLoadForFrame:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:windowScriptObjectAvailable:" swt_gen="true">
-			<arg name="webView" swt_gen="true"></arg>
-			<arg name="windowScriptObject" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+	</informal_protocol>
+	<informal_protocol name="WebOpenPanelResultListener" swt_gen="true">
+		<method selector="chooseFilename:" swt_gen="true">
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
+	<informal_protocol name="WebPolicyDecisionListener" swt_gen="true">
+		<method selector="download" swt_gen="true"></method>
+		<method selector="ignore" swt_gen="true"></method>
+		<method selector="use" swt_gen="true"></method>
+	</informal_protocol>
 	<informal_protocol name="WebPolicyDelegate" swt_gen="true">
 		<method selector="webView:decidePolicyForMIMEType:request:frame:decisionListener:" swt_gen="true">
-			<arg name="webView" swt_gen="true"></arg>
-			<arg name="type" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
-			<arg name="listener" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:decidePolicyForNavigationAction:request:frame:decisionListener:" swt_gen="true">
-			<arg name="webView" swt_gen="true"></arg>
-			<arg name="actionInformation" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
-			<arg name="listener" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:" swt_gen="true">
-			<arg name="webView" swt_gen="true"></arg>
-			<arg name="actionInformation" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
-			<arg name="frameName" swt_gen="true"></arg>
-			<arg name="listener" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:unableToImplementPolicyWithError:frame:" swt_gen="true">
-			<arg name="webView" swt_gen="true"></arg>
-			<arg name="error" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="WebResourceLoadDelegate" swt_gen="mixed">
 		<method selector="webView:identifierForInitialRequest:fromDataSource:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
-			<arg name="dataSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:resource:didFailLoadingWithError:fromDataSource:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="identifier" swt_gen="true"></arg>
-			<arg name="error" swt_gen="true"></arg>
-			<arg name="dataSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:resource:didFinishLoadingFromDataSource:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="identifier" swt_gen="true"></arg>
-			<arg name="dataSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:resource:didReceiveAuthenticationChallenge:fromDataSource:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="identifier" swt_gen="true"></arg>
-			<arg name="challenge" swt_gen="true"></arg>
-			<arg name="dataSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:resource:willSendRequest:redirectResponse:fromDataSource:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="identifier" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
-			<arg name="redirectResponse" swt_gen="true"></arg>
-			<arg name="dataSource" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
 	<informal_protocol name="WebUIDelegate" swt_gen="mixed">
 		<method selector="webView:contextMenuItemsForElement:defaultMenuItems:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="element" swt_gen="true"></arg>
-			<arg name="defaultMenuItems" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:createWebViewWithRequest:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="request" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:mouseDidMoveOverElement:modifierFlags:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="elementInformation" swt_gen="true"></arg>
-			<arg name="modifierFlags" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:printFrameView:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frameView" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:runJavaScriptAlertPanelWithMessage:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="message" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:runJavaScriptConfirmPanelWithMessage:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="message" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+		</method>
+		<method selector="webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:" swt_gen="true">
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:runOpenPanelForFileButtonWithResultListener:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="resultListener" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:setFrame:" swt_gen="true" swt_gen_custom_callback="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="frame" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:setResizable:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="resizable" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:setStatusBarVisible:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="visible" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:setStatusText:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="text" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webView:setToolbarsVisible:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-			<arg name="visible" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webViewClose:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webViewFocus:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webViewShow:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 		<method selector="webViewUnfocus:" swt_gen="true">
-			<arg name="sender" swt_gen="true"></arg>
-		</method>
-	</informal_protocol>
-	<informal_protocol name="WebOpenPanelResultListener" swt_gen="true">
-		<method selector="chooseFilename:" swt_gen="true">
-			<arg name="theRange" swt_gen="true"></arg>
+			<arg swt_gen="true"></arg>
 		</method>
 	</informal_protocol>
-	<informal_protocol name="WebDocumentRepresentation" swt_gen="true">
-		<method selector="documentSource" swt_gen="true"></method>
-	</informal_protocol>
-	<informal_protocol name="WebPolicyDecisionListener" swt_gen="true">
-		<method selector="use" swt_gen="true"></method>
-		<method selector="download" swt_gen="true"></method>
-		<method selector="ignore" swt_gen="true"></method>
-	</informal_protocol>
 </signatures>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java
index 34df6e3..5277868 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,6 +74,10 @@ public void setApplicationNameForUserAgent(NSString applicationName) {
 	OS.objc_msgSend(this.id, OS.sel_setApplicationNameForUserAgent_, applicationName != null ? applicationName.id : 0);
 }
 
+public void setCustomUserAgent(NSString userAgentString) {
+	OS.objc_msgSend(this.id, OS.sel_setCustomUserAgent_, userAgentString != null ? userAgentString.id : 0);
+}
+
 public void setDownloadDelegate(id delegate) {
 	OS.objc_msgSend(this.id, OS.sel_setDownloadDelegate_, delegate != null ? delegate.id : 0);
 }
@@ -102,9 +106,4 @@ public void stopLoading(id sender) {
 	OS.objc_msgSend(this.id, OS.sel_stopLoading_, sender != null ? sender.id : 0);
 }
 
-public NSString stringByEvaluatingJavaScriptFromString(NSString script) {
-	int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringByEvaluatingJavaScriptFromString_, script != null ? script.id : 0);
-	return result != 0 ? new NSString(result) : null;
-}
-
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java
index f37a4cc..dde42cd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2me/org/eclipse/swt/internal/Library.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ public class Library {
 	/**
 	 * SWT Minor version number (must be in the range 0..999)
 	 */
-    static int MINOR_VERSION = 557;
+    static int MINOR_VERSION = 659;
 	
 	/**
 	 * SWT revision number (must be >= 0)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
index ca01aff..87d1355 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ public class Library {
 	/**
 	 * SWT Minor version number (must be in the range 0..999)
 	 */
-    static int MINOR_VERSION = 557;
+    static int MINOR_VERSION = 659;
 	
 	/**
 	 * SWT revision number (must be >= 0)
@@ -37,19 +37,33 @@ public class Library {
 	public static final int JAVA_VERSION, SWT_VERSION;
 
 	static final String SEPARATOR;
+	static final String DELIMITER;
 	
 	/* 64-bit support */
-	static /*final*/ boolean IS_64 = 0x1FFFFFFFFL == (int /*long*/)0x1FFFFFFFFL;
+	static final boolean IS_64 = longConst() == (int /*long*/)longConst();
 	static final String SUFFIX_64 = "-64";	//$NON-NLS-1$
 	static final String SWTDIR_32 = "swtlib-32";	//$NON-NLS-1$
 	static final String SWTDIR_64 = "swtlib-64";	//$NON-NLS-1$
 
 static {
-	SEPARATOR = System.getProperty("file.separator");
-	JAVA_VERSION = parseVersion(System.getProperty("java.version"));
+	DELIMITER = System.getProperty("line.separator"); //$NON-NLS-1$
+	SEPARATOR = System.getProperty("file.separator"); //$NON-NLS-1$
+	JAVA_VERSION = parseVersion(System.getProperty("java.version")); //$NON-NLS-1$
 	SWT_VERSION = SWT_VERSION(MAJOR_VERSION, MINOR_VERSION);
 }
 
+static void chmod(String permision, String path) {
+	if (Platform.PLATFORM.equals ("win32")) return; //$NON-NLS-1$
+	try {
+		Runtime.getRuntime ().exec (new String []{"chmod", permision, path}).waitFor(); //$NON-NLS-1$
+	} catch (Throwable e) {}
+}
+
+/* Use method instead of in-lined constants to avoid compiler warnings */
+static long longConst() {
+	return 0x1FFFFFFFFL;
+}
+
 static int parseVersion(String version) {
 	if (version == null) return 0;
 	int major = 0, minor = 0, micro = 0;
@@ -94,7 +108,7 @@ public static int SWT_VERSION (int major, int minor) {
 	return major * 1000 + minor;
 }
 
-static boolean extract (String fileName, String mappedName) {
+static boolean extract (String fileName, String mappedName, StringBuffer message) {
 	FileOutputStream os = null;
 	InputStream is = null;
 	File file = new File(fileName);
@@ -112,14 +126,10 @@ static boolean extract (String fileName, String mappedName) {
 				}
 				os.close ();
 				is.close ();
-				if (!Platform.PLATFORM.equals ("win32")) { //$NON-NLS-1$
-					try {
-						Runtime.getRuntime ().exec (new String []{"chmod", "755", fileName}).waitFor(); //$NON-NLS-1$ //$NON-NLS-2$
-					} catch (Throwable e) {}
-				}
+				chmod ("755", fileName);
+				if (load (fileName, message)) return true;
 			}
 		}
-		if (load (fileName)) return true;
 	} catch (Throwable e) {
 		try {
 			if (os != null) os.close ();
@@ -132,7 +142,7 @@ static boolean extract (String fileName, String mappedName) {
 	return false;
 }
 
-static boolean load (String libName) {
+static boolean load (String libName, StringBuffer message) {
 	try {
 		if (libName.indexOf (SEPARATOR) != -1) {
 			System.load (libName);
@@ -140,7 +150,12 @@ static boolean load (String libName) {
 			System.loadLibrary (libName);
 		}		
 		return true;
-	} catch (UnsatisfiedLinkError e) {}
+	} catch (UnsatisfiedLinkError e) {
+		if (message.length() == 0) message.append(DELIMITER);
+		message.append('\t');
+		message.append(e.getMessage());
+		message.append(DELIMITER);
+	}
 	return false;
 }
 
@@ -207,17 +222,19 @@ public static void loadLibrary (String name, boolean mapName) {
 		libName1 = libName2 = mappedName1 = mappedName2 = name;
 	}
 
+	StringBuffer message = new StringBuffer();
+	
 	/* Try loading library from swt library path */
 	String path = System.getProperty ("swt.library.path"); //$NON-NLS-1$
 	if (path != null) {
 		path = new File (path).getAbsolutePath ();
-		if (load (path + SEPARATOR + mappedName1)) return;
-		if (mapName && load (path + SEPARATOR + mappedName2)) return;
+		if (load (path + SEPARATOR + mappedName1, message)) return;
+		if (mapName && load (path + SEPARATOR + mappedName2, message)) return;
 	}
 
 	/* Try loading library from java library path */
-	if (load (libName1)) return;
-	if (mapName && load (libName2)) return;
+	if (load (libName1, message)) return;
+	if (mapName && load (libName2, message)) return;
 
 	/* Try loading library from the tmp directory if swt library path is not specified */
 	String fileName1 = mappedName1;
@@ -228,11 +245,7 @@ public static void loadLibrary (String name, boolean mapName) {
 		boolean make = false;
 		if ((dir.exists () && dir.isDirectory ()) || (make = dir.mkdir ())) {
 			path = dir.getAbsolutePath ();
-			if (make && !Platform.PLATFORM.equals ("win32")) { //$NON-NLS-1$
-				try {
-					Runtime.getRuntime ().exec (new String []{"chmod", "777", path}).waitFor(); //$NON-NLS-1$ //$NON-NLS-2$
-				} catch (Throwable e) {}
-			}
+			if (make) chmod ("777", path); //$NON-NLS-1$
 		} else {
 			/* fall back to using the tmp directory */
 			if (IS_64) {
@@ -240,18 +253,18 @@ public static void loadLibrary (String name, boolean mapName) {
 				fileName2 = mapLibraryName (libName2 + SUFFIX_64);
 			}
 		}
-		if (load (path + SEPARATOR + fileName1)) return;
-		if (mapName && load (path + SEPARATOR + fileName2)) return;
+		if (load (path + SEPARATOR + fileName1, message)) return;
+		if (mapName && load (path + SEPARATOR + fileName2, message)) return;
 	}
 		
 	/* Try extracting and loading library from jar */
 	if (path != null) {
-		if (extract (path + SEPARATOR + fileName1, mappedName1)) return;
-		if (mapName && extract (path + SEPARATOR + fileName2, mappedName2)) return;
+		if (extract (path + SEPARATOR + fileName1, mappedName1, message)) return;
+		if (mapName && extract (path + SEPARATOR + fileName2, mappedName2, message)) return;
 	}
 	
 	/* Failed to find the library */
-	throw new UnsatisfiedLinkError ("no " + libName1 + " or " + libName2 + " in swt.library.path, java.library.path or the jar file"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	throw new UnsatisfiedLinkError ("Could not load SWT library. Reasons: " + message.toString()); //$NON-NLS-1$
 }
 
 static String mapLibraryName (String libName) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c
index b663012..3b25002 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -19,6 +19,126 @@
 
 #define ATK_NATIVE(func) Java_org_eclipse_swt_internal_accessibility_gtk_ATK_##func
 
+#ifndef NO_ATK_1IS_1NO_1OP_1OBJECT_1FACTORY
+JNIEXPORT jboolean JNICALL ATK_NATIVE(ATK_1IS_1NO_1OP_1OBJECT_1FACTORY)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC);
+	rc = (jboolean)ATK_IS_NO_OP_OBJECT_FACTORY(arg0);
+	ATK_NATIVE_EXIT(env, that, ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1ACTION
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1ACTION)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1ACTION_FUNC);
+	rc = (jintLong)ATK_TYPE_ACTION;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1ACTION_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1COMPONENT
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1COMPONENT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1COMPONENT_FUNC);
+	rc = (jintLong)ATK_TYPE_COMPONENT;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1COMPONENT_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1HYPERTEXT
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1HYPERTEXT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1HYPERTEXT_FUNC);
+	rc = (jintLong)ATK_TYPE_HYPERTEXT;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1HYPERTEXT_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1OBJECT_1FACTORY
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1OBJECT_1FACTORY)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1OBJECT_1FACTORY_FUNC);
+	rc = (jintLong)ATK_TYPE_OBJECT_FACTORY;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1OBJECT_1FACTORY_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1SELECTION
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1SELECTION)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1SELECTION_FUNC);
+	rc = (jintLong)ATK_TYPE_SELECTION;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1SELECTION_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1TABLE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1TABLE)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1TABLE_FUNC);
+	rc = (jintLong)ATK_TYPE_TABLE;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1TABLE_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1TEXT
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1TEXT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1TEXT_FUNC);
+	rc = (jintLong)ATK_TYPE_TEXT;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1TEXT_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_ATK_1TYPE_1VALUE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(ATK_1TYPE_1VALUE)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, ATK_1TYPE_1VALUE_FUNC);
+	rc = (jintLong)ATK_TYPE_VALUE;
+	ATK_NATIVE_EXIT(env, that, ATK_1TYPE_1VALUE_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_AtkAttribute_1sizeof
+JNIEXPORT jint JNICALL ATK_NATIVE(AtkAttribute_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	ATK_NATIVE_ENTER(env, that, AtkAttribute_1sizeof_FUNC);
+	rc = (jint)AtkAttribute_sizeof();
+	ATK_NATIVE_EXIT(env, that, AtkAttribute_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_AtkObjectFactoryClass_1sizeof
 JNIEXPORT jint JNICALL ATK_NATIVE(AtkObjectFactoryClass_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -43,6 +163,42 @@ JNIEXPORT jint JNICALL ATK_NATIVE(AtkObjectFactory_1sizeof)
 }
 #endif
 
+#ifndef NO_AtkTextRange_1sizeof
+JNIEXPORT jint JNICALL ATK_NATIVE(AtkTextRange_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	ATK_NATIVE_ENTER(env, that, AtkTextRange_1sizeof_FUNC);
+	rc = (jint)AtkTextRange_sizeof();
+	ATK_NATIVE_EXIT(env, that, AtkTextRange_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_AtkTextRectangle_1sizeof
+JNIEXPORT jint JNICALL ATK_NATIVE(AtkTextRectangle_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	ATK_NATIVE_ENTER(env, that, AtkTextRectangle_1sizeof_FUNC);
+	rc = (jint)AtkTextRectangle_sizeof();
+	ATK_NATIVE_EXIT(env, that, AtkTextRectangle_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1TYPE_1ACCESSIBLE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(GTK_1TYPE_1ACCESSIBLE)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
+	rc = (jintLong)GTK_TYPE_ACCESSIBLE;
+	ATK_NATIVE_EXIT(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1ATK_1ACTION_1GET_1IFACE
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1ACTION_1GET_1IFACE)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -67,6 +223,18 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1COMPONENT_1GET_1IFACE)
 }
 #endif
 
+#ifndef NO__1ATK_1HYPERTEXT_1GET_1IFACE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1HYPERTEXT_1GET_1IFACE)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
+	rc = (jintLong)ATK_HYPERTEXT_GET_IFACE(arg0);
+	ATK_NATIVE_EXIT(env, that, _1ATK_1HYPERTEXT_1GET_1IFACE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1ATK_1OBJECT_1FACTORY_1CLASS
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1OBJECT_1FACTORY_1CLASS)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -91,6 +259,18 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1SELECTION_1GET_1IFACE)
 }
 #endif
 
+#ifndef NO__1ATK_1TABLE_1GET_1IFACE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1TABLE_1GET_1IFACE)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1ATK_1TABLE_1GET_1IFACE_FUNC);
+	rc = (jintLong)ATK_TABLE_GET_IFACE(arg0);
+	ATK_NATIVE_EXIT(env, that, _1ATK_1TABLE_1GET_1IFACE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1ATK_1TEXT_1GET_1IFACE
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1TEXT_1GET_1IFACE)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -103,6 +283,18 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1TEXT_1GET_1IFACE)
 }
 #endif
 
+#ifndef NO__1ATK_1VALUE_1GET_1IFACE
+JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1VALUE_1GET_1IFACE)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1ATK_1VALUE_1GET_1IFACE_FUNC);
+	rc = (jintLong)ATK_VALUE_GET_IFACE(arg0);
+	ATK_NATIVE_EXIT(env, that, _1ATK_1VALUE_1GET_1IFACE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1GTK_1ACCESSIBLE
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1GTK_1ACCESSIBLE)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -171,6 +363,16 @@ JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1object_1initialize)
 }
 #endif
 
+#ifndef NO__1atk_1object_1notify_1state_1change
+JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1object_1notify_1state_1change)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2)
+{
+	ATK_NATIVE_ENTER(env, that, _1atk_1object_1notify_1state_1change_FUNC);
+	atk_object_notify_state_change((AtkObject *)arg0, arg1, arg2);
+	ATK_NATIVE_EXIT(env, that, _1atk_1object_1notify_1state_1change_FUNC);
+}
+#endif
+
 #ifndef NO__1atk_1object_1ref_1relation_1set
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1object_1ref_1relation_1set)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -239,6 +441,22 @@ JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1relation_1set_1remove)
 }
 #endif
 
+#ifndef NO__1atk_1role_1register
+JNIEXPORT jint JNICALL ATK_NATIVE(_1atk_1role_1register)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jint rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1atk_1role_1register_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jint)atk_role_register((const gchar *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	ATK_NATIVE_EXIT(env, that, _1atk_1role_1register_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1atk_1state_1set_1add_1state
 JNIEXPORT jboolean JNICALL ATK_NATIVE(_1atk_1state_1set_1add_1state)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -263,6 +481,46 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1state_1set_1new)
 }
 #endif
 
+#ifndef NO__1atk_1text_1attribute_1get_1name
+JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1text_1attribute_1get_1name)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1atk_1text_1attribute_1get_1name_FUNC);
+	rc = (jintLong)atk_text_attribute_get_name(arg0);
+	ATK_NATIVE_EXIT(env, that, _1atk_1text_1attribute_1get_1name_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1atk_1text_1attribute_1get_1value
+JNIEXPORT jintLong JNICALL ATK_NATIVE(_1atk_1text_1attribute_1get_1value)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1atk_1text_1attribute_1get_1value_FUNC);
+	rc = (jintLong)atk_text_attribute_get_value(arg0, arg1);
+	ATK_NATIVE_EXIT(env, that, _1atk_1text_1attribute_1get_1value_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1atk_1text_1attribute_1register
+JNIEXPORT jint JNICALL ATK_NATIVE(_1atk_1text_1attribute_1register)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jint rc = 0;
+	ATK_NATIVE_ENTER(env, that, _1atk_1text_1attribute_1register_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jint)atk_text_attribute_register((const gchar *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	ATK_NATIVE_EXIT(env, that, _1atk_1text_1attribute_1register_FUNC);
+	return rc;
+}
+#endif
+
 #if (!defined(NO__1call__II) && !defined(JNI64)) || (!defined(NO__1call__JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -401,6 +659,18 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__JJJJJJJ)(JNIEnv *env, jclass that,
 }
 #endif
 
+#ifndef NO_g_1strdup
+JNIEXPORT jintLong JNICALL ATK_NATIVE(g_1strdup)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	ATK_NATIVE_ENTER(env, that, g_1strdup_FUNC);
+	rc = (jintLong)g_strdup((char *)arg0);
+	ATK_NATIVE_EXIT(env, that, g_1strdup_FUNC);
+	return rc;
+}
+#endif
+
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
@@ -422,6 +692,30 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibil
 }
 #endif
 
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#endif
+{
+	AtkAttribute _arg1, *lparg1=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getAtkAttributeFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
@@ -527,6 +821,27 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibil
 }
 #endif
 
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+#endif
+{
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
+#endif
+	if (arg1) getAtkTableIfaceFields(env, arg1, (AtkTableIface *)arg0);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
@@ -548,6 +863,75 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibil
 }
 #endif
 
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#endif
+{
+	AtkTextRange _arg1, *lparg1=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getAtkTextRangeFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#endif
+{
+	AtkTextRectangle _arg1, *lparg1=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getAtkTextRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+#endif
+{
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
+#endif
+	if (arg1) getAtkValueIfaceFields(env, arg1, (AtkValueIface *)arg0);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
@@ -569,6 +953,31 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibili
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#endif
+{
+	AtkAttribute _arg0, *lparg0=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getAtkAttributeFields(env, arg0, &_arg0)) == NULL) goto fail;
+	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+	if (arg0 && lparg0) setAtkAttributeFields(env, arg0, lparg0);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
@@ -674,6 +1083,27 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibili
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#endif
+{
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J_FUNC);
+#endif
+	if (arg0) setAtkTableIfaceFields(env, arg0, (AtkTableIface *)arg1);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
@@ -695,6 +1125,77 @@ JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibili
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#endif
+{
+	AtkTextRange _arg0, *lparg0=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getAtkTextRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
+	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+	if (arg0 && lparg0) setAtkTextRangeFields(env, arg0, lparg0);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
+#endif
+{
+	AtkTextRectangle _arg0, *lparg0=NULL;
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI_FUNC);
+#endif
+	if (arg0) if ((lparg0 = getAtkTextRectangleFields(env, arg0, &_arg0)) == NULL) goto fail;
+	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
+fail:
+	if (arg0 && lparg0) setAtkTextRectangleFields(env, arg0, lparg0);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#else
+JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#endif
+{
+#ifndef JNI64
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I_FUNC);
+#else
+	ATK_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J_FUNC);
+#endif
+	if (arg0) setAtkValueIfaceFields(env, arg0, (AtkValueIface *)arg1);
+#ifndef JNI64
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I_FUNC);
+#else
+	ATK_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL ATK_NATIVE(memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.h
index 1de6af0..e353373 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -16,3 +16,11 @@
 #include "os.h"
 #include <atk/atk.h>
 #include "atk_custom.h"
+
+#if (GTK_MAJOR_VERSION>=2 && GTK_MINOR_VERSION>=10)
+#define SWT_AtkObjectClass_get_attributes get_attributes
+#define SWT_AtkObjectClass_get_attributes_cast AtkAttributeSet* (*)()
+#else
+#define SWT_AtkObjectClass_get_attributes pad1
+#define SWT_AtkObjectClass_get_attributes_cast AtkFunction
+#endif 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c
index 0527eda..880122a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,30 +18,51 @@
 
 #ifdef NATIVE_STATS
 
-int ATK_nativeFunctionCount = 42;
-int ATK_nativeFunctionCallCount[42];
+int ATK_nativeFunctionCount = 74;
+int ATK_nativeFunctionCallCount[74];
 char * ATK_nativeFunctionNames[] = {
+	"ATK_1IS_1NO_1OP_1OBJECT_1FACTORY",
+	"ATK_1TYPE_1ACTION",
+	"ATK_1TYPE_1COMPONENT",
+	"ATK_1TYPE_1HYPERTEXT",
+	"ATK_1TYPE_1OBJECT_1FACTORY",
+	"ATK_1TYPE_1SELECTION",
+	"ATK_1TYPE_1TABLE",
+	"ATK_1TYPE_1TEXT",
+	"ATK_1TYPE_1VALUE",
+	"AtkAttribute_1sizeof",
 	"AtkObjectFactoryClass_1sizeof",
 	"AtkObjectFactory_1sizeof",
+	"AtkTextRange_1sizeof",
+	"AtkTextRectangle_1sizeof",
+	"GTK_1TYPE_1ACCESSIBLE",
 	"_1ATK_1ACTION_1GET_1IFACE",
 	"_1ATK_1COMPONENT_1GET_1IFACE",
+	"_1ATK_1HYPERTEXT_1GET_1IFACE",
 	"_1ATK_1OBJECT_1FACTORY_1CLASS",
 	"_1ATK_1SELECTION_1GET_1IFACE",
+	"_1ATK_1TABLE_1GET_1IFACE",
 	"_1ATK_1TEXT_1GET_1IFACE",
+	"_1ATK_1VALUE_1GET_1IFACE",
 	"_1GTK_1ACCESSIBLE",
 	"_1atk_1focus_1tracker_1notify",
 	"_1atk_1get_1default_1registry",
 	"_1atk_1object_1factory_1create_1accessible",
 	"_1atk_1object_1factory_1get_1accessible_1type",
 	"_1atk_1object_1initialize",
+	"_1atk_1object_1notify_1state_1change",
 	"_1atk_1object_1ref_1relation_1set",
 	"_1atk_1registry_1get_1factory",
 	"_1atk_1registry_1set_1factory_1type",
 	"_1atk_1relation_1set_1get_1n_1relations",
 	"_1atk_1relation_1set_1get_1relation",
 	"_1atk_1relation_1set_1remove",
+	"_1atk_1role_1register",
 	"_1atk_1state_1set_1add_1state",
 	"_1atk_1state_1set_1new",
+	"_1atk_1text_1attribute_1get_1name",
+	"_1atk_1text_1attribute_1get_1value",
+	"_1atk_1text_1attribute_1register",
 #ifndef JNI64
 	"_1call__II",
 #else
@@ -72,12 +93,18 @@ char * ATK_nativeFunctionNames[] = {
 #else
 	"_1call__JJJJJJJ",
 #endif
+	"g_1strdup",
 #ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2",
 #else
 	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2",
 #endif
 #ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I",
+#endif
+#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2",
 #else
 	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2",
@@ -103,16 +130,41 @@ char * ATK_nativeFunctionNames[] = {
 	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2",
 #endif
 #ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2",
+#else
+	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2",
+#endif
+#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2",
 #else
 	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2",
 #endif
 #ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I",
+#endif
+#ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I",
+#else
+	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I",
+#endif
+#ifndef JNI64
+	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2",
+#else
+	"memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2J",
@@ -138,11 +190,31 @@ char * ATK_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2J",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I",
+#else
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2J",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI",
+#endif
+#ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II",
+#else
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI",
+#endif
+#ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I",
+#else
+	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2J",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h
index d4680ab..10e1400 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -29,27 +29,48 @@ extern char* ATK_nativeFunctionNames[];
 #endif
 
 typedef enum {
+	ATK_1IS_1NO_1OP_1OBJECT_1FACTORY_FUNC,
+	ATK_1TYPE_1ACTION_FUNC,
+	ATK_1TYPE_1COMPONENT_FUNC,
+	ATK_1TYPE_1HYPERTEXT_FUNC,
+	ATK_1TYPE_1OBJECT_1FACTORY_FUNC,
+	ATK_1TYPE_1SELECTION_FUNC,
+	ATK_1TYPE_1TABLE_FUNC,
+	ATK_1TYPE_1TEXT_FUNC,
+	ATK_1TYPE_1VALUE_FUNC,
+	AtkAttribute_1sizeof_FUNC,
 	AtkObjectFactoryClass_1sizeof_FUNC,
 	AtkObjectFactory_1sizeof_FUNC,
+	AtkTextRange_1sizeof_FUNC,
+	AtkTextRectangle_1sizeof_FUNC,
+	GTK_1TYPE_1ACCESSIBLE_FUNC,
 	_1ATK_1ACTION_1GET_1IFACE_FUNC,
 	_1ATK_1COMPONENT_1GET_1IFACE_FUNC,
+	_1ATK_1HYPERTEXT_1GET_1IFACE_FUNC,
 	_1ATK_1OBJECT_1FACTORY_1CLASS_FUNC,
 	_1ATK_1SELECTION_1GET_1IFACE_FUNC,
+	_1ATK_1TABLE_1GET_1IFACE_FUNC,
 	_1ATK_1TEXT_1GET_1IFACE_FUNC,
+	_1ATK_1VALUE_1GET_1IFACE_FUNC,
 	_1GTK_1ACCESSIBLE_FUNC,
 	_1atk_1focus_1tracker_1notify_FUNC,
 	_1atk_1get_1default_1registry_FUNC,
 	_1atk_1object_1factory_1create_1accessible_FUNC,
 	_1atk_1object_1factory_1get_1accessible_1type_FUNC,
 	_1atk_1object_1initialize_FUNC,
+	_1atk_1object_1notify_1state_1change_FUNC,
 	_1atk_1object_1ref_1relation_1set_FUNC,
 	_1atk_1registry_1get_1factory_FUNC,
 	_1atk_1registry_1set_1factory_1type_FUNC,
 	_1atk_1relation_1set_1get_1n_1relations_FUNC,
 	_1atk_1relation_1set_1get_1relation_FUNC,
 	_1atk_1relation_1set_1remove_FUNC,
+	_1atk_1role_1register_FUNC,
 	_1atk_1state_1set_1add_1state_FUNC,
 	_1atk_1state_1set_1new_FUNC,
+	_1atk_1text_1attribute_1get_1name_FUNC,
+	_1atk_1text_1attribute_1get_1value_FUNC,
+	_1atk_1text_1attribute_1register_FUNC,
 #ifndef JNI64
 	_1call__II_FUNC,
 #else
@@ -80,12 +101,18 @@ typedef enum {
 #else
 	_1call__JJJJJJJ_FUNC,
 #endif
+	g_1strdup_FUNC,
 #ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC,
 #endif
 #ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2I_FUNC,
+#endif
+#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_FUNC,
@@ -111,16 +138,41 @@ typedef enum {
 	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_FUNC,
 #endif
 #ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2_FUNC,
+#endif
+#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_FUNC,
 #endif
 #ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2I_FUNC,
+#endif
+#ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2I_FUNC,
+#endif
+#ifndef JNI64
+	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC,
+#else
+	memmove__JLorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2J_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkAttribute_2JI_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2J_FUNC,
@@ -146,11 +198,31 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2J_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2I_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTableIface_2J_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2J_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRange_2JI_FUNC,
+#endif
+#ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2II_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextRectangle_2JI_FUNC,
+#endif
+#ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2I_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkValueIface_2J_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2J_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c
index cd9a5ed..0f18573 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -62,6 +62,40 @@ void setAtkActionIfaceFields(JNIEnv *env, jobject lpObject, AtkActionIface *lpSt
 }
 #endif
 
+#ifndef NO_AtkAttribute
+typedef struct AtkAttribute_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID name, value;
+} AtkAttribute_FID_CACHE;
+
+AtkAttribute_FID_CACHE AtkAttributeFc;
+
+void cacheAtkAttributeFields(JNIEnv *env, jobject lpObject)
+{
+	if (AtkAttributeFc.cached) return;
+	AtkAttributeFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	AtkAttributeFc.name = (*env)->GetFieldID(env, AtkAttributeFc.clazz, "name", I_J);
+	AtkAttributeFc.value = (*env)->GetFieldID(env, AtkAttributeFc.clazz, "value", I_J);
+	AtkAttributeFc.cached = 1;
+}
+
+AtkAttribute *getAtkAttributeFields(JNIEnv *env, jobject lpObject, AtkAttribute *lpStruct)
+{
+	if (!AtkAttributeFc.cached) cacheAtkAttributeFields(env, lpObject);
+	lpStruct->name = (char *)(*env)->GetIntLongField(env, lpObject, AtkAttributeFc.name);
+	lpStruct->value = (char *)(*env)->GetIntLongField(env, lpObject, AtkAttributeFc.value);
+	return lpStruct;
+}
+
+void setAtkAttributeFields(JNIEnv *env, jobject lpObject, AtkAttribute *lpStruct)
+{
+	if (!AtkAttributeFc.cached) cacheAtkAttributeFields(env, lpObject);
+	(*env)->SetIntLongField(env, lpObject, AtkAttributeFc.name, (jintLong)lpStruct->name);
+	(*env)->SetIntLongField(env, lpObject, AtkAttributeFc.value, (jintLong)lpStruct->value);
+}
+#endif
+
 #ifndef NO_AtkComponentIface
 typedef struct AtkComponentIface_FID_CACHE {
 	int cached;
@@ -170,7 +204,7 @@ void setAtkHypertextIfaceFields(JNIEnv *env, jobject lpObject, AtkHypertextIface
 typedef struct AtkObjectClass_FID_CACHE {
 	int cached;
 	jclass clazz;
-	jfieldID get_name, get_description, get_parent, get_n_children, ref_child, get_index_in_parent, ref_relation_set, get_role, get_layer, get_mdi_zorder, ref_state_set, set_name, set_description, set_parent, set_role, connect_property_change_handler, remove_property_change_handler, initialize, children_changed, focus_event, property_change, state_change, visible_data_changed;
+	jfieldID get_name, get_description, get_parent, get_n_children, ref_child, get_index_in_parent, ref_relation_set, get_role, get_layer, get_mdi_zorder, ref_state_set, set_name, set_description, set_parent, set_role, connect_property_change_handler, remove_property_change_handler, initialize, children_changed, focus_event, property_change, state_change, visible_data_changed, get_attributes;
 } AtkObjectClass_FID_CACHE;
 
 AtkObjectClass_FID_CACHE AtkObjectClassFc;
@@ -202,6 +236,7 @@ void cacheAtkObjectClassFields(JNIEnv *env, jobject lpObject)
 	AtkObjectClassFc.property_change = (*env)->GetFieldID(env, AtkObjectClassFc.clazz, "property_change", I_J);
 	AtkObjectClassFc.state_change = (*env)->GetFieldID(env, AtkObjectClassFc.clazz, "state_change", I_J);
 	AtkObjectClassFc.visible_data_changed = (*env)->GetFieldID(env, AtkObjectClassFc.clazz, "visible_data_changed", I_J);
+	AtkObjectClassFc.get_attributes = (*env)->GetFieldID(env, AtkObjectClassFc.clazz, "get_attributes", I_J);
 	AtkObjectClassFc.cached = 1;
 }
 
@@ -231,6 +266,7 @@ AtkObjectClass *getAtkObjectClassFields(JNIEnv *env, jobject lpObject, AtkObject
 	lpStruct->property_change = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkObjectClassFc.property_change);
 	lpStruct->state_change = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkObjectClassFc.state_change);
 	lpStruct->visible_data_changed = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkObjectClassFc.visible_data_changed);
+	lpStruct->SWT_AtkObjectClass_get_attributes = (SWT_AtkObjectClass_get_attributes_cast)(*env)->GetIntLongField(env, lpObject, AtkObjectClassFc.get_attributes);
 	return lpStruct;
 }
 
@@ -260,6 +296,7 @@ void setAtkObjectClassFields(JNIEnv *env, jobject lpObject, AtkObjectClass *lpSt
 	(*env)->SetIntLongField(env, lpObject, AtkObjectClassFc.property_change, (jintLong)lpStruct->property_change);
 	(*env)->SetIntLongField(env, lpObject, AtkObjectClassFc.state_change, (jintLong)lpStruct->state_change);
 	(*env)->SetIntLongField(env, lpObject, AtkObjectClassFc.visible_data_changed, (jintLong)lpStruct->visible_data_changed);
+	(*env)->SetIntLongField(env, lpObject, AtkObjectClassFc.get_attributes, (jintLong)lpStruct->SWT_AtkObjectClass_get_attributes);
 }
 #endif
 
@@ -352,11 +389,147 @@ void setAtkSelectionIfaceFields(JNIEnv *env, jobject lpObject, AtkSelectionIface
 }
 #endif
 
+#ifndef NO_AtkTableIface
+typedef struct AtkTableIface_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID ref_at, get_index_at, get_column_at_index, get_row_at_index, get_n_columns, get_n_rows, get_column_extent_at, get_row_extent_at, get_caption, get_column_description, get_column_header, get_row_description, get_row_header, get_summary, set_caption, set_column_description, set_column_header, set_row_description, set_row_header, set_summary, get_selected_columns, get_selected_rows, is_column_selected, is_row_selected, is_selected, add_row_selection, remove_row_selection, add_column_selection, remove_column_selection, row_inserted, column_inserted, row_deleted, column_deleted, row_reordered, column_reordered, model_changed;
+} AtkTableIface_FID_CACHE;
+
+AtkTableIface_FID_CACHE AtkTableIfaceFc;
+
+void cacheAtkTableIfaceFields(JNIEnv *env, jobject lpObject)
+{
+	if (AtkTableIfaceFc.cached) return;
+	AtkTableIfaceFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	AtkTableIfaceFc.ref_at = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "ref_at", I_J);
+	AtkTableIfaceFc.get_index_at = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_index_at", I_J);
+	AtkTableIfaceFc.get_column_at_index = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_column_at_index", I_J);
+	AtkTableIfaceFc.get_row_at_index = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_row_at_index", I_J);
+	AtkTableIfaceFc.get_n_columns = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_n_columns", I_J);
+	AtkTableIfaceFc.get_n_rows = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_n_rows", I_J);
+	AtkTableIfaceFc.get_column_extent_at = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_column_extent_at", I_J);
+	AtkTableIfaceFc.get_row_extent_at = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_row_extent_at", I_J);
+	AtkTableIfaceFc.get_caption = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_caption", I_J);
+	AtkTableIfaceFc.get_column_description = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_column_description", I_J);
+	AtkTableIfaceFc.get_column_header = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_column_header", I_J);
+	AtkTableIfaceFc.get_row_description = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_row_description", I_J);
+	AtkTableIfaceFc.get_row_header = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_row_header", I_J);
+	AtkTableIfaceFc.get_summary = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_summary", I_J);
+	AtkTableIfaceFc.set_caption = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_caption", I_J);
+	AtkTableIfaceFc.set_column_description = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_column_description", I_J);
+	AtkTableIfaceFc.set_column_header = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_column_header", I_J);
+	AtkTableIfaceFc.set_row_description = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_row_description", I_J);
+	AtkTableIfaceFc.set_row_header = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_row_header", I_J);
+	AtkTableIfaceFc.set_summary = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "set_summary", I_J);
+	AtkTableIfaceFc.get_selected_columns = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_selected_columns", I_J);
+	AtkTableIfaceFc.get_selected_rows = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "get_selected_rows", I_J);
+	AtkTableIfaceFc.is_column_selected = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "is_column_selected", I_J);
+	AtkTableIfaceFc.is_row_selected = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "is_row_selected", I_J);
+	AtkTableIfaceFc.is_selected = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "is_selected", I_J);
+	AtkTableIfaceFc.add_row_selection = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "add_row_selection", I_J);
+	AtkTableIfaceFc.remove_row_selection = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "remove_row_selection", I_J);
+	AtkTableIfaceFc.add_column_selection = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "add_column_selection", I_J);
+	AtkTableIfaceFc.remove_column_selection = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "remove_column_selection", I_J);
+	AtkTableIfaceFc.row_inserted = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "row_inserted", I_J);
+	AtkTableIfaceFc.column_inserted = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "column_inserted", I_J);
+	AtkTableIfaceFc.row_deleted = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "row_deleted", I_J);
+	AtkTableIfaceFc.column_deleted = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "column_deleted", I_J);
+	AtkTableIfaceFc.row_reordered = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "row_reordered", I_J);
+	AtkTableIfaceFc.column_reordered = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "column_reordered", I_J);
+	AtkTableIfaceFc.model_changed = (*env)->GetFieldID(env, AtkTableIfaceFc.clazz, "model_changed", I_J);
+	AtkTableIfaceFc.cached = 1;
+}
+
+AtkTableIface *getAtkTableIfaceFields(JNIEnv *env, jobject lpObject, AtkTableIface *lpStruct)
+{
+	if (!AtkTableIfaceFc.cached) cacheAtkTableIfaceFields(env, lpObject);
+	lpStruct->ref_at = (AtkObject* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.ref_at);
+	lpStruct->get_index_at = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_index_at);
+	lpStruct->get_column_at_index = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_at_index);
+	lpStruct->get_row_at_index = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_at_index);
+	lpStruct->get_n_columns = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_n_columns);
+	lpStruct->get_n_rows = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_n_rows);
+	lpStruct->get_column_extent_at = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_extent_at);
+	lpStruct->get_row_extent_at = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_extent_at);
+	lpStruct->get_caption = (AtkObject* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_caption);
+	lpStruct->get_column_description = (G_CONST_RETURN gchar* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_description);
+	lpStruct->get_column_header = (AtkObject* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_header);
+	lpStruct->get_row_description = (G_CONST_RETURN gchar* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_description);
+	lpStruct->get_row_header = (AtkObject* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_header);
+	lpStruct->get_summary = (AtkObject* (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_summary);
+	lpStruct->set_caption = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_caption);
+	lpStruct->set_column_description = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_column_description);
+	lpStruct->set_column_header = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_column_header);
+	lpStruct->set_row_description = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_row_description);
+	lpStruct->set_row_header = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_row_header);
+	lpStruct->set_summary = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.set_summary);
+	lpStruct->get_selected_columns = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_selected_columns);
+	lpStruct->get_selected_rows = (gint (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.get_selected_rows);
+	lpStruct->is_column_selected = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.is_column_selected);
+	lpStruct->is_row_selected = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.is_row_selected);
+	lpStruct->is_selected = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.is_selected);
+	lpStruct->add_row_selection = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.add_row_selection);
+	lpStruct->remove_row_selection = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.remove_row_selection);
+	lpStruct->add_column_selection = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.add_column_selection);
+	lpStruct->remove_column_selection = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.remove_column_selection);
+	lpStruct->row_inserted = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.row_inserted);
+	lpStruct->column_inserted = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.column_inserted);
+	lpStruct->row_deleted = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.row_deleted);
+	lpStruct->column_deleted = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.column_deleted);
+	lpStruct->row_reordered = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.row_reordered);
+	lpStruct->column_reordered = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.column_reordered);
+	lpStruct->model_changed = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTableIfaceFc.model_changed);
+	return lpStruct;
+}
+
+void setAtkTableIfaceFields(JNIEnv *env, jobject lpObject, AtkTableIface *lpStruct)
+{
+	if (!AtkTableIfaceFc.cached) cacheAtkTableIfaceFields(env, lpObject);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.ref_at, (jintLong)lpStruct->ref_at);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_index_at, (jintLong)lpStruct->get_index_at);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_at_index, (jintLong)lpStruct->get_column_at_index);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_at_index, (jintLong)lpStruct->get_row_at_index);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_n_columns, (jintLong)lpStruct->get_n_columns);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_n_rows, (jintLong)lpStruct->get_n_rows);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_extent_at, (jintLong)lpStruct->get_column_extent_at);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_extent_at, (jintLong)lpStruct->get_row_extent_at);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_caption, (jintLong)lpStruct->get_caption);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_description, (jintLong)lpStruct->get_column_description);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_column_header, (jintLong)lpStruct->get_column_header);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_description, (jintLong)lpStruct->get_row_description);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_row_header, (jintLong)lpStruct->get_row_header);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_summary, (jintLong)lpStruct->get_summary);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_caption, (jintLong)lpStruct->set_caption);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_column_description, (jintLong)lpStruct->set_column_description);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_column_header, (jintLong)lpStruct->set_column_header);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_row_description, (jintLong)lpStruct->set_row_description);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_row_header, (jintLong)lpStruct->set_row_header);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.set_summary, (jintLong)lpStruct->set_summary);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_selected_columns, (jintLong)lpStruct->get_selected_columns);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.get_selected_rows, (jintLong)lpStruct->get_selected_rows);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.is_column_selected, (jintLong)lpStruct->is_column_selected);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.is_row_selected, (jintLong)lpStruct->is_row_selected);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.is_selected, (jintLong)lpStruct->is_selected);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.add_row_selection, (jintLong)lpStruct->add_row_selection);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.remove_row_selection, (jintLong)lpStruct->remove_row_selection);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.add_column_selection, (jintLong)lpStruct->add_column_selection);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.remove_column_selection, (jintLong)lpStruct->remove_column_selection);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.row_inserted, (jintLong)lpStruct->row_inserted);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.column_inserted, (jintLong)lpStruct->column_inserted);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.row_deleted, (jintLong)lpStruct->row_deleted);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.column_deleted, (jintLong)lpStruct->column_deleted);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.row_reordered, (jintLong)lpStruct->row_reordered);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.column_reordered, (jintLong)lpStruct->column_reordered);
+	(*env)->SetIntLongField(env, lpObject, AtkTableIfaceFc.model_changed, (jintLong)lpStruct->model_changed);
+}
+#endif
+
 #ifndef NO_AtkTextIface
 typedef struct AtkTextIface_FID_CACHE {
 	int cached;
 	jclass clazz;
-	jfieldID get_text, get_text_after_offset, get_text_at_offset, get_character_at_offset, get_text_before_offset, get_caret_offset, get_run_attributes, get_default_attributes, get_character_extents, get_character_count, get_offset_at_point, get_n_selections, get_selection, add_selection, remove_selection, set_selection, set_caret_offset, text_changed, text_caret_moved, text_selection_changed;
+	jfieldID get_text, get_text_after_offset, get_text_at_offset, get_character_at_offset, get_text_before_offset, get_caret_offset, get_run_attributes, get_default_attributes, get_character_extents, get_character_count, get_offset_at_point, get_n_selections, get_selection, add_selection, remove_selection, set_selection, set_caret_offset, text_changed, text_caret_moved, text_selection_changed, get_range_extents, get_bounded_ranges;
 } AtkTextIface_FID_CACHE;
 
 AtkTextIface_FID_CACHE AtkTextIfaceFc;
@@ -385,6 +558,8 @@ void cacheAtkTextIfaceFields(JNIEnv *env, jobject lpObject)
 	AtkTextIfaceFc.text_changed = (*env)->GetFieldID(env, AtkTextIfaceFc.clazz, "text_changed", I_J);
 	AtkTextIfaceFc.text_caret_moved = (*env)->GetFieldID(env, AtkTextIfaceFc.clazz, "text_caret_moved", I_J);
 	AtkTextIfaceFc.text_selection_changed = (*env)->GetFieldID(env, AtkTextIfaceFc.clazz, "text_selection_changed", I_J);
+	AtkTextIfaceFc.get_range_extents = (*env)->GetFieldID(env, AtkTextIfaceFc.clazz, "get_range_extents", I_J);
+	AtkTextIfaceFc.get_bounded_ranges = (*env)->GetFieldID(env, AtkTextIfaceFc.clazz, "get_bounded_ranges", I_J);
 	AtkTextIfaceFc.cached = 1;
 }
 
@@ -411,6 +586,8 @@ AtkTextIface *getAtkTextIfaceFields(JNIEnv *env, jobject lpObject, AtkTextIface
 	lpStruct->text_changed = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTextIfaceFc.text_changed);
 	lpStruct->text_caret_moved = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTextIfaceFc.text_caret_moved);
 	lpStruct->text_selection_changed = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTextIfaceFc.text_selection_changed);
+	lpStruct->get_range_extents = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkTextIfaceFc.get_range_extents);
+	lpStruct->get_bounded_ranges = (AtkTextRange** (*)())(*env)->GetIntLongField(env, lpObject, AtkTextIfaceFc.get_bounded_ranges);
 	return lpStruct;
 }
 
@@ -437,6 +614,134 @@ void setAtkTextIfaceFields(JNIEnv *env, jobject lpObject, AtkTextIface *lpStruct
 	(*env)->SetIntLongField(env, lpObject, AtkTextIfaceFc.text_changed, (jintLong)lpStruct->text_changed);
 	(*env)->SetIntLongField(env, lpObject, AtkTextIfaceFc.text_caret_moved, (jintLong)lpStruct->text_caret_moved);
 	(*env)->SetIntLongField(env, lpObject, AtkTextIfaceFc.text_selection_changed, (jintLong)lpStruct->text_selection_changed);
+	(*env)->SetIntLongField(env, lpObject, AtkTextIfaceFc.get_range_extents, (jintLong)lpStruct->get_range_extents);
+	(*env)->SetIntLongField(env, lpObject, AtkTextIfaceFc.get_bounded_ranges, (jintLong)lpStruct->get_bounded_ranges);
+}
+#endif
+
+#ifndef NO_AtkTextRange
+typedef struct AtkTextRange_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID bounds, start_offset, end_offset, content;
+} AtkTextRange_FID_CACHE;
+
+AtkTextRange_FID_CACHE AtkTextRangeFc;
+
+void cacheAtkTextRangeFields(JNIEnv *env, jobject lpObject)
+{
+	if (AtkTextRangeFc.cached) return;
+	AtkTextRangeFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	AtkTextRangeFc.bounds = (*env)->GetFieldID(env, AtkTextRangeFc.clazz, "bounds", "Lorg/eclipse/swt/internal/accessibility/gtk/AtkTextRectangle;");
+	AtkTextRangeFc.start_offset = (*env)->GetFieldID(env, AtkTextRangeFc.clazz, "start_offset", "I");
+	AtkTextRangeFc.end_offset = (*env)->GetFieldID(env, AtkTextRangeFc.clazz, "end_offset", "I");
+	AtkTextRangeFc.content = (*env)->GetFieldID(env, AtkTextRangeFc.clazz, "content", I_J);
+	AtkTextRangeFc.cached = 1;
+}
+
+AtkTextRange *getAtkTextRangeFields(JNIEnv *env, jobject lpObject, AtkTextRange *lpStruct)
+{
+	if (!AtkTextRangeFc.cached) cacheAtkTextRangeFields(env, lpObject);
+	{
+	jobject lpObject1 = (*env)->GetObjectField(env, lpObject, AtkTextRangeFc.bounds);
+	if (lpObject1 != NULL) getAtkTextRectangleFields(env, lpObject1, &lpStruct->bounds);
+	}
+	lpStruct->start_offset = (*env)->GetIntField(env, lpObject, AtkTextRangeFc.start_offset);
+	lpStruct->end_offset = (*env)->GetIntField(env, lpObject, AtkTextRangeFc.end_offset);
+	lpStruct->content = (gchar *)(*env)->GetIntLongField(env, lpObject, AtkTextRangeFc.content);
+	return lpStruct;
+}
+
+void setAtkTextRangeFields(JNIEnv *env, jobject lpObject, AtkTextRange *lpStruct)
+{
+	if (!AtkTextRangeFc.cached) cacheAtkTextRangeFields(env, lpObject);
+	{
+	jobject lpObject1 = (*env)->GetObjectField(env, lpObject, AtkTextRangeFc.bounds);
+	if (lpObject1 != NULL) setAtkTextRectangleFields(env, lpObject1, &lpStruct->bounds);
+	}
+	(*env)->SetIntField(env, lpObject, AtkTextRangeFc.start_offset, (jint)lpStruct->start_offset);
+	(*env)->SetIntField(env, lpObject, AtkTextRangeFc.end_offset, (jint)lpStruct->end_offset);
+	(*env)->SetIntLongField(env, lpObject, AtkTextRangeFc.content, (jintLong)lpStruct->content);
+}
+#endif
+
+#ifndef NO_AtkTextRectangle
+typedef struct AtkTextRectangle_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID x, y, width, height;
+} AtkTextRectangle_FID_CACHE;
+
+AtkTextRectangle_FID_CACHE AtkTextRectangleFc;
+
+void cacheAtkTextRectangleFields(JNIEnv *env, jobject lpObject)
+{
+	if (AtkTextRectangleFc.cached) return;
+	AtkTextRectangleFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	AtkTextRectangleFc.x = (*env)->GetFieldID(env, AtkTextRectangleFc.clazz, "x", "I");
+	AtkTextRectangleFc.y = (*env)->GetFieldID(env, AtkTextRectangleFc.clazz, "y", "I");
+	AtkTextRectangleFc.width = (*env)->GetFieldID(env, AtkTextRectangleFc.clazz, "width", "I");
+	AtkTextRectangleFc.height = (*env)->GetFieldID(env, AtkTextRectangleFc.clazz, "height", "I");
+	AtkTextRectangleFc.cached = 1;
+}
+
+AtkTextRectangle *getAtkTextRectangleFields(JNIEnv *env, jobject lpObject, AtkTextRectangle *lpStruct)
+{
+	if (!AtkTextRectangleFc.cached) cacheAtkTextRectangleFields(env, lpObject);
+	lpStruct->x = (*env)->GetIntField(env, lpObject, AtkTextRectangleFc.x);
+	lpStruct->y = (*env)->GetIntField(env, lpObject, AtkTextRectangleFc.y);
+	lpStruct->width = (*env)->GetIntField(env, lpObject, AtkTextRectangleFc.width);
+	lpStruct->height = (*env)->GetIntField(env, lpObject, AtkTextRectangleFc.height);
+	return lpStruct;
+}
+
+void setAtkTextRectangleFields(JNIEnv *env, jobject lpObject, AtkTextRectangle *lpStruct)
+{
+	if (!AtkTextRectangleFc.cached) cacheAtkTextRectangleFields(env, lpObject);
+	(*env)->SetIntField(env, lpObject, AtkTextRectangleFc.x, (jint)lpStruct->x);
+	(*env)->SetIntField(env, lpObject, AtkTextRectangleFc.y, (jint)lpStruct->y);
+	(*env)->SetIntField(env, lpObject, AtkTextRectangleFc.width, (jint)lpStruct->width);
+	(*env)->SetIntField(env, lpObject, AtkTextRectangleFc.height, (jint)lpStruct->height);
+}
+#endif
+
+#ifndef NO_AtkValueIface
+typedef struct AtkValueIface_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID get_current_value, get_maximum_value, get_minimum_value, set_current_value;
+} AtkValueIface_FID_CACHE;
+
+AtkValueIface_FID_CACHE AtkValueIfaceFc;
+
+void cacheAtkValueIfaceFields(JNIEnv *env, jobject lpObject)
+{
+	if (AtkValueIfaceFc.cached) return;
+	AtkValueIfaceFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	AtkValueIfaceFc.get_current_value = (*env)->GetFieldID(env, AtkValueIfaceFc.clazz, "get_current_value", I_J);
+	AtkValueIfaceFc.get_maximum_value = (*env)->GetFieldID(env, AtkValueIfaceFc.clazz, "get_maximum_value", I_J);
+	AtkValueIfaceFc.get_minimum_value = (*env)->GetFieldID(env, AtkValueIfaceFc.clazz, "get_minimum_value", I_J);
+	AtkValueIfaceFc.set_current_value = (*env)->GetFieldID(env, AtkValueIfaceFc.clazz, "set_current_value", I_J);
+	AtkValueIfaceFc.cached = 1;
+}
+
+AtkValueIface *getAtkValueIfaceFields(JNIEnv *env, jobject lpObject, AtkValueIface *lpStruct)
+{
+	if (!AtkValueIfaceFc.cached) cacheAtkValueIfaceFields(env, lpObject);
+	lpStruct->get_current_value = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkValueIfaceFc.get_current_value);
+	lpStruct->get_maximum_value = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkValueIfaceFc.get_maximum_value);
+	lpStruct->get_minimum_value = (void (*)())(*env)->GetIntLongField(env, lpObject, AtkValueIfaceFc.get_minimum_value);
+	lpStruct->set_current_value = (gboolean (*)())(*env)->GetIntLongField(env, lpObject, AtkValueIfaceFc.set_current_value);
+	return lpStruct;
+}
+
+void setAtkValueIfaceFields(JNIEnv *env, jobject lpObject, AtkValueIface *lpStruct)
+{
+	if (!AtkValueIfaceFc.cached) cacheAtkValueIfaceFields(env, lpObject);
+	(*env)->SetIntLongField(env, lpObject, AtkValueIfaceFc.get_current_value, (jintLong)lpStruct->get_current_value);
+	(*env)->SetIntLongField(env, lpObject, AtkValueIfaceFc.get_maximum_value, (jintLong)lpStruct->get_maximum_value);
+	(*env)->SetIntLongField(env, lpObject, AtkValueIfaceFc.get_minimum_value, (jintLong)lpStruct->get_minimum_value);
+	(*env)->SetIntLongField(env, lpObject, AtkValueIfaceFc.set_current_value, (jintLong)lpStruct->set_current_value);
 }
 #endif
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h
index 85e11a8..cc692cd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/atk_structs.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -27,6 +27,18 @@ void setAtkActionIfaceFields(JNIEnv *env, jobject lpObject, AtkActionIface *lpSt
 #define AtkActionIface_sizeof() 0
 #endif
 
+#ifndef NO_AtkAttribute
+void cacheAtkAttributeFields(JNIEnv *env, jobject lpObject);
+AtkAttribute *getAtkAttributeFields(JNIEnv *env, jobject lpObject, AtkAttribute *lpStruct);
+void setAtkAttributeFields(JNIEnv *env, jobject lpObject, AtkAttribute *lpStruct);
+#define AtkAttribute_sizeof() sizeof(AtkAttribute)
+#else
+#define cacheAtkAttributeFields(a,b)
+#define getAtkAttributeFields(a,b,c) NULL
+#define setAtkAttributeFields(a,b,c)
+#define AtkAttribute_sizeof() 0
+#endif
+
 #ifndef NO_AtkComponentIface
 void cacheAtkComponentIfaceFields(JNIEnv *env, jobject lpObject);
 AtkComponentIface *getAtkComponentIfaceFields(JNIEnv *env, jobject lpObject, AtkComponentIface *lpStruct);
@@ -87,6 +99,18 @@ void setAtkSelectionIfaceFields(JNIEnv *env, jobject lpObject, AtkSelectionIface
 #define AtkSelectionIface_sizeof() 0
 #endif
 
+#ifndef NO_AtkTableIface
+void cacheAtkTableIfaceFields(JNIEnv *env, jobject lpObject);
+AtkTableIface *getAtkTableIfaceFields(JNIEnv *env, jobject lpObject, AtkTableIface *lpStruct);
+void setAtkTableIfaceFields(JNIEnv *env, jobject lpObject, AtkTableIface *lpStruct);
+#define AtkTableIface_sizeof() sizeof(AtkTableIface)
+#else
+#define cacheAtkTableIfaceFields(a,b)
+#define getAtkTableIfaceFields(a,b,c) NULL
+#define setAtkTableIfaceFields(a,b,c)
+#define AtkTableIface_sizeof() 0
+#endif
+
 #ifndef NO_AtkTextIface
 void cacheAtkTextIfaceFields(JNIEnv *env, jobject lpObject);
 AtkTextIface *getAtkTextIfaceFields(JNIEnv *env, jobject lpObject, AtkTextIface *lpStruct);
@@ -99,6 +123,42 @@ void setAtkTextIfaceFields(JNIEnv *env, jobject lpObject, AtkTextIface *lpStruct
 #define AtkTextIface_sizeof() 0
 #endif
 
+#ifndef NO_AtkTextRange
+void cacheAtkTextRangeFields(JNIEnv *env, jobject lpObject);
+AtkTextRange *getAtkTextRangeFields(JNIEnv *env, jobject lpObject, AtkTextRange *lpStruct);
+void setAtkTextRangeFields(JNIEnv *env, jobject lpObject, AtkTextRange *lpStruct);
+#define AtkTextRange_sizeof() sizeof(AtkTextRange)
+#else
+#define cacheAtkTextRangeFields(a,b)
+#define getAtkTextRangeFields(a,b,c) NULL
+#define setAtkTextRangeFields(a,b,c)
+#define AtkTextRange_sizeof() 0
+#endif
+
+#ifndef NO_AtkTextRectangle
+void cacheAtkTextRectangleFields(JNIEnv *env, jobject lpObject);
+AtkTextRectangle *getAtkTextRectangleFields(JNIEnv *env, jobject lpObject, AtkTextRectangle *lpStruct);
+void setAtkTextRectangleFields(JNIEnv *env, jobject lpObject, AtkTextRectangle *lpStruct);
+#define AtkTextRectangle_sizeof() sizeof(AtkTextRectangle)
+#else
+#define cacheAtkTextRectangleFields(a,b)
+#define getAtkTextRectangleFields(a,b,c) NULL
+#define setAtkTextRectangleFields(a,b,c)
+#define AtkTextRectangle_sizeof() 0
+#endif
+
+#ifndef NO_AtkValueIface
+void cacheAtkValueIfaceFields(JNIEnv *env, jobject lpObject);
+AtkValueIface *getAtkValueIfaceFields(JNIEnv *env, jobject lpObject, AtkValueIface *lpStruct);
+void setAtkValueIfaceFields(JNIEnv *env, jobject lpObject, AtkValueIface *lpStruct);
+#define AtkValueIface_sizeof() sizeof(AtkValueIface)
+#else
+#define cacheAtkValueIfaceFields(a,b)
+#define getAtkValueIfaceFields(a,b,c) NULL
+#define setAtkValueIfaceFields(a,b,c)
+#define AtkValueIface_sizeof() 0
+#endif
+
 #ifndef NO_GtkAccessible
 void cacheGtkAccessibleFields(JNIEnv *env, jobject lpObject);
 GtkAccessible *getGtkAccessibleFields(JNIEnv *env, jobject lpObject, GtkAccessible *lpStruct);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
index 1431d6d..55f98da 100755
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
@@ -1,6 +1,6 @@
 #!/bin/sh
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -29,12 +29,22 @@ if [ "${OS}" = "" ]; then
 	OS=`uname -s`
 fi
 case $OS in
+	"AIX")
+		SWT_OS=aix
+		MAKEFILE=make_aix.mak
+		;;
+	"HP-UX")
+		SWT_OS=hpux
+		MAKEFILE=make_hpux.mak
+		;;
 	"SunOS")
 		SWT_OS=solaris
 		PROC=`uname -i`
 		MAKEFILE=make_solaris.mak
-		if uname -p > /dev/null 2>&1; then
-			MODEL=`uname -p`
+		if [ "${MODEL}" = "" ]; then
+			if uname -p > /dev/null 2>&1; then
+				MODEL=`uname -p`
+			fi
 		fi
 		if [ ${MODEL} = 'i386' ]; then
 			MAKEFILE=make_solaris_x86.mak
@@ -55,6 +65,9 @@ esac
 if [ "${MODEL}" = "" ]; then
 	if uname -i > /dev/null 2>&1; then
 		MODEL=`uname -i`
+		if [ ${MODEL} = 'unknown' ]; then
+		  MODEL=`uname -m`
+		fi
 	else
 		MODEL=`uname -m`
 	fi
@@ -64,6 +77,10 @@ case $MODEL in
 		SWT_ARCH=x86_64
 		AWT_ARCH=amd64
 		;;
+	"sparc64")
+		SWT_ARCH=$MODEL
+		AWT_ARCH=sparcv9
+		;;
 	i?86)
 		SWT_ARCH=x86
 		AWT_ARCH=i386
@@ -73,18 +90,48 @@ case $MODEL in
 		AWT_ARCH=$MODEL
 		;;
 esac
-
+echo "Model is ${MODEL}"
 # For 64-bit CPUs, we have a switch
-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' ]; then
+if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' -o ${MODEL} = 'sparc64'  -o ${MODEL} = 's390x' ]; then
 	SWT_PTR_CFLAGS=-DJNI64
-	export SWT_PTR_CFLAGS
 	if [ -d /lib64 ]; then
 		XLIB64=-L/usr/X11R6/lib64
 		export XLIB64
 	fi
+	if [ ${MODEL} = 'ppc64' ]; then
+		if [ ${OS} = 'AIX' ]; then
+			SWT_PTR_CFLAGS="${SWT_PTR_CFLAGS} -maix64"
+			SWT_LFLAGS=-maix64
+			export SWT_LFLAGS
+		else
+			SWT_PTR_CFLAGS="${SWT_PTR_CFLAGS} -m64"	
+			XLIB64="${XLIB64} -L/usr/lib64"
+			SWT_LFLAGS=-m64
+			export SWT_LFLAGS
+		fi
+	fi
+	if [ ${MODEL} = 'ia64' ]; then
+		if [ ${OS} = 'HP-UX' ]; then
+			SWT_PTR_CFLAGS="${SWT_PTR_CFLAGS} -mlp64"
+			SWT_LFLAGS=-mlp64
+			export SWT_LFLAGS
+		fi
+	fi
+	if [ ${MODEL} = 'sparc64' ]; then
+			SWT_PTR_CFLAGS="${SWT_PTR_CFLAGS} -xarch=v9"
+			SWT_LFLAGS="-xarch=v9"
+			SWT_CDE_64SUFFIX="/64"
+			export SWT_LFLAGS SWT_CDE_64SUFFIX
+	fi
+	export SWT_PTR_CFLAGS
+fi
+if [ ${MODEL} = 's390' ]; then
+	SWT_PTR_CFLAGS="-m31"	
+	SWT_LFLAGS=-m31
+	export SWT_LFLAGS SWT_PTR_CFLAGS
 fi
 
-if [ x`pkg-config --exists gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 && echo YES` = "xYES" ]; then
+if [ x`pkg-config --exists gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 && echo YES` = "xYES"  -a 	 ${MODEL} != "sparc64" 	]; then
 	echo "libgnomeui-2.0 found, compiling SWT program support using GNOME"
 	MAKE_GNOME=make_gnome
 else
@@ -100,7 +147,7 @@ else
 	echo "    *** Advanced graphics support using cairo will not be compiled."
 fi
 
-if [ -z "${MOZILLA_INCLUDES}" -a -z "${MOZILLA_LIBS}" ]; then
+if [ -z "${MOZILLA_INCLUDES}" -a -z "${MOZILLA_LIBS}" -a ${MODEL} != 'sparc64' ]; then
 	if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
 		MOZILLA_INCLUDES=`pkg-config --cflags mozilla-xpcom`
 		MOZILLA_LIBS=`pkg-config --libs mozilla-xpcom`
@@ -125,9 +172,17 @@ if [ -z "${MOZILLA_INCLUDES}" -a -z "${MOZILLA_LIBS}" ]; then
 	fi
 fi
 
+if [ x`pkg-config --exists webkit-1.0 && echo YES` = "xYES" ]; then
+	echo "WebKit found, compiling webkit embedded browser support."
+	MAKE_WEBKIT=make_webkit
+else
+	echo "WebKit not found:"
+	echo "    *** WebKit embedding support will not be compiled."
+fi
+
 # Find AWT if available
 if [ -z "${AWT_LIB_PATH}" ]; then
-	if [ -d ${JAVA_HOME}/jre/lib/${AWT_ARCH} ]; then
+	if [ -f ${JAVA_HOME}/jre/lib/${AWT_ARCH}/libjawt.* ]; then
 		AWT_LIB_PATH=${JAVA_HOME}/jre/lib/${AWT_ARCH}
 		export AWT_LIB_PATH
 	else
@@ -136,7 +191,8 @@ if [ -z "${AWT_LIB_PATH}" ]; then
 	fi
 fi
 
-if [ -f ${AWT_LIB_PATH}/libjawt.so ]; then
+if [ -f ${AWT_LIB_PATH}/libjawt.* ]; then
+	echo "libjawt.so found, the SWT/AWT integration library will be compiled."
 	MAKE_AWT=make_awt
 else
 	echo "libjawt.so not found, the SWT/AWT integration library will not be compiled."
@@ -152,5 +208,5 @@ fi
 if [ "x${1}" = "xclean" ]; then
 	${MAKE_TYPE} -f $MAKEFILE clean
 else
-	${MAKE_TYPE} -f $MAKEFILE all $MAKE_GNOME $MAKE_CAIRO $MAKE_AWT $MAKE_MOZILLA ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
+	${MAKE_TYPE} -f $MAKEFILE all $MAKE_GNOME $MAKE_CAIRO $MAKE_AWT $MAKE_MOZILLA $MAKE_WEBKIT ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9}
 fi
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.xml
deleted file mode 100644
index 1c64217..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.xml	
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_gtk_lib" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />	
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-	
-<!-- Build swt.so for GTK -->
-<target name="build_gtk_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86" depth="infinite" />
-</target>
-
-<!-- Build swt.so for PowerPC 32 bit GTK (no Mozilla)-->
-<target name="build_ppc_gtk_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<env key="MODEL" value="ppc"/>
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.ppc" depth="infinite" />
-</target>
-
-<!-- Build swt.so for Solaris GTK (no Mozilla) -->
-<target name="build_solaris_gtk_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.solaris.sparc" depth="infinite" />
-</target>
-	
-<!-- Build swt.so for GTK 64 -->
-<target name="build_gtk64_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.gtk.linux.x86_64" depth="infinite" />	
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="clean"/>
-	</exec>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_aix.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_aix.mak
new file mode 100644
index 0000000..a951b1b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_aix.mak	
@@ -0,0 +1,198 @@
+#*******************************************************************************
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#*******************************************************************************
+
+# Makefile for creating SWT libraries for Linux GTK
+
+include make_common.mak
+
+SWT_VERSION=$(maj_ver)$(min_ver)
+
+# Define the various shared libraries to be build.
+WS_PREFIX = gtk
+SWT_PREFIX = swt
+CDE_PREFIX = swt-cde
+AWT_PREFIX = swt-awt
+SWTPI_PREFIX = swt-pi
+CAIRO_PREFIX = swt-cairo
+ATK_PREFIX = swt-atk
+GNOME_PREFIX = swt-gnome
+GLX_PREFIX = swt-glx
+
+SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+CDE_LIB = lib$(CDE_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+SWTPI_LIB = lib$(SWTPI_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+CAIRO_LIB = lib$(CAIRO_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+ATK_LIB = lib$(ATK_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+GNOME_LIB = lib$(GNOME_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).a
+
+CAIROCFLAGS = `pkg-config --cflags cairo`
+CAIROLIBS = `pkg-config --libs cairo` -lcairo
+
+GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
+GTKLIBS = `pkg-config --libs gtk+-2.0 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lXtst -lX11
+
+CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
+
+AWT_LFLAGS = -shared -s ${SWT_LFLAGS} 
+AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -lX11
+
+ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
+ATKLIBS = `pkg-config --libs atk gtk+-2.0`
+
+GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
+GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
+
+GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm
+
+# Uncomment for Native Stats tool
+#NATIVE_STATS = -DNATIVE_STATS
+
+SWT_OBJECTS = swt.o c.o c_stats.o callback.o
+CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o
+AWT_OBJECTS = swt_awt.o
+SWTPI_OBJECTS = swt.o os.o os_structs.o os_custom.o os_stats.o
+CAIRO_OBJECTS = swt.o cairo.o cairo_structs.o cairo_stats.o
+ATK_OBJECTS = swt.o atk.o atk_structs.o atk_custom.o atk_stats.o
+GNOME_OBJECTS = swt.o gnome.o gnome_structs.o gnome_stats.o
+GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
+
+CFLAGS = -O -Wall \
+		-DSWT_VERSION=$(SWT_VERSION) \
+		$(NATIVE_STATS) \
+		-DAIX -DGTK \
+		-I$(JAVA_HOME)/include \
+		${SWT_PTR_CFLAGS}
+LFLAGS = -shared -s ${SWT_LFLAGS}
+
+
+all: make_swt make_atk #make_glx
+
+#
+# SWT libs
+#
+make_swt: $(SWT_LIB) $(SWTPI_LIB)
+
+$(SWT_LIB): $(SWT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
+
+callback.o: callback.c callback.h
+	$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
+
+$(SWTPI_LIB): $(SWTPI_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
+
+swt.o: swt.c swt.h
+	$(CC) $(CFLAGS) -c swt.c
+os.o: os.c os.h swt.h os_custom.h
+	$(CC) $(CFLAGS) $(GTKCFLAGS) -c os.c
+os_structs.o: os_structs.c os_structs.h os.h swt.h
+	$(CC) $(CFLAGS) $(GTKCFLAGS) -c os_structs.c 
+os_custom.o: os_custom.c os_structs.h os.h swt.h
+	$(CC) $(CFLAGS) $(GTKCFLAGS) -c os_custom.c
+os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
+	$(CC) $(CFLAGS) $(GTKCFLAGS) -c os_stats.c
+
+#
+# CAIRO libs
+#
+make_cairo: $(CAIRO_LIB)
+
+$(CAIRO_LIB): $(CAIRO_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
+
+cairo.o: cairo.c cairo.h swt.h
+	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
+cairo_structs.o: cairo_structs.c cairo_structs.h cairo.h swt.h
+	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo_structs.c
+cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h
+	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo_stats.c
+
+#
+# CDE lib
+#
+
+make_cde: $(CDE_LIB)
+
+$(CDE_LIB): $(CDE_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
+
+#
+# AWT lib
+#
+make_awt:$(AWT_LIB)
+
+$(AWT_LIB): $(AWT_OBJECTS)
+	$(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
+
+#
+# Atk lib
+#
+make_atk: $(ATK_LIB)
+
+$(ATK_LIB): $(ATK_OBJECTS)
+	$(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
+
+atk.o: atk.c atk.h
+	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
+atk_structs.o: atk_structs.c atk_structs.h atk.h
+	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_structs.c
+atk_custom.o: atk_custom.c atk_structs.h atk.h
+	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_custom.c
+atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
+	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk_stats.c
+
+#
+# Gnome lib
+#
+make_gnome: $(GNOME_LIB)
+
+$(GNOME_LIB): $(GNOME_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
+
+gnome.o: gnome.c 
+	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
+
+gnome_structs.o: gnome_structs.c 
+	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome_structs.c
+	
+gnome_stats.o: gnome_stats.c gnome_stats.h
+	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome_stats.c
+
+#
+# GLX lib
+#
+make_glx: $(GLX_LIB)
+
+$(GLX_LIB): $(GLX_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
+
+glx.o: glx.c 
+	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
+
+glx_structs.o: glx_structs.c 
+	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx_structs.c
+	
+glx_stats.o: glx_stats.c glx_stats.h
+	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx_stats.c
+
+#
+# Install
+#
+install: all
+	cp *.a $(OUTPUT_DIR)
+
+#
+# Clean
+#
+clean:
+	rm -f *.o *.a
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak
index 82b4dab..6f71c76 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_freebsd.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -50,7 +50,8 @@ GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthrea
 
 CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
 
-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -shared
+AWT_LFLAGS = -shared
+AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
 
 ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
 ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
@@ -58,8 +59,7 @@ ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
 GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
 GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
 
-GLXCFLAGS = 
-GLXLIBS = -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm
+GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm
 
 # Uncomment for Native Stats tool
 #NATIVE_STATS = -DNATIVE_STATS
@@ -77,7 +77,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/freebsd \
 	${SWT_PTR_CFLAGS}
-MOZILLALIBS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
+MOZILLALFLAGS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
 	
 SWT_OBJECTS = swt.o c.o c_stats.o callback.o
 CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o
@@ -99,12 +99,12 @@ CFLAGS = -O -Wall \
 		-I$(JAVA_HOME)/include/freebsd \
 		-fPIC \
 		${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LFLAGS = -shared -fPIC
 
 ifndef NO_STRIP
-	AWT_LIBS := $(AWT_LIBS) -s
-	MOZILLALIBS := $(MOZILLALIBS) -s
-	LIBS := $(LIBS) -s
+	AWT_LFLAGS := $(AWT_LFLAGS) -s
+	MOZILLALFLAGS := $(MOZILLALFLAGS) -s
+	LFLAGS := $(LFLAGS) -s
 endif
 
 all: make_swt make_atk make_gnome make_glx
@@ -115,13 +115,13 @@ all: make_swt make_atk make_gnome make_glx
 make_swt: $(SWT_LIB) $(SWTPI_LIB)
 
 $(SWT_LIB): $(SWT_OBJECTS)
-	$(CC) $(LIBS) -o $(SWT_LIB) $(SWT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
 
 callback.o: callback.c callback.h
 	$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
 
 $(SWTPI_LIB): $(SWTPI_OBJECTS)
-	$(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
 
 swt.o: swt.c swt.h
 	$(CC) $(CFLAGS) -c swt.c
@@ -140,7 +140,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
 make_cairo: $(CAIRO_LIB)
 
 $(CAIRO_LIB): $(CAIRO_OBJECTS)
-	$(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
 
 cairo.o: cairo.c cairo.h swt.h
 	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -156,7 +156,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h
 make_cde: $(CDE_LIB)
 
 $(CDE_LIB): $(CDE_OBJECTS)
-	$(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
 
 #
 # AWT lib
@@ -164,7 +164,7 @@ $(CDE_LIB): $(CDE_OBJECTS)
 make_awt:$(AWT_LIB)
 
 $(AWT_LIB): $(AWT_OBJECTS)
-	$(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+	$(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
 
 #
 # Atk lib
@@ -172,7 +172,7 @@ $(AWT_LIB): $(AWT_OBJECTS)
 make_atk: $(ATK_LIB)
 
 $(ATK_LIB): $(ATK_OBJECTS)
-	$(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+	$(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
 
 atk.o: atk.c atk.h
 	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -189,7 +189,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
 make_gnome: $(GNOME_LIB)
 
 $(GNOME_LIB): $(GNOME_OBJECTS)
-	$(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
 
 gnome.o: gnome.c 
 	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -206,7 +206,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h
 make_mozilla:$(MOZILLA_LIB)
 
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
-	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS}
 
 xpcom.o: xpcom.cpp
 	$(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -226,7 +226,7 @@ xpcom_stats.o: xpcom_stats.cpp
 make_xulrunner:$(XULRUNNER_LIB)
 
 $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
-	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcomxul.o: xpcom.cpp
 	$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -252,7 +252,7 @@ xpcomxulglue_stats.o: xpcomglue_stats.cpp
 make_xpcominit:$(XPCOMINIT_LIB)
 
 $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
-	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcominit.o: xpcominit.cpp
 	$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -269,7 +269,7 @@ xpcominit_stats.o: xpcominit_stats.cpp
 make_glx: $(GLX_LIB)
 
 $(GLX_LIB): $(GLX_OBJECTS)
-	$(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
 
 glx.o: glx.c 
 	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak
index c1bc1a1..8b8f1a8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ GNOME_PREFIX = swt-gnome
 MOZILLA_PREFIX = swt-mozilla$(GCC_VERSION)
 XULRUNNER_PREFIX = swt-xulrunner
 XPCOMINIT_PREFIX = swt-xpcominit
+WEBKIT_PREFIX = swt-webkit
 GLX_PREFIX = swt-glx
 
 SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
@@ -39,6 +40,7 @@ GNOME_LIB = lib$(GNOME_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 MOZILLA_LIB = lib$(MOZILLA_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 XULRUNNER_LIB = lib$(XULRUNNER_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 XPCOMINIT_LIB = lib$(XPCOMINIT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
+WEBKIT_LIB = lib$(WEBKIT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 
 CAIROCFLAGS = `pkg-config --cflags cairo`
@@ -46,11 +48,12 @@ CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
 
 # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
 GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
-GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib $(XLIB64) -lXtst
+GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-2.0 -lgthread-2.0 -lXtst
 
 CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
 
-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -shared
+AWT_LFLAGS = -shared ${SWT_LFLAGS} 
+AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
 
 ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
 ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
@@ -58,8 +61,7 @@ ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
 GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
 GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
 
-GLXCFLAGS = 
-GLXLIBS = -shared -fPIC -L/usr/X11R6/lib -lGL -lGLU -lm
+GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm
 
 # Uncomment for Native Stats tool
 #NATIVE_STATS = -DNATIVE_STATS
@@ -77,7 +79,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/linux \
 	${SWT_PTR_CFLAGS}
-MOZILLALIBS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
+MOZILLALFLAGS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
 MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \
 	-DNO__1XPCOMGlueStartup \
 	-DNO__1XPCOMGlueLoadXULFunctions \
@@ -89,6 +91,9 @@ MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \
 	-DNO_nsDynamicFunctionLoad
 XULRUNNEREXCLUDES = -DNO__1NS_1InitXPCOM2
 
+WEBKITCFLAGS = `pkg-config --cflags gtk+-2.0` -I/usr/include/webkit-1.0 -I/usr/include/libsoup-2.4
+WEBKITLIBS = -lwebkit-1.0
+
 SWT_OBJECTS = swt.o c.o c_stats.o callback.o
 CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o
 AWT_OBJECTS = swt_awt.o
@@ -99,6 +104,7 @@ GNOME_OBJECTS = swt.o gnome.o gnome_structs.o gnome_stats.o
 MOZILLA_OBJECTS = swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o
 XULRUNNER_OBJECTS = swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomxul_stats.o
 XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o
+WEBKIT_OBJECTS = swt.o webkit.o webkit_structs.o webkit_stats.o
 GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o
 
 CFLAGS = -O -Wall \
@@ -109,15 +115,15 @@ CFLAGS = -O -Wall \
 		-I$(JAVA_HOME)/include/linux \
 		-fPIC \
 		${SWT_PTR_CFLAGS}
-LIBS = -shared -fPIC
+LFLAGS = -shared -fPIC ${SWT_LFLAGS}
 
 ifndef NO_STRIP
-	AWT_LIBS := $(AWT_LIBS) -s
-	MOZILLALIBS := $(MOZILLALIBS) -s
-	LIBS := $(LIBS) -s
+	AWT_LFLAGS := $(AWT_LFLAGS) -s
+	MOZILLALFLAGS := $(MOZILLALFLAGS) -s
+	LFLAGS := $(LFLAGS) -s
 endif
 
-all: make_swt make_atk make_gnome make_glx
+all: make_swt make_atk make_glx
 
 #
 # SWT libs
@@ -125,13 +131,13 @@ all: make_swt make_atk make_gnome make_glx
 make_swt: $(SWT_LIB) $(SWTPI_LIB)
 
 $(SWT_LIB): $(SWT_OBJECTS)
-	$(CC) $(LIBS) -o $(SWT_LIB) $(SWT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
 
 callback.o: callback.c callback.h
 	$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
 
 $(SWTPI_LIB): $(SWTPI_OBJECTS)
-	$(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
 
 swt.o: swt.c swt.h
 	$(CC) $(CFLAGS) -c swt.c
@@ -150,7 +156,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
 make_cairo: $(CAIRO_LIB)
 
 $(CAIRO_LIB): $(CAIRO_OBJECTS)
-	$(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
 
 cairo.o: cairo.c cairo.h swt.h
 	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -166,7 +172,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h
 make_cde: $(CDE_LIB)
 
 $(CDE_LIB): $(CDE_OBJECTS)
-	$(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
 
 #
 # AWT lib
@@ -174,7 +180,7 @@ $(CDE_LIB): $(CDE_OBJECTS)
 make_awt:$(AWT_LIB)
 
 $(AWT_LIB): $(AWT_OBJECTS)
-	$(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+	$(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
 
 #
 # Atk lib
@@ -182,7 +188,7 @@ $(AWT_LIB): $(AWT_OBJECTS)
 make_atk: $(ATK_LIB)
 
 $(ATK_LIB): $(ATK_OBJECTS)
-	$(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+	$(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
 
 atk.o: atk.c atk.h
 	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -199,7 +205,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
 make_gnome: $(GNOME_LIB)
 
 $(GNOME_LIB): $(GNOME_OBJECTS)
-	$(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
 
 gnome.o: gnome.c 
 	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -216,7 +222,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h
 make_mozilla:$(MOZILLA_LIB)
 
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
-	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS}
 
 xpcom.o: xpcom.cpp
 	$(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -236,7 +242,7 @@ xpcom_stats.o: xpcom_stats.cpp
 make_xulrunner:$(XULRUNNER_LIB)
 
 $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
-	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcomxul.o: xpcom.cpp
 	$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -256,7 +262,7 @@ xpcomxul_stats.o: xpcom_stats.cpp
 make_xpcominit:$(XPCOMINIT_LIB)
 
 $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
-	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcominit.o: xpcominit.cpp
 	$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -268,12 +274,29 @@ xpcominit_stats.o: xpcominit_stats.cpp
 	$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit_stats.cpp
 
 #
+# WebKit lib
+#
+make_webkit: $(WEBKIT_LIB)
+
+$(WEBKIT_LIB): $(WEBKIT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) $(WEBKITLIBS)
+
+webkit.o: webkitgtk.c 
+	$(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk.c -o webkit.o
+
+webkit_structs.o: webkitgtk_structs.c 
+	$(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk_structs.c -o webkit_structs.o
+	
+webkit_stats.o: webkitgtk_stats.c webkitgtk_stats.h
+	$(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk_stats.c -o webkit_stats.o
+
+#
 # GLX lib
 #
 make_glx: $(GLX_LIB)
 
 $(GLX_LIB): $(GLX_OBJECTS)
-	$(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
 
 glx.o: glx.c 
 	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak
index 7ec8c67..20f711c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -50,7 +50,8 @@ GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthrea
 
 CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
 
-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -G -s
+AWT_LFLAGS = -G -s
+AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
 
 ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
 ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
@@ -58,8 +59,7 @@ ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
 GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
 GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
 
-GLXCFLAGS = 
-GLXLIBS = -G -K PIC -L/usr/X11R6/lib -lGL -lGLU -lm
+GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm
 
 # Uncomment for Native Stats tool
 #NATIVE_STATS = -DNATIVE_STATS
@@ -74,7 +74,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/solaris \
 	${SWT_PTR_CFLAGS}
-MOZILLALIBS =  -G
+MOZILLALFLAGS =  -G
 MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \
 	-DNO__1XPCOMGlueStartup \
 	-DNO__1XPCOMGlueLoadXULFunctions \
@@ -108,7 +108,7 @@ CFLAGS = -O \
 		-K PIC \
 		${SWT_PTR_CFLAGS} \
 		-I$(CDE_HOME)/include
-LIBS = -G -K PIC -s
+LFLAGS = -G -K PIC -s
 
 
 all: make_swt make_atk make_awt make_glx make_cde
@@ -119,13 +119,13 @@ all: make_swt make_atk make_awt make_glx make_cde
 make_swt: $(SWT_LIB) $(SWTPI_LIB)
 
 $(SWT_LIB): $(SWT_OBJECTS)
-	$(CC) $(LIBS) -o $(SWT_LIB) $(SWT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
 
 callback.o: callback.c callback.h
 	$(CC) $(CFLAGS) -c callback.c
 
 $(SWTPI_LIB): $(SWTPI_OBJECTS)
-	$(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
 
 swt.o: swt.c swt.h
 	$(CC) $(CFLAGS) -c swt.c
@@ -144,7 +144,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
 make_cairo: $(CAIRO_LIB)
 
 $(CAIRO_LIB): $(CAIRO_OBJECTS)
-	$(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
 
 cairo.o: cairo.c cairo.h swt.h
 	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -160,7 +160,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h
 make_cde: $(CDE_LIB)
 
 $(CDE_LIB): $(CDE_OBJECTS)
-	$(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS)
 
 #
 # AWT lib
@@ -168,7 +168,7 @@ $(CDE_LIB): $(CDE_OBJECTS)
 make_awt:$(AWT_LIB)
 
 $(AWT_LIB): $(AWT_OBJECTS)
-	$(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+	$(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
 
 #
 # Atk lib
@@ -176,7 +176,7 @@ $(AWT_LIB): $(AWT_OBJECTS)
 make_atk: $(ATK_LIB)
 
 $(ATK_LIB): $(ATK_OBJECTS)
-	$(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+	$(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
 
 atk.o: atk.c atk.h
 	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -193,7 +193,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
 make_gnome: $(GNOME_LIB)
 
 $(GNOME_LIB): $(GNOME_OBJECTS)
-	$(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
 
 gnome.o: gnome.c 
 	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -210,7 +210,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h
 make_mozilla:$(MOZILLA_LIB)
 
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
-	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS}
 
 xpcom.o: xpcom.cpp
 	$(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -230,7 +230,7 @@ xpcom_stats.o: xpcom_stats.cpp
 make_xulrunner:$(XULRUNNER_LIB)
 
 $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
-	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcomxul.o: xpcom.cpp
 	$(CXX) -o xpcomxul.o -DXULRUNNER $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -250,7 +250,7 @@ xpcomxul_stats.o: xpcom_stats.cpp
 make_xpcominit:$(XPCOMINIT_LIB)
 
 $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
-	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcominit.o: xpcominit.cpp
 	$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -267,7 +267,7 @@ xpcominit_stats.o: xpcominit_stats.cpp
 make_glx: $(GLX_LIB)
 
 $(GLX_LIB): $(GLX_OBJECTS)
-	$(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
 
 glx.o: glx.c 
 	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris_x86.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris_x86.mak
index a6f8cd5..6764c33 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris_x86.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_solaris_x86.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -50,7 +50,8 @@ GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthrea
 
 CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
 
-AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -G 
+AWT_LFLAGS = -G
+AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt 
 
 ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
 ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
@@ -58,7 +59,6 @@ ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
 GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
 GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
 
-GLXCFLAGS = 
 GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm
 
 # Uncomment for Native Stats tool
@@ -74,7 +74,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/linux \
 	${SWT_PTR_CFLAGS}
-MOZILLALIBS =  -G
+MOZILLALFLAGS =  -G
 MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \
 	-DNO__1XPCOMGlueStartup \
 	-DNO__1XPCOMGlueLoadXULFunctions \
@@ -106,12 +106,12 @@ CFLAGS = -O  +w \
 		-I$(JAVA_HOME)/include/linux \
 		-KPIC \
 		${SWT_PTR_CFLAGS}
-LIBS = -G -KPIC 
+LFLAGS = -G -KPIC 
 
 ifndef NO_STRIP
-	AWT_LIBS := $(AWT_LIBS) -s
-	MOZILLALIBS := $(MOZILLALIBS) -s
-	LIBS := $(LIBS) -s
+	AWT_LFLAGS := $(AWT_LFLAGS) -s
+	MOZILLALFLAGS := $(MOZILLALFLAGS) -s
+	LFLAGS := $(LFLAGS) -s
 endif
 
 all: make_swt make_atk make_gnome make_glx
@@ -122,13 +122,13 @@ all: make_swt make_atk make_gnome make_glx
 make_swt: $(SWT_LIB) $(SWTPI_LIB)
 
 $(SWT_LIB): $(SWT_OBJECTS)
-	$(CC) $(LIBS) -o $(SWT_LIB) $(SWT_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS)
 
 callback.o: callback.c callback.h
 	$(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c
 
 $(SWTPI_LIB): $(SWTPI_OBJECTS)
-	$(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS)
+	$(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS)
 
 swt.o: swt.c swt.h
 	$(CC) $(CFLAGS) -c swt.c
@@ -147,7 +147,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h
 make_cairo: $(CAIRO_LIB)
 
 $(CAIRO_LIB): $(CAIRO_OBJECTS)
-	$(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS)
 
 cairo.o: cairo.c cairo.h swt.h
 	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -163,7 +163,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h
 make_cde: $(CDE_LIB)
 
 $(CDE_LIB): $(CDE_OBJECTS)
-	$(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS)
+	$(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) 
 
 #
 # AWT lib
@@ -171,7 +171,7 @@ $(CDE_LIB): $(CDE_OBJECTS)
 make_awt:$(AWT_LIB)
 
 $(AWT_LIB): $(AWT_OBJECTS)
-	$(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS)
+	$(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS)
 
 #
 # Atk lib
@@ -179,7 +179,7 @@ $(AWT_LIB): $(AWT_OBJECTS)
 make_atk: $(ATK_LIB)
 
 $(ATK_LIB): $(ATK_OBJECTS)
-	$(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS)
+	$(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS)
 
 atk.o: atk.c atk.h
 	$(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c
@@ -196,7 +196,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h
 make_gnome: $(GNOME_LIB)
 
 $(GNOME_LIB): $(GNOME_OBJECTS)
-	$(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS)
 
 gnome.o: gnome.c 
 	$(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c
@@ -213,7 +213,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h
 make_mozilla:$(MOZILLA_LIB)
 
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
-	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS}
+	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS}
 
 xpcom.o: xpcom.cpp
 	$(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp
@@ -233,7 +233,7 @@ xpcom_stats.o: xpcom_stats.cpp
 make_xulrunner:$(XULRUNNER_LIB)
 
 $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
-	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcomxul.o: xpcom.cpp
 	$(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp
@@ -253,7 +253,7 @@ xpcomxul_stats.o: xpcom_stats.cpp
 make_xpcominit:$(XPCOMINIT_LIB)
 
 $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS)
-	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS}
+	$(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcominit.o: xpcominit.cpp
 	$(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp
@@ -270,7 +270,7 @@ xpcominit_stats.o: xpcominit_stats.cpp
 make_glx: $(GLX_LIB)
 
 $(GLX_LIB): $(GLX_OBJECTS)
-	$(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+	$(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
 
 glx.o: glx.c 
 	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index d2604c3..04527a3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -147,6 +147,78 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1ENTRY_1IM_1CONTEXT)
 }
 #endif
 
+#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1A
+JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1A)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC);
+	rc = (jboolean)GTK_RANGE_HAS_STEPPER_A((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1B
+JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1B)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC);
+	rc = (jboolean)GTK_RANGE_HAS_STEPPER_B((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1C
+JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1C)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC);
+	rc = (jboolean)GTK_RANGE_HAS_STEPPER_C((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1D
+JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1D)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC);
+	rc = (jboolean)GTK_RANGE_HAS_STEPPER_D((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1RANGE_1SLIDER_1END
+JNIEXPORT jint JNICALL OS_NATIVE(GTK_1RANGE_1SLIDER_1END)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1SLIDER_1END_FUNC);
+	rc = (jint)GTK_RANGE_SLIDER_END((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1SLIDER_1END_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_GTK_1RANGE_1SLIDER_1START
+JNIEXPORT jint JNICALL OS_NATIVE(GTK_1RANGE_1SLIDER_1START)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1SLIDER_1START_FUNC);
+	rc = (jint)GTK_RANGE_SLIDER_START((GtkRange *)arg0);
+	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1SLIDER_1START_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GTK_1SCROLLED_1WINDOW_1HSCROLLBAR
 JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1SCROLLED_1WINDOW_1HSCROLLBAR)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -387,6 +459,78 @@ JNIEXPORT void JNICALL OS_NATIVE(G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR)
 }
 #endif
 
+#ifndef NO_G_1TYPE_1BOOLEAN
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1TYPE_1BOOLEAN)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1TYPE_1BOOLEAN_FUNC);
+	rc = (jintLong)G_TYPE_BOOLEAN;
+	OS_NATIVE_EXIT(env, that, G_1TYPE_1BOOLEAN_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_G_1TYPE_1DOUBLE
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1TYPE_1DOUBLE)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1TYPE_1DOUBLE_FUNC);
+	rc = (jintLong)G_TYPE_DOUBLE;
+	OS_NATIVE_EXIT(env, that, G_1TYPE_1DOUBLE_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_G_1TYPE_1FLOAT
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1TYPE_1FLOAT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1TYPE_1FLOAT_FUNC);
+	rc = (jintLong)G_TYPE_FLOAT;
+	OS_NATIVE_EXIT(env, that, G_1TYPE_1FLOAT_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_G_1TYPE_1INT
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1TYPE_1INT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1TYPE_1INT_FUNC);
+	rc = (jintLong)G_TYPE_INT;
+	OS_NATIVE_EXIT(env, that, G_1TYPE_1INT_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_G_1TYPE_1INT64
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1TYPE_1INT64)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1TYPE_1INT64_FUNC);
+	rc = (jintLong)G_TYPE_INT64;
+	OS_NATIVE_EXIT(env, that, G_1TYPE_1INT64_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_G_1VALUE_1TYPE
+JNIEXPORT jintLong JNICALL OS_NATIVE(G_1VALUE_1TYPE)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, G_1VALUE_1TYPE_FUNC);
+	rc = (jintLong)G_VALUE_TYPE(arg0);
+	OS_NATIVE_EXIT(env, that, G_1VALUE_1TYPE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GdkColor_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GdkColor_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -495,6 +639,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(GdkEventMotion_1sizeof)
 }
 #endif
 
+#ifndef NO_GdkEventProperty_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(GdkEventProperty_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, GdkEventProperty_1sizeof_FUNC);
+	rc = (jint)GdkEventProperty_sizeof();
+	OS_NATIVE_EXIT(env, that, GdkEventProperty_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GdkEventScroll_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GdkEventScroll_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -951,26 +1107,50 @@ JNIEXPORT jint JNICALL OS_NATIVE(PangoRectangle_1sizeof)
 }
 #endif
 
-#ifndef NO_XAnyEvent_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(XAnyEvent_1sizeof)
+#ifndef NO_RTLD_1GLOBAL
+JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1GLOBAL)
 	(JNIEnv *env, jclass that)
 {
 	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, XAnyEvent_1sizeof_FUNC);
-	rc = (jint)XAnyEvent_sizeof();
-	OS_NATIVE_EXIT(env, that, XAnyEvent_1sizeof_FUNC);
+	OS_NATIVE_ENTER(env, that, RTLD_1GLOBAL_FUNC);
+	rc = (jint)RTLD_GLOBAL;
+	OS_NATIVE_EXIT(env, that, RTLD_1GLOBAL_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_RTLD_1LAZY
+JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1LAZY)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, RTLD_1LAZY_FUNC);
+	rc = (jint)RTLD_LAZY;
+	OS_NATIVE_EXIT(env, that, RTLD_1LAZY_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_RTLD_1NOW
+JNIEXPORT jint JNICALL OS_NATIVE(RTLD_1NOW)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, RTLD_1NOW_FUNC);
+	rc = (jint)RTLD_NOW;
+	OS_NATIVE_EXIT(env, that, RTLD_1NOW_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO_XButtonEvent_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(XButtonEvent_1sizeof)
+#ifndef NO_XAnyEvent_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(XAnyEvent_1sizeof)
 	(JNIEnv *env, jclass that)
 {
 	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, XButtonEvent_1sizeof_FUNC);
-	rc = (jint)XButtonEvent_sizeof();
-	OS_NATIVE_EXIT(env, that, XButtonEvent_1sizeof_FUNC);
+	OS_NATIVE_ENTER(env, that, XAnyEvent_1sizeof_FUNC);
+	rc = (jint)XAnyEvent_sizeof();
+	OS_NATIVE_EXIT(env, that, XAnyEvent_1sizeof_FUNC);
 	return rc;
 }
 #endif
@@ -1191,6 +1371,30 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1TYPE_1PIXBUF)
 }
 #endif
 
+#ifndef NO__1GString_1len
+JNIEXPORT jint JNICALL OS_NATIVE(_1GString_1len)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1GString_1len_FUNC);
+	rc = (jint)((GString *)arg0)->len;
+	OS_NATIVE_EXIT(env, that, _1GString_1len_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1GString_1str
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1GString_1str)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1GString_1str_FUNC);
+	rc = (jintLong)((GString *)arg0)->str;
+	OS_NATIVE_EXIT(env, that, _1GString_1str_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1GTK_1IS_1BUTTON
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1GTK_1IS_1BUTTON)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -1287,6 +1491,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1GTK_1IS_1PLUG)
 }
 #endif
 
+#ifndef NO__1GTK_1IS_1SCROLLED_1WINDOW
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1GTK_1IS_1SCROLLED_1WINDOW)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1GTK_1IS_1SCROLLED_1WINDOW_FUNC);
+	rc = (jboolean)GTK_IS_SCROLLED_WINDOW(arg0);
+	OS_NATIVE_EXIT(env, that, _1GTK_1IS_1SCROLLED_1WINDOW_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1GTK_1IS_1SOCKET
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1GTK_1IS_1SOCKET)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -1571,30 +1787,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1G_1OBJECT_1TYPE_1NAME)
 }
 #endif
 
-#ifndef NO__1G_1TYPE_1BOOLEAN
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1G_1TYPE_1BOOLEAN)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1G_1TYPE_1BOOLEAN_FUNC);
-	rc = (jintLong)G_TYPE_BOOLEAN;
-	OS_NATIVE_EXIT(env, that, _1G_1TYPE_1BOOLEAN_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1G_1TYPE_1INT
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1G_1TYPE_1INT)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1G_1TYPE_1INT_FUNC);
-	rc = (jintLong)G_TYPE_INT;
-	OS_NATIVE_EXIT(env, that, _1G_1TYPE_1INT_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1G_1TYPE_1STRING
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1G_1TYPE_1STRING)
 	(JNIEnv *env, jclass that)
@@ -1735,6 +1927,34 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1XGetSelectionOwner)
 }
 #endif
 
+#ifndef NO__1XGetWindowProperty
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1XGetWindowProperty)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jboolean arg5, jintLong arg6, jintLongArray arg7, jintArray arg8, jintArray arg9, jintArray arg10, jintLongArray arg11)
+{
+	jintLong *lparg7=NULL;
+	jint *lparg8=NULL;
+	jint *lparg9=NULL;
+	jint *lparg10=NULL;
+	jintLong *lparg11=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1XGetWindowProperty_FUNC);
+	if (arg7) if ((lparg7 = (*env)->GetIntLongArrayElements(env, arg7, NULL)) == NULL) goto fail;
+	if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail;
+	if (arg9) if ((lparg9 = (*env)->GetIntArrayElements(env, arg9, NULL)) == NULL) goto fail;
+	if (arg10) if ((lparg10 = (*env)->GetIntArrayElements(env, arg10, NULL)) == NULL) goto fail;
+	if (arg11) if ((lparg11 = (*env)->GetIntLongArrayElements(env, arg11, NULL)) == NULL) goto fail;
+	rc = (jintLong)XGetWindowProperty((Display *)arg0, (Window)arg1, (Atom)arg2, arg3, arg4, arg5, (Atom)arg6, (Atom*)lparg7, (int *)lparg8, (unsigned long *)lparg9, (unsigned long *)lparg10, (unsigned char **)lparg11);
+fail:
+	if (arg11 && lparg11) (*env)->ReleaseIntLongArrayElements(env, arg11, lparg11, 0);
+	if (arg10 && lparg10) (*env)->ReleaseIntArrayElements(env, arg10, lparg10, 0);
+	if (arg9 && lparg9) (*env)->ReleaseIntArrayElements(env, arg9, lparg9, 0);
+	if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
+	if (arg7 && lparg7) (*env)->ReleaseIntLongArrayElements(env, arg7, lparg7, 0);
+	OS_NATIVE_EXIT(env, that, _1XGetWindowProperty_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1XInternAtom
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1XInternAtom)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jboolean arg2)
@@ -2098,6 +2318,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1XSetInputFocus)
 }
 #endif
 
+#ifndef NO__1XSetSelectionOwner
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1XSetSelectionOwner)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1XSetSelectionOwner_FUNC);
+	rc = (jintLong)XSetSelectionOwner((Display *)arg0, (Atom)arg1, arg2, (Time)arg3);
+	OS_NATIVE_EXIT(env, that, _1XSetSelectionOwner_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1XSetTransientForHint
 JNIEXPORT jint JNICALL OS_NATIVE(_1XSetTransientForHint)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -2164,6 +2396,22 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1XWarpPointer)
 }
 #endif
 
+#ifndef NO__1access
+JNIEXPORT jint JNICALL OS_NATIVE(_1access)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+{
+	jbyte *lparg0=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1access_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jint)access((const char*)lparg0, arg1);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1access_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1atk_1object_1add_1relationship
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1atk_1object_1add_1relationship)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
@@ -2184,6 +2432,26 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1atk_1object_1add_1relationship)
 }
 #endif
 
+#ifndef NO__1atk_1object_1remove_1relationship
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1atk_1object_1remove_1relationship)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1atk_1object_1remove_1relationship_FUNC);
+/*
+	rc = (jboolean)atk_object_remove_relationship((AtkObject *)arg0, (AtkRelationType)arg1, (AtkObject *)arg2);
+*/
+	{
+		LOAD_FUNCTION(fp, atk_object_remove_relationship)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(AtkObject *, AtkRelationType, AtkObject *))fp)((AtkObject *)arg0, (AtkRelationType)arg1, (AtkObject *)arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1atk_1object_1remove_1relationship_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1call
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1call)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
@@ -2240,50 +2508,659 @@ fail:
 }
 #endif
 
-#ifndef NO__1g_1cclosure_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1cclosure_1new)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+#ifndef NO__1g_1app_1info_1create_1from_1commandline
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1create_1from_1commandline)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jintLong arg2, jintLong arg3)
 {
+	jbyte *lparg0=NULL;
+	jbyte *lparg1=NULL;
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1cclosure_1new_FUNC);
-	rc = (jintLong)g_cclosure_new((GCallback)arg0, (gpointer)arg1, (GClosureNotify)arg2);
-	OS_NATIVE_EXIT(env, that, _1g_1cclosure_1new_FUNC);
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1create_1from_1commandline_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_app_info_create_from_commandline(lparg0, lparg1, arg2, arg3);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_create_from_commandline)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *, jbyte *, jintLong, jintLong))fp)(lparg0, lparg1, arg2, arg3);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1create_1from_1commandline_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1g_1closure_1ref
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1closure_1ref)
-	(JNIEnv *env, jclass that, jintLong arg0)
+#ifndef NO__1g_1app_1info_1get_1all
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1all)
+	(JNIEnv *env, jclass that)
 {
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1closure_1ref_FUNC);
-	rc = (jintLong)g_closure_ref((GClosure *)arg0);
-	OS_NATIVE_EXIT(env, that, _1g_1closure_1ref_FUNC);
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1all_FUNC);
+/*
+	rc = (jintLong)g_app_info_get_all();
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_all)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1all_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1g_1closure_1unref
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1unref)
-	(JNIEnv *env, jclass that, jintLong arg0)
+#ifndef NO__1g_1app_1info_1get_1default_1for_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1default_1for_1type)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1)
 {
-	OS_NATIVE_ENTER(env, that, _1g_1closure_1unref_FUNC);
-	g_closure_unref((GClosure *)arg0);
-	OS_NATIVE_EXIT(env, that, _1g_1closure_1unref_FUNC);
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1default_1for_1type_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_app_info_get_default_for_type(lparg0, arg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_default_for_type)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *, jboolean))fp)(lparg0, arg1);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1default_1for_1type_FUNC);
+	return rc;
 }
 #endif
 
-#ifndef NO__1g_1filename_1from_1uri
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1filename_1from_1uri)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2)
+#ifndef NO__1g_1app_1info_1get_1executable
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1executable)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	jintLong *lparg1=NULL;
-	jintLong *lparg2=NULL;
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1filename_1from_1uri_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1executable_FUNC);
+/*
+	rc = (jintLong)g_app_info_get_executable(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_executable)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1executable_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1get_1icon
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1icon)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1icon_FUNC);
+/*
+	rc = (jintLong)g_app_info_get_icon(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_icon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1icon_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1get_1id
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1id)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1id_FUNC);
+/*
+	rc = (jintLong)g_app_info_get_id(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_id)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1id_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1get_1name
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1name)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1name_FUNC);
+/*
+	rc = (jintLong)g_app_info_get_name(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_get_name)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1name_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1launch
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1launch)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1launch_FUNC);
+/*
+	rc = (jboolean)g_app_info_launch(arg0, arg1, arg2, arg3);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_launch)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2, arg3);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1launch_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1launch_1default_1for_1uri
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1launch_1default_1for_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1launch_1default_1for_1uri_FUNC);
+/*
+	rc = (jboolean)g_app_info_launch_default_for_uri(arg0, arg1, arg2);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_launch_default_for_uri)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1launch_1default_1for_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1should_1show
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1should_1show)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1should_1show_FUNC);
+/*
+	rc = (jboolean)g_app_info_should_show(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_should_show)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1should_1show_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1app_1info_1supports_1uris
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1app_1info_1supports_1uris)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1supports_1uris_FUNC);
+/*
+	rc = (jboolean)g_app_info_supports_uris(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_app_info_supports_uris)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1supports_1uris_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1cclosure_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1cclosure_1new)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1cclosure_1new_FUNC);
+	rc = (jintLong)g_cclosure_new((GCallback)arg0, (gpointer)arg1, (GClosureNotify)arg2);
+	OS_NATIVE_EXIT(env, that, _1g_1cclosure_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1closure_1ref
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1closure_1ref)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1closure_1ref_FUNC);
+	rc = (jintLong)g_closure_ref((GClosure *)arg0);
+	OS_NATIVE_EXIT(env, that, _1g_1closure_1ref_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1closure_1unref
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1closure_1unref)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, _1g_1closure_1unref_FUNC);
+	g_closure_unref((GClosure *)arg0);
+	OS_NATIVE_EXIT(env, that, _1g_1closure_1unref_FUNC);
+}
+#endif
+
+#ifndef NO__1g_1content_1type_1equals
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1content_1type_1equals)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1content_1type_1equals_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jboolean)g_content_type_equals(arg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_content_type_equals)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1content_1type_1equals_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1content_1type_1get_1mime_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1content_1type_1get_1mime_1type)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1content_1type_1get_1mime_1type_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_content_type_get_mime_type(lparg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_content_type_get_mime_type)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1content_1type_1get_1mime_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1content_1type_1is_1a
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1content_1type_1is_1a)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1content_1type_1is_1a_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jboolean)g_content_type_is_a(arg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_content_type_is_a)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1content_1type_1is_1a_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1content_1types_1get_1registered
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1content_1types_1get_1registered)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1content_1types_1get_1registered_FUNC);
+/*
+	rc = (jintLong)g_content_types_get_registered();
+*/
+	{
+		LOAD_FUNCTION(fp, g_content_types_get_registered)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1content_1types_1get_1registered_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1data_1input_1stream_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1new)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1data_1input_1stream_1new_FUNC);
+/*
+	rc = (jintLong)g_data_input_stream_new(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_data_input_stream_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1data_1input_1stream_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1data_1input_1stream_1read_1line
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1read_1line)
+	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintLong arg2, jintLong arg3)
+{
+	jint *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_data_input_stream_read_line(arg0, lparg1, arg2, arg3);
+*/
+	{
+		LOAD_FUNCTION(fp, g_data_input_stream_read_line)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint *, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1desktop_1app_1info_1new_1from_1filename
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1desktop_1app_1info_1new_1from_1filename)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1desktop_1app_1info_1new_1from_1filename_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_desktop_app_info_new_from_filename(lparg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_desktop_app_info_new_from_filename)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1desktop_1app_1info_1new_1from_1filename_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1get_1path
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1get_1path)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1get_1path_FUNC);
+/*
+	rc = (jintLong)g_file_get_path(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_get_path)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1file_1get_1path_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1get_1uri
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1get_1uri_FUNC);
+/*
+	rc = (jintLong)g_file_get_uri(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_get_uri)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1file_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1icon_1get_1file
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1icon_1get_1file)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1icon_1get_1file_FUNC);
+/*
+	rc = (jintLong)g_file_icon_get_file(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_icon_get_file)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1file_1icon_1get_1file_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1info_1get_1content_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1info_1get_1content_1type)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
+/*
+	rc = (jintLong)g_file_info_get_content_type(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_info_get_content_type)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1info_1get_1modification_1time
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1file_1info_1get_1modification_1time)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+{
+	jintLong *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1modification_1time_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	g_file_info_get_modification_time(arg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_info_get_modification_time)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1info_1get_1modification_1time_FUNC);
+}
+#endif
+
+#ifndef NO__1g_1file_1new_1for_1path
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1path)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1path_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_file_new_for_path(lparg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_new_for_path)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1path_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1new_1for_1uri
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1uri)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1uri_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_file_new_for_uri(lparg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_new_for_uri)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1query_1info
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1query_1info)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jintLong arg3, jintLong arg4)
+{
+	jbyte *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1query_1info_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_file_query_info(arg0, lparg1, arg2, arg3, arg4);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_query_info)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jbyte *, jintLong, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3, arg4);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1query_1info_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1read
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1read)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1read_FUNC);
+/*
+	rc = (jintLong)g_file_read(arg0, arg1, arg2);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_read)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1file_1read_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1file_1test
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1file_1test)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+{
+	jbyte *lparg0=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1test_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jboolean)g_file_test(lparg0, arg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_file_test)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jbyte *, jint))fp)(lparg0, arg1);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1test_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1filename_1from_1uri
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1filename_1from_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2)
+{
+	jintLong *lparg1=NULL;
+	jintLong *lparg2=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1filename_1from_1uri_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
 	rc = (jintLong)g_filename_from_uri((const char *)arg0, (char **)lparg1, (GError **)lparg2);
 fail:
 	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
@@ -2363,6 +3240,53 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1free)
 }
 #endif
 
+#ifndef NO__1g_1icon_1new_1for_1string
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1icon_1new_1for_1string)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jintLongArray arg1)
+{
+	jbyte *lparg0=NULL;
+	jintLong *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1icon_1new_1for_1string_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)g_icon_new_for_string(lparg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, g_icon_new_for_string)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *, jintLong *))fp)(lparg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1g_1icon_1new_1for_1string_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1g_1icon_1to_1string
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1icon_1to_1string)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1icon_1to_1string_FUNC);
+/*
+	rc = (jintLong)g_icon_to_string(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, g_icon_to_string)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1icon_1to_1string_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1g_1idle_1add
 JNIEXPORT jint JNICALL OS_NATIVE(_1g_1idle_1add)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -2940,6 +3864,34 @@ fail:
 }
 #endif
 
+#if (!defined(NO__1g_1object_1set__I_3B_3BI) && !defined(JNI64)) || (!defined(NO__1g_1object_1set__J_3B_3BJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__I_3B_3BI)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2, jintLong arg3)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__J_3B_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2, jintLong arg3)
+#endif
+{
+	jbyte *lparg1=NULL;
+	jbyte *lparg2=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, _1g_1object_1set__I_3B_3BI_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, _1g_1object_1set__J_3B_3BJ_FUNC);
+#endif
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	g_object_set((gpointer)arg0, (const gchar *)lparg1, lparg2, (const gchar *)NULL);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, _1g_1object_1set__I_3B_3BI_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, _1g_1object_1set__J_3B_3BJ_FUNC);
+#endif
+}
+#endif
+
 #ifndef NO__1g_1object_1set_1qdata
 JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set_1qdata)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
@@ -3126,13 +4078,41 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3BJJ)(JNIEnv *en
 	OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
 #endif
 	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, arg2, arg3);
+	g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, arg2, arg3);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__I_3BII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
+#endif
+}
+#endif
+
+#if (!defined(NO__1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2) && !defined(JNI64)) || (!defined(NO__1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jobject arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jobject arg2)
+#endif
+{
+	jbyte *lparg1=NULL;
+	GdkRectangle _arg2, *lparg2=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, _1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
+#endif
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
+	g_signal_emit_by_name((gpointer)arg0, (const gchar *)lparg1, lparg2);
 fail:
+	if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
 	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
 #ifndef JNI64
-	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__I_3BII_FUNC);
+	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BJJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC);
 #endif
 }
 #endif
@@ -3175,6 +4155,18 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1signal_1handler_1disconnect)
 }
 #endif
 
+#ifndef NO__1g_1signal_1handler_1find
+JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handler_1find)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintLong arg4, jintLong arg5, jintLong arg6)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1signal_1handler_1find_FUNC);
+	rc = (jint)g_signal_handler_find((gpointer)arg0, arg1, arg2, (GQuark)arg3, (GClosure *)arg4, (gpointer)arg5, (gpointer)arg6);
+	OS_NATIVE_EXIT(env, that, _1g_1signal_1handler_1find_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1g_1signal_1handlers_1block_1matched
 JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1block_1matched)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintLong arg4, jintLong arg5, jintLong arg6)
@@ -3251,6 +4243,18 @@ fail:
 }
 #endif
 
+#ifndef NO__1g_1slist_1append
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1slist_1append)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1slist_1append_FUNC);
+	rc = (jintLong)g_slist_append((GSList *)arg0, (gpointer)arg1);
+	OS_NATIVE_EXIT(env, that, _1g_1slist_1append_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1g_1slist_1data
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1slist_1data)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -4738,6 +5742,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1keyval_1to_1unicode)
 }
 #endif
 
+#ifndef NO__1gdk_1pango_1attr_1embossed_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1attr_1embossed_1new)
+	(JNIEnv *env, jclass that, jboolean arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1pango_1attr_1embossed_1new_FUNC);
+	rc = (jintLong)gdk_pango_attr_embossed_new(arg0);
+	OS_NATIVE_EXIT(env, that, _1gdk_1pango_1attr_1embossed_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1pango_1context_1get
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1context_1get)
 	(JNIEnv *env, jclass that)
@@ -5879,6 +6895,16 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1move)
 }
 #endif
 
+#ifndef NO__1gdk_1window_1move_1resize
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1move_1resize)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1move_1resize_FUNC);
+	gdk_window_move_resize((GdkWindow *)arg0, arg1, arg2, arg3, arg4);
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1move_1resize_FUNC);
+}
+#endif
+
 #ifndef NO__1gdk_1window_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1new)
 	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
@@ -6738,6 +7764,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1clipboard_1set_1with_1data)
 }
 #endif
 
+#ifndef NO__1gtk_1clipboard_1set_1with_1owner
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1clipboard_1set_1with_1owner)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jintLong arg5)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1clipboard_1set_1with_1owner_FUNC);
+	rc = (jboolean)gtk_clipboard_set_with_owner((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (guint)arg2, (GtkClipboardGetFunc)arg3, (GtkClipboardClearFunc)arg4, (GObject *)arg5);
+	OS_NATIVE_EXIT(env, that, _1gtk_1clipboard_1set_1with_1owner_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1clipboard_1wait_1for_1contents
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1clipboard_1wait_1for_1contents)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -7536,6 +8574,46 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1has_1frame)
 }
 #endif
 
+#ifndef NO__1gtk_1entry_1set_1icon_1from_1stock
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1icon_1from_1stock)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jbyteArray arg2)
+{
+	jbyte *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1icon_1from_1stock_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+/*
+	gtk_entry_set_icon_from_stock(arg0, arg1, lparg2);
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_entry_set_icon_from_stock)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jbyte *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1icon_1from_1stock_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1entry_1set_1icon_1sensitive
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1icon_1sensitive)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jboolean arg2)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1icon_1sensitive_FUNC);
+/*
+	gtk_entry_set_icon_sensitive(arg0, arg1, arg2);
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_entry_set_icon_sensitive)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jboolean))fp)(arg0, arg1, arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1icon_1sensitive_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1entry_1set_1invisible_1char
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1invisible_1char)
 	(JNIEnv *env, jclass that, jintLong arg0, jchar arg1)
@@ -8534,6 +9612,48 @@ fail:
 }
 #endif
 
+#ifndef NO__1gtk_1icon_1info_1free
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1icon_1info_1free)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1info_1free_FUNC);
+/*
+	gtk_icon_info_free(arg0);
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_icon_info_free)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1info_1free_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1icon_1info_1load_1icon
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1info_1load_1icon)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
+{
+	jintLong *lparg1=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1info_1load_1icon_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gtk_icon_info_load_icon(arg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_icon_info_load_icon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1info_1load_1icon_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1icon_1set_1render_1icon
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1set_1render_1icon)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jintLong arg6)
@@ -8578,6 +9698,46 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1icon_1source_1set_1pixbuf)
 }
 #endif
 
+#ifndef NO__1gtk_1icon_1theme_1get_1default
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1theme_1get_1default)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1theme_1get_1default_FUNC);
+/*
+	rc = (jintLong)gtk_icon_theme_get_default();
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_icon_theme_get_default)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1theme_1get_1default_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1icon_1theme_1lookup_1by_1gicon
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1theme_1lookup_1by_1gicon)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+/*
+	rc = (jintLong)gtk_icon_theme_lookup_by_gicon(arg0, arg1, arg2, arg3);
+*/
+	{
+		LOAD_FUNCTION(fp, gtk_icon_theme_lookup_by_gicon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1im_1context_1filter_1keypress
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1im_1context_1filter_1keypress)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -11683,6 +12843,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1socket_1new)
 }
 #endif
 
+#ifndef NO__1gtk_1spin_1button_1configure
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1spin_1button_1configure)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jint arg3)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1spin_1button_1configure_FUNC);
+	gtk_spin_button_configure((GtkSpinButton*)arg0, (GtkAdjustment *)arg1, arg2, arg3);
+	OS_NATIVE_EXIT(env, that, _1gtk_1spin_1button_1configure_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1spin_1button_1get_1adjustment
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1spin_1button_1get_1adjustment)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -14654,6 +15824,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1parent)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1parent_1window
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1parent_1window)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1parent_1window_FUNC);
+	rc = (jintLong)gtk_widget_get_parent_window((GtkWidget *)arg0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1parent_1window_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1get_1size_1request
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1size_1request)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
@@ -15377,6 +16559,18 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1iconify)
 }
 #endif
 
+#ifndef NO__1gtk_1window_1is_1active
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1window_1is_1active)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1window_1is_1active_FUNC);
+	rc = (jboolean)gtk_window_is_active((GtkWindow *)arg0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1window_1is_1active_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1window_1list_1toplevels
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1window_1list_1toplevels)
 	(JNIEnv *env, jclass that)
@@ -16201,6 +17395,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1size)
 }
 #endif
 
+#ifndef NO__1pango_1font_1description_1get_1stretch
+JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1stretch)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1stretch_FUNC);
+	rc = (jint)pango_font_description_get_stretch((PangoFontDescription *)arg0);
+	OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1stretch_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1pango_1font_1description_1get_1style
 JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1style)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16213,6 +17419,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1style)
 }
 #endif
 
+#ifndef NO__1pango_1font_1description_1get_1variant
+JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1variant)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1pango_1font_1description_1get_1variant_FUNC);
+	rc = (jint)pango_font_description_get_variant((PangoFontDescription *)arg0);
+	OS_NATIVE_EXIT(env, that, _1pango_1font_1description_1get_1variant_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1pango_1font_1description_1get_1weight
 JNIEXPORT jint JNICALL OS_NATIVE(_1pango_1font_1description_1get_1weight)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -17073,6 +18291,116 @@ JNIEXPORT void JNICALL OS_NATIVE(g_1main_1context_1wakeup)
 }
 #endif
 
+#ifndef NO_g_1value_1get_1double
+JNIEXPORT jdouble JNICALL OS_NATIVE(g_1value_1get_1double)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, g_1value_1get_1double_FUNC);
+	rc = (jdouble)g_value_get_double((GValue *)arg0);
+	OS_NATIVE_EXIT(env, that, g_1value_1get_1double_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1float
+JNIEXPORT jfloat JNICALL OS_NATIVE(g_1value_1get_1float)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jfloat rc = 0;
+	OS_NATIVE_ENTER(env, that, g_1value_1get_1float_FUNC);
+	rc = (jfloat)g_value_get_float((GValue *)arg0);
+	OS_NATIVE_EXIT(env, that, g_1value_1get_1float_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1int
+JNIEXPORT jint JNICALL OS_NATIVE(g_1value_1get_1int)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, g_1value_1get_1int_FUNC);
+	rc = (jint)g_value_get_int((GValue *)arg0);
+	OS_NATIVE_EXIT(env, that, g_1value_1get_1int_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1get_1int64
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1int64)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jlong rc = 0;
+	OS_NATIVE_ENTER(env, that, g_1value_1get_1int64_FUNC);
+	rc = (jlong)g_value_get_int64((GValue *)arg0);
+	OS_NATIVE_EXIT(env, that, g_1value_1get_1int64_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1init
+JNIEXPORT jintLong JNICALL OS_NATIVE(g_1value_1init)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, g_1value_1init_FUNC);
+	rc = (jintLong)g_value_init((GValue *)arg0, (GType)arg1);
+	OS_NATIVE_EXIT(env, that, g_1value_1init_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_g_1value_1set_1double
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1double)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+{
+	OS_NATIVE_ENTER(env, that, g_1value_1set_1double_FUNC);
+	g_value_set_double((GValue *)arg0, arg1);
+	OS_NATIVE_EXIT(env, that, g_1value_1set_1double_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1float
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1float)
+	(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
+{
+	OS_NATIVE_ENTER(env, that, g_1value_1set_1float_FUNC);
+	g_value_set_float((GValue *)arg0, arg1);
+	OS_NATIVE_EXIT(env, that, g_1value_1set_1float_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1int
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, g_1value_1set_1int_FUNC);
+	g_value_set_int((GValue *)arg0, arg1);
+	OS_NATIVE_EXIT(env, that, g_1value_1set_1int_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1set_1int64
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1set_1int64)
+	(JNIEnv *env, jclass that, jintLong arg0, jlong arg1)
+{
+	OS_NATIVE_ENTER(env, that, g_1value_1set_1int64_FUNC);
+	g_value_set_int64((GValue *)arg0, arg1);
+	OS_NATIVE_EXIT(env, that, g_1value_1set_1int64_FUNC);
+}
+#endif
+
+#ifndef NO_g_1value_1unset
+JNIEXPORT void JNICALL OS_NATIVE(g_1value_1unset)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, g_1value_1unset_FUNC);
+	g_value_unset((GValue *)arg0);
+	OS_NATIVE_EXIT(env, that, g_1value_1unset_FUNC);
+}
+#endif
+
 #ifndef NO_localeconv_1decimal_1point
 JNIEXPORT jintLong JNICALL OS_NATIVE(localeconv_1decimal_1point)
 	(JNIEnv *env, jclass that)
@@ -17358,30 +18686,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
-	XButtonEvent _arg1, *lparg1=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J_FUNC);
-#endif
-	if (arg1) if ((lparg1 = getXButtonEventFields(env, arg1, &_arg1)) == NULL) goto fail;
-	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_gtk_XClientMessageEvent_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
@@ -17749,6 +19053,27 @@ fail:
 }
 #endif
 
+#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
+#endif
+{
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J_FUNC);
+#endif
+	if (arg0) setGdkEventPropertyFields(env, arg0, (GdkEventProperty *)arg1);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
@@ -18313,31 +19638,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
-	XButtonEvent _arg0, *lparg0=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ_FUNC);
-#endif
-	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
-	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
-	if (arg0 && lparg0) setXButtonEventFields(env, arg0, lparg0);
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index e930b9b..6948505 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <dlfcn.h>
 #include <locale.h>
+#include <unistd.h>
 
 #ifndef GDK_WINDOWING_X11
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c
index 216645e..704af6c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.c	
@@ -35,6 +35,25 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1WINDOWING_1X11)
 }
 #endif
 
+#ifndef NO_pangoLayoutNewProc_1CALLBACK
+static jintLong superPangoLayoutNewProc;
+static PangoLayout * pangoLayoutNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
+	PangoLayout* layout = ((PangoLayout * (*)(GType, guint, GObjectConstructParam *))superPangoLayoutNewProc)(type, n_construct_properties, construct_properties);
+	pango_layout_set_auto_dir (layout, 0);
+	return layout;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(pangoLayoutNewProc_1CALLBACK)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, pangoLayoutNewProc_1CALLBACK_FUNC);
+	superPangoLayoutNewProc = arg0;
+	rc = (jintLong)pangoLayoutNewProc;
+	OS_NATIVE_EXIT(env, that, pangoLayoutNewProc_1CALLBACK_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1file_1chooser_1dialog_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1dialog_1new)
 	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jintLong arg5, jint arg6, jintLong arg7)
@@ -47,8 +66,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1dialog_1new)
 	rc = (jintLong)gtk_file_chooser_dialog_new(lparg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 */
 	{
-		static int initialized = 0;
-		static void *handle = NULL;
 		/*
 		* On AMD64, it is critical that functions which have a variable number of
 		* arguments, indicated by '...', include the '...' in their prototype.  This
@@ -57,17 +74,10 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1dialog_1new)
 		* For some reason, we must also explicitly declare all of the arguments we
 		* are passing in, otherwise it crashes.
 		*/
-/*		typedef jintLong (*FPTR)(jbyte *, jintLong, jint, jintLong, ...); */
-		typedef jintLong (*FPTR)(jbyte *, jintLong, jint, jintLong, jint, jintLong, jint, jintLong, ...);
-		static FPTR fptr;
-		rc = 0;
-		if (!initialized) {
-			if (!handle) handle = dlopen(gtk_file_chooser_dialog_new_LIB, RTLD_LAZY);
-			if (handle) fptr = (FPTR)dlsym(handle, "gtk_file_chooser_dialog_new");
-			initialized = 1;
-		}
-		if (fptr) {
-			rc = (jintLong)(*fptr)(lparg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+		typedef jintLong (CALLING_CONVENTION* FPTR)(jbyte *, jintLong, jint, jintLong, jint, jintLong, jint, jintLong, ...);
+		LOAD_FUNCTION(fp, gtk_file_chooser_dialog_new)
+		if (fp) {
+			rc = (jintLong)((FPTR) fp)(lparg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
 		}
 	}
 fail:
@@ -88,8 +98,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1layout_1set_1attributes)
 	gtk_cell_layout_set_attributes(arg0, arg1, lparg2, arg3, arg4);
 */
 	{
-		static int initialized = 0;
-		static void *handle = NULL;
 		/*
 		* On AMD64, it is critical that functions which have a variable number of
 		* arguments, indicated by '...', include the '...' in their prototype.  This
@@ -98,16 +106,10 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1layout_1set_1attributes)
 		* For some reason, we must also explicitly declare all of the arguments we
 		* are passing in, otherwise it crashes.
 		*/
-/*		typedef void (*FPTR)(jintLong, jintLong, ...); */
 		typedef void (*FPTR)(jintLong, jintLong, jbyte *, jint, jintLong, ...);
-		static FPTR fptr;
-		if (!initialized) {
-			if (!handle) handle = dlopen(gtk_cell_layout_set_attributes_LIB, RTLD_LAZY);
-			if (handle) fptr = (FPTR)dlsym(handle, "gtk_cell_layout_set_attributes");
-			initialized = 1;
-		}
-		if (fptr) {
-			(*fptr)(arg0, arg1, lparg2, arg3, arg4);
+		LOAD_FUNCTION(fp, gtk_cell_layout_set_attributes)
+		if (fp) {
+			((FPTR)fp)(arg0, arg1, lparg2, arg3, arg4);
 		}
 	}
 fail:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index 40e1c14..1f2b7de 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+* Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
 * The contents of this file are made available under the terms
 * of the GNU Lesser General Public License (LGPL) Version 2.1 that
 * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -25,197 +25,270 @@
 #define GtkTextIter_sizeof() sizeof(GtkTextIter)
 #define GtkTreeIter_sizeof() sizeof(GtkTreeIter)
 
+#ifdef AIX
+#define LIB_XRENDER "libXrender.a(libXrender.so)"
+#define LIB_GTK "libgtk-x11-2.0.a(libgtk-x11-2.0.so.0)"
+#define LIB_GDK "libgdk-x11-2.0.a(libgdk-x11-2.0.so.0)"
+#define LIB_ATK "libatk-1.0.a(libatk-1.0.so.0)"
+#define LIB_PANGO "libpango-1.0.a(libpango-1.0.so.0"
+#define LIB_PANGOCAIRO "libpangocairo-1.0.a(libpangocairo-1.0.so.0)"
+#define LIB_GIO "libgio-2.0.a(libgio-2.0.so.0)"
+#define LIB_FONTCONFIG "libfontconfig.a(libfontconfig.so.1)"
+#elif HPUX
+#define LIB_XRENDER "libXrender.so"
+#define LIB_GTK "libgtk-x11-2.0.so"
+#define LIB_GDK "libgdk-x11-2.0.so"
+#define LIB_ATK "libatk-1.0.so"
+#define LIB_PANGO "libpango-1.0.so"
+#define LIB_PANGOCAIRO "libpangocairo-1.0.so"
+#define LIB_GIO "libgio-2.0.so"
+#define LIB_FONTCONFIG "libfontconfig.so"
+#else
+#define LIB_XRENDER "libXrender.so"
+#define LIB_GTK "libgtk-x11-2.0.so.0"
+#define LIB_GDK "libgdk-x11-2.0.so.0"
+#define LIB_ATK "libatk-1.0.so.0"
+#define LIB_PANGO "libpango-1.0.so.0"
+#define LIB_PANGOCAIRO "libpangocairo-1.0.so.0"
+#define LIB_GIO "libgio-2.0.so.0"
+#define LIB_FONTCONFIG "libfontconfig.so.1"
+#endif
+
 /* Libraries for dynamic loaded functions */
-#define XRenderQueryExtension_LIB "libXrender.so"
-#define XRenderQueryVersion_LIB "libXrender.so"
-#define XRenderFindStandardFormat_LIB "libXrender.so"
-#define XRenderFindVisualFormat_LIB "libXrender.so"
-#define XRenderComposite_LIB "libXrender.so"
-#define XRenderCreatePicture_LIB "libXrender.so"
-#define XRenderFreePicture_LIB "libXrender.so"
-#define XRenderSetPictureClipRectangles_LIB "libXrender.so"
-#define XRenderSetPictureTransform_LIB "libXrender.so"
-#define gtk_calendar_display_options_LIB "libgtk-x11-2.0.so.0"
-#define gtk_calendar_get_date_LIB "libgtk-x11-2.0.so.0"
-#define gtk_calendar_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_calendar_select_day_LIB "libgtk-x11-2.0.so.0"
-#define gtk_calendar_select_month_LIB "libgtk-x11-2.0.so.0"
-#define gtk_calendar_set_display_options_LIB "libgtk-x11-2.0.so.0"
-#define gtk_cell_layout_set_attributes_LIB "libgtk-x11-2.0.so.0"
-#define gtk_cell_layout_clear_LIB "libgtk-x11-2.0.so.0"
-#define gtk_cell_layout_pack_start_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_entry_new_text_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_new_text_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_insert_text_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_remove_text_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_get_active_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_get_model_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_set_active_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_set_focus_on_click_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_popup_LIB "libgtk-x11-2.0.so.0"
-#define gtk_combo_box_popdown_LIB "libgtk-x11-2.0.so.0"
-#define gtk_entry_text_index_to_layout_index_LIB "libgtk-x11-2.0.so.0"
-#define gtk_entry_get_inner_border_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_add_filter_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_dialog_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_current_folder_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_filename_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_filenames_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_filter_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_uri_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_get_uris_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_current_folder_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_current_folder_uri_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_current_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_do_overwrite_confirmation_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_extra_widget_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_filename_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_filter_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_local_only_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_uri_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_chooser_set_select_multiple_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_filter_add_pattern_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_filter_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_filter_get_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_file_filter_set_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_get_expanded_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_get_label_widget_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_set_expanded_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_set_label_LIB "libgtk-x11-2.0.so.0"
-#define gtk_expander_set_label_widget_LIB "libgtk-x11-2.0.so.0"
-#define gtk_label_set_line_wrap_mode_LIB "libgtk-x11-2.0.so.0"
-#define gtk_menu_shell_set_take_focus_LIB "libgtk-x11-2.0.so.0"
-#define gtk_window_set_keep_below_LIB "libgtk-x11-2.0.so.0"
-#define gtk_tooltip_trigger_tooltip_query_LIB "libgtk-x11-2.0.so.0"
-#define gtk_tree_selection_count_selected_rows_LIB "libgtk-x11-2.0.so.0"
-#define gtk_tree_selection_get_selected_rows_LIB "libgtk-x11-2.0.so.0"
-#define gtk_tree_view_column_cell_get_position_LIB "libgtk-x11-2.0.so.0"
-#define gtk_tree_view_set_grid_lines_LIB "libgtk-x11-2.0.so.0"
-#define gtk_entry_set_alignment_LIB "libgtk-x11-2.0.so.0"
-#define gdk_cursor_new_from_pixbuf_LIB "libgdk-x11-2.0.so.0"
-#define gdk_display_get_default_LIB "libgdk-x11-2.0.so.0"
-#define gdk_display_supports_cursor_color_LIB "libgdk-x11-2.0.so.0"
-#define gdk_draw_pixbuf_LIB "libgdk-x11-2.0.so.0"
-#define gdk_pixbuf_save_to_bufferv_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_default_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_monitor_at_point_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_monitor_at_window_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_monitor_geometry_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_n_monitors_LIB "libgdk-x11-2.0.so.0"
-#define gdk_screen_get_number_LIB "libgdk-x11-2.0.so.0"
-#define gtk_status_icon_get_geometry_LIB "libgtk-x11-2.0.so.0"
-#define gtk_status_icon_get_visible_LIB "libgtk-x11-2.0.so.0"
-#define gtk_status_icon_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_status_icon_set_from_pixbuf_LIB "libgtk-x11-2.0.so.0"
-#define gtk_status_icon_set_visible_LIB "libgtk-x11-2.0.so.0"
-#define gtk_status_icon_set_tooltip_LIB "libgtk-x11-2.0.so.0"
-#define gtk_window_get_group_LIB "libgtk-x11-2.0.so.0"
-#define gtk_window_get_opacity_LIB "libgtk-x11-2.0.so.0"
-#define gdk_window_restack_LIB "libgdk-x11-2.0.so.0"
-#define gdk_window_set_keep_above_LIB "libgdk-x11-2.0.so.0"
-#define gdk_window_set_accept_focus_LIB "libgdk-x11-2.0.so.0"
-#define gtk_window_set_opacity_LIB "libgtk-x11-2.0.so.0"
-#define gtk_window_set_skip_taskbar_hint_LIB "libgtk-x11-2.0.so.0"
-#define gtk_widget_is_composited_LIB "libgtk-x11-2.0.so.0"
-#define gtk_widget_set_tooltip_text_LIB "libgtk-x11-2.0.so.0"
-#define gdk_x11_screen_get_window_manager_name_LIB "libgdk-x11-2.0.so.0"
-#define gdk_x11_screen_lookup_visual_LIB "libgdk-x11-2.0.so.0"
+#define XRenderQueryExtension_LIB LIB_XRENDER
+#define XRenderQueryVersion_LIB LIB_XRENDER
+#define XRenderFindStandardFormat_LIB LIB_XRENDER
+#define XRenderFindVisualFormat_LIB LIB_XRENDER
+#define XRenderComposite_LIB LIB_XRENDER
+#define XRenderCreatePicture_LIB LIB_XRENDER
+#define XRenderFreePicture_LIB LIB_XRENDER
+#define XRenderSetPictureClipRectangles_LIB LIB_XRENDER
+#define XRenderSetPictureTransform_LIB LIB_XRENDER
+#define gtk_calendar_display_options_LIB LIB_GTK
+#define gtk_calendar_get_date_LIB LIB_GTK
+#define gtk_calendar_new_LIB LIB_GTK
+#define gtk_calendar_select_day_LIB LIB_GTK
+#define gtk_calendar_select_month_LIB LIB_GTK
+#define gtk_calendar_set_display_options_LIB LIB_GTK
+#define gtk_cell_layout_set_attributes_LIB LIB_GTK
+#define gtk_cell_layout_clear_LIB LIB_GTK
+#define gtk_cell_layout_pack_start_LIB LIB_GTK
+#define gtk_combo_box_entry_new_text_LIB LIB_GTK
+#define gtk_combo_box_new_text_LIB LIB_GTK
+#define gtk_combo_box_insert_text_LIB LIB_GTK
+#define gtk_combo_box_remove_text_LIB LIB_GTK
+#define gtk_combo_box_get_active_LIB LIB_GTK
+#define gtk_combo_box_get_model_LIB LIB_GTK
+#define gtk_combo_box_set_active_LIB LIB_GTK
+#define gtk_combo_box_set_focus_on_click_LIB LIB_GTK
+#define gtk_combo_box_popup_LIB LIB_GTK
+#define gtk_combo_box_popdown_LIB LIB_GTK
+#define gtk_entry_text_index_to_layout_index_LIB LIB_GTK
+#define gtk_entry_get_inner_border_LIB LIB_GTK
+#define gtk_file_chooser_add_filter_LIB LIB_GTK
+#define gtk_file_chooser_dialog_new_LIB LIB_GTK
+#define gtk_file_chooser_get_current_folder_LIB LIB_GTK
+#define gtk_file_chooser_get_filename_LIB LIB_GTK
+#define gtk_file_chooser_get_filenames_LIB LIB_GTK
+#define gtk_file_chooser_get_filter_LIB LIB_GTK
+#define gtk_file_chooser_get_uri_LIB LIB_GTK
+#define gtk_file_chooser_get_uris_LIB LIB_GTK
+#define gtk_file_chooser_set_current_folder_LIB LIB_GTK
+#define gtk_file_chooser_set_current_folder_uri_LIB LIB_GTK
+#define gtk_file_chooser_set_current_name_LIB LIB_GTK
+#define gtk_file_chooser_set_do_overwrite_confirmation_LIB LIB_GTK
+#define gtk_file_chooser_set_extra_widget_LIB LIB_GTK
+#define gtk_file_chooser_set_filename_LIB LIB_GTK
+#define gtk_file_chooser_set_filter_LIB LIB_GTK
+#define gtk_file_chooser_set_local_only_LIB LIB_GTK
+#define gtk_file_chooser_set_uri_LIB LIB_GTK
+#define gtk_file_chooser_set_select_multiple_LIB LIB_GTK
+#define gtk_file_filter_add_pattern_LIB LIB_GTK
+#define gtk_file_filter_new_LIB LIB_GTK
+#define gtk_file_filter_get_name_LIB LIB_GTK
+#define gtk_file_filter_set_name_LIB LIB_GTK
+#define gtk_expander_get_expanded_LIB LIB_GTK
+#define gtk_expander_get_label_widget_LIB LIB_GTK
+#define gtk_expander_new_LIB LIB_GTK
+#define gtk_expander_set_expanded_LIB LIB_GTK
+#define gtk_expander_set_label_LIB LIB_GTK
+#define gtk_expander_set_label_widget_LIB LIB_GTK
+#define gtk_label_set_line_wrap_mode_LIB LIB_GTK
+#define gtk_icon_info_load_icon_LIB LIB_GTK
+#define gtk_icon_info_free_LIB LIB_GTK
+#define gtk_icon_theme_lookup_by_gicon_LIB LIB_GTK
+#define gtk_icon_theme_get_default_LIB LIB_GTK
+#define gtk_menu_shell_set_take_focus_LIB LIB_GTK
+#define gtk_window_set_keep_below_LIB LIB_GTK
+#define gtk_tooltip_trigger_tooltip_query_LIB LIB_GTK
+#define gtk_tree_selection_count_selected_rows_LIB LIB_GTK
+#define gtk_tree_selection_get_selected_rows_LIB LIB_GTK
+#define gtk_tree_view_column_cell_get_position_LIB LIB_GTK
+#define gtk_tree_view_set_grid_lines_LIB LIB_GTK
+#define gtk_entry_set_alignment_LIB LIB_GTK
+#define gtk_entry_set_icon_from_stock_LIB LIB_GTK
+#define gtk_entry_set_icon_sensitive_LIB LIB_GTK
+#define gdk_cursor_new_from_pixbuf_LIB LIB_GDK
+#define gdk_display_get_default_LIB LIB_GDK
+#define gdk_display_supports_cursor_color_LIB LIB_GDK
+#define gdk_draw_pixbuf_LIB LIB_GDK
+#define gdk_pixbuf_save_to_bufferv_LIB LIB_GDK
+#define gdk_screen_get_default_LIB LIB_GDK
+#define gdk_screen_get_monitor_at_point_LIB LIB_GDK
+#define gdk_screen_get_monitor_at_window_LIB LIB_GDK
+#define gdk_screen_get_monitor_geometry_LIB LIB_GDK
+#define gdk_screen_get_n_monitors_LIB LIB_GDK
+#define gdk_screen_get_number_LIB LIB_GDK
+#define gtk_status_icon_get_geometry_LIB LIB_GTK
+#define gtk_status_icon_get_visible_LIB LIB_GTK
+#define gtk_status_icon_new_LIB LIB_GTK
+#define gtk_status_icon_set_from_pixbuf_LIB LIB_GTK
+#define gtk_status_icon_set_visible_LIB LIB_GTK
+#define gtk_status_icon_set_tooltip_LIB LIB_GTK
+#define gtk_window_get_group_LIB LIB_GTK
+#define gtk_window_get_opacity_LIB LIB_GTK
+#define gdk_window_restack_LIB LIB_GDK
+#define gdk_window_set_keep_above_LIB LIB_GDK
+#define gdk_window_set_accept_focus_LIB LIB_GDK
+#define gtk_window_set_opacity_LIB LIB_GTK
+#define gtk_window_set_skip_taskbar_hint_LIB LIB_GTK
+#define gtk_widget_is_composited_LIB LIB_GTK
+#define gtk_widget_set_tooltip_text_LIB LIB_GTK
+#define gdk_x11_screen_get_window_manager_name_LIB LIB_GDK
+#define gdk_x11_screen_lookup_visual_LIB LIB_GDK
+
+#define atk_object_add_relationship_LIB LIB_ATK
+#define atk_object_remove_relationship_LIB LIB_ATK
+#define pango_attr_underline_color_new_LIB LIB_PANGO
+#define pango_attr_strikethrough_color_new_LIB LIB_PANGO
+#define pango_font_metrics_get_underline_thickness_LIB LIB_PANGO
+#define pango_font_metrics_get_underline_position_LIB LIB_PANGO
+#define pango_font_metrics_get_strikethrough_thickness_LIB LIB_PANGO
+#define pango_font_metrics_get_strikethrough_position_LIB LIB_PANGO
+#define pango_layout_set_auto_dir_LIB LIB_PANGO
+#define pango_cairo_create_layout_LIB LIB_PANGOCAIRO
+#define pango_cairo_context_set_font_options_LIB LIB_PANGOCAIRO
+#define pango_cairo_context_get_font_options_LIB LIB_PANGOCAIRO
+#define pango_cairo_layout_path_LIB LIB_PANGOCAIRO
+#define pango_cairo_show_layout_LIB LIB_PANGOCAIRO
+#define pango_cairo_font_map_create_context_LIB LIB_PANGOCAIRO
+#define pango_cairo_font_map_new_LIB LIB_PANGOCAIRO
+#define pango_cairo_font_map_get_default_LIB LIB_PANGOCAIRO
+#define pango_cairo_font_map_set_resolution_LIB LIB_PANGOCAIRO
+#define gdk_cairo_set_source_color_LIB LIB_GDK
+#define gdk_cairo_region_LIB LIB_GDK
+#define gdk_cairo_create_LIB LIB_GDK
+#define gtk_enumerate_printers_LIB LIB_GTK
+#define gtk_page_setup_get_bottom_margin_LIB LIB_GTK
+#define gtk_page_setup_get_left_margin_LIB LIB_GTK
+#define gtk_page_setup_get_orientation_LIB LIB_GTK
+#define gtk_page_setup_get_page_height_LIB LIB_GTK
+#define gtk_page_setup_get_page_width_LIB LIB_GTK
+#define gtk_page_setup_get_paper_height_LIB LIB_GTK
+#define gtk_page_setup_get_paper_size_LIB LIB_GTK
+#define gtk_page_setup_get_paper_width_LIB LIB_GTK
+#define gtk_page_setup_get_right_margin_LIB LIB_GTK
+#define gtk_page_setup_get_top_margin_LIB LIB_GTK
+#define gtk_page_setup_new_LIB LIB_GTK
+#define gtk_page_setup_set_bottom_margin_LIB LIB_GTK
+#define gtk_page_setup_set_left_margin_LIB LIB_GTK
+#define gtk_page_setup_set_orientation_LIB LIB_GTK
+#define gtk_page_setup_set_paper_size_LIB LIB_GTK
+#define gtk_page_setup_set_right_margin_LIB LIB_GTK
+#define gtk_page_setup_set_top_margin_LIB LIB_GTK
+#define gtk_paper_size_free_LIB LIB_GTK
+#define gtk_paper_size_get_display_name_LIB LIB_GTK
+#define gtk_paper_size_get_name_LIB LIB_GTK
+#define gtk_paper_size_get_ppd_name_LIB LIB_GTK
+#define gtk_paper_size_get_height_LIB LIB_GTK
+#define gtk_paper_size_get_width_LIB LIB_GTK
+#define gtk_paper_size_is_custom_LIB LIB_GTK
+#define gtk_paper_size_new_LIB LIB_GTK
+#define gtk_paper_size_new_custom_LIB LIB_GTK
+#define gtk_paper_size_new_from_ppd_LIB LIB_GTK
+#define gtk_print_job_get_printer_LIB LIB_GTK
+#define gtk_print_job_get_settings_LIB LIB_GTK
+#define gtk_print_job_get_status_LIB LIB_GTK
+#define gtk_print_job_get_surface_LIB LIB_GTK
+#define gtk_print_job_get_title_LIB LIB_GTK
+#define gtk_print_job_new_LIB LIB_GTK
+#define gtk_print_job_send_LIB LIB_GTK
+#define gtk_print_job_set_source_file_LIB LIB_GTK
+#define gtk_print_settings_foreach_LIB LIB_GTK
+#define gtk_print_settings_get_LIB LIB_GTK
+#define gtk_print_settings_get_collate_LIB LIB_GTK
+#define gtk_print_settings_get_n_copies_LIB LIB_GTK
+#define gtk_print_settings_get_orientation_LIB LIB_GTK
+#define gtk_print_settings_get_page_ranges_LIB LIB_GTK
+#define gtk_print_settings_get_paper_height_LIB LIB_GTK
+#define gtk_print_settings_get_paper_width_LIB LIB_GTK
+#define gtk_print_settings_get_print_pages_LIB LIB_GTK
+#define gtk_print_settings_get_printer_LIB LIB_GTK
+#define gtk_print_settings_get_resolution_LIB LIB_GTK
+#define gtk_print_settings_new_LIB LIB_GTK
+#define gtk_print_settings_set_LIB LIB_GTK
+#define gtk_print_settings_set_collate_LIB LIB_GTK
+#define gtk_print_settings_set_n_copies_LIB LIB_GTK
+#define gtk_print_settings_set_orientation_LIB LIB_GTK
+#define gtk_print_settings_set_page_ranges_LIB LIB_GTK
+#define gtk_print_settings_set_print_pages_LIB LIB_GTK
+#define gtk_print_settings_set_printer_LIB LIB_GTK
+#define gtk_print_unix_dialog_get_current_page_LIB LIB_GTK
+#define gtk_print_unix_dialog_get_page_setup_LIB LIB_GTK
+#define gtk_print_unix_dialog_get_selected_printer_LIB LIB_GTK
+#define gtk_print_unix_dialog_get_settings_LIB LIB_GTK
+#define gtk_print_unix_dialog_new_LIB LIB_GTK
+#define gtk_print_unix_dialog_set_current_page_LIB LIB_GTK
+#define gtk_print_unix_dialog_set_manual_capabilities_LIB LIB_GTK
+#define gtk_print_unix_dialog_set_page_setup_LIB LIB_GTK
+#define gtk_print_unix_dialog_set_settings_LIB LIB_GTK
+#define gtk_printer_get_backend_LIB LIB_GTK
+#define gtk_printer_get_name_LIB LIB_GTK
+#define gtk_printer_is_default_LIB LIB_GTK
+#define FcConfigAppFontAddFile_LIB LIB_FONTCONFIG
 
-#define atk_object_add_relationship_LIB "libatk-1.0.so.0"
-#define pango_attr_underline_color_new_LIB "libpango-1.0.so.0"
-#define pango_attr_strikethrough_color_new_LIB "libpango-1.0.so.0"
-#define pango_font_metrics_get_underline_thickness_LIB "libpango-1.0.so.0"
-#define pango_font_metrics_get_underline_position_LIB "libpango-1.0.so.0"
-#define pango_font_metrics_get_strikethrough_thickness_LIB "libpango-1.0.so.0"
-#define pango_font_metrics_get_strikethrough_position_LIB "libpango-1.0.so.0"
-#define pango_layout_set_auto_dir_LIB "libpango-1.0.so.0"
-#define pango_cairo_create_layout_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_context_set_font_options_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_context_get_font_options_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_layout_path_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_show_layout_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_font_map_create_context_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_font_map_new_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_font_map_get_default_LIB "libpangocairo-1.0.so.0"
-#define pango_cairo_font_map_set_resolution_LIB "libpangocairo-1.0.so.0"
-#define gdk_cairo_set_source_color_LIB "libgdk-x11-2.0.so.0"
-#define gdk_cairo_region_LIB "libgdk-x11-2.0.so.0"
-#define gdk_cairo_create_LIB "libgdk-x11-2.0.so.0"
-#define gtk_enumerate_printers_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_bottom_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_left_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_orientation_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_page_height_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_page_width_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_paper_height_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_paper_size_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_paper_width_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_right_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_get_top_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_bottom_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_left_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_orientation_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_paper_size_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_right_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_page_setup_set_top_margin_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_free_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_get_display_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_get_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_get_ppd_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_get_height_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_get_width_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_is_custom_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_new_custom_LIB "libgtk-x11-2.0.so.0"
-#define gtk_paper_size_new_from_ppd_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_get_printer_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_get_settings_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_get_status_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_get_surface_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_get_title_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_send_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_job_set_source_file_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_foreach_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_collate_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_n_copies_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_orientation_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_page_ranges_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_paper_height_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_paper_width_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_print_pages_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_printer_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_get_resolution_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_collate_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_n_copies_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_orientation_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_page_ranges_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_print_pages_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_settings_set_printer_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_get_current_page_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_get_page_setup_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_get_selected_printer_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_get_settings_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_new_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_set_current_page_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_set_manual_capabilities_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_set_page_setup_LIB "libgtk-x11-2.0.so.0"
-#define gtk_print_unix_dialog_set_settings_LIB "libgtk-x11-2.0.so.0"
-#define gtk_printer_get_backend_LIB "libgtk-x11-2.0.so.0"
-#define gtk_printer_get_name_LIB "libgtk-x11-2.0.so.0"
-#define gtk_printer_is_default_LIB "libgtk-x11-2.0.so.0"
-#define FcConfigAppFontAddFile_LIB "libfontconfig.so.1"
+#define g_app_info_create_from_commandline_LIB LIB_GIO
+#define g_app_info_get_all_LIB LIB_GIO
+#define g_app_info_get_executable_LIB LIB_GIO
+#define g_app_info_get_icon_LIB LIB_GIO
+#define g_app_info_get_id_LIB LIB_GIO
+#define g_app_info_get_name_LIB LIB_GIO
+#define g_app_info_launch_LIB LIB_GIO
+#define g_app_info_get_default_for_type_LIB LIB_GIO
+#define g_app_info_launch_default_for_uri_LIB LIB_GIO
+#define g_app_info_supports_uris_LIB LIB_GIO
+#define g_app_info_should_show_LIB LIB_GIO
+#define g_data_input_stream_new_LIB LIB_GIO
+#define g_data_input_stream_read_line_LIB LIB_GIO
+#define g_content_type_equals_LIB LIB_GIO
+#define g_content_type_get_mime_type_LIB LIB_GIO
+#define g_content_type_is_a_LIB LIB_GIO
+#define g_content_types_get_registered_LIB LIB_GIO
+#define g_desktop_app_info_new_from_filename_LIB LIB_GIO
+#define g_file_get_path_LIB LIB_GIO
+#define g_file_get_uri_LIB LIB_GIO
+#define g_file_icon_get_file_LIB LIB_GIO
+#define g_file_info_get_content_type_LIB LIB_GIO
+#define g_file_info_get_modification_time_LIB LIB_GIO
+#define g_file_new_for_path_LIB LIB_GIO
+#define g_file_new_for_uri_LIB LIB_GIO
+#define g_file_read_LIB LIB_GIO
+#define g_file_test_LIB LIB_GIO
+#define g_icon_to_string_LIB LIB_GIO
+#define g_icon_new_for_string_LIB LIB_GIO
+#define g_file_query_info_LIB LIB_GIO
 
 /* Field accessors */
 #define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor
 #define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1
 #define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) (arg0)->accel_string = arg1
 #define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) (arg0)->accel_string
+#define GTK_RANGE_SLIDER_START(arg0) (arg0)->slider_start
+#define GTK_RANGE_SLIDER_END(arg0) (arg0)->slider_end
+#define GTK_RANGE_HAS_STEPPER_A(arg0) (arg0)->has_stepper_a
+#define GTK_RANGE_HAS_STEPPER_B(arg0) (arg0)->has_stepper_b
+#define GTK_RANGE_HAS_STEPPER_C(arg0) (arg0)->has_stepper_c
+#define GTK_RANGE_HAS_STEPPER_D(arg0) (arg0)->has_stepper_d
 #define GTK_SCROLLED_WINDOW_HSCROLLBAR(arg0) (arg0)->hscrollbar
 #define GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(arg0) (GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing >= 0 ? GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing : 3)		
 #define GTK_SCROLLED_WINDOW_VSCROLLBAR(arg0) (arg0)->vscrollbar
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 27232c7..9e17829 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,8 +18,8 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 1292;
-int OS_nativeFunctionCallCount[1292];
+int OS_nativeFunctionCount = 1370;
+int OS_nativeFunctionCallCount[1370];
 char * OS_nativeFunctionNames[] = {
 #ifndef JNI64
 	"Call__IIII",
@@ -39,6 +39,12 @@ char * OS_nativeFunctionNames[] = {
 	"GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING",
 	"GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING",
 	"GTK_1ENTRY_1IM_1CONTEXT",
+	"GTK_1RANGE_1HAS_1STEPPER_1A",
+	"GTK_1RANGE_1HAS_1STEPPER_1B",
+	"GTK_1RANGE_1HAS_1STEPPER_1C",
+	"GTK_1RANGE_1HAS_1STEPPER_1D",
+	"GTK_1RANGE_1SLIDER_1END",
+	"GTK_1RANGE_1SLIDER_1START",
 	"GTK_1SCROLLED_1WINDOW_1HSCROLLBAR",
 	"GTK_1SCROLLED_1WINDOW_1SCROLLBAR_1SPACING",
 	"GTK_1SCROLLED_1WINDOW_1VSCROLLBAR",
@@ -60,6 +66,12 @@ char * OS_nativeFunctionNames[] = {
 	"GTypeQuery_1sizeof",
 	"G_1OBJECT_1CLASS_1CONSTRUCTOR",
 	"G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR",
+	"G_1TYPE_1BOOLEAN",
+	"G_1TYPE_1DOUBLE",
+	"G_1TYPE_1FLOAT",
+	"G_1TYPE_1INT",
+	"G_1TYPE_1INT64",
+	"G_1VALUE_1TYPE",
 	"GdkColor_1sizeof",
 	"GdkDragContext_1sizeof",
 	"GdkEventAny_1sizeof",
@@ -69,6 +81,7 @@ char * OS_nativeFunctionNames[] = {
 	"GdkEventFocus_1sizeof",
 	"GdkEventKey_1sizeof",
 	"GdkEventMotion_1sizeof",
+	"GdkEventProperty_1sizeof",
 	"GdkEventScroll_1sizeof",
 	"GdkEventVisibility_1sizeof",
 	"GdkEventWindowState_1sizeof",
@@ -107,8 +120,10 @@ char * OS_nativeFunctionNames[] = {
 	"PangoLayoutRun_1sizeof",
 	"PangoLogAttr_1sizeof",
 	"PangoRectangle_1sizeof",
+	"RTLD_1GLOBAL",
+	"RTLD_1LAZY",
+	"RTLD_1NOW",
 	"XAnyEvent_1sizeof",
-	"XButtonEvent_1sizeof",
 	"XClientMessageEvent_1sizeof",
 	"XCrossingEvent_1sizeof",
 	"XEvent_1sizeof",
@@ -126,6 +141,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1GDK_1ROOT_1PARENT",
 	"_1GDK_1TYPE_1COLOR",
 	"_1GDK_1TYPE_1PIXBUF",
+	"_1GString_1len",
+	"_1GString_1str",
 	"_1GTK_1IS_1BUTTON",
 	"_1GTK_1IS_1CELL_1RENDERER_1PIXBUF",
 	"_1GTK_1IS_1CELL_1RENDERER_1TEXT",
@@ -134,6 +151,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1GTK_1IS_1IMAGE_1MENU_1ITEM",
 	"_1GTK_1IS_1MENU_1ITEM",
 	"_1GTK_1IS_1PLUG",
+	"_1GTK_1IS_1SCROLLED_1WINDOW",
 	"_1GTK_1IS_1SOCKET",
 	"_1GTK_1IS_1WINDOW",
 	"_1GTK_1STOCK_1CANCEL",
@@ -158,8 +176,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1G_1OBJECT_1GET_1CLASS",
 	"_1G_1OBJECT_1TYPE",
 	"_1G_1OBJECT_1TYPE_1NAME",
-	"_1G_1TYPE_1BOOLEAN",
-	"_1G_1TYPE_1INT",
 	"_1G_1TYPE_1STRING",
 	"_1PANGO_1PIXELS",
 	"_1PANGO_1TYPE_1FONT_1DESCRIPTION",
@@ -172,6 +188,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1XFlush",
 	"_1XFree",
 	"_1XGetSelectionOwner",
+	"_1XGetWindowProperty",
 	"_1XInternAtom",
 	"_1XKeysymToKeycode",
 	"_1XListProperties",
@@ -191,25 +208,58 @@ char * OS_nativeFunctionNames[] = {
 	"_1XSetErrorHandler",
 	"_1XSetIOErrorHandler",
 	"_1XSetInputFocus",
+	"_1XSetSelectionOwner",
 	"_1XSetTransientForHint",
 	"_1XSynchronize",
 	"_1XTestFakeButtonEvent",
 	"_1XTestFakeKeyEvent",
 	"_1XTestFakeMotionEvent",
 	"_1XWarpPointer",
+	"_1access",
 	"_1atk_1object_1add_1relationship",
+	"_1atk_1object_1remove_1relationship",
 	"_1call",
 	"_1dlclose",
 	"_1dlopen",
 	"_1dlsym",
+	"_1g_1app_1info_1create_1from_1commandline",
+	"_1g_1app_1info_1get_1all",
+	"_1g_1app_1info_1get_1default_1for_1type",
+	"_1g_1app_1info_1get_1executable",
+	"_1g_1app_1info_1get_1icon",
+	"_1g_1app_1info_1get_1id",
+	"_1g_1app_1info_1get_1name",
+	"_1g_1app_1info_1launch",
+	"_1g_1app_1info_1launch_1default_1for_1uri",
+	"_1g_1app_1info_1should_1show",
+	"_1g_1app_1info_1supports_1uris",
 	"_1g_1cclosure_1new",
 	"_1g_1closure_1ref",
 	"_1g_1closure_1unref",
+	"_1g_1content_1type_1equals",
+	"_1g_1content_1type_1get_1mime_1type",
+	"_1g_1content_1type_1is_1a",
+	"_1g_1content_1types_1get_1registered",
+	"_1g_1data_1input_1stream_1new",
+	"_1g_1data_1input_1stream_1read_1line",
+	"_1g_1desktop_1app_1info_1new_1from_1filename",
+	"_1g_1file_1get_1path",
+	"_1g_1file_1get_1uri",
+	"_1g_1file_1icon_1get_1file",
+	"_1g_1file_1info_1get_1content_1type",
+	"_1g_1file_1info_1get_1modification_1time",
+	"_1g_1file_1new_1for_1path",
+	"_1g_1file_1new_1for_1uri",
+	"_1g_1file_1query_1info",
+	"_1g_1file_1read",
+	"_1g_1file_1test",
 	"_1g_1filename_1from_1uri",
 	"_1g_1filename_1from_1utf8",
 	"_1g_1filename_1to_1uri",
 	"_1g_1filename_1to_1utf8",
 	"_1g_1free",
+	"_1g_1icon_1new_1for_1string",
+	"_1g_1icon_1to_1string",
 	"_1g_1idle_1add",
 	"_1g_1list_1append",
 	"_1g_1list_1data",
@@ -270,6 +320,11 @@ char * OS_nativeFunctionNames[] = {
 #else
 	"_1g_1object_1set__J_3BZJ",
 #endif
+#ifndef JNI64
+	"_1g_1object_1set__I_3B_3BI",
+#else
+	"_1g_1object_1set__J_3B_3BJ",
+#endif
 	"_1g_1object_1set_1qdata",
 	"_1g_1object_1unref",
 	"_1g_1quark_1from_1string",
@@ -295,17 +350,24 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1signal_1emit_1by_1name__J_3BJJ",
 #endif
 #ifndef JNI64
+	"_1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2",
+#else
+	"_1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2",
+#endif
+#ifndef JNI64
 	"_1g_1signal_1emit_1by_1name__I_3B_3B",
 #else
 	"_1g_1signal_1emit_1by_1name__J_3B_3B",
 #endif
 	"_1g_1signal_1handler_1disconnect",
+	"_1g_1signal_1handler_1find",
 	"_1g_1signal_1handlers_1block_1matched",
 	"_1g_1signal_1handlers_1disconnect_1matched",
 	"_1g_1signal_1handlers_1unblock_1matched",
 	"_1g_1signal_1lookup",
 	"_1g_1signal_1remove_1emission_1hook",
 	"_1g_1signal_1stop_1emission_1by_1name",
+	"_1g_1slist_1append",
 	"_1g_1slist_1data",
 	"_1g_1slist_1free",
 	"_1g_1slist_1length",
@@ -415,6 +477,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1keymap_1translate_1keyboard_1state",
 	"_1gdk_1keyval_1to_1lower",
 	"_1gdk_1keyval_1to_1unicode",
+	"_1gdk_1pango_1attr_1embossed_1new",
 	"_1gdk_1pango_1context_1get",
 	"_1gdk_1pango_1context_1set_1colormap",
 	"_1gdk_1pango_1layout_1get_1clip_1region",
@@ -497,6 +560,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1window_1lookup",
 	"_1gdk_1window_1lower",
 	"_1gdk_1window_1move",
+	"_1gdk_1window_1move_1resize",
 	"_1gdk_1window_1new",
 	"_1gdk_1window_1process_1all_1updates",
 	"_1gdk_1window_1process_1updates",
@@ -565,6 +629,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1clipboard_1clear",
 	"_1gtk_1clipboard_1get",
 	"_1gtk_1clipboard_1set_1with_1data",
+	"_1gtk_1clipboard_1set_1with_1owner",
 	"_1gtk_1clipboard_1wait_1for_1contents",
 	"_1gtk_1color_1selection_1dialog_1new",
 	"_1gtk_1color_1selection_1get_1current_1color",
@@ -626,6 +691,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1entry_1set_1activates_1default",
 	"_1gtk_1entry_1set_1alignment",
 	"_1gtk_1entry_1set_1has_1frame",
+	"_1gtk_1entry_1set_1icon_1from_1stock",
+	"_1gtk_1entry_1set_1icon_1sensitive",
 	"_1gtk_1entry_1set_1invisible_1char",
 	"_1gtk_1entry_1set_1max_1length",
 	"_1gtk_1entry_1set_1text",
@@ -691,10 +758,14 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1hscrollbar_1new",
 	"_1gtk_1hseparator_1new",
 	"_1gtk_1icon_1factory_1lookup_1default",
+	"_1gtk_1icon_1info_1free",
+	"_1gtk_1icon_1info_1load_1icon",
 	"_1gtk_1icon_1set_1render_1icon",
 	"_1gtk_1icon_1source_1free",
 	"_1gtk_1icon_1source_1new",
 	"_1gtk_1icon_1source_1set_1pixbuf",
+	"_1gtk_1icon_1theme_1get_1default",
+	"_1gtk_1icon_1theme_1lookup_1by_1gicon",
 	"_1gtk_1im_1context_1filter_1keypress",
 	"_1gtk_1im_1context_1focus_1in",
 	"_1gtk_1im_1context_1focus_1out",
@@ -927,6 +998,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1settings_1get_1default",
 	"_1gtk_1socket_1get_1id",
 	"_1gtk_1socket_1new",
+	"_1gtk_1spin_1button_1configure",
 	"_1gtk_1spin_1button_1get_1adjustment",
 	"_1gtk_1spin_1button_1get_1digits",
 	"_1gtk_1spin_1button_1new",
@@ -1198,6 +1270,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1widget_1get_1modifier_1style",
 	"_1gtk_1widget_1get_1pango_1context",
 	"_1gtk_1widget_1get_1parent",
+	"_1gtk_1widget_1get_1parent_1window",
 	"_1gtk_1widget_1get_1size_1request",
 	"_1gtk_1widget_1get_1style",
 	"_1gtk_1widget_1get_1toplevel",
@@ -1263,6 +1336,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1window_1group_1new",
 	"_1gtk_1window_1group_1remove_1window",
 	"_1gtk_1window_1iconify",
+	"_1gtk_1window_1is_1active",
 	"_1gtk_1window_1list_1toplevels",
 	"_1gtk_1window_1maximize",
 	"_1gtk_1window_1move",
@@ -1324,7 +1398,9 @@ char * OS_nativeFunctionNames[] = {
 	"_1pango_1font_1description_1from_1string",
 	"_1pango_1font_1description_1get_1family",
 	"_1pango_1font_1description_1get_1size",
+	"_1pango_1font_1description_1get_1stretch",
 	"_1pango_1font_1description_1get_1style",
+	"_1pango_1font_1description_1get_1variant",
 	"_1pango_1font_1description_1get_1weight",
 	"_1pango_1font_1description_1new",
 	"_1pango_1font_1description_1set_1family",
@@ -1390,6 +1466,16 @@ char * OS_nativeFunctionNames[] = {
 	"_1pango_1tab_1array_1new",
 	"_1pango_1tab_1array_1set_1tab",
 	"g_1main_1context_1wakeup",
+	"g_1value_1get_1double",
+	"g_1value_1get_1float",
+	"g_1value_1get_1int",
+	"g_1value_1get_1int64",
+	"g_1value_1init",
+	"g_1value_1set_1double",
+	"g_1value_1set_1float",
+	"g_1value_1set_1int",
+	"g_1value_1set_1int64",
+	"g_1value_1unset",
 	"localeconv_1decimal_1point",
 #ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I",
@@ -1452,11 +1538,6 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J",
 #endif
 #ifndef JNI64
-	"memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I",
-#else
-	"memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J",
-#endif
-#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I",
 #else
 	"memmove__JLorg_eclipse_swt_internal_gtk_XClientMessageEvent_2J",
@@ -1532,6 +1613,11 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ",
 #endif
 #ifndef JNI64
+	"memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I",
+#else
+	"memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J",
+#endif
+#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2II",
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2JJ",
@@ -1652,11 +1738,6 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ",
 #endif
 #ifndef JNI64
-	"memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II",
-#else
-	"memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ",
-#endif
-#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II",
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ",
@@ -1676,6 +1757,7 @@ char * OS_nativeFunctionNames[] = {
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2JJ",
 #endif
+	"pangoLayoutNewProc_1CALLBACK",
 	"realpath",
 };
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index d9d0f63..6901aa2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -47,6 +47,12 @@ typedef enum {
 	GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC,
 	GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC,
 	GTK_1ENTRY_1IM_1CONTEXT_FUNC,
+	GTK_1RANGE_1HAS_1STEPPER_1A_FUNC,
+	GTK_1RANGE_1HAS_1STEPPER_1B_FUNC,
+	GTK_1RANGE_1HAS_1STEPPER_1C_FUNC,
+	GTK_1RANGE_1HAS_1STEPPER_1D_FUNC,
+	GTK_1RANGE_1SLIDER_1END_FUNC,
+	GTK_1RANGE_1SLIDER_1START_FUNC,
 	GTK_1SCROLLED_1WINDOW_1HSCROLLBAR_FUNC,
 	GTK_1SCROLLED_1WINDOW_1SCROLLBAR_1SPACING_FUNC,
 	GTK_1SCROLLED_1WINDOW_1VSCROLLBAR_FUNC,
@@ -68,6 +74,12 @@ typedef enum {
 	GTypeQuery_1sizeof_FUNC,
 	G_1OBJECT_1CLASS_1CONSTRUCTOR_FUNC,
 	G_1OBJECT_1CLASS_1SET_1CONSTRUCTOR_FUNC,
+	G_1TYPE_1BOOLEAN_FUNC,
+	G_1TYPE_1DOUBLE_FUNC,
+	G_1TYPE_1FLOAT_FUNC,
+	G_1TYPE_1INT_FUNC,
+	G_1TYPE_1INT64_FUNC,
+	G_1VALUE_1TYPE_FUNC,
 	GdkColor_1sizeof_FUNC,
 	GdkDragContext_1sizeof_FUNC,
 	GdkEventAny_1sizeof_FUNC,
@@ -77,6 +89,7 @@ typedef enum {
 	GdkEventFocus_1sizeof_FUNC,
 	GdkEventKey_1sizeof_FUNC,
 	GdkEventMotion_1sizeof_FUNC,
+	GdkEventProperty_1sizeof_FUNC,
 	GdkEventScroll_1sizeof_FUNC,
 	GdkEventVisibility_1sizeof_FUNC,
 	GdkEventWindowState_1sizeof_FUNC,
@@ -115,8 +128,10 @@ typedef enum {
 	PangoLayoutRun_1sizeof_FUNC,
 	PangoLogAttr_1sizeof_FUNC,
 	PangoRectangle_1sizeof_FUNC,
+	RTLD_1GLOBAL_FUNC,
+	RTLD_1LAZY_FUNC,
+	RTLD_1NOW_FUNC,
 	XAnyEvent_1sizeof_FUNC,
-	XButtonEvent_1sizeof_FUNC,
 	XClientMessageEvent_1sizeof_FUNC,
 	XCrossingEvent_1sizeof_FUNC,
 	XEvent_1sizeof_FUNC,
@@ -134,6 +149,8 @@ typedef enum {
 	_1GDK_1ROOT_1PARENT_FUNC,
 	_1GDK_1TYPE_1COLOR_FUNC,
 	_1GDK_1TYPE_1PIXBUF_FUNC,
+	_1GString_1len_FUNC,
+	_1GString_1str_FUNC,
 	_1GTK_1IS_1BUTTON_FUNC,
 	_1GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC,
 	_1GTK_1IS_1CELL_1RENDERER_1TEXT_FUNC,
@@ -142,6 +159,7 @@ typedef enum {
 	_1GTK_1IS_1IMAGE_1MENU_1ITEM_FUNC,
 	_1GTK_1IS_1MENU_1ITEM_FUNC,
 	_1GTK_1IS_1PLUG_FUNC,
+	_1GTK_1IS_1SCROLLED_1WINDOW_FUNC,
 	_1GTK_1IS_1SOCKET_FUNC,
 	_1GTK_1IS_1WINDOW_FUNC,
 	_1GTK_1STOCK_1CANCEL_FUNC,
@@ -166,8 +184,6 @@ typedef enum {
 	_1G_1OBJECT_1GET_1CLASS_FUNC,
 	_1G_1OBJECT_1TYPE_FUNC,
 	_1G_1OBJECT_1TYPE_1NAME_FUNC,
-	_1G_1TYPE_1BOOLEAN_FUNC,
-	_1G_1TYPE_1INT_FUNC,
 	_1G_1TYPE_1STRING_FUNC,
 	_1PANGO_1PIXELS_FUNC,
 	_1PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC,
@@ -180,6 +196,7 @@ typedef enum {
 	_1XFlush_FUNC,
 	_1XFree_FUNC,
 	_1XGetSelectionOwner_FUNC,
+	_1XGetWindowProperty_FUNC,
 	_1XInternAtom_FUNC,
 	_1XKeysymToKeycode_FUNC,
 	_1XListProperties_FUNC,
@@ -199,25 +216,58 @@ typedef enum {
 	_1XSetErrorHandler_FUNC,
 	_1XSetIOErrorHandler_FUNC,
 	_1XSetInputFocus_FUNC,
+	_1XSetSelectionOwner_FUNC,
 	_1XSetTransientForHint_FUNC,
 	_1XSynchronize_FUNC,
 	_1XTestFakeButtonEvent_FUNC,
 	_1XTestFakeKeyEvent_FUNC,
 	_1XTestFakeMotionEvent_FUNC,
 	_1XWarpPointer_FUNC,
+	_1access_FUNC,
 	_1atk_1object_1add_1relationship_FUNC,
+	_1atk_1object_1remove_1relationship_FUNC,
 	_1call_FUNC,
 	_1dlclose_FUNC,
 	_1dlopen_FUNC,
 	_1dlsym_FUNC,
+	_1g_1app_1info_1create_1from_1commandline_FUNC,
+	_1g_1app_1info_1get_1all_FUNC,
+	_1g_1app_1info_1get_1default_1for_1type_FUNC,
+	_1g_1app_1info_1get_1executable_FUNC,
+	_1g_1app_1info_1get_1icon_FUNC,
+	_1g_1app_1info_1get_1id_FUNC,
+	_1g_1app_1info_1get_1name_FUNC,
+	_1g_1app_1info_1launch_FUNC,
+	_1g_1app_1info_1launch_1default_1for_1uri_FUNC,
+	_1g_1app_1info_1should_1show_FUNC,
+	_1g_1app_1info_1supports_1uris_FUNC,
 	_1g_1cclosure_1new_FUNC,
 	_1g_1closure_1ref_FUNC,
 	_1g_1closure_1unref_FUNC,
+	_1g_1content_1type_1equals_FUNC,
+	_1g_1content_1type_1get_1mime_1type_FUNC,
+	_1g_1content_1type_1is_1a_FUNC,
+	_1g_1content_1types_1get_1registered_FUNC,
+	_1g_1data_1input_1stream_1new_FUNC,
+	_1g_1data_1input_1stream_1read_1line_FUNC,
+	_1g_1desktop_1app_1info_1new_1from_1filename_FUNC,
+	_1g_1file_1get_1path_FUNC,
+	_1g_1file_1get_1uri_FUNC,
+	_1g_1file_1icon_1get_1file_FUNC,
+	_1g_1file_1info_1get_1content_1type_FUNC,
+	_1g_1file_1info_1get_1modification_1time_FUNC,
+	_1g_1file_1new_1for_1path_FUNC,
+	_1g_1file_1new_1for_1uri_FUNC,
+	_1g_1file_1query_1info_FUNC,
+	_1g_1file_1read_FUNC,
+	_1g_1file_1test_FUNC,
 	_1g_1filename_1from_1uri_FUNC,
 	_1g_1filename_1from_1utf8_FUNC,
 	_1g_1filename_1to_1uri_FUNC,
 	_1g_1filename_1to_1utf8_FUNC,
 	_1g_1free_FUNC,
+	_1g_1icon_1new_1for_1string_FUNC,
+	_1g_1icon_1to_1string_FUNC,
 	_1g_1idle_1add_FUNC,
 	_1g_1list_1append_FUNC,
 	_1g_1list_1data_FUNC,
@@ -278,6 +328,11 @@ typedef enum {
 #else
 	_1g_1object_1set__J_3BZJ_FUNC,
 #endif
+#ifndef JNI64
+	_1g_1object_1set__I_3B_3BI_FUNC,
+#else
+	_1g_1object_1set__J_3B_3BJ_FUNC,
+#endif
 	_1g_1object_1set_1qdata_FUNC,
 	_1g_1object_1unref_FUNC,
 	_1g_1quark_1from_1string_FUNC,
@@ -303,17 +358,24 @@ typedef enum {
 	_1g_1signal_1emit_1by_1name__J_3BJJ_FUNC,
 #endif
 #ifndef JNI64
+	_1g_1signal_1emit_1by_1name__I_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC,
+#else
+	_1g_1signal_1emit_1by_1name__J_3BLorg_eclipse_swt_internal_gtk_GdkRectangle_2_FUNC,
+#endif
+#ifndef JNI64
 	_1g_1signal_1emit_1by_1name__I_3B_3B_FUNC,
 #else
 	_1g_1signal_1emit_1by_1name__J_3B_3B_FUNC,
 #endif
 	_1g_1signal_1handler_1disconnect_FUNC,
+	_1g_1signal_1handler_1find_FUNC,
 	_1g_1signal_1handlers_1block_1matched_FUNC,
 	_1g_1signal_1handlers_1disconnect_1matched_FUNC,
 	_1g_1signal_1handlers_1unblock_1matched_FUNC,
 	_1g_1signal_1lookup_FUNC,
 	_1g_1signal_1remove_1emission_1hook_FUNC,
 	_1g_1signal_1stop_1emission_1by_1name_FUNC,
+	_1g_1slist_1append_FUNC,
 	_1g_1slist_1data_FUNC,
 	_1g_1slist_1free_FUNC,
 	_1g_1slist_1length_FUNC,
@@ -423,6 +485,7 @@ typedef enum {
 	_1gdk_1keymap_1translate_1keyboard_1state_FUNC,
 	_1gdk_1keyval_1to_1lower_FUNC,
 	_1gdk_1keyval_1to_1unicode_FUNC,
+	_1gdk_1pango_1attr_1embossed_1new_FUNC,
 	_1gdk_1pango_1context_1get_FUNC,
 	_1gdk_1pango_1context_1set_1colormap_FUNC,
 	_1gdk_1pango_1layout_1get_1clip_1region_FUNC,
@@ -505,6 +568,7 @@ typedef enum {
 	_1gdk_1window_1lookup_FUNC,
 	_1gdk_1window_1lower_FUNC,
 	_1gdk_1window_1move_FUNC,
+	_1gdk_1window_1move_1resize_FUNC,
 	_1gdk_1window_1new_FUNC,
 	_1gdk_1window_1process_1all_1updates_FUNC,
 	_1gdk_1window_1process_1updates_FUNC,
@@ -573,6 +637,7 @@ typedef enum {
 	_1gtk_1clipboard_1clear_FUNC,
 	_1gtk_1clipboard_1get_FUNC,
 	_1gtk_1clipboard_1set_1with_1data_FUNC,
+	_1gtk_1clipboard_1set_1with_1owner_FUNC,
 	_1gtk_1clipboard_1wait_1for_1contents_FUNC,
 	_1gtk_1color_1selection_1dialog_1new_FUNC,
 	_1gtk_1color_1selection_1get_1current_1color_FUNC,
@@ -634,6 +699,8 @@ typedef enum {
 	_1gtk_1entry_1set_1activates_1default_FUNC,
 	_1gtk_1entry_1set_1alignment_FUNC,
 	_1gtk_1entry_1set_1has_1frame_FUNC,
+	_1gtk_1entry_1set_1icon_1from_1stock_FUNC,
+	_1gtk_1entry_1set_1icon_1sensitive_FUNC,
 	_1gtk_1entry_1set_1invisible_1char_FUNC,
 	_1gtk_1entry_1set_1max_1length_FUNC,
 	_1gtk_1entry_1set_1text_FUNC,
@@ -699,10 +766,14 @@ typedef enum {
 	_1gtk_1hscrollbar_1new_FUNC,
 	_1gtk_1hseparator_1new_FUNC,
 	_1gtk_1icon_1factory_1lookup_1default_FUNC,
+	_1gtk_1icon_1info_1free_FUNC,
+	_1gtk_1icon_1info_1load_1icon_FUNC,
 	_1gtk_1icon_1set_1render_1icon_FUNC,
 	_1gtk_1icon_1source_1free_FUNC,
 	_1gtk_1icon_1source_1new_FUNC,
 	_1gtk_1icon_1source_1set_1pixbuf_FUNC,
+	_1gtk_1icon_1theme_1get_1default_FUNC,
+	_1gtk_1icon_1theme_1lookup_1by_1gicon_FUNC,
 	_1gtk_1im_1context_1filter_1keypress_FUNC,
 	_1gtk_1im_1context_1focus_1in_FUNC,
 	_1gtk_1im_1context_1focus_1out_FUNC,
@@ -935,6 +1006,7 @@ typedef enum {
 	_1gtk_1settings_1get_1default_FUNC,
 	_1gtk_1socket_1get_1id_FUNC,
 	_1gtk_1socket_1new_FUNC,
+	_1gtk_1spin_1button_1configure_FUNC,
 	_1gtk_1spin_1button_1get_1adjustment_FUNC,
 	_1gtk_1spin_1button_1get_1digits_FUNC,
 	_1gtk_1spin_1button_1new_FUNC,
@@ -1206,6 +1278,7 @@ typedef enum {
 	_1gtk_1widget_1get_1modifier_1style_FUNC,
 	_1gtk_1widget_1get_1pango_1context_FUNC,
 	_1gtk_1widget_1get_1parent_FUNC,
+	_1gtk_1widget_1get_1parent_1window_FUNC,
 	_1gtk_1widget_1get_1size_1request_FUNC,
 	_1gtk_1widget_1get_1style_FUNC,
 	_1gtk_1widget_1get_1toplevel_FUNC,
@@ -1271,6 +1344,7 @@ typedef enum {
 	_1gtk_1window_1group_1new_FUNC,
 	_1gtk_1window_1group_1remove_1window_FUNC,
 	_1gtk_1window_1iconify_FUNC,
+	_1gtk_1window_1is_1active_FUNC,
 	_1gtk_1window_1list_1toplevels_FUNC,
 	_1gtk_1window_1maximize_FUNC,
 	_1gtk_1window_1move_FUNC,
@@ -1332,7 +1406,9 @@ typedef enum {
 	_1pango_1font_1description_1from_1string_FUNC,
 	_1pango_1font_1description_1get_1family_FUNC,
 	_1pango_1font_1description_1get_1size_FUNC,
+	_1pango_1font_1description_1get_1stretch_FUNC,
 	_1pango_1font_1description_1get_1style_FUNC,
+	_1pango_1font_1description_1get_1variant_FUNC,
 	_1pango_1font_1description_1get_1weight_FUNC,
 	_1pango_1font_1description_1new_FUNC,
 	_1pango_1font_1description_1set_1family_FUNC,
@@ -1398,6 +1474,16 @@ typedef enum {
 	_1pango_1tab_1array_1new_FUNC,
 	_1pango_1tab_1array_1set_1tab_FUNC,
 	g_1main_1context_1wakeup_FUNC,
+	g_1value_1get_1double_FUNC,
+	g_1value_1get_1float_FUNC,
+	g_1value_1get_1int_FUNC,
+	g_1value_1get_1int64_FUNC,
+	g_1value_1init_FUNC,
+	g_1value_1set_1double_FUNC,
+	g_1value_1set_1float_FUNC,
+	g_1value_1set_1int_FUNC,
+	g_1value_1set_1int64_FUNC,
+	g_1value_1unset_FUNC,
 	localeconv_1decimal_1point_FUNC,
 #ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_FUNC,
@@ -1460,11 +1546,6 @@ typedef enum {
 	memmove__JLorg_eclipse_swt_internal_gtk_PangoAttribute_2J_FUNC,
 #endif
 #ifndef JNI64
-	memmove__ILorg_eclipse_swt_internal_gtk_XButtonEvent_2I_FUNC,
-#else
-	memmove__JLorg_eclipse_swt_internal_gtk_XButtonEvent_2J_FUNC,
-#endif
-#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_gtk_XClientMessageEvent_2J_FUNC,
@@ -1540,6 +1621,11 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2JJ_FUNC,
 #endif
 #ifndef JNI64
+	memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2I_FUNC,
+#else
+	memmove__Lorg_eclipse_swt_internal_gtk_GdkEventProperty_2J_FUNC,
+#endif
+#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2II_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_GdkEventScroll_2JJ_FUNC,
@@ -1660,11 +1746,6 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC,
 #endif
 #ifndef JNI64
-	memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2II_FUNC,
-#else
-	memmove__Lorg_eclipse_swt_internal_gtk_XButtonEvent_2JJ_FUNC,
-#endif
-#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ_FUNC,
@@ -1684,5 +1765,6 @@ typedef enum {
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2JJ_FUNC,
 #endif
+	pangoLayoutNewProc_1CALLBACK_FUNC,
 	realpath_FUNC,
 } OS_FUNCS;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c
index 5ef3c53..8c72e96 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -711,6 +711,52 @@ void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpSt
 }
 #endif
 
+#ifndef NO_GdkEventProperty
+typedef struct GdkEventProperty_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID window, send_event, atom, time, state;
+} GdkEventProperty_FID_CACHE;
+
+GdkEventProperty_FID_CACHE GdkEventPropertyFc;
+
+void cacheGdkEventPropertyFields(JNIEnv *env, jobject lpObject)
+{
+	if (GdkEventPropertyFc.cached) return;
+	cacheGdkEventFields(env, lpObject);
+	GdkEventPropertyFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	GdkEventPropertyFc.window = (*env)->GetFieldID(env, GdkEventPropertyFc.clazz, "window", I_J);
+	GdkEventPropertyFc.send_event = (*env)->GetFieldID(env, GdkEventPropertyFc.clazz, "send_event", "B");
+	GdkEventPropertyFc.atom = (*env)->GetFieldID(env, GdkEventPropertyFc.clazz, "atom", I_J);
+	GdkEventPropertyFc.time = (*env)->GetFieldID(env, GdkEventPropertyFc.clazz, "time", "I");
+	GdkEventPropertyFc.state = (*env)->GetFieldID(env, GdkEventPropertyFc.clazz, "state", "I");
+	GdkEventPropertyFc.cached = 1;
+}
+
+GdkEventProperty *getGdkEventPropertyFields(JNIEnv *env, jobject lpObject, GdkEventProperty *lpStruct)
+{
+	if (!GdkEventPropertyFc.cached) cacheGdkEventPropertyFields(env, lpObject);
+	getGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+	lpStruct->window = (GdkWindow *)(*env)->GetIntLongField(env, lpObject, GdkEventPropertyFc.window);
+	lpStruct->send_event = (gint8)(*env)->GetByteField(env, lpObject, GdkEventPropertyFc.send_event);
+	lpStruct->atom = (GdkAtom)(*env)->GetIntLongField(env, lpObject, GdkEventPropertyFc.atom);
+	lpStruct->time = (guint32)(*env)->GetIntField(env, lpObject, GdkEventPropertyFc.time);
+	lpStruct->state = (guint)(*env)->GetIntField(env, lpObject, GdkEventPropertyFc.state);
+	return lpStruct;
+}
+
+void setGdkEventPropertyFields(JNIEnv *env, jobject lpObject, GdkEventProperty *lpStruct)
+{
+	if (!GdkEventPropertyFc.cached) cacheGdkEventPropertyFields(env, lpObject);
+	setGdkEventFields(env, lpObject, (GdkEvent *)lpStruct);
+	(*env)->SetIntLongField(env, lpObject, GdkEventPropertyFc.window, (jintLong)lpStruct->window);
+	(*env)->SetByteField(env, lpObject, GdkEventPropertyFc.send_event, (jbyte)lpStruct->send_event);
+	(*env)->SetIntLongField(env, lpObject, GdkEventPropertyFc.atom, (jintLong)lpStruct->atom);
+	(*env)->SetIntField(env, lpObject, GdkEventPropertyFc.time, (jint)lpStruct->time);
+	(*env)->SetIntField(env, lpObject, GdkEventPropertyFc.state, (jint)lpStruct->state);
+}
+#endif
+
 #ifndef NO_GdkEventScroll
 typedef struct GdkEventScroll_FID_CACHE {
 	int cached;
@@ -2371,67 +2417,6 @@ void setXAnyEventFields(JNIEnv *env, jobject lpObject, XAnyEvent *lpStruct)
 }
 #endif
 
-#ifndef NO_XButtonEvent
-typedef struct XButtonEvent_FID_CACHE {
-	int cached;
-	jclass clazz;
-	jfieldID root, subwindow, time, x, y, x_root, y_root, state, button, same_screen;
-} XButtonEvent_FID_CACHE;
-
-XButtonEvent_FID_CACHE XButtonEventFc;
-
-void cacheXButtonEventFields(JNIEnv *env, jobject lpObject)
-{
-	if (XButtonEventFc.cached) return;
-	cacheXAnyEventFields(env, lpObject);
-	XButtonEventFc.clazz = (*env)->GetObjectClass(env, lpObject);
-	XButtonEventFc.root = (*env)->GetFieldID(env, XButtonEventFc.clazz, "root", "I");
-	XButtonEventFc.subwindow = (*env)->GetFieldID(env, XButtonEventFc.clazz, "subwindow", "I");
-	XButtonEventFc.time = (*env)->GetFieldID(env, XButtonEventFc.clazz, "time", "I");
-	XButtonEventFc.x = (*env)->GetFieldID(env, XButtonEventFc.clazz, "x", "I");
-	XButtonEventFc.y = (*env)->GetFieldID(env, XButtonEventFc.clazz, "y", "I");
-	XButtonEventFc.x_root = (*env)->GetFieldID(env, XButtonEventFc.clazz, "x_root", "I");
-	XButtonEventFc.y_root = (*env)->GetFieldID(env, XButtonEventFc.clazz, "y_root", "I");
-	XButtonEventFc.state = (*env)->GetFieldID(env, XButtonEventFc.clazz, "state", "I");
-	XButtonEventFc.button = (*env)->GetFieldID(env, XButtonEventFc.clazz, "button", "I");
-	XButtonEventFc.same_screen = (*env)->GetFieldID(env, XButtonEventFc.clazz, "same_screen", "I");
-	XButtonEventFc.cached = 1;
-}
-
-XButtonEvent *getXButtonEventFields(JNIEnv *env, jobject lpObject, XButtonEvent *lpStruct)
-{
-	if (!XButtonEventFc.cached) cacheXButtonEventFields(env, lpObject);
-	getXAnyEventFields(env, lpObject, (XAnyEvent *)lpStruct);
-	lpStruct->root = (*env)->GetIntField(env, lpObject, XButtonEventFc.root);
-	lpStruct->subwindow = (*env)->GetIntField(env, lpObject, XButtonEventFc.subwindow);
-	lpStruct->time = (*env)->GetIntField(env, lpObject, XButtonEventFc.time);
-	lpStruct->x = (*env)->GetIntField(env, lpObject, XButtonEventFc.x);
-	lpStruct->y = (*env)->GetIntField(env, lpObject, XButtonEventFc.y);
-	lpStruct->x_root = (*env)->GetIntField(env, lpObject, XButtonEventFc.x_root);
-	lpStruct->y_root = (*env)->GetIntField(env, lpObject, XButtonEventFc.y_root);
-	lpStruct->state = (*env)->GetIntField(env, lpObject, XButtonEventFc.state);
-	lpStruct->button = (*env)->GetIntField(env, lpObject, XButtonEventFc.button);
-	lpStruct->same_screen = (*env)->GetIntField(env, lpObject, XButtonEventFc.same_screen);
-	return lpStruct;
-}
-
-void setXButtonEventFields(JNIEnv *env, jobject lpObject, XButtonEvent *lpStruct)
-{
-	if (!XButtonEventFc.cached) cacheXButtonEventFields(env, lpObject);
-	setXAnyEventFields(env, lpObject, (XAnyEvent *)lpStruct);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.root, (jint)lpStruct->root);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.subwindow, (jint)lpStruct->subwindow);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.time, (jint)lpStruct->time);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.x, (jint)lpStruct->x);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.y, (jint)lpStruct->y);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.x_root, (jint)lpStruct->x_root);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.y_root, (jint)lpStruct->y_root);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.state, (jint)lpStruct->state);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.button, (jint)lpStruct->button);
-	(*env)->SetIntField(env, lpObject, XButtonEventFc.same_screen, (jint)lpStruct->same_screen);
-}
-#endif
-
 #ifndef NO_XClientMessageEvent
 typedef struct XClientMessageEvent_FID_CACHE {
 	int cached;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h
index 4c1a302..6435b83 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_structs.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -183,6 +183,18 @@ void setGdkEventMotionFields(JNIEnv *env, jobject lpObject, GdkEventMotion *lpSt
 #define GdkEventMotion_sizeof() 0
 #endif
 
+#ifndef NO_GdkEventProperty
+void cacheGdkEventPropertyFields(JNIEnv *env, jobject lpObject);
+GdkEventProperty *getGdkEventPropertyFields(JNIEnv *env, jobject lpObject, GdkEventProperty *lpStruct);
+void setGdkEventPropertyFields(JNIEnv *env, jobject lpObject, GdkEventProperty *lpStruct);
+#define GdkEventProperty_sizeof() sizeof(GdkEventProperty)
+#else
+#define cacheGdkEventPropertyFields(a,b)
+#define getGdkEventPropertyFields(a,b,c) NULL
+#define setGdkEventPropertyFields(a,b,c)
+#define GdkEventProperty_sizeof() 0
+#endif
+
 #ifndef NO_GdkEventScroll
 void cacheGdkEventScrollFields(JNIEnv *env, jobject lpObject);
 GdkEventScroll *getGdkEventScrollFields(JNIEnv *env, jobject lpObject, GdkEventScroll *lpStruct);
@@ -555,18 +567,6 @@ void setXAnyEventFields(JNIEnv *env, jobject lpObject, XAnyEvent *lpStruct);
 #define XAnyEvent_sizeof() 0
 #endif
 
-#ifndef NO_XButtonEvent
-void cacheXButtonEventFields(JNIEnv *env, jobject lpObject);
-XButtonEvent *getXButtonEventFields(JNIEnv *env, jobject lpObject, XButtonEvent *lpStruct);
-void setXButtonEventFields(JNIEnv *env, jobject lpObject, XButtonEvent *lpStruct);
-#define XButtonEvent_sizeof() sizeof(XButtonEvent)
-#else
-#define cacheXButtonEventFields(a,b)
-#define getXButtonEventFields(a,b,c) NULL
-#define setXButtonEventFields(a,b,c)
-#define XButtonEvent_sizeof() 0
-#endif
-
 #ifndef NO_XClientMessageEvent
 void cacheXClientMessageEventFields(JNIEnv *env, jobject lpObject);
 XClientMessageEvent *getXClientMessageEventFields(JNIEnv *env, jobject lpObject, XClientMessageEvent *lpStruct);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java
index 77201aa..a54a31a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/ATK.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -22,11 +22,32 @@ public class ATK extends OS {
 	static {
 		Library.loadLibrary("swt-atk");
 	}
-	
+
 	/** Constants */
+	public static final int ATK_RELATION_NULL = 0;
+	public static final int ATK_RELATION_CONTROLLED_BY = 1;
+	public static final int ATK_RELATION_CONTROLLER_FOR = 2;
+	public static final int ATK_RELATION_LABEL_FOR = 3;
 	public static final int ATK_RELATION_LABELLED_BY = 4;
+	public static final int ATK_RELATION_MEMBER_OF = 5;
+	public static final int ATK_RELATION_NODE_CHILD_OF = 6;
+	public static final int ATK_RELATION_FLOWS_TO = 7;
+	public static final int ATK_RELATION_FLOWS_FROM = 8;
+	public static final int ATK_RELATION_SUBWINDOW_OF = 9;
+	public static final int ATK_RELATION_EMBEDS = 10;
+	public static final int ATK_RELATION_EMBEDDED_BY = 11;
+	public static final int ATK_RELATION_POPUP_FOR = 12; 
+	public static final int ATK_RELATION_PARENT_WINDOW_OF = 13;
+	public static final int ATK_RELATION_DESCRIBED_BY = 14;
+	public static final int ATK_RELATION_DESCRIPTION_FOR = 15;
+	public static final int ATK_ROLE_ALERT = 2;
+	public static final int ATK_ROLE_ANIMATION = 3;
+	public static final int ATK_ROLE_CALENDAR = 4;
+	public static final int ATK_ROLE_CANVAS = 6;
 	public static final int ATK_ROLE_CHECK_BOX = 7;
+	public static final int ATK_ROLE_CHECK_MENU_ITEM = 8;
 	public static final int ATK_ROLE_COMBO_BOX = 11;
+	public static final int ATK_ROLE_DATE_EDITOR = 12;
 	public static final int ATK_ROLE_DIALOG = 16;
 	public static final int ATK_ROLE_DRAWING_AREA = 18;
 	public static final int ATK_ROLE_WINDOW = 68;
@@ -38,12 +59,16 @@ public class ATK extends OS {
 	public static final int ATK_ROLE_MENU_ITEM = 34;
 	public static final int ATK_ROLE_PAGE_TAB = 36;
 	public static final int ATK_ROLE_PAGE_TAB_LIST = 37;
+	public static final int ATK_ROLE_PANEL = 38;
 	public static final int ATK_ROLE_PROGRESS_BAR = 41;
 	public static final int ATK_ROLE_PUSH_BUTTON = 42;
 	public static final int ATK_ROLE_RADIO_BUTTON = 43;
+	public static final int ATK_ROLE_RADIO_MENU_ITEM = 44;
 	public static final int ATK_ROLE_SCROLL_BAR = 47;
 	public static final int ATK_ROLE_SEPARATOR = 49;
 	public static final int ATK_ROLE_SLIDER = 50;
+	public static final int ATK_ROLE_SPIN_BUTTON = 52;
+	public static final int ATK_ROLE_STATUSBAR = 53;
 	public static final int ATK_ROLE_TABLE = 54;
 	public static final int ATK_ROLE_TABLE_CELL = 55;
 	public static final int ATK_ROLE_TABLE_COLUMN_HEADER = 56;
@@ -52,6 +77,17 @@ public class ATK extends OS {
 	public static final int ATK_ROLE_TOOL_BAR = 62;
 	public static final int ATK_ROLE_TOOL_TIP = 63;
 	public static final int ATK_ROLE_TREE = 64;
+	public static final int ATK_ROLE_HEADER = 69;
+	public static final int ATK_ROLE_FOOTER = 70;
+	public static final int ATK_ROLE_PARAGRAPH = 71;
+	public static final int ATK_ROLE_FORM = 85;
+	public static final int ATK_ROLE_HEADING = 81;
+	public static final int ATK_ROLE_DOCUMENT_FRAME = 80;
+	public static final int ATK_ROLE_IMAGE = 26;
+	public static final int ATK_ROLE_PAGE = 82;
+	public static final int ATK_ROLE_SECTION = 83;
+	public static final int ATK_ROLE_UNKNOWN = 66;
+	public static final int ATK_STATE_ACTIVE = 1;
 	public static final int ATK_STATE_ARMED = 2;
 	public static final int ATK_STATE_BUSY = 3;
 	public static final int ATK_STATE_CHECKED = 4;
@@ -61,13 +97,18 @@ public class ATK extends OS {
 	public static final int ATK_STATE_EXPANDED = 9;
 	public static final int ATK_STATE_FOCUSABLE = 10;
 	public static final int ATK_STATE_FOCUSED = 11;
+	public static final int ATK_STATE_MULTI_LINE = 15;
 	public static final int ATK_STATE_MULTISELECTABLE = 16;
 	public static final int ATK_STATE_PRESSED = 18;
 	public static final int ATK_STATE_RESIZABLE = 19;
 	public static final int ATK_STATE_SELECTABLE = 20;
 	public static final int ATK_STATE_SELECTED = 21;
 	public static final int ATK_STATE_SHOWING = 23;
+	public static final int ATK_STATE_SINGLE_LINE = 24;
 	public static final int ATK_STATE_TRANSIENT = 26;
+	public static final int ATK_STATE_REQUIRED = 32;
+	public static final int ATK_STATE_INVALID_ENTRY = 33;
+	public static final int ATK_STATE_SUPPORTS_AUTOCOMPLETION = 34;
 	public static final int ATK_STATE_VISIBLE = 28;
 	public static final int ATK_TEXT_BOUNDARY_CHAR = 0;
 	public static final int ATK_TEXT_BOUNDARY_WORD_START = 1;
@@ -76,20 +117,105 @@ public class ATK extends OS {
 	public static final int ATK_TEXT_BOUNDARY_SENTENCE_END = 4;
 	public static final int ATK_TEXT_BOUNDARY_LINE_START = 5;
 	public static final int ATK_TEXT_BOUNDARY_LINE_END = 6;
+	public static final int ATK_TEXT_CLIP_NONE = 0;
+	public static final int ATK_TEXT_CLIP_MIN = 1;
+	public static final int ATK_TEXT_CLIP_MAX = 2;
+	public static final int ATK_TEXT_CLIP_BOTH = 3;
+	public static final int ATK_TEXT_ATTR_LEFT_MARGIN = 1;
+	public static final int ATK_TEXT_ATTR_RIGHT_MARGIN = 2;
+	public static final int ATK_TEXT_ATTR_INDENT = 3;
+	public static final int ATK_TEXT_ATTR_INVISIBLE = 4;
+	public static final int ATK_TEXT_ATTR_EDITABLE = 5;
+	public static final int ATK_TEXT_ATTR_PIXELS_ABOVE_LINES = 6;
+	public static final int ATK_TEXT_ATTR_PIXELS_BELOW_LINES = 7;
+	public static final int ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP = 8;
+	public static final int ATK_TEXT_ATTR_BG_FULL_HEIGHT = 9;
+	public static final int ATK_TEXT_ATTR_RISE = 10;
+	public static final int ATK_TEXT_ATTR_UNDERLINE = 11;
+	public static final int ATK_TEXT_ATTR_STRIKETHROUGH = 12;
+	public static final int ATK_TEXT_ATTR_SIZE = 13;
+	public static final int ATK_TEXT_ATTR_SCALE = 14;
+	public static final int ATK_TEXT_ATTR_WEIGHT = 15;
+	public static final int ATK_TEXT_ATTR_LANGUAGE = 16;
+	public static final int ATK_TEXT_ATTR_FAMILY_NAME = 17;
+	public static final int ATK_TEXT_ATTR_BG_COLOR = 18;
+	public static final int ATK_TEXT_ATTR_FG_COLOR = 19;
+	public static final int ATK_TEXT_ATTR_BG_STIPPLE = 20;
+	public static final int ATK_TEXT_ATTR_FG_STIPPLE = 21;
+	public static final int ATK_TEXT_ATTR_WRAP_MODE = 22;
+	public static final int ATK__TEXT_ATTR_DIRECTION = 23;
+	public static final int ATK_TEXT_ATTR_JUSTIFICATION = 24;
+	public static final int ATK_TEXT_ATTR_STRETCH = 25;
+	public static final int ATK_TEXT_ATTR_VARIANT = 26;
+	public static final int ATK_TEXT_ATTR_STYLE = 27;
 	public static final int ATK_XY_WINDOW = 1;
 	
 	/** Signals */
 	public static final byte[] selection_changed = OS.ascii ("selection_changed");
+	public static final byte[] active_descendant_changed = OS.ascii ("active_descendant_changed");
 	public static final byte[] text_changed_insert = OS.ascii ("text_changed::insert");
 	public static final byte[] text_changed_delete = OS.ascii ("text_changed::delete");
 	public static final byte[] text_caret_moved = OS.ascii ("text_caret_moved");
 	public static final byte[] text_selection_changed = OS.ascii ("text_selection_changed");
+	public static final byte[] load_complete = OS.ascii ("load-complete");
+	public static final byte[] load_stopped = OS.ascii ("load-stopped");
+	public static final byte[] reload = OS.ascii ("reload");
+	public static final byte[] state_change = OS.ascii ("state-change");
+	public static final byte[] bounds_changed = OS.ascii ("bounds-changed");
+	public static final byte[] link_activated = OS.ascii ("link-activated");
+	public static final byte[] link_selected = OS.ascii ("link-selected");
+	public static final byte[] attributes_changed = OS.ascii ("attributes-changed");
+	public static final byte[] text_attributes_changed = OS.ascii ("text-attributes-changed");
+	public static final byte[] column_deleted = OS.ascii ("column-deleted");
+	public static final byte[] column_inserted = OS.ascii ("column-inserted");
+	public static final byte[] row_deleted = OS.ascii ("row-deleted");
+	public static final byte[] row_inserted = OS.ascii ("row-inserted");
+	public static final byte[] focus_event = OS.ascii ("focus-event");
+	
+	/** Properties */
+	public static final byte[] accessible_name = OS.ascii ("accessible-name");
+	public static final byte[] accessible_description = OS.ascii ("accessible-description");
+	public static final byte[] accessible_value = OS.ascii ("accessible-value");
+	public static final byte[] end_index = OS.ascii ("end-index");
+	public static final byte[] number_of_anchors = OS.ascii ("number-of-anchors");
+	public static final byte[] selected_link = OS.ascii ("selected-link");
+	public static final byte[] start_index = OS.ascii ("start-index");
+	public static final byte[] accessible_hypertext_nlinks = OS.ascii ("accessible-hypertext-nlinks");
+	public static final byte[] accessible_table_caption_object = OS.ascii ("accessible-table-caption-object");
+	public static final byte[] accessible_table_column_description = OS.ascii ("accessible-table-column-description");
+	public static final byte[] accessible_table_column_header = OS.ascii ("accessible-table-column-header");
+	public static final byte[] accessible_table_row_description = OS.ascii ("accessible-table-row-description");
+	public static final byte[] accessible_table_row_header = OS.ascii ("accessible-table-row-header");
+	public static final byte[] accessible_table_summary = OS.ascii ("accessible-table-summary");
 	
 /** 64 bit */
 public static final native int AtkObjectFactory_sizeof ();
 public static final native int AtkObjectFactoryClass_sizeof ();
+public static final native int AtkAttribute_sizeof ();
+public static final native int AtkTextRange_sizeof ();
+public static final native int AtkTextRectangle_sizeof ();
 	
 /** Natives */
+
+/** @method flags=const */
+public static final native int /*long*/ GTK_TYPE_ACCESSIBLE ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_ACTION ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_COMPONENT ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_HYPERTEXT ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_SELECTION ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_TABLE ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_TEXT ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_VALUE ();
+/** @method flags=const */
+public static final native int /*long*/ ATK_TYPE_OBJECT_FACTORY ();
+public static final native boolean ATK_IS_NO_OP_OBJECT_FACTORY (int /*long*/ obj);
 public static final native int /*long*/ _ATK_ACTION_GET_IFACE (int /*long*/ obj);
 public static final int /*long*/ ATK_ACTION_GET_IFACE (int /*long*/ obj) {
 	lock.lock();
@@ -109,19 +235,29 @@ public static final int /*long*/ ATK_COMPONENT_GET_IFACE(int /*long*/ atkHandle)
 	}
 }
 public static final native int /*long*/ _ATK_OBJECT_FACTORY_CLASS (int /*long*/ klass);
-public static final int /*long*/ ATK_OBJECT_FACTORY_CLASS (int /*long*/ klass) {
+public static final native int /*long*/ _ATK_SELECTION_GET_IFACE (int /*long*/ obj);
+public static final int /*long*/ ATK_SELECTION_GET_IFACE (int /*long*/ obj) {
 	lock.lock();
 	try {
-		return _ATK_OBJECT_FACTORY_CLASS(klass);
+		return _ATK_SELECTION_GET_IFACE(obj);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _ATK_SELECTION_GET_IFACE (int /*long*/ obj);
-public static final int /*long*/ ATK_SELECTION_GET_IFACE (int /*long*/ obj) {
+public static final native int /*long*/ _ATK_HYPERTEXT_GET_IFACE (int /*long*/ handle);
+public static final int /*long*/ ATK_HYPERTEXT_GET_IFACE (int /*long*/ handle) {
 	lock.lock();
 	try {
-		return _ATK_SELECTION_GET_IFACE(obj);
+		return _ATK_HYPERTEXT_GET_IFACE(handle);
+	} finally {
+		lock.unlock();
+	}
+}
+public static final native int /*long*/ _ATK_TABLE_GET_IFACE (int /*long*/ handle);
+public static final int /*long*/ ATK_TABLE_GET_IFACE (int /*long*/ handle) {
+	lock.lock();
+	try {
+		return _ATK_TABLE_GET_IFACE(handle);
 	} finally {
 		lock.unlock();
 	}
@@ -135,6 +271,15 @@ public static final int /*long*/ ATK_TEXT_GET_IFACE (int /*long*/ handle) {
 		lock.unlock();
 	}
 }
+public static final native int /*long*/ _ATK_VALUE_GET_IFACE (int /*long*/ handle);
+public static final int /*long*/ ATK_VALUE_GET_IFACE (int /*long*/ handle) {
+	lock.lock();
+	try {
+		return _ATK_VALUE_GET_IFACE(handle);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _GTK_ACCESSIBLE (int /*long*/ handle);
 public static final int /*long*/ GTK_ACCESSIBLE (int /*long*/ handle) {
 	lock.lock();
@@ -200,6 +345,16 @@ public static final void atk_object_initialize (int /*long*/ accessible, int /*l
 	}
 }
 /** @param accessible cast=(AtkObject *) */
+public static final native void _atk_object_notify_state_change (int /*long*/ accessible, int state, boolean value);
+public static final void atk_object_notify_state_change (int /*long*/ accessible, int state, boolean value) {
+	lock.lock();
+	try {
+		_atk_object_notify_state_change(accessible, state, value);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param accessible cast=(AtkObject *) */
 public static final native int /*long*/ _atk_object_ref_relation_set (int /*long*/ accessible);
 public static final int /*long*/ atk_object_ref_relation_set (int /*long*/ accessible) {
 	lock.lock();
@@ -210,6 +365,30 @@ public static final int /*long*/ atk_object_ref_relation_set (int /*long*/ acces
 	}
 }
 /**
+ * @param name cast=(const gchar *)
+ */
+public static final native int _atk_role_register (byte[] name);
+public static final int atk_role_register (byte[] name) {
+	lock.lock();
+	try {
+		return _atk_role_register(name);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param name cast=(const gchar *)
+ */
+public static final native int _atk_text_attribute_register (byte[] name);
+public static final int atk_text_attribute_register (byte[] name) {
+	lock.lock();
+	try {
+		return _atk_text_attribute_register(name);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param registry cast=(AtkRegistry *)
  * @param type cast=(GType)
  */
@@ -291,6 +470,24 @@ public static final int /*long*/ atk_state_set_new () {
 		lock.unlock();
 	}
 }
+public static final native int /*long*/ _atk_text_attribute_get_name (int attr);
+public static final int /*long*/ atk_text_attribute_get_name (int attr) {
+	lock.lock();
+	try {
+		return _atk_text_attribute_get_name(attr);
+	} finally {
+		lock.unlock();
+	}
+}
+public static final native int /*long*/ _atk_text_attribute_get_value (int attr, int index);
+public static final int /*long*/ atk_text_attribute_get_value (int attr, int index) {
+	lock.lock();
+	try {
+		return _atk_text_attribute_get_value(attr, index);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0);
 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0) {
 	lock.lock();
@@ -345,13 +542,17 @@ public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0,
 		lock.unlock();
 	}
 }
+/** @param str cast=(char *) */
+public static final native int /*long*/ g_strdup (int /*long*/ str);
 public static final native void memmove (AtkActionIface dest, int /*long*/ src);
 public static final native void memmove (AtkComponentIface dest, int /*long*/ src);
 public static final native void memmove (AtkHypertextIface dest, int /*long*/ src);
 public static final native void memmove (AtkObjectClass dest, int /*long*/ src);
 public static final native void memmove (AtkObjectFactoryClass  dest, int /*long*/ src);
 public static final native void memmove (AtkSelectionIface dest, int /*long*/ src);	
+public static final native void memmove (AtkTableIface dest, int /*long*/ src);
 public static final native void memmove (AtkTextIface dest, int /*long*/ src);
+public static final native void memmove (AtkValueIface dest, int /*long*/ src);
 public static final native void memmove (GtkAccessible  dest, int /*long*/ src);
 public static final native void memmove (int /*long*/ dest, AtkActionIface src);
 public static final native void memmove (int /*long*/ dest, AtkComponentIface src);
@@ -359,5 +560,43 @@ public static final native void memmove (int /*long*/ dest, AtkHypertextIface sr
 public static final native void memmove (int /*long*/ dest, AtkObjectClass src);
 public static final native void memmove (int /*long*/ dest, AtkObjectFactoryClass src);
 public static final native void memmove (int /*long*/ dest, AtkSelectionIface src);
+public static final native void memmove (int /*long*/ dest, AtkTableIface src);
 public static final native void memmove (int /*long*/ dest, AtkTextIface src);
+public static final native void memmove (int /*long*/ dest, AtkValueIface src);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (int /*long*/ dest, AtkTextRectangle src, int size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (AtkTextRectangle dest, int /*long*/ src, int size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (int /*long*/ dest, AtkTextRange src, int size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (AtkTextRange dest, int /*long*/ src, int size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (int /*long*/ dest, AtkAttribute src, int size);
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (AtkAttribute dest, int /*long*/ src, int size);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java
new file mode 100644
index 0000000..1615e45
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java	
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.accessibility.gtk;
+
+
+public class AtkAttribute {
+	/** @field cast=(char *) */
+	public int /*long*/ name;
+	/** @field cast=(char *) */
+	public int /*long*/ value;
+	public static final int sizeof = ATK.AtkAttribute_sizeof ();
+}
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java
index fc61911..c631c29 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkObjectClass.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -62,4 +62,6 @@ public class AtkObjectClass {
 	public int /*long*/ state_change;
 	/** @field cast=(void (*)()) */
 	public int /*long*/ visible_data_changed;
+	/** @field accessor=SWT_AtkObjectClass_get_attributes,cast=(SWT_AtkObjectClass_get_attributes_cast) */
+	public int /*long*/ get_attributes;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTableIface.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTableIface.java
new file mode 100644
index 0000000..9cbc506
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTableIface.java	
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.accessibility.gtk;
+
+
+public class AtkTableIface {
+	/** @field cast=(AtkObject* (*)()) */
+	public int /*long*/ ref_at;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_index_at;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_column_at_index;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_row_at_index;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_n_columns;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_n_rows;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_column_extent_at;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_row_extent_at;
+	/** @field cast=(AtkObject* (*)()) */
+	public int /*long*/ get_caption;
+	/** @field cast=(G_CONST_RETURN gchar* (*)()) */
+	public int /*long*/ get_column_description;
+	/** @field cast=(AtkObject* (*)()) */
+	public int /*long*/ get_column_header;
+	/** @field cast=(G_CONST_RETURN gchar* (*)()) */
+	public int /*long*/ get_row_description;
+	/** @field cast=(AtkObject* (*)()) */
+	public int /*long*/ get_row_header;
+	/** @field cast=(AtkObject* (*)()) */
+	public int /*long*/ get_summary;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_caption;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_column_description;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_column_header;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_row_description;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_row_header;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ set_summary;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_selected_columns;
+	/** @field cast=(gint (*)()) */
+	public int /*long*/ get_selected_rows;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ is_column_selected;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ is_row_selected;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ is_selected;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ add_row_selection;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ remove_row_selection;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ add_column_selection;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ remove_column_selection;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ row_inserted;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ column_inserted;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ row_deleted;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ column_deleted;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ row_reordered;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ column_reordered;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ model_changed;
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java
index 5e74aa7..0ab9f65 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -56,4 +56,8 @@ public class AtkTextIface {
 	public int /*long*/ text_caret_moved;
 	/** @field cast=(void (*)()) */
 	public int /*long*/ text_selection_changed;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ get_range_extents;
+	/** @field cast=(AtkTextRange** (*)()) */
+	public int /*long*/ get_bounded_ranges;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java
new file mode 100644
index 0000000..fedd295
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java	
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.accessibility.gtk;
+
+
+public class AtkTextRange {
+	public AtkTextRectangle bounds = new AtkTextRectangle();
+	public int start_offset;
+	public int end_offset;
+	/** @field cast=(gchar *) */
+	public int /*long*/ content;
+	public static final int sizeof = ATK.AtkTextRange_sizeof ();
+
+}
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRectangle.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRectangle.java
new file mode 100644
index 0000000..deb0586
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkTextRectangle.java	
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.accessibility.gtk;
+
+
+public class AtkTextRectangle {
+	public int x;
+	public int y;
+	public int width;
+	public int height;
+	public static final int sizeof = ATK.AtkTextRectangle_sizeof ();
+}
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java
new file mode 100644
index 0000000..26cfe52
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java	
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.accessibility.gtk;
+
+
+public class AtkValueIface {
+	/** @field cast=(void (*)()) */
+	public int /*long*/ get_current_value;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ get_maximum_value;
+	/** @field cast=(void (*)()) */
+	public int /*long*/ get_minimum_value;
+	/** @field cast=(gboolean (*)()) */
+	public int /*long*/ set_current_value;
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java
index c85069f..e813867 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java	
@@ -1,42 +1,42 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html.  If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GdkEventMotion extends GdkEvent {
-	/** @field cast=(GdkWindow *) */
-	public int /*long*/ window;
-	/** @field cast=(gint8) */
-	public byte send_event;
-	/** @field cast=(guint32) */
-	public int time;
-	/** @field cast=(gdouble) */
-	public double x;
-	/** @field cast=(gdouble) */
-	public double y;
-	/** @field cast=(gdouble *) */
-	public int /*long*/ axes;
-	/** @field cast=(guint) */
-	public int state;
-	/** @field cast=(gint16) */
-	public short is_hint;
-	/** @field cast=(GdkDevice *) */
-	public int /*long*/ device;
-	/** @field cast=(gdouble) */
-	public double x_root;
-	/** @field cast=(gdouble) */
-	public double y_root;
-	public static final int sizeof = OS.GdkEventMotion_sizeof();
-}
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk;
+
+
+public class GdkEventMotion extends GdkEvent {
+	/** @field cast=(GdkWindow *) */
+	public int /*long*/ window;
+	/** @field cast=(gint8) */
+	public byte send_event;
+	/** @field cast=(guint32) */
+	public int time;
+	/** @field cast=(gdouble) */
+	public double x;
+	/** @field cast=(gdouble) */
+	public double y;
+	/** @field cast=(gdouble *) */
+	public int /*long*/ axes;
+	/** @field cast=(guint) */
+	public int state;
+	/** @field cast=(gint16) */
+	public short is_hint;
+	/** @field cast=(GdkDevice *) */
+	public int /*long*/ device;
+	/** @field cast=(gdouble) */
+	public double x_root;
+	/** @field cast=(gdouble) */
+	public double y_root;
+	public static final int sizeof = OS.GdkEventMotion_sizeof();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventProperty.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventProperty.java
new file mode 100644
index 0000000..1abcbd6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventProperty.java	
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.gtk;
+
+public class GdkEventProperty extends GdkEvent {
+	/** @field cast=(GdkWindow *) */
+	public int /*long*/ window;
+	/** @field cast=(gint8) */
+	public byte send_event;
+	/** @field cast=(GdkAtom) */
+	public int /*long*/ atom;
+	/** @field cast=(guint32) */
+	public int time;
+	/** @field cast=(guint) */
+	public int state;
+	public static final int sizeof = OS.GdkEventProperty_sizeof();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index 116f16d..41ed3fa 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -38,7 +38,11 @@ public class OS extends C {
 	}
 
 	/** Constants */
+	public static final int /*long*/ AnyPropertyType = 0;
 	public static final int ATK_RELATION_LABELLED_BY = 4;
+	public static final int G_FILE_TEST_IS_DIR = 1 << 2;
+	public static final int G_FILE_TEST_IS_EXECUTABLE = 1 << 3;
+	public static final int G_SIGNAL_MATCH_FUNC = 1 << 3;
 	public static final int G_SIGNAL_MATCH_DATA = 1 << 4;
 	public static final int G_SIGNAL_MATCH_ID = 1 << 0;
 	public static final int GDK_2BUTTON_PRESS = 0x5;
@@ -109,6 +113,11 @@ public class OS extends C {
 	public static final int GDK_F13 = 0xffca;
 	public static final int GDK_F14 = 0xffcb;
 	public static final int GDK_F15 = 0xffcc;
+	public static final int GDK_F16 = 0xffcd;
+	public static final int GDK_F17 = 0xffce;
+	public static final int GDK_F18 = 0xffcf;
+	public static final int GDK_F19 = 0xffd0;
+	public static final int GDK_F20 = 0xffd1;
 	public static final int GDK_F2 = 0xffbf;
 	public static final int GDK_F3 = 0xffc0;
 	public static final int GDK_F4 = 0xffc1;
@@ -195,6 +204,7 @@ public class OS extends C {
 	public static final int GDK_POINTER_MOTION_HINT_MASK = 0x8;
 	public static final int GDK_POINTER_MOTION_MASK = 0x4;
 	public static final int GDK_PROPERTY_NOTIFY = 16;
+	public static final int GDK_PROPERTY_CHANGE_MASK = 1 << 16;
 	public static final int GDK_Page_Down = 0xff56;
 	public static final int GDK_Page_Up = 0xff55;
 	public static final int GDK_Pause = 0xff13;
@@ -260,6 +270,8 @@ public class OS extends C {
 	public static final int GTK_DIALOG_MODAL = 1 << 0;
 	public static final int GTK_DIR_TAB_FORWARD = 0;
 	public static final int GTK_DIR_TAB_BACKWARD = 1;
+	public static final int GTK_ENTRY_ICON_PRIMARY = 0;
+	public static final int GTK_ENTRY_ICON_SECONDARY = 1;
 	public static final int GTK_FILE_CHOOSER_ACTION_OPEN = 0;
 	public static final int GTK_FILE_CHOOSER_ACTION_SAVE = 1;
 	public static final int GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER = 2;
@@ -382,6 +394,9 @@ public class OS extends C {
 	public static final int G_LOG_FLAG_FATAL = 0x2;
 	public static final int G_LOG_FLAG_RECURSION = 0x1;
 	public static final int G_LOG_LEVEL_MASK = 0xfffffffc;
+	public static final int G_APP_INFO_CREATE_NONE = 0;
+	public static final int G_APP_INFO_CREATE_NEEDS_TERMINAL = (1 << 0);
+	public static final int G_APP_INFO_CREATE_SUPPORTS_URIS  = (1 << 1); 
 	public static final int None = 0;
 	public static final int PANGO_ALIGN_LEFT = 0;
 	public static final int PANGO_ALIGN_CENTER = 1;
@@ -407,9 +422,11 @@ public class OS extends C {
 	public static final int PANGO_WEIGHT_NORMAL = 0x190;
 	public static final int PANGO_WRAP_WORD = 0;
 	public static final int PANGO_WRAP_WORD_CHAR = 2;
-	public static final int RTLD_GLOBAL = 0x100;
-	public static final int RTLD_LAZY = 1;
-	public static final int RTLD_NOW = 2;
+	public static final int RTLD_GLOBAL = OS.RTLD_GLOBAL();
+	public static final int RTLD_LAZY = OS.RTLD_LAZY();
+	public static final int RTLD_MEMBER = 0x00040000;
+	public static final int RTLD_NOW = OS.RTLD_NOW();
+	public static final int X_OK = 0x01;
 	public static final int XA_CARDINAL = 6;
 	public static final int XA_WINDOW = 33;
 	
@@ -445,6 +462,7 @@ public class OS extends C {
 	public static final byte[] focus_out_event = ascii("focus-out-event");
 	public static final byte[] grab_focus = ascii("grab-focus");
 	public static final byte[] hide = ascii("hide");
+	public static final byte[] icon_release = ascii("icon-release");
 	public static final byte[] input = ascii("input");
 	public static final byte[] insert_text = ascii("insert-text");
 	public static final byte[] key_press_event = ascii("key-press-event");
@@ -460,6 +478,7 @@ public class OS extends C {
 	public static final byte[] popup_menu = ascii("popup-menu");
 	public static final byte[] populate_popup = ascii("populate-popup");
 	public static final byte[] preedit_changed = ascii("preedit-changed");
+	public static final byte[] property_notify_event = ascii("property-notify-event");
 	public static final byte[] realize = ascii("realize");
 	public static final byte[] row_activated = ascii("row-activated");
 	public static final byte[] row_changed = ascii("row-changed");
@@ -468,10 +487,12 @@ public class OS extends C {
 	public static final byte[] scroll_child = ascii("scroll-child");
 	public static final byte[] scroll_event = ascii("scroll-event");
 	public static final byte[] select = ascii("select");
+	public static final byte[] selection_done = ascii("selection-done");
 	public static final byte[] show = ascii("show");
 	public static final byte[] show_help = ascii("show-help");
 	public static final byte[] size_allocate = ascii("size-allocate");
 	public static final byte[] size_request = ascii("size-request");
+	public static final byte[] start_interactive_search = ascii("start-interactive-search");
 	public static final byte[] style_set = ascii("style-set");
 	public static final byte[] switch_page = ascii("switch-page");
 	public static final byte[] test_collapse_row = ascii("test-collapse-row");
@@ -512,6 +533,9 @@ public class OS extends C {
 	public static final byte[] xalign = ascii("xalign");
 	public static final byte[] ypad = ascii("ypad");
 	public static final byte[] GTK_PRINT_SETTINGS_OUTPUT_URI = ascii("output-uri");
+	public static final byte[] GTK_STOCK_FIND = ascii("gtk-find");
+	public static final byte[] GTK_STOCK_CANCEL = ascii("gtk-cancel");
+	public static final byte[] GTK_STOCK_CLEAR = ascii("gtk-clear");
 	
 	public static final int GTK_VERSION = VERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version()); 
 	
@@ -545,6 +569,7 @@ public static final native int GdkEventExpose_sizeof();
 public static final native int GdkEventFocus_sizeof();
 public static final native int GdkEventKey_sizeof();
 public static final native int GdkEventMotion_sizeof();
+public static final native int GdkEventProperty_sizeof();
 public static final native int GdkEventScroll_sizeof();
 public static final native int GdkEventVisibility_sizeof();
 public static final native int GdkEventWindowState_sizeof();
@@ -583,7 +608,6 @@ public static final native int PangoLayoutRun_sizeof();
 public static final native int PangoLogAttr_sizeof();
 public static final native int PangoRectangle_sizeof();
 public static final native int XAnyEvent_sizeof();
-public static final native int XButtonEvent_sizeof();
 public static final native int XClientMessageEvent_sizeof();
 public static final native int XEvent_sizeof();
 public static final native int XCrossingEvent_sizeof();
@@ -618,6 +642,18 @@ public static final native int /*long*/ GTK_WIDGET_WINDOW(int /*long*/ widget);
 public static final native int GTK_WIDGET_X(int /*long*/ widget);
 /** @param widget cast=(GtkWidget *) */
 public static final native int GTK_WIDGET_Y(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native int GTK_RANGE_SLIDER_START(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native int GTK_RANGE_SLIDER_END(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native boolean GTK_RANGE_HAS_STEPPER_A(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native boolean GTK_RANGE_HAS_STEPPER_B(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native boolean GTK_RANGE_HAS_STEPPER_C(int /*long*/ widget);
+/** @param widget cast=(GtkRange *) */
+public static final native boolean GTK_RANGE_HAS_STEPPER_D(int /*long*/ widget);
 /** @param widget cast=(GtkScrolledWindow *) */
 public static final native int /*long*/ GTK_SCROLLED_WINDOW_HSCROLLBAR(int /*long*/ widget);
 /** @param widget cast=(GtkScrolledWindow *) */
@@ -812,6 +848,21 @@ public static final void XFree(int /*long*/ address) {
 /**
  * @param display cast=(Display *)
  * @param selection cast=(Atom)
+ * @param owner cast=(Window)
+ * @param time cast=(Time)
+ */
+public static final native int /*long*/ _XSetSelectionOwner(int /*long*/ display, int /*long*/ selection, int /*long*/ window, int time);
+public static final int /*long*/ XSetSelectionOwner(int /*long*/ display, int /*long*/ selection, int /*long*/ window, int time) {
+	lock.lock();
+	try {
+		return _XSetSelectionOwner(display, selection, window, time);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param display cast=(Display *)
+ * @param selection cast=(Atom)
  */
 public static final native int /*long*/ _XGetSelectionOwner(int /*long*/ display, int /*long*/ selection);
 public static final int /*long*/ XGetSelectionOwner(int /*long*/ display, int /*long*/ selection) {
@@ -822,6 +873,30 @@ public static final int /*long*/ XGetSelectionOwner(int /*long*/ display, int /*
 		lock.unlock();
 	}
 }
+
+/**
+ * @param display cast=(Display *)
+ * @param window cast=(Window)
+ * @param property cast=(Atom)
+ * @param req_type cast=(Atom)
+ * @param actual_type_return cast=(Atom*)
+ * @param actual_format_return cast=(Atom*)
+ * @param actual_format_return cast=(int *)
+ * @param nitems_return cast=(unsigned long *)
+ * @param bytes_after_return cast=(unsigned long *)
+ * @param prop_return cast=(unsigned char **)
+ */
+public static final native int /*long*/ _XGetWindowProperty(int /*long*/ display, int /*long*/ window, int /*long*/ property, int offset, int length, boolean delete, int /*long*/ req_type, int /*long*/ [] actual_type_return, int [] actual_format_return , int[] nitems_return, int[] bytes_after_return, int /*long*/ [] prop_return);
+public static final int /*long*/ XGetWindowProperty(int /*long*/ display, int /*long*/ window, int /*long*/ property, int offset, int length, boolean delete, int /*long*/ req_type, int /*long*/ [] actual_type_return, int [] actual_format_return, int[] nitems_return, int[] bytes_after_return, int /*long*/ [] prop_return) {
+	lock.lock();
+	try {
+		return _XGetWindowProperty(display, window, property, offset, length, delete, req_type, actual_type_return, actual_format_return , nitems_return, bytes_after_return, prop_return);
+	} finally {
+		lock.unlock();
+	}
+}
+
+
 /**
  * @param display cast=(Display *)
  * @param name cast=(char *)
@@ -1168,12 +1243,6 @@ public static final void gdk_window_remove_filter(int /*long*/ window, int /*lon
  * @param src cast=(const void *),flags=no_out
  * @param size cast=(size_t)
  */
-public static final native void memmove(int /*long*/ dest, XButtonEvent src, int /*long*/ size);
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
 public static final native void memmove(int /*long*/ dest, XClientMessageEvent src, int /*long*/ size);
 /**
  * @param dest cast=(void *)
@@ -1198,12 +1267,6 @@ public static final native void memmove(int /*long*/ dest, XFocusChangeEvent src
  * @param src cast=(const void *)
  * @param size cast=(size_t)
  */
-public static final native void memmove(XButtonEvent dest, int /*long*/ src, int /*long*/ size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
 public static final native void memmove(XCrossingEvent dest, int /*long*/ src, int /*long*/ size);
 /**
  * @param dest cast=(void *),flags=no_in
@@ -1224,6 +1287,13 @@ public static final native void memmove(XFocusChangeEvent dest, int /*long*/ src
  */
 public static final native void memmove(XVisibilityEvent dest, int /*long*/ src, int /*long*/ size);
 
+/** @method flags=const*/
+public static final native int RTLD_GLOBAL();
+/** @method flags=const */
+public static final native int RTLD_NOW();
+/** @method flags=const */
+public static final native int RTLD_LAZY();
+
 /** X render natives and constants */
 public static final int PictStandardARGB32 = 0;
 public static final int PictStandardRGB24 = 1;
@@ -1328,6 +1398,12 @@ public static final int /*long*/ XRenderFindVisualFormat(int /*long*/ display, i
 	}
 }
 
+/** Custom callbacks */
+
+/** @method flags=no_gen */
+public static final native int /*long*/ pangoLayoutNewProc_CALLBACK(int /*long*/ func);
+
+
 /** Natives */
 public static final native int Call (int /*long*/ func, int /*long*/ arg0, int arg1, int arg2);
 public static final native long Call (int /*long*/ func, int /*long*/ arg0, int arg1, long arg2);
@@ -1378,6 +1454,15 @@ public static final boolean GTK_IS_BUTTON(int /*long*/ obj) {
 		lock.unlock();
 	}
 }
+public static final native boolean _GTK_IS_SCROLLED_WINDOW(int /*long*/ obj);
+public static final boolean GTK_IS_SCROLLED_WINDOW(int /*long*/ obj) {
+	lock.lock();
+	try {
+		return _GTK_IS_SCROLLED_WINDOW(obj);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native boolean _GTK_IS_WINDOW(int /*long*/ obj);
 public static final boolean GTK_IS_WINDOW(int /*long*/ obj) {
 	lock.lock();
@@ -1657,25 +1742,16 @@ public static final int /*long*/ G_OBJECT_TYPE_NAME (int /*long*/ object) {
 	}
 }
 /** @method flags=const */
-public static final native int /*long*/ _G_TYPE_BOOLEAN();
-public static final int /*long*/ G_TYPE_BOOLEAN() {
-	lock.lock();
-	try {
-		return _G_TYPE_BOOLEAN();
-	} finally {
-		lock.unlock();
-	}
-}
+public static final native int /*long*/ G_TYPE_BOOLEAN();
 /** @method flags=const */
-public static final native int /*long*/ _G_TYPE_INT();
-public static final int /*long*/ G_TYPE_INT() {
-	lock.lock();
-	try {
-		return _G_TYPE_INT();
-	} finally {
-		lock.unlock();
-	}
-}
+public static final native int /*long*/ G_TYPE_DOUBLE();
+/** @method flags=const */
+public static final native int /*long*/ G_TYPE_FLOAT();
+/** @method flags=const */
+public static final native int /*long*/ G_TYPE_INT();
+/** @method flags=const */
+public static final native int /*long*/ G_TYPE_INT64();
+public static final native int /*long*/ G_VALUE_TYPE(int /*long*/ value);
 public static final native int /*long*/ _G_OBJECT_TYPE (int /*long*/ instance);
 public static final int /*long*/ G_OBJECT_TYPE (int /*long*/ instance) {
 	lock.lock();
@@ -1757,6 +1833,307 @@ public static final int /*long*/ dlsym(int /*long*/ handle, byte[] symbol) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_create_from_commandline(byte[] commandline, byte[] applName, int /*long*/ flags, int /*long*/ error);
+public static final int /*long*/ g_app_info_create_from_commandline(byte[] commandline, byte[] applName, int /*long*/ flags, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_app_info_create_from_commandline(commandline, applName, flags, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_all();
+public static final int /*long*/ g_app_info_get_all() {
+	lock.lock();
+	try {
+		return _g_app_info_get_all();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_executable(int /*long*/ appInfo);
+public static final int /*long*/ g_app_info_get_executable(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_get_executable(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_icon(int /*long*/ appInfo);
+public static final int /*long*/ g_app_info_get_icon(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_get_icon(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_id(int /*long*/ appInfo);
+public static final int /*long*/ g_app_info_get_id(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_get_id(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_name(int /*long*/ appInfo);
+public static final int /*long*/ g_app_info_get_name(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_get_name(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_app_info_launch(int /*long*/ appInfo, int /*long*/ list, int /*long*/ launchContext, int /*long*/ error);
+public static final boolean g_app_info_launch(int /*long*/ appInfo, int /*long*/ list, int /*long*/ launchContext, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_app_info_launch(appInfo, list, launchContext, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs);
+public static final int /*long*/ g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs) {
+	lock.lock();
+	try {
+		return _g_app_info_get_default_for_type(mimeType, mustSupportURIs);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_app_info_launch_default_for_uri(int /*long*/ uri, int /*long*/ launchContext, int /*long*/ error);
+public static final boolean g_app_info_launch_default_for_uri(int /*long*/ appInfo, int /*long*/ launchContext, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_app_info_launch_default_for_uri(appInfo, launchContext, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_app_info_should_show(int /*long*/ appInfo);
+public static final boolean g_app_info_should_show(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_should_show(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_app_info_supports_uris(int /*long*/ appInfo);
+public static final boolean g_app_info_supports_uris(int /*long*/ appInfo) {
+	lock.lock();
+	try {
+		return _g_app_info_supports_uris(appInfo);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_data_input_stream_new(int /*long*/ input_stream);
+public static final int /*long*/ g_data_input_stream_new(int /*long*/ input_stream) {
+	lock.lock();
+	try {
+		return _g_data_input_stream_new(input_stream);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_data_input_stream_read_line(int /*long*/ stream, int[] count, int /*long*/ cancellable, int /*long*/ error);
+public static final int /*long*/ g_data_input_stream_read_line(int /*long*/ stream, int[] count, int /*long*/ cancellable, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_data_input_stream_read_line(stream, count, cancellable, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_content_type_equals(int /*long*/ type1, byte[] type2);
+public static final boolean g_content_type_equals(int /*long*/ type1, byte[] type2) {
+	lock.lock();
+	try {
+		return _g_content_type_equals(type1, type2);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _g_content_type_is_a(int /*long*/ type, byte[] supertype);
+public static final boolean g_content_type_is_a(int /*long*/ type, byte[] supertype) {
+	lock.lock();
+	try {
+		return _g_content_type_is_a(type, supertype);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_content_type_get_mime_type(byte[] mime_type);
+public static final int /*long*/ g_content_type_get_mime_type(byte[] mime_type) {
+	lock.lock();
+	try {
+		return _g_content_type_get_mime_type(mime_type);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_content_types_get_registered();
+public static final int /*long*/ g_content_types_get_registered() {
+	lock.lock();
+	try {
+		return _g_content_types_get_registered();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_desktop_app_info_new_from_filename(byte[] fileName);
+public static final int /*long*/ g_desktop_app_info_new_from_filename(byte[] fileName) {
+	lock.lock();
+	try {
+		return _g_desktop_app_info_new_from_filename(fileName);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_info_get_content_type (int /*long*/ info);
+public static final int /*long*/ g_file_info_get_content_type (int /*long*/ info) {
+	lock.lock();
+	try {
+		return _g_file_info_get_content_type (info);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_get_path(int /*long*/ file);
+public static final int /*long*/ g_file_get_path (int /*long*/ file) {
+	lock.lock();
+	try {
+		return _g_file_get_path(file);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_get_uri(int /*long*/ file);
+public static final int /*long*/ g_file_get_uri (int /*long*/ file) {
+	lock.lock();
+	try {
+		return _g_file_get_uri(file);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _g_file_info_get_modification_time(int /*long*/ info, int /*long*/[] result);
+public static final void g_file_info_get_modification_time(int /*long*/ info, int /*long*/[] result) {
+	lock.lock();
+	try {
+		_g_file_info_get_modification_time(info, result);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_icon_get_file(int /*long*/ icon);
+public static final int /*long*/ g_file_icon_get_file(int /*long*/ icon) {
+	lock.lock();
+	try {
+		return _g_file_icon_get_file(icon);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_new_for_path(byte[] fileName);
+public static final int /*long*/ g_file_new_for_path(byte[] fileName) {
+	lock.lock();
+	try {
+		return _g_file_new_for_path(fileName);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_new_for_uri(byte[] fileName);
+public static final int /*long*/ g_file_new_for_uri(byte[] fileName) {
+	lock.lock();
+	try {
+		return _g_file_new_for_uri(fileName);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_query_info  (int /*long*/ file, byte[] attributes, int /*long*/ flags, int /*long*/ cancellable, int /*long*/ error);
+public static final int /*long*/ g_file_query_info  (int /*long*/ file,byte[] attributes, int /*long*/ flags, int /*long*/ cancellable, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_file_query_info (file, attributes, flags, cancellable, error);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_file_read(int /*long*/ file, int /*long*/ cancellable, int /*long*/ error);
+public static final int /*long*/ g_file_read(int /*long*/ file, int /*long*/ cancellable, int /*long*/ error) {
+	lock.lock();
+	try {
+		return _g_file_read(file, cancellable, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean /*long*/ _g_file_test(byte[] file, int test);
+public static final boolean /*long*/ g_file_test(byte[] file, int test) {
+	lock.lock();
+	try {
+		return _g_file_test(file, test);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_icon_to_string(int /*long*/ icon);
+public static final int /*long*/ g_icon_to_string (int /*long*/ icon) {
+	lock.lock();
+	try {
+		return _g_icon_to_string(icon);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _g_icon_new_for_string(byte[] str, int /*long*/ error[]);
+public static final int /*long*/ g_icon_new_for_string (byte[] str, int /*long*/ error[]) {
+	lock.lock();
+	try {
+		return _g_icon_new_for_string(str, error);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param signal_id cast=(guint)
  * @param detail cast=(GQuark)
@@ -2323,6 +2700,20 @@ public static final void g_object_set(int /*long*/ object, byte[] first_property
 }
 /**
  * @param object cast=(gpointer)
+ * @param first_property_name cast=(const gchar *),flags=no_out
+ * @param terminator cast=(const gchar *),flags=sentinel
+ */
+public static final native void _g_object_set(int /*long*/ object, byte[] first_property_name, byte[] data, int /*long*/ terminator);
+public static final void g_object_set(int /*long*/ object, byte[] first_property_name, byte[] data, int /*long*/ terminator) {
+	lock.lock();
+	try {
+		_g_object_set(object, first_property_name, data, terminator);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param object cast=(gpointer)
  * @param first_property_name cast=(const gchar *)
  * @param terminator cast=(const gchar *),flags=sentinel
  */
@@ -2512,6 +2903,19 @@ public static final void g_signal_emit_by_name(int /*long*/ instance, byte[] det
  * @param instance cast=(gpointer)
  * @param detailed_signal cast=(const gchar *),flags=no_out
  */
+public static final native void _g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal, GdkRectangle data);
+public static final void g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal, GdkRectangle data) {
+	lock.lock();
+	try {
+		_g_signal_emit_by_name(instance, detailed_signal, data);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param instance cast=(gpointer)
+ * @param detailed_signal cast=(const gchar *),flags=no_out
+ */
 public static final native void _g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal, int /*long*/ data1, int /*long*/ data2);
 public static final void g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal, int /*long*/ data1, int /*long*/ data2) {
 	lock.lock();
@@ -2549,6 +2953,22 @@ public static final void g_signal_handler_disconnect(int /*long*/ instance, int
 }
 /**
  * @param instance cast=(gpointer)
+ * @param detail cast=(GQuark)
+ * @param closure cast=(GClosure *)
+ * @param func cast=(gpointer)
+ * @param data cast=(gpointer)
+ */
+public static final native int _g_signal_handler_find(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data);
+public static final int g_signal_handler_find(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data) {
+	lock.lock();
+	try {
+		return _g_signal_handler_find(instance, mask, signal_id, detail, closure, func, data);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param instance cast=(gpointer)
  * @param mask cast=(GSignalMatchType)
  * @param signal_id cast=(guint)
  * @param detail cast=(GQuark)
@@ -2634,6 +3054,19 @@ public static final boolean /*long*/ g_source_remove (int /*long*/ tag) {
 		lock.unlock();
 	}
 }
+/**
+ * @param list cast=(GSList *)
+ * @param data cast=(gpointer)
+ */
+public static final native int /*long*/ _g_slist_append(int /*long*/ list, int /*long*/ data);
+public static final int /*long*/ g_slist_append(int /*long*/ list, int /*long*/ data) {
+	lock.lock();
+	try {
+		return _g_slist_append(list, data);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param list cast=(GSList *) */
 public static final native int /*long*/ _g_slist_data (int /*long*/ list);
 public static final int /*long*/ g_slist_data (int /*long*/ list) {
@@ -2685,6 +3118,32 @@ public static final void g_strfreev(int /*long*/ string_array) {
 	}
 }
 /**
+ * @method flags=getter
+ * @param string cast=(GString *)
+ */
+public static final native int _GString_len(int /*long*/ string);
+public static final int GString_len(int /*long*/ string) {
+	lock.lock();
+	try { 
+		return _GString_len(string);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=getter
+ * @param string cast=(GString *)
+ */
+public static final native int /*long*/ _GString_str(int /*long*/ string);
+public static final int /*long*/ GString_str(int /*long*/ string) {
+	lock.lock();
+	try { 
+		return _GString_str(string);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param str cast=(const gchar *)
  * @param endptr cast=(gchar **)
  */
@@ -2932,6 +3391,29 @@ public static final int /*long*/ g_utf8_to_utf16(int /*long*/ str, int /*long*/
 		lock.unlock();
 	}
 }
+/**
+ * @param value cast=(GValue *)
+ * @param type cast=(GType)
+ */
+public static final native int /*long*/ g_value_init (int /*long*/ value, int /*long*/ type);
+/** @param value cast=(GValue *) */
+public static final native int g_value_get_int (int /*long*/ value);
+/** @param value cast=(GValue *) */
+public static final native void g_value_set_int (int /*long*/ value, int v);
+/** @param value cast=(GValue *) */
+public static final native double g_value_get_double (int /*long*/ value);
+/** @param value cast=(GValue *) */
+public static final native void g_value_set_double (int /*long*/ value, double v);
+/** @param value cast=(GValue *) */
+public static final native float g_value_get_float (int /*long*/ value);
+/** @param value cast=(GValue *) */
+public static final native void g_value_set_float (int /*long*/ value, float v);
+/** @param value cast=(GValue *) */
+public static final native long g_value_get_int64 (int /*long*/ value);
+/** @param value cast=(GValue *) */
+public static final native void g_value_set_int64 (int /*long*/ value, long v);
+/** @param value cast=(GValue *) */
+public static final native void g_value_unset (int /*long*/ value);
 /** @param value cast=(const GValue *) */
 public static final native int /*long*/ _g_value_peek_pointer (int /*long*/ value);
 public static final  int /*long*/ g_value_peek_pointer (int /*long*/ value) {
@@ -3861,6 +4343,15 @@ public static final int gdk_keyval_to_unicode(int keyval) {
 		lock.unlock();
 	}
 }
+public static final native int /*long*/ _gdk_pango_attr_embossed_new(boolean embossed);
+public static final int /*long*/ gdk_pango_attr_embossed_new(boolean embossed) {
+	lock.lock();
+	try {
+		return _gdk_pango_attr_embossed_new(embossed);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _gdk_pango_context_get();
 public static final int /*long*/ gdk_pango_context_get() {
 	lock.lock();
@@ -4822,6 +5313,16 @@ public static final void gdk_window_move(int /*long*/ window, int x, int y) {
 		lock.unlock();
 	}
 }
+/** @param window cast=(GdkWindow *) */
+public static final native void _gdk_window_move_resize(int /*long*/ window, int x, int y, int width, int height);
+public static final void gdk_window_move_resize(int /*long*/ window, int x, int y, int width, int height) {
+	lock.lock();
+	try {
+		_gdk_window_move_resize(window, x, y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param parent cast=(GdkWindow *)
  * @param attributes flags=no_out
@@ -5542,6 +6043,23 @@ public static final boolean gtk_clipboard_set_with_data(int /*long*/ clipboard,
 }
 /**
  * @param clipboard cast=(GtkClipboard *)
+ * @param target cast=(const GtkTargetEntry *)
+ * @param n_targets cast=(guint)
+ * @param get_func cast=(GtkClipboardGetFunc)
+ * @param clear_func cast=(GtkClipboardClearFunc)
+ * @param user_data cast=(GObject *)
+ */
+public static final native boolean _gtk_clipboard_set_with_owner(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data);
+public static final boolean gtk_clipboard_set_with_owner(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data) {
+	lock.lock();
+	try {
+		return _gtk_clipboard_set_with_owner(clipboard, target, n_targets, get_func, clear_func, user_data);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param clipboard cast=(GtkClipboard *)
  * @param target cast=(GdkAtom)
  */
 public static final native int /*long*/ _gtk_clipboard_wait_for_contents(int /*long*/ clipboard, int /*long*/ target);
@@ -6271,6 +6789,26 @@ public static final void gtk_entry_set_has_frame(int /*long*/ entry, boolean set
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native void _gtk_entry_set_icon_from_stock(int /*long*/ entry, int icon, byte[] stock);
+public static final void gtk_entry_set_icon_from_stock(int /*long*/ entry, int icon, byte[] stock) {
+	lock.lock();
+	try {
+		_gtk_entry_set_icon_from_stock(entry, icon, stock);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _gtk_entry_set_icon_sensitive(int /*long*/ entry, int icon_pos, boolean sensitive);
+public static final void gtk_entry_set_icon_sensitive(int /*long*/ entry, int icon_pos, boolean sensitive) {
+	lock.lock();
+	try {
+		_gtk_entry_set_icon_sensitive(entry, icon_pos, sensitive);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param entry cast=(GtkEntry *)
  * @param ch cast=(gint)
@@ -6931,6 +7469,18 @@ public static final int /*long*/ gtk_hseparator_new() {
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_icon_info_free(int /*long*/ icon_info);
+public static final void gtk_icon_info_free(int /*long*/ icon_info) {
+	lock.lock();
+	try {
+		_gtk_icon_info_free(icon_info);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param stock_id cast=(const gchar *) */
 public static final native int /*long*/ _gtk_icon_factory_lookup_default(byte[] stock_id);
 public static final int /*long*/ gtk_icon_factory_lookup_default(byte[] stock_id) {
@@ -6992,6 +7542,42 @@ public static final int /*long*/ gtk_icon_set_render_icon(int /*long*/ icon_set,
 	}
 }
 /**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_icon_theme_get_default();
+public static final int /*long*/ gtk_icon_theme_get_default() {
+	lock.lock();
+	try {
+		return _gtk_icon_theme_get_default ();
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_icon_theme_lookup_by_gicon(int /*long*/ icon_theme, int /*long*/ icon, int size, int flags);
+public static final int /*long*/ gtk_icon_theme_lookup_by_gicon(int /*long*/ icon_theme, int /*long*/ icon, int size, int flags) {
+	lock.lock();
+	try {
+		return _gtk_icon_theme_lookup_by_gicon (icon_theme, icon, size, flags);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_icon_info_load_icon(int /*long*/ icon_info, int /*long*/ error[]);
+public static final int /*long*/ gtk_icon_info_load_icon(int /*long*/ icon_info, int /*long*/ error[]) {
+	lock.lock();
+	try {
+		return _gtk_icon_info_load_icon(icon_info, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param context cast=(GtkIMContext *)
  * @param event cast=(GdkEventKey *)
  */
@@ -9368,6 +9954,19 @@ public static final int /*long*/ gtk_spin_button_new(int /*long*/ adjustment, do
 		lock.unlock();
 	}
 }
+/** 
+ * @param spin_button cast=(GtkSpinButton*)
+ * @param adjustment cast=(GtkAdjustment *) 
+ **/
+public static final native void _gtk_spin_button_configure(int /*long*/ spin_button, int /*long*/ adjustment, double climb_rate, int digits);
+public static final void gtk_spin_button_configure(int /*long*/ spin_button, int /*long*/ adjustment, double climb_rate, int digits) {
+	lock.lock();
+	try {
+		_gtk_spin_button_configure(spin_button, adjustment, climb_rate, digits);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param spin_button cast=(GtkSpinButton*) */
 public static final native int /*long*/ _gtk_spin_button_get_adjustment(int /*long*/ spin_button);
 public static final int /*long*/ gtk_spin_button_get_adjustment(int /*long*/ spin_button) {
@@ -12043,6 +12642,16 @@ public static final int /*long*/ gtk_widget_get_parent(int /*long*/ widget) {
 	}
 }
 /** @param widget cast=(GtkWidget *) */
+public static final native int /*long*/ _gtk_widget_get_parent_window(int /*long*/ widget);
+public static final int /*long*/ gtk_widget_get_parent_window(int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_parent_window(widget);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param widget cast=(GtkWidget *) */
 public static final native int /*long*/ _gtk_widget_get_style(int /*long*/ widget);
 public static final int /*long*/ gtk_widget_get_style(int /*long*/ widget) {
 	lock.lock();
@@ -12685,6 +13294,16 @@ public static final int /*long*/ gtk_window_group_new() {
 	}
 }
 /** @param handle cast=(GtkWindow *) */
+public static final native boolean _gtk_window_is_active(int /*long*/ handle);
+public static final boolean gtk_window_is_active(int /*long*/ handle) {
+	lock.lock();
+	try {
+		return _gtk_window_is_active(handle);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param handle cast=(GtkWindow *) */
 public static final native void _gtk_window_iconify(int /*long*/ handle);
 public static final void gtk_window_iconify(int /*long*/ handle) {
 	lock.lock();
@@ -13065,6 +13684,11 @@ public static final native void memmove(GtkFileSelection dest, int /*long*/ src)
 /**
  * @param dest cast=(void *),flags=no_in
  * @param src cast=(const void *)
+ */
+public static final native void memmove(GdkEventProperty dest, int /*long*/ src);
+/**
+ * @param dest cast=(void *),flags=no_in
+ * @param src cast=(const void *)
  * @param size cast=(size_t)
  */
 public static final native void memmove(GdkDragContext dest, int /*long*/ src, int /*long*/ size);
@@ -13664,6 +14288,26 @@ public static final int pango_font_description_get_size(int /*long*/ desc) {
 	}
 }
 /** @param desc cast=(PangoFontDescription *) */
+public static final native int _pango_font_description_get_stretch(int /*long*/ desc);
+public static final int pango_font_description_get_stretch(int /*long*/ desc) {
+	lock.lock();
+	try {
+		return _pango_font_description_get_stretch(desc);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param desc cast=(PangoFontDescription *) */
+public static final native int _pango_font_description_get_variant(int /*long*/ desc);
+public static final int pango_font_description_get_variant(int /*long*/ desc) {
+	lock.lock();
+	try {
+		return _pango_font_description_get_variant(desc);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param desc cast=(PangoFontDescription *) */
 public static final native int _pango_font_description_get_style(int /*long*/ desc);
 public static final int pango_font_description_get_style(int /*long*/ desc) {
 	lock.lock();
@@ -14404,4 +15048,31 @@ public static final boolean atk_object_add_relationship (int /*long*/ object, in
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param object cast=(AtkObject *)
+ * @param relationship cast=(AtkRelationType)
+ * @param target cast=(AtkObject *)
+ */
+public static final native boolean _atk_object_remove_relationship (int /*long*/ object, int relationship, int /*long*/ target);
+public static final boolean atk_object_remove_relationship (int /*long*/ object, int relationship, int /*long*/ target) {
+	lock.lock();
+	try {
+		return _atk_object_remove_relationship(object, relationship, target);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param path cast=(const char*)
+ */
+public static final native int _access (byte [] path, int amode);
+public static final int access (byte [] path, int amode) {
+	lock.lock();
+	try {
+		return _access(path, amode);
+	} finally {
+		lock.unlock();
+	}
+}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/XButtonEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/XButtonEvent.java
deleted file mode 100644
index 97edb2d..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/XButtonEvent.java	
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
- 
-public class XButtonEvent extends XAnyEvent {
-	public int root;
-	public int subwindow;
-	public int time;
-	public int x;
-	public int y;
-	public int x_root;
-	public int y_root;
-	public int state;
-	public int button;
-	public int same_screen;
-	public static final int sizeof = OS.XButtonEvent_sizeof();
-}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.sh b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.sh
index b933b27..5910583 100755
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.sh	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.sh	
@@ -138,4 +138,4 @@ esac
 
 export JAVA_HOME MOTIF_HOME CDE_HOME MOZILLA_SDK MOZILLA_INCLUDES MOZILLA_LIBS XULRUNNER_SDK XULRUNNER_INCLUDES XULRUNNER_LIBS OUTPUT_DIR
 
-make -f $makefile $1 $2 $3 $4
+make -f $makefile $1 $2 $3 $4 $5 $6 $7 $8 $9
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.xml
deleted file mode 100644
index feb1f7b..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/build.xml	
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_motif_lib" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-	
-<target name="build_motif_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.motif.aix.ppc" depth="infinite" />		
-	<eclipse.refreshLocal resource="org.eclipse.swt.motif.hpux.PA_RISC" depth="infinite" />		
-	<eclipse.refreshLocal resource="org.eclipse.swt.motif.linux.x86" depth="infinite" />		
-	<eclipse.refreshLocal resource="org.eclipse.swt.motif.solaris.sparc" depth="infinite" />		
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="clean"/>
-	</exec>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_aix.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_aix.mak
index ca5d7a2..888bcc9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_aix.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_aix.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_hpux_ia64_32.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_hpux_ia64_32.mak
index 3de935a..57a50f8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_hpux_ia64_32.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_hpux_ia64_32.mak	
@@ -39,7 +39,7 @@ CDE_LIBS = -G -L$(CDE_HOME)/lib -L$(CDE_HOME)/lib/hpux32 -lDtSvc
 AWT_PREFIX = swt-awt
 AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 AWT_OBJS = swt_awt.o
-AWT_LIBS = -G  -L/usr/lib -lX11 -lc -L$(AWT_HOME) -ljawt 
+AWT_LIBS = -G  -L/usr/lib -lX11 -lc -L$(AWT_HOME) -L$(AWT_HOME)/server -ljawt 
 # Uncomment for Native Stats tool
 #NATIVE_STATS = -DNATIVE_STATS
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_linux.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_linux.mak
index 9fc1e5d..c7998ba 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_linux.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/make_linux.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -149,7 +149,7 @@ gtk.o: gtk.c
 make_cairo: $(CAIRO_LIB)
 
 $(CAIRO_LIB): $(CAIRO_OBJECTS)
-	$(LD) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS)
+	$(LD) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) 
 
 cairo.o: cairo.c cairo.h swt.h
 	$(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c
@@ -215,7 +215,7 @@ xpcominit_stats.o: xpcominit_stats.cpp
 make_glx: $(GLX_LIB)
 
 $(GLX_LIB): $(GLX_OBJECTS)
-	$(LD) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS)
+	$(LD) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS)
 
 glx.o: glx.c 
 	$(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c
index 8e5d93c..9a68414 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -5474,6 +5474,22 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1_1XtDefaultAppContext)
 }
 #endif
 
+#ifndef NO__1access
+JNIEXPORT jint JNICALL OS_NATIVE(_1access)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1)
+{
+	jbyte *lparg0=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1access_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jint)access((const char*)lparg0, arg1);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1access_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1applicationShellWidgetClass
 JNIEXPORT jint JNICALL OS_NATIVE(_1applicationShellWidgetClass)
 	(JNIEnv *env, jclass that)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.c
index f7022dd..543cf42 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,8 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 466;
-int OS_nativeFunctionCallCount[466];
+int OS_nativeFunctionCount = 467;
+int OS_nativeFunctionCallCount[467];
 char * OS_nativeFunctionNames[] = {
 	"CODESET",
 	"FD_1ISSET",
@@ -423,6 +423,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1XtWindowToWidget",
 	"_1_1XmSetMenuTraversal",
 	"_1_1XtDefaultAppContext",
+	"_1access",
 	"_1applicationShellWidgetClass",
 	"_1dlclose",
 	"_1dlopen",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.h
index 251ed94..2359a17 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -431,6 +431,7 @@ typedef enum {
 	_1XtWindowToWidget_FUNC,
 	_1_1XmSetMenuTraversal_FUNC,
 	_1_1XtDefaultAppContext_FUNC,
+	_1access_FUNC,
 	_1applicationShellWidgetClass_FUNC,
 	_1dlclose_FUNC,
 	_1dlopen_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java
index 612586b..5a01b8d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -181,6 +181,7 @@ public class OS extends C {
 	public static final int SunXK_F37 = 0x1005FF11;
 	public static final int UnmapNotify = 18;
 	public static final int Unsorted = 0x0;
+	public static final int X_OK = 0x01;
 	public static final int XA_ATOM = 4;
 	public static final int XA_FONT = 18;
 	public static final int XBufferOverflow = 0xFFFFFFFF;
@@ -242,6 +243,11 @@ public class OS extends C {
 	public static final int XK_F13 = 0xFFCA;
 	public static final int XK_F14 = 0xFFCB;
 	public static final int XK_F15 = 0xFFCC;
+	public static final int XK_F16 = 0xFFCD;
+	public static final int XK_F17 = 0xFFCE;
+	public static final int XK_F18 = 0xFFCF;
+	public static final int XK_F19 = 0xFFD0;
+	public static final int XK_F20 = 0xFFD1;
 	public static final int XK_F2 = 0xFFBF;
 	public static final int XK_F3 = 0xFFC0;
 	public static final int XK_F4 = 0xFFC1;
@@ -485,6 +491,8 @@ public class OS extends C {
 	public static final int XmNlistMarginWidth = malloc ("listMarginWidth", 2);
 	public static final int XmNlistSizePolicy = malloc ("listSizePolicy", 1);
 	public static final int XmNlistSpacing = malloc ("listSpacing", 2);
+	public static final int XmNmainWindowMarginWidth  = malloc ("mainWindowMarginWidth", 2);
+	public static final int XmNmainWindowMarginHeight  = malloc ("mainWindowMarginHeight", 2);
 	public static final int XmNmapCallback = malloc ("mapCallback", 4);
 	public static final int XmNmappedWhenManaged = malloc ("mappedWhenManaged", 4);
 	public static final int XmNmarginBottom = malloc ("marginBottom", 2);
@@ -820,6 +828,18 @@ public static final native void FD_ZERO(byte[] fd_set);
 public static final native int LC_CTYPE();
 /** @method flags=const */
 public static final native int MB_CUR_MAX();
+/**
+ * @param path cast=(const char*)
+ */
+public static final native int _access (byte [] path, int amode);
+public static final int access (byte [] path, int amode) {
+	lock.lock();
+	try {
+		return _access(path, amode);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @method flags=const */
 public static final native int _applicationShellWidgetClass();
 public static final int applicationShellWidgetClass() {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/photon/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/photon/library/build.xml
deleted file mode 100644
index d6e1cc4..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/photon/library/build.xml	
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_photon_lib" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />	
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-
-<target name="build_photon_lib" depends="init">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.photon.qnx.x86" depth="infinite" />
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="sh">
-		<arg line="${basedir}/bin/library/build.sh"/>
-		<arg line="clean"/>
-	</exec>
-</target>
-
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build-ce.bat b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build-ce.bat
index c4cc251..e304bf6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build-ce.bat	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build-ce.bat	
@@ -66,4 +66,5 @@ GOTO MAKE
 
 :MAKE
 Title Environment %OSVERSION% %PLATFORM%
+echo Environment %OSVERSION% %PLATFORM%
 nmake -f make_wince.mak %1 %2 %3 %4
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat
index 7485d6d..130bcbc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.bat	
@@ -1,39 +1,43 @@
- at echo off
-rem *******************************************************************************
-rem  Copyright (c) 2000, 2009 IBM Corporation and others.
-rem  All rights reserved. This program and the accompanying materials
-rem  are made available under the terms of the Eclipse Public License v1.0
-rem  which accompanies this distribution, and is available at
-rem  http://www.eclipse.org/legal/epl-v10.html
-rem 
-rem  Contributors:
-rem      IBM Corporation - initial API and implementation
-rem *******************************************************************************
+ at rem ***************************************************************************
+ at rem Copyright (c) 2000, 2010 IBM Corporation and others.
+ at rem All rights reserved. This program and the accompanying materials
+ at rem are made available under the terms of the Eclipse Public License v1.0
+ at rem which accompanies this distribution, and is available at
+ at rem http://www.eclipse.org/legal/epl-v10.html
+ at rem
+ at rem Contributors:
+ at rem      IBM Corporation - initial API and implementation
+ at rem ***************************************************************************
 
 @echo off
 
 IF x.%SWT_BUILDDIR%==x. set SWT_BUILDDIR=S:\swt-builddir
+IF x.%MSSDK%==x. set MSSDK="%SWT_BUILDDIR%\MSSDKs\Windows Server 2003 SP1 SDK"
 
 IF x.%1==x.x86 GOTO X86
 IF x.%1==x.x86_64 GOTO X86_64
 IF x.%1==x.ia64 GOTO IA64
 
 :X86
+IF x.%OUTPUT_DIR%==x. set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86
+IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-java2-sdk-50-win-i386
+IF x.%BUILD_XULRUNNER%==x.true GOTO XULRUNNER
+call "%SWT_BUILDDIR%\MSVCs\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
+call %MSSDK%\setenv /XP32 /RETAIL
+IF x.%1==x.x86 shift
+GOTO MAKE
 
+:XULRUNNER
 IF x.%DEV_TOOLS%==x. set DEV_TOOLS=S:\swt-builddir
-call %DEV_TOOLS%\MSVCs\msvc60\vc98\bin\vcvars32.bat
-IF x.%MSSDK%==x. set MSSDK=%DEV_TOOLS%\MSSDKs\feb2003
+set MSSDK="%SWT_BUILDDIR%\MSSDKs\feb2003"
+call %SWT_BUILDDIR%\MSVCs\msvc60\vc98\bin\vcvars32.bat
 call %MSSDK%\setenv /XP32 /RETAIL
-IF x.%OUTPUT_DIR%==x. set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86
-IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-jdk1.4.1
 IF x.%XULRUNNER_SDK%==x. set XULRUNNER_SDK=%SWT_BUILDDIR%\gecko-sdk
-set XULRUNNER_MAKE=make_xulrunner
 IF x.%1==x.x86 shift
 GOTO MAKE
 
 :X86_64
 
-IF x.%MSSDK%==x. set MSSDK="%SWT_BUILDDIR%\MSSDKs\Microsoft Platform SDK for Windows Server 2003 R2"
 call %MSSDK%\setenv /X64 /RETAIL
 IF x.%OUTPUT_DIR%==x. set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86_64
 IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-sdk50-x86_64
@@ -43,7 +47,6 @@ GOTO MAKE
 
 :IA64
 
-IF x.%MSSDK%==x. set MSSDK="%SWT_BUILDDIR%\MSSDKs\Microsoft Platform SDK for Windows Server 2003 R2"
 call %MSSDK%\setenv /SRV64 /RETAIL
 IF x.%OUTPUT_DIR%==x. set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.ia64
 IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-sdk142-ia64
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.xml
deleted file mode 100644
index a8db785..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/build.xml	
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_dll" basedir="../../..">
-
-<target name="init">
-	<antcall target="refresh"/>
-</target>
-	
-<target name="refresh">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />	
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-
-<!-- 64 bit tasks -->
-<target name="build.cfiles" depends="refresh">
-	<java
-		fork="true"
-		dir="../org.eclipse.swt.tools"
-		classname="org.eclipse.swt.tools.internal.JNIGeneratorApp"
-		classpath="./bin:../org.eclipse.swt.tools/bin">
-		<arg value="all"/>
-	</java>
-	<antcall target="refresh"/>
-</target>
-	
-<!-- Convert SWT 32 bit java and C source to 64 bit  -->
-<target name="replace.32.to.64" depends="refresh">
-	<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-	<replace dir="." includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
-	<antcall target="build.cfiles"/>
-</target>
-	
-<!-- Convert SWT 64 bit java and C source to 32 bit  -->
-<target name="replace.64.to.32" depends="refresh">
-	<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-	<replace dir="." includes="**/*.java" token="long /*int*/" value="int /*long*/"/>
-	<antcall target="build.cfiles"/>
-</target>
-	
-<!-- Build swt.dll for x86 -->
-<target name="build_win32_dll" depends="init">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.win32.win32.x86" depth="infinite" />
-</target>
-
-<!-- Build swt.dll for x86_64 -->
-<target name="build_win32_x86_64_dll" depends="init">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="x86_64"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.win32.win32.x86_64" depth="infinite" />
-</target>
-
-<!-- Build swt.dll for ia64 -->
-<target name="build_win32_ia64_dll" depends="init">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="ia64"/>
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.win32.win32.ia64" depth="infinite" />
-</target>
-
-<!-- Build swt.dll for Pocket PC -->
-<target name="build_wince_dll" depends="init">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build-ce.bat">
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.win32.wce_ppc.arm" depth="infinite" />
-</target>
-
-<!-- Build Windows and Pocket PC swt dlls -->
-<!-- Output .dlls for these platforms into the fragment directory -->
-<target name="build_dll">
-	<antcall target="clean"/>
-	<antcall target="build_win32_dll"/>
-	<antcall target="clean"/>
-	<antcall target="build_wince_dll"/>
-	<antcall target="clean"/>
-	<antcall target="build_win32_x86_64_dll"/>
-	<antcall target="clean"/>
-	<antcall target="build_win32_ia64_dll"/>
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="clean"/>
-	</exec>
-</target>
-    
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c
index 9166e9e..b4f0e9b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,30 @@
 
 #define COM_NATIVE(func) Java_org_eclipse_swt_internal_ole_win32_COM_##func
 
+#ifndef NO_AccessibleChildren
+JNIEXPORT jint JNICALL COM_NATIVE(AccessibleChildren)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintLong arg3, jintArray arg4)
+{
+	jint *lparg4=NULL;
+	jint rc = 0;
+	COM_NATIVE_ENTER(env, that, AccessibleChildren_FUNC);
+	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+/*
+	rc = (jint)AccessibleChildren((IAccessible *)arg0, (LONG)arg1, (LONG)arg2, (VARIANT *)arg3, (LONG *)lparg4);
+*/
+	{
+		LOAD_FUNCTION(fp, AccessibleChildren)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(IAccessible *, LONG, LONG, VARIANT *, LONG *))fp)((IAccessible *)arg0, (LONG)arg1, (LONG)arg2, (VARIANT *)arg3, (LONG *)lparg4);
+		}
+	}
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+	COM_NATIVE_EXIT(env, that, AccessibleChildren_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_AccessibleObjectFromWindow
 JNIEXPORT jint JNICALL COM_NATIVE(AccessibleObjectFromWindow)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jintLongArray arg3)
@@ -182,28 +206,6 @@ JNIEXPORT jint JNICALL COM_NATIVE(CoLockObjectExternal)
 }
 #endif
 
-#ifndef NO_CoTaskMemAlloc
-JNIEXPORT jintLong JNICALL COM_NATIVE(CoTaskMemAlloc)
-	(JNIEnv *env, jclass that, jint arg0)
-{
-	jintLong rc = 0;
-	COM_NATIVE_ENTER(env, that, CoTaskMemAlloc_FUNC);
-	rc = (jintLong)CoTaskMemAlloc((ULONG)arg0);
-	COM_NATIVE_EXIT(env, that, CoTaskMemAlloc_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO_CoTaskMemFree
-JNIEXPORT void JNICALL COM_NATIVE(CoTaskMemFree)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	COM_NATIVE_ENTER(env, that, CoTaskMemFree_FUNC);
-	CoTaskMemFree((LPVOID)arg0);
-	COM_NATIVE_EXIT(env, that, CoTaskMemFree_FUNC);
-}
-#endif
-
 #ifndef NO_CreateStdAccessibleObject
 JNIEXPORT jint JNICALL COM_NATIVE(CreateStdAccessibleObject)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2, jintLongArray arg3)
@@ -1335,52 +1337,6 @@ JNIEXPORT void JNICALL COM_NATIVE(VariantInit)
 }
 #endif
 
-#if (!defined(NO_VtblCall__IIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
-#endif
-{
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__IIII_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJII_FUNC);
-#endif
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__IIII_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJII_FUNC);
-#endif
-	return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__IIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
-#endif
-{
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__IIIII_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJIII_FUNC);
-#endif
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__IIIII_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJIII_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__IIIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIIII) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5)
@@ -2097,33 +2053,6 @@ JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJIZ)(JNIEnv *env, jclass that, jint
 }
 #endif
 
-#if (!defined(NO_VtblCall__III_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3I) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
-#endif
-{
-	jint *lparg3=NULL;
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__III_3I_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJI_3I_FUNC);
-#endif
-	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
-fail:
-	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__III_3I_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJI_3I_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__III_3II_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3II_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3II_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4, jintArray arg5)
@@ -2190,33 +2119,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_VtblCall__III_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
-#endif
-{
-	jlong *lparg3=NULL;
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__III_3J_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJI_3J_FUNC);
-#endif
-	if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
-fail:
-	if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__III_3J_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJI_3J_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__III_3JI_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3JI_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__III_3JI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4, jintArray arg5)
@@ -2283,29 +2185,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_VtblCall__IIJI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
-#endif
-{
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__IIJI_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJJI_FUNC);
-#endif
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__IIJI_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJJI_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__IIJI_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jintArray arg4)
@@ -2360,29 +2239,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_VtblCall__IIJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3)
-#endif
-{
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__IIJJ_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJJJ_FUNC);
-#endif
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__IIJJ_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJJJ_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jobject arg4, jlong arg5, jlongArray arg6)
@@ -3314,60 +3170,6 @@ JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJZ)(JNIEnv *env, jclass that, jint
 }
 #endif
 
-#if (!defined(NO_VtblCall__II_3C) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3C) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
-#endif
-{
-	jchar *lparg2=NULL;
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__II_3C_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJ_3C_FUNC);
-#endif
-	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
-fail:
-	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__II_3C_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJ_3C_FUNC);
-#endif
-	return rc;
-}
-#endif
-
-#if (!defined(NO_VtblCall__II_3CI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CI) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
-#endif
-{
-	jchar *lparg2=NULL;
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__II_3CI_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CI_FUNC);
-#endif
-	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
-	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__II_3CI_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CI_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__II_3CIIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CIIII_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintArray arg7)
@@ -3458,33 +3260,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_VtblCall__II_3CJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
-#else
-JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJ_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
-#endif
-{
-	jchar *lparg2=NULL;
-	jint rc = 0;
-#ifndef JNI64
-	COM_NATIVE_ENTER(env, that, VtblCall__II_3CJ_FUNC);
-#else
-	COM_NATIVE_ENTER(env, that, VtblCall__IJ_3CJ_FUNC);
-#endif
-	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
-fail:
-	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
-#ifndef JNI64
-	COM_NATIVE_EXIT(env, that, VtblCall__II_3CJ_FUNC);
-#else
-	COM_NATIVE_EXIT(env, that, VtblCall__IJ_3CJ_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO_VtblCall__II_3CJIII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJIII_3J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__II_3CJIII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3, jint arg4, jint arg5, jint arg6, jlongArray arg7)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c
index 59e8228..6abe595 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -239,6 +239,19 @@ JNIEXPORT jintLong JNICALL COM_NATIVE(put_1accValue_1CALLBACK)
 }
 #endif
 
+#ifndef NO_CALLBACK_1setCurrentValue
+static jintLong CALLBACK_setCurrentValue;
+static HRESULT CALLBACK setCurrentValue(void* ppVTable, VARIANT arg0) {
+	return ((HRESULT (CALLBACK *)(void*, VARIANT*))CALLBACK_setCurrentValue)(ppVTable, &arg0);
+}
+JNIEXPORT jintLong JNICALL COM_NATIVE(CALLBACK_1setCurrentValue)
+	(JNIEnv *env, jclass that, jintLong func)
+{
+	CALLBACK_setCurrentValue = func;
+	return (jintLong)setCurrentValue;
+}
+#endif
+
 #ifndef NO_VtblCall_1PPPPVARIANT
 JNIEXPORT jint JNICALL COM_NATIVE(VtblCall_1PPPPVARIANT)
 	(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h
index 386e4dc..ea9a100 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_custom.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@
 #define TYPEDESC_sizeof() sizeof(TYPEDESC)
 
 /* Libraries for dynamic loaded functions */
+#define AccessibleChildren_LIB "oleacc.dll"
 #define AccessibleObjectFromWindow_LIB "oleacc.dll"
 #define CreateStdAccessibleObject_LIB "oleacc.dll"
 #define LresultFromObject_LIB "oleacc.dll"
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c
index 6660b5b..435385d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,10 +14,12 @@
 
 #ifdef NATIVE_STATS
 
-int COM_nativeFunctionCount = 184;
-int COM_nativeFunctionCallCount[184];
+int COM_nativeFunctionCount = 175;
+int COM_nativeFunctionCallCount[175];
 char * COM_nativeFunctionNames[] = {
+	"AccessibleChildren",
 	"AccessibleObjectFromWindow",
+	"CALLBACK_1setCurrentValue",
 	"CAUUID_1sizeof",
 	"CLSIDFromProgID",
 	"CLSIDFromString",
@@ -27,8 +29,6 @@ char * COM_nativeFunctionNames[] = {
 	"CoFreeUnusedLibraries",
 	"CoGetClassObject",
 	"CoLockObjectExternal",
-	"CoTaskMemAlloc",
-	"CoTaskMemFree",
 	"CreateStdAccessibleObject",
 	"DISPPARAMS_1sizeof",
 	"DVTARGETDEVICE_1sizeof",
@@ -157,16 +157,6 @@ char * COM_nativeFunctionNames[] = {
 	"VariantClear",
 	"VariantInit",
 #ifndef JNI64
-	"VtblCall__IIII",
-#else
-	"VtblCall__IJII",
-#endif
-#ifndef JNI64
-	"VtblCall__IIIII",
-#else
-	"VtblCall__IJIII",
-#endif
-#ifndef JNI64
 	"VtblCall__IIIIII",
 #else
 	"VtblCall__IJIIII",
@@ -297,11 +287,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJIZ",
 #endif
 #ifndef JNI64
-	"VtblCall__III_3I",
-#else
-	"VtblCall__IJI_3I",
-#endif
-#ifndef JNI64
 	"VtblCall__III_3II_3I",
 #else
 	"VtblCall__IJI_3II_3I",
@@ -312,11 +297,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJI_3I_3I_3I_3I",
 #endif
 #ifndef JNI64
-	"VtblCall__III_3J",
-#else
-	"VtblCall__IJI_3J",
-#endif
-#ifndef JNI64
 	"VtblCall__III_3JI_3I",
 #else
 	"VtblCall__IJI_3JI_3I",
@@ -327,11 +307,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJI_3J_3J_3I_3J",
 #endif
 #ifndef JNI64
-	"VtblCall__IIJI",
-#else
-	"VtblCall__IJJI",
-#endif
-#ifndef JNI64
 	"VtblCall__IIJI_3I",
 #else
 	"VtblCall__IJJI_3I",
@@ -342,11 +317,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJJI_3J",
 #endif
 #ifndef JNI64
-	"VtblCall__IIJJ",
-#else
-	"VtblCall__IJJJ",
-#endif
-#ifndef JNI64
 	"VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J",
 #else
 	"VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J",
@@ -512,16 +482,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJZ",
 #endif
 #ifndef JNI64
-	"VtblCall__II_3C",
-#else
-	"VtblCall__IJ_3C",
-#endif
-#ifndef JNI64
-	"VtblCall__II_3CI",
-#else
-	"VtblCall__IJ_3CI",
-#endif
-#ifndef JNI64
 	"VtblCall__II_3CIIII_3I",
 #else
 	"VtblCall__IJ_3CIIII_3I",
@@ -537,11 +497,6 @@ char * COM_nativeFunctionNames[] = {
 	"VtblCall__IJ_3CIII_3J",
 #endif
 #ifndef JNI64
-	"VtblCall__II_3CJ",
-#else
-	"VtblCall__IJ_3CJ",
-#endif
-#ifndef JNI64
 	"VtblCall__II_3CJIII_3J",
 #else
 	"VtblCall__IJ_3CJIII_3J",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h
index 614b321..0312728 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/com_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,9 @@ extern char* COM_nativeFunctionNames[];
 #endif
 
 typedef enum {
+	AccessibleChildren_FUNC,
 	AccessibleObjectFromWindow_FUNC,
+	CALLBACK_1setCurrentValue_FUNC,
 	CAUUID_1sizeof_FUNC,
 	CLSIDFromProgID_FUNC,
 	CLSIDFromString_FUNC,
@@ -35,8 +37,6 @@ typedef enum {
 	CoFreeUnusedLibraries_FUNC,
 	CoGetClassObject_FUNC,
 	CoLockObjectExternal_FUNC,
-	CoTaskMemAlloc_FUNC,
-	CoTaskMemFree_FUNC,
 	CreateStdAccessibleObject_FUNC,
 	DISPPARAMS_1sizeof_FUNC,
 	DVTARGETDEVICE_1sizeof_FUNC,
@@ -165,16 +165,6 @@ typedef enum {
 	VariantClear_FUNC,
 	VariantInit_FUNC,
 #ifndef JNI64
-	VtblCall__IIII_FUNC,
-#else
-	VtblCall__IJII_FUNC,
-#endif
-#ifndef JNI64
-	VtblCall__IIIII_FUNC,
-#else
-	VtblCall__IJIII_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__IIIIII_FUNC,
 #else
 	VtblCall__IJIIII_FUNC,
@@ -305,11 +295,6 @@ typedef enum {
 	VtblCall__IJIZ_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__III_3I_FUNC,
-#else
-	VtblCall__IJI_3I_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__III_3II_3I_FUNC,
 #else
 	VtblCall__IJI_3II_3I_FUNC,
@@ -320,11 +305,6 @@ typedef enum {
 	VtblCall__IJI_3I_3I_3I_3I_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__III_3J_FUNC,
-#else
-	VtblCall__IJI_3J_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__III_3JI_3I_FUNC,
 #else
 	VtblCall__IJI_3JI_3I_FUNC,
@@ -335,11 +315,6 @@ typedef enum {
 	VtblCall__IJI_3J_3J_3I_3J_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__IIJI_FUNC,
-#else
-	VtblCall__IJJI_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__IIJI_3I_FUNC,
 #else
 	VtblCall__IJJI_3I_FUNC,
@@ -350,11 +325,6 @@ typedef enum {
 	VtblCall__IJJI_3J_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__IIJJ_FUNC,
-#else
-	VtblCall__IJJJ_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__IIJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC,
 #else
 	VtblCall__IJJJLorg_eclipse_swt_internal_ole_win32_GUID_2J_3J_FUNC,
@@ -520,16 +490,6 @@ typedef enum {
 	VtblCall__IJZ_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__II_3C_FUNC,
-#else
-	VtblCall__IJ_3C_FUNC,
-#endif
-#ifndef JNI64
-	VtblCall__II_3CI_FUNC,
-#else
-	VtblCall__IJ_3CI_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__II_3CIIII_3I_FUNC,
 #else
 	VtblCall__IJ_3CIIII_3I_FUNC,
@@ -545,11 +505,6 @@ typedef enum {
 	VtblCall__IJ_3CIII_3J_FUNC,
 #endif
 #ifndef JNI64
-	VtblCall__II_3CJ_FUNC,
-#else
-	VtblCall__IJ_3CJ_FUNC,
-#endif
-#ifndef JNI64
 	VtblCall__II_3CJIII_3J_FUNC,
 #else
 	VtblCall__IJ_3CJIII_3J_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak
index 883d1c5..45da377 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -68,7 +68,7 @@ CFLAGS = -O1 -DNDEBUG $(cflags) $(cvarsmt) $(CFLAGS) \
 	/I"$(JAVA_HOME)\include" /I"$(JAVA_HOME)\include\win32" /I.
 RCFLAGS = $(rcflags) $(rcvars) $(RCFLAGS) -DSWT_FILE_VERSION=\"$(maj_ver).$(min_ver)\" -DSWT_COMMA_VERSION=$(comma_ver)
 
-all: make_swt make_awt make_gdip make_wgl $(XULRUNNER_MAKE)
+all: make_swt make_awt make_gdip make_wgl
 
 xpcom_custom.obj: xpcom_custom.cpp
 	cl $(MOZILLACFLAGS) xpcom_custom.cpp
@@ -154,7 +154,7 @@ swt_xpcom.res:
 swt_xpcominit.res:
 	rc $(RCFLAGS) -DSWT_ORG_FILENAME=\"$(XPCOMINIT_LIB)\" -r -fo swt_xpcom.res swt_xpcom.rc
 
-install: all
+install:
 	copy *.dll $(OUTPUT_DIR)
 
 clean:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c
index 23535a9..fc48919 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -917,6 +917,28 @@ JNIEXPORT jint JNICALL OS_NATIVE(CoInternetSetFeatureEnabled)
 }
 #endif
 
+#ifndef NO_CoTaskMemAlloc
+JNIEXPORT jintLong JNICALL OS_NATIVE(CoTaskMemAlloc)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, CoTaskMemAlloc_FUNC);
+	rc = (jintLong)CoTaskMemAlloc((ULONG)arg0);
+	OS_NATIVE_EXIT(env, that, CoTaskMemAlloc_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_CoTaskMemFree
+JNIEXPORT void JNICALL OS_NATIVE(CoTaskMemFree)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, CoTaskMemFree_FUNC);
+	CoTaskMemFree((LPVOID)arg0);
+	OS_NATIVE_EXIT(env, that, CoTaskMemFree_FUNC);
+}
+#endif
+
 #ifndef NO_CombineRgn
 JNIEXPORT jint JNICALL OS_NATIVE(CombineRgn)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3)
@@ -2418,6 +2440,22 @@ fail:
 }
 #endif
 
+#ifndef NO_DuplicateHandle
+JNIEXPORT jboolean JNICALL OS_NATIVE(DuplicateHandle)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3, jint arg4, jboolean arg5, jint arg6)
+{
+	jintLong *lparg3=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, DuplicateHandle_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jboolean)DuplicateHandle((HANDLE)arg0, (HANDLE)arg1, (HANDLE)arg2, (LPHANDLE)lparg3, (DWORD)arg4, arg5, (DWORD)arg6);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, DuplicateHandle_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_DwmEnableBlurBehindWindow
 JNIEXPORT jint JNICALL OS_NATIVE(DwmEnableBlurBehindWindow)
 	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
@@ -3710,6 +3748,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GetCurrentObject)
 }
 #endif
 
+#ifndef NO_GetCurrentProcess
+JNIEXPORT jintLong JNICALL OS_NATIVE(GetCurrentProcess)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, GetCurrentProcess_FUNC);
+	rc = (jintLong)GetCurrentProcess();
+	OS_NATIVE_EXIT(env, that, GetCurrentProcess_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GetCurrentProcessId
 JNIEXPORT jint JNICALL OS_NATIVE(GetCurrentProcessId)
 	(JNIEnv *env, jclass that)
@@ -4002,6 +4052,25 @@ fail:
 }
 #endif
 
+#ifndef NO_GetGlyphIndicesW
+JNIEXPORT jint JNICALL OS_NATIVE(GetGlyphIndicesW)
+	(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jint arg2, jshortArray arg3, jint arg4)
+{
+	jchar *lparg1=NULL;
+	jshort *lparg3=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, GetGlyphIndicesW_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetShortArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)GetGlyphIndicesW((HDC)arg0, lparg1, arg2, (LPWORD)lparg3, arg4);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseShortArrayElements(env, arg3, lparg3, 0);
+	if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, GetGlyphIndicesW_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GetGraphicsMode
 JNIEXPORT jint JNICALL OS_NATIVE(GetGraphicsMode)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7707,6 +7776,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(LVHITTESTINFO_1sizeof)
 }
 #endif
 
+#ifndef NO_LVINSERTMARK_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(LVINSERTMARK_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, LVINSERTMARK_1sizeof_FUNC);
+	rc = (jint)LVINSERTMARK_sizeof();
+	OS_NATIVE_EXIT(env, that, LVINSERTMARK_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_LVITEM_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(LVITEM_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -8179,6 +8260,18 @@ JNIEXPORT jint JNICALL OS_NATIVE(MSG_1sizeof)
 }
 #endif
 
+#ifndef NO_MapViewOfFile
+JNIEXPORT jintLong JNICALL OS_NATIVE(MapViewOfFile)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, MapViewOfFile_FUNC);
+	rc = (jintLong)MapViewOfFile((HANDLE)arg0, (DWORD)arg1, (DWORD)arg2, (DWORD)arg3, arg4);
+	OS_NATIVE_EXIT(env, that, MapViewOfFile_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_MapVirtualKeyA
 JNIEXPORT jint JNICALL OS_NATIVE(MapVirtualKeyA)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1)
@@ -8869,6 +8962,30 @@ fail:
 }
 #endif
 
+#if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#else
+JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
+#endif
+{
+	SAFEARRAY _arg1, *lparg1=NULL;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#endif
+	if (arg1) if ((lparg1 = getSAFEARRAYFields(env, arg1, &_arg1)) == NULL) goto fail;
+	MoveMemory((PVOID)arg0, (CONST VOID *)lparg1, arg2);
+fail:
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC);
+#endif
+}
+#endif
+
 #if (!defined(NO_MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && !defined(JNI64)) || (!defined(NO_MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2)
@@ -11474,6 +11591,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(OpenClipboard)
 }
 #endif
 
+#ifndef NO_OpenProcess
+JNIEXPORT jintLong JNICALL OS_NATIVE(OpenProcess)
+	(JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, OpenProcess_FUNC);
+	rc = (jintLong)OpenProcess((DWORD)arg0, arg1, (DWORD)arg2);
+	OS_NATIVE_EXIT(env, that, OpenProcess_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_OpenThemeData
 JNIEXPORT jintLong JNICALL OS_NATIVE(OpenThemeData)
 	(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1)
@@ -11584,6 +11713,57 @@ JNIEXPORT jint JNICALL OS_NATIVE(PROCESS_1INFORMATION_1sizeof)
 }
 #endif
 
+#ifndef NO_PROPERTYKEY_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(PROPERTYKEY_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, PROPERTYKEY_1sizeof_FUNC);
+	rc = (jint)PROPERTYKEY_sizeof();
+	OS_NATIVE_EXIT(env, that, PROPERTYKEY_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_PROPVARIANT_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(PROPVARIANT_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, PROPVARIANT_1sizeof_FUNC);
+	rc = (jint)PROPVARIANT_sizeof();
+	OS_NATIVE_EXIT(env, that, PROPVARIANT_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_PSPropertyKeyFromString
+JNIEXPORT jint JNICALL OS_NATIVE(PSPropertyKeyFromString)
+	(JNIEnv *env, jclass that, jcharArray arg0, jobject arg1)
+{
+	jchar *lparg0=NULL;
+	PROPERTYKEY _arg1, *lparg1=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, PSPropertyKeyFromString_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = getPROPERTYKEYFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	rc = (jint)PSPropertyKeyFromString(lparg0, lparg1);
+*/
+	{
+		LOAD_FUNCTION(fp, PSPropertyKeyFromString)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jchar *, PROPERTYKEY *))fp)(lparg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) setPROPERTYKEYFields(env, arg1, lparg1);
+	if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, PSPropertyKeyFromString_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_PatBlt
 JNIEXPORT jboolean JNICALL OS_NATIVE(PatBlt)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
@@ -11596,6 +11776,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(PatBlt)
 }
 #endif
 
+#ifndef NO_PathIsExe
+JNIEXPORT jboolean JNICALL OS_NATIVE(PathIsExe)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, PathIsExe_FUNC);
+	rc = (jboolean)PathIsExe((LPCWSTR)arg0);
+	OS_NATIVE_EXIT(env, that, PathIsExe_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_PeekMessageA
 JNIEXPORT jboolean JNICALL OS_NATIVE(PeekMessageA)
 	(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
@@ -12430,6 +12622,30 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(RoundRect)
 }
 #endif
 
+#ifndef NO_SAFEARRAYBOUND_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(SAFEARRAYBOUND_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SAFEARRAYBOUND_1sizeof_FUNC);
+	rc = (jint)SAFEARRAYBOUND_sizeof();
+	OS_NATIVE_EXIT(env, that, SAFEARRAYBOUND_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SAFEARRAY_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(SAFEARRAY_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SAFEARRAY_1sizeof_FUNC);
+	rc = (jint)SAFEARRAY_sizeof();
+	OS_NATIVE_EXIT(env, that, SAFEARRAY_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SCRIPT_1ANALYSIS_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(SCRIPT_1ANALYSIS_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -12606,6 +12822,69 @@ fail:
 }
 #endif
 
+#ifndef NO_SHCreateItemFromRelativeName
+JNIEXPORT jint JNICALL OS_NATIVE(SHCreateItemFromRelativeName)
+	(JNIEnv *env, jclass that, jintLong arg0, jcharArray arg1, jintLong arg2, jbyteArray arg3, jintLongArray arg4)
+{
+	jchar *lparg1=NULL;
+	jbyte *lparg3=NULL;
+	jintLong *lparg4=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SHCreateItemFromRelativeName_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetCharArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+/*
+	rc = (jint)SHCreateItemFromRelativeName(arg0, lparg1, arg2, lparg3, lparg4);
+*/
+	{
+		LOAD_FUNCTION(fp, SHCreateItemFromRelativeName)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jchar *, jintLong, jbyte *, jintLong *))fp)(arg0, lparg1, arg2, lparg3, lparg4);
+		}
+	}
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg1 && lparg1) (*env)->ReleaseCharArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, SHCreateItemFromRelativeName_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SHCreateItemInKnownFolder
+JNIEXPORT jint JNICALL OS_NATIVE(SHCreateItemInKnownFolder)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jint arg1, jcharArray arg2, jbyteArray arg3, jintLongArray arg4)
+{
+	jbyte *lparg0=NULL;
+	jchar *lparg2=NULL;
+	jbyte *lparg3=NULL;
+	jintLong *lparg4=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SHCreateItemInKnownFolder_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+/*
+	rc = (jint)SHCreateItemInKnownFolder(lparg0, arg1, lparg2, lparg3, lparg4);
+*/
+	{
+		LOAD_FUNCTION(fp, SHCreateItemInKnownFolder)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jbyte *, jint, jchar *, jbyte *, jintLong *))fp)(lparg0, arg1, lparg2, lparg3, lparg4);
+		}
+	}
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, SHCreateItemInKnownFolder_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SHCreateMenuBar
 JNIEXPORT jboolean JNICALL OS_NATIVE(SHCreateMenuBar)
 	(JNIEnv *env, jclass that, jobject arg0)
@@ -12708,6 +12987,38 @@ fail:
 }
 #endif
 
+#ifndef NO_SHGetFolderPathA
+JNIEXPORT jint JNICALL OS_NATIVE(SHGetFolderPathA)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jint arg3, jbyteArray arg4)
+{
+	jbyte *lparg4=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SHGetFolderPathA_FUNC);
+	if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	rc = (jint)SHGetFolderPathA((HWND)arg0, arg1, (HANDLE)arg2, arg3, (LPSTR)lparg4);
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
+	OS_NATIVE_EXIT(env, that, SHGetFolderPathA_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO_SHGetFolderPathW
+JNIEXPORT jint JNICALL OS_NATIVE(SHGetFolderPathW)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jint arg3, jcharArray arg4)
+{
+	jchar *lparg4=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SHGetFolderPathW_FUNC);
+	if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	rc = (jint)SHGetFolderPathW((HWND)arg0, arg1, (HANDLE)arg2, arg3, (LPWSTR)lparg4);
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
+	OS_NATIVE_EXIT(env, that, SHGetFolderPathW_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SHGetMalloc
 JNIEXPORT jint JNICALL OS_NATIVE(SHGetMalloc)
 	(JNIEnv *env, jclass that, jintLongArray arg0)
@@ -13572,6 +13883,33 @@ fail:
 }
 #endif
 
+#if (!defined(NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && !defined(JNI64)) || (!defined(NO_SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
+#endif
+{
+	LVINSERTMARK _arg3, *lparg3=NULL;
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#endif
+	if (arg3) if ((lparg3 = getLVINSERTMARKFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jintLong)SendMessageA((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+fail:
+	if (arg3 && lparg3) setLVINSERTMARKFields(env, arg3, lparg3);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVITEM_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
@@ -14462,6 +14800,33 @@ fail:
 }
 #endif
 
+#if (!defined(NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && !defined(JNI64)) || (!defined(NO_SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
+#endif
+{
+	LVINSERTMARK _arg3, *lparg3=NULL;
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#endif
+	if (arg3) if ((lparg3 = getLVINSERTMARKFields(env, arg3, &_arg3)) == NULL) goto fail;
+	rc = (jintLong)SendMessageW((HWND)arg0, arg1, (WPARAM)arg2, (LPARAM)lparg3);
+fail:
+	if (arg3 && lparg3) setLVINSERTMARKFields(env, arg3, lparg3);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2) && !defined(JNI64)) || (!defined(NO_SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVITEM_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2)(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jobject arg3)
@@ -15171,6 +15536,30 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(SetClipboardData)
 }
 #endif
 
+#ifndef NO_SetCurrentProcessExplicitAppUserModelID
+JNIEXPORT jint JNICALL OS_NATIVE(SetCurrentProcessExplicitAppUserModelID)
+	(JNIEnv *env, jclass that, jcharArray arg0)
+{
+	jchar *lparg0=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, SetCurrentProcessExplicitAppUserModelID_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetCharArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jint)SetCurrentProcessExplicitAppUserModelID(lparg0);
+*/
+	{
+		LOAD_FUNCTION(fp, SetCurrentProcessExplicitAppUserModelID)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jchar *))fp)(lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseCharArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, SetCurrentProcessExplicitAppUserModelID_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_SetCursor
 JNIEXPORT jintLong JNICALL OS_NATIVE(SetCursor)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16644,6 +17033,18 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(UnhookWindowsHookEx)
 }
 #endif
 
+#ifndef NO_UnmapViewOfFile
+JNIEXPORT jboolean JNICALL OS_NATIVE(UnmapViewOfFile)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, UnmapViewOfFile_FUNC);
+	rc = (jboolean)UnmapViewOfFile((LPCVOID)arg0);
+	OS_NATIVE_EXIT(env, that, UnmapViewOfFile_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_UnregisterClassA
 JNIEXPORT jboolean JNICALL OS_NATIVE(UnregisterClassA)
 	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1)
@@ -16807,11 +17208,57 @@ JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI)(JNIEnv *env, jclass that, jint a
 }
 #endif
 
-#if (!defined(NO_VtblCall__IIIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII_3I) && defined(JNI64))
+#if (!defined(NO_VtblCall__IIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJII) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
 #else
-JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJII_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJII_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__IIIII) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIII)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJIII_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJIII_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__IIIII_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIII_3I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIII_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jintArray arg5)
 #endif
 {
 	jint *lparg5=NULL;
@@ -16834,6 +17281,36 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__IIII_3C_3CI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI_3C_3CJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIII_3C_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jint arg3, jcharArray arg4, jcharArray arg5, jintLong arg6)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJI_3C_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintLong arg2, jint arg3, jcharArray arg4, jcharArray arg5, jintLong arg6)
+#endif
+{
+	jchar *lparg4=NULL;
+	jchar *lparg5=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIII_3C_3CI_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJJI_3C_3CJ_FUNC);
+#endif
+	if (arg4) if ((lparg4 = (*env)->GetCharArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	if (arg5) if ((lparg5 = (*env)->GetCharArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jintLong, jint, jchar *, jchar *, jintLong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, lparg4, lparg5, arg6);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseCharArrayElements(env, arg5, lparg5, 0);
+	if (arg4 && lparg4) (*env)->ReleaseCharArrayElements(env, arg4, lparg4, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIII_3C_3CI_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJJI_3C_3CJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__IIIJI_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJI_3J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4, jlongArray arg5)
@@ -16861,6 +17338,56 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__IIIJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJIJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jlong arg4)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJIJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlong arg3, jlong arg4)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIIJJ_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJIJJ_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIIJJ_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJIJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__III_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintArray arg3)
+#endif
+{
+	jint *lparg3=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__III_3I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJI_3I_FUNC);
+#endif
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jint *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__III_3I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJI_3I_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__III_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jintLongArray arg3, jintArray arg4)
@@ -16891,6 +17418,33 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__III_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJI_3J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__III_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJI_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jint arg2, jlongArray arg3)
+#endif
+{
+	jlong *lparg3=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__III_3J_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJI_3J_FUNC);
+#endif
+	if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint, jlong *))(*(jintLong **)arg1)[arg0])(arg1, arg2, lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseLongArrayElements(env, arg3, lparg3, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__III_3J_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJI_3J_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__IIJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2)
@@ -16914,6 +17468,29 @@ JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJ)(JNIEnv *env, jclass that, jint a
 }
 #endif
 
+#if (!defined(NO_VtblCall__IIJI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJI) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIJI_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJJI_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jint))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIJI_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJJI_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__IIJII_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJII_3J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJII_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jint arg3, jint arg4, jlongArray arg5)
@@ -16968,6 +17545,83 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__IIJJJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IIJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJJJJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlong arg2, jlong arg3, jlong arg4)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IIJJJ_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJJJJ_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jlong, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, arg2, arg3, arg4);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IIJJJ_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJJJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jint arg3)
+#endif
+{
+	PROPERTYKEY _arg2, *lparg2=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
+#endif
+	if (arg2) if ((lparg2 = getPROPERTYKEYFields(env, arg2, &_arg2)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, PROPERTYKEY *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+fail:
+	if (arg2 && lparg2) setPROPERTYKEYFields(env, arg2, lparg2);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2, jlong arg3)
+#endif
+{
+	PROPERTYKEY _arg2, *lparg2=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
+#endif
+	if (arg2) if ((lparg2 = getPROPERTYKEYFields(env, arg2, &_arg2)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, PROPERTYKEY *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+fail:
+	if (arg2 && lparg2) setPROPERTYKEYFields(env, arg2, lparg2);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2) && !defined(JNI64)) || (!defined(NO_VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jobject arg2)
@@ -17058,6 +17712,60 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__II_3C) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3C) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3C)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2)
+#endif
+{
+	jchar *lparg2=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__II_3C_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJ_3C_FUNC);
+#endif
+	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *))(*(jintLong **)arg1)[arg0])(arg1, lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__II_3C_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJ_3C_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__II_3CI) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CI) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3CI)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3)
+#endif
+{
+	jchar *lparg2=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__II_3CI_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJ_3CI_FUNC);
+#endif
+	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__II_3CI_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJ_3CI_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__II_3CII_3I_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CII_3I_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CII_3I_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jint arg3, jint arg4, jintArray arg5, jintArray arg6)
@@ -17091,6 +17799,33 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__II_3CJ) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3CJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3CJ)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jcharArray arg2, jlong arg3)
+#endif
+{
+	jchar *lparg2=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__II_3CJ_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJ_3CJ_FUNC);
+#endif
+	if (arg2) if ((lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jchar *, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__II_3CJ_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJ_3CJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__II_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2)
@@ -17118,6 +17853,72 @@ fail:
 }
 #endif
 
+#if (!defined(NO_VtblCall__II_3I_3B_3I) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I_3B_3I) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jintArray arg4)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3I_3B_3I)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jintArray arg4)
+#endif
+{
+	jint *lparg2=NULL;
+	jbyte *lparg3=NULL;
+	jint *lparg4=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__II_3I_3B_3I_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJ_3I_3B_3I_FUNC);
+#endif
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint *, jbyte *, jint *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__II_3I_3B_3I_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJ_3I_3B_3I_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO_VtblCall__II_3I_3B_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3I_3B_3J) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3I_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jlongArray arg4)
+#else
+JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__IJ_3I_3B_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jintArray arg2, jbyteArray arg3, jlongArray arg4)
+#endif
+{
+	jint *lparg2=NULL;
+	jbyte *lparg3=NULL;
+	jlong *lparg4=NULL;
+	jint rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, VtblCall__II_3I_3B_3J_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, VtblCall__IJ_3I_3B_3J_FUNC);
+#endif
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jint *, jbyte *, jlong *))(*(jintLong **)arg1)[arg0])(arg1, lparg2, lparg3, lparg4);
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseLongArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, VtblCall__II_3I_3B_3J_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, VtblCall__IJ_3I_3B_3J_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO_VtblCall__II_3J) && !defined(JNI64)) || (!defined(NO_VtblCall__IJ_3J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jint JNICALL OS_NATIVE(VtblCall__II_3J)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jlongArray arg2)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h
index 26edaab..36ed3f0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,6 +74,7 @@
 #define NO_HELPINFO
 #define NO_HIGHCONTRAST
 #define NO_LITEM
+#define NO_LVINSERTMARK
 #define NO_MARGINS
 #define NO_MENUBARINFO
 #define NO_MENUINFO
@@ -96,6 +97,7 @@
 #define NO_OUTLINETEXTMETRICA
 #define NO_OUTLINETEXTMETRICW
 #define NO_PANOSE
+#define NO_PROPERTYKEY
 #define NO_PRINTDLG
 #define NO_SCRIPT_ANALYSIS
 #define NO_SCRIPT_CONTROL
@@ -182,6 +184,8 @@
 #define NO_CoInternetIsFeatureEnabled
 #define NO_CoInternetSetFeatureEnabled
 #define NO_CopyImage
+#define NO_CoTaskMemAlloc
+#define NO_CoTaskMemFree
 #define NO_CreateAcceleratorTableA
 #define NO_CreateActCtxA
 #define NO_CreateActCtxW
@@ -217,6 +221,7 @@
 #define NO_DrawThemeIcon
 #define NO_DrawThemeParentBackground
 #define NO_DrawThemeText
+#define NO_DuplicateHandle
 #define NO_DwmEnableBlurBehindWindow
 #define NO_DwmExtendFrameIntoClientArea
 #define NO_EnableScrollBar
@@ -256,6 +261,7 @@
 #define NO_GetDIBColorTable
 #define NO_GetDIBits
 #define NO_GetFontLanguageInfo
+#define NO_GetGlyphIndicesW
 #define NO_GetGraphicsMode
 #define NO_GetGUIThreadInfo
 #define NO_GetIconInfo
@@ -407,6 +413,7 @@
 #define NO_OleInitialize
 #define NO_OleUninitialize
 #define NO_OpenThemeData
+#define NO_PathIsExe
 #define NO_PeekMessageA
 #define NO_Pie
 #define NO_PostMessageA
@@ -414,6 +421,9 @@
 #define NO_PrintDlgA
 #define NO_PrintDlgW
 #define NO_PrintWindow
+#define NO_PROPERTYKEY_1sizeof
+#define NO_PROPVARIANT_1sizeof
+#define NO_PSPropertyKeyFromString
 #define NO_RedrawWindow
 #define NO_RegEnumKeyExA
 #define NO_RegOpenKeyExA
@@ -427,6 +437,7 @@
 #define NO_RemovePropA
 #define NO_RemovePropW
 #define NO_ReplyMessage
+#define NO_SetCurrentProcessExplicitAppUserModelID
 #define NO_SetLayeredWindowAttributes
 #define NO_SetLayout
 #define NO_SetProcessDPIAware
@@ -434,8 +445,12 @@
 #define NO_SHBrowseForFolderA
 #define NO_SHBrowseForFolderW
 #define NO_SHGetFileInfoA
+#define NO_SHGetFolderPathA
+#define NO_SHGetFolderPathW
 #define NO_SHGetPathFromIDListA
 #define NO_SHGetPathFromIDListW
+#define NO_SHCreateItemFromRelativeName
+#define NO_SHCreateItemInKnownFolder
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_BUTTON_1IMAGELIST_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LITEM_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2
@@ -450,6 +465,7 @@
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2
+#define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2
 #define NO_SendMessageA__IIILorg_eclipse_swt_internal_win32_MCHITTESTINFO_2
@@ -473,6 +489,7 @@
 #define NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_LITEM_2
 #define NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2
 #define NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2
+#define NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2
 #define NO_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2
 #define NO_SetDIBColorTable
 #define NO_SetErrorMode
@@ -547,6 +564,10 @@
 #define NO_VkKeyScanA
 #define NO_VkKeyScanW
 #define NO_VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2
+#define NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I
+#define NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I
+#define NO_VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J
+#define NO_VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J
 #define NO_WaitMessage
 #define NO_WindowFromDC
 
@@ -623,6 +644,14 @@ typedef struct _BP_PAINTPARAMS {
 } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
 #endif
 
+#ifndef PROPERTYKEY_DEFINED
+#define PROPERTYKEY_DEFINED
+typedef struct _tagpropertykey {
+    GUID fmtid;
+    DWORD pid;
+} PROPERTYKEY;
+#endif
+
 #ifndef _DWM_BLURBEHIND
 typedef struct _DWM_BLURBEHIND {
     DWORD dwFlags;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h
index 3adc1f0..2ffdf48 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 /* Special sizeof's */
 #define SCRIPT_STRING_ANALYSIS_sizeof() sizeof(SCRIPT_STRING_ANALYSIS)
+#define PROPVARIANT_sizeof() sizeof(PROPVARIANT)
 
 /* Libraries for dynamic loaded functions */
 #define ActivateActCtx_LIB "kernel32.dll"
@@ -70,10 +71,14 @@
 #define NotifyWinEvent_LIB "user32.dll"
 #define OpenThemeData_LIB "uxtheme.dll"
 #define PrintWindow_LIB "user32.dll"
+#define PSPropertyKeyFromString_LIB "propsys.dll"
+#define SetCurrentProcessExplicitAppUserModelID_LIB "shell32.dll"
 #define SetLayeredWindowAttributes_LIB "user32.dll"
 #define SetLayout_LIB "gdi32.dll"
 #define SetMenuInfo_LIB "user32.dll"
 #define SetProcessDPIAware_LIB "user32.dll"
 #define SetWindowTheme_LIB "uxtheme.dll"
+#define SHCreateItemFromRelativeName_LIB "shell32.dll"
+#define SHCreateItemInKnownFolder_LIB "shell32.dll"
 #define TransparentBlt_LIB "msimg32.dll"
 #define UpdateLayeredWindow_LIB "user32.dll"
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c
index 85b77a7..60cc211 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,8 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 971;
-int OS_nativeFunctionCallCount[971];
+int OS_nativeFunctionCount = 1009;
+int OS_nativeFunctionCallCount[1009];
 char * OS_nativeFunctionNames[] = {
 	"ACCEL_1sizeof",
 	"ACTCTX_1sizeof",
@@ -74,6 +74,8 @@ char * OS_nativeFunctionNames[] = {
 	"CoCreateInstance",
 	"CoInternetIsFeatureEnabled",
 	"CoInternetSetFeatureEnabled",
+	"CoTaskMemAlloc",
+	"CoTaskMemFree",
 	"CombineRgn",
 	"CommDlgExtendedError",
 	"CommandBar_1AddAdornments",
@@ -181,6 +183,7 @@ char * OS_nativeFunctionNames[] = {
 	"DrawThemeIcon",
 	"DrawThemeParentBackground",
 	"DrawThemeText",
+	"DuplicateHandle",
 	"DwmEnableBlurBehindWindow",
 	"DwmExtendFrameIntoClientArea",
 	"EMREXTCREATEFONTINDIRECTW_1sizeof",
@@ -257,6 +260,7 @@ char * OS_nativeFunctionNames[] = {
 	"GetClipboardFormatNameW",
 	"GetComboBoxInfo",
 	"GetCurrentObject",
+	"GetCurrentProcess",
 	"GetCurrentProcessId",
 	"GetCurrentThreadId",
 	"GetCursor",
@@ -276,6 +280,7 @@ char * OS_nativeFunctionNames[] = {
 	"GetFontLanguageInfo",
 	"GetForegroundWindow",
 	"GetGUIThreadInfo",
+	"GetGlyphIndicesW",
 	"GetGraphicsMode",
 	"GetIconInfo",
 	"GetKeyNameTextA",
@@ -580,6 +585,7 @@ char * OS_nativeFunctionNames[] = {
 	"LPtoDP",
 	"LVCOLUMN_1sizeof",
 	"LVHITTESTINFO_1sizeof",
+	"LVINSERTMARK_1sizeof",
 	"LVITEM_1sizeof",
 	"LineTo",
 	"LoadBitmapA",
@@ -629,6 +635,7 @@ char * OS_nativeFunctionNames[] = {
 	"MONITORINFO_1sizeof",
 	"MOUSEINPUT_1sizeof",
 	"MSG_1sizeof",
+	"MapViewOfFile",
 	"MapVirtualKeyA",
 	"MapVirtualKeyW",
 #ifndef JNI64
@@ -757,6 +764,11 @@ char * OS_nativeFunctionNames[] = {
 	"MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I",
 #endif
 #ifndef JNI64
+	"MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
+#else
+	"MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I",
+#endif
+#ifndef JNI64
 	"MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
 #else
 	"MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I",
@@ -1148,6 +1160,7 @@ char * OS_nativeFunctionNames[] = {
 	"OleInitialize",
 	"OleUninitialize",
 	"OpenClipboard",
+	"OpenProcess",
 	"OpenThemeData",
 	"PAINTSTRUCT_1sizeof",
 	"PANOSE_1sizeof",
@@ -1156,7 +1169,11 @@ char * OS_nativeFunctionNames[] = {
 	"PRIMARYLANGID",
 	"PRINTDLG_1sizeof",
 	"PROCESS_1INFORMATION_1sizeof",
+	"PROPERTYKEY_1sizeof",
+	"PROPVARIANT_1sizeof",
+	"PSPropertyKeyFromString",
 	"PatBlt",
+	"PathIsExe",
 	"PeekMessageA",
 	"PeekMessageW",
 	"Pie",
@@ -1218,6 +1235,8 @@ char * OS_nativeFunctionNames[] = {
 	"ReplyMessage",
 	"RestoreDC",
 	"RoundRect",
+	"SAFEARRAYBOUND_1sizeof",
+	"SAFEARRAY_1sizeof",
 	"SCRIPT_1ANALYSIS_1sizeof",
 	"SCRIPT_1CONTROL_1sizeof",
 	"SCRIPT_1DIGITSUBSTITUTE_1sizeof",
@@ -1232,6 +1251,8 @@ char * OS_nativeFunctionNames[] = {
 	"SHACTIVATEINFO_1sizeof",
 	"SHBrowseForFolderA",
 	"SHBrowseForFolderW",
+	"SHCreateItemFromRelativeName",
+	"SHCreateItemInKnownFolder",
 	"SHCreateMenuBar",
 	"SHDRAGIMAGE_1sizeof",
 	"SHELLEXECUTEINFO_1sizeof",
@@ -1239,6 +1260,8 @@ char * OS_nativeFunctionNames[] = {
 	"SHFILEINFOW_1sizeof",
 	"SHGetFileInfoA",
 	"SHGetFileInfoW",
+	"SHGetFolderPathA",
+	"SHGetFolderPathW",
 	"SHGetMalloc",
 	"SHGetPathFromIDListA",
 	"SHGetPathFromIDListW",
@@ -1321,6 +1344,11 @@ char * OS_nativeFunctionNames[] = {
 	"SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2",
 #endif
 #ifndef JNI64
+	"SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
+#else
+	"SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
+#endif
+#ifndef JNI64
 	"SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2",
 #else
 	"SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVITEM_2",
@@ -1486,6 +1514,11 @@ char * OS_nativeFunctionNames[] = {
 	"SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2",
 #endif
 #ifndef JNI64
+	"SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
+#else
+	"SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2",
+#endif
+#ifndef JNI64
 	"SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2",
 #else
 	"SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVITEM_2",
@@ -1612,6 +1645,7 @@ char * OS_nativeFunctionNames[] = {
 	"SetCapture",
 	"SetCaretPos",
 	"SetClipboardData",
+	"SetCurrentProcessExplicitAppUserModelID",
 	"SetCursor",
 	"SetCursorPos",
 	"SetDIBColorTable",
@@ -1714,6 +1748,7 @@ char * OS_nativeFunctionNames[] = {
 	"TreeView_1GetItemRect",
 	"UDACCEL_1sizeof",
 	"UnhookWindowsHookEx",
+	"UnmapViewOfFile",
 	"UnregisterClassA",
 	"UnregisterClassW",
 	"UpdateLayeredWindow",
@@ -1732,26 +1767,61 @@ char * OS_nativeFunctionNames[] = {
 	"VtblCall__IJI",
 #endif
 #ifndef JNI64
+	"VtblCall__IIII",
+#else
+	"VtblCall__IJII",
+#endif
+#ifndef JNI64
+	"VtblCall__IIIII",
+#else
+	"VtblCall__IJIII",
+#endif
+#ifndef JNI64
 	"VtblCall__IIIII_3I",
 #else
 	"VtblCall__IJIII_3I",
 #endif
 #ifndef JNI64
+	"VtblCall__IIII_3C_3CI",
+#else
+	"VtblCall__IJJI_3C_3CJ",
+#endif
+#ifndef JNI64
 	"VtblCall__IIIJI_3J",
 #else
 	"VtblCall__IJIJI_3J",
 #endif
 #ifndef JNI64
+	"VtblCall__IIIJJ",
+#else
+	"VtblCall__IJIJJ",
+#endif
+#ifndef JNI64
+	"VtblCall__III_3I",
+#else
+	"VtblCall__IJI_3I",
+#endif
+#ifndef JNI64
 	"VtblCall__III_3I_3I",
 #else
 	"VtblCall__IJI_3J_3I",
 #endif
 #ifndef JNI64
+	"VtblCall__III_3J",
+#else
+	"VtblCall__IJI_3J",
+#endif
+#ifndef JNI64
 	"VtblCall__IIJ",
 #else
 	"VtblCall__IJJ",
 #endif
 #ifndef JNI64
+	"VtblCall__IIJI",
+#else
+	"VtblCall__IJJI",
+#endif
+#ifndef JNI64
 	"VtblCall__IIJII_3J",
 #else
 	"VtblCall__IJJII_3J",
@@ -1762,6 +1832,21 @@ char * OS_nativeFunctionNames[] = {
 	"VtblCall__IJJJI_3J",
 #endif
 #ifndef JNI64
+	"VtblCall__IIJJJ",
+#else
+	"VtblCall__IJJJJ",
+#endif
+#ifndef JNI64
+	"VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I",
+#else
+	"VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I",
+#endif
+#ifndef JNI64
+	"VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J",
+#else
+	"VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J",
+#endif
+#ifndef JNI64
 	"VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2",
 #else
 	"VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2",
@@ -1777,16 +1862,41 @@ char * OS_nativeFunctionNames[] = {
 	"VtblCall__IJ_3B_3J",
 #endif
 #ifndef JNI64
+	"VtblCall__II_3C",
+#else
+	"VtblCall__IJ_3C",
+#endif
+#ifndef JNI64
+	"VtblCall__II_3CI",
+#else
+	"VtblCall__IJ_3CI",
+#endif
+#ifndef JNI64
 	"VtblCall__II_3CII_3I_3I",
 #else
 	"VtblCall__IJ_3CII_3I_3I",
 #endif
 #ifndef JNI64
+	"VtblCall__II_3CJ",
+#else
+	"VtblCall__IJ_3CJ",
+#endif
+#ifndef JNI64
 	"VtblCall__II_3I",
 #else
 	"VtblCall__IJ_3I",
 #endif
 #ifndef JNI64
+	"VtblCall__II_3I_3B_3I",
+#else
+	"VtblCall__IJ_3I_3B_3I",
+#endif
+#ifndef JNI64
+	"VtblCall__II_3I_3B_3J",
+#else
+	"VtblCall__IJ_3I_3B_3J",
+#endif
+#ifndef JNI64
 	"VtblCall__II_3J",
 #else
 	"VtblCall__IJ_3J",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h
index 9e20b50..58b2e69 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,6 +82,8 @@ typedef enum {
 	CoCreateInstance_FUNC,
 	CoInternetIsFeatureEnabled_FUNC,
 	CoInternetSetFeatureEnabled_FUNC,
+	CoTaskMemAlloc_FUNC,
+	CoTaskMemFree_FUNC,
 	CombineRgn_FUNC,
 	CommDlgExtendedError_FUNC,
 	CommandBar_1AddAdornments_FUNC,
@@ -189,6 +191,7 @@ typedef enum {
 	DrawThemeIcon_FUNC,
 	DrawThemeParentBackground_FUNC,
 	DrawThemeText_FUNC,
+	DuplicateHandle_FUNC,
 	DwmEnableBlurBehindWindow_FUNC,
 	DwmExtendFrameIntoClientArea_FUNC,
 	EMREXTCREATEFONTINDIRECTW_1sizeof_FUNC,
@@ -265,6 +268,7 @@ typedef enum {
 	GetClipboardFormatNameW_FUNC,
 	GetComboBoxInfo_FUNC,
 	GetCurrentObject_FUNC,
+	GetCurrentProcess_FUNC,
 	GetCurrentProcessId_FUNC,
 	GetCurrentThreadId_FUNC,
 	GetCursor_FUNC,
@@ -284,6 +288,7 @@ typedef enum {
 	GetFontLanguageInfo_FUNC,
 	GetForegroundWindow_FUNC,
 	GetGUIThreadInfo_FUNC,
+	GetGlyphIndicesW_FUNC,
 	GetGraphicsMode_FUNC,
 	GetIconInfo_FUNC,
 	GetKeyNameTextA_FUNC,
@@ -588,6 +593,7 @@ typedef enum {
 	LPtoDP_FUNC,
 	LVCOLUMN_1sizeof_FUNC,
 	LVHITTESTINFO_1sizeof_FUNC,
+	LVINSERTMARK_1sizeof_FUNC,
 	LVITEM_1sizeof_FUNC,
 	LineTo_FUNC,
 	LoadBitmapA_FUNC,
@@ -637,6 +643,7 @@ typedef enum {
 	MONITORINFO_1sizeof_FUNC,
 	MOUSEINPUT_1sizeof_FUNC,
 	MSG_1sizeof_FUNC,
+	MapViewOfFile_FUNC,
 	MapVirtualKeyA_FUNC,
 	MapVirtualKeyW_FUNC,
 #ifndef JNI64
@@ -765,6 +772,11 @@ typedef enum {
 	MoveMemory__JLorg_eclipse_swt_internal_win32_RECT_2I_FUNC,
 #endif
 #ifndef JNI64
+	MoveMemory__ILorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
+#else
+	MoveMemory__JLorg_eclipse_swt_internal_win32_SAFEARRAY_2I_FUNC,
+#endif
+#ifndef JNI64
 	MoveMemory__ILorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
 #else
 	MoveMemory__JLorg_eclipse_swt_internal_win32_SHDRAGIMAGE_2I_FUNC,
@@ -1156,6 +1168,7 @@ typedef enum {
 	OleInitialize_FUNC,
 	OleUninitialize_FUNC,
 	OpenClipboard_FUNC,
+	OpenProcess_FUNC,
 	OpenThemeData_FUNC,
 	PAINTSTRUCT_1sizeof_FUNC,
 	PANOSE_1sizeof_FUNC,
@@ -1164,7 +1177,11 @@ typedef enum {
 	PRIMARYLANGID_FUNC,
 	PRINTDLG_1sizeof_FUNC,
 	PROCESS_1INFORMATION_1sizeof_FUNC,
+	PROPERTYKEY_1sizeof_FUNC,
+	PROPVARIANT_1sizeof_FUNC,
+	PSPropertyKeyFromString_FUNC,
 	PatBlt_FUNC,
+	PathIsExe_FUNC,
 	PeekMessageA_FUNC,
 	PeekMessageW_FUNC,
 	Pie_FUNC,
@@ -1226,6 +1243,8 @@ typedef enum {
 	ReplyMessage_FUNC,
 	RestoreDC_FUNC,
 	RoundRect_FUNC,
+	SAFEARRAYBOUND_1sizeof_FUNC,
+	SAFEARRAY_1sizeof_FUNC,
 	SCRIPT_1ANALYSIS_1sizeof_FUNC,
 	SCRIPT_1CONTROL_1sizeof_FUNC,
 	SCRIPT_1DIGITSUBSTITUTE_1sizeof_FUNC,
@@ -1240,6 +1259,8 @@ typedef enum {
 	SHACTIVATEINFO_1sizeof_FUNC,
 	SHBrowseForFolderA_FUNC,
 	SHBrowseForFolderW_FUNC,
+	SHCreateItemFromRelativeName_FUNC,
+	SHCreateItemInKnownFolder_FUNC,
 	SHCreateMenuBar_FUNC,
 	SHDRAGIMAGE_1sizeof_FUNC,
 	SHELLEXECUTEINFO_1sizeof_FUNC,
@@ -1247,6 +1268,8 @@ typedef enum {
 	SHFILEINFOW_1sizeof_FUNC,
 	SHGetFileInfoA_FUNC,
 	SHGetFileInfoW_FUNC,
+	SHGetFolderPathA_FUNC,
+	SHGetFolderPathW_FUNC,
 	SHGetMalloc_FUNC,
 	SHGetPathFromIDListA_FUNC,
 	SHGetPathFromIDListW_FUNC,
@@ -1329,6 +1352,11 @@ typedef enum {
 	SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC,
 #endif
 #ifndef JNI64
+	SendMessageA__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
+#else
+	SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
+#endif
+#ifndef JNI64
 	SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
 #else
 	SendMessageA__JIJLorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
@@ -1494,6 +1522,11 @@ typedef enum {
 	SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_FUNC,
 #endif
 #ifndef JNI64
+	SendMessageW__IIILorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
+#else
+	SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVINSERTMARK_2_FUNC,
+#endif
+#ifndef JNI64
 	SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
 #else
 	SendMessageW__JIJLorg_eclipse_swt_internal_win32_LVITEM_2_FUNC,
@@ -1620,6 +1653,7 @@ typedef enum {
 	SetCapture_FUNC,
 	SetCaretPos_FUNC,
 	SetClipboardData_FUNC,
+	SetCurrentProcessExplicitAppUserModelID_FUNC,
 	SetCursor_FUNC,
 	SetCursorPos_FUNC,
 	SetDIBColorTable_FUNC,
@@ -1722,6 +1756,7 @@ typedef enum {
 	TreeView_1GetItemRect_FUNC,
 	UDACCEL_1sizeof_FUNC,
 	UnhookWindowsHookEx_FUNC,
+	UnmapViewOfFile_FUNC,
 	UnregisterClassA_FUNC,
 	UnregisterClassW_FUNC,
 	UpdateLayeredWindow_FUNC,
@@ -1740,26 +1775,61 @@ typedef enum {
 	VtblCall__IJI_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__IIII_FUNC,
+#else
+	VtblCall__IJII_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__IIIII_FUNC,
+#else
+	VtblCall__IJIII_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__IIIII_3I_FUNC,
 #else
 	VtblCall__IJIII_3I_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__IIII_3C_3CI_FUNC,
+#else
+	VtblCall__IJJI_3C_3CJ_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__IIIJI_3J_FUNC,
 #else
 	VtblCall__IJIJI_3J_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__IIIJJ_FUNC,
+#else
+	VtblCall__IJIJJ_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__III_3I_FUNC,
+#else
+	VtblCall__IJI_3I_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__III_3I_3I_FUNC,
 #else
 	VtblCall__IJI_3J_3I_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__III_3J_FUNC,
+#else
+	VtblCall__IJI_3J_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__IIJ_FUNC,
 #else
 	VtblCall__IJJ_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__IIJI_FUNC,
+#else
+	VtblCall__IJJI_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__IIJII_3J_FUNC,
 #else
 	VtblCall__IJJII_3J_FUNC,
@@ -1770,6 +1840,21 @@ typedef enum {
 	VtblCall__IJJJI_3J_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__IIJJJ_FUNC,
+#else
+	VtblCall__IJJJJ_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC,
+#else
+	VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2I_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__IILorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC,
+#else
+	VtblCall__IJLorg_eclipse_swt_internal_win32_PROPERTYKEY_2J_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__IILorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC,
 #else
 	VtblCall__IJLorg_eclipse_swt_internal_win32_TF_1DISPLAYATTRIBUTE_2_FUNC,
@@ -1785,16 +1870,41 @@ typedef enum {
 	VtblCall__IJ_3B_3J_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__II_3C_FUNC,
+#else
+	VtblCall__IJ_3C_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__II_3CI_FUNC,
+#else
+	VtblCall__IJ_3CI_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__II_3CII_3I_3I_FUNC,
 #else
 	VtblCall__IJ_3CII_3I_3I_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__II_3CJ_FUNC,
+#else
+	VtblCall__IJ_3CJ_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__II_3I_FUNC,
 #else
 	VtblCall__IJ_3I_FUNC,
 #endif
 #ifndef JNI64
+	VtblCall__II_3I_3B_3I_FUNC,
+#else
+	VtblCall__IJ_3I_3B_3I_FUNC,
+#endif
+#ifndef JNI64
+	VtblCall__II_3I_3B_3J_FUNC,
+#else
+	VtblCall__IJ_3I_3B_3J_FUNC,
+#endif
+#ifndef JNI64
 	VtblCall__II_3J_FUNC,
 #else
 	VtblCall__IJ_3J_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c
index 6d3d1cb..a7c7a15 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1224,7 +1224,7 @@ void setDLLVERSIONINFOFields(JNIEnv *env, jobject lpObject, DLLVERSIONINFO *lpSt
 typedef struct DOCHOSTUIINFO_FID_CACHE {
 	int cached;
 	jclass clazz;
-	jfieldID cbSize, dwFlags, dwDoubleClick;
+	jfieldID cbSize, dwFlags, dwDoubleClick, pchHostCss, pchHostNS;
 } DOCHOSTUIINFO_FID_CACHE;
 
 DOCHOSTUIINFO_FID_CACHE DOCHOSTUIINFOFc;
@@ -1236,6 +1236,8 @@ void cacheDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject)
 	DOCHOSTUIINFOFc.cbSize = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "cbSize", "I");
 	DOCHOSTUIINFOFc.dwFlags = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "dwFlags", "I");
 	DOCHOSTUIINFOFc.dwDoubleClick = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "dwDoubleClick", "I");
+	DOCHOSTUIINFOFc.pchHostCss = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostCss", I_J);
+	DOCHOSTUIINFOFc.pchHostNS = (*env)->GetFieldID(env, DOCHOSTUIINFOFc.clazz, "pchHostNS", I_J);
 	DOCHOSTUIINFOFc.cached = 1;
 }
 
@@ -1245,6 +1247,12 @@ DOCHOSTUIINFO *getDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject, DOCHOSTUIIN
 	lpStruct->cbSize = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.cbSize);
 	lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.dwFlags);
 	lpStruct->dwDoubleClick = (*env)->GetIntField(env, lpObject, DOCHOSTUIINFOFc.dwDoubleClick);
+#ifndef _WIN32_WCE
+	lpStruct->pchHostCss = (OLECHAR*)(*env)->GetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss);
+#endif
+#ifndef _WIN32_WCE
+	lpStruct->pchHostNS = (OLECHAR*)(*env)->GetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS);
+#endif
 	return lpStruct;
 }
 
@@ -1254,6 +1262,12 @@ void setDOCHOSTUIINFOFields(JNIEnv *env, jobject lpObject, DOCHOSTUIINFO *lpStru
 	(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.cbSize, (jint)lpStruct->cbSize);
 	(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.dwFlags, (jint)lpStruct->dwFlags);
 	(*env)->SetIntField(env, lpObject, DOCHOSTUIINFOFc.dwDoubleClick, (jint)lpStruct->dwDoubleClick);
+#ifndef _WIN32_WCE
+	(*env)->SetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostCss, (jintLong)lpStruct->pchHostCss);
+#endif
+#ifndef _WIN32_WCE
+	(*env)->SetIntLongField(env, lpObject, DOCHOSTUIINFOFc.pchHostNS, (jintLong)lpStruct->pchHostNS);
+#endif
 }
 #endif
 
@@ -2665,6 +2679,46 @@ void setLVHITTESTINFOFields(JNIEnv *env, jobject lpObject, LVHITTESTINFO *lpStru
 }
 #endif
 
+#ifndef NO_LVINSERTMARK
+typedef struct LVINSERTMARK_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID cbSize, dwFlags, iItem, dwReserved;
+} LVINSERTMARK_FID_CACHE;
+
+LVINSERTMARK_FID_CACHE LVINSERTMARKFc;
+
+void cacheLVINSERTMARKFields(JNIEnv *env, jobject lpObject)
+{
+	if (LVINSERTMARKFc.cached) return;
+	LVINSERTMARKFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	LVINSERTMARKFc.cbSize = (*env)->GetFieldID(env, LVINSERTMARKFc.clazz, "cbSize", "I");
+	LVINSERTMARKFc.dwFlags = (*env)->GetFieldID(env, LVINSERTMARKFc.clazz, "dwFlags", "I");
+	LVINSERTMARKFc.iItem = (*env)->GetFieldID(env, LVINSERTMARKFc.clazz, "iItem", "I");
+	LVINSERTMARKFc.dwReserved = (*env)->GetFieldID(env, LVINSERTMARKFc.clazz, "dwReserved", "I");
+	LVINSERTMARKFc.cached = 1;
+}
+
+LVINSERTMARK *getLVINSERTMARKFields(JNIEnv *env, jobject lpObject, LVINSERTMARK *lpStruct)
+{
+	if (!LVINSERTMARKFc.cached) cacheLVINSERTMARKFields(env, lpObject);
+	lpStruct->cbSize = (*env)->GetIntField(env, lpObject, LVINSERTMARKFc.cbSize);
+	lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, LVINSERTMARKFc.dwFlags);
+	lpStruct->iItem = (*env)->GetIntField(env, lpObject, LVINSERTMARKFc.iItem);
+	lpStruct->dwReserved = (*env)->GetIntField(env, lpObject, LVINSERTMARKFc.dwReserved);
+	return lpStruct;
+}
+
+void setLVINSERTMARKFields(JNIEnv *env, jobject lpObject, LVINSERTMARK *lpStruct)
+{
+	if (!LVINSERTMARKFc.cached) cacheLVINSERTMARKFields(env, lpObject);
+	(*env)->SetIntField(env, lpObject, LVINSERTMARKFc.cbSize, (jint)lpStruct->cbSize);
+	(*env)->SetIntField(env, lpObject, LVINSERTMARKFc.dwFlags, (jint)lpStruct->dwFlags);
+	(*env)->SetIntField(env, lpObject, LVINSERTMARKFc.iItem, (jint)lpStruct->iItem);
+	(*env)->SetIntField(env, lpObject, LVINSERTMARKFc.dwReserved, (jint)lpStruct->dwReserved);
+}
+#endif
+
 #ifndef NO_LVITEM
 typedef struct LVITEM_FID_CACHE {
 	int cached;
@@ -6223,6 +6277,46 @@ void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMA
 }
 #endif
 
+#ifndef NO_PROPERTYKEY
+typedef struct PROPERTYKEY_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID fmtid, pid;
+} PROPERTYKEY_FID_CACHE;
+
+PROPERTYKEY_FID_CACHE PROPERTYKEYFc;
+
+void cachePROPERTYKEYFields(JNIEnv *env, jobject lpObject)
+{
+	if (PROPERTYKEYFc.cached) return;
+	PROPERTYKEYFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	PROPERTYKEYFc.fmtid = (*env)->GetFieldID(env, PROPERTYKEYFc.clazz, "fmtid", "[B");
+	PROPERTYKEYFc.pid = (*env)->GetFieldID(env, PROPERTYKEYFc.clazz, "pid", "I");
+	PROPERTYKEYFc.cached = 1;
+}
+
+PROPERTYKEY *getPROPERTYKEYFields(JNIEnv *env, jobject lpObject, PROPERTYKEY *lpStruct)
+{
+	if (!PROPERTYKEYFc.cached) cachePROPERTYKEYFields(env, lpObject);
+	{
+	jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, PROPERTYKEYFc.fmtid);
+	(*env)->GetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->fmtid), (jbyte *)&lpStruct->fmtid);
+	}
+	lpStruct->pid = (*env)->GetIntField(env, lpObject, PROPERTYKEYFc.pid);
+	return lpStruct;
+}
+
+void setPROPERTYKEYFields(JNIEnv *env, jobject lpObject, PROPERTYKEY *lpStruct)
+{
+	if (!PROPERTYKEYFc.cached) cachePROPERTYKEYFields(env, lpObject);
+	{
+	jbyteArray lpObject1 = (jbyteArray)(*env)->GetObjectField(env, lpObject, PROPERTYKEYFc.fmtid);
+	(*env)->SetByteArrayRegion(env, lpObject1, 0, sizeof(lpStruct->fmtid), (jbyte *)&lpStruct->fmtid);
+	}
+	(*env)->SetIntField(env, lpObject, PROPERTYKEYFc.pid, (jint)lpStruct->pid);
+}
+#endif
+
 #ifndef NO_REBARBANDINFO
 typedef struct REBARBANDINFO_FID_CACHE {
 	int cached;
@@ -6355,6 +6449,92 @@ void setRECTFields(JNIEnv *env, jobject lpObject, RECT *lpStruct)
 }
 #endif
 
+#ifndef NO_SAFEARRAY
+typedef struct SAFEARRAY_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID cDims, fFeatures, cbElements, cLocks, pvData, rgsabound;
+} SAFEARRAY_FID_CACHE;
+
+SAFEARRAY_FID_CACHE SAFEARRAYFc;
+
+void cacheSAFEARRAYFields(JNIEnv *env, jobject lpObject)
+{
+	if (SAFEARRAYFc.cached) return;
+	SAFEARRAYFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	SAFEARRAYFc.cDims = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cDims", "S");
+	SAFEARRAYFc.fFeatures = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "fFeatures", "S");
+	SAFEARRAYFc.cbElements = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cbElements", "I");
+	SAFEARRAYFc.cLocks = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "cLocks", "I");
+	SAFEARRAYFc.pvData = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "pvData", I_J);
+	SAFEARRAYFc.rgsabound = (*env)->GetFieldID(env, SAFEARRAYFc.clazz, "rgsabound", "Lorg/eclipse/swt/internal/win32/SAFEARRAYBOUND;");
+	SAFEARRAYFc.cached = 1;
+}
+
+SAFEARRAY *getSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct)
+{
+	if (!SAFEARRAYFc.cached) cacheSAFEARRAYFields(env, lpObject);
+	lpStruct->cDims = (*env)->GetShortField(env, lpObject, SAFEARRAYFc.cDims);
+	lpStruct->fFeatures = (*env)->GetShortField(env, lpObject, SAFEARRAYFc.fFeatures);
+	lpStruct->cbElements = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cbElements);
+	lpStruct->cLocks = (*env)->GetIntField(env, lpObject, SAFEARRAYFc.cLocks);
+	lpStruct->pvData = (PVOID)(*env)->GetIntLongField(env, lpObject, SAFEARRAYFc.pvData);
+	{
+	jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
+	if (lpObject1 != NULL) getSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
+	}
+	return lpStruct;
+}
+
+void setSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct)
+{
+	if (!SAFEARRAYFc.cached) cacheSAFEARRAYFields(env, lpObject);
+	(*env)->SetShortField(env, lpObject, SAFEARRAYFc.cDims, (jshort)lpStruct->cDims);
+	(*env)->SetShortField(env, lpObject, SAFEARRAYFc.fFeatures, (jshort)lpStruct->fFeatures);
+	(*env)->SetIntField(env, lpObject, SAFEARRAYFc.cbElements, (jint)lpStruct->cbElements);
+	(*env)->SetIntField(env, lpObject, SAFEARRAYFc.cLocks, (jint)lpStruct->cLocks);
+	(*env)->SetIntLongField(env, lpObject, SAFEARRAYFc.pvData, (jintLong)lpStruct->pvData);
+	{
+	jobject lpObject1 = (*env)->GetObjectField(env, lpObject, SAFEARRAYFc.rgsabound);
+	if (lpObject1 != NULL) setSAFEARRAYBOUNDFields(env, lpObject1, &lpStruct->rgsabound[0]);
+	}
+}
+#endif
+
+#ifndef NO_SAFEARRAYBOUND
+typedef struct SAFEARRAYBOUND_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID cElements, lLbound;
+} SAFEARRAYBOUND_FID_CACHE;
+
+SAFEARRAYBOUND_FID_CACHE SAFEARRAYBOUNDFc;
+
+void cacheSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject)
+{
+	if (SAFEARRAYBOUNDFc.cached) return;
+	SAFEARRAYBOUNDFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	SAFEARRAYBOUNDFc.cElements = (*env)->GetFieldID(env, SAFEARRAYBOUNDFc.clazz, "cElements", "I");
+	SAFEARRAYBOUNDFc.lLbound = (*env)->GetFieldID(env, SAFEARRAYBOUNDFc.clazz, "lLbound", "I");
+	SAFEARRAYBOUNDFc.cached = 1;
+}
+
+SAFEARRAYBOUND *getSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct)
+{
+	if (!SAFEARRAYBOUNDFc.cached) cacheSAFEARRAYBOUNDFields(env, lpObject);
+	lpStruct->cElements = (*env)->GetIntField(env, lpObject, SAFEARRAYBOUNDFc.cElements);
+	lpStruct->lLbound = (*env)->GetIntField(env, lpObject, SAFEARRAYBOUNDFc.lLbound);
+	return lpStruct;
+}
+
+void setSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct)
+{
+	if (!SAFEARRAYBOUNDFc.cached) cacheSAFEARRAYBOUNDFields(env, lpObject);
+	(*env)->SetIntField(env, lpObject, SAFEARRAYBOUNDFc.cElements, (jint)lpStruct->cElements);
+	(*env)->SetIntField(env, lpObject, SAFEARRAYBOUNDFc.lLbound, (jint)lpStruct->lLbound);
+}
+#endif
+
 #ifndef NO_SCRIPT_ANALYSIS
 typedef struct SCRIPT_ANALYSIS_FID_CACHE {
 	int cached;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h
index 453dd28..b13086f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/library/os_structs.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -599,6 +599,18 @@ void setLVHITTESTINFOFields(JNIEnv *env, jobject lpObject, LVHITTESTINFO *lpStru
 #define LVHITTESTINFO_sizeof() 0
 #endif
 
+#ifndef NO_LVINSERTMARK
+void cacheLVINSERTMARKFields(JNIEnv *env, jobject lpObject);
+LVINSERTMARK *getLVINSERTMARKFields(JNIEnv *env, jobject lpObject, LVINSERTMARK *lpStruct);
+void setLVINSERTMARKFields(JNIEnv *env, jobject lpObject, LVINSERTMARK *lpStruct);
+#define LVINSERTMARK_sizeof() sizeof(LVINSERTMARK)
+#else
+#define cacheLVINSERTMARKFields(a,b)
+#define getLVINSERTMARKFields(a,b,c) NULL
+#define setLVINSERTMARKFields(a,b,c)
+#define LVINSERTMARK_sizeof() 0
+#endif
+
 #ifndef NO_LVITEM
 void cacheLVITEMFields(JNIEnv *env, jobject lpObject);
 LVITEM *getLVITEMFields(JNIEnv *env, jobject lpObject, LVITEM *lpStruct);
@@ -1271,6 +1283,18 @@ void setPROCESS_INFORMATIONFields(JNIEnv *env, jobject lpObject, PROCESS_INFORMA
 #define PROCESS_INFORMATION_sizeof() 0
 #endif
 
+#ifndef NO_PROPERTYKEY
+void cachePROPERTYKEYFields(JNIEnv *env, jobject lpObject);
+PROPERTYKEY *getPROPERTYKEYFields(JNIEnv *env, jobject lpObject, PROPERTYKEY *lpStruct);
+void setPROPERTYKEYFields(JNIEnv *env, jobject lpObject, PROPERTYKEY *lpStruct);
+#define PROPERTYKEY_sizeof() sizeof(PROPERTYKEY)
+#else
+#define cachePROPERTYKEYFields(a,b)
+#define getPROPERTYKEYFields(a,b,c) NULL
+#define setPROPERTYKEYFields(a,b,c)
+#define PROPERTYKEY_sizeof() 0
+#endif
+
 #ifndef NO_REBARBANDINFO
 void cacheREBARBANDINFOFields(JNIEnv *env, jobject lpObject);
 REBARBANDINFO *getREBARBANDINFOFields(JNIEnv *env, jobject lpObject, REBARBANDINFO *lpStruct);
@@ -1295,6 +1319,30 @@ void setRECTFields(JNIEnv *env, jobject lpObject, RECT *lpStruct);
 #define RECT_sizeof() 0
 #endif
 
+#ifndef NO_SAFEARRAY
+void cacheSAFEARRAYFields(JNIEnv *env, jobject lpObject);
+SAFEARRAY *getSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct);
+void setSAFEARRAYFields(JNIEnv *env, jobject lpObject, SAFEARRAY *lpStruct);
+#define SAFEARRAY_sizeof() sizeof(SAFEARRAY)
+#else
+#define cacheSAFEARRAYFields(a,b)
+#define getSAFEARRAYFields(a,b,c) NULL
+#define setSAFEARRAYFields(a,b,c)
+#define SAFEARRAY_sizeof() 0
+#endif
+
+#ifndef NO_SAFEARRAYBOUND
+void cacheSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject);
+SAFEARRAYBOUND *getSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct);
+void setSAFEARRAYBOUNDFields(JNIEnv *env, jobject lpObject, SAFEARRAYBOUND *lpStruct);
+#define SAFEARRAYBOUND_sizeof() sizeof(SAFEARRAYBOUND)
+#else
+#define cacheSAFEARRAYBOUNDFields(a,b)
+#define getSAFEARRAYBOUNDFields(a,b,c) NULL
+#define setSAFEARRAYBOUNDFields(a,b,c)
+#define SAFEARRAYBOUND_sizeof() 0
+#endif
+
 #ifndef NO_SCRIPT_ANALYSIS
 void cacheSCRIPT_ANALYSISFields(JNIEnv *env, jobject lpObject);
 SCRIPT_ANALYSIS *getSCRIPT_ANALYSISFields(JNIEnv *env, jobject lpObject, SCRIPT_ANALYSIS *lpStruct);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java
index 216a29d..1b9c11b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,6 +133,22 @@ public class COM extends OS {
 	public static final GUID CGID_DocHostCommandHandler = IIDFromString("{f38bc242-b950-11d1-8918-00c04fc2c836}"); //$NON-NLS-1$
 	public static final GUID CGID_Explorer = IIDFromString("{000214D0-0000-0000-C000-000000000046}"); //$NON-NLS-1$
 
+	// IA2 related GUIDS
+	public static final GUID IIDIAccessible2 = IIDFromString("{E89F726E-C4F4-4c19-BB19-B647D7FA8478}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleRelation = IIDFromString("{7CDF86EE-C3DA-496a-BDA4-281B336E1FDC}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleAction = IIDFromString("{B70D9F59-3B5A-4dba-AB9E-22012F607DF5}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleComponent = IIDFromString("{1546D4B0-4C98-4bda-89AE-9A64748BDDE4}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleValue = IIDFromString("{35855B5B-C566-4fd0-A7B1-E65465600394}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleText = IIDFromString("{24FD2FFB-3AAD-4a08-8335-A3AD89C0FB4B}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleEditableText = IIDFromString("{A59AA09A-7011-4b65-939D-32B1FB5547E3}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleHyperlink = IIDFromString("{01C20F2B-3DD2-400f-949F-AD00BDAB1D41}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleHypertext = IIDFromString("{6B4F8BBF-F1F2-418a-B35E-A195BC4103B9}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleTable = IIDFromString("{35AD8070-C20C-4fb4-B094-F4F7275DD469}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleTable2 = IIDFromString("{6167f295-06f0-4cdd-a1fa-02e25153d869}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleTableCell = IIDFromString("{594116B1-C99F-4847-AD06-0A7A86ECE645}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleImage = IIDFromString("{FE5ABB3D-615E-4f7b-909F-5F0EDA9E8DDE}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleApplication = IIDFromString("{D49DED83-5B25-43F4-9B95-93B44595979E}"); //$NON-NLS-1$
+	public static final GUID IIDIAccessibleContext = IIDFromString("{77A123E4-5794-44e0-B8BF-DE600C9D29BD}"); //$NON-NLS-1$
 
 	/** Constants */
 	//public static final int ADVF_DATAONSTOP = 64;
@@ -404,8 +420,6 @@ public class COM extends OS {
 	public static final short VT_UI4 = 19;
 	public static final short VT_UNKNOWN = 13;
 	public static final short VT_VARIANT = 12;
-	public static final short VARIANT_TRUE = -1;
-	public static final short VARIANT_FALSE = 0;
 
 	public static boolean FreeUnusedLibraries = true;
 
@@ -441,10 +455,6 @@ public static final native int CoGetClassObject(GUID rclsid, int dwClsContext, i
  * @param fLastUnlockReleases cast=(BOOL)
  */
 public static final native int CoLockObjectExternal(int /*long*/ pUnk, boolean fLock, boolean fLastUnlockReleases);
-/** @param cb cast=(ULONG) */
-public static final native int /*long*/ CoTaskMemAlloc(int cb);
-/** @param pv cast=(LPVOID) */
-public static final native void CoTaskMemFree(int /*long*/ pv);
 /**
  * @param pDataObject cast=(IDataObject *)
  * @param pDropSource cast=(IDropSource *)
@@ -646,11 +656,8 @@ public static final native int VariantClear(int /*long*/ pvarg);
 /** @param pvarg cast=(VARIANTARG FAR* ) */
 public static final native void VariantInit(int /*long*/ pvarg);
 
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, char[] arg1);
 
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1);
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, long arg1);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, POINT arg2, int arg3);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, POINT arg2, int arg3);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, POINT arg1, int arg2);
@@ -666,15 +673,10 @@ public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1, int arg2, int arg3, int arg4, int [] arg5);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, char[] arg0, long arg1, int arg2, int arg3, int arg4, long[] arg5);
 
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int[] arg1);
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long[] arg1);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int[] arg1);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long[] arg1);
 
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long arg1);
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1);
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1);
 
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int[] arg2);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, long[] arg2);
@@ -682,7 +684,6 @@ public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int a
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long arg1, int[] arg2);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1, int[] arg2);
 
-public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2);
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, long arg2);
 
 public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, DVTARGETDEVICE arg2, SIZE arg3);
@@ -767,27 +768,27 @@ public static final int ROLE_SYSTEM_SCROLLBAR = 0x3;
 //public static final int ROLE_SYSTEM_SOUND = 0x5;
 //public static final int ROLE_SYSTEM_CURSOR = 0x6;
 //public static final int ROLE_SYSTEM_CARET = 0x7;
-//public static final int ROLE_SYSTEM_ALERT = 0x8;
+public static final int ROLE_SYSTEM_ALERT = 0x8;
 public static final int ROLE_SYSTEM_WINDOW = 0x9;
 public static final int ROLE_SYSTEM_CLIENT = 0xa;
 public static final int ROLE_SYSTEM_MENUPOPUP = 0xb;
 public static final int ROLE_SYSTEM_MENUITEM = 0xc;
 public static final int ROLE_SYSTEM_TOOLTIP = 0xd;
 //public static final int ROLE_SYSTEM_APPLICATION = 0xe;
-//public static final int ROLE_SYSTEM_DOCUMENT = 0xf;
+public static final int ROLE_SYSTEM_DOCUMENT = 0xf;
 //public static final int ROLE_SYSTEM_PANE = 0x10;
 //public static final int ROLE_SYSTEM_CHART = 0x11;
 public static final int ROLE_SYSTEM_DIALOG = 0x12;
 //public static final int ROLE_SYSTEM_BORDER = 0x13;
-//public static final int ROLE_SYSTEM_GROUPING = 0x14;
+public static final int ROLE_SYSTEM_GROUPING = 0x14;
 public static final int ROLE_SYSTEM_SEPARATOR = 0x15;
 public static final int ROLE_SYSTEM_TOOLBAR = 0x16;
-//public static final int ROLE_SYSTEM_STATUSBAR = 0x17;
+public static final int ROLE_SYSTEM_STATUSBAR = 0x17;
 public static final int ROLE_SYSTEM_TABLE = 0x18;
 public static final int ROLE_SYSTEM_COLUMNHEADER = 0x19;
 public static final int ROLE_SYSTEM_ROWHEADER = 0x1a;
-//public static final int ROLE_SYSTEM_COLUMN = 0x1b;
-//public static final int ROLE_SYSTEM_ROW = 0x1c;
+public static final int ROLE_SYSTEM_COLUMN = 0x1b;
+public static final int ROLE_SYSTEM_ROW = 0x1c;
 public static final int ROLE_SYSTEM_CELL = 0x1d;
 public static final int ROLE_SYSTEM_LINK = 0x1e;
 //public static final int ROLE_SYSTEM_HELPBALLOON = 0x1f;
@@ -799,37 +800,39 @@ public static final int ROLE_SYSTEM_OUTLINEITEM = 0x24;
 public static final int ROLE_SYSTEM_PAGETAB = 0x25;
 //public static final int ROLE_SYSTEM_PROPERTYPAGE = 0x26;
 //public static final int ROLE_SYSTEM_INDICATOR = 0x27;
-//public static final int ROLE_SYSTEM_GRAPHIC = 0x28;
+public static final int ROLE_SYSTEM_GRAPHIC = 0x28;
 public static final int ROLE_SYSTEM_STATICTEXT = 0x29;
 public static final int ROLE_SYSTEM_TEXT = 0x2a;
 public static final int ROLE_SYSTEM_PUSHBUTTON = 0x2b;
 public static final int ROLE_SYSTEM_CHECKBUTTON = 0x2c;
 public static final int ROLE_SYSTEM_RADIOBUTTON = 0x2d;
 public static final int ROLE_SYSTEM_COMBOBOX = 0x2e;
-//public static final int ROLE_SYSTEM_DROPLIST = 0x2f;
+public static final int ROLE_SYSTEM_DROPLIST = 0x2f;
 public static final int ROLE_SYSTEM_PROGRESSBAR = 0x30;
 //public static final int ROLE_SYSTEM_DIAL = 0x31;
 //public static final int ROLE_SYSTEM_HOTKEYFIELD = 0x32;
 public static final int ROLE_SYSTEM_SLIDER = 0x33;
-//public static final int ROLE_SYSTEM_SPINBUTTON = 0x34;
+public static final int ROLE_SYSTEM_SPINBUTTON = 0x34;
 //public static final int ROLE_SYSTEM_DIAGRAM = 0x35;
-//public static final int ROLE_SYSTEM_ANIMATION = 0x36;
+public static final int ROLE_SYSTEM_ANIMATION = 0x36;
 //public static final int ROLE_SYSTEM_EQUATION = 0x37;
 //public static final int ROLE_SYSTEM_BUTTONDROPDOWN = 0x38;
 //public static final int ROLE_SYSTEM_BUTTONMENU = 0x39;
 //public static final int ROLE_SYSTEM_BUTTONDROPDOWNGRID = 0x3a;
 //public static final int ROLE_SYSTEM_WHITESPACE = 0x3b;
 public static final int ROLE_SYSTEM_PAGETABLIST = 0x3c;
-//public static final int ROLE_SYSTEM_CLOCK = 0x3d;
+public static final int ROLE_SYSTEM_CLOCK = 0x3d;
 public static final int ROLE_SYSTEM_SPLITBUTTON = 0x3e;
+//public static final int ROLE_SYSTEM_IPADDRESS = 0x3f;
+//public static final int ROLE_SYSTEM_OUTLINEBUTTON = 0x40;
+
 public static final int STATE_SYSTEM_NORMAL = 0;
-//public static final int STATE_SYSTEM_UNAVAILABLE = 0x1;
+public static final int STATE_SYSTEM_UNAVAILABLE = 0x1;
 public static final int STATE_SYSTEM_SELECTED = 0x2;
 public static final int STATE_SYSTEM_FOCUSED = 0x4;
 public static final int STATE_SYSTEM_PRESSED = 0x8;
 public static final int STATE_SYSTEM_CHECKED = 0x10;
 public static final int STATE_SYSTEM_MIXED = 0x20;
-//public static final int STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED;
 public static final int STATE_SYSTEM_READONLY = 0x40;
 public static final int STATE_SYSTEM_HOTTRACKED = 0x80;
 //public static final int STATE_SYSTEM_DEFAULT = 0x100;
@@ -856,6 +859,71 @@ public static final int STATE_SYSTEM_MULTISELECTABLE = 0x1000000;
 //public static final int STATE_SYSTEM_PROTECTED = 0x20000000;
 //public static final int STATE_SYSTEM_VALID = 0x3fffffff;
 
+public static final int EVENT_OBJECT_SELECTIONWITHIN = 		0x8009;
+public static final int EVENT_OBJECT_STATECHANGE = 			0x800A;
+public static final int EVENT_OBJECT_LOCATIONCHANGE = 		0x800B;
+public static final int EVENT_OBJECT_NAMECHANGE = 			0x800C;
+public static final int EVENT_OBJECT_DESCRIPTIONCHANGE = 	0x800D;
+public static final int EVENT_OBJECT_VALUECHANGE = 			0x800E;
+public static final int EVENT_OBJECT_TEXTSELECTIONCHANGED = 0x8014;
+
+/* IA2 additional constants */
+public static final int IA2_COORDTYPE_SCREEN_RELATIVE = 0;
+public static final int IA2_COORDTYPE_PARENT_RELATIVE = 1;
+
+public static final int IA2_STATE_ACTIVE = 					0x00000001;
+public static final int IA2_STATE_SINGLE_LINE =				0x00002000;
+public static final int IA2_STATE_MULTI_LINE = 				0x00000200;
+public static final int IA2_STATE_REQUIRED = 				0x00000800;
+public static final int IA2_STATE_INVALID_ENTRY = 			0x00000040;
+public static final int IA2_STATE_SUPPORTS_AUTOCOMPLETION =	0x00008000;
+public static final int IA2_STATE_EDITABLE =				0x00000008;
+
+public static final int IA2_EVENT_DOCUMENT_LOAD_COMPLETE = 			0x00000105;
+public static final int IA2_EVENT_DOCUMENT_LOAD_STOPPED = 			0x00000106;
+public static final int IA2_EVENT_DOCUMENT_RELOAD = 				0x00000107;
+public static final int IA2_EVENT_PAGE_CHANGED = 					0x00000111;
+public static final int IA2_EVENT_SECTION_CHANGED = 				0x00000112;
+public static final int IA2_EVENT_ACTION_CHANGED = 					0x00000101;
+public static final int IA2_EVENT_HYPERLINK_START_INDEX_CHANGED = 	0x0000010d;
+public static final int IA2_EVENT_HYPERLINK_END_INDEX_CHANGED = 	0x00000108;
+public static final int IA2_EVENT_HYPERLINK_ANCHOR_COUNT_CHANGED = 	0x00000109;
+public static final int IA2_EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x0000010a;
+public static final int IA2_EVENT_HYPERLINK_ACTIVATED = 			0x0000010b;
+public static final int IA2_EVENT_HYPERTEXT_LINK_SELECTED = 		0x0000010c;
+public static final int IA2_EVENT_HYPERTEXT_LINK_COUNT_CHANGED = 	0x0000010f;
+public static final int IA2_EVENT_ATTRIBUTE_CHANGED = 				0x00000110;
+public static final int IA2_EVENT_TABLE_CAPTION_CHANGED = 			0x00000113;
+public static final int IA2_EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x00000114;
+public static final int IA2_EVENT_TABLE_COLUMN_HEADER_CHANGED = 	0x00000115;
+public static final int IA2_EVENT_TABLE_CHANGED = 					0x00000116;
+public static final int IA2_EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 	0x00000117;
+public static final int IA2_EVENT_TABLE_ROW_HEADER_CHANGED = 		0x00000118;
+public static final int IA2_EVENT_TABLE_SUMMARY_CHANGED = 			0x00000119;
+public static final int IA2_EVENT_TEXT_ATTRIBUTE_CHANGED = 			0x0000011a;
+public static final int IA2_EVENT_TEXT_CARET_MOVED = 				0x0000011b;
+public static final int IA2_EVENT_TEXT_COLUMN_CHANGED = 			0x0000011d;
+public static final int IA2_EVENT_TEXT_INSERTED = 					0x0000011e;
+public static final int IA2_EVENT_TEXT_REMOVED = 					0x0000011f;
+
+public static final int IA2_TEXT_BOUNDARY_CHAR = 			0;
+public static final int IA2_TEXT_BOUNDARY_WORD = 			1;
+public static final int IA2_TEXT_BOUNDARY_SENTENCE = 		2;
+public static final int IA2_TEXT_BOUNDARY_PARAGRAPH = 		3;
+public static final int IA2_TEXT_BOUNDARY_LINE = 			4;
+public static final int IA2_TEXT_BOUNDARY_ALL = 			5;
+
+public static final int IA2_TEXT_OFFSET_LENGTH = 			-1;
+public static final int IA2_TEXT_OFFSET_CARET = 			-2;
+
+public static final int IA2_SCROLL_TYPE_TOP_LEFT = 			0;
+public static final int IA2_SCROLL_TYPE_BOTTOM_RIGHT = 		1;
+public static final int IA2_SCROLL_TYPE_TOP_EDGE = 			2;
+public static final int IA2_SCROLL_TYPE_BOTTOM_EDGE = 		3;
+public static final int IA2_SCROLL_TYPE_LEFT_EDGE = 		4;
+public static final int IA2_SCROLL_TYPE_RIGHT_EDGE = 		5;
+public static final int IA2_SCROLL_TYPE_ANYWHERE = 			6;
+
 /** Accessibility natives */
 
 /**
@@ -876,6 +944,16 @@ public static final native int CreateStdAccessibleObject (int /*long*/ hwnd, int
  * @param pAcc cast=(LPUNKNOWN)
  */
 public static final native int /*long*/ LresultFromObject (GUID riid, int /*long*/ wParam, int /*long*/ pAcc);
+/**
+ * @method flags=dynamic
+ * @param paccContainer cast=(IAccessible *)
+ * @param iChildStart cast=(LONG)
+ * @param cChildren cast=(LONG)
+ * @param rgvarChildren cast=(VARIANT *)
+ * @param pcObtained cast=(LONG *)
+ */
+public static final native int AccessibleChildren(int /*long*/ paccContainer, int iChildStart, int cChildren, int /*long*/ rgvarChildren, int [] pcObtained);
+
 /*USED*/public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3);
 /*USED*/public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2, int arg3, int arg4);
 /*USED,NEW*/public static final native int VtblCall(int fnNumber, long ppVtbl, int arg0, int arg1, int arg2, int arg3, long arg4);
@@ -929,6 +1007,8 @@ public static final native int /*long*/ accDoDefaultAction_CALLBACK(int /*long*/
 public static final native int /*long*/ put_accName_CALLBACK(int /*long*/ func);
 /** @method flags=no_gen */
 public static final native int /*long*/ put_accValue_CALLBACK(int /*long*/ func);
+/** @method flags=no_gen,callback_types=HRESULT;VARIANT;,callback_flags=none;struct; */
+public static final native int /*long*/ CALLBACK_setCurrentValue(int /*long*/ func);
 
 /* sizeof's */
 public static final native int CAUUID_sizeof();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java
index 81bd39f..6fea374 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleObject.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,6 +57,9 @@ public int SetHostNames(String szContainerApp, String szContainerObj) {
 	}
 	return COM.VtblCall(5, address, buffer1, buffer2);
 }
+public int Unadvise(int token) {
+	return COM.VtblCall(20, address, token);
+}
 public int Update() {
 	return COM.VtblCall(13, address);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java
new file mode 100644
index 0000000..fd073c5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IServiceProvider.java	
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.ole.win32;
+
+public class IServiceProvider extends IUnknown
+{
+public IServiceProvider(int /*long*/ address) {
+	super(address);
+}
+public int QueryService(GUID iid1, GUID iid2, int /*long*/ ppvObject[]) {
+	return COM.VtblCall(3, address, iid1, iid2, ppvObject);
+}
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java
index 46722dd..918d59e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DOCHOSTUIINFO.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,12 +14,9 @@ public class DOCHOSTUIINFO {
 	public int cbSize;
 	public int dwFlags;
 	public int dwDoubleClick;
-	/*
-	 * TODO uncomment the following two fields when 32-bit swt starts
-	 * compiling with a newer mssdk whose definition of DOCHOSTUIINFO
-	 * includes these fields.
-	 */
-//	public int /*long*/ pchHostCss;
-//	public int /*long*/ pchHostNS;
+	/** @field cast=(OLECHAR*),flags=no_wince*/
+	public int /*long*/ pchHostCss;
+	/** @field cast=(OLECHAR*),flags=no_wince */
+	public int /*long*/ pchHostNS;
 	public static final int sizeof = OS.DOCHOSTUIINFO_sizeof ();
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVINSERTMARK.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVINSERTMARK.java
new file mode 100644
index 0000000..8eed26f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/LVINSERTMARK.java	
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class LVINSERTMARK {
+	public int cbSize;
+	public int dwFlags;
+	public int iItem;
+	public int dwReserved;
+	public static final int sizeof = OS.LVINSERTMARK_sizeof ();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java
index 4af75c0..f785acb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ public class OS extends C {
 	static {
 		Library.loadLibrary ("swt"); //$NON-NLS-1$
 	}
-
+	
 	/*
 	* SWT Windows flags
 	*/
@@ -120,7 +120,7 @@ public class OS extends C {
 		}
 		
 		/* Make the process DPI aware for Windows Vista */
-		if (OS.WIN32_VERSION >= OS.VERSION (6, 0)) OS.SetProcessDPIAware ();
+		if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) OS.SetProcessDPIAware ();
 
 		/* Get the DBCS flag */
 		boolean dbcsEnabled = OS.GetSystemMetrics (SM_DBCSENABLED) != 0;
@@ -340,6 +340,7 @@ public class OS extends C {
 	public static final int BTNS_GROUP = 0x4;
 	public static final int BTNS_SEP = 0x1;
 	public static final int BTNS_SHOWTEXT = 0x40;
+	public static final int CBN_DROPDOWN = 0x7;
 	public static final int CBN_EDITCHANGE = 0x5;
 	public static final int CBN_KILLFOCUS = 0x4;
 	public static final int CBN_SELCHANGE = 0x1;
@@ -463,6 +464,8 @@ public class OS extends C {
 	public static final int CLR_INVALID = 0xffffffff;
 	public static final int CLR_NONE = 0xffffffff;
 	public static final int CLSCTX_INPROC_SERVER = 1;
+	public static final int CSIDL_APPDATA = 0x1a;
+	public static final int CSIDL_LOCAL_APPDATA = 0x1c;
 	public static final int COLORONCOLOR = 0x3;
 	public static final int COLOR_3DDKSHADOW = 0x15 | SYS_COLOR_INDEX_FLAG;
 	public static final int COLOR_3DFACE = 0xf | SYS_COLOR_INDEX_FLAG;
@@ -659,17 +662,24 @@ public class OS extends C {
 	public static final int ETS_READONLY = 6;
 	public static final int EVENT_OBJECT_FOCUS = 0x8005;
 	public static final int EVENT_OBJECT_LOCATIONCHANGE = 0x800B;
-//	public static final int EVENT_OBJECT_SELECTION = 0x8006;
 	public static final int EVENT_OBJECT_SELECTIONWITHIN = 0x8009;
-//	public static final int EVENT_OBJECT_STATECHANGE = 0x800A;
 	public static final int EVENT_OBJECT_VALUECHANGE = 0x800E;
+	public static final short FADF_FIXEDSIZE = 0x10;
+	public static final short FADF_HAVEVARTYPE = 0x80;
 	public static final int FALT = 0x10;
 	public static final int FCONTROL = 0x8;
 	public static final int FE_FONTSMOOTHINGCLEARTYPE = 0x0002;
 	public static final int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
-	public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080; 
+	public static final int FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
+	public static final int FILE_ATTRIBUTE_NORMAL = 0x00000080;
+	public static final int FILE_MAP_READ = 4;
 	public static final int FNERR_INVALIDFILENAME = 0x3002;
 	public static final int FNERR_BUFFERTOOSMALL = 0x3003;
+	public static final int FOF_SILENT = 0x0004;
+	public static final int FOF_NOCONFIRMATION = 0x0010;
+	public static final int FOF_NOCONFIRMMKDIR = 0x0200;
+	public static final int FOF_NOERRORUI = 0x0400;
+	public static final int FOF_NO_UI = (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR); 
 	public static final int FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100;
 	public static final int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000;
 	public static final int FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200;
@@ -689,6 +699,7 @@ public class OS extends C {
 	public static final int GCS_CURSORPOS = 0x0080;
 	public static final int GDT_VALID = 0;
 	public static final int GET_FEATURE_FROM_PROCESS = 0x2;
+	public static final int GGI_MARK_NONEXISTING_GLYPHS = 1;
 	public static final int GLPS_CLOSED = 1;
 	public static final int GLPS_OPENED = 2;
 	public static final int GM_ADVANCED = 2;
@@ -868,6 +879,7 @@ public class OS extends C {
 	public static final int KEY_NOTIFY = 0x10;
 	public static final int KEY_QUERY_VALUE = 0x1;
 	public static final int KEY_READ = 0x20019;
+	public static final int KEYEVENTF_EXTENDEDKEY = 0x0001;
 	public static final int KEYEVENTF_KEYUP = 0x0002;
 	public static final int L_MAX_URL_LENGTH = 2084;
 //	public static final int LANG_KOREAN = 0x12;
@@ -981,6 +993,7 @@ public class OS extends C {
 	public static final int LVIF_INDENT = 0x10;
 	public static final int LVIF_STATE = 0x8;
 	public static final int LVIF_TEXT = 0x1;
+	public static final int LVIM_AFTER = 0x00000001; 
 	public static final int LVIR_BOUNDS = 0x0;
 	public static final int LVIR_ICON = 0x1;
 	public static final int LVIR_LABEL = 0x2;
@@ -1030,6 +1043,7 @@ public class OS extends C {
 	public static final int LVM_SETCOLUMNWIDTH = 0x101e;
 	public static final int LVM_SETEXTENDEDLISTVIEWSTYLE = 0x1036;
 	public static final int LVM_SETIMAGELIST = 0x1003;
+	public static final int LVM_SETINSERTMARK = LVM_FIRST + 166;
 	public static final int LVM_SETITEM = IsUnicode ? 0x104c : 0x1006;
 	public static final int LVM_SETITEMCOUNT = LVM_FIRST + 47;
 	public static final int LVM_SETITEMSTATE = 0x102b;
@@ -1409,6 +1423,10 @@ public class OS extends C {
 	public static final int SBS_VERT = 0x1;
 	public static final int SB_BOTH = 0x3;
 	public static final int SB_BOTTOM = 0x7;
+	public static final int SB_NONE = 0;
+	public static final int SB_CONST_ALPHA = 0x00000001;
+	public static final int SB_PIXEL_ALPHA = 0x00000002;
+	public static final int SB_PREMULT_ALPHA = 0x00000004;
 	public static final int SB_CTL = 0x2;
 	public static final int SB_ENDSCROLL = 0x8;
 	public static final int SB_HORZ = 0x0;
@@ -1440,9 +1458,11 @@ public class OS extends C {
 	public static final int SEM_FAILCRITICALERRORS = 0x1;
 	public static final int SET_FEATURE_ON_PROCESS = 0x2;
 	public static final int SF_RTF = 0x2;
+	public static final int SHADEBLENDCAPS = 120;
 	public static final int SHCMBF_HIDDEN = 0x2;
 	public static final int SHCMBM_OVERRIDEKEY = 0x400 + 403;
 	public static final int SHCMBM_SETSUBMENU = 0x590;
+	public static final int SHGFP_TYPE_CURRENT = 0;
 	public static final int SHCMBM_GETSUBMENU = 0x591;
 	public static final int SHGFI_ICON = 0x000000100;
 	public static final int SHGFI_SMALLICON= 0x1;
@@ -1450,6 +1470,7 @@ public class OS extends C {
 	public static final int SHMBOF_NODEFAULT = 0x1;
 	public static final int SHMBOF_NOTIFY = 0x2;
 	public static final int SHRG_RETURNCMD = 0x1;
+	public static final int SIGDN_FILESYSPATH = 0x80058000;
 	public static final int SIF_ALL = 0x17;
 	public static final int SIF_DISABLENOSCROLL = 0x8;
 	public static final int SIF_PAGE = 0x2;
@@ -1647,6 +1668,11 @@ public class OS extends C {
 	public static final int TB_SETROWS = 0x427;
 	public static final int TB_SETSTATE = 0x411;
 	public static final int TB_THUMBPOSITION = 0x4;
+	public static final int TBPF_NOPROGRESS = 0x0;
+	public static final int TBPF_INDETERMINATE = 0x1;
+	public static final int TBPF_NORMAL = 0x2;
+	public static final int TBPF_ERROR = 0x4;
+	public static final int TBPF_PAUSED = 0x8;
 	public static final int TCIF_IMAGE = 0x2;
 	public static final int TCIF_TEXT = 0x1;
 	public static final int TCI_SRCCHARSET = 0x1;
@@ -1926,6 +1952,11 @@ public class OS extends C {
 	public static final int VK_F13 = 0x7c;
 	public static final int VK_F14 = 0x7d;
 	public static final int VK_F15 = 0x7e;
+	public static final int VK_F16 = 0x7F;
+	public static final int VK_F17 = 0x80;
+	public static final int VK_F18 = 0x81;
+	public static final int VK_F19 = 0x82;
+	public static final int VK_F20 = 0x83;
 	public static final int VK_F2 = 0x71;
 	public static final int VK_F3 = 0x72;
 	public static final int VK_F4 = 0x73;
@@ -1939,6 +1970,9 @@ public class OS extends C {
 	public static final int VK_L = 0x4c;
 	public static final int VK_LBUTTON = 0x1;
 	public static final int VK_LEFT = 0x25;
+	public static final int VK_LCONTROL = 0xA2;
+	public static final int VK_LMENU = 0xA4;
+	public static final int VK_LSHIFT = 0xA0;
 	public static final int VK_MBUTTON = 0x4;
 	public static final int VK_MENU = 0x12;
 	public static final int VK_MULTIPLY = 0x6A;
@@ -1960,6 +1994,9 @@ public class OS extends C {
 	public static final int VK_RBUTTON = 0x2;
 	public static final int VK_RETURN = 0xd;
 	public static final int VK_RIGHT = 0x27;
+	public static final int VK_RCONTROL = 0xA3;
+	public static final int VK_RMENU = 0xA5;
+	public static final int VK_RSHIFT = 0xA1;
 	public static final int VK_SCROLL = 0x91;
 	public static final int VK_SEPARATOR = 0x6C;
 	public static final int VK_SHIFT = 0x10;
@@ -1977,6 +2014,10 @@ public class OS extends C {
 	public static final int VK_APP4 = 0xc4;
 	public static final int VK_APP5 = 0xc5;
 	public static final int VK_APP6 = 0xc6;
+	public static final int VT_BOOL = 11;
+	public static final int VT_LPWSTR = 31;
+	public static final short VARIANT_TRUE = -1;
+	public static final short VARIANT_FALSE = 0;
 	public static final String WC_HEADER = "SysHeader32"; //$NON-NLS-1$
 	public static final String WC_LINK = "SysLink"; //$NON-NLS-1$
 	public static final String WC_LISTVIEW = "SysListView32"; //$NON-NLS-1$
@@ -1990,6 +2031,7 @@ public class OS extends C {
 	public static final int WHEEL_DELTA = 120;
 	public static final int WHEEL_PAGESCROLL = 0xFFFFFFFF;
 	public static final int WHITE_BRUSH = 0;
+	public static final int WHITENESS = 0x00FF0062;
 	public static final int WM_ACTIVATE = 0x6;
 	public static final int WM_ACTIVATEAPP = 0x1c;
 	public static final int WM_APP = 0x8000;
@@ -2053,6 +2095,7 @@ public class OS extends C {
 	public static final int WM_MOUSELEAVE = 0x2a3;
 	public static final int WM_MOUSEMOVE = 0x200;
 	public static final int WM_MOUSEWHEEL = 0x20a;
+	public static final int WM_MOUSEHWHEEL = 0x20e;
 	public static final int WM_MOUSELAST = 0x20d;
 	public static final int WM_MOVE = 0x3;
 	public static final int WM_NCACTIVATE = 0x86;
@@ -2190,6 +2233,7 @@ public static final native int LOGPEN_sizeof ();
 public static final native int LVCOLUMN_sizeof ();
 public static final native int LVHITTESTINFO_sizeof ();
 public static final native int LVITEM_sizeof ();
+public static final native int LVINSERTMARK_sizeof ();
 public static final native int MARGINS_sizeof ();
 public static final native int MCHITTESTINFO_sizeof ();
 public static final native int MEASUREITEMSTRUCT_sizeof ();
@@ -2241,8 +2285,12 @@ public static final native int PANOSE_sizeof ();
 public static final native int POINT_sizeof ();
 public static final native int PRINTDLG_sizeof ();
 public static final native int PROCESS_INFORMATION_sizeof ();
+public static final native int PROPVARIANT_sizeof ();
+public static final native int PROPERTYKEY_sizeof ();
 public static final native int REBARBANDINFO_sizeof ();
 public static final native int RECT_sizeof ();
+public static final native int SAFEARRAY_sizeof ();
+public static final native int SAFEARRAYBOUND_sizeof ();
 public static final native int SCRIPT_ANALYSIS_sizeof ();
 public static final native int SCRIPT_CONTROL_sizeof ();
 public static final native int SCRIPT_DIGITSUBSTITUTE_sizeof ();
@@ -3129,6 +3177,11 @@ public static final int /*long*/ SendMessage (int /*long*/ hWnd, int Msg, int /*
 	return SendMessageA (hWnd, Msg, wParam, lParam);
 }
 
+public static final int /*long*/ SendMessage (int /*long*/ hWnd, int Msg, int /*long*/ wParam, LVINSERTMARK lParam) {
+	if (IsUnicode) return SendMessageW (hWnd, Msg, wParam, lParam);
+	return SendMessageA (hWnd, Msg, wParam, lParam);
+}
+
 public static final int /*long*/ SendMessage (int /*long*/ hWnd, int Msg, int /*long*/ wParam, MARGINS lParam) {
 	if (IsUnicode) return SendMessageW (hWnd, Msg, wParam, lParam);
 	return SendMessageA (hWnd, Msg, wParam, lParam);
@@ -3292,6 +3345,15 @@ public static final boolean Shell_NotifyIcon (int dwMessage, NOTIFYICONDATA lpDa
 	return Shell_NotifyIconA (dwMessage, (NOTIFYICONDATAA)lpData);
 }
 
+public static final int SHGetFolderPath (int /*long*/ hwndOwner, int nFolder, int /*long*/ hToken, int dwFlags, TCHAR pszPath) {
+	if (IsUnicode) {
+		char [] pszPath1 = pszPath == null ? null : pszPath.chars;
+		return SHGetFolderPathW (hwndOwner, nFolder, hToken, dwFlags, pszPath1);
+	}
+	byte [] pszPath1 = pszPath == null ? null : pszPath.bytes;
+	return SHGetFolderPathA (hwndOwner, nFolder, hToken, dwFlags, pszPath1);
+}
+
 public static final boolean SHGetPathFromIDList (int /*long*/ pidl, TCHAR pszPath) {
 	if (IsUnicode) {
 		char [] pszPath1 = pszPath == null ? null : pszPath.chars;
@@ -3512,6 +3574,10 @@ public static final native boolean CommandBar_Show (int /*long*/ hwndCB, boolean
 public static final native int CommDlgExtendedError ();
 /** @param hImage cast=(HANDLE) */
 public static final native int /*long*/ CopyImage (int /*long*/ hImage, int uType, int cxDesired, int cyDesired, int fuFlags);
+/** @param cb cast=(ULONG) */
+public static final native int /*long*/ CoTaskMemAlloc(int cb);
+/** @param pv cast=(LPVOID) */
+public static final native void CoTaskMemFree(int /*long*/ pv);
 /** @param lpaccl cast=(LPACCEL) */
 public static final native int /*long*/ CreateAcceleratorTableW (byte [] lpaccl, int cEntries); 
 /** @param lpaccl cast=(LPACCEL) */
@@ -4094,6 +4160,11 @@ public static final native int /*long*/ GetForegroundWindow ();
 /** @param hdc cast=(HDC) */
 public static final native int GetGraphicsMode (int /*long*/ hdc);
 /**
+ * @param hdc cast=(HDC)
+ * @param pgi cast=(LPWORD)
+ */
+public static final native int GetGlyphIndicesW(int /*long*/ hdc, char[] lpstr, int c, short[] pgi, int fl);
+/**
  * @param idThread cast=(DWORD)
  * @param lpgui cast=(LPGUITHREADINFO)
  */
@@ -5027,6 +5098,11 @@ public static final native void MoveMemory (int /*long*/ Destination, RECT Sourc
  * @param Destination cast=(PVOID)
  * @param Source cast=(CONST VOID *),flags=no_out
  */
+public static final native void MoveMemory (int /*long*/ Destination, SAFEARRAY Source, int Length);
+/**
+ * @param Destination cast=(PVOID)
+ * @param Source cast=(CONST VOID *),flags=no_out
+ */
 public static final native void MoveMemory (int /*long*/ Destination, TRIVERTEX Source, int Length);
 /**
  * @param Destination cast=(PVOID)
@@ -5401,6 +5477,8 @@ public static final native boolean OpenClipboard (int /*long*/ hWndNewOwner);
 public static final native int /*long*/ OpenThemeData (int /*long*/ hwnd, char[] pszClassList);
 /** @param hdc cast=(HDC) */
 public static final native boolean PatBlt (int /*long*/ hdc, int x1, int x2, int w, int h, int rop);
+/** @param szfile cast=(LPCWSTR) */
+public static final native boolean PathIsExe (int /*long*/ szfile);
 /** @param hWnd cast=(HWND) */
 public static final native boolean PeekMessageW (MSG lpMsg, int /*long*/ hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);
 /** @param hWnd cast=(HWND) */
@@ -5451,6 +5529,8 @@ public static final native boolean PrintDlgA (PRINTDLG lppd);
  * @param hdcBlt cast=(HDC)
  */
 public static final native boolean PrintWindow (int /*long*/ hwnd, int /*long*/ hdcBlt, int nFlags);
+/** @method flags=dynamic */
+public static final native int PSPropertyKeyFromString (char[] pszString, PROPERTYKEY pkey);
 /**
  * @param rect flags=no_out
  * @param pt flags=no_out struct
@@ -5834,6 +5914,12 @@ public static final native int /*long*/ SendMessageW (int /*long*/ hWnd, int Msg
  * @param wParam cast=(WPARAM)
  * @param lParam cast=(LPARAM)
  */
+public static final native int /*long*/ SendMessageW (int /*long*/ hWnd, int Msg, int /*long*/ wParam, LVINSERTMARK lParam);
+/**
+ * @param hWnd cast=(HWND)
+ * @param wParam cast=(WPARAM)
+ * @param lParam cast=(LPARAM)
+ */
 public static final native int /*long*/ SendMessageW (int /*long*/ hWnd, int Msg, int /*long*/ wParam, MARGINS lParam);
 /**
  * @param hWnd cast=(HWND)
@@ -6026,6 +6112,12 @@ public static final native int /*long*/ SendMessageA (int /*long*/ hWnd, int Msg
  * @param wParam cast=(WPARAM)
  * @param lParam cast=(LPARAM)
  */
+public static final native int /*long*/ SendMessageA (int /*long*/ hWnd, int Msg, int /*long*/ wParam, LVINSERTMARK lParam);
+/**
+ * @param hWnd cast=(HWND)
+ * @param wParam cast=(WPARAM)
+ * @param lParam cast=(LPARAM)
+ */
 public static final native int /*long*/ SendMessageA (int /*long*/ hWnd, int Msg, int /*long*/ wParam, LVITEM lParam);
 /**
  * @param hWnd cast=(HWND)
@@ -6178,6 +6270,8 @@ public static final native int /*long*/ SetCapture (int /*long*/ hWnd);
 public static final native boolean SetCaretPos (int X, int Y);
 /** @param hMem cast=(HANDLE) */
 public static final native int /*long*/ SetClipboardData (int uFormat, int /*long*/ hMem);
+/** @method flags=dynamic */
+public static final native int SetCurrentProcessExplicitAppUserModelID (char[] AppID);
 /** @param hCursor cast=(HCURSOR) */
 public static final native int /*long*/ SetCursor (int /*long*/ hCursor);
 public static final native boolean SetCursorPos (int X, int Y);
@@ -6363,6 +6457,18 @@ public static final native int /*long*/ SHGetFileInfoW (char [] pszPath, int dwF
  * @param psfi cast=(SHFILEINFOA *)
  */
 public static final native int /*long*/ SHGetFileInfoA (byte [] pszPath, int dwFileAttributes, SHFILEINFOA psfi, int cbFileInfo, int uFlags);
+/**
+ * @param hwndOwner cast=(HWND)
+ * @param hToken cast=(HANDLE)
+ * @param pszPath cast=(LPWSTR)
+ */
+public static final native int SHGetFolderPathW (int /*long*/ hwndOwner, int nFolder, int /*long*/ hToken, int dwFlags, char[] pszPath);
+/**
+ * @param hwndOwner cast=(HWND)
+ * @param hToken cast=(HANDLE)
+ * @param pszPath cast=(LPSTR)
+ */
+public static final native int SHGetFolderPathA (int /*long*/ hwndOwner, int nFolder, int /*long*/ hToken, int dwFlags, byte[] pszPath);
 /** @param hwnd cast=(HWND) */
 public static final native boolean SHHandleWMSettingChange (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam, SHACTIVATEINFO psai);
 public static final native int SHRecognizeGesture (SHRGINFO shrg);
@@ -6386,6 +6492,10 @@ public static final native boolean SHGetPathFromIDListW (int /*long*/ pidl, char
  * @param pszPath cast=(LPSTR)
  */
 public static final native boolean SHGetPathFromIDListA (int /*long*/ pidl, byte [] pszPath);
+/** @method flags=dynamic */
+public static final native int SHCreateItemInKnownFolder (byte [] kfid, int dwKFFlags, char [] pszItem, byte [] riid, int /*long*/ [] ppv);
+/** @method flags=dynamic */
+public static final native int SHCreateItemFromRelativeName (int /*long*/ psiParent, char [] pszName, int /*long*/ pbc, byte [] riid, int /*long*/ [] ppv);
 /**
  * @param bVk cast=(BYTE)
  * @param hwnd cast=(HWND)
@@ -6522,6 +6632,23 @@ public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, byte
 public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int arg0, int /*long*/[] arg1, int[] arg2);
 public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, TF_DISPLAYATTRIBUTE arg0);
 
+public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, int arg0, long arg1, long arg2);
+public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, long arg0, long arg1, long arg2);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1, int arg2);
+
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int arg0, int arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, long arg0, int arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int[] arg0, byte[] arg1, int[] arg2);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int[] arg0, byte[] arg1, long[] arg2);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, char[] arg0);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, char[] arg0, int arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, char[] arg0, long arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, PROPERTYKEY arg0, int arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, PROPERTYKEY arg0, long arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int /*long*/ arg0, int arg1, char[] arg2, char[] arg3, int /*long*/ arg4);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int arg0, int [] arg1);
+public static final native int VtblCall (int fnNumber, int /*long*/ ppVtbl, int arg0, long [] arg1);
+
 public static final native boolean WaitMessage ();
 /**
  * @param lpWideCharStr cast=(LPCWSTR),flags=no_out critical
@@ -6543,4 +6670,37 @@ public static final native int /*long*/ WindowFromDC (int /*long*/ hDC);
 public static final native int /*long*/ WindowFromPoint (POINT lpPoint);
 /** @param string cast=(const wchar_t *) */
 public static final native int wcslen (int /*long*/ string);
+
+/** @param hFileMappingObject cast=(HANDLE) 
+ *  @param dwDesiredAccess cast=(DWORD)
+ *  @param dwFileOffsetHigh cast=(DWORD)
+ *  @param dwFileOffsetLow cast=(DWORD)
+ */
+public static final native int /*long*/ MapViewOfFile(int /*long*/ hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap);
+/** @param lpBaseAddress cast=(LPCVOID) */
+public static final native boolean UnmapViewOfFile(int /*long*/ lpBaseAddress);
+
+public static final int PROCESS_DUP_HANDLE = 0x0040;
+public static final int PROCESS_VM_READ = 0x0010;
+public static final int DUPLICATE_SAME_ACCESS = 2;
+
+/**
+ * @param dwDesiredAccess cast=(DWORD)
+ * @param dwProcessId cast=(DWORD)
+ */
+public static final native int /*long*/ OpenProcess(int dwDesiredAccess, boolean bInheritHandle, int dwProcessId);
+
+public static final native int /*long*/ GetCurrentProcess();
+
+/**
+ * @param hSourceProcessHandle cast=(HANDLE) 
+ * @param hSourceHandle cast=(HANDLE) 
+ * @param hTargetProcessHandle cast=(HANDLE) 
+ * @param lpTargetHandle cast=(LPHANDLE)
+ * @param dwDesiredAccess cast=(DWORD) 
+ * @param dwOptions cast=(DWORD) 
+ */
+public static final native boolean DuplicateHandle(int /*long*/ hSourceProcessHandle, int /*long*/ hSourceHandle, int /*long*/ hTargetProcessHandle,
+		int /*long*/ [] lpTargetHandle, int dwDesiredAccess, boolean b, int dwOptions);
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROPERTYKEY.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROPERTYKEY.java
new file mode 100644
index 0000000..5cedc78
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/PROPERTYKEY.java	
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class PROPERTYKEY {
+	/** @field flags=struct */
+	public byte [] fmtid = new byte [16];
+	public int pid;
+	public static final int sizeof = OS.PROPERTYKEY_sizeof ();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java
new file mode 100644
index 0000000..020c1a6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAY.java	
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class SAFEARRAY {
+	public short cDims;
+	public short fFeatures;
+	public int cbElements;
+	public int cLocks;
+	/** @field cast=(PVOID) */
+	public int /*long*/ pvData;
+	/** @field accessor=rgsabound[0] */
+	public SAFEARRAYBOUND rgsabound;
+
+	public static final int sizeof = OS.SAFEARRAY_sizeof ();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java
new file mode 100644
index 0000000..5c236bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/SAFEARRAYBOUND.java	
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.win32;
+
+public class SAFEARRAYBOUND {
+	public int cElements;
+	public int lLbound;
+	public static final int sizeof = OS.SAFEARRAYBOUND_sizeof ();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/build.xml b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/build.xml
deleted file mode 100644
index e082f7d..0000000
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/build.xml	
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
<!--
-    Copyright (c) 2009 IBM Corporation and others.
-    All rights reserved. This program and the accompanying materials
-    are made available under the terms of the Eclipse Public License v1.0
-    which accompanies this distribution, and is available at
-    http://www.eclipse.org/legal/epl-v10.html
-   
-    Contributors:
-        IBM Corporation - initial API and implementation
- -->
-
-<project default="build_dll" basedir="../../..">
-
-<target name="init">
-	<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite" />
-	<eclipse.refreshLocal resource="org.eclipse.swt.tools" depth="infinite" />	
-   	<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr" />
-</target>
-
-<target name="build_dll" depends="init">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="install"/>
-	</exec>
-	<eclipse.refreshLocal resource="org.eclipse.swt.wpf.win32.x86" depth="infinite" />
-</target>
-
-<target name="clean">
-	<exec dir="./bin/library" executable="${basedir}\bin\library\build.bat">
-		<arg line="clean"/>
-	</exec>
-</target>
-    
-</project>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp
index 1e61948..f0d15cc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os.cpp	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9796,6 +9796,19 @@ JNIEXPORT void JNICALL OS_NATIVE(ScrollBar_1Scroll)
 }
 #endif
 
+#ifndef NO_ScrollBar_1Track
+extern "C" JNIEXPORT jint JNICALL OS_NATIVE(ScrollBar_1Track)(JNIEnv *env, jclass that, jint arg0);
+JNIEXPORT jint JNICALL OS_NATIVE(ScrollBar_1Track)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, ScrollBar_1Track_FUNC);
+	rc = (jint)TO_HANDLE(((ScrollBar^)TO_OBJECT(arg0))->Track);
+	OS_NATIVE_EXIT(env, that, ScrollBar_1Track_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_ScrollBar_1ViewportSize__I
 extern "C" JNIEXPORT jdouble JNICALL OS_NATIVE(ScrollBar_1ViewportSize__I)(JNIEnv *env, jclass that, jint arg0);
 JNIEXPORT jdouble JNICALL OS_NATIVE(ScrollBar_1ViewportSize__I)
@@ -12566,6 +12579,19 @@ JNIEXPORT jint JNICALL OS_NATIVE(ToolBar_1typeid)
 }
 #endif
 
+#ifndef NO_Track_1Thumb
+extern "C" JNIEXPORT jint JNICALL OS_NATIVE(Track_1Thumb)(JNIEnv *env, jclass that, jint arg0);
+JNIEXPORT jint JNICALL OS_NATIVE(Track_1Thumb)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, Track_1Thumb_FUNC);
+	rc = (jint)TO_HANDLE(((Track^)TO_OBJECT(arg0))->Thumb);
+	OS_NATIVE_EXIT(env, that, Track_1Thumb_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_TransformCollection_1Add
 extern "C" JNIEXPORT void JNICALL OS_NATIVE(TransformCollection_1Add)(JNIEnv *env, jclass that, jint arg0, jint arg1);
 JNIEXPORT void JNICALL OS_NATIVE(TransformCollection_1Add)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp
index 2ee0832..4e4ba51 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.cpp	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,8 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 1426;
-int OS_nativeFunctionCallCount[1426];
+int OS_nativeFunctionCount = 1428;
+int OS_nativeFunctionCallCount[1428];
 char * OS_nativeFunctionNames[] = {
 	"AccessText_1AccessKey",
 	"AccessText_1Text",
@@ -832,6 +832,7 @@ char * OS_nativeFunctionNames[] = {
 	"ScrollBar_1Orientation__I",
 	"ScrollBar_1Orientation__II",
 	"ScrollBar_1Scroll",
+	"ScrollBar_1Track",
 	"ScrollBar_1ViewportSize__I",
 	"ScrollBar_1ViewportSize__ID",
 	"ScrollBar_1typeid",
@@ -1060,6 +1061,7 @@ char * OS_nativeFunctionNames[] = {
 	"ToolBar_1SeparatorStyleKey",
 	"ToolBar_1SetOverflowMode",
 	"ToolBar_1typeid",
+	"Track_1Thumb",
 	"TransformCollection_1Add",
 	"TransformGroup_1Children",
 	"Transform_1Clone",
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h
index 7c15c32..288ae08 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/library/os_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -840,6 +840,7 @@ typedef enum {
 	ScrollBar_1Orientation__I_FUNC,
 	ScrollBar_1Orientation__II_FUNC,
 	ScrollBar_1Scroll_FUNC,
+	ScrollBar_1Track_FUNC,
 	ScrollBar_1ViewportSize__I_FUNC,
 	ScrollBar_1ViewportSize__ID_FUNC,
 	ScrollBar_1typeid_FUNC,
@@ -1068,6 +1069,7 @@ typedef enum {
 	ToolBar_1SeparatorStyleKey_FUNC,
 	ToolBar_1SetOverflowMode_FUNC,
 	ToolBar_1typeid_FUNC,
+	Track_1Thumb_FUNC,
 	TransformCollection_1Add_FUNC,
 	TransformGroup_1Children_FUNC,
 	Transform_1Clone_FUNC,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java
index 383ad11..5ce5945 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT PI/wpf/org/eclipse/swt/internal/wpf/OS.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -71,6 +71,11 @@ public class OS extends C {
 	public static final int Key_F13 = 102;
 	public static final int Key_F14 = 103;
 	public static final int Key_F15 = 104;
+	public static final int Key_F16 = 105;
+	public static final int Key_F17 = 106;
+	public static final int Key_F18 = 107;
+	public static final int Key_F19 = 108;
+	public static final int Key_F20 = 109;
 	public static final int Key_Back = 2;
 	public static final int Key_Return = 6;
 	public static final int Key_Delete = 32;
@@ -453,2107 +458,2107 @@ public static final native Object JNIGetObject(int globalRef);
 
 /**
  * @method flags=getter
- * @param sender cast=(AccessText^),flags=gcobject
+ * @param sender cast=(AccessText^),flags=object
  */
 public static final native char AccessText_AccessKey(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(AccessText^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(AccessText^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void AccessText_Text(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(AccessText^),flags=gcobject
+ * @param sender cast=(AccessText^),flags=object
  * @param value cast=(TextWrapping)
  */
 public static final native void AccessText_TextWrapping(int sender, int value);
-/** @method accessor=ApplicationCommands::Cut,flags=const gcobject */
+/** @method accessor=ApplicationCommands::Cut,flags=const object */
 public static final native int ApplicationCommands_Cut();
-/** @method accessor=ApplicationCommands::Paste,flags=const gcobject */
+/** @method accessor=ApplicationCommands::Paste,flags=const object */
 public static final native int ApplicationCommands_Paste();
-/** @method accessor=ApplicationCommands::Redo,flags=const gcobject */
+/** @method accessor=ApplicationCommands::Redo,flags=const object */
 public static final native int ApplicationCommands_Redo();
-/** @method accessor=ApplicationCommands::Undo,flags=const gcobject */
+/** @method accessor=ApplicationCommands::Undo,flags=const object */
 public static final native int ApplicationCommands_Undo();
-/** @method accessor=Application::Current,flags=const gcobject */
+/** @method accessor=Application::Current,flags=const object */
 public static final native int Application_Current();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Application ^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Application ^),flags=object
  */
 public static final native int Application_Dispatcher(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Application^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Application^),flags=object
  */
 public static final native int Application_Resources(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Application^),flags=gcobject
- * @param value cast=(ResourceDictionary^),flags=gcobject
+ * @param sender cast=(Application^),flags=object
+ * @param value cast=(ResourceDictionary^),flags=object
  */
 public static final native void Application_Resources(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(Application^),flags=gcobject
+ * @param sender cast=(Application^),flags=object
  */
 public static final native void Application_Run(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Application^),flags=gcobject
+ * @param sender cast=(Application^),flags=object
  */
 public static final native void Application_Shutdown(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Application^),flags=gcobject
+ * @param sender cast=(Application^),flags=object
  * @param value cast=(ShutdownMode)
  */
 public static final native void Application_ShutdownMode(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Application^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Application^),flags=object
  */
 public static final native int Application_Windows(int sender);
 /**
- * @method accessor=Array::CreateInstance,flags=gcobject
- * @param elementType cast=(Type^),flags=gcobject
+ * @method accessor=Array::CreateInstance,flags=object
+ * @param elementType cast=(Type^),flags=object
  */
 public static final native int Array_CreateInstance(int elementType, int length);
 /**
  * @method flags=cpp
- * @param sender cast=(Array^),flags=gcobject
+ * @param sender cast=(Array^),flags=object
  */
 public static final native int Array_GetLength(int sender, int dimension);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Array^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Array^),flags=object
  */
 public static final native int Array_GetValue (int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(Array^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(Array^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void Array_SetValue (int sender, int value, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(ArrayList^),flags=gcobject
+ * @param sender cast=(ArrayList^),flags=object
  */
 public static final native void ArrayList_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ArrayList^),flags=gcobject
+ * @param sender cast=(ArrayList^),flags=object
  */
 public static final native int ArrayList_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ArrayList^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ArrayList^),flags=object
  */
 public static final native int ArrayList_default(int sender, int index);
 /**
  * @method flags=setter
- * @param sender cast=(ArrayList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(ArrayList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void ArrayList_default(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ArrayList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(ArrayList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void ArrayList_Insert(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ArrayList^),flags=gcobject
+ * @param sender cast=(ArrayList^),flags=object
  */
 public static final native void ArrayList_RemoveAt(int sender, int index);
 /**
  * @method flags=setter
- * @param sender cast=(Binding^),flags=gcobject
- * @param value cast=(RelativeSource^),flags=gcobject
+ * @param sender cast=(Binding^),flags=object
+ * @param value cast=(RelativeSource^),flags=object
  */
 public static final native void Binding_RelativeSource(int sender, int value);
 /**
  * @method flags=no_gen cpp
- * @param sender cast=(System::Drawing::Bitmap^),flags=gcobject
+ * @param sender cast=(System::Drawing::Bitmap^),flags=object
  */
 public static final native int Bitmap_GetHicon(int sender);
 /**
- * @method accessor=BitmapDecoder::Create,flags=gcobject
- * @param stream cast=(System::IO::Stream^),flags=gcobject
+ * @method accessor=BitmapDecoder::Create,flags=object
+ * @param stream cast=(System::IO::Stream^),flags=object
  * @param createOptions cast=(BitmapCreateOptions)
  * @param cacheOption cast=(BitmapCacheOption)
  */
 public static final native int BitmapDecoder_Create(int stream, int createOptions, int cacheOption);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapDecoder^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapDecoder^),flags=object
  */
 public static final native int BitmapDecoder_Frames(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapEncoder^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapEncoder^),flags=object
  */
 public static final native int BitmapEncoder_Frames(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(BitmapEncoder^),flags=gcobject
- * @param stream cast=(System::IO::Stream^),flags=gcobject
+ * @param sender cast=(BitmapEncoder^),flags=object
+ * @param stream cast=(System::IO::Stream^),flags=object
  */
 public static final native void BitmapEncoder_Save(int sender, int stream);
 /**
- * @method accessor=BitmapFrame::Create,flags=gcobject
- * @param source cast=(BitmapSource^),flags=gcobject
+ * @method accessor=BitmapFrame::Create,flags=object
+ * @param source cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapFrame_Create(int source);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Collections::Generic::IList<BitmapFrame^>^),flags=gcobject
- * @param frame cast=(BitmapFrame^),flags=gcobject
+ * @param sender cast=(System::Collections::Generic::IList<BitmapFrame^>^),flags=object
+ * @param frame cast=(BitmapFrame^),flags=object
  */
 public static final native void BitmapFrameCollection_Add(int sender, int frame);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Collections::Generic::IList<BitmapFrame^>^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Collections::Generic::IList<BitmapFrame^>^),flags=object
  */
 public static final native int BitmapFrameCollection_default(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(BitmapImage^),flags=gcobject
+ * @param sender cast=(BitmapImage^),flags=object
  */
 public static final native void BitmapImage_BeginInit(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(BitmapImage^),flags=gcobject
+ * @param sender cast=(BitmapImage^),flags=object
  * @param value cast=(BitmapCreateOptions)
  */
 public static final native void BitmapImage_CreateOptions(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(BitmapImage^),flags=gcobject
+ * @param sender cast=(BitmapImage^),flags=object
  */
 public static final native void BitmapImage_EndInit(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(BitmapImage^),flags=gcobject
- * @param uri cast=(Uri^),flags=gcobject
+ * @param sender cast=(BitmapImage^),flags=object
+ * @param uri cast=(Uri^),flags=object
  */
 public static final native void BitmapImage_UriSource(int sender, int uri);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapPalette^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapPalette^),flags=object
  */
 public static final native int BitmapPalette_Colors(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(BitmapSource^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapSource_Clone(int sender);
 /**
- * @method accessor=BitmapSource::Create,flags=gcobject
- * @param pixelFormat cast=(PixelFormat),flags=gcobject
- * @param palette cast=(BitmapPalette^),flags=gcobject
+ * @method accessor=BitmapSource::Create,flags=object
+ * @param pixelFormat cast=(PixelFormat),flags=object
+ * @param palette cast=(BitmapPalette^),flags=object
  * @param buffer cast=(IntPtr)
  */
 public static final native int BitmapSource_Create(int pixelWidth, int pixelHeight, double dpiX, double dpiY, int pixelFormat, int palette, byte[] buffer, int bufferSize, int stride);
 /**
  * @method flags=cpp
- * @param sender cast=(BitmapSource^),flags=gcobject
- * @param sourceRect cast=(Int32Rect),flags=gcobject
+ * @param sender cast=(BitmapSource^),flags=object
+ * @param sourceRect cast=(Int32Rect),flags=object
  * @param buffer cast=(IntPtr)
  */
 public static final native void BitmapSource_CopyPixels(int sender, int sourceRect, byte[] buffer, int bufferSize, int stride);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapSource^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapSource_Format(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapSource^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapSource_Palette(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(BitmapSource^),flags=gcobject
+ * @param sender cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapSource_PixelHeight(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(BitmapSource^),flags=gcobject
+ * @param sender cast=(BitmapSource^),flags=object
  */
 public static final native int BitmapSource_PixelWidth(int sender);
-/** @method accessor=Border::typeid,flags=const gcobject */
+/** @method accessor=Border::typeid,flags=const object */
 public static final native int Border_typeid();
-/** @method accessor=Brushes::White,flags=const gcobject */
+/** @method accessor=Brushes::White,flags=const object */
 public static final native int Brushes_White();
-/** @method accessor=Brushes::Black,flags=const gcobject */
+/** @method accessor=Brushes::Black,flags=const object */
 public static final native int Brushes_Black();
-/** @method accessor=Brushes::Navy,flags=const gcobject */
+/** @method accessor=Brushes::Navy,flags=const object */
 public static final native int Brushes_Navy();
-/** @method accessor=Brushes::Red,flags=const gcobject */
+/** @method accessor=Brushes::Red,flags=const object */
 public static final native int Brushes_Red();
-/** @method accessor=Brushes::Transparent,flags=const gcobject */
+/** @method accessor=Brushes::Transparent,flags=const object */
 public static final native int Brushes_Transparent();
-/** @method accessor=Brushes::LightSkyBlue,flags=const gcobject */
+/** @method accessor=Brushes::LightSkyBlue,flags=const object */
 public static final native int Brushes_LightSkyBlue();
 /**
  * @method flags=setter
- * @param sender cast=(Brush^),flags=gcobject
+ * @param sender cast=(Brush^),flags=object
  */
 public static final native void Brush_Opacity(int sender, double opacity);
 /**
  * @method flags=getter
- * @param sender cast=(Button^),flags=gcobject
+ * @param sender cast=(Button^),flags=object
  */
 public static final native boolean Button_IsDefault(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Button^),flags=gcobject
+ * @param sender cast=(Button^),flags=object
  */
 public static final native void Button_IsDefault(int sender, boolean value);
 /**
  * @method flags=adder
- * @param sender cast=(ButtonBase^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(ButtonBase^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void ButtonBase_Click(int sender, int handler);
-/** @method accessor=ButtonBase::ClickEvent,flags=const gcobject */
+/** @method accessor=ButtonBase::ClickEvent,flags=const object */
 public static final native int ButtonBase_ClickEvent();
-/** @method accessor=Byte::typeid,flags=const gcobject */
+/** @method accessor=Byte::typeid,flags=const object */
 public static final native int Byte_typeid();
 /**
  * @method flags=setter
- * @param sender cast=(CancelEventArgs^),flags=gcobject
+ * @param sender cast=(CancelEventArgs^),flags=object
  */
 public static final native void CancelEventArgs_Cancel(int sender, boolean value);
 /**
  * @method accessor=Canvas::GetLeft
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native double Canvas_GetLeft(int element);
 /**
  * @method accessor=Canvas::GetTop
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native double Canvas_GetTop(int element);
 /**
  * @method accessor=Canvas::SetLeft
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Canvas_SetLeft(int element, double length);
 /**
  * @method accessor=Canvas::SetTop
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Canvas_SetTop(int element, double length);
-/** @method accessor=Canvas::typeid,flags=const gcobject */
+/** @method accessor=Canvas::typeid,flags=const object */
 public static final native int Canvas_typeid();
 /**
  * @method flags=getter
- * @param sender cast=(CharacterHit^),flags=gcobject
+ * @param sender cast=(CharacterHit^),flags=object
  */
 public static final native int CharacterHit_FirstCharacterIndex(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(CharacterHit^),flags=gcobject
+ * @param sender cast=(CharacterHit^),flags=object
  */
 public static final native int CharacterHit_TrailingLength(int sender);
-/** @method accessor=CheckBox::typeid,flags=const gcobject */
+/** @method accessor=CheckBox::typeid,flags=const object */
 public static final native int CheckBox_typeid();
 /** @method accessor=Clipboard::Clear */
 public static final native void Clipboard_Clear();
 /**
  * @method accessor=Clipboard::ContainsData
- * @param format cast=(String^),flags=gcobject
+ * @param format cast=(String^),flags=object
  */
 public static final native boolean Clipboard_ContainsData(int format);
 /**
- * @method accessor=Clipboard::GetData,flags=gcobject
- * @param format cast=(String^),flags=gcobject
+ * @method accessor=Clipboard::GetData,flags=object
+ * @param format cast=(String^),flags=object
  */
 public static final native int Clipboard_GetData(int format);
-/** @method accessor=Clipboard::GetDataObject,flags=gcobject */
+/** @method accessor=Clipboard::GetDataObject,flags=object */
 public static final native int Clipboard_GetDataObject();
-/** @method accessor=Clipboard::GetText,flags=gcobject */
+/** @method accessor=Clipboard::GetText,flags=object */
 public static final native int Clipboard_GetText();
 /**
  * @method accessor=Clipboard::SetData
- * @param format cast=(String^),flags=gcobject
- * @param data cast=(Object^),flags=gcobject
+ * @param format cast=(String^),flags=object
+ * @param data cast=(Object^),flags=object
  */
 public static final native void Clipboard_SetData(int format, int data);
 /**
  * @method accessor=Clipboard::SetDataObject
- * @param data cast=(Object^),flags=gcobject
+ * @param data cast=(Object^),flags=object
  */
 public static final native void Clipboard_SetDataObject(int data, boolean copy);
-/** @method accessor=Color::FromArgb,flags=struct gcobject */
+/** @method accessor=Color::FromArgb,flags=struct object */
 public static final native int Color_FromArgb(byte a, byte r, byte g, byte b);
 /**
  * @method flags=getter
- * @param sender cast=(Color^),flags=gcobject
+ * @param sender cast=(Color^),flags=object
  */
 public static final native byte Color_A(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Color^),flags=gcobject
+ * @param sender cast=(Color^),flags=object
  */
 public static final native byte Color_B(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Color^),flags=gcobject
+ * @param sender cast=(Color^),flags=object
  */
 public static final native byte Color_G(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Color^),flags=gcobject
+ * @param sender cast=(Color^),flags=object
  */
 public static final native byte Color_R(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=object
  */
 public static final native void ColorDialog_AnyColor(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=gcobject
- * @param color cast=(System::Drawing::Color),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=object
+ * @param color cast=(System::Drawing::Color),flags=object
  */
 public static final native void ColorDialog_Color(int sender, int color);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=object
  */
 public static final native int ColorDialog_Color(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=gcobject
- * @param colors cast=(array<int>^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=object
+ * @param colors cast=(array<int>^),flags=object
  */
 public static final native void ColorDialog_CustomColors(int sender, int colors);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::ColorDialog^),flags=object
  */
 public static final native int ColorDialog_CustomColors(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Collections::Generic::List<Color>^),flags=gcobject
- * @param color cast=(Color),flags=gcobject
+ * @param sender cast=(System::Collections::Generic::List<Color>^),flags=object
+ * @param color cast=(Color),flags=object
  */
 public static final native void ColorList_Add(int sender, int color);
 /**
  * @method flags=getter
- * @param sender cast=(System::Collections::Generic::IList<Color>^),flags=gcobject
+ * @param sender cast=(System::Collections::Generic::IList<Color>^),flags=object
  */
 public static final native int ColorList_Count(int sender);
 /**
- * @method flags=getter gcobject
- * @param sender cast=(System::Collections::Generic::IEnumerator<Color>^),flags=gcobject
+ * @method flags=getter object
+ * @param sender cast=(System::Collections::Generic::IEnumerator<Color>^),flags=object
  */
 public static final native int ColorList_Current(int sender);
 /**
- * @method flags=gcobject cpp
- * @param sender cast=(System::Collections::Generic::IEnumerable<Color>^),flags=gcobject
+ * @method flags=object cpp
+ * @param sender cast=(System::Collections::Generic::IEnumerable<Color>^),flags=object
  */
 public static final native int ColorList_GetEnumerator(int sender);
-/** @method accessor=Colors::White,flags=const struct gcobject */
+/** @method accessor=Colors::White,flags=const struct object */
 public static final native int Colors_White();
-/** @method accessor=Colors::Black,flags=const struct gcobject */
+/** @method accessor=Colors::Black,flags=const struct object */
 public static final native int Colors_Black();
-/** @method accessor=Colors::Red,flags=const struct gcobject */
+/** @method accessor=Colors::Red,flags=const struct object */
 public static final native int Colors_Red();
-/** @method accessor=Colors::Maroon,flags=const struct gcobject */
+/** @method accessor=Colors::Maroon,flags=const struct object */
 public static final native int Colors_Maroon();
-/** @method accessor=Colors::Lime,flags=const struct gcobject */
+/** @method accessor=Colors::Lime,flags=const struct object */
 public static final native int Colors_Lime();
-/** @method accessor=Colors::Green,flags=const struct gcobject */
+/** @method accessor=Colors::Green,flags=const struct object */
 public static final native int Colors_Green();
-/** @method accessor=Colors::Olive,flags=const struct gcobject */
+/** @method accessor=Colors::Olive,flags=const struct object */
 public static final native int Colors_Olive();
-/** @method accessor=Colors::Blue,flags=const struct gcobject */
+/** @method accessor=Colors::Blue,flags=const struct object */
 public static final native int Colors_Blue();
-/** @method accessor=Colors::Navy,flags=const struct gcobject */
+/** @method accessor=Colors::Navy,flags=const struct object */
 public static final native int Colors_Navy();
-/** @method accessor=Colors::LightSkyBlue,flags=const struct gcobject */
+/** @method accessor=Colors::LightSkyBlue,flags=const struct object */
 public static final native int Colors_LightSkyBlue();
-/** @method accessor=Colors::Magenta,flags=const struct gcobject */
+/** @method accessor=Colors::Magenta,flags=const struct object */
 public static final native int Colors_Magenta();
-/** @method accessor=Colors::Purple,flags=const struct gcobject */
+/** @method accessor=Colors::Purple,flags=const struct object */
 public static final native int Colors_Purple();
-/** @method accessor=Colors::Cyan,flags=const struct gcobject */
+/** @method accessor=Colors::Cyan,flags=const struct object */
 public static final native int Colors_Cyan();
-/** @method accessor=Colors::Teal,flags=const struct gcobject */
+/** @method accessor=Colors::Teal,flags=const struct object */
 public static final native int Colors_Teal();
-/** @method accessor=Colors::Transparent,flags=const struct gcobject */
+/** @method accessor=Colors::Transparent,flags=const struct object */
 public static final native int Colors_Transparent();
-/** @method accessor=Colors::Silver,flags=const struct gcobject */
+/** @method accessor=Colors::Silver,flags=const struct object */
 public static final native int Colors_Silver();
-/** @method accessor=Colors::DarkGray,flags=const struct gcobject */
+/** @method accessor=Colors::DarkGray,flags=const struct object */
 public static final native int Colors_DarkGray();
-/** @method accessor=Colors::Yellow,flags=const struct gcobject */
+/** @method accessor=Colors::Yellow,flags=const struct object */
 public static final native int Colors_Yellow();
 /**
  * @method flags=setter
- * @param sender cast=(ColumnDefinition^),flags=gcobject
- * @param width cast=(GridLength),flags=gcobject
+ * @param sender cast=(ColumnDefinition^),flags=object
+ * @param width cast=(GridLength),flags=object
  */
 public static final native void ColumnDefinition_Width(int sender, int width);
 /**
  * @method flags=cpp
- * @param sender cast=(ColumnDefinitionCollection^),flags=gcobject
- * @param column cast=(ColumnDefinition^),flags=gcobject
+ * @param sender cast=(ColumnDefinitionCollection^),flags=object
+ * @param column cast=(ColumnDefinition^),flags=object
  */
 public static final native void ColumnDefinitionCollection_Add(int sender, int column);
 /**
  * @method flags=getter
- * @param sender cast=(ComboBox^),flags=gcobject
+ * @param sender cast=(ComboBox^),flags=object
  */
 public static final native boolean ComboBox_IsDropDownOpen(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ComboBox^),flags=gcobject
+ * @param sender cast=(ComboBox^),flags=object
  */
 public static final native void ComboBox_IsDropDownOpen(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(ComboBox^),flags=gcobject
+ * @param sender cast=(ComboBox^),flags=object
  */
 public static final native void ComboBox_IsEditable(int sender, boolean value);
 /**
- * @method flags=gcobject getter
- * @param handle cast=(ComboBox^),flags=gcobject
+ * @method flags=object getter
+ * @param handle cast=(ComboBox^),flags=object
  */
 public static final native int ComboBox_SelectionBoxItem(int handle);
 /**
  * @method accessor=CommandManager::AddPreviewExecutedHandler,flags=struct
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(ExecutedRoutedEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(ExecutedRoutedEventHandler^),flags=object
  */
 public static final native void CommandManager_AddPreviewExecutedHandler(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(CommonDialog^),flags=gcobject
- * @param parent cast=(Window^),flags=gcobject
+ * @param sender cast=(CommonDialog^),flags=object
+ * @param parent cast=(Window^),flags=object
  */
 public static final native boolean CommonDialog_ShowDialog(int sender, int parent);
 /**
  * @method flags=cpp
- * @param sender cast=(CompositeCollection^),flags=gcobject
- * @param object cast=(Object^),flags=gcobject
+ * @param sender cast=(CompositeCollection^),flags=object
+ * @param object cast=(Object^),flags=object
  */
 public static final native int CompositeCollection_IndexOf(int sender, int object);
 /**
  * @method flags=cpp
- * @param sender cast=(CompositeCollection^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(CompositeCollection^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void CompositeCollection_Insert(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(CompositeCollection^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(CompositeCollection^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void CompositeCollection_Remove(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(CompositeCollection^),flags=gcobject
+ * @param sender cast=(CompositeCollection^),flags=object
  */
 public static final native void CompositeCollection_RemoveAt(int sender, int value);
 /** @method accessor=Console::Beep */
 public static final native void Console_Beep();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Control^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Control^),flags=object
  */
 public static final native int Control_Padding(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(Thickness),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(Thickness),flags=object
  */
 public static final native void Control_Padding(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ContainerVisual^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ContainerVisual^),flags=object
  */
 public static final native int ContainerVisual_Clip(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ContainerVisual^),flags=gcobject
- * @param clip cast=(Geometry^),flags=gcobject
+ * @param sender cast=(ContainerVisual^),flags=object
+ * @param clip cast=(Geometry^),flags=object
  */
 public static final native void ContainerVisual_Clip(int sender, int clip);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ContentControl^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ContentControl^),flags=object
  */
 public static final native int ContentControl_Content(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ContentControl^),flags=gcobject
- * @param content cast=(Object^),flags=gcobject
+ * @param sender cast=(ContentControl^),flags=object
+ * @param content cast=(Object^),flags=object
  */
 public static final native void ContentControl_Content(int sender, int content);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ContentPresenter^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ContentPresenter^),flags=object
  */
 public static final native int ContentPresenter_Content(int sender);
-/** @method accessor=ContentPresenter::typeid,flags=const gcobject */
+/** @method accessor=ContentPresenter::typeid,flags=const object */
 public static final native int ContentPresenter_typeid();
 /**
  * @method flags=setter
- * @param sender cast=(ContextMenu^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
  */
 public static final native void ContextMenu_IsOpen(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(ContextMenu^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
  * @param mode cast=(PlacementMode)
  */
 public static final native void ContextMenu_Placement(int sender, int mode);
 /**
  * @method flags=setter
- * @param sender cast=(ContextMenu^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
  */
 public static final native void ContextMenu_HorizontalOffset(int sender, int offset);
 /**
  * @method flags=setter
- * @param sender cast=(ContextMenu^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
  */
 public static final native void ContextMenu_VerticalOffset(int sender, int offset);
 /**
  * @method flags=adder
- * @param sender cast=(ContextMenu^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void ContextMenu_Opened(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(ContextMenu^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(ContextMenu^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void ContextMenu_Closed(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(ContextMenuEventArgs^),flags=gcobject
+ * @param sender cast=(ContextMenuEventArgs^),flags=object
  */
 public static final native double ContextMenuEventArgs_CursorLeft(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ContextMenuEventArgs^),flags=gcobject
+ * @param sender cast=(ContextMenuEventArgs^),flags=object
  */
 public static final native double ContextMenuEventArgs_CursorTop(int sender);
-/** @method accessor=Control::BackgroundProperty,flags=const gcobject */
+/** @method accessor=Control::BackgroundProperty,flags=const object */
 public static final native int Control_BackgroundProperty();
-/** @method accessor=Control::BorderBrushProperty,flags=const gcobject */
+/** @method accessor=Control::BorderBrushProperty,flags=const object */
 public static final native int Control_BorderBrushProperty();
-/** @method accessor=Control::BorderThicknessProperty,flags=const gcobject */
+/** @method accessor=Control::BorderThicknessProperty,flags=const object */
 public static final native int Control_BorderThicknessProperty();
-/** @method accessor=Control::ForegroundProperty,flags=const gcobject */
+/** @method accessor=Control::ForegroundProperty,flags=const object */
 public static final native int Control_ForegroundProperty();
-/** @method accessor=Control::FontFamilyProperty,flags=const gcobject */
+/** @method accessor=Control::FontFamilyProperty,flags=const object */
 public static final native int Control_FontFamilyProperty();
-/** @method accessor=Control::FontStyleProperty,flags=const gcobject */
+/** @method accessor=Control::FontStyleProperty,flags=const object */
 public static final native int Control_FontStyleProperty();
-/** @method accessor=Control::FontWeightProperty,flags=const gcobject */
+/** @method accessor=Control::FontWeightProperty,flags=const object */
 public static final native int Control_FontWeightProperty();
-/** @method accessor=Control::FontStretchProperty,flags=const gcobject */
+/** @method accessor=Control::FontStretchProperty,flags=const object */
 public static final native int Control_FontStretchProperty();
-/** @method accessor=Control::FontSizeProperty,flags=const gcobject */
+/** @method accessor=Control::FontSizeProperty,flags=const object */
 public static final native int Control_FontSizeProperty();
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(Thickness),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(Thickness),flags=object
  */
 public static final native void Control_BorderThickness(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(Brush^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(Brush^),flags=object
  */
 public static final native void Control_Background(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(Brush^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(Brush^),flags=object
  */
 public static final native void Control_Foreground(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Control^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Control^),flags=object
  */
 public static final native int Control_FontFamily(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(FontFamily^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(FontFamily^),flags=object
  */
 public static final native void Control_FontFamily(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(FontStyle),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(FontStyle),flags=object
  */
 public static final native void Control_FontStyle(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(FontWeight),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(FontWeight),flags=object
  */
 public static final native void Control_FontWeight(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(FontStretch),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(FontStretch),flags=object
  */
 public static final native void Control_FontStretch(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(Control^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
  */
 public static final native double Control_FontSize(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
  */
 public static final native void Control_FontSize(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Control ^),flags=gcobject
+ * @param sender cast=(Control ^),flags=object
  */
 public static final native int Control_HorizontalContentAlignment(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Control ^),flags=gcobject
+ * @param sender cast=(Control ^),flags=object
  * @param value cast=(HorizontalAlignment)
  */
 public static final native void Control_HorizontalContentAlignment(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(Control^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void Control_MouseDoubleClick(int sender, int handler);
-/** @method accessor=Control::MouseDoubleClickEvent,flags=const gcobject */
+/** @method accessor=Control::MouseDoubleClickEvent,flags=const object */
 public static final native int Control_MouseDoubleClickEvent();
 /**
  * @method flags=adder
- * @param sender cast=(Control^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void Control_PreviewMouseDoubleClick(int sender, int handler);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Control^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Control^),flags=object
  */
 public static final native int Control_Template(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
- * @param value cast=(ControlTemplate^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
+ * @param value cast=(ControlTemplate^),flags=object
  */
 public static final native void Control_Template(int sender, int value);
-/** @method accessor=Control::TemplateProperty,flags=const gcobject */
+/** @method accessor=Control::TemplateProperty,flags=const object */
 public static final native int Control_TemplateProperty();
 /**
  * @method flags=setter
- * @param sender cast=(Control^),flags=gcobject
+ * @param sender cast=(Control^),flags=object
  * @param value cast=(VerticalAlignment)
  */
 public static final native void Control_VerticalContentAlignment(int sender, int value);
-/** @method accessor=CultureInfo::CurrentUICulture,flags=gcobject const */
+/** @method accessor=CultureInfo::CurrentUICulture,flags=object const */
 public static final native int CultureInfo_CurrentUICulture();
-/** @method accessor=Cursors::AppStarting,flags=const gcobject */
+/** @method accessor=Cursors::AppStarting,flags=const object */
 public static final native int Cursors_AppStarting();
-/** @method accessor=Cursors::Arrow,flags=const gcobject */
+/** @method accessor=Cursors::Arrow,flags=const object */
 public static final native int Cursors_Arrow();
-/** @method accessor=Cursors::Hand,flags=const gcobject */
+/** @method accessor=Cursors::Hand,flags=const object */
 public static final native int Cursors_Hand();
-/** @method accessor=Cursors::Wait,flags=const gcobject */
+/** @method accessor=Cursors::Wait,flags=const object */
 public static final native int Cursors_Wait();
-/** @method accessor=Cursors::Cross,flags=const gcobject */
+/** @method accessor=Cursors::Cross,flags=const object */
 public static final native int Cursors_Cross();
-/** @method accessor=Cursors::Help,flags=const gcobject */
+/** @method accessor=Cursors::Help,flags=const object */
 public static final native int Cursors_Help();
-/** @method accessor=Cursors::SizeAll,flags=const gcobject */
+/** @method accessor=Cursors::SizeAll,flags=const object */
 public static final native int Cursors_SizeAll();
-/** @method accessor=Cursors::SizeNS,flags=const gcobject */
+/** @method accessor=Cursors::SizeNS,flags=const object */
 public static final native int Cursors_SizeNS();
-/** @method accessor=Cursors::SizeNWSE,flags=const gcobject */
+/** @method accessor=Cursors::SizeNWSE,flags=const object */
 public static final native int Cursors_SizeNWSE();
-/** @method accessor=Cursors::SizeNESW,flags=const gcobject */
+/** @method accessor=Cursors::SizeNESW,flags=const object */
 public static final native int Cursors_SizeNESW();
-/** @method accessor=Cursors::SizeWE,flags=const gcobject */
+/** @method accessor=Cursors::SizeWE,flags=const object */
 public static final native int Cursors_SizeWE();
-/** @method accessor=Cursors::ScrollE,flags=const gcobject */
+/** @method accessor=Cursors::ScrollE,flags=const object */
 public static final native int Cursors_ScrollE();
-/** @method accessor=Cursors::ScrollN,flags=const gcobject */
+/** @method accessor=Cursors::ScrollN,flags=const object */
 public static final native int Cursors_ScrollN();
-/** @method accessor=Cursors::ScrollNE,flags=const gcobject */
+/** @method accessor=Cursors::ScrollNE,flags=const object */
 public static final native int Cursors_ScrollNE();
-/** @method accessor=Cursors::ScrollNW,flags=const gcobject */
+/** @method accessor=Cursors::ScrollNW,flags=const object */
 public static final native int Cursors_ScrollNW();
-/** @method accessor=Cursors::ScrollS,flags=const gcobject */
+/** @method accessor=Cursors::ScrollS,flags=const object */
 public static final native int Cursors_ScrollS();
-/** @method accessor=Cursors::ScrollSE,flags=const gcobject */
+/** @method accessor=Cursors::ScrollSE,flags=const object */
 public static final native int Cursors_ScrollSE();
-/** @method accessor=Cursors::ScrollSW,flags=const gcobject */
+/** @method accessor=Cursors::ScrollSW,flags=const object */
 public static final native int Cursors_ScrollSW();
-/** @method accessor=Cursors::ScrollW,flags=const gcobject */
+/** @method accessor=Cursors::ScrollW,flags=const object */
 public static final native int Cursors_ScrollW();
-/** @method accessor=Cursors::IBeam,flags=const gcobject */
+/** @method accessor=Cursors::IBeam,flags=const object */
 public static final native int Cursors_IBeam();
-/** @method accessor=Cursors::UpArrow,flags=const gcobject */
+/** @method accessor=Cursors::UpArrow,flags=const object */
 public static final native int Cursors_UpArrow();
-/** @method accessor=Cursors::No,flags=const gcobject */
+/** @method accessor=Cursors::No,flags=const object */
 public static final native int Cursors_No();
 /**
- * @method accessor=System::Windows::Interop::CursorInteropHelper::Create,flags=gcobject
- * @param safeHandle cast=(SafeHandle^),flags=gcobject
+ * @method accessor=System::Windows::Interop::CursorInteropHelper::Create,flags=object
+ * @param safeHandle cast=(SafeHandle^),flags=object
  */
 public static final native int CursorInteropHelper_Create(int safeHandle);
-/** @method accessor=DashStyles::Dash,flags=const gcobject */
+/** @method accessor=DashStyles::Dash,flags=const object */
 public static final native int DashStyles_Dash();
-/** @method accessor=DashStyles::DashDot,flags=const gcobject */
+/** @method accessor=DashStyles::DashDot,flags=const object */
 public static final native int DashStyles_DashDot();
-/** @method accessor=DashStyles::DashDotDot,flags=const gcobject */
+/** @method accessor=DashStyles::DashDotDot,flags=const object */
 public static final native int DashStyles_DashDotDot();
-/** @method accessor=DashStyles::Dot,flags=const gcobject */
+/** @method accessor=DashStyles::Dot,flags=const object */
 public static final native int DashStyles_Dot();
-/** @method accessor=DashStyles::Solid,flags=const gcobject */
+/** @method accessor=DashStyles::Solid,flags=const object */
 public static final native int DashStyles_Solid();
-/** @method accessor=DataFormats::Bitmap,flags=const gcobject */
+/** @method accessor=DataFormats::Bitmap,flags=const object */
 public static final native int DataFormats_Bitmap();
-/** @method accessor=DataFormats::FileDrop,flags=const gcobject */
+/** @method accessor=DataFormats::FileDrop,flags=const object */
 public static final native int DataFormats_FileDrop();
-/** @method accessor=DataFormats::Html,flags=const gcobject */
+/** @method accessor=DataFormats::Html,flags=const object */
 public static final native int DataFormats_Html();
-/** @method accessor=DataFormats::Rtf,flags=const gcobject */
+/** @method accessor=DataFormats::Rtf,flags=const object */
 public static final native int DataFormats_Rtf();
-/** @method accessor=DataFormats::UnicodeText,flags=const gcobject */
+/** @method accessor=DataFormats::UnicodeText,flags=const object */
 public static final native int DataFormats_UnicodeText();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(DataObject^),flags=gcobject
- * @param format cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(DataObject^),flags=object
+ * @param format cast=(String^),flags=object
  */
 public static final native int DataObject_GetData(int sender, int format, boolean autoConvert);
 /**
  * @method flags=cpp
- * @param sender cast=(DataObject^),flags=gcobject
- * @param format cast=(String^),flags=gcobject
+ * @param sender cast=(DataObject^),flags=object
+ * @param format cast=(String^),flags=object
  */
 public static final native boolean DataObject_GetDataPresent(int sender, int format, boolean autoConvert);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(DataObject^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(DataObject^),flags=object
  */
 public static final native int DataObject_GetFormats(int sender, boolean autoConvert);
 /**
  * @method flags=cpp
- * @param sender cast=(DataObject^),flags=gcobject
- * @param format cast=(String^),flags=gcobject
- * @param data cast=(Object^),flags=gcobject
+ * @param sender cast=(DataObject^),flags=object
+ * @param format cast=(String^),flags=object
+ * @param data cast=(Object^),flags=object
  */
 public static final native void DataObject_SetData(int sender, int format, int data, boolean autoConvert);
 /**
  * @method flags=cpp
- * @param sender cast=(DependencyObject^),flags=gcobject
- * @param property cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
+ * @param property cast=(DependencyProperty^),flags=object
  */
 public static final native void DependencyObject_ClearValue(int sender, int property);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(DependencyObject^),flags=gcobject
- * @param property cast=(DependencyProperty^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(DependencyObject^),flags=object
+ * @param property cast=(DependencyProperty^),flags=object
  */
 public static final native int DependencyObject_GetValue(int sender, int property);
 /**
  * @method accessor=GetValue,flags=cpp
- * @param sender cast=(DependencyObject^),flags=gcobject
- * @param property cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
+ * @param property cast=(DependencyProperty^),flags=object
  */
 public static final native double DependencyObject_GetValueDouble(int sender, int property);
 /**
  * @method accessor=GetValue,flags=cpp
- * @param sender cast=(DependencyObject^),flags=gcobject
- * @param property cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
+ * @param property cast=(DependencyProperty^),flags=object
  */
 public static final native int DependencyObject_GetValueInt(int sender, int property);
 /**
  * @method flags=cpp
- * @param sender cast=(DependencyObject^),flags=gcobject
- * @param property cast=(DependencyProperty^),flags=gcobject
- * @param object cast=(Object^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
+ * @param property cast=(DependencyProperty^),flags=object
+ * @param object cast=(Object^),flags=object
  */
 public static final native void DependencyObject_SetValue(int sender, int property, int object);
-/** @method accessor=DependencyProperty::UnsetValue,flags=const gcobject */
+/** @method accessor=DependencyProperty::UnsetValue,flags=const object */
 public static final native int DependencyProperty_UnsetValue();
 /**
  * @method flags=cpp
- * @param sender cast=(DependencyPropertyDescriptor^),flags=gcobject
- * @param object cast=(Object^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(DependencyPropertyDescriptor^),flags=object
+ * @param object cast=(Object^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void DependencyPropertyDescriptor_AddValueChanged(int sender, int object, int handler);
 /**
- * @method accessor=DependencyPropertyDescriptor::FromProperty,flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
- * @param type cast=(Type^),flags=gcobject
+ * @method accessor=DependencyPropertyDescriptor::FromProperty,flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
+ * @param type cast=(Type^),flags=object
  */
 public static final native int DependencyPropertyDescriptor_FromProperty(int dp, int type);
 /**
  * @method accessor=Dispatcher::PushFrame
- * @param frame cast=(DispatcherFrame ^),flags=gcobject
+ * @param frame cast=(DispatcherFrame ^),flags=object
  */
 public static final native void Dispatcher_PushFrame(int frame);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Dispatcher ^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Dispatcher ^),flags=object
  */
 public static final native int Dispatcher_Hooks(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(DispatcherHooks ^),flags=gcobject
- * @param handler cast=(EventHandler ^),flags=gcobject
+ * @param sender cast=(DispatcherHooks ^),flags=object
+ * @param handler cast=(EventHandler ^),flags=object
  */
 public static final native void DispatcherHooks_DispatcherInactive(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(DispatcherHooks ^),flags=gcobject
- * @param handler cast=(DispatcherHookEventHandler ^),flags=gcobject
+ * @param sender cast=(DispatcherHooks ^),flags=object
+ * @param handler cast=(DispatcherHookEventHandler ^),flags=object
  */
 public static final native void DispatcherHooks_OperationAborted(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(DispatcherHooks ^),flags=gcobject
- * @param handler cast=(DispatcherHookEventHandler ^),flags=gcobject
+ * @param sender cast=(DispatcherHooks ^),flags=object
+ * @param handler cast=(DispatcherHookEventHandler ^),flags=object
  */
 public static final native void DispatcherHooks_OperationCompleted(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(DispatcherHooks ^),flags=gcobject
- * @param handler cast=(DispatcherHookEventHandler ^),flags=gcobject
+ * @param sender cast=(DispatcherHooks ^),flags=object
+ * @param handler cast=(DispatcherHookEventHandler ^),flags=object
  */
 public static final native void DispatcherHooks_OperationPosted(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(DispatcherFrame^),flags=gcobject
+ * @param sender cast=(DispatcherFrame^),flags=object
  */
 public static final native boolean DispatcherFrame_Continue(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DispatcherFrame^),flags=gcobject
+ * @param sender cast=(DispatcherFrame^),flags=object
  */
 public static final native void DispatcherFrame_Continue(int sender, boolean value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DispatcherHookEventArgs ^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DispatcherHookEventArgs ^),flags=object
  */
 public static final native int DispatcherHookEventArgs_Operation(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DispatcherOperation^),flags=gcobject
+ * @param sender cast=(DispatcherOperation^),flags=object
  */
 public static final native boolean DispatcherOperation_Abort(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(DispatcherOperation ^),flags=gcobject
+ * @param sender cast=(DispatcherOperation ^),flags=object
  */
 public static final native int DispatcherOperation_Priority(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DispatcherOperation ^),flags=gcobject
+ * @param sender cast=(DispatcherOperation ^),flags=object
  * @param value cast=(DispatcherPriority)
  */
 public static final native void DispatcherOperation_Priority(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(DispatcherOperation^),flags=gcobject
+ * @param sender cast=(DispatcherOperation^),flags=object
  */
 public static final native int DispatcherOperation_Wait(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Dispatcher ^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Dispatcher ^),flags=object
  * @param priority cast=(DispatcherPriority)
- * @param method cast=(Delegate ^),flags=gcobject
+ * @param method cast=(Delegate ^),flags=object
  */
 public static final native int Dispatcher_BeginInvoke(int sender, int priority, int method);
 /**
  * @method flags=setter
- * @param sender cast=(DispatcherTimer^),flags=gcobject
- * @param value cast=(TimeSpan),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
+ * @param value cast=(TimeSpan),flags=object
  */
 public static final native void DispatcherTimer_Interval(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(DispatcherTimer^),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
  */
 public static final native void DispatcherTimer_Start(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DispatcherTimer^),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
  */
 public static final native void DispatcherTimer_Stop(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DispatcherTimer^),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
  */
 public static final native void DispatcherTimer_Tag(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(DispatcherTimer^),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
  */
 public static final native int DispatcherTimer_Tag(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(DispatcherTimer^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(DispatcherTimer^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void DispatcherTimer_Tick(int sender, int handler);
-/** @method accessor=DockPanel::DockProperty,flags=const gcobject */
+/** @method accessor=DockPanel::DockProperty,flags=const object */
 public static final native int DockPanel_DockProperty();
-/** @method accessor=DockPanel::typeid,flags=const gcobject */
+/** @method accessor=DockPanel::typeid,flags=const object */
 public static final native int DockPanel_typeid();
 /**
  * @method flags=cpp
- * @param sender cast=(DoubleCollection^),flags=gcobject
+ * @param sender cast=(DoubleCollection^),flags=object
  */
 public static final native void DoubleCollection_Add(int sender, double value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DoubleAnimationUsingKeyFrames^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DoubleAnimationUsingKeyFrames^),flags=object
  */
 public static final native int DoubleAnimationUsingKeyFrames_KeyFrames(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DoubleKeyFrameCollection^),flags=gcobject
- * @param keyFrame cast=(DoubleKeyFrame^),flags=gcobject
+ * @param sender cast=(DoubleKeyFrameCollection^),flags=object
+ * @param keyFrame cast=(DoubleKeyFrame^),flags=object
  */
 public static final native int DoubleKeyFrameCollection_Add(int sender, int keyFrame);
 /**
  * @method flags=getter
- * @param e cast=(DragDeltaEventArgs^),flags=gcobject
+ * @param e cast=(DragDeltaEventArgs^),flags=object
  */
 public static final native int DragDeltaEventArgs_VerticalChange(int e);
 /**
  * @method flags=getter
- * @param e cast=(DragDeltaEventArgs^),flags=gcobject
+ * @param e cast=(DragDeltaEventArgs^),flags=object
  */
 public static final native int DragDeltaEventArgs_HorizontalChange(int e);
 /**
  * @method accessor=DragDrop::DoDragDrop
- * @param dragSource cast=(DependencyObject^),flags=gcobject
- * @param data cast=(Object^),flags=gcobject
+ * @param dragSource cast=(DependencyObject^),flags=object
+ * @param data cast=(Object^),flags=object
  * @param allowedEffects cast=(DragDropEffects)
  */
 public static final native int DragDrop_DoDragDrop(int dragSource, int data, int allowedEffects);
 /**
  * @method flags=getter
- * @param sender cast=(DragEventArgs^),flags=gcobject
+ * @param sender cast=(DragEventArgs^),flags=object
  */
 public static final native int DragEventArgs_AllowedEffects (int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DragEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DragEventArgs^),flags=object
  */
 public static final native int DragEventArgs_Data (int sender);
 /**
  * @method flags=getter
- * @param sender cast=(DragEventArgs^),flags=gcobject
+ * @param sender cast=(DragEventArgs^),flags=object
  */
 public static final native int DragEventArgs_Effects (int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DragEventArgs^),flags=gcobject
+ * @param sender cast=(DragEventArgs^),flags=object
  * @param effects cast=(DragDropEffects)
  */
 public static final native void DragEventArgs_Effects (int sender, int effects);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(DragEventArgs^),flags=gcobject
- * @param relativeTo cast=(IInputElement^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(DragEventArgs^),flags=object
+ * @param relativeTo cast=(IInputElement^),flags=object
  */
 public static final native int DragEventArgs_GetPosition (int sender, int relativeTo);
 /**
  * @method flags=getter
- * @param sender cast=(DragEventArgs^),flags=gcobject
+ * @param sender cast=(DragEventArgs^),flags=object
  */
 public static final native int DragEventArgs_KeyStates (int sender);
-/** @method accessor=System::Drawing::Color::FromArgb,flags=gcobject */
+/** @method accessor=System::Drawing::Color::FromArgb,flags=object */
 public static final native int DrawingColor_FromArgb(int a, int r, int g, int b);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Drawing::Color^),flags=gcobject
+ * @param sender cast=(System::Drawing::Color^),flags=object
  */
 public static final native int DrawingColor_ToArgb(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
  */
 public static final native void DrawingContext_Close(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param Drawing cast=(System::Windows::Media::Drawing^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param Drawing cast=(System::Windows::Media::Drawing^),flags=object
  */
 public static final native void DrawingContext_DrawDrawing(int sender, int Drawing);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param center cast=(Point),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param brush cast=(Brush^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param center cast=(Point),flags=object
  */
 public static final native void DrawingContext_DrawEllipse(int sender, int brush, int pen, int center, double radiusX, double radiusY);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param imagesource cast=(ImageSource^),flags=gcobject
- * @param rect cast=(Rect),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param imagesource cast=(ImageSource^),flags=object
+ * @param rect cast=(Rect),flags=object
  */
 public static final native void DrawingContext_DrawImage(int sender, int imagesource, int rect);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param point0 cast=(Point),flags=gcobject
- * @param point1 cast=(Point),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param point0 cast=(Point),flags=object
+ * @param point1 cast=(Point),flags=object
  */
 public static final native void DrawingContext_DrawLine(int sender, int pen, int point0, int point1);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param brush cast=(Brush^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void DrawingContext_DrawGeometry(int sender, int brush, int pen, int geometry);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param rect cast=(Rect),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param brush cast=(Brush^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param rect cast=(Rect),flags=object
  */
 public static final native void DrawingContext_DrawRectangle(int sender, int brush, int pen, int rect);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param rect cast=(Rect),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param brush cast=(Brush^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param rect cast=(Rect),flags=object
  */
 public static final native void DrawingContext_DrawRoundedRectangle(int sender, int brush, int pen, int rect, double radiusX, double radiusY);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param formattedText cast=(FormattedText^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param formattedText cast=(FormattedText^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native void DrawingContext_DrawText(int sender, int formattedText, int point);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Drawing::FontFamily^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Drawing::FontFamily^),flags=object
  */
 public static final native int DrawingFontFamily_Name(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param transform cast=(Transform^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param transform cast=(Transform^),flags=object
  */
 public static final native void DrawingContext_PushTransform(int sender, int transform);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
- * @param clipGeometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
+ * @param clipGeometry cast=(Geometry^),flags=object
  */
 public static final native void DrawingContext_PushClip(int sender, int clipGeometry);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
  */
 public static final native void DrawingContext_PushOpacity(int sender, double opacity);
 /**
  * @method flags=cpp
- * @param sender cast=(DrawingContext^),flags=gcobject
+ * @param sender cast=(DrawingContext^),flags=object
  */
 public static final native void DrawingContext_Pop(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DrawingVisual^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DrawingVisual^),flags=object
  */
 public static final native int DrawingVisual_Drawing(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(DrawingVisual^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(DrawingVisual^),flags=object
  */
 public static final native int DrawingVisual_RenderOpen(int sender);
-/** @method accessor=DrawingVisual::typeid,flags=const gcobject */
+/** @method accessor=DrawingVisual::typeid,flags=const object */
 public static final native int DrawingVisual_typeid();
-/** @method accessor=EditingCommands::Backspace,flags=const gcobject */
+/** @method accessor=EditingCommands::Backspace,flags=const object */
 public static final native int EditingCommands_Backspace();
-/** @method accessor=EditingCommands::Delete,flags=const gcobject */
+/** @method accessor=EditingCommands::Delete,flags=const object */
 public static final native int EditingCommands_Delete();
-/** @method accessor=EditingCommands::DeleteNextWord,flags=const gcobject */
+/** @method accessor=EditingCommands::DeleteNextWord,flags=const object */
 public static final native int EditingCommands_DeleteNextWord();
-/** @method accessor=EditingCommands::DeletePreviousWord,flags=const gcobject */
+/** @method accessor=EditingCommands::DeletePreviousWord,flags=const object */
 public static final native int EditingCommands_DeletePreviousWord();
 /**
- * @method accessor=Environment::ExpandEnvironmentVariables,flags=gcobject
- * @param string cast=(String^),flags=gcobject
+ * @method accessor=Environment::ExpandEnvironmentVariables,flags=object
+ * @param string cast=(String^),flags=object
  */
 public static final native int Environment_ExpandEnvironmentVariables(int string);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ExecutedRoutedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ExecutedRoutedEventArgs^),flags=object
  */
 public static final native int ExecutedRoutedEventArgs_Command(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ExecutedRoutedEventArgs^),flags=gcobject
+ * @param sender cast=(ExecutedRoutedEventArgs^),flags=object
  */
 public static final native void ExecutedRoutedEventArgs_Handled(int sender, boolean handled);
 /**
  * @method flags=adder
- * @param sender cast=(Expander^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(Expander^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void Expander_Collapsed(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(Expander^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(Expander^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void Expander_Expanded(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(Expander^),flags=gcobject
+ * @param sender cast=(Expander^),flags=object
  */
 public static final native boolean Expander_IsExpanded(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Expander^),flags=gcobject
+ * @param sender cast=(Expander^),flags=object
  */
 public static final native void Expander_IsExpanded(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(FileDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FileDialog_FileName(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FileDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FileDialog^),flags=object
  */
 public static final native int FileDialog_FileNames(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FileDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FileDialog_Filter(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(FileDialog^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
  */
 public static final native int FileDialog_FilterIndex(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FileDialog^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
  */
 public static final native void FileDialog_FilterIndex(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(FileDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FileDialog_InitialDirectory(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(FileDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(FileDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FileDialog_Title(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::IO::FileInfo^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::IO::FileInfo^),flags=object
  */
 public static final native int FileInfo_DirectoryName(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::IO::FileInfo^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::IO::FileInfo^),flags=object
  */
 public static final native int FileInfo_Name(int sender);
 /**
  * @method accessor=System::IO::File::Exists
- * @param sender cast=(String^),flags=gcobject
+ * @param sender cast=(String^),flags=object
  */
 public static final native boolean File_Exists(int sender);
 /**
- * @method accessor=System::IO::File::ReadAllText,flags=gcobject
- * @param sender cast=(String^),flags=gcobject
+ * @method accessor=System::IO::File::ReadAllText,flags=object
+ * @param sender cast=(String^),flags=object
  */
 public static final native int File_ReadAllText(int sender);
 /**
- * @method accessor=FocusManager::GetFocusScope,flags=gcobject
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @method accessor=FocusManager::GetFocusScope,flags=object
+ * @param element cast=(DependencyObject^),flags=object
  */
 public static final native int FocusManager_GetFocusScope(int element);
 /**
- * @method accessor=FocusManager::GetFocusedElement,flags=gcobject
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @method accessor=FocusManager::GetFocusedElement,flags=object
+ * @param element cast=(DependencyObject^),flags=object
  */
 public static final native int FocusManager_GetFocusedElement(int element);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FolderBrowserDialog_Description(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=object
  */
 public static final native int FolderBrowserDialog_SelectedPath(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::FolderBrowserDialog^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void FolderBrowserDialog_SelectedPath(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Drawing::Font^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Drawing::Font^),flags=object
  */
 public static final native int Font_FontFamily(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Font^),flags=gcobject
+ * @param sender cast=(System::Drawing::Font^),flags=object
  */
 public static final native int Font_Size(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Font^),flags=gcobject
+ * @param sender cast=(System::Drawing::Font^),flags=object
  */
 public static final native int Font_Style(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::FontDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::FontDialog^),flags=object
  */
 public static final native int FontDialog_Color(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::FontDialog^),flags=gcobject
- * @param value cast=(System::Drawing::Color),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::FontDialog^),flags=object
+ * @param value cast=(System::Drawing::Color),flags=object
  */
 public static final native void FontDialog_Color(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::FontDialog^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::FontDialog^),flags=object
  */
 public static final native int FontDialog_Font(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::FontDialog^),flags=gcobject
- * @param value cast=(System::Drawing::Font^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::FontDialog^),flags=object
+ * @param value cast=(System::Drawing::Font^),flags=object
  */
 public static final native void FontDialog_Font(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::FontDialog^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::FontDialog^),flags=object
  */
 public static final native void FontDialog_ShowColor (int sender, boolean value);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FontFamily^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FontFamily^),flags=object
  */
 public static final native int FontFamily_GetTypefaces(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(FontFamily^),flags=gcobject
+ * @param sender cast=(FontFamily^),flags=object
  */
 public static final native double FontFamily_LineSpacing(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FontFamily^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FontFamily^),flags=object
  */
 public static final native int FontFamily_Source(int sender);
-/** @method accessor=FontStyles::Italic,flags=const gcobject */
+/** @method accessor=FontStyles::Italic,flags=const object */
 public static final native int FontStyles_Italic();
-/** @method accessor=FontStyles::Normal,flags=const gcobject */
+/** @method accessor=FontStyles::Normal,flags=const object */
 public static final native int FontStyles_Normal();
-/** @method accessor=FontStyles::Oblique,flags=const gcobject */
+/** @method accessor=FontStyles::Oblique,flags=const object */
 public static final native int FontStyles_Oblique();
-/** @method accessor=FontWeight::FromOpenTypeWeight,flags=gcobject */
+/** @method accessor=FontWeight::FromOpenTypeWeight,flags=object */
 public static final native int FontWeight_FromOpenTypeWeight(int weight);
 /**
  * @method flags=cpp
- * @param sender cast=(FontWeight^),flags=gcobject
+ * @param sender cast=(FontWeight^),flags=object
  */
 public static final native int FontWeight_ToOpenTypeWeight(int sender);
-/** @method accessor=FontWeights::Bold,flags=const gcobject */
+/** @method accessor=FontWeights::Bold,flags=const object */
 public static final native int FontWeights_Bold();
-/** @method accessor=FontWeights::Normal,flags=const gcobject */
+/** @method accessor=FontWeights::Normal,flags=const object */
 public static final native int FontWeights_Normal();
-/** @method accessor=FontStretches::Normal,flags=const gcobject */
+/** @method accessor=FontStretches::Normal,flags=const object */
 public static final native int FontStretches_Normal();
-/** @method accessor=FontStretch::FromOpenTypeStretch,flags=gcobject */
+/** @method accessor=FontStretch::FromOpenTypeStretch,flags=object */
 public static final native int FontStretch_FromOpenTypeStretch(int stretch);
 /**
  * @method flags=cpp
- * @param sender cast=(FontStretch^),flags=gcobject
+ * @param sender cast=(FontStretch^),flags=object
  */
 public static final native int FontStretch_ToOpenTypeStretch(int sender);
 /**
- * @method accessor=Fonts::GetTypefaces,flags=gcobject
- * @param uri cast=(String^),flags=gcobject
+ * @method accessor=Fonts::GetTypefaces,flags=object
+ * @param uri cast=(String^),flags=object
  */
 public static final native int Fonts_GetTypefaces(int uri);
-/** @method accessor=Fonts::SystemTypefaces,flags=const gcobject */
+/** @method accessor=Fonts::SystemTypefaces,flags=const object */
 public static final native int Fonts_SystemTypefaces();
 /**
  * @method flags=getter
- * @param sender cast=(FormattedText^),flags=gcobject
+ * @param sender cast=(FormattedText^),flags=object
  */
 public static final native double FormattedText_Baseline(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FormattedText^),flags=gcobject
- * @param origin cast=(Point),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FormattedText^),flags=object
+ * @param origin cast=(Point),flags=object
  */
 public static final native int FormattedText_BuildGeometry(int sender, int origin);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FormattedText^),flags=gcobject
- * @param origin cast=(Point),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FormattedText^),flags=object
+ * @param origin cast=(Point),flags=object
  */
 public static final native int FormattedText_BuildHighlightGeometry(int sender, int origin);
 /**
  * @method flags=getter
- * @param sender cast=(FormattedText^),flags=gcobject
+ * @param sender cast=(FormattedText^),flags=object
  */
 public static final native double FormattedText_Height(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(FormattedText^),flags=gcobject
- * @param decorations cast=(TextDecorationCollection^),flags=gcobject
+ * @param sender cast=(FormattedText^),flags=object
+ * @param decorations cast=(TextDecorationCollection^),flags=object
  */
 public static final native void FormattedText_SetTextDecorations(int sender, int decorations, int startIndex, int count);
 /**
  * @method flags=getter
- * @param sender cast=(FormattedText^),flags=gcobject
+ * @param sender cast=(FormattedText^),flags=object
  */
 public static final native double FormattedText_WidthIncludingTrailingWhitespace(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::CommonDialog^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::CommonDialog^),flags=object
  */
 public static final native int FormsCommonDialog_ShowDialog(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::MouseEventArgs^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::MouseEventArgs^),flags=object
  */
 public static final native int FormsMouseEventArgs_Button(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native boolean Frame_CanGoBack(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native boolean Frame_CanGoForward(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Frame^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native int Frame_CurrentSource(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Frame^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native int Frame_Source(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Frame^),flags=gcobject
- * @param uri cast=(Uri^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
+ * @param uri cast=(Uri^),flags=object
  */
 public static final native void Frame_Source(int sender, int uri);
 /**
  * @method flags=cpp
- * @param sender cast=(Frame^),flags=gcobject
- * @param uri cast=(Uri^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
+ * @param uri cast=(Uri^),flags=object
  */
 public static final native boolean Frame_Navigate(int sender, int uri);
 /**
  * @method flags=setter
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  * @param visiblity cast=(System::Windows::Navigation::NavigationUIVisibility)
  */
 public static final native void Frame_NavigationUIVisibility(int sender, int visiblity);
 /**
  * @method flags=cpp
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native void Frame_GoBack(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native void Frame_GoForward(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native void Frame_Refresh(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Frame^),flags=gcobject
+ * @param sender cast=(Frame^),flags=object
  */
 public static final native void Frame_StopLoading(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkContentElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkContentElement^),flags=object
  */
 public static final native int FrameworkContentElement_Parent(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkContentElement^),flags=gcobject
+ * @param sender cast=(FrameworkContentElement^),flags=object
  */
 public static final native int FrameworkContentElement_Tag(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkContentElement^),flags=gcobject
+ * @param sender cast=(FrameworkContentElement^),flags=object
  */
 public static final native void FrameworkContentElement_Tag(int sender, int value);
-/** @method accessor=FrameworkContentElement::typeid,flags=const gcobject */
+/** @method accessor=FrameworkContentElement::typeid,flags=const object */
 public static final native int FrameworkContentElement_typeid();
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_BeginInit(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_BringIntoView(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(ContextMenu^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(ContextMenu^),flags=object
  */
 public static final native void FrameworkElement_ContextMenu(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param handler cast=(ContextMenuEventHandler^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param handler cast=(ContextMenuEventHandler^),flags=object
  */
 public static final native void FrameworkElement_ContextMenuClosing(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param handler cast=(ContextMenuEventHandler^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param handler cast=(ContextMenuEventHandler^),flags=object
  */
 public static final native void FrameworkElement_ContextMenuOpening(int sender, int handler);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param cursor cast=(Cursor^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param cursor cast=(Cursor^),flags=object
  */
 public static final native void FrameworkElement_Cursor(int sender, int cursor);
-/** @method accessor=FrameworkElement::CursorProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::CursorProperty,flags=const object */
 public static final native int FrameworkElement_CursorProperty();
-/** @method accessor=FrameworkElement::ActualHeightProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::ActualHeightProperty,flags=const object */
 public static final native int FrameworkElement_ActualHeightProperty();
-/** @method accessor=FrameworkElement::ActualWidthProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::ActualWidthProperty,flags=const object */
 public static final native int FrameworkElement_ActualWidthProperty();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param key cast=(Object^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param key cast=(Object^),flags=object
  */
 public static final native int FrameworkElement_FindResource(int sender, int key);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param style cast=(Style^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param style cast=(Style^),flags=object
  */
 public static final native void FrameworkElement_FocusVisualStyle(int sender, int style);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_FlowDirection(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  * @param value cast=(FlowDirection)
  */
 public static final native void FrameworkElement_FlowDirection(int sender, int value);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  */
 public static final native int FrameworkElement_GetBindingExpression(int sender, int dp);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  * @param value cast=(HorizontalAlignment)
  */
 public static final native void FrameworkElement_HorizontalAlignment(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native boolean FrameworkElement_IsLoaded(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(Transform^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(Transform^),flags=object
  */
 public static final native void FrameworkElement_LayoutTransform(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void FrameworkElement_Loaded(int sender, int handler);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Margin(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(Thickness),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(Thickness),flags=object
  */
 public static final native void FrameworkElement_Margin(int sender, int value);
-/** @method accessor=FrameworkElement::MarginProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::MarginProperty,flags=const object */
 public static final native int FrameworkElement_MarginProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Name(int sender);
-/** @method accessor=FrameworkElement::NameProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::NameProperty,flags=const object */
 public static final native int FrameworkElement_NameProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Parent(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_RenderTransform(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(Transform^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(Transform^),flags=object
  */
 public static final native void FrameworkElement_RenderTransform(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Style(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(Style^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(Style^),flags=object
  */
 public static final native void FrameworkElement_Style(int sender, int value);
-/** @method accessor=FrameworkElement::StyleProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::StyleProperty,flags=const object */
 public static final native int FrameworkElement_StyleProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Tag(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param tag cast=(Object^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param tag cast=(Object^),flags=object
  */
 public static final native void FrameworkElement_Tag(int sender, int tag);
-/** @method accessor=FrameworkElement::TagProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::TagProperty,flags=const object */
 public static final native int FrameworkElement_TagProperty();
-/** @method accessor=FrameworkElement::typeid,flags=const gcobject */
+/** @method accessor=FrameworkElement::typeid,flags=const object */
 public static final native int FrameworkElement_typeid();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_ToolTip(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void FrameworkElement_ToolTip(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_MaxHeight(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_MaxHeight(int sender, double height);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_MaxWidth(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_MaxWidth(int sender, double width);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_MinHeight(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_MinHeight(int sender, double height);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_MinWidth(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_MinWidth(int sender, double width);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_Height(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_Height(int sender, double height);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_Width(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native void FrameworkElement_Width(int sender, double width);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_ActualWidth(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native double FrameworkElement_ActualHeight(int sender);
-/** @method accessor=FrameworkElement::WidthProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::WidthProperty,flags=const object */
 public static final native int FrameworkElement_WidthProperty();
-/** @method accessor=FrameworkElement::HeightProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::HeightProperty,flags=const object */
 public static final native int FrameworkElement_HeightProperty();
 /**
  * @method flags=adder
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param handler cast=(SizeChangedEventHandler^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param handler cast=(SizeChangedEventHandler^),flags=object
  */
 public static final native void FrameworkElement_SizeChanged(int sender, int handler);
-/** @method accessor=FrameworkElement::SizeChangedEvent,flags=const gcobject */
+/** @method accessor=FrameworkElement::SizeChangedEvent,flags=const object */
 public static final native int FrameworkElement_SizeChangedEvent();
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
  * @param str cast=(VerticalAlignment)
  */
 public static final native void FrameworkElement_VerticalAlignment(int sender, int str);
-/** @method accessor=FrameworkElement::VerticalAlignmentProperty,flags=const gcobject */
+/** @method accessor=FrameworkElement::VerticalAlignmentProperty,flags=const object */
 public static final native int FrameworkElement_VerticalAlignmentProperty();
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param value cast=(FrameworkElementFactory^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param value cast=(FrameworkElementFactory^),flags=object
  */
 public static final native void FrameworkElementFactory_AppendChild(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
- * @param binding cast=(BindingBase^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
+ * @param binding cast=(BindingBase^),flags=object
  */
 public static final native void FrameworkElementFactory_SetBinding(int sender, int dp, int binding);
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Boolean)
  */
 public static final native void FrameworkElementFactory_SetValue(int sender, int dp, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void FrameworkElementFactory_SetValue(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Dock)
  */
 public static final native void FrameworkElementFactory_SetValueDock(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  */
 public static final native void FrameworkElementFactory_SetValueInt(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Stretch)
  */
 public static final native void FrameworkElementFactory_SetValueStretch(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Orientation)
  */
 public static final native void FrameworkElementFactory_SetValueOrientation(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(VerticalAlignment)
  */
 public static final native void FrameworkElementFactory_SetValueVerticalAlignment(int sender, int dp, int value);
 /**
  * @method accessor=SetValue,flags=cpp
- * @param sender cast=(FrameworkElementFactory^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param sender cast=(FrameworkElementFactory^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Visibility)
  */
 public static final native void FrameworkElementFactory_SetValueVisibility(int sender, int dp, byte value);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(FrameworkTemplate^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
- * @param parent cast=(FrameworkElement^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(FrameworkTemplate^),flags=object
+ * @param name cast=(String^),flags=object
+ * @param parent cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkTemplate_FindName(int sender, int name, int parent);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkTemplate^),flags=gcobject
- * @param value cast=(FrameworkElementFactory^),flags=gcobject
+ * @param sender cast=(FrameworkTemplate^),flags=object
+ * @param value cast=(FrameworkElementFactory^),flags=object
  */
 public static final native void FrameworkTemplate_VisualTree(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(Freezable^),flags=gcobject
+ * @param sender cast=(Freezable^),flags=object
  */
 public static final native boolean Freezable_CanFreeze(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Freezable^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Freezable^),flags=object
  */
 public static final native int Freezable_Clone(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Freezable^),flags=gcobject
+ * @param sender cast=(Freezable^),flags=object
  */
 public static final native void Freezable_Freeze(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(GeometryCollection^),flags=gcobject
+ * @param sender cast=(GeometryCollection^),flags=object
  */
 public static final native void GeometryCollection_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(GeometryCollection^),flags=gcobject
+ * @param sender cast=(GeometryCollection^),flags=object
  */
 public static final native int GeometryCollection_Count(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(GeometryCollection^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(GeometryCollection^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void GeometryCollection_Add(int sender, int geometry);
 /**
  * @method flags=cpp
- * @param sender cast=(GeometryCollection^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(GeometryCollection^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void GeometryCollection_Remove(int sender, int geometry);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Geometry^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Geometry^),flags=object
  */
 public static final native int Geometry_Clone(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Geometry^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Geometry^),flags=object
  */
 public static final native int Geometry_Bounds(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Geometry^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Geometry^),flags=object
  */
 public static final native int Geometry_GetFlattenedPathGeometry(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Geometry^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Geometry^),flags=object
  * @param type cast=(ToleranceType)
  */
 public static final native int Geometry_GetFlattenedPathGeometry(int sender, double tolerance, int type);
 /**
  * @method flags=cpp
- * @param sender cast=(Geometry^),flags=gcobject
+ * @param sender cast=(Geometry^),flags=object
  */
 public static final native boolean Geometry_IsEmpty(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Geometry^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @param sender cast=(Geometry^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native boolean Geometry_FillContains(int sender, int point);
 /**
  * @method flags=cpp
- * @param sender cast=(Geometry^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(Geometry^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native int Geometry_FillContainsWithDetail(int sender, int geometry);
 /**
  * @method flags=cpp
- * @param sender cast=(Geometry^),flags=gcobject
- * @param pen cast=(Pen^),flags=gcobject
- * @param hitPoint cast=(Point),flags=gcobject
+ * @param sender cast=(Geometry^),flags=object
+ * @param pen cast=(Pen^),flags=object
+ * @param hitPoint cast=(Point),flags=object
  */
 public static final native boolean Geometry_StrokeContains(int sender, int pen, int hitPoint);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Geometry^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Geometry^),flags=object
  */
 public static final native int Geometry_Transform(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Geometry^),flags=gcobject
- * @param transform cast=(Transform^),flags=gcobject
+ * @param sender cast=(Geometry^),flags=object
+ * @param transform cast=(Transform^),flags=object
  */
 public static final native void Geometry_Transform(int sender, int transform);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GeometryGroup^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GeometryGroup^),flags=object
  */
 public static final native int GeometryGroup_Children(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GeometryGroup^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GeometryGroup^),flags=object
  */
 public static final native int GeometryGroup_Children(int sender, int index);
 /**
  * @method flags=getter
- * @param sender cast=(GiveFeedbackEventArgs^),flags=gcobject
+ * @param sender cast=(GiveFeedbackEventArgs^),flags=object
  */
 public static final native int GiveFeedbackEventArgs_Effects (int sender);
 /**
  * @method flags=getter
- * @param sender cast=(GlyphRun^),flags=gcobject
+ * @param sender cast=(GlyphRun^),flags=object
  */
 public static final native int GlyphRun_BidiLevel(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GradientBrush^),flags=gcobject
+ * @param sender cast=(GradientBrush^),flags=object
  * @param mode cast=(BrushMappingMode)
  */
 public static final native void GradientBrush_MappingMode(int sender, int mode);
 /**
  * @method flags=setter
- * @param sender cast=(GradientBrush^),flags=gcobject
+ * @param sender cast=(GradientBrush^),flags=object
  * @param method cast=(GradientSpreadMethod)
  */
 public static final native void GradientBrush_SpreadMethod(int sender, int method);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Grid^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Grid^),flags=object
  */
 public static final native int Grid_ColumnDefinitions(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Grid^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Grid^),flags=object
  */
 public static final native int Grid_RowDefinitions(int sender);
 /**
  * @method accessor=Grid::SetColumn
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Grid_SetColumn(int element, int index);
 /**
  * @method accessor=Grid::SetColumnSpan
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Grid_SetColumnSpan(int element, int value);
 /**
  * @method accessor=Grid::SetRow
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Grid_SetRow(int element, int index);
 /**
  * @method accessor=Grid::SetRowSpan
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native void Grid_SetRowSpan(int element, int value);
 /**
  * @method flags=setter
- * @param sender cast=(GridView^),flags=gcobject
- * @param style cast=(Style^),flags=gcobject
+ * @param sender cast=(GridView^),flags=object
+ * @param style cast=(Style^),flags=object
  */
 public static final native void GridView_ColumnHeaderContainerStyle(int sender, int style);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridView^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridView^),flags=object
  */
 public static final native int GridView_Columns(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GridView^),flags=gcobject
+ * @param sender cast=(GridView^),flags=object
  */
 public static final native void GridView_AllowsColumnReorder(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native double GridViewColumn_ActualWidth(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native int GridViewColumn_CellTemplate(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GridViewColumn^),flags=gcobject
- * @param value cast=(DataTemplate^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
+ * @param value cast=(DataTemplate^),flags=object
  */
 public static final native void GridViewColumn_CellTemplate(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native int GridViewColumn_Header(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GridViewColumn^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void GridViewColumn_Header(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native int GridViewColumn_HeaderTemplate(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GridViewColumn^),flags=gcobject
- * @param value cast=(DataTemplate^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
+ * @param value cast=(DataTemplate^),flags=object
  */
 public static final native void GridViewColumn_HeaderTemplate(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native double GridViewColumn_Width(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumn^),flags=object
  */
 public static final native void GridViewColumn_Width(int sender, double value);
-/** @method accessor=GridViewColumn::WidthProperty,flags=const gcobject */
+/** @method accessor=GridViewColumn::WidthProperty,flags=const object */
 public static final native int GridViewColumn_WidthProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridViewColumnCollection^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridViewColumnCollection^),flags=object
  */
 public static final native int GridViewColumnCollection_default(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(GridViewColumnCollection^),flags=gcobject
+ * @param sender cast=(GridViewColumnCollection^),flags=object
  */
 public static final native void GridViewColumnCollection_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(GridViewColumnCollection^),flags=gcobject
+ * @param sender cast=(GridViewColumnCollection^),flags=object
  */
 public static final native int GridViewColumnCollection_Count(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(GridViewColumnCollection ^),flags=gcobject
- * @param item cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumnCollection ^),flags=object
+ * @param item cast=(GridViewColumn^),flags=object
  */
 public static final native int GridViewColumnCollection_IndexOf(int sender, int item);
 /**
  * @method flags=cpp
- * @param sender cast=(GridViewColumnCollection^),flags=gcobject
- * @param value cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumnCollection^),flags=object
+ * @param value cast=(GridViewColumn^),flags=object
  */
 public static final native void GridViewColumnCollection_Insert(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(GridViewColumnCollection^),flags=gcobject
- * @param value cast=(GridViewColumn^),flags=gcobject
+ * @param sender cast=(GridViewColumnCollection^),flags=object
+ * @param value cast=(GridViewColumn^),flags=object
  */
 public static final native boolean GridViewColumnCollection_Remove(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(GridViewColumnHeader^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(GridViewColumnHeader^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void GridViewColumnHeader_Content(int sender, int value);
-/** @method accessor=GridViewRowPresenterBase::ColumnsProperty,flags=const gcobject */
+/** @method accessor=GridViewRowPresenterBase::ColumnsProperty,flags=const object */
 public static final native int GridViewRowPresenterBase_ColumnsProperty();
-/** @method accessor=GridViewHeaderRowPresenter::typeid,flags=const gcobject */
+/** @method accessor=GridViewHeaderRowPresenter::typeid,flags=const object */
 public static final native int GridViewHeaderRowPresenter_typeid();
 /**
  * @method flags=setter
- * @param sender cast=(GridViewRowPresenter^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(GridViewRowPresenter^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void GridViewRowPresenter_Content(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(GridViewRowPresenter^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(GridViewRowPresenter^),flags=object
  */
 public static final native int GridViewRowPresenter_Content(int sender);
-/** @method accessor=GridViewRowPresenter::typeid,flags=const gcobject */
+/** @method accessor=GridViewRowPresenter::typeid,flags=const object */
 public static final native int GridViewRowPresenter_typeid();
 /**
  * @method flags=setter
- * @param sender cast=(GridViewRowPresenterBase^),flags=gcobject
- * @param value cast=(GridViewColumnCollection^),flags=gcobject
+ * @param sender cast=(GridViewRowPresenterBase^),flags=object
+ * @param value cast=(GridViewColumnCollection^),flags=object
  */
 public static final native void GridViewRowPresenterBase_Columns(int sender, int value);
 /** @method flags=no_gen */
@@ -2565,483 +2570,483 @@ public static final native void GCHandle_Dump();
 /** @method flags=no_gen */
 public static final native int GCHandle_ToHandle(int gchandle);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(HeaderedContentControl^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(HeaderedContentControl^),flags=object
  */
 public static final native int HeaderedContentControl_Header(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(HeaderedContentControl^),flags=gcobject
- * @param header cast=(Object^),flags=gcobject
+ * @param sender cast=(HeaderedContentControl^),flags=object
+ * @param header cast=(Object^),flags=object
  */
 public static final native void HeaderedContentControl_Header(int sender, int header);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(HeaderedItemsControl^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(HeaderedItemsControl^),flags=object
  */
 public static final native int HeaderedItemsControl_Header(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(HeaderedItemsControl^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(HeaderedItemsControl^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void HeaderedItemsControl_Header(int sender, int value);  
-/** @method accessor=HeaderedItemsControl::HeaderTemplateProperty,flags=const gcobject */
+/** @method accessor=HeaderedItemsControl::HeaderTemplateProperty,flags=const object */
 public static final native int HeaderedItemsControl_HeaderTemplateProperty();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(System::Windows::Forms::HtmlDocument^),flags=gcobject
- * @param string cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(System::Windows::Forms::HtmlDocument^),flags=object
+ * @param string cast=(String^),flags=object
  */
 public static final native int HtmlDocument_InvokeScript(int sender, int string);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(HwndSource^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(HwndSource^),flags=object
  */
 public static final native int HwndSource_Handle(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(Hyperlink^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(Hyperlink^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void Hyperlink_Click(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(ICollection^),flags=gcobject
+ * @param sender cast=(ICollection^),flags=object
  */
 public static final native int ICollection_Count(int sender);
 /**
- * @method accessor=System::Drawing::Icon::FromHandle,flags=no_gen gcobject
- * @param hIcon cast=(IntPtr),flags=gcobject
+ * @method accessor=System::Drawing::Icon::FromHandle,flags=no_gen object
+ * @param hIcon cast=(IntPtr),flags=object
  */
 public static final native int Icon_FromHandle(int hIcon);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IEnumerable ^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IEnumerable ^),flags=object
  */
 public static final native int IEnumerable_GetEnumerator(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native int IEnumerator_Current(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native boolean IEnumerator_MoveNext(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(IList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(IList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void IList_Add(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(IList^),flags=gcobject
+ * @param sender cast=(IList^),flags=object
  */
 public static final native void IList_Clear(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IList^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IList^),flags=object
  */
 public static final native int IList_default(int sender, int index);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IList^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IList^),flags=object
  */
 public static final native int IList_GetEnumerator(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(IList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(IList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native int IList_IndexOf(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(IList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(IList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void IList_Insert(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(IList^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(IList^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void IList_Remove(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(IndexedGlyphRun^),flags=gcobject
+ * @param sender cast=(IndexedGlyphRun^),flags=object
  */
 public static final native int IndexedGlyphRun_TextSourceCharacterIndex(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(IndexedGlyphRun^),flags=gcobject
+ * @param sender cast=(IndexedGlyphRun^),flags=object
  */
 public static final native int IndexedGlyphRun_TextSourceLength(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IndexedGlyphRun^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IndexedGlyphRun^),flags=object
  */
 public static final native int IndexedGlyphRun_GlyphRun(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IEnumerable^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IEnumerable^),flags=object
  */
 public static final native int IndexedGlyphRunCollection_GetEnumerator(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native int IndexedGlyphRunCollection_Current(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(InlineCollection^),flags=gcobject
- * @param value cast=(Inline^),flags=gcobject
+ * @param sender cast=(InlineCollection^),flags=object
+ * @param value cast=(Inline^),flags=object
  */
 public static final native void InlineCollection_Add(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(InlineCollection^),flags=gcobject
+ * @param sender cast=(InlineCollection^),flags=object
  */
 public static final native void InlineCollection_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(InputEventArgs^),flags=gcobject
+ * @param sender cast=(InputEventArgs^),flags=object
  */
 public static final native int InputEventArgs_Timestamp(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Image^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Image^),flags=object
  */
 public static final native int Image_Source(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Image^),flags=gcobject
- * @param imageSource cast=(ImageSource^),flags=gcobject
+ * @param sender cast=(Image^),flags=object
+ * @param imageSource cast=(ImageSource^),flags=object
  */
 public static final native void Image_Source(int sender, int imageSource);
-/** @method accessor=Image::SourceProperty,flags=const gcobject */
+/** @method accessor=Image::SourceProperty,flags=const object */
 public static final native int Image_SourceProperty();
-/** @method accessor=Image::StretchProperty,flags=const gcobject */
+/** @method accessor=Image::StretchProperty,flags=const object */
 public static final native int Image_StretchProperty();
 /**
  * @method flags=setter
- * @param sender cast=(Image^),flags=gcobject
+ * @param sender cast=(Image^),flags=object
  * @param stretch cast=(Stretch)
  */
 public static final native void Image_Stretch(int sender, int stretch);
-/** @method accessor=Image::typeid,flags=const gcobject */
+/** @method accessor=Image::typeid,flags=const object */
 public static final native int Image_typeid();
 /**
- * @method accessor=System::Windows::Interop::Imaging::CreateBitmapSourceFromHIcon,flags=gcobject
+ * @method accessor=System::Windows::Interop::Imaging::CreateBitmapSourceFromHIcon,flags=object
  * @param hIcon cast=(IntPtr)
- * @param sourceRect cast=(Int32Rect),flags=gcobject
- * @param sizeOptions cast=(BitmapSizeOptions^),flags=gcobject
+ * @param sourceRect cast=(Int32Rect),flags=object
+ * @param sizeOptions cast=(BitmapSizeOptions^),flags=object
  */
 public static final native int Imaging_CreateBitmapSourceFromHIcon(int hIcon, int sourceRect, int sizeOptions);
-/** @method accessor=ImageSource::typeid,flags=const gcobject */
+/** @method accessor=ImageSource::typeid,flags=const object */
 public static final native int ImageSource_typeid();
 /**
  * @method flags=cpp
- * @param value cast=(IntPtr^),flags=gcobject
+ * @param value cast=(IntPtr^),flags=object
  */
 public static final native int IntPtr_ToInt32 (int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
- * @param item cast=(Object^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
+ * @param item cast=(Object^),flags=object
  */
 public static final native void ItemCollection_Add(int sender, int item);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native void ItemCollection_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native int ItemCollection_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native int ItemCollection_CurrentItem(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native int ItemCollection_CurrentPosition(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native int ItemCollection_GetItemAt(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native int ItemCollection_IndexOf(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void ItemCollection_Insert(int sender, int index, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
- * @param item cast=(Object^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
+ * @param item cast=(Object^),flags=object
  */
 public static final native void ItemCollection_Remove(int sender, int item);
 /**
  * @method flags=cpp
- * @param sender cast=(ItemCollection^),flags=gcobject
+ * @param sender cast=(ItemCollection^),flags=object
  */
 public static final native void ItemCollection_RemoveAt(int sender, int index);
 /**
  * @method flags=getter
- * @param sender cast=(ItemsControl^),flags=gcobject
+ * @param sender cast=(ItemsControl^),flags=object
  */
 public static final native boolean ItemsControl_HasItems(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ItemsControl^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ItemsControl^),flags=object
  */
 public static final native int ItemsControl_Items(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ItemsControl^),flags=gcobject
- * @param value cast=(IEnumerable^),flags=gcobject
+ * @param sender cast=(ItemsControl^),flags=object
+ * @param value cast=(IEnumerable^),flags=object
  */
 public static final native void ItemsControl_ItemsSource(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ItemsControl^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ItemsControl^),flags=object
  */
 public static final native int ItemsControl_ItemTemplate(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ItemsControl^),flags=gcobject
- * @param value cast=(DataTemplate^),flags=gcobject
+ * @param sender cast=(ItemsControl^),flags=object
+ * @param value cast=(DataTemplate^),flags=object
  */
 public static final native void ItemsControl_ItemTemplate(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(ItemsControl^),flags=gcobject
+ * @param sender cast=(ItemsControl^),flags=object
  */
 public static final native void ItemsControl_IsTextSearchEnabled(int sender, boolean value);
-/** @method accessor=ItemsPresenter::typeid,flags=const gcobject */
+/** @method accessor=ItemsPresenter::typeid,flags=const object */
 public static final native int ItemsPresenter_typeid();
 /**
  * @method accessor=KeyInterop::VirtualKeyFromKey
  * @param key cast=(Key)
  */
 public static final native int KeyInterop_VirtualKeyFromKey(int key);
-/** @method accessor=Keyboard::FocusedElement,flags=const gcobject */
+/** @method accessor=Keyboard::FocusedElement,flags=const object */
 public static final native int Keyboard_FocusedElement();
 /**
- * @method accessor=Keyboard::Focus,flags=gcobject
- * @param element cast=(IInputElement^),flags=gcobject
+ * @method accessor=Keyboard::Focus,flags=object
+ * @param element cast=(IInputElement^),flags=object
  */
 public static final native int Keyboard_Focus(int element);
 /** @method accessor=Keyboard::Modifiers,flags=const */
 public static final native int Keyboard_Modifiers();
 /**
  * @method accessor=KeyboardNavigation::GetIsTabStop
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  */
 public static final native boolean KeyboardNavigation_GetIsTabStop(int element);
 /**
  * @method accessor=KeyboardNavigation::SetIsTabStop
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  */
 public static final native void KeyboardNavigation_SetIsTabStop(int element, boolean istabstop);
 /**
  * @method accessor=KeyboardNavigation::SetDirectionalNavigation
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  * @param mode cast=(KeyboardNavigationMode)
  */
 public static final native void KeyboardNavigation_SetDirectionalNavigation(int element, int mode);
 /**
  * @method accessor=KeyboardNavigation::SetTabNavigation
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  * @param mode cast=(KeyboardNavigationMode)
  */
 public static final native void KeyboardNavigation_SetTabNavigation(int element, int mode);
 /**
  * @method accessor=KeyboardNavigation::SetControlTabNavigation
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  * @param mode cast=(KeyboardNavigationMode)
  */
 public static final native void KeyboardNavigation_SetControlTabNavigation(int element, int mode);
 /**
  * @method flags=getter
- * @param sender cast=(KeyboardDevice^),flags=gcobject
+ * @param sender cast=(KeyboardDevice^),flags=object
  */
 public static final native int KeyboardDevice_Modifiers(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(KeyboardEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(KeyboardEventArgs^),flags=object
  */
 public static final native int KeyboardEventArgs_KeyboardDevice(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(KeyEventArgs^),flags=gcobject
+ * @param sender cast=(KeyEventArgs^),flags=object
  */
 public static final native boolean KeyEventArgs_IsDown(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(KeyEventArgs^),flags=gcobject
+ * @param sender cast=(KeyEventArgs^),flags=object
  */
 public static final native boolean KeyEventArgs_IsRepeat(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(KeyEventArgs^),flags=gcobject
+ * @param sender cast=(KeyEventArgs^),flags=object
  */
 public static final native boolean KeyEventArgs_IsToggled(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(KeyEventArgs^),flags=gcobject
+ * @param sender cast=(KeyEventArgs^),flags=object
  */
 public static final native int KeyEventArgs_Key(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(KeyEventArgs^),flags=gcobject
+ * @param sender cast=(KeyEventArgs^),flags=object
  */
 public static final native int KeyEventArgs_SystemKey(int sender);
-/** @method accessor=KeyTime::Uniform,flags=const gcobject */
+/** @method accessor=KeyTime::Uniform,flags=const object */
 public static final native int KeyTime_Uniform();
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native boolean Matrix_IsIdentity(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_Invert(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_M11(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_M12(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_M21(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_M22(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_OffsetX(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native double Matrix_OffsetY(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_M11(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_M12(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_M21(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_M22(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_OffsetX(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_OffsetY(int sender, double value);
 /**
- * @method accessor=Matrix::Multiply,flags=gcobject
- * @param m1 cast=(Matrix),flags=gcobject
- * @param m2 cast=(Matrix),flags=gcobject
+ * @method accessor=Matrix::Multiply,flags=object
+ * @param m1 cast=(Matrix),flags=object
+ * @param m2 cast=(Matrix),flags=object
  */
 public static final native int Matrix_Multiply(int m1, int m2);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_RotatePrepend(int sender, double angle);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_ScalePrepend(int sender, double scaleX, double scaleY);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_SetIdentity(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_SkewPrepend(int sender, double skewX, double skewY);
 /**
  * @method flags=cpp
- * @param sender cast=(Matrix^),flags=gcobject
+ * @param sender cast=(Matrix^),flags=object
  */
 public static final native void Matrix_TranslatePrepend(int sender, double tx, double ty);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Matrix^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Matrix^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native int Matrix_Transform(int sender, int point);
 /**
  * @method accessor=MessageBox::Show
- * @param messageBoxText cast=(String^),flags=gcobject
- * @param caption cast=(String^),flags=gcobject
+ * @param messageBoxText cast=(String^),flags=object
+ * @param caption cast=(String^),flags=object
  * @param button cast=(MessageBoxButton)
  * @param icon cast=(MessageBoxImage)
  * @param defaultResult cast=(MessageBoxResult)
  */
 public static final native int MessageBox_Show (int messageBoxText, int caption, int button, int icon,	int defaultResult);
-/** @method accessor=Mouse::Captured,flags=const gcobject */
+/** @method accessor=Mouse::Captured,flags=const object */
 public static final native int Mouse_Captured();
-/** @method accessor=Mouse::DirectlyOver,flags=const gcobject */
+/** @method accessor=Mouse::DirectlyOver,flags=const object */
 public static final native int Mouse_DirectlyOver();
 /**
- * @method accessor=Mouse::GetPosition,flags=gcobject
- * @param relativeTo cast=(IInputElement^),flags=gcobject
+ * @method accessor=Mouse::GetPosition,flags=object
+ * @param relativeTo cast=(IInputElement^),flags=object
  */
 public static final native int Mouse_GetPosition(int relativeTo);
 /**
  * @method accessor=Mouse::SetCursor
- * @param cursor cast=(Cursor^),flags=gcobject
+ * @param cursor cast=(Cursor^),flags=object
  */
 public static final native boolean Mouse_SetCursor(int cursor);
 /** @method accessor=Mouse::LeftButton,flags=const */
@@ -3056,1091 +3061,1101 @@ public static final native int Mouse_XButton1();
 public static final native int Mouse_XButton2();
 /**
  * @method flags=getter
- * @param sender cast=(MouseButtonEventArgs^),flags=gcobject
+ * @param sender cast=(MouseButtonEventArgs^),flags=object
  */
 public static final native int MouseButtonEventArgs_ButtonState(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseButtonEventArgs^),flags=gcobject
+ * @param sender cast=(MouseButtonEventArgs^),flags=object
  */
 public static final native int MouseButtonEventArgs_ClickCount(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseButtonEventArgs^),flags=gcobject
+ * @param sender cast=(MouseButtonEventArgs^),flags=object
  */
 public static final native int MouseButtonEventArgs_ChangedButton(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(MouseEventArgs^),flags=gcobject
- * @param relativeTo cast=(IInputElement^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(MouseEventArgs^),flags=object
+ * @param relativeTo cast=(IInputElement^),flags=object
  */
 public static final native int MouseEventArgs_GetPosition(int sender, int relativeTo);
 /**
  * @method flags=getter
- * @param sender cast=(MouseEventArgs^),flags=gcobject
+ * @param sender cast=(MouseEventArgs^),flags=object
  */
 public static final native int MouseEventArgs_LeftButton(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseEventArgs^),flags=gcobject
+ * @param sender cast=(MouseEventArgs^),flags=object
  */
 public static final native int MouseEventArgs_MiddleButton(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseEventArgs^),flags=gcobject
+ * @param sender cast=(MouseEventArgs^),flags=object
  */
 public static final native int MouseEventArgs_RightButton(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseEventArgs^),flags=gcobject
+ * @param sender cast=(MouseEventArgs^),flags=object
  */
 public static final native int MouseEventArgs_XButton1(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseEventArgs^),flags=gcobject
+ * @param sender cast=(MouseEventArgs^),flags=object
  */
 public static final native int MouseEventArgs_XButton2(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(MouseWheelEventArgs^),flags=gcobject
+ * @param sender cast=(MouseWheelEventArgs^),flags=object
  */
 public static final native int MouseWheelEventArgs_Delta(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ListBoxItem^),flags=gcobject
+ * @param sender cast=(ListBoxItem^),flags=object
  */
 public static final native boolean ListBoxItem_IsSelected(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ListBoxItem^),flags=gcobject
+ * @param sender cast=(ListBoxItem^),flags=object
  */
 public static final native void ListBoxItem_IsSelected(int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(ListBox^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param sender cast=(ListBox^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native void ListBox_ScrollIntoView(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ListBox^),flags=gcobject
+ * @param sender cast=(ListBox^),flags=object
  */
 public static final native void ListBox_SelectAll(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ListBox^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ListBox^),flags=object
  */
 public static final native int ListBox_SelectedItems(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ListBox^),flags=gcobject
+ * @param sender cast=(ListBox^),flags=object
  * @param value cast=(SelectionMode)
  */
 public static final native void ListBox_SelectionMode(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(ListBox^),flags=gcobject
+ * @param sender cast=(ListBox^),flags=object
  */
 public static final native void ListBox_UnselectAll(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ListView^),flags=gcobject
- * @param value cast=(ViewBase^),flags=gcobject
+ * @param sender cast=(ListView^),flags=object
+ * @param value cast=(ViewBase^),flags=object
  */
 public static final native void ListView_View(int sender, int value);
-/** @method accessor=ListViewItem::typeid,flags=const gcobject */
+/** @method accessor=ListViewItem::typeid,flags=const object */
 public static final native int ListViewItem_typeid();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(System::IO::MemoryStream^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(System::IO::MemoryStream^),flags=object
  */
 public static final native int MemoryStream_ToArray(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::IO::MemoryStream^),flags=gcobject
- * @param buffer cast=(array<Byte>^),flags=gcobject
+ * @param sender cast=(System::IO::MemoryStream^),flags=object
+ * @param buffer cast=(array<Byte>^),flags=object
  */
 public static final native void MemoryStream_Write(int sender, int buffer, int offset, int count);
 /**
  * @method flags=setter
- * @param sender cast=(Menu^),flags=gcobject
+ * @param sender cast=(Menu^),flags=object
  */
 public static final native void Menu_IsMainMenu(int sender, boolean value);
 /**
  * @method flags=adder
- * @param sender cast=(MenuItem^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void MenuItem_Click(int sender, int handler);
 /**
  * @method flags=setter
- * @param sender cast=(MenuItem^),flags=gcobject
- * @param value cast=(Image^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
+ * @param value cast=(Image^),flags=object
  */
 public static final native void MenuItem_Icon(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(MenuItem^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void MenuItem_InputGestureText(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(MenuItem^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
  */
 public static final native void MenuItem_IsCheckable(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(MenuItem^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
  */
 public static final native boolean MenuItem_IsChecked(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(MenuItem^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
  */
 public static final native void MenuItem_IsChecked(int sender, boolean value);
 /**
  * @method flags=adder
- * @param sender cast=(MenuItem^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void MenuItem_SubmenuClosed(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(MenuItem^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(MenuItem^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void MenuItem_SubmenuOpened(int sender, int handler);
-/** @method accessor=Int32Rect::Empty,flags=const gcobject */
+/** @method accessor=Int32Rect::Empty,flags=const object */
 public static final native int Int32Rect_Empty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(MatrixTransform^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(MatrixTransform^),flags=object
  */
 public static final native int MatrixTransform_Matrix(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(MatrixTransform^),flags=gcobject
- * @param value cast=(Matrix),flags=gcobject
+ * @param sender cast=(MatrixTransform^),flags=object
+ * @param value cast=(Matrix),flags=object
  */
 public static final native void MatrixTransform_Matrix(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
- * @param value cast=(System::Drawing::Icon^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
+ * @param value cast=(System::Drawing::Icon^),flags=object
  */
 public static final native void NotifyIcon_Icon(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::MouseEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
+ * @param handler cast=(System::Windows::Forms::MouseEventHandler^),flags=object
  */
 public static final native void NotifyIcon_MouseDown(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::MouseEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
+ * @param handler cast=(System::Windows::Forms::MouseEventHandler^),flags=object
  */
 public static final native void NotifyIcon_MouseUp(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void NotifyIcon_DoubleClick(int sender, int handler);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void NotifyIcon_Text(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::NotifyIcon^),flags=object
  */
 public static final native void NotifyIcon_Visible(int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(Object ^),flags=gcobject
- * @param o cast=(Object ^),flags=gcobject
+ * @param sender cast=(Object ^),flags=object
+ * @param o cast=(Object ^),flags=object
  */
 public static final native boolean Object_Equals(int sender, int o);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Object ^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Object ^),flags=object
  */
 public static final native int Object_GetType(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Object ^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Object ^),flags=object
  */
 public static final native int Object_ToString(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(ObservableCollection<GridViewColumn^>^),flags=gcobject
+ * @param sender cast=(ObservableCollection<GridViewColumn^>^),flags=object
  */
 public static final native void ObservableCollectionGridViewColumn_Move(int sender, int oldIndex, int newIndex);
 /**
  * @method flags=setter
- * @param sender cast=(OpenFileDialog^),flags=gcobject
+ * @param sender cast=(OpenFileDialog^),flags=object
  */
 public static final native void OpenFileDialog_Multiselect (int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(RowDefinition^),flags=gcobject
- * @param height cast=(GridLength),flags=gcobject
+ * @param sender cast=(RowDefinition^),flags=object
+ * @param height cast=(GridLength),flags=object
  */
 public static final native void RowDefinition_Height(int sender, int height);
 /**
  * @method flags=cpp
- * @param sender cast=(RowDefinitionCollection^),flags=gcobject
- * @param row cast=(RowDefinition^),flags=gcobject
+ * @param sender cast=(RowDefinitionCollection^),flags=object
+ * @param row cast=(RowDefinition^),flags=object
  */
 public static final native void RowDefinitionCollection_Add(int sender, int row);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Panel^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Panel^),flags=object
  */
 public static final native int Panel_Background(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Panel^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(Panel^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void Panel_Background(int sender, int brush);
-/** @method accessor=Panel::BackgroundProperty,flags=const gcobject */
+/** @method accessor=Panel::BackgroundProperty,flags=const object */
 public static final native int Panel_BackgroundProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Panel^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Panel^),flags=object
  */
 public static final native int Panel_Children(int sender);
 /**
  * @method accessor=Panel::GetZIndex
- * @param element cast=(UIElement^),flags=gcobject
+ * @param element cast=(UIElement^),flags=object
  */
 public static final native int Panel_GetZIndex(int element);
 /**
  * @method accessor=Panel::SetZIndex
- * @param element cast=(UIElement ^),flags=gcobject
+ * @param element cast=(UIElement ^),flags=object
  */
 public static final native void Panel_SetZIndex(int element, int index);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native int PasswordBox_Password(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(PasswordBox^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void PasswordBox_Password(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native char PasswordBox_PasswordChar(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native void PasswordBox_PasswordChar(int sender, char value);
 /**
  * @method flags=getter
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native int PasswordBox_MaxLength(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native void PasswordBox_MaxLength(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(PasswordBox^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void PasswordBox_PasswordChanged(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(PasswordBox^),flags=gcobject
+ * @param sender cast=(PasswordBox^),flags=object
  */
 public static final native void PasswordBox_Paste(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Path^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(Path^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void Path_Data(int sender, int geometry);
 /**
  * @method flags=setter
- * @param sender cast=(Path^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(Path^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void Path_Fill(int sender, int brush);
 /**
  * @method flags=setter
- * @param sender cast=(Path^),flags=gcobject
+ * @param sender cast=(Path^),flags=object
  * @param value cast=(Stretch)
  */
 public static final native void Path_Stretch(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(PathFigureCollection^),flags=gcobject
- * @param element cast=(PathFigure^),flags=gcobject
+ * @param sender cast=(PathFigureCollection^),flags=object
+ * @param element cast=(PathFigure^),flags=object
  */
 public static final native void PathFigureCollection_Add(int sender, int element);
 /**
  * @method flags=getter
- * @param sender cast=(PathFigureCollection^),flags=gcobject
+ * @param sender cast=(PathFigureCollection^),flags=object
  */
 public static final native int PathFigureCollection_Count(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(PathFigure^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @param sender cast=(PathFigure^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native void PathFigure_StartPoint(int sender, int point);
 /**
  * @method flags=setter
- * @param sender cast=(PathFigure^),flags=gcobject
+ * @param sender cast=(PathFigure^),flags=object
  */
 public static final native void PathFigure_IsClosed(int sender, boolean closed);
 /**
  * @method flags=getter
- * @param sender cast=(PathFigure^),flags=gcobject
+ * @param sender cast=(PathFigure^),flags=object
  */
 public static final native boolean PathFigure_IsClosed(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PathFigure^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PathFigure^),flags=object
  */
 public static final native int PathFigure_Segments(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PathFigure^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PathFigure^),flags=object
  */
 public static final native int PathFigure_Segments(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(PathGeometry^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(PathGeometry^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void PathGeometry_AddGeometry(int sender, int geometry);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PathGeometry^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PathGeometry^),flags=object
  */
 public static final native int PathGeometry_Bounds(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(PathGeometry^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(PathGeometry^),flags=object
  */
 public static final native int PathGeometry_Clone(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(PathGeometry^),flags=gcobject
+ * @param sender cast=(PathGeometry^),flags=object
  * @param value cast=(FillRule)
  */
 public static final native void PathGeometry_FillRule(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PathGeometry^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PathGeometry^),flags=object
  */
 public static final native int PathGeometry_Figures(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PathGeometry^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PathGeometry^),flags=object
  */
 public static final native int PathGeometry_Figures(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(PathSegmentCollection^),flags=gcobject
- * @param element cast=(PathSegment^),flags=gcobject
+ * @param sender cast=(PathSegmentCollection^),flags=object
+ * @param element cast=(PathSegment^),flags=object
  */
 public static final native void PathSegmentCollection_Add(int sender, int element);
 /**
  * @method flags=getter
- * @param sender cast=(PathSegmentCollection^),flags=gcobject
+ * @param sender cast=(PathSegmentCollection^),flags=object
  */
 public static final native int PathSegmentCollection_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Pen^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Pen^),flags=object
  */
 public static final native int Pen_Brush(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
- * @param value cast=(Brush^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
+ * @param value cast=(Brush^),flags=object
  */
 public static final native void Pen_Brush(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  * @param value cast=(PenLineCap)
  */
 public static final native void Pen_DashCap(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
- * @param value cast=(DashStyle^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
+ * @param value cast=(DashStyle^),flags=object
  */
 public static final native void Pen_DashStyle(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  * @param value cast=(PenLineCap)
  */
 public static final native void Pen_EndLineCap(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  * @param value cast=(PenLineCap)
  */
 public static final native void Pen_StartLineCap(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  * @param value cast=(PenLineJoin)
  */
 public static final native void Pen_LineJoin(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  */
 public static final native void Pen_MiterLimit(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Pen^),flags=gcobject
+ * @param sender cast=(Pen^),flags=object
  */
 public static final native void Pen_Thickness(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(PixelFormat^),flags=gcobject
+ * @param sender cast=(PixelFormat^),flags=object
  */
 public static final native int PixelFormat_BitsPerPixel(int sender);
-/** @method accessor=PixelFormats::Bgr101010,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgr101010,flags=const object */
 public static final native int PixelFormats_Bgr101010();
-/** @method accessor=PixelFormats::Bgr24,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgr24,flags=const object */
 public static final native int PixelFormats_Bgr24();
-/** @method accessor=PixelFormats::Bgr32,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgr32,flags=const object */
 public static final native int PixelFormats_Bgr32();
-/** @method accessor=PixelFormats::Bgr555,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgr555,flags=const object */
 public static final native int PixelFormats_Bgr555();
-/** @method accessor=PixelFormats::Bgr565,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgr565,flags=const object */
 public static final native int PixelFormats_Bgr565();
-/** @method accessor=PixelFormats::Bgra32,flags=const gcobject */
+/** @method accessor=PixelFormats::Bgra32,flags=const object */
 public static final native int PixelFormats_Bgra32();
-/** @method accessor=PixelFormats::BlackWhite,flags=const gcobject */
+/** @method accessor=PixelFormats::BlackWhite,flags=const object */
 public static final native int PixelFormats_BlackWhite();
-/** @method accessor=PixelFormats::Default,flags=const gcobject */
+/** @method accessor=PixelFormats::Default,flags=const object */
 public static final native int PixelFormats_Default();
-/** @method accessor=PixelFormats::Indexed1,flags=const gcobject */
+/** @method accessor=PixelFormats::Indexed1,flags=const object */
 public static final native int PixelFormats_Indexed1();
-/** @method accessor=PixelFormats::Indexed2,flags=const gcobject */
+/** @method accessor=PixelFormats::Indexed2,flags=const object */
 public static final native int PixelFormats_Indexed2();
-/** @method accessor=PixelFormats::Indexed4,flags=const gcobject */
+/** @method accessor=PixelFormats::Indexed4,flags=const object */
 public static final native int PixelFormats_Indexed4();
-/** @method accessor=PixelFormats::Indexed8,flags=const gcobject */
+/** @method accessor=PixelFormats::Indexed8,flags=const object */
 public static final native int PixelFormats_Indexed8();
-/** @method accessor=PixelFormats::Pbgra32,flags=const gcobject */
+/** @method accessor=PixelFormats::Pbgra32,flags=const object */
 public static final native int PixelFormats_Pbgra32();
-/** @method accessor=PixelFormats::Rgb24,flags=const gcobject */
+/** @method accessor=PixelFormats::Rgb24,flags=const object */
 public static final native int PixelFormats_Rgb24();
 /**
  * @method flags=cpp
- * @param sender cast=(PointCollection^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @param sender cast=(PointCollection^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native void PointCollection_Add(int sender, int point);
 /**
  * @method flags=getter
- * @param sender cast=(Point^),flags=gcobject
+ * @param sender cast=(Point^),flags=object
  */
 public static final native double Point_X(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Point^),flags=gcobject
+ * @param sender cast=(Point^),flags=object
  */
 public static final native double Point_Y(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native void Popup_AllowsTransparency(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(Popup^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native void Popup_Child(int sender, int child);
 /**
- * @method flags=getter gcobject
- * @param sender cast=(Popup^),flags=gcobject
+ * @method flags=getter object
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native int Popup_Child(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native void Popup_HorizontalOffset(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native double Popup_HorizontalOffset(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native void Popup_IsOpen(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native boolean Popup_IsOpen(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native void Popup_VerticalOffset(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Popup^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
  */
 public static final native double Popup_VerticalOffset(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(Popup^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Popup_Closed(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(Popup^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Popup^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Popup_Opened(int sender, int handler);
-/** @method accessor=PresentationSource::CurrentSources,flags=const gcobject */
+/** @method accessor=PresentationSource::CurrentSources,flags=const object */
 public static final native int PresentationSource_CurrentSources();
 /**
- * @method accessor=PresentationSource::FromVisual,flags=gcobject
- * @param visual cast=(Visual^),flags=gcobject
+ * @method accessor=PresentationSource::FromVisual,flags=object
+ * @param visual cast=(Visual^),flags=object
  */
 public static final native int PresentationSource_FromVisual(int visual);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(PresentationSource^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(PresentationSource^),flags=object
  */
 public static final native int PresentationSource_RootVisual(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ProgressBar ^),flags=gcobject
+ * @param sender cast=(ProgressBar ^),flags=object
  */
 public static final native void ProgressBar_IsIndeterminate(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(ProgressBar ^),flags=gcobject
+ * @param sender cast=(ProgressBar ^),flags=object
  */
 public static final native void ProgressBar_IsIndeterminate(int sender);
 /**
  * @method flags=setter
- * @param handle cast=(ProgressBar ^),flags=gcobject
+ * @param handle cast=(ProgressBar ^),flags=object
  * @param value cast=(Orientation)
  */
 public static final native void ProgressBar_Orientation(int handle, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(PropertyInfo^),flags=gcobject
- * @param obj cast=(Object^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
- * @param indexArray cast=(array<Object^>^),flags=gcobject
+ * @param sender cast=(PropertyInfo^),flags=object
+ * @param obj cast=(Object^),flags=object
+ * @param value cast=(Object^),flags=object
+ * @param indexArray cast=(array<Object^>^),flags=object
  */
 public static final native void PropertyInfo_SetValue(int sender, int obj, int value, int indexArray);
 /**
  * @method accessor=PropertyInfo::SetValue,flags=cpp
- * @param sender cast=(PropertyInfo^),flags=gcobject
- * @param obj cast=(Object^),flags=gcobject
+ * @param sender cast=(PropertyInfo^),flags=object
+ * @param obj cast=(Object^),flags=object
  * @param value cast=(bool)
- * @param indexArray cast=(array<Object^>^),flags=gcobject
+ * @param indexArray cast=(array<Object^>^),flags=object
  */
 public static final native void PropertyInfo_SetValueBoolean(int sender, int obj, boolean value, int indexArray);
 /**
  * @method flags=getter
- * @param sender cast=(QueryContinueDragEventArgs^),flags=gcobject
+ * @param sender cast=(QueryContinueDragEventArgs^),flags=object
  */
 public static final native boolean QueryContinueDragEventArgs_EscapePressed(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(QueryContinueDragEventArgs^),flags=gcobject
+ * @param sender cast=(QueryContinueDragEventArgs^),flags=object
  * @param dragAction cast=(DragAction)
  */
 public static final native void QueryContinueDragEventArgs_Action(int sender, int dragAction);
 /**
  * @method flags=getter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native double RangeBase_LargeChange(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native void RangeBase_LargeChange(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native double RangeBase_Maximum(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native void  RangeBase_Maximum(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native double RangeBase_Minimum(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native void  RangeBase_Minimum(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native double RangeBase_SmallChange(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native void RangeBase_SmallChange(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native double RangeBase_Value(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(RangeBase ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
  */
 public static final native void RangeBase_Value(int sender, double value);
 /**
  * @method flags=adder
- * @param sender cast=(RangeBase ^),flags=gcobject
- * @param handler cast=(RoutedPropertyChangedEventHandler<double> ^),flags=gcobject
+ * @param sender cast=(RangeBase ^),flags=object
+ * @param handler cast=(RoutedPropertyChangedEventHandler<double> ^),flags=object
  */
 public static final native void RangeBase_ValueChanged(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(Rect^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native boolean Rect_Contains(int sender, int point);
 /**
  * @method flags=cpp
- * @param sender cast=(Rect^),flags=gcobject
- * @param rect cast=(Rect),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
+ * @param rect cast=(Rect),flags=object
  */
 public static final native void Rect_Intersect(int sender, int rect);
 /**
  * @method flags=cpp
- * @param sender cast=(Rect^),flags=gcobject
- * @param rect cast=(Rect),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
+ * @param rect cast=(Rect),flags=object
  */
 public static final native void Rect_Union(int sender, int rect);
 /**
  * @method flags=getter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native double Rect_X(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native void Rect_X(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native double Rect_Y(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native void Rect_Y(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native double Rect_Width(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native void Rect_Width(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native double Rect_Height(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Rect^),flags=gcobject
+ * @param sender cast=(Rect^),flags=object
  */
 public static final native void Rect_Height(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Rectangle^),flags=gcobject
+ * @param sender cast=(System::Drawing::Rectangle^),flags=object
  */
 public static final native int Rectangle_X(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Rectangle^),flags=gcobject
+ * @param sender cast=(System::Drawing::Rectangle^),flags=object
  */
 public static final native int Rectangle_Y(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Rectangle^),flags=gcobject
+ * @param sender cast=(System::Drawing::Rectangle^),flags=object
  */
 public static final native int Rectangle_Width(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Drawing::Rectangle^),flags=gcobject
+ * @param sender cast=(System::Drawing::Rectangle^),flags=object
  */
 public static final native int Rectangle_Height(int sender);
-/** @method accessor=Registry::ClassesRoot,flags=const gcobject */
+/** @method accessor=Registry::ClassesRoot,flags=const object */
 public static final native int Registry_ClassesRoot();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(RegistryKey^),flags=gcobject
- * @param key cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(RegistryKey^),flags=object
+ * @param key cast=(String^),flags=object
  */
 public static final native int RegistryKey_OpenSubKey(int sender, int key);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(RegistryKey^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(RegistryKey^),flags=object
  */
 public static final native int RegistryKey_GetSubKeyNames(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(RegistryKey^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(RegistryKey^),flags=object
+ * @param name cast=(String^),flags=object
  */
 public static final native int RegistryKey_GetValue(int sender, int name);
-/** @method accessor=RepeatBehavior::Forever,flags=const gcobject */
+/** @method accessor=RepeatBehavior::Forever,flags=const object */
 public static final native int RepeatBehavior_Forever();
 /**
  * @method flags=setter
- * @param sender cast=(RelativeSource^),flags=gcobject
- * @param type cast=(Type^),flags=gcobject
+ * @param sender cast=(RelativeSource^),flags=object
+ * @param type cast=(Type^),flags=object
  */
 public static final native void RelativeSource_AncestorType(int sender, int type);
 /**
  * @method accessor=RenderOptions::GetBitmapScalingMode
- * @param target cast=(DependencyObject^),flags=gcobject
+ * @param target cast=(DependencyObject^),flags=object
  */
 public static final native int RenderOptions_GetBitmapScalingMode(int target);
 /**
  * @method accessor=RenderOptions::SetBitmapScalingMode
- * @param target cast=(DependencyObject^),flags=gcobject
+ * @param target cast=(DependencyObject^),flags=object
  * @param mode cast=(BitmapScalingMode)
  */
 public static final native void RenderOptions_SetBitmapScalingMode(int target, int mode);
 /**
  * @method accessor=RenderOptions::SetEdgeMode
- * @param target cast=(DependencyObject^),flags=gcobject
+ * @param target cast=(DependencyObject^),flags=object
  * @param edgeMode cast=(EdgeMode)
  */
 public static final native void RenderOptions_SetEdgeMode(int target, int edgeMode);
 /**
  * @method flags=cpp
- * @param sender cast=(RenderTargetBitmap^),flags=gcobject
- * @param visual cast=(Visual^),flags=gcobject
+ * @param sender cast=(RenderTargetBitmap^),flags=object
+ * @param visual cast=(Visual^),flags=object
  */
 public static final native void RenderTargetBitmap_Render(int sender, int visual);
 /**
  * @method flags=setter
- * @param sender cast=(RoutedEventArgs^),flags=gcobject
+ * @param sender cast=(RoutedEventArgs^),flags=object
  */
 public static final native void RoutedEventArgs_Handled(int sender, boolean handled);
-/** @method accessor=RoutedEventArgs::typeid,flags=const gcobject */
+/** @method accessor=RoutedEventArgs::typeid,flags=const object */
 public static final native int RoutedEventArgs_typeid();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(RoutedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(RoutedEventArgs^),flags=object
  */
 public static final native int RoutedEventArgs_OriginalSource(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(RoutedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(RoutedEventArgs^),flags=object
  */
 public static final native int RoutedEventArgs_Source(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(RoutedPropertyChangedEventArgs<Object^>^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(RoutedPropertyChangedEventArgs<Object^>^),flags=object
  */
 public static final native int RoutedPropertyChangedEventArgs_NewValue(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(RoutedPropertyChangedEventArgs<Object^>^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(RoutedPropertyChangedEventArgs<Object^>^),flags=object
  */
 public static final native int RoutedPropertyChangedEventArgs_OldValue(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Run^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(Run^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void Run_Text(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(SaveFileDialog^),flags=gcobject
+ * @param sender cast=(SaveFileDialog^),flags=object
  */
 public static final native void SaveFileDialog_OverwritePrompt(int sender, boolean value);
-/** @method accessor=System::Windows::Forms::Screen::AllScreens,flags=const gcobject */
+/** @method accessor=System::Windows::Forms::Screen::AllScreens,flags=const object */
 public static final native int Screen_AllScreens();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::Screen^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::Screen^),flags=object
  */
 public static final native int Screen_Bounds(int sender);
-/** @method accessor=System::Windows::Forms::Screen::PrimaryScreen,flags=const gcobject */
+/** @method accessor=System::Windows::Forms::Screen::PrimaryScreen,flags=const object */
 public static final native int Screen_PrimaryScreen();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::Screen^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::Screen^),flags=object
  */
 public static final native int Screen_WorkingArea(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(ScrollBar^),flags=gcobject
+ * @param sender cast=(ScrollBar^),flags=object
  */
 public static final native int ScrollBar_Orientation(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ScrollBar^),flags=gcobject
+ * @param sender cast=(ScrollBar^),flags=object
  * @param orientation cast=(Orientation)
  */
 public static final native void ScrollBar_Orientation(int sender, int orientation);
 /**
  * @method flags=adder
- * @param sender cast=(ScrollBar^),flags=gcobject
- * @param handler cast=(ScrollEventHandler^),flags=gcobject
+ * @param sender cast=(ScrollBar^),flags=object
+ * @param handler cast=(ScrollEventHandler^),flags=object
  */
 public static final native void ScrollBar_Scroll(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(ScrollBar^),flags=gcobject
+ * @param sender cast=(ScrollBar^),flags=object
  */
 public static final native double ScrollBar_ViewportSize(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ScrollBar^),flags=gcobject
+ * @param sender cast=(ScrollBar^),flags=object
  */
 public static final native void ScrollBar_ViewportSize(int sender, double value);
-/** @method accessor=ScrollBar::typeid,flags=const gcobject */
+/** @method accessor=ScrollBar::typeid,flags=const object */
 public static final native int ScrollBar_typeid();
 /**
+ * @method flags=getter object
+ * @param sender cast=(ScrollBar^),flags=object
+ */
+public static final native int ScrollBar_Track(int sender);
+/**
+ * @method flags=getter object
+ * @param sender cast=(Track^),flags=object
+ */
+public static final native int Track_Thumb(int sender);
+/**
  * @method flags=getter
- * @param sender cast=(ScrollEventArgs^),flags=gcobject
+ * @param sender cast=(ScrollEventArgs^),flags=object
  */
 public static final native int ScrollEventArgs_ScrollEventType(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(ScrollViewer^),flags=gcobject
+ * @param sender cast=(ScrollViewer^),flags=object
  */
 public static final native void ScrollViewer_ScrollToVerticalOffset(int sender, double offset);
 /**
  * @method accessor=ScrollViewer::SetVerticalScrollBarVisibility
- * @param sender cast=(DependencyObject^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
  * @param visibility cast=(ScrollBarVisibility)
  */
 public static final native void ScrollViewer_SetVerticalScrollBarVisibility(int sender, int visibility);
 /**
  * @method accessor=ScrollViewer::SetHorizontalScrollBarVisibility
- * @param sender cast=(DependencyObject^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
  * @param visibility cast=(ScrollBarVisibility)
  */
 public static final native void ScrollViewer_SetHorizontalScrollBarVisibility(int sender, int visibility);
-/** @method accessor=ScrollViewer::typeid,flags=const gcobject */
+/** @method accessor=ScrollViewer::typeid,flags=const object */
 public static final native int ScrollViewer_typeid();
 /**
  * @method flags=getter
- * @param sender cast=(ScrollViewer^),flags=gcobject
+ * @param sender cast=(ScrollViewer^),flags=object
  */
 public static final native double ScrollViewer_VerticalOffset(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Selector^),flags=gcobject
+ * @param sender cast=(Selector^),flags=object
  */
 public static final native void Selector_IsSynchronizedWithCurrentItem(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(Selector^),flags=gcobject
+ * @param sender cast=(Selector^),flags=object
  */
 public static final native int Selector_SelectedIndex(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Selector^),flags=gcobject
+ * @param sender cast=(Selector^),flags=object
  */
 public static final native void Selector_SelectedIndex(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Selector^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Selector^),flags=object
  */
 public static final native int Selector_SelectedItem(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Selector^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Selector^),flags=object
  */
 public static final native int Selector_SelectedValue(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(Selector^),flags=gcobject
- * @param handler cast=(SelectionChangedEventHandler^),flags=gcobject
+ * @param sender cast=(Selector^),flags=object
+ * @param handler cast=(SelectionChangedEventHandler^),flags=object
  */
 public static final native void Selector_SelectionChanged(int sender, int handler);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(SelectionChangedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(SelectionChangedEventArgs^),flags=object
  */
 public static final native int SelectionChangedEventArgs_AddedItems(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(SelectionChangedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(SelectionChangedEventArgs^),flags=object
  */
 public static final native int SelectionChangedEventArgs_RemovedItems(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(SetterBaseCollection^),flags=gcobject
- * @param setter cast=(SetterBase^),flags=gcobject
+ * @param sender cast=(SetterBaseCollection^),flags=object
+ * @param setter cast=(SetterBase^),flags=object
  */
 public static final native void SetterBaseCollection_Add(int sender, int setter);
 /**
  * @method flags=setter
- * @param sender cast=(Shape^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(Shape^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void Shape_Fill(int sender, int brush);
 /**
  * @method flags=setter
- * @param sender cast=(Shape^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(Shape^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void Shape_Stroke(int sender, int brush);
 /**
  * @method flags=setter
- * @param sender cast=(Shape^),flags=gcobject
+ * @param sender cast=(Shape^),flags=object
  */
 public static final native void Shape_StrokeThickness(int sender, double strokethickness);
 /**
  * @method flags=getter
- * @param sender cast=(Size ^),flags=gcobject
+ * @param sender cast=(Size ^),flags=object
  */
 public static final native double Size_Width(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Size ^),flags=gcobject
+ * @param sender cast=(Size ^),flags=object
  */
 public static final native double Size_Height(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Size ^),flags=gcobject
+ * @param sender cast=(Size ^),flags=object
  */
 public static final native void Size_Width(int sender, double width);
 /**
  * @method flags=setter
- * @param sender cast=(Size ^),flags=gcobject
+ * @param sender cast=(Size ^),flags=object
  */
 public static final native void Size_Height(int sender, double height);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(SizeChangedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(SizeChangedEventArgs^),flags=object
  */
 public static final native int SizeChangedEventArgs_NewSize(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(SizeChangedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(SizeChangedEventArgs^),flags=object
  */
 public static final native int SizeChangedEventArgs_PreviousSize(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Slider ^),flags=gcobject
+ * @param sender cast=(Slider ^),flags=object
  * @param value cast=(Orientation)
  */
 public static final native void Slider_Orientation(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Slider^),flags=gcobject
+ * @param sender cast=(Slider^),flags=object
  */
 public static final native void Slider_TickFrequency(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(Slider^),flags=gcobject
+ * @param sender cast=(Slider^),flags=object
  * @param value cast=(TickPlacement)
  */
 public static final native void Slider_TickPlacement(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(StackPanel^),flags=gcobject
+ * @param sender cast=(StackPanel^),flags=object
  * @param orientation cast=(Orientation)
  */
 public static final native void StackPanel_Orientation(int sender, int orientation);
-/** @method accessor=StackPanel::OrientationProperty,flags=const gcobject */
+/** @method accessor=StackPanel::OrientationProperty,flags=const object */
 public static final native int StackPanel_OrientationProperty();
-/** @method accessor=StackPanel::typeid,flags=const gcobject */
+/** @method accessor=StackPanel::typeid,flags=const object */
 public static final native int StackPanel_typeid();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(StreamGeometry^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(StreamGeometry^),flags=object
  */
 public static final native int StreamGeometry_Open(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(StreamGeometryContext^),flags=gcobject
- * @param startPoint cast=(Point),flags=gcobject
+ * @param sender cast=(StreamGeometryContext^),flags=object
+ * @param startPoint cast=(Point),flags=object
  */
 public static final native void StreamGeometryContext_BeginFigure(int sender, int startPoint, boolean isFilled, boolean isClosed);
 /**
  * @method flags=cpp
- * @param sender cast=(StreamGeometryContext^),flags=gcobject
+ * @param sender cast=(StreamGeometryContext^),flags=object
  */
 public static final native void StreamGeometryContext_Close(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(StreamGeometryContext^),flags=gcobject
- * @param startPoint cast=(Point),flags=gcobject
+ * @param sender cast=(StreamGeometryContext^),flags=object
+ * @param startPoint cast=(Point),flags=object
  */
 public static final native void StreamGeometryContext_LineTo(int sender, int startPoint, boolean isStroked, boolean isSmoothJoin);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(String^),flags=object
  */
 public static final native int String_ToCharArray(int sender);
-/** @method accessor=String::typeid,flags=const gcobject */
+/** @method accessor=String::typeid,flags=const object */
 public static final native int String_typeid();
 /**
  * @method flags=getter
- * @param sender cast=(String^),flags=gcobject
+ * @param sender cast=(String^),flags=object
  */
 public static final native int String_Length(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Style^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Style^),flags=object
  */
 public static final native int Style_Setters(int sender);
 /**
- * @method flags=getter no_gen gcobject
- * @param sender cast=(SWTCanvas^),flags=gcobject
+ * @method flags=getter no_gen object
+ * @param sender cast=(SWTCanvas^),flags=object
  */
 public static final native int SWTCanvas_Visual(int sender);
 /**
  * @method flags=no_gen setter
- * @param sender cast=(SWTCanvas^),flags=gcobject
- * @param visual cast=(DrawingVisual^),flags=gcobject
+ * @param sender cast=(SWTCanvas^),flags=object
+ * @param visual cast=(DrawingVisual^),flags=object
  */
 public static final native void SWTCanvas_Visual(int sender, int visual);
 /** @method flags=no_gen */
@@ -4149,59 +4164,59 @@ public static final native int SWTDockPanel_JNIRefProperty();
 public static final native int SWTDockPanel_typeid();
 /**
  * @method flags=no_gen setter
- * @param sender cast=(SWTTextRunProperties^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(SWTTextRunProperties^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void SWTTextRunProperties_ForegroundBrush(int sender, int brush);
-/** @method accessor=SystemColors::ControlBrush,flags=const gcobject */
+/** @method accessor=SystemColors::ControlBrush,flags=const object */
 public static final native int SystemColors_ControlBrush();
-/** @method accessor=SystemColors::ControlColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlColor,flags=const struct object */
 public static final native int SystemColors_ControlColor();
-/** @method accessor=SystemColors::ControlTextBrush,flags=const gcobject */
+/** @method accessor=SystemColors::ControlTextBrush,flags=const object */
 public static final native int SystemColors_ControlTextBrush();
-/** @method accessor=SystemColors::ControlTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlTextColor,flags=const struct object */
 public static final native int SystemColors_ControlTextColor();
-/** @method accessor=SystemColors::ControlDarkColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlDarkColor,flags=const struct object */
 public static final native int SystemColors_ControlDarkColor();
-/** @method accessor=SystemColors::ControlLightColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlLightColor,flags=const struct object */
 public static final native int SystemColors_ControlLightColor();
-/** @method accessor=SystemColors::ControlLightLightColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlLightLightColor,flags=const struct object */
 public static final native int SystemColors_ControlLightLightColor();
-/** @method accessor=SystemColors::ControlDarkDarkColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ControlDarkDarkColor,flags=const struct object */
 public static final native int SystemColors_ControlDarkDarkColor();
-/** @method accessor=SystemColors::InfoColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::InfoColor,flags=const struct object */
 public static final native int SystemColors_InfoColor();
-/** @method accessor=SystemColors::InfoTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::InfoTextColor,flags=const struct object */
 public static final native int SystemColors_InfoTextColor();
-/** @method accessor=SystemColors::ActiveBorderColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ActiveBorderColor,flags=const struct object */
 public static final native int SystemColors_ActiveBorderColor();
-/** @method accessor=SystemColors::ActiveBorderBrush,flags=const gcobject */
+/** @method accessor=SystemColors::ActiveBorderBrush,flags=const object */
 public static final native int SystemColors_ActiveBorderBrush();
-/** @method accessor=SystemColors::ActiveCaptionColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ActiveCaptionColor,flags=const struct object */
 public static final native int SystemColors_ActiveCaptionColor();
-/** @method accessor=SystemColors::ActiveCaptionTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::ActiveCaptionTextColor,flags=const struct object */
 public static final native int SystemColors_ActiveCaptionTextColor();
-/** @method accessor=SystemColors::GradientActiveCaptionColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::GradientActiveCaptionColor,flags=const struct object */
 public static final native int SystemColors_GradientActiveCaptionColor();
-/** @method accessor=SystemColors::InactiveCaptionColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::InactiveCaptionColor,flags=const struct object */
 public static final native int SystemColors_InactiveCaptionColor();
-/** @method accessor=SystemColors::InactiveCaptionTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::InactiveCaptionTextColor,flags=const struct object */
 public static final native int SystemColors_InactiveCaptionTextColor();
-/** @method accessor=SystemColors::GradientInactiveCaptionColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::GradientInactiveCaptionColor,flags=const struct object */
 public static final native int SystemColors_GradientInactiveCaptionColor();
-/** @method accessor=SystemColors::WindowColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::WindowColor,flags=const struct object */
 public static final native int SystemColors_WindowColor();
-/** @method accessor=SystemColors::WindowTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::WindowTextColor,flags=const struct object */
 public static final native int SystemColors_WindowTextColor();
-/** @method accessor=SystemColors::HighlightBrush,flags=const gcobject */
+/** @method accessor=SystemColors::HighlightBrush,flags=const object */
 public static final native int SystemColors_HighlightBrush();
-/** @method accessor=SystemColors::HighlightColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::HighlightColor,flags=const struct object */
 public static final native int SystemColors_HighlightColor();
-/** @method accessor=SystemColors::HighlightTextColor,flags=const struct gcobject */
+/** @method accessor=SystemColors::HighlightTextColor,flags=const struct object */
 public static final native int SystemColors_HighlightTextColor();
-/** @method accessor=SystemFonts::MessageFontFamily,flags=const gcobject */
+/** @method accessor=SystemFonts::MessageFontFamily,flags=const object */
 public static final native int SystemFonts_MessageFontFamily();
-/** @method accessor=SystemFonts::MessageFontStyle,flags=const gcobject */
+/** @method accessor=SystemFonts::MessageFontStyle,flags=const object */
 public static final native int SystemFonts_MessageFontStyle();
 /** @method accessor=SystemParameters::MinimumHorizontalDragDistance,flags=const */
 public static final native double SystemParameters_MinimumHorizontalDragDistance();
@@ -4231,7 +4246,7 @@ public static final native double SystemParameters_HorizontalScrollBarHeight();
 public static final native double SystemParameters_HorizontalScrollBarButtonWidth();
 /** @method accessor=SystemParameters::WheelScrollLines,flags=const */
 public static final native int SystemParameters_WheelScrollLines();
-/** @method accessor=SystemParameters::WorkArea,flags=const gcobject */
+/** @method accessor=SystemParameters::WorkArea,flags=const object */
 public static final native int SystemParameters_WorkArea();
 /** @method accessor=SystemParameters::ThinHorizontalBorderHeight,flags=const */
 public static final native double SystemParameters_ThinHorizontalBorderHeight();
@@ -4239,1479 +4254,1479 @@ public static final native double SystemParameters_ThinHorizontalBorderHeight();
 public static final native double SystemParameters_ThinVerticalBorderWidth();
 /** @method accessor=SystemFonts::MessageFontSize,flags=const */
 public static final native double SystemFonts_MessageFontSize();
-/** @method accessor=SystemFonts::MessageFontWeight,flags=const gcobject */
+/** @method accessor=SystemFonts::MessageFontWeight,flags=const object */
 public static final native int SystemFonts_MessageFontWeight();
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void TextBlock_Background(int sender, int brush);
-/** @method accessor=TextBlock::BackgroundProperty,flags=const gcobject */
+/** @method accessor=TextBlock::BackgroundProperty,flags=const object */
 public static final native int TextBlock_BackgroundProperty();
-/** @method accessor=TextBlock::FontFamilyProperty,flags=const gcobject */
+/** @method accessor=TextBlock::FontFamilyProperty,flags=const object */
 public static final native int TextBlock_FontFamilyProperty();
-/** @method accessor=TextBlock::FontStyleProperty,flags=const gcobject */
+/** @method accessor=TextBlock::FontStyleProperty,flags=const object */
 public static final native int TextBlock_FontStyleProperty();
-/** @method accessor=TextBlock::FontWeightProperty,flags=const gcobject */
+/** @method accessor=TextBlock::FontWeightProperty,flags=const object */
 public static final native int TextBlock_FontWeightProperty();
-/** @method accessor=TextBlock::FontStretchProperty,flags=const gcobject */
+/** @method accessor=TextBlock::FontStretchProperty,flags=const object */
 public static final native int TextBlock_FontStretchProperty();
-/** @method accessor=TextBlock::FontSizeProperty,flags=const gcobject */
+/** @method accessor=TextBlock::FontSizeProperty,flags=const object */
 public static final native int TextBlock_FontSizeProperty();
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param value cast=(FontFamily^),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param value cast=(FontFamily^),flags=object
  */
 public static final native void TextBlock_FontFamily(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param value cast=(FontStyle),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param value cast=(FontStyle),flags=object
  */
 public static final native void TextBlock_FontStyle(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param value cast=(FontWeight),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param value cast=(FontWeight),flags=object
  */
 public static final native void TextBlock_FontWeight(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param value cast=(FontStretch),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param value cast=(FontStretch),flags=object
  */
 public static final native void TextBlock_FontStretch(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
  */
 public static final native void TextBlock_FontSize(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native void TextBlock_Foreground(int sender, int brush);
-/** @method accessor=TextBlock::ForegroundProperty,flags=const gcobject */
+/** @method accessor=TextBlock::ForegroundProperty,flags=const object */
 public static final native int TextBlock_ForegroundProperty();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextBounds^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextBounds^),flags=object
  */
 public static final native int TextBounds_Rectangle(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IEnumerable^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IEnumerable^),flags=object
  */
 public static final native int TextBoundsCollection_GetEnumerator(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native int TextBoundsCollection_Current(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Collections::Generic::IList<TextTabProperties^>^),flags=gcobject
- * @param tab cast=(TextTabProperties^),flags=gcobject
+ * @param sender cast=(System::Collections::Generic::IList<TextTabProperties^>^),flags=object
+ * @param tab cast=(TextTabProperties^),flags=object
  */
 public static final native void TextTabPropertiesCollection_Add(int sender, int tab);
 /**
  * @method flags=setter
- * @param sender cast=(TabControl^),flags=gcobject
+ * @param sender cast=(TabControl^),flags=object
  * @param value cast=(Dock)
  */
 public static final native void TabControl_TabStripPlacement(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(TabItem^),flags=gcobject
+ * @param sender cast=(TabItem^),flags=object
  */
 public static final native boolean TabItem_IsSelected(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextBlock^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextBlock^),flags=object
  */
 public static final native int TextBlock_Inlines(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextBlock^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextBlock^),flags=object
  */
 public static final native int TextBlock_Text(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBlock^),flags=gcobject
- * @param str cast=(String^),flags=gcobject
+ * @param sender cast=(TextBlock^),flags=object
+ * @param str cast=(String^),flags=object
  */
 public static final native void TextBlock_Text(int sender, int str);
-/** @method accessor=TextBlock::TextProperty,flags=const gcobject */
+/** @method accessor=TextBlock::TextProperty,flags=const object */
 public static final native int TextBlock_TextProperty();
-/** @method accessor=TextBlock::typeid,flags=const gcobject */
+/** @method accessor=TextBlock::typeid,flags=const object */
 public static final native int TextBlock_typeid();
 /**
  * @method flags=getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_CaretIndex(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_CaretIndex(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_GetFirstVisibleLineIndex(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_GetLineIndexFromCharacterIndex(int sender, int value);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextBox^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_GetRectFromCharacterIndex(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_LineCount(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_MaxLength(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_MaxLength(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_ScrollToLine(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_Select(int sender, int start, int length);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_SelectedText(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void TextBox_SelectedText(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_SelectionLength(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_SelectionLength(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_SelectionStart(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native void TextBox_SelectionStart(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextBox^),flags=object
  */
 public static final native int TextBox_Text(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void TextBox_Text(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBox^),flags=gcobject
+ * @param sender cast=(TextBox^),flags=object
  * @param value cast=(TextWrapping)
  */
 public static final native void TextBox_TextWrapping(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_AcceptsReturn(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_AcceptsTab(int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
- * @param value cast=(String^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
+ * @param value cast=(String^),flags=object
  */
 public static final native void TextBoxBase_AppendText(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_Copy(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  * @param value cast=(ScrollBarVisibility)
  */
 public static final native void TextBoxBase_HorizontalScrollBarVisibility(int sender, int value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_Cut(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native boolean TextBoxBase_IsReadOnly(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_IsReadOnly(int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_Paste(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_ScrollToEnd(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_ScrollToVerticalOffset(int sender, double value);
 /**
  * @method flags=cpp
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native void TextBoxBase_SelectAll(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(TextBoxBase^),flags=gcobject
- * @param handler cast=(TextChangedEventHandler^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
+ * @param handler cast=(TextChangedEventHandler^),flags=object
  */
 public static final native void TextBoxBase_TextChanged(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  */
 public static final native double TextBoxBase_VerticalOffset(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextBoxBase^),flags=gcobject
+ * @param sender cast=(TextBoxBase^),flags=object
  * @param value cast=(ScrollBarVisibility)
  */
 public static final native void TextBoxBase_VerticalScrollBarVisibility(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextCompositionEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextCompositionEventArgs^),flags=object
  */
 public static final native int TextCompositionEventArgs_ControlText(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TextCompositionEventArgs^),flags=gcobject
+ * @param sender cast=(TextCompositionEventArgs^),flags=object
  */
 public static final native void TextCompositionEventArgs_Handled(int sender, boolean value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextCompositionEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextCompositionEventArgs^),flags=object
  */
 public static final native int TextCompositionEventArgs_SystemText(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TextCompositionEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TextCompositionEventArgs^),flags=object
  */
 public static final native int TextCompositionEventArgs_Text(int sender);
-/** @method accessor=TextDecorations::Underline,flags=const gcobject */
+/** @method accessor=TextDecorations::Underline,flags=const object */
 public static final native int TextDecorations_Underline();
-/** @method accessor=TextDecorations::Strikethrough,flags=const gcobject */
+/** @method accessor=TextDecorations::Strikethrough,flags=const object */
 public static final native int TextDecorations_Strikethrough();
 /**
  * @method flags=cpp
- * @param sender cast=(TextDecorationCollection^),flags=gcobject
- * @param decoration cast=(TextDecoration^),flags=gcobject
+ * @param sender cast=(TextDecorationCollection^),flags=object
+ * @param decoration cast=(TextDecoration^),flags=object
  */
 public static final native void TextDecorationCollection_Add(int sender, int decoration); 
-/** @method accessor=TextFormatter::Create,flags=gcobject */
+/** @method accessor=TextFormatter::Create,flags=object */
 public static final native int TextFormatter_Create();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextFormatter^),flags=gcobject
- * @param textSource cast=(TextSource^),flags=gcobject
- * @param paragraphProperties cast=(TextParagraphProperties^),flags=gcobject
- * @param previousLineBreak cast=(TextLineBreak^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextFormatter^),flags=object
+ * @param textSource cast=(TextSource^),flags=object
+ * @param paragraphProperties cast=(TextParagraphProperties^),flags=object
+ * @param previousLineBreak cast=(TextLineBreak^),flags=object
  */
 public static final native int TextFormatter_FormatLine(int sender, int textSource, int firstCharIndex, double paragraphWidth, int paragraphProperties, int previousLineBreak);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native double TextLine_Baseline(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native double TextLine_Height(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_NewlineLength(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
- * @param characterHit cast=(CharacterHit),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
+ * @param characterHit cast=(CharacterHit),flags=object
  */
 public static final native int TextLine_GetNextCaretCharacterHit(int sender, int characterHit);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
- * @param characterHit cast=(CharacterHit),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
+ * @param characterHit cast=(CharacterHit),flags=object
  */
 public static final native int TextLine_GetPreviousCaretCharacterHit(int sender, int characterHit);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_GetTextLineBreak(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_GetTextBounds(int sender, int firstTextSourceCharacterIndex, int textLength);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_GetCharacterHitFromDistance(int sender, double distance);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TextLine^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_GetIndexedGlyphRuns(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TextLine^),flags=gcobject
- * @param characterHit cast=(CharacterHit),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
+ * @param characterHit cast=(CharacterHit),flags=object
  */
 public static final native double TextLine_GetDistanceFromCharacterHit(int sender, int characterHit);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native int TextLine_Length(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native double TextLine_Start(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native double TextLine_Width(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TextLine^),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
  */
 public static final native double TextLine_WidthIncludingTrailingWhitespace(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TextLine^),flags=gcobject
- * @param drawContext cast=(DrawingContext^),flags=gcobject
- * @param origin cast=(Point),flags=gcobject
+ * @param sender cast=(TextLine^),flags=object
+ * @param drawContext cast=(DrawingContext^),flags=object
+ * @param origin cast=(Point),flags=object
  * @param invertAxes cast=(InvertAxes)
  */
 public static final native void TextLine_Draw(int sender, int drawContext, int origin, int invertAxes);
 /**
  * @method flags=getter
- * @param sender cast=(Thickness^),flags=gcobject
+ * @param sender cast=(Thickness^),flags=object
  */
 public static final native double Thickness_Left(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Thickness^),flags=gcobject
+ * @param sender cast=(Thickness^),flags=object
  */
 public static final native double Thickness_Right(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Thickness^),flags=gcobject
+ * @param sender cast=(Thickness^),flags=object
  */
 public static final native double Thickness_Top(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Thickness^),flags=gcobject
+ * @param sender cast=(Thickness^),flags=object
  */
 public static final native double Thickness_Bottom(int sender);
-/** @method accessor=Thumb::DragDeltaEvent,flags=const gcobject */
+/** @method accessor=Thumb::DragDeltaEvent,flags=const object */
 public static final native int Thumb_DragDeltaEvent();
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
  * @param mode cast=(TileMode)
  */
 public static final native void TileBrush_TileMode(int sender, int mode);
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
  * @param stretch cast=(Stretch)
  */
 public static final native void TileBrush_Stretch(int sender, int stretch);
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
- * @param viewport cast=(Rect),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
+ * @param viewport cast=(Rect),flags=object
  */
 public static final native void TileBrush_Viewport(int sender, int viewport);
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
  * @param mode cast=(BrushMappingMode)
  */
 public static final native void TileBrush_ViewportUnits(int sender, int mode);
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
  * @param value cast=(AlignmentX)
  */
 public static final native void TileBrush_AlignmentX(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(TileBrush^),flags=gcobject
+ * @param sender cast=(TileBrush^),flags=object
  * @param value cast=(AlignmentY)
  */
 public static final native void TileBrush_AlignmentY(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native void Timeline_AutoReverse(int sender, boolean autoReverse);
 /**
  * @method flags=setter
- * @param sender cast=(Timeline^),flags=gcobject
- * @param duration cast=(Duration),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
+ * @param duration cast=(Duration),flags=object
  */
 public static final native void Timeline_Duration(int sender, int duration);
 /**
  * @method flags=setter
- * @param sender cast=(Timeline^),flags=gcobject
- * @param behavior cast=(RepeatBehavior),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
+ * @param behavior cast=(RepeatBehavior),flags=object
  */
 public static final native void Timeline_RepeatBehavior(int sender, int behavior);
-/** @method accessor=TimeSpan::FromMilliseconds(arg0),flags=const gcobject */
+/** @method accessor=TimeSpan::FromMilliseconds(arg0),flags=const object */
 public static final native int TimeSpan_FromMilliseconds(double ms);
 /**
  * @method flags=adder
- * @param sender cast=(ToggleButton^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(ToggleButton^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void ToggleButton_Checked(int sender, int handler);
-/** @method accessor=ToggleButton::CheckedEvent,flags=const gcobject */
+/** @method accessor=ToggleButton::CheckedEvent,flags=const object */
 public static final native int ToggleButton_CheckedEvent();
-/** @method accessor=ToggleButton::IndeterminateEvent,flags=const gcobject */
+/** @method accessor=ToggleButton::IndeterminateEvent,flags=const object */
 public static final native int ToggleButton_IndeterminateEvent ();
 /**
  * @method flags=getter
- * @param sender cast=(ToggleButton ^),flags=gcobject
+ * @param sender cast=(ToggleButton ^),flags=object
  */
 public static final native boolean ToggleButton_IsChecked(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ToggleButton ^),flags=gcobject
+ * @param sender cast=(ToggleButton ^),flags=object
  */
 public static final native void ToggleButton_IsChecked(int sender, boolean value);
 /**
  * @method flags=no_gen setter
- * @param sender cast=(ToggleButton^),flags=gcobject
+ * @param sender cast=(ToggleButton^),flags=object
  */
 public static final native void ToggleButton_IsCheckedNullSetter(int sender);
-/** @method accessor=ToggleButton::IsCheckedProperty,flags=const gcobject */
+/** @method accessor=ToggleButton::IsCheckedProperty,flags=const object */
 public static final native int ToggleButton_IsCheckedProperty();
-/** @method accessor=ToggleButton::IsThreeStateProperty,flags=const gcobject */
+/** @method accessor=ToggleButton::IsThreeStateProperty,flags=const object */
 public static final native int ToggleButton_IsThreeStateProperty();
 /**
  * @method flags=adder
- * @param sender cast=(ToggleButton^),flags=gcobject
- * @param handler cast=(RoutedEventHandler^),flags=gcobject
+ * @param sender cast=(ToggleButton^),flags=object
+ * @param handler cast=(RoutedEventHandler^),flags=object
  */
 public static final native void ToggleButton_Unchecked(int sender, int handler);
-/** @method accessor=ToggleButton::UncheckedEvent,flags=const gcobject */
+/** @method accessor=ToggleButton::UncheckedEvent,flags=const object */
 public static final native int ToggleButton_UncheckedEvent();
 /**
  * @method flags=getter
- * @param sender cast=(ToolBar^),flags=gcobject
+ * @param sender cast=(ToolBar^),flags=object
  */
 public static final native int ToolBar_Band(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ToolBar^),flags=gcobject
+ * @param sender cast=(ToolBar^),flags=object
  */
 public static final native void ToolBar_Band(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(ToolBar^),flags=gcobject
+ * @param sender cast=(ToolBar^),flags=object
  */
 public static final native int ToolBar_BandIndex(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ToolBar^),flags=gcobject
+ * @param sender cast=(ToolBar^),flags=object
  */
 public static final native void ToolBar_BandIndex(int sender, int value);
-/** @method accessor=ToolBar::BandProperty,flags=const gcobject */
+/** @method accessor=ToolBar::BandProperty,flags=const object */
 public static final native int ToolBar_BandProperty();
-/** @method accessor=ToolBar::ButtonStyleKey,flags=const gcobject */
+/** @method accessor=ToolBar::ButtonStyleKey,flags=const object */
 public static final native int ToolBar_ButtonStyleKey();
-/** @method accessor=ToolBar::CheckBoxStyleKey,flags=const gcobject */
+/** @method accessor=ToolBar::CheckBoxStyleKey,flags=const object */
 public static final native int ToolBar_CheckBoxStyleKey();
-/** @method accessor=ToolBar::RadioButtonStyleKey,flags=const gcobject */
+/** @method accessor=ToolBar::RadioButtonStyleKey,flags=const object */
 public static final native int ToolBar_RadioButtonStyleKey();
-/** @method accessor=ToolBar::SeparatorStyleKey,flags=const gcobject */
+/** @method accessor=ToolBar::SeparatorStyleKey,flags=const object */
 public static final native int ToolBar_SeparatorStyleKey();
 /**
  * @method flags=getter
- * @param sender cast=(ToolBar^),flags=gcobject
+ * @param sender cast=(ToolBar^),flags=object
  */
 public static final native boolean ToolBar_HasOverflowItems(int sender);
 /**
  * @method accessor=ToolBar::SetOverflowMode
- * @param element cast=(DependencyObject^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
  * @param mode cast=(OverflowMode)
  */
 public static final native void ToolBar_SetOverflowMode(int element, int mode);
-/** @method accessor=ToolBar::typeid,flags=const gcobject */
+/** @method accessor=ToolBar::typeid,flags=const object */
 public static final native int ToolBar_typeid();
 /**
  * @method flags=setter
- * @param sender cast=(ToolBarTray^),flags=gcobject
- * @param value cast=(Brush^),flags=gcobject
+ * @param sender cast=(ToolBarTray^),flags=object
+ * @param value cast=(Brush^),flags=object
  */
 public static final native void ToolBarTray_Background(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(ToolBarTray^),flags=gcobject
+ * @param sender cast=(ToolBarTray^),flags=object
  */
 public static final native boolean ToolBarTray_IsLocked(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(ToolBarTray^),flags=gcobject
+ * @param sender cast=(ToolBarTray^),flags=object
  */
 public static final native void ToolBarTray_IsLocked(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(ToolBarTray^),flags=gcobject
+ * @param sender cast=(ToolBarTray^),flags=object
  * @param value cast=(Orientation)
  */
 public static final native void ToolBarTray_Orientation(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(ToolBarTray^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(ToolBarTray^),flags=object
  */
 public static final native int ToolBarTray_ToolBars(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(TransformCollection^),flags=gcobject
- * @param transform cast=(Transform^),flags=gcobject
+ * @param sender cast=(TransformCollection^),flags=object
+ * @param transform cast=(Transform^),flags=object
  */
 public static final native void TransformCollection_Add(int sender, int transform);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Transform^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Transform^),flags=object
  */
 public static final native int Transform_Clone(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TransformGroup^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TransformGroup^),flags=object
  */
 public static final native int TransformGroup_Children(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TreeView^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TreeView^),flags=object
  */
 public static final native int TreeView_SelectedItem(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(TreeView^),flags=gcobject
- * @param handler cast=(RoutedPropertyChangedEventHandler<Object^>^),flags=gcobject
+ * @param sender cast=(TreeView^),flags=object
+ * @param handler cast=(RoutedPropertyChangedEventHandler<Object^>^),flags=object
  */
 public static final native void TreeView_SelectedItemChanged(int sender, int handler);
-/** @method accessor=TreeView::typeid,flags=const gcobject */
+/** @method accessor=TreeView::typeid,flags=const object */
 public static final native int TreeView_typeid();
-/** @method accessor=TreeViewItem::CollapsedEvent,flags=const gcobject */
+/** @method accessor=TreeViewItem::CollapsedEvent,flags=const object */
 public static final native int TreeViewItem_CollapsedEvent();
-/** @method accessor=TreeViewItem::ExpandedEvent,flags=const gcobject */
+/** @method accessor=TreeViewItem::ExpandedEvent,flags=const object */
 public static final native int TreeViewItem_ExpandedEvent();
 /**
  * @method flags=getter
- * @param sender cast=(TreeViewItem^),flags=gcobject
+ * @param sender cast=(TreeViewItem^),flags=object
  */
 public static final native boolean TreeViewItem_IsExpanded(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TreeViewItem^),flags=gcobject
+ * @param sender cast=(TreeViewItem^),flags=object
  */
 public static final native void TreeViewItem_IsExpanded(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(TreeViewItem^),flags=gcobject
+ * @param sender cast=(TreeViewItem^),flags=object
  */
 public static final native boolean TreeViewItem_IsSelected(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TreeViewItem^),flags=gcobject
+ * @param sender cast=(TreeViewItem^),flags=object
  */
 public static final native void TreeViewItem_IsSelected(int sender, boolean value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TreeViewItem^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TreeViewItem^),flags=object
  */
 public static final native int TreeViewItem_HeaderTemplate(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(TreeViewItem^),flags=gcobject
- * @param value cast=(DataTemplate^),flags=gcobject
+ * @param sender cast=(TreeViewItem^),flags=object
+ * @param value cast=(DataTemplate^),flags=object
  */
 public static final native void TreeViewItem_HeaderTemplate(int sender, int value);
-/** @method accessor=TreeViewItem::HeaderTemplateProperty,flags=const gcobject */
+/** @method accessor=TreeViewItem::HeaderTemplateProperty,flags=const object */
 public static final native int TreeViewItem_HeaderTemplateProperty();
-/** @method accessor=TreeViewItem::typeid,flags=const gcobject */
+/** @method accessor=TreeViewItem::typeid,flags=const object */
 public static final native int TreeViewItem_typeid();
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Type^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Type^),flags=object
+ * @param name cast=(String^),flags=object
  * @param bindingFlags cast=(BindingFlags)
  */
 public static final native int Type_GetProperty(int sender, int name, int bindingFlags);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TypeConverter^),flags=gcobject
- * @param string cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TypeConverter^),flags=object
+ * @param string cast=(String^),flags=object
  */
 public static final native int TypeConverter_ConvertFromString(int sender, int string);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(TypeConverter^),flags=gcobject
- * @param object cast=(Object^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(TypeConverter^),flags=object
+ * @param object cast=(Object^),flags=object
  */
 public static final native int TypeConverter_ConvertToString(int sender, int object);
 /**
- * @method accessor=TypeDescriptor::GetConverter,flags=gcobject
- * @param object cast=(Object^),flags=gcobject
+ * @method accessor=TypeDescriptor::GetConverter,flags=object
+ * @param object cast=(Object^),flags=object
  */
 public static final native int TypeDescriptor_GetConverter(int object);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(Typeface^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(Typeface^),flags=object
  */
 public static final native int Typeface_FontFamily(int sender);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(Typeface^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(Typeface^),flags=object
  */
 public static final native int Typeface_Style(int sender);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(Typeface^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(Typeface^),flags=object
  */
 public static final native int Typeface_Weight(int sender);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(Typeface^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(Typeface^),flags=object
  */
 public static final native int Typeface_Stretch(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Collections::Generic::ICollection<Typeface^>^),flags=gcobject
+ * @param sender cast=(System::Collections::Generic::ICollection<Typeface^>^),flags=object
  */
 public static final native int TypefaceCollection_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Collections::Generic::IEnumerator<Typeface^>^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Collections::Generic::IEnumerator<Typeface^>^),flags=object
  */
 public static final native int TypefaceCollection_Current(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(System::Collections::Generic::IEnumerable<Typeface^>^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(System::Collections::Generic::IEnumerable<Typeface^>^),flags=object
  */
 public static final native int TypefaceCollection_GetEnumerator(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Type^),flags=gcobject
- * @param object cast=(Object^),flags=gcobject
+ * @param sender cast=(Type^),flags=object
+ * @param object cast=(Object^),flags=object
  */
 public static final native boolean Type_IsInstanceOfType(int sender, int object);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(Type^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(Type^),flags=object
  */
 public static final native int Type_FullName(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(UIElementCollection^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(UIElementCollection^),flags=object
  */
 public static final native int UIElementCollection_default(int sender, int index);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native void UIElementCollection_Add(int sender, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native void UIElementCollection_Insert(int sender, int index, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native int UIElementCollection_IndexOf(int sender, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native boolean UIElementCollection_Contains(int sender, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
  */
 public static final native void UIElementCollection_Clear(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElementCollection^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
  */
 public static final native int UIElementCollection_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native int UIElementCollection_Current(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IEnumerable^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IEnumerable^),flags=object
  */
 public static final native int UIElementCollection_GetEnumerator(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElementCollection^),flags=gcobject
- * @param child cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElementCollection^),flags=object
+ * @param child cast=(UIElement^),flags=object
  */
 public static final native void UIElementCollection_Remove(int sender, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
- * @param event cast=(RoutedEvent^),flags=gcobject
- * @param handler cast=(Delegate^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param event cast=(RoutedEvent^),flags=object
+ * @param handler cast=(Delegate^),flags=object
  */
 public static final native void UIElement_AddHandler(int sender, int event, int handler, boolean handledEventsToo);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_AllowDrop(int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_CaptureMouse(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
- * @param geometry cast=(Geometry^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param geometry cast=(Geometry^),flags=object
  */
 public static final native void UIElement_Clip(int sender, int geometry);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_ClipToBounds(int sender, boolean value);
-/** @method accessor=UIElement::ClipToBoundsProperty,flags=const gcobject */
+/** @method accessor=UIElement::ClipToBoundsProperty,flags=const object */
 public static final native int UIElement_ClipToBoundsProperty();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(DragEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(DragEventHandler^),flags=object
  */
 public static final native void UIElement_DragEnter(int sender, int handler);
-/** @method accessor=UIElement::DragEnterEvent,flags=const gcobject */
+/** @method accessor=UIElement::DragEnterEvent,flags=const object */
 public static final native int UIElement_DragEnterEvent();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(DragEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(DragEventHandler^),flags=object
  */
 public static final native void UIElement_DragLeave(int sender, int handler);
-/** @method accessor=UIElement::DragLeaveEvent,flags=const gcobject */
+/** @method accessor=UIElement::DragLeaveEvent,flags=const object */
 public static final native int UIElement_DragLeaveEvent();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(DragEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(DragEventHandler^),flags=object
  */
 public static final native void UIElement_DragOver(int sender, int handler);
-/** @method accessor=UIElement::DragOverEvent,flags=const gcobject */
+/** @method accessor=UIElement::DragOverEvent,flags=const object */
 public static final native int UIElement_DragOverEvent();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(DragEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(DragEventHandler^),flags=object
  */
 public static final native void UIElement_Drop(int sender, int handler);
-/** @method accessor=UIElement::DropEvent,flags=const gcobject */
+/** @method accessor=UIElement::DropEvent,flags=const object */
 public static final native int UIElement_DropEvent();
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_Focus(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_Focusable (int sender, boolean value);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
- * @param dp cast=(DependencyProperty^),flags=gcobject
- * @param animation cast=(AnimationTimeline^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param dp cast=(DependencyProperty^),flags=object
+ * @param animation cast=(AnimationTimeline^),flags=object
  */
 public static final native void UIElement_BeginAnimation(int sender, int dp, int animation);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(UIElement^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(UIElement^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native int UIElement_InputHitTest(int sender, int point);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_InvalidateVisual(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsEnabled(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_IsEnabled(int sender, boolean enable);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsFocused(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_IsHitTestVisible(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsKeyboardFocused(int sender); 
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsKeyboardFocusWithin(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsMeasureValid(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsMouseOver(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native boolean UIElement_IsVisible(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyEventHandler^),flags=object
  */
 public static final native void UIElement_KeyUp(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyEventHandler^),flags=object
  */
 public static final native void UIElement_KeyDown(int sender, int handler);
 /**
- * @method flags=struct gcobject getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @method flags=struct object getter
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native int UIElement_DesiredSize(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(GiveFeedbackEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(GiveFeedbackEventHandler^),flags=object
  */
 public static final native void UIElement_GiveFeedback(int sender, int handler);
-/** @method accessor=UIElement::GiveFeedbackEvent,flags=const gcobject */
+/** @method accessor=UIElement::GiveFeedbackEvent,flags=const object */
 public static final native int UIElement_GiveFeedbackEvent();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void UIElement_LayoutUpdated(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement ^),flags=gcobject
- * @param availableSize cast=(Size),flags=gcobject
+ * @param sender cast=(UIElement ^),flags=object
+ * @param availableSize cast=(Size),flags=object
  */
 public static final native void UIElement_Measure(int sender, int availableSize);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void UIElement_MouseDown(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseEventHandler^),flags=object
  */
 public static final native void UIElement_MouseEnter(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseEventHandler^),flags=object
  */
 public static final native void UIElement_MouseLeave(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseEventHandler^),flags=object
  */
 public static final native void UIElement_MouseMove(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseWheelEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseWheelEventHandler^),flags=object
  */
 public static final native void UIElement_MouseWheel(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void UIElement_MouseUp(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
- * @param request cast=(TraversalRequest^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param request cast=(TraversalRequest^),flags=object
  */
 public static final native void UIElement_MoveFocus(int sender, int request);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native double UIElement_Opacity(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_Opacity(int sender, double value);
-/** @method accessor=UIElement::OpacityProperty,flags=const gcobject */
+/** @method accessor=UIElement::OpacityProperty,flags=const object */
 public static final native int UIElement_OpacityProperty();
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewKeyDown(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewKeyUp(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement ^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement ^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewMouseDown(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement ^),flags=gcobject
- * @param handler cast=(MouseEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement ^),flags=object
+ * @param handler cast=(MouseEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewMouseMove(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement ^),flags=gcobject
- * @param handler cast=(MouseWheelEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement ^),flags=object
+ * @param handler cast=(MouseWheelEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewMouseWheel(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement ^),flags=gcobject
- * @param handler cast=(MouseButtonEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement ^),flags=object
+ * @param handler cast=(MouseButtonEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewMouseUp(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewGotKeyboardFocus(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewLostKeyboardFocus(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(KeyboardFocusChangedEventHandler^),flags=object
  */
 public static final native void UIElement_LostKeyboardFocus(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(TextCompositionEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(TextCompositionEventHandler^),flags=object
  */
 public static final native void UIElement_PreviewTextInput(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(QueryContinueDragEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(QueryContinueDragEventHandler^),flags=object
  */
 public static final native void UIElement_QueryContinueDrag(int sender, int handler);
-/** @method accessor=UIElement::QueryContinueDragEvent,flags=const gcobject */
+/** @method accessor=UIElement::QueryContinueDragEvent,flags=const object */
 public static final native int UIElement_QueryContinueDragEvent();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native int UIElement_RenderSize(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_ReleaseMouseCapture(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
- * @param routedEvent cast=(RoutedEvent^),flags=gcobject
- * @param handler cast=(Delegate^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param routedEvent cast=(RoutedEvent^),flags=object
+ * @param handler cast=(Delegate^),flags=object
  */
 public static final native void UIElement_RemoveHandler(int sender, int routedEvent, int handler);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_SnapsToDevicePixels(int sender, boolean value);
 /**
  * @method flags=adder
- * @param sender cast=(UIElement^),flags=gcobject
- * @param handler cast=(TextCompositionEventHandler^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param handler cast=(TextCompositionEventHandler^),flags=object
  */
 public static final native void UIElement_TextInput(int sender, int handler);
 /**
- * @method flags=struct cpp gcobject
- * @param sender cast=(UIElement^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
- * @param relativeTo cast=(UIElement^),flags=gcobject
+ * @method flags=struct cpp object
+ * @param sender cast=(UIElement^),flags=object
+ * @param point cast=(Point),flags=object
+ * @param relativeTo cast=(UIElement^),flags=object
  */
 public static final native int UIElement_TranslatePoint(int sender, int point, int relativeTo);
 /**
  * @method flags=cpp
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native void UIElement_UpdateLayout(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native byte UIElement_Visibility(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
  * @param visible cast=(Visibility)
  */
 public static final native void UIElement_Visibility(int sender, byte visible);
-/** @method accessor=UIElement::VisibilityProperty,flags=const gcobject */
+/** @method accessor=UIElement::VisibilityProperty,flags=const object */
 public static final native int UIElement_VisibilityProperty();
 /**
  * @method flags=getter
- * @param sender cast=(VirtualizingStackPanel^),flags=gcobject
+ * @param sender cast=(VirtualizingStackPanel^),flags=object
  */
 public static final native double VirtualizingStackPanel_VerticalOffset(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Visual^),flags=gcobject
- * @param descendant cast=(DependencyObject^),flags=gcobject
+ * @param sender cast=(Visual^),flags=object
+ * @param descendant cast=(DependencyObject^),flags=object
  */
 public static final native boolean Visual_IsAncestorOf(int sender, int descendant);
 /**
  * @method flags=cpp
- * @param sender cast=(Visual^),flags=gcobject
- * @param ancestor cast=(DependencyObject^),flags=gcobject
+ * @param sender cast=(Visual^),flags=object
+ * @param ancestor cast=(DependencyObject^),flags=object
  */
 public static final native boolean Visual_IsDescendantOf(int sender, int ancestor);
 /**
- * @method flags=struct cpp gcobject
- * @param sender cast=(Visual^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @method flags=struct cpp object
+ * @param sender cast=(Visual^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native int Visual_PointToScreen(int sender, int point);
 /**
- * @method flags=struct cpp gcobject
- * @param sender cast=(Visual^),flags=gcobject
- * @param point cast=(Point),flags=gcobject
+ * @method flags=struct cpp object
+ * @param sender cast=(Visual^),flags=object
+ * @param point cast=(Point),flags=object
  */
 public static final native int Visual_PointFromScreen(int sender, int point);
 /**
- * @method accessor=VisualTreeHelper::GetChild,flags=gcobject
- * @param sender cast=(DependencyObject^),flags=gcobject
+ * @method accessor=VisualTreeHelper::GetChild,flags=object
+ * @param sender cast=(DependencyObject^),flags=object
  */
 public static final native int VisualTreeHelper_GetChild(int sender, int value);
 /**
  * @method accessor=VisualTreeHelper::GetChildrenCount
- * @param sender cast=(DependencyObject^),flags=gcobject
+ * @param sender cast=(DependencyObject^),flags=object
  */
 public static final native int VisualTreeHelper_GetChildrenCount(int sender);
 /**
- * @method accessor=VisualTreeHelper::GetParent,flags=gcobject
- * @param sender cast=(DependencyObject^),flags=gcobject
+ * @method accessor=VisualTreeHelper::GetParent,flags=object
+ * @param sender cast=(DependencyObject^),flags=object
  */
 public static final native int VisualTreeHelper_GetParent(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native boolean WebBrowser_CanGoBack(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native boolean WebBrowser_CanGoForward(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_Document(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_DocumentText(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param string cast=(String^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param string cast=(String^),flags=object
  */
 public static final native void WebBrowser_DocumentText(int sender, int string);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_DocumentTitle(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::WebBrowserDocumentCompletedEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(System::Windows::Forms::WebBrowserDocumentCompletedEventHandler^),flags=object
  */
 public static final native void WebBrowser_DocumentCompleted(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native boolean WebBrowser_GoBack(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native boolean WebBrowser_GoForward(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::WebBrowserNavigatingEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(System::Windows::Forms::WebBrowserNavigatingEventHandler^),flags=object
  */
 public static final native void WebBrowser_Navigating(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::WebBrowserNavigatedEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(System::Windows::Forms::WebBrowserNavigatedEventHandler^),flags=object
  */
 public static final native void WebBrowser_Navigated(int sender, int handler);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param urlString cast=(String^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param urlString cast=(String^),flags=object
  */
 public static final native void WebBrowser_Navigate(int sender, int urlString);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(System::Windows::Forms::WebBrowserProgressChangedEventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(System::Windows::Forms::WebBrowserProgressChangedEventHandler^),flags=object
  */
 public static final native void WebBrowser_ProgressChanged(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void WebBrowser_DocumentTitleChanged(int sender, int handler);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_StatusText(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void WebBrowser_StatusTextChanged(int sender, int handler);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_ReadyState(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native void WebBrowser_Refresh(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native void WebBrowser_Stop(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native void WebBrowser_ScriptErrorsSuppressed(int sender, boolean value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowser^),flags=object
  */
 public static final native int WebBrowser_Url(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowserNavigatingEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowserNavigatingEventArgs^),flags=object
  */
 public static final native int WebBrowserNavigatingEventArgs_Url(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowserNavigatedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowserNavigatedEventArgs^),flags=object
  */
 public static final native int WebBrowserNavigatedEventArgs_Url(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^),flags=object
  */
 public static final native int WebBrowserDocumentCompletedEventArgs_Url(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::WebBrowserProgressChangedEventArgs^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowserProgressChangedEventArgs^),flags=object
  */
 public static final native long WebBrowserProgressChangedEventArgs_CurrentProgress(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(System::Windows::Forms::WebBrowserProgressChangedEventArgs^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::WebBrowserProgressChangedEventArgs^),flags=object
  */
 public static final native long WebBrowserProgressChangedEventArgs_MaximumProgress(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(WindowCollection^),flags=gcobject
+ * @param sender cast=(WindowCollection^),flags=object
  */
 public static final native int WindowCollection_Count(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(IEnumerator^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(IEnumerator^),flags=object
  */
 public static final native int WindowCollection_Current(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(IEnumerable^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(IEnumerable^),flags=object
  */
 public static final native int WindowCollection_GetEnumerator(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_Activate(int sender);
 /**
  * @method flags=cpp
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_Close(int sender);
 /**
  * @method flags=adder
- * @param sender cast=(Window^),flags=gcobject
- * @param handler cast=(CancelEventHandler^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param handler cast=(CancelEventHandler^),flags=object
  */
 public static final native void Window_Closing(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(Window^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Window_Activated(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(Window^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Window_Deactivated(int sender, int handler);
 /**
  * @method flags=adder
- * @param sender cast=(Window^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Window_LocationChanged(int sender, int handler);
 /**
- * @method accessor=Window::GetWindow,flags=gcobject
- * @param dependencyObject cast=(DependencyObject^),flags=gcobject
+ * @method accessor=Window::GetWindow,flags=object
+ * @param dependencyObject cast=(DependencyObject^),flags=object
  */
 public static final native int Window_GetWindow(int dependencyObject);
 /**
  * @method flags=cpp
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_Hide(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
- * @param owner cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param owner cast=(Window^),flags=object
  */
 public static final native void Window_Owner(int sender, int owner);
 /**
  * @method flags=cpp
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_Show(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native double Window_Left(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Window ^),flags=gcobject
+ * @param sender cast=(Window ^),flags=object
  */
 public static final native double Window_Top(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_Left(int sender, double left);
 /**
  * @method flags=setter
- * @param sender cast=(Window ^),flags=gcobject
+ * @param sender cast=(Window ^),flags=object
  */
 public static final native void Window_Top(int sender, double top);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
- * @param icon cast=(ImageSource^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param icon cast=(ImageSource^),flags=object
  */
 public static final native void Window_Icon(int sender, int icon);
 /**
  * @method flags=getter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native boolean Window_IsActive(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native int Window_WindowState (int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  * @param windowState cast=(WindowState)
  */
 public static final native void Window_WindowState (int sender, int windowState);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_AllowsTransparency(int sender, boolean value);
 /**
  * @method flags=getter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native int Window_WindowStyle(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  * @param value cast=(WindowStyle)
  */
 public static final native void Window_WindowStyle(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  */
 public static final native void Window_ShowInTaskbar(int sender, boolean value);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
  * @param value cast=(ResizeMode)
  */
 public static final native void Window_ResizeMode(int sender, int value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Window^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Window^),flags=object
  */
 public static final native int Window_Title(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Window^),flags=gcobject
- * @param string cast=(String^),flags=gcobject
+ * @param sender cast=(Window^),flags=object
+ * @param string cast=(String^),flags=object
  */
 public static final native void Window_Title(int sender, int string);
 /**
  * @method flags=setter
- * @param sender cast=(System::Windows::Forms::Integration::WindowsFormsHost^),flags=gcobject
- * @param child cast=(System::Windows::Forms::Control^),flags=gcobject
+ * @param sender cast=(System::Windows::Forms::Integration::WindowsFormsHost^),flags=object
+ * @param child cast=(System::Windows::Forms::Control^),flags=object
  */
 public static final native void WindowsFormsHost_Child(int sender, int child);
 /**
  * @method flags=cpp
- * @param sender cast=(WriteableBitmap^),flags=gcobject
- * @param sourceRect cast=(Int32Rect),flags=gcobject
+ * @param sender cast=(WriteableBitmap^),flags=object
+ * @param sourceRect cast=(Int32Rect),flags=object
  * @param buffer cast=(IntPtr)
  */
 public static final native void WriteableBitmap_WritePixels(int sender, int sourceRect, byte[] buffer, int bufferSize, int stride);
@@ -5724,8 +5739,8 @@ public static final native int gcnew_Application();
 public static final native int gcnew_ArrayList(int count);
 /**
  * @method flags=gcnew
- * @param point cast=(Point),flags=gcobject
- * @param size cast=(Size),flags=gcobject
+ * @param point cast=(Point),flags=object
+ * @param size cast=(Size),flags=object
  * @param sweepDirection cast=(SweepDirection)
  */
 public static final native int gcnew_ArcSegment(int point, int size,  double rotationAngle, boolean isLargeArc, int sweepDirection, boolean isStroked);
@@ -5733,19 +5748,19 @@ public static final native int gcnew_ArcSegment(int point, int size,  double rot
 public static final native int gcnew_BitmapImage();
 /**
  * @method flags=gcnew
- * @param point1 cast=(Point),flags=gcobject
- * @param point2 cast=(Point),flags=gcobject
- * @param point3 cast=(Point),flags=gcobject
+ * @param point1 cast=(Point),flags=object
+ * @param point2 cast=(Point),flags=object
+ * @param point3 cast=(Point),flags=object
  */
 public static final native int gcnew_BezierSegment(int point1, int point2, int point3, boolean isScrolled);
 /**
  * @method flags=gcnew
- * @param propertyPath cast=(String^),flags=gcobject
+ * @param propertyPath cast=(String^),flags=object
  */
 public static final native int gcnew_Binding(int propertyPath);
 /**
  * @method flags=gcnew
- * @param colors cast=(System::Collections::Generic::IList<Color>^),flags=gcobject
+ * @param colors cast=(System::Collections::Generic::IList<Color>^),flags=object
  */
 public static final native int gcnew_BitmapPalette(int colors);
 /**
@@ -5772,8 +5787,8 @@ public static final native int gcnew_ComboBoxItem();
 public static final native int gcnew_ControlTemplate();
 /**
  * @method flags=gcnew
- * @param source cast=(BitmapSource^),flags=gcobject
- * @param sourceRect cast=(Int32Rect),flags=gcobject
+ * @param source cast=(BitmapSource^),flags=object
+ * @param sourceRect cast=(Int32Rect),flags=object
  */
 public static final native int gcnew_CroppedBitmap(int source, int sourceRect);
 /** @method flags=gcnew */
@@ -5781,8 +5796,8 @@ public static final native int gcnew_CharacterHit(int firstCharacterIndex, int t
 /**
  * @method flags=gcnew
  * @param geometryCombineMode cast=(GeometryCombineMode)
- * @param geometry1 cast=(Geometry^),flags=gcobject
- * @param geometry2 cast=(Geometry^),flags=gcobject
+ * @param geometry1 cast=(Geometry^),flags=object
+ * @param geometry2 cast=(Geometry^),flags=object
  */
 public static final native int gcnew_CombinedGeometry(int geometryCombineMode, int geometry1, int geometry2); 
 /** @method flags=gcnew */
@@ -5799,7 +5814,7 @@ public static final native int gcnew_DrawingVisual();
 public static final native int gcnew_DoubleAnimationUsingKeyFrames();
 /**
  * @method flags=gcnew
- * @param dashes cast=(DoubleCollection^),flags=gcobject
+ * @param dashes cast=(DoubleCollection^),flags=object
  */
 public static final native int gcnew_DashStyle(int dashes, double offset);
 /** @method flags=gcnew */
@@ -5812,33 +5827,33 @@ public static final native int gcnew_DispatcherFrame();
 public static final native int gcnew_DispatcherTimer();
 /**
  * @method flags=gcnew
- * @param keytime cast=(KeyTime),flags=gcobject
+ * @param keytime cast=(KeyTime),flags=object
  */
 public static final native int gcnew_DiscreteDoubleKeyFrame(double value, int keytime);
 /** @method flags=gcnew */
 public static final native int gcnew_DoubleCollection(int capacity);
 /**
  * @method flags=gcnew
- * @param timespan cast=(TimeSpan),flags=gcobject
+ * @param timespan cast=(TimeSpan),flags=object
  */
 public static final native int gcnew_Duration(int timespan);
 /** @method flags=gcnew */
 public static final native int gcnew_Expander();
 /**
  * @method flags=gcnew
- * @param rect cast=(Rect),flags=gcobject
+ * @param rect cast=(Rect),flags=object
  */
 public static final native int gcnew_EllipseGeometry(int rect);
 /**
  * @method accessor=System::IO::FileInfo,flags=gcnew
- * @param path cast=(String^),flags=gcobject
+ * @param path cast=(String^),flags=object
  */
 public static final native int gcnew_FileInfo(int path);
 /** @method accessor=System::Windows::Forms::FolderBrowserDialog,flags=gcnew */
 public static final native int gcnew_FolderBrowserDialog();
 /**
  * @method accessor=System::Drawing::Font,flags=gcnew
- * @param fontFamily cast=(String^),flags=gcobject
+ * @param fontFamily cast=(String^),flags=object
  * @param fontStyle cast=(System::Drawing::FontStyle)
  */
 public static final native int gcnew_Font(int fontFamily, float size, int fontStyle);
@@ -5846,36 +5861,36 @@ public static final native int gcnew_Font(int fontFamily, float size, int fontSt
 public static final native int gcnew_FontDialog();
 /**
  * @method flags=gcnew
- * @param str cast=(String^),flags=gcobject
+ * @param str cast=(String^),flags=object
  */
 public static final native int gcnew_FontFamily(int str);
 /**
  * @method flags=gcnew
- * @param source cast=(BitmapSource^),flags=gcobject
- * @param destinationFormat cast=(PixelFormat),flags=gcobject
- * @param destinationPalette cast=(BitmapPalette^),flags=gcobject
+ * @param source cast=(BitmapSource^),flags=object
+ * @param destinationFormat cast=(PixelFormat),flags=object
+ * @param destinationPalette cast=(BitmapPalette^),flags=object
  */
 public static final native int gcnew_FormatConvertedBitmap(int source, int destinationFormat, int destinationPalette, double alphaThreshold);
 /**
  * @method flags=gcnew
- * @param string cast=(String^),flags=gcobject
- * @param culture cast=(CultureInfo^),flags=gcobject
+ * @param string cast=(String^),flags=object
+ * @param culture cast=(CultureInfo^),flags=object
  * @param flowDirection cast=(FlowDirection)
- * @param typeface cast=(Typeface^),flags=gcobject
- * @param brush cast=(Brush^),flags=gcobject
+ * @param typeface cast=(Typeface^),flags=object
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native int gcnew_FormattedText(int string, int culture, int flowDirection, int typeface, double emSize, int brush);
 /** @method flags=gcnew */
 public static final native int gcnew_Frame();
 /**
  * @method flags=gcnew
- * @param type cast=(Type^),flags=gcobject
+ * @param type cast=(Type^),flags=object
  */
 public static final native int gcnew_FrameworkElementFactory(int type);
 /**
  * @method flags=gcnew
- * @param type cast=(Type^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
+ * @param type cast=(Type^),flags=object
+ * @param name cast=(String^),flags=object
  */
 public static final native int gcnew_FrameworkElementFactory(int type, int name);
 /** @method flags=gcnew */
@@ -5899,13 +5914,13 @@ public static final native int gcnew_GridViewColumnHeader();
 public static final native int gcnew_GroupBox();
 /**
  * @method flags=gcnew
- * @param inline cast=(Inline^),flags=gcobject
+ * @param inline cast=(Inline^),flags=object
  */
 public static final native int gcnew_Hyperlink(int inline);
 //public static final native int gcnew_Icon(int stream);
 /**
  * @method flags=gcnew
- * @param imageSource cast=(ImageSource^),flags=gcobject
+ * @param imageSource cast=(ImageSource^),flags=object
  */
 public static final native int gcnew_ImageBrush(int imageSource);
 /** @method flags=gcnew */
@@ -5920,21 +5935,21 @@ public static final native int gcnew_IntPtr(int value);
 public static final native int gcnew_Label();
 /**
  * @method flags=gcnew
- * @param startColor cast=(Color),flags=gcobject
- * @param endColor cast=(Color),flags=gcobject
+ * @param startColor cast=(Color),flags=object
+ * @param endColor cast=(Color),flags=object
  */
 public static final native int gcnew_LinearGradientBrush(int startColor, int endColor, double angle);
 /**
  * @method flags=gcnew
- * @param startColor cast=(Color),flags=gcobject
- * @param endColor cast=(Color),flags=gcobject
- * @param startPoint cast=(Point),flags=gcobject
- * @param endPonit cast=(Point),flags=gcobject
+ * @param startColor cast=(Color),flags=object
+ * @param endColor cast=(Color),flags=object
+ * @param startPoint cast=(Point),flags=object
+ * @param endPonit cast=(Point),flags=object
  */
 public static final native int gcnew_LinearGradientBrush(int startColor, int endColor, int startPoint, int endPonit);
 /**
  * @method flags=gcnew
- * @param point cast=(Point),flags=gcobject
+ * @param point cast=(Point),flags=object
  */
 public static final native int gcnew_LineSegment(int point, boolean isStroked);
 /** @method flags=gcnew */
@@ -5949,7 +5964,7 @@ public static final native int gcnew_ListViewItem();
 public static final native int gcnew_Matrix(double m11, double m12, double m21, double m22, double offsetX, double offsetY);
 /**
  * @method flags=gcnew
- * @param matrix cast=(Matrix),flags=gcobject
+ * @param matrix cast=(Matrix),flags=object
  */
 public static final native int gcnew_MatrixTransform(int matrix);
 /** @method accessor=System::IO::MemoryStream,flags=gcnew */
@@ -5974,12 +5989,12 @@ public static final native int gcnew_PathGeometry();
 public static final native int gcnew_Pen();
 /**
  * @method flags=gcnew
- * @param brush cast=(Brush^),flags=gcobject
+ * @param brush cast=(Brush^),flags=object
  */
 public static final native int gcnew_Pen(int brush, double thickness);
 /**
  * @method flags=gcnew
- * @param points cast=(PointCollection^),flags=gcobject
+ * @param points cast=(PointCollection^),flags=object
  */
 public static final native int gcnew_PolyLineSegment(int points, boolean isStroked);
 /** @method flags=gcnew */
@@ -5992,8 +6007,8 @@ public static final native int gcnew_Popup();
 public static final native int gcnew_ProgressBar();
 /**
  * @method flags=gcnew
- * @param point1 cast=(Point),flags=gcobject
- * @param point2 cast=(Point),flags=gcobject
+ * @param point1 cast=(Point),flags=object
+ * @param point2 cast=(Point),flags=object
  */
 public static final native int gcnew_QuadraticBezierSegment(int point1, int point2, boolean isScrolled);
 /** @method flags=gcnew */
@@ -6002,7 +6017,7 @@ public static final native int gcnew_RadioButton();
 public static final native int gcnew_Rect(double x, double y, double width, double height);
 /**
  * @method flags=gcnew
- * @param rect cast=(Rect),flags=gcobject
+ * @param rect cast=(Rect),flags=object
  */
 public static final native int gcnew_RectangleGeometry(int rect);
 /**
@@ -6012,7 +6027,7 @@ public static final native int gcnew_RectangleGeometry(int rect);
 public static final native int gcnew_RelativeSource(int relativeSourceMode);
 /**
  * @method flags=gcnew
- * @param pixelFormat cast=(PixelFormat),flags=gcobject
+ * @param pixelFormat cast=(PixelFormat),flags=object
  */
 public static final native int gcnew_RenderTargetBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, int pixelFormat);
 /** @method flags=gcnew */
@@ -6035,13 +6050,13 @@ public static final native int gcnew_ScrollViewer();
 public static final native int gcnew_Separator();
 /**
  * @method flags=gcnew
- * @param dp cast=(DependencyProperty^),flags=gcobject
- * @param value cast=(Object^),flags=gcobject
+ * @param dp cast=(DependencyProperty^),flags=object
+ * @param value cast=(Object^),flags=object
  */
 public static final native int gcnew_Setter(int dp, int value);
 /**
  * @method accessor=System::Windows::Setter,flags=gcnew
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param dp cast=(DependencyProperty^),flags=object
  * @param value cast=(Visibility)
  */
 public static final native int gcnew_SetterVisibility(int dp, int value);
@@ -6055,7 +6070,7 @@ public static final native int gcnew_Slider();
 public static final native int gcnew_ScaleTransform(double scaleX, double scaleY);
 /**
  * @method flags=gcnew
- * @param color cast=(Color),flags=gcobject
+ * @param color cast=(Color),flags=object
  */
 public static final native int gcnew_SolidColorBrush(int color);
 /** @method flags=gcnew */
@@ -6086,17 +6101,17 @@ public static final native int gcnew_SWTSafeHandle(int handle, boolean isIcon);
 public static final native int gcnew_SWTTextSource(int jniRef);
 /**
  * @method flags=no_gen gcnew
- * @param properties cast=(TextRunProperties^),flags=gcobject
+ * @param properties cast=(TextRunProperties^),flags=object
  */
 public static final native int gcnew_SWTTextEmbeddedObject(int properties, int lenght, double width, double height, double baseline);
 /**
  * @method flags=no_gen gcnew
- * @param typeface cast=(Typeface^),flags=gcobject
- * @param textDecorations cast=(TextDecorationCollection^),flags=gcobject
- * @param foregroundBrush cast=(Brush^),flags=gcobject
- * @param backgroundBrush cast=(Brush^),flags=gcobject
+ * @param typeface cast=(Typeface^),flags=object
+ * @param textDecorations cast=(TextDecorationCollection^),flags=object
+ * @param foregroundBrush cast=(Brush^),flags=object
+ * @param backgroundBrush cast=(Brush^),flags=object
  * @param baselineAlignment cast=(BaselineAlignment)
- * @param culture cast=(CultureInfo^),flags=gcobject
+ * @param culture cast=(CultureInfo^),flags=object
  */
 public static final native int gcnew_SWTTextRunProperties(int typeface, double size, double hittingSize, int textDecorations, int foregroundBrush, int backgroundBrush, int baselineAlignment, int culture);
 /** @method flags=no_gen */
@@ -6105,7 +6120,7 @@ public static final native int gcnew_SWTTextParagraphProperties(int flowDirectio
 public static final native int gcnew_SWTTreeView(int jniRef);
 /**
  * @method flags=no_gen gcnew
- * @param treeView cast=(TreeView^),flags=gcobject
+ * @param treeView cast=(TreeView^),flags=object
  */
 public static final native int gcnew_SWTTreeViewRowPresenter(int treeView);
 /** @method flags=gcnew */
@@ -6114,7 +6129,7 @@ public static final native int gcnew_TabControl();
 public static final native int gcnew_TabItem();
 /**
  * @method flags=gcnew
- * @param dp cast=(DependencyProperty^),flags=gcobject
+ * @param dp cast=(DependencyProperty^),flags=object
  */
 public static final native int gcnew_TemplateBindingExtension(int dp);
 /** @method flags=gcnew */
@@ -6122,7 +6137,7 @@ public static final native int gcnew_TextDecorationCollection(int capacity);
 /**
  * @method flags=gcnew
  * @param location cast=(TextDecorationLocation)
- * @param pen cast=(Pen^),flags=gcobject
+ * @param pen cast=(Pen^),flags=object
  * @param penOffsetUnit cast=(TextDecorationUnit)
  * @param penThicknessUnit cast=(TextDecorationUnit)
  */
@@ -6140,18 +6155,18 @@ public static final native int gcnew_TextBlock();
 public static final native int gcnew_TextBox();
 /**
  * @method flags=gcnew
- * @param string cast=(String^),flags=gcobject
- * @param textRunProperties cast=(TextRunProperties^),flags=gcobject
+ * @param string cast=(String^),flags=object
+ * @param textRunProperties cast=(TextRunProperties^),flags=object
  */
 public static final native int gcnew_TextCharacters(int string, int offsetToFirstChar, int length, int textRunProperties);
 /**
  * @method flags=gcnew
- * @param textRunProperties cast=(TextRunProperties^),flags=gcobject
+ * @param textRunProperties cast=(TextRunProperties^),flags=object
  */
 public static final native int gcnew_TextEndOfLine(int length, int textRunProperties);
 /**
  * @method flags=gcnew
- * @param textRunProperties cast=(TextRunProperties^),flags=gcobject
+ * @param textRunProperties cast=(TextRunProperties^),flags=object
  */
 public static final native int gcnew_TextEndOfParagraph(int length, int textRunProperties);
 /** @method flags=gcnew */
@@ -6181,17 +6196,17 @@ public static final native int gcnew_TreeView();
 public static final native int gcnew_TreeViewItem();
 /**
  * @method flags=gcnew
- * @param fontFamily cast=(FontFamily^),flags=gcobject
- * @param style cast=(FontStyle),flags=gcobject
- * @param weight cast=(FontWeight),flags=gcobject
- * @param stretch cast=(FontStretch),flags=gcobject
+ * @param fontFamily cast=(FontFamily^),flags=object
+ * @param style cast=(FontStyle),flags=object
+ * @param weight cast=(FontWeight),flags=object
+ * @param stretch cast=(FontStretch),flags=object
  */
 public static final native int gcnew_Typeface(int fontFamily, int style, int weight, int stretch);
 /** @method flags=gcnew */
 public static final native int gcnew_UserControl();
 /**
  * @method flags=gcnew
- * @param str cast=(String^),flags=gcobject
+ * @param str cast=(String^),flags=object
  * @param type cast=(UriKind)
  */
 public static final native int gcnew_Uri(int str, int type);
@@ -6203,13 +6218,13 @@ public static final native int gcnew_WindowsFormsHost();
 public static final native int gcnew_Window();
 /**
  * @method flags=gcnew
- * @param source cast=(BitmapSource^),flags=gcobject
+ * @param source cast=(BitmapSource^),flags=object
  */
 public static final native int gcnew_WriteableBitmap (int source);
 /**
  * @method flags=gcnew
- * @param pixelFormat cast=(PixelFormat),flags=gcobject
- * @param palette cast=(BitmapPalette^),flags=gcobject
+ * @param pixelFormat cast=(PixelFormat),flags=object
+ * @param palette cast=(BitmapPalette^),flags=object
  */
 public static final native int gcnew_WriteableBitmap (int pixelWidth, int pixelHeight, double dpiX, double dpiY, int pixelFormat, int palette);
 /** @method flags=no_gen */
@@ -6217,12 +6232,12 @@ public static final native void memcpy(char[] dest, int src, int size);
 /**
  * @method flags=no_gen
  * @param dest flags=no_in critical
- * @param src cast=(array<Byte>^),flags=gcobject
+ * @param src cast=(array<Byte>^),flags=object
  */
 public static final native void memcpy(byte[] dest, int src, int size);
 /**
  * @method flags=no_gen
- * @param src cast=(array<Byte>^),flags=gcobject
+ * @param src cast=(array<Byte>^),flags=object
  * @param dest flags=no_out critical
  */
 public static final native void memcpy(int src, byte[] dest, int size);
@@ -6230,37 +6245,37 @@ public static final native void memcpy(int src, byte[] dest, int size);
 
 //Demo
 /**
- * @method flags=gcobject getter
- * @param sender cast=(FrameworkElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(FrameworkElement^),flags=object
  */
 public static final native int FrameworkElement_Resources(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param value cast=(ResourceDictionary^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param value cast=(ResourceDictionary^),flags=object
  */
 public static final native void FrameworkElement_Resources(int sender, int value);
 /**
  * @method accessor=System::IO::StringReader,flags=gcnew
- * @param string cast=(String^),flags=gcobject
+ * @param string cast=(String^),flags=object
  */
 public static final native int gcnew_StringReader(int string);
 /**
- * @method accessor=XmlReader::Create,flags=gcobject
- * @param stream cast=(System::IO::TextReader^),flags=gcobject
+ * @method accessor=XmlReader::Create,flags=object
+ * @param stream cast=(System::IO::TextReader^),flags=object
  */
 public static final native int XmlReader_Create(int stream);
 /**
- * @method accessor=XamlReader::Load,flags=gcobject
- * @param stream cast=(XmlReader^),flags=gcobject
+ * @method accessor=XamlReader::Load,flags=object
+ * @param stream cast=(XmlReader^),flags=object
  */
 public static final native int XamlReader_Load(int stream);
 /** @method flags=gcnew */
 public static final native int gcnew_ResourceDictionary();
 /**
  * @method flags=setter
- * @param sender cast=(ResourceDictionary^),flags=gcobject
- * @param uri cast=(Uri^),flags=gcobject
+ * @param sender cast=(ResourceDictionary^),flags=object
+ * @param uri cast=(Uri^),flags=object
  */
 public static final native void ResourceDictionary_Source(int sender, int uri);
 
@@ -6272,7 +6287,7 @@ public static final native int gcnew_DiscreteDoubleKeyFrame();
 public static final native int gcnew_LinearDoubleKeyFrame();
 /**
  * @method flags=gcnew
- * @param parameter cast=(Object^),flags=gcobject
+ * @param parameter cast=(Object^),flags=object
  */
 public static final native int gcnew_PropertyPath(int parameter);
 /** @method flags=gcnew */
@@ -6283,117 +6298,117 @@ public static final native int gcnew_Storyboard();
 public static final native int gcnew_SWTAnimator(int jniRef);
 /**
  * @method flags=setter
- * @param sender cast=(DoubleKeyFrame^),flags=gcobject
+ * @param sender cast=(DoubleKeyFrame^),flags=object
  */
 public static final native void DoubleKeyFrame_Value(int sender, double value);
 /**
  * @method flags=setter
- * @param sender cast=(DoubleKeyFrame^),flags=gcobject
- * @param value cast=(KeyTime),flags=gcobject
+ * @param sender cast=(DoubleKeyFrame^),flags=object
+ * @param value cast=(KeyTime),flags=object
  */
 public static final native void DoubleKeyFrame_KeyTime(int sender, int value);
 /**
- * @method accessor=KeyTime::FromTimeSpan,flags=gcobject
- * @param timeSpan cast=(TimeSpan),flags=gcobject
+ * @method accessor=KeyTime::FromTimeSpan,flags=object
+ * @param timeSpan cast=(TimeSpan),flags=object
  */
 public static final native int KeyTime_FromTimeSpan(int timeSpan);
 /**
  * @method flags=cpp
- * @param sender cast=(Storyboard^),flags=gcobject
- * @param containingObject cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(Storyboard^),flags=object
+ * @param containingObject cast=(FrameworkElement^),flags=object
  */
 public static final native void Storyboard_Begin(int sender, int containingObject, boolean isControllable);
 /**
  * @method flags=cpp
- * @param sender cast=(Storyboard^),flags=gcobject
- * @param containingObject cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(Storyboard^),flags=object
+ * @param containingObject cast=(FrameworkElement^),flags=object
  */
 public static final native void Storyboard_Pause(int sender, int containingObject);
 /**
  * @method flags=cpp
- * @param sender cast=(Storyboard^),flags=gcobject
- * @param containingObject cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(Storyboard^),flags=object
+ * @param containingObject cast=(FrameworkElement^),flags=object
  */
 public static final native void Storyboard_Resume(int sender, int containingObject);
 /**
  * @method flags=cpp
- * @param sender cast=(Storyboard^),flags=gcobject
- * @param containingObject cast=(FrameworkElement^),flags=gcobject
+ * @param sender cast=(Storyboard^),flags=object
+ * @param containingObject cast=(FrameworkElement^),flags=object
  */
 public static final native void Storyboard_Stop(int sender, int containingObject);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(TimelineGroup^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(TimelineGroup^),flags=object
  */
 public static final native int TimelineGroup_Children(int sender);
-/** @method accessor=SWTAnimator::DoubleValueProperty,flags=no_gen gcobject const */
+/** @method accessor=SWTAnimator::DoubleValueProperty,flags=no_gen object const */
 public static final native int SWTAnimator_DoubleValueProperty();
-/** @method accessor=SWTAnimator::IntValueProperty,flags=no_gen gcobject const */
+/** @method accessor=SWTAnimator::IntValueProperty,flags=no_gen object const */
 public static final native int SWTAnimator_IntValueProperty();
 /**
  * @method flags=cpp
- * @param sender cast=(FrameworkElement^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
- * @param scopedElement cast=(Object^),flags=gcobject
+ * @param sender cast=(FrameworkElement^),flags=object
+ * @param name cast=(String^),flags=object
+ * @param scopedElement cast=(Object^),flags=object
  */
 public static final native void FrameworkElement_RegisterName(int sender, int name, int scopedElement);
 /**
  * @method accessor=NewValue,flags=getter
- * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=gcobject
+ * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=object
  */
 public static final native double DependencyPropertyChangedEventArgs_NewValueDouble(int sender);
 /**
  * @method accessor=OldValue,flags=getter
- * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=gcobject
+ * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=object
  */
 public static final native double DependencyPropertyChangedEventArgs_OldValueDouble(int sender);
 /**
  * @method accessor=NewValue,flags=getter
- * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=gcobject
+ * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=object
  */
 public static final native int DependencyPropertyChangedEventArgs_NewValueInt(int sender);
 /**
  * @method accessor=OldValue,flags=getter
- * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=gcobject
+ * @param sender cast=(DependencyPropertyChangedEventArgs^),flags=object
  */
 public static final native int DependencyPropertyChangedEventArgs_OldValueInt(int sender);
 /**
  * @method accessor=Storyboard::SetTargetName
- * @param element cast=(DependencyObject^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
+ * @param name cast=(String^),flags=object
  */
 public static final native void Storyboard_SetTargetName(int element, int name);
 /**
  * @method accessor=Storyboard::SetTargetProperty
- * @param element cast=(DependencyObject^),flags=gcobject
- * @param propertyPath cast=(PropertyPath^),flags=gcobject
+ * @param element cast=(DependencyObject^),flags=object
+ * @param propertyPath cast=(PropertyPath^),flags=object
  */
 public static final native void Storyboard_SetTargetProperty(int element, int propertyPath);
 /** @method flags=gcnew */
 public static final native int gcnew_NameScope();
 /**
- * @method accessor=NameScope::GetNameScope,flags=gcobject
- * @param dependencyObject cast=(DependencyObject^),flags=gcobject
+ * @method accessor=NameScope::GetNameScope,flags=object
+ * @param dependencyObject cast=(DependencyObject^),flags=object
  */
 public static final native int NameScope_GetNameScope(int dependencyObject);
 /**
  * @method accessor=NameScope::SetNameScope
- * @param dependencyObject cast=(DependencyObject^),flags=gcobject
- * @param nameScope cast=(INameScope^),flags=gcobject
+ * @param dependencyObject cast=(DependencyObject^),flags=object
+ * @param nameScope cast=(INameScope^),flags=object
  */
 public static final native void NameScope_SetNameScope(int dependencyObject, int nameScope);
 /** @method flags=gcnew */
 public static final native int gcnew_KeySpline(double x1, double y1, double x2, double y2);
 /**
  * @method flags=setter
- * @param sender cast=(SplineDoubleKeyFrame^),flags=gcobject
- * @param value cast=(KeySpline^),flags=gcobject
+ * @param sender cast=(SplineDoubleKeyFrame^),flags=object
+ * @param value cast=(KeySpline^),flags=object
  */
 public static final native void SplineDoubleKeyFrame_KeySpline(int sender, int value);
 /**
  * @method flags=adder
- * @param sender cast=(Timeline^),flags=gcobject
- * @param handler cast=(EventHandler^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
+ * @param handler cast=(EventHandler^),flags=object
  */
 public static final native void Timeline_Completed(int sender, int handler);
 /** @method flags=gcnew */
@@ -6405,345 +6420,345 @@ public static final native int gcnew_LinearInt32KeyFrame();
 /** @method flags=gcnew */
 public static final native int gcnew_SplineInt32KeyFrame();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Int32AnimationUsingKeyFrames^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Int32AnimationUsingKeyFrames^),flags=object
  */
 public static final native int Int32AnimationUsingKeyFrames_KeyFrames(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Int32KeyFrame^),flags=gcobject
+ * @param sender cast=(Int32KeyFrame^),flags=object
  */
 public static final native void Int32KeyFrame_Value(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(SplineInt32KeyFrame^),flags=gcobject
- * @param value cast=(KeySpline^),flags=gcobject
+ * @param sender cast=(SplineInt32KeyFrame^),flags=object
+ * @param value cast=(KeySpline^),flags=object
  */
 public static final native void SplineInt32KeyFrame_KeySpline(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(Int32KeyFrame^),flags=gcobject
- * @param value cast=(KeyTime),flags=gcobject
+ * @param sender cast=(Int32KeyFrame^),flags=object
+ * @param value cast=(KeyTime),flags=object
  */
 public static final native void Int32KeyFrame_KeyTime(int sender, int value);
 
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native int Timeline_Duration(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Duration^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Duration^),flags=object
  */
 public static final native int Duration_TimeSpan(int sender);
 /**
  * @method flags=getter
- * @param sender cast=(TimeSpan^),flags=gcobject
+ * @param sender cast=(TimeSpan^),flags=object
  */
 public static final native double TimeSpan_TotalMilliseconds(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native int Timeline_BeginTime(int sender);
 
 /** @method flags=gcnew */
 public static final native int gcnew_OuterGlowBitmapEffect();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
  */
 public static final native int OuterGlowBitmapEffect_GlowColor(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
- * @param value cast=(Color),flags=gcobject
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
+ * @param value cast=(Color),flags=object
  */
 public static final native void OuterGlowBitmapEffect_GlowColor(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
  */
 public static final native double OuterGlowBitmapEffect_GlowSize(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
  */
 public static final native void OuterGlowBitmapEffect_GlowSize(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
  */
 public static final native double OuterGlowBitmapEffect_Opacity(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(OuterGlowBitmapEffect^),flags=gcobject
+ * @param sender cast=(OuterGlowBitmapEffect^),flags=object
  */
 public static final native void OuterGlowBitmapEffect_Opacity(int sender, double value);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(UIElement^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(UIElement^),flags=object
  */
 public static final native int UIElement_BitmapEffect(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(UIElement^),flags=gcobject
- * @param value cast=(BitmapEffect^),flags=gcobject
+ * @param sender cast=(UIElement^),flags=object
+ * @param value cast=(BitmapEffect^),flags=object
  */
 public static final native void UIElement_BitmapEffect(int sender, int value);
 /** @method flags=gcnew */
 public static final native int gcnew_DropShadowBitmapEffect();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native int DropShadowBitmapEffect_Color(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
- * @param value cast=(Color),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
+ * @param value cast=(Color),flags=object
  */
 public static final native void DropShadowBitmapEffect_Color(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native double DropShadowBitmapEffect_Direction(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native void DropShadowBitmapEffect_Direction(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native double DropShadowBitmapEffect_Opacity(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native void DropShadowBitmapEffect_Opacity(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native double DropShadowBitmapEffect_ShadowDepth(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native void DropShadowBitmapEffect_ShadowDepth(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native double DropShadowBitmapEffect_Softness(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DropShadowBitmapEffect^),flags=gcobject
+ * @param sender cast=(DropShadowBitmapEffect^),flags=object
  */
 public static final native void DropShadowBitmapEffect_Softness(int sender, double value);
 /** @method flags=gcnew */
 public static final native int gcnew_BlurBitmapEffect();
 /**
  * @method flags=setter
- * @param sender cast=(BlurBitmapEffect^),flags=gcobject
+ * @param sender cast=(BlurBitmapEffect^),flags=object
  */
 public static final native void BlurBitmapEffect_Radius(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(BlurBitmapEffect^),flags=gcobject
+ * @param sender cast=(BlurBitmapEffect^),flags=object
  */
 public static final native double BlurBitmapEffect_Radius(int sender);
 /** @method flags=gcnew */
 public static final native int gcnew_BevelBitmapEffect();
 /**
  * @method flags=getter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native double BevelBitmapEffect_LightAngle(int handle);
 /**
  * @method flags=setter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native void BevelBitmapEffect_LightAngle(int handle, double value);
 /**
  * @method flags=getter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native double BevelBitmapEffect_BevelWidth(int handle);
 /**
  * @method flags=setter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native void BevelBitmapEffect_BevelWidth(int handle, double value);
 /**
  * @method flags=getter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native double BevelBitmapEffect_Smoothness(int handle);
 /**
  * @method flags=setter
- * @param handle cast=(BevelBitmapEffect^),flags=gcobject
+ * @param handle cast=(BevelBitmapEffect^),flags=object
  */
 public static final native void BevelBitmapEffect_Smoothness(int handle, double value);
 /** @method flags=gcnew */
 public static final native int gcnew_BitmapEffectGroup();
 /**
- * @method flags=gcobject getter
- * @param sender cast=(BitmapEffectGroup^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(BitmapEffectGroup^),flags=object
  */
 public static final native int BitmapEffectGroup_Children(int sender);
 
 /**
- * @method flags=gcobject getter
- * @param sender cast=(HwndSource^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(HwndSource^),flags=object
  */
 public static final native int HwndSource_CompositionTarget(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(HwndTarget^),flags=gcobject
- * @param value cast=(Color),flags=gcobject
+ * @param sender cast=(HwndTarget^),flags=object
+ * @param value cast=(Color),flags=object
  */
 public static final native void HwndTarget_BackgroundColor(int sender, int value);
 
 /**
- * @method accessor=TypeDescriptor::GetProperties,flags=gcobject
- * @param sender cast=(Object^),flags=gcobject
+ * @method accessor=TypeDescriptor::GetProperties,flags=object
+ * @param sender cast=(Object^),flags=object
  */
 public static final native int TypeDescriptor_GetProperties(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(MemberDescriptor^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(MemberDescriptor^),flags=object
  */
 public static final native int MemberDescriptor_Name(int sender);
 /**
- * @method flags=gcobject getter
- * @param sender cast=(DependencyPropertyDescriptor^),flags=gcobject
+ * @method flags=object getter
+ * @param sender cast=(DependencyPropertyDescriptor^),flags=object
  */
 public static final native int DependencyPropertyDescriptor_DependencyProperty(int sender);
-/** @method accessor=DependencyPropertyDescriptor::typeid,flags=const gcobject */
+/** @method accessor=DependencyPropertyDescriptor::typeid,flags=const object */
 public static final native int DependencyPropertyDescriptor_typeid();
 /**
- * @method accessor=DependencyPropertyDescriptor::FromProperty,flags=gcobject
- * @param propertyDescriptor cast=(PropertyDescriptor^),flags=gcobject
+ * @method accessor=DependencyPropertyDescriptor::FromProperty,flags=object
+ * @param propertyDescriptor cast=(PropertyDescriptor^),flags=object
  */
 public static final native int DependencyPropertyDescriptor_FromProperty(int propertyDescriptor);
 /**
- * @method accessor=Type::GetType,flags=gcobject
- * @param typeName cast=(String^),flags=gcobject
+ * @method accessor=Type::GetType,flags=object
+ * @param typeName cast=(String^),flags=object
  */
 public static final native int Type_GetType(int typeName, boolean throwOnError, boolean ignoreCase);
 /**
  * @method flags=cpp
- * @param sender cast=(NameScope^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
- * @param scopedElement cast=(Object^),flags=gcobject
+ * @param sender cast=(NameScope^),flags=object
+ * @param name cast=(String^),flags=object
+ * @param scopedElement cast=(Object^),flags=object
  */
 public static final native void NameScope_RegisterName(int sender, int name, int scopedElement);
 
-/** @method accessor=Panel::HeightProperty,flags=const gcobject */
+/** @method accessor=Panel::HeightProperty,flags=const object */
 public static final native int Panel_HeightProperty();
-/** @method accessor=Panel::WidthProperty,flags=const gcobject */
+/** @method accessor=Panel::WidthProperty,flags=const object */
 public static final native int Panel_WidthProperty();
-/** @method accessor=Canvas::TopProperty,flags=const gcobject */
+/** @method accessor=Canvas::TopProperty,flags=const object */
 public static final native int Canvas_TopProperty();
-/** @method accessor=Canvas::LeftProperty,flags=const gcobject */
+/** @method accessor=Canvas::LeftProperty,flags=const object */
 public static final native int Canvas_LeftProperty();
-/** @method accessor=OuterGlowBitmapEffect::GlowSizeProperty,flags=const gcobject */
+/** @method accessor=OuterGlowBitmapEffect::GlowSizeProperty,flags=const object */
 public static final native int OuterGlowBitmapEffect_GlowSizeProperty();
 /** @method flags=gcnew */
 public static final native int gcnew_Int32Animation();
 /** @method flags=gcnew */
 public static final native int gcnew_DoubleAnimation();
 /**
- * @method flags=no_gen setter gcobject
- * @param sender cast=(Timeline^),flags=gcobject
- * @param value cast=(TimeSpan^),flags=gcobject
+ * @method flags=no_gen setter object
+ * @param sender cast=(Timeline^),flags=object
+ * @param value cast=(TimeSpan^),flags=object
  */
 public static final native void Timeline_BeginTime(int sender, int value);
 /**
  * @method flags=setter
- * @param sender cast=(DoubleAnimation^),flags=gcobject
+ * @param sender cast=(DoubleAnimation^),flags=object
  */
 public static final native void DoubleAnimation_To(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(DoubleAnimation^),flags=gcobject
+ * @param sender cast=(DoubleAnimation^),flags=object
  */
 public static final native double DoubleAnimation_To(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Int32Animation^),flags=gcobject
+ * @param sender cast=(Int32Animation^),flags=object
  */
 public static final native void Int32Animation_To(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(Int32Animation^),flags=gcobject
+ * @param sender cast=(Int32Animation^),flags=object
  */
 public static final native int Int32Animation_To(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(DoubleAnimation^),flags=gcobject
+ * @param sender cast=(DoubleAnimation^),flags=object
  */
 public static final native void DoubleAnimation_From(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(DoubleAnimation^),flags=gcobject
+ * @param sender cast=(DoubleAnimation^),flags=object
  */
 public static final native double DoubleAnimation_From(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Int32Animation^),flags=gcobject
+ * @param sender cast=(Int32Animation^),flags=object
  */
 public static final native void Int32Animation_From(int sender, int value);
 /**
  * @method flags=getter
- * @param sender cast=(Int32Animation^),flags=gcobject
+ * @param sender cast=(Int32Animation^),flags=object
  */
 public static final native int Int32Animation_From(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native void Timeline_DecelerationRatio(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native double Timeline_DecelerationRatio(int sender);
 /**
  * @method flags=setter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native void Timeline_AccelerationRatio(int sender, double value);
 /**
  * @method flags=getter
- * @param sender cast=(Timeline^),flags=gcobject
+ * @param sender cast=(Timeline^),flags=object
  */
 public static final native double Timeline_AccelerationRatio(int sender);
 
 /** @method flags=no_gen gcnew */
 public static final native int gcnew_SWTAnimation(int jniRef);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(Type^),flags=gcobject
- * @param name cast=(String^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(Type^),flags=object
+ * @param name cast=(String^),flags=object
  * @param bindingFlags cast=(BindingFlags)
  */
 public static final native int Type_GetMethod(int sender, int name, int bindingFlags);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(ArrayList^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(ArrayList^),flags=object
  */
 public static final native int ArrayList_ToArray(int sender);
 /**
- * @method flags=cpp gcobject
- * @param sender cast=(MethodInfo^),flags=gcobject
- * @param obj cast=(Object^),flags=gcobject
- * @param parameters cast=(array<Object^>^),flags=gcobject
+ * @method flags=cpp object
+ * @param sender cast=(MethodInfo^),flags=object
+ * @param obj cast=(Object^),flags=object
+ * @param parameters cast=(array<Object^>^),flags=object
  */
 public static final native int MethodInfo_Invoke(int sender, int obj, int parameters);
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java
index 3d90485..336908a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ import org.eclipse.swt.internal.carbon.OS;
  */
 public class PrintDialog extends Dialog {
 	PrinterData printerData = new PrinterData();
-
+	static final String SET_MODAL_DIALOG = "org.eclipse.swt.internal.modalDialog"; //$NON-NLS-1$
 /**
  * Constructs a new instance of this class given only its parent.
  *
@@ -110,6 +110,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 
@@ -159,6 +160,9 @@ public PrinterData open() {
 				OS.PMSetCollate(printSettings, printerData.collate);
 				OS.PMSetOrientation(pageFormat, printerData.orientation == PrinterData.LANDSCAPE ? OS.kPMLandscape : OS.kPMPortrait, false);
 				boolean[] accepted = new boolean [1];
+				Shell parent = getParent();
+				Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+				display.setData(SET_MODAL_DIALOG, this);
 				if (OS.VERSION >= 0x1050) {
 					int printDialogOptions = OS.kPMShowDefaultInlineItems | OS.kPMShowPageAttributesPDE;
 					OS.PMShowPrintDialogWithOptions(printSession, printSettings, pageFormat, printDialogOptions, accepted);
@@ -166,6 +170,7 @@ public PrinterData open() {
 					OS.PMSessionPageSetupDialog(printSession, pageFormat, accepted);	
 					if (accepted[0]) OS.PMSessionPrintDialog(printSession, printSettings, pageFormat, accepted);
 				}
+				display.setData(SET_MODAL_DIALOG, null);
 				if (accepted[0]) {
 					short[] destType = new short[1];
 					OS.PMSessionGetDestinationType(printSession, printSettings, destType);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java
index 77459a5..7b12bbd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/carbon/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -337,6 +337,8 @@ protected void destroy() {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC(GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -379,6 +381,8 @@ protected void init () {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int context, GCData data) {
 	if (data != null) isGCCreated = false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java
index 5b3d03b..a7da036 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ public class PrintDialog extends Dialog {
 	// the following Callbacks are never freed
 	static Callback dialogCallback5;
 	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
+	static final String SET_MODAL_DIALOG = "org.eclipse.swt.internal.modalDialog"; //$NON-NLS-1$
 
 /**
  * Constructs a new instance of this class given only its parent.
@@ -122,6 +123,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 
@@ -169,6 +171,8 @@ public PrinterData open() {
 		dict.setValue(NSNumber.numberWithInt(printerData.endPage), OS.NSPrintLastPage);
 	}
 	panel.setOptions(OS.NSPrintPanelShowsPageSetupAccessory | panel.options());
+	Shell parent = getParent();
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
 	int response;
 	if ((getStyle () & SWT.SHEET) != 0) {
 		initClasses();
@@ -177,16 +181,18 @@ public PrinterData open() {
 		if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 		OS.object_setInstanceVariable(delegate.id, SWT_OBJECT, jniRef);
 		returnCode = -1;
-		Shell parent = getParent();
 		panel.beginSheetWithPrintInfo(printInfo, parent.view.window(), delegate, OS.sel_panelDidEnd_returnCode_contextInfo_, 0);
-		NSApplication application = NSApplication.sharedApplication();
-		while (returnCode == -1) application.run();
+		while (returnCode == -1) {
+			if (!display.readAndDispatch()) display.sleep();
+		}
 		if (delegate != null) delegate.release();
 		if (jniRef != 0) OS.DeleteGlobalRef(jniRef);
 		response = returnCode;
 	} else {
+		display.setData(SET_MODAL_DIALOG, this);
 		response = (int)/*64*/panel.runModalWithPrintInfo(printInfo);
 	}
+	display.setData(SET_MODAL_DIALOG, null);
 	if (response != OS.NSCancelButton) {
 		NSPrinter printer = printInfo.printer();
 		NSString str = printer.name();
@@ -268,8 +274,6 @@ void initClasses () {
 
 void panelDidEnd_returnCode_contextInfo(int /*long*/ id, int /*long*/ sel, int /*long*/ alert, int /*long*/ returnCode, int /*long*/ contextInfo) {
 	this.returnCode = (int)/*64*/returnCode;
-	NSApplication application = NSApplication.sharedApplication();
-	application.stop(null);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java
index e2e7c5b..292ef0d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/cocoa/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -284,6 +284,8 @@ protected void destroy() {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC(GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -304,6 +306,7 @@ public int /*long*/ internal_new_GC(GCData data) {
 			data.size = size;
 			isGCCreated = true;
 		}
+		createContext();
 		return operation.context().id;
 	} finally {
 		if (pool != null) pool.release();
@@ -311,7 +314,13 @@ public int /*long*/ internal_new_GC(GCData data) {
 }
 
 protected void init () {
-	super.init();
+	NSAutoreleasePool pool = null;
+	if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+	try {
+		super.init();
+	} finally {
+		if (pool != null) pool.release();
+	}
 }
 
 /**	 
@@ -326,6 +335,8 @@ protected void init () {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int /*long*/ context, GCData data) {
 	if (data != null) isGCCreated = false;
@@ -374,10 +385,7 @@ public boolean startJob(String jobName) {
 		if (jobName != null && jobName.length() != 0) {
 			operation.setJobTitle(NSString.stringWith(jobName));
 		}
-		printInfo.setUpPrintOperationDefaultValues();
-		NSPrintOperation.setCurrentOperation(operation);
-		NSGraphicsContext context = operation.createContext();
-		if (context != null) {
+		if (createContext()) {
 			view.beginDocument();
 			return true;
 		}
@@ -387,6 +395,13 @@ public boolean startJob(String jobName) {
 	}
 }
 
+boolean createContext () {
+	if (operation.context() != null) return true;
+	printInfo.setUpPrintOperationDefaultValues();
+	NSPrintOperation.setCurrentOperation(operation);
+	return operation.createContext() != null;
+}
+
 /**
  * Ends the current print job.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
index c9930c8..98fc552 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,13 +69,13 @@ public final class PrinterData extends DeviceData {
 	 * the start page of a page range, used when scope is PAGE_RANGE.
 	 * This value can be from 1 to the maximum number of pages for the platform.
 	 */
-	public int startPage = 0;
+	public int startPage = 1;
 
 	/**
 	 * the end page of a page range, used when scope is PAGE_RANGE.
 	 * This value can be from 1 to the maximum number of pages for the platform.
 	 */
-	public int endPage = 0;
+	public int endPage = 1;
 	
 	/**
 	 * whether or not the print job should go to a file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java
index 12e3bdf..5920b40 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,6 +113,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/Printer.java
index cd1f6a0..00c30a8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/emulated/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -128,6 +128,8 @@ public Printer(PrinterData data) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC(GCData data) {
 	return 0;
@@ -145,6 +147,8 @@ public int internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int xGC, GCData data) {
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java
index f8bc7cb..03cbb14 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,6 +110,7 @@ public PrintDialog (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 
@@ -354,7 +355,11 @@ public PrinterData open() {
 		OS.gtk_print_unix_dialog_set_settings(handle, settings);
 		OS.gtk_print_unix_dialog_set_page_setup(handle, page_setup);
 		OS.g_object_unref(settings);
-		OS.g_object_unref(page_setup);		
+		OS.g_object_unref(page_setup);
+		if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+			int /*long*/ group = OS.gtk_window_get_group(0);
+			OS.gtk_window_group_add_window (group, handle);
+		}
 		OS.gtk_window_set_modal(handle, true);
 		PrinterData data = null;
 		//TODO: Handle 'Print Preview' (GTK_RESPONSE_APPLY).
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
index 8ff2500..0812440 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -367,6 +367,8 @@ public Font getSystemFont () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC(GCData data) {
 	GdkVisual visual = new GdkVisual ();
@@ -407,6 +409,8 @@ public int /*long*/ internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int /*long*/ gdkGC, GCData data) {
 	if (data != null) isGCCreated = false;
@@ -501,6 +505,8 @@ public void endJob() {
 	if (printJob == 0) return;
 	Cairo.cairo_surface_finish(surface);
 	OS.gtk_print_job_send(printJob, 0, 0, 0);
+	OS.g_object_unref(printJob);
+	printJob = 0;
 }
 
 /**
@@ -514,8 +520,9 @@ public void cancelJob() {
 	checkDevice();
 	if (printJob == 0) return;
 	//TODO: Need to implement (waiting on gtk bug 339323) 
-	//OS.g_object_unref(printJob);
-	//printJob = 0;
+	Cairo.cairo_surface_finish(surface);
+	OS.g_object_unref(printJob);
+	printJob = 0;
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java
index 70854fc..72e4dde 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,6 +110,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java
index 7266c2d..83ac822 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/motif/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -368,6 +368,8 @@ protected void destroy() {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC(GCData data) {
 	if (data != null) {
@@ -411,6 +413,8 @@ public int internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int xGC, GCData data) {
 	OS.XFreeGC(xDisplay, xGC);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java
index 70854fc..72e4dde 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,6 +110,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java
index 7723304..c3cf7f5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/photon/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -117,6 +117,8 @@ public Printer(PrinterData data) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC(GCData data) {
 	return 0;
@@ -134,6 +136,8 @@ public int internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int xGC, GCData data) {
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java
index a0c7762..1fd65f7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.swt.internal.win32.*;
  */
 
 public class PrintDialog extends Dialog {
+	static final TCHAR DialogClass = new TCHAR (0, OS.IsWinCE ? "Dialog" : "#32770", true);
 	PrinterData printerData = new PrinterData();
 	
 /**
@@ -87,6 +88,18 @@ public PrintDialog (Shell parent, int style) {
 	checkSubclass ();
 }
 
+static int checkBits (int style, int int0, int int1, int int2, int int3, int int4, int int5) {
+	int mask = int0 | int1 | int2 | int3 | int4 | int5;
+	if ((style & mask) == 0) style |= int0;
+	if ((style & int0) != 0) style = (style & ~mask) | int0;
+	if ((style & int1) != 0) style = (style & ~mask) | int1;
+	if ((style & int2) != 0) style = (style & ~mask) | int2;
+	if ((style & int3) != 0) style = (style & ~mask) | int3;
+	if ((style & int4) != 0) style = (style & ~mask) | int4;
+	if ((style & int5) != 0) style = (style & ~mask) | int5;
+	return style;
+}
+
 static int checkStyle (Shell parent, int style) {
 	int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
 	if ((style & SWT.SHEET) != 0) {
@@ -95,7 +108,17 @@ static int checkStyle (Shell parent, int style) {
 			style |= parent == null ? SWT.APPLICATION_MODAL : SWT.PRIMARY_MODAL;
 		}
 	}
-	return style;
+	if ((style & mask) == 0) {
+		style |= SWT.APPLICATION_MODAL;
+	}
+	style &= ~SWT.MIRRORED;
+	if ((style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT)) == 0) {
+		if (parent != null) {
+			if ((parent.getStyle () & SWT.LEFT_TO_RIGHT) != 0) style |= SWT.LEFT_TO_RIGHT;
+			if ((parent.getStyle () & SWT.RIGHT_TO_LEFT) != 0) style |= SWT.RIGHT_TO_LEFT;
+		}
+	}
+	return checkBits (style, SWT.LEFT_TO_RIGHT, SWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
 }
 
 /**
@@ -262,151 +285,198 @@ protected void checkSubclass() {
  * </ul>
  */
 public PrinterData open() {
-	PRINTDLG pd = new PRINTDLG();
-	pd.lStructSize = PRINTDLG.sizeof;
+	/* Get the owner HWND for the dialog */
 	Control parent = getParent();
-	if (parent != null) pd.hwndOwner = parent.handle;
-	
-	/* Initialize PRINTDLG fields, including DEVMODE. */
-	pd.Flags = OS.PD_RETURNDEFAULT;
-	OS.PrintDlg(pd);
+	int style = getStyle();
+	int /*long*/ hwndOwner = parent.handle;
+	int /*long*/ hwndParent = parent.handle;
 
 	/*
-	 * If user setup info from a previous print dialog was specified,
-	 * then restore the previous DEVMODE struct.
-	 */
-	int /*long*/ lpInitData = 0;
-	int /*long*/ hHeap = OS.GetProcessHeap();
-	byte devmodeData [] = printerData.otherData;
-	if (devmodeData != null && devmodeData.length != 0) {
-		lpInitData = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, devmodeData.length);
-		OS.MoveMemory(lpInitData, devmodeData, devmodeData.length);
-		if (pd.hDevMode != 0) OS.GlobalFree(pd.hDevMode);
-		pd.hDevMode = lpInitData;
-	}
-	
-	/* Initialize the DEVMODE struct's fields from the printerData. */
-	int /*long*/ hMem = pd.hDevMode;
-	int /*long*/ ptr = OS.GlobalLock(hMem);
-	DEVMODE devmode = OS.IsUnicode ? (DEVMODE)new DEVMODEW () : new DEVMODEA ();
-	OS.MoveMemory(devmode, ptr, OS.IsUnicode ? OS.DEVMODEW_sizeof() : OS.DEVMODEA_sizeof());
-	devmode.dmFields |= OS.DM_ORIENTATION;
-	devmode.dmOrientation = printerData.orientation == PrinterData.PORTRAIT ? OS.DMORIENT_PORTRAIT : OS.DMORIENT_LANDSCAPE;
-	if (printerData.copyCount != 1) {
-		devmode.dmFields |= OS.DM_COPIES;
-		devmode.dmCopies = (short)printerData.copyCount;
-	}
-	if (printerData.collate != false) {
-		devmode.dmFields |= OS.DM_COLLATE;
-		devmode.dmCollate = OS.DMCOLLATE_TRUE;
-	}
-	OS.MoveMemory(ptr, devmode, OS.IsUnicode ? OS.DEVMODEW_sizeof() : OS.DEVMODEA_sizeof());
-	OS.GlobalUnlock(hMem);
-
-	pd.Flags = OS.PD_USEDEVMODECOPIESANDCOLLATE;
-	if (printerData.printToFile) pd.Flags |= OS.PD_PRINTTOFILE;
-	switch (printerData.scope) {
-		case PrinterData.PAGE_RANGE: pd.Flags |= OS.PD_PAGENUMS; break;
-		case PrinterData.SELECTION: pd.Flags |= OS.PD_SELECTION; break;
-		default: pd.Flags |= OS.PD_ALLPAGES;
-	}
-	pd.nMinPage = 1;
-	pd.nMaxPage = -1;
-	pd.nFromPage = (short) Math.min (0xFFFF, Math.max (1, printerData.startPage));
-	pd.nToPage = (short) Math.min (0xFFFF, Math.max (1, printerData.endPage));
-
-	Display display = parent.getDisplay();
-	Shell [] shells = display.getShells();
-	if ((getStyle() & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
-		for (int i=0; i<shells.length; i++) {
-			if (shells[i].isEnabled() && shells[i] != parent) {
-				shells[i].setEnabled(false);
-			} else {
-				shells[i] = null;
-			}
+	* Feature in Windows.  There is no API to set the orientation of a
+	* file dialog.  It is always inherited from the parent.  The fix is
+	* to create a hidden parent and set the orientation in the hidden
+	* parent for the dialog to inherit.
+	*/
+	boolean enabled = false;
+	if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
+		int dialogOrientation = style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+		int parentOrientation = parent.getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+		if (dialogOrientation != parentOrientation) {
+			int exStyle = OS.WS_EX_NOINHERITLAYOUT;
+			if (dialogOrientation == SWT.RIGHT_TO_LEFT) exStyle |= OS.WS_EX_LAYOUTRTL;
+			hwndOwner = OS.CreateWindowEx (
+				exStyle,
+				DialogClass,
+				null,
+				0,
+				OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
+				hwndParent,
+				0,
+				OS.GetModuleHandle (null),
+				null);
+			enabled = OS.IsWindowEnabled (hwndParent);
+			if (enabled) OS.EnableWindow (hwndParent, false);
 		}
 	}
+
 	PrinterData data = null;
-	String key = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$
-	Object oldValue = display.getData(key);
-	display.setData(key, new Boolean(true));
-	boolean success = OS.PrintDlg(pd);
-	display.setData(key, oldValue);
-	if ((getStyle() & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
-		for (int i=0; i<shells.length; i++) {
-			if (shells[i] != null && !shells[i].isDisposed ()) {
-				shells[i].setEnabled(true);
-			}
-		}
-	}
+	PRINTDLG pd = new PRINTDLG();
+	pd.lStructSize = PRINTDLG.sizeof;
+	pd.hwndOwner = hwndOwner;
 	
-	if (success) {
-		/* Get driver and device from the DEVNAMES struct */
-		hMem = pd.hDevNames;
-		/* Ensure size is a multiple of 2 bytes on UNICODE platforms */
-		int size = OS.GlobalSize(hMem) / TCHAR.sizeof * TCHAR.sizeof;
-		ptr = OS.GlobalLock(hMem);
-		short[] offsets = new short[4];
-		OS.MoveMemory(offsets, ptr, 2 * offsets.length);
-		TCHAR buffer = new TCHAR(0, size);
-		OS.MoveMemory(buffer, ptr, size);	
-		OS.GlobalUnlock(hMem);
-		if (pd.hDevNames != 0) OS.GlobalFree(pd.hDevNames);
-
-		int driverOffset = offsets[0];
-		int i = 0;
-		while (driverOffset + i < size) {
-			if (buffer.tcharAt(driverOffset + i) == 0) break;
-			i++;
-		}
-		String driver = buffer.toString(driverOffset, i);
-
-		int deviceOffset = offsets[1];
-		i = 0;
-		while (deviceOffset + i < size) {
-			if (buffer.tcharAt(deviceOffset + i) == 0) break;
-			i++;
+	/* Initialize PRINTDLG fields, including DEVMODE. */
+	pd.Flags = OS.PD_RETURNDEFAULT;
+	if (OS.PrintDlg(pd)) {
+		if (pd.hDevNames != 0) {
+			OS.GlobalFree(pd.hDevNames);
+			pd.hDevNames = 0;
 		}
-		String device = buffer.toString(deviceOffset, i);	
 
-		int outputOffset = offsets[2];
-		i = 0;
-		while (outputOffset + i < size) {
-			if (buffer.tcharAt(outputOffset + i) == 0) break;
-			i++;
+		/*
+		 * If user setup info from a previous print dialog was specified,
+		 * then restore the previous DEVMODE struct.
+		 */
+		byte devmodeData [] = printerData.otherData;
+		if (devmodeData != null && devmodeData.length != 0) {
+			int /*long*/ lpInitData = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, devmodeData.length);
+			OS.MoveMemory(lpInitData, devmodeData, devmodeData.length);
+			if (pd.hDevMode != 0) OS.GlobalFree(pd.hDevMode);
+			pd.hDevMode = lpInitData;
 		}
-		String output = buffer.toString(outputOffset, i);
 		
-		/* Create PrinterData object and set fields from PRINTDLG */
-		data = new PrinterData(driver, device);
-		if ((pd.Flags & OS.PD_PAGENUMS) != 0) {
-			data.scope = PrinterData.PAGE_RANGE;
-			data.startPage = pd.nFromPage & 0xFFFF;
-			data.endPage = pd.nToPage & 0xFFFF;
-		} else if ((pd.Flags & OS.PD_SELECTION) != 0) {
-			data.scope = PrinterData.SELECTION;
-		}
-		data.printToFile = (pd.Flags & OS.PD_PRINTTOFILE) != 0;
-		if (data.printToFile) data.fileName = output;
-		data.copyCount = pd.nCopies;
-		data.collate = (pd.Flags & OS.PD_COLLATE) != 0;
-
-		/* Bulk-save the printer-specific settings in the DEVMODE struct */
-		hMem = pd.hDevMode;
-		size = OS.GlobalSize(hMem);
-		ptr = OS.GlobalLock(hMem);
-		data.otherData = new byte[size];
-		OS.MoveMemory(data.otherData, ptr, size);
-		devmode = OS.IsUnicode ? (DEVMODE)new DEVMODEW () : new DEVMODEA ();
+		/* Initialize the DEVMODE struct's fields from the printerData. */
+		int /*long*/ hMem = pd.hDevMode;
+		int /*long*/ ptr = OS.GlobalLock(hMem);
+		DEVMODE devmode = OS.IsUnicode ? (DEVMODE)new DEVMODEW () : new DEVMODEA ();
 		OS.MoveMemory(devmode, ptr, OS.IsUnicode ? OS.DEVMODEW_sizeof() : OS.DEVMODEA_sizeof());
-		if ((devmode.dmFields & OS.DM_ORIENTATION) != 0) {
-			int dmOrientation = devmode.dmOrientation;
-			data.orientation = dmOrientation == OS.DMORIENT_LANDSCAPE ? PrinterData.LANDSCAPE : PrinterData.PORTRAIT;
+		devmode.dmFields |= OS.DM_ORIENTATION;
+		devmode.dmOrientation = printerData.orientation == PrinterData.PORTRAIT ? OS.DMORIENT_PORTRAIT : OS.DMORIENT_LANDSCAPE;
+		if (printerData.copyCount != 1) {
+			devmode.dmFields |= OS.DM_COPIES;
+			devmode.dmCopies = (short)printerData.copyCount;
+		}
+		if (printerData.collate != false) {
+			devmode.dmFields |= OS.DM_COLLATE;
+			devmode.dmCollate = OS.DMCOLLATE_TRUE;
 		}
+		OS.MoveMemory(ptr, devmode, OS.IsUnicode ? OS.DEVMODEW_sizeof() : OS.DEVMODEA_sizeof());
 		OS.GlobalUnlock(hMem);
-		if (pd.hDevMode != 0) OS.GlobalFree(pd.hDevMode);
-		if (lpInitData != 0) OS.HeapFree(hHeap, 0, lpInitData);
-		printerData = data;
+	
+		pd.Flags = OS.PD_USEDEVMODECOPIESANDCOLLATE;
+		if (printerData.printToFile) pd.Flags |= OS.PD_PRINTTOFILE;
+		switch (printerData.scope) {
+			case PrinterData.PAGE_RANGE: pd.Flags |= OS.PD_PAGENUMS; break;
+			case PrinterData.SELECTION: pd.Flags |= OS.PD_SELECTION; break;
+			default: pd.Flags |= OS.PD_ALLPAGES;
+		}
+		pd.nMinPage = 1;
+		pd.nMaxPage = -1;
+		pd.nFromPage = (short) Math.min (0xFFFF, Math.max (1, printerData.startPage));
+		pd.nToPage = (short) Math.min (0xFFFF, Math.max (1, printerData.endPage));
+	
+		Display display = parent.getDisplay();
+		Shell [] shells = display.getShells();
+		if ((getStyle() & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
+			for (int i=0; i<shells.length; i++) {
+				if (shells[i].isEnabled() && shells[i] != parent) {
+					shells[i].setEnabled(false);
+				} else {
+					shells[i] = null;
+				}
+			}
+		}
+		String key = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$
+		Object oldValue = display.getData(key);
+		display.setData(key, new Boolean(true));
+		boolean success = OS.PrintDlg(pd);
+		display.setData(key, oldValue);
+		if ((getStyle() & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {
+			for (int i=0; i<shells.length; i++) {
+				if (shells[i] != null && !shells[i].isDisposed ()) {
+					shells[i].setEnabled(true);
+				}
+			}
+		}
+		
+		if (success) {
+			/* Get driver and device from the DEVNAMES struct */
+			hMem = pd.hDevNames;
+			/* Ensure size is a multiple of 2 bytes on UNICODE platforms */
+			int size = OS.GlobalSize(hMem) / TCHAR.sizeof * TCHAR.sizeof;
+			ptr = OS.GlobalLock(hMem);
+			short[] offsets = new short[4];
+			OS.MoveMemory(offsets, ptr, 2 * offsets.length);
+			TCHAR buffer = new TCHAR(0, size);
+			OS.MoveMemory(buffer, ptr, size);	
+			OS.GlobalUnlock(hMem);
+	
+			int driverOffset = offsets[0];
+			int i = 0;
+			while (driverOffset + i < size) {
+				if (buffer.tcharAt(driverOffset + i) == 0) break;
+				i++;
+			}
+			String driver = buffer.toString(driverOffset, i);
+	
+			int deviceOffset = offsets[1];
+			i = 0;
+			while (deviceOffset + i < size) {
+				if (buffer.tcharAt(deviceOffset + i) == 0) break;
+				i++;
+			}
+			String device = buffer.toString(deviceOffset, i);	
+	
+			int outputOffset = offsets[2];
+			i = 0;
+			while (outputOffset + i < size) {
+				if (buffer.tcharAt(outputOffset + i) == 0) break;
+				i++;
+			}
+			String output = buffer.toString(outputOffset, i);
+			
+			/* Create PrinterData object and set fields from PRINTDLG */
+			data = new PrinterData(driver, device);
+			if ((pd.Flags & OS.PD_PAGENUMS) != 0) {
+				data.scope = PrinterData.PAGE_RANGE;
+				data.startPage = pd.nFromPage & 0xFFFF;
+				data.endPage = pd.nToPage & 0xFFFF;
+			} else if ((pd.Flags & OS.PD_SELECTION) != 0) {
+				data.scope = PrinterData.SELECTION;
+			}
+			data.printToFile = (pd.Flags & OS.PD_PRINTTOFILE) != 0;
+			if (data.printToFile) data.fileName = output;
+			data.copyCount = pd.nCopies;
+			data.collate = (pd.Flags & OS.PD_COLLATE) != 0;
+	
+			/* Bulk-save the printer-specific settings in the DEVMODE struct */
+			hMem = pd.hDevMode;
+			size = OS.GlobalSize(hMem);
+			ptr = OS.GlobalLock(hMem);
+			data.otherData = new byte[size];
+			OS.MoveMemory(data.otherData, ptr, size);
+			devmode = OS.IsUnicode ? (DEVMODE)new DEVMODEW () : new DEVMODEA ();
+			OS.MoveMemory(devmode, ptr, OS.IsUnicode ? OS.DEVMODEW_sizeof() : OS.DEVMODEA_sizeof());
+			if ((devmode.dmFields & OS.DM_ORIENTATION) != 0) {
+				int dmOrientation = devmode.dmOrientation;
+				data.orientation = dmOrientation == OS.DMORIENT_LANDSCAPE ? PrinterData.LANDSCAPE : PrinterData.PORTRAIT;
+			}
+			OS.GlobalUnlock(hMem);
+			printerData = data;
+		}
+	}
+	if (pd.hDevNames != 0) {
+		OS.GlobalFree(pd.hDevNames);
+		pd.hDevNames = 0;
+	}
+	if (pd.hDevMode != 0) {
+		OS.GlobalFree(pd.hDevMode);
+		pd.hDevMode = 0;
+	}
+	/* Destroy the BIDI orientation window */
+	if (hwndParent != hwndOwner) {
+		if (enabled) OS.EnableWindow (hwndParent, true);
+		OS.SetActiveWindow (hwndParent);
+		OS.DestroyWindow (hwndOwner);
 	}
 	return data;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java
index 223acc0..cf02a0e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,6 +47,8 @@ public final class Printer extends Device {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -268,6 +270,8 @@ protected void create(DeviceData deviceData) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC(GCData data) {
 	if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -298,6 +302,8 @@ public int /*long*/ internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int /*long*/ hDC, GCData data) {
 	if (data != null) isGCCreated = false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java
index 70854fc..72e4dde 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/PrintDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -110,6 +110,7 @@ static int checkStyle (Shell parent, int style) {
  * @since 3.4
  */
 public void setPrinterData(PrinterData data) {
+	if (data == null) data = new PrinterData();
 	this.printerData = data;
 }
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java
index 7723304..c3cf7f5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Printing/wpf/org/eclipse/swt/printing/Printer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -117,6 +117,8 @@ public Printer(PrinterData data) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC(GCData data) {
 	return 0;
@@ -134,6 +136,8 @@ public int internal_new_GC(GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC(int xGC, GCData data) {
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/carbon/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/carbon/org/eclipse/swt/program/Program.java
index ea05d52..477401e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/carbon/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/carbon/org/eclipse/swt/program/Program.java	
@@ -11,6 +11,7 @@
 package org.eclipse.swt.program;
 
 
+import org.eclipse.swt.internal.Compatibility;
 import org.eclipse.swt.internal.carbon.CFRange;
 import org.eclipse.swt.internal.carbon.LSApplicationParameters;
 import org.eclipse.swt.internal.carbon.OS;
@@ -18,6 +19,7 @@ import org.eclipse.swt.internal.cocoa.Cocoa;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 
+import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Hashtable;
 
@@ -86,199 +88,75 @@ public static Program findProgram (String extension) {
  * @return an array of extensions
  */
 public static String [] getExtensions () {
-	return new String [] {
-		// From System-Declared Uniform Type Identifiers
-		".txt",
-		".rtf",
-		".html",
-		".htm",
-		".xml",
-		".c",
-		".m",
-		".cp", ".cpp", ".c++", ".cc", ".cxx",
-		".mm",
-		".h",
-		".hpp",
-		".h++",
-		".hxx",
-		".java",
-		".jav",
-		".s",
-		".r",
-		".defs",
-		".mig",
-		".exp",
-		".js",
-		".jscript",
-		".javascript",
-		".sh",
-		".command",
-		".csh",
-		".pl",
-		".pm",
-		".py",
-		".rb",
-		".rbw",
-		".php",
-		".php3",
-		".php4",
-		".ph3",
-		".ph4",
-		".phtml",
-		".jnlp",
-		".applescript",
-		".scpt",
-		".o",
-		".exe",
-		".dll",
-		".class",
-		".jar",
-		".qtz",
-		".gtar",
-		".tar",
-		".gz",
-		".gzip",
-		".tgz",
-		".hqx",
-		".bin",
-		".vcf",
-		".vcard",
-		".jpg",
-		".jpeg",
-		".jp2",
-		".tif",
-		".tiff",
-		".pic",
-		".pct",
-		".pict",
-		".pntg",
-		".png",
-		".xbm",
-		".qif",
-		".qtif",
-		".icns",
-		".mov",
-		".qt",
-		".avi",
-		".vfw",
-		".mpg",
-		".mpeg",
-		".m75",
-		".m15",
-		".mp4",
-		".3gp",
-		".3gpp",
-		".3g2",
-		".3gp2",
-		".mp3",
-		".m4a",
-		".m4p",
-		".m4b",
-		".au",
-		".ulw",
-		".snd",
-		".aifc",
-		".aiff",
-		".aif",
-		".caf",
-		".bundle",
-		".app",
-		".plugin",
-		".mdimporter",
-		".wdgt",
-		".cpio",
-		".zip",
-		".framework",
-		".rtfd",
-		".dfont",
-		".otf",
-		".ttf",
-		".ttc",
-		".suit",
-		".pfb",
-		".pfa",
-		".icc",
-		".icm",
-		".pf",
-		".pdf",
-		".ps",
-		".eps",
-		".psd",
-		".ai",
-		".gif",
-		".bmp",
-		".ico",
-		".doc",
-		".xls",
-		".ppt",
-		".wav",
-		".wave",
-		".asf",
-		".wm",
-		".wmv",
-		".wmp",
-		".wma",
-		".asx",
-		".wmx",
-		".wvx",
-		".wax",
-		".key",
-		".kth",
-		".tga",
-		".sgi",
-		".exr",
-		".fpx",
-		".jfx",
-		".efx",
-		".sd2",
-		".rm",
-		".ram",
-		".ra",
-		".smil",
-		".sit",
-		".sitx",
-		// Others
-		".plist",
-		".nib",
-		".lproj",
-		// iChat
-		".iPhoto",
-		// iChat
-		".iChat",
-		".chat",
-		// acrobat reader
-		".rmf",
-		".xfdf",
-		".fdf",
-		// Chess
-		".game",
-		".pgn",
-		// iCal
-		".ics",
-		".vcs",
-		".aplmodel",
-		".icbu",
-		".icalevent",
-		".icaltodo",
-		// Mail
-		".mailhold",
-		".mbox",
-		".imapmbox",
-		".emlx",
-		".mailextract",
-		// Sherlock
-		".sherlock",
-		// Stickies
-		".tpl",
-		// System Preferences
-		".prefPane",
-		".sliderSaver",
-		".saver",
-		// Console
-		".log",
-		// Grapher
-		".gcx",
-	};
+	final String CFBundleDocumentTypesStr = "CFBundleDocumentTypes";
+	char [] chars = new char[CFBundleDocumentTypesStr.length()];
+	CFBundleDocumentTypesStr.getChars(0, chars.length, chars, 0);
+	int CFBundleDocumentTypes = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
+	
+	final String CFBundleTypeExtensionsStr = "CFBundleTypeExtensions";
+	chars = new char[CFBundleTypeExtensionsStr.length()];
+	CFBundleTypeExtensionsStr.getChars(0, chars.length, chars, 0);
+	int CFBundleTypeExtensions = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
+	
+	int folders = Cocoa.NSSearchPathForDirectoriesInDomains (Cocoa.NSAllApplicationsDirectory, Cocoa.NSAllDomainsMask, true);
+	int folderCount = OS.CFArrayGetCount(folders);
+	int supportedDocumentTypes = OS.CFSetCreateMutable(OS.kCFAllocatorDefault, 0, OS.kCFTypeSetCallBacks());	
+	for (int i = 0; i < folderCount; i++) {
+		int string = OS.CFArrayGetValueAtIndex(folders, i);
+		int folderUrl = OS.CFURLCreateWithFileSystemPath(OS.kCFAllocatorDefault, string, OS.kCFURLPOSIXPathStyle, true);
+		if (folderUrl != 0) {
+			int bundles = OS.CFBundleCreateBundlesFromDirectory(OS.kCFAllocatorDefault, folderUrl, 0);
+			if (bundles != 0) {
+				int bundleCount = OS.CFArrayGetCount(bundles);
+				for (int j = 0; j < bundleCount; j++) {
+					int bundleRef = OS.CFArrayGetValueAtIndex(bundles, j);
+					if (bundleRef == 0) continue;
+					int documentTypes = OS.CFBundleGetValueForInfoDictionaryKey(bundleRef, CFBundleDocumentTypes);
+					if (documentTypes != 0) {
+						int count = OS.CFArrayGetCount(documentTypes);
+						for (int k = 0; k < count; k++) {
+							int documentType = OS.CFArrayGetValueAtIndex(documentTypes, k);
+							if (documentType == 0) continue;
+							int[] value = new int[1];
+							if (OS.CFDictionaryGetValueIfPresent(documentType, CFBundleTypeExtensions, value)) {
+								if (value[0] != 0) {
+									int extCount = OS.CFArrayGetCount(value[0]);
+									for (int x = 0; x < extCount; x++) {
+										int ext = OS.CFArrayGetValueAtIndex(value[0], x);
+										OS.CFSetAddValue(supportedDocumentTypes, ext);
+									}
+								}
+							}
+						}
+					}
+				}
+				OS.CFRelease(bundles);
+			}
+			OS.CFRelease(folderUrl);
+		}
+	}
+	OS.CFRelease(CFBundleDocumentTypes);
+	OS.CFRelease(CFBundleTypeExtensions);
+	
+	int s = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, new char[]{'*'}, 1);
+	OS.CFSetRemoveValue(supportedDocumentTypes, s);
+	OS.CFRelease(s);
+	
+	int count = OS.CFSetGetCount(supportedDocumentTypes);
+	String[] extensions = new String[count];
+	int [] values = new int[count];
+	OS.CFSetGetValues(supportedDocumentTypes, values);
+	for (int i = 0; i < count; i++) {
+		int ext = values[i];
+		int length = OS.CFStringGetLength(ext);
+		char[] buffer = new char[length];
+		CFRange range = new CFRange();
+		range.length = length;
+		OS.CFStringGetCharacters(ext, range, buffer);
+		extensions[i] = "." + new String(buffer);
+	}
+	OS.CFRelease(supportedDocumentTypes);
+	return extensions;
 }
 
 /**
@@ -377,6 +255,52 @@ static int getURL(String fileName) {
 	return url;
 }
 
+static boolean isExecutable (String fileName) {
+	boolean result = false;
+	int str = createCFString(fileName);
+	if (str != 0) {
+		int fileManager = Cocoa.objc_msgSend(Cocoa.C_NSFileManager, Cocoa.S_defaultManager);
+		int ptr = OS.malloc (1);
+		if (ptr != 0) {
+			if (fileManager != 0 && Cocoa.objc_msgSend(fileManager, Cocoa.S_fileExistsAtPath_isDirectory, str, ptr) != 0) {
+				byte[] isDirectory = new byte[1];
+				OS.memmove(isDirectory, ptr, 1);
+				if (isDirectory[0] == 0 && Cocoa.objc_msgSend (fileManager, Cocoa.S_isExecutableFileAtPath, str) != 0) {
+					int url = OS.CFURLCreateWithFileSystemPath(OS.kCFAllocatorDefault, str, OS.kCFURLPOSIXPathStyle, false);
+					if (url != 0) {
+						byte[] fsRef = new byte[80];
+						if (OS.CFURLGetFSRef(url, fsRef)) {
+							int [] type = new int[1];
+							OS.LSCopyItemAttribute(fsRef, OS.kLSRolesAll, OS.kLSItemContentType(), type);
+							if (type[0] != 0) {
+								int exeUti = createCFString("public.unix-executable"); //$NON-NLS-1$
+								result = OS.UTTypeConformsTo(type[0], exeUti);
+								OS.CFRelease(exeUti);
+								if (!result) {
+									int scriptUti = createCFString("public.shell-script"); //$NON-NLS-1$
+									result = OS.UTTypeEqual(type[0], scriptUti);
+									OS.CFRelease(scriptUti);
+								}
+								OS.CFRelease(type[0]);
+							}
+						}
+						OS.CFRelease(url);
+					}
+				}
+			}
+			OS.free(ptr);
+		}
+		OS.CFRelease(str);
+	}
+	return result;
+}
+
+static int createCFString(String string) {
+	char [] buffer = new char[string.length()];
+	string.getChars(0, buffer.length, buffer, 0);
+	return OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer, buffer.length);
+}
+
 /**
  * Launches the operating system executable associated with the file or
  * URL (http:// or https://).  If the file is an executable then the
@@ -391,7 +315,38 @@ static int getURL(String fileName) {
  * </ul>
  */
 public static boolean launch (String fileName) {
+	return launch (fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+	if (workingDir != null && isExecutable(fileName)) {
+		try {
+			Compatibility.exec(new String[] {fileName}, null, workingDir);
+			return true;
+		} catch (IOException e) {
+			return false;
+		}
+	}
 	int rc = -1;
 	int url = getURL(fileName);
 	if (url != 0) {
@@ -430,7 +385,7 @@ public boolean execute (String fileName) {
 		} else {
 			int url = getURL(fileName);
 			if (url != 0) {
-				int urls = OS.CFArrayCreateMutable(OS.kCFAllocatorDefault, 1, 0);
+				int urls = OS.CFArrayCreateMutable(OS.kCFAllocatorDefault, 1, OS.kCFTypeArrayCallBacks ());
 				if (urls != 0) {
 					OS.CFArrayAppendValue(urls, url);
 					rc = OS.LSOpenURLsWithRole(urls, OS.kLSRolesAll, 0, params, null, 0);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
index 65d6b0a..df4ee14 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java	
@@ -11,12 +11,13 @@
 package org.eclipse.swt.program;
 
 
-import org.eclipse.swt.internal.C;
+import org.eclipse.swt.internal.Compatibility;
 import org.eclipse.swt.internal.cocoa.*;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 
+import java.io.IOException;
 import java.util.Vector;
 
 /**
@@ -53,63 +54,33 @@ Program () {
  *	</ul>
  */
 public static Program findProgram (String extension) {
-	if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-	if (extension.length () == 0) return null;
-	if (extension.charAt(0) != '.') extension = "." + extension;
 	NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
 	try {
-		NSWorkspace workspace = NSWorkspace.sharedWorkspace();
-		int /*long*/ appName = OS.malloc(C.PTR_SIZEOF);
-		int /*long*/ type = OS.malloc(C.PTR_SIZEOF);
-		NSString temp = new NSString(OS.NSTemporaryDirectory());
-		NSString fileName = NSString.stringWith("swt" + System.currentTimeMillis() + extension);
-		NSString fullPath = temp.stringByAppendingPathComponent(fileName);
-		NSFileManager fileManager = NSFileManager.defaultManager();
-		fileManager.createFileAtPath(fullPath, null, null);
-		if (!workspace.getInfoForFile(fullPath, appName, type)) return null;
-		fileManager.removeItemAtPath(fullPath, 0);
-		int /*long*/ [] buffer = new int /*long*/[1];
-		int /*long*/ [] buffer2 = new int /*long*/[1];
-		OS.memmove(buffer, appName, C.PTR_SIZEOF);
-		OS.memmove(buffer2, type, C.PTR_SIZEOF);
-		OS.free(appName);
-		OS.free(type);
-		if (buffer [0] != 0) {
-			NSString appPath = new NSString(buffer[0]);
-			NSString appType = new NSString(buffer2[0]);
-			NSBundle bundle = NSBundle.bundleWithPath(appPath);
-			if (bundle != null) {
-				NSString textEditId = NSString.stringWith("com.apple.TextEdit");
-				NSString bundleId = NSString.stringWith("CFBundleIdentifier");
-				NSDictionary infoDictionary = bundle.infoDictionary();
-				boolean textEdit = textEditId.isEqual(infoDictionary.objectForKey(bundleId));
-				if (!textEdit) return getProgram(bundle);
-				// if text edit, make sure we're really one of the extensions that
-				// text edit says it can handle.
-				NSString CFBundleDocumentTypes = NSString.stringWith("CFBundleDocumentTypes");
-				NSString CFBundleTypeExtensions = NSString.stringWith("CFBundleTypeExtensions");
-				id id = infoDictionary.objectForKey(CFBundleDocumentTypes);
-				if (id != null) {
-					NSDictionary documentTypes = new NSDictionary(id.id);
-					NSEnumerator documentTypesEnumerator = documentTypes.objectEnumerator();
-					while ((id = documentTypesEnumerator.nextObject()) != null) {
-						NSDictionary documentType = new NSDictionary(id.id);
-						NSDictionary supportedExtensions = new NSDictionary(documentType.objectForKey(CFBundleTypeExtensions));
-						if (supportedExtensions != null) {
-							NSEnumerator supportedExtensionsEnumerator = supportedExtensions.objectEnumerator();
-							if (supportedExtensionsEnumerator != null) {
-								id ext = null;
-								while((ext = supportedExtensionsEnumerator.nextObject()) != null) {
-									NSString strExt = new NSString(ext);
-									if (appType.isEqual(strExt)) return getProgram (bundle);
-								}
-							}
-						}
-					}
+		if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		if (extension.length () == 0) return null;
+		Program program = null;
+		char[] chars;
+		if (extension.charAt (0) != '.') {
+			chars = new char[extension.length()];
+			extension.getChars(0, chars.length, chars, 0);
+		} else {
+			chars = new char[extension.length() - 1];
+			extension.getChars(1, extension.length(), chars, 0);		
+		}
+		NSString ext = NSString.stringWithCharacters(chars, chars.length);
+		if (ext != null) {
+			byte[] fsRef = new byte[80];
+			if (OS.LSGetApplicationForInfo(OS.kLSUnknownType, OS.kLSUnknownCreator, ext.id, OS.kLSRolesAll, fsRef, null) == OS.noErr) {
+				int /*long*/ url = OS.CFURLCreateFromFSRef(OS.kCFAllocatorDefault(), fsRef);
+				if (url != 0) {
+					NSString bundlePath = new NSURL(url).path();
+					NSBundle bundle = NSBundle.bundleWithPath(bundlePath);
+					if (bundle != null) program = getProgram(bundle);
+					OS.CFRelease(url);
 				}
 			}
 		}
-		return null;
+		return program;
 	} finally {
 		pool.release();
 	}
@@ -143,7 +114,7 @@ public static String [] getExtensions () {
 					NSString fullPath = path.stringByAppendingPathComponent(filePath);
 					if (workspace.isFilePackageAtPath(fullPath)) {
 						NSBundle bundle = NSBundle.bundleWithPath(fullPath);
-						id = bundle.infoDictionary().objectForKey(CFBundleDocumentTypes);
+						id = bundle != null ? bundle.infoDictionary().objectForKey(CFBundleDocumentTypes) : null;
 						if (id != null) {
 							NSDictionary documentTypes = new NSDictionary(id.id);
 							NSEnumerator documentTypesEnumerator = documentTypes.objectEnumerator();
@@ -255,6 +226,25 @@ static NSURL getURL (String fileName) {
 	return url;
 }
 
+static boolean isExecutable (String fileName) {
+	int /*long*/ ptr = OS.malloc(1);
+	NSString path = NSString.stringWith(fileName);
+	boolean result = false;
+	NSFileManager manager = NSFileManager.defaultManager();
+	if (manager.fileExistsAtPath(path, ptr)) {
+		byte[] isDirectory = new byte[1];
+		OS.memmove(isDirectory, ptr, 1);
+		if (isDirectory[0] == 0 && manager.isExecutableFileAtPath(path)) {
+			NSWorkspace ws = NSWorkspace.sharedWorkspace();
+			NSString type = ws.typeOfFile(path, 0);
+			result = type != null && (ws.type(type, NSString.stringWith("public.unix-executable")) || //$NON-NLS-1$
+					OS.UTTypeEqual(type.id, NSString.stringWith("public.shell-script").id)); //$NON-NLS-1$
+		}
+	}
+	OS.free(ptr);
+	return result;
+}
+
 /**
  * Launches the operating system executable associated with the file or
  * URL (http:// or https://).  If the file is an executable then the
@@ -269,9 +259,40 @@ static NSURL getURL (String fileName) {
  * </ul>
  */
 public static boolean launch (String fileName) {
+	return launch (fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
 	try {
+		if (workingDir != null && isExecutable(fileName)) {
+			try {
+				Compatibility.exec(new String[] {fileName}, null, workingDir);
+				return true;
+			} catch (IOException e) {
+				return false;
+			}
+		}
 		NSURL url = getURL(fileName);
 		NSWorkspace workspace = NSWorkspace.sharedWorkspace();
 		return workspace.openURL(url);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/emulated/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/emulated/org/eclipse/swt/program/Program.java
index 355f215..77cf60c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/emulated/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/emulated/org/eclipse/swt/program/Program.java	
@@ -89,6 +89,29 @@ public static Program [] getPrograms () {
  * </ul>
  */
 public static boolean launch (String fileName) {
+	return launch (fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	return false;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.c
index c74ea71..4160de1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -141,6 +141,18 @@ JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1icon_1theme_1new)
 }
 #endif
 
+#ifndef NO__1gnome_1vfs_1get_1mime_1type
+JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1get_1mime_1type)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1get_1mime_1type_FUNC);
+	rc = (jintLong)gnome_vfs_get_mime_type((const char *)arg0);
+	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1get_1mime_1type_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gnome_1vfs_1get_1registered_1mime_1types
 JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1get_1registered_1mime_1types)
 	(JNIEnv *env, jclass that)
@@ -165,6 +177,22 @@ JNIEXPORT jboolean JNICALL GNOME_NATIVE(_1gnome_1vfs_1init)
 }
 #endif
 
+#ifndef NO__1gnome_1vfs_1is_1executable_1command_1string
+JNIEXPORT jboolean JNICALL GNOME_NATIVE(_1gnome_1vfs_1is_1executable_1command_1string)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jboolean rc = 0;
+	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1is_1executable_1command_1string_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jboolean)gnome_vfs_is_executable_command_string((const char *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1is_1executable_1command_1string_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gnome_1vfs_1make_1uri_1from_1input
 JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1make_1uri_1from_1input)
 	(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -299,6 +327,22 @@ fail:
 }
 #endif
 
+#ifndef NO__1gnome_1vfs_1mime_1type_1get_1equivalence
+JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1type_1get_1equivalence)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	jintLong rc = 0;
+	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1mime_1type_1get_1equivalence_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jintLong)gnome_vfs_mime_type_get_equivalence((const char *)arg0, (const char *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1mime_1type_1get_1equivalence_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gnome_1vfs_1url_1show
 JNIEXPORT jint JNICALL GNOME_NATIVE(_1gnome_1vfs_1url_1show)
 	(JNIEnv *env, jclass that, jintLong arg0)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.h
index 6caca74..4cebd6d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome.h	
@@ -28,8 +28,16 @@
 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
 #include <libgnomevfs/gnome-vfs-mime-info.h>
 
-#define gnome_vfs_url_show_LIB "libgnomevfs-2.so.0"
-#define gnome_vfs_make_uri_from_input_with_dirs_LIB "libgnomevfs-2.so.0"
-#define gnome_vfs_mime_application_launch_LIB "libgnomevfs-2.so.0"
+#ifdef AIX
+#define LIB_VFS "libgnomevfs-2.a(libgnomevfs-2.so.0)"
+#elif HPUX
+#define LIB_VFS "libgnomevfs-2.so"
+#else
+#define LIB_VFS "libgnomevfs-2.so.0"
+#endif
+
+#define gnome_vfs_url_show_LIB LIB_VFS
+#define gnome_vfs_make_uri_from_input_with_dirs_LIB LIB_VFS
+#define gnome_vfs_mime_application_launch_LIB LIB_VFS
 
 #endif
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.c
index e541d8e..27d6a54 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,8 +18,8 @@
 
 #ifdef NATIVE_STATS
 
-int GNOME_nativeFunctionCount = 22;
-int GNOME_nativeFunctionCallCount[22];
+int GNOME_nativeFunctionCount = 25;
+int GNOME_nativeFunctionCallCount[25];
 char * GNOME_nativeFunctionNames[] = {
 	"GnomeVFSMimeApplication_1sizeof",
 	"_1g_1free",
@@ -30,8 +30,10 @@ char * GNOME_nativeFunctionNames[] = {
 	"_1gnome_1icon_1lookup",
 	"_1gnome_1icon_1theme_1lookup_1icon",
 	"_1gnome_1icon_1theme_1new",
+	"_1gnome_1vfs_1get_1mime_1type",
 	"_1gnome_1vfs_1get_1registered_1mime_1types",
 	"_1gnome_1vfs_1init",
+	"_1gnome_1vfs_1is_1executable_1command_1string",
 	"_1gnome_1vfs_1make_1uri_1from_1input",
 	"_1gnome_1vfs_1make_1uri_1from_1input_1with_1dirs",
 	"_1gnome_1vfs_1mime_1application_1free",
@@ -41,6 +43,7 @@ char * GNOME_nativeFunctionNames[] = {
 	"_1gnome_1vfs_1mime_1get_1extensions_1list",
 	"_1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free",
 	"_1gnome_1vfs_1mime_1type_1from_1name",
+	"_1gnome_1vfs_1mime_1type_1get_1equivalence",
 	"_1gnome_1vfs_1url_1show",
 	"memmove",
 };
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.h
index 8aea1d9..eea5ffe 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/library/gnome_stats.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -38,8 +38,10 @@ typedef enum {
 	_1gnome_1icon_1lookup_FUNC,
 	_1gnome_1icon_1theme_1lookup_1icon_FUNC,
 	_1gnome_1icon_1theme_1new_FUNC,
+	_1gnome_1vfs_1get_1mime_1type_FUNC,
 	_1gnome_1vfs_1get_1registered_1mime_1types_FUNC,
 	_1gnome_1vfs_1init_FUNC,
+	_1gnome_1vfs_1is_1executable_1command_1string_FUNC,
 	_1gnome_1vfs_1make_1uri_1from_1input_FUNC,
 	_1gnome_1vfs_1make_1uri_1from_1input_1with_1dirs_FUNC,
 	_1gnome_1vfs_1mime_1application_1free_FUNC,
@@ -49,6 +51,7 @@ typedef enum {
 	_1gnome_1vfs_1mime_1get_1extensions_1list_FUNC,
 	_1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free_FUNC,
 	_1gnome_1vfs_1mime_1type_1from_1name_FUNC,
+	_1gnome_1vfs_1mime_1type_1get_1equivalence_FUNC,
 	_1gnome_1vfs_1url_1show_FUNC,
 	memmove_FUNC,
 } GNOME_FUNCS;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/org/eclipse/swt/internal/gnome/GNOME.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/org/eclipse/swt/internal/gnome/GNOME.java
index 9802b71..30f539d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/org/eclipse/swt/internal/gnome/GNOME.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gnome/org/eclipse/swt/internal/gnome/GNOME.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -25,6 +25,9 @@ public static final int GNOME_FILE_DOMAIN_PIXMAP = 4;
 public static final int GNOME_ICON_LOOKUP_FLAGS_NONE = 0;
 public static final int GNOME_PARAM_NONE = 0;
 public static final int GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS = 0;
+public static final int GNOME_VFS_MIME_IDENTICAL = 1;
+public static final int GNOME_VFS_MIME_PARENT = 2;
+public static final int GNOME_VFS_MIME_UNRELATED = 0;
 public static final int GNOME_VFS_OK = 0;
 public static final int GNOME_VFS_MAKE_URI_DIR_NONE = 0;
 public static final int GNOME_VFS_MAKE_URI_DIR_HOMEDIR = 1<<0;
@@ -138,6 +141,17 @@ public static final int /*long*/ gnome_vfs_get_registered_mime_types() {
 		lock.unlock();
 	}
 }
+/** @param uri cast=(const char *) */
+public static final native int /*long*/ _gnome_vfs_get_mime_type(int /*long*/ uri);
+public static final int /*long*/ gnome_vfs_get_mime_type(int /*long*/ uri) {
+	lock.lock();
+	try {
+		return _gnome_vfs_get_mime_type(uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
 public static final native boolean _gnome_vfs_init();
 public static final boolean gnome_vfs_init() {
 	lock.lock();
@@ -180,6 +194,16 @@ public static final void gnome_vfs_mime_application_free(int /*long*/ applicatio
 		lock.unlock();
 	}
 }
+/** @param command_string cast=(const char *) */
+public static final native boolean _gnome_vfs_is_executable_command_string(byte[] command_string);
+public static final boolean gnome_vfs_is_executable_command_string(byte[] command_string) {
+	lock.lock();
+	try {
+		return _gnome_vfs_is_executable_command_string(command_string);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @method flags=dynamic
  * @param application cast=(GnomeVFSMimeApplication *)
@@ -244,6 +268,19 @@ public static final int /*long*/ gnome_vfs_mime_type_from_name(byte[] file) {
 		lock.unlock();
 	}
 }
+/** 
+ * @param mime_type cast=(const char *)
+ * @param base_mime_type cast=(const char *) 
+ */
+public static final native int /*long*/ _gnome_vfs_mime_type_get_equivalence(int /*long*/ mime_type, byte [] base_mime_type);
+public static final int /*long*/ gnome_vfs_mime_type_get_equivalence(int /*long*/ mime_type, byte [] base_mime_type) {
+	lock.lock();
+	try {
+		return _gnome_vfs_mime_type_get_equivalence(mime_type, base_mime_type);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @method flags=dynamic
  * @param url cast=(const char *)
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index 57456d5..9d4d4fe 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java	
@@ -36,12 +36,15 @@ public final class Program {
 	String iconPath;
 	Display display;
 
-	/* Gnome specific
+	/* Gnome & GIO specific
 	 * true if command expects a URI
 	 * false if expects a path
 	 */
 	boolean gnomeExpectUri;
 	
+	static int /*long*/ modTime;
+	static Hashtable mimeTable;
+	
 	static int /*long*/ cdeShell;
 
 	static final String[] CDE_ICON_EXT = { ".m.pm",   ".l.pm",   ".s.pm",   ".t.pm" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -53,7 +56,8 @@ public final class Program {
 	static final int DESKTOP_UNKNOWN = 0;
 	static final int DESKTOP_GNOME = 1;
 	static final int DESKTOP_GNOME_24 = 2;
-	static final int DESKTOP_CDE = 3;
+	static final int DESKTOP_GIO = 3;
+	static final int DESKTOP_CDE = 4;
 	static final int PREFERRED_ICON_SIZE = 16;
 	
 /**
@@ -107,19 +111,40 @@ static int getDesktop(final Display display) {
 					 * Note.  gnome_icon_theme_new uses g_object_new to allocate the
 					 * data it returns. Use g_object_unref to free the pointer it returns.
 					 */
-					if (gnomeIconTheme.value != 0) GNOME.g_object_unref(gnomeIconTheme.value);
+					if (gnomeIconTheme.value != 0) OS.g_object_unref(gnomeIconTheme.value);
 				}
 			});
-			/* Check for libgnomevfs-2 version 2.4 */
-			byte[] buffer = Converter.wcsToMbcs(null, "libgnomevfs-2.so.0", true);
-			int /*long*/ libgnomevfs = OS.dlopen(buffer, OS.RTLD_LAZY);
-			if (libgnomevfs != 0) {
-				buffer = Converter.wcsToMbcs(null, "gnome_vfs_url_show", true);
-				int /*long*/ gnome_vfs_url_show = OS.dlsym(libgnomevfs, buffer);
-				if (gnome_vfs_url_show != 0) {
-					desktop = DESKTOP_GNOME_24;
+			/* Check for the existence of libgio libraries */
+			byte[] buffer ;
+			int flags = OS.RTLD_LAZY;
+			if (OS.IsAIX) {
+				 buffer = Converter.wcsToMbcs(null, "libgio-2.0.a(libgio-2.0.so.0)", true);
+				 flags |= OS.RTLD_MEMBER;
+			} else  if (OS.IsHPUX) {
+				 buffer = Converter.wcsToMbcs(null, "libgio-2.0.so", true);
+			} else {
+				buffer =  Converter.wcsToMbcs(null, "libgio-2.0.so.0", true);
+			}
+			int /*long*/ libgio = OS.dlopen(buffer, flags);
+			if (libgio != 0) {
+				buffer = Converter.wcsToMbcs(null, "g_app_info_launch_default_for_uri", true);
+				int /*long*/ g_app_info_launch_default_for_uri = OS.dlsym(libgio, buffer);
+				if (g_app_info_launch_default_for_uri != 0) {
+					desktop = DESKTOP_GIO;
+				}
+				OS.dlclose(libgio);
+			} else {
+				/* Check for libgnomevfs-2 version 2.4 */
+				buffer = Converter.wcsToMbcs(null, "libgnomevfs-2.so.0", true);
+				int /*long*/ libgnomevfs = OS.dlopen(buffer, OS.RTLD_LAZY);
+				if (libgnomevfs != 0) {
+					buffer = Converter.wcsToMbcs(null, "gnome_vfs_url_show", true);
+					int /*long*/ gnome_vfs_url_show = OS.dlsym(libgnomevfs, buffer);
+					if (gnome_vfs_url_show != 0) {
+						desktop = DESKTOP_GNOME_24;
+					}
+					OS.dlclose(libgnomevfs);
 				}
-				OS.dlclose(libgnomevfs);
 			}
 		}
 	}
@@ -293,6 +318,12 @@ static boolean cde_init(Display display) {
 	return initOK;
 }
 
+static boolean cde_isExecutable(String fileName) {
+	byte [] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
+	return OS.access(fileNameBuffer, OS.X_OK) == 0;
+	//TODO find the content type of the file and check if it is executable
+}
+
 static String[] parseCommand(String cmd) {
 	Vector args = new Vector();
 	int sIndex = 0;
@@ -534,6 +565,25 @@ static boolean gnome_init() {
 	}
 }
 
+static boolean gnome_isExecutable(String fileName) {
+	/* check if the file is executable */
+	byte [] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
+	if (!GNOME.gnome_vfs_is_executable_command_string(fileNameBuffer)) return false;
+	
+	/* check if the mime type is executable */
+	int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input(fileNameBuffer);
+	int /*long*/ mimeType = GNOME.gnome_vfs_get_mime_type(uri);
+	GNOME.g_free(uri);
+	
+	byte[] exeType = Converter.wcsToMbcs (null, "application/x-executable", true); //$NON-NLS-1$
+	boolean result = GNOME.gnome_vfs_mime_type_get_equivalence(mimeType, exeType) != GNOME.GNOME_VFS_MIME_UNRELATED;
+	if (!result) {
+		byte [] shellType = Converter.wcsToMbcs (null, "application/x-shellscript", true); //$NON-NLS-1$
+		result = GNOME.gnome_vfs_mime_type_get_equivalence(mimeType, shellType) == GNOME.GNOME_VFS_MIME_IDENTICAL;
+	}
+	return result;
+}
+
 /**
  * Finds the program that is associated with an extension.
  * The extension may or may not begin with a '.'.  Note that
@@ -562,6 +612,7 @@ static Program findProgram(Display display, String extension) {
 	int desktop = getDesktop(display);
 	String mimeType = null;
 	switch (desktop) {
+		case DESKTOP_GIO: mimeType = gio_getMimeType(extension); break;
 		case DESKTOP_GNOME_24:
 		case DESKTOP_GNOME: mimeType = gnome_getMimeType(extension); break;
 		case DESKTOP_CDE: mimeType = cde_getMimeType(extension); break;
@@ -569,7 +620,8 @@ static Program findProgram(Display display, String extension) {
 	if (mimeType == null) return null;
 	Program program = null;
 	switch (desktop) {
-		case DESKTOP_GNOME_24:
+		case DESKTOP_GIO: program = gio_getProgram(display, mimeType); break;
+		case DESKTOP_GNOME_24: 
 		case DESKTOP_GNOME: program = gnome_getProgram(display, mimeType); break;
 		case DESKTOP_CDE: program = cde_getProgram(display, mimeType); break;
 	}
@@ -595,6 +647,7 @@ static String[] getExtensions(Display display) {
 	int desktop = getDesktop(display);
 	Hashtable mimeInfo = null;
 	switch (desktop) {
+		case DESKTOP_GIO: return gio_getExtensions();
 		case DESKTOP_GNOME_24: break;
 		case DESKTOP_GNOME: mimeInfo = gnome_getMimeInfo(); break;
 		case DESKTOP_CDE: mimeInfo = cde_getDataTypeInfo(); break;
@@ -641,6 +694,7 @@ static Program[] getPrograms(Display display) {
 	int desktop = getDesktop(display);
 	Hashtable mimeInfo = null;
 	switch (desktop) {
+		case DESKTOP_GIO: return gio_getPrograms(display);
 		case DESKTOP_GNOME_24: break;
 		case DESKTOP_GNOME: mimeInfo = gnome_getMimeInfo(); break;
 		case DESKTOP_CDE: mimeInfo = cde_getDataTypeInfo(); break;
@@ -664,6 +718,306 @@ static Program[] getPrograms(Display display) {
 	return programList;
 }
 
+ImageData gio_getImageData() {
+	if (iconPath == null) return null;
+	ImageData data = null;
+	int /*long*/ icon_theme =OS.gtk_icon_theme_get_default();
+	byte[] icon = Converter.wcsToMbcs (null, iconPath, true);
+	int /*long*/ gicon = OS.g_icon_new_for_string(icon, null);
+	if (gicon != 0) {
+		int /*long*/ gicon_info = OS.gtk_icon_theme_lookup_by_gicon (icon_theme, gicon, 16/*size*/, 0);
+		if (gicon_info != 0) {
+			int /*long*/ pixbuf = OS.gtk_icon_info_load_icon(gicon_info, null);		
+			if (pixbuf != 0) {
+				int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
+				int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
+				int height = OS.gdk_pixbuf_get_height(pixbuf);
+				int width = OS.gdk_pixbuf_get_width(pixbuf);
+				boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha(pixbuf);
+				byte[] srcData = new byte[stride * height];
+				OS.memmove(srcData, pixels, srcData.length);
+				OS.g_object_unref(pixbuf);
+				if (hasAlpha) {
+					PaletteData palette = new PaletteData(0xFF000000, 0xFF0000, 0xFF00);
+					data = new ImageData(width, height, 32, palette, 4, srcData);
+					data.bytesPerLine = stride;
+					int s = 3, a = 0;
+					byte[] alphaData = new byte[width*height];
+					for (int y=0; y<height; y++) {
+						for (int x=0; x<width; x++) {
+							alphaData[a++] = srcData[s];
+							srcData[s] = 0;
+							s+=4;
+						}
+					}
+					data.alphaData = alphaData;
+				} else {
+					PaletteData palette = new PaletteData(0xFF0000, 0xFF00, 0xFF);
+					data = new ImageData(width, height, 24, palette, 4, srcData);
+					data.bytesPerLine = stride;
+				}
+			}
+			OS.gtk_icon_info_free(gicon_info);
+		}
+		OS.g_object_unref(gicon);
+	}
+	return data;
+}
+
+static Hashtable gio_getMimeInfo() {
+	int /*long*/ mimeDatabase = 0, fileInfo = 0;
+	/*
+	* The file 'globs' contain the file extensions  
+	* associated to the mime-types. Each line that has 
+	* to be parsed corresponds to a different extension 
+	* of a mime-type. The template of such line is -
+	* application/pdf:*.pdf
+	*/
+	byte[] buffer = Converter.wcsToMbcs (null, "/usr/share/mime/globs", true);
+	mimeDatabase = OS.g_file_new_for_path (buffer);
+	int /*long*/ fileInputStream = OS.g_file_read (mimeDatabase, 0, 0);
+	try {
+		if (fileInputStream != 0) {
+			int /*long*/ [] modTimestamp = new int /*long*/ [2];
+			buffer = Converter.wcsToMbcs (null, "*", true);
+			fileInfo = OS.g_file_query_info(mimeDatabase, buffer, 0, 0, 0);
+			OS.g_file_info_get_modification_time(fileInfo, modTimestamp);
+			if (modTime != 0 && modTimestamp[0] == modTime) {
+				return mimeTable;
+			} else {
+				mimeTable = new Hashtable();
+				modTime = modTimestamp[0];
+				int /*long*/ reader = OS.g_data_input_stream_new (fileInputStream);
+				int[] length = new int[1];
+				
+				if (reader != 0) {
+					int /*long*/ linePtr = OS.g_data_input_stream_read_line (reader, length, 0, 0);
+					while (linePtr != 0) {
+						byte[] lineBytes = new byte[length[0]];
+						OS.memmove(lineBytes, linePtr, length[0]);
+						String line = new String (Converter.mbcsToWcs (null, lineBytes));
+			
+						int separatorIndex = line.indexOf (':');
+						if (separatorIndex > 0) {
+							Vector mimeTypes = new Vector ();
+						    String mimeType = line.substring (0, separatorIndex);
+							String extensionFormat = line.substring (separatorIndex+1);
+							int extensionIndex = extensionFormat.indexOf (".");
+							if (extensionIndex > 0) {
+								String extension = extensionFormat.substring (extensionIndex);
+								mimeTypes.add (mimeType);
+								if (mimeTable.containsKey (extension)) {
+									/*
+									 * If mimeType already exists, it is required to update
+									 * the existing key (mime-type) with the new extension. 
+									 */
+									Vector value = (Vector) mimeTable.get (extension);
+									mimeTypes.addAll (value);
+								}
+								mimeTable.put (extension, mimeTypes);
+							}
+						}
+						OS.g_free(linePtr);
+						linePtr = OS.g_data_input_stream_read_line (reader, length, 0, 0);
+					}
+				}
+				if (reader != 0) OS.g_object_unref (reader);
+				return mimeTable;
+			}
+		} 
+		return null;
+	} finally {
+		if (fileInfo != 0) OS.g_object_unref(fileInfo);
+		if (fileInputStream != 0) OS.g_object_unref(fileInputStream);
+		if (mimeDatabase != 0) 	OS.g_object_unref (mimeDatabase);
+	}
+}
+
+static String gio_getMimeType(String extension) {
+	String mimeType = null;
+	Hashtable h = gio_getMimeInfo();
+	if (h != null && h.containsKey(extension)) {
+		Vector mimeTypes = (Vector) h.get(extension);
+		mimeType = (String) mimeTypes.get(0);
+	}
+	return mimeType;
+}
+
+static Program gio_getProgram(Display display, String mimeType) {
+	Program program = null;
+	byte[] mimeTypeBuffer = Converter.wcsToMbcs (null, mimeType, true);
+	int /*long*/ application = OS.g_app_info_get_default_for_type (mimeTypeBuffer, false);
+	if (application != 0) {
+		program = gio_getProgram(display, application);
+	}
+	return program;
+}
+
+static Program gio_getProgram (Display display, int /*long*/ application) {
+	Program program = new Program();
+	program.display = display;
+	int length;
+	byte[] buffer;
+	int /*long*/ applicationName = OS.g_app_info_get_name (application);
+	if (applicationName != 0) {
+		length = OS.strlen (applicationName);
+		if (length > 0) {
+			buffer = new byte [length];
+			OS.memmove (buffer, applicationName, length);
+			program.name = new String (Converter.mbcsToWcs (null, buffer));
+		}
+	}
+	int /*long*/ applicationCommand = OS.g_app_info_get_executable (application);
+	if (applicationCommand != 0) {
+		length = OS.strlen (applicationCommand);
+		if (length > 0) {
+			buffer = new byte [length];
+			OS.memmove (buffer, applicationCommand, length);
+			program.command = new String (Converter.mbcsToWcs (null, buffer));
+		}
+	}
+	program.gnomeExpectUri = OS.g_app_info_supports_uris(application);
+	int /*long*/ icon = OS.g_app_info_get_icon(application);
+	if (icon != 0) {
+		int /*long*/ icon_name = OS.g_icon_to_string(icon);
+		if (icon_name != 0) {
+			length = OS.strlen(icon_name);
+			if (length > 0) {
+				buffer = new byte[length];
+				OS.memmove(buffer, icon_name, length);
+				program.iconPath = new String(Converter.mbcsToWcs(null, buffer));
+			}
+			OS.g_free(icon_name);
+		}
+		OS.g_object_unref(icon);
+	}
+	return program;
+}
+
+static Program[] gio_getPrograms(Display display) {
+	int /*long*/ applicationList = OS.g_app_info_get_all ();
+	int /*long*/ list = applicationList;
+	Program program;
+	Vector programs = new Vector();
+	while (list != 0) {
+		int /*long*/ application = OS.g_list_data(list);
+		if (application != 0) {
+			//TODO: Should the list be filtered or not?
+//			if (OS.g_app_info_should_show(application)) {
+				program = gio_getProgram(display, application);
+				if (program != null) programs.addElement(program);
+//			}
+		}
+		list = OS.g_list_next(list);
+	}
+	if (applicationList != 0) OS.g_list_free(applicationList);
+	Program[] programList = new Program[programs.size()];
+	for (int index = 0; index < programList.length; index++) {
+		programList[index] = (Program)programs.elementAt(index);
+	}
+	return programList;
+}
+
+static boolean gio_isExecutable(String fileName) {
+	byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true);
+	if (OS.g_file_test(fileNameBuffer, OS.G_FILE_TEST_IS_DIR)) return false;
+	if (!OS.g_file_test(fileNameBuffer, OS.G_FILE_TEST_IS_EXECUTABLE)) return false;
+	int /*long*/ file = OS.g_file_new_for_path (fileNameBuffer);
+	boolean result = false;
+	if (file != 0) {
+		byte[] buffer = Converter.wcsToMbcs (null, "*", true); //$NON-NLS-1$
+		int /*long*/ fileInfo = OS.g_file_query_info(file, buffer, 0, 0, 0);
+		if (fileInfo != 0) {
+			int /*long*/ contentType = OS.g_file_info_get_content_type(fileInfo);
+			if (contentType != 0) {
+				byte[] exeType = Converter.wcsToMbcs (null, "application/x-executable", true); //$NON-NLS-1$
+				result = OS.g_content_type_is_a(contentType, exeType);
+				if (!result) {
+					byte [] shellType = Converter.wcsToMbcs (null, "application/x-shellscript", true); //$NON-NLS-1$
+					result = OS.g_content_type_equals(contentType, shellType);
+				}
+			}
+			OS.g_object_unref(fileInfo);
+		}
+		OS.g_object_unref (file);
+	}
+	return result;
+}
+
+/**
+ * GNOME 2.4 - Launch the default program for the given file. 
+ */
+static boolean gio_launch(String fileName) {
+	boolean result = false;
+	byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true);
+	int /*long*/ file = OS.g_file_new_for_path (fileNameBuffer);
+	if (file != 0) {
+		int /*long*/ uri = OS.g_file_get_uri (file);
+		if (uri != 0) {
+			result = OS.g_app_info_launch_default_for_uri (uri, 0, 0);
+			OS.g_free(uri);
+		}
+		OS.g_object_unref (file);
+	}
+	return result;
+}
+
+/**
+ * GIO - Execute the program for the given file. 
+ */
+boolean gio_execute(String fileName) {
+	boolean result = false;
+	byte[] commandBuffer = Converter.wcsToMbcs (null, command, true);
+	byte[] nameBuffer = Converter.wcsToMbcs (null, name, true);
+	int /*long*/ application = OS.g_app_info_create_from_commandline(commandBuffer, nameBuffer, gnomeExpectUri
+				? OS.G_APP_INFO_CREATE_SUPPORTS_URIS : OS.G_APP_INFO_CREATE_NONE, 0);
+	if (application != 0) {
+		byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true);
+		int /*long*/ file = 0;
+		if (OS.g_app_info_supports_uris (application)) {
+			file = OS.g_file_new_for_uri (fileNameBuffer);
+		} else {
+			file = OS.g_file_new_for_path (fileNameBuffer);
+		}
+		if (file != 0) {
+			int /*long*/ list = OS.g_list_append (0, file);
+			result = OS.g_app_info_launch (application, list, 0, 0);
+			OS.g_list_free (list);
+			OS.g_object_unref (file);
+		}
+		OS.g_object_unref (application);
+	}
+	return result;
+}
+
+static String[] gio_getExtensions() {
+	Hashtable mimeInfo = gio_getMimeInfo();
+	if (mimeInfo == null) return new String[0];
+	/* Create a unique set of the file extensions. */
+	Vector extensions = new Vector();
+	Enumeration keys = mimeInfo.keys();
+	while (keys.hasMoreElements()) {
+		String extension = (String)keys.nextElement();
+		extensions.add(extension);
+	}
+	/* Return the list of extensions. */
+	String [] extStrings = new String[extensions.size()];
+	for (int index = 0; index < extensions.size(); index++) {
+		extStrings[index] = (String)extensions.elementAt(index);
+	}	
+	return extStrings;
+}
+
+static boolean isExecutable(Display display, String fileName) {
+	switch(getDesktop(display)) {
+		case DESKTOP_GIO: return gio_isExecutable(fileName);
+		case DESKTOP_GNOME_24:
+		case DESKTOP_GNOME: return gnome_isExecutable(fileName);
+		case DESKTOP_CDE: return false; //cde_isExecutable()
+	}
+	return false;
+}
+
 /**
  * Launches the operating system executable associated with the file or
  * URL (http:// or https://).  If the file is an executable then the
@@ -678,16 +1032,49 @@ static Program[] getPrograms(Display display) {
  * </ul>
  */
 public static boolean launch(String fileName) {
-	return launch(Display.getCurrent(), fileName);
+	return launch(Display.getCurrent(), fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
+	return launch(Display.getCurrent(), fileName, workingDir);
 }
 
 /*
  *  API: When support for multiple displays is added, this method will
  *       become public and the original method above can be deprecated.
  */
-static boolean launch (Display display, String fileName) {
+static boolean launch (Display display, String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+	if (workingDir != null && isExecutable(display, fileName)) {
+		try {
+			Compatibility.exec (new String [] {fileName}, null, workingDir);
+			return true;
+		} catch (IOException e) {
+			return false;
+		}
+	}
 	switch (getDesktop (display)) {
+		case DESKTOP_GIO:
+			if (gio_launch (fileName)) return true;
 		case DESKTOP_GNOME_24:
 			if (gnome_24_launch (fileName)) return true;
 		default:
@@ -707,8 +1094,9 @@ static boolean launch (Display display, String fileName) {
 			}
 			break;
 	}
+	/* If the above launch attempts didn't launch the file, then try with exec().*/
 	try {
-		Compatibility.exec (fileName);
+		Compatibility.exec (new String [] {fileName}, null, workingDir);
 		return true;
 	} catch (IOException e) {
 		return false;
@@ -749,6 +1137,7 @@ public boolean execute(String fileName) {
 	if (fileName == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	int desktop = getDesktop(display);
 	switch (desktop) {
+		case DESKTOP_GIO: return gio_execute(fileName);
 		case DESKTOP_GNOME_24: return gnome_24_execute(fileName);
 		case DESKTOP_GNOME: return gnome_execute(fileName);
 		case DESKTOP_CDE: return cde_execute(fileName);
@@ -765,6 +1154,7 @@ public boolean execute(String fileName) {
  */
 public ImageData getImageData() {
 	switch (getDesktop(display)) {
+		case DESKTOP_GIO: return gio_getImageData();
 		case DESKTOP_GNOME_24:
 		case DESKTOP_GNOME: return gnome_getImageData();
 		case DESKTOP_CDE: return cde_getImageData();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java
index 38bfd90..58a8d97 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/motif/org/eclipse/swt/program/Program.java	
@@ -160,6 +160,11 @@ boolean cde_execute(String fileName) {
 	return actionID != 0;
 }
 
+static boolean cde_isExecutable(String fileName) {
+	byte [] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
+	return OS.access(fileNameBuffer, OS.X_OK) == 0;
+}
+
 static String cde_getAction(String dataType) {
 	String action  = null;
 	String actions = cde_getAttribute(dataType, CDE.DtDTS_DA_ACTION_LIST);
@@ -569,6 +574,25 @@ static boolean gnome_init() {
 	}
 }
 
+static boolean gnome_isExecutable(String fileName) {
+	/* check if the file is executable */
+	byte [] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
+	if (!GNOME.gnome_vfs_is_executable_command_string(fileNameBuffer)) return false;
+	
+	/* check if the mime type is executable */
+	int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input(fileNameBuffer);
+	int /*long*/ mimeType = GNOME.gnome_vfs_get_mime_type(uri);
+	GNOME.g_free(uri);
+	
+	byte[] exeType = Converter.wcsToMbcs (null, "application/x-executable", true); //$NON-NLS-1$
+	boolean result = GNOME.gnome_vfs_mime_type_get_equivalence(mimeType, exeType) != GNOME.GNOME_VFS_MIME_UNRELATED;
+	if (!result) {
+		byte [] shellType = Converter.wcsToMbcs (null, "application/x-shellscript", true); //$NON-NLS-1$
+		result = GNOME.gnome_vfs_mime_type_get_equivalence(mimeType, shellType) == GNOME.GNOME_VFS_MIME_IDENTICAL;
+	}
+	return result;
+}
+
 /**
  * Finds the program that is associated with an extension.
  * The extension may or may not begin with a '.'.  Note that
@@ -699,6 +723,15 @@ static Program[] getPrograms(Display display) {
 	return programList;
 }
 
+static boolean isExecutable(Display display, String fileName) {
+	switch(getDesktop(display)) {
+		case DESKTOP_GNOME_24:
+		case DESKTOP_GNOME: return gnome_isExecutable(fileName);
+		case DESKTOP_CDE: return false; //cde_isExecutable(fileName);
+	}
+	return false;
+}
+
 /**
  * Launches the operating system executable associated with the file or
  * URL (http:// or https://).  If the file is an executable then the
@@ -713,15 +746,46 @@ static Program[] getPrograms(Display display) {
  * </ul>
  */
 public static boolean launch(String fileName) {
-	return launch(Display.getCurrent(), fileName);
+	return launch(Display.getCurrent(), fileName, null);
 }
 
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
+	return launch(Display.getCurrent(), fileName, workingDir);
+}
 /*
  *  API: When support for multiple displays is added, this method will
  *       become public and the original method above can be deprecated.
  */
-static boolean launch (Display display, String fileName) {
+static boolean launch (Display display, String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+	
+	if (workingDir != null && isExecutable(display, fileName)) {
+		try {
+			Compatibility.exec (new String [] {fileName}, null, workingDir);
+			return true;
+		} catch (IOException e) {
+			return false;
+		}
+	}
 	switch (getDesktop (display)) {
 		case DESKTOP_GNOME_24:
 			if (gnome_24_launch (fileName)) return true;
@@ -742,8 +806,9 @@ static boolean launch (Display display, String fileName) {
 			}
 			break;
 	}
+	/* If the above launch attempts didn't launch the file, then try with exec().*/
 	try {
-		Compatibility.exec (fileName);
+		Compatibility.exec (new String [] {fileName}, null, workingDir);
 		return true;
 	} catch (IOException e) {
 		return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/photon/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/photon/org/eclipse/swt/program/Program.java
index c5f52bc..741fa46 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/photon/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/photon/org/eclipse/swt/program/Program.java	
@@ -172,6 +172,29 @@ public static Program [] getPrograms () {
  * </ul>
  */
 public static boolean launch (String fileName) {
+    return launch(fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	int index = fileName.lastIndexOf ('.');
 	if (index == -1) return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
index 9cc4031..65b7177 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -263,6 +263,29 @@ public static Program [] getPrograms () {
  * </ul>
  */
 public static boolean launch (String fileName) {
+    return launch(fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	
 	/* Use the character encoding for the default locale */
@@ -271,12 +294,23 @@ public static boolean launch (String fileName) {
 	int byteCount = buffer.length () * TCHAR.sizeof;
 	int /*long*/ lpFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
 	OS.MoveMemory (lpFile, buffer, byteCount);
+	
+	int /*long*/ lpDirectory = 0;
+	if (workingDir != null && OS.PathIsExe(lpFile)) {
+	    TCHAR buffer1 = new TCHAR (0, workingDir, true);
+	    byteCount = buffer1.length () * TCHAR.sizeof;
+	    lpDirectory = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+	    OS.MoveMemory (lpDirectory, buffer1, byteCount);
+	}
+	
 	SHELLEXECUTEINFO info = new SHELLEXECUTEINFO ();
 	info.cbSize = SHELLEXECUTEINFO.sizeof;
 	info.lpFile = lpFile;
+	info.lpDirectory = lpDirectory;
 	info.nShow = OS.SW_SHOW;
 	boolean result = OS.ShellExecuteEx (info);
 	if (lpFile != 0) OS.HeapFree (hHeap, 0, lpFile);
+	if (lpDirectory != 0) OS.HeapFree (hHeap, 0, lpDirectory);
 	return result;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java
index 7563947..c4993e7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT Program/wpf/org/eclipse/swt/program/Program.java	
@@ -236,6 +236,29 @@ public static Program [] getPrograms () {
  * </ul>
  */
 public static boolean launch (String fileName) {
+    return launch(fileName, null);
+}
+
+/**
+ * Launches the operating system executable associated with the file or
+ * URL (http:// or https://).  If the file is an executable then the
+ * executable is launched. The program is launched with the specified
+ * working directory only when the <code>workingDir</code> exists and
+ * <code>fileName</code> is an executable.
+ * Note that a <code>Display</code> must already exist to guarantee
+ * that this method returns an appropriate result.
+ *
+ * @param fileName the file name or program name or URL (http:// or https://)
+ * @param workingDir the name of the working directory or null
+ * @return <code>true</code> if the file is launched, otherwise <code>false</code>
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT when fileName is null</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public static boolean launch (String fileName, String workingDir) {
 	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	
 	int hHeap = Win32.GetProcessHeap ();
 	int length = fileName.length ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c
new file mode 100644
index 0000000..3ce68d9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.c	
@@ -0,0 +1,1232 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#include "swt.h"
+#include "webkitgtk_structs.h"
+#include "webkitgtk_stats.h"
+
+#define WebKitGTK_NATIVE(func) Java_org_eclipse_swt_internal_webkit_WebKitGTK_##func
+
+#ifndef NO_JSClassDefinition_1sizeof
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(JSClassDefinition_1sizeof)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, JSClassDefinition_1sizeof_FUNC);
+	rc = (jint)JSClassDefinition_sizeof();
+	WebKitGTK_NATIVE_EXIT(env, that, JSClassDefinition_1sizeof_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSClassCreate
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSClassCreate)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSClassCreate_FUNC);
+	rc = (jintLong)JSClassCreate((const JSClassDefinition*)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSClassCreate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSContextGetGlobalObject
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSContextGetGlobalObject)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSContextGetGlobalObject_FUNC);
+	rc = (jintLong)JSContextGetGlobalObject((JSContextRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSContextGetGlobalObject_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSEvaluateScript
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSEvaluateScript)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+{
+	jintLong *lparg5=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSEvaluateScript_FUNC);
+	if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSEvaluateScript_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectGetPrivate
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectGetPrivate)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetPrivate_FUNC);
+	rc = (jintLong)JSObjectGetPrivate((JSObjectRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetPrivate_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectGetProperty
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectGetProperty)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLongArray arg3)
+{
+	jintLong *lparg3=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetProperty_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSObjectGetProperty((JSContextRef)arg0, (JSObjectRef)arg1, (JSStringRef)arg2, (JSValueRef*)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetProperty_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectGetPropertyAtIndex
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectGetPropertyAtIndex)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3)
+{
+	jintLong *lparg3=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectGetPropertyAtIndex_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSObjectGetPropertyAtIndex((JSContextRef)arg0, (JSObjectRef)arg1, (unsigned)arg2, (JSValueRef*)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectGetPropertyAtIndex_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectMake
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectMake)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMake_FUNC);
+	rc = (jintLong)JSObjectMake((JSContextRef)arg0, (JSClassRef)arg1, (void *)arg2);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMake_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectMakeArray
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectMakeArray)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3)
+{
+	jintLong *lparg2=NULL;
+	jintLong *lparg3=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMakeArray_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSObjectMakeArray((JSContextRef)arg0, (size_t)arg1, (const struct OpaqueJSValue * const*)lparg2, (JSValueRef*)lparg3);
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMakeArray_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectMakeFunctionWithCallback
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSObjectMakeFunctionWithCallback)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectMakeFunctionWithCallback_FUNC);
+	rc = (jintLong)JSObjectMakeFunctionWithCallback((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectCallAsFunctionCallback)arg2);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectMakeFunctionWithCallback_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSObjectSetProperty
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1JSObjectSetProperty)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5)
+{
+	jintLong *lparg5=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSObjectSetProperty_FUNC);
+	if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail;
+	JSObjectSetProperty((JSContextRef)arg0, (JSObjectRef)arg1, (JSStringRef)arg2, (JSValueRef)arg3, (JSPropertyAttributes)arg4, (JSValueRef *)lparg5);
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSObjectSetProperty_FUNC);
+}
+#endif
+
+#ifndef NO__1JSStringCreateWithUTF8CString
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSStringCreateWithUTF8CString)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringCreateWithUTF8CString_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSStringCreateWithUTF8CString((const char *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringCreateWithUTF8CString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSStringGetLength
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSStringGetLength)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetLength_FUNC);
+	rc = (jintLong)JSStringGetLength((JSStringRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetLength_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSStringGetMaximumUTF8CStringSize
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSStringGetMaximumUTF8CStringSize)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetMaximumUTF8CStringSize_FUNC);
+	rc = (jintLong)JSStringGetMaximumUTF8CStringSize((JSStringRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetMaximumUTF8CStringSize_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSStringGetUTF8CString
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSStringGetUTF8CString)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2)
+{
+	jbyte *lparg1=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringGetUTF8CString_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSStringGetUTF8CString((JSStringRef)arg0, (char *)lparg1, (size_t)arg2);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringGetUTF8CString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSStringIsEqualToUTF8CString
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSStringIsEqualToUTF8CString)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringIsEqualToUTF8CString_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	rc = (jint)JSStringIsEqualToUTF8CString((JSStringRef)arg0, (const char *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringIsEqualToUTF8CString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSStringRelease
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1JSStringRelease)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSStringRelease_FUNC);
+	JSStringRelease((JSStringRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSStringRelease_FUNC);
+}
+#endif
+
+#ifndef NO__1JSValueGetType
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueGetType)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueGetType_FUNC);
+	rc = (jint)JSValueGetType((JSContextRef)arg0, (JSValueRef)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueGetType_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueIsObjectOfClass
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueIsObjectOfClass)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueIsObjectOfClass_FUNC);
+	rc = (jint)JSValueIsObjectOfClass((JSContextRef)arg0, (JSValueRef)arg1, (JSClassRef)arg2);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueIsObjectOfClass_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueMakeBoolean
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSValueMakeBoolean)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeBoolean_FUNC);
+	rc = (jintLong)JSValueMakeBoolean((JSContextRef)arg0, (bool)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeBoolean_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueMakeNumber
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSValueMakeNumber)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeNumber_FUNC);
+	rc = (jintLong)JSValueMakeNumber((JSContextRef)arg0, (double)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeNumber_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueMakeString
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSValueMakeString)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeString_FUNC);
+	rc = (jintLong)JSValueMakeString((JSContextRef)arg0, (JSStringRef)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeString_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueMakeUndefined
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSValueMakeUndefined)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueMakeUndefined_FUNC);
+	rc = (jintLong)JSValueMakeUndefined((JSContextRef)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueMakeUndefined_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueToBoolean
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1JSValueToBoolean)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueToBoolean_FUNC);
+	rc = (jint)JSValueToBoolean((JSContextRef)arg0, (JSValueRef)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueToBoolean_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueToNumber
+JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1JSValueToNumber)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
+{
+	jintLong *lparg2=NULL;
+	jdouble rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueToNumber_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jdouble)JSValueToNumber((JSContextRef)arg0, (JSValueRef)arg1, (JSValueRef*)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueToNumber_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1JSValueToStringCopy
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1JSValueToStringCopy)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2)
+{
+	jintLong *lparg2=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1JSValueToStringCopy_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	rc = (jintLong)JSValueToStringCopy((JSContextRef)arg0, (JSValueRef)arg1, (JSValueRef*)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1JSValueToStringCopy_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1SOUP_1IS_1SESSION
+JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(_1SOUP_1IS_1SESSION)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1SOUP_1IS_1SESSION_FUNC);
+	rc = (jboolean)SOUP_IS_SESSION(arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1SOUP_1IS_1SESSION_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1SoupCookie_1expires
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1SoupCookie_1expires)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1SoupCookie_1expires_FUNC);
+	rc = (jintLong)((SoupCookie *)arg0)->expires;
+	WebKitGTK_NATIVE_EXIT(env, that, _1SoupCookie_1expires_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1SoupMessage_1method
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1SoupMessage_1method)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1method_FUNC);
+	((SoupMessage *)arg0)->method = ((const char *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1method_FUNC);
+}
+#endif
+
+#ifndef NO__1SoupMessage_1request_1body
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1SoupMessage_1request_1body)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1request_1body_FUNC);
+	rc = (jintLong)((SoupMessage *)arg0)->request_body;
+	WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1request_1body_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1SoupMessage_1request_1headers
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1SoupMessage_1request_1headers)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1SoupMessage_1request_1headers_FUNC);
+	rc = (jintLong)((SoupMessage *)arg0)->request_headers;
+	WebKitGTK_NATIVE_EXIT(env, that, _1SoupMessage_1request_1headers_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1WEBKIT_1IS_1WEB_1FRAME
+JNIEXPORT jboolean JNICALL WebKitGTK_NATIVE(_1WEBKIT_1IS_1WEB_1FRAME)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1WEBKIT_1IS_1WEB_1FRAME_FUNC);
+	rc = (jboolean)WEBKIT_IS_WEB_FRAME(arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1WEBKIT_1IS_1WEB_1FRAME_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1auth_1authenticate
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1auth_1authenticate)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2)
+{
+	jbyte *lparg1=NULL;
+	jbyte *lparg2=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1authenticate_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	soup_auth_authenticate((SoupAuth *)arg0, (const char *)lparg1, (const char *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1authenticate_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1auth_1get_1host
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1auth_1get_1host)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1get_1host_FUNC);
+	rc = (jintLong)soup_auth_get_host((SoupAuth *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1get_1host_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1auth_1get_1scheme_1name
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1auth_1get_1scheme_1name)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1auth_1get_1scheme_1name_FUNC);
+	rc = (jintLong)soup_auth_get_scheme_name((SoupAuth *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1auth_1get_1scheme_1name_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1jar_1add_1cookie
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1add_1cookie)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1add_1cookie_FUNC);
+	soup_cookie_jar_add_cookie((SoupCookieJar *)arg0, (SoupCookie *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1add_1cookie_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1jar_1all_1cookies
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1all_1cookies)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1all_1cookies_FUNC);
+	rc = (jintLong)soup_cookie_jar_all_cookies((SoupCookieJar *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1all_1cookies_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1jar_1delete_1cookie
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1delete_1cookie)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1delete_1cookie_FUNC);
+	soup_cookie_jar_delete_cookie((SoupCookieJar *)arg0, (SoupCookie *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1delete_1cookie_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1jar_1get_1cookies
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1get_1cookies)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1get_1cookies_FUNC);
+	rc = (jintLong)soup_cookie_jar_get_cookies((SoupCookieJar *)arg0, (SoupURI *)arg1, arg2);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1get_1cookies_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1jar_1get_1type
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1jar_1get_1type)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1jar_1get_1type_FUNC);
+	rc = (jintLong)soup_cookie_jar_get_type();
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1jar_1get_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1cookie_1parse
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1cookie_1parse)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1cookie_1parse_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jintLong)soup_cookie_parse((const char *)lparg0, (SoupURI *)arg1);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1cookie_1parse_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1message_1body_1append
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1body_1append)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1body_1append_FUNC);
+	soup_message_body_append((SoupMessageBody *)arg0, (SoupMemoryUse)arg1, (gconstpointer)arg2, (gsize)arg3);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1body_1append_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1message_1body_1flatten
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1body_1flatten)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1body_1flatten_FUNC);
+	soup_message_body_flatten((SoupMessageBody *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1body_1flatten_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1message_1get_1uri
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1message_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1get_1uri_FUNC);
+	rc = (jintLong)soup_message_get_uri((SoupMessage *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1message_1headers_1append
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1message_1headers_1append)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2)
+{
+	jbyte *lparg1=NULL;
+	jbyte *lparg2=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1message_1headers_1append_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	soup_message_headers_append((SoupMessageHeaders *)arg0, (const char *)lparg1, (const char *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1message_1headers_1append_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1session_1add_1feature_1by_1type
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1add_1feature_1by_1type)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1add_1feature_1by_1type_FUNC);
+	soup_session_add_feature_by_type((SoupSession *)arg0, (GType)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1add_1feature_1by_1type_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1session_1feature_1attach
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1feature_1attach)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1feature_1attach_FUNC);
+	soup_session_feature_attach((SoupSessionFeature *)arg0, (SoupSession *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1feature_1attach_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1session_1feature_1detach
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1session_1feature_1detach)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1feature_1detach_FUNC);
+	soup_session_feature_detach((SoupSessionFeature *)arg0, (SoupSession *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1feature_1detach_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1session_1get_1feature
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1session_1get_1feature)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1session_1get_1feature_FUNC);
+	rc = (jintLong)soup_session_get_feature((SoupSession *)arg0, (GType)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1session_1get_1feature_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1uri_1free
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1soup_1uri_1free)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1free_FUNC);
+	soup_uri_free((SoupURI *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1free_FUNC);
+}
+#endif
+
+#ifndef NO__1soup_1uri_1new
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1uri_1new)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1new_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jintLong)soup_uri_new((const char *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1soup_1uri_1to_1string
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1soup_1uri_1to_1string)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1soup_1uri_1to_1string_FUNC);
+	rc = (jintLong)soup_uri_to_string((SoupURI *)arg0, arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1soup_1uri_1to_1string_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1cancel
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1cancel)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1cancel_FUNC);
+	webkit_download_cancel((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1cancel_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1download_1get_1current_1size
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1current_1size)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jlong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1current_1size_FUNC);
+	rc = (jlong)webkit_download_get_current_size((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1current_1size_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1get_1status
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1status)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1status_FUNC);
+	rc = (jint)webkit_download_get_status((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1status_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1get_1suggested_1filename
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1suggested_1filename)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1suggested_1filename_FUNC);
+	rc = (jintLong)webkit_download_get_suggested_filename((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1suggested_1filename_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1get_1total_1size
+JNIEXPORT jlong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1total_1size)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jlong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1total_1size_FUNC);
+	rc = (jlong)webkit_download_get_total_size((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1total_1size_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1get_1uri
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1download_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1get_1uri_FUNC);
+	rc = (jintLong)webkit_download_get_uri((WebKitDownload *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1download_1set_1destination_1uri
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1download_1set_1destination_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1download_1set_1destination_1uri_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	webkit_download_set_destination_uri((WebKitDownload *)arg0, (const gchar *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1download_1set_1destination_1uri_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1get_1default_1session
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1get_1default_1session)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1get_1default_1session_FUNC);
+	rc = (jintLong)webkit_get_default_session();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1get_1default_1session_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1major_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1major_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1major_1version_FUNC);
+	rc = (jint)webkit_major_version();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1major_1version_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1micro_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1micro_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1micro_1version_FUNC);
+	rc = (jint)webkit_micro_version();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1micro_1version_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1minor_1version
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1minor_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1minor_1version_FUNC);
+	rc = (jint)webkit_minor_version();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1minor_1version_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1network_1request_1get_1message
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1get_1message)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1get_1message_FUNC);
+	rc = (jintLong)webkit_network_request_get_message((WebKitNetworkRequest *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1get_1message_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1network_1request_1get_1uri
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1get_1uri_FUNC);
+	rc = (jintLong)webkit_network_request_get_uri((WebKitNetworkRequest *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1network_1request_1new
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1network_1request_1new)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1network_1request_1new_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	rc = (jintLong)webkit_network_request_new((const gchar *)lparg0);
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1network_1request_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1soup_1auth_1dialog_1get_1type
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1soup_1auth_1dialog_1get_1type)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1soup_1auth_1dialog_1get_1type_FUNC);
+	rc = (jintLong)webkit_soup_auth_dialog_get_type();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1soup_1auth_1dialog_1get_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1data_1source_1get_1data
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1data_1source_1get_1data)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1data_1source_1get_1data_FUNC);
+	rc = (jintLong)webkit_web_data_source_get_data((WebKitWebDataSource *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1data_1source_1get_1data_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1data_1source_1get_1encoding
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1data_1source_1get_1encoding)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1data_1source_1get_1encoding_FUNC);
+	rc = (jintLong)webkit_web_data_source_get_encoding((WebKitWebDataSource *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1data_1source_1get_1encoding_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1data_1source
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1data_1source)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1data_1source_FUNC);
+	rc = (jintLong)webkit_web_frame_get_data_source((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1data_1source_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1global_1context
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1global_1context)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1global_1context_FUNC);
+	rc = (jintLong)webkit_web_frame_get_global_context((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1global_1context_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1load_1status
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1load_1status)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1load_1status_FUNC);
+	rc = (jint)webkit_web_frame_get_load_status((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1load_1status_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1parent
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1parent)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1parent_FUNC);
+	rc = (jintLong)webkit_web_frame_get_parent((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1parent_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1title
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1title)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1title_FUNC);
+	rc = (jintLong)webkit_web_frame_get_title((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1title_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1uri
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1uri_FUNC);
+	rc = (jintLong)webkit_web_frame_get_uri((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1frame_1get_1web_1view
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1frame_1get_1web_1view)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1frame_1get_1web_1view_FUNC);
+	rc = (jintLong)webkit_web_frame_get_web_view((WebKitWebFrame *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1frame_1get_1web_1view_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1policy_1decision_1download
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1policy_1decision_1download)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1policy_1decision_1download_FUNC);
+	webkit_web_policy_decision_download((WebKitWebPolicyDecision *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1policy_1decision_1download_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1policy_1decision_1ignore
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1policy_1decision_1ignore)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1policy_1decision_1ignore_FUNC);
+	webkit_web_policy_decision_ignore((WebKitWebPolicyDecision *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1policy_1decision_1ignore_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1can_1go_1back
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1back)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1go_1back_FUNC);
+	rc = (jint)webkit_web_view_can_go_back((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1go_1back_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1can_1go_1forward
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1go_1forward)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1go_1forward_FUNC);
+	rc = (jint)webkit_web_view_can_go_forward((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1go_1forward_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1can_1show_1mime_1type
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1can_1show_1mime_1type)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1can_1show_1mime_1type_FUNC);
+	rc = (jint)webkit_web_view_can_show_mime_type((WebKitWebView *)arg0, (const gchar *)arg1);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1can_1show_1mime_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1execute_1script
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1execute_1script)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1execute_1script_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	webkit_web_view_execute_script((WebKitWebView *)arg0, (const gchar *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1execute_1script_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1load_1status
+JNIEXPORT jint JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1load_1status)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1load_1status_FUNC);
+	rc = (jint)webkit_web_view_get_load_status((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1load_1status_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1main_1frame
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1main_1frame)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1main_1frame_FUNC);
+	rc = (jintLong)webkit_web_view_get_main_frame((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1main_1frame_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1progress
+JNIEXPORT jdouble JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1progress)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1progress_FUNC);
+	rc = (jdouble)webkit_web_view_get_progress((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1progress_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1settings
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1settings)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1settings_FUNC);
+	rc = (jintLong)webkit_web_view_get_settings((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1settings_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1title
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1title)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1title_FUNC);
+	rc = (jintLong)webkit_web_view_get_title((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1title_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1uri
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1uri_FUNC);
+	rc = (jintLong)webkit_web_view_get_uri((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1uri_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1get_1window_1features
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1get_1window_1features)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC);
+	rc = (jintLong)webkit_web_view_get_window_features((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1get_1window_1features_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1go_1back
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1back)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1go_1back_FUNC);
+	webkit_web_view_go_back((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1go_1back_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1go_1forward
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1go_1forward)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1go_1forward_FUNC);
+	webkit_web_view_go_forward((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1go_1forward_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1load_1string
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1string)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jbyteArray arg2, jbyteArray arg3, jbyteArray arg4)
+{
+	jbyte *lparg1=NULL;
+	jbyte *lparg2=NULL;
+	jbyte *lparg3=NULL;
+	jbyte *lparg4=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1string_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetByteArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	webkit_web_view_load_string((WebKitWebView *)arg0, (const gchar *)lparg1, (const gchar *)lparg2, (const gchar *)lparg3, (const gchar *)lparg4);
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseByteArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1string_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1load_1uri
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1load_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1load_1uri_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	webkit_web_view_load_uri((WebKitWebView *)arg0, (const gchar *)lparg1);
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1load_1uri_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1new
+JNIEXPORT jintLong JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1new)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1new_FUNC);
+	rc = (jintLong)webkit_web_view_new();
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1reload
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1reload)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1reload_FUNC);
+	webkit_web_view_reload((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1reload_FUNC);
+}
+#endif
+
+#ifndef NO__1webkit_1web_1view_1stop_1loading
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(_1webkit_1web_1view_1stop_1loading)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	WebKitGTK_NATIVE_ENTER(env, that, _1webkit_1web_1view_1stop_1loading_FUNC);
+	webkit_web_view_stop_loading((WebKitWebView *)arg0);
+	WebKitGTK_NATIVE_EXIT(env, that, _1webkit_1web_1view_1stop_1loading_FUNC);
+}
+#endif
+
+#ifndef NO_memmove
+JNIEXPORT void JNICALL WebKitGTK_NATIVE(memmove)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
+{
+	JSClassDefinition _arg1, *lparg1=NULL;
+	WebKitGTK_NATIVE_ENTER(env, that, memmove_FUNC);
+	if (arg1) if ((lparg1 = getJSClassDefinitionFields(env, arg1, &_arg1)) == NULL) goto fail;
+	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
+fail:
+	WebKitGTK_NATIVE_EXIT(env, that, memmove_FUNC);
+}
+#endif
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h
new file mode 100644
index 0000000..05b9a2e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h	
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+  
+#ifndef INC_webkitgtk_H
+#define INC_webkitgtk_H
+
+#include <string.h>
+#include <JavaScriptCore/JSContextRef.h>
+#include <JavaScriptCore/JSObjectRef.h>
+#include <JavaScriptCore/JSStringRef.h>
+#include <libsoup/soup-cookie.h>
+#include <libsoup/soup-cookie-jar.h>
+#include <libsoup/soup-session-feature.h>
+#include <libsoup/soup-uri.h>
+#include <webkit/webkitdownload.h>
+#include <webkit/webkitnetworkrequest.h>
+#include <webkit/webkitsoupauthdialog.h>
+#include <webkit/webkitversion.h>
+#include <webkit/webkitwebpolicydecision.h>
+#include <webkit/webkitwebsettings.h>
+#include <webkit/webkitwebview.h>
+#endif /* INC_webkitgtk_H */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c
new file mode 100644
index 0000000..31b101d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.c	
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#include "swt.h"
+#include "webkitgtk_stats.h"
+
+#ifdef NATIVE_STATS
+
+int WebKitGTK_nativeFunctionCount = 97;
+int WebKitGTK_nativeFunctionCallCount[97];
+char * WebKitGTK_nativeFunctionNames[] = {
+	"JSClassDefinition_1sizeof",
+	"_1JSClassCreate",
+	"_1JSContextGetGlobalObject",
+	"_1JSEvaluateScript",
+	"_1JSObjectGetPrivate",
+	"_1JSObjectGetProperty",
+	"_1JSObjectGetPropertyAtIndex",
+	"_1JSObjectMake",
+	"_1JSObjectMakeArray",
+	"_1JSObjectMakeFunctionWithCallback",
+	"_1JSObjectSetProperty",
+	"_1JSStringCreateWithUTF8CString",
+	"_1JSStringGetLength",
+	"_1JSStringGetMaximumUTF8CStringSize",
+	"_1JSStringGetUTF8CString",
+	"_1JSStringIsEqualToUTF8CString",
+	"_1JSStringRelease",
+	"_1JSValueGetType",
+	"_1JSValueIsObjectOfClass",
+	"_1JSValueMakeBoolean",
+	"_1JSValueMakeNumber",
+	"_1JSValueMakeString",
+	"_1JSValueMakeUndefined",
+	"_1JSValueToBoolean",
+	"_1JSValueToNumber",
+	"_1JSValueToStringCopy",
+	"_1SOUP_1IS_1SESSION",
+	"_1SoupCookie_1expires",
+	"_1SoupMessage_1method",
+	"_1SoupMessage_1request_1body",
+	"_1SoupMessage_1request_1headers",
+	"_1WEBKIT_1IS_1WEB_1FRAME",
+	"_1soup_1auth_1authenticate",
+	"_1soup_1auth_1get_1host",
+	"_1soup_1auth_1get_1scheme_1name",
+	"_1soup_1cookie_1jar_1add_1cookie",
+	"_1soup_1cookie_1jar_1all_1cookies",
+	"_1soup_1cookie_1jar_1delete_1cookie",
+	"_1soup_1cookie_1jar_1get_1cookies",
+	"_1soup_1cookie_1jar_1get_1type",
+	"_1soup_1cookie_1parse",
+	"_1soup_1message_1body_1append",
+	"_1soup_1message_1body_1flatten",
+	"_1soup_1message_1get_1uri",
+	"_1soup_1message_1headers_1append",
+	"_1soup_1session_1add_1feature_1by_1type",
+	"_1soup_1session_1feature_1attach",
+	"_1soup_1session_1feature_1detach",
+	"_1soup_1session_1get_1feature",
+	"_1soup_1uri_1free",
+	"_1soup_1uri_1new",
+	"_1soup_1uri_1to_1string",
+	"_1webkit_1download_1cancel",
+	"_1webkit_1download_1get_1current_1size",
+	"_1webkit_1download_1get_1status",
+	"_1webkit_1download_1get_1suggested_1filename",
+	"_1webkit_1download_1get_1total_1size",
+	"_1webkit_1download_1get_1uri",
+	"_1webkit_1download_1set_1destination_1uri",
+	"_1webkit_1get_1default_1session",
+	"_1webkit_1major_1version",
+	"_1webkit_1micro_1version",
+	"_1webkit_1minor_1version",
+	"_1webkit_1network_1request_1get_1message",
+	"_1webkit_1network_1request_1get_1uri",
+	"_1webkit_1network_1request_1new",
+	"_1webkit_1soup_1auth_1dialog_1get_1type",
+	"_1webkit_1web_1data_1source_1get_1data",
+	"_1webkit_1web_1data_1source_1get_1encoding",
+	"_1webkit_1web_1frame_1get_1data_1source",
+	"_1webkit_1web_1frame_1get_1global_1context",
+	"_1webkit_1web_1frame_1get_1load_1status",
+	"_1webkit_1web_1frame_1get_1parent",
+	"_1webkit_1web_1frame_1get_1title",
+	"_1webkit_1web_1frame_1get_1uri",
+	"_1webkit_1web_1frame_1get_1web_1view",
+	"_1webkit_1web_1policy_1decision_1download",
+	"_1webkit_1web_1policy_1decision_1ignore",
+	"_1webkit_1web_1view_1can_1go_1back",
+	"_1webkit_1web_1view_1can_1go_1forward",
+	"_1webkit_1web_1view_1can_1show_1mime_1type",
+	"_1webkit_1web_1view_1execute_1script",
+	"_1webkit_1web_1view_1get_1load_1status",
+	"_1webkit_1web_1view_1get_1main_1frame",
+	"_1webkit_1web_1view_1get_1progress",
+	"_1webkit_1web_1view_1get_1settings",
+	"_1webkit_1web_1view_1get_1title",
+	"_1webkit_1web_1view_1get_1uri",
+	"_1webkit_1web_1view_1get_1window_1features",
+	"_1webkit_1web_1view_1go_1back",
+	"_1webkit_1web_1view_1go_1forward",
+	"_1webkit_1web_1view_1load_1string",
+	"_1webkit_1web_1view_1load_1uri",
+	"_1webkit_1web_1view_1new",
+	"_1webkit_1web_1view_1reload",
+	"_1webkit_1web_1view_1stop_1loading",
+	"memmove",
+};
+
+#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
+
+JNIEXPORT jint JNICALL STATS_NATIVE(WebKitGTK_1GetFunctionCount)
+	(JNIEnv *env, jclass that)
+{
+	return WebKitGTK_nativeFunctionCount;
+}
+
+JNIEXPORT jstring JNICALL STATS_NATIVE(WebKitGTK_1GetFunctionName)
+	(JNIEnv *env, jclass that, jint index)
+{
+	return (*env)->NewStringUTF(env, WebKitGTK_nativeFunctionNames[index]);
+}
+
+JNIEXPORT jint JNICALL STATS_NATIVE(WebKitGTK_1GetFunctionCallCount)
+	(JNIEnv *env, jclass that, jint index)
+{
+	return WebKitGTK_nativeFunctionCallCount[index];
+}
+
+#endif
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h
new file mode 100644
index 0000000..69398a9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_stats.h	
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#ifdef NATIVE_STATS
+extern int WebKitGTK_nativeFunctionCount;
+extern int WebKitGTK_nativeFunctionCallCount[];
+extern char* WebKitGTK_nativeFunctionNames[];
+#define WebKitGTK_NATIVE_ENTER(env, that, func) WebKitGTK_nativeFunctionCallCount[func]++;
+#define WebKitGTK_NATIVE_EXIT(env, that, func) 
+#else
+#ifndef WebKitGTK_NATIVE_ENTER
+#define WebKitGTK_NATIVE_ENTER(env, that, func) 
+#endif
+#ifndef WebKitGTK_NATIVE_EXIT
+#define WebKitGTK_NATIVE_EXIT(env, that, func) 
+#endif
+#endif
+
+typedef enum {
+	JSClassDefinition_1sizeof_FUNC,
+	_1JSClassCreate_FUNC,
+	_1JSContextGetGlobalObject_FUNC,
+	_1JSEvaluateScript_FUNC,
+	_1JSObjectGetPrivate_FUNC,
+	_1JSObjectGetProperty_FUNC,
+	_1JSObjectGetPropertyAtIndex_FUNC,
+	_1JSObjectMake_FUNC,
+	_1JSObjectMakeArray_FUNC,
+	_1JSObjectMakeFunctionWithCallback_FUNC,
+	_1JSObjectSetProperty_FUNC,
+	_1JSStringCreateWithUTF8CString_FUNC,
+	_1JSStringGetLength_FUNC,
+	_1JSStringGetMaximumUTF8CStringSize_FUNC,
+	_1JSStringGetUTF8CString_FUNC,
+	_1JSStringIsEqualToUTF8CString_FUNC,
+	_1JSStringRelease_FUNC,
+	_1JSValueGetType_FUNC,
+	_1JSValueIsObjectOfClass_FUNC,
+	_1JSValueMakeBoolean_FUNC,
+	_1JSValueMakeNumber_FUNC,
+	_1JSValueMakeString_FUNC,
+	_1JSValueMakeUndefined_FUNC,
+	_1JSValueToBoolean_FUNC,
+	_1JSValueToNumber_FUNC,
+	_1JSValueToStringCopy_FUNC,
+	_1SOUP_1IS_1SESSION_FUNC,
+	_1SoupCookie_1expires_FUNC,
+	_1SoupMessage_1method_FUNC,
+	_1SoupMessage_1request_1body_FUNC,
+	_1SoupMessage_1request_1headers_FUNC,
+	_1WEBKIT_1IS_1WEB_1FRAME_FUNC,
+	_1soup_1auth_1authenticate_FUNC,
+	_1soup_1auth_1get_1host_FUNC,
+	_1soup_1auth_1get_1scheme_1name_FUNC,
+	_1soup_1cookie_1jar_1add_1cookie_FUNC,
+	_1soup_1cookie_1jar_1all_1cookies_FUNC,
+	_1soup_1cookie_1jar_1delete_1cookie_FUNC,
+	_1soup_1cookie_1jar_1get_1cookies_FUNC,
+	_1soup_1cookie_1jar_1get_1type_FUNC,
+	_1soup_1cookie_1parse_FUNC,
+	_1soup_1message_1body_1append_FUNC,
+	_1soup_1message_1body_1flatten_FUNC,
+	_1soup_1message_1get_1uri_FUNC,
+	_1soup_1message_1headers_1append_FUNC,
+	_1soup_1session_1add_1feature_1by_1type_FUNC,
+	_1soup_1session_1feature_1attach_FUNC,
+	_1soup_1session_1feature_1detach_FUNC,
+	_1soup_1session_1get_1feature_FUNC,
+	_1soup_1uri_1free_FUNC,
+	_1soup_1uri_1new_FUNC,
+	_1soup_1uri_1to_1string_FUNC,
+	_1webkit_1download_1cancel_FUNC,
+	_1webkit_1download_1get_1current_1size_FUNC,
+	_1webkit_1download_1get_1status_FUNC,
+	_1webkit_1download_1get_1suggested_1filename_FUNC,
+	_1webkit_1download_1get_1total_1size_FUNC,
+	_1webkit_1download_1get_1uri_FUNC,
+	_1webkit_1download_1set_1destination_1uri_FUNC,
+	_1webkit_1get_1default_1session_FUNC,
+	_1webkit_1major_1version_FUNC,
+	_1webkit_1micro_1version_FUNC,
+	_1webkit_1minor_1version_FUNC,
+	_1webkit_1network_1request_1get_1message_FUNC,
+	_1webkit_1network_1request_1get_1uri_FUNC,
+	_1webkit_1network_1request_1new_FUNC,
+	_1webkit_1soup_1auth_1dialog_1get_1type_FUNC,
+	_1webkit_1web_1data_1source_1get_1data_FUNC,
+	_1webkit_1web_1data_1source_1get_1encoding_FUNC,
+	_1webkit_1web_1frame_1get_1data_1source_FUNC,
+	_1webkit_1web_1frame_1get_1global_1context_FUNC,
+	_1webkit_1web_1frame_1get_1load_1status_FUNC,
+	_1webkit_1web_1frame_1get_1parent_FUNC,
+	_1webkit_1web_1frame_1get_1title_FUNC,
+	_1webkit_1web_1frame_1get_1uri_FUNC,
+	_1webkit_1web_1frame_1get_1web_1view_FUNC,
+	_1webkit_1web_1policy_1decision_1download_FUNC,
+	_1webkit_1web_1policy_1decision_1ignore_FUNC,
+	_1webkit_1web_1view_1can_1go_1back_FUNC,
+	_1webkit_1web_1view_1can_1go_1forward_FUNC,
+	_1webkit_1web_1view_1can_1show_1mime_1type_FUNC,
+	_1webkit_1web_1view_1execute_1script_FUNC,
+	_1webkit_1web_1view_1get_1load_1status_FUNC,
+	_1webkit_1web_1view_1get_1main_1frame_FUNC,
+	_1webkit_1web_1view_1get_1progress_FUNC,
+	_1webkit_1web_1view_1get_1settings_FUNC,
+	_1webkit_1web_1view_1get_1title_FUNC,
+	_1webkit_1web_1view_1get_1uri_FUNC,
+	_1webkit_1web_1view_1get_1window_1features_FUNC,
+	_1webkit_1web_1view_1go_1back_FUNC,
+	_1webkit_1web_1view_1go_1forward_FUNC,
+	_1webkit_1web_1view_1load_1string_FUNC,
+	_1webkit_1web_1view_1load_1uri_FUNC,
+	_1webkit_1web_1view_1new_FUNC,
+	_1webkit_1web_1view_1reload_FUNC,
+	_1webkit_1web_1view_1stop_1loading_FUNC,
+	memmove_FUNC,
+} WebKitGTK_FUNCS;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c
new file mode 100644
index 0000000..a39af74
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.c	
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#include "swt.h"
+#include "webkitgtk_structs.h"
+
+#ifndef NO_JSClassDefinition
+typedef struct JSClassDefinition_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID version, attributes, className, parentClass, staticValues, staticFunctions, initialize, finalize, hasProperty, getProperty, setProperty, deleteProperty, getPropertyNames, callAsFunction, callAsConstructor, hasInstance, convertToType;
+} JSClassDefinition_FID_CACHE;
+
+JSClassDefinition_FID_CACHE JSClassDefinitionFc;
+
+void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject)
+{
+	if (JSClassDefinitionFc.cached) return;
+	JSClassDefinitionFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	JSClassDefinitionFc.version = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "version", "I");
+	JSClassDefinitionFc.attributes = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "attributes", "I");
+	JSClassDefinitionFc.className = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "className", I_J);
+	JSClassDefinitionFc.parentClass = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "parentClass", I_J);
+	JSClassDefinitionFc.staticValues = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "staticValues", I_J);
+	JSClassDefinitionFc.staticFunctions = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "staticFunctions", I_J);
+	JSClassDefinitionFc.initialize = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "initialize", I_J);
+	JSClassDefinitionFc.finalize = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "finalize", I_J);
+	JSClassDefinitionFc.hasProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "hasProperty", I_J);
+	JSClassDefinitionFc.getProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "getProperty", I_J);
+	JSClassDefinitionFc.setProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "setProperty", I_J);
+	JSClassDefinitionFc.deleteProperty = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "deleteProperty", I_J);
+	JSClassDefinitionFc.getPropertyNames = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "getPropertyNames", I_J);
+	JSClassDefinitionFc.callAsFunction = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "callAsFunction", I_J);
+	JSClassDefinitionFc.callAsConstructor = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "callAsConstructor", I_J);
+	JSClassDefinitionFc.hasInstance = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "hasInstance", I_J);
+	JSClassDefinitionFc.convertToType = (*env)->GetFieldID(env, JSClassDefinitionFc.clazz, "convertToType", I_J);
+	JSClassDefinitionFc.cached = 1;
+}
+
+JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
+{
+	if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
+	lpStruct->version = (*env)->GetIntField(env, lpObject, JSClassDefinitionFc.version);
+	lpStruct->attributes = (JSClassAttributes)(*env)->GetIntField(env, lpObject, JSClassDefinitionFc.attributes);
+	lpStruct->className = (const char*)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.className);
+	lpStruct->parentClass = (JSClassRef)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.parentClass);
+	lpStruct->staticValues = (const JSStaticValue*)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.staticValues);
+	lpStruct->staticFunctions = (const JSStaticFunction*)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.staticFunctions);
+	lpStruct->initialize = (JSObjectInitializeCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.initialize);
+	lpStruct->finalize = (JSObjectFinalizeCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.finalize);
+	lpStruct->hasProperty = (JSObjectHasPropertyCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.hasProperty);
+	lpStruct->getProperty = (JSObjectGetPropertyCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.getProperty);
+	lpStruct->setProperty = (JSObjectSetPropertyCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.setProperty);
+	lpStruct->deleteProperty = (JSObjectDeletePropertyCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.deleteProperty);
+	lpStruct->getPropertyNames = (JSObjectGetPropertyNamesCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.getPropertyNames);
+	lpStruct->callAsFunction = (JSObjectCallAsFunctionCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.callAsFunction);
+	lpStruct->callAsConstructor = (JSObjectCallAsConstructorCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.callAsConstructor);
+	lpStruct->hasInstance = (JSObjectHasInstanceCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.hasInstance);
+	lpStruct->convertToType = (JSObjectConvertToTypeCallback)(*env)->GetIntLongField(env, lpObject, JSClassDefinitionFc.convertToType);
+	return lpStruct;
+}
+
+void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct)
+{
+	if (!JSClassDefinitionFc.cached) cacheJSClassDefinitionFields(env, lpObject);
+	(*env)->SetIntField(env, lpObject, JSClassDefinitionFc.version, (jint)lpStruct->version);
+	(*env)->SetIntField(env, lpObject, JSClassDefinitionFc.attributes, (jint)lpStruct->attributes);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.className, (jintLong)lpStruct->className);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.parentClass, (jintLong)lpStruct->parentClass);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.staticValues, (jintLong)lpStruct->staticValues);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.staticFunctions, (jintLong)lpStruct->staticFunctions);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.initialize, (jintLong)lpStruct->initialize);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.finalize, (jintLong)lpStruct->finalize);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.hasProperty, (jintLong)lpStruct->hasProperty);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.getProperty, (jintLong)lpStruct->getProperty);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.setProperty, (jintLong)lpStruct->setProperty);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.deleteProperty, (jintLong)lpStruct->deleteProperty);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.getPropertyNames, (jintLong)lpStruct->getPropertyNames);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.callAsFunction, (jintLong)lpStruct->callAsFunction);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.callAsConstructor, (jintLong)lpStruct->callAsConstructor);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.hasInstance, (jintLong)lpStruct->hasInstance);
+	(*env)->SetIntLongField(env, lpObject, JSClassDefinitionFc.convertToType, (jintLong)lpStruct->convertToType);
+}
+#endif
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h
new file mode 100644
index 0000000..8f53dd4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk_structs.h	
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+#include "webkitgtk.h"
+
+#ifndef NO_JSClassDefinition
+void cacheJSClassDefinitionFields(JNIEnv *env, jobject lpObject);
+JSClassDefinition *getJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
+void setJSClassDefinitionFields(JNIEnv *env, jobject lpObject, JSClassDefinition *lpStruct);
+#define JSClassDefinition_sizeof() sizeof(JSClassDefinition)
+#else
+#define cacheJSClassDefinitionFields(a,b)
+#define getJSClassDefinitionFields(a,b,c) NULL
+#define setJSClassDefinitionFields(a,b,c)
+#define JSClassDefinition_sizeof() 0
+#endif
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
new file mode 100644
index 0000000..fa8840b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java	
@@ -0,0 +1,1861 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.browser;
+
+
+import java.io.UnsupportedEncodingException;
+import java.net.*;
+import java.util.*;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.gtk.OS;
+import org.eclipse.swt.internal.webkit.*;
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.widgets.*;
+
+public class WebKit extends WebBrowser {
+	int /*long*/ webView, webViewData, scrolledWindow;
+	int failureCount, lastKeyCode, lastCharCode;
+	String postData;
+	String[] headers;
+	boolean ignoreDispose, loadingText, untrustedText;
+	byte[] htmlBytes;
+	BrowserFunction eventFunction;
+
+	static int /*long*/ ExternalClass, PostString;
+	static boolean LibraryLoaded;
+
+	static final String ABOUT_BLANK = "about:blank"; //$NON-NLS-1$
+	static final String CHARSET_UTF8 = "UTF-8"; //$NON-NLS-1$
+	static final String CLASSNAME_EXTERNAL = "External"; //$NON-NLS-1$
+	static final String ENCODING_FORM = "Content-Type: application/x-www-form-urlencoded"; //$NON-NLS-1$
+	static final String FUNCTIONNAME_CALLJAVA = "callJava"; //$NON-NLS-1$
+	static final String OBJECTNAME_EXTERNAL = "external"; //$NON-NLS-1$
+	static final String PROPERTY_LENGTH = "length"; //$NON-NLS-1$
+	static final String PROPERTY_PROXYHOST = "network.proxy_host"; //$NON-NLS-1$
+	static final String PROPERTY_PROXYPORT = "network.proxy_port"; //$NON-NLS-1$
+	static final String PROTOCOL_FILE = "file://"; //$NON-NLS-1$
+	static final String PROTOCOL_HTTP = "http://"; //$NON-NLS-1$
+	static final String URI_FILEROOT = "file:///"; //$NON-NLS-1$
+	static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
+	static final int MAX_PORT = 65535;
+	static final int MAX_PROGRESS = 100;
+	static final int[] MIN_VERSION = {1, 2, 0};
+	static final char SEPARATOR_FILE = System.getProperty ("file.separator").charAt (0); //$NON-NLS-1$
+	static final int STOP_PROPOGATE = 1;
+
+	static final String DOMEVENT_DRAGSTART = "dragstart"; //$NON-NLS-1$
+	static final String DOMEVENT_KEYDOWN = "keydown"; //$NON-NLS-1$
+	static final String DOMEVENT_KEYPRESS = "keypress"; //$NON-NLS-1$
+	static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEDOWN = "mousedown"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEUP = "mouseup"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEMOVE = "mousemove"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEOUT = "mouseout"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEOVER = "mouseover"; //$NON-NLS-1$
+	static final String DOMEVENT_MOUSEWHEEL = "mousewheel"; //$NON-NLS-1$
+
+	/* WebKit signal data */
+	static final int HOVERING_OVER_LINK = 1;
+	static final int NOTIFY_PROGRESS = 2;
+	static final int NAVIGATION_POLICY_DECISION_REQUESTED = 3;
+	static final int NOTIFY_TITLE = 4;
+	static final int POPULATE_POPUP = 5;
+	static final int STATUS_BAR_TEXT_CHANGED = 6;
+	static final int CREATE_WEB_VIEW = 7;
+	static final int WEB_VIEW_READY = 8;
+	static final int NOTIFY_LOAD_STATUS = 9;
+	static final int RESOURCE_REQUEST_STARTING = 10;
+	static final int DOWNLOAD_REQUESTED = 11;
+	static final int MIME_TYPE_POLICY_DECISION_REQUESTED = 12;
+	static final int CLOSE_WEB_VIEW = 13;
+	static final int WINDOW_OBJECT_CLEARED = 14;
+	static final int CONSOLE_MESSAGE = 15;
+
+	static final String KEY_CHECK_SUBWINDOW = "org.eclipse.swt.internal.control.checksubwindow"; //$NON-NLS-1$
+
+	// the following Callbacks are never freed
+	static Callback Proc2, Proc3, Proc4, Proc5, Proc6;
+	static Callback JSObjectHasPropertyProc, JSObjectGetPropertyProc, JSObjectCallAsFunctionProc;
+
+	static {
+		try {
+			Library.loadLibrary ("swt-webkit"); // $NON-NLS-1$
+			LibraryLoaded = true;
+		} catch (Throwable e) {
+		}
+
+		Proc2 = new Callback (WebKit.class, "Proc", 2); //$NON-NLS-1$
+		if (Proc2.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		Proc3 = new Callback (WebKit.class, "Proc", 3); //$NON-NLS-1$
+		if (Proc3.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		Proc4 = new Callback (WebKit.class, "Proc", 4); //$NON-NLS-1$
+		if (Proc4.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		Proc5 = new Callback (WebKit.class, "Proc", 5); //$NON-NLS-1$
+		if (Proc5.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		Proc6 = new Callback (WebKit.class, "Proc", 6); //$NON-NLS-1$
+		if (Proc6.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		JSObjectHasPropertyProc = new Callback (WebKit.class, "JSObjectHasPropertyProc", 3); //$NON-NLS-1$
+		if (JSObjectHasPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		JSObjectGetPropertyProc = new Callback (WebKit.class, "JSObjectGetPropertyProc", 4); //$NON-NLS-1$
+		if (JSObjectGetPropertyProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+		JSObjectCallAsFunctionProc = new Callback (WebKit.class, "JSObjectCallAsFunctionProc", 6); //$NON-NLS-1$
+		if (JSObjectCallAsFunctionProc.getAddress () == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+
+		NativeClearSessions = new Runnable () {
+			public void run () {
+				if (!LibraryLoaded) return;
+				int /*long*/ session = WebKitGTK.webkit_get_default_session ();
+				int /*long*/ type = WebKitGTK.soup_cookie_jar_get_type ();
+				int /*long*/ jar = WebKitGTK.soup_session_get_feature (session, type);
+				if (jar == 0) return;
+				int /*long*/ cookies = WebKitGTK.soup_cookie_jar_all_cookies (jar);
+				int length = OS.g_slist_length (cookies);
+				int /*long*/ current = cookies;
+				for (int i = 0; i < length; i++) {
+					int /*long*/ cookie = OS.g_slist_data (current);
+					int /*long*/ expires = WebKitGTK.SoupCookie_expires (cookie);
+					if (expires == 0) {
+						/* indicates a session cookie */
+						WebKitGTK.soup_cookie_jar_delete_cookie (jar, cookie);
+					}
+					OS.g_free (cookie);
+					current = OS.g_slist_next (current);
+				}
+			}
+		};
+
+		NativeGetCookie = new Runnable () {
+			public void run () {
+				if (!LibraryLoaded) return;
+				int /*long*/ session = WebKitGTK.webkit_get_default_session ();
+				int /*long*/ type = WebKitGTK.soup_cookie_jar_get_type ();
+				int /*long*/ jar = WebKitGTK.soup_session_get_feature (session, type);
+				if (jar == 0) return;
+				byte[] bytes = Converter.wcsToMbcs (null, CookieUrl, true);
+				int /*long*/ uri = WebKitGTK.soup_uri_new (bytes);
+				if (uri == 0) return;
+				int /*long*/ cookies = WebKitGTK.soup_cookie_jar_get_cookies (jar, uri, 0);
+				WebKitGTK.soup_uri_free (uri);
+				if (cookies == 0) return;
+				int length = OS.strlen (cookies);
+				bytes = new byte[length];
+				C.memmove (bytes, cookies, length);
+				OS.g_free (cookies);
+				String allCookies = new String (Converter.mbcsToWcs (null, bytes));
+				StringTokenizer tokenizer = new StringTokenizer (allCookies, ";"); //$NON-NLS-1$
+				while (tokenizer.hasMoreTokens ()) {
+					String cookie = tokenizer.nextToken ();
+					int index = cookie.indexOf ('=');
+					if (index != -1) {
+						String name = cookie.substring (0, index).trim ();
+						if (name.equals (CookieName)) {
+							CookieValue = cookie.substring (index + 1).trim ();
+							return;
+						}
+					}
+				}
+
+			}
+		};
+
+		NativeSetCookie = new Runnable () {
+			public void run () {
+				if (!LibraryLoaded) return;
+				int /*long*/ session = WebKitGTK.webkit_get_default_session ();
+				int /*long*/ type = WebKitGTK.soup_cookie_jar_get_type ();
+				int /*long*/ jar = WebKitGTK.soup_session_get_feature (session, type);
+				if (jar == 0) {
+					/* this happens if a navigation has not occurred yet */
+					WebKitGTK.soup_session_add_feature_by_type (session, type);
+					jar = WebKitGTK.soup_session_get_feature (session, type);
+				}
+				if (jar == 0) return;
+				byte[] bytes = Converter.wcsToMbcs (null, CookieUrl, true);
+				int /*long*/ uri = WebKitGTK.soup_uri_new (bytes);
+				if (uri == 0) return;
+				bytes = Converter.wcsToMbcs (null, CookieValue, true);
+				int /*long*/ cookie = WebKitGTK.soup_cookie_parse (bytes, uri);
+				if (cookie != 0) {
+					WebKitGTK.soup_cookie_jar_add_cookie (jar, cookie);
+					// the following line is intentionally commented
+					// WebKitGTK.soup_cookie_free (cookie);
+					CookieResult = true;
+				}
+				WebKitGTK.soup_uri_free (uri);
+			}
+		};
+
+		if (NativePendingCookies != null) {
+			SetPendingCookies (NativePendingCookies);
+			NativePendingCookies = null;
+		}
+	}
+
+static Browser findBrowser (int /*long*/ webView) {
+	if (webView == 0) return null;
+	int /*long*/ parent = OS.gtk_widget_get_parent (webView);
+	parent = OS.gtk_widget_get_parent (parent);
+	return (Browser)Display.getCurrent ().findWidget (parent);
+}
+
+static int /*long*/ JSObjectCallAsFunctionProc (int /*long*/ ctx, int /*long*/ function, int /*long*/ thisObject, int /*long*/ argumentCount, int /*long*/ arguments, int /*long*/ exception) {
+	if (WebKitGTK.JSValueIsObjectOfClass (ctx, thisObject, ExternalClass) == 0) {
+		return WebKitGTK.JSValueMakeUndefined (ctx);
+	}
+	int /*long*/ ptr = WebKitGTK.JSObjectGetPrivate (thisObject);
+	int /*long*/[] handle = new int /*long*/[1];
+	C.memmove (handle, ptr, C.PTR_SIZEOF);
+	Browser browser = findBrowser (handle[0]);
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	return webkit.callJava (ctx, function, thisObject, argumentCount, arguments, exception);
+}
+
+static int /*long*/ JSObjectGetPropertyProc (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName, int /*long*/ exception) {
+	byte[] bytes = null;
+	try {
+		bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, FUNCTIONNAME_CALLJAVA, true);
+	} 
+	int /*long*/ name = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+	int /*long*/ function = WebKitGTK.JSObjectMakeFunctionWithCallback (ctx, name, JSObjectCallAsFunctionProc.getAddress ());
+	WebKitGTK.JSStringRelease (name);
+	return function;
+}
+
+static int /*long*/ JSObjectHasPropertyProc (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName) {
+	byte[] bytes = null;
+	try {
+		bytes = (FUNCTIONNAME_CALLJAVA + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, FUNCTIONNAME_CALLJAVA, true);
+	}
+	return WebKitGTK.JSStringIsEqualToUTF8CString (propertyName, bytes);
+}
+
+static int /*long*/ Proc (int /*long*/ handle, int /*long*/ user_data) {
+	Browser browser = findBrowser (handle);
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	return webkit.webViewProc (handle, user_data);
+}
+
+static int /*long*/ Proc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
+	if (OS.GTK_IS_SCROLLED_WINDOW (handle)) {
+		/*
+		 * Stop the propagation of events that are not consumed by WebKit, before
+		 * they reach the parent embedder.  These events have already been received.
+		 */
+		return user_data;
+	}
+
+	int /*long*/ webView;
+	if (WebKitGTK.WEBKIT_IS_WEB_FRAME (handle)) {
+		webView = WebKitGTK.webkit_web_frame_get_web_view (handle);
+	} else {
+		webView = handle;
+	}
+	Browser browser = findBrowser (webView); 
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	if (webView == handle) {
+		return webkit.webViewProc (handle, arg0, user_data);
+	} else {
+		return webkit.webFrameProc (handle, arg0, user_data);
+	}
+}
+
+static int /*long*/ Proc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) {
+	Browser browser = findBrowser (handle);
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	return webkit.webViewProc (handle, arg0, arg1, user_data);
+}
+
+static int /*long*/ Proc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) {
+	int /*long*/ webView;
+	if (WebKitGTK.SOUP_IS_SESSION (handle)) {
+		webView = user_data;
+	} else {
+		webView = handle;
+	}
+	Browser browser = findBrowser (webView);
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	if (webView == handle) {
+		return webkit.webViewProc (handle, arg0, arg1, arg2, user_data);
+	} else {
+		return webkit.sessionProc (handle, arg0, arg1, arg2, user_data);
+	}
+}
+
+static int /*long*/ Proc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ user_data) {
+	Browser browser = findBrowser (handle);
+	if (browser == null) return 0;
+	WebKit webkit = (WebKit)browser.webBrowser;
+	return webkit.webViewProc (handle, arg0, arg1, arg2, arg3, user_data);
+}
+
+int /*long*/ sessionProc (int /*long*/ session, int /*long*/ msg, int /*long*/ auth, int /*long*/ retrying, int /*long*/ user_data) {
+	/* authentication challenges are currently the only notification received from the session */
+	if (retrying == 0) {
+		failureCount = 0;
+	} else {
+		if (++failureCount >= 3) return 0;
+	}
+
+	int /*long*/ uri = WebKitGTK.soup_message_get_uri (msg);
+	int /*long*/ uriString = WebKitGTK.soup_uri_to_string (uri, 0);
+	int length = C.strlen (uriString);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, uriString, length);
+	OS.g_free (uriString);
+	String location = new String (MozillaDelegate.mbcsToWcs (null, bytes));
+
+	for (int i = 0; i < authenticationListeners.length; i++) {
+		AuthenticationEvent event = new AuthenticationEvent (browser);
+		event.location = location;
+		authenticationListeners[i].authenticate (event);
+		if (!event.doit) {
+			OS.g_signal_stop_emission_by_name (session, WebKitGTK.authenticate);
+			return 0;
+		}
+		if (event.user != null && event.password != null) {
+			byte[] userBytes = Converter.wcsToMbcs (null, event.user, true);
+			byte[] passwordBytes = Converter.wcsToMbcs (null, event.password, true);
+			WebKitGTK.soup_auth_authenticate (auth, userBytes, passwordBytes);
+			OS.g_signal_stop_emission_by_name (session, WebKitGTK.authenticate);
+			return 0;
+		}
+	}
+	return 0;
+}
+
+int /*long*/ webFrameProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case NOTIFY_LOAD_STATUS: return webframe_notify_load_status (handle, arg0);
+		default: return 0;
+	}
+}
+
+int /*long*/ webViewProc (int /*long*/ handle, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case CLOSE_WEB_VIEW: return webkit_close_web_view (handle);
+		case WEB_VIEW_READY: return webkit_web_view_ready (handle);
+		default: return 0;
+	}
+}
+
+int /*long*/ webViewProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case CREATE_WEB_VIEW: return webkit_create_web_view (handle, arg0);
+		case DOWNLOAD_REQUESTED: return webkit_download_requested (handle, arg0);
+		case NOTIFY_LOAD_STATUS: return webkit_notify_load_status (handle, arg0);
+		case NOTIFY_PROGRESS: return webkit_notify_progress (handle, arg0);
+		case NOTIFY_TITLE: return webkit_notify_title (handle, arg0);
+		case POPULATE_POPUP: return webkit_populate_popup (handle, arg0);
+		case STATUS_BAR_TEXT_CHANGED: return webkit_status_bar_text_changed (handle, arg0);
+		default: return 0;
+	}
+}
+
+int /*long*/ webViewProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case HOVERING_OVER_LINK: return webkit_hovering_over_link (handle, arg0, arg1);
+		default: return 0;
+	}
+}
+
+int /*long*/ webViewProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case CONSOLE_MESSAGE: return webkit_console_message (handle, arg0, arg1, arg2);
+		case WINDOW_OBJECT_CLEARED: return webkit_window_object_cleared (handle, arg0, arg1, arg2);
+		default: return 0;
+	}
+}
+
+int /*long*/ webViewProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case MIME_TYPE_POLICY_DECISION_REQUESTED: return webkit_mime_type_policy_decision_requested (handle, arg0, arg1, arg2, arg3);
+		case NAVIGATION_POLICY_DECISION_REQUESTED: return webkit_navigation_policy_decision_requested (handle, arg0, arg1, arg2, arg3);
+		case RESOURCE_REQUEST_STARTING: return webkit_resource_request_starting (handle, arg0, arg1, arg2, arg3);
+		default: return 0;
+	}
+}
+
+public boolean create (Composite parent, int style) {
+	if (!LibraryLoaded) return false;
+
+	if (ExternalClass == 0) {
+		// TODO webkit_check_version() should do the following, but for some reason
+		// this symbol is missing from the latest build.  If it is present in Linux
+		// distro-provided builds then replace the following with this call.
+		int major = WebKitGTK.webkit_major_version ();
+		int minor = WebKitGTK.webkit_minor_version ();
+		int micro = WebKitGTK.webkit_micro_version ();
+		boolean success = major > MIN_VERSION[0] ||
+			(major == MIN_VERSION[0] && minor > MIN_VERSION[1]) ||
+			(major == MIN_VERSION[0] && minor == MIN_VERSION[1] && micro >= MIN_VERSION[2]);
+		if (!success) return false;
+
+		if (Device.DEBUG) {
+			System.out.println("WebKit version " + major + "." + minor + "." + micro); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+		JSClassDefinition jsClassDefinition = new JSClassDefinition ();
+		byte[] bytes = Converter.wcsToMbcs (null, CLASSNAME_EXTERNAL, true);
+		jsClassDefinition.className = C.malloc (bytes.length);
+		OS.memmove (jsClassDefinition.className, bytes, bytes.length);
+		jsClassDefinition.hasProperty = JSObjectHasPropertyProc.getAddress ();
+		jsClassDefinition.getProperty = JSObjectGetPropertyProc.getAddress ();
+		int /*long*/ classDefinitionPtr = C.malloc (JSClassDefinition.sizeof);
+		WebKitGTK.memmove (classDefinitionPtr, jsClassDefinition, JSClassDefinition.sizeof);
+		ExternalClass = WebKitGTK.JSClassCreate (classDefinitionPtr);
+
+		bytes = Converter.wcsToMbcs (null, "POST", true); //$NON-NLS-1$
+		PostString = C.malloc (bytes.length);
+		C.memmove (PostString, bytes, bytes.length);
+	}
+
+    scrolledWindow = OS.gtk_scrolled_window_new (0, 0);
+    OS.gtk_scrolled_window_set_policy (scrolledWindow, OS.GTK_POLICY_AUTOMATIC, OS.GTK_POLICY_AUTOMATIC);
+    webView = WebKitGTK.webkit_web_view_new ();
+    webViewData = C.malloc (C.PTR_SIZEOF);
+    C.memmove (webViewData, new int /*long*/[] {webView}, C.PTR_SIZEOF);
+    OS.gtk_container_add (scrolledWindow, webView);
+    OS.gtk_container_add (browser.handle, scrolledWindow);
+    OS.gtk_widget_show (scrolledWindow);
+	OS.gtk_widget_show (webView);
+	OS.g_signal_connect (webView, WebKitGTK.close_web_view, Proc2.getAddress (), CLOSE_WEB_VIEW);
+	OS.g_signal_connect (webView, WebKitGTK.console_message, Proc5.getAddress (), CONSOLE_MESSAGE);
+	OS.g_signal_connect (webView, WebKitGTK.create_web_view, Proc3.getAddress (), CREATE_WEB_VIEW);
+	OS.g_signal_connect (webView, WebKitGTK.download_requested, Proc3.getAddress (), DOWNLOAD_REQUESTED);
+	OS.g_signal_connect (webView, WebKitGTK.hovering_over_link, Proc4.getAddress (), HOVERING_OVER_LINK);
+	OS.g_signal_connect (webView, WebKitGTK.mime_type_policy_decision_requested, Proc6.getAddress (), MIME_TYPE_POLICY_DECISION_REQUESTED);
+	OS.g_signal_connect (webView, WebKitGTK.navigation_policy_decision_requested, Proc6.getAddress (), NAVIGATION_POLICY_DECISION_REQUESTED);
+    OS.g_signal_connect (webView, WebKitGTK.notify_load_status, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
+    OS.g_signal_connect (webView, WebKitGTK.notify_progress, Proc3.getAddress (), NOTIFY_PROGRESS);
+    OS.g_signal_connect (webView, WebKitGTK.notify_title, Proc3.getAddress (), NOTIFY_TITLE);
+    OS.g_signal_connect (webView, WebKitGTK.populate_popup, Proc3.getAddress (), POPULATE_POPUP);
+    OS.g_signal_connect (webView, WebKitGTK.resource_request_starting, Proc6.getAddress (), RESOURCE_REQUEST_STARTING);
+    OS.g_signal_connect (webView, WebKitGTK.status_bar_text_changed, Proc3.getAddress (), STATUS_BAR_TEXT_CHANGED);
+    OS.g_signal_connect (webView, WebKitGTK.web_view_ready, Proc2.getAddress (), WEB_VIEW_READY);
+    OS.g_signal_connect (webView, WebKitGTK.window_object_cleared, Proc5.getAddress (), WINDOW_OBJECT_CLEARED);
+
+	/* Callback to get events before WebKit receives and consumes them */
+	OS.g_signal_connect (scrolledWindow, OS.event, Proc3.getAddress (), 0);
+	/*
+	* Callbacks to get the events not consumed by WebKit, and to block 
+	* them so that they don't get propagated to the parent handle twice.  
+	* This hook is set after WebKit and is therefore called after WebKit's 
+	* handler because GTK dispatches events in their order of registration.
+	*/
+	OS.g_signal_connect (scrolledWindow, OS.button_press_event, Proc3.getAddress (), STOP_PROPOGATE);
+	OS.g_signal_connect (scrolledWindow, OS.button_release_event, Proc3.getAddress (), STOP_PROPOGATE);
+	OS.g_signal_connect (scrolledWindow, OS.key_press_event, Proc3.getAddress (), STOP_PROPOGATE);
+	OS.g_signal_connect (scrolledWindow, OS.key_release_event, Proc3.getAddress (), STOP_PROPOGATE);
+	OS.g_signal_connect (scrolledWindow, OS.scroll_event, Proc3.getAddress (), STOP_PROPOGATE);
+	OS.g_signal_connect (scrolledWindow, OS.motion_notify_event, Proc3.getAddress (), STOP_PROPOGATE);
+
+    int /*long*/ settings = WebKitGTK.webkit_web_view_get_settings (webView);
+    OS.g_object_set (settings, WebKitGTK.javascript_can_open_windows_automatically, 1, 0);
+    OS.g_object_set (settings, WebKitGTK.enable_universal_access_from_file_uris, 1, 0);
+
+    Listener listener = new Listener () {
+		public void handleEvent (Event event) {
+			switch (event.type) {
+				case SWT.Dispose: {
+					/* make this handler run after other dispose listeners */
+					if (ignoreDispose) {
+						ignoreDispose = false;
+						break;
+					}
+					ignoreDispose = true;
+					browser.notifyListeners (event.type, event);
+					event.type = SWT.NONE;
+					onDispose (event);
+					break;
+				}
+				case SWT.FocusIn: {
+					OS.gtk_widget_grab_focus (webView);
+					break;
+				}
+				case SWT.Resize: {
+					onResize (event);
+					break;
+				}
+			}
+		}
+	};
+	browser.addListener (SWT.Dispose, listener);
+	browser.addListener (SWT.FocusIn, listener);
+	browser.addListener (SWT.KeyDown, listener);
+	browser.addListener (SWT.Resize, listener);
+
+	/*
+	* Ensure that our Authenticate listener is at the front of the signal
+	* queue by removing the default Authenticate listener, adding ours,
+	* and then re-adding the default listener.
+	*/
+	int /*long*/ session = WebKitGTK.webkit_get_default_session ();
+	int /*long*/ originalAuth = WebKitGTK.soup_session_get_feature (session, WebKitGTK.webkit_soup_auth_dialog_get_type ());
+	WebKitGTK.soup_session_feature_detach (originalAuth, session);
+	OS.g_signal_connect (session, WebKitGTK.authenticate, Proc5.getAddress (), webView);
+	WebKitGTK.soup_session_feature_attach (originalAuth, session);
+
+	/*
+	* Check for proxy values set as documented java properties and update the
+	* session to use these values if needed.
+	*/
+	String proxyHost = System.getProperty (PROPERTY_PROXYHOST);
+	String proxyPortString = System.getProperty (PROPERTY_PROXYPORT);
+	int port = -1;
+	if (proxyPortString != null) {
+		try {
+			int value = Integer.valueOf (proxyPortString).intValue ();
+			if (0 <= value && value <= MAX_PORT) port = value;
+		} catch (NumberFormatException e) {
+			/* do nothing, java property has non-integer value */
+		}
+	}
+	if (proxyHost != null || port != -1) {
+		if (!proxyHost.startsWith (PROTOCOL_HTTP)) {
+			proxyHost = PROTOCOL_HTTP + proxyHost;
+		}
+		proxyHost += ":" + port; //$NON-NLS-1$
+		byte[] bytes = Converter.wcsToMbcs (null, proxyHost, true);
+		int /*long*/ uri = WebKitGTK.soup_uri_new (bytes);
+		if (uri != 0) {
+			OS.g_object_set (session, WebKitGTK.SOUP_SESSION_PROXY_URI, uri, 0);
+			WebKitGTK.soup_uri_free (uri);
+		}
+	}
+
+	eventFunction = new BrowserFunction (browser, "HandleWebKitEvent") { //$NON-NLS-1$
+		public Object function(Object[] arguments) {
+			return handleEvent (arguments) ? Boolean.TRUE : Boolean.FALSE;
+		};	
+	};
+
+	/*
+	* Bug in WebKitGTK.  MouseOver/MouseLeave events are not consistently sent from
+	* the DOM when the mouse enters and exits the browser control, see
+	* https://bugs.webkit.org/show_bug.cgi?id=35246.  As a workaround for sending
+	* MouseEnter/MouseExit events, swt's default mouse enter/exit mechanism is used,
+	* but in order to do this the Browser's default sub-window check behavior must
+	* be changed.
+	*/
+	browser.setData (KEY_CHECK_SUBWINDOW, Boolean.FALSE);
+
+	return true;
+}
+
+void addEventHandlers (boolean top) {
+	if (top) {
+		StringBuffer buffer = new StringBuffer ("window.SWTkeyhandler = function SWTkeyhandler(e) {"); //$NON-NLS-1$
+		buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.keyCode, e.charCode, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey);} catch (e) {}};"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('keydown', SWTkeyhandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('keypress', SWTkeyhandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('keyup', SWTkeyhandler, true);"); //$NON-NLS-1$
+		execute (buffer.toString ());
+
+		buffer = new StringBuffer ("window.SWTmousehandler = function SWTmousehandler(e) {"); //$NON-NLS-1$
+		buffer.append ("try {e.returnValue = HandleWebKitEvent(e.type, e.screenX, e.screenY, e.detail, e.button + 1, e.altKey, e.ctrlKey, e.shiftKey, e.metaKey, e.relatedTarget != null);} catch (e) {}};"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('mousedown', SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('mouseup', SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('mousemove', SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('mousewheel', SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("document.addEventListener('dragstart', SWTmousehandler, true);"); //$NON-NLS-1$
+
+		/*
+		* The following two lines are intentionally commented because they cannot be used to
+		* consistently send MouseEnter/MouseExit events until https://bugs.webkit.org/show_bug.cgi?id=35246
+		* is fixed.
+		*/ 
+		//buffer.append ("document.addEventListener('mouseover', SWTmousehandler, true);"); //$NON-NLS-1$
+		//buffer.append ("document.addEventListener('mouseout', SWTmousehandler, true);"); //$NON-NLS-1$
+
+		execute (buffer.toString ());
+	} else {
+		StringBuffer buffer = new StringBuffer ("for (var i = 0; i < frames.length; i++) {"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('keydown', window.SWTkeyhandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('keypress', window.SWTkeyhandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('keyup', window.SWTkeyhandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mousedown', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mouseup', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mousemove', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mouseover', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mouseout', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('mousewheel', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ("frames[i].document.addEventListener('dragstart', window.SWTmousehandler, true);"); //$NON-NLS-1$
+		buffer.append ('}');
+		execute (buffer.toString ());
+	}
+}
+
+public boolean back () {
+	if (WebKitGTK.webkit_web_view_can_go_back (webView) == 0) return false;
+	WebKitGTK.webkit_web_view_go_back (webView);
+	return true;
+}
+
+public boolean close () {
+	return close (true);
+}
+
+boolean close (boolean showPrompters) {
+	if (!jsEnabled) return true;
+
+	String message1 = Compatibility.getMessage("SWT_OnBeforeUnload_Message1"); // $NON-NLS-1$
+	String message2 = Compatibility.getMessage("SWT_OnBeforeUnload_Message2"); // $NON-NLS-1$
+	String functionName = EXECUTE_ID + "CLOSE"; // $NON-NLS-1$
+	StringBuffer buffer = new StringBuffer ("function "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win) {\n"); // $NON-NLS-1$
+	buffer.append ("var fn = win.onbeforeunload; if (fn != null) {try {var str = fn(); "); // $NON-NLS-1$
+	if (showPrompters) {
+		buffer.append ("if (str != null) { "); // $NON-NLS-1$
+		buffer.append ("var result = confirm('"); // $NON-NLS-1$
+		buffer.append (message1);
+		buffer.append ("\\n\\n'+str+'\\n\\n"); // $NON-NLS-1$
+		buffer.append (message2);
+		buffer.append ("');"); // $NON-NLS-1$
+		buffer.append ("if (!result) return false;}"); // $NON-NLS-1$
+	}	
+	buffer.append ("} catch (e) {}}"); // $NON-NLS-1$
+	buffer.append ("try {for (var i = 0; i < win.frames.length; i++) {var result = "); // $NON-NLS-1$
+	buffer.append (functionName);
+	buffer.append ("(win.frames[i]); if (!result) return false;}} catch (e) {} return true;"); // $NON-NLS-1$
+	buffer.append ("\n};"); // $NON-NLS-1$
+	execute (buffer.toString ());
+
+	Boolean result = (Boolean)evaluate ("return " + functionName +"(window);"); // $NON-NLS-1$ // $NON-NLS-2$
+	if (result == null) return false;
+	return result.booleanValue ();
+}
+
+public boolean execute (String script) {
+	int /*long*/ frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
+	int /*long*/ context = WebKitGTK.webkit_web_frame_get_global_context (frame);
+
+	byte[] bytes = null;
+	try {
+		bytes = (script + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, script, true);
+	}
+	int /*long*/ scriptString = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+
+	try {
+		bytes = (getUrl () + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, getUrl (), true);
+	}
+	int /*long*/ urlString = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+
+	int /*long*/ result = WebKitGTK.JSEvaluateScript (context, scriptString, 0, urlString, 0, null);
+	WebKitGTK.JSStringRelease (urlString);
+	WebKitGTK.JSStringRelease (scriptString);
+	return result != 0;
+}
+
+public boolean forward () {
+	if (WebKitGTK.webkit_web_view_can_go_forward (webView) == 0) return false;
+	WebKitGTK.webkit_web_view_go_forward (webView);
+	return true;
+}
+
+public String getBrowserType () {
+	return "webkit"; //$NON-NLS-1$
+}
+
+public String getText () {
+	int /*long*/ frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
+	int /*long*/ source = WebKitGTK.webkit_web_frame_get_data_source (frame);
+	if (source == 0) return "";	//$NON-NLS-1$
+	int /*long*/ data = WebKitGTK.webkit_web_data_source_get_data (source);
+	if (data == 0) return "";	//$NON-NLS-1$
+
+	int /*long*/ encoding = WebKitGTK.webkit_web_data_source_get_encoding (source);
+	int length = OS.strlen (encoding);
+	byte[] bytes = new byte [length];
+	OS.memmove (bytes, encoding, length);
+	String encodingString = new String (Converter.mbcsToWcs (null, bytes));
+
+	int /*long*/ string = OS.GString_str (data);
+	length = OS.GString_len (string);
+	bytes = new byte[length];
+	C.memmove (bytes, string, length);
+
+	try {
+		return new String (bytes, encodingString);
+	} catch (UnsupportedEncodingException e) {
+	}
+	return new String (Converter.mbcsToWcs (null, bytes));
+}
+
+public String getUrl () {
+	int /*long*/ uri = WebKitGTK.webkit_web_view_get_uri (webView);
+
+	/* WebKit auto-navigates to about:blank at startup */
+	if (uri == 0) return ABOUT_BLANK;
+
+	int length = OS.strlen (uri);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, uri, length);
+
+	String url = new String (Converter.mbcsToWcs (null, bytes));
+	/*
+	 * If the URI indicates that the page is being rendered from memory
+	 * (via setText()) then set it to about:blank to be consistent with IE.
+	 */
+	if (url.equals (URI_FILEROOT)) {
+		url = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+			url = ABOUT_BLANK + url.substring (length);
+		}
+	}
+	return url;
+}
+
+boolean handleEvent (Object[] arguments) {
+
+	/*
+	* DOM events are currently received by hooking DOM listeners
+	* in javascript that invoke this method via a BrowserFunction.
+	* It should be possible to replace this mechanism with more
+	* typical callbacks from C once WebKitGTK enhancement request
+	* https://bugs.webkit.org/show_bug.cgi?id=33590 is completed.
+	* In the meantime, the argument lists received here are:
+	* 
+	* For key events:
+	* 	argument 0: type (String)
+	* 	argument 1: keyCode (Double)
+	* 	argument 2: charCode (Double)
+	* 	argument 3: altKey (Boolean)
+	* 	argument 4: ctrlKey (Boolean)
+	* 	argument 5: shiftKey (Boolean)
+	* 	argument 6: metaKey (Boolean)
+	* 	returns doit
+	* 
+	* For mouse events
+	* 	argument 0: type (String)
+	* 	argument 1: screenX (Double)
+	* 	argument 2: screenY (Double)
+	* 	argument 3: detail (Double)
+	* 	argument 4: button (Double)
+	* 	argument 5: altKey (Boolean)
+	* 	argument 6: ctrlKey (Boolean)
+	* 	argument 7: shiftKey (Boolean)
+	* 	argument 8: metaKey (Boolean)
+	* 	argument 9: hasRelatedTarget (Boolean)
+	* 	returns doit
+	*/
+
+	String type = (String)arguments[0];
+	if (type.equals (DOMEVENT_KEYDOWN)) {
+		int keyCode = translateKey (((Double)arguments[1]).intValue ());
+		lastKeyCode = keyCode;
+		switch (keyCode) {
+			case SWT.SHIFT:
+			case SWT.CONTROL:
+			case SWT.ALT:
+			case SWT.CAPS_LOCK:
+			case SWT.NUM_LOCK:
+			case SWT.SCROLL_LOCK:
+			case SWT.COMMAND:
+			case SWT.ESC:
+			case SWT.TAB:
+			case SWT.PAUSE:
+			case SWT.BS:
+			case SWT.INSERT:
+			case SWT.DEL:
+			case SWT.HOME:
+			case SWT.END:
+			case SWT.PAGE_UP:
+			case SWT.PAGE_DOWN:
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT:
+			case SWT.ARROW_RIGHT:
+			case SWT.F1:
+			case SWT.F2:
+			case SWT.F3:
+			case SWT.F4:
+			case SWT.F5:
+			case SWT.F6:
+			case SWT.F7:
+			case SWT.F8:
+			case SWT.F9:
+			case SWT.F10:
+			case SWT.F11:
+			case SWT.F12: {
+				/* keypress events will not be received for these keys, so send KeyDowns for them now */
+
+				Event keyEvent = new Event ();
+				keyEvent.widget = browser;
+				keyEvent.type = type.equals (DOMEVENT_KEYDOWN) ? SWT.KeyDown : SWT.KeyUp;
+				keyEvent.keyCode = keyCode;
+				switch (keyCode) {
+					case SWT.BS: keyEvent.character = SWT.BS; break;
+					case SWT.DEL: keyEvent.character = SWT.DEL; break;
+					case SWT.ESC: keyEvent.character = SWT.ESC; break;
+					case SWT.TAB: keyEvent.character = SWT.TAB; break;
+				}
+				lastCharCode = keyEvent.character;
+				keyEvent.stateMask =
+					(((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
+					(((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
+					(((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
+					(((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
+				keyEvent.stateMask &= ~keyCode;		/* remove current keydown if it's a state key */
+				final int stateMask = keyEvent.stateMask;
+				if (!sendKeyEvent (keyEvent) || browser.isDisposed ()) return false;
+
+				if (browser.isFocusControl ()) {
+					if (keyCode == SWT.TAB && (stateMask & (SWT.CTRL | SWT.ALT)) == 0) {
+						browser.getDisplay ().asyncExec (new Runnable () {
+							public void run () {
+								if (browser.isDisposed ()) return;
+								if (browser.getDisplay ().getFocusControl () == null) {
+									int traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+									browser.traverse (traversal);
+								}
+							}
+						});
+					}
+				}
+				break;
+			}
+		}
+		return true;
+	}
+
+	if (type.equals (DOMEVENT_KEYPRESS)) {
+		/*
+		* if keydown could not determine a keycode for this key then it's a
+		* key for which key events are not sent (eg.- the Windows key)
+		*/
+		if (lastKeyCode == 0) return true;
+
+		lastCharCode = ((Double)arguments[2]).intValue ();
+		if (((Boolean)arguments[4]).booleanValue () && (0 <= lastCharCode && lastCharCode <= 0x7F)) {
+			if ('a' <= lastCharCode && lastCharCode <= 'z') lastCharCode -= 'a' - 'A';
+			if (64 <= lastCharCode && lastCharCode <= 95) lastCharCode -= 64;
+		}
+
+		Event keyEvent = new Event ();
+		keyEvent.widget = browser;
+		keyEvent.type = SWT.KeyDown;
+		keyEvent.keyCode = lastKeyCode;
+		keyEvent.character = (char)lastCharCode;
+		keyEvent.stateMask =
+			(((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
+			(((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
+			(((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
+			(((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
+		return sendKeyEvent (keyEvent) && !browser.isDisposed ();
+	}
+
+	if (type.equals(DOMEVENT_KEYUP)) {
+		int keyCode = translateKey (((Double)arguments[1]).intValue ());
+		if (keyCode == 0) {
+			/* indicates a key for which key events are not sent */
+			return true;
+		}
+		if (keyCode != lastKeyCode) {
+			/* keyup does not correspond to the last keydown */
+			lastKeyCode = keyCode;
+			lastCharCode = 0;
+		}
+
+		Event keyEvent = new Event ();
+		keyEvent.widget = browser;
+		keyEvent.type = SWT.KeyUp;
+		keyEvent.keyCode = lastKeyCode;
+		keyEvent.character = (char)lastCharCode;
+		keyEvent.stateMask =
+			(((Boolean)arguments[3]).booleanValue () ? SWT.ALT : 0) |
+			(((Boolean)arguments[4]).booleanValue () ? SWT.CTRL : 0) |
+			(((Boolean)arguments[5]).booleanValue () ? SWT.SHIFT : 0) |
+			(((Boolean)arguments[6]).booleanValue () ? SWT.COMMAND : 0);
+		switch (lastKeyCode) {
+			case SWT.SHIFT:
+			case SWT.CONTROL:
+			case SWT.ALT:
+			case SWT.COMMAND: {
+				keyEvent.stateMask |= lastKeyCode;
+			}
+		}
+		browser.notifyListeners (keyEvent.type, keyEvent);
+		lastKeyCode = lastCharCode = 0;
+		return keyEvent.doit && !browser.isDisposed ();
+	}
+
+	/* mouse events */
+
+	/*
+	 * MouseOver and MouseOut events are fired any time the mouse enters or exits
+	 * any element within the Browser.  To ensure that SWT events are only
+	 * fired for mouse movements into or out of the Browser, do not fire an
+	 * event if there is a related target element.
+	 */
+
+	/*
+	* The following is intentionally commented because MouseOver and MouseOut events
+	* are not being hooked until https://bugs.webkit.org/show_bug.cgi?id=35246 is fixed.
+	*/ 
+	//if (type.equals (DOMEVENT_MOUSEOVER) || type.equals (DOMEVENT_MOUSEOUT)) {
+	//	if (((Boolean)arguments[9]).booleanValue ()) return true;
+	//}
+
+	/*
+	 * The position of mouse events is received in screen-relative coordinates
+	 * in order to handle pages with frames, since frames express their event
+	 * coordinates relative to themselves rather than relative to their top-
+	 * level page.  Convert screen-relative coordinates to be browser-relative.
+	 */
+	Point position = new Point (((Double)arguments[1]).intValue (), ((Double)arguments[2]).intValue ());
+	position = browser.getDisplay ().map (null, browser, position); 
+
+	Event mouseEvent = new Event ();
+	mouseEvent.widget = browser;
+	mouseEvent.x = position.x;
+	mouseEvent.y = position.y;
+	int mask =
+		(((Boolean)arguments[5]).booleanValue () ? SWT.ALT : 0) |
+		(((Boolean)arguments[6]).booleanValue () ? SWT.CTRL : 0) |
+		(((Boolean)arguments[7]).booleanValue () ? SWT.SHIFT : 0) |
+		(((Boolean)arguments[8]).booleanValue () ? SWT.COMMAND : 0);
+	mouseEvent.stateMask = mask;
+
+	if (type.equals (DOMEVENT_MOUSEDOWN)) {
+		mouseEvent.type = SWT.MouseDown;
+		mouseEvent.count = ((Double)arguments[3]).intValue ();
+		mouseEvent.button = ((Double)arguments[4]).intValue ();
+		browser.notifyListeners (mouseEvent.type, mouseEvent);
+		if (browser.isDisposed ()) return true;
+		if (((Double)arguments[3]).intValue () == 2) {
+			mouseEvent = new Event ();
+			mouseEvent.type = SWT.MouseDoubleClick;
+			mouseEvent.widget = browser;
+			mouseEvent.x = position.x;
+			mouseEvent.y = position.y;
+			mouseEvent.stateMask = mask;
+			mouseEvent.count = ((Double)arguments[3]).intValue ();
+			mouseEvent.button = ((Double)arguments[4]).intValue ();
+			browser.notifyListeners (mouseEvent.type, mouseEvent);
+		}
+		return true;
+	}
+
+	if (type.equals (DOMEVENT_MOUSEUP)) {
+		mouseEvent.type = SWT.MouseUp;
+		mouseEvent.count = ((Double)arguments[3]).intValue ();
+		mouseEvent.button = ((Double)arguments[4]).intValue ();
+	} else if (type.equals (DOMEVENT_MOUSEMOVE)) {
+		mouseEvent.type = SWT.MouseMove;
+	} else if (type.equals (DOMEVENT_MOUSEWHEEL)) {
+		mouseEvent.type = SWT.MouseWheel;
+		mouseEvent.count = ((Double)arguments[3]).intValue ();
+
+	/*
+	* The following is intentionally commented because MouseOver and MouseOut events
+	* are not being hooked until https://bugs.webkit.org/show_bug.cgi?id=35246 is fixed.
+	*/ 
+	//} else if (type.equals (DOMEVENT_MOUSEOVER)) {
+	//	mouseEvent.type = SWT.MouseEnter;
+	//} else if (type.equals (DOMEVENT_MOUSEOUT)) {
+	//	mouseEvent.type = SWT.MouseExit;
+
+	} else if (type.equals (DOMEVENT_DRAGSTART)) {
+		mouseEvent.type = SWT.DragDetect;
+		mouseEvent.button = ((Double)arguments[4]).intValue () + 1;
+		switch (mouseEvent.button) {
+			case 1: mouseEvent.stateMask |= SWT.BUTTON1; break;
+			case 2: mouseEvent.stateMask |= SWT.BUTTON2; break;
+			case 3: mouseEvent.stateMask |= SWT.BUTTON3; break;
+			case 4: mouseEvent.stateMask |= SWT.BUTTON4; break;
+			case 5: mouseEvent.stateMask |= SWT.BUTTON5; break;
+		}
+		browser.notifyListeners (mouseEvent.type, mouseEvent);
+		/*
+		* Bug in WebKitGTK.  Dragging an image quickly and repeatedly can cause
+		* WebKitGTK to take the mouse grab indefinitely and lock up the display,
+		* see https://bugs.webkit.org/show_bug.cgi?id=32840.  The workaround is
+		* to veto all drag attempts.
+		*/
+		return false;
+	}
+
+	browser.notifyListeners (mouseEvent.type, mouseEvent);
+	return true;
+}
+
+int /*long*/ handleLoadCommitted (int /*long*/ uri, boolean top) {
+	int length = OS.strlen (uri);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, uri, length);
+	String url = new String (Converter.mbcsToWcs (null, bytes));
+	/*
+	 * If the URI indicates that the page is being rendered from memory
+	 * (via setText()) then set it to about:blank to be consistent with IE.
+	 */
+	if (url.equals (URI_FILEROOT)) {
+		url = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+			url = ABOUT_BLANK + url.substring (length);
+		}
+	}
+
+	/*
+	* Each invocation of setText() causes webkit_notify_load_status to be invoked
+	* twice, once for the initial navigate to about:blank, and once for the auto-navigate
+	* to about:blank that WebKit does when webkit_web_view_load_string is invoked.  If
+	* this is the first webkit_notify_load_status callback received for a setText()
+	* invocation then do not send any events or re-install registered BrowserFunctions. 
+	*/
+	if (top && url.startsWith(ABOUT_BLANK) && htmlBytes != null) return 0;
+
+	LocationEvent event = new LocationEvent (browser);
+	event.display = browser.getDisplay ();
+	event.widget = browser;
+	event.location = url;
+	event.top = top;
+	for (int i = 0; i < locationListeners.length; i++) {
+		locationListeners[i].changed (event);
+	}
+	return 0;
+}
+
+int /*long*/ handleLoadFinished (int /*long*/ uri, boolean top) {
+	int length = OS.strlen (uri);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, uri, length);
+	String url = new String (Converter.mbcsToWcs (null, bytes));
+	/*
+	 * If the URI indicates that the page is being rendered from memory
+	 * (via setText()) then set it to about:blank to be consistent with IE.
+	 */
+	if (url.equals (URI_FILEROOT)) {
+		url = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+			url = ABOUT_BLANK + url.substring (length);
+		}
+	}
+
+	/*
+	 * If htmlBytes is not null then there is html from a previous setText() call
+	 * waiting to be set into the about:blank page once it has completed loading. 
+	 */
+	if (top && htmlBytes != null) {
+		if (url.startsWith(ABOUT_BLANK)) {
+			loadingText = true;
+			byte[] mimeType = Converter.wcsToMbcs (null, "text/html", true);  //$NON-NLS-1$
+			byte[] encoding = Converter.wcsToMbcs (null, CHARSET_UTF8, true);  //$NON-NLS-1$
+			byte[] uriBytes;
+			if (untrustedText) {
+				uriBytes = Converter.wcsToMbcs (null, ABOUT_BLANK, true);
+			} else {
+				uriBytes = Converter.wcsToMbcs (null, URI_FILEROOT, true);
+			}
+			WebKitGTK.webkit_web_view_load_string (webView, htmlBytes, mimeType, encoding, uriBytes);
+			htmlBytes = null;
+		}
+	}
+
+	/*
+	* The webkit_web_view_load_string() invocation above will trigger a second
+	* webkit_web_view_load_string callback when it is completed.  Wait for this
+	* second callback to come before sending the title or completed events.
+	*/
+	if (!loadingText) {
+		/*
+		* To be consistent with other platforms a title event should be fired
+		* when a top-level page has completed loading.  A page with a <title>
+		* tag will do this automatically when the notify::title signal is received.
+		* However a page without a <title> tag will not do this by default, so fire
+		* the event here with the page's url as the title.
+		*/
+		if (top) {
+			int /*long*/ frame = WebKitGTK.webkit_web_view_get_main_frame (webView);
+			int /*long*/ title = WebKitGTK.webkit_web_frame_get_title (frame);
+			if (title == 0) {
+				TitleEvent newEvent = new TitleEvent (browser);
+				newEvent.display = browser.getDisplay ();
+				newEvent.widget = browser;
+				newEvent.title = url;
+				for (int i = 0; i < titleListeners.length; i++) {
+					titleListeners[i].changed (newEvent);
+				}
+				if (browser.isDisposed ()) return 0;
+			}
+		}
+
+		ProgressEvent progress = new ProgressEvent (browser);
+		progress.display = browser.getDisplay ();
+		progress.widget = browser;
+		progress.current = MAX_PROGRESS;
+		progress.total = MAX_PROGRESS;
+		for (int i = 0; i < progressListeners.length; i++) {
+			progressListeners[i].completed (progress);
+		}
+	}
+	loadingText = false;
+
+	return 0;
+}
+
+public boolean isBackEnabled () {
+	return WebKitGTK.webkit_web_view_can_go_back (webView) != 0;
+}
+
+public boolean isForwardEnabled () {
+	return WebKitGTK.webkit_web_view_can_go_forward (webView) != 0;
+}
+
+void onDispose (Event e) {
+	/* Browser could have been disposed by one of the Dispose listeners */
+	if (!browser.isDisposed()) {
+		/* invoke onbeforeunload handlers */
+		if (!browser.isClosing) {
+			close (false);
+		}
+	}
+
+	Enumeration elements = functions.elements ();
+	while (elements.hasMoreElements ()) {
+		((BrowserFunction)elements.nextElement ()).dispose (false);
+	}
+	functions = null;
+
+	C.free (webViewData);
+	postData = null;
+	headers = null;
+	htmlBytes = null;
+}
+
+void onResize (Event e) {
+	Rectangle rect = browser.getClientArea ();
+	OS.gtk_widget_set_size_request (scrolledWindow, rect.width, rect.height);
+}
+
+void openDownloadWindow (final int /*long*/ webkitDownload) {
+	final Shell shell = new Shell ();
+	String msg = Compatibility.getMessage ("SWT_FileDownload"); //$NON-NLS-1$
+	shell.setText (msg);
+	GridLayout gridLayout = new GridLayout ();
+	gridLayout.marginHeight = 15;
+	gridLayout.marginWidth = 15;
+	gridLayout.verticalSpacing = 20;
+	shell.setLayout (gridLayout);
+
+	int /*long*/ name = WebKitGTK.webkit_download_get_suggested_filename (webkitDownload);
+	int length = OS.strlen (name);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, name, length);
+	String nameString = new String (Converter.mbcsToWcs (null, bytes));
+	int /*long*/ url = WebKitGTK.webkit_download_get_uri (webkitDownload);
+	length = OS.strlen (url);
+	bytes = new byte[length];
+	OS.memmove (bytes, url, length);
+	String urlString = new String (Converter.mbcsToWcs (null, bytes));
+	msg = Compatibility.getMessage ("SWT_Download_Location", new Object[] {nameString, urlString}); //$NON-NLS-1$
+	Label nameLabel = new Label (shell, SWT.WRAP);
+	nameLabel.setText (msg);
+	GridData data = new GridData ();
+	Monitor monitor = browser.getMonitor ();
+	int maxWidth = monitor.getBounds ().width / 2;
+	int width = nameLabel.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
+	data.widthHint = Math.min (width, maxWidth);
+	data.horizontalAlignment = GridData.FILL;
+	data.grabExcessHorizontalSpace = true;
+	nameLabel.setLayoutData (data);
+
+	final Label statusLabel = new Label (shell, SWT.NONE);
+	statusLabel.setText (Compatibility.getMessage ("SWT_Download_Started")); //$NON-NLS-1$
+	data = new GridData (GridData.FILL_BOTH);
+	statusLabel.setLayoutData (data);
+
+	final Button cancel = new Button (shell, SWT.PUSH);
+	cancel.setText (Compatibility.getMessage ("SWT_Cancel")); //$NON-NLS-1$
+	data = new GridData ();
+	data.horizontalAlignment = GridData.CENTER;
+	cancel.setLayoutData (data);
+	final Listener cancelListener = new Listener () {
+		public void handleEvent (Event event) {
+			WebKitGTK.webkit_download_cancel (webkitDownload);
+		}
+	};
+	cancel.addListener (SWT.Selection, cancelListener);
+
+	OS.g_object_ref (webkitDownload);
+	final Display display = browser.getDisplay ();
+	final int INTERVAL = 500;
+	display.timerExec (INTERVAL, new Runnable () {
+		public void run () {
+			int status = WebKitGTK.webkit_download_get_status (webkitDownload);
+			if (shell.isDisposed () || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_FINISHED || status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_CANCELLED) {
+				shell.dispose ();
+				display.timerExec (-1, this);
+				OS.g_object_unref (webkitDownload);
+				return;
+			}
+			if (status == WebKitGTK.WEBKIT_DOWNLOAD_STATUS_ERROR) {
+				statusLabel.setText (Compatibility.getMessage ("SWT_Download_Error")); //$NON-NLS-1$
+				display.timerExec (-1, this);
+				OS.g_object_unref (webkitDownload);
+				cancel.removeListener (SWT.Selection, cancelListener);
+				cancel.addListener (SWT.Selection, new Listener () {
+					public void handleEvent (Event event) {
+						shell.dispose ();
+					}
+				});
+				return;
+			}
+
+			long current = WebKitGTK.webkit_download_get_current_size (webkitDownload) / 1024L;
+			long total = WebKitGTK.webkit_download_get_total_size (webkitDownload) / 1024L;
+			String message = Compatibility.getMessage ("SWT_Download_Status", new Object[] {new Long(current), new Long(total)}); //$NON-NLS-1$
+			statusLabel.setText (message);
+			display.timerExec (INTERVAL, this);
+		}
+	});
+
+	shell.pack ();
+	shell.open ();
+}
+
+public void refresh () {
+	WebKitGTK.webkit_web_view_reload (webView);
+}
+
+public boolean setText (String html, boolean trusted) {
+	/* convert the String containing HTML to an array of bytes with UTF-8 data */
+	byte[] bytes = null;
+	try {
+		bytes = (html + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, html, true);
+	}
+
+	/*
+	* If this.htmlBytes is not null then the about:blank page is already being loaded,
+	* so no navigate is required.  Just set the html that is to be shown.
+	*/
+	boolean blankLoading = htmlBytes != null;
+	htmlBytes = bytes;
+	untrustedText = !trusted;
+	if (blankLoading) return true;
+
+	byte[] uriBytes = Converter.wcsToMbcs (null, ABOUT_BLANK, true);
+	WebKitGTK.webkit_web_view_load_uri (webView, uriBytes);
+	return true;
+}
+
+public boolean setUrl (String url, String postData, String[] headers) {
+	this.postData = postData;
+	this.headers = headers;
+
+	/*
+	* WebKitGTK attempts to open the exact url string that is passed to it and
+	* will not infer a protocol if it's not specified.  Detect the case of an
+	* invalid URL string and try to fix it by prepending an appropriate protocol.
+	*/
+	try {
+		new URL(url);
+	} catch (MalformedURLException e) {
+		String testUrl = null;
+		if (url.charAt (0) == SEPARATOR_FILE) {
+			/* appears to be a local file */
+			testUrl = PROTOCOL_FILE + url; 
+		} else {
+			testUrl = PROTOCOL_HTTP + url;
+		}
+		try {
+			new URL (testUrl);
+			url = testUrl;		/* adding the protocol made the url valid */
+		} catch (MalformedURLException e2) {
+			/* adding the protocol did not make the url valid, so do nothing */
+		}
+	}
+
+	/*
+	* Feature of WebKit.  The user-agent header value cannot be overridden
+	* by changing it in the resource request.  The workaround is to detect
+	* here whether the user-agent is being overridden, and if so, temporarily
+	* set the value on the WebView when initiating the load request and then
+	* remove it afterwards.
+	*/
+	int /*long*/ settings = WebKitGTK.webkit_web_view_get_settings (webView);
+	if (headers != null) {
+		for (int i = 0; i < headers.length; i++) {
+			String current = headers[i];
+			if (current != null) {
+				int index = current.indexOf (':');
+				if (index != -1) {
+					String key = current.substring (0, index).trim ();
+					String value = current.substring (index + 1).trim ();
+					if (key.length () > 0 && value.length () > 0) {
+						if (key.equalsIgnoreCase (USER_AGENT)) {
+							byte[] bytes = Converter.wcsToMbcs (null, value, true);
+							OS.g_object_set (settings, WebKitGTK.user_agent, bytes, 0);
+						}
+					}
+				}
+			}
+		}
+	}
+	byte[] uriBytes = Converter.wcsToMbcs (null, url, true);
+	WebKitGTK.webkit_web_view_load_uri (webView, uriBytes);
+	OS.g_object_set (settings, WebKitGTK.user_agent, 0, 0);
+	return true;
+}
+
+public void stop () {
+	WebKitGTK.webkit_web_view_stop_loading (webView);
+}
+
+int /*long*/ webframe_notify_load_status (int /*long*/ web_frame, int /*long*/ pspec) {
+	int status = WebKitGTK.webkit_web_frame_get_load_status (web_frame);
+	switch (status) {
+		case WebKitGTK.WEBKIT_LOAD_COMMITTED: {
+			int /*long*/ uri = WebKitGTK.webkit_web_frame_get_uri (web_frame);
+			return handleLoadCommitted (uri, false);
+		}
+		case WebKitGTK.WEBKIT_LOAD_FINISHED: {
+			/*
+			* If this frame navigation was isolated to this frame (eg.- a link was
+			* clicked in the frame, as opposed to this frame being created in
+			* response to navigating to a main document containing frames) then
+			* treat this as a completed load.
+			*/
+			int /*long*/ parentFrame = WebKitGTK.webkit_web_frame_get_parent (web_frame);
+			if (WebKitGTK.webkit_web_frame_get_load_status (parentFrame) == WebKitGTK.WEBKIT_LOAD_FINISHED) {
+				int /*long*/ uri = WebKitGTK.webkit_web_frame_get_uri (web_frame);
+				return handleLoadFinished (uri, false);
+			}
+		}
+	}
+	return 0;
+}
+
+int /*long*/ webkit_close_web_view (int /*long*/ web_view) {
+	WindowEvent newEvent = new WindowEvent (browser);
+	newEvent.display = browser.getDisplay ();
+	newEvent.widget = browser;
+	for (int i = 0; i < closeWindowListeners.length; i++) {
+		closeWindowListeners[i].close (newEvent);
+	}
+	browser.dispose ();
+	return 0;
+}
+
+int /*long*/ webkit_console_message (int /*long*/ web_view, int /*long*/ message, int /*long*/ line, int /*long*/ source_id) {
+	return 1;	/* stop the message from being written to stderr */
+}
+
+int /*long*/ webkit_create_web_view (int /*long*/ web_view, int /*long*/ frame) {
+	WindowEvent newEvent = new WindowEvent (browser);
+	newEvent.display = browser.getDisplay ();
+	newEvent.widget = browser;
+	newEvent.required = true;
+	if (openWindowListeners != null) {
+		for (int i = 0; i < openWindowListeners.length; i++) {
+			openWindowListeners[i].open (newEvent);
+		}
+	}
+	Browser browser = null;
+	if (newEvent.browser != null && newEvent.browser.webBrowser instanceof WebKit) {
+		browser = newEvent.browser;
+	}
+	if (browser != null && !browser.isDisposed ()) {
+		return ((WebKit)browser.webBrowser).webView;
+	}
+	return 0;
+}
+
+int /*long*/ webkit_download_requested (int /*long*/ web_view, int /*long*/ download) {
+	int /*long*/ name = WebKitGTK.webkit_download_get_suggested_filename (download);
+	int length = OS.strlen (name);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, name, length);
+	String nameString = new String (Converter.mbcsToWcs (null, bytes));
+	FileDialog dialog = new FileDialog (browser.getShell (), SWT.OPEN);
+	dialog.setFileName (nameString);
+	String title = Compatibility.getMessage ("SWT_FileDownload"); //$NON-NLS-1$
+	dialog.setText (title);
+	String path = dialog.open ();
+
+	if (path != null) {
+		path = URI_FILEROOT + path;
+		byte[] uriBytes = Converter.wcsToMbcs (null, path, true);
+		WebKitGTK.webkit_download_set_destination_uri (download, uriBytes);
+		openDownloadWindow (download);
+	} else {
+		WebKitGTK.webkit_download_cancel (download);
+	}
+	return 1;
+}
+
+int /*long*/ webkit_hovering_over_link (int /*long*/ web_view, int /*long*/ title, int /*long*/ uri) {
+	if (uri != 0) {
+		int length = OS.strlen (uri);
+		byte[] bytes = new byte[length];
+		OS.memmove (bytes, uri, length);
+		String text = new String (Converter.mbcsToWcs (null, bytes));
+		StatusTextEvent event = new StatusTextEvent (browser);
+		event.display = browser.getDisplay ();
+		event.widget = browser;
+		event.text = text;
+		for (int i = 0; i < statusTextListeners.length; i++) {
+			statusTextListeners[i].changed (event);
+		}
+	}
+	return 0;
+}
+
+int /*long*/ webkit_mime_type_policy_decision_requested (int /*long*/ web_view, int /*long*/ frame, int /*long*/ request, int /*long*/ mimetype, int /*long*/ policy_decision) {
+	boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mimetype) != 0;
+	if (!canShow) {
+		WebKitGTK.webkit_web_policy_decision_download (policy_decision);
+		return 1;
+	}
+	return 0;
+}
+
+int /*long*/ webkit_navigation_policy_decision_requested (int /*long*/ web_view, int /*long*/ frame, int /*long*/ request, int /*long*/ navigation_action, int /*long*/ policy_decision) {
+	if (loadingText) {
+		/* 
+		 * WebKit is auto-navigating to about:blank in response to a
+		 * webkit_web_view_load_string() invocation.  This navigate
+		 * should always proceed without sending an event since it is
+		 * preceded by an explicit navigate to about:blank in setText().
+		 */
+		return 0;
+	}
+
+	int /*long*/ uri = WebKitGTK.webkit_network_request_get_uri (request);
+	int length = OS.strlen (uri);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, uri, length);
+
+	String url = new String (Converter.mbcsToWcs (null, bytes));
+	/*
+	 * If the URI indicates that the page is being rendered from memory
+	 * (via setText()) then set it to about:blank to be consistent with IE.
+	 */
+	if (url.equals (URI_FILEROOT)) {
+		url = ABOUT_BLANK;
+	} else {
+		length = URI_FILEROOT.length ();
+		if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+			url = ABOUT_BLANK + url.substring (length);
+		}
+	}
+
+	LocationEvent newEvent = new LocationEvent (browser);
+	newEvent.display = browser.getDisplay ();
+	newEvent.widget = browser;
+	newEvent.location = url;
+	newEvent.doit = true;
+	if (locationListeners != null) {
+		for (int i = 0; i < locationListeners.length; i++) {
+			locationListeners[i].changing (newEvent);
+		}
+	}
+	if (newEvent.doit && !browser.isDisposed ()) {
+		if (jsEnabledChanged) {
+			jsEnabledChanged = false;
+			int /*long*/ settings = WebKitGTK.webkit_web_view_get_settings (webView);
+			OS.g_object_set (settings, WebKitGTK.enable_scripts, jsEnabled ? 1 : 0, 0);
+		}
+
+		/* hook status change signal if frame is a newly-created sub-frame */
+		int /*long*/ mainFrame = WebKitGTK.webkit_web_view_get_main_frame (webView);
+		if (frame != mainFrame) {
+			int id = OS.g_signal_handler_find (frame, OS.G_SIGNAL_MATCH_FUNC | OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
+			if (id == 0) {
+				OS.g_signal_connect (frame, WebKitGTK.notify_load_status, Proc3.getAddress (), NOTIFY_LOAD_STATUS);
+			}
+		}
+
+		/*
+		* The following line is intentionally commented.  For some reason, invoking 
+		* webkit_web_policy_decision_use(policy_decision) causes the Flash plug-in
+		* to crash when navigating to a page with Flash.  Since returning from this
+		* callback without invoking webkit_web_policy_decision_ignore(policy_decision)
+		* implies that the page should be loaded, it's fine to not invoke
+		* webkit_web_policy_decision_use(policy_decision) here. 
+		*/
+		//WebKitGTK.webkit_web_policy_decision_use (policy_decision);
+	} else {
+		WebKitGTK.webkit_web_policy_decision_ignore (policy_decision);
+	}
+	return 0;
+}
+
+int /*long*/ webkit_notify_load_status (int /*long*/ web_view, int /*long*/ pspec) {
+	int status = WebKitGTK.webkit_web_view_get_load_status (webView);
+	switch (status) {
+		case WebKitGTK.WEBKIT_LOAD_COMMITTED: {
+			int /*long*/ uri = WebKitGTK.webkit_web_view_get_uri (webView);
+			return handleLoadCommitted (uri, true);
+		}
+		case WebKitGTK.WEBKIT_LOAD_FINISHED: {
+			int /*long*/ uri = WebKitGTK.webkit_web_view_get_uri (webView);
+			return handleLoadFinished (uri, true);
+		}
+	}
+	return 0;
+}
+
+int /*long*/ webkit_notify_progress (int /*long*/ web_view, int /*long*/ pspec) {
+	ProgressEvent event = new ProgressEvent (browser);
+	event.display = browser.getDisplay ();
+	event.widget = browser;
+	event.current = (int)(WebKitGTK.webkit_web_view_get_progress (webView) * MAX_PROGRESS);
+	event.total = MAX_PROGRESS;
+	for (int i = 0; i < progressListeners.length; i++) {
+		progressListeners[i].changed (event);				
+	}
+	return 0;
+}
+
+int /*long*/ webkit_notify_title (int /*long*/ web_view, int /*long*/ pspec) {
+	int /*long*/ title = WebKitGTK.webkit_web_view_get_title (webView);
+	String titleString;
+	if (title == 0) {
+		titleString = ""; //$NON-NLS-1$
+	} else {
+		int length = OS.strlen (title);
+		byte[] bytes = new byte[length];
+		OS.memmove (bytes, title, length);
+		titleString = new String (Converter.mbcsToWcs (null, bytes));
+	}
+	TitleEvent event = new TitleEvent (browser);
+	event.display = browser.getDisplay ();
+	event.widget = browser;
+	event.title = titleString;
+	for (int i = 0; i < titleListeners.length; i++) {
+		titleListeners[i].changed (event);
+	}
+	return 0;
+}
+
+int /*long*/ webkit_populate_popup (int /*long*/ web_view, int /*long*/ webkit_menu) {
+	Point pt = browser.getDisplay ().getCursorLocation ();
+	Event event = new Event ();
+	event.x = pt.x;
+	event.y = pt.y;
+	browser.notifyListeners (SWT.MenuDetect, event);
+	if (!event.doit) {
+		/* clear the menu */
+		int /*long*/ children = OS.gtk_container_get_children (webkit_menu);
+		int /*long*/ current = children;
+		while (current != 0) {
+			int /*long*/ item = OS.g_list_data (current);
+			OS.gtk_container_remove (webkit_menu, item);
+			current = OS.g_list_next (current);
+		}
+		OS.g_list_free (children);
+		return 0;
+	}
+	Menu menu = browser.getMenu ();
+	if (menu != null && !menu.isDisposed ()) {
+		if (pt.x != event.x || pt.y != event.y) {
+			menu.setLocation (event.x, event.y);
+		}
+		menu.setVisible (true);
+		/* clear the menu */
+		int /*long*/ children = OS.gtk_container_get_children (webkit_menu);
+		int /*long*/ current = children;
+		while (current != 0) {
+			int /*long*/ item = OS.g_list_data (current);
+			OS.gtk_container_remove (webkit_menu, item);
+			current = OS.g_list_next (current);
+		}
+		OS.g_list_free (children);
+	}
+	return 0;
+}
+
+int /*long*/ webkit_resource_request_starting (int /*long*/ web_view, int /*long*/ web_frame, int /*long*/ web_resource, int /*long*/ request, int /*long*/ response) {
+	if (postData != null || headers != null) {
+		int /*long*/ message = WebKitGTK.webkit_network_request_get_message (request);
+		if (message == 0) {
+			headers = null;
+			postData = null;
+		} else {
+			if (postData != null) {
+				WebKitGTK.SoupMessage_method (message, PostString);
+				int /*long*/ body = WebKitGTK.SoupMessage_request_body (message);
+				byte[] bytes = Converter.wcsToMbcs (null, postData, false);
+				int /*long*/ data = C.malloc (bytes.length);
+				C.memmove (data, bytes, bytes.length);
+				WebKitGTK.soup_message_body_append (body, WebKitGTK.SOUP_MEMORY_TAKE, data, bytes.length);
+				WebKitGTK.soup_message_body_flatten (body);
+
+				if (headers == null) headers = new String[0];
+				String[] temp = new String[headers.length + 1];
+				System.arraycopy (headers, 0, temp, 0, headers.length);
+				temp[headers.length] = ENCODING_FORM;
+				headers = temp;
+				postData = null;
+			}
+
+			/* headers */
+			int /*long*/ requestHeaders = WebKitGTK.SoupMessage_request_headers (message);
+			for (int i = 0; i < headers.length; i++) {
+				String current = headers[i];
+				if (current != null) {
+					int index = current.indexOf (':');
+					if (index != -1) {
+						String key = current.substring (0, index).trim ();
+						String value = current.substring (index + 1).trim ();
+						if (key.length () > 0 && value.length () > 0) {
+							byte[] nameBytes = Converter.wcsToMbcs (null, key, true);
+							byte[] valueBytes = Converter.wcsToMbcs (null, value, true);
+							WebKitGTK.soup_message_headers_append (requestHeaders, nameBytes, valueBytes);
+						}
+					}
+				}
+			}
+			headers = null;
+		}
+	}
+
+	return 0;
+}
+
+int /*long*/ webkit_status_bar_text_changed (int /*long*/ web_view, int /*long*/ text) {
+	int length = OS.strlen (text);
+	byte[] bytes = new byte[length];
+	OS.memmove (bytes, text, length);
+	StatusTextEvent statusText = new StatusTextEvent (browser);
+	statusText.display = browser.getDisplay ();
+	statusText.widget = browser;
+	statusText.text = new String (Converter.mbcsToWcs (null, bytes));
+	for (int i = 0; i < statusTextListeners.length; i++) {
+		statusTextListeners[i].changed (statusText);
+	}
+	return 0;
+}
+
+int /*long*/ webkit_web_view_ready (int /*long*/ web_view) {
+	WindowEvent newEvent = new WindowEvent (browser);
+	newEvent.display = browser.getDisplay ();
+	newEvent.widget = browser;
+
+	int /*long*/ settings = WebKitGTK.webkit_web_view_get_window_features (webView);
+	int[] result = new int[1];
+	OS.g_object_get (settings, WebKitGTK.locationbar_visible, result, 0);
+	newEvent.addressBar = result[0] != 0;
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.menubar_visible, result, 0);
+	newEvent.menuBar = result[0] != 0;
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.statusbar_visible, result, 0);
+	newEvent.statusBar = result[0] != 0;
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.toolbar_visible, result, 0);
+	newEvent.toolBar = result[0] != 0;
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.x, result, 0);
+	int x = result[0];
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.y, result, 0);
+	int y = result[0];
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.width, result, 0);
+	int width = result[0];
+	result[0] = 0;
+	OS.g_object_get (settings, WebKitGTK.height, result, 0);
+	int height = result[0];
+	result[0] = 0;
+	if (x != -1 && y != -1) {
+		newEvent.location = new Point (x,y);
+	}
+	if (width != -1 && height != -1) {
+		newEvent.size = new Point (width,height);
+	}
+	for (int i = 0; i < visibilityWindowListeners.length; i++) {
+		visibilityWindowListeners[i].show (newEvent);
+	}
+	return 0;
+}
+
+int /*long*/ webkit_window_object_cleared (int /*long*/ web_view, int /*long*/ frame, int /*long*/ context, int /*long*/ window_object) {
+	int /*long*/ globalObject = WebKitGTK.JSContextGetGlobalObject (context);
+	int /*long*/ externalObject = WebKitGTK.JSObjectMake (context, ExternalClass, webViewData);
+	byte[] bytes = null;
+	try {
+		bytes = (OBJECTNAME_EXTERNAL + '\0').getBytes (CHARSET_UTF8);
+	} catch (UnsupportedEncodingException e) {
+		bytes = Converter.wcsToMbcs (null, OBJECTNAME_EXTERNAL, true);
+	} 
+	int /*long*/ name = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+	WebKitGTK.JSObjectSetProperty (context, globalObject, name, externalObject, 0, null);
+	WebKitGTK.JSStringRelease (name);
+	Enumeration elements = functions.elements ();
+	while (elements.hasMoreElements ()) {
+		BrowserFunction current = (BrowserFunction)elements.nextElement ();
+		execute (current.functionString);
+	}
+	int /*long*/ mainFrame = WebKitGTK.webkit_web_view_get_main_frame (webView);
+	boolean top = mainFrame == frame;
+	addEventHandlers (top);
+	return 0;
+}
+
+int /*long*/ callJava (int /*long*/ ctx, int /*long*/ func, int /*long*/ thisObject, int /*long*/ argumentCount, int /*long*/ arguments, int /*long*/ exception) {
+	Object returnValue = null;
+	if (argumentCount == 2) {
+		int /*long*/[] result = new int /*long*/[1];
+		C.memmove (result, arguments, C.PTR_SIZEOF);
+		int type = WebKitGTK.JSValueGetType (ctx, result[0]);
+		if (type == WebKitGTK.kJSTypeNumber) {
+			int index = ((Double)convertToJava (ctx, result[0])).intValue ();
+			result[0] = 0;
+			if (index > 0) {
+				Object key = new Integer (index);
+				BrowserFunction function = (BrowserFunction)functions.get (key);
+				if (function != null) {
+					try {
+						C.memmove (result, arguments + C.PTR_SIZEOF, C.PTR_SIZEOF);
+						Object temp = convertToJava (ctx, result[0]);
+						if (temp instanceof Object[]) {
+							Object[] args = (Object[])temp;
+							try {
+								returnValue = function.function (args);
+							} catch (Exception e) {
+								/* exception during function invocation */
+								returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
+							}
+						}
+					} catch (IllegalArgumentException e) {
+						/* invalid argument value type */
+						if (function.isEvaluate) {
+							/* notify the function so that a java exception can be thrown */
+							function.function (new String[] {WebBrowser.CreateErrorString (new SWTException (SWT.ERROR_INVALID_RETURN_VALUE).getLocalizedMessage ())});
+						}
+						returnValue = WebBrowser.CreateErrorString (e.getLocalizedMessage ());
+					}
+				}
+			}
+		}
+	}
+	return convertToJS (ctx, returnValue);
+}
+
+int /*long*/ convertToJS (int /*long*/ ctx, Object value) {
+	if (value == null) {
+		return WebKitGTK.JSValueMakeUndefined (ctx);
+	}
+	if (value instanceof String) {
+		byte[] bytes = null;
+		try {
+			bytes = ((String)value + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+		} catch (UnsupportedEncodingException e) {
+			bytes = Converter.wcsToMbcs (null, (String)value, true);
+		}
+		int /*long*/ stringRef = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+		int /*long*/ result = WebKitGTK.JSValueMakeString (ctx, stringRef);
+		WebKitGTK.JSStringRelease (stringRef);
+		return result;
+	}
+	if (value instanceof Boolean) {
+		return WebKitGTK.JSValueMakeBoolean (ctx, ((Boolean)value).booleanValue () ? 1 : 0);
+	}
+	if (value instanceof Number) {
+		return WebKitGTK.JSValueMakeNumber (ctx, ((Number)value).doubleValue ());
+	}
+	if (value instanceof Object[]) {
+		Object[] arrayValue = (Object[]) value;
+		int length = arrayValue.length;
+		int /*long*/[] arguments = new int /*long*/[length];
+		for (int i = 0; i < length; i++) {
+			Object javaObject = arrayValue[i];
+			int /*long*/ jsObject = convertToJS (ctx, javaObject);
+			arguments[i] = jsObject;
+		}
+		return WebKitGTK.JSObjectMakeArray (ctx, length, arguments, null);
+	}
+	SWT.error (SWT.ERROR_INVALID_RETURN_VALUE);
+	return 0;
+}
+
+Object convertToJava (int /*long*/ ctx, int /*long*/ value) {
+	int type = WebKitGTK.JSValueGetType (ctx, value);
+	switch (type) {
+		case WebKitGTK.kJSTypeBoolean: {
+			int result = WebKitGTK.JSValueToBoolean (ctx, value);
+			return new Boolean (result != 0);
+		}
+		case WebKitGTK.kJSTypeNumber: {
+			double result = WebKitGTK.JSValueToNumber (ctx, value, null);
+			return new Double(result);
+		}
+		case WebKitGTK.kJSTypeString: {
+			int /*long*/ string = WebKitGTK.JSValueToStringCopy (ctx, value, null);
+			if (string == 0) return ""; //$NON-NLS-1$
+			int /*long*/ length = WebKitGTK.JSStringGetMaximumUTF8CStringSize (string);
+			byte[] bytes = new byte[(int)/*64*/length];
+			length = WebKitGTK.JSStringGetUTF8CString (string, bytes, length);
+			WebKitGTK.JSStringRelease (string);
+			try {
+				/* length-1 is needed below to exclude the terminator character */
+				return new String (bytes, 0, (int)/*64*/length - 1, CHARSET_UTF8);
+			} catch (UnsupportedEncodingException e) {
+				return new String (Converter.mbcsToWcs (null, bytes));
+			}
+		}
+		case WebKitGTK.kJSTypeNull:
+			// FALL THROUGH
+		case WebKitGTK.kJSTypeUndefined: return null;
+		case WebKitGTK.kJSTypeObject: {
+			byte[] bytes = null;
+			try {
+				bytes = (PROPERTY_LENGTH + '\0').getBytes (CHARSET_UTF8); //$NON-NLS-1$
+			} catch (UnsupportedEncodingException e) {
+				bytes = Converter.wcsToMbcs (null, PROPERTY_LENGTH, true);
+			}
+			int /*long*/ propertyName = WebKitGTK.JSStringCreateWithUTF8CString (bytes);
+			int /*long*/ valuePtr = WebKitGTK.JSObjectGetProperty (ctx, value, propertyName, null);
+			WebKitGTK.JSStringRelease (propertyName);
+			type = WebKitGTK.JSValueGetType (ctx, valuePtr);
+			if (type == WebKitGTK.kJSTypeNumber) {
+				int length = (int)WebKitGTK.JSValueToNumber (ctx, valuePtr, null);
+				Object[] result = new Object[length];
+				for (int i = 0; i < length; i++) {
+					int /*long*/ current = WebKitGTK.JSObjectGetPropertyAtIndex (ctx, value, i, null);
+					if (current != 0) {
+						result[i] = convertToJava (ctx, current);
+					}
+				}
+				return result;
+			}
+		}
+	}
+	SWT.error (SWT.ERROR_INVALID_ARGUMENT);
+	return null;
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
new file mode 100644
index 0000000..391ce4a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java	
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.webkit;
+
+
+public class JSClassDefinition {
+    public int version;
+    /** @field cast=(JSClassAttributes) */
+    public int attributes;
+    /** @field cast=(const char*) */
+    public int /*long*/ className;
+    /** @field cast=(JSClassRef) */
+    public int /*long*/ parentClass;
+    /** @field cast=(const JSStaticValue*) */
+    public int /*long*/ staticValues;
+    /** @field cast=(const JSStaticFunction*) */
+    public int /*long*/ staticFunctions;
+    /** @field cast=(JSObjectInitializeCallback) */
+    public int /*long*/ initialize;
+    /** @field cast=(JSObjectFinalizeCallback) */
+    public int /*long*/ finalize;
+    /** @field cast=(JSObjectHasPropertyCallback) */
+    public int /*long*/ hasProperty;
+    /** @field cast=(JSObjectGetPropertyCallback) */
+    public int /*long*/ getProperty;
+    /** @field cast=(JSObjectSetPropertyCallback) */
+    public int /*long*/ setProperty;
+    /** @field cast=(JSObjectDeletePropertyCallback) */
+    public int /*long*/ deleteProperty;
+    /** @field cast=(JSObjectGetPropertyNamesCallback) */
+    public int /*long*/ getPropertyNames;
+    /** @field cast=(JSObjectCallAsFunctionCallback) */
+    public int /*long*/ callAsFunction;
+    /** @field cast=(JSObjectCallAsConstructorCallback) */
+    public int /*long*/ callAsConstructor;
+    /** @field cast=(JSObjectHasInstanceCallback) */
+    public int /*long*/ hasInstance;
+    /** @field cast=(JSObjectConvertToTypeCallback) */
+    public int /*long*/ convertToType;
+    
+    public static final int sizeof = WebKitGTK.JSClassDefinition_sizeof();
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java
new file mode 100644
index 0000000..0b1717e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/WebKitGTK.java	
@@ -0,0 +1,1368 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * The contents of this file are made available under the terms
+ * of the GNU Lesser General Public License (LGPL) Version 2.1 that
+ * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
+ * available at http://www.gnu.org/licenses/lgpl.html.  If the version
+ * of the LGPL at http://www.gnu.org is different to the version of
+ * the LGPL accompanying this distribution and there is any conflict
+ * between the two license versions, the terms of the LGPL accompanying
+ * this distribution shall govern.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.webkit;
+
+
+import org.eclipse.swt.internal.C;
+
+public class WebKitGTK extends C {
+
+	/** Constants */
+	public static final int kJSTypeUndefined = 0;
+	public static final int kJSTypeNull = 1;
+	public static final int kJSTypeBoolean = 2;
+	public static final int kJSTypeNumber = 3;
+	public static final int kJSTypeString = 4;
+	public static final int kJSTypeObject = 5;
+	public static final int SOUP_MEMORY_TAKE = 1;
+	public static final int WEBKIT_DOWNLOAD_STATUS_ERROR = -1;
+	public static final int WEBKIT_DOWNLOAD_STATUS_CANCELLED = 2;
+	public static final int WEBKIT_DOWNLOAD_STATUS_FINISHED = 3;
+	public static final int WEBKIT_LOAD_COMMITTED = 1;
+	public static final int WEBKIT_LOAD_FINISHED = 2;
+
+	/** Signals */
+	public static final byte[] authenticate = ascii ("authenticate"); // $NON-NLS-1$
+	public static final byte[] close_web_view = ascii ("close-web-view"); // $NON-NLS-1$
+	public static final byte[] console_message = ascii ("console-message"); // $NON-NLS-1$
+	public static final byte[] create_web_view = ascii ("create-web-view"); // $NON-NLS-1$
+	public static final byte[] download_requested = ascii ("download-requested"); // $NON-NLS-1$
+	public static final byte[] hovering_over_link = ascii ("hovering-over-link"); // $NON-NLS-1$
+	public static final byte[] mime_type_policy_decision_requested = ascii ("mime-type-policy-decision-requested"); // $NON-NLS-1$
+	public static final byte[] navigation_policy_decision_requested = ascii ("navigation-policy-decision-requested"); // $NON-NLS-1$
+	public static final byte[] notify_load_status = ascii ("notify::load-status"); // $NON-NLS-1$
+	public static final byte[] notify_progress = ascii ("notify::progress"); // $NON-NLS-1$
+	public static final byte[] notify_title = ascii ("notify::title"); // $NON-NLS-1$
+	public static final byte[] populate_popup = ascii ("populate-popup"); // $NON-NLS-1$
+	public static final byte[] resource_request_starting = ascii ("resource_request_starting"); // $NON-NLS-1$
+	public static final byte[] status_bar_text_changed = ascii ("status-bar-text-changed"); // $NON-NLS-1$
+	public static final byte[] web_view_ready = ascii ("web-view-ready"); // $NON-NLS-1$
+	public static final byte[] window_object_cleared = ascii ("window-object-cleared"); // $NON-NLS-1$
+
+	/** Properties */
+	public static final byte[] enable_scripts = ascii ("enable-scripts"); // $NON-NLS-1$
+	public static final byte[] enable_universal_access_from_file_uris = ascii ("enable-universal-access-from-file-uris"); // $NON-NLS-1$
+	public static final byte[] height = ascii ("height"); // $NON-NLS-1$
+	public static final byte[] javascript_can_open_windows_automatically = ascii ("javascript-can-open-windows-automatically"); // $NON-NLS-1$
+	public static final byte[] locationbar_visible = ascii ("locationbar-visible"); // $NON-NLS-1$
+	public static final byte[] menubar_visible = ascii ("menubar-visible"); // $NON-NLS-1$
+	public static final byte[] SOUP_SESSION_PROXY_URI = ascii ("proxy-uri"); // $NON-NLS-1$
+	public static final byte[] statusbar_visible = ascii ("statusbar-visible"); // $NON-NLS-1$
+	public static final byte[] toolbar_visible = ascii ("toolbar-visible"); // $NON-NLS-1$
+	public static final byte[] user_agent = ascii ("user-agent"); // $NON-NLS-1$
+	public static final byte[] width = ascii ("width"); // $NON-NLS-1$
+	public static final byte[] x = ascii ("x"); // $NON-NLS-1$
+	public static final byte[] y = ascii ("y"); // $NON-NLS-1$
+
+protected static byte [] ascii (String name) {
+	int length = name.length ();
+	char [] chars = new char [length];
+	name.getChars (0, length, chars, 0);
+	byte [] buffer = new byte [length + 1];
+	for (int i=0; i<length; i++) {
+		buffer [i] = (byte) chars [i];
+	}
+	return buffer;
+}
+
+
+/**
+ * @param definition cast=(const JSClassDefinition*)
+ */
+public static final native int /*long*/ _JSClassCreate (int /*long*/ definition);
+public static final int /*long*/ JSClassCreate (int /*long*/ definition) {
+	lock.lock();
+	try {
+		return _JSClassCreate (definition);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ */
+public static final native int /*long*/ _JSContextGetGlobalObject (int /*long*/ ctx);
+public static final int /*long*/ JSContextGetGlobalObject (int /*long*/ ctx) {
+	lock.lock();
+	try {
+		return _JSContextGetGlobalObject (ctx);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param script cast=(JSStringRef)
+ * @param thisObject cast=(JSObjectRef)
+ * @param sourceURL cast=(JSStringRef)
+ * @param exception cast=(JSValueRef *)
+ */
+public static final native int /*long*/ _JSEvaluateScript (int /*long*/ ctx, int /*long*/ script, int /*long*/ thisObject, int /*long*/ sourceURL, int startingLineNumber, int /*long*/[] exception);
+public static final int /*long*/ JSEvaluateScript (int /*long*/ ctx, int /*long*/ script, int /*long*/ thisObject, int /*long*/ sourceURL, int startingLineNumber, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSEvaluateScript (ctx, script, thisObject, sourceURL, startingLineNumber, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param object cast=(JSObjectRef)
+ */
+public static final native int /*long*/ _JSObjectGetPrivate (int /*long*/ object);
+public static final int /*long*/ JSObjectGetPrivate (int /*long*/ object) {
+	lock.lock();
+	try {
+		return _JSObjectGetPrivate (object);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param object cast=(JSObjectRef)
+ * @param propertyName cast=(JSStringRef)
+ * @param exception cast=(JSValueRef*)
+ */
+public static final native int /*long*/ _JSObjectGetProperty (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName, int /*long*/[] exception);
+public static final int /*long*/ JSObjectGetProperty (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSObjectGetProperty (ctx, object, propertyName, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param object cast=(JSObjectRef)
+ * @param propertyIndex cast=(unsigned)
+ * @param exception cast=(JSValueRef*)
+ */
+public static final native int /*long*/ _JSObjectGetPropertyAtIndex (int /*long*/ ctx, int /*long*/ object, int propertyIndex, int /*long*/[] exception);
+public static final int /*long*/ JSObjectGetPropertyAtIndex (int /*long*/ ctx, int /*long*/ object, int propertyIndex, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSObjectGetPropertyAtIndex (ctx, object, propertyIndex, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param jsClass cast=(JSClassRef)
+ * @param data cast=(void *)
+ */
+public static final native int /*long*/ _JSObjectMake (int /*long*/ ctx, int /*long*/ jsClass, int /*long*/ data);
+public static final int /*long*/ JSObjectMake (int /*long*/ ctx, int /*long*/ jsClass, int /*long*/ data) {
+	lock.lock();
+	try {
+		return _JSObjectMake (ctx, jsClass, data);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param argumentCount cast=(size_t)
+ * @param arguments cast=(const struct OpaqueJSValue * const*)
+ * @param exception cast=(JSValueRef*)
+ */
+public static final native int /*long*/ _JSObjectMakeArray (int /*long*/ ctx, int /*long*/ argumentCount, int /*long*/[] arguments, int /*long*/[] exception);
+public static final int /*long*/ JSObjectMakeArray (int /*long*/ ctx, int /*long*/ argumentCount, int /*long*/[] arguments, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSObjectMakeArray (ctx, argumentCount, arguments, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param name cast=(JSStringRef)
+ * @param callAsFunction cast=(JSObjectCallAsFunctionCallback)
+ */
+public static final native int /*long*/ _JSObjectMakeFunctionWithCallback (int /*long*/ ctx, int /*long*/ name, int /*long*/ callAsFunction);
+public static final int /*long*/ JSObjectMakeFunctionWithCallback (int /*long*/ ctx, int /*long*/ name, int /*long*/ callAsFunction) {
+	lock.lock();
+	try {
+		return _JSObjectMakeFunctionWithCallback (ctx, name, callAsFunction);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param object cast=(JSObjectRef)
+ * @param propertyName cast=(JSStringRef)
+ * @param value cast=(JSValueRef)
+ * @param attributes cast=(JSPropertyAttributes)
+ * @param exception cast=(JSValueRef *)
+ */
+public static final native void _JSObjectSetProperty (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName, int /*long*/ value, int attributes, int /*long*/[] exception);
+public static final void JSObjectSetProperty (int /*long*/ ctx, int /*long*/ object, int /*long*/ propertyName, int /*long*/ value, int attributes, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		_JSObjectSetProperty (ctx, object, propertyName, value, attributes, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param string cast=(const char *)
+ */
+public static final native int /*long*/ _JSStringCreateWithUTF8CString (byte[] string);
+public static final int /*long*/ JSStringCreateWithUTF8CString (byte[] string) {
+	lock.lock();
+	try {
+		return _JSStringCreateWithUTF8CString (string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param string cast=(JSStringRef)
+ */
+public static final native int /*long*/ _JSStringGetLength (int /*long*/ string);
+public static final int /*long*/ JSStringGetLength (int /*long*/ string) {
+	lock.lock();
+	try {
+		return _JSStringGetLength (string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param string cast=(JSStringRef)
+ */
+public static final native int /*long*/ _JSStringGetMaximumUTF8CStringSize (int /*long*/ string);
+public static final int /*long*/ JSStringGetMaximumUTF8CStringSize (int /*long*/ string) {
+	lock.lock();
+	try {
+		return _JSStringGetMaximumUTF8CStringSize (string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param string cast=(JSStringRef)
+ * @param buffer cast=(char *)
+ * @param bufferSize cast=(size_t)
+ */
+public static final native int /*long*/ _JSStringGetUTF8CString (int /*long*/ string, byte[] buffer, int /*long*/ bufferSize);
+public static final int /*long*/ JSStringGetUTF8CString (int /*long*/ string, byte[] buffer, int /*long*/ bufferSize) {
+	lock.lock();
+	try {
+		return _JSStringGetUTF8CString (string, buffer, bufferSize);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param a cast=(JSStringRef)
+ * @param b cast=(const char *)
+ */
+public static final native int _JSStringIsEqualToUTF8CString (int /*long*/ a, byte[] b);
+public static final int JSStringIsEqualToUTF8CString (int /*long*/ a, byte[] b) {
+	lock.lock();
+	try {
+		return _JSStringIsEqualToUTF8CString (a, b);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param string cast=(JSStringRef)
+ */
+public static final native void _JSStringRelease (int /*long*/ string);
+public static final void JSStringRelease (int /*long*/ string) {
+	lock.lock();
+	try {
+		_JSStringRelease (string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param value cast=(JSValueRef)
+ */
+public static final native int _JSValueGetType (int /*long*/ ctx, int /*long*/ value);
+public static final int JSValueGetType (int /*long*/ ctx, int /*long*/ value) {
+	lock.lock();
+	try {
+		return _JSValueGetType (ctx, value);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param value cast=(JSValueRef)
+ * @param jsClass cast=(JSClassRef)
+ */
+public static final native int _JSValueIsObjectOfClass (int /*long*/ ctx, int /*long*/ value, int /*long*/ jsClass);
+public static final int JSValueIsObjectOfClass (int /*long*/ ctx, int /*long*/ value, int /*long*/ jsClass) {
+	lock.lock();
+	try {
+		return _JSValueIsObjectOfClass (ctx, value, jsClass);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param bool cast=(bool)
+ */
+public static final native int /*long*/ _JSValueMakeBoolean (int /*long*/ ctx, int bool);
+public static final int /*long*/ JSValueMakeBoolean (int /*long*/ ctx, int bool) {
+	lock.lock();
+	try {
+		return _JSValueMakeBoolean (ctx, bool);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param number cast=(double)
+ */
+public static final native int /*long*/ _JSValueMakeNumber (int /*long*/ ctx, double number);
+public static final int /*long*/ JSValueMakeNumber (int /*long*/ ctx, double number) {
+	lock.lock();
+	try {
+		return _JSValueMakeNumber (ctx, number);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param string cast=(JSStringRef)
+ */
+public static final native int /*long*/ _JSValueMakeString (int /*long*/ ctx, int /*long*/ string);
+public static final int /*long*/ JSValueMakeString (int /*long*/ ctx, int /*long*/ string) {
+	lock.lock();
+	try {
+		return _JSValueMakeString (ctx, string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ */
+public static final native int /*long*/ _JSValueMakeUndefined (int /*long*/ ctx);
+public static final int /*long*/ JSValueMakeUndefined (int /*long*/ ctx) {
+	lock.lock();
+	try {
+		return _JSValueMakeUndefined (ctx);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param value cast=(JSValueRef)
+ */
+public static final native int _JSValueToBoolean (int /*long*/ ctx, int /*long*/ value);
+public static final int JSValueToBoolean (int /*long*/ ctx, int /*long*/ value) {
+	lock.lock();
+	try {
+		return _JSValueToBoolean (ctx, value);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param value cast=(JSValueRef)
+ * @param exception cast=(JSValueRef*)
+ */
+public static final native double _JSValueToNumber (int /*long*/ ctx, int /*long*/ value, int /*long*/[] exception);
+public static final double JSValueToNumber (int /*long*/ ctx, int /*long*/ value, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSValueToNumber (ctx, value, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param ctx cast=(JSContextRef)
+ * @param value cast=(JSValueRef)
+ * @param exception cast=(JSValueRef*)
+ */
+public static final native int /*long*/ _JSValueToStringCopy (int /*long*/ ctx, int /*long*/ value, int /*long*/[] exception);
+public static final int /*long*/ JSValueToStringCopy (int /*long*/ ctx, int /*long*/ value, int /*long*/[] exception) {
+	lock.lock();
+	try {
+		return _JSValueToStringCopy (ctx, value, exception);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/* --------------------- start libsoup natives --------------------- */
+
+/**
+ * @param auth cast=(SoupAuth *)
+ * @param username cast=(const char *)
+ * @param password cast=(const char *)
+ */
+public static final native void _soup_auth_authenticate (int /*long*/ auth, byte[] username, byte[] password);
+public static final void soup_auth_authenticate (int /*long*/ auth, byte[] username, byte[] password) {
+	lock.lock();
+	try {
+		_soup_auth_authenticate (auth, username, password);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param auth cast=(SoupAuth *)
+ */
+public static final native int /*long*/ _soup_auth_get_host (int /*long*/ auth);
+public static final int /*long*/ soup_auth_get_host (int /*long*/ auth) {
+	lock.lock();
+	try {
+		return _soup_auth_get_host (auth);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param auth cast=(SoupAuth *)
+ */
+public static final native int /*long*/ _soup_auth_get_scheme_name (int /*long*/ auth);
+public static final int /*long*/ soup_auth_get_scheme_name (int /*long*/ auth) {
+	lock.lock();
+	try {
+		return _soup_auth_get_scheme_name (auth);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param jar cast=(SoupCookieJar *)
+ * @param cookie cast=(SoupCookie *)
+ */
+public static final native void _soup_cookie_jar_add_cookie (int /*long*/ jar, int /*long*/ cookie);
+public static final void soup_cookie_jar_add_cookie (int /*long*/ jar, int /*long*/ cookie) {
+	lock.lock();
+	try {
+		_soup_cookie_jar_add_cookie (jar, cookie);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param jar cast=(SoupCookieJar *)
+ */
+public static final native int /*long*/ _soup_cookie_jar_all_cookies (int /*long*/ jar);
+public static final int /*long*/ soup_cookie_jar_all_cookies (int /*long*/ jar) {
+	lock.lock();
+	try {
+		return _soup_cookie_jar_all_cookies (jar);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param jar cast=(SoupCookieJar *)
+ * @param cookie cast=(SoupCookie *)
+ */
+public static final native void _soup_cookie_jar_delete_cookie (int /*long*/ jar, int /*long*/ cookie);
+public static final void soup_cookie_jar_delete_cookie (int /*long*/ jar, int /*long*/ cookie) {
+	lock.lock();
+	try {
+		_soup_cookie_jar_delete_cookie (jar, cookie);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param jar cast=(SoupCookieJar *)
+ * @param uri cast=(SoupURI *)
+ */
+public static final native int /*long*/ _soup_cookie_jar_get_cookies (int /*long*/ jar, int /*long*/ uri, int for_http);
+public static final int /*long*/ soup_cookie_jar_get_cookies (int /*long*/ jar, int /*long*/ uri, int for_http) {
+	lock.lock();
+	try {
+		return _soup_cookie_jar_get_cookies (jar, uri, for_http);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int /*long*/ _soup_cookie_jar_get_type ();
+public static final int /*long*/ soup_cookie_jar_get_type () {
+	lock.lock();
+	try {
+		return _soup_cookie_jar_get_type ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param header cast=(const char *)
+ * @param origin cast=(SoupURI *)
+ */
+public static final native int /*long*/ _soup_cookie_parse (byte[] header, int /*long*/ origin);
+public static final int /*long*/ soup_cookie_parse (byte[] header, int /*long*/ origin) {
+	lock.lock();
+	try {
+		return _soup_cookie_parse (header, origin);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @method flags=getter
+ * @param cookie cast=(SoupCookie *)
+ */
+public static final native int /*long*/ _SoupCookie_expires (int /*long*/ cookie);
+public static final int /*long*/ SoupCookie_expires (int /*long*/ cookie) {
+	lock.lock();
+	try {
+		return _SoupCookie_expires (cookie);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native boolean _SOUP_IS_SESSION (int /*long*/ object);
+public static final boolean SOUP_IS_SESSION (int /*long*/ object) {
+	lock.lock();
+	try {
+		return _SOUP_IS_SESSION (object);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @method flags=setter
+ * @param message cast=(SoupMessage *)
+ * @param method cast=(const char *)
+ */
+public static final native void _SoupMessage_method (int /*long*/ message, int /*long*/ method);
+public static final void SoupMessage_method (int /*long*/ message, int /*long*/ method) {
+	lock.lock();
+	try {
+		_SoupMessage_method (message, method);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @method flags=getter
+ * @param message cast=(SoupMessage *)
+ */
+public static final native int /*long*/ _SoupMessage_request_body (int /*long*/ message);
+public static final int /*long*/ SoupMessage_request_body (int /*long*/ message) {
+	lock.lock();
+	try {
+		return _SoupMessage_request_body (message);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @method flags=getter
+ * @param message cast=(SoupMessage *)
+ */
+public static final native int /*long*/ _SoupMessage_request_headers (int /*long*/ message);
+public static final int /*long*/ SoupMessage_request_headers (int /*long*/ message) {
+	lock.lock();
+	try {
+		return _SoupMessage_request_headers (message);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param body cast=(SoupMessageBody *)
+ * @param use cast=(SoupMemoryUse)
+ * @param data cast=(gconstpointer)
+ * @param length cast=(gsize)
+ */
+public static final native void _soup_message_body_append (int /*long*/ body, int use, int /*long*/ data, int /*long*/ length);
+public static final void soup_message_body_append (int /*long*/ body, int use, int /*long*/ data, int /*long*/ length) {
+	lock.lock();
+	try {
+		_soup_message_body_append (body, use, data, length);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param body cast=(SoupMessageBody *)
+ */
+public static final native void _soup_message_body_flatten (int /*long*/ body);
+public static final void soup_message_body_flatten (int /*long*/ body) {
+	lock.lock();
+	try {
+		_soup_message_body_flatten (body);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param msg cast=(SoupMessage *)
+ */
+public static final native int /*long*/ _soup_message_get_uri (int /*long*/ msg);
+public static final int /*long*/ soup_message_get_uri (int /*long*/ msg) {
+	lock.lock();
+	try {
+		return _soup_message_get_uri (msg);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param headers cast=(SoupMessageHeaders *)
+ * @param name cast=(const char *)
+ * @param value cast=(const char *)
+ */
+public static final native void _soup_message_headers_append (int /*long*/ headers, byte[] name, byte[] value);
+public static final void soup_message_headers_append (int /*long*/ headers, byte[] name, byte[] value) {
+	lock.lock();
+	try {
+		_soup_message_headers_append (headers, name, value);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param session cast=(SoupSession *)
+ * @param type cast=(GType)
+ */
+public static final native void _soup_session_add_feature_by_type (int /*long*/ session, int /*long*/ type);
+public static final void soup_session_add_feature_by_type (int /*long*/ session, int /*long*/ type) {
+	lock.lock();
+	try {
+		_soup_session_add_feature_by_type (session, type);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param session cast=(SoupSession *)
+ * @param feature_type cast=(GType)
+ */
+public static final native int /*long*/ _soup_session_get_feature (int /*long*/ session, int /*long*/ feature_type);
+public static final int /*long*/ soup_session_get_feature (int /*long*/ session, int /*long*/ feature_type) {
+	lock.lock();
+	try {
+		return _soup_session_get_feature (session, feature_type);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param feature cast=(SoupSessionFeature *)
+ * @param session cast=(SoupSession *)
+ */
+public static final native void _soup_session_feature_attach (int /*long*/ feature, int /*long*/ session);
+public static final void soup_session_feature_attach (int /*long*/ feature, int /*long*/ session) {
+	lock.lock();
+	try {
+		_soup_session_feature_attach (feature, session);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param feature cast=(SoupSessionFeature *)
+ * @param session cast=(SoupSession *)
+ */
+public static final native void _soup_session_feature_detach (int /*long*/ feature, int /*long*/ session);
+public static final void soup_session_feature_detach (int /*long*/ feature, int /*long*/ session) {
+	lock.lock();
+	try {
+		_soup_session_feature_detach (feature, session);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param uri cast=(SoupURI *)
+ */
+public static final native void _soup_uri_free (int /*long*/ uri);
+public static final void soup_uri_free (int /*long*/ uri) {
+	lock.lock();
+	try {
+		_soup_uri_free (uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param uri_string cast=(const char *)
+ */
+public static final native int /*long*/ _soup_uri_new (byte[] uri_string);
+public static final int /*long*/ soup_uri_new (byte[] uri_string) {
+	lock.lock();
+	try {
+		return _soup_uri_new (uri_string);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param uri cast=(SoupURI *)
+ */
+public static final native int /*long*/ _soup_uri_to_string (int /*long*/ uri, int just_path_and_query);
+public static final int /*long*/ soup_uri_to_string (int /*long*/ uri, int just_path_and_query) {
+	lock.lock();
+	try {
+		return _soup_uri_to_string (uri, just_path_and_query);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/* --------------------- start WebKitGTK natives --------------------- */
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native void _webkit_download_cancel (int /*long*/ download);
+public static final void webkit_download_cancel (int /*long*/ download) {
+	lock.lock();
+	try {
+		_webkit_download_cancel (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native long _webkit_download_get_current_size (int /*long*/ download);
+public static final long webkit_download_get_current_size (int /*long*/ download) {
+	lock.lock();
+	try {
+		return _webkit_download_get_current_size (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native int _webkit_download_get_status (int /*long*/ download);
+public static final int webkit_download_get_status (int /*long*/ download) {
+	lock.lock();
+	try {
+		return _webkit_download_get_status (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native int /*long*/ _webkit_download_get_suggested_filename (int /*long*/ download);
+public static final int /*long*/ webkit_download_get_suggested_filename (int /*long*/ download) {
+	lock.lock();
+	try {
+		return _webkit_download_get_suggested_filename (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native long _webkit_download_get_total_size (int /*long*/ download);
+public static final long webkit_download_get_total_size (int /*long*/ download) {
+	lock.lock();
+	try {
+		return _webkit_download_get_total_size (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ */
+public static final native int /*long*/ _webkit_download_get_uri (int /*long*/ download);
+public static final int /*long*/ webkit_download_get_uri (int /*long*/ download) {
+	lock.lock();
+	try {
+		return _webkit_download_get_uri (download);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param download cast=(WebKitDownload *)
+ * @param destination_uri cast=(const gchar *)
+ */
+public static final native void _webkit_download_set_destination_uri (int /*long*/ download, byte[] destination_uri);
+public static final void webkit_download_set_destination_uri (int /*long*/ download, byte[] destination_uri) {
+	lock.lock();
+	try {
+		_webkit_download_set_destination_uri (download, destination_uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int /*long*/ _webkit_get_default_session ();
+public static final int /*long*/ webkit_get_default_session () {
+	lock.lock();
+	try {
+		return _webkit_get_default_session ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native boolean _WEBKIT_IS_WEB_FRAME (int /*long*/ object);
+public static final boolean WEBKIT_IS_WEB_FRAME (int /*long*/ object) {
+	lock.lock();
+	try {
+		return _WEBKIT_IS_WEB_FRAME (object);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int _webkit_major_version ();
+public static final int webkit_major_version () {
+	lock.lock();
+	try {
+		return _webkit_major_version ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int _webkit_micro_version ();
+public static final int webkit_micro_version () {
+	lock.lock();
+	try {
+		return _webkit_micro_version ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int _webkit_minor_version ();
+public static final int webkit_minor_version () {
+	lock.lock();
+	try {
+		return _webkit_minor_version ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param request cast=(WebKitNetworkRequest *)
+ */
+public static final native int /*long*/ _webkit_network_request_get_message (int /*long*/ request);
+public static final int /*long*/ webkit_network_request_get_message (int /*long*/ request) {
+	lock.lock();
+	try {
+		return _webkit_network_request_get_message (request);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param request cast=(WebKitNetworkRequest *)
+ */
+public static final native int /*long*/ _webkit_network_request_get_uri (int /*long*/ request);
+public static final int /*long*/ webkit_network_request_get_uri (int /*long*/ request) {
+	lock.lock();
+	try {
+		return _webkit_network_request_get_uri (request);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param uri cast=(const gchar *)
+ */
+public static final native int /*long*/ _webkit_network_request_new (byte[] uri);
+public static final int /*long*/ webkit_network_request_new (byte[] uri) {
+	lock.lock();
+	try {
+		return _webkit_network_request_new (uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int /*long*/ _webkit_soup_auth_dialog_get_type ();
+public static final int /*long*/ webkit_soup_auth_dialog_get_type () {
+	lock.lock();
+	try {
+		return _webkit_soup_auth_dialog_get_type ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param data_source cast=(WebKitWebDataSource *)
+ */
+public static final native int /*long*/ _webkit_web_data_source_get_data (int /*long*/ data_source);
+public static final int /*long*/ webkit_web_data_source_get_data (int /*long*/ data_source) {
+	lock.lock();
+	try {
+		return _webkit_web_data_source_get_data (data_source);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param data_source cast=(WebKitWebDataSource *)
+ */
+public static final native int /*long*/ _webkit_web_data_source_get_encoding (int /*long*/ data_source);
+public static final int /*long*/ webkit_web_data_source_get_encoding (int /*long*/ data_source) {
+	lock.lock();
+	try {
+		return _webkit_web_data_source_get_encoding (data_source);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_data_source (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_data_source (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_data_source (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_global_context (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_global_context (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_global_context (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int _webkit_web_frame_get_load_status (int /*long*/ frame);
+public static final int webkit_web_frame_get_load_status (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_load_status (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_parent (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_parent (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_parent (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_title (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_title (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_title (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_uri (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_uri (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_uri (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param frame cast=(WebKitWebFrame *)
+ */
+public static final native int /*long*/ _webkit_web_frame_get_web_view (int /*long*/ frame);
+public static final int /*long*/ webkit_web_frame_get_web_view (int /*long*/ frame) {
+	lock.lock();
+	try {
+		return _webkit_web_frame_get_web_view (frame);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param decision cast=(WebKitWebPolicyDecision *)
+ */
+public static final native void _webkit_web_policy_decision_download (int /*long*/ decision);
+public static final void webkit_web_policy_decision_download (int /*long*/ decision) {
+	lock.lock();
+	try {
+		_webkit_web_policy_decision_download (decision);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param decision cast=(WebKitWebPolicyDecision *)
+ */
+public static final native void _webkit_web_policy_decision_ignore (int /*long*/ decision);
+public static final void webkit_web_policy_decision_ignore (int /*long*/ decision) {
+	lock.lock();
+	try {
+		_webkit_web_policy_decision_ignore (decision);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int _webkit_web_view_can_go_back (int /*long*/ web_view);
+public static final int webkit_web_view_can_go_back (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_can_go_back (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int _webkit_web_view_can_go_forward (int /*long*/ web_view);
+public static final int webkit_web_view_can_go_forward (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_can_go_forward (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ * @param mime_type cast=(const gchar *)
+ */
+public static final native int _webkit_web_view_can_show_mime_type (int /*long*/ web_view, int /*long*/ mime_type);
+public static final int webkit_web_view_can_show_mime_type (int /*long*/ web_view, int /*long*/ mime_type) {
+	lock.lock();
+	try {
+		return _webkit_web_view_can_show_mime_type (web_view, mime_type);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ * @param script cast=(const gchar *)
+ */
+public static final native void _webkit_web_view_execute_script (int /*long*/ web_view, byte[] script);
+public static final void webkit_web_view_execute_script (int /*long*/ web_view, byte[] script) {
+	lock.lock();
+	try {
+		_webkit_web_view_execute_script (web_view, script);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int _webkit_web_view_get_load_status (int /*long*/ web_view);
+public static final int webkit_web_view_get_load_status (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_load_status (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int /*long*/ _webkit_web_view_get_main_frame (int /*long*/ web_view);
+public static final int /*long*/ webkit_web_view_get_main_frame (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_main_frame (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native double _webkit_web_view_get_progress (int /*long*/ web_view);
+public static final double webkit_web_view_get_progress (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_progress (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int /*long*/ _webkit_web_view_get_settings (int /*long*/ web_view);
+public static final int /*long*/ webkit_web_view_get_settings (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_settings (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int /*long*/ _webkit_web_view_get_title (int /*long*/ web_view);
+public static final int /*long*/ webkit_web_view_get_title (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_title (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int /*long*/ _webkit_web_view_get_uri (int /*long*/ web_view);
+public static final int /*long*/ webkit_web_view_get_uri (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_uri (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native int /*long*/ _webkit_web_view_get_window_features (int /*long*/ web_view);
+public static final int /*long*/ webkit_web_view_get_window_features (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		return _webkit_web_view_get_window_features (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native void _webkit_web_view_go_back (int /*long*/ web_view);
+public static final void webkit_web_view_go_back (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		_webkit_web_view_go_back (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native void _webkit_web_view_go_forward (int /*long*/ web_view);
+public static final void webkit_web_view_go_forward (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		_webkit_web_view_go_forward (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ * @param content cast=(const gchar *)
+ * @param mime_type cast=(const gchar *)
+ * @param encoding cast=(const gchar *)
+ * @param base_uri cast=(const gchar *)
+ */
+public static final native void _webkit_web_view_load_string (int /*long*/ web_view, byte[] content, byte[] mime_type, byte[] encoding, byte[] base_uri);
+public static final void webkit_web_view_load_string (int /*long*/ web_view, byte[] content, byte[] mime_type, byte[] encoding, byte[] base_uri) {
+	lock.lock();
+	try {
+		_webkit_web_view_load_string (web_view, content, mime_type, encoding, base_uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ * @param uri cast=(const gchar *)
+ */
+public static final native void _webkit_web_view_load_uri (int /*long*/ web_view, byte[] uri);
+public static final void webkit_web_view_load_uri (int /*long*/ web_view, byte[] uri) {
+	lock.lock();
+	try {
+		_webkit_web_view_load_uri (web_view, uri);
+	} finally {
+		lock.unlock();
+	}
+}
+
+public static final native int /*long*/ _webkit_web_view_new ();
+public static final int /*long*/ webkit_web_view_new () {
+	lock.lock();
+	try {
+		return _webkit_web_view_new ();
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native void _webkit_web_view_reload (int /*long*/ web_view);
+public static final void webkit_web_view_reload (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		_webkit_web_view_reload (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/**
+ * @param web_view cast=(WebKitWebView *)
+ */
+public static final native void _webkit_web_view_stop_loading (int /*long*/ web_view);
+public static final void webkit_web_view_stop_loading (int /*long*/ web_view) {
+	lock.lock();
+	try {
+		_webkit_web_view_stop_loading (web_view);
+	} finally {
+		lock.unlock();
+	}
+}
+
+/* --------------------- start SWT natives --------------------- */
+
+public static final native int JSClassDefinition_sizeof ();
+
+/**
+ * @param dest cast=(void *)
+ * @param src cast=(const void *),flags=no_out
+ * @param size cast=(size_t)
+ */
+public static final native void memmove (int /*long*/ dest, JSClassDefinition src, int /*long*/ size);
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java
index f7d2e8a..4a2cb56 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Path.java	
@@ -46,6 +46,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -678,7 +680,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java
index 0711132..9e94116 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Pattern.java	
@@ -43,6 +43,8 @@ public class Pattern extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -183,7 +185,7 @@ void destroy() {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java
index b755f16..067008c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cairo/org/eclipse/swt/graphics/Transform.java	
@@ -42,6 +42,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public double[] handle;
 	
@@ -211,7 +213,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Color.java
index ee344c9..ca1b545 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Color.java	
@@ -40,6 +40,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float[] handle;
 
@@ -216,7 +218,7 @@ public RGB getRGB () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the color
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Color carbon_new(Device device, float[] rgbColor) {
 	Color color = new Color(device);
@@ -244,7 +246,7 @@ void init( int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Cursor.java
index 1652463..3fd6125 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Cursor.java	
@@ -54,6 +54,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -72,6 +74,10 @@ Cursor(Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -602,7 +608,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
@@ -634,7 +640,7 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the cursor
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Cursor carbon_new(Device device, int handle) {
 	Cursor cursor = new Cursor(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java
index 270a1ca..1770c30 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -620,6 +620,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int internal_new_GC (GCData data);
 
@@ -635,6 +637,8 @@ public abstract int internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int handle, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Font.java
index b9bb11f..5f1e41e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Font.java	
@@ -41,6 +41,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -53,6 +55,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public short style;
 
@@ -65,6 +69,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float size;
 	
@@ -77,6 +83,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int atsuiStyle;
 	
@@ -319,7 +327,7 @@ public FontData[] getFontData() {
  * @param style the style for the font
  * @param size the size for the font
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Font carbon_new(Device device, int handle, short style, float size) {
 	Font font = new Font(device);
@@ -405,7 +413,7 @@ int createCFString(String str) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java
index 67d8aa9..4a485de 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String name;
 
@@ -60,6 +62,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float height;
 
@@ -72,6 +76,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int style;
 
@@ -84,6 +90,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String atsName;
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java
index 58e49e9..806758f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java	
@@ -64,6 +64,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -183,7 +185,7 @@ static int checkStyle (int style) {
  *
  * @return a new <code>GC</code>
  *
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC carbon_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
@@ -207,6 +209,8 @@ public static GC carbon_new(Drawable drawable, GCData data) {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC carbon_new(int context, GCData data) {
 	GC gc = new GC();
@@ -908,21 +912,34 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
  	if (simple) {
  		OS.CGContextDrawImage(handle, rect, imageHandle);
  	} else {
-		int bpc = OS.CGImageGetBitsPerComponent(imageHandle);
-		int bpp = OS.CGImageGetBitsPerPixel(imageHandle);
-		int bpr = OS.CGImageGetBytesPerRow(imageHandle);
-		int colorspace = OS.CGImageGetColorSpace(imageHandle);
-		int alphaInfo = OS.CGImageGetAlphaInfo(imageHandle);
-		int data = srcImage.data + (srcY * bpr) + srcX * 4;
-		int provider = OS.CGDataProviderCreateWithData(0, data, srcHeight * bpr, 0);
-		if (provider != 0) {
-			int subImage = OS.CGImageCreate(srcWidth, srcHeight, bpc, bpp, bpr, colorspace, alphaInfo, provider, null, true, 0);
-			OS.CGDataProviderRelease(provider);
+ 		if (OS.VERSION >= 0x1040) {
+ 			CGRect srcRect = new CGRect();
+ 			srcRect.x = srcX;
+ 			srcRect.y = srcY;
+ 			srcRect.width = srcWidth;
+ 			srcRect.height = srcHeight;
+ 			int subImage = OS.CGImageCreateWithImageInRect(imageHandle, srcRect);
 			if (subImage != 0) {
-		 		OS.CGContextDrawImage(handle, rect, subImage);
- 				OS.CGImageRelease(subImage);
+				OS.CGContextDrawImage(handle, rect, subImage);
+				OS.CGImageRelease(subImage);
 			}
-		}
+ 		} else {
+			int bpc = OS.CGImageGetBitsPerComponent(imageHandle);
+			int bpp = OS.CGImageGetBitsPerPixel(imageHandle);
+			int bpr = OS.CGImageGetBytesPerRow(imageHandle);
+			int colorspace = OS.CGImageGetColorSpace(imageHandle);
+			int alphaInfo = OS.CGImageGetAlphaInfo(imageHandle);
+			int data = srcImage.data + (srcY * bpr) + srcX * 4;
+			int provider = OS.CGDataProviderCreateWithData(0, data, srcHeight * bpr, 0);
+			if (provider != 0) {
+				int subImage = OS.CGImageCreate(srcWidth, srcHeight, bpc, bpp, bpr, colorspace, alphaInfo, provider, null, true, 0);
+				OS.CGDataProviderRelease(provider);
+				if (subImage != 0) {
+			 		OS.CGContextDrawImage(handle, rect, subImage);
+	 				OS.CGImageRelease(subImage);
+				}
+			}
+ 		}
  	}
  	OS.CGContextRestoreGState(handle);
  	flush();
@@ -2229,8 +2246,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {	
 	if (handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED);
@@ -2525,7 +2543,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -3128,9 +3146,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3140,9 +3158,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java
index 0bac8c3..cf0e30a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java	
@@ -76,6 +76,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -88,6 +90,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -100,6 +104,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int data;
 	
@@ -687,7 +693,7 @@ public ImageData getImageData() {
  * @param handle the OS handle for the image
  * @param data the OS data for the image
  *
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Image carbon_new(Device device, int type, int handle, int data) {
 	Image image = new Image(device);
@@ -877,6 +883,8 @@ void init(ImageData image) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -917,7 +925,9 @@ public int internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int context, GCData data) {
 	OS.CGContextRelease(context);
@@ -929,7 +939,7 @@ public void internal_dispose_GC (int context, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java
index a07137b..6f0dc4e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Path.java	
@@ -47,6 +47,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -719,7 +721,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java
index 94fb2fc..c2d0dd3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Pattern.java	
@@ -276,7 +276,7 @@ int drawPatternProc (int ref, int context) {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Region.java
index 033dd07..6eb7585 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Region.java	
@@ -37,6 +37,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -415,7 +417,7 @@ public boolean intersects(Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java
index 9e12f96..4167bf3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java	
@@ -268,11 +268,13 @@ public final class TextLayout extends Resource {
 	String text;
 	int textPtr;
 	StyleItem[] styles;
+	int stylesCount;
 	int layout;
-	int spacing, ascent, descent, indent;
+	int spacing, ascent, descent, indent, wrapIndent;
 	int indentStyle;
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	int tabsPtr;
 	int[] breaks, hardBreaks, lineX, lineWidth, lineHeight, lineAscent;
 
@@ -313,6 +315,7 @@ public TextLayout (Device device) {
 	styles = new StyleItem[2];
 	styles[0] = new StyleItem();
 	styles[1] = new StyleItem();
+	stylesCount = 2;
 	init();
 }
 
@@ -361,7 +364,7 @@ void computeRuns() {
 
 	int[] buffer = new int[1];
 	Font font = this.font != null ? this.font : device.systemFont;
-	for (int i = 0; i < styles.length - 1; i++) {
+	for (int i = 0; i < stylesCount - 1; i++) {
 		StyleItem run = styles[i];
 		run.createStyle(device, font);
 		//set the default font in the ZWS when text is empty fixes text metrics
@@ -481,6 +484,8 @@ void destroy() {
 	tabsPtr = 0;
 	if (indentStyle != 0) OS.ATSUDisposeStyle(indentStyle);
 	indentStyle = 0;
+	segments = null;
+	segmentsChars = null;
 }
 
 /**
@@ -583,12 +588,12 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 	*/
 	int rgn = 0;
 	CGRect rect = null;
-	for (int j = 0; j < styles.length; j++) {
+	for (int j = 0; j < stylesCount; j++) {
 		StyleItem run = styles[j];
 		TextStyle style = run.style;
 		if (style == null || style.background == null) continue;
 		int start = translateOffset(run.start);
-		int end = j + 1 < styles.length ? translateOffset(styles[j + 1].start - 1) : length;
+		int end = j + 1 < stylesCount ? translateOffset(styles[j + 1].start - 1) : length;
 		for (int i=0, lineStart=0, lineY = 0; i<breaks.length; i++) {
 			int lineBreak = breaks[i];
 			int lineEnd = lineBreak - 1;
@@ -676,16 +681,16 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 	if (restoreColor) setLayoutControl(OS.kATSULineHighlightCGColorTag, 0, 4);
 	OS.CGContextRestoreGState(gc.handle);
 
-	for (int j = 0; j < styles.length; j++) {
+	for (int j = 0; j < stylesCount; j++) {
 		StyleItem run = styles[j];
 		TextStyle style = run.style;
 		if (style == null) continue;
 		boolean drawUnderline = style.underline && !isUnderlineSupported(style);
-		drawUnderline = drawUnderline && (j + 1 == styles.length || !style.isAdherentUnderline(styles[j + 1].style)); 
+		drawUnderline = drawUnderline && (j + 1 == stylesCount || !style.isAdherentUnderline(styles[j + 1].style)); 
 		boolean drawBorder = style.borderStyle != SWT.NONE;
-		drawBorder = drawBorder && (j + 1 == styles.length || !style.isAdherentBorder(styles[j + 1].style)); 
+		drawBorder = drawBorder && (j + 1 == stylesCount || !style.isAdherentBorder(styles[j + 1].style)); 
 		if (!drawUnderline && !drawBorder) continue;
-		int end = j + 1 < styles.length ? translateOffset(styles[j + 1].start - 1) : length;
+		int end = j + 1 < stylesCount ? translateOffset(styles[j + 1].start - 1) : length;
 		for (int i=0, lineStart=0, lineY = 0; i<breaks.length; i++) {
 			int lineBreak = breaks[i];
 			int lineEnd = lineBreak - 1;
@@ -863,7 +868,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 
 void freeRuns() {
 	if (breaks == null) return;
-	for (int i = 0; i < styles.length; i++) {
+	for (int i = 0; i < stylesCount; i++) {
 		StyleItem run = styles[i];
 		run.freeStyle();
 	}
@@ -1121,7 +1126,14 @@ public int[] getLineOffsets() {
 	computeRuns();
 	int[] offsets = new int[breaks.length + 1];
 	for (int i = 1; i < offsets.length; i++) {
-		offsets[i] = untranslateOffset(breaks[i - 1]);	
+		int offset = breaks[i - 1];
+		for (int j = 0; j < hardBreaks.length - 1; j++) {
+			if (offset == hardBreaks[j]) {
+				offset++;
+				break;
+			}
+		}
+		offsets[i] = untranslateOffset(offset);	
 	}
 	return offsets;
 }
@@ -1146,6 +1158,12 @@ public int getLineIndex(int offset) {
 	int length = text.length();
 	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	offset = translateOffset(offset);
+	for (int i = 0; i < hardBreaks.length - 1; i++) {
+		if (offset == hardBreaks[i]) {
+			if (offset > 0) offset--;
+			break;
+		}
+	}
 	for (int i=0; i<breaks.length-1; i++) {
 		int lineBreak = breaks[i];
 		if (lineBreak > offset) return i;
@@ -1402,7 +1420,6 @@ int _getNativeOffset(int offset, int movement, boolean forward) {
  */
 public int getOffset(Point point, int[] trailing) {
 	checkLayout();
-	computeRuns();
 	if (point == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	return getOffset(point.x, point.y, trailing);
 }
@@ -1518,9 +1535,9 @@ public int getPreviousOffset (int index, int movement) {
  */
 public int[] getRanges () {
 	checkLayout();
-	int[] result = new int[styles.length * 2];
+	int[] result = new int[stylesCount * 2];
 	int count = 0;
-	for (int i=0; i<styles.length - 1; i++) {
+	for (int i=0; i<stylesCount - 1; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].start;
 			result[count++] = styles[i + 1].start - 1;
@@ -1548,40 +1565,56 @@ public int[] getSegments() {
 	return segments;
 }
 
+/**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
 String getSegmentsText() {
-	if (segments == null) return text;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return text;
 	int length = text.length();
 	if (length == 0) return text;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return text;
+	if (segments == null) return text;
+	int nSegments = segments.length;
+	if (nSegments == 0) return text;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return text;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return text;
+		}
 	}
 	invalidOffsets = new int[nSegments];
 	char[] oldChars = new char[length];
 	text.getChars(0, length, oldChars, 0);
 	char[] newChars = new char[length + nSegments];
 	int charCount = 0, segmentCount = 0;
-	char separator = getOrientation() == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
+	char defaultSeparator = getOrientation() == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
 	while (charCount < length) {
 		if (segmentCount < nSegments && charCount == segments[segmentCount]) {
 			invalidOffsets[segmentCount] = charCount + segmentCount;
+			char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 			newChars[charCount + segmentCount++] = separator;
 		} else {
 			newChars[charCount + segmentCount] = oldChars[charCount++];
 		}
 	}
-	if (segmentCount < nSegments) {
+	while (segmentCount < nSegments) {
 		invalidOffsets[segmentCount] = charCount + segmentCount;
 		segments[segmentCount] = charCount;
+		char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 		newChars[charCount + segmentCount++] = separator;
 	}
-	if (segmentCount != nSegments) {
-		int[] tmp = new int [segmentCount];
-		System.arraycopy(invalidOffsets, 0, tmp, 0, segmentCount);
-		invalidOffsets = tmp;
-	}
-	return new String(newChars, 0, Math.min(charCount + segmentCount, newChars.length));
+	return new String(newChars, 0, newChars.length);
 }
 
 /**
@@ -1615,7 +1648,7 @@ public TextStyle getStyle (int offset) {
 	checkLayout();
 	int length = text.length();
 	if (!(0 <= offset && offset < length)) SWT.error(SWT.ERROR_INVALID_RANGE);
-	for (int i=1; i<styles.length; i++) {
+	for (int i=1; i<stylesCount; i++) {
 		StyleItem item = styles[i];
 		if (item.start > offset) {
 			return styles[i - 1].style;
@@ -1639,9 +1672,9 @@ public TextStyle getStyle (int offset) {
  */
 public TextStyle[] getStyles () {
 	checkLayout();
-	TextStyle[] result = new TextStyle[styles.length];
+	TextStyle[] result = new TextStyle[stylesCount];
 	int count = 0;
-	for (int i=0; i<styles.length; i++) {
+	for (int i=0; i<stylesCount; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].style;
 		}
@@ -1700,6 +1733,22 @@ public int getWidth () {
 	return wrapWidth == 0 ? -1 : wrapWidth;
 }
 
+/**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();	
+	return wrapIndent;
+}
+
 /*
  * Returns true if the underline style is supported natively by ATSUI
  */
@@ -1717,7 +1766,7 @@ static boolean isUnderlineSupported (TextStyle style) {
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1858,7 +1907,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1867,6 +1916,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -1921,7 +1972,7 @@ public void setOrientation(int orientation) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1930,12 +1981,18 @@ public void setOrientation(int orientation) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1954,6 +2011,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the line spacing of the receiver.  The line spacing
  * is the space left between lines.
  *
@@ -1995,7 +2085,7 @@ public void setStyle (TextStyle style, int start, int end) {
 	start = Math.min(Math.max(0, start), length - 1);
 	end = Math.min(Math.max(0, end), length - 1);
 	int low = -1;
-	int high = styles.length;
+	int high = stylesCount;
 	while (high - low > 1) {
 		int index = (high + low) / 2;
 		if (styles[index + 1].start > start) {
@@ -2004,7 +2094,7 @@ public void setStyle (TextStyle style, int start, int end) {
 			low = index;
 		}
 	}
-	if (0 <= high && high < styles.length) {
+	if (0 <= high && high < stylesCount) {
 		StyleItem item = styles[high];
 		if (item.start == start && styles[high + 1].start - 1 == end) {
 			if (style == null) {
@@ -2017,7 +2107,7 @@ public void setStyle (TextStyle style, int start, int end) {
 	freeRuns();
 	int modifyStart = high;
 	int modifyEnd = modifyStart;
-	while (modifyEnd < styles.length) {
+	while (modifyEnd < stylesCount) {
 		if (styles[modifyEnd + 1].start > end) break;
 		modifyEnd++;
 	}
@@ -2029,33 +2119,42 @@ public void setStyle (TextStyle style, int start, int end) {
 			return;
 		}
 		if (styleStart != start && styleEnd != end) {
-			StyleItem[] newStyles = new StyleItem[styles.length + 2];
-			System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);
+			int newLength = stylesCount + 2; 
+			if (newLength > styles.length) {
+				int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+				StyleItem[] newStyles = new StyleItem[newSize];
+				System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+				styles = newStyles;
+			}
+			System.arraycopy(styles, modifyEnd + 1, styles, modifyEnd + 3, stylesCount - modifyEnd - 1);
 			StyleItem item = new StyleItem();
 			item.start = start;
 			item.style = style;
-			newStyles[modifyStart + 1] = item;	
+			styles[modifyStart + 1] = item;	
 			item = new StyleItem();
 			item.start = end + 1;
 			item.style = styles[modifyStart].style;
-			newStyles[modifyStart + 2] = item;
-			System.arraycopy(styles, modifyEnd + 1, newStyles, modifyEnd + 3, styles.length - modifyEnd - 1);
-			styles = newStyles;
+			styles[modifyStart + 2] = item;
+			stylesCount = newLength;
 			return;
 		}
 	}
 	if (start == styles[modifyStart].start) modifyStart--;
 	if (end == styles[modifyEnd + 1].start - 1) modifyEnd++;
-	int newLength = styles.length + 1 - (modifyEnd - modifyStart - 1);
-	StyleItem[] newStyles = new StyleItem[newLength];
-	System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);	
+	int newLength = stylesCount + 1 - (modifyEnd - modifyStart - 1);
+	if (newLength > styles.length) {
+		int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+		StyleItem[] newStyles = new StyleItem[newSize];
+		System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+		styles = newStyles;
+	}
+	System.arraycopy(styles, modifyEnd, styles, modifyStart + 2, stylesCount - modifyEnd);
 	StyleItem item = new StyleItem();
 	item.start = start;
 	item.style = style;
-	newStyles[modifyStart + 1] = item;
-	styles[modifyEnd].start = end + 1;
-	System.arraycopy(styles, modifyEnd, newStyles, modifyStart + 2, styles.length - modifyEnd);
-	styles = newStyles;
+	styles[modifyStart + 1] = item;
+	styles[modifyStart + 2].start = end + 1;
+	stylesCount = newLength;
 }
 
 /**
@@ -2135,7 +2234,8 @@ public void setText (String text) {
 	styles = new StyleItem[2];
 	styles[0] = new StyleItem();
 	styles[1] = new StyleItem();
-	styles[styles.length - 1].start = text.length();
+	styles[1].start = text.length();
+	stylesCount = 2;
 }
 
 /**
@@ -2163,6 +2263,28 @@ public void setWidth (int width) {
 }
 
 /**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout ();
+	if (wrapIndent < 0) return;
+	if (this.wrapIndent == wrapIndent) return;
+	freeRuns();
+	this.wrapIndent = wrapIndent;
+}
+
+/**
  * Returns a string containing a concise, human-readable
  * description of the receiver.
  *
@@ -2189,16 +2311,11 @@ int translateOffset(int offset) {
  *  Translate an internal offset to a client offset
  */
 int untranslateOffset(int offset) {
-	for (int i = 0; i < invalidOffsets.length; i++) {
-		if (offset == invalidOffsets[i]) {
-			offset++;
-			continue;
-		}
-		if (offset < invalidOffsets[i]) {
-			return Math.max(0, offset - i - 1);
-		}
+	int i = 0;
+	while (i < invalidOffsets.length && offset > invalidOffsets[i]) {
+		i++;
 	}
-	return Math.max(0, offset - invalidOffsets.length - 1);
+	return Math.max(0, offset - i - 1);
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java
index 05cda4a..0a62775 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Transform.java	
@@ -42,6 +42,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float[] handle;
 	
@@ -206,7 +208,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java
index be1bd01..d9a430c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java	
@@ -103,6 +103,12 @@ public Button (Composite parent, int style) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
@@ -142,17 +148,17 @@ static int checkStyle (int style) {
 }
 
 void click () {
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 }
 
 int callPaintEventHandler (int control, int damageRgn, int visibleRgn, int theEvent, int nextHandler) {
 	int [] context = null;
 	if ((style & SWT.ARROW) != 0) {
 		boolean invert = false;
-		if (OS.VERSION < 0x1050) {
-			invert = (style & SWT.UP) != 0;
-		} else {
+		if (OS.VERSION == 0x1050) {
 			invert = (style & SWT.UP) != 0 || (style & SWT.LEFT) != 0;
+		} else {
+			invert = (style & SWT.UP) != 0;
 		}
 		if (invert) {
 			context = new int [1];
@@ -513,7 +519,7 @@ int kEventControlHit (int nextHandler, int theEvent, int userData) {
 			}
 		}
 	}
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return OS.eventNotHandledErr;
 }
 
@@ -758,7 +764,7 @@ boolean setRadioSelection (boolean value){
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java
index f233332..781853d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Canvas.java	
@@ -99,15 +99,7 @@ public Canvas (Composite parent, int style) {
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	checkWidget ();
-	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
-	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-	Control control = findBackgroundControl ();
-	if (control != null) {
-		control.fillBackground (handle, gc.handle, new Rectangle (x, y, width, height));
-	} else {
-		gc.fillRectangle (x, y, width, height);
-	}
+	super.drawBackground(gc, x, y, width, height, 0, 0);
 }
 
 void drawWidget (int control, int context, int damageRgn, int visibleRgn, int theEvent) {
@@ -280,12 +272,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ColorDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ColorDialog.java
index a19553c..d829ac0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ColorDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ColorDialog.java	
@@ -142,6 +142,8 @@ public RGB open() {
 			info.prompt [i+1] = (byte)title.charAt (i);
 		}
 	}
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+	display.setModalDialog(this);
 	rgb = null;
 	if (OS.PickColor (info) == OS.noErr && info.newColorChosen) {
 		int red = (info.red >> 8) & 0xFF;
@@ -149,6 +151,7 @@ public RGB open() {
 		int blue =	(info.blue >> 8) & 0xFF;
 		rgb = new RGB(red, green, blue);
 	}
+	display.setModalDialog(null);
 	return rgb;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java
index 17ae143..3b8ea96 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Combo.java	
@@ -46,7 +46,7 @@ import org.eclipse.swt.internal.carbon.Rect;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
@@ -66,6 +66,8 @@ public class Combo extends Composite {
 	String lastText = "";
 	ControlEditTextSelectionRec selection;
 
+	static final int VISIBLE_COUNT = 10;
+
 	/**
 	 * the operating system limit for the number of characters
 	 * that the text field in an instance of this class can hold
@@ -369,7 +371,7 @@ void checkSelection () {
 	sendEvent (SWT.Modify);
 	if (isDisposed ()) return;
 	int index = indexOf (newText);
-	if (index != -1) postEvent (SWT.Selection);
+	if (index != -1) sendSelectionEvent (SWT.Selection);
 	
 	/* Send value changed notification to accessible client. */
 	String string = OS.kAXFocusedWindowChangedNotification;
@@ -518,6 +520,7 @@ void createHandle () {
 		if (outControl [0] == 0) error (SWT.ERROR_NO_HANDLES);
 		handle = outControl [0];
 		OS.SetControlData (handle, (short)OS.kHIComboBoxEditTextPart, OS.kTXNDrawCaretWhenInactiveTag, 4, new byte [ ]{0});
+		OS.SetControlData (handle, OS.kControlEntireControl, OS.kHIComboBoxNumVisibleItemsTag, 4, new int[] {VISIBLE_COUNT});
 		OS.HIViewSetVisible (handle, true);
 	}
 }
@@ -1132,7 +1135,7 @@ int kEventProcessCommand (int nextHandler, int theEvent, int userData) {
 	*/
 	postEvent (SWT.Modify);
 	if (isDisposed ()) return OS.eventNotHandledErr;
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return OS.eventNotHandledErr;
 }
 
@@ -1209,7 +1212,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 	switch (keyCode [0]) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 	}
@@ -1265,13 +1268,20 @@ void releaseHandle () {
 	/*
 	* Bug in the Macintosh.  Carbon segments fault if the combo box has
 	* keyboard focus and it is disposed or its parent is disposed because
-	* there is an outstanding timer that runs after the widget is dispoed.
+	* there is an outstanding timer that runs after the widget is disposed.
 	* The fix is to remove the combo box from its parent and dispose it when
 	* the display is idle.
 	* 
 	* NOTE: The problem does not happen when the window is disposed.
+	* 
+	* NOTE: Pixel corruption happens on the parent window when the 
+	* a drop down combo is not in focus and the contents is scrolled
+	* to the left.  This is avoided by setting to combo size to zero.  
 	*/
 	if ((getShell ().state & DISPOSE_SENT) == 0) {
+		if ((style & SWT.DROP_DOWN) != 0) {
+			OS.HIViewSetFrame (handle, new CGRect ());
+		}
 		display.addToDisposeWindow (handle);
 	}
 	super.releaseHandle ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java
index 18f0e3d..88f6c4d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Composite.java	
@@ -189,6 +189,7 @@ public void changed (Control[] changed) {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget();
+	display.runSkin ();
 	Point size;
 	if (layout != null) {
 		if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) {
@@ -267,6 +268,45 @@ void createScrolledHandle (int parentHandle) {
 	OS.HIObjectSetAccessibilityIgnored (handle, true);
 }
 
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	checkWidget ();
+	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	Control control = findBackgroundControl ();
+	if (control != null) {
+		control.fillBackground (handle, gc.handle, new Rectangle (x, y, width, height), offsetX, offsetY);
+	} else {
+		gc.fillRectangle (x, y, width, height);
+	}
+}
+
 void drawBackground (int control, int context) {
 	if (control == scrolledHandle) {
 		Composite parent = this;
@@ -555,6 +595,13 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 			int bits = SWT.ON_TOP | SWT.NO_FOCUS;
 			if ((shell.style & bits) == bits) return OS.noErr;
 		}
+		if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) {
+			short [] button = new short [1];
+			OS.GetEventParameter (theEvent, OS.kEventParamMouseButton, OS.typeMouseButton, null, 2, null, button);
+			if (button [0] == 1) {
+				if (getChildrenCount() == 0) setFocus ();
+			}
+		}
 	}
 	return result;
 }
@@ -797,42 +844,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -884,6 +1008,15 @@ void removeControl (Control control) {
 	fixTabList (control);
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resetVisibleRegion (int control) {
 	if (scrolledVisibleRgn != 0) {
 		OS.DisposeRgn (scrolledVisibleRgn);
@@ -1068,6 +1201,7 @@ void updateLayout (boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin();
 		layout.layout (this, changed);
 	}
 	if (all) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
index edf366e..b186978 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java	
@@ -36,7 +36,8 @@ import org.eclipse.swt.accessibility.Accessible;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -60,6 +61,8 @@ public abstract class Control extends Widget implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	Composite parent;
@@ -76,6 +79,7 @@ public abstract class Control extends Widget implements Drawable {
 	Accessible accessible;
 
 	static final String RESET_VISIBLE_REGION = "org.eclipse.swt.internal.resetVisibleRegion"; //$NON-NLS-1$
+	static final String DRAG_STARTED = "org.eclipse.swt.internal.dragStarted";	//$NON-NLS-1$
 
 
 Control () {
@@ -710,7 +714,7 @@ void destroyWidget () {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -752,7 +756,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -875,6 +879,10 @@ boolean equals(float[] color1, float[] color2) {
 }
 
 void fillBackground (int control, int context, Rectangle bounds) {
+	fillBackground(control, context, bounds, 0, 0);
+}
+
+void fillBackground (int control, int context, Rectangle bounds, int tx, int ty) {
 	OS.CGContextSaveGState (context);
 	CGRect rect = new CGRect ();
 	if (bounds != null) {
@@ -889,14 +897,14 @@ void fillBackground (int control, int context, Rectangle bounds) {
 	if (widget != null && widget.backgroundImage != null) {
 		CGPoint pt = new CGPoint();
 		OS.HIViewConvertPoint (pt, control, widget.handle);
-		OS.CGContextTranslateCTM (context, -pt.x, -pt.y);
+		OS.CGContextTranslateCTM (context, -pt.x - tx, -pt.y - ty);
 		Pattern pattern = new Pattern (display, widget.backgroundImage);
 		GCData data = new GCData ();
 		data.device = display;
 		data.background = widget.getBackgroundColor ().handle;
 		GC gc = GC.carbon_new (context, data);
 		gc.setBackgroundPattern (pattern);
-		gc.fillRectangle ((int) (rect.x + pt.x), (int) (rect.y + pt.y), (int) rect.width, (int) rect.height);
+		gc.fillRectangle ((int) (rect.x + pt.x + tx), (int) (rect.y + pt.y + ty), (int) rect.width, (int) rect.height);
 		gc.dispose ();
 		pattern.dispose();
 	} else if (widget != null && widget.background != null) {
@@ -1117,6 +1125,9 @@ public Rectangle getBounds () {
 	return getControlBounds (topHandle ());
 }
 
+boolean isActive () {
+	return getShell ().getModalShell () == null && display.getModalDialog () == null;
+}
 /**
  * Returns <code>true</code> if the receiver is detecting
  * drag gestures, and  <code>false</code> otherwise. 
@@ -1277,6 +1288,11 @@ int getMininumHeight () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1469,6 +1485,17 @@ boolean hasFocus () {
 int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) {
     switch (inRequest) {
 		case OS.kHMSupplyContent: {
+			org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();
+			OS.memmove(pt, new int[] {inGlobalMouse}, 4);
+			/*
+			* If a control doesn't have a tooltip text, then helpProc gets
+			* called on the controls in its parent hierarchy and their
+			* tooltip text is used. Note that returning OS.eventNotHandledErr
+			* prevents the window help content callback from being called. The
+			* is to only handle the message when the cursor is directly over this
+			* control.
+			*/
+			if (display.getCursorControl (pt) != this) break;
 			short [] contentProvided = {OS.kHMContentNotProvidedDontPropagate};
 			if (toolTipText != null && toolTipText.length () != 0) {
 				char [] buffer = new char [toolTipText.length ()];
@@ -1493,8 +1520,6 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
 				*/
 				int cursorHeight = 16;
 				helpContent.tagSide = (short) OS.kHMAbsoluteCenterAligned;
-				org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point ();
-				OS.memmove(pt, new int[] {inGlobalMouse}, 4);
 				int x = pt.h;
 				int y = pt.v;
 				if (display.helpWidget != this) {
@@ -1520,6 +1545,8 @@ int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentPro
 				helpContent.content1_tagCFString = display.helpString;
 				OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof);
 				contentProvided [0] = OS.kHMContentProvided;
+			} else {
+				OS.HMHideTag();
 			}
 			OS.memmove (outContentProvided, contentProvided, 2);
 			break;
@@ -1585,6 +1612,8 @@ void hookEvents () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	checkWidget();
@@ -1678,6 +1707,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int context, GCData data) {
 	checkWidget ();
@@ -2222,8 +2253,9 @@ int kEventMouseWheelMoved (int nextHandler, int theEvent, int userData) {
 	OS.GetEventParameter (theEvent, OS.kEventParamMouseWheelDelta, OS.typeSInt32, null, 4, null, wheelDelta);
 	Shell shell = getShell ();
 	Control control = this;
+	int type = wheelAxis [0] == OS.kEventMouseWheelAxisY ? SWT.MouseWheel : SWT.MouseHorizontalWheel;
 	while (control != null) {
-		if (!control.sendMouseEvent (SWT.MouseWheel, (short) 0, wheelDelta [0], SWT.SCROLL_LINE, true, theEvent)) {
+		if (!control.sendMouseEvent (type, (short) 0, wheelDelta [0], SWT.SCROLL_LINE, true, theEvent)) {
 			break;
 		}
 		if (control.sendMouseWheel (wheelAxis [0], wheelDelta [0])) break;
@@ -3658,6 +3690,7 @@ public boolean setParent (Composite parent) {
 	OS.HIViewSetVisible (topHandle, (state & HIDDEN) == 0);
 	OS.HIViewSetZOrder (topHandle, OS.kHIViewZOrderBelow, 0);
 	this.parent = parent;
+	reskin (SWT.ALL);
 	return true;
 }
 
@@ -4207,11 +4240,182 @@ boolean traverseMnemonic (char key) {
 }
 
 /**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	if (traversal == SWT.TRAVERSE_NONE) {
+		switch (keyCode) {
+			case SWT.ESC: {
+				traversal = SWT.TRAVERSE_ESCAPE;
+				doit = true;
+				break;
+			}
+			case SWT.CR: {
+				traversal = SWT.TRAVERSE_RETURN;
+				doit = true;
+				break;
+			}
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_RIGHT: {
+				traversal = SWT.TRAVERSE_ARROW_NEXT;
+				doit = false;
+				break;
+			}
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT: {
+				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+				doit = false;
+				break;
+			}
+			case SWT.TAB: {
+				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+				doit = true;
+				break;
+			}
+			case SWT.PAGE_DOWN: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_NEXT;
+					doit = true;
+				}
+				break;
+			}
+			case SWT.PAGE_UP: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+					doit = true;
+				}
+				break;
+			}
+			default: {
+				/* keyCode does not have a corresponding traversal action */
+				return false;
+			}
+		}
+	}
+
+	Event event = new Event ();
+	event.character = character;
+	event.detail = traversal;
+	event.doit = doit;
+	event.keyCode = keyCode;
+	event.keyLocation = keyLocation;
+	event.stateMask = stateMask;
+	Shell shell = getShell ();
+
+	boolean all = false;
+	switch (traversal) {
+		case SWT.TRAVERSE_ESCAPE:
+		case SWT.TRAVERSE_RETURN:
+		case SWT.TRAVERSE_PAGE_NEXT:
+		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+			all = true;
+			// FALL THROUGH
+		}
+		case SWT.TRAVERSE_ARROW_NEXT:
+		case SWT.TRAVERSE_ARROW_PREVIOUS:
+		case SWT.TRAVERSE_TAB_NEXT:
+		case SWT.TRAVERSE_TAB_PREVIOUS: {
+			/* traversal is a valid traversal action */
+			break;
+		}
+		case SWT.TRAVERSE_MNEMONIC: /* not supported on OS X */
+			// FALL THROUGH
+		default: {
+			/* traversal is not a valid traversal action */
+			return false;
+		}
+	}
+
+	Control control = this;
+	do {
+		if (control.traverse (event)) return true;
+		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+		if (control == shell) return false;
+		control = control.parent;
+	} while (all && control != null);
+	return false;
+}
+
+/**
  * Based on the argument, perform one of the expected platform
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java
index cc34412..31f9069 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DateTime.java	
@@ -352,7 +352,7 @@ void handleSelection(Event event) {
 		return;
 	}
 	redraw();
-	postEvent(SWT.Selection);
+	sendSelectionEvent(SWT.Selection);
 }
 
 void handleTraverse(Event event) {
@@ -669,7 +669,7 @@ void sendSelectionEvent () {
 		rec.month != dateRec.month ||
 		rec.year != dateRec.year) {
 		dateRec = rec;
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 }
 
@@ -693,7 +693,7 @@ void setDay(int newDay, boolean notify) {
 	redraw(getCell(calendar.get(Calendar.DAY_OF_MONTH)), cellSize);
 	calendar.set(Calendar.DAY_OF_MONTH, newDay);
 	redraw(getCell(calendar.get(Calendar.DAY_OF_MONTH)), cellSize);
-	if (notify) postEvent(SWT.Selection);
+	if (notify) sendSelectionEvent(SWT.Selection);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java
index 185f0dc..a4d6a36 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -225,6 +225,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus)
  */
 public Button getDefaultButton () {
 	checkWidget();
+	if (defaultButton != null && defaultButton.isDisposed ()) return null;
 	return defaultButton;
 }
 
@@ -408,6 +409,18 @@ void releaseWidget () {
 	defaultButton = null;
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	Menu [] menus = display.getMenus (this);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 boolean restoreFocus () {
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
 	if (savedFocus == null) return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DirectoryDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DirectoryDialog.java
index c9c94de..6ffb960 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DirectoryDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/DirectoryDialog.java	
@@ -35,6 +35,7 @@ import org.eclipse.swt.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class DirectoryDialog extends Dialog {
+	int dialog;
 	String message = "", filterPath = "";
 
 /**
@@ -162,7 +163,12 @@ public String open () {
 				OS.CFRelease (str);
 			}
 		}
+		Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+		dialog = outDialog[0];
+		display.setModalDialog(this);
 		OS.NavDialogRun (outDialog [0]);
+		display.setModalDialog(null);
+		dialog = 0;
 		if (OS.NavDialogGetUserAction (outDialog [0]) == OS.kNavUserActionChoose) {
 			NavReplyRecord record = new NavReplyRecord ();
 			OS.NavDialogGetReply (outDialog [0], record);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
index f953f21..d5dd483 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java	
@@ -22,6 +22,7 @@ import org.eclipse.swt.internal.carbon.GDevice;
 import org.eclipse.swt.internal.carbon.HICommand;
 import org.eclipse.swt.internal.carbon.Rect;
 import org.eclipse.swt.internal.carbon.RGBColor;
+import org.eclipse.swt.internal.carbon.AEDesc;
 import org.eclipse.swt.internal.cocoa.*;
 
 import org.eclipse.swt.*;
@@ -90,7 +91,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -112,10 +113,11 @@ public class Display extends Device {
 	Callback actionCallback, appleEventCallback, clockCallback, commandCallback, controlCallback, accessibilityCallback, appearanceCallback;
 	Callback drawItemCallback, itemDataCallback, itemNotificationCallback, itemCompareCallback, searchCallback, trayItemCallback;
 	Callback hitTestCallback, keyboardCallback, menuCallback, mouseHoverCallback, helpCallback, observerCallback, sourceCallback;
-	Callback mouseCallback, trackingCallback, windowCallback, colorCallback, textInputCallback, releaseCallback, coreEventCallback, pollingCallback;
+	Callback mouseCallback, trackingCallback, windowCallback, colorCallback, textInputCallback, releaseCallback, coreEventCallback;
+	Callback pollingCallback, launcherCallback;
 	int actionProc, appleEventProc, clockProc, commandProc, controlProc, appearanceProc, accessibilityProc;
 	int drawItemProc, itemDataProc, itemNotificationProc, itemCompareProc, helpProc, searchProc, trayItemProc;
-	int hitTestProc, keyboardProc, menuProc, mouseHoverProc, observerProc, sourceProc;
+	int hitTestProc, keyboardProc, menuProc, mouseHoverProc, observerProc, sourceProc, launcherProc;
 	int mouseProc, trackingProc, windowProc, colorProc, textInputProc, releaseProc, coreEventProc, pollingProc;
 	EventTable eventTable, filterTable;
 	int queue, runLoop, runLoopSource, runLoopObserver, lastModifiers, lastState, lastX, lastY;
@@ -151,6 +153,7 @@ public class Display extends Device {
 
 	/* Modality */
 	Shell [] modalShells;
+	Dialog modalDialog;
 
 	/* Menus */
 	Menu menuBar;
@@ -160,9 +163,15 @@ public class Display extends Device {
 	
 	/* Display Shutdown */
 	Runnable [] disposeList;
+	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
 
 	/* System Tray */
 	Tray tray;
+	TrayItem currentTrayItem;
+	Menu trayItemMenu;
 	
 	/* Timers */
 	int [] timerIds;
@@ -218,6 +227,7 @@ public class Display extends Device {
 
 	/* Dock icon */
 	int dockImage;
+	int systemUIMode, systemUIOptions;
 
 	/* Key Mappings. */
 	static int [] [] KeyTable = {
@@ -263,6 +273,11 @@ public class Display extends Device {
 		{105, SWT.F13},
 		{107, SWT.F14},
 		{113, SWT.F15},
+		{106, SWT.F16},
+		{64, SWT.F17},
+		{79, SWT.F18},
+		{80, SWT.F19},
+//		{??, SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{67, SWT.KEYPAD_MULTIPLY},
@@ -293,16 +308,26 @@ public class Display extends Device {
 		{114, SWT.HELP},
 		
 	};
+	
+	final static int SWT_CLASS = 'S' << 24 | 'W' << 16 | 'T' << 8 | '-';
+	final static int SWT_OPEN_FILE_KIND = 1;
+	final static int SWT_OPEN_FILE_PARAM = 'o' << 24 | 'd' << 16 | 'o' << 8 | 'c';
 
 	static String APP_NAME = "SWT"; //$NON-NLS-1$
+	static String APP_VERSION = ""; //$NON-NLS-1$
 	static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
 
 	/* Multiple Displays. */
 	static Display Default;
 	static Display [] Displays = new Display [4];
 				
+	/* Skinning support */
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package Name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
+	static final String SET_MODAL_DIALOG = "org.eclipse.swt.internal.modalDialog"; //$NON-NLS-1$
 			
 	/* Display Data */
 	Object data;
@@ -376,6 +401,14 @@ int appleEventProc (int nextHandler, int theEvent, int userData) {
 	switch (eventClass) {
 		case OS.kEventClassApplication: 
 			switch (eventKind) {
+				case OS.kEventAppDeactivated: {
+					Shell [] shells = getShells ();
+					for (int i = 0; i < shells.length; i++) {
+						Shell shell = shells [i];
+						if (shell.active && !shell.isDisposed ()) shell.kEventWindowDeactivated ();
+					}
+					break;
+				}
 				case OS.kEventAppAvailableWindowBoundsChanged: {
 					/* Reset the dock image in case the dock has been restarted */
 					if (dockImage != 0) {
@@ -447,6 +480,16 @@ public void addFilter (int eventType, Listener listener) {
 	filterTable.hook (eventType, listener);
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -513,6 +556,15 @@ void addPopup (Menu menu) {
 	popups [index] = menu;
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 void addToDisposeWindow (int control) {
 	int [] root = new int [1];
 	if (disposeWindow == 0) {
@@ -865,21 +917,58 @@ int controlProc (int nextHandler, int theEvent, int userData) {
 }
 
 int coreEventProc (int theAppleEvent, int reply, int handlerRefcon) {
-	if (!disposing) {
-		Event event = new Event ();
-		sendEvent (SWT.Close, event);
-		if (event.doit) {
-			dispose ();
-			/*
-			* When the application is closing, no SWT program can continue
-			* to run.  In order to avoid running code after the display has
-			* been disposed, exit from Java.
-			*/
-			/* This code is intentionally commented */
-//			System.exit (0);
-		} else {
-			return OS.userCanceledErr;
-		}
+	switch(handlerRefcon) {
+		case OS.kAEOpenDocuments:
+			AEDesc docList = new AEDesc();
+			int[] count = new int[1];
+		    OS.AEGetParamDesc(theAppleEvent, OS.keyDirectObject, OS.typeAEList, docList);
+			OS.AECountItems(docList, count);
+			for(int index = 1; index <= count[0]; index++) {
+				int [] theAEKeyword = new int [1];
+				int [] typeCode = new int [1];
+				int maximumSize = 80; // size of FSRef
+				int dataPtr = OS.NewPtr (maximumSize);
+				int [] actualSize = new int [1];
+				int status = OS.AEGetNthPtr (docList, 1, OS.typeFSRef, theAEKeyword, typeCode, dataPtr, maximumSize, actualSize);
+				if (status == OS.noErr && typeCode [0] == OS.typeFSRef) {
+					byte [] fsRef = new byte [actualSize [0]];
+					OS.memmove (fsRef, dataPtr, actualSize [0]);
+					int dirUrl = OS.CFURLCreateFromFSRef (OS.kCFAllocatorDefault, fsRef);
+					int dirString = OS.CFURLCopyFileSystemPath(dirUrl, OS.kCFURLPOSIXPathStyle);
+					OS.CFRelease (dirUrl);						
+					int length = OS.CFStringGetLength (dirString);
+					char [] buffer= new char [length];
+					CFRange range = new CFRange ();
+					range.length = length;
+					OS.CFStringGetCharacters (dirString, range, buffer);
+					OS.CFRelease (dirString);
+					String string = new String(buffer);
+					Event event = new Event();
+					event.text = string;
+					sendEvent(SWT.OpenDocument, event);
+				}
+				OS.DisposePtr (dataPtr);
+		    }
+		    OS.AEDisposeDesc(docList);
+			break;
+		case OS.kAEQuitApplication:
+			if (!disposing) {
+				Event event = new Event ();
+				sendEvent (SWT.Close, event);
+				if (event.doit) {
+					dispose ();
+					/*
+					* When the application is closing, no SWT program can continue
+					* to run.  In order to avoid running code after the display has
+					* been disposed, exit from Java.
+					*/
+					/* This code is intentionally commented */
+		//			System.exit (0);
+				} else {
+					return OS.userCanceledErr;
+				}
+			}
+			break;
 	}
 	return OS.noErr;
 }
@@ -976,18 +1065,18 @@ void createDisplay (DeviceData data) {
 	}
 
 	/*
-	* Feature in the Macintosh.  On OS 10.2, it is necessary
-	* to explicitly check in with the Process Manager and set
-	* the current process to be the front process in order for
-	* windows to come to the front by default.  The fix is call
-	* both GetCurrentProcess() and SetFrontProcess().
-	* 
-	* NOTE: It is not actually necessary to use the process
-	* serial number returned by GetCurrentProcess() in the
-	* call to SetFrontProcess() (ie. kCurrentProcess can be
-	* used) but both functions must be called in order for
-	* windows to come to the front.
-	*/
+	 * Feature in the Macintosh.  On OS 10.2, it is necessary
+	 * to explicitly check in with the Process Manager and set
+	 * the current process to be the front process in order for
+	 * windows to come to the front by default.  The fix is call
+	 * both GetCurrentProcess() and SetFrontProcess().
+	 * 
+	 * NOTE: It is not actually necessary to use the process
+	 * serial number returned by GetCurrentProcess() in the
+	 * call to SetFrontProcess() (ie. kCurrentProcess can be
+	 * used) but both functions must be called in order for
+	 * windows to come to the front.
+	 */
 	int [] psn = new int [2];
 	if (OS.GetCurrentProcess (psn) == OS.noErr) {
 		int pid = OS.getpid ();
@@ -1016,8 +1105,10 @@ void createDisplay (DeviceData data) {
 			}
 		}
 		if (buffer != null) OS.CPSSetProcessName (psn, buffer);	
-		OS.CPSEnableForegroundOperation (psn, 0x03, 0x3C, 0x2C, 0x1103);
-		OS.SetFrontProcess (psn);
+		if (!isBundled ()) {
+			OS.CPSEnableForegroundOperation (psn, 0x03, 0x3C, 0x2C, 0x1103);
+			OS.SetFrontProcess (psn);
+		}
 		ptr = OS.getenv (ascii ("APP_ICON_" + pid)); //$NON-NLS-1$
 		if (ptr != 0) {
 			int image = readImageRef (ptr);
@@ -1041,6 +1132,11 @@ void createDisplay (DeviceData data) {
 	runLoop = OS.GetCFRunLoopFromEventLoop (OS.GetCurrentEventLoop ());
 	OS.TXNInitTextension (0, 0, 0);
 	
+	int[] bufferMode = new int[1], bufferOptions = new int[1];
+	OS.GetSystemUIMode(bufferMode, bufferOptions);
+	systemUIMode = bufferMode[0];
+	systemUIOptions = bufferOptions[0];	
+
 	/* Save the current highlight color */
 	OS.RegisterAppearanceClient ();
 	highlightColor = new RGBColor ();
@@ -1154,6 +1250,8 @@ boolean filters (int eventType) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int handle) {
 	checkDevice ();
@@ -1180,6 +1278,8 @@ public Widget findWidget (int handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int handle, int id) {
@@ -1362,6 +1462,10 @@ public Control getCursorControl () {
 	checkDevice ();
 	org.eclipse.swt.internal.carbon.Point where = new org.eclipse.swt.internal.carbon.Point ();
 	OS.GetGlobalMouse (where);
+	return getCursorControl (where);
+}
+
+Control getCursorControl(org.eclipse.swt.internal.carbon.Point where) {
 	int [] theWindow = new int [1];
 	if (OS.FindWindow (where, theWindow) != OS.inContent) return null;
 	if (theWindow [0] == 0) return null;
@@ -1651,7 +1755,11 @@ public Point [] getIconSizes () {
 }
 
 int getLastEventTime () {
-	return (int) (OS.GetLastUserEventTime () * 1000.0);
+	double timestamp = OS.GetLastUserEventTime () * 1000.0;
+	while (timestamp > 0x7FFFFFFF) {
+		timestamp -= 0x7FFFFFFF;
+	}
+	return (int)timestamp;
 }
 
 Menu [] getMenus (Decorations shell) {
@@ -1687,6 +1795,9 @@ int getMessageCount () {
 	return synchronizer.getMessageCount ();
 }
 
+Dialog getModalDialog () {
+	return modalDialog;
+}
 /**
  * Returns an array of monitors attached to the device.
  * 
@@ -1997,6 +2108,23 @@ public Image getSystemImage (int id) {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	return null;
+}
+
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -2160,6 +2288,9 @@ void initializeCallbacks () {
 	pollingCallback = new Callback (this, "pollingProc", 2);
 	pollingProc = pollingCallback.getAddress ();
 	if (pollingProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+	launcherCallback = new Callback (this, "launcherProc", 3);
+	launcherProc = launcherCallback.getAddress ();
+	if (launcherProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
 
 	/* Install Event Handlers */
 	int[] mask1 = new int[] {
@@ -2178,11 +2309,12 @@ void initializeCallbacks () {
 	};
 	OS.InstallEventHandler (appTarget, mouseProc, mask2.length / 2, mask2, 0, null);
 	int [] mask3 = new int[] {
+		OS.kEventClassApplication, OS.kEventAppDeactivated,
 		OS.kEventClassApplication, OS.kEventAppAvailableWindowBoundsChanged,
 		OS.kEventClassAppleEvent, OS.kEventAppleEvent,
 	};
 	OS.InstallEventHandler (appTarget, appleEventProc, mask3.length / 2, mask3, 0, null);
-	OS.AEInstallEventHandler(OS.kCoreEventClass, OS.kAEQuitApplication, coreEventProc, 0, false);
+	OS.AEInstallEventHandler(OS.kCoreEventClass, OS.kAEQuitApplication, coreEventProc, OS.kAEQuitApplication, false);
 
 	int [] mask4 = new int[] {
 		OS.kEventClassKeyboard, OS.kEventRawKeyDown,
@@ -2204,7 +2336,13 @@ void initializeCallbacks () {
 	OS.AEInstallEventHandler (OS.kAppearanceEventClass, OS.kAESmallSystemFontChanged, appearanceProc, 0, false);
 	OS.AEInstallEventHandler (OS.kAppearanceEventClass, OS.kAESystemFontChanged, appearanceProc, 0, false);
 	OS.AEInstallEventHandler (OS.kAppearanceEventClass, OS.kAEViewsFontChanged, appearanceProc, 0, false);
-
+	
+	int[] mask6 = new int[] {
+			SWT_CLASS, SWT_OPEN_FILE_KIND,
+		};
+	OS.InstallEventHandler (appTarget, launcherProc, mask6.length / 2, mask6, 0, null);
+	OS.AEInstallEventHandler(OS.kCoreEventClass, OS.kAEOpenDocuments, coreEventProc, OS.kAEOpenDocuments, false);
+	
 	int mode = OS.kCFRunLoopCommonModes ();
 	int activities = OS.kCFRunLoopBeforeWaiting;
 	runLoopObserver = OS.CFRunLoopObserverCreate (OS.kCFAllocatorDefault, activities, true, 0, observerProc, 0);
@@ -2291,6 +2429,8 @@ void initializeWidgetTable () {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2347,6 +2487,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int context, GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2369,6 +2511,17 @@ public void internal_dispose_GC (int context, GCData data) {
 	OS.CGContextRelease (context);
 }
 
+boolean isBundled () {
+	int mainBundle = OS.CFBundleGetMainBundle ();
+	if (mainBundle != 0) {
+		int [] packageType = new int [1];
+		int [] packageCreator = new int [1];
+		OS.CFBundleGetPackageInfo (mainBundle, packageType, packageCreator);
+		if (packageType[0] == OS.APPL) return true;
+	}
+	return false;
+}
+
 static boolean isValidClass (Class clazz) {
 	String name = clazz.getName ();
 	int index = name.lastIndexOf ('.');
@@ -2417,6 +2570,23 @@ int pollingProc (int inTimer, int inUserData) {
 	return 0;
 }
 
+int launcherProc (int nextHandler, int theEvent, int userData) {
+	int [] stringRef = new int [1];
+	OS.GetEventParameter (theEvent, SWT_OPEN_FILE_PARAM, OS.typeCFStringRef, null, 4, null, stringRef);
+	int length = 0;
+	if (stringRef [0] != 0) length = OS.CFStringGetLength (stringRef [0]);
+	char [] buffer= new char [length];
+	if (length > 0) {
+		CFRange range = new CFRange ();
+		range.length = length;
+		OS.CFStringGetCharacters (stringRef [0], range, buffer);
+	}
+	String filePath = new String(buffer);
+	Event event = new Event();
+	event.text = filePath;
+	sendEvent(SWT.OpenDocument, event);
+	return OS.noErr;
+}
 /**
  * Generate a low level system event.
  * 
@@ -3040,6 +3210,8 @@ int readImageRef(int path) {
  */
 public boolean readAndDispatch () {
 	checkDevice ();
+	runSkin ();
+	runDeferredLayouts ();
 	boolean events = false;
 	events |= runSettings ();
 	events |= runTimers ();
@@ -3228,6 +3400,7 @@ void releaseDisplay () {
 	helpString = 0;
 	widgetTable = menus = popups = null;
 	modalShells = null;
+	modalDialog = null;
 	menuBar = null;
 	eventTable = filterTable = null;
 	thread = null;
@@ -3497,11 +3670,19 @@ boolean runDeferredEvents () {
 	return run;
 }
 
-boolean runEventLoopTimers () {
-	allowTimers = false;
-	boolean result = OS.ReceiveNextEvent (0, null, OS.kEventDurationNoWait, false, null) == OS.noErr;
-	allowTimers = true;
-	return result;
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
 }
 
 boolean runPaint () {
@@ -3557,6 +3738,29 @@ boolean runSettings () {
 	return true;
 }
 
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+	
 boolean runTimers () {
 	if (timerList == null) return false;
 	boolean result = false;
@@ -3594,10 +3798,42 @@ void sendEvent (int eventType, Event event) {
 }
 
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
@@ -3605,6 +3841,17 @@ public static void setAppName (String name) {
 	APP_NAME = name;
 }
 
+/**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
+}
+
 void setCurrentCaret (Caret caret) {
 	if (caretID != 0) OS.RemoveEventLoopTimer (caretID);
 	caretID = 0;
@@ -3728,6 +3975,13 @@ public void setData (String key, Object value) {
 		}
 	}
 	
+	if (key.equals(SET_MODAL_DIALOG)) {
+		if (value == null) {
+			this.modalDialog = null;
+		} else {
+			this.modalDialog = (Dialog) value;
+		}
+	}
 	/* Remove the key/value pair */
 	if (value == null) {
 		if (keys == null) return;
@@ -3800,6 +4054,10 @@ public void setData (Object data) {
 	this.data = data;
 }
 
+void setModalDialog (Dialog modalDialog) {
+	this.modalDialog = modalDialog;
+}
+
 /**
  * Sets the synchronizer used by the display to be
  * the argument, which can not be null.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FileDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FileDialog.java
index 7b4b4d2..b3d4ee6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FileDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FileDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,6 +37,7 @@ import org.eclipse.swt.internal.carbon.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class FileDialog extends Dialog {
+	int dialog;
 	String [] filterNames = new String [0];
 	String [] filterExtensions = new String [0];
 	String [] fileNames = new String[0];	
@@ -201,46 +202,55 @@ int eventProc (int callBackSelector, int callBackParms, int callBackUD) {
 }
 
 int filterProc (int theItem, int infoPtr, int callBackUD, int filterMode) {
+	int result = 1;
 	if (filterMode == OS.kNavFilteringBrowserList) {
 		if (filterExtensions != null && 0 <= filterIndex && filterIndex < filterExtensions.length) {
 			NavFileOrFolderInfo info = new NavFileOrFolderInfo();
 			OS.memmove (info, infoPtr, NavFileOrFolderInfo.sizeof);
 			if (!info.isFolder) {
-				OS.AECoerceDesc (theItem, OS.typeFSRef, theItem);
+				AEDesc desc = new AEDesc();
+				OS.AECoerceDesc (theItem, OS.typeFSRef, desc);
 				byte [] fsRef = new byte [80];
-				if (OS.AEGetDescData (theItem, fsRef, fsRef.length) == OS.noErr) {
+				if (OS.AEGetDescData (desc, fsRef, fsRef.length) == OS.noErr) {
 					int url = OS.CFURLCreateFromFSRef (OS.kCFAllocatorDefault, fsRef);
 					if (url != 0) {
-						int ext = OS.CFURLCopyPathExtension (url);
+						int fName = OS.CFURLCopyLastPathComponent(url);
 						OS.CFRelease (url);
-						if (ext != 0) {
-							char [] buffer= new char [OS.CFStringGetLength (ext)];
+						if (fName != 0) {
+							char [] buffer= new char [OS.CFStringGetLength (fName)];
 							if (buffer.length > 0) {
 								CFRange range = new CFRange ();
 								range.length = buffer.length;
-								OS.CFStringGetCharacters (ext, range, buffer);
+								OS.CFStringGetCharacters (fName, range, buffer);
 							}
-							OS.CFRelease (ext);
-							String extension = new String (buffer);
+							OS.CFRelease (fName);
+							String fileName = new String (buffer);
 							String extensions = filterExtensions [filterIndex];
 							int start = 0, length = extensions.length ();
+							result = 0;
 							while (start < length) {
 								int index = extensions.indexOf (EXTENSION_SEPARATOR, start);
 								if (index == -1) index = length;
 								String filter = extensions.substring (start, index).trim ();
-								if (filter.equals ("*") || filter.equals ("*.*")) return 1;
+								if (filter.equals ("*") || filter.equals ("*.*")) {
+									result = 1;
+									break;
+								}
 								if (filter.startsWith ("*.")) filter = filter.substring (2);
-								if (filter.toLowerCase ().equals(extension.toLowerCase ())) return 1;
+								if (fileName.toLowerCase ().endsWith("." + filter.toLowerCase ()))  {
+									result = 1;
+									break;
+								}
 								start = index + 1;
 							}
-							return 0;
 						}
 					}
 				}
+				OS.AEDisposeDesc(desc);
 			}
 		}
 	}
-	return 1;
+	return result;
 }
 
 String getString (int cfString) {
@@ -296,7 +306,7 @@ public String open () {
 	int [] outDialog = new int [1];
 	int filterProc = 0, eventProc = 0;
 	if (filterExtensions != null && filterExtensions.length != 0) {
-		extensions = options.popupExtension = OS.CFArrayCreateMutable (OS.kCFAllocatorDefault, filterExtensions.length, 0);
+		extensions = options.popupExtension = OS.CFArrayCreateMutable (OS.kCFAllocatorDefault, filterExtensions.length, OS.kCFTypeArrayCallBacks ());
 		for (int i = 0; i < filterExtensions.length; i++) {
 			String str = filterExtensions [i];
 			if (filterNames != null && filterNames.length > i) {
@@ -305,7 +315,10 @@ public String open () {
 			char [] chars = new char [str.length ()];
 			str.getChars (0, chars.length, chars, 0);
 			int ptr = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
-			if (ptr != 0) OS.CFArrayAppendValue (extensions, ptr);
+			if (ptr != 0) {
+				OS.CFArrayAppendValue (extensions, ptr);
+				OS.CFRelease(ptr);
+			}
 		}
 		if ((style & SWT.SAVE) == 0) {
 			filterCallback = new Callback (this, "filterProc", 4);
@@ -349,7 +362,12 @@ public String open () {
 			spec.menuType = filterIndex;
 			OS.NavCustomControl (outDialog [0], OS.kNavCtlSelectCustomType, spec);
 		}
+		Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+		dialog = outDialog[0];
+		display.setModalDialog(this);
 		OS.NavDialogRun (outDialog [0]);
+		display.setModalDialog(null);
+		dialog = 0;
 		int action = OS.NavDialogGetUserAction (outDialog [0]);
 		switch (action) {
 			case OS.kNavUserActionOpen:
@@ -383,14 +401,39 @@ public String open () {
 
 							/* Full path */
 							int fullUrl = OS.CFURLCreateCopyAppendingPathComponent (OS.kCFAllocatorDefault, pathUrl, record.saveFileName, false);
+							if (filterExtensions != null && filterExtensions.length != 0) {
+								if (0 <= filterIndex && filterIndex < filterExtensions.length) {
+									/* Append extension if not present */
+									int ext = OS.CFURLCopyPathExtension (fullUrl);
+									if (ext == 0) {
+										String exts = filterExtensions [filterIndex];
+										int length = exts.length ();
+										int index = exts.indexOf (EXTENSION_SEPARATOR);
+										if (index == -1) index = length;
+										String filter = exts.substring (0, index).trim ();
+										if (!filter.equals ("*") && !filter.equals ("*.*")) {
+											if (filter.startsWith ("*.")) filter = filter.substring (2);
+											char[] buffer = new char[filter.length()];
+											filter.getChars(0, buffer.length, buffer, 0);
+											ext = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer, buffer.length);
+											int fullUrlWithExt = OS.CFURLCreateCopyAppendingPathExtension(OS.kCFAllocatorDefault, fullUrl, ext);
+											OS.CFRelease(fullUrl);
+											fullUrl = fullUrlWithExt;
+										}
+									}
+									if (ext != 0) OS.CFRelease(ext);
+								}
+							}
 							int fullString = OS.CFURLCopyFileSystemPath (fullUrl, OS.kCFURLPOSIXPathStyle);
 							fullPath = getString (fullString);
 							OS.CFRelease (fullString);
-							OS.CFRelease (fullUrl);
 
 							/* File name */
-							fileName = fileNames [0] = getString (record.saveFileName);
+							int file = OS.CFURLCopyLastPathComponent(fullUrl);
+							fileName = fileNames [0] = getString (file);
+							OS.CFRelease(file);
 							
+							OS.CFRelease (fullUrl);
 							OS.CFRelease (pathUrl);
 						}
 					} else {
@@ -443,13 +486,7 @@ public String open () {
 	if (titlePtr != 0) OS.CFRelease (titlePtr);
 	if (fileNamePtr != 0) OS.CFRelease (fileNamePtr);	
 	if (outDialog [0] != 0) OS.NavDialogDispose (outDialog [0]);
-	if (extensions != 0) {
-		int count = OS.CFArrayGetCount (extensions);
-		for (int i = 0; i < count; i++) {
-			OS.CFRelease (OS.CFArrayGetValueAtIndex (extensions, i));
-		}			
-		OS.CFRelease (extensions);
-	}
+	if (extensions != 0) OS.CFRelease (extensions);
 	if (filterCallback != null) filterCallback.dispose();
 	if (eventCallback != null) eventCallback.dispose();
 	return fullPath;	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FontDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FontDialog.java
index bf5c06b..020c174 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FontDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/FontDialog.java	
@@ -261,6 +261,7 @@ public FontData open () {
 		count++;
 		window = OS.GetPreviousWindow (window);
 	}
+	display.setModalDialog(this);
 	OS.FPShowHideFontPanel ();
 	int fontsWindow = 0;
 	window = OS.GetPreviousWindow (0);
@@ -298,6 +299,7 @@ public FontData open () {
 	while (!parent.isDisposed() && open) {
 		if (!display.readAndDispatch ()) display.sleep ();
 	}
+	display.setModalDialog(null);
 	OS.RemoveEventHandler (outRef [0]);
 	fontPanelCallback.dispose ();
 	if (fontID != 0 && fontSize != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java
index 5a475f7..561c617 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java	
@@ -11,7 +11,9 @@
 package org.eclipse.swt.widgets;
 
 
+import org.eclipse.swt.internal.carbon.CGRect;
 import org.eclipse.swt.internal.carbon.ControlFontStyleRec;
+import org.eclipse.swt.internal.carbon.HILayoutInfo;
 import org.eclipse.swt.internal.carbon.OS;
 
 import org.eclipse.swt.*;
@@ -165,7 +167,42 @@ void createHandle () {
 	int [] outControl = new int [1];
 	int window = OS.GetControlOwner (parent.handle);
 	if ((style & SWT.SEPARATOR) != 0) {
+		/*
+		 * Feature in Carbon: Separator control decides how to orient itself
+		 * based on the width and height. If height >= width it orients
+		 * vertically, else it orients horizontally. 
+		 * Fix is to have two native controls to implement the separator label.
+		 * The top control (userPaneControl) honors the bounds set by the
+		 * user and the inner one (separatorControl) creates the separator
+		 * with the correct orientation.
+		 */
+		int features = OS.kControlSupportsEmbedding;
+		OS.CreateUserPaneControl (window, null, features, outControl);
+		if (outControl [0] == 0) error (SWT.ERROR_NO_HANDLES);
+		handle = outControl [0];
+		outControl[0] = 0;
 		OS.CreateSeparatorControl (window, null, outControl);
+		if (outControl [0] == 0) error (SWT.ERROR_NO_HANDLES);
+		int separatorHandle = outControl [0];
+		OS.HIViewAddSubview (handle, separatorHandle);
+		CGRect r = new CGRect();
+		r.width = DEFAULT_WIDTH;
+		r.height = DEFAULT_HEIGHT;
+		OS.HIViewSetFrame (handle, r);
+		HILayoutInfo layout = new HILayoutInfo ();
+		layout.version = 0;
+		OS.HIViewGetLayoutInfo (separatorHandle, layout);
+		if ((style & SWT.HORIZONTAL) != 0) {
+			r.height = 3;
+			layout.scale.x.ratio = 1.0f;
+			layout.position.y.kind = OS.kHILayoutPositionCenter;
+		} else {
+			r.width = 3;
+			layout.position.x.kind = OS.kHILayoutPositionCenter;
+			layout.scale.y.ratio = 1.0f;
+		}
+		OS.HIViewSetFrame (separatorHandle, r);
+		OS.HIViewSetLayoutInfo (separatorHandle, layout);
 	} else {
 		int just = OS.teFlushLeft;
 		if ((style & SWT.CENTER) != 0) just = OS.teCenter;
@@ -174,11 +211,11 @@ void createHandle () {
 		fontStyle.flags |= OS.kControlUseJustMask;
 		fontStyle.just = (short) just;
 		OS.CreateStaticTextControl (window, null, 0, fontStyle, outControl);
-	}
-	if (outControl [0] == 0) error (SWT.ERROR_NO_HANDLES);
-	handle = outControl [0];
-	if ((style & SWT.WRAP) == 0) {
-		OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlStaticTextIsMultilineTag, 1, new byte[] {0});
+		if (outControl [0] == 0) error (SWT.ERROR_NO_HANDLES);
+		handle = outControl [0];
+		if ((style & SWT.WRAP) == 0) {
+			OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlStaticTextIsMultilineTag, 1, new byte[] {0});
+		}
 	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java
index 0d0fb58..a74de59 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Link.java	
@@ -177,7 +177,7 @@ void createWidget () {
 
 void drawBackground (int control, int context) {
 	fillBackground (control, context, null);
-	if (!hasFocus () || !drawFocusRing () || focusIndex == -1) return;
+	if (!hasFocus () || focusIndex == -1) return;
 	int [] outMetric = new int [1];
 	OS.GetThemeMetric (OS.kThemeMetricFocusRectOutset, outMetric);
 	outMetric[0]--;
@@ -368,7 +368,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 		case 76: /* Enter */
 			Event event = new Event ();
 			event.text = ids [focusIndex];
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			break;
 		case 48: /* Tab */
 			int [] modifiers = new int [1];
@@ -637,7 +637,7 @@ boolean sendMouseEvent (int type, short button, int count, int detail, boolean s
 					if (rectangle.contains (x, y)) {
 						Event event = new Event ();
 						event.text = ids [focusIndex];
-						notifyListeners (SWT.Selection, event);
+						sendSelectionEvent (SWT.Selection, event, true);
 						return result;
 					}
 				}
@@ -674,6 +674,18 @@ void setFontStyle (Font font) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java
index bc1d214..aaaa57a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/List.java	
@@ -794,7 +794,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 	switch (keyCode [0]) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 		/*
@@ -844,13 +844,13 @@ int itemNotificationProc (int browser, int id, int message) {
 			if (selected) {
 				anchorFirst = first [0];
 				anchorLast = last [0];
-				postEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection);
 			}
 			break;
 		}	
 		case OS.kDataBrowserItemDoubleClicked: {
 			if (display.clickCount == 2) {
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 			}
 			break;
 		}
@@ -1383,7 +1383,7 @@ void setSelection (int index, boolean notify) {
 		int [] ids = new int [] {index + 1};
 		select (ids, ids.length, true);
 		showIndex (index);
-		if (notify) postEvent (SWT.Selection);
+		if (notify) sendSelectionEvent (SWT.Selection);
 	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java
index 13a2f73..cb05733 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Menu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,8 @@ public class Menu extends Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	int handle;
 	short id;
@@ -213,11 +215,19 @@ void _setVisible (boolean visible) {
 	if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
 	if (visible) {
 		org.eclipse.swt.internal.carbon.Point where = new org.eclipse.swt.internal.carbon.Point ();
-		if (hasLocation) {
-			where.h = (short) x;
-			where.v = (short) y;
+		TrayItem trayItem = display.currentTrayItem;
+		if (trayItem != null) {
+			display.trayItemMenu = this;
+			Point pt = trayItem.getMenuLocation();
+			where.h = (short) pt.x;
+			where.v = (short) pt.y;
 		} else {
-			OS.GetGlobalMouse (where);
+			if (hasLocation) {
+				where.h = (short) x;
+				where.v = (short) y;
+			} else {
+				OS.GetGlobalMouse (where);
+			}
 		}
 		/*
 		* Bug in the Macintosh.  When a menu is open with ContextualMenuSelect() the
@@ -1042,6 +1052,15 @@ public void removeMenuListener (MenuListener listener) {
 	eventTable.unhook (SWT.Show, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the default menu item to the argument or removes
  * the default emphasis when the argument is <code>null</code>.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java
index 2c653b6..6611e93 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MenuItem.java	
@@ -184,7 +184,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -379,11 +385,7 @@ int kEventProcessCommand (int nextHandler, int theEvent, int userData) {
 			}
 		}
 	}
-	int [] modifiers = new int [1];
-	OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-	Event event = new Event ();
-	setInputState (event, (short) 0, OS.GetCurrentEventButtonState (), modifiers [0]);
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection);
 	return OS.noErr;
 }
 
@@ -547,6 +549,13 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /*public*/ void select () {
 	checkWidget ();
 	Menu menu = parent, menuParent;
@@ -767,7 +776,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java
index 58ed9c4..c2f6bbe 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/MessageBox.java	
@@ -233,8 +233,11 @@ public int open () {
 		if ((style & SWT.SYSTEM_MODAL) != 0) {
 			OS.SetFrontProcessWithOptions (new int [] {0, OS.kCurrentProcess}, OS.kSetFrontProcessFrontWindowOnly);
 		}
+		Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+		display.setModalDialog(this);
 		short [] outItemHit = new short [1];
 		OS.RunStandardAlert(dialogRef[0], 0, outItemHit);
+		display.setModalDialog(null);
 		if (outItemHit [0] != 0) {
 			switch (bits) {
 				case SWT.OK:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java
index 83e0d24..c3d1d57 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ProgressBar.java	
@@ -235,14 +235,14 @@ public void setMinimum (int value) {
 public void setSelection (int value) {
 	checkWidget();
     OS.SetControl32BitValue (handle, value);
-    /*
-    * Feature in the Macintosh.  Progress bars are always updated
-    * using an event loop timer, even when they are not indeterminate.
-    * This means that nothing is drawn until the event loop.  The
-    * fix is to allow operating system timers to run without dispatching
-    * any other events.
-    */
-	display.runEventLoopTimers ();
+	/*
+	* Feature in Cocoa.  The progress bar does
+	* not redraw right away when a value is
+	* changed.  This is not strictly incorrect
+	* but unexpected.  The fix is to force all
+	* outstanding redraws to be delivered.
+	*/
+	update(false);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java
index e7c44b5..1f59b75 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Sash.java	
@@ -296,7 +296,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 			event.y = newY;
 			event.width = width;
 			event.height = height;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			if (isDisposed ()) break;
 			if (event.doit) {
 				setBounds (event.x, event.y, width, height);
@@ -371,7 +371,7 @@ boolean sendMouseEvent (int type, short button, int count, int detail, boolean s
 			event.y = controlY;
 			event.width = width;
 			event.height = height;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			if (isDisposed ()) return result;
 			if (event.doit) {
 				lastX = event.x;
@@ -388,7 +388,7 @@ boolean sendMouseEvent (int type, short button, int count, int detail, boolean s
 			event.y = lastY;
 			event.width = width;
 			event.height = height;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			if (isDisposed ()) return result;
 			if (event.doit) {
 				setBounds (event.x, event.y, width, height);
@@ -408,7 +408,7 @@ boolean sendMouseEvent (int type, short button, int count, int detail, boolean s
 			event.y = newY;
 			event.width = width;
 			event.height = height;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			if (isDisposed ()) return result;
 			if (event.doit) {
 				lastX = event.x;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java
index 957ba47..1c64e84 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scale.java	
@@ -80,7 +80,7 @@ public Scale (Composite parent, int style) {
 int actionProc (int theControl, int partCode) {
 	int result = super.actionProc (theControl, partCode);
 	if (result == OS.noErr) return result;
-	sendEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection, null, true);
 	return result;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java
index 8313c22..b4eeb50 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java	
@@ -11,7 +11,12 @@
 package org.eclipse.swt.widgets;
 
  
+import org.eclipse.swt.internal.carbon.CGPoint;
+import org.eclipse.swt.internal.carbon.CGRect;
+import org.eclipse.swt.internal.carbon.HIThemeTrackDrawInfo;
 import org.eclipse.swt.internal.carbon.OS;
+import org.eclipse.swt.internal.carbon.Rect;
+import org.eclipse.swt.internal.carbon.ScrollBarTrackInfo;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
@@ -181,7 +186,7 @@ int actionProc (int theControl, int partCode) {
 		int value = OS.GetControl32BitValue (handle) + inc;	    
 		OS.SetControl32BitValue (handle, value);
 	}
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	return result;
 }
 
@@ -365,8 +370,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -383,6 +387,73 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	int rgnHandle = OS.NewRgn ();
+	OS.GetControlRegion (handle, (short)OS.kControlIndicatorPart, rgnHandle);
+	Rect rect = new Rect ();
+	OS.GetRegionBounds (rgnHandle, rect);
+	OS.DisposeRgn (rgnHandle);
+	CGPoint pt = new CGPoint ();
+	OS.HIViewConvertPoint (pt, handle, parent.handle);
+	Rectangle result = new Rectangle(rect.left, rect.top, (rect.right - rect.left), (rect.bottom - rect.top));
+	result.x += (int) pt.x;
+	result.y += (int) pt.y;
+	return result;
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	HIThemeTrackDrawInfo info = new HIThemeTrackDrawInfo();
+	info.min = OS.GetControl32BitMinimum (handle);
+	info.max = OS.GetControl32BitMaximum (handle);
+	info.value = OS.GetControl32BitValue (handle);	
+	info.kind = OS.kThemeScrollBarMedium;
+	info.attributes = OS.kThemeTrackShowThumb;
+	if ((style & SWT.HORIZONTAL) != 0) info.attributes |= OS.kThemeTrackHorizontal;
+	info.enableState = OS.kThemeTrackActive;
+	info.scrollbar = new ScrollBarTrackInfo();
+	info.scrollbar.viewsize = OS.GetControlViewSize (handle);
+	CGRect rect = new CGRect ();
+	OS.HIViewGetFrame (handle, rect);
+	info.bounds_x = rect.x;
+	info.bounds_y = rect.y;
+	info.bounds_width = rect.width;
+	info.bounds_height = rect.height;
+	OS.HIThemeGetTrackPartBounds(info, (short) OS.kControlPageDownPart, rect);
+	CGRect rect1 = new CGRect ();
+	OS.HIThemeGetTrackPartBounds(info, (short) OS.kControlPageUpPart, rect1);
+	OS.CGRectUnion(rect, rect1, rect);
+	return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -492,7 +563,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 	status = OS.CallNextEventHandler (nextHandler, theEvent);
 	if (dragging) {
 		Event event = new Event ();
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, true);
 	}
 	dragging = false;
 	return status;
@@ -696,10 +767,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scrollable.java
index 482e713..d1b6d9c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Scrollable.java	
@@ -299,7 +299,7 @@ int kEventMouseWheelMoved (int nextHandler, int theEvent, int userData) {
 		if (position != vPosition) {
 			Event event = new Event ();
 			event.detail = position < vPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN; 
-			verticalBar.sendEvent (SWT.Selection, event);
+			verticalBar.sendSelectionEvent (SWT.Selection, event, true);
 			redraw = true;
 		}
 	}
@@ -308,7 +308,7 @@ int kEventMouseWheelMoved (int nextHandler, int theEvent, int userData) {
 		if (position != hPosition) {
 			Event event = new Event ();
 			event.detail = position < hPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN; 
-			horizontalBar.sendEvent (SWT.Selection, event);
+			horizontalBar.sendSelectionEvent (SWT.Selection, event, true);
 			redraw = true;
 		}
 	}
@@ -380,6 +380,12 @@ void resizeClientArea () {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 boolean sendMouseWheel (short wheelAxis, int wheelDelta) {
 	if ((state & CANVAS) != 0) {
 		ScrollBar bar = wheelAxis == OS.kEventMouseWheelAxisX ? horizontalBar : verticalBar;
@@ -387,7 +393,7 @@ boolean sendMouseWheel (short wheelAxis, int wheelDelta) {
 			bar.setSelection (Math.max (0, bar.getSelection () - bar.getIncrement () * wheelDelta));
 			Event event = new Event ();
 		    event.detail = wheelDelta > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
-			bar.sendEvent (SWT.Selection, event);
+			bar.sendSelectionEvent (SWT.Selection, event, true);
 			return true;
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java
index e81ceaa..e4eaacb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,7 +122,7 @@ import org.eclipse.swt.graphics.*;
 public class Shell extends Decorations {
 	int shellHandle, windowGroup;
 	boolean resized, moved, drawing, reshape, update, deferDispose, active, disposed, opened, fullScreen, center;
-	boolean showWithParent, ignoreBounds;
+	boolean showWithParent, ignoreBounds, isActivating;
 	int invalRgn;
 	Control lastActive;
 	Rect rgnRect;
@@ -284,6 +284,7 @@ Shell (Display display, Shell parent, int style, int handle, boolean embedded) {
 			state |= FOREIGN_HANDLE;
 		}
 	}
+	reskinWidget ();
 	createWidget ();
 }
 
@@ -380,6 +381,8 @@ public Shell (Shell parent, int style) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int handle) {
@@ -587,20 +590,16 @@ void createHandle () {
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 		if (OS.IsWindowVisible (shellHandle)) state &= ~HIDDEN;
 	}
+	if ((style & SWT.RESIZE) != 0) {
+		int [] growBox = new int [1];
+		OS.HIViewFindByID (OS.HIViewGetRoot (shellHandle), OS.kHIViewWindowGrowBoxID(), growBox);
+		if (growBox[0] != 0) OS.HIGrowBoxViewSetTransparent(growBox[0], true);
+	}
 	int [] outGroup = new int [1];
-	OS.CreateWindowGroup (OS.kWindowGroupAttrHideOnCollapse, outGroup);
+	OS.CreateWindowGroup (OS.kWindowGroupAttrHideOnCollapse | OS.kWindowGroupAttrSelectAsLayer, outGroup);
 	if (outGroup [0] == 0) error (SWT.ERROR_NO_HANDLES);
 	windowGroup = outGroup [0];
-	int parentGroup;
-	if ((style & SWT.ON_TOP) != 0) {
-		parentGroup = OS.GetWindowGroupOfClass (OS.kFloatingWindowClass);		
-	} else {
-		if (parent != null) {
-			parentGroup = parent.getShell ().windowGroup;
-		} else {
-			parentGroup = OS.GetWindowGroupOfClass (OS.kDocumentWindowClass);
-		}
-	}
+	int parentGroup = getParentGroup ();
 	OS.SetWindowGroup (shellHandle, parentGroup);
 	OS.SetWindowGroupParent (windowGroup, parentGroup);
 	OS.SetWindowGroupOwner (windowGroup, shellHandle);
@@ -633,6 +632,7 @@ void deregister () {
 }
 
 void destroyWidget () {
+	setWindowModal (display.getModalDialog (), false, true);
 	int theWindow = shellHandle;
 	/*
 	* Bug in the Macintosh.  Under certain circumstances, yet to
@@ -902,6 +902,17 @@ public boolean getModified () {
 	return OS.IsWindowModified (shellHandle);
 }
 
+int getParentGroup () {
+	if ((style & SWT.ON_TOP) != 0) {
+		return OS.GetWindowGroupOfClass (OS.kUtilityWindowClass);
+	} else {
+		if (parent != null) {
+			return parent.getShell ().windowGroup;
+		} else {
+			return OS.GetWindowGroupOfClass (OS.kDocumentWindowClass);
+		}
+	}
+}
 
 float [] getParentBackground () {
 	return null;
@@ -1002,6 +1013,7 @@ void hookEvents () {
 		OS.kEventClassWindow, OS.kEventWindowShown,
 		OS.kEventClassWindow, OS.kEventWindowUpdate,
 		OS.kEventClassWindow, OS.kEventWindowGetClickModality,
+		OS.kEventClassWindow, OS.kEventWindowZoom,
 	};
 	int windowTarget = OS.GetWindowEventTarget (shellHandle);
 	OS.InstallEventHandler (windowTarget, windowProc, mask1.length / 2, mask1, shellHandle, null);
@@ -1059,10 +1071,16 @@ int kEventWindowActivated (int nextHandler, int theEvent, int userData) {
 	OS.GetWindowActivationScope (shellHandle, outScope); 
 	if (outScope [0] == OS.kWindowActivationScopeNone) return result;
 	if (!active) {
+		Shell[] shells = display.getShells ();
+		for (int i = 0; i < shells.length; i++) {
+			Shell shell = shells [i];
+			if (shell.active && !shell.isDisposed ()) shell.kEventWindowDeactivated ();
+		}
 		active = true;
 		deferDispose = true;
 		Display display = this.display;
 		display.activeShell = this;
+		isActivating = true;
 		display.setMenuBar (menuBar);
 		if (menuBar != null) OS.DrawMenuBar ();
 		sendEvent (SWT.Activate);
@@ -1070,6 +1088,7 @@ int kEventWindowActivated (int nextHandler, int theEvent, int userData) {
 		if (!restoreFocus () && !traverseGroup (true)) setFocus ();
 		if (isDisposed ()) return result;
 		display.activeShell = null;
+		isActivating = false;
 		Shell parentShell = this;
 		while (parentShell.parent != null) {
 			parentShell = (Shell) parentShell.parent;
@@ -1144,15 +1163,27 @@ int kEventWindowCollapsing (int nextHandler, int theEvent, int userData) {
 int kEventWindowDeactivated (int nextHandler, int theEvent, int userData) {
 	int result = super.kEventWindowDeactivated (nextHandler, theEvent, userData);
 	if (result == OS.noErr) return result;
-	if (active) {
+	kEventWindowDeactivated ();
+	return result;
+}
+
+void kEventWindowDeactivated () {
+	/*
+	 * Bug in Mac OS X. When calling SelectWindow on a window with kWindowModalityWindowModal during
+	 * kEventWindowGetClickModality, multiple activation events are sent to the window even though the
+	 * window is already active. This will cause flicker as windows activate and deactivate. 
+	 * a deactivate is sent during activation. Fix is to watch for a deactivation event  
+	 * are sent to the window. 
+	 */
+	if (active && !isActivating) {
 		active = false;
 		deferDispose = true;
 		Display display = this.display;
 		display.activeShell = this;
 		sendEvent (SWT.Deactivate);
-		if (isDisposed ()) return result;
+		if (isDisposed ()) return;
 		setActiveControl (null);
-		if (isDisposed ()) return result;
+		if (isDisposed ()) return;
 		display.activeShell = null;
 		saveFocus ();
 		if (savedFocus != null) {
@@ -1170,7 +1201,6 @@ int kEventWindowDeactivated (int nextHandler, int theEvent, int userData) {
 		display.setMenuBar (null);
 		deferDispose = false;
 	}
-	return result;
 }
 
 int kEventWindowDrawContent (int nextHandler, int theEvent, int userData) {
@@ -1333,6 +1363,17 @@ int kEventWindowUpdate (int nextHandler, int theEvent, int userData) {
 	return result;
 }
 
+int kEventWindowZoom(int nextHandler, int theEvent, int userData) {
+	/*
+	 * Feature in Carbon: Clicking on zoom-button of the window doesn't activate it.
+	 * Hence, we activate it ourselves.
+	 */
+	int result = OS.CallNextEventHandler (nextHandler, theEvent);
+	OS.SelectWindow (shellHandle);
+	OS.SetUserFocusWindow (shellHandle);
+	return result;
+};
+
 void resizeBounds () {
 	Rect rect = new Rect ();
 	OS.GetWindowBounds (shellHandle, (short)  OS.kWindowContentRgn, rect);
@@ -1341,6 +1382,21 @@ void resizeBounds () {
 	resizeClientArea ();
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	if (toolTips != null) {
+		for (int i=0; i<toolTips.length; i++) {
+			ToolTip toolTip = toolTips [i];
+			if (toolTip != null) toolTip.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Moves the receiver to the top of the drawing order for
  * the display on which it was created (so that all other
@@ -1614,6 +1670,7 @@ public void setEnabled (boolean enabled) {
  */
 public void setFullScreen (boolean fullScreen) {
 	checkWidget ();
+	if (this.fullScreen == fullScreen) return;
 	this.fullScreen = fullScreen; 
 	if (fullScreen) {
 		normalBounds = getBounds ();
@@ -1646,6 +1703,11 @@ public void setFullScreen (boolean fullScreen) {
 		}
 		OS.ChangeWindowAttributes (shellHandle, attributes, OS.kWindowNoTitleBarAttribute);
 		OS.SetSystemUIMode (OS.kUIModeNormal, 0);
+		if ((style & SWT.RESIZE) != 0) {
+			int [] growBox = new int [1];
+			OS.HIViewFindByID (OS.HIViewGetRoot (shellHandle), OS.kHIViewWindowGrowBoxID(), growBox);
+			if (growBox[0] != 0) OS.HIGrowBoxViewSetTransparent(growBox[0], true);
+		}
 		if (maximized) {
 			setMaximized (true);
 		} else {
@@ -1873,6 +1935,33 @@ public void setVisible (boolean visible) {
 	setWindowVisible (visible);
 }
 
+void setWindowModal (Dialog dialog, boolean modal, boolean destroy) {
+	if (dialog == null) return;
+	if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL)) == 0) return;
+	if (isDisposed()) return;
+	/*
+	* Bug in Carbon.  For some reason, when a modal shell is opened while a file dialog is showing, neither
+	* window can be dismissed.  The fix is to temporarily change the modality of the file dialog and put the
+	* modal shell in the same group of the file dialog. 
+	*/
+	int dialogHandle = 0;
+	if (dialog instanceof FileDialog) dialogHandle = ((FileDialog)dialog).dialog;
+	if (dialog instanceof DirectoryDialog) dialogHandle = ((DirectoryDialog)dialog).dialog;
+	if (dialogHandle == 0) return;
+	if (modal) {
+		OS.SetWindowModality (OS.NavDialogGetWindow (dialogHandle), OS.kWindowModalityNone, 0);
+		int windowClass = (style & SWT.TITLE) != 0 ? OS.kMovableModalWindowClass : OS.kModalWindowClass;
+		OS.SetWindowGroup (shellHandle, OS.GetWindowGroupOfClass (windowClass));
+		OS.SelectWindow (shellHandle);
+	} else {
+		if (!destroy) {
+			int parentGroup = getParentGroup ();
+			OS.SetWindowGroup (shellHandle, parentGroup);
+		}
+		OS.SetWindowModality (OS.NavDialogGetWindow (dialogHandle), OS.kWindowModalityAppModal, 0);
+	}
+}
+
 void setWindowVisible (boolean visible) {
 	if (OS.IsWindowVisible (shellHandle) == visible) return;
 	if (visible) {
@@ -1892,6 +1981,7 @@ void setWindowVisible (boolean visible) {
 			OS.SetWindowModality (shellHandle, inModalKind, inUnavailableWindow);
 			if (inUnavailableWindow != 0) OS.CollapseWindow (inUnavailableWindow, false);
 		}
+		setWindowModal(display.getModalDialog(), true, false);
 		int topHandle = topHandle ();
 		OS.SetControlVisibility (topHandle, true, false);
 		int [] scope = new int [1];
@@ -1944,6 +2034,7 @@ void setWindowVisible (boolean visible) {
 			}
 		}
 	} else {
+		setWindowModal(display.getModalDialog(), false, false);
 		/*
 		* Bug in the Macintosh.  Under certain circumstances, yet to
 		* be determined, calling HideWindow() and then DisposeWindow()
@@ -2023,15 +2114,17 @@ void updateSystemUIMode () {
 		current = (Shell) current.parent;
 	}
 	if (!isActive) return;
+	int mode = display.systemUIMode, options = display.systemUIOptions;
 	if (fullScreen) {
-		int mode = OS.kUIModeAllHidden;
+		mode = OS.kUIModeAllHidden;
 		if (menuBar != null) {
 			mode = OS.kUIModeContentHidden;
 		}
-		OS.SetSystemUIMode (mode, 0);
-	} else {
-		OS.SetSystemUIMode (OS.kUIModeNormal, 0);
+		options = 0;
 	}
+	int[] uiMode = new int[1], uiOptions = new int[1];
+	OS.GetSystemUIMode(uiMode, uiOptions);
+	if (uiMode[0] != mode || uiOptions[0] != options) OS.SetSystemUIMode (mode, options);
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java
index d696c0d..008dfe8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Slider.java	
@@ -181,7 +181,7 @@ int actionProc (int theControl, int partCode) {
 			return result;
 	}
 	OS.SetControl32BitValue (handle, value);
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	return result;
 }
 
@@ -297,8 +297,7 @@ public int getSelection () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -319,7 +318,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 	status = OS.CallNextEventHandler (nextHandler, theEvent);
 	if (dragging) {
 		Event event = new Event ();
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, true);
 	}
 	dragging = false;
 	return status;
@@ -459,10 +458,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java
index 3fe8bf2..025be82 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Spinner.java	
@@ -12,6 +12,7 @@ package org.eclipse.swt.widgets;
 
 
 import org.eclipse.swt.internal.carbon.CFRange;
+import org.eclipse.swt.internal.carbon.ControlEditTextSelectionRec;
 import org.eclipse.swt.internal.carbon.OS;
 import org.eclipse.swt.internal.carbon.Rect;
 
@@ -698,7 +699,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 	switch (keyCode [0]) {
 		case 76: /* KP Enter */
 		case 36: /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			return OS.noErr;
 		case 116: /* Page Up */ delta = pageIncrement; break;
 		case 121: /* Page Down */ delta = -pageIncrement; break;
@@ -948,6 +949,47 @@ void setBackground (float [] color) {
 	setBackground (textHandle, color);
 }
 
+int setBounds (int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
+	Rectangle bounds = null;
+	if (resize) bounds = getBounds ();
+	int result = super.setBounds(x, y, width, height, move, resize, events);
+	if (bounds != null && (result & RESIZED) != 0) {
+		/*
+		* Feature in the Macintosh.  When the caret is moved,
+		* the text widget scrolls to show the new location.
+		* This means that the text widget may be scrolled
+		* to the right in order to show the caret when the
+		* widget is not large enough to show both the caret
+		* location and all the text.  Unfortunately, when
+		* the text widget is resized such that all the text
+		* and the caret could be visible, Macintosh does not
+		* scroll the widget back.  The fix is to reset the
+		* selection or the text depend on if the widget
+		* is on focus or not.
+		*/
+		int [] outMetric = new int [1];
+		OS.GetThemeMetric (OS.kThemeMetricLittleArrowsWidth, outMetric);
+		int buttonWidth = outMetric [0] + GAP;
+		Rect inset = inset ();
+		int minWidth = inset.left + inset.right + buttonWidth;
+		if (bounds.width <= minWidth && width > minWidth) {
+			if (hasFocus ()) {
+				ControlEditTextSelectionRec selection = new ControlEditTextSelectionRec ();
+				if (OS.GetControlData (textHandle, (short) OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection, null) == OS.noErr) {
+					OS.SetControlData (textHandle, OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection);
+				}
+			} else {
+				int [] ptr = new int [1];
+				if (OS.GetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextCFStringTag, 4, ptr, null) == OS.noErr) {
+					OS.SetControlData (textHandle, OS.kControlEntireControl, OS.kControlEditTextCFStringTag, 4, ptr);
+				}
+				if (ptr [0] != 0) OS.CFRelease (ptr [0]);
+			}
+		}
+	}
+	return result;
+}
+
 /**
  * Sets the number of decimal places used by the receiver.
  * <p>
@@ -1007,11 +1049,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1021,7 +1063,7 @@ public void setIncrement (int value) {
 public void setMaximum (int value) {
 	checkWidget ();
 	int min = OS.GetControl32BitMinimum (buttonHandle);
-	if (value <= min) return;
+	if (value < min) return;
 	int pos = OS.GetControl32BitValue (buttonHandle);
 	OS.SetControl32BitMaximum (buttonHandle, value);
 	if (pos > value) setSelection (value, true, true, false);	
@@ -1029,11 +1071,11 @@ public void setMaximum (int value) {
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1043,7 +1085,7 @@ public void setMaximum (int value) {
 public void setMinimum (int value) {
 	checkWidget ();
 	int max = OS.GetControl32BitMaximum (buttonHandle);
-	if (value >= max) return;
+	if (value > max) return;
 	int pos = OS.GetControl32BitValue (buttonHandle);
 	OS.SetControl32BitMinimum (buttonHandle, value);
 	if (pos < value) setSelection (value, true, true, false);
@@ -1135,7 +1177,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
 		OS.SetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextSelectionTag, 4, selection);
 		sendEvent (SWT.Modify);
 	}
-	if (notify) postEvent (SWT.Selection);
+	if (notify) sendSelectionEvent (SWT.Selection);
 }
 
 char [] setText (String string, int start, int end, boolean notify) {
@@ -1237,7 +1279,7 @@ public void setTextLimit (int limit) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
index a09914c..cacbc5a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java	
@@ -230,7 +230,7 @@ void createItem (TabItem item, int index) {
 		lastSelected = 0;
 		Event event = new Event ();
 		event.item = items [0];
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, true);
 		// the widget could be destroyed at this point
 	}
 }
@@ -503,7 +503,7 @@ int kEventControlHit (int nextHandler, int theEvent, int userData) {
 	}
 	Event event = new Event ();
 	event.item = item;
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, false);
 	return OS.noErr;
 }
 
@@ -563,6 +563,17 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		int count = OS.GetControl32BitMaximum (handle);
+		for (int i=0; i<count; i++) {
+			TabItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
 	int result = super.setBounds(x, y, width, height, move, resize, events);
 	if ((result & RESIZED) != 0) {
@@ -680,7 +691,7 @@ void setSelection (int index, boolean notify, boolean force) {
 			if (notify) {
 				Event event = new Event ();
 				event.item = item;
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java
index 9420b27..d4b5832 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java	
@@ -2089,7 +2089,7 @@ int itemDataProc (int browser, int id, int property, int itemData, int setValue)
 				Event event = new Event ();
 				event.item = item;
 				event.detail = SWT.CHECK;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 				/*
 				* Bug in the Macintosh. When the height of the row is smaller than the
 				* check box, the tail of the check mark draws outside of the item part
@@ -2139,7 +2139,7 @@ int itemNotificationProc (int browser, int id, int message) {
 				for (int i = 0; i < columnCount; i++) {
 					TableColumn column = columns [i];
 					if (property [0] == column.id) {
-						column.postEvent (display.clickCount == 2 ? SWT.DefaultSelection : SWT.Selection);
+						column.sendSelectionEvent (display.clickCount == 2 ? SWT.DefaultSelection : SWT.Selection);
 						break;
 					}
 				}
@@ -2153,6 +2153,25 @@ int itemNotificationProc (int browser, int id, int message) {
 		}
 		return OS.noErr;
 	}
+	
+	/*
+	 * The items in the databrowser lose their selection when we
+	 * drag them (when we call OS.TrackDrag() in DragSource.drag()).
+	 * We get kDataBrowserItemDeselected notification message
+	 * for each of the items. The workaround is to select the
+	 * deselected items in this case. DRAG_STARTED is set/unset
+	 * before/after the call to OS.TrackDrag().
+	 * 
+	 * This doesn't happen for Table with SWT.SINGLE style because
+	 * we have set the OS.kDataBrowserNeverEmptySelectionSet flag.
+	 */
+	if (message == OS.kDataBrowserItemDeselected && (style & SWT.MULTI) != 0 && getData(DRAG_STARTED) != null) {
+		ignoreSelect = true;
+		OS.SetDataBrowserSelectedItems (handle, 1, new int[] {id}, OS.kDataBrowserItemsAdd);
+		ignoreSelect = false;
+		return OS.noErr;
+	}
+	
 	int index = getIndex (id);
 	if (!(0 <= index && index < items.length)) return OS.noErr;
 	switch (message) {
@@ -2189,6 +2208,8 @@ int itemNotificationProc (int browser, int id, int message) {
 						selected = true;
 					} else {
 						selected = first [0] == last [0];
+						index = getIndex (last [0]);
+						if (0 <= index && index < items.length) item = _getItem (index);
 					}
 				}
 			} else {
@@ -2199,7 +2220,7 @@ int itemNotificationProc (int browser, int id, int message) {
 				anchorLast = last [0];
 				Event event = new Event ();
 				event.item = item;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 			break;
 		}	
@@ -2208,7 +2229,7 @@ int itemNotificationProc (int browser, int id, int message) {
 			if (display.clickCount == 2) {
 				Event event = new Event ();
 				event.item = _getItem (index);
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 			}
 			break;
 		}
@@ -2309,7 +2330,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 			if (0 <= index && index < itemCount) {
 				Event event = new Event ();
 				event.item = _getItem (index);
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 		}
 	}
@@ -2354,7 +2375,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 		}
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 		/*
@@ -2635,6 +2656,22 @@ void resetVisibleRegion (int control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemCount; i++) {
+			TableItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columnCount; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
@@ -3153,7 +3190,7 @@ void setSelection (int index, boolean notify) {
 		if (notify) {
 			Event event = new Event ();
 			event.item = _getItem (index);
-			postEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, false);
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java
index 8077adf..e567770 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java	
@@ -225,10 +225,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -768,7 +768,7 @@ void setChecked (boolean checked, boolean notify) {
 		Event event = new Event ();
 		event.item = this;
 		event.detail = SWT.CHECK;
-		parent.postEvent (SWT.Selection, event);
+		parent.sendSelectionEvent (SWT.Selection, event, false);
 	}
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java
index 4c204f0..1fef22f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Text.java	
@@ -42,7 +42,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
@@ -591,16 +591,20 @@ void createHandle () {
 			OS.kTXNIOPrivilegesTag,
 			OS.kTXNMarginsTag,
 			OS.kTXNJustificationTag,
+			OS.kTXNLineDirectionTag,
 		};
 		int just = OS.kTXNFlushLeft;
 		if ((style & SWT.CENTER) != 0) just = OS.kTXNCenter;
 		if ((style & SWT.RIGHT) != 0) just = OS.kTXNFlushRight;
+		int direction = OS.kTXNLeftToRight;
+		if ((style & SWT.RIGHT_TO_LEFT) != 0) direction = OS.kTXNRightToLeft;
 		int [] datas = new int [] {
 			1,
 			1,
 			(style & SWT.READ_ONLY) != 0 ? 1 : 0,
 			ptr,
 			just,
+			direction,
 		};
 		OS.TXNSetTXNObjectControls (txnObject, false, tags.length, tags, datas);
 		OS.DisposePtr (ptr);
@@ -666,6 +670,7 @@ void createWidget () {
 public void cut () {
 	checkWidget();
 	if ((style & SWT.READ_ONLY) != 0) return;
+	if ((style & SWT.PASSWORD) != 0 || echoCharacter != '\0') return;
 	boolean cut = true;
 	char [] oldText = null;
 	Point oldSelection = getSelection ();
@@ -1550,7 +1555,7 @@ int kEventSearchFieldCancelClicked (int nextHandler, int theEvent, int userData)
 	setText ("");
 	Event event = new Event ();
 	event.detail = SWT.ICON_CANCEL;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 	return result;
 }
 
@@ -1559,7 +1564,7 @@ int kEventSearchFieldSearchClicked (int nextHandler, int theEvent, int userData)
 	if (result == OS.noErr) return result;
 	Event event = new Event ();
 	event.detail = SWT.ICON_SEARCH;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 	return result;
 }
 
@@ -1596,7 +1601,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 			*/
 			case 76: /* KP Enter */
 			case 36: { /* Return */
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 				return OS.noErr;
 			}
 			case 48: { /* Tab */
@@ -1893,7 +1898,7 @@ void setBackground (int control, float [] color) {
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
 	Rectangle bounds = null;
 	if (txnObject == 0 && resize) bounds = getBounds ();
-	int result = super.setBounds(x, y, width, height, move, resize, events);
+	int result = super.setBounds (x, y, width, height, move, resize, events);
 	if (bounds != null && (result & RESIZED) != 0) {
 		/*
 		* Feature in the Macintosh.  When the caret is moved,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolBar.java
index acf56b0..d498ab9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolBar.java	
@@ -11,11 +11,10 @@
 package org.eclipse.swt.widgets;
 
  
-import org.eclipse.swt.internal.carbon.CFRange;
-import org.eclipse.swt.internal.carbon.OS;
- 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.internal.carbon.*;
 
 /**
  * Instances of this class support the layout of selectable
@@ -125,7 +124,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	Point extent = new Point (result [1], result [2]);
 	if (wHint != SWT.DEFAULT) extent.x = wHint;
 	if (hHint != SWT.DEFAULT) extent.y = hHint;
-	return extent;
+	Rectangle trim = computeTrim (0, 0, extent.x, extent.y);
+	return new Point (trim.width, trim.height);
 }
 
 void createHandle () {
@@ -170,8 +170,12 @@ void destroyItem (ToolItem item) {
 	relayout ();
 }
 
-void drawBackground (int control, int context) {
-	fillBackground (control, context, null);
+void drawBackground(int control, int context) {
+	if (hasBorder()) {
+		drawFocus(control, context, hasFocus() /* && drawFocusRing () */, true, true, inset());
+	} else {
+		fillBackground(control, context, null);
+	}
 }
 
 void enableWidget (boolean enabled) {
@@ -311,6 +315,20 @@ public int indexOf (ToolItem item) {
 	return -1;
 }
 
+Rect inset() {
+	if (hasBorder()) {
+		Rect rect = new Rect();
+		int[] outMetric = new int[1];
+		OS.GetThemeMetric(OS.kThemeMetricEditTextFrameOutset, outMetric);
+		rect.left += outMetric[0];
+		rect.top += outMetric[0];
+		rect.right += outMetric[0];
+		rect.bottom += outMetric[0];
+		return rect;
+	}
+	return EMPTY_RECT;
+}
+
 void invalidateChildrenVisibleRegion (int control) {
 	super.invalidateChildrenVisibleRegion (control);
 	for (int i=0; i<itemCount; i++) {
@@ -469,6 +487,16 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setBackground (float [] color) {
 	super.setBackground (color);
 	if (items == null) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
index 8388ac9..c2bd67b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java	
@@ -187,6 +187,12 @@ int actionProc (int theControl, int partCode) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
@@ -878,7 +884,7 @@ int kEventControlHit (int nextHandler, int theEvent, int userData) {
 		}
 	}
 	if ((style & SWT.CHECK) != 0) setSelection (!getSelection ());
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return OS.eventNotHandledErr;
 }
 
@@ -939,7 +945,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 			event.detail = SWT.ARROW;
 			event.x = (int) rect.x;
 			event.y = (int) (rect.y + rect.height);
-			postEvent (SWT.Selection, event);				
+			sendSelectionEvent (SWT.Selection, event, false);				
 		}
 	}	
 	return result;
@@ -1210,7 +1216,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java
index 56911de..e066bcf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolTip.java	
@@ -373,7 +373,7 @@ public boolean isVisible () {
 }
 
 void onMouseDown (Event event) {
-	notifyListeners (SWT.Selection, new Event ());
+	sendSelectionEvent (SWT.Selection, null, true);
 	setVisible (false);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tracker.java
index 91d93f3..2ab6afa 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tracker.java	
@@ -138,6 +138,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
@@ -794,6 +795,10 @@ public boolean open () {
 	if (!isDisposed()) {
 		drawRectangles (window, rectangles, true);
 	}
+
+	if (resizeCursor != null) resizeCursor.dispose();
+	resizeCursor = null;
+	
 	OS.DisposeWindow (window);
 	tracking = false;
 	window = 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java
index 4366007..7baa1f2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TrayItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -180,6 +180,23 @@ Point getLocation () {
 	return new Point ((int)rect.x, (int)rect.y);
 }
 
+Point getMenuLocation () {
+	NSRect rect = new NSRect();
+	Cocoa.objc_msgSend_stret(rect, view, Cocoa.S_frame);
+	NSRect windowRect = new NSRect();
+	Cocoa.objc_msgSend_stret(windowRect, Cocoa.objc_msgSend(view, Cocoa.S_window), Cocoa.S_frame);
+	rect.y += rect.height;
+	Cocoa.objc_msgSend_stret(rect, view, Cocoa.S_convertRect_toView, rect, 0);
+	rect.x += windowRect.x;
+	/*
+	* TODO - the carbon popup menu is not square on the top corners because
+	* NSStatusItem.popUpStatusItemMenu() is not called since it takes
+	* a NSMenu (not MenuRef). The 4 pixels offset is used to make the menu
+	* align with the bottom of the menu bar.
+	*/
+	return new Point ((int)rect.x, (int)rect.y + 4);
+}
+
 /**
  * Returns the receiver's parent, which must be a <code>Tray</code>.
  *
@@ -436,44 +453,88 @@ public void setVisible (boolean visible) {
 	if (!visible) sendEvent (SWT.Hide);
 }
 
+void displayMenu () {
+	if (highlight) {
+		Cocoa.objc_msgSend(view, Cocoa.S_display);
+		display.trayItemMenu = null;
+		showMenu();
+		if (display.trayItemMenu != null) {
+			display.trayItemMenu = null;
+			highlight = false;
+			Cocoa.objc_msgSend (view, Cocoa.S_setNeedsDisplay, 1);
+		}
+	}
+}
+
+boolean shouldShowMenu (int event) {
+	if (!hooks(SWT.MenuDetect)) return false;
+	switch ((int)/*64*/Cocoa.objc_msgSend(event, Cocoa.S_type)) {
+		case Cocoa.NSRightMouseDown: return true;
+		case Cocoa.NSLeftMouseDown:
+			if (!(hooks(SWT.Selection) || hooks(SWT.DefaultSelection))) {
+				return true;
+			}
+			if ((Cocoa.objc_msgSend(event, Cocoa.S_modifierFlags) & Cocoa.NSDeviceIndependentModifierFlagsMask) == Cocoa.NSControlKeyMask) {
+				return true;
+			}
+			return false;
+		case Cocoa.NSLeftMouseDragged:
+		case Cocoa.NSRightMouseDragged:
+			return true;
+	}
+	return false;
+}
+
 void showMenu () {
 	_setToolTipText (null);
+	Display display = this.display;
+	display.currentTrayItem = this;
 	sendEvent (SWT.MenuDetect);
-	if (isDisposed ()) return;
-	display.runPopups ();
+	if (!isDisposed ()) display.runPopups();
+	display.currentTrayItem = null;
 	if (isDisposed ()) return;
 	_setToolTipText (toolTipText);
 }
 
 int trayItemProc (int target, int userData, int selector, int arg0) {
 	switch (selector) {
-		case 0: {
-			int mask = Cocoa.objc_msgSend (arg0, Cocoa.S_modifierFlags) & Cocoa.NSDeviceIndependentModifierFlagsMask;
-			if (mask == Cocoa.NSControlKeyMask) {
-				showMenu ();
-			} else {
-				highlight = true;
-				Cocoa.objc_msgSend (view, Cocoa.S_setNeedsDisplay, 1);
-				int clickCount = Cocoa.objc_msgSend (arg0, Cocoa.S_clickCount);
-				postEvent (clickCount == 2 ? SWT.DefaultSelection : SWT.Selection);
-			}
+		case 0:   //mouseDown
+		case 2: { // rightMouseDown
+			highlight = true;
+			Cocoa.objc_msgSend (view, Cocoa.S_setNeedsDisplay, 1);
+			if (shouldShowMenu(arg0)) displayMenu();
 			break;
 		}
-		case 1: {
+		case 1:   // mouseUp
+		case 4: { // rightMouseUp
+			if (highlight) {
+				if ((int)/*64*/Cocoa.objc_msgSend(arg0, Cocoa.S_type) == Cocoa.NSLeftMouseUp) {
+					sendSelectionEvent((int)/*64*/Cocoa.objc_msgSend(arg0, Cocoa.S_clickCount) == 2 ? SWT.DefaultSelection : SWT.Selection);
+				}
+			}
 			highlight = false;
 			Cocoa.objc_msgSend (view, Cocoa.S_setNeedsDisplay, 1);
 			break;
 		}
-		case 2: {
-			showMenu ();
-			break;
-		}
-		case 3: {
+		case 3: { // drawRect
 			NSRect rect = new NSRect ();
 			Cocoa.memcpy (rect, arg0, NSRect.sizeof);
 			Cocoa.objc_msgSend (handle, Cocoa.S_drawStatusBarBackgroundInRect_withHighlight, rect, highlight ? 1 : 0);
+			break;
+		}
+		case 5:   // mouseDragged
+		case 6: { // rightMouseDragged
+			NSRect frame = new NSRect();
+			Cocoa.objc_msgSend_stret(frame, view, Cocoa.S_frame);
+			NSPoint pt = new NSPoint();
+			Cocoa.objc_msgSend_stret(pt, arg0, Cocoa.S_locationInWindow);
+			highlight = Cocoa.NSPointInRect(pt, frame);
+			Cocoa.objc_msgSend (view, Cocoa.S_setNeedsDisplay, 1);
+			if (shouldShowMenu(arg0)) displayMenu();
+			break;			
 		}
 	}
 	return 0;
 }
 }
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java
index 2bcfab9..b499f4e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java	
@@ -2232,7 +2232,7 @@ int itemDataProc (int browser, int id, int property, int itemData, int setValue)
 				Event event = new Event ();
 				event.item = item;
 				event.detail = SWT.CHECK;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 				/*
 				* Bug in the Macintosh. When the height of the row is smaller than the
 				* check box, the tail of the check mark draws outside of the item part
@@ -2298,7 +2298,7 @@ int itemNotificationProc (int browser, int id, int message) {
 				for (int i = 0; i < columnCount; i++) {
 					TreeColumn column = columns [i];
 					if (property [0] == column.id) {
-						column.postEvent (display.clickCount == 2 ? SWT.DefaultSelection : SWT.Selection);
+						column.sendSelectionEvent (display.clickCount == 2 ? SWT.DefaultSelection : SWT.Selection);
 						break;
 					}
 				}
@@ -2312,6 +2312,25 @@ int itemNotificationProc (int browser, int id, int message) {
 		}
 		return OS.noErr;
 	}
+	
+	/*
+	 * The items in the databrowser lose their selection when we
+	 * drag them (when we call OS.TrackDrag() in DragSource.drag()).
+	 * We get kDataBrowserItemDeselected notification message
+	 * for each of the items. The workaround is to select the
+	 * deselected items in this case. DRAG_STARTED is set/unset
+	 * before/after the call to OS.TrackDrag().
+	 * 
+	 * This doesn't happen for Tree with SWT.SINGLE style because
+	 * we have set the OS.kDataBrowserNeverEmptySelectionSet flag.
+	 */
+	if (message == OS.kDataBrowserItemDeselected && (style & SWT.MULTI) != 0 && getData(DRAG_STARTED) != null) {
+		ignoreSelect = true;
+		OS.SetDataBrowserSelectedItems (handle, 1, new int[] {id}, OS.kDataBrowserItemsAdd);
+		ignoreSelect = false;
+		return OS.noErr;
+	}
+
 	switch (message) {
 		case OS.kDataBrowserItemSelected:
 			savedAnchor = 0;
@@ -2329,6 +2348,7 @@ int itemNotificationProc (int browser, int id, int message) {
 		case OS.kDataBrowserItemDeselected: {
 			wasSelected = true;
 			if (ignoreSelect) break;
+			int selectedId = id;
 			int [] first = new int [1], last = new int [1];
 			OS.GetDataBrowserSelectionAnchor (handle, first, last);
 			boolean selected = false;
@@ -2345,6 +2365,7 @@ int itemNotificationProc (int browser, int id, int message) {
 						selected = true;
 					} else {
 						selected = first [0] == last [0];
+						if (last [0] != 0) selectedId = last [0];
 					}
 				}
 			} else {
@@ -2354,8 +2375,8 @@ int itemNotificationProc (int browser, int id, int message) {
 				anchorFirst = first [0];
 				anchorLast = last [0];
 				Event event = new Event ();
-				event.item = _getItem (id, true);
-				postEvent (SWT.Selection, event);
+				event.item = _getItem (selectedId, true);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 			break;
 		}	
@@ -2364,7 +2385,7 @@ int itemNotificationProc (int browser, int id, int message) {
 			if (display.clickCount == 2) {
 				Event event = new Event ();
 				event.item = _getItem (id, true);
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 			}
 			break;
 		}
@@ -2418,7 +2439,7 @@ int itemNotificationProc (int browser, int id, int message) {
 					if (!ignoreSelect) {
 						Event event = new Event ();
 						event.item = _getItem (id, true);
-						sendEvent (SWT.Selection, event);
+						sendSelectionEvent (SWT.Selection, event, true);
 					}
 				}
 			}
@@ -2599,7 +2620,7 @@ int kEventUnicodeKeyPressed (int nextHandler, int theEvent, int userData) {
 		}
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 		/*
@@ -2657,7 +2678,7 @@ int kEventMouseDown (int nextHandler, int theEvent, int userData) {
 			if (0 < lastHittest && lastHittest <= items.length) {
 				Event event = new Event ();
 				event.item = _getItem (lastHittest, true);
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 		}
 	}
@@ -2840,6 +2861,22 @@ void resetVisibleRegion (int control) {
 	}	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TreeItem item = items [i];
+			if (item != null) item.reskinChildren (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Display a mark indicating the point at which an item will be inserted.
  * The drop insert item has a visual hint to show where a dragged item 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java
index 2027e55..9a2292b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java	
@@ -375,10 +375,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1076,7 +1076,7 @@ void setChecked (boolean checked, boolean notify) {
 		Event event = new Event ();
 		event.item = this;
 		event.detail = SWT.CHECK;
-		parent.postEvent (SWT.Selection, event);
+		parent.sendSelectionEvent (SWT.Selection, event, false);
 	}
 }
 
@@ -1186,8 +1186,6 @@ public void setFont (int index, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
index f570e5f..f44ac49 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java	
@@ -89,7 +89,12 @@ public abstract class Widget {
 	/* Safari fixes */
 	static final int SAFARI_EVENTS_FIX = 1<<19;
 	static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
+	
+	static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
 
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<20;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -135,6 +140,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 
 int actionProc (int theControl, int partCode) {
@@ -399,19 +405,28 @@ void copyToClipboard (char [] chars) {
 	int cfstring = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, chars, chars.length);
 	if (cfstring == 0) return;
 	byte[] buffer = null;
+
+	// Put a Unicode string and a string in the current encoding on the clipboard.
 	try {
 		CFRange range = new CFRange();
 		range.length = chars.length;
 		int[] size = new int[1];
-		int numChars = OS.CFStringGetBytes(cfstring, range, OS.kCFStringEncodingUnicode, (byte)'?', true, null, 0, size);
+		int numChars = OS.CFStringGetBytes(cfstring, range, OS.kCFStringEncodingUnicode, (byte)'?', false, null, 0, size);
+		if (numChars == 0) return;
+		buffer = new byte[size[0]];
+		numChars = OS.CFStringGetBytes(cfstring, range, OS.kCFStringEncodingUnicode, (byte)'?', false, buffer, size [0], size);
+		if (numChars == 0) return;
+		OS.PutScrapFlavor (scrap [0], OS.kScrapFlavorTypeUnicode, 0, buffer.length, buffer);
+
+		numChars = OS.CFStringGetBytes(cfstring, range, OS.CFStringGetSystemEncoding(), (byte)'?', false, null, 0, size);
 		if (numChars == 0) return;
 		buffer = new byte[size[0]];
-		numChars = OS.CFStringGetBytes(cfstring, range, OS.kCFStringEncodingUnicode, (byte)'?', true, buffer, size [0], size);
+		numChars = OS.CFStringGetBytes(cfstring, range, OS.CFStringGetSystemEncoding(), (byte)'?', false, buffer, size [0], size);
 		if (numChars == 0) return;
+		OS.PutScrapFlavor (scrap [0], OS.kScrapFlavorTypeText, 0, buffer.length, buffer);
 	} finally {
 		OS.CFRelease(cfstring);
 	}
-	OS.PutScrapFlavor (scrap [0], OS.kScrapFlavorTypeUTF16External, 0, buffer.length, buffer);
 }
 
 int createCIcon (Image image) {
@@ -659,6 +674,7 @@ int drawItemProc (int browser, int item, int property, int itemState, int theRec
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -717,12 +733,12 @@ String getClipboardText () {
 	int [] scrap = new int [1];
 	OS.GetCurrentScrap (scrap);
 	int [] size = new int [1];
-	if (OS.GetScrapFlavorSize (scrap [0], OS.kScrapFlavorTypeUTF16External, size) == OS.noErr) {
+	if (OS.GetScrapFlavorSize (scrap [0], OS.kScrapFlavorTypeUnicode, size) == OS.noErr) {
 		if (size [0] != 0) {
 			byte [] buffer = new byte [size [0]];
-			if (OS.GetScrapFlavorData (scrap [0], OS.kScrapFlavorTypeUTF16External, size, buffer) == OS.noErr) {
+			if (OS.GetScrapFlavorData (scrap [0], OS.kScrapFlavorTypeUnicode, size, buffer) == OS.noErr) {
 				int encoding = OS.kCFStringEncodingUnicode;
-				int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
+				int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
 				if (cfstring != 0) {
 					int length = OS.CFStringGetLength(cfstring);
 					if (length != 0) {
@@ -741,7 +757,7 @@ String getClipboardText () {
 			byte [] buffer = new byte [size [0]];
 			if (OS.GetScrapFlavorData (scrap [0], OS.kScrapFlavorTypeText, size, buffer) == OS.noErr) {
 				int encoding = OS.CFStringGetSystemEncoding();
-				int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, true);
+				int cfstring = OS.CFStringCreateWithBytes(OS.kCFAllocatorDefault, buffer, buffer.length, encoding, false);
 				if (cfstring != 0) {
 					int length = OS.CFStringGetLength(cfstring);
 					if (length != 0) {
@@ -833,6 +849,7 @@ public Object getData () {
 public Object getData (String key) {
 	checkWidget();
 	if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (key.equals(IS_ACTIVE)) return new Boolean(isActive());
 	if ((state & KEYED_DATA) != 0) {
 		Object [] table = (Object []) data;
 		for (int i=1; i<table.length; i+=2) {
@@ -964,13 +981,17 @@ void invalWindowRgn (int window, int rgn) {
 	OS.InvalWindowRgn (window, rgn);
 }
 
+boolean isActive () {
+	return true;
+}
+
 /**
  * Returns <code>true</code> if the widget has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -1328,6 +1349,10 @@ int kEventWindowUpdate (int nextHandler, int theEvent, int userData) {
 	return OS.eventNotHandledErr;
 }
 
+int kEventWindowZoom (int nextHandler, int theEvent, int userData) {
+	return OS.eventNotHandledErr;
+}
+
 int keyboardProc (int nextHandler, int theEvent, int userData) {
 	int eventKind = OS.GetEventKind (theEvent);
 	switch (eventKind) {
@@ -1551,6 +1576,8 @@ public void removeListener (int eventType, Listener handler) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener handler) {
 	checkWidget();
@@ -1560,6 +1587,50 @@ protected void removeListener (int eventType, SWTEventListener handler) {
 }
 
 /**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
+/**
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
@@ -1669,6 +1740,21 @@ boolean sendKeyEvent (int type, Event event) {
 	return event.doit;
 }
 
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+	int chord = OS.GetCurrentEventButtonState ();
+	int modifiers = OS.GetCurrentEventKeyModifiers ();
+	setInputState (event, eventType, chord, modifiers);
+	sendEvent (eventType, event, send);
+}
+
 int setBounds (int control, int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
 	boolean sameOrigin = true, sameExtent = true;
 	CGRect oldBounds = new CGRect ();
@@ -1835,6 +1921,7 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 boolean setInputState (Event event, int type, int chord, int modifiers) {
@@ -2030,6 +2117,7 @@ boolean setKeyState (Event event, int type, int theEvent) {
 	if (event.keyCode == 0 && event.character == 0) {
 		if (!isNull) return false;
 	}
+	setLocationMask (event, keyCode [0]);
 	int [] chord = new int [1];
 	OS.GetEventParameter (theEvent, OS.kEventParamMouseChord, OS.typeUInt32, null, 4, null, chord);
 	int [] modifiers = new int [1];
@@ -2037,6 +2125,30 @@ boolean setKeyState (Event event, int type, int theEvent) {
 	return setInputState (event, type, chord [0], modifiers [0]);
 }
 
+void setLocationMask (Event event, int keyCode) {
+	switch (keyCode) {
+		case 67:  /* KEYPAD_MULTIPLY */
+		case 69:  /* KEYPAD_ADD */
+		case 76:  /* KEYPAD_CR */
+		case 78:  /* KEYPAD_SUBTRACT */
+		case 65:  /* KEYPAD_DECIMAL */
+		case 75:  /* KEYPAD_DIVIDE */
+		case 82:  /* KEYPAD_0 */
+		case 83:  /* KEYPAD_1 */
+		case 84:  /* KEYPAD_2 */
+		case 85:  /* KEYPAD_3 */
+		case 86:  /* KEYPAD_4 */
+		case 87:  /* KEYPAD_5 */
+		case 88:  /* KEYPAD_6 */
+		case 89:  /* KEYPAD_7 */
+		case 91:  /* KEYPAD_8 */
+		case 92:  /* KEYPAD_9 */
+		case 81:  /* KEYPAD_EQUAL */
+			event.keyLocation = SWT.KEYPAD;
+			break;
+	}
+}
+
 void setVisible (int control, boolean visible) {
 	OS.HIViewSetVisible (control, visible);
 	invalidateVisibleRegion (control);
@@ -2105,6 +2217,7 @@ int windowProc (int nextHandler, int theEvent, int userData) {
 		case OS.kEventWindowShown:				return kEventWindowShown (nextHandler, theEvent, userData);
 		case OS.kEventWindowUpdate:				return kEventWindowUpdate (nextHandler, theEvent, userData);
 		case OS.kEventWindowGetClickModality:	return kEventWindowGetClickModality (nextHandler, theEvent, userData);
+		case OS.kEventWindowZoom:				return kEventWindowZoom (nextHandler, theEvent, userData);
 	}
 	return OS.eventNotHandledErr;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java
index dc18235..175dd48 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Color.java	
@@ -40,6 +40,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float /*double*/ [] handle;
 
@@ -216,7 +218,7 @@ public RGB getRGB () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the color
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Color cocoa_new(Device device, float /*double*/ [] rgbColor) {
 	Color color = new Color(device);
@@ -244,7 +246,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java
index 64e4531..7f4ba39 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Cursor.java	
@@ -72,6 +72,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSCursor handle;
 
@@ -88,6 +90,10 @@ Cursor(Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -424,7 +430,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
@@ -456,7 +462,7 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the cursor
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Cursor cocoa_new(Device device, NSCursor handle) {
 	Cursor cursor = new Cursor(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
index 932e1d4..161c4ca 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
 package org.eclipse.swt.graphics;
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.internal.Compatibility;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.cocoa.*;
 
 /**
@@ -41,7 +41,7 @@ public abstract class Device implements Drawable {
 
 	/* System Font */
 	Font systemFont;
-	
+
 	NSMutableParagraphStyle paragraphStyle;
 	
 	/* Device DPI */
@@ -241,7 +241,13 @@ protected void destroy () {
  */
 public Rectangle getBounds () {
 	checkDevice ();
-	NSRect frame = getPrimaryScreen().frame();
+	NSScreen screen = getPrimaryScreen();
+	NSRect frame = screen.frame();
+	float /*double*/ scaleFactor = screen.userSpaceScaleFactor();
+	frame.x /= scaleFactor;
+	frame.y /= scaleFactor;
+	frame.width /= scaleFactor;
+	frame.height /= scaleFactor;
 	return new Rectangle((int)frame.x, (int)frame.y, (int)frame.width, (int)frame.height);
 }
 
@@ -360,30 +366,35 @@ public FontData[] getFontList (String faceName, boolean scalable) {
 	if (!scalable) return new FontData[0];
 	int count = 0;
 	NSArray families = NSFontManager.sharedFontManager().availableFontFamilies();
-	int /*long*/ familyCount = families.count();
 	FontData[] fds = new FontData[100];
-	for (int i = 0; i < familyCount; i++) {
-		NSString nsFamily = new NSString(families.objectAtIndex(i));
-		String name = nsFamily.getString();
-		NSArray fonts = NSFontManager.sharedFontManager().availableMembersOfFontFamily(nsFamily);
-		int fontCount = (int)/*64*/fonts.count();
-		for (int j = 0; j < fontCount; j++) {
-			NSArray fontDetails = new NSArray(fonts.objectAtIndex(j));
-			String nsName = new NSString(fontDetails.objectAtIndex(0)).getString();
-			int /*long*/ weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
-			int /*long*/ traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
-			int style = SWT.NORMAL;
-			if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
-			if (weight == 9) style |= SWT.BOLD;
-			if (faceName == null || Compatibility.equalsIgnoreCase(faceName, name)) {
-				FontData data = new FontData(name, 0, style);
-				data.nsName = nsName;
-				if (count == fds.length) {
-					FontData[] newFds = new FontData[fds.length + 100];
-					System.arraycopy(fds, 0, newFds, 0, fds.length);
-					fds = newFds;
+	if (families != null) {
+		int /*long*/ familyCount = families.count();
+		for (int i = 0; i < familyCount; i++) {
+			NSString nsFamily = new NSString(families.objectAtIndex(i));
+			String name = nsFamily.getString();
+			NSArray fonts = NSFontManager.sharedFontManager().availableMembersOfFontFamily(nsFamily);
+
+			if (fonts != null) {
+				int fontCount = (int)/*64*/fonts.count();
+				for (int j = 0; j < fontCount; j++) {
+					NSArray fontDetails = new NSArray(fonts.objectAtIndex(j));
+					String nsName = new NSString(fontDetails.objectAtIndex(0)).getString();
+					int /*long*/ weight = new NSNumber(fontDetails.objectAtIndex(2)).integerValue();
+					int /*long*/ traits = new NSNumber(fontDetails.objectAtIndex(3)).integerValue();
+					int style = SWT.NORMAL;
+					if ((traits & OS.NSItalicFontMask) != 0) style |= SWT.ITALIC;
+					if (weight == 9) style |= SWT.BOLD;
+					if (faceName == null || Compatibility.equalsIgnoreCase(faceName, name)) {
+						FontData data = new FontData(name, 0, style);
+						data.nsName = nsName;
+						if (count == fds.length) {
+							FontData[] newFds = new FontData[fds.length + 100];
+							System.arraycopy(fds, 0, newFds, 0, fds.length);
+							fds = newFds;
+						}
+						fds[count++] = data;
+					}
 				}
-				fds[count++] = data;
 			}
 		}
 	}
@@ -541,6 +552,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int /*long*/ internal_new_GC (GCData data);
 
@@ -556,6 +569,8 @@ public abstract int /*long*/ internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int /*long*/ handle, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java
index b30ab41..b1be7e9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java	
@@ -41,6 +41,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSFont handle;
 	
@@ -53,6 +55,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int extraTraits;
 	
@@ -267,7 +271,7 @@ public FontData[] getFontData() {
  * @param style the style for the font
  * @param size the size for the font
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Font cocoa_new(Device device, NSFont handle) {
 	Font font = new Font(device);
@@ -348,7 +352,7 @@ void init(String name, float height, int style, String nsName) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java
index 589f151..c25f636 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String name;
 
@@ -60,6 +62,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float height;
 
@@ -72,6 +76,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int style;
 
@@ -84,6 +90,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String nsName;
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
index 5cec924..71699fd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java	
@@ -64,6 +64,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSGraphicsContext handle;
 	
@@ -198,7 +200,7 @@ static int checkStyle (int style) {
  *
  * @return a new <code>GC</code>
  *
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC cocoa_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
@@ -250,6 +252,8 @@ NSAutoreleasePool checkGC (int mask) {
 				NSRect rect = view.convertRect_toView_(view.bounds(), null);
 				if (data.paintRect == null) {
 					transform.translateXBy(rect.x, rect.y + rect.height);
+					float /*double*/ userSpaceScaleFactor = view.window().userSpaceScaleFactor();
+					transform.scaleXBy(userSpaceScaleFactor, userSpaceScaleFactor);
 				} else {
 					transform.translateXBy(0, rect.height);
 				}
@@ -736,7 +740,81 @@ static int /*long*/ createCGPathRef(NSBezierPath nsPath) {
 	return 0;
 }
 
+void createLayout () {
+	NSSize size = new NSSize();
+	size.width = Float.MAX_VALUE;
+	size.height = Float.MAX_VALUE;
+	NSTextStorage textStorage = (NSTextStorage)new NSTextStorage().alloc().init();
+	NSLayoutManager layoutManager = (NSLayoutManager)new NSLayoutManager().alloc().init();
+	layoutManager.setBackgroundLayoutEnabled(NSThread.isMainThread());
+	NSTextContainer textContainer = (NSTextContainer)new NSTextContainer().alloc();
+	textContainer = textContainer.initWithContainerSize(size);
+	textContainer.setLineFragmentPadding(0);
+	textStorage.addLayoutManager(layoutManager);
+	layoutManager.addTextContainer(textContainer);
+	layoutManager.release();
+	textContainer.release();
+	data.textContainer = textContainer;
+	data.layoutManager = layoutManager;
+	data.textStorage = textStorage;
+}
 
+NSAttributedString createString(String string, int flags, boolean draw) {
+	NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(5);
+	Font font = data.font;
+	dict.setObject(font.handle, OS.NSFontAttributeName);
+	font.addTraits(dict);
+	if (draw) {
+		Pattern pattern = data.foregroundPattern;
+		if (pattern != null) {
+			if (pattern.color != null) dict.setObject(pattern.color, OS.NSForegroundColorAttributeName);
+		} else {
+			NSColor fg = data.fg;
+			if (fg == null) {
+				float /*double*/ [] color = data.foreground;
+				fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
+				fg.retain();
+			}
+			dict.setObject(fg, OS.NSForegroundColorAttributeName);
+		}
+	}
+	if ((flags & SWT.DRAW_TAB) == 0) {
+		dict.setObject(device.paragraphStyle, OS.NSParagraphStyleAttributeName);
+	}
+	int length = string.length();
+	char[] chars = new char[length];
+	string.getChars(0, length, chars, 0);
+	if ((flags & SWT.DRAW_MNEMONIC) !=0 || (flags & SWT.DRAW_DELIMITER) == 0) {
+		int i=0, j=0;
+		while (i < chars.length) {
+			char c = chars [j++] = chars [i++];
+			switch (c) {
+				case '&': {
+					if ((flags & SWT.DRAW_MNEMONIC) != 0) {
+						if (i == chars.length) {continue;}
+						if (chars [i] == '&') {i++; continue;}
+						j--;
+					}
+					break;
+				}
+				case '\r':
+				case '\n': {
+					if ((flags & SWT.DRAW_DELIMITER) == 0) {
+						if (c == '\r' && i != chars.length && chars[i] == '\n') i++;
+						j--;
+					}
+					break;
+				}
+			}
+		}
+		length = j;
+	}
+	NSString str = ((NSString)new NSString().alloc()).initWithCharacters(chars, length);
+	NSAttributedString attribStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, dict);
+	dict.release();
+	str.release();
+	return attribStr;
+}
 
 NSBezierPath createNSBezierPath (int /*long*/  cgPath) {
 	Callback callback = new Callback(this, "applierFunc", 2);
@@ -809,73 +887,6 @@ NSBezierPath createNSBezierPath (int /*long*/  cgPath) {
 	return bezierPath;	
 }
 
-NSAttributedString createString(String string, int flags, boolean draw) {
-	NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(5);
-	Font font = data.font;
-	dict.setObject(font.handle, OS.NSFontAttributeName);
-	font.addTraits(dict);
-	if (draw) {
-		Pattern pattern = data.foregroundPattern;
-		if (pattern != null) {
-			if (pattern.color != null) dict.setObject(pattern.color, OS.NSForegroundColorAttributeName);
-		} else {
-			NSColor fg = data.fg;
-			if (fg == null) {
-				float /*double*/ [] color = data.foreground;
-				fg = data.fg = NSColor.colorWithDeviceRed(color[0], color[1], color[2], data.alpha / 255f);
-				fg.retain();
-			}
-			dict.setObject(fg, OS.NSForegroundColorAttributeName);
-		}
-	}
-	if ((flags & SWT.DRAW_TAB) == 0) {
-		dict.setObject(device.paragraphStyle, OS.NSParagraphStyleAttributeName);
-	}
-	int length = string.length();
-	char[] chars = new char[length];
-	string.getChars(0, length, chars, 0);
-	int breakCount = 0;
-	int[] breaks = null;
-	if ((flags & SWT.DRAW_MNEMONIC) !=0 || (flags & SWT.DRAW_DELIMITER) == 0) {
-		int i=0, j=0;
-		while (i < chars.length) {
-			char c = chars [j++] = chars [i++];
-			switch (c) {
-				case '&': {
-					if ((flags & SWT.DRAW_MNEMONIC) != 0) {
-						if (i == chars.length) {continue;}
-						if (chars [i] == '&') {i++; continue;}
-						j--;
-					}
-					break;
-				}
-				case '\r':
-				case '\n': {
-					if ((flags & SWT.DRAW_DELIMITER) == 0) {
-						if (c == '\r' && i != chars.length && chars[i] == '\n') i++;
-						j--;
-						if (breaks == null) {
-							breaks = new int[4];
-						} else if (breakCount == breaks.length) {
-							int[] newBreaks = new int[breaks.length + 4];
-							System.arraycopy(breaks, 0, newBreaks, 0, breaks.length);
-							breaks = newBreaks;
-						}
-						breaks[breakCount++] = j;
-					}
-					break;
-				}
-			}
-		}
-		length = j;
-	}
-	NSString str = ((NSString)new NSString().alloc()).initWithCharacters(chars, length);
-	NSAttributedString attribStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, dict);
-	dict.release();
-	str.release();
-	return attribStr;
-}
-
 void destroy() {
 	/* Free resources */
 	Image image = data.image;
@@ -883,6 +894,10 @@ void destroy() {
 		image.memGC = null;
 		image.createAlpha();
 	}
+	if (data.textStorage != null) data.textStorage.release();
+	data.textStorage = null;
+	data.layoutManager = null;
+	data.textContainer = null;
 	if (data.fg != null) data.fg.release();
 	if (data.bg != null) data.bg.release();
 	if (data.path != null) data.path.release();
@@ -1132,6 +1147,10 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
  */
 public void drawLine(int x1, int y1, int x2, int y2) {
 	if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+	if (x1 == x2 && y1 == y2 && data.lineWidth <= 1) {
+		drawPoint(x1, y1);
+		return;
+	}
 	NSAutoreleasePool pool = checkGC(DRAW);
 	try {
 		NSBezierPath path = data.path;
@@ -1631,9 +1650,10 @@ public void drawText(String string, int x, int y, boolean isTransparent) {
 public void drawText (String string, int x, int y, int flags) {
 	if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
 	if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT);
+	NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL);
 	try {
-		handle.saveGraphicsState();
+		int length = string.length();
+		if (length == 0) return;
 		boolean mode = true;
 		switch (data.textAntialias) {
 			case SWT.DEFAULT:
@@ -1643,15 +1663,20 @@ public void drawText (String string, int x, int y, int flags) {
 			case SWT.OFF: mode = false; break;
 			case SWT.ON: mode = true; break;
 		}
+		handle.saveGraphicsState();
 		handle.setShouldAntialias(mode);
-		NSAttributedString str = createString(string, flags, true);
+		if (data.textStorage == null) createLayout();
+		NSAttributedString attribStr = createString(string, flags, true);
+		data.textStorage.setAttributedString(attribStr);
+		attribStr.release();
+		NSPoint pt = new NSPoint();
+		pt.x = x;
+		pt.y = y;
 		if ((flags & SWT.DRAW_TRANSPARENT) == 0) {
-			NSSize size = str.size();
-			NSRect rect = new NSRect();
+			data.layoutManager.glyphRangeForTextContainer(data.textContainer);
+			NSRect rect = data.layoutManager.usedRectForTextContainer(data.textContainer);
 			rect.x = x;
 			rect.y = y;
-			rect.width = size.width;
-			rect.height = size.height;
 			NSColor bg = data.bg;
 			if (bg == null) {
 				float /*double*/ [] color = data.background;
@@ -1660,14 +1685,10 @@ public void drawText (String string, int x, int y, int flags) {
 			}
 			bg.setFill();
 			NSBezierPath.fillRect(rect);
-			str.drawInRect(rect);
-		} else {
-			NSPoint pt = new NSPoint();
-			pt.x = x;
-			pt.y = y;
-			str.drawAtPoint(pt);
 		}
-		str.release();
+		NSRange range = new NSRange();
+		range.length = data.layoutManager.numberOfGlyphs();
+		data.layoutManager.drawGlyphsForGlyphRange(range, pt);
 		handle.restoreGraphicsState();
 	} finally {
 		uncheckGC(pool);
@@ -2358,6 +2379,8 @@ public Rectangle getClipping() {
 			}
 			if (data.clipPath != null) {
 				NSRect clip = data.clipPath.bounds();
+				clip.x = (int)clip.x;
+				clip.y = (int)clip.y;
 				OS.NSIntersectionRect(rect, rect, clip);
 			}
 			if (data.inverseTransform != null && rect.width > 0 && rect.height > 0) {
@@ -2512,12 +2535,18 @@ public FontMetrics getFontMetrics() {
 	if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
 	NSAutoreleasePool pool = checkGC(FONT);
 	try {
-		NSFont font = data.font.handle;
-		int ascent = (int)(0.5f + font.ascender());
-		int descent = (int)(0.5f + (-font.descender() + font.leading()));	
-		String s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 
-		int averageCharWidth = stringExtent(s).x / s.length();
-		return FontMetrics.cocoa_new(ascent, descent, averageCharWidth, 0, ascent + descent);
+		if (data.textStorage == null) createLayout();
+		String s = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";  //$NON-NLS-1$
+		NSAttributedString attribStr = createString(s, 0, false);
+		data.textStorage.setAttributedString(attribStr);
+		attribStr.release();
+		NSLayoutManager layoutManager = data.layoutManager;
+		layoutManager.glyphRangeForTextContainer(data.textContainer);
+		NSRect rect = layoutManager.usedRectForTextContainer(data.textContainer);
+		int width = (int)Math.ceil(rect.width);
+		int ascent = (int)layoutManager.defaultBaselineOffsetForFont(data.font.handle);
+		int height = (int)layoutManager.defaultLineHeightForFont(data.font.handle);
+		return FontMetrics.cocoa_new(ascent, height - ascent, width / s.length(), 0, height);
 	} finally {
 		uncheckGC(pool);
 	}
@@ -2574,11 +2603,14 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {	
 	if (handle == null) SWT.error(SWT.ERROR_WIDGET_DISPOSED);
+	NSAutoreleasePool pool = checkGC(TRANSFORM | CLIPPING);
+	uncheckGC(pool);
 	return data;	
 }
 
@@ -2931,7 +2963,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -3471,9 +3503,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3483,9 +3515,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3890,10 +3922,14 @@ public Point textExtent(String string, int flags) {
 	if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	NSAutoreleasePool pool = checkGC(FONT);
 	try {
-		NSAttributedString str = createString(string, flags, false);
-		NSSize size = str.size();
-		str.release();
-		return new Point((int)size.width, (int)size.height);
+		int length = string.length();
+		if (data.textStorage == null) createLayout();
+		NSAttributedString attribStr = createString(length == 0 ? " " : string, flags, true); //$NON-NLS-1$
+		data.textStorage.setAttributedString(attribStr);
+		attribStr.release();
+		data.layoutManager.glyphRangeForTextContainer(data.textContainer);
+		NSRect rect = data.layoutManager.usedRectForTextContainer(data.textContainer);
+		return new Point(length == 0 ? 0 : (int)Math.ceil(rect.width), (int)Math.ceil(rect.height));
 	} finally {
 		uncheckGC(pool);
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java
index 9e44658..feed568 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GCData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,7 +47,10 @@ public final class GCData {
 	public int textAntialias = SWT.DEFAULT;
 	public int fillRule = SWT.FILL_EVEN_ODD;
 	public Image image;
-	
+
+	public NSTextStorage textStorage;
+	public NSLayoutManager layoutManager;
+	public NSTextContainer textContainer;
 	public NSColor fg, bg;
 	public float /*double*/ drawXOffset, drawYOffset;
 	public NSRect paintRect;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
index ae32b73..3a38788 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java	
@@ -76,6 +76,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -88,6 +90,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSImage handle;
 	
@@ -773,7 +777,7 @@ public ImageData getImageData() {
  * @param handle the OS handle for the image
  * @param data the OS data for the image
  *
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Image cocoa_new(Device device, int type, NSImage nsImage) {
 	Image image = new Image(device);
@@ -1054,9 +1058,22 @@ void initNative(String filename) {
 				int green = (int) (color.greenComponent() * 255);
 				int blue = (int) (color.blueComponent() * 255);
 				this.transparentPixel = (red << 16) + (green << 8) + blue;
-			} else {
-				this.alphaData = alphaData;
-			}
+				
+				/*
+				* If the image has opaque pixels that have the same color as the transparent
+				* pixel, create an alpha image instead of using transparent pixel. 
+				*/
+				for (int j = 0; j < srcData.length; j+=4) {
+					if (srcData [j] != 0) {
+						int pixel = (srcData[j+1] << 16) + (srcData[j+2] << 8) + srcData[j+3];
+						if (pixel == this.transparentPixel){
+							this.transparentPixel = -1;
+							break;
+						}
+					}
+				}
+			} 
+			if (this.transparentPixel == -1) this.alphaData = alphaData;
 		}
 		
 		// For compatibility, images created from .ico files are treated as SWT.ICON format, even though
@@ -1085,6 +1102,8 @@ void initNative(String filename) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -1140,7 +1159,9 @@ public int /*long*/ internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ context, GCData data) {
 	NSAutoreleasePool pool = null;
@@ -1162,7 +1183,7 @@ public void internal_dispose_GC (int /*long*/ context, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java
index c083aff..1de065c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Path.java	
@@ -45,6 +45,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSBezierPath handle;
 
@@ -706,7 +708,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java
index 1670e9a..4d72b20 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Pattern.java	
@@ -195,7 +195,7 @@ void destroy() {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java
index c8de98b..68351dc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Region.java	
@@ -38,6 +38,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -190,6 +192,7 @@ public void add (int[] pointArray) {
 }
 	
 void add(int[] pointArray, int count) {
+	count = count / 2 * 2;
 	if (count <= 2) return;
 	NSAutoreleasePool pool = null;
 	if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
@@ -628,7 +631,7 @@ public boolean intersects(Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
index 1d8b96f..ecf88c9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java	
@@ -10,8 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.graphics;
 
-import org.eclipse.swt.internal.C;
-import org.eclipse.swt.internal.Compatibility;
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.cocoa.*;
 import org.eclipse.swt.*;
 
@@ -42,26 +41,34 @@ public final class TextLayout extends Resource {
 	Font font;
 	String text;
 	StyleItem[] styles;
-	int spacing, ascent, descent, indent;
+	int stylesCount;
+	int spacing, ascent, descent, indent, wrapIndent;
 	boolean justify;
 	int alignment;
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	int wrapWidth;
 	int orientation;
 	
 	int[] lineOffsets;
 	NSRect[] lineBounds;
 	
+	// the following Callbacks are never freed
+	static Callback textLayoutCallback2;
+	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
+	
+	static final int TAB_COUNT = 32;
 	static final int UNDERLINE_THICK = 1 << 16;
 	static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
 	int[] invalidOffsets;
-	static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F', ZWS = '\u200B';
+	static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F';
 	
 	static class StyleItem {
 		TextStyle style;
 		int start;
-
+		int /*long*/ jniRef;
+		NSCell cell;
 		public String toString () {
 			return "StyleItem {" + start + ", " + style + "}";
 		}
@@ -90,6 +97,7 @@ public TextLayout (Device device) {
 	styles = new StyleItem[2];
 	styles[0] = new StyleItem();
 	styles[1] = new StyleItem();
+	stylesCount = 2;
 	init();
 }
 
@@ -122,32 +130,26 @@ float[] computePolyline(int left, int top, int right, int bottom) {
 
 
 void computeRuns() {
-	if (textStorage != null) return;
+	if (lineBounds != null) return;
 	String segmentsText = getSegmentsText();
-	NSString str = NSString.stringWith(segmentsText);
-	textStorage = (NSTextStorage)new NSTextStorage().alloc().init();
-	layoutManager = (NSLayoutManager)new NSLayoutManager().alloc().init();
-	layoutManager.setBackgroundLayoutEnabled(NSThread.isMainThread());
-	textContainer = (NSTextContainer)new NSTextContainer().alloc();
-	NSSize size = new NSSize();
-	size.width = wrapWidth != -1 ? wrapWidth : Float.MAX_VALUE;
-	size.height = Float.MAX_VALUE;
-	textContainer.initWithContainerSize(size);
-	textStorage.addLayoutManager(layoutManager);
-	layoutManager.addTextContainer(textContainer);
+	char[] chars = new char[segmentsText.length()];
+	segmentsText.getChars(0, chars.length, chars, 0);
+	NSString str = (NSString) new NSString().alloc();
+	str = str.initWithCharacters(chars, chars.length);
 
 	/*
 	* Bug in Cocoa. Adding attributes directly to a NSTextStorage causes
 	* output to the console and eventually a segmentation fault when printing 
 	* on a thread other than the main thread. The fix is to add attributes to
-	* a separate NSMutableAttributedString and add it to text storage when done.
+	* a separate NSMutableAttributedString and set it to text storage when done.
 	*/
 	NSMutableAttributedString attrStr = (NSMutableAttributedString)new NSMutableAttributedString().alloc();
 	attrStr.id = attrStr.initWithString(str).id;
+	str.release();
 	attrStr.beginEditing();
 	Font defaultFont = font != null ? font : device.systemFont;
 	NSRange range = new NSRange();
-	range.length = str.length();
+	range.length = attrStr.length();
 	attrStr.addAttribute(OS.NSFontAttributeName, defaultFont.handle, range);
 	defaultFont.addTraits(attrStr, range);
 	//TODO ascend descent wrap
@@ -164,27 +166,44 @@ void computeRuns() {
 				align = OS.NSRightTextAlignment;
 		}
 	}
+	if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
+		paragraph.setBaseWritingDirection(OS.NSWritingDirectionRightToLeft);
+	} else {
+		paragraph.setBaseWritingDirection(OS.NSWritingDirectionLeftToRight);
+	}
 	paragraph.setAlignment(align);
 	paragraph.setLineSpacing(spacing);
 	paragraph.setFirstLineHeadIndent(indent);
+	paragraph.setHeadIndent(wrapIndent);
 	paragraph.setLineBreakMode(wrapWidth != -1 ? OS.NSLineBreakByWordWrapping : OS.NSLineBreakByClipping);
 	paragraph.setTabStops(NSArray.array());
-	if (tabs != null) {
+	if (tabs != null && tabs.length > 0) {
 		int count = tabs.length;
-		for (int i = 0, pos = 0; i < count; i++) {
-			pos += tabs[i];
-			NSTextTab tab = (NSTextTab)new NSTextTab().alloc();
-			tab = tab.initWithType(OS.NSLeftTabStopType, pos);
-			paragraph.addTabStop(tab);
-			tab.release();
+		if (count == 1) {
+			paragraph.setDefaultTabInterval(tabs[0]);
+		} else {
+			int i, pos = 0;
+			for (i = 0; i < count; i++) {
+				pos = tabs[i];
+				NSTextTab tab = (NSTextTab)new NSTextTab().alloc();
+				tab = tab.initWithType(OS.NSLeftTabStopType, pos);
+				paragraph.addTabStop(tab);
+				tab.release();
+			}
+			int width = tabs[count - 1] - tabs[count - 2];
+			for (; i < TAB_COUNT; i++) {
+				pos += width;
+				NSTextTab tab = (NSTextTab)new NSTextTab().alloc();
+				tab = tab.initWithType(OS.NSLeftTabStopType, pos);
+				paragraph.addTabStop(tab);
+				tab.release();
+			}
 		}
-		int width = count - 2 >= 0 ? tabs[count - 1] - tabs[count - 2] : tabs[count - 1];
-		paragraph.setDefaultTabInterval(width);
 	}
 	attrStr.addAttribute(OS.NSParagraphStyleAttributeName, paragraph, range);
 	paragraph.release();
-	int /*long*/ textLength = str.length();
-	for (int i = 0; i < styles.length - 1; i++) {
+	int /*long*/ textLength = attrStr.length();
+	for (int i = 0; i < stylesCount - 1; i++) {
 		StyleItem run = styles[i];
 		if (run.style == null) continue;
 		TextStyle style = run.style;		
@@ -247,17 +266,51 @@ void computeRuns() {
 			attrStr.addAttribute(OS.NSBaselineOffsetAttributeName, NSNumber.numberWithInt(style.rise), range);
 		}
 		if (style.metrics != null) {
-			//TODO implement metrics 
+			initClasses();
+			char [] buffer = new char [(int)range.length];
+			for (int j = 0; j < buffer.length; j++) {
+				buffer[j] = '\uFFFC';
+			}
+			NSString string = (NSString) new NSString().alloc();
+			string = string.initWithCharacters(buffer, buffer.length);
+			attrStr.replaceCharactersInRange(range, string);
+			string.release();
+			
+			run.jniRef =  OS.NewGlobalRef(run);
+			if (run.jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+			run.cell = (SWTTextAttachmentCell) new SWTTextAttachmentCell().alloc().init();
+			OS.object_setInstanceVariable(run.cell.id, SWT_OBJECT, run.jniRef);
+
+			NSTextAttachment attachment = ((NSTextAttachment)new NSTextAttachment().alloc()).initWithFileWrapper(null);
+			attachment.setAttachmentCell(run.cell);
+			attrStr.addAttribute(OS.NSAttachmentAttributeName, attachment, range);
+			attachment.release();
 		}
 	}
 	attrStr.endEditing();
+
+	NSSize size = new NSSize();
+	size.width = wrapWidth != -1 ? wrapWidth : Float.MAX_VALUE;
+	size.height = Float.MAX_VALUE;
+	if (textStorage == null) {
+		textStorage = (NSTextStorage)new NSTextStorage().alloc().init();
+		layoutManager = (NSLayoutManager)new NSLayoutManager().alloc().init();
+		layoutManager.setBackgroundLayoutEnabled(NSThread.isMainThread());
+		textContainer = (NSTextContainer)new NSTextContainer().alloc();
+		textContainer = textContainer.initWithContainerSize(size);
+		textContainer.setLineFragmentPadding(0);
+		textStorage.addLayoutManager(layoutManager);
+		layoutManager.addTextContainer(textContainer);
+		layoutManager.release();
+		textContainer.release();
+	} else {
+		textContainer.setContainerSize(size);
+	}
 	textStorage.setAttributedString(attrStr);
 	attrStr.release();
-
-	textContainer.setLineFragmentPadding(0);
-	layoutManager.glyphRangeForTextContainer(textContainer);
 	
 	int numberOfLines;
+	layoutManager.glyphRangeForTextContainer(textContainer);
 	int /*long*/ numberOfGlyphs = layoutManager.numberOfGlyphs(), index;
 	int /*long*/ rangePtr = OS.malloc(NSRange.sizeof);
 	NSRange lineRange = new NSRange();
@@ -290,9 +343,15 @@ void computeRuns() {
 
 void destroy() {
 	freeRuns();
+	if (textStorage != null) textStorage.release();
+	textStorage = null;
+	layoutManager = null;
+	textContainer = null;
 	font = null;
 	text = null;
 	styles = null;
+	segments = null;
+	segmentsChars = null;
 }
 
 /**
@@ -393,13 +452,10 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 			NSBezierPath path = NSBezierPath.bezierPath();
 			NSRect rect = new NSRect();
 			if (hasSelection) {
-				int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
 				range.location = translateOffset(selectionStart);
 				range.length = translateOffset(selectionEnd - selectionStart + 1);
-				int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, pRectCount);
 				int /*long*/ [] rectCount = new int /*long*/ [1];
-				OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-				OS.free(pRectCount);
+				int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
 				for (int k = 0; k < rectCount[0]; k++, pArray += NSRect.sizeof) {
 					OS.memmove(rect, pArray, NSRect.sizeof);
 					fixRect(rect);
@@ -425,9 +481,9 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 			range.location = 0;
 			range.length = numberOfGlyphs;
 			float /*double*/ [] fg = gc.data.foreground;
-			boolean defaultFg = fg[0] == 0 && fg[1] == 0 && fg[2] == 0 && fg[3] == 1;
+			boolean defaultFg = fg[0] == 0 && fg[1] == 0 && fg[2] == 0 && fg[3] == 1 && gc.data.alpha == 255;
 			if (!defaultFg) {
-				for (int i = 0; i < styles.length - 1; i++) {
+				for (int i = 0; i < stylesCount - 1; i++) {
 					StyleItem run = styles[i];
 					if (run.style != null && run.style.foreground != null) continue;
 					if (run.style != null && run.style.underline && run.style.underlineStyle == SWT.UNDERLINE_LINK) continue;
@@ -445,16 +501,16 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 				layoutManager.removeTemporaryAttribute(OS.NSForegroundColorAttributeName, range);
 			}
 			NSPoint point = new NSPoint();
-			for (int j = 0; j < styles.length; j++) {
+			for (int j = 0; j < stylesCount; j++) {
 				StyleItem run = styles[j];
 				TextStyle style = run.style;
 				if (style == null) continue;
 				boolean drawUnderline = style.underline && !isUnderlineSupported(style);
-				drawUnderline = drawUnderline && (j + 1 == styles.length || !style.isAdherentUnderline(styles[j + 1].style)); 
+				drawUnderline = drawUnderline && (j + 1 == stylesCount || !style.isAdherentUnderline(styles[j + 1].style)); 
 				boolean drawBorder = style.borderStyle != SWT.NONE;
-				drawBorder = drawBorder && (j + 1 == styles.length || !style.isAdherentBorder(styles[j + 1].style)); 
+				drawBorder = drawBorder && (j + 1 == stylesCount || !style.isAdherentBorder(styles[j + 1].style)); 
 				if (!drawUnderline && !drawBorder) continue;
-				int end = j + 1 < styles.length ? translateOffset(styles[j + 1].start - 1) : length;
+				int end = j + 1 < stylesCount ? translateOffset(styles[j + 1].start - 1) : length;
 				for (int i = 0; i < lineOffsets.length - 1; i++) {
 					int lineStart = untranslateOffset(lineOffsets[i]);
 					int lineEnd = untranslateOffset(lineOffsets[i + 1] - 1);
@@ -468,11 +524,8 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 							range.location = Math.max(lineStart, start);
 							range.length = Math.min(lineEnd, end) + 1 - range.location;
 							if (range.length > 0) {
-								int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
-								int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, pRectCount);
 								int /*long*/ [] rectCount = new int /*long*/ [1];
-								OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-								OS.free(pRectCount);
+								int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
 								NSRect rect = new NSRect();
 								gc.handle.saveGraphicsState();
 								float /*double*/ baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart);
@@ -539,11 +592,8 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 							range.location = Math.max(lineStart, start);
 							range.length = Math.min(lineEnd, end) + 1 - range.location;
 							if (range.length > 0) {
-								int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
-								int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, pRectCount);
 								int /*long*/ [] rectCount = new int /*long*/ [1];
-								OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-								OS.free(pRectCount);
+								int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
 								NSRect rect = new NSRect();
 								gc.handle.saveGraphicsState();
 								float /*double*/ [] color = null;
@@ -603,19 +653,18 @@ void fixRect(NSRect rect) {
 }
 
 void freeRuns() {
-	if (textStorage == null) return;
-	if (textStorage != null) {
-		textStorage.release();
-	}
-	if (layoutManager != null) {
-		layoutManager.release();
-	}
-	if (textContainer != null) {
-		textContainer.release();
+	lineBounds = null;
+	lineOffsets = null;
+	for (int i = 0; i < stylesCount - 1; i++) {
+		StyleItem run = styles[i];
+		if (run.cell != null) {
+			OS.object_setInstanceVariable(run.cell.id, SWT_OBJECT, 0);
+			run.cell.release();
+			run.cell = null;
+			OS.DeleteGlobalRef(run.jniRef);
+			run.jniRef = 0;
+		}
 	}
-	textStorage = null;
-	layoutManager = null;
-	textContainer = null;
 }
 
 /** 
@@ -717,11 +766,8 @@ public Rectangle getBounds(int start, int end) {
 		NSRange range = new NSRange();
 		range.location = start;
 		range.length = end - start + 1;
-		int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
-		int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, pRectCount);
 		int /*long*/ [] rectCount = new int /*long*/ [1];
-		OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-		OS.free(pRectCount);
+		int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, rectCount);
 		NSRect rect = new NSRect();
 		int left = 0x7FFFFFFF, right = 0;
 		int top = 0x7FFFFFFF, bottom = 0;
@@ -832,13 +878,8 @@ public int getLevel(int offset) {
 		NSRange range  = new NSRange();
 		range.location = glyphOffset;
 		range.length = 1;
-		int /*long*/ pBidiLevels = OS.malloc(1);
 		byte[] bidiLevels = new byte[1];
-		int /*long*/ result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, pBidiLevels);
-		if (result > 0) {
-			OS.memmove(bidiLevels, pBidiLevels, 1);
-		}
-		OS.free(pBidiLevels);
+		layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
 		return bidiLevels[0];
 	} finally {
 		if (pool != null) pool.release();
@@ -980,9 +1021,8 @@ public FontMetrics getLineMetrics (int lineIndex) {
 		int length = text.length();
 		if (length == 0) {
 			Font font = this.font != null ? this.font : device.systemFont;
-			NSFont nsFont = font.handle;
-			int ascent = (int)(0.5f + nsFont.ascender());
-			int descent = (int)(0.5f + (-nsFont.descender() + nsFont.leading()));	
+			int ascent = (int)layoutManager.defaultBaselineOffsetForFont(font.handle);
+			int descent = (int)layoutManager.defaultLineHeightForFont(font.handle) - ascent;
 			ascent = Math.max(ascent, this.ascent);
 			descent = Math.max(descent, this.descent);
 			return FontMetrics.cocoa_new(ascent, descent, 0, 0, ascent + descent);
@@ -1024,15 +1064,18 @@ public Point getLocation(int offset, boolean trailing) {
 		int /*long*/ glyphIndex = layoutManager.glyphIndexForCharacterAtIndex(offset);
 		NSRect rect = layoutManager.lineFragmentUsedRectForGlyphAtIndex(glyphIndex, 0);
 		NSPoint point = layoutManager.locationForGlyphAtIndex(glyphIndex);
-		if (trailing) {
-			NSRange range = new NSRange();
-			range.location = offset;
-			range.length = 1;
-			int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
-			int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, textContainer, pRectCount);
+		boolean rtl = false;
+		NSRange range  = new NSRange();
+		range.location = glyphIndex;
+		range.length = 1;
+		byte[] bidiLevels = new byte[1];
+		int /*long*/ result = layoutManager.getGlyphsInRange(range, 0, 0, 0, 0, bidiLevels);
+		if (result > 0) {
+			rtl = (bidiLevels[0] & 1) != 0;
+		}
+		if (trailing != rtl) {
 			int /*long*/ [] rectCount = new int /*long*/ [1];
-			OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-			OS.free(pRectCount);
+			int /*long*/ pArray = layoutManager.rectArrayForGlyphRange(range, range, textContainer, rectCount);
 			if (rectCount[0] > 0) {
 				NSRect bounds = new NSRect();
 				OS.memmove(bounds, pArray, NSRect.sizeof);
@@ -1081,46 +1124,58 @@ int _getOffset (int offset, int movement, boolean forward) {
 	int length = text.length();
 	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);
 	if (length == 0) return 0;
-	offset = translateOffset(offset);
-	length = translateOffset(length);
 	switch (movement) {
 		case SWT.MOVEMENT_CLUSTER://TODO cluster
 		case SWT.MOVEMENT_CHAR: {
-			boolean invalid = false;
-			do {
-				int newOffset = offset;
 				if (forward) {
-					if (newOffset < length) newOffset++;
+					if (offset < length) offset++;
 				} else {
-					if (newOffset > 0) newOffset--;
-				}
-				if (newOffset == offset) break;
-				offset = newOffset;
-				invalid = false;
-				if (invalidOffsets != null) {
-					for (int i = 0; i < invalidOffsets.length; i++) {
-						if (offset == invalidOffsets[i]) {
-							invalid = true;
-							break;
-						}
-					}
+					if (offset > 0) offset--;
 				}
-			} while (invalid);
-			return untranslateOffset(offset);
+				return offset;
 		}
 		case SWT.MOVEMENT_WORD: {
-			return untranslateOffset((int)/*64*/textStorage.nextWordFromIndex(offset, forward));
+			offset = translateOffset(offset);
+			offset = (int)/*64*/textStorage.nextWordFromIndex(offset, forward);
+			return untranslateOffset(offset);
 		}
 		case SWT.MOVEMENT_WORD_END: {
-			NSRange range = textStorage.doubleClickAtIndex(length == offset ? length - 1 : offset);
-			return untranslateOffset((int)/*64*/(range.location + range.length));
+			offset = translateOffset(offset);
+			if (forward) {
+				offset = (int)/*64*/textStorage.nextWordFromIndex(offset, true);
+			} else {
+				length = translateOffset(length);
+				int result = 0;
+				while (result < length) {
+					int wordEnd = (int)/*64*/textStorage.nextWordFromIndex(result, true);
+					if (wordEnd >= offset) {
+						offset = result;
+						break;
+					}
+					result = wordEnd;
+				}
+			}
+			return untranslateOffset(offset);
 		}
 		case SWT.MOVEMENT_WORD_START: {
-			NSRange range = textStorage.doubleClickAtIndex(length == offset ? length - 1 : offset);
-			return untranslateOffset((int)/*64*/range.location);
+			offset = translateOffset(offset);
+			if (forward) {
+				int result = translateOffset(length);
+				while (result > 0) {
+					int wordStart = (int)/*64*/textStorage.nextWordFromIndex(result, false);
+					if (wordStart <= offset) {
+						offset = result;
+						break;
+					}
+					result = wordStart;
+				}
+			} else {
+				offset = (int)/*64*/textStorage.nextWordFromIndex(offset, false);
+			}
+			return untranslateOffset(offset);
 		}
 	}
-	return untranslateOffset(offset);
+	return offset;
 }
 
 /**
@@ -1148,15 +1203,8 @@ int _getOffset (int offset, int movement, boolean forward) {
  */
 public int getOffset(Point point, int[] trailing) {
 	checkLayout();
-	NSAutoreleasePool pool = null;
-	if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
-	try {
-		computeRuns();
-		if (point == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		return getOffset(point.x, point.y, trailing);
-	} finally {
-		if (pool != null) pool.release();
-	}
+	if (point == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+	return getOffset(point.x, point.y, trailing);
 }
 
 /**
@@ -1263,9 +1311,9 @@ public int getPreviousOffset (int index, int movement) {
  */
 public int[] getRanges () {
 	checkLayout();
-	int[] result = new int[styles.length * 2];
+	int[] result = new int[stylesCount * 2];
 	int count = 0;
-	for (int i=0; i<styles.length - 1; i++) {
+	for (int i=0; i<stylesCount - 1; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].start;
 			result[count++] = styles[i + 1].start - 1;
@@ -1293,40 +1341,53 @@ public int[] getSegments() {
 	return segments;
 }
 
+/**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
 String getSegmentsText() {
-	if (segments == null) return text;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return text;
 	int length = text.length();
 	if (length == 0) return text;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return text;
+	if (segments == null) return text;
+	int nSegments = segments.length;
+	if (nSegments == 0) return text;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return text;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return text;
+		}
 	}
-	invalidOffsets = new int[nSegments];
 	char[] oldChars = new char[length];
 	text.getChars(0, length, oldChars, 0);
 	char[] newChars = new char[length + nSegments];
 	int charCount = 0, segmentCount = 0;
-	char separator = getOrientation() == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
+	char defaultSeparator = orientation == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
 	while (charCount < length) {
 		if (segmentCount < nSegments && charCount == segments[segmentCount]) {
-			invalidOffsets[segmentCount] = charCount + segmentCount;
+			char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 			newChars[charCount + segmentCount++] = separator;
 		} else {
 			newChars[charCount + segmentCount] = oldChars[charCount++];
 		}
 	}
-	if (segmentCount < nSegments) {
-		invalidOffsets[segmentCount] = charCount + segmentCount;
+	while (segmentCount < nSegments) {
 		segments[segmentCount] = charCount;
+		char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 		newChars[charCount + segmentCount++] = separator;
 	}
-	if (segmentCount != nSegments) {
-		int[] tmp = new int [segmentCount];
-		System.arraycopy(invalidOffsets, 0, tmp, 0, segmentCount);
-		invalidOffsets = tmp;
-	}
-	return new String(newChars, 0, Math.min(charCount + segmentCount, newChars.length));
+	return new String(newChars, 0, newChars.length);
 }
 
 /**
@@ -1360,7 +1421,7 @@ public TextStyle getStyle (int offset) {
 	checkLayout();
 	int length = text.length();
 	if (!(0 <= offset && offset < length)) SWT.error(SWT.ERROR_INVALID_RANGE);
-	for (int i=1; i<styles.length; i++) {
+	for (int i=1; i<stylesCount; i++) {
 		StyleItem item = styles[i];
 		if (item.start > offset) {
 			return styles[i - 1].style;
@@ -1384,9 +1445,9 @@ public TextStyle getStyle (int offset) {
  */
 public TextStyle[] getStyles () {
 	checkLayout();
-	TextStyle[] result = new TextStyle[styles.length];
+	TextStyle[] result = new TextStyle[stylesCount];
 	int count = 0;
-	for (int i=0; i<styles.length; i++) {
+	for (int i=0; i<stylesCount; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].style;
 		}
@@ -1443,12 +1504,48 @@ public int getWidth () {
 }
 
 /**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();	
+	return wrapIndent;
+}
+
+void initClasses () {
+	String className = "SWTTextAttachmentCell";
+	if (OS.objc_lookUpClass(className) != 0) return;
+	
+	textLayoutCallback2 = new Callback(getClass(), "textLayoutProc", 2);
+	int /*long*/ proc2 = textLayoutCallback2.getAddress();
+	if (proc2 == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
+	int /*long*/ cellBaselineOffsetProc = OS.CALLBACK_cellBaselineOffset(proc2);
+	int /*long*/ cellSizeProc = OS.CALLBACK_NSTextAttachmentCell_cellSize(proc2);
+	
+	byte[] types = {'*','\0'};
+	int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
+	int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSCell, className, 0);
+	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
+	OS.class_addProtocol(cls, OS.protocol_NSTextAttachmentCell);
+	OS.class_addMethod(cls, OS.sel_cellSize, cellSizeProc, "@:");
+	OS.class_addMethod(cls, OS.sel_cellBaselineOffset, cellBaselineOffsetProc, "@:");
+	OS.objc_registerClassPair(cls);
+}
+
+/**
  * Returns <code>true</code> if the text layout has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1601,7 +1698,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1610,6 +1707,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -1627,6 +1726,34 @@ public void setIndent (int indent) {
 }
 
 /**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout ();
+	if (wrapIndent < 0) return;
+	if (this.wrapIndent == wrapIndent) return;
+	NSAutoreleasePool pool = null;
+	if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+	try {
+		freeRuns();
+		this.wrapIndent = wrapIndent;
+	} finally {
+		if (pool != null) pool.release();
+	}
+}
+
+/**
  * Sets the justification of the receiver. Note that the receiver's
  * width must be set in order to use justification. 
  *
@@ -1680,7 +1807,7 @@ public void setOrientation(int orientation) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1689,12 +1816,18 @@ public void setOrientation(int orientation) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1719,6 +1852,45 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	NSAutoreleasePool pool = null;
+	if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
+	try {
+		freeRuns();
+		this.segmentsChars = segmentsChars;
+	} finally {
+		if (pool != null) pool.release();
+	}
+}
+
+/**
  * Sets the line spacing of the receiver.  The line spacing
  * is the space left between lines.
  *
@@ -1769,7 +1941,7 @@ public void setStyle (TextStyle style, int start, int end) {
 		start = Math.min(Math.max(0, start), length - 1);
 		end = Math.min(Math.max(0, end), length - 1);
 		int low = -1;
-		int high = styles.length;
+		int high = stylesCount;
 		while (high - low > 1) {
 			int index = (high + low) / 2;
 			if (styles[index + 1].start > start) {
@@ -1778,7 +1950,7 @@ public void setStyle (TextStyle style, int start, int end) {
 				low = index;
 			}
 		}
-		if (0 <= high && high < styles.length) {
+		if (0 <= high && high < stylesCount) {
 			StyleItem item = styles[high];
 			if (item.start == start && styles[high + 1].start - 1 == end) {
 				if (style == null) {
@@ -1791,7 +1963,7 @@ public void setStyle (TextStyle style, int start, int end) {
 		freeRuns();
 		int modifyStart = high;
 		int modifyEnd = modifyStart;
-		while (modifyEnd < styles.length) {
+		while (modifyEnd < stylesCount) {
 			if (styles[modifyEnd + 1].start > end) break;
 			modifyEnd++;
 		}
@@ -1803,33 +1975,42 @@ public void setStyle (TextStyle style, int start, int end) {
 				return;
 			}
 			if (styleStart != start && styleEnd != end) {
-				StyleItem[] newStyles = new StyleItem[styles.length + 2];
-				System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);
+				int newLength = stylesCount + 2; 
+				if (newLength > styles.length) {
+					int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+					StyleItem[] newStyles = new StyleItem[newSize];
+					System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+					styles = newStyles;
+				}
+				System.arraycopy(styles, modifyEnd + 1, styles, modifyEnd + 3, stylesCount - modifyEnd - 1);
 				StyleItem item = new StyleItem();
 				item.start = start;
 				item.style = style;
-				newStyles[modifyStart + 1] = item;	
+				styles[modifyStart + 1] = item;	
 				item = new StyleItem();
 				item.start = end + 1;
 				item.style = styles[modifyStart].style;
-				newStyles[modifyStart + 2] = item;
-				System.arraycopy(styles, modifyEnd + 1, newStyles, modifyEnd + 3, styles.length - modifyEnd - 1);
-				styles = newStyles;
+				styles[modifyStart + 2] = item;
+				stylesCount = newLength;
 				return;
 			}
 		}
 		if (start == styles[modifyStart].start) modifyStart--;
 		if (end == styles[modifyEnd + 1].start - 1) modifyEnd++;
-		int newLength = styles.length + 1 - (modifyEnd - modifyStart - 1);
-		StyleItem[] newStyles = new StyleItem[newLength];
-		System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);	
+		int newLength = stylesCount + 1 - (modifyEnd - modifyStart - 1);
+		if (newLength > styles.length) {
+			int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+			StyleItem[] newStyles = new StyleItem[newSize];
+			System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+			styles = newStyles;
+		}
+		System.arraycopy(styles, modifyEnd, styles, modifyStart + 2, stylesCount - modifyEnd);
 		StyleItem item = new StyleItem();
 		item.start = start;
 		item.style = style;
-		newStyles[modifyStart + 1] = item;
-		styles[modifyEnd].start = end + 1;
-		System.arraycopy(styles, modifyEnd, newStyles, modifyStart + 2, styles.length - modifyEnd);
-		styles = newStyles;
+		styles[modifyStart + 1] = item;
+		styles[modifyStart + 2].start = end + 1;
+		stylesCount = newLength;
 	} finally {
 		if (pool != null) pool.release();
 	}
@@ -1897,7 +2078,8 @@ public void setText (String text) {
 		styles = new StyleItem[2];
 		styles[0] = new StyleItem();
 		styles[1] = new StyleItem();
-		styles[styles.length - 1].start = text.length();
+		styles[1].start = text.length();
+		stylesCount = 2;
 	} finally {
 		if (pool != null) pool.release();
 	}
@@ -1944,17 +2126,53 @@ public String toString () {
 	return "TextLayout {" + text + "}";
 }
 
+static int /*long*/ textLayoutProc(int /*long*/ id, int /*long*/ sel) {
+	int /*long*/ [] jniRef = new int /*long*/ [1];
+	OS.object_getInstanceVariable(id, SWT_OBJECT, jniRef);
+	if (jniRef[0] == 0) return 0;
+	StyleItem run = (StyleItem) OS.JNIGetObject(jniRef[0]);
+	if (run == null) return 0;
+	TextStyle style = run.style;
+	if (style == null) return 0;
+	GlyphMetrics metrics = style.metrics;
+	if (metrics == null) return 0;
+	if (sel == OS.sel_cellSize) {
+		NSSize size = new NSSize();
+		size.width = metrics.width;
+		size.height = metrics.ascent + metrics.descent;
+		/* NOTE that this is freed in C */
+		int /*long*/ result = OS.malloc(NSSize.sizeof);
+		OS.memmove(result, size, NSSize.sizeof);
+		return result;
+	} else if (sel == OS.sel_cellBaselineOffset) {
+		NSPoint point = new NSPoint();
+		point.y = -metrics.descent;
+		/* NOTE that this is freed in C */
+		int /*long*/ result = OS.malloc(NSPoint.sizeof);
+		OS.memmove(result, point, NSPoint.sizeof);
+		return result;
+	}
+	return 0;
+}
+
 /*
  *  Translate a client offset to an internal offset
  */
 int translateOffset (int offset) {
 	int length = text.length();
 	if (length == 0) return offset;
-	if (invalidOffsets == null) return offset;
-	for (int i = 0; i < invalidOffsets.length; i++) {
-		if (offset < invalidOffsets[i]) break; 
-		offset++;
+	if (segments == null) return offset;
+	int nSegments = segments.length;
+	if (nSegments == 0) return offset;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return offset;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return offset;
+		}
 	}
+	for (int i = 0; i < nSegments && offset - i >= segments[i]; i++) {
+		offset++;
+	}	
 	return offset;
 }
 
@@ -1964,17 +2182,19 @@ int translateOffset (int offset) {
 int untranslateOffset (int offset) {
 	int length = text.length();
 	if (length == 0) return offset;
-	if (invalidOffsets == null) return offset;
-	for (int i = 0; i < invalidOffsets.length; i++) {
-		if (offset == invalidOffsets[i]) {
-			offset++;
-			continue;
-		}
-		if (offset < invalidOffsets[i]) {
-			return offset - i;
+	if (segments == null) return offset;
+	int nSegments = segments.length;
+	if (nSegments == 0) return offset;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return offset;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return offset;
 		}
 	}
-	return offset - invalidOffsets.length;
+	for (int i = 0; i < nSegments && offset > segments[i]; i++) {
+		offset--;
+	}
+	return offset;
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java
index b4eee32..dc6c63e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Transform.java	
@@ -41,6 +41,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSAffineTransform handle;
 	
@@ -241,7 +243,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index 366a01f..d47c681 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java	
@@ -12,7 +12,6 @@ package org.eclipse.swt.widgets;
 
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
@@ -96,36 +95,6 @@ public Button (Composite parent, int style) {
 	super (parent, checkStyle (style));
 }
 
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-	NSString nsAttributeName = new NSString(arg0);
-	
-	if (accessible != null) {
-		id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
-		if (returnObject != null) return returnObject.id;
-	}
-	
-	if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
-		NSString role = null;
-		
-		if ((style & SWT.RADIO) != 0) {
-			role = OS.NSAccessibilityRadioButtonRole;
-		} else if ((style & SWT.ARROW) != 0) {
-			role = OS.NSAccessibilityButtonRole;
-		}
-		
-		if (role != null) {
-			if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute))
-				return role.id;
-			else {
-				return OS.NSAccessibilityRoleDescription(role.id, 0);
-			}
-		}
-	}
-	
-	return super.accessibilityAttributeValue(id, sel, arg0);
-}
-
-
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is selected by the user, by sending
@@ -135,6 +104,12 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
@@ -184,7 +159,7 @@ static int checkStyle (int style) {
 }
 
 void click () {
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 }
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
@@ -229,7 +204,18 @@ void createHandle () {
 //	}
 	int type = OS.NSMomentaryLightButton;
 	if ((style & SWT.PUSH) != 0) {
-		if ((style & SWT.FLAT) != 0) {
+		boolean flat = (style & SWT.FLAT) != 0;
+		if (!flat) {
+			NSView superview = widget.superview();
+			while (superview != null) {
+				if (superview.isKindOfClass(OS.class_NSTableView)) {
+					flat = true;
+					break;
+				}
+				superview = superview.superview();
+			}
+		}
+		if (flat) {
 			widget.setBezelStyle(OS.NSShadowlessSquareBezelStyle);
 //			if ((style & SWT.BORDER) == 0) widget.setShowsBorderOnlyWhileMouseInside(true);
 		} else {
@@ -251,7 +237,7 @@ void createHandle () {
 		widget.setBezelStyle(OS.NSShadowlessSquareBezelStyle);
 	}
 	widget.setButtonType(type);
-	widget.setTitle(NSString.stringWith(""));
+	widget.setTitle(NSString.string());
 	widget.setImagePosition(OS.NSImageLeft);
 	widget.setTarget(widget);
 	widget.setAction(OS.sel_sendSelection);
@@ -279,6 +265,10 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
 	return dragging;
 }
 
+boolean drawsBackground() {
+	return background != null || backgroundImage != null;
+}
+
 void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ image, NSRect rect, int /*long*/ view) {
 	/*
 	* Feature in Cocoa.  Images touch the edge of rounded buttons
@@ -293,6 +283,9 @@ void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ i
 }
 
 void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellRect, int /*long*/ viewid) {
+	if ((style & (SWT.CHECK|SWT.RADIO)) != 0 && backgroundImage != null) {
+		fillBackground (new NSView(viewid), NSGraphicsContext.currentContext(), cellRect, -1);
+	}
 	super.drawInteriorWithFrame_inView(id, sel, cellRect, viewid);
 	if (image != null && ((style & (SWT.CHECK|SWT.RADIO)) !=0)) {
 		NSSize imageSize = image.handle.size();
@@ -572,7 +565,7 @@ void sendSelection () {
 			((NSButton)view).setState(OS.NSOnState);
 		}
 	}
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 }
 
 
@@ -603,11 +596,6 @@ void _setAlignment (int alignment) {
 		if ((style & (SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT)) == 0) return; 
 		style &= ~(SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT);
 		style |= alignment & (SWT.UP | SWT.DOWN | SWT.LEFT | SWT.RIGHT);
-//		int orientation = OS.kThemeDisclosureRight;
-//		if ((style & SWT.UP) != 0) orientation = OS.kThemeDisclosureUp;
-//		if ((style & SWT.DOWN) != 0) orientation = OS.kThemeDisclosureDown;
-//		if ((style & SWT.LEFT) != 0) orientation = OS.kThemeDisclosureLeft;
-//		OS.SetControl32BitValue (handle, orientation);
 		return;
 	}
 	if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) return;
@@ -617,44 +605,21 @@ void _setAlignment (int alignment) {
 	if (text != null) {
 		((NSButton)view).setAttributedTitle(createString());
 	}
-//	/* Alignment not honoured when image and text is visible */
-//	boolean bothVisible = text != null && text.length () > 0 && image != null;
-//	if (bothVisible) {
-//		if ((style & (SWT.RADIO | SWT.CHECK)) != 0) alignment = SWT.LEFT;
-//		if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0) alignment = SWT.CENTER;
-//	}
-//	int textAlignment = 0;
-//	int graphicAlignment = 0;
-//	if ((alignment & SWT.LEFT) != 0) {
-//		textAlignment = OS.kControlBevelButtonAlignTextFlushLeft;
-//		graphicAlignment = OS.kControlBevelButtonAlignLeft;
-//	}
-//	if ((alignment & SWT.CENTER) != 0) {
-//		textAlignment = OS.kControlBevelButtonAlignTextCenter;
-//		graphicAlignment = OS.kControlBevelButtonAlignCenter;
-//	}
-//	if ((alignment & SWT.RIGHT) != 0) {
-//		textAlignment = OS.kControlBevelButtonAlignTextFlushRight;
-//		graphicAlignment = OS.kControlBevelButtonAlignRight;
-//	}
-//	OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlBevelButtonTextAlignTag, 2, new short [] {(short)textAlignment});
-//	OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlBevelButtonGraphicAlignTag, 2, new short [] {(short)graphicAlignment});
-//	if (bothVisible) {
-//		OS.SetControlData (handle, OS.kControlEntireControl, OS.kControlBevelButtonTextPlaceTag, 2, new short [] {(short)OS.kControlBevelButtonPlaceToRightOfGraphic});
-//	}
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		return;	// TODO set to OS default
+void setBackgroundColor(NSColor nsColor) {
+	Control control = findBackgroundControl();
+	if (control == null || control.backgroundImage == null) {
+		NSButtonCell cell = new NSButtonCell(((NSButton)view).cell());
+		cell.setBackgroundColor(nsColor);
+	}
+}
+
+void setBackgroundImage(NSImage image) {
+	if (image != null) {
+		NSButtonCell cell = new NSButtonCell(((NSButton)view).cell());
+		cell.setBackgroundColor(null);
 	}
-	NSButtonCell cell = new NSButtonCell(((NSButton)view).cell());
-	cell.setBackgroundColor(nsColor);
 }
 
 void setFont (NSFont font) {
@@ -743,7 +708,7 @@ boolean setRadioSelection (boolean value){
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
index 3b22431..3312be1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java	
@@ -121,31 +121,7 @@ int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*lo
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	checkWidget ();
-	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
-	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-	Control control = findBackgroundControl ();
-	if (control != null) {
-		NSRect rect = new NSRect();
-		rect.x = x;
-		rect.y = y;
-		rect.width = width;
-		rect.height = height;
-		int imgHeight = -1;
-		GCData data = gc.getGCData();
-		if (data.image != null) imgHeight =  data.image.getBounds().height;
-		NSGraphicsContext context = gc.handle;
-		if (data.flippedContext != null) {
-			NSGraphicsContext.static_saveGraphicsState();
-			NSGraphicsContext.setCurrentContext(context);
-		}
-		control.fillBackground (view, context, rect, imgHeight);
-		if (data.flippedContext != null) {
-			NSGraphicsContext.static_restoreGraphicsState();
-		}
-	} else {
-		gc.fillRectangle (x, y, width, height);
-	}
+	drawBackground(gc, x, y, width, height, 0, 0);
 }
 
 void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
@@ -291,12 +267,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
@@ -330,6 +312,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
 	}
 	Control control = findBackgroundControl ();
 	boolean redraw = control != null && control.backgroundImage != null;
+	if (!redraw) redraw = hasRegion ();
 	if (!redraw) redraw = isObscured ();
 	if (redraw) {
 		redrawWidget (view, x, y, width, height, false);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java
index 6ae406f..cb16511 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ColorDialog.java	
@@ -133,7 +133,10 @@ public RGB open() {
 	rgb = null;
 	selected = false;
 	panel.orderFront(null);
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+	display.setModalDialog(this);
 	NSApplication.sharedApplication().runModalForWindow(panel);
+	display.setModalDialog(null);
 	panel.setDelegate(null);
 	delegate.release();
 	OS.DeleteGlobalRef(jniRef);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index 99465f9..56f5842 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java	
@@ -41,7 +41,7 @@ import org.eclipse.swt.internal.cocoa.*;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
@@ -56,10 +56,14 @@ import org.eclipse.swt.internal.cocoa.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class Combo extends Composite {
+	String text;
 	int textLimit = LIMIT;
 	boolean receivingFocus;
-	boolean ignoreVerify, ignoreSelection;
+	boolean ignoreSetObject, ignoreSelection;
 	NSRange selectionRange;
+	boolean listVisible;
+
+	static final int VISIBLE_COUNT = 5;
 
 	/**
 	 * the operating system limit for the number of characters
@@ -129,13 +133,15 @@ public Combo (Composite parent, int style) {
 public void add (String string) {
 	checkWidget ();
 	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
-	NSString str = NSString.stringWith(string);
+	NSAttributedString str = createString(string);
 	if ((style & SWT.READ_ONLY) != 0) {
 		NSPopUpButton widget = (NSPopUpButton)view;
 		int /*long*/ selection = widget.indexOfSelectedItem();
 		NSMenu nsMenu = widget.menu();
 		NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
-		nsItem.initWithTitle(str, 0, NSString.stringWith(""));
+		NSString empty = NSString.string();
+		nsItem.initWithTitle(empty, 0, empty);
+		nsItem.setAttributedTitle(str);
 		nsMenu.addItem(nsItem);
 		nsItem.release();
 		if (selection == -1) widget.selectItemAtIndex(-1);
@@ -172,13 +178,15 @@ public void add (String string, int index) {
 	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
 	int count = getItemCount ();
 	if (0 > index || index > count) error (SWT.ERROR_INVALID_RANGE);
-	NSString str = NSString.stringWith(string);
+	NSAttributedString str = createString(string);
 	if ((style & SWT.READ_ONLY) != 0) {
 		NSPopUpButton widget = (NSPopUpButton)view;
 		int /*long*/ selection = widget.indexOfSelectedItem();
 		NSMenu nsMenu = widget.menu();
 		NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
-		nsItem.initWithTitle(str, 0, NSString.stringWith(""));
+		NSString empty = NSString.string();
+		nsItem.initWithTitle(empty, 0, empty);
+		nsItem.setAttributedTitle(str);
 		nsMenu.insertItem(nsItem, index);
 		nsItem.release();
 		if (selection == -1) widget.selectItemAtIndex(-1);
@@ -338,12 +346,18 @@ public void clearSelection () {
 	}
 }
 
-void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-	if (!ignoreSelection) { 
-		NSComboBox widget = (NSComboBox)view;
-		widget.selectItemAtIndex(widget.indexOfSelectedItem());
-		sendEvent(SWT.Selection, null, display.trackingControl != this);
-	}
+void setObjectValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	super.setObjectValue(id, sel, ignoreSetObject ? arg0 : createString(text).id);
+}
+
+void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	NSComboBox widget = (NSComboBox)view;
+	int /*long*/ tableSelection = widget.indexOfSelectedItem();
+	widget.selectItemAtIndex(tableSelection);
+	NSAttributedString attStr = new NSAttributedString (widget.itemObjectValueAtIndex(tableSelection));
+	NSString nsString = attStr.string();
+	if (nsString != null) setText(nsString.getString(), true);
+	if (!ignoreSelection) sendSelectionEvent (SWT.Selection, null, display.trackingControl != this);
 }
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
@@ -356,21 +370,21 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	height = (int)Math.ceil (size.height);
 
 	if ((style & SWT.READ_ONLY) == 0) {
-		ignoreVerify = true;
+		ignoreSetObject = true;
 		NSComboBoxCell cell = new NSComboBoxCell (viewCell.id);
 		NSArray array = cell.objectValues ();
 		int length = (int)/*64*/array.count ();
 		if (length > 0) {
 			cell = new NSComboBoxCell (cell.copy ());
 			for (int i = 0; i < length; i++) {
-				id object = array.objectAtIndex (i);
-				cell.setTitle (new NSString (object));
+				NSAttributedString attStr = new NSAttributedString (array.objectAtIndex (i));
+				cell.setAttributedStringValue(attStr);
 				size = cell.cellSize ();
 				width = Math.max (width, (int)Math.ceil (size.width));
 			}
 			cell.release ();
 		}
-		ignoreVerify = false;
+		ignoreSetObject = false;
 	}
 
 	/*
@@ -414,6 +428,7 @@ void createHandle () {
 		widget.menu().setAutoenablesItems(false);
 		widget.setTarget(widget);
 		widget.setAction(OS.sel_sendSelection);
+		widget.menu().setDelegate(widget);
 		view = widget;
 	} else {
 		NSComboBox widget = (NSComboBox)new SWTComboBox().alloc();
@@ -423,6 +438,32 @@ void createHandle () {
 	}
 }
 
+NSAttributedString createString(String string) {
+	NSAttributedString attribStr = createString(string, null, foreground, SWT.LEFT, false, true, false);
+	attribStr.autorelease();
+	return attribStr;
+}
+
+void createWidget() {
+	text = "";
+	super.createWidget();
+	if ((style & SWT.READ_ONLY) == 0) {
+		NSComboBox widget = (NSComboBox)view;
+		NSScreen screen = widget.window().screen();
+		NSRect rect = screen != null ? screen.frame() : NSScreen.mainScreen().frame();
+		int visibleCount = Math.max(VISIBLE_COUNT, (int)(rect.height / 3 / widget.itemHeight()));
+		widget.setNumberOfVisibleItems(visibleCount);
+	}
+}
+
+void comboBoxWillDismiss(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	listVisible = false;
+}
+
+void comboBoxWillPopUp(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	listVisible = true;
+}
+
 /**
  * Cuts the selected text.
  * <p>
@@ -586,11 +627,12 @@ public String getItem (int index) {
 	checkWidget ();
 	int count = getItemCount ();
 	if (0 > index || index >= count) error (SWT.ERROR_INVALID_RANGE);
-	NSString str;
+	NSString str = null;
 	if ((style & SWT.READ_ONLY) != 0) {
 		str = ((NSPopUpButton)view).itemTitleAtIndex(index);
 	} else {
-		str = new NSString(((NSComboBox)view).itemObjectValueAtIndex(index));
+		NSAttributedString attString = new NSAttributedString(((NSComboBox)view).itemObjectValueAtIndex(index));
+		if (attString != null) str = attString.string();
 	}
 	if (str == null) error(SWT.ERROR_CANNOT_GET_ITEM);
 	return str.getString();
@@ -676,8 +718,12 @@ public String [] getItems () {
  * @since 3.4
  */
 public boolean getListVisible () {
-	//TODO
-	return false;
+	checkWidget ();
+	return listVisible;
+}
+
+String getNameText () {
+    return getText ();
 }
 
 int getMininumHeight () {
@@ -911,44 +957,18 @@ public int indexOf (String string, int start) {
 	return -1;
 }
 
-void insertEditText (String string) {
-	ignoreVerify = true;
-	int length = string.length ();
-	Point selection = getSelection ();
-	if (hasFocus ()) {
-		if (textLimit != LIMIT) {
-			int charCount = getCharCount();
-			if (charCount - (selection.y - selection.x) + length > textLimit) {
-				length = textLimit - charCount + (selection.y - selection.x);
-			}
-		}
-		char [] buffer = new char [length];
-		string.getChars (0, buffer.length, buffer, 0);
-		NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
-		NSText fieldEditor = ((NSTextField) view).currentEditor ();
-		fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
-		selectionRange = null;
-	} else {
-		String oldText = getText ();
-		if (textLimit != LIMIT) {
-			int charCount = oldText.length ();
-			if (charCount - (selection.y - selection.x) + length > textLimit) {
-				string = string.substring(0, textLimit - charCount + (selection.y - selection.x));
-			}
-		}
-		String newText = oldText.substring (0, selection.x) + string + oldText.substring (selection.y);
-		NSString nsstring = NSString.stringWith(newText);
-		new NSCell (((NSTextField) view).cell ()).setTitle (nsstring);
-		selectionRange = null;
-		setSelection (new Point(selection.x + string.length (), 0));
-	}
-	ignoreVerify = false;
-}
-
 boolean isEventView (int /*long*/ id) {
 	return true;
 }
 
+void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+	listVisible = true;
+}
+
+void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
+	listVisible = false;
+}
+
 void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	// If this is a combo box with an editor field and the control is disposed
 	// while the view's cell editor is open we crash while tearing down the
@@ -1012,6 +1032,7 @@ void releaseWidget () {
 	if ((style & SWT.READ_ONLY) == 0) {
 		((NSControl)view).abortEditing();
 	}
+	text = null;
 	selectionRange = null;
 }
 
@@ -1207,17 +1228,19 @@ public void select (int index) {
 	if (0 <= index && index < count) {
 		if ((style & SWT.READ_ONLY) != 0) {
 			((NSPopUpButton)view).selectItemAtIndex(index);
+			sendEvent (SWT.Modify);
 		} else {
-			((NSComboBox)view).selectItemAtIndex(index);
+			NSComboBox widget = (NSComboBox)view;
+			widget.deselectItemAtIndex(index);
+			widget.selectItemAtIndex(index);
 		}
 	}
 	ignoreSelection = false;
-	sendEvent (SWT.Modify);
 }
 
 void sendSelection () {
 	sendEvent(SWT.Modify);
-	if (!ignoreSelection) postEvent(SWT.Selection);
+	if (!ignoreSelection) sendSelectionEvent(SWT.Selection);
 }
 
 boolean sendKeyEvent (NSEvent nsEvent, int type) {
@@ -1252,21 +1275,12 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 	switch (keyCode) {
 	case 76: /* KP Enter */
 	case 36: /* Return */
-		postEvent (SWT.DefaultSelection);
+		sendSelectionEvent (SWT.DefaultSelection);
 	}
 	return result;
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		nsColor = NSColor.textBackgroundColor ();
-	}
-
+void setBackgroundColor(NSColor nsColor) {
 	if ((style & SWT.READ_ONLY) != 0) {
 		//TODO
 	} else {
@@ -1274,6 +1288,10 @@ void updateBackground () {
 	}
 }
 
+void setBackgroundImage(NSImage image) {
+	//TODO setDrawsBackground is ignored by NSComboBox?
+}
+
 void setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
 	/*
 	 * Feature in Cocoa.  Attempting to create an NSComboBox with a
@@ -1290,16 +1308,21 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz
 	super.setBounds (x, y, width, height, move, resize);
 }
 
+void setFont (NSFont font) {
+	super.setFont(font);
+	updateItems();
+}
+
 void setForeground (float /*double*/ [] color) {
-	NSColor nsColor;
-	if (color == null) {
-		nsColor = NSColor.textColor ();
-	} else {
-		nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
-	}
-	if ((style & SWT.READ_ONLY) != 0) {
-		//TODO
-	} else {
+	super.setForeground(color);
+	updateItems();
+	if ((style & SWT.READ_ONLY) == 0) {
+		NSColor nsColor;
+		if (color == null) {
+			nsColor = NSColor.textColor ();
+		} else {
+			nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], 1);
+		}
 		((NSTextField)view).setTextColor(nsColor);
 	}
 }
@@ -1325,15 +1348,24 @@ public void setItem (int index, String string) {
 	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
 	int count = getItemCount ();
 	if (0 > index || index >= count) error (SWT.ERROR_INVALID_RANGE);
-	NSString str = NSString.stringWith(string);
+	int selection = getSelectionIndex();
+	NSAttributedString str = createString(string);
 	if ((style & SWT.READ_ONLY) != 0) {
 		NSMenuItem nsItem = ((NSPopUpButton)view).itemAtIndex(index);
-		nsItem.setTitle(str);
+		nsItem.setAttributedTitle(str);
+		/*
+		 * Feature in Cocoa.  Setting the attributed title on an NSMenuItem
+		 * also sets the title, but clearing the attributed title does not
+		 * clear the title.  The fix is to explicitly set the title to an
+		 * empty string in this case.  
+		 */
+		if (string.length() == 0) nsItem.setTitle(NSString.string());
 	} else {
 		NSComboBox widget = (NSComboBox)view;
 		widget.insertItemWithObjectValue(str, index);
 		widget.removeItemAtIndex(index + 1);
 	}
+	if (selection != -1) select (selection);
 }
 
 /**
@@ -1359,11 +1391,13 @@ public void setItems (String [] items) {
 	removeAll();
 	if (items.length == 0) return;
 	for (int i= 0; i < items.length; i++) {
-		NSString str = NSString.stringWith(items[i]);
+		NSAttributedString str = createString(items[i]);
 		if ((style & SWT.READ_ONLY) != 0) {
 			NSMenu nsMenu = ((NSPopUpButton)view).menu();
 			NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
-			nsItem.initWithTitle(str, 0, NSString.stringWith(""));
+			NSString empty = NSString.string();
+			nsItem.initWithTitle(empty, 0, empty);
+			nsItem.setAttributedTitle(str);
 			nsMenu.addItem(nsItem);
 			nsItem.release();
 			//clear the selection
@@ -1418,6 +1452,11 @@ public void setOrientation (int orientation) {
 	checkWidget();
 }
 
+void setOrientation () {
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+	((NSControl)view).setBaseWritingDirection(direction);
+}
+
 /**
  * Sets the selection in the receiver's text field to the
  * range specified by the argument whose x coordinate is the
@@ -1483,7 +1522,6 @@ public void setText (String string) {
 }
 
 void setText (String string, boolean notify) {
-	ignoreVerify = true;
 	if (notify) {
 		if (hooks (SWT.Verify) || filters (SWT.Verify)) {
 			string = verifyText (string, 0, getCharCount (), null);
@@ -1499,12 +1537,11 @@ void setText (String string, boolean notify) {
 	} else {
 		char[] buffer = new char [Math.min(string.length (), textLimit)];
 		string.getChars (0, buffer.length, buffer, 0);
-		NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
-		new NSCell(((NSComboBox)view).cell()).setTitle(nsstring);
+		text = new String (buffer,0, buffer.length);
+		((NSComboBox)view).cell().setAttributedStringValue(createString(text));
 		if (notify) sendEvent (SWT.Modify);
 	}
 	selectionRange = null;
-	ignoreVerify = false;
 }
 
 /**
@@ -1565,17 +1602,38 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
 	OS.memmove(range, affectedCharRange, NSRange.sizeof);
 	boolean result = callSuperBoolean(id, sel, range, replacementString);
 	if (hooks (SWT.Verify)) {
-		String text = new NSString(replacementString).getString();
+		String string = new NSString(replacementString).getString();
 		NSEvent currentEvent = display.application.currentEvent();
 		int /*long*/ type = currentEvent.type();
 		if (type != OS.NSKeyDown && type != OS.NSKeyUp) currentEvent = null;
-		String newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
+		String newText = verifyText(string, (int)/*64*/range.location, (int)/*64*/(range.location+range.length), currentEvent);
 		if (newText == null) return false;
-		if (text != newText) {
-			insertEditText(newText);
+		if (!string.equals(newText)) {
+			int length = newText.length();
+			Point selection = getSelection();
+			if (textLimit != LIMIT) {
+				int charCount = getCharCount();
+				if (charCount - (selection.y - selection.x) + length > textLimit) {
+					length = textLimit - charCount + (selection.y - selection.x);
+				}
+			}
+			char [] buffer = new char [length];
+			newText.getChars (0, buffer.length, buffer, 0);
+			NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
+			NSText fieldEditor = ((NSTextField) view).currentEditor ();
+			fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
+			text = fieldEditor.string().getString();
+			sendEvent (SWT.Modify);
 			result = false;
-		}
-		if (!result) sendEvent (SWT.Modify);
+		} 
+	}
+	if (result) {
+		char[] chars = new char[text.length()];
+		text.getChars(0, chars.length, chars, 0);
+		NSMutableString mutable = (NSMutableString) NSMutableString.stringWithCharacters(chars, chars.length);
+		mutable.replaceCharactersInRange(range, new NSString(replacementString));
+		text = mutable.getString();
+		selectionRange = null;
 	}
 	return result;
 }
@@ -1605,6 +1663,29 @@ NSRange textView_willChangeSelectionFromCharacterRange_toCharacterRange(int /*lo
 	return result;
 }
 
+void updateItems () {
+	if ((style & SWT.READ_ONLY) != 0) {
+		NSPopUpButton widget = (NSPopUpButton)view;
+		int count = (int)/*64*/ widget.numberOfItems();
+		for (int i = 0; i < count; i++) {
+			NSMenuItem item = new NSMenuItem (widget.itemAtIndex(i));
+			NSAttributedString attStr = item.attributedTitle();
+			String string = attStr.string().getString();
+			item.setAttributedTitle(createString(string));
+		}
+	} else {
+		NSComboBox widget = (NSComboBox)view;
+		int count = (int)/*64*/ widget.numberOfItems();
+		for (int i = 0; i < count; i++) {
+			NSAttributedString attStr = new NSAttributedString (widget.itemObjectValueAtIndex(i));
+			String string = attStr.string().getString();
+			widget.insertItemWithObjectValue(createString(string), i);
+			widget.removeItemAtIndex(i + 1);
+		}
+		widget.cell().setAttributedStringValue(createString(text));
+	}
+}
+
 String verifyText (String string, int start, int end, NSEvent keyEvent) {
 	Event event = new Event ();
 	if (keyEvent != null) setKeyState(event, SWT.MouseDown, keyEvent);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index 2929e28..3d19efb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java	
@@ -137,30 +137,46 @@ boolean acceptsFirstResponder (int /*long*/ id, int /*long*/ sel) {
 	return super.acceptsFirstResponder (id, sel);
 }
 
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
-	
-	if (id == view.id) {
-		if (accessible != null) {
-			// If there is an accessible, it may provide its own list of attributes if it's a lightweight control.
-			// If not, let Cocoa handle it for this view.
-			id returnObject = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
-			if (returnObject != null) return returnObject.id;
+int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	NSString nsAttributeName = new NSString(arg0);
+	int /*long*/ superValue = super.accessibilityAttributeValue(id, sel, arg0);
+
+	if ((state & CANVAS) != 0) {
+		// If this Composite has an Accessible that defined a role, return that, unless the
+		// supplied role was NSAccessibilityUnknownRole.  In that case, return an SWT-specific constant.
+		// This lets the accessibility hierarchy know there's a container here.
+		if (id == accessibleHandle()) {
+			if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
+				if (superValue != 0) {
+					NSString role = new NSString(superValue);
+					if (!role.isEqualToString(OS.NSAccessibilityUnknownRole)) return superValue;
+				}
+				
+				NSString role = NSString.stringWith("SWTComposite");
+				return role.id;
+			} else if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+				if (superValue != 0) {
+					NSString role = new NSString(superValue);
+					if (!role.isEqualToString(OS.NSAccessibilityUnknownSubrole)) return superValue;
+				}
+				
+				NSString roleDescription = NSString.stringWith("generic container view");
+				return roleDescription.id;
+			}
 		}
 	}
 	
-	return super.accessibilityAttributeNames(id, sel);
+	return superValue;
 }
 
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
-	// If we have an accessible and it represents a valid accessible role, this view is not ignored.
-	if (view != null && id == view.id) {
-		if (accessible != null) {
-			id role = accessible.internal_accessibilityAttributeValue(OS.NSAccessibilityRoleAttribute, ACC.CHILDID_SELF);
-			if (role != null) return false; 
-		}
-	}
 
-	return super.accessibilityIsIgnored(id, sel);	
+boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {	
+	if (id == accessibleHandle()) {
+		// If a Composite or subclass has an Accessible it should not be ignored.
+		if (accessible != null) return accessible.internal_accessibilityIsIgnored(ACC.CHILDID_SELF);
+	}
+	
+	return super.accessibilityIsIgnored(id, sel);
 }
 
 /**
@@ -212,6 +228,7 @@ public void changed (Control[] changed) {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget();
+	display.runSkin ();
 	Point size;
 	if (layout != null) {
 		if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) {
@@ -278,6 +295,61 @@ void createHandle () {
 	}
 }
 
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	checkWidget ();
+	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	Control control = findBackgroundControl ();
+	if (control != null) {
+		NSRect rect = new NSRect();
+		rect.x = x;
+		rect.y = y;
+		rect.width = width;
+		rect.height = height;
+		int imgHeight = -1;
+		GCData data = gc.getGCData();
+		if (data.image != null) imgHeight =  data.image.getBounds().height;
+		NSGraphicsContext context = gc.handle;
+		if (data.flippedContext != null) {
+			NSGraphicsContext.static_saveGraphicsState();
+			NSGraphicsContext.setCurrentContext(context);
+		}
+		control.fillBackground (view, context, rect, imgHeight, data.view, offsetX, offsetY);
+		if (data.flippedContext != null) {
+			NSGraphicsContext.static_restoreGraphicsState();
+		}
+	} else {
+		gc.fillRectangle (x, y, width, height);
+	}
+}
+
 void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
 	if (id != view.id) return;
 	if ((state & CANVAS) != 0) {
@@ -494,9 +566,7 @@ public boolean isLayoutDeferred () {
 boolean isOpaque (int /*long*/ id, int /*long*/ sel) {
 	if ((state & CANVAS) != 0) {
 		if (id == view.id) {
-			if (region == null && background != null && background[3] == 1) {
-				return true;
-			}
+			return region == null && background != null && background[3] == 1 && !isObscured ();
 		}
 	}
 	return super.isOpaque (id, sel);
@@ -508,9 +578,10 @@ boolean isTabGroup () {
 }
 
 void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasFocus()) {
 		if ((state & CANVAS) != 0) {
 			Shell s = this.getShell();
+			s.deferFlushing();
 			NSArray array = NSArray.arrayWithObject (new NSEvent (theEvent));
 			s.keyInputHappened = false;
 			view.interpretKeyEvents (array);
@@ -663,42 +734,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -764,9 +912,19 @@ void releaseWidget () {
 }
 
 void removeControl (Control control) {
+	if (control.hasFocus()) redrawWidget(view, true);
 	fixTabList (control);
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resized () {
 	super.resized ();
 	if (layout != null) {
@@ -779,36 +937,46 @@ void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	if ((state & CANVAS) != 0) {
 		NSView view = scrollView != null ? scrollView : this.view;
 		if (id == view.id) {
+			getShell().deferFlushing();
 			NSEvent nsEvent = new NSEvent(theEvent);
+			boolean handled = false;
 			float /*double*/ delta = nsEvent.deltaY();
 			if (delta != 0) {
+				boolean doit = true;
 				if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
-					if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) {
-						return;
-					}
+					doit = sendMouseEvent(nsEvent, SWT.MouseWheel, true);
 				}
+				ScrollBar bar = verticalBar;
+				if (doit && bar != null && bar.getEnabled ()) {
+					if (-1 < delta && delta < 0) delta = -1;
+					if (0 < delta && delta < 1) delta = 1;
+					int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
+					bar.setSelection (selection);
+					Event event = new Event ();
+					event.detail = delta > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
+					bar.sendSelectionEvent (SWT.Selection, event, true);
+					handled = true;
+				}
+				if (!doit) handled = true;
 			}
-			boolean handled = false;
-			ScrollBar bar = verticalBar;
-			if (delta != 0 && bar != null && bar.getEnabled ()) {
-				if (-1 < delta && delta < 0) delta = -1;
-				if (0 < delta && delta < 1) delta = 1;
-				int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
-				bar.setSelection (selection);
-				Event event = new Event ();
-			    event.detail = delta > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
-				bar.sendEvent (SWT.Selection, event);
-				handled = true;
-			}
-			bar = horizontalBar;
 			delta = nsEvent.deltaX ();
-			if (delta != 0 && bar != null && bar.getEnabled ()) {
-				int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
-				bar.setSelection (selection);
-				Event event = new Event ();
-			    event.detail = delta > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
-				bar.sendEvent (SWT.Selection, event);
-				handled = true;
+			if (delta != 0) {
+				boolean doit = true;
+				if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
+					doit = sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true);
+				}
+				ScrollBar bar = horizontalBar;
+				if (doit && bar != null && bar.getEnabled ()) {
+					if (-1 < delta && delta < 0) delta = -1;
+					if (0 < delta && delta < 1) delta = 1;
+					int selection = Math.max (0, (int)(0.5f + bar.getSelection () - bar.getIncrement () * delta));
+					bar.setSelection (selection);
+					Event event = new Event ();
+					event.detail = delta > 0 ? SWT.PAGE_UP : SWT.PAGE_DOWN;	
+					bar.sendSelectionEvent (SWT.Selection, event, true);
+					handled = true;
+				}
+				if (!doit) handled = true;
 			}
 			if (!handled) view.superview().scrollWheel(nsEvent);
 			return;
@@ -965,6 +1133,26 @@ int traversalCode (int key, NSEvent theEvent) {
 	return super.traversalCode (key, theEvent);
 }
 
+void updateBackgroundColor () {
+	super.updateBackgroundColor ();
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		if ((children [i].state & PARENT_BACKGROUND) != 0) {
+			children [i].updateBackgroundColor ();
+		}
+	}
+}
+
+void updateBackgroundImage () {
+	super.updateBackgroundImage ();
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		if ((children [i].state & PARENT_BACKGROUND) != 0) {
+			children [i].updateBackgroundImage ();
+		}
+	}
+}
+
 void updateBackgroundMode () {
 	super.updateBackgroundMode ();
 	Control [] children = _getChildren ();
@@ -991,6 +1179,7 @@ void updateLayout (boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin ();
 		layout.layout (this, changed);
 	}
 	if (all) {
@@ -1001,5 +1190,4 @@ void updateLayout (boolean all) {
 		}
 	}
 }
-
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index 43b0e2b..728c3ec 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java	
@@ -26,7 +26,8 @@ import org.eclipse.swt.internal.cocoa.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -50,6 +51,8 @@ public abstract class Control extends Widget implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public NSView view;
 	Composite parent;
@@ -120,8 +123,29 @@ boolean acceptsFirstMouse (int /*long*/ id, int /*long*/ sel, int /*long*/ theEv
 	return super.acceptsFirstMouse (id, sel, theEvent);
 }
 
+int /*long*/ accessibleHandle() {
+	int /*long*/ returnValue = view.id;
+	
+	if (view instanceof NSControl) {
+		if (((NSControl) view).cell() != null) {
+			returnValue = ((NSControl) view).cell().id;
+		}
+			
+	}
+	return returnValue;
+}
+
+int /*long*/ accessibilityActionDescription(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	if (handleIsAccessible(id) && accessible != null) {
+		NSString actionName = new NSString(arg0);
+		id returnValue = accessible.internal_accessibilityActionDescription(actionName, ACC.CHILDID_SELF);
+		if (returnValue != null) return returnValue.id;
+	}
+	return super.accessibilityActionDescription(id, sel, arg0);
+}
+
 int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
-	if (accessible != null) {
+	if (handleIsAccessible(id) && accessible != null) {
 		NSArray returnValue = accessible.internal_accessibilityActionNames(ACC.CHILDID_SELF);
 		if (returnValue != null) return returnValue.id;
 	}
@@ -131,68 +155,59 @@ int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
 
 int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
 	
-	if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell() != null && ((NSControl)view).cell().id == id)) {
-		if (accessible != null) {
-			
-			// First, see if the accessible is going to define a set of attributes for the control.
-			// If it does, return that.
-			NSArray returnValue = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
-			if (returnValue != null) return returnValue.id;
-			
-			// If not, see if it will override or augment the standard list.
-			// Help, title, and description can be overridden.
-			NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
-			extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
-
-			for (int i = (int)/*64*/extraAttributes.count() - 1; i >= 0; i--) {
-				NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
-				if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) == null) {
-					extraAttributes.removeObjectAtIndex(i);
-				}
-			}
-
-			if (extraAttributes.count() > 0) {
-				int /*long*/ superResult = super.accessibilityAttributeNames(id, sel);
-				NSArray baseAttributes = new NSArray(superResult);
-				NSMutableArray mutableAttributes = NSMutableArray.arrayWithCapacity(baseAttributes.count() + 1);
-				mutableAttributes.addObjectsFromArray(baseAttributes);
-				
-				for (int i = 0; i < extraAttributes.count(); i++) {
-					id currAttribute = extraAttributes.objectAtIndex(i);
-					if (!mutableAttributes.containsObject(currAttribute)) {
-						mutableAttributes.addObject(currAttribute);
-					}
-				}
-				
-				return mutableAttributes.id;
-			}
-		}
+	int /*long*/ returnValue = 0;
+	
+	if (handleIsAccessible(id) && accessible != null) {
+		// See if the accessible is defining the attribute set for the control.
+		id value = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
+		returnValue = (value != null ? value.id : 0);
+		
+		// If not, ask Cocoa for the set for this control.
+		if (returnValue == 0) returnValue = super.accessibilityAttributeNames(id, sel);
+		
+		// Add relationship attributes.
+		returnValue = accessible.internal_addRelationAttributes(returnValue);
 	}
 
-	return super.accessibilityAttributeNames(id, sel);
+	// If the SWT accessibility didn't give us anything get the default for the view/cell.
+	if (returnValue == 0) returnValue = super.accessibilityAttributeNames(id, sel);
+	
+	return returnValue;
+}
+
+/**
+ * @param id NSView/NSCell that makes up this control. Could be the view itself.
+ * @return true if id is something whose accessible properties can be augmented
+ * or overridden by the SWT Accessible. false if the Cocoa defaults for the control should
+ * be used. 
+ */
+boolean handleIsAccessible(int /*long*/ id) {
+	return id == accessibleHandle();
 }
 
 int /*long*/ accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
 
-	if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell() != null && ((NSControl)view).cell().id == id)) {
-		if (accessible != null) {
-			NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
-			if (returnValue != null) return returnValue.id;
-		}
+	if (handleIsAccessible(id) && accessible != null) {
+		NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
+		if (returnValue != null) return returnValue.id;
 	}
 
 	return super.accessibilityParameterizedAttributeNames(id, sel);
 }
 
+void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	if (handleIsAccessible(id) && accessible != null) {
+		NSString action = new NSString(arg0);
+		if (accessible.internal_accessibilityPerformAction(action, ACC.CHILDID_SELF)) return;
+	}
+	super.accessibilityPerformAction(id, sel, arg0);
+}
+
 int /*long*/ accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
 	id returnValue = null;
 
-	if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell() != null && ((NSControl)view).cell().id == id)) {
-		if (accessible != null) {
-			returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
-		}
+	if (handleIsAccessible(id) && accessible != null) {
+		returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
 	}
 
 	// If we had an accessible and it didn't handle the attribute request, let the
@@ -206,10 +221,8 @@ int /*long*/ accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
 int /*long*/ accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
 	id returnValue = null;
 
-	if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell() != null && ((NSControl)view).cell().id == id)) {
-		if (accessible != null) {
-			returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
-		}
+	if (handleIsAccessible(id) && accessible != null) {
+		returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
 	}
 
 	// If we had an accessible and it didn't handle the attribute request, let the
@@ -225,7 +238,7 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
 	int /*long*/ returnValue = 0;
 	id returnObject = null;
 	
-	if (accessible != null) {
+	if (handleIsAccessible(id) && accessible != null) {
 		returnObject = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
 	}
 
@@ -233,6 +246,15 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
 	// superclass handle it.
 	if (returnObject == null) {
 		returnValue = super.accessibilityAttributeValue(id, sel, arg0);
+		
+		// Feature in Cocoa: SWT doesn't use setToolTip for tooltip support, so if the
+		// help attribute was requested return toolTipText.
+		if (returnObject == null) {
+			if (attribute.isEqualToString(OS.NSAccessibilityHelpAttribute)) {
+				if (toolTipText != null) returnValue = NSString.stringWith(toolTipText).id;
+			}
+		}
+		
 	} else {
 		returnValue = returnObject.id;
 	}
@@ -245,7 +267,7 @@ int /*long*/ accessibilityAttributeValue_forParameter(int /*long*/ id, int /*lon
 	
 	id returnValue = null;
 	
-	if (accessible != null) {
+	if (handleIsAccessible(id) && accessible != null) {
 		id parameter = new id(arg1);
 		returnValue = accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, ACC.CHILDID_SELF);
 	}
@@ -258,6 +280,28 @@ int /*long*/ accessibilityAttributeValue_forParameter(int /*long*/ id, int /*lon
 		return returnValue.id;
 }
 
+boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	boolean returnValue = false;
+	if (handleIsAccessible(id) && accessible != null) {
+		NSString attribute = new NSString (arg0);
+		returnValue = accessible.internal_accessibilityIsAttributeSettable(attribute, ACC.CHILDID_SELF);
+	}
+	if (!returnValue) {
+		returnValue = super.accessibilityIsAttributeSettable(id, sel, arg0);
+	}
+	return returnValue;
+}
+
+void accessibilitySetValue_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+	if (handleIsAccessible(id) && accessible != null) {
+		id value = new id(arg0);
+		NSString attribute = new NSString(arg1);
+		accessible.internal_accessibilitySetValue_forAttribute(value, attribute, ACC.CHILDID_SELF);
+	} else {
+		super.accessibilitySetValue_forAttribute(id, sel, arg0, arg1);
+	}
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is moved or resized, by sending
@@ -806,7 +850,7 @@ NSView contentView () {
 	return view;
 }
 
-NSAttributedString createString (String string, Font font, float /*double*/ [] foreground, int style, boolean wrap, boolean enabled, boolean mnemonics) {
+NSAttributedString createString (String string, Font font, float /*double*/ [] foreground, int alignment, boolean wrap, boolean enabled, boolean mnemonics) {
 	NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(5);
 	if (font == null) font = this.font != null ? this.font : defaultFont();
 	dict.setObject (font.handle, OS.NSFontAttributeName);
@@ -821,14 +865,19 @@ NSAttributedString createString (String string, Font font, float /*double*/ [] f
 	}
 	NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
 	paragraphStyle.setLineBreakMode (wrap ? OS.NSLineBreakByWordWrapping : OS.NSLineBreakByClipping);
-	if (style != 0) {
-		int alignment = SWT.LEFT;
-		if ((style & SWT.CENTER) != 0) {
-			alignment = OS.NSCenterTextAlignment;
-		} else if ((style & SWT.RIGHT) != 0) {
-			alignment = OS.NSRightTextAlignment;
+	if (alignment != 0) {
+		int align = SWT.LEFT;
+		if ((alignment & SWT.CENTER) != 0) {
+			align = OS.NSCenterTextAlignment;
+		} else if ((alignment & SWT.RIGHT) != 0) {
+			align = OS.NSRightTextAlignment;
 		}
-		paragraphStyle.setAlignment (alignment);
+		paragraphStyle.setAlignment (align);
+	}
+	if ((style & SWT.RIGHT_TO_LEFT) != 0) {
+		paragraphStyle.setBaseWritingDirection(OS.NSWritingDirectionRightToLeft);
+	} else {
+		paragraphStyle.setBaseWritingDirection(OS.NSWritingDirectionLeftToRight);
 	}
 	dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
 	paragraphStyle.release ();
@@ -852,6 +901,9 @@ void createWidget () {
 	setDefaultFont ();
 	setZOrder ();
 	setRelations ();
+	if ((state & PARENT_BACKGROUND) != 0) {
+		setBackground ();
+	}
 	display.clearPool ();
 }
 
@@ -884,7 +936,7 @@ void destroyWidget () {
 }
 
 void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ selector) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasKeyboardFocus(id)) {
 		if (imeInComposition ()) return;
 		Shell s = this.getShell();
 		NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
@@ -933,7 +985,7 @@ void doCommandBySelector (int /*long*/ id, int /*long*/ sel, int /*long*/ select
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -975,7 +1027,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1102,7 +1154,16 @@ NSView eventView () {
 	return view;
 }
 
+boolean drawsBackground() {
+	return true;
+}
+
 void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int imgHeight) {
+	fillBackground(view, context, rect, imgHeight, null, 0, 0);
+}
+
+void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int imgHeight, NSView gcView, int tx, int ty) {
+	if (!drawsBackground()) return;
 	Control control = findBackgroundControl();
 	if (control == null) control = this;
 	Image image = control.backgroundImage;
@@ -1111,6 +1172,9 @@ void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int im
 		NSColor.colorWithPatternImage(image.handle).setFill();
 		NSPoint phase = new NSPoint();
 		NSView controlView = control.view;
+		if (!controlView.isFlipped()) {
+			phase.y = controlView.bounds().height;
+		}
 		if (imgHeight == -1) {
 			NSView contentView = controlView.window().contentView();
 			phase = controlView.convertPoint_toView_(phase, contentView);
@@ -1119,6 +1183,13 @@ void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int im
 			phase = view.convertPoint_toView_(phase, controlView);
 			phase.y += imgHeight - backgroundImage.getBounds().height;
 		}
+		if (gcView != null) {
+			NSPoint pt = gcView.convertPoint_toView_(new NSPoint(), view);
+			phase.x += pt.x;
+			phase.y -= pt.y;
+		}
+		phase.x -= tx;
+		phase.y += ty;
 		context.setPatternPhase(phase);
 		NSBezierPath.fillRect(rect);
 		context.restoreGraphicsState();
@@ -1128,6 +1199,7 @@ void fillBackground (NSView view, NSGraphicsContext context, NSRect rect, int im
 	float /*double*/ [] background = control.background;
 	float /*double*/ alpha;
 	if (background == null) {
+		if (isTransparent()) return;
 		background = control.defaultBackground ().handle;
 		alpha = getThemeAlpha ();
 	} else {
@@ -1146,7 +1218,7 @@ Cursor findCursor () {
 
 Control findBackgroundControl () {
 	if (backgroundImage != null || background != null) return this;
-	return (state & PARENT_BACKGROUND) != 0 ? parent.findBackgroundControl () : null;
+	return (!isTransparent() && (state & PARENT_BACKGROUND) != 0) ? parent.findBackgroundControl () : null;
 }
 
 Menu [] findMenus (Control control) {
@@ -1170,12 +1242,12 @@ void fixFocus (Control focusControl) {
 		if (control.setFocus ()) return;
 	}
 	shell.setSavedFocus (focusControl);
-//	int window = OS.GetControlOwner (handle);
-//	OS.ClearKeyboardFocus (window);
+	NSWindow window = view.window();
+	window.becomeKeyWindow();
 }
 
 void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasKeyboardFocus(id)) {
 		if ((state & SAFARI_EVENTS_FIX) == 0) {
 			Shell s = this.getShell();
 			s.keyInputHappened = false;
@@ -1200,9 +1272,9 @@ void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 			if (mask != 0) {
 				s.keyInputHappened = true;
 				int type = (mask & modifiers) != 0 ? SWT.KeyDown : SWT.KeyUp;
-				if (type == SWT.KeyDown) s.keyInputHappened = true;
 				Event event = new Event();
 				event.keyCode = keyCode;
+				setLocationMask(event, nsEvent);
 				setInputState (event, nsEvent, type);
 				if (!sendKeyEvent (type, event)) return;
 			}
@@ -1238,7 +1310,7 @@ public boolean forceFocus () {
 	shell.setSavedFocus (null);
 	NSView focusView = focusView ();
 	if (!focusView.canBecomeKeyView()) return false;
-	boolean result = view.window ().makeFirstResponder (focusView);
+	boolean result = forceFocus(focusView);
 	if (isDisposed ()) return false;
 	shell.bringToTop (false);
 	if (isDisposed ()) return false;
@@ -1246,6 +1318,10 @@ public boolean forceFocus () {
 	return result;
 }
 
+boolean forceFocus (NSView focusView) {
+	return view.window ().makeFirstResponder (focusView);
+}
+
 /**
  * Returns the accessible object for the receiver.
  * If this is the first time this object is requested,
@@ -1507,6 +1583,11 @@ int getMininumHeight () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1708,18 +1789,18 @@ boolean hasFocus () {
 	return display.getFocusControl() == this;
 }
 
+boolean hasRegion () {
+	return region != null || parent.hasRegion ();
+}
+
 int /*long*/ hitTest (int /*long*/ id, int /*long*/ sel, NSPoint point) {
 	if ((state & DISABLED) != 0) return 0;
 	if (!isActive ()) return 0;
 	if (regionPath != null) {
-		NSView superview = new NSView(id).superview();
-		if (superview != null) {
-			NSPoint pt = superview.convertPoint_toView_(point, view);
-			if (!view.isFlipped ()) {
-				pt.y = view.bounds().height - pt.y;
-			}
-			if (!regionPath.containsPoint(pt)) return 0;
-		}
+		NSView rgnView = topView ();
+		if (!rgnView.isFlipped()) rgnView = eventView ();
+		NSPoint pt = rgnView.convertPoint_fromView_ (point, new NSView (id).superview());
+		if (!regionPath.containsPoint(pt)) return 0;
 	}
 	return super.hitTest(id, sel, point);
 }
@@ -1729,14 +1810,14 @@ boolean imeInComposition () {
 }
 
 boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasKeyboardFocus(id)) {
 		Shell s = this.getShell();
 		NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
 		if (nsEvent != null) {
 			int /*long*/ type = nsEvent.type ();
-			if ((!s.keyInputHappened && type == OS.NSKeyDown) || type == OS.NSSystemDefined) {
+			if (type == OS.NSKeyDown || type == OS.NSSystemDefined) {
 				NSString str = new NSString (string);
-				if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+				if (str.isKindOfClass (OS.class_NSAttributedString)) {
 					str = new NSAttributedString (string).string ();
 				}
 				int length = (int)/*64*/str.length ();
@@ -1768,6 +1849,8 @@ boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	checkWidget();
@@ -1827,6 +1910,8 @@ public int /*long*/ internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ context, GCData data) {
 	checkWidget ();
@@ -1855,7 +1940,7 @@ void invalidateVisibleRegion () {
 }
 
 boolean isActive () {
-	return getShell().getModalShell() == null;
+	return getShell().getModalShell () == null && display.getModalDialog () == null;
 }
 
 /*
@@ -1991,6 +2076,11 @@ boolean isTabItem () {
 	return (code & (SWT.TRAVERSE_ARROW_PREVIOUS | SWT.TRAVERSE_ARROW_NEXT)) != 0;
 }
 
+boolean isTransparent() {
+	if (background != null) return false;
+	return parent.isTransparent();
+}
+
 boolean isTrim (NSView view) {
 	return false;
 }
@@ -2015,7 +2105,7 @@ public boolean isVisible () {
 }
 
 void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasKeyboardFocus(id)) {
 		Shell s = this.getShell();
 		s.keyInputHappened = false;
 		boolean textInput = OS.objc_msgSend (id, OS.sel_conformsToProtocol_, OS.objc_getProtocol ("NSTextInput")) != 0;
@@ -2048,8 +2138,12 @@ void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	super.keyDown (id, sel, theEvent);
 }
 
+boolean hasKeyboardFocus(int /*long*/ inId) {
+	return view.window().firstResponder().id == inId;
+}
+
 void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
-	if (view.window ().firstResponder ().id == id) {
+	if (hasKeyboardFocus(id)) {
 		NSEvent nsEvent = new NSEvent (theEvent);
 		if (!sendKeyEvent (nsEvent, SWT.KeyUp)) return;
 	}
@@ -2090,17 +2184,26 @@ Decorations menuShell () {
 }
 
 void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	boolean handled = false;
 	if (id == view.id) {
 		if (hooks (SWT.MouseWheel) || filters (SWT.MouseWheel)) {
 			NSEvent nsEvent = new NSEvent(theEvent);
 			if (nsEvent.deltaY() != 0) {
 				if (!sendMouseEvent(nsEvent, SWT.MouseWheel, true)) {
-					return;
+					handled = true;
+				}
+			}
+		}
+		if (hooks (SWT.MouseHorizontalWheel) || filters (SWT.MouseHorizontalWheel)) {
+			NSEvent nsEvent = new NSEvent(theEvent);
+			if (nsEvent.deltaX() != 0) {
+				if (!sendMouseEvent(nsEvent, SWT.MouseHorizontalWheel, true)) {
+					handled = true;
 				}
 			}
 		}
 	}
-	super.scrollWheel(id, sel, theEvent); 
+	if (!handled) super.scrollWheel(id, sel, theEvent); 
 }
 
 boolean isEventView (int /*long*/ id) {
@@ -2336,14 +2439,14 @@ public boolean print (GC gc) {
 	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
 	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	
-	gc.handle.saveGraphicsState();
+	NSGraphicsContext.static_saveGraphicsState();
 	NSGraphicsContext.setCurrentContext(gc.handle);
 	NSAffineTransform transform = NSAffineTransform.transform ();
 	transform.translateXBy (0, view.bounds().height);
 	transform.scaleXBy (1, -1);
 	transform.concat ();
 	view.displayRectIgnoringOpacity(view.bounds(), gc.handle);
-	gc.handle.restoreGraphicsState();
+	NSGraphicsContext.static_restoreGraphicsState();
 	return true;
 }
 
@@ -2901,11 +3004,17 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
 				case 4: event.button = 5; break;
 			}
 			break;
-		case SWT.MouseWheel:
+		case SWT.MouseWheel: {
 			event.detail = SWT.SCROLL_LINE;
 			float /*double*/ delta = nsEvent.deltaY();
 			event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
 			break;
+		}
+		case SWT.MouseHorizontalWheel: {
+			float /*double*/ delta = nsEvent.deltaX();
+			event.count = delta > 0 ? Math.max (1, (int)delta) : Math.min (-1, (int)delta);
+			break;
+		}
 	}
 	if (event.button != 0) event.count = (int)/*64*/nsEvent.clickCount();
 	NSPoint windowPoint;
@@ -2934,7 +3043,16 @@ boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
 }
 
 void setBackground () {
-//	redrawWidget (handle, false);
+	if (!drawsBackground()) return;
+	Control control = findBackgroundControl ();
+	if (control == null) control = this;
+	if (control.backgroundImage != null) {
+		setBackgroundImage (control.backgroundImage.handle);
+	} else {
+		float /*double*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+		NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
+		setBackgroundColor (nsColor);
+	}
 }
 
 /**
@@ -2963,7 +3081,7 @@ public void setBackground (Color color) {
 	float /*double*/ [] background = color != null ? color.handle : null;
 	if (equals (background, this.background)) return;
 	this.background = background;
-	updateBackground ();
+	updateBackgroundColor ();
 	redrawWidget(view, true);
 }
 
@@ -2994,14 +3112,14 @@ public void setBackgroundImage (Image image) {
 	if (image != null && image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	if (image == backgroundImage) return;
 	backgroundImage = image;
-	updateBackground();
-	redrawWidget(view, false);
+	updateBackgroundImage();
 }
 
-void updateBackground () {
+void setBackgroundImage (NSImage image) {
+	redrawWidget(view, true);
 }
 
-void setBackground (NSColor nsColor) {
+void setBackgroundColor (NSColor nsColor) {
 }
 
 /**
@@ -3095,17 +3213,19 @@ public void setCapture (boolean capture) {
 	checkWidget();
 }
 
-void setClipRegion (float /*double*/ x, float /*double*/ y) {
+void setClipRegion (NSView view) {
 	if (regionPath != null) {
+		NSView rgnView = topView ();
+		if (!rgnView.isFlipped ()) rgnView = eventView ();
+		NSPoint pt = view.convertPoint_toView_(new NSPoint(), rgnView);
 		NSAffineTransform transform = NSAffineTransform.transform();
-		transform.translateXBy(-x, -y);
+		transform.translateXBy(-pt.x, -pt.y);
 		regionPath.transformUsingAffineTransform(transform);
 		regionPath.addClip();
-		transform.translateXBy(2*x, 2*y);
+		transform.translateXBy(2*pt.x, 2*pt.y);
 		regionPath.transformUsingAffineTransform(transform);
 	}
-	NSRect frame = topView().frame();
-	parent.setClipRegion(frame.x + x, frame.y + y);
+	parent.setClipRegion(view);
 }
 
 /**
@@ -3439,6 +3559,7 @@ public boolean setParent (Composite parent) {
 	parent.contentView().addSubview(topView, OS.NSWindowBelow, null);
 	topView.release();
 	this.parent = parent;
+	reskin (SWT.ALL);
 	return true;
 }
 
@@ -3661,6 +3782,7 @@ public void setVisible (boolean visible) {
 		}
 	}
 	topView().setHidden(!visible);
+	if (isDisposed ()) return;
 	invalidateVisibleRegion();
 	if (!visible) {
 		/*
@@ -3943,11 +4065,182 @@ boolean traverseMnemonic (char key) {
 }
 
 /**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	if (traversal == SWT.TRAVERSE_NONE) {
+		switch (keyCode) {
+			case SWT.ESC: {
+				traversal = SWT.TRAVERSE_ESCAPE;
+				doit = true;
+				break;
+			}
+			case SWT.CR: {
+				traversal = SWT.TRAVERSE_RETURN;
+				doit = true;
+				break;
+			}
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_RIGHT: {
+				traversal = SWT.TRAVERSE_ARROW_NEXT;
+				doit = false;
+				break;
+			}
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT: {
+				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+				doit = false;
+				break;
+			}
+			case SWT.TAB: {
+				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+				doit = true;
+				break;
+			}
+			case SWT.PAGE_DOWN: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_NEXT;
+					doit = true;
+				}
+				break;
+			}
+			case SWT.PAGE_UP: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+					doit = true;
+				}
+				break;
+			}
+			default: {
+				/* keyCode does not have a corresponding traversal action */
+				return false;
+			}
+		}
+	}
+
+	Event event = new Event ();
+	event.character = character;
+	event.detail = traversal;
+	event.doit = doit;
+	event.keyCode = keyCode;
+	event.keyLocation = keyLocation;
+	event.stateMask = stateMask;
+	Shell shell = getShell ();
+
+	boolean all = false;
+	switch (traversal) {
+		case SWT.TRAVERSE_ESCAPE:
+		case SWT.TRAVERSE_RETURN:
+		case SWT.TRAVERSE_PAGE_NEXT:
+		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+			all = true;
+			// FALL THROUGH
+		}
+		case SWT.TRAVERSE_ARROW_NEXT:
+		case SWT.TRAVERSE_ARROW_PREVIOUS:
+		case SWT.TRAVERSE_TAB_NEXT:
+		case SWT.TRAVERSE_TAB_PREVIOUS: {
+			/* traversal is a valid traversal action */
+			break;
+		}
+		case SWT.TRAVERSE_MNEMONIC: /* not supported on OS X */
+			// FALL THROUGH
+		default: {
+			/* traversal is not a valid traversal action */
+			return false;
+		}
+	}
+
+	Control control = this;
+	do {
+		if (control.traverse (event)) return true;
+		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+		if (control == shell) return false;
+		control = control.parent;
+	} while (all && control != null);
+	return false;
+}
+
+/**
  * Based on the argument, perform one of the expected platform
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
@@ -4080,8 +4373,35 @@ public void update () {
 void update (boolean all) {
 //	checkWidget();
 	if (display.isPainting.containsObject(view)) return;
-	//TODO - not all
-	view.displayIfNeeded ();
+	Shell shell = getShell();
+	NSWindow window = shell.deferFlushing ? view.window() : null;
+	try {
+		if (window != null) {
+			window.retain();
+			window.disableFlushWindow();
+		}
+		//TODO - not all
+		view.displayIfNeeded ();
+	} finally {
+		if (window != null) {
+			window.enableFlushWindow();
+			window.release();
+		}
+	}
+}
+
+void updateBackgroundColor () {
+	Control control = findBackgroundControl ();
+	if (control == null) control = this;
+	float /*double*/ [] color = control.background != null ? control.background : control.defaultBackground().handle;
+	NSColor nsColor = NSColor.colorWithDeviceRed(color[0], color[1], color[2], color[3]);
+	setBackgroundColor (nsColor);
+}
+
+void updateBackgroundImage () {
+	Control control = findBackgroundControl ();
+	Image image = control != null ? control.backgroundImage : backgroundImage;
+	setBackgroundImage (image != null ? image.handle : null);
 }
 
 void updateBackgroundMode () {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java
index 5604b20..ed5269c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java	
@@ -181,6 +181,11 @@ NSFont defaultNSFont() {
 	return display.datePickerFont;
 }
 
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+	if (id != view.id) return;
+	fillBackground (view, context, rect, -1);
+}
+
 NSCalendarDate getCalendarDate () {
 	NSDate date = ((NSDatePicker)view).dateValue();
 	return date.dateWithCalendarFormat(null, null);
@@ -342,7 +347,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 		switch (keyCode) {
 			case 76: /* KP Enter */
 			case 36: /* Return */
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 		}
 	}
 	return result;
@@ -352,32 +357,23 @@ void sendSelection () {
 	NSEvent event = NSApplication.sharedApplication().currentEvent();
 	if (event != null && (style & SWT.CALENDAR) != 0) {
 		if (event.clickCount() == 2) {
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 		} else if (event.type() == OS.NSLeftMouseUp) {
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 		}
 	} else { // SWT.DATE or SWT.TIME
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		if ((style & SWT.CALENDAR) != 0) {
-			nsColor = NSColor.controlBackgroundColor ();
-		} else {
-			nsColor = NSColor.textBackgroundColor ();
-		}
-
-	}
+void setBackgroundColor(NSColor nsColor) {
 	((NSDatePicker)view).setBackgroundColor(nsColor);
 }
 
+void setBackgroundImage(NSImage image) {
+	((NSDatePicker)view).setDrawsBackground(image == null);
+}
+
 /**
  * Sets the receiver's year, month, and day in a single operation.
  * <p>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
index e0c6c74..a8ad95f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -224,6 +224,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus)
  */
 public Button getDefaultButton () {
 	checkWidget();
+	if (defaultButton != null && defaultButton.isDisposed ()) return null;
 	return defaultButton;
 }
 
@@ -407,6 +408,18 @@ void releaseWidget () {
 	defaultButton = null;
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	Menu [] menus = display.getMenus (this);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 boolean restoreFocus () {
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
 	if (savedFocus == null) return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
index e12f40c..fc41c1a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -124,6 +124,7 @@ public String getMessage () {
 public String open () {
 	String directoryPath = null;
 	NSOpenPanel panel = NSOpenPanel.openPanel();
+    OS.objc_msgSend(panel.id, OS.sel_setShowsHiddenFiles_, true);
 	panel.setCanCreateDirectories(true);
 	panel.setAllowsMultipleSelection((style & SWT.MULTI) != 0);
 	panel.setTitle(NSString.stringWith(title != null ? title : ""));
@@ -132,13 +133,16 @@ public String open () {
 	panel.setCanChooseDirectories(true);
 	NSApplication application = NSApplication.sharedApplication();
 	if (parent != null && (style & SWT.SHEET) != 0) {
-		application.beginSheet(panel, parent.window, null, 0, 0);
+		application.beginSheet(panel, parent.view.window (), null, 0, 0);
 	}
-	NSString dir = filterPath != null ? NSString.stringWith(filterPath) : null;
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+	display.setModalDialog(this);
+	NSString dir = (filterPath != null && filterPath.length() > 0) ? NSString.stringWith(filterPath) : null;
 	int /*long*/ response = panel.runModalForDirectory(dir, null);
 	if (parent != null && (style & SWT.SHEET) != 0) {
 		application.endSheet(panel, 0);
 	}
+	display.setModalDialog(null);
 	if (response == OS.NSFileHandlingPanelOKButton) {
 		NSString filename = panel.filename();
 		directoryPath = filterPath = filename.getString();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 5b01da3..eae5cba 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java	
@@ -78,7 +78,7 @@ import org.eclipse.swt.internal.cocoa.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -109,7 +109,7 @@ public class Display extends Device {
 	/* Sync/Async Widget Communication */
 	Synchronizer synchronizer;
 	Thread thread;
-	boolean allowTimers, runAsyncMessages;
+	boolean allowTimers = true, runAsyncMessages = true;
 
 	GCData[] contexts;
 
@@ -119,8 +119,8 @@ public class Display extends Device {
 	Control currentControl, trackingControl, tooltipControl;
 	Widget tooltipTarget;
 	
-	NSMutableArray isPainting, needsDisplay, needsDisplayInRect;
-
+	NSMutableArray isPainting, needsDisplay, needsDisplayInRect, runLoopModes;
+	
 	NSDictionary markedAttributes;
 	
 	/* Fonts */
@@ -131,6 +131,7 @@ public class Display extends Device {
 	NSFont boxFont, tabViewFont, progressIndicatorFont;
 
 	Shell [] modalShells;
+	Dialog modalDialog;
 	
 	Menu menuBar;
 	Menu[] menus, popups;
@@ -140,11 +141,15 @@ public class Display extends Device {
 	NSImage dockImage;
 	boolean isEmbedded;
 	static boolean launched = false;
+	int systemUIMode, systemUIOptions;
 	
 	/* Focus */
 	Control focusControl, currentFocusControl;
 	int focusEvent;
 	
+	/* Table/Tree click tracking */
+	int /*long*/ trackedButtonRow = -1;
+
 	NSWindow screenWindow, keyWindow;
 
 	NSAutoreleasePool[] pools;
@@ -163,17 +168,23 @@ public class Display extends Device {
 	// the following Callbacks are never freed
 	static Callback windowCallback2, windowCallback3, windowCallback4, windowCallback5, windowCallback6;
 	static Callback dialogCallback3, dialogCallback4, dialogCallback5;
-	static Callback applicationCallback2, applicationCallback3, applicationCallback6;
-	static Callback fieldEditorCallback3, fieldEditorCallback4;
+	static Callback applicationCallback2, applicationCallback3, applicationCallback4, applicationCallback6;
 	
 	/* Display Shutdown */
 	Runnable [] disposeList;
+	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
 
 	/* System Tray */
 	Tray tray;
 	TrayItem currentTrayItem;
 	Menu trayItemMenu;
 	
+	/* TaskBar */
+	TaskBar taskBar;
+	
 	/* System Resources */
 	Image errorImage, infoImage, warningImage;
 	Cursor [] cursors = new Cursor [SWT.CURSOR_HAND + 1];
@@ -231,6 +242,11 @@ public class Display extends Device {
 		{105, SWT.F13},
 		{107, SWT.F14},
 		{113, SWT.F15},
+		{106, SWT.F16},
+		{64, SWT.F17},
+		{79, SWT.F18},
+		{80, SWT.F19},
+//		{??, SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{67, SWT.KEYPAD_MULTIPLY},
@@ -263,16 +279,24 @@ public class Display extends Device {
 	};
 
 	static String APP_NAME;
+	static String APP_VERSION = ""; //$NON-NLS-1$
 	static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
 	static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
 	static final byte[] SWT_IMAGE = {'S', 'W', 'T', '_', 'I', 'M', 'A', 'G', 'E', '\0'};
 	static final byte[] SWT_ROW = {'S', 'W', 'T', '_', 'R', 'O', 'W', '\0'};
 	static final byte[] SWT_COLUMN = {'S', 'W', 'T', '_', 'C', 'O', 'L', 'U', 'M', 'N', '\0'};
+	
+	static final String SET_MODAL_DIALOG = "org.eclipse.swt.internal.modalDialog"; //$NON-NLS-1$
 
 	/* Multiple Displays. */
 	static Display Default;
 	static Display [] Displays = new Display [4];
-				
+	
+	/* Skinning support */
+	static final int GROW_SIZE = 1024;
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package Name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets.";
 			
@@ -345,7 +369,7 @@ static int untranslateKey (int key) {
 void addContext (GCData context) {
 	if (contexts == null) contexts = new GCData [12];
 	for (int i=0; i<contexts.length; i++) {
-		if (contexts[i] != null && contexts [i] == context) {
+		if (contexts[i] == null || contexts [i] == context) {
 			contexts [i] = context;
 			return;
 		}
@@ -399,6 +423,16 @@ public void addFilter (int eventType, Listener listener) {
 	filterTable.hook (eventType, listener);
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -481,6 +515,15 @@ void addPopup (Menu menu) {
 	popups [index] = menu;
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 void addWidget (NSObject view, Widget widget) {
 	if (view == null) return;
 	OS.object_setInstanceVariable (view.id, SWT_OBJECT, widget.jniRef);
@@ -639,6 +682,15 @@ static void checkDisplay (Thread thread, boolean multiple) {
 	}
 }
 
+static NSRect convertRect(NSScreen screen, NSRect frame) {
+	float /*double*/ scaleFactor = screen.userSpaceScaleFactor();
+	frame.x /= scaleFactor;
+	frame.y /= scaleFactor;
+	frame.width /= scaleFactor;
+	frame.height /= scaleFactor;
+	return frame;
+}
+
 static String convertToLf(String text) {
 	char Cr = '\r';
 	char Lf = '\n';
@@ -739,99 +791,116 @@ void createDisplay (DeviceData data) {
 	}
 
 	NSThread nsthread = NSThread.currentThread();
+	
+	if (!NSThread.isMainThread()) {
+		System.out.println ("***WARNING: Display must be created on main thread due to Cocoa restrictions."); //$NON-NLS-1$
+		error(SWT.ERROR_THREAD_INVALID_ACCESS);
+	}
+	
 	NSMutableDictionary dictionary = nsthread.threadDictionary();
 	NSString key = NSString.stringWith("SWT_NSAutoreleasePool");
 	NSNumber id = new NSNumber(dictionary.objectForKey(key));
 	addPool(new NSAutoreleasePool(id.integerValue()));
 
 	application = NSApplication.sharedApplication();
+	isEmbedded = application.isRunning();
 
 	/*
-	 * TODO: If an NSApplication is already running we don't want to create another NSApplication.
-	 * But if we don't we won't get mouse events, since we currently need to subclass NSApplication and intercept sendEvent to
-	 * deliver mouse events correctly to widgets.   
+	 * Feature in the Macintosh.  On OS 10.2, it is necessary
+	 * to explicitly check in with the Process Manager and set
+	 * the current process to be the front process in order for
+	 * windows to come to the front by default.  The fix is call
+	 * both GetCurrentProcess() and SetFrontProcess().
+	 * 
+	 * NOTE: It is not actually necessary to use the process
+	 * serial number returned by GetCurrentProcess() in the
+	 * call to SetFrontProcess() (ie. kCurrentProcess can be
+	 * used) but both functions must be called in order for
+	 * windows to come to the front.
 	 */
-	if (!application.isRunning()) {
-		/*
-		 * Feature in the Macintosh.  On OS 10.2, it is necessary
-		 * to explicitly check in with the Process Manager and set
-		 * the current process to be the front process in order for
-		 * windows to come to the front by default.  The fix is call
-		 * both GetCurrentProcess() and SetFrontProcess().
-		 * 
-		 * NOTE: It is not actually necessary to use the process
-		 * serial number returned by GetCurrentProcess() in the
-		 * call to SetFrontProcess() (ie. kCurrentProcess can be
-		 * used) but both functions must be called in order for
-		 * windows to come to the front.
-		 */
-		int [] psn = new int [2];
-		if (OS.GetCurrentProcess (psn) == OS.noErr) {
-			int pid = OS.getpid ();
-			int /*long*/ ptr = getAppName().UTF8String();
-			if (ptr != 0) OS.CPSSetProcessName (psn, ptr);
+	int [] psn = new int [2];
+	if (OS.GetCurrentProcess (psn) == OS.noErr) {
+		int pid = OS.getpid ();
+		int /*long*/ ptr = getApplicationName().UTF8String();
+		if (ptr != 0) OS.CPSSetProcessName (psn, ptr);
+		if (!isBundled ()) {
 			OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
 			OS.SetFrontProcess (psn);
-			ptr = OS.getenv (ascii ("APP_ICON_" + pid));
-			if (ptr != 0) {
-				NSString path = NSString.stringWithUTF8String (ptr);
-				NSImage image = (NSImage) new NSImage().alloc();
-				image = image.initByReferencingFile(path);
-				dockImage = image;
-				application.setApplicationIconImage(image);
-			}
 		}
-
-		String className = "SWTApplication";
-		int /*long*/ cls;
-		if ((cls = OS.objc_lookUpClass (className)) == 0) {
-			Class clazz = getClass();
-			applicationCallback2 = new Callback(clazz, "applicationProc", 2);
-			int /*long*/ proc2 = applicationCallback2.getAddress();
-			if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-			applicationCallback3 = new Callback(clazz, "applicationProc", 3);
-			int /*long*/ proc3 = applicationCallback3.getAddress();
-			if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-			applicationCallback6 = new Callback(clazz, "applicationProc", 6);
-			int /*long*/ proc6 = applicationCallback6.getAddress();
-			if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-			cls = OS.objc_allocateClassPair(OS.class_NSApplication, className, 0);
-			OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, proc6, "@:i@@B");
-			OS.class_addMethod(cls, OS.sel_isRunning, proc2, "@:");
-			OS.class_addMethod(cls, OS.sel_finishLaunching, proc2, "@:");
-			OS.objc_registerClassPair(cls);
+		ptr = OS.getenv (ascii ("APP_ICON_" + pid));
+		if (ptr != 0) {
+			NSString path = NSString.stringWithUTF8String (ptr);
+			NSImage image = (NSImage) new NSImage().alloc();
+			image = image.initByReferencingFile(path);
+			dockImage = image;
+			application.setApplicationIconImage(image);
 		}
-		applicationClass = OS.object_setClass(application.id, cls);
+	}
+
+	String className = "SWTApplication";
+	int /*long*/ cls;
+	if ((cls = OS.objc_lookUpClass (className)) == 0) {
+		Class clazz = getClass();
+		applicationCallback2 = new Callback(clazz, "applicationProc", 2);
+		int /*long*/ proc2 = applicationCallback2.getAddress();
+		if (proc2 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		applicationCallback3 = new Callback(clazz, "applicationProc", 3);
+		int /*long*/ proc3 = applicationCallback3.getAddress();
+		if (proc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		applicationCallback4 = new Callback(clazz, "applicationProc", 4);
+		int /*long*/ proc4 = applicationCallback4.getAddress();
+		if (proc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		applicationCallback6 = new Callback(clazz, "applicationProc", 6);
+		int /*long*/ proc6 = applicationCallback6.getAddress();
+		if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		cls = OS.objc_allocateClassPair(OS.object_getClass(application.id), className, 0);
+		OS.class_addMethod(cls, OS.sel_sendEvent_, proc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_, proc6, "@:i@@B");
+		OS.class_addMethod(cls, OS.sel_isRunning, proc2, "@:");
+		OS.class_addMethod(cls, OS.sel_finishLaunching, proc2, "@:");
+		OS.objc_registerClassPair(cls);
+	}
+	applicationClass = OS.object_setClass(application.id, cls);
 		
-		className = "SWTApplicationDelegate";
-		if (OS.objc_lookUpClass (className) == 0) {
-			int /*long*/ appProc3 = applicationCallback3.getAddress();
-			if (appProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-			cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
-			OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_terminate_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_quitRequested_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_orderFrontStandardAboutPanel_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_hideOtherApplications_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_hide_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_unhideAllApplications_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_applicationDidBecomeActive_, appProc3, "@:@");
-			OS.class_addMethod(cls, OS.sel_applicationDidResignActive_, appProc3, "@:@");
-			OS.objc_registerClassPair(cls);
-		}
+	className = "SWTApplicationDelegate";
+	if (OS.objc_lookUpClass (className) == 0) {
+		int /*long*/ appProc3 = applicationCallback3.getAddress();
+		if (appProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+		int /*long*/ appProc4 = applicationCallback4.getAddress();
+		if (appProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
+		OS.class_addMethod(cls, OS.sel_applicationWillFinishLaunching_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_terminate_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_orderFrontStandardAboutPanel_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_hideOtherApplications_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_hide_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_unhideAllApplications_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_applicationDidBecomeActive_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_applicationDidResignActive_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_applicationDockMenu_, appProc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_application_openFile_, appProc4, "@:@@");
+		OS.class_addMethod(cls, OS.sel_application_openFiles_, appProc4, "@:@@");
+		OS.class_addMethod(cls, OS.sel_applicationShouldHandleReopen_hasVisibleWindows_, appProc4, "@:@B");
+		OS.class_addMethod(cls, OS.sel_applicationShouldTerminate_, appProc4, "@:@B");
+		OS.objc_registerClassPair(cls);
+	}
+	if (!isEmbedded) {
 		if (applicationDelegate == null) {
 			applicationDelegate = (SWTApplicationDelegate)new SWTApplicationDelegate().alloc().init();
 			application.setDelegate(applicationDelegate);
 		}
-	} else {
-		isEmbedded = true;
 	}
+	
+	int[] bufferMode = new int[1], bufferOptions = new int[1];
+	OS.GetSystemUIMode(bufferMode, bufferOptions);
+	systemUIMode = bufferMode[0];
+	systemUIOptions = bufferOptions[0];	
 }
 
 void createMainMenu () {
-	NSString appName = getAppName();
-	NSString emptyStr = NSString.stringWith("");
+	NSString appName = getApplicationName();
+	NSString emptyStr = NSString.string();
 	NSMenu mainMenu = (NSMenu)new NSMenu().alloc();
 	mainMenu.initWithTitle(emptyStr);
 	
@@ -881,7 +950,7 @@ void createMainMenu () {
 	appleMenu.addItem(NSMenuItem.separatorItem());
 	
 	title = new NSString(OS.objc_msgSend(OS.class_NSString, OS.sel_stringWithFormat_, format.id, NSString.stringWith(SWT.getMessage("Quit")).id, appName.id));
-	menuItem = appleMenu.addItemWithTitle(title, OS.sel_quitRequested_, NSString.stringWith("q"));
+	menuItem = appleMenu.addItemWithTitle(title, OS.sel_applicationShouldTerminate_, NSString.stringWith("q"));
 	menuItem.setTarget(applicationDelegate);
 	
 	mainMenu.setSubmenu(appleMenu, appItem);
@@ -988,6 +1057,8 @@ boolean filters (int eventType) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int /*long*/ handle) {
 	checkDevice ();
@@ -1014,6 +1085,8 @@ public Widget findWidget (int /*long*/ handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int /*long*/ handle, int id) {
@@ -1107,13 +1180,14 @@ public Rectangle getBounds () {
 }
 
 Rectangle getBounds (NSArray screens) {
-	NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
+	NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+	NSRect primaryFrame = convertRect(screen, screen.frame());
 	float /*double*/ minX = Float.MAX_VALUE, maxX = Float.MIN_VALUE;
 	float /*double*/ minY = Float.MAX_VALUE, maxY = Float.MIN_VALUE;
 	int /*long*/ count = screens.count();
 	for (int i = 0; i < count; i++) {
-		NSScreen screen = new NSScreen(screens.objectAtIndex(i));
-		NSRect frame = screen.frame();
+		screen = new NSScreen(screens.objectAtIndex(i));
+		NSRect frame = convertRect(screen, screen.frame());
 		float /*double*/ x1 = frame.x, x2 = frame.x + frame.width;
 		float /*double*/ y1 = primaryFrame.height - frame.y, y2 = primaryFrame.height - (frame.y + frame.height);
 		if (x1 < minX) minX = x1;
@@ -1162,8 +1236,8 @@ public Rectangle getClientArea () {
 	NSArray screens = NSScreen.screens();
 	if (screens.count() != 1) return getBounds (screens);
 	NSScreen screen = new NSScreen(screens.objectAtIndex(0));
-	NSRect frame = screen.frame();
-	NSRect visibleFrame = screen.visibleFrame();
+	NSRect frame = convertRect(screen, screen.frame());;
+	NSRect visibleFrame = convertRect(screen, screen.visibleFrame());
 	float /*double*/ y = frame.height - (visibleFrame.y + visibleFrame.height);
 	return new Rectangle((int)visibleFrame.x, (int)y, (int)visibleFrame.width, (int)visibleFrame.height);
 }
@@ -1440,7 +1514,12 @@ public Point [] getIconSizes () {
 
 int getLastEventTime () {
 	NSEvent event = application.currentEvent();
-	return event != null ? (int)(event.timestamp() * 1000) : 0;
+	if (event == null) return 0;
+	double timestamp = event.timestamp() * 1000;
+	while (timestamp > 0x7FFFFFFF) {
+		timestamp -= 0x7FFFFFFF;
+	}
+	return (int)timestamp;
 }
 
 Menu [] getMenus (Decorations shell) {
@@ -1465,6 +1544,10 @@ int getMessageCount () {
 	return synchronizer.getMessageCount ();
 }
 
+Dialog getModalDialog () {
+	return modalDialog;
+}
+
 /**
  * Returns an array of monitors attached to the device.
  * 
@@ -1475,18 +1558,20 @@ int getMessageCount () {
 public Monitor [] getMonitors () {
 	checkDevice ();
 	NSArray screens = NSScreen.screens();
-	NSRect primaryFrame = new NSScreen(screens.objectAtIndex(0)).frame();
+	NSScreen screen = new NSScreen(screens.objectAtIndex(0));
+	NSRect primaryFrame = convertRect(screen, screen.frame());
 	int count = (int)/*64*/screens.count();
 	Monitor [] monitors = new Monitor [count];
 	for (int i=0; i<count; i++) {
 		Monitor monitor = new Monitor ();
-		NSScreen screen = new NSScreen(screens.objectAtIndex(i));
-		NSRect frame = screen.frame();
+		screen = new NSScreen(screens.objectAtIndex(i));
+		NSRect frame = convertRect(screen, screen.frame());
+		monitor.handle = screen.id;
 		monitor.x = (int)frame.x;
 		monitor.y = (int)(primaryFrame.height - (frame.y + frame.height));
 		monitor.width = (int)frame.width;
 		monitor.height = (int)frame.height;
-		NSRect visibleFrame = screen.visibleFrame();
+		NSRect visibleFrame = convertRect(screen, screen.visibleFrame());
 		monitor.clientX = (int)visibleFrame.x;
 		monitor.clientY = (int)(primaryFrame.height - (visibleFrame.y + visibleFrame.height));
 		monitor.clientWidth = (int)visibleFrame.width;
@@ -1513,12 +1598,13 @@ public Monitor getPrimaryMonitor () {
 	Monitor monitor = new Monitor ();
 	NSArray screens = NSScreen.screens();
 	NSScreen screen = new NSScreen(screens.objectAtIndex(0));
-	NSRect frame = screen.frame();
+	NSRect frame = convertRect(screen, screen.frame());
+	monitor.handle = screen.id;
 	monitor.x = (int)frame.x;
 	monitor.y = (int)(frame.height - (frame.y + frame.height));
 	monitor.width = (int)frame.width;
 	monitor.height = (int)frame.height;
-	NSRect visibleFrame = screen.visibleFrame();
+	NSRect visibleFrame = convertRect(screen, screen.visibleFrame());
 	monitor.clientX = (int)visibleFrame.x;
 	monitor.clientY = (int)(frame.height - (visibleFrame.y + visibleFrame.height));
 	monitor.clientWidth = (int)visibleFrame.width;
@@ -1792,6 +1878,25 @@ public Tray getSystemTray () {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	if (taskBar != null) return taskBar;
+	taskBar = new TaskBar (this, SWT.NONE);
+	return taskBar;
+}
+
+/**
  * Returns the user-interface thread for the receiver.
  *
  * @return the receiver's user-interface thread
@@ -1884,6 +1989,15 @@ protected void init () {
 	runLoopObserver = OS.CFRunLoopObserverCreate (0, activities, true, 0, observerProc, 0);
 	if (runLoopObserver == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, OS.kCFRunLoopCommonModes ());
+
+	// Add AWT Runloop mode for SWT/AWT.
+	int /*long*/ cls = OS.objc_lookUpClass("JNFRunLoop"); //$NON-NLS-1$
+	if (cls != 0) {
+		int /*long*/ mode = OS.objc_msgSend(cls, OS.sel_javaRunLoopMode);
+		if (mode != 0) {
+			OS.CFRunLoopAddObserver (OS.CFRunLoopGetCurrent (), runLoopObserver, mode);
+		}
+	}
 	
 	cursorSetCallback = new Callback(this, "cursorSetProc", 2);
 	int /*long*/ cursorSetProc = cursorSetCallback.getAddress();
@@ -1931,6 +2045,7 @@ void addEventMethods (int /*long*/ cls, int /*long*/ proc2, int /*long*/ proc3,
 		OS.class_addMethod(cls, OS.sel_setNeedsDisplay_, proc3, "@:B");
 		OS.class_addMethod(cls, OS.sel_shouldDelayWindowOrderingForEvent_, proc3, "@:@");
 		OS.class_addMethod(cls, OS.sel_acceptsFirstMouse_, proc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_changeColor_, proc3, "@:@");
 	}
 	if (proc2 != 0) {
 		OS.class_addMethod(cls, OS.sel_resignFirstResponder, proc2, "@:");
@@ -1964,7 +2079,10 @@ void addAccessibilityMethods(int /*long*/ cls, int /*long*/ proc2, int /*long*/
 	OS.class_addMethod(cls, OS.sel_accessibilityHitTest_, accessibilityHitTestProc, "@:{NSPoint}");
 	OS.class_addMethod(cls, OS.sel_accessibilityAttributeValue_forParameter_, proc4, "@:@@");	
 	OS.class_addMethod(cls, OS.sel_accessibilityPerformAction_, proc3, "@:@");	
-	OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3, "@:@");	
+	OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_accessibilityIsAttributeSettable_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_accessibilitySetValue_forAttribute_, proc4, "@:@@");
+	OS.class_addMethod(cls, OS.sel_accessibleHandle, proc2, "@:");
 }
 
 int /*long*/ registerCellSubclass(int /*long*/ cellClass, int size, int align, byte[] types) {
@@ -2003,13 +2121,7 @@ void initClasses () {
 	windowCallback6 = new Callback(clazz, "windowProc", 6);
 	int /*long*/ proc6 = windowCallback6.getAddress();
 	if (proc6 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-	fieldEditorCallback3 = new Callback(clazz, "fieldEditorProc", 3);
-	int /*long*/ fieldEditorProc3 = fieldEditorCallback3.getAddress();
-	if (fieldEditorProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-	fieldEditorCallback4 = new Callback(clazz, "fieldEditorProc", 4);
-	int /*long*/ fieldEditorProc4 = fieldEditorCallback4.getAddress();
-	if (fieldEditorProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
-
+	
 	int /*long*/ isFlippedProc = OS.isFlipped_CALLBACK();
 	int /*long*/ drawRectProc = OS.CALLBACK_drawRect_(proc3);
 	int /*long*/ drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
@@ -2031,12 +2143,16 @@ void initClasses () {
 	int /*long*/ firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);	
 	int /*long*/ textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
 	int /*long*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
-	int /*long*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(fieldEditorProc4);
-	int /*long*/ shouldChangeTextInRange_replacementString_fieldEditorProc = shouldChangeTextInRange_replacementString_Proc;
+	int /*long*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(proc4);
 	int /*long*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
 	int /*long*/ canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
 	int /*long*/ setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
 	int /*long*/ expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
+	int /*long*/ sizeOfLabelProc = OS.CALLBACK_sizeOfLabel_ (proc3);
+	int /*long*/ drawLabelInRectProc = OS.CALLBACK_drawLabel_inRect_ (proc4);
+	int /*long*/ drawViewBackgroundInRectProc = OS.CALLBACK_drawViewBackgroundInRect_(proc3);
+	int /*long*/ drawBackgroundInClipRectProc = OS.CALLBACK_drawBackgroundInClipRect_(proc3);
+	int /*long*/ scrollClipView_ToPointProc = OS.CALLBACK_scrollClipView_toPoint_(proc4);
 	
 	byte[] types = {'*','\0'};
 	int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
@@ -2079,7 +2195,7 @@ void initClasses () {
 	cls = OS.objc_allocateClassPair(OS.class_NSView, className, 0);
 	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
 	//NSTextInput protocol
-	OS.class_addProtocol(cls, OS.objc_getProtocol("NSTextInput"));
+	OS.class_addProtocol(cls, OS.protocol_NSTextInput);
 	OS.class_addMethod(cls, OS.sel_hasMarkedText, proc2, "@:");
 	OS.class_addMethod(cls, OS.sel_markedRange, markedRangeProc, "@:");
 	OS.class_addMethod(cls, OS.sel_selectedRange, selectedRangeProc, "@:");
@@ -2097,6 +2213,7 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_acceptsFirstResponder, proc2, "@:");
 	OS.class_addMethod(cls, OS.sel_isOpaque, proc2, "@:");
 	OS.class_addMethod(cls, OS.sel_updateOpenGLContext_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_clearDeferFlushing, proc2, "@:");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2109,6 +2226,8 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_textDidChange_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_comboBoxSelectionDidChange_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_comboBoxWillDismiss_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_comboBoxWillPopUp_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
@@ -2117,6 +2236,7 @@ void initClasses () {
 	
 	cls = registerCellSubclass(NSComboBox.cellClass(), size, align, types);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);	
+	OS.class_addMethod(cls, OS.sel_setObjectValue_, proc3, "@:@");
 	NSComboBox.setCellClass(cls);
 
 	className = "SWTDatePicker";
@@ -2131,11 +2251,11 @@ void initClasses () {
 	
 	className = "SWTEditorView";
 	cls = OS.objc_allocateClassPair(OS.class_NSTextView, className, 0);
-	//TODO hitTestProc and drawRectProc should be set Control.setRegion()? 
-	addEventMethods(cls, 0, fieldEditorProc3, 0, 0, 0);
-	OS.class_addMethod(cls, OS.sel_insertText_, fieldEditorProc3, "@:@");
-	OS.class_addMethod(cls, OS.sel_doCommandBySelector_, fieldEditorProc3, "@::");
-	OS.class_addMethod(cls, OS.sel_shouldChangeTextInRange_replacementString_, shouldChangeTextInRange_replacementString_fieldEditorProc, "@:{NSRange}@");
+	//TODO hitTestProc should be set Control.setRegion()? 
+	addEventMethods(cls, 0, proc3, drawRectProc, 0, 0);
+	OS.class_addMethod(cls, OS.sel_insertText_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_doCommandBySelector_, proc3, "@::");
+	OS.class_addMethod(cls, OS.sel_shouldChangeTextInRange_replacementString_, shouldChangeTextInRange_replacementString_Proc, "@:{NSRange}@");
 	OS.objc_registerClassPair(cls);
 
 	className = "SWTImageView";
@@ -2189,11 +2309,14 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_highlightSelectionInClipRect_, highlightSelectionInClipRectProc, "@:{NSRect}");
 	OS.class_addMethod(cls, OS.sel_sendDoubleSelection, proc2, "@:");
 	OS.class_addMethod(cls, OS.sel_outlineViewSelectionDidChange_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_outlineViewSelectionIsChanging_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_outlineView_child_ofItem_, proc5, "@:@i@");
 	OS.class_addMethod(cls, OS.sel_outlineView_isItemExpandable_, proc4, "@:@@");
 	OS.class_addMethod(cls, OS.sel_outlineView_numberOfChildrenOfItem_, proc4, "@:@@");
 	OS.class_addMethod(cls, OS.sel_outlineView_objectValueForTableColumn_byItem_, proc5, "@:@@@");
 	OS.class_addMethod(cls, OS.sel_outlineView_willDisplayCell_forTableColumn_item_, proc6, "@:@@@@");
+	OS.class_addMethod(cls, OS.sel_outlineView_shouldSelectItem_, proc4, "@:@@");
+	OS.class_addMethod(cls, OS.sel_outlineView_shouldTrackCell_forTableColumn_item_, proc6, "@:@@@i");
 	OS.class_addMethod(cls, OS.sel_outlineView_setObjectValue_forTableColumn_byItem_, proc6, "@:@@@@");
 	OS.class_addMethod(cls, OS.sel_outlineViewColumnDidMove_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_outlineViewColumnDidResize_, proc3, "@:@");
@@ -2202,6 +2325,7 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_outlineView_writeItems_toPasteboard_, proc5, "@:@@@");
 	OS.class_addMethod(cls, OS.sel_expandItem_expandChildren_, proc4, "@:@Z");
 	OS.class_addMethod(cls, OS.sel_collapseItem_collapseChildren_, proc4, "@:@Z");
+	OS.class_addMethod(cls, OS.sel_drawBackgroundInClipRect_, drawBackgroundInClipRectProc, "@:{NSRect}");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2212,6 +2336,7 @@ void initClasses () {
 	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
 	OS.class_addMethod(cls, OS.sel_windowWillClose_, dialogProc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_changeColor_, dialogProc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_setColor_forAttribute_, dialogProc4, "@:@@");
 	OS.class_addMethod(cls, OS.sel_changeFont_, dialogProc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_sendSelection_, dialogProc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_panel_shouldShowFilename_, dialogProc4, "@:@@");
@@ -2222,6 +2347,8 @@ void initClasses () {
 	cls = OS.objc_allocateClassPair(OS.class_NSPopUpButton, className, 0);
 	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
 	OS.class_addMethod(cls, OS.sel_sendSelection, proc2, "@:");
+	OS.class_addMethod(cls, OS.sel_menuWillOpen_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_menuDidClose_, proc3, "@:@");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2258,6 +2385,7 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_pageDown_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_pageUp_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_reflectScrolledClipView_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_scrollClipView_toPoint_, scrollClipView_ToPointProc, "@:@{NSPoint}");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2291,7 +2419,19 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
 	OS.objc_registerClassPair(cls);
-
+	
+	int /*long*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+	if (nsSecureTextViewClass != 0) {
+		className = "SWTSecureEditorView";
+		cls = OS.objc_allocateClassPair(nsSecureTextViewClass, className, 0);
+		//TODO hitTestProc and drawRectProc should be set Control.setRegion()? 
+		addEventMethods(cls, 0, proc3, drawRectProc, 0, 0);
+		OS.class_addMethod(cls, OS.sel_insertText_, proc3, "@:@");
+		OS.class_addMethod(cls, OS.sel_doCommandBySelector_, proc3, "@::");
+		OS.class_addMethod(cls, OS.sel_shouldChangeTextInRange_replacementString_, shouldChangeTextInRange_replacementString_Proc, "@:{NSRange}@");
+		OS.objc_registerClassPair(cls);
+	}
+	
 	className = "SWTSlider";
 	cls = OS.objc_allocateClassPair(OS.class_NSSlider, className, 0);
 	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -2342,14 +2482,18 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_numberOfRowsInTableView_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_tableView_objectValueForTableColumn_row_, proc5, "@:@:@:@");
 	OS.class_addMethod(cls, OS.sel_tableView_shouldEditTableColumn_row_, proc5, "@:@:@:@");
+	OS.class_addMethod(cls, OS.sel_tableViewSelectionIsChanging_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_tableViewSelectionDidChange_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_tableView_willDisplayCell_forTableColumn_row_, proc6, "@:@@@i");
+	OS.class_addMethod(cls, OS.sel_tableView_shouldSelectRow_, proc4, "@:@i");
+	OS.class_addMethod(cls, OS.sel_tableView_shouldTrackCell_forTableColumn_row_, proc6, "@:@@@i");
 	OS.class_addMethod(cls, OS.sel_tableView_setObjectValue_forTableColumn_row_, proc6, "@:@@@i");
 	OS.class_addMethod(cls, OS.sel_tableViewColumnDidMove_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_tableViewColumnDidResize_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_tableView_didClickTableColumn_, proc4, "@:@");
 	OS.class_addMethod(cls, OS.sel_canDragRowsWithIndexes_atPoint_, canDragRowsWithIndexes_atPoint_Proc, "@:@{NSPoint=ff}");
-	OS.class_addMethod(cls, OS.sel_tableView_writeRowsWithIndexes_toPasteboard_, proc5, "@:@@@");	
+	OS.class_addMethod(cls, OS.sel_tableView_writeRowsWithIndexes_toPasteboard_, proc5, "@:@@@");
+	OS.class_addMethod(cls, OS.sel_drawBackgroundInClipRect_, drawBackgroundInClipRectProc, "@:{NSRect}");
 	addEventMethods(cls, proc2, proc3, drawRectProc, hitTestProc, setNeedsDisplayInRectProc);
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
@@ -2364,7 +2508,15 @@ void initClasses () {
 	addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
 	OS.objc_registerClassPair(cls);
-
+	
+	className = "SWTTabViewItem";
+	cls = OS.objc_allocateClassPair(OS.class_NSTabViewItem, className, 0);
+	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
+	OS.class_addMethod(cls, OS.sel_sizeOfLabel_, sizeOfLabelProc, "@::");
+	OS.class_addMethod(cls, OS.sel_drawLabel_inRect_, drawLabelInRectProc, "@::{NSRect}");
+	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+	OS.objc_registerClassPair(cls);
+	
 	className = "SWTTextView";
 	cls = OS.objc_allocateClassPair(OS.class_NSTextView, className, 0);
 	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -2377,6 +2529,8 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_textView_clickedOnLink_atIndex_, proc5, "@:@@@");
 	OS.class_addMethod(cls, OS.sel_dragSelectionWithEvent_offset_slideBack_, proc5, "@:@@@");
 	OS.class_addMethod(cls, OS.sel_shouldChangeTextInRange_replacementString_, shouldChangeTextInRange_replacementString_Proc, "@:{NSRange}@");
+	OS.class_addMethod(cls, OS.sel_drawViewBackgroundInRect_, drawViewBackgroundInRectProc, "@:{NSRect}");
+	OS.class_addMethod(cls, OS.sel_shouldDrawInsertionPoint, proc2, "@:");
 	OS.objc_registerClassPair(cls);
 	
 	className = "SWTTextField";
@@ -2393,6 +2547,7 @@ void initClasses () {
 	OS.objc_registerClassPair(cls);
 	
 	cls = registerCellSubclass(NSTextField.cellClass(), size, align, types);
+	OS.class_addMethod(cls, OS.sel_drawInteriorWithFrame_inView_, drawInteriorWithFrameInViewProc, "@:{NSRect}@");
 	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);	
 	NSTextField.setCellClass(cls);
 
@@ -2437,6 +2592,8 @@ void initClasses () {
 	OS.class_addMethod(cls, OS.sel_windowDidBecomeKey_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_timerProc_, proc3, "@:@");
 	OS.class_addMethod(cls, OS.sel_systemSettingsChanged_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_windowDidMiniaturize_, proc3, "@:@");
+	OS.class_addMethod(cls, OS.sel_windowDidDeminiaturize_, proc3, "@:@");
 	OS.objc_registerClassPair(cls);	
 }
 
@@ -2523,6 +2680,8 @@ void initFonts () {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2564,12 +2723,25 @@ public int /*long*/ internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ context, GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
 	
 }
 
+boolean isBundled () {
+	NSBundle mainBundle = NSBundle.mainBundle();
+	if (mainBundle != null) {
+		NSDictionary info = mainBundle.infoDictionary();
+		if (info != null) {
+			return NSString.stringWith("APPL").isEqual(info.objectForKey(NSString.stringWith("CFBundlePackageType"))); //$NON-NLS-1$ $NON-NLS-2$
+		}
+	}
+	return false;
+}
+
 static boolean isValidClass (Class clazz) {
 	String name = clazz.getName ();
 	int index = name.lastIndexOf ('.');
@@ -2904,10 +3076,15 @@ public Point map (Control from, Control to, int x, int y) {
 			pt = view.convertPoint_toView_(pt, null);
 			pt = fromWindow.convertBaseToScreen(pt);
 			pt.y = primaryFrame.height - pt.y;
+			float /*double*/ scaleFactor = fromWindow.userSpaceScaleFactor();
+			pt.x /= scaleFactor;
+			pt.y /= scaleFactor;
 		}
 		if (to != null) {
 			NSView view = to.eventView ();
-			pt.y = primaryFrame.height - pt.y;
+			float /*double*/ scaleFactor = toWindow.userSpaceScaleFactor();
+			pt.x *= scaleFactor;
+			pt.y = primaryFrame.height - (pt.y * scaleFactor);
 			pt = toWindow.convertScreenToBase(pt);
 			pt = view.convertPoint_fromView_(pt, null);
 			if (!view.isFlipped ()) {
@@ -3029,10 +3206,15 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei
 			pt = view.convertPoint_toView_(pt, null);
 			pt = fromWindow.convertBaseToScreen(pt);
 			pt.y = primaryFrame.height - pt.y;
+			float /*double*/ scaleFactor = fromWindow.userSpaceScaleFactor();
+			pt.x /= scaleFactor;
+			pt.y /= scaleFactor;
 		}
 		if (to != null) {
 			NSView view = to.eventView ();
-			pt.y = primaryFrame.height - pt.y;
+			float /*double*/ scaleFactor = toWindow.userSpaceScaleFactor();
+			pt.x *= scaleFactor;
+			pt.y = primaryFrame.height - (pt.y * scaleFactor);
 			pt = toWindow.convertScreenToBase(pt);
 			pt = view.convertPoint_fromView_(pt, null);
 			if (!view.isFlipped ()) {
@@ -3084,6 +3266,8 @@ public boolean readAndDispatch () {
 	checkDevice ();
 	if (sendEventCount == 0 && loopCount == poolCount - 1 && Callback.getEntryCount () == 0) removePool ();
 	addPool ();
+	runSkin ();
+	runDeferredLayouts ();
 	loopCount++;
 	boolean events = false;
 	try {
@@ -3158,6 +3342,8 @@ protected void release () {
 	}
 	if (tray != null) tray.dispose ();
 	tray = null;
+	if (taskBar != null) taskBar.dispose ();
+	taskBar = null;
 	while (readAndDispatch ()) {}
 	if (disposeList != null) {
 		for (int i=0; i<disposeList.length; i++) {
@@ -3234,9 +3420,11 @@ void releaseDisplay () {
 	if (needsDisplay != null) needsDisplay.release();
 	if (needsDisplayInRect != null) needsDisplayInRect.release();
 	if (isPainting != null) isPainting.release();
-	needsDisplay = needsDisplayInRect = isPainting = null;
+	if (runLoopModes != null) runLoopModes.release();
+	needsDisplay = needsDisplayInRect = isPainting = runLoopModes = null;
 	
 	modalShells = null;
+	modalDialog = null;
 	menuBar = null;
 	menus = null;
 	
@@ -3454,6 +3642,35 @@ boolean runDeferredEvents () {
 	return run;
 }
 
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
+
+NSArray runLoopModes() {
+	if (runLoopModes == null) {
+		runLoopModes = NSMutableArray.arrayWithCapacity(3);
+		runLoopModes.addObject(OS.NSEventTrackingRunLoopMode);
+		runLoopModes.addObject(OS.NSDefaultRunLoopMode);
+		runLoopModes.addObject(OS.NSModalPanelRunLoopMode);
+		runLoopModes.retain();
+	}
+	
+	runLoopModes.retain();
+	runLoopModes.autorelease();
+	return runLoopModes;
+}
+
 boolean runPaint () {
 	if (needsDisplay == null && needsDisplayInRect == null) return false;
 	if (needsDisplay != null) {
@@ -3482,10 +3699,10 @@ boolean runPopups () {
 	while (popups != null) {
 		Menu menu = popups [0];
 		if (menu == null) break;
-		runDeferredEvents ();
 		int length = popups.length;
 		System.arraycopy (popups, 1, popups, 0, --length);
 		popups [length] = null;
+		runDeferredEvents ();
 		if (!menu.isDisposed ()) menu._setVisible (true);
 		result = true;
 	}
@@ -3509,6 +3726,29 @@ boolean runSettings () {
 	return true;
 }
 
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+	
 boolean runTimers () {
 	if (timerList == null) return false;
 	boolean result = false;
@@ -3547,7 +3787,7 @@ void sendEvent (EventTable table, Event event) {
 	}
 }
 
-static NSString getAppName() {
+static NSString getApplicationName() {
 	NSString name = null;
 	int pid = OS.getpid ();
 	int /*long*/ ptr = OS.getenv (ascii ("APP_NAME_" + pid));
@@ -3564,10 +3804,42 @@ static NSString getAppName() {
 }
 
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
@@ -3575,6 +3847,17 @@ public static void setAppName (String name) {
 	APP_NAME = name;
 }
 
+/**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
+}
+
 //TODO use custom timer instead of timerExec
 Runnable hoverTimer = new Runnable () {
 	public void run () {
@@ -3724,6 +4007,14 @@ public void setData (String key, Object value) {
 		}
 	}
 	
+	if (key.equals(SET_MODAL_DIALOG)) {
+		if (value == null) {
+			this.modalDialog = null;
+		} else {
+			this.modalDialog = (Dialog) value;
+		}
+	}
+	
 	/* Remove the key/value pair */
 	if (value == null) {
 		if (keys == null) return;
@@ -3807,6 +4098,10 @@ void setMenuBar (Menu menu) {
 	}
 }
 
+void setModalDialog (Dialog modalDialog) {
+	this.modalDialog = modalDialog;
+}
+
 void setModalShell (Shell shell) {
 	if (modalShells == null) modalShells = new Shell [4];
 	int index = 0, length = modalShells.length;
@@ -4013,7 +4308,9 @@ public void timerExec (int milliseconds, Runnable runnable) {
 	}
 	NSNumber userInfo = NSNumber.numberWithInt(index);
 	NSTimer timer = NSTimer.scheduledTimerWithTimeInterval(milliseconds / 1000.0, timerDelegate, OS.sel_timerProc_, userInfo, false);
-	NSRunLoop.currentRunLoop().addTimer(timer, OS.NSEventTrackingRunLoopMode);
+	NSRunLoop runLoop = NSRunLoop.currentRunLoop();
+	runLoop.addTimer(timer, OS.NSModalPanelRunLoopMode);
+	runLoop.addTimer(timer, OS.NSEventTrackingRunLoopMode);
 	timer.retain();
 	if (timer != null) {
 		nsTimers [index] = timer;
@@ -4023,22 +4320,25 @@ public void timerExec (int milliseconds, Runnable runnable) {
 
 int /*long*/ timerProc (int /*long*/ id, int /*long*/ sel, int /*long*/ timerID) {
 	NSTimer timer = new NSTimer (timerID);
-	NSNumber number = new NSNumber(timer.userInfo());
-	int index = number.intValue();
-	if (timerList == null) return 0;
-	if (0 <= index && index < timerList.length) {
-		if (allowTimers) {
-			Runnable runnable = timerList [index];
-			timerList [index] = null;
-			nsTimers [index] = null;
-			if (runnable != null) runnable.run ();
-		} else {
-			nsTimers [index] = null;
-			wakeThread ();
+	try {
+		NSNumber number = new NSNumber(timer.userInfo());
+		int index = number.intValue();
+		if (timerList == null) return 0;
+		if (0 <= index && index < timerList.length) {
+			if (allowTimers) {
+				Runnable runnable = timerList [index];
+				timerList [index] = null;
+				nsTimers [index] = null;
+				if (runnable != null) runnable.run ();
+			} else {
+				nsTimers [index] = null;
+				wakeThread ();
+			}
 		}
+	} finally {
+		timer.invalidate();
+		timer.release();
 	}
-	timer.invalidate();
-	timer.release();
 	return 0;
 }
 
@@ -4067,6 +4367,8 @@ void updateDefaultButton () {
 }
 
 void updateQuitMenu () {
+	// If we did not create the menu bar, don't modify it.
+	if (isEmbedded) return;
 	boolean enabled = true;
 	Shell [] shells = getShells ();
 	int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
@@ -4084,7 +4386,7 @@ void updateQuitMenu () {
 		NSMenu sm = appitem.submenu();
 
 		// Normally this would be sel_terminate_ but we changed it so terminate: doesn't kill the app.
-		int /*long*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_quitRequested_);
+		int /*long*/ quitIndex = sm.indexOfItemWithTarget(applicationDelegate, OS.sel_applicationShouldTerminate_);
 		
 		if (quitIndex != -1) {
 			NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
@@ -4207,7 +4509,9 @@ void applicationSendTrackingEvent (NSEvent nsEvent, Control trackingControl) {
 		case OS.NSOtherMouseUp:
 			checkEnterExit (findControl (true), nsEvent, true);
 			if (trackingControl.isDisposed()) return;
-			trackingControl.sendMouseEvent (nsEvent, SWT.MouseUp, true);
+			Control control = trackingControl;
+			this.trackingControl = null;
+			control.sendMouseEvent (nsEvent, SWT.MouseUp, false);
 			break;
 		case OS.NSLeftMouseDragged:
 		case OS.NSRightMouseDragged:
@@ -4252,7 +4556,7 @@ void applicationSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event
 							if (!application.isActive()) {
 								application.activateIgnoringOtherApps(true);
 							}
-							NSRect rect = window.contentRectForFrameRect(window.frame());
+							NSRect rect = window.contentView().frame();
 							NSPoint pt = window.convertBaseToScreen(nsEvent.locationInWindow());
 							if (OS.NSPointInRect(pt, rect)) beep ();
 						}
@@ -4309,7 +4613,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
 	NSMenu mainmenu = application.mainMenu();
 	NSMenuItem appitem = mainmenu.itemAtIndex(0);
 	if (appitem != null) {
-		NSString name = getAppName();
+		NSString name = getApplicationName();
 		NSString match = NSString.stringWith("%@");
 		appitem.setTitle(name);
 		NSMenu sm = appitem.submenu();
@@ -4324,7 +4628,7 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
 		
 		if (quitIndex != -1) {
 			NSMenuItem quitItem = sm.itemAtIndex(quitIndex);
-			quitItem.setAction(OS.sel_quitRequested_);
+			quitItem.setAction(OS.sel_applicationShouldTerminate_);
 		}
 	}
 }
@@ -4332,7 +4636,12 @@ void applicationWillFinishLaunching (int /*long*/ id, int /*long*/ sel, int /*lo
 static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
 	//TODO optimize getting the display
 	Display display = getCurrent ();
-	if (display == null) return 0;
+	if (display == null) {
+		objc_super super_struct = new objc_super ();
+		super_struct.receiver = id;
+		super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass);
+		return OS.objc_msgSendSuper (super_struct, sel);
+	}
 	if (sel == OS.sel_isRunning) {
 		// #245724: [NSApplication isRunning] must return true to allow the AWT to load correctly.
 		return display.isDisposed() ? 0 : 1;
@@ -4346,7 +4655,12 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel) {
 static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
 	//TODO optimize getting the display
 	Display display = getCurrent ();
-	if (display == null) return 0;
+	if (display == null) {
+		objc_super super_struct = new objc_super ();
+		super_struct.receiver = id;
+		super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass);
+		return OS.objc_msgSendSuper (super_struct, sel, arg0);
+	}
 	NSApplication application = display.application;
 	if (sel == OS.sel_sendEvent_) {
 		display.applicationSendEvent (id, sel, arg0);
@@ -4362,18 +4676,59 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*lon
 		application.hide(application);
 	} else if (sel == OS.sel_unhideAllApplications_) {
 		application.unhideAllApplications(application);
-	} else if (sel == OS.sel_quitRequested_) {
-		if (!display.disposing) {
-			Event event = new Event ();
-			display.sendEvent (SWT.Close, event);
-			if (event.doit) {
-				display.dispose();
-			}
-		}
 	} else if (sel == OS.sel_applicationDidBecomeActive_) {
 		display.applicationDidBecomeActive(id, sel, arg0);
 	} else if (sel == OS.sel_applicationDidResignActive_) {
 		display.applicationDidResignActive(id, sel, arg0);
+	} else if (sel == OS.sel_applicationDockMenu_) {
+		TaskBar taskbar = display.taskBar;
+		if (taskbar != null && taskbar.itemCount != 0) {
+			TaskItem item = taskbar.getItem(null);
+			if (item != null) {
+				Menu menu = item.getMenu();
+				if (menu != null && !menu.isDisposed()) {
+					return menu.nsMenu.id;
+				}
+			}
+		}
+	}
+	return 0;
+}
+
+static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+	Display display = getCurrent();
+	if (display != null) {
+		if (sel == OS.sel_application_openFile_) {
+			String file = new NSString(arg1).getString();
+			Event event = new Event();
+			event.text = file;
+			display.sendEvent(SWT.OpenDocument, event);
+			return 1;
+		} else if (sel == OS.sel_application_openFiles_) {
+			NSArray files = new NSArray(arg1);
+			int /*long*/ count = files.count();
+			for (int i=0; i<count; i++) {
+				String file = new NSString(files.objectAtIndex(i)).getString();
+				Event event = new Event();
+				event.text = file;
+				display.sendEvent(SWT.OpenDocument, event);
+			}
+			new NSApplication(arg0).replyToOpenOrPrint(OS.NSApplicationDelegateReplySuccess);
+		} 
+		else if (sel == OS.sel_applicationShouldHandleReopen_hasVisibleWindows_) {
+			return 1;
+		}
+		else if (sel == OS.sel_applicationShouldTerminate_) {
+			if (!display.disposing) {
+				Event event = new Event ();
+				display.sendEvent (SWT.Close, event);
+				if (event.doit) {
+					display.dispose();
+					return OS.NSTerminateNow;
+				}
+			}
+			return OS.NSTerminateCancel;
+		}
 	}
 	return 0;
 }
@@ -4381,7 +4736,12 @@ static int /*long*/ applicationProc(int /*long*/ id, int /*long*/ sel, int /*lon
 static int /*long*/ applicationProc(int /*long*/ id, int /*long*/sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
 	//TODO optimize getting the display
 	Display display = getCurrent ();
-	if (display == null) return 0;
+	if (display == null) {
+		objc_super super_struct = new objc_super ();
+		super_struct.receiver = id;
+		super_struct.super_class = OS.objc_msgSend (id, OS.sel_superclass);
+		return OS.objc_msgSendSuper (super_struct, sel, arg0, arg1, arg2, arg3 != 0);
+	}
 	if (sel == OS.sel_nextEventMatchingMask_untilDate_inMode_dequeue_) {
 		return display.applicationNextEventMatchingMask(id, sel, arg0, arg1, arg2, arg3);
 	}
@@ -4424,6 +4784,12 @@ static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		if (dialog == null) return 0;
 		return dialog.panel_shouldShowFilename(id, sel, arg0, arg1);
 	}
+	if (sel == OS.sel_setColor_forAttribute_) {
+		FontDialog dialog = (FontDialog)OS.JNIGetObject(jniRef[0]);
+		if (dialog == null) return 0;
+		dialog.setColor_forAttribute(id, sel, arg0, arg1);
+		return 0;
+	}
 	return 0;
 }
 
@@ -4439,69 +4805,17 @@ static int /*long*/ dialogProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 	return 0;
 }
 
-static int /*long*/ fieldEditorProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-	Widget widget = null;
-	NSView view = new NSView (id);
-	do {
-		widget = GetWidget (view.id);
-		if (widget != null) break;
-		view = view.superview ();
-	} while (view != null);
-	if (widget == null) return 0;
-	if (sel == OS.sel_keyDown_) {
-		widget.keyDown (id, sel, arg0);
-	} else if (sel == OS.sel_keyUp_) {
-		widget.keyUp (id, sel, arg0);
-	} else if (sel == OS.sel_flagsChanged_) {
-		widget.flagsChanged(id, sel, arg0);
-	} else if (sel == OS.sel_insertText_) {
-		return widget.insertText (id, sel, arg0) ? 1 : 0;
-	} else if (sel == OS.sel_doCommandBySelector_) {
-		widget.doCommandBySelector (id, sel, arg0);
-	} else if (sel == OS.sel_menuForEvent_) {
-		return widget.menuForEvent (id, sel, arg0);
-	} else if (sel == OS.sel_mouseDown_) {
-		widget.mouseDown(id, sel, arg0);
-	} else if (sel == OS.sel_mouseUp_) {
-		widget.mouseUp(id, sel, arg0);
-	} else if (sel == OS.sel_mouseMoved_) {
-		widget.mouseMoved(id, sel, arg0);
-	} else if (sel == OS.sel_mouseDragged_) {
-		widget.mouseDragged(id, sel, arg0);
-	} else if (sel == OS.sel_mouseEntered_) {
-		widget.mouseEntered(id, sel, arg0);
-	} else if (sel == OS.sel_mouseExited_) {
-		widget.mouseExited(id, sel, arg0);
-	} else if (sel == OS.sel_cursorUpdate_) {
-		widget.cursorUpdate(id, sel, arg0);
-	} else if (sel == OS.sel_rightMouseDown_) {
-		widget.rightMouseDown(id, sel, arg0);
-	} else if (sel == OS.sel_rightMouseDragged_) {
-		widget.rightMouseDragged(id, sel, arg0);
-	} else if (sel == OS.sel_rightMouseUp_) {
-		widget.rightMouseUp(id, sel, arg0);
-	} else if (sel == OS.sel_otherMouseDown_) {
-		widget.otherMouseDown(id, sel, arg0);
-	} else if (sel == OS.sel_otherMouseUp_) {
-		widget.otherMouseUp(id, sel, arg0);
-	} else if (sel == OS.sel_otherMouseDragged_) {
-		widget.otherMouseDragged(id, sel, arg0);
-	}
-	return 0;
-}
-
-static int /*long*/ fieldEditorProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
-	Widget widget = null;
-	NSView view = new NSView (id);
-	do {
-		widget = GetWidget (view.id);
-		if (widget != null) break;
-		view = view.superview ();
-	} while (view != null);
-	if (sel == OS.sel_shouldChangeTextInRange_replacementString_) {
-		return widget.shouldChangeTextInRange_replacementString(id, sel, arg0, arg1) ? 1 : 0;
+static Widget LookupWidget (int /*long*/ id, int /*long*/ sel) {
+	Widget widget = GetWidget(id);
+	if (widget == null) {
+		NSView view = new NSView (id);
+		if (view.isKindOfClass(OS.class_NSView)) {
+			while (widget == null && (view = view.superview ()) != null) {
+				widget = GetWidget (view.id);
+			}
+		}
 	}
-	return 0;
+	return widget;
 }
 
 static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
@@ -4519,7 +4833,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
 			return 1;
 		}
 	}
-	Widget widget = GetWidget(id);
+	Widget widget = LookupWidget(id, sel);
 	if (widget == null) return 0;
 	if (sel == OS.sel_sendSelection) {
 		widget.sendSelection();
@@ -4593,6 +4907,12 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel) {
 		widget.viewDidMoveToWindow(id, sel);
 	} else if (sel == OS.sel_image) {
 		return widget.image(id, sel);
+	} else if (sel == OS.sel_shouldDrawInsertionPoint) {
+		return widget.shouldDrawInsertionPoint(id, sel) ? 1 : 0;
+	} else if (sel == OS.sel_accessibleHandle) {
+		return widget.accessibleHandle();
+	} else if (sel == OS.sel_clearDeferFlushing) {
+		widget.clearDeferFlushing(id, sel);
 	}
 	return 0;
 }
@@ -4612,6 +4932,16 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 			return 0;
 		}
 	}
+	if (sel == OS.sel_changeColor_) {
+		NSColorPanel panel = NSColorPanel.sharedColorPanel();
+		id delegate = panel.delegate();
+		if (delegate != null) {
+			if (OS.objc_msgSend_bool(delegate.id, OS.sel_isKindOfClass_, OS.objc_getClass("SWTPanelDelegate"))) {
+				OS.objc_msgSend(delegate.id, OS.sel_changeColor_, arg0);
+			}
+		}
+		return 0;
+	}
 	if (sel == OS.sel_timerProc_) {
 		//TODO optimize getting the display
 		Display display = getCurrent ();
@@ -4625,7 +4955,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		display.runSettings = true;
 		return 0;
 	}
-	Widget widget = GetWidget(id);
+	Widget widget = LookupWidget(id, sel);
 	if (widget == null) return 0;
 	if (sel == OS.sel_windowWillClose_) {
 		widget.windowWillClose(id, sel, arg0);
@@ -4693,6 +5023,8 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		return widget.numberOfRowsInTableView(id, sel, arg0);
 	} else if (sel == OS.sel_tableViewSelectionDidChange_) {
 		widget.tableViewSelectionDidChange(id, sel, arg0);
+	} else if (sel == OS.sel_tableViewSelectionIsChanging_) {
+		widget.tableViewSelectionIsChanging(id, sel, arg0);
 	} else if (sel == OS.sel_windowDidResignKey_) {
 		widget.windowDidResignKey(id, sel, arg0);
 	} else if (sel == OS.sel_windowDidBecomeKey_) {
@@ -4709,6 +5041,8 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		widget.menuNeedsUpdate(id, sel, arg0);
 	} else if (sel == OS.sel_outlineViewSelectionDidChange_) {
 		widget.outlineViewSelectionDidChange(id, sel, arg0);
+	} else if (sel == OS.sel_outlineViewSelectionIsChanging_) {
+		widget.outlineViewSelectionIsChanging(id, sel, arg0);
 	} else if (sel == OS.sel_sendEvent_) {
 		widget.windowSendEvent(id, sel, arg0);
 	} else if (sel == OS.sel_helpRequested_) {
@@ -4752,7 +5086,9 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 	} else if (sel == OS.sel_accessibilityPerformAction_) {
 		widget.accessibilityPerformAction(id, sel, arg0);
 	} else if (sel == OS.sel_accessibilityActionDescription_) {
-		widget.accessibilityActionDescription(id, sel, arg0);
+		return widget.accessibilityActionDescription(id, sel, arg0);
+	} else if (sel == OS.sel_accessibilityIsAttributeSettable_) {
+		return widget.accessibilityIsAttributeSettable(id, sel, arg0) ? 1 : 0;
 	} else if (sel == OS.sel_makeFirstResponder_) {
 		return widget.makeFirstResponder(id, sel, arg0) ? 1 : 0;
 	} else if (sel == OS.sel_tableViewColumnDidMove_) {
@@ -4789,14 +5125,36 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		widget.setObjectValue(id, sel, arg0);
 	} else if (sel == OS.sel_updateOpenGLContext_) {
 		widget.updateOpenGLContext(id, sel, arg0);
+	} else if (sel == OS.sel_sizeOfLabel_) {
+		NSSize size = widget.sizeOfLabel(id, sel, arg0 != 0);
+		/* NOTE that this is freed in C */
+		int /*long*/ result = OS.malloc(NSSize.sizeof);
+		OS.memmove(result, size, NSSize.sizeof);
+		return result;
 	} else if (sel == OS.sel_comboBoxSelectionDidChange_) {
 		widget.comboBoxSelectionDidChange(id, sel, arg0);
+	} else if (sel == OS.sel_comboBoxWillDismiss_) {
+		widget.comboBoxWillDismiss(id, sel, arg0);
+	} else if (sel == OS.sel_comboBoxWillPopUp_) {
+		widget.comboBoxWillPopUp(id, sel, arg0);
+	} else if (sel == OS.sel_drawViewBackgroundInRect_) {
+		NSRect rect = new NSRect();
+		OS.memmove(rect, arg0, NSRect.sizeof);
+		widget.drawViewBackgroundInRect(id, sel, rect);
+	} else if (sel == OS.sel_drawBackgroundInClipRect_) {
+		NSRect rect = new NSRect();
+		OS.memmove(rect, arg0, NSRect.sizeof);
+		widget.drawBackgroundInClipRect(id, sel, rect);
+	} else if (sel == OS.sel_windowDidMiniaturize_) {
+		widget.windowDidMiniturize(id, sel, arg0);
+	} else if (sel == OS.sel_windowDidDeminiaturize_) {
+		widget.windowDidDeminiturize(id, sel, arg0);
 	}
 	return 0;
 }
 
 static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
-	Widget widget = GetWidget(id);
+	Widget widget = LookupWidget(id, sel);
 	if (widget == null) return 0;
 	if (sel == OS.sel_tabView_willSelectTabViewItem_) {
 		widget.tabView_willSelectTabViewItem(id, sel, arg0, arg1);
@@ -4822,8 +5180,12 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		return widget.accessibilityAttributeValue_forParameter(id, sel, arg0, arg1);
 	} else if (sel == OS.sel_tableView_didClickTableColumn_) {
 		widget.tableView_didClickTableColumn (id, sel, arg0, arg1);
+	} else if (sel == OS.sel_tableView_shouldSelectRow_) {
+		return (widget.tableView_shouldSelectRow(id, sel, arg0, arg1) ? 1 : 0);
 	} else if (sel == OS.sel_outlineView_didClickTableColumn_) {
 		widget.outlineView_didClickTableColumn (id, sel, arg0, arg1);
+	} else if (sel == OS.sel_outlineView_shouldSelectItem_) {
+		return (widget.outlineView_shouldSelectItem(id, sel, arg0, arg1) ? 1 : 0);
 	} else if (sel == OS.sel_shouldChangeTextInRange_replacementString_) {
 		return widget.shouldChangeTextInRange_replacementString(id, sel, arg0, arg1) ? 1 : 0;
 	} else if (sel == OS.sel_canDragRowsWithIndexes_atPoint_) {
@@ -4840,12 +5202,22 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		int /*long*/ result = OS.malloc (NSRect.sizeof);
 		OS.memmove (result, rect, NSRect.sizeof);
 		return result;
+	} else if (sel == OS.sel_drawLabel_inRect_) {
+		NSRect rect = new NSRect();
+		OS.memmove(rect, arg1, NSRect.sizeof);
+		widget.drawLabelInRect(id, sel, arg0==1, rect);
+	} else if (sel == OS.sel_scrollClipView_toPoint_) {
+		NSPoint point = new NSPoint();
+		OS.memmove(point, arg1, NSPoint.sizeof);
+		widget.scrollClipViewToPoint (id, sel, arg0, point);
+	} else if (sel == OS.sel_accessibilitySetValue_forAttribute_) {
+		widget.accessibilitySetValue_forAttribute(id, sel, arg0, arg1);
 	}
 	return 0;
 }
 
 static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
-	Widget widget = GetWidget(id);
+	Widget widget = LookupWidget(id, sel);
 	if (widget == null) return 0;
 	if (sel == OS.sel_tableView_objectValueForTableColumn_row_) {
 		return widget.tableView_objectValueForTableColumn_row(id, sel, arg0, arg1, arg2);
@@ -4884,7 +5256,7 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 }
 
 static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
-	Widget widget = GetWidget(id);
+	Widget widget = LookupWidget(id, sel);
 	if (widget == null) return 0;
 	if (sel == OS.sel_tableView_willDisplayCell_forTableColumn_row_) {
 		widget.tableView_willDisplayCell_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3);
@@ -4896,6 +5268,10 @@ static int /*long*/ windowProc(int /*long*/ id, int /*long*/ sel, int /*long*/ a
 		widget.tableView_setObjectValue_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3);
 	} else if (sel == OS.sel_view_stringForToolTip_point_userData_) {
 		return widget.view_stringForToolTip_point_userData(id, sel, arg0, arg1, arg2, arg3);
+	} else if (sel == OS.sel_tableView_shouldTrackCell_forTableColumn_row_) {
+		return (widget.tableView_shouldTrackCell_forTableColumn_row(id, sel, arg0, arg1, arg2, arg3) ? 1 : 0);
+	} else if (sel == OS.sel_outlineView_shouldTrackCell_forTableColumn_item_) {
+		return (widget.outlineView_shouldTrackCell_forTableColumn_item(id, sel, arg0, arg1, arg2, arg3) ? 1 : 0);
 	}
 	return 0;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java
index e3fb202..870bcec 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FileDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -242,7 +242,7 @@ public String open () {
 				str = filterNames [i];
 			}
 			NSMenuItem nsItem = (NSMenuItem)new NSMenuItem().alloc();
-			nsItem.initWithTitle(NSString.stringWith(str), 0, NSString.stringWith(""));
+			nsItem.initWithTitle(NSString.stringWith(str), 0, NSString.string());
 			menu.addItem(nsItem);
 			nsItem.release();
 		}
@@ -254,22 +254,52 @@ public String open () {
 	panel.setTitle(NSString.stringWith(title != null ? title : ""));
 	NSApplication application = NSApplication.sharedApplication();
 	if (parent != null && (style & SWT.SHEET) != 0) {
-		application.beginSheet(panel, parent.window, null, 0, 0);
+		application.beginSheet(panel, parent.view.window (), null, 0, 0);
 	}
-	NSString dir = filterPath != null ? NSString.stringWith(filterPath) : null;
-	NSString file = fileName != null ? NSString.stringWith(fileName) : null;
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
+	display.setModalDialog(this);
+	NSString dir = (filterPath != null && filterPath.length() > 0) ? NSString.stringWith(filterPath) : null;
+	NSString file = (fileName != null && fileName.length() > 0) ? NSString.stringWith(fileName) : null;
 	int /*long*/ response = panel.runModalForDirectory(dir, file);
 	if (parent != null && (style & SWT.SHEET) != 0) {
 		application.endSheet(panel, 0);
 	}
+	display.setModalDialog(null);
 	if (!overwrite) {
 		if (method != 0) OS.method_setImplementation(method, methodImpl);
 		if (callback != null) callback.dispose();
 	}
+	if (popup != null) {
+		filterIndex = (int)/*64*/popup.indexOfSelectedItem();
+	} else {
+		filterIndex = -1;
+	}
 	if (response == OS.NSFileHandlingPanelOKButton) {
 		NSString filename = panel.filename();
-		fullPath = filename.getString();
-		if ((style & SWT.SAVE) == 0) {
+		if ((style & SWT.SAVE) != 0) {
+			if (filterExtensions != null && filterExtensions.length != 0) {
+				if (0 <= filterIndex && filterIndex < filterExtensions.length) {
+					/* Append extension if not present */
+					NSString ext = filename.pathExtension();
+					if (ext == null || ext.length() == 0) {
+						String exts = filterExtensions [filterIndex];
+						int length = exts.length ();
+						int index = exts.indexOf (EXTENSION_SEPARATOR);
+						if (index == -1) index = length;
+						String filter = exts.substring (0, index).trim ();
+						if (!filter.equals ("*") && !filter.equals ("*.*")) {
+							if (filter.startsWith ("*.")) filter = filter.substring (2);
+							filename = filename.stringByAppendingPathExtension(NSString.stringWith(filter));
+						}	
+					}
+				}
+			}
+			fullPath = filename.getString();
+			fileNames = new String [1];
+			fileName = fileNames [0] = filename.lastPathComponent().getString();
+			filterPath = filename.stringByDeletingLastPathComponent().getString();
+		} else {
+			fullPath = filename.getString();
 			NSArray filenames = ((NSOpenPanel)panel).filenames();
 			int count = (int)/*64*/filenames.count();
 			fileNames = new String[count];
@@ -294,10 +324,8 @@ public String open () {
 				}
 			}
 		}
-		filterIndex = -1;
 	}
 	if (popup != null) {
-		filterIndex = (int)/*64*/popup.indexOfSelectedItem();
 		panel.setAccessoryView(null);
 		popup.release();
 		popup = null;
@@ -328,21 +356,18 @@ int /*long*/ panel_shouldShowFilename (int /*long*/ id, int /*long*/ sel, int /*
 			if (isDirectory[0] != 0) {
 				return 1;
 			} else {
-				NSString ext = path.pathExtension();
-				if (ext != null) {
-					int filterIndex = (int)/*64*/popup.indexOfSelectedItem();
-					String extension = ext.getString();
-					String extensions = filterExtensions [filterIndex];
-					int start = 0, length = extensions.length ();
-					while (start < length) {
-						int index = extensions.indexOf (EXTENSION_SEPARATOR, start);
-						if (index == -1) index = length;
-						String filter = extensions.substring (start, index).trim ();
-						if (filter.equals ("*") || filter.equals ("*.*")) return 1;
-						if (filter.startsWith ("*.")) filter = filter.substring (2);
-						if (filter.toLowerCase ().equals(extension.toLowerCase ())) return 1;
-						start = index + 1;
-					}
+				String fileName = path.lastPathComponent().getString();
+				int filterIndex = (int)/*64*/popup.indexOfSelectedItem();
+				String extensions = filterExtensions [filterIndex];
+				int start = 0, length = extensions.length ();
+				while (start < length) {
+					int index = extensions.indexOf (EXTENSION_SEPARATOR, start);
+					if (index == -1) index = length;
+					String filter = extensions.substring (start, index).trim ();
+					if (filter.equals ("*") || filter.equals ("*.*")) return 1;
+					if (filter.startsWith ("*.")) filter = filter.substring (2);
+					if ((fileName.toLowerCase ()).endsWith("." + filter.toLowerCase ())) return 1;
+					start = index + 1;
 				}
 				return 0;
 			}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java
index df410af..e4c5241 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/FontDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -155,7 +155,9 @@ public FontData open () {
 	fontData = null;
 	selected = false;
 	panel.orderFront(null);
+	display.setModalDialog(this);
 	NSApplication.sharedApplication().runModalForWindow(panel);
+	display.setModalDialog(null);
 	if (selected) {
 		NSFont nsFont = panel.panelConvertFont(font.handle);
 		if (nsFont != null) {
@@ -169,6 +171,18 @@ public FontData open () {
 	return fontData;
 }
 
+void setColor_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ colorArg, int /*long*/ attribute) {
+	if (attribute != 0 && NSString.stringWith("NSColor").isEqualToString(new NSString(attribute))) { //$NON-NLS-1$
+		if (colorArg != 0) {
+			NSColor color = new NSColor(colorArg);
+			color = color.colorUsingColorSpaceName(OS.NSCalibratedRGBColorSpace);
+			rgb = new RGB((int)(color.redComponent() * 255), (int)(color.greenComponent() * 255), (int)(color.blueComponent() * 255));
+		} else {
+			rgb = null;
+		}
+	}
+}
+
 /**
  * Sets a FontData object describing the font to be
  * selected by default in the dialog, or null to let
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
index e5b1dc2..b457465 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java	
@@ -42,6 +42,7 @@ import org.eclipse.swt.internal.cocoa.*;
 public class Group extends Composite {
 	NSView contentView;
 	String text = "";
+	boolean ignoreResize;
 	
 /**
  * Constructs a new instance of this class given its parent
@@ -98,11 +99,19 @@ protected void checkSubclass () {
 public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget ();
 	NSBox widget = (NSBox)view;
-	int border = (int)Math.ceil (widget.borderWidth ());
-	NSSize margins = widget.contentViewMargins();
-	NSRect frame = contentView.frame();
-	width += (margins.width + border) * 2;
-	height += (margins.height + border) * 2 + frame.y;
+	NSRect newRect = new NSRect();
+	newRect.width = width;
+	newRect.height = height;
+	NSRect oldRect = widget.frame();
+	ignoreResize = true;
+	widget.setFrameFromContentFrame(newRect);
+	newRect = widget.frame();
+	widget.setFrame(oldRect);
+	ignoreResize = false;
+	x = (int) Math.ceil(newRect.x);
+	y = (int) Math.ceil(newRect.y);
+	width = (int) Math.ceil(newRect.width);
+	height = (int) Math.ceil(newRect.height);
 	return super.computeTrim(x, y, width, height);
 }
 
@@ -169,6 +178,9 @@ public String getText () {
 	checkWidget ();
 	return text;
 }
+boolean isTransparent() {
+	return true;
+}
 
 float getThemeAlpha () {
 	return (background != null ? 1 : 0.25f) * parent.getThemeAlpha ();
@@ -187,6 +199,10 @@ void releaseHandle () {
 	contentView = null;
 }
 
+void resized() {
+	if (!ignoreResize) super.resized();
+}
+
 void setFont(NSFont font) {
 	((NSBox) view).setTitleFont(font);
 }
@@ -202,6 +218,12 @@ void setForeground (float /*double*/ [] color) {
 	cell.setTextColor (nsColor);
 }
 
+void setOrientation () {
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+	NSTextFieldCell cell = new NSTextFieldCell (((NSBox)view).titleCell ().id);
+	cell.setBaseWritingDirection(direction);
+}
+
 /**
  * Sets the receiver's text, which is the string that will
  * be displayed as the receiver's <em>title</em>, to the argument,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
index f6c09b0..44165a7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java	
@@ -94,8 +94,10 @@ int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, in
 	int start = (int)/*64*/range.location;
 	int end = (int)/*64*/(range.location + range.length);
 	if (event.start <= start && start <= event.end && event.start <= end && end <= event.end) {
-		NSString str = NSString.stringWith (event.text.substring(start - event.start, end - event.start));
+		NSString str = (NSString) new NSString().alloc();
+		str = str.initWithString(event.text.substring(start - event.start, end - event.start));
 		NSAttributedString attriStr = ((NSAttributedString)new NSAttributedString().alloc()).initWithString(str, null);
+		str.release();
 		attriStr.autorelease ();
 		return attriStr.id;
 	}
@@ -339,7 +341,7 @@ boolean hasMarkedText (int /*long*/ id, int /*long*/ sel) {
 boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
 	if (startOffset == -1) return true;
 	NSString str = new NSString (string);
-	if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+	if (str.isKindOfClass (OS.class_NSAttributedString)) {
 		str = new NSAttributedString (string).string ();
 	}
 	int length = (int)/*64*/str.length ();
@@ -444,7 +446,7 @@ boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*lo
 		end = event.end;
 	}
 	NSString str = new NSString (string);
-	if (str.isKindOfClass (OS.objc_getClass ("NSAttributedString"))) {
+	if (str.isKindOfClass (OS.class_NSAttributedString)) {
 		NSAttributedString attribStr = new NSAttributedString (string);
 		str = attribStr.string ();
 		int length = (int)/*64*/str.length ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
index b541921..c98066a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.swt.widgets;
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
 
@@ -54,6 +53,7 @@ public class Label extends Control {
 	boolean isImage;
 	NSTextField textView;
 	NSImageView imageView;
+	NSView separator;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -96,42 +96,8 @@ public Label (Composite parent, int style) {
 	super (parent, checkStyle (style));
 }
 
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
-	if (accessible != null) {		
-		if ((textView != null && (id == textView.id || id == textView.cell().id)) || (imageView != null && (id == imageView.id || id == imageView.cell().id))) {
-			// See if the accessible will override or augment the standard list.
-			// Help, title, and description can be overridden.
-			NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
-			extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
-
-			for (int i = (int)/*64*/extraAttributes.count() - 1; i >= 0; i--) {
-				NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
-				if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) == null) {
-					extraAttributes.removeObjectAtIndex(i);
-				}
-			}
-
-			if (extraAttributes.count() > 0) {
-				int /*long*/ superResult = super.accessibilityAttributeNames(id, sel);
-				NSArray baseAttributes = new NSArray(superResult);
-				NSMutableArray mutableAttributes = NSMutableArray.arrayWithCapacity(baseAttributes.count() + 1);
-				mutableAttributes.addObjectsFromArray(baseAttributes);
-				
-				for (int i = 0; i < extraAttributes.count(); i++) {
-					id currAttribute = extraAttributes.objectAtIndex(i);
-					if (!mutableAttributes.containsObject(currAttribute)) {
-						mutableAttributes.addObject(currAttribute);
-					}
-				}
-				
-				return mutableAttributes.id;
-			}
-		}
-	}
-
-	return super.accessibilityAttributeNames(id, sel);
+int /*long*/ accessibleHandle() {
+	return eventView().id;	
 }
 
 boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
@@ -212,14 +178,53 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 void createHandle () {
 	state |= THEME_BACKGROUND;
 	NSBox widget = (NSBox)new SWTBox().alloc();
-	widget.init();
-	widget.setTitle(NSString.stringWith(""));
 	if ((style & SWT.SEPARATOR) != 0) {
-		widget.setBoxType(OS.NSBoxSeparator);
-		NSView child = (NSView) new SWTView().alloc().init();
-		widget.setContentView(child);
+		/*
+		 * Feature in Cocoa: Separator control decides how to orient itself
+		 * based on the width and height. If height > width it orients
+		 * vertically, else it orients horizontally. 
+		 * Fix is to have two native controls to implement the separator label.
+		 * The top control (Custom NSBox) honors the bounds set by the
+		 * user and the inner one (Separator NSBox) creates the separator
+		 * with the correct orientation.
+		 */
+		NSRect rect = new NSRect();
+		rect.width = DEFAULT_WIDTH;
+		rect.height = DEFAULT_HEIGHT;
+		
+		widget.initWithFrame(rect);
+		widget.setTitle(NSString.string());
+		widget.setBorderType(OS.NSNoBorder);
+		widget.setBoxType (OS.NSBoxCustom);
+		widget.setContentViewMargins (new NSSize());
+
+		float /*double*/ lineWidth = widget.borderWidth ();
+		if ((style & SWT.HORIZONTAL) != 0) {
+			rect.height = (int)Math.ceil (lineWidth * 2);
+			rect.y = (DEFAULT_HEIGHT / 2) - (rect.height / 2);
+		} else {
+			rect.width = (int)Math.ceil (lineWidth * 2);
+			rect.x = (DEFAULT_WIDTH / 2) - (rect.width / 2);
+		}
+		
+		NSBox separator = (NSBox) new SWTBox().alloc();
+		separator.initWithFrame(rect);
+		separator.setBoxType(OS.NSBoxSeparator);
+		if ((style & SWT.HORIZONTAL) != 0) {
+			separator.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewMinYMargin | OS.NSViewMaxYMargin);
+		} else {
+			separator.setAutoresizingMask(OS.NSViewHeightSizable| OS.NSViewMinXMargin | OS.NSViewMaxXMargin);
+		}
+		
+		NSView child = (NSView) new NSView().alloc().init();
+		separator.setContentView(child);
 		child.release();
-	} else {
+		
+		widget.addSubview(separator);
+		this.separator = separator;
+	} else {	
+		widget.init();
+		widget.setTitle(NSString.string());
 		widget.setBorderType(OS.NSNoBorder);
 		widget.setBorderWidth (0);
 		widget.setBoxType (OS.NSBoxCustom);
@@ -274,6 +279,16 @@ void deregister () {
 		display.removeWidget (imageView);
 		display.removeWidget (imageView.cell());
 	}
+	if (separator != null) display.removeWidget(separator);
+}
+
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+	if (id != view.id) return;
+	fillBackground(view, context, rect, -1);
+}
+
+boolean drawsBackground() {
+	return background != null || backgroundImage != null;
 }
 
 NSView eventView () {
@@ -354,14 +369,17 @@ void register () {
 		display.addWidget (imageView, this);
 		display.addWidget (imageView.cell(), this);
 	}
+	if (separator != null) display.addWidget(separator, this);
 }
 
 void releaseHandle () {
 	super.releaseHandle ();
 	if (textView != null) textView.release();
 	if (imageView != null) imageView.release();
+	if (separator != null) separator.release();
 	textView = null;
 	imageView = null;
+	separator = null;
 }
 
 /*
@@ -395,19 +413,6 @@ public void setAlignment (int alignment) {
 	_setAlignment();
 }
 
-void updateBackground () {
-	if ((style & SWT.SEPARATOR) != 0) return;
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		nsColor = NSColor.clearColor();
-	}
-	((NSBox)view).setFillColor(nsColor);
-}
-
 void _setAlignment() {
 	if (image != null) {
 		if ((style & SWT.RIGHT) != 0) imageView.setImageAlignment(OS.NSImageAlignRight);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
index 31f3cdc..6f46287 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java	
@@ -10,11 +10,10 @@
  *******************************************************************************/
 package org.eclipse.swt.widgets;
 
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * Instances of this class represent a selectable
@@ -42,10 +41,10 @@ public class Link extends Control {
 	NSScrollView scrollView;
 	String text;
 	Point [] offsets;
-	Point selection;
 	String [] ids;
 	int [] mnemonics;
 	NSColor linkColor;
+	int focusIndex;
 	
 /**
  * Constructs a new instance of this class given its parent
@@ -114,7 +113,14 @@ boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*lo
 	NSString str = new NSString (link);
 	Event event = new Event ();
 	event.text = str.getString();
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
+	for (int i = 0; i < offsets.length; i++) {
+		if ((charIndex >= offsets[i].x) && (charIndex <= offsets[i].y)) {
+			focusIndex = i;
+			break;
+		}
+	}
+	redrawWidget(view, false);
 	return true;
 }
 
@@ -122,28 +128,47 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
 	if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
 	if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
-	int width, height;
-	//TODO wrapping, wHint
-	int borderStyle = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder;
-	NSSize borderSize = NSScrollView.frameSizeForContentSize(new NSSize(), false, false, borderStyle);
-	NSTextView widget = (NSTextView)view;
-	NSSize size = widget.textStorage().size();
-	width = (int)(size.width + borderSize.width);
-	height = (int)(size.height + borderSize.height);
+
+	int width = 0, height = 0;
+	NSLayoutManager layoutManager = (NSLayoutManager)new NSLayoutManager ().alloc ().init ();
+	NSTextContainer textContainer = (NSTextContainer)new NSTextContainer ().alloc ();
+	NSSize size = new NSSize ();
+	size.width = size.height = Float.MAX_VALUE;
+	if (wHint != SWT.DEFAULT) size.width = wHint;
+	if (hHint != SWT.DEFAULT) size.height = hHint;
+	textContainer.initWithContainerSize (size);
+	textContainer.setLineFragmentPadding(2);
+	layoutManager.addTextContainer (textContainer);
+
+	NSTextStorage textStorage = (NSTextStorage)new NSTextStorage ().alloc ().init ();
+	textStorage.setAttributedString (((NSTextView)view).textStorage ());
+	layoutManager.setTextStorage (textStorage);
+	layoutManager.glyphRangeForTextContainer (textContainer);
+
+	NSRect rect = layoutManager.usedRectForTextContainer (textContainer);
+	width = layoutManager.numberOfGlyphs () == 0 ? DEFAULT_WIDTH : (int)Math.ceil (rect.width);
+	height = (int)Math.ceil (rect.height);
+	textStorage.release ();
+	textContainer.release ();
+	layoutManager.release ();
+
+	if (width <= 0) width = DEFAULT_WIDTH;
+	if (height <= 0) height = DEFAULT_HEIGHT;
 	if (wHint != SWT.DEFAULT) width = wHint;
 	if (hHint != SWT.DEFAULT) height = hHint;
-	int border = getBorderWidth ();
-	width += border * 2;
-	height += border * 2;
 
-	// TODO is this true?  if so, can this rounding be turned off?
-	/*
-	 * Bug in Cocoa.  NSTextStorage.size() seems to return a width
-	 * value that is rounded down, because its result is never
-	 * fractional.  The workaround is to increment width by 1
-	 * to ensure that it is wide enough to show the full text.  
-	 */
-	width += 1;
+	// Accommodate any border.
+	size.width = width;
+	size.height = height;
+	int border = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder;
+	size = NSScrollView.frameSizeForContentSize(size, false, false, border);
+	width = (int)size.width;
+	height = (int)size.height;
+
+	if (!hasBorder()) {
+		width += 2;
+		height += 2;
+	}
 	return new Point (width, height);
 }
 
@@ -152,15 +177,27 @@ void createHandle () {
 	NSScrollView scrollWidget = (NSScrollView)new SWTScrollView().alloc();
 	scrollWidget.init();
 	scrollWidget.setDrawsBackground(false);
+	scrollWidget.setAutoresizesSubviews (true);
 	scrollWidget.setBorderType(hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder);
 
 	NSTextView widget = (NSTextView)new SWTTextView().alloc();
 	widget.init();
 	widget.setEditable(false);
+	NSSize size = new NSSize ();
+	size.width = size.height = Float.MAX_VALUE;
+	widget.setMaxSize (size);
 	widget.setDrawsBackground(false);
 	widget.setDelegate(widget);
 	widget.setAutoresizingMask (OS.NSViewWidthSizable | OS.NSViewHeightSizable);
-	widget.textContainer().setLineFragmentPadding(0);
+	widget.textContainer().setLineFragmentPadding(2);
+	widget.setFont(getFont().handle);
+	widget.setAlignment (OS.NSLeftTextAlignment);
+
+	NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
+	dict.setDictionary(widget.selectedTextAttributes());
+	dict.removeObjectForKey(OS.NSBackgroundColorAttributeName);
+	dict.setObject(NSCursor.arrowCursor(), OS.NSCursorAttributeName);
+	widget.setSelectedTextAttributes(dict);
 	
 	scrollView = scrollWidget;
 	view = widget;
@@ -171,10 +208,14 @@ void createWidget () {
 	text = "";
 	NSDictionary dict = ((NSTextView)view).linkTextAttributes();
 	linkColor = new NSColor(dict.valueForKey(OS.NSForegroundColorAttributeName));
+	offsets = new Point [0];
+	ids = new String [0];
+	mnemonics = new int [0]; 
+	focusIndex = -1;
 }
 
 NSFont defaultNSFont () {
-	return display.textViewFont;
+	return display.textFieldFont;
 }
 
 void deregister () {
@@ -182,6 +223,28 @@ void deregister () {
 	if (scrollView != null) display.removeWidget (scrollView);
 }
 
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rectangle) {
+	fillBackground (view, context, rectangle, -1);
+	if (!hasFocus() || focusIndex == -1) return;
+	int [] outMetric = new int [1];
+	OS.GetThemeMetric (OS.kThemeMetricFocusRectOutset, outMetric);
+	outMetric[0]--;
+	CGRect r = new CGRect();
+	NSRect[] rect = getRectangles(focusIndex);
+	if (rect == null) return;
+	for (int i = 0; i < rect.length && rect[i] != null; i++) {
+		r.origin.x = rect[i].x + outMetric[0];
+		r.origin.y = rect[i].y + outMetric[0];
+		/*
+		 * sometimes the rect[i].width is smaller than 2 * outMetric and subtracting
+		 * it makes r.size.width < 0
+		 */
+		r.size.width = rect[i].width - outMetric[0];
+		r.size.height = rect[i].height - (2 * outMetric[0]);
+		OS.HIThemeDrawFocusRect(r, true, context.graphicsPort(), OS.kHIThemeOrientationNormal);
+	}
+}
+
 void enableWidget (boolean enabled) {
 	super.enableWidget (enabled);
 	NSColor nsColor = null; 
@@ -202,6 +265,56 @@ void enableWidget (boolean enabled) {
 	dict.setDictionary(linkTextAttributes);
 	dict.setValue(enabled ? linkColor : nsColor, OS.NSForegroundColorAttributeName);
 	widget.setLinkTextAttributes(dict);
+	redrawWidget(view, false);
+}
+
+NSRect[] getRectangles(int linkIndex) {
+	/*
+	 * Returns the focus rectangles to be drawn for a link. Number of
+	 * rectangles is > 1 when the link has multiple lines.
+	 */
+	if (linkIndex == -1) return null;
+	
+	NSTextView widget = ((NSTextView)view);
+	NSLayoutManager layoutManager = widget.layoutManager();
+	NSRange range = new NSRange();
+	range.location = offsets[linkIndex].x;
+	range.length = offsets[linkIndex].y - offsets[linkIndex].x + 1;
+	NSRange glyphRange = layoutManager.glyphRangeForCharacterRange(range, 0);
+
+	int /*long*/ rangePtr = OS.malloc(NSRange.sizeof);
+	NSRange lineRange = new NSRange();
+	
+	/* compute number of lines in the link */
+	int numberOfLines = 0;
+	int /*long*/ index = glyphRange.location;
+	int /*long*/ glyphEndIndex = glyphRange.location + glyphRange.length;
+	while (index < glyphEndIndex) {
+		numberOfLines++;
+		layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
+		OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+		index = lineRange.location + lineRange.length;
+	}
+	
+	/* compute the enclosing rectangle(s) for the link*/
+	NSRect [] result = new NSRect[numberOfLines];
+	index = glyphRange.location;
+	for (int i = 0; index < glyphEndIndex && i < numberOfLines; i++) {
+		NSRect usedRect = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
+		OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+		index = lineRange.location + lineRange.length;
+		
+		if (lineRange.location < glyphRange.location) {
+			lineRange.length = index - glyphRange.location;
+			lineRange.location = glyphRange.location;
+		}
+		if (index > glyphEndIndex) lineRange.length = glyphEndIndex - lineRange.location;
+		NSRect boundsRect = layoutManager.boundingRectForGlyphRange(lineRange, widget.textContainer());
+		result[i] = new NSRect();
+		OS.NSIntersectionRect(result[i], usedRect, boundsRect);
+	}
+	OS.free(rangePtr);
+	return result;
 }
 
 String getNameText () {
@@ -225,9 +338,19 @@ public String getText () {
 	return text;
 }
 
+boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) {
+	return false;
+}
+
 void register () {
 	super.register ();
-	if (scrollView != null) display.addWidget (scrollView, this);
+	display.addWidget(scrollView, this);
+}
+
+void releaseHandle () {
+	super.releaseHandle ();
+	if (scrollView != null) scrollView.release();
+	scrollView = null;
 }
 
 void releaseWidget () {
@@ -413,16 +536,55 @@ int parseMnemonics (char[] buffer, int start, int end, StringBuffer result) {
 	return mnemonic;
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
+void sendFocusEvent(int type) {
+	if (focusIndex != -1) redrawWidget(view, false);
+	super.sendFocusEvent(type);
+}
+
+boolean sendKeyEvent(int type, Event event) {
+	boolean result = super.sendKeyEvent (type, event);
+	if (!result) return result;
+	if (focusIndex == -1) return result;
+	if (type != SWT.KeyDown)  return result;
+	
+	int keyCode = event.keyCode;
+	switch (keyCode) {
+	case SWT.CR:
+	case SWT.KEYPAD_CR:
+	case 32: /* Space */
+		Event event1 = new Event ();
+		event1.text = ids [focusIndex];
+		sendEvent (SWT.Selection, event1);
+		break;
+	case SWT.TAB:
+		int modifierFlags = event.stateMask;
+		boolean next = (modifierFlags & SWT.SHIFT) == 0;
+		if (next) {
+			if (focusIndex < offsets.length - 1) {
+				focusIndex++;
+				redraw ();
+				return false;
+			}
+		} else {
+			if (focusIndex > 0) {
+				focusIndex--;
+				redraw ();
+				return false;
+			} 
+		}
+		break;
 	}
+	return result;
+}
+
+void setBackgroundColor(NSColor nsColor) {
 	setBackground(nsColor);
 }
 
+void setBackgroundImage(NSImage image) {
+	((NSTextView) view).setDrawsBackground(image == null);
+}
+
 void setBackground(NSColor nsColor) {
 	NSTextView widget = (NSTextView)view;
 	if (nsColor == null) {
@@ -448,6 +610,12 @@ void setForeground (float /*double*/ [] color) {
 	((NSTextView) view).setTextColor (nsColor);
 }
 
+void setOrientation () {
+	NSTextView widget = (NSTextView)view;
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+	widget.setBaseWritingDirection(direction);
+}
+
 /**
  * Sets the receiver's text.
  * <p>
@@ -461,6 +629,18 @@ void setForeground (float /*double*/ [] color) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
@@ -479,8 +659,12 @@ public void setText (String string) {
 	text = string;
 	NSTextView widget = (NSTextView)view;
 	widget.setString(NSString.stringWith(parse(string)));
+	focusIndex = offsets.length > 0 ? 0 : -1 ;
 	NSTextStorage textStorage = widget.textStorage();
 	NSRange range = new NSRange();
+	range.length = textStorage.length();
+	textStorage.removeAttribute(OS.NSLinkAttributeName, range);
+	textStorage.addAttribute(OS.NSCursorAttributeName, NSCursor.arrowCursor(), range);
 	for (int i = 0; i < offsets.length; i++) {
 		range.location = offsets[i].x;
 		range.length = offsets[i].y - offsets[i].x + 1;
@@ -488,6 +672,11 @@ public void setText (String string) {
 	}
 }
 
+public void setToolTipText(String string) {
+	((NSTextView)view).setDisplaysLinkToolTips(string == null);
+	super.setToolTipText(string);
+}
+
 void setZOrder () {
 	super.setZOrder ();
 	if (scrollView != null) scrollView.setDocumentView (view);
@@ -497,6 +686,22 @@ NSView topView () {
 	return scrollView;
 }
 
+int traversalCode (int key, NSEvent theEvent) {
+	if (offsets.length == 0) return  0;
+	int bits = super.traversalCode (key, theEvent);
+	if (key == 48 /* Tab */ && theEvent != null) {
+		int /*long*/ modifierFlags = theEvent.modifierFlags();
+		boolean next = (modifierFlags & OS.NSShiftKeyMask) == 0;
+		if (next && focusIndex < offsets.length - 1) {
+			return bits & ~ SWT.TRAVERSE_TAB_NEXT;
+		}
+		if (!next && focusIndex > 0) {
+			return bits & ~ SWT.TRAVERSE_TAB_PREVIOUS;
+		}
+	}
+	return bits;
+}
+
 void updateCursorRects (boolean enabled) {
 	super.updateCursorRects (enabled);
 	if (scrollView == null) return;
@@ -506,21 +711,5 @@ void updateCursorRects (boolean enabled) {
 	contentView.setDocumentCursor (enabled ? NSCursor.IBeamCursor () : null);
 }
 
-//int traversalCode (int key, int theEvent) {
-//	if (offsets.length == 0) return 0;
-//	int bits = super.traversalCode (key, theEvent);
-//	if (key == 48 /* Tab */ && theEvent != 0) {
-//		int [] modifiers = new int [1];
-//		OS.GetEventParameter (theEvent, OS.kEventParamKeyModifiers, OS.typeUInt32, null, 4, null, modifiers);
-//		boolean next = (modifiers [0] & OS.shiftKey) == 0;
-//		if (next && focusIndex < offsets.length - 1) {
-//			return bits & ~ SWT.TRAVERSE_TAB_NEXT;
-//		}
-//		if (!next && focusIndex > 0) {
-//			return bits & ~ SWT.TRAVERSE_TAB_PREVIOUS;
-//		}
-//	}
-//	return bits;
-//}
-
 }
+
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
index daacca2..8cb80d9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.swt.widgets;
 
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
@@ -43,7 +42,7 @@ public class List extends Scrollable {
 	NSTableColumn column;
 	String [] items;
 	int itemCount;
-	boolean ignoreSelect;
+	boolean ignoreSelect, didSelect;
 
 	static int NEXT_ID;
 
@@ -83,21 +82,6 @@ public List (Composite parent, int style) {
 }
 
 int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-	
-	if (accessible != null) {
-		NSString attribute = new NSString(arg0);
-		id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
-		if (returnValue != null) return returnValue.id;
-	}
-	
-	NSString attributeName = new NSString(arg0);
-	
-	// Accessibility Verifier queries for a title or description.  NSOutlineView doesn't
-	// seem to return either, so we return a default description value here.
-	if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
-		return NSString.stringWith("").id;
-	}
-
 //	if (attributeName.isEqualToString(OS.NSAccessibilityHeaderAttribute)) {
 //		/*
 //		* Bug in the Macintosh.  Even when the header is not visible,
@@ -136,11 +120,7 @@ public void add (String string) {
 		items = newItems;
 	}
 	items [itemCount++] = string;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	setScrollWidth(string);
 }
 
@@ -178,11 +158,7 @@ public void add (String string, int index) {
 	}
 	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
 	items [index] = string;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (index != itemCount) fixSelection (index, true);
 	setScrollWidth(string);
 }
@@ -423,6 +399,12 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
 	return dragging;
 }
 
+void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+	super.drawViewBackgroundInRect(id, sel, rect);
+	if (id != view.id) return;
+	fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
+}
+
 void fixSelection (int index, boolean add) {
 	int [] selection = getSelectionIndices ();
 	if (selection.length == 0) return;
@@ -766,6 +748,24 @@ int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEve
 	return super.menuForEvent(id, sel, theEvent);
 }
 
+void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	ignoreSelect = false;
+	NSTableView widget = (NSTableView)view;
+	NSEvent nsEvent = new NSEvent(theEvent);
+	NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
+	int row = (int)/*64*/widget.rowAtPoint(pt);
+	if (row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0) {
+		if (widget.isRowSelected(row) && widget.selectedRowIndexes().count() == 1) {
+			if (0 <= row && row < itemCount) {
+				sendSelection();
+			}
+		}
+	}
+	didSelect = false;
+	super.mouseDownSuper(id, sel, theEvent);
+	didSelect = false;
+}
+
 int /*long*/ numberOfRowsInTableView(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView) {
 	return itemCount;
 }
@@ -805,11 +805,7 @@ void remove (int index, boolean fixScroll) {
 	if (index != itemCount - 1) fixSelection (index, false);
 	System.arraycopy (items, index + 1, items, index, --itemCount - index);
 	items [itemCount] = null;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (fixScroll) setScrollWidth();
 }
 
@@ -914,11 +910,7 @@ public void removeAll () {
 	checkWidget();
 	items = new String [4];
 	itemCount = 0;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	setScrollWidth();
 }
 
@@ -1092,7 +1084,7 @@ public void selectAll () {
 
 void sendDoubleSelection() {
 	if (((NSTableView)view).clickedRow () != -1) {
-		postEvent (SWT.DefaultSelection);
+		sendSelectionEvent (SWT.DefaultSelection);
 	}
 }
 
@@ -1104,20 +1096,19 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 	switch (keyCode) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 	}
 	return result;
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} 
+void sendSelection () {
+	if (ignoreSelect) return;
+	sendSelectionEvent(SWT.Selection);
+}
+
+void setBackgroundColor(NSColor nsColor) {
 	((NSTableView) view).setBackgroundColor (nsColor);
 }
 
@@ -1428,8 +1419,13 @@ public void showSelection () {
 }
 
 void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
-	if (ignoreSelect) return;
-	postEvent (SWT.Selection);
+	if (didSelect) return;
+	sendSelection();
+}
+
+void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+	didSelect = true;
+	sendSelection();
 }
 
 boolean tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
@@ -1437,9 +1433,20 @@ boolean tableView_shouldEditTableColumn_row(int /*long*/ id, int /*long*/ sel, i
 }
 
 int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
-	NSAttributedString attribStr = createString(items[(int)/*64*/rowIndex], null, foreground, 0, false, true, false);
+	float /*double*/ [] fg = ((NSTableView)view).isRowSelected(rowIndex) ? null : foreground;
+	NSAttributedString attribStr = createString(items[(int)/*64*/rowIndex], null, fg, SWT.LEFT, false, getEnabled(), false);
 	attribStr.autorelease();
 	return attribStr.id;
 }
 
+void updateRowCount() {
+	NSTableView widget = (NSTableView)view;
+	setRedraw(false);
+	ignoreSelect = true;
+	widget.noteNumberOfRowsChanged ();
+	ignoreSelect = false;
+	widget.tile();
+	setRedraw(true);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
index 6293453..98dff52 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,8 @@ public class Menu extends Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	NSMenu nsMenu;
 	int x, y, itemCount;
@@ -57,6 +59,8 @@ public class Menu extends Widget {
 	MenuItem cascade, defaultItem;
 	Decorations parent;
 
+	static final int GAP = 4;
+
 /**
  * Constructs a new instance of this class given its parent,
  * and sets the style for the instance so that the instance
@@ -212,14 +216,15 @@ void _setVisible (boolean visible) {
 	}
 	if (visible) {
 		Shell shell = getShell ();
-		NSWindow window = shell.window;
+		NSWindow window = shell.view.window ();
 		NSPoint location = null;
 		if (hasLocation) {
 			NSView topView = window.contentView();
 			Point shellCoord = display.map(null, shell, new Point(x,y));
 			location = new NSPoint ();
-			location.x = shellCoord.x;
-			location.y = topView.frame().height - shellCoord.y;
+			float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+			location.x = shellCoord.x * scaleFactor;
+			location.y = (topView.frame().height - shellCoord.y) * scaleFactor;
 		} else {
 			location = window.mouseLocationOutsideOfEventStream();
 		}
@@ -290,7 +295,7 @@ public void addMenuListener (MenuListener listener) {
 void createHandle () {
 	display.addMenu (this);
 	NSMenu widget = (NSMenu)new SWTMenu().alloc();
-	widget = widget.initWithTitle(NSString.stringWith(""));
+	widget = widget.initWithTitle(NSString.string());
 	widget.setAutoenablesItems(false);
 	widget.setDelegate(widget);	
 	nsMenu = widget;	
@@ -304,7 +309,8 @@ void createItem (MenuItem item, int index) {
 		nsItem.retain();
 	} else {
 		nsItem = (NSMenuItem)new SWTMenuItem().alloc();
-		nsItem.initWithTitle(NSString.stringWith(""), 0, NSString.stringWith(""));
+		NSString empty = NSString.string();
+		nsItem.initWithTitle(empty, 0, empty);
 		nsItem.setTarget(nsItem);
 		nsItem.setAction(OS.sel_sendSelection);
 	}
@@ -681,18 +687,79 @@ void menuNeedsUpdate(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
 void menuWillOpen(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
 	visible = true;
 	sendEvent (SWT.Show);
-	for (int i=0; i<items.length; i++) {
+	if (isDisposed()) return;
+	float /*double*/ width = 0;
+	NSAttributedString[] strs = new NSAttributedString[itemCount];
+	for (int i=0; i<itemCount; i++) {
 		MenuItem item = items [i];
-		if (item != null)  item.updateAccelerator (true);
+		NSMenuItem nsItem = item.nsItem;
+		strs[i] = nsItem.attributedTitle();
+		NSImage nsImage = nsItem.image();
+		float /*double*/ w = GAP;
+		if (strs[i] != null) {
+			w += strs[i].size().width;
+		}
+		if (nsImage != null) {
+			w += (nsImage.size().width + GAP);
+		}
+		if (strs[i] != null) width = Math.max(width, w);
+	}
+	for (int i=0; i<itemCount; i++) {
+		MenuItem item = items [i];
+		if (item.updateAccelerator(true)) continue;
+		if (item.accelerator != 0 || strs[i] == null || (style & SWT.BAR) != 0 || (item.style & SWT.CASCADE) != 0) continue;
+		int accelIndex = item.text.indexOf ('\t');
+		if (accelIndex != -1) {
+			String accelText = item.text.substring (accelIndex);
+			int length = accelText.length ();
+			if (length > 1) {
+				NSMenuItem nsItem = item.nsItem;
+				NSImage nsImage = nsItem.image();
+				float /*double*/ tab = width;
+				if (nsImage != null) {
+					tab -= (nsImage.size().width + GAP);
+				}
+				NSMutableAttributedString str = new NSMutableAttributedString(strs[i].mutableCopy());
+				
+				/* Append accelerator text */
+				NSString label = (NSString) new NSString().alloc();
+				label = label.initWithString(accelText);
+				NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(1);
+				dict.setObject (NSFont.menuBarFontOfSize(0), OS.NSFontAttributeName);
+				NSAttributedString attribStr = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (label, dict);
+				dict.release();
+				label.release();
+				str.appendAttributedString(attribStr);
+				attribStr.release();
+				
+				/* Align accelerator text */
+				NSRange range = new NSRange();
+				range.length = str.length();
+				NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+				paragraphStyle.setTabStops(NSArray.array());
+				NSTextTab stop = (NSTextTab)new NSTextTab().alloc();
+				stop = stop.initWithType(OS.NSLeftTabStopType, tab);
+				paragraphStyle.addTabStop(stop);
+				stop.release();
+				str.addAttribute(OS.NSParagraphStyleAttributeName, paragraphStyle, range);
+				paragraphStyle.release ();
+				
+				nsItem.setAttributedTitle(str);
+				str.release();
+			}
+		}
 	}
 }
 
 void menuDidClose(int /*long*/ id, int /*long*/ sel, int /*long*/ menu) {
 	sendEvent (SWT.Hide);
+	if (isDisposed()) return;
 	visible = false;
-	for (int i=0; i<items.length; i++) {
+	for (int i=0; i<itemCount; i++) {
 		MenuItem item = items [i];
-		if (item != null)  item.updateAccelerator (false);
+		item.updateAccelerator(false);
+		if ((item.style & SWT.SEPARATOR) != 0) continue;
+		item.updateText();
 	}
 }
 
@@ -784,6 +851,15 @@ public void removeMenuListener (MenuListener listener) {
 	eventTable.unhook (SWT.Show, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the default menu item to the argument or removes
  * the default emphasis when the argument is <code>null</code>.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index d27761b..4f5fbbc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java	
@@ -184,7 +184,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -499,6 +505,13 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 void selectRadio () {
 	int index = 0;
 	MenuItem [] items = parent.getItems ();
@@ -522,10 +535,7 @@ void sendSelection () {
 			}
 		}
 	}
-	Event event = new Event ();
-	NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
-	if (nsEvent != null) setInputState (event, nsEvent, 0);
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection);
 }
 
 /**
@@ -550,13 +560,11 @@ public void setAccelerator (int accelerator) {
 	this.accelerator = accelerator;
 	int key = accelerator & SWT.KEY_MASK;
 	int virtualKey = keyChar (key);
-	NSString string = null;
-	if (virtualKey != 0) {
-		string = NSString.stringWith ((char)virtualKey + "");
-	} else {
-		string = NSString.stringWith ((char)key + "");
-	}
-	nsItem.setKeyEquivalent (string.lowercaseString());
+	String string = virtualKey != 0 ? (char)virtualKey + "" : (char)key + "";
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString(string);
+	nsItem.setKeyEquivalent (nsstring.lowercaseString());
+	nsstring.release();
 	int mask = 0;
 	if ((accelerator & SWT.SHIFT) != 0) mask |= OS.NSShiftKeyMask;
 	if ((accelerator & SWT.CONTROL) != 0) mask |= OS.NSControlKeyMask;
@@ -687,7 +695,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
@@ -771,16 +779,36 @@ void updateText () {
 	}
 	String text = new String (buffer, 0, j);
 	NSMenu submenu = nsItem.submenu ();
-	NSString label = NSString.stringWith (text);
+	NSString label = (NSString) new NSString().alloc();
+	label = label.initWithString(text);
 	if(submenu != null && (parent.getStyle () & SWT.BAR) != 0) {
 		submenu.setTitle (label);
 	} else {
-		nsItem.setTitle (label);
+		int direction = (parent.getStyle () & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+		NSMutableDictionary dict = ((NSMutableDictionary)new NSMutableDictionary().alloc()).initWithCapacity(2);
+		NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
+		paragraphStyle.setBaseWritingDirection(direction);
+		paragraphStyle.setLineBreakMode(OS.NSLineBreakByTruncatingMiddle);
+		dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
+		paragraphStyle.release ();
+		dict.setObject (NSFont.menuBarFontOfSize(0), OS.NSFontAttributeName);
+		NSAttributedString attribStr = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (label, dict);
+		dict.release();
+		nsItem.setAttributedTitle(attribStr);
+		/*
+		 * Feature in Cocoa.  Setting the attributed title on an NSMenuItem
+		 * also sets the title, but clearing the attributed title does not
+		 * clear the title.  The fix is to explicitly set the title to an
+		 * empty string in this case.  
+		 */
+		if (text.length() == 0) nsItem.setTitle(NSString.string());
+		attribStr.release();
 	}
+	label.release();
 }
 
-void updateAccelerator (boolean show) {
-	if (accelerator != 0) return;
+boolean updateAccelerator (boolean show) {
+	if (accelerator != 0) return false;
 	int mask = 0, key = 0;
 	if (show) {
 		char [] buffer = new char [text.length ()];
@@ -841,9 +869,12 @@ void updateAccelerator (boolean show) {
 			}
 		}
 	}
-	NSString string = NSString.stringWith (key == 0 ? "" : String.valueOf ((char)key));
 	nsItem.setKeyEquivalentModifierMask (mask);
-	nsItem.setKeyEquivalent (string.lowercaseString ());
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString(key == 0 ? "" : String.valueOf ((char)key));
+	nsItem.setKeyEquivalent (nsstring.lowercaseString ());
+	nsstring.release();
+	return key != 0;
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java
index 9d0ff92..39350fb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MessageBox.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -209,24 +209,29 @@ public int open () {
 	int response = 0;
 	int /*long*/ jniRef = 0;
 	SWTPanelDelegate delegate = null;
+	Display display = parent != null ? parent.getDisplay() : Display.getCurrent();
 	if ((style & SWT.SHEET) != 0) {
 		delegate = (SWTPanelDelegate)new SWTPanelDelegate().alloc().init();
 		jniRef = OS.NewGlobalRef(this);
 		if (jniRef == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 		OS.object_setInstanceVariable(delegate.id, Display.SWT_OBJECT, jniRef);
-		alert.beginSheetModalForWindow(parent.window, delegate, OS.sel_panelDidEnd_returnCode_contextInfo_, 0);
+		alert.beginSheetModalForWindow(parent.view.window (), delegate, OS.sel_panelDidEnd_returnCode_contextInfo_, 0);
+		display.setModalDialog(this);
 		if ((style & SWT.APPLICATION_MODAL) != 0) {
 			response = (int)/*64*/alert.runModal();
 		} else {
 			this.returnCode = 0;
 			NSWindow window = alert.window();
-			NSApplication application = NSApplication.sharedApplication();
-			while (window.isVisible()) application.run();
+			while (window.isVisible()) {
+				if (!display.readAndDispatch()) display.sleep();
+			}
 			response = this.returnCode;
 		}
 	} else {
+		display.setModalDialog(this);
 		response = (int)/*64*/alert.runModal();
 	}
+	display.setModalDialog(null);
 	if (delegate != null) delegate.release();
 	if (jniRef != 0) OS.DeleteGlobalRef(jniRef);
 	alert.release();
@@ -307,9 +312,6 @@ void panelDidEnd_returnCode_contextInfo(int /*long*/ id, int /*long*/ sel, int /
 	this.returnCode = (int)/*64*/returnCode;
 	NSApplication application = NSApplication.sharedApplication();
 	application.endSheet(new NSAlert(alert).window(), returnCode);
-	if ((style & SWT.PRIMARY_MODAL) != 0) {
-		application.stop(null);
-	}
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
index 55cd724..2287e20 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java	
@@ -102,6 +102,7 @@ void createHandle () {
 	NSProgressIndicator widget = (NSProgressIndicator)new SWTProgressIndicator().alloc();
 	widget.init();
 	widget.setUsesThreadedAnimation(false);
+	if ((style & SWT.VERTICAL) != 0) widget.setBoundsRotation(-90);
 	widget.setIndeterminate((style & SWT.INDETERMINATE) != 0);
 	view = widget;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
index dd1454a..e3c1672 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -155,11 +155,11 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
 		int value = (style & SWT.VERTICAL) != 0 ? location.x : location.y;
 		return NSNumber.numberWithInt(value).id;
 	} else if (attributeName.isEqualToString (OS.NSAccessibilityMaxValueAttribute)) {
-		NSRect parentBounds = view.bounds();
+		NSRect parentFrame = parent.topView().frame();
 		float /*double*/ maxValue = (style & SWT.VERTICAL) != 0 ?
-				parentBounds.width :
-				parentBounds.height;
-		return NSNumber.numberWithInt((int)maxValue).id;
+							parentFrame.width :
+							parentFrame.height;
+		return NSNumber.numberWithDouble(maxValue).id;
 	} else if (attributeName.isEqualToString (OS.NSAccessibilityMinValueAttribute)) {
 		return NSNumber.numberWithInt(0).id;
 	} else if (attributeName.isEqualToString (OS.NSAccessibilityNextContentsAttribute)) {
@@ -324,7 +324,7 @@ boolean sendKeyEvent(NSEvent nsEvent, int type) {
 				event.y = newY;
 				event.width = width;
 				event.height = height;
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 				if (isDisposed ()) break;
 				if (event.doit) {
 					setBounds (event.x, event.y, width, height);
@@ -363,7 +363,7 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	event.y = (int)frame.y;
 	event.width = (int)frame.width;
 	event.height = (int)frame.height;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return;
 	if (event.doit) {
 		lastX = event.x;
@@ -400,7 +400,7 @@ void mouseDragged(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	event.y = newY;
 	event.width = (int)frame.width;
 	event.height = (int)frame.height;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return;
 	if (event.doit) {
 		lastX = event.x;
@@ -421,7 +421,7 @@ void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	event.y = lastY;
 	event.width = (int)frame.width;
 	event.height = (int)frame.height;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return;
 	if (event.doit) {
 		setBounds (event.x, event.y, (int)frame.width, (int)frame.height);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
index 2d120fe..13e4c49 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java	
@@ -262,7 +262,7 @@ void sendSelection () {
 	NSEvent currEvent = NSApplication.sharedApplication().currentEvent();
 	
 	if (currEvent.type() != OS.NSLeftMouseUp)
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
index 2a9fee5..2b287f8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java	
@@ -11,11 +11,10 @@
 package org.eclipse.swt.widgets;
 
  
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * Instances of this class are selectable user interface
@@ -90,7 +89,7 @@ public class ScrollBar extends Widget {
 	int increment = 1;
 	int pageIncrement = 10;
 	id target;
-	int /*long*/ actionSelector;;
+	int /*long*/ actionSelector;
 
 ScrollBar () {
 	/* Do nothing */
@@ -285,8 +284,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -303,6 +301,47 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	NSRect rect = view.rectForPart(OS.NSScrollerKnob);
+	rect = view.convertRect_toView_(rect, parent.view);
+	return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	NSRect rect = view.rectForPart(OS.NSScrollerKnobSlot);
+	rect = view.convertRect_toView_(rect, parent.view);
+	return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -415,41 +454,51 @@ void releaseWidget () {
 }
 
 void sendSelection () {
+	NSWindow window = view.window ();
+	if (target == null) parent.getShell().deferFlushing();
 	int value = 0;
 	if (target != null) {
 		view.sendAction(actionSelector, target);
 	} else {
 		value = getSelection ();
 	}
+	NSPoint point;
+	NSEvent nsEvent = NSApplication.sharedApplication().currentEvent();
+	if (nsEvent != null) {
+		point = nsEvent.locationInWindow();
+		if (nsEvent.window() == null) point = window.convertScreenToBase(point);
+	} else {
+		point = window.mouseLocationOutsideOfEventStream();
+	}
+	int hitPart = (int)/*64*/((NSScroller)view).testPart(point);
 	Event event = new Event();
-	int hitPart = (int)/*64*/((NSScroller)view).hitPart();
 	switch (hitPart) {
-	    case OS.NSScrollerDecrementLine:
-	        value -= increment;
-	        event.detail = SWT.ARROW_UP;
-	        break;
-	    case OS.NSScrollerDecrementPage:
-	        value -= pageIncrement;
-	        event.detail = SWT.PAGE_UP;
-	        break;
-	    case OS.NSScrollerIncrementLine:
-	        value += increment;
-	        event.detail = SWT.ARROW_DOWN;
-	        break;
-	    case OS.NSScrollerIncrementPage:
-	        value += pageIncrement;
-	        event.detail = SWT.PAGE_DOWN;
-	        break;
-	    case OS.NSScrollerKnob:
-			event.detail = SWT.DRAG;
-	        break;
+	case OS.NSScrollerDecrementLine:
+		value -= increment;
+		event.detail = SWT.ARROW_UP;
+		break;
+	case OS.NSScrollerDecrementPage:
+		value -= pageIncrement;
+		event.detail = SWT.PAGE_UP;
+		break;
+	case OS.NSScrollerIncrementLine:
+		value += increment;
+		event.detail = SWT.ARROW_DOWN;
+		break;
+	case OS.NSScrollerIncrementPage:
+		value += pageIncrement;
+		event.detail = SWT.PAGE_DOWN;
+		break;
+	case OS.NSScrollerKnob:
+		event.detail = SWT.DRAG;
+		break;
 	}
 	if (target == null) {
 		if (event.detail != SWT.DRAG) {
 			setSelection(value);
 		}
 	}
-	sendEvent(SWT.Selection, event);
+	sendSelectionEvent(SWT.Selection, event, true);
 }
 
 /**
@@ -471,9 +520,8 @@ public void setIncrement (int value) {
 	increment = value;
 }
 
-void setClipRegion (float /*double*/ x, float /*double*/ y) {
-	NSRect frame = view.frame();
-	parent.setClipRegion(frame.x + x, frame.y + y);
+void setClipRegion (NSView view) {
+	parent.setClipRegion(view);
 }
 
 /**
@@ -594,10 +642,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index 4fa782a..c1357a7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,9 @@
 package org.eclipse.swt.widgets;
 
 
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * This class is the abstract superclass of all classes which
@@ -74,12 +73,6 @@ public Scrollable (Composite parent, int style) {
 	super (parent, style);
 }
 
-boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
-	// Always ignore scrollers.
-	if (scrollView != null && id == scrollView.id) return true;
-	return super.accessibilityIsIgnored(id, sel);	
-}
-
 /**
  * Given a desired <em>client area</em> for the receiver
  * (as described by the arguments), returns the bounding
@@ -240,6 +233,10 @@ boolean isEventView (int /*long*/ id) {
 	return id == eventView ().id;
 }
 
+boolean isNeeded(ScrollBar scrollbar) {
+	return true;
+}
+
 boolean isTrim (NSView view) {
 	if (scrollView != null) {
 		if (scrollView.id == view.id) return true;
@@ -249,6 +246,20 @@ boolean isTrim (NSView view) {
 	return super.isTrim (view);
 }
 
+void redrawBackgroundImage () {
+	if (scrollView != null) {
+		Control control = findBackgroundControl();
+		if (control != null && control.backgroundImage != null) {
+			redrawWidget(view, false);
+		}
+	}
+}
+
+void reflectScrolledClipView(int id, int sel, int aClipView) {
+	super.reflectScrolledClipView(id, sel, aClipView);
+	redrawBackgroundImage();
+}
+
 void register () {
 	super.register ();
 	if (scrollView != null) display.addWidget (scrollView, this);
@@ -272,24 +283,37 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
-void sendHorizontalSelection () {
-	if ((state & CANVAS) == 0 && scrollView != null && visibleRgn == 0) {
-		scrollView.contentView().setCopiesOnScroll(!isObscured());
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
+void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+	if ((state & CANVAS) == 0 && scrollView != null) {
+		NSClipView clip = new NSClipView (clipView);
+		boolean oldCopies = clip.copiesOnScroll (), copies = oldCopies;
+		if (visibleRgn == 0) copies = !isObscured ();
+		if (copies) copies = !hasRegion ();
+		clip.setCopiesOnScroll (copies);
 	}
+	super.scrollClipViewToPoint (id, sel, clipView, point);
+}
+
+void sendHorizontalSelection () {
+	if (horizontalBar.view.isHiddenOrHasHiddenAncestor()) return;
 	horizontalBar.sendSelection ();
 }
 
 void sendVerticalSelection () {
-	if ((state & CANVAS) == 0 && scrollView != null && visibleRgn == 0) {
-		scrollView.contentView().setCopiesOnScroll(!isObscured());
-	}
+	if (verticalBar.view.isHiddenOrHasHiddenAncestor()) return;
 	verticalBar.sendSelection ();
 }
 
 void enableWidget (boolean enabled) {
 	super.enableWidget (enabled);
-	if (horizontalBar != null) horizontalBar.enableWidget (enabled);
-	if (verticalBar != null) verticalBar.enableWidget (enabled);
+	if (horizontalBar != null) horizontalBar.enableWidget (enabled && isNeeded(horizontalBar));
+	if (verticalBar != null) verticalBar.enableWidget (enabled && isNeeded(verticalBar));
 }
 
 boolean setScrollBarVisible (ScrollBar bar, boolean visible) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index ca40897..dc967e6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.widgets;
 
-import org.eclipse.swt.SWT;
+import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
@@ -118,7 +118,7 @@ public class Shell extends Decorations {
 	NSWindow window;
 	SWTWindowDelegate windowDelegate;
 	int /*long*/ tooltipOwner, tooltipTag, tooltipUserData;
-	boolean opened, moved, resized, fullScreen, center;
+	boolean opened, moved, resized, fullScreen, center, deferFlushing;
 	Control lastActive;
 	Rectangle normalBounds;
 	boolean keyInputHappened;
@@ -281,6 +281,7 @@ Shell (Display display, Shell parent, int style, int /*long*/handle, boolean emb
 			state |= FOREIGN_HANDLE;
 		}
 	}
+	reskinWidget();
 	createWidget ();
 }
 
@@ -377,6 +378,8 @@ public Shell (Shell parent, int style) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int /*long*/ handle) {
@@ -399,6 +402,8 @@ public static Shell internal_new (Display display, int /*long*/ handle) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.5
  */
 public static Shell cocoa_new (Display display, int /*long*/ handle) {
@@ -513,6 +518,11 @@ void center () {
 	setLocation (x, y);
 }
 
+void clearDeferFlushing (int /*long*/ id, int /*long*/ sel) {
+	deferFlushing = false;
+	if (window != null) window.flushWindowIfNeeded();
+}
+
 /**
  * Requests that the window manager close the receiver in
  * the same way it would be closed when the user clicks on
@@ -548,8 +558,10 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	rect.width = trim.width;
 	rect.height = trim.height;
 	if (window != null) {
-		if (!fixResize()) {
+		if (!fullScreen && !fixResize()) {
+			float /*double*/ h = rect.height;
 			rect = window.frameRectForContentRect(rect);
+			rect.y += h-rect.height;
 		}
 	}
 	return new Rectangle ((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
@@ -557,7 +569,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 
 void createHandle () {
 	state |= HIDDEN;
-	if (window == null) {
+	if (window == null && view == null) {
 		window = (NSWindow) new SWTWindow ().alloc ();
 		int styleMask = OS.NSBorderlessWindowMask;
 		if ((style & SWT.NO_TRIM) == 0) {
@@ -569,7 +581,7 @@ void createHandle () {
 		}
 		NSScreen screen = null;
 		NSScreen primaryScreen = new NSScreen(NSScreen.screens().objectAtIndex(0));
-		if (parent != null) screen = parent.getShell().window.screen();
+		if (parent != null) screen = parentWindow ().screen();
 		if (screen == null) screen = primaryScreen;
 		window = window.initWithContentRect(new NSRect(), styleMask, OS.NSBackingStoreBuffered, (style & SWT.ON_TOP) != 0, screen);
 		if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0 || (style & (SWT.TOOL | SWT.SHEET)) != 0) {
@@ -577,7 +589,7 @@ void createHandle () {
 		}
 		if ((style & SWT.NO_TRIM) == 0) {
 			NSSize size = window.minSize();
-			size.width = NSWindow.minFrameWidthWithTitle(NSString.stringWith(""), styleMask);
+			size.width = NSWindow.minFrameWidthWithTitle(NSString.string(), styleMask);
 			window.setMinSize(size);
 		}
 		if (fixResize ()) {
@@ -600,20 +612,51 @@ void createHandle () {
 		super.createHandle ();
 		topView ().setHidden (true);
 	} else {
-//		int /*long*/ cls = OS.objc_lookUpClass ("SWTWindow");
-//		OS.object_setClass(window.id, cls);
 		state &= ~HIDDEN;
-		//TODO - get the content of the foreign window instead of creating it
-		super.createHandle ();
+		
+		if (window != null) {
+			// In the FOREIGN_HANDLE case, 'window' is an NSWindow created on our behalf.
+			// It may already have a content view, so if it does, grab and retain, since we release()
+			// the view at disposal time.  Otherwise, create a new 'view' that will be used as the window's
+			// content view in setZOrder.
+			view = window.contentView();
+			
+			if (view == null) {
+				super.createHandle();
+			} else {
+				view.retain();
+			}
+		} else {
+			// In the embedded case, 'view' is already set to the NSView we should add the window's content view to as a subview.
+			// In that case we will hold on to the foreign view, create our own SWTCanvasView (which overwrites 'view') and then
+			// add it to the foreign view.
+			NSView parentView = view;			
+			super.createHandle();
+			parentView.addSubview(topView());
+		}
+
 		style |= SWT.NO_BACKGROUND;
 	}
-	window.setAcceptsMouseMovedEvents(true);
-	windowDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
-	window.setDelegate(windowDelegate);
-	id id = window.fieldEditor (true, null);
+	
+	if (window != null) {
+		if (parent != null) window.setCollectionBehavior(OS.NSWindowCollectionBehaviorMoveToActiveSpace);
+		window.setAcceptsMouseMovedEvents(true);
+		windowDelegate = (SWTWindowDelegate)new SWTWindowDelegate().alloc().init();
+		window.setDelegate(windowDelegate);
+	}
+	
+	NSWindow fieldEditorWindow = window;
+	if (fieldEditorWindow == null) fieldEditorWindow = view.window();
+	id id = fieldEditorWindow.fieldEditor (true, null);
 	if (id != null) {
 		OS.object_setClass (id.id, OS.objc_getClass ("SWTEditorView"));
 	}
+
+}
+
+void deferFlushing () {
+	deferFlushing = true;
+	view.performSelector(OS.sel_clearDeferFlushing, null, 0.0, display.runLoopModes());
 }
 
 void deregister () {
@@ -625,6 +668,8 @@ void deregister () {
 void destroyWidget () {
 	NSWindow window = this.window;
 	Display display = this.display;
+	NSView view = topView();
+	
 	boolean sheet = (style & (SWT.SHEET)) != 0;
 	releaseHandle ();
 	if (window != null) {
@@ -633,10 +678,16 @@ void destroyWidget () {
 			application.endSheet(window, 0);
 		}
 		window.close();
+	} else if (view != null) {
+		view.removeFromSuperview();
 	}
-	//If another shell is not going to become active, clear the menu bar.
-	if (!display.isDisposed () && display.getShells ().length == 0) {
-		display.setMenuBar (null);
+	
+	// If another shell is not going to become active, clear the menu bar.
+	// Don't modify the menu bar if we are an embedded Shell, though.
+	if (window != null) {
+		if (!display.isDisposed () && display.getShells ().length == 0) {
+			display.setMenuBar (null);
+		}
 	}
 }
 
@@ -728,25 +779,48 @@ public void forceActive () {
  */
 public int getAlpha () {
 	checkWidget ();
-	// TODO: Should we support embedded frame alpha?
 	if (window == null) return 255;
 	return (int)(window.alphaValue() * 255);
 }
 
 public Rectangle getBounds () {
 	checkWidget();
-	NSRect frame = (window == null ? view.frame() : window.frame());
-	float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
-	return new Rectangle ((int)frame.x, (int)y, (int)frame.width, (int)frame.height);
+	if (window != null) {
+		NSRect frame = window.frame();
+		float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+		Rectangle rectangle = new Rectangle ((int)frame.x, (int)y, (int)frame.width, (int)frame.height);
+		float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+		rectangle.x /= scaleFactor;
+		rectangle.y /= scaleFactor;
+		rectangle.width /= scaleFactor;
+		rectangle.height /= scaleFactor;
+		return rectangle;
+	} else {
+		NSRect frame = view.frame();
+		// Start from view's origin, (0, 0)
+		NSPoint pt = new NSPoint();
+		NSRect primaryFrame = display.getPrimaryFrame();
+		if (!view.isFlipped ()) {
+			pt.y = view.bounds().height - pt.y;
+		}
+		pt = view.convertPoint_toView_(pt, null);
+		pt = view.window().convertBaseToScreen(pt);
+		pt.y = primaryFrame.height - pt.y;
+		return new Rectangle((int)pt.x, (int)pt.y, (int)frame.width, (int)frame.height);
+	}
 }
 
 public Rectangle getClientArea () {
 	checkWidget();
 	NSRect rect;
 	if (window != null) {
-		rect = window.frame();
 		if (!fixResize ()) {
-			rect = window.contentRectForFrameRect(rect);
+			rect = window.contentView().frame();
+		} else {
+			float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+			rect = window.frame();
+			rect.width /= scaleFactor;
+			rect.height /= scaleFactor;
 		}
 	} else {
 		rect = scrollView != null ? scrollView.frame() : view.frame();
@@ -806,10 +880,30 @@ public int getImeInputMode () {
 
 public Point getLocation () {
 	checkWidget();
-	// TODO: frame is relative to superview. What does getLocation mean in the embedded case?
-	NSRect frame = (window != null ? window.frame() : view.frame());
-	float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
-	return new Point ((int)frame.x, (int)y);
+	
+	if (window != null) {
+		NSRect frame = window.frame();
+		float /*double*/ y = display.getPrimaryFrame().height - (int)(frame.y + frame.height);
+		Point point = new Point ((int)frame.x, (int)y);
+		float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+		point.x /= scaleFactor;
+		point.y /= scaleFactor;
+		return point;
+	} else {
+		// Start from view's origin, (0, 0)
+		NSPoint pt = new NSPoint();
+		NSRect primaryFrame = display.getPrimaryFrame();
+		if (!view.isFlipped ()) {
+			pt.y = view.bounds().height - pt.y;
+		}
+		pt = view.convertPoint_toView_(pt, null);
+		pt = view.window().convertBaseToScreen(pt);
+		pt.y = primaryFrame.height - pt.y;
+		float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+		pt.x /= scaleFactor;
+		pt.y /= scaleFactor;
+		return new Point((int)pt.x, (int)pt.y);
+	}
 }
 
 public boolean getMaximized () {
@@ -955,7 +1049,11 @@ public Shell [] getShells () {
 public Point getSize () {
 	checkWidget();
 	NSRect frame = (window != null ? window.frame() : view.frame());
-	return new Point ((int) frame.width, (int) frame.height);
+	Point point = new Point ((int) frame.width, (int) frame.height);
+	float /*double*/ scaleFactor = view.window().userSpaceScaleFactor();
+	point.x /= scaleFactor;
+	point.y /= scaleFactor;
+	return point;
 }
 
 float getThemeAlpha () {
@@ -966,6 +1064,10 @@ boolean hasBorder () {
 	return false;
 }
 
+boolean hasRegion () {
+	return region != null;
+}
+
 void helpRequested(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	Control control = display.getFocusControl();
 	while (control != null) {
@@ -995,6 +1097,10 @@ boolean isEnabledCursor () {
 	return true;
 }
 
+boolean isTransparent() {
+	return false;
+}
+
 public boolean isVisible () {
 	checkWidget();
 	return getVisible ();
@@ -1018,8 +1124,8 @@ void makeKeyAndOrderFront() {
 	* making the child a key window. 
 	*/
 	if (parent != null) {
-		Shell shell = (Shell) parent;
-		if (shell.window.isMiniaturized()) shell.window.deminiaturize(null);
+		NSWindow parentWindow = parentWindow ();
+		if (parentWindow.isMiniaturized()) parentWindow.deminiaturize(null);
 	}
 	window.makeKeyAndOrderFront (null);
 }
@@ -1069,12 +1175,17 @@ public void open () {
 	if (!restoreFocus () && !traverseGroup (true)) {
 		// if the parent shell is minimized, setting focus will cause it
 		// to become unminimized.
-		if (parent == null || !((Shell)parent).window.isMiniaturized()) {
+		if (parent == null || !parentWindow ().isMiniaturized()) {
 			setFocus ();
 		}
 	}
 }
 
+NSWindow parentWindow () {
+	if (parent == null) return null;
+	return parent.view.window();
+}
+
 public boolean print (GC gc) {
 	checkWidget ();
 	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
@@ -1147,6 +1258,15 @@ public void removeShellListener(ShellListener listener) {
 	eventTable.unhook(SWT.Deiconify,listener);
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 void sendToolTipEvent (boolean enter) {
 	if (!isVisible()) return;
 	if (tooltipTag == 0) {
@@ -1262,12 +1382,26 @@ public void setAlpha (int alpha) {
 }
 
 void setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
-	// Embedded Shells are not resizable.
-	if (window == null) return;
+	if (window == null) {
+		// Embedded shells aren't movable.
+		if (move) return;
+		if (resize) {
+			NSSize frameSize = new NSSize();
+			frameSize.width = width;
+			frameSize.height = height;
+			view.setFrameSize(frameSize);
+			return;
+		}
+	}
 	if (fullScreen) setFullScreen (false);
 	boolean sheet = window.isSheet();
 	if (sheet && move && !resize) return;
 	int screenHeight = (int) display.getPrimaryFrame().height;
+	float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+	x *= scaleFactor;
+	y *= scaleFactor;
+	width *= scaleFactor;
+	height *= scaleFactor;
 	NSRect frame = window.frame();
 	if (!move) {
 		x = (int)frame.x;
@@ -1298,13 +1432,16 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz
 	}
 }
 
-void setClipRegion (float /*double*/ x, float /*double*/ y) {
+void setClipRegion (NSView view) {
 	if (regionPath != null) {
+		NSView rgnView = topView ();
+		if (!rgnView.isFlipped()) rgnView = eventView ();
+		NSPoint pt = view.convertPoint_toView_(new NSPoint(), rgnView);
 		NSAffineTransform transform = NSAffineTransform.transform();
-		transform.translateXBy(-x, -y);
+		transform.translateXBy(-pt.x, -pt.y);
 		regionPath.transformUsingAffineTransform(transform);
 		regionPath.addClip();
-		transform.translateXBy(2*x, 2*y);
+		transform.translateXBy(2*pt.x, 2*pt.y);
 		regionPath.transformUsingAffineTransform(transform);
 	}
 }
@@ -1356,7 +1493,7 @@ public void setFullScreen (boolean fullScreen) {
 		fullScreenFrame = NSScreen.mainScreen().frame();
 		if (getMonitor().equals(display.getPrimaryMonitor ())) {
 			if (menuBar != null) {
-				float /*double*/ menuBarHt = currentFrame.height - contentView().frame().height;
+				float /*double*/ menuBarHt = NSStatusBar.systemStatusBar().thickness();
 				fullScreenFrame.height -= menuBarHt;
 				OS.SetSystemUIMode(OS.kUIModeContentHidden, 0);
 			} 
@@ -1365,7 +1502,10 @@ public void setFullScreen (boolean fullScreen) {
 			}
 		}
 		window.setFrame(fullScreenFrame, true);
-		window.contentView().setFrame(fullScreenFrame);
+		NSRect contentViewFrame = new NSRect();
+		contentViewFrame.width = fullScreenFrame.width;
+		contentViewFrame.height = fullScreenFrame.height;
+		window.contentView().setFrame(contentViewFrame);
 	} else {
 		window.setShowsResizeIndicator(true);
 		if (window.respondsToSelector(OS.sel_setMovable_)) {
@@ -1416,6 +1556,7 @@ public void setMinimized (boolean minimized) {
 	checkWidget();
 	super.setMinimized (minimized);
 	if (window == null) return;
+	if (!getVisible()) return;
 	if (minimized) {
 		window.miniaturize (null);
 	} else {
@@ -1583,24 +1724,35 @@ void setWindowVisible (boolean visible, boolean key) {
 		if (isDisposed ()) return;
 		topView ().setHidden (false);
 		invalidateVisibleRegion();
-		if ((style & (SWT.SHEET)) != 0) {
-			NSApplication application = NSApplication.sharedApplication();
-			application.beginSheet(window, ((Shell)parent).window, null, 0, 0);
-			if (OS.VERSION <= 0x1060 && window.respondsToSelector(OS.sel__setNeedsToUseHeartBeatWindow_)) {
-				OS.objc_msgSend(window.id, OS.sel__setNeedsToUseHeartBeatWindow_, 0);
-			}
-		} else {
-			// If the parent window is miniaturized, the window will be shown
-			// when its parent is shown.
-			boolean parentMinimized = parent != null && ((Shell)parent).window.isMiniaturized();
-			if (!parentMinimized) {
-				if (key) {
-					makeKeyAndOrderFront ();
-				} else {
-					window.orderFront (null);
+		if (window != null) {
+			if ((style & (SWT.SHEET)) != 0) {
+				NSApplication application = NSApplication.sharedApplication();
+				application.beginSheet(window, parentWindow (), null, 0, 0);
+				if (OS.VERSION <= 0x1060 && window.respondsToSelector(OS.sel__setNeedsToUseHeartBeatWindow_)) {
+					OS.objc_msgSend(window.id, OS.sel__setNeedsToUseHeartBeatWindow_, 0);
+				}
+			} else {
+				// If the parent window is miniaturized, the window will be shown
+				// when its parent is shown.
+				boolean parentMinimized = parent != null && parentWindow ().isMiniaturized();
+				if (!parentMinimized) {
+					if (key) {
+						makeKeyAndOrderFront ();
+					} else {
+						window.orderFront (null);
+					}
+					if (isDisposed()) return;
+					if (minimized != window.isMiniaturized()) {
+						if (minimized) {
+							window.miniaturize (null);
+						} else {
+							window.deminiaturize (null);
+						}
+					}
 				}
 			}
 		}
+		if (isDisposed()) return;
 		updateParent (visible);
 		opened = true;
 		if (!moved) {
@@ -1619,11 +1771,14 @@ void setWindowVisible (boolean visible, boolean key) {
 		}
 	} else {
 		updateParent (visible);
-		if ((style & (SWT.SHEET)) != 0) {
-			NSApplication application = NSApplication.sharedApplication();
-			application.endSheet(window, 0);
+		if (window != null) {
+			if ((style & (SWT.SHEET)) != 0) {
+				NSApplication application = NSApplication.sharedApplication();
+				application.endSheet(window, 0);
+			} 
+			window.orderOut (null);
 		}
-		window.orderOut (null);
+
 		topView ().setHidden (true);
 		invalidateVisibleRegion();
 		sendEvent (SWT.Hide);
@@ -1639,6 +1794,9 @@ void setZOrder () {
 	if (fixResize ()) {
 		NSRect rect = window.frame();
 		rect.x = rect.y = 0;
+		float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+		rect.width /= scaleFactor;
+		rect.height /= scaleFactor;
 		window.contentView().setFrame(rect);
 	}
 }
@@ -1669,13 +1827,24 @@ void updateModal () {
 }
 
 void updateParent (boolean visible) {
-	if (visible) {
-		if (parent != null && parent.getVisible ()) {
-			((Shell)parent).window.addChildWindow (window, OS.NSWindowAbove);
-		}		
-	} else {
-		NSWindow parentWindow = window.parentWindow ();
-		if (parentWindow != null) parentWindow.removeChildWindow (window);
+	if (window != null) {
+		if (visible) {
+			if (parent != null && parent.getVisible ()) {
+				parentWindow ().addChildWindow (window, OS.NSWindowAbove);
+				
+				/**
+				 * Feature in Cocoa: When a window is added as a child window,
+				 * its window level resets to its parent's window level. So, we
+				 * have to set the level for ON_TOP child window again.
+				 */
+				if ((style & SWT.ON_TOP) != 0) {
+					window.setLevel(OS.NSStatusWindowLevel);
+				}
+			}
+		} else {
+			NSWindow parentWindow = window.parentWindow ();
+			if (parentWindow != null) parentWindow.removeChildWindow (window);
+		}
 	}
 	Shell [] shells = getShells ();
 	for (int i = 0; i < shells.length; i++) {
@@ -1688,20 +1857,18 @@ void updateParent (boolean visible) {
 
 void updateSystemUIMode () {
 	if (!getMonitor ().equals (display.getPrimaryMonitor ())) return;
+	int mode = display.systemUIMode, options = display.systemUIOptions;
 	if (fullScreen) {
-		int mode = OS.kUIModeAllHidden;
+		mode = OS.kUIModeAllHidden;
 		if (menuBar != null) {
 			mode = OS.kUIModeContentHidden;
 		}
-		int uiMode[] = new int[1];
-		OS.GetSystemUIMode(uiMode, null);
-		if (uiMode[0] != mode) OS.SetSystemUIMode (mode, 0);
-		window.setFrame(fullScreenFrame, true);
-	} else {
-		int uiMode[] = new int[1];
-		OS.GetSystemUIMode(uiMode, null);
-		if (uiMode[0] != OS.kUIModeNormal) OS.SetSystemUIMode (OS.kUIModeNormal, 0);
+		options = 0;
 	}
+	int[] uiMode = new int[1], uiOptions = new int[1];
+	OS.GetSystemUIMode(uiMode, uiOptions);
+	if (uiMode[0] != mode || uiOptions[0] != options) OS.SetSystemUIMode (mode, options);
+	if (fullScreen)	window.setFrame(fullScreenFrame, true);
 }
 
 int /*long*/ view_stringForToolTip_point_userData (int /*long*/ id, int /*long*/ sel, int /*long*/ view, int /*long*/ tag, int /*long*/ point, int /*long*/ userData) {
@@ -1738,6 +1905,16 @@ void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica
 	}
 }
 
+void windowDidDeminiturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	minimized = false;
+	sendEvent(SWT.Deiconify);
+}
+
+void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	minimized = true;
+	sendEvent(SWT.Iconify);
+}
+
 void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 	moved = true;
 	sendEvent(SWT.Move);
@@ -1746,11 +1923,17 @@ void windowDidMove(int /*long*/ id, int /*long*/ sel, int /*long*/ notification)
 void windowDidResize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 	if (fullScreen) {
 		window.setFrame(fullScreenFrame, true);
-		window.contentView().setFrame(fullScreenFrame);
+		NSRect contentViewFrame = new NSRect();
+		contentViewFrame.width = fullScreenFrame.width;
+		contentViewFrame.height = fullScreenFrame.height;
+		window.contentView().setFrame(contentViewFrame);
 	}
 	if (fixResize ()) {
 		NSRect rect = window.frame ();
 		rect.x = rect.y = 0;
+		float /*double*/ scaleFactor = window.userSpaceScaleFactor();
+		rect.width /= scaleFactor;
+		rect.height /= scaleFactor;
 		window.contentView ().setFrame (rect);
 	}
 	resized = true;
@@ -1784,8 +1967,25 @@ void windowSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
 				display.checkEnterExit (trimControl, nsEvent, false);
 				if (trimControl != null) trimControl.sendMouseEvent (nsEvent, type, false);
 			}
+			
+			// Tooltip updating: Find the widget under the cursor. If it changed, clear the tooltip from
+			// the last tracked item and send a tooltip event to make it visible on the new widget. 
 			Widget target = null;
-			if (control != null) target = control.findTooltip (nsEvent.locationInWindow());
+			if (control != null) {
+				NSPoint eventPoint = nsEvent.locationInWindow();
+				if (hitView[0] != null) {
+					NSWindow eventWindow = nsEvent.window();
+
+					// If a NSMouseMoved happens on an inactive window, convert the
+					// event coordinates to the window of the target view.
+					if (eventWindow != null && eventWindow != hitView[0].window()) {
+						eventPoint = eventWindow.convertBaseToScreen(eventPoint);
+						eventPoint = hitView[0].window().convertScreenToBase(eventPoint);
+					}
+				}				
+				target = control.findTooltip (eventPoint);
+			}
+			
 			if (display.tooltipControl != control || display.tooltipTarget != target) {
 				Control oldControl = display.tooltipControl;
 				Shell oldShell = oldControl != null && !oldControl.isDisposed() ? oldControl.getShell() : null;
@@ -1826,7 +2026,7 @@ void windowSendEvent (int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
 }
 
 boolean windowShouldClose(int /*long*/ id, int /*long*/ sel, int /*long*/ window) {
-	closeWidget ();
+	if (isEnabled()) closeWidget ();
 	return false;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
index 305d47d..502957e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java	
@@ -193,6 +193,14 @@ NSFont defaultNSFont () {
 	return display.scrollerFont;
 }
 
+void enableWidget(boolean enabled) {
+	super.enableWidget(enabled);
+	if (enabled) {
+		int range = maximum - thumb - minimum;
+		if (range <= 0) ((NSScroller)view).setEnabled(false);
+	}
+};
+
 /**
  * Returns the amount that the receiver's value will be
  * modified by when the up/down (or right/left) arrows
@@ -275,8 +283,7 @@ public int getSelection () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -343,7 +350,7 @@ void sendSelection () {
 	if (event.detail != SWT.DRAG) {
 		setSelection(value);
 	}
-	sendEvent(SWT.Selection, event);
+	sendSelectionEvent(SWT.Selection, event, true);
 }
 
 /**
@@ -463,13 +470,17 @@ void updateBar (int selection, int minimum, int maximum, int thumb) {
 	float fraction = range <= 0 ? 1 : (float)(selection - minimum) / range;
 	float knob = range <= 0 ? 1 : (float)thumb / (maximum - minimum);
 	widget.setFloatValue (fraction, knob);
+	widget.setEnabled (range > 0); 
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
index 553f1a8..8476b88 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java	
@@ -104,6 +104,11 @@ boolean acceptsFirstResponder(int /*long*/ id, int /*long*/ sel) {
 	return super.acceptsFirstResponder (id, sel);
 }
 
+boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+	if (id == view.id) return true;
+	return super.accessibilityIsIgnored(id, sel);	
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the receiver's text is modified, by sending
@@ -263,6 +268,10 @@ void createHandle () {
 	textWidget.init();
 //	textWidget.setTarget(widget);
 	textWidget.setEditable((style & SWT.READ_ONLY) == 0);
+	if ((style & SWT.BORDER) == 0) {
+		textWidget.setFocusRingType (OS.NSFocusRingTypeNone);
+		textWidget.setBordered (false);
+	}
 	textFormatter = (NSNumberFormatter)new NSNumberFormatter().alloc();
 	textFormatter.init();
 	widget.addSubview(textWidget);
@@ -319,6 +328,26 @@ void deregister () {
 	}
 }
 
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+	if (backgroundImage == null) return;
+	if (new NSView(id).isKindOfClass(OS.class_NSText)) {
+		NSText text = new NSText(id);
+		if (!text.isFieldEditor()) return;
+	}
+	fillBackground (view, context, rect, -1);
+}
+
+void drawInteriorWithFrame_inView(int id, int sel, NSRect cellFrame, int viewid) {
+	Control control = findBackgroundControl();
+	if (control == null) control = this;
+	Image image = control.backgroundImage;
+	if (image != null && !image.isDisposed()) {
+		NSGraphicsContext context = NSGraphicsContext.currentContext();
+ 	 	control.fillBackground (view, context, cellFrame, -1);
+	}
+	super.drawInteriorWithFrame_inView(id, sel, cellFrame, viewid);
+}
+
 NSView focusView () {
 	return textView;
 }
@@ -497,6 +526,12 @@ public int getTextLimit () {
     return textLimit;
 }
 
+boolean handleIsAccessible(int /*long*/ id) {
+	// All subviews of a Spinner can have their accessible properties overridden.
+	// The top-level NSView is already ignored, so no need to test for that.
+	return true;
+}
+
 boolean isEventView (int /*long*/ id) {
 	return true;
 }
@@ -651,7 +686,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 	switch (keyCode) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			return true;
 		}
 
@@ -694,18 +729,16 @@ void sendSelection () {
 	setSelection (getSelection(), false, true, true);
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		nsColor = NSColor.textBackgroundColor ();
-	}
+void setBackgroundColor(NSColor nsColor) {
 	((NSTextField) textView).setBackgroundColor (nsColor);
 }
 
+void setBackgroundImage(NSImage image) {
+	NSTextField widget = (NSTextField) textView;
+	widget.setDrawsBackground(image == null);
+	NSText editor = widget.window().fieldEditor(true, widget);
+	editor.setDrawsBackground(image == null);
+}
 /**
  * Sets the number of decimal places used by the receiver.
  * <p>
@@ -769,11 +802,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -783,7 +816,7 @@ public void setIncrement (int value) {
 public void setMaximum (int value) {
 	checkWidget ();
 	int min = getMinimum ();
-	if (value <= min) return;
+	if (value < min) return;
 	int pos = getSelection();
 	buttonView.setMaxValue(value);
 	if (pos > value) setSelection (value, true, true, false);	
@@ -791,11 +824,11 @@ public void setMaximum (int value) {
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -805,7 +838,7 @@ public void setMaximum (int value) {
 public void setMinimum (int value) {
 	checkWidget ();
 	int max = getMaximum();
-	if (value >= max) return;
+	if (value > max) return;
 	int pos = getSelection();
 	buttonView.setMinValue(value);
 	if (pos < value) setSelection (value, true, true, false);
@@ -829,6 +862,11 @@ public void setPageIncrement (int value) {
 	pageIncrement = value;
 }
 
+void setOrientation () {
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+	textView.setBaseWritingDirection(direction);
+}
+
 /**
  * Sets the <em>selection</em>, which is the receiver's
  * position, to the argument. If the argument is not within
@@ -886,7 +924,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
 		if (fieldEditor != null) fieldEditor.setSelectedRange(selection);
 		sendEvent (SWT.Modify);
 	}
-	if (notify) postEvent (SWT.Selection);
+	if (notify) sendSelectionEvent (SWT.Selection);
 }
 
 void setSmallSize () {
@@ -947,7 +985,7 @@ public void setTextLimit (int limit) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java
index 095bb05..b842321 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java	
@@ -156,6 +156,11 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	return super.computeTrim (x, y, width, height);
 }
 
+NSAttributedString createString(String text) {
+	NSAttributedString attribStr = createString(text, null, foreground, 0, false, true, true);
+	return attribStr;
+}
+
 void createHandle () {
 	NSTabView widget = (NSTabView)new SWTTabView().alloc();
 	widget.init ();
@@ -177,8 +182,10 @@ void createItem (TabItem item, int index) {
 	System.arraycopy (items, index, items, index + 1, count - index);
 	items [index] = item;
 	itemCount++;
-	NSTabViewItem nsItem = (NSTabViewItem)new NSTabViewItem().alloc().init();
+	NSTabViewItem nsItem = (NSTabViewItem)new SWTTabViewItem().alloc().init();
 	item.nsItem = nsItem;
+	item.createJNIRef ();
+	item.register ();
 	((NSTabView)view).insertTabViewItem(nsItem, index);
 }
 
@@ -209,6 +216,11 @@ void destroyItem (TabItem item) {
 	((NSTabView)view).removeTabViewItem(item.nsItem);
 }
 
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+	if (id != view.id) return;
+	fillBackground (view, context, rect, -1);
+}
+
 Widget findTooltip (NSPoint pt) {
 	pt = view.convertPoint_fromView_ (pt, null);
 	NSTabViewItem nsItem = ((NSTabView)view).tabViewItemAtPoint (pt);
@@ -402,6 +414,10 @@ public int indexOf (TabItem item) {
 	return -1;
 }
 
+boolean isTransparent() {
+	return true;
+}
+
 Point minimumSize (int wHint, int hHint, boolean flushCache) {
 	Control [] children = _getChildren ();
 	int width = 0, height = 0;
@@ -473,8 +489,28 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemCount; i++) {
+			TabItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setFont (NSFont font) {
 	((NSTabView)view).setFont(font);
+	for (int i = 0; i < itemCount; i++) {
+		items[i].updateText();
+	}
+}
+
+void setForeground (float /*double*/ [] color) {
+	super.setForeground(color);
+	for (int i = 0; i < itemCount; i++) {
+		items[i].updateText();
+	}
 }
 
 /**
@@ -575,7 +611,7 @@ void setSelection (int index, boolean notify, boolean force) {
 			if (notify) {
 				Event event = new Event ();
 				event.item = item;
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 			}
 		}
 	}
@@ -643,7 +679,7 @@ void tabView_didSelectTabViewItem(int /*long*/ id, int /*long*/ sel, int /*long*
 			if (!ignoreSelect) {
 				Event event = new Event ();
 				event.item = item;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java
index dcbca3e..481c041 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,10 +33,12 @@ import org.eclipse.swt.internal.cocoa.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class TabItem extends Item {
+	static final int IMAGE_GAP = 2;
 	TabFolder parent;
 	Control control;
 	String toolTipText;
 	NSTabViewItem nsItem;
+	NSAttributedString attriStr;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -112,15 +114,63 @@ public TabItem (TabFolder parent, int style, int index) {
 	parent.createItem (this, index);
 }
 
+int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	
+	if (id == nsItem.id) {
+		NSString nsAttributeName = new NSString(arg0);
+
+		if (nsAttributeName.isEqualToString(OS.NSAccessibilityTitleAttribute)) {
+			if (text != null) {
+				return NSString.stringWith(text).id;
+			}
+		} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityHelpAttribute)) {
+			if (toolTipText != null) {
+				return NSString.stringWith(toolTipText).id;
+			}
+		}
+	}
+	
+	return super.accessibilityAttributeValue(id, sel, arg0);
+}
+
 protected void checkSubclass () {
 	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
 }
 
+void deregister () {
+	super.deregister ();
+	display.removeWidget (nsItem);
+}
+
 void destroyWidget () {
 	parent.destroyItem (this);
 	releaseHandle ();
 }
 
+void drawLabelInRect(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+	if (image != null && !image.isDisposed()) {
+		NSSize imageSize = image.handle.size();
+		NSRect destRect = new NSRect();
+		destRect.x = rect.x;
+		destRect.y = rect.y;
+		destRect.width = imageSize.width;
+		destRect.height = imageSize.height;
+		NSGraphicsContext.static_saveGraphicsState();
+		NSAffineTransform transform = NSAffineTransform.transform();
+		transform.scaleXBy(1, -1);
+		transform.translateXBy(0, -(destRect.height + 2 * destRect.y));
+		transform.concat();
+		image.handle.drawInRect(destRect, new NSRect(), OS.NSCompositeSourceOver, 1);
+		NSGraphicsContext.static_restoreGraphicsState();
+		rect.x += imageSize.width + IMAGE_GAP;
+		rect.width -= imageSize.width + IMAGE_GAP;		
+	}
+	if (attriStr != null) {
+		attriStr.drawInRect(rect);
+	}
+	super.drawLabelInRect(id, sel, shouldTruncateLabel, rect);
+}
+
 /**
  * Returns a rectangle describing the receiver's size and location
  * relative to its parent.
@@ -204,10 +254,17 @@ public String getToolTipText () {
 	return toolTipText;
 }
 
+void register () {
+	super.register ();
+	display.addWidget (nsItem, this);
+}
+
 void releaseHandle () {
 	super.releaseHandle ();
 	if (nsItem != null) nsItem.release();
 	nsItem = null;
+	if (attriStr != null) attriStr.release();
+	attriStr = null;
 	parent = null;
 }
 
@@ -293,6 +350,8 @@ public void setImage (Image image) {
 	int index = parent.indexOf (this);
 	if (index == -1) return;
 	super.setImage (image);
+	//force parent to resize
+	nsItem.setLabel(NSString.string());
 }
 
 /**
@@ -327,11 +386,7 @@ public void setText (String string) {
 	int index = parent.indexOf (this);
 	if (index == -1) return;
 	super.setText (string);
-	char [] chars = new char [string.length ()];
-	string.getChars (0, chars.length, chars, 0);
-	int length = fixMnemonic (chars);
-	NSString str = NSString.stringWithCharacters (chars, length);
-	nsItem.setLabel (str);
+	updateText ();
 }
 
 /**
@@ -360,14 +415,30 @@ public void setToolTipText (String string) {
 	parent.checkToolTip (this);
 }
 
+NSSize sizeOfLabel(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel) {
+	NSSize size = super.sizeOfLabel(id, sel, shouldTruncateLabel);
+	if (image != null && !image.isDisposed()) {
+		NSSize imageSize = image.handle.size();
+		size.width += imageSize.width + IMAGE_GAP;
+	}
+	if (attriStr != null) {
+		NSSize textSize = attriStr.size();
+		size.width += textSize.width;
+	}
+	return size;
+}
+
 String tooltipText () {
 	return toolTipText;
 }
 
-void update () {
-	setText (text);
-	setImage (image);
-	setToolTipText (toolTipText);
+void updateText () {
+	if (attriStr != null) {
+		attriStr.release();
+	}
+	attriStr = parent.createString(getText());
+	//force parent to resize
+	nsItem.setLabel(NSString.string());
 }
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index d74ceda..a7ed6d3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.swt.widgets;
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
@@ -76,7 +75,7 @@ public class Table extends Composite {
 	NSTextFieldCell dataCell;
 	NSButtonCell buttonCell;
 	int columnCount, itemCount, lastIndexOf, sortDirection;
-	boolean ignoreSelect, fixScrollWidth, drawExpansion;
+	boolean ignoreSelect, fixScrollWidth, drawExpansion, didSelect;
 	Rectangle imageBounds;
 
 	static int NEXT_ID;
@@ -124,25 +123,6 @@ public Table (Composite parent, int style) {
 	super (parent, checkStyle (style));
 }
 
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-	
-	if (accessible != null) {
-		NSString attribute = new NSString(arg0);
-		id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
-		if (returnValue != null) return returnValue.id;
-	}
-	
-	NSString attributeName = new NSString(arg0);
-	
-	// Accessibility Verifier queries for a title or description.  NSTableView doesn't
-	// seem to return either, so we return a default description value here.
-	if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
-		return NSString.stringWith("").id;
-	}
-	
-	return super.accessibilityAttributeValue(id, sel, arg0);
-}
-
 void _addListener (int eventType, Listener listener) {
 	super._addListener (eventType, listener);
 	clearCachedWidth(items);
@@ -523,10 +503,13 @@ void createHandle () {
 	headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
 	widget.setHeaderView (null);
 
-	NSString str = NSString.stringWith(""); //$NON-NLS-1$
+	NSString str = NSString.string();
 	if ((style & SWT.CHECK) != 0) {
 		checkColumn = (NSTableColumn)new NSTableColumn().alloc();
-		checkColumn = checkColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+		NSString nsstring = (NSString) new NSString().alloc();
+		nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+		checkColumn = checkColumn.initWithIdentifier(nsstring);
+		nsstring.release();
 		checkColumn.headerCell().setTitle(str);
 		widget.addTableColumn (checkColumn);
 		checkColumn.setResizingMask(OS.NSTableColumnNoResizing);
@@ -542,7 +525,10 @@ void createHandle () {
 	}
 
 	firstColumn = (NSTableColumn)new NSTableColumn().alloc();
-	firstColumn = firstColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+	firstColumn = firstColumn.initWithIdentifier(nsstring);
+	nsstring.release();
 	/*
 	* Feature in Cocoa.  If a column's width is too small to show any content
 	* then tableView_objectValueForTableColumn_row is never invoked to
@@ -552,6 +538,7 @@ void createHandle () {
 	*/
 	firstColumn.setMinWidth (FIRST_COLUMN_MINIMUM_WIDTH);
 	firstColumn.setWidth(0);
+	firstColumn.setResizingMask (OS.NSTableColumnNoResizing);
 	firstColumn.headerCell ().setTitle (str);
 	widget.addTableColumn (firstColumn);
 	dataCell = (NSTextFieldCell)new SWTImageTextCell ().alloc ().init ();
@@ -574,11 +561,15 @@ void createItem (TableColumn column, int index) {
 		//TODO - clear attributes, alignment etc.
 		nsColumn = firstColumn;
 		nsColumn.setMinWidth (0);
+		nsColumn.setResizingMask (OS.NSTableColumnUserResizingMask);
 		firstColumn = null;
 	} else {
 		//TODO - set attributes, alignment etc.
 		nsColumn = (NSTableColumn)new NSTableColumn().alloc();
-		nsColumn = nsColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+		NSString nsstring = (NSString) new NSString().alloc();
+		nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+		nsColumn = nsColumn.initWithIdentifier(nsstring);
+		nsstring.release();
 		nsColumn.setMinWidth(0);
 		((NSTableView)view).addTableColumn (nsColumn);
 		int checkColumn = (style & SWT.CHECK) != 0 ? 1 : 0;
@@ -614,11 +605,7 @@ void createItem (TableItem item, int index) {
 	}
 	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
 	items [index] = item;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (index != itemCount) fixSelection (index, true);
 }
 
@@ -825,6 +812,7 @@ void destroyItem (TableColumn column) {
 		* column always has a minimal width that makes this call come in.
 		*/
 		firstColumn.setMinWidth (FIRST_COLUMN_MINIMUM_WIDTH);
+		firstColumn.setResizingMask (OS.NSTableColumnNoResizing);
 		setScrollWidth ();
 	} else {
 		((NSTableView)view).removeTableColumn(column.nsColumn);
@@ -852,11 +840,7 @@ void destroyItem (TableItem item) {
 	if (index != itemCount - 1) fixSelection (index, false); 
 	System.arraycopy (items, index + 1, items, index, --itemCount - index);
 	items [itemCount] = null;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (itemCount == 0) setTableEmpty ();
 }
 
@@ -865,6 +849,12 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
 	return false;
 }
 
+void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+	super.drawViewBackgroundInRect(id, sel, rect);
+	if (id != view.id) return;
+	fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
+}
+
 void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rect, int /*long*/ view) {
 	boolean hooksErase = hooks (SWT.EraseItem);
 	boolean hooksPaint = hooks (SWT.PaintItem);
@@ -894,7 +884,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 	boolean drawForeground = true;
 	boolean isSelected = cell.isHighlighted();
 	boolean drawSelection = isSelected;
-	boolean hasFocus = hooksErase && hasFocus ();
+	boolean hasFocus = hasFocus ();
 
 	Color selectionBackground = null, selectionForeground = null;
 	if (isSelected && (hooksErase || hooksPaint)) {
@@ -1036,12 +1026,20 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 				NSRange range = new NSRange();
 				range.length = newStr.length();
 				newStr.removeAttribute(OS.NSForegroundColorAttributeName, range);
+				int alignment = columnCount == 0 ? SWT.LEFT : columns[columnIndex].style & (SWT.LEFT | SWT.CENTER | SWT.RIGHT);
+				NSSize size = newStr.size();
 				NSRect newRect = new NSRect();
 				newRect.x = rect.x + TEXT_GAP;
 				newRect.y = rect.y;
 				newRect.width = rect.width - TEXT_GAP;
+				switch (alignment) {
+					case SWT.CENTER: newRect.width -= TEXT_GAP / 2.0f + 1; break;
+					case SWT.RIGHT: {
+						if (rect.width > size.width) newRect.width -= TEXT_GAP;
+						break;
+					}
+				}
 				newRect.height = rect.height;
-				NSSize size = newStr.size();
 				if (newRect.height > size.height) {
 					newRect.y += (newRect.height - size.height) / 2;
 					newRect.height = size.height;
@@ -1093,7 +1091,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 		event.index = columnIndex;
 		if (drawForeground) event.detail |= SWT.FOREGROUND;
 		if (drawBackground) event.detail |= SWT.BACKGROUND;
-		if (drawSelection) event.detail |= SWT.SELECTED;
+		if (isSelected) event.detail |= SWT.SELECTED;
 		event.x = itemX;
 		event.y = itemY;
 		event.width = contentWidth;
@@ -1125,14 +1123,21 @@ NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect
 	if (toolTipText == null) {
 		NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
 		NSCell cell = new NSCell(id);
+		NSAttributedString str = cell.attributedStringValue();
+		NSSize textSize = str.size();
+		NSRect expansionRect;
 		if (rect.width != 0 && rect.height != 0) {
 			if (hooks(SWT.MeasureItem)) {
+				expansionRect = cellRect;
 				NSSize cellSize = cell.cellSize();
-				cellRect.width = cellSize.width;
-				return cellRect;
+				expansionRect.width = cellSize.width;
+			} else {
+				expansionRect = rect;
+			}
+			if (textSize.height > expansionRect.height) {
+				expansionRect.height = textSize.height;
 			}
 		} else {
-			NSRect expansionRect;
 			if (hooks(SWT.MeasureItem)) {
 				expansionRect = cellRect;
 				NSSize cellSize = cell.cellSize();
@@ -1142,13 +1147,17 @@ NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect
 				NSSize cellSize = super.cellSize(id, OS.sel_cellSize);
 				expansionRect.width = cellSize.width;
 			}
-			NSRect contentRect = scrollView.contentView().bounds();
-			OS.NSIntersectionRect(contentRect, expansionRect, contentRect);
-			if (!OS.NSEqualRects(expansionRect, contentRect)) {
-				return expansionRect;
+			if (textSize.height > expansionRect.height) {
+				expansionRect.height = textSize.height;
+			} else {
+				NSRect contentRect = scrollView.contentView().bounds();
+				OS.NSIntersectionRect(contentRect, expansionRect, contentRect);
+				if (OS.NSEqualRects(expansionRect, contentRect)) {
+					return new NSRect();
+				}
 			}
 		}
-		return rect;
+		return expansionRect;
 	}
 	return new NSRect();
 }
@@ -1202,6 +1211,8 @@ public Rectangle getClientArea () {
 	Rectangle rect = super.getClientArea ();
 	NSTableHeaderView headerView = ((NSTableView) view).headerView ();
 	if (headerView != null) {
+		// The origin of the table is the top-left of the rows of the table,
+		// not the header.  Adjust the y value accordingly.
 		int height =  (int) headerView.bounds ().height;
 		rect.y -= height;
 		rect.height += height;
@@ -1704,6 +1715,7 @@ public int getTopIndex () {
 	NSPoint point = new NSPoint();
 	point.x = rect.x;
 	point.y = rect.y;
+	
 	int /*64*/ rowAtPoint = (int)/*64*/((NSTableView)view).rowAtPoint(point);
 	if (rowAtPoint == -1) return 0; /* Empty table */ 
 	return rowAtPoint;	
@@ -1827,6 +1839,15 @@ public boolean isSelected (int index) {
 	return ((NSTableView)view).isRowSelected(index);
 }
 
+boolean isTransparent() {
+	return true;
+}
+
+void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	ignoreSelect = false;
+	super.keyDown(id, sel, theEvent);
+}
+
 boolean isTrim (NSView view) {
 	if (super.isTrim (view)) return true;
 	return view.id == headerView.id;
@@ -1882,12 +1903,41 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 		// it from menuForEvent:.  This has the side effect, however, of sending control-click to the NSTableView,
 		// which is interpreted as a single click that clears the selection.  Fix is to ignore control-click if the 
 		// view has a context menu.
-		NSEvent nsEvent = new NSEvent(theEvent);
-		if ((nsEvent.modifierFlags() & OS.NSControlKeyMask) != 0) return;
+		NSEvent event = new NSEvent(theEvent);
+		if ((event.modifierFlags() & OS.NSControlKeyMask) != 0) return;
 	}
 	super.mouseDown(id, sel, theEvent);
 }
 
+void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	ignoreSelect = false;
+	NSTableView widget = (NSTableView)view;
+	NSEvent nsEvent = new NSEvent(theEvent);
+	NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
+	int row = (int)/*64*/widget.rowAtPoint(pt);
+	if (row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0) {
+		if (widget.isRowSelected(row)) {
+			if (0 <= row && row < itemCount) {
+				Event event = new Event ();
+				event.item = _getItem ((int)/*64*/row);
+				sendSelectionEvent (SWT.Selection, event, false);
+				
+				// Feature in Cocoa: This code path handles the case of an unmodified click on an already-selected row.
+				// If other rows are selected they will de-select and fire a tableViewSelectionDidChange message.
+				// To keep the order of events correct, send the selection event here and ignore the next
+				// tableViewSelectionDidChange message.  We'll reset the flag when the message is received.
+				if (widget.selectedRowIndexes().count() > 1) {
+					ignoreSelect = true;
+				}
+			}
+		}
+	}
+	display.trackedButtonRow = -1;
+	didSelect = false;
+	super.mouseDownSuper(id, sel, theEvent);
+	didSelect = false;
+}
+
 /*
  * Feature in Cocoa.  If a checkbox is in multi-state mode, nextState cycles
  * from off to mixed to on and back to off again.  This will cause the on state
@@ -1896,7 +1946,8 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
  */
 int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
 	NSTableView tableView = (NSTableView)view;
-	int index = (int)/*64*/tableView.selectedRow ();
+	int index = (int)/*64*/tableView.clickedRow();
+	if (index == -1) index = (int)/*64*/tableView.selectedRow ();
 	TableItem item = items[index];
 	if (item.grayed) {
 		return item.checked ? OS.NSOffState : OS.NSMixedState;
@@ -1979,11 +2030,7 @@ public void remove (int index) {
 	if (index != itemCount - 1) fixSelection (index, false);
 	System.arraycopy (items, index + 1, items, index, --itemCount - index);
 	items [itemCount] = null;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (itemCount == 0) {
 		setTableEmpty ();
 	}
@@ -2044,11 +2091,7 @@ public void remove (int start, int end) {
 			items [i] = null;
 		}
 		itemCount -= length;
-		NSTableView widget = (NSTableView)view;
-		setRedraw(false);
-		widget.noteNumberOfRowsChanged();
-		widget.tile();
-		setRedraw(true);
+		updateRowCount();
 	}
 	if (itemCount == 0) {
 		setTableEmpty ();
@@ -2093,11 +2136,7 @@ public void remove (int [] indices) {
 			last = index;
 		}
 	}
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 	if (itemCount == 0) {
 		setTableEmpty ();
 	}
@@ -2118,11 +2157,7 @@ public void removeAll () {
 		if (item != null && !item.isDisposed ()) item.release (false);
 	}
 	setTableEmpty ();
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 }
 
 /**
@@ -2150,6 +2185,22 @@ public void removeSelectionListener(SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemCount; i++) {
+			TableItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columnCount; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
@@ -2296,13 +2347,7 @@ public void selectAll () {
 	ignoreSelect = false;
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} 
+void setBackgroundColor(NSColor nsColor) {
 	((NSTableView) view).setBackgroundColor (nsColor);
 }
 
@@ -2427,7 +2472,6 @@ public void setItemCount (int count) {
 	checkWidget ();
 	count = Math.max (0, count);
 	if (count == itemCount) return;
-	if (count == itemCount) return;
 	TableItem [] children = items;
 	if (count < itemCount) {
 		for (int index = count; index < itemCount; index ++) {
@@ -2451,11 +2495,7 @@ public void setItemCount (int count) {
 	children = newItems;
 	this.items = newItems;
 	this.itemCount = count;
-	NSTableView widget = (NSTableView)view;
-	setRedraw(false);
-	widget.noteNumberOfRowsChanged ();
-	widget.tile();
-	setRedraw(true);
+	updateRowCount();
 }
 
 /*public*/ void setItemHeight (int itemHeight) {
@@ -2519,6 +2559,7 @@ public void setRedraw (boolean redraw) {
 public void setLinesVisible (boolean show) {
 	checkWidget ();
 	((NSTableView)view).setUsesAlternatingRowBackgroundColors(show);
+	((NSTableView)view).setGridStyleMask(show ? OS.NSTableViewSolidVerticalGridLineMask : OS.NSTableViewGridNone);
 }
 
 boolean setScrollWidth () {
@@ -2759,8 +2800,7 @@ public void setSortColumn (TableColumn column) {
 	checkWidget ();
 	if (column != null && column.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	if (column == sortColumn) return;
-	sortColumn = column;
-	((NSTableView)view).setHighlightedTableColumn (column == null ? null : column.nsColumn);
+	setSort(column, sortDirection);
 }
 
 /**
@@ -2780,13 +2820,25 @@ public void setSortDirection  (int direction) {
 	checkWidget ();
 	if (direction != SWT.UP && direction != SWT.DOWN && direction != SWT.NONE) return;
 	if (direction == sortDirection) return;
+	setSort(sortColumn, direction);
+}
+
+void setSort (TableColumn column, int direction) {
+	NSImage image = null;
+	NSTableColumn nsColumn = null;
+	if (column != null) {
+		nsColumn = column.nsColumn;
+		if (direction == SWT.DOWN) image = NSImage.imageNamed(NSString.stringWith("NSDescendingSortIndicator"));
+		if (direction == SWT.UP) image = NSImage.imageNamed(NSString.stringWith("NSAscendingSortIndicator"));
+	}
+	NSTableView widget = (NSTableView)view;
+	if (sortColumn != null && sortColumn != column) {
+		widget.setIndicatorImage(null, sortColumn.nsColumn);
+	}
+	widget.setHighlightedTableColumn(nsColumn);
+	widget.setIndicatorImage(image, nsColumn);
 	sortDirection = direction;
-	if (sortColumn == null) return;
-	NSTableHeaderView headerView = ((NSTableView)view).headerView ();
-	if (headerView == null) return;
-	int index = indexOf (sortColumn.nsColumn);
-	NSRect rect = headerView.headerRectOfColumn (index);
-	headerView.setNeedsDisplayInRect (rect);
+	sortColumn = column;
 }
 
 void setTableEmpty () {
@@ -2906,12 +2958,14 @@ void sendDoubleSelection() {
 		if ((style & SWT.CHECK) != 0) {
 			NSArray columns = tableView.tableColumns ();
 			int columnIndex = (int)/*64*/tableView.clickedColumn ();
-			id column = columns.objectAtIndex (columnIndex);
-			if (column.id == checkColumn.id) return;
+			if (columnIndex != -1) {
+				id column = columns.objectAtIndex (columnIndex);
+				if (column.id == checkColumn.id) return;
+			}
 		}
 		Event event = new Event ();
 		event.item = _getItem (rowIndex);
-		postEvent (SWT.DefaultSelection, event);
+		sendSelectionEvent (SWT.DefaultSelection, event, false);
 	}
 }
 
@@ -2923,7 +2977,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 	switch (keyCode) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 	}
@@ -2967,13 +3021,27 @@ void sendMeasureItem (TableItem item, int columnIndex, NSSize size) {
 void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 	NSNotification notification = new NSNotification (aNotification);
 	NSDictionary userInfo = notification.userInfo ();
-	id nsOldIndex = userInfo.valueForKey (NSString.stringWith ("NSOldColumn")); //$NON-NLS-1$
-	id nsNewIndex = userInfo.valueForKey (NSString.stringWith ("NSNewColumn")); //$NON-NLS-1$
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSOldColumn"); //$NON-NLS-1$
+	id nsOldIndex = userInfo.valueForKey (nsstring); 
+	nsstring.release();
+	nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSNewColumn"); //$NON-NLS-1$
+	id nsNewIndex = userInfo.valueForKey (nsstring);
+	nsstring.release();
 	int oldIndex = new NSNumber (nsOldIndex).intValue ();
 	int newIndex = new NSNumber (nsNewIndex).intValue ();
+	NSTableView tableView = (NSTableView)view;
+	if (checkColumn != null && newIndex == 0) {
+		newIndex = 1;
+		NSNotificationCenter defaultCenter = NSNotificationCenter.defaultCenter();
+		defaultCenter.removeObserver(view, OS.NSTableViewColumnDidMoveNotification, null);
+		tableView.moveColumn(0, newIndex);
+		defaultCenter.addObserver(view,  OS.sel_tableViewColumnDidMove_, OS.NSTableViewColumnDidMoveNotification, null);
+		if (oldIndex == newIndex) return;
+	}
 	int startIndex = Math.min (oldIndex, newIndex);
 	int endIndex = Math.max (oldIndex, newIndex);
-	NSTableView tableView = (NSTableView)view;
 	NSArray nsColumns = tableView.tableColumns ();
 	for (int i = startIndex; i <= endIndex; i++) {
 		id columnId = nsColumns.objectAtIndex (i);
@@ -2988,7 +3056,10 @@ void tableViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNo
 void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 	NSNotification notification = new NSNotification (aNotification);
 	NSDictionary userInfo = notification.userInfo ();
-	id columnId = userInfo.valueForKey (NSString.stringWith ("NSTableColumn")); //$NON-NLS-1$
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSTableColumn"); //$NON-NLS-1$
+	id columnId = userInfo.valueForKey (nsstring);
+	nsstring.release();
 	TableColumn column = getColumn (columnId);
 	if (column == null) return; /* either CHECK column or firstColumn in 0-column Table */
 
@@ -3011,25 +3082,35 @@ void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ a
 	}
 }
 
-void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+void sendSelection () {
 	if (ignoreSelect) return;
 	NSTableView widget = (NSTableView) view;
 	int row = (int)/*64*/widget.selectedRow ();
 	if(row == -1)
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	else {
 		TableItem item = _getItem (row);
 		Event event = new Event ();
 		event.item = item;
 		event.index = row;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 }
 
+void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+	if (didSelect) return;
+	sendSelection();
+}
+
+void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+	didSelect = true;
+	sendSelection();
+}
+
 void tableView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
 	TableColumn column = getColumn (new id (tableColumn));
 	if (column == null) return; /* either CHECK column or firstColumn in 0-column Table */
-	column.postEvent (SWT.Selection);
+	column.sendSelectionEvent (SWT.Selection);
 }
 
 int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
@@ -3053,6 +3134,64 @@ int /*long*/ tableView_objectValueForTableColumn_row (int /*long*/ id, int /*lon
 	return item.createString (0).id;
 }
 
+boolean tableView_shouldSelectRow(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ rowIndex) {
+	boolean result = true;
+
+	if ((style & SWT.SINGLE) != 0) {
+		/*
+		 * Feature in Cocoa.  Calling setAllowsEmptySelection will automatically select the first row of the list. 
+		 * And, single-selection NSTable/OutlineViews allow the user to de-select the selected item via command-click.
+		 * This is normal platform behavior, but for compatibility with other platforms, if the SINGLE style is in use,
+		 * force a selection by seeing if the proposed selection set is empty, and if so, put back the currently selected row.  
+		 */
+		NSTableView table = new NSTableView(aTableView);			
+		NSIndexSet indexes = table.selectedRowIndexes();
+		if (indexes.count() != 1 && table.selectedRow() != -1) {
+			return false;
+		}
+	}
+
+	// If a checkbox is being tracked don't select the row.
+	if (display.trackedButtonRow != -1) return false;
+	NSTableView tableView = (NSTableView)view;
+    int /*long*/ clickedCol = tableView.clickedColumn();
+    int /*long*/ clickedRow = tableView.clickedRow();
+    if (clickedRow >= 0 && clickedCol >= 0) {
+        NSCell cell = tableView.preparedCellAtColumn(clickedCol, clickedRow);
+        if (cell.isKindOfClass(OS.class_NSButtonCell) && cell.isEnabled()) {
+            NSRect cellFrame = tableView.frameOfCellAtColumn(clickedCol, clickedRow);
+            NSRect imageFrame = cell.imageRectForBounds(cellFrame);
+            NSPoint hitPoint = tableView.convertPoint_fromView_(NSApplication.sharedApplication().currentEvent().locationInWindow(), null);
+            result = ! OS.NSPointInRect(hitPoint, imageFrame) || didSelect;
+        }            
+    }
+    return result;
+}
+
+boolean tableView_shouldTrackCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel,
+		int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ rowIndex) {
+	NSCell theCell = new NSCell(cell);
+	NSTableView tableView = (NSTableView)view;
+	if (theCell.isKindOfClass(OS.class_NSButtonCell)) {
+		// Allow tracking of the checkbox area of the button, not the text itself.
+		int columnIndex = 0;
+		for (int i=0; i<columnCount; i++) {
+			if (columns [i].nsColumn.id == tableColumn) {
+				columnIndex = i;
+				break;
+			}
+		}
+		NSRect cellFrame = tableView.frameOfCellAtColumn(columnIndex, rowIndex);
+		NSRect imageFrame = theCell.imageRectForBounds(cellFrame);
+		NSPoint hitPoint = tableView.convertPoint_fromView_(NSApplication.sharedApplication().currentEvent().locationInWindow(), null);
+		boolean shouldTrack = OS.NSPointInRect(hitPoint, imageFrame) && (display.trackedButtonRow == -1 || display.trackedButtonRow == rowIndex) && !didSelect;
+		if (OS.NSPointInRect(hitPoint, imageFrame) && display.trackedButtonRow == -1 && !didSelect) display.trackedButtonRow = rowIndex;
+		return shouldTrack;
+	} else {
+		return tableView.isRowSelected(rowIndex);
+	}
+}
+
 void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) {
 	if (checkColumn != null && aTableColumn == checkColumn.id)  {
 		TableItem item = items [(int)/*64*/rowIndex];
@@ -3061,7 +3200,7 @@ void tableView_setObjectValue_forTableColumn_row (int /*long*/ id, int /*long*/
 		event.detail = SWT.CHECK;
 		event.item = item;
 		event.index = (int)/*64*/rowIndex;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 		item.redraw (-1);
 	}
 }
@@ -3098,6 +3237,7 @@ void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/
 	} else {
 		color = NSColor.disabledControlTextColor();
 	}
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
 	int alignment = OS.NSLeftTextAlignment;
 	if (columnCount > 0) {
 		int style = columns [index].style;
@@ -3119,6 +3259,7 @@ void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/
 		NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
 		paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
 		paragraphStyle.setAlignment (alignment);
+		paragraphStyle.setBaseWritingDirection(direction);
 		dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
 		paragraphStyle.release ();
 		NSAttributedString attribStr = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (textCell.title(), dict);
@@ -3129,6 +3270,7 @@ void tableView_willDisplayCell_forTableColumn_row (int /*long*/ id, int /*long*/
 		textCell.setFont(font.handle);
 		textCell.setTextColor(color);
 		textCell.setAlignment (alignment);
+		textCell.setBaseWritingDirection(direction);
 	}
 }
 
@@ -3151,4 +3293,14 @@ void updateCursorRects (boolean enabled) {
 	if (headerView == null) return;
 	updateCursorRects (enabled, headerView);
 }
+
+void updateRowCount() {
+	NSTableView table = (NSTableView)view;
+	setRedraw(false);
+	ignoreSelect = true;
+	table.noteNumberOfRowsChanged();
+	ignoreSelect = false;
+	table.tile();
+	setRedraw(true);
+}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
index 65de099..a4332b1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java	
@@ -252,7 +252,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cel
 	if (image != null) {
 		NSRect destRect = new NSRect ();
 		destRect.x = drawX;
-		destRect.y = cellRect.y;
+		destRect.y = Math.max(cellRect.y, cellRect.y + (cellRect.height - imageSize.height)/2);
 		destRect.width = Math.min (imageSize.width, cellRect.width - 2 * MARGIN);
 		destRect.height = Math.min (imageSize.height, cellRect.height);
 		boolean isFlipped = new NSView (view).isFlipped(); 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java
index e3ed6ab..fd993ba 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableItem.java	
@@ -11,10 +11,9 @@
 package org.eclipse.swt.widgets;
 
 
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * Instances of this class represent a selectable user interface object
@@ -141,7 +140,10 @@ int calculateWidth (int index, GC gc) {
 		attribStr.release();
 	} else {
 		cell.setFont (font.handle);
-		cell.setTitle (NSString.stringWith(text != null ? text : ""));
+		NSString str = (NSString) new NSString().alloc();
+		str = str.initWithString(text != null ? text : "");
+		cell.setTitle (str);
+		str.release();
 	}
 
 	/* This code is inlined for performance */
@@ -248,10 +250,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -263,9 +265,44 @@ public Color getBackground (int index) {
 public Rectangle getBounds () {
 	checkWidget ();
 	if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
-	NSTableView tableView = (NSTableView) parent.view;
-	NSRect rect = tableView.rectOfRow (parent.indexOf (this));
-	return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
+	NSTableView widget = (NSTableView) parent.view;
+	int rowIndex = parent.indexOf (this);
+
+	NSTableColumn column = parent.columnCount == 0 ? parent.firstColumn : parent.columns [0].nsColumn;
+	int columnIndex = parent.indexOf (column);
+	NSRect titleRect = widget.frameOfCellAtColumn (columnIndex, rowIndex);
+	if (image != null) {
+		titleRect.x += parent.imageBounds.width + Table.IMAGE_GAP;
+	}
+	Font font = null;
+	if (cellFont != null) font = cellFont[columnIndex];
+	if (font == null) font = this.font;
+	if (font == null) font = parent.font;
+	if (font == null) font = parent.defaultFont ();
+	NSCell cell = parent.dataCell;
+	cell.setImage (null);
+	if (font.extraTraits != 0) {
+		NSAttributedString attribStr = parent.createString (text, font, null, 0, false, true, false);
+		cell.setAttributedStringValue (attribStr);
+		attribStr.release ();
+	} else {
+		cell.setFont (font.handle);
+		NSString str = (NSString) new NSString().alloc();
+		str = str.initWithString(text);
+		cell.setTitle (str);
+		str.release();
+	}
+	// Inlined for performance.  Also prevents a NPE or potential loop, because cellSize() will
+	// eventually send another MeasureItem event.
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = cell.id;
+	super_struct.super_class = OS.objc_msgSend(cell.id, OS.sel_superclass);
+	NSSize size = new NSSize();
+	OS.objc_msgSendSuper_stret(size, super_struct, OS.sel_cellSize);
+//	NSSize size = cell.cellSize ();
+	NSRect columnRect = widget.rectOfColumn (columnIndex);
+	size.width = Math.min (size.width, columnRect.width - (titleRect.x - columnRect.x));
+	return new Rectangle ((int)titleRect.x, (int)titleRect.y, (int)Math.ceil (size.width), (int)Math.ceil (titleRect.height));
 }
 
 /**
@@ -472,7 +509,7 @@ public Rectangle getImageBounds (int index) {
 		index = parent.indexOf (column.nsColumn);
 	}
 	NSRect rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
-	rect.x += Tree.IMAGE_GAP;
+	rect.x += Table.IMAGE_GAP;
 	if (image != null) {
 		rect.width = parent.imageBounds.width;
 	} else {
@@ -580,10 +617,10 @@ public Rectangle getTextBounds (int index) {
 		index = parent.indexOf (column.nsColumn);
 	}
 	NSRect rect = tableView.frameOfCellAtColumn (index, parent.indexOf (this));
-	rect.x += Tree.TEXT_GAP;
-	rect.width -= Tree.TEXT_GAP;
+	rect.x += Table.TEXT_GAP;
+	rect.width -= Table.TEXT_GAP;
 	if (image != null) {
-		int offset = parent.imageBounds.width + Tree.IMAGE_GAP;
+		int offset = parent.imageBounds.width + Table.IMAGE_GAP;
 		rect.x += offset;
 		rect.width -= offset;
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskBar.java
new file mode 100644
index 0000000..9e425f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskBar.java	
@@ -0,0 +1,195 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.*;
+
+/**
+ * Instances of this class represent the system task bar.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ * 
+ * @see Display#getSystemTaskBar
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskBar extends Widget {
+	int itemCount;
+	TaskItem [] items = new TaskItem [4];
+
+TaskBar (Display display, int style) {
+	if (display == null) display = Display.getCurrent ();
+	if (display == null) display = Display.getDefault ();
+	if (!display.isValidThread ()) {
+		error (SWT.ERROR_THREAD_INVALID_ACCESS);
+	}
+	this.display = display;
+	reskinWidget ();
+}
+
+void createItem (TaskItem item, int index) {
+	if (index == -1) index = itemCount;
+	if (!(0 <= index && index <= itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	if (itemCount == items.length) {
+		TaskItem [] newItems = new TaskItem [items.length + 4];
+		System.arraycopy (items, 0, newItems, 0, items.length);
+		items = newItems;
+	}
+	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
+	items [index] = item;
+}
+
+void createItems () {
+	getItem (null);
+}
+
+void destroyItem (TaskItem item) {
+	int index = 0;
+	while (index < itemCount) {
+		if (items [index] == item) break;
+		index++;
+	}
+	if (index == itemCount) return;
+	System.arraycopy (items, index + 1, items, index, --itemCount - index);
+	items [itemCount] = null;
+}
+
+/**
+ * Returns the item at the given, zero-relative index in the
+ * receiver. Throws an exception if the index is out of range.
+ *
+ * @param index the index of the item to return
+ * @return the item at the given index
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (int index) {
+	checkWidget ();
+	createItems ();
+	if (!(0 <= index && index < itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	return items [index];
+}
+
+/**
+ * Returns the number of items contained in the receiver.
+ *
+ * @return the number of items
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getItemCount () {
+	checkWidget ();
+	createItems ();
+	return itemCount;
+}
+
+/**
+ * Returns the <code>TaskItem</code> for the given <code>Shell</code> or the <code>TaskItem</code> 
+ * for the application if the <code>Shell</code> parameter is <code>null</code>.
+ * If the requested item is not supported by the platform it returns <code>null</code>.
+ * 
+ * @param shell the shell for which the task item is requested, or null to request the application item
+ * @return the task item for the given shell or the application
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (Shell shell) {
+	checkWidget ();
+	for (int i = 0; i < itemCount; i++) {
+		if (items [i] != null && items [i].shell == shell) {
+			return items [i];
+		}
+	}
+	TaskItem item = null;
+	if (shell == null) {
+		item = new TaskItem (this, SWT.NONE);
+	} else {
+		// on the Mac only the application item is supported
+//		TaskBarItem item = new TaskBarItem (this, SWT.NONE);
+//		item.setShell (shell);
+	}
+	return item;
+}
+
+/**
+ * Returns an array of <code>TaskItem</code>s which are the items
+ * in the receiver. 
+ * <p>
+ * Note: This is not the actual structure used by the receiver
+ * to maintain its list of items, so modifying the array will
+ * not affect the receiver. 
+ * </p>
+ *
+ * @return the items in the receiver
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem [] getItems () {
+	checkWidget ();
+	createItems ();
+	TaskItem [] result = new TaskItem [itemCount];
+	System.arraycopy (items, 0, result, 0, result.length);
+	return result;
+}
+
+void releaseChildren (boolean destroy) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null && !item.isDisposed ()) {
+				item.release (false);
+			}
+		}
+		items = null;
+	}
+	super.releaseChildren (destroy);
+}
+
+void releaseParent () {
+	super.releaseParent ();
+	if (display.taskBar == this) display.taskBar = null;
+}
+
+void reskinChildren (int flags) {	
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java
new file mode 100644
index 0000000..921bb72
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TaskItem.java	
@@ -0,0 +1,484 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
+
+/**
+ * Instances of this class represent a task item.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskItem extends Item {
+	TaskBar parent;
+	Shell shell;
+	NSImage defaultImage;
+	int progress, iProgress, progressState = SWT.DEFAULT;
+	Image overlayImage;
+	String overlayText = "";
+	Menu menu;
+	
+	static final int PROGRESS_MAX = 100;
+	static final int PROGRESS_TIMER = 350;
+	static final int PROGRESS_BARS = 7;
+	
+/**
+ * Constructs a new instance of this class given its parent
+ * (which must be a <code>Tray</code>) and a style value
+ * describing its behavior and appearance. The item is added
+ * to the end of the items maintained by its parent.
+ * <p>
+ * The style value is either one of the style constants defined in
+ * class <code>SWT</code> which is applicable to instances of this
+ * class, or must be built by <em>bitwise OR</em>'ing together 
+ * (that is, using the <code>int</code> "|" operator) two or more
+ * of those <code>SWT</code> style constants. The class description
+ * lists the style constants that are applicable to the class.
+ * Style bits are also inherited from superclasses.
+ * </p>
+ *
+ * @param parent a composite control which will be the parent of the new instance (cannot be null)
+ * @param style the style of control to construct
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+ *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
+ * </ul>
+ *
+ * @see SWT
+ * @see Widget#checkSubclass
+ * @see Widget#getStyle
+ */
+TaskItem (TaskBar parent, int style) {
+	super (parent, style);
+	this.parent = parent;
+	parent.createItem (this, -1);
+	createWidget ();
+}
+
+protected void checkSubclass () {
+	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
+}
+
+void createWidget () {
+	NSApplication app = NSApplication.sharedApplication ();
+	NSImage image = app.applicationIconImage ();
+	defaultImage = new NSImage (image.copy ());
+}
+
+void destroyWidget () {
+	parent.destroyItem (this);
+	releaseHandle ();
+}
+
+/**
+ * Returns the receiver's pop up menu if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's menu
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Menu getMenu () {
+	checkWidget ();
+	return menu;
+} 
+
+/**
+ * Returns the receiver's overlay image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's overlay image
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Image getOverlayImage () {
+	checkWidget ();
+	return overlayImage;
+}
+
+/**
+ * Returns the receiver's overlay text, which will be an empty
+ * string if it has never been set.
+ *
+ * @return the receiver's overlay text
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public String getOverlayText () {
+	checkWidget ();
+	return overlayText;
+}
+
+/**
+ * Returns the receiver's parent, which must be a <code>TaskBar</code>.
+ *
+ * @return the receiver's parent
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ */
+public TaskBar getParent () {
+	checkWidget ();
+	return parent;
+}
+
+/**
+ * Returns the receiver's progress.
+ *
+ * @return the receiver's progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgress () {
+	checkWidget ();
+	return progress;
+}
+
+/**
+ * Returns the receiver's progress state.
+ *
+ * @return the receiver's progress state
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgressState () {
+	checkWidget ();
+	return progressState;
+}
+
+void releaseHandle () {
+	super.releaseHandle ();
+	parent = null;
+	if (defaultImage != null) defaultImage.release ();
+	defaultImage = null;
+}
+
+void releaseWidget () {
+	super.releaseWidget ();
+	overlayImage = null;
+	overlayText = null;
+	shell = null;
+}
+
+/**
+ * Sets the receiver's pop up menu to the argument. The way the menu is
+ * shown is platform specific.
+ * 
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * set this feature on the <code>TaskItem</code> for application.<br>
+ * On Windows, this feature will only work on RCP applications.</p>
+ *
+ * <p>
+ * The menu should be fully created before this method is called.
+ * Dynamic changes to the menu after the method is called will not be reflected
+ * in the native menu.</p> 
+ *
+ * @param menu the new pop up menu
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setMenu (Menu menu) {
+	checkWidget ();
+	if (menu != null) {
+		if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+		if ((menu.style & SWT.POP_UP) == 0) {
+			error (SWT.ERROR_MENU_NOT_POP_UP);
+		}
+	}
+	this.menu = menu;
+}
+
+/**
+ * Sets the receiver's overlay image, which may be null
+ * indicating that no image should be displayed. The bounds
+ * for the overlay image is determined by the platform and in 
+ * general it should be a small image.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayImage the new overlay image (may be null)
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if the overlayImage has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayImage (Image image) {
+	checkWidget ();
+	if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	overlayImage = image;
+	updateOverlayText (image != null ? null : overlayText);
+	updateImage ();
+}
+
+/**
+ * Sets the receiver's overlay text. The space available to display the
+ * overlay text is platform dependent and in general it should be no longer
+ * than a few characters.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return an empty string.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayText the new overlay text
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the overlayText is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayText (String string) {
+	checkWidget ();
+	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
+	overlayText = string;
+	updateOverlayText (string);
+	updateImage ();
+}
+
+/**
+ * Sets the receiver's progress, the progress represents a percentage and
+ * should be in range from 0 to 100. The progress is only shown when the progress
+ * state is different than <code>SWT#DEFAULT</code>.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return zero.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progress the new progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgressState(int)}
+ */
+public void setProgress (int progress) {
+	checkWidget ();
+	progress = Math.max (0, Math.min (progress, PROGRESS_MAX));
+	if (this.progress == progress) return;
+	this.progress = progress;
+	updateImage ();
+}
+
+/**
+ * Sets the receiver's progress state, the state can be one of
+ * the following:
+ * <p><ul>
+ * <li>{@link SWT#DEFAULT}</li>
+ * <li>{@link SWT#NORMAL}</li>
+ * <li>{@link SWT#PAUSED}</li>
+ * <li>{@link SWT#ERROR}</li>
+ * <li>{@link SWT#INDETERMINATE}</li>
+ * </ul></p>
+ * 
+ * The percentage of progress shown by the states <code>SWT#NORMAL</code>, <code>SWT#PAUSED</code>, 
+ * <code>SWT#ERROR</code> is set with <code>setProgress()</code>. <br>
+ * The state <code>SWT#DEFAULT</code> indicates that no progress should be shown.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return <code>SWT#DEFAULT</code>.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progressState the new progress state 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgress(int)}
+ */
+public void setProgressState (int progressState) {
+	checkWidget ();
+	if (this.progressState == progressState) return;
+	this.progressState = progressState;
+	updateImage ();
+}
+
+void setShell (Shell shell) {
+	this.shell = shell;
+	shell.addListener (SWT.Dispose, new Listener () {
+		public void handleEvent (Event event) {
+			if (isDisposed ()) return;
+			dispose ();
+		}
+	});
+}
+
+void updateImage () {
+	boolean drawProgress = progress != 0 && progressState != SWT.DEFAULT;
+	boolean drawIntermidiate = progressState == SWT.INDETERMINATE;
+	NSApplication app = NSApplication.sharedApplication ();
+	NSDockTile dock = app.dockTile ();
+	boolean drawImage = overlayImage != null && dock.badgeLabel () == null;
+	if (!drawImage && !drawProgress && !drawIntermidiate) {
+		app.setApplicationIconImage (defaultImage);
+		return;
+	}
+	
+	NSSize size = defaultImage.size ();
+	NSImage newImage = (NSImage)new NSImage().alloc ();
+	newImage = newImage.initWithSize (size);
+	NSBitmapImageRep rep = (NSBitmapImageRep)new NSBitmapImageRep ().alloc ();
+	rep = rep.initWithBitmapDataPlanes (0, (int)size.width, (int)size.height, 8, 4, true, false, OS.NSDeviceRGBColorSpace, OS.NSAlphaFirstBitmapFormat | OS.NSAlphaNonpremultipliedBitmapFormat, (int)size.width * 4, 32);
+	newImage.addRepresentation (rep);
+	rep.release ();
+	
+	NSRect rect = new NSRect ();
+	rect.height = size.height;
+	rect.width = size.width;
+	newImage.lockFocus ();
+	defaultImage.drawInRect (rect, rect, OS.NSCompositeSourceOver, 1);
+	if (drawImage) {
+		NSImage badgetImage = overlayImage.handle;
+		NSSize badgeSize = badgetImage.size ();
+		NSRect srcRect = new NSRect ();
+		srcRect.height = badgeSize.height;
+		srcRect.width = badgeSize.width;
+		NSRect dstRect = new NSRect ();
+		dstRect.x = size.width / 2;
+		dstRect.height = size.height / 2;
+		dstRect.width = size.width / 2;
+		badgetImage.drawInRect(dstRect, srcRect, OS.NSCompositeSourceOver, 1);
+	}
+	if (drawIntermidiate || drawProgress) {
+		switch (progressState) {
+			case SWT.ERROR:
+				NSColor.colorWithDeviceRed (1, 0, 0, 0.6f).setFill ();
+				break;
+			case SWT.PAUSED:
+				NSColor.colorWithDeviceRed (1, 1, 0, 0.6f).setFill ();
+				break;
+			default:
+				NSColor.colorWithDeviceRed (1, 1, 1, 0.6f).setFill ();
+		}
+		rect.width = size.width / (PROGRESS_BARS * 2 - 1);
+		rect.height = size.height / 3;
+		int count;
+		if (drawIntermidiate) {
+			count = iProgress;
+			iProgress = (iProgress + 1) % (PROGRESS_BARS + 1);
+			getDisplay ().timerExec (PROGRESS_TIMER, new Runnable () {
+				public void run () {
+					updateImage ();
+				}
+			});
+		} else {
+			count = progress * PROGRESS_BARS / PROGRESS_MAX;
+		}
+		for (int i = 0; i <= count; i++) {
+			rect.x = i * 2 * rect.width;
+			NSBezierPath.fillRect (rect);
+		}
+	}
+	newImage.unlockFocus ();
+	app.setApplicationIconImage (newImage);
+	newImage.release ();
+}
+
+void updateOverlayText (String string) {
+	NSApplication app = NSApplication.sharedApplication ();
+	NSDockTile dock = app.dockTile ();
+	if (string != null && string.length () > 0) {
+		dock.setBadgeLabel (NSString.stringWith (string));
+	} else {
+		dock.setBadgeLabel (null);
+	}
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index b7876ed..75d8045 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java	
@@ -13,7 +13,6 @@ package org.eclipse.swt.widgets;
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.cocoa.*;
 
 /**
@@ -31,7 +30,7 @@ import org.eclipse.swt.internal.cocoa.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
@@ -342,15 +341,17 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
 	int width = 0, height = 0;
 	if ((style & SWT.SINGLE) != 0) {
-		NSTextField widget = (NSTextField) view;
-		NSSize size = widget.cell ().cellSize ();
-		width = (int)Math.ceil (size.width);
+		NSCell cell = ((NSTextField) view).cell ();
+		NSSize size = cell.cellSize ();
+		if (cell.title ().length () > 0) {
+			width = (int)Math.ceil (size.width);
+		}
 		height = (int)Math.ceil (size.height);
 
 		Point border = null;
 		if ((style & SWT.BORDER) != 0 && (wHint != SWT.DEFAULT || hHint != SWT.DEFAULT)) {
 			/* determine the size of the cell without its border */
-			NSRect insets = widget.cell ().titleRectForBounds (new NSRect ());
+			NSRect insets = cell.titleRectForBounds (new NSRect ());
 			border = new Point (-(int)Math.ceil (insets.width), -(int)Math.ceil (insets.height));
 			width -= border.x;
 			height -= border.y;
@@ -436,6 +437,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
  */
 public void copy () {
 	checkWidget ();
+	if ((style & SWT.PASSWORD) != 0 || echoCharacter != '\0') return;
 	if ((style & SWT.SINGLE) != 0) {
 		Point selection = getSelection ();
 		if (selection.x == selection.y) return;
@@ -514,6 +516,7 @@ void createHandle () {
 		widget.setRichText (false);
 		widget.setDelegate(widget);
 		widget.setFont (display.getSystemFont ().handle);
+		widget.setUsesFontPanel(false);
 
 		view = widget;
 		scrollView = scrollWidget;
@@ -522,6 +525,14 @@ void createHandle () {
 
 void createWidget () {
 	super.createWidget ();
+	if ((style & SWT.PASSWORD) != 0) {
+		NSText fieldEditor = view.window().fieldEditor(true, view);
+		int /*long*/ nsSecureTextViewClass = OS.objc_lookUpClass("NSSecureTextView");
+		if (fieldEditor != null && nsSecureTextViewClass != 0 && fieldEditor.isKindOfClass(nsSecureTextViewClass)) {
+			int /*long*/ editorClass = OS.objc_getClass("SWTSecureEditorView");
+			OS.object_setClass(fieldEditor.id, editorClass);
+		}
+	}
 	doubleClick = true;
 	message = "";
 }
@@ -541,6 +552,7 @@ void createWidget () {
 public void cut () {
 	checkWidget ();
 	if ((style & SWT.READ_ONLY) != 0) return;
+	if ((style & SWT.PASSWORD) != 0 || echoCharacter != '\0') return;	
 	boolean cut = true;
 	char [] oldText = null;
 	Point oldSelection = getSelection ();
@@ -597,6 +609,30 @@ void deregister() {
 	}
 }
 
+void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
+	if ((style & SWT.SINGLE) != 0) {
+		if (backgroundImage == null) return;
+		if (new NSView(id).isKindOfClass(OS.class_NSText)) {
+			NSText text = new NSText(id);
+			if (!text.isFieldEditor()) return;
+		}
+	}
+	if ((style & SWT.MULTI) != 0 && id != scrollView.id) return;
+	fillBackground (view, context, rect, -1);
+}
+
+void drawInteriorWithFrame_inView(int id, int sel, NSRect cellFrame, int viewid) {
+	Control control = findBackgroundControl();
+	if (control == null) control = this;
+	Image image = control.backgroundImage;
+	if (image != null && !image.isDisposed()) {
+		NSGraphicsContext context = NSGraphicsContext.currentContext();
+ 	 	control.fillBackground (view, context, cellFrame, -1);
+	}
+	super.drawInteriorWithFrame_inView(id, sel, cellFrame, viewid);
+}
+
+
 boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
 	Point selection = getSelection ();
 	if (selection.x != selection.y) {
@@ -659,11 +695,8 @@ public Point getCaretLocation () {
 	NSLayoutManager layoutManager = widget.layoutManager();
 	NSTextContainer container = widget.textContainer();
 	NSRange range = widget.selectedRange();
-	int /*long*/ pRectCount = OS.malloc(C.PTR_SIZEOF);
-	int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, pRectCount);
 	int /*long*/ [] rectCount = new int /*long*/ [1];
-	OS.memmove(rectCount, pRectCount, C.PTR_SIZEOF);
-	OS.free(pRectCount);
+	int /*long*/ pArray = layoutManager.rectArrayForCharacterRange(range, range, container, rectCount);
 	NSRect rect = new NSRect();
 	if (rectCount[0] > 0) OS.memmove(rect, pArray, NSRect.sizeof);
 	return new Point((int)rect.x, (int)rect.y);
@@ -1202,6 +1235,7 @@ void insertEditText (String string) {
 			int charCount = getCharCount();
 			if (charCount - (selection.y - selection.x) + length > textLimit) {
 				length = textLimit - charCount + (selection.y - selection.x);
+				length = Math.max(0, length);
 			}
 		}
 		char [] buffer = new char [length];
@@ -1229,6 +1263,20 @@ boolean isEventView (int /*long*/ id) {
 	return true;
 }
 
+boolean isNeeded(ScrollBar scrollbar) {
+	boolean result = false;
+	if ((style & SWT.MULTI) != 0) {
+		NSRect docFrame = scrollView.documentView().frame();
+		NSRect contentFrame = scrollView.contentView().frame();
+		if ((scrollbar.style & SWT.VERTICAL) != 0) {
+			result = docFrame.height > contentFrame.height;
+		} else {
+			result = docFrame.width > contentFrame.width;
+		}
+	}
+	return result;
+}
+
 /**
  * Pastes text from clipboard.
  * <p>
@@ -1395,10 +1443,10 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 		short keyCode = nsEvent.keyCode ();
 		switch (keyCode) {
 			case 7: /* X */
-				cut ();
+				if ((style & SWT.PASSWORD) == 0) cut ();
 				return false;
 			case 8: /* C */
-				copy ();
+				if ((style & SWT.PASSWORD) == 0) copy ();
 				return false;
 			case 9: /* V */
 				paste ();
@@ -1410,7 +1458,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 		switch (keyCode) {
 			case 76: /* KP Enter */
 			case 36: /* Return */
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 		}
 	}
 	return result;
@@ -1422,7 +1470,7 @@ void sendSearchSelection () {
 	}
 	Event event = new Event ();
 	event.detail = SWT.ICON_SEARCH;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 }
 
 void sendCancelSelection () {
@@ -1431,18 +1479,10 @@ void sendCancelSelection () {
 	}
 	Event event = new Event ();
 	event.detail = SWT.ICON_CANCEL;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	} else {
-		nsColor = NSColor.textBackgroundColor ();
-	}
+void setBackgroundColor(NSColor nsColor) {
 	if ((style & SWT.SINGLE) != 0) {
 		((NSTextField) view).setBackgroundColor (nsColor);
 	} else {
@@ -1450,6 +1490,16 @@ void updateBackground () {
 	}
 }
 
+void setBackgroundImage(NSImage image) {
+	if ((style & SWT.SINGLE) != 0) {
+		NSTextField widget = (NSTextField) view;
+		widget.setDrawsBackground(image == null);
+	} else {
+		((NSTextView) view).setDrawsBackground(image == null);
+		scrollView.setDrawsBackground(image == null);
+	}
+}
+
 /**
  * Sets the double click enabled flag.
  * <p>
@@ -1547,6 +1597,26 @@ void setEditText (String string) {
 	selectionRange = null;
 }
 
+void setFrameSize(int /*long*/ id, int /*long*/ sel, NSSize size) {
+	super.setFrameSize (id, sel, size);
+	/*
+	* Bug in Cocoa.  When a search field is resized while having
+	* focus, its editor is not properly positioned within the
+	* widget.   The fix is to reposition the editor.
+	*/
+	if ((style & SWT.SEARCH) != 0) {
+		NSSearchField widget = (NSSearchField)view;
+		NSText editor = widget.currentEditor ();
+		if (editor != null) {
+			NSArray subviews = widget.subviews ();
+			if (subviews.count () > 0) {
+				NSRect rect = widget.cell ().drawingRectForBounds (widget.bounds ());
+				new NSView (subviews.objectAtIndex (0)).setFrame (rect);
+			}
+		}
+	}
+}
+
 void setFont(NSFont font) {
 	if ((style & SWT.MULTI) !=  0) {
 		((NSTextView) view).setFont (font);
@@ -1590,6 +1660,17 @@ public void setOrientation (int orientation) {
 	checkWidget ();
 }
 
+void setOrientation () {
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
+	if ((style & SWT.SINGLE) != 0) {
+		NSTextField widget = (NSTextField)view;
+		widget.setBaseWritingDirection(direction);
+	} else {
+		NSTextView widget = (NSTextView)view;
+		widget.setBaseWritingDirection(direction);
+	}
+}
+
 /**
  * Sets the widget message. The message text is displayed
  * as a hint for the user, indicating the purpose of the field.
@@ -1686,6 +1767,7 @@ public void setSelection (int start, int end) {
 		NSText fieldEditor = ((NSControl)view).currentEditor();
 		if (fieldEditor != null) {
 			fieldEditor.setSelectedRange (selectionRange);
+			fieldEditor.scrollRangeToVisible (selectionRange);
 		}
 	} else {
 		int length = (int)/*64*/((NSTextView) view).textStorage ().length ();
@@ -1694,7 +1776,9 @@ public void setSelection (int start, int end) {
 		NSRange range = new NSRange ();
 		range.location = selStart;
 		range.length = selEnd - selStart;
-		((NSTextView) view).setSelectedRange (range);
+		NSTextView widget = (NSTextView) view;
+		widget.setSelectedRange (range);
+		widget.scrollRangeToVisible (range);
 	}
 }
 
@@ -1792,9 +1876,17 @@ public void setText (String string) {
 	}
 	if ((style & SWT.SINGLE) != 0) {
 		setEditText (string);
+		NSText fieldEditor = ((NSControl)view).currentEditor();
+		if (fieldEditor != null) {
+			NSRange range = new NSRange();
+			fieldEditor.setSelectedRange (range);
+			fieldEditor.scrollRangeToVisible (range);
+		}
 	} else {
 		NSTextView widget = (NSTextView)view;
-		NSString str = NSString.stringWith (string);
+		char[] buffer = new char [Math.min(string.length (), textLimit)];
+		string.getChars (0, buffer.length, buffer, 0);
+		NSString str = NSString.stringWithCharacters(buffer, buffer.length);
 		widget.setString (str);
 		widget.setSelectedRange(new NSRange());
 	}
@@ -1857,8 +1949,13 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
 	NSRange range = new NSRange();
 	OS.memmove(range, affectedCharRange, NSRange.sizeof);
 	boolean result = callSuperBoolean(id, sel, range, replacementString);
-	if (!hooks(SWT.Verify) && echoCharacter =='\0') return result;
 	String text = new NSString(replacementString).getString();
+	if (!hooks(SWT.Verify) && echoCharacter =='\0') {
+		if (!result || (getCharCount() - range.length + text.length() > textLimit)) {
+			return false;
+		}
+		return true;
+	}
 	String newText = text;
 	if (hooks (SWT.Verify)) {
 		NSEvent currentEvent = display.application.currentEvent();
@@ -1867,6 +1964,9 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
 		newText = verifyText(text, (int)/*64*/range.location, (int)/*64*/(range.location+range.length),  currentEvent);
 	}
 	if (newText == null) return false;
+	if (getCharCount() - range.length + newText.length() > textLimit) {
+		return false;
+	}
 	if ((style & SWT.SINGLE) != 0) {
 		if (text != newText || echoCharacter != '\0') {
 			 //handle backspace and delete
@@ -1880,8 +1980,8 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
 	} else {
 		if (text != newText) {
 			NSTextView widget = (NSTextView) view;
-			Point selection = getSelection();
 			NSRange selRange = new NSRange();
+			Point selection = getSelection();
 			selRange.location = selection.x;
 			selRange.length = selection.x + selection.y;
 			widget.textStorage ().replaceCharactersInRange (selRange, NSString.stringWith(newText));
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
index 77d70b7..4db5981 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,11 +11,10 @@
 package org.eclipse.swt.widgets;
 
  
-import org.eclipse.swt.internal.cocoa.*;
- 
 import org.eclipse.swt.*;
 import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * Instances of this class support the layout of selectable
@@ -49,7 +48,8 @@ public class ToolBar extends Composite {
 	int itemCount;
 	ToolItem [] items;
 	NSArray accessibilityAttributes = null;
-	
+	ToolItem lastFocus;
+
 /**
  * Constructs a new instance of this class given its parent
  * and a style value describing its behavior and appearance.
@@ -101,49 +101,10 @@ public ToolBar (Composite parent, int style) {
 	}
 }
 
-int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
-	
-	if (accessibilityAttributes == null) {
-		NSMutableArray ourAttributes = NSMutableArray.arrayWithCapacity(10);
-		ourAttributes.addObject(OS.NSAccessibilityRoleAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityRoleDescriptionAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityParentAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityPositionAttribute);
-		ourAttributes.addObject(OS.NSAccessibilitySizeAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityWindowAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityTopLevelUIElementAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityHelpAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityEnabledAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityFocusedAttribute);
-		ourAttributes.addObject(OS.NSAccessibilityChildrenAttribute);
-
-		if (accessible != null) {
-			// See if the accessible will override or augment the standard list.
-			// Help, title, and description can be overridden.
-			NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
-			extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
-			extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
-
-			for (int i = (int)/*64*/extraAttributes.count() - 1; i >= 0; i--) {
-				NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
-				if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) != null) {
-					ourAttributes.addObject(extraAttributes.objectAtIndex(i));
-				}
-			}
-		}
-		
-		accessibilityAttributes = ourAttributes;
-		accessibilityAttributes.retain();
-	}
-	
-	return accessibilityAttributes.id;
-}
-
 int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
 	NSString nsAttributeName = new NSString(arg0);
-	
-	if (accessible != null) {
+
+	if (id == accessibleHandle() && accessible != null) {
 		id returnObject = accessible.internal_accessibilityAttributeValue(nsAttributeName, ACC.CHILDID_SELF);
 		if (returnObject != null) return returnObject.id;
 	}
@@ -157,6 +118,13 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
 			int /*long*/ roleDescription = OS.NSAccessibilityRoleDescription(role.id, 0);
 			return roleDescription;
 		}
+	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityChildrenAttribute)) {
+		NSMutableArray returnValue = NSMutableArray.arrayWithCapacity(itemCount);
+		
+		for (int i = 0; i < itemCount; i++) {
+			returnValue.addObject(new id(getItem(i).accessibleHandle()));
+		}
+		return returnValue.id;
 	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
 		return NSNumber.numberWithBool(isEnabled()).id;
 	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityFocusedAttribute)) {
@@ -169,7 +137,8 @@ int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int
 
 boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
 	// Toolbars aren't ignored.
-	return false;	
+	if (id == view.id) return false;
+	return super.accessibilityIsIgnored(id, sel);	
 }
 
 static int checkStyle (int style) {
@@ -196,15 +165,41 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	Point extent = new Point (result [1], result [2]);
 	if (wHint != SWT.DEFAULT) extent.x = wHint;
 	if (hHint != SWT.DEFAULT) extent.y = hHint;
-	return extent;
+	Rectangle trim = computeTrim (0, 0, extent.x, extent.y);
+	return new Point (trim.width, trim.height);
+}
+
+public Rectangle computeTrim (int x, int y, int width, int height) {
+	checkWidget();
+	if (scrollView != null) {
+		NSSize size = new NSSize();
+		size.width = width;
+		size.height = height;
+		size = NSScrollView.frameSizeForContentSize(size, false, false, OS.NSBezelBorder);
+		width = (int)size.width;
+		height = (int)size.height;
+		NSRect frame = scrollView.contentView().frame();
+		x -= frame.x;
+		y -= frame.y;
+	}
+	return new Rectangle (x, y, width, height);
 }
 
 void createHandle () {
 	state |= THEME_BACKGROUND;
+	if (hasBorder()) {
+		NSRect rect = new NSRect();
+		NSScrollView scrollWidget = (NSScrollView)new SWTScrollView().alloc();
+		scrollWidget.initWithFrame (rect);
+		scrollWidget.setDrawsBackground(false);
+		scrollWidget.setBorderType(OS.NSBezelBorder);
+		scrollView = scrollWidget;
+	}
 	NSView widget = (NSView)new SWTView().alloc();
 	widget.init();
 //	widget.setDrawsBackground(false);
 	view = widget;
+	if (scrollView != null) view.setAutoresizingMask(OS.NSViewHeightSizable | OS.NSViewWidthSizable);
 }
 
 void createItem (ToolItem item, int index) {
@@ -234,6 +229,7 @@ void destroyItem (ToolItem item) {
 		index++;
 	}
 	if (index == itemCount) return;
+	if (item == lastFocus) lastFocus = null;
 	System.arraycopy (items, index + 1, items, index, --itemCount - index);
 	items [itemCount] = null;
 	item.view.removeFromSuperview();
@@ -266,6 +262,19 @@ Widget findTooltip (NSPoint pt) {
 	return super.findTooltip (pt);
 }
 
+boolean forceFocus (NSView focusView) {
+	if (lastFocus != null && lastFocus.setFocus ()) return true;
+	ToolItem [] items = getItems ();
+	for (int i = 0; i < items.length; i++) {
+		ToolItem item = items [i];
+		if (item.setFocus ()) {
+			lastFocus = item;
+			return true;
+		}
+	}
+	return super.forceFocus (focusView);
+}
+
 /**
  * Returns the item at the given, zero-relative index in the
  * receiver. Throws an exception if the index is out of range.
@@ -371,6 +380,10 @@ public int getRowCount () {
 	return layout (rect.width, rect.height, false) [0];
 }
 
+boolean hasKeyboardFocus(int inId) {
+	return hasFocus();
+}
+
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -520,6 +533,51 @@ void resized () {
 	relayout ();
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+boolean sendMouseEvent (NSEvent nsEvent, int type, boolean send) {
+	switch (type) {
+	case SWT.MouseEnter:
+	case SWT.MouseMove:
+		// Start with the global mouse location, as the MouseEnter may occur due to
+		// an application-activated event, which isn't associated with a window.
+		NSPoint toolbarPoint = NSEvent.mouseLocation();
+		toolbarPoint = view.window().convertScreenToBase(toolbarPoint);
+		toolbarPoint = view.convertPoint_fromView_(toolbarPoint, null);
+		for (int i = 0; i < itemCount; i++) {
+			ToolItem item = items [i];
+			int currState = item.state;
+			
+			if (OS.NSPointInRect(toolbarPoint, item.view.frame())) {
+				item.state |= Widget.HOT;
+			} else {
+				item.state &= ~Widget.HOT;				
+			}
+			
+			if (currState != item.state) item.updateImage(true);
+		}
+		break;
+	case SWT.MouseExit:
+		for (int i = 0; i < itemCount; i++) {
+			ToolItem item = items [i];
+			int currState = item.state;
+			item.state &= ~Widget.HOT;				
+			if (currState != item.state) item.updateImage(true);
+		}
+		break;
+	}
+	
+	return super.sendMouseEvent(nsEvent, type, send);
+}
+
 void setFont(NSFont font) {
 	for (int i = 0; i < itemCount; i++) {
 		ToolItem item = items[i];
@@ -533,4 +591,60 @@ public void setRedraw (boolean redraw) {
 	if (redraw && drawCount == 0) relayout();
 }
 
+boolean translateTraversal (int key, NSEvent theEvent, boolean[] consume) {
+	boolean result = super.translateTraversal (key, theEvent, consume);
+	if (result) return result;
+	boolean next = false;
+	boolean checkPopup = false;
+	switch (key) {
+	case 123: /* Left arrow */
+		next = false; break;
+	case 124: /* Right arrow */
+		next = true; break;
+	case 126: /* Up arrow */
+		next = false;
+		checkPopup = true;
+		break;
+	case 125: /* Down arrow */
+		next = true;
+		checkPopup = true;
+		break;
+		
+	default: return false;
+	}
+	consume [0] = true;
+	
+	if (checkPopup && lastFocus != null) {
+		if (lastFocus.handleKeyDown()) return false;
+	}
+	
+	ToolItem[] items = getItems();
+	ToolItem item = lastFocus;
+	int length = items.length;
+	int index = 0;
+	while (index < length) {
+		if (items [index] == item) break;
+		index++;
+	}
+	/*
+	 * It is possible (but unlikely), that application
+	 * code could have disposed the widget in focus in
+	 * or out events.  Ensure that a disposed widget is
+	 * not accessed.
+	 */
+	if (index == length) return false;
+	int start = index, offset = (next) ? 1 : -1;
+	while ((index = (index + offset + length) % length) != start) {
+		ToolItem child = items [index];
+		if (!child.isDisposed ()) {
+			if (child.setFocus ()) {
+				lastFocus = child;
+				return false;
+			}
+		}
+	}
+	return false;
+}
+
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
index a9d2714..6ae08bf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java	
@@ -134,6 +134,54 @@ public ToolItem (ToolBar parent, int style, int index) {
 	parent.createItem (this, index);
 }
 
+int /*long*/ accessibleHandle() {
+	if (button != null && button.cell() != null) return button.cell().id;
+	if (view != null) return view.id;
+	return 0;
+}
+
+int /*long*/ accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
+
+	int /*long*/ returnValue = super.accessibilityActionNames(id, sel);
+	
+	if (id == accessibleHandle()) {
+		if ((style & SWT.DROP_DOWN) != 0) {
+			NSArray baseArray = new NSArray(returnValue);
+			NSMutableArray ourNames = NSMutableArray.arrayWithCapacity(baseArray.count() + 1);
+			ourNames.addObjectsFromArray(baseArray);
+			ourNames.addObject(OS.NSAccessibilityShowMenuAction);
+			returnValue = ourNames.id;
+		}
+	} else {
+		returnValue = super.accessibilityActionNames(id, sel);
+	}
+	return returnValue;
+}
+
+int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
+
+	int /*long*/ returnValue = super.accessibilityAttributeNames(id, sel);
+	
+	if (id == accessibleHandle()) {
+		if ((style & (SWT.CHECK|SWT.RADIO)) !=0) {
+			NSArray baseArray = new NSArray(returnValue);
+			NSMutableArray ourNames = NSMutableArray.arrayWithCapacity(baseArray.count() + 1);
+			ourNames.addObjectsFromArray(baseArray);
+			ourNames.addObject(OS.NSAccessibilityValueAttribute);
+			returnValue = ourNames.id;
+		} else if ((style & SWT.DROP_DOWN) != 0) {
+			NSArray baseArray = new NSArray(returnValue);
+			NSMutableArray ourNames = NSMutableArray.arrayWithCapacity(baseArray.count() + 1);
+			ourNames.addObjectsFromArray(baseArray);
+			ourNames.addObject(OS.NSAccessibilityChildrenAttribute);
+			returnValue = ourNames.id;
+		}
+	} else {
+		returnValue = super.accessibilityAttributeNames(id, sel);
+	}
+	return returnValue;
+}
+
 int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
 	NSString nsAttributeName = new NSString(arg0);
 
@@ -151,25 +199,44 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
 				return description;
 			}
 		}
-	} else if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+	} else if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute)) {
+		String accessibleText = text.length() > 0 ? text : toolTipText;
+		if (accessibleText != null) {
+			return NSString.stringWith(accessibleText).id;
+		} else {
+			return NSString.string().id;
+		}
+	} else if (nsAttributeName.isEqualToString (OS.NSAccessibilityHelpAttribute)) {
 		String accessibleText = toolTipText;
-		if (accessibleText == null || accessibleText.equals("")) accessibleText = text;
-		if (!(accessibleText == null || accessibleText.equals(""))) {
+		if (accessibleText != null) {
 			return NSString.stringWith(accessibleText).id;
 		} else {
-			return NSString.stringWith("").id;
+			return NSString.string().id;
 		}
 	} else if (nsAttributeName.isEqualToString (OS.NSAccessibilityValueAttribute) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
 		NSNumber value = NSNumber.numberWithInt(selection ? 1 : 0);
 		return value.id;
 	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
-		NSNumber value = NSNumber.numberWithInt(getEnabled() ? 1 : 0);
+		NSNumber value = NSNumber.numberWithBool(getEnabled());
 		return value.id;
+	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityChildrenAttribute)) {
+		// 
+		NSArray value = NSArray.array();
+		return value.id;
+	} else if (nsAttributeName.isEqualToString(OS.NSAccessibilityParentAttribute)) {
+		// Parent of the toolitem is always its toolbar.
+		return parent.view.id;
 	}
 
 	return super.accessibilityAttributeValue(id, sel, arg0);
 }
 
+boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
+	// The interesting part of a ToolItem is its button, if it has one.
+	if (id == accessibleHandle()) return false;
+	return super.accessibilityIsIgnored(id, sel);
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the control is selected by the user, by sending
@@ -180,6 +247,12 @@ int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
@@ -211,6 +284,20 @@ protected void checkSubclass () {
 	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
 }
 
+boolean handleKeyDown() {
+	if ((style & SWT.DROP_DOWN) != 0) {
+		NSRect frame = view.frame();
+		Event event = new Event ();
+		event.detail = SWT.ARROW;
+		event.x = (int)frame.x;
+		event.y = (int)(frame.y + frame.height);
+		sendSelectionEvent (SWT.Selection, event, false);
+		return true;
+	} else {
+		return false;
+	}
+}
+
 Point computeSize () {
 	checkWidget();
 	int width = 0, height = 0;
@@ -270,8 +357,7 @@ void createHandle () {
 		Font font = parent.font != null ? parent.font : parent.defaultFont ();
 		button.setFont(font.handle);
 		button.setImagePosition(OS.NSImageOverlaps);
-		NSString emptyStr = NSString.stringWith("");
-		button.setTitle(emptyStr);
+		button.setTitle(NSString.string());
 		button.setEnabled(parent.getEnabled());
 		widget.addSubview(button);
 		view = widget;
@@ -351,6 +437,7 @@ void drawWidget (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
 void enableWidget(boolean enabled) {
 	if ((style & SWT.SEPARATOR) == 0) {
 		((NSButton)button).setEnabled(enabled);
+		updateImage(true);
 	}
 }
 
@@ -371,9 +458,8 @@ public Rectangle getBounds () {
 	return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
 }
 
-void setClipRegion (float /*double*/ x, float /*double*/ y) {
-	NSRect frame = view.frame();
-	parent.setClipRegion(frame.x + x, frame.y + y);
+void setClipRegion (NSView view) {
+	parent.setClipRegion(view);
 }
 
 /**
@@ -562,7 +648,7 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 		event.detail = SWT.ARROW;
 		event.x = (int)frame.x;
 		event.y = (int)(frame.y + frame.height);
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 }
 
@@ -679,7 +765,7 @@ void sendSelection () {
 		}
 	}
 	if ((style & SWT.CHECK) != 0) setSelection (!getSelection ());
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 }
 
 void setBounds (int x, int y, int width, int height) {
@@ -788,6 +874,12 @@ public void setDisabledImage (Image image) {
 	updateImage (true);
 }
 
+boolean setFocus () {
+	if (button == null) return false;
+	if (!isEnabled ()) return false;
+	return view.window ().makeFirstResponder (button);
+}
+
 /**
  * Sets the receiver's hot image to the argument, which may be
  * null indicating that no hot image should be displayed.
@@ -825,7 +917,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
@@ -957,16 +1049,18 @@ String tooltipText () {
 
 void updateImage (boolean layout) {
 	if ((style & SWT.SEPARATOR) != 0) return;
-	Image image = null;
-	if (hotImage != null) {
-		image = hotImage;
+	Image newImage = null;
+
+	if ((state & DISABLED) == DISABLED && disabledImage != null) {
+		newImage = disabledImage;
 	} else {
-		if (this.image != null) {
-			image = this.image;
+		if ((state & HOT) == HOT && hotImage != null) {
+			newImage = hotImage;
 		} else {
-			image = disabledImage;
+			newImage = image;
 		}
 	}
+
 	NSButton widget = (NSButton)button;
 	/*
 	 * Feature in Cocoa.  If the NSImage object being set into the button is
@@ -975,13 +1069,13 @@ void updateImage (boolean layout) {
 	 * if the NSImage object's content has changed since it was last set
 	 * into the button.  The workaround is to explicitly redraw the button.
 	 */
-	widget.setImage(image != null ? image.handle : null);
+	widget.setImage(newImage != null ? newImage.handle : null);
 	widget.setNeedsDisplay(true);
-	if (text.length() != 0 && image != null) {
+	if (text.length() != 0 && newImage != null) {
 		if ((parent.style & SWT.RIGHT) != 0) {
 			widget.setImagePosition(OS.NSImageLeft);
 		} else {
-			((NSButton)button).setImagePosition(OS.NSImageAbove);		
+			widget.setImagePosition(OS.NSImageAbove);		
 		}
 	} else {	
 		widget.setImagePosition(text.length() != 0 ? OS.NSNoImage : OS.NSImageOnly);		
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
index c7a9e95..86e8213 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java	
@@ -136,6 +136,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
@@ -847,6 +848,14 @@ public boolean open () {
 			display.removePool();
 		}
 	}
+	
+	/*
+	* Cleanup: If this tracker was resizing then the last cursor that it created
+	* needs to be destroyed.
+	*/
+	if (resizeCursor != null) resizeCursor.dispose();
+	resizeCursor = null;
+	
 	if (oldTrackingControl != null && !oldTrackingControl.isDisposed()) {
 		display.trackingControl = oldTrackingControl;
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
index ec0a782..5213df7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java	
@@ -511,7 +511,7 @@ void mouseUp(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	if (highlight) {
 		NSEvent nsEvent = new NSEvent(theEvent);
 		if (nsEvent.type() == OS.NSLeftMouseUp) {
-			postEvent(nsEvent.clickCount() == 2 ? SWT.DefaultSelection : SWT.Selection);
+			sendSelectionEvent(nsEvent.clickCount() == 2 ? SWT.DefaultSelection : SWT.Selection);
 		}
 	}
 	highlight = false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index ae91f3e..671b95a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.swt.widgets;
 
 import org.eclipse.swt.*;
-import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.cocoa.*;
@@ -84,7 +83,7 @@ public class Tree extends Composite {
 	TreeColumn sortColumn;
 	int columnCount;
 	int sortDirection;
-	boolean ignoreExpand, ignoreSelect, ignoreRedraw, reloadPending, drawExpansion;
+	boolean ignoreExpand, ignoreSelect, ignoreRedraw, reloadPending, drawExpansion, didSelect;
 	Rectangle imageBounds;
 	TreeItem insertItem;
 	boolean insertBefore;
@@ -156,26 +155,6 @@ TreeItem _getItem (TreeItem parentItem, int index, boolean create) {
 	return item;
 }
 
-int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-
-	if (accessible != null) {
-		NSString attribute = new NSString(arg0);
-		id returnValue = accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF);
-		if (returnValue != null) return returnValue.id;
-	}
-	
-	NSString attributeName = new NSString(arg0);
-	
-	// Accessibility Verifier queries for a title or description.  NSOutlineView doesn't
-	// seem to return either, so we return a default description value here.
-	if (attributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
-		return NSString.stringWith("").id;
-	}
-	
-	return super.accessibilityAttributeValue(id, sel, arg0);
-}
-
-
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when the user changes the receiver's selection, by sending
@@ -556,10 +535,13 @@ void createHandle () {
 	headerView = (NSTableHeaderView)new SWTTableHeaderView ().alloc ().init ();
 	widget.setHeaderView (null);
 	
-	NSString str = NSString.stringWith ("");  //$NON-NLS-1$
+	NSString str = NSString.string();
 	if ((style & SWT.CHECK) != 0) {
 		checkColumn = (NSTableColumn) new NSTableColumn ().alloc ();
-		checkColumn = checkColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+		NSString nsstring = (NSString) new NSString().alloc();
+		nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+		checkColumn = checkColumn.initWithIdentifier(nsstring);
+		nsstring.release();
 		checkColumn.headerCell ().setTitle (str);
 		widget.addTableColumn (checkColumn);
 		widget.setOutlineTableColumn (checkColumn);
@@ -576,7 +558,10 @@ void createHandle () {
 	}
 	
 	firstColumn = (NSTableColumn) new NSTableColumn ().alloc ();
-	firstColumn = firstColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+	firstColumn = firstColumn.initWithIdentifier(nsstring);
+	nsstring.release();
 	/*
 	* Feature in Cocoa.  If a column's width is too small to show any content
 	* then outlineView_objectValueForTableColumn_byItem is never invoked to
@@ -586,6 +571,7 @@ void createHandle () {
 	*/
 	firstColumn.setMinWidth (FIRST_COLUMN_MINIMUM_WIDTH);
 	firstColumn.setWidth(0);
+	firstColumn.setResizingMask (OS.NSTableColumnNoResizing);
 	firstColumn.headerCell ().setTitle (str);
 	widget.addTableColumn (firstColumn);
 	widget.setOutlineTableColumn (firstColumn);
@@ -614,13 +600,17 @@ void createItem (TreeColumn column, int index) {
 		//TODO - clear attributes, alignment etc.
 		nsColumn = firstColumn;
 		nsColumn.setMinWidth (0);
+		nsColumn.setResizingMask (OS.NSTableColumnUserResizingMask);
 		firstColumn = null;
 	} else {
 		//TODO - set attributes, alignment etc.
 		NSOutlineView outlineView = (NSOutlineView)view;
-		NSString str = NSString.stringWith ("");
+		NSString str = NSString.string();
 		nsColumn = (NSTableColumn) new NSTableColumn ().alloc ();
-		nsColumn = nsColumn.initWithIdentifier(NSString.stringWith(String.valueOf(++NEXT_ID)));
+		NSString nsstring = (NSString) new NSString().alloc();
+		nsstring = nsstring.initWithString(String.valueOf(++NEXT_ID));
+		nsColumn = nsColumn.initWithIdentifier(nsstring);
+		nsstring.release();
 		nsColumn.setMinWidth(0);
 		nsColumn.headerCell ().setTitle (str);
 		outlineView.addTableColumn (nsColumn);
@@ -850,6 +840,7 @@ void destroyItem (TreeColumn column) {
 		* column always has a minimal width that makes this call come in.
 		*/
 		firstColumn.setMinWidth (FIRST_COLUMN_MINIMUM_WIDTH);
+		firstColumn.setResizingMask (OS.NSTableColumnNoResizing);
 		setScrollWidth ();
 	} else {
 		if (index == 0) {
@@ -906,6 +897,7 @@ void destroyItem (TreeItem item) {
 	}
 	setScrollWidth ();
 	if (this.itemCount == 0) imageBounds = null;
+	if (insertItem == item) insertItem = null;
 }
 
 boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
@@ -913,6 +905,12 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
 	return false;
 }
 
+void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+	super.drawViewBackgroundInRect(id, sel, rect);
+	if (id != view.id) return;
+	fillBackground (view, NSGraphicsContext.currentContext(), rect, -1);
+}
+
 void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rect, int /*long*/ view) {
 	boolean hooksErase = hooks (SWT.EraseItem);
 	boolean hooksPaint = hooks (SWT.PaintItem);
@@ -942,7 +940,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 	boolean drawForeground = true;
 	boolean isSelected = cell.isHighlighted();
 	boolean drawSelection = isSelected;
-	boolean hasFocus = hooksErase && hasFocus ();
+	boolean hasFocus = hasFocus ();
 
 	Color selectionBackground = null, selectionForeground = null;
 	if (isSelected && (hooksErase || hooksPaint)) {
@@ -1047,7 +1045,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 		context.restoreGraphicsState ();
 	}
 	
-	if (insertItem != null && !insertItem.isDisposed()) {
+	if (item == insertItem && insertItem != null && !insertItem.isDisposed()) {
 		context.saveGraphicsState ();
 		NSRect contentRect = cell.titleRectForBounds (rect);
 		GCData data = new GCData ();
@@ -1100,12 +1098,20 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 				NSRange range = new NSRange();
 				range.length = newStr.length();
 				newStr.removeAttribute(OS.NSForegroundColorAttributeName, range);
+				int alignment = columnCount == 0 ? SWT.LEFT : columns[columnIndex].style & (SWT.LEFT | SWT.CENTER | SWT.RIGHT);
+				NSSize size = newStr.size();
 				NSRect newRect = new NSRect();
 				newRect.x = rect.x + TEXT_GAP;
 				newRect.y = rect.y;
 				newRect.width = rect.width - TEXT_GAP;
+				switch (alignment) {
+					case SWT.CENTER: newRect.width -= TEXT_GAP / 2.0f + 1; break;
+					case SWT.RIGHT: {
+						if (rect.width > size.width) newRect.width -= TEXT_GAP;
+						break;
+					}
+				}
 				newRect.height = rect.height;
-				NSSize size = newStr.size();
 				if (newRect.height > size.height) {
 					newRect.y += (newRect.height - size.height) / 2;
 					newRect.height = size.height;
@@ -1157,7 +1163,7 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect rec
 		event.index = columnIndex;
 		if (drawForeground) event.detail |= SWT.FOREGROUND;
 		if (drawBackground) event.detail |= SWT.BACKGROUND;
-		if (drawSelection) event.detail |= SWT.SELECTED;
+		if (isSelected) event.detail |= SWT.SELECTED;
 		event.x = itemX;
 		event.y = itemY;
 		event.width = contentWidth;
@@ -1197,14 +1203,21 @@ NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect
 	if (toolTipText == null) {
 		NSRect rect = super.expansionFrameWithFrame_inView(id, sel, cellRect, view);
 		NSCell cell = new NSCell(id);
+		NSAttributedString str = cell.attributedStringValue();
+		NSSize textSize = str.size();
+		NSRect expansionRect;
 		if (rect.width != 0 && rect.height != 0) {
 			if (hooks(SWT.MeasureItem)) {
+				expansionRect = cellRect;
 				NSSize cellSize = cell.cellSize();
-				cellRect.width = cellSize.width;
-				return cellRect;
+				expansionRect.width = cellSize.width;
+			} else {
+				expansionRect = rect;
+			}
+			if (textSize.height > expansionRect.height) {
+				expansionRect.height = textSize.height;
 			}
 		} else {
-			NSRect expansionRect;
 			if (hooks(SWT.MeasureItem)) {
 				expansionRect = cellRect;
 				NSSize cellSize = cell.cellSize();
@@ -1214,13 +1227,17 @@ NSRect expansionFrameWithFrame_inView(int /*long*/ id, int /*long*/ sel, NSRect
 				NSSize cellSize = super.cellSize(id, OS.sel_cellSize);
 				expansionRect.width = cellSize.width;
 			}
-			NSRect contentRect = scrollView.contentView().bounds();
-			OS.NSIntersectionRect(contentRect, expansionRect, contentRect);
-			if (!OS.NSEqualRects(expansionRect, contentRect)) {
-				return expansionRect;
+			if (textSize.height > expansionRect.height) {
+				expansionRect.height = textSize.height;
+			} else {
+				NSRect contentRect = scrollView.contentView().bounds();
+				OS.NSIntersectionRect(contentRect, expansionRect, contentRect);
+				if (OS.NSEqualRects(expansionRect, contentRect)) {
+					return new NSRect();
+				}
 			}
 		}
-		return rect;
+		return expansionRect;
 	}
 	return new NSRect();
 }
@@ -1254,6 +1271,8 @@ public Rectangle getClientArea () {
 	Rectangle rect = super.getClientArea ();
 	NSTableHeaderView headerView = ((NSTableView) view).headerView ();
 	if (headerView != null) {
+		// The origin of the tree is the top-left of the rows of the tree,
+		// not the header.  Adjust the y value accordingly.
 		int height =  (int) headerView.bounds ().height;
 		rect.y -= height;
 		rect.height += height;
@@ -1853,11 +1872,20 @@ public int indexOf (TreeItem item) {
 	return -1;
 }
 
+boolean isTransparent() {
+	return true;
+}
+
 boolean isTrim (NSView view) {
 	if (super.isTrim (view)) return true;
 	return view.id == headerView.id;
 }
 
+void keyDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	ignoreSelect = false;
+	super.keyDown(id, sel, theEvent);
+}
+
 int /*long*/ menuForEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	if (id != headerView.id) {
 		/*
@@ -1914,6 +1942,40 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	super.mouseDown(id, sel, theEvent);
 }
 
+void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	ignoreSelect = false;
+	NSOutlineView widget = (NSOutlineView)view;
+	NSEvent nsEvent = new NSEvent(theEvent);
+	NSPoint pt = view.convertPoint_fromView_(nsEvent.locationInWindow(), null);
+	int row = (int)/*64*/widget.rowAtPoint(pt);
+	if (row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0) {
+		if (widget.isRowSelected(row)) {
+			NSRect rect = widget.frameOfOutlineCellAtRow(row);
+			if (!OS.NSPointInRect(pt, rect)) {
+				id itemID = widget.itemAtRow(row);
+				Widget item = itemID != null ? display.getWidget (itemID.id) : null;
+				if (item != null && item instanceof TreeItem) {
+					Event event = new Event ();
+					event.item = item;
+					sendSelectionEvent (SWT.Selection, event, false);
+
+					// Feature in Cocoa: This code path handles the case of an unmodified click on an already-selected row.
+					// If other rows are selected they will de-select and fire a outlineViewSelectionDidChange message.
+					// To keep the order of events correct, send the selection event here and ignore the next
+					// outlineViewSelectionDidChange message.  We'll reset the flag when the message is received.
+					if (widget.selectedRowIndexes().count() > 1) {
+						ignoreSelect = true;
+					}
+				}
+			}
+		}
+	}
+	display.trackedButtonRow = -1;
+	didSelect = false;
+	super.mouseDownSuper(id, sel, theEvent);
+	didSelect = false;
+}
+
 /*
  * Feature in Cocoa.  If a checkbox is in multi-state mode, nextState cycles
  * from off to mixed to on and back to off again.  This will cause the on state
@@ -1922,7 +1984,8 @@ void mouseDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
  */
 int /*long*/ nextState (int /*long*/ id, int /*long*/ sel) {
 	NSOutlineView outlineView = (NSOutlineView)view;
-	int index = (int)/*64*/outlineView.selectedRow ();
+	int index = (int)/*64*/outlineView.clickedRow();
+	if (index == -1) index = (int)/*64*/outlineView.selectedRow ();
 	TreeItem item = (TreeItem)display.getWidget (outlineView.itemAtRow (index).id);
 	if (item.grayed) {
 		return item.checked ? OS.NSOffState : OS.NSMixedState;
@@ -1939,7 +2002,7 @@ int /*long*/ outlineView_child_ofItem (int /*long*/ id, int /*long*/ sel, int /*
 void outlineView_didClickTableColumn (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn) {
 	TreeColumn column = getColumn (new id (tableColumn));
 	if (column == null) return; /* either CHECK column or firstColumn in 0-column Tree */
-	column.postEvent (SWT.Selection);
+	column.sendSelectionEvent (SWT.Selection);
 }
 
 int /*long*/ outlineView_objectValueForTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ tableColumn, int /*long*/ itemID) {
@@ -1972,6 +2035,63 @@ int /*long*/ outlineView_numberOfChildrenOfItem (int /*long*/ id, int /*long*/ s
 	return ((TreeItem) display.getWidget (item)).itemCount;
 }
 
+boolean outlineView_shouldSelectItem(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ item) {
+	boolean result = true;
+	NSOutlineView tree = new NSOutlineView(aTableView);			
+
+	if ((style & SWT.SINGLE) != 0) {
+		/*
+		 * Feature in Cocoa.  Calling setAllowsEmptySelection will automatically select the first row of the list. 
+		 * This is normal platform behavior, but for compatibility with other platforms, if the SINGLE style is in use,
+		 * force a selection by seeing if the proposed selection set is empty, and if so, put back the currently selected row.  
+		 */
+		NSIndexSet indexes = tree.selectedRowIndexes();
+		if (indexes.count() != 1 && tree.selectedRow() != -1) {
+			return false;
+		}
+	}
+
+	// If a checkbox is being tracked don't select the row.
+	if (display.trackedButtonRow != -1) return false;
+	int /*long*/ clickedCol = tree.clickedColumn();
+	int /*long*/ clickedRow = tree.clickedRow();
+	if (clickedRow >= 0 && clickedCol >= 0) {
+		NSCell cell = tree.preparedCellAtColumn(clickedCol, clickedRow);
+		if (cell.isKindOfClass(OS.class_NSButtonCell) && cell.isEnabled()) {
+			NSRect cellFrame = tree.frameOfCellAtColumn(clickedCol, clickedRow);
+			NSRect imageFrame = cell.imageRectForBounds(cellFrame);
+			NSPoint hitPoint = tree.convertPoint_fromView_(NSApplication.sharedApplication().currentEvent().locationInWindow(), null);
+			result = ! OS.NSPointInRect(hitPoint, imageFrame) || didSelect;
+		}            
+	}
+	return result;
+}
+
+boolean outlineView_shouldTrackCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel,
+		int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ item) {
+	NSCell theCell = new NSCell(cell);
+	NSOutlineView tableView = (NSOutlineView)view;
+	int /*long*/ rowIndex = tableView.rowForItem(new id(item));
+	if (theCell.isKindOfClass(OS.class_NSButtonCell)) {
+		// Allow tracking of the checkbox area of the button, not the text itself.
+		int columnIndex = 0;
+		for (int i=0; i<columnCount; i++) {
+			if (columns [i].nsColumn.id == tableColumn) {
+				columnIndex = i;
+				break;
+			}
+		}
+		NSRect cellFrame = tableView.frameOfCellAtColumn(columnIndex, rowIndex);
+		NSRect imageFrame = theCell.imageRectForBounds(cellFrame);
+		NSPoint hitPoint = tableView.convertPoint_fromView_(NSApplication.sharedApplication().currentEvent().locationInWindow(), null);
+		boolean shouldTrack = OS.NSPointInRect(hitPoint, imageFrame) && (display.trackedButtonRow == -1 || display.trackedButtonRow == rowIndex) && !didSelect;
+		if (OS.NSPointInRect(hitPoint, imageFrame) && display.trackedButtonRow == -1 && !didSelect) display.trackedButtonRow = rowIndex;
+		return shouldTrack;
+	} else {
+		return tableView.isRowSelected(rowIndex);
+	}
+}
+
 void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ cell, int /*long*/ tableColumn, int /*long*/ itemID) {
 	if (checkColumn != null && tableColumn == checkColumn.id) return;
 	TreeItem item = (TreeItem) display.getWidget(itemID);
@@ -2000,6 +2120,7 @@ void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*lon
 	} else {
 		color = NSColor.disabledControlTextColor();
 	}
+	int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
 	int alignment = OS.NSLeftTextAlignment;
 	if (columnCount > 0) {
 		int style = columns [index].style;
@@ -2021,6 +2142,7 @@ void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*lon
 		NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
 		paragraphStyle.setLineBreakMode (OS.NSLineBreakByClipping);
 		paragraphStyle.setAlignment (alignment);
+		paragraphStyle.setBaseWritingDirection(direction);
 		dict.setObject (paragraphStyle, OS.NSParagraphStyleAttributeName);
 		paragraphStyle.release ();
 		NSAttributedString attribStr = ((NSAttributedString) new NSAttributedString ().alloc ()).initWithString (textCell.title(), dict);
@@ -2031,19 +2153,34 @@ void outlineView_willDisplayCell_forTableColumn_item (int /*long*/ id, int /*lon
 		textCell.setFont(font.handle);
 		textCell.setTextColor(color);
 		textCell.setAlignment (alignment);
+		textCell.setBaseWritingDirection(direction);
 	}
 }
 
 void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 	NSNotification notification = new NSNotification (aNotification);
 	NSDictionary userInfo = notification.userInfo ();
-	id nsOldIndex = userInfo.valueForKey (NSString.stringWith ("NSOldColumn")); //$NON-NLS-1$
-	id nsNewIndex = userInfo.valueForKey (NSString.stringWith ("NSNewColumn")); //$NON-NLS-1$
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSOldColumn"); //$NON-NLS-1$
+	id nsOldIndex = userInfo.valueForKey (nsstring); 
+	nsstring.release();
+	nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSNewColumn"); //$NON-NLS-1$
+	id nsNewIndex = userInfo.valueForKey (nsstring);
+	nsstring.release();
 	int oldIndex = new NSNumber (nsOldIndex).intValue ();
 	int newIndex = new NSNumber (nsNewIndex).intValue ();
+	NSOutlineView outlineView = (NSOutlineView)view;
+	if (checkColumn != null && newIndex == 0) {
+		newIndex = 1;
+		NSNotificationCenter defaultCenter = NSNotificationCenter.defaultCenter();
+		defaultCenter.removeObserver(view, OS.NSOutlineViewColumnDidMoveNotification, null);
+		outlineView.moveColumn(0, newIndex);
+		defaultCenter.addObserver(view,  OS.sel_outlineViewColumnDidMove_, OS.NSOutlineViewColumnDidMoveNotification, null);
+		if (oldIndex == newIndex) return;
+	}
 	int startIndex = Math.min (oldIndex, newIndex);
 	int endIndex = Math.max (oldIndex, newIndex);
-	NSOutlineView outlineView = (NSOutlineView)view;
 	NSArray nsColumns = outlineView.tableColumns ();
 	for (int i = startIndex; i <= endIndex; i++) {
 		id columnId = nsColumns.objectAtIndex (i);
@@ -2058,7 +2195,10 @@ void outlineViewColumnDidMove (int /*long*/ id, int /*long*/ sel, int /*long*/ a
 void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 	NSNotification notification = new NSNotification (aNotification);
 	NSDictionary userInfo = notification.userInfo ();
-	id columnId = userInfo.valueForKey (NSString.stringWith ("NSTableColumn")); //$NON-NLS-1$
+	NSString nsstring = (NSString) new NSString().alloc();
+	nsstring = nsstring.initWithString("NSTableColumn"); //$NON-NLS-1$
+	id columnId = userInfo.valueForKey (nsstring);
+	nsstring.release();
 	TreeColumn column = getColumn (columnId);
 	if (column == null) return; /* either CHECK column or firstColumn in 0-column Tree */
 
@@ -2081,22 +2221,32 @@ void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/
 	}
 }
 
-void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+void sendSelection () {
 	if (ignoreSelect) return;
 	NSOutlineView widget = (NSOutlineView) view;
 	int row = (int)/*64*/widget.selectedRow ();
 	if (row == -1)
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	else {
 		id _id = widget.itemAtRow (row);
 		TreeItem item = (TreeItem) display.getWidget (_id.id);
 		Event event = new Event ();
 		event.item = item;
 		event.index = row;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 }
 
+void outlineViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	if (didSelect) return;
+	sendSelection ();
+}
+
+void outlineViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+	didSelect = true;
+	sendSelection ();
+}
+
 void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ itemID) {
 	if (checkColumn != null && tableColumn == checkColumn.id)  {
 		TreeItem item = (TreeItem) display.getWidget (itemID);
@@ -2104,7 +2254,7 @@ void outlineView_setObjectValue_forTableColumn_byItem (int /*long*/ id, int /*lo
 		Event event = new Event ();
 		event.detail = SWT.CHECK;
 		event.item = item;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 		item.redraw (-1);
 	}
 }
@@ -2176,7 +2326,10 @@ public void removeAll () {
 	items = new TreeItem [4];
 	itemCount = 0;
 	imageBounds = null;
+	insertItem = null;
+	ignoreSelect = true;
 	((NSOutlineView) view).reloadData ();
+	ignoreSelect = false;
 	setScrollWidth ();
 }
 
@@ -2229,6 +2382,22 @@ public void removeTreeListener (TreeListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TreeItem item = items [i];
+			if (item != null) item.reskinChildren (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setImage (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
 	OS.object_setInstanceVariable(id, Display.SWT_IMAGE, arg0);
 }
@@ -2321,13 +2490,15 @@ void sendDoubleSelection() {
 		if ((style & SWT.CHECK) != 0) {
 			NSArray columns = outlineView.tableColumns ();
 			int columnIndex = (int)/*64*/outlineView.clickedColumn ();
-			id column = columns.objectAtIndex (columnIndex);
-			if (column.id == checkColumn.id) return;
+			if (columnIndex != -1) {
+				id column = columns.objectAtIndex (columnIndex);
+				if (column.id == checkColumn.id) return;
+			}
 		}
 		TreeItem item = (TreeItem) display.getWidget (outlineView.itemAtRow (rowIndex).id);
 		Event event = new Event ();
 		event.item = item;
-		postEvent (SWT.DefaultSelection, event);
+		sendSelectionEvent (SWT.DefaultSelection, event, false);
 	}
 }
 
@@ -2339,7 +2510,7 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
 	switch (keyCode) {
 		case 76: /* KP Enter */
 		case 36: { /* Return */
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		}
 	}
@@ -2412,14 +2583,8 @@ NSRect titleRectForBounds (int /*long*/ id, int /*long*/ sel, NSRect cellFrame)
 	return cellFrame;
 }
 
-void updateBackground () {
-	NSColor nsColor = null;
-	if (backgroundImage != null) {
-		nsColor = NSColor.colorWithPatternImage(backgroundImage.handle);
-	} else if (background != null) {
-		nsColor = NSColor.colorWithDeviceRed(background[0], background[1], background[2], background[3]);
-	}
-	((NSOutlineView) view).setBackgroundColor (nsColor);
+void setBackgroundColor(NSColor nsColor) {
+	((NSTableView) view).setBackgroundColor (nsColor);
 }
 
 /**
@@ -2658,6 +2823,7 @@ void setItemHeight (Image image, NSFont font, boolean set) {
 public void setLinesVisible (boolean show) {
 	checkWidget ();
 	((NSOutlineView) view).setUsesAlternatingRowBackgroundColors (show);
+	((NSOutlineView) view).setGridStyleMask(show ? OS.NSTableViewSolidVerticalGridLineMask : OS.NSTableViewGridNone);
 }
 
 public void setRedraw (boolean redraw) {
@@ -2800,8 +2966,7 @@ public void setSortColumn (TreeColumn column) {
 	checkWidget ();
 	if (column != null && column.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	if (column == sortColumn) return;
-	sortColumn = column;
-	((NSOutlineView)view).setHighlightedTableColumn (column == null ? null : column.nsColumn);
+	setSort(column, sortDirection);
 }
 
 /**
@@ -2821,13 +2986,25 @@ public void setSortDirection  (int direction) {
 	checkWidget ();
 	if (direction != SWT.UP && direction != SWT.DOWN && direction != SWT.NONE) return;
 	if (direction == sortDirection) return;
+	setSort(sortColumn, direction);
+}
+
+void setSort (TreeColumn column, int direction) {
+	NSImage image = null;
+	NSTableColumn nsColumn = null;
+	if (column != null) {
+		nsColumn = column.nsColumn;
+		if (direction == SWT.DOWN) image = NSImage.imageNamed(NSString.stringWith("NSDescendingSortIndicator"));
+		if (direction == SWT.UP) image = NSImage.imageNamed(NSString.stringWith("NSAscendingSortIndicator"));
+	}
+	NSTableView widget = (NSTableView)view;
+	if (sortColumn != null && sortColumn != column) {
+		widget.setIndicatorImage(null, sortColumn.nsColumn);
+	}
+	widget.setHighlightedTableColumn(nsColumn);
+	widget.setIndicatorImage(image, nsColumn);
 	sortDirection = direction;
-	if (sortColumn == null) return;
-	NSTableHeaderView headerView = ((NSOutlineView)view).headerView ();
-	if (headerView == null) return;
-	int index = indexOf (sortColumn.nsColumn);
-	NSRect rect = headerView.headerRectOfColumn (index);
-	headerView.setNeedsDisplayInRect (rect);
+	sortColumn = column;
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java
index 6f090d9..7f53aea 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeItem.java	
@@ -11,10 +11,9 @@
 package org.eclipse.swt.widgets;
 
 
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * Instances of this class represent a selectable user interface object
@@ -56,6 +55,8 @@ public class TreeItem extends Item {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public SWTTreeItem handle;
 
@@ -244,7 +245,10 @@ int calculateWidth (int index, GC gc) {
 		attribStr.release();
 	} else {
 		cell.setFont (font.handle);
-		cell.setTitle (NSString.stringWith(text != null ? text : ""));
+		NSString str = (NSString) new NSString().alloc();
+		str = str.initWithString(text != null ? text : "");
+		cell.setTitle (str);
+		str.release();
 	}
 
 	/* This code is inlined for performance */
@@ -253,7 +257,7 @@ int calculateWidth (int index, GC gc) {
 	super_struct.super_class = OS.objc_msgSend(cell.id, OS.sel_superclass);
 	NSSize size = new NSSize();
 	OS.objc_msgSendSuper_stret(size, super_struct, OS.sel_cellSize);
-	if (image != null) size.width += parent.imageBounds.width + Table.IMAGE_GAP;
+	if (image != null) size.width += parent.imageBounds.width + Tree.IMAGE_GAP;
 //	cell.setImage (image != null ? image.handle : null);
 //	NSSize size = cell.cellSize ();
 
@@ -361,18 +365,6 @@ public void clearAll (boolean all) {
 	parent.clearAll (this, all);
 }
 
-void clearSelection () {
-	NSOutlineView widget = (NSOutlineView) parent.view;
-	int /*long*/ row = widget.rowForItem (handle);
-	if (widget.isRowSelected(row)) widget.deselectRow (row);
-	if (items != null && getExpanded ()) {
-		for (int i = 0; i < items.length; i++) {
-			TreeItem item = items [i];
-			if (item != null && !item.isDisposed ()) item.clearSelection ();
-		}
-	}
-}
-
 NSObject createString(int index) {
 	String text = index == 0 ? this.text : (strings == null ? "" : strings [index]);
 	return NSString.stringWith(text != null ? text : "");
@@ -430,10 +422,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -444,9 +436,46 @@ public Rectangle getBounds () {
 	checkWidget ();
 	if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
 	parent.checkItems ();
-	NSOutlineView outlineView = (NSOutlineView) parent.view;
-	NSRect rect = outlineView.rectOfRow (outlineView.rowForItem (handle));
-	return new Rectangle((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
+
+	NSOutlineView widget = (NSOutlineView) parent.view;
+	int rowIndex = (int)/*64*/widget.rowForItem (handle);
+	if (rowIndex == -1) return new Rectangle (0, 0, 0, 0);
+
+	NSTableColumn column = parent.columnCount == 0 ? parent.firstColumn : parent.columns [0].nsColumn;
+	int columnIndex = parent.indexOf (column);
+	NSRect titleRect = widget.frameOfCellAtColumn (columnIndex, rowIndex);
+	if (image != null) {
+		titleRect.x += parent.imageBounds.width + Tree.IMAGE_GAP;
+	}
+	Font font = null;
+	if (cellFont != null) font = cellFont[columnIndex];
+	if (font == null) font = this.font;
+	if (font == null) font = parent.font;
+	if (font == null) font = parent.defaultFont ();
+	NSCell cell = parent.dataCell;
+	cell.setImage (null);
+	if (font.extraTraits != 0) {
+		NSAttributedString attribStr = parent.createString (text, font, null, 0, false, true, false);
+		cell.setAttributedStringValue (attribStr);
+		attribStr.release ();
+	} else {
+		cell.setFont (font.handle);
+		NSString str = (NSString) new NSString().alloc();
+		str = str.initWithString(text);
+		cell.setTitle (str);
+		str.release();
+	}
+	// Inlined for performance.  Also prevents a NPE or potential loop, because cellSize() will
+	// eventually send another MeasureItem event.
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = cell.id;
+	super_struct.super_class = OS.objc_msgSend(cell.id, OS.sel_superclass);
+	NSSize size = new NSSize();
+	OS.objc_msgSendSuper_stret(size, super_struct, OS.sel_cellSize);
+//	NSSize size = cell.cellSize ();
+	NSRect columnRect = widget.rectOfColumn (columnIndex);
+	size.width = Math.min (size.width, columnRect.width - (titleRect.x - columnRect.x));
+	return new Rectangle ((int)titleRect.x, (int)titleRect.y, (int)Math.ceil (size.width), (int)Math.ceil (titleRect.height));
 }
 
 /**
@@ -1201,8 +1230,6 @@ public void setFont (int index, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index 39230bb..9f13e55 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java	
@@ -10,11 +10,10 @@
  *******************************************************************************/
 package org.eclipse.swt.widgets;
 
-import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.cocoa.*;
-
 import org.eclipse.swt.*;
 import org.eclipse.swt.events.*;
+import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cocoa.*;
 
 /**
  * This class is the abstract superclass of all user interface objects.  
@@ -57,7 +56,7 @@ public abstract class Widget {
 	static final int KEYED_DATA       = 1 << 2;
 	static final int DISABLED         = 1 << 3;
 	static final int HIDDEN           = 1 << 4;
-	static final int GRAB	             = 1 << 5;
+	static final int HOT			  = 1 << 5;
 	static final int MOVED            = 1 << 6;
 	static final int RESIZED          = 1 << 7;
 	static final int EXPANDING        = 1 << 8;
@@ -84,7 +83,12 @@ public abstract class Widget {
 	static final int SAFARI_EVENTS_FIX = 1<<19;
 	static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
 	static final String GLCONTEXT_KEY = "org.eclipse.swt.internal.cocoa.glcontext"; //$NON-NLS-1$
+	
+	static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
 
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<20;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -127,6 +131,11 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
+}
+
+int /*long*/ accessibleHandle() {
+	return 0;
 }
 
 int /*long*/ accessibilityActionDescription(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
@@ -163,6 +172,10 @@ int /*long*/ accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint poi
 	return OS.objc_msgSendSuper(super_struct, sel, point);
 }
 
+boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+	return callSuperBoolean(id, sel, arg0);
+}
+
 boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
 	return callSuperBoolean(id, sel);
 }
@@ -175,13 +188,18 @@ void accessibilityPerformAction(int /*long*/ id, int /*long*/ sel, int /*long*/
 	callSuper(id, sel, arg0);
 }
 
+void accessibilitySetValue_forAttribute(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+	callSuper(id, sel, arg0, arg1);
+}
+
 String getClipboardText () {
 	NSPasteboard pasteboard = NSPasteboard.generalPasteboard ();
+	if (pasteboard == null) return "";
 	NSString string = pasteboard.stringForType (OS.NSStringPboardType);
 	return string != null ? string.getString () : null;
 }
 
-void setClipRegion (float /*double*/ x, float /*double*/ y) {
+void setClipRegion (NSView view) {
 }
 
 int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) {
@@ -209,6 +227,13 @@ void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0) {
 	OS.objc_msgSendSuper(super_struct, sel, arg0);
 }
 
+void callSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = id;
+	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+	OS.objc_msgSendSuper(super_struct, sel, arg0, arg1);
+}
+
 void callSuper(int /*long*/ id, int /*long*/ sel, NSRect arg0, int /*long*/ arg1) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
@@ -299,6 +324,50 @@ void becomeKeyWindow (int /*long*/ id, int /*long*/ sel) {
 	callSuper(id, sel);
 }
 
+/**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
 boolean resignFirstResponder (int /*long*/ id, int /*long*/ sel) {
 	return callSuperBoolean(id, sel);
 }
@@ -460,10 +529,13 @@ protected void checkSubclass () {
 protected void checkWidget () {
 	Display display = this.display;
 	if (display == null) error (SWT.ERROR_WIDGET_DISPOSED);
-	if (display.thread != Thread.currentThread () && !display.isEmbedded) error (SWT.ERROR_THREAD_INVALID_ACCESS);
+	if (display.thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
 	if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
 }
 
+void clearDeferFlushing (int /*long*/ id, int /*long*/ sel) {
+}
+
 boolean textView_clickOnLink_atIndex(int /*long*/ id, int /*long*/ sel, int /*long*/ textView, int /*long*/ link, int /*long*/ charIndex) {
 	return true;
 }
@@ -475,12 +547,10 @@ void collapseItem_collapseChildren (int /*long*/ id, int /*long*/ sel, int /*lon
 	OS.objc_msgSendSuper(super_struct, sel, item, children);
 }
 
-void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-}
-
 void copyToClipboard (char [] buffer) {
 	if (buffer.length == 0) return;
 	NSPasteboard pasteboard = NSPasteboard.generalPasteboard ();
+	if (pasteboard == null) return;
 	pasteboard.declareTypes (NSArray.arrayWithObject (OS.NSStringPboardType), null);
 	pasteboard.setString (NSString.stringWithCharacters (buffer, buffer.length), OS.NSStringPboardType);
 }
@@ -496,9 +566,19 @@ void createJNIRef () {
 void createWidget () {
 	createJNIRef ();
 	createHandle ();
+	setOrientation();
 	register ();
 }
 	
+void comboBoxSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
+void comboBoxWillDismiss(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
+void comboBoxWillPopUp(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
 void deregister () {
 }
 
@@ -518,6 +598,7 @@ void destroyWidget () {
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -556,6 +637,10 @@ void drawBackground (int /*long*/ id, NSGraphicsContext context, NSRect rect) {
 	/* Do nothing */
 }
 
+void drawBackgroundInClipRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+	callSuper(id, sel, rect);
+}
+
 void drawImageWithFrameInView (int /*long*/ id, int /*long*/ sel, int /*long*/ image, NSRect rect, int /*long*/ view) {
 }
 
@@ -563,6 +648,17 @@ void drawInteriorWithFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cel
 	callSuper(id, sel, cellFrame, view);
 }
 
+void drawLabelInRect(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel, NSRect rect) {
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = id;
+	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+	OS.objc_msgSendSuper(super_struct, sel, shouldTruncateLabel, rect);
+}
+
+void drawViewBackgroundInRect(int /*long*/ id, int /*long*/ sel, NSRect rect) {
+	callSuper(id, sel, rect);
+}
+
 void drawWithExpansionFrame_inView (int /*long*/ id, int /*long*/ sel, NSRect cellFrame, int /*long*/ view) {
 	callSuper(id, sel, cellFrame, view);
 }
@@ -574,7 +670,7 @@ void drawRect (int /*long*/ id, int /*long*/ sel, NSRect rect) {
 	display.isPainting.addObject(view);
 	NSGraphicsContext context = NSGraphicsContext.currentContext();
 	context.saveGraphicsState();
-	setClipRegion(0, 0);
+	setClipRegion(view);
 	drawBackground (id, context, rect);
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
@@ -709,6 +805,7 @@ public Object getData () {
 public Object getData (String key) {
 	checkWidget();
 	if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (key.equals(IS_ACTIVE)) return new Boolean(isActive());
 	if ((state & KEYED_DATA) != 0) {
 		Object [] table = (Object []) data;
 		for (int i=1; i<table.length; i+=2) {
@@ -845,13 +942,17 @@ boolean insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) {
 	return true;
 }
 
+boolean isActive () {
+	return true;
+}
+
 /**
  * Returns <code>true</code> if the widget has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -917,6 +1018,10 @@ void keyUp (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 }
 
 void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
+	mouseDownSuper(id, sel, theEvent);
+}
+
+void mouseDownSuper(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	callSuper(id, sel, theEvent);
 }
 
@@ -1045,9 +1150,20 @@ void outlineViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/
 void outlineViewSelectionDidChange(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
+void outlineViewSelectionIsChanging(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
 void outlineView_setObjectValue_forTableColumn_byItem(int /*long*/ id, int /*long*/ sel, int /*long*/ outlineView, int /*long*/ object, int /*long*/ tableColumn, int /*long*/ item) {
 }
 
+boolean outlineView_shouldTrackCell_forTableColumn_item(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ item) {
+	return true;
+}
+
+boolean outlineView_shouldSelectItem(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ index) {
+	return true;
+}
+
 boolean outlineView_writeItems_toPasteboard(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
 	return false;
 }
@@ -1195,6 +1311,8 @@ public void removeListener (int eventType, Listener handler) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener handler) {
 	checkWidget();
@@ -1227,6 +1345,13 @@ public void removeDisposeListener (DisposeListener listener) {
 	eventTable.unhook (SWT.Dispose, listener);
 }
 
+void scrollClipViewToPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ clipView, NSPoint point) {
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = id;
+	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+	OS.objc_msgSendSuper(super_struct, sel, clipView, point);
+}
+
 void scrollWheel (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	callSuper(id, sel, theEvent);
 }
@@ -1309,6 +1434,20 @@ void sendSearchSelection () {
 void sendSelection () {
 }
 
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+	NSEvent nsEvent = NSApplication.sharedApplication ().currentEvent ();
+	if (nsEvent != null) setInputState (event, nsEvent, 0);
+	sendEvent(eventType, event, send);
+}
+
 void sendVerticalSelection () {
 }
 
@@ -1418,11 +1557,15 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 void setOpenGLContext(Object value) {
 }
 
+void setOrientation () {
+}
+
 void setFrameOrigin (int /*long*/ id, int /*long*/ sel, NSPoint point) {
 	objc_super super_struct = new objc_super();
 	super_struct.receiver = id;
@@ -1568,10 +1711,47 @@ boolean setKeyState (Event event, int type, NSEvent nsEvent) {
 	if (event.keyCode == 0 && event.character == 0) {
 		if (!isNull) return false;
 	}
+	setLocationMask (event, nsEvent);
 	setInputState (event, nsEvent, type);
 	return true;
 }
 
+void setLocationMask (Event event, NSEvent nsEvent) {
+	switch (nsEvent.keyCode ()) {
+		case 55: /* LEFT COMMAND */
+		case 56: /* LEFT SHIFT */
+		case 58: /* LEFT ALT */
+		case 59: /* LEFT CONTROL */
+			event.keyLocation = SWT.LEFT;
+			break;
+		case 54: /* RIGHT COMMAND */
+		case 60: /* RIGHT SHIFT */
+		case 61: /* RIGHT ALT */
+		case 62: /* RIGHT CONTROL */
+			event.keyLocation = SWT.RIGHT;
+			break;
+		case 67:  /* KEYPAD_MULTIPLY */
+		case 69:  /* KEYPAD_ADD */
+		case 76:  /* KEYPAD_CR */
+		case 78:  /* KEYPAD_SUBTRACT */
+		case 65:  /* KEYPAD_DECIMAL */
+		case 75:  /* KEYPAD_DIVIDE */
+		case 82:  /* KEYPAD_0 */
+		case 83:  /* KEYPAD_1 */
+		case 84:  /* KEYPAD_2 */
+		case 85:  /* KEYPAD_3 */
+		case 86:  /* KEYPAD_4 */
+		case 87:  /* KEYPAD_5 */
+		case 88:  /* KEYPAD_6 */
+		case 89:  /* KEYPAD_7 */
+		case 91:  /* KEYPAD_8 */
+		case 92:  /* KEYPAD_9 */
+		case 81:  /* KEYPAD_EQUAL */
+			event.keyLocation = SWT.KEYPAD;
+			break;
+	}
+}
+
 boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) {
 	return true;
 }
@@ -1631,6 +1811,15 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
 	return true;
 }
 
+NSSize sizeOfLabel(int /*long*/ id, int /*long*/ sel, boolean shouldTruncateLabel) {
+	objc_super super_struct = new objc_super();
+	super_struct.receiver = id;
+	super_struct.super_class = OS.objc_msgSend(id, OS.sel_superclass);
+	NSSize result = new NSSize();
+	OS.objc_msgSendSuper_stret(result, super_struct, sel, shouldTruncateLabel);
+	return result;
+}
+
 void superKeyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
 	callSuper (id, sel, theEvent);
 }
@@ -1648,6 +1837,9 @@ void tableViewColumnDidResize (int /*long*/ id, int /*long*/ sel, int /*long*/ a
 void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
 }
 
+void tableViewSelectionIsChanging (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) {
+}
+
 void tableView_didClickTableColumn(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ tableColumn) {
 }
 
@@ -1655,6 +1847,14 @@ int /*long*/ tableView_objectValueForTableColumn_row(int /*long*/ id, int /*long
 	return 0;
 }
 
+boolean tableView_shouldTrackCell_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ table, int /*long*/ cell, /*long*/ int /*long*/ tableColumn, int /*long*/ rowIndex) {
+	return true;
+}
+
+boolean tableView_shouldSelectRow(int /*long*/ id, int /*long*/ sel, int /*long*/ tableView, int /*long*/ index) {
+	return true;
+}
+
 void tableView_setObjectValue_forTableColumn_row(int /*long*/ id, int /*long*/ sel, int /*long*/ aTableView, int /*long*/ anObject, int /*long*/ aTableColumn, int /*long*/ rowIndex) {	
 }
 
@@ -1749,6 +1949,12 @@ void windowDidResignKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notifica
 void windowDidBecomeKey(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
+void windowDidMiniturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
+void windowDidDeminiturize(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
+}
+
 void windowSendEvent(int /*long*/ id, int /*long*/ sel, int /*long*/ event) {
 	callSuper(id, sel, event);
 }
@@ -1767,6 +1973,8 @@ int /*long*/ nextState(int /*long*/ id, int /*long*/ sel) {
 void updateOpenGLContext(int /*long*/ id, int /*long*/ sel, int /*long*/ notification) {
 }
 
-
+boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) {
+	return callSuperBoolean(id, sel);
+}
 
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.c b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.c
index de5b5c4..a344d01 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.c	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.c	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,9 @@ static int callbackEnabled = 1;
 static int callbackEntryCount = 0;
 static int initialized = 0;
 static jint JNI_VERSION = 0;
+#ifdef COCOA
+static NSException *nsException = nil;
+#endif
 
 #ifdef DEBUG_CALL_PRINTS
 static int counter = 0;
@@ -259,6 +262,264 @@ static unsigned char *callbackCode = NULL;
 	FN_##args(125) \
 	FN_##args(126) \
 	FN_##args(127)
+#elif MAX_CALLBACKS == 256
+#define FN_BLOCK(args) \
+	FN_##args(0) \
+	FN_##args(1) \
+	FN_##args(2) \
+	FN_##args(3) \
+	FN_##args(4) \
+	FN_##args(5) \
+	FN_##args(6) \
+	FN_##args(7) \
+	FN_##args(8) \
+	FN_##args(9) \
+	FN_##args(10) \
+	FN_##args(11) \
+	FN_##args(12) \
+	FN_##args(13) \
+	FN_##args(14) \
+	FN_##args(15) \
+	FN_##args(16) \
+	FN_##args(17) \
+	FN_##args(18) \
+	FN_##args(19) \
+	FN_##args(20) \
+	FN_##args(21) \
+	FN_##args(22) \
+	FN_##args(23) \
+	FN_##args(24) \
+	FN_##args(25) \
+	FN_##args(26) \
+	FN_##args(27) \
+	FN_##args(28) \
+	FN_##args(29) \
+	FN_##args(30) \
+	FN_##args(31) \
+	FN_##args(32) \
+	FN_##args(33) \
+	FN_##args(34) \
+	FN_##args(35) \
+	FN_##args(36) \
+	FN_##args(37) \
+	FN_##args(38) \
+	FN_##args(39) \
+	FN_##args(40) \
+	FN_##args(41) \
+	FN_##args(42) \
+	FN_##args(43) \
+	FN_##args(44) \
+	FN_##args(45) \
+	FN_##args(46) \
+	FN_##args(47) \
+	FN_##args(48) \
+	FN_##args(49) \
+	FN_##args(50) \
+	FN_##args(51) \
+	FN_##args(52) \
+	FN_##args(53) \
+	FN_##args(54) \
+	FN_##args(55) \
+	FN_##args(56) \
+	FN_##args(57) \
+	FN_##args(58) \
+	FN_##args(59) \
+	FN_##args(60) \
+	FN_##args(61) \
+	FN_##args(62) \
+	FN_##args(63) \
+	FN_##args(64) \
+	FN_##args(65) \
+	FN_##args(66) \
+	FN_##args(67) \
+	FN_##args(68) \
+	FN_##args(69) \
+	FN_##args(70) \
+	FN_##args(71) \
+	FN_##args(72) \
+	FN_##args(73) \
+	FN_##args(74) \
+	FN_##args(75) \
+	FN_##args(76) \
+	FN_##args(77) \
+	FN_##args(78) \
+	FN_##args(79) \
+	FN_##args(80) \
+	FN_##args(81) \
+	FN_##args(82) \
+	FN_##args(83) \
+	FN_##args(84) \
+	FN_##args(85) \
+	FN_##args(86) \
+	FN_##args(87) \
+	FN_##args(88) \
+	FN_##args(89) \
+	FN_##args(90) \
+	FN_##args(91) \
+	FN_##args(92) \
+	FN_##args(93) \
+	FN_##args(94) \
+	FN_##args(95) \
+	FN_##args(96) \
+	FN_##args(97) \
+	FN_##args(98) \
+	FN_##args(99) \
+	FN_##args(100) \
+	FN_##args(101) \
+	FN_##args(102) \
+	FN_##args(103) \
+	FN_##args(104) \
+	FN_##args(105) \
+	FN_##args(106) \
+	FN_##args(107) \
+	FN_##args(108) \
+	FN_##args(109) \
+	FN_##args(110) \
+	FN_##args(111) \
+	FN_##args(112) \
+	FN_##args(113) \
+	FN_##args(114) \
+	FN_##args(115) \
+	FN_##args(116) \
+	FN_##args(117) \
+	FN_##args(118) \
+	FN_##args(119) \
+	FN_##args(120) \
+	FN_##args(121) \
+	FN_##args(122) \
+	FN_##args(123) \
+	FN_##args(124) \
+	FN_##args(125) \
+	FN_##args(126) \
+	FN_##args(127) \
+	FN_##args(128) \
+	FN_##args(129) \
+	FN_##args(130) \
+	FN_##args(131) \
+	FN_##args(132) \
+	FN_##args(133) \
+	FN_##args(134) \
+	FN_##args(135) \
+	FN_##args(136) \
+	FN_##args(137) \
+	FN_##args(138) \
+	FN_##args(139) \
+	FN_##args(140) \
+	FN_##args(141) \
+	FN_##args(142) \
+	FN_##args(143) \
+	FN_##args(144) \
+	FN_##args(145) \
+	FN_##args(146) \
+	FN_##args(147) \
+	FN_##args(148) \
+	FN_##args(149) \
+	FN_##args(150) \
+	FN_##args(151) \
+	FN_##args(152) \
+	FN_##args(153) \
+	FN_##args(154) \
+	FN_##args(155) \
+	FN_##args(156) \
+	FN_##args(157) \
+	FN_##args(158) \
+	FN_##args(159) \
+	FN_##args(160) \
+	FN_##args(161) \
+	FN_##args(162) \
+	FN_##args(163) \
+	FN_##args(164) \
+	FN_##args(165) \
+	FN_##args(166) \
+	FN_##args(167) \
+	FN_##args(168) \
+	FN_##args(169) \
+	FN_##args(170) \
+	FN_##args(171) \
+	FN_##args(172) \
+	FN_##args(173) \
+	FN_##args(174) \
+	FN_##args(175) \
+	FN_##args(176) \
+	FN_##args(177) \
+	FN_##args(178) \
+	FN_##args(179) \
+	FN_##args(180) \
+	FN_##args(181) \
+	FN_##args(182) \
+	FN_##args(183) \
+	FN_##args(184) \
+	FN_##args(185) \
+	FN_##args(186) \
+	FN_##args(187) \
+	FN_##args(188) \
+	FN_##args(189) \
+	FN_##args(190) \
+	FN_##args(191) \
+	FN_##args(192) \
+	FN_##args(193) \
+	FN_##args(194) \
+	FN_##args(195) \
+	FN_##args(196) \
+	FN_##args(197) \
+	FN_##args(198) \
+	FN_##args(199) \
+	FN_##args(200) \
+	FN_##args(201) \
+	FN_##args(202) \
+	FN_##args(203) \
+	FN_##args(204) \
+	FN_##args(205) \
+	FN_##args(206) \
+	FN_##args(207) \
+	FN_##args(208) \
+	FN_##args(209) \
+	FN_##args(210) \
+	FN_##args(211) \
+	FN_##args(212) \
+	FN_##args(213) \
+	FN_##args(214) \
+	FN_##args(215) \
+	FN_##args(216) \
+	FN_##args(217) \
+	FN_##args(218) \
+	FN_##args(219) \
+	FN_##args(220) \
+	FN_##args(221) \
+	FN_##args(222) \
+	FN_##args(223) \
+	FN_##args(224) \
+	FN_##args(225) \
+	FN_##args(226) \
+	FN_##args(227) \
+	FN_##args(228) \
+	FN_##args(229) \
+	FN_##args(230) \
+	FN_##args(231) \
+	FN_##args(232) \
+	FN_##args(233) \
+	FN_##args(234) \
+	FN_##args(235) \
+	FN_##args(236) \
+	FN_##args(237) \
+	FN_##args(238) \
+	FN_##args(239) \
+	FN_##args(240) \
+	FN_##args(241) \
+	FN_##args(242) \
+	FN_##args(243) \
+	FN_##args(244) \
+	FN_##args(245) \
+	FN_##args(246) \
+	FN_##args(247) \
+	FN_##args(248) \
+	FN_##args(249) \
+	FN_##args(250) \
+	FN_##args(251) \
+	FN_##args(252) \
+	FN_##args(253) \
+	FN_##args(254) \
+	FN_##args(255)
 #else
 #error Invalid MAX_CALLBACKS
 #endif /* MAX_CALLBACKS == 16 */
@@ -438,6 +699,265 @@ FN_BLOCK(12)
 	(jintLong)FN(126, args), \
 	(jintLong)FN(127, args), \
 },
+#elif MAX_CALLBACKS == 256
+#define FN_A_BLOCK(args) { \
+	(jintLong)FN(0, args), \
+	(jintLong)FN(1, args), \
+	(jintLong)FN(2, args), \
+	(jintLong)FN(3, args), \
+	(jintLong)FN(4, args), \
+	(jintLong)FN(5, args), \
+	(jintLong)FN(6, args), \
+	(jintLong)FN(7, args), \
+	(jintLong)FN(8, args), \
+	(jintLong)FN(9, args), \
+	(jintLong)FN(10, args), \
+	(jintLong)FN(11, args), \
+	(jintLong)FN(12, args), \
+	(jintLong)FN(13, args), \
+	(jintLong)FN(14, args), \
+	(jintLong)FN(15, args), \
+	(jintLong)FN(16, args), \
+	(jintLong)FN(17, args), \
+	(jintLong)FN(18, args), \
+	(jintLong)FN(19, args), \
+	(jintLong)FN(20, args), \
+	(jintLong)FN(21, args), \
+	(jintLong)FN(22, args), \
+	(jintLong)FN(23, args), \
+	(jintLong)FN(24, args), \
+	(jintLong)FN(25, args), \
+	(jintLong)FN(26, args), \
+	(jintLong)FN(27, args), \
+	(jintLong)FN(28, args), \
+	(jintLong)FN(29, args), \
+	(jintLong)FN(30, args), \
+	(jintLong)FN(31, args), \
+	(jintLong)FN(32, args), \
+	(jintLong)FN(33, args), \
+	(jintLong)FN(34, args), \
+	(jintLong)FN(35, args), \
+	(jintLong)FN(36, args), \
+	(jintLong)FN(37, args), \
+	(jintLong)FN(38, args), \
+	(jintLong)FN(39, args), \
+	(jintLong)FN(40, args), \
+	(jintLong)FN(41, args), \
+	(jintLong)FN(42, args), \
+	(jintLong)FN(43, args), \
+	(jintLong)FN(44, args), \
+	(jintLong)FN(45, args), \
+	(jintLong)FN(46, args), \
+	(jintLong)FN(47, args), \
+	(jintLong)FN(48, args), \
+	(jintLong)FN(49, args), \
+	(jintLong)FN(50, args), \
+	(jintLong)FN(51, args), \
+	(jintLong)FN(52, args), \
+	(jintLong)FN(53, args), \
+	(jintLong)FN(54, args), \
+	(jintLong)FN(55, args), \
+	(jintLong)FN(56, args), \
+	(jintLong)FN(57, args), \
+	(jintLong)FN(58, args), \
+	(jintLong)FN(59, args), \
+	(jintLong)FN(60, args), \
+	(jintLong)FN(61, args), \
+	(jintLong)FN(62, args), \
+	(jintLong)FN(63, args), \
+	(jintLong)FN(64, args), \
+	(jintLong)FN(65, args), \
+	(jintLong)FN(66, args), \
+	(jintLong)FN(67, args), \
+	(jintLong)FN(68, args), \
+	(jintLong)FN(69, args), \
+	(jintLong)FN(70, args), \
+	(jintLong)FN(71, args), \
+	(jintLong)FN(72, args), \
+	(jintLong)FN(73, args), \
+	(jintLong)FN(74, args), \
+	(jintLong)FN(75, args), \
+	(jintLong)FN(76, args), \
+	(jintLong)FN(77, args), \
+	(jintLong)FN(78, args), \
+	(jintLong)FN(79, args), \
+	(jintLong)FN(80, args), \
+	(jintLong)FN(81, args), \
+	(jintLong)FN(82, args), \
+	(jintLong)FN(83, args), \
+	(jintLong)FN(84, args), \
+	(jintLong)FN(85, args), \
+	(jintLong)FN(86, args), \
+	(jintLong)FN(87, args), \
+	(jintLong)FN(88, args), \
+	(jintLong)FN(89, args), \
+	(jintLong)FN(90, args), \
+	(jintLong)FN(91, args), \
+	(jintLong)FN(92, args), \
+	(jintLong)FN(93, args), \
+	(jintLong)FN(94, args), \
+	(jintLong)FN(95, args), \
+	(jintLong)FN(96, args), \
+	(jintLong)FN(97, args), \
+	(jintLong)FN(98, args), \
+	(jintLong)FN(99, args), \
+	(jintLong)FN(100, args), \
+	(jintLong)FN(101, args), \
+	(jintLong)FN(102, args), \
+	(jintLong)FN(103, args), \
+	(jintLong)FN(104, args), \
+	(jintLong)FN(105, args), \
+	(jintLong)FN(106, args), \
+	(jintLong)FN(107, args), \
+	(jintLong)FN(108, args), \
+	(jintLong)FN(109, args), \
+	(jintLong)FN(110, args), \
+	(jintLong)FN(111, args), \
+	(jintLong)FN(112, args), \
+	(jintLong)FN(113, args), \
+	(jintLong)FN(114, args), \
+	(jintLong)FN(115, args), \
+	(jintLong)FN(116, args), \
+	(jintLong)FN(117, args), \
+	(jintLong)FN(118, args), \
+	(jintLong)FN(119, args), \
+	(jintLong)FN(120, args), \
+	(jintLong)FN(121, args), \
+	(jintLong)FN(122, args), \
+	(jintLong)FN(123, args), \
+	(jintLong)FN(124, args), \
+	(jintLong)FN(125, args), \
+	(jintLong)FN(126, args), \
+	(jintLong)FN(127, args), \
+	(jintLong)FN(128, args), \
+	(jintLong)FN(129, args), \
+	(jintLong)FN(130, args), \
+	(jintLong)FN(131, args), \
+	(jintLong)FN(132, args), \
+	(jintLong)FN(133, args), \
+	(jintLong)FN(134, args), \
+	(jintLong)FN(135, args), \
+	(jintLong)FN(136, args), \
+	(jintLong)FN(137, args), \
+	(jintLong)FN(138, args), \
+	(jintLong)FN(139, args), \
+	(jintLong)FN(140, args), \
+	(jintLong)FN(141, args), \
+	(jintLong)FN(142, args), \
+	(jintLong)FN(143, args), \
+	(jintLong)FN(144, args), \
+	(jintLong)FN(145, args), \
+	(jintLong)FN(146, args), \
+	(jintLong)FN(147, args), \
+	(jintLong)FN(148, args), \
+	(jintLong)FN(149, args), \
+	(jintLong)FN(150, args), \
+	(jintLong)FN(151, args), \
+	(jintLong)FN(152, args), \
+	(jintLong)FN(153, args), \
+	(jintLong)FN(154, args), \
+	(jintLong)FN(155, args), \
+	(jintLong)FN(156, args), \
+	(jintLong)FN(157, args), \
+	(jintLong)FN(158, args), \
+	(jintLong)FN(159, args), \
+	(jintLong)FN(160, args), \
+	(jintLong)FN(161, args), \
+	(jintLong)FN(162, args), \
+	(jintLong)FN(163, args), \
+	(jintLong)FN(164, args), \
+	(jintLong)FN(165, args), \
+	(jintLong)FN(166, args), \
+	(jintLong)FN(167, args), \
+	(jintLong)FN(168, args), \
+	(jintLong)FN(169, args), \
+	(jintLong)FN(170, args), \
+	(jintLong)FN(171, args), \
+	(jintLong)FN(172, args), \
+	(jintLong)FN(173, args), \
+	(jintLong)FN(174, args), \
+	(jintLong)FN(175, args), \
+	(jintLong)FN(176, args), \
+	(jintLong)FN(177, args), \
+	(jintLong)FN(178, args), \
+	(jintLong)FN(179, args), \
+	(jintLong)FN(180, args), \
+	(jintLong)FN(181, args), \
+	(jintLong)FN(182, args), \
+	(jintLong)FN(183, args), \
+	(jintLong)FN(184, args), \
+	(jintLong)FN(185, args), \
+	(jintLong)FN(186, args), \
+	(jintLong)FN(187, args), \
+	(jintLong)FN(188, args), \
+	(jintLong)FN(189, args), \
+	(jintLong)FN(190, args), \
+	(jintLong)FN(191, args), \
+	(jintLong)FN(192, args), \
+	(jintLong)FN(193, args), \
+	(jintLong)FN(194, args), \
+	(jintLong)FN(195, args), \
+	(jintLong)FN(196, args), \
+	(jintLong)FN(197, args), \
+	(jintLong)FN(198, args), \
+	(jintLong)FN(199, args), \
+	(jintLong)FN(200, args), \
+	(jintLong)FN(201, args), \
+	(jintLong)FN(202, args), \
+	(jintLong)FN(203, args), \
+	(jintLong)FN(204, args), \
+	(jintLong)FN(205, args), \
+	(jintLong)FN(206, args), \
+	(jintLong)FN(207, args), \
+	(jintLong)FN(208, args), \
+	(jintLong)FN(209, args), \
+	(jintLong)FN(210, args), \
+	(jintLong)FN(211, args), \
+	(jintLong)FN(212, args), \
+	(jintLong)FN(213, args), \
+	(jintLong)FN(214, args), \
+	(jintLong)FN(215, args), \
+	(jintLong)FN(216, args), \
+	(jintLong)FN(217, args), \
+	(jintLong)FN(218, args), \
+	(jintLong)FN(219, args), \
+	(jintLong)FN(220, args), \
+	(jintLong)FN(221, args), \
+	(jintLong)FN(222, args), \
+	(jintLong)FN(223, args), \
+	(jintLong)FN(224, args), \
+	(jintLong)FN(225, args), \
+	(jintLong)FN(226, args), \
+	(jintLong)FN(227, args), \
+	(jintLong)FN(228, args), \
+	(jintLong)FN(229, args), \
+	(jintLong)FN(230, args), \
+	(jintLong)FN(231, args), \
+	(jintLong)FN(232, args), \
+	(jintLong)FN(233, args), \
+	(jintLong)FN(234, args), \
+	(jintLong)FN(235, args), \
+	(jintLong)FN(236, args), \
+	(jintLong)FN(237, args), \
+	(jintLong)FN(238, args), \
+	(jintLong)FN(239, args), \
+	(jintLong)FN(240, args), \
+	(jintLong)FN(241, args), \
+	(jintLong)FN(242, args), \
+	(jintLong)FN(243, args), \
+	(jintLong)FN(244, args), \
+	(jintLong)FN(245, args), \
+	(jintLong)FN(246, args), \
+	(jintLong)FN(247, args), \
+	(jintLong)FN(248, args), \
+	(jintLong)FN(249, args), \
+	(jintLong)FN(250, args), \
+	(jintLong)FN(251, args), \
+	(jintLong)FN(252, args), \
+	(jintLong)FN(253, args), \
+	(jintLong)FN(254, args), \
+	(jintLong)FN(255, args), \
+},
 #else
 #error Invalid MAX_CALLBACKS
 #endif /* MAX_CALLBACKS == 16 */
@@ -651,6 +1171,7 @@ jintLong callback(int index, ...)
 	jboolean isArrayBased = callbackData[index].isArrayBased;
 	jint argCount = callbackData[index].argCount;
 	jintLong result = callbackData[index].errorResult;
+	jthrowable ex;
 	int detach = 0;
 	va_list vl;
 
@@ -686,7 +1207,8 @@ jintLong callback(int index, ...)
 	}
 
 	/* If an exception has occurred in previous callbacks do not call into the VM. */
-	if ((*env)->ExceptionOccurred(env)) {
+	if ((ex = (*env)->ExceptionOccurred(env))) {
+		(*env)->DeleteLocalRef(env, ex);
 		goto done;
 	}
 
@@ -724,15 +1246,29 @@ jintLong callback(int index, ...)
 	}
 	va_end(vl);
 	ATOMIC_DEC(callbackEntryCount);
-	
+
+#ifdef COCOA
+	if (callbackEntryCount == 0 && nsException) {
+		[nsException release];
+		nsException = nil;
+	}
+#endif
+				
 done:
 	/* If an exception has occurred in Java, return the error result. */
-	if ((*env)->ExceptionOccurred(env)) {
+	if ((ex = (*env)->ExceptionOccurred(env))) {
+		(*env)->DeleteLocalRef(env, ex);
 #ifdef DEBUG_CALL_PRINTS
 		fprintf(stderr, "* java exception occurred\n");
 		(*env)->ExceptionDescribe(env);
 #endif
 		result = callbackData[index].errorResult;
+#ifdef COCOA
+		if (nsException == NULL) {
+			nsException = [[NSException alloc] initWithName:NSGenericException reason:@"Java exception occurred" userInfo:nil];
+			[nsException raise];
+		}
+#endif
 	}
 
 	if (detach) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.h
index 040ac69..352d67b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/callback.h	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,10 @@
 #define RETURN_CAST (LRESULT)
 #endif
 
+#if defined COCOA
+#import <Foundation/Foundation.h>
+#endif
+
 #ifndef RETURN_TYPE
 #define RETURN_TYPE jintLong
 #endif
@@ -41,7 +45,7 @@
 #ifdef REDUCED_CALLBACKS
 #define MAX_CALLBACKS 16
 #else
-#ifdef USE_ASSEMBLER
+#if (defined(USE_ASSEMBLER) || defined(GTK))
 #define MAX_CALLBACKS 256
 #else
 #define MAX_CALLBACKS 128
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
index 4be9a86..7182563 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak	
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,5 +10,5 @@
 #*******************************************************************************
 
 maj_ver=3
-min_ver=557
-comma_ver=3,5,5,7
+min_ver=659
+comma_ver=3,6,5,9
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/swt.h b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/swt.h
index b955471..55756a6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/swt.h	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/library/swt.h	
@@ -119,11 +119,16 @@ extern int IS_JNI_1_2;
 		}
 #else
 #define CALLING_CONVENTION
+#ifdef AIX
+#define LOAD_FLAGS RTLD_LAZY | RTLD_MEMBER
+#else
+#define LOAD_FLAGS RTLD_LAZY
+#endif 
 #define LOAD_FUNCTION(var, name) \
 		static int initialized = 0; \
 		static void *var = NULL; \
 		if (!initialized) { \
-			void* handle = dlopen(name##_LIB, RTLD_LAZY); \
+			void* handle = dlopen(name##_LIB, LOAD_FLAGS); \
 			if (handle) var = dlsym(handle, #name); \
 			initialized = 1; \
 		}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
index 9369dc3..8d7c355 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -464,6 +464,9 @@ public class SWT {
 	 * @see org.eclipse.swt.widgets.Display#addFilter
 	 * @see org.eclipse.swt.widgets.Event
 	 * 
+	 * @see org.eclipse.swt.widgets.Control#addDragDetectListener
+	 * @see org.eclipse.swt.events.DragDetectListener#dragDetected
+	 * @see org.eclipse.swt.events.DragDetectEvent
 	 * @see org.eclipse.swt.dnd.DragSource
 	 */
 	public static final int DragDetect = 29;
@@ -551,15 +554,40 @@ public class SWT {
 	public static final int SetData = 36;
 
 	/**
-	 * The mouse wheel event type (value is 37).
+	 * The mouse vertical wheel event type (value is 37).
+	 * 
+	 * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
+	 * @see org.eclipse.swt.widgets.Display#addFilter
+	 * @see org.eclipse.swt.widgets.Event
+	 * 
+	 * @since 3.6
+	 */
+	public static final int MouseVerticalWheel = 37;
+	
+	/**
+	 * The mouse horizontal wheel event type (value is 38).
 	 * 
 	 * @see org.eclipse.swt.widgets.Widget#addListener
 	 * @see org.eclipse.swt.widgets.Display#addFilter
 	 * @see org.eclipse.swt.widgets.Event
 	 * 
+	 * @since 3.6
+	 */
+	public static final int MouseHorizontalWheel = 38;
+	
+	/**
+	 * The mouse wheel event type (value is 37).
+	 * This is a synonym for {@link #MouseVerticalWheel} (value is 37).  
+	 * Newer applications should use {@link #MouseVerticalWheel} instead 
+	 * of {@link #MouseWheel} to make code more understandable.
+	 *  
+	 * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
+	 * @see org.eclipse.swt.widgets.Display#addFilter
+	 * @see org.eclipse.swt.widgets.Event
+	 * 
 	 * @since 3.1
 	 */
-	public static final int MouseWheel = 37;
+	public static final int MouseWheel = MouseVerticalWheel;
 
 	/**
 	 * The settings changed event type (value is 39).
@@ -637,6 +665,55 @@ public class SWT {
 	 * @since 3.4
 	 */
 	public static final int ImeComposition = 43;
+
+	/**
+	 * The orientation change event type (value is 44).  
+	 * <p>
+	 * On some platforms the orientation of text widgets
+	 * can be changed by keyboard shortcut.
+	 * The application can use the <code>doit</code> field
+	 * of the event to stop the change from happening.
+	 * </p> 
+	 * 
+	 * @see org.eclipse.swt.widgets.Widget#addListener
+	 * @see org.eclipse.swt.widgets.Display#addFilter
+	 * @see org.eclipse.swt.widgets.Event
+	 * 
+	 * @since 3.6
+	 */
+	public static final int OrientationChange = 44;
+
+	/**
+	 * The skin event type (value is 45).
+	 * 
+	 * <p>
+	 * The skin event is sent by the display when a widget needs to
+	 * be skinned. 
+	 * </p>
+	 * 
+	 * @see org.eclipse.swt.widgets.Widget#addListener
+	 * @see org.eclipse.swt.widgets.Display#addFilter
+	 * @see org.eclipse.swt.widgets.Event
+	 * @see org.eclipse.swt.widgets.Widget#reskin(int)
+	 * 
+	 * @since 3.6
+	 */
+	public static final int Skin = 45;
+	
+	/**
+	 * The open document event type (value is 46).
+	 * 
+	 * <p>
+	 * This event is sent when SWT receives notification that a document 
+	 * should be opened.
+	 * </p>
+	 *  
+     * @see org.eclipse.swt.widgets.Display#addListener
+     * @see org.eclipse.swt.widgets.Event
+     * 
+     * @since 3.6
+	 */
+	public static final int OpenDocument = 46;
 	
 	/* Event Details */
 	
@@ -820,6 +897,34 @@ public class SWT {
 	 * (value is 1<<9).
 	 */
 	public static final int TRAVERSE_PAGE_NEXT = 1 << 9;
+	
+	/**
+	 * A constant indicating that widgets have changed.
+	 * (value is 1<<1).
+	 * 
+	 * <p><b>Used By:</b><ul>
+	 * <li><code>Composite</code> layout</li>
+	 * </ul></p>
+	 * 
+	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
+	 * 
+	 * @since 3.6
+	 */
+	public static final int CHANGED = 1 << 1;
+
+	/**
+	 * A constant indicating that a given operation should be deferred.
+	 * (value is 1<<2).
+	 * 
+	 * <p><b>Used By:</b><ul>
+	 * <li><code>Composite</code> layout</li>
+	 * </ul></p>
+	 * 
+	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
+	 * 
+	 * @since 3.6
+	 */
+	public static final int DEFER = 1 << 2;
 
 	/**
 	 * A constant known to be zero (0), typically used in operations
@@ -1645,6 +1750,7 @@ public class SWT {
 	 * since align DOWN and align BOTTOM are considered the same).
 	 * <p><b>Used By:</b><ul>
 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
+	 * <li><code>TabFolder</code></li>
 	 * </ul></p>
 	 */
 	public static final int BOTTOM             = DOWN;
@@ -1665,9 +1771,13 @@ public class SWT {
 	
 	/**
 	 * Style constant for align left behavior (value is 1<<14).
-	 * This is a synonym for LEAD (value is 1<<14).  Newer
-	 * applications should use LEAD instead of LEFT to make code more
+	 * This is a synonym for {@link #LEAD} (value is 1<<14).  Newer
+	 * applications should use {@link #LEAD} instead of {@link #LEFT} to make code more
 	 * understandable on right-to-left platforms.
+	 * <p>
+	 * This constant can also be used to representing the left keyboard 
+	 * location during a key event.
+	 * </p>
 	 */
 	public static final int LEFT               = LEAD;
 
@@ -1687,9 +1797,13 @@ public class SWT {
 		
 	/**
 	 * Style constant for align right behavior (value is 1<<17).
-	 * This is a synonym for TRAIL (value is 1<<17).  Newer
-	 * applications should use TRAIL instead of RIGHT to make code more
+	 * This is a synonym for {@link #TRAIL} (value is 1<<17).  Newer
+	 * applications should use {@link #TRAIL} instead of {@link #RIGHT} to make code more
 	 * understandable on right-to-left platforms.
+	 * <p>
+	 * This constant can also be used to representing the right keyboard 
+	 * location during a key event.
+	 * </p>
 	 */
 	public static final int RIGHT              = TRAIL;
 
@@ -2264,6 +2378,57 @@ public class SWT {
 	public static final int F15 = KEYCODE_BIT + 24;
 	
 	/**
+	 * Keyboard event constant representing the F16 key
+	 * (value is (1<<25)+25).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int F16 = KEYCODE_BIT + 25;
+
+	
+	/**
+	 * Keyboard event constant representing the F17 key
+	 * (value is (1<<26)+26).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int F17 = KEYCODE_BIT + 26;
+
+	
+	/**
+	 * Keyboard event constant representing the F18 key
+	 * (value is (1<<27)+27).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int F18 = KEYCODE_BIT + 27;
+
+	
+	/**
+	 * Keyboard event constant representing the F19 key
+	 * (value is (1<<28)+28).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int F19 = KEYCODE_BIT + 28;
+	
+	/**
+	 * Keyboard event constant representing the F20 key
+	 * (value is (1<<29)+29).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int F20 = KEYCODE_BIT + 29;
+	
+	/**
+	 * Keyboard event constant representing the keypad location.
+	 * (value is 1<<1).
+	 * 
+	 * @since 3.6
+	 */
+	public static final int KEYPAD = 1 << 1;
+	
+	/**
 	 * Keyboard event constant representing the numeric key
 	 * pad multiply key (value is (1<<24)+42).
 	 * 
@@ -3670,6 +3835,40 @@ public class SWT {
 	 */	
 	public static final int MOVEMENT_WORD_START = 1 << 4;
 
+	/**
+	 * A constant indicating that a given operation should be performed on
+	 * all widgets (value is 1<<0).
+	 * 
+	 * <p><b>Used By:</b><ul>
+	 * <li><code>Composite</code> layout</li>
+	 * </ul></p>
+	 * 
+	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
+	 * 
+	 * @since 3.6
+	 */
+	public static final int ALL = 1 << 0;
+	
+	/**
+	 * Key value for setting and getting the skin class of a widget. 
+	 * 
+	 * @see org.eclipse.swt.widgets.Widget#getData(String)
+	 * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
+	 * 
+	 * @since 3.6
+	 */
+	public static final String SKIN_CLASS = "org.eclipse.swt.skin.class";
+
+	/**
+	 * Key value for setting and getting the skin id of a widget.
+	 * 
+	 * @see org.eclipse.swt.widgets.Widget#getData(String)
+	 * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
+	 * 
+	 * @since 3.6
+	 */
+	public static final String SKIN_ID = "org.eclipse.swt.skin.id";
+
 	
 /**
  * Answers a concise, human readable description of the error code.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
index 7a3a1d7..03ecb92 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,11 +59,36 @@ public class KeyEvent extends TypedEvent {
 	public int keyCode;
 	
 	/**
-	 * the state of the keyboard modifier keys at the time
-	 * the event was generated, as defined by the key code
-	 * constants in class <code>SWT</code>.
+	 * depending on the event, the location of key specified by the
+	 * keyCode or character. The possible values for this field are
+	 * <code>SWT.LEFT</code>, <code>SWT.RIGHT</code>, <code>SWT.KEYPAD</code>,
+	 * or <code>SWT.NONE</code> representing the main keyboard area.
+	 * <p>
+	 * The location field can be used to differentiate key events that have
+	 * the same key code and character but are generated by different keys
+	 * on the keyboard. For example, a key down event with the key code equal
+	 * to SWT.SHIFT can be generated by the left and the right shift keys on
+	 * the keyboard.
+	 * </p><p>
+	 * The location field can only be used to determine the location of
+	 * the key code or character in the current event. It does not include
+	 * information about the location of modifiers in the state mask.
+	 * </p>
 	 * 
-	 * @see org.eclipse.swt.SWT
+	 * @see org.eclipse.swt.SWT#LEFT
+	 * @see org.eclipse.swt.SWT#RIGHT
+	 * @see org.eclipse.swt.SWT#KEYPAD
+	 * 
+	 * @since 3.6
+	 */
+	public int keyLocation;
+	
+	/**
+	 * the state of the keyboard modifier keys and mouse masks
+	 * at the time the event was generated.
+	 * 
+	 * @see org.eclipse.swt.SWT#MODIFIER_MASK
+	 * @see org.eclipse.swt.SWT#BUTTON_MASK
 	 */
 	public int stateMask;
 	
@@ -85,6 +110,7 @@ public KeyEvent(Event e) {
 	super(e);
 	this.character = e.character;
 	this.keyCode = e.keyCode;
+	this.keyLocation = e.keyLocation;
 	this.stateMask = e.stateMask;
 	this.doit = e.doit;
 }
@@ -100,6 +126,7 @@ public String toString() {
 	return string.substring (0, string.length() - 1) // remove trailing '}'
 		+ " character='" + ((character == 0) ? "\\0" : "" + character) + "'"
 		+ " keyCode=" + keyCode
+		+ " keyLocation=" + keyLocation
 		+ " stateMask=" + stateMask
 		+ " doit=" + doit
 		+ "}";
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MouseEvent.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MouseEvent.java
index 19da769..2730002 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MouseEvent.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MouseEvent.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,9 @@ public class MouseEvent extends TypedEvent {
 	/**
 	 * the state of the keyboard modifier keys and mouse masks
 	 * at the time the event was generated.
+	 * 
+	 * @see org.eclipse.swt.SWT#MODIFIER_MASK
+	 * @see org.eclipse.swt.SWT#BUTTON_MASK
 	 */
 	public int stateMask;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java
index 2d909d1..141268b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Drawable.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,8 @@ public interface Drawable {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
  
 public int /*long*/ internal_new_GC (GCData data);
@@ -57,6 +59,8 @@ public int /*long*/ internal_new_GC (GCData data);
  *
  * @param handle the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ handle, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java
index 24c7f64..ea9f1d4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/ImageData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -505,6 +505,8 @@ void setAllFields(int width, int height, int depth, int scanlinePad,
  * <p>
  * This method is for internal use, and is not described further.
  * </p>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static ImageData internal_new(
 	int width, int height, int depth, PaletteData palette,
@@ -1778,7 +1780,7 @@ static void blit(int op,
 	if ((destWidth <= 0) || (destHeight <= 0) || (alphaMode == ALPHA_TRANSPARENT)) return;
 
 	// these should be supplied as params later
-	final int srcAlphaMask = 0, destAlphaMask = 0;
+	int srcAlphaMask = 0, destAlphaMask = 0;
 
 	/*** Prepare scaling data ***/
 	final int dwm1 = destWidth - 1;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java
index 82c4504..c683130 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/graphics/Resource.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,6 +58,7 @@ void destroy() {
  * Disposes of the operating system resources associated with
  * this resource. Applications must dispose of all resources
  * which they allocate.
+ * This method does nothing if the resource is already disposed.
  */
 public void dispose() {
 	if (device == null) return;
@@ -91,7 +92,7 @@ void init() {
  * <p>
  * This method gets the dispose state for the resource.
  * When a resource has been disposed, it is an error to
- * invoke any other method using the resource.
+ * invoke any other method (except {@link #dispose()}) using the resource.
  *
  * @return <code>true</code> when the resource is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java
index cf563d4..3d01237 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PNGFileFormat.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -252,9 +252,6 @@ void setPixelData(byte[] data, ImageData imageData) {
 			imageData.alphaData = alphaData;
 			break;
 		}		
-		case PngIhdrChunk.COLOR_TYPE_RGB:
-			imageData.data = data;
-			break;
 		case PngIhdrChunk.COLOR_TYPE_PALETTE:
 			imageData.data = data;
 			if (alphaPalette != null) {
@@ -268,8 +265,23 @@ void setPixelData(byte[] data, ImageData imageData) {
 				imageData.alphaData = alphaData;
 			}
 			break;
+		case PngIhdrChunk.COLOR_TYPE_RGB:
 		default:
-			imageData.data = data;
+			int height = imageData.height;
+			int destBytesPerLine = imageData.bytesPerLine;
+			int srcBytesPerLine = getAlignedBytesPerRow();
+			/*
+			* If the image uses 16-bit depth, it is converted
+			* to an 8-bit depth image.
+			*/
+			if (headerChunk.getBitDepth() > 8) srcBytesPerLine /= 2;
+			if (destBytesPerLine != srcBytesPerLine) {
+				for (int y = 0; y < height; y++) {
+					System.arraycopy(data, y * srcBytesPerLine, imageData.data, y * destBytesPerLine, srcBytesPerLine);
+				}
+			} else {
+				imageData.data = data;
+			}
 			break;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java
index 82a9b51..28299db 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngEncoder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -245,7 +245,7 @@ void writeImageData() throws IOException {
 			os.write(filter);
 			
 			data.getPixels(0, y, width, lineData, 0);
-
+			
 			os.write(lineData);
 		
 		}
@@ -268,23 +268,23 @@ void writeImageData() throws IOException {
 		int blueMask = data.palette.blueMask;
 		
 		byte[] lineBytes = new byte[width * (colorType == 6 ? 4 : 3)];
-
+		
 		for (int y = 0; y < height; y++) {
-
+		
 			int filter = 0;
 			os.write(filter);
-
+			
 			data.getPixels(0, y, width, lineData, 0);
-
+			
 			if (colorType == 6) {
 				data.getAlphas(0, y, width, alphaData, 0);
 			}
-
+			
 			int offset = 0;
 			for (int x = 0; x < lineData.length; x++) {
-
+			
 				int pixel = lineData[x];
-
+				
 				int r = pixel & redMask;
 				lineBytes[offset++] = (byte) ((redShift < 0) ? r >>> -redShift
 						: r << redShift);
@@ -294,17 +294,17 @@ void writeImageData() throws IOException {
 				int b = pixel & blueMask;
 				lineBytes[offset++] = (byte) ((blueShift < 0) ? b >>> -blueShift
 						: b << blueShift);
-
+				
 				if (colorType == 6) {
 					lineBytes[offset++] = alphaData[x];
 				}
-
+			
 			}
 			
 			os.write(lineBytes);
 			
 		}
-		
+	
 	}
 	
 	os.flush();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngLzBlockReader.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngLzBlockReader.java
index e4b8d71..a2d9c1f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngLzBlockReader.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngLzBlockReader.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ void setWindowSize(int windowSize) {
 
 void readNextBlockHeader() throws IOException {
 	isLastBlock = stream.getNextIdatBit() != 0;
-	compressionType = (byte)(stream.getNextIdatBits(2) & 0xFF);
+	compressionType = (byte) stream.getNextIdatBits(2);
 	if (compressionType > 2) stream.error();	
 	
 	if (compressionType == UNCOMPRESSED) {
@@ -92,14 +92,7 @@ byte getNextByte() throws IOException {
 		uncompressedBytesRemaining--;
 		return stream.getNextIdatByte();
 	} else {
-		byte value = getNextCompressedByte();
-		if (value == END_OF_COMPRESSED_BLOCK) {
-			if (isLastBlock) stream.error();
-			readNextBlockHeader();
-			return getNextByte();
-		} else {
-			return value;
-		}
+		return getNextCompressedByte();
 	}
 }
 
@@ -136,10 +129,10 @@ private byte getNextCompressedByte() throws IOException {
 	
 	int value = huffmanTables.getNextLiteralValue(stream);
 	if (value < END_OF_COMPRESSED_BLOCK) {
-		window[windowIndex] = (byte) (value & 0xFF);
+		window[windowIndex] = (byte) value;
 		windowIndex++;
 		if (windowIndex >= window.length) windowIndex = 0;
-		return (byte) (value & 0xFF);		
+		return (byte) value;		
 	} else if (value == END_OF_COMPRESSED_BLOCK) {
 		readNextBlockHeader();
 		return getNextByte();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java
index da5f84c..dbcce8a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFDirectory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ final class TIFFDirectory {
 	int depth;
 	
 	/* Directory fields */
+	int subfileType;
 	int imageWidth;
 	int imageLength;
 	int[] bitsPerSample;
@@ -41,19 +42,27 @@ final class TIFFDirectory {
 	
 	static final int NO_VALUE = -1;
 	
+	static final short TAG_NewSubfileType = 254;
+	static final short TAG_SubfileType = 255;
 	static final short TAG_ImageWidth = 256;
 	static final short TAG_ImageLength = 257;
 	static final short TAG_BitsPerSample = 258;
 	static final short TAG_Compression = 259;
 	static final short TAG_PhotometricInterpretation = 262;
+	static final short TAG_FillOrder = 266;
+	static final short TAG_ImageDescription = 270;
 	static final short TAG_StripOffsets = 273;
+	static final short TAG_Orientation = 274;
 	static final short TAG_SamplesPerPixel = 277;
 	static final short TAG_RowsPerStrip = 278;
 	static final short TAG_StripByteCounts = 279;
 	static final short TAG_XResolution = 282;
 	static final short TAG_YResolution = 283;
+	static final short TAG_PlanarConfiguration = 284;
 	static final short TAG_T4Options = 292;
 	static final short TAG_ResolutionUnit = 296;
+	static final short TAG_Software = 305;
+	static final short TAG_DateTime = 306;
 	static final short TAG_ColorMap = 320;
 	
 	static final int TYPE_BYTE = 1;
@@ -62,6 +71,13 @@ final class TIFFDirectory {
 	static final int TYPE_LONG = 4;
 	static final int TYPE_RATIONAL = 5;
 	
+	static final int FILETYPE_REDUCEDIMAGE = 1;
+	static final int FILETYPE_PAGE = 2;
+	static final int FILETYPE_MASK = 4;
+	static final int OFILETYPE_IMAGE = 1;
+	static final int OFILETYPE_REDUCEDIMAGE = 2;
+	static final int OFILETYPE_PAGE = 3;
+	
 	/* Different compression schemes */
 	static final int COMPRESSION_NONE = 1;
 	static final int COMPRESSION_CCITT_3_1 = 2;
@@ -85,12 +101,12 @@ int decodePackBits(byte[] src, byte[] dest, int offsetDest) {
 	int srcIndex = 0;
 	while (srcIndex < src.length) {
 		byte n = src[srcIndex];
-		if (0 <= n && n <= 127) {
+		if (n >= 0) {
 			/* Copy next n+1 bytes literally */
 			System.arraycopy(src, ++srcIndex, dest, destIndex, n + 1);
 			srcIndex += n + 1;		
 			destIndex += n + 1;	
-		} else if (-127 <= n && n <= -1) {
+		} else if (n >= -127) {
 			/* Copy next byte -n+1 times */
 			byte value = src[++srcIndex];
 			for (int j = 0; j < -n + 1; j++) {
@@ -299,6 +315,15 @@ void parseEntries(byte[] buffer) throws IOException {
 		int type = toInt(buffer, offset + 2, TYPE_SHORT);
 		int count = toInt(buffer, offset + 4, TYPE_LONG);
 		switch (tag) {
+			case TAG_NewSubfileType: {
+				subfileType = getEntryValue(type, buffer, offset);
+				break;
+			}
+			case TAG_SubfileType: {
+				int oldSubfileType = getEntryValue(type, buffer, offset);
+				subfileType = oldSubfileType == OFILETYPE_REDUCEDIMAGE ? FILETYPE_REDUCEDIMAGE : oldSubfileType == OFILETYPE_PAGE ? FILETYPE_PAGE : 0;
+				break;
+			}
 			case TAG_ImageWidth: {
 				imageWidth = getEntryValue(type, buffer, offset);
 				break;
@@ -317,6 +342,14 @@ void parseEntries(byte[] buffer) throws IOException {
 				compression = getEntryValue(type, buffer, offset);
 				break;
 			}
+			case TAG_FillOrder: {
+				/* Ignored: baseline only requires default fill order. */
+				break;
+			}
+			case TAG_ImageDescription: {
+				/* Ignored */
+				break;
+			}
 			case TAG_PhotometricInterpretation: {
 				photometricInterpretation = getEntryValue(type, buffer, offset);
 				break;
@@ -327,6 +360,10 @@ void parseEntries(byte[] buffer) throws IOException {
 				getEntryValue(type, buffer, offset, stripOffsets);
 				break;
 			}
+			case TAG_Orientation: {
+				/* Ignored: baseline only requires top left orientation. */
+				break;
+			}
 			case TAG_SamplesPerPixel: {
 				if (type != TYPE_SHORT) SWT.error(SWT.ERROR_INVALID_IMAGE);
 				samplesPerPixel = getEntryValue(type, buffer, offset);
@@ -351,6 +388,10 @@ void parseEntries(byte[] buffer) throws IOException {
 				/* Ignored */
 				break;
 			}
+			case TAG_PlanarConfiguration: {
+				/* Ignored: baseline only requires default planar configuration. */
+				break;
+			}
 			case TAG_T4Options: {
 				if (type != TYPE_LONG) SWT.error(SWT.ERROR_INVALID_IMAGE);
 				t4Options = getEntryValue(type, buffer, offset);
@@ -364,6 +405,14 @@ void parseEntries(byte[] buffer) throws IOException {
 				/* Ignored */
 				break;
 			}
+			case TAG_Software: {
+				/* Ignored */
+				break;
+			}
+			case TAG_DateTime: {
+				/* Ignored */
+				break;
+			}
 			case TAG_ColorMap: {
 				if (type != TYPE_SHORT) SWT.error(SWT.ERROR_INVALID_IMAGE);
 				/* Get the offset of the colorMap (use TYPE_LONG) */
@@ -374,7 +423,7 @@ void parseEntries(byte[] buffer) throws IOException {
 	}
 }
 
-public ImageData read() throws IOException {
+public ImageData read(int [] nextIFDOffset) throws IOException {
 	/* Set TIFF default values */
 	bitsPerSample = new int[] {1};
 	colorMapOffset = NO_VALUE;
@@ -392,6 +441,9 @@ public ImageData read() throws IOException {
 	int numberEntries = toInt(buffer, 0, TYPE_SHORT);
 	buffer = new byte[IFD_ENTRY_SIZE * numberEntries];
 	file.read(buffer);
+	byte buffer2[] = new byte[4];
+	file.read(buffer2);
+	nextIFDOffset[0] = toInt(buffer2, 0, TYPE_LONG);
 	parseEntries(buffer);
 	
 	PaletteData palette = null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFFileFormat.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFFileFormat.java
index b419a57..2e0298b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFFileFormat.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/TIFFFileFormat.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,11 +53,17 @@ ImageData[] loadFromByteStream() {
 		int offset = isLittleEndian ? 
 			(header[4] & 0xFF) | ((header[5] & 0xFF) << 8) | ((header[6] & 0xFF) << 16) | ((header[7] & 0xFF) << 24) :
 			(header[7] & 0xFF) | ((header[6] & 0xFF) << 8) | ((header[5] & 0xFF) << 16) | ((header[4] & 0xFF) << 24);
-		file.seek(offset);
-		TIFFDirectory directory = new TIFFDirectory(file, isLittleEndian, loader);
-		ImageData image = directory.read();
-		/* A baseline reader is only expected to read the first directory */
-		images = new ImageData[] {image};
+		while (offset != 0) {
+			file.seek(offset);
+			TIFFDirectory directory = new TIFFDirectory(file, isLittleEndian, loader);
+			int [] nextIFDOffset = new int[1];
+			ImageData image = directory.read(nextIFDOffset);
+			offset = nextIFDOffset[0];
+			ImageData[] oldImages = images;
+			images = new ImageData[oldImages.length + 1];
+			System.arraycopy(oldImages, 0, images, 0, oldImages.length);
+			images[images.length - 1] = image;
+		}
 	} catch (IOException e) {
 		SWT.error(SWT.ERROR_IO, e);
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
index 81d08aa..04af102 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -181,6 +181,92 @@ int compressRLE8Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boole
 	
 	return size;
 }
+void convertPixelsToBGR(ImageData image, byte[] dest) {
+	/*
+	 * For direct palette, uncompressed image, BMP encoders expect the
+	 * pixels to be in BGR format for 24 & 32 bit and RGB 1555 for 16 bit
+	 * On Linux and MacOS, the pixels are in RGB format. Also, in
+	 * MacOS, the alpha byte may be first. 
+	 * Hence, we use the palette information of the image and convert 
+	 * the pixels to the required format. Converted pixels are stored
+	 * in dest byte array.
+	 */
+	byte[] data = image.data;
+	PaletteData palette = image.palette;
+	for (int y = 0; y < image.height; y++) {
+		int index;
+		int srcX = 0, srcY = y;
+		int numOfBytes = image.depth / 8;
+		index = (y * image.bytesPerLine);
+
+		for (int i = 0; i < image.width; i++) {
+			int pixel = 0;
+			switch (image.depth) {
+				case 32:
+					pixel = ((data[index] & 0xFF) << 24)
+							| ((data[index + 1] & 0xFF) << 16)
+							| ((data[index + 2] & 0xFF) << 8)
+							| (data[index + 3] & 0xFF);
+					break;
+				case 24:
+					pixel = ((data[index] & 0xFF) << 16)
+							| ((data[index + 1] & 0xFF) << 8)
+							| (data[index + 2] & 0xFF);
+					break;
+				case 16:
+					pixel = ((data[index + 1] & 0xFF) << 8)
+							| (data[index] & 0xFF);
+					break;
+				default:
+					SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
+			}
+
+			if (image.depth == 16) {
+				/* convert to RGB 555 format */
+				int r = pixel & palette.redMask;
+				r = ((palette.redShift < 0) ? r >>> -palette.redShift
+						: r << palette.redShift);
+
+				int g = pixel & palette.greenMask;
+				g = ((palette.greenShift < 0) ? g >>> -palette.greenShift
+						: g << palette.greenShift);
+				g = (g & 0xF8);	/* In 565 format, G is 6 bit, mask it to 5 bit */
+
+				int b = pixel & palette.blueMask;
+				b = ((palette.blueShift < 0) ? b >>> -palette.blueShift
+						: b << palette.blueShift);
+
+				int modPixel = (r << 7) | (g << 2) | (b >> 3);
+				dest[index] = (byte) (modPixel & 0xFF);
+				dest[index + 1] = (byte) ((modPixel >> 8) & 0xFF);
+			} else {
+				/* convert to BGR format */
+				int b = pixel & palette.blueMask;
+				dest[index] = (byte) ((palette.blueShift < 0) ? b >>> -palette.blueShift
+						: b << palette.blueShift);
+
+				int g = pixel & palette.greenMask;
+				dest[index + 1] = (byte) ((palette.greenShift < 0) ? g >>> -palette.greenShift
+						: g << palette.greenShift);
+
+				int r = pixel & palette.redMask;
+				dest[index + 2] = (byte) ((palette.redShift < 0) ? r >>> -palette.redShift
+						: r << palette.redShift);
+
+				if (numOfBytes == 4) dest[index + 3] = 0;
+			}
+
+			srcX++;
+			if (srcX >= image.width) {
+				srcY++;
+				index = srcY * image.bytesPerLine;
+				srcX = 0;
+			} else {
+				index += numOfBytes;
+			}
+		}
+	}
+}
 void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
 	if (cmp == 1) { // BMP_RLE8_COMPRESSION
 		if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
@@ -331,6 +417,21 @@ boolean isFileFormat(LEDataInputStream stream) {
 		return false;
 	}
 }
+boolean isPaletteBMP(PaletteData pal, int depth) {
+	switch(depth) {
+		case 32:
+		    if ((pal.redMask == 0xFF00) && (pal.greenMask == 0xFF0000) && (pal.blueMask == 0xFF000000)) return true;
+		    return false;
+		case 24:
+			if ((pal.redMask == 0xFF) && (pal.greenMask == 0xFF00) && (pal.blueMask == 0xFF0000)) return true;
+			return false;
+		case 16:
+		    if ((pal.redMask == 0x7C00) && (pal.greenMask == 0x3E0) && (pal.blueMask == 0x1F)) return true;
+		    return false;
+		default:
+			return true;
+	}
+}
 byte[] loadData(byte[] infoHeader) {
 	int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
 	int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
@@ -501,19 +602,20 @@ static byte[] paletteToBytes(PaletteData pal) {
  * Unload the given image's data into the given byte stream
  * using the given compression strategy. 
  * Answer the number of bytes written.
+ * Method modified to use the passed data if it is not null.
  */
-int unloadData(ImageData image, OutputStream out, int comp) {
+int unloadData(ImageData image, byte[] data, OutputStream out, int comp) {
 	int totalSize = 0;
 	try {
 		if (comp == 0)
-			return unloadDataNoCompression(image, out);
+			return unloadDataNoCompression(image, data, out);
 		int bpl = (image.width * image.depth + 7) / 8;
 		int bmpBpl = (bpl + 3) / 4 * 4; // BMP pads scanlines to multiples of 4 bytes
 		int imageBpl = image.bytesPerLine;
 		// Compression can actually take twice as much space, in worst case
 		byte[] buf = new byte[bmpBpl * 2];
 		int srcOffset = imageBpl * (image.height - 1); // Start at last line
-		byte[] data = image.data;
+		if (data == null) data = image.data;
 		totalSize = 0;
 		byte[] buf2 = new byte[32768];
 		int buf2Offset = 0;
@@ -539,15 +641,16 @@ int unloadData(ImageData image, OutputStream out, int comp) {
  * Prepare the given image's data for unloading into a byte stream
  * using no compression strategy.
  * Answer the number of bytes written.
+ * Method modified to use the passed data if it is not null.
  */
-int unloadDataNoCompression(ImageData image, OutputStream out) {
+int unloadDataNoCompression(ImageData image, byte[] data, OutputStream out) {
 	int bmpBpl = 0;
 	try {
 		int bpl = (image.width * image.depth + 7) / 8;
 		bmpBpl = (bpl + 3) / 4 * 4; // BMP pads scanlines to multiples of 4 bytes
 		int linesPerBuf = 32678 / bmpBpl;
 		byte[] buf = new byte[linesPerBuf * bmpBpl];
-		byte[] data = image.data;
+		if (data == null) data = image.data;
 		int imageBpl = image.bytesPerLine;
 		int dataIndex = imageBpl * (image.height - 1); // Start at last line
 		if (image.depth == 16) {
@@ -622,10 +725,18 @@ void unloadIntoByteStream(ImageLoader loader) {
 		fileHeader[4] += rgbs.length;
 	}
 
+	byte iData[] = null;
+	// If the pixels are not in the expected BMP format, convert them.
+	if (pal.isDirect && !isPaletteBMP(pal, image.depth)) {
+		// array to store the converted pixels
+	    iData = new byte[image.data.length];
+		convertPixelsToBGR(image, iData);
+	}
+	
 	// Prepare data. This is done first so we don't have to try to rewind
 	// the stream and fill in the details later.
 	ByteArrayOutputStream out = new ByteArrayOutputStream();
-	unloadData(image, out, comp);
+	unloadData(image, iData, out, comp);
 	byte[] data = out.toByteArray();
 	
 	// Calculate file size
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
index d26c60c..3d0bac8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java	
@@ -26,11 +26,19 @@ import org.eclipse.swt.widgets.*;
  * 		gridData.horizontalAlignment = GridData.FILL;
  * 		gridData.grabExcessHorizontalSpace = true;
  * 		button1.setLayoutData(gridData);
+ * 
+ * 		gridData = new GridData();
+ * 		gridData.horizontalAlignment = GridData.FILL;
+ * 		gridData.verticalAlignment = GridData.FILL;
+ * 		gridData.grabExcessHorizontalSpace = true;
+ * 		gridData.grabExcessVerticalSpace = true;
+ * 		gridData.horizontalSpan = 2;
+ * 		button2.setLayoutData(gridData);
  * </pre>
- * The second is to take advantage of convenience style bits defined 
- * by <code>GridData</code>:
+ * The second is to take advantage of <code>GridData</code> convenience constructors, for example: 
  * <pre>
- *      button1.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+ *      button1.setLayoutData(new GridData (SWT.FILL, SWT.CENTER, true, false));
+ *      button2.setLayoutData(new GridData (SWT.FILL, SWT.FILL, true, true, 2, 1));
  * </pre>
  * </p>
  * <p>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Event.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Event.java
index a37abe1..d67ea3d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Event.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Event.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -109,9 +109,10 @@ public class Event {
 
 	/**
 	 * depending on the event type, the number of following
-	 * paint events which are pending which may always be zero
-	 * on some platforms or the number of lines or pages to
-	 * scroll using the mouse wheel
+	 * paint events that are pending which may always be zero
+	 * on some platforms, or the number of lines or pages to
+	 * scroll using the mouse wheel, or the number of times the
+	 * mouse has been clicked
 	 */
 	public int count;
 	
@@ -156,10 +157,35 @@ public class Event {
 	public int keyCode;
 	
 	/**
+	 * depending on the event, the location of key specified by the 
+	 * keyCode or character. The possible values for this field are 
+	 * <code>SWT.LEFT</code>, <code>SWT.RIGHT</code>, <code>SWT.KEYPAD</code>,
+	 * or <code>SWT.NONE</code> representing the main keyboard area.
+	 * <p>
+	 * The location field can be used to differentiate key events that have 
+	 * the same key code and character but are generated by different keys 
+	 * in the keyboard. For example, a key down event with the key code equals
+	 * to SWT.SHIFT can be generated by the left and the right shift keys in the 
+	 * keyboard. The location field can only be used to determine the location 
+	 * of the key code or character in the current event. It does not 
+	 * include information about the location of modifiers in state
+	 * mask.
+	 * </p>
+	 * 
+	 * @see org.eclipse.swt.SWT#LEFT
+	 * @see org.eclipse.swt.SWT#RIGHT
+	 * @see org.eclipse.swt.SWT#KEYPAD
+	 * 
+	 * @since 3.6
+	 */
+	public int keyLocation;
+	
+	/**
 	 * depending on the event, the state of the keyboard modifier
 	 * keys and mouse masks at the time the event was generated.
 	 * 
-	 * @see org.eclipse.swt.SWT
+	 * @see org.eclipse.swt.SWT#MODIFIER_MASK
+	 * @see org.eclipse.swt.SWT#BUTTON_MASK
 	 */
 	public int stateMask;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java
index 53fadef..e7c4ecf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/Tray.java	
@@ -45,6 +45,7 @@ Tray (Display display, int style) {
 		error (SWT.ERROR_THREAD_INVALID_ACCESS);
 	}
 	this.display = display;
+	reskinWidget ();
 }
 	
 void createItem (TrayItem item, int index) {
@@ -146,4 +147,14 @@ void releaseParent () {
 	if (display.tray == this) display.tray = null;
 }
 
+void reskinChildren (int flags) {	
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TrayItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java
index d352c10..db4fb1d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TypedListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,8 @@ public class TypedListener implements Listener {
  * </p>
  *
  * @param listener the event listener to store in the receiver
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public TypedListener (SWTEventListener listener) {
 	eventListener = listener;
@@ -61,6 +63,8 @@ public TypedListener (SWTEventListener listener) {
  * </p>
  *
  * @return the receiver's event listener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public SWTEventListener getEventListener () {
 	return eventListener;
@@ -75,6 +79,8 @@ public SWTEventListener getEventListener () {
  * referenced from application code.
  * </p>
  * @param e the event to handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void handleEvent (Event e) {
 	switch (e.type) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/version.txt b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/version.txt
index 0957c2f..2e1a874 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/version.txt	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common/version.txt	
@@ -1 +1 @@
-version 3.557
\ No newline at end of file
+version 3.659
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java
index 94becf9..bf7a679 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -286,7 +286,7 @@ public static boolean isWhitespace(char c) {
  * The new process inherits the environment of the caller.
  * </p>
  *
- * @param program the name of the program to execute
+ * @param prog the name of the program to execute
  *
  * @exception IOException
  *  if the program cannot be executed
@@ -327,6 +327,34 @@ public static void exec(String[] progArray) throws java.io.IOException{
 }
 
 /**
+ * Execute prog[0] in a separate platform process with the specified
+ * environment and working directory if the underlying platform supports
+ * this.
+ * <p>
+ * If envp is null the new process inherits the environment of the caller.
+ * <p>
+ * 
+ * @param prog
+ *            array containing the program to execute and its arguments
+ * @param envp
+ *            array of strings, each element of which has environment
+ *            variable settings in the format name=value
+ * @param workingDir
+ *            the working directory of the new process, or null if the new
+ *            process should inherit the working directory of the caller
+ * 
+ * @exception IOException
+ *                if the program cannot be executed
+ * @exception SecurityException
+ *                if the current SecurityManager disallows program execution
+ * 
+ * @since 3.6
+ */
+public static void exec(String[] prog, String[] envp, String workingDir) throws java.io.IOException{
+	throw new IOException();
+}
+
+/**
  * Returns the NLS'ed message for the given argument. This is only being
  * called from SWT.
  * 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java
index 13e2a65..70eee21 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -282,6 +282,32 @@ public static void exec(String[] progArray) throws java.io.IOException{
 	Runtime.getRuntime().exec(progArray);
 }
 
+/**
+ * Execute prog[0] in a separate platform process if the
+ * underlying platform supports this.
+ * <p>
+ * The new process inherits the environment of the caller.
+ * <p>
+ *
+ * @param prog array containing the program to execute and its arguments
+ * @param envp
+ *            array of strings, each element of which has environment
+ *            variable settings in the format name=value
+ * @param workingDir
+ *            the working directory of the new process, or null if the new
+ *            process should inherit the working directory of the caller
+ *
+ * @exception IOException
+ *  if the program cannot be executed
+ * @exception	SecurityException
+ *  if the current SecurityManager disallows program execution
+ *
+ * @since 3.6
+ */
+public static void exec(String[] prog, String[] envp, String workingDir) throws java.io.IOException{
+	Runtime.getRuntime().exec(prog, null, workingDir != null ? new File(workingDir) : null);
+}
+
 private static ResourceBundle msgs = null;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties
index 1aef256..3a5c957 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -66,6 +66,7 @@ SWT_Maximize=Maximize
 SWT_Restore=Restore
 SWT_ShowList=Show List
 SWT_FileDownload=File Download
+SWT_Download_Error=Error occurred, download not completed
 SWT_Download_File=Download: {0}
 SWT_Download_Location=Saving {0} from {1}
 SWT_Download_Started=Downloading...
@@ -74,8 +75,26 @@ SWT_Authentication_Required=Authentication Required
 SWT_Enter_Username_and_Password=Enter user name and password for {0} at {1}
 SWT_Page_Load_Failed=Page load failed with error: {0}
 SWT_InvalidCert_Title=Invalid Certificate
-SWT_InvalidCert_Message=The security certificate presented by "{0}" has the following problem(s):
+SWT_InvalidCert_Message=The security certificate presented by "{0}" has problem(s).
 SWT_InvalidCert_InvalidName=Certificate name is invalid or does not match site name.  Certificate issued to: "{0}". 
 SWT_InvalidCert_NotValid=Certificate is not currently valid.  Valid date range: "{0}".  
 SWT_InvalidCert_NotTrusted=Certificate is not from a trusted certifying authority.  Certificate issuer: "{0}".
 SWT_InvalidCert_Connect=Would you like to connect to this site anyways?
+SWT_OnBeforeUnload_Message1=Are you sure you want to leave this page?
+SWT_OnBeforeUnload_Message2=Click OK to continue, or Cancel to stay on this page.
+SWT_ViewCertificate=View Certificate
+SWT_Controlled_By=controlled by
+SWT_Controller_For=controller for
+SWT_Described_By=described by
+SWT_Description_For=description for
+SWT_Embedded_By=embedded by
+SWT_Embeds=embeds
+SWT_Flows_From=flows from
+SWT_Flows_To=flows to
+SWT_Label_For=label for
+SWT_Labelled_By=labelled by
+SWT_Member_Of=member of
+SWT_Node_Child_Of=node child of
+SWT_Parent_Window_Of=parent window of
+SWT_Popup_For=popup for
+SWT_Subwindow_Of=subwindow of
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties
index 28563b7..d2969d0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_de._properties	
@@ -59,7 +59,7 @@ SWT_ShowList=Liste anzeigen
 SWT_FileDownload=Datei-Download
 SWT_Download_File=Herunterladen: {0}
 SWT_Download_Location=Speichern von {0} von {1}
-SWT_Download_Started=Herunterladen\...
-SWT_Download_Status=Download: {0,Zahl,Ganzzahl} KB von {1,Zahl,Ganzzahl} KB
+SWT_Download_Started=Herunterladen...
+SWT_Download_Status=Download: {0,number,integer} KB von {1,number,integer} KB
 SWT_Authentication_Required=Authentifizierung erforderlich
 SWT_Enter_Username_and_Password=Benutzernamen und Kennwort f\u00fcr {0} unter {1} eingeben
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties
index 6c891db..83c1aa0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_es._properties	
@@ -28,12 +28,16 @@ SWT_Charset_Western=oeste
 SWT_Charset_EastEuropean=este
 SWT_Charset_SouthEuropean=sur
 SWT_Charset_NorthEuropean=norte
+SWT_Charset_Cyrillic=cir\u00edlico
 SWT_Charset_Arabic=ar\u00e1bico
 SWT_Charset_Greek=griego
 SWT_Charset_Hebrew=hebreo
 SWT_Charset_Turkish=turco
 SWT_Charset_Nordic=noruego
+SWT_Charset_Thai=tailand\u00e9s
+SWT_Charset_BalticRim=lenguas escandinavas/b\u00e1lticas
 SWT_Charset_Celtic=celta
+SWT_Charset_Euro=euro
 SWT_Charset_Romanian=rumano
 SWT_Charset_SimplifiedChinese=chino simple
 SWT_Charset_TraditionalChinese=chino tradicional
@@ -41,6 +45,7 @@ SWT_Charset_Japanese=japones
 SWT_Charset_Korean=coreano
 SWT_Charset_Unicode=unicode
 SWT_Charset_ASCII=ASCII
+SWT_InputMethods=M\u00e9todos de Entrada
 SWT_Password=Contrase\u00f1a:
 SWT_Username=Nombre de Usuario:
 SWT_Switch=Cambiar
@@ -54,4 +59,8 @@ SWT_ShowList=Mostrar Lista
 SWT_FileDownload=Descarga Fichero
 SWT_Download_File=Descarga: {0}
 SWT_Download_Location=Guardando {0} desde {1}
-SWT_Download_Started=Descargando...
\ No newline at end of file
+SWT_Download_Started=Descargando...
+SWT_Download_Status=Descarga: {0,number,integer} KB de {1,number,integer} KB
+SWT_Authentication_Required=Autenticaci\u00f3n requerida
+SWT_Enter_Username_and_Password=Introduzca nombre de usuario y contrase\u00f1a para {0} en {1}
+SWT_Page_Load_Failed=Carga de p\u00e1gina fall\u00f3 con error: {0}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties
new file mode 100644
index 0000000..6118bc8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_et._properties	
@@ -0,0 +1,23 @@
+# Copyright by many contributors; see http://babel.eclipse.org/
+SWT_Yes=Jah
+SWT_No=Ei
+SWT_OK=OK
+SWT_Cancel=T\u00fchista
+SWT_Abort=Katkesta
+SWT_Retry=Proovi uuesti
+SWT_Ignore=Ignoreeri
+SWT_Sample=N\u00e4ide
+SWT_A_Sample_Text=N\u00e4idis tekst
+SWT_Selection=Valik
+SWT_Save=Salvesta
+SWT_Remove=Eemalda
+SWT_Up=\u00dcles
+SWT_Down=Alla
+SWT_InputMethods=Sisestamis meetodid
+SWT_Press=Vajuta
+SWT_Open=Ava
+SWT_Close=Sulge
+SWT_Minimize=V\u00e4henda
+SWT_Maximize=Suurenda
+SWT_Restore=Taasta
+SWT_Download_Started=Laen alla...
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties
index b5ea714..1b60f16 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_fr._properties	
@@ -59,7 +59,7 @@ SWT_ShowList=Afficher la liste
 SWT_FileDownload=T\u00e9l\u00e9chargement de fichiers
 SWT_Download_File=T\u00e9l\u00e9charger\u00a0: {0}
 SWT_Download_Location=Enregistrement de {0} depuis {1}
-SWT_Download_Started=T\u00e9l\u00e9chargement \...
+SWT_Download_Started=T\u00e9l\u00e9chargement...
 SWT_Download_Status=T\u00e9l\u00e9charger\u00a0: {0,number,integer} ko de {1,number,integer} ko
 SWT_Authentication_Required=Authentification requise
-SWT_Enter_Username_and_Password=Entrer le nom d'utilisateur et le mot de passe pour {0} au niveau de {1}
\ No newline at end of file
+SWT_Enter_Username_and_Password=Entrer le nom d''utilisateur et le mot de passe pour {0} au niveau de {1}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties
index 415f033..8d056cd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_ru._properties	
@@ -2,7 +2,7 @@
 SWT_Yes=\u0414\u0430
 SWT_No=\u041d\u0435\u0442
 SWT_OK=OK
-SWT_Cancel=\u041e\u0442\u043c\u0435\u043d\u0430
+SWT_Cancel=\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c
 SWT_Abort=\u041f\u0440\u0435\u0440\u0432\u0430\u0442\u044c
 SWT_Retry=\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c
 SWT_Ignore=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c
@@ -27,4 +27,4 @@ SWT_Close=\u0417\u0430\u043a\u0440\u044b\u0442\u044c
 SWT_Minimize=\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c
 SWT_Maximize=\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c
 SWT_Restore=\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c
-SWT_Download_Started=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430:
\ No newline at end of file
+SWT_Download_Started=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties
index 1b90791..19ba07c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_tr._properties	
@@ -4,22 +4,63 @@ SWT_No=Hay\u0131r
 SWT_OK=Tamam
 SWT_Cancel=\u0130ptal
 SWT_Abort=Durdur
+SWT_Retry=Tekrar Dene
 SWT_Ignore=Yoksay
 SWT_Sample=\u00d6rnek
+SWT_A_Sample_Text=\u00d6rnek Metin
 SWT_Selection=Se\u00e7im
+SWT_Current_Selection=Ge\u00e7erli Se\u00e7im
 SWT_Font=Yaz\u0131y\u00fcz\u00fc
 SWT_Color=Renk
+SWT_Extended_style=Geni\u015fletilmi\u015f bi\u00e7em
 SWT_Size=B\u00fcy\u00fckl\u00fck
 SWT_Style=Bi\u00e7em
 SWT_Save=Sakla
-SWT_FontDialog_Title=Yaz\u0131y\u00fczleri
+SWT_Character_set=Karakter k\u00fcmesi
+SWT_ColorDialog_Title=Renkler
+SWT_FontDialog_Title=Yaz\u0131tipleri
+SWT_FontSet=Yaz\u0131tipi k\u00fcmesi
+SWT_NewFont=Yeni Yazitipi
 SWT_Remove=Kald\u0131r
 SWT_Up=Yukar\u0131
 SWT_Down=A\u015fa\u011f\u0131
+SWT_Charset_Western=bat\u0131
+SWT_Charset_EastEuropean=do\u011fu
+SWT_Charset_SouthEuropean=g\u00fcney
+SWT_Charset_NorthEuropean=kuzey
+SWT_Charset_Cyrillic=kiril
+SWT_Charset_Arabic=arap\u00e7a
+SWT_Charset_Greek=yunanca
+SWT_Charset_Hebrew=ibranice
+SWT_Charset_Turkish=t\u00fcrk\u00e7e
+SWT_Charset_Nordic=iskandinav
+SWT_Charset_Thai=tai
+SWT_Charset_BalticRim=balt\u0131k k\u0131y\u0131s\u0131
+SWT_Charset_Celtic=kelt
+SWT_Charset_Euro=euro
+SWT_Charset_Romanian=romanca
+SWT_Charset_SimplifiedChinese=basitle\u015ftirilmi\u015f \u00e7in\u00e7e
+SWT_Charset_TraditionalChinese=geleneksel \u00e7ince
+SWT_Charset_Japanese=japonca
+SWT_Charset_Korean=korece
+SWT_Charset_Unicode=unicode
 SWT_Charset_ASCII=ASCII
+SWT_InputMethods=Giri\u015f Metodlar\u0131
 SWT_Password=Parola:
+SWT_Username=Kullan\u0131c\u0131 Ad\u0131:
+SWT_Switch=De\u011fi\u015ftir
+SWT_Press=Bas
 SWT_Open=A\u00e7
 SWT_Close=Kapat
 SWT_Minimize=Simge Durumuna K\u00fc\u00e7\u00fclt
 SWT_Maximize=Ekran Boyutuna Getir
-SWT_Restore=Geri Y\u00fckle
\ No newline at end of file
+SWT_Restore=Geri Y\u00fckle
+SWT_ShowList=Listeyi G\u00f6ster
+SWT_FileDownload=Dosya \u0130ndirme
+SWT_Download_File=\u0130ndir: {0}
+SWT_Download_Location={1} adresinden {0} saklan\u0131yor
+SWT_Download_Started=\u0130ndiriliyor...
+SWT_Download_Status=\u0130ndirilen: {0,number,integer} KB / {1,number,integer} KB
+SWT_Authentication_Required=Kimlik Do\u011frulamas\u0131 Gerekiyor
+SWT_Enter_Username_and_Password={1} alan\u0131na {0} i\u00e7in kullan\u0131c\u0131 ad\u0131n\u0131 ve parolas\u0131n\u0131 girini\u015f
+SWT_Page_Load_Failed=Sayfa y\u00fcklemesi ba\u015far\u0131s\u0131z oldu: {0}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties
index b254c73..0549844 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_uk._properties	
@@ -62,4 +62,5 @@ SWT_Download_Location=\u0417\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043e {0}
 SWT_Download_Started=\u0422\u0440\u0438\u0432\u0430\u0454 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f...
 SWT_Download_Status=\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f: {0,number,integer} KB \u0437 {1,number,integer} KB
 SWT_Authentication_Required=\u041f\u043e\u0442\u0440\u0456\u0431\u043d\u0430 \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0456\u044f
-SWT_Enter_Username_and_Password=\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u0456\u043c\'\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430 \u0442\u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f {0} \u0432 {1}
\ No newline at end of file
+SWT_Enter_Username_and_Password=\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u0456\u043c\''\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430 \u0442\u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f {0} \u0432 {1}
+SWT_Page_Load_Failed=\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u0434\u0430\u043b\u043e \u0437 \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u044e: {0}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties
index 064802e..399df80 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/common_j2se/org/eclipse/swt/internal/SWTMessages_zh._properties	
@@ -21,7 +21,7 @@ SWT_ColorDialog_Title=\u989c\u8272
 SWT_FontDialog_Title=\u5b57\u4f53
 SWT_FontSet=\u5b57\u4f53\u96c6
 SWT_NewFont=\u65b0\u5b57\u4f53
-SWT_Remove=\u5220\u9664
+SWT_Remove=\u9664\u53bb
 SWT_Up=\u5411\u4e0a
 SWT_Down=\u5411\u4e0b
 SWT_Charset_Western=\u897f\u6b27\u8bed\u8a00
@@ -62,4 +62,4 @@ SWT_Download_Location=\u4fdd\u5b58 {1} \u4e2d\u7684 {0}
 SWT_Download_Started=\u6b63\u5728\u4e0b\u8f7d...
 SWT_Download_Status=\u4e0b\u8f7d\uff1a{0,number,integer} KB\uff08\u5171 {1,number,integer} KB\uff09
 SWT_Authentication_Required=\u9700\u8981\u8ba4\u8bc1
-SWT_Enter_Username_and_Password=\u8f93\u5165 {0}\uff08\u4f4d\u4e8e {1}\uff09\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801
\ No newline at end of file
+SWT_Enter_Username_and_Password=\u8f93\u5165 {0}\uff08\u4f4d\u4e8e {1}\uff09\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolBar.java
index 8abac1a..44e878d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolBar.java	
@@ -1099,6 +1099,19 @@ public void setWrapIndices (int[] indices) {
 	}
 	relayout();
 }
+
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int row = 0; row < items.length; row++) {
+			for (int i = 0; i < items[row].length; i++) {
+				CoolItem item = items[row][i];
+				if (item != null) item.reskin (flags);
+			}
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 public void setCursor (Cursor cursor) {
 	checkWidget ();
 	super.setCursor (this.cursor = cursor);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java
index 2681e09..8f3b17a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/coolbar/org/eclipse/swt/widgets/CoolItem.java	
@@ -398,7 +398,8 @@ void onSelection (Event ev) {
 		event.x = bounds.x;
 		event.y = bounds.y + bounds.height;
 	}
-	postEvent (SWT.Selection, event);
+	event.stateMask = ev.stateMask;
+	sendSelectionEvent (SWT.Selection, event, false);
 }
 /**
  * Removes the listener from the collection of listeners that
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java
index 86e4a47..fc2e9dc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java	
@@ -379,6 +379,16 @@ public void removeExpandListener (ExpandListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ExpandItem item = items [i];
+			if (item != null ) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 public void setFont(Font font) {
 	super.setFont (font);
 	this.font = font;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java
index 31c0b13..b102d6f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Path.java	
@@ -44,6 +44,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -441,7 +443,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java
index c5b9947..738287d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Pattern.java	
@@ -42,6 +42,8 @@ public class Pattern extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -170,7 +172,7 @@ void destroy() {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java
index 0fdfaa8..79f89ac 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/graphics/org/eclipse/swt/graphics/Transform.java	
@@ -40,6 +40,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -197,7 +199,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java
index 9c1384f..8f925f8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tabfolder/org/eclipse/swt/widgets/TabFolder.java	
@@ -1057,6 +1057,16 @@ void resize() {
 	ensureRightFreeSpaceUsed();
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TabItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Scroll the tab items to the left.
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java
new file mode 100644
index 0000000..56a5e0a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskBar.java	
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.*;
+
+/**
+ * Instances of this class represent the system task bar.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ * 
+ * @see Display#getSystemTaskBar
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskBar extends Widget {
+	int itemCount;
+	TaskItem [] items = new TaskItem [4];
+
+TaskBar (Display display, int style) {
+	if (display == null) display = Display.getCurrent ();
+	if (display == null) display = Display.getDefault ();
+	if (!display.isValidThread ()) {
+		error (SWT.ERROR_THREAD_INVALID_ACCESS);
+	}
+	this.display = display;
+	reskinWidget ();
+}
+
+void createItem (TaskItem item, int index) {
+	if (index == -1) index = itemCount;
+	if (!(0 <= index && index <= itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	if (itemCount == items.length) {
+		TaskItem [] newItems = new TaskItem [items.length + 4];
+		System.arraycopy (items, 0, newItems, 0, items.length);
+		items = newItems;
+	}
+	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
+	items [index] = item;
+}
+
+void createItems () {
+}
+
+void destroyItem (TaskItem item) {
+	int index = 0;
+	while (index < itemCount) {
+		if (items [index] == item) break;
+		index++;
+	}
+	if (index == itemCount) return;
+	System.arraycopy (items, index + 1, items, index, --itemCount - index);
+	items [itemCount] = null;
+}
+
+/**
+ * Returns the item at the given, zero-relative index in the
+ * receiver. Throws an exception if the index is out of range.
+ *
+ * @param index the index of the item to return
+ * @return the item at the given index
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (int index) {
+	checkWidget ();
+	createItems ();
+	if (!(0 <= index && index < itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	return items [index];
+}
+
+/**
+ * Returns the number of items contained in the receiver.
+ *
+ * @return the number of items
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getItemCount () {
+	checkWidget ();
+	createItems ();
+	return itemCount;
+}
+
+/**
+ * Returns the <code>TaskItem</code> for the given <code>Shell</code> or the <code>TaskItem</code> 
+ * for the application if the <code>Shell</code> parameter is <code>null</code>.
+ * If the requested item is not supported by the platform it returns <code>null</code>.
+ * 
+ * @param shell the shell for which the task item is requested, or null to request the application item
+ * @return the task item for the given shell or the application
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (Shell shell) {
+	checkWidget ();
+	return null;
+}
+
+/**
+ * Returns an array of <code>TaskItem</code>s which are the items
+ * in the receiver. 
+ * <p>
+ * Note: This is not the actual structure used by the receiver
+ * to maintain its list of items, so modifying the array will
+ * not affect the receiver. 
+ * </p>
+ *
+ * @return the items in the receiver
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem [] getItems () {
+	checkWidget ();
+	createItems ();
+	TaskItem [] result = new TaskItem [itemCount];
+	System.arraycopy (items, 0, result, 0, result.length);
+	return result;
+}
+
+void releaseChildren (boolean destroy) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null && !item.isDisposed ()) {
+				item.release (false);
+			}
+		}
+		items = null;
+	}
+	super.releaseChildren (destroy);
+}
+
+void releaseParent () {
+	super.releaseParent ();
+//	if (display.taskBar == this) display.taskBar = null;
+}
+
+void reskinChildren (int flags) {	
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskItem.java
new file mode 100644
index 0000000..4c76d88
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/taskbar/org/eclipse/swt/widgets/TaskItem.java	
@@ -0,0 +1,372 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+
+/**
+ * Instances of this class represent a task item.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskItem extends Item {
+	TaskBar parent;
+	Shell shell;
+	int progress, progressState = SWT.DEFAULT;
+	Image overlayImage;
+	String overlayText = "";
+	Menu menu;
+
+	static final int PROGRESS_MAX = 100;
+/**
+ * Constructs a new instance of this class given its parent
+ * (which must be a <code>Tray</code>) and a style value
+ * describing its behavior and appearance. The item is added
+ * to the end of the items maintained by its parent.
+ * <p>
+ * The style value is either one of the style constants defined in
+ * class <code>SWT</code> which is applicable to instances of this
+ * class, or must be built by <em>bitwise OR</em>'ing together 
+ * (that is, using the <code>int</code> "|" operator) two or more
+ * of those <code>SWT</code> style constants. The class description
+ * lists the style constants that are applicable to the class.
+ * Style bits are also inherited from superclasses.
+ * </p>
+ *
+ * @param parent a composite control which will be the parent of the new instance (cannot be null)
+ * @param style the style of control to construct
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+ *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
+ * </ul>
+ *
+ * @see SWT
+ * @see Widget#checkSubclass
+ * @see Widget#getStyle
+ */
+TaskItem (TaskBar parent, int style) {
+	super (parent, style);
+	this.parent = parent;
+	parent.createItem (this, -1);
+}
+
+protected void checkSubclass () {
+	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
+}
+
+void destroyWidget () {
+	parent.destroyItem (this);
+	releaseHandle ();
+}
+
+/**
+ * Returns the receiver's pop up menu if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's menu
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Menu getMenu () {
+	checkWidget ();
+	return menu;
+} 
+
+/**
+ * Returns the receiver's overlay image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's overlay image
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Image getOverlayImage () {
+	checkWidget();
+	return overlayImage;
+}
+
+/**
+ * Returns the receiver's overlay text, which will be an empty
+ * string if it has never been set.
+ *
+ * @return the receiver's overlay text
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public String getOverlayText () {
+	checkWidget();
+	return overlayText;
+}
+
+/**
+ * Returns the receiver's parent, which must be a <code>TaskBar</code>.
+ *
+ * @return the receiver's parent
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ */
+public TaskBar getParent () {
+	checkWidget ();
+	return parent;
+}
+
+/**
+ * Returns the receiver's progress.
+ *
+ * @return the receiver's progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgress () {
+	checkWidget ();
+	return progress;
+}
+
+/**
+ * Returns the receiver's progress state.
+ *
+ * @return the receiver's progress state
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgressState () {
+	checkWidget ();
+	return progressState;
+}
+
+void releaseHandle () {
+	super.releaseHandle ();
+	parent = null;
+}
+
+void releaseWidget () {
+	super.releaseWidget ();
+	overlayImage = null;
+	overlayText = null;
+}
+
+/**
+ * Sets the receiver's pop up menu to the argument. The way the menu is
+ * shown is platform specific.
+ * 
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * set this feature on the <code>TaskItem</code> for application.<br>
+ * On Windows, this feature will only work on RCP applications.</p>
+ *
+ * <p>
+ * The menu should be fully created before this method is called.
+ * Dynamic changes to the menu after the method is called will not be reflected
+ * in the native menu.</p> 
+ *
+ * @param menu the new pop up menu
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setMenu (Menu menu) {
+	checkWidget ();
+	if (menu != null) {
+		if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+		if ((menu.style & SWT.POP_UP) == 0) {
+			error (SWT.ERROR_MENU_NOT_POP_UP);
+		}
+	}
+	this.menu = menu;
+}
+
+/**
+ * Sets the receiver's overlay image, which may be null
+ * indicating that no image should be displayed. The bounds
+ * for the overlay image is determined by the platform and in 
+ * general it should be a small image.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayImage the new overlay image (may be null)
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if the overlayImage has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayImage (Image overlayImage) {
+	checkWidget ();
+	if (overlayImage != null && overlayImage.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	this.overlayImage = overlayImage;
+}
+
+/**
+ * Sets the receiver's overlay text. The space available to display the
+ * overlay text is platform dependent and in general it should be no longer
+ * than a few characters.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return an empty string.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayText the new overlay text
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the overlayText is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayText (String overlayText) {
+	checkWidget ();
+	if (overlayText == null) error (SWT.ERROR_NULL_ARGUMENT);
+	this.overlayText = overlayText;
+}
+
+/**
+ * Sets the receiver's progress state, the state can be one of
+ * the following:
+ * <p><ul>
+ * <li>{@link SWT#DEFAULT}</li>
+ * <li>{@link SWT#NORMAL}</li>
+ * <li>{@link SWT#PAUSED}</li>
+ * <li>{@link SWT#ERROR}</li>
+ * <li>{@link SWT#INDETERMINATE}</li>
+ * </ul></p>
+ * 
+ * The percentage of progress shown by the states <code>SWT#NORMAL</code>, <code>SWT#PAUSED</code>, 
+ * <code>SWT#ERROR</code> is set with <code>setProgress()</code>. <br>
+ * The state <code>SWT#DEFAULT</code> indicates that no progress should be shown.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return <code>SWT#DEFAULT</code>.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progressState the new progress state 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgress(int)}
+ */
+public void setProgressState (int progressState) {
+	checkWidget ();
+	if (this.progressState == progressState) return;
+	this.progressState = progressState;
+}
+
+/**
+ * Sets the receiver's progress, the progress represents a percentage and
+ * should be in range from 0 to 100. The progress is only shown when the progress
+ * state is different than <code>SWT#DEFAULT</code>.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return zero.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progress the new progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgressState(int)}
+ */
+public void setProgress (int progress) {
+	checkWidget ();
+	progress = Math.max(0, Math.min(progress, PROGRESS_MAX));
+	if (this.progress == progress) return;
+	this.progress = progress;
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java
index 6c00d23..a0f8fbc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java	
@@ -42,9 +42,11 @@ public final class TextLayout extends Resource {
 	int wrapWidth;
 	int orientation;
 	int indent;
+	int wrapIndent;
 	boolean justify;
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	StyleItem[] styles;
 	
 	StyleItem[][] runs;
@@ -255,6 +257,8 @@ void destroy() {
 	lineOffset = null;
 	lineY = null;
 	lineWidth = null;
+	segments = null;
+	segmentsChars = null;
 }
 
 /**
@@ -701,7 +705,7 @@ public int getLineCount () {
 }
 
 int getLineIndent (int lineIndex) {
-	int lineIndent = 0;
+	int lineIndent = wrapIndent;
 	if (lineIndex == 0) {
 		lineIndent = indent;
 	} else {
@@ -1154,6 +1158,22 @@ public int[] getSegments() {
 }
 
 /**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
+/**
  * Gets the style of the receiver at the specified character offset.
  *
  * @param offset the text offset
@@ -1253,12 +1273,28 @@ public int getWidth () {
 }
 
 /**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();
+	return wrapIndent;
+}
+
+/**
  * Returns <code>true</code> if the text layout has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1470,7 +1506,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1479,6 +1515,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -1550,7 +1588,7 @@ public void setSpacing (int spacing) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1559,12 +1597,18 @@ public void setSpacing (int spacing) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1583,6 +1627,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the style of the receiver for the specified range.  Styles previously
  * set for that range will be overwritten.  The start and end offsets are
  * inclusive and will be clamped if out of range.
@@ -1747,6 +1824,28 @@ public void setWidth (int width) {
 }
 
 /**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout();
+	if (wrapIndent < 0) return;
+	if (this.wrapIndent == wrapIndent) return;
+	freeRuns();
+	this.wrapIndent = wrapIndent;
+}
+
+/**
  * Returns a string containing a concise, human-readable
  * description of the receiver.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java
index 3edac98..5059ba5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/tooltip/org/eclipse/swt/widgets/ToolTip.java	
@@ -417,7 +417,7 @@ void onDispose (Event event) {
 }
 
 void onMouseDown (Event event) {
-	notifyListeners (SWT.Selection, new Event ());
+	sendSelectionEvent (SWT.Selection, null, true);
 	setVisible (false);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java
index af445fd..3929f05 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Table.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,6 +72,7 @@ public class Table extends Composite {
 	TableItem[] items = new TableItem [0];
 	TableItem[] selectedItems = new TableItem [0];
 	TableItem focusItem, anchorItem, lastClickedItem;
+	Color cachedBackground, cachedForeground;
 	Event lastSelectionEvent;
 	boolean linesVisible, ignoreKey, ignoreDispose, customHeightSet;
 	int itemsCount = 0;
@@ -791,6 +792,11 @@ Image getArrowDownImage () {
 Image getArrowUpImage () {
 	return (Image) display.getData (ID_ARROWUP);
 }
+public Color getBackground () {
+	checkWidget ();
+	if (cachedBackground != null) return cachedBackground;
+	return super.getBackground ();
+}
 int getCellPadding () {
 	return MARGIN_CELL + WIDTH_CELL_HIGHLIGHT; 
 }
@@ -936,6 +942,11 @@ public TableColumn[] getColumns () {
 	System.arraycopy (columns, 0, result, 0, columns.length);
 	return result;
 }
+public Color getForeground () {
+	checkWidget ();
+	if (cachedForeground != null) return cachedForeground;
+	return super.getForeground ();
+}
 Image getGrayUncheckedImage () {
 	return (Image) display.getData (ID_GRAYUNCHECKED);
 }
@@ -2035,6 +2046,7 @@ void onDispose (Event event) {
 	lastSelectionEvent = null;
 	header = null;
 	resizeColumn = sortColumn = null;
+	cachedBackground = cachedForeground = null;
 }
 void onEnd (int stateMask) {
 	int lastAvailableIndex = itemsCount - 1;
@@ -2684,18 +2696,19 @@ void onPaint (Event event) {
 	endIndex = Math.min (endIndex, itemsCount - 1);
 
 	/* fill background not handled by items */
-	gc.setBackground (getBackground ());
+	cachedBackground = getBackground ();
+	gc.setBackground (cachedBackground);
 	gc.setClipping (clipping);
 	int bottomY = endIndex >= 0 ? getItemY (items [endIndex]) + itemHeight : 0;
 	int fillHeight = Math.max (0, clientArea.height - bottomY);
 	if (fillHeight > 0) {	/* space below bottom item */
-		drawBackground (gc, 0, bottomY, clientArea.width, fillHeight);
+		drawBackground (gc, 0, bottomY, clientArea.width, fillHeight, 0, 0);
 	}
 	if (columns.length > 0) {
 		TableColumn column = orderedColumns [orderedColumns.length - 1];	/* last column */
 		int rightX = column.getX () + column.width;
 		if (rightX < clientArea.width) {
-			drawBackground (gc, rightX, 0, clientArea.width - rightX, clientArea.height - fillHeight);
+			drawBackground (gc, rightX, 0, clientArea.width - rightX, clientArea.height - fillHeight, 0, 0);
 		}
 	}
 
@@ -2703,6 +2716,7 @@ void onPaint (Event event) {
 	boolean noFocusDraw = false;
 	int[] lineDash = gc.getLineDash ();
 	int lineWidth = gc.getLineWidth ();
+	cachedForeground = getForeground ();
 	for (int i = startIndex; i <= Math.min (endIndex, itemsCount - 1); i++) {
 		TableItem item = items [i];
 		if (!item.isDisposed ()) {	/* ensure that item was not disposed in a callback */
@@ -2717,13 +2731,20 @@ void onPaint (Event event) {
 						if (!item.isDisposed ()) {	/* ensure that item was not disposed in a callback */
 							noFocusDraw = item.paint (gc, orderedColumns [j], false) || noFocusDraw;
 						}
-						if (isDisposed () || gc.isDisposed ()) return;	/* ensure that receiver was not disposed in a callback */
+						if (isDisposed () || gc.isDisposed ()) { /* ensure that receiver was not disposed in a callback */
+							cachedBackground = cachedForeground = null;
+							return;
+						}
 					}
 				}
 			}
 		}
-		if (isDisposed () || gc.isDisposed ()) return;	/* ensure that receiver was not disposed in a callback */
+		if (isDisposed () || gc.isDisposed ()) { /* ensure that receiver was not disposed in a callback */
+			cachedBackground = cachedForeground = null;
+			return;
+		}
 	}
+	cachedBackground = cachedForeground = null;
 
 	/* repaint grid lines */
 	gc.setClipping(clipping);
@@ -3135,6 +3156,21 @@ public void removeSelectionListener (SelectionListener listener) {
 	removeListener (SWT.Selection, listener);
 	removeListener (SWT.DefaultSelection, listener);	
 }
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemsCount; i++) {
+			TableItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
@@ -3275,10 +3311,9 @@ public void setBackground (Color color) {
 	if (color == null) color = display.getSystemColor (SWT.COLOR_LIST_BACKGROUND); 
 	super.setBackground (color);
 }
-public void setForeground (Color color) {
-	checkWidget ();
-	if (color == null) color = display.getSystemColor (SWT.COLOR_LIST_FOREGROUND); 
-	super.setForeground (color);
+void setBackgroundPixel (int pixel) {
+	super.setBackgroundPixel (pixel);
+	cachedBackground = null;
 }
 /**
  * Sets the order that the items in the receiver should 
@@ -3397,6 +3432,15 @@ public void setFont (Font value) {
 	}
 	redraw ();
 }
+public void setForeground (Color color) {
+	checkWidget ();
+	if (color == null) color = display.getSystemColor (SWT.COLOR_LIST_FOREGROUND); 
+	super.setForeground (color);
+}
+void setForegroundPixel (int pixel) {
+	super.setForegroundPixel (pixel);
+	cachedForeground = null;
+}
 void setHeaderImageHeight (int value) {
 	headerImageHeight = value;
 	Point headerSize = header.getSize ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java
index e4c3476..abdf2bc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TableItem.java	
@@ -428,10 +428,10 @@ public Color getBackground (int columnIndex) {
 	return cellBackgrounds [columnIndex];
 }
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1146,11 +1146,11 @@ boolean paint (GC gc, TableColumn column, boolean backgroundOnly) {
 
 	/* draw the parent background color/image of this cell */
 	if (column == null) {
-		parent.drawBackground (gc, 0, y, clientArea.width, itemHeight);
+		parent.drawBackground (gc, 0, y, clientArea.width, itemHeight, 0, 0);
 	} else {
 		int fillWidth = cellBounds.width;
 		if (parent.linesVisible) fillWidth--;
-		parent.drawBackground (gc, cellBounds.x, cellBounds.y, fillWidth, cellBounds.height);
+		parent.drawBackground (gc, cellBounds.x, cellBounds.y, fillWidth, cellBounds.height, 0, 0);
 	}
 
 	boolean isSelected = isSelected ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java
index 1e65f8c..5f47203 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/Tree.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,6 +81,7 @@ public class Tree extends Composite {
 	TreeItem[] selectedItems = NO_ITEMS;
 	TreeItem focusItem, anchorItem, insertMarkItem;
 	TreeItem lastClickedItem;
+	Color cachedBackground, cachedForeground;
 	Event lastSelectionEvent;
 	int availableItemsCount = 0;
 	boolean insertMarkPrecedes = false;
@@ -825,6 +826,11 @@ Image getArrowDownImage () {
 Image getArrowUpImage () {
 	return (Image) display.getData (ID_ARROWUP);
 }
+public Color getBackground () {
+	checkWidget ();
+	if (cachedBackground != null) return cachedBackground;
+	return super.getBackground ();
+}
 int getCellPadding () {
 	return MARGIN_CELL + WIDTH_CELL_HIGHLIGHT; 
 }
@@ -985,6 +991,11 @@ Color getConnectorColor () {
 Image getExpandedImage () {
 	return (Image) display.getData (ID_EXPANDED);
 }
+public Color getForeground () {
+	checkWidget ();
+	if (cachedForeground != null) return cachedForeground;
+	return super.getForeground ();
+}
 Image getGrayUncheckedImage () {
 	return (Image) display.getData (ID_GRAYUNCHECKED);
 }
@@ -2298,6 +2309,7 @@ void onDispose (Event event) {
 	header = null;
 	resizeColumn = sortColumn = null;
 	expanderBounds = null;
+	cachedBackground = cachedForeground = null;
 }
 void onEnd (int stateMask) {
 	int lastAvailableIndex = availableItemsCount - 1;
@@ -2973,18 +2985,19 @@ void onPaint (Event event) {
 	endIndex = Math.min (endIndex, availableItemsCount - 1);
 
 	/* fill background not handled by items */
-	gc.setBackground (getBackground ());
+	cachedBackground = getBackground ();
+	gc.setBackground (cachedBackground);
 	gc.setClipping (clipping);
 	int bottomY = endIndex >= 0 ? getItemY (availableItems [endIndex]) + itemHeight : 0;
 	int fillHeight = Math.max (0, clientArea.height - bottomY);
 	if (fillHeight > 0) {	/* space below bottom item */
-		drawBackground (gc, 0, bottomY, clientArea.width, fillHeight);
+		drawBackground (gc, 0, bottomY, clientArea.width, fillHeight, 0, 0);
 	}
 	if (columns.length > 0) {
 		TreeColumn column = orderedColumns [orderedColumns.length - 1];	/* last column */
 		int rightX = column.getX () + column.width;
 		if (rightX < clientArea.width) {
-			drawBackground (gc, rightX, 0, clientArea.width - rightX, clientArea.height - fillHeight);
+			drawBackground (gc, rightX, 0, clientArea.width - rightX, clientArea.height - fillHeight, 0, 0);
 		}
 	}
 
@@ -2992,6 +3005,7 @@ void onPaint (Event event) {
 	boolean noFocusDraw = false;
 	int[] lineDash = gc.getLineDash ();
 	int lineWidth = gc.getLineWidth ();
+	cachedForeground = getForeground ();
 	for (int i = startIndex; i <= Math.min (endIndex, availableItemsCount - 1); i++) {
 		TreeItem item = availableItems [i];
 		if (!item.isDisposed ()) {	/* ensure that item was not disposed in a callback */
@@ -3006,13 +3020,20 @@ void onPaint (Event event) {
 						if (!item.isDisposed ()) {	/* ensure that item was not disposed in a callback */
 							noFocusDraw = item.paint (gc, orderedColumns [j], false) || noFocusDraw;
 						}
-						if (isDisposed () || gc.isDisposed ()) return;	/* ensure that receiver was not disposed in a callback */
+						if (isDisposed () || gc.isDisposed ()) { /* ensure that receiver was not disposed in a callback */
+							cachedBackground = cachedForeground = null;
+							return;
+						}
 					}
 				}
 			}
 		}
-		if (isDisposed () || gc.isDisposed ()) return;	/* ensure that receiver was not disposed in a callback */
+		if (isDisposed () || gc.isDisposed ()) { /* ensure that receiver was not disposed in a callback */
+			cachedBackground = cachedForeground = null;
+			return;
+		}
 	}
+	cachedBackground = cachedForeground = null;
 
 	/* repaint grid lines */
 	gc.setClipping(clipping);
@@ -3387,6 +3408,21 @@ public void removeTreeListener (TreeListener listener) {
 	removeListener (SWT.Expand, listener);
 	removeListener (SWT.Collapse, listener);
 }
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TreeItem item = items [i];
+			if (item != null) item.reskinChildren (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
 /**
  * Selects an item in the receiver.  If the item was already
  * selected, it remains selected.
@@ -3450,6 +3486,10 @@ public void setBackground (Color color) {
 	if (color == null) color = display.getSystemColor (SWT.COLOR_LIST_BACKGROUND); 
 	super.setBackground (color);
 }
+void setBackgroundPixel (int pixel) {
+	super.setBackgroundPixel (pixel);
+	cachedBackground = null;
+}
 /**
  * Sets the order that the items in the receiver should 
  * be displayed in to the given argument which is described
@@ -3588,6 +3628,10 @@ public void setForeground (Color color) {
 	if (color == null) color = display.getSystemColor (SWT.COLOR_LIST_FOREGROUND); 
 	super.setForeground (color);
 }
+void setForegroundPixel (int pixel) {
+	super.setForegroundPixel (pixel);
+	cachedForeground = null;
+}
 void setHeaderImageHeight (int value) {
 	headerImageHeight = value;
 	Point headerSize = header.getSize ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java
index f762439..966b669 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/emulated/treetable/org/eclipse/swt/widgets/TreeItem.java	
@@ -843,10 +843,10 @@ public Color getBackground (int columnIndex) {
 	return cellBackgrounds [columnIndex];
 }
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1750,11 +1750,11 @@ boolean paint (GC gc, TreeColumn column, boolean backgroundOnly) {
 
 	/* draw the parent background color/image of this cell */
 	if (column == null) {
-		parent.drawBackground (gc, 0, y, clientArea.width, itemHeight);
+		parent.drawBackground (gc, 0, y, clientArea.width, itemHeight, 0, 0);
 	} else {
 		int fillWidth = cellBounds.width;
 		if (parent.linesVisible) fillWidth--;
-		parent.drawBackground (gc, cellBounds.x, cellBounds.y, fillWidth, cellBounds.height);
+		parent.drawBackground (gc, cellBounds.x, cellBounds.y, fillWidth, cellBounds.height, 0, 0);
 	}
 
 	boolean isSelected = isSelected ();
@@ -2495,8 +2495,6 @@ public void setFont (int columnIndex, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java
index e3fae9e..7a57f02 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java	
@@ -41,6 +41,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public GdkColor handle;
 
@@ -224,7 +226,7 @@ public RGB getRGB () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the color
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Color gtk_new(Device device, GdkColor gdkColor) {
 	Color color = new Color(device);
@@ -267,7 +269,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java
index ce5768c..96dfe32 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java	
@@ -51,6 +51,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -90,6 +92,10 @@ Cursor (Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -477,7 +483,7 @@ public boolean equals(Object object) {
  * @param device the device on which to allocate the color
  * @param handle the handle for the cursor
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Cursor gtk_new(Device device, int /*long*/ handle) {
 	Cursor cursor = new Cursor(device);
@@ -505,7 +511,7 @@ public int hashCode() {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index fbacfcf..32e16e8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,8 @@ public abstract class Device implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	protected int /*long*/ xDisplay;
 	int /*long*/ shellHandle;
@@ -56,7 +58,7 @@ public abstract class Device implements Drawable {
 	int /*long*/ logProc;
 	Callback logCallback;
 	//NOT DONE - get list of valid names
-	String [] log_domains = {"GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS"};
+	String [] log_domains = {"GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS", "GIO"};
 	int [] handler_ids = new int [log_domains.length];
 	int warningLevel;
 	
@@ -159,8 +161,17 @@ void checkCairo() {
 	if (CAIRO_LOADED) return;
 	try {
 		/* Check if cairo is available on the system */
-		byte[] buffer = Converter.wcsToMbcs(null, "libcairo.so.2", true);
-		int /*long*/ libcairo = OS.dlopen(buffer, OS.RTLD_LAZY);
+		byte[] buffer ;
+		int flags = OS.RTLD_LAZY;
+		if (OS.IsAIX) {
+			 buffer = Converter.wcsToMbcs(null, "libcairo.a(libcairo.so.2)", true);
+			 flags |= OS.RTLD_MEMBER;
+		} else  if (OS.IsHPUX) {
+			 buffer = Converter.wcsToMbcs(null, "libcairo.so", true);
+		} else {
+			buffer =  Converter.wcsToMbcs(null, "libcairo.so.2", true);
+		}
+		int /*long*/ libcairo = OS.dlopen(buffer, flags);
 		if (libcairo != 0) {
 			OS.dlclose(libcairo);
 		} else {
@@ -565,8 +576,10 @@ protected void init () {
 			useXRender = major_versionp[0] > 0 || (major_versionp[0] == 0 && minor_versionp[0] >= 8);
 		}
 	}
-
-	if (debug) {
+	//TODO: Remove; temporary code only
+	boolean fixAIX = OS.IsAIX && OS.PTR_SIZEOF == 8;
+	
+	if (debug || fixAIX) {
 		if (xDisplay != 0) {
 			/* Create the warning and error callbacks */
 			Class clazz = getClass ();
@@ -587,7 +600,7 @@ protected void init () {
 					XIOErrorProc = OS.XSetIOErrorHandler (XNullIOErrorProc);
 				}
 			}
-			OS.XSynchronize (xDisplay, true);
+			if (debug) OS.XSynchronize (xDisplay, true);
 		}
 	}
 	
@@ -649,6 +662,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int /*long*/ internal_new_GC (GCData data);
 
@@ -664,6 +679,8 @@ public abstract int /*long*/ internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int /*long*/ handle, GCData data);
 
@@ -877,7 +894,9 @@ static int /*long*/ XErrorProc (int /*long*/ xDisplay, int /*long*/ xErrorEvent)
 			if (DEBUG || device.debug) {
 				new SWTError ().printStackTrace ();
 			}
-			OS.Call (XErrorProc, xDisplay, xErrorEvent);
+			//TODO: Remove; temporary code only
+			boolean fixAIX = OS.IsAIX && OS.PTR_SIZEOF == 8;
+			if (!fixAIX) OS.Call (XErrorProc, xDisplay, xErrorEvent);
 		}
 	} else {
 		if (DEBUG) new SWTError ().printStackTrace ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java
index 6fc287f..f212af0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,17 +12,43 @@ package org.eclipse.swt.graphics;
 
 
 public class DeviceData {
-	/*
-	* The following fields are platform dependent.
-	* <p>
-	* <b>IMPORTANT:</b> These fields are <em>not</em> part of the SWT
-	* public API. They are marked public only so that they can be shared
-	* within the packages provided by SWT. They are not available on all
-	* platforms and should never be accessed from application code.
-	* </p>
-	*/
+	/**
+	 * This field is platform dependent.
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked protected only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 */
 	public String display_name;
+
+	/**
+	 * This field is platform dependent.
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked protected only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 */
 	public String application_name;
+
+	/**
+	 * This field is platform dependent.
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked protected only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 */
 	public String application_class;
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java
index 3607e38..2619dbb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java	
@@ -41,6 +41,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -213,7 +215,7 @@ public FontData[] getFontData() {
  * @param device the device on which to allocate the color
  * @param handle the handle for the font
  * 
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Font gtk_new(Device device, int /*long*/ handle) {
 	Font font = new Font(device);
@@ -266,7 +268,7 @@ void init(String name, float height, int style, byte[] fontString) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java
index 6d15004..39a350c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String name;
 
@@ -60,6 +62,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float height;
 
@@ -72,6 +76,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int style;
 	
@@ -84,6 +90,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public byte[] string;
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 927f94f..ac76e2c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java	
@@ -66,6 +66,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -1089,12 +1091,12 @@ void drawImageXRender(Image srcImage, int srcX, int srcY, int srcWidth, int srcH
 		short[] xRects = new short[nRects[0] * 4];
 		for (int i=0, j=0; i<nRects[0]; i++, j+=4) {
 			OS.memmove(rect, rects[0] + (i * GdkRectangle.sizeof), GdkRectangle.sizeof);
-			xRects[j] = (short)rect.x;
-			xRects[j+1] = (short)rect.y;
+			xRects[j] = (short)(translateX + rect.x);
+			xRects[j+1] = (short)(translateY + rect.y);
 			xRects[j+2] = (short)rect.width;
 			xRects[j+3] = (short)rect.height;
 		}
-		OS.XRenderSetPictureClipRectangles(xDisplay, destPict, translateX, translateY, xRects, nRects[0]);
+		OS.XRenderSetPictureClipRectangles(xDisplay, destPict, 0, 0, xRects, nRects[0]);
 		if (clipping != data.clipRgn && clipping != data.damageRgn) {
 			OS.gdk_region_destroy(clipping);
 		}
@@ -2508,8 +2510,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -2889,7 +2892,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -3537,9 +3540,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3549,9 +3552,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index 1754574..08c0da6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java	
@@ -79,6 +79,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -91,6 +93,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ pixmap;
 	
@@ -103,6 +107,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ mask;
 
@@ -645,6 +651,17 @@ void createSurface() {
 		int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
 		int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);		
 		byte[] line = new byte[stride];
+		int /*long*/ ptr = OS.malloc(4);
+		OS.memmove(ptr, new int[]{1}, 4);
+		OS.memmove(line, ptr, 1);
+		OS.free(ptr);
+		int oa, or, og, ob;
+		boolean bigendian = line[0] == 0;
+		if (bigendian) {
+			oa = 0; or = 1; og = 2; ob = 3;
+		} else {
+			oa = 3; or = 2; og = 1; ob = 0;
+		}
 		if (mask != 0 && OS.gdk_drawable_get_depth(mask) == 1) {
 			int /*long*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
 			if (maskPixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -659,10 +676,15 @@ void createSurface() {
 				for (int x=0, offset1=0; x<width; x++, offset1 += 4) {
 					if (maskLine[x * 3] == 0) {
 						line[offset1 + 0] = line[offset1 + 1] = line[offset1 + 2] = line[offset1 + 3] = 0;
+					} else {
+						byte r = line[offset1 + 0];
+						byte g = line[offset1 + 1];
+						byte b = line[offset1 + 2];
+						line[offset1 + oa] = (byte)0xFF;
+						line[offset1 + or] = r;
+						line[offset1 + og] = g;
+						line[offset1 + ob] = b;
 					}
-					byte temp = line[offset1];
-					line[offset1] = line[offset1 + 2];
-					line[offset1 + 2] = temp;
 				}
 				OS.memmove(offset, line, stride);
 				offset += stride;
@@ -674,7 +696,6 @@ void createSurface() {
 			for (int y=0; y<height; y++) {
 				OS.memmove(line, offset, stride);
 				for (int x=0, offset1=0; x<width; x++, offset1 += 4) {
-					line[offset1+3] = (byte)alpha;
 					/* pre-multiplied alpha */
 					int r = ((line[offset1 + 0] & 0xFF) * alpha) + 128;
 					r = (r + (r >> 8)) >> 8;
@@ -682,9 +703,10 @@ void createSurface() {
 					g = (g + (g >> 8)) >> 8;
 					int b = ((line[offset1 + 2] & 0xFF) * alpha) + 128;
 					b = (b + (b >> 8)) >> 8;
-					line[offset1 + 0] = (byte)b;
-					line[offset1 + 1] = (byte)g;
-					line[offset1 + 2] = (byte)r;
+					line[offset1 + oa] = (byte)alpha;
+					line[offset1 + or] = (byte)r;
+					line[offset1 + og] = (byte)g;
+					line[offset1 + ob] = (byte)b;
 				}
 				OS.memmove(offset, line, stride);
 				offset += stride;
@@ -695,7 +717,6 @@ void createSurface() {
 				OS.memmove (line, offset, stride);
 				for (int x=0, offset1=0; x<width; x++, offset1 += 4) {
 					int alpha = alphaData [y*w [0]+x] & 0xFF;
-					line[offset1+3] = (byte)alpha;
 					/* pre-multiplied alpha */
 					int r = ((line[offset1 + 0] & 0xFF) * alpha) + 128;
 					r = (r + (r >> 8)) >> 8;
@@ -703,9 +724,10 @@ void createSurface() {
 					g = (g + (g >> 8)) >> 8;
 					int b = ((line[offset1 + 2] & 0xFF) * alpha) + 128;
 					b = (b + (b >> 8)) >> 8;
-					line[offset1 + 0] = (byte)b;
-					line[offset1 + 1] = (byte)g;
-					line[offset1 + 2] = (byte)r;
+					line[offset1 + oa] = (byte)alpha;
+					line[offset1 + or] = (byte)r;
+					line[offset1 + og] = (byte)g;
+					line[offset1 + ob] = (byte)b;
 				}
 				OS.memmove (offset, line, stride);
 				offset += stride;
@@ -715,10 +737,13 @@ void createSurface() {
 			for (int y = 0; y < h [0]; y++) {
 				OS.memmove (line, offset, stride);
 				for (int x=0, offset1=0; x<width; x++, offset1 += 4) {
-					line[offset1+3] = (byte)0xFF;
-					byte temp = line[offset1];
-					line[offset1] = line[offset1 + 2];
-					line[offset1 + 2] = temp;
+					byte r = line[offset1 + 0];
+					byte g = line[offset1 + 1];
+					byte b = line[offset1 + 2];
+					line[offset1 + oa] = (byte)0xFF;
+					line[offset1 + or] = r;
+					line[offset1 + og] = g;
+					line[offset1 + ob] = b;
 				}
 				OS.memmove (offset, line, stride);
 				offset += stride;
@@ -907,7 +932,7 @@ public ImageData getImageData() {
  * @param pixmap the OS handle for the image
  * @param mask the OS handle for the image mask
  *
- * @private
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Image gtk_new(Device device, int type, int /*long*/ pixmap, int /*long*/ mask) {
 	Image image = new Image(device);
@@ -1052,6 +1077,8 @@ void init(ImageData image) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (pixmap == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -1089,7 +1116,9 @@ public int /*long*/ internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ gdkGC, GCData data) {
 	OS.g_object_unref(gdkGC);
@@ -1101,7 +1130,7 @@ public void internal_dispose_GC (int /*long*/ gdkGC, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java
index 3ddb8b5..a2b8995 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java	
@@ -37,6 +37,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -412,7 +414,7 @@ public boolean intersects(Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
index d72c2ba..372b628 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java	
@@ -48,9 +48,12 @@ public final class TextLayout extends Resource {
 	Font font;
 	String text;
 	int ascent, descent;
+	int indent, wrapIndent, wrapWidth;
 	int[] segments;
+	char[] segmentsChars;
 	int[] tabs;
 	StyleItem[] styles;
+	int stylesCount;
 	int /*long*/ layout, context, attrList;
 	int[] invalidOffsets;
 	static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F', ZWS = '\u200B', ZWNBS = '\uFEFF';
@@ -86,10 +89,11 @@ public TextLayout (Device device) {
 		OS.pango_layout_set_auto_dir(layout, false);
 	}
 	text = "";
-	ascent = descent = -1;
+	wrapWidth = ascent = descent = -1;
 	styles = new StyleItem[2];
 	styles[0] = new StyleItem();
 	styles[1] = new StyleItem();
+	stylesCount = 2;
 	init();
 }
 
@@ -102,18 +106,22 @@ void computeRuns () {
 	String segmentsText = getSegmentsText();
 	byte[] buffer = Converter.wcsToMbcs(null, segmentsText, false);
 	OS.pango_layout_set_text (layout, buffer, buffer.length);
-	if (styles.length == 2 && styles[0].style == null && ascent == -1 && descent == -1 && segments == null) return;
+	if (stylesCount == 2 && styles[0].style == null && ascent == -1 && descent == -1 && segments == null) return;
 	int /*long*/ ptr = OS.pango_layout_get_text(layout);
 	attrList = OS.pango_attr_list_new();	
 	PangoAttribute attribute = new PangoAttribute();
 	char[] chars = null;
 	int segementsLength = segmentsText.length();
+	int nSegments = segementsLength - text.length();
+	int offsetCount = nSegments;
+	int[] lineOffsets = null; 
 	if ((ascent != -1  || descent != -1) && segementsLength > 0) {
 		PangoRectangle rect = new PangoRectangle();
 		if (ascent != -1) rect.y =  -(ascent  * OS.PANGO_SCALE);
 		rect.height = (Math.max(0, ascent) + Math.max(0, descent)) * OS.PANGO_SCALE;
 		int lineCount = OS.pango_layout_get_line_count(layout);
 		chars = new char[segementsLength + lineCount * 2];
+		lineOffsets = new int [lineCount];
 		int oldPos = 0, lineIndex = 0;
 		PangoLayoutLine line = new PangoLayoutLine();
 		while (lineIndex < lineCount) {
@@ -138,6 +146,7 @@ void computeRuns () {
 			chars[pos + lineIndex * 2] = ZWS;
 			chars[pos + lineIndex * 2 + 1] = ZWNBS;
 			segmentsText.getChars(oldPos, pos, chars,  oldPos + lineIndex * 2);
+			lineOffsets[lineIndex] = pos + lineIndex * 2; 
 			oldPos = pos;
 			lineIndex++;
 		}
@@ -145,28 +154,31 @@ void computeRuns () {
 		buffer = Converter.wcsToMbcs(null, chars, false);
 		OS.pango_layout_set_text (layout, buffer, buffer.length);
 		ptr = OS.pango_layout_get_text(layout);
+		offsetCount += 2 * lineCount;
 	} else {
 		chars = new char[segementsLength];
 		segmentsText.getChars(0, segementsLength, chars, 0);
 	}
-	int offsetCount = 0;
-	for (int i = 0; i < chars.length; i++) {
-		char c = chars[i];
-		if (c == LTR_MARK || c == RTL_MARK || c == ZWNBS || c == ZWS) {
-			offsetCount++;
-		}
-	}
 	invalidOffsets = new int[offsetCount];
-	offsetCount = 0;
-	for (int i = 0; i < chars.length; i++) {
-		char c = chars[i];
-		if (c == LTR_MARK || c == RTL_MARK || c == ZWNBS || c == ZWS) {
-			invalidOffsets[offsetCount++] = i;
+	if (offsetCount > 0) {
+		offsetCount = 0;
+		int lineIndex = 0;
+		int segmentCount = 0;
+		for (int i = 0; i < chars.length; i++) {
+			char c = chars[i];
+			if (c == ZWS && lineOffsets != null && i == lineOffsets[lineIndex]) {
+				invalidOffsets[offsetCount++] = i;		//ZWS
+				invalidOffsets[offsetCount++] = ++i;	//ZWNBS
+				lineIndex++;
+			} else if (segmentCount < nSegments && i - offsetCount == segments[segmentCount]) {
+				invalidOffsets[offsetCount++] = i;
+				segmentCount++;
+			}
 		}
 	}
 	int strlen = OS.strlen(ptr);
 	Font defaultFont = font != null ? font : device.systemFont;
-	for (int i = 0; i < styles.length - 1; i++) {
+	for (int i = 0; i < stylesCount - 1; i++) {
 		StyleItem styleItem = styles[i];
 		TextStyle style = styleItem.style; 
 		if (style == null) continue;
@@ -306,6 +318,8 @@ void destroy() {
 	text = null;
 	styles = null;
 	freeRuns();
+	segments = null;
+	segmentsChars = null;
 	if (layout != 0) OS.g_object_unref(layout);
 	layout = 0;
 	if (context != 0) OS.g_object_unref(context);
@@ -390,6 +404,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo
 	if (selectionBackground != null && selectionBackground.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	gc.checkGC(GC.FOREGROUND);
 	int length = text.length();
+	x += Math.min (indent, wrapIndent);
 	boolean hasSelection = selectionStart <= selectionEnd && selectionStart != -1 && selectionEnd != -1;
 	GCData data = gc.data;
 	int /*long*/ cairo = data.cairo;
@@ -572,7 +587,7 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) {
 	if (cairo != 0 && OS.GTK_VERSION >= OS.VERSION(2, 8, 0)) {
 		Cairo.cairo_save(cairo);
 	}
-	for (int i = 0; i < styles.length - 1; i++) {
+	for (int i = 0; i < stylesCount - 1; i++) {
 		TextStyle style = styles[i].style;
 		if (style == null) continue;
 		
@@ -975,6 +990,7 @@ public Rectangle getBounds(int start, int end) {
 	if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) {
 		rect.x = width() - rect.x - rect.width;
 	}
+	rect.x += Math.min (indent, wrapIndent);
 	return new Rectangle(rect.x, rect.y, rect.width, rect.height);
 }
 
@@ -1025,7 +1041,7 @@ public Font getFont () {
 */
 public int getIndent () {
 	checkLayout();
-	return OS.PANGO_PIXELS(OS.pango_layout_get_indent(layout));
+	return indent;
 }
 
 /**
@@ -1122,6 +1138,7 @@ public Rectangle getLineBounds(int lineIndex) {
 	if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) {
 		x = width() - x - width;
 	}
+	x += Math.min (indent, wrapIndent);
 	return new Rectangle(x, y, width, height);
 }
 
@@ -1239,7 +1256,7 @@ public int[] getLineOffsets() {
 		int pos = (int)/*64*/OS.g_utf8_pointer_to_offset(ptr, ptr + line.start_index);
 		offsets[i] = untranslateOffset(pos);
 	}
-	offsets[lineCount] = text.length();						 
+	offsets[lineCount] = text.length();
 	return offsets;
 }
 
@@ -1277,6 +1294,7 @@ public Point getLocation(int offset, boolean trailing) {
 	if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) {
 		x = width() - x;
 	}
+	x += Math.min (indent, wrapIndent);
 	return new Point(x, OS.PANGO_PIXELS(y));
 }
 
@@ -1320,11 +1338,11 @@ int _getOffset (int offset, int movement, boolean forward) {
 	OS.pango_layout_get_log_attrs(layout, attrs, nAttrs);
 	if (attrs[0] == 0) return offset + step;
 	length = (int)/*64*/OS.g_utf8_strlen(OS.pango_layout_get_text(layout), -1);
-	offset = translateOffset(offset);
+	offset += step;
+	int internalOffset = translateOffset(offset);
 	PangoLogAttr logAttr = new PangoLogAttr();
-	offset = validateOffset(offset, step);
-	while (0 < offset && offset < length) {
-		OS.memmove(logAttr, attrs[0] + offset * PangoLogAttr.sizeof, PangoLogAttr.sizeof);
+	while (0 < internalOffset && internalOffset < length) {
+		OS.memmove(logAttr, attrs[0] + internalOffset * PangoLogAttr.sizeof, PangoLogAttr.sizeof);
 		if (((movement & SWT.MOVEMENT_CLUSTER) != 0) && logAttr.is_cursor_position) break; 
 		if ((movement & SWT.MOVEMENT_WORD) != 0) {
 			if (forward) {
@@ -1335,14 +1353,16 @@ int _getOffset (int offset, int movement, boolean forward) {
 		}
 		if ((movement & SWT.MOVEMENT_WORD_START) != 0) {
 			if (logAttr.is_word_start) break;
+			if (logAttr.is_sentence_end) break;
 		}
 		if ((movement & SWT.MOVEMENT_WORD_END) != 0) {
 			if (logAttr.is_word_end) break;
 		}
-		offset = validateOffset(offset, step);
+		offset += step;
+		internalOffset = translateOffset(offset);
 	}
 	OS.g_free(attrs[0]);
-	return Math.min(Math.max(0, untranslateOffset(offset)), text.length());
+	return Math.min(Math.max(0, offset), text.length());
 }
 
 /**
@@ -1401,6 +1421,7 @@ public int getOffset(int x, int y, int[] trailing) {
 	checkLayout();
 	computeRuns();
 	if (trailing != null && trailing.length < 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	x -= Math.min (indent, wrapIndent);
 	if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) {
 		x = width() - x;
 	}
@@ -1492,9 +1513,9 @@ public int getPreviousOffset (int index, int movement) {
  */
 public int[] getRanges () {
 	checkLayout();
-	int[] result = new int[styles.length * 2];
+	int[] result = new int[stylesCount * 2];
 	int count = 0;
-	for (int i=0; i<styles.length - 1; i++) {
+	for (int i=0; i<stylesCount - 1; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].start;
 			result[count++] = styles[i + 1].start - 1;
@@ -1522,32 +1543,53 @@ public int[] getSegments() {
 	return segments;
 }
 
+/**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
 String getSegmentsText() {
-	if (segments == null) return text;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return text;
 	int length = text.length();
 	if (length == 0) return text;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return text;
+	if (segments == null) return text;
+	int nSegments = segments.length;
+	if (nSegments == 0) return text;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return text;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return text;
+		}
 	}
 	char[] oldChars = new char[length];
 	text.getChars(0, length, oldChars, 0);
 	char[] newChars = new char[length + nSegments];
 	int charCount = 0, segmentCount = 0;
-	char separator = getOrientation() == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
+	char defaultSeparator = getOrientation() == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
 	while (charCount < length) {
 		if (segmentCount < nSegments && charCount == segments[segmentCount]) {
+			char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 			newChars[charCount + segmentCount++] = separator;
 		} else {
 			newChars[charCount + segmentCount] = oldChars[charCount++];
 		}
 	}
-	if (segmentCount < nSegments) {
+	while (segmentCount < nSegments) {
 		segments[segmentCount] = charCount;
+		char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 		newChars[charCount + segmentCount++] = separator;
 	}
-	return new String(newChars, 0, Math.min(charCount + segmentCount, newChars.length));
+	return new String(newChars, 0, newChars.length);
 }
 
 /**
@@ -1581,7 +1623,7 @@ public TextStyle getStyle (int offset) {
 	checkLayout();
 	int length = text.length();
 	if (!(0 <= offset && offset < length)) SWT.error(SWT.ERROR_INVALID_RANGE);
-	for (int i=1; i<styles.length; i++) {
+	for (int i=1; i<stylesCount; i++) {
 		StyleItem item = styles[i];
 		if (item.start > offset) {
 			return styles[i - 1].style;
@@ -1605,9 +1647,9 @@ public TextStyle getStyle (int offset) {
  */
 public TextStyle[] getStyles () {
 	checkLayout();
-	TextStyle[] result = new TextStyle[styles.length];
+	TextStyle[] result = new TextStyle[stylesCount];
 	int count = 0;
-	for (int i=0; i<styles.length; i++) {
+	for (int i=0; i<stylesCount; i++) {
 		if (styles[i].style != null) {
 			result[count++] = styles[i].style;
 		}
@@ -1660,8 +1702,23 @@ public String getText () {
  */
 public int getWidth () {
 	checkLayout ();
-	int width = OS.pango_layout_get_width(layout);
-	return width != -1 ? OS.PANGO_PIXELS(width) : -1;
+	return wrapWidth;
+}
+
+/**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout ();
+	return wrapIndent;
 }
 
 /**
@@ -1670,7 +1727,7 @@ public int getWidth () {
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1797,7 +1854,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1806,12 +1863,17 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
 	checkLayout();
 	if (indent < 0) return;
-	OS.pango_layout_set_indent(layout, indent * OS.PANGO_SCALE);
+	if (this.indent == indent) return;
+	this.indent = indent;
+	OS.pango_layout_set_indent(layout, (indent - wrapIndent) * OS.PANGO_SCALE);
+	if (wrapWidth != -1) setWidth();
 }
 
 /**
@@ -1879,7 +1941,7 @@ public void setSpacing (int spacing) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1888,12 +1950,18 @@ public void setSpacing (int spacing) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1912,6 +1980,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the style of the receiver for the specified range.  Styles previously
  * set for that range will be overwritten.  The start and end offsets are
  * inclusive and will be clamped if out of range.
@@ -1947,7 +2048,7 @@ public void setStyle (TextStyle style, int start, int end) {
 	}
 
 	int low = -1;
-	int high = styles.length;
+	int high = stylesCount;
 	while (high - low > 1) {
 		int index = (high + low) / 2;
 		if (styles[index + 1].start > start) {
@@ -1956,7 +2057,7 @@ public void setStyle (TextStyle style, int start, int end) {
 			low = index;
 		}
 	}
-	if (0 <= high && high < styles.length) {
+	if (0 <= high && high < stylesCount) {
 		StyleItem item = styles[high];
 		if (item.start == start && styles[high + 1].start - 1 == end) {
 			if (style == null) {
@@ -1969,7 +2070,7 @@ public void setStyle (TextStyle style, int start, int end) {
 	freeRuns();
 	int modifyStart = high;
 	int modifyEnd = modifyStart;
-	while (modifyEnd < styles.length) {
+	while (modifyEnd < stylesCount) {
 		if (styles[modifyEnd + 1].start > end) break;
 		modifyEnd++;
 	}
@@ -1981,33 +2082,42 @@ public void setStyle (TextStyle style, int start, int end) {
 			return;
 		}
 		if (styleStart != start && styleEnd != end) {
-			StyleItem[] newStyles = new StyleItem[styles.length + 2];
-			System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);
+			int newLength = stylesCount + 2; 
+			if (newLength > styles.length) {
+				int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+				StyleItem[] newStyles = new StyleItem[newSize];
+				System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+				styles = newStyles;
+			}
+			System.arraycopy(styles, modifyEnd + 1, styles, modifyEnd + 3, stylesCount - modifyEnd - 1);
 			StyleItem item = new StyleItem();
 			item.start = start;
 			item.style = style;
-			newStyles[modifyStart + 1] = item;	
+			styles[modifyStart + 1] = item;	
 			item = new StyleItem();
 			item.start = end + 1;
 			item.style = styles[modifyStart].style;
-			newStyles[modifyStart + 2] = item;
-			System.arraycopy(styles, modifyEnd + 1, newStyles, modifyEnd + 3, styles.length - modifyEnd - 1);
-			styles = newStyles;
+			styles[modifyStart + 2] = item;
+			stylesCount = newLength;
 			return;
 		}
 	}
 	if (start == styles[modifyStart].start) modifyStart--;
 	if (end == styles[modifyEnd + 1].start - 1) modifyEnd++;
-	int newLength = styles.length + 1 - (modifyEnd - modifyStart - 1);
-	StyleItem[] newStyles = new StyleItem[newLength];
-	System.arraycopy(styles, 0, newStyles, 0, modifyStart + 1);	
+	int newLength = stylesCount + 1 - (modifyEnd - modifyStart - 1);
+	if (newLength > styles.length) {
+		int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2));
+		StyleItem[] newStyles = new StyleItem[newSize];
+		System.arraycopy(styles, 0, newStyles, 0, stylesCount);
+		styles = newStyles;
+	}
+	System.arraycopy(styles, modifyEnd, styles, modifyStart + 2, stylesCount - modifyEnd);
 	StyleItem item = new StyleItem();
 	item.start = start;
 	item.style = style;
-	newStyles[modifyStart + 1] = item;
-	styles[modifyEnd].start = end + 1;
-	System.arraycopy(styles, modifyEnd, newStyles, modifyStart + 2, styles.length - modifyEnd);
-	styles = newStyles;
+	styles[modifyStart + 1] = item;
+	styles[modifyStart + 2].start = end + 1;
+	stylesCount = newLength;
 }
 
 /**
@@ -2080,7 +2190,8 @@ public void setText (String text) {
 	styles = new StyleItem[2];
 	styles[0] = new StyleItem();
 	styles[1] = new StyleItem();
-	styles[styles.length - 1].start = text.length();
+	styles[1].start = text.length();
+	stylesCount = 2;
 }
 
 /**
@@ -2102,16 +2213,46 @@ public void setText (String text) {
 public void setWidth (int width) {
 	checkLayout ();
 	if (width < -1 || width == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	if (wrapWidth == width) return;
 	freeRuns();
-	if (width == -1) {
+	wrapWidth = width;
+	setWidth();
+}
+
+void setWidth () {
+	if (wrapWidth == -1) {
 		OS.pango_layout_set_width(layout, -1);
 		boolean rtl = OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL;
 		OS.pango_layout_set_alignment(layout, rtl ? OS.PANGO_ALIGN_RIGHT : OS.PANGO_ALIGN_LEFT);
 	} else {
-		OS.pango_layout_set_width(layout, width * OS.PANGO_SCALE);
+		int margin = Math.min (indent, wrapIndent);
+		OS.pango_layout_set_width(layout, (wrapWidth - margin) * OS.PANGO_SCALE);
 	}
 }
 
+/**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout();
+	if (wrapIndent < 0) return;
+	if (this.wrapIndent == wrapIndent) return;
+	this.wrapIndent = wrapIndent;
+	OS.pango_layout_set_indent(layout, (indent - wrapIndent) * OS.PANGO_SCALE);
+	if (wrapWidth != -1) setWidth();
+}
+
 static final boolean isLam(int ch) {
 	return ch == 0x0644;
 }
@@ -2165,29 +2306,11 @@ int untranslateOffset(int offset) {
 	int length = text.length();
 	if (length == 0) return offset;
 	if (invalidOffsets == null) return offset;
-	for (int i = 0; i < invalidOffsets.length; i++) {
-		if (offset == invalidOffsets[i]) {
-			offset++;
-			continue;
-		}
-		if (offset < invalidOffsets[i]) {
-			return offset - i;
-		}
+	int i = 0;
+	while (i < invalidOffsets.length && offset > invalidOffsets[i]) {
+		i++;
 	}
-	return offset - invalidOffsets.length;
-}
-
-int validateOffset(int offset, int step) {
-	if (invalidOffsets == null) return offset + step;
-	int i = step > 0 ? 0 : invalidOffsets.length - 1;
-	do {
-		offset += step;
-		while (0 <= i && i < invalidOffsets.length) {
-			if (invalidOffsets[i] == offset) break;
-			i += step;
-		}
-	} while (0 <= i && i < invalidOffsets.length);
-	return offset;
+	return offset - i;
 }
 
 int width () {
@@ -2195,7 +2318,7 @@ int width () {
 	if (wrapWidth != -1) return OS.PANGO_PIXELS(wrapWidth); 
 	int[] w = new int[1], h = new int[1];
 	OS.pango_layout_get_size(layout, w, h);
-	return OS.PANGO_PIXELS(w[0] + OS.pango_layout_get_indent(layout));
+	return OS.PANGO_PIXELS(w[0]);
 }
 
 } 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index 41802dc..f16b2d4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java	
@@ -118,6 +118,12 @@ static int checkStyle (int style) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
@@ -407,7 +413,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 			}
 		}
 	}
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return 0;
 }
 
@@ -650,7 +656,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
index ea6a149..3fd382c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java	
@@ -96,10 +96,7 @@ public Canvas (Composite parent, int style) {
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	checkWidget ();
-	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
-	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-	super.drawBackground (gc, x, y, width, height);
+	drawBackground (gc, x, y, width, height, 0, 0);
 }
 
 /**
@@ -211,12 +208,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
index 257f07a..1605c49 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,6 +125,10 @@ public RGB open () {
 			OS.g_list_free (pixbufs);
 		}
 	}
+	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		int /*long*/ group = OS.gtk_window_get_group(0);
+		OS.gtk_window_group_add_window (group, handle);
+	}
 	OS.gtk_window_set_modal (handle, true);
 	GtkColorSelectionDialog dialog = new GtkColorSelectionDialog ();
 	OS.memmove (dialog, handle);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 6e526d3..389aa23 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java	
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
@@ -57,13 +57,13 @@ import org.eclipse.swt.events.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class Combo extends Composite {
-	int /*long*/ buttonHandle, entryHandle, listHandle, textRenderer, cellHandle, popupHandle;
-	int lastEventTime, visibleCount = 5;
+	int /*long*/ buttonHandle, entryHandle, listHandle, textRenderer, cellHandle, popupHandle, menuHandle;
+	int lastEventTime, visibleCount = 10;
 	int /*long*/ gdkEventKey = 0;
 	int fixStart = -1, fixEnd = -1;
 	String [] items = new String [0];
-	boolean ignoreSelect, lockText;
-
+	boolean ignoreSelect, lockText, selectionAdded;
+	int indexSelected;
 	/**
 	 * the operating system limit for the number of characters
 	 * that the text field in an instance of this class can hold
@@ -457,28 +457,16 @@ void createHandle (int index) {
 		display.setWarnings (warnings);
 		OS.gtk_cell_layout_pack_start (handle, textRenderer, true);
 		OS.gtk_cell_layout_set_attributes (handle, textRenderer, OS.text, 0, 0);
-
-		/*
-		* Feature in GTK.  There is no API to query the button
-		* handle from a combo box although it is possible to get the
-		* text field.  The button handle is needed to hook events.  The
-		* fix is to walk the combo tree and find the first child that is 
-		* an instance of button.
+ 		/*
+		* Feature in GTK. Toggle button creation differs between GTK versions. The 
+		* fix is to call size_request() to force the creation of the button 
+		* for those versions of GTK that defer the creation. 
 		*/
-		OS.gtk_container_forall (handle, display.allChildrenProc, 0);
-		if (display.allChildren != 0) {
-			int /*long*/ list = display.allChildren;
-			while (list != 0) {
-				int /*long*/ widget = OS.g_list_data (list);
-				if (OS.GTK_IS_BUTTON (widget)) {
-					buttonHandle = widget;
-					break;
-				}
-				list = OS.g_list_next (list);
-			}
-			OS.g_list_free (display.allChildren);
-			display.allChildren = 0;
+		if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) {
+			OS.gtk_widget_size_request(handle, new GtkRequisition());
 		}
+		if (popupHandle != 0) findMenuHandle ();
+		findButtonHandle ();
 		/*
 		* Feature in GTK. By default, read only combo boxes 
 		* process the RETURN key rather than allowing the 
@@ -563,6 +551,8 @@ void deregister () {
 	if (buttonHandle != 0) display.removeWidget (buttonHandle);
 	if (entryHandle != 0) display.removeWidget (entryHandle);
 	if (listHandle != 0) display.removeWidget (listHandle);
+	if (popupHandle != 0) display.removeWidget (popupHandle);
+	if (menuHandle != 0) display.removeWidget (menuHandle);
 	int /*long*/ imContext = imContext ();
 	if (imContext != 0) display.removeWidget (imContext);
 }
@@ -609,6 +599,48 @@ int /*long*/ findPopupHandle (int /*long*/ oldList) {
 	return hdl;
 }
 
+
+void findButtonHandle() {
+	/*
+	* Feature in GTK.  There is no API to query the button
+	* handle from a combo box although it is possible to get the
+	* text field.  The button handle is needed to hook events.  The
+	* fix is to walk the combo tree and find the first child that is 
+	* an instance of button.
+	*/
+	OS.gtk_container_forall (handle, display.allChildrenProc, 0);
+	if (display.allChildren != 0) {
+		int /*long*/ list = display.allChildren;
+		while (list != 0) {
+			int /*long*/ widget = OS.g_list_data (list);
+			if (OS.GTK_IS_BUTTON (widget)) {
+				buttonHandle = widget;
+				break;
+			}
+			list = OS.g_list_next (list);
+		}
+		OS.g_list_free (display.allChildren);
+		display.allChildren = 0;
+	}
+}
+
+void findMenuHandle() {
+	OS.gtk_container_forall (popupHandle, display.allChildrenProc, 0);
+	if (display.allChildren != 0) {
+	int /*long*/ list = display.allChildren;
+		while (list != 0) {
+		int /*long*/ widget = OS.g_list_data (list);
+		if (OS.G_OBJECT_TYPE (widget) == OS.GTK_TYPE_MENU ()) {
+			menuHandle = widget;
+			break;
+		}
+		list = OS.g_list_next (list);
+	}
+	OS.g_list_free (display.allChildren);
+	display.allChildren = 0;
+	}
+}
+	
 void fixModal (int /*long*/ group, int /*long*/ modalGroup) {
 	if (popupHandle != 0) {
 		if (group != 0) {
@@ -676,7 +708,7 @@ void hookEvents () {
 	}
 	int eventMask =	OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | 
 		OS.GDK_BUTTON_RELEASE_MASK;
- 	int /*long*/ [] handles = new int /*long*/ [] {buttonHandle, entryHandle, listHandle};
+ 	int /*long*/ [] handles = new int /*long*/ [] {buttonHandle, entryHandle, listHandle, menuHandle};
 	for (int i=0; i<handles.length; i++) {
 		int /*long*/ eventHandle = handles [i];
 		if (eventHandle != 0) {
@@ -709,6 +741,8 @@ void hookEvents () {
 		int blockMask =  OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
 		OS.g_signal_handlers_block_matched (imContext, blockMask, id, 0, 0, 0, entryHandle);
 	}
+	
+	if (menuHandle != 0) OS.g_signal_connect_closure(menuHandle, OS.selection_done, display.closures[SELECTION_DONE], true);
 }
 
 int /*long*/ imContext () {
@@ -1105,7 +1139,7 @@ public int getVisibleItemCount () {
 }
 
 int /*long*/ gtk_activate (int /*long*/ widget) {
-	postEvent (SWT.DefaultSelection);
+	sendSelectionEvent (SWT.DefaultSelection);
 	return 0;
 }
 
@@ -1118,7 +1152,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
 		GdkEventButton gdkEvent = new GdkEventButton ();
 		OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
-		if (gdkEvent.type == OS.GDK_BUTTON_PRESS && gdkEvent.button == 1 && (style & SWT.READ_ONLY) != 0) {
+		if (gdkEvent.type == OS.GDK_BUTTON_PRESS && gdkEvent.button == 1) {
 			return gtk_button_press_event(widget, event, false);
 		}
 	}
@@ -1144,7 +1178,8 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 			* item and not matching the item as the user types.
 			*/
 			int index = OS.gtk_combo_box_get_active (handle);
-			if (index != -1) postEvent (SWT.Selection);
+			if (index != -1) sendSelectionEvent (SWT.Selection);
+			indexSelected = -1;
 			return 0;
 		}
 	} else {
@@ -1156,7 +1191,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 			String text = new String (Converter.mbcsToWcs (null, buffer));
 			for (int i = 0; i < items.length; i++) {
 				if (items [i].equals (text)) {
-					postEvent (SWT.Selection);
+					sendSelectionEvent (SWT.Selection);
 					break;
 				}
 			}
@@ -1234,6 +1269,7 @@ int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /
 		return 0;
 	}
 	if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
+	if (end_pos == -1) end_pos = OS.g_utf8_strlen (OS.gtk_entry_get_text (entryHandle), -1);
 	String newText = verifyText ("", (int)/*64*/start_pos, (int)/*64*/end_pos);
 	if (newText == null) {
 		OS.g_signal_stop_emission_by_name (entryHandle, OS.delete_text);
@@ -1272,10 +1308,23 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent)  {
 		OS.memmove (event, gdkEvent, GdkEvent.sizeof);
 		switch (event.type) {
 			case OS.GDK_BUTTON_PRESS: {
+				if (OS.GTK_VERSION < OS.VERSION (2, 8, 0) && !selectionAdded) {
+					int /*long*/ grabHandle = OS.gtk_grab_get_current ();
+					if (grabHandle != 0) {
+						if (OS.G_OBJECT_TYPE (grabHandle) == OS.GTK_TYPE_MENU ()) {
+							menuHandle = grabHandle;
+							OS.g_signal_connect_closure_by_id (menuHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT], false);
+							OS.g_signal_connect_closure_by_id (menuHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT_INVERSE], true);
+							OS.g_signal_connect_closure (menuHandle, OS.selection_done, display.closures [SELECTION_DONE], false);
+							display.addWidget (menuHandle, this);
+							selectionAdded = true;
+						}
+					}
+				}
 				GdkEventButton gdkEventButton = new GdkEventButton ();
 				OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
 				if (gdkEventButton.button == 1) {
-					if ((style & SWT.READ_ONLY) != 0 && !sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
+					if (!sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
 						return 1;
 					}
 					if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
@@ -1358,7 +1407,11 @@ int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*
 
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
 	int /*long*/ result = super.gtk_key_press_event (widget, event);
-	if (result != 0) fixIM ();
+	if (result != 0) {
+	    gdkEventKey = 0;
+	    fixIM ();
+	    return result;
+	}
 	if (gdkEventKey == -1) result = 1;
 	gdkEventKey = 0;
 	if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0) && (style & SWT.READ_ONLY) == 0) {
@@ -1411,6 +1464,16 @@ int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) {
 	return 0;
 }
 
+int /*long*/ gtk_selection_done(int /*long*/ menushell) {
+	int index = OS.gtk_combo_box_get_active (handle);
+	if (indexSelected == -1){
+		indexSelected = index;
+	}
+	else if (index != -1 && indexSelected == index) {
+		sendSelectionEvent (SWT.Selection);
+	}
+	return 0;
+}
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -1511,6 +1574,8 @@ void register () {
 	if (buttonHandle != 0) display.addWidget (buttonHandle, this);
 	if (entryHandle != 0) display.addWidget (entryHandle, this);
 	if (listHandle != 0) display.addWidget (listHandle, this);
+	if (popupHandle != 0) display.addWidget (popupHandle, this);
+	if (menuHandle != 0) display.addWidget (menuHandle, this);
 	int /*long*/ imContext = imContext ();
 	if (imContext != 0) display.addWidget (imContext, this);
 }
@@ -1785,6 +1850,7 @@ void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
 	if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
 		if (entryHandle != 0) OS.gtk_widget_modify_base (entryHandle, 0, color);
+		if (cellHandle != 0) OS.g_object_set (cellHandle, OS.background_gdk, color, 0);
 		OS.g_object_set (textRenderer, OS.background_gdk, color, 0);
 	} else {
 		OS.gtk_widget_modify_base (entryHandle, 0, color);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 62cda31..483032f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java	
@@ -210,6 +210,7 @@ int /*long*/ childStyle () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
+	display.runSkin();
 	if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
 	if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
 	Point size;
@@ -250,7 +251,7 @@ Widget [] computeTabList () {
 }
 
 void createHandle (int index) {
-	state |= HANDLE | CANVAS;
+	state |= HANDLE | CANVAS | CHECK_SUBWINDOW;
 	boolean scrolled = (style & (SWT.H_SCROLL | SWT.V_SCROLL)) != 0;
 	if (!scrolled) state |= THEME_BACKGROUND;
 	createHandle (index, true, scrolled || (style & SWT.BORDER) != 0);
@@ -329,7 +330,37 @@ void deregister () {
 	if (socketHandle != 0) display.removeWidget (socketHandle);
 }
 
-void drawBackground (GC gc, int x, int y, int width, int height) {
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	checkWidget ();
+	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	Control control = findBackgroundControl ();
 	if (control != null) {
 		GCData data = gc.getGCData ();
@@ -338,9 +369,9 @@ void drawBackground (GC gc, int x, int y, int width, int height) {
 			Cairo.cairo_save (cairo);
 			if (control.backgroundImage != null) {
 				Point pt = display.map (this, control, 0, 0);
-				Cairo.cairo_translate (cairo, -pt.x, -pt.y);
-				x += pt.x;
-				y += pt.y;
+				Cairo.cairo_translate (cairo, -pt.x - offsetX, -pt.y - offsetY);
+				x += pt.x + offsetX;
+				y += pt.y + offsetY;
 				int /*long*/ xDisplay = OS.GDK_DISPLAY ();
 				int /*long*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system());
 				int /*long*/ drawable = control.backgroundImage.pixmap;
@@ -373,7 +404,7 @@ void drawBackground (GC gc, int x, int y, int width, int height) {
 			if (control.backgroundImage != null) {
 				Point pt = display.map (this, control, 0, 0);
 				OS.gdk_gc_set_fill (gdkGC, OS.GDK_TILED);
-				OS.gdk_gc_set_ts_origin (gdkGC, -pt.x, -pt.y);
+				OS.gdk_gc_set_ts_origin (gdkGC, -pt.x - offsetX, -pt.y - offsetY);
 				OS.gdk_gc_set_tile (gdkGC, control.backgroundImage.pixmap);
 				OS.gdk_draw_rectangle (data.drawable, gdkGC, 1, x, y, width, height);
 				OS.gdk_gc_set_fill (gdkGC, values.fill);
@@ -951,42 +982,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -1205,6 +1313,15 @@ void removeControl (Control control) {
 	fixTabList (control);
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resizeHandle (int width, int height) {
 	super.resizeHandle (width, height);
 	if (socketHandle != 0) OS.gtk_widget_set_size_request (socketHandle, width, height);
@@ -1380,7 +1497,7 @@ void showWidget () {
 }
 
 boolean checkSubwindow () {
-	return true;
+	return (state & CHECK_SUBWINDOW) != 0;
 }
 
 boolean translateMnemonic (Event event, Control control) {
@@ -1425,6 +1542,7 @@ void updateLayout (boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin();
 		layout.layout (this, changed);
 	}
 	if (all) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index ba399a0..a69add3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java	
@@ -16,7 +16,6 @@ import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
-import org.eclipse.swt.internal.accessibility.gtk.*;
 import org.eclipse.swt.internal.cairo.*;
 import org.eclipse.swt.internal.gtk.*;
 
@@ -29,7 +28,8 @@ import org.eclipse.swt.internal.gtk.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -56,8 +56,7 @@ public abstract class Control extends Widget implements Drawable {
 	String toolTipText;
 	Object layoutData;
 	Accessible accessible;
-	
-	static final String IS_ACTIVE = "org.eclipse.swt.internal.control.isactive"; //$NON-NLS-1$
+	Control labelRelation;
 
 Control () {
 }
@@ -109,6 +108,23 @@ void deregister () {
 	if (imHandle != 0) display.removeWidget (imHandle);
 }
 
+void drawBackground (Control control, int /*long*/ window, int /*long*/ region, int x, int y, int width, int height) {
+	int /*long*/ gdkGC = OS.gdk_gc_new (window);
+	if (region != 0) OS.gdk_gc_set_clip_region (gdkGC, region);
+	if (control.backgroundImage != null) {
+		Point pt = display.map (this, control, 0, 0);
+		OS.gdk_gc_set_fill (gdkGC, OS.GDK_TILED);
+		OS.gdk_gc_set_ts_origin (gdkGC, -pt.x, -pt.y);
+		OS.gdk_gc_set_tile (gdkGC, control.backgroundImage.pixmap);
+		OS.gdk_draw_rectangle (window, gdkGC, 1, x, y, width, height);
+	} else {
+		GdkColor color = control.getBackgroundColor ();
+		OS.gdk_gc_set_foreground (gdkGC, color);
+		OS.gdk_draw_rectangle (window, gdkGC, 1, x, y, width, height);
+	}
+	OS.g_object_unref (gdkGC);
+}
+
 boolean drawGripper (int x, int y, int width, int height, boolean vertical) {
 	int /*long*/ paintHandle = paintHandle ();
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle);
@@ -526,7 +542,7 @@ void createWidget (int index) {
 	checkOrientation (parent);
 	super.createWidget (index);
 	checkBackground ();
-	if ((state & PARENT_BACKGROUND) != 0) setBackground ();
+	if ((state & PARENT_BACKGROUND) != 0) setParentBackground ();
 	checkBuffered ();
 	showWidget ();
 	setInitialBounds ();
@@ -633,6 +649,10 @@ void forceResize () {
  */
 public Accessible getAccessible () {
 	checkWidget ();
+	return _getAccessible ();
+}
+
+Accessible _getAccessible () {
 	if (accessible == null) {
 		accessible = Accessible.internal_new_Accessible (this);
 	}
@@ -1087,6 +1107,7 @@ public void moveAbove (Control control) {
 	if (control != null) {
 		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 		if (parent != control.parent) return;
+		if (this == control) return;
 	}
 	setZOrder (control, true, true);
 }
@@ -1116,6 +1137,7 @@ public void moveBelow (Control control) {
 	if (control != null) {
 		if (control.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT);
 		if (parent != control.parent) return;
+		if (this == control) return;
 	}
 	setZOrder (control, false, true);
 }
@@ -1890,19 +1912,14 @@ public void removePaintListener(PaintListener listener) {
 }
 
 /*
- * Remove "Labelled by" relations from the receiver.
+ * Remove "Labelled by" relation from the receiver.
  */
 void removeRelation () {
 	if (!isDescribedByLabel ()) return;		/* there will not be any */
-	int /*long*/ accessible = OS.gtk_widget_get_accessible (handle);
-	if (accessible == 0) return;
-	int /*long*/ set = ATK.atk_object_ref_relation_set (accessible);
-	int count = ATK.atk_relation_set_get_n_relations (set);
-	for (int i = 0; i < count; i++) {
-		int /*long*/ relation = ATK.atk_relation_set_get_relation (set, 0);
-		ATK.atk_relation_set_remove (set, relation);
+	if (labelRelation != null) {
+		_getAccessible().removeRelation (ACC.RELATION_LABELLED_BY, labelRelation._getAccessible());
+		labelRelation = null;
 	}
-	OS.g_object_unref (set);
 }
 
 /**
@@ -1950,7 +1967,7 @@ public void removeTraverseListener(TraverseListener listener) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1992,7 +2009,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -2269,11 +2286,6 @@ public Cursor getCursor () {
 	return cursor;
 }
 
-public Object getData(String key) {
-	if (key.equals(IS_ACTIVE)) return new Boolean(isActive ());
-	return super.getData(key);
-}
-
 /**
  * Returns <code>true</code> if the receiver is detecting
  * drag gestures, and  <code>false</code> otherwise. 
@@ -2412,6 +2424,11 @@ public Menu getMenu () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -2632,20 +2649,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event, bo
 int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) {
 	GdkEventButton gdkEvent = new GdkEventButton ();
 	OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
-	/*
-	* Feature in GTK.  When button 4, 5, 6, or 7 is released, GTK
-	* does not deliver a corresponding GTK event.  Button 6 and 7
-	* are mapped to buttons 4 and 5 in SWT.  The fix is to change
-	* the button number of the event to a negative number so that
-	* it gets dispatched by GTK.  SWT has been modified to look
-	* for negative button numbers.
-	*/
-	int button = gdkEvent.button;
-	switch (button) {
-		case -6: button = 4; break;
-		case -7: button = 5; break;
-	}
-	return sendMouseEvent (SWT.MouseUp, button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
+	return sendMouseEvent (SWT.MouseUp, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 }
 
 int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) {
@@ -2921,8 +2925,7 @@ int /*long*/ gtk_realize (int /*long*/ widget) {
 		OS.gtk_im_context_set_client_window (imHandle, window);
 	}
 	if (backgroundImage != null) {
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
-		if (window != 0) OS.gdk_window_set_back_pixmap (window, backgroundImage.pixmap, false);
+		setBackgroundPixmap (backgroundImage.pixmap);
 	}
 	return 0;
 }
@@ -2936,9 +2939,9 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		case OS.GDK_SCROLL_DOWN:
 			return sendMouseEvent (SWT.MouseWheel, 0, -3, SWT.SCROLL_LINE, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 		case OS.GDK_SCROLL_LEFT:
-			return sendMouseEvent (SWT.MouseDown, 4, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
+			return sendMouseEvent (SWT.MouseHorizontalWheel, 0, 3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 		case OS.GDK_SCROLL_RIGHT:
-			return sendMouseEvent (SWT.MouseDown, 5, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
+			return sendMouseEvent (SWT.MouseHorizontalWheel, 0, -3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 	}
 	return 0;
 }
@@ -3000,6 +3003,8 @@ void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	checkWidget ();
@@ -3043,6 +3048,8 @@ int /*long*/ imHandle () {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ gdkGC, GCData data) {
 	checkWidget ();
@@ -3285,14 +3292,18 @@ void release (boolean destroy) {
 			if (children [index] == this) break;
 			index++;
 		}
-		if (0 < index && (index + 1) < children.length) {
-			next = children [index + 1];
+		if (index > 0) {
 			previous = children [index - 1];
 		}
+		if (index + 1 < children.length) {
+			next = children [index + 1];
+			next.removeRelation ();
+		}
+		removeRelation ();
 	}
 	super.release (destroy);
 	if (destroy) {
-		if (previous != null) previous.addRelation (next);
+		if (previous != null && next != null) previous.addRelation (next);
 	}
 }
 
@@ -3449,12 +3460,14 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
 }
 
 void setBackground () {
-	if ((state & PARENT_BACKGROUND) != 0 && (state & BACKGROUND) == 0 && backgroundImage == null) {
-		setParentBackground ();
-	} else {
-		setWidgetBackground ();
+	if ((state & BACKGROUND) == 0 && backgroundImage == null) {
+		if ((state & PARENT_BACKGROUND) != 0) {
+			setParentBackground ();
+		} else {
+			setWidgetBackground ();
+		}
+		redrawWidget (0, 0, 0, 0, true, false, false);
 	}
-	redrawWidget (0, 0, 0, 0, true, false, false);
 }
 
 /**
@@ -3507,14 +3520,27 @@ void setBackgroundColor (int /*long*/ handle, GdkColor color) {
 	int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
 	int /*long*/ ptr = OS.gtk_rc_style_get_bg_pixmap_name (style, index);
 	if (ptr != 0) OS.g_free (ptr);
-	String name = color == null ? "<parent>" : "<none>";
-	byte[] buffer = Converter.wcsToMbcs (null, name, true);
-	ptr = OS.g_malloc (buffer.length);
-	OS.memmove (ptr, buffer, buffer.length);
+	ptr = 0;
+	
+	String pixmapName = null;
+	int flags = OS.gtk_rc_style_get_color_flags (style, index);
+	if (color != null) {
+		flags |= OS.GTK_RC_BG;
+		pixmapName = "<none>";
+	} else {
+		flags &= ~OS.GTK_RC_BG;
+		if (backgroundImage == null && (state & PARENT_BACKGROUND) != 0) {
+			pixmapName = "<parent>";
+		}
+	}
+	if (pixmapName != null) {
+		byte[] buffer = Converter.wcsToMbcs (null, pixmapName, true);
+		ptr = OS.g_malloc (buffer.length);
+		OS.memmove (ptr, buffer, buffer.length);
+	}
+	
 	OS.gtk_rc_style_set_bg_pixmap_name (style, index, ptr);
 	OS.gtk_rc_style_set_bg (style, index, color);
-	int flags = OS.gtk_rc_style_get_color_flags (style, index);
-	flags = (color == null) ? flags & ~OS.GTK_RC_BG : flags | OS.GTK_RC_BG;
 	OS.gtk_rc_style_set_color_flags (style, index, flags);
 	modifyStyle (handle, style);
 }
@@ -3561,7 +3587,7 @@ public void setBackgroundImage (Image image) {
 
 void setBackgroundPixmap (int /*long*/ pixmap) {
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
-	if (window != 0) OS.gdk_window_set_back_pixmap (window, backgroundImage.pixmap, false);
+	if (window != 0) OS.gdk_window_set_back_pixmap (window, pixmap, false);
 }
 
 /**
@@ -3933,6 +3959,7 @@ public boolean setParent (Composite parent) {
 	OS.gtk_fixed_move (newParent, topHandle, x, y);
 	this.parent = parent;
 	setZOrder (null, false, true);
+	reskin (SWT.ALL);
 	return true;
 }
 
@@ -4011,6 +4038,9 @@ public void setRedraw (boolean redraw) {
 						OS.GDK_BUTTON2_MOTION_MASK | OS.GDK_BUTTON3_MOTION_MASK;
 					OS.gdk_window_set_events (window, OS.gdk_window_get_events (window) & ~mouseMask);
 					OS.gdk_window_set_back_pixmap (redrawWindow, 0, false);
+					//System.out.println("Redraw " + redrawWindow + " WIndow " + window);
+//					OS.gdk_x11_drawable_get_xid(redrawWindow);
+//					OS.gdk_x11_drawable_get_xid(window);
 					OS.gdk_window_show (redrawWindow);
 				}
 			}
@@ -4248,12 +4278,9 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
 }
 
 void setWidgetBackground  () {
-	if (fixedHandle != 0) {
-		int /*long*/ style = OS.gtk_widget_get_modifier_style (fixedHandle);
-		modifyStyle (fixedHandle, style);
-	}
-	int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
-	modifyStyle (handle, style);
+	GdkColor color = (state & BACKGROUND) != 0 ? getBackgroundColor () : null;
+	if (fixedHandle != 0) setBackgroundColor (fixedHandle, color);
+	setBackgroundColor (handle, color);
 }
 
 boolean showMenu (int x, int y) {
@@ -4312,7 +4339,8 @@ void sort (int [] items) {
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
@@ -4330,6 +4358,180 @@ public boolean traverse (int traversal) {
 	return traverse (event);
 }
 
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	if (traversal == SWT.TRAVERSE_NONE) {
+		switch (keyCode) {
+			case SWT.ESC: {
+				traversal = SWT.TRAVERSE_ESCAPE;
+				doit = true;
+				break;
+			}
+			case SWT.CR: {
+				traversal = SWT.TRAVERSE_RETURN;
+				doit = true;
+				break;
+			}
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_RIGHT: {
+				traversal = SWT.TRAVERSE_ARROW_NEXT;
+				doit = false;
+				break;
+			}
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT: {
+				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+				doit = false;
+				break;
+			}
+			case SWT.TAB: {
+				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+				doit = true;
+				break;
+			}
+			case SWT.PAGE_DOWN: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_NEXT;
+					doit = true;
+				}
+				break;
+			}
+			case SWT.PAGE_UP: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+					doit = true;
+				}
+				break;
+			}
+			default: {
+				if (character != 0 && (stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+					traversal = SWT.TRAVERSE_MNEMONIC;
+					doit = true;
+				}
+				break;
+			}
+		}
+	}
+
+	Event event = new Event ();
+	event.character = character;
+	event.detail = traversal;
+	event.doit = doit;
+	event.keyCode = keyCode;
+	event.keyLocation = keyLocation;
+	event.stateMask = stateMask;
+	Shell shell = getShell ();
+
+	boolean all = false;
+	switch (traversal) {
+		case SWT.TRAVERSE_ESCAPE:
+		case SWT.TRAVERSE_RETURN:
+		case SWT.TRAVERSE_PAGE_NEXT:
+		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+			all = true;
+			// FALL THROUGH
+		}
+		case SWT.TRAVERSE_ARROW_NEXT:
+		case SWT.TRAVERSE_ARROW_PREVIOUS:
+		case SWT.TRAVERSE_TAB_NEXT:
+		case SWT.TRAVERSE_TAB_PREVIOUS: {
+			/* traversal is a valid traversal action */
+			break;
+		}
+		case SWT.TRAVERSE_MNEMONIC: {
+			return translateMnemonic (event, null) || shell.translateMnemonic (event, this);
+		}
+		default: {
+			/* traversal is not a valid traversal action */
+			return false;
+		}
+	}
+
+	Control control = this;
+	do {
+		if (control.traverse (event)) return true;
+		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+		if (control == shell) return false;
+		control = control.parent;
+	} while (all && control != null);
+	return false;
+}
+
 boolean translateMnemonic (Event event, Control control) {
 	if (control == this) return false;
 	if (!isVisible () || !isEnabled ()) return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index 11248e3..e69a998 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java	
@@ -489,7 +489,7 @@ int /*long*/ gtk_day_selected (int /*long*/ widget) {
 }
 
 int /*long*/ gtk_day_selected_double_click (int /*long*/ widget) {
-	postEvent(SWT.DefaultSelection);
+	sendSelectionEvent (SWT.DefaultSelection);
 	return 0;
 }
 
@@ -580,7 +580,7 @@ void onKeyDown(Event event) {
 			setTextField(fieldName, calendar.getActualMaximum(fieldName), true, true);
 			break;
 		case SWT.CR:
-			postEvent(SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 		default:
 			switch (event.character) {
@@ -745,7 +745,7 @@ void sendSelectionEvent () {
 		year = y[0];
 		month = m[0];
 		day = d[0];
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 }
 
@@ -809,7 +809,7 @@ void setField(int fieldName, int value) {
 		calendar.roll(Calendar.HOUR_OF_DAY, 12); // TODO: needs more work for setFormat and locale
 	}
 	calendar.set(fieldName, value);
-	postEvent(SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 }
 
 void setTextField(int fieldName, int value, boolean commit, boolean adjust) {
@@ -1091,7 +1091,7 @@ int unformattedIntValue(int fieldName, String newText, boolean adjust, int max)
 	return newValue;
 }
 
-public void updateControl() {
+void updateControl() {
 	if (text != null) {
 		String string = getFormattedString(style);
 		ignoreVerify = true;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
index 38ed5a2..2e570bf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -292,7 +292,9 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus)
  */
 public Button getDefaultButton () {
 	checkWidget();
-	return defaultButton != null ? defaultButton : saveDefault;
+	Button button = defaultButton != null ? defaultButton : saveDefault;
+	if (button != null && button.isDisposed ()) return null;
+	return button;
 }
 
 /**
@@ -489,6 +491,17 @@ void releaseWidget () {
 	defaultButton = saveDefault = null;
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 boolean restoreFocus () {
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
 	boolean restored = savedFocus != null && savedFocus.setFocus ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index 8b31222..06e08e1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -133,6 +133,10 @@ String openChooserDialog () {
 	} else {
 		handle = OS.gtk_file_chooser_dialog_new (titleBytes, shellHandle, OS.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, OS.GTK_STOCK_OK (), OS.GTK_RESPONSE_OK, OS.GTK_STOCK_CANCEL (), OS.GTK_RESPONSE_CANCEL, 0);
 	}
+	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		int /*long*/ group = OS.gtk_window_get_group(0);
+		OS.gtk_window_group_add_window (group, handle);
+	}
 	OS.gtk_window_set_modal (handle, true);
 	int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
 	if (pixbufs != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 0e1945f..d8ca0ab 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java	
@@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -111,6 +111,7 @@ public class Display extends Device {
 	Callback windowCallback2, windowCallback3, windowCallback4, windowCallback5;
 	EventTable eventTable, filterTable;
 	static String APP_NAME = "SWT"; //$NON-NLS-1$
+	static String APP_VERSION = ""; //$NON-NLS-1$
 	static final String DISPATCH_EVENT_KEY = "org.eclipse.swt.internal.gtk.dispatchEvent"; //$NON-NLS-1$
 	static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
 	int /*long*/ [] closures;
@@ -160,6 +161,10 @@ public class Display extends Device {
 	/* Display Shutdown */
 	Runnable [] disposeList;
 	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
+
 	/* System Tray */
 	Tray tray;
 	
@@ -231,10 +236,12 @@ public class Display extends Device {
 	Callback allChildrenCallback;
 
 	/* Settings callbacks */
-	int /*long*/ styleSetProc;
-	Callback styleSetCallback;
+	int /*long*/ signalProc;
+	Callback signalCallback;
 	int /*long*/ shellHandle;
 	boolean settingsChanged, runSettings;
+	static final int STYLE_SET = 1;
+	static final int PROPERTY_NOTIFY = 2;
 	
 	/* Entry focus behaviour */
 	boolean entrySelectOnFocus;
@@ -280,8 +287,12 @@ public class Display extends Device {
 	int lastEventTime, lastUserEventTime;
 	
 	/* Pango layout constructor */
-	int /*long*/ pangoLayoutNewProc, pangoLayoutNewDefaultProc;
-	Callback pangoLayoutNewCallback;
+	int /*long*/ pangoLayoutNewProc;
+	
+	/* Custom Resize */
+	double resizeLocationX, resizeLocationY;
+	int resizeBoundsX, resizeBoundsY, resizeBoundsWidth, resizeBoundsHeight;
+	int resizeMode;
 	
 	/* Fixed Subclass */
 	static int /*long*/ fixed_type;
@@ -356,6 +367,11 @@ public class Display extends Device {
 		{OS.GDK_F13,		SWT.F13},
 		{OS.GDK_F14,		SWT.F14},
 		{OS.GDK_F15,		SWT.F15},
+		{OS.GDK_F16,		SWT.F16},
+		{OS.GDK_F17,		SWT.F17},
+		{OS.GDK_F18,		SWT.F18},
+		{OS.GDK_F19,		SWT.F19},
+		{OS.GDK_F20,		SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{OS.GDK_KP_Multiply,		SWT.KEYPAD_MULTIPLY},
@@ -391,6 +407,10 @@ public class Display extends Device {
 	static Display Default;
 	static Display [] Displays = new Display [4];
 
+	/* Skinning support */
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
 	/* This code is intentionally commented.
@@ -522,6 +542,16 @@ public void addFilter (int eventType, Listener listener) {
 	filterTable.hook (eventType, listener);
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 void addGdkEvent (int /*long*/ event) {
 	if (gdkEvents == null) {
 		int length = GROW_SIZE;
@@ -623,6 +653,15 @@ void addPopup (Menu menu) {
 	popups [index] = menu;
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 void addWidget (int /*long*/ handle, Widget widget) {
 	if (handle == 0) return;
 	if (freeSlot == -1) {
@@ -960,6 +999,20 @@ void createDisplay (DeviceData data) {
 	filterProc = filterCallback.getAddress ();
 	if (filterProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
 	OS.gdk_window_add_filter  (0, filterProc, 0);
+
+	if (OS.GDK_WINDOWING_X11 ()) {
+		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW (shellHandle));
+		byte[] atomName = Converter.wcsToMbcs (null, "SWT_Window_" + APP_NAME, true); //$NON-NLS-1$
+		int /*long*/ atom = OS.XInternAtom (OS.GDK_DISPLAY (), atomName, false);
+		OS.XSetSelectionOwner (OS.GDK_DISPLAY (), atom, xWindow, OS.CurrentTime);
+		OS.XGetSelectionOwner (OS.GDK_DISPLAY (), atom);
+	}
+
+	signalCallback = new Callback (this, "signalProc", 3); //$NON-NLS-1$
+	signalProc = signalCallback.getAddress ();
+	if (signalProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+	OS.gtk_widget_add_events (shellHandle, OS.GDK_PROPERTY_CHANGE_MASK);
+	OS.g_signal_connect (shellHandle, OS.property_notify_event, signalProc, PROPERTY_NOTIFY);
 }
 
 Image createImage (String name) {
@@ -1204,6 +1257,8 @@ int /*long*/ eventProc (int /*long*/ event, int /*long*/ data) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int /*long*/ handle) {
 	checkDevice ();
@@ -1230,6 +1285,8 @@ public Widget findWidget (int /*long*/ handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
@@ -1474,28 +1531,6 @@ boolean filters (int eventType) {
 }
 
 int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*/ data) {
-	if (data == 0) {
-		/*
-		* Feature in GTK.  When button 4, 5, 6, or 7 is released, GTK
-		* does not deliver a corresponding GTK event.  Button 6 and 7
-		* are mapped to buttons 4 and 5 in SWT.  The fix is to change
-		* the button number of the event to a negative number so that
-		* it gets dispatched by GTK.  SWT has been modified to look
-		* for negative button numbers.
-		*/
-		XButtonEvent mouseEvent = new XButtonEvent ();
-		OS.memmove (mouseEvent, xEvent, 4);
-		if (mouseEvent.type == OS.ButtonRelease) {
-			OS.memmove (mouseEvent, xEvent, XButtonEvent.sizeof);
-			switch (mouseEvent.button) {
-				case 6:
-				case 7:
-					mouseEvent.button = -mouseEvent.button;
-					OS.memmove (xEvent, mouseEvent, XButtonEvent.sizeof);
-					break;
-			}
-		}
-	}
 	Widget widget = getWidget (data);
 	if (widget == null) return 0;
 	return widget.filterProc (xEvent, gdkEvent, data);
@@ -2270,6 +2305,23 @@ public Font getSystemFont () {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	return null;
+}
+
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -2400,7 +2452,9 @@ void initializeCallbacks () {
 	closures [Widget.PREEDIT_CHANGED] = OS.g_cclosure_new (windowProc2, Widget.PREEDIT_CHANGED, 0);
 	closures [Widget.REALIZE] = OS.g_cclosure_new (windowProc2, Widget.REALIZE, 0);
 	closures [Widget.SELECT] = OS.g_cclosure_new (windowProc2, Widget.SELECT, 0);
+	closures [Widget.SELECTION_DONE] = OS.g_cclosure_new (windowProc2, Widget.SELECTION_DONE, 0);
 	closures [Widget.SHOW] = OS.g_cclosure_new (windowProc2, Widget.SHOW, 0);
+	closures [Widget.START_INTERACTIVE_SEARCH] = OS.g_cclosure_new (windowProc2, Widget.START_INTERACTIVE_SEARCH, 0);
 	closures [Widget.VALUE_CHANGED] = OS.g_cclosure_new (windowProc2, Widget.VALUE_CHANGED, 0);
 	closures [Widget.UNMAP] = OS.g_cclosure_new (windowProc2, Widget.UNMAP, 0);
 	closures [Widget.UNREALIZE] = OS.g_cclosure_new (windowProc2, Widget.UNREALIZE, 0);
@@ -2450,6 +2504,7 @@ void initializeCallbacks () {
 
 	closures [Widget.DELETE_RANGE] = OS.g_cclosure_new (windowProc4, Widget.DELETE_RANGE, 0);
 	closures [Widget.DELETE_TEXT] = OS.g_cclosure_new (windowProc4, Widget.DELETE_TEXT, 0);
+	closures [Widget.ICON_RELEASE] = OS.g_cclosure_new (windowProc4, Widget.ICON_RELEASE, 0);
 	closures [Widget.ROW_ACTIVATED] = OS.g_cclosure_new (windowProc4, Widget.ROW_ACTIVATED, 0);
 	closures [Widget.SCROLL_CHILD] = OS.g_cclosure_new (windowProc4, Widget.SCROLL_CHILD, 0);
 	closures [Widget.STATUS_ICON_POPUP_MENU] = OS.g_cclosure_new (windowProc4, Widget.STATUS_ICON_POPUP_MENU, 0);
@@ -2537,22 +2592,16 @@ void initializeCallbacks () {
 
 void initializeSubclasses () {
 	if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
-		pangoLayoutNewCallback = new Callback (this, "pangoLayoutNewProc", 3); //$NON-NLS-1$
-		pangoLayoutNewProc = pangoLayoutNewCallback.getAddress ();
-		if (pangoLayoutNewProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
 		int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
 		int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
-		pangoLayoutNewDefaultProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass);
-		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc);
+		pangoLayoutNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass);
+		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, OS.pangoLayoutNewProc_CALLBACK(pangoLayoutNewProc));
 		OS.g_type_class_unref (pangoLayoutClass);
 	}
 }
 
 void initializeSystemSettings () {
-	styleSetCallback = new Callback (this, "styleSetProc", 3); //$NON-NLS-1$
-	styleSetProc = styleSetCallback.getAddress ();
-	if (styleSetProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
-	OS.g_signal_connect (shellHandle, OS.style_set, styleSetProc, 0);
+	OS.g_signal_connect (shellHandle, OS.style_set, signalProc, STYLE_SET);
 	
 	/*
 	* Feature in GTK.  Despite the fact that the
@@ -2609,6 +2658,8 @@ void initializeWindowManager () {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ gdkGC, GCData data) {
 	OS.g_object_unref (gdkGC);
@@ -2633,6 +2684,8 @@ public void internal_dispose_GC (int /*long*/ gdkGC, GCData data) {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2897,12 +2950,6 @@ int /*long*/ mouseHoverProc (int /*long*/ handle) {
 	return widget.hoverProc (handle);
 }
 
-int /*long*/ pangoLayoutNewProc (int /*long*/ type, int /*long*/ n_construct_properties, int /*long*/ construct_properties) {
-	int /*long*/ layout = OS.Call (pangoLayoutNewDefaultProc, type, (int)/*64*/n_construct_properties, construct_properties);
-	OS.pango_layout_set_auto_dir (layout, false);
-	return layout;
-}
-
 /**
  * Generate a low level system event.
  * 
@@ -3104,6 +3151,8 @@ void putGdkEvents () {
  */
 public boolean readAndDispatch () {
 	checkDevice ();
+	runSkin ();
+	runDeferredLayouts ();
 	boolean events = false;
 	events |= runSettings ();
 	events |= runPopups ();
@@ -3313,18 +3362,16 @@ void releaseDisplay () {
 	shellHandle = 0;
 	
 	/* Dispose the settings callback */
-	styleSetCallback.dispose(); styleSetCallback = null;
-	styleSetProc = 0;
+	signalCallback.dispose(); signalCallback = null;
+	signalProc = 0;
 
 	/* Dispose subclass */
 	if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
 		int /*long*/ pangoLayoutType = OS.PANGO_TYPE_LAYOUT ();
 		int /*long*/ pangoLayoutClass = OS.g_type_class_ref (pangoLayoutType);
-		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewDefaultProc);
+		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc);
 		OS.g_type_class_unref (pangoLayoutClass);
-		pangoLayoutNewCallback.dispose ();
-		pangoLayoutNewCallback = null;
-		pangoLayoutNewDefaultProc = pangoLayoutNewProc = 0;
+		pangoLayoutNewProc = 0;
 	}
 	
 	/* Release the sleep resources */
@@ -3506,6 +3553,21 @@ boolean runDeferredEvents () {
 	return run;
 }
 
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
+
 boolean runPopups () {
 	if (popups == null) return false;
 	boolean result = false;
@@ -3541,11 +3603,66 @@ boolean runSettings () {
 	return true;
 }
 
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+	
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
@@ -3554,6 +3671,17 @@ public static void setAppName (String name) {
 }
 
 /**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
+}
+
+/**
  * Sets the location of the on-screen pointer relative to the top left corner
  * of the screen.  <b>Note: It is typically considered bad practice for a
  * program to move the on-screen pointer location.</b>
@@ -4071,8 +4199,49 @@ int /*long*/ shellMapProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/
 	return widget.shellMapProc (handle, arg0, user_data);
 }
 
-int /*long*/ styleSetProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ user_data) {
-	settingsChanged = true;
+int /*long*/ signalProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ user_data) {
+	switch((int)/*64*/user_data) {
+		case STYLE_SET:
+			settingsChanged = true;
+			break;
+		case PROPERTY_NOTIFY:
+			GdkEventProperty gdkEvent = new GdkEventProperty ();
+			OS.memmove (gdkEvent, arg1);
+			if (gdkEvent.type == OS.GDK_PROPERTY_NOTIFY) {
+				byte[] name = Converter.wcsToMbcs (null, "org.eclipse.swt.filePath.message", true); //$NON-NLS-1$
+				int /*long*/ atom = OS.gdk_x11_atom_to_xatom (OS.gdk_atom_intern (name, true));
+				if (atom == OS.gdk_x11_atom_to_xatom (gdkEvent.atom)) {
+					int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW( shellHandle));
+					int /*long*/ [] type = new int /*long*/ [1];
+					int [] format = new int [1];
+					int [] nitems = new int [1];
+					int [] bytes_after = new int [1];
+					int /*long*/ [] data = new int /*long*/ [1];
+					OS.XGetWindowProperty (OS.GDK_DISPLAY (), xWindow, atom, 0, -1, true, OS.AnyPropertyType,
+							type, format, nitems, bytes_after, data);
+					
+					if (nitems [0] > 0) {
+						byte [] buffer = new byte [nitems [0]];
+						OS.memmove(buffer, data [0], buffer.length);
+						OS.XFree (data [0]);
+						char[] chars = Converter.mbcsToWcs(null, buffer);
+						String string = new String (chars);
+						
+						int lastIndex = 0;
+						int index = string.indexOf (':');
+						while (index != -1) {
+							String file = string.substring (lastIndex, index);
+							Event event = new Event ();
+							event.text = file;
+							sendEvent (SWT.OpenDocument, event);
+							lastIndex = index+1;
+							index = string.indexOf(':', lastIndex);
+						}
+					}
+				}
+			}
+			break;
+	}
 	return 0;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index b3584f8..ec6e586 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java	
@@ -408,6 +408,7 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event)
 }
 
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
 	if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) {
 		GdkEventExpose gdkEvent = new GdkEventExpose ();
 		OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof);
@@ -601,6 +602,16 @@ public void removeExpandListener (ExpandListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ExpandItem item = items [i];
+			if (item != null ) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
 	int result = super.setBounds (x, y, width, height, move, resize);
 	if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
index e322326..1dd6921 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@ public class FileDialog extends Dialog {
 	int /*long*/ handle;
 	static final char SEPARATOR = System.getProperty ("file.separator").charAt (0);
 	static final char EXTENSION_SEPARATOR = ';';
+	static final char FILE_EXTENSION_SEPARATOR = '.';
 	
 /**
  * Constructs a new instance of this class given only its parent.
@@ -101,7 +102,7 @@ public FileDialog (Shell parent, int style) {
 String computeResultChooserDialog () {
 	/* MULTI is only valid if the native dialog's action is Open */
 	fullPath = null;
-	if ((style & (SWT.SAVE | SWT.MULTI)) == SWT.MULTI) {
+	if ((style & SWT.MULTI) != 0) {
 		int /*long*/ list = 0;
 		if (uriMode) {
 			list = OS.gtk_file_chooser_get_uris (handle);
@@ -197,9 +198,24 @@ String computeResultChooserDialog () {
 		int separatorIndex = fullPath.lastIndexOf (SEPARATOR);
 		fileName = fullPath.substring (separatorIndex + 1);
 		filterPath = fullPath.substring (0, separatorIndex);
+		int fileExtensionIndex = fileName.indexOf(FILE_EXTENSION_SEPARATOR);
+		if ((style & SWT.SAVE) != 0 && fileExtensionIndex == -1 && filterIndex != -1) {
+			if (filterExtensions.length > filterIndex) {
+				String selection = filterExtensions [filterIndex];
+				int length = selection.length ();
+				int index = selection.indexOf (EXTENSION_SEPARATOR);
+				if (index == -1) index = length;
+				String extension = selection.substring (0, index).trim ();
+				if (!extension.equals ("*") && !extension.equals ("*.*")) {
+					if (extension.startsWith ("*.")) extension = extension.substring (1);
+					fullPath = fullPath + extension;
+				}	
+			}
+		}
 	}
 	return fullPath;
 }
+
 String computeResultClassicDialog () {
 	filterIndex = -1;
 	GtkFileSelection selection = new GtkFileSelection ();
@@ -248,7 +264,6 @@ String computeResultClassicDialog () {
 	OS.g_free (utf16Ptr);
 	OS.g_free (utf8Ptr);
 
-	if (osAnswer == null) return null;
 	int separatorIndex = osAnswer.lastIndexOf (SEPARATOR);
 	if (separatorIndex+1 == osAnswer.length ()) return null;
 	
@@ -399,6 +414,10 @@ String openChooserDialog () {
 		handle = OS.gtk_file_chooser_dialog_new (titleBytes, shellHandle, action, OS.GTK_STOCK_OK (), OS.GTK_RESPONSE_OK, OS.GTK_STOCK_CANCEL (), OS.GTK_RESPONSE_CANCEL, 0);
 	}
 	OS.gtk_window_set_modal (handle, true);
+	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		int /*long*/ group = OS.gtk_window_get_group(0);
+		OS.gtk_window_group_add_window (group, handle);
+	}
 	int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
 	if (pixbufs != 0) {
 		OS.gtk_window_set_icon_list (handle, pixbufs);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java
index d2c7d32..8ba5db6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -148,6 +148,10 @@ public FontData open () {
 			OS.g_list_free (pixbufs);
 		}
 	}
+	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		int /*long*/ group = OS.gtk_window_get_group(0);
+		OS.gtk_window_group_add_window (group, handle);
+	}
 	OS.gtk_window_set_modal (handle, true);
 	if (fontData != null) {
 		Font font = new Font (display, fontData);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
index 82ec5be..7d5b03a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.swt.widgets;
 import org.eclipse.swt.*;
 import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gtk.*;
+import org.eclipse.swt.accessibility.*;
 import org.eclipse.swt.graphics.*;
 
 /**
@@ -108,11 +109,8 @@ static int checkStyle (int style) {
 void addRelation (Control control) {
 	if (!control.isDescribedByLabel ()) return;
 	if (labelHandle == 0) return;
-	int /*long*/ accessible = OS.gtk_widget_get_accessible (labelHandle);
-	int /*long*/ controlAccessible = OS.gtk_widget_get_accessible (control.handle);
-	if (accessible != 0 && controlAccessible != 0) {
-		OS.atk_object_add_relationship (controlAccessible, OS.ATK_RELATION_LABELLED_BY, accessible);
-	}
+	control._getAccessible().addRelation(ACC.RELATION_LABELLED_BY, _getAccessible());
+	control.labelRelation = this;
 }
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 265b3dc..6495b79 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java	
@@ -337,7 +337,7 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event)
 			if (rect.contains (x, y)) {
 				Event ev = new Event ();
 				ev.text = ids [focusIndex];
-				sendEvent (SWT.Selection, ev);
+				sendSelectionEvent (SWT.Selection, ev, true);
 				return result;
 			}
 		}
@@ -410,7 +410,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		case OS.GDK_space:
 			Event event = new Event ();
 			event.text = ids [focusIndex];
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			break;
 		case OS.GDK_Tab:
 			if (focusIndex < offsets.length - 1) {
@@ -465,6 +465,38 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
 	return result;
 }
 
+boolean mnemonicHit (char key) {
+	char uckey = Character.toUpperCase (key);
+	String parsedText = layout.getText();
+	for (int i = 0; i < mnemonics.length - 1; i++) {
+		if (mnemonics[i] != -1) {
+			char mnemonic = parsedText.charAt(mnemonics[i]);
+			if (uckey == Character.toUpperCase (mnemonic)) {
+				if (!setFocus ()) return false;
+				focusIndex = i;
+				redraw ();
+				return  true;
+			}
+		}
+	}
+	return false;
+}
+
+boolean mnemonicMatch (char key) {
+	char uckey = Character.toUpperCase (key);
+	String parsedText = layout.getText();
+	for (int i = 0; i < mnemonics.length - 1; i++) {
+		if (mnemonics[i] != -1) {
+			char mnemonic = parsedText.charAt(mnemonics[i]);
+			if (uckey == Character.toUpperCase (mnemonic)) { 
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
+
 void releaseWidget () {
 	super.releaseWidget ();
 	if (layout != null)	layout.dispose ();
@@ -680,6 +712,18 @@ void setFontDescription (int /*long*/ font) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index b1df97f..064475d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java	
@@ -715,7 +715,7 @@ public int getTopIndex () {
 }
 
 int /*long*/ gtk_changed (int /*long*/ widget) {
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return 0;
 }
 
@@ -790,7 +790,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
 		switch (key) {
 			case OS.GDK_Return:
 			case OS.GDK_KP_Enter: {
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 				break;
 			}
 		}
@@ -813,7 +813,7 @@ int /*long*/ gtk_popup_menu (int /*long*/ widget) {
 }
 
 int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long*/ column) {
-	postEvent (SWT.DefaultSelection);
+	sendSelectionEvent (SWT.DefaultSelection);
 	return 0;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
index 5e042a6..e585ee1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java	
@@ -834,6 +834,15 @@ public void removeHelpListener (HelpListener listener) {
 	eventTable.unhook (SWT.Help, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 boolean sendHelpEvent (int /*long*/ helpType) {
 	if (selectedItem != null && !selectedItem.isDisposed()) {
 		if (selectedItem.hooks (SWT.Help)) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index d676e46..d98c282 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java	
@@ -197,7 +197,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -411,31 +417,12 @@ int /*long*/ gtk_activate (int /*long*/ widget) {
 	* activate signals when an ancestor menu is disabled.
 	*/
 	if (!isEnabled ()) return 0;
-	Event event = new Event ();
-	int /*long*/ ptr = OS.gtk_get_current_event ();
-	if (ptr != 0) {
-		GdkEvent gdkEvent = new GdkEvent ();
-		OS.memmove (gdkEvent, ptr, GdkEvent.sizeof);
-		switch (gdkEvent.type) {
-			case OS.GDK_KEY_PRESS:
-			case OS.GDK_KEY_RELEASE: 
-			case OS.GDK_BUTTON_PRESS:
-			case OS.GDK_2BUTTON_PRESS: 
-			case OS.GDK_BUTTON_RELEASE: {
-				int [] state = new int [1];
-				OS.gdk_event_get_state (ptr, state);
-				setInputState (event, state [0]);
-				break;
-			}
-		}
-		OS.gdk_event_free (ptr);
-	}
 	if ((style & SWT.RADIO) != 0) {
 		if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) {
 			selectRadio ();
 		}
 	}
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection);
 	return 0;
 }
 
@@ -593,6 +580,12 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.Selection, listener);
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
 void selectRadio () {
 	int index = 0;
 	MenuItem [] items = parent.getItems ();
@@ -765,7 +758,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java
index 3d1cfd1..2a74df6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -167,6 +167,16 @@ public int open () {
 	OS.gtk_window_set_title(handle,buffer);
 	display.addIdleProc ();
 	Dialog oldModal = null;
+	/*
+	* In order to allow the dialog to be modal of it's
+	* parent shells, it is required to assign the 
+	* dialog to the same window group as of the shells.
+	*/
+	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		int /*long*/ group = OS.gtk_window_get_group(0);
+		OS.gtk_window_group_add_window (group, handle);
+	}
+	
 	if (OS.gtk_window_get_modal (handle)) {
 		oldModal = display.getModalDialog ();
 		display.setModalDialog (this);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java
index 4c5d29c..b2747da 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java	
@@ -193,7 +193,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr)
 		event.detail = SWT.DRAG;
 	}
 	if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width  - event.x;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return 0;
 	if (event.doit) {
 		dragging = true;
@@ -229,7 +229,7 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPt
 	event.height = height;
 	drawBand (lastX, lastY, width, height);
 	if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width  - event.x;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return result;
 	if (event.doit) {
 		if ((style & SWT.SMOOTH) != 0) {
@@ -300,7 +300,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			event.width = width;
 			event.height = height;
 			if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width  - event.x;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 			if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME);
 			if (isDisposed ()) break;
 			
@@ -373,7 +373,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
 		event.detail = SWT.DRAG;
 	}
 	if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth() - width  - event.x;
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return 0;
 	if (event.doit) {
 		lastX = event.x;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java
index 47e6ebb..8784f03 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java	
@@ -240,7 +240,7 @@ public int getSelection () {
 }
 
 int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
-	postEvent (SWT.Selection);
+	sendSelectionEvent  (SWT.Selection);
 	return 0;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java
index b2fcd24..07580ec 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java	
@@ -306,8 +306,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -326,6 +325,109 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	int slider_start = OS.GTK_RANGE_SLIDER_START (handle);
+	int slider_end = OS.GTK_RANGE_SLIDER_END (handle);
+	int x, y, width, height;
+	if ((style & SWT.VERTICAL) != 0) {
+		x = OS.GTK_WIDGET_X (handle);
+		y = slider_start;
+		width = OS.GTK_WIDGET_WIDTH (handle);
+		height = slider_end - slider_start;
+	} else {
+		x = slider_start;
+		y = OS.GTK_WIDGET_Y (handle);
+		width = slider_end - slider_start;
+		height = OS.GTK_WIDGET_HEIGHT (handle);
+	}
+	Rectangle rect = new Rectangle(x, y, width, height);
+	int [] origin_x = new int [1], origin_y = new int [1];
+	int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.scrolledHandle);
+	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
+	rect.x += origin_x [0];
+	rect.y += origin_y [0];
+	window = OS.GTK_WIDGET_WINDOW (parent.handle);
+	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
+	rect.x -= origin_x [0];
+	rect.y -= origin_y [0];
+	return rect;
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	int x = 0, y = 0, width, height;
+	boolean hasA = OS.GTK_RANGE_HAS_STEPPER_A (handle);
+	boolean hasB = OS.GTK_RANGE_HAS_STEPPER_B (handle);
+	boolean hasC = OS.GTK_RANGE_HAS_STEPPER_C (handle);
+	boolean hasD = OS.GTK_RANGE_HAS_STEPPER_D (handle);
+	if ((style & SWT.VERTICAL) != 0) {
+		int stepperSize = OS.GTK_WIDGET_WIDTH (handle);
+		x = OS.GTK_WIDGET_X (handle);
+		if (hasA) y += stepperSize;
+		if (hasB) y += stepperSize;
+		width = OS.GTK_WIDGET_WIDTH (handle);
+		height = OS.GTK_WIDGET_HEIGHT (handle) - y;
+		if (hasC) height -= stepperSize;
+		if (hasD) height -= stepperSize;
+		if (height < 0) {
+			y = OS.GTK_RANGE_SLIDER_START (handle);
+			height = 0;
+		}
+	} else {
+		int stepperSize = OS.GTK_WIDGET_HEIGHT (handle);
+		if (hasA) x += stepperSize;
+		if (hasB) x += stepperSize;
+		y = OS.GTK_WIDGET_Y (handle);
+		width = OS.GTK_WIDGET_WIDTH (handle) - x;
+		if (hasC) width -= stepperSize;
+		if (hasD) width -= stepperSize;
+		height = OS.GTK_WIDGET_HEIGHT (handle);
+		if (width < 0) {
+			x = OS.GTK_RANGE_SLIDER_START (handle);
+			width = 0;
+		}
+	}
+	Rectangle rect = new Rectangle(x, y, width, height);
+	int [] origin_x = new int [1], origin_y = new int [1];
+	int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.scrolledHandle);
+	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
+	rect.x += origin_x [0];
+	rect.y += origin_y [0];
+	window = OS.GTK_WIDGET_WINDOW (parent.handle);
+	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
+	rect.x -= origin_x [0];
+	rect.y -= origin_y [0];
+	return rect;
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -390,7 +492,7 @@ int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
 	}
 	detail = OS.GTK_SCROLL_NONE;
 	if (!dragSent) detail = OS.GTK_SCROLL_NONE;
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, false);
 	parent.updateScrollBarValue (this);
 	return 0;
 }
@@ -406,9 +508,9 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 				if (!dragSent) {
 					Event event = new Event ();
 					event.detail = SWT.DRAG;
-					postEvent (SWT.Selection, event);
+					sendSelectionEvent (SWT.Selection, event, false);
 				}
-				postEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection);
 			}
 			detail = OS.GTK_SCROLL_NONE;
 			dragSent = false;
@@ -670,10 +772,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
index ab33045..e349be0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java	
@@ -276,6 +276,12 @@ int hScrollBarWidth() {
 	return requisition.height + spacing;
 }
 
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 boolean sendLeaveNotify () {
 	return scrolledHandle != 0;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 09fda10..b1d93b6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,6 +125,7 @@ public class Shell extends Decorations {
 	ToolTip [] toolTips;
 
 	static final int MAXIMUM_TRIM = 128;
+	static final int BORDER = 3;
 
 /**
  * Constructs a new instance of this class. This is equivalent
@@ -275,6 +276,7 @@ Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean em
 			state |= FOREIGN_HANDLE;
 		}
 	}
+	reskinWidget();
 	createWidget (0);
 }
 
@@ -375,6 +377,8 @@ public static Shell gtk_new (Display display, int /*long*/ handle) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int /*long*/ handle) {
@@ -384,7 +388,7 @@ public static Shell internal_new (Display display, int /*long*/ handle) {
 static int checkStyle (Shell parent, int style) {
 	style = Decorations.checkStyle (style);
 	style &= ~SWT.TRANSPARENT;
-	if ((style & SWT.ON_TOP) != 0) style &= ~SWT.SHELL_TRIM;
+	if ((style & SWT.ON_TOP) != 0) style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX);
 	int mask = SWT.SYSTEM_MODAL | SWT.APPLICATION_MODAL | SWT.PRIMARY_MODAL;
 	if ((style & SWT.SHEET) != 0) {
 		style &= ~SWT.SHEET;
@@ -620,6 +624,9 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
 		border = OS.gtk_container_get_border_width (shellHandle);
 	}
+	if (isCustomResize ()) {
+		border = OS.gtk_container_get_border_width (shellHandle);
+	}
 	int trimWidth = trimWidth (), trimHeight = trimHeight ();
 	trim.x -= (trimWidth / 2) + border;
 	trim.y -= trimHeight - (trimWidth / 2) + border;
@@ -679,6 +686,9 @@ void createHandle (int index) {
 			OS.gtk_style_get_black (OS.gtk_widget_get_style (shellHandle), color);
 			OS.gtk_widget_modify_bg (shellHandle,  OS.GTK_STATE_NORMAL, color);
 		}
+		if (isCustomResize ()) {
+			OS.gtk_container_set_border_width (shellHandle, BORDER);
+		} 
 	} else {
 		vboxHandle = OS.gtk_bin_get_child (shellHandle);
 		if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -718,6 +728,10 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
 						display.activeShell = this;
 						display.activePending = false;
 						sendEvent (SWT.Activate);
+						if (isDisposed ()) return 0;
+						if (isCustomResize ()) {
+							OS.gdk_window_invalidate_rect (OS.GTK_WIDGET_WINDOW (shellHandle), null, false);
+						}
 						break;
 				}
 			} 
@@ -736,6 +750,10 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
 							display.activeShell = null;
 							display.activePending = false;
 						}
+						if (isDisposed ()) return 0;
+						if (isCustomResize ()) {
+							OS.gdk_window_invalidate_rect (OS.GTK_WIDGET_WINDOW (shellHandle), null, false);
+						}
 						break;
 				}
 			}
@@ -768,6 +786,14 @@ void hookEvents () {
 	OS.g_signal_connect_closure (shellHandle, OS.move_focus, display.closures [MOVE_FOCUS], false);
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
 	OS.gdk_window_add_filter  (window, display.filterProc, shellHandle);
+	if (isCustomResize ()) {
+		int mask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_BUTTON_PRESS_MASK |  OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK;
+		OS.gtk_widget_add_events (shellHandle, mask);
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [EXPOSE_EVENT], 0, display.closures[EXPOSE_EVENT], false);
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.closures [LEAVE_NOTIFY_EVENT], false);
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.closures [MOTION_NOTIFY_EVENT], false);
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT], false);
+	}
 }
 
 public boolean isEnabled () {
@@ -781,6 +807,10 @@ boolean isUndecorated () {
 		(style & (SWT.NO_TRIM | SWT.ON_TOP)) != 0;
 }
 
+boolean isCustomResize () {
+	return (style & SWT.NO_TRIM) == 0 && (style & (SWT.RESIZE | SWT.ON_TOP)) == (SWT.RESIZE | SWT.ON_TOP);
+}
+
 public boolean isVisible () {
 	checkWidget();
 	return getVisible ();
@@ -876,6 +906,31 @@ public int getAlpha () {
 	return 255;  
 }
 
+int getResizeMode (double x, double y) {
+	int width = OS.GTK_WIDGET_WIDTH (shellHandle);
+	int height = OS.GTK_WIDGET_HEIGHT (shellHandle);
+	int border = OS.gtk_container_get_border_width (shellHandle);
+	int mode = 0;
+	if (y >= height - border) {
+		mode = OS.GDK_BOTTOM_SIDE ;
+		if (x >= width - border - 16) mode = OS.GDK_BOTTOM_RIGHT_CORNER;
+		else if (x <= border + 16) mode = OS.GDK_BOTTOM_LEFT_CORNER;
+	} else if (x >= width - border) {
+		mode = OS.GDK_RIGHT_SIDE;
+		if (y >= height - border - 16) mode = OS.GDK_BOTTOM_RIGHT_CORNER;
+		else if (y <= border + 16) mode = OS.GDK_TOP_RIGHT_CORNER;
+	} else if (y <= border) {
+		mode = OS.GDK_TOP_SIDE;
+		if (x <= border + 16) mode = OS.GDK_TOP_LEFT_CORNER;
+		else if (x >= width - border - 16) mode = OS.GDK_TOP_RIGHT_CORNER;
+	} else if (x <= border) {
+		mode = OS.GDK_LEFT_SIDE;
+		if (y <= border + 16) mode = OS.GDK_TOP_LEFT_CORNER;
+		else if (y >= height - border - 16) mode = OS.GDK_BOTTOM_LEFT_CORNER;
+	}
+	return mode;
+}
+
 /**
  * Returns <code>true</code> if the receiver is currently
  * in fullscreen state, and false otherwise. 
@@ -1070,6 +1125,30 @@ public Shell [] getShells () {
 	return result;
 }
 
+int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget == shellHandle) {
+		if (isCustomResize ()) {
+			if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+				forceActive ();
+			}
+			GdkEventButton gdkEvent = new GdkEventButton ();
+			OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
+			if (gdkEvent.button == 1) {
+				display.resizeLocationX = gdkEvent.x_root;
+				display.resizeLocationY = gdkEvent.y_root;
+				int [] x = new int [1], y = new int [1];
+				OS.gtk_window_get_position (shellHandle, x, y);
+				display.resizeBoundsX = x [0];
+				display.resizeBoundsY = y [0];
+				display.resizeBoundsWidth = OS.GTK_WIDGET_WIDTH (shellHandle);
+				display.resizeBoundsHeight = OS.GTK_WIDGET_HEIGHT (shellHandle);
+			}
+		}
+		return 0;
+	}
+	return super.gtk_button_press_event (widget, event);
+}
+
 int /*long*/ gtk_configure_event (int /*long*/ widget, int /*long*/ event) {
 	int [] x = new int [1], y = new int [1];
 	OS.gtk_window_get_position (shellHandle, x, y);
@@ -1095,6 +1174,36 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
 
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget == shellHandle) {
+		if (isCustomResize ()) {
+			GdkEventExpose gdkEventExpose = new GdkEventExpose ();
+			OS.memmove (gdkEventExpose, event, GdkEventExpose.sizeof);
+			int /*long*/ style = OS.gtk_widget_get_style (widget);
+			int /*long*/ window = OS.GTK_WIDGET_WINDOW (widget);
+			int [] width = new int [1];
+			int [] height = new int [1];
+			OS.gdk_drawable_get_size (window, width, height);
+			GdkRectangle area = new GdkRectangle ();
+			area.x = gdkEventExpose.area_x;
+			area.y = gdkEventExpose.area_y;
+			area.width = gdkEventExpose.area_width;
+			area.height = gdkEventExpose.area_height;
+			byte [] detail = Converter.wcsToMbcs (null, "base", true); //$NON-NLS-1$
+			int border = OS.gtk_container_get_border_width (widget);
+			int state = display.activeShell == this ? OS.GTK_STATE_SELECTED : OS.GTK_STATE_PRELIGHT;
+			OS.gtk_paint_flat_box (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, 0, 0, width [0], border);
+			OS.gtk_paint_flat_box (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, 0, height [0] - border, width [0], border);
+			OS.gtk_paint_flat_box (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, 0, border, border, height [0] - border - border);
+			OS.gtk_paint_flat_box (style, window, state, OS.GTK_SHADOW_NONE, area, widget, detail, width [0] - border, border, border, height [0] - border - border);
+			OS.gtk_paint_box (style, window, state, OS.GTK_SHADOW_OUT, area, widget, detail, 0, 0, width [0], height [0]);
+			return 1;
+		}
+		return 0;
+	}
+	return super.gtk_expose_event (widget, event);
+}
+
 int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) {
 	switch ((int)/*64*/directionType) {
 		case OS.GTK_DIR_TAB_FORWARD:
@@ -1112,6 +1221,22 @@ int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) {
 	return super.gtk_focus (widget, directionType);
 }
 
+int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget == shellHandle) {
+		if (isCustomResize ()) {
+			GdkEventCrossing gdkEvent = new GdkEventCrossing ();
+			OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof);
+			if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) == 0) {
+				int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+				OS.gdk_window_set_cursor (window, 0);
+				display.resizeMode = 0;
+			}
+		}
+		return 0;
+	}
+	return super.gtk_leave_notify_event (widget, event);
+}
+
 int /*long*/ gtk_move_focus (int /*long*/ widget, int /*long*/ directionType) {
 	Control control = display.getFocusControl ();
 	if (control != null) {
@@ -1122,6 +1247,78 @@ int /*long*/ gtk_move_focus (int /*long*/ widget, int /*long*/ directionType) {
 	return 1;
 }
 
+int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget == shellHandle) {
+		if (isCustomResize ()) {
+			GdkEventMotion gdkEvent = new GdkEventMotion ();
+			OS.memmove (gdkEvent, event, GdkEventMotion.sizeof);
+			if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) != 0) {
+				int border = OS.gtk_container_get_border_width (shellHandle);
+				int dx = (int)(gdkEvent.x_root - display.resizeLocationX);
+				int dy = (int)(gdkEvent.y_root - display.resizeLocationY);
+				int x = display.resizeBoundsX;
+				int y = display.resizeBoundsY;
+				int width = display.resizeBoundsWidth;
+				int height = display.resizeBoundsHeight;
+				int newWidth = Math.max(width - dx, Math.max(minWidth, border + border));
+				int newHeight = Math.max(height - dy, Math.max(minHeight, border + border));
+				switch (display.resizeMode) {
+					case OS.GDK_LEFT_SIDE:
+						x += width - newWidth;
+						width = newWidth;
+						break;
+					case OS.GDK_TOP_LEFT_CORNER:
+						x += width - newWidth;
+						width = newWidth;
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.GDK_TOP_SIDE:
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.GDK_TOP_RIGHT_CORNER:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.GDK_RIGHT_SIDE:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						break;
+					case OS.GDK_BOTTOM_RIGHT_CORNER:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+					case OS.GDK_BOTTOM_SIDE:
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+					case OS.GDK_BOTTOM_LEFT_CORNER:
+						x += width - newWidth;
+						width = newWidth;
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+				}
+				if (x != display.resizeBoundsX || y != display.resizeBoundsY) {
+					OS.gdk_window_move_resize (OS.GTK_WIDGET_WINDOW (shellHandle), x, y, width, height);
+				} else {
+					OS.gtk_window_resize (shellHandle, width, height);
+				}
+			} else {
+				int mode = getResizeMode (gdkEvent.x, gdkEvent.y);
+				if (mode != display.resizeMode) {
+					int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+					int /*long*/ cursor = OS.gdk_cursor_new (mode);
+					OS.gdk_window_set_cursor (window, cursor);
+					OS.gdk_cursor_destroy (cursor);
+					display.resizeMode = mode;
+				}
+			}
+		}
+		return 0;
+	}
+	return super.gtk_motion_notify_event (widget, event);
+}
+
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
 	/* Stop menu mnemonics when the shell is disabled */
 	if (widget == shellHandle) {
@@ -1260,6 +1457,21 @@ void removeTooTip (ToolTip toolTip) {
 	}
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	if (toolTips != null) {
+		for (int i=0; i<toolTips.length; i++) {
+			ToolTip toolTip = toolTips [i];
+			if (toolTip != null) toolTip.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * If the receiver is visible, moves it to the top of the 
  * drawing order for the display on which it was created 
@@ -1406,7 +1618,11 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	if (resize) {
 		width = Math.max (1, Math.max (minWidth, width - trimWidth ()));
 		height = Math.max (1, Math.max (minHeight, height - trimHeight ()));
-		if ((style & SWT.RESIZE) != 0) OS.gtk_window_resize (shellHandle, width, height);
+		/*
+		* If the shell is created without a RESIZE style bit, and the
+		* minWidth/minHeight has been set, allow the resize.
+		*/
+		if ((style & SWT.RESIZE) != 0 || (minHeight != 0 || minWidth != 0)) OS.gtk_window_resize (shellHandle, width, height);
 		boolean changed = width != oldWidth || height != oldHeight;
 		if (changed) {
 			oldWidth = width;
@@ -1842,7 +2058,18 @@ int /*long*/ shellMapProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/
 }
 
 void showWidget () {
-	if ((state & FOREIGN_HANDLE) != 0) return;
+	if ((state & FOREIGN_HANDLE) != 0) {
+		/*
+		* In case of foreign handles, activeShell might not be initialised as 
+		* no focusIn events are generated on the window until the window loses
+		* and gain focus.
+		*/
+		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0) && OS.gtk_window_is_active (shellHandle)) {
+			display.activeShell = this;
+			display.activePending = true;
+		}
+		return;
+	}
 	OS.gtk_container_add (shellHandle, vboxHandle);
 	if (scrolledHandle != 0) OS.gtk_widget_show (scrolledHandle);
 	if (handle != 0) OS.gtk_widget_show (handle);
@@ -1918,13 +2145,27 @@ int trimWidth () {
 }
 
 void updateModal () {
+	if (OS.GTK_IS_PLUG (shellHandle)) return;
 	int /*long*/ group = 0;
+	boolean isModalShell = false;
 	if (display.getModalDialog () == null) {
 		Shell modal = getModalShell ();
 		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
 		Composite shell = null;
 		if (modal == null) {
-			if ((style & mask) != 0) shell = this;
+			if ((style & mask) != 0) {
+				shell = this;
+				/*
+				* Feature in GTK. If a modal shell is reassigned to
+				* a different group, then it's modal state is not.
+				* persisted against the new group. 
+				* The fix is to reset the modality before it is changed
+				* into a different group and then, set back after it
+				* assigned into new group.
+				*/
+				isModalShell = OS.gtk_window_get_modal (shellHandle);
+				if (isModalShell) OS.gtk_window_set_modal (shellHandle, false);
+			}
 		} else {
 			shell = modal;
 		}
@@ -1947,6 +2188,7 @@ void updateModal () {
 	}
 	if (group != 0) {
 		OS.gtk_window_group_add_window (group, shellHandle);
+		if (isModalShell) OS.gtk_window_set_modal (shellHandle, true);
 	} else {
 		if (modalGroup != 0) {
 			OS.gtk_window_group_remove_window (modalGroup, shellHandle);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java
index 61d636b..957b792 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java	
@@ -210,7 +210,7 @@ int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
 		case OS.GTK_SCROLL_STEP_BACKWARD:	event.detail = SWT.ARROW_UP; break;
 	}
 	if (!dragSent) detail = OS.GTK_SCROLL_NONE;
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, false);
 	return 0;
 }
 
@@ -225,9 +225,9 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 				if (!dragSent) {
 					Event event = new Event ();
 					event.detail = SWT.DRAG;
-					postEvent (SWT.Selection, event);
+					sendSelectionEvent (SWT.Selection, event, false);
 				}
-				postEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection);
 			}
 			detail = OS.GTK_SCROLL_NONE;
 			dragSent = false;
@@ -365,8 +365,7 @@ public int getSelection () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -538,10 +537,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java
index b08c147..d8c0dd1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java	
@@ -47,6 +47,7 @@ public class Spinner extends Composite {
 	int lastEventTime = 0;
 	int /*long*/ gdkEventKey = 0;
 	int fixStart = -1, fixEnd = -1;
+	double climbRate = 1;
 	
 	/**
 	 * the operating system limit for the number of characters
@@ -292,7 +293,7 @@ void createHandle (int index) {
 	OS.gtk_fixed_set_has_window (fixedHandle, true);
 	int /*long*/ adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
 	if (adjustment == 0) error (SWT.ERROR_NO_HANDLES);
-	handle = OS.gtk_spin_button_new (adjustment, 1, 0);
+	handle = OS.gtk_spin_button_new (adjustment, climbRate, 0);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (fixedHandle, handle);
 	OS.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0);
@@ -559,7 +560,7 @@ String getDecimalSeparator () {
 }
 
 int /*long*/ gtk_activate (int /*long*/ widget) {
-	postEvent (SWT.DefaultSelection);
+	sendSelectionEvent (SWT.DefaultSelection);
 	return 0;
 }
 
@@ -646,6 +647,7 @@ int /*long*/ gtk_commit (int /*long*/ imContext, int /*long*/ text) {
 
 int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) {
 	if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
+	if (end_pos == -1) end_pos = OS.g_utf8_strlen (OS.gtk_entry_get_text (handle), -1);
 	String newText = verifyText ("", (int)/*64*/start_pos, (int)/*64*/end_pos);
 	if (newText == null) {
 		OS.g_signal_stop_emission_by_name (handle, OS.delete_text);
@@ -733,7 +735,7 @@ int /*long*/ gtk_populate_popup (int /*long*/ widget, int /*long*/ menu) {
 }
 
 int /*long*/ gtk_value_changed (int /*long*/ widget) {
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return 0;
 }
 
@@ -911,11 +913,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -930,7 +932,7 @@ public void setMaximum (int value) {
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
-	if (newValue <= adjustment.lower) return;
+	if (newValue < adjustment.lower) return;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 	OS.gtk_spin_button_set_range (handle, adjustment.lower, newValue);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
@@ -938,11 +940,11 @@ public void setMaximum (int value) {
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -957,7 +959,7 @@ public void setMinimum (int value) {
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
-	if (newValue >= adjustment.upper) return;
+	if (newValue > adjustment.upper) return;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 	OS.gtk_spin_button_set_range (handle, newValue, adjustment.upper);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
@@ -1077,15 +1079,17 @@ public void setDigits (int value) {
 		adjustment.lower *= factor;
 		adjustment.step_increment *= factor;
 		adjustment.page_increment *= factor;
+		climbRate *= factor;
 	} else {
 		adjustment.value /= factor;
 		adjustment.upper /= factor;
 		adjustment.lower /= factor;
 		adjustment.step_increment /= factor;
 		adjustment.page_increment /= factor;
+		climbRate /= factor;
 	}
 	OS.memmove (hAdjustment, adjustment);
-	OS.gtk_spin_button_set_digits (handle, value);
+	OS.gtk_spin_button_configure (handle, hAdjustment, climbRate, value);
 }
 
 /**
@@ -1113,7 +1117,7 @@ public void setDigits (int value) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
@@ -1124,7 +1128,15 @@ public void setValues (int selection, int minimum, int maximum, int digits, int
 	OS.gtk_spin_button_set_range (handle, minimum / factor, maximum / factor);
 	OS.gtk_spin_button_set_increments (handle, increment / factor, pageIncrement / factor);
 	OS.gtk_spin_button_set_value (handle, selection / factor);
-	OS.gtk_spin_button_set_digits (handle, digits);
+	/*
+	* The value of climb-rate indicates the acceleration rate 
+	* to spin the value when the button is pressed and hold 
+	* on the arrow button. This value should be varied 
+	* depending upon the value of digits.
+	*/
+	climbRate = 1.0 / factor;
+	int /*long*/ adjustment = OS.gtk_spin_button_get_adjustment(handle);
+	OS.gtk_spin_button_configure (handle, adjustment, climbRate, digits);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index 68ddc4b..81846bc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java	
@@ -248,7 +248,7 @@ void createItem (TabItem item, int index) {
 		OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
 		Event event = new Event();
 		event.item = items[0];
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 		// the widget could be destroyed at this point
 	}
 }
@@ -277,7 +277,7 @@ void destroyItem (TabItem item) {
 			}
 			Event event = new Event ();
 			event.item = items [newIndex];
-			sendEvent (SWT.Selection, event);	
+			sendSelectionEvent (SWT.Selection, event, true);	
 			// the widget could be destroyed at this point
 		}
 	}
@@ -448,7 +448,7 @@ int /*long*/ gtk_switch_page (int /*long*/ widget, int /*long*/ page, int /*long
 	}
 	Event event = new Event();
 	event.item = item;
-	postEvent(SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, false);
 	return 0;
 }
 
@@ -587,6 +587,21 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		int /*long*/ list = OS.gtk_container_get_children (handle);
+		if (list != 0){
+			int count = OS.g_list_length (list);
+			OS.g_list_free (list);
+			for (int i=0; i<count; i++) {
+				TabItem item = items [i];
+				if (item != null) item.reskin (flags);
+			}
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
 	int result = super.setBounds (x, y, width, height, move, resize);
 	if ((result & RESIZED) != 0) {
@@ -666,7 +681,7 @@ void setSelection (int index, boolean notify) {
 		if (notify) {
 			Event event = new Event ();
 			event.item = item;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 451650d..d0dfe65 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -579,8 +579,7 @@ void createColumn (TableColumn column, int index) {
 		column.handle = columnHandle;
 		column.modelIndex = modelIndex;
 	}
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -632,12 +631,13 @@ void createHandle (int index) {
 	int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER;
 	OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
 	if ((style & SWT.BORDER) != 0) OS.gtk_scrolled_window_set_shadow_type (scrolledHandle, OS.GTK_SHADOW_ETCHED_IN);
-	/* Disable searching when using VIRTUAL */
 	if ((style & SWT.VIRTUAL) != 0) {
 		/* The fixed_height_mode property only exists in GTK 2.3.2 and greater */
 		if (OS.GTK_VERSION >= OS.VERSION (2, 3, 2)) {
 			OS.g_object_set (handle, OS.fixed_height_mode, true, 0);
 		}
+	}
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -1045,8 +1045,7 @@ void destroyItem (TableColumn column) {
 			createRenderers (checkColumn.handle, checkColumn.modelIndex, true, checkColumn.style);
 		}
 	}
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -1929,11 +1928,42 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 	if (item != null) {
 		Event event = new Event ();
 		event.item = item; 
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 	return 0;
 }
 
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
+	if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+		Control control = findBackgroundControl ();
+		if (control != null) {
+			GdkEventExpose gdkEvent = new GdkEventExpose ();
+			OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
+			int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
+			if (window == gdkEvent.window) {
+				int [] width = new int [1], height = new int [1];
+				OS.gdk_drawable_get_size (window, width, height);
+				int bottom = 0;
+				if (itemCount != 0) {
+					int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
+					OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, itemCount - 1);
+					int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
+					GdkRectangle rect = new GdkRectangle ();
+					OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
+					bottom = rect.y + rect.height;
+					OS.gtk_tree_path_free (path);
+					OS.g_free (iter);
+				}
+				if (height [0] > bottom) {
+					drawBackground (control, window, gdkEvent.region, 0, bottom, width [0], height [0] - bottom);
+				}
+			}
+		}
+	}
+	return super.gtk_expose_event (widget, eventPtr);
+}
+
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	int /*long*/ result = super.gtk_key_press_event (widget, eventPtr);
 	if (result != 0) return result;
@@ -1951,7 +1981,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			case OS.GDK_KP_Enter: {
 				Event event = new Event ();
 				event.item = getFocusItem (); 
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 				break;
 			}
 		}
@@ -1989,7 +2019,7 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long
 	}
 	Event event = new Event ();
 	event.item = item;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 	return 0;
 }
 
@@ -2006,7 +2036,13 @@ int gtk_row_inserted (int model, int path, int iter) {
 	}
 	return 0;
 }
-
+int /*long*/ gtk_start_interactive_search(int /*long*/ widget) {
+	if (!searchEnabled()) {
+		OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); 
+		return 1;
+	}
+	return 0;
+}
 int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) {
 	int /*long*/ path = OS.gtk_tree_path_new_from_string (pathStr);
 	if (path == 0) return 0;
@@ -2019,7 +2055,7 @@ int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) {
 		Event event = new Event ();
 		event.detail = SWT.CHECK;
 		event.item = item;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 	OS.gtk_tree_path_free (path);
 	return 0;
@@ -2071,6 +2107,7 @@ void hookEvents () {
 	if (checkRenderer != 0) {
 		OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.closures [TOGGLED], false);
 	}
+	OS.g_signal_connect_closure (handle, OS.start_interactive_search, display.closures[START_INTERACTIVE_SEARCH], false);
 	if (fixAccessibility ()) {
 		OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.closures [ROW_INSERTED], true);
 		OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.closures [ROW_DELETED], true);
@@ -2436,8 +2473,7 @@ public void removeAll () {
 	OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
 
 	resetCustomDraw ();
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -2584,17 +2620,25 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			OS.gtk_tree_path_free (path);
 			
 			if ((drawState & SWT.SELECTED) == 0) {
-				Control control = findBackgroundControl ();
-				if (control != null && control.backgroundImage != null) {
-					OS.gdk_window_clear_area (window, rect.x, rect.y, rect.width, rect.height);
+				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+					Control control = findBackgroundControl ();
+					if (control != null) {
+						drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+					}
 				}
 			}
 
+			//send out measure before erase
+			int /*long*/ textRenderer =  getTextRenderer (columnHandle);
+			if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null);
+			
+
 			if (hooks (SWT.EraseItem)) {
-				boolean wasSelected = false; 
-				if ((drawState & SWT.SELECTED) != 0) {
-					wasSelected = true;
-					OS.gdk_window_clear_area (window, rect.x, rect.y, rect.width, rect.height);
+				boolean wasSelected = (drawState & SWT.SELECTED) != 0;
+				if (wasSelected) {
+					Control control = findBackgroundControl ();
+					if (control == null) control = this;
+					drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
 				}
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
@@ -2716,6 +2760,35 @@ void resetCustomDraw () {
 	firstCustomDraw = false;
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemCount; i++) {
+			TableItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columnCount; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+boolean searchEnabled () {
+	/* Disable searching when using VIRTUAL */
+	if ((style & SWT.VIRTUAL) != 0) return false;
+	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
+		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
+		Shell shell = getShell();
+		if ((shell.style & mask) != 0) {
+			return false;
+		}
+	}
+	return true;
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
@@ -2890,9 +2963,8 @@ void setBackgroundColor (GdkColor color) {
 }
 
 void setBackgroundPixmap (int /*long*/ pixmap) {
-	super.setBackgroundPixmap (pixmap);
-	int /*long*/ window = paintWindow ();
-	if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, true);	
+	ownerDraw = true;
+	recreateRenderers ();
 }
 
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
@@ -3064,9 +3136,8 @@ public void setLinesVisible (boolean show) {
 }
 
 void setParentBackground () {
-	super.setParentBackground ();
-	int /*long*/ window = paintWindow ();
-	if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, true);
+	ownerDraw = true;
+	recreateRenderers ();
 }
 
 void setParentWindow (int /*long*/ widget) {
@@ -3540,4 +3611,31 @@ void updateScrollBarValue (ScrollBar bar) {
 	OS.g_list_free (list);
 }
 
+int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case EXPOSE_EVENT_INVERSE: {
+			/*
+			 * Feature in GTK. When the GtkTreeView has no items it does not propagate
+			 * expose events. The fix is to fill the background in the inverse expose
+			 * event.
+			 */
+			if (itemCount == 0 && (state & OBSCURED) == 0) {
+				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+					Control control = findBackgroundControl ();
+					if (control != null) {
+						GdkEventExpose gdkEvent = new GdkEventExpose ();
+						OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
+						int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
+						if (window == gdkEvent.window) {
+							drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
+						}
+					}
+				}
+			}
+			break;
+		}
+	}
+	return super.windowProc (handle, arg0, user_data);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java
index 4a62dfe..e0ab44f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java	
@@ -362,7 +362,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 			}
 		}
 	}
-	if (postEvent) postEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
+	if (postEvent) sendSelectionEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
 	return 0;
 }
 
@@ -696,6 +696,35 @@ public void setWidth (int width) {
 	if (width != 0) OS.gtk_widget_realize (parent.handle);
 	OS.gtk_tree_view_column_set_visible (handle, width != 0);
 	lastWidth = width;
+	/*
+	 * Bug in GTK. When the column is made visible the event window of column
+	 * header is raised above the gripper window of the previous column. In 
+	 * some cases, this can cause the previous column to be not resizable by
+	 * the mouse. The fix is to find the event window and lower it to bottom to
+	 * the z-order stack. 
+	 */
+	if (width != 0) {
+		if (buttonHandle != 0) {
+			int /*long*/ window = OS.gtk_widget_get_parent_window (buttonHandle);
+			if (window != 0) {
+				int /*long*/ windowList = OS.gdk_window_get_children (window);
+				if (windowList != 0) {
+					int /*long*/ windows = windowList;
+					int /*long*/ [] userData = new int /*long*/ [1];
+					while (windows != 0) {
+						int /*long*/ child = OS.g_list_data (windows);
+						OS.gdk_window_get_user_data (child, userData);
+						if (userData[0] == buttonHandle) {
+							OS.gdk_window_lower (child);
+							break;
+						}
+						windows = OS.g_list_next (windows);
+					}
+					OS.g_list_free (windowList);
+				}
+			}
+		}
+	}
 	sendEvent (SWT.Resize);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index f348437..3307d50 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java	
@@ -252,10 +252,10 @@ public Color getBackground () {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 0973f06..c62de00 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java	
@@ -32,7 +32,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
@@ -131,6 +131,27 @@ public class Text extends Scrollable {
  */
 public Text (Composite parent, int style) {
 	super (parent, checkStyle (style));
+	if (OS.GTK_VERSION >= OS.VERSION (2, 16, 0)) {
+		if ((style & SWT.SEARCH) != 0) {
+			/*
+			 * Ensure that SWT.ICON_CANCEL and ICON_SEARCH are set.
+			 * NOTE: ICON_CANCEL has the same value as H_SCROLL and
+			 * ICON_SEARCH has the same value as V_SCROLL so it is
+			 * necessary to first clear these bits to avoid a scroll
+			 * bar and then reset the bit using the original style
+			 * supplied by the programmer.
+			 */
+			if ((style & SWT.ICON_CANCEL) != 0) {
+				this.style |= SWT.ICON_CANCEL;
+				OS.gtk_entry_set_icon_from_stock (handle, OS.GTK_ENTRY_ICON_SECONDARY, OS.GTK_STOCK_CLEAR);
+				OS.gtk_entry_set_icon_sensitive (handle, OS.GTK_ENTRY_ICON_SECONDARY, false);
+			}
+			if ((style & SWT.ICON_SEARCH) != 0) {
+				this.style |= SWT.ICON_SEARCH;
+				OS.gtk_entry_set_icon_from_stock (handle, OS.GTK_ENTRY_ICON_PRIMARY, OS.GTK_STOCK_FIND);
+			}
+		}
+	}
 }
 
 static int checkStyle (int style) {
@@ -1101,7 +1122,7 @@ public int getTopPixel () {
 }
 
 int /*long*/ gtk_activate (int /*long*/ widget) {
-	postEvent (SWT.DefaultSelection);
+	sendSelectionEvent (SWT.DefaultSelection);
 	return 0;
 }
 
@@ -1146,6 +1167,12 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 	} else {
 		sendEvent (SWT.Modify);
 	}
+	if ((style & SWT.SEARCH) != 0) {
+		if ((style & SWT.ICON_CANCEL) != 0) {
+			int /*long*/ ptr = OS.gtk_entry_get_text (handle);
+			OS.gtk_entry_set_icon_sensitive (handle, OS.GTK_ENTRY_ICON_SECONDARY, OS.g_utf8_strlen (ptr, -1) > 0);
+		}
+	}
 	return 0;
 }
 
@@ -1229,6 +1256,7 @@ int /*long*/ gtk_delete_range (int /*long*/ widget, int /*long*/ iter1, int /*lo
 
 int /*long*/ gtk_delete_text (int /*long*/ widget, int /*long*/ start_pos, int /*long*/ end_pos) {
 	if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
+	if (end_pos == -1) end_pos = OS.g_utf8_strlen (OS.gtk_entry_get_text (handle), -1);
 	String newText = verifyText ("", (int)/*64*/start_pos, (int)/*64*/end_pos);
 	if (newText == null) {
 		/* Remember the selection when the text was deleted */
@@ -1360,6 +1388,18 @@ int /*long*/ gtk_grab_focus (int /*long*/ widget) {
 	return result;
 }
 
+int /*long*/ gtk_icon_release (int /*long*/ widget, int /*long*/ icon_pos, int /*long*/ event) {
+	Event e = new Event();
+	if (icon_pos == OS.GTK_ENTRY_ICON_PRIMARY) {
+		e.detail = SWT.ICON_SEARCH;
+	} else {
+		e.detail = SWT.ICON_CANCEL;
+		OS.gtk_editable_delete_text (handle, 0, -1);
+	}
+	sendSelectionEvent (SWT.DefaultSelection, e, false);
+	return 0;
+}
+
 int /*long*/ gtk_insert_text (int /*long*/ widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) {
 	if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0;
 	if (new_text == 0 || new_text_length == 0) return 0;
@@ -1462,6 +1502,9 @@ void hookEvents () {
 		OS.g_signal_connect_closure (handle, OS.activate, display.closures [ACTIVATE], false);
 		OS.g_signal_connect_closure (handle, OS.grab_focus, display.closures [GRAB_FOCUS], false);
 		OS.g_signal_connect_closure (handle, OS.populate_popup, display.closures [POPULATE_POPUP], false);
+		if ((style & SWT.SEARCH) != 0 && OS.GTK_VERSION >= OS.VERSION (2, 16, 0)) {
+			OS.g_signal_connect_closure (handle, OS.icon_release, display.closures [ICON_RELEASE], false);
+		}
 	} else {
 		OS.g_signal_connect_closure (bufferHandle, OS.changed, display.closures [CHANGED], false);
 		OS.g_signal_connect_closure (bufferHandle, OS.insert_text, display.closures [TEXT_BUFFER_INSERT_TEXT], false);
@@ -1527,7 +1570,17 @@ int /*long*/ paintWindow () {
 	if ((style & SWT.SINGLE) != 0) {
 		int /*long*/ window = super.paintWindow ();
 		int /*long*/ children = OS.gdk_window_get_children (window);
-		if (children != 0) window = OS.g_list_data (children);
+		if (children != 0) {
+			/*
+			* When search or cancel icons are added to Text, those
+			* icon window(s) are added to the beginning of the list. 
+			* In order to always return the correct window for Text,
+			* browse to the end of the list. 
+			*/
+			do {
+				window = OS.g_list_data (children);
+			} while ((children = OS.g_list_next (children)) != 0);
+		}
 		OS.g_list_free (children);
 		return window;
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 2d7306e..a87565f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java	
@@ -391,7 +391,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 					event.x = OS.GTK_WIDGET_X (topHandle);
 					event.y = OS.GTK_WIDGET_Y (topHandle) + OS.GTK_WIDGET_HEIGHT (topHandle);
 					if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth() - OS.GTK_WIDGET_WIDTH(topHandle) - event.x;
-					item.postEvent (SWT.Selection, event);
+					item.sendSelectionEvent  (SWT.Selection, event, false);
 					return result;
 				}
 			}
@@ -498,6 +498,17 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	ToolItem[] items = _getItems();
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
 	int result = super.setBounds (x, y, width, height, move, resize);
 	if ((result & RESIZED) != 0) relayout ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 6013cfc..4c5c7d9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java	
@@ -141,6 +141,12 @@ public ToolItem (ToolBar parent, int style, int index) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
@@ -554,7 +560,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 			selectRadio ();
 		}
 	}
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, false);
 	return 0;
 }
 
@@ -855,6 +861,17 @@ public void setEnabled (boolean enabled) {
 			OS.gtk_widget_hide (handle);
 			OS.gtk_widget_show (handle);
 		}
+	} else {
+		/*
+		* Bug in GTK. Starting with 2.14, if a button is disabled 
+		* through on a button press, the field which keeps track 
+		* whether the pointer is currently in the button is never updated.
+		* As a result, when it is re-enabled it automatically enters
+		* a PRELIGHT state. The fix is to set a NORMAL state.
+		*/
+		if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+			OS.gtk_widget_set_state (topHandle, OS.GTK_STATE_NORMAL);
+		}
 	}
 }
 
@@ -953,7 +970,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index a106744..34b765f 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -463,12 +463,13 @@ public boolean getVisible () {
 }
 
 int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
-	notifyListeners (SWT.Selection, new Event ());
+	sendSelectionEvent (SWT.Selection, null, true);
 	setVisible (false);
 	return 0;
 }
 
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
 	int /*long*/ gdkGC = OS.gdk_gc_new (window);
 	OS.gdk_draw_polygon (window, gdkGC, 0, borderPolygon, borderPolygon.length / 2);
@@ -498,6 +499,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			x += IMAGE_SIZE;
 		}
 		x += INSET;
+		Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
+		OS.gdk_gc_set_foreground (gdkGC, foreground.handle);
 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutText);
 		int [] w = new int [1], h = new int [1];
 		OS.pango_layout_get_size (layoutText, w, h);
@@ -505,6 +508,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	}
 	if (layoutMessage != 0) {
 		x = BORDER + PADDING + INSET;
+		Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
+		OS.gdk_gc_set_foreground (gdkGC, foreground.handle);
 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutMessage);
 	}
 	OS.g_object_unref (gdkGC);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java
index e5729d3..9bb9bc7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java	
@@ -132,6 +132,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java
index 7d1fb1f..ca2e9be 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java	
@@ -255,7 +255,7 @@ public String getToolTipText () {
 }
 
 int /*long*/ gtk_activate (int /*long*/ widget) {
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	/*
 	* Feature in GTK. GTK will generate a single-click event before sending 
 	* a double-click event. To know when to send a DefaultSelection, look for 
@@ -273,7 +273,7 @@ int /*long*/ gtk_activate (int /*long*/ widget) {
 		}
 		OS.gdk_event_free (nextEvent);
 		if (currEventType == OS.GDK_BUTTON_PRESS && nextEventType == OS.GDK_2BUTTON_PRESS) {
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 		}
 	}
 	return 0;
@@ -288,9 +288,9 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr)
 		return 0;
 	}
 	if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) {
-		postEvent (SWT.DefaultSelection);
+		sendSelectionEvent (SWT.DefaultSelection);
 	} else {
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return 0;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index e6a26ce..db619d7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -674,8 +674,7 @@ void createColumn (TreeColumn column, int index) {
 		column.handle = columnHandle;
 		column.modelIndex = modelIndex;
 	}
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -727,12 +726,13 @@ void createHandle (int index) {
 	int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER;
 	OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
 	if ((style & SWT.BORDER) != 0) OS.gtk_scrolled_window_set_shadow_type (scrolledHandle, OS.GTK_SHADOW_ETCHED_IN);
-	/* Disable searching when using VIRTUAL */
 	if ((style & SWT.VIRTUAL) != 0) {
 		/* The fixed_height_mode property only exists in GTK 2.3.2 and greater */
 		if (OS.GTK_VERSION >= OS.VERSION (2, 3, 2)) {
 			OS.g_object_set (handle, OS.fixed_height_mode, true, 0);
 		}
+	}
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -1054,8 +1054,7 @@ void destroyItem (TreeColumn column) {
 			createRenderers (firstColumn.handle, firstColumn.modelIndex, true, firstColumn.style);
 		}
 	}
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -1927,7 +1926,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 	if (item != null) {
 		Event event = new Event ();
 		event.item = item;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 	return 0;
 }
@@ -1938,6 +1937,42 @@ int /*long*/ gtk_expand_collapse_cursor_row (int /*long*/ widget, int /*long*/ l
 	return 0;
 }
 
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
+	if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+		Control control = findBackgroundControl ();
+		if (control != null) {
+			GdkEventExpose gdkEvent = new GdkEventExpose ();
+			OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
+			int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
+			if (window == gdkEvent.window) {
+				int [] width = new int [1], height = new int [1];
+				OS.gdk_drawable_get_size (window, width, height);
+				int /*long*/ parent = 0;
+				int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parent);
+				GdkRectangle rect = new GdkRectangle ();
+				boolean expanded = true;
+				while (itemCount != 0 && expanded && height [0] > (rect.y + rect.height)) {
+					int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
+					OS.gtk_tree_model_iter_nth_child (modelHandle, iter, parent, itemCount - 1);
+					itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, iter);
+					int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
+					OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
+					expanded = OS.gtk_tree_view_row_expanded (handle, path); 
+					OS.gtk_tree_path_free (path);
+					if (parent != 0) OS.g_free (parent);
+					parent = iter;
+				}
+				if (parent != 0) OS.g_free (parent);
+				if (height [0] > (rect.y + rect.height)) {
+					drawBackground (control, window, gdkEvent.region, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
+				}
+			}
+		}
+	}
+	return super.gtk_expose_event (widget, eventPtr);
+}
+
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	int /*long*/ result = super.gtk_key_press_event (widget, eventPtr);
 	if (result != 0) return result;
@@ -1955,7 +1990,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			case OS.GDK_KP_Enter: {
 				Event event = new Event ();
 				event.item = getFocusItem (); 
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 				break;
 			}
 		}
@@ -1995,7 +2030,7 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long
 	OS.g_free (iter);
 	Event event = new Event ();
 	event.item = item;
-	postEvent (SWT.DefaultSelection, event);
+	sendSelectionEvent (SWT.DefaultSelection, event, false);
 	return 0;
 }
 
@@ -2013,6 +2048,14 @@ int gtk_row_inserted (int model, int path, int iter) {
 	return 0;
 }
 
+int /*long*/ gtk_start_interactive_search(int /*long*/ widget) {
+	if (!searchEnabled()) {
+		OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); 
+		return 1;
+	}
+	return 0;
+}
+
 int /*long*/ gtk_test_collapse_row (int /*long*/ tree, int /*long*/ iter, int /*long*/ path) {
 	int [] index = new int [1];
 	OS.gtk_tree_model_get (modelHandle, iter, ID_COLUMN, index, -1);
@@ -2108,7 +2151,7 @@ int /*long*/ gtk_toggled (int /*long*/ renderer, int /*long*/ pathStr) {
 		Event event = new Event ();
 		event.detail = SWT.CHECK;
 		event.item = item;
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 	return 0;
 }
@@ -2162,6 +2205,7 @@ void hookEvents () {
 	if (checkRenderer != 0) {
 		OS.g_signal_connect_closure (checkRenderer, OS.toggled, display.closures [TOGGLED], false);
 	}
+	OS.g_signal_connect_closure (handle, OS.start_interactive_search, display.closures[START_INTERACTIVE_SEARCH], false);
 	if (fixAccessibility ()) {
 		OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.closures [ROW_INSERTED], true);
 		OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.closures [ROW_DELETED], true);
@@ -2409,8 +2453,7 @@ public void removeAll () {
 	}
 	OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED);
 	
-	/* Disable searching when using VIRTUAL */
-	if ((style & SWT.VIRTUAL) != 0) {
+	if (!searchEnabled ()) {
 		/*
 		* Bug in GTK. Until GTK 2.6.5, calling gtk_tree_view_set_enable_search(FALSE)
 		* would prevent the user from being able to type in text to search the tree.
@@ -2567,17 +2610,24 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			OS.gtk_tree_path_free (path);
 			
 			if ((drawState & SWT.SELECTED) == 0) {
-				Control control = findBackgroundControl ();
-				if (control != null && control.backgroundImage != null) {
-					OS.gdk_window_clear_area (window, rect.x, rect.y, rect.width, rect.height);
+				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+					Control control = findBackgroundControl ();
+					if (control != null) {
+						drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+					}
 				}
 			}
 
+			//send out measure before erase
+			int /*long*/ textRenderer =  getTextRenderer (columnHandle);
+			if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null);
+			
 			if (hooks (SWT.EraseItem)) {
-				boolean wasSelected = false; 
-				if ((drawState & SWT.SELECTED) != 0) {
-					wasSelected = true;
-					OS.gdk_window_clear_area (window, rect.x, rect.y, rect.width, rect.height);
+				boolean wasSelected = (drawState & SWT.SELECTED) != 0;
+				if (wasSelected) {
+					Control control = findBackgroundControl ();
+					if (control == null) control = this;
+					drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
 				}
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
@@ -2713,6 +2763,33 @@ void resetCustomDraw () {
 	firstCustomDraw = false;
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TreeItem item = items [i];
+			if (item != null) item.reskinChildren (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+boolean searchEnabled () {
+	/* Disable searching when using VIRTUAL */
+	if ((style & SWT.VIRTUAL) != 0) return false;
+	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
+		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
+		Shell shell = getShell();
+		if ((shell.style & mask) != 0) {
+			return false;
+		}
+	}
+	return true;
+}
 /**
  * Display a mark indicating the point at which an item will be inserted.
  * The drop insert item has a visual hint to show where a dragged item 
@@ -2853,9 +2930,8 @@ void setBackgroundColor (GdkColor color) {
 }
 
 void setBackgroundPixmap (int /*long*/ pixmap) {
-	super.setBackgroundPixmap (pixmap);
-	int /*long*/ window = paintWindow ();
-	if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, true);	
+	ownerDraw = true;
+	recreateRenderers ();
 }
 
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
@@ -2988,9 +3064,8 @@ public void setLinesVisible (boolean show) {
 }
 
 void setParentBackground () {
-	super.setParentBackground ();
-	int /*long*/ window = paintWindow ();
-	if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, true);
+	ownerDraw = true;
+	recreateRenderers ();
 }
 
 void setParentWindow (int /*long*/ widget) {
@@ -3382,4 +3457,32 @@ void updateScrollBarValue (ScrollBar bar) {
 	OS.g_list_free (list);
 }
 
+int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
+	switch ((int)/*64*/user_data) {
+		case EXPOSE_EVENT_INVERSE: {
+			/*
+			 * Feature in GTK. When the GtkTreeView has no items it does not propagate
+			 * expose events. The fix is to fill the background in the inverse expose
+			 * event.
+			 */
+			int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0);
+			if (itemCount == 0 && (state & OBSCURED) == 0) {
+				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
+					Control control = findBackgroundControl ();
+					if (control != null) {
+						GdkEventExpose gdkEvent = new GdkEventExpose ();
+						OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
+						int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
+						if (window == gdkEvent.window) {
+							drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
+						}
+					}
+				}
+			}
+			break;
+		}
+	}
+	return super.windowProc (handle, arg0, user_data);
+}
+
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java
index a3b6ee5..115c7f8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java	
@@ -364,7 +364,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 			}
 		}
 	}
-	if (postEvent) postEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
+	if (postEvent) sendSelectionEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
 	return 0;
 }
 
@@ -691,6 +691,35 @@ public void setWidth (int width) {
 	if (width != 0) OS.gtk_widget_realize (parent.handle);
 	OS.gtk_tree_view_column_set_visible (handle, width != 0);
 	lastWidth = width;
+	/*
+	 * Bug in GTK. When the column is made visible the event window of column
+	 * header is raised above the gripper window of the previous column. In 
+	 * some cases, this can cause the previous column to be not resizable by
+	 * the mouse. The fix is to find the event window and lower it to bottom to
+	 * the z-order stack. 
+	 */
+	if (width != 0) {
+		if (buttonHandle != 0) {
+			int /*long*/ window = OS.gtk_widget_get_parent_window (buttonHandle);
+			if (window != 0) {
+				int /*long*/ windowList = OS.gdk_window_get_children (window);
+				if (windowList != 0) {
+					int /*long*/ windows = windowList;
+					int /*long*/ [] userData = new int /*long*/ [1];
+					while (windows != 0) {
+						int /*long*/ child = OS.g_list_data (windows);
+						OS.gdk_window_get_user_data (child, userData);
+						if (userData[0] == buttonHandle) {
+							OS.gdk_window_lower (child);
+							break;
+						}
+						windows = OS.g_list_next (windows);
+					}
+					OS.g_list_free (windowList);
+				}
+			}
+		}
+	}
 	sendEvent (SWT.Resize);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 1102499..c40dea4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java	
@@ -479,10 +479,10 @@ public Rectangle getBounds (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1449,8 +1449,6 @@ public void setFont (int index, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index a391ca1..48e0601 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java	
@@ -53,6 +53,8 @@ public abstract class Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	int style, state;
@@ -94,6 +96,12 @@ public abstract class Widget {
 	static final int FOREIGN_HANDLE = 1<<22;
 	static final int DRAG_DETECT = 1<<23;
 	
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<24;
+
+	/* Should sub-windows be checked when EnterNotify received */
+	static final int CHECK_SUBWINDOW = 1<<25;
+
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -165,7 +173,13 @@ public abstract class Widget {
 	static final int ROW_INSERTED = 64;
 	static final int ROW_DELETED = 65;
 	static final int DAY_SELECTED_DOUBLE_CLICK = 66;
-	static final int LAST_SIGNAL = 67;
+	static final int ICON_RELEASE = 67;
+	static final int SELECTION_DONE = 68;
+	static final int START_INTERACTIVE_SEARCH = 69;
+	static final int LAST_SIGNAL = 70;
+	
+	static final String IS_ACTIVE = "org.eclipse.swt.internal.control.isactive"; //$NON-NLS-1$
+	static final String KEY_CHECK_SUBWINDOW = "org.eclipse.swt.internal.control.checksubwindow"; //$NON-NLS-1$
 
 /**
  * Prevents uninitialized instances from being created outside the package.
@@ -206,6 +220,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 
 void _addListener (int eventType, Listener listener) {
@@ -420,6 +435,7 @@ void destroyWidget () {
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -503,6 +519,10 @@ public Object getData () {
 public Object getData (String key) {
 	checkWidget();
 	if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (key.equals (KEY_CHECK_SUBWINDOW)) {
+		return new Boolean ((state & CHECK_SUBWINDOW) != 0);
+	}
+	if (key.equals(IS_ACTIVE)) return new Boolean(isActive ());
 	if ((state & KEYED_DATA) != 0) {
 		Object [] table = (Object []) data;
 		for (int i=1; i<table.length; i+=2) {
@@ -692,6 +712,10 @@ int /*long*/ gtk_hide (int /*long*/ widget) {
 	return 0;
 }
 
+int /*long*/ gtk_icon_release (int /*long*/ widget, int /*long*/ icon_pos, int /*long*/ event) {
+	return 0;
+}
+
 int /*long*/ gtk_input (int /*long*/ widget, int /*long*/ arg1) {
 	return 0;
 }
@@ -784,6 +808,10 @@ int /*long*/ gtk_select (int /*long*/ item) {
 	return 0;
 }
 
+int /*long*/ gtk_selection_done (int /*long*/ menushell) {
+	return 0;
+} 
+
 int /*long*/ gtk_show (int /*long*/ widget) {
 	return 0;
 }
@@ -800,6 +828,10 @@ int /*long*/ gtk_status_icon_popup_menu (int /*long*/ handle, int /*long*/ butto
 	return 0;
 }
 
+int /*long*/ gtk_start_interactive_search (int /*long*/ widget) {
+	return 0;
+}
+
 int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) {
 	return 0;
 }
@@ -908,13 +940,17 @@ char [] fixMnemonic (String string, boolean replace) {
 	return result;
 }
 
+boolean isActive () {
+	return true;
+}
+
 /**
  * Returns <code>true</code> if the widget has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -1130,6 +1166,8 @@ public void removeListener (int eventType, Listener handler) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener handler) {
 	checkWidget ();
@@ -1147,6 +1185,50 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 }
 
 /**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
+/**
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
@@ -1284,6 +1366,36 @@ char [] sendIMKeyEvent (int type, GdkEventKey keyEvent, char [] chars) {
 	return chars;
 }
 
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+	int /*long*/ ptr = OS.gtk_get_current_event ();
+	if (ptr != 0) {
+		GdkEvent gdkEvent = new GdkEvent ();
+		OS.memmove (gdkEvent, ptr, GdkEvent.sizeof);
+		switch (gdkEvent.type) {
+			case OS.GDK_KEY_PRESS:
+			case OS.GDK_KEY_RELEASE: 
+			case OS.GDK_BUTTON_PRESS:
+			case OS.GDK_2BUTTON_PRESS: 
+			case OS.GDK_BUTTON_RELEASE: {
+				int [] state = new int [1];
+				OS.gdk_event_get_state (ptr, state);
+				setInputState (event, state [0]);
+				break;
+			}
+		}
+		OS.gdk_event_free (ptr);
+	}
+	sendEvent (eventType, event, send);
+}
+
 /**
  * Sets the application defined widget data associated
  * with the receiver to be the argument. The <em>widget
@@ -1342,6 +1454,18 @@ public void setData (Object data) {
 public void setData (String key, Object value) {
 	checkWidget();
 	if (key == null) error (SWT.ERROR_NULL_ARGUMENT);
+
+	if (key.equals (KEY_CHECK_SUBWINDOW)) {
+		if (value != null && value instanceof Boolean) {
+			if (((Boolean)value).booleanValue ()) {
+				state |= CHECK_SUBWINDOW;
+			} else {
+				state &= ~CHECK_SUBWINDOW;
+			}
+		}
+		return;
+	}
+
 	int index = 1;
 	Object [] table = null;
 	if ((state & KEYED_DATA) != 0) {
@@ -1382,6 +1506,7 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 void setForegroundColor (int /*long*/ handle, GdkColor color) {
@@ -1456,12 +1581,58 @@ boolean setKeyState (Event event, GdkEventKey keyEvent) {
 			}
 		}
 	}
+	setLocationState(event, keyEvent);
 	if (event.keyCode == 0 && event.character == 0) {
 		if (!isNull) return false;
 	}
 	return setInputState (event, keyEvent.state);
 }
 
+void setLocationState (Event event, GdkEventKey keyEvent) {
+	switch (keyEvent.keyval) {
+		case OS.GDK_Alt_L:
+		case OS.GDK_Shift_L:
+		case OS.GDK_Control_L:
+			event.keyLocation = SWT.LEFT;
+			break;
+		case OS.GDK_Alt_R:
+		case OS.GDK_Shift_R:
+		case OS.GDK_Control_R:
+				event.keyLocation = SWT.RIGHT;
+			break;
+		case OS.GDK_KP_0:
+		case OS.GDK_KP_1:
+		case OS.GDK_KP_2:
+		case OS.GDK_KP_3:
+		case OS.GDK_KP_4:
+		case OS.GDK_KP_5:
+		case OS.GDK_KP_6:
+		case OS.GDK_KP_7:
+		case OS.GDK_KP_8:
+		case OS.GDK_KP_9:
+		case OS.GDK_KP_Add:
+		case OS.GDK_KP_Decimal:
+		case OS.GDK_KP_Delete:
+		case OS.GDK_KP_Divide:
+		case OS.GDK_KP_Down:
+		case OS.GDK_KP_End:
+		case OS.GDK_KP_Enter:
+		case OS.GDK_KP_Equal:
+		case OS.GDK_KP_Home:
+		case OS.GDK_KP_Insert:
+		case OS.GDK_KP_Left:
+		case OS.GDK_KP_Multiply:
+		case OS.GDK_KP_Page_Down:
+		case OS.GDK_KP_Page_Up:
+		case OS.GDK_KP_Right:
+		case OS.GDK_KP_Subtract:
+		case OS.GDK_KP_Up:
+		case OS.GDK_Num_Lock:
+			event.keyLocation = SWT.KEYPAD;
+			break;
+	}
+}
+
 void setOrientation () {
 }
 
@@ -1531,7 +1702,9 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ user_data) {
 		case POPUP_MENU: return gtk_popup_menu (handle);
 		case PREEDIT_CHANGED: return gtk_preedit_changed (handle);
 		case REALIZE: return gtk_realize (handle);
+		case START_INTERACTIVE_SEARCH: return gtk_start_interactive_search (handle);
 		case SELECT: return gtk_select (handle);
+		case SELECTION_DONE: return gtk_selection_done (handle);
 		case SHOW: return gtk_show (handle);
 		case VALUE_CHANGED: return gtk_value_changed (handle);
 		case UNMAP: return gtk_unmap (handle);
@@ -1593,6 +1766,7 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ ar
 	switch ((int)/*64*/user_data) {
 		case DELETE_RANGE: return gtk_delete_range (handle, arg0, arg1);
 		case DELETE_TEXT: return gtk_delete_text (handle, arg0, arg1);
+		case ICON_RELEASE: return gtk_icon_release (handle, arg0, arg1);
 		case ROW_ACTIVATED: return gtk_row_activated (handle, arg0, arg1);
 		case SCROLL_CHILD: return gtk_scroll_child (handle, arg0, arg1);
 		case STATUS_ICON_POPUP_MENU: return gtk_status_icon_popup_menu (handle, arg0, arg1);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Color.java
index b202ed4..73cd8bf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Color.java	
@@ -41,6 +41,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public XColor handle;
 
@@ -314,7 +316,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java
index cc3c048..672ea19 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Cursor.java	
@@ -51,6 +51,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -89,6 +91,10 @@ Cursor (Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -416,7 +422,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java
index 4587d5f..8392403 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,8 @@ public abstract class Device implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int xDisplay;
 	
@@ -46,6 +48,8 @@ public abstract class Device implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	// TEMPORARY CODE
 	public boolean setDPI;
@@ -92,6 +96,8 @@ public abstract class Device implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	// TEMPORARY CODE
 	public int tabMapping, crMapping;
@@ -716,6 +722,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int internal_new_GC (GCData data);
 
@@ -731,6 +739,8 @@ public abstract int internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int handle, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java
index d5b3849..a00669c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Font.java	
@@ -41,6 +41,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -54,6 +56,8 @@ public final class Font extends Resource {
 	 * platforms and should never be accessed from application code.
 	 * </p>
 	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 * 
 	 * @since 2.0
 	 */
 	public String codePage;
@@ -508,7 +512,7 @@ void init (FontData[] fds) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java
index 6f50eb1..b018d7a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,6 +48,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String foundry;
 	/**
@@ -59,6 +61,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String fontFamily;
 	/**
@@ -70,6 +74,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String weight;
 	/**
@@ -81,6 +87,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String slant;
 	/**
@@ -92,6 +100,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String setWidth;
 	/**
@@ -103,6 +113,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String addStyle;
 	/**
@@ -114,6 +126,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int pixels;
 	/**
@@ -125,6 +139,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int points;
 	/**
@@ -136,6 +152,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int horizontalResolution;
 	/**
@@ -147,6 +165,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int verticalResolution;
 	/**
@@ -158,6 +178,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String spacing;
 	/**
@@ -169,6 +191,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int averageWidth;
 	/**
@@ -180,6 +204,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String characterSetRegistry;
 	/**
@@ -191,6 +217,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String characterSetName;
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java
index e5e3c8c..a49e469 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java	
@@ -66,6 +66,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -3101,8 +3103,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -3411,7 +3414,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -3566,6 +3569,8 @@ public void setAntialias(int antialias) {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC motif_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
@@ -3588,6 +3593,8 @@ public static GC motif_new(Drawable drawable, GCData data) {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC motif_new(int xGC, GCData data) {
 	GC gc = new GC();
@@ -4058,9 +4065,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -4070,9 +4077,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java
index 6aa4d87..340d524 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java	
@@ -76,6 +76,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -88,6 +90,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int pixmap;
 	
@@ -100,6 +104,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int mask;
 
@@ -1127,6 +1133,8 @@ void init(ImageData image) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (pixmap == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -1163,7 +1171,9 @@ public int internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int gc, GCData data) {
 	int xDisplay = 0;
@@ -1178,7 +1188,7 @@ public void internal_dispose_GC (int gc, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java
index 8aaaefb..acf228a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Region.java	
@@ -37,6 +37,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -385,7 +387,7 @@ public boolean intersects (Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java
index a03a445..2e42756 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java	
@@ -41,10 +41,11 @@ public final class TextLayout extends Resource {
 	int alignment;
 	int wrapWidth;
 	int orientation;
-	int indent;
+	int indent, wrapIndent;
 	boolean justify; 
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	StyleItem[] styles;
 	
 	StyleItem[][] runs;
@@ -114,7 +115,7 @@ void computeRuns () {
 		StyleItem run = allRuns[i];
 		place(run);
 	}
-	int lineWidth = 0, lineStart = 0, lineCount = 1;
+	int lineWidth = indent, lineStart = 0, lineCount = 1;
 	for (int i=0; i<allRuns.length - 1; i++) {
 		StyleItem run = allRuns[i];
 		if (run.length == 1) {
@@ -156,7 +157,7 @@ void computeRuns () {
 					break;
 			}
 		}
-		if (wrapWidth != -1 && lineWidth + run.width > wrapWidth && !run.tab) {
+		if (wrapWidth != -1 && lineWidth + run.width > wrapWidth && !run.tab && run.length > 0) {
 			int start = 0;
 			char[] chars = new char[run.length];
 			text.getChars(run.start, run.start + run.length, chars, 0);
@@ -219,7 +220,7 @@ void computeRuns () {
 		lineWidth += run.width;
 		if (run.lineBreak) {
 			lineStart = i + 1;
-			lineWidth = 0;
+			lineWidth = run.softBreak ? wrapIndent : indent;;
 			lineCount++;
 		}
 	}
@@ -279,6 +280,8 @@ void destroy() {
 	lineOffset = null;
 	lineY = null;
 	lineWidth = null;
+	segments = null;
+	segmentsChars = null;
 }
 
 /**
@@ -866,7 +869,7 @@ public int getLineCount () {
 }
 
 int getLineIndent (int lineIndex) {
-	int lineIndent = 0;
+	int lineIndent = wrapIndent;
 	if (lineIndex == 0) {
 		lineIndent = indent;
 	} else {
@@ -1310,6 +1313,22 @@ public int[] getSegments() {
 }
 
 /**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
+/**
  * Returns the line spacing of the receiver.
  *
  * @return the line spacing
@@ -1423,12 +1442,28 @@ public int getWidth () {
 }
 
 /**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();
+	return wrapIndent;
+}
+
+/**
  * Returns <code>true</code> if the text layout has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1646,7 +1681,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1655,6 +1690,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -1726,7 +1763,7 @@ public void setSpacing (int spacing) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1735,12 +1772,18 @@ public void setSpacing (int spacing) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1759,6 +1802,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the style of the receiver for the specified range.  Styles previously
  * set for that range will be overwritten.  The start and end offsets are
  * inclusive and will be clamped if out of range.
@@ -1923,6 +1999,28 @@ public void setWidth (int width) {
 }
 
 /**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout();
+	if (wrapIndent < 0) return;
+	if (this.wrapIndent == wrapIndent) return;
+	freeRuns();
+	this.wrapIndent = wrapIndent;
+}
+
+/**
  * Returns a string containing a concise, human-readable
  * description of the receiver.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java
index 2c10e59..5522a1b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Button.java	
@@ -175,6 +175,12 @@ void _setText (String string) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java
index 439c284..eb75893 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Canvas.java	
@@ -96,10 +96,7 @@ public Canvas (Composite parent, int style) {
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	checkWidget ();
-	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
-	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-	super.drawBackground (gc, x, y, width, height);
+	drawBackground (gc, x, y, width, height, 0 ,0);
 }
 /**
  * Returns the caret.
@@ -161,12 +158,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java
index 8ad4709..2fe3d38 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Combo.java	
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
index e026007..ad42e78 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java	
@@ -145,6 +145,7 @@ Control [] _getTabList () {
 }
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget();
+	display.runSkin();
 	Point size;
 	if (layout != null) {
 		if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) {
@@ -300,6 +301,39 @@ void deregister () {
 	if (focusHandle != 0) display.removeWidget (focusHandle);
 }
 void drawBackground (GC gc, int x, int y, int width, int height) {
+	drawBackground(gc, x, y, width, height, 0, 0);
+}
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	checkWidget ();
+	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	Control control = findBackgroundControl ();
 	if (control != null) {
 		GCData data = gc.getGCData ();
@@ -312,9 +346,9 @@ void drawBackground (GC gc, int x, int y, int width, int height) {
 				short [] control_x = new short [1], control_y = new short [1];
 				OS.XtTranslateCoords (control.handle, (short) 0, (short) 0, control_x, control_y);
 				int tileX = root_x[0] - control_x[0], tileY = root_y[0] - control_y[0];
-				Cairo.cairo_translate (cairo, -tileX, -tileY);
-				x += tileX;
-				y += tileY;
+				Cairo.cairo_translate (cairo, -tileX - offsetX, -tileY - offsetY);
+				x += tileX + offsetX;
+				y += tileY + offsetY;
 				int xDisplay = OS.XtDisplay (handle);
 				int xVisual = OS.XDefaultVisual(xDisplay, OS.XDefaultScreen(xDisplay));
 				int xDrawable = control.backgroundImage.pixmap;				
@@ -348,7 +382,7 @@ void drawBackground (GC gc, int x, int y, int width, int height) {
 				OS.XtTranslateCoords (control.handle, (short) 0, (short) 0, control_x, control_y);
 				int tileX = root_x[0] - control_x[0], tileY = root_y[0] - control_y[0];
 				OS.XSetFillStyle (xDisplay, xGC, OS.FillTiled);
-				OS.XSetTSOrigin (xDisplay, xGC, -tileX, -tileY);
+				OS.XSetTSOrigin (xDisplay, xGC, -tileX - offsetX, -tileY - offsetY);
 				OS.XSetTile (xDisplay, xGC, control.backgroundImage.pixmap);
 				OS.XFillRectangle (data.display, data.drawable, xGC, x, y, width, height);
 				OS.XSetFillStyle (xDisplay, xGC, values.fill_style);
@@ -480,6 +514,10 @@ public Control [] getChildren () {
 }
 public Rectangle getClientArea () {
 	checkWidget();
+	return _getClientArea();
+}
+
+Rectangle _getClientArea() {
 	/*
 	* Bug in Motif. For some reason, if a form has not been realized,
 	* calling XtResizeWidget () on the form does not lay out properly.
@@ -746,42 +784,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 void manageChildren () {
@@ -995,6 +1110,14 @@ void releaseWidget () {
 void removeControl (Control control) {
 	fixTabList (control);
 }
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
 void resizeClientWindow	() {
 	if (clientWindow == 0) return;
 	boolean warnings = display.getWarnings ();
@@ -1298,6 +1421,7 @@ void updateLayout (boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin();
 		layout.layout (this, changed);
 	}
 	if (all) {
@@ -1377,7 +1501,7 @@ int XExposure (int w, int client_data, int call_data, int continue_to_dispatch)
 	GC paintGC = null;
 	Image image = null;
 	if ((style & SWT.DOUBLE_BUFFERED) != 0) {
-		Rectangle client = getClientArea ();
+		Rectangle client = _getClientArea ();
 		int width = Math.max (1, Math.min (client.width, rect.x + rect.width));
 		int height = Math.max (1, Math.min (client.height, rect.y + rect.height));
 		image = new Image (display, width, height);
@@ -1392,7 +1516,7 @@ int XExposure (int w, int client_data, int call_data, int continue_to_dispatch)
 			/* This code is intentionaly commented because it is too slow to copy bits from the screen */
 //			paintGC.copyArea(image, 0, 0);
 		} else {
-			drawBackground (gc, 0, 0, width, height);
+			drawBackground (gc, 0, 0, width, height, 0, 0);
 		}
 	}
 	Event event = new Event ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java
index 0a10bcc..7a704b3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Control.java	
@@ -26,7 +26,8 @@ import org.eclipse.swt.accessibility.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -650,7 +651,7 @@ int defaultForeground () {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -691,7 +692,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1170,6 +1171,11 @@ int getMinimumHeight () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1396,6 +1402,8 @@ int hoverProc (int id, boolean showTip) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	checkWidget();
@@ -1446,6 +1454,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int xGC, GCData data) {
 	checkWidget ();
@@ -2196,18 +2206,20 @@ boolean sendMouseEvent (int type, XButtonEvent xEvent) {
 	switch (button) {
 		case 4:
 		case 5:
-			/* Use MouseDown button 4 and 5 to emulated MouseWheel */
+		case 6:
+		case 7:
 			if (type != SWT.MouseDown) return true;
-			type = SWT.MouseWheel;
+			type = button == 4 || button == 5 ? SWT.MouseWheel : SWT.MouseHorizontalWheel;
 			if (!hooks (type) && !filters (type)) return true;
+			int count = button == 4 || button == 6 ? 3 : -3;
+			int detail = button == 4 || button == 5 ? SWT.SCROLL_LINE : SWT.NONE;
 			short [] x_root = new short [1], y_root = new short [1];
 			OS.XtTranslateCoords (handle, (short) 0, (short) 0, x_root, y_root);
 			int x = xEvent.x_root - x_root [0], y = xEvent.y_root - y_root [0];
-			int count = button == 4 ? 3 : -3;
 			Control control = this;
 			Shell shell = getShell ();
 			do {
-				if (!control.sendMouseEvent (type, 0, count, SWT.SCROLL_LINE, true, xEvent.time, x, y, xEvent.state)) {
+				if (!control.sendMouseEvent (type, 0, count, detail, true, xEvent.time, x, y, xEvent.state)) {
 					return false;
 				}
 				if (control == shell) break;
@@ -2217,12 +2229,6 @@ boolean sendMouseEvent (int type, XButtonEvent xEvent) {
 				y = xEvent.y_root - y_root [0];			
 			} while (control != null);
 			return true;
-		case 6:
-			button = 4;
-			break;
-		case 7:
-			button = 5;
-			break;
 	}
 	if (!hooks (type) && !filters (type)) return true;
 	short [] x_root = new short [1], y_root = new short [1];
@@ -2786,6 +2792,7 @@ public void setMenu (Menu menu) {
 public boolean setParent (Composite parent) {
 	checkWidget();
 	if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	reskin (SWT.ALL);
 	return false;
 }
 void setParentBackground () {
@@ -3295,6 +3302,177 @@ int traversalCode (int key, XKeyEvent xEvent) {
 	}
 	return code;
 }
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	if (traversal == SWT.TRAVERSE_NONE) {
+		switch (keyCode) {
+			case SWT.ESC: {
+				traversal = SWT.TRAVERSE_ESCAPE;
+				doit = true;
+				break;
+			}
+			case SWT.CR: {
+				traversal = SWT.TRAVERSE_RETURN;
+				doit = true;
+				break;
+			}
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_RIGHT: {
+				traversal = SWT.TRAVERSE_ARROW_NEXT;
+				doit = false;
+				break;
+			}
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT: {
+				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+				doit = false;
+				break;
+			}
+			case SWT.TAB: {
+				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+				doit = true;
+				break;
+			}
+			case SWT.PAGE_DOWN: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_NEXT;
+					doit = true;
+				}
+				break;
+			}
+			case SWT.PAGE_UP: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+					doit = true;
+				}
+				break;
+			}
+			default: {
+				if (character != 0 && (stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+					traversal = SWT.TRAVERSE_MNEMONIC;
+					doit = true;
+				}
+				break;
+			}
+		}
+	}
+
+	Event event = new Event ();
+	event.character = character;
+	event.detail = traversal;
+	event.doit = doit;
+	event.keyCode = keyCode;
+	event.keyLocation = keyLocation;
+	event.stateMask = stateMask;
+	Shell shell = getShell ();
+
+	boolean all = false;
+	switch (traversal) {
+		case SWT.TRAVERSE_ESCAPE:
+		case SWT.TRAVERSE_RETURN:
+		case SWT.TRAVERSE_PAGE_NEXT:
+		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+			all = true;
+			// FALL THROUGH
+		}
+		case SWT.TRAVERSE_ARROW_NEXT:
+		case SWT.TRAVERSE_ARROW_PREVIOUS:
+		case SWT.TRAVERSE_TAB_NEXT:
+		case SWT.TRAVERSE_TAB_PREVIOUS: {
+			/* traversal is a valid traversal action */
+			break;
+		}
+		case SWT.TRAVERSE_MNEMONIC: {
+			return translateMnemonic (event, null) || shell.translateMnemonic (event, this);
+		}
+		default: {
+			/* traversal is not a valid traversal action */
+			return false;
+		}
+	}
+
+	Control control = this;
+	do {
+		if (control.traverse (event)) return true;
+		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+		if (control == shell) return false;
+		control = control.parent;
+	} while (all && control != null);
+	return false;
+}
 boolean traverse (Event event) {
 	sendEvent (SWT.Traverse, event);
 	if (isDisposed ()) return true;
@@ -3318,7 +3496,8 @@ boolean traverse (Event event) {
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java
index 5c0b2ba..c4b0182 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -270,6 +270,7 @@ int dialogHandle () {
  */
 public Button getDefaultButton () {
 	checkWidget();
+	if (defaultButton != null && defaultButton.isDisposed()) return null;
 	return defaultButton;
 }
 /**
@@ -445,6 +446,16 @@ void releaseWidget () {
 	defaultButton = saveDefault = null;
 	label = null;
 }
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
 boolean restoreFocus () {
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
 	boolean restored = savedFocus != null && savedFocus.setFocus ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java
index 0f8d1f1..20bf390 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Display.java	
@@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -104,6 +104,7 @@ public class Display extends Device {
 	Callback windowCallback;
 	int windowProc, shellHandle;
 	static String APP_NAME = "SWT"; //$NON-NLS-1$
+	static String APP_VERSION = ""; //$NON-NLS-1$
 	static final String SHELL_HANDLE_KEY = "org.eclipse.swt.internal.motif.shellHandle"; //$NON-NLS-1$
 	byte [] displayName, appName, appClass;
 	Event [] eventQueue;
@@ -170,6 +171,10 @@ public class Display extends Device {
 	/* Display Shutdown */
 	Runnable [] disposeList;
 	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
+
 	/* System Tray */
 	Tray tray;
 	
@@ -183,6 +188,11 @@ public class Display extends Device {
 	Callback windowTimerCallback;
 	int windowTimerProc;
 	
+	/* Custom Resize */
+	int resizeLocationX, resizeLocationY;
+	int resizeBoundsX, resizeBoundsY, resizeBoundsWidth, resizeBoundsHeight;
+	int resizeMode;
+	
 	/* Key Mappings. */
 	static int [] [] KeyTable = {
 		
@@ -244,6 +254,11 @@ public class Display extends Device {
 		{OS.XK_F13,	SWT.F13},
 		{OS.XK_F14,	SWT.F14},
 		{OS.XK_F15,	SWT.F15},
+		{OS.XK_F16,	SWT.F16},
+		{OS.XK_F17,	SWT.F17},
+		{OS.XK_F18,	SWT.F18},
+		{OS.XK_F19,	SWT.F19},
+		{OS.XK_F20,	SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{OS.XK_KP_Multiply,	SWT.KEYPAD_MULTIPLY},
@@ -291,6 +306,10 @@ public class Display extends Device {
 	/* Workaround for GP when disposing a display */
 	static boolean DisplayDisposed;
 
+	/* Skinning support */
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package Name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
 	/*
@@ -492,6 +511,15 @@ public void addFilter (int eventType, Listener listener) {
 	if (filterTable == null) filterTable = new EventTable ();
 	filterTable.hook (eventType, listener);
 }
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -540,6 +568,14 @@ void addPopup (Menu menu) {
 	}
 	popups [index] = menu;
 }
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
 /**
  * Causes the <code>run()</code> method of the runnable to
  * be invoked by the user-interface thread at the next 
@@ -1030,6 +1066,8 @@ boolean filterEvent (int event) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int handle) {
 	checkDevice ();
@@ -1055,6 +1093,8 @@ public Widget findWidget (int handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int handle, int id) {
@@ -1917,6 +1957,22 @@ public Image getSystemImage (int style) {
 	return Image.motif_new (this, SWT.ICON, imagePixmap, maskPixmap);
 }
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	return null;
+}
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -2398,6 +2454,8 @@ void initializeWidgetTable () {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2432,6 +2490,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int gc, GCData data) {
 	OS.XFreeGC(xDisplay, gc);
@@ -2811,6 +2871,8 @@ void postEvent (Event event) {
  */
 public boolean readAndDispatch () {
 	checkDevice ();
+	runSkin ();
+	runDeferredLayouts ();
 	boolean events = runPopups ();
 	int xtContext = OS.XtDisplayToApplicationContext (xDisplay);
 	int status = OS.XtAppPending (xtContext);
@@ -3202,6 +3264,20 @@ boolean runFocusOutEvents () {
 	}
 	return true;
 }
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
 boolean runPopups () {
 	if (popups == null) return false;
 	boolean result = false;
@@ -3218,6 +3294,28 @@ boolean runPopups () {
 	popups = null;
 	return result;
 }
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
 void sendEvent (int eventType, Event event) {
 	if (eventTable == null && filterTable == null) {
 		return;
@@ -3286,16 +3384,56 @@ public void setCursorLocation (Point point) {
 	setCursorLocation (point.x, point.y);
 }
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
 public static void setAppName (String name) {
 	APP_NAME = name;
 }
+/**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
+}
 void setCurrentCaret (Caret caret) {
 	if (caretID != 0) OS.XtRemoveTimeOut (caretID);
 	caretID = 0;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java
index 8d82436..3d3e43b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Link.java	
@@ -441,6 +441,18 @@ void setForegroundPixel (int pixel) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java
index a9c5f18..f9dcf01 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Menu.java	
@@ -762,6 +762,14 @@ public void removeMenuListener(MenuListener listener) {
 	eventTable.unhook(SWT.Hide, listener);
 	eventTable.unhook(SWT.Show, listener);
 }
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
 void sendHelpEvent (int callData) {
 	if (hooks (SWT.Help)) {
 		postEvent (SWT.Help);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java
index 592f904..5dc8c8a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java	
@@ -230,7 +230,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -612,6 +618,12 @@ public void removeSelectionListener(SelectionListener listener) {
 	eventTable.unhook(SWT.Selection, listener);
 	eventTable.unhook(SWT.DefaultSelection,listener);	
 }
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
 void selectRadio () {
 	int index = 0;
 	MenuItem [] items = parent.getItems ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java
index e537ea4..3df6eef 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ProgressBar.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,17 +126,17 @@ void createHandle (int index) {
 	};
 	handle = OS.XmCreateScrollBar (parentHandle, null, argList, argList.length / 2);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-	if ((style & SWT.INDETERMINATE) != 0) createTimer ();
+	if ((style & SWT.INDETERMINATE) != 0) createTimer (DELAY);
 }
 void createWidget (int index) {
 	super.createWidget (index);
 	foreground = defaultForeground ();
 }
-void createTimer () {
+void createTimer (int delay) {
 	int xDisplay = display.xDisplay;
 	int windowTimerProc = display.windowTimerProc;
 	int xtContext = OS.XtDisplayToApplicationContext (xDisplay);
-	timerId = OS.XtAppAddTimeOut (xtContext, DELAY, windowTimerProc, handle);
+	timerId = OS.XtAppAddTimeOut (xtContext, delay, windowTimerProc, handle);
 }
 void destroyTimer () {
 	if (timerId != 0) OS.XtRemoveTimeOut (timerId);
@@ -321,7 +321,7 @@ public void setSelection (int value) {
 	if (selection < minimum) selection = minimum;
 	if (selection > maximum) selection = maximum;
 	setThumb(selection - minimum);
-	update ();
+	if (isVisible ()) update ();
 }
 /**
  * Sets the state of the receiver. The state must be one of these values:
@@ -372,11 +372,13 @@ void setThumb (int sliderSize) {
 	display.setWarnings (warnings);
 }
 int timerProc (int id) {
+	long time = System.currentTimeMillis();
 	int minimum = getMinimum ();
 	int range = getMaximum () - minimum + 1;
 	int value = getSelection () - minimum + 1;
 	setSelection (minimum + (value % range));	
-	createTimer ();
+	time = System.currentTimeMillis() - time;
+	createTimer (DELAY + (int)time);
 	return 0;
 }
 int XButtonPress (int w, int client_data, int call_data, int continue_to_dispatch) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java
index f7756ac..6415baf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ScrollBar.java	
@@ -294,8 +294,7 @@ public Point getSize () {
 	return new Point (argList [1] + borders, argList [3] + borders);
 }
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -313,6 +312,117 @@ public int getThumb () {
 	return argList [1];
 }
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	int [] argList = {
+			OS.XmNsliderSize, 0, //1
+			OS.XmNwidth, 0, //3
+			OS.XmNheight, 0, //5
+			OS.XmNminimum, 0, //7 
+			OS.XmNmaximum, 0, //9
+			OS.XmNvalue, 0, //11
+		};
+	OS.XtGetValues (handle, argList, argList.length / 2);
+	Rectangle rect;
+	if ((style & SWT.VERTICAL) != 0) {
+		int slideSize = argList [5], sliderSize, sliderPos;
+		if (slideSize > 2 * argList [3]) {
+			slideSize -= 2 * argList [3];
+			float factor = (float)slideSize / (argList[9] - argList[7]);
+			sliderSize = (int)(0.5f + argList[1] * factor);
+			sliderPos = (int) (((argList[11] - argList[7]) * factor) + 0.5) + argList [3];
+		} else {
+			sliderPos = slideSize / 2;
+			sliderSize = 0;
+		}
+		rect = new Rectangle(0, sliderPos, argList[3], sliderSize);
+	} else {
+		int slideSize = argList [3], sliderSize, sliderPos;
+		if (slideSize > 2 * argList [5]) {
+			slideSize -= 2 * argList [5];
+			float factor = (float)slideSize / (argList[9] - argList[7]);
+			sliderSize = (int)(0.5f + argList[1] * factor);
+			sliderPos = (int) (((argList[11] - argList[7]) * factor) + 0.5) + argList [5];
+		} else {
+			sliderPos = slideSize / 2;
+			sliderSize = 0;
+		}
+		rect = new Rectangle(sliderPos, 0, sliderSize, argList[5]);
+	}
+	short [] root_x = new short [1], root_y = new short [1];
+	OS.XtTranslateCoords (handle, (short) rect.x, (short) rect.y, root_x, root_y);
+	rect.x = root_x [0];
+	rect.y = root_y [0];
+	OS.XtTranslateCoords (parent.handle, (short) 0, (short) 0, root_x, root_y);
+	rect.x -= root_x [0];
+	rect.y -= root_y [0];
+	return rect;
+}
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	int [] argList = {
+			OS.XmNwidth, 0, //1
+			OS.XmNheight, 0, //3
+		};
+	OS.XtGetValues (handle, argList, argList.length / 2);
+	Rectangle rect;
+	if ((style & SWT.VERTICAL) != 0) {
+		int slideSize = argList [3], slidePos;
+		if (slideSize > 2 * argList [1]) {
+			slidePos = argList [1];
+			slideSize -= 2 * (argList [1]);
+		} else {
+			slidePos = slideSize / 2;
+			slideSize = 0;
+		}
+		rect = new Rectangle(0, slidePos, argList[1], slideSize);
+	} else {
+		int slideSize = argList [1], slidePos;
+		if (slideSize > 2 * argList [3]) {
+			slidePos = argList [3];
+			slideSize -= 2 * (argList [3]);
+		} else {
+			slidePos = slideSize / 2;
+			slideSize = 0;
+		}
+		rect = new Rectangle(slidePos, 0, slideSize, argList[3]);
+	}
+	short [] root_x = new short [1], root_y = new short [1];
+	OS.XtTranslateCoords (handle, (short) rect.x, (short) rect.y, root_x, root_y);
+	rect.x = root_x [0];
+	rect.y = root_y [0];
+	OS.XtTranslateCoords (parent.handle, (short) 0, (short) 0, root_x, root_y);
+	rect.x -= root_x [0];
+	rect.y -= root_y [0];
+	return rect;
+}
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -592,10 +702,13 @@ public void setSelection (int selection) {
 	display.setWarnings (warnings);
 }
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java
index bd8cc53..3cf87dc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Scrollable.java	
@@ -260,6 +260,11 @@ void releaseHandle () {
 	super.releaseHandle ();
 	scrolledHandle = formHandle = 0;
 }
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
 void setBackgroundPixel (int pixel) {
 	super.setBackgroundPixel (pixel);
 	/*
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
index 942cee0..744b821 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -128,6 +128,7 @@ public class Shell extends Decorations {
 	static final  byte [] _NET_WM_STATE_MAXIMIZED_VERT = Converter.wcsToMbcs(null, "_NET_WM_STATE_MAXIMIZED_VERT\0");
 	static final  byte [] _NET_WM_STATE_MAXIMIZED_HORZ = Converter.wcsToMbcs(null, "_NET_WM_STATE_MAXIMIZED_HORZ\0");
 	static final  byte [] _NET_WM_STATE_FULLSCREEN = Converter.wcsToMbcs(null, "_NET_WM_STATE_FULLSCREEN\0");
+	static final int BORDER = 2;
 /**
  * Constructs a new instance of this class. This is equivalent
  * to calling <code>Shell((Display) null)</code>.
@@ -275,6 +276,7 @@ Shell (Display display, Shell parent, int style, int handle, boolean embedded) {
 			state |= FOREIGN_HANDLE;
 		}
 	}
+	reskinWidget();
 	createWidget (0);
 }
 /**
@@ -357,7 +359,7 @@ public Shell (Shell parent, int style) {
 static int checkStyle (Shell parent, int style) {
 	style = Decorations.checkStyle (style);
 	style &= ~SWT.TRANSPARENT;
-	if ((style & SWT.ON_TOP) != 0) style &= ~SWT.SHELL_TRIM;
+	if ((style & SWT.ON_TOP) != 0) style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX);
 	int mask = SWT.SYSTEM_MODAL | SWT.APPLICATION_MODAL | SWT.PRIMARY_MODAL;
 	if ((style & SWT.SHEET) != 0) {
 		style &= ~SWT.SHEET;
@@ -392,6 +394,8 @@ public static Shell motif_new (Display display, int handle) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int handle) {
@@ -631,6 +635,11 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 		OS.XtGetValues (handle, argList, argList.length / 2);
 		border = argList [1];
 	}
+	if (isCustomResize ()) {
+		int [] argList = {OS.XmNmainWindowMarginHeight, 0};
+		OS.XtGetValues (scrolledHandle, argList, argList.length / 2);
+		border = argList [1];
+	}
 	trim.x -= trimLeft () + border;
 	trim.y -= trimTop () + border;
 	trim.width += trimWidth () + (border * 2);
@@ -772,6 +781,10 @@ void createHandle (int index) {
 		int [] argList2 = {OS.XmNborderWidth, 1};
 		OS.XtSetValues (handle, argList2, argList2.length / 2);
 	}
+	if (isCustomResize ()) {
+		int [] argList2 = {OS.XmNmainWindowMarginWidth, BORDER, OS.XmNmainWindowMarginHeight, BORDER};
+		OS.XtSetValues (scrolledHandle, argList2, argList2.length / 2);
+	} 
 	
 	/*
 	* Feature in Motif. There is no Motif API to negotiate for the
@@ -1122,6 +1135,32 @@ public Region getRegion () {
 	checkWidget ();
 	return region;
 }
+int getResizeMode (int x, int y) {
+	int [] argList = {OS.XmNwidth, 0, OS.XmNheight, 0, OS.XmNmainWindowMarginWidth, 0};
+	OS.XtGetValues (scrolledHandle, argList, argList.length / 2);
+	int width = argList [1];
+	int height = argList [3];
+	int border = argList [5];
+	int mode = 0;
+	if (y >= height - border) {
+		mode = OS.XC_bottom_side ;
+		if (x >= width - border - 16) mode = OS.XC_bottom_right_corner;
+		else if (x <= border + 16) mode = OS.XC_bottom_left_corner;
+	} else if (x >= width - border) {
+		mode = OS.XC_right_side;
+		if (y >= height - border - 16) mode = OS.XC_bottom_right_corner;
+		else if (y <= border + 16) mode = OS.XC_top_right_corner;
+	} else if (y <= border) {
+		mode = OS.XC_top_side;
+		if (x <= border + 16) mode = OS.XC_top_left_corner;
+		else if (x >= width - border - 16) mode = OS.XC_top_right_corner;
+	} else if (x <= border) {
+		mode = OS.XC_left_side;
+		if (y <= border + 16) mode = OS.XC_top_left_corner;
+		else if (y >= height - border - 16) mode = OS.XC_bottom_left_corner;
+	}
+	return mode;
+}
 public Shell getShell () {
 	checkWidget();
 	return this;
@@ -1197,6 +1236,12 @@ void hookEvents () {
 		int atom = OS.XmInternAtom (xDisplay, WM_DELETE_WINDOW, false);	
 		OS.XmAddWMProtocolCallback (shellHandle, atom, windowProc, DELETE_WINDOW);
 	}
+	if (isCustomResize ()) {
+		OS.XtAddEventHandler (scrolledHandle, OS.ButtonPressMask, false, windowProc, BUTTON_PRESS);
+		OS.XtAddEventHandler (scrolledHandle, OS.PointerMotionMask | OS.PointerMotionHintMask, false, windowProc, POINTER_MOTION);
+		OS.XtAddEventHandler (scrolledHandle, OS.LeaveWindowMask, false, windowProc, LEAVE_WINDOW);
+		OS.XtInsertEventHandler (scrolledHandle, OS.ExposureMask, false, windowProc, EXPOSURE, OS.XtListTail);
+	}
 }
 int imeHeight () {
 	if (!OS.IsDBLocale) return 0;
@@ -1216,6 +1261,9 @@ boolean isModal () {
 	OS.XtGetValues (shellHandle, argList, argList.length / 2);
 	return (argList [1] != -1 && argList [1] != OS.MWM_INPUT_MODELESS);
 }
+boolean isCustomResize () {
+	return (style & SWT.NO_TRIM) == 0 && (style & (SWT.RESIZE | SWT.ON_TOP)) == (SWT.RESIZE | SWT.ON_TOP);
+}
 boolean isUndecorated () {
 	return
 		(style & (SWT.SHELL_TRIM | SWT.BORDER)) == SWT.NONE ||
@@ -1342,6 +1390,15 @@ public void removeShellListener(ShellListener listener) {
 	eventTable.unhook(SWT.Deiconify,listener);
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * If the receiver is visible, moves it to the top of the 
  * drawing order for the display on which it was created 
@@ -1983,6 +2040,76 @@ int WM_DELETE_WINDOW (int w, int client_data, int call_data) {
 	closeWidget ();
 	return 0;
 }
+int XButtonPress (int w, int client_data, int call_data, int continue_to_dispatch) {
+	if (w == scrolledHandle) {
+		if (isCustomResize ()) {
+			if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) {
+				forceActive ();
+			}
+			XButtonEvent xEvent = new XButtonEvent ();
+			OS.memmove (xEvent, call_data, XButtonEvent.sizeof);
+			if (xEvent.button == 1) {
+				display.resizeLocationX = xEvent.x_root;
+				display.resizeLocationY = xEvent.y_root;
+				Point loc = new Point (0, 0);
+				getBounds(loc, null, null);
+				display.resizeBoundsX  = loc.x;
+				display.resizeBoundsY  = loc.y;
+				int [] argList = {OS.XmNwidth, 0, OS.XmNheight, 0};
+				OS.XtGetValues (shellHandle, argList, argList.length / 2);
+				display.resizeBoundsWidth = argList [1];
+				display.resizeBoundsHeight = argList [3];
+			}
+		}
+		return 0;
+	}
+	return super.XButtonPress(w, client_data, call_data, continue_to_dispatch);
+}
+int XExposure (int w, int client_data, int call_data, int continue_to_dispatch) {
+	if (w == scrolledHandle) {
+		if (isCustomResize ()) {
+			int xDisplay = OS.XtDisplay (scrolledHandle);
+			if (xDisplay == 0) return 0;
+			int xWindow = OS.XtWindow (scrolledHandle);
+			if (xWindow == 0) return 0;
+			int xGC = OS.XCreateGC (xDisplay, xWindow, 0, null);
+			if (xGC == 0) return 0;;
+			OS.XSetGraphicsExposures (xDisplay, xGC, false);
+			XExposeEvent xEvent = new XExposeEvent ();
+			OS.memmove (xEvent, call_data, XExposeEvent.sizeof);
+			int damageRgn = OS.XCreateRegion ();
+			OS.XtAddExposureToRegion (call_data, damageRgn);
+			OS.XSetRegion (xDisplay, xGC, damageRgn);
+			int [] argList = {
+					OS.XmNwidth, 0,
+					OS.XmNheight, 0, 
+					OS.XmNmainWindowMarginWidth, 0,
+					OS.XmNmainWindowMarginHeight, 0,
+					OS.XmNtopShadowColor, 0,
+					OS.XmNbottomShadowColor, 0};
+			OS.XtGetValues (scrolledHandle, argList, argList.length / 2);
+			int width = argList [1];
+			int height = argList [3];
+			int marginWidth = argList [5];
+			int marginHeight = argList [7];
+			int topShadowColor  = argList [9];
+			int bottomShadowColor  = argList [11];
+			OS.XSetForeground (xDisplay, xGC, bottomShadowColor);
+			OS.XFillRectangle (xDisplay, xWindow, xGC, width - marginWidth, 0, marginWidth, height);
+			OS.XFillRectangle (xDisplay, xWindow, xGC, 0, height - marginHeight, width, marginHeight);
+			OS.XSetForeground (xDisplay, xGC, topShadowColor);
+			int half = marginWidth / 2;
+			OS.XDrawLine (xDisplay, xWindow, xGC, 0, 0, 0, height - 1);
+			OS.XDrawLine (xDisplay, xWindow, xGC, half, 0, half, height - half - 1);
+			OS.XDrawLine (xDisplay, xWindow, xGC, 0, 0, width - 1, 0);
+			OS.XDrawLine (xDisplay, xWindow, xGC, 0, half, width - half - 1, half);
+			OS.XFreeGC (xDisplay, xGC);
+			OS.XDestroyRegion (damageRgn);
+		}
+		return 0;
+	}
+	return super.XExposure (w, client_data, call_data, continue_to_dispatch);
+}
 int XFocusChange (int w, int client_data, int call_data, int continue_to_dispatch) {
 	XFocusChangeEvent xEvent = new XFocusChangeEvent ();
 	OS.memmove (xEvent, call_data, XFocusChangeEvent.sizeof);
@@ -2027,6 +2154,118 @@ int XFocusChange (int w, int client_data, int call_data, int continue_to_dispatc
 	}
 	return 0;
 }
+int XLeaveWindow (int w, int client_data, int call_data, int continue_to_dispatch) {
+	if (w == scrolledHandle) {
+		if (isCustomResize ()) {
+			XCrossingEvent xEvent = new XCrossingEvent ();
+			OS.memmove (xEvent, call_data, XCrossingEvent.sizeof);
+			if ((xEvent.state & OS.Button1Mask) == 0) {
+				int xDisplay = OS.XtDisplay (scrolledHandle);
+				if (xDisplay != 0) {
+					int xWindow = OS.XtWindow (scrolledHandle);
+					if (xWindow != 0) {
+						OS.XUndefineCursor (xDisplay, xWindow);
+					}
+				}
+				display.resizeMode = 0;
+			}
+		}
+		return 0;
+	}
+	return super.XLeaveWindow (w, client_data, call_data, continue_to_dispatch);
+}
+int XPointerMotion (int w, int client_data, int call_data, int continue_to_dispatch) {
+	if (w == scrolledHandle) {
+		if (isCustomResize ()) {
+			XMotionEvent xEvent = new XMotionEvent ();
+			OS.memmove (xEvent, call_data, XMotionEvent.sizeof);
+			int xDisplay = xEvent.display;
+			if (xDisplay == 0) return 0;
+			int xWindow = xEvent.window;
+			if (xWindow == 0) return 0;
+			if (xEvent.is_hint != 0) {
+				int [] rootX = new int [1], rootY = new int [1], windowX = new int [1], windowY = new int [1], unused = new int [1], mask = new int [1];
+				if (OS.XQueryPointer (xDisplay, xWindow, unused, unused, rootX, rootY, windowX, windowY, mask) == 0) {
+					return 0;
+				}
+				xEvent.x = windowX [0];
+				xEvent.y = windowY [0];
+				xEvent.x_root = rootX [0];
+				xEvent.y_root = rootY [0];
+				xEvent.state = mask [0];
+			}
+			if ((xEvent.state & OS.Button1Mask) != 0) {
+				int [] argList = {OS.XmNmainWindowMarginWidth, 0};
+				OS.XtGetValues (scrolledHandle, argList, argList.length / 2);
+				int [] argList2 = {OS.XmNminWidth, 0, OS.XmNminHeight, 0, };
+				OS.XtGetValues (shellHandle, argList2, argList2.length / 2);
+				int minWidth = argList2 [1];
+				int minHeight = argList2 [3];
+				int border = argList [1];
+				int dx = (int)(xEvent.x_root - display.resizeLocationX);
+				int dy = (int)(xEvent.y_root - display.resizeLocationY);
+				int x = display.resizeBoundsX;
+				int y = display.resizeBoundsY;
+				int width = display.resizeBoundsWidth;
+				int height = display.resizeBoundsHeight;
+				int newWidth = Math.max(width - dx, Math.max(minWidth, border + border));
+				int newHeight = Math.max(height - dy, Math.max(minHeight, border + border));
+				switch (display.resizeMode) {
+					case OS.XC_left_side:
+						x += width - newWidth;
+						width = newWidth;
+						break;
+					case OS.XC_top_left_corner:
+						x += width - newWidth;
+						width = newWidth;
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.XC_top_side:
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.XC_top_right_corner:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						y += height - newHeight;
+						height = newHeight;
+						break;
+					case OS.XC_right_side:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						break;
+					case OS.XC_bottom_right_corner:
+						width = Math.max(width + dx, Math.max(minWidth, border + border));
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+					case OS.XC_bottom_side:
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+					case OS.XC_bottom_left_corner:
+						x += width - newWidth;
+						width = newWidth;
+						height = Math.max(height + dy, Math.max(minHeight, border + border));
+						break;
+				}
+				OS.XtConfigureWidget (shellHandle, x, y, width, height, 0);
+			} else {
+				int mode = getResizeMode (xEvent.x, xEvent.y);
+				if (mode != display.resizeMode) {
+					if (mode != 0) {
+						int cursor = OS.XCreateFontCursor (xDisplay, mode);
+						OS.XDefineCursor (xDisplay, xWindow, cursor);
+						OS.XFreeCursor(xDisplay, cursor);
+					} else {
+						OS.XUndefineCursor (xDisplay, xWindow);
+					}
+					OS.XFlush (xDisplay);
+					display.resizeMode = mode;
+				}
+			}
+		}
+		return 0;
+	}
+	return super.XPointerMotion (w, client_data, call_data, continue_to_dispatch);
+}
 int XStructureNotify (int w, int client_data, int call_data, int continue_to_dispatch) {
 	XConfigureEvent xEvent = new XConfigureEvent ();
 	OS.memmove (xEvent, call_data, XConfigureEvent.sizeof);
@@ -2082,6 +2321,7 @@ int XStructureNotify (int w, int client_data, int call_data, int continue_to_dis
 			}
 			return 0;
 		case OS.MapNotify:
+			reparented = true;
 			if (minimized) {
 				minimized = false;
 				sendEvent (SWT.Deiconify);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java
index 0ac37fc..0255d53 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Slider.java	
@@ -258,8 +258,7 @@ public int getSelection () {
 	return argList [1];
 }
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -440,10 +439,13 @@ public void setSelection (int value) {
 	display.setWarnings (warnings);
 }
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java
index f81af4c..11433a7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Spinner.java	
@@ -697,11 +697,11 @@ public void setIncrement (int value) {
 }
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -712,7 +712,7 @@ public void setMaximum (int value) {
 	checkWidget ();
 	int [] argList1 = {OS.XmNminimumValue, 0, OS.XmNposition, 0};
 	OS.XtGetValues (handle, argList1, argList1.length / 2);	
-	if (value <= argList1 [1]) return;
+	if (value < argList1 [1]) return;
 	int position = argList1 [3];
 	if (value < position) position = value;
 	int [] argList2 = {OS.XmNposition, position, OS.XmNmaximumValue, value};
@@ -720,11 +720,11 @@ public void setMaximum (int value) {
 }
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -735,7 +735,7 @@ public void setMinimum (int value) {
 	checkWidget ();
 	int [] argList1 = {OS.XmNmaximumValue, 0, OS.XmNposition, 0};
 	OS.XtGetValues (handle, argList1, argList1.length / 2);
-	if (value >= argList1 [1]) return;
+	if (value > argList1 [1]) return;
 	int position = argList1 [3];
 	if (value > position) position = value;
 	int [] argList2 = {OS.XmNposition, position, OS.XmNminimumValue, value};
@@ -832,7 +832,7 @@ public void setTextLimit (int limit) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java
index bb12017..3e72a30 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Text.java	
@@ -32,7 +32,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java
index a9d66b0..a5afb59 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolBar.java	
@@ -457,6 +457,15 @@ void removeControl (Control control) {
 		if (item.control == control) item.setControl (null);
 	}
 }
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
 void setBackgroundPixel (int pixel) {
 	super.setBackgroundPixel (pixel);
 	for (int i=0; i<itemCount; i++) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java
index 9908c46..3acbc23 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/ToolItem.java	
@@ -140,6 +140,12 @@ public ToolItem (ToolBar parent, int style, int index) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java
index b7d096f..77ace94 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Tracker.java	
@@ -131,6 +131,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
index de13534..34256cb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java	
@@ -53,6 +53,8 @@ public abstract class Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	int style, state;
@@ -85,6 +87,9 @@ public abstract class Widget {
 	static final int FOREIGN_HANDLE = 1<<13;
 	static final int DRAG_DETECT = 1<<14;
 
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<15;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -161,6 +166,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 /**
  * Adds the listener to the collection of listeners who will
@@ -334,6 +340,7 @@ void destroyWidget () {
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -544,7 +551,7 @@ boolean hooks (int eventType) {
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -753,6 +760,8 @@ public void removeListener (int eventType, Listener handler) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener handler) {
 	checkWidget();
@@ -761,6 +770,47 @@ protected void removeListener (int eventType, SWTEventListener handler) {
 	eventTable.unhook (eventType, handler);
 }
 /**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+void reskinChildren (int flags) {	
+}
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+/**
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
@@ -798,6 +848,7 @@ boolean setKeyState (Event event, XKeyEvent xEvent) {
 	int [] keysym = new int [1];
 	OS.XLookupString (xEvent, buffer, buffer.length, keysym, null);
 	boolean isNull = display.fixKey (keysym, buffer, xEvent.state);
+	setLocationState (event, keysym [0]);
 	if (keysym [0] != 0) {
 		event.keyCode = Display.translateKey (keysym [0]);
 	}
@@ -822,6 +873,56 @@ boolean setKeyState (Event event, XKeyEvent xEvent) {
 	}
 	return setInputState (event, xEvent.state);
 }
+void setLocationState (Event event, int keysym) {
+	switch (keysym) {
+		case OS.XK_Alt_L:
+		case OS.XK_Meta_L:
+		case OS.XK_Control_L:
+		case OS.XK_Shift_L:
+			event.keyLocation = SWT.LEFT;
+			break;
+		case OS.XK_Alt_R:
+		case OS.XK_Meta_R:
+		case OS.XK_Control_R:
+		case OS.XK_Shift_R:
+			event.keyLocation = SWT.RIGHT;
+			break;
+		case OS.XK_KP_Enter:
+		case OS.XK_KP_F1:
+		case OS.XK_KP_F2:
+		case OS.XK_KP_F3:
+		case OS.XK_KP_F4:
+		case OS.XK_KP_Home:
+		case OS.XK_KP_Left:
+		case OS.XK_KP_Up:
+		case OS.XK_KP_Right:
+		case OS.XK_KP_Down:
+		case OS.XK_KP_Page_Up:
+		case OS.XK_KP_Page_Down:
+		case OS.XK_KP_End:
+		case OS.XK_KP_Insert:
+		case OS.XK_KP_Delete:
+		case OS.XK_KP_Equal:
+		case OS.XK_KP_Multiply:
+		case OS.XK_KP_Add:
+		case OS.XK_KP_Subtract:
+		case OS.XK_KP_Decimal:
+		case OS.XK_KP_Divide:
+		case OS.XK_KP_0:
+		case OS.XK_KP_1:
+		case OS.XK_KP_2:
+		case OS.XK_KP_3:
+		case OS.XK_KP_4:
+		case OS.XK_KP_5:
+		case OS.XK_KP_6:
+		case OS.XK_KP_7:
+		case OS.XK_KP_8:
+		case OS.XK_KP_9:
+		case OS.XK_Num_Lock:
+			event.keyLocation = SWT.KEYPAD;
+			break;
+	}
+}
 void sendEvent (Event event) {
 	Display display = event.display;
 	if (!display.filterEvent (event)) {
@@ -951,6 +1052,17 @@ boolean sendKeyEvent (int type, XKeyEvent xEvent) {
 	}
 	return event.doit;
 }
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+//	setInputState (event, state);
+	sendEvent (eventType, event, send);
+}
 /**
  * Sets the application defined widget data associated
  * with the receiver to be the argument. The <em>widget
@@ -1049,6 +1161,7 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java
index 2459e50..5c3ea28 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Color.java	
@@ -41,6 +41,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -211,7 +213,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java
index aa75bdb..ba1491e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Cursor.java	
@@ -52,6 +52,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 
@@ -64,6 +66,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int bitmap;
 
@@ -77,6 +81,10 @@ Cursor(Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -435,7 +443,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java
index c7db383..8d1eafa 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -506,6 +506,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int internal_new_GC (GCData data);
 
@@ -521,6 +523,8 @@ public abstract int internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int handle, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java
index b3cece7..36ad265 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Font.java	
@@ -42,6 +42,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public byte[] handle;
 
@@ -203,7 +205,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java
index 4eac8a3..134cc77 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,6 +51,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String name;
 
@@ -63,6 +65,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int height;
 
@@ -75,6 +79,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int style;
 	
@@ -87,6 +93,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public byte[] stem;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontMetrics.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontMetrics.java
index d21e6e4..3d6deea 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontMetrics.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/FontMetrics.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -35,6 +35,8 @@ public final class FontMetrics {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public FontQueryInfo handle;
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java
index ea5c826..3b01e29 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java	
@@ -65,6 +65,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -2238,8 +2240,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -2544,7 +2547,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java
index 756a8d0..93bb5dc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java	
@@ -76,6 +76,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 
@@ -88,6 +90,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -907,6 +911,8 @@ void init(ImageData i) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -947,7 +953,9 @@ public int internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int pmMC, GCData data) {
 	OS.PmMemReleaseMC(pmMC);
@@ -959,7 +967,7 @@ public void internal_dispose_GC (int pmMC, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Region.java
index 1540cb3..9fb0d6d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Region.java	
@@ -38,6 +38,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -450,7 +452,7 @@ public boolean intersects (Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java
index 2910290..ec08b7c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Button.java	
@@ -116,6 +116,12 @@ static int checkStyle (int style) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java
index acd4200..eda2398 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Canvas.java	
@@ -191,12 +191,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java
index 8fc948a..0999db4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Combo.java	
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
index e87c651..cc5652c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java	
@@ -211,6 +211,7 @@ Control [] computeTabList () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget();
+	display.runSkin ();
 	Point size;
 	if (layout != null) {
 		if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
@@ -284,6 +285,37 @@ void createScrolledHandle (int parentHandle) {
 	createScrollBars ();
 }
 
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	drawBackground(gc, offsetX, offsetY, width, height);
+}
+
 void drawBackground (GC gc, int x, int y, int width, int height) {
 	Color oldColor = gc.getBackground();
 	gc.setBackground(getBackground());
@@ -759,42 +791,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -914,6 +1023,15 @@ void removeControl (Control control) {
 	fixTabList (control);
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resizeClientArea () {
 	int [] args = {OS.Pt_ARG_WIDTH, 0, 0, OS.Pt_ARG_HEIGHT, 0, 0};
 	OS.PtGetResources (scrolledHandle, args.length / 3, args);
@@ -1146,6 +1264,7 @@ void updateLayout (boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin ();
 		layout.layout (this, changed);
 	}
 	if (all) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
index 2a58676..2dffaa1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java	
@@ -26,7 +26,8 @@ import org.eclipse.swt.accessibility.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -613,7 +614,7 @@ boolean drawGripper (int x, int y, int width, int height, boolean vertical) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -655,7 +656,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1046,6 +1047,11 @@ public Menu getMenu () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1248,6 +1254,8 @@ int focusHandle () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	checkWidget();
@@ -1284,6 +1292,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int phGC, GCData data) {
 	checkWidget ();
@@ -2776,6 +2786,7 @@ public void setMenu (Menu menu) {
 public boolean setParent (Composite parent) {
 	checkWidget();
 	if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	reskin (SWT.ALL);
 	return false;
 }
 
@@ -3133,6 +3144,182 @@ int traversalCode (int key_sym, PhKeyEvent_t ke) {
 	return code;
 }
 
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	// the following should work but is not tested
+
+//	if (traversal == SWT.TRAVERSE_NONE) {
+//		switch (keyCode) {
+//			case SWT.ESC: {
+//				traversal = SWT.TRAVERSE_ESCAPE;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.CR: {
+//				traversal = SWT.TRAVERSE_RETURN;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.ARROW_DOWN:
+//			case SWT.ARROW_RIGHT: {
+//				traversal = SWT.TRAVERSE_ARROW_NEXT;
+//				doit = false;
+//				break;
+//			}
+//			case SWT.ARROW_UP:
+//			case SWT.ARROW_LEFT: {
+//				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+//				doit = false;
+//				break;
+//			}
+//			case SWT.TAB: {
+//				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.PAGE_DOWN: {
+//				if ((stateMask & SWT.CTRL) != 0) {
+//					traversal = SWT.TRAVERSE_PAGE_NEXT;
+//					doit = true;
+//				}
+//				break;
+//			}
+//			case SWT.PAGE_UP: {
+//				if ((stateMask & SWT.CTRL) != 0) {
+//					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+//					doit = true;
+//				}
+//				break;
+//			}
+//			default: {
+//				if (character != 0 && (stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+//					traversal = SWT.TRAVERSE_MNEMONIC;
+//					doit = true;
+//				}
+//				break;
+//			}
+//		}
+//	}
+//
+//	Event event = new Event ();
+//	event.character = character;
+//	event.detail = traversal;
+//	event.doit = doit;
+//	event.keyCode = keyCode;
+//	event.keyLocation = keyLocation;
+//	event.stateMask = stateMask;
+//	Shell shell = getShell ();
+//
+//	boolean all = false;
+//	switch (traversal) {
+//		case SWT.TRAVERSE_ESCAPE:
+//		case SWT.TRAVERSE_RETURN:
+//		case SWT.TRAVERSE_PAGE_NEXT:
+//		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+//			all = true;
+//			// FALL THROUGH
+//		}
+//		case SWT.TRAVERSE_ARROW_NEXT:
+//		case SWT.TRAVERSE_ARROW_PREVIOUS:
+//		case SWT.TRAVERSE_TAB_NEXT:
+//		case SWT.TRAVERSE_TAB_PREVIOUS: {
+//			/* traversal is a valid traversal action */
+//			break;
+//		}
+//		case SWT.TRAVERSE_MNEMONIC: {
+//			return translateMnemonic (event, null) || shell.translateMnemonic (event, this);
+//		}
+//		default: {
+//			/* traversal is not a valid traversal action */
+//			return false;
+//		}
+//	}
+//
+//	Control control = this;
+//	do {
+//		if (control.traverse (event)) return true;
+//		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+//		if (control == shell) return false;
+//		control = control.parent;
+//	} while (all && control != null);
+	return false;
+}
+
 boolean traverse (Event event) {
 	/*
 	* It is possible (but unlikely), that application
@@ -3163,7 +3350,8 @@ boolean traverse (Event event) {
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java
index cab7399..25282f2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -203,6 +203,7 @@ Control computeTabRoot () {
  */
 public Button getDefaultButton () {
 	checkWidget();
+	if (defaultButton != null && defaultButton.isDisposed ()) return null;
 	return defaultButton;
 }
 
@@ -394,6 +395,17 @@ void remove (Menu menu) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void resizeBounds (int width, int height) {
 	int menuHeight = 0;
 	if (menuBar != null) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java
index f94fb76..36adcfd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Display.java	
@@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -123,6 +123,10 @@ public class Display extends Device {
 	/* Display Shutdown */
 	Runnable [] disposeList;
 	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
+
 	/* System Tray */
 	Tray tray;
 	
@@ -138,6 +142,9 @@ public class Display extends Device {
 	/* Keyboard */
 	int lastKey, lastAscii;
 	
+	static String APP_NAME = "SWT";
+	static String APP_VERSION = ""; //$NON-NLS-1$
+
 	/* Key Mappings. */
 	private static final int [] [] KeyTable = {
 		
@@ -266,6 +273,11 @@ public class Display extends Device {
 	int SCROLLBAR_VERTICAL_BASIC_FLAGS;
 	int SCROLLBAR_HORIZONTAL_BASIC_FLAGS;
 
+	/* Skinning support */
+	static final int GROW_SIZE = 1024;
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package name */
 	static final String PACKAGE_NAME;
 	static {
@@ -381,6 +393,16 @@ public void addFilter (int eventType, Listener listener) {
 	filterTable.hook (eventType, listener);
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -412,6 +434,15 @@ public void addListener (int eventType, Listener listener) {
 	eventTable.hook (eventType, listener);
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 /**
  * Causes the <code>run()</code> method of the runnable to
  * be invoked by the user-interface thread at the next 
@@ -684,6 +715,8 @@ boolean filters (int eventType) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int handle) {
 	checkDevice ();
@@ -710,6 +743,8 @@ public Widget findWidget (int handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int handle, int id) {
@@ -873,15 +908,58 @@ public static Display getDefault () {
 }
 
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
 public static void setAppName (String name) {
-	/* Do nothing */
+	APP_NAME = name;
+}
+
+/**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
 }
 
 /**
@@ -1273,6 +1351,23 @@ public Image getSystemImage (int id) {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	return null;
+}
+
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -1616,6 +1711,8 @@ int inputProc (int data, int rcvid, int message, int size) {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -1643,6 +1740,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int phGC, GCData data) {
 	OS.PgDestroyGC(phGC);
@@ -2037,6 +2136,8 @@ void postEvent (Event event) {
  */
 public boolean readAndDispatch () {
 	checkDevice ();
+	runSkin ();
+	runDeferredLayouts ();
 	idle = false;
 	OS.PtRelease ();
 	OS.PtHold ();
@@ -2279,6 +2380,44 @@ boolean runDeferredEvents () {
 	return run;
 }
 
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
+
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+	
 void sendEvent (int eventType, Event event) {
 	if (eventTable == null && filterTable == null) {
 		return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java
index 4864a59..70e1559 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Link.java	
@@ -595,6 +595,18 @@ public void setFont (Font font) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java
index 6234527..c54ba7b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Menu.java	
@@ -697,6 +697,15 @@ public void removeMenuListener (MenuListener listener) {
 	eventTable.unhook (SWT.Show, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the default menu item to the argument or removes
  * the default emphasis when the argument is <code>null</code>.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java
index e2f9422..ec4107d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/MenuItem.java	
@@ -197,7 +197,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -572,6 +578,13 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 void selectRadio () {
 	int index = 0;
 	MenuItem [] items = parent.getItems ();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java
index e92f951..5e0608d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ScrollBar.java	
@@ -319,8 +319,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -339,6 +338,45 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	//TODO implement getThumbBounds()
+	return null;
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	//TODO implement getThumbTrackBounds()
+	return null;
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -625,10 +663,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scrollable.java
index 22cc818..3d7b291 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Scrollable.java	
@@ -220,6 +220,12 @@ void resizeClientArea () {
 	/* Do nothing */
 }
 
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 void releaseChildren (boolean destroy) {
 	if (horizontalBar != null) {
 		horizontalBar.release (false);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
index e66164f..dbd6597 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java	
@@ -265,6 +265,7 @@ Shell (Display display, Shell parent, int style, int handle) {
 	this.parent = parent;
 	this.display = display;
 	this.handle = handle;
+	reskinWidget();
 	createWidget (0);
 }
 
@@ -965,6 +966,15 @@ public void removeShellListener (ShellListener listener) {
 	eventTable.unhook (SWT.Deactivate, listener);
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * If the receiver is visible, moves it to the top of the 
  * drawing order for the display on which it was created 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java
index 8de4424..5825034 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Slider.java	
@@ -282,8 +282,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -488,10 +487,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java
index e8e5d1a..217890c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Spinner.java	
@@ -670,11 +670,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -689,11 +689,11 @@ public void setMaximum (int value) {
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java
index 35c64ff..e745ef6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/TabFolder.java	
@@ -604,6 +604,16 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<itemCount; i++) {
+			TabItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize, boolean events) {
 	int result = super.setBounds (x, y, width, height, move, resize, events);
 	if ((result & RESIZED) != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java
index 4fdf962..b41ca62 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Text.java	
@@ -32,7 +32,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolBar.java
index 823bff5..078e189 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolBar.java	
@@ -414,6 +414,16 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setBackgroundPixel (int pixel) {
 	super.setBackgroundPixel (pixel);
 	for (int i = 0; i < itemCount; i++) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java
index ee26514..74ea3c3 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/ToolItem.java	
@@ -137,6 +137,12 @@ public ToolItem (ToolBar parent, int style, int index) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Tracker.java
index 0ea5d78..1e6e5db 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Tracker.java	
@@ -97,6 +97,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
index 19b0c5f..47cd148 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java	
@@ -53,6 +53,8 @@ public abstract class Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	int style, state;
@@ -83,6 +85,9 @@ public abstract class Widget {
 	static final int RELEASED		= 1<<11;
 	static final int DISPOSE_SENT	= 1<<12;
 	
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<13;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -125,6 +130,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 
 static int checkBits (int style, int int0, int int1, int int2, int int3, int int4, int int5) {
@@ -416,6 +422,7 @@ void destroyWidget () {
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -635,7 +642,7 @@ void hookEvents () {
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -899,6 +906,8 @@ public void removeListener (int eventType, Listener handler) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener handler) {
 	checkWidget();
@@ -908,6 +917,50 @@ protected void removeListener (int eventType, SWTEventListener handler) {
 }
 
 /**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
+/**
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
@@ -996,6 +1049,19 @@ void sendEvent (int eventType, Event event, boolean send) {
 	}
 }
 
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+//	setInputState (event, state);
+	sendEvent (eventType, event, send);
+}
+
 /**
  * Sets the application defined widget data associated
  * with the receiver to be the argument. The <em>widget
@@ -1094,6 +1160,7 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 boolean setInputState (Event event, int type, int key_mods, int button_state) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java
index 3603b53..d1c6a09 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Color.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -283,7 +285,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
@@ -315,6 +317,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the color
  * @return a new color object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Color win32_new(Device device, int handle) {
 	Color color = new Color(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
index 6c5273c..7cff455 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -149,6 +151,10 @@ Cursor(Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -332,10 +338,60 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
 		hotspotY >= source.height || hotspotY < 0) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
-	ImageData mask = source.getTransparencyMask();
-	int /*long*/ [] result = Image.init(this.device, null, source, mask);
-	int /*long*/ hBitmap = result[0];
-	int /*long*/ hMask = result[1];
+	int /*long*/ hBitmap = 0;
+	int /*long*/ hMask = 0;
+	if (source.maskData == null && source.transparentPixel == -1 && (source.alpha != -1 || source.alphaData != null)) {
+		PaletteData palette = source.palette;
+		PaletteData newPalette = new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
+		ImageData img = new ImageData(source.width, source.height, 32, newPalette);
+		if (palette.isDirect) {
+			ImageData.blit(ImageData.BLIT_SRC, 
+				source.data, source.depth, source.bytesPerLine, source.getByteOrder(), 0, 0, source.width, source.height, palette.redMask, palette.greenMask, palette.blueMask,
+				ImageData.ALPHA_OPAQUE, null, 0, 0, 0,
+				img.data, img.depth, img.bytesPerLine, img.getByteOrder(), 0, 0, img.width, img.height, newPalette.redMask, newPalette.greenMask, newPalette.blueMask,
+				false, false);
+		} else {
+			RGB[] rgbs = palette.getRGBs();
+			int length = rgbs.length;
+			byte[] srcReds = new byte[length];
+			byte[] srcGreens = new byte[length];
+			byte[] srcBlues = new byte[length];
+			for (int i = 0; i < rgbs.length; i++) {
+				RGB rgb = rgbs[i];
+				if (rgb == null) continue;
+				srcReds[i] = (byte)rgb.red;
+				srcGreens[i] = (byte)rgb.green;
+				srcBlues[i] = (byte)rgb.blue;
+			}
+			ImageData.blit(ImageData.BLIT_SRC,
+				source.data, source.depth, source.bytesPerLine, source.getByteOrder(), 0, 0, source.width, source.height, srcReds, srcGreens, srcBlues,
+				ImageData.ALPHA_OPAQUE, null, 0, 0, 0,
+				img.data, img.depth, img.bytesPerLine, img.getByteOrder(), 0, 0, img.width, img.height, newPalette.redMask, newPalette.greenMask, newPalette.blueMask,
+				false, false);
+		}
+		hBitmap = Image.createDIB(source.width, source.height, 32);
+		if (hBitmap == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+		BITMAP dibBM = new BITMAP();
+		OS.GetObject(hBitmap, BITMAP.sizeof, dibBM);
+		byte[] srcData = img.data;
+		if (source.alpha != -1) {
+			for (int i = 3, ap=0; i < srcData.length; i+=4, ap++) {
+				srcData[i] = (byte)source.alpha;
+			}
+		} else if (source.alphaData != null) {
+			for (int sp = 3, ap=0; sp < srcData.length; sp+=4, ap++) {
+				srcData[sp] = source.alphaData[ap];
+			}
+		}
+		OS.MoveMemory(dibBM.bmBits, srcData, srcData.length);
+		hMask = OS.CreateBitmap(source.width, source.height, 1, 1, new byte[(((source.width + 7) / 8) + 3) / 4 * 4 * source.height]);
+		if (hMask == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+	} else {
+		ImageData mask = source.getTransparencyMask();
+		int /*long*/ [] result = Image.init(this.device, null, source, mask);
+		hBitmap = result[0];
+		hMask = result[1];
+	}
 	/* Create the icon */
 	ICONINFO info = new ICONINFO();
 	info.fIcon = false;
@@ -344,9 +400,9 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
 	info.xHotspot = hotspotX;
 	info.yHotspot = hotspotY;
 	handle = OS.CreateIconIndirect(info);
-	if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	OS.DeleteObject(hBitmap);
 	OS.DeleteObject(hMask);
+	if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	isIcon = true;
 	init();
 }
@@ -418,7 +474,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
@@ -450,6 +506,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the cursor
  * @return a new cursor object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Cursor win32_new(Device device, int handle) {
 	Cursor cursor = new Cursor(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
index 7745d90..a885a9d 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,8 @@ public abstract class Device implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ hPalette = 0;
 	int [] colorRefCount;
@@ -770,6 +772,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int /*long*/ internal_new_GC (GCData data);
 
@@ -785,6 +789,8 @@ public abstract int /*long*/ internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void /*long*/ internal_dispose_GC (int /*long*/ hDC, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java
index 23cc7aa..b21356c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Font.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -216,7 +218,7 @@ void init (FontData fd) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
@@ -248,6 +250,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the font
  * @return a new font object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Font win32_new(Device device, int /*long*/ handle) {
 	Font font = new Font(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java
index 15e6cb2..c091768 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -52,6 +52,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public LOGFONT data;
 	
@@ -64,6 +66,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public float height;
 	
@@ -480,6 +484,7 @@ public int hashCode () {
 public void setHeight(int height) {
 	if (height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	this.height = height;
+	data.lfWidth = 0;
 }
 
 /*public*/ void setHeight(float height) {
@@ -661,6 +666,8 @@ public String toString() {
  * @param data the <code>LOGFONT</code> for the font data
  * @param height the height of the font data
  * @return a new font data object containing the specified <code>LOGFONT</code> and height
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static FontData win32_new(LOGFONT data, float height) {
 	return new FontData(data, height);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java
index bfa851c..6cec1e4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/FontMetrics.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,6 +36,8 @@ public final class FontMetrics {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public TEXTMETRIC handle;
 	
@@ -173,6 +175,8 @@ public int hashCode() {
  *
  * @param handle the <code>TEXTMETRIC</code> containing information about a font
  * @return a new font metrics object containing the specified <code>TEXTMETRIC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static FontMetrics win32_new(TEXTMETRIC handle) {
 	FontMetrics fontMetrics = new FontMetrics();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index 9ea4088..46b5929 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java	
@@ -68,6 +68,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -1195,7 +1197,19 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
 		return;
 	}
 
-	if (OS.IsWinNT && OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
+	boolean alphaBlendSupport = OS.IsWinNT && OS.WIN32_VERSION >= OS.VERSION(4, 10);
+	boolean isPrinter = OS.GetDeviceCaps(handle, OS.TECHNOLOGY) == OS.DT_RASPRINTER;
+	if (alphaBlendSupport && isPrinter) {
+		int caps = OS.GetDeviceCaps(handle, OS.SHADEBLENDCAPS);
+		if (caps != 0) {
+			if (srcImage.alpha != -1) {
+				alphaBlendSupport = (caps & OS.SB_CONST_ALPHA) != 0;
+			} else {
+				alphaBlendSupport = (caps & OS.SB_PIXEL_ALPHA) != 0;
+			}
+		}
+	}
+	if (alphaBlendSupport) {
 		BLENDFUNCTION blend = new BLENDFUNCTION();
 		blend.BlendOp = OS.AC_SRC_OVER;
 		int /*long*/ srcHdc = OS.CreateCompatibleDC(handle);
@@ -1316,8 +1330,10 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
 	* stretch to a temporary HDC and blit back into the original HDC.
 	* Note that on WinCE StretchBlt correctly compresses the image when the
 	* source and destination HDCs are the same.
+	* 
+	* Note that this also fails when drawing to a printer.
 	*/
-	if ((OS.IsWinCE && (destWidth > srcWidth || destHeight > srcHeight)) || (!OS.IsWinNT && !OS.IsWinCE)) {
+	if ((OS.IsWinCE && (destWidth > srcWidth || destHeight > srcHeight)) || (!OS.IsWinNT && !OS.IsWinCE) || isPrinter) {
 		int /*long*/ tempHdc = OS.CreateCompatibleDC(handle);
 		int /*long*/ tempDib = Image.createDIB(destWidth, destHeight, 32);
 		if (tempDib == 0) SWT.error(SWT.ERROR_NO_HANDLES);		
@@ -2127,75 +2143,7 @@ public void drawString (String string, int x, int y, boolean isTransparent) {
 	int /*long*/ gdipGraphics = data.gdipGraphics;
 	if (gdipGraphics != 0) {
 		checkGC(FONT | FOREGROUND | (isTransparent ? 0 : BACKGROUND));
-		int nGlyphs = (length * 3 / 2) + 16;
-		GCP_RESULTS result = new GCP_RESULTS();
-		result.lStructSize = GCP_RESULTS.sizeof;
-		result.nGlyphs = nGlyphs;
-		int /*long*/ hHeap = OS.GetProcessHeap();
-		int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
-		int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
-		int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
-		int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
-		int /*long*/ hFont = data.hGDIFont;
-		if (hFont == 0 && data.font != null) hFont = data.font.handle;
-		int /*long*/ oldFont = 0;
-		if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
-		if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) | OS.LAYOUT_RTL);
-		OS.GetCharacterPlacementW(hdc, buffer, length, 0, result, dwFlags);
-		if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) & ~OS.LAYOUT_RTL);
-		TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
-		OS.GetTextMetrics(hdc, lptm);
-		if (hFont != 0) OS.SelectObject(hdc, oldFont);
-		Gdip.Graphics_ReleaseHDC(gdipGraphics, hdc);
-		nGlyphs = result.nGlyphs;
-		int drawX = x, drawY = y + lptm.tmAscent;
-		int[] dx = new int[nGlyphs];
-		OS.MoveMemory(dx, result.lpDx, nGlyphs * 4);
-		float[] points = new float[dx.length * 2];
-		for (int i = 0, j = 0; i < dx.length; i++) {
-			points[j++] = drawX;
-			points[j++] = drawY;
-			drawX += dx[i];
-		}
-		RectF bounds = null;
-		if (!isTransparent || (data.style & SWT.MIRRORED) != 0) {
-			bounds = new RectF();
-			Gdip.Graphics_MeasureDriverString(gdipGraphics, lpGlyphs, nGlyphs, data.gdipFont, points, 0, 0, bounds);
-			if (!isTransparent) {
-				Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, Math.round(bounds.Width), Math.round(bounds.Height));
-			}
-		}
-		int gstate = 0;
-		int /*long*/ brush = getFgBrush();
-		if ((data.style & SWT.MIRRORED) != 0) {
-			switch (Gdip.Brush_GetType(brush)) {
-				case Gdip.BrushTypeLinearGradient:
-					Gdip.LinearGradientBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
-					Gdip.LinearGradientBrush_TranslateTransform(brush, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);	
-					break;			
-				case Gdip.BrushTypeTextureFill:
-					Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
-					Gdip.TextureBrush_TranslateTransform(brush, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);	
-					break;			
-			}
-			gstate = Gdip.Graphics_Save(gdipGraphics);
-			Gdip.Graphics_ScaleTransform(gdipGraphics, -1, 1, Gdip.MatrixOrderPrepend);
-			Gdip.Graphics_TranslateTransform(gdipGraphics, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);		 		 		 
-		}
-		Gdip.Graphics_DrawDriverString(gdipGraphics, lpGlyphs, result.nGlyphs, data.gdipFont, brush, points, 0, 0);
-		if ((data.style & SWT.MIRRORED) != 0) {
-			switch (Gdip.Brush_GetType(brush)) {
-				case Gdip.BrushTypeLinearGradient:
-					Gdip.LinearGradientBrush_ResetTransform(brush);
-					break;
-				case Gdip.BrushTypeTextureFill:
-					Gdip.TextureBrush_ResetTransform(brush);
-					break;
-			}
-			Gdip.Graphics_Restore(gdipGraphics, gstate);
-		}
-		OS.HeapFree(hHeap, 0, lpGlyphs);
-		OS.HeapFree(hHeap, 0, lpDx);
+		drawText(gdipGraphics, string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0, null);
 		return;
 	}
 	int rop2 = 0;
@@ -2345,56 +2293,7 @@ public void drawText (String string, int x, int y, int flags) {
 	int /*long*/ gdipGraphics = data.gdipGraphics;
 	if (gdipGraphics != 0) {
 		checkGC(FONT | FOREGROUND | ((flags & SWT.DRAW_TRANSPARENT) != 0 ? 0 : BACKGROUND));
-		int length = string.length();
-		char[] buffer = new char [length];
-		string.getChars(0, length, buffer, 0);
-		PointF pt = new PointF();
-		int /*long*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
-		int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
-		if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
-		Gdip.StringFormat_SetFormatFlags(format, formatFlags);
-		float[] tabs = (flags & SWT.DRAW_TAB) != 0 ? new float[]{measureSpace(data.gdipFont, format) * 8} : new float[1];
-		Gdip.StringFormat_SetTabStops(format, 0, tabs.length, tabs); 
-		int hotkeyPrefix = (flags & SWT.DRAW_MNEMONIC) != 0 ? Gdip.HotkeyPrefixShow : Gdip.HotkeyPrefixNone;
-		if ((flags & SWT.DRAW_MNEMONIC) != 0 && (data.uiState & OS.UISF_HIDEACCEL) != 0) hotkeyPrefix = Gdip.HotkeyPrefixHide;
-		Gdip.StringFormat_SetHotkeyPrefix(format, hotkeyPrefix);
-		if ((flags & SWT.DRAW_TRANSPARENT) == 0) {
-			RectF bounds = new RectF();
-			Gdip.Graphics_MeasureString(gdipGraphics, buffer, length, data.gdipFont, pt, format, bounds);
-			Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, Math.round(bounds.Width), Math.round(bounds.Height));
-		}
-		int gstate = 0;
-		int /*long*/ brush = getFgBrush();
-		if ((data.style & SWT.MIRRORED) != 0) {
-			switch (Gdip.Brush_GetType(brush)) {
-				case Gdip.BrushTypeLinearGradient:
-					Gdip.LinearGradientBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
-					Gdip.LinearGradientBrush_TranslateTransform(brush, - 2 * x, 0, Gdip.MatrixOrderPrepend);	
-					break;			
-				case Gdip.BrushTypeTextureFill:
-					Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
-					Gdip.TextureBrush_TranslateTransform(brush, - 2 * x, 0, Gdip.MatrixOrderPrepend);	
-					break;			
-			}
-			gstate = Gdip.Graphics_Save(gdipGraphics);
-			Gdip.Graphics_ScaleTransform(gdipGraphics, -1, 1, Gdip.MatrixOrderPrepend);
-			Gdip.Graphics_TranslateTransform(gdipGraphics, - 2 * x, 0, Gdip.MatrixOrderPrepend);		 		 		 
-		}
-		pt.X = x;
-		pt.Y = y;
-		Gdip.Graphics_DrawString(gdipGraphics, buffer, length, data.gdipFont, pt, format, brush);
-		if ((data.style & SWT.MIRRORED) != 0) {
-			switch (Gdip.Brush_GetType(brush)) {
-				case Gdip.BrushTypeLinearGradient:
-					Gdip.LinearGradientBrush_ResetTransform(brush);
-					break;
-				case Gdip.BrushTypeTextureFill:
-					Gdip.TextureBrush_ResetTransform(brush);
-					break;
-			}
-			Gdip.Graphics_Restore(gdipGraphics, gstate);
-		}
-		Gdip.StringFormat_delete(format);
+		drawText(gdipGraphics, string, x, y, flags, null);
 		return;
 	}
 	TCHAR buffer = new TCHAR(getCodePage(), string, false);
@@ -2461,6 +2360,280 @@ public void drawText (String string, int x, int y, int flags) {
 	OS.SetBkMode(handle, oldBkMode);
 }
 
+boolean useGDIP (int /*long*/ hdc, char[] buffer) {
+	if (OS.IsWinCE || !OS.IsUnicode) return false;
+	short[] glyphs = new short[buffer.length];
+	OS.GetGlyphIndicesW(hdc, buffer, buffer.length, glyphs, OS.GGI_MARK_NONEXISTING_GLYPHS);
+	for (int i = 0; i < glyphs.length; i++) {
+		if (glyphs [i] == -1) {
+			switch (buffer[i]) {
+				case '\t':
+				case '\n':
+				case '\r':
+					break;
+				default:
+					return true;
+			}
+		}
+	}
+	return false;
+}
+
+void drawText(int /*long*/ gdipGraphics, String string, int x, int y, int flags, Point size) {
+	int length = string.length();
+	char[] chars = new char [length];
+	string.getChars(0, length, chars, 0);
+	int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+	int /*long*/ hFont = data.hGDIFont;
+	if (hFont == 0 && data.font != null) hFont = data.font.handle;
+	int /*long*/ oldFont = 0;
+	if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
+	TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();
+	OS.GetTextMetrics(hdc, lptm);
+	boolean gdip = useGDIP(hdc, chars);
+	if (hFont != 0) OS.SelectObject(hdc, oldFont);
+	Gdip.Graphics_ReleaseHDC(gdipGraphics, hdc);
+	if (gdip) {
+		drawTextGDIP(gdipGraphics, string, x, y, flags, size == null, size);
+		return;
+	}
+	int i = 0, start = 0, end = 0, drawX = x, drawY = y, width = 0, mnemonicIndex = -1;
+	if ((flags & (SWT.DRAW_DELIMITER | SWT.DRAW_TAB | SWT.DRAW_MNEMONIC)) != 0) {
+		int tabWidth = lptm.tmAveCharWidth * 8;
+		while (i < length) {
+			char c = chars [end++] = chars [i++];
+			switch (c) {
+				case '\t':
+					if ((flags & SWT.DRAW_TAB) != 0) {
+						int l = end - start - 1;
+						RectF bounds = drawText(gdipGraphics, chars, start, l, drawX, drawY, flags, mnemonicIndex, lptm, size == null);
+						drawX += Math.ceil(bounds.Width);
+						drawX = x + (((drawX - x) / tabWidth) + 1) * tabWidth;
+						mnemonicIndex = -1;
+						start = end;
+					}
+					break;
+				case '&':
+					if ((flags & SWT.DRAW_MNEMONIC) != 0) {
+						if (i == length) {end--; continue;}
+						if (chars [i] == '&') {i++; continue;}
+						end--;
+						mnemonicIndex = end - start;
+					}
+					break;
+				case '\r':
+				case '\n':
+					if ((flags & SWT.DRAW_DELIMITER) != 0) {
+						int l = end - start - 1;
+						if (c == '\r' && end != length && chars[end] == '\n') {
+							end++;
+							i++;
+						}
+						RectF bounds = drawText(gdipGraphics, chars, start, l, drawX, drawY, flags, mnemonicIndex, lptm, size == null);
+						drawY += Math.ceil(bounds.Height);
+						width = Math.max(width, drawX + (int)Math.ceil(bounds.Width));
+						drawX = x;
+						mnemonicIndex = -1;
+						start = end;
+					}
+					break;
+			}
+		}
+		length = end;
+	}
+	RectF bounds = drawText(gdipGraphics, chars, start, length - start, drawX, drawY, flags, mnemonicIndex, lptm, size == null);
+	if (size != null) {
+		drawY += Math.ceil(bounds.Height);
+		width = Math.max(width, drawX + (int)Math.ceil(bounds.Width));
+		size.x = width;
+		size.y = drawY;
+	}
+}
+
+RectF drawText(int /*long*/ gdipGraphics, char[] buffer, int start, int length, int x, int y, int flags, int mnemonicIndex, TEXTMETRIC lptm, boolean draw) {
+	boolean drawMnemonic = draw && mnemonicIndex != -1 && (data.uiState & OS.UISF_HIDEACCEL) == 0;
+	boolean needsBounds = !draw || drawMnemonic || (flags & SWT.DRAW_TRANSPARENT) == 0 || (data.style & SWT.MIRRORED) != 0 || (flags & SWT.DRAW_DELIMITER) != 0;
+	if (length <= 0) {
+		RectF bounds = null;
+		if (needsBounds) {
+			bounds = new RectF();
+			bounds.Height = lptm.tmHeight;
+		}
+		return bounds;
+	}
+	int nGlyphs = (length * 3 / 2) + 16;
+	GCP_RESULTS result = new GCP_RESULTS();
+	result.lStructSize = GCP_RESULTS.sizeof;
+	result.nGlyphs = nGlyphs;
+	int /*long*/ hHeap = OS.GetProcessHeap();
+	int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+	int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
+	int /*long*/ lpOrder = 0;
+	int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
+	if (drawMnemonic) {
+		lpOrder = result.lpOrder = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
+	}
+	int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
+	int /*long*/ hFont = data.hGDIFont;
+	if (hFont == 0 && data.font != null) hFont = data.font.handle;
+	int /*long*/ oldFont = 0;
+	if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
+	if (start != 0) {
+		char[] temp = new char[length];
+		System.arraycopy(buffer, start, temp, 0, length);
+		buffer = temp;
+	}
+	if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) | OS.LAYOUT_RTL);
+	OS.GetCharacterPlacementW(hdc, buffer, length, 0, result, dwFlags);
+	if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) & ~OS.LAYOUT_RTL);
+	if (hFont != 0) OS.SelectObject(hdc, oldFont);
+	Gdip.Graphics_ReleaseHDC(gdipGraphics, hdc);
+	nGlyphs = result.nGlyphs;
+	int drawX = x, drawY = y + lptm.tmAscent;
+	int[] dx = new int[nGlyphs];
+	OS.MoveMemory(dx, result.lpDx, nGlyphs * 4);
+	float[] points = new float[dx.length * 2];
+	for (int i = 0, j = 0; i < dx.length; i++) {
+		points[j++] = drawX;
+		points[j++] = drawY;
+		drawX += dx[i];
+	}
+	RectF bounds = null;
+	if (needsBounds) {
+		bounds = new RectF();
+		Gdip.Graphics_MeasureDriverString(gdipGraphics, lpGlyphs, nGlyphs, data.gdipFont, points, 0, 0, bounds);
+	}
+	if (draw) {
+		if ((flags & SWT.DRAW_TRANSPARENT) == 0) {
+			Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
+		}
+		int gstate = 0;
+		int /*long*/ brush = getFgBrush();
+		if ((data.style & SWT.MIRRORED) != 0) {
+			switch (Gdip.Brush_GetType(brush)) {
+				case Gdip.BrushTypeLinearGradient:
+					Gdip.LinearGradientBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
+					Gdip.LinearGradientBrush_TranslateTransform(brush, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);	
+					break;			
+				case Gdip.BrushTypeTextureFill:
+					Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
+					Gdip.TextureBrush_TranslateTransform(brush, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);	
+					break;			
+			}
+			gstate = Gdip.Graphics_Save(gdipGraphics);
+			Gdip.Graphics_ScaleTransform(gdipGraphics, -1, 1, Gdip.MatrixOrderPrepend);
+			Gdip.Graphics_TranslateTransform(gdipGraphics, - 2 * x - bounds.Width, 0, Gdip.MatrixOrderPrepend);		 		 		 
+		}
+		Gdip.Graphics_DrawDriverString(gdipGraphics, lpGlyphs, result.nGlyphs, data.gdipFont, brush, points, 0, 0);
+		if ((data.style & SWT.MIRRORED) != 0) {
+			switch (Gdip.Brush_GetType(brush)) {
+				case Gdip.BrushTypeLinearGradient:
+					Gdip.LinearGradientBrush_ResetTransform(brush);
+					break;
+				case Gdip.BrushTypeTextureFill:
+					Gdip.TextureBrush_ResetTransform(brush);
+					break;
+			}
+			Gdip.Graphics_Restore(gdipGraphics, gstate);
+		}
+		if (drawMnemonic) {
+			int /*long*/ pen = Gdip.Pen_new(brush, 1);
+			if (pen != 0) {
+				int[] order = new int[1];
+				OS.MoveMemory(order, result.lpOrder + mnemonicIndex * 4, 4);
+				int mnemonicLeft, mnemonicRight;
+				if ((data.style & SWT.MIRRORED) != 0) {
+					mnemonicLeft = (int)Math.ceil(bounds.Width) - (int)points[order[0] * 2] + 2 * x;
+					mnemonicRight = mnemonicLeft - dx[order[0]];
+				} else {
+					mnemonicLeft = (int)points[order[0] * 2];
+					mnemonicRight = mnemonicLeft + dx[order[0]];
+				}
+				int mnemonicY = y + lptm.tmAscent + 2;
+				int smoothingMode = Gdip.Graphics_GetSmoothingMode(gdipGraphics);
+				Gdip.Graphics_SetSmoothingMode(gdipGraphics, Gdip.SmoothingModeNone);
+				Gdip.Graphics_DrawLine(gdipGraphics, pen, mnemonicLeft, mnemonicY, mnemonicRight, mnemonicY);
+				Gdip.Graphics_SetSmoothingMode(gdipGraphics, smoothingMode);
+				Gdip.Pen_delete(pen);
+			}
+		}
+	}
+	if (lpOrder != 0) OS.HeapFree(hHeap, 0, lpOrder);
+	OS.HeapFree(hHeap, 0, lpGlyphs);
+	OS.HeapFree(hHeap, 0, lpDx);
+	return bounds;
+}
+
+void drawTextGDIP(int /*long*/ gdipGraphics, String string, int x, int y, int flags, boolean draw, Point size) {
+	boolean needsBounds = !draw || (flags & SWT.DRAW_TRANSPARENT) == 0;
+	char[] buffer;
+	int length = string.length();
+	if (length != 0) {
+		buffer = new char [length];
+		string.getChars(0, length, buffer, 0);
+	} else {
+		if (draw) return;
+		buffer = new char[]{' '};
+	}
+	PointF pt = new PointF();
+	int /*long*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
+	int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
+	if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
+	Gdip.StringFormat_SetFormatFlags(format, formatFlags);
+	float[] tabs = (flags & SWT.DRAW_TAB) != 0 ? new float[]{measureSpace(data.gdipFont, format) * 8} : new float[1];
+	Gdip.StringFormat_SetTabStops(format, 0, tabs.length, tabs); 
+	int hotkeyPrefix = (flags & SWT.DRAW_MNEMONIC) != 0 ? Gdip.HotkeyPrefixShow : Gdip.HotkeyPrefixNone;
+	if ((flags & SWT.DRAW_MNEMONIC) != 0 && (data.uiState & OS.UISF_HIDEACCEL) != 0) hotkeyPrefix = Gdip.HotkeyPrefixHide;
+	Gdip.StringFormat_SetHotkeyPrefix(format, hotkeyPrefix);
+	RectF bounds = null;
+	if (needsBounds) {
+		bounds = new RectF();
+		Gdip.Graphics_MeasureString(gdipGraphics, buffer, buffer.length, data.gdipFont, pt, format, bounds);
+	}
+	if (draw) {
+		if ((flags & SWT.DRAW_TRANSPARENT) == 0) {
+			Gdip.Graphics_FillRectangle(gdipGraphics, data.gdipBrush, x, y, (int)Math.ceil(bounds.Width), (int)Math.ceil(bounds.Height));
+		}
+		int gstate = 0;
+		int /*long*/ brush = getFgBrush();
+		if ((data.style & SWT.MIRRORED) != 0) {
+			switch (Gdip.Brush_GetType(brush)) {
+				case Gdip.BrushTypeLinearGradient:
+					Gdip.LinearGradientBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
+					Gdip.LinearGradientBrush_TranslateTransform(brush, - 2 * x, 0, Gdip.MatrixOrderPrepend);	
+					break;			
+				case Gdip.BrushTypeTextureFill:
+					Gdip.TextureBrush_ScaleTransform(brush, -1, 1, Gdip.MatrixOrderPrepend);
+					Gdip.TextureBrush_TranslateTransform(brush, - 2 * x, 0, Gdip.MatrixOrderPrepend);	
+					break;			
+			}
+			gstate = Gdip.Graphics_Save(gdipGraphics);
+			Gdip.Graphics_ScaleTransform(gdipGraphics, -1, 1, Gdip.MatrixOrderPrepend);
+			Gdip.Graphics_TranslateTransform(gdipGraphics, - 2 * x, 0, Gdip.MatrixOrderPrepend);		 		 		 
+		}
+		pt.X = x;
+		pt.Y = y;
+		Gdip.Graphics_DrawString(gdipGraphics, buffer, buffer.length, data.gdipFont, pt, format, brush);
+		if ((data.style & SWT.MIRRORED) != 0) {
+			switch (Gdip.Brush_GetType(brush)) {
+				case Gdip.BrushTypeLinearGradient:
+					Gdip.LinearGradientBrush_ResetTransform(brush);
+					break;
+				case Gdip.BrushTypeTextureFill:
+					Gdip.TextureBrush_ResetTransform(brush);
+					break;
+			}
+			Gdip.Graphics_Restore(gdipGraphics, gstate);
+		}
+	}
+	Gdip.StringFormat_delete(format);
+	if (length == 0) bounds.Width = 0;
+	if (size != null) {
+		size.x = (int)Math.ceil(bounds.Width);
+		size.y = (int)Math.ceil(bounds.Height);
+	}
+}
+
 /**
  * Compares the argument to the receiver, and returns true
  * if they represent the <em>same</em> object using a class
@@ -3389,8 +3562,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -3842,7 +4016,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -4077,9 +4251,6 @@ void setClipping(int /*long*/ clipRgn) {
 			OS.OffsetRgn(hRgn, pt.x, pt.y);
 		}
 	}
-	if (hRgn != 0 && hRgn != clipRgn) {
-		OS.DeleteObject(hRgn);
-	}
 }
 
 /**
@@ -4388,9 +4559,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -4400,9 +4571,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -4762,44 +4933,9 @@ public Point stringExtent(String string) {
 	int length = string.length();
 	int /*long*/ gdipGraphics = data.gdipGraphics;
 	if (gdipGraphics != 0) {
-		RectF bounds = new RectF();
-		char[] buffer;
-		if (length != 0) {
-			buffer = new char [length];
-			string.getChars(0, length, buffer, 0);
-		} else {
-			buffer = new char[]{' '};
-		}
-		int nGlyphs = (length * 3 / 2) + 16;
-		GCP_RESULTS result = new GCP_RESULTS();
-		result.lStructSize = GCP_RESULTS.sizeof;
-		result.nGlyphs = nGlyphs;
-		int /*long*/ hHeap = OS.GetProcessHeap();
-		int /*long*/ lpDx = result.lpDx = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 4);
-		int /*long*/ lpGlyphs = result.lpGlyphs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, nGlyphs * 2);
-		int dwFlags = OS.GCP_GLYPHSHAPE | OS.GCP_REORDER | OS.GCP_LIGATE;
-		int /*long*/ hdc = Gdip.Graphics_GetHDC(gdipGraphics);
-		int /*long*/ hFont = data.hGDIFont;
-		if (hFont == 0 && data.font != null) hFont = data.font.handle;
-		int /*long*/ oldFont = 0;
-		if (hFont != 0) oldFont = OS.SelectObject(hdc, hFont);
-		if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) | OS.LAYOUT_RTL);
-		OS.GetCharacterPlacementW(hdc, buffer, length, 0, result, dwFlags);
-		if ((data.style & SWT.MIRRORED) != 0) OS.SetLayout(hdc, OS.GetLayout(hdc) & ~OS.LAYOUT_RTL);
-		if (hFont != 0) OS.SelectObject(hdc, oldFont);
-		Gdip.Graphics_ReleaseHDC(gdipGraphics, hdc);
-		int drawX = 0;
-		int[] dx = new int[result.nGlyphs];
-		OS.MoveMemory(dx, lpDx, result.nGlyphs * 4);	
-		float[] points = new float[dx.length * 2];
-		for (int i = 0, j = 0; i < dx.length; i++, j += 2) {
-			points[j] = drawX;
-			drawX += dx[i];
-		}
-		Gdip.Graphics_MeasureDriverString(gdipGraphics, lpGlyphs, result.nGlyphs, data.gdipFont, points, 0, 0, bounds);
-		OS.HeapFree(hHeap, 0, lpGlyphs);
-		OS.HeapFree(hHeap, 0, lpDx);
-		return new Point(length == 0 ? 0 : Math.round(bounds.Width), Math.round(bounds.Height));
+		Point size = new Point(0, 0);
+		drawText(gdipGraphics, string, 0, 0, 0, size);
+		return size;
 	}
 	SIZE size = new SIZE();
 	if (length == 0) {
@@ -4873,27 +5009,11 @@ public Point textExtent(String string, int flags) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
 	if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	checkGC(FONT);
-	if (data.gdipGraphics != 0) {
-		PointF pt = new PointF();
-		RectF bounds = new RectF();
-		char[] buffer;
-		int length = string.length();
-		if (length != 0) {
-			buffer = new char [length];
-			string.getChars(0, length, buffer, 0);
-		} else {
-			buffer = new char[]{' '};
-		}
-		int /*long*/ format = Gdip.StringFormat_Clone(Gdip.StringFormat_GenericTypographic());
-		int formatFlags = Gdip.StringFormat_GetFormatFlags(format) | Gdip.StringFormatFlagsMeasureTrailingSpaces;
-		if ((data.style & SWT.MIRRORED) != 0) formatFlags |= Gdip.StringFormatFlagsDirectionRightToLeft;
-		Gdip.StringFormat_SetFormatFlags(format, formatFlags);
-		float[] tabs = (flags & SWT.DRAW_TAB) != 0 ? new float[]{measureSpace(data.gdipFont, format) * 8} : new float[1];
-		Gdip.StringFormat_SetTabStops(format, 0, tabs.length, tabs); 
-		Gdip.StringFormat_SetHotkeyPrefix(format, (flags & SWT.DRAW_MNEMONIC) != 0 ? Gdip.HotkeyPrefixShow : Gdip.HotkeyPrefixNone);
-		Gdip.Graphics_MeasureString(data.gdipGraphics, buffer, buffer.length, data.gdipFont, pt, format, bounds);
-		Gdip.StringFormat_delete(format);
-		return new Point(length == 0 ? 0 : Math.round(bounds.Width), Math.round(bounds.Height));
+	int /*long*/ gdipGraphics = data.gdipGraphics;
+	if (gdipGraphics != 0) {
+		Point size = new Point(0, 0);
+		drawText(gdipGraphics, string, 0, 0, flags, size);
+		return size;
 	}
 	if (string.length () == 0) {
 		SIZE size = new SIZE();
@@ -4936,6 +5056,8 @@ public String toString () {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC win32_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
@@ -4959,6 +5081,8 @@ public static GC win32_new(Drawable drawable, GCData data) {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC win32_new(int /*long*/ hDC, GCData data) {
 	GC gc = new GC();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index 012f72e..9722cb6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java	
@@ -79,6 +79,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -91,6 +93,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -590,6 +594,12 @@ void initNative(String filename) {
 	* GDI+ image loading in this case.
 	*/
 	if (gdip && OS.PTR_SIZEOF == 8 && filename.toLowerCase().endsWith(".gif")) gdip = false;
+	/*
+	* Bug in GDI+. Bitmap.LockBits() fails to load GIF files in 
+	* Windows 7 when the image has a position offset in the first frame.
+	* The fix is to not use GDI+ image loading in this case.
+	*/
+	if ((!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(6, 1)) && filename.toLowerCase().endsWith(".gif")) gdip = false;
 	if (gdip) {
 		int length = filename.length();
 		char[] chars = new char[length+1];
@@ -1961,6 +1971,8 @@ void init(ImageData i) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -2004,7 +2016,9 @@ public int /*long*/ internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
 	OS.DeleteDC(hDC);
@@ -2016,7 +2030,7 @@ public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
@@ -2118,6 +2132,8 @@ public String toString () {
  * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>)
  * @param handle the OS handle for the image
  * @return a new image object containing the specified device, type and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Image win32_new(Device device, int type, int /*long*/ handle) {
 	Image image = new Image(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java
index db666da..44c6bbb 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Path.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,6 +46,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -539,7 +541,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java
index 406fcec..8c094dd 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Pattern.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,8 @@ public class Pattern extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -228,7 +230,7 @@ void destroy() {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java
index 5c63833..f1d7800 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Region.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 
@@ -403,7 +405,7 @@ public boolean intersects (Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
@@ -589,6 +591,8 @@ public String toString () {
  * @param device the device on which to allocate the region
  * @param handle the handle for the region
  * @return a new region object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Region win32_new(Device device, int handle) {
 	return new Region(device, handle);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index e0aaf15..4f72f56 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java	
@@ -43,9 +43,11 @@ public final class TextLayout extends Resource {
 	int wrapWidth;
 	int orientation;
 	int indent;
+	int wrapIndent;
 	boolean justify;
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	StyleItem[] styles;
 	int stylesCount;
 
@@ -275,7 +277,7 @@ void computeRuns (GC gc) {
 				}
 			}
 		} 
-		if (wrapWidth != -1 && lineWidth + run.width > wrapWidth && !run.tab) {
+		if (wrapWidth != -1 && lineWidth + run.width > wrapWidth && !run.tab && !run.lineBreak) {
 			int start = 0;
 			int[] piDx = new int[run.length];
 			if (run.style != null && run.style.metrics != null) {
@@ -365,7 +367,7 @@ void computeRuns (GC gc) {
 		lineWidth += run.width;
 		if (run.lineBreak) {
 			lineStart = i + 1;
-			lineWidth = run.softBreak ?  0 : indent;
+			lineWidth = run.softBreak ?  wrapIndent : indent;
 			lineCount++;
 		}
 	}
@@ -399,15 +401,17 @@ void computeRuns (GC gc) {
 			System.arraycopy(lineRuns, 0, runs[line], 0, lineRunCount);
 			
 			if (justify && wrapWidth != -1 && run.softBreak && lineWidth > 0) {
+				int lineIndent = wrapIndent;
 				if (line == 0) {
-					lineWidth += indent;
+					lineIndent = indent;
 				} else {
 					StyleItem[] previousLine = runs[line - 1];
 					StyleItem previousRun = previousLine[previousLine.length - 1];
 					if (previousRun.lineBreak && !previousRun.softBreak) {
-						lineWidth += indent;
+						lineIndent = indent;
 					}
 				}
+				lineWidth += lineIndent;
 				int /*long*/ hHeap = OS.GetProcessHeap();
 				int newLineWidth = 0;
 				for (int j = 0; j < runs[line].length; j++) {
@@ -462,6 +466,8 @@ void destroy () {
 	lineOffset = null;
 	lineY = null;
 	lineWidth = null;
+	segments = null;
+	segmentsChars = null;
 	if (mLangFontLink2 != 0) {
 		/* Release() */
 		OS.VtblCall(2, mLangFontLink2);
@@ -745,7 +751,7 @@ public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Col
 							if (gdipLinkColor == 0) gdipLinkColor = createGdipBrush(linkColor, alpha);
 							gdipFg = gdipLinkColor;
 						}
-						if (gdipFont != 0) {
+						if (gdipFont != 0 && !run.analysis.fNoGlyphIndex) {
 							pRect = drawRunTextGDIP(gdipGraphics, run, rect, gdipFont, baseline, gdipFg, gdipSelForeground, selectionStart, selectionEnd, alpha);
 						} else {
 							int fg = style != null && style.underline && style.underlineStyle == SWT.UNDERLINE_LINK ? linkColor : foreground;
@@ -880,6 +886,8 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
 		int /*long*/ pen = Gdip.Pen_new(brush, lineWidth);
 		Gdip.Pen_SetDashStyle(pen, lineStyle);
 		Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
+		int smoothingMode = Gdip.Graphics_GetSmoothingMode(graphics);
+		Gdip.Graphics_SetSmoothingMode(graphics, Gdip.SmoothingModeNone);
 		if (clipRect != null) {
 			int gstate = Gdip.Graphics_Save(graphics);
 			if (clipRect.left == -1) clipRect.left = 0;
@@ -903,6 +911,7 @@ RECT drawBorderGDIP(int /*long*/ graphics, int x, int y, int lineHeight, StyleIt
 			Gdip.Graphics_DrawRectangle(graphics, pen, x + left, y, run.x + run.width - left - 1, lineHeight - 1);
 		}
 		Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeHalf);
+		Gdip.Graphics_SetSmoothingMode(graphics, smoothingMode);
 		Gdip.Pen_delete(pen);
 		if (brush != selectionColor && brush != color) Gdip.SolidBrush_delete(brush);
 		return null;
@@ -1387,6 +1396,8 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
 		}
 		int gstate = 0;
 		Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeNone);
+		int smoothingMode = Gdip.Graphics_GetSmoothingMode(graphics);
+		Gdip.Graphics_SetSmoothingMode(graphics, Gdip.SmoothingModeNone);
 		switch (style.underlineStyle) {
 			case SWT.UNDERLINE_SQUIGGLE:
 			case SWT.UNDERLINE_ERROR: {
@@ -1483,6 +1494,7 @@ RECT drawUnderlineGDIP (int /*long*/ graphics, int x, int baseline, int lineUnde
 		}
 		if (brush != selectionColor && brush != color) Gdip.SolidBrush_delete(brush);
 		Gdip.Graphics_SetPixelOffsetMode(graphics, Gdip.PixelOffsetModeHalf);
+		Gdip.Graphics_SetSmoothingMode(graphics, smoothingMode);
 		return null;
 	}
 	return clipRect;
@@ -1788,7 +1800,7 @@ public int getLineCount () {
 }
 
 int getLineIndent (int lineIndex) {
-	int lineIndent = 0;
+	int lineIndent = wrapIndent;
 	if (lineIndex == 0) {
 		lineIndent = indent;
 	} else {
@@ -2283,32 +2295,53 @@ public int[] getSegments () {
 	return segments;
 }
 
+/**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
 String getSegmentsText() {
-	if (segments == null) return text;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return text;
 	int length = text.length();
 	if (length == 0) return text;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return text;
+	if (segments == null) return text;
+	int nSegments = segments.length;
+	if (nSegments == 0) return text;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return text;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return text;
+		}
 	}
 	char[] oldChars = new char[length];
 	text.getChars(0, length, oldChars, 0);
 	char[] newChars = new char[length + nSegments];
 	int charCount = 0, segmentCount = 0;
-	char separator = orientation == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
+	char defaultSeparator = orientation == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;
 	while (charCount < length) {
 		if (segmentCount < nSegments && charCount == segments[segmentCount]) {
+			char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 			newChars[charCount + segmentCount++] = separator;
 		} else {
 			newChars[charCount + segmentCount] = oldChars[charCount++];
 		}
 	}
-	if (segmentCount < nSegments) {
+	while (segmentCount < nSegments) {
 		segments[segmentCount] = charCount;
+		char separator = segmentsChars != null && segmentsChars.length > segmentCount ? segmentsChars[segmentCount] : defaultSeparator;
 		newChars[charCount + segmentCount++] = separator;
 	}
-	return new String(newChars, 0, Math.min(charCount + segmentCount, newChars.length));
+	return new String(newChars, 0, newChars.length);
 }
 
 /**
@@ -2424,12 +2457,28 @@ public int getWidth () {
 }
 
 /**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();
+	return wrapIndent;
+}
+
+/**
  * Returns <code>true</code> if the text layout has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -2451,10 +2500,8 @@ StyleItem[] itemize () {
 	if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {
 		scriptState.uBidiLevel = 1;
 		scriptState.fArabicNumContext = true;
-		SCRIPT_DIGITSUBSTITUTE psds = new SCRIPT_DIGITSUBSTITUTE();
-		OS.ScriptRecordDigitSubstitution(OS.LOCALE_USER_DEFAULT, psds);
-		OS.ScriptApplyDigitSubstitution(psds, scriptControl, scriptState);
 	}
+	OS.ScriptApplyDigitSubstitution(null, scriptControl, scriptState);
 	
 	int /*long*/ hHeap = OS.GetProcessHeap();
 	int /*long*/ pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);
@@ -2717,7 +2764,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -2726,6 +2773,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -2778,7 +2827,7 @@ public void setOrientation (int orientation) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -2787,12 +2836,18 @@ public void setOrientation (int orientation) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -2811,6 +2866,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the line spacing of the receiver.  The line spacing
  * is the space left between lines.
  *
@@ -3005,6 +3093,28 @@ public void setWidth (int width) {
 	this.wrapWidth = width;
 }
 
+/**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout();
+	if (wrapIndent < 0) return;	
+	if (this.wrapIndent == wrapIndent) return;
+	freeRuns();
+	this.wrapIndent = wrapIndent;
+}
+
 boolean shape (int /*long*/ hdc, StyleItem run, char[] chars, int[] glyphCount, int maxGlyphs, SCRIPT_PROPERTIES sp) {
 	boolean useCMAPcheck = !sp.fComplex && !run.analysis.fNoGlyphIndex;
 	if (useCMAPcheck) {
@@ -3069,6 +3179,12 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
 	OS.MoveMemory(sp, device.scripts[script], SCRIPT_PROPERTIES.sizeof);
 	boolean shapeSucceed = shape(hdc, run, chars, buffer,  maxGlyphs, sp);
 	if (!shapeSucceed) {
+		if (sp.fPrivateUseArea) {
+			run.analysis.fNoGlyphIndex = true;
+			shapeSucceed = shape(hdc, run, chars, buffer,  maxGlyphs, sp);
+		}
+	}
+	if (!shapeSucceed) {
 		int /*long*/ hFont = OS.GetCurrentObject(hdc, OS.OBJ_FONT);
 		int /*long*/ newFont = 0;
 		/*
@@ -3113,7 +3229,7 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
 					}
 					return 1;
 				}
-			};
+			}
 			MetaFileEnumProc object = new MetaFileEnumProc();
 			/* Avoid compiler warnings */
 			boolean compilerWarningWorkaround = false;
@@ -3275,16 +3391,8 @@ void shape (final int /*long*/ hdc, final StyleItem run) {
 }
 
 int validadeOffset(int offset, int step) {
-	offset += step;
-	if (segments != null && segments.length > 2) {
-		for (int i = 0; i < segments.length; i++) {
-			if (translateOffset(segments[i]) - 1 == offset) {
-				offset += step;
-				break;
-			}
-		}
-	}	
-	return offset;
+	offset = untranslateOffset(offset);
+	return translateOffset(offset + step);
 }
 
 /**
@@ -3299,13 +3407,16 @@ public String toString () {
 }
 
 int translateOffset(int offset) {
-	if (segments == null) return offset;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return offset;
 	int length = text.length();
 	if (length == 0) return offset;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return offset;
+	if (segments == null) return offset;
+	int nSegments = segments.length;
+	if (nSegments == 0) return offset;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return offset;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return offset;
+		}
 	}
 	for (int i = 0; i < nSegments && offset - i >= segments[i]; i++) {
 		offset++;
@@ -3314,13 +3425,16 @@ int translateOffset(int offset) {
 }
 
 int untranslateOffset(int offset) {
-	if (segments == null) return offset;
-	int nSegments = segments.length;
-	if (nSegments <= 1) return offset;
 	int length = text.length();
 	if (length == 0) return offset;
-	if (nSegments == 2) {
-		if (segments[0] == 0 && segments[1] == length) return offset;
+	if (segments == null) return offset;
+	int nSegments = segments.length;
+	if (nSegments == 0) return offset;
+	if (segmentsChars == null) {
+		if (nSegments == 1) return offset;
+		if (nSegments == 2) {
+			if (segments[0] == 0 && segments[1] == length) return offset;
+		}
 	}
 	for (int i = 0; i < nSegments && offset > segments[i]; i++) {
 		offset--;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java
index c4236ad..41fa940 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Transform.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -204,7 +206,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
index e82f728..b694c22 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -95,7 +95,7 @@ int /*long*/ copyBitmap (int /*long*/ hImage, int width, int height) {
 	* it to 24-bit depth.
 	*/
 	int /*long*/ hBitmap;
-	if (bm.bmBitsPixel == 32 && OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
+	if (bm.bmBitsPixel == 32 && OS.COMCTL32_MAJOR >= 6) {
 		BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
 		bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
 		bmiHeader.biWidth = width;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java
index 130a78a..02a5321 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java	
@@ -310,6 +310,12 @@ void _setText (String text) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
@@ -1010,7 +1016,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
@@ -1105,7 +1111,7 @@ void updateSelection (int flags) {
 		/*
 		* Feature in Windows. When BM_SETCHECK is used
 		* to set the checked state of a radio or check
-		* button, it sets the WM_TABSTOP style.  This
+		* button, it sets the WS_TABSTOP style.  This
 		* is undocumented and unwanted.  The fix is
 		* to save and restore the window style bits.
 		*/
@@ -1205,7 +1211,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
 LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
 	/*
 	* Feature in Windows. When Windows sets focus to
-	* a radio button, it sets the WM_TABSTOP style.
+	* a radio button, it sets the WS_TABSTOP style.
 	* This is undocumented and unwanted.  The fix is
 	* to save and restore the window style bits.
 	*/
@@ -1309,7 +1315,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 					}
 				}
 			}
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 	}
 	return super.wmCommandChild (wParam, lParam);
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java
index 3440be9..6e50f11 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Canvas.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -112,14 +112,7 @@ void clearArea (int x, int y, int width, int height) {
  * @since 3.2
  */
 public void drawBackground (GC gc, int x, int y, int width, int height) {
-	checkWidget ();
-	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
-	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-	RECT rect = new RECT ();
-	OS.SetRect (rect, x, y, x + width, y + height);
-	int /*long*/ hDC = gc.handle;
-	int pixel = background == -1 ? gc.getBackground ().handle : -1;
-	drawBackground (hDC, rect, pixel);
+	drawBackground(gc, x, y, width, height, 0, 0);
 }
 
 /**
@@ -174,12 +167,18 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /**
  * Scrolls a rectangular area of the receiver by first copying 
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 694b566..222fae2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
@@ -59,8 +59,11 @@ import org.eclipse.swt.events.*;
 
 public class Combo extends Composite {
 	boolean noSelection, ignoreDefaultSelection, ignoreCharacter, ignoreModify, ignoreResize, lockText;
-	int scrollWidth, visibleCount = 5;
+	int scrollWidth, visibleCount;
 	int /*long*/ cbtHook;
+
+	static final int VISIBLE_COUNT = 5;
+
 	/**
 	 * the operating system limit for the number of characters
 	 * that the text field in an instance of this class can hold
@@ -286,7 +289,10 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
 		switch (msg) {
 			case OS.WM_SIZE: {
 				ignoreResize = true;
+				boolean oldLockText = lockText;
+				if ((style & SWT.READ_ONLY) == 0) lockText = true;
 				int /*long*/ result = OS.CallWindowProc (ComboProc, hwnd, msg, wParam, lParam);
+				if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
 				ignoreResize = false;
 				return result;
 			}
@@ -521,6 +527,29 @@ void createHandle () {
 	}
 }
 
+void createWidget() {
+	super.createWidget();
+	visibleCount = VISIBLE_COUNT;
+	if ((style & SWT.SIMPLE) == 0) {
+		int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.CB_GETITEMHEIGHT, 0, 0);
+		if (itemHeight != OS.CB_ERR && itemHeight != 0) {
+			int maxHeight = 0;
+			if (OS.IsWinCE || OS.WIN32_VERSION < OS.VERSION (4, 10)) {
+				RECT rect = new RECT ();
+				OS.SystemParametersInfo (OS.SPI_GETWORKAREA, 0, rect, 0);
+				maxHeight = (rect.bottom - rect.top) / 3;
+			} else {
+				int /*long*/ hmonitor = OS.MonitorFromWindow (handle, OS.MONITOR_DEFAULTTONEAREST);
+				MONITORINFO lpmi = new MONITORINFO ();
+				lpmi.cbSize = MONITORINFO.sizeof;
+				OS.GetMonitorInfo (hmonitor, lpmi);
+				maxHeight = (lpmi.rcWork_bottom - lpmi.rcWork_top) / 3;
+			}
+			visibleCount = Math.max(visibleCount, maxHeight / itemHeight);
+		}
+	}
+}
+
 /**
  * Cuts the selected text.
  * <p>
@@ -1315,10 +1344,13 @@ boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lPara
 	}
 
 	/*
-	* If the left button is down, the text widget refuses the character.
+	* Feature in Windows.  If the left button is down in
+	* the text widget, it refuses the character.  The fix
+	* is to detect this case and avoid sending a verify
+	* event.
 	*/
 	if (OS.GetKeyState (OS.VK_LBUTTON) < 0) {
-		return true;
+		if (OS.GetDlgItem (handle, CBID_EDIT) == OS.GetCapture()) return true;
 	}
 
 	/* Verify the character */
@@ -1431,6 +1463,7 @@ void setBounds (int x, int y, int width, int height, int flags) {
 	* items and ignore the height value that the programmer supplies.
 	*/
 	if ((style & SWT.DROP_DOWN) != 0) {
+		int visibleCount = getItemCount() == 0 ? VISIBLE_COUNT : this.visibleCount;
 		height = getTextHeight () + (getItemHeight () * visibleCount) + 2;
 		/*
 		* Feature in Windows.  When a drop down combo box is resized,
@@ -1690,6 +1723,7 @@ void setScrollWidth (int scrollWidth) {
 	* by ignoring all WM_SETTEXT messages during processing of
 	* CB_SETDROPPEDWIDTH.
 	*/
+	boolean oldLockText = lockText;
 	if ((style & SWT.READ_ONLY) == 0) lockText = true;
 	if (scroll) {
 		OS.SendMessage (handle, OS.CB_SETDROPPEDWIDTH, 0, 0);
@@ -1699,7 +1733,7 @@ void setScrollWidth (int scrollWidth) {
 		OS.SendMessage (handle, OS.CB_SETDROPPEDWIDTH, scrollWidth, 0);
 		OS.SendMessage (handle, OS.CB_SETHORIZONTALEXTENT, 0, 0);
 	}
-	if ((style & SWT.READ_ONLY) == 0) lockText = false;
+	if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
 }
 
 void setScrollWidth (TCHAR buffer, boolean grow) {
@@ -1854,13 +1888,7 @@ public void setVisibleItemCount (int count) {
 	checkWidget ();
 	if (count < 0) return;
 	visibleCount = count;
-	if ((style & SWT.DROP_DOWN) != 0) {
-		forceResize ();
-		RECT rect = new RECT ();
-		OS.GetWindowRect (handle, rect);
-		int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE;
-		setBounds (0, 0, rect.right - rect.left, rect.bottom - rect.top, flags);
-	}
+	updateDropDownHeight ();
 }
 
 void subclass () {
@@ -1926,6 +1954,27 @@ void unsubclass () {
 	}
 }
 
+void updateDropDownHeight () {
+	/* 
+	* Feature in Windows.  If the combo box has the CBS_DROPDOWN
+	* or CBS_DROPDOWNLIST style, Windows uses the height that the
+	* programmer sets in SetWindowPos () to control height of the
+	* drop down list.  See #setBounds() for more details.
+	*/
+	if ((style & SWT.DROP_DOWN) != 0) {
+		RECT rect = new RECT ();
+		OS.SendMessage (handle, OS.CB_GETDROPPEDCONTROLRECT, 0, rect);
+		int visibleCount = getItemCount() == 0 ? VISIBLE_COUNT : this.visibleCount;
+		int height = getTextHeight () + (getItemHeight () * visibleCount) + 2;
+		if (height != (rect.bottom - rect.top)) {
+			forceResize ();
+			OS.GetWindowRect (handle, rect);
+			int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE;
+			SetWindowPos (handle, 0, 0, 0, rect.right - rect.left, height, flags);
+		}
+	}
+}
+
 String verifyText (String string, int start, int end, Event keyEvent) {
 	Event event = new Event ();
 	event.text = string;
@@ -2120,7 +2169,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 		if (oldSelection != newSelection) {
 			sendEvent (SWT.Modify);
 			if (isDisposed ()) return LRESULT.ZERO;
-			sendEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection, null, true);
 			if (isDisposed ()) return LRESULT.ZERO;
 		}
 	}
@@ -2176,9 +2225,10 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
 	* by ignoring all WM_SETTEXT messages during processing of
 	* WM_SIZE.
 	*/
+	boolean oldLockText = lockText;
 	if ((style & SWT.READ_ONLY) == 0) lockText = true;
 	LRESULT result = super.WM_SIZE (wParam, lParam);
-	if ((style & SWT.READ_ONLY) == 0) lockText = false;
+	if ((style & SWT.READ_ONLY) == 0) lockText = oldLockText;
 	/*
 	* Feature in Windows.  When CB_SETDROPPEDWIDTH is called with
 	* a width that is smaller than the current size of the combo
@@ -2258,7 +2308,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
 	switch ((int)/*64*/wParam) {
 		case SWT.TAB: return LRESULT.ZERO;
 		case SWT.CR:
-			if (!ignoreDefaultSelection) postEvent (SWT.DefaultSelection);
+			if (!ignoreDefaultSelection) sendSelectionEvent (SWT.DefaultSelection);
 			ignoreDefaultSelection = false;
 			// FALL THROUGH
 		case SWT.ESC:
@@ -2387,12 +2437,16 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 			*/
 			sendEvent (SWT.Modify);
 			if (isDisposed ()) return LRESULT.ZERO;
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 			break;
 		case OS.CBN_SETFOCUS:
 			sendFocusEvent (SWT.FocusIn);
 			if (isDisposed ()) return LRESULT.ZERO;
 			break;
+		case OS.CBN_DROPDOWN:
+			setCursor ();
+			updateDropDownHeight ();
+			break;
 		case OS.CBN_KILLFOCUS:
 			/*
 			* Bug in Windows.  When a combo box that is read only
@@ -2406,6 +2460,26 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 			sendFocusEvent (SWT.FocusOut);
 			if (isDisposed ()) return LRESULT.ZERO;
 			break;
+		case OS.EN_ALIGN_LTR_EC:
+		case OS.EN_ALIGN_RTL_EC:
+			Event event = new Event ();
+			event.doit = true;
+			sendEvent (SWT.OrientationChange, event);
+			if (!event.doit) {
+				int /*long*/ hwnd = lParam;
+				int bits1 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
+				int bits2 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
+				if (code == OS.EN_ALIGN_LTR_EC) {
+					bits1 |= (OS.WS_EX_RTLREADING | OS.WS_EX_RIGHT);
+					bits2 |= OS.ES_RIGHT;
+				} else {
+					bits1 &= ~(OS.WS_EX_RTLREADING | OS.WS_EX_RIGHT);
+					bits2 &= ~OS.ES_RIGHT;
+				}
+				OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits1);
+				OS.SetWindowLong (hwnd, OS.GWL_STYLE, bits2);
+			}
+			break;
 	}
 	return super.wmCommandChild (wParam, lParam);
 }
@@ -2477,7 +2551,7 @@ LRESULT wmSysKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lPara
 			if (oldSelection != newSelection) {
 				sendEvent (SWT.Modify);
 				if (isDisposed ()) return LRESULT.ZERO;
-				sendEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection, null, true);
 				if (isDisposed ()) return LRESULT.ZERO;
 			}
 			return new LRESULT (code);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index aefc816..60cb2cf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -224,6 +224,7 @@ Widget [] computeTabList () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
+	display.runSkin ();
 	Point size;
 	if (layout != null) {
 		if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
@@ -313,6 +314,44 @@ void createHandle () {
 	}
 }
 
+/** 
+ * Fills the interior of the rectangle specified by the arguments,
+ * with the receiver's background. 
+ *
+ * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from
+ * the <code>gc</code> origin to the origin of the parent image background. This is useful
+ * to ensure proper alignment of the image background.</p>
+ * 
+ * @param gc the gc where the rectangle is to be filled
+ * @param x the x coordinate of the rectangle to be filled
+ * @param y the y coordinate of the rectangle to be filled
+ * @param width the width of the rectangle to be filled
+ * @param height the height of the rectangle to be filled
+ * @param offsetX the image background x offset 
+ * @param offsetY the image background y offset
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public void drawBackground(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) {
+	checkWidget ();
+	if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	RECT rect = new RECT ();
+	OS.SetRect (rect, x, y, x + width, y + height);
+	int /*long*/ hDC = gc.handle;
+	int pixel = background == -1 ? gc.getBackground ().handle : -1;
+	drawBackground (hDC, rect, pixel, offsetX, offsetY);
+}
+
 Composite findDeferredControl () {
 	return layoutCount > 0 ? this : parent.findDeferredControl ();
 }
@@ -622,7 +661,7 @@ public void layout (boolean changed, boolean all) {
 	checkWidget ();
 	if (layout == null && !all) return;
 	markLayout (changed, all);
-	updateLayout (true, all);
+	updateLayout (all);
 }
 
 /**
@@ -656,42 +695,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (true, false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -781,6 +897,15 @@ void removeControl (Control control) {
 	resizeChildren ();
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resizeChildren () {
 	if (lpwp == null) return;
 	do {
@@ -970,7 +1095,7 @@ public void setLayoutDeferred (boolean defer) {
 	if (!defer) {
 		if (--layoutCount == 0) {
 			if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) {
-				updateLayout (true, true);
+				updateLayout (true);
 			}
 		}
 	} else {
@@ -1132,6 +1257,10 @@ void updateFont (Font oldFont, Font newFont) {
 	}
 }
 
+void updateLayout (boolean all) {
+	updateLayout (true, all);
+}
+
 void updateLayout (boolean resize, boolean all) {
 	Composite parent = findDeferredControl ();
 	if (parent != null) {
@@ -1141,6 +1270,7 @@ void updateLayout (boolean resize, boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin();
 		if (resize) setResizeChildren (false);
 		layout.layout (this, changed);
 		if (resize) setResizeChildren (true);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index d4578c6..9ec0de7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,8 @@ import org.eclipse.swt.accessibility.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -52,6 +53,8 @@ public abstract class Control extends Widget implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	Composite parent;
@@ -443,6 +446,20 @@ public void addTraverseListener (TraverseListener listener) {
 	addListener (SWT.Traverse,typedListener);
 }
 
+int binarySearch (int [] indices, int start, int end, int index) {
+	int low = start, high = end - 1;
+	while (low <= high) {
+		int mid = (low + high) >>> 1;
+		if (indices [mid] == index) return mid;
+		if (indices [mid] < index) {
+			low = mid + 1;
+		} else {
+			high = mid - 1;
+		}
+	}
+	return -low - 1;
+}
+
 int /*long*/ borderHandle () {
 	return handle;
 }
@@ -689,7 +706,7 @@ void destroyWidget () {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -731,7 +748,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -804,14 +821,14 @@ void drawBackground (int /*long*/ hDC) {
 }
 
 void drawBackground (int /*long*/ hDC, RECT rect) {
-	drawBackground (hDC, rect, -1);
+	drawBackground (hDC, rect, -1, 0, 0);
 }
 
-void drawBackground (int /*long*/ hDC, RECT rect, int pixel) {
+void drawBackground (int /*long*/ hDC, RECT rect, int pixel, int tx, int ty) {
 	Control control = findBackgroundControl ();
 	if (control != null) {
 		if (control.backgroundImage != null) {
-			fillImageBackground (hDC, control, rect);
+			fillImageBackground (hDC, control, rect, tx, ty);
 			return;
 		}
 		pixel = control.getBackgroundPixel ();
@@ -831,14 +848,14 @@ void drawBackground (int /*long*/ hDC, RECT rect, int pixel) {
 	fillBackground (hDC, pixel, rect);
 }
 
-void drawImageBackground (int /*long*/ hDC, int /*long*/ hwnd, int /*long*/ hBitmap, RECT rect) {
+void drawImageBackground (int /*long*/ hDC, int /*long*/ hwnd, int /*long*/ hBitmap, RECT rect, int tx, int ty) {
 	RECT rect2 = new RECT ();
 	OS.GetClientRect (hwnd, rect2);
 	OS.MapWindowPoints (hwnd, handle, rect2, 2);
 	int /*long*/ hBrush = findBrush (hBitmap, OS.BS_PATTERN);
 	POINT lpPoint = new POINT ();
 	OS.GetWindowOrgEx (hDC, lpPoint);
-	OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x, -rect2.top - lpPoint.y, lpPoint);
+	OS.SetBrushOrgEx (hDC, -rect2.left - lpPoint.x - tx, -rect2.top - lpPoint.y - ty, lpPoint);
 	int /*long*/ hOldBrush = OS.SelectObject (hDC, hBrush);
 	OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
 	OS.SetBrushOrgEx (hDC, lpPoint.x, lpPoint.y, null);
@@ -867,12 +884,12 @@ void fillBackground (int /*long*/ hDC, int pixel, RECT rect) {
 	OS.FillRect (hDC, rect, findBrush (pixel, OS.BS_SOLID));
 }
 
-void fillImageBackground (int /*long*/ hDC, Control control, RECT rect) {
+void fillImageBackground (int /*long*/ hDC, Control control, RECT rect, int tx, int ty) {
 	if (rect.left > rect.right || rect.top > rect.bottom) return;
 	if (control != null) {
 		Image image = control.backgroundImage;
 		if (image != null) {
-			control.drawImageBackground (hDC, handle, image.handle, rect);
+			control.drawImageBackground (hDC, handle, image.handle, rect, tx, ty);
 		}
 	}
 }
@@ -1315,6 +1332,11 @@ public Menu getMenu () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1511,6 +1533,8 @@ boolean hasFocus () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	checkWidget();
@@ -1565,6 +1589,8 @@ public int /*long*/ internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
 	checkWidget ();
@@ -2056,7 +2082,8 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
 			}
 			OS.DeleteObject(rgn);
 		}
-		int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
+		int bits1 = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
+		int bits2 = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
 		int /*long*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV);
 		/*
 		* Bug in Windows.  For some reason, when GetWindow ()
@@ -2074,31 +2101,39 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
 			int width = OS.GetSystemMetrics (OS.SM_CXVIRTUALSCREEN);
 			int height = OS.GetSystemMetrics (OS.SM_CYVIRTUALSCREEN);
 			int flags = OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE | OS.SWP_DRAWFRAME;
-			if ((bits & OS.WS_VISIBLE) != 0) {
+			if ((bits1 & OS.WS_VISIBLE) != 0) {
 				OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0);
 			}
 			SetWindowPos (hwnd, 0, x + width, y + height, 0, 0, flags);
+			if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+				OS.SetWindowLong (hwnd, OS.GWL_STYLE, (bits1 & ~OS.WS_CHILD) | OS.WS_POPUP);
+				OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits2 | OS.WS_EX_TOOLWINDOW);
+			}
 			OS.SetParent (hwnd, 0);
-			if ((bits & OS.WS_VISIBLE) != 0) {
+			if ((bits1 & OS.WS_VISIBLE) != 0) {
 				OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
 			}
 		}
-		if ((bits & OS.WS_VISIBLE) == 0) {
-			OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
+		if ((bits1 & OS.WS_VISIBLE) == 0) {
+			OS.ShowWindow (hwnd, OS.SW_SHOW);
 		}
 		success = OS.PrintWindow (hwnd, hdc, 0);
-		if ((bits & OS.WS_VISIBLE) == 0) {
-			OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0);
+		if ((bits1 & OS.WS_VISIBLE) == 0) {
+			OS.ShowWindow (hwnd, OS.SW_HIDE);
 		}
 		if (fixPrintWindow) {
-			if ((bits & OS.WS_VISIBLE) != 0) {
+			if ((bits1 & OS.WS_VISIBLE) != 0) {
 				OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0);
 			}
+			if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
+				OS.SetWindowLong (hwnd, OS.GWL_STYLE, bits1);
+				OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits2);
+			}
 			OS.SetParent (hwnd, hwndParent);
 			OS.MapWindowPoints (0, hwndParent, rect1, 2);
 			int flags = OS.SWP_NOSIZE | OS.SWP_NOACTIVATE | OS.SWP_DRAWFRAME;
 			SetWindowPos (hwnd, hwndInsertAfter, rect1.left, rect1.top, rect1.right - rect1.left, rect1.bottom - rect1.top, flags);
-			if ((bits & OS.WS_VISIBLE) != 0) {
+			if ((bits1 & OS.WS_VISIBLE) != 0) {
 				OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
 			}
 		}
@@ -3527,7 +3562,9 @@ boolean translateTraversal (MSG msg) {
 	int /*long*/ hwnd = msg.hwnd;
 	int key = (int)/*64*/msg.wParam;
 	if (key == OS.VK_MENU) {
-		OS.SendMessage (hwnd, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
+		if ((msg.lParam & 0x40000000) == 0) {
+			OS.SendMessage (hwnd, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
+		}
 		return false;
 	}
 	int detail = SWT.TRAVERSE_NONE;
@@ -3678,7 +3715,8 @@ boolean traverse (Event event) {
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
@@ -3696,6 +3734,183 @@ public boolean traverse (int traversal) {
 	return traverse (event);
 }
 
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	if (traversal == SWT.TRAVERSE_NONE) {
+		switch (keyCode) {
+			case SWT.ESC: {
+				traversal = SWT.TRAVERSE_ESCAPE;
+				doit = true;
+				break;
+			}
+			case SWT.CR: {
+				traversal = SWT.TRAVERSE_RETURN;
+				doit = true;
+				break;
+			}
+			case SWT.ARROW_DOWN:
+			case SWT.ARROW_RIGHT: {
+				traversal = SWT.TRAVERSE_ARROW_NEXT;
+				doit = false;
+				break;
+			}
+			case SWT.ARROW_UP:
+			case SWT.ARROW_LEFT: {
+				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+				doit = false;
+				break;
+			}
+			case SWT.TAB: {
+				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+				doit = true;
+				break;
+			}
+			case SWT.PAGE_DOWN: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_NEXT;
+					doit = true;
+				}
+				break;
+			}
+			case SWT.PAGE_UP: {
+				if ((stateMask & SWT.CTRL) != 0) {
+					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+					doit = true;
+				}
+				break;
+			}
+			default: {
+				if (character != 0 && (stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+					traversal = SWT.TRAVERSE_MNEMONIC;
+					doit = true;
+				}
+				break;
+			}
+		}
+	}
+
+	Event event = new Event ();
+	event.character = character;
+	event.detail = traversal;
+	event.doit = doit;
+	event.keyCode = keyCode;
+	event.keyLocation = keyLocation;
+	event.stateMask = stateMask;
+
+	Shell shell = getShell ();
+	boolean all = false;
+	switch (traversal) {
+		case SWT.TRAVERSE_ESCAPE:
+		case SWT.TRAVERSE_RETURN:
+		case SWT.TRAVERSE_PAGE_NEXT:
+		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+			all = true;
+			// FALL THROUGH
+		}
+		case SWT.TRAVERSE_ARROW_NEXT:
+		case SWT.TRAVERSE_ARROW_PREVIOUS:
+		case SWT.TRAVERSE_TAB_NEXT:
+		case SWT.TRAVERSE_TAB_PREVIOUS: {
+			/* traversal is a valid traversal action */
+			break;
+		}
+		case SWT.TRAVERSE_MNEMONIC: {
+			return translateMnemonic (event, null) || shell.translateMnemonic (event, this);
+		}
+		default: {
+			/* traversal is not a valid traversal action */
+			return false;
+		}
+	}
+
+	Control control = this;
+	do {
+		if (control.traverse (event)) {
+			OS.SendMessage (handle, OS.WM_CHANGEUISTATE, OS.UIS_INITIALIZE, 0);
+			return true;
+		}
+		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+		if (control == shell) return false;
+		control = control.parent;
+	} while (all && control != null);
+	return false;
+}
+
 boolean traverseEscape () {
 	return false;
 }
@@ -3930,6 +4145,7 @@ public boolean setParent (Composite parent) {
 	this.parent = parent;
 	int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE; 
 	SetWindowPos (topHandle, OS.HWND_BOTTOM, 0, 0, 0, 0, flags);
+	reskin (SWT.ALL);
 	return true;
 }
 
@@ -3991,6 +4207,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
 		case OS.WM_MOUSELEAVE:			result = WM_MOUSELEAVE (wParam, lParam); break;
 		case OS.WM_MOUSEMOVE:			result = WM_MOUSEMOVE (wParam, lParam); break;
 		case OS.WM_MOUSEWHEEL:			result = WM_MOUSEWHEEL (wParam, lParam); break;
+		case OS.WM_MOUSEHWHEEL:			result = WM_MOUSEHWHEEL (wParam, lParam); break;
 		case OS.WM_MOVE:				result = WM_MOVE (wParam, lParam); break;
 		case OS.WM_NCACTIVATE:			result = WM_NCACTIVATE (wParam, lParam); break;
 		case OS.WM_NCCALCSIZE:			result = WM_NCCALCSIZE (wParam, lParam); break;
@@ -4461,6 +4678,10 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
 	return wmMouseWheel (handle, wParam, lParam);
 }
 
+LRESULT WM_MOUSEHWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
+	return wmMouseHWheel (handle, wParam, lParam);
+}
+
 LRESULT WM_MOVE (int /*long*/ wParam, int /*long*/ lParam) {
 	state |= MOVE_OCCURRED;
 	if (findImageControl () != null) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java
index 9e22db9..94bc063 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/CoolBar.java	
@@ -727,6 +727,16 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			CoolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setBackgroundPixel (int pixel) {
 	if (pixel == -1) pixel = defaultBackground ();
 	OS.SendMessage (handle, OS.RB_SETBKCOLOR, 0, pixel);
@@ -1164,7 +1174,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 					event.x = lpnm.left;
 					event.y = lpnm.bottom;
 				}
-				item.postEvent (SWT.Selection, event);
+				item.sendSelectionEvent(SWT.Selection, event, false);
 			}
 			break;
 		}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
index 541ef00..7018524 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java	
@@ -958,14 +958,14 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			if (ignoreSelection) break;
 			SYSTEMTIME systime = new SYSTEMTIME ();
 			OS.SendMessage (handle, OS.MCM_GETCURSEL, 0, systime);
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 			break;
 		}
 		case OS.DTN_DATETIMECHANGE: {
 			SYSTEMTIME systime = new SYSTEMTIME ();
 			OS.SendMessage (handle, OS.DTM_GETSYSTEMTIME, 0, systime);
 			if (lastSystemTime == null || systime.wDay != lastSystemTime.wDay || systime.wMonth != lastSystemTime.wMonth || systime.wYear != lastSystemTime.wYear) {
-				postEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection);
 				if ((style & SWT.TIME) == 0) lastSystemTime = systime;
 			}
 			break;
@@ -985,7 +985,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 	*/
 	switch ((int)/*64*/wParam) {
 		case SWT.CR:
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			// FALL THROUGH
 		case SWT.TAB:
 		case SWT.ESC: return LRESULT.ZERO;
@@ -1027,7 +1027,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {	
 	LRESULT result = super.WM_LBUTTONUP (wParam, lParam);
 	if (isDisposed ()) return LRESULT.ZERO;
-	if (doubleClick) postEvent (SWT.DefaultSelection);
+	if (doubleClick) sendSelectionEvent (SWT.DefaultSelection);
 	doubleClick = false;
 	return result;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index c0eed0d..6052f6b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -558,6 +558,7 @@ public Rectangle getClientArea () {
  */
 public Button getDefaultButton () {
 	checkWidget ();
+	if (defaultButton != null && defaultButton.isDisposed ()) return null;
 	return defaultButton;
 }
 
@@ -803,6 +804,17 @@ void removeMenu (Menu menu) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 boolean restoreFocus () {
 	if (display.ignoreRestoreFocus) return true;
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
@@ -901,7 +913,10 @@ void setDefaultButton (Button button, boolean save) {
 		}
 	} else {
 		if ((button.style & SWT.PUSH) == 0) return;
-		if (button == defaultButton) return;
+		if (button == defaultButton) {
+			if (save) saveDefault = defaultButton;
+			return;
+		}
 	}
 	if (defaultButton != null) {
 		if (!defaultButton.isDisposed ()) defaultButton.setDefault (false);
@@ -1541,7 +1556,12 @@ int widgetStyle () {
 	
 	/* Set the title bits and no-trim bits */
 	bits &= ~OS.WS_BORDER;
-	if ((style & SWT.NO_TRIM) != 0) return bits;
+	if ((style & SWT.NO_TRIM) != 0) {
+		if (parent == null) {
+			bits |= OS.WS_SYSMENU;
+		}
+		return bits;
+	}
 	if ((style & SWT.TITLE) != 0) bits |= OS.WS_CAPTION;
 	
 	/* Set the min and max button bits */
@@ -1726,6 +1746,7 @@ LRESULT WM_QUERYOPEN (int /*long*/ wParam, int /*long*/ lParam) {
 
 LRESULT WM_SETFOCUS (int /*long*/ wParam, int /*long*/ lParam) {
 	LRESULT result = super.WM_SETFOCUS (wParam, lParam);
+	if (isDisposed ()) return result;
 	if (savedFocus != this) restoreFocus ();
 	return result;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index bfa767c..5e2b654 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -106,8 +106,13 @@ public class Display extends Device {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public MSG msg = new MSG ();
+
+	static String APP_NAME = "SWT"; //$NON-NLS-1$
+	static String APP_VERSION = ""; //$NON-NLS-1$
 	
 	/* Windows and Events */
 	Event [] eventQueue;
@@ -200,15 +205,25 @@ public class Display extends Device {
 	static final String RUN_MESSAGES_IN_IDLE_KEY = "org.eclipse.swt.internal.win32.runMessagesInIdle"; //$NON-NLS-1$
 	static final String RUN_MESSAGES_IN_MESSAGE_PROC_KEY = "org.eclipse.swt.internal.win32.runMessagesInMessageProc"; //$NON-NLS-1$
 	static final String USE_OWNDC_KEY = "org.eclipse.swt.internal.win32.useOwnDC"; //$NON-NLS-1$
+	static final String ACCEL_KEY_HIT = "org.eclipse.swt.internal.win32.accelKeyHit"; //$NON-NLS-1$
 	Thread thread;
 
 	/* Display Shutdown */
 	Runnable [] disposeList;
 	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
+
 	/* System Tray */
 	Tray tray;
 	int nextTrayId;
 	
+	/* TaskBar */
+	TaskBar taskBar;
+	static final String TASKBAR_EVENT = "/SWTINTERNAL_ID"; //$NON-NLS-1$
+	static final String LAUNCHER_PREFIX = "--launcher.openFile "; //$NON-NLS-1$
+	
 	/* Timers */
 	int /*long*/ [] timerIds;
 	Runnable [] timerList;
@@ -223,8 +238,8 @@ public class Display extends Device {
 	RECT clickRect;
 	int clickCount, lastTime, lastButton;
 	int /*long*/ lastClickHwnd;
-	int scrollRemainder;
-	int lastKey, lastAscii, lastMouse;
+	int scrollRemainder, scrollHRemainder;
+	int lastKey, lastMouse, lastAscii;
 	boolean lastVirtual, lastNull, lastDead;
 	byte [] keyboard = new byte [256];
 	boolean accelKeyHit, mnemonicKeyHit;
@@ -325,6 +340,11 @@ public class Display extends Device {
 		{OS.VK_F13,	SWT.F13},
 		{OS.VK_F14,	SWT.F14},
 		{OS.VK_F15,	SWT.F15},
+		{OS.VK_F16,	SWT.F16},
+		{OS.VK_F17,	SWT.F17},
+		{OS.VK_F18,	SWT.F18},
+		{OS.VK_F19,	SWT.F19},
+		{OS.VK_F20,	SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{OS.VK_MULTIPLY,	SWT.KEYPAD_MULTIPLY},
@@ -377,13 +397,19 @@ public class Display extends Device {
 	static final int SWT_TRAYICONMSG	= OS.WM_APP + 4;
 	static final int SWT_NULL			= OS.WM_APP + 5;
 	static final int SWT_RUNASYNC		= OS.WM_APP + 6;
-	static int SWT_TASKBARCREATED;
+	static int TASKBARCREATED;
+	static int TASKBARBUTTONCREATED;
 	static int SWT_RESTORECARET;
 	static int DI_GETDRAGIMAGE;
+	static int SWT_OPENDOC;
 	
 	/* Workaround for Adobe Reader 7.0 */
 	int hitCount;
 	
+	/* Skinning support */
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package Name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
 	/*
@@ -501,6 +527,15 @@ void addControl (int /*long*/ handle, Control control) {
 	controlTable [oldSlot] = control;
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs anywhere
@@ -544,6 +579,16 @@ public void addFilter (int eventType, Listener listener) {
 	filterTable.hook (eventType, listener);
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -1258,6 +1303,8 @@ Control findControl (int /*long*/ handle) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int /*long*/ handle) {
 	checkDevice ();
@@ -1284,6 +1331,8 @@ public Widget findWidget (int /*long*/ handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
@@ -1629,6 +1678,9 @@ public Object getData (String key) {
 	if (key.equals (USE_OWNDC_KEY)) {
 		return new Boolean (useOwnDC);
 	}
+	if (key.equals (ACCEL_KEY_HIT)) {
+		return new Boolean (accelKeyHit);
+	}
 	if (keys == null) return null;
 	for (int i=0; i<keys.length; i++) {
 		if (keys [i].equals (key)) return values [i];
@@ -2429,6 +2481,27 @@ public Image getSystemImage (int id) {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	if (taskBar != null) return taskBar;
+	if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 1)) {
+		taskBar = new TaskBar (this, SWT.NONE);
+	}
+	return taskBar;
+}
+
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -2507,6 +2580,8 @@ int /*long*/ hTabTheme () {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int /*long*/ internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -2536,7 +2611,17 @@ public int /*long*/ internal_new_GC (GCData data) {
  */
 protected void init () {
 	super.init ();
-		
+	
+	/* Set the application user model ID */
+	if (APP_NAME != null) {
+		if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 1)) {
+			int length = APP_NAME.length ();
+			char [] buffer = new char [length + 1];
+			APP_NAME.getChars (0, length, buffer, 0);
+			OS.SetCurrentProcessExplicitAppUserModelID (buffer);
+		}
+	}
+	
 	/* Create the callbacks */
 	windowCallback = new Callback (this, "windowProc", 4); //$NON-NLS-1$
 	windowProc = windowCallback.getAddress ();
@@ -2550,7 +2635,7 @@ protected void init () {
 	windowShadowClass = new TCHAR (0, WindowShadowName + WindowClassCount, true);
 	windowOwnDCClass = new TCHAR (0, WindowOwnDCName + WindowClassCount, true);
 	WindowClassCount++;
-
+	
 	/* Register the SWT window class */
 	int /*long*/ hHeap = OS.GetProcessHeap ();
 	int /*long*/ hInstance = OS.GetModuleHandle (null);
@@ -2613,6 +2698,8 @@ protected void init () {
 		0,
 		hInstance,
 		null);
+	String title = "SWT_Window_"+APP_NAME;
+	OS.SetWindowText(hwndMessage, new TCHAR(0, title, true));
 	messageCallback = new Callback (this, "messageProc", 4); //$NON-NLS-1$
 	messageProc = messageCallback.getAddress ();
 	if (messageProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
@@ -2634,10 +2721,12 @@ protected void init () {
 		idleHook = OS.SetWindowsHookEx (OS.WH_FOREGROUNDIDLE, foregroundIdleProc, 0, threadId);
 	}
 	
-	/* Register custom messages message */
-	SWT_TASKBARCREATED = OS.RegisterWindowMessage (new TCHAR (0, "TaskbarCreated", true)); //$NON-NLS-1$
+	/* Register window messages */
+	TASKBARCREATED = OS.RegisterWindowMessage (new TCHAR (0, "TaskbarCreated", true)); //$NON-NLS-1$
+	TASKBARBUTTONCREATED = OS.RegisterWindowMessage (new TCHAR (0, "TaskbarButtonCreated", true)); //$NON-NLS-1$
 	SWT_RESTORECARET = OS.RegisterWindowMessage (new TCHAR (0, "SWT_RESTORECARET", true)); //$NON-NLS-1$
 	DI_GETDRAGIMAGE = OS.RegisterWindowMessage (new TCHAR (0, "ShellGetDragImage", true)); //$NON-NLS-1$
+	SWT_OPENDOC = OS.RegisterWindowMessage(new TCHAR (0, "SWT_OPENDOC", true)); //$NON-NLS-1$
 
 	/* Initialize OLE */
 	if (!OS.IsWinCE) OS.OleInitialize (0);
@@ -2669,6 +2758,8 @@ protected void init () {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int /*long*/ hDC, GCData data) {
 	OS.ReleaseDC (0, hDC);
@@ -3167,7 +3258,7 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
 			break;
 		}
 		default: {
-			if ((int)/*64*/msg == SWT_TASKBARCREATED) {
+			if ((int)/*64*/msg == TASKBARCREATED) {
 				if (tray != null) {
 					TrayItem [] items = tray.items;
 					for (int i=0; i<items.length; i++) {
@@ -3176,11 +3267,55 @@ int /*long*/ messageProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPar
 					}
 				}
 			}
+			if ((int)/*64*/msg == SWT_OPENDOC) {
+				String filename = getSharedData((int)/*64*/wParam, (int)/*64*/lParam);
+				if (filename != null) {
+					if (filename.startsWith (TASKBAR_EVENT)) {
+						String text = filename.substring (TASKBAR_EVENT.length ());
+						int id = Integer.parseInt (text);
+						MenuItem item = getMenuItem (id);
+						if (item != null) {
+							item.sendSelectionEvent (SWT.Selection);
+						}
+					} else {
+						Event event = new Event();
+						event.text = filename;
+						sendEvent(SWT.OpenDocument, event);
+					}
+					wakeThread ();
+				}
+			}
 		}
 	}
 	return OS.DefWindowProc (hwnd, (int)/*64*/msg, wParam, lParam);
 }
 
+String getSharedData(int pid, int  handle) {
+	if (OS.IsWinCE) return null;
+	int /*long*/ [] mapHandle = new int /*long*/ [1];
+	if (pid == OS.GetCurrentProcessId()) {
+		mapHandle[0] = handle;
+	} else {
+		int /*long*/ processHandle = OS.OpenProcess(OS.PROCESS_VM_READ|OS.PROCESS_DUP_HANDLE, false, pid);
+		if (processHandle == 0) return null;
+		OS.DuplicateHandle(processHandle, handle, OS.GetCurrentProcess(), mapHandle, OS.DUPLICATE_SAME_ACCESS, false, OS.DUPLICATE_SAME_ACCESS);
+		OS.CloseHandle(processHandle);
+	}
+	
+	int /*long*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
+	if (sharedData == 0) return null;
+	int length = OS.IsUnicode ? OS.wcslen (sharedData) : OS.strlen (sharedData);
+	TCHAR buffer = new TCHAR (0, length);
+	int byteCount = buffer.length () * TCHAR.sizeof;
+	OS.MoveMemory (buffer, sharedData, byteCount);
+	String result = buffer.toString (0, length);
+	OS.UnmapViewOfFile(sharedData);
+	if (handle != mapHandle[0]) {
+		OS.CloseHandle(mapHandle[0]);
+	}
+	return result;
+}
+
 int /*long*/ monitorEnumProc (int /*long*/ hmonitor, int /*long*/ hdc, int /*long*/ lprcMonitor, int /*long*/ dwData) {
 	if (monitorCount >= monitors.length) {
 		Monitor[] newMonitors = new Monitor [monitors.length + 4];
@@ -3365,6 +3500,23 @@ public boolean post (Event event) {
 					}
 				}
 				inputs.dwFlags = type == SWT.KeyUp ? OS.KEYEVENTF_KEYUP : 0;
+				switch (inputs.wVk) {
+					case OS.VK_INSERT:
+					case OS.VK_DELETE:
+					case OS.VK_HOME:
+					case OS.VK_END:
+					case OS.VK_PRIOR:
+					case OS.VK_NEXT:
+					case OS.VK_UP:
+					case OS.VK_DOWN:
+					case OS.VK_LEFT:
+					case OS.VK_RIGHT:
+					case OS.VK_NUMLOCK:
+					case OS.VK_SNAPSHOT:
+					case OS.VK_CANCEL:
+					case OS.VK_DIVIDE:
+						inputs.dwFlags |= OS.KEYEVENTF_EXTENDEDKEY;
+				}
 				int /*long*/ hHeap = OS.GetProcessHeap ();
 				int /*long*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
 				OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
@@ -3494,6 +3646,8 @@ public boolean readAndDispatch () {
 	checkDevice ();
 	lpStartupInfo = null;
 	drawMenuBars ();
+	runSkin ();
+	runDeferredLayouts ();
 	runPopups ();
 	if (OS.PeekMessage (msg, 0, 0, 0, OS.PM_REMOVE)) {
 		if (!filterMessage (msg)) {
@@ -3554,6 +3708,8 @@ protected void release () {
 	}
 	if (tray != null) tray.dispose ();
 	tray = null;
+	if (taskBar != null) taskBar.dispose ();
+	taskBar = null;
 	while (readAndDispatch ()) {}
 	if (disposeList != null) {
 		for (int i=0; i<disposeList.length; i++) {
@@ -3923,6 +4079,21 @@ boolean runDeferredEvents () {
 	return run;
 }
 
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
+
 boolean runPopups () {
 	if (popups == null) return false;
 	boolean result = false;
@@ -3961,6 +4132,29 @@ void runSettings () {
 	}
 }
 
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+	
 boolean runTimer (int /*long*/ id) {
 	if (timerList != null && timerIds != null) {
 		int index = 0;
@@ -4131,7 +4325,12 @@ public void setData (String key, Object value) {
 		Boolean data = (Boolean) value;
 		useOwnDC = data != null && data.booleanValue ();
 		return;
-	}	
+	}
+	if (key.equals (ACCEL_KEY_HIT)) {
+		Boolean data = (Boolean) value;
+		accelKeyHit = data != null && data.booleanValue ();
+		return;
+	}
 	/* Remove the key/value pair */
 	if (value == null) {
 		if (keys == null) return;
@@ -4205,15 +4404,58 @@ public void setData (Object data) {
 }
 
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Returns the application name.
+ *
+ * @return the application name
+ * 
+ * @see #setAppName(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppName () {
+	return APP_NAME;
+}
+
+/**
+ * Returns the application version.
+ *
+ * @return the application version
+ * 
+ * @see #setAppVersion(String)
+ * 
+ * @since 3.6
+ */
+public static String getAppVersion () {
+	return APP_VERSION;
+}
+
+/**
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
 public static void setAppName (String name) {
-	/* Do nothing */
+	APP_NAME = name;
+}
+
+/**
+ * Sets the application version to the argument.
+ *
+ * @param version the new app version
+ * 
+ * @since 3.6
+ */
+public static void setAppVersion (String version) {
+	APP_VERSION = version;
 }
 
 void setModalDialog (Dialog modalDailog) {
@@ -4595,6 +4837,18 @@ int /*long*/ windowProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ wPara
 			}
 		}
 	}
+	if ((int)/*64*/msg == TASKBARBUTTONCREATED) {
+		if (taskBar != null) {
+			TaskItem [] items = taskBar.items;
+			for (int i=0; i<items.length; i++) {
+				TaskItem item = items [i];
+				if (item != null && item.shell != null && item.shell.handle == hwnd) {
+					item.recreate ();
+					break;
+				}
+			}
+		}
+	}
 	/*
 	* Bug in Adobe Reader 7.0.  For some reason, when Adobe
 	* Reader 7.0 is deactivated from within Internet Explorer,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index ca9c0bb..6ee27b8 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java	
@@ -480,6 +480,16 @@ public void removeExpandListener (ExpandListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);	
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ExpandItem item = items [i];
+			if (item != null ) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setBackgroundPixel (int pixel) {
 	super.setBackgroundPixel (pixel);
 	if (!OS.IsWinCE) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index 317dfa4..8d00eef 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -301,11 +301,11 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) {
 	if (!(OS.GetDeviceCaps(gc.handle, OS.TECHNOLOGY) == OS.DT_RASPRINTER)) {
 		int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE);
 		if ((bits & OS.WS_VISIBLE) == 0) {
-			OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0);
+			OS.ShowWindow (hwnd, OS.SW_SHOW);
 		}
 		success = OS.PrintWindow (hwnd, hdc, 0);
 		if ((bits & OS.WS_VISIBLE) == 0) {
-			OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0);
+			OS.ShowWindow (hwnd, OS.SW_HIDE);
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 5d23c95..7bdb283 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java	
@@ -104,6 +104,17 @@ public Label (Composite parent, int style) {
 
 int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
 	if (handle == 0) return 0;
+	/*
+	* Feature in Windows 7.  When the user double clicks 
+	* on the label, the text of the label is copied to the 
+	* clipboard.  This is unwanted. The fix is to avoid 
+	* calling the label window proc.
+	*/
+	if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(6, 1)) {
+		switch (msg) {
+			case OS.WM_LBUTTONDBLCLK: return OS.DefWindowProc (hwnd, msg, wParam, lParam);
+		}
+	}
 	return OS.CallWindowProc (LabelProc, hwnd, msg, wParam, lParam);
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java
index bf0d12e..17577c0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Link.java	
@@ -412,6 +412,61 @@ public String getText () {
 	return text;
 }
 
+boolean mnemonicHit (char key) {
+	if (mnemonics != null) {
+		char uckey = Character.toUpperCase (key);
+		String parsedText = parse(text);
+		for (int i = 0; i < mnemonics.length - 1; i++) {
+			if (mnemonics[i] != -1) {
+				char mnemonic = parsedText.charAt(mnemonics[i]);
+				if (uckey == Character.toUpperCase (mnemonic)) {
+					if (!setFocus ()) return false;
+					if (OS.COMCTL32_MAJOR >= 6) {
+						int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
+						LITEM item = new LITEM ();
+						item.mask = OS.LIF_ITEMINDEX | OS.LIF_STATE;
+						item.stateMask = OS.LIS_FOCUSED;
+						while (item.iLink < mnemonics.length) {
+							if (item.iLink != i) OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
+							item.iLink++;
+						}
+						item.iLink = i;
+						item.state = OS.LIS_FOCUSED;
+						OS.SendMessage (handle, OS.LM_SETITEM, 0, item);
+						
+						/* Feature in Windows. For some reason, setting the focus to 
+						 * any item but first causes the control to clear the WS_TABSTOP
+						 * bit. The fix is always to reset the bit. 
+						 */
+						OS.SetWindowLong (handle, OS.GWL_STYLE, bits);
+					} else {
+						focusIndex = i;
+						redraw ();
+					}
+					return  true;
+				}
+			}
+		}
+	}
+	return false;
+}
+
+boolean mnemonicMatch (char key) {
+	if (mnemonics != null) {
+		char uckey = Character.toUpperCase (key);
+		String parsedText = parse(text);
+		for (int i = 0; i < mnemonics.length - 1; i++) {
+			if (mnemonics[i] != -1) {
+				char mnemonic = parsedText.charAt(mnemonics[i]);
+				if (uckey == Character.toUpperCase (mnemonic)) { 
+					return true;
+				}
+			}
+		}
+	}
+	return false;
+}
+
 String parse (String string) {
 	int length = string.length ();
 	offsets = new Point [length / 4];
@@ -612,6 +667,18 @@ public void removeSelectionListener (SelectionListener listener) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
@@ -694,7 +761,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 			case SWT.CR:
 				Event event = new Event ();
 				event.text = ids [focusIndex];
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 				break;
 			case SWT.TAB:
 				boolean next = OS.GetKeyState (OS.VK_SHIFT) >= 0;
@@ -851,7 +918,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
 			if (rect.contains (x, y)) {
 				Event event = new Event ();
 				event.text = ids [mouseDownIndex];
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 				break;
 			}
 		}
@@ -1001,7 +1068,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 				OS.MoveMemory (item, lParam, NMLINK.sizeof);
 				Event event = new Event ();
 				event.text = ids [item.iLink];
-				sendEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, true);
 				break;
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index aecad23..a6d4a18 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java	
@@ -781,8 +781,8 @@ public void remove (int [] indices) {
 	}
 	if (topCount > 0) {
 		topIndex -= topCount;
-		OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex, 0);
 	}
+	OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex, 0);
 	if (i < newIndices.length) error (SWT.ERROR_ITEM_NOT_REMOVED);
 }
 
@@ -827,8 +827,9 @@ public void remove (int index) {
 	}
 	if ((style & SWT.H_SCROLL) != 0) setScrollWidth (buffer, false);
 	if (index < topIndex) {
-		OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex - 1, 0);
+		topIndex -= 1;
 	}
+	OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex, 0);
 }
 
 /**
@@ -895,8 +896,8 @@ public void remove (int start, int end) {
 	}
 	if (end < topIndex) {
 		topIndex -= end - start + 1;
-		OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex, 0);
 	}
+	OS.SendMessage (handle, OS.LB_SETTOPINDEX, topIndex, 0);
 	if (index <= end) error (SWT.ERROR_ITEM_NOT_REMOVED);
 }
 
@@ -1544,7 +1545,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 					if (code == OS.LB_ERR) break;
 					OS.SendMessage (handle, OS.LB_SETSEL, code != 0 ? 0 : 1, index);
 					OS.SendMessage (handle, OS.LB_SETANCHORINDEX, index, 0);
-					postEvent (SWT.Selection);
+					sendSelectionEvent (SWT.Selection);
 					return LRESULT.ZERO;
 				}
 			}
@@ -1702,10 +1703,10 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 	int code = OS.HIWORD (wParam);
 	switch (code) {
 		case OS.LBN_SELCHANGE:
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 			break;
 		case OS.LBN_DBLCLK:
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			break;
 	}
 	return super.wmCommandChild (wParam, lParam);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index 183a593..fe9f650 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,6 +50,8 @@ public class Menu extends Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	
@@ -1224,6 +1226,15 @@ public void removeMenuListener (MenuListener listener) {
 	eventTable.unhook (SWT.Show, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the receiver's background color to the color specified
  * by the argument, or to the default system color for the control
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 3950d5c..089c4f0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java	
@@ -202,7 +202,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -600,6 +606,14 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 void selectRadio () {
 	int index = 0;
 	MenuItem [] items = parent.getItems ();
@@ -913,7 +927,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
@@ -1099,9 +1113,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 			}
 		}
 	}
-	Event event = new Event ();
-	setInputState (event, SWT.Selection);
-	postEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection);
 	return null;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java
index 8f27741..c418877 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ProgressBar.java	
@@ -315,29 +315,20 @@ public void setMinimum (int value) {
  */
 public void setSelection (int value) {
 	checkWidget ();
+	OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
+	
 	/*
-	* Feature in Vista.  When the progress bar is not in
-	* a normal state, PBM_SETPOS does not set the position
-	* of the bar when the selection is equal to the minimum.
-	* This is undocumented.  The fix is to temporarily
-	* set the state to PBST_NORMAL, set the position, then
-	* reset the state.
+	* Bug in Vista.  For some reason, when the progress bar is not in
+	* a normal state, it shows the selection of previous call to 
+	* PBM_SETPOS. This is undocumented. The fix is to call PBM_SETPOS  
+	* a second time.
 	*/
-	int /*long*/ state = 0;
-	boolean fixSelection = false;
 	if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
-		int minumum = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETRANGE, 1, 0);
-		int selection = (int)/*64*/OS.SendMessage (handle, OS.PBM_GETPOS, 0, 0);
-		if (selection == minumum) {
-			fixSelection = true;
-			state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
-			OS.SendMessage (handle, OS.PBM_SETSTATE, OS.PBST_NORMAL, 0);
+		int /*long*/ state = OS.SendMessage (handle, OS.PBM_GETSTATE, 0, 0);
+		if (state != OS.PBST_NORMAL) {
+			OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
 		}
 	}
-	OS.SendMessage (handle, OS.PBM_SETPOS, value, 0);
-	if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {
-		if (fixSelection) OS.SendMessage (handle, OS.PBM_SETSTATE, state, 0);
-	}
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
index 8df5d6b..4bed340 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java	
@@ -247,7 +247,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 			event.y = newY;
 			event.width = width;
 			event.height = height;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent  (SWT.Selection, event, true);
 			if (isDisposed ()) return LRESULT.ZERO;
 			if (event.doit) {
 				if ((style & SWT.SMOOTH) != 0) {
@@ -291,7 +291,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 	if ((style & SWT.SMOOTH) == 0) {
 		event.detail = SWT.DRAG;
 	}
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return LRESULT.ZERO;
 	
 	/* Draw the banding rectangle */
@@ -335,7 +335,7 @@ LRESULT WM_LBUTTONUP (int /*long*/ wParam, int /*long*/ lParam) {
 	event.width = width;
 	event.height = height;
 	drawBand (event.x, event.y, width, height);
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return result;
 	if (event.doit) {
 		if ((style & SWT.SMOOTH) != 0) {
@@ -381,7 +381,7 @@ LRESULT WM_MOUSEMOVE (int /*long*/ wParam, int /*long*/ lParam) {
 	if ((style & SWT.SMOOTH) == 0) {
 		event.detail = SWT.DRAG;
 	}
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	if (isDisposed ()) return LRESULT.ZERO;
 	if (event.doit) {
 		lastX = event.x;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
index ce6b011..32f6286 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java	
@@ -479,7 +479,7 @@ LRESULT WM_MOUSEWHEEL (int /*long*/ wParam, int /*long*/ lParam) {
 		* are sent from a modal message loop in windows that
 		* is active when the user is scrolling.
 		*/
-		sendEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection, null, true);
 		// widget could be disposed at this point		
 	}
 	return new LRESULT (code);
@@ -552,7 +552,7 @@ LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
 		* are sent from a modal message loop in windows that
 		* is active when the user is scrolling.
 		*/
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, true);
 		// widget could be disposed at this point
 	}
 	return null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java
index 80e8ca6..cf21cc2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ScrollBar.java	
@@ -381,8 +381,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -406,6 +405,103 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	parent.forceResize ();
+	SCROLLBARINFO info = new SCROLLBARINFO();
+	info.cbSize = SCROLLBARINFO.sizeof;
+	int x, y, width, height;
+	if ((style & SWT.HORIZONTAL) != 0) {
+		OS.GetScrollBarInfo(parent.handle, OS.OBJID_HSCROLL, info);
+		x = info.rcScrollBar.left + info.xyThumbTop;
+		y = info.rcScrollBar.top;
+		width = info.xyThumbBottom - info.xyThumbTop;
+		height = info.rcScrollBar.bottom - info.rcScrollBar.top;
+	} else {
+		OS.GetScrollBarInfo(parent.handle, OS.OBJID_VSCROLL, info);
+		x = info.rcScrollBar.left;
+		y = info.rcScrollBar.top + info.xyThumbTop;
+		width = info.rcScrollBar.right - info.rcScrollBar.left;
+		height = info.xyThumbBottom - info.xyThumbTop;
+	}
+	RECT rect = new RECT ();
+	rect.left = x;
+	rect.top  = y;
+	rect.right = x + width;
+	rect.bottom = y + height;
+	OS.MapWindowPoints (0, parent.handle, rect, 2);
+	return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	parent.forceResize ();
+	SCROLLBARINFO info = new SCROLLBARINFO();
+	info.cbSize = SCROLLBARINFO.sizeof;
+	int x = 0, y = 0, width, height;
+	if ((style & SWT.HORIZONTAL) != 0) {
+		OS.GetScrollBarInfo(parent.handle, OS.OBJID_HSCROLL, info);
+		int size = OS.GetSystemMetrics (OS.SM_CYHSCROLL);
+		y = info.rcScrollBar.top;
+		width = info.rcScrollBar.right - info.rcScrollBar.left;
+		height = size;
+		if (width <= 2 * size) {
+			x = info.rcScrollBar.left + width / 2;
+			width = 0;
+		} else {
+			x = info.rcScrollBar.left + size;
+			width -= 2 * size;
+		}
+	} else {
+		OS.GetScrollBarInfo(parent.handle, OS.OBJID_VSCROLL, info);
+		int size = OS.GetSystemMetrics (OS.SM_CYVSCROLL);
+		x = info.rcScrollBar.left;
+		width = size;
+		height = info.rcScrollBar.bottom - info.rcScrollBar.top;
+		if (height <= 2 * size) {
+			y = info.rcScrollBar.top + height / 2;
+			height = 0;
+		} else {
+			y = info.rcScrollBar.top + size;
+			height -= 2 * size;
+		}
+	}
+	RECT rect = new RECT ();
+	rect.left = x;
+	rect.top  = y;
+	rect.right = x + width;
+	rect.bottom = y + height;
+	OS.MapWindowPoints (0, parent.handle, rect, 2);
+	return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -756,10 +852,13 @@ public void setSelection (int selection) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
@@ -944,7 +1043,7 @@ LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
 		case OS.SB_PAGEDOWN:		event.detail = SWT.PAGE_DOWN;  break;
 		case OS.SB_PAGEUP:			event.detail = SWT.PAGE_UP;  break;
 	}
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent  (SWT.Selection, event, true);
 	// the widget could be destroyed at this point
 	return null;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index c4ac04a..73bfc18 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java	
@@ -226,6 +226,12 @@ void releaseChildren (boolean destroy) {
 	super.releaseChildren (destroy);
 }
 
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 int /*long*/ scrolledHandle () {
 	return handle;
 }
@@ -332,10 +338,15 @@ LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
 					vVisible = (psbi.rgstate [0] & OS.STATE_SYSTEM_INVISIBLE) == 0;
 				}
 				RECT cornerRect = new RECT ();
-				cornerRect.right = windowRect.right - windowRect.left - trimRect.right;
 				cornerRect.bottom = windowRect.bottom - windowRect.top - trimRect.bottom;
-				cornerRect.left = cornerRect.right - (hVisible ? OS.GetSystemMetrics (OS.SM_CXVSCROLL) : 0);
 				cornerRect.top = cornerRect.bottom - (vVisible ? OS.GetSystemMetrics (OS.SM_CYHSCROLL) : 0);
+				if ((bits2 & OS.WS_EX_LEFTSCROLLBAR) != 0) {
+					cornerRect.left = trimRect.left;
+					cornerRect.right = cornerRect.left + (hVisible ? OS.GetSystemMetrics (OS.SM_CXVSCROLL) : 0);
+				} else {
+					cornerRect.right = windowRect.right - windowRect.left - trimRect.right;
+					cornerRect.left = cornerRect.right - (hVisible ? OS.GetSystemMetrics (OS.SM_CXVSCROLL) : 0);
+				}
 				if (cornerRect.left != cornerRect.right && cornerRect.top != cornerRect.bottom) {
 					int /*long*/ hDC = OS.GetWindowDC (hwnd);
 					OS.FillRect (hDC, cornerRect, OS.COLOR_BTNFACE + 1);
@@ -426,7 +437,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
 		if (position != vPosition) {
 			Event event = new Event ();
 			event.detail = position < vPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN; 
-			verticalBar.sendEvent (SWT.Selection, event);
+			verticalBar.sendSelectionEvent (SWT.Selection, event, true);
 		}
 	}
 	if (horizontalBar != null) {
@@ -434,7 +445,7 @@ LRESULT wmScrollWheel (boolean update, int /*long*/ wParam, int /*long*/ lParam)
 		if (position != hPosition) {
 			Event event = new Event ();
 			event.detail = position < hPosition ? SWT.PAGE_UP : SWT.PAGE_DOWN; 
-			horizontalBar.sendEvent (SWT.Selection, event);
+			horizontalBar.sendSelectionEvent (SWT.Selection, event, true);
 		}
 	}
 	return new LRESULT (code);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java
index f19b30d..b15be30 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -292,6 +292,7 @@ Shell (Display display, Shell parent, int style, int /*long*/ handle, boolean em
 	if (handle != 0 && !embedded) {
 		state |= FOREIGN_HANDLE;
 	}
+	reskinWidget();
 	createWidget ();
 }
 
@@ -387,6 +388,8 @@ public Shell (Shell parent, int style) {
  * @param display the display for the shell
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Shell win32_new (Display display, int /*long*/ handle) {
 	return new Shell (display, null, SWT.NO_TRIM, handle, true);
@@ -407,6 +410,8 @@ public static Shell win32_new (Display display, int /*long*/ handle) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int /*long*/ handle) {
@@ -581,7 +586,7 @@ void createHandle () {
 		if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) == 0) {
 			state |= THEME_BACKGROUND;
 		}
-		windowProc = OS.GetWindowLong (handle, OS.GWL_WNDPROC);
+		windowProc = OS.GetWindowLongPtr (handle, OS.GWL_WNDPROC);
 	}
 	
 	/*
@@ -1322,6 +1327,21 @@ public void removeShellListener (ShellListener listener) {
 	eventTable.unhook (SWT.Deactivate, listener);
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	if (toolTips != null) {
+		for (int i=0; i<toolTips.length; i++) {
+			ToolTip toolTip = toolTips [i];
+			if (toolTip != null) toolTip.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 LRESULT selectPalette (int /*long*/ hPalette) {
 	int /*long*/ hDC = OS.GetDC (handle);
 	int /*long*/ hOld = OS.SelectPalette (hDC, hPalette, false);
@@ -1496,9 +1516,11 @@ public void setFullScreen (boolean fullScreen) {
 	int mask = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX;
 	if ((style & mask) != 0) {
 		if (fullScreen) {
-			styleFlags = styleFlags & ~OS.WS_CAPTION;
+			styleFlags &= ~(OS.WS_CAPTION | OS.WS_MAXIMIZEBOX | OS.WS_MINIMIZEBOX);
 		} else {
-			styleFlags = styleFlags | OS.WS_CAPTION;
+			styleFlags |= OS.WS_CAPTION;
+			if ((style & SWT.MAX) != 0) styleFlags |= OS.WS_MAXIMIZEBOX;
+			if ((style & SWT.MIN) != 0) styleFlags |= OS.WS_MINIMIZEBOX;
 		}
 	}
 	if (fullScreen) wasMaximized = getMaximized ();
@@ -1775,6 +1797,12 @@ void setToolTipTitle (int /*long*/ hwndToolTip, String text, int icon) {
 		}
 	}
 	if (text != null) {
+		/*
+		* Feature in Windows. The text point to by pszTitle
+		* must not exceed 100 characters in length, including
+		* the null terminator.
+		*/
+		if (text.length () > 99) text = text.substring (0, 99);
 		TCHAR pszTitle = new TCHAR (getCodePage (), text, true);
 		OS.SendMessage (hwndToolTip, OS.TTM_SETTITLE, icon, pszTitle);
 	} else {
@@ -2000,7 +2028,7 @@ int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*
 				ToolTip tip = getCurrentToolTip (hwnd);
 				if (tip != null) {
 					tip.setVisible (false);
-					tip.postEvent (SWT.Selection);
+					tip.sendSelectionEvent (SWT.Selection);
 				}
 				break;
 			}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index 086a9d5..e20f00c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java	
@@ -326,8 +326,7 @@ public int getSelection () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -529,10 +528,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
@@ -780,7 +782,7 @@ LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
 	* and WM_VSCROLL are sent from the modal message loop
 	* so that they are delivered during inside the loop.
 	*/
-	sendEvent (SWT.Selection, event);
+	sendSelectionEvent (SWT.Selection, event, true);
 	// the widget could be destroyed at this point
 	return null;
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
index 8c7b19d..0729e2e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java	
@@ -43,7 +43,7 @@ import org.eclipse.swt.events.*;
  */
 public class Spinner extends Composite {
 	int /*long*/ hwndText, hwndUpDown;
-	boolean ignoreModify;
+	boolean ignoreModify, ignoreCharacter;
 	int pageIncrement, digits;
 	static final int /*long*/ EditProc;
 	static final TCHAR EditClass = new TCHAR (0, "EDIT", true);
@@ -887,7 +887,7 @@ public void setIncrement (int value) {
 		int /*long*/ offset = udaccels + (i * UDACCEL.sizeof);
 		OS.MoveMemory (udaccel, offset, UDACCEL.sizeof);
 		if (first == -1) first = udaccel.nInc;
-		udaccel.nInc  =  udaccel.nInc * value / first;
+		udaccel.nInc  = udaccel.nInc / first * value;
 		OS.MoveMemory (offset, udaccel, UDACCEL.sizeof);
 	}
 	OS.SendMessage (hwndUpDown, OS.UDM_SETACCEL, count, udaccels);
@@ -896,11 +896,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -911,7 +911,7 @@ public void setMaximum (int value) {
 	checkWidget ();
 	int [] min = new int [1];
 	OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, min, null);
-	if (value <= min [0]) return;
+	if (value < min [0]) return;
 	int pos;
 	if (OS.IsWinCE) {
 		pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
@@ -924,11 +924,11 @@ public void setMaximum (int value) {
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -939,7 +939,7 @@ public void setMinimum (int value) {
 	checkWidget ();
 	int [] max = new int [1];
 	OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, null, max);
-	if (value >= max [0]) return;
+	if (value > max [0]) return;
 	int pos;
 	if (OS.IsWinCE) {
 		pos = OS.LOWORD (OS.SendMessage (hwndUpDown, OS.UDM_GETPOS, 0, 0));
@@ -1027,7 +1027,7 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
 			OS.NotifyWinEvent (OS.EVENT_OBJECT_FOCUS, hwndText, OS.OBJID_CLIENT, 0);
 		}
 	}
-	if (notify) postEvent (SWT.Selection);
+	if (notify) sendSelectionEvent (SWT.Selection);
 }
 
 /**
@@ -1088,7 +1088,7 @@ void setToolTipText (Shell shell, String string) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
@@ -1251,7 +1251,42 @@ LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
 	return result;
 }
 
+LRESULT wmIMEChar(int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+	
+	/* Process a DBCS character */
+	Display display = this.display;
+	display.lastKey = 0;
+	display.lastAscii = (int)/*64*/wParam;
+	display.lastVirtual = display.lastNull = display.lastDead = false;
+	if (!sendKeyEvent (SWT.KeyDown, OS.WM_IME_CHAR, wParam, lParam)) {
+		return LRESULT.ZERO;
+	}
+	
+	/*
+	* Feature in Windows.  The Windows text widget uses
+	* two 2 WM_CHAR's to process a DBCS key instead of
+	* using WM_IME_CHAR.  The fix is to allow the text
+	* widget to get the WM_CHAR's but ignore sending
+	* them to the application.
+	*/
+	ignoreCharacter = true;
+	int /*long*/ result = callWindowProc (hwnd, OS.WM_IME_CHAR, wParam, lParam);
+	MSG msg = new MSG ();
+	int flags = OS.PM_REMOVE | OS.PM_NOYIELD | OS.PM_QS_INPUT | OS.PM_QS_POSTMESSAGE;
+	while (OS.PeekMessage (msg, hwnd, OS.WM_CHAR, OS.WM_CHAR, flags)) {
+		OS.TranslateMessage (msg);
+		OS.DispatchMessage (msg);
+	}
+	ignoreCharacter = false;
+
+	sendKeyEvent (SWT.KeyUp, OS.WM_IME_CHAR, wParam, lParam);
+	// widget could be disposed at this point
+	display.lastKey = display.lastAscii = 0;
+	return new LRESULT (result);
+}
+
 LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+	if (ignoreCharacter) return null;
 	LRESULT result = super.wmChar (hwnd, wParam, lParam);
 	if (result != null) return result;
 	/*
@@ -1263,7 +1298,7 @@ LRESULT wmChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
 	*/
 	switch ((int)/*64*/wParam) {
 		case SWT.CR:
-			postEvent (SWT.DefaultSelection);
+			sendSelectionEvent (SWT.DefaultSelection);
 			// FALL THROUGH		
 		case SWT.TAB:
 		case SWT.ESC: return LRESULT.ZERO;
@@ -1361,6 +1396,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 }
 
 LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+	if (ignoreCharacter) return null;
 	LRESULT result = super.wmKeyDown (hwnd, wParam, lParam);
 	if (result != null) return result;
 	
@@ -1451,7 +1487,7 @@ LRESULT wmScrollChild (int /*long*/ wParam, int /*long*/ lParam) {
 	int code = OS.LOWORD (wParam);
 	switch (code) {
 		case OS.SB_THUMBPOSITION:
-			postEvent (SWT.Selection);
+			sendSelectionEvent (SWT.Selection);
 			break;
 	}
 	return super.wmScrollChild (wParam, lParam);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index 0583d9c..58d6084 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java	
@@ -247,7 +247,7 @@ void createItem (TabItem item, int index) {
 	if (count == 0) {
 		Event event = new Event ();
 		event.item = items [0];
-		sendEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, true);
 		// the widget could be destroyed at this point
 	}
 }
@@ -614,6 +614,18 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+
+void reskinChildren (int flags) {
+	if (items != null) {
+		int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);
+		for (int i=0; i<count; i++) {
+			TabItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the receiver's selection to the given item.
  * The current selected is first cleared, then the new item is
@@ -725,7 +737,7 @@ void setSelection (int index, boolean notify) {
 		if (notify) {
 			Event event = new Event ();
 			event.item = item;
-			sendEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, true);
 		}
 	}
 }
@@ -1001,7 +1013,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			if (code == OS.TCN_SELCHANGE) {
 				Event event = new Event ();
 				event.item = item;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 	}
 	return super.wmNotifyChild (hdr, wParam, lParam);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index de69bfa..f526242 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,8 +72,9 @@ import org.eclipse.swt.events.*;
 
 public class Table extends Composite {
 	TableItem [] items;
+	int [] keys;
 	TableColumn [] columns;
-	int columnCount, customCount;
+	int columnCount, customCount, keyCount;
 	ImageList imageList, headerImageList;
 	TableItem currentItem;
 	TableColumn sortColumn;
@@ -95,6 +96,7 @@ public class Table extends Composite {
 	static final int V_SCROLL_LIMIT = 16;
 	static final int DRAG_IMAGE_SIZE = 301;
 	static final boolean EXPLORER_THEME = true;
+	static boolean COMPRESS_ITEMS = true;
 	static final int /*long*/ TableProc;
 	static final TCHAR TableClass = new TCHAR (0, OS.WC_LISTVIEW, true);
 	static {
@@ -155,10 +157,238 @@ void _addListener (int eventType, Listener listener) {
 	}
 }
 
+boolean _checkGrow (int count) {
+	//TODO - code could be shared but it would mix keyed and non-keyed logic
+	if (keys == null) {
+		if (count == items.length) {
+			/*
+			* Grow the array faster when redraw is off or the
+			* table is not visible.  When the table is painted,
+			* the items array is resized to be smaller to reduce
+			* memory usage.
+			*/
+			boolean small = getDrawing () && OS.IsWindowVisible (handle);
+			int length = small ? items.length + 4 : Math.max (4, items.length * 3 / 2);
+			TableItem [] newItems = new TableItem [length];
+			System.arraycopy (items, 0, newItems, 0, items.length);
+			items = newItems;
+		}
+	} else {
+		//TODO - don't shrink when count is very small (ie. 2 or 4 elements)?
+		//TODO - why? if setItemCount(1000000) is used after a shrink, then we won't compress
+		//TODO - get rid of ignoreShrink?
+		if (!ignoreShrink && keyCount > count / 2) {
+			boolean small = getDrawing () && OS.IsWindowVisible (handle);
+			int length = small ? count + 4 : Math.max (4, count * 3 / 2);
+			TableItem [] newItems = new TableItem [length];
+			for (int i=0; i<keyCount; i++) {
+				newItems [keys [i]] = items [i];
+			}
+			items = newItems;
+			keys = null;
+			keyCount = 0;
+			return true;
+		} else {
+			//TODO - grow by page size or screen height?
+			//TODO - experiment to determine an optimal growth rate for keys
+			if (keyCount == keys.length) {
+				boolean small = getDrawing () && OS.IsWindowVisible (handle);
+				int length = small ? keys.length + 4 : Math.max (4, keys.length * 3 / 2);
+				int [] newKeys = new int [length];
+				System.arraycopy (keys, 0, newKeys, 0, keys.length);
+				keys = newKeys;
+				TableItem [] newItems = new TableItem [length];
+				System.arraycopy (items, 0, newItems, 0, items.length);
+				items = newItems;
+			}
+		}
+	}
+	return false;
+}
+
+void _checkShrink () {
+	//TODO - code could be shared but it would mix keyed and non-keyed logic
+	//TODO - move ignoreShrink test back to the caller
+	if (keys == null) {
+		if (!ignoreShrink) {
+			/* Resize the item array to match the item count */
+			int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+			if (items.length > 4 && items.length - count > 3) {
+				int length = Math.max (4, (count + 3) / 4 * 4);
+				TableItem [] newItems = new TableItem [length];
+				System.arraycopy (items, 0, newItems, 0, count);
+				items = newItems;
+			}
+		}
+	} else {
+		if (!ignoreShrink) {
+			if (keys.length > 4 && keys.length - keyCount > 3) {
+				int length = Math.max (4, (keyCount + 3) / 4 * 4);
+				int [] newKeys = new int [length];
+				System.arraycopy (keys, 0, newKeys, 0, keyCount);
+				keys = newKeys;
+				TableItem [] newItems = new TableItem [length];
+				System.arraycopy (items, 0, newItems, 0, keyCount);
+				items = newItems;
+			}
+		}
+	}
+}
+
+void _clearItems () {
+	items = null;
+	keys = null;
+	keyCount = 0;
+}
+
 TableItem _getItem (int index) {
-	if ((style & SWT.VIRTUAL) == 0) return items [index];
-	if (items [index] != null) return items [index];
-	return items [index] = new TableItem (this, SWT.NONE, -1, false);
+	return _getItem (index, true);
+}
+
+//TODO - check senders who have count (watch methods that change the count)
+TableItem _getItem (int index, boolean create) {
+	return _getItem (index, create, -1);
+}
+
+TableItem _getItem (int index, boolean create, int count) {
+	//TODO - code could be shared but it would mix keyed and non-keyed logic
+	if (keys == null) {
+		if ((style & SWT.VIRTUAL) == 0 || !create) return items [index];
+		if (items [index] != null) return items [index];
+		return items [index] = new TableItem (this, SWT.NONE, -1, false);
+	} else {
+		if ((style & SWT.VIRTUAL) == 0 || !create) {
+			if (keyCount == 0) return null;
+			if (index > keys [keyCount - 1]) return null;
+		}
+		int keyIndex = binarySearch (keys, 0, keyCount, index); 
+		if ((style & SWT.VIRTUAL) == 0 || !create) {
+			return keyIndex < 0 ? null : items [keyIndex]; 
+		}
+        if (keyIndex < 0) {
+        	if (count == -1) {
+        		count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+        	}
+        	//TODO - _checkGrow() doesn't return a value, check keys == null instead
+	        if (_checkGrow (count)) {
+	    		if (items [index] != null) return items [index];
+	    		return items [index] = new TableItem (this, SWT.NONE, -1, false);
+	        }
+	        keyIndex = -keyIndex - 1;
+	        if (keyIndex < keyCount) { 
+	        	System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex); 
+	        	System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex); 
+	        } 
+	        keyCount++; 
+	        keys [keyIndex] = index; 
+        } else {
+    		if (items [keyIndex] != null) return items [keyIndex];
+        }
+        return items [keyIndex] = new TableItem (this, SWT.NONE, -1, false);
+	}
+}
+
+void _getItems (TableItem [] result, int count) {
+	if (keys == null) {
+		System.arraycopy (items, 0, result, 0, count);
+	} else {
+		/* NOTE: Null items will be in the array when keyCount != count */
+		for (int i=0; i<keyCount; i++) {
+			if (keys [i] >= count) break;
+			result [keys [i]] = items [keys [i]];
+		}
+	}
+}
+
+boolean _hasItems () {
+	return items != null;
+}
+
+void _initItems () {
+	items = new TableItem [4];
+	if (COMPRESS_ITEMS) {
+		if ((style & SWT.VIRTUAL) != 0) {
+			keyCount = 0;
+			keys = new int [4];
+		}
+	}
+}
+
+/* NOTE: The array has already been grown to have space for the new item */
+void _insertItem (int index, TableItem item, int count) {
+	if (keys == null) {
+		System.arraycopy (items, index, items, index + 1, count - index);
+		items [index] = item;
+	} else {
+		int keyIndex = binarySearch (keys, 0, keyCount, index); 
+        if (keyIndex < 0) keyIndex = -keyIndex - 1;
+        System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex); 
+        keys [keyIndex] = index;
+        System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex); 
+        items [keyIndex] = item;
+        keyCount++;
+        for (int i=keyIndex + 1; i<keyCount; i++) keys[i]++;
+	}
+}
+
+void _removeItem (int index, int count) {
+	if (keys == null) {
+		System.arraycopy (items, index + 1, items, index, --count - index);
+		items [count] = null;
+	} else {
+		int keyIndex = binarySearch (keys, 0, keyCount, index); 
+        if (keyIndex < 0) {
+        	keyIndex = -keyIndex - 1;
+        } else {
+        	--keyCount;
+    		System.arraycopy (keys, keyIndex + 1, keys, keyIndex, keyCount - keyIndex);
+    		keys [keyCount] = 0;
+    		System.arraycopy (items, keyIndex + 1, items, keyIndex, keyCount - keyIndex);
+    		items [keyCount] = null;
+        }
+        for (int i=keyIndex; i<keyCount; i++) --keys[i];
+	}
+}
+
+/* NOTE: Removes from start to index - 1 */
+void _removeItems (int start, int index, int count) {
+	if (keys == null) {
+		System.arraycopy (items, index, items, start, count - index);
+		for (int i=count-(index-start); i<count; i++) items [i] = null;
+	} else {
+		int end = index;
+		int left = binarySearch (keys, 0, keyCount, start);
+		if (left < 0) left = -left - 1;
+		int right = binarySearch (keys, left, keyCount, end);
+		if (right < 0) right = -right - 1;
+		//TODO - optimize when left and right are the same
+		System.arraycopy (keys, right, keys, left, keyCount - right);
+		for (int i=keyCount-(right-left); i<keyCount; i++) keys [i] = 0;
+		System.arraycopy (items, right, items, left, keyCount - right);
+		for (int i=keyCount-(right-left); i<keyCount; i++) items [i] = null;
+		keyCount -= (right - left);
+		for (int i=left; i<keyCount; i++) keys[i] -= (right - left);
+	}
+}
+
+void _setItemCount (int count, int itemCount) {
+	if (keys == null) {
+		int length = Math.max (4, (count + 3) / 4 * 4);
+		TableItem [] newItems = new TableItem [length];
+		System.arraycopy (items, 0, newItems, 0, Math.min (count, itemCount));
+		items = newItems;
+	} else {
+		int index = Math.min (count, itemCount);
+		keyCount = binarySearch (keys, 0, keyCount, index); 
+	    if (keyCount < 0) keyCount = -keyCount - 1;
+	    int length = Math.max (4, (keyCount + 3) / 4 * 4);
+	    int [] newKeys = new int [length];
+		System.arraycopy (keys, 0, newKeys, 0, keyCount);
+		keys = newKeys;
+		TableItem [] newItems = new TableItem [length];
+		System.arraycopy (items, 0, newItems, 0, keyCount);
+		items = newItems;
+	}
 }
 
 /**
@@ -344,7 +574,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
 			Event event = new Event ();
 			int index = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_FOCUSED);
 			if (index != -1) event.item = _getItem (index);
-			postEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, false);
 		}
 		wasSelected = oldSelected;
 	}
@@ -652,7 +882,7 @@ LRESULT CDDS_PREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lP
 			if (control != null && control.backgroundImage != null) {
 				RECT rect = new RECT ();
 				OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
-				fillImageBackground (nmcd.hdc, control, rect);
+				fillImageBackground (nmcd.hdc, control, rect, 0, 0);
 			} else {
 				if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {
 					if (OS.IsWindowEnabled (handle)) {
@@ -749,6 +979,8 @@ LRESULT CDDS_SUBITEMPREPAINT (NMLVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*lo
 	* TVM_INSERTITEM calls NM_CUSTOMDRAW before the new item
 	* has been added to the array.  The fix is to check for
 	* null.
+	* 
+	* NOTE: Force the item to be created if it does not exist.
 	*/
 	TableItem item = _getItem ((int)/*64*/nmcd.dwItemSpec);
 	if (item == null || item.isDisposed ()) return null;
@@ -978,7 +1210,7 @@ public void clear (int index) {
 	checkWidget ();
 	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
-	TableItem item = items [index];
+	TableItem item = _getItem (index, false);
 	if (item != null) {
 		if (item != currentItem) item.clear ();
 		/*
@@ -1043,7 +1275,7 @@ public void clear (int start, int end) {
 		LVITEM lvItem = null;
 		boolean cleared = false;
 		for (int i=start; i<=end; i++) {
-			TableItem item = items [i];
+			TableItem item = _getItem (i, false);
 			if (item != null) {
 				if (item != currentItem) {
 					cleared = true;
@@ -1076,7 +1308,7 @@ public void clear (int start, int end) {
 			if (currentItem == null && getDrawing () && OS.IsWindowVisible (handle)) {
 				OS.SendMessage (handle, OS.LVM_REDRAWITEMS, start, end);
 			}
-			TableItem item = start == end ? items [start] : null; 
+			TableItem item = start == end ? _getItem (start, false) : null; 
 			setScrollWidth (item, false);
 		}
 	}
@@ -1118,7 +1350,7 @@ public void clear (int [] indices) {
 	boolean cleared = false;
 	for (int i=0; i<indices.length; i++) {
 		int index = indices [i];
-		TableItem item = items [index];
+		TableItem item = _getItem (index, false);
 		if (item != null) {
 			if (item != currentItem) {
 				cleared = true;
@@ -1175,7 +1407,7 @@ public void clearAll () {
 	boolean cleared = false;
 	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	for (int i=0; i<count; i++) {
-		TableItem item = items [i];
+		TableItem item = _getItem (i, false);
 		if (item != null) {
 			if (item != currentItem) {
 				cleared = true;
@@ -1423,7 +1655,7 @@ void createItem (TableColumn column, int index) {
 	}
 	int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	for (int i=0; i<itemCount; i++) {
-		TableItem item = items [i];
+		TableItem item = _getItem (i, false);
 		if (item != null) {
 			String [] strings = item.strings;
 			if (strings != null) {
@@ -1577,19 +1809,7 @@ void createItem (TableColumn column, int index) {
 void createItem (TableItem item, int index) {
 	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);
-	if (count == items.length) {
-		/*
-		* Grow the array faster when redraw is off or the
-		* table is not visible.  When the table is painted,
-		* the items array is resized to be smaller to reduce
-		* memory usage.
-		*/
-		boolean small = getDrawing () && OS.IsWindowVisible (handle);
-		int length = small ? items.length + 4 : Math.max (4, items.length * 3 / 2);
-		TableItem [] newItems = new TableItem [length];
-		System.arraycopy (items, 0, newItems, 0, items.length);
-		items = newItems;
-	}
+	_checkGrow (count);
 	LVITEM lvItem = new LVITEM ();
 	lvItem.mask = OS.LVIF_TEXT | OS.LVIF_IMAGE;
 	lvItem.iItem = index;
@@ -1612,8 +1832,7 @@ void createItem (TableItem item, int index) {
 	int result = (int)/*64*/OS.SendMessage (handle, OS.LVM_INSERTITEM, 0, lvItem);
 	ignoreSelect = ignoreShrink = false;
 	if (result == -1) error (SWT.ERROR_ITEM_NOT_ADDED);
-	System.arraycopy (items, index, items, index + 1, count - index);
-	items [index] = item;
+	_insertItem (index, item, count);
 	setDeferResize (false);
 	
 	/* Resize to show the first item */
@@ -1623,7 +1842,7 @@ void createItem (TableItem item, int index) {
 void createWidget () {
 	super.createWidget ();
 	itemHeight = hotIndex = -1;
-	items = new TableItem [4];
+	_initItems ();
 	columns = new TableColumn [4];
 }
 
@@ -1778,6 +1997,14 @@ void destroyItem (TableColumn column) {
 	boolean first = false;
 	if (index == 0) {
 		first = true;
+		/*
+		* Changing the content of a column using LVM_SETCOLUMN causes
+		* the table control to send paint events. At this point the 
+		* partially disposed column is still part of the table and
+		* paint handler can try to access it. This can cause exceptions.
+		* The fix is to turn redraw off.
+		*/
+		setRedraw (false);
 		if (columnCount > 1) {
 			index = 1;
 			int cchTextMax = 1024;
@@ -1811,6 +2038,7 @@ void destroyItem (TableColumn column) {
 				OS.SendMessage (hwndHeader, OS.HDM_SETITEM, index, hdItem);
 			}
 		}
+		setRedraw (true);
 		/*
 		* Bug in Windows.  Despite the fact that every item in the
 		* table always has LPSTR_TEXTCALLBACK, Windows caches the
@@ -1844,7 +2072,7 @@ void destroyItem (TableColumn column) {
 	columns [columnCount] = null;
 	int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	for (int i=0; i<itemCount; i++) {
-		TableItem item = items [i];
+		TableItem item = _getItem (i, false);
 		if (item != null) {
 			if (columnCount == 0) {
 				item.strings = null;
@@ -1964,7 +2192,7 @@ void destroyItem (TableItem item) {
 	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	int index = 0;
 	while (index < count) {
-		if (items [index] == item) break;
+		if (_getItem (index, false) == item) break;
 		index++;
 	}
 	if (index == count) return;
@@ -1973,8 +2201,8 @@ void destroyItem (TableItem item) {
 	int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
 	ignoreSelect = ignoreShrink = false;
 	if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
-	System.arraycopy (items, index + 1, items, index, --count - index);
-	items [count] = null;
+	_removeItem (index, count);
+	--count;
 	if (count == 0) setTableEmpty ();
 	setDeferResize (false);
 }
@@ -2423,7 +2651,7 @@ public TableItem [] getItems () {
 			result [i] = _getItem (i);
 		}
 	} else {
-		System.arraycopy (items, 0, result, 0, count);
+		_getItems (result, count);
 	}
 	return result;
 }
@@ -2690,7 +2918,7 @@ int imageIndex (Image image, int column) {
 			OS.SendMessage (hwndHeader, OS.HDM_SETIMAGELIST, 0, hHeaderImageList);
 		}
 		fixCheckboxImageList (false);
-		if (itemHeight != -1) setItemHeight (false);
+		setItemHeight (false);
 		if (topIndex != 0) {
 			setTopIndex (topIndex);
 			setRedraw (true);
@@ -2765,19 +2993,26 @@ public int indexOf (TableColumn column) {
 public int indexOf (TableItem item) {
 	checkWidget ();
 	if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
-	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
-	if (1 <= lastIndexOf && lastIndexOf < count - 1) {
-		if (items [lastIndexOf] == item) return lastIndexOf;
-		if (items [lastIndexOf + 1] == item) return ++lastIndexOf;
-		if (items [lastIndexOf - 1] == item) return --lastIndexOf;
-	}
-	if (lastIndexOf < count / 2) {
-		for (int i=0; i<count; i++) {
-			if (items [i] == item) return lastIndexOf = i;
+	//TODO - find other loops that can be optimized
+	if (keys == null) {
+		int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+		if (1 <= lastIndexOf && lastIndexOf < count - 1) {
+			if (_getItem (lastIndexOf, false) == item) return lastIndexOf;
+			if (_getItem (lastIndexOf + 1, false) == item) return ++lastIndexOf;
+			if (_getItem (lastIndexOf - 1, false) == item) return --lastIndexOf;
+		}
+		if (lastIndexOf < count / 2) {
+			for (int i=0; i<count; i++) {
+				if (_getItem (i, false) == item) return lastIndexOf = i;
+			}
+		} else {
+			for (int i=count - 1; i>=0; --i) {
+				if (_getItem (i, false) == item) return lastIndexOf = i;
+			}
 		}
 	} else {
-		for (int i=count - 1; i>=0; --i) {
-			if (items [i] == item) return lastIndexOf = i;
+		for (int i=0; i<keyCount; i++) {
+			if (items [i] == item) return keys [i];
 		}
 	}
 	return -1;
@@ -2822,7 +3057,7 @@ void register () {
 }
 
 void releaseChildren (boolean destroy) {
-	if (items != null) {
+	if (_hasItems ()) {
 		int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 		/*
 		* Feature in Windows 98.  When there are a large number
@@ -2843,19 +3078,26 @@ void releaseChildren (boolean destroy) {
 			resizeCount = 1;
 			OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
 			for (int i=itemCount-1; i>=0; --i) {
-				TableItem item = items [i];
+				TableItem item = _getItem (i, false);
 				if (item != null && !item.isDisposed ()) item.release (false);
 				ignoreSelect = ignoreShrink = true;
 				OS.SendMessage (handle, OS.LVM_DELETEITEM, i, 0);
 				ignoreSelect = ignoreShrink = false;
 			}
 		} else {
-			for (int i=0; i<itemCount; i++) {
-				TableItem item = items [i];
-				if (item != null && !item.isDisposed ()) item.release (false);
+			if (keys == null) {
+				for (int i=0; i<itemCount; i++) {
+					TableItem item = _getItem (i, false);
+					if (item != null && !item.isDisposed ()) item.release (false);
+				}
+			} else {
+				for (int i=0; i<keyCount; i++) {
+					TableItem item = items [i];
+					if (item != null && !item.isDisposed ()) item.release (false);
+				}
 			}
 		}
-		items = null;
+		_clearItems ();
 	}
 	if (columns != null) {
 		for (int i=0; i<columnCount; i++) {
@@ -2920,14 +3162,14 @@ public void remove (int [] indices) {
 	for (int i=0; i<newIndices.length; i++) {
 		int index = newIndices [i];
 		if (index != last) {
-			TableItem item = items [index];
+			TableItem item = _getItem (index, false);
 			if (item != null && !item.isDisposed ()) item.release (false);
 			ignoreSelect = ignoreShrink = true;
 			int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
 			ignoreSelect = ignoreShrink = false;
 			if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
-			System.arraycopy (items, index + 1, items, index, --count - index);
-			items [count] = null;
+			_removeItem(index, count);
+			--count;
 			last = index;
 		}
 	}
@@ -2953,15 +3195,15 @@ public void remove (int index) {
 	checkWidget ();
 	int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);
-	TableItem item = items [index];
+	TableItem item = _getItem (index, false);
 	if (item != null && !item.isDisposed ()) item.release (false);
 	setDeferResize (true);
 	ignoreSelect = ignoreShrink = true;
 	int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, index, 0);
 	ignoreSelect = ignoreShrink = false;
 	if (code == 0) error (SWT.ERROR_ITEM_NOT_REMOVED);
-	System.arraycopy (items, index + 1, items, index, --count - index);
-	items [count] = null;
+	_removeItem (index, count);
+	--count;
 	if (count == 0) setTableEmpty ();
 	setDeferResize (false);
 }
@@ -2995,7 +3237,7 @@ public void remove (int start, int end) {
 		setDeferResize (true);
 		int index = start;
 		while (index <= end) {
-			TableItem item = items [index];
+			TableItem item = _getItem (index, false);
 			if (item != null && !item.isDisposed ()) item.release (false);
 			ignoreSelect = ignoreShrink = true;
 			int /*long*/ code = OS.SendMessage (handle, OS.LVM_DELETEITEM, start, 0);
@@ -3003,8 +3245,7 @@ public void remove (int start, int end) {
 			if (code == 0) break;
 			index++;
 		}
-		System.arraycopy (items, index, items, start, count - index);
-		for (int i=count-(index-start); i<count; i++) items [i] = null;
+		_removeItems (start, index, count);
 		if (index <= end) error (SWT.ERROR_ITEM_NOT_REMOVED);
 		/*
 		* This code is intentionally commented.  It is not necessary
@@ -3028,7 +3269,7 @@ public void removeAll () {
 	checkWidget ();
 	int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
 	for (int i=0; i<itemCount; i++) {
-		TableItem item = items [i];
+		TableItem item = _getItem (i, false);
 		if (item != null && !item.isDisposed ()) item.release (false);
 	}
 	/*
@@ -3148,6 +3389,23 @@ public void select (int [] indices) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (_hasItems ()) {
+		int itemCount = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+		for (int i=0; i<itemCount; i++) {
+			TableItem item = _getItem (i, false);
+			if (item != null) item.reskin (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columnCount; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
@@ -3410,8 +3668,11 @@ void sendEraseItemEvent (TableItem item, NMLVCUSTOMDRAW nmcd, int /*long*/ lPara
 					RECT headerRect = new RECT ();
 					OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
 					OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
-					rect.left = 0;
 					rect.right = headerRect.right;
+					index = (int)/*64*/OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, 0, 0);
+					OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, headerRect);
+					OS.MapWindowPoints (hwndHeader, handle, headerRect, 2);
+					rect.left = headerRect.left;
 					pClipRect.left = cellRect.left;
 					pClipRect.right += EXPLORER_EXTRA;
 				} else {
@@ -4334,7 +4595,7 @@ public void setItemCount (int count) {
 	if (!isVirtual) setRedraw (false);
 	int index = count;
 	while (index < itemCount) {
-		TableItem item = items [index];
+		TableItem item = _getItem (index, false);
 		if (item != null && !item.isDisposed ()) item.release (false);
 		if (!isVirtual) {
 			ignoreSelect = ignoreShrink = true;
@@ -4345,10 +4606,7 @@ public void setItemCount (int count) {
 		index++;
 	}
 	if (index < itemCount) error (SWT.ERROR_ITEM_NOT_REMOVED);
-	int length = Math.max (4, (count + 3) / 4 * 4);
-	TableItem [] newItems = new TableItem [length];
-	System.arraycopy (items, 0, newItems, 0, Math.min (count, itemCount));
-	items = newItems;
+	_setItemCount (count, itemCount);
 	if (isVirtual) {
 		int flags = OS.LVSICF_NOINVALIDATEALL | OS.LVSICF_NOSCROLL;
 		OS.SendMessage (handle, OS.LVM_SETITEMCOUNT, count, flags);
@@ -4364,7 +4622,7 @@ public void setItemCount (int count) {
 		}
 	} else {
 		for (int i=itemCount; i<count; i++) {
-			items [i] = new TableItem (this, SWT.NONE, i, true);
+			new TableItem (this, SWT.NONE, i, true);
 		}
 	}
 	if (!isVirtual) setRedraw (true);
@@ -4613,8 +4871,8 @@ boolean setScrollWidth (TableItem item, boolean force) {
 				imageIndent = Math.max (imageIndent, item.imageIndent);
 				hFont = item.fontHandle (0);
 			} else {
-				if (items [index] != null) {
-					TableItem tableItem = items [index];
+				TableItem tableItem = _getItem (index, false);
+				if (tableItem != null) {
 					string = tableItem.text;
 					imageIndent = Math.max (imageIndent, tableItem.imageIndent);
 					hFont = tableItem.fontHandle (0);
@@ -4939,7 +5197,7 @@ void setTableEmpty () {
 			if (OS.COMCTL32_MAJOR < 6) style &= ~SWT.DOUBLE_BUFFERED;
 		}
 	}
-	items = new TableItem [4];
+	_initItems ();
 	if (columnCount == 0) {
 		OS.SendMessage (handle, OS.LVM_SETCOLUMNWIDTH, 0, 0);
 		setScrollWidth (null, false);
@@ -5556,7 +5814,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 			if (index != -1) {
 				Event event = new Event ();
 				event.item = _getItem (index);
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 			}
 			return LRESULT.ZERO;
 	}
@@ -5786,16 +6044,7 @@ LRESULT WM_MOUSEHOVER (int /*long*/ wParam, int /*long*/ lParam) {
 }
 
 LRESULT WM_PAINT (int /*long*/ wParam, int /*long*/ lParam) {
-	if (!ignoreShrink) {
-		/* Resize the item array to match the item count */
-		int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
-		if (items.length > 4 && items.length - count > 3) {
-			int length = Math.max (4, (count + 3) / 4 * 4);
-			TableItem [] newItems = new TableItem [length];
-			System.arraycopy (items, 0, newItems, 0, count);
-			items = newItems;
-		}
-	}
+	_checkShrink();
 	if (fixScrollWidth) setScrollWidth (null, true);
 	if (!OS.IsWinCE && OS.COMCTL32_MAJOR < 6) {
 		if ((style & SWT.DOUBLE_BUFFERED) != 0 || findImageControl () != null) {
@@ -6313,6 +6562,8 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			* TVM_INSERTITEM calls LVN_GETDISPINFO before the item
 			* has been added to the array.  The fix is to check for
 			* null.
+			* 
+			* NOTE: Force the item to be created if it does not exist.
 			*/
 			TableItem item = _getItem (plvfi.iItem);
 			if (item == null) break;
@@ -6485,7 +6736,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			OS.MoveMemory(pnmlv, lParam, NMLISTVIEW.sizeof);
 			TableColumn column = columns [pnmlv.iSubItem];
 			if (column != null) {
-				column.postEvent (SWT.Selection);
+				column.sendSelectionEvent (SWT.Selection);
 			}
 			break;
 		}
@@ -6496,7 +6747,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			if (pnmlv.iItem != -1) {
 				Event event = new Event ();
 				event.item = _getItem (pnmlv.iItem);
-				postEvent (SWT.DefaultSelection, event);
+				sendSelectionEvent (SWT.DefaultSelection, event, false);
 			}
 			break;
 		}
@@ -6750,7 +7001,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			OS.MoveMemory (phdn, lParam, NMHEADER.sizeof);
 			TableColumn column = columns [phdn.iItem];
 			if (column != null) {
-				column.postEvent (SWT.DefaultSelection);
+				column.sendSelectionEvent (SWT.DefaultSelection);
 			}
 			break;
 		}
@@ -6829,7 +7080,9 @@ LRESULT wmNotifyToolTip (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 								}
 							}
 							RECT cellRect = item.getBounds (pinfo.iItem, pinfo.iSubItem, true, true, true, true, hDC);
-							if (itemRect.right > cellRect.right) {
+							RECT clientRect = new RECT (); 
+							OS.GetClientRect (handle, clientRect);
+							if (itemRect.right > cellRect.right || itemRect.right > clientRect.right) {
 								//TEMPORARY CODE
 								String string = " ";
 //								String string = null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java
index be36d9b..8f77963 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableColumn.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -370,7 +370,7 @@ public void pack () {
 		if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
 		int count = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETITEMCOUNT, 0, 0);
 		for (int i=0; i<count; i++) {
-			TableItem item = parent.items [i];
+			TableItem item = parent._getItem (i, false);
 			if (item != null) {
 				int /*long*/ hFont = item.fontHandle (index);
 				if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java
index 0b497d4..5f28b56 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TableItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -195,10 +195,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -812,7 +812,7 @@ void setChecked (boolean checked, boolean notify) {
 		Event event = new Event();
 		event.item = this;
 		event.detail = SWT.CHECK;
-		parent.postEvent (SWT.Selection, event);
+		parent.sendSelectionEvent (SWT.Selection, event, false);
 	}
 	redraw ();
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
new file mode 100644
index 0000000..7010326
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java	
@@ -0,0 +1,558 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.win32.*;
+import org.eclipse.swt.*;
+
+/**
+ * Instances of this class represent the system task bar.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ * 
+ * @see Display#getSystemTaskBar
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskBar extends Widget {
+	int itemCount;
+	TaskItem [] items = new TaskItem [4];
+	int /*long*/ mTaskbarList3;
+	
+	static final char [] EXE_PATH;
+	static final char [] ICO_DIR = {'i','c','o','_','d','i','r','\0'};
+	static final PROPERTYKEY PKEY_Title = new PROPERTYKEY ();
+	static final PROPERTYKEY PKEY_AppUserModel_IsDestListSeparator = new PROPERTYKEY ();
+	static final byte [] CLSID_TaskbarList = new byte [16]; 
+	static final byte [] CLSID_DestinationList = new byte[16]; 
+	static final byte [] CLSID_EnumerableObjectCollection = new byte[16]; 
+	static final byte [] CLSID_ShellLink = new byte[16]; 
+	static final byte [] CLSID_FileOperation = new byte [16];
+	static final byte [] IID_ITaskbarList3 = new byte [16];
+	static final byte [] IID_ICustomDestinationList = new byte[16]; 
+	static final byte [] IID_IObjectArray = new byte[16]; 
+	static final byte [] IID_IObjectCollection = new byte[16]; 
+	static final byte [] IID_IShellLinkW = new byte[16]; 
+	static final byte [] IID_IPropertyStore = new byte[16]; 
+	static final byte [] IID_IShellItem = new byte [16]; 
+	static final byte [] IID_IFileOperation = new byte [16];
+	static final byte [] FOLDERID_LocalAppData = new byte [16];
+	static {
+		OS.IIDFromString ("{56FDF344-FD6D-11d0-958A-006097C9A090}\0".toCharArray (), CLSID_TaskbarList); //$NON-NLS-1$
+		OS.IIDFromString ("{77f10cf0-3db5-4966-b520-b7c54fd35ed6}\0".toCharArray (), CLSID_DestinationList); //$NON-NLS-1$
+		OS.IIDFromString ("{2d3468c1-36a7-43b6-ac24-d3f02fd9607a}\0".toCharArray (), CLSID_EnumerableObjectCollection); //$NON-NLS-1$
+		OS.IIDFromString ("{00021401-0000-0000-C000-000000000046}\0".toCharArray (), CLSID_ShellLink); //$NON-NLS-1$
+		OS.IIDFromString ("{3ad05575-8857-4850-9277-11b85bdb8e09}\0".toCharArray (), CLSID_FileOperation);
+		OS.IIDFromString ("{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}\0".toCharArray (), IID_ITaskbarList3); //$NON-NLS-1$	
+		OS.IIDFromString ("{6332debf-87b5-4670-90c0-5e57b408a49e}\0".toCharArray (), IID_ICustomDestinationList); //$NON-NLS-1$
+		OS.IIDFromString ("{92CA9DCD-5622-4bba-A805-5E9F541BD8C9}\0".toCharArray (), IID_IObjectArray); //$NON-NLS-1$
+		OS.IIDFromString ("{5632b1a4-e38a-400a-928a-d4cd63230295}\0".toCharArray (), IID_IObjectCollection); //$NON-NLS-1$
+		OS.IIDFromString ("{000214F9-0000-0000-C000-000000000046}\0".toCharArray (), IID_IShellLinkW); //$NON-NLS-1$
+		OS.IIDFromString ("{886d8eeb-8cf2-4446-8d02-cdba1dbdcf99}\0".toCharArray (), IID_IPropertyStore); //$NON-NLS-1$
+		OS.IIDFromString ("{43826d1e-e718-42ee-bc55-a1e261c37bfe}\0".toCharArray (), IID_IShellItem); //$NON-NLS-1$
+		OS.IIDFromString ("{947aab5f-0a5c-4c13-b4d6-4bf7836fc9f8}\0".toCharArray (), IID_IFileOperation); //$NON-NLS-1$
+		OS.IIDFromString ("{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}\0".toCharArray (), FOLDERID_LocalAppData); //$NON-NLS-1$
+		OS.PSPropertyKeyFromString ("{F29F85E0-4FF9-1068-AB91-08002B27B3D9} 2\0".toCharArray (), PKEY_Title); //$NON-NLS-1$
+		OS.PSPropertyKeyFromString ("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 6\0".toCharArray (), PKEY_AppUserModel_IsDestListSeparator); //$NON-NLS-1$
+		TCHAR buffer = new TCHAR (0, OS.MAX_PATH);
+		while (OS.GetModuleFileName (0, buffer, buffer.length ()) == buffer.length ()) {
+			buffer = new TCHAR (0, buffer.length () + OS.MAX_PATH);
+		}
+		int length = buffer.strlen ();
+		EXE_PATH = new char [length + 1];
+		System.arraycopy (buffer.chars, 0, EXE_PATH, 0, length);
+	}
+
+TaskBar (Display display, int style) {
+	if (display == null) display = Display.getCurrent ();
+	if (display == null) display = Display.getDefault ();
+	if (!display.isValidThread ()) {
+		error (SWT.ERROR_THREAD_INVALID_ACCESS);
+	}
+	this.display = display;
+	createHandle ();
+	reskinWidget ();
+}
+
+void createHandle () {
+	int /*long*/[] ppv = new int /*long*/ [1];
+	int hr = OS.CoCreateInstance (CLSID_TaskbarList, 0, OS.CLSCTX_INPROC_SERVER, IID_ITaskbarList3, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	mTaskbarList3 = ppv [0];
+}
+
+void createItem (TaskItem item, int index) {
+	if (index == -1) index = itemCount;
+	if (!(0 <= index && index <= itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	if (itemCount == items.length) {
+		TaskItem [] newItems = new TaskItem [items.length + 4];
+		System.arraycopy (items, 0, newItems, 0, items.length);
+		items = newItems;
+	}
+	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
+	items [index] = item;
+}
+
+void createItems () {
+	Shell [] shells = display.getShells ();
+	for (int i = 0; i < shells.length; i++) {
+		getItem (shells[i]);
+	}
+	getItem (null);
+}
+
+int /*long*/ createShellLink (MenuItem item, String directory) {
+	int style = item.getStyle ();
+	if ((style & SWT.CASCADE) != 0) return 0;
+	int /*long*/ [] ppv = new int /*long*/ [1];
+	int hr = OS.CoCreateInstance (CLSID_ShellLink, 0, OS.CLSCTX_INPROC_SERVER, IID_IShellLinkW, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ pLink = ppv [0];
+
+	int /*long*/ hHeap = OS.GetProcessHeap ();
+	int /*long*/ pv = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, OS.PROPVARIANT_sizeof());
+	int /*long*/ titlePtr = 0;
+	PROPERTYKEY key;
+	if ((style & SWT.SEPARATOR) != 0) {
+		OS.MoveMemory (pv, new short [] {OS.VT_BOOL}, 2);
+		OS.MoveMemory (pv + 8, new short [] {OS.VARIANT_TRUE}, 2);
+		key = PKEY_AppUserModel_IsDestListSeparator;
+	} else {
+		String text = item.getText ();
+		int length = text.length ();
+		char [] buffer = new char [length + 1];
+		text.getChars (0, length, buffer, 0);
+		titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
+		OS.MoveMemory (titlePtr, buffer, buffer.length * 2);
+		OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2);
+		OS.MoveMemory (pv + 8, new int /*long*/ [] {titlePtr}, OS.PTR_SIZEOF);
+		key = PKEY_Title;
+		
+		/*IShellLink::SetPath*/
+		hr = OS.VtblCall (20, pLink, EXE_PATH);
+		if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+		
+		text = Display.LAUNCHER_PREFIX + Display.TASKBAR_EVENT + item.id;
+		length = text.length ();
+		buffer = new char [length + 1];
+		text.getChars (0, length, buffer, 0);
+		/*IShellLink::SetArguments*/
+		hr = OS.VtblCall (11, pLink, buffer);
+		if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+		
+		/* This code is intentionally commented */
+//		String tooltip = item.tooltip;
+//		if (tooltip != null) {
+//			length = tooltip.length ();
+//			buffer = new char [length + 1];
+//			tooltip.getChars (0, length, buffer, 0);
+//			/*IShellLink::SetDescription*/
+//			hr = OS.VtblCall (7, pLink, buffer);
+//			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+//		}
+		
+		Image image = item.getImage ();
+		if (image != null && directory != null) {
+			String imageFilename = directory + "\\menu" + item.id + ".ico" ;
+			ImageData data;
+			if (item.hBitmap != 0) {
+				Image image2 = Image.win32_new (display, SWT.BITMAP, item.hBitmap);
+				data = image2.getImageData ();
+			} else {
+				data = image.getImageData ();
+			}
+			ImageLoader loader = new ImageLoader ();
+			loader.data = new ImageData [] {data};
+			loader.save (imageFilename, SWT.IMAGE_ICO);
+			length = imageFilename.length ();
+			buffer = new char [length + 1];
+			imageFilename.getChars (0, length, buffer, 0);
+			/*IShellLink::SetIconLocation*/
+			hr = OS.VtblCall (17, pLink, buffer, 0);
+			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+		}
+	}
+	
+	/*IUnknown::QueryInterface*/
+	hr = OS.VtblCall (0, pLink, IID_IPropertyStore, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ pPropStore = ppv [0];
+	/*IPropertyStore::SetValue*/
+	hr = OS.VtblCall (6, pPropStore, key, pv);
+	if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+	/*IPropertyStore::Commit*/
+	OS.VtblCall (7, pPropStore);
+	/*IUnknown::Release*/
+	OS.VtblCall (2, pPropStore);
+	
+	OS.HeapFree (hHeap, 0, pv);
+	if (titlePtr != 0) OS.HeapFree (hHeap, 0, titlePtr);
+	return pLink;
+}
+
+int /*long*/ createShellLinkArray (MenuItem [] items, String directory) {
+	if (items == null) return 0;
+	if (items.length == 0) return 0;
+	int /*long*/ [] ppv = new int /*long*/ [1];
+	int hr = OS.CoCreateInstance (CLSID_EnumerableObjectCollection, 0, OS.CLSCTX_INPROC_SERVER, IID_IObjectCollection, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ pObjColl = ppv [0];
+	for (int i = 0; i < items.length; i++) {
+		int /*long*/ pLink = createShellLink (items[i], directory);
+		if (pLink != 0) {
+			/*IObjectCollection::AddObject*/
+			hr = OS.VtblCall (5, pObjColl, pLink);
+			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+			/*IUnknown::Release*/
+			OS.VtblCall (2, pLink);
+		}
+	}
+	/*IUnknown::QueryInterface*/
+	hr = OS.VtblCall (0, pObjColl, IID_IObjectArray, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ poa = ppv [0];
+	/*IUnknown::Release*/
+	OS.VtblCall (2, pObjColl);
+	return poa;
+}
+
+void destroyItem (TaskItem item) {
+	int index = 0;
+	while (index < itemCount) {
+		if (items [index] == item) break;
+		index++;
+	}
+	if (index == itemCount) return;
+	System.arraycopy (items, index + 1, items, index, --itemCount - index);
+	items [itemCount] = null;
+}
+
+String getDirectory (char[] appName) {
+	char [] appDir = new char [appName.length];
+	for (int i = 0; i < appName.length; i++) {
+		char c = appName [i];
+		switch (c) {
+			case '\\':
+			case '/':
+			case ':':
+			case '*':
+			case '?':
+			case '\"':
+			case '<':
+			case '>':
+			case '|':
+				appDir [i] = '_';
+				break;
+			default:
+				appDir [i] = c;
+		}
+	}
+	String result = null;
+	int /*long*/ [] ppv = new int /*long*/ [1];
+	int hr = OS.SHCreateItemInKnownFolder (FOLDERID_LocalAppData, 0, null, IID_IShellItem, ppv);
+	if (hr == OS.S_OK) {
+		int /*long*/ psiRoot = ppv [0];
+		hr = OS.CoCreateInstance (CLSID_FileOperation, 0, OS.CLSCTX_INPROC_SERVER, IID_IFileOperation, ppv);
+		if (hr == OS.S_OK) {
+			int /*long*/ pfo = ppv [0];
+			/*IFileOperation.SetOperationFlags*/
+			hr = OS.VtblCall (5, pfo, OS.FOF_NO_UI);
+			if (hr == OS.S_OK) {
+				int /*long*/ psiAppDir = getDirectory (psiRoot, pfo, appDir, false);
+				if (psiAppDir != 0) {
+					int /*long*/ psiIcoDir = getDirectory (psiAppDir, pfo, ICO_DIR, true);
+					if (psiIcoDir != 0) {
+						/*IShellItem::GetDisplayName*/
+						hr = OS.VtblCall (5, psiIcoDir, OS.SIGDN_FILESYSPATH, ppv);
+						if (hr == OS.S_OK) {
+							int /*long*/ wstr = ppv [0]; 
+							int length = OS.wcslen (wstr);
+							char [] buffer = new char [length];
+							OS.MoveMemory (buffer, wstr, length * 2);
+							result = new String (buffer);
+							OS.CoTaskMemFree (wstr);
+						}
+						/*IUnknown::Release*/
+						OS.VtblCall (2, psiIcoDir);
+					}
+					/*IUnknown::Release*/
+					OS.VtblCall (2, psiAppDir);
+				}
+			}
+			/*IUnknown::Release*/
+			OS.VtblCall(2, pfo);
+		}
+		/*IUnknown::Release*/
+		OS.VtblCall (2, psiRoot);
+	}
+	return result;
+}
+
+int /*long*/ getDirectory (int /*long*/ parent, int /*long*/ pfo, char [] name, boolean delete) {
+	int /*long*/ [] ppv = new int /*long*/ [1];
+	int hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
+	if (hr == OS.S_OK) {
+		if (delete) {
+			/*IFileOperation.Delete*/
+			hr = OS.VtblCall (18, pfo, ppv [0], 0);
+			/*IUnknown::Release*/
+			OS.VtblCall (2, ppv [0]);
+			if (hr == OS.S_OK) {
+				/*IFileOperation.NewItem */
+				hr = OS.VtblCall (20, pfo, parent, OS.FILE_ATTRIBUTE_DIRECTORY, name, null, 0);
+				if (hr == OS.S_OK) {
+					/*IFileOperation.PerformOperations */
+					hr = OS.VtblCall (21, pfo);
+					if (hr == OS.S_OK) {
+						hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
+						if (hr == OS.S_OK) {
+							return ppv [0];
+						}
+					}
+				}
+			}
+		} else {
+			return ppv [0];
+		}
+	} else {
+		/*IFileOperation.NewItem */
+		hr = OS.VtblCall (20, pfo, parent, OS.FILE_ATTRIBUTE_DIRECTORY, name, null, 0);
+		if (hr == OS.S_OK) {
+			/*IFileOperation.PerformOperations */
+			hr = OS.VtblCall (21, pfo);
+			if (hr == OS.S_OK) {
+				hr = OS.SHCreateItemFromRelativeName (parent, name, 0, IID_IShellItem, ppv);
+				if (hr == OS.S_OK) {
+					return ppv [0];
+				}
+			}
+		}
+	}
+	return 0;
+}
+
+/**
+ * Returns the item at the given, zero-relative index in the
+ * receiver. Throws an exception if the index is out of range.
+ *
+ * @param index the index of the item to return
+ * @return the item at the given index
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (int index) {
+	checkWidget ();
+	createItems ();
+	if (!(0 <= index && index < itemCount)) error (SWT.ERROR_INVALID_RANGE);
+	return items [index];
+}
+
+/**
+ * Returns the <code>TaskItem</code> for the given <code>Shell</code> or the <code>TaskItem</code> 
+ * for the application if the <code>Shell</code> parameter is <code>null</code>.
+ * If the requested item is not supported by the platform it returns <code>null</code>.
+ * 
+ * @param shell the shell for which the task item is requested, or null to request the application item
+ * @return the task item for the given shell or the application
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem getItem (Shell shell) {
+	checkWidget ();
+	for (int i = 0; i < items.length; i++) {
+		if (items [i] != null && items [i].shell == shell) {
+			return items [i];
+		}
+	}
+	TaskItem item = new TaskItem (this, SWT.NONE);
+	if (shell != null) item.setShell (shell);
+	return item;
+}
+
+/**
+ * Returns the number of items contained in the receiver.
+ *
+ * @return the number of items
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getItemCount () {
+	checkWidget ();
+	createItems ();
+	return itemCount;
+}
+
+/**
+ * Returns an array of <code>TaskItem</code>s which are the items
+ * in the receiver. 
+ * <p>
+ * Note: This is not the actual structure used by the receiver
+ * to maintain its list of items, so modifying the array will
+ * not affect the receiver. 
+ * </p>
+ *
+ * @return the items in the receiver
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public TaskItem [] getItems () {
+	checkWidget ();
+	createItems ();
+	TaskItem [] result = new TaskItem [itemCount];
+	System.arraycopy (items, 0, result, 0, result.length);
+	return result;
+}
+
+void releaseChildren (boolean destroy) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null && !item.isDisposed ()) {
+				item.release (false);
+			}
+		}
+		items = null;
+	}
+	super.releaseChildren (destroy);
+}
+
+void releaseParent () {
+	super.releaseParent ();
+	if (display.taskBar == this) display.taskBar = null;
+}
+
+void releaseWidget () {
+	super.releaseWidget ();
+	if (mTaskbarList3 != 0) {
+		/* Release() */
+		OS.VtblCall (2, mTaskbarList3);
+		mTaskbarList3 = 0;
+	}
+}
+
+void reskinChildren (int flags) {	
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TaskItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+void setMenu (Menu menu) {
+	int /*long*/ [] ppv = new int /*long*/ [1];
+	int hr = OS.CoCreateInstance (CLSID_DestinationList, 0, OS.CLSCTX_INPROC_SERVER, IID_ICustomDestinationList, ppv);
+	if (hr != OS.S_OK) error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ pDestList = ppv[0];
+	String appName = Display.APP_NAME;
+	char [] buffer = null;
+	if (appName != null) {
+		int length = appName.length ();
+		buffer = new char [length + 1];
+		appName.getChars (0, length, buffer, 0);
+	}
+	
+	MenuItem [] items = null; 
+	if (menu != null && (items = menu.getItems ()).length != 0) {
+		String directory = getDirectory (buffer);
+		int /*long*/ poa = createShellLinkArray (items, directory);
+		if (poa != 0) {
+			
+			/*ICustomDestinationList::SetAppID*/
+			hr = OS.VtblCall (3, pDestList, buffer);
+			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+			
+			/*ICustomDestinationList::BeginList*/
+			int [] cMaxSlots = new int [1];
+			OS.VtblCall (4, pDestList, cMaxSlots, IID_IObjectArray, ppv);
+			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+			int /*long*/ pRemovedItems = ppv [0];
+			
+			int [] count = new int [1];
+			/*IObjectArray::GetCount*/
+			OS.VtblCall (3, poa, count);
+			if (count [0] != 0) {
+				/*ICustomDestinationList::AddUserTasks*/
+				hr = OS.VtblCall (7, pDestList, poa);
+				if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+			}
+			
+			for (int i = 0; i < items.length; i++) {
+				MenuItem item = items [i];
+				if ((item.getStyle () & SWT.CASCADE) != 0) {
+					Menu subMenu = item.getMenu ();
+					if (subMenu != null) {
+						int /*long*/ poa2 = createShellLinkArray (subMenu.getItems (), directory);
+						if (poa2 != 0) {
+							/*IObjectArray::GetCount*/
+							OS.VtblCall (3, poa2, count);
+							if (count [0] != 0) {
+								String text = item.getText ();
+								int length = text.length ();
+								buffer = new char [length + 1];
+								text.getChars (0, length, buffer, 0);
+								/*ICustomDestinationList::AppendCategory*/
+								hr = OS.VtblCall (5, pDestList, buffer, poa2);
+								if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+							}
+							/*IUnknown::Release*/
+							OS.VtblCall (2, poa2);
+						}
+					}
+				}
+			}
+			
+			/*ICustomDestinationList::CommitList*/
+			hr = OS.VtblCall (8, pDestList);
+			if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+			
+			/*IUnknown::Release*/
+			if (pRemovedItems != 0) OS.VtblCall (2, pRemovedItems);
+			/*IUnknown::Release*/
+			OS.VtblCall (2, poa);
+		}
+	} else {
+		/*ICustomDestinationList::DeleteList*/
+		hr = OS.VtblCall (10, pDestList, buffer);
+		if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT);
+	}
+	/*IUnknown::Release*/
+	OS.VtblCall (2, pDestList);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java
new file mode 100644
index 0000000..07a9834
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskItem.java	
@@ -0,0 +1,564 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.widgets;
+
+
+import org.eclipse.swt.internal.win32.*;
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+
+/**
+ * Instances of this class represent a task item.
+ * 
+ * <dl>
+ * <dt><b>Styles:</b></dt>
+ * <dd>(none)</dd>
+ * <dt><b>Events:</b></dt>
+ * <dd>(none)</dd>
+ * </dl>
+ *
+ * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
+ * 
+ * @since 3.6
+ * 
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public class TaskItem extends Item {
+	TaskBar parent;
+	Shell shell;
+	int progress, progressState = SWT.DEFAULT;
+	Image overlayImage;
+	String overlayText = "";
+	boolean showingText = false;
+	Menu menu;
+	
+	static final int PROGRESS_MAX = 100;
+	
+/**
+ * Constructs a new instance of this class given its parent
+ * (which must be a <code>Tray</code>) and a style value
+ * describing its behavior and appearance. The item is added
+ * to the end of the items maintained by its parent.
+ * <p>
+ * The style value is either one of the style constants defined in
+ * class <code>SWT</code> which is applicable to instances of this
+ * class, or must be built by <em>bitwise OR</em>'ing together 
+ * (that is, using the <code>int</code> "|" operator) two or more
+ * of those <code>SWT</code> style constants. The class description
+ * lists the style constants that are applicable to the class.
+ * Style bits are also inherited from superclasses.
+ * </p>
+ *
+ * @param parent a composite control which will be the parent of the new instance (cannot be null)
+ * @param style the style of control to construct
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
+ *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
+ * </ul>
+ *
+ * @see SWT
+ * @see Widget#checkSubclass
+ * @see Widget#getStyle
+ */
+TaskItem (TaskBar parent, int style) {
+	super (parent, style);
+	this.parent = parent;
+	parent.createItem (this, -1);
+}
+
+protected void checkSubclass () {
+	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);
+}
+
+void destroyWidget () {
+	parent.destroyItem (this);
+	releaseHandle ();
+}
+
+/**
+ * Returns the receiver's pop up menu if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's menu
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Menu getMenu () {
+	checkWidget ();
+	return menu;
+} 
+
+/**
+ * Returns the receiver's overlay image if it has one, or null
+ * if it does not.
+ *
+ * @return the receiver's overlay image
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public Image getOverlayImage () {
+	checkWidget ();
+	return overlayImage;
+}
+
+/**
+ * Returns the receiver's overlay text, which will be an empty
+ * string if it has never been set.
+ *
+ * @return the receiver's overlay text
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public String getOverlayText () {
+	checkWidget ();
+	return overlayText;
+}
+
+/**
+ * Returns the receiver's parent, which must be a <code>TaskBar</code>.
+ *
+ * @return the receiver's parent
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ */
+public TaskBar getParent () {
+	checkWidget ();
+	return parent;
+}
+
+/**
+ * Returns the receiver's progress.
+ *
+ * @return the receiver's progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgress () {
+	checkWidget ();
+	return progress;
+}
+
+/**
+ * Returns the receiver's progress state.
+ *
+ * @return the receiver's progress state
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public int getProgressState () {
+	checkWidget ();
+	return progressState;
+}
+
+void recreate () {
+	if (showingText) {
+		if (overlayText.length () != 0) updateText ();
+	} else {
+		if (overlayImage != null) updateImage ();
+	}
+	if (progress != 0) updateProgress ();
+	if (progressState != SWT.DEFAULT) updateProgressState ();
+}
+
+void releaseHandle () {
+	super.releaseHandle ();
+	parent = null;
+}
+
+void releaseWidget () {
+	super.releaseWidget ();
+	overlayImage = null;
+	overlayText = null;
+}
+
+/**
+ * Sets the receiver's pop up menu to the argument. The way the menu is
+ * shown is platform specific.
+ * 
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * set this feature on the <code>TaskItem</code> for application.<br>
+ * On Windows, this feature will only work on RCP applications.</p>
+ *
+ * <p>
+ * The menu should be fully created before this method is called.
+ * Dynamic changes to the menu after the method is called will not be reflected
+ * in the native menu.</p> 
+ *
+ * @param menu the new pop up menu
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setMenu (Menu menu) {
+	checkWidget ();
+	if (menu != null) {
+		if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+		if ((menu.style & SWT.POP_UP) == 0) {
+			error (SWT.ERROR_MENU_NOT_POP_UP);
+		}
+	}
+	if (shell != null) return;
+	this.menu = menu;
+	parent.setMenu (menu);
+}
+
+/**
+ * Sets the receiver's overlay image, which may be null
+ * indicating that no image should be displayed. The bounds
+ * for the overlay image is determined by the platform and in 
+ * general it should be a small image.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return the NULL.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayImage the new overlay image (may be null)
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if the overlayImage has been disposed</li> 
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayImage (Image overlayImage) {
+	checkWidget ();
+	if (overlayImage != null && overlayImage.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+	if (shell == null) return;
+	this.overlayImage = overlayImage;
+	if (overlayImage != null) {
+		updateImage ();
+	} else {
+		if (overlayText.length () != 0) {
+			updateText ();
+		} else {
+			int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+			int /*long*/ hwnd = shell.handle;
+			/* ITaskbarList3::SetOverlayIcon */
+			OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
+		}
+	}
+}
+
+/**
+ * Sets the receiver's overlay text. The space available to display the
+ * overlay text is platform dependent and in general it should be no longer
+ * than a few characters.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return an empty string.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param overlayText the new overlay text
+ *
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_NULL_ARGUMENT - if the overlayText is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ */
+public void setOverlayText (String overlayText) {
+	checkWidget ();
+	if (overlayText == null) error (SWT.ERROR_NULL_ARGUMENT);
+	if (shell == null) return;
+	this.overlayText = overlayText;
+	if (overlayText.length () != 0) {
+		updateText ();
+	} else {
+		if (overlayImage != null) {
+			updateImage ();
+		} else {
+			int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+			int /*long*/ hwnd = shell.handle;
+			/* ITaskbarList3::SetOverlayIcon */
+			OS.VtblCall (18, mTaskbarList3, hwnd, 0, 0);
+		}
+	}
+}
+
+/**
+ * Sets the receiver's progress, the progress represents a percentage and
+ * should be in range from 0 to 100. The progress is only shown when the progress
+ * state is different than <code>SWT#DEFAULT</code>.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return zero.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progress the new progress
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgressState(int)}
+ */
+public void setProgress (int progress) {
+	checkWidget ();
+	if (shell == null) return;
+	progress = Math.max (0, Math.min (progress, PROGRESS_MAX));
+	if (this.progress == progress) return;
+	this.progress = progress;
+	updateProgress ();
+}
+
+/**
+ * Sets the receiver's progress state, the state can be one of
+ * the following:
+ * <p><ul>
+ * <li>{@link SWT#DEFAULT}</li>
+ * <li>{@link SWT#NORMAL}</li>
+ * <li>{@link SWT#PAUSED}</li>
+ * <li>{@link SWT#ERROR}</li>
+ * <li>{@link SWT#INDETERMINATE}</li>
+ * </ul></p>
+ * 
+ * The percentage of progress shown by the states <code>SWT#NORMAL</code>, <code>SWT#PAUSED</code>, 
+ * <code>SWT#ERROR</code> is set with <code>setProgress()</code>. <br>
+ * The state <code>SWT#DEFAULT</code> indicates that no progress should be shown.
+ *
+ * <p>
+ * This feature might not be available for the receiver on all
+ * platforms. The application code can check if it is supported
+ * by calling the respective get method. When the feature is not
+ * available, the get method will always return <code>SWT#DEFAULT</code>.</p>
+ *
+ * <p>
+ * For better cross platform support, the application code should
+ * first try to set this feature on the <code>TaskItem</code> for the 
+ * main shell then on the <code>TaskItem</code> for the application.</p>
+ *
+ * @param progressState the new progress state 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * #see {@link #setProgress(int)}
+ */
+public void setProgressState (int progressState) {
+	checkWidget ();
+	if (shell == null) return;
+	if (this.progressState == progressState) return;
+	this.progressState = progressState;
+	updateProgressState ();
+}
+
+void setShell (Shell shell) {
+	this.shell = shell;
+	shell.addListener (SWT.Dispose, new Listener () {
+		public void handleEvent (Event event) {
+			if (isDisposed ()) return;
+			dispose ();
+		}
+	});
+}
+
+void updateImage () {
+	showingText = false;
+	Image image2 = null;
+	int /*long*/ hIcon = 0;
+	switch (overlayImage.type) {
+		case SWT.BITMAP:
+			image2 = Display.createIcon (overlayImage);
+			hIcon = image2.handle;
+			break;
+		case SWT.ICON:
+			hIcon = overlayImage.handle;
+			break;
+	}
+	int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+	int /*long*/ hwnd = shell.handle;
+	/* ITaskbarList3::SetOverlayIcon */
+	OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
+	if (image2 != null) image2.dispose ();
+}
+
+void updateProgress () {
+	if (progressState == SWT.INDETERMINATE) return;
+	if (progressState == SWT.DEFAULT) return;
+	int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+	int /*long*/ hwnd = shell.handle;
+	/* ITaskbarList3::SetProgressValue */
+	OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
+}
+
+void updateProgressState () {
+	int tbpFlags = OS.TBPF_NOPROGRESS;
+	switch (progressState) {
+		case SWT.NORMAL: tbpFlags = OS.TBPF_NORMAL; break;
+		case SWT.ERROR: tbpFlags = OS.TBPF_ERROR; break;
+		case SWT.PAUSED: tbpFlags = OS.TBPF_PAUSED; break;
+		case SWT.INDETERMINATE: tbpFlags = OS.TBPF_INDETERMINATE; break;
+	}
+	int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+	int /*long*/ hwnd = shell.handle;
+	/* ITaskbarList3::SetProgressValue */
+	OS.VtblCall (9, mTaskbarList3, hwnd, (long)progress, (long)PROGRESS_MAX);
+	/* ITaskbarList3::SetProgressState */
+	OS.VtblCall (10, mTaskbarList3, hwnd, tbpFlags);
+}
+
+void updateText () {
+	showingText = true;
+	/* Create resources */
+	int width = 16, height = 16;
+	int /*long*/ hdc = OS.GetDC (0);
+	BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER ();
+	bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
+	bmiHeader.biWidth = width;
+	bmiHeader.biHeight = -height;
+	bmiHeader.biPlanes = 1;
+	bmiHeader.biBitCount = 32;
+	bmiHeader.biCompression = OS.BI_RGB;
+	byte []	bmi = new byte [BITMAPINFOHEADER.sizeof];
+	OS.MoveMemory (bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
+	int /*long*/ [] pBits = new int /*long*/ [1];
+	int /*long*/ hBitmap = OS.CreateDIBSection (0, bmi, OS.DIB_RGB_COLORS, pBits, 0, 0);
+	if (hBitmap == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ dstHdc = OS.CreateCompatibleDC (hdc);
+	int /*long*/ oldBitmap = OS.SelectObject (dstHdc, hBitmap);
+	int /*long*/ hMask = OS.CreateBitmap (width, height, 1, 1, null);
+	if (hMask == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+	int /*long*/ maskHdc = OS.CreateCompatibleDC (hdc);
+	int /*long*/ oldMask = OS.SelectObject (maskHdc, hMask);
+	
+	/* Draw content */
+	OS.PatBlt (maskHdc, 0, 0, width, height, OS.WHITENESS);
+	int /*long*/ oldBrush = OS.SelectObject (maskHdc, OS.GetStockObject (OS.BLACK_BRUSH));
+	OS.RoundRect (maskHdc, 0, 0, width, height, 8, 8);
+	OS.SelectObject (maskHdc, oldBrush);
+	
+	int /*long*/ brush = OS.CreateSolidBrush (OS.GetSysColor (OS.COLOR_HIGHLIGHT));
+	oldBrush = OS.SelectObject (dstHdc, brush);
+	OS.RoundRect (dstHdc, 0, 0, width, height, 8, 8);
+	OS.SelectObject (dstHdc, oldBrush);
+	OS.DeleteObject (brush);
+
+	int uFormat = OS.DT_LEFT | OS.DT_SINGLELINE | OS.DT_NOPREFIX;
+	RECT rect = new RECT ();
+	TCHAR buffer = new TCHAR (shell.getCodePage (), overlayText, false);
+	int length = buffer.length();
+	int /*long*/ hFont = 0, oldHFont = 0;
+	NONCLIENTMETRICS info = OS.IsUnicode ? (NONCLIENTMETRICS) new NONCLIENTMETRICSW () : new NONCLIENTMETRICSA ();
+	info.cbSize = NONCLIENTMETRICS.sizeof;
+	if (OS.SystemParametersInfo (OS.SPI_GETNONCLIENTMETRICS, 0, info, 0)) {
+		LOGFONT logFont = OS.IsUnicode ? (LOGFONT) ((NONCLIENTMETRICSW)info).lfMessageFont : ((NONCLIENTMETRICSA)info).lfMessageFont;
+		logFont.lfHeight = -10;
+		hFont = OS.CreateFontIndirect (logFont);
+		oldHFont = OS.SelectObject (dstHdc, hFont);
+		OS.DrawText (dstHdc, buffer, length, rect, uFormat | OS.DT_CALCRECT);
+		if (rect.right > width - 2) {
+			OS.SelectObject (dstHdc, oldHFont);
+			OS.DeleteObject (hFont);
+			logFont.lfHeight = -8;
+			hFont = OS.CreateFontIndirect (logFont);
+			OS.SelectObject (dstHdc, hFont);
+		}
+	}
+	OS.DrawText (dstHdc, buffer, length, rect, uFormat | OS.DT_CALCRECT);
+	OS.OffsetRect (rect, (width - rect.right) / 2, (height - rect.bottom) / 2);
+	int oldBkMode = OS.SetBkMode (dstHdc, OS.TRANSPARENT);
+	OS.SetTextColor (dstHdc, OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT));
+	OS.DrawText (dstHdc, buffer, length, rect, uFormat);
+	if (hFont != 0) {
+		OS.SelectObject (dstHdc, oldHFont);
+		OS.DeleteObject (hFont);
+	}
+	OS.SetBkMode(dstHdc, oldBkMode);
+	
+	/* Release resources */
+	OS.SelectObject (dstHdc, oldBitmap);
+	OS.DeleteDC (dstHdc);
+	OS.SelectObject (maskHdc, oldMask);
+	OS.DeleteDC (maskHdc);
+	OS.ReleaseDC (0, hdc);
+	
+	ICONINFO iconInfo = new ICONINFO ();
+	iconInfo.fIcon = true;
+	iconInfo.hbmColor = hBitmap;
+	iconInfo.hbmMask = hMask;
+	int /*long*/ hIcon = OS.CreateIconIndirect (iconInfo);
+	if (hIcon == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+	OS.DeleteObject (hBitmap);
+	OS.DeleteObject (hMask);
+	
+	int /*long*/ mTaskbarList3 = parent.mTaskbarList3;
+	int /*long*/ hwnd = shell.handle;
+	/* ITaskbarList3::SetOverlayIcon */
+	OS.VtblCall (18, mTaskbarList3, hwnd, hIcon, 0);
+	OS.DestroyIcon (hIcon);
+}
+
+}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 0f0befb..fb203a7 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java	
@@ -31,7 +31,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
@@ -2199,7 +2199,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 	if ((style & SWT.SINGLE) != 0) {
 		switch ((int)/*64*/wParam) {
 			case SWT.CR:
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 				// FALL THROUGH
 			case SWT.TAB:
 			case SWT.ESC: return LRESULT.ZERO;
@@ -2527,14 +2527,31 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 			if (isDisposed ()) return LRESULT.ZERO;
 			break;
 		case OS.EN_ALIGN_LTR_EC:
-			style &= ~SWT.RIGHT_TO_LEFT;
-			style |= SWT.LEFT_TO_RIGHT;
-			fixAlignment ();
-			break;
 		case OS.EN_ALIGN_RTL_EC:
-			style &= ~SWT.LEFT_TO_RIGHT;
-			style |= SWT.RIGHT_TO_LEFT;
-			fixAlignment ();
+			int bits = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
+			if ((bits & OS.WS_EX_RTLREADING) != 0) {
+				style &= ~SWT.LEFT_TO_RIGHT;
+				style |= SWT.RIGHT_TO_LEFT;
+			} else {
+				style &= ~SWT.RIGHT_TO_LEFT;
+				style |= SWT.LEFT_TO_RIGHT;
+			}
+			Event event = new Event();
+			event.doit = true;
+			sendEvent(SWT.OrientationChange, event);
+			if (!event.doit) {
+				if (code == OS.EN_ALIGN_LTR_EC) {
+					bits |= (OS.WS_EX_RTLREADING | OS.WS_EX_LEFTSCROLLBAR);
+					style &= ~SWT.LEFT_TO_RIGHT;
+					style |= SWT.RIGHT_TO_LEFT;
+				} else {
+					bits &= ~(OS.WS_EX_RTLREADING | OS.WS_EX_LEFTSCROLLBAR);
+					style &= ~SWT.RIGHT_TO_LEFT;
+					style |= SWT.LEFT_TO_RIGHT;
+				}	
+				OS.SetWindowLong (handle, OS.GWL_EXSTYLE, bits);
+			}
+			fixAlignment();
 			break;
 	}
 	return super.wmCommandChild (wParam, lParam);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
index 3b3e279..face397 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java	
@@ -736,6 +736,16 @@ void layoutItems () {
 		}
 	}
 
+	/*
+	* Feature on Windows. When SWT.WRAP or SWT.VERTICAL are set
+	* the separator items with control are implemented using BTNS_BUTTON 
+	* instead of BTNS_SEP. When that is the case and TBSTYLE_LIST is 
+	* set, the layout of the ToolBar recalculates the width for all 
+	* BTNS_BUTTON based on the text and bitmap of the item.
+	* This is not strictly wrong, but the user defined width for the
+	* separators has to be respected if set.
+	* The fix is to detect this case and reset the cx width for the item.  
+	*/
 	if ((style & (SWT.WRAP | SWT.VERTICAL)) != 0) {
 		int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
 		if ((bits & OS.TBSTYLE_LIST) != 0) {
@@ -744,7 +754,7 @@ void layoutItems () {
 			info.dwMask = OS.TBIF_SIZE;
 			for (int i=0; i<items.length; i++) {
 				ToolItem item = items [i];
-				if (item != null && item.control != null && item.cx > 0) {
+				if (item != null && item.cx > 0) {
 					info.cx = item.cx;
 					OS.SendMessage (handle, OS.TB_SETBUTTONINFO, item.id, info);
 				}
@@ -829,6 +839,16 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			ToolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 void setBackgroundImage (int /*long*/ hBitmap) {
 	super.setBackgroundImage (hBitmap);
 	setBackgroundTransparent (hBitmap != 0);
@@ -1451,7 +1471,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 				OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect);
 				event.x = rect.left;
 				event.y = rect.bottom;
-				child.postEvent (SWT.Selection, event);
+				child.sendSelectionEvent (SWT.Selection, event, false);
 			}
 			break;
 		case OS.NM_CUSTOMDRAW:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java
index 016a4cc..2541aa1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java	
@@ -138,6 +138,12 @@ public ToolItem (ToolBar parent, int style, int index) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
@@ -706,7 +712,7 @@ boolean setRadioSelection (boolean value) {
 	if ((style & SWT.RADIO) == 0) return false;
 	if (getSelection () != value) {
 		setSelection (value);
-		postEvent (SWT.Selection);
+		sendSelectionEvent (SWT.Selection);
 	}
 	return true;
 }
@@ -975,7 +981,8 @@ void updateImages (boolean enabled) {
 	info.dwMask |= OS.TBIF_SIZE;
 	info.cx = 0;	
 	OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO, id, info);
-	
+	int /*long*/ hFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
+	OS.SendMessage (hwnd, OS.WM_SETFONT, hFont, 0);
 	parent.layoutItems ();
 }
 
@@ -1000,7 +1007,7 @@ LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) {
 			selectRadio ();
 		}
 	}
-	postEvent (SWT.Selection);
+	sendSelectionEvent (SWT.Selection);
 	return null;
 }
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index 5e017a1..17e34b0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -140,6 +140,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
@@ -364,6 +365,7 @@ void drawRectangles (Rectangle [] rects, boolean stippled) {
 			rect1.top = rect.y - bandWidth;
 			rect1.right = rect.x + rect.width + bandWidth * 2;
 			rect1.bottom = rect.y + rect.height + bandWidth * 2;
+			OS.MapWindowPoints (0, hwndOpaque, rect1, 2);
 			OS.RedrawWindow (hwndOpaque, rect1, 0, OS.RDW_INVALIDATE);
 		}
 		return;
@@ -909,12 +911,20 @@ int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/
 					oldBrush = OS.SelectObject (hDC, OS.GetStockObject(OS.BLACK_BRUSH));
 				}
 				Rectangle[] rects = this.rectangles;
+				RECT rect1 = new RECT ();
 				for (int i=0; i<rects.length; i++) {
 					Rectangle rect = rects [i];
-					OS.PatBlt (hDC, rect.x, rect.y, rect.width, bandWidth, OS.PATCOPY);
-					OS.PatBlt (hDC, rect.x, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATCOPY);
-					OS.PatBlt (hDC, rect.x + rect.width - bandWidth, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATCOPY);
-					OS.PatBlt (hDC, rect.x, rect.y + rect.height - bandWidth, rect.width, bandWidth, OS.PATCOPY);
+					rect1.left = rect.x;
+					rect1.top  = rect.y;
+					rect1.right = rect.x + rect.width;
+					rect1.bottom = rect.y + rect.height;
+					OS.MapWindowPoints (0, hwndOpaque, rect1, 2);
+					int width = rect1.right - rect1.left;
+					int height = rect1.bottom - rect1.top;
+					OS.PatBlt (hDC, rect1.left, rect1.top, width, bandWidth, OS.PATCOPY);
+					OS.PatBlt (hDC, rect1.left, rect1.top + bandWidth, bandWidth, height - (bandWidth * 2), OS.PATCOPY);
+					OS.PatBlt (hDC, rect1.right - bandWidth, rect1.top + bandWidth, bandWidth, height - (bandWidth * 2), OS.PATCOPY);
+					OS.PatBlt (hDC, rect1.left, rect1.bottom - bandWidth, width, bandWidth, OS.PATCOPY);
 				}
 				OS.SelectObject (hDC, oldBrush);
 				if (stippled) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java
index acd99d6..c9e45d6 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TrayItem.java	
@@ -243,14 +243,14 @@ int /*long*/ messageProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /
 		case OS.WM_LBUTTONDOWN:
 			if (hooks (SWT.Selection)) {
 				OS.SetForegroundWindow (hwnd);
-				postEvent (SWT.Selection);
+				sendSelectionEvent (SWT.Selection);
 			}
 			break;
 		case OS.WM_LBUTTONDBLCLK:
 		case OS.WM_RBUTTONDBLCLK:
 			if (hooks (SWT.DefaultSelection)) {
 				OS.SetForegroundWindow (hwnd);
-				postEvent (SWT.DefaultSelection);
+				sendSelectionEvent (SWT.DefaultSelection);
 			}
 			break;
 		case OS.WM_RBUTTONUP: {
@@ -289,7 +289,7 @@ int /*long*/ messageProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /
 				if (lParam == OS.NIN_BALLOONUSERCLICK) {
 					if (toolTip.hooks (SWT.Selection)) {
 						OS.SetForegroundWindow (hwnd);
-						toolTip.postEvent (SWT.Selection);
+						toolTip.sendSelectionEvent (SWT.Selection);
 						// widget could be disposed at this point
 						if (isDisposed()) return 0;
 					}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 129bb84..621d392 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,6 +94,9 @@ public class Tree extends Composite {
 	boolean ignoreDrawSelection, ignoreDrawHot, ignoreFullSelection, explorerTheme;
 	int scrollWidth, selectionForeground;
 	int /*long*/ headerToolTipHandle, itemToolTipHandle;
+	int /*long*/ lastTimerID = -1;
+	int lastTimerCount;
+	static final int TIMER_MAX_COUNT = 8;
 	static final int INSET = 3;
 	static final int GRID_WIDTH = 1;
 	static final int SORT_WIDTH = 10;
@@ -719,9 +722,9 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long
 							if (i == 0) {
 								int right = Math.min (rect.right, width);
 								OS.SetRect (rect, rect.left, rect.top, right, rect.bottom);
-								if (drawBackground) fillImageBackground (hDC, control, rect);
+								if (drawBackground) fillImageBackground (hDC, control, rect, 0, 0);
 							} else {
-								if (drawBackground) fillImageBackground (hDC, control, rect);
+								if (drawBackground) fillImageBackground (hDC, control, rect, 0, 0);
 							}
 						}
 					}
@@ -984,7 +987,7 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*
 			OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
 			RECT cellRect = item.getBounds (index, true, true, true, true, true, hDC);
 			if (clrSortBk != -1) {
-				drawBackground (hDC, cellRect, clrSortBk);
+				drawBackground (hDC, cellRect, clrSortBk, 0, 0);
 			} else {
 				if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
 					drawBackground (hDC, rect);
@@ -1412,10 +1415,12 @@ LRESULT CDDS_POSTPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ l
 				OS.SetRect (rect, rect.left, rect.top, rect.right, rect.top + height);
 				OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM);
 			}
-			while (rect.bottom < nmcd.bottom) {
-				int top = rect.top + height;
-				OS.SetRect (rect, rect.left, top, rect.right, top + height);
-				OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM);
+			if (height != 0) {
+				while (rect.bottom < nmcd.bottom) {
+					int top = rect.top + height;
+					OS.SetRect (rect, rect.left, top, rect.right, top + height);
+					OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM);
+				}
 			}
 		}
 	}
@@ -1524,6 +1529,7 @@ int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, in
 			if (findImageControl () != null) {
 				hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
 			}
+
 			break;
 		}
 	}
@@ -4014,6 +4020,23 @@ public void removeTreeListener(TreeListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			TreeItem item = items [i];
+			if (item != null) item.reskinChildren (flags);
+		}
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
+
 /**
  * Display a mark indicating the point at which an item will be inserted.
  * The drop insert item has a visual hint to show where a dragged item 
@@ -5876,12 +5899,12 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 				TreeItem item = _getItem (hItem, (int)/*64*/tvItem.lParam);
 				Event event = new Event ();
 				event.item = item;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 				if ((style & SWT.CHECK) != 0) {
 					event = new Event ();
 					event.item = item;
 					event.detail = SWT.CHECK;
-					postEvent (SWT.Selection, event);
+					sendSelectionEvent (SWT.Selection, event, false);
 				}
 			}
 			return LRESULT.ZERO;
@@ -5898,7 +5921,7 @@ LRESULT WM_CHAR (int /*long*/ wParam, int /*long*/ lParam) {
 			Event event = new Event ();
 			int /*long*/ hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
 			if (hItem != 0) event.item = _getItem (hItem);
-			postEvent (SWT.DefaultSelection, event);
+			sendSelectionEvent (SWT.DefaultSelection, event, false);
 			return LRESULT.ZERO;
 		}
 		case SWT.ESC:
@@ -6026,7 +6049,7 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 					OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
 					Event event = new Event ();
 					event.item = _getItem (hNewItem, (int)/*64*/tvItem.lParam);
-					postEvent (SWT.Selection, event);
+					sendSelectionEvent (SWT.Selection, event, false);
 					return new LRESULT (code);
 				}
 			}
@@ -6198,7 +6221,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
 				Event event = new Event ();
 				event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
 				event.detail = SWT.CHECK;
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 				return LRESULT.ZERO;
 			}
 		}
@@ -6220,7 +6243,7 @@ LRESULT WM_LBUTTONDBLCLK (int /*long*/ wParam, int /*long*/ lParam) {
 		if ((lpht.flags & flags) != 0) {
 			Event event = new Event ();
 			event.item = _getItem (lpht.hItem);
-			postEvent (SWT.DefaultSelection, event);
+			sendSelectionEvent (SWT.DefaultSelection, event, false);
 		}
 	}
 	return result;
@@ -6316,7 +6339,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 		if (deselected) {
 			Event event = new Event ();
 			event.item = _getItem (lpht.hItem);
-			postEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, false);
 		}
 		return new LRESULT (code);
 	}
@@ -6359,7 +6382,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 			Event event = new Event ();
 			event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
 			event.detail = SWT.CHECK;
-			postEvent (SWT.Selection, event);
+			sendSelectionEvent (SWT.Selection, event, false);
 			return LRESULT.ZERO;
 		}
 	}
@@ -6602,7 +6625,7 @@ LRESULT WM_LBUTTONDOWN (int /*long*/ wParam, int /*long*/ lParam) {
 		OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem);
 		Event event = new Event ();
 		event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
-		postEvent (SWT.Selection, event);
+		sendSelectionEvent (SWT.Selection, event, false);
 	}
 	gestureCompleted = false;
 	
@@ -7005,6 +7028,42 @@ LRESULT WM_VSCROLL (int /*long*/ wParam, int /*long*/ lParam) {
 	return result;
 }
 
+LRESULT WM_TIMER (int wParam, int lParam) {
+	LRESULT result = super.WM_TIMER (wParam, lParam);
+	if (result != null) return result;
+
+	/* Bug in Windows. When the expandos are visible (or in process of fading away)
+	 * and the tree control is hidden the animation timer does not stop calling the 
+	 * window proc till the tree is visible again. This can cause performance problems
+	 * specially in cases there the application has several tree controls in this state.
+	 * The fix is to detect a timer that repeats itself several times when the control
+	 * is not visible and stop it. The timer is stopped by sending a fake mouse move event.
+	 * 
+	 * Note: Just killing the timer could cause some internal clean up task related to the 
+	 * animation not to run.
+	 */
+	int /*long*/ bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);
+	if ((bits & OS.TVS_EX_FADEINOUTEXPANDOS) != 0) {
+		if (!OS.IsWindowVisible (handle)) {
+			if (lastTimerID == wParam) {
+				lastTimerCount++;
+			} else {
+				lastTimerCount = 0;
+			}
+			lastTimerID = wParam;
+			if (lastTimerCount >= TIMER_MAX_COUNT) {
+				OS.CallWindowProc (TreeProc, handle, OS.WM_MOUSEMOVE, 0, 0);
+				lastTimerID = -1;
+				lastTimerCount = 0;
+			}
+		} else {
+			lastTimerID = -1;
+			lastTimerCount = 0;
+		}
+	}
+	return result;
+};
+
 LRESULT wmColorChild (int /*long*/ wParam, int /*long*/ lParam) {
 	if (findImageControl () != null) {
 		if (OS.COMCTL32_MAJOR < 6) {
@@ -7295,7 +7354,7 @@ LRESULT wmNotifyChild (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 				hAnchor = tvItem.hItem;
 				Event event = new Event ();
 				event.item = _getItem (tvItem.hItem, (int)/*64*/tvItem.lParam);
-				postEvent (SWT.Selection, event);
+				sendSelectionEvent (SWT.Selection, event, false);
 			}
 			updateScrollBar ();
 			break;
@@ -7647,7 +7706,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			OS.MoveMemory (phdn, lParam, NMHEADER.sizeof);
 			TreeColumn column = columns [phdn.iItem];
 			if (column != null) {
-				column.postEvent (SWT.Selection);
+				column.sendSelectionEvent (SWT.Selection);
 			}
 			break;
 		}
@@ -7657,7 +7716,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, int /*long*/ wParam, int /*long*/ lParam) {
 			OS.MoveMemory (phdn, lParam, NMHEADER.sizeof);
 			TreeColumn column = columns [phdn.iItem];
 			if (column != null) {
-				column.postEvent (SWT.DefaultSelection);
+				column.sendSelectionEvent (SWT.DefaultSelection);
 			}
 			break;
 		}
@@ -7734,7 +7793,6 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
 						int /*long*/ hFont = item [0].fontHandle (index [0]);
 						if (hFont == -1) hFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);
 						int /*long*/ oldFont = OS.SelectObject (hDC, hFont);
-						LRESULT result = null;
 						boolean drawForeground = true;
 						cellRect [0] = item [0].getBounds (index [0], true, true, false, false, false, hDC);
 						if (hooks (SWT.EraseItem)) {
@@ -7795,7 +7853,6 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, int /*long*/ lParam) {
 						}
 						OS.SelectObject (hDC, oldFont);
 						OS.ReleaseDC (handle, hDC);
-						if (result != null) return result;
 					}
 					break;
 				}
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index 08a919e..a259212 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,8 @@ public class TreeItem extends Item {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int /*long*/ handle;
 	Tree parent;
@@ -379,10 +381,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1380,7 +1382,7 @@ public void setExpanded (boolean expanded) {
 			event.item = parent._getItem (hNewItem);
 			parent.hAnchor = hNewItem;
 		}
-		parent.sendEvent (SWT.Selection, event);
+		parent.sendSelectionEvent (SWT.Selection, event, true);
 	}
 }
 
@@ -1494,8 +1496,6 @@ public void setFont (int index, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index a5b8368..e3cd2ac 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -90,6 +90,9 @@ public abstract class Widget {
 	/* Ignore WM_CHANGEUISTATE */
 	static final int IGNORE_WM_CHANGEUISTATE = 1<<20;
 	
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<21;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -146,6 +149,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 
 void _addListener (int eventType, Listener listener) {
@@ -415,6 +419,7 @@ int /*long*/ DeferWindowPos(int /*long*/ hWinPosInfo, int /*long*/ hWnd, int /*l
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -482,8 +487,7 @@ char [] fixMnemonic (String string, boolean spaces) {
 	while (i < buffer.length) {
 		if (buffer [i] == '&') {
 			if (i + 1 < buffer.length && buffer [i + 1] == '&') {
-				if (spaces) buffer [j] = ' ';
-				j++;
+				buffer [j++] = spaces ? ' ' : buffer [i];
 				i++;
 			}
 			i++;
@@ -686,7 +690,7 @@ boolean hooks (int eventType) {
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -943,6 +947,8 @@ public void removeListener (int eventType, Listener listener) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener listener) {
 	checkWidget();
@@ -975,6 +981,50 @@ public void removeDisposeListener (DisposeListener listener) {
 	eventTable.unhook (SWT.Dispose, listener);
 }
 
+/**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
 boolean sendDragEvent (int button, int x, int y) {
 	Event event = new Event ();
 	event.button = button;
@@ -1030,6 +1080,19 @@ void sendEvent (int eventType, Event event, boolean send) {
 	}
 }
 
+void sendSelectionEvent (int type) {
+	sendSelectionEvent (type, null, false);
+}
+
+void sendSelectionEvent (int type, Event event, boolean send) {
+	if (eventTable == null && !display.filters (type)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+	setInputState (event, type);
+	sendEvent (type, event, send);
+}
+
 boolean sendKeyEvent (int type, int msg, int /*long*/ wParam, int /*long*/ lParam) {
 	Event event = new Event ();
 	if (!setKeyState (event, type, wParam, lParam)) return true;
@@ -1065,6 +1128,38 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen
 	return event.doit;
 }
 
+boolean sendMouseWheelEvent (int type, int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+	int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
+	int detail = 0;
+	if (type == SWT.MouseWheel) {
+		int [] linesToScroll = new int [1];
+		OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLLINES, 0, linesToScroll, 0);
+		if (linesToScroll [0] == OS.WHEEL_PAGESCROLL) {
+			detail = SWT.SCROLL_PAGE;
+		} else {
+			detail = SWT.SCROLL_LINE;
+			delta *= linesToScroll [0];
+		}
+		/* Check if the delta and the remainder have the same direction (sign) */
+		if ((delta ^ display.scrollRemainder) >= 0) delta += display.scrollRemainder;
+		display.scrollRemainder = delta % OS.WHEEL_DELTA;
+	} else {
+		/* Check if the delta and the remainder have the same direction (sign) */
+		if ((delta ^ display.scrollHRemainder) >= 0) delta += display.scrollHRemainder;
+		display.scrollHRemainder = delta % OS.WHEEL_DELTA;
+		
+		delta = -delta;
+	}
+
+	if (!hooks (type) && !filters (type)) return true;
+	int count = delta / OS.WHEEL_DELTA;
+	POINT pt = new POINT ();
+	OS.POINTSTOPOINT (pt, lParam);
+	OS.ScreenToClient (hwnd, pt);
+	lParam = OS.MAKELPARAM (pt.x, pt.y);
+	return sendMouseEvent (type, 0, count, detail, true, hwnd, OS.WM_MOUSEWHEEL, wParam, lParam);
+}
+
 /**
  * Sets the application defined widget data associated
  * with the receiver to be the argument. The <em>widget
@@ -1163,6 +1258,7 @@ public void setData (String key, Object value) {
 			}
 		}
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 boolean sendFocusEvent (int type) {
@@ -1247,6 +1343,8 @@ boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lP
 	if (display.lastKey == SWT.CR && display.lastAscii == SWT.CR) {
 		if ((lParam & 0x1000000) != 0) display.lastKey = SWT.KEYPAD_CR;
 	}
+
+	setLocationMask(event, type, wParam, lParam);
 	
 	if (display.lastVirtual) {
 		/*
@@ -1281,6 +1379,48 @@ boolean setKeyState (Event event, int type, int /*long*/ wParam, int /*long*/ lP
 	return setInputState (event, type);
 }
 
+int setLocationMask (Event event, int type, int /*long*/ wParam, int /*long*/ lParam) {
+	int location = SWT.NONE;
+	if (display.lastVirtual) {
+		switch (display.lastKey) {
+			case OS.VK_SHIFT:
+				if (OS.GetKeyState(OS.VK_LSHIFT) < 0) location = SWT.LEFT;
+				if (OS.GetKeyState(OS.VK_RSHIFT) < 0) location = SWT.RIGHT;
+				break;
+			case OS.VK_NUMLOCK:
+				location = SWT.KEYPAD;
+				break;
+			case OS.VK_CONTROL:	
+			case OS.VK_MENU:	
+				location = (lParam & 0x1000000) == 0 ? SWT.LEFT : SWT.RIGHT;
+				break;
+			case OS.VK_INSERT:
+			case OS.VK_DELETE:
+			case OS.VK_HOME:
+			case OS.VK_END:
+			case OS.VK_PRIOR:
+			case OS.VK_NEXT:
+			case OS.VK_UP:
+			case OS.VK_DOWN:
+			case OS.VK_LEFT:
+			case OS.VK_RIGHT:
+				if ((lParam & 0x1000000) == 0) {
+					location = SWT.KEYPAD;
+				}
+				break;
+		}
+		if (display.numpadKey(display.lastKey) != 0) {
+			location = SWT.KEYPAD;
+		}
+	} else {
+		if (display.lastKey == SWT.KEYPAD_CR) {
+			location = SWT.KEYPAD;
+		}
+	}
+	event.keyLocation = location;
+	return location;
+}
+
 boolean setTabGroupFocus () {
 	return setTabItemFocus ();
 }
@@ -1478,21 +1618,20 @@ LRESULT wmKeyDown (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam)
 			case OS.VK_TAB: mapKey = SWT.TAB; break;
 		}
 	} else {
+		mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
 		/*
-		* Feature in Windows.  For numbers in Marathi and Bengali,
+		* Feature in Windows.  For Devanagari and Bengali numbers,
 		* MapVirtualKey() returns the localized number instead of 
 		* the ASCII equivalent.  For example, MapVirtualKey()
-		* maps VK_1 on the Marathi keyboard to \u2407, which is
-		* a valid Unicode Marathi '1' character, but not ASCII.
-		* The fix is to test for VK_0 to VK_9 and map these
-		* explicitly.
+		* maps VK_1 on the numbers keyboard to \u0967, which is
+		* the Devanagari digit '1', but not ASCII.
+		* The fix is to test for Devanagari and Bengali digits and 
+		* map these explicitly.
 		* 
 		* NOTE: VK_0 to VK_9 are the same as ASCII.
 		*/
-		if ('0' <= wParam && wParam <= '9') {
+		if (('\u09e6' <= mapKey && mapKey <= '\u09ef') || ('\u0966' <= mapKey && mapKey <= '\u096f')) {
 			mapKey = (int)/*64*/wParam;
-		} else {
-			mapKey = OS.MapVirtualKey ((int)/*64*/wParam, 2);
 		}
 	}
 
@@ -1776,7 +1915,7 @@ LRESULT wmKeyUp (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
 }
 
 LRESULT wmKillFocus (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
-	display.scrollRemainder = 0;
+	display.scrollRemainder = display.scrollHRemainder = 0;
 	int /*long*/ code = callWindowProc (hwnd, OS.WM_KILLFOCUS, wParam, lParam);
 	sendFocusEvent (SWT.FocusOut);
 	// widget could be disposed at this point
@@ -2071,30 +2210,11 @@ LRESULT wmMouseMove (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam
 }
 
 LRESULT wmMouseWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
-	int delta = OS.GET_WHEEL_DELTA_WPARAM (wParam);
-	int [] linesToScroll = new int [1];
-	int detail;
-	OS.SystemParametersInfo (OS.SPI_GETWHEELSCROLLLINES, 0, linesToScroll, 0);
-	if (linesToScroll [0] == OS.WHEEL_PAGESCROLL) {
-		detail = SWT.SCROLL_PAGE;
-	} else {
-		detail = SWT.SCROLL_LINE;
-		delta *= linesToScroll [0];
-	}
-	/* Check if the delta and the remainder have the same direction (sign) */
-	if ((delta ^ display.scrollRemainder) >= 0) delta += display.scrollRemainder;
-	display.scrollRemainder = delta % OS.WHEEL_DELTA; 
+	return sendMouseWheelEvent(SWT.MouseWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
+}
 
-	if (!hooks (SWT.MouseWheel) && !filters (SWT.MouseWheel)) return null;
-	int count = delta / OS.WHEEL_DELTA;
-	POINT pt = new POINT ();
-	OS.POINTSTOPOINT (pt, lParam);
-	OS.ScreenToClient (hwnd, pt);
-	lParam = OS.MAKELPARAM (pt.x, pt.y);
-	if (!sendMouseEvent (SWT.MouseWheel, 0, count, detail, true, hwnd, OS.WM_MOUSEWHEEL, wParam, lParam)) {
-		return LRESULT.ZERO;
-	}
-	return null;
+LRESULT wmMouseHWheel (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
+	return sendMouseWheelEvent(SWT.MouseHorizontalWheel, hwnd, wParam, lParam) ? null : LRESULT.ZERO;
 }
 
 LRESULT wmNCPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Color.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Color.java
index 6fc68ac..a1664ee 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Color.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Color.java	
@@ -43,6 +43,8 @@ public final class Color extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -233,7 +235,7 @@ void init(int red, int green, int blue) {
  * <p>
  * This method gets the dispose state for the color.
  * When a color has been disposed, it is an error to
- * invoke any other method using the color.
+ * invoke any other method (except {@link #dispose()}) using the color.
  *
  * @return <code>true</code> when the color is disposed and <code>false</code> otherwise
  */
@@ -265,6 +267,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the color
  * @return a new color object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Color wpf_new(Device device, int handle) {
 	Color color = new Color(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Cursor.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Cursor.java
index e1b617c..865d702 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Cursor.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Cursor.java	
@@ -55,6 +55,8 @@ public final class Cursor extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -71,6 +73,10 @@ Cursor(Device device) {
  * <p>
  * You must dispose the cursor when it is no longer required. 
  * </p>
+ * NOTE:
+ * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)}
+ * instead of using this constructor. This way you can avoid the 
+ * overhead of disposing the Cursor resource.
  *
  * @param device the device on which to allocate the cursor
  * @param style the style of cursor to allocate
@@ -424,7 +430,7 @@ public int hashCode () {
  * <p>
  * This method gets the dispose state for the cursor.
  * When a cursor has been disposed, it is an error to
- * invoke any other method using the cursor.
+ * invoke any other method (except {@link #dispose()}) using the cursor.
  *
  * @return <code>true</code> when the cursor is disposed and <code>false</code> otherwise
  */
@@ -456,6 +462,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the cursor
  * @return a new cursor object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Cursor wpf_new(Device device, int handle) {
 	Cursor cursor = new Cursor(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java
index fd43333..ba3f067 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Device.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -501,6 +501,8 @@ protected void init () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract int internal_new_GC (GCData data);
 
@@ -516,6 +518,8 @@ public abstract int internal_new_GC (GCData data);
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public abstract void internal_dispose_GC (int hDC, GCData data);
 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Font.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Font.java
index 7ade47e..0d8afcc 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Font.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Font.java	
@@ -42,6 +42,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -54,6 +56,8 @@ public final class Font extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public double size;
 	
@@ -248,7 +252,7 @@ void init (FontData fd) {
  * <p>
  * This method gets the dispose state for the font.
  * When a font has been disposed, it is an error to
- * invoke any other method using the font.
+ * invoke any other method (except {@link #dispose()}) using the font.
  *
  * @return <code>true</code> when the font is disposed and <code>false</code> otherwise
  */
@@ -280,6 +284,8 @@ public String toString () {
  * @param device the device on which to allocate the color
  * @param handle the handle for the font
  * @return a new font object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Font wpf_new(Device device, int handle, double size) {
 	Font font = new Font(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java
index 42211bc..7701fe2 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/FontData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,6 +51,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public String fontFamily;
 	
@@ -63,6 +65,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int style;
 
@@ -75,6 +79,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */	
 	public int weight;
 	
@@ -87,6 +93,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int stretch;
 	
@@ -99,6 +107,8 @@ public final class FontData {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int height;
 	
@@ -526,6 +536,8 @@ public String toString() {
  * @param data the <code>LOGFONT</code> for the font data
  * @param height the height of the font data
  * @return a new font data object containing the specified <code>LOGFONT</code> and height
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static FontData wpf_new(String fontFamily, int style, int weight, int stretch, int height) {
 	FontData data = new FontData();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java
index dae4748..42114a9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/GC.java	
@@ -65,6 +65,8 @@ public final class GC extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -1811,8 +1813,9 @@ public Pattern getForegroundPattern() {
  * 
  * @see GCData
  * 
- * @since 3.2
  * @noreference This method is not intended to be referenced by clients.
+ * 
+ * @since 3.2
  */
 public GCData getGCData() {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -2108,7 +2111,7 @@ public boolean isClipped() {
  * <p>
  * This method gets the dispose state for the GC.
  * When a GC has been disposed, it is an error to
- * invoke any other method using the GC.
+ * invoke any other method (except {@link #dispose()}) using the GC.
  *
  * @return <code>true</code> when the GC is disposed and <code>false</code> otherwise
  */
@@ -2606,9 +2609,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (join != data.lineJoin) {
 		mask |= LINE_JOIN;
 		switch (join) {
-			case SWT.CAP_ROUND:
-			case SWT.CAP_FLAT:
-			case SWT.CAP_SQUARE:
+			case SWT.JOIN_MITER:
+			case SWT.JOIN_ROUND:
+			case SWT.JOIN_BEVEL:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -2618,9 +2621,9 @@ public void setLineAttributes(LineAttributes attributes) {
 	if (cap != data.lineCap) {
 		mask |= LINE_CAP;
 		switch (cap) {
-			case SWT.JOIN_MITER:
-			case SWT.JOIN_ROUND:
-			case SWT.JOIN_BEVEL:
+			case SWT.CAP_FLAT:
+			case SWT.CAP_ROUND:
+			case SWT.CAP_SQUARE:
 				break;
 			default:
 				SWT.error(SWT.ERROR_INVALID_ARGUMENT);
@@ -3078,6 +3081,8 @@ public String toString () {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC wpf_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
@@ -3101,6 +3106,8 @@ public static GC wpf_new(Drawable drawable, GCData data) {
  * @param data the data for the receiver.
  *
  * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static GC wpf_new(int hDC, GCData data) {
 	GC gc = new GC();
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java
index 90366cf..adffe22 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Image.java	
@@ -78,6 +78,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int type;
 	
@@ -90,6 +92,8 @@ public final class Image extends Resource implements Drawable {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 		
@@ -961,6 +965,8 @@ void init(ImageData data) {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
@@ -1012,7 +1018,9 @@ public int internal_new_GC (GCData data) {
  * </p>
  *
  * @param hDC the platform specific GC handle
- * @param data the platform specific GC data 
+ * @param data the platform specific GC data
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int dc, GCData data) {
 	OS.DrawingContext_Close(dc);
@@ -1041,7 +1049,7 @@ public void internal_dispose_GC (int dc, GCData data) {
  * <p>
  * This method gets the dispose state for the image.
  * When an image has been disposed, it is an error to
- * invoke any other method using the image.
+ * invoke any other method (except {@link #dispose()}) using the image.
  *
  * @return <code>true</code> when the image is disposed and <code>false</code> otherwise
  */
@@ -1116,6 +1124,8 @@ public String toString () {
  * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>)
  * @param handle the OS handle for the image
  * @return a new image object containing the specified device, type and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Image wpf_new(Device device, int type, int handle) {
 	Image image = new Image(device);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java
index 420d66f..660c61b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Path.java	
@@ -45,6 +45,8 @@ public class Path extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -606,7 +608,7 @@ void init(PathData data) {
  * <p>
  * This method gets the dispose state for the Path.
  * When a Path has been disposed, it is an error to
- * invoke any other method using the Path.
+ * invoke any other method (except {@link #dispose()}) using the Path.
  *
  * @return <code>true</code> when the Path is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java
index ec1394e..fdc45f4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Pattern.java	
@@ -43,6 +43,8 @@ public class Pattern extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -195,7 +197,7 @@ void destroy() {
  * <p>
  * This method gets the dispose state for the Pattern.
  * When a Pattern has been disposed, it is an error to
- * invoke any other method using the Pattern.
+ * invoke any other method (except {@link #dispose()}) using the Pattern.
  *
  * @return <code>true</code> when the Pattern is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Region.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Region.java
index e988c51..ef2497b 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Region.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Region.java	
@@ -39,6 +39,8 @@ public final class Region extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 
@@ -494,7 +496,7 @@ public boolean intersects (Rectangle rect) {
  * <p>
  * This method gets the dispose state for the region.
  * When a region has been disposed, it is an error to
- * invoke any other method using the region.
+ * invoke any other method (except {@link #dispose()}) using the region.
  *
  * @return <code>true</code> when the region is disposed, and <code>false</code> otherwise
  */
@@ -704,6 +706,8 @@ public String toString () {
  * @param device the device on which to allocate the region
  * @param handle the handle for the region
  * @return a new region object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Region wpf_new(Device device, int handle) {
 	return new Region(device, handle);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java
index ad7af71..990b831 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/TextLayout.java	
@@ -42,9 +42,11 @@ public final class TextLayout extends Resource {
 	int wrapWidth;
 	int orientation;
 	int indent;
+	int wrapIndent;
 	boolean justify;
 	int[] tabs;
 	int[] segments;
+	char[] segmentsChars;
 	StyleItem[] styles;
 	
 	int string, defaultTextProperties;
@@ -232,7 +234,7 @@ void computeRuns () {
 			}
 		}
 	}
-	int paragraphProperties = OS.gcnew_SWTTextParagraphProperties(flowDirection, textAlignment, false, defaultTextProperties, textWrapping, 0, 0, tabCollection); 
+	int paragraphProperties = OS.gcnew_SWTTextParagraphProperties(flowDirection, textAlignment, false, defaultTextProperties, textWrapping, 0, wrapIndent, tabCollection); 
 	int firstParagraphProperties = OS.gcnew_SWTTextParagraphProperties(flowDirection, textAlignment, true, defaultTextProperties, textWrapping, 0, indent, tabCollection);  
 	int offset = 0;
 	int index = 0;
@@ -273,6 +275,8 @@ void computeRuns () {
 	segmentsText = null;
 	tabs = null;
 	styles = null;
+	segments = null;
+	segmentsChars = null;
 //	lineOffset = null;
 //	lineY = null;
 //	lineWidth = null;
@@ -828,6 +832,9 @@ public Rectangle getLineBounds(int lineIndex) {
 	if (firstLine) {
 		x += indent;
 		width -= indent;
+	} else {
+		x += wrapIndent;
+		width -= wrapIndent;
 	}
 	return new Rectangle ((int)x, (int)y, (int)width, (int)height);
 }
@@ -1237,6 +1244,22 @@ public int[] getSegments () {
 	return segments;
 }
 
+/**
+ * Returns the segments characters of the receiver.
+ *
+ * @return the segments characters
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public char[] getSegmentsChars () {
+	checkLayout();
+	return segmentsChars;
+}
+
 String getSegmentsText() {
 	if (segments == null) return text;
 	int nSegments = segments.length;
@@ -1420,12 +1443,28 @@ public int getWidth () {
 }
 
 /**
+* Returns the receiver's wrap indent.
+*
+* @return the receiver's wrap indent
+* 
+* @exception SWTException <ul>
+*    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+* </ul>
+* 
+* @since 3.6
+*/
+public int getWrapIndent () {
+	checkLayout();
+	return wrapIndent;
+}
+
+/**
  * Returns <code>true</code> if the text layout has been disposed,
  * and <code>false</code> otherwise.
  * <p>
  * This method gets the dispose state for the text layout.
  * When a text layout has been disposed, it is an error to
- * invoke any other method using the text layout.
+ * invoke any other method (except {@link #dispose()}) using the text layout.
  * </p>
  *
  * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise
@@ -1543,7 +1582,7 @@ public void setFont (Font font) {
 }
 
 /**
- * Sets the indent of the receiver. This indent it applied of the first line of 
+ * Sets the indent of the receiver. This indent is applied to the first line of 
  * each paragraph.  
  *
  * @param indent new indent
@@ -1552,6 +1591,8 @@ public void setFont (Font font) {
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @see #setWrapIndent(int)
+ * 
  * @since 3.2
  */
 public void setIndent (int indent) {
@@ -1604,7 +1645,7 @@ public void setOrientation (int orientation) {
 
 /**
  * Sets the offsets of the receiver's text segments. Text segments are used to
- * override the default behaviour of the bidirectional algorithm.
+ * override the default behavior of the bidirectional algorithm.
  * Bidirectional reordering can happen within a text segment but not 
  * between two adjacent segments.
  * <p>
@@ -1613,12 +1654,18 @@ public void setOrientation (int orientation) {
  * always be zero and the last one should always be equals to length of
  * the text.
  * </p>
+ * <p>
+ * When segments characters are set, the segments are the offsets where
+ * the characters are inserted in the text.
+ * <p> 
  * 
  * @param segments the text segments offset
  * 
  * @exception SWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @see #setSegmentsChars(char[])
  */
 public void setSegments(int[] segments) {
 	checkLayout();
@@ -1637,6 +1684,39 @@ public void setSegments(int[] segments) {
 }
 
 /**
+ * Sets the characters to be used in the segments boundaries. The segments 
+ * are set by calling <code>setSegments(int[])</code>. The application can
+ * use this API to insert Unicode Control Characters in the text to control
+ * the display of the text and bidi reordering. The characters are not 
+ * accessible by any other API in <code>TextLayout</code>.
+ * 
+ * @param segmentsChars the segments characters 
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setSegments(int[])
+ * 
+ * @since 3.6
+ */
+public void setSegmentsChars(char[] segmentsChars) {
+	checkLayout();
+	if (this.segmentsChars == null && segmentsChars == null) return;
+	if (this.segmentsChars != null && segmentsChars != null) {
+		if (this.segmentsChars.length == segmentsChars.length) {
+			int i;
+			for (i = 0; i <segmentsChars.length; i++) {
+				if (this.segmentsChars[i] != segmentsChars[i]) break;
+			}
+			if (i == segmentsChars.length) return;
+		}
+	}
+	freeRuns();
+	this.segmentsChars = segmentsChars;
+}
+
+/**
  * Sets the line spacing of the receiver.  The line spacing
  * is the space left between lines.
  *
@@ -1821,6 +1901,28 @@ public void setWidth (int width) {
 	this.wrapWidth = width;
 }
 
+/**
+ * Sets the wrap indent of the receiver. This indent is applied to all lines
+ * in the paragraph except the first line.  
+ *
+ * @param wrapIndent new wrap indent
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ * 
+ * @see #setIndent(int)
+ * 
+ * @since 3.6
+ */
+public void setWrapIndent (int wrapIndent) {
+	checkLayout();
+	if (wrapIndent < 0) return;	
+	if (this.wrapIndent == wrapIndent) return;
+	freeRuns();
+	this.wrapIndent = wrapIndent;
+}
+
 int validadeOffset(int offset, int step) {
 	offset += step;
 	if (segments != null && segments.length > 2) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java
index 9bd5886..820eda4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/graphics/Transform.java	
@@ -42,6 +42,8 @@ public class Transform extends Resource {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	
@@ -215,7 +217,7 @@ public void invert() {
  * <p>
  * This method gets the dispose state for the Transform.
  * When a Transform has been disposed, it is an error to
- * invoke any other method using the Transform.
+ * invoke any other method (except {@link #dispose()}) using the Transform.
  *
  * @return <code>true</code> when the Transform is disposed, and <code>false</code> otherwise
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java
index 99237de..67c04ac 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Button.java	
@@ -102,6 +102,12 @@ public Button (Composite parent, int style) {
  * <code>widgetSelected</code> is called when the control is selected by the user.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Canvas.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Canvas.java
index d662b69..952705e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Canvas.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Canvas.java	
@@ -149,6 +149,12 @@ void releaseChildren (boolean destroy) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (caret != null) caret.reskin (flags);
+	if (ime != null)  ime.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 /** 
  * Fills the interior of the rectangle specified by the arguments,
  * with the receiver's background. 
@@ -210,7 +216,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height) {
  * the source area to the destination and then causing the area
  * of the source which is not covered by the destination to
  * be repainted. Children that intersect the rectangle are
- * optionally moved during the operation. In addition, outstanding
+ * optionally moved during the operation. In addition, all outstanding
  * paint events are flushed before the source area is copied to
  * ensure that the contents of the canvas are drawn correctly.
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java
index 796bce5..2c07ac1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Combo.java	
@@ -41,7 +41,7 @@ import org.eclipse.swt.internal.wpf.OS;
  * <dt><b>Styles:</b></dt>
  * <dd>DROP_DOWN, READ_ONLY, SIMPLE</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Selection, Verify</dd>
+ * <dd>DefaultSelection, Modify, Selection, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles DROP_DOWN and SIMPLE may be specified.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java
index e7e27d2..cd63a46 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Composite.java	
@@ -243,6 +243,7 @@ Control [] computeTabList () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
+	display.runSkin ();
 	Point size;
 	if (layout != null) {
 		if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
@@ -714,7 +715,7 @@ public void layout (boolean changed, boolean all) {
 	checkWidget ();
 	if (layout == null && !all) return;
 	markLayout (changed, all);
-	updateLayout (true, all);
+	updateLayout (all);
 }
 
 /**
@@ -748,42 +749,119 @@ public void layout (boolean changed, boolean all) {
 public void layout (Control [] changed) {
 	checkWidget ();
 	if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
-	for (int i=0; i<changed.length; i++) {
-		Control control = changed [i];
-		if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
-		if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
-		boolean ancestor = false;
-		Composite composite = control.parent;
-		while (composite != null) {
-			ancestor = composite == this;
-			if (ancestor) break;
-			composite = composite.parent;
+	layout (changed, SWT.NONE);
+}
+
+/**
+ * Forces a lay out (that is, sets the size and location) of all widgets that 
+ * are in the parent hierarchy of the changed control up to and including the 
+ * receiver. 
+ * <p>
+ * The parameter <code>flags</code> may be a combination of:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be laid out</dd>
+ * <dt><b>SWT.CHANGED</b></dt>
+ * <dd>the layout must flush its caches</dd>
+ * <dt><b>SWT.DEFER</b></dt>
+ * <dd>layout will be deferred</dd>
+ * </dl>
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code>
+ * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the 
+ * hierarchy must not rely on any information cached about the changed control or
+ * any of its ancestors.  The layout may (potentially) optimize the
+ * work it is doing by assuming that none of the peers of the changed
+ * control have changed state since the last layout.
+ * If an ancestor does not have a layout, skip it.
+ * </p>
+ * <p>
+ * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code>
+ * indicates that the whole widget tree should be laid out. And the flag
+ * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached
+ * information for all controls that are laid out. 
+ * </p>
+ * <p>
+ * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by
+ * calling <code>Composite.setLayoutDeferred(true)</code> and scheduling a call
+ * to <code>Composite.setLayoutDeferred(false)</code>, which will happen when
+ * appropriate (usually before the next event is handled). When this flag is set,
+ * the application should not call <code>Composite.setLayoutDeferred(boolean)</code>.
+ * </p>
+ * <p>
+ * Note: Layout is different from painting. If a child is
+ * moved or resized such that an area in the parent is
+ * exposed, then the parent will paint. If no child is
+ * affected, the parent will not paint.
+ * </p>
+ * 
+ * @param changed a control that has had a state change which requires a recalculation of its size
+ * @param flags the flags specifying how the layout should happen
+ * 
+ * @exception IllegalArgumentException <ul>
+ *    <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> 
+ *    <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public void layout (Control [] changed, int flags) {
+	checkWidget ();
+	if (changed != null) {
+		for (int i=0; i<changed.length; i++) {
+			Control control = changed [i];
+			if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
+			if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+			boolean ancestor = false;
+			Composite composite = control.parent;
+			while (composite != null) {
+				ancestor = composite == this;
+				if (ancestor) break;
+				composite = composite.parent;
+			}
+			if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
 		}
-		if (!ancestor) error (SWT.ERROR_INVALID_PARENT);
-	}
-	int updateCount = 0;
-	Composite [] update = new Composite [16];
-	for (int i=0; i<changed.length; i++) {
-		Control child = changed [i];
-		Composite composite = child.parent;
-		while (child != this) {
-			if (composite.layout != null) {
-				composite.state |= LAYOUT_NEEDED;
-				if (!composite.layout.flushCache (child)) {
-					composite.state |= LAYOUT_CHANGED;
+		int updateCount = 0;
+		Composite [] update = new Composite [16];
+		for (int i=0; i<changed.length; i++) {
+			Control child = changed [i];
+			Composite composite = child.parent;
+			while (child != this) {
+				if (composite.layout != null) {
+					composite.state |= LAYOUT_NEEDED;
+					if (!composite.layout.flushCache (child)) {
+						composite.state |= LAYOUT_CHANGED;
+					}
 				}
+				if (updateCount == update.length) {
+					Composite [] newUpdate = new Composite [update.length + 16];
+					System.arraycopy (update, 0, newUpdate, 0, update.length);
+					update = newUpdate;
+				}
+				child = update [updateCount++] = composite;
+				composite = child.parent;
 			}
-			if (updateCount == update.length) {
-				Composite [] newUpdate = new Composite [update.length + 16];
-				System.arraycopy (update, 0, newUpdate, 0, update.length);
-				update = newUpdate;
-			}
-			child = update [updateCount++] = composite;
-			composite = child.parent;
 		}
-	}
-	for (int i=updateCount-1; i>=0; i--) {
-		update [i].updateLayout (true, false);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		for (int i=updateCount-1; i>=0; i--) {
+			update [i].updateLayout (false);
+		}
+	} else {
+		if (layout == null && (flags & SWT.ALL) == 0) return;
+		markLayout ((flags & SWT.CHANGED) != 0, (flags & SWT.ALL) != 0);
+		if ((flags & SWT.DEFER) != 0) {
+			setLayoutDeferred (true);
+			display.addLayoutDeferred (this);
+		}
+		updateLayout ((flags & SWT.ALL) != 0);
 	}
 }
 
@@ -879,6 +957,15 @@ void removeControl (Control control) {
 	fixTabList (control);
 }
 
+void reskinChildren (int flags) {
+	super.reskinChildren (flags);
+	Control [] children = _getChildren ();
+	for (int i=0; i<children.length; i++) {
+		Control child = children [i];
+		if (child != null) child.reskin (flags);
+	}
+}
+
 void resized () {
 	super.resized();
 	if (isDisposed ()) return;
@@ -1015,7 +1102,7 @@ public void setLayoutDeferred (boolean defer) {
 	if (!defer) {
 		if (--layoutCount == 0) {
 			if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) {
-				updateLayout (true, true);
+				updateLayout (true);
 			}
 		}
 	} else {
@@ -1134,6 +1221,10 @@ void updateFont (Font oldFont, Font newFont) {
 	}
 }
 
+void updateLayout (boolean all) {
+	updateLayout (true, all);
+}
+
 void updateLayout (boolean resize, boolean all) {
 	Composite parent = findDeferredControl ();
 	if (parent != null) {
@@ -1143,6 +1234,7 @@ void updateLayout (boolean resize, boolean all) {
 	if ((state & LAYOUT_NEEDED) != 0) {
 		boolean changed = (state & LAYOUT_CHANGED) != 0;
 		state &= ~(LAYOUT_NEEDED | LAYOUT_CHANGED);
+		display.runSkin ();
 		layout.layout (this, changed);
 	}
 	if (all) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java
index 1cbda10..f84cf79 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Control.java	
@@ -28,7 +28,8 @@ import org.eclipse.swt.effects.*;
  * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
- *     MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse</dd>
+ *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
+ *     Paint, Resize, Traverse</dd>
  * </dl>
  * </p><p>
  * Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.
@@ -674,7 +675,7 @@ void destroyWidget () {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -716,7 +717,7 @@ public boolean dragDetect (Event event) {
  * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise.
  *
  * @exception IllegalArgumentException <ul>
- *   <li>ERROR_NULL_ARGUMENT when the event is null</li>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
  * </ul>
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1122,6 +1123,11 @@ public Menu getMenu () {
  * 
  * @return the receiver's monitor
  * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
  * @since 3.0
  */
 public Monitor getMonitor () {
@@ -1542,6 +1548,8 @@ boolean hasFocus () {
  *
  * @param data the platform specific GC data 
  * @return the platform specific GC handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	checkWidget();
@@ -1603,6 +1611,8 @@ public int internal_new_GC (GCData data) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int dc, GCData data) {
 	checkWidget ();
@@ -3402,6 +3412,182 @@ boolean translateTraversal (int e) {
 	return false;
 }
 
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, Event event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+/**
+ * Performs a platform traversal action corresponding to a <code>KeyDown</code> event.
+ * 
+ * <p>Valid traversal values are
+ * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>,
+ * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>,
+ * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
+ * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse
+ * event is created with standard values based on the KeyDown event.  If
+ * <code>traversal</code> is one of the other traversal constants then the Traverse
+ * event is created with this detail, and its <code>doit</code> is taken from the
+ * KeyDown event. 
+ * </p>
+ *
+ * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute
+ * this from <code>event</code>
+ * @param event the KeyDown event
+ * 
+ * @return <code>true</code> if the traversal succeeded
+ *
+ * @exception IllegalArgumentException <ul>
+ *   <li>ERROR_NULL_ARGUMENT if the event is null</li>
+ * </ul>
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public boolean traverse (int traversal, KeyEvent event) {
+	checkWidget ();
+	if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
+	return traverse (traversal, event.character, event.keyCode, event.keyLocation, event.stateMask, event.doit);
+}
+
+boolean traverse (int traversal, char character, int keyCode, int keyLocation, int stateMask, boolean doit) {
+	// the following should work but is not tested
+
+//	if (traversal == SWT.TRAVERSE_NONE) {
+//		switch (keyCode) {
+//			case SWT.ESC: {
+//				traversal = SWT.TRAVERSE_ESCAPE;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.CR: {
+//				traversal = SWT.TRAVERSE_RETURN;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.ARROW_DOWN:
+//			case SWT.ARROW_RIGHT: {
+//				traversal = SWT.TRAVERSE_ARROW_NEXT;
+//				doit = false;
+//				break;
+//			}
+//			case SWT.ARROW_UP:
+//			case SWT.ARROW_LEFT: {
+//				traversal = SWT.TRAVERSE_ARROW_PREVIOUS;
+//				doit = false;
+//				break;
+//			}
+//			case SWT.TAB: {
+//				traversal = (stateMask & SWT.SHIFT) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT;
+//				doit = true;
+//				break;
+//			}
+//			case SWT.PAGE_DOWN: {
+//				if ((stateMask & SWT.CTRL) != 0) {
+//					traversal = SWT.TRAVERSE_PAGE_NEXT;
+//					doit = true;
+//				}
+//				break;
+//			}
+//			case SWT.PAGE_UP: {
+//				if ((stateMask & SWT.CTRL) != 0) {
+//					traversal = SWT.TRAVERSE_PAGE_PREVIOUS;
+//					doit = true;
+//				}
+//				break;
+//			}
+//			default: {
+//				if (character != 0 && (stateMask & (SWT.ALT | SWT.CTRL)) == SWT.ALT) {
+//					traversal = SWT.TRAVERSE_MNEMONIC;
+//					doit = true;
+//				}
+//				break;
+//			}
+//		}
+//	}
+//
+//	Event event = new Event ();
+//	event.character = character;
+//	event.detail = traversal;
+//	event.doit = doit;
+//	event.keyCode = keyCode;
+//	event.keyLocation = keyLocation;
+//	event.stateMask = stateMask;
+//	Shell shell = getShell ();
+//
+//	boolean all = false;
+//	switch (traversal) {
+//		case SWT.TRAVERSE_ESCAPE:
+//		case SWT.TRAVERSE_RETURN:
+//		case SWT.TRAVERSE_PAGE_NEXT:
+//		case SWT.TRAVERSE_PAGE_PREVIOUS: {
+//			all = true;
+//			// FALL THROUGH
+//		}
+//		case SWT.TRAVERSE_ARROW_NEXT:
+//		case SWT.TRAVERSE_ARROW_PREVIOUS:
+//		case SWT.TRAVERSE_TAB_NEXT:
+//		case SWT.TRAVERSE_TAB_PREVIOUS: {
+//			/* traversal is a valid traversal action */
+//			break;
+//		}
+//		case SWT.TRAVERSE_MNEMONIC: {
+//			return translateMnemonic (event, null) || shell.translateMnemonic (event, this);
+//		}
+//		default: {
+//			/* traversal is not a valid traversal action */
+//			return false;
+//		}
+//	}
+//
+//	Control control = this;
+//	do {
+//		if (control.traverse (event)) return true;
+//		if (!event.doit && control.hooks (SWT.Traverse)) return false;
+//		if (control == shell) return false;
+//		control = control.parent;
+//	} while (all && control != null);
+	return false;
+}
+
 boolean traverse (Event event) {
 	/*
 	* It is possible (but unlikely), that application
@@ -3432,7 +3618,8 @@ boolean traverse (Event event) {
  * traversal action. The argument should be one of the constants:
  * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, 
  * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, 
- * <code>SWT.TRAVERSE_ARROW_NEXT</code> and <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>.
+ * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>,
+ * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>.
  *
  * @param traversal the type of traversal
  * @return true if the traversal succeeded
@@ -3612,6 +3799,7 @@ public boolean setParent (Composite parent) {
 	checkWidget ();
 	if (parent == null) error (SWT.ERROR_NULL_ARGUMENT);
 	if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+	reskin (SWT.ALL);
 	if (this.parent == parent) return true;
 	if (!isReparentable ()) return false;
 	return false;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolBar.java
index 2b35cec..8740054 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/CoolBar.java	
@@ -525,6 +525,16 @@ void removeControl (Control control) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (items != null) {
+		for (int i=0; i<items.length; i++) {
+			CoolItem item = items [i];
+			if (item != null) item.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, int flags) {
 	int result = super.setBounds (x, y, width, height, flags);
 	if ((result & RESIZED) != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java
index 95b6884..bd31a07 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Decorations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -330,6 +330,7 @@ void fixDecorations (Decorations newDecorations, Control control, Menu [] menus)
  */
 public Button getDefaultButton () {
 	checkWidget ();
+	if (defaultButton != null && defaultButton.isDisposed ()) return null;
 	return defaultButton;
 }
 
@@ -530,6 +531,17 @@ void removeMenu (Menu menu) {
 	}
 }
 
+void reskinChildren (int flags) {
+	if (menuBar != null) menuBar.reskin (flags);
+	if (menus != null) {
+		for (int i=0; i<menus.length; i++) {
+			Menu menu = menus [i];
+			if (menu != null) menu.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 boolean restoreFocus () {
 //	if (display.ignoreRestoreFocus) return true;
 	if (savedFocus != null && savedFocus.isDisposed ()) savedFocus = null;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java
index 3ed8cd3..3b70638 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Display.java	
@@ -78,7 +78,7 @@ import org.eclipse.swt.graphics.*;
  * <dt><b>Styles:</b></dt>
  * <dd>(none)</dd>
  * <dt><b>Events:</b></dt>
- * <dd>Close, Dispose, Settings</dd>
+ * <dd>Close, Dispose, OpenDocument, Settings, Skin</dd>
  * </dl>
  * <p>
  * IMPORTANT: This class is <em>not</em> intended to be subclassed.
@@ -125,6 +125,10 @@ public class Display extends Device {
 	/* Display Shutdown */
 	Runnable [] disposeList;
 	
+	/* Deferred Layout list */
+	Composite[] layoutDeferred;
+	int layoutDeferredCount;
+
 	/* System Tray */
 	Tray tray;
 	
@@ -212,6 +216,11 @@ public class Display extends Device {
 		{OS.Key_F13,	SWT.F13},
 		{OS.Key_F14,	SWT.F14},
 		{OS.Key_F15,	SWT.F15},
+		{OS.Key_F16,	SWT.F16},
+		{OS.Key_F17,	SWT.F17},
+		{OS.Key_F18,	SWT.F18},
+		{OS.Key_F19,	SWT.F19},
+		{OS.Key_F20,	SWT.F20},
 		
 		/* Numeric Keypad Keys */
 		{OS.Key_Multiply,	SWT.KEYPAD_MULTIPLY},
@@ -305,6 +314,11 @@ public class Display extends Device {
 	Shell [] modalShells;
 //	Shell modalDialogShell;
 
+	/* Skinning support */
+	static final int GROW_SIZE = 1024;
+	Widget [] skinList = new Widget [GROW_SIZE];
+	int skinCount;
+	
 	/* Package Name */
 	static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$
 	/*
@@ -468,6 +482,16 @@ void addInvalidate (Control control) {
 	}
 }
 
+void addLayoutDeferred (Composite comp) {
+	if (layoutDeferred == null) layoutDeferred = new Composite [64];
+	if (layoutDeferredCount == layoutDeferred.length) {
+		Composite [] temp = new Composite [layoutDeferred.length + 64];
+		System.arraycopy (layoutDeferred, 0, temp, 0, layoutDeferred.length);
+		layoutDeferred = temp;
+	}
+	layoutDeferred[layoutDeferredCount++] = comp;
+}
+
 /**
  * Adds the listener to the collection of listeners who will
  * be notified when an event of the given type occurs. The event
@@ -537,6 +561,15 @@ void addShell (Shell shell) {
 	shells [index] = shell;
 }
 
+void addSkinnableWidget (Widget widget) {
+	if (skinCount >= skinList.length) {
+		Widget[] newSkinWidgets = new Widget [skinList.length + GROW_SIZE];
+		System.arraycopy (skinList, 0, newSkinWidgets, 0, skinList.length);
+		skinList = newSkinWidgets;
+	}
+	skinList [skinCount++] = widget;
+}
+
 /**
  * Causes the <code>run()</code> method of the runnable to
  * be invoked by the user-interface thread at the next 
@@ -773,6 +806,8 @@ boolean filters (int eventType) {
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public Widget findWidget (int handle) {
 	checkDevice ();
@@ -799,6 +834,8 @@ public Widget findWidget (int handle) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.1
  */
 public Widget findWidget (int handle, int id) {
@@ -1607,6 +1644,23 @@ public Image getSystemImage (int id) {
 }
 
 /**
+ * Returns the single instance of the system taskBar or null
+ * when there is no system taskBar available for the platform.
+ *
+ * @return the system taskBar or <code>null</code>
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
+ * </ul>
+ *
+ * @since 3.6
+ */
+public TaskBar getSystemTaskBar () {
+	checkDevice ();
+	return null;
+}
+
+/**
  * Returns the single instance of the system tray or null
  * when there is no system tray available for the platform.
  *
@@ -1660,6 +1714,8 @@ public Thread getThread () {
  * @exception SWTError <ul>
  *    <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
  * </ul>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public int internal_new_GC (GCData data) {
 	if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED);
@@ -1773,6 +1829,8 @@ void HandleOperationPosted (int sender, int e) {
  *
  * @param hDC the platform specific GC handle
  * @param data the platform specific GC data 
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public void internal_dispose_GC (int dc, GCData data) {
 	//TODO - the wrong drawing context was created
@@ -2205,6 +2263,8 @@ void removeShell (Shell shell) {
  */
 public boolean readAndDispatch () {
 	checkDevice ();
+	runSkin ();
+	runDeferredLayouts ();
 	runPopups ();
 	idle = false;
 	int handler = OS.gcnew_NoArgsDelegate(jniRef, "setIdleHandler");
@@ -2481,6 +2541,21 @@ boolean runDeferredEvents () {
 	return run;
 }
 
+boolean runDeferredLayouts () {
+	if (layoutDeferredCount != 0) {
+		Composite[] temp = layoutDeferred;
+		int count = layoutDeferredCount;
+		layoutDeferred = null;
+		layoutDeferredCount = 0;
+		for (int i = 0; i < count; i++) {
+			Composite comp = temp[i];
+			if (!comp.isDisposed()) comp.setLayoutDeferred (false);
+		}
+		return true;
+	}	
+	return false;
+}
+
 boolean runPopups () {
 	if (popups == null) return false;
 	boolean result = false;
@@ -2519,6 +2594,29 @@ void runSettings () {
 	}
 }
 
+boolean runSkin () {
+	if (skinCount > 0) {
+		Widget [] oldSkinWidgets = skinList;	
+		int count = skinCount;	
+		skinList = new Widget[GROW_SIZE];
+		skinCount = 0;
+		if (eventTable != null && eventTable.hooks(SWT.Skin)) {
+			for (int i = 0; i < count; i++) {
+				Widget widget = oldSkinWidgets[i];
+				if (widget != null && !widget.isDisposed()) {
+					widget.state &= ~Widget.SKIN_NEEDED;
+					oldSkinWidgets[i] = null;
+					Event event = new Event ();
+					event.widget = widget;
+					sendEvent (SWT.Skin, event);
+				}
+			}
+		}
+		return true;
+	}	
+	return false;
+}
+	
 void saveResources () {
 //	int resourceCount = 0;
 //	if (resources == null) {
@@ -2736,10 +2834,16 @@ public void setData (Object data) {
 }
 
 /**
- * On platforms which support it, sets the application name
- * to be the argument. On Motif, for example, this can be used
- * to set the name used for resource lookup.  Specifying
- * <code>null</code> for the name clears it.
+ * Sets the application name to the argument.
+ * <p>
+ * The application name can be used in several ways,
+ * depending on the platform and tools being used.
+ * On Motif, for example, this can be used to set
+ * the name used for resource lookup. Accessibility
+ * tools may also ask for the application name.
+ * </p><p>
+ * Specifying <code>null</code> for the name clears it.
+ * </p>
  *
  * @param name the new app name or <code>null</code>
  */
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ExpandBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ExpandBar.java
index b6cfac1..dc37db1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ExpandBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ExpandBar.java	
@@ -418,6 +418,20 @@ public void removeExpandListener (ExpandListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);	
 }
 
+void reskinChildren (int flags) {
+	if (itemCount > 0) {
+		int items = OS.Panel_Children (handle);
+		for (int i=0; i<itemCount; i++) {
+			ExpandItem item = getItem (items, i);
+			if (item != null) {
+				item.reskin(flags);
+			}
+		}
+		OS.GCHandle_Free (items);
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, int flags) {
 	int result = super.setBounds (x, y, width, height, flags);
 	if ((result & RESIZED) != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java
index 4a6895c..60aad80 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Link.java	
@@ -376,6 +376,18 @@ void setForegroundBrush (int brush) {
  * include the mnemonic character and line delimiters. The only delimiter
  * the HREF attribute supports is the quotation mark (").
  * </p>
+ * <p>
+ * Mnemonics are indicated by an '&' that causes the next
+ * character to be the mnemonic. The receiver can have a    
+ * mnemonic in the text preceding each link. When the user presses a
+ * key sequence that matches the mnemonic, focus is assigned
+ * to the link that follows the text. Mnemonics in links and in
+ * the trailing text are ignored. On most platforms,
+ * the mnemonic appears underlined but may be emphasised in a
+ * platform specific manner.  The mnemonic indicator character
+ * '&' can be escaped by doubling it in the string, causing
+ * a single '&' to be displayed.
+ * </p> 
  * 
  * @param string the new text
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java
index b6462e7..5130e87 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Menu.java	
@@ -786,6 +786,15 @@ public void removeMenuListener (MenuListener listener) {
 	eventTable.unhook (SWT.Show, listener);
 }
 
+void reskinChildren (int flags) {
+	MenuItem [] items = getItems ();
+	for (int i=0; i<items.length; i++) {
+		MenuItem item = items [i];
+		item.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the default menu item to the argument or removes
  * the default emphasis when the argument is <code>null</code>.
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java
index cc5a802..a533ba9 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/MenuItem.java	
@@ -182,7 +182,13 @@ public void addHelpListener (HelpListener listener) {
  * When <code>widgetSelected</code> is called, the stateMask field of the event object is valid.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
- *
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
+ * 
  * @param listener the listener which should be notified when the menu item is selected by the user
  *
  * @exception IllegalArgumentException <ul>
@@ -534,6 +540,13 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (menu != null) {
+		menu.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Sets the widget accelerator.  An accelerator is the bit-wise
  * OR of zero or more modifier masks and a key. Examples:
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java
index db6026d..cd9f021 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ScrollBar.java	
@@ -322,8 +322,7 @@ public Point getSize () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -340,6 +339,64 @@ public int getThumb () {
 }
 
 /**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb relative to its parent.
+ * 
+ * @return the thumb bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbBounds () {
+	checkWidget();
+	int track = OS.ScrollBar_Track(handle);
+	int thumb = OS.Track_Thumb(track);
+	int point = OS.gcnew_Point (0, 0);
+	int newPoint = OS.UIElement_TranslatePoint (thumb, point, parent.handle);
+	int x = (int) (OS.Point_X (newPoint) + 0.5);
+	int y = (int) (OS.Point_Y (newPoint) + 0.5);
+	int width = (int) (OS.FrameworkElement_ActualWidth(thumb) + 0.5);
+	int height = (int) (OS.FrameworkElement_ActualHeight(thumb) + 0.5);
+	Rectangle rect =  new Rectangle(x, y, width, height);
+	OS.GCHandle_Free (point);
+	OS.GCHandle_Free (newPoint);
+	return rect;
+}
+
+/**
+ * Returns a rectangle describing the size and location of the
+ * receiver's thumb track relative to its parent. This rectangle
+ * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}.
+ * 
+ * @return the thumb track bounds, relative to the {@link #getParent() parent}
+ *
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.6
+ */
+public Rectangle getThumbTrackBounds () {
+	checkWidget();
+	int track = OS.ScrollBar_Track(handle);
+	int point = OS.gcnew_Point (0, 0);
+	int newPoint = OS.UIElement_TranslatePoint (track, point, parent.handle);
+	int x = (int) (OS.Point_X (newPoint) + 0.5);
+	int y = (int) (OS.Point_Y (newPoint) + 0.5);
+	int width = (int) (OS.FrameworkElement_ActualWidth(track) + 0.5);
+	int height = (int) (OS.FrameworkElement_ActualHeight(track) + 0.5);
+	Rectangle rect =  new Rectangle(x, y, width, height);
+	OS.GCHandle_Free (point);
+	OS.GCHandle_Free (newPoint);
+	return rect;
+}
+
+/**
  * Returns <code>true</code> if the receiver is visible, and
  * <code>false</code> otherwise.
  * <p>
@@ -593,10 +650,13 @@ public void setSelection (int selection) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scrollable.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scrollable.java
index 2176dd0..15bfdbf 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scrollable.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Scrollable.java	
@@ -306,6 +306,12 @@ void releaseHandle () {
 	scrolledHandle = 0;
 }
 
+void reskinChildren (int flags) {
+	if (horizontalBar != null) horizontalBar.reskin (flags);
+	if (verticalBar != null) verticalBar.reskin (flags);
+	super.reskinChildren (flags);
+}
+
 int topHandle () {
 	return scrolledHandle != 0 ? scrolledHandle : super.topHandle ();
 }
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java
index 6ec9c27..ba159fe 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Shell.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -272,6 +272,7 @@ Shell (Display display, Shell parent, int style, int handle, boolean embedded) {
 			shellHandle = handle;
 		}
 	}
+	reskinWidget();
 	createWidget ();
 }
 
@@ -366,6 +367,8 @@ public Shell (Shell parent, int style) {
  * @param display the display for the shell
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 public static Shell wpf_new (Display display, int handle) {
 	return new Shell (display, null, SWT.NO_TRIM, handle, true);
@@ -386,6 +389,8 @@ public static Shell wpf_new (Display display, int handle) {
  * @param handle the handle for the shell
  * @return a new shell object containing the specified display and handle
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public static Shell internal_new (Display display, int handle) {
@@ -1109,6 +1114,15 @@ public void removeShellListener (ShellListener listener) {
 	eventTable.unhook (SWT.Deactivate, listener);
 }
 
+void reskinChildren (int flags) {
+	Shell [] shells = getShells ();
+	for (int i=0; i<shells.length; i++) {
+		Shell shell = shells [i];
+		if (shell != null) shell.reskin (flags);
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * If the receiver is visible, moves it to the top of the 
  * drawing order for the display on which it was created 
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java
index c806643..2e59ae1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Slider.java	
@@ -255,8 +255,7 @@ public int getSelection () {
 }
 
 /**
- * Returns the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.
+ * Returns the receiver's thumb value.
  *
  * @return the thumb value
  *
@@ -429,10 +428,13 @@ public void setSelection (int value) {
 }
 
 /**
- * Sets the size of the receiver's thumb relative to the
- * difference between its maximum and minimum values.  This new
- * value will be ignored if it is less than one, and will be
+ * Sets the thumb value. The thumb value should be used to represent 
+ * the size of the visual portion of the current range. This value is
+ * usually the same as the page increment value.
+ * <p>
+ * This new value will be ignored if it is less than one, and will be 
  * clamped if it exceeds the receiver's current range.
+ * </p>
  *
  * @param value the new thumb value, which must be at least one and not
  * larger than the size of the current range
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java
index 96a1f83..e91e0ce 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Spinner.java	
@@ -765,11 +765,11 @@ public void setIncrement (int value) {
 
 /**
  * Sets the maximum value that the receiver will allow.  This new
- * value will be ignored if it is not greater than the receiver's current
+ * value will be ignored if it is less than the receiver's current
  * minimum value.  If the new maximum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new maximum, which must be greater than the current minimum
+ * @param value the new maximum, which must be greater than or equal to the current minimum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -778,18 +778,18 @@ public void setIncrement (int value) {
  */
 public void setMaximum (int value) {
 	checkWidget ();
-	if (value <= min) return;
+	if (value < min) return;
 	max = value;
 	if (this.value > value) setSelection (value, true, true, false);
 }
 
 /**
  * Sets the minimum value that the receiver will allow.  This new
- * value will be ignored if it is not less than the receiver's
+ * value will be ignored if it is greater than the receiver's
  * current maximum value.  If the new minimum is applied then the receiver's
  * selection value will be adjusted if necessary to fall within its new range.
  *
- * @param value the new minimum, which must be less than the current maximum
+ * @param value the new minimum, which must be less than or equal to the current maximum
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -798,7 +798,7 @@ public void setMaximum (int value) {
  */
 public void setMinimum (int value) {
 	checkWidget ();
-	if (value >= max) return;
+	if (value > max) return;
 	min = value;
 	if (this.value < value) setSelection (value, true, true, false);
 }
@@ -931,7 +931,7 @@ public void setTextLimit (int limit) {
  */
 public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) {
 	checkWidget ();
-	if (maximum <= minimum) return;
+	if (maximum < minimum) return;
 	if (digits < 0) return;
 	if (increment < 1) return;
 	if (pageIncrement < 1) return;
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java
index 9100ff4..104a39a 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TabFolder.java	
@@ -576,6 +576,18 @@ public void removeSelectionListener (SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
+void reskinChildren (int flags) {
+	if (itemCount > 0) {
+		int items = OS.ItemsControl_Items (handle);
+		for (int i=0; i<itemCount; i++) {
+			TabItem item = getItem (items, i);
+			if (item != null) item.reskin(flags);
+		}
+		OS.GCHandle_Free (items);
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, int flags) {
 	int result = super.setBounds (x, y, width, height, flags);
 	if ((result & RESIZED) != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java
index 068104d..f3a88f4 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Table.java	
@@ -1763,6 +1763,24 @@ public void select (int [] indices) {
 	ignoreSelection = false;
 }
 
+void reskinChildren (int flags) {
+	if (itemCount > 0) {
+		int items = OS.ItemsControl_Items (handle);
+		for (int i=0; i<itemCount; i++) {
+			TableItem item = getItem (items, i, true);
+			if (item != null) item.reskin (flags);
+		}
+		OS.GCHandle_Free (items);
+	}
+	if (columns != null) {
+		for (int i=0; i<columnCount; i++) {
+			TableColumn column = columns [i];
+			if (!column.isDisposed ()) column.reskin (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java
index 6e4946d..1575154 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TableItem.java	
@@ -333,10 +333,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java
index b5295c1..322862c 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Text.java	
@@ -31,7 +31,7 @@ import org.eclipse.swt.events.*;
  * <dt><b>Styles:</b></dt>
  * <dd>CENTER, ICON_CANCEL, ICON_SEARCH, LEFT, MULTI, PASSWORD, SEARCH, SINGLE, RIGHT, READ_ONLY, WRAP</dd>
  * <dt><b>Events:</b></dt>
- * <dd>DefaultSelection, Modify, Verify</dd>
+ * <dd>DefaultSelection, Modify, Verify, OrientationChange</dd>
  * </dl>
  * <p>
  * Note: Only one of the styles MULTI and SINGLE may be specified,
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolBar.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolBar.java
index ddc1d15..c537cd0 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolBar.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolBar.java	
@@ -421,6 +421,18 @@ void removeControl (Control control) {
 	OS.GCHandle_Free (items);
 }
 
+void reskinChildren (int flags) {
+	if (itemCount > 0) {
+		int items = OS.ItemsControl_Items (handle);
+		for (int i = 0; i < itemCount; i++) {
+			ToolItem item = getItem (items, i);
+			if (item != null) item.reskin (flags);
+		}
+		OS.GCHandle_Free (items);
+	}
+	super.reskinChildren (flags);
+}
+
 void setButtonVisibility (byte visibility) {
 	int template = OS.Control_Template (handle);
 	int overFlowName = createDotNetString ("OverflowGrid", false);
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java
index 5dda1d3..203dba1 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/ToolItem.java	
@@ -136,6 +136,12 @@ public ToolItem (ToolBar parent, int style, int index) {
  * the event object detail field contains the value <code>SWT.ARROW</code>.
  * <code>widgetDefaultSelected</code> is not called.
  * </p>
+ * <p>
+ * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is
+ * also called when the receiver loses selection because another item in the same radio group 
+ * was selected by the user. During <code>widgetSelected</code> the application can use
+ * <code>getSelection()</code> to determine the current selected state of the receiver.
+ * </p>
  *
  * @param listener the listener which should be notified when the control is selected by the user,
  *
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tracker.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tracker.java
index 884c71b..1528845 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tracker.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tracker.java	
@@ -136,6 +136,7 @@ public Tracker (Display display, int style) {
 	}
 	this.style = checkStyle (style);
 	this.display = display;
+	reskinWidget ();
 }
 
 /**
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java
index 72d06c0..45d42da 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Tree.java	
@@ -1821,6 +1821,24 @@ public void removeTreeListener(TreeListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);
 }
 
+void reskinChildren (int flags) {
+	if (itemCount > 0) {
+		int items = OS.ItemsControl_Items (handle);
+		for (int i = 0; i < itemCount; i++) {
+			TreeItem item  = getItem (items, i, true);
+			if (item != null) item.reskinChildren (flags);
+		}
+		OS.GCHandle_Free (items);
+	}
+	if (columns != null) {
+		for (int i=0; i<columns.length; i++) {
+			TreeColumn column = columns [i];
+			if (column != null) column.reskinChildren (flags);
+		}
+	}
+	super.reskinChildren (flags);
+}
+
 int setBounds (int x, int y, int width, int height, int flags) {
 	int result = super.setBounds (x, y, width, height, flags);
 	if ((result & RESIZED) != 0) {
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java
index 24e2c25..0540cc5 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/TreeItem.java	
@@ -575,10 +575,10 @@ public Color getBackground (int index) {
 }
 
 /**
- * Returns a rectangle describing the receiver's size and location
- * relative to its parent.
+ * Returns a rectangle describing the size and location of the receiver's
+ * text relative to its parent.
  *
- * @return the receiver's bounding rectangle
+ * @return the bounding rectangle of the receiver's text
  *
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -1305,8 +1305,6 @@ public void setFont (int index, Font font) {
  *
  * @param color the new color (or null)
  *
- * @since 2.0
- * 
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> 
  * </ul>
diff --git a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java
index 1ef18e0..41a636e 100644
--- a/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java	
+++ b/eclipse/plugins/org.eclipse.swt/Eclipse SWT/wpf/org/eclipse/swt/widgets/Widget.java	
@@ -55,6 +55,8 @@ public abstract class Widget {
 	 * within the packages provided by SWT. It is not available on all
 	 * platforms and should never be accessed from application code.
 	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
 	 */
 	public int handle;
 	int jniRef;
@@ -94,6 +96,9 @@ public abstract class Widget {
 	/* DragDetect */
 	static final int DRAG_DETECT	= 1<<15;
 	
+	/* Notify of the opportunity to skin this widget */
+	static final int SKIN_NEEDED = 1<<16;
+	
 	/* Default size for widgets */
 	static final int DEFAULT_WIDTH	= 64;
 	static final int DEFAULT_HEIGHT	= 64;
@@ -141,6 +146,7 @@ public Widget (Widget parent, int style) {
 	checkParent (parent);
 	this.style = style;
 	display = parent.display;
+	reskinWidget ();
 }
 
 void _addListener (int eventType, Listener listener) {
@@ -423,6 +429,7 @@ void destroyWidget () {
  * <code>true</code> when sent the message <code>isDisposed()</code>.
  * Any internal connections between the widgets in the tree will
  * have been removed to facilitate garbage collection.
+ * This method does nothing if the widget is already disposed.
  * <p>
  * NOTE: This method is not called recursively on the descendants
  * of the receiver. This means that, widget implementers can not
@@ -726,7 +733,7 @@ boolean hooks (int eventType) {
  * <p>
  * This method gets the dispose state for the widget.
  * When a widget has been disposed, it is an error to
- * invoke any other method using the widget.
+ * invoke any other method (except {@link #dispose()}) using the widget.
  * </p>
  *
  * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise
@@ -991,6 +998,8 @@ public void removeListener (int eventType, Listener listener) {
  *
  * @see Listener
  * @see #addListener
+ * 
+ * @noreference This method is not intended to be referenced by clients.
  */
 protected void removeListener (int eventType, SWTEventListener listener) {
 	checkWidget();
@@ -1000,6 +1009,50 @@ protected void removeListener (int eventType, SWTEventListener listener) {
 }
 
 /**
+ * Marks the widget to be skinned. 
+ * <p>
+ * The skin event is sent to the receiver's display when appropriate (usually before the next event
+ * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin
+ * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> 
+ * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it 
+ * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor 
+ * while specifying the <code>SWT.ALL</code> flag.  
+ * </p>
+ * <p>
+ * The parameter <code>flags</code> may be either:
+ * <dl>
+ * <dt><b>SWT.ALL</b></dt>
+ * <dd>all children in the receiver's widget tree should be skinned</dd>
+ * <dt><b>SWT.NONE</b></dt>
+ * <dd>only the receiver should be skinned</dd>
+ * </dl>
+ * </p>
+ * @param flags the flags specifying how to reskin
+ * 
+ * @exception SWTException 
+ * <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * @since 3.6
+ */
+public void reskin (int flags) {
+	checkWidget ();
+	reskinWidget ();
+	if ((flags & SWT.ALL) != 0) reskinChildren (flags);
+}
+
+void reskinChildren (int flags) {	
+}
+
+void reskinWidget() {
+	if ((state & SKIN_NEEDED) != SKIN_NEEDED) {
+		this.state |= SKIN_NEEDED;
+		display.addSkinnableWidget(this);
+	}
+}
+
+/**
  * Removes the listener from the collection of listeners who will
  * be notified when the widget is disposed.
  *
@@ -1164,6 +1217,18 @@ boolean sendMouseEvent (int type, int e, boolean send) {
 	}
 	return event.doit;
 }
+void sendSelectionEvent (int eventType) {
+	sendSelectionEvent (eventType, null, false);
+}
+
+void sendSelectionEvent (int eventType, Event event, boolean send) {
+	if (eventTable == null && !display.filters (eventType)) {
+		return;
+	}
+	if (event == null) event = new Event ();
+//	setInputState (event, state);
+	sendEvent (eventType, event, send);
+}
 
 //TEMPORARY CODE
 void setClipping (int widget, boolean clip) {
@@ -1309,6 +1374,7 @@ public void setData (String key, Object value) {
 		OS.GCHandle_Free(uri);
 		OS.GCHandle_Free(ptr);
 	}
+	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
 boolean sendFocusEvent (int type) {
diff --git a/eclipse/plugins/org.eclipse.swt/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.swt/META-INF/MANIFEST.MF
index 75995f6..0da2e45 100644
--- a/eclipse/plugins/org.eclipse.swt/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.swt/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ManifestVersion: 2
 Bundle-Localization: plugin
 DynamicImport-Package: org.eclipse.swt.accessibility2, org.mozilla.xpcom
diff --git a/eclipse/plugins/org.eclipse.swt/build.xml b/eclipse/plugins/org.eclipse.swt/build.xml
index c01fe7a..0a49386 100644
--- a/eclipse/plugins/org.eclipse.swt/build.xml
+++ b/eclipse/plugins/org.eclipse.swt/build.xml
@@ -15,7 +15,7 @@
 
 	<target name="init">
 		<property name="plugin" value="org.eclipse.swt" />
-		<property name="version.suffix" value="3.5.0" />
+		<property name="version.suffix" value="3.6.2" />
 		<property name="full.name" value="${plugin}_${version.suffix}" />
 		<property name="temp.folder" value="${basedir}/temp.folder" />
 		<property name="plugin.destination" value="${basedir}" />
diff --git a/eclipse/plugins/org.eclipse.swt/buildFragment.xml b/eclipse/plugins/org.eclipse.swt/buildFragment.xml
new file mode 100644
index 0000000..8a338e1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/buildFragment.xml
@@ -0,0 +1,563 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
+    Copyright (c) 2009, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
+
+<project name="org.eclipse.swt.fragment" default="" basedir=".">
+
+	<target name="init" depends="properties">
+		<property name="compilerArg" value="" />
+		<condition property="fragment" value="org.eclipse.swt.${swt.ws}.${swt.os}.${swt.arch}" else="org.eclipse.swt.${swt.ws}.${swt.os}">
+			<isset property="swt.arch"/>
+		</condition>
+		<property name="full.name" value="${fragment}_${version.suffix}" />
+		<property name="temp.folder" value="${basedir}/temp.folder" />
+		<property name="plugin.destination" value="${basedir}" />
+		<property name="build.result.folder" value="${basedir}" />
+		<property name="destination" value="${basedir}" />
+		<property name="plugindir" value="../org.eclipse.swt" />
+		<property name="javacVerbose" value="false" />
+		<property name="logExtension" value=".xml" />
+		<property name="javacSource" value="1.3" />
+		<property name="javacTarget" value="1.2" />
+		<condition property="bootclasspath" value="">
+			<equals arg1="${swt.os}" arg2="macosx"/>
+		</condition>
+		<path id="path_bootclasspath">
+			<fileset dir="${java.home}/lib">
+				<include name="*.jar" />
+			</fileset>
+		</path>
+		<property name="bootclasspath" refid="path_bootclasspath" />
+		<condition property="bundleBootClasspath" value="${CDC-1.0/Foundation-1.0}">
+			<isset property="CDC-1.0/Foundation-1.0" />
+		</condition>
+		<condition property="bundleBootClasspath" value="${J2SE-1.3}">
+			<isset property="J2SE-1.3" />
+		</condition>
+		<property name="bundleJavacSource" value="${javacSource}" />
+		<property name="bundleJavacTarget" value="${javacTarget}" />
+		<property name="bundleBootClasspath" value="${bootclasspath}" />
+		<condition property="p2.publish.parts" value="true">
+			<istrue value="${p2.gathering}" />
+		</condition>
+	</target>
+
+	<target name="properties" if="eclipse.running">
+		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
+	</target>
+
+	<target name="build.update.jar" depends="init">
+		<delete dir="${temp.folder}" />
+		<mkdir dir="${temp.folder}" />
+		<antcall target="build.jars" />
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${temp.folder}/" />
+		</antcall>
+		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" />
+		<delete dir="${temp.folder}" />
+	</target>
+
+	<target name="@dot" depends="init" unless="@dot" description="Create jar: @dot.">
+		<property name="destdir" value="${temp.folder}/@dot.bin" />
+		<property name="debug" value="true" />
+		<property name="jar.filename" value="swt.jar" />
+		<delete dir="${temp.folder}/@dot.bin" />
+		<mkdir dir="${temp.folder}/@dot.bin" />
+		<antcall target="copy.${swt.ws}.src"/>
+		<javac destdir="${temp.folder}/@dot.bin" verbose="${javacVerbose}" debug="${debug}" failonerror="no" classpath="${plugindir}/extra_jars/exceptions.jar" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}">
+			<src path="${temp.folder}/@dot.src/"/>
+			<compilerarg line="-log '${temp.folder}'/@dot.bin${logExtension}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
+			<compilerarg line="${compilerArg}" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
+		</javac>
+		<copy todir="${temp.folder}/@dot.bin">
+			<fileset dir="${temp.folder}/@dot.src/" excludes="**/*.java,**/package.htm*,**/library/" />
+			<fileset dir="${plugindir}/components/" excludes="**/*.idl" />
+		</copy>
+		<mkdir dir="${build.result.folder}/@dot" />
+		<copy todir="${build.result.folder}/@dot" failonerror="true">
+			<fileset dir="${temp.folder}/@dot.bin" />
+		</copy>
+		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
+		<!--delete dir="${temp.folder}/@dot.bin" />
+		<delete dir="${temp.folder}/@dot.src" /-->
+	</target>
+
+	<target name="build.jars" depends="init">
+		<available property="@dot" file="${build.result.folder}/@dot" />
+		<antcall target="@dot" />
+	</target>
+
+	<target name="src.zip" depends="init" unless="src.zip">
+		<mkdir dir="${build.result.folder}/" />
+		<antcall target="copy.${swt.ws}.src"/>
+		<zip zipfile="${build.result.folder}/src.zip">
+			<fileset dir="${temp.folder}/@dot.src" includes="**/*.java"/>
+			<fileset dir="${temp.folder}/@dot.src" includes="**/*.properties"/>
+			<fileset    dir="${temp.folder}/@dot.src/library/" excludes="**/*.sh"/>
+			<zipfileset dir="${temp.folder}/@dot.src/library/" includes="**/*.sh" filemode="755"/>
+			<fileset dir="${temp.folder}/@dot.src" includes="**/version.txt"/>
+			<fileset dir="${basedir}" includes="about.html,about_files/"/>
+		</zip>
+		<delete dir="${temp.folder}/@dot.src"/>
+	</target>
+
+	<target name="copy.src" depends="init">
+		<antcall target="copy.${swt.ws}.src"/>
+		<copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
+			<fileset dir="${temp.folder}/@dot.src" includes="**/*.java"/>
+			<fileset dir="${temp.folder}/@dot.src" includes="**/*.properties"/>
+			<fileset dir="${temp.folder}/@dot.src/library/"/>
+			<fileset dir="${temp.folder}/@dot.src" includes="**/version.txt"/>
+			<fileset dir="${basedir}" includes="about.html,about_files/"/>
+		</copy>
+		<delete dir="${temp.folder}/@dot.src"/>
+	</target>
+
+	<target name="copy.carbon.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/carbon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/carbon/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+			
+	<target name="copy.cocoa.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/cocoa/" excludes="**/*.extras"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/cocoa/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+
+	<target name="copy.gtk.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/cairo/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/cde/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT WebKit/gtk/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+		
+	<target name="copy.motif.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/cairo/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tabfolder"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/motif_gtk/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/cde/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/motif/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+										
+	<target name="copy.photon.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/graphics/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/coolbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/textlayout/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tray/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/treetable/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/expand/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/photon/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+													
+	<target name="copy.win32.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OLE Win32/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/win32/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+
+	<target name="copy.wpf.src">
+		<property name="copy.src.dir" value="${temp.folder}/@dot.src"/>
+		<delete dir="${copy.src.dir}" quiet="true"/>
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" excludes="**/*._properties"/>
+			<fileset dir="${plugindir}/Eclipse SWT/wpf/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/datetime/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/bidi/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/tooltip/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/ime/"/>
+			<fileset dir="${plugindir}/Eclipse SWT/emulated/taskbar/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Accessibility/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT AWT/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Browser/forms/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Custom Widgets/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Drag and Drop/wpf/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common_j2se/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/wpf/"/>
+			<fileset dir="${plugindir}/Eclipse SWT PI/wpf_win32/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Printing/wpf/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Program/wpf/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Theme/emulated/"/>
+			<fileset dir="${plugindir}/Eclipse SWT Effects/emulated/"/>
+		</copy>
+		<antcall target="copy.translationfiles"/>
+		<antcall target="replace64"/>
+	</target>
+
+	<target name="copy.translationfiles" if="includetranslationfiles">
+		<copy todir="${copy.src.dir}" failonerror="true" overwrite="true">
+			<fileset dir="${plugindir}/Eclipse SWT/common_j2se/" includes="**/*._properties"/>
+			<mapper type="glob" from="*._properties" to="*.properties" />
+		</copy>
+	</target>
+
+	<target name="is64">
+		<condition property="is64" value="true">
+			<or>
+				<equals arg1="${swt.arch}" arg2="x86_64"/>
+				<equals arg1="${swt.arch}" arg2="ia64"/>
+				<equals arg1="${swt.arch}" arg2="ppc64"/>
+				<equals arg1="${swt.arch}" arg2="s390x"/>
+			</or>
+		</condition>
+		<echo>Is64=${is64}</echo>
+	</target>
+		
+    <target name="replace64" depends="is64" if="is64">
+    	<echo>Converting java files to 64 bit</echo>
+    	<replace dir="${copy.src.dir}" includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
+    	<replace dir="${copy.src.dir}" includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/"/>
+    	<replace dir="${copy.src.dir}" includes="**/*.java" token="float /*double*/" value="double /*float*/"/>
+    	<replace dir="${copy.src.dir}" includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/"/>
+    </target>
+
+	<target name="build.sources" depends="init">
+		<available property="src.zip" file="${build.result.folder}/src.zip" />
+		<antcall target="src.zip" />
+	</target>
+
+	<target name="build.zips" depends="init">
+	</target>
+
+	<target name="gather.sources" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/${full.name}" />
+		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/${full.name}/" />
+		<copy todir="${destination.temp.folder}/${full.name}">
+			<fileset dir="${basedir}" includes="about.html,about_files/" />
+		</copy>
+	</target>
+
+	<target name="gather.individual.sources" depends="init">
+		<antcall target="copy.src" />
+		<copy todir="${destination.temp.folder}">
+			<fileset dir="${basedir}" includes="about.html,about_files/" />
+		</copy>
+	</target>
+
+	<target name="gather.logs" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/${full.name}" />
+		<copy file="${temp.folder}/@dot.bin${logExtension}" todir="${destination.temp.folder}/${full.name}/" />
+	</target>
+
+	<target name="publish.bin.parts" depends="init" if="p2.publish.parts">
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${build.result.folder}" />
+		</antcall>
+		<eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" />
+	</target>
+
+	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
+		<mkdir dir="${destination.temp.folder}/${full.name}" />
+		<copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
+			<fileset dir="${build.result.folder}/@dot" includes="**" />
+		</copy>
+		<copy todir="${destination.temp.folder}/${full.name}">
+			<fileset dir="${basedir}" includes="fragment.properties,about.html,about_files/,swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so,META-INF/" />
+		</copy>
+		<chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2,libcairo-swt.so" />
+		<eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" />
+		<antcall target="apitools.generation">
+			<param name="target.folder" value="${destination.temp.folder}/${full.name}"/>
+			<param name="projectLocation" value="${basedir}"/>
+			<param name="binary.folders" value="${build.result.folder}/@dot"/>
+			<param name="projectName" value="${full.name}"/>
+			<param name="extraSourceLocations" value="${basedir}/${plugindir}"/>
+			<param name="extraManifests" value="${basedir}/${plugindir}/META-INF/MANIFEST.MF"/>
+		</antcall>
+	</target>
+
+	<target name="swtdownload" depends="init">
+		<delete dir="${temp.folder}" />
+		<delete dir="${build.result.folder}/@dot" />
+		<mkdir dir="${temp.folder}/swtdownload/" />
+		<property name="includetranslationfiles" value="true" />
+		<antcall target="build.jars">
+			<param name="debug" value="true" />
+			<param name="jar.filename" value="swt-debug.jar" />
+		</antcall>
+		<jar jarfile="${build.result.folder}/swt-debug.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
+		<copy file="${build.result.folder}/swt-debug.jar" todir="${temp.folder}/swtdownload" />
+		<delete dir="${build.result.folder}/@dot" />
+		<antcall target="build.jars">
+			<param name="debug" value="false" />
+			<param name="jar.filename" value="swt.jar" />
+		</antcall>
+		<jar jarfile="${build.result.folder}/swt.jar" basedir="${basedir}" update="true" includes="swt*.dll,libswt*.so,libswt*.sl,libswt*.a,libswt*.jnilib,libXm.so.2" />
+		<copy file="${build.result.folder}/swt.jar" todir="${temp.folder}/swtdownload" />
+		<antcall target="build.sources" />
+		<copy file="${build.result.folder}/src.zip" todir="${temp.folder}/swtdownload" />
+		<copy file="${plugindir}/build/.project" todir="${temp.folder}/swtdownload" />
+		<copy file="${plugindir}/build/.classpath" todir="${temp.folder}/swtdownload" />
+		<copy todir="${temp.folder}/swtdownload">
+			<fileset dir="${basedir}" includes="about.html,about_files/" />
+		</copy>
+		<condition property="zipfilename" value="swt-${buildid}-${swt.ws}-${swt.os}-${swt.arch}.zip" else="swt-${buildid}-${swt.ws}-${swt.os}.zip">
+			<isset property="swt.arch"/>
+		</condition>
+		<zip zipfile="${destination}/${zipfilename}">
+			<zipfileset dir="${temp.folder}/swtdownload/" />
+		</zip>
+		<delete dir="${temp.folder}" />
+	</target>
+
+	<target name="clean" depends="init">
+		<delete dir="${build.result.folder}/@dot" />
+		<delete file="${build.result.folder}/src.zip" />
+		<delete file="${plugin.destination}/${full.name}.jar" />
+		<delete file="${plugin.destination}/${full.name}.zip" />
+		<delete dir="${temp.folder}" />
+	</target>
+
+	<target name="refresh" depends="init" if="eclipse.running">
+		<eclipse.refreshLocal resource="${fragment}" depth="infinite" />
+	</target>
+
+	<target name="zip.plugin" depends="init">
+		<delete dir="${temp.folder}" />
+		<mkdir dir="${temp.folder}" />
+		<antcall target="build.jars" />
+		<antcall target="build.sources" />
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${temp.folder}/" />
+		</antcall>
+		<antcall target="gather.sources">
+			<param name="destination.temp.folder" value="${temp.folder}/" />
+		</antcall>
+		<delete>
+			<fileset dir="${temp.folder}" includes="**/*.bin.xml" />
+		</delete>
+		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" />
+		<delete dir="${temp.folder}" />
+	</target>
+
+	<target name="jar.plugin" depends="init">
+		<delete dir="${temp.folder}" />
+		<mkdir dir="${temp.folder}" />
+		<antcall target="build.jars" />
+		<antcall target="gather.bin.parts">
+			<param name="destination.temp.folder" value="${temp.folder}/" />
+		</antcall>
+		<jar jarfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="true" manifest="${basedir}/META-INF/MANIFEST.MF"/>
+		<delete dir="${temp.folder}" />
+	</target>
+
+	<target name="apitools.generation" if="generateAPIDescription">
+		<apitooling.apigeneration
+			projectName="${projectName}"
+			project="${projectLocation}"
+			binary="${binary.folders}"
+			target="${target.folder}"
+			extraManifests="${extraManifests}"
+			extraSourceLocations="${extraSourceLocations}"/>
+	</target>
+</project>
diff --git a/eclipse/plugins/org.eclipse.swt/buildnotes_swt.html b/eclipse/plugins/org.eclipse.swt/buildnotes_swt.html
index 01e5ece..3f75030 100644
--- a/eclipse/plugins/org.eclipse.swt/buildnotes_swt.html
+++ b/eclipse/plugins/org.eclipse.swt/buildnotes_swt.html
@@ -11,9455 +11,570 @@
 Eclipse Platform Build Notes<br>
 SWT</h1>
 
-<h2>SWT Build 3557f - Wednesday February 03, 2010</h2>
+<h2>SWT Build 3659b - Saturday February 05, 2011</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2010-01-19+23%3A15%3A25+%2B0000;chfieldto=2010-02-02+22%3A39%3A26+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2011-02-01+22%3A26%3A19+%2B0000;chfieldto=2011-02-04+15%3A10%3A24+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557e - Wednesday January 20, 2010</h2>
+<h2>SWT Build 3659a - Wednesday February 02, 2011</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2010-01-12+22%3A53%3A06+%2B0000;chfieldto=2010-01-19+23%3A12%3A28+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2011-01-19+00%3A04%3A38+%2B0000;chfieldto=2011-02-01+22%3A19%3A51+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557d - Wednesday January 13, 2010</h2>
+<h2>SWT Build 3659 - Wednesday January 19, 2011</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2010-01-05+21%3A52%3A02+%2B0000;chfieldto=2010-01-12+22%3A50%3A21+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2011-01-04+23%3A03%3A21+%2B0000;chfieldto=2011-01-18+23%3A58%3A17+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557c - Wednesday January 06, 2010</h2>
+<h2>SWT Build 3657d - Wednesday January 05, 2011</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-12-15+19%3A55%3A04+%2B0000;chfieldto=2010-01-05+21%3A49%3A24+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-11-30+22%3A56%3A44+%2B0000;chfieldto=2011-01-04+22%3A57%3A10+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557b - Wednesday December 16, 2009</h2>
+<h2>SWT Build 3657c - Wednesday December 01, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-12-01+21%3A05%3A00+%2B0000;chfieldto=2009-12-15+19%3A52%3A31+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-11-23+23%3A42%3A51+%2B0000;chfieldto=2010-11-30+22%3A50%3A42+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557a - Wednesday December 02, 2009</h2>
+<h2>SWT Build 3657b - Wednesday November 24, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-11-17+22%3A18%3A40+%2B0000;chfieldto=2009-12-01+21%3A02%3A38+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-11-09+22%3A38%3A25+%2B0000;chfieldto=2010-11-23+23%3A36%3A49+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3557 - Wednesday November 18, 2009</h2>
+<h2>SWT Build 3657a - Wednesday November 10, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-11-10+19%3A54%3A59+%2B0000;chfieldto=2009-11-17+22%3A16%3A27+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-11-02+22%3A40%3A44+%2B0000;chfieldto=2010-11-09+22%3A32%3A32+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556f - Wednesday November 11, 2009</h2>
+<h2>SWT Build 3657 - Wednesday November 03, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-11-03+21%3A02%3A17+%2B0000;chfieldto=2009-11-10+19%3A52%3A49+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-10-12+21%3A32%3A08+%2B0000;chfieldto=2010-11-02+22%3A34%3A55+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556e - Wednesday November 04, 2009</h2>
+<h2>SWT Build 3656a - Wednesday October 13, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-10-29+20%3A37%3A39+%2B0000;chfieldto=2009-11-03+21%3A00%3A12+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-10-05+21%3A33%3A30+%2B0000;chfieldto=2010-10-12+21%3A26%3A32+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556d - Friday October 30, 2009</h2>
+<h2>SWT Build 3656 - Wednesday October 06, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-10-20+18%3A14%3A27+%2B0000;chfieldto=2009-10-29+20%3A35%3A37+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.2;chfieldfrom=2010-08-31+22%3A06%3A57+%2B0000;chfieldto=2010-10-05+21%3A27%3A52+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556c - Wednesday October 21, 2009</h2>
+<h2>SWT Build 3655c - Wednesday September 01, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-10-13+19%3A39%3A32+%2B0000;chfieldto=2009-10-20+18%3A12%3A32+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-08-25+16%3A33%3A57+%2B0000;chfieldto=2010-08-31+22%3A01%3A41+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556b - Wednesday October 14, 2009</h2>
+<h2>SWT Build 3655b - Thursday August 26, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-10-06+19%3A35%3A20+%2B0000;chfieldto=2009-10-13+19%3A37%3A39+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-08-24+21%3A30%3A23+%2B0000;chfieldto=2010-08-25+16%3A28%3A54+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556a - Wednesday October 07, 2009</h2>
+<h2>SWT Build 3655a - Wednesday August 25, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-09-29+20%3A47%3A51+%2B0000;chfieldto=2009-10-06+19%3A33%3A25+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-08-17+21%3A33%3A55+%2B0000;chfieldto=2010-08-24+21%3A25%3A18+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3556 - Wednesday September 30, 2009</h2>
+<h2>SWT Build 3655 - Wednesday August 18, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-09-16+16%3A20%3A08+%2B0000;chfieldto=2009-09-29+20%3A46%3A07+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-08-10+21%3A49%3A22+%2B0000;chfieldto=2010-08-17+21%3A35%3A43+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3555a - Thursday September 17, 2009</h2>
+<h2>SWT Build 3654 - Wednesday August 11, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-09-09+20%3A18%3A20+%2B0000;chfieldto=2009-09-16+16%3A18%3A26+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-07-27+22%3A34%3A26+%2B0000;chfieldto=2010-08-10+21%3A44%3A28+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3555 - Thursday September 10, 2009</h2>
+<h2>SWT Build 3653 - Wednesday July 28, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-08-26+14%3A40%3A14+%2B0000;chfieldto=2009-09-09+20%3A16%3A49+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-07-20+22%3A24%3A51+%2B0000;chfieldto=2010-07-27+22%3A29%3A45+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3554b - Thursday August 27, 2009</h2>
+<h2>SWT Build 3652a - Wednesday July 21, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-08-20+19%3A59%3A37+%2B0000;chfieldto=2009-08-26+14%3A38%3A48+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-07-14+02%3A57%3A10+%2B0000;chfieldto=2010-07-20+22%3A20%3A16+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3553 - Friday August 21, 2009</h2>
+<h2>SWT Build 3652 - Wednesday July 14, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-08-18+19%3A37%3A24+%2B0000;chfieldto=2009-08-20+19%3A58%3A17+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-07-06+23%3A59%3A37+%2B0000;chfieldto=2010-07-14+02%3A52%3A41+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3552b - Wednesday August 19, 2009</h2>
+<h2>SWT Build 3651 - Wednesday July 07, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-08-11+20%3A15%3A59+%2B0000;chfieldto=2009-08-18+19%3A36%3A07+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.6.1;chfieldfrom=2010-06-02+16%3A18%3A25+%2B0000;chfieldto=2010-07-06+23%3A55%3A15+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3552a - Wednesday August 12, 2009</h2>
+<h2>SWT Build 3650b - Thursday June 03, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-08-06+20%3A46%3A56+%2B0000;chfieldto=2009-08-11+20%3A14%3A42+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-31+21%3A36%3A12+%2B0000;chfieldto=2010-06-02+16%3A14%3A22+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3552 - Friday August 07, 2009</h2>
+<h2>SWT Build 3650a - Tuesday June 01, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-07-28+21%3A17%3A51+%2B0000;chfieldto=2009-08-06+20%3A41%3A14+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-26+21%3A15%3A32+%2B0000;chfieldto=2010-05-31+21%3A32%3A10+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3551b - Wednesday July 29, 2009</h2>
+<h2>SWT Build 3650 - Thursday May 27, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-07-21+19%3A46%3A10+%2B0000;chfieldto=2009-07-28;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-25+20%3A28%3A14+%2B0000;chfieldto=2010-05-26+21%3A11%3A33+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2>SWT Build 3551a - Wednesday July 22, 2009</h2>
+<h2>SWT Build 3649a - Wednesday May 26, 2010</h2>
 
 <blockquote>
-<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=3.5.1;chfieldfrom=2009-07-14+20%3A43%3A32+%2B0000;chfieldto=2009-07-21;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-20+20%3A34%3A55+%2B0000;chfieldto=2010-05-25+20%3A24%3A14+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h2> SWT Build 3.5 51 - Thursday July 14, 2009</h2>
-<blockquote>
-279313  TreeItem.removeAll incorrectly implemented on Mac platform  
-<br>275589  can't see text cursor after setting dark background color  
-<br>277315  Combo does not accept drag and drop  
-<br>279671  Preferences - PathEditor and DirectoryFieldEditor do not show all disk content on Mac OS X  
-<br>280921  Tree.select() sets selection instead of adding to selection  
-<br>283207  Plugin org.eclipse.swt.tests has a higher version in the Eclipse 3.4.2 release than the one in Eclipse 35  
-<br>283346  "Hide Eclipse" doesn't work properly  
-</blockquote>
-
-
-<h2> SWT Build 3.5 50a - Thursday June 04, 2009</h2>
-<blockquote>
-279042 Cocoa: top-level menus not updated as you switch between editors
-</blockquote>
-
-<h2> SWT Build 3.5 50 - Wednesday June 03, 2009</h2>
-<blockquote>
-277713 Crash (probably opening dialog with progress reporting in it) 
-</blockquote>
-
-<h2> SWT Build 3.5 49 - Tuesday May 26, 2009</h2>
-<blockquote>
-261206   Console view: Copy is disabled after double-click to select word
-<br>277442 	BlockSelection: Exception and crash while RTL orientation
-<br>277631 	Cannot move cursor after cancelling IME input by pressing escape key.
-<br>277268 	[Forms] section header labels are cut off on Gtk
-<br>277437 	[Cocoa] GC#drawText font background issue 
-</blockquote>
-
-<h2> SWT Build 3.5 48h - Monday May 25, 2009</h2>
-<blockquote>
-273570 Unable to create view ID org.eclipse.jdt.ui.PackageExplorer: An unexpected exception was thrown. in existing workspace only 
-</blockquote>
-
-<h2> SWT Build 3.5 48g - Thursday May 21, 2009</h2>
-<blockquote>
-276564    	Eclipse won't launch using JDK 7 because SWT native libraries don't load
-<br>277193 	Graphics drawing in unwanted places when scrolling bundles in a launch config
-<br>277235 	Accessibility Control Example ClassCastException
-<br>277285 	Cursor position does not change while typing in Japanese input method program
-<br>277314 	Cocoa - Application crashes while copying an image 
-</blockquote>
-
-<h2> SWT Build 3.5 48f - Wednesday May 20, 2009</h2>
-<blockquote>
-274925    	Drag view shows outline in wrong location with multiple monitors
-<br>276532 	Debug toolbar button glows, key bindings stop working
-<br>277173 	ToolItems and Buttons are not accessible on Cocoa (regression)
-<br>276485 	BlockSelection: copying block only fills with spaces when folding enabled
-<br>276506 	BlockSelection: Paste should end with long caret
-<br>276516 	BlockSelection: Arrow_Left and Arrow_Right should set caret to beginning/end of selection
-<br>276854 	BlockSelection: Shift+Click does not work with normal caret
-<br>276569 	Cocoa: exception gets logged when opening views while a detached view exists
-<br>277195 	FileDialog NPE's when attempting to upload an attachment with Mylyn
-<br>276531 	Selection jumps in tree
-<br>276553 	Cocoa: Menus completely gray after drag-and-drop to detached view 
-<br>277175	Accessibility - Console message printed when custom control has focus
-<br>277193 	Graphics drawing in unwanted places when scrolling bundles in a launch config
-</blockquote>
-
-<h2> SWT Build 3.5 48e - Tuesday May 19, 2009</h2>
-<blockquote>
-275935 	[babel] update NLS string files
-<br>276683 	Tree item icons drawn into next column
-<br>276760 	GC#drawRoundRectangle(..) draw too big radii on Cocoa
-<br>276826 	Compile warning in official build 
-</blockquote>
-
-<h2> SWT Build 3.5 48d - Monday May 18, 2009</h2>
-<blockquote>
-223703    	FileDialog.setOverwrite(boolean) does nothing on Cocoa
-<br>275945 	[clipboard] regression: pasting text from file properties to java editor seems to be in wrong format
-<br>275552 	Font loading slow for font that is not there (ie. 'Sans Serif')
-<br>275875 	crash: Cmd+Q only closes first shell in SnippetLauncher
-<br>276131 	Browser Test crashing 
-</blockquote>
-
-<h2> SWT Build 3.5 48b - Wednesday May 13, 2009</h2>
-<blockquote>
-275631	Ctrl+Tab key binding works incorrectly.
-<br>275913 	StyledText with block selection: Typing at virtual caret on empty line inserts char after caret
-</blockquote>
-
-<h2> SWT Build 3.5 48a - Monday May 11, 2009</h2>
-<blockquote>
-274925		Drag view shows outline in wrong location with multiple monitors
-</blockquote>
-
-<h2> SWT Build 3.5 48 - Friday May 8, 2009</h2>
-<blockquote>
-274274    	NPE in Accessible#removeAccessibleListener() if called from dispose listener
-<br>180176 	[OLE] [EditorMgmt] Strange behavior while opening default gif editor
-<br>236630 	[OLE] Saving docx file will corrupt the file and produce OLE exception
-<br>267884 	Select All does not work in TextEditor Example with block selection
-<br>270316 	[OLE] Failure save 2003 Word document with embedded Word 2007 editor
-<br>270495 	Improving performance of ImageData.blit and Image.init methods
-<br>270676 	StyledText : text selection stops when mouse cursor leaves the x-axis
-<br>273354 	Form Feed (\f) makes StyledText go crazy
-<br>274931 	StringIndexOutOfBoundsException in Program.getImageData(*)
-<br>275484 	OleClientSite#isDirty QueryInterface IIDIPersistFile but creates IPersistStorage
-<br>254861 	Gtk SWT should set window type hint for SWT.BALLOON tooltips
-<br>262981 	GC#drawText could use data.stringWidth and data.stringHeight
-<br>275459 	Test failures in GC on I20090507-2000
-<br>253230 	Implement preferred size for scrolled widgets (text, tree, table ...)
-<br>269198 	[Browser-IE] Cannot register a function for the whole browser's lifetime.
-<br>271029 	No menu bar items with Mozilla Browser (XULRunner 1.9.0.7)
-<br>272401 	[browser] [KeyBindings] copy and paste key bindings not working in embedded browser
-<br>275207 	[Browser] crash when showing text entry prompter
-<br>252109 	[Clipboard] Mac: When you copy text to the clipboard from a StyledText widget, the text uses the wrong end-of-line sequence
-<br>266172 	Shell setFullScreen not implemented
-<br>274120 	Update progress bar from UI thread does not work on Cocoa
-<br>274141 	[content assist] Additional info of newly selected proposal not shown
-<br>275220 	Printing java file causes crash
-<br>273099 	Save As.. dialog is not seeded with selection's file name
-<br>273953 	[carbon] DeviceResourceException on certain images
-<br>274001 	Rollover tooltips for all truncated tree and table items
-<br>274161 	Cannot create circular Shell on Cocoa
-<br>274273 	Accessibility - Window not allowing programatic reposition or resize
-<br>274385 	Control-click for context menu loses multi-selection
-<br>274387 	Old dragging behavior when tree/table item is not selected
-<br>165033 	Table vertical lines always showing 
-</blockquote>
-
-<h2> SWT Build 3.5 47 - Tuesday May 5, 2009</h2>
-<blockquote>
-274890  SWT crash  
-<br>274931  StringIndexOutOfBoundsException in Program.getImageData(*)  
-<br>245278  [DateTime] ignores User's keyboard input  
-<br>274271  SHEET Javadoc issues  
-<br>274655  Build Cairo on Solaris SPARC  
-<br>274696  Checkbox Tree wastes a lot of space beween box and item  
-</blockquote>
-
-<h2> SWT Build 3.5 46 - Monday May 4, 2009</h2>
-<blockquote>
-273661  [KeyBindings] copy/paste doesn't always work in dialogs  
-<br>274230  Using content assist in the new Java class wizard crashes the VM  
-<br>273688  N20090424-2000 swt contains 3542.dll but wants 3543  
-<br>264560  hard crash upon opening internal browser on mac  
-<br>250501  Control.print(GC) does not work correctly  
-<br>274409  tag projects changed since I20090421-0930 build - swt  
-<br>274295  Did you mean "image/jpeg"?  
-<br>165251  Not enough information in Calendar control's SelectionEvent  
-<br>259028  Implement AWT/Swing interop  
-<br>274538  Shells with SWT.SHEET do not hide with setVisible(false) (only when disposed)  
-<br>274188  create caret from image does not work  
-<br>274302  Nested GridLayouts cut content if inner grabs vertical space  
-<br>274169  drawing problem after inserting Bullet into StyledText  
-<br>274529  All build.xml files must be updated to get the .api_description file  
-<br>274344  [64] [DND] Snippet282 crashes  
-<br>274194  FocusEvents and Control#isFocusControl() don't match up  
-</blockquote>
-
-<h2> SWT Build 3.5 45 - Wednesday April 29, 2009</h2>
-<blockquote>
-165251 	Not enough information in Calendar control's SelectionEvent
-<br>250501 	Control.print(GC) does not work correctly
-<br>264560    	hard crash upon opening internal browser on mac
-<br>272276 	DBCS3.5:Selecting korean text and right clicking on eclipse editor results in deletion of those characters.
-<br>274409	tag projects changed since I20090421-0930 build - swt
-</blockquote>
- 
-<h2> SWT Build 3.5 44 - Monday April 27, 2009</h2>
-<blockquote>
-52789    	DCR: No pageOrientation in PrintData?
-<br>135638 	StyledText ignores alignment with style SWT.SINGLE
-<br>159465 	Accessibilities: Improve traverse order for SWT ToolBar
-<br>268529 	SWT.Error when using mouse click cell editor activation
-<br>272412 	Checkboxes with images have incorrect image alignment
-<br>273492 	[Mac] Test failure in Bug43610Test.testShiftAlt on Cocoa
-<br>273521 	Toolbar: tooltip shows at 0,0 when hot item moved by key with mouse over item
-<br>273631 	Second call to fillRectangle/fillOval uses black background instead of the declared one
-<br>273635 	Command+click to deselect one of a multi-selection doesn't work
-<br>273919 	getOffset(int,int,int[]) fails for empty lines ("\n")
-<br>273925 	Advice to p2 metadata generation
-<br>273939 	toolitems can't be traversed when the toolbar has tabitem siblings 
-</blockquote>
-
-<h2> SWT Build 3.5 43 - Sunday April 26, 2009</h2>
-<blockquote>
-23618    	Printing - copyCount field in PrinterData is useless
-<br>52789 	DCR: No pageOrientation in PrintData?
-<br>254497 	traverser always happen to all controls
-<br>268529 	SWT.Error when using mouse click cell editor activation
-<br>271310 	[Presentations] BIDI3.5:HCG_Wrong repaint of mirrored windows on linux
-<br>271384 	Safari - Open Link in New Window does not load link in new window
-<br>271691 	outline not implemented in Path.contains
-<br>271726 	DBCS3.5: Java Editor can not copy DBCS correctly into WordPad
-<br>272046 	clipping of PaintItem events for Trees is inconsistent across platforms
-<br>272212 	Add Solaris x86 build support
-<br>272412 	Checkboxes with images have incorrect image alignment
-<br>272833 	Context menus outdated on right-click because MenuDetect fires before Selection event
-<br>272834 	Rollover tooltips on every Tree and Table item
-<br>272835 	Rollover tooltips wrongly placed on Tree and Table items with images
-<br>273083 	Create a MessageBox with SWT.SHEET style gives 2 apple menus
-<br>273095 	Can't insert characters into a StyledText using the Character Palette on OS X
-<br>273117 	BlockSelection: setBlockSelectionRectangle should not clamp selection width to renderer width if client area allows a larger selection
-<br>273256 	Cleanup duplicated string in properties files
-<br>273280 	Link widget does not handle single quote (') for href attribute
-<br>273521 	Toolbar: tooltip shows at 0,0 when hot item moved by key with mouse over item 
-</blockquote>
-
-<h2> SWT Build 3.5 42 - Tuesday April 21, 2009</h2>
-<blockquote>
-182753    	[Browser] SWT Browser does not reload images when they change
-<br>222783 	[Table & Tree] Cocoa moveable columns do not work
-<br>239556 	[Java Editor]Space character is NOT displayed after a Korean character
-<br>253056 	BlockSelection: add get/setBlockSelectionRectangle to StyledText
-<br>261391 	StyledText should use PDE API Tools @noextend
-<br>267038 	[expressions] Edit watch expression action is never enabled
-<br>267680 	embedded browser cache does not reset
-<br>269566 	mylyn - two tooltips in task list
-<br>270176 	main shell unresponsive after a dialog was opened while shell minimized
-<br>271179 	findProgram("a.null and void") returns Text Edit instead of null
-<br>271726 	DBCS3.5: Java Editor can not copy DBCS correctly into WordPad
-<br>272075 	Spaces/Tabs are not added after multibyte characters in Java Class.
-<br>272156 	NPE in Display.applicationDelegateProc(..) when creating display
-<br>272259 	NPE in Display.runAsyncMessages(..) on quit
-<br>272592 	Issues with PNG images on Cocoa
-<br>272616 	GB18030: 4-byte GB18030 displayed as ? in SWT Clipboard RTFTransfer.
-<br>272631 	SWT error when initializing GC
-<br>272710 	transparent png has black background
-<br>272808 	XULRunner doesn't work in Eclipse >= 3.5M6
-<br>272827 	CCE in Text.getLineHeight()
-<br>272868 	Explicit class pre-initialization breaks "new Display()" on motif 
-</blockquote>
-
-<h2> SWT Build 3.5 40 - Tuesday April 14, 2009</h2>
-<blockquote>
-188320    	Possible Deadlock in JFace ModalContext
-<br>253229 	Implement SWT.Settings for Display
-<br>259687 	[Browser] Javascript executes asynchronously with xulrunner 1.9
-<br>263508 	Click and drag behavior in Tables and Trees different from other Cocoa apps
-<br>267507 	Progress bar in progress view shines through fast view
-<br>269924 	SWT Text Control getCaretLocation returns NULL for Style SWT.MULTI
-<br>270036 	UI Test Suite does not run to completion.
-<br>270280 	Debug test suite crashes on cocoa
-<br>270382 	Drag and drop to Tree does not update cursor
-<br>270954 	Eclipse crashes when trying to print code with a scale different from 100%.
-<br>271088 	VM crash starting with N20090402-2000
-<br>271336 	Test failures on Mac OS
-<br>271634 	[cocoa] Display loads hardcoded english nib file
-<br>271677 	context menu widget disposed exception
-<br>271697 	Shell print(GC) not implemented
-<br>271904 	Checkbox takes too much space to the right 
-</blockquote>
-
-<h2> SWT Build 3.5 40 - Tuesday April 7, 2009</h2>
-<blockquote>
-185204    	[CTabFolder] CTabItem.drawClose could preserve color
-<br>226973 	On Linux, TableColumn#getWidth() sometimes incorrectly returns 0.
-<br>239477 	Crash in ScriptStringOut
-<br>240033 	[Viewers] 'Dialog refresh' has encountered a problem
-<br>246408 	Parent Composite gets MouseEntered event when mouse enters a control
-<br>262694 	[e3.5][mac] Add CC text field content assist doesn't work
-<br>269383 	Compiler warnings in N20090318-2000
-<br>270179 	MouseHover event always has empty stateMask
-<br>270381 	Drag and drop to Tree does not show drop target selection feedback
-<br>270406 	CTabFolder.setBackground(Image) should be deleted
-<br>270544 	caret line highlight leaves screen artifacts
-<br>270654 	Scale does not fire selection events
-<br>270663 	Combo.select() causes SelectionEvent
-<br>270670 	CTabFolder should not cache borderColor
-<br>270858 	Display.post failing in test suite
-<br>270861 	[Browser] don't use InitXPCOM2 to initialize xulrunner
-<br>270880 	Combo does not fire SWT.Modify immediately on select(int)
-<br>271017 	Compiler warnings in N20090401-2000
-<br>271026 	"Quick Type Hierarchy" window briefly appears, then disappears.
-<br>271027 	Failure in JFace test suite related to virtual table
-<br>271129 	Changes from 240033 causes java.lang.UnsatisfiedLinkError at org.eclipse.swt.internal.gtk.OS.g_object_notify
-<br>271340 	Region.contains always returns false on MacOS Cocoa port (3.5M6) 
-</blockquote>
-
-
-<h2> SWT Build 3.5 39 - Tuesday March 31, 2009</h2>
-<blockquote>
-136515    	[OpenGL] Support shared context for GLCanvas
-<br>213194 	[Browser] setText crash with xulrunner 1.9 stream
-<br>222863 	No horizontal scrollbars in List
-<br>242388 	[FastView] Unhandled event loop exception: NPE in ToolBarManager.update
-<br>251608 	Artificial bold and italic style to font
-<br>255070 	cocoa_new() functions leaking?
-<br>267126 	SWTException evaluating JS with Sarfari
-<br>267276 	NPE in tooltip code
-<br>268181 	Screen cheese after switching compare provider
-<br>268702 	[CellEditors] Selecting a cell erases the other cells on Mac OSX Cocoa
-<br>268724 	TRAVERSE_PAGE_NEXT events don't get through StyledText
-<br>269606 	Wrong default new text line delimiter on Mac/Cocoa
-<br>269950 	Combo.setText does nothing in read-only mode
-<br>270140 	MessageDialog spews warning on gtk 2.4.13
-<br>270177 	SWT - DateTime component is broken on MAC cocoa 64 bits.
-<br>270262 	Leaks in ToolTip
-<br>270379 	Main menu is not closed when dialog opens asynchronously
-<br>270500 	[mac] TrayItem menus should be drop downs rooted to the menu bar (COCOA) 
-</blockquote>
-
-<h2> SWT Build 3.5 38 - Tuesday March 24, 2009</h2>
-<blockquote>
-210871    	Toolbar combo box multiple glitches
-<br>213185 	DropTargetEvent does not mention DND.DROP_DEFAULT
-<br>251608 	Artificial bold and italic style to font
-<br>253065 	Window -> Show View -> Other ... is broken
-<br>253217 	Implement GC.copyArea()
-<br>253226 	Implement widget attributes (foreground, background, font, background image)
-<br>257003 	SWT controls: discrepancy in the application of Background Image
-<br>259027 	Implement internationalization
-<br>262694 	[e3.5][mac] Add CC text field content assist doesn't work
-<br>264744 	Display.post() not implemented
-<br>265990 	[website] Please provide visibility for swtbot on the swt home page
-<br>266171 	Text getCaretLocation not implemented.
-<br>266200 	Vuze menu says "About SWT"
-<br>267468 	[SWT_AWT] Browser.print(GC) flickers
-<br>267894 	computeSize of Tree/Table is wrong
-<br>267895 	StyledText block selection: cut & paste should give original text
-<br>268584 	update swt custom build scripts to support new publishing task
-<br>268649 	image not shown in check and radio buttons
-<br>268745 	StyledText makes CTabFolder send same KeyDown event multiple times
-<br>268853 	cannot programmatically collapse item whose parent is collapsed
-<br>268958 	Null pointer exception in thread "Help Browser UI" when PDF files opened from Help Content of plug-in
-<br>269010 	ModifyListener isn't working for Combo
-<br>269031 	Exception in Image running junit tests
-<br>269106 	SWT test suite does not call readAndDispatch
-<br>269305 	Path#addString baseline aligning
-<br>269506 	[Browser] JS->Java call can crash due to freeing of args
-<br>269533 	StyledText sometimes doesn't scroll far enough to show caret if moved via left-key to EOL
-<br>269599 	Compiler warnings in N20090320-2000
-<br>269717 	TextEditor walkback if you decrease font twice 
-</blockquote>
-
-<h2> SWT Build 3.5 37 - Tuesday March 17, 2009</h2>
-<blockquote>
-244597    	Cannot activate shell programatically on gtk
-<br>236630 	[OLE] Saving docx file will corrupt the file and produce OLE exception
-<br>267176 	Path#addString() not working with custom font
-<br>266335 	rssowl: controls are clipped
-<br>266203 	Vuze find icon flipped
-<br>267717 	New element not revealed
-<br>253060 	Preference dialog flickers
-<br>268303 	Tree#getItem(Point) should not return item if point is on twistie
-<br>252416 	SWT.HIDE_SELECTION doesn't work on Table
-<br>256998 	TabFolder control: default size not displaying correctly
-<br>262985 	Scrollbar dancing in DebugView
-<br>267886 	cocoa: multiple command q opens multiples confirm dialogs
-<br>268389 	Null pointer resizing fast view
-<br>267174 	Device#loadFont() not implemented
-<br>268217 	no KeyDown event for Help key
-<br>267450 	Mylyn task list draws icons in wrong spot
-<br>196884 	[OpenGL] GLCanvas doesn't work on Vista
-<br>194887 	Eclipse actions are not executed in embedded awt component
-<br>267129 	Content assist shells movable when clicking on scrollbar thumb
-<br>253214 	Using 'SWT.YES | SWT.NO' on a MessageBox shows Yes/No instead of No/Yes
-<br>268543 	Test_org_eclipse_swt_graphics_Cursor leaks a Cursor
-<br>226356 	[patch] Build against xulrunner
-<br>268613 	Should call NSOutlineView.initWithFrame instead of init()
-<br>253075 	[misc] No object:text-changed:insert events fired for method completion (and others)
-<br>261228 	fix doc for SWT.SEARCH
-<br>267466 	[SWT_AWT] Browser.print(GC) should not use AWT component ancestor clip
-<br>268787 	OS: uninitialized TCHAR sizeof value usage
-<br>268410 	Typing text in Spinner does not change value
-<br>267405 	event detail wrong on scrollbar selection events
-<br>268307 	Twistie in Tree does not give feedback on mouseDown with DragDetect listener
-<br>268732 	Typo in field name in carbon
-</blockquote>
-
-<h2> SWT Build 3.5 36b - Wednesday March 11, 2009 (1300)</h2>
-<blockquote>
-267450    	Mylyn task list draws icons in wrong spot
-<br>268112 	Combo getListVisible missing
-</blockquote>
- 
-<h2> SWT Build 3.5 36a - Wednesday March 11, 2009 (0010)</h2>
-<blockquote>
-266578    	Crash in TextLayout.computeRuns()
-<br>267752 	Not calling init when creating SWTSearchField
-<br>267841 	MessageBox#open() always returns SWT.CANCEL
-<br>267913 	Display#getLastEventTime () not right 
-</blockquote>
-
-<h2> SWT Build 3.5 36 - Monday March 9, 2009 (1700)</h2>
-<blockquote>
-257830    	CompareDialog doesn't get focus when launching it from wizard on MacOSX
-<br>265339 	Update the build JRE used on AIX
-<br>265947 	[Browser] events not reusable outside org.eclipse.swt.browser pkg
-<br>267103 	Text Fields too big
-<br>267516 	Tree tries to show multiple lines of text in items 
-</blockquote>
-
-<h2> SWT Build 3.5 35 - Sunday March 8, 2009</h2>
-<blockquote>
-25612    	Printing: Print dialog properties are not remembered between print jobs
-<br>56342 	StyledText should allow to set margins
-<br>109849 	Mac Window Modified on Shell
-<br>171706 	DateTime should support drop-down calendar
-<br>199809 	Existing Snippet Does Not Function as Expected
-<br>223590 	Browser.print(GC) should not use ancestor clip
-<br>254498 	expander touches the image in treeitem
-<br>255000 	[Browser] Provide API to handle authentication challenges properly
-<br>256054 	[Cocoa] Implement Space bar toggle for checkboxes
-<br>261548 	Weird focus
-<br>261699 	version of org.eclipse.swt.motif.hpux.PA_RISC in maintenance stream is lower than the one in 3.4
-<br>262501 	M5 got slower since last week
-<br>265568  [Cocoa] Single-clicking to select a CCombo choice from the drop-down has no effect 
-<br>266011 	Unable to click in Shell
-<br>266330 	rssowl: read news item headers look the same as unread ones
-<br>266370 	CCombo not dismissing popups 
-<br>266385 	Mylyn notifications don't close properly
-<br>266387 	Tab traversal of mylyn bug editor broken
-<br>266402 	System beep on Command+F6, F6, F6,... 
-<br>266405 	Ctrl+Tab traversal broken with traverse listener
-<br>266549 	Scrollbar cheese and autoscroll behavior in debugger
-<br>266828 	getCharCount() in Combo throws NullPointerException
-<br>266883 	Lots of cheese in StyledText running ppc cocoa
-<br>266934 	Display.getDismissalAlignment() should honor "gtk-alternative-button-order"
-<br>266956 	CCE in Combo.updateBackground(...)
-<br>267064 	[cocoa][mac] task list collapse all button has white background
-<br>267098 	[SWT] add @see SWT#TOOL to Shell constructor javadocs
-<br>267104 	Canvas' region not applied to scroll bars
-<br>267138 	CCombo popup doesn't scroll with CCombo 
-<br>267179 	Ctrl+Y for undo on Carbon
-<br>267196 	[mylyn] Open png attachment in browser causes editor tabs to disappear
-<br>267270 	NPE in Composite.nextValidKeyView
-<br>267283 	HEAD crashes
-<br>267405 	event detail wrong on scrollbar selection events 
-</blockquote>
-
-<h2> SWT Build 3.5 34 - Tuesday March 3, 2009</h2>
-<blockquote>
-240657    	Combo.setText() doesnt set the text if the string is a substring of the strings in combo
-<br>253071 	Breadcrumb menu flickers badly
-<br>253075 	[misc] No object:text-changed:insert events fired for method completion (and others)
-<br>258954 	org.eclipse.swt/.project should not use path variable WORKSPACE
-<br>261732 	progress does not animate if create before Shell.open()
-<br>262417 	Search text only shows the after 2 chars have been entered
-<br>263620 	Listeners added to CTabFolder#addTraverseListener(..) cannot block default traversal
-<br>264342 	Text field truncated
-<br>265481 	[Cocoa] Squiggles/underlines are displayed too close to text
-<br>265604 	popup shells quickly show title bar
-<br>265652 	Need Text.setMessage without side-effects
-<br>265897 	Text throws exceptions and doesn't display bullets in Mylyn task repository setup
-<br>265940 	Cannot input T-Chinese chars in Java Editor
-<br>266180 	keyUp not delivered if command key is down
-<br>266206 	Code assist popup has cheese initial items
-<br>266213 	Hung GUI when comparing with another branch
-<br>266344 	Table/Tree check boxes show intermediate state
-<br>266370 	CCombo not dismissing popups
-<br>266373 	Single line text doesn't scroll as you type
-<br>266407 	Foreground color in Table/Tree should not be drawn for selected active items
-<br>266409 	[SWT] FontData.toString() optimization
-<br>266475 	Control#setBackgroundImage() does not work
-<br>266499 	IME broken on cocoa
-<br>266625 	StyledText computeSize() answering slightly short width when SWT.WRAP, causes missing text 
-</blockquote>
-
-<h2> SWT Build 3.5 33 - Tuesday February 24, 2009</h2>
-<blockquote>
-252251    	Can't create multiple Displays in same application
-<br>259181 	SWT Cocoa: Text.setEchoChar() doesn't work
-<br>259457 	swt tray icon disappears on gnome panel restart - gtk
-<br>262651 	Crash on Cocoa
-<br>262968 	bad scrolling of maximized editor
-<br>262978 	jumpness in quick outline
-<br>262985 	Scrollbar dancing in DebugView
-<br>263518 	[cocoa] Incorrect colors for eclipse views in 3.5m5
-<br>263663 	[Keybindings]Ctrl-A/Ctrl-E ignored in Cocoa SWT
-<br>263824 	Enabled or disabled link widget looks the same in Cocoa
-<br>263999 	[cocoa 64 bits]Key bindings not working well for three combinations
-<br>264399 	[DND] A deadlock occurs during automated testing of a SWT application on Linux/GTK/x86_64
-<br>264425 	SashForm doesn't display tooltip text on its Sashes
-<br>264694 	[cocoa] Line numbers from editor bleed through to fast-view search view after search-replace
-<br>265188 	Refactor rename popup (border is black and bottom is missing)
-<br>265326 	next annotation short cut (command+.) broke
-<br>265338 	NPE in Control.keyDown(...)
-<br>265393 	View menus open again after dialog is closed
-<br>265427 	Editor/View switcher: 1 key press forwards by 3 items
-<br>265603 	ToolItem#setToolTipText(..) should not render mnemonic character (&)
-<br>265668 	Text#setMessage(..) should force redraw 
-</blockquote>
-
-<h2> SWT Build 3.5 32 - Tuesday February 17, 2009</h2>
-<blockquote>
-257188    	Regression from 3.3.2 behaviour, no SWT.Activate event is sent when setFocus() is called on child controls
-<br>259457 	swt tray icon disappears on gnome panel restart - gtk
-<br>262968 	bad scrolling of maximized editor
-<br>263563 	[cocoa] Icon mask problem in dialog help
-<br>263663 	[Keybindings]Ctrl-A/Ctrl-E ignored in Cocoa SWT
-<br>263971 	code inconsistency in Spinner
-<br>263999 	[cocoa 64 bits]Key bindings not working well for three combinations
-<br>264212 	Link.setForeground() overrides disable color set in Link.enableWidget()
-<br>264368 	Cursor keep changing from arrow to text cursor
-<br>264553 	Shell.open() does not make window key if it's already visible
-<br>264694 	[cocoa] Line numbers from editor bleed through to fast-view search view after search-replace
-<br>264703 	should DND set cursors?
-<br>264705 	ArrayStoreException in TextLayout running 64 bit
-<br>264714 	drawing to Image can fail
-<br>264755 	SashForm cursor weirdness on Mac OSX Cocoa
-<br>264764 	Table, Tree, List send DefaultSelection when double-click in header 
-</blockquote>
-
-<h2> SWT Build 3.5 31 - Tuesday February 10, 2009</h2>
-<blockquote>
-213305    	100% cpu usage on opening files with long lines.
-<br>223703	FileDialog.setOverwrite(boolean) does nothing on Cocoa
-<br>234240	Group alpha should not be 0.25 if background color set
-<br>245266	Upside down table
-<br>247444 	[DND] NavigatorDnDService does not update DragSource Transfer if invalid
-<br>248796	[DND] Cannot drag and drop files between the Finder (ie. Cocoa and Carbon apps)
-<br>252067	expanding tree item spews "unlockFocus" error message
-<br>252279	Group foreground and background color don't work
-<br>256267	Tab text gets underlined unexpectedly when trying to close tab
-<br>256940	Popup menus: unexpected appearance of application context menus
-<br>260514	Resizing columns on virtual tables does not always update horizontal scroll bar
-<br>262867	Text Editor doesn't show selected string correctly in Japanese inline editor
-<br>262922	Cursor jumps to top right corner of screen on drag of trim element
-<br>262955	URLTransfer is missing @since 3.4 tag
-<br>263085	Focused javadoc windows stick to the cursor
-<br>263529 	[cocoa] Incorrect file paths when opening .html files in an external browser
-<br>263530	NPE disabling multi-line Text
-<br>263603	Tooltip should not render mnemonic indicator (&) on Cocoa
-<br>263656	Cannot select tree item
-<br>263664	Tree.showItem() may not reveal children of non-expanded items
-<br>263677	Tree does not always fully expand in debugger
-<br>263824	Enabled or disabled link widget looks the same in Cocoa
-<br>263967	Spinner is missing getText() method
-<br>263969	Spinner doesn't support negavite minimum value
-<br>264003	Exception in Combo.dragDetect()
-<br>264019	Hover not working while the mouse is down. 
-<br>264128  [cocoa] Trees do not render text on them
-</blockquote>
-
-<h2> SWT Build 3.5 30 - Tuesday February 3, 2009</h2>
-<blockquote>
-248400  Backspace doesnot work flash files viewed in SWT browser when eclipse is minimised and restored
-<br>250575 	File -> Switch Workspace -> Other... does not work the first time.
-<br>258727 	CTabFolder should not select an item unless the first button has been pressed
-<br>260761 	Need a Cocoa runloop observer for async messages
-<br>262451 	CCombo in TreeEditor truncates in Vista
-<br>262651 	Crash on Cocoa
-<br>262681 	isFocusControl incorrect
-<br>262700 	Drag feedback image draws above cursor when dragging a Label
-<br>262702 	Crash on second drag of checkbox
-<br>262767 	[perfs] Possible regression for "Draw on a window" perf test
-<br>262778 	disposed widget in Control Example Menu tab
-<br>262866 	CCombo is too tall (vertical height)
-<br>262888 	GTK-BIDI: Mirrored drawText background has wrong size
-<br>262939 	Update Snippet195
-<br>262970 	Drag is too eager to kick in
-<br>262984 	SetThemeCursor() sometimes checks PTR_SIZEOF, sometimes doesn't
-<br>263062 	Missing @since tag on ACC.ROLE_SPLITBUTTON
-<br>263071 	Sash cursor changes while dragging the sash 
-</blockquote>
-
-<h2> SWT Build 3.5 29a - Wednesday January 28, 2009</h2>
-<blockquote>
-261553    	NPE pasting in combo
-<br>262573 	Hover help is dismissed without selection 
-</blockquote>
-
-<h2> SWT Build 3.5 29 - Monday January 26, 2009</h2>
-<blockquote>
-262346    	Control Example should use SWT.ICON_CANCEL for Text widget
-<br>256327 	[Cocoa] Forms layout oddity
-<br>262117 	[Cocoa] problem creating image
-<br>253990 	implement OpenGL support 
-</blockquote>
-
-<h2> SWT Build 3.5 28 - Sunday January 25, 2009</h2>
-<blockquote>
-86569    	[Clipboard] Support x-special/gnome-copied-files
-<br>153432 	[KeyBindings] Unicode keyboards on Mac OSX produce wrong keys when used with modifiers
-<br>160870 	[Contributions] ToolItem.setWidth fails when ToolItem on ViewPart toolbar
-<br>248155 	Cursor is wrong over title bar of dialog
-<br>250443 	Content assist shells should not have title bar
-<br>251021 	MacOSX-cocoa swt crash importing a folder containing ~800 Java files
-<br>257278 	Ctrl-Shift-R does not update correctly on Mac Carbon
-<br>258110 	wrapping Link is clipped on Help preference page
-<br>258675 	[Viewers] Arithmetic exception when typing show types dialog
-<br>260370 	Allow to show magnifier icon for Text with SWT.SEARCH
-<br>261219 	text inner border can be wrong on gtk 2.10
-<br>261230 	computeSize not right for SWT.SEARCH Text
-<br>261576 	[mac] Mylyn notifications create an empty ghost shell under Cocoa port
-<br>261699 	version of org.eclipse.swt.motif.hpux.PA_RISC in maintenance stream is lower than the one in 3.4
-<br>261854 	adding/removing TreeItems can be very slow
-<br>262230 	debug hover comes up blank 
-</blockquote>
-
-<h2> SWT Build 3.5 27 - Tuesday January 20, 2009</h2>
-<blockquote>
-244597    	Cannot activate shell programatically on gtk
-<br>251150 	Canvas is 100000 x 100000 even after sizing to fit.
-<br>251454 	Table and Tree do not respect style SWT.NO_SCROLL
-<br>252384 	Tree scrollbars disappear
-<br>252419 	Spinner foreground and background color don't work.
-<br>252479 	resizing preference dialog tree with keyboard causes system beep
-<br>253786 	Cannot change tabs in TabFolder using keyboard
-<br>254533 	Can't invoke context menu using keybindings
-<br>254792 	Move Tab Group does not work on Mac/Cocoa 3.5M3
-<br>256159 	Certain Images copied from Lotus Notes and pasted using SWT's Clipboard are corrupted
-<br>256471 	ControlExample - Link Font changes
-<br>256825 	Eclipse "Problems Tab": dragging column separators causes application to hang
-<br>258424 	Clip is not honored in Canvas.paint .
-<br>259003 	Eclipse Cocoa: drag and drop in Package Explorer sometimes incorrectly shows icon indicating illegal drop target
-<br>259379 	[64] Text fields in Project Properties dialog have incorrect background
-<br>259910 	Unprecise Javadoc for ImageData constructor
-<br>260361 	Clients can't find out whether Text#setMessage(..) works on current platform
-<br>260870 	buttons in perspective switcher appear too tight
-<br>260929 	Caret blinks when application is not active.
-<br>261052 	Possible leak in DragSource.drag() method
-<br>261099 	CTabItem curvers are blurry
-<br>261228 	fix doc for SWT.SEARCH
-<br>261279 	coordinates flipped when using Tracker
-<br>261354 	Need to implement Text#setMessage() on Motif 
-</blockquote>
-
-<h2> SWT Build 3.5 26 - Tuesday December 16, 2008</h2>
-<blockquote>
-236855    	SWT JNI libraries should have different names for Win32 and Win64
-<br>250579 	Form titles do not draw correctly
-<br>256169 	[Cocoa] Image radio and check buttons don't display state
-<br>256808 	Eclipse "Select Workspace Directory" does not allow creation of new folder
-<br>258123 	[64] Can't self host on cocoa x86_64 with Java 5
-<br>258309 	[64][Browser] Browser crashes on Snippet307
-<br>258672 	Examples page links to update site for Eclipse 2.0!
-<br>258839 	recompile solaris-motif os library 
-</blockquote>
-
-<h2> SWT Build 3.5 25 - Wednesday December 10, 2008</h2>
-<blockquote>
-156276  Provide a way for JavaScript to call out to the Browser's container
-<br>258159  [64] MessageBox Crashes 
-</blockquote>
-
-<h2> SWT Build 3.5 24 - Wednesday December 10, 2008</h2>
-<blockquote>
-92757   StyledText: Add caret listener
-<br>156276 	Provide a way for JavaScript to call out to the Browser's container
-<br>239301 	Support 64-bit on Cocoa
-<br>250179 	Consider drawing the block selection on characters
-<br>257967 	BlockSelection: paste on wrong place when Styledtext is scrolled
-<br>257975 	Cannot open internal browser on linux 
-</blockquote>
-
-<h2> SWT Build 3.5 23 - Monday December 8, 2008</h2>
-<blockquote>
-92757    	StyledText: Add caret listener
-<br>257967 	BlockSelection: paste on wrong place when Styledtext is scrolled 
-</blockquote>
-
-<h2> SWT Build 3.5 22 - Sunday December 7, 2008</h2>
-<blockquote>
-248880  Cocoa: Eclipse dialogs too modal
-<br>254956 	[DND] Drag and drop maintaining a grab too long.
-<br>255118 	Default Cocoa quit handler calls exit()
-<br>256476 	DefaultSelection not being sent from Spinner
-<br>256685 	CoolBar control: for Vertical style, Horizontal Fill also applies Vertical Fill
-<br>256870 	The logic for drawing Vertical gradient of Bottom tabs is incorrect
-<br>257147 	No setTextLimit in Cocoa version of Spinner?
-<br>257238 	StyledText: block selection mode: trouble with caret and newline
-<br>257278 	Ctrl-Shift-R does not update correctly on Mac Carbon
-<br>257614 	[Browser] add API to evaluate JS expression 
-</blockquote>
-
-<h2> SWT Build 3.5 21 - Tuesday December 2, 2008</h2>
-<blockquote>
-194887  Eclipse actions are not executed in embedded awt component
-<br>223590 	Browser.print(GC) should not use ancestor clip
-<br>233303 	[Contributions] Menuitem has incorrect letter underlined
-<br>253219 	Implement gradient Patterns
-<br>253228 	Implement default selection (text, tree, table ...)
-<br>253929 	java.lang.UnsatisfiedLinkError when launching eclipse SDK on AIX
-<br>255652 	Test failures on win32
-<br>255730 	NPE in Tree
-<br>256467 	Button images bad in Control Example
-<br>256507 	cheese around icons (no transparency)
-<br>256687 	NPE in Tree setSelection
-<br>256688 	IndexOutOfBoundsException in TreeItem
-<br>256703 	setItemCount breaks selection
-<br>256770 	[StyledText] setBackground() conflicts with LineStyleListener
-<br>256797 	org.eclipse.swt.motif.hpux.PA_RISC fragment is version 3.5.0.qualifier in maintenance stream
-<br>256845 	Shell control: "remain on top" property is voided when one goes to another application
-<br>257056 	[TestStyle] border missing in toString() 
-</blockquote>
-
-<h2> SWT Build 3.5 20 - Tuesday November 25, 2008</h2>
-<blockquote>
-236513    	bidi: english characters swapped only in linux
-<br>245523 	GC stops drawing after setting transform with dy=-1
-<br>248921 	Getting immediately setting back a Region on a GC once setAdvanced is set to true causes the region to change provided the repaint region is offset
-<br>251447 	setTooltip throws ArrayIndexOutOfBoundsException
-<br>251587 	Snippet 135 (SWT/AWT) no longer works
-<br>253223 	Implement painting (setRedraw(), scroll/paint/update, setRegion(), Display.update() ...)
-<br>253673 	Snippet207 doesn't rotate 45°
-<br>255282 	SWTException thrown from CCombo
-<br>255403 	Some images in eclipse are not transparent
-<br>255637 	Missing removeComponentListener in SWT_AWT.new_Shell
-<br>255658 	SWT.UNDERLINE_LINK needs more doc
-<br>255821 	Image size incorrect when using native loader.
-<br>256170 	Image loses alpha information and crashes on 64 bit
-<br>256261 	Hand cursor stays when releasing Ctrl after hovering a link 
-</blockquote>
-
-<h2> SWT Build 3.5 19 - Tuesday November 18, 2008</h2>
-<blockquote>
-15165   BIDI: enable RTL orientation in SWT widgets
-<br>83408 	Support links in StyledText
-<br>128804 	No settings callback when High Contrast is turned off
-<br>210441 	setBackground/setBackgroundImage not implemented.
-<br>246470 	[Browser] Safari fails on Mac OS X 10.4.11
-<br>249210 	Crash in Tree.setItemCount
-<br>252418 	Can't replace text in spinner
-<br>253215 	Support BIDI in TextLayout
-<br>253220 	Support native image loading
-<br>253221 	Implement Image.setBackground()
-<br>254797 	Upside down topsy turvey text
-<br>254865 	Annotation underlines not properly drawn when end of range not visible
-<br>254947 	underlineColor, strikeoutColor, borderColor not respected when tex is selected
-<br>255373 	Textlayout border and error underline are not bidi aware
-<br>255398 	IndexOutOfBoundsException in Image.setBackground 
-</blockquote>
-
-<h2> SWT Build 3.5 18 - Tuesday November 11, 2008</h2>
-<blockquote>
-246057	SWT_AWT application does not receive mouse events
-<br>253720	Setting clipping causes printing to be flipped
-<br>253058	StyledText should handle mouse click sequences in block selection mode
-<br>253057	selection changes must send out selection event notifications
-<br>253916	Printing long files sometimes crashes
-<br>253964	Occasional crash on quit after dragging text
-<br>252693	computeSize causing Resize, and Move events
-<br>253259	Label in synchronize view is getting cut off.
-<br>253305	ControlsWithLabelsExample needs to be accessible
-<br>251762	block selection, getSelectionText and getSelectionTextCount should be aware of block selection
-<br>250175	fix DND in block selection mode
-<br>253254	[Browser] Exception while disposing SWT Mozilla browser
-<br>253062	Forms have resize / layout problems
-<br>252388	Check box shows indeterminate state before checked state
-<br>253298	NSAccessibilityException typing tab in multi-line Text in ControlExample
-<br>253225	Implement Control.print()
-<br>252714	Control/right-click on Package Explorer doesn't select item first
-<br>254607	emulated coolbar height is wrong when it has multi rows of different size
-</blockquote>
-
-<h2> SWT Build 3.5 17 - Tuesday November 04, 2008</h2>
-<blockquote>
-246274	SWT.ARROW Button direction not consistent when RTL
-<br>246541	[misc] BIDI: Java editor does not ensure LTR for declarations and invocations with RTL names
-<br>247866	Images not centered in tool items
-<br>248758	[DND] No dragStart event when dragging from Text widget
-<br>249006	implement cursor on mouse grab
-<br>252245	Implement Printing on Cocoa
-<br>252277	resizing Table/Tree column sends Selection event
-<br>252370	fix cell accessibility post-3.5M3
-<br>252391	sort indicator moves
-<br>252422	reduce damaging of Table/Tree column headers
-<br>252424	background color of List only sets background of items.
-<br>252427	List - changing font size doesn't update item height
-<br>252486	[DND] Cannot drag from StyledText
-<br>252642	block selection doesn't work on win2000
-<br>252678	StyledText #setLineSpacing(int) not working in GTK
-<br>252679	TableColumn/TreeColumn don't send Move and Resize events
-<br>252747	double underline doesn't show in win32
-<br>252749	Bullet not working in styled text
-<br>252770	fragment binary should exclude *.extra files
-<br>252895	StyledText strikeout over tab space
-<br>252903	replace initWithFrame(new NSRect()) with init()
-<br>252995	Drop down tool items are selected on mouse up
-<br>253189	NullPointerException when trying to print
-<br>253240	Missing autorealese pool in printer
-<br>253294	remove printlns in Accessibility
-</blockquote>
-
-<h2> SWT Build 3.5 16 - Thursday October 30, 2008</h2>
-<blockquote>
-252441	Can't select plugins in run configurations
-<br>252764 Stack overflow caused by 246057 fix
-</blockquote>
-
-
-<h2> SWT Build 3.5 15 - Tuesday October 28, 2008</h2>
-<blockquote>
-251582  No splash screen progress using Cocoa
-<br>251779 	Snippet124 crashes
-<br>252232 	scrollbars are disabled
-<br>252252 	Can't get a context menu on a tree item
-</blockquote>
-
-
-<h2> SWT Build 3.5 14 - Monday October 27, 2008</h2>
-<blockquote>
-222791    	Spinner accepts non-numeric input in Cocoa
-<br>222795 	[Spinner] Cannot increase number of digits
-<br>225266 	Cocoa port has no org.eclipse.swt.internal.carbon.smallFonts equivalent
-<br>237102 	[OLE] OleControlSite with Excel.Sheet renders deactivated view improperly
-<br>249003 	implement cursors (wait, etc.)
-<br>250178 	change the keyboard block selection expansion increment to match average char width
-<br>250574 	Group does not layout correctly.
-<br>251016 	Crash on shut down
-<br>251084 	NullPointerException when VoiceOver asks for position of Shell
-<br>251126 	Please remove unused Platform Interface constants etc.
-<br>251128 	Display.readAndDispatch() and sleep() should not try/catch and call printStackTrace()
-<br>251149 	SWT Accessibility API needs to work on all Controls
-<br>251469 	Accessible.getDescription should not return name
-<br>251482 	Don't work around bug in Accessibility Verifier
-<br>251516 	[Browser] cannot type Ü into web browser text area
-<br>251528 	SWT Image created without GDI tracking
-<br>251581 	Wrong cursor when editing
-<br>251583 	Crash using I20091021 Cocoa
-<br>251603 	Spacing not working in TextLayout
-<br>251607 	TextLayout - TextStyle's border not showing bottom line in StyledText
-<br>251614 	Space in font name
-<br>251618 	Text glitch after inserting an image
-<br>251712 	New shell not active when opened
-<br>251766 	Accessibility: Button role incorrect for toolbar buttons
-<br>251818 	drawString works improperly after drawing any primitives
-<br>251910 	creating tall combo spews long error message and can draw wrong 
-</blockquote>
-
-<h2> SWT Build 3.5 13 - Tuesday October 21, 2008</h2>
-<blockquote>
-211048    	Accessibility is not implemented for Cocoa
-<br>212851 	StyledText - getStyleRanges(int start, int length) returns wrong style range
-<br>249001 	implement GC drawFlags
-<br>249005 	implement/verify mouse events and mouse wheel
-<br>249007 	implement modify/verify events
-<br>249008 	implement MenuDetect events and show native menu on Texts
-<br>250171 	add int[] getBlockSelectionRanges() to StyledText
-<br>250172 	Fix inserting text in block select mode
-<br>250177 	convert block selections to linear selections and vice-versa
-<br>250180 	don't reset block selection mode under no circumstances
-<br>250193 	StyledText SetStyleRange not working
-<br>250622 	org.eclipse.swt.printing.PrintDialog.open() returns 'null' for two different scenarios
-<br>250782 	No More Handles Exception when trying to load an image
-<br>250841 	Table/Tree scrollbars do not work
-<br>250859 	StyledText getRages(int start, int length) returns incorrect array
-<br>250976 	FileDialog should be resizable
-<br>250994 	Last character of the line disappears when selecting code at the end of line
-<br>251007 	underline not select when last run run is full selected
-<br>251016 	Crash on shut down
-<br>251089 	StyledText#copy() fails in RTFWriter with AIOOBE
-<br>251130 	Compiler warnings in N20081015-2000
-<br>251442 	block selection: handle multi-line paste 
-</blockquote>
-
-<h2> SWT Build 3.5 12 - Tuesday October 14, 2008</h2>
-<blockquote>
-206173 	Permit SWT.DEFAULT as an argument to ScrolledComposite.setMinSize
-<br>248551 	BidiLevel is improperly set to -1
-<br>248881 	Cocoa: (specific) Dialog text doesn't wrap
-<br>249999 	Closing an editor takes two clicks
-<br>250299 	scrollbar's selection is reset to 0 when its NSScrollView is resized
-<br>250327 	SWT.NO_TRIM Shells cannot become the key window
-<br>250346 	Please update link to PaperClips project on SWT community page 
-</blockquote>
-
-<h2> SWT Build 3.5 11 - Tuesday October 07, 2008</h2>
-<blockquote>
-8521    	StyledText: block select mode
-<br>84552 	The image of a checked action in a menu of a pulldown action is not displayed
-<br>165033 	Table vertical lines always showing
-<br>173556 	[OLE] SWTException constructing OleControlSite for WMPlayer.OCX with Windows Media Player 11
-<br>211696 	CLabel does not specify that "&" introduces mnemonic
-<br>223518 	implement Shell modality
-<br>245667 	Horizontal Sash does not show resize cursor
-<br>248187 	Adobe Reader 9.0 browser crash NPE
-<br>248773 	implement custom draw in Tables and Trees
-<br>249000 	implement graphics in non-UI thread
-<br>249009 	implement Shell.setImage(...) and -Xdoc:icon
-<br>249286 	Table.setTopIndex does not work correctly with MeasureItem
-<br>249376 	Tree in package explorer hides text
-<br>249517 	ClassCastException in Combo
-<br>249608 	TextLayout.draw(...) does not use GC foreground
-<br>249612 	Links on preference pages are opened in browser
-</blockquote>
-
-<h2> SWT Build 3.5 10 - Tuesday September 30, 2008</h2>
-<blockquote>
-211652 	DND not implemented on Cocoa
-<br>246309 	[Browser, Mac, 3.4] Doesn't open local URLs (file:///) that contain query parameters and/or that are URL encoded.
-<br>247069 	Display#post(*) sometimes freezes eclipse
-<br>248169 	ld-linux.so causing JavaVM to seg. fault. on startup....
-<br>248187 	Adobe Reader 9.0 browser crash NPE
-<br>248190 	implement Table/Tree column reordering
-<br>248266 	Javadoc warnings in N20080922-2000
-<br>248467 	Keypad Enter and Help keys do not draw in MenuItems
-<br>248559 	Image not loaded in Flex
-<br>248728 	cannot use jdk 1.5 method Class.getSimpleName()
-<br>248731 	FileDialog does not provide enough information to open multiple files from different directories (COCOA)
-<br>248735 	System.out.println() in DragSource
-<br>248950 	Custom Control Example crashes. 
-</blockquote>
-
-<h2> SWT Build 3.5 09e - Tuesday September 22, 2008</h2>
-<blockquote>
-165033    	Table vertical lines always showing
-<br>219758 	The second shell can not be active after closing the first shell
-<br>247869 	Pixel corruption in Java Editor
-<br>248167 	Accelerators are not drawn on menu items in Eclipse 
-</blockquote>
-
-<h2> SWT Build 3.5 09d - Friday September 19, 2008</h2>
-<blockquote>
-247550 	Alt+Arrow moves line up/down by 2 in Java editor
-</blockquote>
-
-<h2> SWT Build 3.5 09c - Thursday September 18, 2008</h2>
-<blockquote>
-245667    	Horizontal Sash does not show resize cursor
-<br>247557 	Tracker seems broken, affects dragging Views, Editors
-<br>247649 	Compiler warnings in I20080917-0100
-<br>247667 	TabFolder sends Selection events for programmatic selections
-<br>247676 	setting TabFolder content in Selection callback does not appear
-<br>247702 	NPE in Display.map(...) when called from TabFolder Selection listener
-<br>247728 	implement underline (squiggle/error) and outline for cocoa 
-</blockquote>
-
-<h2> SWT Build 3.5 09b - Wednesday September 17, 2008</h2>
-<blockquote>
-247290 	SWT ToolItem loses text when only one item and VERTICAL with image
-<br>247549 	default button doesn't work for single line Texts 
-</blockquote>
-
-<h2> SWT Build 3.5 09a - Tuesday September 16, 2008</h2>
-<blockquote>
-192014    	Certain fonts appear squished with advanced graphics on
-<br>247237 	Compiler warnings in cocoa port in N20080914-2000
-<br>247318 	Crash creating new display after disposing previous one 
-</blockquote>
-
-<h2> SWT Build 3.5 09 - Sunday September 14, 2008</h2>
-<blockquote>
-211796 	Regenerate the PI ("Platform Interface") to better match cocoa
-<br>237724 	(Accessibility) keyboard shortcuts are not read with VoiceOver in most menus
-<br>246820 	org.eclipse.swt.tools causes 242 warnings in latest I-build
-</blockquote>
-
-<h2> SWT Build 3.5 08 - Friday September 12, 2008</h2>
-<blockquote>
-174968    	Provide API to select tree items without scrolling
-<br>244318 	Unable to scroll fast using MX Revolution Mouse
-<br>245367 	[Browser] swt browser doesn't hold the SWT global lock when calling to Xlib
-<br>246884 	DateTime not in HPUX source
-<br>247083 	disposing first column in Tree fails 
-</blockquote>
-
-<h2> SWT Build 3.5 07 - Tuesday September 9, 2008</h2>
-<blockquote>
-88516 	Advanced GC reports different string extents than non advanced
-<br>95410 	GDI+ drawString is not consistent with GDI
-<br>104729 	setAntialias changes sizes of strings
-<br>139070 	ExpandBar draws on top of scrollbars
-<br>225264 	Help menu opens up in the wrong place
-<br>243558 	StyledText: squiggles not drawn for tabs
-<br>244472 	Text does not WRAP on RHEL3
-<br>244723 	Embedding external widgets into SWT using the EMBEDDED Style
-<br>244747 	Snippet illustrating how to properly post key events with shift keys
-<br>244931 	On carbon platform, when scroll the mouse wheel on top of the vertical scroll bar of a canvas, no selection event is generated.
-<br>245185 	Message in the MessaeBox is not BiDi correctly
-<br>245249 	org.eclipse.swt.win32.win32.x86 version mismatch
-<br>245379 	Table.getVerticalBar() returns null
-<br>245724 	SWT_AWT bridge hangs in Cocoa SWT
-<br>246133 	plug-in and fragment versions need updating for 3.4.1
-<br>246235 	App crashes on exit
-<br>246379 	warning compiling callback.c (pad not unused)
-<br>246602 	Table/Tree columns do not send Selection events 
-</blockquote>
-
-<h2> SWT Build 3.5 06 - Tuesday August 26, 2008</h2>
-<blockquote>
-49996    	[CCombo] CCombo, CLabel - Custom widgets are nulling internal slots too soon
-<br>196884 	[OpenGL] GLCanvas doesn't work on Vista
-<br>231776 	[SWT Mac] Incorrect mouseExit event generated when balloon ToolTip is shown
-<br>232690 	No event is sent on clearing SWT.SEARCH-styled text field
-<br>234809 	[QuickAccess] PopupDialog stays open even though Eclipse has focus
-<br>239965 	Application menu does not share application name
-<br>242644 	eclipse crashes when downloading a file in the internal browser
-<br>243842 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
-<br>244234 	losing keybindings...
-<br>244396 	[DND] Combo on Linux does not fire DragSourceEvent.
-<br>244533 	Cursor Control
-<br>244574 	ProgressBar state can be visually lost by updating selection 
-</blockquote>
-
-<h2> SWT Build 3.5 05 - Tuesday August 19, 2008</h2>
-<blockquote>
-243842 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
-<br>243924 	Debugger crashes on Step out.
-<br>243942 	NPE in Tree.getSelection
-<br>244072 	Tree and Table setBackground doesn't work
-<br>244108 	[WorkbenchLauncher] ArrayIndexOutOfBoundsException in IDEApplication.start() when launching partially branded product 
-</blockquote>
-
-<h2> SWT Build 3.5 04b - Tuesday August 12, 2008</h2>
-<blockquote>
-140646    	[OLE] OleControlSite new constructor needed
-<br>199441 	ScrollBars visible even when not required
-<br>241062 	[consistency] Font#getFontData() not safe from non-ui thread on MacOS
-<br>242251 	N20080727-2000 on linux.gtk.x86 doesn't proceed past the splash screen on startup
-</blockquote>
-
-<h2> SWT Build 3.5 04a - Wednesday August 6, 2008</h2>
-<blockquote>
-242484 	org.eclipse.swt.graphics.Rectangle.contains(int, int) returns incorrect results
-<br>242567 	version of org.eclipse.swt.motif.hpux.PA_RISC in HEAD stream has lower version that released 3.4 version
-<br>242603 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
-<br>243012 	Password fields can be copied to the clipboard on Mac OS X
-<br>243037 	SWT.getPlatform() should list all valid values
-<br>243232 	Child shells don't stay above their parent 
-</blockquote>
-
-<h2> SWT Build 3.5 04 - Thursday July 31, 2008</h2>
-<blockquote>
-97496    	Table: setBackground is not deferred by setRedraw(false)
-<br>164928 	GC.setTextAntialias(SWT.OFF) not working for StyledText
-<br>173218 	[SWT_AWT] SWT needs to support ModalityListener interface
-<br>210855 	Table's "sort indicator" has no visible effect
-<br>210856 	Table & Tree Header images don't do anything
-<br>229651 	ComboBoxEditor is unresponsive and unusable on RH 5
-<br>241671 	Mouse cursor disappears in editor and gets progressively slower coming back
-<br>242263 	Problems with read-only text boxes on Linux
-<br>242414 	AntiAlias does not work in TextLayout 
-</blockquote>
-
-<h2> SWT Build 3.5 03 - Tuesday July 29, 2008</h2>
-<blockquote>
-110916    	Backspace stops working (due to mouse stuck down)
-<br>193359 	Shared library for cairo not build on AIX/Motif
-<br>219133 	printer.getDPI() returns 72x72
-<br>232688 	Shell.setActive() is not implemented
-<br>236724 	[Browser] Eclipse causes JVM crash in libxul when editing Java
-<br>240817 	SWT Tree: in 3.4, DragSourceEvent gives higher x-coordinate than in 3.3
-<br>241144 	SWT deletes libswt-cairo-motif if libcairo isn't found
-<br>241443 	[Button] Paint event missed on traversal
-<br>241720 	Padding wrong when vertical lines displayed in Tree and Table
-<br>241743 	TableColumn pack works not the same on diffrent Platforms..
-<br>242003 	Image buffer is allocated twice unnecessarily
-<br>242030 	Filter in SWT.Paint event not delivered for table, tree and composite 
-</blockquote>
-
-<h2> SWT Build 3.5 02 - Tuesday July 22, 2008</h2>
-<blockquote>
-193359    	Shared library for cairo not build on AIX/Motif
-<br>200743 	[Clipboard] Copy/Paste intermittently doesn't work for a line of text
-<br>210872 	SWT.BALLOON tooltip draws background outside balloon
-<br>210874 	Crash when using SWT.BALLOON and SWT.ICON_INFORMATION
-<br>230119 	Keyboard navigation in the StyledText (Cocoa)
-<br>239418 	table.setLinesVisible(true) does not work on solaris. Eclipse 3.2.0 and GTK 2.12.0 and 11.
-<br>240190 	OSX: TabFolder Images not shown if setImage before setText or setControl
-<br>241380 	Ctrl+N doesn't work in the internal browser view
-<br>241490 	GC.setAlpha() / GC.getAlpha() does not work properly on Linux 
-</blockquote>
-
-<h2> SWT Build 3.5 01b - Tuesday July 15, 2008</h2>
-<blockquote>
-211536 	RTFTransfer not implemented; code demonstrating NSPasteboard attached
-<br>235968 	CCombo class should not be final
-<br>236634 	Cannot dismiss attribute type combo
-<br>239482 	SWT.VIRTUAL Table Freezes under 3.4 when dragging (DND) 
-</blockquote>
-
-<h2> SWT Build 3.5 01a - Tuesday July 08, 2008</h2>
-<blockquote>
-86745  Tree shows horizontal scrollbar although not required  
-<br>211202  StyledText#setSelection() does not reveal caret with non-zero selection  
-<br>221938  new GC(Control) doesn't work  
-<br>233261  dialog window distorted after going out of "Not responding" state  
-<br>236312  GTK Assertion for gdk_window_get_user_data  
-<br>239220  Text.getText() returns empty string after calling setText() with non-empty string  
-<br>239231  Text.getCaretLineNumber() differs between Windows and Linux  
-</blockquote>
-
-<h2> SWT Build 3.5 01 - Wednesday June 25, 2008</h2>
-<blockquote>
-54525    	Radio group gets traversed (gets focus) when not visible
-<br>65648 	Reparented Toolbars lose their tooltips if the shell they were originally created in is destroyed
-<br>87460 	StyledText: Caret location not updated when line style is used
-<br>101153 	Text.getText(int,int) can throw StringIndexOutOfBounds
-<br>119173 	IllegalArgumentException when applying overlapping StyleRanges
-<br>125499 	Pixel corruption when setSelection() called from within SWT.SetData
-<br>127971 	Cannot remove caret in FocusOut handler
-<br>211358 	New windows opened at bottom-left of screen
-<br>211363 	Weird resize behaviour in paint example
-<br>226090 	Clarify/improve TextLayout.setText(String)
-<br>236347 	swt standalone zip contains javadoc location from eclipse 3.1?
-<br>237138 	StyledText blank in Linux RedHat
-<br>237432 	[64] Add External JARs in Java Build Path fails consistently
-<br>237486 	[Accessibility] Shift+Tab navigates forward (should be backward)
-<br>237675 	Giving focus to other control during FocusIn doesn't reassign the Caret
-<br>237903 	Browser sends LocationEvent with non-URL location for file:/C:/...
-<br>238149 	Rollover tooltip for owner-drawn tree should be hidden when tree view changes
-</blockquote>
-
-<h2> SWT Build 3.4 48f - Wednesday June 18, 2008</h2>
-<blockquote>
-237432	[64] Add External JARs in Java Build Path fails consistently
-</blockquote>
-
-<h2> SWT Build 3.4 48e - Thursday June 12, 2008</h2>
-<blockquote>
-236288    	update swt.tools and swt.examples.browser.demos.source to include about.html
-<br>236419 	Printing does NOT work on Mac
-<br>236669 	exception when removing TableItem
-</blockquote>
-
-<h2> SWT Build 3.4 48d - Friday June 6, 2008</h2>
-<blockquote>
-235350 	[64] Bad screen display
-<br>235806 	improper usage of "Device" when setting font description in org.eclipse.swt.graphics.TextLayout constructor
-<br>235847    	[Contributions] [Mac] Odd behaviour in help menu on OS X
-</blockquote>
-
-<h2> SWT Build 3.4 48c - Thursday June 5, 2008</h2>
-<blockquote>
-10465    	org.eclipse.swt.graphics.Image Documentaton
-<br>78818 	Bengali not showing in Editor
-<br>84463 	Equals sign (=) is rendered in incorrect font.
-<br>98894 	Shell.setImages() should be smarter on Mac
-<br>102201 	disposing TableColumn can change display order
-<br>161792 	Printer.computeTrim(...) javadoc is confusing
-<br>164437 	Disable automatic horizontal scrolling on tree item selection
-<br>173340 	[zh_CN] StyledText default font are too small compared to other SWT text on Windows for Simplified Chinese
-<br>204199 	Problem with copy/append of GB18030 characters
-<br>223525 	Describe multiple wildcards usage in org.eclipse.swt.widgets.FileDialog.setFilterExtensions(String[]) javadoc
-<br>235324 	Canvas#getCaret() should tell that caret can be null
-<br>235329 	vertical scroll bar remains in empty tree viewer
-<br>235348 	Exception in setItemCount
-<br>235417 	org.eclipse.swt..motif.hpux.ia64_32 has qualifer HEAD
-<br>235617 	The visibility of the constructor org.eclipse.swt.graphics.Resource.Resource() has been reduced
-</blockquote>
-
-<h2> SWT Build 3.4 48b - Wednesday June 4, 2008</h2>
-<blockquote>
-235324    	Canvas#getCaret() should tell that caret can be null
-<br>235329 	vertical scroll bar remains in empty tree viewer
-<br>235348 	Exception in setItemCount
-</blockquote>
-
-<h2> SWT Build 3.4 48a - Tuesday June 3, 2008</h2>
-<blockquote>
-219437    	Javadocs of get/setAlpha(..) should specify range of value
-<br>227914 	IAE in TextLayout._getOffset()
-<br>229469 	Drag Source Effect not visible for Tree and Table
-<br>232625 	SWT/JFace - Lack of examples in API
-<br>232685 	ScrollBar works incorrectly with StyledText
-<br>232686 	Shell doesn't send SWT.Move
-<br>234940 	TextLayout#drawText and GC#drawText draw some Unicode very differently.
-<br>235219 	Cheese in tree
-</blockquote>
-
-<h2> SWT Build 3.4 48 - Friday May 30, 2008</h2>
-<blockquote>
-234751 Warnings in SWT builds
-</blockquote>
-
-<h2> SWT Build 3.4 47 - Friday May 30, 2008</h2>
-<blockquote>
-36226    	DCR - Improve Performance for Large Tables
-<br>223823 	ControlExample: Select Listeners dialog opens behind menu bar
-<br>231958 	TVT34:TCT236: KO: truncation of "Configure connection preference..."
-<br>234437 	CCombo#setVisible() doesn't check if the popup shell is disposed
-<br>234732 	WRAP break font fallback , DBCS does not show
-<br>234738    	TextLayout font fallback improvement
-</blockquote>
-
-<h2> SWT Build 3.4 46d - Thursday May 29, 2008</h2>
-<blockquote>
-233638 	Extreme performance degradation in TextLayout.shape()
-<br>234158 	StyledText should stop blinking caret when losing focus in verify key listener
-<br>234271 	Invalid thread access logged in the .log file
-<br>234433 	[Browser] Some characters cannot be entered in forms
-<br>234481 	API consistency changes needed
-</blockquote>
-
-<h2> SWT Build 3.4 46c - Wednesday May 28, 2008</h2>
-<blockquote>
-213194    	[Browser] setText crash with xulrunner 1.9 stream
-<br>234119 	Segfault when disposing shell in keylistener of browser
-</blockquote>
-
-<h2> SWT Build 3.4 46b - Tuesday May 27, 2008</h2>
-<blockquote>
-229181    	[DateTime] DateTime widget does not report mouseDoubleClick
-<br>233595 	DragImage looks bad on vista (table+tree)
-<br>233598 	carriage return inserted twice when using text box in web browser
-<br>233867 	Text#getPosition() is missing JavaDoc
-<br>233969 	NPE in Tree.windowProc when starting to drag elements
-<br>233985 	build.xml's need updating to rename *._properties to *.properties
-</blockquote>
-
-<h2> SWT Build 3.4 46a - Thursday May 22, 2008</h2>
-<blockquote>
-232617 TVT34:TCT301: The Update Preferences link is not active in Linux
-<br>Bug 233487 add swt's nl files for swt stand-alone download
-</blockquote>
-
-
-<h2> SWT Build 3.4 46 - Thursday May 22, 2008</h2>
-<blockquote>
-225404 	Clicking on areas to left or right of cell editors in tree does not raise a FocusIn event for tree on vista
-<br>229481 	Drag Images not supported in Custom Trees and Tables
-<br>231877 	WM_PRINT for ToolBar with SHADOW_OUT
-<br>232163 	[Accessibility] StyledText speaks entire value when asked for "line"
-<br>232499 	[JFace] Slower image painting due to fix for bug 224422 and bug 219432
-<br>232965 	[breadcrumb] set top item in drop down is too aggressive on OSX
-<br>233351 	fix leak in drag image
-</blockquote>
-
-<h2> SWT Build 3.4 45d - Wednesday May 21, 2008</h2>
-<blockquote>
-222582    	[Perspectives] BIDI3.4:HCG Wrong caption alignment in Customize Perspecitve dialog with Hebrew translation
-<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
-<br>228282 	[Accessibility] Table & Tree with no column headers say "sort button" on Leopard
-<br>229570 	Screen cheese in breadcrumb when using Windows classic style
-<br>231882 	[Accessibility] Characters typed into Text are not accessible on Leopard
-<br>232114 	[Accessibility] VoiceOver speaks name of some controls twice
-</blockquote>
-
-<h2> SWT Build 3.4 45c - Friday May 16, 2008</h2>
-<blockquote>
-201774    Mozilla Browser doesn't open at the first execution in a Linux RHEL 4.
-<br>228762 	setRegion on Button behaving strangely after shell.open
-<br>232017 	[breadcrumb] Open type dialog pops up behind breadcrumb drop down on OSX
-</blockquote>
-
-<h2> SWT Build 3.4 45b - Thursday May 15, 2008</h2>
-<blockquote>
-226007  BIDI3.4: search results appear shaped improperly
-<br>227076 	[DND]Combo:Multiple problems during drag text in combo on Mac OS X
-<br>231787 	When computing bounds,TextLayout does not take trailing line break into account
-<br>231925 	Arrow button is drawn backwards
-<br>232093 	crash in Safari browser while handling key events
-</blockquote>
-
-<h2> SWT Build 3.4 45a - Wednesday May 14, 2008</h2>
-<blockquote>
-231606 	[Browser] disposing Browser in KeyDown causes crash
-<br>231690 	Smooth scroll is slow on Vista with DWM, impossible to turn off (for text editors)
-<br>231884 	[Accessibility] Controls that implement kEventAccessibleGetNamedAttribute need to call swt accessible API
-</blockquote>
-
-<h2> SWT Build 3.4 45 - Tuesday May 13, 2008</h2>
-<blockquote>
-206870  [Mac] New Project wizard Finish button isn't enabled for Japanese project name
-<br>214503 	Incorrect KeyEvents returned using SWT_AWT.
-<br>223926 	Table/Tree scrollbars bad after setVisible()
-<br>225373 	Bidi3.4: Unicode Markers don't have any effect in Console View
-<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
-<br>227965 	Tooltip for table column not appearing
-<br>227974 	DBCS3.4: Dragged texts from Safari gets garbled when dropped on a StyledText widget
-<br>228167 	DBCS3.4: URLTransfer for DBCS URL failed
-<br>228762 	setRegion on Button behaving strangely after shell.open
-<br>229520 	FileDialog does not provide enough information to open multiple files from different directories
-<br>230940 	(Hovering over a link in Safari does not change the cursor or display the URL
-<br>231102 	javadoc warning in I20080507-2000
-<br>231148 	[Accessibility] StyledText typed characters are not accessible on Leopard
-<br>231192 	[Accessibility] Characters typed into Editable Combo are not accessible on Leopard
-<br>231303 	Browser widget: Tab key traps focus when key listener is added
-<br>231449 	First Table Row Justification Wrong
-</blockquote>
-
-<h2> SWT Build 3.4 44 - Thursday May 8, 2008</h2>
-<blockquote>
-223926 	Table/Tree scrollbars bad after setVisible()
-<br>230940 	Hovering over a link in Safari does not change the cursor or display the URL
-<br>231102 	javadoc warning in I20080507-2000
-<br>231148 	[Accessibility] StyledText typed characters are not accessible on Leopard
-<br>231192 	[Accessibility] Characters typed into Editable Combo are not accessible on Leopard
-</blockquote>
-
-<h2> SWT Build 3.4 43 - Wednesday May 7, 2008</h2>
-<blockquote>
-202902    	Password can not be saved with SWT.MOZILLA browser
-<br>212991 	Mac OS X accessibility does not have the standard relations
-<br>214944 	[browser] xulrunner 1.9-based Browser has no initial background
-<br>216919 	Incompatibilities with MacOSX CMI (Context Menu Interface)
-<br>219558 	[CellEditors] ComboBoxCellEditor doesn't work properly (CCombo)
-<br>222582 	[Perspectives] BIDI3.4:HCG Wrong caption alignment in Customize Perspecitve dialog with Hebrew translation
-<br>222937 	[typing] DBCS3.4: "Assign parameter to new field" refectoring function in DBCS environment
-<br>224550 	GB180303.4: Some 4-bytes GB18030 characters can't be displayed in Package Explore view.
-<br>226653 	DBCS3.4: Unicode Ideogrpahic characters for Vista Japanese are not displayed in text editor
-<br>229377 	No vertical scrollbars in the stacktrace console
-<br>229508 	When closing Eclipse from dock with modified file, window does not restore
-<br>229672 	Fix for bug 228182/222937 is adding a new API after API freeze
-<br>229680 	PRIMARY_MODAL Shell can make other Shell lose its menubar
-<br>229776 	SWT.TOGGLE style bit stops setRegion from working on linux
-<br>229841 	Widget is disposed in ControlExample
-<br>230071 	Snippet223 requires an image
-<br>230388 	Cannot get focus out of browser widget any more
-<br>230489 	use DeleteObject to dispose non-Mlang fonts
-<br>230912 	IAE when leaving IME
-<br>230935 	[Accessibility] StyledText speaks name twice
-<br>231009 	Compile Error on GTK 2.2.x: Fields missing from PangoLayoutLine</blockquote>
-
-<h2> SWT Build 3.4 42a - Wednesday April 30, 2008</h2>
-<blockquote>
-229377    	No vertical scrollbars in the stacktrace console
-</blockquote>
-
-<h2> SWT Build 3.4 42 - Wednesday April 30, 2008</h2>
-<blockquote>
-148094  Control#setCapture() not working as expected
-<br>220642 	[open type] Open Type dialog does not work in high contrast
-<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
-<br>229172 	[Win32] MessageBox gets stuck in event loop
-</blockquote>
-
-<h2> SWT Build 3.4 41 - Tuesday April 29, 2008</h2>
-<blockquote>
-51829    	GTK-BIDI: RTL support in Dialogs
-<br>102686 	Browser widget, suppress key actions.
-<br>181937 	[OLE] eclipse should handle accelerators before OLE controls
-<br>206485 	GTK-BIDI: Bidi support in Link.
-<br>214381 	Tree hover help leaving cheese
-<br>219641 	Triple vertical scrollbar inside compare editor
-<br>221048 	Browser doesn't send key events for arrow keys on Windows platform
-<br>222024 	Browser widget sends key events with wrong character/keyCode
-<br>222594 	BIDI3.4:HCG Context menu is not mirrored
-<br>225677 	Random crashes attributable to Safari
-<br>226016 	BIDI3.4: Last two characters in BIDI text are not shaped correctly
-<br>226023 	BIDI3.4: Last two characters in Arabic in tooptip are not shaped correctly
-<br>226106 	BIDI3.4: Arabic text in console is not shaped correctly
-<br>228273 	[Accessibility] ToolBar is not accessible on Leopard
-<br>228277 	[Accessibility] Table & Tree are not accessible on Leopard
-<br>228287 	[Accessibility] Link is not accessible on Leopard
-<br>228484 	[Browser] unable to go to next or previous editor since browser consumes common keys (F6 and Tab)
-<br>228667 	ACC: SWT does not give focus to a context menu from a dialog
-<br>228770 	setRegion on Canvas not working on linux
-<br>228968 	NPE in MozillaDelegate
-</blockquote>
-
-<h2> SWT Build 3.4 40 - Tuesday April 22, 2008</h2>
-<blockquote>
-73390   Tooltips not shown for some widgets
-<br>127848 	CustomControlExample CLabel background image differences
-<br>160707 	code hints window remains visible when minimizing eclipse
-<br>174014 	GC.isClipped() always returns false in advanced graphics mode
-<br>191968 	Stack overflow due to infinite recursion when calling Control.update from inside a PaintListener
-<br>192365 	Label is truncated under Linux.
-<br>195564 	Unsetting image in but not working
-<br>197794 	Transformed drawing broken in SWT 3.3 (but specific values only)
-<br>210028 	[mac] screenshot tool does not capture multiple displays properly
-<br>219133 	printer.getDPI() returns 72x72
-<br>220471 	[Accessibility] Editable Combo is not accessible on Leopard
-<br>223015 	Combo height on Linux is too small
-<br>223480 	Combo within Toolbar no longer renders correctly
-<br>223512 	[CCombo] dropdown does not move when window is dragged
-<br>224122 	Opening a modal dialog while an ON_TOP shell is active should activate the dialog
-<br>224870 	Bidi3.4: Eclipse Crashes when trying to open HTML file that resides in Arabic named project
-<br>225351 	Owner draw: measure doesn't allow to change width
-<br>225975 	SWT Table: PaintItem events not sent for items with empty text on Mac OS X
-<br>226229 	Carbon Text widgets cannot be properly center-aligned when style is SWT.SEARCH
-<br>226363 	BIDI3.4:HCG TreeColumn has wrong BIDI alignment with style SWT.NONE
-<br>227384 	Owner draw tree showing too much gap between selected items
-<br>227411 	Controls in shell blocked by a modal shell still scroll via the scroll wheel
-<br>27597 	BIDI: owner draw: tool tips don't work with BIDI
-</blockquote>
-
-<h2> SWT Build 3.4 39 - Tuesday April 15, 2008</h2>
-<blockquote>
-4800    	Timings vs. Sun JDK on image loading/creation/drawing (1GIVMG8)
-<br>5927 	Cannot start eclipse from anywhere but install directory
-<br>24640 	Vertical scrollbar obscures the combo box pulldown
-<br>29764 	BIDI:Dialogs are not mirrored RTL.
-<br>35915 	Need a locale String from FontData
-<br>36729 	File deleted by unexpected drag and drop
-<br>42485 	Mouse cursor does not hide when typing on Mac OS X
-<br>56184 	[browser] IE sometimes freezes on PDF documents with Acrobat Reader 6.0 plugin
-<br>69986 	TabItem contents have wrong background on Mac/Carbon
-<br>76381 	[Browser] Help contents does not start with keyboard focus
-<br>95982 	Double-touch trackpad scrolling doesn't work in the compare editor
-<br>101948 	FileDialog.setFilterExtensions ineffective on Mac OSX
-<br>116748 	Custom Combo: drop down menu is hard to use
-<br>119156 	org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
-<br>125866 	need more parent.indexOf() == -1 checks in TableItem
-<br>126544 	Eclipse can't use the font BitStream Vera Sans Mono in plain style (only italics)
-<br>128436 	Tree with gray state does not report state to Accessible listeners
-<br>130470 	[Tree] Selection-Rect changes on expanding TreeItem causes pixel corruption
-<br>139866 	Text.setTextLimit() not limiting pasted text
-<br>143358 	Tree items array don't shrink correctly
-<br>153365 	DirectoryDialog's setFilterPath() has no effect
-<br>158243 	Background for read only Text objects is wrong in dialogs.
-<br>177368 	Display.getCursorControl returning null for complex Xlib widget on Eclipse/Gtk
-<br>187036 	[Workbench] TVT33:TCT[Workbench] 159: ar: 13.001120 Tool tips text does not have RTL reading order
-<br>192542 	Eclipse 3.3RC3 Loosing keyboard input while using Synergy
-<br>196676 	[consistency] Link does not fire double-click events
-<br>197238 	UML causing stack overflow
-<br>202534 	SWT error in Wizard dialog when help is displayed and "Finish" is pressed
-<br>204915 	SWT.COLOR_WIDGET_BACKGROUND is not the default label background color on Mac OS X with UNO
-<br>207206 	jvm crash using mozilla browser on linux
-<br>211181 	Help Browser crashes on Windows 2000
-<br>215879 	SWT crashes on start
-<br>223298 	Coredump running Demo-App from EclipseCon
-<br>224550 	GB180303.4: Some 4-bytes GB18030 characters can't be displayed in Package Explore view.
-<br>224917 	Program.findProgram should return null on Vista if there are no known applications
-<br>224941 	Esc deactivates parent shell if SWT.TOOL is used
-<br>225527 	rendering problems after removing owner listeners
-<br>225933 	First Table Column Justification Ignored
-<br>225946 	TOGGLE Buttons inherit background with SWT.INHERIT_DEFAULT
-<br>225973 	Cant attach Menu to a Link widget
-<br>226356 	[patch] Build against xulrunner
-<br>226469 	Successfully to setFocus to a control while getFocusControl return null
-<br>226747 	CCombo arrow button not centered
-</blockquote>
-
-
-<h2> SWT Build 3.4 38 - Tuesday April 08, 2008</h2>
-<blockquote>
-170459    	SWT_AWT: Focus problem in Java 6
-<br>181864 	[Browser] crash when disposed in changing callback
-<br>192646 	TextLayout implementation on VISTA platform cannot correctly render some gb18030 characters(Mongolian Baiti, Microsoft Yi Baiti etc)
-<br>205032 	Eclipse crashes after a couple of hours
-<br>207909 	[carbon SWT] ON_TOP shell can not be hidden when parent shell is minimized
-<br>210854 	setSize on Spinner doesn't have an effect
-<br>214721 	The web service explorer crashes on Linux when basic auth is required
-<br>220465 	[Accessibility] StyledText is not accessible on Leopard
-<br>221268 	Running operation that continuously refreshes/updates SWT Browser it does not stay minimized
-<br>221411 	[Accessibility] Leopard: VoiceOver doesn't follow focus if Browser is in Shell
-<br>223592 	Control.print(GC) does not work on Linux.
-<br>224121 	BIDI3.4:HCG Print dialog is not mirrored completely
-<br>224124 	Mac OS X Tree poor performance
-<br>224462 	[Browser-Mozilla] Save-as window shown when disposing the browser during a location changing event
-<br>224870 	Bidi3.4: Eclipse Crashes when trying to open HTML file that resides in Arabic named project
-<br>225038 	Virtual table create all items if setItemCount before create first column
-<br>225086 	[Browser] Browser widget does only receive key events when using IE
-<br>225151 	GTK MenuItem Accelerator Consuming Characters (SWT.COMMAND)
-<br>225263 	Opening a fast view crashes Eclipse
-<br>225329 	Owner draw: gc in paint doesn't have foreground color set
-<br>225440 	MenuDetect events sent with (0, 0) coordinates
-<br>225593 	org.eclipse.swt.events.LineStyleEvent doesn't keep the style when multiple listener are listening
-<br>225663 	ToolTip forTrayItem causes crash on Carbon
-<br>225997 	TextLayout font seems not the be the system font
-</blockquote>
-
-<h2> SWT Build 3.4 37 - Tuesday April 01, 2008</h2>
-<blockquote>
-126545    	[CTabFolder] API to enable / disable Close-Button on TabItems
-<br>207511 	Mac SWT callback generates incorrect assembly code
-<br>219165 	JVM: AttachCurrentThread crashing as of 1.5
-<br>221924 	Perspective Switcher context menu appears in bad location
-<br>223846 	[Viewers] Open Resource dialog causes 'Ignored reentrant call while viewer is busy'
-</blockquote>
-
-<h2> SWT Build 3.4 35 - Thursday March 20, 2008</h2>
-<blockquote>
-4727 DCR: FileDialog to use overwrite prompt (1GFDH0D)
-<br>146643 	awt frame on osx works on first initialization of workspace but not after
-<br>183830 	"Xlib: unexpected async reply" and deadlock in GLX.glXMakeCurrent(int, int, int)
-<br>193362 	update() does not flush paints (Display#readAndDispatch() needed)
-<br>210858 	Editing text has no horizontal scrollbar
-<br>222798 	[Shell] SWT.MAX does not work
-<br>223170 	Memory leaks and number of handles growth
-<br>223179 	BIDI3.4:HCG Hebrew data in Java editor is treated different from Win OS
-<br>223397 	Set/Get API of DateTime widget crashes the control example
-<br>223591 	Button.print(GC) does not work on Windows.
-</blockquote>
-
-<h2> SWT Build 3.4 35 - Thursday March 20, 2008</h2>
-<blockquote>
-215204  read-only Combo.setText() does not fire Modify event on GTK
-<br>220852 	Combo control does not fire modify events on gtk+
-<br>222120 	DND - how to detect which tab item is involved in a DropTargetEvent
-<br>222281 	Table events screwed up if asyncExec happens on focus lost / out
-<br>222896 	Tree#getColumnCount() can be slow because of Win32 API calls
-<br>223082 	javadoc warning in N200803172000
-</blockquote>
-
-<h2> SWT Build 3.4 34 - Tuesday March 18, 2008</h2>
-<blockquote>
-78825   [CCombo] Tab doesn't go to next entry field when list is down
-<br>142981 	[CCombo] CCombo doesn't lose focus
-<br>175689 	[CCombo] CCombo#deselectAll() doesn't clear Text
-<br>183087 	Windows trees don't have to always have scroll bars
-<br>202005 	GC Transform rotate(90) or rotate(-90) not applied to several methods
-<br>204102 	Eclipse freezes on opening java source file (with spell checking enabled)
-<br>204891 	TabFolder.setSelection() does not update focus hilight on OS X
-<br>210870 	Toolbar Drop Down type doesn't appear to do anything
-<br>212086 	gc.drawXXX fails if matrix is rotated
-<br>214944 	[browser] xulrunner 1.9-based Browser has no initial background
-<br>215243 	Wrong drawing behaviour using SWT and Cairo drawing a text and then an oval
-<br>215988 	Transform.rotate does not work when angle is 90 and GC.setLineWidth(0)
-<br>217831 	DateTime different size than other widgets
-<br>220112 	[SashForm] Add getter/setter methods to control SashForm.SASH_WIDTH
-<br>220836 	[Browser] SWT Safari Browser uses wrong 'user-agent' header resulting in some websites disabling functionality
-<br>220974 	ClassCastException in Safari
-<br>220975 	New Java Project Wizard doesn't work
-<br>221363 	Disappearing Text with Tabs & Quotes
-<br>221669 	DateTime returns wrong values under Windows
-<br>221687 	[Viewers] TableViewer scrolls after selection on AIX
-<br>221957 	Huge Cursor in huge Text control
-<br>221958 	Transform.setIdentity() method is needed
-<br>222305 	ToolItem should call ToolBar.destroyItem
-<br>222381 	AIOOBE in GIFFileFormat
-<br>222872 	Fixes for running SWT tests on p2 builds
-</blockquote>
-
-
-<h2> SWT Build 3.4 33 - Tuesday March 11, 2008</h2>
-<blockquote>
-184932    	[SWT] Popup window with SWT.ON_TOP style bit stays opened when minimize the application window
-<br>205796 	[Browser] Navigate / Open External Javadoc does not work on method anymore
-<br>209428 	[Browser] crash on mouseover
-<br>210825 	NSBox seems to be a few pixels short
-<br>211362 	Crash running paint example
-<br>211885 	ScrolledComposite control's setOrigin method not the same as moving scroll bar on Windows
-<br>216346 	NullPointerException in Display.asyncExec
-<br>221302 	[browser] Eclipse crashes everytime the internal browser component is activated
-<br>221512 	Ctrl-Click in package explorer select the item only on the second click
-<br>221559 	Cut/Paste does not fire modifyText events in Combo
-<br>221665 	NPE using N20080306 once closing the Welcome page
-<br>221683 	Label always wraps
-<br>221936 	Cannot paint on label with text.
-</blockquote>
-
-<h2> SWT Build 3.4 32 - Tuesday March 04, 2008</h2>
-<blockquote>
-26095    	DCR - possibility to print the content of SWT widgets
-<br>117335 	[Accessibility] Mac: cannot select checkboxes in trees, lists
-<br>152547 	Clarify what SWT.NO_FOCUS means
-<br>166381 	alignment support for RowLayout and RowData
-<br>178587 	[ScrolledComposite] Accessibility: ScrolledComposite widgets don't automatically scroll when controls are tabbed to inside the composite
-<br>186634 	Spinner: getSelection() during modify event should provide a mechanism to detect if the user has typed a value that is out of range
-<br>198430 	Font not set correctly in GC supplied to events of virtual table/tree
-<br>210306 	Menu items created in menuNeedsUpdate: do not show up
-<br>210826 	Enabled on NSButton seems to have no effect
-<br>210827 	Add pop-up menu, remove, select and crash
-<br>214030 	setTextLimit for SWT Spinner widget
-<br>214599 	Link Widget: hyperlink parsing mangles certain input strings
-<br>215183 	Shell with ON_TOP style stay behind of Shell with APPLICATION_MODAL style.
-<br>216900 	StyledText: Cannot overtype contents if text limit reached
-<br>217374 	VoiceOver does not work on Leopard (10.5.1)
-<br>217446 	TextLayout#getBounds() should return minimal bounds also if width was set
-<br>218295 	Clicking into white area besides tree with SimpleStyledCellLabelProvider selects single element
-<br>218502 	event loop exception starting mozilla
-<br>218606 	Shells no longer added to defaultWindowGroup as of 2.10.x
-<br>219306 	StyledText.getTextBounds does not work when using SWT.WRAP
-<br>219307 	GlyphMetrics behaves differently on carbon
-<br>219582 	SWT.KeyDown event.keyCode reports wrong key number for Marathi & Bengali
-<br>220057 	DND exception when dragging file within a Common Navigator in 3.4M5
-<br>220246 	Whenever the internal browser component is loaded, eclipse crashes
-<br>220398 	implement Table and Tree checkboxes
-<br>220462 	TableItem/Treeitem getBounds not implemented
-<br>220583 	All the JUnits with ui are failing on Linux for N20080227-0010
-<br>220836 	[Browser] SWT Safari Browser uses wrong 'user-agent' header resulting in some websites disabling functionality
-<br>220997 	Path.addString uses incorrect Transform
-<br>221128 	Mozilla fires wrong events when executing java script
-<br>221166 	Graphics Example GraphicAntialiasTab doesn't work
-</blockquote>
-
-<h2> SWT Build 3.4 31 - Tuesday February 26, 2008</h2>
-<blockquote>
-78974    	[Browser] EventListener:changing() called twice on Browser:setText()
-<br>103124 	On Linux,Key event doesn't stop propagating after it is responsed by an "ActionSet".
-<br>210430 	Shell.setMenuBar() does not work
-</blockquote>
-
-
-<h2> SWT Build 3.4 30 - Friday February 22, 2008</h2>
-<blockquote>
-28132 Repaint cheeze with editor bottom right corner
-<br>173794 	[Browser Mozilla]: Display-Filter (SWT.MouseWheel) no longer working when focus set to Browser
-<br>190992 	String truncation in non-English cases.
-<br>195585 	HTMLTransfer does not support non-English text.
-<br>210857 	Text box without 'SWT.V_SCROLL' uneditable
-<br>211284 	[Browser] Browser widget in ON_TOP shell not focused on first click (Mozilla/Safari)
-<br>211357 	FileViewer crashes
-<br>211359 	Apple+Q doesn't quit an SWT app, nor does menu selection of same
-<br>213489 	Increasing height of table rows via MeasureItem listener affects row height but not line height (OS X)
-<br>213937 	The Method getBorderWidth () from Control returns 0 every time
-<br>214557 	Combo#add(String,int) does update selection-index
-<br>215252 	frequent "invalid thread access"
-<br>217371 	[Browser] Support click-through for Browser and toolbar buttons
-<br>217842 	NPE in GC when creating problems View
-<br>218229 	API to open an URL in the OS default browser
-<br>218234 	Display keeps lock on runnable for timerExcec when disposed
-<br>218682 	2nd GC erases the first.
-<br>218700 	Tree getHeaderHeight not implemented
-<br>218702 	Tree getSelectionCount not implemented
-<br>219326 	Shell with custom region and SWT.NO_TRIM still has border
-<br>219601 	StyledText: Unexpected loss of mouse cursor
-<br>219621 	Tree get/set column order not implemented
-<br>219693 	Eclipse crashes when Browser closed with command-W
-</blockquote>
-
-<h2> SWT Build 3.4 29 - Tuesday February 12, 2008</h2>
-<blockquote>
-196191  Performance Improvement for JPEGFileFormat class initializer
-<br>199811 	Calling TableItem#setText(int,String) with sortDirection set to SWT.DOWN extermley slow
-<br>211360 	Graphics example can't select items from tree-menu
-<br>215335 	[browser] browser.execute(s) does not work on Linux/Mozilla when using line comments
-<br>217430 	Certain SWT controls do not display under linux
-<br>217764 	setting Device.DEBUG before creating Display fails silently
-<br>217854 	[Leopard] Errors logged during GC tests
-<br>218088 	Hover help in editor re-appears after restoring from minimze
-<br>218212 	Text failing jUnit tests
-<br>218215 	shells created too large with multple monitors
-<br>218514 	Control.print() does not work with gtk 2.4.x and greater
-<br>218547 	Tree selectAll doesn't
-</blockquote>
-
-
-<h2> SWT Build 3.4 28a - Thursday February 07, 2008</h2>
-<blockquote>
-217374 	VoiceOver does not work on Leopard (10.5.1)
-<br>218061 [browser] GRE version range upper bound should include 1.9.*
-</blockquote>
-
-<h2> SWT Build 3.4 28 - Wednesday February 06, 2008</h2>
-<blockquote>
-217849    	JUnit test failure - FontData
-<br>217854 	[Leopard] Errors logged during GC tests
-<br>217915 	[64] FileDialog consistently crashes
-</blockquote>
-
-<h2> SWT Build 3.4 27 - Tuesday February 05, 2008</h2>
-<blockquote>
-53608    	TableCursor bounds are wrong. Cursors does not fit TableItem bounds.
-<br>150559 	[DND] No insertion feedback for dragging in a tree on Mac
-<br>182196 	[CCombo] Mouse Listener Support for CCombo
-<br>191252 	Virtual Tree w/ columns: Items appear in wrong order when sortDirection is SWT.DOWN
-<br>198582 	SIGSEGV [libxpcom.so+0xc976d] _ZN13nsCOMPtr_baseD2Ev+0x13
-<br>207819 	JFace tests don't run on WPF
-<br>209016 	[Viewers] Virtual Tree Tests failing on OS X in I20071106-0816
-<br>212823 	Calling Region.add with only 1 polygon point causes a segfault
-<br>213194 	[Browser] setText crash with xulrunner 1.9 stream
-<br>214682 	[Browser] download crashes wih xulrunner 1.9
-<br>214802 	[browser] xulrunner 1.9 uses new interface for authentication
-<br>215388 	Add API to make the DropTarget more open
-<br>216805 	[Browser] shutting down XPCOM glue can lead to crash with sun 1.6 jre
-<br>217154 	Shell.checkOpen incorrectly named
-<br>217161 	List.getItemHeight can return 0
-<br>217179 	Table and Tree return incorrect default background and foreground color
-<br>217180 	TreeItem getBackground, getForeground, getFont not implemented
-<br>217242 	PNG cannot be loaded anymore, worked with releases before
-<br>217319 	Fix Iconify/DeIconify events on Shell
-<br>217336 	Linux mirroring problems
-<br>217470 	BIDI: Custom Draw Tree does not render properly in 2.8
-<br>217746 	Table test failures.
-<br>217758 	Combo test failures
-</blockquote>
-
-<h2> SWT Build 3.4 26 - Tuesday January 29, 2008</h2>
-<blockquote>
-66615    	SWT_AWT.new_Frame occasionally hangs
-<br>71478 	ImageData constructor accepts incomplete pixel data
-<br>133933 	[Browser] KeyDown events not fired on Safari
-<br>190793 	GTK Printing getClipping returns [0,0,1,1]
-<br>196864 	Toolbar should support animated gifs
-<br>198192 	Setting font on TableItem to same font (but different Font object) causes crash
-<br>199495 	in Device.getFontList() every FontData has height=0
-<br>205713 	It displays a wrong character when input "1" character by display.post() method on Mac OS X
-<br>210756 	Closing context menu programmatically does not work on the Mac
-<br>211224 	[Browser] MouseMove and MouseUp events not fired on Safari
-<br>211531 	[Browser] Stop calling HIJavaViewCreateWithCocoaView
-<br>216137 	[Linux] DateTime does not render correctly values < 10.
-<br>216287 	Compiler warnings in N20080123-0010 in swt tests
-<br>216340 	Display.readAndDispatch() always returns true
-<br>216431 	SWT_AWT: sun.awt.EmbeddedFrame is activated incorrectly
-<br>216482 	Different table behaviour after SWT.MeasureItem/SWT.PaintItem event under Windows XP and Vista
-<br>216593 	[browser] unavailable Safari events crash Eclipse
-<br>216614 	NPE in image
-</blockquote>
-
-<h2> SWT Build 3.4 25 - Tuesday January 22, 2008</h2>
-<blockquote>
-16987   [CCombo] does not respond to MouseWheel
-<br>47783 	Jpeg encoding (image height =1)
-<br>86457 	ImageLoader.save() doesn't save images 1 pixel wide
-<br>91317 	Spinner should support negative values
-<br>142965 	[64] Blank splitter dialogs until resized
-<br>166187 	TableItem#getBounds(0) incorrect when adding columns in asyncExec
-<br>182196 	[CCombo] Mouse Listener Support for CCombo
-<br>184063 	Logitech Revolution mouse doesn't scroll down editor when in "free-spinning" mode
-<br>191093 	[Dialogs] FileDialog missing default filter selection
-<br>191413 	Control's tooltip displays abnormally on linux platform.
-<br>193433 	[Combo] Incorrect initial focus in Generate constructor using fields
-<br>197224 	Annoying Message Box "prohibit running ActiveX controls" appear in browser when accessing page with applet
-<br>204127 	[Browser] SWT browser eats eclipse shortcuts when in edit mode
-<br>205351 	[CCombo] Adding a KeyListener changes expected traversal behavior
-<br>206743 	Tree with columns has drawing errors when resizing to a minimum
-<br>207613 	[Leopard] Progress dialog does not properly close on Leopard
-<br>210845 	SWT.Wrap for text labels doesn't wrap
-<br>211188 	Looks like squiggle and error_underline style have fat dash at end
-<br>211865 	Tooltip always prompt up in the wrong place
-<br>212366 	Mac OS X Context menu invocation is mouse down, not mouse up
-<br>213426 	Slow response for SWT Virtual Table Selection
-<br>215431 	Label: SWT.LEFT, SWT.CENTER, SWT.RIGHT not implemented
-<br>215592 	Breaking change in Eclipse 3.4M4 - Images loaded as type SWT.ICON cannot be rendered by GC.drawImage()
-<br>215875 	Table/TreeEditor broken on OS-X since at least I20071218
-<br>215881 	download links on swt main page broken
-</blockquote>
-
-<h2> SWT Build 3.4 24 - Tuesday January 15, 2008</h2>
-<blockquote>
-22261    	SWT should support a tri-state check box
-<br>42488 	Mouse cursor does not hide when typing on Windows
-<br>120192 	org.eclipse.swt.ole.win32.OleAutomation has a reference leak
-<br>139871 	Spinner does not support floating point data entry correctly
-<br>152822 	Incorrect key events reported when NO_FOCUS style used
-<br>158542 	StyledText: background not fully filled when using multi-font
-<br>172784 	FileDialog should provide access to selected filter after closing
-<br>177589 	up/down arrows don't work in a combobox on Linux
-<br>200956 	WinXP: Shell draws focus on setVisible(true)
-<br>210925 	Display.post() with german Umlaut does not work
-<br>211685 	DateTime fires spurious SelectionEvents
-<br>213923 	popup menu has bunch of empty items if it contains many items
-<br>214160 	Issues with transparent images when advanced graphics is on
-<br>214754 	ControlExample's "Select Listeners" has sizing problems
-<br>215148 	Inconsistent Spinner behaviour across platforms
-</blockquote>
-
-
-<h2> SWT Build 3.4 23 - Tuesday January 08, 2008</h2>
-<blockquote>
-49696   [browser] Mouse event listeners does not work in SWT Browser Widget
-<br>73019 	ImageLoader NPE
-<br>194393 	LocationListener#changed is not notified for local links
-<br>205264 	Path.addArc method does not work as expected on Apple OS X
-<br>205736 	[OLE] MS Word OLE Crash
-<br>205866 	SWT.Settings - no notification on Vista
-<br>210063 	[Browser] XGL enabled Suse : Blurred ConfirmEx dialog with long long URL string
-<br>211757 	[Leopard] SWT arrow buttons up and left point down and right in Mac OS X Leopard
-<br>211949 	[Browser] Linux(SLED10), Eclipse crash when XPCOM error in Mozilla OnStateChange callback
-<br>212851 	StyledText - getStyleRanges(int start, int length) returns wrong style range
-<br>212989 	[DateTime] Changing the month and showing a MessageBox leads to infinite SelectionEvents
-<br>213017 	Rollover tooltip for owner-drawn Tree appears behind detached Shell
-<br>213200 	[Leopard] errors logged to console by CGPathGetCurrentPoint
-<br>213247 	Combo box in CVS commit wizard leaves garbage behind on resize
-<br>214037 	Excel + org.eclipse.ui.PartInitException: Invalid Input
-</blockquote>
-
-<h2> SWT Build 3.4 22a - Tuesday December 11, 2007</h2>
-<blockquote>
-187039 Temporary screen cheese in trees when scrolling
-<br>191655 Table#getItem(Point) inconsitent on OSX when used without FULLSELECTION
-<br> 212610 Cannot delete text in Combo box
-<br>212671 table.setToolTipText("") does not disable native tooltips
-</blockquote>
-
-<h2> SWT Build 3.4 22 - Monday December 10, 2007</h2>
-<blockquote>
-21619    	Programmatically dropdown a combo
-<br>37031 	Full screen exclusive (not maximized) support for SWT
-<br>102570 	GTK-BIDI: Coordinate mirroring in GC
-<br>177589 	up/down arrows don't work in a combobox on Linux
-<br>200322 	[Leopard] setRegion of shell doesn't work with the new region on Mac OS X 10.5
-<br>206682 	Combo with SWT.READ_ONLY doesn't fire mouseevents
-<br>210995 	SWT Combo doesn't gain focus during choice selection in Eclipse 3.3/GTK
-<br>211623 	Server editor opens when project node is selected in server view
-<br>211678 	Compiler warnings in N20071201-0010
-<br>212366 	Mac OS X Context menu invocation is mouse down, not mouse up
-</blockquote>
-
-<h2> SWT Build 3.4 21 - Tuesday December 04, 2007</h2>
-<blockquote>
-111259    	[DND] Insertion mark in TreeViewer does not go away on GTK
-<br>143382 	Tree fails to register double-click while tool tip visible
-<br>144907 	[OLE] OLE int->short change to test and apply post-3.2
-<br>191655 	Table#getItem(Point) inconsitent on OSX when used without FULLSELECTION
-<br>197839 	removing paint and erase listeners from Tree don't re-enable native rollover tooltips
-<br>200322 	[Leopard] setRegion of shell doesn't work with the new region on Mac OS X 10.5
-<br>206346 	GTK-BIDI: RTL support in ExpandBar
-<br>208427 	GTK-BIDI: RTL support in MenuItems
-<br>210847 	SWT.ON_TOP on Shell doesn't appear to work
-<br>210861 	Text alignment for text box doesn't work
-<br>210869 	Enabled on toolbar has no effect
-<br>210873 	Icons for tooltip balloons don't work
-<br>210894 	Examples that use StyledText crash on startup
-<br>210942 	Some convenience methods for StyledText
-<br>211194 	Rollover tooltips in owner-drawn Tree only shown after delay
-<br>211195 	Shell decorations flicker when clicking into rollover tooltips in owner-drawn Tree
-<br>211196 	Rollover tooltips displaced in owner-drawn Tree without icons
-<br>211197 	Doubleclick does not work on owner-drawn TreeItem with rollover tooltip
-<br>211220 	Add Browser to ControlExample
-<br>211361 	GraphicsExample crashes
-</blockquote>
-
-<h2> SWT Build 3.4 20 - Tuesday November 27, 2007</h2>
-<blockquote>
-82206    	Solaris SWT GTK 3.1M4 has dependancy on libgcc_s.so
-<br>85699 	[64] Better error message required when running x86-64 SWT on a 32-bit VM
-<br>109888 	Browser fails to load when Mozilla compiled against libstdc++.so.6
-<br>114036 	[build] Support building libswt-awt-XXXX.so on Solaris/Motif
-<br>199292 	[leopard] Snippet260 fails (9A527)
-<br>204289 	Closing context menu programmatically does not work when shell not active
-<br>207394 	[OLE] getLicenseInfo in OleControlSite causes Program Compatibility Error in Vista with some Active X Controls which do not implement IClassFactory2 interface
-<br>208837 	[Browser] On Linux, Browser does not send focus/activation events
-<br>209960 	Combo widgets cause area beneath them to flicker when resized
-<br>210359 	Shouldn't crash VM if running on pre-Objective C 2.0 systems
-<br>210412 	GC.setLineAttributes() uses "join" as "cap"
-</blockquote>
-
-<h2> SWT Build 3.4 19 - Tuesday November 20, 2007</h2>
-<blockquote>
-82295    	properties http.proxyPort and http.proxyHost ignored by SWT browser
-<br>100095 	[DND] Consider making URLTransfer public
-<br>124965 	SWT Table scrolling performance degrades as the number of columns increases
-<br>165468 	INHERIT_FORCE and editable Text produces garbage on scroll
-<br>206432 	[Browser] Linux: SSL navigation is disabled when Mozilla profile directory does not exist
-<br>206894 	Linux - Control.setEnabled disables more than it should
-<br>207181 	FAQ needed to describe: "Modal dialogs do not stay on top on Solaris 10 with CDE / dtwm"
-<br>209014 	GTK-BIDI: RTL BIDI problems in SWT StyledText
-<br>209339 	Modal shell loses focus when a second shell is opened.
-<br>209417 	Please add files intended for Win64 on Itanium support.
-<br>209650 	Cleanup after Windows browser control dispose is flawed
-<br>209752 	MenuItem#toString() behaves differently across platforms.
-<br>209854 	SWTException when loading large win32 ICO files
-<br>209863 	Path leaks currentFigure and currentPoint when disposed
-<br>210214 	[OLE] Snippet265 leaks
-<br>210284 	Auto hide scrollbars in Tree/Table/List
-<br>210303 	bad release in NSBezierPath
-</blockquote>
-
-<h2> SWT Build 3.4 18 - Tuesday November 13, 2007</h2>
-<blockquote>
-42730    	[Clipboard] NPE while closing workbench on calling Clipboard.dispose
-<br>141282 	DnD doesn't support special characters
-<br>188271 	Ampersand not shown in tooltips
-<br>191484 	move initial build scripts from build project into swt
-<br>194143 	WM_MOUSEWHEEL can send fractional deltas
-<br>205648 	Vertical Scrolling with Mouse Wheel not working in Editors
-<br>205745 	NullPointerException in TableItem.getBounds because of SWT.EraseItem listener
-<br>206714 	Combo#toString() behaves differently on linux/gtk/x86_64 and windows
-<br>206715 	DateTime#toString() behaves differently on linux/gtk/x86_64 and windows
-<br>207052 	Tree Listening to MeasureItem returns incorrect Client Area
-<br>207628 	Keyboard selection does not work with context menus on Leopard
-<br>208503 	SWT_AWT bridge on OS X reports incorrect message with failure
-<br>208571 	[leopard] Crash when using Eclipse 3.3.1.1 and Instantiation's SWT Designer
-<br>208649 	cannot input china punctuation
-<br>208675 	Image cheese when width of TreeColumn = 0
-<br>208816 	Update custom build.xml for source generation
-<br>208975 	Unable to enter vertical bar (|) in Eclipse for mac OS X with French Canadian keyboard
-<br>209014 	GTK-BIDI: RTL BIDI problems in SWT StyledText
-<br>209022 	DateTime cannot be shown without a border
-<br>209028 	Table and List test failures
-<br>209039 	display.getMonitors() not implemented
-<br>209088 	Shell.getAlpha() returns inconsistent values
-<br>209225  Program.findProgram returns null
-<br>209256 	[website] Update links to IBM docs
-<br>209468 	StyledText#setSelection() does not reveal caret at end of line
-<br>209543 	Call Shell.setFullScreen(true) make the shell invisible
-</blockquote>
-
-<h2> SWT Build 3.4 17 - Tuesday November 06, 2007</h2>
-<blockquote>
-168979    	transparent shell
-<br>184507 	Tree#setItemCount and Table#remove are slow when removing items
-<br>202328 	investigate OpenGL support on Solaris
-<br>204393 	TitleAreaDialog's banner image has extraneous white borders
-<br>204561 	Table Javadoc is conflicting with TableEditor
-<br>205794 	Provide SWT.UNDERLINE_SQUIGGLE text style
-<br>207827 	[Leopard] VM crash while dismissing dialog
-<br>207927 	ITALIC and BORDER_* unreadable
-<br>208027 	Printer prints one page too much when page range restricted
-<br>208356 	[Browser] Inactive scroll bar for Browser widget
-<br>208566 	[64] cheese can appear if SetPoint is running
-</blockquote>
-
-
-<h2> SWT Build 3.4 16b - Thursday November 01, 2007</h2>
-<blockquote>
-208007 	line wrap at page end makes page number disapear when printing
-<br>208188 	MenuItem#isEnabled() works differently across platforms
-<br>208209 	Combo immediately closes
-</blockquote>
-
-<h2> SWT Build 3.4 16a - Thursday November 01, 2007</h2>
-<blockquote>
-78856    	[Clipboard] SWT has no support for Image copy to clipboard
-<br>205937 	borderStyle and underlineStyle flags need clarification
-<br>207558 	Line numbers are printed too low
-</blockquote>
-
-<h2> SWT Build 3.4 16 - Wednesday October 31, 2007</h2>
-<blockquote>
-202782  Indent in Column Header when sorting on Windows Vista
-<br>204571 	Eclipse process halted when interacting with tree.
-<br>204953 	[64] New project wizard does not work on Vista 64 bits
-<br>206315 	GTK-BIDI: RTL support in CoolBar.
-<br>207744 	[Contributions] Debug toolbar dropdown menu closes when submenu hidden
-<br>207852 	Widget disposed error when running UI test suite on WinXP
-<br>207901 	custom drawn tree: 1st selection behaves oddly
-</blockquote>
-
-<h2> SWT Build 3.4 15a - Monday October 29, 2007</h2>
-<blockquote>
-206315    	GTK-BIDI: RTL support in CoolBar.
-<br>207266 	Target editor's content tab buttons disappear completely
-<br>207744 	[Contributions] Debug toolbar dropdown menu closes when submenu hidden
-<br>207852 	Widget disposed error when running UI test suite on WinXP
-</blockquote>
-
-<h2> SWT Build 3.4 15 - Monday October 29, 2007</h2>
-<blockquote>
-19602    	[Printing] Line numbers aren't printed
-<br>57151 	[64] 64 bit support needed for Windows XP 64-Bit Edition
-<br>117580 	Modal behavior on GTK when I ask for modeless
-<br>205795 	UNDERLINE_ERROR text style does not work for IME strings
-<br>206602 	GTK-BIDI: RTL support in ColorDialog
-<br>206609 	GTK-BIDI: RTL support in FontDialog
-<br>206661 	GTK-BIDI: RTL support in DirectoryDialog.
-<br>206722 	GTK-BIDI: RTL support in FileDialog.
-<br>206743 	Tree with columns has drawing errors when resizing to a minimum
-<br>206749 	GTK-BIDI: RTL support in MessageBox
-<br>206786 	GTK-BIDI: RTL support in ScrollBar.
-<br>207165 	org.eclipse.swt.win32.win32.x86 version not incremented for 3.3.1.1
-<br>207263 	NPE in org.eclipse.swt.widgets.Control.WM_MENUSELECT
-<br>207266 	Target editor's content tab buttons disappear completely
-<br>207347 	Snippet279 draws bad (draw icon with GDI+ gc)
-<br>207472 	"Dancing Scrollbar" in Tree
-<br>207605 	GTK-BIDI: RTL support in PrintDialog
-</blockquote>
-
-<h2> SWT Build 3.4 14 - Tuesday October 23, 2007</h2>
-<blockquote>
-205818 Adherent TextStyles must be continuous
-<br>205928 underline text style needs clarification
-<br>206743 Tree with columns has drawing errors when resizing to a minimum
-<br>206806 getItemCount() incorrect in Vista for VIRTUAL trees
-</blockquote>
-
-<h2> SWT Build 3.4 13 - Tuesday October 16, 2007</h2>
-<blockquote>
-41364 GTK-BIDI: RTL support in Combo
-<br>206095 	swt-3.3-gtk-linux-x86 Printer crash under Ubuntu Gutsy
-</blockquote>
-
-<h2> SWT Build 3.4 12 - Tuesday October 09, 2007</h2>
-<blockquote>
-57151  		[64] 64 bit support needed for Windows XP 64-Bit Edition  
-<br>142965  [64] Blank splitter dialogs until resized  
-<br>198673  SWT: Program.getImageData() returns null when icon name has quotes.  
-<br>198981  ppc/motif Xdefaults not honored on version 3.3  
-<br>205130  Expanding/Collapsing tree nodes in Quick Windows closes window  
-<br>205459  Exception in Mozilla browser code not caught, leads to crash  
-</blockquote>
-
-<h2> SWT Build 3.4 11 - Tuesday October 02, 2007</h2>
-<blockquote>
-73645    	Custom caret problems
-<br>115666 	BIDI mirroring not implemented on GTK
-<br>203571 	Key event still gets response when ModalDialog is up
-<br>205063 	Compare viewer does not draw background colors for changes (StyledText)
-<br>205099 	Creating a button clears mnemonics
-</blockquote>
-
-<h2> SWT Build 3.4 10c - Monday September 24, 2007</h2>
-<blockquote>
-204330 [Launcher] JVM crash on splash teardown on linux.gtk.x86
-</blockquote>
-
-<h2> SWT Build 3.4 10a - Wednesday September 19, 2007</h2>
-<blockquote>
-199137 Debug view scrolls right when thread suspends
-<br>203648 Icon above cursor on drag and drop
-<br>203817 Scrolled custom draw trees not drawn correctly in RTL
-</blockquote>
-
-<h2> SWT Build 3.4 10 - Monday September 17, 2007</h2>
-<blockquote>
-165108    	Spinner can not apply the value that input to text-box.
-<br>171909 	[DND] SWT.Expanded Event not given from DND-Feedback sometimes
-<br>195254 	[consistency] Left Mouse Down is Not recieved on TabFolder on Linux.Works fine on Windows
-<br>196810 	Compiler warnings in N200707170010
-<br>203491 	SWT pre-built libraries in org.eclipse.swt.carbon.macosx not universal
-</blockquote>
-
-<h2> SWT Build 3.4 09 - Tuesday September 11, 2007</h2>
-<blockquote>
-139647    	StyledText.getOffsetAtLocation can't return offset at end of a line
-<br>201853 	Caret position is incorrect when clearing full selection by clicking left mouse button in Text widget
-</blockquote>
-
-<h2> SWT Build 3.4 08a - Tuesday September 04, 2007</h2>
-<blockquote>
-179168 	Focus change will make the uncomposed text lost in IME
-<br>187125 [DND] Image effect not showing in RTL
-<br>193515 	[DND] Cannot drag a single character selection in StyledText
-<br>196487 	Korean input text does not display correctly with C4EB
-<br>199099 	ExpandBar is not high contrast complient. Cannot manually fix this issue.
-<br>199156 	ExpandBar does not scroll properly
-<br>201326 	computeSize on empty Link widget returns 0 for height
-</blockquote>
-
-<h2> SWT Build 3.4 08 - Tuesday August 28, 2007</h2>
-<blockquote>
-108591    	SWT StyledText does not support inline Input method
-<br>148530 	Text SWT.MULTI with backgroundimage don't show deleted characters
-<br>165108 	Spinner can not apply the value that input to text-box.
-<br>180686 	DBCS3.3: strikeout rendering issue on WindowsVista
-<br>189292 	[DND] FileTransfer disables image feedback
-<br>192861 	VM crash opening browser widget with much html
-<br>196791 	SWT ToolTip does not render Arabian text tooltip correctly on SLED10 Linux
-<br>200101 	TableColumn sets image when SWT.CENTER alignment is used.
-<br>200153 	Provide AllowSetForegroundWindow in org.eclipse.swt.internal.win32.OS
-<br>200694 	TableItem.getBounds() wrong.
-<br>201181 	Basic Authentication of XMLHttpRequest crashes Eclipse
-<br>201217 	NPE in Canvas.kEventControlSetFocusPart(Canvas.java:150)
-</blockquote>
-
-<h2> SWT Build 3.4 07 - Tuesday August 21, 2007</h2>
-<blockquote>
-37031 	Full screen exclusive (not maximized) support for SWT
-<br>45294 	[Jobs] NPE in .log using 1021
-<br>76182 	Display.setSynchronizer considered harmful
-<br>140270 	Mouse wheel does not fire selection event on Scale
-<br>150365 	setImeInputMode() is not correct with MS-IME2000
-<br>164755  Inconsistent z-order for ON_TOP shells between win32 and MacOS
-<br>189149 	Scale widget freaks out if layout() is called from a selection listener.
-<br>194707 	Display.getDefault() deadlocks with Display constructor
-<br>199109 	Changing foreground color on Canvas does not work
-<br>194146 	CVSUIPlugin.stop not being called
-<br>196979 	Shell.getBounds() wrong when shell is maximized.
-<br>197964 	Table.setBackground() fails if TableItem.setBackground() was used
-</blockquote>
-
-
-<h2> SWT Build 3.4 06b - Tuesday August 14, 2007</h2>
-<blockquote>
-TextLayout improvements
-<br>199463 	org.eclipse.swt.List is not keyboard-only accessable
-</blockquote>
-
-<h2> SWT Build 3.4 06a - Wednesday August 08, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-7747    Arrow keys should switch focus between buttons
-<br>198922    	CTabFolder code causes Widget is disposed exception
-<br>199133 	Combo#cut() does not place deleted text to clipboard
-</blockquote>
-
-<h2> SWT Build 3.4 06 - Thursday August 02, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-165108  Spinner can not apply the value that input to text-box.
-<br>178100 	Spinner.getSelection does not return correct value within Modify listener
-<br>180686 	DBCS3.3: strikeout rendering issue on WindowsVista
-<br>194275 	CTabFolder close box should highlight without needing mouse move
-</blockquote>
-
-<h2> SWT Build 3.4 05 - Tuesday July 31, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-121978  spinner's listener problem on Mac
-<br>153936  Eclipse freezes when opening an editor
-<br>165108 	Spinner can not apply the value that input to text-box.
-<br>189292 	[DND] FileTransfer disables image feedback
-<br>195650 	Multiselection with Shifht ARROW_UP/DOWN not working on MAC
-<br>197431 	Spinner.getSelection() doesn't return the correct value if it has been updated by typing
-<br>198053 	Invoking spinner.getSelection() in a modify event causes infinite loop
-</blockquote>
-
-<h2> SWT Build 3.4 04 - Tuesday July 24, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-49724    	Tree computeSize different between platforms
-<br>167562 	SIGSEGV in Tree#destroyItem()
-<br>179464 	Combo doesn't allow to change background color more than once
-<br>179773 	TreeViewer setSelection does not scroll horizontally to show selection
-<br>191260 	NPE in Display.readImageRef
-<br>192700 	CCombo does not loose focus when hidden
-<br>193181 	Gdip.Graphics_FillRectangle needs to flip the rect if width < 0 or height < 0
-<br>193213 	ArrayIndexOutOfBounds when initializing GC
-<br>193561 	public Image (Device device, String filename) fails on WinCe
-<br>194702 	[browser]Click URL linked to a new window, pop up two browser window
-<br>195650 	Multiselection with Shifht ARROW_UP/DOWN not working on MAC
-<br>197336 	Negative values not displaying with Read-Only style combo.
-</blockquote>
-
-<h2> SWT Build 3.4 03 - Tuesday July 17, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-177578    	ExpandItem (of the ExpandBar) returns wrong header height in Gnome (Debian Linux)
-<br>192861    	VM crash opening browser widget with much html
-</blockquote>
-
-
-<h2> SWT Build 3.4 02 - Tuesday July 10, 2007</h2>
-
-
-<h2> SWT Build 3.4 01 - Tuesday July 3, 2007</h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-110092 - [WorkbenchLauncher] Progress in splash cannot render in Chinese
-<br>161863 - Execution flag for build.sh in src.zip missing
-</blockquote>
-
-<h2> SWT Build 3.3 045g - Friday June 8, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-191741 - cheese in java editor
-</blockquote>
-
-<h2> SWT Build 3.3 045f - Thursday June 7, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-191412 - FocusIn and FocusOut events are processed with different cases in Shell.
-</blockquote>
-
-<h2> SWT Build 3.3 045e - Thursday June 7, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-191372 - Cannot unminimize eclipse from dock
-</blockquote>
-
-<h2> SWT Build 3.3 045d - Thursday June 7, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-179945 - GC constructor thread invalid access missing from API Javadoc  
-<br>179946 - GC dispose thread invalid access missing from API Javadoc  
-<br>191072 - Existing shell window title gets overwritten  
-</blockquote>
-
-<h2> SWT Build 3.3 045c - Tuesday June 5, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-180482 - Synchronize view sometimes goes deafult color when ctrl adding files
-</blockquote>
-
-<h2> SWT Build 3.3 045b - Friday June 1, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-190262 - CCombo doesn't receive key-events  
-<br>190480 - regression: FocusOut not fired for Texts in an SWT.APPLICATION_MODAL shell  
-</blockquote>
-
-<h2> SWT Build 3.3 045a - Thursday May 31, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-129456 - SWTSpy code has no license specified  
-<br>149040 - Change javadoc for Table addSelectionListener  
-<br>189992 - Column in problem view not properly refreshed when resizing the column width  
-</blockquote>
-<h3><a NAME="Other changes in this build"></a>Other changes in this build</h3>
-<ul>
-<li>Javadoc bash</li>
-<li>Copyright update</li>
-</ul>
-
-<h2> SWT Build 3.3 045 - Thursday May 31, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-158043 - [Mac] Right clicking on app in Dock and selecting Quit does nothing if file needs to be saved  
-<br>173559 - Javadoc for GC methods requiring advanced graphics  
-<br>178758 - SWT.MOVEMENT_* needs better Javadoc  
-<br>185862 - AIX 5.3 motif - Characters above \u007f show as "iso8859" in some swt widgets  
-<br>189339 - SWT event loop doesn't dispatch Apple Event.  
-<br>189465 - Browser can crash on RHEL3 if xulrunner is present (motif only)  
-<br>189862 - Link to wrong file on Snippets page  
-<br>189960 - [browser] executing window.print() does not print  
-<br>189970 - GC drawImage fails on bidi + icon + double buffered  
-<br>190033 - add library build support for s390  
-</blockquote>
-
-<h2> SWT Build 3.3 044g - Friday May 25, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-183430 - [DND] Drag and Drop between groups causes Eclipse thread to hang in COM.DoDragDrop() indefinitely.  
-<br>188932 - Can't enter paths in Text fields on Red Hat Workstation 5  
-</blockquote>
-
-<h2> SWT Build 3.3 044f - Friday May 25, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-188859 - [render] colored labels shifted to the right and margin smaller between icon and text  
-</blockquote>
-
-<h2> SWT Build 3.3 044e - Thursday May 24, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-181410 - [Browser] browser steal focus on IE7  
-<br>186722 - Foreground color not used from EraseItem callback  
-<br>187273 - Dialog package explorer on move reorg user input page scrolled  
-</blockquote>
-
-<h2> SWT Build 3.3 044d - Thursday May 24, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-185607 - Can't copy and paste into dialog text fields from some applications
-<br>187971 - Custom Draw Tree brings cheese when using Image and Bold  
-<br>188265 - Trees flicker when focus changes  
-<br>188381 - Tree Viewer Collapse Extremely Slow on Vista  
-<br>188567 - TreeEditor closes CCombo after 500ms  
-</blockquote>
-
-<h2> SWT Build 3.3 044b - Thursday May 17, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-185559 - Eclipse crashes with "JVM terminated. Exit Code=1  
-<br>187560 - READ_ONLY combos not tall enough  
-<br>187597 - BeginBufferedPaint does not work in RTL and advanced  
-</blockquote>
-
-<h2> SWT Build 3.3 044a - Wednesday May 16, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-183503 - Text formatting finishes too early when pasted
-</blockquote>
-
-<h2> SWT Build 3.3 044 - Wednesday May 16, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-185916 - StyledText.setSelectionForeground(Color) has no effect  
-<br>186843 - [OLE] IlegalArgumentException while closing a dialog 
-<br>187215 - Enabling owner draw removes horizontal scrollbar  
-</blockquote>
-
-<h2> SWT Build 3.3 043 - Wednesday May 16, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-55142 - Horizontal scrollbar disabled with editor content horizontally scrolled  
-<br>66101 - [browser] Embedded browser makes annoying "click" sound  
-<br>182083 - Redraw artifacts using GlyphMetrics  
-<br>183528 - Editor goes bezerk when pasting Indian script  
-<br>184916 - Variables view not painted correctly after column resize  
-<br>184950 - cheese in the console  
-<br>185231 - Mac: Cannot get rid of native tooltip in a table with columns  
-<br>185910 - Custom drawing listeners produce display artifacts when used with virtual TreeViewer  
-<br>186378 - To input Japanese character in Java editor causes dot garbages ONLY at first.  
-</blockquote>
-
-<h2> SWT Build 3.3 042 - Tuesday May 15, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-67652 - some GC calls are off by one pixel in mirrored mode  
-<br>158122 - BIDI: StyledText does not paint selection well when mirrored  
-<br>186580 - GC#drawRoundRectangle looks ugly on advance mode  
-<br>186611 - Alpha channels being lost on Windows XP classic theme  
-<br>186757 - No context menus in tables  
-</blockquote>
-
-<h2> SWT Build 3.3 041 - Friday May 11, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-75813 - [browser] StatusTextEvent not fired when hovering over link on the mac  
-<br>120725 - [DND] Drag and Drop - Snippet185 fails  
-<br>154036 - [Browser] Cannot Edit a Html IFrame which is in swt  
-<br>163716 - Benchmark difference between SWT-GTK Linux and SWT windows  
-<br>164120 - StyledText can open out of sync with scrollbar  
-<br>177156 - [Browser] The javascript 'top.close() ' crashes eclipse  
-<br>182547 - tree tooltip problems with "activation follows mouse" (tweakui/x-mouse)  
-<br>183640 - Combo on Linux missing, doesn't show up. FormData  
-<br>184111 - [DND] Not possible to drag multiple classes to a new package  
-<br>184592 - Calling List#setTopIndex() on Lists created with SWT.V_SCROLL scrambles the widget  
-<br>185089 - Compile error in org.eclipse.swt.examples/plugin.xml  
-<br>185313 - Inconsistency with focus on selected action  
-<br>185529 - horizontal scrollbar missing in owner drawn tree  
-<br>185532 - wrong selection length in owner drawn table  
-<br>185534 - Table sends MenuDetect twice  
-<br>186028 - BIDI: GC.getStyle() never returns SWT.RIGHT_TO_LEFT in SWT.DOUBLE_BUFFERED mode on Vista  
-<br>186034 - NPE in Shell.filterProc  
-<br>186054 - [DND] Combo Drag-and-drop performed twice  
-<br>186335 - Eclipse active without shell activation events  
-<br>186448 - Exceptions selecting tree items  
-<br>186557 - No Deactivate events from ON_TOP shells  
-</blockquote>
-
-<h2> SWT Build 3.3 040 - Tuesday May 8, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-150357 - [Linux] [cairo] GC.setAdvance(true) and subsequent drawing of images fails  
-<br>178779 - [typing] IAE in JFaceTextUtil.getPartialTopIndex()  
-<br>180511 - [typing] Editor flashes when extending selection by word with Ctrl+Shift+Right  
-<br>181843 - On Mac, Widget.kEventControlTrack(int, int, int) inserts unacceptable delays into asyncExec message processing  
-<br>185263 - Link widget calculates incorrect width when "&" is part of text  
-<br>185617 - [Presentations] AIOBE on CTabFolder setSelectionBackground  
-</blockquote>
-
-<h2> SWT Build 3.3 039b - Wednesday May 2, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-184266 - [Viewers] Tree on Extensions page initially scrolled to the right
-<br>185090 - Cannot Start (VM crash)
-</blockquote>
-
-<h2> SWT Build 3.3 039a - Wednesday May 2, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-184922 - GTK: crash when calling Table.getItemHeight()
-</blockquote>
-
-<h2> SWT Build 3.3 039 - Tuesday May 1, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-184774 - Copy-paste error in SWT.RIGHT javadoc  
-<br>184836 - Missing shell activation events
-</blockquote>
-
-<h2> SWT Build 3.3 038 - Monday April 30, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-127839 - many ControlExample example widgets never lose their background  
-<br>127979 - backgroundimage bug in gnome  
-<br>136332 - Shell.getSize is wrong for non-decorated shells  
-<br>136739 - SWT Table always has lines visible in GTK  
-<br>141687 - Background with INHERIT_DEFAULT has wrong origin for children  
-<br>149208 - Link widget foreground color not set  
-<br>150751 - In GTK, setBackgroundImage and setBackgroundMode failed when children setForeground  
-<br>153191 - setting NO_BACKGROUND style on Canvas turns it fully black  
-<br>153197 - Canvas' parent does not lose background image  
-<br>160292 - NPE when opening existing workspace on Motif  
-<br>166956 - [Browser] SSL Security Panel doesn't response after shown on XULRunner1801 at SuSe Linux 10  
-<br>167686 - Background/Foreground Color style bit not respected without a border/scroll bar  
-<br>168034 - Deadlock in browser control (IE?)  
-<br>169290 - [browser] Different behavor of opening a PDF file when setting URL and clicking the URL  
-<br>169292 - [Browser] Download same file fails after cancel twice  
-<br>169293 - [browser] AD pop-up doesn't show if flash plug-in not installed.(No OpenWindow listener)  
-<br>169664 - On platforms other than Windows, setting background color to Composites inside TabFolder doesn't work as expected (like in Windows)  
-<br>172757 - popups close on resize  
-<br>172792 - Pressing Ctrl+PageUp or PageDown in Search Window crashes JVM  
-<br>174454 - StyledText advanced text services not working for IBM Korean C4EB  
-<br>175259 - SWTException stacktrace misleading when in Display.syncExec  
-<br>176491 - MessageBox consumes 100% CPU on Linux/GTK  
-<br>177374 - SEGV in libswt-pi-gtk-3330  
-<br>178008 - Offsets when rendering text in a tree/table item  
-<br>178388 - CTabItem gets clipped on right hand side  
-<br>178495 - [Browser] Control-N from Browser causes multiple errors.  
-<br>179105 - Revert CTabItem unselected tab separator style for simple tabs  
-<br>179209 - Gray box surrounding help icon looks awful in manifest editors (Linux)  
-<br>179266 - [Presentations] DBCS3.3: tab label "..." isn't added in 3.0 presentation  
-<br>179465 - [Browser]Crash on Linux when visiting www.cnn.com in swt 3.3m6  
-<br>180621 - overlap image transparency failure in 16bits color quality  
-<br>181931 - double-click after opening brace does not select all block  
-<br>182906 - Table selection with CTRL+SHIFT does not send events  
-<br>183368 - [64] JVM crash during startup on Linux x86_64 with I20070418-1012  
-<br>183830 - "Xlib: unexpected async reply" and deadlock in GLX.glXMakeCurrent(int, int, int)  
-<br>184385 - SetItemCount() in Table extremly slow on MacOSX when lowering itemcount  
-</blockquote>
-
-<h2> SWT Build 3.3 036a - Tuesday April 24, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-82500 - TabFolder should not use PtCalcCanvas in getClientArea  
-<br>119109 - KeyEvent.doit does not work for a CCombo  
-<br>133597 - column resize cursor shows at wrong position  
-<br>154101 - GTK Printing  
-<br>162942 - [Browser] Textbox on webpage locks up after pushing "Back"  
-<br>169291 - [DnD] Combo: Incorrect DragStart when mouse hover still inside combo region  
-<br>176307 - [Browser] SWT Browser crashes Eclipse if page contents set by setText contains a named anchor  
-<br>179203 - [OSX] GC(Printer).getClipping() is always [0,0,0,0]  
-<br>179204 - [OSX] Printer instance unusable after cancelJob()  
-<br>179368 - Need to draw text selection using native functionality  
-<br>181956 - Program.findProgram(String) unexpectedly returns null  
-<br>182498 - org.eclipse.swt.widgets.Text is not editable and set a _foreground_ color, the background color changes to default.  
-<br>182748 - StyledText cheese when redrawing selection in FULL_SELECTION mode  
-<br>182777 - Image.getImageData crashes VM in win32.OS.MoveMemory  
-<br>182810 - [OpenGL] GLCanvas.isCurrent() always returns false on Windows  
-<br>182990 - NullPointerException in monitorEnumProc() in Class Display  
-<br>182991 - widget is disposed exception when disposing TableEditor  
-<br>183253 - protected methods in wpf version of TextTransfer are public in others  
-<br>183254 - Mac: calling TreeItem.setText can cause a SetData callback  
-<br>183280 - TableCursor.paint() uses string != "", should be string.length() > 0  
-</blockquote>
-
-<h2> SWT Build 3.3 036 - Tuesday April 17, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-61023 - [Program] Program.getImageData() returns null for executables (*.exe files)  
-<br>81467 - Draw2D fails to print on Mac OSX 10.3
-<br>86785 - [Program] Program.findProgram(<Extension>) doesn't find Icons for IconHandlers  
-<br>96244 - [Program] Program.findProgram does not pick up customized applications for file extensions  
-<br>143707 - sorted Table column background overrides TableItem background  
-<br>148891 - [Program] Program.getImageData() fails for Adobe Acrobat and others.  
-<br>153936 - Eclipse freezes when opening an editor  
-<br>156817 - Background-Color of TreeItem should override Sort-Column-Color  
-<br>164822 - clicking behind selected text in Text widget misplaces the cursor  
-<br>167728 - Vista has cheese when resizing a column  
-<br>177401 - SWT will not build on QNX Neutrino 6.3 and greater  
-<br>178294 - UnsatisfiedLinkError: no swt-com-wpf-3332 or swt-com-wpf  
-<br>178639 - DateTime and Spinner preferred height wrong on Vista  
-<br>178748 - Sort-Column draws over customownerdrawn selection color in Tree  
-<br>178766 - ToolTip jumps around  
-<br>180818 - [Browser] getWebBrowser() method of SWT.Mozilla returns null when called for a browser embedded within a page of a MultiPageEditor  
-<br>181302 - [Linux] SWT Deactivate event no longer fired when a Shell is deactivated  
-<br>181405 - [Browser] Opening web page with applet causes Eclipse to hang  
-<br>182001 - Whacky behaviour in the update manager with WPF drop of Eclipse on Windows Vista  
-</blockquote>
-
-<h2> SWT Build 3.3 035 - Tuesday April 10, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-14654 - [typing] Single line selection on triple-click  
-<br>43746 - [DND] Null Transfer for DND listener causes VM to hang  
-<br>141569 - opening TableEditor on partially-visible item appears twice  
-<br>151891 - Table.computeSize returns wrong value on GTK  
-<br>162578 - [Browser] Changing status message in Ubuntu's built-in Firefox browser doesn't work  
-<br>167301 - AddFontResourceEx missing for ANSI in OS  
-<br>176167 - Form's BusyIndicator hangs workbench on GTK  
-<br>176379 - [64] Memory corruption on Windows x64 in SWT when calling GdiplusStartup  
-<br>176792 - [OLE] org.eclipse.swt.internal.ole.win32.ComObject misbehavior in multithreaded application  
-<br>177123 - Disposed TableEditor recieves resize event and crashes  
-<br>178757 - [consistency] TableColum/TreeColumns last resize listener called when control is resized  
-<br>180031 - [browser] NPE if browser field in WindowEvent not filled in  
-<br>180204 - Tree with style SWT.VIRTUAL | SWT.CHECK doesn't correctly check nodes without children  
-<br>180376 - Eclipse/SWT crashes the JVM  
-<br>180540 - Default behaviour for FileDialog different on Vista  
-<br>180615 - too many paint events have been sent out when key down in Canvas  
-<br>180773 - CTabFolder's getSelection() javadocs is incorrect  
-<br>180821 - Eclipse won't start due to error in System.Windows.FontStretch.FromOpenTypeStretch  
-<br>180863 - Top menus can be populated by accelerators after shell is disabled  
-<br>180997 - Tree: Right aligned columns squish too far to the right.  
-</blockquote>
-
-<h2> SWT Build 3.3 034 - Tuesday March 27, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-150079 - Table/Tree.getItem() returns null when Table/Tree is horizontally scrolled.  
-<br>166198 - Image transparency problem in tree  
-<br>172832 - GC.getClipping( ) difference GTK / Windows  
-<br>174180 - Table.getItem(Point) always returns null when first column is 0 pixels wide  
-<br>177210 - Stack overflow in StyledTextRenderer
-<br>178134 - [browser] Mozilla: reimplement hooking of DOM listeners    
-<br>178426 - [DND] DragSourceEffect creates cheese  
-<br>178597 - Error Message in Console (gtkcellview.c)  
-<br>178735 - [DND] Stops working by simply adding an EraseItem Listener in Tree  
-<br>178767 - CTabFolder with SWT.BOTTOM draws too many tab borders  
-<br>178820 - Suspicious code in CTabItem.drawLeftUnselectedBorder()  
-<br>178907 - CTabItem draws extra vertical separator one pixel too far at bottom  
-<br>179161 - Program.findProgram(String extension) should gracefully handle long input  
-<br>179314 - Error in BIDI screenshot  
-</blockquote>
-
-<h2> SWT Build 3.3 033g - Thursday March 22, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-160703 - Truncations in Preferences panel of Install/Update
-<br>177389 - CTabItem: Tabs on bottom draw with a diagonal line  
-<br>178814 - Tree Selection weird for first column when custom-owner-drawn is used
-</blockquote>
-
-<h2> SWT Build 3.3 033f - Thursday March 22, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-178326 - Last tab on the right of CTabFolder draws badly.  
-<br>178705 - Javadoc warnings in I20070321-1800  
-</blockquote>
-
-<h2> SWT Build 3.3 033b - Wednesday March 21, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-177885 - DBCS3.3: corruptions in editor on WindowsVista  
-<br>178325 - ControlExample Tree tab forgets "Moveable Columns" attribute  
-<br>178466 - Compiler warning in I20070320-1620  
-</blockquote>
-
-<h2> SWT Build 3.3 033a - Wednesday March 21, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-178180 - SWT browser in linux should load plugins under MOZ_PLUGIN_PATH
-</blockquote>
-
-<h2> SWT Build 3.3 033 - Tuesday March 20, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-177927 - Triple-Click broken if drag source installed on StyledText  
-<br>178115 - Javadoc warnings in I20070319-1005  
-<br>178185 - Tabs in Debug configurations are messed up  
-<br>178337 - Cursor selecting text provides no feedback  
-<br>178364 - Type-o in Snippet260  
-</blockquote>
-
-<h2> SWT Build 3.3 032 - Tuesday March 20, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-99564 - Advanced graphics does not support mirrored mode  
-<br>138579 - StyledText: Support for custom double-click (+drag) behavior  
-<br>162015 - infinite loop of repaint events on canvas view in plugin  
-<br>165106 - [consistency] Combo.setItems(...)  
-<br>171562 - IllegalArgumentException when resizing a sashform with a table within  
-<br>173117 - [Browser] add support for binding JavaXPCOM to Browser  
-<br>173573 - Disposing image during printing crashes SWT on MacOS  
-<br>173658 - Transform + SWT.DOUBLE_BUFFERED + SWT.RIGHT_TO_LEFT - not drawn mirrored  
-<br>173684 - TabFolder displayed improperly at small sizes  
-<br>174569 - Baseline for new Search field text doesn't match Mac platform  
-<br>176719 - Display.getActiveShell() returns different results on Windows compared to Linux  
-<br>177858 - Contributions to CTabFolder, CTabItem: add highlight, remove ellipses, icon always showing, right edge of tab rounded  
-<br>178098 - Compiler warnings in 3.3M6 warmup build  
-</blockquote>
-
-<h2> SWT Build 3.3 031 - Monday March 19, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-157797 - Improve javadoc of Control#addKeyListener(..) to tell about changed traversal behavior  
-<br>168107 - CTabFolder - SWT.BORDER + SWT.FLAT = cheese  
-<br>170393 - CTabFolder display bugs  
-<br>175870 - Eclipse gets SIGSEGV  
-<br>176115 - Combo with SWT.READ_ONLY does not trigger ModifyEvent  
-<br>176417 - SWT Tree#setTopItem(TreeItem) on Mac OS X doesn't take the header height into account  
-<br>176510 - SWT (vertical) ScrollBar of Tree on Mac OS X will not fire SWT.Selection on mouse-wheel movements  
-<br>176609 - custom drawn Table with SWT.Virtual items performs to much paint-events  
-<br>177065 - ToolItem Image not painted disabled on Mac OS X (when the ToolItem is set to be disabled)  
-<br>177223 - [DND] DropTargetEffect API  
-<br>177531 - Custom draw problems with focus item in Tree and Table  
-<br>177616 - NullPointerException in Mozilla.Deactivate()  
-</blockquote>
-
-<h2> SWT Build 3.3 030 - Tuesday March 13, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-163934 - [Mac] Eclipse 3.X on Mac OS X TreeEditor Problem  
-<br>175707 - removing MeasureItem listener and clearing items inverts table  
-<br>176594 - Crash with an SWT program  
-</blockquote>
-
-<h2> SWT Build 3.3 029 - Tuesday March 6, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-77174 - Reparenting support on MacOS X  
-<br>108407 - [Contributions] widgets: Context menu too small at borders  
-<br>108651 - DCR - Add API to make a single line text control be a Search field  
-<br>111718 - G2X: Print dialog of Help Contents doesn't function properly on Linux  
-<br>151454 - custom draw resulting from checkbox click does not appear (motif)  
-<br>162687 - SWT_AWT: Crash on Mac when disposing and then creating a new Composite containing an embedded Frame  
-<br>174395 - [Browser] SWTError (XPCOM error -2147467259) when using the SWT 3.3 Broswer widget on Linux with Mozilla 1.7.8  
-<br>175697 - vm is crashing during mac tests for N20070227-0010  
-<br>176032 - NPE in Mozilla create  
-</blockquote>
-
-<h2> SWT Build 3.3 028 - Tuesday February 27, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-28842 - Need a way to turn on/off the focus ring  
-<br>171776 - Printing across multiple pages creates incorrect output when advanced graphics (antialiasing) is used  
-<br>173371 - [OLE] OleClientSite fails open document if Microsoft Word is not installed  
-<br>173764 - Mac OS X icon changes from 'nice' to 'nasty' during launch of 3.3M5  
-<br>173782 - [Browser] Excessive memory from Browser widget on GTK  
-<br>174547 - [Browser] [64] Mozilla XPCOM broken in 3.2.2  
-</blockquote>
-
-<h2> SWT Build 3.3 027 - Tuesday February 20, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-49098 - [OLE] Scrollbars (do not show/behavior not consistent) in OleEditor for Excel  
-<br>112724 - [OLE] OleClientSite.doVerb cause JVM crash  
-<br>132444 - Tree: Selection not properly redrawn when background image set  
-<br>133161 - Table/Tree inconsistency with sorted column bg color when adding PaintItem listeners  
-<br>138165 - [OLE] Cannot move focus to Excel when OleClientSite(..."Excel.Sheet") is running  
-<br>150990 - Table selection drawing incorrectly when custom draw  
-<br>170907 - Right click a shell of SWT.NO_FOCUS and ON_TOP to bring up a context menu will trigger a shell deactivated event  
-<br>173666 - Expandbar treats any mouse click as a left click  
-<br>174130 - Transparent PNG corruption with SWT 3.2  
-<br>174467 - Drag source image effect does not appear on OSX  
-</blockquote>
-
-<h2> SWT Build 3.3 026 - Tuesday February 13, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-132304 - Table: FULL_SELECTION focus outline too short when background image set  
-<br>132828 - Internal Web Browser doesn't work with SeaMonkey 1.0/Firefox 1.5 on AMD64  
-<br>153664 - Double click on finder icon does not bring Eclipse to the foreground  
-<br>172583 - Cairo implementation needed for drawBackground  
-<br>172843 - [Program] Notes bookmark URL cannot be launched by swt for Linux-GTK  
-<br>173089 - SWT Toggle Buttons on CoolBar keep pressed.  
-<br>173273 - setLinesVisible(true) does not work on Fedora Core 6  
-<br>173427 - Missing documentation for SWT.CANCEL in Text  
-<br>173670 - Disabling Controls does not prevent popup menu from functioning  
-<br>173846 - Table's FULL_SELECTION does not work correctly on custom draw table with background color  
-</blockquote>
-
-<h2> SWT Build 3.3 025c - Wednesday February 7, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-172590 - [Browser] can't compile embedded browser with firefox using N20070201-0010 (v3324)  
-<br>172888 - Caret disapears on 'Go to Line...'  
-<br>172918 - Drag not working in I20070205-0009  
-</blockquote>
-
-<h2> SWT Build 3.3 025a - Tuesday February 6, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-26605 - SWT Table Mouse Down event not firing properly  
-<br>79213 - Support Mozilla on all platforms (if already installed)  
-<br>144709 - toolkit.createText for SWT.MULTI widgets don't draw a border as they should on OS X  
-<br>154944 - Holding mouse down on Table blocks Display.asyncExec and syncExec  
-<br>166958 - swt file open dialog fails to open on FC6 with gnome  
-<br>170877 - Editor viewport not correct after restart  
-<br>172754 - [DND] Drag n drop of classes shouldn't let package nodes open  
-</blockquote>
-
-<h2> SWT Build 3.3 025 - Monday February 5, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-158746 - Canvas#scroll forces an update - any way around this besides setRedraw(false)  
-<br>162253 - SWT SystemTray support on OSX - TrayItems not appearing  
-<br>166483 - [Progress] Random shells come to the front when compare editor shows progress dialog  
-<br>166760 - [browser]RedHat EL4Update4, swt.browser cannot show with installed xulrunner 1.8.0.1  
-<br>167744 - Vista Tracker incredibly slow  
-<br>169048 - NullPointerException in Scrollable when parent=null  
-<br>170623 - [browser] Fails to find xulrunner on 64-bit systems  
-<br>171691 - controls on hijacked splash shell disappear  
-<br>171995 - SWT Labels does not show accelerator characters when thier parent is a TabFolder  
-<br>172001 - Javadoc warnings in N20070129-0010  
-<br>172175 - [DND] StyledText.getSelection() not valid during DnD?  
-<br>172179 - Display.post(Event) with SWT.MouseMove moves to wrong location  
-<br>172265 - [DND] unpredicable caret motion  
-<br>172537 - No coloured cursor on GTK  
-</blockquote>
-
-<h2> SWT Build 3.3 024 - Tuesday January 30, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-163339 - Unexpected results when using drawFocus with advanced graphics is enabled and DOUBLE_BUFFERED  
-<br>168384 - Problem with grayed disabled button image  
-<br>170571 - Warnings in SWT launcher sample  
-<br>170973 - [Program] Error when opening word and excel documents  
-<br>171105 - View using SWT_AWT crashes on Mac if open at startup  
-<br>171278 - patch for org.eclipse.swt.win32.wce_ppc.arm/build_custom.xml  
-<br>171358 - [browser] exception thrown when JS call "confirm" in a frameset structure  
-<br>171484 - javadoc warning in I20070123-1030  
-</blockquote>
-
-<h2> SWT Build 3.3 023 - Tuesday January 23, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-103898 - JVELAYT10 - Spinners text don't work in FillLayout Customize window  
-<br>118709 - Support Windows mnemonic (and focus) hiding options  
-<br>128212 - Tooltips appear off right edge of screen  
-<br>142947 - [DND] Classes to provide drag under feedback should be public  
-<br>155817 - [Viewers] Treeview expand/collapse ignores somewhat quick + and - clicks (doubleclicks)  
-<br>166548 - SashForm no longer working on OSX  
-<br>166923 - Spinner.getSelection() returns a wrong value  
-<br>167656 - Text widget has inconsistent font sizes on the mac  
-<br>167748 - Program class incorrectly escapes already-escaped characters on Mac  
-<br>167831 - check box table images contain extra pixels  
-<br>168429 - StyledText: selection and scroll bar thumbs not correct  
-<br>168444 - NPE when using mouse to select next editor  
-<br>168700 - [OpenModes] Double clicks not working in N20061220-0010  
-<br>168821 - Eclipse will crash with message "Widget is disposed".  
-<br>170785 - Table Headers getting random images on Vista when cycling through sort indicator  
-<br>170813 - getSelection() method for VIRTUAL Tree returns max. eight items  
-<br>170849 - Provide an API for custom controls to detect a drag operation  
-<br>170900 - javadoc warnings in N200701180010  
-<br>171048 - Resizing on Vista causes black bars to appear  
-</blockquote>
-
-<h2> SWT Build 3.3 022 - Tuesday January 16, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-163629 - [MAC]SWT_AWT: Eclipse crashes when embed SWT_AWT.new_Frame in a ViewPart.
-<br>167124 - [AWT] SWT_AWT bridge doesn't run on AIX  
-<br>167799 - DirectoryChooser causes eclipse to freeze.  
-<br>168483 - On SLED10, context menu does not display on a popup shell with SWT.ON_TOP style bit
-<br>169784 - org.eclipse.swt.widgets.Link does not fire SelectionEvents  
-<br>169845 - Mac OS X SWT: extremely slow behavior of Table with larger numbers of items
-<br>170463 - javadoc warning in N20070115-0010
-</blockquote>
-
-<h2> SWT Build 3.3 021 - Tuesday January 9, 2007 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-104779 - ScrollBar SelectionEvent detail field not being set correctly at end of a drag  
-<br>141652 - Shell does not always restore focus after dialog closed  
-<br>147518 - StyledText down arrow (cursor) broken  
-<br>164355 - Horizontal scrolling occurs when calling Tree.setTopItem()  
-<br>167124 - [AWT] SWT_AWT bridge doesn't run on AIX  
-<br>167391 - Accessible.get_accSelection(int pvarChildren) has error when multiple items are selected  
-<br>168043 - SWT_AWT not working in CTabFolder with JDK 6 on Linux  
-<br>169413  [Viewers] SWT/JFace TableEditors don't work in 3.3M4 on OSX  
-<br>169569 - Child Shell's Image changes dock icon on OS X  
-<br>169712 - [Launcher] Eclipse won't launch in Mac OS X 10.5  
-</blockquote>
-
-<h2> SWT Build 3.3 020d - Thursday December 14, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-146171 - JVM crash using SWT_AWT  
-<br>164493 - StyledText doesn't support advanced text services for Korean IME
-<br>166935 - Accesibility - JAWS does not read out keyboard shortcuts  
-<br>167257 - open file menu not working on fedora core  
-<br>167476 - Text verify event fields different between GTK and every other platform  
-<br>167491 - inconsistent versioning for swt fragments  
-<br>167872 - HandleLeak in Font.getFontData()  
-<br>167925 - org.eclipse.swt.win32.win32.x86 still has 3.2.1 version numbers  
-<br>167991 - Javadoc warnings in I20061213-1800  
-</blockquote>
-
-<h2> SWT Build 3.3 020 - Tuesday December 12, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-109253 - Support gre64.conf  
-<br>132876 - List control documention is vague  
-<br>158982 - Table Headers getting random images on Vista  
-<br>161310 - [Browser] Re-examine need for swt-profile  
-<br>165033 - Table vertical lines always showing  
-<br>166793 - Custom-Drawing Selection-Color not working on col = 0 with sorting  
-<br>166942 - Application does not start maximized if setMaximized called before Shell.open()  
-<br>166971 - Read only text widget renders background differently with WIN XP Theme  
-<br>167219 - NPE in org.eclipse.swt.widgets.Menu._setVisible  
-</blockquote>
-
-<h2> SWT Build 3.3 019 - Tuesday December 5, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-39596 - [Accessibility] Should inform user when there is no help for a control  
-<br>75812 - [browser] Cursor over Safari Browser does not change  
-<br>82272 - List returned by Device#getFontList(...) has a lot of repetition  
-<br>102099 - NPE at org.eclipse.swt.widgets.Table.getColumns(Table.java:1223)  
-<br>114007 - The GC line width must not be an int  
-<br>146626 - VM crash when setting a font.  
-<br>146632 - Can't select font "American Typewriter Regular".  
-<br>158903 - org.eclipse.swt.internal.Library needs a way to override java.library.path  
-<br>165036 - Strange table coloring on Vista  
-<br>165091 - Eclipse 3.2.x consistently crashes on Vista  
-<br>165712 - Create wrapper Shell around existing handle  
-<br>166264 - CTabItem unnecessarily redraws entire Tab on setImage()  
-<br>166479 - Javadoc warnings in N20061130-2300  
-</blockquote>
-
-<h2> SWT Build 3.3 018 - Tuesday November 28, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-155655 - [DND] 'Alt' does not request DROP_LINK
-<br>165108 - Spinner can not apply the value that input to text-box
-</blockquote>
-
-<h2> SWT Build 3.3 017 - Tuesday November 21, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-150169 - Incorrect Tab Title for HTML File without <title> Tag
-<br>158796 - MessageBox blocks display thread on linux
-<br>161830 - incorrect SWT.NO_FOCUS behaviour for Shell windows on Linux
-<br>162198 - DnD removes selection and moves caret
-</blockquote>
-
-<h2> SWT Build 3.3 016 - Tuesday November 14, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-36070 - no mouse move in button when dragging  
-<br>68069 - Copy unreliable after longer useage  
-<br>78550 - [consistency] mac doesn't fire MouseUp very often  
-<br>79084 - Load TrueType fonts directly from a file..  
-<br>90820 - Canvas setSize don't work for sizes > 32767 without trhwoing any exception  
-<br>105750 - Multiple Mouse Listener Bug  
-<br>125222 - Unable to reorder perspective icons via drag and drop  
-<br>158831 - SWT Spinner selection value error  
-<br>163587 - Resource leak in quick access dialog leads to eventual crash  
-<br>163594 - Program.launch doesn't work on OSX  
-<br>163729 - GC.setLineDash corrupts internal data on exception  
-<br>163824 - When expanding tree in variables view, icon does not show expanded  
-<br>164131 - Table columns widths too small on Vista  
-<br>164328 - pserver URL is incorrect  
-</blockquote>
-
-<h2> SWT Build 3.3 015 - Tuesday November 7, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-151151 - Tree should have "twisties" on vista  
-<br>161511 - Thai: Unable to display Thai characters on SWT Widgets under Linux environment  
-<br>161550 - Expanding a TreeItem on Mac OS X fires MouseUp-MouseDown in the wrong order  
-<br>161809 - [OpenGL] Mac GLCanvas does not immediately update GL state upon resize  
-<br>162353 - Image set to ToolItem not properly alpha-blending  
-<br>162598 - Multiple JVM terminations  
-</blockquote>
-
-<h2> SWT Build 3.3 014d - Wednesday November 1, 2006 </h2>
-<h3><a NAME="New API"></a>New API</h3>
-<blockquote>
-New <code>DateTime</code> control.
-</blockquote>
-
-<h2> SWT Build 3.3 014b - Tuesday October 31, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-19945 - DCR: date/time widget would be useful
-<br>139711 - Eclipse loses keyboard shortcuts on OSX
-<br>162967 - Last element of a tree doesn't expand on double-click
-</blockquote>
-
-<h2> SWT Build 3.3 014 - Monday October 30, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-155404 - [Browser] embedded Mozilla crashes with SIGSEGV when opening binary files
-<br>158175 - Java core [WM_BUTTONDOWN] when selecting a tree in Vista  
-<br>159568 - Large system.out statements crash system  
-<br>161533 - JVM crash [Tree.setSelection] because SWT (Vista?) error  
-<br>162084 - Tree.setRedraw(true) doesn't redraw  
-<br>162146 - [Browser] Appending to stream hangs the SWT Browser  
-<br>162170 - Tree items shifted to the left when collapsing  
-<br>162411 - setExpanded(false) doesn't work when tree item is not visible (regression)
-</blockquote>
-
-<h2> SWT Build 3.3 013 - Tuesday October 24, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-9401 - Still get resize cursor even when Table not resizable  
-<br>133943 - [DCR] Provide way to query a previously set Cursor  
-<br>139509 - Tables with SWT.VIRTUAL cause MeasureItem, PaintItem and EraseItem to fire repeatedly on mouse movement  
-<br>153448 - Tree.setRedraw(true) causes the drawing operations to be ignored on solaris  
-<br>154429 - [64] HotSpot Virtual Machine error while starting eclipse3.3M1  
-<br>156985 - Invoking COM methods of type INVOKE_FUNC have different behavior in Eclipse 3.1.2 and Eclipse 3.2  
-<br>159586 - Need a way to expand TreeItems without causing scrolling  
-<br>161259 - Embedded Browser does not appear to get mouse move/capture (WebKit/Mac OS X)  
-</blockquote>
-
-<h2> SWT Build 3.3 012 - Tuesday October 17, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-105101 - Transform translations not accounted for in GC.drawFocus()  
-<br>105764 - org.eclipse.swt.custom.ControlEditor.computeBounds() is package private  
-<br>150782 - SWT cause JVM crash  
-<br>151142 - pixel corruptions in table with Check flag and Images  
-<br>153196 - Paint example draws lots of garbage on mac  
-<br>155389 - Cursors don't show coloured if created from Image  
-<br>160498 - Need the Tracker class to accept empty Rectangle lists  
-<br>160647 - Table widget leaks  
-<br>160667 - The example doesnt up to date.....  
-</blockquote>
-
-<h2> SWT Build 3.3 011 - Tuesday October 3, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-103809 - WinCE: VM crash on Display.dispose() call  
-<br>155451 - Bad drawing in Tree and Table  
-<br>156445 - Shell initialization too slow  
-<br>156754 - tooltips not read by screen reader/MSAA for toolbar items w/ image  
-<br>157544 - List: preferred width incorrect after items are removed  
-<br>158212 - [64] Highlight Colors all appear black and Fortran Formating Offset  
-<br>158742 - Eclipse terminates with jvm exit code=1 when trying to run dynamic web project  
-<br>158790 - external browser can't be found on Redhat  
-<br>158797 - FileDialog limit on multi-select  
-<br>158970 - Disabling parent Composite doesn't throw FocusOut for the focused child control  
-</blockquote>
-
-<h2> SWT Build 3.3 010a - Tuesday September 26, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-JUnit failure - throw SWT.ERROR_IO instead of SWT.ERROR_NO_HANDLES when image filename does not exist
-</blockquote>
-
-<h2> SWT Build 3.3 010 - Tuesday September 26, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-9953 - When the window is launched Maximized, it doesn't  
-<br>93938 - Combo displays selection range without focus  
-<br>115291 - [Program] Program.execute fails when command or filename contains whitespace  
-<br>149774 - [Program] Improve command handling of Program#execute(String) on Win32  
-<br>156675 - Repaint issue with radio buttons in preference page  
-<br>156943 - TootlTip display error for negative location  
-<br>157292 - MouseWheel event provides wrong coordinates in case of negative x coordinate (event outside widget)  
-<br>157634 - Sibling decorations traversed in wrong order when decorations disposed  
-<br>157635 - BIDI:StyledText Selection of text, and BIDI formating not correct  
-<br>157670 - Problem loading BMP  
-<br>157689 - Problem loading BMP with negative height (bottom-up)  
-<br>157846 - Decorations disappear in Tree when adding Columns  
-<br>157865 - moving column can lose sort indicator  
-<br>158411 - Regression: Alt+Numpad keystrokes broken (Part 2)  
-<br>158462 - cleanup VerifyEvent constructor  
-<br>158472 - AnimateWindow call makes SWT unusable on NT4.  
-<br>158577 - combo.setItem dispatchs a ModifyListener event with empty text  
-</blockquote>
-
-<h2> SWT Build 3.3 009a - Thurssday September 21, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-157914 - Unable to open external Safari browser
-</blockquote>
-
-<h2> SWT Build 3.3 009 - Tuesday September 19, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-21009 - ArrayIndexOutOfBoundsException in CTabFolder  
-<br>108175 - TableColumn sort indicator not updating to new Font properly  
-<br>114244 - CCombo computeSize needs to max item width with text width  
-<br>117752 - CCombo text drawn too high  
-<br>137786 - new 'default' drag & drop feedback interferes with other feedback  
-<br>151348 - drop text in Text widget duplicates text  
-<br>151633 - [KeyBindings] 2 popups displayed on Linux  
-<br>155212 - Misprints in SWT Win32 code ?  
-<br>157440 - On Mac, can't drawText after setBackgroundPattern() is called.  
-<br>157478 - Web services wizard scale and graph all weird  
-<br>157557 - SWT.Settings javadoc states incorrect value  
-</blockquote>
-
-<h2> SWT Build 3.3 008 - Tuesday September 12, 2006 </h2>
-<h3><a NAME="New API"></a>New API</h3>
-<blockquote>
-CCombo now fires <code>SWT.Verify</code> events
-<br><code>CCombo.addVerifyListener(VerifyListener)</code>
-<br><code>CCombo.removeVerifyListener(VerifyListener)</code>
-<br><code>StyledTextPrintOptions.printLineNumbers</code> field
-<br><code>Variant.getByte()</code>
-<br><code>Variant.getChar()</code>
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-32683 - "up" arrow button displays as "right".  
-<br>110163 - X Window System error, using Swing system look and feel, rendering SVG using SWT_AWT in non-top stack layout
-<br>114169 - [Program] Program.getImageData() not implemented on Mac  
-<br>150300 - path.close() has no effect  
-<br>150304 - cubicTo and quadTo methods of Path not working  
-<br>150306 - trouble with drawing a string  
-<br>151150 - Multi Selection Tree only last 2 items are 'really' selected  
-<br>152769 - StackOverflowError (recursive callWindowProc)  
-<br>153841 - Macintosh only: values in some text fields of launch configuration dialog are slightly shifted, obscuring first character
-<br>153939 - Problem with gc.drawString()  
-<br>154052 - Table tooltip does not show after selection of a table item  
-<br>154736 - All Fonts appear the same  
-<br>154746 - Path Clipping does not work properly on Mac, GTK and Motif  
-<br>154928 - CCombo should fire Verify events  
-<br>154943 - JavaScript error with generated content from GWT  
-<br>155162 - Alt+Numpad_Divide issues two key events  
-<br>155224 - NPE in CCombo.setVisible(false) if some of affected listeners has disposed it
-<br>155390 - Cursor ignores horizontal hotspot location and uses vertical instead
-<br>155624 - SWT Table column resize issue  
-<br>155801 - Table column tooltip disappears after scrolling  
-<br>155916 - Classes in org.eclipse.swt.opengl have warning comments in Javadoc
-<br>156027 - VerifyEvent e.doit inconsistent behavior on Linux GTK  
-<br>156213 - BDI: Styledetxt setOrientation does not work, on the fly  
-</blockquote>
-
-<h2> SWT Build 3.3 007a - Wednesday August 30, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-155679 - VirtualTableTests failing on the Mac
-</blockquote>
-
-<h2> SWT Build 3.3 007 - Tuesday August 29, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-18377 - Tree.getSelection() could be better ordered  
-<br>134269 - Adding column to var view causes VM to GP  
-<br>145498 - Cannot start Eclipse 3.1.2 under AIX 5.3  
-<br>147418 - Control.getMonitor does not properly set client area  
-<br>149649 - Cannot grab scrollbar thumb in ON_TOP shell on gnome 2.14  
-<br>153885 - TreeItem.getExpanded() does not work on Windows Mobile 2003  
-<br>154023 - Can't get a Dialog truely on TOP  
-<br>154198 - Flicker while scrolling scale widget  
-<br>154310 - [browser] cannot click into text field and type  
-<br>154611 - ComboViewerTest dies with BadMatch error  
-<br>154961 - The ToolTip object is not disposed appropriately and prevents from creating another ToolTip on the same shell  
-</blockquote>
-
-<h2> SWT Build 3.3 006 - Tuesday August 22, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-24451 - Reading JPEG images slow in SWT  
-<br>42457 - Invalid image exception while loading JPEG image  
-<br>133164 - JPEGFileFormat converts colors in rgb jpeg (when it shouldn't)
-<br>139485 - [Drag & Drop] DnD auto-scroll support in StyledText is too slow
-<br>144765 - Layout on Labels generates a size that cuts off characters  
-<br>146402 - Content assist popup shows ellipsis for selected item on Windows Vista beta 2
-<br>147673 - Quick-Type hierarchy's treeviewer cannot be collapsed with mouse
-<br>147808 - CCombo dropdown doesn't have keyboard focus in GTK  
-<br>151635 - [browser] cannot tab between fields on page  
-<br>151767 - Table throws ArrayOutOfBounds Exception upon TableColumn.dispose()
-<br>151916 - Browser auto-detect should check for XULRunner first  
-<br>152129 - cannot set enabled state on Vista  
-<br>152800 - FileDialog crashing  
-<br>152936 - Regression: GC.drawRectangle fills background in some cases  
-<br>152937 - Regression: Line dash style is ignored  
-<br>153034 - Invalid image exception while loading PNG image  
-<br>153367 - eclipse 3.3 stream builds broken on Solaris GTK  
-<br>153398 - Invalid thread access in Snippet133  
-<br>153423 - Text and Spinner initially report incorrect preferred size  
-<br>153567 - Custom cursor has wrong colours  
-</blockquote>
-
-<h2> SWT Build 3.3 005 - Tuesday August 8, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-62627 - "Next Word" definition  
-<br>83451 - Mouse Behaviour breaks UI (low resources, grab stuck?)  
-<br>104750 - GTK FileDialog ignores setFileName() for SWT.OPEN dialogs if no filterPath set
-<br>124836 - CLabel.shortenText(...) takes almost forever for long text  
-<br>137621 - License Agreement Does Not Display on HP-UX  
-<br>138528 - Tooltips do not show after tool button pressed  
-<br>139854 - swt dependecy on msvfw32.dll  
-<br>141254 - Linux GTK and TableEditor Failure Assertion  
-<br>145704 - Previous Word commands are too 'greedy'  
-<br>146303 - Label Tooltip text not visible on Intel Mac  
-<br>147228 - Table column tooltip disappears after clicking the header  
-<br>148522 - Table.showSelection() doesn't show selection with images  
-<br>149870 - multiple widgets report focus  
-<br>150155 - Clicking in textfield sets cursor to one before last char  
-<br>151136 - Tree with TreeColumn loops forever if setWidth not called  
-<br>151137 - thumb doesn't work for Tree with column  
-<br>151893 - Issue with background images and CLabels  
-<br>152385 - Tooltip is not shown all the time  
-<br>152718 - StyledText printing feature doesn't work  
-</blockquote>
-
-<h2> SWT Build 3.3 004 - Tuesday July 25, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-19602 - [Printing] Line numbers aren't printed  
-<br>24697 - DCR - Request for PNG write support  
-<br>26436 - Spec PrinterData.startPage/endPage  
-<br>63226 - Undocumented error thrown in Image code  
-<br>81834 - BIDI:  StyledText does not convert European Number to Arabic Number
-<br>142335 - Perf Fix for: org.eclipse.swt.internal.image.PngHuffmanTable.generateTable
-<br>150099 - Menu class has a public '_setVisible(boolean)' method.  
-<br>150274 - Flicker with the new WinXP border  
-<br>150407 - PNG Load Speed Terrible for medium to large images  
-<br>150764 - [PATCH] fix compiler warnings for GCC 4.x  
-<br>151228 - three-button Mozilla "confirm" dialog has same label on all three buttons
-<br>151330 - Browser not supported on linux ppc  
-</blockquote>
-
-<h2> SWT Build 3.3 003 - Tuesday July 18, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-24796 - DCR - No printing on Linux GTK
-<br>80033 - SWT Browser does not display https.  
-<br>87279 - 6 different methods cause pens to be constructed and selected
-<br>91348 - [Browser] Embedded web browser doesn't render visited links
-<br>102756 - Use GtkComboBox instead of GtkCombo  
-<br>105044 - Inefficient use of Pens and Brushes causing poor performance  
-<br>105618 - Graphics.setLineDash causes ruler guide redraw problems  
-<br>109843 - Non-resizable table columns resized by CTRL+KEYPAD_ADD  
-<br>112570 - Cairo incorrectly computes text extent  
-<br>125288 - GC.textExtent does not accurately predict text size  
-<br>127469 - When a GC uses advanced and alphas the clipping is ignored in some cases.
-<br>128200 - TextLayout ignores transformations on GC  
-<br>132500 - [Browser] Eclipse abended at the operation on WS Explorer with the internal web browser
-<br>133183 - Button widget with SWT.CHECK style is not showing foreground color when it is in selected/checked state
-<br>133928 - Program#getProgram(String) fails if the program doesn't have a \\DefaultIcon
-<br>134760 - Performance of GC.fill* methods on GTK  
-<br>140132 - GC.setLineDash no-op affects line drawing  
-<br>140244 - Eclipse 3.2 gtk RC2 dumps core on Solaris 9  
-<br>141138 - Pixel corruption involving SWT.DOUBLE_BUFFERED, GC.setAdvanced() and TextLayout
-<br>146250 - [SWT] Columns of Table widget cannot be resized, except for by dragging a mouse
-<br>149493 - UI-Thread blocked while Menu is visible  
-<br>149749 - MANIFEST.MF files must be up-to-date  
-<br>149952 - First TableColumn in a Table always left justified  
-<br>150086 - Eclipse execution problem.  
-<br>150314 - NullPointerException while creating a pattern  
-</blockquote>
-
-<h2> SWT Build 3.3 002 - Tuesday June 27, 2006 </h2>
-<h3><a NAME="New API"></a>New API</h3>
-<blockquote>
-<code>MouseEvent.count</code> field
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-23614 - [DCR] Allow triple mouse click events  
-<br>62555 - Group border renders badly  
-<br>77321 - StyledText's font appears inconsistent with GC.drawString(..) font
-<br>85783 - Editor font issues  
-<br>90856 - segfault while clicking in browser  
-<br>99697 - Can't navigate to external web sites  
-<br>115172 - Text clipped in editors if size reduced from platform default
-<br>115947 - Accessibility : Cannot set tooltip Text for image in Table Column
-<br>121114 - Inconsistent measurements from empty TextLayouts  
-<br>139790 - Print Margin shows up in the wrong place  
-<br>140519 - StyledText error in getTextBounds (Does not count last newline)
-<br>141282 - DnD doesn't support special characters  
-<br>146575 - setCursor is ignored in the SWT Text under gtk-linux  
-<br>147423 - NPE when removing an item from a Table with custom draw hooks
-<br>147550 - VerifyEvent.doit=false does not work for Text  
-<br>148354 - Regression: Radio buttons fail to redraw background  
-</blockquote>
-
-<h2> SWT Build 3.3 001 - Tuesday June 13, 2006 </h2>
-<h3><a NAME="New API"></a>New API</h3>
-<blockquote>
-CCombo methods cut(), copy() and paste()
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-56116 - System Tray not implemented for MAC  
-<br>108573 - Make Objective-C  Runtime APIs  public in  SWT WebKit.java  for MacOS X
-<br>110555 - Draw2d Graphics line style setting not consistent  
-<br>120118 - "xxx.getDisplay().update" does..."xxx.getShell().update" doesn't
-<br>124425 - GC.drawText does not work when setAdvanced(true)  
-<br>136323 - Shell.getClientArea has side effect  
-<br>136472 - GC#drawText doesn't work with arabic text when advance is on  
-<br>137911 - Browser widgets turn to ghosts if their construction fails.  
-<br>139329 - NullPointerException in ExpandBar
-<br>141678 - [Browser] JavaDoc Hover/Browser-Widget doesn`t show Text
-<br>142880 - The point down behavior of the DropTargetEvent.item
-<br>143732 - add cut/copy/paste api on CCombo  
-<br>145347 - Warnings with Fedora 5 compiler (gcc)  
-<br>145662 - Group control borders disappear when tabbing between child widgets
-<br>146264 - StyledText with SWT.WRAP flag does not shape arabic letters  
-</blockquote>
-
-<h2> SWT Build 3.2 032o - Friday June 9, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-145526 - CTRL+F crashes JVM in Search panel
-</blockquote>
-
-<h2> SWT Build 3.2 032m - Monday June 5, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-143661 - MouseUp incorrectly fired on Tree  
-</blockquote>
-
-<h2> SWT Build 3.2 032k - Friday May 26, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-143236 - setItemCount(0) leaking TreeItems  
-<br>143482 - CHIViewEmbeddedFrame not found in Eclipse  
-</blockquote>
-
-<h2> SWT Build 3.2 032j - Friday May 19, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-140843 - JVM crash when running RCP application on HP-UX  
-<br>141395 - Selected item lost in Tree  
-<br>141489 - TableEditor background color artifacts on scrolling  
-<br>142193 - Launchers feature fails without inheritall in gather.bin.parts
-</blockquote>
-
-<h2> SWT Build 3.2 032h - Friday May 12, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-128545 - BIDI: Cursor is stays in the beginning of the Hebrew text segment
-<br>134353 - Table/Tree: Columns pack on table.clear for no reason with a lot of flashing
-<br>138907 - Cheese in Tree with text that spans columns  
-<br>141293 - about.html needs to updated in swt examples, tests and tools
-<br>141552 - Unexpected popup menu  
-<br>141589 - SWT.MenuDetect sent 3 times for toolbars  
-</blockquote>
-
-<h2> SWT Build 3.2 032 - Friday May 5, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-67384 - SWT_AWT not implemented for Mac
-<br>96378 - gc.setTransform() makes fonts scale strangely when printing  
-<br>128373 - Virtual Tree needs documentation  
-<br>130173 - Tree Column does not respond to DefaultSelection event as it did in 3.1
-<br>133962 - SWTException closing GLCanvas in an RCP application on Mac OS X
-<br>138319 - SWTException: Failed to execute runnable (IllegalArgumentException: Index out of bounds)
-<br>139226 - Using the mouse to page down auto completion choices closes completion window
-<br>139262 - 'set data' callback not sent after all items are cleared in virtual tree
-<br>139505 - Update manifest to compile against Foundation 1.0: org.eclipse.swt
-<br>139964 - Use of 1.4 APIs in SWT_AWT
-<br>140052 - [CTabFolder] losing focus problem?
-<br>140272 - Editing OS.java really slow
-</blockquote>
-
-<h2> SWT Build 3.2 031 - Friday April 28, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-60273 - Toolbar background colour doesn't match background (XP/Silver)
-<br>95634 - [Tree] TreeColumn misses tooltips  
-<br>96615 - StyledText and Text keybindings differ on Mac  
-<br>99145 - Link widget only disables link, not text  
-<br>99984 - Sync view toolbar buttons are bigger with SWT manifest  
-<br>114850 - Eclipse 3.2M2 crashes just after startup  
-<br>123922 - [Patch] SWT Javadoc: Some typos/minor errors  
-<br>127216 - [Patch] Table check boxes should have shade when selected  
-<br>127716 - GC.drawPoint() calls aren't affected by a Transform  
-<br>127813 - CCombo.computeSize returning incorrect values when using wHint/hHint
-<br>129564 - StyledText should render tabs exactly 4 spaces wide  
-<br>129609 - [browser] unable to enter text in <textarea>
-<br>131017 - HTML forms displayed in SWT Browser does not accept accented characters input
-<br>131265 - Make ExpandBar background changeable by users  
-<br>133672 - GC construction is very slow on the Mac when a Display is passed in
-<br>134088 - DnD support in StyledText doesn't auto-scroll  
-<br>134091 - Drop in StyledText does not work at the end of a line  
-<br>134112 - DnD in StyledText: dropping on an empty line is hard  
-<br>134417 - Browser Cannot Be Disposed (Intel Carbon SWT)  
-<br>134925 - Table/Tree Columns don't align SWT.RIGHT and SWT.CENTER text properly (regression) (GTK)
-<br>136272 - Combo on Mac incorrectly sends KeyDown event before Traverse when arrow up/down keys used
-<br>136451 - ToolItem is not visible if bounds set before text  
-<br>136473 - Image capture is purple on Mac  
-<br>136633 - Failed to execute runnable (java.lang.ArrayIndexOutOfBoundException) in debug mode
-<br>136641 - Scrollbars not excluded from client area  
-<br>136675 - No scrollbar events for Text  
-<br>136890 - [Patch] SWT Javadoc: Some typos/minor errors (Part 2)  
-<br>136931 - Regression in right-mouse button behavior  
-<br>137236 - Macintel: setEchoChar cause StringIndexOutOfBoundsException  
-<br>137320 - [StyledText] caret does not move correctly when inserted text wraps
-<br>137524 - NPE in AsynchronousViewer  
-<br>137714 - WinCE: setClipping(x,y,w,h) throws NullPointerException  
-<br>138062 - NPE in getData  
-<br>138076 - Browser does not start on Debian  
-<br>138461 - [Workbench] Perspective popup menu doesn't show up on Mac  
-<br>138499 - Label DropTarget is "too small" on Motif  
-<br>138630 - Icons being drawn on top of text in tabbed folder
-<br>138724 - Use of 1.4 APIs
-<br>139060 - Regression: Tree: Selection lost when collapsing unrelated item
-</blockquote>
-
-<h2> SWT Build 3.2 030 - Tuesday April 12, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-45918 - eclipse should enable XP visual styles if available (from comctl32.dll)
-<br>76740 - [painting] Ctrl+End brings StyledText into strange state
-<br>82769 - [Contributions] Disabled menu items have enabled images when armed
-<br>83016 - [browser] Use Mozilla 1.8 nsIWebBrowserStream API
-<br>110794 - [64] Crash when pressing ENTER after having entered value in "Search" form
-<br>113559 - [build] Dependency on  libstdc++.so.5
-<br>125113 - Printing document with long lines loses text at the bottom of the page
-<br>127132 - TableColumn#pack does not work for virtual table
-<br>127902 - Focus gets stuck in Expandbar
-<br>128273 - TableCursor not working properly on Linux GTK
-<br>128286 - Table#SetTopIndex has no effect for virtual table
-<br>133304 - [Browser] Eclipse fails to start
-<br>134175 - Not consistenly getting control resize event from table column
-<br>134356 - Walkback turning on wrap in StyledText. 
-<br>134482 - [64] SWT Snippet24 (default selection) does not work on amd64
-<br>134837 - Tree- Random foreground color appears for Tree when selecting items and subitems
-<br>135303 - CBanner draws unwanted gradient line at bottom when it has more height than the default
-<br>135533 - remove solaris-motif-sparc downloads from build
-<br>135649 - Mouse wheel scrolls invisible scrollbars
-<br>136064 - Snippet 225 (balloon tool tip) should say @since 3.2
-</blockquote>
-
-<h2> SWT Build 3.2 029a - Monday March 27, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-94691 - Code Style Page crops "Configure Project Specific" message  
-<br>115234 - [DnD] [WorkbenchParts] Resizing tiled editors incorrectly sizes editor parts at start of drag
-<br>116749 - Some widgets don't match default background inside Group  
-<br>118953 - setForeground/Background color does not work for SWT.READ_ONLY Text widgets on a Mac
-<br>120051 - Some font names on OS X have null (\0) characters between every character
-<br>120241 - MouseListener on Sash does not receive mouseUp events  
-<br>122049 - crash when clicking on yellow javadoc popup window  
-<br>124415 - Browser causes blank white box on OSX  
-<br>127821 - ControlExample crash when setting background image on SEPARATOR Label
-<br>130971 - TreeItem not showing text  
-<br>132874 - List control does not allow 0th item to be deselected.  
-</blockquote>
-
-<h2> SWT Build 3.2 029 - Tuesday March 21, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-32310 - Left click followed by right click results in double click  
-<br>51020 - SWT.ON_TOP does not work on Mac OS X  
-<br>66615 - SWT_AWT.new_Frame occasionally hangs  
-<br>77371 - [browser] Browser widget not using correct language settings  
-<br>77456 - DBCS3.2: SWT Browser sends improper Accept-Language, Accept-Charset
-<br>83133 - Exposé causes dialog to move behind shell.  
-<br>83431 - Support an "expandable group"  
-<br>104150 - [Patch] Table cursor separated from table selection when clicking on grid lines or empty space
-<br>113019 - Browser.setText() sometimes appends dust characters after html
-<br>116975 - SWT_AWT bridge with JDialog cannot use Tab within dialog. focus is lost
-<br>122379 - SWTException when deleting text from StyledText, if selection larger than visible part
-<br>125131 - Keys fail in JDialog after SWT_AWT.new_Frame in WorkspacePart
-<br>127827 - Implement background image in Table and Tree  
-<br>128400 - Class ST misuses javadoc comments as category headers  
-<br>128662 - SWT Browser crashes if URL contains special characters  
-<br>128719 - [StyledText] A lot of cheese displaying Japaneese and Chinese
-<br>128750 - Error occurs when delete text in StyledText  
-<br>129526 - Proposal for new snippet : Non-rectangular Shell using transparent images
-<br>129999 - EraseItem event's gc does not have the item's colours or font set
-<br>131393 - Adding TableColumn at index 0 makes cell disappear  
-<br>131623 - Tree selected column bgcolour does not draw on empty rows when setting a tree background colour
-<br>131625 - Tree adds useless vertical scrollbar  
-<br>131626 - Tree selected background colour in column 0 overrides cell colour, but not in any other column
-<br>131627 - Tree: Empty tree does not show selected column background colour, unlike Table
-<br>131654 - Decorations.computeTrim can cause program to hang  
-<br>131724 - Adding PaintItemListener to Table causes NPE  
-<br>131727 - SWT_AWT frames in task bar  
-<br>131739 - adding EraseItem listener to Tree causes major drawing problem
-<br>131743 - adding an EraseItem listener to a Tree can lead to selection cheese
-<br>131805 - Tree: Sorted background column colour does not move with movable columns
-<br>131867 - Incorrect GC.fillPath() behavior  
-<br>131906 - StackOverflowError in StyledText  
-<br>132089 - Tree: Text corruption in cells after moving column 0 and resizing column
-<br>132376 - Table background colors are wrong in GTK
-</blockquote>
-
-<h2> SWT Build 3.2 028 - Tuesday March 14, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-67642 - StyledText: Graphic bug displaying bengali chars
-<br>91454 - [browser] RH EL4 - need way to locate firefox build
-<br>92548 - GB18030: Part of Uigur characters(4-bytes) cause whole line sinkage to 1/3.
-<br>97404 - add support for VT_I8 and VT_R8
-<br>108996 - Support gradient backgrounds for StyledText widgets
-<br>121351 - Alpha channel ignored when Image is disabled or greyed out
-<br>125656 - Eclipse freezes dismissing popup windows (Quick Fix, Spell Check, etc)
-<br>129908 - BIDI: Output text have contextual order layout
-<br>129972 - adding MeasureItemListener to Table causes NPE
-<br>130756 - Tree does not use the OSs selected column background color
-<br>130113 - eclipse (64-bit) crashes as soon as code complete is invoke (ctrl-space) in java files
-<br>130346 - Adding MeasureItem listener on Table can lead to divide by 0 in getItem()
-<br>130876 - Background Image not inherited running w/o manifest
-<br>131159 - ExpandItem needs getHeaderHeight()
-<br>131160 - background color problems in tree with columns
-<br>131585 - notifed is not a word
-</blockquote>
-
-<h2> SWT Build 3.2 027 - Tuesday March 07, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-58009 - Need API to add notifications on system tray
-<br>79391 - ControlExample - tab items are truncated
-<br>98265 - more fixing
-<br>106372 - Provide DND support for the StyledText widget
-<br>114662 - Spinner setSelection prints X warning
-<br>123827 - Outline "crazy-scrolls" when it gets focus
-<br>127168 - Spinner generates bogus ModifyText events
-<br>129590 - Event.index == 0 all the time
-<br>129967 - System Settings being fired too often
-<br>130037 - Cheese after dropping TreeItem that has Image set
-<br>130120 - cell custom background colour appears in adjacent cells
-<br>130159 - ImageLoader.save(filename, format) should close the OutputStream.
-<br>130375 - Background Inheritance Incorrect in Composite Hierarchies
-</blockqoute>
-
-<h2> SWT Build 3.2 026a - Tuesday February 28, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-129607 - Display.getShells() returns disposed shell Part 2
-</blockqoute>
-
-<h2> SWT Build 3.2 026 - Tuesday February 28, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-124004 - Drop enabled on Text Widget
-<br>126818 - Horizontal ScrollBar not ReSized When Table Contents Changed
-<br>126996 - Can't asyncExec setting of text in virtual Tree
-<br>128378 - TreeItem and TableItem constructors should state precondition on index
-<br>128598 - 3.2 M5 delta pack not generated correctly
-<br>128845 - ExpandBar Widget not painting controls
-<br>129054 - Text widget VerifyListener causes characters to be inserted backwards if you change them
-<br>129126 - When VerifyListener is added in org.eclipse.swt.widgets.Text, StringIndexOutOfBoundsException might be occurred by UNDO operation.
-<br>129501 - Tree FULL_SELECTION doesn't redraw item background in selection color
-<br>129535 - GridData/GridLayout is showing abnormal layout
-<br>129607 - Display.getShells() returns disposed shell
-</blockquote>
-
-<h2> SWT Build 3.2 025 - Tuesday February 21, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-13969 - Accessibility : No visual focus is provided in Table
-<br>47872 - [SWT Examples] broken link in swt_launcher_ex.html
-<br>87213 - Unable to run eclipse: undefined symbol: atk_object_add_relationship
-<br>127095 - NPE when trying to dispose columns
-<br>127266 - Text.getCaretLocation() on GTK with style = SWT.SINGLE
-<br>127516 -Warnings in SWT samples
-<br>127960 - Native crash in SWT when brower JavaScript closes the window
-<br>128267 - No longer possible to capture screen with new GC(display)
-<br>128408 - JPEGQuantizationTable precision=8 values can be negative
-<br>128448 - [Browser] No javascript confirm dialog.
-<br>128476 - Regression: Tree with columns does not reset horizontal scroll bar
-</blockquote>
-
-<h2> SWT Build 3.2 024k - Thursday February 16, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-128244 - Table Row Overdraws Table Headers
-</blockquote>
-
-<h2> SWT Build 3.2 024k - Thursday February 16, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-127734 - Cannot open Launch Config dialog
-</blockquote>
-
-<h2> SWT Build 3.2 024i - Thursday February 16, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-127755 - NPE in Tree.callPaintEventHandler
-</blockquote>
-
-<h2> SWT Build 3.2 024h - Thursday February 16, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-123466 - [Viewers] Strange dots in table item labels
-<br>127751 - VIRTUAL Table does not paint with snippet 144
-</blockquote>
-
-<h2> SWT Build 3.2 024d - Monday February 13, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-126996 - Can't asyncExec setting of text in virtual Tree
-</blockquote>
-
-<h2> SWT Build 3.2 024c - Monday February 13, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-54426 - Implement RichText editor for SWT (partial fix)
-<br>100114 - SWT, launcher and support JNI libraries need to be built universal
-</blockquote>
-
-<h2> SWT Build 3.2 024b - Monday February 13, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-80913 - TabFolder no longer sets focus to tab when mnemonic pressed
-</blockquote>
-
-<h2> SWT Build 3.2 024 - Friday February 9, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-70167 - Image(Device, InputStream) throws incorrect exception for bad PNG
-<br>126864 - Regression: Drop target has incorrect DND cursor
-<br>126995 - AIOOB exception for Tree
-<br>126996 - Can't asyncExec setting of text in virtual Tree
-</blockquote>
-
-<h2> SWT Build 3.2 023c - Tuesday February 7, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-On GTK, close button will not draw correctly due to dynamic tooltips
-</blockquote>
-
-<h2> SWT Build 3.2 023b - Tuesday February 7, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-126299 - After clearAll(), GTK virtual Tree forgets old TreeItem objects and creates new ones
-</blockquote>
-
-<h2> SWT Build 3.2 023a - Tuesday February 7, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-Compile errors on GTK 64
-<br>Callbacks leaked on GTK
-</blockquote>
-
-<h2> SWT Build 3.2 023 - Tuesday February 7, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-98265 Strings in Combo drop down list are truncated
-<br>105028 WinCE: Menu Image Problem
-<br>124481 TreeEditor: ProgressBar does not fill cell correctly
-<br>125255 Checkbox tree selection makes checkbox hard to see
-<br>125725 Mistake in FormLayout.layout(Composite, boolean)
-<br>125849 Wrong colors with gradient pattern
-</blockquote>
-
-<h3><a NAME="New API"></a>New API</h3>
-
-<p> Added ExpandBar and associated classes.</p>
-
-<h2> SWT Build 3.2 022 - Tuesday January 31, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-64686 - ScrollBar does not receive SWT.Selection messages
-<br>103976 - Spinner widget should provide setValues() method like Slider
-<br>115209 - SWT OSX 3.2M does  not display labels on raw background
-<br>124414 - SIGSEGV from swt-3.2M4-gtk-linux-x86_64.zip
-<br>Added drag under feedback for Table and Tree on Mac
-<br>Added dynamic tooltips on all platforms
-</blockquote>
-
-<h2> SWT Build 3.2 021 - Tuesday January 24, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-38528 - Two full screen redraws creating a GC on Display
-<br>40117 - San-serifed monospaced fonts do not align properly.
-<br>68255 - a Tab is not 4 spaces
-<br>91364 - SWT_AWT.new_Shell() in GTK version blocks forever on RedHat 9
-<br>117507 - Text editor flashes on call to selectAndReveal(int,int)
-<br>112104 - GC.drawArc/fillArc results in different effects when antialias on/off
-<br>121190 - Setting context menu on editable CCombo
-<br>121506 - GC.drawImage() selects wrong source region
-<br>123675 - fillGradientRectangle() in gc doesn't use gDip clipping when foreground and background are the same.
-<br>124092 - StyledText's RTF copy/paste broken
-<br>124208 - Virtual tree setItemCount(0) has no effect
-<br>124400 - Please expose minHeight, minWidth, expandHorizontal, expandVertical in ScrolledComposite
-<br>124591 - ScrolledComposite.computeSize returns wrong value when alwaysShowScrollBars==true
-</blockquote>
-
-<h2> SWT Build 3.2 020 - Tuesday January 17, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-86825 	CLabel not correctly captured by WM_PRINT
-<br>120907 	Border for Forms API controls screenshots
-<br>121722 	HTML clipboard transfer does not work on Windows
-<br>122428 	Performance on OS X still degrades on 10.4.3
-<br>123143 	Drag handle changes to four-way on click
-<br>123184 	Embedded image render error in StyledText
-<br>123594 	Text.setForeground(Color) is ignored with SWT.INHERIT_FORCE
-<br>123764 	Vertical table lines not redrawn on horizontal scroll
-<br>123993 	SWT_AWT embedded frame doesn't get iconify/decionify events
-</blockquote>
-
-<h2> SWT Build 3.2 019 - Tuesday January 10, 2006 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-49267 	First characters in Text initially not displayed
-<br>118670 	Make StyledText.getLinePixel(int)/getLineIndex(int) publi...
-<br>118796 	DirectoryDialog.open does not return choosen directory
-<br>119207 	TableItem errors after/during dispose
-<br>120524 	drawRoundRectangle draw bad round corner of rectangle.
-<br>120573 	[implementation] IllegalArgumentException in StyledText
-<br>120914 	Warnings suppressed from GtkFileChooser creation
-<br>120954 	Background of Control with SWT.INHERIT_FORCE doesn't show...
-<br>120980 	Regression: Image on disabled button no longer greyed out
-<br>121507 	font leading (line spacing) excessive for small fonts
-<br>121729 	in SWT, javadoc for Table.getColumns does document order
-<br>121741 	Disposing a StyledText disposes its menu?
-<br>121890 	Canvas and mouseMoveListener and MacOS
-<br>121903 	OS.AlphaBlend causes "bddraw" stdout spew
-<br>122433 	Exception in ImagesList
-<br>122736 	StyledText - ArrayIndexOutOfBoundsException
-</blockquote>
-
-<h2> SWT Build 3.2 018f - Wednesday December 14th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-120654    	Cheese in StyledText on Linux
-</blockquote>
-
-<h2> SWT Build 3.2 018e - Wednesday December 14th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-121089    	LineBackgroundListener no longer works
-</blockquote>
-
-<h2> SWT Build 3.2 018c - Wednesday December 14th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-118909    	Problems with accents using SWT_AWT
-</blockquote>
-
-<h2> SWT Build 3.2 018b - Wednesday December 14th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-NoPR	Warning fixes, background redraw in Combo and Spinner
-</blockquote>
-
-<h2> SWT Build 3.2 018a - Tuesday December 13th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-29994	Image background Composite / Transparent widget backgrounds
-</blockquote>
-
-<h2> SWT Build 3.2 018 - Tuesday December 13th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-114518	[build] eclipse solaris-motif depends on libm.so.2
-</blockquote>
-
-<h2> SWT Build 3.2 017a - Monday December 12th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-116722	[PropertiesView] [CellEditors] (regression) Property edit...
-<br>119638 	Typo in ToolItem.getControl
-<br>119670 	StyleText.setRange(StyleRange) no longer working
-<br>119687 	Tree mouse button down messing up cell editors
-<br>120176 	Can't reliably change the cursor during Tracker.open()
-</blockquote>
-
-<h2> SWT Build 3.2 017 - Tuesday December 6th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-100659 	Dialog displays small sometimes in GTK
-<br>116121 	Invalid widget used for gtk_widget_get_accessible
-<br>116746 	ToolItem text is clipped
-<br>117700 	[open type] Open Type table shows unmotivated ellipsis, d...
-<br>118119 	Mac: Calling Tree.setItemCount() causes SWTError: Item no...
-<br>118362 	StyledText: Top index wrong after selectAll
-<br>118378 	StyledText#computeSize imposes artificial limit on return...
-</blockquote>
-
-<h2> SWT Build 3.2 016 - Tuesday November 29th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-64776    	StyledText word traverse places caret wrong with WRAP
-<br>67754 	StyledText: AIOBE (Power of 2 + 1)
-<br>74482 	Background colour not propagated inside group or tabfolder
-<br>83405 	Support multiple fonts in StyledText
-<br>83406 	Support objects in StyledText
-<br>83430 	Support indentation in StyledText
-<br>99381 	[PerspectiveBar] Alignment of items in perspective switch...
-<br>99461 	resizing Table can have draw problems
-<br>109901 	Poor performance of StyledText.
-<br>112705 	[build] SWT standalone .zip uncompresses to the current d...
-<br>115398 	[build] Compile warnings in os.c on Solaris/GTK+
-<br>117574 	RIGHT_TO_LEFT | DOUBLE_BUFFERED don't get along
-<br>117757 	Is TreeItem (.. int hParent, ..) supposed to be public?
-<br>117807 	possible bug in TableItem.setImage (int index, Image image)
-<br>117816 	Crash while running JFace test suite
-<br>117879 	NullPointerException from mouse move
-<br>117928 	JDT Text test don't run anymore (out of handles) - works ...
-<br>117990 	Reduce matching complexity of the SWT flat toolbar RC style
-<br>118154 	StyledText: setting the caret has no effect
-<br>118227 	StyledText.getBaseline() != StyledText.getBaseline(offset)
-<br>118240 	StyledText.getBaseline(StyledText.getCharCount()-1)) caus...
-<br>118241 	StyledText: getLineHeight(int) and getBaseline(int): code...
-</blockquote>
-
-<h2> SWT Build 3.2 015 - Tuesday November 22nd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-93017 	Tiger: Starting Eclipse with Spotlight freezes UI Manager.
-<br>103311 	[build] mozilla and cairo swt libs are not built during e...
-<br>104284 	GTK warnings when setting item count on VIRTUAL Table bef...
-<br>107720 	[build] Request to replace ${ws}, ${os} and ${arch} in fr...
-<br>113005 	Table Header stays depressed.
-<br>116110 	FileDialog hangs SWT Application
-<br>116350 	Transform not being set properly on Linux-GTK
-<br>116683 	Home key doesn't scroll window
-<br>116688 	editor cheese after code completion
-<br>116720 	GLCanvas doesn't set hint for merging mouse motion events
-<br>116845 	Ctrl+End in StyledText does not scroll down enough to rev...
-<br>116855 	StyledText with WRAP and special text draws cheese on Arr...
-<br>116938 	VIRTUAL Tree hangs
-<br>117125 	Tree with columns shows horizontal scroll bar when it sho...
-<br>117174 	Mouse event coordinates broken on Linux-GTK
-<br>117195 	Regression: Shell ignores first mouse-click after dialog ...
-</blockquote>
-
-<h2> SWT Build 3.2 014a - Tuesday November 15th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-116466		AIOOBE in StyledTextRenderer.updateRanges
-</blockquote>
-
-<h2> SWT Build 3.2 014 - Tuesday November 15th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-79894    	Control.update() method is too expensive
-<br>100659 	Dialog displays small sometimes in GTK
-<br>107219 	Redraw problems on resizing Tree column
-<br>112358 	Need a way to create a new Color based on an existing color
-<br>112454 	ColorSelector button does not display correctly when firs...
-<br>113105 	Table widget does not return table item when #getItem(Poi...
-<br>114815 	KeyDown Listener deaf until controls traversed; then focu...
-<br>115229 	SWT.RIGHT on Label with Image causes drawing problems
-<br>115230 	Font smooth does not work in Eclipse Forms
-<br>115628 	[build] GLData.java missing from src.zip
-<br>115667 	Handle leak in TextLayout
-<br>115675 	disappearing checkbox with Windows XP look and feel
-<br>116005 	Cannot type in Text widget in an ON_TOP Shell
-<br>116038 	Need more docs for modal behavior constants in SWT class
-</blockquote>
-
-<h2> SWT Build 3.2 013 - Tuesday November 8th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-47760    	Images that SWT cannot load.
-<br>93380 	[DnD] 100% CPU usage when dragging files in the navigator...
-<br>98282 	Wrapping has strange behavior for long Label with no spaces
-<br>111195 	Doubleclicking between TreeColumns does not resize the co...
-<br>112345 	[LayoutExample] Toolbar replacing another widget causes c...
-<br>112463 	Tree.showColumn doesn't scroll column from left of viewpo...
-<br>113244 	Accessibilty...When using JAWS on a StyledText widget the...
-<br>113802 	Dialogs block the execution of (a)syncExecs
-<br>114632 	ControlExample should show button with both image and text
-<br>115092 	Snippet 203 doesn't use all texts
-<br>115176 	Regression: Disabling tool bar makes separator items disa...
-<br>115229 	SWT.RIGHT on Label with Image causes drawing problems
-<br>115292 	NullPE in Tree#_getItem(TreeItem parentItem, int index)
-<br>115317 	ToolItem's are now (light-)gray in M3
-</blockquote>
-
-<h2> SWT Build 3.2 012c - Tuesday November 2nd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-114533	Editor popup has wrong size
-</blockquote>
-
-<h2> SWT Build 3.2 012b - Tuesday November 1st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-114498	Table doesn't send selection change events anymore when selecting elements with the mouse
-<br>114518	[build] eclipse solaris-motif depends on libm.so.2
-</blockquote>
-
-<h2> SWT Build 3.2 012a - Tuesday November 1st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-112390	[Viewers] JUnit error in JFacePerformanceSuite
-</blockquote>
-
-<h2> SWT Build 3.2 012 - Monday October 31st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-76789 	Table redraw during drag'n'drop
-<br>85069 	[Mac] KERN_PROTECTION_FAILURE on Exit
-<br>87883 	Remove title bar buttons from application-modal dialogs o...
-<br>88724 	Provide 'since' javadoc in snippets
-<br>92341 	DCR - Add SWT.VIRTUAL style to Tree widget
-<br>98511 	Treeviewer doesn't de-select child when parent is closed
-<br>100668 	Mac only: redraw bug which occurs when switching views
-<br>101331 	GC.drawFocus not implemented on the Mac
-<br>104973 	Unhandily Workaround in Text.getCaretLocation ()
-<br>110951 	Combo.setItem(int, String) does not preserve the selectio...
-<br>111303 	Cannot middle-button paste to rxvt from Eclipse
-<br>111798 	Text#getCaretLocation() replaces selected text by " " iff...
-<br>113172 	SWT Label widget trancates the text if it contains a lo...
-<br>113204 	Text widget bleeds outside SashForm
-<br>113895 	pango_layout_context_changed called too often
-<br>113971 	Test failures in Tree on N20051027-0010
-<br>114039 	Table.computeSize returns bogus Point.y values under Win3...
-<br>114139 	Bad colours for text in the plugin.xml editor
-</blockquote>
-
-<h2> SWT Build 3.2 011 - Tuesday October 25th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-34612    	scroll problem in tree, table, and list
-<br>35909 	Table HIDE_SELECTION behaviour not implemented
-<br>41466 	Panther: Check and Radio ToolItems don't use correct look
-<br>51736 	[JUnit] TreeItem test cases failing
-<br>68657 	JUnit test fails for Image.setBackground
-<br>76804 	Improve SWT performance over GTK window system
-<br>85539 	[JUnit] GC.copyArea test cases failing
-<br>89687 	computeSize(-1, -1) wrong for Text with SWT.Wrap.
-<br>91388 	Tiger: 1 pixel line drawn over scrollbars
-<br>94370 	SWT crashes with KERN_PROTECTION_FAILURE on mac
-<br>94629 	Clipped text fields in project info page
-<br>96839 	CCombo visible above neighbouring areas while scrolling ...
-<br>100035  Eclipse loses its dock icon when dock restarted
-<br>100696 	Keyboard fails on MacOS X
-<br>102088 	Text with CENTER has too much logical space
-<br>109215 	Moveable table column and DND feedback clash on MacOS X
-<br>109951 	Mac: Menu Highlight Cheese
-<br>109952 	Mac: Menu Cleared After Shell Restored From Dock
-<br>111973 	Default Dialog font on Mac OS X not good for DBCS languages
-<br>112116 	Antialiasing causes incorrect drawing
-<br>112403 	window dimensions are tiny
-<br>112994 	auto hook up simple widget relations for screen readers
-<br>113100 	Button size test failures in org.eclipse.ui.tests
-<br>113485 	Don't flush X exposes for a SMOOTH Sash
-</blockquote>
-
-<h2> SWT Build 3.2 010 - Tuesday October 18th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-32471    	Disabled text field does not show as ghosted
-<br>34513 	Text has a horizontal scrollbar when not required
-<br>41306 	Border draws through fast views
-<br>41467 	Panther: Switch to HIViews and Compositing mode
-<br>43920 	Clipping problems
-<br>51749 	List flashes
-<br>57723 	BIDI: StyledText bug when changing the color of bold text
-<br>62908 	ScrollBars flash when Text widget created
-<br>64997 	label cheese when dialog layout changes.
-<br>66980 	Custom Combo: changing any option while the component is ...
-<br>70587 	[Perspectives] java perspective does not repaint on occasion
-<br>74574 	Property Dialog > Info Page: layout broken
-<br>82021 	BIDI:when searching for a substring of an Arabic word the...
-<br>85775 	Focus painted outside of the visible area of scrollable.
-<br>89687  	computeSize(-1, -1) wrong for Text with SWT.Wrap.
-<br>89696 	Bad painting when eratically scrolling compare editor
-<br>94629   Clipped text fields in project info page
-<br>99266 	[Viewers] Bogus empty rows at the beginning of a table
-<br>102525 	Button in a toolbar not sized correctly
-<br>104041 	[browser]browser.execute() fails when Acrobat Reader v7 i...
-<br>108635 	Text widget in MAC OS X doesnt paint to GC
-<br>108943 	Dragging table column sashes left to right leaves pretty ...
-<br>111910 	Regression: Empty unusable dialogs on Redhat 8+9 / gtk-2....
-<br>112336 	StyledText is still misbehaving
-</blockquote>
-
-<h2> SWT Build 3.2 009a - Tuesday October 11th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-NoPr	Text issues on the Mac, compile error on Photon
-</blockquote>
-
-<h2> SWT Build 3.2 009 - Tuesday October 11th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-13813   API request: notification when OS system colors change
-<br>22000 	GTK: Menubar is not accounted for in computeTrim().
-<br>51480 	JUnit tests for Browser are printing to console
-<br>71348 	Can't listen Excel events
-<br>75390 	[browser] download not working on the mac
-<br>93763 	Clicking on the button frame does not activate toolitem's...
-<br>110346 	Text widget does not trigger SWT.DefaultSelection events ...
-<br>110559 	Pressing Cmd+Q twice crashes application
-<br>110923 	TableItem.setImage does not redraw the item
-<br>111751 	[OpenGL] No GLData class found when running examples
-<br>111762 	JVM dump in SWT native method
-</blockquote>
-
-<h2> SWT Build 3.2 008 - Tuesday October 4th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-33967  	DCR - Image AND Text Button support when avalaible
-<br>85962 	Internal browser maintains session after window is closed
-<br>88958 	DirectoryDialog and FileDialog bring CPU utilization to 100%
-<br>90116 	[build] pkg-config arguments passed to ld and not gcc
-<br>98296 	Browser in BrowserExample opens too small
-<br>102097 	[build] build.sh uses hardcoded AWT_LIB_PATH
-<br>103894 	browser fail to hyper link to another page
-<br>109431 	ArrayIOB in Tree.wmNotifyChild
-<br>110342 	SWT Example Launcher: Double-click on "Standalone" folder...
-<br>110531 	VM crashes when creating an Image after rotation
-<br>110734 	Warnings about XCreateColormap
-<br>110753 	gdk_region_get_rectangles leaks
-<br>110767 	java.lang.NoSuchMethodError: XErrorProc when setting Disp...
-<br>110949 	link error in GC.setClipping(x, y, w, h) on pocket pc
-<br>111157 	TreeItem.setBackground doesn't work
-<br>111284 	Crash in TreeSelection - Event
-</blockquote>
-
-<h2> SWT Build 3.2 007 - Tuesday September 26th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-37709 	Support OpenGL
-<br>50646 	CTabFolder tooltips are not read out
-<br>74095 	SWT_AWT X error with JadeDisplay integration
-<br>104407 	Right click on Tree does not honor the SWT.FULL_SELECTION...
-<br>108921 	Tree with lines visible not painted correctly
-<br>108949 	[browser] javascript alerts are not shown
-<br>110432 	atk_object_factory_create_accessible errors
-</blockquote>
-
-<h2> SWT Build 3.2 006d - Wednesday September 21st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-110057	[browser] crash whenever a Browser is disposed
-</blockquote>
-
-<h2> SWT Build 3.2 006c - Monday September 19th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-110073	perspective button goes blank after closing perspective
-</blockquote>
-
-<h2> SWT Build 3.2 006b - Monday September 19th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-99266	[Viewers] Bogus empty rows at the beginning of a table
-</blockquote>
-
-<h2> SWT Build 3.2 006a - Monday September 19th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-NoPR    	Compile fixes for 64-bit
-</blockquote>
-
-<h2> SWT Build 3.2 006 - Monday September 19th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-101750    	[Browser] Clicking on link to PDF file does nothing
-</blockquote>
-
-<h2> SWT Build 3.2 005 - Tuesday September 13th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4572    	Need support for tool tips in table columns (1GBZLD1)
-<br>34184 	Native Tree: No tooltips
-<br>46387 	Patch for saving animated GIFs
-<br>87503 	implement OSX opengl binding
-<br>87577 	GC.drawImage() with rescaling does not optimize clipped d...
-<br>97597 	Tree is not showing lines
-<br>101204 	[consistency] MouseDown fired while using Scrollbar in Table
-<br>102952 	Foreground color gets lost when painting a Path
-<br>105772 	Strange background color of label on text search page
-<br>106289 	Blurry Tree text in second column
-<br>106498 	creating Tree column 0 causes drawing problem
-<br>107243 	Scrollbar.setValues silently does nothing
-<br>107684 	Resetting of clipping region does not work if gc.setTrans...
-<br>108060 	Extra non-functional horizontal scroll bar in TreeViewer
-<br>108190 	Combo doesn't produce modification event for ALT-DOWN
-<br>108315 	GC.setAdvanced() destroys clipping
-<br>108331 	Usign internal web browser to access basic auth protected...
-<br>108423 	GC.drawArc doesn't work correct with Cairo
-<br>108511 	Eclipse crashes when open html file renamed
-<br>108706 	GC.drawRoundRectangle() doesn't work if Cairo is initialized
-<br>108796 	Please make FormAttachment() public
-<br>108865 	SWT.DOUBLE_BUFFERED + GC.drawFocus() equals cheese
-</blockquote>
-
-<h2> SWT Build 3.2 004 - Tuesday August 30th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-34159    	[Tasks] First three columns of Task List too wide w/nativ...
-<br>37959 	Select on hover selects when mouse is in scrollbar
-<br>60309 	TextLayout.getBounds.height not right when the text termi...
-<br>65729 	TextLayout.getOffset is not working when using '\n'.
-<br>67066 	Table "lines visible" flag does not work
-<br>80490 	The SWT browser widget doesn't work with input field type...
-<br>81567 	[PropertiesView] Properties View scrolling problem
-<br>96339 	Next Editor causes crash when remapped to Ctrl-Tab
-<br>97597 	Tree is not showing lines
-<br>101204 	[consistency] MouseDown fired while using Scrollbar in Table
-<br>105622 	ToolItem.setText("") should remove Text and return to ini...
-<br>105772 	Strange background color of label on text search page
-<br>106494 	creating Table/TreeColumn makes existing item disappear
-<br>106502 	setting Table column alignment does not visually update
-<br>106511 	Cannot set text selection in VerifyListener.verifyText
-<br>106928 	JVM terminates when closing web broser with Command W on ...
-<br>107777 	[browser] crash when accessing password-protected site
-</blockquote>
-
-<h2> SWT Build 3.2 003 - Tuesday August 23rd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-89183    	Image in any table column header creates indent in first ...
-<br>92636 	[Browser] Clicking in web browser (editor) does not dismi...
-<br>100665 	Add Resource.getDevice()
-<br>104380 	Text with WRAP - Compute fails
-<br>105494 	setting image in TreeItem column 1 affects its future col...
-<br>106006 	[Contributions] NullPointerExceptions in MenuManager.update
-<br>107123 	Alpha values on GC are not applied to Images on Windows
-<br>107324 	Recent changes causing a VM crash
-<br>107329 	AIOOBException caused by Tree.setRedraw()
-<br>107452 	[browser] fires 2 keyUp events
-</blockquote>
-
-<h2> SWT Build 3.2 002a - Thursday August 18th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-107112 	Closing an editor adds "Widget is disposed" error to the ...
-</blockquote>
-
-<h2> SWT Build 3.2 002 - Tuesday August 16th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4416    	Widget tree should be valid during a dispose event (1FF1DJ4)
-<br>4862 	Check for isDisposed() in dispose after sending Dispose C...
-<br>64107 	Items in bad state in dispose callback
-<br>89183 	Image in any table column header creates indent in first ...
-<br>90447 	AIOOB when creating TreeItems in TreeItem.dispose() callback
-<br>90478 	TreeItem.dispose callback provides opportunity for Tree h...
-<br>92013 	DCR - Need SWT.VERTICAL style for CoolBar
-<br>94896 	Browser.setText() fires an unexpected url
-<br>104380 	Text with WRAP - Compute fails
-<br>104589 	Crash while running JFace test suites
-<br>106289 	Blurry Tree text in second column
-<br>106536 	TableItem.getBounds - small inconsistencies
-<br>106542 	showing/hiding column sort arrow should recompute display...
-<br>106543 	64-bit problem in Cairo
-<br>106601 	Typo in SWT makefile
-<br>106640 	Failures running the JFace suites
-<br>106647 	VM crash in TableItem dispose
-<br>106730 	Rendering problems on Customize Perspective dialog
-<br>106759 	SWT doesn't build against newest Cairo versions
-<br>106851 	NPEs caused by recent Tree changes
-<br>107048 	Path.moveTo draws lines
-<br>107145 	Javadoc can not refer to package protected methods
-</blockquote>
-
-<h2> SWT Build 3.2 001c - Wednesday August 10th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-NoPR  Sort indicator stuck up on Windows
-</blockquote>
-
-<h2> SWT Build 3.2 001b - Monday August 8th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-45708  NPE in Table.releaseWidget
-<br>59537 [Workbench] Accessibility: Minimize and Maximize icons in...
-<br>105133 mouse wheel scrolling in editor moves scrollbar thumb but...
-<br>105591 Problems setting and updating an Image on a Label
-<br>105849 SWT bugs: GDI Handles leak
-<br>106058 Antialiasing memory leak
-</blockquote>
-
-<h2> SWT Build 3.2 001a - Tuesday August 2nd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-70599 	Unexpected tooltip behaviour of Combo control
-<br>80798 	setToolTipText() method of org.eclipse.swt.widgets.Combo ...
-<br>96053 	Spinner: Pressing buttons should focus spinner and select...
-<br>96916 	Spinner.setToolTipText() doesn't work
-<br>99145 	Link widget only disables link, not text
-<br>103465 	Need better documentation of SWT event types.
-<br>103973 	GC Transform not applied to drawImage()
-<br>104301 	Support discovery of AWT Frames by walking the Widget hie...
-<br>104966 	Link displays as enabled when setText called after setEna...
-<br>104992 	List control bug [cheese when resizing]
-<br>105132 	Image flashing when using a Tree in a themed TabFolde
-<br>105213 	moveBelow(null) does not adjust z order
-</blockquote>
-
-<h2> SWT Build 3.2 001 - Tuesday July 26th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-18607 XP Look and Feel - 3D border appearance on some widgets d...
-<br>24538 TabItem controls should use the TabFolder to paint their ...
-<br>38948 caculate table height not possible
-<br>42475 Add LEFT/CENTER/RIGHT to ControlExample Text tab
-<br>43192 Add sort indicator (e.g. arrow) in TableColumn
-<br>45895 [browser] get NPE when calling browser api from within di...
-<br>49065 Table widget flicker
-<br>51995 SelectionEvent not getting detail info for scrollbar events
-<br>69374 Crash in SWT Accessible / org.eclipse.swt.internal.ole.wi...
-<br>74095 SWT_AWT X error with JadeDisplay integration
-<br>77194 MsgBox is not centered on screen on Solaris, ok in win32 ...
-<br>80465 XP theme - label issues with tab folder
-<br>85389 [preferences] Changing Code Formatter tab width does not ...
-<br>86018 TreeColumn should support moveable headers
-<br>92313 Virtual table: flashes on clear
-<br>92342 Tree widget: make TreeColumns reordable
-<br>94429 Group label doesn't fire mouse events
-<br>94502 Redundant check for the pointer coordinates
-<br>99524 Display.eventProc reads a GdkEventButton when GdkEventAny...
-<br>99746 Table and Tree column resize line matches foreground color
-<br>99761 pressing down arrow selects tool item
-<br>100387 CTabFolder creates and disposes a Shell on every MouseHover
-<br>100741 Unused variable in ScrollBar.java
-<br>101093 [browser] crash when setting html as url
-<br>101534 No navigation by typing in VIRTUAL Table
-<br>101799 Enabling advanced graphics will cause alpha gradient to b...
-<br>101839 support MacOS command line option "-Xdock:name=<applicati...
-<br>102080 Unused variables in GC.java
-<br>102165 ImageLoader closes OutputStream on save
-<br>102272 Repainting a double-buffered canvas may cause pixel corru...
-<br>102313 disposing first column of reordered Tree changes items
-<br>102481 Pattern doesn't make a gradient
-<br>102543 Height of MenuItems differs when using Icons and Text com...
-<br>102617 Table right mouse double click registers as left mouse click
-<br>102794 GridLayout has change behaviour between 3.0.2 and 3.1
-<br>102830 Junit test of TableColumn (test_setTextLjava_lang_String...
-<br>102952 Foreground color gets lost when painting a Path
-<br>103187 Support gradients with alpha
-<br>103238 TrayItem obscures KDE's gradient
-<br>103349 Scale widget switches focus when setting background
-<br>103431 JavaDoc for Composite.getChildren() is wrong
-<br>103436 Performance of selection in a multi-select table
-<br>103571 Image in table header gets corrupted
-<br>103603 ImageData getPixel operation
-<br>103627 Text#getCaretPosition() returns wrong value for non-zero ...
-<br>103642 resetting clipping path doesn't work when transforms are ...
-<br>103934 Table.getItem(Point) uses incorrect calculation on Motif
-<br>103937 Motif: Resizing a column in a large virtual table is extr...
-<br>103939 On Motif: In a large virtual table Table.removeAll() is ...
-<br>104509 reducing VIRTUAL Table's item count can show drawing problem
-</blockquote>
-
-<h2> SWT Build 3.1 038i - Monday June 27th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-101795   GC.fillGradientrectangle() with GDI+ causes crash
-</blockquote>
-
-<h2> SWT Build 3.1 038f - Thursday June 23rd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-20448   Text Widget Javadoc for Text limit
-<br>41346 	Javadoc: add a note about the order of getSelectedIndices...
-<br>49674 	DND.FEEDBACK_INSERT_BEFORE and DND.FEEDBACK_INSERT_AFTER...
-<br>78634 	ImageData.getTransparencyMask - incorrect javadoc or impl...
-<br>84681 	The specifications for some methods should describe the b...
-<br>84891 	In the specifications some methods do not describe their ...
-<br>84906 	We found some typos or broken links.
-<br>84911 	Unspecified methods
-<br>86562 	Can Widget.getDisplay() be called from a background thread?
-<br>99348 	Java doc for Decorations.setImages(Images[] images) does ...
-<br>100663 	[64] Links do not paint
-<br>100699 	Widget.setKeyState reads from memory which has been freed
-</blockquote>
-
-<h2> SWT Build 3.1 038 - Friday June 16th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-98845 Crash when a Combo disposed on FocusOut
-<br>99376 TableColumn has width=0 and second column missing
-<br>99534 ImageList leaks a pixbuf if an image added multiple times
-</blockquote>
-
-<h2> SWT Build 3.1 037i - Friday June 16th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4805 resize during setRedraw causes cheese (1GJ4URX)
-<br>96479 SWTMessages.properties missing from source zip
-<br>97170 [About] Eclipse logo not rendered correctly in about dial...
-<br>97625 Intro Test A.4 Eclipse crashed.
-<br>99266 [Viewers] Bogus empty rows at the beginning of a table
-<br>99518 Extremely jumpy resizing in the ControlExample
-<br>99525 TextLayout.getLineOffsets() leaks a pango iter
-<br>99527 Dialog size problems when using the ion window manager
-<br>99535 FontDialog leaks a string
-<br>99541 Cursors not disposed in SWT FileViewer example
-<br>99561 GDI+ crash with icons where width > height [was: GEF pain...
-<br>99636 [browser] browser contents become excluded from tab order
-<br>99745 Tray doesn't support image with alpha
-<br>99756 paint example is missing view icon
-<br>99936 [browser] nsIRequest has some incorrect method signatures
-<br>100040 Slowdown between 3.1 RC1 and N20050602 due to change to I...
-<br>100199 Display.asyncExec() can hang Windows
-</blockquote>
-
-<h2> SWT Build 3.1 037g - Friday June 10th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-99341 GDI leak in Label with transparent images (png, gif)
-</blockquote>
-
-<h2> SWT Build 3.1 037f - Friday June 10th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-98802 Focus cannot be given to visible but zero-sized controls
-<br>98894 Shell.setImages() should be smarter
-<br>99167 Hover Event fired continiously although Mouse not moving
-</blockquote>
-
-<h2> SWT Build 3.1 037c - Thursday June 9th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-96212 org.eclipse.ui could not be found.
-<br>96679 OutOfMemory Exception from corrupted clipboard?
-<br>99109  ComputeSize on Link gives different results when calling two times in a row
-</blockquote>
-
-<h2> SWT Build 3.1 037 - Thursday June 9th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-77611  [browser] IE shows warning dialog when JS error occured  
-<br>89397  Compile warnings when compiling libswt-gtk-XXXX.so  
-<br>91547  Insertion line in TreeViewer does not show up during drag...  
-<br>93724  Drag-and-drop creates signal names every time  
-<br>94210  Multiple expansion broken in trees  
-<br>96042  computeTrim() is not returning the correct value  
-<br>96525  Painting a translucent image fails when the GC is mirrored  
-<br>96723  Table not shown when there are no rows initially  
-<br>96873  Icons in toolitem are mirrored on mirrored toolbar  
-<br>97011  Custom Table font is not applied to first column header  
-<br>97046  PNG images look corrupt as main window icon  
-<br>97177  [misc] Chinese IME status lost  
-<br>97340  MouseEnter not fired when scroll bar released  
-<br>97370  gnopernicus no longer reads custom widgets in eclipse  
-<br>97651  tree insert mark cheese  
-<br>97659  TreeColumns don't fire ControlEvents on dispose() [win32]  
-<br>97668  Chevron not always showing in Perspective Switcher  
-<br>97678  SashForm - can lose sash for item on far right  
-<br>97686  AIOOB when removing non-existent TableItem by index  
-<br>97696  ToolItem with image is blank or shows cheese  
-<br>97697  CCombo - drop down list appears in wrong place  
-<br>97725  GTK - Layout Example table editor combo in wrong place  
-<br>97743  [portability] Drag Tool Turns Off on Linux  
-<br>97745  Table column header stays pressed if mouse button release...  
-<br>97762  Hiding redraw window before destroying it  
-<br>97813  height of Text widgets for SWT/GTK differs from native GT...  
-<br>97903  problem in features Plateform and Plateform Plug-in Devel...  
-<br>97915  Table.remove(int) can change selection  
-<br>97931  Coolbar fails to show contents until resized  
-<br>97978  Table/TreeColumns don't fire ControlEvents on dispose() [...  
-<br>97981  Focus given to the Eclipse window while the preferences d...  
-<br>97985  Snippet144 (Virtual Table) slow on the Mac  
-<br>97992  javadoc warnings in RC1  
-<br>98024  Open type dialog skips over too much  
-<br>98156  Images not appearing on menus, or when painted  
-<br>98383  Linux AMD64 missing org.eclipse.swt.gtk.linux.x86 3.1.0 h...  
-<br>98439  Pixel corruption when using clipping on a double-buffered...  
-<br>98802  Focus cannot be given to visible but zero-sized controls  
-</blockquote>
-
-<h2> SWT Build 3.1 036 - Thursday May 26th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-26902:  GTK: mouse wheel doesn't work on the compare editor  
-<br>64393:  Forgot to close <code> tag in SWT javadocs  
-<br>77540:  typo in import org.eclipse.swt.custom.StyledText.setOrien...  
-<br>77617:  Brief "page not found" message on startup  
-<br>81064:  [Browser] HTML set via setText() not showing in most cas...  
-<br>82169:  In console pane, cannot click "Terminate" and then "Remov...  
-<br>85645:  Typeahead broken for Table and Tree  
-<br>89378:  Combo default size too small with certain fonts  
-<br>89574:  In the task bar, the Eclipse window is called "TopLevelSh...  
-<br>89720:  Crash closing dialog when IM is open (IIIM)  
-<br>90246:  StyledText draws cheesy if the caret is invisible  
-<br>92105:  BIDI3.1: Mixed Arabic and English text is viewed incorrec...  
-<br>92352:  DBCS3.1:can't input CHT strings after press Enter while x...  
-<br>92629:  Table.setSelection does nothing if there is a TableColumn   
-<br>94437:  add "Columns Reorderable" checkbox to ControlExample's Ta...  
-<br>94595:  eclipse gtk doesn't set X window name  
-<br>94598:  DBCS3.1:Eclipse hangs when activate IIMF input in search ...  
-<br>94946:  FileDialog should inherit image from parent shell  
-<br>95116:  can create Shell with disposed parent Shell  
-<br>95756:  Tables don't repaint  
-<br>95825:  GTK warnings when using a virtual table  
-<br>96090:  Popup menu doesn't work when dialog opened via short cut  
-</blockquote>
-
-<h2> SWT Build 3.1 035c - Friday May 13th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-93526: SWT Browser crashes on MacOS
-</blockquote>
-
-<h2> SWT Build 3.1 035b - Friday May 13th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-95035: Can't Launch Eclipse on Windows 98
-</blockquote>
-
-<h2> SWT Build 3.1 035a - Thursday May 12th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-88463:  No hover help in java editor  
-</blockquote>
-
-<h2> SWT Build 3.1 035 - Thursday May 12th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-94421: NPE showing a CoolBar's dropdown
-<br>94467: Table layouts which only lay out once are giving bogus sizes
-<br>94835: Buttons with characters that start with a line are cut off in right to left
-<br>94815: Decorations.setDefaultButton() does not check for null
-<br>94784: Java search can't be changed
-</blockquote>
-
-<h2> SWT Build 3.1 034 - Tuesday May 10th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-31066:  Button widget does not support images with transparent color.  
-<br>71228:  Program.findProgram("html") returns null when there's no default command  
-<br>71234:  Program.execute mangles URLs  
-<br>72784:  Close override redirect while opening another loses focus forever  
-<br>75148:  Mac launcher: improve Dock icon and application name support
-<br>76628:  Eclipse crashed JVM when CVS protocol not set correctly  
-<br>79268:  Program API does not work with GNOME 2.8 (libgnomevfs-WARNING)  
-<br>79631:  [CTabFolder] Min / Max buttons are hidden when last item closed  
-<br>80564:  Image transparency not always handled correctly (case #1)  
-<br>80567:  Image transparency not always handled correctly (case #2)  
-<br>83564:  [SashForm] Sash no longer moveable when one weight is very tiny  
-<br>84219:  List.showSelection() scrolls list although item already visible  
-<br>87051:  NPE in file dialog when trying to open a file with a wierd name.  
-<br>87636:  ArrayIndexOutOfBoundsException TreeItem.setImage()  
-<br>88030:  Table and SWT.CHECK: Check not visible on selection  
-<br>90462:  add fragment org.eclipse.swt.gtk.linux.ppc  
-<br>90938:  GC.setLineStyle produces inconsistent dash for width equal 1  
-<br>91159:  [Consistency] DropTarget event.dataType field not alwys set on DragEnter  
-<br>91672:  CTabFolder performance improvements  
-<br>92181:  Bogus CTabFolder tab sizes  
-<br>92612:  CTabFolder hidden tabs count (in chevron) can become 0  
-<br>93106:  GB18030: Copy GB18030 char outside of editor to editor will get unicode encoding shown.  
-<br>93349:  Support alpha transparency in Shell images  
-<br>93382:  Use canonical signal names  
-<br>93387:  console hijacks SWT event thread when selecting binary content  
-<br>93391:  Eclipse 3.0.1 PLATFORM CRASH. JVM termination exit code 1 on SuSE 8.2 Linux x86 gtk on "Eclipse Overview"  
-<br>93501:  ToolBar.computeSize is returning a much wider width than it used to  
-<br>93664:  TRAVERSE_RETURN closing a dialog cannot be suppressed in a combo box  
-<br>93691:  Program.findProgram("html") fails with Firefox as the default browser  
-<br>93759:  Can't drawPath on image GC  
-<br>93848:  Label not wrapping  
-<br>93870:  [Import/Export] Usability problem with the Import > Existing Project into Workspace  
-<br>94003:  Cannot update a button image using a GC if the image is set before creation  
-<br>94132:  ClassCast exception in FillLayout.computeChildSize  
-<br>94202:  Activate event not fired when ON_TOP window hidden  
-</blockquote>
-
-<h2> SWT Build 3.1 033 - Tuesday May 3rd, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-33313:  [JUNIT] Combo remove fails  
-<br>33821:  Header of native table doesn't show images  
-<br>38415:  remove() function in combo behaves inconsistently (BBAWT)  
-<br>45793:  Panther: Initial Combobox contents not visible  
-<br>63266:  Native platform icons look junky  
-<br>65806:  [misc] TextViewer.revealRange very slow for long ranges  
-<br>67400:  Editable combo-box misses out the first two characters until focus is given  
-<br>80463:  EC: CoolBar height < Combo height  
-<br>83097:  Dialog opens with no contents; resizing shows contents  
-<br>83905:  No way to center tool items on a vertical toolbar  
-<br>84632:  hiding Tree header can leave cheese  
-<br>85862:  [consistency] TreeEvent fired upon disposal of TreeItems  
-<br>86201:  Output in consol causes Eclipse to crash  
-<br>86214:  GTK caret location gets hammered after being set in verify event  
-<br>86830:  org.eclipse.swt.graphics.GC: Transform has no effect to images with transarent colors like GIF/PNG  
-<br>87477:  Eclipse on Linux-Motif requires GLIBC_2.3  
-<br>87822:  GC.drawString ignores transparency boolean when alpha is used  
-<br>89239:  Painting problems using latest builds  
-<br>90115:  swt-mozilla.zip source file puts xpcom.cpp in library/ subdirectory  
-<br>90303:  turn off caret blink  
-<br>91302:  (regression) Transparency is not transparent in remove button on progress view item  
-<br>91441:  Default button flickers in "Replace with Uncommitted Changes" dialog.  
-<br>92318:  ViewForm.set* triggers a layout  
-<br>92505:  Creating a GNOME icon theme is slow  
-<br>92541:  Tree items do not animate as they expand  
-<br>92616:  event doit=false does not work for Combo on Mac.  
-<br>92648:  Tree,setTopItem can end up setting the wrong number  
-<br>92844:  Increase scrolling speed based on distance from the widget  
-<br>92864:  [api] construction notices in GC, Pattern, etc.  
-<br>92883:  Lines are misaligned (antialiased)  
-<br>92964:  Launcher should have no pixmap background under X  
-<br>93058:  Form Layout behaviour has changed between 3.0 and 3.1  
-<br>93151:  TableItem.computeDisplayText does not check to see if index is greater than string  
-<br>93158:  SWT fingerprints and assertions use CPU time cf. elapsed process  
-<br>93222:  Setting a cursor only needs a flush, not a sync  
-<br>93255:  [Contributions] Vertical separator where horizontal was expected  
-<br>93266:  setBackground of text redraw incorrect with xp style  
-</blockquote>
-
-<h2> SWT Build 3.1 032 - Tuesday April 26th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-41772:  DBCS: DBCS copy and paste for OpenOffice failure  
-<br>50598:  Some focus events are reported twice  
-<br>55382:  setAccelerator(-1) on MenuItem shows error on Linux  
-<br>68478:  Another variant of the SWTError: no more handles  
-<br>69381:  Call to new_Shell results in "No more handles" error  
-<br>69701:  Printer doesn't stretch B&W images created by code.  
-<br>80762:  Interactive text selection lags on Linux-GTK+  
-<br>81298:  NPE changing style on SashForm in CustomControlExample  
-<br>85426:  Table not getting expose events when partially obscured by another window  
-<br>85525:  mnemonics are not working  
-<br>87294:  Strange clipping when scaling and rotating drawText  
-<br>88059:  Line Width of 0 is invisible on the Mac  
-<br>88717:  [DND] Tree is scrolling very slow when dragging an Item to the Bottom  
-<br>90192:  ON_TOP setVisible(true) focus issues on parent of child shell.  
-<br>91060:  linux copy-paste chinese to StyledText problem  
-<br>91254:  [encoding] DBCS3.1: bogus DBCS in editor after re-activation  
-<br>91350:  [Browser] Embedded browser fails to handle link to text file  
-<br>91464:  [content assist] NPE in CompletionProposalPopup  
-<br>91733:  MenuItem.setText doesn't check if it matches the existing text  
-<br>91807:  Context menu shows twice in combo box.  
-<br>92017:  Support very large Image on Windows platform  
-<br>92046:  Pen leak in TextLayout#draw(...)  
-<br>92186:  Virtual table: not redrawn when item count drops to zero  
-<br>92228:  Layout occurs while creating table columns, causing AIOOBEs  
-<br>92230:  Inconsistent Button focus events between platforms  
-<br>92382:  Text in table not updated on clear  
-<br>92583:  Hidden files shown by default in GtkFileChooser  
-</blockquote>
-
-<h2> SWT Build 3.1 031 - Tuesday April 18th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4537:  DCR Ability to paint with a brush pattern (1G0I8BE)  
-<br>4621:  CCombo never fires keyboard events (1GB76BP)  
-<br>4742:  DCR: Useful features, idioms and documentation missing from GC (1GFWCUO)  
-<br>7075:  DCR - Rendering hints on GC - anti alias / mitre  
-<br>12723:  Windows XP Icon format not supported  
-<br>20723:  Discrepencies in Table behaviour across platforms  
-<br>23621:  Image scaling gives poor results on Windows  
-<br>28533:  Table - no focus indicator  
-<br>34826:  Eclipse crashes - stack trace shows GP inside tree  
-<br>35341:  Way to disable font smoothing for editors on MacOS X  
-<br>35670:  FontMetrics.getAscent() returns the wrong value  
-<br>37500:  Feature request: SWT Project creation wizard  
-<br>38973:  Need Control.getMonitor (or Widget.getMonitor)  
-<br>40985:  Draw vertical Text or rotate graphics.  
-<br>41160:  ImageLoader has repeatCount of 0 for animated gifs  
-<br>41774:  DBCS: DBCS named file drag&drop failure on GTK  
-<br>42155:  ControlExample - Toolbar SWT.VERTICAL leaves wrong separator  
-<br>48781:  cursors of size 16 look wrong  
-<br>56094:  tracker resize uses screen coordinates instead of control  
-<br>56718:  SWTException and SWTError should use standard 1.4 exception nesting  
-<br>62817:  FileDialog: getFileName does not returns extension  
-<br>64590:  [browser] widget not sized properly  
-<br>66882:  altgr keys not available  
-<br>68679:  minor changes to make_gtk.mak to allow build with installed mozilla  
-<br>68867:  ImageData - remove ImageLoader dependencies  
-<br>69350:  Accessibility : Group title is not taken into account by Window-Eyes 4.5  
-<br>73536:  Eclipse 3.0.1 RC2 source build does not contain latest org.eclipse.swt.tools  
-<br>76456:  Eclipse 3.0.1crashes on HP-UX with a NullPointerException when starting up  
-<br>77055:  Log stacktrace not helpful for SWTException and SWTError  
-<br>80150:  [plan item] [launcher] Support for launcher branding  
-<br>81242:  [JUnit] GP in Clipboard.getContents  
-<br>81691:  Tracker with SWT.Resize really slow  
-<br>82594:  Request support for alpha channel in Color  
-<br>82719:  Request for affine transformation API  
-<br>83472:  Request for API to check for double buffering support  
-<br>83933:  Check and Radio Buttons with image do not use XP style  
-<br>84532:  [browser] Javadoc hover stays on top when it has focus  
-<br>84673:  [browser] amd64 problem  
-<br>84740:  crash on windows xp korean  
-<br>85312:  combo is cut off when added to ToolBar  
-<br>85736:  [browser] SWT Errors on RH 3.0 When Mozilla Security Patch mozilla-1.4.3-3.0.7 installed  
-<br>86193:  Java WebStart: SWT Browser cannot find libxpcom.so: cannot open shared object file: No such file or directory)  
-<br>86608:  Do not understand Javadoc of Link.setText()  
-<br>86631:  Javadoc wrong for Image(stream)  
-<br>86741:  Pressing backspace in browser widget shows navigation cancelled page  
-<br>87882:  No default contextual menu item on Mac  
-<br>88133:  Slow rendering with images with transparancy bit set  
-<br>88839:  Embedded Swing: Enter key does not work  
-<br>89547:  SWT bundle manifest files use deprecated syntax  
-<br>89681:  Link widget missing last word at preferred size.  
-<br>89779:  NPE in CCombo.dropDown()  
-<br>89911:  Missing gtk_tree_view_column_get_fixed_width on amd64  
-<br>90152:  resizing Label flashes  
-<br>90222:  Device constructor  
-<br>90258:  Table item not updated when item count == 1  
-<br>90899:  Using PaintListener on Table destroys repainting (Button is the same case)  
-<br>90946:  gtk_entry_set_text crashes when passed a zero-length buffer  
-<br>91019:  SWT Rendering Problems  
-<br>91070:  Cannot self-host eclipse  
-<br>91089:  SWT Snippet 77 For Table Col resize has an error in it (fix included beklow)  
-<br>91252:  View toolbars are showing with black backgrounds  
-<br>91423:  Fixed size columns used even if fixed_height_mode not supported  
-<br>91435:  Ctrl+SPACE is not a valid keybinding assignment for actions on native widgets  
-<br>91456:  platform-launcher: eclipse.c won't compile on BSD (Mac) because of macro clash  
-<br>91468:  GTK+ 2.2 requests data from non-visible rows of a VIRTUAL table  
-<br>91475:  M5 Selecting TreeColumn does not create an SWT.Selection Event on Mac OS X  
-<br>91511:  Directory Dialog - Selection string not externalized?  
-<br>91555:  Table not visible  
-</blockquote>
-
-<h2> SWT Build 3.1 030 - Tuesday April 11th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4746:  DCR: TreeItem needs removeAll() method (1GG0NL0)  
-<br>11178:  Pressed & disabled toolbar button looks enabled  
-<br>48443:  Property sheet does not repaint  
-<br>53390:  NPE changing perspectives  
-<br>56223:  Display filters do not work in compound native widgets  
-<br>64219:  GeometricalTransformation  
-<br>65192:  org.eclipse.swt.Browser.addHelpListener does not work after the setUrl method is called  
-<br>67529:  Window->Preferences->Help crashes Eclipse  
-<br>78459:  Platform differences setting size while shell is maximized  
-<br>80204:  Checkbox in Tree or Table ignores second click of double click  
-<br>81263:  [CustomControlExample] CCombo caret moves at random when up and down arrows are press  
-<br>83308:  KDE integration causing crashes on KDE 3.3.2  
-<br>83731:  (javadoc update) WindowEvent location and size fields are in terms of shell size, not browser control size  
-<br>84110:  workspace lost  
-<br>84773:  [launcher] icon not being used in error window  
-<br>85117:  Selected and disabled tool item looks enabled  
-<br>85537:  [JUNIT] Display.map test cases failing  
-<br>87037:  [browser] charset/xml Intro question  
-<br>87113:  First TableColumn with style SWT.RIGHT draws badly  
-<br>87559:  NPE in TableItem.getText using control example  
-<br>87837:  Strange redraw and disabled behaviour with SWT.CHECK toolitems with and without disabled icons set.  
-<br>87997:  TableEditor.dispose( ) causes NPE if linked Table is being disposed  
-<br>88388:  tree focus cheese  
-<br>88735:  Table.getClientArea() width is inconsistent with win32  
-<br>88827:  Need a distinctive platform filter for GTK / GTK 64  
-<br>88829:  Table.setColumnOrder() may not fire enough Move events  
-<br>89329:  [Viewers] CVS Repositories View: "Pending..." item gets an icon when selected  
-<br>89367:  String is not rendered inside stringExtent  
-<br>89378:  Combo default size too small with certain fonts  
-<br>89483:  [Table] No SWT.Resize when Scrollbars become visible  
-<br>89669:  [browser] F1 does not bring eclipse help content when browser has focus  
-<br>90087:  GC.copyArea causes continuous repainting of Canvas  
-<br>90123:  SWT manifests still use Provide-Package  
-<br>90176:  Scale widget and SWT.PAGE_UP key event  
-<br>90217:  Request: SWT Fragment name to be unique for a given ws/os/arch  
-<br>90223:  Regression: Spinner reports wrong value  
-<br>90282:  SWT.RIGHT not working on Text control on Mac OS X  
-<br>90317:  clicking in Table or Tree first time fires two selection events  
-<br>90326:  Shell realized too early for no reason  
-<br>90366:  SWT Link Widget throws Array Out of Bounds Exception  
-<br>90457:  SWT in M6 and prior will not build against the Sun JDK  
-<br>90513:  Link widget does not have a proper CreateHandle method  
-<br>90729:  Shell with style MODELESS or DIALOG_TRIM ignores setSize()  
-<br>90770:  Race conditions in Device.getDevice() method  
-</blockquote>
-
-<h2> SWT Build 3.1 029 - Tuesday April 5th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-20954:  [About] Feature Plugins dialog fails to launch web browser  
-<br>25490:  White Color doesn't appear on Toolbar Image  
-<br>34481:  Java Compiler Properties for a Project  
-<br>41065:  Arrow button look is inconsistent with scroll arrows  
-<br>57819:  [SWT-Example-Controls-Table] In some cases the vertical scroll bar is not available with size 10x10  
-<br>64192:  Scrollbar - setVisible not working as expected  
-<br>69919:  [Browser] Javadoc view steals key events.  
-<br>75141:  [Browser] CTabItem with Browser containing video crashes when disposing item's image  
-<br>75317:  [Browser] Location not browsed when URL misses protocol / www  
-<br>79881:  Browser class shipped with AIX-Motif checks for Linux ?!?  
-<br>79927:  crash when using a Table, TableItems using images with alpha, and using TableColumn.pack  
-<br>81235:  [JUnit] TableItem.getBounds test fails  
-<br>81240:  [JUnit] Tree get/setTopItem fails  
-<br>82703:  Tree with TreeColumns doesn't display FULL_SELECTION properly  
-<br>83477:  [browser] Native crash outside JVM in libwidget_gtk2.so  
-<br>85530:  Control in vertical ToolBar doesn't fit  
-<br>87695:  Interface Disposeable  
-<br>87855:  NullPointerException in Table.callWindowProc  
-<br>88278:  TreeItem should provide item.removeAll  
-<br>89063:  [Markers] infinite-loop during cvs override and update  
-<br>89217:  Label.computeSize() returning incorrect values when using WRAP  
-<br>89533:  [Themes] Colors and Fonts preferences page has funny icons for color entries  
-<br>89564:  Image appears and disappears in Tree  
-<br>89575:  Browser widget crashes  
-<br>89665:  VM terminated when switching page in the Plugin manifest editor  
-<br>89785:  Disabled links look like normal links  
-<br>89826:  [Browser] browser eats all keystrokes  
-<br>89885:  Crash using command-O.  
-<br>90009:  code assist loses its visual selection  
-<br>90018:  Native tooltips left around on CTabFolder  
-</blockquote>
-
-<h2> SWT Build 3.1 028 - Thursday March 29th, 2005 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<p>New API has been added to Spinner</p>
-<blockquote>
-int Spinner.getDigits()
-<br>Spinner.setDigits(int)
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-86079:  Spinner should handle non-integer increments  
-<br>87207: Content of first column in Tree with columns overflows past last column  
-<br>89028: uneccessary casts  
-<br>89156: Cairo bindings for SWT can not be compiled.  
-<br>89163: GridData.verticalIndent does not work as expected  
-</blockquote>
-
-<h2> SWT Build 3.1 027c - Thursday March 24nd, 2005 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<p>New API has been added to Tree and TableTree</p>
-<blockquote>
-int Tree.indexOf(TreeItem)
-<br>int TreeItem.indexOf(TreeItem)
-<br>TreeItem Tree.getItem(int)
-<br>TreeItem TreeItem.getItem(int)
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-26625:  Combo cursor and copy/paste are not working right  
-<br>87554: Need bounding rectangle for a Path  
-<br>87820: GC.drawString uses BG color for font when alpha value < 255  
-<br>87824: GC setRegion and getRegion are not symmetric  
-<br>88122: switch org.eclipse.swt plugin and fragments to new eclipse jar format  
-<br>88409: Device.getFontList should have better performance  
-<br>88582: Computed width of link widget is too large  
-<br>82336: TreeView: setting gray gives free check mark  
-<br>83432: iFrame does not render border when in SWT Browser  
-<br>87534: TVT3.1 #33 - SWT Browser View cannot be found  
-<br>87726: Removing libXm links from motif drops  
-<br>87810: Support FULL_SELECTION in (table) Tree  
-<br>87833: Platform-filter must be added to the fragments  
-<br>88093: Shapes are drawn too large when a transform is used  
-<br>88171: Warning in N20050316-0010 build  
-<br>88519: Need a way to clear the Transform from a GC  
-</blockquote>
-
-<h2> SWT Build 3.1 026 - Tuesday March 15th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-68040: Views keep resizing after mouse up
-<br>86294: Find/Replace not working "Illegal/Unsupported escape on the Mac
-<br>87010: NoSuchMethodError Display.setDirectoryProc
-<br>87372: [browser] CTRL-N should not run IE action when using Browser.setText
-<br>87578: TVT3.1 #38 - RUS mnemonics only work in main window
-<br>87584: Remove ImageLoader dependency in Test_org_eclipse_swt_graphics_Image and Test_org_eclipse_swt_graphics_ImageData
-<br>87664: Null pointer exception in org.eclipse.swt.widgets.TreeItem.computeDisplayText in 3.1M5a
-<br>87676: Double-click only works on a tree's column0
-</blockquote>
-
-<h2> SWT Build 3.1 025 - Tuesday March 8th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-41202:  GTK-BIDI: RTL support in Slider  
-<br>84012:  StyledText with SWT.WRAP style does not adjust selection correctly  
-<br>84051:  Table widget unexpectedly fire deactivated event while clicking scroll bar buttons.  
-<br>86582:  Spinner should allow wrapping to be turned off  
-<br>86921:  Crash embedding other process.  
-<br>87075:  [SWT Examples - SWT Controls] Incorrect Dialog buttons creation with SWT.RETRY, SWT.ABORT, and SWT.IGNORE on MessageBox  
-<br>87122:  Link: problem with WM_PRINT  
-<br>87265:  Link widget javadoc does not mention style bits  
-<br>87363:  Regression: MenuDetect no longer opens new menus  
-</blockquote>
-
-<h2> SWT Build 3.1 024 - Tuesday March 1st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-34146: GTK-BIDI: RTL support in ToolItem
-<br>34160: Clicking on table header does not sort w/native table
-<br>41184: GTK-BIDI: Support of RTL orientation of based SWT widgets
-<br>41243: GTK-BIDI: RTL support in List
-<br>41363: GTK-BIDI: RTL support in TabFolder
-<br>41364: GTK-BIDI: RTL support in Combo
-<br>41546: GTK-BIDI: RTL support in Table
-<br>51828: GTK-BIDI: RTL support in Menu
-<br>56593: TableItem.setFont() causes cels to be rendered with ellipsis even when they aren't necessary
-<br>58401: Need a more flexible GridLayout and GridData class to support more dynamic layouts
-<br>83703: Crash when using source - find strings to externalize
-<br>85552: TextLayout preferred size depends on current width
-<br>85634: Strange blip above help combo
-<br>85876: Line bugs in GC
-<br>86000: ImageLoader Save - produces invalid JPEG images
-<br>86145: VM Crash when running remotely via cygwin/X
-<br>86216: Display.getActiveShell() slow with lots of widgets
-<br>86275: NPE in Shell.gtk_focus_out_event
-<br>86375: Toolitem calling gtk_widget_add_events after it is realized
-<br>86402: ToolBar only needs to resize its children if the bounds are required
-<br>86577: Not removing event filter added with gdk_window_add_filter
-<br>86587: Tree: problem with WM_PRINT
-<br>86588: Tree: problem with column resize
-</blockquote>
-
-<h2> SWT Build 3.1 023g - Tuesday February 21st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-85662:  VM crash ? when browser widget is being used  
-<br>70713:  First Launch from Dock fails  
-<br>71844:  popup menu has bunch of empty items  
-<br>85834:  notifyAll() slow in locking code  
-<br>85849:  GC.copyArea() slow on images  
-<br>85875:  Eclipse crashes when clicking on "View Installation History"  
-<br>66815:  Selection disappears in trees when they do not have focus (KDE)  
-<br>37775:  SWT is not 64-bit clean  
-<br>70293:  Application error during the start of Eclipse  
-<br>73919:  add ant task to build native libraries as part of the eclipse build  
-<br>85877:  Shell has unwanted title bar on Pocket PC  
-<br>85236:  IllegalArgumentException when layouting link widget  
-<br>85412:  changing link foreground does not repaint  
-<br>50123:  Drop down Combo doesn't drop down  
-<br>51705:  [JUNIT] - CoolItem fails JUnit tests  
-<br>85069:  [Mac] KERN_PROTECTION_FAILURE on Exit  
-<br>85453:  Advanced graphics not working on W2K - trigger system window  
-<br>85531:  swt-cairo library not built on AMD64  
-<br>85547:  Combo box list is way too big  
-<br>85958:  3.1M5a not usable on win98  
-<br>22035:  DCR - Dragable tablecolumns in table  
-<br>51079:  Resizing of TableColumns on Linux displays extra horizontal toolbar  
-<br>84557:  Table item does not appear in table  
-<br>85386:  NullPointerException in DropTarget  
-<br>4543:  DCR - need flipping image support ala awt.Graphics.drawImage() (1FZ0C7G)  
-<br>30329:  Support Bezier curves on swt.graphics.GC  
-<br>85732:  getClientArea() cause Shell to be resized to its initial size  
-</blockquote>
-
-<h2> SWT Build 3.1 023 - Tuesday February 15th, 2005 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<p>New API has been added to Table and TableColumn to support reordering of columns by dragging the headers</p>
-<blockquote>
-int[] Table.getColumnOrder()
-<br>Table.setColumnOrder(int[])
-<br>boolean TableColumn.getMoveable() - default is false
-<br>TableColumn.setMoveable(boolean)
-<br>SWT.Move event is sent for the TableColumn when columns are dragged to a new position
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>22000:  GTK: Menubar is not accounted for in computeTrim().  
-<br>34644:  DND in the FileViewer example resets tree selection  
-<br>39237:  GTK Tree DND doesn't highlight between markings  
-<br>45429:  TableColumn.pack() doesn't decrease column's width on GTK  
-<br>79419:  [Preferences] Need a link component  
-<br>81254:  ControlExample spews warnings  
-<br>83795:  GridLayout doesn't handle horizontal spanning of multiple columns correctly  
-<br>84500:  Broken selection on TableItem when Image in 1st Column  
-<br>84535:  TitleAreaDialog doesn't dismiss on <ENTER> if contains Combo(SWT.SIMPLE)  
-<br>84602:  scrolling Tree with columns horizontally fires Move and Resize events  
-<br>84609:  TableColumn has NPE while calling pack() on last column  
-<br>84613:  setting Tree header visibility fires Resize  
-<br>84630:  resizing a TreeColumn does not fire Resize or Move  
-<br>84665:  Clarify Javadoc of Display.postEvent  
-<br>84733:  TabFolder position change broken  
-<br>84755:  Cannot open filenames with 8-bit characters  
-<br>84765:  StackOverflow in setText  
-<br>84783:  Directory dialog does not deal with non-UTF8 filenames  
-<br>84861:  Display.post(Event) not working for char key events SWT.TAB, SWT.ESC, SWT.DEL and SWT.BS  
-<br>84888:  Temporary - don't use certain websites in junit tests  
-<br>84953:  View contents are drawn over tab area  
-<br>85006:  TableColumn.pack() of column 0 wth SWT.CHECK is bad  
-<br>85119:  Use GDK_HAND2 instead of GDK_HAND1 for SWT.CURSOR_HAND  
-</blockquote>
-
-<h2> SWT Build 3.1 022 - Tuesday February 8th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>54973:  [browser] Default WindowEvent to handle normal window open case - feature request  
-<br>81463:  [launcher] Launcher and Core issues regarding -showSplash  
-<br>81969:  [launcher] Launcher should be independent of startup.jar location  
-<br>82739:  EXCEPTION_ACCESS_VIOLATION hovering over check in table with SWT.CHECK style  
-<br>83432:  iFrame does not render border when in SWT Browser  
-<br>83819:  JPopupMenu doesn't work correcty in a SWT composite  
-<br>83978:  CLabel with style SWT.CENTER kills tabbing  
-<br>84085:  XP style not support with Button with SWT.ARROW  
-<br>84201:  Label text doesn't wrap correctly  
-<br>84383:  [browser] can't navigate to eclipse bugzilla  
-<br>84404:  Disabled button stops events  
-<br>84581:  Check button size does not change when right aligned  
-<br>84600:  resizing TreeColumn leaves cheese  
-</blockquote>
-
-<h2> SWT Build 3.1 021 - Tuesday February 1st, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>4408:  Image Processing Algorithims (1PQ8RGT)  
-<br>4473:  DCR - need API to begin/end defer layout (1FMGFRP)  
-<br>4680:  DCR - tree and table does not match item when key is typed  
-<br>18699:  Buttons with images don't use the XP theme  
-<br>59514:  Need support to underline text when using TextLayout API.  
-<br>80414:  ArrmListener for MenuItem generates submenu with invisible lables  
-<br>82346:  CLabel disappears when given SWT.CENTER flag in constructor  
-<br>83251:  Javadoc warnings in latest builds  
-<br>83546:  Printing doesn't seem to work anymore in latest integration build  
-<br>83667:  Eclipse splashscreen is very rude  
-<br>83683:  Javadoc of StyleRange does not mention it supports SWT.ITALIC  
-<br>83699:  Font reset to default after screen saver  
-<br>83765:  DCR: add strikeout to TextLayout  
-<br>83769:  ImageLoader - Exception For Image Save  
-<br>83791:  Repaint problems for Combo using SWT.SIMPLE style  
-<br>83838:  different style of indeterminant progress bar requested  
-<br>84077:  Table.pack() extends last column to include scroll bar  
-</blockquote>
-
-<h2> SWT Build 3.1 020 - Tuesday January 25th, 2005 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-RowData.exclude and GridData.exclude have been added to allow applications to 
-selectively exclude widgets from a Layout operation.
-</blockquote>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>42632:  Clipboard becomes empty after shell closes  
-<br>49426:  Layouts should support laying out only a subset of a composite's children  
-<br>64923:  EC: need api to query for Tray support  
-<br>76722:  [RCP] [launcher] ability to generate executable with specific icon resources  
-<br>79944:  The Eclipse launcher should give the splash screen window a type hint  
-<br>82026:  [launcher] eclipse launcher does not connect stdout of jvm to console  
-<br>82469:  [launcher] Launcher should not hard code a reference to org.eclipse.core.launcher.Main  
-<br>82640:  Setting style bits breaks SWT embedded Swing in Milestone M4  
-<br>82657:  Help fails to open  
-<br>82693:  Simple example snippet for OpenGL  
-<br>82828:  Table's SWT.FULL_SELECTION broken for empty table items  
-<br>82837:  Embedding swing on swt _ problems with JDK1.4.1  
-<br>82905:  drawImage doesn't honor clip rect  
-<br>83262:  rxvt pastes null terminator  
-<br>83305:  Javadoc of Display.addFilter could be improved  
-<br>83424:  [browser] check if reparenting works  
-<br>83532:  [browser] HTTPS link crashes Browser with Mozilla 1.7.5  
-<br>83543:  add alpha support to GTK MenuItem TabItem TableColumn TrayItem  
-</blockquote>
-
-<h2> SWT Build 3.1 019c - Tuesday January 18th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>22646:  Cheese appears in table when using mouse wheel  
-<br>37704:  [plan item] Support GUI test tools  
-<br>53923:  Changing table font causes table gridlines to be misaligned.  
-<br>75087:  redraw errors in scrollable table when row is to height  
-<br>80608:  SWT.error does not initialize the causing exception.  
-<br>81819:  Missing scenario results for Linux GTK  
-<br>81987:  BIDI:Check box mark is inverted  
-<br>82067:  BIDI:Printing of text files is not right aligned  
-<br>82454:  BIDI:Java editor is RTL oriented  
-<br>82466:  Problem in invoking Eclipse using telnet  
-<br>82501:  Table sort/redraw problem  
-<br>82531:  Missing selectionEvent when disposing TreeItem  
-<br>82660:  Browser without scroll bars  
-</blockquote>
-
-<h2> SWT Build 3.1 019 - Tuesday January 11th, 2005 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-TreeColumn - support creating columns in a tree widget. This replaces the
-emulated TableTree and gives access to the native look and feel of the tree.
-<br>
-<br><b>New Tree API:</b>
-<br>int getGridLineWidth
-<br>int getHeaderHeight
-<br>boolean getHeaderVisible
-<br>TreeColumn getColumn (int index)
-<br>int getColumnCount
-<br>TreeColumn [] getColumns
-<br>boolean getLinesVisible
-<br>void setLinesVisible (boolean show)
-<br>void setHeaderVisible (boolean show)
-<br>void showColumn (TreeColumn column)
-<br>
-<br><b>New TreeItem API:</b>
-<br>Color getBackground (int index)
-<br>Rectangle getBounds (int index)
-<br>Font getFont (int index)
-<br>Color getForeground (int index)
-<br>Image getImage (int index)
-<br>Rectangle getImageBounds (int index)
-<br>String getText (int index)
-<br>void setBackground (int index, Color color)
-<br>void setFont (int index, Font font)
-<br>void setForeground (int index, Color color)
-<br>void setImage (Image [] images)
-<br>void setImage (int index, Image image)
-<br>void setText (String [] strings)
-<br>void setText (int index, String string)
-</blockquote>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>4591:  prop sheet - the first column seems to leave too much unused space (1G7GIC3)  
-<br>13954:  TableTree Tree icons are large  
-<br>25007:  Allow for icons in TableTreeItems in first column  
-<br>36822:  DCR - TableTree doesn't support drag and drop  
-<br>52145:  TableTree incorrectly handles Left-Arrow in subtree  
-<br>66179:  TableTree widget has weird +/- signs on Windows  
-<br>73622:  TableTree plus sign background wrong color on Solaris  
-<br>80599:  SWT gets window origin even if nobody has hooked a motion event  
-<br>80830:  implement GC.drawFocus  
-<br>81695:  [Linux GTK] SWT Text displays the wrong characters if call addModifyListener  
-<br>81893:  IllegalArgumentException from StyledText Widget  
-<br>82156:  [launcher] typo in eclipseConfig.c  
-<br>82160:  [launcher] eclipseUnicode.h needs to include ctype.h  
-<br>82282:  Control.redraw() invalidates children on Linux-GTK  
-<br>82385:  Browser widget causes crash or freeze when opening URL with Java 2 applets 
-</blockquote>
-
-<h2> SWT Build 3.1 018 - Tuesday January 4th, 2005 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-81759:  Can't select tool items when tool bar has a DragDetect listener  
-<br>78295: VM crash in org.eclipse.swt.internal.gtk.OS.gtk_file_chooser_dialog_new  
-<br>80758: ControlExample showing strange events  
-<br>81265: background of tree is incorrect when disabled  
-<br>81399: Pixel Corruption caused by Tracker on a Composite with children  
-<br>78854: Memory leak in ClipboardProxy.getFunc()  
-<br>81395: [Navigator] Cannot open context menu on Navigator that is initially empty  
-</blockquote>
-
-<h2> SWT Build 3.1 017 - Tuesday December 21st, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-41227:  [Workbench] Switching applications, there is lag displaying the menubar  
-<br>66954:  Open external JavaDoc opens on type instead of member [javadoc]  
-<br>79216:  [consistency] attaching a DragDetect listener to a sash affects the selection event  
-<br>80216:  KERN_PROTECTION_FAILURE due to EXC_BAD_ACCESS on exit  
-<br>80276:  CBannerLayout calls Control.update too often  
-<br>80519:  update platform-launcher structure to include arch  
-<br>80867:  APPSTARTING cursor has colours reversed  
-<br>80911:  SWT.SetData event not thrown in all needed cases  
-<br>80965:  ControlExample does not register correct event  
-<br>80975:  Need to update Javadoc for "public" fields  
-<br>81137:  TableEditors shifted to the right when table has image  
-<br>81175:  launcher does not show splash screen when any argument is set  
-<br>81241:  [Junit] NPE in CLabel  
-<br>81283:  [JUnit] NPE's and No more callbacks from Browser when MOZILLA_FIVE_HOME not set  
-<br>81336:  using a ini file seems to prevent eclipse from switching workspace  
-<br>81357:  TableColumn.setText("") results in screen cheese  
-
-</blockquote>
-
-<h2> SWT Build 3.1 016 - Tuesday December 14th, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-12379:  CoolBar does not behave properly with Combo as item  
-<br>69694:  linux-ia64-gtk platform launcher crashes immediately  
-<br>70318:  Support for multiple lines in CLabel  
-<br>74138:  Duplicate DLLs in win32 fragment  
-<br>76855:  [RCP] launcher should read an ini file  
-<br>79128:  SWT 3.1 does not work on ppc64  
-<br>79504:  shell not opened if previous shell was disposed when active  
-<br>80160:  Regression: Pressing Return/Esc does not close drop down list of editable combo  
-<br>80485:  get a java.lang.UnsatisfiedLinkError at launch  
-<br>80506:  [consistency] forceActive and setActive are inconsistent across platforms  
-</blockquote>
-
-<h2> SWT Build 3.1 015 - Tuesday December 7th, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-7101:  DCR ability to receive scroll events (e.g. scrollwheel) from Scrollable  
-<br>24538:  TabItem controls should use the TabFolder to paint their background when using XP visual styles.  
-<br>68212:  Mac - can't drag from SWT application to another application  
-<br>79527:  org.eclipse.swt.gtk* build.xml gather.bin.parts target needs to collect libraries from archictecture specific directories to support source builds  
-<br>79557:  Display.getShells() optimization  
-<br>79934:  Incorrect SWT.Deactivate received  
-<br>80120:  CTabFolder layout puts top right item one pixel to far to the right  
-</blockquote>
-
-<h2> SWT Build 3.1 014 - Tuesday November 29th, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-16971:  LayoutExample not big enough  
-<br>20018:  CCombo missing keyboard access  
-<br>26859:  [consistency] Ensure Button.setImage(null) is consistent across all platforms  
-<br>26878:  Eclipse doesn't interact with X's "Selection Clipboard"  
-<br>44217:  Calling Clipboard on Motif no longer accepts key/mouse events  
-<br>49057:  Inconsistency in layout handling during shell.setVisible  
-<br>63481:  Clipboard getAvailableTypes runs the event loop on Motif  
-<br>65406:  [consistency] Clipboard inconsistencies across platforms  
-<br>65545:  DND can hang desktop  
-<br>65547:  [consistency]DND inconsistencies  
-<br>69304:  EC: disappearing table column headers  
-<br>72033:  [browser] support AMD64 (early access)  
-<br>73965:  [Layouts] add marginLeft, marginRight, marginTop and marginBottom to GridLayout  
-<br>78548:  [consistency] Button Selection fires before MouseUp  
-<br>78558:  [consistency] Slider fires two selection events on single click  
-<br>78559:  [consistency] Slider fires two Selection events before MouseDown  
-<br>78564:  [consistency] TabFolder tab traversals do not fill in detail field  
-<br>78565:  [consistency] TabFolder fires two MenuDetect events  
-<br>78566:  [consistency] Table fires two DefaultSelection events  
-<br>78568:  [consistency] Table fires DefaultSelection before KeyDown  
-<br>79107:  [consistency] setItems(String[]) with null elements  
-<br>79186:  [consistency] pressing Enter on Button fires MouseUp on win32 only  
-<br>79191:  [consistency] Button KeyUp-Selection differences  
-<br>79210:  [consistency] Combo does not fire some KeyDowns  
-<br>79215:  [consistency] ProgressBar does not fire some mouse events  
-<br>79221:  [consistency] TabFolder does not fire some KeyDowns  
-<br>79228:  Solaris 8 crash  
-<br>79237:  [consistency] Text does not fire MenuDetect  
-<br>79423:  [consistency] TabFolder fires Selection for all mnemonics  
-<br>79481:  Sash no longer draggable when too small  
-
-</blockquote>
-
-<h2> SWT Build 3.1 013 - Tuesday November 23rd, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Spinner - allow the user to enter and modify numeric values
-<br>GC.setLineCap - Sets the receiver's line cap style to the argument
-<br>GC.getLineCap - Returns the receiver's line cap style
-<br>GC.setlineJoin - Sets the receiver's line join style to the argument
-<br>GC.getLineJoin - Returns the receiver's join style
-</blockquote>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>4853:  GC.setLineStyle does not work if width > 1 (1GKZ18N) [portability]  
-<br>5645:  DCR: Need to be able cut and paste data on Clipboard  
-<br>11418:  DCR - Need linestyle to allow dots of 1 pixel  
-<br>14297:  Add a Spinner widget to the SWT toolkit  
-<br>34523:  Text - No context menu  
-<br>35040:  Problems with PNG transparency in Image Class  
-<br>38355:  Invalid handling transparent pixel if there is another pixel with same RGB  
-<br>38443:  Support GTK on Sparc Solaris  
-<br>43684:  Setting cursor to SWT.CURSOR_APPSTARTING doesn't seem to work  
-<br>52637:  Line Styles on GTK vary greatly from those on Windows.  
-<br>60815:  Image transparency does not work in tables, column >0  
-<br>67237:  DND copy and link are allowed with default mouse gesture  
-<br>68353:  Components in SWT_AWT are not displayed on Solaris  
-<br>70214:  [64] Eclipse does not start on AMD64, Sun J2SE 1.4.2, SuSE Linux 9.1  
-<br>70966:  No Popup on Tiger  
-<br>74744:  Eclipse 3.0.0 crashes suddenly  
-<br>75450:  SWT-mozilla issue  
-<br>76094:  request for automatic chevron support. in coolbars/coolitems  
-<br>77320:  Junit performance [JUnit]  
-<br>77535:  Control example coolbar tab uses images in drop down  
-<br>77812:  Memory leaks and performance degradation in Display  
-<br>77983:  Funny behaviour on Linux GTK with MessageBox with % character  
-<br>78150:  eclipse 3.1x crashs on startup  
-<br>78204:  Refresh problem in progress view or compare view  
-<br>78226:  [JFace] ImageCache.getImage failing to return an image for ico file (regression)  
-<br>78239:  Label does not Wrap correctly  
-<br>78301:  Can't open font chooser dialog  
-<br>78407:  Platform differences setting size while shell is maximized  
-<br>78554:  [consistency] Scale rarely fires MenuDetect  
-<br>78562:  [portability] Slider selection event fires before MouseDown  
-<br>78725:  Separator ToolItems with Controls do not wrap soon enough  
-<br>78727:  ToolItems on a wrapped ToolBar do not "unwrap" correctly  
-<br>78873:  Combo box performance problem  
-<br>79064:  Strange NullPE in Widget.sendEvent(int eventType, Event event, boolean send)  
-<br>79199:  Update SashForm to recognize SWT.SMOOTH  
-</blockquote>
-
-<h2> SWT Build 3.1 012 - Tuesday November 9th, 2004 </h2>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>4811:  d'n'd should log runtime exceptions (1GJ9PCQ)  
-<br>44008:  [browser] Browser component grabs focus when loaded.  
-<br>59783:  [Workbench] WorkbenchParts resized to (0,0) when Shell minimized  
-<br>66866:  [browser] Javadoc preview update very slow  
-<br>71107:  [browser] calling setText from within Location.changing callback fails and raises apple exception  
-<br>72244:  Posting mouse events locks up event handling  
-<br>76750:  XP scrollbars becomes temporaly visible ...  
-<br>76933:  MessageBox does not display default title when icon is specified  
-<br>77102:  [browser] crash when trying to use unsupported Mozilla GTK1.2  
-<br>77191:  broken backwards compatability? new error in plugin.xml  
-<br>77433:  under construction spinner not working on WinCE  
-<br>77490:  setting background on single TableItem always shows grid lines  
-<br>77492:  ToolBar example tab should have image+text example  
-<br>77493:  No more handles error when running the Browser demo  
-<br>77511:  buttons do not resize  
-<br>77527:  setting the background colour in one widget, sets it as the default  
-<br>77530:  Selection in open type dialog does not work  
-<br>77532:  Version number code doesn't account for double digits  
-<br>77676:  TextLayout doesn't produce proper runs when newlines present  
-<br>77867:  Setting layout on TableTree inside of a SashForm causes incorrect layout  
-<br>77926:  Cannot compile SWT for GTK from CVS sources  
-<br>77936:  Platform inconsistency: drawLine(X,Y,X,Y) does nothing on the Mac  
-<br>77948:  NullPointerException in CLabel.findMnemonic  
-</blockquote>
-
-<h2> SWT Build 3.1 011 - Tuesday November 2nd, 2004 </h2>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-15239:  Coolbar - when chevron appears hide tool icon if partially displayed  
-<br>34536:  Drop-down arrows (on tree) are not centered  
-<br>47178:  Tree - Change font size and can not select items  
-<br>49722:  support mnemonics on CLabel  
-<br>57068:  [browser] Curious behaviour on target=_blank links  
-<br>69781:  max StyledText window, fire MouseMove event  
-<br>76391:  SWt.Virtual tables do not callback on getItems  
-<br>76490:  VM crash running UI test suites  
-<br>76596:  Compare editor has double scroll bar  
-<br>76635:  Browser.java uses private Mozilla interfaces when alternatives exist  
-<br>76748:  [browser] setText issue on Mozilla  
-<br>76904:  Poor Canvas scrolling performance  
-<br>76963:  [browser] Browser.java should not use nsIScriptContext  
-<br>76983:  [browser] Download.java uses wrong pointer  
-<br>76996:  corrupted display of images in SWT table (MacOS X)  
-<br>77153:  SWT shell scripts override environment variables  
-<br>77342:  getOffset () in emulated TextLayout.java wrong for proportional fonts  
-</blockquote>
-
-<h2> SWT Build 3.1 010 - Tuesday October 26th, 2004 </h2>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4593:  Need to handle RGB transparent pixel value (1G7M833)  
-<br>4616:  GC.drawLine() is really slow (1GAVSGP)  
-<br>20269:  Please add javadoc for Composite getChildren() ordering  
-<br>22964:  org.eclipse.swt.motif_2.0.1 not ready for KDE 3  
-<br>23006:  Tree Expand all "*" sends expand event regardless of current state  
-<br>31372:  setControl  
-<br>33367:  [JUNIT]List fails  
-<br>34918:  Request for platform SWT jar download  
-<br>38721:  Cant setParent() to a control in GTK  
-<br>55964:  [ViewMgmt] spacing between border and text of "classic" tab style  
-<br>63579:  Rename refactoring wizard butchers clipboard  
-<br>68732:  Remove dependancy on pangoxft library  
-<br>73100:  Crash while running a JUnit Plug-In test  
-<br>74882:  TextLayout needs toString() Method  
-<br>75218:  DirectoryDialog widget has a growing label  
-<br>75577:  Keyboard focus not given to selected element in tree  
-<br>76595:  Hang on shutdown  
-<br>76612:  [EditorMgmt] Open With > System Editor fails after setting up File Association  
-<br>76707:  GC Background and Foreground are black  
-<br>76709:  CR Key down arrives twice  
-</blockquote>
-
-<h2> SWT Build 3.1 009 - Tuesday October 19th, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-boolean Browser.execute(String script) - execute the specified javascript. e.g to modify the DOM of the current HTML document
-</blockquote>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4527:  IME mode on J box overwrites scroll bar (1G91MAP)  
-<br>4735:  DCR: Additional Region features (1GFQO4C)  
-<br>4795:  Performance: Synchronizer queue creation (1GITDM2)  
-<br>4849:  Multi Select Tree - Disposing last selected item selects "random" item (1GKX5TW) [portability]  
-<br>7718:  horizontal scroll: Deeply nested elements in an SWT Tree widget cannot be dragged anywhere  
-<br>7772:  SWT Tree inconsistency when collapsing a multi-selected node  
-<br>10766:  Combo.removeAll() behaviour does not match API documentation  
-<br>11657:  inconsistent SWT.NO_FOCUS behaviour  
-<br>12989:  Data input in tables  
-<br>35060:  Tree does not show focus selection  
-<br>53885:  Java core (access violation) expanding a tree  
-<br>54665:  [browser] No more handles when created on a second thread  
-<br>56047:  SWT Example Launcher does not run standalone apps  
-<br>58730:  utilize new GtkFileChooser widget once required gtk is 2.4.0  
-<br>63185:  [browser] Intro issues using Safari version of the browser  
-<br>68643:  [browser] characters are not always typed in in text field  
-<br>68876:  Sashes should resize interactively  
-<br>70795:  LocationListener and changed event isn't always correct  
-<br>70883:  DBCS: IME pre-edit text size looks like 12 points all the time  
-<br>72075:  Native TabFolder on Pocket PC  
-<br>72401:  Wrong TableColumn width set when font-style is bold  
-<br>73052:  Exception while calling Clipboard object  
-<br>73345:  TableTreeItem.setExpanded causes redraw which causes flickering  
-<br>73871:  [KeyBindings] NullPointerException while running UiTestSuite  
-<br>74666:  String cut off in New Java Interface wizard  
-<br>75168:  Deadlocked Eclipse  
-<br>75451:  setBackground(index, color) does not set color when tableitem is in a Table  
-<br>75675:  [browser] setText/setUrl crashes when called from location.changing  
-<br>75739:  Variant has no toString()  
-<br>75753:  SWT.NO_BACKGROUND not working on Linux GTK  
-<br>75904:  Can not create launch configurations from the dialog.  
-<br>75906:  Multiple file type filters broken in file chooser  
-<br>75947:  InputStreams not closed in SWT examples  
-<br>76034:  Excessive Flicker on resizing Frame returned by SWT_AWT  
-<br>76102:  pocket pc - change of behaviour in Shell layout since 3.0.1  
-<br>76185:  [browser] investigate ways to communicate between java code and browser content  
-<br>76195:  Synchronizer.runAsyncMessages only runs the first runnable  
-<br>76320:  running out of memory and VM crashing   
-</blockquote>
-
-<h2> SWT Build 3.1 008 - Tuesday October 5th, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-GridData.minimumWidth - minimum width for dynamically sized controls
-<br>GridData.minimumHeight - minimum height for dynamically sized controls
-<br>Combo.addVerifyListener - add verify listener
-<br>Combo.removeVerifyListener - remove verify listener
-</blockquote>
-<br>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4704:  Focus not given to project name field in wizard (1GEV88H)  
-<br>4806:  setRedraw() nesting behaviour should be documented (1GJ4ZWB)  
-<br>10505:  Implement Verify listener for Combo on Photon  
-<br>30804:  DCR - GridLayout should not treat width/height hint as minumum size when grab/fill is specified  
-<br>43396:  Combo does not fire SelectionListener  
-<br>48272:  pocket pc - gesture erases current text selection  
-<br>58185:  Eclipse fails to load oldstyle BMP files  
-<br>64770:  [browser] Lose Mouse Moves/Enter/Exits  
-<br>64801:  [browser] browser shows disabled  
-<br>66853:  CTabFolder navigation-control issues  
-<br>74025:  SWT Browser with no URL stops any mouse move event  
-<br>74275:  SWT.ON_TOP and SWT.MIN|SWT.MAX are mutually eclusive  
-<br>74736:  Please provide some way to determine the state of keys in the Tracker event loop and provide notifications when they change  
-<br>75169:  [StyledText] setStyleRanges() shows different result when StyleRanges are sorted differently  
-<br>75219:  File open dialog does not handle filters  
-<br>75268:  snippet 2  
-<br>75318:  [WorkspaceLauncher] Workspace location confirmation dialog box wont take focus  
-<br>75404:  ControlExample slider tab grabs mouse  
-<br>75521:  Eclipse 3.1M2 crashes when software update is run  
-<br>75569:  OpenGL SWT Examples compile error with setCurrent  
-</blockquote>
-
-<h2> SWT Build 3.1 007 - Tuesday September 28th, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-11915:  Redraw problem  
-<br>20968:  javadoc bashing did not extend to protected methods  
-<br>22264:  OLE web browser example for swt has compiler warnings  
-<br>24402:  OLE part have a access violation exception  
-<br>63224:  Chevron in the coolbar  
-<br>66392:  IllegalArgumentException in Table  
-<br>68267:  Drag&Drop HTMLTransfer implementation request  
-<br>68301:  Close button on Ctabfolder not drawn proprely  
-<br>72399:  Program integration with KDE  
-<br>73812:  TableColumn.getWidth() returns 0 on gtk  
-<br>74010:  Display.setSynchronizer, readAndDispatch may throw ERROR_FAILED_EXEC  
-<br>74241:  [DND] Drop Target TreeItem not selected when Font was set  
-<br>74399:  [CTabFolder] Widget Disposed SWTException when closing Application with opened Tab-Chooser  
-<br>74408:  Dialogs open at an incredibly small size  
-<br>74682:  [Preferences] Widget disposed while changing the workbench's colors and fonts  
-<br>75094:  Workaround to bring up existing application instance on Pocket PC 
-
-</blockquote>
-
-<h2> SWT Build 3.1 006 - Tuesday September 21th, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4606:  Text.computeTrim doesn't work (1G8W5RN)  
-<br>37029:  Display.getFocusControl() should answer new focus widget in focus out event  
-<br>41339:  org.eclipse.swt.layout.FormData needs toString()  
-<br>42867:  Combo - Custom PopUp not displayed properly  
-<br>52947:  Cheese with Toolbar on parent with SWT.NO_BACKGROUND  
-<br>58103:  [browser] expose chrome required for new browser  
-<br>60975:  [browser] can't download files with mozilla  
-<br>67898:  VM crash when restarting Eclipse  
-<br>68292:  [Import/Export] Import/Export dialogs confused by "Select Types..."  
-<br>68418:  SWT Inconsistencies with subclassing between platforms  
-<br>68545:  Caret blink rate is not native  
-<br>68877:  Spec for OleClientSite mentions the wrong error  
-<br>69721:  Control+backspace key combination does not work in Text widgets  
-<br>71975:  Newly open shell does not draw its content until resized (Windows gives extra resize callback)  
-<br>72217:  CTabFolder should hide tabs in LRU order  
-<br>73717:  Button.computeSize gives different results on Linux-GTK and Linux-Motif  
-<br>73725:  [Browser] SWTException when resizing CTab containing Browser  
-<br>73730:  Button.computeSize definition on Mac does not match other platforms  
-<br>73734:  Lower/right edge of Carbon Scale widget not selectable with mouse  
-<br>73757:  Empty button has different height from one with text  
-<br>74111:  enum is no longer a valid variable name  
-<br>74169:  DirectoryDialog widget does not allow resize to smaller width  
-<br>74268:  deprecated methods in SWT samples  
-
-</blockquote>
-
-<h2> SWT Build 3.1 005 - Tuesday September 14th, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-CTabFolder.setMRUVisible(boolean) - Show only the most recently selected tabs if there is not enough room to show all tabs
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-9211:  GP - VM crash in KDE.KMimeType_allMimeTypes  
-<br>9866:  GridLayout does not handle wrapped Label properly  
-<br>39207:  Cut and paste does not work correctly (on a 2 processor m...  
-<br>47184:  MS Word can not be pasted on clipboard in Windows 98  
-<br>49726:  [Workbench] Weird Java perspective icon in action bar  
-<br>57525:  [KeyBindings] keybinding for Cut doesn't work  
-<br>59205:  DBCS:Can not drop and drag DBCS name file from outside ec...  
-<br>61827:  (BBAWT) getImageData() works incorrectly on Photon  
-<br>64607:  GC.drawRoundRectangle/GC.fillRoundRectangle  
-<br>66285:  ProjectionViewer.copyToClipboard crash while Ctrl+X, Ctrl...  
-<br>70299:  Eclipse dead slow on one system, normal on other  
-<br>70780:  Table Redraw freezes the Table Headers on CE  
-<br>71146:  [Browser] Browser widget should allow to hide 3D border  
-<br>71303:  BIDI issue in Variables view  
-<br>71966:  Clarify Combo/Composite/Scrollable behavior  
-<br>72929:  TableColumn widths ignored in Table width calculation  
-<br>73046:  UnsatisfiedLinkError jawt.dll already loaded in another c...  
-<br>73432:  Textlayout does not render multiline text correctly  
-<br>73698:  Control.isVisible() returns incorrect value for child Shell  
-<br>73735:  Carbon vertical Scale widget has top/bottom reversed from...  
-</blockquote>
-
-<h2> SWT Build 3.1 004 - Tuesday August 31, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-39927:  MacOSX Quartz font smoothing not working properly for LCD...  
-<br>46268:  [browser] calling multiple times setText without running ...  
-<br>47549:  GPF in XtSetValues on M5  
-<br>48884:  Dialog (org.eclipse.swt.widgets.ColorDialog and org.eclip...  
-<br>51108:  setAppName() should update application menu title.  
-<br>51741:  Shell not becoming "active"  
-<br>57188:  Label widget can get focus.  
-<br>61384:  [browser] support mozilla 1.7  
-<br>61893:  controlMoved event fired by Control.setBounds() on Window...  
-<br>64215:  [Fonts] Cannot set fonts which have a blank in their name  
-<br>67556:  [browser] TEXTREL in libswt-mozilla-gtk-3058.so  
-<br>70077:  [typing] Copy/paste doesn't work occasionally  
-<br>71180:  Profiling launch configuration: Minimum width should be s...  
-<br>72040:  ActiveX Accessibility  
-<br>72223:  Add org.eclipse.swt.custom.ST.SELECT_ALL  
-<br>72750:  "Program.findProgram()" does not return null for an exten...  
-</blockquote>
-
-<h2> SWT Build 3.1 003 - Tuesday August 24, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>52548:  PocketPC and eSWT example problems  
-<br>63793:  [encoding] DBCS: some DBCS is displayed as dot on default...  
-<br>67061:  [Browser] Blank page when opening page with Flash  
-<br>67746:  investigate making emulated Table and Tree always post se...  
-<br>69495:  Splash screen appears green on AIX  
-<br>70779:  [browser] Mozilla 1.6 Browser problem : [Unknown mozilla ...  
-<br>70925:  Layout cells are infinetly large  
-<br>70949:  'Unsupported color depth' error on Linux  
-<br>71711:  Gtk - Checkbox/Radiobox setLocation Bug  
-<br>72123:  Patches for 3.0 launcher cross-builds  
-<br>72206:  StyledText Javadoc needs italic doc.  
-<br>72342:  MouseListener behaving incorrectly when attached to Button  
-<br>72343:  Shell doesn't maximize  
-<br>72345:  Text wider than normal in toolitem if ampersand (&) used  
-</blockquote>
-
-<h2> SWT Build 3.1 002 - Tuesday August 17, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Shell.getMinimumSize - Returns a point describing the minimum receiver's size
-<br>Shell.setMinimumSize(int, int) - Sets the receiver's minimum size
-<br>Shell.setMinimumSize(Point) - Sets the receiver's minimum size
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4479:  getFocusControl inside FocusOut event inconsistent (1FMITIE)  
-<br>4606:   Text.computeTrim doesn't work (1G8W5RN)  
-<br>5016:   Controlling shell min size during resize  
-<br>36997:  DCR: Accessibility on GTK  
-<br>39863:  TableViewer / cellModifier / ComboBoxCellEditor: new valu...  
-<br>62435:  Chinese font substitution defaults to Kai  
-<br>63571:  TextLayout: font substitution support  
-<br>64266:  accept imagedatas of depth other than 1 as a mask  
-<br>65772:  Receiving duplicate key events per non-printable key [BBAWT]  
-<br>66433:  Need keyboard support for Nested Tabfolder Traversal  
-<br>68273:  tabletree plus/minus not visible in High Contrast Mode  
-<br>69410:  TVT3.0: mnemonics doesn't work if focus is in a text widget  
-<br>69440:  Inspect32 does not show name for CCombo  
-<br>70516:  Provide snippet for converting BufferedImage <-> SWT Image  
-<br>70620:  Display.setMouseLocation() not implemented on GTK  
-<br>70630:  Font constructor fails to throw ERROR_NULL_ARGUMENT  
-<br>70707:  ImageLoader closes the byte stream after loading an image  
-<br>70854:  Regression: GridLayout misapplies horizontalSpacing when ...  
-<br>70857:  when the toolBar is wrapped only by a few pixels, removin...  
-<br>71013:  Shell.open() blocks until the window is mapped  
-<br>71019:  Setting a ToolItem's control to a Button doesn't work in ...  
-<br>71141:  SWT Snippet 145 has compile errors  
-<br>71231:  Program.isGnomeDesktop does not work for Fedora 2  
-<br>71237:  Controls placed in group composite w/ text title are inco...  
-<br>71277:  Program.execute does not work on Mac (patch available)  
-<br>71282:  Text control has been broken since 3.0  
-<br>71338:  Unsatisfied link error with Combo  
-<br>71381:  gtk build crashing on linux while opening a file  
-<br>71570:  Tooltips are not shown if shell's client area is located ...  
-<br>71757:  Cursor X/Y hotspots don't work with all constructors  
-<br>71799:  Readonly text fields aren't always readonly  
-<br>71803:  No lower border on swt combo boxes  
-<br>71828:  Listener is not notified when using the display's "addFil...  
-<br>71894:  ToolBar.getItem(Point point) always returns first item.  
-<br>71907:  The "Device#getFontList" method does not return an array ...  
-<br>71999:  StyleText displays StyleRanges incorrect depending on ord...  
-</blockquote>
-
-<h2> SWT Build 3.1 001 - Tuesday July 26, 2004 </h2>
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-CBanner.getRightMinimumSize - Returns the minimum size of the control that appears on the right of the banner
-<br>CBanner.setRightMinimumSize - Sets the minimum size of the control that appears on the right of the banner
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4770: Accessibility Problems (1GHQMR9)  
-<br>67165: [Browser] HTML not rendered w/XP style using javaw.exe.manifest comctl  
-<br>68639: platform crashes opening help (internal browser)  
-<br>68759: Confirm dialog doesn't work in the embedded Mozilla browser widget  
-<br>69239: [browser] No more handles (java.lang.UnsatisfiedLinkError:  
-<br>69609: Browser view broken on Linux (Fedora Core 2)  
-<br>70160: Image(Device, InputStream) throws incorrect/unspec'd exception  
-<br>18868: TestCase cause NPE on TabFolder (Emulated Widget)  
-<br>20217: Coolbar Buttons flash with enablement/disablement  
-<br>20841: Hover help hides Ctrl+F1 help  
-<br>24959: CoolBar with SWT.DROP_DOWN style  
-<br>31385: Redraw problems: selecting text backwards  
-<br>32855: [Coolbar] Unnecessary flash when remove/add last item  
-<br>34945: Cheese: Tracker leaves garbage  
-<br>35161: EC: cheese and GP  
-<br>37735: TreeViewer's Tree gets two selectionChanged events when it gets focus  
-<br>37980: Crash Moving throw Frames  
-<br>41051: Wizard not gaining focus after closing of dialog box from WizardPage of this Wizard.  
-<br>41204: combo event not firing on SWT.FocusIn  
-<br>41537: keyboard stops responding, cursor disappears (WindowMaker)  
-<br>43009: Bad performance on zh_CN.GB18030  
-<br>45555: can't run at freebsd!  
-<br>49598: place arbitrary controls in a table has wrong tab order  
-<br>51078: Static text doesn't display on toolbar in Linux  
-<br>68969: Buttons in disabled group are not disabled  
-<br>62690: [launcher] splash screen spans multi-monitors  
-<br>63659: SWT developers page not up to date?  
-<br>68482: JVM dump errorcode=6  
-<br>68661: Trees are eager to expand  
-<br>68667: NPE in AddressBook example  
-<br>68744: Readme mentions duplicate bug (35443)  
-<br>14856: [Editor Mgmt] Ctrl+Tab does not work in editors with multiple tabs  
-<br>52166: close button on view/editors tabs need refinement  
-<br>68296: bug with editor in Eclipse  
-<br>16171: No Maximize / First resize gets reverted  
-<br>29642: Performance problems on Mac  
-<br>30983: ACC - I20030205 - Can't switch tabs using keyboard  
-<br>66507: ToolItem.getBounds() replied {-1,-1,1,1} is shell is not visible  
-<br>68566: javaw.exe not found at launch  
-<br>68571: drawText(text, 0, 0, SWT.DRAW_DELIMITER) is now right-justified  
-<br>68855: org.eclipse.swt.tools.internal.SwtJniGen is not working properly  
-<br>37868: Setting a GridLayout on a TabFolder gives strange behavior when resizing  
-<br>59630: [Dialogs] Accessibility: [Search dialog] Cannot select Choose working set text without mouse  
-<br>68950: Bug in List.showSelection method  
-<br>69398: Table.clearAll() does not force redraw  
-<br>69509: Combobox computeSize() doesn't take the down arrow into account  
-<br>70461: Minor javadoc error in Display.map(Control,Control,Point)  
-<br>70633: Program launch and execute methods have incorrect javadoc  
-<br>70729: Plugin: Modal dialog blocks other dialogs closing  
-<br>21089: CTabFolder - close button doesn't appear when tab moves under mouse  
-<br>29772: [Editor Mgmt] Last editor tab gets cut off when unnecessary  
-<br>36220: expand Sashform API to support setBackground  
-<br>52059: SashForm right/bottom constraint is not computed correctly  
-<br>52849: Lightweight close buttons on CTabFolder are problematic  
-<br>64610: hover over chevron for Ctabfolder not big enough for large fonts  
-<br>65598: Chevron shows '0' when there are at least one items tabs not showing  
-<br>67078: Chevron and Text touching on Motif  
-<br>67489: CLabel does not save alignment in style bits  
-<br>68070: Label does not draw background correctly  
-<br>68074: Couple of bad pixels in SWT.FLAT | SWT.BORDER style  
-<br>68972: GridLayout adjusts the width of the column already adjusted  
-<br>69881: In ScrolledComposite, vertical scrollbar does not appear  
-<br>70536: if GridLayout.numColumns == 0 a StackOverflowError gets thrown  
-</blockquote>
-
-<h2> SWT Build 3.0 062 - Thursday June 24, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4410:  AWT/SWT - Applet Interop (1PQ8QG1)  
-<br>30104:  Drag & Drop not implemented on the Mac  
-<br>32434:  Javadoc typo  
-<br>65439:  CBanner/CTabFolder comments.  
-<br>66095:  Combo.setVisibleItemCount does nothing until resize/layout  
-<br>67319:  CBanner javadoc incomplete  
-<br>67979:  editor focus issue  
-<br>68096:  SWT exception docking a detached view  
-<br>68160:  Cannot use 'eclipse' command line launcher to launch eclipse app when no workspace specified on the command line  
-</blockquote>
-
-<h2> SWT Build 3.0 061c - Tuesday June 22, 2004 </h2>
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-68056: GTK64 - CCombo does not work 
-<br>67928: [Browser] Enter path to non-existing file brings NullPE 
-<br>67935: Typo in SWT_AWT.new_Frame javadoc 
-<br>68102: No mouse up when tree expansion indicator selected
-</blockquote>
-
-<h2> SWT Build 3.0 061 - Friday June 18, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-48492:  Eclipse crashes on GTK (linux) while Cell Editor in Property View loosing focus  
-<br>60768:  CBanner at top does vertical sizing based on left components
-<br>66962:  Tabbing from list in Property/Preference dialog takes you to sash instead of page  
-<br>67458:  Resize is too slow for mouse events on GTK  
-<br>67670:  cancelling Open Type dialog moves focus to Open Perspective button  
-<br>67825:  [browser] browser crashes on jdk 1.5 beta applets  
-
-</blockquote>
-
-<h2> SWT Build 3.0 060 - Thursday June 17, 2004, 8:00pm </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-66813:  Browser does not handle setText twice  
-<br>67185:  Bug in emulated TextLayout.setFont(Font)  
-<br>67195:  Possible NPE in TextLayout (motif/emulated)  
-<br>67219:  Segmentation fault in OS.gtk_main_do_event  
-<br>67301:  Dll infos are bogus  
-</blockquote>
-
-<h2> SWT Build 3.0 059 - Thursday June 17, 2004, 4:25pm </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-44399:  SWTError when trying to copy entry from Error Log View  
-<br>53920:  Slow performance updating target  
-<br>55948:  BIDI: problems in rtl-oriented CTabFolder  
-<br>58642:  [misc] caret disappears from java editor  
-<br>65053:  [KeyBindings] Key bindings stop working  
-<br>65975:  Ctrl+C broken in Java editor  
-<br>66717:  SHADOW_IN style hides Group title  
-<br>67483:  No chevron when not enough space to show all the tabs in CTabFolder  
-</blockquote>
-
-<h2> SWT Build 3.0 058d - Wednesday June 16, 2004, 8:00pm </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-66001:  package.html should not be included in binary plug-in JARs  
-<br>67132:  Styled text example loses the text style when changing any style flag  
-<br>67346:  Display.gdkEventWidgets leaks widgets  
-<br>67355:  Setting font back to its default value in a table tree widget causes an illegalArgumentException  
-</blockquote>
-
-<h2> SWT Build 3.0 058c - Wednesday June 16, 2004, 4:00pm </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-65985:  Disabled controls still get keystrokes [was [Progress] NPE in log while refactoring]  
-</blockquote>
-
-<h2> SWT Build 3.0 058b - Tuesday June 15, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-34515:  GTK: Cascade MenuItem doesn't support image  
-<br>40003:  Productize java_swt  
-<br>59344:  Inspect Popups disappear on Mac  
-<br>60657:  Default size of Shell is too big in multi-monitors  
-<br>62565:  NPE in WM_KEYDOWN  
-<br>66293:  Editor blank on startup  
-<br>66633:  [Workbench] missing toolbar items  
-<br>66653:  NPE on window close  
-<br>66941:  SWT printing snippet not working on MacOS X  
-<br>66942:  [browser] F5 blanks out the Browser widget when setText used  
-</blockquote>
-
-<h2> SWT Build 3.0 058 - Thursday June 10, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-6047:  setFocus fails if setRedraw turned off  
-<br>6325:  No busy cursor for Open on Selection  
-<br>9847:  Embedded Swing hangs eclipse when editor closes  
-<br>35103:  OS X Editor has cursor problems  
-<br>38408:  Caret.drawCaret ignores image content  
-<br>42562:  Various improvements for the Os X Interface:  
-<br>50216:  NPE in org.eclipse.swt.widgets.Control.hasFocus(Control.java:934)  
-<br>51107:  ControlEditor sizing on the Macintosh  
-<br>51697:  CustomControlExample: missing event listener part on CCombo tab  
-<br>64400:  ON_TOP shell - can't setFocus to content  
-<br>65350:  StyledText leaves second caret behind  
-<br>65695:  TrayItem not coming back after an explorer crash  
-<br>65697:  CCombo does not respond to keyboard or mouse actions when it it dropped down  
-<br>66331:  exception in Members panel of java browsing perspective  
-</blockquote>
-
-<h2> SWT Build 3.0 057 - Wednesday June 9, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-35346:  Eclipse crash opening preferences of third party plugin  
-<br>64349:  SWT of the eclipse 3.0 versions crashes on start (mouse-problem)  
-<br>64429:  Progress bars use deprecated style  
-<br>65269:  [EditorMgmt] Slow redraw/relayout when maximizing/unmaximizing an editor  
-<br>65537:  [KeyBindings] Control (ctrl) key hotkeys not working eg Ctrl+F4  
-<br>65792:  Blank lines in table [WAS: Table.showItem() works wrong in Win32]  
-<br>66151:  Alt-clicking to expand a tree node doesn't work properly  
-<br>66356:  DND - move reported to drag source even though cancelled  
-</blockquote>
-
-<h2> SWT Build 3.0 056 - Tuesday June 8, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-21245:  different disabled toolbar icons on GTK  
-<br>32852:  Crash when using sub-pixel rendering in Xft 2.0  
-<br>32978:  Export Javadoc: element not selected  
-<br>37163:  Crash on startup: "Cannot open font file for font Verdana 10"  
-<br>43270:  Non-Antialiased Fonts have wrong spacing  
-<br>47464:  Second unused import message missing in problem display list view after rebuild  
-<br>52276:  Blurred font rendering in editor under MacOS X  
-<br>55600:  CVS perspective has busy cursor  
-<br>56508:  Editor: some tab characters are not rendered missing in field declations  
-<br>56765:  StyledText - Fix calculating of cursor level  
-<br>57408:  DBCS: After pressing "Tab", anything can not be inputed  
-<br>58615:  Setting italic font for tree items does not work on Mac  
-<br>60659:  GP when asyncExec runs from DirectoryDialog modal loop (was Crash related to new Progress Viewer)  
-<br>62336:  UI hangs while attempting to add missing methods.  
-<br>64759:  Color buttons look bad on Mac  
-<br>64793:  One line of cheese in CTabFolder selected tab  
-<br>65387:  SWT depends on Swing (AWT not a problem)  
-<br>65599:  Shell location is not properly used  
-<br>65759:  TableItem does not redraw correctly on setText(int, String)  
-<br>65905:  Possible Memory Leaks  
-<br>65947:  SWT Carbon makefile still uses JNI 1.3.1 headers  
-<br>66039:  org.eclipse.swt.widgets.Control has funky color issues  
-</blockquote>
-
-<h2> SWT Build 3.0 055 - Thursday June 3, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-14536  StyledText - bidi - change ctrl-arrow behavior  
-<br>39493:  GTK Combo; first item is selected when Dropdown list is shown  
-<br>42480:  JOGL method popups extremely slow; likely now SWT issue  
-<br>43312:  Switching perspectives while debugging causes segfault  
-<br>44003:  MenuItem.setAcceleratorText does not work properly on MacOS X  
-<br>47972:  [KeyBindings] Incorrect drawing of accelerator text on mac os x  
-<br>56509:  Details pane in Debug perspective doesn't render it's contents properly (repeats characters)  
-<br>58176:  Screen scribbles when scrolling up in Java editor  
-<br>62119:  setCursor() doesn't work for Text objects  
-<br>63931:  [browser] setVisible(true) does not work  
-<br>63991:  hang in gtk_clipboard_wait_for_contents()  
-<br>64237:  [Menus] menu items missing on first click  
-<br>64291:  mouse unusable over regions previously covered by fastview  
-<br>64365:  Embedded AWT windows use wrong location  
-<br>64645:  java.lang.ArrayIndexOutOfBoundsException in GTK Table.java  
-<br>64705:  Expanding a Tree with left and right arrows does not trigger TreeExpanded or TreeCollapsed events.  
-<br>64709:  Tree views don't update correctly using keyboard shortcuts  
-<br>64752:  TableCurser.setSelection does not function properly after columns are disposed  
-<br>64760:  add SINGLE/MULTI radios to ControlExample - Dialog tab - File Dialog Styles  
-<br>64791:  [KeyBindings] accelerator strings displayed incorrectly.  
-<br>64938:  [browser] NPE in test case  
-<br>64980:  should use correct SIZE_ALL cursor on motifs  
-<br>65169:  [browser] URLs with space don't show up on Safari  
-<br>65214:  Regression: Tree.setRedraw(false) not reliable  
-<br>65239:  new SWT Mac properties aren't boolean  
-<br>65359:  Label.setText() causes a redraw when the string did not change  
-</blockquote>
-
-<h2> SWT Build 3.0 054 - Friday May 28, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-StyledText.getBaseline()
-<br>Combo.getVisibleItemCount()
-<br>Combo.setVisibleItemCount(int)
-<br>CCombo.getVisibleItemCount()
-<br>CCombo.setVisibleItemCount(int)
-<br>CBanner.getSimple()
-<br>CBanner.setSimple(boolean)
-<br>CTabFolder.getSimpleTab() -> CTabFolder.getSimple()
-<br>CTabFolder.setSimpleTab(boolean) -> CTabFolder.setSimple(boolean)
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-64518:  NPE in StyledText used by 'Change method signature' refactoring  
-<br>64633   NPE caused by small font support
-<br>64652   StyledText - Clicking at the end of a line place the care...
-<br>62723:  javadoc console output: hyperlink not clickable, no hand ...
-<br>53358:  GC copyArea(image, x, y) not implemented on Mac  
-<br>7845:  API needed in Combo class to specify # of items visible  
-<br>17346:  Missing busy cursor in Search dialog under GTK  
-<br>22018:  GTK: Text.setCursor() does not function.  
-<br>31023:  GP - using F3 to open new edit window  
-<br>38260:  CCombo with Dialog  
-<br>44648:  Support JDK1.1  
-<br>45574:  Panther: Run... and Properties dialogs lay out incorrectly.  
-<br>48006:  [SWT] layout problems on mac  
-<br>50183:  Vertical scrollbar is not created as expected  
-<br>54414:  [typing] Delete Next Word and others don't work quite right  
-<br>58804:  Mac OSX : TableColumn Alignment  
-<br>60452:  [Mac] Button Placed on Group does not get Dialog Font  
-<br>60816:  Deferred events will not run during mousedrag  
-<br>61728:  Need access to TextLayout styles and fonts  
-<br>62329:  CTabFolder leaves a little cheese when resizing  
-<br>62558:  Null Pointer when opening Folder in File>Open External File  
-<br>62982:  TableColumn does not fire resize event  
-<br>63003:  Ctrl+ Clicking on PackageExplorer expands items  
-<br>63070:  some menus do not show their item texts  
-<br>63701:  Display var in debugger exits eclipse JVM  
-<br>63716:  Tree items do not display their children when unfolded by keyboard  
-<br>63903:  setSimple  
-<br>64216:  TableItem.getText - wrong for first column  
-<br>64220:  Wrong cursor used for SWT.CURSOR_SIZEALL  
-<br>64294:  Title and maximisation does not work on Pocket PC  
-<br>64457:  calling CTabItem.setFont (and setImage) repeatedly with null causes repaints  
-<br>64512:  Add smallFont and noFocusBorder properties to Info.plist file  
-<br>20903:  ACC: Checkboxes not identified correctly  
-<br>26632:  Table cloumn headers not drawn in GTK2  
-<br>28990:  GTK: Paints not flushed after open()  
-<br>35753:  missing API: TableCursor.removeSelectionListener(SelectionListener)  
-<br>37956:  Crash in OS.gdk_pixbuf_scale_simple ()  
-<br>38809:  DCR - need Display.getSystemCursor()  
-<br>38828:  Eclipse Crach Closing Session  
-<br>38875:  java.lang.reflect.InvocationTargetException on startup  
-<br>40540:  Eclipse JVM crashes randomly in GTK native code.  
-<br>42422:  eclipse crashes on startup with RedHat 9.0 system  
-<br>47266:  [browser] how can we format URL links to pass on information to the SWT app  
-<br>48850:  SWT Example projects build error  
-<br>52109:  drawText() treats "\n" differently if antialiasing is on or off  
-<br>56063:  [Colors] Perspective toolbar items have wrong background  
-<br>56981:  [browser] need to support Alerts on Mozilla  
-<br>57843:  Fatal Error in SWT causing Eclipse to crash.  
-<br>58193:  [Browser] content embedded using the HTML OBJECT element doesn't show up in swt browser  
-<br>59614:  Clicking the CTabFolder chevron twice does not make the drop down go away  
-<br>59698:  [browser] investigate support for custom popup menu  
-<br>60037:  Accessibility: Junit Preference Page checkboxes in list view not readable  
-<br>60102:  Shell opened on KDE3.2.x does not paint  
-<br>60237:  [browser] BrowserExample running inside Eclipse does not get key/mouse events  
-<br>60457:  [browser] safari - does not fire location event for inner frame  
-<br>60727:  BIDI: StyledText - Wrong cursor positioning on bidi boundary  
-<br>60819:  Photon: Tree.java references java.util.Stack (not in JDK 1.1)  
-<br>61316:  SWT error occurred on Eclipse 200405060200  
-<br>62523:  launch eclipse with -DMBCS as a vmarg and copy-paste works incorrectly / ctrl f6 shows undisplayable characters  
-<br>62528:  Tracker does not keep up with mouse movement  
-<br>62761:  SWT should not grab focus on traversal events  
-<br>62790:  packing a shell has the effect of creating an unusable shell on pocketpc  
-<br>63006:  Typo in SWT doc for ON_TOP  
-<br>63102:  [Icons] It is hard to distinguish pressed/non pressed icons on Mac OS 10.3.3  
-<br>63105:  TableItem.getImageBounds() returns incorrect value for Column 0  
-<br>63143:  malformed MANIFEST.MF in gtk/motif/gtk64 fragments  
-<br>63296:  [browser] F1 crashes workbench  
-<br>63661:  VM terminates abnormally  
-</blockquote>
-
-<h2> SWT Build 3.0 052 - Tuesday May 18, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-16620: 	GC.drawLine and GC.drawPolyline aren't consistent [portability]
-<br>19828: 	CTabFolder popups should not span monitors.
-<br>21574: 	Color selection for individual table cells
-<br>27331: 	CTabFolder right control request
-<br>28766: 	Printing Images does not respect transparency
-<br>36732: 	Performance problems on Mac - slow appearance of cmd-space results
-<br>39320: 	SWT.NO_BACKGROUND style does not work in Linux-GTK
-<br>39881: 	BIDI: DCR - Need to implement a Text Layout class
-<br>44915: 	Clipboard getAvailableTypes runs the event loop on GTK
-<br>45093: 	Editor tab tooltip position wrong for dual monitor setup
-<br>52458: 	[Workbench] wrong background color in tab corners
-<br>52574: 	Rendering of CBanner with only one child
-<br>52595: 	CTabFolder flashing during resize
-<br>53791: 	Implement Control.setRedraw() on platforms other than Windows
-<br>54264: 	[EditorMgmt] Editor close button
-<br>54499: 	Tree.getItem(Point) returns element even if point is over +/- area
-<br>55392: 	Critical GTK Error in gtkselection.c
-<br>55748: 	[browser] fail to launch under RH EL3
-<br>56170: 	SWT_AWT problems
-<br>56694: 	Typing slow because too much data sent over the wire (was: [Workbench] since 3.0M8 typing is terribly slow)
-<br>57777: 	[typing] Wrong behavior for append next "word" to selection action
-<br>57965: 	GTK: Control.setBackground() with same color causes OS paint event (BBAWT)
-<br>59329: 	[Browser] browser code fails if gre.conf contains a blank line before version number
-<br>59333: 	[Browser] Exception error messages are not very meaningful
-<br>59998: 	[browser] hover tooltips at wrong position
-<br>60068: 	TableCursor crashes when scrolling vertically an empty table
-<br>60662: 	version-match deprecated in SWT fragment manifests
-<br>60934: 	[interop] tab focus problem
-<br>61207: 	cannot use icons with > 8 bit color depth
-<br>61397: 	UI seems to become "disconnected" from the application
-<br>61496: 	[EditorMgmt] Editor tabs should adjust themselves on window resize
-<br>61789: 	[Browser] browser code uses a hardcoded config file name /etc/gre.conf
-<br>61818: 	Cheese in ViewForm
-<br>61970: 	NPE in TableItem class in getImageBounds (int index)
-<br>62010: 	NPE Pressing CTRL-O in java editor
-<br>62090: 	Pressing enter in combo triggers dialog traversal
-<br>62195: 	Error in SWT#SCROLL_LOCK JavaDoc
-<br>62393: 	SWT_AWT enter key misbehaves with JTextArea in a wizard
-<br>62477: 	Clicking on shell title bar causes activation events with null active shells
-</blockquote>
-
-<h2> SWT Build 3.0 051 - Tuesday May 11, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-TextLayout.getAscent() added
-<br>TextLayout.getDescent() added
-<br>TextLayout.setAscent(int) added
-<br>TextLayout.setDescent(int) added
-<br>Display.getSystemImage(int) added
-<br>Display.getSystemCursor(int) added
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-12625:  Menu items still grab accelerators when disabled  
-<br>25703:  Getting system icons for dialogs  
-<br>28858:  Cursor appears behind character although it's in front of  
-<br>40523:  [launcher] Allow launcher build using MinGW  
-<br>43921:  gradient fill does not print its color properly  
-<br>46824:  ControlExample: scrolling Canvas leaves screencheese  
-<br>47511:  Shell.setVisible runs event loop  
-<br>53034:  showItem() not working when setRedraw(false)  
-<br>55616:  [browser] SWT.Browser (Mozilla) does not like https links (img src="https://..." or href="https://...")  
-<br>57506:  Pressing TAB key creates junk in editor  
-<br>59352:  [browser] GTK crashes on attachments  
-<br>60420:  lots of crashes since M8  
-<br>60454:  [browser] Browser crashes on Jaguar  
-<br>60471:  Eclipse stops responding to mouse, NullPointerException on shutdown  
-<br>60568:  Table TreeItem selection fails with MouseEvent position  
-<br>60607:  inconsistent API in FontData  
-<br>60704:  Long menu item labels cut off  
-<br>60893:  [64] NPE on startup  
-<br>60913:  StyledText shows lines when mulitple lines are selected  
-<br>60937:  Hitting Enter when a combobox is open can invoke default button  
-<br>60969:  [browser] clicking link to PDF crashes VM  
-<br>61109:  Widget is disposed error disposing shell  
-<br>61239:  TableItem NPE  
-<br>61337:  Dialogs resize when moved on Solaris  
-</blockquote>
-
-<h2> SWT Build 3.0 050 - Tuesday May 4, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-New accessibility state and role constants ACC.STATE_LINKED and ROLE_LINK.
-<br>StyleRange now accepts SWT.ITALIC.
-<br>CTabFolder.MIN_TAB_WIDTH is deprecated and replaced by CTabFolder.setMinimumCharacters
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4587:  StyledText - support italic fonts and italic font style (1G60C4X)  
-<br>10846:  Tab titles not read by JAWS  
-<br>21771:  Accessibility for Buttons ignored in JAWS  
-<br>25629:  Need STATE_SYSTEM_LINKED mapped to one of the states in ACC.  
-<br>41887:  [browser] Mac - HTML Browser widget - investigate Safari browser  
-<br>42264:  [Outline] Show Outline popup very slow  
-<br>44008:  [browser] Browser component grabs focus when loaded.  
-<br>50524:  RCP: CTabFolder truncated tabs should appear as tooltip  
-<br>51676:  New Look CTabFolder menu does not stay open  
-<br>52087:  not showing close button makes it easy to close tabs accidentally  
-<br>52482:  [New Look] black box around view tab labels  
-<br>52489:  CTabFolder selected tab not properly rendered  
-<br>52593:  CTabFolder.setTabHeight and paint problem  
-<br>52837:  [Editor Mgmt] Closing an editor when using multi tabs does not always redraw properly  
-<br>52958:  TabFolder, new look draws dotted selected  
-<br>54575: CTabFolder: Selecting tabs should not affect whether chevron is shown (should use constant space)
-<br>54591:  CTabFolder: screen cheese  
-<br>55245:  CTabFolder does not give available space to tab early enough  
-<br>56472:  [Font/Colour] Active part foreground on white povokes nasty looking close widgets  
-<br>56535:  [Workbench] No separator between part trim and its content is difficult on the eyes  
-<br>58272:  BIDI: The C/ C++ editor doesn't preserve the keyboard language after pressing sapce bar  
-<br>58704:  CBanner computesize seems wrong when no control on the right hand side  
-<br>58843:  TableCursor example in Javadoc doesn't work on GTK!  
-<br>59524:  Evaluation pop-up keybindings are broken  
-<br>59861:  asyncExec runnables not run until drag complete in Windows  
-<br>60127:  [PropertiesView] garbage in the properties view  
-<br>60334:  Can't force focus to a shell (BBAWT)  
-<br>60492:  [browser] safari - 2 browsers on different tab items in same tab folder overlap  
-<br>60686:  Program.hashCode() throws NullPointerException under linux with gnome  
-</blockquote>
-
-<h2> SWT Build 3.0 049 - Tuesday April 27, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-32524:  CoolBar Clips 'run' icon  
-<br>37785:  ctrl+delete nukes non-alphanum chars  
-<br>43769:  Eclipse crashes when loading web page with applet in OLE Browser view  
-<br>47939:  [browser] Expose native menus in WebBrowser  
-<br>51682:  update (custom)control example to permit setting font on single item  
-<br>51727:  SWT_AWT's use of embeddedFrame does not allow required subclassing of the embedded Frame  
-<br>53506:  Program.getProgram() Does Not Get Default Command  
-<br>55625:  Compiling SWT on top of GTK 2.4.0  
-<br>55956:  [DynamicUI] Perspective deleted only after Workbench restart  
-<br>56126:  StyledText background highlighting doesn't work  
-<br>56376:  [EditorMgmt] Immortal editor tab tooltips  
-<br>57079:  [interop] SWT_AWT causes JVM crash  
-<br>57143:  Fast view animate transition bad on Linux  
-<br>57225:  [browser] SWT Browser Widget Crashes Workbench on XP when loading the Shockwave Plug-in  
-<br>57380:  Excess clipping/dirty area for Table PaintListener's paintControl(PaintEvent)  
-<br>57562:  [Workbench] DBCS: Window resizing does not work properly  
-<br>58073:  Table.java java.lang.ArrayIndexOutOfBoundsException:  
-<br>58308:  SWT_AWT - Embedded JSplitPane resizable arrows  
-<br>58575:  drawRectangles in Tracker causes missed mouse events  
-<br>58638:  Permit to have synchronous display to help debugging  
-<br>58732:  Coolbar on Linux-GTK should draw native handles  
-<br>58851:  When shell is created with SWT.NO_TRIM, windows does not show it on task bar  
-<br>59051:  fillGradientRectangle doesn't work with XORMode on Windows  
-<br>59279:  Item.setText() impl. doesn't follow JavaDoc  
-<br>59424:  BIDI: level of the first directional run is never detected  
-<br>59472:  Eclipse splash screen label is "Silenio"  
-<br>59615:  Empty space before handle in a coolbar  
-<br>59707:  StyledText is not setting the OS background  
-<br>59872:  Documentation fix for RowLayout  
-</blockquote>
-
-<h2> SWT Build 3.0 048 - Tuesday April 20, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-CoolBar now has SWT.FLAT style.
-</blockquote>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<blockquote>
-CTabItem no longer supports set/getForeground and set/getBackground.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-20186:  Copyright dates still are 2001  
-<br>22589:  GTK: StyledText widget is slow  
-<br>23566:  Accessibility - toolbar not accessible by keyboard  
-<br>41090:  THAI/VIET: The behavior of text editing functions are not correct.  
-<br>49133:  SWT_AWT API class undocumented  
-<br>53107:  Slider crashes when hooking resize callback  
-<br>53814:  views are blank when detached automaticly by switching perspective  
-<br>54051:  Font baselines don't line up in Java editor  
-<br>54225:  Checkbox TableItems don't honor background color near checkbox  
-<br>54989:  [CellEditors] [regression] ComboBoxCellEditor does not fire value applied  
-<br>57003:  DBCS:Copy/Paste or input DBCS display incorrectly in project file  
-<br>57004:  DBCS:Can not copy/Paste or input DBCS data in project file  
-<br>57426:  Clipped items when setting a tree item to use a bold font  
-<br>57627:  Can't click in Content Assist window of New Class wizard  
-<br>57948:  [browser] how to distinguish between a call to setText and a hyperlink activation  
-<br>58071:  ICO images painted not correctly when smaller than 17x17 pixels  
-<br>58093:  swt-gtk: uses ~100% CPU while drawing using fillGradientRectangle()  
-<br>58243:  [browser] hover messages don't show up in mozilla  
-<br>58346:  [browser] Browser not working with default RH EL3 update 1  
-<br>58569:  Regression: StyledText does not wrap correctly  
-<br>58756:  Tables & Images refresh problem  
-<br>59106:  SWT Snippet 139 fails to compile  
-</blockquote>
-
-<h2> SWT Build 3.0 047 - Tuesday April 13, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4425:  List(SINGLE) - setSelection(int, int) doesn't deselect when start>end (1FCHJMQ)  
-<br>48849:  Keyboard events ignored in Import Plug-ins and Fragments dialog  
-<br>50657:  Can't input 2 bytes character To combo box  
-<br>56390:  EXCEPTION_ACCESS_VIOLATION  
-<br>56829:  CBanner not sized correctly after coolbar wraps  
-<br>56915:  Chinese characters not rendered in StyledText  
-<br>57099:  GTK: Text widget of style MULTI does not send mouse track events if added to realized Shell (BBAWT)  
-<br>57182:  [browser] Browser displays a blank page if character encoding is specified (Linux GTK)  
-<br>57647:  errant ON_TOP | SYSTEM_MODAL Shell behaviour if tooltiptext is set on any control  
-<br>57876:  Constructor for Font has wrong-named argument; doesn't appear to be used  
-<br>57884:  Javadoc on Text missing possible style  
-<br>58156:  Unhandled event loop exception (Widget is disposed) when using "Open Type Hierarchy"  
-</blockquote>
-
-<h2> SWT Build 3.0 046 - Tuesday April 6, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-25646:  [launcher] After rebranding, "Eclipse" shows up in Windows toolbar during launch.  
-<br>27696:  DCR - need to set font and color for a TableItem's individual cells  
-<br>37052:  Shells assuming SWT.RESIZE on GTK and Motif (BBAWT)  
-<br>40521:  [launcher] Launcher error messages cannot be rebranded  
-<br>42032:  [browser] Browser Mozilla binding - problem submitting form  
-<br>42313:  SWT.CENTER and SWT.RIGHT don't work with Text  
-<br>54341:  [browser] swt.browser.Browser; buttons in html does not work on linux/gtk  
-<br>55541:  StyledText - Bidi segments Listener is broken  
-<br>55702:  [browser] Intro page does not show images on Linux  
-<br>55806:  [64] crash on startup when using jit on AMD64  
-<br>55926:  [64] [M8] AMD64 I20040324 build cannot work (unsatisfied link errro)  
-<br>56089:  [misc] Extend selection causing horizontal scroll is slow  
-<br>56149:  coolbar does not fill vertical space  
-<br>56315:  performance bad when moving lines  
-<br>56667:  Minimization of top Shell widgets impossible (SWT.MIN & SWT.NONE) on PocketPC (BBAWT)  
-<br>56795:  NPE opening quick outline/hierarchy  
-<br>56799:  NPE in WM_KEYDOWN  
-<br>56918:  Problems disposing TrayItem  
-<br>56999:  [KeyBindings] Regression: Alt+Numpad keystrokes broken  
-<br>57165:  eclipse does not start when using lesstif, FAQ is wrong  
-<br>57296:  BidiUtil static var retains references to runnables from StyledText  
-<br>57395:  backspace in texteditors -> double backspace  
-</blockquote>
-
-<h2> SWT Build 3.0 045 - Tuesday March 30, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-15025:  implement java.awt.Robot for SWT  
-<br>51719:  Need to suppress "untitled window" on GTK  
-<br>53274:  [SWT Examples] Image Analyzer crashed when tried to save images as PNGs and ICOs  
-<br>53978:  manifest.mf of org.eclipse.swt is not consistent with plugin.xml  
-<br>55522:  Display.post - support/investigate mouse button 2 and 3  
-<br>55525:  Display.post - don't send mouse down/up when doing mousemove  
-<br>55556:  MacOS 10.2.x (Jaguar) has no strcasestr function  
-<br>55561:  Display.post - hang when doing a mousedown  
-<br>55738:  next word action broken on win2000  
-<br>55756:  Double click is ignored on progress indicators  
-<br>55849:  Keyboard shortcuts don't work in old workspace  
-<br>55897:  StyledText doesn't compute preferred size properly  
-<br>55913:  Styled Text draws on top of itself  
-<br>55917:  Extra library dependency in Eclipse 2.1.2 GTK launcher  
-<br>55920:  View presentation visual problems  
-<br>55937:  Introduction page wizard not properly installing SWT examples  
-<br>55967:  SWT should be a singleton bundle  
-<br>55980:  display.post() does not handle uppercase characters  
-<br>56245:  subtitle text does not fill available horizontal space  
-<br>56366:  Tooltip for CTabFolder shows up on wrong monitor  
-</blockquote>
-
-<h2> SWT Build 3.0 044 - Tuesday March 23, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-For new API released in the last few builds, see the "New & Noteworthy" link
-on the Downloads page for 3.0M8 after March 26th, 2004.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-15054:  OwnerData or "virtual" Table support  
-<br>21659:  Frames drawn in inappropriate places  
-<br>23335:  Odd lines around buttons  
-<br>30848:  API for Table#showColumn() like Table#showItem()  
-<br>40420:  Shell with style NO_TRIM should not appear in the Window Manager task bar  
-<br>40663:  Dragging views is not synchronised with mouse position  
-<br>47638:  NPE in getParentBackground.  
-<br>50359:  Problem with vertical toolbars and GTK+ 2.3.x  
-<br>51582:  Need the ability to determine "High Contrast" mode  
-<br>54231:  CTabFolder now adds margin around page controls  
-<br>54291:  new TaskTray widget does not compile on Windows CE and GTK64  
-<br>54386:  Stray pixel in SWT table  
-<br>54878:  Drop down coolbar/toolbar menus and combo boxes take too many clicks  
-<br>54990:  ALT+DOWN does not drop down CCombo list  
-<br>55113:  Hover text stuck after drag in CTabFolder  
-<br>55133:  Table.java: java.lang.ArrayIndexOutOfBoundsException with SWT.VIRTUAL  
-<br>55187:  swt v3043b does not work under gtk 2.0.6  
-<br>55300:  StyledText - single and border cause cheese when resize  
-<br>55307:  ViewForm's title area controls are off by one pixel  
-</blockquote>
-
-<h2> SWT Build 3.0 043 - Tuesday March 16, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4809:  SWT Cursor Source and mask are flip-flopped (1GJ80FZ)  
-<br>6593:  Doc: knowing the coordinate space for SWT  
-<br>25336:  CoolBar - computeSize do not respect autobreaks [Emulated]  
-<br>30834:  Minimize to system tray  
-<br>43893:  Scrolling copies wrong bits  
-<br>49778:  Images on MenuBar are not lining up with thier Hotstop  
-<br>50151:  Using SWT.RIGHT on a ToolBar leaves blank space  
-<br>52785:  Eclipse 3.0M7 doesn't run on Fedora Core 2 test1 release.  
-<br>53401:  [64] junit tests don't compile - crashes  
-<br>53837:  Workbench hangs up when hitting space key on readonly combo.  
-<br>54358:  Shells don't fire move event when not visible (BBAWT)  
-</blockquote>
-
-<h2> SWT Build 3.0 042 - Tuesday March 9, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-19654:  Coolbar - resizing window can add rows to coolbars  
-<br>32537:  Menu text and accelerator text overlapping  
-<br>42022:  Mnemonic traversal cannot be suppressed  
-<br>46369:  javadoc should be updated for behavior of selecting multiple items in a single select list  
-<br>51464:  eclipse.exe review/updates  
-<br>51537:  need a way to pass a string to the launcher  
-<br>52536:  [SWT Examples] Setting the style to SWT.FLAT has no effect on Buttons  
-<br>52935:  Emulated Coolbar does not support wrapping  
-<br>52959:  setFont() in TableTreeItem  
-<br>53014:  MessageBox opens modal but unparented  
-<br>53045:  no more handles!  
-<br>53057:  Browser widget and display of special chars  
-<br>53141:  JVM crash at eclipse exit  
-<br>53221:  [SWT Examples] ???Save As??????? Dialog of Image Analyzer does not provide the correct file path  
-<br>53236:  Setting font/color on an item when there is no change should not redraw  
-<br>53361:  [EditorMgmt] New look: editor close button (x) does nothing sometimes  
-<br>53388:  [64] Crash in g_signal_lookup  
-<br>53394:  ArrayIndexOutOfBoundsException in ColorDialog  
-<br>53419:  viewing preference page makes preferences tree unresponsive  
-<br>53430:  Additional fixes for porting SWT to 64-bit  
-<br>53487:  [browser] Suze 9 installs Mozilla into different folder than RH  
-<br>53519:  CheckboxTableViewer does not receive selection events  
-<br>53544:  [Viewers] Checkbox Table Viewer does not provide selection callbacks on a check  
-<br>53549:  remove custom code in Program Gnome  
-<br>53556:  Index out of bounds resizing preference page  
-<br>53570:  Opening the file type association dialog to the external editors view causes Eclipse to crash  
-<br>53638:  eclipse startup problem  
-<br>53723:  Problems with setFont() on TreeItem  
-<br>53832:  VM Crash releated to focus or set font  
-<br>53853:  Selection event for checkbox Table is broken  
-<br>53995:  java_swt crashes if application bundle is named .APP instead of .app  
-</blockquote>
-
-<h2> SWT Build 3.0 041 - Tuesday March 2, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Table.setItemCount(), SWT.VIRTUAL and SWT.SetData have been added and
-implemented on all platforms to support the virtual Table.  This feature
-is "under construction".  Use at your own risk.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4575:  desire exception checks for inputProc/windowCallback (1G55O7P)  
-<br>17659:  Eclipse crashes when switching Encoding to UTF-16 (little endian)  
-<br>20364:  Slider control does not take focus  
-<br>39892:  SWT error thrown when refreshing the properties page  
-<br>45845:  scrollbars on ScrollingGraphicalViewer sometimes does not work  
-<br>45945:  Drawing issues with SWT 2.1.1 under PocketPC 2002  
-<br>46156:  Eclipse crash with KERN_PROTECTION_FAILURE when customizing perspective  
-<br>49082:  Unsupported color depth does not throw an exception in Linux GTK  
-<br>52295:  Monochrome bmp and ico image data, and icon masks are not always handle correctly  
-<br>52733:  Deadlock expand of HEAD  
-<br>52862:  SPACE gets inserted into styledtext using system menu  
-<br>53063:  Changing the style of a Label from SWT.SHADOW_IN to SWT.SHADOW_NONE does not make a difference in the appearance of the Label  
-<br>53128:  Shell.setRegion() should check if region is disposed...  
-<br>53440:  critical warnings when running jnigen tool  
-</blockquote>
-
-<h2> SWT Build 3.0 040 - Tuesday February 24, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Point Menu.getSize() added
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-6781:  Cannot draw unicode string  
-<br>38643:  Toolbar computeSize stop working after WM_SETFONT  
-<br>38714:  Table and table cursor buggy scrolling. It is impossible to use properly the table widget when the table cursor is involved.  
-<br>42554:  Double icon in the dock on OSX  
-<br>48341:  Cannot get height of Menu and no capabilities for work around  
-<br>50107:  SWT does not compile successfully against CLDC (i.e. j2me)  
-<br>51374:  Need MenuBar to support Images on PocketPC  
-<br>51645:  Java core when running event loop on the Sun  
-<br>51671:  Text not redrawn on new look CTabFolder  
-<br>51777:  TableItem.getBounds(int) returns the wrong values when table scrolled  
-<br>52024:  [NewLook] curvy lines have inconsistent line width  
-<br>52242:  New Look: white banding in view and editor tabs  
-<br>52255:  Found small problem in snipets code  
-<br>52335:  Snippet108.html missing code  
-<br>52337:  LZWCodec#maskTable should be a static final field  
-<br>52541:  [SWT Examples] CoolBar Buttons with a dropdown menu do not behave correctly  
-</blockquote>
-
-<h2> SWT Build 3.0 039 - Tuesday February 17, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<p>CTabFolder has been modified to display the new look for 3.0.  
-Please note that the new 3.0 API in CTabFolder has not been finalized and is subject to change.</p>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-21430:  Accessibility:JAWS can not read label for multi-lines Text  
-<br>38194:  SWT performance issues with JAWS 4.5  
-<br>38564:  [Import/Export] On MacOS X SWT Buttons easily get wrong height  
-<br>43257:  org.eclipse.swt.custom.StyledText is not accessible  
-<br>44236:  Jaws doesn't read eclipse's main menus  
-<br>44946:  TableCursor always paints left-aligned text  
-<br>47264:  I-Beam displayed in wrong control (Run... dialog)  
-<br>48273:  [wm2003] pocket pc - issues with popup menu  
-<br>48327:  [WM2003] Problem with PaintListener on PocketPC WM2003  
-<br>49797:  [WM2003] GC cannot instantiate on PPC 2003  
-<br>51031:  Broken arrows on multi page  
-<br>51036:  Tree Widget opens then closes on RETURN/ENTER  
-<br>51088:  Patch(es) to fix redraw bug after ControlEditors close.  
-<br>51248:  GUI thread does not process the GUI update requests timely, causing the display to be unresponsive  
-<br>51401:  can't find java.awt.* packages using IBMs 1.4.1 VM on linux  
-<br>51472:  Error launching Browser plugin in pre-M7 build  
-<br>51492:  changing TabFolder foreground colour is not immediately reflected  
-<br>51831:  StyledText doesn't specify contents of its SelectionEvents  
-</blockquote>
-
-<h2> SWT Build 3.0 038 - Tuesday February 10, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-ACC.ROLE_TREEITEM added
-<br>ACC.ROLE_TABLECELL added
-<br>ACC.ROLE_TABLECOLUMNHEADER added
-<br>ACC.ROLE_TABLEROWHEADER added
-<br>TableItem.setFont(Font) and TableItem.setFont(int, Font) added
-<br>TableItem.getFont() and TableItem.getFont(int) added
-<br>Table.showColumn(TableColumn) added
-<br>LocationEvent.top added
-</blockquote>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<blockquote>
-ACC.ROLE_TABLECOLUMN deprecated - use ROLE_TABLECOLUMNHEADER instead.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-37742:  ACC: missing an item correspondent with ROLE_SYSTEM_OUTLINEITEM defined by MSAA  
-<br>43091:  [browser] Browser - LocationEvent behavior  
-<br>44063:  Clipboard of GTK on KDE : Eclipse crash  
-<br>44943:  TableCursor color set incorrectly  
-<br>50522:  [interop] Components in SWT_AWT don't show in Workbench.  
-<br>50907:  JPEG loader fails to load image  
-<br>51081:  Tracker flickers when using setRectangles to hold it in place  
-<br>51325:  SWT_AWT:The color depth of the display changed cause NullPointerException  
-<br>51372:  [browser] certain event strings contain an extra null char
-</blockquote>
-
-<h2> SWT Build 3.0 037 - Tuesday February 3, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-50639:  Deadlock creating image outside UI thread  
-<br>50718:  get doc title from Browser  
-<br>50130:  gtk and motif don't compile against CLDC  
-<br>50778:  Java doc problems  
-<br>50547:  MessageBox locks out application  
-<br>50520:  RCP: Need ability to set close button per item on CTabFolder  
-<br>50709:  Right Aligned Table Column Headers do not appear until after a resize  
-<br>49828:  [browser] Browser control does not always send completed progress event  
-<br>48899:  [browser] browser plugin not included into the eclipse example zip file  
-<br>50991:  [browser] mozilla - must support older version mozilla 1.4  
-<br>50777:  [browser] mozilla dependencies on unfrozen api  
-</blockquote>
-
-<h2> SWT Build 3.0 036d - Tuesday January 27, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Browser.backEnabled() added
-<br>Browser.forwardEnabled() added 
-<br>Browser.addTitleListener(TitleListener) added 
-<br>Browser.removeTitleListener(TitleListener) added 
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-46225:  3.0M4 doesn't work with gtk2.3.0  
-<br>50301:  Characters typed are displayed backwards.  
-<br>50518:  CLabel should support a vertical gradient
-<br>49971:  NPE when closing workbench  
-<br>50377:  Swt MANIFEST.MF not adjusted to repackaging of SWT_AWT.  
-<br>50256:  Text#getCaretLocation() sends erroneous Modify event  
-<br>45419:  [browser] add api to read html from memory on Photon Browser  
-<br>47936:  [browser] Back/Next event support in WebBrowser  
-<br>48809:  [browser] breaking change - rename LocationEvent.cancel to LocationEvent.doit and reverse boolean meaning  
-<br>50405:  [browser] Linux: switch to Mozilla 1.6  
-<br>50437:  [browser] send title event  
-<br>50034:  [interop] swing mouse events not received in RCP plugin  
-<br>50483:  [interop] swt SWT_AWT & ui ViewPart  
-</blockquote>
-
-<h2> SWT Build 3.0 036 - Tuesday January 20, 2004 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Display.getIconSizes() added
-<br>Display.getCursorSizes() added 
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-50153: API - Breaking change - replace Display.getCursorSize with Display.getCursorSizes  
-<br>50161: NEW API - Display.getIconSizes
-<br>49942: NPE in StyledText.getSelectionRange (line 4275)
-<br>48653: NPE in StyledText.performPaint (line 6084)
-</blockquote>
-
-<h2> SWT Build 3.0 035 - Tuesday January 13, 2004 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote> 
-46800:  Arrow button doesn't receive focus  
-<br>49154:  Combo behavior not very user-friendly   
-<br>49534:  Javadoc of 'Control' should mention 'Traverse' event  
-<br>32828:  Loss of the modal context  
-<br>49471:  M6 image leak   
-<br>47279:  OS.ExpandEnvironmentStrings crashes on zero-length string  
-<br>49502:  Snippet 90 miss class specification  
-<br>49503:  Snippet 98 missing import statements  
-<br>49723:  StyledText is leaking StyleRange objects again  
-<br>49401:  SWT M6 outdated Manifest File prevents use of SWT_AWT from within Eclipse  
-<br>49381:  SWT.RIGHT does not work in Text  
-<br>49488:  swt_awt.c and swt_awt.rc files not in source bundle  
-<br>45149:  The position of IME input field is wrong.  
-</blockquote>
-
-<h2> SWT Build 3.0 034 - Monday December 15, 2003 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-39606:  JAWS 4.5 not reading tabs    
-<br>48263: EC: gtk allows TabItem.setControl(...) value to be non-child of TabFolder.    
-<br>48343:  DCR: Provide means to get preferred cursor size
-<br>47928:  overly stringent bounds tests in Text.getText
-<br>48233:  [KeyBindings] shortcut Command+Space not working
-<br>22228:  [Workbench] program icon in ALT+TAB window looks ugly
-<br>48271:  EC: Control.setVisible doesn't do isDisposed() check
-</blockquote>
-
-<h2> SWT Build 3.0 033 - Tuesday December 9, 2003 </h2>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<blockquote>
-<code>Slider.setThumb(int), Slider.setValues(...), ScrollBar.setThumb(int)</code> and
-<code>ScrollBar.setValues(...)</code> now clamps the passed thumb value if it exceeds
-the receiver's range.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-48036:  [browser] crash on IE when using javascript to close more...
-<br>48022:  3 mouse clicks cause 4 mouseDown events
-<br>47894:  Combo layout problems
-<br>47916:  [browser] crash on IE when setting text multiple time wit...
-<br>47885:  [browser] provide a resize event
-<br>48168:  [browser] breaking change - changing names of WindowEvents
-<br>45989:  Slider/Scrollbar API doc
-<br>47898:  StyledText leaking StyleRanges
-<br>47190:  Documentation missing
-<br>48297:  [browser] investigate support for Mozilla Firebird
-</blockquote>
-
-<h2> SWT Build 3.0 032 - Tuesday December 2, 2003 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-org.eclipse.swt.awt.SWT_AWT class added for Windows, GTK and Motif - the class is not internal anymore
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-33687:  Combo widget does not size itself to handle largest entry
-<br>47170:  cheese when resize with focus ring
-<br>47557:  No images returned by Program.getImageData()
-<br>47245:  setEditable() method for Combo or CCombo
-<br>47468:  Support "full keyboard access" mode.
-<br>38149:  SHIFT + spacebar doesn't work
-<br>46810:  unexpected behavior for TableItem.setBackground() when co...
-<br>46641:  Browser widget: footprint and guidelines question
-<br>46707:  NPE when closing eclipse.
-<br>47366:  [New Look] Area not painted when tab in the background
-<br>46751:  [browser] Javascript window.close() does not work in the ...
-<br>46896:  CCombo setEnabled
-<br>47109:  Resize buttons horizontally leaves cheese
-<br>47530:  [New Look] Cheese when adding to a banner
-<br>47143:  List.add() != List.getItems() if string contains '\n'
-<br>34797:  API: Clipboard:isDisposed
-<br>47426:  [browser] breaking change - Replace NewWindowEvent with O...
-<br>29396:  Unable to get session data when using internal browser
-<br>47039:  Inconsistent shutdown
-<br>47391:  Combo.deselect(int) and deselectAll() doesn't work
-<br>44567:  Clipboard.dispose throws NPE
-</blockquote>
-
-<h2> SWT Build 3.0 031 - Tuesday November 25, 2003 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-46848:  Circumflex accent for characters does not work
-<br>46859:  Combo API doc/problems
-<br>16011:  Copy not working.
-<br>47146:  Group label should have same foreground/background as Group
-<br>47084:  No mouseUp events for the left mouse button
-<br>46068:  [browser] linux motif Browser shows up non embedded if previous instance disposed
-<br>40460:  [Key Bindings] Some shortcut keys broken
-</blockquote>
-
-<h2> SWT Build 3.0 030 - Tuesday November 18, 2003 </h2>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<blockquote>
-<ul>
-<li><code>DirectoryDialog.setMessage(String string)</code> now throws an <code>IllegalArgumentException</code> if
-<code>string</code> is <code>null</code>
-<li><code>MessageBox.setMessage(String string)</code> now throws an <code>IllegalArgumentException</code> if
-<code>string</code> is <code>null</code>
-<li><code>Text.getText(int start, int end)</code> now throws an <code>IllegalArgumentException</code> if
-<code>start</code> is negative, if <code>end</code> is equal to or greater than the length of
-the receiver's text, or if <code>start</code> is greater than <code>end</code>.
-</ul>
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-34128:  classpath incomplete  
-<br>46688:  eclipse 3.0M4 left out a char symbol behind
-<br>46722:  Crash on open of any java source  
-<br>38981:  Decorations.getMaximized() always returns false  
-<br>46582:  gtk setSelection(*) does not set focus properly  
-<br>22010:  GTK: Combo.setForeground() and Combo.setFont() dont change the drop-down list  
-<br>46702:  List.getFocusIndex() does not answer -1  
-<br>46500:  MessageBox.setMessage(null) has to be spec'd  
-<br>45787:  Panther: intitial Textfield contents only partially visible  
-<br>46419:  Text.getText(int,int) needs to spec behaviour for invalid range 
-<br>42408:  [browser] Javascript window.open() does not work in the Browser widget  
-<br>23084:  [StyledText Motif 2.0.1] Cursor disappears while moving by words (forwards/backwards)  
-<br>36010:  [View Mgmt] View menu "Move" and "Size" commands have no effect.  
-</blockquote>
-
-<h2> SWT Build 3.0 029 - Tuesday November 11, 2003 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-GC.drawPoint(int x, int y) added
-<br><code>DragDetect</code> event objects now have their <code>x</code> and <code>y</code> fields
-set to the control-relative x and y coordinates of the drag start
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-46354:  add to javadoc for List.remove(int start, int end)  
-<br>42426:  Backport BiDi Mirroring Fixes from 3.0 and 2.1.x  
-<br>46029:  bad alignment in Import plugins wizard  
-<br>32772:  Cannot hold down stepping keys on OSX  
-<br>44390:  column separator disappeares after resizing the first column to zero width  
-<br>46306:  ControlExample: multiple Select Listeners dialogs is confusing  
-<br>33637:  DCR - no printing on Mac [was Print on OSX 10.2.4]  
-<br>43251:  DragDetect event should have x and y coordinates  
-<br>28684:  Drop-Down arrows hard to hit  
-<br>21075:  Import to filesystem can only browse when empty  
-<br>45877:  many German strings are not displayed  
-<br>38521:  Mouse events delivered to wrong Control  
-<br>45946:  Need an efficient GC.setPixel( x,y ) method.  
-<br>41465:  Panther: ToolItem(DROP_DOWN) arrow has wrong background  
-<br>45453:  pocketpc - Pop-Up menus do not work on Tables  
-<br>45422:  Pull-down menu only shows up on mouse-up, rather than mouse down  
-<br>43108:  StyledText - Scrollwheel event interferes with last caret placement  
-<br>46368:  Table array exception when removing invalid lower range  
-<br>46037:  text editor - <home> positions editor in first page  
-<br>45789:  Toolbar dropdown items don't fire immediately  
-<br>45940:  Votes on closed bugs?  
-<br>46028:  [browser] IE browser still shows default popup menu  
-<br>45997:  [browser] support and require Mozilla 1.5  
-<br>46147:  [browser] SWT accelerators get overriden by IE  
-<br>44919:  [KeyBindings] dialog keyboard shortcuts gone  
-<br>45362:  [KeyBindings] French Keyboard issue with 0 key (SHIFT + ???????)  
-<br>37740:  [KeyBindings] Text tool item on the Viewpart Title takes menu's accelerator key  
-</blockquote>
-
-<h2> SWT Build 3.0 028 - Tuesday November 4, 2003 </h2>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<blockquote>
-<code>FileDialog.getFileNames()</code> now returns an empty <code>String</code> array instead of <code>null</code>
-when there are no file names to answer.
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-36083: NPE in Cursor.dispose
-<br>5096: FileDialog doesn't allow to set file name
-<br>22785: FileDialog: File paths incorrect
-<br>26771: motif test case failures
-<br>26913: All platforms should clear mouse capture when modal dialog is opened
-<br>34408: Shift Tab does not work in java editor
-<br>44878: StyledText - Arrow_Down in text editor doesn't retain column when it scrolls
-<br>45323: Error occurred using F3 to open class
-<br>45628: cannot traverse to ToolBar items
-<br>45800: Tracker (RESIZE) with multiple Rectangles losing precision
-<br>45834: FileDialog API spec problems
-<br>8507: SWTError thrown instead of SWTException
-<br>11663: unnecessary focus events on linux-motif
-<br>24319: Key events don't send to code completion dialog
-<br>25494: Mnemonic keys in editor menu don't work on gtk.
-<br>26101: Strange behaviour in VerifyListener under GTK
-<br>26170: SWT widget org.eclipse.swt.widgets.Label does not properly display its text under Linux Gtk when given a SWT.WRAP style.
-<br>35811: Resize workbench shell causes fastview z-order cheese
-<br>36153: No F1 help in Java editor
-<br>37510: Shift + F10 does not work in GEF on Linux
-<br>43683: [SWT] request function keys F13, F14, and F15 be supported
-<br>45457: [ViewMgmt] View contents rendered on top of fast view
-<br>45552: Crash when viewing MicroAnalyzer trace on Linux
-<br>21035: [Key Bindings] Ability to map keypad key events
-<br>24178: (BBAWT) Certain keys do not generate KeyEvents
-<br>43871: Ctrl+Break is interpreted as Ctrl+C Ctrl+C
-<br>45640: PENs are being leaked during painting
-<br>4622: DCR: No auto tab select on first tab created (1GCEDI4)
-<br>31107: CTabFolder and CCombo - too many sheels from tooltip shell
-<br>33934: CTabFolder's closeImage invisible in High Contrast mode
-<br>33945: CTabFolder tooltips overlap cursor
-<br>38805: Switching perspectives on Linux GTK seems to be slow due to large number of toolbar creations
-<br>42278: CTabFolder throws exception when closing a tab
-</blockquote> 
-
-<h2> SWT Build 3.0 027 - Tuesday October 28, 2003 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-45267:  BIDI: Mirrored text appears on every editor  
-<br>38585:  ControlExample - Checkbox Tree preferred size a tad too small  
-<br>35494:  ControlExample - Table preferred size does not adjust width  
-<br>22287:  Crash when calling SWT Combo.setText()  
-<br>41420:  Deleting the first column of a Table may throw an exception  
-<br>45439:  Double clicking the left upper corner of the nested Decoration closes the parent Shell  
-<br>45341:  FileDialog crashes VM on invalid drive  
-<br>34362:  GB18030-Motif: Crash when typing CN in the JavaEditor  
-<br>43500:  InvalidThreadAccess when running a subset of JUnit tests  
-<br>45306:  Mouse events lost in shell launched from secondary application modal shell  
-<br>45337:  pocketpc - can't show popup menu in Tree  
-<br>41060:  preferences dialog and editing paste functions wedged  
-<br>42367:  StyledText - StringIndexOutOfBoundsException in StyledTextRenderer  
-<br>44474:  StyledText does not handle case where printing not supported  
-<br>44050:  SWT.BORDER Text should display thin black border on PocketPC  
-</blockquote> 
-
-<h2> SWT Build 3.0 026 - Wednesday October 21, 2003 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-44896: 2 junit tests have been intermittently failing in nightly build  
-<br>43811: 3.0M3 fails startup  
-<br>42410: A way to check if SWT Browser is implemented and working is needed.  
-<br>44174: Eclipse crashes using SWT Designer plugin 
-<br>44232: ImageData constructor should thrown IllegalArgumentException for scanlinePad == 0  
-<br>44832: Opening a PRIMARY_MODAL dialog on top on another PRIMARY_MODAL dialog shoud not enable the parent of the first.  
-<br>44301: SashForm - Sashes have no borders  
-<br>45145: Second window comes to front when using first  
-<br>40873: Splash Screen Has Wrong Colors on Linux  
-<br>42947: StyledText - redraw problem on last line with word wrap   
-<br>43837: [browser] Browser - linux can't dispose a browser and open a new one  
-<br>45122: [browser] Mozilla browser forward() back() always return true  
-<br>45118: [browser] mozilla browser throws exception after reload in some cases  
-<br>39106: [DBCS] Cannot input Japanese characters into Text widget with GTK+2, kinput2 and canna  
-</blockquote> 
-
-<h2> SWT Build 3.0 025 - Wednesday October 15, 2003 </h2>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-TabFolder style bits SWT.TOP and SWT.BOTTOM added
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-44212: FocusEvents/KeyEvents from Scale not delivered  
-<br>43729: GC.drawText() does not work on large images  
-<br>44508: GC.getCharWidth JUnit test failure on Win98  
-<br>44600: gnome Program does not return icon  
-<br>44476: GP on shutdown  
-<br>44223: Group widget doesn't pass focus when pressing mnemonic  
-<br>44607: Gtk critical warning when running swt app  
-<br>44372: NPE on hitting Esc to dismiss inline table edit  
-<br>44516: Remove println's from FontData JUnit test  
-<br>43878: SWT HTML Widget / Browser embedding problem on Linux  
-<br>22983: Table.showItem() ignored before bounds are set  
-<br>44778: TableItem.getImage periodically throws ArrayOutOfBoundsException  
-<br>43281: Text field throws StackOverflowError when full  
-<br>44509: Text.setTextLimit JUnit test failure on Win98   
-</blockquote> 
-
-
-<h2> SWT Build 3.0 024 - Tuesday October 7, 2003 </h2>
-
-<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
-
-<p>Methods <code>ImageLoader.addImageLoaderListener(ImageLoaderListener)</code> and
-<code>ImageLoader.removeImageLoaderListener(ImageLoaderListener)</code> now throw an SWT Error
-if <code>null</code> is passed as the argument.
-</p>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Region.add(int[] polygon) added
-<br>Region.subtract(int[] polygon) added
-<br>Shell.getRegion() added
-<br>Shell.setRegion(Region) added
-<br>ACC.TEXT_INSERT added
-<br>ACC.TEXT_DELETE added
-<br>Accessible.addAccessibleTextListener(AccessibleTextListener) added
-<br>Accessible.removeAccessibleTextListener(AccessibleTextListener listener) added
-<br>Accessible.selectionChange() added
-<br>Accessible.textCaretMoved(int) added
-<br>Accessible.textChanged(int,int,int) added
-<br>Accessible.textSelectionChanged() added
-<br>org.eclipse.swt.accessibility.AccessibleTextAdapter added
-<br>org.eclipse.swt.accessibility.AccessibleTextEvent added
-<br>org.eclipse.swt.accessibility.AccessibleTextListener added
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>  
-44161:  addImageLoadListener should check for null 
-<br>43971:  Double clicking no longer works  
-<br>42559:  Eclipse 3.0 M3 - can't start Eclipse from the command line  
-<br>43706:  Palette desc saying 'no items for this editor' doesnt wrap on linux  
-<br>40940:  Printing disabled in Solaris  
-<br>43918:  Some mouse clicks don't work  
-<br>44164:  update needed in javadoc for constructor Image(Device , ImageData)  
-<br>44165:  update needed in javadoc for constructors ImageData specifying colorDepth  
-</blockquote> 
-
-
-<h2> SWT Build 3.0 023 - Tuesday September 30, 2003 </h2>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>  
-43610:  'Shift+Alt+' gives 0x00 as key code and character  
-<br>43538:  Ctrl+Space gives two key down events  
-<br>42225:  Can't assign command to Ctrl+Backspace  
-<br>43597:  [SWT] Text.setText(..) can change font inappropriately on Mac OSX  
-<br>43599:  [KeyBindings] accelerators on Mac OS X 'application menu' should not always be active  
-<br>34790:  Search view doesn't reposition scrollbar  
-<br>38757:  BIDI - on a 102 keyboard, English Layer, there is a key conflict  
-<br>40085:  Cursor key scrolling in code assist table doesn't update scrollbars 
-<br>43311:  KeyReleased event is not fired when the '4' key is released on spanish keyboards  
-<br>43394:  ImageAnalyzer example failed to read PNG file.  
-<br>43576:  "Alt+Space" traversal cannot be blocked  
-<br>43613:  Integrate isComplete() work and merge with patches  
-<br>43667:  New Synch View layout  
-<br>43757:  Table answers its Header as a child  
-<br>43778:  Browser - mozilla GTK into Motif appears in top level window  
-<br>43779:  Browser - mozilla GTK into Motif gets hidden by shell proxy focus  
-<br>43780:  Implement Browser on Linux Motif  
-<br>43177:  Text.setText() triggers two ModifyEvents  
-<br>43808:  StyledText deletes too many characters in some situations  
-<br>43094:  Provide a how-to on running SWT snippets  
-</blockquote> 
-
-
-<h2> SWT Build 3.0 022 - Tuesday September 23, 2003 </h2>
-
-<h3>
-<a NAME="Breaking Changes"></a>Breaking Changes</h3>
-
-<p>The Event.keyCode field now contains the unaffected keycode value.  For example,
-when the user types Ctrl+Shift+'a', the keyCode field contains 'a'.  The character
-field is unaffected and contains the same value as before (0x01).
-</p>
-
-<h3><a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Combo.getOrientation() added
-<br>Combo.setOrientation(int) added
-<br>StyledText.getOrientation() added
-<br>StyledText.setOrientation(int) added
-<br>Text.getOrientation() added
-<br>Text.setOrientation(int) added
-</blockquote>
-
-<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>  
-38094:  [Enter] key doesn't work in text editors  
-<br>30273:  [Key Bindings] DBCS: "F1" funtion key does NOT work on Linux_GTK.  
-<br>15538:  Label requires border to draw correctly  
-<br>21555:  View menu remains open on GTK  
-<br>33198:  [Wizards] Error message in Wizard clipped  
-<br>37608:  [Bidi] StyledText - support dynamic changing of orientation  
-<br>42467:  Photon - implement the SWT browser widget  
-<br>43125:  Bidi: DCR setOrientation API for Text and Combo widget  
-<br>43262:  XmTextPaste native declares jboolean return, does not do so  
-</blockquote> 
-
-<h2> SWT Build 3.0 021 - Tuesday September 16, 2003 </h2>
-
-<h3>
-<a NAME="Breaking Changes"></a>Breaking Changes</h3>
-
-<p>Canvases now see Ctrl+Tab, Shift+Tab, Ctrl+PgUp and Ctrl+PgDn by default instead of traversing.
-This change was made for the Eclipse key binding work.  The rule that Canvases see every key was
-broken in previous versions of SWT due to a last minute accessibility work around for 2.0.
-</p>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote> 
-42897:  BIDI: CHECK style doesn't work with RTL Tree or Table  
-<br>42787:  CheckboxTableViewer does not clear selection   
-<br>42202:  JDTUI tests don't finish    
-<br>15307:  DCR - Ability to forbid SWT button (PUSH style) to become default needed  
-<br>32790:  Breakpoint hover is flaky on OS X  
-<br>37863:  Text's focus border has wrong background 
-<br>39987:  BIDI: MIRRORED bit can't be switched on in the style's bitmap of any SWT widget.  
-<br>40006:  BIDI: rtl-oriented StyledText has overlapping segments problem  
-<br>41039:  Hitting the Enter/Return key in the Find/Replace dialog doesn't do anything on Mac OS X  
-<br>42349:  Bogus implementation for GC.drawText (String string, int x, int y, int flags) on Mac  
-<br>42353:  drawString/drawText do not work properly on GTK.  
-<br>42512:  MenuBar on Decorations are not refreshed  
-<br>42724:  StyledText - selection rendered incorrectly on bidi platforms  
-<br>42818:  DirectoryDialog does not show its set message  
-<br>42882:  remove platform code throwing ClassNotFound exception  
-<br>43011:  "Alt+" key strokes not always received on "zh_CN.GB18030"  
-</blockquote>
-
-
-<h2> SWT Build 3.0 020 - Tuesday September 9, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote> 
-4776:  StyledText - GC.stringExtent returns incorrect value (1GI7ALA)  
-<br>35589:  StyledText - add getStyleRanges(start, offset) API  
-<br>35826:  GPs on exit  
-<br>38983:  StyledText - ignore WRAP when SINGLE style is specified  
-<br>40019:  BIDI: StyledText has problem with drawing of selection in both ltr and rtl orientation of this widget in the bidi locale.  
-<br>40406:  Clicking in tree does not bring window to the front.  
-<br>40693:  Text - No Verify/Modify when a modifier key is down  
-<br>40800:  org.eclipse.swt.widgets.Text, method append(), bottom focusing error  
-<br>41748:  [Keybindings] Keyboard Shortcuts not working  
-<br>41773:  underscore dissapears in editor if font is bold Courier New size 9  
-<br>41899:  Odd font names returned by getFontList on Mac  
-<br>42259:  StringIndexOutOfBoundsException in FontData.getLocale()  
-<br>42266:  NPE when opening Compiler preference page  
-<br>42275:  Device.getFontList() is inconsistent across platforms.  
-<br>42293:  Menu item too large  
-<br>42323:  Eclipse won't start after renaming Eclipse.app  
-<br>42460:  Browser - report location before it is changed  
-<br>42465:  StackOverflow on Keys preference page  
-<br>42697:  multiselect in pocket pc  
-</blockquote>
-
-
-<h2> SWT Build 3.0 019c - Tuesday September 2, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-39781:  Selection events not fired from Combo  
-<br>40560:  Label with text and image set tries to display both  
-<br>41330:  Import|filesystem Form Directory input acts strange  
-<br>41619:  SWT does not render Unicode glyphs > 255  
-<br>41707:  Exception causes Members view to become empty  
-<br>41968:  Some menu item texts appear blank on Solaris 9 x86  
-<br>41980:  GP showing Workbench - Appearance preference page  
-<br>42008:  Corrupt Tree view-model after disposing last treeItem  
-<br>42150:  Browser plugin not working on GTK  
-<br>42182:  Externalize strings wizard is broken  
-</blockquote>
-
-
-<h2> SWT Build 3.0 019 - Monday August 25, 2003 </h2>
-
-<h3>
-<a NAME="Breaking Changes"></a>Breaking Changes</h3>
-
-<p>Keydown events now run before the work is done in the Operating System.  This means, for example, 
-that if you hook a key down event in a text widget and inside the key down event, get the content of 
-the text widget (Text.getText()), the content will not contain the key that was just typed.  
-To get the content with the latest character you can use Display.asyncExec - this will run after 
-the Operating System has processed the key down.  Note: in this case you probably should 
-have been using the SWT.Modify or SWT.Verify event.</p>
-
-<p>This change was made to support key bindings in Eclipse so that they could intercept
-key events before any widget had a chance to process the character.</p>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-<blockquote>
-Region(Device) added
-<br>Region.intersect(Rectangle) added
-<br>Region.intersect(Region) added
-<br>Region.subtract(Rectangle) added
-<br>Region.subtract(Region) added
-<br>Rectangle.intersect(Rectangle) added
-<br>Rectangle.intersects(int, int, int, int) added
-<br>TableItem.setBackground(int, Color) added
-<br>TableItem.setForeground(int, Color) added
-<br>TableItem.getBackground(int) added
-<br>TableItem.getForeground(int) added
-</blockquote>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-20536: SWT error during Tracker instantiation in GTK  
-<br>40529: SWT examples: setup doc bug    
-<br>41840: Windows only - Browser widget with Mozilla  
-</blockquote>
-
-
-<h2> SWT Build 3.0 018 - Wednesday August 20, 2003 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-
-<p>Browser class added for Windows and Linux GTK</p>
-<p>36952:	[Plan Item] Display HTML in a widget</p>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>    
-41201:  GTK-BIDI: RTL support in Label
-<br>41362:  GTK-BIDI: RTL support in Group
-</blockquote>    
-
+<h2>SWT Build 3649 - Friday May 21, 2010</h2>
 
-<h2> SWT Build 3.0 017a - Tuesday August 19, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>    
-22322: AWT Container is a SWT container does not get its background painted in JDK 1.4.0  
-<br>39752: SWT_AWT support for Java 1.4  
-<br>40828: Vertical toolbar strange behavior       
-<br>41418: FormLayout causing infinate loop.  
-<br>41424: Javadoc is bogus for GC.drawArc  
-<br>41455: TableColumn#setWidth(int width) allow width=0 but GTK doesn't like it  
-<br>41620: eclipse.exe on Mac truncates error messages longer than 255 chars  
-<br>41627: Editable Combo incorrect width  
-</blockquote>
-
-
-<h2> SWT Build 3.0 017 - Tuesday August 12, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>    
-4608: Canvas.setRedraw(true) makes widget visible (1G975VG)  
-<br>6220: Workbench is automatically brought to front in focus follows mouse mode  
-<br>38605: CTabItem cannot be created in Linux-GTK  
-<br>39173: Thread processing is extremely slow on GTK. (BBAWT)  
-<br>40102: [Viewers] ITreeViewerListener.treeExpanded() is called twice  
-<br>40156: CTabFolder's client area is off by a few pixels when there are no tabs  
-<br>40624: JVM crash caused by org.eclipse.swt.internal.motif.OS.XmImSetValues(Native Method)  
-<br>40884: Eclipse crashes with Sun jdk 1.4.2  
-<br>40899: Eclipse 2.1.1 does not come up on HP when remotely attaching from a linux box  
-<br>41067: OLE ref count problem when opening file for read  
-<br>41111: [portability] DirectEdit editor misplaced after using scroll wheel  
-<br>41188: GTK-BIDI: RTL support in Button  
-<br>41200: GTK- contents of check and radio buttons can't be aligned to center and to the trailing edge of widget.  
-<br>41233: Control added after open() doesn't get painted unless the window is resized.  
-<br>41324: Preferences->Workbench->Appearance crashes JVM [Motif]  
-<br>41347: CCombo shouldn't fire defaultSelection on mouse list selection  
-<br>41366: Widget is disposed exception while layout  
-<br>41375: FormLayout.layout takes too long for more controls  
-</blockquote>   
-
-
-<h2> SWT Build 3.0 015 - Tuesday July 29, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>    
-36927: UI does not get focus on multiscreen Suse 8.2  
-<br>37095: BIDI - When starting Eclipse from Arabic locale it is always RTL oriented  
-<br>38349: wizard description showing border and caret  
-</blockquote>   
-
-
-<h2> SWT Build 3.0 015 - Tuesday July 29, 2003 </h2>
-
-<h3>
-<a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<p>
-<b>Motif and Photon: Change of event ordering in Table and Tree</b>
-<p>
-The ordering of selection events has changed on these platforms to become consistent with that of win32:
-<ul>
-<li>The previous ordering of Selection-MouseDown-MouseUp has been changed to MouseDown-Selection-MouseUp for mouse (de)selections</li>
-<li>The previous ordering of Selection-KeyDown-KeyUp has been changed to KeyDown-Selection-KeyUp for keyboard (de)selections</li>
-</ul>
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>    
-33370:  event firing differences (win32/motif)   
-<br>37578:  TableColumn does not notify of Resize event  
-<br>38712:  'Gtk CRITICAL' error being roported by SWT in Linux-GTK. (BBAWT)  
-<br>39401:  Swing interoperability - solution proposal  
-<br>39730:  code assist popup does not take focus  
-<br>40652:  GTK Linux - Memory Leak  
-</blockquote>   
-
-
-<h2> SWT Build 3.0 014f - Tuesday July 22, 2003 </h2>
-
-<h3>
-<a NAME="Breaking Changes"></a>Breaking Changes</h3>
-<p>
-<b>Clipboard API must be called from UI Thread</b>
-<p>
-On GTK, Clipboard interactions run an event loop which must 
-be executed in the UI Thread.  As a result, on all platforms,
-invoking the Clipboard API from a non UI thread will result 
-in an SWT Exception of ERROR_THREAD_INVALID_ACCESS.
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-33355: Button with ARROW style answers getText() differently  
-<br>35761: ControlExample - Label - Image labels issue with SWT.WRAP  
-<br>35861: crash in gtk_editable_delete_selection on GTK 2.2.1/Redhat 7.1  
-<br>36611: Tracker resize events are not sent correctly  
-<br>38224: Tracker implementation on GTK incomplete  
-<br>38777: Out of bound exception in ColorDialog  
-<br>38855: Table.getImageBounds returns incorrect value  
-<br>39011: Multimonitor - add api to get monitor which 'owns' a widget  
-<br>39840: No context menu on the fast view icons and perspective icons  
-<br>39965: gtk has trouble processing events until window pop  
-<br>39987: BIDI: MIRRORED bit can't be switched on in the style's bitmap of any SWT widget.  
-<br>40130: StyledText - add accessibility support to StyledText  
-<br>40155: Font.dispose() throws NPE  
-<br>40158: Right click on a tree doesn't select the element  
-<br>40159: Combo throws exception in junit test  
-<br>40216: Right CTRL+SHIFT right justifies text and reverses scroll bars  
-<br>40242: Text being reversed while hitting Ctrl+Shift  
-</blockquote>   
-
-
-<h2> SWT Build 3.0 014 - Tuesday July 14, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-30021: Font and Color dialogs hang on JVM 1.4.1  
-<br>37030: No focus listener control in SWT combo on Linux platform  
-<br>37428: Extra pop up menu on text widget with setMenu  
-<br>39032: StyledText - exception in autoscroll in bidi  
-<br>39166: crash  
-<br>39236: Completely different behaviour for creating a shell with a parent versus calling setParent
-<br>40030: StyledText - auto scroll next in SINGLE mode does not stop  
-</blockquote>
-
-
-<h2> SWT Build 3.0 013 - Thursday July 10, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-37490: BIDI: text in the rtl-oriented Text control can't be aligned to the trailing edge of this control.  
-<br>39013: scrolling down in editor corrupts contents  
-<br>39380: TabFolder not working in QNX 6.2.1  
-</blockquote>
-
-
-<h2> SWT Build 3.0 012 - Tuesday July 8, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-39443: GTK Error calling TreeItem.getExpanded() on a tree item being disposed.  
-<br>39084: Combo.add firing unnecessary events (BBAWT)  
-<br>21212: GTK:Selecting a Checkbox from within the selection callback causes infinite loop(BBAWT)  
-<br>19614: NO_RADIO_GROUP does not work on GTK  
-<br>39119: Text.ComputeSize(0) returning 0 on GTK (BBAWT)  
-<br>34386: Traversing out of Table header can lead to warning  
-</blockquote>
-
-
-<h2> SWT Build 3.0 011 - Tuesday July 1, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>   
-38975: PropertySheetViewer gets IllegalArguementException if RootElement set before visible  
-<br>39319: Eclipse often hangs. Right clicking helps sometimes  
-<br>39105: Eclipse Crash inserting a New Project on CVS  
-<br>19153: Combo fires too many SelectionEvents in GTK2    
-<br>12220: SWT Mouse Enter comes before Mouse Exit [portability]  
-<br>38606: List constructor with SWT.SIMPLE | SWT.MULTI style parameters behaves incorrectly (BBAWT)  
-<br>39140: SWT.VERTICAL ignored in ToolBar   
-<br>20083: CCombo method redraw() does not work  
-</blockquote>
-
-
-<h2> SWT Build 3.0 010 - Tuesday June 24, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-17656: Inconsistent combo box display behaviour  
-<br>30871: [Cell Editors] Support for multiline text cell editor  
-<br>33966: CCombo is padding it's drop-down items list with blank entries  
-<br>34365: Display problem in the editor  
-<br>35852: Crash on first startup in Mandrake 9.1    
-<br>38596: ControlExample - 'return' inside text widget goes to button widget  
-<br>38626: DirectoryDialog getFilterPath() always returns null  
-<br>38627: [Contributions] Cascading menu does not show an arrow  
-<br>38914: Clicking in the wrong sequence crashes Java VM  
-<br>38987: PocketPC: MULTI Text control ES_WANTRETURN/_TAB_NEXT problem  
-<br>39049: FormLayout performance  
-<br>39078: FormData throws "Widget is disposed" when it's widget is dispose()d  
-</blockquote>
-
-
-<h2> SWT Build 3.0 009 - Tuesday June 17, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-38353:  crash in OS.gtk_main_iteration() when double-click disabled text widget  
-<br>38912:  DBCS: input special symbol breaks input method on ja_JP   
-<br>38344:  StyledText - exception when selecting lines in WRAP mode  
-<br>31195:  StyledText - SWT.WRAP display StyledText incorrectly  
-<br>38376:  SWT 3007 on Linux GTK is not handling threads properly (BBAWT)  
-<br>35183:  DBCS: Set text generates Index of Bounds exception using 2.0 NLS language pack  
-<br>38841:  NPE in Widget.filters  
-<br>37782:  Shell setMinimized(true) doesn't deactivate Shell  
-<br>38382:  DND in Packages View results in incorrect target element  
-<br>7946:  List portion of CCombo goes off the bottom of the screen  
-</blockquote>  
-
-
-<h2> SWT Build 3.0 008 - Tuesday June 10, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>  
-38385:  Japanese Input (IME) not doesn't come up  
-<br>38388:  eclipse crash on redhat 9/ ja_JP   
-<br>38213:  [Wizards] Dialogs require a resize to draw  
-<br>36541:  Printing of java program causes failure  
-<br>38331:  Inconsistent handling of Image on different platforms  
-<br>38433:  Editor titlebars are not painted  
-<br>21567:  GTK2: Text widget packing error with SWT.MULTI   
-<br>29534:  Override default behavior of 'F10' key  
-<br>35493:  OleClientSite hang  
-</blockquote>  
-
-
-<h2> SWT Build 3.0 007 - Tuesday June 3, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>  
-30810:  Umlauts  
-<br>38242:  Border width on Table incorrect - creates unwanted scrollbars  
-<br>36636:  StyledText - Printing could end pages twice  
-<br>38246:  swtexampessrc.zip is missing from distribution.  
-<br>38337:  GC.drawRoundedRectangle(...) method doesn't include the right and bottom edge  
-<br>38331:  Inconsistent handling of Image on different platforms  
-<br>36610:  Tracker behaviour wrong when resizing  
-<br>21191:  Decorations.setImage() could do a better job with masked images  
-<br>38221:  Index out of bounds from Combo.select()  
-<br>33359:  [JUNIT] Scrollbar tests fail  
-<br>33162:  [JUNIT]Slider setMinimum setmaximum and setThumb fail  
-<br>38076:  Combo doesn't calculate its size properly when only text is set.  
-<br>22222:  Eclipse not properly redrawing MDI shell titlebar text  
-<br>31839:  Flashing resize on GTK  
-<br>38077:  Junk left on the screen after closing a drawer in Logic Example  
-<br>35738:  problem with swt component bindings and XFree86-4.3.0  
-<br>35315:  Reset imageHeight on Tables while refreshing items  
-<br>17202:  inconsistent help hover placement  
-<br>23787:  [Properties dialog] Project Properties -> Info page should not use text fields  
-<br>4553:  Motif on KDE2: Things don't redraw (1GA4H7Z)  
-<br>4455:  DCR - Tree - need item positioning (1FGPVAF)  
-<br>4500:  Text widget has 3D effect although SWT.BORDER isn't specified (1FRSQXH)  
-</blockquote>
-
-
-<h2> SWT Build 3.0 006 - Tuesday May 27, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-24877: Cannot get file extension from swt FileDialog  
-<br>37874: "Jumping" layout  
-<br>34634: "Select a type" hierarchy view message cut off  
-<br>37941: Coolbar setMinimumSize introduces chevrons on Linux  
-<br>38015: Eclipse crashes when using inline outline (Ctrl+O)  
-<br>37623: fillRoundRectangle doesn't completely fill  
-<br>28535: rectangles with pensize > 1 draw at wrong position  
-<br>38055: Shell Title bar displayed when only SWT.REZISE.  
-<br>37858: Some SWT Labels draw text in white  
-<br>24700: Text: Compute Size error  
-<br>37950: Unable to launch Eclipse on Sun Solaris 2.8  
-<br>33164: [JUNIT] Scale setMinimum and setMaximum fail  
-<br>33166: [JUNIT]Combo setLocation fails  
-<br>33158: [JUNIT]ProgressBar setMinimum and setMaximum fail  
-<br>33080: [JUNIT]Shell.isMinimized() returns false after shell.setMinized(true)  
-<br>33079: [JUNIT]Shell.isVisible returns false after shell.setVisible(true) called  
-<br>33088: [JUNIT]TabFolder.setLocation or TabFolder.getLocation not working  
-<br>25278: context menu click does not change selection  
-</blockquote>
-
-
-
-
-<h2> SWT Build 3.0 005 - Tuesday May 20, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-30434:  BIDI: StyledText to support RIGHT_TO_LEFT orientation  
-<br>35657:  Eclipse crashes and throws exception when starting up in Chinese locales  
-<br>37505:  GC.setXORMode() not applying to drawString/Text (BBAWT)  
-<br>36934:  Invalid thread access error on creating a font in Motif (BBAWT)  
-<br>34648:  [DND] file deleted when dropped in editor on Solaris  
-<br>37479:  BIDI: Drop-down list of CCombo doesn't inherit it's orientation from CCombo.  
-<br>37498:  BIDI: rtl-oriented TableCursor set next column instead of previos and vice versa, when it uses right and left arrow keys.  
-<br>37519:  Bug in Decorations.setPlacement method  
-<br>35804:  Cheese in Text  
-<br>37164:  Crash when opening a MessageBox on a Text focusLost event  
-<br>37497:  Creating of new Image is failed in some cases.  
-<br>28525:  DragDetect required  
-<br>4734:  drawText() does not respect setXORMode(true) (1GFQI15)  
-<br>37138:  GC.drawImage throws Exception with boundary conditions (BBAWT)  
-<br>37140:  GC.drawImage throws SWTError with boundary conditions (BBAWT)  
-<br>37198:  gtk2 im - imhangul (korean IM) work bad in Eclipse  
-<br>21384:  GTK: Random X Window System "Bad Implementation" error(BBAWT)  
-<br>37591:  ImageLoader.save for GIF saves in compress GIF format  
-<br>33496:  Multi-line text issues too many mouse track events on Photon (BBAWT)  
-<br>34185:  Native Tree: Clicking into selection doesn't reselect  
-<br>28529:  ProgressBar direction wrong + cheese  
-<br>37564:  Remove dependency on X11 in Program  
-<br>37303:  Remove X dependency  
-<br>37881:  StyledText - NPE when using RIGHT_TO_LEFT style with StyledText on Linux  
-<br>36450:  [Key Bindings] Only KeyUp event for Alt+[Shift]+<char> on Windows  
-</blockquote>
-
-
-<h2> SWT Build 3.0 004 - Tuesday May 13, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-29783:  BIDI: drop-down list of rtl-oriented CCombo is displayed in the wrong place.  
-<br>37299:  BIDI:Caret cheese when resizing RIGHT_TO_LEFT StyledText  
-<br>37293:  BIDI:GC.drawImage(0, ... draws at 1, ... when using RIGHT_TO_LEFT
-<br>37285:  Add Tiff support  
-<br>34516:  Cheese in ProgressBar  
-<br>32352:  Display of SWT tabbed panes do not redraw during changes  
-<br>36649:  Error Icons Draw Through  
-<br>33083:  JUnit View not being updated early enough  
-<br>29332:  new GC(this) produces a GC that does nothing  
-<br>31011:  Paint example does not draw correctly  
-<br>27474:  Provide a SWT Java Web Start extension  
-<br>37172:  TableColumn align style has no effect on GTK  
-<br>31783:  Text doesn't honor visibilty  
-<br>29383:  Tree and Table - no gray check boxes on GTK  
-</blockquote>
-
-
-<h2> SWT Build 3.0 003 - Tuesday April 6, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-36993:  Tracing options not displayed in Run-time Workbench run configuration  
-<br>29781:  BIDI: Lack of leading and trailig styles for alignment of widget's contents.  
-<br>25623:  can't select items in Tree widget of local history  
-<br>27777:  Combo box pixel corruptions  
-<br>37102:  Eclipse doesn't start  
-<br>37076:  Gtk CRITICAL warning gtktreeview.c  
-<br>37202:  GTK Exception on gtk_progress_bar_set_fraction  
-<br>31941:  gtk_progress_bar_set_fraction - crash when creating a class under latest Debian GTK 2.2 / Crux Theme  
-<br>37075:  I20030429: no swt-carbon-3002 in java.library.path  
-<br>18701:  image check box buttons are clipped  
-<br>16814:  J2ME SWT - 3 classes not CLDC compliant  
-<br>19824:  Needed multi-monitor methods.  
-<br>37212:  Order sependencies in setting up menus  
-<br>28589:  RedHat 8.0 - DefaultInformationControl hangs workbench  
-<br>27202:  Running ControleExample with Device.DEBUG flag on  
-<br>37065:  Spacing bug in RowLayout  
-<br>31906:  The file dialog widget does not provide a way to programmatically change the type filter.  
-</blockquote>
-
-
-<h2> SWT Build 3.0 002 - Tuesday April 28, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-36910:  Setting font before setting text on Motif causes X error (BBAWT)  
-<br>29765:  BIDI: ToolTiptext do not have Right to left Reading order  
-<br>34365:  Display problem in the editor  
-<br>35319:  TVT21: Cannot input characters in German for motif   
-<br>36433:  Allow Cursors to be created with Images that have a depth >1  
-<br>36746:  An overloaded glCallLists() would be useful    
-<br>29786:  BIDI: keyborad's left and right arrows move focus between tabs of rtl-oriented CTabFolder in the opposite direction.  
-<br>36684:  BIDI: LTR-oriented MessageBox can't be created, if it's parent has RTL orientation.  
-<br>36679:  BIDI: PopupList can't be created with explicitly assigned orientation.  
-<br>29787:  BIDI: problem with keyboard's left and right arrows, when them used to expand or to collapse rtl-oriented TableTree.  
-<br>36276:  BIDI: When UpDown control of rtl-oriented TabFolder is used for scrolling tabs, they are scrolled in the wrong direction.  
-<br>36727:  Can't use OpenGL in a plugin  
-<br>22943:  Cannot cleanly kill an swt task  
-<br>36209:  Copied text to on the clipboard is occasionally null terminated  
-<br>34982:  Custom BusyIndicator - no hourglass cursor  
-<br>36928:  Custom cursors are not working  
-<br>36386:  Eclipse crashes on exit  
-<br>7440:  Glitch on Navigation Bar on PocketPC while closing j9 running SWT app  
-<br>36915:  java.lang.OutOfMemoryError when creating org.eclipse.swt.graphics.Image  
-<br>36838:  OpenGL: GLYPHMETRICSFLOAT cannot be internal  
-<br>36955:  ScrolledComposite unused background is painted wrong.  
-<br>36562:  [CVS] commit log dialog doesn't set focus correctly  
-</blockquote>
-
-
-<h2> SWT Build 3.0 001 - Tuesday April 22, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-<br>7757 Packages view: title and tooltip should not used compress...  
-<br>9366 Workbench appears with 1st toolbar item showing hover-ove...  
-<br>19228 Try to control motif focus reassignments  
-<br>19708 widgetIsDisposed for tootip text  
-<br>20279 Division by zero when showing a zero-sized tracker  
-<br>21283 Ctrl+/ performs undo, not comment, in emacs bindings  
-<br>23847 Keyboard navigation doesn't work on Mac  
-<br>24563 DBCS Support for Motif and GTK  
-<br>28530 Cheese when moving Sash  
-<br>28537 Task view help is wrong if previous focus was editor  
-<br>28561 Can't arrow around table  
-<br>28800 Switching to a not yet activated perspective doesn't set ...  
-<br>28850 setFont() on Text control has no (visual) effect  
-<br>29784 keyboard's left and right arrows change value of rt...  
-<br>29788 rtl-oriented Tracker has wrong behavior.  
-<br>32602 After pressing Cmd-F8, clicking will kill Eclipse  
-<br>32965 Move dialog: tree doesn't have focus  
-<br>33068 [JUNIT]Label.setAlignment not implemented  
-<br>33100 [JUNIT]Table.getChildren does not return an empty array  
-<br>33316 FontDialog needs FontData[] API  
-<br>33336 Popup menus dont work on PocketPC (bbAWT)  
-<br>33492 Addition of tasks to task window is too slow  
-<br>33809 Request: add new event SWT.MenuDetect  
-<br>33903 [SWT Examples] OLE Web browser view does not open  
-<br>34122 Control Example  
-<br>34270 Single-click in popups dismisses them (was: Quick F...  
-<br>34283 Mac: No task description for progress monitor in wizards  
-<br>34445 Reverse sort for AddressBook example  
-<br>34446 [Tasks] Focus lost when switching form editor to Tasks View  
-<br>34618 Missing keyboard focus  
-<br>34996 Tab Event weirdly handled in motif  
-<br>35012 Setting the toolbar's background on RC2 doesn't work.  
-<br>35090 Outline Popup: Enter doesn't work in tree  
-<br>35210 KeyListener doesn't understand CTRL and ALT as a stateMask  
-<br>35244 [Action Sets] Hierarchy fast view causes unhandled except...  
-<br>35254 Unhandled exception caught in event loop. Reason:Widget i...  
-<br>35607 Sash missing cursor in Structure Compare of the Sync view  
-<br>35774 Unexpected Exit: Error: Object "" does not have windowed ...  
-<br>35837 [DirectoryDialog] There is no disk in the drive. Please i...  
-<br>35842 Outline view crashes on WinXP & Win2K  
-<br>36000 [StyledText] ContentWidthCache initialization  
-<br>36192 Native crash when closing tree nodes  
-<br>36270 BIDI: Some custom widgets can't be created with explicitl...  
-<br>36612 After install/update: no icon in dock - no focus  
-<br>36644 Can not set the background color for ToolBar  
-<br>36722 Mnemonic keys are not working for ToolItems  
-</blockquote>
-
-
-<h2> SWT Build 2.1 033d - Monday March 24, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-8442: NullPointerException and hang on startup in GTK Eclipse  
-<br>17359: NLS: No Group2 input  
-<br>26078: TabFolder.getClientArea() not correct
-<br>34940: Eclipse launcher crashes on Sun J2SDK 1.4.2-beta build18  
-<br>35434: [Motif] GC.getFontMetrics() causes VM to crash when font is really small
-<br>35596: Event Processing issues under Photon
-</blockquote>
-
-
-<h2> SWT Build 2.1 033 - Tuesday March 18, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-30768:  Performance - Typing in Java Editor is unacceptably slow.  
-<br>32204: Signal 11 at at org.eclipse.swt.internal.gtk.OS.gtk_progress_bar_pulse(Native Method)  
-<br>32602: After pressing Cmd-F8, clicking will kill Eclipse  
-<br>33017: VM crash when pressing enter in table cell editor  
-<br>33343: New file wizard freezes Eclipse UI  
-<br>34166: Disabling, then enabling CVS decorators produced NPE  
-<br>34183: The layout of the package explorer cannot be changed  
-<br>34248: DBCS: shown up GnomeVFS-WARNING messages  
-<br>34418: Crash when running DNDExample  
-<br>34463: confirm exit checkbox cannot be selected  
-<br>35022: Motif does not send dragFinished event on aborted drags  
-<br>26388: Package Explorer does not position on files  
-<br>30073: Graphical Editor is not refreshed properly when scrollbars disappear  
-<br>31026: Hang on Linux  
-<br>32851: Can't remove external tool builder after deleting launch config  
-<br>33099: Context menu 'Display' doesn't work  
-<br>33713: JRE popup menu in Run configuration dialog not reliable  
-<br>34093: Menu missing items  
-<br>34428: [Motif] Tree and Table views not getting proper selection  
-<br>34633: Table with CHECK flashes cheese  
-<br>34815: Cheese in CTabFolder widget  
-<br>34879: Calling ScrollBar.setVisible() when a text widget has focus causes a focus lost event on the text widget
-<br>25671: Javadoc for class swt/widgets/Dialog missing <pre>
-<br>28644: Bold font in label results in missing character  
-<br>29486: Keys need stronger filtering.  
-<br>32424: [PROGRAMS} Gnome - Program.getPrograms needs to be updated  
-<br>32947: Change method signature dialog too big  
-<br>33480: Text cut off in Mac in labels.  
-<br>33700: Running out of handles on Windows XP  
-<br>33822: Strange scrolling of native table  
-<br>34036: Native crash on dismissing help window  
-<br>34512: ComputeSize of table and tree too small  
-<br>34569: BIDI: Styled text change the characters with Large fonts  
-<br>34649: TabFolder title does not handle mnemonics properly  
-<br>34724: ControlExample  
-<br>34835: Widget "default" styles should be reflected in style bits  
-<br>34935: Missing border on toolbar  
-<br>34983: Native drag and drop doesn't work under linux  
-<br>35038: Refactoring dialog (Extract Local Variable) to big  
-</blockquote>
-
-
-<h2> SWT Build 2.1 032c - Tuesday March 11, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4434:  GPF when running SWT Tree code (1FNI25V)  
-<br>23385:  Table vertical column separators redraw incorrectly on MacOSX  
-<br>31685:  Entire Eclipse Platform loses focus and goes into the background...  
-<br>33834:  [Viewers] NPE in TreeViewer  
-<br>34181:  Ctrl-Click doesn't select underlying item before bringing up context menu  
-<br>34188:  Progress bar in dialogs doesn't show task information  
-<br>34614:  Mouse pointer does not change in table header  
-</blockquote>
-
-
-<h2> SWT Build 2.1 032 - Thursday March 06, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-4592: multi select behavior for file dialog (1G7HZ2Q)  
-<br>4659: Double-clicking on fixed size column header resizes it (1GE3WN6) 
-<br>4843: EC DCR: Add keyboard support for multi-select to Tree (1GKMHS5)  
-<br>4847: Property dialog put behind workbench window (1GKRN9Z)  
-<br>7159: Missing Javadoc for Event fields  
-<br>7712: No scroll bars in Microsoft Word documents opened from the workbench  
-<br>12597: Cannot change OLE Event's VARIANT argument which has [out] directional attribute in IDL  
-<br>14329: Modal dialog doesn't disable column resizing  
-<br>16886: Address Book bug in the open a File dialog  
-<br>16901: NPE removing expression from expression view  
-<br>18059: RH7.3 clipboard problem  
-<br>18810: Extra unprintable character in copy buffer  
-<br>19896: Key up event says Ctrl is released when it's not  
-<br>19922: Menu bar items get added one at a time when editors are switched  
-<br>22416: NT4: Need context menu on window scroll bar to keep its consistency on Win2k  
-<br>23419: [OLE] Do not get scrollbars in Excel  
-<br>23841: Eclipse UI does not follow Mac L&F guidelines  
-<br>23959: Use native Table and Tree  
-<br>24393: DCR - Need to support Mac command key in SWT  
-<br>24431: Eclipse M1 Under OSX crashes when using VirtualDesktops  
-<br>25383: Variant needs a dispose method  
-<br>25604: Quick release upon start of drag hangs eclipse with pointer grab  
-<br>26051: [Workbench] Main Eclipse window activates itself very often  
-<br>28514: Character positions differ between selected and unselected text 
-<br>28982: Toolbar color problem when using the manifest in XP  
-<br>29027: Add "delete previous word" and "delete next word" actions to eclipse editor  
-<br>29330: JavaDoc does not match Windows - FIX LEFTTORIGHTdoc  
-<br>29387: no lines in Table on GTK  
-<br>29471: GP - XtDestroyApplicationContext - Closing M4 will sometimes crash the VM  
-<br>29717: [PERFORMANCE]SWT Motif exteremely slow with LANG en_US.UTF-8  
-<br>29814: GP - No core available - GPF on win2k  
-<br>29911: TableEditors not displayed while scrolling.  
-<br>30427: HANG/GP - XtDispatchEvent - Eclipse keeps locking up  
-<br>30618: ctrl-o not working  
-<br>31525: eclipse uses 100% CPU with gtk 2.2.1  
-<br>31684: Unable to drag views.  
-<br>31717: Unreproducible GP/Hang  
-<br>31834: Label and Combo don't align well  
-<br>32122: Cannot insert lines into new file code template (regression failure) 
-<br>32286: ControlExample Button Tab - changing styles resets button orientation  
-<br>32359: No Parent + SWT.APPLICATION_MODAL shell not modal  
-<br>32408: I20030220 on MacOS X has generic application icon  
-<br>32482: No F1 help on MacOS X  
-<br>32734: NPE while viewing variables from debugger  
-<br>32856: [Cell Editors] Can not see what value I am typing in the Properties 
-<br>32954: [KDE] Programs - fix library build  
-<br>33046: DBCS: Can type into read-only Text  
-<br>33057: RC1 No caret in editor  
-<br>33348: ControlExample: wider than screen, too many tabs  
-<br>33580: Scrollable.WM_MOUSEWHEEL uses wrong variable for horizontal scroll  
-<br>33590: RC1: "Application Modal" shell style behaves incorrectly  
-<br>33592: Fix specification for event.character  
-<br>33593: RC1: Toolbar foreground color changes ignored  
-<br>33747: NO_TRIM window gives no resize feedback  
-<br>33776: Resistering TraverseListenter with Shell changes tabbing behavior.  
-<br>33813: List doesn't send out selection events for arrow keys  
-<br>33855: Text Cursor Invisible in RC1  
-</blockquote>
-
-
-<h2> SWT Build 2.1 031 - Thursday February 27, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-16808: Icon in Windows taskbar incorrect  
-<br>24494: Incorrect i18n char encoding in text areas  
-<br>26541: Exit the Workbench: crash after saving the workspace  
-<br>28643: Setting label's background color has no effect  
-<br>28845: Refresh tab layout incorrect for lower composite  
-<br>29198: Difficult to change character case of cached input values  
-<br>29837: [Contributions] Combo control does not show on GTK toolbar, works fine on Win and Motif  
-<br>30377: No caret in Java Editor  
-<br>30905: Add Menu.setRedraw(boolean) API  
-<br>30924: StyledText - StyleRange hashCode throws NullPointerException  
-<br>31039: Eclipse does not responde when dialog is opened.  
-<br>31187: Selection by mouse drag is out of kilter  
-<br>31382: New Folder and New File dialogs UI problem  
-<br>31833: wrong background for separator label on MacOS X  
-<br>31857: No icons in Labels  
-<br>31866: Scrolling in Readme editor is delayed  
-<br>31946: Moving CoolBarItems leaves temporary cheese  
-<br>31950: StyledText - Shift+UP broken in StyledText control  
-<br>31973: GB18030: After created a GB18030 named class, Eclipse for Motif crashed when exiting.  
-<br>32360: Embedded display not waking on new Photon events (BBAWT)  
-<br>33022: NPE in FontDialog  
-<br>33030: Arguments tab 'shows through' Main tab on OS X  
-<br>33063: [JUNIT] Caret.setFont  
-<br>33119: nullpointer dispose table column  
-</blockquote>
-
-
-<h2> SWT Build 2.1 030 - Tuesday February 18, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-17057: Outliner: focus causes select causes horizontal scroll  
-<br>21469: Accessibility - Tabbing causes a button to become the default
-<br>22767: toolbar looks very ugly with Win XP's lnf (using manifest file)
-<br>23370: CLabel needs to allow transparent background for Mac OS X  
-<br>28831: Displays ligature for fi & fl  
-<br>29100: Mouse wheel scrolling not working in editors  
-<br>29879: HANG - gtk_main_iteration - Eclipse Freezes moving between perspectives
-<br>30055: DBCS: font rendering quality issue on motif  
-<br>30570: DBCS - GB18030: Input GB18030 characters as run arguments cause eclipse for motif crash
-<br>31568: TableLayoutComposite and Table.showItem don't mix  
-<br>31686: Wrong margin correction in widgets.Text.computeSize(int, int, boolean)
-<br>31823: Clicking on partially obscured tab should scroll it into view
-<br>31855: [Editor Mgmt] Close buttons in editor get cut off  
-<br>31880: Layout bug in commit menu  
-</blockquote>
-
-
-<h2> SWT Build 2.1 029 - Thursday February 13, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-6230: ImageLoader: 32-bit colour depth unsupported  
-<br>23472: Xlib: unexpected async reply (sequence 0x922d2)!  
-<br>23842: "banded" default background look shows through where it shouldn't
-<br>25446: Tree Shift-Click not working when item collapse changes selection
-<br>26381: OpenType: Key Navigation  
-<br>29456: GP - XmDSIGetChildPosition - Problem in Shutdown  
-<br>29607: [Cell Editors] usability: ComboBoxCellEditor unusable on GTK  
-<br>31009: ACC - I20030205 accelerators issues  
-<br>31017: HANG - Hang on import external plugins  
-<br>31267: Label and text box get the wrong order  
-<br>31448: BIDI - Bidi enablement for StyledText - ArrayIndexOutOfBoundsException when highlighting a blank line
-<br>31513: CTabFolder's close box highlight gets clipped at bottom  
-<br>31566: FontData "equals()" and "hashcode()" methods do not consider height of the the fontdata
-</blockquote>
-
-
-<h2> SWT Build 2.1 028 - Thursday February 6, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-23262: WebBrowser crashes when viewing Shockwave  
-<br>25736: Memory leak while using OLE automation  
-<br>29265: Control.setEnabled() not implemented properly on GTK  
-<br>29593: Contextual menu too short near bottom of menu  
-<br>29931: Mouse clicks are unreliable  
-<br>30403: CTabItem close box shifts by 2 pixels when tab selected  
-<br>30443: Menubar of SWT standalone applications is empty  
-<br>30945: Change in mouse clicking behaviour makes FastViews unusable  
-</blockquote>
-
-
-<h2> SWT Build 2.1 027 - Wednesday February 5, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-20755: TVT2:  truncated text in dropdown for Dependencies tab in manifest editor
-<br>22759: Input method does not work on GTK/GTK2  
-<br>27180: Unable to copy and paste in editing java file  
-<br>27183: Mouse drag select produces crash  
-<br>28419: Crash when closing shells  
-<br>29777: DBCS: Can't drag a file into Run-time workbench  
-<br>30212: Read only text widget : can't copy selection  
-<br>30401: SWT standalone examples can't come to foreground  
-<br>30452: Mouse gets warped to upper left corner of workbench window on actions
-<br>30500: "roaming" focus  
-<br>30537: setSelection(allItems) not working on GTK  
-</blockquote>
-
-
-
-
-<h2> SWT Build 2.1 026 - Tuesday January 28, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-14814: Button mnemonics are not shown properly on Windows XP  
-<br>24333: DCR - Tree.getTopItem/setTopItem  
-<br>24489: Tab cannot get focus when child-composite has scrollbar  
-<br>24815: Cannot launch eclipse: javacore dump  
-<br>29142: Hyperlinking from stackdump locks up Eclipse  
-<br>29191: Tree - no gray check boxes on MAC (carbon2)  
-<br>29426: DBCS:Copy/Paste DBCS failed between eclipse and gedit  
-<br>29428: DBCS: Pasted string can't be shown correctly in Search dialog
-<br>29910: Checkbox not displayed until table scrolled  
-<br>29966: No more handles on startup  
-</blockquote>
-
-
-<h2> SWT Build 2.1 025 - Tuesday January 21, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-25030: (BBAWT) Image Analyzer fails to load a .png file  
-<br>25359: RuntimeExceptions thrown from OleListener.handleEvent crash VM
-<br>27099: StyledText - Change CTRL key bindings to MOD1  
-<br>27369: No more handles error  
-<br>27822: Package Explorer allways centers opened file  
-<br>28062: Text field in dialog doesn't get focus  
-<br>28743: Trying to see test hiearchy freezes eclipse [JUnit]  
-<br>28745: Esc does not cancel tracker  
-<br>28967: [Editor Mgmt] no close button on last editor when editors drop-down is active
-<br>29427: DBCS: Can't input DBCS characters in Search dialog  
-<br>29496: Cut & paste does not work in dialog text fields  
-<br>29503: DBCS:Can't sort by clicking "Description" on "Task View"  
-<br>29599: DBCS: upper bar character will be padded  
-<br>29608: DBCS: Selected DBCS Classpath can't be shown  
-<br>29611: DBCS:Can not input Hangul(Korea font)  
-<br>29612: DBCS:Browse function of "Export" doesn't work  
-<br>29614: DBCS: Unable to get "Import" contents location with "Browse" button
-<br>29664: SWT Styled Text Wrapping Doesn't Use Font Size Correctly  
-<br>29685: DBCS: Candidate Selection Window will be disappeared at DBCS composition
-<br>29730: RowLayout.computeSize provides wrong parameter to layoutVertical
-</blockquote>
-
-
-<h2> SWT Build 2.1 024 - Tuesday January 14, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-21063: Can't drop views over some widgets  
-<br>21561: Keyboard navigation in tree widgets on Linux  
-<br>25619: OleControlSite event listener problem  
-<br>25843: Info pops do not work for Red Hat 8.0.
-<br>27677: [Key Bindings] ctrl-f7 not working  
-<br>28879: [Navigator] right-clicking a file doesn't allow me to open it
-<br>29208: Gtk directory dialog behaves like a file dialog  
-<br>29252: Accelerators are not disabled when the toolbars and menus are on GTK
-<br>29302: Slider and Scrollbar handle many boundary cases wrong in set* methods
-<br>29334: Make javadoc available for download  
-<br>29408: Invoking List.select(*) before open() does not select correct item
-</blockquote>
-
-
-<h2> SWT Build 2.1 023 - Tuesday January 7, 2003 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-24283: Default button in the dialog get the enter when typing in japanese
-<br>25486: Eclipse fails with 'no free callback slot'  
-<br>26057: StyledText - cleanup passing around of fontdata  
-<br>26079: Use PfLoadMetrics() to speed up text extenting
-<br>27869: StyledText overuse of Font.getFontData  
-<br>28286: BBAWT: Incorrect palette/color returned on 32-bit true color display
-<br>28382: Extra separator line drawn in emulated CoolBar  
-<br>28498: Help menu is confused  
-<br>28607: Progress bar doesn't finish in PDE import wizard  
-<br>28658: No context menu in perspective bar  
-<br>28683: Ctrl-Click in TreeView loses selection  
-<br>28701: Method "assert" declared in org.eclipse.swt.tests.junit.StyledTextContentSpec
-<br>28719: Scrolling in Welcome editor is not 'live'  
-<br>28812: Mouse cursor changes to arrow after hovering a hyperlinked indentifier
-<br>28833: Eclipse no longer responds to 'Quit' AppleEvent  
-<br>28835: Cursor doesn't change to arrow shape when over text scrollbars
-<br>28991: TabFolder.computeSize is grows each time is it called  
-<br>29017: ScrolledComposite always makes it's content  bigger on resize
-</blockquote>
-
-
-<h2> SWT Build 2.1 022 - Tuesday December 17, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-21409: IllegalArgumentException when editing Java source  
-<br>21993: Can't change font sizes  
-<br>22305: Launch configuration pane gets visually messed up and ref...  
-<br>23830: Out-of-box experience with the Mac.  
-<br>23843: Chevrons show up in default layout of Java perspective  
-<br>23844: Label doesn't wrap text initiallly  
-<br>23850: Missing scrollbar in List  
-<br>24437: KeyListeners don't get called  
-<br>26322: NPE in Font Dialog  
-<br>26331: Wrapped Labels - second line cut off  
-<br>26587: Navigate -> Go To Type goes to wrong shell on Mac  
-<br>27997: Color dialog crashes Eclipse  
-<br>28288: [Editor Mgmt] Editor pane out of sync with views and tabs  
-<br>28361: ToolItem leaks Images (?)  
-<br>28524: Inconsistent behaviour of tab in password fields  
-</blockquote>
-
-
-
-
-<h2> SWT Build 2.1 021 - Friday December 13, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-27526: Color selection dialog takes a long time to display in 8-bit mode
-<br>27862: Tree.setSelection() takes > 1 second  
-<br>28035: Different callback behavior on Windows and Mac with Combo widget
-</blockquote>
-
-
-<h2> SWT Build 2.1 020 - Tuesday December 10, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-24112: Keyboard shortcuts defined as Ctrl-Shift-x don't work  
-<br>24436: Entering Asterisk crashes Eclipse  
-<br>26506: Importing External Plug-ins is slow  
-<br>27031: en_US.UTF-8 locale not supported on Motif  
-<br>27410: [SWT Examples] Arrow buttons won't resize for 10x10,50x50,100x100
-<br>27422: [SWT Examples] Progress bar reverts to 'black' color after Selection slider repositioning
-<br>27501: Selection not correctly updated on right click on a tree  
-<br>27524: [SWT Examples] Table item foreground color changes fail after first attempt
-<br>27644: Dismissing open type dialog with Escape crashes Eclipse  
-<br>27704: Remove csh build dependency  
-<br>27710: Entry point not found SetLayout in GDI32  
-</blockquote>
-
-
-<h2> SWT Build 2.1 019 - Tuesday December 3, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-19080: Chaff in table tree of property sheet  
-<br>20318: [StyledText] print selection prints whole page (at least in <=f2)
-<br>26563: Crash in Carbon native CopyMask  
-<br>26731: Attempting to create a view plug-in project crashes  
-<br>27181: Sleak - instrumentation not done on GTK and Motif  
-<br>27305: EC: CLabel keeps background colour after gradient is used  
-<br>27411: [SWT Examples] SWT.FLAT has no effect for buttons  
-<br>27442: Mouse click outside horizontal scroll bar does nothing  
-</blockquote>
-
-
-<h2> SWT Build 2.1 018 - Tuesday November 26, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-<blockquote>
-15031: Font parsing failed  
-<br>17237: Progress monitor flickers  
-<br>18172: Sig11 from GTK  
-<br>19530: Saving locks resizing in second perspective  
-<br>19735: No space between longest item in menu and accel keys  
-<br>20953: StyledText - tilde problem with french keyboard (2000,NT,XP) on R2.0
-<br>21626: TableItem.getImageBounds fails on Motif (Emulated Widget)  
-<br>24872: Splash screen does not show at startup  
-<br>24969: JP GP: showing Java-Editor pref. page with editor open  
-<br>25053: Cannot use the pull down menu in GTK  
-<br>25335: Scrollbars too small on variable selection dialog  
-<br>25653: DCR: StyledText do not activate the default button  
-<br>26179: Can't select items in a checkbox tree without toggling checked state
-<br>26353: Infopop broken on solaris  
-<br>26362: StyledText - investigate necessary state changes between handleTextChanging and handleTextChanged
-<br>26733: Eclipse crashes when GTK theme is changed  
-<br>26804: Gtk Label widget has focus decoration drawn too big  
-<br>26935: Exception in StyledText with WRAP flag.  
-<br>26997: StyledTextRenderer: creates too many Strings  
-<br>27016: Default "Open" action not working in Navigator tree view
-</blockquote>
-
-
-<h2> SWT Build 2.1 017 - Tuesday November 19, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-21251: Crash in org.eclipse.swt.internal.gtk.OS.pango_layout_set_font_description
-<br>24835: GTK: Multiple selection and right click in tree  
-<br>25741: StyledText does not set the background and foreground color in the OS
-<br>25803: StyledText should use new Font API  
-<br>26004: Removing a Text field leaves behind crud  
-<br>26008: [StyledText] setTopPixel limits argument to logical line count
-<br>26121: Cannot launch eclipse #2: javacore dump  
-<br>26151: SWT widget org.eclipse.swt.widgets.Sash is not properly constrained when in HORIZONTAL mode
-<br>26258: Accented characters bug in editors reinvented  
-<br>26367: NPE when debugging as java application  
-<br>26414: Accelerators don't work on aix  
-<br>26419: StyledText - print pages causes walkback  
-<br>26421: List hangs on GTK  
-<br>26434: PrinterData startPage/endPage invalid when page >32767  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-19+22%3A10%3A42+%2B0000;chfieldto=2010-05-20+20%3A30%3A58+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3648b - Thursday May 20, 2010</h2>
 
-<h2> SWT Build 2.1 016 - Tuesday November 12, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-23935: Text widget with Tree parent does not lose focus  
-<br>23997: Tracker moves mouse cursor  
-<br>24493: Cant type braces in java editor with italian keyboard in 2.1m1
-<br>25732: MLEAK: Resize eclipse, usually 4K allocated  
-<br>25775: Combo doesn't get restored after minimize/restore  
-<br>25781: Some change broke compare with patch  
-<br>25797: GTK: Selection Index not preserved after Combo item removal  
-<br>25986: No source for SWT plugin imported as binary  
-<br>25989: Radion buttons are not mutually exclusive in same composite  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-18+22%3A13%3A43+%2B0000;chfieldto=2010-05-19+22%3A06%3A48+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3648a - Wednesday May 19, 2010</h2>
 
-<h2> SWT Build 2.1 015 - Tuesday November 5, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4607: Missing API for Font(Display display, FontData fd[]) (1G93TPM)
-<br>14956: StyledText - printing should support pagination, headers, and footers
-<br>21695: Crash when starting eclipse on Solaris8 with java 1.4  
-<br>22052: Launch configuration dialog loses workspace data dir  
-<br>23049: Cannot write Swedish characters (??????????????????) in editor  
-<br>24273: GP -Tree removeAll reboot windowsXp  
-<br>24359: MenuItems with style SWT.RADIO should handle mutual exclusion on selection
-<br>24757: GTK: X pointer grab when resizing a table column  
-<br>25212: GPF synchronizing files with new Tree implementation  
-<br>25253: Preference dialog doesn't display last preference page  
-<br>25399: Drag and drop crashes Eclipse  
-<br>25545: StyledText - printing ignores end page  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-17+21%3A14%3A28+%2B0000;chfieldto=2010-05-18+22%3A09%3A50+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3648 - Tuesday May 18, 2010</h2>
 
-
-
-<h2> SWT Build 2.1 014 - Tuesday October 29, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-10090: Cannot see Combo-box selection in DBCS locale  
-<br>12078: SWT exception when running on debian woody on KDE using the motif build
-<br>14448: Setting the accelerator of a menu item gives highlight to tool bar entries
-<br>17361: Tree flickers on update  
-<br>17428: Internal Error (SWT) opening a new perspective by double-clicking
-<br>20075: Infopop exhibits strange behaviour under Motif  
-<br>21066: Switch editors/views/perspectives windows have scrollbars  
-<br>21121: [External Tools] Configuration default selection could be better on GTK
-<br>21375: Reproducible JVM termination when using WebDAV.  
-<br>21656: GTK: disposing all the columns in table.getColumns fails  
-<br>22038: Wrong widget scrolls in Java Browsing perspective.  
-<br>22120: Excessive redraw in debug view  
-<br>22252: Project properties - java build path screen shows artifacts  
-<br>22371: Invalid selection items in working set  
-<br>22527: Working set dialog only selects projects  
-<br>22743: Type dialog horizontal scroll too small to read contents  
-<br>23657: Problems implementing MenuItem.setText (worked around for English)
-<br>23789: GTK tree display problem  
-<br>23845: Spurious scrollbar drawn on other controls  
-<br>24150: Shift-Tab does not shift left  
-<br>24257: Native exception when trying to export preferences  
-<br>24314: FileDialog doesn't allow to navigate into packages  
-<br>24372: StyledText - StringIndexOutOfBoundsException in ControlExample
-<br>24426: StyledText - investigate replacing caretLine with simpler concept
-<br>24504: StyledText - showSelection when selection RtoL problem  
-<br>24619: DCR - State mask not set in MouseTracker.mouseHover  
-<br>25016: [Viewers] Double click not working when item already selected
-<br>25149: StyledText - WrappedContent API does not check line index range
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-13+17%3A06%3A15+%2B0000;chfieldto=2010-05-17+21%3A10%3A36+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3647a - Friday May 14, 2010</h2>
 
-<h2> SWT Build 2.1 013 - Tuesday October 22, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-20377: StyledText - SWT.WRAP style and widthHint specification  
-<br>22986: SWT Controls Combo box Colors selection tool does not change foreground color
-<br>24728: StyledText Enter/Ctrl-Enter VerifyEvent inconsistencies  
-<br>24805: ComputeSize issue  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-12+22%3A43%3A25+%2B0000;chfieldto=2010-05-13+17%3A02%3A24+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3647 - Thursday May 13, 2010</h2>
 
-<h2> SWT Build 2.1 012 - Tuesday October 15, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-16657: [Open Modes] Search results doesn't respond to double click  
-<br>17334: Icon missing in check box tree  
-<br>17918: Tree widgets with multiple entries  
-<br>18902: PgUp key causes items to be selected in tree widget under GTK  
-<br>20258: [CVS] Esc key doesn't work on Commit Dialog  
-<br>21367: Display problem in the properties view  
-<br>21438: Java core dump in gtk_ctree_get_node_info  
-<br>24560: Ctrl+shift doesn't traverse word  
-<br>24676: StyledText - double click word select and caret placement  
-<br>24677: 32 bit image fails with a certain mask  
-<br>24702: WinCE: Image 32bits is incorrect  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-10+22%3A24%3A22+%2B0000;chfieldto=2010-05-12+22%3A39%3A37+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3646a - Tuesday May 11, 2010</h2>
 
-<h2> SWT Build 2.1 011 - Tuesday October 8, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4822: Group size doesn't seem to consider group name (1GJYIWB)  
-<br>10019: Right clicking in a list box should select before popping up menu 
-<br>17160: Task List: missing icon  
-<br>18842: Cheese when scrolling after deleting row in table  
-<br>19773: Coolbar icons in Windows XP with Luna theme are not vertically aligned
-<br>20094: Layout problems using StyledText with word wrap in a ScrolledComposite
-<br>23978: Horizontal scrollbars in tables and trees don't scroll page-wise
-<br>24225: DragSourceAdapter incorrect JavaDoc  
-<br>24358: Incomplete JavaDoc on MenuItem.setText  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-07+21%3A57%3A20+%2B0000;chfieldto=2010-05-10+22%3A20%3A34+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3646 - Saturday May 08, 2010</h2>
 
-<h2> SWT Build 2.1 010 - Tuesday October 1, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-10459: I can't run eclipse  
-<br>19148: Tooltip pops up underneath code completion alternatives in F2
-<br>20672: Shift+F10 has wrong keyCode  
-<br>21287: Uncaught exception hanging Eclipse  
-<br>22615: [Dialogs] Native ProgressBar look does not match look of AnimatedProgress
-<br>22645: StyledText - cheese when typing in SWT.SINGLE mode  
-<br>23645: Disabled default button can still be reached pressing ENTER  
-<br>23846: Initial font height of text field is wrong  
-<br>23851: Initial text in Text control is scrolled out of visible area  
-<br>23910: CTabFolder selected tab loses synch with its contents  
-<br>23936: NPE in ControlExample  
-<br>23947: Menu implementation prevents KeybindingMenu from working correctly
-<br>23975: No keyboard shortcuts displayed in menu items  
-<br>23976: Function keys must be pressed twice  
-<br>24000: No scrollwheel support for Mac OS X  
-<br>24055: No more callback exception hang Eclipse  
-<br>24088: File chooser for OSX returns wrong path  
-<br>24106: Table Column Resizable Doesn't work if you click on Column itself
-<br>24137: Top item on popup is often invisible  
-<br>24139: Copy causes exception  
-<br>24141: Keyboard not functional in editors (mac os x)  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-05-04+02%3A09%3A27+%2B0000;chfieldto=2010-05-07+21%3A53%3A32+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3645 - Tuesday May 04, 2010</h2>
 
-<h2> SWT Build 2.1 009 - Tuesday September 24, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-7435: ArrayIndexOutBoundsException occurs when using Solaris through remote terminal
-<br>15146: Printing support under Linux?  
-<br>18483: IE6 causes conflict with SWT.APPLICATION_MODAL on Windows 98  
-<br>20461: WinCE - Wait cursor does not show up  
-<br>20958: Eclipse crashes when pasting PDF text into a Java file editor
-<br>21416: Gtk+ launcher  
-<br>22121: Eclipse crashes when pasting URL in Java-code  
-<br>23007: [Navigator] Import of workspace folder into parent  
-<br>23744: Device.getFontList() uses wrong constant name  
-<br>23745: Wrong flag used in Device.getFontList().  
-<br>23748: Input group is hardcoded as 1 in PhWindowQueryVisible()  
-<br>23753: Groups don't look like the platform  
-<br>23754: Label.setFont() needs to check "text != null"  
-<br>23766: Labels with image only have extra space on GTK  
-<br>23795: ControlExample: Image Label leaves cheese when resized  
-<br>23807: Display class needs to pick better default fonts.  
-<br>23864: CoolBar - Plus 2, Minus 2 problem  
-<br>23884: WinCE - OS.InitCommonControlsEx fails with flag DATETIMEPICK_CLASS
-<br>23898: Group.setBackground() don't work on Gtk  
-<br>23899: CTRL + Mouseclick  
-<br>23974: Use native ComboBox  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-29+15%3A15%3A36+%2B0000;chfieldto=2010-05-04+02%3A05%3A42+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3644b - Friday April 30, 2010</h2>
 
-<h2> SWT Build 2.1 008 - Tuesday September 17, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4637: TreeEditor example does not show how to use double click (1GCP6OH)
-<br>4656: Pop-up menu not showing for Composite (1GENYM0)  
-<br>4710: Remaining Javadoc problems (1GF088W)  
-<br>4730: Support for lesstif on Linux  
-<br>4733: Issues with Win32 GDI setBkMode(), and similar things in Motif (1GFPGK3)
-<br>4796: DCR: keyboard support for move/resize (accessibility issue)  
-<br>5900: CheckboxTableViewer does disable correctly  
-<br>10532: DCR: Table.setSelection(int, int) -- order matters  
-<br>12048: NPE exiting workspace  
-<br>16700: Coolbar tab order is backwards  
-<br>17494: Veronika needs to check her javadoc  
-<br>19256: SIP event  
-<br>19736: Tooltips for long entries in code assist pop behind code assist
-<br>21126: Print Dialog Is Not Modal, Resulting in Unpredictable Workbench Behavior
-<br>21620: FontData.setLocale() crashes workbench  
-<br>22189: Win32 GDI Resource Leak in WrappedContent.java  
-<br>22210: Photon:Removing item from Combo does not remove the text(BBAWT)
-<br>22364: Incorrect height of widget in TextViewer  
-<br>22490: Background color of Graphical Editors is always black.  
-<br>22534: No way to turn border off for linux text widget  
-<br>22564: Cannot draw transparent PNG files properly  
-<br>22577: List.setSelection(String[]) infinite loop  
-<br>22839: When swt window in focus palettes of other windows hosed, and vise versa
-<br>22862: StyledText - Tab does not tab out of non-editable  
-<br>22926: Clipboard copy/paste is cut/paste on Windows 98  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-28+21%3A48%3A11+%2B0000;chfieldto=2010-04-29+15%3A11%3A50+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3644a - Thursday April 29, 2010</h2>
 
-<h2> SWT Build 2.1 007 - Tuesday September 10, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-10050: StyledText - Change selection color when changing background color
-<br>14637: StyledText - copy-from text edit feature  
-<br>16009: Eclipse's toolbar buttons' icon in black and upside down  
-<br>17793: Motif FileDialog often does not use reasonable default directory  
-<br>20179: Coolbar item clipped on bottom edge with SWT.BORDER style  
-<br>21185: GTK: Label positioning incorrect when style bit used and bounds set(BBAWT)
-<br>22079: StyledText - BidiUtil.isBidiPlatform returns true when not running with bidi locale
-<br>22114: * key expands TableTree but does not send SWT.Expand event  
-<br>22115: MessageDialog does not wrap message  
-<br>22158: getItem() crashes eclipse called with index 0  
-<br>22647: Variant class incorrectly marshals VT_BOOL values  
-<br>22746: Text cut off in GTK in TitleAreDialog  
-<br>22868: Eclipse hangs while creating a shell from ControlExample  
-<br>22874: 2104: Converter contains references to Converter.class  
-<br>22916: CCombo not dropping down list properly  
-<br>22918: Table.getItem(Point) throws ArrayIndexOutOfBounds  
-<br>22959: Dragging over multiple stacked trees uses invisible tree for drop target
-<br>22978: Motif FileDialog ignores SWT.MULTI bit  
-<br>23003: Xcopyplane requires 11 args but HP-UX JRE can only handle 10  
-<br>23028: EC: Tab un-indent does not work  
-<br>23061: 'Back' key does not delete character on Smartphone 2002  
-<br>23178: Eclipse Fails to Start First Time  
-<br>23285: Linux Motif has become extremely slow  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-27+22%3A45%3A53+%2B0000;chfieldto=2010-04-28+21%3A44%3A30+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3644 - Wednesday April 28, 2010</h2>
 
-<h2> SWT Build 2.1 006 - Tuesday August 27, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-5678: TVT: Unable to open Filter dialog on Win98 if another view is undocked (free floating)
-<br>12878: Combo setItems removes setText  
-<br>13024: Two tooltips displayed on tree  
-<br>14923: Show Text Hover toolbar item in wrong place  
-<br>16333: Accessibility - tab key in dialog boxes  
-<br>20321: Multiple opened ApplicationWindows with statuslines show incorrect display/event handling
-<br>22231: Pressing ENTER in a text field no longer performs OK in dialogs
-<br>22659: Function key events are often lost
-<br>22661: StyledText - Shift+Alt+<character> inserts character  
-<br>22721: Cannot use keyboard to toggle checkboxes  
-<br>22737: Mouse Capture on Motif causes Context Menu not to work  
-<br>22825: Consecutive vertical cursor movement commands don't retain column offset
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-22+21%3A55%3A32+%2B0000;chfieldto=2010-04-27+22%3A42%3A14+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3643 - Friday April 23, 2010</h2>
 
-<h2> SWT Build 2.1 005 - Tuesday August 20, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4554: Combo selection scrolls for certain fonts (1G1AD9Y)  
-<br>4577: Ctrl+Backspace & Ctrl+del have the same key code and key event (1G54RAJ)
-<br>4685: Variables View re-positions on each step (1GETE8F)  
-<br>10091: MessageBox loses activation  
-<br>10976: Workbench windows don't reopen correctly in Dual Monitor environments
-<br>14942: Unexpected KeyDown event after pressing non existing menu mnemonic
-<br>18705: Too much flashin in Control Example  
-<br>21829: API needed to allow CCombo to display its list at the prefered width
-<br>22443: OLE - org.eclipse.swt.internal.ole.win32.CONTROLINFO has a useless field 'filler'
-<br>22457: Win32 org.eclipse.swt.widgets.Combo computeSize() is wrong  
-<br>22507: Modal dialog does not prevent adjusting of table headers in parent.
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-19+22%3A37%3A12+%2B0000;chfieldto=2010-04-22+21%3A51%3A53+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3642 - Tuesday April 20, 2010</h2>
 
-<h2> SWT Build 2.1 004 - Tuesday August 13, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4737: Redraw problem in table (1GFW2PE)  
-<br>9075: Tooltips only partially displayed in Hoverhelp.java example  
-<br>15610: StyledText - Double-Click-Drag doesn't work, works on Text  
-<br>16990: ToolBar does not send MouseHover events  
-<br>20632: Polish national fonts  
-<br>20792: sometimes resize callback is not sent to the shell when the shell is not visible
-<br>20815: Menus not displayed on SmartPhone 2002  
-<br>21268: StyledText - Ctrl+Shift+J inserts line  
-<br>21272: StyledText does not support setting selection with caret on the left
-<br>21921: Emulated Table setTopIndex fails and causes NPE when adding an item afterwards
-<br>21933: TableColumn does not listen to ControlEvents  
-<br>22004: no keyboard shortcuts for switching between pages of MultiPageEditorPart
-<br>22188: StyledText - only first character of a line displayed  
-<br>22204: Photon: Text.selectAll() does not select all the text(BBAWT)  
-<br>22254: Command H is not mapped properly  
-<br>22365: SWT_AWT does not compile under JDK 1.4  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-12+21%3A52%3A23+%2B0000;chfieldto=2010-04-19+22%3A33%3A35+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3641 - Tuesday April 13, 2010</h2>
 
-<h2> SWT Build 2.1 003 - Tuesday August 6, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4521: Display.syncExec or Display.asyncExec can block processing of native events (1G03DF0)
-<br>20144: Enter key not working in packages view  
-<br>21179: Step filter in-place text editor invisible  
-<br>21243: Scroll lock inserts a character during incremental search on GTK
-<br>21338: Accents and ??????? don't work in editor using gtk  
-<br>21472: keyPressed event ignored by org.eclipse.swt.widgets.Text for ENTER key
-<br>21696: StyledText - RTF transfer codepage encoding  
-<br>21698: StyledText - RTF writer performance improvement  
-<br>21834: Coolbar - deleting items corrupting layout  
-<br>22004: No keyboard shortcuts for switching between pages of MultiPageEditorPart
-<br>22025: Motif: Unexplained termination running BBAWT JUnit tests  
-<br>22036: MOTIF: Appearance issue with Combo  
-<br>22060: StyledText - bidi - ArrayIndexOutOfBoundsException  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-04-05+22%3A02%3A08+%2B0000;chfieldto=2010-04-12+21%3A48%3A50+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3640 - Tuesday April 06, 2010</h2>
 
-<h2> SWT Build 2.1 002 - Tuesday July 30, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4578: Ctrl+J & Ctrl+Enter have the same key code (1G54RJJ)  
-<br>4816: TabItem displays & (1GJL704)  
-<br>6888: Combo sends ModifyEvent on setItems  
-<br>9025: OLE, StyledText widget and WinCE  
-<br>19632: Tracker should adjust cursor on mouse not down, not on MENU  
-<br>19985: StyledText - Bulleting proofing RTF copy function  
-<br>20691: StyledText - bidi - Win2K/XP support  
-<br>20746: Inconsistent @param in Javadoc for  TableItem.setGrayed(boolean)
-<br>21313: Combo.getItem wrong error thrown  
-<br>21423: GTK: GPF in Shell.setVisible()  
-<br>21500: GTK: SWT.Activate and SWT.Deactivate events not fired when Shell with NO_TRIM used as its style bit
-<br>21526: Shell.computeTrim does not include menu bar  
-<br>21563: Mnemonics give focus to the label on GTK  
-<br>21564: GTK: Text of Button(with style bit SWT.CHECK) does not show up correctly
-<br>21573: TableTreeItem should have get/setGrayed() methods like TableItem
-<br>21601: getLineCount() method for Text widget does not work on Motif  
-<br>21623: List.setSelection (int start, int end) fails on Motif  
-<br>21653: WinCE/SH4: Arrow keys don't generate key events  
-<br>21702: Debug Display view error msg to console on GTK  
-<br>21706: BidiUtil in win32 has Class.forName() usage  
-<br>21805: event.character = 0 for all Ctrl-<alpha> on QNX 6.2  
-<br>21937: COMObject leakage on OleControlSite  
-<br>21958: ControlExample FileDialog does not filter correctly  
-<br>21964: GTK: Adding an item to Combo changes the selection index  
-<br>21967: GTK: Setting selection index to -1 for a Combo throws an exception
-<br>21969: List.getSelectionIndex bug  
-<br>21976: GTK: Combo.getSelectionIndex() changes when an item is removed
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-22+21%3A25%3A51+%2B0000;chfieldto=2010-04-05+21%3A58%3A39+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3639 - Tuesday March 23, 2010</h2>
 
-<h2> SWT Build 2.1 001 - Tuesday July 23, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4428: Table - Grid lines not drawn correctly (1FE4K5U)  
-<br>4451: Shell: setDefaultButton, default button cannot be reset to null (1FGLS6M)
-<br>4489: MouseUp fired for button 1 when button 1 is still pressed (1FODDP4)
-<br>4511: Pane title update flashes tool bar buttons (1FUUR7A)  
-<br>4524: CTRL sequences not handled gracefully by TextEditor (1FVSBTS)  
-<br>4544: CTRL combination not handled as accelerators when Caps are locked (1FZQDGR)
-<br>4590: VerifyEvent values ignored (1G7G5Y3)  
-<br>4626: TableTree: Two selection events generated for each checkbox selection (1GBRSLM)
-<br>4642: DirectoryDialog does not support / on windows (1GD41DZ)  
-<br>4648: MenuItem.setEnabled() always causes a redraw (1GDDCN2)  
-<br>4786: FontDialog should give access to color setting (1GIEFBD)  
-<br>4861: Key state for toolbar items (1GL54A0)  
-<br>5935: StyledText - up/down arrow behavior wrt varying line lengths  
-<br>6775: Radio button setSelection changes focus  
-<br>9859: Combo widget doesn't fire keyPressed or keyReleased for Enter key
-<br>11868: StyledText: text selection with key 'arrow down' does not include last line
-<br>11994: StyledText - replace getXAtOffset(caretOffset) with caret.getLocation().x
-<br>12178: StyledText - move StyledTextRenderer#bidiTextWidth to DisplayRenderer
-<br>12181: StyledText - mixing text width/caret position is confusing  
-<br>13944: DCR - Need cut/copy/paste routines on Combo  
-<br>14672: Combo and Scale setBackground does not refresh  
-<br>14799: Window manipulations block other threads from executing  
-<br>15088: StyledText - getTopIndex semantics undefined when no line fully visible
-<br>15554: DCR - alignment in a text widget  
-<br>15559: JAWS reads the parent window for dialog shells  
-<br>15728: Packages view selection always one too high  
-<br>16110: StyledText scroll not working with PageUp/Down keys.  
-<br>16205: StyledText - Tab does not tab out of read-only  
-<br>16402: Working set dialog: table columns have incorrect size  
-<br>16777: Busy cursor lost over progress indicator edges  
-<br>16986: JavaViewer example should remember path  
-<br>17191: SWT Error in JUnit view  
-<br>17252: Accelerator labels: Ctrl-Shift-A, Shift-Ctrl-A or Shift-Ctl-A?
-<br>17279: Extra CoolBar row created when switching perspectives.  
-<br>17370: Combo box flashes to much when resizing dialog.  
-<br>17993: Find/Replace shouldn't replace typed entry with value from history
-<br>18253: Coolbar - disposing items not honoring setRedraw = false  
-<br>18308: Ctrl+SHIFT+@ does not call the listener.  
-<br>18429: ScrolledComposite with LayoutManager is VERY slow in iPAQ  
-<br>18570: Combo flashes by resizing  
-<br>19380: Listboxes flash as preferences dialog is resized  
-<br>19434: ToolItem does not need to check for TOGGLE  
-<br>19568: {} on a german keyboard [swt-carbon]  
-<br>19615: StyledText - example Text Editor bug in copy/paste  
-<br>19630: Coolbar - odd dispose behavior  
-<br>19815: JRE crashes using error log and progress bar.  
-<br>19964: Coolbar - can "lose" items when platform widget wraps  
-<br>20159: Right-clicking on coolbar grabber causes strange behavior  
-<br>20183: Motif : Coolbar preferred size is too small width wise  
-<br>20190: CoolBar problems on Windows XP with Manifest  
-<br>20339: Hitting spacebar does not press currently focused button  
-<br>20583: Segfault when control tries to dispose of itself under Motif  
-<br>20683: [ExternalTools]  F3 (and F2) crashes the JVM when trying to cancel an external tool on linux-gtk
-<br>20690: StyledText - bidi - should force font script when keyboard language changed
-<br>20705: Cursor Keys don't work in Dialogs  
-<br>20722: GTK TableColumn#pack does not work if no header  
-<br>20788: A composite is being mysteriously disposed for no reason  
-<br>20846: WIN32: 'Combo.indexOf' always returns -1 for empty string  
-<br>20893: Bad size for Text widget when flag READ_ONLY is set (Photon)  
-<br>20904: SWT exception on LayoutExample (Photon)  
-<br>20950: GTK: F1 help does not work for menu items.  
-<br>20956: Emulated CoolItem do not respect SWT.DROP_DOWN flag  
-<br>21030: StyledText - during cut if clipboard copy fails do not delete text
-<br>21096: Properties accelerator missing ENTER  
-<br>21122: Emacs: Accelerators not shown in menus under GTK  
-<br>21154: StyledText - BIDI - Bad effect of RLO unicode character  
-<br>21192: UnsatisfiedLinkError thrown when pressing a hardware key  
-<br>21215: [Help] F1 Help does not close menu on GTK  
-<br>21223: StyledText - Cursor should stop blinking when moving  
-<br>21268: StyledText - Ctrl+Shift+J inserts line  
-<br>21368: GTK: GC.drawImage() fails when scaling an image  
-<br>21371: SWTError while using Navigator->Goto->Resource  
-<br>21378: GTK: Shell event's doit flag ignored when shellClosed() is called
-<br>21412: Paste with accelator key doesn't work  
-<br>21413: CoolBar computeSize fails on XP  
-<br>21415: Javadoc for CLabel.setBackground has typos  
-<br>21440: Unable to display Today screen when SWT app running on WinCE  
-<br>21449: GTK: Calling Text.setSelection() causes GPF  
-<br>21456: GTK: Cannot type in Text widget contained in Shell which has style bit as NO_TRIM
-<br>21484: Shift-Tab does nothing on GTK  
-<br>21523: StyledText - caret does not move when widget shell is not open
-<br>21524: StyledText - NPE when typing text and caret is null  
-<br>21596: StyledText - initial bidi caret position wrong when widget empty
-<br>21598: StyledText - setFont enables caret when it was disabled  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-15+21%3A40%3A41+%2B0000;chfieldto=2010-03-22+21%3A22%3A29+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3638 - Tuesday March 16, 2010</h2>
 
-<h2> SWT Build 2.0 052 - Wednesday October 30, 2002 </h2> (2.0.2 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-10459: I can't run eclipse
-<br>24693: org.eclipse.swt.graphics.GC.drawString() fails to draw euro
-<br>24869: GP - Eclipse crashed when entering invalid file name in FileDialog
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-11+21%3A22%3A10+%2B0000;chfieldto=2010-03-15+21%3A37%3A20+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637e - Friday March 12, 2010</h2>
 
-<h2> SWT Build 2.0 050 - Wednesday October 16, 2002 </h2> (2.0.2 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-24542: [DND] Crash when drag&drop on the Package Explorer
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-11+17%3A00%3A35+%2B0000;chfieldto=2010-03-11+21%3A18%3A55+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637d - Friday March 12, 2010</h2>
 
-<h2> SWT Build 2.0 049d - Monday August 26, 2002 </h2> (2.0.1 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-22729: Permissions.properties missing from the build script
-<br>22779: Eclipse linux-motif GPFs on exit on J9
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-09+22%3A49%3A27+%2B0000;chfieldto=2010-03-11+16%3A57%3A20+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637c - Wednesday March 10, 2010</h2>
 
-<h2> SWT Build 2.0 049b - Wednesday August 21, 2002 </h2> (2.0.1 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-22448: CoolBar - deleting first item in row does unnecessary collapse/expand of row
-<br>22561: Hover Help broken in 2.0.1 I20020815
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-08+23%3A10%3A12+%2B0000;chfieldto=2010-03-09+22%3A46%3A11+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637b - Tuesday March 09, 2010</h2>
 
-<h2> SWT Build 2.0 049 - Wednesday August 14, 2002 </h2> (2.0.1 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-22055: CoolBar - setWrapIndices causes rows to collapse/expand unnecessarily
-<br>22144: Coolbar - setSize not being honored after setWrapIndices API used
-<br>22320: Coolbar - delete item behavior problem
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-05+22%3A32%3A55+%2B0000;chfieldto=2010-03-08+23%3A06%3A57+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637a - Saturday March 06, 2010</h2>
 
-<h2> SWT Build 2.0 048 - Tuesday August 6, 2002 </h2> (2.0.1 stream)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-15559: JAWS reads the parent window for dialog shells
-<br>18253: Coolbar - disposing items not honoring setRedraw = false
-<br>19964: Coolbar - can "lose" items when platform widget wraps  
-<br>21268: StyledText - Ctrl+Shift+J inserts line
-<br>21834: Coolbar - deleting items corrupting layout
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-05+14%3A55%3A14+%2B0000;chfieldto=2010-03-05+22%3A29%3A44+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3637 - Saturday March 06, 2010</h2>
 
-<h2> SWT Build 2.0 047 - Monday June 17, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4772: Javadoc: Graphics constructors need to doc if device null (1GHSPUW)
-<br>14144: ScrollBars can't be made invisible on PocketPC  
-<br>20265: F3. test C3. No new updates for Eclipse on HP.  
-<br>20362: Coolbar cannot be traversed to  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-03-01+22%3A45%3A10+%2B0000;chfieldto=2010-03-05+14%3A52%3A05+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3636 - Tuesday March 02, 2010</h2>
 
-<h2> SWT Build 2.0 046 - Friday June 14, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-16809: Clicking to close non-active editor doesn't have an affect  
-<br>16939: DnD: Moving the mouse while dropping behaves strangely while dragging views
-<br>17190: No cell editor support  
-<br>17563: Flat tool bar buttons  
-<br>17621: Resource Patcher wizard - widgets not properly aligned  
-<br>19089: No popup menu java editor ruler (Photon)  
-<br>19243: Eclipse launchers have hardcoded j9 args  
-<br>19244: Spacing between Table rows grows with number of rows  
-<br>20006: X Pointer grab not released  
-<br>20044: Unable to scroll license text using keyboard  
-<br>20072: Workbench bounces when swtiching perspectives  
-<br>20134: Eclipse CLOSES automatically, when i'm working in it  
-<br>20184: Color javadoc could use reference to Device.getSystemColor()  
-<br>20209: Hang due to OS locking  
-<br>20354: GP when attempt to check out SWT from repository  
-<br>20372: Tracker needs more javadoc  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-25+23%3A21%3A07+%2B0000;chfieldto=2010-03-01+22%3A42%3A01+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3635 - Friday February 26, 2010</h2>
 
-<h2> SWT Build 2.0 046 - Tuesday June 11, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-16809: Clicking to close non-active editor doesn't have an affect  
-<br>16939: DnD: Moving the mouse while dropping behaves strangely while dragging views
-<br>17190: No cell editor support  
-<br>17563: Flat tool bar buttons  
-<br>17621: Resource Patcher wizard - widgets not properly aligned  
-<br>19089: No popup menu java editor ruler (Photon)  
-<br>19243: Eclipse launchers have hardcoded j9 args  
-<br>19244: Spacing between Table rows grows with number of rows  
-<br>20006: X Pointer grab not released  
-<br>20044: Unable to scroll license text using keyboard  
-<br>20072: Workbench bounces when swtiching perspectives  
-<br>20134: Eclipse CLOSES automatically, when i'm working in it  
-<br>20184: Color javadoc could use reference to Device.getSystemColor()  
-<br>20209: Hang due to OS locking  
-<br>20354: GP when attempt to check out SWT from repository  
-<br>20372: Tracker needs more javadoc  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-23+00%3A21%3A39+%2B0000;chfieldto=2010-02-25+23%3A17%3A59+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3634 - Tuesday February 23, 2010</h2>
 
-<h2> SWT Build 2.0 045 - Tuesday June 11, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-15242: CoolBar - layout issues  
-<br>18517: Coolbar - delete and row layout bug  
-<br>19090: Combo doesn't size itself properly in GTK2  
-<br>19670: Regression in OLE support  
-<br>19671: Unable to expand/collapse trees in properties view  
-<br>19720: Coolbar - getPreferredSize problem (was getClientArea problem)
-<br>19787: Hover help is not removed  
-<br>19947: GTK2 sends key events with both keyCode and character equals to 0 for some keys
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-12+23%3A47%3A10+%2B0000;chfieldto=2010-02-23+00%3A18%3A35+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3633 - Saturday February 13, 2010</h2>
 
-<h2> SWT Build 2.0 044 - Monday June 10, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4807: Text.setEchoChar spec should say 0 <= char < 128 (1GJ6CDM)  
-<br>4837: Javadoc: Cursor constructor ERROR_NO_HANDLES is not spec'ed (1GKA7Q9)
-<br>5577: Text javadoc  
-<br>7526: No spec for Display.update()  
-<br>8513: JavaDoc for Menu.addMenuListener incorrect  
-<br>12820: Finishing preview of the refactoring code crashes Eclipse  
-<br>14463: GP opening two files at the same time  
-<br>15460: CoolBar doc unclear/insufficient  
-<br>15939: KeyEvent character is not consistent between Linux and Windows
-<br>16810: Mouse pointer not update  
-<br>16837: Keys completely lost  
-<br>16883: Variable sorting changes unexpectedly  
-<br>16895: In-place text fields are unusable  
-<br>17036: Disposing a CoolItem is triggering an activation callback.  
-<br>17146: Editor Preference page buttom list clipped  
-<br>17154: View part loses focus when opening context menu  
-<br>17289: Combo doesn't take focus by clicking on it (Photon)  
-<br>17290: Modify Method Parameters: wrong enablement of buttons  
-<br>17507: AIX FileDialog is not responsive in stand-alone example  
-<br>17613: Add from local history shows nothing in right and lower pane
-<br>17670: Cannot move through Plug-in Code Generation page list with arrow keys
-<br>17692: IAE when deleting line in Java Editor  
-<br>17752: Cannot select a non-bold font  
-<br>17788: Scale with preferred size is unusable (no range of motion)  
-<br>17848: F1 build, JVM terminated Exit code 139  
-<br>17936: Eclipse launcher must launch headless in headless environments
-<br>18439: Ctrl+F6 editor switching is unusable  
-<br>18508: Javacoredump when opening vertical ruler context menu  
-<br>18521: Coolbar layout and chevron bug  
-<br>18543: An invisible character is added when the 'Windows' key is pressed
-<br>18625: Tabbing in Java editor takes cursor  
-<br>18629: GTK: Unable to select dialog buttons with mouse  
-<br>18645: Release SWT sources & javadoc in future builds  
-<br>18733: ControlExample: List widget not being resized properly  
-<br>18804: GPF setting image to menu item (Photon)  
-<br>18838: Launch Configurations dialog creeps up  
-<br>18841: Question: What does -DMBCS do?  
-<br>18930: Wrong content displayed in tabs in the Launch Configuration Dialog
-<br>18934: Scrollbars should be disabled in ImageAnalyzer example  
-<br>19057: Problem saving java file through popup menu  
-<br>19116: Missing about.html in source directory for examples  
-<br>19169: NPE on Emulated CoolItem constructor  
-<br>19345: Task View: Not clearing priority icons  
-<br>19394: False "unsaved changes" notification from launch configs  
-<br>19503: Widget in outliner gets wrapped/cropped  
-<br>19595: StyledText - redrawRange not clearing properly when clear flag set
-<br>19660: Preference page does not expand to fit all widgets  
-<br>19769: Internet Explorer and Help, EXCEPTION_ACCESS_VIOLATION  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-09+22%3A37%3A01+%2B0000;chfieldto=2010-02-12+23%3A44%3A13+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3632a - Wednesday February 10, 2010</h2>
 
-<h2> SWT Build 2.0 043 - Friday May 31, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4692: Empty popup menu appears in Outline view (1GET1B1)  
-<br>8821: Opening editors has become very slow  
-<br>15565: Coolbar - minimumWidth not honored under certain conditions  
-<br>16688: Selection background on emulated widgets is wrong  
-<br>17150: Strange selection behaviour in Java Browsing Perspective  
-<br>17156: Delete key not working in package view  
-<br>17228: Weird Tree selection behaviour  
-<br>17354: Double clicking expands and collapses item  
-<br>17363: Test A4.4 cannot edit action set id in properties view  
-<br>17680: Outline doesn't expand when adding new method  
-<br>17825: ControlExample->Text beeps when I choose SWT.MULTI  
-<br>17831: Coolbar - chevron not always displayed when it should be  
-<br>18160: "Show in packages view" doesn't scroll to selection  
-<br>18229: Walkback when closing ImageAnalyzer  
-<br>18368: Get rid of all fragment.properties  
-<br>18376: No execute permissions of libraries  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-08+23%3A44%3A49+%2B0000;chfieldto=2010-02-09+22%3A34%3A00+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3632 - Tuesday February 09, 2010</h2>
 
-<h2> SWT Build 2.0 042 - Thursday May 30, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4533: Cheese when resizing toolbar (1FWL943)  
-<br>4841: SWT sample imageviewer nothing display at pixel data area (1GKEOUE)
-<br>6735: AWT/SWT - Swing / Swt integration : JComboBox doesn't show correctly
-<br>10972: Core dump drag and droppping from inline text  
-<br>12498: Unable to add External Jar using the Java Project Wizard  
-<br>16174: Wrong popup menu  
-<br>16553: SWT_AWT.new_Panel does not work  
-<br>16791: Can't select check boxes  
-<br>17199: Table widget - only last column header is clickable  
-<br>17375: Cheese on Java Scrapbook page ruler  
-<br>17390: JUnit testcases result for Graphics (1 error, 2 failures)  
-<br>17565: Add JRE validation not working  
-<br>17568: Error doesn't disapear when switching to source folder layout
-<br>17574: Status line contributions appear twice  
-<br>17637: Resize problem when diableing overview ruler in Editor  
-<br>17662: Incorrect status display in new Feature Wizard  
-<br>17917: Shift-Tab does not work  
-<br>18223: Text widget with SWT.MULTI has strange behavior on GTK  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-02-01+22%3A41%3A55+%2B0000;chfieldto=2010-02-08+23%3A41%3A55+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3631a - Tuesday February 02, 2010</h2>
 
-<h2> SWT Build 2.0 041 - Tuesday May 28, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4398: Visual Coordination: Borders (1FSGONG)  
-<br>4411: DCR - Support printing (1PQ8QCK)  
-<br>4426: ScrollBar - Can't query size (1FDVP23)  
-<br>4431: Folder tab does not get focus (1FIGI95)  
-<br>4437: Tree Keyboard Support (1FOLZPT)  
-<br>4452: MenuItem: setImage does not show image on menu (1FGNP8U)  
-<br>4469: Inconsistencies between single line Text and RichText widgets (1FK1RRM)
-<br>4474: Not supportting Windows Accessibility Standard? (1FM0IFS)  
-<br>4490: Fonts in examples appear too big (1FOMCWQ)  
-<br>4496: DCR - Contour mouse middle button doesn't work (1FREAS4)  
-<br>4503: FontDialog is missing fonts (1FSMRV0)  
-<br>4526: Severe - Delete key is not redirected to editor (1FVXDST)  
-<br>4529: Closing external MS Word makes in-place MS Word disappear (1FWG9AR)
-<br>4534: Flashing when computeSize called on Toolbar (1FWLD1E)  
-<br>4545: No OS.GetKeyState function on motif (1FZQOZM)  
-<br>4550: JUnit tests assumes boundary condition which is setting dependant (1G0LQKD)
-<br>4552: Adobe doesn't like ImageData... (1G0ZBE0)  
-<br>4563: Need support for *.xpm and *.png image file formats (1G3HWSA)
-<br>4636: Tooltips not working on Linux (1GCN4FK)  
-<br>4672: DCR - Include "begining / end " arrows to select files (1GEFYCG)
-<br>4679: Colour gradient of views is not gradual (16bit color depth) (1GELWSO)
-<br>4699: DCR - outstanding issue for customer- Changing cursor during drag operation (1GETC8U)
-<br>4703: WinME - Disabled icons in tabbed folder do not display properly. (1GEWXLI)
-<br>4706: StackOverflow resizing Workbench window (1GEWLSU)  
-<br>4708: FATAL X error (1GF07HN)  
-<br>4709: GP running ( Eclipse ^ 2 ) (1GEZ9UR)  
-<br>4711: Navigator messed up when midi(w/DBCS) in it -Can't create view (1GEZNVC)
-<br>4728: Windows with tab pages should allow Ctrl-Tab switching (1GFIUG5)
-<br>4785: DCR - Custom notebook scrolling not optimal (1GI97VZ)  
-<br>4839: TabFolder mnemonic problem (1GKAPKK)  
-<br>4840: Hebrew: cannot paste from external file into java editor (1GKCWVX)
-<br>4851: Print ignores print to file option (1GKXC30)  
-<br>4867: PgMemFlush() considered expensive (1GLEEJC)  
-<br>5697: *Please* make SWT use GTK+ instead of Motif  
-<br>8346: Workbench will not start  
-<br>9217: Internal error at open the package view  
-<br>9491: 1GRTRXQ: WSWB:Workbench 2.0 Problem- ArrayIndexOutOfBoundsException with MultiPageEditorPart
-<br>11204: Some ActiveX control can not accept key input.  
-<br>11436: Request for public interface to call "UIDeactivate()" of  IOleInPlaceObject
-<br>11498: StyledText does not always redraw when the line style changes
-<br>14846: Accessibility: getLocation does not position XP Magnifier  
-<br>15218: Platform does not recognize the GUI - 20020502  
-<br>15466: ImageData.blit throws ArrayIndexOutOfBounds Exception  
-<br>15548: 'X' close box on tab hidden by arrows  
-<br>15564: javaw.exe has generated errors and will be closed by windows  
-<br>15653: Tab halts on CCombo objects  
-<br>16094: Cheese on CTabFolder when resizing  
-<br>16200: Tracker leaves cheese  
-<br>16345: JVM termination when attepmting to run Update Manager  
-<br>16458: Trying to free a GdkEvent: pointer=NULL  
-<br>16549: Cannot navigate tabbed notebook with keyboard  
-<br>16557: Tab does not move cursor between text fields  
-<br>16565: Typed text is lost  
-<br>16576: ACC: Checkboxes in lists are not real checkboxes  
-<br>16828: CTabFolder flashing tooltip  
-<br>16927: External programs support on Photon  
-<br>16957: TreeItem.setForegroundColor() doesn't work  
-<br>16967: Strange scroll behavior in package dialog  
-<br>16995: HoverHelp example does not create ON_TOP Shell for tooltips  
-<br>17022: SWT Layouts example - missing window title  
-<br>17090: StyledText selects text when menu is showing  
-<br>17183: Icon in wizard banner clipped  
-<br>17208: Long operations are being modal.  
-<br>17305: Search Dialog: Java Page clipped  
-<br>17320: Search dialog freezes Eclipse  
-<br>17368: 4 Toolbar icons pushed off the toolbar way to the right  
-<br>17488: Image Support in SWT - FAQ (1G5Z1KS)  
-<br>17497: FileDialog open() returns wrong result  
-<br>17632: "Color Button" doesn't update  
-<br>17802: Moving a sash requires an extra click to take effect  
-<br>17811: Two menu bar items highlighted at the same time  
-<br>17816: Menu appears then dissapprears with click after Alt.  
-<br>17832: Vertical Scrollbar clipped  
-<br>17834: JavaDoc API bad for Image  
-<br>17835: Smalltalk code around :)  
-<br>17928: NPE on addressbook example  
-<br>17932: Emulated Coolbar do not resize when the last item on the row is removed
-<br>17933: Emulated Coolbar chevron too narrow on Photon  
-<br>18005: BusyIndicator should check args  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-26+23%3A12%3A33+%2B0000;chfieldto=2010-02-01+22%3A39%3A01+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3631 - Wednesday January 27, 2010</h2>
 
-<h2> SWT Build 2.0 040 - Tuesday May 21, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-3554: TP125: weird tab order in create project wizard (1G83VP8)  
-<br>4424: Table draws a stray pixel in top left corner (1FS9QBQ)  
-<br>4476: No syncExec runnables run during scrolling (1FMGG2X)  
-<br>4528: Need FocusIn event for OleClientSite (1FW2S00)  
-<br>4586: Use checkWidget() more often (1G80URQ)  
-<br>4609: FillLayout should have FillLayout(type) constructor (1G9XBPI)
-<br>4694: Editor Name is missing from tab (1GET93J)  
-<br>4726: CODE CHANGES AFTER THE FREEZE (1GF9YF0)  
-<br>4788: Feature request: styled tree items (1GIGJK4)  
-<br>4789: XP - Look and feel problems (1GIGGKM)  
-<br>4831: DND not working properly (1GJYOZC)  
-<br>4838: Can create FontData with null name string (1GKA93P)  
-<br>4941: Focus callback during OleClientSite deactivate call  
-<br>4942: Combo selection index should move when upper item removed (1GLGA41)
-<br>5910: Toolbar with all items disabled still shows up in tab order  
-<br>5936: Composite.setTabList should accept null  
-<br>6198: Focus lost in tab folder when switching pages  
-<br>6406: J IME positioning incorrect
-<br>6514: Code assist behaves differently on Linux  
-<br>6856: Default buttons different on Variable dialog  
-<br>8162: Accessibility: focus goes missing in CVS location wizard  
-<br>8791: Overaggressive focus grabbing  
-<br>9141: WorkBench->Preference dialog's buttons font is too small.  
-<br>9287: Combo.setText does not work
-<br>10491: Bold button will not bold text in SWT TextEditor Example  
-<br>11074: EventTable.sendEvent should probably use try/finally  
-<br>11349: Editor Tabs should fill to the right.  
-<br>11369: Coolbar feature requests  
-<br>11516: ViewForm should override computeTrim
-<br>11738: growing status bar
-<br>11847: OLE Editor prevents navigation without keys  
-<br>12398: Accessibility problems  
-<br>12641: Error in .classpath for Photon  
-<br>12904: Accessible resizing of Views should move/change the Display's Cursor
-<br>12972: Noticed increased number of Eclipse crashes  
-<br>13622: DCR - need ability to cancel window system shutdown
-<br>14449: [M5] error bringing up Code Formatter page  
-<br>14546: TableColumn alignment problem with Motif  
-<br>14656: Repaint of window does not wotk with IME up
-<br>14801: Mnemonic character doesn't work on TabFolder on QNX  
-<br>15124: NPE: Label Decorations preference page  
-<br>15134: Open Type dialog has wrong initial focus  
-<br>15172: focus not on text field for OpenTypeDialog  
-<br>15224: FileDialog does not return the file selected on PocketPC  
-<br>15237: Coolbar - corrupts wrap layout when items deleted  
-<br>15513: CCombo.setTooltipText() doesn't work  
-<br>15516: GP - Eclipse crashed  
-<br>15575: Tree with checkbox items are not accessible  
-<br>15613: Copy/paste inserts NULL  
-<br>15705: Editor with focus, tab text disappears sometimes
-<br>15872: Editor area frame should align with open editor's, excluding drop shadow
-<br>15989: Coolbar walkback when adding item
-<br>16069: Can't see source in imported binary SWT  
-<br>16210: Core Dump Occurred while in Open Type dialog  
-<br>16245: CTabFolder - tooltips and arrowing around
-<br>16281: Eclipse does not come up
-<br>16297: Wrong tab order in newer builds
-<br>16318: Can't activate views; losing events
-<br>16465: Stack Overflow when importing a project
-<br>16523: Unable to double-click
-<br>16525: Eclipse does not layout properly
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-25+22%3A54%3A00+%2B0000;chfieldto=2010-01-26+23%3A09%3A47+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3630 - Tuesday January 26, 2010</h2>
 
-<h2> SWT Build 2.0 039 - Tuesday May 14, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-6103: Menu mnemonics don't work when toolbar has focus  
-<br>8805: Context menus and finding references to methods  
-<br>14823: Drag&Drop: need way to set the default behvaiour of a drop o  
-<br>15055: Column Header Height in a Table or Table Tree SWT widget  
-<br>15253: Linux GTK 2 library not found  
-<br>15274: Can't add external jar in Linux-GTK version  
-<br>15603: Preference page no longer resizes to fit contents  
-<br>15634: Table not acting like list when last column deleted  
-<br>15637: Cheese in Table when setting column image  
-<br>15643: Cheese in Table when changing font  
-<br>15705: Editor with focus, tab text disappears sometimes  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-21+23%3A24%3A11+%2B0000;chfieldto=2010-01-25+22%3A51%3A13+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3629 - Friday January 22, 2010</h2>
 
-<h2> SWT Build 2.0 038 - Tuesday May 7, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-6391: Display.getActiveShell() can answer wrong value  
-<br>7170: Tab space size problem  
-<br>8542: Close perspective with mouse isn't possible  
-<br>8591: Editor tabs should scroll automatically to fill available tab space
-<br>8648: StyledText - Caret can be hidden under scrollbar  
-<br>10263: Editor keeps scrolling after mouse up  
-<br>12226: Solaris - can't copy file into same directory  
-<br>12360: TraverseEvent e.doit doesn't turn off on TabFolder  
-<br>12952: Alt+{char} gets inserted as text  
-<br>13614: JFace Tables have an extra column  
-<br>13651: Printed output issues  
-<br>13725: Revert is much slower than close and re-open in java editor.  
-<br>14431: TableViewer inconsistent when clicking off of item list  
-<br>14866: Shift-selection doesn't work immediately after restart  
-<br>14880: Column resize problems/cheese  
-<br>14902: Executable launcher does not restart  
-<br>14935: EmulatedWidgetTests fail on Linux  
-<br>14937: Launch from New Office Document hangs until Eclipse exits.  
-<br>14964: StyledText - add new API for replacing style ranges  
-<br>14981: Focus not set anymore  
-<br>15057: getSystemColor(SWT.COLOR_WIDGET_FOREGROUND) always returns black
-<br>15115: removeColumn are broken in Emulated Table  
-<br>15141: Tab is caught by read only text  
-<br>15150: Progress bar behaves erraticaly
-<br>15208: StyledText - text change even mechanism poorly documented  
-<br>15348: GPF in OS.MoveMemoryW  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-18+22%3A45%3A14+%2B0000;chfieldto=2010-01-21+23%3A21%3A28+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3628 - Tuesday January 19, 2010</h2>
 
-<h2> SWT Build 2.0 037 - Tuesday April 30, 2002 </h2>
-
-<h3>
-<a NAME="LIBRARY LOCATION CHANGE"></a>LIBRARY LOCATION CHANGE</h3>
-
-As of this build, libraries are no longer in the org.eclipse.swt plugin.
-
-<p>Libraries can now be found in the associated windowing system fragment which to date are:
-<ul>
-<li>org.eclipse.swt.win32 
-<li>org.eclipse.swt.motif
-<li>org.eclipse.swt.photon
-<li>org.eclipse.swt.gtk
-<li>org.eclipse.swt.gtk1x
-</ul>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4641: Icon lookup fails for some windows icon paths (1GD2DEY)  
-<br>4802: StyledText - Bidi Support Open Issues (1GIZ5G3)  
-<br>4842: Can't launch external editors. (1GKEYOE)  
-<br>6098: EXCEPTION_ACCESS_VIOLATION running Eclipse  
-<br>6858: GP - Crash VM  
-<br>8826: GPF - closing a Java editor  
-<br>8837: Window position changed incorrectly in Shell.open()  
-<br>9297: Eclipse crashed  
-<br>11374: gp: Crash in swt-win32-2026.dll  
-<br>11587: BIDI:Java editor and Text editor: User Interface issues.  
-<br>12811: TableColumns don't pack properly  
-<br>13200: gp - MoveMemory error on Windows XP  
-<br>14049: gp - Crash in OS.MoveMemoryW  
-<br>14220: gp - Crash closing editor  
-<br>14245: gp - crash while debugging (NRCRASH)  
-<br>14249: Exception while stepping  
-<br>14280: Unsatisfied Link Errors running libswt-pi-gtk-2034.so on Linux/Gtk 2.0
-<br>14425: Font dialog exception  
-<br>14528: Problem with Label.computeSize.  
-<br>14538: StyledText - bidi - change backspace and delete behavior  
-<br>14813: ClassCastException creating a new Run configuration  
-<br>14872: ArrayIndexOutOfBoundsException in TableItem.insertColumn  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-11+22%3A27%3A48+%2B0000;chfieldto=2010-01-18+22%3A42%3A29+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3627 - Tuesday January 12, 2010</h2>
 
-<h2> SWT Build 2.0 036 - Tuesday April 23, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4834: DCR - mnemonics do not work on tabbed pages (1GK7O0N)  
-<br>7189: Method highlight in border does not match the method  
-<br>8253: Right clicking does not bring up context menu  
-<br>8306: Inconsistencies in SWT example descriptions  
-<br>8538: Mismatch between selected tab and displayed tab  
-<br>8544: Some problems with the editor-pane (repaint, focus)  
-<br>9360: Text entry in cvs comment dialog can't deal with quick typing
-<br>9794: Linux-GTK KeyEvents bad/different from the other platforms
-<br>12947: Color Preferences in Preferences->Java->Editor  
-<br>13826: Performance issue in Table.RemoveAll()  
-<br>13922: Eclipse crashes when running LayoutExample  
-<br>13999: StyledText - appending single line data doesn't update properly
-<br>14047: StyledText - inefficient redraw during text change with word wrap
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=${url.from.time};chfieldto=2010-01-11+22%3A25%3A09+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3626 - Tuesday January 12, 2010</h2>
 
-<h2> SWT Build 2.0 035 - Thursday April 18, 2002 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-<ul>
-<li>Display.setCursorLocation</li>
-<li>GridLayout(int,boolean)</li>
-</ul>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4602: GridLayout should have GridLayout(numColumns) constructor (1G9Z73D)
-<br>8549: org.eclipse.core.resources 4 Unhandled exception caught in event loop
-<br>9029: GC.setClipping(Rectangle) should handle null argument on GTK  
-<br>10590: GTK Version / Tree View blanks...  
-<br>10715: Code Assist dialog hide after press and release CTRL + SPACE  
-<br>11182: Property Sheet does not allow editing when there is only one property
-<br>11515: computeTrim and getClientArea are inconsistent in CTabFolder  
-<br>11713: Descriptions in preference pages aren't aligned  
-<br>11715: Tab doesn't switch fields on gtk  
-<br>11835: Strange behaviour of backspace in new Java Class dialog  
-<br>11935: Can't Ctrl+Tab out of PDE Editor's dependencies page  
-<br>12073: Moving shell above other shells does not work.  
-<br>12882: DCR: Set Cursor location programmatically for accessibility  
-<br>13194: Usability: editor tabs  
-<br>13384: NPE on launching  
-<br>13432: OleControlSIte doesn't propagate WM_SETFOCUS message to an ActiveX control
-<br>13639: Controls do not appear in tool items  
-<br>13800: Can not get FocusEvent from Combo  
-<br>13982: Eclipse won't start on GTK2  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-06+16%3A03%3A58+%2B0000;chfieldto=2010-01-11+21%3A25%3A53+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3625a - Thursday January 07, 2010</h2>
 
-<h2> SWT Build 2.0 034 - Tuesday April 9, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-6774: WinCE - items regarding Pocket PC (including 2002) integration
-<br>8806: Moving views is difficult  
-<br>9245: ToolItems in a ToolBar not displaying images on WinCE  
-<br>9616: Resize column leaves some cheese in the table  
-<br>10603: Add Breakpoint keeps prompting me  
-<br>10937: Converter problem on Solaris  
-<br>11520: ShellAdapter.shellDeactivated() never called on Linux-Motif  
-<br>11734: Focus not on "Finished" button  
-<br>11940: Down arrow does not access drop-down portion of toolbar buttons
-<br>12241: Codeassist disappear after a few seconds  
-<br>12573: Table sends selection event twice when in TabFolder
-<br>12787: Changing a menu item's text makes its icon disappear  
-<br>12885: Label as a seperator doesn't resize properly  
-<br>13006: Alt+1 with blank TabFolder results in NPE  
-<br>13014: SetToolTipText called multiple times does not resize.
-<br>13049: CTabFolder focus traversing is busted  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2010-01-04+21%3A45%3A19+%2B0000;chfieldto=2010-01-06+16%3A01%3A22+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3625 - Tuesday January 05, 2010</h2>
 
-<h2> SWT Build 2.0 033 - Tuesday April 2, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-12446: SWT Table Column Image Corruption  
-<br>12447: Tree.getSelection() is slow for large trees  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-12-09+17%3A53%3A25+%2B0000;chfieldto=2010-01-04+21%3A42%3A48+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3624a - Thursday December 10, 2009</h2>
 
-<h2> SWT Build 2.0 032 - Thursday March 28, 2002 </h2>
-
-<h3>
-<a NAME="StyledText Bidi Printing"></a>StyledText Bidi Printing</h3>
-<blockquote>
-<p>Support has been added for printing the contents of a StyledText widget on
-bidirectional language Windows platforms.</p>
-<p> Note however that printing English or local language text does not work properly with some
-printer drivers when using a non-TrueType font. This has been noticed on Windows
-NT systems with the HP Laserjet 4 series printer driver. Please use a TrueType
-font if text is printed garbled .  
-<br></p>
-</blockquote>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4467: DCR - Tree missing keyboard support (1FJH5GY)  
-<br>4525: Property viewer doesn't adapt to bg color changes (1FX8XL1)  
-<br>10317: StyledText - bidi printing support  
-<br>10483: SWT ControlExample DirectoryDialog does not choose directories
-<br>11081: Java Source Editing with Greek Locale no longer works  
-<br>11549: Create project does not allow creation of folder in its project selection
-<br>12099: Accessibility : JAWS can not read TabItem's text  
-<br>12231: DND : Drag and Drop busted (mouse capture not released)  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-12-09+17%3A34%3A18+%2B0000;chfieldto=2009-12-09+17%3A50%3A59+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3624 - Thursday December 10, 2009</h2>
 
-<h2> SWT Build 2.0 031 - Monday March 18, 2002 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-<ul>
-<li>ScrolledComposite.getOrigin</li>
-<li>ScrolledComposite.setOrigin</li>
-<li>Variant.getType</li>
-</ul>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-7500: Display.getBounds() calls from another thread give incorrect results
-<br>10273: NPEs caused by unitialized 'item' field in event
-<br>10481: View will not Size via Pull Down
-<br>10511: Add programmatic scrolling to ScrolledComposite
-<br>10942: Launcher should autodetect gtk only installation.
-<br>11051: Invalid token pasting in callback.c
-<br>11090: CLabel Javadoc says SmartLabel
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-12-07+23%3A20%3A46+%2B0000;chfieldto=2009-12-09+17%3A31%3A57+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3623b - Tuesday December 08, 2009</h2>
 
-<h2> SWT Build 2.0 030 - Tuesday March 12, 2002 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-<ul>
-<li>OleControlSite.addEventListener(OleAutomation,int,OleListener)</li>
-<li>TableItem.getForeground()</li>
-<li>TableItem.getBackground()</li>
-<li>TableItem.setForeground(Color)</li>
-<li>TableItem.setBackground(Color)</li>
-<li>TreeItem.getForeground()</li>
-<li>TreeItem.getBackground()</li>
-<li>TreeItem.setForeground(Color)</li>
-<li>TreeItem.setBackground(Color)</li>
-<li>TableTreeItem.getForeground()</li>
-<li>TableTreeItem.getBackground()</li>
-<li>TableTreeItem.setForeground(Color)</li>
-<li>TableTreeItem.setBackground(Color)</li>
-</ul>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-8737:  No Selection event when DND starts
-<br>9950:  ColorDialog weird behavior
-<br>9959:  Persistent Eclipse NPE on startup
-<br>9993:  OleControlSite is not powerful enough
-<br>10420: Mouse and DND Event notification out of order
-<br>10480: Unable to open files with "System Editor"
-<br>10482: View will not Move via Pull Down
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-12-04+20%3A59%3A04+%2B0000;chfieldto=2009-12-07+23%3A18%3A24+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3623a - Saturday December 05, 2009</h2>
 
-<h2> SWT Build 2.0 029 - Tuesday March 5, 2002 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
-
-<b>Note:</b> The new Accessibility API is experimental, and will likely change.
-<ul>
-<li>Control.getAccessible() added</li>
-<li>package <b>org.eclipse.swt.accessibility</b> added, containing the following classes:<ul>
-<li>Accessible</li>
-<li>ACC</li>
-<li>AccessibleListener</li>
-<li>AccessibleAdapter</li>
-<li>AccessibleEvent</li>
-<li>AccessibleControlListener</li>
-<li>AccessibleControlAdapter</li>
-<li>AccessibleControlEvent</li>
-</ul></li></ul>
-
-Here are two examples that use the accessibility API:<ul>
-<li>For a control with no child items:
-<code><pre>
-		button.getAccessible().addAccessibleListener(new AccessibleAdapter() {
-			public void getName(AccessibleEvent e) {
-				e.result = "My Button Label";
-			}
-		});
-</pre></code></li>
-
-<li>For a control that has child items:
-<code><pre>
-		list.getAccessible().addAccessibleListener(new AccessibleAdapter() {
-			public void getName(AccessibleEvent e) {
-				if (e.childID == ACC.CHILDID_SELF) {
-					e.result = "My List Label";
-				} else {
-					e.result = "My List Item Label: " + list.getItem(e.childID);
-				}
-			}
-		});
-</pre></code></li></ul>
-<b>Note:</b> The API involving the AccessibleControlXxx classes is more complex, and more likely to change. 
-It is unlikely that application code will need to use it. 
-It is primarily for the use of custom control implementors.
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4436: Grid Layout Problem (1FOLZZE)  
-<br>4666: DCR - Need a way for child shells to disable ESC closing (1GE8RXW)
-<br>4790: XInitThreads causes japanese input method to hang (1GIRYR6)
-<br>4775: XInitThreads causes X printing to hang (1GITBQL)
-<br>4454: DCR: Tables need to support cell editing (1FGPLPP)
-<br>10002: Detection of CDE as active WM is platform-specific  
-<br>10426: Esc traverse does not go up hierarchy  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-12-03+19%3A51%3A47+%2B0000;chfieldto=2009-12-04+20%3A56%3A46+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3623 - Friday December 04, 2009</h2>
 
-<h2> SWT Build 2.0 028 - Thursday February 28, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4688: J - Font Dialog does not select a font when selecting a font family (1GET5BW)
-<br>7139: FontDialog: Selected font not used  
-<br>8865: Exception when creating a ToolItem with a null image in Linux
-<br>10250: Slider with VERTICAL orientation - down arrow increments  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-11-30+19%3A45%3A42+%2B0000;chfieldto=2009-12-03+19%3A49%3A29+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3622 - Tuesday December 01, 2009</h2>
 
-<h2> SWT Build 2.0 027 - Tuesday February 26, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-6409: Node selection in package view  
-<br>8389: MouseUp not reported correctly if DragDetect hooked  
-<br>9364: Exception in StyledText  
-<br>9773: Font and Color dialogs do not appear centred on parent  
-<br>9950: ColorDialog weird behavior  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-11-23+20%3A55%3A45+%2B0000;chfieldto=2009-11-30+19%3A43%3A24+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3621 - Tuesday November 24, 2009</h2>
 
-<h2> SWT Build 2.0 026 - Tuesday February 12, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-6679: Image.getImageData() not implemented  
-<br>7962: SWT.getPlatform() javadoc incorrect for return description  
-<br>8984: CTabFolder.MIN_TAB_WIDTH should not be static  
-<br>9022: Linux: Tree Viewer does not get defualt Selection  
-<br>9072: Table Tree does not pick up windows settings changes  
-<br>9091: StyledText in SINGLE mode should look more like a Text widget  
-<br>9172: SWT AddressBook Example calls undefined method
-<br>9432: The doc for Tracker widget should specify that rectangles are in screen coordinates
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-11-16+21%3A02%3A08+%2B0000;chfieldto=2009-11-23+20%3A53%3A33+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3620 - Tuesday November 17, 2009</h2>
 
-<h2> SWT Build 2.0 025 - Tuesday February 5, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-2430: Sorting the Tasks List should display icon for sort key/order (1GF5TQO)
-<br>4485: DCR - Table column header decoration capability needed (1FOQQM8)
-<br>6035: Difference in tree "expanded state" between Windows and Motif
-<br>6983: Browse button in Import->Plugins not working.  
-<br>7400: Single line text fields not firing "Key Pressed" events for the Enter, Up(arrow), and Down(arrow) keys
-<br>8173: Accessibility: keyboard-invoked popup menu not usable  
-<br>8196: Accessibility: shift+F10 does not display view menu  
-<br>8273: Horizontal scorllbar does not allow scrolling when required  
-<br>8396: WINCE: Menu bar obscures control when control location is 0,0
-<br>8397: WINCE: Menu item colors don't match menu bar  
-<br>8412: WINCE: Background color of buttons looks wrong  
-<br>8640: GP: opening Synchronization perspective  
-<br>8942: Wrong text indent in a table when use image  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-11-10+00%3A53%3A08+%2B0000;chfieldto=2009-11-16+20%3A59%3A59+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3619 - Tuesday November 10, 2009</h2>
 
-<h2> SWT Build 2.0 024 - Tuesday January 29, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4654: VAJ hangs when dragging from file manager to the desktop. (1GDQFZ6)
-<br>4720: Eclipse freezes during drag & drop operation (1GF7RRH)  
-<br>4724: GP - Fatal app error - renaming resource on linux (1GF7TXO)  
-<br>4736: Fix printing (1GFW2CW)  
-<br>4817: Need JavaDoc comments for SWT Photon (1GJLEU0)  
-<br>6835: Characters ????????????? and ??????? doesn't work in Java editor on Swedish  
-<br>8255: Closing paint viewer causes internal error  
-<br>8410: Black color become transparent in ToolBar images  
-<br>8503: StyledText - cheese if resize in word wrap tries to keep partial top line
-<br>8547: Intellimouse scrolling does not work in eclipse  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-11-02+21%3A23%3A35+%2B0000;chfieldto=2009-11-10+00%3A51%3A04+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3618 - Tuesday November 03, 2009</h2>
 
-<h2> SWT Build 2.0 023a - Thursday January 24, 2002 </h2> (Eclipse Milestone 2)
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4700: NumLock and CapsLock disable accelerators (1GETDT9)  
-<br>6180: Wake mechanism broken on Motif  
-<br>6873: Decorations.setImage() throws NPE on WINCE  
-<br>7805: A new ImageData(from an InputStream) throwing NPE  
-<br>8133: When toolbar has focus, can't use mnemonics for File menus  
-<br>8213: exception: widget is disposed  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-10-26+22%3A11%3A18+%2B0000;chfieldto=2009-11-02+21%3A21%3A34+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3617 - Tuesday October 27, 2009</h2>
 
-
-
-<h2> SWT Build 2.0 023 - Tuesday January 22, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4610: StyledText - DCR - Word wrap (1GABS6C)  
-<br>4644: Mouse click on a link displayed in embedded IE5 ActiveX is not reliable (1GD7TT2)
-<br>5660: SWT default font's need to honor accesability settings  
-<br>6324: SWT.CLOSE implies rendering of Minimize and Maximize buttons  
-<br>6997: StyledText - mark new API  
-<br>7123: Shell shows the maximize button enabled when SWT.TITLE | SWT.BORDER | SWT.CLOSE style passed
-<br>7361: Add getOffsetAtLine API  
-<br>7632: Tree widget doesn't select item with focus on right-click  
-<br>7849: Labels on WINCE don't use background color of parent when color isn't set
-<br>7867: DCR: Delete checkSubclass method from Dialog  
-<br>7959: Potential problems when running on big endian machines  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-10-23+20%3A20%3A39+%2B0000;chfieldto=2009-10-26+22%3A09%3A20+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3616 - Saturday October 24, 2009</h2>
 
-<h2> SWT Build 2.0 022 - Tuesday January 15, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4663: Fail to tab the views. (1GGYV8T)  
-<br>4718: Tool tip is openning when on dragging. (1GF5Z7Z)  
-<br>5866: Can't multiselect in Tree using keyboard  
-<br>6592: Box for checkbox table items is too large when using large fonts
-<br>6770: Only the left mouse button should select in a Table.  
-<br>6852: StyledText - verify event character invalid value  
-<br>6940: MenuShortcuts only respond to Ctrl-N  
-<br>7190: Ctrl-S does not work  
-<br>7458: WinCE - top level Shells created through Display.asyncexec can have incorrect Z-order
-<br>7459: Caret leaving garbage  
-<br>7486: Cannot use keyboard Shift Select in a Tree  
-<br>7559: ScrollBar thumb is reset when ScrollBar is hidden, then shown
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-10-19+19%3A36%3A14+%2B0000;chfieldto=2009-10-23+20%3A18%3A44+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3615 - Tuesday October 20, 2009</h2>
 
-<h2> SWT Build 2.0 021 - Tuesday January 8, 2002 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4443: Layout: Exceptions when horizontalSpan > remaining columns (1FFC6XZ)
-<br>4462: ScrollBar - vbar.setMaximum does not work after hbar is hidden (and vice versa) (1FIG5CG)
-<br>4722: First editor tab missing close button (1GF7QIQ)  
-<br>4755: Rebuilding launcher from another directory (1GGNRG0)  
-<br>6315: Some perspective save confirmation messages cut off  
-<br>6352: Editor doesn't get activated when revealing first match  
-<br>6908: Menu handle leak in org.eclipse.swt.widgets.Menu.destroyItem(MenuItem)
-<br>6945: Child shells not displaying on WinCE  
-<br>6982: CheckedTables have no check boxes  
-<br>7005: Missing methods in SWT/GTK implementation  
-<br>7018: Tree does not honor SWT.CHECK style  
-<br>7068: ScrollBar.setVisible(true) does not work after changing values
-<br>7150: StyledText - bidi - partial styling of ligatures bug  
-<br>7191: Dialogs not big enough for content  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-10-05+19%3A46%3A47+%2B0000;chfieldto=2009-10-19+19%3A34%3A10+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3614 - Tuesday October 06, 2009</h2>
 
-<h2> SWT Build 2.0 020 - Tuesday December 18, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4715: First help click on a chapter is ignored (1GF5TV9)  
-<br>4784: MIF Files sometime fail (1GI7H7V)  
-<br>4797: Table does not use System fonts (1GIV4PZ)  
-<br>6635: WinCE: decorations.setMenuBar can be set only once  
-<br>6685: StyledText - on setFont caret not being positioned correctly  
-<br>6773: StyledText.computeSize uses display width to calculate number of visible lines
-<br>6790: Touching code assist scrollbar dumps javacore  
-<br>6863: Remaining issues in emulated CoolBar and CoolItem  
-<br>6933: Switching to help perspective crashes the workbench  
-<br>7014: Tree not accepting children  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-28+19%3A18%3A27+%2B0000;chfieldto=2009-10-05+19%3A45%3A03+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3613 - Tuesday September 29, 2009</h2>
 
-<h2> SWT Build 2.0 019 - Tuesday December 11, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4461: SWTException should overwrite printStackTrace(..) (1GLDW6P)  
-<br>4493: Check multilingual support on Windows 2000 (1FQFCBQ)  
-<br>4611: StyledText - StringIndexOutOfBounds exception inserting text in line break (1GEID8B)
-<br>4620: Workbench does not close ActiveX control's file handle (1GB76AZ)
-<br>4660: Moving  
-<br>4719: Background colour of views/editors (1GF6C8Y)  
-<br>4739: DCR: Provide auto-scrolling and expansion by default in the tree during DND (1GFW7NQ)
-<br>4767: Tab Folders can not be toggled using keys. (1GHFCZU)  
-<br>4780: YAM: Cannot read some JPEG files (1GI6ZEN)  
-<br>4783: Can't scroll to the top of the navigator (1GI7GTG)  
-<br>5071: Shift-TAB doesn't generate proper event  
-<br>5677: Hierarchy outline has empty space  
-<br>5857: Image.getImageData needs to support 15 bit color depth  
-<br>6472: Table widget has empty entries  
-<br>6572: Default background color of Lists and Combos not consistent with Win2K
-<br>6651: Text.setSelection() doesn't actually display the selection visually for SWT.SINGLE
-<br>6654: Text.getSelection() not returning correct info on WINCE  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-21+19%3A54%3A53+%2B0000;chfieldto=2009-09-28+19%3A16%3A37+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3612 - Tuesday September 22, 2009</h2>
 
-<h2> SWT Build 2.0 018 - Tuesday December 4, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4419: Widgets - Missing features and API on MOTIF (1FBPKCT)  
-<br>4494: ColorDialog doesn't open in VA/Java with JDK 1.2 (1FQGM6H)  
-<br>4833: Remove focus button from Table (1GK7MK4)  
-<br>4860: StyledText - StyledTextBidi, BidiUtil need doc (1GL32C8)  
-<br>6204: KeyListener on table does not work.  
-<br>6438: StyledText - bidi - isBidi test not working on XP  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-16+16%3A10%3A10+%2B0000;chfieldto=2009-09-21+19%3A53%3A19+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3611d - Thursday September 17, 2009</h2>
 
-<h2> SWT Build 2.0 017 - Tuesday November 27, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4714: Label draws wrong background when image is set (1GF0IC6)  
-<br>5503: Tabbing broken  
-<br>5986: BidiUtil handling of WM_INPUTLANGCHANGE needs to be fixed
-<br>5992: Changing Java Editor font in Preference Page makes Eclipse hang or crash
-<br>6171: NullPointerException in ImageLoader save method with SWT.IMAGE_JPEG
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-16+15%3A13%3A35+%2B0000;chfieldto=2009-09-16+16%3A08%3A38+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3611c - Thursday September 17, 2009</h2>
 
-<h2> SWT Build 2.0 015 - Tuesday November 20, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4791: StyledText does not switch colour (1GILHIW)  
-<br>4956: StyledText - change StyledTextBidi.toString to conform with standard SWT format
-<br>5599: StyledText - redrawRange does not check range  
-<br>5722: Selecting font crashes eclipse with a javacore  
-<br>5815: StyledText - setFont refresh problem  
-<br>5846: Combo.select does not ignore an out of range index
-<br>5990: Printing single page prints entire document  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-15+20%3A07%3A01+%2B0000;chfieldto=2009-09-16+15%3A12%3A02+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3611b - Wednesday September 16, 2009</h2>
 
-<h2> SWT Build 2.0 014 - Thursday November 15, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4542: Menu accelerators CTRL+ / and CTRL + SHIFT + / don't work (1FYAF8V)
-<br>4754: Arrow keys not accepted as keyboard accelerators (1GGM4U3)  
-<br>5815: StyledText - setFont refresh problem  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-14+20%3A18%3A30+%2B0000;chfieldto=2009-09-15+20%3A05%3A28+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3611a - Tuesday September 15, 2009</h2>
 
-<h2> SWT Build 2.0 013 - Tuesday November 13, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-4846: StyledText - bidi - partial styling of ligatures (1GL3AWT)  
-<br>4859: StyledText - bidi - provide solution for bidi coloring hack (1GL2UNC)
-<br>5491: StyledText - getStyleRangeAtOffset allows offset == getCharCount
-<br>5497: StyledText - ExtendedModify event not sent on setText
-<br>5602: StyledText - page down causes IllegalArgumentException in invisible/small widget
-<br>5615: StyledText - window start does not always work  
-<br>5622: StyledText - print causes NPE when invoked on empty widget  
-<br>5626: StyledText - print does not check for null Printer argument  
-<br>5633: StyledText - replaceTextRange and setText do not check for null argument
-<br>5664: StyledText - Single line should not accept tab  
-<br>5673: StyledText - SINGLE line mode still allows some multi line cursor navigation
-<br>5722: Selecting font crashes eclipse with a javacore
-<br>5725: Please rename "Eclipse Launcher"  
-<br>5802: EC: ControlExample does not run on Solaris  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-09-11+19%3A14%3A15+%2B0000;chfieldto=2009-09-14+20%3A17%3A03+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
+<h2>SWT Build 3611 - Saturday September 12, 2009</h2>
 
-<h2> SWT Build 2.0 012 - Monday November 5, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
 <blockquote>
-5470: User is lost when trying to move views around  
-<br>5484: Tab no longer traverses between widgets!!!  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-08-31+20%3A16%3A22+%2B0000;chfieldto=2009-09-11+19%3A12%3A50+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-<h2> SWT Build 2.0 011 - Thursday November 1, 2001 </h2>
-<h3>
-<a NAME="API Changes"></a>API Changes</h3>
-<code>FontData.setLocale(Locale)</code> has been changed to <code>FontData.setLocale(String)</code>.
-<ul>
-<li>
-J2SE code can simply create a <code>Locale</code> and invoke <code>toString()</code> to pass it onto the new <code>setLocale</code>.
-<li>
-CLDC code will have to form a string matching the format specified in the J2SE javadoc of <code>java.util.Locale.toString()</code>.
-</ul>
-Example:
-<blockquote><code><pre>
-Locale[] locales = {
-	Locale.US, new Locale("iw", "IL"), new Locale("ar", "SA"), new Locale("ru", "RU"),
-	Locale.GERMAN, new Locale("ja", "JP"),
-	null,
-};
-// old code: fd.setLocale(locales[i]);
-String locale = (locales[i] != null ? locales[i].toString() : null);
-fd.setLocale(locale);
-</pre></code></blockquote></p>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3610 - Tuesday September 01, 2009</h2>
 
 <blockquote>
-4664: StyledText does not compute correct text width (1GELJXD)  
-<br>4832: German: Fonts cannot handle German characters (1GKMHHY)  
-<br>4961: Preferences dialog disappears when you click on certain pages
-<br>5180: Open Motif for Linux shared libraries are duplicated in Eclipse  
-<br>5304: StyledText - ArrayIndexOutOfBoundsException in StyledTextBidi.segmentedRangesFor
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-08-24+20%3A09%3A31+%2B0000;chfieldto=2009-08-31+20%3A15%3A01+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 010 - Thursday October 25, 2001 </h2>
-
-<h3>
-<a NAME="Behaviour change"></a>Behaviour change</h3>
-<p>
-1) The Drag Under effect of scrolling and expanding items as you drag over the <code>Tree</code> or <code>Table</code> has been added.  To enable this drag under effect, in the <code>DragOver</code> event set the <code>event.feedback</code> to have a bitwise combination of <code>DND.FEEDBACK_SCROLL, DND.FEEDBACK_EXPAND</code> and (<code>DND.FEEDBACK_SELECT, DND.FEEDBACK_INSERT_BEFORE, DND.FEEDBACK_INSERT_AFTER</code>) - where the last three items are mutually exclusive.
-<blockquote><code><pre>
-target.addDropListener (new DropTargetAdapter() {
-	public void dragOver(DropTargetEvent event){
-		event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
-	}
-}
-</pre></code></blockquote></p>
-<p>
-2) On some operating systems it is preferred to move files in a drag and drop operation rather than for the drop target to make a copy of the file and the drag source to delete the original file.  The operation of moving the file is preformed by the drop target.  For these cases, the new drop type <code>DND.DROP_TARGET_MOVE</code> has been added.  The Eclipse <code>DropTarget</code> does not support this behaviour but the Eclipse <code>DragSource</code> can recognize this scenario.  If another application has chosen to move the file rather than copy/delete, the <code>DragFinished</code> event on the <code>DragSource</code> will have an <code>event.detail</code> value of <code>DND.DROP_TARGET_MOVE</code>.
-<blockquote><code><pre>
-source.addDragListener (new DragSourceAdapter () {
-	public void dragFinished(DragSourceEvent event) {
-		if (event.detail == DND.DROP_TARGET_MOVE) {
-			// clean up presentation but do not delete underlying file
-		}
-	}
-}
-</pre></code></blockquote></p>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3609 - Tuesday August 25, 2009</h2>
 
 <blockquote>
-1767: Display ASCII for values greater than 127 fails (1GLE8I5)  
-<br>4725: FontData spec should disallow null name (1GL34H3)  
-<br>4844: Tab appears narrower than space (1GL2WTY)  
-<br>4852: German: Cannot start Eclipse in Linux 7.2 (1GKYY99)  
-<br>4865: TableTreeEditor.getItem returns an item after setting it to null (1GLE0IQ)
-<br>4932: StyledTextBidi has equals but no hashCode method  
-<br>4957: StyledText - implement StyledTextBidi.isLigated  
-<br>5132: StyledText - remove hardcoded margin  
-<br>5178: Change BidiUtil calls to handle true Unicode/Windows CE changes
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-08-17+19%3A37%3A27+%2B0000;chfieldto=2009-08-24+20%3A08%3A13+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-<h2> SWT Build 2.0 009 - Thursday October 18, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3608 - Tuesday August 18, 2009</h2>
 
 <blockquote>
-4444: EWT - incorrect selection feedback when the item's text is changed (1FFP3U2)
-<br>4446: DCR - GridBagLayout compatible LayoutManager (1FGCPO2)  
-<br>4762: StyledText - default lineStyler remove line background color hack (1GHBMUV)
-<br>4819: StyledText - bidi - cursor navigation (1GJLKSN)  
-<br>4820: StyledText with style SINGLE does not handle CR/LF well (1GJM2Z5)
-<br>4855: Severe: Check boxes are black (1GL0XSI)  
-<br>4909: EC: Combo.setText doesn't work on Linux  
-<br>4910: EC: Combo.select() fires a selected event on Linux only  
-<br>5045: Control.moveAbove() throws NPE if argument is null  
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-08-10+20%3A24%3A57+%2B0000;chfieldto=2009-08-17+19%3A36%3A10+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 008 - Thursday October 11, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3607 - Tuesday August 11, 2009</h2>
 
 <blockquote>
-1GLDQYB: SWT:WIN - Text widget with DND enabled, MouseDown but no MouseUp
-<br>1GLADBK: SWT:ALL - StyledText - getOffsetAtLocation should throw exception
-<br>1GL4ZVE: SWT:ALL - StyledText - getOffsetAtLocation(getLocationAtOffset(N)) != N
-<br>1GKO6NY: SWT:ALL - Backspacing in StyledText does not fire selection changed
-<br>1GKB1OC: ITPJUI:ALL - Error in JavaDoc hover help
-<br>1GK9API: SWT:ALL - StyledText - bidi - numbers,mixed LtoR/RtoL text and caret positioning
-<br>1GJLQ16: SWT:ALL - StyledText - bidi - backspace and delete behavior
-<br>1GIK7D4: SWT:ALL - StyledText - Selection cleared when deletion disallowed by verify listeners
-<br>1GDOMBI: SWT:WINNT - StyledText - redrawRange() doesn't checkWidget
-<br>1GDKK3R: SWT:WINNT - StyledText - setCaretOffset and line delimiters bug
-<br>1FMRQOT: SWT:ALL - No null argument checks in Dialog constructors
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-08-05+16%3A06%3A23+%2B0000;chfieldto=2009-08-10+20%3A23%3A47+%2B0000;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 007 - Thursday October 4, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3606 - Thursday August 06, 2009</h2>
 
 <blockquote>
-1GKZH74: ITPJUI:WIN2000 - Disappearing Stop icon
-<br>1GKZ8CV: SWT:WINNT - setSelection triggers SelectionChanged event
-<br>1GKU4C5: SWT:ALL - StyledText - bidi - scrolling to show cursor should take cursor direction into account
-<br>1GKPYMK: SWT:WINNT - StyledText - bidi - caret moves when switching keyboard from Hebrew to Arabic
-<br>1GKOGQO: SWT:ALL - Javadoc: setSelection in Button and ToolItem
-<br>1GKM2O5: SWT:WINNT - StyledText - bidi - ArrayIndexOutOfBounds exception in StyledTextBidi.isRightToLeft
-<br>1GKM193: SWT:WINNT - StyledText - bidi autoscroll left does not always scroll all the way to the left
-<br>1GKKC0U: SWT:ALL - Tracker calls OS.DispatchMessage(msg) on windows but does not on Linux.
-<br>1GIVAXX: SWT:ALL - StyledText - Editors should support shift-backspace
-<br>1GELQ14: SWT:WINNT - StyledText - DefaultContent - handle weird line delimiter cases
-<br>1GE8LG0: SWT:Linux - Toolbar is not showing the separators.
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-07-27+19%3A47%3A35+%2B0000;chfieldto=2009-08-05;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 006 - Thursday Sept 27, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3605 - Tuesday July 28, 2009</h2>
 
 <blockquote>
-1GHWA19: SWT:WINNT - Problem with callbacks from CCombo
-<br>1GHFDPV: SWT:WIN2000 - Setting selection in Table does not update focus item
-<br>1GF644V: ITPUI:Linux - Unzoom is changing the active editor.
-<br>1GKM3XS: SWT:WINNT - StyledText - bidi autoscroll left: selection reset on mouse move
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-07-21+14%3A10%3A08+%2B0000;chfieldto=2009-07-27;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 005 - Friday Sept 21, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3604a - Wednesday July 22, 2009</h2>
 
 <blockquote>
-1GK09Z0: SWT:Linux - setEnabled(false) has no effect on aToolbar
-<br>1GJZZS6: SWT:Linux - File Dialog returns a directory
-<br>1GF7SMC: ITPUI:Linux - Wrong bg for close button on editor tab
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-07-20+21%3A26%3A12+%2B0000;chfieldto=2009-07-21;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 004 - Thursday Sept 13, 2001 </h2>
-
-<h3>
-<a NAME="API Behaviour change"></a>API Behaviour change</h3>
-The behaviour of dispose for GCs has been modified such that attempting to dispose of
-a GC on a control <em>after</em> the control has been disposed will generate an
-SWTException.  This fixes an OS resource leak and potential GPF situation.
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3604 - Tuesday July 21, 2009</h2>
 
 <blockquote>
-1GJUAKL: SWT:Neutrino - Control.internal_new_GC() needs !isValidWidget() check
-<br>1GJN52N: SWT:Linux - Text prints system error message for horizontal scrollbar
-<br>1GJBOAV: SWT:ALL - ScrolledComposite bugs
-<br>1GIXELI: SWT:ALL - Need Caret to allow bitmaps so bidi caret can be created
-<br>1GI5O1T: SWT:WINNT - Composite.setFocus takes focus when it should not
-<br>1GHOND7: SWT:WIN2000 - Selection problem with single-selection trees
-<br>1GHG990: SWT:ALL - Probable bug in Slider page increment setting
-<br>1GENJ60: SWT:ALL - ScrolledComposite should include example in its class comment
-<br>1GEA7K7: ITPUI:Linux - Default button not working
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;target_milestone=;chfieldfrom=2009-07-10+19%3A02%3A21+%2B0000;chfieldto=2009-07-20;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-
-<h2> SWT Build 2.0 003 - Friday Sept 07, 2001 </h2>
-
-<h3>
-<a NAME="New APIs"></a>New APIs</h3>
+<h2>SWT Build v3603 - Saturday July 11, 2009</h2>
 
 <blockquote>
-FontData.setLocale(java.util.Locale) added
-<br>Caret.getImage() added
-<br>Caret.setImage(Image) added
-<br>GC.fillGradientRectangle(int, int, int, int, boolean) added
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;chfieldfrom=2009-07-03;chfieldto=2009-07-10;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build v3602 - Tuesday July 07, 2009</h2>
 
 <blockquote>
-1GJM7KM: SWT:Linux - Table and Tree return a different size for every second call to computeSize
-<br>1GJLKHE: SWT:SPARC - GP on "Installed JREs" preference page
-<br>1GJLK63: SWT:ALL - StyledText - bidi - keyboard switching
-<br>1GJLE36: SWT:WINNT - Alpha data redrawing improperly after occlusion
-<br>1GJA2L7: SWT:WIN - Different behavior for GC.drawString() args on Win vs. Photon
-<br>1GIZ0P6: SWT:WINNT - GC.drawImage() problem with transparent pixels
-<br>1GIXELI: SWT:ALL - Need Caret to allow bitmaps so bidi caret can be created
-<br>1GI7FQF: SWT:ALL - Can't set focus to Tasks View by Keyboard
-<br>1GI7EBL: SWT:Linux - api typo: ToolItem>>getDisabledmage()
-<br>1GI3P86: SWT:ALL - Semantic differences between emulated Table and Tree codebase on Motif and Photon
-<br>1GI1WEA: SWT:Neutrino - Text selection code not working correctly
-<br>1GHWED2: SWT:WINNT - GC.stringExtent() not correct for Windows Arial font
-<br>1GHWB7G: SWT:Linux - Linux font dialog doesn't open with given values.
-<br>1GHVRFY: SWT:Neutrino - Text#ClearSelection changes the CaretPosition in a SINGLE-line widget
-<br>1GHVLV6: SWT:Neutrino - Text#SetTopIndex and getTopIndex inconsistent
-<br>1GHOJ6T: SWT:Neutrino - Text#setSelection inconsistent between SINGLE and MULTI
-<br>1GHBLRA: SWT:Neutrino - Display.getBounds() returns incorrect info
-<br>1GH48UQ: SWT:Neutrino - Enter key does not insert new line with Text.MULTI widget
-<br>1GGT0TM: SWT:Neutrino - GC#drawArc inconsistent between NT and NTO
-<br>1GG1DBT: SWT:SPARC - Solaris loses input characters
-<br>1GG07HW: SWT:Linux - Tree.getItem() modifies its argument on Motif
-<br>1GG0069: SWT:Linux - Weird layout issues seen in Control Example
-<br>1GFZZLK: SWT:Linux - ToolItems not disabled when containing ToolBar is disabled
-<br>1GFZU3X: SWT:ALL - ImageLoader.load(String) not closing file input stream
-<br>1GFZPDP: SWT:Linux - Combo box with SWT.SIMPLE style does not respect Disabled flag (visually)
-<br>1GFW85H: SWT:ALL - Printer.getPrinterData() has stale comment
-<br>1GFW6MQ: SWT:ALL - DCR: Program class needs .equals() and .hashCode()
-<br>1GFW4YN: SWT:ALL - Help KevinH add printing to Eclipse
-<br>1GFQKDT: SWT:ALL - Image.setBackground() / getBackground() asymmetry
-<br>1GFONVW: SWT:Linux - Empty Combo should not fire Selection event
-<br>1GFL0HP: SWT:Linux - Remaining items in SWT comments to fix
-<br>1GET90D: SWT:Linux - SWTExceptions bring down Eclipse
-<br>1GESQBK: ITPJUI:WINNT - How to get access to pop-up menus of the Java editor ?
-<br>1GELX4A: ITPUI:ALL - Hover help is not visible if pane is dragged out of workbench
-<br>1GEHWAF: ITPUI:WIN2000 - Can't enter text in a Swing TextField or TextArea
-<br>1GE5ECJ: ITPUI:WIN2000 - Hover help for title bar buttons appears behind detached view
-<br>1GDX7R8: ITPUI:ALL - SWT setText() does NOT have any way to avoid making mnemonics.
-<br>1GD5UHA: SWT:WIN2000 - Double-clicking on toolbar item gives double-click event on toolbar
-<br>1GBXIEO: SWT:ALL - DCR: Include cursor pos in Tracker move event
-<br>1G4IMQ3: SWT:WINNT - Table images incorrect after rapid removal and creation
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;chfieldfrom=2009-06-29;chfieldto=2009-07-06;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-<h2> SWT Build 2.0 002 - Wednesday July 18, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<h2>SWT Build 3.601 - Tuesday June 30, 2009</h2>
 
 <blockquote>
-1GGZ13T: SWT:Neutrino - invalid mouse state occuring in Photon
-<br>1GGRCCS: SWT:Neutrino - Label does not wrap in SWT0125
-<br>1GGAON2: SWT:ALL - Scaling image with alphas does not work correctly
-<br>1GFZQVQ: SWT:Linux - Vertical ProgressBar grows incorrectly
-<br>1GFQA18: SWT:Linux - Cheese with GC drawRoundedRectangle() on Motif
-<br>1GFPK6G: SWT:Linux - Motif fillPolygon() specifies improper hint
+<a href=https://bugs.eclipse.org/bugs/buglist.cgi?bug_file_loc=;bug_file_loc_type=allwordssubstr;bug_id=;bugidtype=include;chfield=resolution;chfieldfrom=2009-06-23;chfieldto=2009-06-30;chfieldvalue=FIXED;classification=Eclipse;component=SWT;email1=;email2=;emailtype1=substring;emailtype2=substring;field-1-0-0=classification;field-1-1-0=product;field-1-2-0=component;field0-0-0=noop;keywords=;keywords_type=allwords;long_desc=;long_desc_type=allwordssubstr;product=Platform;query_format=advanced;remaction=;short_desc=;short_desc_type=allwordssubstr;status_whiteboard=;status_whiteboard_type=allwordssubstr;type-1-0-0=anyexact;type-1-1-0=anyexact;type-1-2-0=anyexact;type0-0-0=noop;value-1-0-0=Eclipse;value-1-1-0=Platform;value-1-2-0=SWT;value0-0-0=;votes=;query_based_on=>Bugs fixed</a>
 </blockquote>
 
-
-<h2> SWT Build 2.0 001 - Thursday July 12, 2001 </h2>
-
-<h3>
-<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
-
-<blockquote>
-1GGET76: SWT:Neutrino - Canvas does not respond to setFocus()
-<br>1GGAS5P: SWT:Neutrino - Photon on QNX 6.1.x needs SWT native changes
-<br>1GG96RO: SWT:Neutrino - drawOval and fillOval not compatible
-<br>1GG8ZLV: SWT:WINNT - drawOval behaves differently on Windows vs. other platforms
-<br>1GFKYD9: SWT:Linux - -HANG- (Xserver) When perfoming display.wake() in a DND dragStart()
-<br>1GFKK37: SWT:Linux - FileViewer examples issues
-<br>1GFBHX6: SWT:ALL - CTabItem tool tip flashing
-<br>1GF9ZMT: SWT:SPARC - 8-bit Icons are losing colors
-<br>1GF9ZJG: SWT:SPARC - Icons are being masked incorrectly on Solaris
-<br>1GF9YHD: ITPUI:WIN2000 - SWTException: help view
-<br>1GF9Y32: SWT:SPARC - 24-bit MSB Icons are wrong color (greenish)
-<br>1GF0D05: SWT:Linux - GPFs when running JUnit TestRunner in J9 AWT
-<br>1GEUZZC: SWT:ALL - "Name" of plugin inconsistant with other plugins
-<br>1GETDP5: ITPUI:Linux - NPE while closing editor on linux
-<br>1GDVRT5: SWT:Neutrino - Alpha channel memory leak
-<br>1GDRXZR: ITPJUI:Linux - SWT: Context-Menus issue under Linux 
-<br>1GD0OSK: SWT:ALL - API - package javadoc for SWT packages missing
-<br>1GCHS75: SWT:WINNT - workbench exits during expand collapse
-<br>1GCFUS0: SWT:ALL - CTabFolder "floating" X sticks sometimes
-<br>1GAR95O: SWT:ALL - Remove Smalltalk comments from SWT code
-<br>1GAQRND: SWT:ALL - DOC: Write good Javadoc comments for all of SWT
-<br>1G97I28: SWT:Linux - Tool bar buttons do not always work
-<br>1G84AZB: ITPDUI:ALL - Rename truncates name
-<br>1G845EZ: SWT:WIN2000 - Spec for Layout.computeSize() is truncated
-<br>1G7YXLB: SWT:WIN - StyledText - NLS Support
-<br>1G7NSHR: SWT:ALL - Widget.addListener(int, Listener) vs. adding typed listeners
-<br>1G4XDJO: SWT:Linux - Tree needs to display an insert marker
-<br>1G0Y8NZ: SWT:ALL - Combo box doesn't send key and mouse events 
-<br>1FXAVLF: SWT:WINNT - Disabled toolbar icons don't adapt to appearance changes
-<br>1FV1S18: SWT:ALL - Need more WM_* messages passed to ActiveX Control
-<br>1FTWX55: SWT:ALL - Inconsistant commenting of which SWT objects need to be disposed.
-</blockquote>
+Click <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt/oldnotes_swt.html?view=co">here</a> for older builds<br>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.swt/oldnotes_swt.html b/eclipse/plugins/org.eclipse.swt/oldnotes_swt.html
new file mode 100644
index 0000000..8e0f02a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/oldnotes_swt.html
@@ -0,0 +1,9315 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+   <meta name="Author" content="IBM">
+   <title>Eclipse Platform Build Notes - SWT</title>
+</head>
+<body> 
+
+<h1>
+Eclipse Platform Build Notes<br>
+SWT</h1>
+
+<h2> SWT Build 3.5 50a - Thursday June 04, 2009</h2>
+<blockquote>
+279042 Cocoa: top-level menus not updated as you switch between editors
+</blockquote>
+
+<h2> SWT Build 3.5 50 - Wednesday June 03, 2009</h2>
+<blockquote>
+277713 Crash (probably opening dialog with progress reporting in it) 
+</blockquote>
+
+<h2> SWT Build 3.5 49 - Tuesday May 26, 2009</h2>
+<blockquote>
+261206   Console view: Copy is disabled after double-click to select word
+<br>277442 	BlockSelection: Exception and crash while RTL orientation
+<br>277631 	Cannot move cursor after cancelling IME input by pressing escape key.
+<br>277268 	[Forms] section header labels are cut off on Gtk
+<br>277437 	[Cocoa] GC#drawText font background issue 
+</blockquote>
+
+<h2> SWT Build 3.5 48h - Monday May 25, 2009</h2>
+<blockquote>
+273570 Unable to create view ID org.eclipse.jdt.ui.PackageExplorer: An unexpected exception was thrown. in existing workspace only 
+</blockquote>
+
+<h2> SWT Build 3.5 48g - Thursday May 21, 2009</h2>
+<blockquote>
+276564    	Eclipse won't launch using JDK 7 because SWT native libraries don't load
+<br>277193 	Graphics drawing in unwanted places when scrolling bundles in a launch config
+<br>277235 	Accessibility Control Example ClassCastException
+<br>277285 	Cursor position does not change while typing in Japanese input method program
+<br>277314 	Cocoa - Application crashes while copying an image 
+</blockquote>
+
+<h2> SWT Build 3.5 48f - Wednesday May 20, 2009</h2>
+<blockquote>
+274925    	Drag view shows outline in wrong location with multiple monitors
+<br>276532 	Debug toolbar button glows, key bindings stop working
+<br>277173 	ToolItems and Buttons are not accessible on Cocoa (regression)
+<br>276485 	BlockSelection: copying block only fills with spaces when folding enabled
+<br>276506 	BlockSelection: Paste should end with long caret
+<br>276516 	BlockSelection: Arrow_Left and Arrow_Right should set caret to beginning/end of selection
+<br>276854 	BlockSelection: Shift+Click does not work with normal caret
+<br>276569 	Cocoa: exception gets logged when opening views while a detached view exists
+<br>277195 	FileDialog NPE's when attempting to upload an attachment with Mylyn
+<br>276531 	Selection jumps in tree
+<br>276553 	Cocoa: Menus completely gray after drag-and-drop to detached view 
+<br>277175	Accessibility - Console message printed when custom control has focus
+<br>277193 	Graphics drawing in unwanted places when scrolling bundles in a launch config
+</blockquote>
+
+<h2> SWT Build 3.5 48e - Tuesday May 19, 2009</h2>
+<blockquote>
+275935 	[babel] update NLS string files
+<br>276683 	Tree item icons drawn into next column
+<br>276760 	GC#drawRoundRectangle(..) draw too big radii on Cocoa
+<br>276826 	Compile warning in official build 
+</blockquote>
+
+<h2> SWT Build 3.5 48d - Monday May 18, 2009</h2>
+<blockquote>
+223703    	FileDialog.setOverwrite(boolean) does nothing on Cocoa
+<br>275945 	[clipboard] regression: pasting text from file properties to java editor seems to be in wrong format
+<br>275552 	Font loading slow for font that is not there (ie. 'Sans Serif')
+<br>275875 	crash: Cmd+Q only closes first shell in SnippetLauncher
+<br>276131 	Browser Test crashing 
+</blockquote>
+
+<h2> SWT Build 3.5 48b - Wednesday May 13, 2009</h2>
+<blockquote>
+275631	Ctrl+Tab key binding works incorrectly.
+<br>275913 	StyledText with block selection: Typing at virtual caret on empty line inserts char after caret
+</blockquote>
+
+<h2> SWT Build 3.5 48a - Monday May 11, 2009</h2>
+<blockquote>
+274925		Drag view shows outline in wrong location with multiple monitors
+</blockquote>
+
+<h2> SWT Build 3.5 48 - Friday May 8, 2009</h2>
+<blockquote>
+274274    	NPE in Accessible#removeAccessibleListener() if called from dispose listener
+<br>180176 	[OLE] [EditorMgmt] Strange behavior while opening default gif editor
+<br>236630 	[OLE] Saving docx file will corrupt the file and produce OLE exception
+<br>267884 	Select All does not work in TextEditor Example with block selection
+<br>270316 	[OLE] Failure save 2003 Word document with embedded Word 2007 editor
+<br>270495 	Improving performance of ImageData.blit and Image.init methods
+<br>270676 	StyledText : text selection stops when mouse cursor leaves the x-axis
+<br>273354 	Form Feed (\f) makes StyledText go crazy
+<br>274931 	StringIndexOutOfBoundsException in Program.getImageData(*)
+<br>275484 	OleClientSite#isDirty QueryInterface IIDIPersistFile but creates IPersistStorage
+<br>254861 	Gtk SWT should set window type hint for SWT.BALLOON tooltips
+<br>262981 	GC#drawText could use data.stringWidth and data.stringHeight
+<br>275459 	Test failures in GC on I20090507-2000
+<br>253230 	Implement preferred size for scrolled widgets (text, tree, table ...)
+<br>269198 	[Browser-IE] Cannot register a function for the whole browser's lifetime.
+<br>271029 	No menu bar items with Mozilla Browser (XULRunner 1.9.0.7)
+<br>272401 	[browser] [KeyBindings] copy and paste key bindings not working in embedded browser
+<br>275207 	[Browser] crash when showing text entry prompter
+<br>252109 	[Clipboard] Mac: When you copy text to the clipboard from a StyledText widget, the text uses the wrong end-of-line sequence
+<br>266172 	Shell setFullScreen not implemented
+<br>274120 	Update progress bar from UI thread does not work on Cocoa
+<br>274141 	[content assist] Additional info of newly selected proposal not shown
+<br>275220 	Printing java file causes crash
+<br>273099 	Save As.. dialog is not seeded with selection's file name
+<br>273953 	[carbon] DeviceResourceException on certain images
+<br>274001 	Rollover tooltips for all truncated tree and table items
+<br>274161 	Cannot create circular Shell on Cocoa
+<br>274273 	Accessibility - Window not allowing programatic reposition or resize
+<br>274385 	Control-click for context menu loses multi-selection
+<br>274387 	Old dragging behavior when tree/table item is not selected
+<br>165033 	Table vertical lines always showing 
+</blockquote>
+
+<h2> SWT Build 3.5 47 - Tuesday May 5, 2009</h2>
+<blockquote>
+274890  SWT crash  
+<br>274931  StringIndexOutOfBoundsException in Program.getImageData(*)  
+<br>245278  [DateTime] ignores User's keyboard input  
+<br>274271  SHEET Javadoc issues  
+<br>274655  Build Cairo on Solaris SPARC  
+<br>274696  Checkbox Tree wastes a lot of space beween box and item  
+</blockquote>
+
+<h2> SWT Build 3.5 46 - Monday May 4, 2009</h2>
+<blockquote>
+273661  [KeyBindings] copy/paste doesn't always work in dialogs  
+<br>274230  Using content assist in the new Java class wizard crashes the VM  
+<br>273688  N20090424-2000 swt contains 3542.dll but wants 3543  
+<br>264560  hard crash upon opening internal browser on mac  
+<br>250501  Control.print(GC) does not work correctly  
+<br>274409  tag projects changed since I20090421-0930 build - swt  
+<br>274295  Did you mean "image/jpeg"?  
+<br>165251  Not enough information in Calendar control's SelectionEvent  
+<br>259028  Implement AWT/Swing interop  
+<br>274538  Shells with SWT.SHEET do not hide with setVisible(false) (only when disposed)  
+<br>274188  create caret from image does not work  
+<br>274302  Nested GridLayouts cut content if inner grabs vertical space  
+<br>274169  drawing problem after inserting Bullet into StyledText  
+<br>274529  All build.xml files must be updated to get the .api_description file  
+<br>274344  [64] [DND] Snippet282 crashes  
+<br>274194  FocusEvents and Control#isFocusControl() don't match up  
+</blockquote>
+
+<h2> SWT Build 3.5 45 - Wednesday April 29, 2009</h2>
+<blockquote>
+165251 	Not enough information in Calendar control's SelectionEvent
+<br>250501 	Control.print(GC) does not work correctly
+<br>264560    	hard crash upon opening internal browser on mac
+<br>272276 	DBCS3.5:Selecting korean text and right clicking on eclipse editor results in deletion of those characters.
+<br>274409	tag projects changed since I20090421-0930 build - swt
+</blockquote>
+ 
+<h2> SWT Build 3.5 44 - Monday April 27, 2009</h2>
+<blockquote>
+52789    	DCR: No pageOrientation in PrintData?
+<br>135638 	StyledText ignores alignment with style SWT.SINGLE
+<br>159465 	Accessibilities: Improve traverse order for SWT ToolBar
+<br>268529 	SWT.Error when using mouse click cell editor activation
+<br>272412 	Checkboxes with images have incorrect image alignment
+<br>273492 	[Mac] Test failure in Bug43610Test.testShiftAlt on Cocoa
+<br>273521 	Toolbar: tooltip shows at 0,0 when hot item moved by key with mouse over item
+<br>273631 	Second call to fillRectangle/fillOval uses black background instead of the declared one
+<br>273635 	Command+click to deselect one of a multi-selection doesn't work
+<br>273919 	getOffset(int,int,int[]) fails for empty lines ("\n")
+<br>273925 	Advice to p2 metadata generation
+<br>273939 	toolitems can't be traversed when the toolbar has tabitem siblings 
+</blockquote>
+
+<h2> SWT Build 3.5 43 - Sunday April 26, 2009</h2>
+<blockquote>
+23618    	Printing - copyCount field in PrinterData is useless
+<br>52789 	DCR: No pageOrientation in PrintData?
+<br>254497 	traverser always happen to all controls
+<br>268529 	SWT.Error when using mouse click cell editor activation
+<br>271310 	[Presentations] BIDI3.5:HCG_Wrong repaint of mirrored windows on linux
+<br>271384 	Safari - Open Link in New Window does not load link in new window
+<br>271691 	outline not implemented in Path.contains
+<br>271726 	DBCS3.5: Java Editor can not copy DBCS correctly into WordPad
+<br>272046 	clipping of PaintItem events for Trees is inconsistent across platforms
+<br>272212 	Add Solaris x86 build support
+<br>272412 	Checkboxes with images have incorrect image alignment
+<br>272833 	Context menus outdated on right-click because MenuDetect fires before Selection event
+<br>272834 	Rollover tooltips on every Tree and Table item
+<br>272835 	Rollover tooltips wrongly placed on Tree and Table items with images
+<br>273083 	Create a MessageBox with SWT.SHEET style gives 2 apple menus
+<br>273095 	Can't insert characters into a StyledText using the Character Palette on OS X
+<br>273117 	BlockSelection: setBlockSelectionRectangle should not clamp selection width to renderer width if client area allows a larger selection
+<br>273256 	Cleanup duplicated string in properties files
+<br>273280 	Link widget does not handle single quote (') for href attribute
+<br>273521 	Toolbar: tooltip shows at 0,0 when hot item moved by key with mouse over item 
+</blockquote>
+
+<h2> SWT Build 3.5 42 - Tuesday April 21, 2009</h2>
+<blockquote>
+182753    	[Browser] SWT Browser does not reload images when they change
+<br>222783 	[Table & Tree] Cocoa moveable columns do not work
+<br>239556 	[Java Editor]Space character is NOT displayed after a Korean character
+<br>253056 	BlockSelection: add get/setBlockSelectionRectangle to StyledText
+<br>261391 	StyledText should use PDE API Tools @noextend
+<br>267038 	[expressions] Edit watch expression action is never enabled
+<br>267680 	embedded browser cache does not reset
+<br>269566 	mylyn - two tooltips in task list
+<br>270176 	main shell unresponsive after a dialog was opened while shell minimized
+<br>271179 	findProgram("a.null and void") returns Text Edit instead of null
+<br>271726 	DBCS3.5: Java Editor can not copy DBCS correctly into WordPad
+<br>272075 	Spaces/Tabs are not added after multibyte characters in Java Class.
+<br>272156 	NPE in Display.applicationDelegateProc(..) when creating display
+<br>272259 	NPE in Display.runAsyncMessages(..) on quit
+<br>272592 	Issues with PNG images on Cocoa
+<br>272616 	GB18030: 4-byte GB18030 displayed as ? in SWT Clipboard RTFTransfer.
+<br>272631 	SWT error when initializing GC
+<br>272710 	transparent png has black background
+<br>272808 	XULRunner doesn't work in Eclipse >= 3.5M6
+<br>272827 	CCE in Text.getLineHeight()
+<br>272868 	Explicit class pre-initialization breaks "new Display()" on motif 
+</blockquote>
+
+<h2> SWT Build 3.5 40 - Tuesday April 14, 2009</h2>
+<blockquote>
+188320    	Possible Deadlock in JFace ModalContext
+<br>253229 	Implement SWT.Settings for Display
+<br>259687 	[Browser] Javascript executes asynchronously with xulrunner 1.9
+<br>263508 	Click and drag behavior in Tables and Trees different from other Cocoa apps
+<br>267507 	Progress bar in progress view shines through fast view
+<br>269924 	SWT Text Control getCaretLocation returns NULL for Style SWT.MULTI
+<br>270036 	UI Test Suite does not run to completion.
+<br>270280 	Debug test suite crashes on cocoa
+<br>270382 	Drag and drop to Tree does not update cursor
+<br>270954 	Eclipse crashes when trying to print code with a scale different from 100%.
+<br>271088 	VM crash starting with N20090402-2000
+<br>271336 	Test failures on Mac OS
+<br>271634 	[cocoa] Display loads hardcoded english nib file
+<br>271677 	context menu widget disposed exception
+<br>271697 	Shell print(GC) not implemented
+<br>271904 	Checkbox takes too much space to the right 
+</blockquote>
+
+<h2> SWT Build 3.5 40 - Tuesday April 7, 2009</h2>
+<blockquote>
+185204    	[CTabFolder] CTabItem.drawClose could preserve color
+<br>226973 	On Linux, TableColumn#getWidth() sometimes incorrectly returns 0.
+<br>239477 	Crash in ScriptStringOut
+<br>240033 	[Viewers] 'Dialog refresh' has encountered a problem
+<br>246408 	Parent Composite gets MouseEntered event when mouse enters a control
+<br>262694 	[e3.5][mac] Add CC text field content assist doesn't work
+<br>269383 	Compiler warnings in N20090318-2000
+<br>270179 	MouseHover event always has empty stateMask
+<br>270381 	Drag and drop to Tree does not show drop target selection feedback
+<br>270406 	CTabFolder.setBackground(Image) should be deleted
+<br>270544 	caret line highlight leaves screen artifacts
+<br>270654 	Scale does not fire selection events
+<br>270663 	Combo.select() causes SelectionEvent
+<br>270670 	CTabFolder should not cache borderColor
+<br>270858 	Display.post failing in test suite
+<br>270861 	[Browser] don't use InitXPCOM2 to initialize xulrunner
+<br>270880 	Combo does not fire SWT.Modify immediately on select(int)
+<br>271017 	Compiler warnings in N20090401-2000
+<br>271026 	"Quick Type Hierarchy" window briefly appears, then disappears.
+<br>271027 	Failure in JFace test suite related to virtual table
+<br>271129 	Changes from 240033 causes java.lang.UnsatisfiedLinkError at org.eclipse.swt.internal.gtk.OS.g_object_notify
+<br>271340 	Region.contains always returns false on MacOS Cocoa port (3.5M6) 
+</blockquote>
+
+
+<h2> SWT Build 3.5 39 - Tuesday March 31, 2009</h2>
+<blockquote>
+136515    	[OpenGL] Support shared context for GLCanvas
+<br>213194 	[Browser] setText crash with xulrunner 1.9 stream
+<br>222863 	No horizontal scrollbars in List
+<br>242388 	[FastView] Unhandled event loop exception: NPE in ToolBarManager.update
+<br>251608 	Artificial bold and italic style to font
+<br>255070 	cocoa_new() functions leaking?
+<br>267126 	SWTException evaluating JS with Sarfari
+<br>267276 	NPE in tooltip code
+<br>268181 	Screen cheese after switching compare provider
+<br>268702 	[CellEditors] Selecting a cell erases the other cells on Mac OSX Cocoa
+<br>268724 	TRAVERSE_PAGE_NEXT events don't get through StyledText
+<br>269606 	Wrong default new text line delimiter on Mac/Cocoa
+<br>269950 	Combo.setText does nothing in read-only mode
+<br>270140 	MessageDialog spews warning on gtk 2.4.13
+<br>270177 	SWT - DateTime component is broken on MAC cocoa 64 bits.
+<br>270262 	Leaks in ToolTip
+<br>270379 	Main menu is not closed when dialog opens asynchronously
+<br>270500 	[mac] TrayItem menus should be drop downs rooted to the menu bar (COCOA) 
+</blockquote>
+
+<h2> SWT Build 3.5 38 - Tuesday March 24, 2009</h2>
+<blockquote>
+210871    	Toolbar combo box multiple glitches
+<br>213185 	DropTargetEvent does not mention DND.DROP_DEFAULT
+<br>251608 	Artificial bold and italic style to font
+<br>253065 	Window -> Show View -> Other ... is broken
+<br>253217 	Implement GC.copyArea()
+<br>253226 	Implement widget attributes (foreground, background, font, background image)
+<br>257003 	SWT controls: discrepancy in the application of Background Image
+<br>259027 	Implement internationalization
+<br>262694 	[e3.5][mac] Add CC text field content assist doesn't work
+<br>264744 	Display.post() not implemented
+<br>265990 	[website] Please provide visibility for swtbot on the swt home page
+<br>266171 	Text getCaretLocation not implemented.
+<br>266200 	Vuze menu says "About SWT"
+<br>267468 	[SWT_AWT] Browser.print(GC) flickers
+<br>267894 	computeSize of Tree/Table is wrong
+<br>267895 	StyledText block selection: cut & paste should give original text
+<br>268584 	update swt custom build scripts to support new publishing task
+<br>268649 	image not shown in check and radio buttons
+<br>268745 	StyledText makes CTabFolder send same KeyDown event multiple times
+<br>268853 	cannot programmatically collapse item whose parent is collapsed
+<br>268958 	Null pointer exception in thread "Help Browser UI" when PDF files opened from Help Content of plug-in
+<br>269010 	ModifyListener isn't working for Combo
+<br>269031 	Exception in Image running junit tests
+<br>269106 	SWT test suite does not call readAndDispatch
+<br>269305 	Path#addString baseline aligning
+<br>269506 	[Browser] JS->Java call can crash due to freeing of args
+<br>269533 	StyledText sometimes doesn't scroll far enough to show caret if moved via left-key to EOL
+<br>269599 	Compiler warnings in N20090320-2000
+<br>269717 	TextEditor walkback if you decrease font twice 
+</blockquote>
+
+<h2> SWT Build 3.5 37 - Tuesday March 17, 2009</h2>
+<blockquote>
+244597    	Cannot activate shell programatically on gtk
+<br>236630 	[OLE] Saving docx file will corrupt the file and produce OLE exception
+<br>267176 	Path#addString() not working with custom font
+<br>266335 	rssowl: controls are clipped
+<br>266203 	Vuze find icon flipped
+<br>267717 	New element not revealed
+<br>253060 	Preference dialog flickers
+<br>268303 	Tree#getItem(Point) should not return item if point is on twistie
+<br>252416 	SWT.HIDE_SELECTION doesn't work on Table
+<br>256998 	TabFolder control: default size not displaying correctly
+<br>262985 	Scrollbar dancing in DebugView
+<br>267886 	cocoa: multiple command q opens multiples confirm dialogs
+<br>268389 	Null pointer resizing fast view
+<br>267174 	Device#loadFont() not implemented
+<br>268217 	no KeyDown event for Help key
+<br>267450 	Mylyn task list draws icons in wrong spot
+<br>196884 	[OpenGL] GLCanvas doesn't work on Vista
+<br>194887 	Eclipse actions are not executed in embedded awt component
+<br>267129 	Content assist shells movable when clicking on scrollbar thumb
+<br>253214 	Using 'SWT.YES | SWT.NO' on a MessageBox shows Yes/No instead of No/Yes
+<br>268543 	Test_org_eclipse_swt_graphics_Cursor leaks a Cursor
+<br>226356 	[patch] Build against xulrunner
+<br>268613 	Should call NSOutlineView.initWithFrame instead of init()
+<br>253075 	[misc] No object:text-changed:insert events fired for method completion (and others)
+<br>261228 	fix doc for SWT.SEARCH
+<br>267466 	[SWT_AWT] Browser.print(GC) should not use AWT component ancestor clip
+<br>268787 	OS: uninitialized TCHAR sizeof value usage
+<br>268410 	Typing text in Spinner does not change value
+<br>267405 	event detail wrong on scrollbar selection events
+<br>268307 	Twistie in Tree does not give feedback on mouseDown with DragDetect listener
+<br>268732 	Typo in field name in carbon
+</blockquote>
+
+<h2> SWT Build 3.5 36b - Wednesday March 11, 2009 (1300)</h2>
+<blockquote>
+267450    	Mylyn task list draws icons in wrong spot
+<br>268112 	Combo getListVisible missing
+</blockquote>
+ 
+<h2> SWT Build 3.5 36a - Wednesday March 11, 2009 (0010)</h2>
+<blockquote>
+266578    	Crash in TextLayout.computeRuns()
+<br>267752 	Not calling init when creating SWTSearchField
+<br>267841 	MessageBox#open() always returns SWT.CANCEL
+<br>267913 	Display#getLastEventTime () not right 
+</blockquote>
+
+<h2> SWT Build 3.5 36 - Monday March 9, 2009 (1700)</h2>
+<blockquote>
+257830    	CompareDialog doesn't get focus when launching it from wizard on MacOSX
+<br>265339 	Update the build JRE used on AIX
+<br>265947 	[Browser] events not reusable outside org.eclipse.swt.browser pkg
+<br>267103 	Text Fields too big
+<br>267516 	Tree tries to show multiple lines of text in items 
+</blockquote>
+
+<h2> SWT Build 3.5 35 - Sunday March 8, 2009</h2>
+<blockquote>
+25612    	Printing: Print dialog properties are not remembered between print jobs
+<br>56342 	StyledText should allow to set margins
+<br>109849 	Mac Window Modified on Shell
+<br>171706 	DateTime should support drop-down calendar
+<br>199809 	Existing Snippet Does Not Function as Expected
+<br>223590 	Browser.print(GC) should not use ancestor clip
+<br>254498 	expander touches the image in treeitem
+<br>255000 	[Browser] Provide API to handle authentication challenges properly
+<br>256054 	[Cocoa] Implement Space bar toggle for checkboxes
+<br>261548 	Weird focus
+<br>261699 	version of org.eclipse.swt.motif.hpux.PA_RISC in maintenance stream is lower than the one in 3.4
+<br>262501 	M5 got slower since last week
+<br>265568  [Cocoa] Single-clicking to select a CCombo choice from the drop-down has no effect 
+<br>266011 	Unable to click in Shell
+<br>266330 	rssowl: read news item headers look the same as unread ones
+<br>266370 	CCombo not dismissing popups 
+<br>266385 	Mylyn notifications don't close properly
+<br>266387 	Tab traversal of mylyn bug editor broken
+<br>266402 	System beep on Command+F6, F6, F6,... 
+<br>266405 	Ctrl+Tab traversal broken with traverse listener
+<br>266549 	Scrollbar cheese and autoscroll behavior in debugger
+<br>266828 	getCharCount() in Combo throws NullPointerException
+<br>266883 	Lots of cheese in StyledText running ppc cocoa
+<br>266934 	Display.getDismissalAlignment() should honor "gtk-alternative-button-order"
+<br>266956 	CCE in Combo.updateBackground(...)
+<br>267064 	[cocoa][mac] task list collapse all button has white background
+<br>267098 	[SWT] add @see SWT#TOOL to Shell constructor javadocs
+<br>267104 	Canvas' region not applied to scroll bars
+<br>267138 	CCombo popup doesn't scroll with CCombo 
+<br>267179 	Ctrl+Y for undo on Carbon
+<br>267196 	[mylyn] Open png attachment in browser causes editor tabs to disappear
+<br>267270 	NPE in Composite.nextValidKeyView
+<br>267283 	HEAD crashes
+<br>267405 	event detail wrong on scrollbar selection events 
+</blockquote>
+
+<h2> SWT Build 3.5 34 - Tuesday March 3, 2009</h2>
+<blockquote>
+240657    	Combo.setText() doesnt set the text if the string is a substring of the strings in combo
+<br>253071 	Breadcrumb menu flickers badly
+<br>253075 	[misc] No object:text-changed:insert events fired for method completion (and others)
+<br>258954 	org.eclipse.swt/.project should not use path variable WORKSPACE
+<br>261732 	progress does not animate if create before Shell.open()
+<br>262417 	Search text only shows the after 2 chars have been entered
+<br>263620 	Listeners added to CTabFolder#addTraverseListener(..) cannot block default traversal
+<br>264342 	Text field truncated
+<br>265481 	[Cocoa] Squiggles/underlines are displayed too close to text
+<br>265604 	popup shells quickly show title bar
+<br>265652 	Need Text.setMessage without side-effects
+<br>265897 	Text throws exceptions and doesn't display bullets in Mylyn task repository setup
+<br>265940 	Cannot input T-Chinese chars in Java Editor
+<br>266180 	keyUp not delivered if command key is down
+<br>266206 	Code assist popup has cheese initial items
+<br>266213 	Hung GUI when comparing with another branch
+<br>266344 	Table/Tree check boxes show intermediate state
+<br>266370 	CCombo not dismissing popups
+<br>266373 	Single line text doesn't scroll as you type
+<br>266407 	Foreground color in Table/Tree should not be drawn for selected active items
+<br>266409 	[SWT] FontData.toString() optimization
+<br>266475 	Control#setBackgroundImage() does not work
+<br>266499 	IME broken on cocoa
+<br>266625 	StyledText computeSize() answering slightly short width when SWT.WRAP, causes missing text 
+</blockquote>
+
+<h2> SWT Build 3.5 33 - Tuesday February 24, 2009</h2>
+<blockquote>
+252251    	Can't create multiple Displays in same application
+<br>259181 	SWT Cocoa: Text.setEchoChar() doesn't work
+<br>259457 	swt tray icon disappears on gnome panel restart - gtk
+<br>262651 	Crash on Cocoa
+<br>262968 	bad scrolling of maximized editor
+<br>262978 	jumpness in quick outline
+<br>262985 	Scrollbar dancing in DebugView
+<br>263518 	[cocoa] Incorrect colors for eclipse views in 3.5m5
+<br>263663 	[Keybindings]Ctrl-A/Ctrl-E ignored in Cocoa SWT
+<br>263824 	Enabled or disabled link widget looks the same in Cocoa
+<br>263999 	[cocoa 64 bits]Key bindings not working well for three combinations
+<br>264399 	[DND] A deadlock occurs during automated testing of a SWT application on Linux/GTK/x86_64
+<br>264425 	SashForm doesn't display tooltip text on its Sashes
+<br>264694 	[cocoa] Line numbers from editor bleed through to fast-view search view after search-replace
+<br>265188 	Refactor rename popup (border is black and bottom is missing)
+<br>265326 	next annotation short cut (command+.) broke
+<br>265338 	NPE in Control.keyDown(...)
+<br>265393 	View menus open again after dialog is closed
+<br>265427 	Editor/View switcher: 1 key press forwards by 3 items
+<br>265603 	ToolItem#setToolTipText(..) should not render mnemonic character (&)
+<br>265668 	Text#setMessage(..) should force redraw 
+</blockquote>
+
+<h2> SWT Build 3.5 32 - Tuesday February 17, 2009</h2>
+<blockquote>
+257188    	Regression from 3.3.2 behaviour, no SWT.Activate event is sent when setFocus() is called on child controls
+<br>259457 	swt tray icon disappears on gnome panel restart - gtk
+<br>262968 	bad scrolling of maximized editor
+<br>263563 	[cocoa] Icon mask problem in dialog help
+<br>263663 	[Keybindings]Ctrl-A/Ctrl-E ignored in Cocoa SWT
+<br>263971 	code inconsistency in Spinner
+<br>263999 	[cocoa 64 bits]Key bindings not working well for three combinations
+<br>264212 	Link.setForeground() overrides disable color set in Link.enableWidget()
+<br>264368 	Cursor keep changing from arrow to text cursor
+<br>264553 	Shell.open() does not make window key if it's already visible
+<br>264694 	[cocoa] Line numbers from editor bleed through to fast-view search view after search-replace
+<br>264703 	should DND set cursors?
+<br>264705 	ArrayStoreException in TextLayout running 64 bit
+<br>264714 	drawing to Image can fail
+<br>264755 	SashForm cursor weirdness on Mac OSX Cocoa
+<br>264764 	Table, Tree, List send DefaultSelection when double-click in header 
+</blockquote>
+
+<h2> SWT Build 3.5 31 - Tuesday February 10, 2009</h2>
+<blockquote>
+213305    	100% cpu usage on opening files with long lines.
+<br>223703	FileDialog.setOverwrite(boolean) does nothing on Cocoa
+<br>234240	Group alpha should not be 0.25 if background color set
+<br>245266	Upside down table
+<br>247444 	[DND] NavigatorDnDService does not update DragSource Transfer if invalid
+<br>248796	[DND] Cannot drag and drop files between the Finder (ie. Cocoa and Carbon apps)
+<br>252067	expanding tree item spews "unlockFocus" error message
+<br>252279	Group foreground and background color don't work
+<br>256267	Tab text gets underlined unexpectedly when trying to close tab
+<br>256940	Popup menus: unexpected appearance of application context menus
+<br>260514	Resizing columns on virtual tables does not always update horizontal scroll bar
+<br>262867	Text Editor doesn't show selected string correctly in Japanese inline editor
+<br>262922	Cursor jumps to top right corner of screen on drag of trim element
+<br>262955	URLTransfer is missing @since 3.4 tag
+<br>263085	Focused javadoc windows stick to the cursor
+<br>263529 	[cocoa] Incorrect file paths when opening .html files in an external browser
+<br>263530	NPE disabling multi-line Text
+<br>263603	Tooltip should not render mnemonic indicator (&) on Cocoa
+<br>263656	Cannot select tree item
+<br>263664	Tree.showItem() may not reveal children of non-expanded items
+<br>263677	Tree does not always fully expand in debugger
+<br>263824	Enabled or disabled link widget looks the same in Cocoa
+<br>263967	Spinner is missing getText() method
+<br>263969	Spinner doesn't support negavite minimum value
+<br>264003	Exception in Combo.dragDetect()
+<br>264019	Hover not working while the mouse is down. 
+<br>264128  [cocoa] Trees do not render text on them
+</blockquote>
+
+<h2> SWT Build 3.5 30 - Tuesday February 3, 2009</h2>
+<blockquote>
+248400  Backspace doesnot work flash files viewed in SWT browser when eclipse is minimised and restored
+<br>250575 	File -> Switch Workspace -> Other... does not work the first time.
+<br>258727 	CTabFolder should not select an item unless the first button has been pressed
+<br>260761 	Need a Cocoa runloop observer for async messages
+<br>262451 	CCombo in TreeEditor truncates in Vista
+<br>262651 	Crash on Cocoa
+<br>262681 	isFocusControl incorrect
+<br>262700 	Drag feedback image draws above cursor when dragging a Label
+<br>262702 	Crash on second drag of checkbox
+<br>262767 	[perfs] Possible regression for "Draw on a window" perf test
+<br>262778 	disposed widget in Control Example Menu tab
+<br>262866 	CCombo is too tall (vertical height)
+<br>262888 	GTK-BIDI: Mirrored drawText background has wrong size
+<br>262939 	Update Snippet195
+<br>262970 	Drag is too eager to kick in
+<br>262984 	SetThemeCursor() sometimes checks PTR_SIZEOF, sometimes doesn't
+<br>263062 	Missing @since tag on ACC.ROLE_SPLITBUTTON
+<br>263071 	Sash cursor changes while dragging the sash 
+</blockquote>
+
+<h2> SWT Build 3.5 29a - Wednesday January 28, 2009</h2>
+<blockquote>
+261553    	NPE pasting in combo
+<br>262573 	Hover help is dismissed without selection 
+</blockquote>
+
+<h2> SWT Build 3.5 29 - Monday January 26, 2009</h2>
+<blockquote>
+262346    	Control Example should use SWT.ICON_CANCEL for Text widget
+<br>256327 	[Cocoa] Forms layout oddity
+<br>262117 	[Cocoa] problem creating image
+<br>253990 	implement OpenGL support 
+</blockquote>
+
+<h2> SWT Build 3.5 28 - Sunday January 25, 2009</h2>
+<blockquote>
+86569    	[Clipboard] Support x-special/gnome-copied-files
+<br>153432 	[KeyBindings] Unicode keyboards on Mac OSX produce wrong keys when used with modifiers
+<br>160870 	[Contributions] ToolItem.setWidth fails when ToolItem on ViewPart toolbar
+<br>248155 	Cursor is wrong over title bar of dialog
+<br>250443 	Content assist shells should not have title bar
+<br>251021 	MacOSX-cocoa swt crash importing a folder containing ~800 Java files
+<br>257278 	Ctrl-Shift-R does not update correctly on Mac Carbon
+<br>258110 	wrapping Link is clipped on Help preference page
+<br>258675 	[Viewers] Arithmetic exception when typing show types dialog
+<br>260370 	Allow to show magnifier icon for Text with SWT.SEARCH
+<br>261219 	text inner border can be wrong on gtk 2.10
+<br>261230 	computeSize not right for SWT.SEARCH Text
+<br>261576 	[mac] Mylyn notifications create an empty ghost shell under Cocoa port
+<br>261699 	version of org.eclipse.swt.motif.hpux.PA_RISC in maintenance stream is lower than the one in 3.4
+<br>261854 	adding/removing TreeItems can be very slow
+<br>262230 	debug hover comes up blank 
+</blockquote>
+
+<h2> SWT Build 3.5 27 - Tuesday January 20, 2009</h2>
+<blockquote>
+244597    	Cannot activate shell programatically on gtk
+<br>251150 	Canvas is 100000 x 100000 even after sizing to fit.
+<br>251454 	Table and Tree do not respect style SWT.NO_SCROLL
+<br>252384 	Tree scrollbars disappear
+<br>252419 	Spinner foreground and background color don't work.
+<br>252479 	resizing preference dialog tree with keyboard causes system beep
+<br>253786 	Cannot change tabs in TabFolder using keyboard
+<br>254533 	Can't invoke context menu using keybindings
+<br>254792 	Move Tab Group does not work on Mac/Cocoa 3.5M3
+<br>256159 	Certain Images copied from Lotus Notes and pasted using SWT's Clipboard are corrupted
+<br>256471 	ControlExample - Link Font changes
+<br>256825 	Eclipse "Problems Tab": dragging column separators causes application to hang
+<br>258424 	Clip is not honored in Canvas.paint .
+<br>259003 	Eclipse Cocoa: drag and drop in Package Explorer sometimes incorrectly shows icon indicating illegal drop target
+<br>259379 	[64] Text fields in Project Properties dialog have incorrect background
+<br>259910 	Unprecise Javadoc for ImageData constructor
+<br>260361 	Clients can't find out whether Text#setMessage(..) works on current platform
+<br>260870 	buttons in perspective switcher appear too tight
+<br>260929 	Caret blinks when application is not active.
+<br>261052 	Possible leak in DragSource.drag() method
+<br>261099 	CTabItem curvers are blurry
+<br>261228 	fix doc for SWT.SEARCH
+<br>261279 	coordinates flipped when using Tracker
+<br>261354 	Need to implement Text#setMessage() on Motif 
+</blockquote>
+
+<h2> SWT Build 3.5 26 - Tuesday December 16, 2008</h2>
+<blockquote>
+236855    	SWT JNI libraries should have different names for Win32 and Win64
+<br>250579 	Form titles do not draw correctly
+<br>256169 	[Cocoa] Image radio and check buttons don't display state
+<br>256808 	Eclipse "Select Workspace Directory" does not allow creation of new folder
+<br>258123 	[64] Can't self host on cocoa x86_64 with Java 5
+<br>258309 	[64][Browser] Browser crashes on Snippet307
+<br>258672 	Examples page links to update site for Eclipse 2.0!
+<br>258839 	recompile solaris-motif os library 
+</blockquote>
+
+<h2> SWT Build 3.5 25 - Wednesday December 10, 2008</h2>
+<blockquote>
+156276  Provide a way for JavaScript to call out to the Browser's container
+<br>258159  [64] MessageBox Crashes 
+</blockquote>
+
+<h2> SWT Build 3.5 24 - Wednesday December 10, 2008</h2>
+<blockquote>
+92757   StyledText: Add caret listener
+<br>156276 	Provide a way for JavaScript to call out to the Browser's container
+<br>239301 	Support 64-bit on Cocoa
+<br>250179 	Consider drawing the block selection on characters
+<br>257967 	BlockSelection: paste on wrong place when Styledtext is scrolled
+<br>257975 	Cannot open internal browser on linux 
+</blockquote>
+
+<h2> SWT Build 3.5 23 - Monday December 8, 2008</h2>
+<blockquote>
+92757    	StyledText: Add caret listener
+<br>257967 	BlockSelection: paste on wrong place when Styledtext is scrolled 
+</blockquote>
+
+<h2> SWT Build 3.5 22 - Sunday December 7, 2008</h2>
+<blockquote>
+248880  Cocoa: Eclipse dialogs too modal
+<br>254956 	[DND] Drag and drop maintaining a grab too long.
+<br>255118 	Default Cocoa quit handler calls exit()
+<br>256476 	DefaultSelection not being sent from Spinner
+<br>256685 	CoolBar control: for Vertical style, Horizontal Fill also applies Vertical Fill
+<br>256870 	The logic for drawing Vertical gradient of Bottom tabs is incorrect
+<br>257147 	No setTextLimit in Cocoa version of Spinner?
+<br>257238 	StyledText: block selection mode: trouble with caret and newline
+<br>257278 	Ctrl-Shift-R does not update correctly on Mac Carbon
+<br>257614 	[Browser] add API to evaluate JS expression 
+</blockquote>
+
+<h2> SWT Build 3.5 21 - Tuesday December 2, 2008</h2>
+<blockquote>
+194887  Eclipse actions are not executed in embedded awt component
+<br>223590 	Browser.print(GC) should not use ancestor clip
+<br>233303 	[Contributions] Menuitem has incorrect letter underlined
+<br>253219 	Implement gradient Patterns
+<br>253228 	Implement default selection (text, tree, table ...)
+<br>253929 	java.lang.UnsatisfiedLinkError when launching eclipse SDK on AIX
+<br>255652 	Test failures on win32
+<br>255730 	NPE in Tree
+<br>256467 	Button images bad in Control Example
+<br>256507 	cheese around icons (no transparency)
+<br>256687 	NPE in Tree setSelection
+<br>256688 	IndexOutOfBoundsException in TreeItem
+<br>256703 	setItemCount breaks selection
+<br>256770 	[StyledText] setBackground() conflicts with LineStyleListener
+<br>256797 	org.eclipse.swt.motif.hpux.PA_RISC fragment is version 3.5.0.qualifier in maintenance stream
+<br>256845 	Shell control: "remain on top" property is voided when one goes to another application
+<br>257056 	[TestStyle] border missing in toString() 
+</blockquote>
+
+<h2> SWT Build 3.5 20 - Tuesday November 25, 2008</h2>
+<blockquote>
+236513    	bidi: english characters swapped only in linux
+<br>245523 	GC stops drawing after setting transform with dy=-1
+<br>248921 	Getting immediately setting back a Region on a GC once setAdvanced is set to true causes the region to change provided the repaint region is offset
+<br>251447 	setTooltip throws ArrayIndexOutOfBoundsException
+<br>251587 	Snippet 135 (SWT/AWT) no longer works
+<br>253223 	Implement painting (setRedraw(), scroll/paint/update, setRegion(), Display.update() ...)
+<br>253673 	Snippet207 doesn't rotate 45°
+<br>255282 	SWTException thrown from CCombo
+<br>255403 	Some images in eclipse are not transparent
+<br>255637 	Missing removeComponentListener in SWT_AWT.new_Shell
+<br>255658 	SWT.UNDERLINE_LINK needs more doc
+<br>255821 	Image size incorrect when using native loader.
+<br>256170 	Image loses alpha information and crashes on 64 bit
+<br>256261 	Hand cursor stays when releasing Ctrl after hovering a link 
+</blockquote>
+
+<h2> SWT Build 3.5 19 - Tuesday November 18, 2008</h2>
+<blockquote>
+15165   BIDI: enable RTL orientation in SWT widgets
+<br>83408 	Support links in StyledText
+<br>128804 	No settings callback when High Contrast is turned off
+<br>210441 	setBackground/setBackgroundImage not implemented.
+<br>246470 	[Browser] Safari fails on Mac OS X 10.4.11
+<br>249210 	Crash in Tree.setItemCount
+<br>252418 	Can't replace text in spinner
+<br>253215 	Support BIDI in TextLayout
+<br>253220 	Support native image loading
+<br>253221 	Implement Image.setBackground()
+<br>254797 	Upside down topsy turvey text
+<br>254865 	Annotation underlines not properly drawn when end of range not visible
+<br>254947 	underlineColor, strikeoutColor, borderColor not respected when tex is selected
+<br>255373 	Textlayout border and error underline are not bidi aware
+<br>255398 	IndexOutOfBoundsException in Image.setBackground 
+</blockquote>
+
+<h2> SWT Build 3.5 18 - Tuesday November 11, 2008</h2>
+<blockquote>
+246057	SWT_AWT application does not receive mouse events
+<br>253720	Setting clipping causes printing to be flipped
+<br>253058	StyledText should handle mouse click sequences in block selection mode
+<br>253057	selection changes must send out selection event notifications
+<br>253916	Printing long files sometimes crashes
+<br>253964	Occasional crash on quit after dragging text
+<br>252693	computeSize causing Resize, and Move events
+<br>253259	Label in synchronize view is getting cut off.
+<br>253305	ControlsWithLabelsExample needs to be accessible
+<br>251762	block selection, getSelectionText and getSelectionTextCount should be aware of block selection
+<br>250175	fix DND in block selection mode
+<br>253254	[Browser] Exception while disposing SWT Mozilla browser
+<br>253062	Forms have resize / layout problems
+<br>252388	Check box shows indeterminate state before checked state
+<br>253298	NSAccessibilityException typing tab in multi-line Text in ControlExample
+<br>253225	Implement Control.print()
+<br>252714	Control/right-click on Package Explorer doesn't select item first
+<br>254607	emulated coolbar height is wrong when it has multi rows of different size
+</blockquote>
+
+<h2> SWT Build 3.5 17 - Tuesday November 04, 2008</h2>
+<blockquote>
+246274	SWT.ARROW Button direction not consistent when RTL
+<br>246541	[misc] BIDI: Java editor does not ensure LTR for declarations and invocations with RTL names
+<br>247866	Images not centered in tool items
+<br>248758	[DND] No dragStart event when dragging from Text widget
+<br>249006	implement cursor on mouse grab
+<br>252245	Implement Printing on Cocoa
+<br>252277	resizing Table/Tree column sends Selection event
+<br>252370	fix cell accessibility post-3.5M3
+<br>252391	sort indicator moves
+<br>252422	reduce damaging of Table/Tree column headers
+<br>252424	background color of List only sets background of items.
+<br>252427	List - changing font size doesn't update item height
+<br>252486	[DND] Cannot drag from StyledText
+<br>252642	block selection doesn't work on win2000
+<br>252678	StyledText #setLineSpacing(int) not working in GTK
+<br>252679	TableColumn/TreeColumn don't send Move and Resize events
+<br>252747	double underline doesn't show in win32
+<br>252749	Bullet not working in styled text
+<br>252770	fragment binary should exclude *.extra files
+<br>252895	StyledText strikeout over tab space
+<br>252903	replace initWithFrame(new NSRect()) with init()
+<br>252995	Drop down tool items are selected on mouse up
+<br>253189	NullPointerException when trying to print
+<br>253240	Missing autorealese pool in printer
+<br>253294	remove printlns in Accessibility
+</blockquote>
+
+<h2> SWT Build 3.5 16 - Thursday October 30, 2008</h2>
+<blockquote>
+252441	Can't select plugins in run configurations
+<br>252764 Stack overflow caused by 246057 fix
+</blockquote>
+
+
+<h2> SWT Build 3.5 15 - Tuesday October 28, 2008</h2>
+<blockquote>
+251582  No splash screen progress using Cocoa
+<br>251779 	Snippet124 crashes
+<br>252232 	scrollbars are disabled
+<br>252252 	Can't get a context menu on a tree item
+</blockquote>
+
+
+<h2> SWT Build 3.5 14 - Monday October 27, 2008</h2>
+<blockquote>
+222791    	Spinner accepts non-numeric input in Cocoa
+<br>222795 	[Spinner] Cannot increase number of digits
+<br>225266 	Cocoa port has no org.eclipse.swt.internal.carbon.smallFonts equivalent
+<br>237102 	[OLE] OleControlSite with Excel.Sheet renders deactivated view improperly
+<br>249003 	implement cursors (wait, etc.)
+<br>250178 	change the keyboard block selection expansion increment to match average char width
+<br>250574 	Group does not layout correctly.
+<br>251016 	Crash on shut down
+<br>251084 	NullPointerException when VoiceOver asks for position of Shell
+<br>251126 	Please remove unused Platform Interface constants etc.
+<br>251128 	Display.readAndDispatch() and sleep() should not try/catch and call printStackTrace()
+<br>251149 	SWT Accessibility API needs to work on all Controls
+<br>251469 	Accessible.getDescription should not return name
+<br>251482 	Don't work around bug in Accessibility Verifier
+<br>251516 	[Browser] cannot type Ü into web browser text area
+<br>251528 	SWT Image created without GDI tracking
+<br>251581 	Wrong cursor when editing
+<br>251583 	Crash using I20091021 Cocoa
+<br>251603 	Spacing not working in TextLayout
+<br>251607 	TextLayout - TextStyle's border not showing bottom line in StyledText
+<br>251614 	Space in font name
+<br>251618 	Text glitch after inserting an image
+<br>251712 	New shell not active when opened
+<br>251766 	Accessibility: Button role incorrect for toolbar buttons
+<br>251818 	drawString works improperly after drawing any primitives
+<br>251910 	creating tall combo spews long error message and can draw wrong 
+</blockquote>
+
+<h2> SWT Build 3.5 13 - Tuesday October 21, 2008</h2>
+<blockquote>
+211048    	Accessibility is not implemented for Cocoa
+<br>212851 	StyledText - getStyleRanges(int start, int length) returns wrong style range
+<br>249001 	implement GC drawFlags
+<br>249005 	implement/verify mouse events and mouse wheel
+<br>249007 	implement modify/verify events
+<br>249008 	implement MenuDetect events and show native menu on Texts
+<br>250171 	add int[] getBlockSelectionRanges() to StyledText
+<br>250172 	Fix inserting text in block select mode
+<br>250177 	convert block selections to linear selections and vice-versa
+<br>250180 	don't reset block selection mode under no circumstances
+<br>250193 	StyledText SetStyleRange not working
+<br>250622 	org.eclipse.swt.printing.PrintDialog.open() returns 'null' for two different scenarios
+<br>250782 	No More Handles Exception when trying to load an image
+<br>250841 	Table/Tree scrollbars do not work
+<br>250859 	StyledText getRages(int start, int length) returns incorrect array
+<br>250976 	FileDialog should be resizable
+<br>250994 	Last character of the line disappears when selecting code at the end of line
+<br>251007 	underline not select when last run run is full selected
+<br>251016 	Crash on shut down
+<br>251089 	StyledText#copy() fails in RTFWriter with AIOOBE
+<br>251130 	Compiler warnings in N20081015-2000
+<br>251442 	block selection: handle multi-line paste 
+</blockquote>
+
+<h2> SWT Build 3.5 12 - Tuesday October 14, 2008</h2>
+<blockquote>
+206173 	Permit SWT.DEFAULT as an argument to ScrolledComposite.setMinSize
+<br>248551 	BidiLevel is improperly set to -1
+<br>248881 	Cocoa: (specific) Dialog text doesn't wrap
+<br>249999 	Closing an editor takes two clicks
+<br>250299 	scrollbar's selection is reset to 0 when its NSScrollView is resized
+<br>250327 	SWT.NO_TRIM Shells cannot become the key window
+<br>250346 	Please update link to PaperClips project on SWT community page 
+</blockquote>
+
+<h2> SWT Build 3.5 11 - Tuesday October 07, 2008</h2>
+<blockquote>
+8521    	StyledText: block select mode
+<br>84552 	The image of a checked action in a menu of a pulldown action is not displayed
+<br>165033 	Table vertical lines always showing
+<br>173556 	[OLE] SWTException constructing OleControlSite for WMPlayer.OCX with Windows Media Player 11
+<br>211696 	CLabel does not specify that "&" introduces mnemonic
+<br>223518 	implement Shell modality
+<br>245667 	Horizontal Sash does not show resize cursor
+<br>248187 	Adobe Reader 9.0 browser crash NPE
+<br>248773 	implement custom draw in Tables and Trees
+<br>249000 	implement graphics in non-UI thread
+<br>249009 	implement Shell.setImage(...) and -Xdoc:icon
+<br>249286 	Table.setTopIndex does not work correctly with MeasureItem
+<br>249376 	Tree in package explorer hides text
+<br>249517 	ClassCastException in Combo
+<br>249608 	TextLayout.draw(...) does not use GC foreground
+<br>249612 	Links on preference pages are opened in browser
+</blockquote>
+
+<h2> SWT Build 3.5 10 - Tuesday September 30, 2008</h2>
+<blockquote>
+211652 	DND not implemented on Cocoa
+<br>246309 	[Browser, Mac, 3.4] Doesn't open local URLs (file:///) that contain query parameters and/or that are URL encoded.
+<br>247069 	Display#post(*) sometimes freezes eclipse
+<br>248169 	ld-linux.so causing JavaVM to seg. fault. on startup....
+<br>248187 	Adobe Reader 9.0 browser crash NPE
+<br>248190 	implement Table/Tree column reordering
+<br>248266 	Javadoc warnings in N20080922-2000
+<br>248467 	Keypad Enter and Help keys do not draw in MenuItems
+<br>248559 	Image not loaded in Flex
+<br>248728 	cannot use jdk 1.5 method Class.getSimpleName()
+<br>248731 	FileDialog does not provide enough information to open multiple files from different directories (COCOA)
+<br>248735 	System.out.println() in DragSource
+<br>248950 	Custom Control Example crashes. 
+</blockquote>
+
+<h2> SWT Build 3.5 09e - Tuesday September 22, 2008</h2>
+<blockquote>
+165033    	Table vertical lines always showing
+<br>219758 	The second shell can not be active after closing the first shell
+<br>247869 	Pixel corruption in Java Editor
+<br>248167 	Accelerators are not drawn on menu items in Eclipse 
+</blockquote>
+
+<h2> SWT Build 3.5 09d - Friday September 19, 2008</h2>
+<blockquote>
+247550 	Alt+Arrow moves line up/down by 2 in Java editor
+</blockquote>
+
+<h2> SWT Build 3.5 09c - Thursday September 18, 2008</h2>
+<blockquote>
+245667    	Horizontal Sash does not show resize cursor
+<br>247557 	Tracker seems broken, affects dragging Views, Editors
+<br>247649 	Compiler warnings in I20080917-0100
+<br>247667 	TabFolder sends Selection events for programmatic selections
+<br>247676 	setting TabFolder content in Selection callback does not appear
+<br>247702 	NPE in Display.map(...) when called from TabFolder Selection listener
+<br>247728 	implement underline (squiggle/error) and outline for cocoa 
+</blockquote>
+
+<h2> SWT Build 3.5 09b - Wednesday September 17, 2008</h2>
+<blockquote>
+247290 	SWT ToolItem loses text when only one item and VERTICAL with image
+<br>247549 	default button doesn't work for single line Texts 
+</blockquote>
+
+<h2> SWT Build 3.5 09a - Tuesday September 16, 2008</h2>
+<blockquote>
+192014    	Certain fonts appear squished with advanced graphics on
+<br>247237 	Compiler warnings in cocoa port in N20080914-2000
+<br>247318 	Crash creating new display after disposing previous one 
+</blockquote>
+
+<h2> SWT Build 3.5 09 - Sunday September 14, 2008</h2>
+<blockquote>
+211796 	Regenerate the PI ("Platform Interface") to better match cocoa
+<br>237724 	(Accessibility) keyboard shortcuts are not read with VoiceOver in most menus
+<br>246820 	org.eclipse.swt.tools causes 242 warnings in latest I-build
+</blockquote>
+
+<h2> SWT Build 3.5 08 - Friday September 12, 2008</h2>
+<blockquote>
+174968    	Provide API to select tree items without scrolling
+<br>244318 	Unable to scroll fast using MX Revolution Mouse
+<br>245367 	[Browser] swt browser doesn't hold the SWT global lock when calling to Xlib
+<br>246884 	DateTime not in HPUX source
+<br>247083 	disposing first column in Tree fails 
+</blockquote>
+
+<h2> SWT Build 3.5 07 - Tuesday September 9, 2008</h2>
+<blockquote>
+88516 	Advanced GC reports different string extents than non advanced
+<br>95410 	GDI+ drawString is not consistent with GDI
+<br>104729 	setAntialias changes sizes of strings
+<br>139070 	ExpandBar draws on top of scrollbars
+<br>225264 	Help menu opens up in the wrong place
+<br>243558 	StyledText: squiggles not drawn for tabs
+<br>244472 	Text does not WRAP on RHEL3
+<br>244723 	Embedding external widgets into SWT using the EMBEDDED Style
+<br>244747 	Snippet illustrating how to properly post key events with shift keys
+<br>244931 	On carbon platform, when scroll the mouse wheel on top of the vertical scroll bar of a canvas, no selection event is generated.
+<br>245185 	Message in the MessaeBox is not BiDi correctly
+<br>245249 	org.eclipse.swt.win32.win32.x86 version mismatch
+<br>245379 	Table.getVerticalBar() returns null
+<br>245724 	SWT_AWT bridge hangs in Cocoa SWT
+<br>246133 	plug-in and fragment versions need updating for 3.4.1
+<br>246235 	App crashes on exit
+<br>246379 	warning compiling callback.c (pad not unused)
+<br>246602 	Table/Tree columns do not send Selection events 
+</blockquote>
+
+<h2> SWT Build 3.5 06 - Tuesday August 26, 2008</h2>
+<blockquote>
+49996    	[CCombo] CCombo, CLabel - Custom widgets are nulling internal slots too soon
+<br>196884 	[OpenGL] GLCanvas doesn't work on Vista
+<br>231776 	[SWT Mac] Incorrect mouseExit event generated when balloon ToolTip is shown
+<br>232690 	No event is sent on clearing SWT.SEARCH-styled text field
+<br>234809 	[QuickAccess] PopupDialog stays open even though Eclipse has focus
+<br>239965 	Application menu does not share application name
+<br>242644 	eclipse crashes when downloading a file in the internal browser
+<br>243842 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
+<br>244234 	losing keybindings...
+<br>244396 	[DND] Combo on Linux does not fire DragSourceEvent.
+<br>244533 	Cursor Control
+<br>244574 	ProgressBar state can be visually lost by updating selection 
+</blockquote>
+
+<h2> SWT Build 3.5 05 - Tuesday August 19, 2008</h2>
+<blockquote>
+243842 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
+<br>243924 	Debugger crashes on Step out.
+<br>243942 	NPE in Tree.getSelection
+<br>244072 	Tree and Table setBackground doesn't work
+<br>244108 	[WorkbenchLauncher] ArrayIndexOutOfBoundsException in IDEApplication.start() when launching partially branded product 
+</blockquote>
+
+<h2> SWT Build 3.5 04b - Tuesday August 12, 2008</h2>
+<blockquote>
+140646    	[OLE] OleControlSite new constructor needed
+<br>199441 	ScrollBars visible even when not required
+<br>241062 	[consistency] Font#getFontData() not safe from non-ui thread on MacOS
+<br>242251 	N20080727-2000 on linux.gtk.x86 doesn't proceed past the splash screen on startup
+</blockquote>
+
+<h2> SWT Build 3.5 04a - Wednesday August 6, 2008</h2>
+<blockquote>
+242484 	org.eclipse.swt.graphics.Rectangle.contains(int, int) returns incorrect results
+<br>242567 	version of org.eclipse.swt.motif.hpux.PA_RISC in HEAD stream has lower version that released 3.4 version
+<br>242603 	Solaris crash: symbol gnome_icon_theme_new: referenced symbol not found
+<br>243012 	Password fields can be copied to the clipboard on Mac OS X
+<br>243037 	SWT.getPlatform() should list all valid values
+<br>243232 	Child shells don't stay above their parent 
+</blockquote>
+
+<h2> SWT Build 3.5 04 - Thursday July 31, 2008</h2>
+<blockquote>
+97496    	Table: setBackground is not deferred by setRedraw(false)
+<br>164928 	GC.setTextAntialias(SWT.OFF) not working for StyledText
+<br>173218 	[SWT_AWT] SWT needs to support ModalityListener interface
+<br>210855 	Table's "sort indicator" has no visible effect
+<br>210856 	Table & Tree Header images don't do anything
+<br>229651 	ComboBoxEditor is unresponsive and unusable on RH 5
+<br>241671 	Mouse cursor disappears in editor and gets progressively slower coming back
+<br>242263 	Problems with read-only text boxes on Linux
+<br>242414 	AntiAlias does not work in TextLayout 
+</blockquote>
+
+<h2> SWT Build 3.5 03 - Tuesday July 29, 2008</h2>
+<blockquote>
+110916    	Backspace stops working (due to mouse stuck down)
+<br>193359 	Shared library for cairo not build on AIX/Motif
+<br>219133 	printer.getDPI() returns 72x72
+<br>232688 	Shell.setActive() is not implemented
+<br>236724 	[Browser] Eclipse causes JVM crash in libxul when editing Java
+<br>240817 	SWT Tree: in 3.4, DragSourceEvent gives higher x-coordinate than in 3.3
+<br>241144 	SWT deletes libswt-cairo-motif if libcairo isn't found
+<br>241443 	[Button] Paint event missed on traversal
+<br>241720 	Padding wrong when vertical lines displayed in Tree and Table
+<br>241743 	TableColumn pack works not the same on diffrent Platforms..
+<br>242003 	Image buffer is allocated twice unnecessarily
+<br>242030 	Filter in SWT.Paint event not delivered for table, tree and composite 
+</blockquote>
+
+<h2> SWT Build 3.5 02 - Tuesday July 22, 2008</h2>
+<blockquote>
+193359    	Shared library for cairo not build on AIX/Motif
+<br>200743 	[Clipboard] Copy/Paste intermittently doesn't work for a line of text
+<br>210872 	SWT.BALLOON tooltip draws background outside balloon
+<br>210874 	Crash when using SWT.BALLOON and SWT.ICON_INFORMATION
+<br>230119 	Keyboard navigation in the StyledText (Cocoa)
+<br>239418 	table.setLinesVisible(true) does not work on solaris. Eclipse 3.2.0 and GTK 2.12.0 and 11.
+<br>240190 	OSX: TabFolder Images not shown if setImage before setText or setControl
+<br>241380 	Ctrl+N doesn't work in the internal browser view
+<br>241490 	GC.setAlpha() / GC.getAlpha() does not work properly on Linux 
+</blockquote>
+
+<h2> SWT Build 3.5 01b - Tuesday July 15, 2008</h2>
+<blockquote>
+211536 	RTFTransfer not implemented; code demonstrating NSPasteboard attached
+<br>235968 	CCombo class should not be final
+<br>236634 	Cannot dismiss attribute type combo
+<br>239482 	SWT.VIRTUAL Table Freezes under 3.4 when dragging (DND) 
+</blockquote>
+
+<h2> SWT Build 3.5 01a - Tuesday July 08, 2008</h2>
+<blockquote>
+86745  Tree shows horizontal scrollbar although not required  
+<br>211202  StyledText#setSelection() does not reveal caret with non-zero selection  
+<br>221938  new GC(Control) doesn't work  
+<br>233261  dialog window distorted after going out of "Not responding" state  
+<br>236312  GTK Assertion for gdk_window_get_user_data  
+<br>239220  Text.getText() returns empty string after calling setText() with non-empty string  
+<br>239231  Text.getCaretLineNumber() differs between Windows and Linux  
+</blockquote>
+
+<h2> SWT Build 3.5 01 - Wednesday June 25, 2008</h2>
+<blockquote>
+54525    	Radio group gets traversed (gets focus) when not visible
+<br>65648 	Reparented Toolbars lose their tooltips if the shell they were originally created in is destroyed
+<br>87460 	StyledText: Caret location not updated when line style is used
+<br>101153 	Text.getText(int,int) can throw StringIndexOutOfBounds
+<br>119173 	IllegalArgumentException when applying overlapping StyleRanges
+<br>125499 	Pixel corruption when setSelection() called from within SWT.SetData
+<br>127971 	Cannot remove caret in FocusOut handler
+<br>211358 	New windows opened at bottom-left of screen
+<br>211363 	Weird resize behaviour in paint example
+<br>226090 	Clarify/improve TextLayout.setText(String)
+<br>236347 	swt standalone zip contains javadoc location from eclipse 3.1?
+<br>237138 	StyledText blank in Linux RedHat
+<br>237432 	[64] Add External JARs in Java Build Path fails consistently
+<br>237486 	[Accessibility] Shift+Tab navigates forward (should be backward)
+<br>237675 	Giving focus to other control during FocusIn doesn't reassign the Caret
+<br>237903 	Browser sends LocationEvent with non-URL location for file:/C:/...
+<br>238149 	Rollover tooltip for owner-drawn tree should be hidden when tree view changes
+</blockquote>
+
+<h2> SWT Build 3.4 48f - Wednesday June 18, 2008</h2>
+<blockquote>
+237432	[64] Add External JARs in Java Build Path fails consistently
+</blockquote>
+
+<h2> SWT Build 3.4 48e - Thursday June 12, 2008</h2>
+<blockquote>
+236288    	update swt.tools and swt.examples.browser.demos.source to include about.html
+<br>236419 	Printing does NOT work on Mac
+<br>236669 	exception when removing TableItem
+</blockquote>
+
+<h2> SWT Build 3.4 48d - Friday June 6, 2008</h2>
+<blockquote>
+235350 	[64] Bad screen display
+<br>235806 	improper usage of "Device" when setting font description in org.eclipse.swt.graphics.TextLayout constructor
+<br>235847    	[Contributions] [Mac] Odd behaviour in help menu on OS X
+</blockquote>
+
+<h2> SWT Build 3.4 48c - Thursday June 5, 2008</h2>
+<blockquote>
+10465    	org.eclipse.swt.graphics.Image Documentaton
+<br>78818 	Bengali not showing in Editor
+<br>84463 	Equals sign (=) is rendered in incorrect font.
+<br>98894 	Shell.setImages() should be smarter on Mac
+<br>102201 	disposing TableColumn can change display order
+<br>161792 	Printer.computeTrim(...) javadoc is confusing
+<br>164437 	Disable automatic horizontal scrolling on tree item selection
+<br>173340 	[zh_CN] StyledText default font are too small compared to other SWT text on Windows for Simplified Chinese
+<br>204199 	Problem with copy/append of GB18030 characters
+<br>223525 	Describe multiple wildcards usage in org.eclipse.swt.widgets.FileDialog.setFilterExtensions(String[]) javadoc
+<br>235324 	Canvas#getCaret() should tell that caret can be null
+<br>235329 	vertical scroll bar remains in empty tree viewer
+<br>235348 	Exception in setItemCount
+<br>235417 	org.eclipse.swt..motif.hpux.ia64_32 has qualifer HEAD
+<br>235617 	The visibility of the constructor org.eclipse.swt.graphics.Resource.Resource() has been reduced
+</blockquote>
+
+<h2> SWT Build 3.4 48b - Wednesday June 4, 2008</h2>
+<blockquote>
+235324    	Canvas#getCaret() should tell that caret can be null
+<br>235329 	vertical scroll bar remains in empty tree viewer
+<br>235348 	Exception in setItemCount
+</blockquote>
+
+<h2> SWT Build 3.4 48a - Tuesday June 3, 2008</h2>
+<blockquote>
+219437    	Javadocs of get/setAlpha(..) should specify range of value
+<br>227914 	IAE in TextLayout._getOffset()
+<br>229469 	Drag Source Effect not visible for Tree and Table
+<br>232625 	SWT/JFace - Lack of examples in API
+<br>232685 	ScrollBar works incorrectly with StyledText
+<br>232686 	Shell doesn't send SWT.Move
+<br>234940 	TextLayout#drawText and GC#drawText draw some Unicode very differently.
+<br>235219 	Cheese in tree
+</blockquote>
+
+<h2> SWT Build 3.4 48 - Friday May 30, 2008</h2>
+<blockquote>
+234751 Warnings in SWT builds
+</blockquote>
+
+<h2> SWT Build 3.4 47 - Friday May 30, 2008</h2>
+<blockquote>
+36226    	DCR - Improve Performance for Large Tables
+<br>223823 	ControlExample: Select Listeners dialog opens behind menu bar
+<br>231958 	TVT34:TCT236: KO: truncation of "Configure connection preference..."
+<br>234437 	CCombo#setVisible() doesn't check if the popup shell is disposed
+<br>234732 	WRAP break font fallback , DBCS does not show
+<br>234738    	TextLayout font fallback improvement
+</blockquote>
+
+<h2> SWT Build 3.4 46d - Thursday May 29, 2008</h2>
+<blockquote>
+233638 	Extreme performance degradation in TextLayout.shape()
+<br>234158 	StyledText should stop blinking caret when losing focus in verify key listener
+<br>234271 	Invalid thread access logged in the .log file
+<br>234433 	[Browser] Some characters cannot be entered in forms
+<br>234481 	API consistency changes needed
+</blockquote>
+
+<h2> SWT Build 3.4 46c - Wednesday May 28, 2008</h2>
+<blockquote>
+213194    	[Browser] setText crash with xulrunner 1.9 stream
+<br>234119 	Segfault when disposing shell in keylistener of browser
+</blockquote>
+
+<h2> SWT Build 3.4 46b - Tuesday May 27, 2008</h2>
+<blockquote>
+229181    	[DateTime] DateTime widget does not report mouseDoubleClick
+<br>233595 	DragImage looks bad on vista (table+tree)
+<br>233598 	carriage return inserted twice when using text box in web browser
+<br>233867 	Text#getPosition() is missing JavaDoc
+<br>233969 	NPE in Tree.windowProc when starting to drag elements
+<br>233985 	build.xml's need updating to rename *._properties to *.properties
+</blockquote>
+
+<h2> SWT Build 3.4 46a - Thursday May 22, 2008</h2>
+<blockquote>
+232617 TVT34:TCT301: The Update Preferences link is not active in Linux
+<br>Bug 233487 add swt's nl files for swt stand-alone download
+</blockquote>
+
+
+<h2> SWT Build 3.4 46 - Thursday May 22, 2008</h2>
+<blockquote>
+225404 	Clicking on areas to left or right of cell editors in tree does not raise a FocusIn event for tree on vista
+<br>229481 	Drag Images not supported in Custom Trees and Tables
+<br>231877 	WM_PRINT for ToolBar with SHADOW_OUT
+<br>232163 	[Accessibility] StyledText speaks entire value when asked for "line"
+<br>232499 	[JFace] Slower image painting due to fix for bug 224422 and bug 219432
+<br>232965 	[breadcrumb] set top item in drop down is too aggressive on OSX
+<br>233351 	fix leak in drag image
+</blockquote>
+
+<h2> SWT Build 3.4 45d - Wednesday May 21, 2008</h2>
+<blockquote>
+222582    	[Perspectives] BIDI3.4:HCG Wrong caption alignment in Customize Perspecitve dialog with Hebrew translation
+<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
+<br>228282 	[Accessibility] Table & Tree with no column headers say "sort button" on Leopard
+<br>229570 	Screen cheese in breadcrumb when using Windows classic style
+<br>231882 	[Accessibility] Characters typed into Text are not accessible on Leopard
+<br>232114 	[Accessibility] VoiceOver speaks name of some controls twice
+</blockquote>
+
+<h2> SWT Build 3.4 45c - Friday May 16, 2008</h2>
+<blockquote>
+201774    Mozilla Browser doesn't open at the first execution in a Linux RHEL 4.
+<br>228762 	setRegion on Button behaving strangely after shell.open
+<br>232017 	[breadcrumb] Open type dialog pops up behind breadcrumb drop down on OSX
+</blockquote>
+
+<h2> SWT Build 3.4 45b - Thursday May 15, 2008</h2>
+<blockquote>
+226007  BIDI3.4: search results appear shaped improperly
+<br>227076 	[DND]Combo:Multiple problems during drag text in combo on Mac OS X
+<br>231787 	When computing bounds,TextLayout does not take trailing line break into account
+<br>231925 	Arrow button is drawn backwards
+<br>232093 	crash in Safari browser while handling key events
+</blockquote>
+
+<h2> SWT Build 3.4 45a - Wednesday May 14, 2008</h2>
+<blockquote>
+231606 	[Browser] disposing Browser in KeyDown causes crash
+<br>231690 	Smooth scroll is slow on Vista with DWM, impossible to turn off (for text editors)
+<br>231884 	[Accessibility] Controls that implement kEventAccessibleGetNamedAttribute need to call swt accessible API
+</blockquote>
+
+<h2> SWT Build 3.4 45 - Tuesday May 13, 2008</h2>
+<blockquote>
+206870  [Mac] New Project wizard Finish button isn't enabled for Japanese project name
+<br>214503 	Incorrect KeyEvents returned using SWT_AWT.
+<br>223926 	Table/Tree scrollbars bad after setVisible()
+<br>225373 	Bidi3.4: Unicode Markers don't have any effect in Console View
+<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
+<br>227965 	Tooltip for table column not appearing
+<br>227974 	DBCS3.4: Dragged texts from Safari gets garbled when dropped on a StyledText widget
+<br>228167 	DBCS3.4: URLTransfer for DBCS URL failed
+<br>228762 	setRegion on Button behaving strangely after shell.open
+<br>229520 	FileDialog does not provide enough information to open multiple files from different directories
+<br>230940 	(Hovering over a link in Safari does not change the cursor or display the URL
+<br>231102 	javadoc warning in I20080507-2000
+<br>231148 	[Accessibility] StyledText typed characters are not accessible on Leopard
+<br>231192 	[Accessibility] Characters typed into Editable Combo are not accessible on Leopard
+<br>231303 	Browser widget: Tab key traps focus when key listener is added
+<br>231449 	First Table Row Justification Wrong
+</blockquote>
+
+<h2> SWT Build 3.4 44 - Thursday May 8, 2008</h2>
+<blockquote>
+223926 	Table/Tree scrollbars bad after setVisible()
+<br>230940 	Hovering over a link in Safari does not change the cursor or display the URL
+<br>231102 	javadoc warning in I20080507-2000
+<br>231148 	[Accessibility] StyledText typed characters are not accessible on Leopard
+<br>231192 	[Accessibility] Characters typed into Editable Combo are not accessible on Leopard
+</blockquote>
+
+<h2> SWT Build 3.4 43 - Wednesday May 7, 2008</h2>
+<blockquote>
+202902    	Password can not be saved with SWT.MOZILLA browser
+<br>212991 	Mac OS X accessibility does not have the standard relations
+<br>214944 	[browser] xulrunner 1.9-based Browser has no initial background
+<br>216919 	Incompatibilities with MacOSX CMI (Context Menu Interface)
+<br>219558 	[CellEditors] ComboBoxCellEditor doesn't work properly (CCombo)
+<br>222582 	[Perspectives] BIDI3.4:HCG Wrong caption alignment in Customize Perspecitve dialog with Hebrew translation
+<br>222937 	[typing] DBCS3.4: "Assign parameter to new field" refectoring function in DBCS environment
+<br>224550 	GB180303.4: Some 4-bytes GB18030 characters can't be displayed in Package Explore view.
+<br>226653 	DBCS3.4: Unicode Ideogrpahic characters for Vista Japanese are not displayed in text editor
+<br>229377 	No vertical scrollbars in the stacktrace console
+<br>229508 	When closing Eclipse from dock with modified file, window does not restore
+<br>229672 	Fix for bug 228182/222937 is adding a new API after API freeze
+<br>229680 	PRIMARY_MODAL Shell can make other Shell lose its menubar
+<br>229776 	SWT.TOGGLE style bit stops setRegion from working on linux
+<br>229841 	Widget is disposed in ControlExample
+<br>230071 	Snippet223 requires an image
+<br>230388 	Cannot get focus out of browser widget any more
+<br>230489 	use DeleteObject to dispose non-Mlang fonts
+<br>230912 	IAE when leaving IME
+<br>230935 	[Accessibility] StyledText speaks name twice
+<br>231009 	Compile Error on GTK 2.2.x: Fields missing from PangoLayoutLine</blockquote>
+
+<h2> SWT Build 3.4 42a - Wednesday April 30, 2008</h2>
+<blockquote>
+229377    	No vertical scrollbars in the stacktrace console
+</blockquote>
+
+<h2> SWT Build 3.4 42 - Wednesday April 30, 2008</h2>
+<blockquote>
+148094  Control#setCapture() not working as expected
+<br>220642 	[open type] Open Type dialog does not work in high contrast
+<br>226832 	BIDI3.4:HCG "Cancel" button of Source Folder Selection dialog does not work in Hebrew version
+<br>229172 	[Win32] MessageBox gets stuck in event loop
+</blockquote>
+
+<h2> SWT Build 3.4 41 - Tuesday April 29, 2008</h2>
+<blockquote>
+51829    	GTK-BIDI: RTL support in Dialogs
+<br>102686 	Browser widget, suppress key actions.
+<br>181937 	[OLE] eclipse should handle accelerators before OLE controls
+<br>206485 	GTK-BIDI: Bidi support in Link.
+<br>214381 	Tree hover help leaving cheese
+<br>219641 	Triple vertical scrollbar inside compare editor
+<br>221048 	Browser doesn't send key events for arrow keys on Windows platform
+<br>222024 	Browser widget sends key events with wrong character/keyCode
+<br>222594 	BIDI3.4:HCG Context menu is not mirrored
+<br>225677 	Random crashes attributable to Safari
+<br>226016 	BIDI3.4: Last two characters in BIDI text are not shaped correctly
+<br>226023 	BIDI3.4: Last two characters in Arabic in tooptip are not shaped correctly
+<br>226106 	BIDI3.4: Arabic text in console is not shaped correctly
+<br>228273 	[Accessibility] ToolBar is not accessible on Leopard
+<br>228277 	[Accessibility] Table & Tree are not accessible on Leopard
+<br>228287 	[Accessibility] Link is not accessible on Leopard
+<br>228484 	[Browser] unable to go to next or previous editor since browser consumes common keys (F6 and Tab)
+<br>228667 	ACC: SWT does not give focus to a context menu from a dialog
+<br>228770 	setRegion on Canvas not working on linux
+<br>228968 	NPE in MozillaDelegate
+</blockquote>
+
+<h2> SWT Build 3.4 40 - Tuesday April 22, 2008</h2>
+<blockquote>
+73390   Tooltips not shown for some widgets
+<br>127848 	CustomControlExample CLabel background image differences
+<br>160707 	code hints window remains visible when minimizing eclipse
+<br>174014 	GC.isClipped() always returns false in advanced graphics mode
+<br>191968 	Stack overflow due to infinite recursion when calling Control.update from inside a PaintListener
+<br>192365 	Label is truncated under Linux.
+<br>195564 	Unsetting image in but not working
+<br>197794 	Transformed drawing broken in SWT 3.3 (but specific values only)
+<br>210028 	[mac] screenshot tool does not capture multiple displays properly
+<br>219133 	printer.getDPI() returns 72x72
+<br>220471 	[Accessibility] Editable Combo is not accessible on Leopard
+<br>223015 	Combo height on Linux is too small
+<br>223480 	Combo within Toolbar no longer renders correctly
+<br>223512 	[CCombo] dropdown does not move when window is dragged
+<br>224122 	Opening a modal dialog while an ON_TOP shell is active should activate the dialog
+<br>224870 	Bidi3.4: Eclipse Crashes when trying to open HTML file that resides in Arabic named project
+<br>225351 	Owner draw: measure doesn't allow to change width
+<br>225975 	SWT Table: PaintItem events not sent for items with empty text on Mac OS X
+<br>226229 	Carbon Text widgets cannot be properly center-aligned when style is SWT.SEARCH
+<br>226363 	BIDI3.4:HCG TreeColumn has wrong BIDI alignment with style SWT.NONE
+<br>227384 	Owner draw tree showing too much gap between selected items
+<br>227411 	Controls in shell blocked by a modal shell still scroll via the scroll wheel
+<br>27597 	BIDI: owner draw: tool tips don't work with BIDI
+</blockquote>
+
+<h2> SWT Build 3.4 39 - Tuesday April 15, 2008</h2>
+<blockquote>
+4800    	Timings vs. Sun JDK on image loading/creation/drawing (1GIVMG8)
+<br>5927 	Cannot start eclipse from anywhere but install directory
+<br>24640 	Vertical scrollbar obscures the combo box pulldown
+<br>29764 	BIDI:Dialogs are not mirrored RTL.
+<br>35915 	Need a locale String from FontData
+<br>36729 	File deleted by unexpected drag and drop
+<br>42485 	Mouse cursor does not hide when typing on Mac OS X
+<br>56184 	[browser] IE sometimes freezes on PDF documents with Acrobat Reader 6.0 plugin
+<br>69986 	TabItem contents have wrong background on Mac/Carbon
+<br>76381 	[Browser] Help contents does not start with keyboard focus
+<br>95982 	Double-touch trackpad scrolling doesn't work in the compare editor
+<br>101948 	FileDialog.setFilterExtensions ineffective on Mac OSX
+<br>116748 	Custom Combo: drop down menu is hard to use
+<br>119156 	org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
+<br>125866 	need more parent.indexOf() == -1 checks in TableItem
+<br>126544 	Eclipse can't use the font BitStream Vera Sans Mono in plain style (only italics)
+<br>128436 	Tree with gray state does not report state to Accessible listeners
+<br>130470 	[Tree] Selection-Rect changes on expanding TreeItem causes pixel corruption
+<br>139866 	Text.setTextLimit() not limiting pasted text
+<br>143358 	Tree items array don't shrink correctly
+<br>153365 	DirectoryDialog's setFilterPath() has no effect
+<br>158243 	Background for read only Text objects is wrong in dialogs.
+<br>177368 	Display.getCursorControl returning null for complex Xlib widget on Eclipse/Gtk
+<br>187036 	[Workbench] TVT33:TCT[Workbench] 159: ar: 13.001120 Tool tips text does not have RTL reading order
+<br>192542 	Eclipse 3.3RC3 Loosing keyboard input while using Synergy
+<br>196676 	[consistency] Link does not fire double-click events
+<br>197238 	UML causing stack overflow
+<br>202534 	SWT error in Wizard dialog when help is displayed and "Finish" is pressed
+<br>204915 	SWT.COLOR_WIDGET_BACKGROUND is not the default label background color on Mac OS X with UNO
+<br>207206 	jvm crash using mozilla browser on linux
+<br>211181 	Help Browser crashes on Windows 2000
+<br>215879 	SWT crashes on start
+<br>223298 	Coredump running Demo-App from EclipseCon
+<br>224550 	GB180303.4: Some 4-bytes GB18030 characters can't be displayed in Package Explore view.
+<br>224917 	Program.findProgram should return null on Vista if there are no known applications
+<br>224941 	Esc deactivates parent shell if SWT.TOOL is used
+<br>225527 	rendering problems after removing owner listeners
+<br>225933 	First Table Column Justification Ignored
+<br>225946 	TOGGLE Buttons inherit background with SWT.INHERIT_DEFAULT
+<br>225973 	Cant attach Menu to a Link widget
+<br>226356 	[patch] Build against xulrunner
+<br>226469 	Successfully to setFocus to a control while getFocusControl return null
+<br>226747 	CCombo arrow button not centered
+</blockquote>
+
+
+<h2> SWT Build 3.4 38 - Tuesday April 08, 2008</h2>
+<blockquote>
+170459    	SWT_AWT: Focus problem in Java 6
+<br>181864 	[Browser] crash when disposed in changing callback
+<br>192646 	TextLayout implementation on VISTA platform cannot correctly render some gb18030 characters(Mongolian Baiti, Microsoft Yi Baiti etc)
+<br>205032 	Eclipse crashes after a couple of hours
+<br>207909 	[carbon SWT] ON_TOP shell can not be hidden when parent shell is minimized
+<br>210854 	setSize on Spinner doesn't have an effect
+<br>214721 	The web service explorer crashes on Linux when basic auth is required
+<br>220465 	[Accessibility] StyledText is not accessible on Leopard
+<br>221268 	Running operation that continuously refreshes/updates SWT Browser it does not stay minimized
+<br>221411 	[Accessibility] Leopard: VoiceOver doesn't follow focus if Browser is in Shell
+<br>223592 	Control.print(GC) does not work on Linux.
+<br>224121 	BIDI3.4:HCG Print dialog is not mirrored completely
+<br>224124 	Mac OS X Tree poor performance
+<br>224462 	[Browser-Mozilla] Save-as window shown when disposing the browser during a location changing event
+<br>224870 	Bidi3.4: Eclipse Crashes when trying to open HTML file that resides in Arabic named project
+<br>225038 	Virtual table create all items if setItemCount before create first column
+<br>225086 	[Browser] Browser widget does only receive key events when using IE
+<br>225151 	GTK MenuItem Accelerator Consuming Characters (SWT.COMMAND)
+<br>225263 	Opening a fast view crashes Eclipse
+<br>225329 	Owner draw: gc in paint doesn't have foreground color set
+<br>225440 	MenuDetect events sent with (0, 0) coordinates
+<br>225593 	org.eclipse.swt.events.LineStyleEvent doesn't keep the style when multiple listener are listening
+<br>225663 	ToolTip forTrayItem causes crash on Carbon
+<br>225997 	TextLayout font seems not the be the system font
+</blockquote>
+
+<h2> SWT Build 3.4 37 - Tuesday April 01, 2008</h2>
+<blockquote>
+126545    	[CTabFolder] API to enable / disable Close-Button on TabItems
+<br>207511 	Mac SWT callback generates incorrect assembly code
+<br>219165 	JVM: AttachCurrentThread crashing as of 1.5
+<br>221924 	Perspective Switcher context menu appears in bad location
+<br>223846 	[Viewers] Open Resource dialog causes 'Ignored reentrant call while viewer is busy'
+</blockquote>
+
+<h2> SWT Build 3.4 35 - Thursday March 20, 2008</h2>
+<blockquote>
+4727 DCR: FileDialog to use overwrite prompt (1GFDH0D)
+<br>146643 	awt frame on osx works on first initialization of workspace but not after
+<br>183830 	"Xlib: unexpected async reply" and deadlock in GLX.glXMakeCurrent(int, int, int)
+<br>193362 	update() does not flush paints (Display#readAndDispatch() needed)
+<br>210858 	Editing text has no horizontal scrollbar
+<br>222798 	[Shell] SWT.MAX does not work
+<br>223170 	Memory leaks and number of handles growth
+<br>223179 	BIDI3.4:HCG Hebrew data in Java editor is treated different from Win OS
+<br>223397 	Set/Get API of DateTime widget crashes the control example
+<br>223591 	Button.print(GC) does not work on Windows.
+</blockquote>
+
+<h2> SWT Build 3.4 35 - Thursday March 20, 2008</h2>
+<blockquote>
+215204  read-only Combo.setText() does not fire Modify event on GTK
+<br>220852 	Combo control does not fire modify events on gtk+
+<br>222120 	DND - how to detect which tab item is involved in a DropTargetEvent
+<br>222281 	Table events screwed up if asyncExec happens on focus lost / out
+<br>222896 	Tree#getColumnCount() can be slow because of Win32 API calls
+<br>223082 	javadoc warning in N200803172000
+</blockquote>
+
+<h2> SWT Build 3.4 34 - Tuesday March 18, 2008</h2>
+<blockquote>
+78825   [CCombo] Tab doesn't go to next entry field when list is down
+<br>142981 	[CCombo] CCombo doesn't lose focus
+<br>175689 	[CCombo] CCombo#deselectAll() doesn't clear Text
+<br>183087 	Windows trees don't have to always have scroll bars
+<br>202005 	GC Transform rotate(90) or rotate(-90) not applied to several methods
+<br>204102 	Eclipse freezes on opening java source file (with spell checking enabled)
+<br>204891 	TabFolder.setSelection() does not update focus hilight on OS X
+<br>210870 	Toolbar Drop Down type doesn't appear to do anything
+<br>212086 	gc.drawXXX fails if matrix is rotated
+<br>214944 	[browser] xulrunner 1.9-based Browser has no initial background
+<br>215243 	Wrong drawing behaviour using SWT and Cairo drawing a text and then an oval
+<br>215988 	Transform.rotate does not work when angle is 90 and GC.setLineWidth(0)
+<br>217831 	DateTime different size than other widgets
+<br>220112 	[SashForm] Add getter/setter methods to control SashForm.SASH_WIDTH
+<br>220836 	[Browser] SWT Safari Browser uses wrong 'user-agent' header resulting in some websites disabling functionality
+<br>220974 	ClassCastException in Safari
+<br>220975 	New Java Project Wizard doesn't work
+<br>221363 	Disappearing Text with Tabs & Quotes
+<br>221669 	DateTime returns wrong values under Windows
+<br>221687 	[Viewers] TableViewer scrolls after selection on AIX
+<br>221957 	Huge Cursor in huge Text control
+<br>221958 	Transform.setIdentity() method is needed
+<br>222305 	ToolItem should call ToolBar.destroyItem
+<br>222381 	AIOOBE in GIFFileFormat
+<br>222872 	Fixes for running SWT tests on p2 builds
+</blockquote>
+
+
+<h2> SWT Build 3.4 33 - Tuesday March 11, 2008</h2>
+<blockquote>
+184932    	[SWT] Popup window with SWT.ON_TOP style bit stays opened when minimize the application window
+<br>205796 	[Browser] Navigate / Open External Javadoc does not work on method anymore
+<br>209428 	[Browser] crash on mouseover
+<br>210825 	NSBox seems to be a few pixels short
+<br>211362 	Crash running paint example
+<br>211885 	ScrolledComposite control's setOrigin method not the same as moving scroll bar on Windows
+<br>216346 	NullPointerException in Display.asyncExec
+<br>221302 	[browser] Eclipse crashes everytime the internal browser component is activated
+<br>221512 	Ctrl-Click in package explorer select the item only on the second click
+<br>221559 	Cut/Paste does not fire modifyText events in Combo
+<br>221665 	NPE using N20080306 once closing the Welcome page
+<br>221683 	Label always wraps
+<br>221936 	Cannot paint on label with text.
+</blockquote>
+
+<h2> SWT Build 3.4 32 - Tuesday March 04, 2008</h2>
+<blockquote>
+26095    	DCR - possibility to print the content of SWT widgets
+<br>117335 	[Accessibility] Mac: cannot select checkboxes in trees, lists
+<br>152547 	Clarify what SWT.NO_FOCUS means
+<br>166381 	alignment support for RowLayout and RowData
+<br>178587 	[ScrolledComposite] Accessibility: ScrolledComposite widgets don't automatically scroll when controls are tabbed to inside the composite
+<br>186634 	Spinner: getSelection() during modify event should provide a mechanism to detect if the user has typed a value that is out of range
+<br>198430 	Font not set correctly in GC supplied to events of virtual table/tree
+<br>210306 	Menu items created in menuNeedsUpdate: do not show up
+<br>210826 	Enabled on NSButton seems to have no effect
+<br>210827 	Add pop-up menu, remove, select and crash
+<br>214030 	setTextLimit for SWT Spinner widget
+<br>214599 	Link Widget: hyperlink parsing mangles certain input strings
+<br>215183 	Shell with ON_TOP style stay behind of Shell with APPLICATION_MODAL style.
+<br>216900 	StyledText: Cannot overtype contents if text limit reached
+<br>217374 	VoiceOver does not work on Leopard (10.5.1)
+<br>217446 	TextLayout#getBounds() should return minimal bounds also if width was set
+<br>218295 	Clicking into white area besides tree with SimpleStyledCellLabelProvider selects single element
+<br>218502 	event loop exception starting mozilla
+<br>218606 	Shells no longer added to defaultWindowGroup as of 2.10.x
+<br>219306 	StyledText.getTextBounds does not work when using SWT.WRAP
+<br>219307 	GlyphMetrics behaves differently on carbon
+<br>219582 	SWT.KeyDown event.keyCode reports wrong key number for Marathi & Bengali
+<br>220057 	DND exception when dragging file within a Common Navigator in 3.4M5
+<br>220246 	Whenever the internal browser component is loaded, eclipse crashes
+<br>220398 	implement Table and Tree checkboxes
+<br>220462 	TableItem/Treeitem getBounds not implemented
+<br>220583 	All the JUnits with ui are failing on Linux for N20080227-0010
+<br>220836 	[Browser] SWT Safari Browser uses wrong 'user-agent' header resulting in some websites disabling functionality
+<br>220997 	Path.addString uses incorrect Transform
+<br>221128 	Mozilla fires wrong events when executing java script
+<br>221166 	Graphics Example GraphicAntialiasTab doesn't work
+</blockquote>
+
+<h2> SWT Build 3.4 31 - Tuesday February 26, 2008</h2>
+<blockquote>
+78974    	[Browser] EventListener:changing() called twice on Browser:setText()
+<br>103124 	On Linux,Key event doesn't stop propagating after it is responsed by an "ActionSet".
+<br>210430 	Shell.setMenuBar() does not work
+</blockquote>
+
+
+<h2> SWT Build 3.4 30 - Friday February 22, 2008</h2>
+<blockquote>
+28132 Repaint cheeze with editor bottom right corner
+<br>173794 	[Browser Mozilla]: Display-Filter (SWT.MouseWheel) no longer working when focus set to Browser
+<br>190992 	String truncation in non-English cases.
+<br>195585 	HTMLTransfer does not support non-English text.
+<br>210857 	Text box without 'SWT.V_SCROLL' uneditable
+<br>211284 	[Browser] Browser widget in ON_TOP shell not focused on first click (Mozilla/Safari)
+<br>211357 	FileViewer crashes
+<br>211359 	Apple+Q doesn't quit an SWT app, nor does menu selection of same
+<br>213489 	Increasing height of table rows via MeasureItem listener affects row height but not line height (OS X)
+<br>213937 	The Method getBorderWidth () from Control returns 0 every time
+<br>214557 	Combo#add(String,int) does update selection-index
+<br>215252 	frequent "invalid thread access"
+<br>217371 	[Browser] Support click-through for Browser and toolbar buttons
+<br>217842 	NPE in GC when creating problems View
+<br>218229 	API to open an URL in the OS default browser
+<br>218234 	Display keeps lock on runnable for timerExcec when disposed
+<br>218682 	2nd GC erases the first.
+<br>218700 	Tree getHeaderHeight not implemented
+<br>218702 	Tree getSelectionCount not implemented
+<br>219326 	Shell with custom region and SWT.NO_TRIM still has border
+<br>219601 	StyledText: Unexpected loss of mouse cursor
+<br>219621 	Tree get/set column order not implemented
+<br>219693 	Eclipse crashes when Browser closed with command-W
+</blockquote>
+
+<h2> SWT Build 3.4 29 - Tuesday February 12, 2008</h2>
+<blockquote>
+196191  Performance Improvement for JPEGFileFormat class initializer
+<br>199811 	Calling TableItem#setText(int,String) with sortDirection set to SWT.DOWN extermley slow
+<br>211360 	Graphics example can't select items from tree-menu
+<br>215335 	[browser] browser.execute(s) does not work on Linux/Mozilla when using line comments
+<br>217430 	Certain SWT controls do not display under linux
+<br>217764 	setting Device.DEBUG before creating Display fails silently
+<br>217854 	[Leopard] Errors logged during GC tests
+<br>218088 	Hover help in editor re-appears after restoring from minimze
+<br>218212 	Text failing jUnit tests
+<br>218215 	shells created too large with multple monitors
+<br>218514 	Control.print() does not work with gtk 2.4.x and greater
+<br>218547 	Tree selectAll doesn't
+</blockquote>
+
+
+<h2> SWT Build 3.4 28a - Thursday February 07, 2008</h2>
+<blockquote>
+217374 	VoiceOver does not work on Leopard (10.5.1)
+<br>218061 [browser] GRE version range upper bound should include 1.9.*
+</blockquote>
+
+<h2> SWT Build 3.4 28 - Wednesday February 06, 2008</h2>
+<blockquote>
+217849    	JUnit test failure - FontData
+<br>217854 	[Leopard] Errors logged during GC tests
+<br>217915 	[64] FileDialog consistently crashes
+</blockquote>
+
+<h2> SWT Build 3.4 27 - Tuesday February 05, 2008</h2>
+<blockquote>
+53608    	TableCursor bounds are wrong. Cursors does not fit TableItem bounds.
+<br>150559 	[DND] No insertion feedback for dragging in a tree on Mac
+<br>182196 	[CCombo] Mouse Listener Support for CCombo
+<br>191252 	Virtual Tree w/ columns: Items appear in wrong order when sortDirection is SWT.DOWN
+<br>198582 	SIGSEGV [libxpcom.so+0xc976d] _ZN13nsCOMPtr_baseD2Ev+0x13
+<br>207819 	JFace tests don't run on WPF
+<br>209016 	[Viewers] Virtual Tree Tests failing on OS X in I20071106-0816
+<br>212823 	Calling Region.add with only 1 polygon point causes a segfault
+<br>213194 	[Browser] setText crash with xulrunner 1.9 stream
+<br>214682 	[Browser] download crashes wih xulrunner 1.9
+<br>214802 	[browser] xulrunner 1.9 uses new interface for authentication
+<br>215388 	Add API to make the DropTarget more open
+<br>216805 	[Browser] shutting down XPCOM glue can lead to crash with sun 1.6 jre
+<br>217154 	Shell.checkOpen incorrectly named
+<br>217161 	List.getItemHeight can return 0
+<br>217179 	Table and Tree return incorrect default background and foreground color
+<br>217180 	TreeItem getBackground, getForeground, getFont not implemented
+<br>217242 	PNG cannot be loaded anymore, worked with releases before
+<br>217319 	Fix Iconify/DeIconify events on Shell
+<br>217336 	Linux mirroring problems
+<br>217470 	BIDI: Custom Draw Tree does not render properly in 2.8
+<br>217746 	Table test failures.
+<br>217758 	Combo test failures
+</blockquote>
+
+<h2> SWT Build 3.4 26 - Tuesday January 29, 2008</h2>
+<blockquote>
+66615    	SWT_AWT.new_Frame occasionally hangs
+<br>71478 	ImageData constructor accepts incomplete pixel data
+<br>133933 	[Browser] KeyDown events not fired on Safari
+<br>190793 	GTK Printing getClipping returns [0,0,1,1]
+<br>196864 	Toolbar should support animated gifs
+<br>198192 	Setting font on TableItem to same font (but different Font object) causes crash
+<br>199495 	in Device.getFontList() every FontData has height=0
+<br>205713 	It displays a wrong character when input "1" character by display.post() method on Mac OS X
+<br>210756 	Closing context menu programmatically does not work on the Mac
+<br>211224 	[Browser] MouseMove and MouseUp events not fired on Safari
+<br>211531 	[Browser] Stop calling HIJavaViewCreateWithCocoaView
+<br>216137 	[Linux] DateTime does not render correctly values < 10.
+<br>216287 	Compiler warnings in N20080123-0010 in swt tests
+<br>216340 	Display.readAndDispatch() always returns true
+<br>216431 	SWT_AWT: sun.awt.EmbeddedFrame is activated incorrectly
+<br>216482 	Different table behaviour after SWT.MeasureItem/SWT.PaintItem event under Windows XP and Vista
+<br>216593 	[browser] unavailable Safari events crash Eclipse
+<br>216614 	NPE in image
+</blockquote>
+
+<h2> SWT Build 3.4 25 - Tuesday January 22, 2008</h2>
+<blockquote>
+16987   [CCombo] does not respond to MouseWheel
+<br>47783 	Jpeg encoding (image height =1)
+<br>86457 	ImageLoader.save() doesn't save images 1 pixel wide
+<br>91317 	Spinner should support negative values
+<br>142965 	[64] Blank splitter dialogs until resized
+<br>166187 	TableItem#getBounds(0) incorrect when adding columns in asyncExec
+<br>182196 	[CCombo] Mouse Listener Support for CCombo
+<br>184063 	Logitech Revolution mouse doesn't scroll down editor when in "free-spinning" mode
+<br>191093 	[Dialogs] FileDialog missing default filter selection
+<br>191413 	Control's tooltip displays abnormally on linux platform.
+<br>193433 	[Combo] Incorrect initial focus in Generate constructor using fields
+<br>197224 	Annoying Message Box "prohibit running ActiveX controls" appear in browser when accessing page with applet
+<br>204127 	[Browser] SWT browser eats eclipse shortcuts when in edit mode
+<br>205351 	[CCombo] Adding a KeyListener changes expected traversal behavior
+<br>206743 	Tree with columns has drawing errors when resizing to a minimum
+<br>207613 	[Leopard] Progress dialog does not properly close on Leopard
+<br>210845 	SWT.Wrap for text labels doesn't wrap
+<br>211188 	Looks like squiggle and error_underline style have fat dash at end
+<br>211865 	Tooltip always prompt up in the wrong place
+<br>212366 	Mac OS X Context menu invocation is mouse down, not mouse up
+<br>213426 	Slow response for SWT Virtual Table Selection
+<br>215431 	Label: SWT.LEFT, SWT.CENTER, SWT.RIGHT not implemented
+<br>215592 	Breaking change in Eclipse 3.4M4 - Images loaded as type SWT.ICON cannot be rendered by GC.drawImage()
+<br>215875 	Table/TreeEditor broken on OS-X since at least I20071218
+<br>215881 	download links on swt main page broken
+</blockquote>
+
+<h2> SWT Build 3.4 24 - Tuesday January 15, 2008</h2>
+<blockquote>
+22261    	SWT should support a tri-state check box
+<br>42488 	Mouse cursor does not hide when typing on Windows
+<br>120192 	org.eclipse.swt.ole.win32.OleAutomation has a reference leak
+<br>139871 	Spinner does not support floating point data entry correctly
+<br>152822 	Incorrect key events reported when NO_FOCUS style used
+<br>158542 	StyledText: background not fully filled when using multi-font
+<br>172784 	FileDialog should provide access to selected filter after closing
+<br>177589 	up/down arrows don't work in a combobox on Linux
+<br>200956 	WinXP: Shell draws focus on setVisible(true)
+<br>210925 	Display.post() with german Umlaut does not work
+<br>211685 	DateTime fires spurious SelectionEvents
+<br>213923 	popup menu has bunch of empty items if it contains many items
+<br>214160 	Issues with transparent images when advanced graphics is on
+<br>214754 	ControlExample's "Select Listeners" has sizing problems
+<br>215148 	Inconsistent Spinner behaviour across platforms
+</blockquote>
+
+
+<h2> SWT Build 3.4 23 - Tuesday January 08, 2008</h2>
+<blockquote>
+49696   [browser] Mouse event listeners does not work in SWT Browser Widget
+<br>73019 	ImageLoader NPE
+<br>194393 	LocationListener#changed is not notified for local links
+<br>205264 	Path.addArc method does not work as expected on Apple OS X
+<br>205736 	[OLE] MS Word OLE Crash
+<br>205866 	SWT.Settings - no notification on Vista
+<br>210063 	[Browser] XGL enabled Suse : Blurred ConfirmEx dialog with long long URL string
+<br>211757 	[Leopard] SWT arrow buttons up and left point down and right in Mac OS X Leopard
+<br>211949 	[Browser] Linux(SLED10), Eclipse crash when XPCOM error in Mozilla OnStateChange callback
+<br>212851 	StyledText - getStyleRanges(int start, int length) returns wrong style range
+<br>212989 	[DateTime] Changing the month and showing a MessageBox leads to infinite SelectionEvents
+<br>213017 	Rollover tooltip for owner-drawn Tree appears behind detached Shell
+<br>213200 	[Leopard] errors logged to console by CGPathGetCurrentPoint
+<br>213247 	Combo box in CVS commit wizard leaves garbage behind on resize
+<br>214037 	Excel + org.eclipse.ui.PartInitException: Invalid Input
+</blockquote>
+
+<h2> SWT Build 3.4 22a - Tuesday December 11, 2007</h2>
+<blockquote>
+187039 Temporary screen cheese in trees when scrolling
+<br>191655 Table#getItem(Point) inconsitent on OSX when used without FULLSELECTION
+<br> 212610 Cannot delete text in Combo box
+<br>212671 table.setToolTipText("") does not disable native tooltips
+</blockquote>
+
+<h2> SWT Build 3.4 22 - Monday December 10, 2007</h2>
+<blockquote>
+21619    	Programmatically dropdown a combo
+<br>37031 	Full screen exclusive (not maximized) support for SWT
+<br>102570 	GTK-BIDI: Coordinate mirroring in GC
+<br>177589 	up/down arrows don't work in a combobox on Linux
+<br>200322 	[Leopard] setRegion of shell doesn't work with the new region on Mac OS X 10.5
+<br>206682 	Combo with SWT.READ_ONLY doesn't fire mouseevents
+<br>210995 	SWT Combo doesn't gain focus during choice selection in Eclipse 3.3/GTK
+<br>211623 	Server editor opens when project node is selected in server view
+<br>211678 	Compiler warnings in N20071201-0010
+<br>212366 	Mac OS X Context menu invocation is mouse down, not mouse up
+</blockquote>
+
+<h2> SWT Build 3.4 21 - Tuesday December 04, 2007</h2>
+<blockquote>
+111259    	[DND] Insertion mark in TreeViewer does not go away on GTK
+<br>143382 	Tree fails to register double-click while tool tip visible
+<br>144907 	[OLE] OLE int->short change to test and apply post-3.2
+<br>191655 	Table#getItem(Point) inconsitent on OSX when used without FULLSELECTION
+<br>197839 	removing paint and erase listeners from Tree don't re-enable native rollover tooltips
+<br>200322 	[Leopard] setRegion of shell doesn't work with the new region on Mac OS X 10.5
+<br>206346 	GTK-BIDI: RTL support in ExpandBar
+<br>208427 	GTK-BIDI: RTL support in MenuItems
+<br>210847 	SWT.ON_TOP on Shell doesn't appear to work
+<br>210861 	Text alignment for text box doesn't work
+<br>210869 	Enabled on toolbar has no effect
+<br>210873 	Icons for tooltip balloons don't work
+<br>210894 	Examples that use StyledText crash on startup
+<br>210942 	Some convenience methods for StyledText
+<br>211194 	Rollover tooltips in owner-drawn Tree only shown after delay
+<br>211195 	Shell decorations flicker when clicking into rollover tooltips in owner-drawn Tree
+<br>211196 	Rollover tooltips displaced in owner-drawn Tree without icons
+<br>211197 	Doubleclick does not work on owner-drawn TreeItem with rollover tooltip
+<br>211220 	Add Browser to ControlExample
+<br>211361 	GraphicsExample crashes
+</blockquote>
+
+<h2> SWT Build 3.4 20 - Tuesday November 27, 2007</h2>
+<blockquote>
+82206    	Solaris SWT GTK 3.1M4 has dependancy on libgcc_s.so
+<br>85699 	[64] Better error message required when running x86-64 SWT on a 32-bit VM
+<br>109888 	Browser fails to load when Mozilla compiled against libstdc++.so.6
+<br>114036 	[build] Support building libswt-awt-XXXX.so on Solaris/Motif
+<br>199292 	[leopard] Snippet260 fails (9A527)
+<br>204289 	Closing context menu programmatically does not work when shell not active
+<br>207394 	[OLE] getLicenseInfo in OleControlSite causes Program Compatibility Error in Vista with some Active X Controls which do not implement IClassFactory2 interface
+<br>208837 	[Browser] On Linux, Browser does not send focus/activation events
+<br>209960 	Combo widgets cause area beneath them to flicker when resized
+<br>210359 	Shouldn't crash VM if running on pre-Objective C 2.0 systems
+<br>210412 	GC.setLineAttributes() uses "join" as "cap"
+</blockquote>
+
+<h2> SWT Build 3.4 19 - Tuesday November 20, 2007</h2>
+<blockquote>
+82295    	properties http.proxyPort and http.proxyHost ignored by SWT browser
+<br>100095 	[DND] Consider making URLTransfer public
+<br>124965 	SWT Table scrolling performance degrades as the number of columns increases
+<br>165468 	INHERIT_FORCE and editable Text produces garbage on scroll
+<br>206432 	[Browser] Linux: SSL navigation is disabled when Mozilla profile directory does not exist
+<br>206894 	Linux - Control.setEnabled disables more than it should
+<br>207181 	FAQ needed to describe: "Modal dialogs do not stay on top on Solaris 10 with CDE / dtwm"
+<br>209014 	GTK-BIDI: RTL BIDI problems in SWT StyledText
+<br>209339 	Modal shell loses focus when a second shell is opened.
+<br>209417 	Please add files intended for Win64 on Itanium support.
+<br>209650 	Cleanup after Windows browser control dispose is flawed
+<br>209752 	MenuItem#toString() behaves differently across platforms.
+<br>209854 	SWTException when loading large win32 ICO files
+<br>209863 	Path leaks currentFigure and currentPoint when disposed
+<br>210214 	[OLE] Snippet265 leaks
+<br>210284 	Auto hide scrollbars in Tree/Table/List
+<br>210303 	bad release in NSBezierPath
+</blockquote>
+
+<h2> SWT Build 3.4 18 - Tuesday November 13, 2007</h2>
+<blockquote>
+42730    	[Clipboard] NPE while closing workbench on calling Clipboard.dispose
+<br>141282 	DnD doesn't support special characters
+<br>188271 	Ampersand not shown in tooltips
+<br>191484 	move initial build scripts from build project into swt
+<br>194143 	WM_MOUSEWHEEL can send fractional deltas
+<br>205648 	Vertical Scrolling with Mouse Wheel not working in Editors
+<br>205745 	NullPointerException in TableItem.getBounds because of SWT.EraseItem listener
+<br>206714 	Combo#toString() behaves differently on linux/gtk/x86_64 and windows
+<br>206715 	DateTime#toString() behaves differently on linux/gtk/x86_64 and windows
+<br>207052 	Tree Listening to MeasureItem returns incorrect Client Area
+<br>207628 	Keyboard selection does not work with context menus on Leopard
+<br>208503 	SWT_AWT bridge on OS X reports incorrect message with failure
+<br>208571 	[leopard] Crash when using Eclipse 3.3.1.1 and Instantiation's SWT Designer
+<br>208649 	cannot input china punctuation
+<br>208675 	Image cheese when width of TreeColumn = 0
+<br>208816 	Update custom build.xml for source generation
+<br>208975 	Unable to enter vertical bar (|) in Eclipse for mac OS X with French Canadian keyboard
+<br>209014 	GTK-BIDI: RTL BIDI problems in SWT StyledText
+<br>209022 	DateTime cannot be shown without a border
+<br>209028 	Table and List test failures
+<br>209039 	display.getMonitors() not implemented
+<br>209088 	Shell.getAlpha() returns inconsistent values
+<br>209225  Program.findProgram returns null
+<br>209256 	[website] Update links to IBM docs
+<br>209468 	StyledText#setSelection() does not reveal caret at end of line
+<br>209543 	Call Shell.setFullScreen(true) make the shell invisible
+</blockquote>
+
+<h2> SWT Build 3.4 17 - Tuesday November 06, 2007</h2>
+<blockquote>
+168979    	transparent shell
+<br>184507 	Tree#setItemCount and Table#remove are slow when removing items
+<br>202328 	investigate OpenGL support on Solaris
+<br>204393 	TitleAreaDialog's banner image has extraneous white borders
+<br>204561 	Table Javadoc is conflicting with TableEditor
+<br>205794 	Provide SWT.UNDERLINE_SQUIGGLE text style
+<br>207827 	[Leopard] VM crash while dismissing dialog
+<br>207927 	ITALIC and BORDER_* unreadable
+<br>208027 	Printer prints one page too much when page range restricted
+<br>208356 	[Browser] Inactive scroll bar for Browser widget
+<br>208566 	[64] cheese can appear if SetPoint is running
+</blockquote>
+
+
+<h2> SWT Build 3.4 16b - Thursday November 01, 2007</h2>
+<blockquote>
+208007 	line wrap at page end makes page number disapear when printing
+<br>208188 	MenuItem#isEnabled() works differently across platforms
+<br>208209 	Combo immediately closes
+</blockquote>
+
+<h2> SWT Build 3.4 16a - Thursday November 01, 2007</h2>
+<blockquote>
+78856    	[Clipboard] SWT has no support for Image copy to clipboard
+<br>205937 	borderStyle and underlineStyle flags need clarification
+<br>207558 	Line numbers are printed too low
+</blockquote>
+
+<h2> SWT Build 3.4 16 - Wednesday October 31, 2007</h2>
+<blockquote>
+202782  Indent in Column Header when sorting on Windows Vista
+<br>204571 	Eclipse process halted when interacting with tree.
+<br>204953 	[64] New project wizard does not work on Vista 64 bits
+<br>206315 	GTK-BIDI: RTL support in CoolBar.
+<br>207744 	[Contributions] Debug toolbar dropdown menu closes when submenu hidden
+<br>207852 	Widget disposed error when running UI test suite on WinXP
+<br>207901 	custom drawn tree: 1st selection behaves oddly
+</blockquote>
+
+<h2> SWT Build 3.4 15a - Monday October 29, 2007</h2>
+<blockquote>
+206315    	GTK-BIDI: RTL support in CoolBar.
+<br>207266 	Target editor's content tab buttons disappear completely
+<br>207744 	[Contributions] Debug toolbar dropdown menu closes when submenu hidden
+<br>207852 	Widget disposed error when running UI test suite on WinXP
+</blockquote>
+
+<h2> SWT Build 3.4 15 - Monday October 29, 2007</h2>
+<blockquote>
+19602    	[Printing] Line numbers aren't printed
+<br>57151 	[64] 64 bit support needed for Windows XP 64-Bit Edition
+<br>117580 	Modal behavior on GTK when I ask for modeless
+<br>205795 	UNDERLINE_ERROR text style does not work for IME strings
+<br>206602 	GTK-BIDI: RTL support in ColorDialog
+<br>206609 	GTK-BIDI: RTL support in FontDialog
+<br>206661 	GTK-BIDI: RTL support in DirectoryDialog.
+<br>206722 	GTK-BIDI: RTL support in FileDialog.
+<br>206743 	Tree with columns has drawing errors when resizing to a minimum
+<br>206749 	GTK-BIDI: RTL support in MessageBox
+<br>206786 	GTK-BIDI: RTL support in ScrollBar.
+<br>207165 	org.eclipse.swt.win32.win32.x86 version not incremented for 3.3.1.1
+<br>207263 	NPE in org.eclipse.swt.widgets.Control.WM_MENUSELECT
+<br>207266 	Target editor's content tab buttons disappear completely
+<br>207347 	Snippet279 draws bad (draw icon with GDI+ gc)
+<br>207472 	"Dancing Scrollbar" in Tree
+<br>207605 	GTK-BIDI: RTL support in PrintDialog
+</blockquote>
+
+<h2> SWT Build 3.4 14 - Tuesday October 23, 2007</h2>
+<blockquote>
+205818 Adherent TextStyles must be continuous
+<br>205928 underline text style needs clarification
+<br>206743 Tree with columns has drawing errors when resizing to a minimum
+<br>206806 getItemCount() incorrect in Vista for VIRTUAL trees
+</blockquote>
+
+<h2> SWT Build 3.4 13 - Tuesday October 16, 2007</h2>
+<blockquote>
+41364 GTK-BIDI: RTL support in Combo
+<br>206095 	swt-3.3-gtk-linux-x86 Printer crash under Ubuntu Gutsy
+</blockquote>
+
+<h2> SWT Build 3.4 12 - Tuesday October 09, 2007</h2>
+<blockquote>
+57151  		[64] 64 bit support needed for Windows XP 64-Bit Edition  
+<br>142965  [64] Blank splitter dialogs until resized  
+<br>198673  SWT: Program.getImageData() returns null when icon name has quotes.  
+<br>198981  ppc/motif Xdefaults not honored on version 3.3  
+<br>205130  Expanding/Collapsing tree nodes in Quick Windows closes window  
+<br>205459  Exception in Mozilla browser code not caught, leads to crash  
+</blockquote>
+
+<h2> SWT Build 3.4 11 - Tuesday October 02, 2007</h2>
+<blockquote>
+73645    	Custom caret problems
+<br>115666 	BIDI mirroring not implemented on GTK
+<br>203571 	Key event still gets response when ModalDialog is up
+<br>205063 	Compare viewer does not draw background colors for changes (StyledText)
+<br>205099 	Creating a button clears mnemonics
+</blockquote>
+
+<h2> SWT Build 3.4 10c - Monday September 24, 2007</h2>
+<blockquote>
+204330 [Launcher] JVM crash on splash teardown on linux.gtk.x86
+</blockquote>
+
+<h2> SWT Build 3.4 10a - Wednesday September 19, 2007</h2>
+<blockquote>
+199137 Debug view scrolls right when thread suspends
+<br>203648 Icon above cursor on drag and drop
+<br>203817 Scrolled custom draw trees not drawn correctly in RTL
+</blockquote>
+
+<h2> SWT Build 3.4 10 - Monday September 17, 2007</h2>
+<blockquote>
+165108    	Spinner can not apply the value that input to text-box.
+<br>171909 	[DND] SWT.Expanded Event not given from DND-Feedback sometimes
+<br>195254 	[consistency] Left Mouse Down is Not recieved on TabFolder on Linux.Works fine on Windows
+<br>196810 	Compiler warnings in N200707170010
+<br>203491 	SWT pre-built libraries in org.eclipse.swt.carbon.macosx not universal
+</blockquote>
+
+<h2> SWT Build 3.4 09 - Tuesday September 11, 2007</h2>
+<blockquote>
+139647    	StyledText.getOffsetAtLocation can't return offset at end of a line
+<br>201853 	Caret position is incorrect when clearing full selection by clicking left mouse button in Text widget
+</blockquote>
+
+<h2> SWT Build 3.4 08a - Tuesday September 04, 2007</h2>
+<blockquote>
+179168 	Focus change will make the uncomposed text lost in IME
+<br>187125 [DND] Image effect not showing in RTL
+<br>193515 	[DND] Cannot drag a single character selection in StyledText
+<br>196487 	Korean input text does not display correctly with C4EB
+<br>199099 	ExpandBar is not high contrast complient. Cannot manually fix this issue.
+<br>199156 	ExpandBar does not scroll properly
+<br>201326 	computeSize on empty Link widget returns 0 for height
+</blockquote>
+
+<h2> SWT Build 3.4 08 - Tuesday August 28, 2007</h2>
+<blockquote>
+108591    	SWT StyledText does not support inline Input method
+<br>148530 	Text SWT.MULTI with backgroundimage don't show deleted characters
+<br>165108 	Spinner can not apply the value that input to text-box.
+<br>180686 	DBCS3.3: strikeout rendering issue on WindowsVista
+<br>189292 	[DND] FileTransfer disables image feedback
+<br>192861 	VM crash opening browser widget with much html
+<br>196791 	SWT ToolTip does not render Arabian text tooltip correctly on SLED10 Linux
+<br>200101 	TableColumn sets image when SWT.CENTER alignment is used.
+<br>200153 	Provide AllowSetForegroundWindow in org.eclipse.swt.internal.win32.OS
+<br>200694 	TableItem.getBounds() wrong.
+<br>201181 	Basic Authentication of XMLHttpRequest crashes Eclipse
+<br>201217 	NPE in Canvas.kEventControlSetFocusPart(Canvas.java:150)
+</blockquote>
+
+<h2> SWT Build 3.4 07 - Tuesday August 21, 2007</h2>
+<blockquote>
+37031 	Full screen exclusive (not maximized) support for SWT
+<br>45294 	[Jobs] NPE in .log using 1021
+<br>76182 	Display.setSynchronizer considered harmful
+<br>140270 	Mouse wheel does not fire selection event on Scale
+<br>150365 	setImeInputMode() is not correct with MS-IME2000
+<br>164755  Inconsistent z-order for ON_TOP shells between win32 and MacOS
+<br>189149 	Scale widget freaks out if layout() is called from a selection listener.
+<br>194707 	Display.getDefault() deadlocks with Display constructor
+<br>199109 	Changing foreground color on Canvas does not work
+<br>194146 	CVSUIPlugin.stop not being called
+<br>196979 	Shell.getBounds() wrong when shell is maximized.
+<br>197964 	Table.setBackground() fails if TableItem.setBackground() was used
+</blockquote>
+
+
+<h2> SWT Build 3.4 06b - Tuesday August 14, 2007</h2>
+<blockquote>
+TextLayout improvements
+<br>199463 	org.eclipse.swt.List is not keyboard-only accessable
+</blockquote>
+
+<h2> SWT Build 3.4 06a - Wednesday August 08, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+7747    Arrow keys should switch focus between buttons
+<br>198922    	CTabFolder code causes Widget is disposed exception
+<br>199133 	Combo#cut() does not place deleted text to clipboard
+</blockquote>
+
+<h2> SWT Build 3.4 06 - Thursday August 02, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+165108  Spinner can not apply the value that input to text-box.
+<br>178100 	Spinner.getSelection does not return correct value within Modify listener
+<br>180686 	DBCS3.3: strikeout rendering issue on WindowsVista
+<br>194275 	CTabFolder close box should highlight without needing mouse move
+</blockquote>
+
+<h2> SWT Build 3.4 05 - Tuesday July 31, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+121978  spinner's listener problem on Mac
+<br>153936  Eclipse freezes when opening an editor
+<br>165108 	Spinner can not apply the value that input to text-box.
+<br>189292 	[DND] FileTransfer disables image feedback
+<br>195650 	Multiselection with Shifht ARROW_UP/DOWN not working on MAC
+<br>197431 	Spinner.getSelection() doesn't return the correct value if it has been updated by typing
+<br>198053 	Invoking spinner.getSelection() in a modify event causes infinite loop
+</blockquote>
+
+<h2> SWT Build 3.4 04 - Tuesday July 24, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+49724    	Tree computeSize different between platforms
+<br>167562 	SIGSEGV in Tree#destroyItem()
+<br>179464 	Combo doesn't allow to change background color more than once
+<br>179773 	TreeViewer setSelection does not scroll horizontally to show selection
+<br>191260 	NPE in Display.readImageRef
+<br>192700 	CCombo does not loose focus when hidden
+<br>193181 	Gdip.Graphics_FillRectangle needs to flip the rect if width < 0 or height < 0
+<br>193213 	ArrayIndexOutOfBounds when initializing GC
+<br>193561 	public Image (Device device, String filename) fails on WinCe
+<br>194702 	[browser]Click URL linked to a new window, pop up two browser window
+<br>195650 	Multiselection with Shifht ARROW_UP/DOWN not working on MAC
+<br>197336 	Negative values not displaying with Read-Only style combo.
+</blockquote>
+
+<h2> SWT Build 3.4 03 - Tuesday July 17, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+177578    	ExpandItem (of the ExpandBar) returns wrong header height in Gnome (Debian Linux)
+<br>192861    	VM crash opening browser widget with much html
+</blockquote>
+
+
+<h2> SWT Build 3.4 02 - Tuesday July 10, 2007</h2>
+
+
+<h2> SWT Build 3.4 01 - Tuesday July 3, 2007</h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+110092 - [WorkbenchLauncher] Progress in splash cannot render in Chinese
+<br>161863 - Execution flag for build.sh in src.zip missing
+</blockquote>
+
+<h2> SWT Build 3.3 045g - Friday June 8, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+191741 - cheese in java editor
+</blockquote>
+
+<h2> SWT Build 3.3 045f - Thursday June 7, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+191412 - FocusIn and FocusOut events are processed with different cases in Shell.
+</blockquote>
+
+<h2> SWT Build 3.3 045e - Thursday June 7, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+191372 - Cannot unminimize eclipse from dock
+</blockquote>
+
+<h2> SWT Build 3.3 045d - Thursday June 7, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+179945 - GC constructor thread invalid access missing from API Javadoc  
+<br>179946 - GC dispose thread invalid access missing from API Javadoc  
+<br>191072 - Existing shell window title gets overwritten  
+</blockquote>
+
+<h2> SWT Build 3.3 045c - Tuesday June 5, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+180482 - Synchronize view sometimes goes deafult color when ctrl adding files
+</blockquote>
+
+<h2> SWT Build 3.3 045b - Friday June 1, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+190262 - CCombo doesn't receive key-events  
+<br>190480 - regression: FocusOut not fired for Texts in an SWT.APPLICATION_MODAL shell  
+</blockquote>
+
+<h2> SWT Build 3.3 045a - Thursday May 31, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+129456 - SWTSpy code has no license specified  
+<br>149040 - Change javadoc for Table addSelectionListener  
+<br>189992 - Column in problem view not properly refreshed when resizing the column width  
+</blockquote>
+<h3><a NAME="Other changes in this build"></a>Other changes in this build</h3>
+<ul>
+<li>Javadoc bash</li>
+<li>Copyright update</li>
+</ul>
+
+<h2> SWT Build 3.3 045 - Thursday May 31, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+158043 - [Mac] Right clicking on app in Dock and selecting Quit does nothing if file needs to be saved  
+<br>173559 - Javadoc for GC methods requiring advanced graphics  
+<br>178758 - SWT.MOVEMENT_* needs better Javadoc  
+<br>185862 - AIX 5.3 motif - Characters above \u007f show as "iso8859" in some swt widgets  
+<br>189339 - SWT event loop doesn't dispatch Apple Event.  
+<br>189465 - Browser can crash on RHEL3 if xulrunner is present (motif only)  
+<br>189862 - Link to wrong file on Snippets page  
+<br>189960 - [browser] executing window.print() does not print  
+<br>189970 - GC drawImage fails on bidi + icon + double buffered  
+<br>190033 - add library build support for s390  
+</blockquote>
+
+<h2> SWT Build 3.3 044g - Friday May 25, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+183430 - [DND] Drag and Drop between groups causes Eclipse thread to hang in COM.DoDragDrop() indefinitely.  
+<br>188932 - Can't enter paths in Text fields on Red Hat Workstation 5  
+</blockquote>
+
+<h2> SWT Build 3.3 044f - Friday May 25, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+188859 - [render] colored labels shifted to the right and margin smaller between icon and text  
+</blockquote>
+
+<h2> SWT Build 3.3 044e - Thursday May 24, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+181410 - [Browser] browser steal focus on IE7  
+<br>186722 - Foreground color not used from EraseItem callback  
+<br>187273 - Dialog package explorer on move reorg user input page scrolled  
+</blockquote>
+
+<h2> SWT Build 3.3 044d - Thursday May 24, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+185607 - Can't copy and paste into dialog text fields from some applications
+<br>187971 - Custom Draw Tree brings cheese when using Image and Bold  
+<br>188265 - Trees flicker when focus changes  
+<br>188381 - Tree Viewer Collapse Extremely Slow on Vista  
+<br>188567 - TreeEditor closes CCombo after 500ms  
+</blockquote>
+
+<h2> SWT Build 3.3 044b - Thursday May 17, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+185559 - Eclipse crashes with "JVM terminated. Exit Code=1  
+<br>187560 - READ_ONLY combos not tall enough  
+<br>187597 - BeginBufferedPaint does not work in RTL and advanced  
+</blockquote>
+
+<h2> SWT Build 3.3 044a - Wednesday May 16, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+183503 - Text formatting finishes too early when pasted
+</blockquote>
+
+<h2> SWT Build 3.3 044 - Wednesday May 16, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+185916 - StyledText.setSelectionForeground(Color) has no effect  
+<br>186843 - [OLE] IlegalArgumentException while closing a dialog 
+<br>187215 - Enabling owner draw removes horizontal scrollbar  
+</blockquote>
+
+<h2> SWT Build 3.3 043 - Wednesday May 16, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+55142 - Horizontal scrollbar disabled with editor content horizontally scrolled  
+<br>66101 - [browser] Embedded browser makes annoying "click" sound  
+<br>182083 - Redraw artifacts using GlyphMetrics  
+<br>183528 - Editor goes bezerk when pasting Indian script  
+<br>184916 - Variables view not painted correctly after column resize  
+<br>184950 - cheese in the console  
+<br>185231 - Mac: Cannot get rid of native tooltip in a table with columns  
+<br>185910 - Custom drawing listeners produce display artifacts when used with virtual TreeViewer  
+<br>186378 - To input Japanese character in Java editor causes dot garbages ONLY at first.  
+</blockquote>
+
+<h2> SWT Build 3.3 042 - Tuesday May 15, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+67652 - some GC calls are off by one pixel in mirrored mode  
+<br>158122 - BIDI: StyledText does not paint selection well when mirrored  
+<br>186580 - GC#drawRoundRectangle looks ugly on advance mode  
+<br>186611 - Alpha channels being lost on Windows XP classic theme  
+<br>186757 - No context menus in tables  
+</blockquote>
+
+<h2> SWT Build 3.3 041 - Friday May 11, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+75813 - [browser] StatusTextEvent not fired when hovering over link on the mac  
+<br>120725 - [DND] Drag and Drop - Snippet185 fails  
+<br>154036 - [Browser] Cannot Edit a Html IFrame which is in swt  
+<br>163716 - Benchmark difference between SWT-GTK Linux and SWT windows  
+<br>164120 - StyledText can open out of sync with scrollbar  
+<br>177156 - [Browser] The javascript 'top.close() ' crashes eclipse  
+<br>182547 - tree tooltip problems with "activation follows mouse" (tweakui/x-mouse)  
+<br>183640 - Combo on Linux missing, doesn't show up. FormData  
+<br>184111 - [DND] Not possible to drag multiple classes to a new package  
+<br>184592 - Calling List#setTopIndex() on Lists created with SWT.V_SCROLL scrambles the widget  
+<br>185089 - Compile error in org.eclipse.swt.examples/plugin.xml  
+<br>185313 - Inconsistency with focus on selected action  
+<br>185529 - horizontal scrollbar missing in owner drawn tree  
+<br>185532 - wrong selection length in owner drawn table  
+<br>185534 - Table sends MenuDetect twice  
+<br>186028 - BIDI: GC.getStyle() never returns SWT.RIGHT_TO_LEFT in SWT.DOUBLE_BUFFERED mode on Vista  
+<br>186034 - NPE in Shell.filterProc  
+<br>186054 - [DND] Combo Drag-and-drop performed twice  
+<br>186335 - Eclipse active without shell activation events  
+<br>186448 - Exceptions selecting tree items  
+<br>186557 - No Deactivate events from ON_TOP shells  
+</blockquote>
+
+<h2> SWT Build 3.3 040 - Tuesday May 8, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+150357 - [Linux] [cairo] GC.setAdvance(true) and subsequent drawing of images fails  
+<br>178779 - [typing] IAE in JFaceTextUtil.getPartialTopIndex()  
+<br>180511 - [typing] Editor flashes when extending selection by word with Ctrl+Shift+Right  
+<br>181843 - On Mac, Widget.kEventControlTrack(int, int, int) inserts unacceptable delays into asyncExec message processing  
+<br>185263 - Link widget calculates incorrect width when "&" is part of text  
+<br>185617 - [Presentations] AIOBE on CTabFolder setSelectionBackground  
+</blockquote>
+
+<h2> SWT Build 3.3 039b - Wednesday May 2, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+184266 - [Viewers] Tree on Extensions page initially scrolled to the right
+<br>185090 - Cannot Start (VM crash)
+</blockquote>
+
+<h2> SWT Build 3.3 039a - Wednesday May 2, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+184922 - GTK: crash when calling Table.getItemHeight()
+</blockquote>
+
+<h2> SWT Build 3.3 039 - Tuesday May 1, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+184774 - Copy-paste error in SWT.RIGHT javadoc  
+<br>184836 - Missing shell activation events
+</blockquote>
+
+<h2> SWT Build 3.3 038 - Monday April 30, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+127839 - many ControlExample example widgets never lose their background  
+<br>127979 - backgroundimage bug in gnome  
+<br>136332 - Shell.getSize is wrong for non-decorated shells  
+<br>136739 - SWT Table always has lines visible in GTK  
+<br>141687 - Background with INHERIT_DEFAULT has wrong origin for children  
+<br>149208 - Link widget foreground color not set  
+<br>150751 - In GTK, setBackgroundImage and setBackgroundMode failed when children setForeground  
+<br>153191 - setting NO_BACKGROUND style on Canvas turns it fully black  
+<br>153197 - Canvas' parent does not lose background image  
+<br>160292 - NPE when opening existing workspace on Motif  
+<br>166956 - [Browser] SSL Security Panel doesn't response after shown on XULRunner1801 at SuSe Linux 10  
+<br>167686 - Background/Foreground Color style bit not respected without a border/scroll bar  
+<br>168034 - Deadlock in browser control (IE?)  
+<br>169290 - [browser] Different behavor of opening a PDF file when setting URL and clicking the URL  
+<br>169292 - [Browser] Download same file fails after cancel twice  
+<br>169293 - [browser] AD pop-up doesn't show if flash plug-in not installed.(No OpenWindow listener)  
+<br>169664 - On platforms other than Windows, setting background color to Composites inside TabFolder doesn't work as expected (like in Windows)  
+<br>172757 - popups close on resize  
+<br>172792 - Pressing Ctrl+PageUp or PageDown in Search Window crashes JVM  
+<br>174454 - StyledText advanced text services not working for IBM Korean C4EB  
+<br>175259 - SWTException stacktrace misleading when in Display.syncExec  
+<br>176491 - MessageBox consumes 100% CPU on Linux/GTK  
+<br>177374 - SEGV in libswt-pi-gtk-3330  
+<br>178008 - Offsets when rendering text in a tree/table item  
+<br>178388 - CTabItem gets clipped on right hand side  
+<br>178495 - [Browser] Control-N from Browser causes multiple errors.  
+<br>179105 - Revert CTabItem unselected tab separator style for simple tabs  
+<br>179209 - Gray box surrounding help icon looks awful in manifest editors (Linux)  
+<br>179266 - [Presentations] DBCS3.3: tab label "..." isn't added in 3.0 presentation  
+<br>179465 - [Browser]Crash on Linux when visiting www.cnn.com in swt 3.3m6  
+<br>180621 - overlap image transparency failure in 16bits color quality  
+<br>181931 - double-click after opening brace does not select all block  
+<br>182906 - Table selection with CTRL+SHIFT does not send events  
+<br>183368 - [64] JVM crash during startup on Linux x86_64 with I20070418-1012  
+<br>183830 - "Xlib: unexpected async reply" and deadlock in GLX.glXMakeCurrent(int, int, int)  
+<br>184385 - SetItemCount() in Table extremly slow on MacOSX when lowering itemcount  
+</blockquote>
+
+<h2> SWT Build 3.3 036a - Tuesday April 24, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+82500 - TabFolder should not use PtCalcCanvas in getClientArea  
+<br>119109 - KeyEvent.doit does not work for a CCombo  
+<br>133597 - column resize cursor shows at wrong position  
+<br>154101 - GTK Printing  
+<br>162942 - [Browser] Textbox on webpage locks up after pushing "Back"  
+<br>169291 - [DnD] Combo: Incorrect DragStart when mouse hover still inside combo region  
+<br>176307 - [Browser] SWT Browser crashes Eclipse if page contents set by setText contains a named anchor  
+<br>179203 - [OSX] GC(Printer).getClipping() is always [0,0,0,0]  
+<br>179204 - [OSX] Printer instance unusable after cancelJob()  
+<br>179368 - Need to draw text selection using native functionality  
+<br>181956 - Program.findProgram(String) unexpectedly returns null  
+<br>182498 - org.eclipse.swt.widgets.Text is not editable and set a _foreground_ color, the background color changes to default.  
+<br>182748 - StyledText cheese when redrawing selection in FULL_SELECTION mode  
+<br>182777 - Image.getImageData crashes VM in win32.OS.MoveMemory  
+<br>182810 - [OpenGL] GLCanvas.isCurrent() always returns false on Windows  
+<br>182990 - NullPointerException in monitorEnumProc() in Class Display  
+<br>182991 - widget is disposed exception when disposing TableEditor  
+<br>183253 - protected methods in wpf version of TextTransfer are public in others  
+<br>183254 - Mac: calling TreeItem.setText can cause a SetData callback  
+<br>183280 - TableCursor.paint() uses string != "", should be string.length() > 0  
+</blockquote>
+
+<h2> SWT Build 3.3 036 - Tuesday April 17, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+61023 - [Program] Program.getImageData() returns null for executables (*.exe files)  
+<br>81467 - Draw2D fails to print on Mac OSX 10.3
+<br>86785 - [Program] Program.findProgram(<Extension>) doesn't find Icons for IconHandlers  
+<br>96244 - [Program] Program.findProgram does not pick up customized applications for file extensions  
+<br>143707 - sorted Table column background overrides TableItem background  
+<br>148891 - [Program] Program.getImageData() fails for Adobe Acrobat and others.  
+<br>153936 - Eclipse freezes when opening an editor  
+<br>156817 - Background-Color of TreeItem should override Sort-Column-Color  
+<br>164822 - clicking behind selected text in Text widget misplaces the cursor  
+<br>167728 - Vista has cheese when resizing a column  
+<br>177401 - SWT will not build on QNX Neutrino 6.3 and greater  
+<br>178294 - UnsatisfiedLinkError: no swt-com-wpf-3332 or swt-com-wpf  
+<br>178639 - DateTime and Spinner preferred height wrong on Vista  
+<br>178748 - Sort-Column draws over customownerdrawn selection color in Tree  
+<br>178766 - ToolTip jumps around  
+<br>180818 - [Browser] getWebBrowser() method of SWT.Mozilla returns null when called for a browser embedded within a page of a MultiPageEditor  
+<br>181302 - [Linux] SWT Deactivate event no longer fired when a Shell is deactivated  
+<br>181405 - [Browser] Opening web page with applet causes Eclipse to hang  
+<br>182001 - Whacky behaviour in the update manager with WPF drop of Eclipse on Windows Vista  
+</blockquote>
+
+<h2> SWT Build 3.3 035 - Tuesday April 10, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+14654 - [typing] Single line selection on triple-click  
+<br>43746 - [DND] Null Transfer for DND listener causes VM to hang  
+<br>141569 - opening TableEditor on partially-visible item appears twice  
+<br>151891 - Table.computeSize returns wrong value on GTK  
+<br>162578 - [Browser] Changing status message in Ubuntu's built-in Firefox browser doesn't work  
+<br>167301 - AddFontResourceEx missing for ANSI in OS  
+<br>176167 - Form's BusyIndicator hangs workbench on GTK  
+<br>176379 - [64] Memory corruption on Windows x64 in SWT when calling GdiplusStartup  
+<br>176792 - [OLE] org.eclipse.swt.internal.ole.win32.ComObject misbehavior in multithreaded application  
+<br>177123 - Disposed TableEditor recieves resize event and crashes  
+<br>178757 - [consistency] TableColum/TreeColumns last resize listener called when control is resized  
+<br>180031 - [browser] NPE if browser field in WindowEvent not filled in  
+<br>180204 - Tree with style SWT.VIRTUAL | SWT.CHECK doesn't correctly check nodes without children  
+<br>180376 - Eclipse/SWT crashes the JVM  
+<br>180540 - Default behaviour for FileDialog different on Vista  
+<br>180615 - too many paint events have been sent out when key down in Canvas  
+<br>180773 - CTabFolder's getSelection() javadocs is incorrect  
+<br>180821 - Eclipse won't start due to error in System.Windows.FontStretch.FromOpenTypeStretch  
+<br>180863 - Top menus can be populated by accelerators after shell is disabled  
+<br>180997 - Tree: Right aligned columns squish too far to the right.  
+</blockquote>
+
+<h2> SWT Build 3.3 034 - Tuesday March 27, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+150079 - Table/Tree.getItem() returns null when Table/Tree is horizontally scrolled.  
+<br>166198 - Image transparency problem in tree  
+<br>172832 - GC.getClipping( ) difference GTK / Windows  
+<br>174180 - Table.getItem(Point) always returns null when first column is 0 pixels wide  
+<br>177210 - Stack overflow in StyledTextRenderer
+<br>178134 - [browser] Mozilla: reimplement hooking of DOM listeners    
+<br>178426 - [DND] DragSourceEffect creates cheese  
+<br>178597 - Error Message in Console (gtkcellview.c)  
+<br>178735 - [DND] Stops working by simply adding an EraseItem Listener in Tree  
+<br>178767 - CTabFolder with SWT.BOTTOM draws too many tab borders  
+<br>178820 - Suspicious code in CTabItem.drawLeftUnselectedBorder()  
+<br>178907 - CTabItem draws extra vertical separator one pixel too far at bottom  
+<br>179161 - Program.findProgram(String extension) should gracefully handle long input  
+<br>179314 - Error in BIDI screenshot  
+</blockquote>
+
+<h2> SWT Build 3.3 033g - Thursday March 22, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+160703 - Truncations in Preferences panel of Install/Update
+<br>177389 - CTabItem: Tabs on bottom draw with a diagonal line  
+<br>178814 - Tree Selection weird for first column when custom-owner-drawn is used
+</blockquote>
+
+<h2> SWT Build 3.3 033f - Thursday March 22, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+178326 - Last tab on the right of CTabFolder draws badly.  
+<br>178705 - Javadoc warnings in I20070321-1800  
+</blockquote>
+
+<h2> SWT Build 3.3 033b - Wednesday March 21, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+177885 - DBCS3.3: corruptions in editor on WindowsVista  
+<br>178325 - ControlExample Tree tab forgets "Moveable Columns" attribute  
+<br>178466 - Compiler warning in I20070320-1620  
+</blockquote>
+
+<h2> SWT Build 3.3 033a - Wednesday March 21, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+178180 - SWT browser in linux should load plugins under MOZ_PLUGIN_PATH
+</blockquote>
+
+<h2> SWT Build 3.3 033 - Tuesday March 20, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+177927 - Triple-Click broken if drag source installed on StyledText  
+<br>178115 - Javadoc warnings in I20070319-1005  
+<br>178185 - Tabs in Debug configurations are messed up  
+<br>178337 - Cursor selecting text provides no feedback  
+<br>178364 - Type-o in Snippet260  
+</blockquote>
+
+<h2> SWT Build 3.3 032 - Tuesday March 20, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+99564 - Advanced graphics does not support mirrored mode  
+<br>138579 - StyledText: Support for custom double-click (+drag) behavior  
+<br>162015 - infinite loop of repaint events on canvas view in plugin  
+<br>165106 - [consistency] Combo.setItems(...)  
+<br>171562 - IllegalArgumentException when resizing a sashform with a table within  
+<br>173117 - [Browser] add support for binding JavaXPCOM to Browser  
+<br>173573 - Disposing image during printing crashes SWT on MacOS  
+<br>173658 - Transform + SWT.DOUBLE_BUFFERED + SWT.RIGHT_TO_LEFT - not drawn mirrored  
+<br>173684 - TabFolder displayed improperly at small sizes  
+<br>174569 - Baseline for new Search field text doesn't match Mac platform  
+<br>176719 - Display.getActiveShell() returns different results on Windows compared to Linux  
+<br>177858 - Contributions to CTabFolder, CTabItem: add highlight, remove ellipses, icon always showing, right edge of tab rounded  
+<br>178098 - Compiler warnings in 3.3M6 warmup build  
+</blockquote>
+
+<h2> SWT Build 3.3 031 - Monday March 19, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+157797 - Improve javadoc of Control#addKeyListener(..) to tell about changed traversal behavior  
+<br>168107 - CTabFolder - SWT.BORDER + SWT.FLAT = cheese  
+<br>170393 - CTabFolder display bugs  
+<br>175870 - Eclipse gets SIGSEGV  
+<br>176115 - Combo with SWT.READ_ONLY does not trigger ModifyEvent  
+<br>176417 - SWT Tree#setTopItem(TreeItem) on Mac OS X doesn't take the header height into account  
+<br>176510 - SWT (vertical) ScrollBar of Tree on Mac OS X will not fire SWT.Selection on mouse-wheel movements  
+<br>176609 - custom drawn Table with SWT.Virtual items performs to much paint-events  
+<br>177065 - ToolItem Image not painted disabled on Mac OS X (when the ToolItem is set to be disabled)  
+<br>177223 - [DND] DropTargetEffect API  
+<br>177531 - Custom draw problems with focus item in Tree and Table  
+<br>177616 - NullPointerException in Mozilla.Deactivate()  
+</blockquote>
+
+<h2> SWT Build 3.3 030 - Tuesday March 13, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+163934 - [Mac] Eclipse 3.X on Mac OS X TreeEditor Problem  
+<br>175707 - removing MeasureItem listener and clearing items inverts table  
+<br>176594 - Crash with an SWT program  
+</blockquote>
+
+<h2> SWT Build 3.3 029 - Tuesday March 6, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+77174 - Reparenting support on MacOS X  
+<br>108407 - [Contributions] widgets: Context menu too small at borders  
+<br>108651 - DCR - Add API to make a single line text control be a Search field  
+<br>111718 - G2X: Print dialog of Help Contents doesn't function properly on Linux  
+<br>151454 - custom draw resulting from checkbox click does not appear (motif)  
+<br>162687 - SWT_AWT: Crash on Mac when disposing and then creating a new Composite containing an embedded Frame  
+<br>174395 - [Browser] SWTError (XPCOM error -2147467259) when using the SWT 3.3 Broswer widget on Linux with Mozilla 1.7.8  
+<br>175697 - vm is crashing during mac tests for N20070227-0010  
+<br>176032 - NPE in Mozilla create  
+</blockquote>
+
+<h2> SWT Build 3.3 028 - Tuesday February 27, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+28842 - Need a way to turn on/off the focus ring  
+<br>171776 - Printing across multiple pages creates incorrect output when advanced graphics (antialiasing) is used  
+<br>173371 - [OLE] OleClientSite fails open document if Microsoft Word is not installed  
+<br>173764 - Mac OS X icon changes from 'nice' to 'nasty' during launch of 3.3M5  
+<br>173782 - [Browser] Excessive memory from Browser widget on GTK  
+<br>174547 - [Browser] [64] Mozilla XPCOM broken in 3.2.2  
+</blockquote>
+
+<h2> SWT Build 3.3 027 - Tuesday February 20, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+49098 - [OLE] Scrollbars (do not show/behavior not consistent) in OleEditor for Excel  
+<br>112724 - [OLE] OleClientSite.doVerb cause JVM crash  
+<br>132444 - Tree: Selection not properly redrawn when background image set  
+<br>133161 - Table/Tree inconsistency with sorted column bg color when adding PaintItem listeners  
+<br>138165 - [OLE] Cannot move focus to Excel when OleClientSite(..."Excel.Sheet") is running  
+<br>150990 - Table selection drawing incorrectly when custom draw  
+<br>170907 - Right click a shell of SWT.NO_FOCUS and ON_TOP to bring up a context menu will trigger a shell deactivated event  
+<br>173666 - Expandbar treats any mouse click as a left click  
+<br>174130 - Transparent PNG corruption with SWT 3.2  
+<br>174467 - Drag source image effect does not appear on OSX  
+</blockquote>
+
+<h2> SWT Build 3.3 026 - Tuesday February 13, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+132304 - Table: FULL_SELECTION focus outline too short when background image set  
+<br>132828 - Internal Web Browser doesn't work with SeaMonkey 1.0/Firefox 1.5 on AMD64  
+<br>153664 - Double click on finder icon does not bring Eclipse to the foreground  
+<br>172583 - Cairo implementation needed for drawBackground  
+<br>172843 - [Program] Notes bookmark URL cannot be launched by swt for Linux-GTK  
+<br>173089 - SWT Toggle Buttons on CoolBar keep pressed.  
+<br>173273 - setLinesVisible(true) does not work on Fedora Core 6  
+<br>173427 - Missing documentation for SWT.CANCEL in Text  
+<br>173670 - Disabling Controls does not prevent popup menu from functioning  
+<br>173846 - Table's FULL_SELECTION does not work correctly on custom draw table with background color  
+</blockquote>
+
+<h2> SWT Build 3.3 025c - Wednesday February 7, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+172590 - [Browser] can't compile embedded browser with firefox using N20070201-0010 (v3324)  
+<br>172888 - Caret disapears on 'Go to Line...'  
+<br>172918 - Drag not working in I20070205-0009  
+</blockquote>
+
+<h2> SWT Build 3.3 025a - Tuesday February 6, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+26605 - SWT Table Mouse Down event not firing properly  
+<br>79213 - Support Mozilla on all platforms (if already installed)  
+<br>144709 - toolkit.createText for SWT.MULTI widgets don't draw a border as they should on OS X  
+<br>154944 - Holding mouse down on Table blocks Display.asyncExec and syncExec  
+<br>166958 - swt file open dialog fails to open on FC6 with gnome  
+<br>170877 - Editor viewport not correct after restart  
+<br>172754 - [DND] Drag n drop of classes shouldn't let package nodes open  
+</blockquote>
+
+<h2> SWT Build 3.3 025 - Monday February 5, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+158746 - Canvas#scroll forces an update - any way around this besides setRedraw(false)  
+<br>162253 - SWT SystemTray support on OSX - TrayItems not appearing  
+<br>166483 - [Progress] Random shells come to the front when compare editor shows progress dialog  
+<br>166760 - [browser]RedHat EL4Update4, swt.browser cannot show with installed xulrunner 1.8.0.1  
+<br>167744 - Vista Tracker incredibly slow  
+<br>169048 - NullPointerException in Scrollable when parent=null  
+<br>170623 - [browser] Fails to find xulrunner on 64-bit systems  
+<br>171691 - controls on hijacked splash shell disappear  
+<br>171995 - SWT Labels does not show accelerator characters when thier parent is a TabFolder  
+<br>172001 - Javadoc warnings in N20070129-0010  
+<br>172175 - [DND] StyledText.getSelection() not valid during DnD?  
+<br>172179 - Display.post(Event) with SWT.MouseMove moves to wrong location  
+<br>172265 - [DND] unpredicable caret motion  
+<br>172537 - No coloured cursor on GTK  
+</blockquote>
+
+<h2> SWT Build 3.3 024 - Tuesday January 30, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+163339 - Unexpected results when using drawFocus with advanced graphics is enabled and DOUBLE_BUFFERED  
+<br>168384 - Problem with grayed disabled button image  
+<br>170571 - Warnings in SWT launcher sample  
+<br>170973 - [Program] Error when opening word and excel documents  
+<br>171105 - View using SWT_AWT crashes on Mac if open at startup  
+<br>171278 - patch for org.eclipse.swt.win32.wce_ppc.arm/build_custom.xml  
+<br>171358 - [browser] exception thrown when JS call "confirm" in a frameset structure  
+<br>171484 - javadoc warning in I20070123-1030  
+</blockquote>
+
+<h2> SWT Build 3.3 023 - Tuesday January 23, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+103898 - JVELAYT10 - Spinners text don't work in FillLayout Customize window  
+<br>118709 - Support Windows mnemonic (and focus) hiding options  
+<br>128212 - Tooltips appear off right edge of screen  
+<br>142947 - [DND] Classes to provide drag under feedback should be public  
+<br>155817 - [Viewers] Treeview expand/collapse ignores somewhat quick + and - clicks (doubleclicks)  
+<br>166548 - SashForm no longer working on OSX  
+<br>166923 - Spinner.getSelection() returns a wrong value  
+<br>167656 - Text widget has inconsistent font sizes on the mac  
+<br>167748 - Program class incorrectly escapes already-escaped characters on Mac  
+<br>167831 - check box table images contain extra pixels  
+<br>168429 - StyledText: selection and scroll bar thumbs not correct  
+<br>168444 - NPE when using mouse to select next editor  
+<br>168700 - [OpenModes] Double clicks not working in N20061220-0010  
+<br>168821 - Eclipse will crash with message "Widget is disposed".  
+<br>170785 - Table Headers getting random images on Vista when cycling through sort indicator  
+<br>170813 - getSelection() method for VIRTUAL Tree returns max. eight items  
+<br>170849 - Provide an API for custom controls to detect a drag operation  
+<br>170900 - javadoc warnings in N200701180010  
+<br>171048 - Resizing on Vista causes black bars to appear  
+</blockquote>
+
+<h2> SWT Build 3.3 022 - Tuesday January 16, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+163629 - [MAC]SWT_AWT: Eclipse crashes when embed SWT_AWT.new_Frame in a ViewPart.
+<br>167124 - [AWT] SWT_AWT bridge doesn't run on AIX  
+<br>167799 - DirectoryChooser causes eclipse to freeze.  
+<br>168483 - On SLED10, context menu does not display on a popup shell with SWT.ON_TOP style bit
+<br>169784 - org.eclipse.swt.widgets.Link does not fire SelectionEvents  
+<br>169845 - Mac OS X SWT: extremely slow behavior of Table with larger numbers of items
+<br>170463 - javadoc warning in N20070115-0010
+</blockquote>
+
+<h2> SWT Build 3.3 021 - Tuesday January 9, 2007 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+104779 - ScrollBar SelectionEvent detail field not being set correctly at end of a drag  
+<br>141652 - Shell does not always restore focus after dialog closed  
+<br>147518 - StyledText down arrow (cursor) broken  
+<br>164355 - Horizontal scrolling occurs when calling Tree.setTopItem()  
+<br>167124 - [AWT] SWT_AWT bridge doesn't run on AIX  
+<br>167391 - Accessible.get_accSelection(int pvarChildren) has error when multiple items are selected  
+<br>168043 - SWT_AWT not working in CTabFolder with JDK 6 on Linux  
+<br>169413  [Viewers] SWT/JFace TableEditors don't work in 3.3M4 on OSX  
+<br>169569 - Child Shell's Image changes dock icon on OS X  
+<br>169712 - [Launcher] Eclipse won't launch in Mac OS X 10.5  
+</blockquote>
+
+<h2> SWT Build 3.3 020d - Thursday December 14, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+146171 - JVM crash using SWT_AWT  
+<br>164493 - StyledText doesn't support advanced text services for Korean IME
+<br>166935 - Accesibility - JAWS does not read out keyboard shortcuts  
+<br>167257 - open file menu not working on fedora core  
+<br>167476 - Text verify event fields different between GTK and every other platform  
+<br>167491 - inconsistent versioning for swt fragments  
+<br>167872 - HandleLeak in Font.getFontData()  
+<br>167925 - org.eclipse.swt.win32.win32.x86 still has 3.2.1 version numbers  
+<br>167991 - Javadoc warnings in I20061213-1800  
+</blockquote>
+
+<h2> SWT Build 3.3 020 - Tuesday December 12, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+109253 - Support gre64.conf  
+<br>132876 - List control documention is vague  
+<br>158982 - Table Headers getting random images on Vista  
+<br>161310 - [Browser] Re-examine need for swt-profile  
+<br>165033 - Table vertical lines always showing  
+<br>166793 - Custom-Drawing Selection-Color not working on col = 0 with sorting  
+<br>166942 - Application does not start maximized if setMaximized called before Shell.open()  
+<br>166971 - Read only text widget renders background differently with WIN XP Theme  
+<br>167219 - NPE in org.eclipse.swt.widgets.Menu._setVisible  
+</blockquote>
+
+<h2> SWT Build 3.3 019 - Tuesday December 5, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+39596 - [Accessibility] Should inform user when there is no help for a control  
+<br>75812 - [browser] Cursor over Safari Browser does not change  
+<br>82272 - List returned by Device#getFontList(...) has a lot of repetition  
+<br>102099 - NPE at org.eclipse.swt.widgets.Table.getColumns(Table.java:1223)  
+<br>114007 - The GC line width must not be an int  
+<br>146626 - VM crash when setting a font.  
+<br>146632 - Can't select font "American Typewriter Regular".  
+<br>158903 - org.eclipse.swt.internal.Library needs a way to override java.library.path  
+<br>165036 - Strange table coloring on Vista  
+<br>165091 - Eclipse 3.2.x consistently crashes on Vista  
+<br>165712 - Create wrapper Shell around existing handle  
+<br>166264 - CTabItem unnecessarily redraws entire Tab on setImage()  
+<br>166479 - Javadoc warnings in N20061130-2300  
+</blockquote>
+
+<h2> SWT Build 3.3 018 - Tuesday November 28, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+155655 - [DND] 'Alt' does not request DROP_LINK
+<br>165108 - Spinner can not apply the value that input to text-box
+</blockquote>
+
+<h2> SWT Build 3.3 017 - Tuesday November 21, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+150169 - Incorrect Tab Title for HTML File without <title> Tag
+<br>158796 - MessageBox blocks display thread on linux
+<br>161830 - incorrect SWT.NO_FOCUS behaviour for Shell windows on Linux
+<br>162198 - DnD removes selection and moves caret
+</blockquote>
+
+<h2> SWT Build 3.3 016 - Tuesday November 14, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+36070 - no mouse move in button when dragging  
+<br>68069 - Copy unreliable after longer useage  
+<br>78550 - [consistency] mac doesn't fire MouseUp very often  
+<br>79084 - Load TrueType fonts directly from a file..  
+<br>90820 - Canvas setSize don't work for sizes > 32767 without trhwoing any exception  
+<br>105750 - Multiple Mouse Listener Bug  
+<br>125222 - Unable to reorder perspective icons via drag and drop  
+<br>158831 - SWT Spinner selection value error  
+<br>163587 - Resource leak in quick access dialog leads to eventual crash  
+<br>163594 - Program.launch doesn't work on OSX  
+<br>163729 - GC.setLineDash corrupts internal data on exception  
+<br>163824 - When expanding tree in variables view, icon does not show expanded  
+<br>164131 - Table columns widths too small on Vista  
+<br>164328 - pserver URL is incorrect  
+</blockquote>
+
+<h2> SWT Build 3.3 015 - Tuesday November 7, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+151151 - Tree should have "twisties" on vista  
+<br>161511 - Thai: Unable to display Thai characters on SWT Widgets under Linux environment  
+<br>161550 - Expanding a TreeItem on Mac OS X fires MouseUp-MouseDown in the wrong order  
+<br>161809 - [OpenGL] Mac GLCanvas does not immediately update GL state upon resize  
+<br>162353 - Image set to ToolItem not properly alpha-blending  
+<br>162598 - Multiple JVM terminations  
+</blockquote>
+
+<h2> SWT Build 3.3 014d - Wednesday November 1, 2006 </h2>
+<h3><a NAME="New API"></a>New API</h3>
+<blockquote>
+New <code>DateTime</code> control.
+</blockquote>
+
+<h2> SWT Build 3.3 014b - Tuesday October 31, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+19945 - DCR: date/time widget would be useful
+<br>139711 - Eclipse loses keyboard shortcuts on OSX
+<br>162967 - Last element of a tree doesn't expand on double-click
+</blockquote>
+
+<h2> SWT Build 3.3 014 - Monday October 30, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+155404 - [Browser] embedded Mozilla crashes with SIGSEGV when opening binary files
+<br>158175 - Java core [WM_BUTTONDOWN] when selecting a tree in Vista  
+<br>159568 - Large system.out statements crash system  
+<br>161533 - JVM crash [Tree.setSelection] because SWT (Vista?) error  
+<br>162084 - Tree.setRedraw(true) doesn't redraw  
+<br>162146 - [Browser] Appending to stream hangs the SWT Browser  
+<br>162170 - Tree items shifted to the left when collapsing  
+<br>162411 - setExpanded(false) doesn't work when tree item is not visible (regression)
+</blockquote>
+
+<h2> SWT Build 3.3 013 - Tuesday October 24, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+9401 - Still get resize cursor even when Table not resizable  
+<br>133943 - [DCR] Provide way to query a previously set Cursor  
+<br>139509 - Tables with SWT.VIRTUAL cause MeasureItem, PaintItem and EraseItem to fire repeatedly on mouse movement  
+<br>153448 - Tree.setRedraw(true) causes the drawing operations to be ignored on solaris  
+<br>154429 - [64] HotSpot Virtual Machine error while starting eclipse3.3M1  
+<br>156985 - Invoking COM methods of type INVOKE_FUNC have different behavior in Eclipse 3.1.2 and Eclipse 3.2  
+<br>159586 - Need a way to expand TreeItems without causing scrolling  
+<br>161259 - Embedded Browser does not appear to get mouse move/capture (WebKit/Mac OS X)  
+</blockquote>
+
+<h2> SWT Build 3.3 012 - Tuesday October 17, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+105101 - Transform translations not accounted for in GC.drawFocus()  
+<br>105764 - org.eclipse.swt.custom.ControlEditor.computeBounds() is package private  
+<br>150782 - SWT cause JVM crash  
+<br>151142 - pixel corruptions in table with Check flag and Images  
+<br>153196 - Paint example draws lots of garbage on mac  
+<br>155389 - Cursors don't show coloured if created from Image  
+<br>160498 - Need the Tracker class to accept empty Rectangle lists  
+<br>160647 - Table widget leaks  
+<br>160667 - The example doesnt up to date.....  
+</blockquote>
+
+<h2> SWT Build 3.3 011 - Tuesday October 3, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+103809 - WinCE: VM crash on Display.dispose() call  
+<br>155451 - Bad drawing in Tree and Table  
+<br>156445 - Shell initialization too slow  
+<br>156754 - tooltips not read by screen reader/MSAA for toolbar items w/ image  
+<br>157544 - List: preferred width incorrect after items are removed  
+<br>158212 - [64] Highlight Colors all appear black and Fortran Formating Offset  
+<br>158742 - Eclipse terminates with jvm exit code=1 when trying to run dynamic web project  
+<br>158790 - external browser can't be found on Redhat  
+<br>158797 - FileDialog limit on multi-select  
+<br>158970 - Disabling parent Composite doesn't throw FocusOut for the focused child control  
+</blockquote>
+
+<h2> SWT Build 3.3 010a - Tuesday September 26, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+JUnit failure - throw SWT.ERROR_IO instead of SWT.ERROR_NO_HANDLES when image filename does not exist
+</blockquote>
+
+<h2> SWT Build 3.3 010 - Tuesday September 26, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+9953 - When the window is launched Maximized, it doesn't  
+<br>93938 - Combo displays selection range without focus  
+<br>115291 - [Program] Program.execute fails when command or filename contains whitespace  
+<br>149774 - [Program] Improve command handling of Program#execute(String) on Win32  
+<br>156675 - Repaint issue with radio buttons in preference page  
+<br>156943 - TootlTip display error for negative location  
+<br>157292 - MouseWheel event provides wrong coordinates in case of negative x coordinate (event outside widget)  
+<br>157634 - Sibling decorations traversed in wrong order when decorations disposed  
+<br>157635 - BIDI:StyledText Selection of text, and BIDI formating not correct  
+<br>157670 - Problem loading BMP  
+<br>157689 - Problem loading BMP with negative height (bottom-up)  
+<br>157846 - Decorations disappear in Tree when adding Columns  
+<br>157865 - moving column can lose sort indicator  
+<br>158411 - Regression: Alt+Numpad keystrokes broken (Part 2)  
+<br>158462 - cleanup VerifyEvent constructor  
+<br>158472 - AnimateWindow call makes SWT unusable on NT4.  
+<br>158577 - combo.setItem dispatchs a ModifyListener event with empty text  
+</blockquote>
+
+<h2> SWT Build 3.3 009a - Thurssday September 21, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+157914 - Unable to open external Safari browser
+</blockquote>
+
+<h2> SWT Build 3.3 009 - Tuesday September 19, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21009 - ArrayIndexOutOfBoundsException in CTabFolder  
+<br>108175 - TableColumn sort indicator not updating to new Font properly  
+<br>114244 - CCombo computeSize needs to max item width with text width  
+<br>117752 - CCombo text drawn too high  
+<br>137786 - new 'default' drag & drop feedback interferes with other feedback  
+<br>151348 - drop text in Text widget duplicates text  
+<br>151633 - [KeyBindings] 2 popups displayed on Linux  
+<br>155212 - Misprints in SWT Win32 code ?  
+<br>157440 - On Mac, can't drawText after setBackgroundPattern() is called.  
+<br>157478 - Web services wizard scale and graph all weird  
+<br>157557 - SWT.Settings javadoc states incorrect value  
+</blockquote>
+
+<h2> SWT Build 3.3 008 - Tuesday September 12, 2006 </h2>
+<h3><a NAME="New API"></a>New API</h3>
+<blockquote>
+CCombo now fires <code>SWT.Verify</code> events
+<br><code>CCombo.addVerifyListener(VerifyListener)</code>
+<br><code>CCombo.removeVerifyListener(VerifyListener)</code>
+<br><code>StyledTextPrintOptions.printLineNumbers</code> field
+<br><code>Variant.getByte()</code>
+<br><code>Variant.getChar()</code>
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+32683 - "up" arrow button displays as "right".  
+<br>110163 - X Window System error, using Swing system look and feel, rendering SVG using SWT_AWT in non-top stack layout
+<br>114169 - [Program] Program.getImageData() not implemented on Mac  
+<br>150300 - path.close() has no effect  
+<br>150304 - cubicTo and quadTo methods of Path not working  
+<br>150306 - trouble with drawing a string  
+<br>151150 - Multi Selection Tree only last 2 items are 'really' selected  
+<br>152769 - StackOverflowError (recursive callWindowProc)  
+<br>153841 - Macintosh only: values in some text fields of launch configuration dialog are slightly shifted, obscuring first character
+<br>153939 - Problem with gc.drawString()  
+<br>154052 - Table tooltip does not show after selection of a table item  
+<br>154736 - All Fonts appear the same  
+<br>154746 - Path Clipping does not work properly on Mac, GTK and Motif  
+<br>154928 - CCombo should fire Verify events  
+<br>154943 - JavaScript error with generated content from GWT  
+<br>155162 - Alt+Numpad_Divide issues two key events  
+<br>155224 - NPE in CCombo.setVisible(false) if some of affected listeners has disposed it
+<br>155390 - Cursor ignores horizontal hotspot location and uses vertical instead
+<br>155624 - SWT Table column resize issue  
+<br>155801 - Table column tooltip disappears after scrolling  
+<br>155916 - Classes in org.eclipse.swt.opengl have warning comments in Javadoc
+<br>156027 - VerifyEvent e.doit inconsistent behavior on Linux GTK  
+<br>156213 - BDI: Styledetxt setOrientation does not work, on the fly  
+</blockquote>
+
+<h2> SWT Build 3.3 007a - Wednesday August 30, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+155679 - VirtualTableTests failing on the Mac
+</blockquote>
+
+<h2> SWT Build 3.3 007 - Tuesday August 29, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+18377 - Tree.getSelection() could be better ordered  
+<br>134269 - Adding column to var view causes VM to GP  
+<br>145498 - Cannot start Eclipse 3.1.2 under AIX 5.3  
+<br>147418 - Control.getMonitor does not properly set client area  
+<br>149649 - Cannot grab scrollbar thumb in ON_TOP shell on gnome 2.14  
+<br>153885 - TreeItem.getExpanded() does not work on Windows Mobile 2003  
+<br>154023 - Can't get a Dialog truely on TOP  
+<br>154198 - Flicker while scrolling scale widget  
+<br>154310 - [browser] cannot click into text field and type  
+<br>154611 - ComboViewerTest dies with BadMatch error  
+<br>154961 - The ToolTip object is not disposed appropriately and prevents from creating another ToolTip on the same shell  
+</blockquote>
+
+<h2> SWT Build 3.3 006 - Tuesday August 22, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24451 - Reading JPEG images slow in SWT  
+<br>42457 - Invalid image exception while loading JPEG image  
+<br>133164 - JPEGFileFormat converts colors in rgb jpeg (when it shouldn't)
+<br>139485 - [Drag & Drop] DnD auto-scroll support in StyledText is too slow
+<br>144765 - Layout on Labels generates a size that cuts off characters  
+<br>146402 - Content assist popup shows ellipsis for selected item on Windows Vista beta 2
+<br>147673 - Quick-Type hierarchy's treeviewer cannot be collapsed with mouse
+<br>147808 - CCombo dropdown doesn't have keyboard focus in GTK  
+<br>151635 - [browser] cannot tab between fields on page  
+<br>151767 - Table throws ArrayOutOfBounds Exception upon TableColumn.dispose()
+<br>151916 - Browser auto-detect should check for XULRunner first  
+<br>152129 - cannot set enabled state on Vista  
+<br>152800 - FileDialog crashing  
+<br>152936 - Regression: GC.drawRectangle fills background in some cases  
+<br>152937 - Regression: Line dash style is ignored  
+<br>153034 - Invalid image exception while loading PNG image  
+<br>153367 - eclipse 3.3 stream builds broken on Solaris GTK  
+<br>153398 - Invalid thread access in Snippet133  
+<br>153423 - Text and Spinner initially report incorrect preferred size  
+<br>153567 - Custom cursor has wrong colours  
+</blockquote>
+
+<h2> SWT Build 3.3 005 - Tuesday August 8, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+62627 - "Next Word" definition  
+<br>83451 - Mouse Behaviour breaks UI (low resources, grab stuck?)  
+<br>104750 - GTK FileDialog ignores setFileName() for SWT.OPEN dialogs if no filterPath set
+<br>124836 - CLabel.shortenText(...) takes almost forever for long text  
+<br>137621 - License Agreement Does Not Display on HP-UX  
+<br>138528 - Tooltips do not show after tool button pressed  
+<br>139854 - swt dependecy on msvfw32.dll  
+<br>141254 - Linux GTK and TableEditor Failure Assertion  
+<br>145704 - Previous Word commands are too 'greedy'  
+<br>146303 - Label Tooltip text not visible on Intel Mac  
+<br>147228 - Table column tooltip disappears after clicking the header  
+<br>148522 - Table.showSelection() doesn't show selection with images  
+<br>149870 - multiple widgets report focus  
+<br>150155 - Clicking in textfield sets cursor to one before last char  
+<br>151136 - Tree with TreeColumn loops forever if setWidth not called  
+<br>151137 - thumb doesn't work for Tree with column  
+<br>151893 - Issue with background images and CLabels  
+<br>152385 - Tooltip is not shown all the time  
+<br>152718 - StyledText printing feature doesn't work  
+</blockquote>
+
+<h2> SWT Build 3.3 004 - Tuesday July 25, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+19602 - [Printing] Line numbers aren't printed  
+<br>24697 - DCR - Request for PNG write support  
+<br>26436 - Spec PrinterData.startPage/endPage  
+<br>63226 - Undocumented error thrown in Image code  
+<br>81834 - BIDI:  StyledText does not convert European Number to Arabic Number
+<br>142335 - Perf Fix for: org.eclipse.swt.internal.image.PngHuffmanTable.generateTable
+<br>150099 - Menu class has a public '_setVisible(boolean)' method.  
+<br>150274 - Flicker with the new WinXP border  
+<br>150407 - PNG Load Speed Terrible for medium to large images  
+<br>150764 - [PATCH] fix compiler warnings for GCC 4.x  
+<br>151228 - three-button Mozilla "confirm" dialog has same label on all three buttons
+<br>151330 - Browser not supported on linux ppc  
+</blockquote>
+
+<h2> SWT Build 3.3 003 - Tuesday July 18, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24796 - DCR - No printing on Linux GTK
+<br>80033 - SWT Browser does not display https.  
+<br>87279 - 6 different methods cause pens to be constructed and selected
+<br>91348 - [Browser] Embedded web browser doesn't render visited links
+<br>102756 - Use GtkComboBox instead of GtkCombo  
+<br>105044 - Inefficient use of Pens and Brushes causing poor performance  
+<br>105618 - Graphics.setLineDash causes ruler guide redraw problems  
+<br>109843 - Non-resizable table columns resized by CTRL+KEYPAD_ADD  
+<br>112570 - Cairo incorrectly computes text extent  
+<br>125288 - GC.textExtent does not accurately predict text size  
+<br>127469 - When a GC uses advanced and alphas the clipping is ignored in some cases.
+<br>128200 - TextLayout ignores transformations on GC  
+<br>132500 - [Browser] Eclipse abended at the operation on WS Explorer with the internal web browser
+<br>133183 - Button widget with SWT.CHECK style is not showing foreground color when it is in selected/checked state
+<br>133928 - Program#getProgram(String) fails if the program doesn't have a \\DefaultIcon
+<br>134760 - Performance of GC.fill* methods on GTK  
+<br>140132 - GC.setLineDash no-op affects line drawing  
+<br>140244 - Eclipse 3.2 gtk RC2 dumps core on Solaris 9  
+<br>141138 - Pixel corruption involving SWT.DOUBLE_BUFFERED, GC.setAdvanced() and TextLayout
+<br>146250 - [SWT] Columns of Table widget cannot be resized, except for by dragging a mouse
+<br>149493 - UI-Thread blocked while Menu is visible  
+<br>149749 - MANIFEST.MF files must be up-to-date  
+<br>149952 - First TableColumn in a Table always left justified  
+<br>150086 - Eclipse execution problem.  
+<br>150314 - NullPointerException while creating a pattern  
+</blockquote>
+
+<h2> SWT Build 3.3 002 - Tuesday June 27, 2006 </h2>
+<h3><a NAME="New API"></a>New API</h3>
+<blockquote>
+<code>MouseEvent.count</code> field
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+23614 - [DCR] Allow triple mouse click events  
+<br>62555 - Group border renders badly  
+<br>77321 - StyledText's font appears inconsistent with GC.drawString(..) font
+<br>85783 - Editor font issues  
+<br>90856 - segfault while clicking in browser  
+<br>99697 - Can't navigate to external web sites  
+<br>115172 - Text clipped in editors if size reduced from platform default
+<br>115947 - Accessibility : Cannot set tooltip Text for image in Table Column
+<br>121114 - Inconsistent measurements from empty TextLayouts  
+<br>139790 - Print Margin shows up in the wrong place  
+<br>140519 - StyledText error in getTextBounds (Does not count last newline)
+<br>141282 - DnD doesn't support special characters  
+<br>146575 - setCursor is ignored in the SWT Text under gtk-linux  
+<br>147423 - NPE when removing an item from a Table with custom draw hooks
+<br>147550 - VerifyEvent.doit=false does not work for Text  
+<br>148354 - Regression: Radio buttons fail to redraw background  
+</blockquote>
+
+<h2> SWT Build 3.3 001 - Tuesday June 13, 2006 </h2>
+<h3><a NAME="New API"></a>New API</h3>
+<blockquote>
+CCombo methods cut(), copy() and paste()
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+56116 - System Tray not implemented for MAC  
+<br>108573 - Make Objective-C  Runtime APIs  public in  SWT WebKit.java  for MacOS X
+<br>110555 - Draw2d Graphics line style setting not consistent  
+<br>120118 - "xxx.getDisplay().update" does..."xxx.getShell().update" doesn't
+<br>124425 - GC.drawText does not work when setAdvanced(true)  
+<br>136323 - Shell.getClientArea has side effect  
+<br>136472 - GC#drawText doesn't work with arabic text when advance is on  
+<br>137911 - Browser widgets turn to ghosts if their construction fails.  
+<br>139329 - NullPointerException in ExpandBar
+<br>141678 - [Browser] JavaDoc Hover/Browser-Widget doesn`t show Text
+<br>142880 - The point down behavior of the DropTargetEvent.item
+<br>143732 - add cut/copy/paste api on CCombo  
+<br>145347 - Warnings with Fedora 5 compiler (gcc)  
+<br>145662 - Group control borders disappear when tabbing between child widgets
+<br>146264 - StyledText with SWT.WRAP flag does not shape arabic letters  
+</blockquote>
+
+<h2> SWT Build 3.2 032o - Friday June 9, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+145526 - CTRL+F crashes JVM in Search panel
+</blockquote>
+
+<h2> SWT Build 3.2 032m - Monday June 5, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+143661 - MouseUp incorrectly fired on Tree  
+</blockquote>
+
+<h2> SWT Build 3.2 032k - Friday May 26, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+143236 - setItemCount(0) leaking TreeItems  
+<br>143482 - CHIViewEmbeddedFrame not found in Eclipse  
+</blockquote>
+
+<h2> SWT Build 3.2 032j - Friday May 19, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+140843 - JVM crash when running RCP application on HP-UX  
+<br>141395 - Selected item lost in Tree  
+<br>141489 - TableEditor background color artifacts on scrolling  
+<br>142193 - Launchers feature fails without inheritall in gather.bin.parts
+</blockquote>
+
+<h2> SWT Build 3.2 032h - Friday May 12, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+128545 - BIDI: Cursor is stays in the beginning of the Hebrew text segment
+<br>134353 - Table/Tree: Columns pack on table.clear for no reason with a lot of flashing
+<br>138907 - Cheese in Tree with text that spans columns  
+<br>141293 - about.html needs to updated in swt examples, tests and tools
+<br>141552 - Unexpected popup menu  
+<br>141589 - SWT.MenuDetect sent 3 times for toolbars  
+</blockquote>
+
+<h2> SWT Build 3.2 032 - Friday May 5, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+67384 - SWT_AWT not implemented for Mac
+<br>96378 - gc.setTransform() makes fonts scale strangely when printing  
+<br>128373 - Virtual Tree needs documentation  
+<br>130173 - Tree Column does not respond to DefaultSelection event as it did in 3.1
+<br>133962 - SWTException closing GLCanvas in an RCP application on Mac OS X
+<br>138319 - SWTException: Failed to execute runnable (IllegalArgumentException: Index out of bounds)
+<br>139226 - Using the mouse to page down auto completion choices closes completion window
+<br>139262 - 'set data' callback not sent after all items are cleared in virtual tree
+<br>139505 - Update manifest to compile against Foundation 1.0: org.eclipse.swt
+<br>139964 - Use of 1.4 APIs in SWT_AWT
+<br>140052 - [CTabFolder] losing focus problem?
+<br>140272 - Editing OS.java really slow
+</blockquote>
+
+<h2> SWT Build 3.2 031 - Friday April 28, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+60273 - Toolbar background colour doesn't match background (XP/Silver)
+<br>95634 - [Tree] TreeColumn misses tooltips  
+<br>96615 - StyledText and Text keybindings differ on Mac  
+<br>99145 - Link widget only disables link, not text  
+<br>99984 - Sync view toolbar buttons are bigger with SWT manifest  
+<br>114850 - Eclipse 3.2M2 crashes just after startup  
+<br>123922 - [Patch] SWT Javadoc: Some typos/minor errors  
+<br>127216 - [Patch] Table check boxes should have shade when selected  
+<br>127716 - GC.drawPoint() calls aren't affected by a Transform  
+<br>127813 - CCombo.computeSize returning incorrect values when using wHint/hHint
+<br>129564 - StyledText should render tabs exactly 4 spaces wide  
+<br>129609 - [browser] unable to enter text in <textarea>
+<br>131017 - HTML forms displayed in SWT Browser does not accept accented characters input
+<br>131265 - Make ExpandBar background changeable by users  
+<br>133672 - GC construction is very slow on the Mac when a Display is passed in
+<br>134088 - DnD support in StyledText doesn't auto-scroll  
+<br>134091 - Drop in StyledText does not work at the end of a line  
+<br>134112 - DnD in StyledText: dropping on an empty line is hard  
+<br>134417 - Browser Cannot Be Disposed (Intel Carbon SWT)  
+<br>134925 - Table/Tree Columns don't align SWT.RIGHT and SWT.CENTER text properly (regression) (GTK)
+<br>136272 - Combo on Mac incorrectly sends KeyDown event before Traverse when arrow up/down keys used
+<br>136451 - ToolItem is not visible if bounds set before text  
+<br>136473 - Image capture is purple on Mac  
+<br>136633 - Failed to execute runnable (java.lang.ArrayIndexOutOfBoundException) in debug mode
+<br>136641 - Scrollbars not excluded from client area  
+<br>136675 - No scrollbar events for Text  
+<br>136890 - [Patch] SWT Javadoc: Some typos/minor errors (Part 2)  
+<br>136931 - Regression in right-mouse button behavior  
+<br>137236 - Macintel: setEchoChar cause StringIndexOutOfBoundsException  
+<br>137320 - [StyledText] caret does not move correctly when inserted text wraps
+<br>137524 - NPE in AsynchronousViewer  
+<br>137714 - WinCE: setClipping(x,y,w,h) throws NullPointerException  
+<br>138062 - NPE in getData  
+<br>138076 - Browser does not start on Debian  
+<br>138461 - [Workbench] Perspective popup menu doesn't show up on Mac  
+<br>138499 - Label DropTarget is "too small" on Motif  
+<br>138630 - Icons being drawn on top of text in tabbed folder
+<br>138724 - Use of 1.4 APIs
+<br>139060 - Regression: Tree: Selection lost when collapsing unrelated item
+</blockquote>
+
+<h2> SWT Build 3.2 030 - Tuesday April 12, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+45918 - eclipse should enable XP visual styles if available (from comctl32.dll)
+<br>76740 - [painting] Ctrl+End brings StyledText into strange state
+<br>82769 - [Contributions] Disabled menu items have enabled images when armed
+<br>83016 - [browser] Use Mozilla 1.8 nsIWebBrowserStream API
+<br>110794 - [64] Crash when pressing ENTER after having entered value in "Search" form
+<br>113559 - [build] Dependency on  libstdc++.so.5
+<br>125113 - Printing document with long lines loses text at the bottom of the page
+<br>127132 - TableColumn#pack does not work for virtual table
+<br>127902 - Focus gets stuck in Expandbar
+<br>128273 - TableCursor not working properly on Linux GTK
+<br>128286 - Table#SetTopIndex has no effect for virtual table
+<br>133304 - [Browser] Eclipse fails to start
+<br>134175 - Not consistenly getting control resize event from table column
+<br>134356 - Walkback turning on wrap in StyledText. 
+<br>134482 - [64] SWT Snippet24 (default selection) does not work on amd64
+<br>134837 - Tree- Random foreground color appears for Tree when selecting items and subitems
+<br>135303 - CBanner draws unwanted gradient line at bottom when it has more height than the default
+<br>135533 - remove solaris-motif-sparc downloads from build
+<br>135649 - Mouse wheel scrolls invisible scrollbars
+<br>136064 - Snippet 225 (balloon tool tip) should say @since 3.2
+</blockquote>
+
+<h2> SWT Build 3.2 029a - Monday March 27, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+94691 - Code Style Page crops "Configure Project Specific" message  
+<br>115234 - [DnD] [WorkbenchParts] Resizing tiled editors incorrectly sizes editor parts at start of drag
+<br>116749 - Some widgets don't match default background inside Group  
+<br>118953 - setForeground/Background color does not work for SWT.READ_ONLY Text widgets on a Mac
+<br>120051 - Some font names on OS X have null (\0) characters between every character
+<br>120241 - MouseListener on Sash does not receive mouseUp events  
+<br>122049 - crash when clicking on yellow javadoc popup window  
+<br>124415 - Browser causes blank white box on OSX  
+<br>127821 - ControlExample crash when setting background image on SEPARATOR Label
+<br>130971 - TreeItem not showing text  
+<br>132874 - List control does not allow 0th item to be deselected.  
+</blockquote>
+
+<h2> SWT Build 3.2 029 - Tuesday March 21, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+32310 - Left click followed by right click results in double click  
+<br>51020 - SWT.ON_TOP does not work on Mac OS X  
+<br>66615 - SWT_AWT.new_Frame occasionally hangs  
+<br>77371 - [browser] Browser widget not using correct language settings  
+<br>77456 - DBCS3.2: SWT Browser sends improper Accept-Language, Accept-Charset
+<br>83133 - Exposé causes dialog to move behind shell.  
+<br>83431 - Support an "expandable group"  
+<br>104150 - [Patch] Table cursor separated from table selection when clicking on grid lines or empty space
+<br>113019 - Browser.setText() sometimes appends dust characters after html
+<br>116975 - SWT_AWT bridge with JDialog cannot use Tab within dialog. focus is lost
+<br>122379 - SWTException when deleting text from StyledText, if selection larger than visible part
+<br>125131 - Keys fail in JDialog after SWT_AWT.new_Frame in WorkspacePart
+<br>127827 - Implement background image in Table and Tree  
+<br>128400 - Class ST misuses javadoc comments as category headers  
+<br>128662 - SWT Browser crashes if URL contains special characters  
+<br>128719 - [StyledText] A lot of cheese displaying Japaneese and Chinese
+<br>128750 - Error occurs when delete text in StyledText  
+<br>129526 - Proposal for new snippet : Non-rectangular Shell using transparent images
+<br>129999 - EraseItem event's gc does not have the item's colours or font set
+<br>131393 - Adding TableColumn at index 0 makes cell disappear  
+<br>131623 - Tree selected column bgcolour does not draw on empty rows when setting a tree background colour
+<br>131625 - Tree adds useless vertical scrollbar  
+<br>131626 - Tree selected background colour in column 0 overrides cell colour, but not in any other column
+<br>131627 - Tree: Empty tree does not show selected column background colour, unlike Table
+<br>131654 - Decorations.computeTrim can cause program to hang  
+<br>131724 - Adding PaintItemListener to Table causes NPE  
+<br>131727 - SWT_AWT frames in task bar  
+<br>131739 - adding EraseItem listener to Tree causes major drawing problem
+<br>131743 - adding an EraseItem listener to a Tree can lead to selection cheese
+<br>131805 - Tree: Sorted background column colour does not move with movable columns
+<br>131867 - Incorrect GC.fillPath() behavior  
+<br>131906 - StackOverflowError in StyledText  
+<br>132089 - Tree: Text corruption in cells after moving column 0 and resizing column
+<br>132376 - Table background colors are wrong in GTK
+</blockquote>
+
+<h2> SWT Build 3.2 028 - Tuesday March 14, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+67642 - StyledText: Graphic bug displaying bengali chars
+<br>91454 - [browser] RH EL4 - need way to locate firefox build
+<br>92548 - GB18030: Part of Uigur characters(4-bytes) cause whole line sinkage to 1/3.
+<br>97404 - add support for VT_I8 and VT_R8
+<br>108996 - Support gradient backgrounds for StyledText widgets
+<br>121351 - Alpha channel ignored when Image is disabled or greyed out
+<br>125656 - Eclipse freezes dismissing popup windows (Quick Fix, Spell Check, etc)
+<br>129908 - BIDI: Output text have contextual order layout
+<br>129972 - adding MeasureItemListener to Table causes NPE
+<br>130756 - Tree does not use the OSs selected column background color
+<br>130113 - eclipse (64-bit) crashes as soon as code complete is invoke (ctrl-space) in java files
+<br>130346 - Adding MeasureItem listener on Table can lead to divide by 0 in getItem()
+<br>130876 - Background Image not inherited running w/o manifest
+<br>131159 - ExpandItem needs getHeaderHeight()
+<br>131160 - background color problems in tree with columns
+<br>131585 - notifed is not a word
+</blockquote>
+
+<h2> SWT Build 3.2 027 - Tuesday March 07, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+58009 - Need API to add notifications on system tray
+<br>79391 - ControlExample - tab items are truncated
+<br>98265 - more fixing
+<br>106372 - Provide DND support for the StyledText widget
+<br>114662 - Spinner setSelection prints X warning
+<br>123827 - Outline "crazy-scrolls" when it gets focus
+<br>127168 - Spinner generates bogus ModifyText events
+<br>129590 - Event.index == 0 all the time
+<br>129967 - System Settings being fired too often
+<br>130037 - Cheese after dropping TreeItem that has Image set
+<br>130120 - cell custom background colour appears in adjacent cells
+<br>130159 - ImageLoader.save(filename, format) should close the OutputStream.
+<br>130375 - Background Inheritance Incorrect in Composite Hierarchies
+</blockqoute>
+
+<h2> SWT Build 3.2 026a - Tuesday February 28, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+129607 - Display.getShells() returns disposed shell Part 2
+</blockqoute>
+
+<h2> SWT Build 3.2 026 - Tuesday February 28, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+124004 - Drop enabled on Text Widget
+<br>126818 - Horizontal ScrollBar not ReSized When Table Contents Changed
+<br>126996 - Can't asyncExec setting of text in virtual Tree
+<br>128378 - TreeItem and TableItem constructors should state precondition on index
+<br>128598 - 3.2 M5 delta pack not generated correctly
+<br>128845 - ExpandBar Widget not painting controls
+<br>129054 - Text widget VerifyListener causes characters to be inserted backwards if you change them
+<br>129126 - When VerifyListener is added in org.eclipse.swt.widgets.Text, StringIndexOutOfBoundsException might be occurred by UNDO operation.
+<br>129501 - Tree FULL_SELECTION doesn't redraw item background in selection color
+<br>129535 - GridData/GridLayout is showing abnormal layout
+<br>129607 - Display.getShells() returns disposed shell
+</blockquote>
+
+<h2> SWT Build 3.2 025 - Tuesday February 21, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+13969 - Accessibility : No visual focus is provided in Table
+<br>47872 - [SWT Examples] broken link in swt_launcher_ex.html
+<br>87213 - Unable to run eclipse: undefined symbol: atk_object_add_relationship
+<br>127095 - NPE when trying to dispose columns
+<br>127266 - Text.getCaretLocation() on GTK with style = SWT.SINGLE
+<br>127516 -Warnings in SWT samples
+<br>127960 - Native crash in SWT when brower JavaScript closes the window
+<br>128267 - No longer possible to capture screen with new GC(display)
+<br>128408 - JPEGQuantizationTable precision=8 values can be negative
+<br>128448 - [Browser] No javascript confirm dialog.
+<br>128476 - Regression: Tree with columns does not reset horizontal scroll bar
+</blockquote>
+
+<h2> SWT Build 3.2 024k - Thursday February 16, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+128244 - Table Row Overdraws Table Headers
+</blockquote>
+
+<h2> SWT Build 3.2 024k - Thursday February 16, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+127734 - Cannot open Launch Config dialog
+</blockquote>
+
+<h2> SWT Build 3.2 024i - Thursday February 16, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+127755 - NPE in Tree.callPaintEventHandler
+</blockquote>
+
+<h2> SWT Build 3.2 024h - Thursday February 16, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+123466 - [Viewers] Strange dots in table item labels
+<br>127751 - VIRTUAL Table does not paint with snippet 144
+</blockquote>
+
+<h2> SWT Build 3.2 024d - Monday February 13, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+126996 - Can't asyncExec setting of text in virtual Tree
+</blockquote>
+
+<h2> SWT Build 3.2 024c - Monday February 13, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+54426 - Implement RichText editor for SWT (partial fix)
+<br>100114 - SWT, launcher and support JNI libraries need to be built universal
+</blockquote>
+
+<h2> SWT Build 3.2 024b - Monday February 13, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+80913 - TabFolder no longer sets focus to tab when mnemonic pressed
+</blockquote>
+
+<h2> SWT Build 3.2 024 - Friday February 9, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+70167 - Image(Device, InputStream) throws incorrect exception for bad PNG
+<br>126864 - Regression: Drop target has incorrect DND cursor
+<br>126995 - AIOOB exception for Tree
+<br>126996 - Can't asyncExec setting of text in virtual Tree
+</blockquote>
+
+<h2> SWT Build 3.2 023c - Tuesday February 7, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+On GTK, close button will not draw correctly due to dynamic tooltips
+</blockquote>
+
+<h2> SWT Build 3.2 023b - Tuesday February 7, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+126299 - After clearAll(), GTK virtual Tree forgets old TreeItem objects and creates new ones
+</blockquote>
+
+<h2> SWT Build 3.2 023a - Tuesday February 7, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+Compile errors on GTK 64
+<br>Callbacks leaked on GTK
+</blockquote>
+
+<h2> SWT Build 3.2 023 - Tuesday February 7, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+98265 Strings in Combo drop down list are truncated
+<br>105028 WinCE: Menu Image Problem
+<br>124481 TreeEditor: ProgressBar does not fill cell correctly
+<br>125255 Checkbox tree selection makes checkbox hard to see
+<br>125725 Mistake in FormLayout.layout(Composite, boolean)
+<br>125849 Wrong colors with gradient pattern
+</blockquote>
+
+<h3><a NAME="New API"></a>New API</h3>
+
+<p> Added ExpandBar and associated classes.</p>
+
+<h2> SWT Build 3.2 022 - Tuesday January 31, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+64686 - ScrollBar does not receive SWT.Selection messages
+<br>103976 - Spinner widget should provide setValues() method like Slider
+<br>115209 - SWT OSX 3.2M does  not display labels on raw background
+<br>124414 - SIGSEGV from swt-3.2M4-gtk-linux-x86_64.zip
+<br>Added drag under feedback for Table and Tree on Mac
+<br>Added dynamic tooltips on all platforms
+</blockquote>
+
+<h2> SWT Build 3.2 021 - Tuesday January 24, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+38528 - Two full screen redraws creating a GC on Display
+<br>40117 - San-serifed monospaced fonts do not align properly.
+<br>68255 - a Tab is not 4 spaces
+<br>91364 - SWT_AWT.new_Shell() in GTK version blocks forever on RedHat 9
+<br>117507 - Text editor flashes on call to selectAndReveal(int,int)
+<br>112104 - GC.drawArc/fillArc results in different effects when antialias on/off
+<br>121190 - Setting context menu on editable CCombo
+<br>121506 - GC.drawImage() selects wrong source region
+<br>123675 - fillGradientRectangle() in gc doesn't use gDip clipping when foreground and background are the same.
+<br>124092 - StyledText's RTF copy/paste broken
+<br>124208 - Virtual tree setItemCount(0) has no effect
+<br>124400 - Please expose minHeight, minWidth, expandHorizontal, expandVertical in ScrolledComposite
+<br>124591 - ScrolledComposite.computeSize returns wrong value when alwaysShowScrollBars==true
+</blockquote>
+
+<h2> SWT Build 3.2 020 - Tuesday January 17, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+86825 	CLabel not correctly captured by WM_PRINT
+<br>120907 	Border for Forms API controls screenshots
+<br>121722 	HTML clipboard transfer does not work on Windows
+<br>122428 	Performance on OS X still degrades on 10.4.3
+<br>123143 	Drag handle changes to four-way on click
+<br>123184 	Embedded image render error in StyledText
+<br>123594 	Text.setForeground(Color) is ignored with SWT.INHERIT_FORCE
+<br>123764 	Vertical table lines not redrawn on horizontal scroll
+<br>123993 	SWT_AWT embedded frame doesn't get iconify/decionify events
+</blockquote>
+
+<h2> SWT Build 3.2 019 - Tuesday January 10, 2006 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+49267 	First characters in Text initially not displayed
+<br>118670 	Make StyledText.getLinePixel(int)/getLineIndex(int) publi...
+<br>118796 	DirectoryDialog.open does not return choosen directory
+<br>119207 	TableItem errors after/during dispose
+<br>120524 	drawRoundRectangle draw bad round corner of rectangle.
+<br>120573 	[implementation] IllegalArgumentException in StyledText
+<br>120914 	Warnings suppressed from GtkFileChooser creation
+<br>120954 	Background of Control with SWT.INHERIT_FORCE doesn't show...
+<br>120980 	Regression: Image on disabled button no longer greyed out
+<br>121507 	font leading (line spacing) excessive for small fonts
+<br>121729 	in SWT, javadoc for Table.getColumns does document order
+<br>121741 	Disposing a StyledText disposes its menu?
+<br>121890 	Canvas and mouseMoveListener and MacOS
+<br>121903 	OS.AlphaBlend causes "bddraw" stdout spew
+<br>122433 	Exception in ImagesList
+<br>122736 	StyledText - ArrayIndexOutOfBoundsException
+</blockquote>
+
+<h2> SWT Build 3.2 018f - Wednesday December 14th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+120654    	Cheese in StyledText on Linux
+</blockquote>
+
+<h2> SWT Build 3.2 018e - Wednesday December 14th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+121089    	LineBackgroundListener no longer works
+</blockquote>
+
+<h2> SWT Build 3.2 018c - Wednesday December 14th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+118909    	Problems with accents using SWT_AWT
+</blockquote>
+
+<h2> SWT Build 3.2 018b - Wednesday December 14th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+NoPR	Warning fixes, background redraw in Combo and Spinner
+</blockquote>
+
+<h2> SWT Build 3.2 018a - Tuesday December 13th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+29994	Image background Composite / Transparent widget backgrounds
+</blockquote>
+
+<h2> SWT Build 3.2 018 - Tuesday December 13th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+114518	[build] eclipse solaris-motif depends on libm.so.2
+</blockquote>
+
+<h2> SWT Build 3.2 017a - Monday December 12th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+116722	[PropertiesView] [CellEditors] (regression) Property edit...
+<br>119638 	Typo in ToolItem.getControl
+<br>119670 	StyleText.setRange(StyleRange) no longer working
+<br>119687 	Tree mouse button down messing up cell editors
+<br>120176 	Can't reliably change the cursor during Tracker.open()
+</blockquote>
+
+<h2> SWT Build 3.2 017 - Tuesday December 6th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+100659 	Dialog displays small sometimes in GTK
+<br>116121 	Invalid widget used for gtk_widget_get_accessible
+<br>116746 	ToolItem text is clipped
+<br>117700 	[open type] Open Type table shows unmotivated ellipsis, d...
+<br>118119 	Mac: Calling Tree.setItemCount() causes SWTError: Item no...
+<br>118362 	StyledText: Top index wrong after selectAll
+<br>118378 	StyledText#computeSize imposes artificial limit on return...
+</blockquote>
+
+<h2> SWT Build 3.2 016 - Tuesday November 29th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+64776    	StyledText word traverse places caret wrong with WRAP
+<br>67754 	StyledText: AIOBE (Power of 2 + 1)
+<br>74482 	Background colour not propagated inside group or tabfolder
+<br>83405 	Support multiple fonts in StyledText
+<br>83406 	Support objects in StyledText
+<br>83430 	Support indentation in StyledText
+<br>99381 	[PerspectiveBar] Alignment of items in perspective switch...
+<br>99461 	resizing Table can have draw problems
+<br>109901 	Poor performance of StyledText.
+<br>112705 	[build] SWT standalone .zip uncompresses to the current d...
+<br>115398 	[build] Compile warnings in os.c on Solaris/GTK+
+<br>117574 	RIGHT_TO_LEFT | DOUBLE_BUFFERED don't get along
+<br>117757 	Is TreeItem (.. int hParent, ..) supposed to be public?
+<br>117807 	possible bug in TableItem.setImage (int index, Image image)
+<br>117816 	Crash while running JFace test suite
+<br>117879 	NullPointerException from mouse move
+<br>117928 	JDT Text test don't run anymore (out of handles) - works ...
+<br>117990 	Reduce matching complexity of the SWT flat toolbar RC style
+<br>118154 	StyledText: setting the caret has no effect
+<br>118227 	StyledText.getBaseline() != StyledText.getBaseline(offset)
+<br>118240 	StyledText.getBaseline(StyledText.getCharCount()-1)) caus...
+<br>118241 	StyledText: getLineHeight(int) and getBaseline(int): code...
+</blockquote>
+
+<h2> SWT Build 3.2 015 - Tuesday November 22nd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+93017 	Tiger: Starting Eclipse with Spotlight freezes UI Manager.
+<br>103311 	[build] mozilla and cairo swt libs are not built during e...
+<br>104284 	GTK warnings when setting item count on VIRTUAL Table bef...
+<br>107720 	[build] Request to replace ${ws}, ${os} and ${arch} in fr...
+<br>113005 	Table Header stays depressed.
+<br>116110 	FileDialog hangs SWT Application
+<br>116350 	Transform not being set properly on Linux-GTK
+<br>116683 	Home key doesn't scroll window
+<br>116688 	editor cheese after code completion
+<br>116720 	GLCanvas doesn't set hint for merging mouse motion events
+<br>116845 	Ctrl+End in StyledText does not scroll down enough to rev...
+<br>116855 	StyledText with WRAP and special text draws cheese on Arr...
+<br>116938 	VIRTUAL Tree hangs
+<br>117125 	Tree with columns shows horizontal scroll bar when it sho...
+<br>117174 	Mouse event coordinates broken on Linux-GTK
+<br>117195 	Regression: Shell ignores first mouse-click after dialog ...
+</blockquote>
+
+<h2> SWT Build 3.2 014a - Tuesday November 15th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+116466		AIOOBE in StyledTextRenderer.updateRanges
+</blockquote>
+
+<h2> SWT Build 3.2 014 - Tuesday November 15th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+79894    	Control.update() method is too expensive
+<br>100659 	Dialog displays small sometimes in GTK
+<br>107219 	Redraw problems on resizing Tree column
+<br>112358 	Need a way to create a new Color based on an existing color
+<br>112454 	ColorSelector button does not display correctly when firs...
+<br>113105 	Table widget does not return table item when #getItem(Poi...
+<br>114815 	KeyDown Listener deaf until controls traversed; then focu...
+<br>115229 	SWT.RIGHT on Label with Image causes drawing problems
+<br>115230 	Font smooth does not work in Eclipse Forms
+<br>115628 	[build] GLData.java missing from src.zip
+<br>115667 	Handle leak in TextLayout
+<br>115675 	disappearing checkbox with Windows XP look and feel
+<br>116005 	Cannot type in Text widget in an ON_TOP Shell
+<br>116038 	Need more docs for modal behavior constants in SWT class
+</blockquote>
+
+<h2> SWT Build 3.2 013 - Tuesday November 8th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+47760    	Images that SWT cannot load.
+<br>93380 	[DnD] 100% CPU usage when dragging files in the navigator...
+<br>98282 	Wrapping has strange behavior for long Label with no spaces
+<br>111195 	Doubleclicking between TreeColumns does not resize the co...
+<br>112345 	[LayoutExample] Toolbar replacing another widget causes c...
+<br>112463 	Tree.showColumn doesn't scroll column from left of viewpo...
+<br>113244 	Accessibilty...When using JAWS on a StyledText widget the...
+<br>113802 	Dialogs block the execution of (a)syncExecs
+<br>114632 	ControlExample should show button with both image and text
+<br>115092 	Snippet 203 doesn't use all texts
+<br>115176 	Regression: Disabling tool bar makes separator items disa...
+<br>115229 	SWT.RIGHT on Label with Image causes drawing problems
+<br>115292 	NullPE in Tree#_getItem(TreeItem parentItem, int index)
+<br>115317 	ToolItem's are now (light-)gray in M3
+</blockquote>
+
+<h2> SWT Build 3.2 012c - Tuesday November 2nd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+114533	Editor popup has wrong size
+</blockquote>
+
+<h2> SWT Build 3.2 012b - Tuesday November 1st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+114498	Table doesn't send selection change events anymore when selecting elements with the mouse
+<br>114518	[build] eclipse solaris-motif depends on libm.so.2
+</blockquote>
+
+<h2> SWT Build 3.2 012a - Tuesday November 1st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+112390	[Viewers] JUnit error in JFacePerformanceSuite
+</blockquote>
+
+<h2> SWT Build 3.2 012 - Monday October 31st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+76789 	Table redraw during drag'n'drop
+<br>85069 	[Mac] KERN_PROTECTION_FAILURE on Exit
+<br>87883 	Remove title bar buttons from application-modal dialogs o...
+<br>88724 	Provide 'since' javadoc in snippets
+<br>92341 	DCR - Add SWT.VIRTUAL style to Tree widget
+<br>98511 	Treeviewer doesn't de-select child when parent is closed
+<br>100668 	Mac only: redraw bug which occurs when switching views
+<br>101331 	GC.drawFocus not implemented on the Mac
+<br>104973 	Unhandily Workaround in Text.getCaretLocation ()
+<br>110951 	Combo.setItem(int, String) does not preserve the selectio...
+<br>111303 	Cannot middle-button paste to rxvt from Eclipse
+<br>111798 	Text#getCaretLocation() replaces selected text by " " iff...
+<br>113172 	SWT Label widget trancates the text if it contains a lo...
+<br>113204 	Text widget bleeds outside SashForm
+<br>113895 	pango_layout_context_changed called too often
+<br>113971 	Test failures in Tree on N20051027-0010
+<br>114039 	Table.computeSize returns bogus Point.y values under Win3...
+<br>114139 	Bad colours for text in the plugin.xml editor
+</blockquote>
+
+<h2> SWT Build 3.2 011 - Tuesday October 25th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+34612    	scroll problem in tree, table, and list
+<br>35909 	Table HIDE_SELECTION behaviour not implemented
+<br>41466 	Panther: Check and Radio ToolItems don't use correct look
+<br>51736 	[JUnit] TreeItem test cases failing
+<br>68657 	JUnit test fails for Image.setBackground
+<br>76804 	Improve SWT performance over GTK window system
+<br>85539 	[JUnit] GC.copyArea test cases failing
+<br>89687 	computeSize(-1, -1) wrong for Text with SWT.Wrap.
+<br>91388 	Tiger: 1 pixel line drawn over scrollbars
+<br>94370 	SWT crashes with KERN_PROTECTION_FAILURE on mac
+<br>94629 	Clipped text fields in project info page
+<br>96839 	CCombo visible above neighbouring areas while scrolling ...
+<br>100035  Eclipse loses its dock icon when dock restarted
+<br>100696 	Keyboard fails on MacOS X
+<br>102088 	Text with CENTER has too much logical space
+<br>109215 	Moveable table column and DND feedback clash on MacOS X
+<br>109951 	Mac: Menu Highlight Cheese
+<br>109952 	Mac: Menu Cleared After Shell Restored From Dock
+<br>111973 	Default Dialog font on Mac OS X not good for DBCS languages
+<br>112116 	Antialiasing causes incorrect drawing
+<br>112403 	window dimensions are tiny
+<br>112994 	auto hook up simple widget relations for screen readers
+<br>113100 	Button size test failures in org.eclipse.ui.tests
+<br>113485 	Don't flush X exposes for a SMOOTH Sash
+</blockquote>
+
+<h2> SWT Build 3.2 010 - Tuesday October 18th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+32471    	Disabled text field does not show as ghosted
+<br>34513 	Text has a horizontal scrollbar when not required
+<br>41306 	Border draws through fast views
+<br>41467 	Panther: Switch to HIViews and Compositing mode
+<br>43920 	Clipping problems
+<br>51749 	List flashes
+<br>57723 	BIDI: StyledText bug when changing the color of bold text
+<br>62908 	ScrollBars flash when Text widget created
+<br>64997 	label cheese when dialog layout changes.
+<br>66980 	Custom Combo: changing any option while the component is ...
+<br>70587 	[Perspectives] java perspective does not repaint on occasion
+<br>74574 	Property Dialog > Info Page: layout broken
+<br>82021 	BIDI:when searching for a substring of an Arabic word the...
+<br>85775 	Focus painted outside of the visible area of scrollable.
+<br>89687  	computeSize(-1, -1) wrong for Text with SWT.Wrap.
+<br>89696 	Bad painting when eratically scrolling compare editor
+<br>94629   Clipped text fields in project info page
+<br>99266 	[Viewers] Bogus empty rows at the beginning of a table
+<br>102525 	Button in a toolbar not sized correctly
+<br>104041 	[browser]browser.execute() fails when Acrobat Reader v7 i...
+<br>108635 	Text widget in MAC OS X doesnt paint to GC
+<br>108943 	Dragging table column sashes left to right leaves pretty ...
+<br>111910 	Regression: Empty unusable dialogs on Redhat 8+9 / gtk-2....
+<br>112336 	StyledText is still misbehaving
+</blockquote>
+
+<h2> SWT Build 3.2 009a - Tuesday October 11th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+NoPr	Text issues on the Mac, compile error on Photon
+</blockquote>
+
+<h2> SWT Build 3.2 009 - Tuesday October 11th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+13813   API request: notification when OS system colors change
+<br>22000 	GTK: Menubar is not accounted for in computeTrim().
+<br>51480 	JUnit tests for Browser are printing to console
+<br>71348 	Can't listen Excel events
+<br>75390 	[browser] download not working on the mac
+<br>93763 	Clicking on the button frame does not activate toolitem's...
+<br>110346 	Text widget does not trigger SWT.DefaultSelection events ...
+<br>110559 	Pressing Cmd+Q twice crashes application
+<br>110923 	TableItem.setImage does not redraw the item
+<br>111751 	[OpenGL] No GLData class found when running examples
+<br>111762 	JVM dump in SWT native method
+</blockquote>
+
+<h2> SWT Build 3.2 008 - Tuesday October 4th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+33967  	DCR - Image AND Text Button support when avalaible
+<br>85962 	Internal browser maintains session after window is closed
+<br>88958 	DirectoryDialog and FileDialog bring CPU utilization to 100%
+<br>90116 	[build] pkg-config arguments passed to ld and not gcc
+<br>98296 	Browser in BrowserExample opens too small
+<br>102097 	[build] build.sh uses hardcoded AWT_LIB_PATH
+<br>103894 	browser fail to hyper link to another page
+<br>109431 	ArrayIOB in Tree.wmNotifyChild
+<br>110342 	SWT Example Launcher: Double-click on "Standalone" folder...
+<br>110531 	VM crashes when creating an Image after rotation
+<br>110734 	Warnings about XCreateColormap
+<br>110753 	gdk_region_get_rectangles leaks
+<br>110767 	java.lang.NoSuchMethodError: XErrorProc when setting Disp...
+<br>110949 	link error in GC.setClipping(x, y, w, h) on pocket pc
+<br>111157 	TreeItem.setBackground doesn't work
+<br>111284 	Crash in TreeSelection - Event
+</blockquote>
+
+<h2> SWT Build 3.2 007 - Tuesday September 26th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+37709 	Support OpenGL
+<br>50646 	CTabFolder tooltips are not read out
+<br>74095 	SWT_AWT X error with JadeDisplay integration
+<br>104407 	Right click on Tree does not honor the SWT.FULL_SELECTION...
+<br>108921 	Tree with lines visible not painted correctly
+<br>108949 	[browser] javascript alerts are not shown
+<br>110432 	atk_object_factory_create_accessible errors
+</blockquote>
+
+<h2> SWT Build 3.2 006d - Wednesday September 21st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+110057	[browser] crash whenever a Browser is disposed
+</blockquote>
+
+<h2> SWT Build 3.2 006c - Monday September 19th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+110073	perspective button goes blank after closing perspective
+</blockquote>
+
+<h2> SWT Build 3.2 006b - Monday September 19th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+99266	[Viewers] Bogus empty rows at the beginning of a table
+</blockquote>
+
+<h2> SWT Build 3.2 006a - Monday September 19th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+NoPR    	Compile fixes for 64-bit
+</blockquote>
+
+<h2> SWT Build 3.2 006 - Monday September 19th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+101750    	[Browser] Clicking on link to PDF file does nothing
+</blockquote>
+
+<h2> SWT Build 3.2 005 - Tuesday September 13th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4572    	Need support for tool tips in table columns (1GBZLD1)
+<br>34184 	Native Tree: No tooltips
+<br>46387 	Patch for saving animated GIFs
+<br>87503 	implement OSX opengl binding
+<br>87577 	GC.drawImage() with rescaling does not optimize clipped d...
+<br>97597 	Tree is not showing lines
+<br>101204 	[consistency] MouseDown fired while using Scrollbar in Table
+<br>102952 	Foreground color gets lost when painting a Path
+<br>105772 	Strange background color of label on text search page
+<br>106289 	Blurry Tree text in second column
+<br>106498 	creating Tree column 0 causes drawing problem
+<br>107243 	Scrollbar.setValues silently does nothing
+<br>107684 	Resetting of clipping region does not work if gc.setTrans...
+<br>108060 	Extra non-functional horizontal scroll bar in TreeViewer
+<br>108190 	Combo doesn't produce modification event for ALT-DOWN
+<br>108315 	GC.setAdvanced() destroys clipping
+<br>108331 	Usign internal web browser to access basic auth protected...
+<br>108423 	GC.drawArc doesn't work correct with Cairo
+<br>108511 	Eclipse crashes when open html file renamed
+<br>108706 	GC.drawRoundRectangle() doesn't work if Cairo is initialized
+<br>108796 	Please make FormAttachment() public
+<br>108865 	SWT.DOUBLE_BUFFERED + GC.drawFocus() equals cheese
+</blockquote>
+
+<h2> SWT Build 3.2 004 - Tuesday August 30th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+34159    	[Tasks] First three columns of Task List too wide w/nativ...
+<br>37959 	Select on hover selects when mouse is in scrollbar
+<br>60309 	TextLayout.getBounds.height not right when the text termi...
+<br>65729 	TextLayout.getOffset is not working when using '\n'.
+<br>67066 	Table "lines visible" flag does not work
+<br>80490 	The SWT browser widget doesn't work with input field type...
+<br>81567 	[PropertiesView] Properties View scrolling problem
+<br>96339 	Next Editor causes crash when remapped to Ctrl-Tab
+<br>97597 	Tree is not showing lines
+<br>101204 	[consistency] MouseDown fired while using Scrollbar in Table
+<br>105622 	ToolItem.setText("") should remove Text and return to ini...
+<br>105772 	Strange background color of label on text search page
+<br>106494 	creating Table/TreeColumn makes existing item disappear
+<br>106502 	setting Table column alignment does not visually update
+<br>106511 	Cannot set text selection in VerifyListener.verifyText
+<br>106928 	JVM terminates when closing web broser with Command W on ...
+<br>107777 	[browser] crash when accessing password-protected site
+</blockquote>
+
+<h2> SWT Build 3.2 003 - Tuesday August 23rd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+89183    	Image in any table column header creates indent in first ...
+<br>92636 	[Browser] Clicking in web browser (editor) does not dismi...
+<br>100665 	Add Resource.getDevice()
+<br>104380 	Text with WRAP - Compute fails
+<br>105494 	setting image in TreeItem column 1 affects its future col...
+<br>106006 	[Contributions] NullPointerExceptions in MenuManager.update
+<br>107123 	Alpha values on GC are not applied to Images on Windows
+<br>107324 	Recent changes causing a VM crash
+<br>107329 	AIOOBException caused by Tree.setRedraw()
+<br>107452 	[browser] fires 2 keyUp events
+</blockquote>
+
+<h2> SWT Build 3.2 002a - Thursday August 18th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+107112 	Closing an editor adds "Widget is disposed" error to the ...
+</blockquote>
+
+<h2> SWT Build 3.2 002 - Tuesday August 16th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4416    	Widget tree should be valid during a dispose event (1FF1DJ4)
+<br>4862 	Check for isDisposed() in dispose after sending Dispose C...
+<br>64107 	Items in bad state in dispose callback
+<br>89183 	Image in any table column header creates indent in first ...
+<br>90447 	AIOOB when creating TreeItems in TreeItem.dispose() callback
+<br>90478 	TreeItem.dispose callback provides opportunity for Tree h...
+<br>92013 	DCR - Need SWT.VERTICAL style for CoolBar
+<br>94896 	Browser.setText() fires an unexpected url
+<br>104380 	Text with WRAP - Compute fails
+<br>104589 	Crash while running JFace test suites
+<br>106289 	Blurry Tree text in second column
+<br>106536 	TableItem.getBounds - small inconsistencies
+<br>106542 	showing/hiding column sort arrow should recompute display...
+<br>106543 	64-bit problem in Cairo
+<br>106601 	Typo in SWT makefile
+<br>106640 	Failures running the JFace suites
+<br>106647 	VM crash in TableItem dispose
+<br>106730 	Rendering problems on Customize Perspective dialog
+<br>106759 	SWT doesn't build against newest Cairo versions
+<br>106851 	NPEs caused by recent Tree changes
+<br>107048 	Path.moveTo draws lines
+<br>107145 	Javadoc can not refer to package protected methods
+</blockquote>
+
+<h2> SWT Build 3.2 001c - Wednesday August 10th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+NoPR  Sort indicator stuck up on Windows
+</blockquote>
+
+<h2> SWT Build 3.2 001b - Monday August 8th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+45708  NPE in Table.releaseWidget
+<br>59537 [Workbench] Accessibility: Minimize and Maximize icons in...
+<br>105133 mouse wheel scrolling in editor moves scrollbar thumb but...
+<br>105591 Problems setting and updating an Image on a Label
+<br>105849 SWT bugs: GDI Handles leak
+<br>106058 Antialiasing memory leak
+</blockquote>
+
+<h2> SWT Build 3.2 001a - Tuesday August 2nd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+70599 	Unexpected tooltip behaviour of Combo control
+<br>80798 	setToolTipText() method of org.eclipse.swt.widgets.Combo ...
+<br>96053 	Spinner: Pressing buttons should focus spinner and select...
+<br>96916 	Spinner.setToolTipText() doesn't work
+<br>99145 	Link widget only disables link, not text
+<br>103465 	Need better documentation of SWT event types.
+<br>103973 	GC Transform not applied to drawImage()
+<br>104301 	Support discovery of AWT Frames by walking the Widget hie...
+<br>104966 	Link displays as enabled when setText called after setEna...
+<br>104992 	List control bug [cheese when resizing]
+<br>105132 	Image flashing when using a Tree in a themed TabFolde
+<br>105213 	moveBelow(null) does not adjust z order
+</blockquote>
+
+<h2> SWT Build 3.2 001 - Tuesday July 26th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+18607 XP Look and Feel - 3D border appearance on some widgets d...
+<br>24538 TabItem controls should use the TabFolder to paint their ...
+<br>38948 caculate table height not possible
+<br>42475 Add LEFT/CENTER/RIGHT to ControlExample Text tab
+<br>43192 Add sort indicator (e.g. arrow) in TableColumn
+<br>45895 [browser] get NPE when calling browser api from within di...
+<br>49065 Table widget flicker
+<br>51995 SelectionEvent not getting detail info for scrollbar events
+<br>69374 Crash in SWT Accessible / org.eclipse.swt.internal.ole.wi...
+<br>74095 SWT_AWT X error with JadeDisplay integration
+<br>77194 MsgBox is not centered on screen on Solaris, ok in win32 ...
+<br>80465 XP theme - label issues with tab folder
+<br>85389 [preferences] Changing Code Formatter tab width does not ...
+<br>86018 TreeColumn should support moveable headers
+<br>92313 Virtual table: flashes on clear
+<br>92342 Tree widget: make TreeColumns reordable
+<br>94429 Group label doesn't fire mouse events
+<br>94502 Redundant check for the pointer coordinates
+<br>99524 Display.eventProc reads a GdkEventButton when GdkEventAny...
+<br>99746 Table and Tree column resize line matches foreground color
+<br>99761 pressing down arrow selects tool item
+<br>100387 CTabFolder creates and disposes a Shell on every MouseHover
+<br>100741 Unused variable in ScrollBar.java
+<br>101093 [browser] crash when setting html as url
+<br>101534 No navigation by typing in VIRTUAL Table
+<br>101799 Enabling advanced graphics will cause alpha gradient to b...
+<br>101839 support MacOS command line option "-Xdock:name=<applicati...
+<br>102080 Unused variables in GC.java
+<br>102165 ImageLoader closes OutputStream on save
+<br>102272 Repainting a double-buffered canvas may cause pixel corru...
+<br>102313 disposing first column of reordered Tree changes items
+<br>102481 Pattern doesn't make a gradient
+<br>102543 Height of MenuItems differs when using Icons and Text com...
+<br>102617 Table right mouse double click registers as left mouse click
+<br>102794 GridLayout has change behaviour between 3.0.2 and 3.1
+<br>102830 Junit test of TableColumn (test_setTextLjava_lang_String...
+<br>102952 Foreground color gets lost when painting a Path
+<br>103187 Support gradients with alpha
+<br>103238 TrayItem obscures KDE's gradient
+<br>103349 Scale widget switches focus when setting background
+<br>103431 JavaDoc for Composite.getChildren() is wrong
+<br>103436 Performance of selection in a multi-select table
+<br>103571 Image in table header gets corrupted
+<br>103603 ImageData getPixel operation
+<br>103627 Text#getCaretPosition() returns wrong value for non-zero ...
+<br>103642 resetting clipping path doesn't work when transforms are ...
+<br>103934 Table.getItem(Point) uses incorrect calculation on Motif
+<br>103937 Motif: Resizing a column in a large virtual table is extr...
+<br>103939 On Motif: In a large virtual table Table.removeAll() is ...
+<br>104509 reducing VIRTUAL Table's item count can show drawing problem
+</blockquote>
+
+<h2> SWT Build 3.1 038i - Monday June 27th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+101795   GC.fillGradientrectangle() with GDI+ causes crash
+</blockquote>
+
+<h2> SWT Build 3.1 038f - Thursday June 23rd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20448   Text Widget Javadoc for Text limit
+<br>41346 	Javadoc: add a note about the order of getSelectedIndices...
+<br>49674 	DND.FEEDBACK_INSERT_BEFORE and DND.FEEDBACK_INSERT_AFTER...
+<br>78634 	ImageData.getTransparencyMask - incorrect javadoc or impl...
+<br>84681 	The specifications for some methods should describe the b...
+<br>84891 	In the specifications some methods do not describe their ...
+<br>84906 	We found some typos or broken links.
+<br>84911 	Unspecified methods
+<br>86562 	Can Widget.getDisplay() be called from a background thread?
+<br>99348 	Java doc for Decorations.setImages(Images[] images) does ...
+<br>100663 	[64] Links do not paint
+<br>100699 	Widget.setKeyState reads from memory which has been freed
+</blockquote>
+
+<h2> SWT Build 3.1 038 - Friday June 16th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+98845 Crash when a Combo disposed on FocusOut
+<br>99376 TableColumn has width=0 and second column missing
+<br>99534 ImageList leaks a pixbuf if an image added multiple times
+</blockquote>
+
+<h2> SWT Build 3.1 037i - Friday June 16th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4805 resize during setRedraw causes cheese (1GJ4URX)
+<br>96479 SWTMessages.properties missing from source zip
+<br>97170 [About] Eclipse logo not rendered correctly in about dial...
+<br>97625 Intro Test A.4 Eclipse crashed.
+<br>99266 [Viewers] Bogus empty rows at the beginning of a table
+<br>99518 Extremely jumpy resizing in the ControlExample
+<br>99525 TextLayout.getLineOffsets() leaks a pango iter
+<br>99527 Dialog size problems when using the ion window manager
+<br>99535 FontDialog leaks a string
+<br>99541 Cursors not disposed in SWT FileViewer example
+<br>99561 GDI+ crash with icons where width > height [was: GEF pain...
+<br>99636 [browser] browser contents become excluded from tab order
+<br>99745 Tray doesn't support image with alpha
+<br>99756 paint example is missing view icon
+<br>99936 [browser] nsIRequest has some incorrect method signatures
+<br>100040 Slowdown between 3.1 RC1 and N20050602 due to change to I...
+<br>100199 Display.asyncExec() can hang Windows
+</blockquote>
+
+<h2> SWT Build 3.1 037g - Friday June 10th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+99341 GDI leak in Label with transparent images (png, gif)
+</blockquote>
+
+<h2> SWT Build 3.1 037f - Friday June 10th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+98802 Focus cannot be given to visible but zero-sized controls
+<br>98894 Shell.setImages() should be smarter
+<br>99167 Hover Event fired continiously although Mouse not moving
+</blockquote>
+
+<h2> SWT Build 3.1 037c - Thursday June 9th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+96212 org.eclipse.ui could not be found.
+<br>96679 OutOfMemory Exception from corrupted clipboard?
+<br>99109  ComputeSize on Link gives different results when calling two times in a row
+</blockquote>
+
+<h2> SWT Build 3.1 037 - Thursday June 9th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+77611  [browser] IE shows warning dialog when JS error occured  
+<br>89397  Compile warnings when compiling libswt-gtk-XXXX.so  
+<br>91547  Insertion line in TreeViewer does not show up during drag...  
+<br>93724  Drag-and-drop creates signal names every time  
+<br>94210  Multiple expansion broken in trees  
+<br>96042  computeTrim() is not returning the correct value  
+<br>96525  Painting a translucent image fails when the GC is mirrored  
+<br>96723  Table not shown when there are no rows initially  
+<br>96873  Icons in toolitem are mirrored on mirrored toolbar  
+<br>97011  Custom Table font is not applied to first column header  
+<br>97046  PNG images look corrupt as main window icon  
+<br>97177  [misc] Chinese IME status lost  
+<br>97340  MouseEnter not fired when scroll bar released  
+<br>97370  gnopernicus no longer reads custom widgets in eclipse  
+<br>97651  tree insert mark cheese  
+<br>97659  TreeColumns don't fire ControlEvents on dispose() [win32]  
+<br>97668  Chevron not always showing in Perspective Switcher  
+<br>97678  SashForm - can lose sash for item on far right  
+<br>97686  AIOOB when removing non-existent TableItem by index  
+<br>97696  ToolItem with image is blank or shows cheese  
+<br>97697  CCombo - drop down list appears in wrong place  
+<br>97725  GTK - Layout Example table editor combo in wrong place  
+<br>97743  [portability] Drag Tool Turns Off on Linux  
+<br>97745  Table column header stays pressed if mouse button release...  
+<br>97762  Hiding redraw window before destroying it  
+<br>97813  height of Text widgets for SWT/GTK differs from native GT...  
+<br>97903  problem in features Plateform and Plateform Plug-in Devel...  
+<br>97915  Table.remove(int) can change selection  
+<br>97931  Coolbar fails to show contents until resized  
+<br>97978  Table/TreeColumns don't fire ControlEvents on dispose() [...  
+<br>97981  Focus given to the Eclipse window while the preferences d...  
+<br>97985  Snippet144 (Virtual Table) slow on the Mac  
+<br>97992  javadoc warnings in RC1  
+<br>98024  Open type dialog skips over too much  
+<br>98156  Images not appearing on menus, or when painted  
+<br>98383  Linux AMD64 missing org.eclipse.swt.gtk.linux.x86 3.1.0 h...  
+<br>98439  Pixel corruption when using clipping on a double-buffered...  
+<br>98802  Focus cannot be given to visible but zero-sized controls  
+</blockquote>
+
+<h2> SWT Build 3.1 036 - Thursday May 26th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+26902:  GTK: mouse wheel doesn't work on the compare editor  
+<br>64393:  Forgot to close <code> tag in SWT javadocs  
+<br>77540:  typo in import org.eclipse.swt.custom.StyledText.setOrien...  
+<br>77617:  Brief "page not found" message on startup  
+<br>81064:  [Browser] HTML set via setText() not showing in most cas...  
+<br>82169:  In console pane, cannot click "Terminate" and then "Remov...  
+<br>85645:  Typeahead broken for Table and Tree  
+<br>89378:  Combo default size too small with certain fonts  
+<br>89574:  In the task bar, the Eclipse window is called "TopLevelSh...  
+<br>89720:  Crash closing dialog when IM is open (IIIM)  
+<br>90246:  StyledText draws cheesy if the caret is invisible  
+<br>92105:  BIDI3.1: Mixed Arabic and English text is viewed incorrec...  
+<br>92352:  DBCS3.1:can't input CHT strings after press Enter while x...  
+<br>92629:  Table.setSelection does nothing if there is a TableColumn   
+<br>94437:  add "Columns Reorderable" checkbox to ControlExample's Ta...  
+<br>94595:  eclipse gtk doesn't set X window name  
+<br>94598:  DBCS3.1:Eclipse hangs when activate IIMF input in search ...  
+<br>94946:  FileDialog should inherit image from parent shell  
+<br>95116:  can create Shell with disposed parent Shell  
+<br>95756:  Tables don't repaint  
+<br>95825:  GTK warnings when using a virtual table  
+<br>96090:  Popup menu doesn't work when dialog opened via short cut  
+</blockquote>
+
+<h2> SWT Build 3.1 035c - Friday May 13th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+93526: SWT Browser crashes on MacOS
+</blockquote>
+
+<h2> SWT Build 3.1 035b - Friday May 13th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+95035: Can't Launch Eclipse on Windows 98
+</blockquote>
+
+<h2> SWT Build 3.1 035a - Thursday May 12th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+88463:  No hover help in java editor  
+</blockquote>
+
+<h2> SWT Build 3.1 035 - Thursday May 12th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+94421: NPE showing a CoolBar's dropdown
+<br>94467: Table layouts which only lay out once are giving bogus sizes
+<br>94835: Buttons with characters that start with a line are cut off in right to left
+<br>94815: Decorations.setDefaultButton() does not check for null
+<br>94784: Java search can't be changed
+</blockquote>
+
+<h2> SWT Build 3.1 034 - Tuesday May 10th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+31066:  Button widget does not support images with transparent color.  
+<br>71228:  Program.findProgram("html") returns null when there's no default command  
+<br>71234:  Program.execute mangles URLs  
+<br>72784:  Close override redirect while opening another loses focus forever  
+<br>75148:  Mac launcher: improve Dock icon and application name support
+<br>76628:  Eclipse crashed JVM when CVS protocol not set correctly  
+<br>79268:  Program API does not work with GNOME 2.8 (libgnomevfs-WARNING)  
+<br>79631:  [CTabFolder] Min / Max buttons are hidden when last item closed  
+<br>80564:  Image transparency not always handled correctly (case #1)  
+<br>80567:  Image transparency not always handled correctly (case #2)  
+<br>83564:  [SashForm] Sash no longer moveable when one weight is very tiny  
+<br>84219:  List.showSelection() scrolls list although item already visible  
+<br>87051:  NPE in file dialog when trying to open a file with a wierd name.  
+<br>87636:  ArrayIndexOutOfBoundsException TreeItem.setImage()  
+<br>88030:  Table and SWT.CHECK: Check not visible on selection  
+<br>90462:  add fragment org.eclipse.swt.gtk.linux.ppc  
+<br>90938:  GC.setLineStyle produces inconsistent dash for width equal 1  
+<br>91159:  [Consistency] DropTarget event.dataType field not alwys set on DragEnter  
+<br>91672:  CTabFolder performance improvements  
+<br>92181:  Bogus CTabFolder tab sizes  
+<br>92612:  CTabFolder hidden tabs count (in chevron) can become 0  
+<br>93106:  GB18030: Copy GB18030 char outside of editor to editor will get unicode encoding shown.  
+<br>93349:  Support alpha transparency in Shell images  
+<br>93382:  Use canonical signal names  
+<br>93387:  console hijacks SWT event thread when selecting binary content  
+<br>93391:  Eclipse 3.0.1 PLATFORM CRASH. JVM termination exit code 1 on SuSE 8.2 Linux x86 gtk on "Eclipse Overview"  
+<br>93501:  ToolBar.computeSize is returning a much wider width than it used to  
+<br>93664:  TRAVERSE_RETURN closing a dialog cannot be suppressed in a combo box  
+<br>93691:  Program.findProgram("html") fails with Firefox as the default browser  
+<br>93759:  Can't drawPath on image GC  
+<br>93848:  Label not wrapping  
+<br>93870:  [Import/Export] Usability problem with the Import > Existing Project into Workspace  
+<br>94003:  Cannot update a button image using a GC if the image is set before creation  
+<br>94132:  ClassCast exception in FillLayout.computeChildSize  
+<br>94202:  Activate event not fired when ON_TOP window hidden  
+</blockquote>
+
+<h2> SWT Build 3.1 033 - Tuesday May 3rd, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+33313:  [JUNIT] Combo remove fails  
+<br>33821:  Header of native table doesn't show images  
+<br>38415:  remove() function in combo behaves inconsistently (BBAWT)  
+<br>45793:  Panther: Initial Combobox contents not visible  
+<br>63266:  Native platform icons look junky  
+<br>65806:  [misc] TextViewer.revealRange very slow for long ranges  
+<br>67400:  Editable combo-box misses out the first two characters until focus is given  
+<br>80463:  EC: CoolBar height < Combo height  
+<br>83097:  Dialog opens with no contents; resizing shows contents  
+<br>83905:  No way to center tool items on a vertical toolbar  
+<br>84632:  hiding Tree header can leave cheese  
+<br>85862:  [consistency] TreeEvent fired upon disposal of TreeItems  
+<br>86201:  Output in consol causes Eclipse to crash  
+<br>86214:  GTK caret location gets hammered after being set in verify event  
+<br>86830:  org.eclipse.swt.graphics.GC: Transform has no effect to images with transarent colors like GIF/PNG  
+<br>87477:  Eclipse on Linux-Motif requires GLIBC_2.3  
+<br>87822:  GC.drawString ignores transparency boolean when alpha is used  
+<br>89239:  Painting problems using latest builds  
+<br>90115:  swt-mozilla.zip source file puts xpcom.cpp in library/ subdirectory  
+<br>90303:  turn off caret blink  
+<br>91302:  (regression) Transparency is not transparent in remove button on progress view item  
+<br>91441:  Default button flickers in "Replace with Uncommitted Changes" dialog.  
+<br>92318:  ViewForm.set* triggers a layout  
+<br>92505:  Creating a GNOME icon theme is slow  
+<br>92541:  Tree items do not animate as they expand  
+<br>92616:  event doit=false does not work for Combo on Mac.  
+<br>92648:  Tree,setTopItem can end up setting the wrong number  
+<br>92844:  Increase scrolling speed based on distance from the widget  
+<br>92864:  [api] construction notices in GC, Pattern, etc.  
+<br>92883:  Lines are misaligned (antialiased)  
+<br>92964:  Launcher should have no pixmap background under X  
+<br>93058:  Form Layout behaviour has changed between 3.0 and 3.1  
+<br>93151:  TableItem.computeDisplayText does not check to see if index is greater than string  
+<br>93158:  SWT fingerprints and assertions use CPU time cf. elapsed process  
+<br>93222:  Setting a cursor only needs a flush, not a sync  
+<br>93255:  [Contributions] Vertical separator where horizontal was expected  
+<br>93266:  setBackground of text redraw incorrect with xp style  
+</blockquote>
+
+<h2> SWT Build 3.1 032 - Tuesday April 26th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+41772:  DBCS: DBCS copy and paste for OpenOffice failure  
+<br>50598:  Some focus events are reported twice  
+<br>55382:  setAccelerator(-1) on MenuItem shows error on Linux  
+<br>68478:  Another variant of the SWTError: no more handles  
+<br>69381:  Call to new_Shell results in "No more handles" error  
+<br>69701:  Printer doesn't stretch B&W images created by code.  
+<br>80762:  Interactive text selection lags on Linux-GTK+  
+<br>81298:  NPE changing style on SashForm in CustomControlExample  
+<br>85426:  Table not getting expose events when partially obscured by another window  
+<br>85525:  mnemonics are not working  
+<br>87294:  Strange clipping when scaling and rotating drawText  
+<br>88059:  Line Width of 0 is invisible on the Mac  
+<br>88717:  [DND] Tree is scrolling very slow when dragging an Item to the Bottom  
+<br>90192:  ON_TOP setVisible(true) focus issues on parent of child shell.  
+<br>91060:  linux copy-paste chinese to StyledText problem  
+<br>91254:  [encoding] DBCS3.1: bogus DBCS in editor after re-activation  
+<br>91350:  [Browser] Embedded browser fails to handle link to text file  
+<br>91464:  [content assist] NPE in CompletionProposalPopup  
+<br>91733:  MenuItem.setText doesn't check if it matches the existing text  
+<br>91807:  Context menu shows twice in combo box.  
+<br>92017:  Support very large Image on Windows platform  
+<br>92046:  Pen leak in TextLayout#draw(...)  
+<br>92186:  Virtual table: not redrawn when item count drops to zero  
+<br>92228:  Layout occurs while creating table columns, causing AIOOBEs  
+<br>92230:  Inconsistent Button focus events between platforms  
+<br>92382:  Text in table not updated on clear  
+<br>92583:  Hidden files shown by default in GtkFileChooser  
+</blockquote>
+
+<h2> SWT Build 3.1 031 - Tuesday April 18th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4537:  DCR Ability to paint with a brush pattern (1G0I8BE)  
+<br>4621:  CCombo never fires keyboard events (1GB76BP)  
+<br>4742:  DCR: Useful features, idioms and documentation missing from GC (1GFWCUO)  
+<br>7075:  DCR - Rendering hints on GC - anti alias / mitre  
+<br>12723:  Windows XP Icon format not supported  
+<br>20723:  Discrepencies in Table behaviour across platforms  
+<br>23621:  Image scaling gives poor results on Windows  
+<br>28533:  Table - no focus indicator  
+<br>34826:  Eclipse crashes - stack trace shows GP inside tree  
+<br>35341:  Way to disable font smoothing for editors on MacOS X  
+<br>35670:  FontMetrics.getAscent() returns the wrong value  
+<br>37500:  Feature request: SWT Project creation wizard  
+<br>38973:  Need Control.getMonitor (or Widget.getMonitor)  
+<br>40985:  Draw vertical Text or rotate graphics.  
+<br>41160:  ImageLoader has repeatCount of 0 for animated gifs  
+<br>41774:  DBCS: DBCS named file drag&drop failure on GTK  
+<br>42155:  ControlExample - Toolbar SWT.VERTICAL leaves wrong separator  
+<br>48781:  cursors of size 16 look wrong  
+<br>56094:  tracker resize uses screen coordinates instead of control  
+<br>56718:  SWTException and SWTError should use standard 1.4 exception nesting  
+<br>62817:  FileDialog: getFileName does not returns extension  
+<br>64590:  [browser] widget not sized properly  
+<br>66882:  altgr keys not available  
+<br>68679:  minor changes to make_gtk.mak to allow build with installed mozilla  
+<br>68867:  ImageData - remove ImageLoader dependencies  
+<br>69350:  Accessibility : Group title is not taken into account by Window-Eyes 4.5  
+<br>73536:  Eclipse 3.0.1 RC2 source build does not contain latest org.eclipse.swt.tools  
+<br>76456:  Eclipse 3.0.1crashes on HP-UX with a NullPointerException when starting up  
+<br>77055:  Log stacktrace not helpful for SWTException and SWTError  
+<br>80150:  [plan item] [launcher] Support for launcher branding  
+<br>81242:  [JUnit] GP in Clipboard.getContents  
+<br>81691:  Tracker with SWT.Resize really slow  
+<br>82594:  Request support for alpha channel in Color  
+<br>82719:  Request for affine transformation API  
+<br>83472:  Request for API to check for double buffering support  
+<br>83933:  Check and Radio Buttons with image do not use XP style  
+<br>84532:  [browser] Javadoc hover stays on top when it has focus  
+<br>84673:  [browser] amd64 problem  
+<br>84740:  crash on windows xp korean  
+<br>85312:  combo is cut off when added to ToolBar  
+<br>85736:  [browser] SWT Errors on RH 3.0 When Mozilla Security Patch mozilla-1.4.3-3.0.7 installed  
+<br>86193:  Java WebStart: SWT Browser cannot find libxpcom.so: cannot open shared object file: No such file or directory)  
+<br>86608:  Do not understand Javadoc of Link.setText()  
+<br>86631:  Javadoc wrong for Image(stream)  
+<br>86741:  Pressing backspace in browser widget shows navigation cancelled page  
+<br>87882:  No default contextual menu item on Mac  
+<br>88133:  Slow rendering with images with transparancy bit set  
+<br>88839:  Embedded Swing: Enter key does not work  
+<br>89547:  SWT bundle manifest files use deprecated syntax  
+<br>89681:  Link widget missing last word at preferred size.  
+<br>89779:  NPE in CCombo.dropDown()  
+<br>89911:  Missing gtk_tree_view_column_get_fixed_width on amd64  
+<br>90152:  resizing Label flashes  
+<br>90222:  Device constructor  
+<br>90258:  Table item not updated when item count == 1  
+<br>90899:  Using PaintListener on Table destroys repainting (Button is the same case)  
+<br>90946:  gtk_entry_set_text crashes when passed a zero-length buffer  
+<br>91019:  SWT Rendering Problems  
+<br>91070:  Cannot self-host eclipse  
+<br>91089:  SWT Snippet 77 For Table Col resize has an error in it (fix included beklow)  
+<br>91252:  View toolbars are showing with black backgrounds  
+<br>91423:  Fixed size columns used even if fixed_height_mode not supported  
+<br>91435:  Ctrl+SPACE is not a valid keybinding assignment for actions on native widgets  
+<br>91456:  platform-launcher: eclipse.c won't compile on BSD (Mac) because of macro clash  
+<br>91468:  GTK+ 2.2 requests data from non-visible rows of a VIRTUAL table  
+<br>91475:  M5 Selecting TreeColumn does not create an SWT.Selection Event on Mac OS X  
+<br>91511:  Directory Dialog - Selection string not externalized?  
+<br>91555:  Table not visible  
+</blockquote>
+
+<h2> SWT Build 3.1 030 - Tuesday April 11th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4746:  DCR: TreeItem needs removeAll() method (1GG0NL0)  
+<br>11178:  Pressed & disabled toolbar button looks enabled  
+<br>48443:  Property sheet does not repaint  
+<br>53390:  NPE changing perspectives  
+<br>56223:  Display filters do not work in compound native widgets  
+<br>64219:  GeometricalTransformation  
+<br>65192:  org.eclipse.swt.Browser.addHelpListener does not work after the setUrl method is called  
+<br>67529:  Window->Preferences->Help crashes Eclipse  
+<br>78459:  Platform differences setting size while shell is maximized  
+<br>80204:  Checkbox in Tree or Table ignores second click of double click  
+<br>81263:  [CustomControlExample] CCombo caret moves at random when up and down arrows are press  
+<br>83308:  KDE integration causing crashes on KDE 3.3.2  
+<br>83731:  (javadoc update) WindowEvent location and size fields are in terms of shell size, not browser control size  
+<br>84110:  workspace lost  
+<br>84773:  [launcher] icon not being used in error window  
+<br>85117:  Selected and disabled tool item looks enabled  
+<br>85537:  [JUNIT] Display.map test cases failing  
+<br>87037:  [browser] charset/xml Intro question  
+<br>87113:  First TableColumn with style SWT.RIGHT draws badly  
+<br>87559:  NPE in TableItem.getText using control example  
+<br>87837:  Strange redraw and disabled behaviour with SWT.CHECK toolitems with and without disabled icons set.  
+<br>87997:  TableEditor.dispose( ) causes NPE if linked Table is being disposed  
+<br>88388:  tree focus cheese  
+<br>88735:  Table.getClientArea() width is inconsistent with win32  
+<br>88827:  Need a distinctive platform filter for GTK / GTK 64  
+<br>88829:  Table.setColumnOrder() may not fire enough Move events  
+<br>89329:  [Viewers] CVS Repositories View: "Pending..." item gets an icon when selected  
+<br>89367:  String is not rendered inside stringExtent  
+<br>89378:  Combo default size too small with certain fonts  
+<br>89483:  [Table] No SWT.Resize when Scrollbars become visible  
+<br>89669:  [browser] F1 does not bring eclipse help content when browser has focus  
+<br>90087:  GC.copyArea causes continuous repainting of Canvas  
+<br>90123:  SWT manifests still use Provide-Package  
+<br>90176:  Scale widget and SWT.PAGE_UP key event  
+<br>90217:  Request: SWT Fragment name to be unique for a given ws/os/arch  
+<br>90223:  Regression: Spinner reports wrong value  
+<br>90282:  SWT.RIGHT not working on Text control on Mac OS X  
+<br>90317:  clicking in Table or Tree first time fires two selection events  
+<br>90326:  Shell realized too early for no reason  
+<br>90366:  SWT Link Widget throws Array Out of Bounds Exception  
+<br>90457:  SWT in M6 and prior will not build against the Sun JDK  
+<br>90513:  Link widget does not have a proper CreateHandle method  
+<br>90729:  Shell with style MODELESS or DIALOG_TRIM ignores setSize()  
+<br>90770:  Race conditions in Device.getDevice() method  
+</blockquote>
+
+<h2> SWT Build 3.1 029 - Tuesday April 5th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20954:  [About] Feature Plugins dialog fails to launch web browser  
+<br>25490:  White Color doesn't appear on Toolbar Image  
+<br>34481:  Java Compiler Properties for a Project  
+<br>41065:  Arrow button look is inconsistent with scroll arrows  
+<br>57819:  [SWT-Example-Controls-Table] In some cases the vertical scroll bar is not available with size 10x10  
+<br>64192:  Scrollbar - setVisible not working as expected  
+<br>69919:  [Browser] Javadoc view steals key events.  
+<br>75141:  [Browser] CTabItem with Browser containing video crashes when disposing item's image  
+<br>75317:  [Browser] Location not browsed when URL misses protocol / www  
+<br>79881:  Browser class shipped with AIX-Motif checks for Linux ?!?  
+<br>79927:  crash when using a Table, TableItems using images with alpha, and using TableColumn.pack  
+<br>81235:  [JUnit] TableItem.getBounds test fails  
+<br>81240:  [JUnit] Tree get/setTopItem fails  
+<br>82703:  Tree with TreeColumns doesn't display FULL_SELECTION properly  
+<br>83477:  [browser] Native crash outside JVM in libwidget_gtk2.so  
+<br>85530:  Control in vertical ToolBar doesn't fit  
+<br>87695:  Interface Disposeable  
+<br>87855:  NullPointerException in Table.callWindowProc  
+<br>88278:  TreeItem should provide item.removeAll  
+<br>89063:  [Markers] infinite-loop during cvs override and update  
+<br>89217:  Label.computeSize() returning incorrect values when using WRAP  
+<br>89533:  [Themes] Colors and Fonts preferences page has funny icons for color entries  
+<br>89564:  Image appears and disappears in Tree  
+<br>89575:  Browser widget crashes  
+<br>89665:  VM terminated when switching page in the Plugin manifest editor  
+<br>89785:  Disabled links look like normal links  
+<br>89826:  [Browser] browser eats all keystrokes  
+<br>89885:  Crash using command-O.  
+<br>90009:  code assist loses its visual selection  
+<br>90018:  Native tooltips left around on CTabFolder  
+</blockquote>
+
+<h2> SWT Build 3.1 028 - Thursday March 29th, 2005 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<p>New API has been added to Spinner</p>
+<blockquote>
+int Spinner.getDigits()
+<br>Spinner.setDigits(int)
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+86079:  Spinner should handle non-integer increments  
+<br>87207: Content of first column in Tree with columns overflows past last column  
+<br>89028: uneccessary casts  
+<br>89156: Cairo bindings for SWT can not be compiled.  
+<br>89163: GridData.verticalIndent does not work as expected  
+</blockquote>
+
+<h2> SWT Build 3.1 027c - Thursday March 24nd, 2005 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<p>New API has been added to Tree and TableTree</p>
+<blockquote>
+int Tree.indexOf(TreeItem)
+<br>int TreeItem.indexOf(TreeItem)
+<br>TreeItem Tree.getItem(int)
+<br>TreeItem TreeItem.getItem(int)
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+26625:  Combo cursor and copy/paste are not working right  
+<br>87554: Need bounding rectangle for a Path  
+<br>87820: GC.drawString uses BG color for font when alpha value < 255  
+<br>87824: GC setRegion and getRegion are not symmetric  
+<br>88122: switch org.eclipse.swt plugin and fragments to new eclipse jar format  
+<br>88409: Device.getFontList should have better performance  
+<br>88582: Computed width of link widget is too large  
+<br>82336: TreeView: setting gray gives free check mark  
+<br>83432: iFrame does not render border when in SWT Browser  
+<br>87534: TVT3.1 #33 - SWT Browser View cannot be found  
+<br>87726: Removing libXm links from motif drops  
+<br>87810: Support FULL_SELECTION in (table) Tree  
+<br>87833: Platform-filter must be added to the fragments  
+<br>88093: Shapes are drawn too large when a transform is used  
+<br>88171: Warning in N20050316-0010 build  
+<br>88519: Need a way to clear the Transform from a GC  
+</blockquote>
+
+<h2> SWT Build 3.1 026 - Tuesday March 15th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+68040: Views keep resizing after mouse up
+<br>86294: Find/Replace not working "Illegal/Unsupported escape on the Mac
+<br>87010: NoSuchMethodError Display.setDirectoryProc
+<br>87372: [browser] CTRL-N should not run IE action when using Browser.setText
+<br>87578: TVT3.1 #38 - RUS mnemonics only work in main window
+<br>87584: Remove ImageLoader dependency in Test_org_eclipse_swt_graphics_Image and Test_org_eclipse_swt_graphics_ImageData
+<br>87664: Null pointer exception in org.eclipse.swt.widgets.TreeItem.computeDisplayText in 3.1M5a
+<br>87676: Double-click only works on a tree's column0
+</blockquote>
+
+<h2> SWT Build 3.1 025 - Tuesday March 8th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+41202:  GTK-BIDI: RTL support in Slider  
+<br>84012:  StyledText with SWT.WRAP style does not adjust selection correctly  
+<br>84051:  Table widget unexpectedly fire deactivated event while clicking scroll bar buttons.  
+<br>86582:  Spinner should allow wrapping to be turned off  
+<br>86921:  Crash embedding other process.  
+<br>87075:  [SWT Examples - SWT Controls] Incorrect Dialog buttons creation with SWT.RETRY, SWT.ABORT, and SWT.IGNORE on MessageBox  
+<br>87122:  Link: problem with WM_PRINT  
+<br>87265:  Link widget javadoc does not mention style bits  
+<br>87363:  Regression: MenuDetect no longer opens new menus  
+</blockquote>
+
+<h2> SWT Build 3.1 024 - Tuesday March 1st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+34146: GTK-BIDI: RTL support in ToolItem
+<br>34160: Clicking on table header does not sort w/native table
+<br>41184: GTK-BIDI: Support of RTL orientation of based SWT widgets
+<br>41243: GTK-BIDI: RTL support in List
+<br>41363: GTK-BIDI: RTL support in TabFolder
+<br>41364: GTK-BIDI: RTL support in Combo
+<br>41546: GTK-BIDI: RTL support in Table
+<br>51828: GTK-BIDI: RTL support in Menu
+<br>56593: TableItem.setFont() causes cels to be rendered with ellipsis even when they aren't necessary
+<br>58401: Need a more flexible GridLayout and GridData class to support more dynamic layouts
+<br>83703: Crash when using source - find strings to externalize
+<br>85552: TextLayout preferred size depends on current width
+<br>85634: Strange blip above help combo
+<br>85876: Line bugs in GC
+<br>86000: ImageLoader Save - produces invalid JPEG images
+<br>86145: VM Crash when running remotely via cygwin/X
+<br>86216: Display.getActiveShell() slow with lots of widgets
+<br>86275: NPE in Shell.gtk_focus_out_event
+<br>86375: Toolitem calling gtk_widget_add_events after it is realized
+<br>86402: ToolBar only needs to resize its children if the bounds are required
+<br>86577: Not removing event filter added with gdk_window_add_filter
+<br>86587: Tree: problem with WM_PRINT
+<br>86588: Tree: problem with column resize
+</blockquote>
+
+<h2> SWT Build 3.1 023g - Tuesday February 21st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+85662:  VM crash ? when browser widget is being used  
+<br>70713:  First Launch from Dock fails  
+<br>71844:  popup menu has bunch of empty items  
+<br>85834:  notifyAll() slow in locking code  
+<br>85849:  GC.copyArea() slow on images  
+<br>85875:  Eclipse crashes when clicking on "View Installation History"  
+<br>66815:  Selection disappears in trees when they do not have focus (KDE)  
+<br>37775:  SWT is not 64-bit clean  
+<br>70293:  Application error during the start of Eclipse  
+<br>73919:  add ant task to build native libraries as part of the eclipse build  
+<br>85877:  Shell has unwanted title bar on Pocket PC  
+<br>85236:  IllegalArgumentException when layouting link widget  
+<br>85412:  changing link foreground does not repaint  
+<br>50123:  Drop down Combo doesn't drop down  
+<br>51705:  [JUNIT] - CoolItem fails JUnit tests  
+<br>85069:  [Mac] KERN_PROTECTION_FAILURE on Exit  
+<br>85453:  Advanced graphics not working on W2K - trigger system window  
+<br>85531:  swt-cairo library not built on AMD64  
+<br>85547:  Combo box list is way too big  
+<br>85958:  3.1M5a not usable on win98  
+<br>22035:  DCR - Dragable tablecolumns in table  
+<br>51079:  Resizing of TableColumns on Linux displays extra horizontal toolbar  
+<br>84557:  Table item does not appear in table  
+<br>85386:  NullPointerException in DropTarget  
+<br>4543:  DCR - need flipping image support ala awt.Graphics.drawImage() (1FZ0C7G)  
+<br>30329:  Support Bezier curves on swt.graphics.GC  
+<br>85732:  getClientArea() cause Shell to be resized to its initial size  
+</blockquote>
+
+<h2> SWT Build 3.1 023 - Tuesday February 15th, 2005 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<p>New API has been added to Table and TableColumn to support reordering of columns by dragging the headers</p>
+<blockquote>
+int[] Table.getColumnOrder()
+<br>Table.setColumnOrder(int[])
+<br>boolean TableColumn.getMoveable() - default is false
+<br>TableColumn.setMoveable(boolean)
+<br>SWT.Move event is sent for the TableColumn when columns are dragged to a new position
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>22000:  GTK: Menubar is not accounted for in computeTrim().  
+<br>34644:  DND in the FileViewer example resets tree selection  
+<br>39237:  GTK Tree DND doesn't highlight between markings  
+<br>45429:  TableColumn.pack() doesn't decrease column's width on GTK  
+<br>79419:  [Preferences] Need a link component  
+<br>81254:  ControlExample spews warnings  
+<br>83795:  GridLayout doesn't handle horizontal spanning of multiple columns correctly  
+<br>84500:  Broken selection on TableItem when Image in 1st Column  
+<br>84535:  TitleAreaDialog doesn't dismiss on <ENTER> if contains Combo(SWT.SIMPLE)  
+<br>84602:  scrolling Tree with columns horizontally fires Move and Resize events  
+<br>84609:  TableColumn has NPE while calling pack() on last column  
+<br>84613:  setting Tree header visibility fires Resize  
+<br>84630:  resizing a TreeColumn does not fire Resize or Move  
+<br>84665:  Clarify Javadoc of Display.postEvent  
+<br>84733:  TabFolder position change broken  
+<br>84755:  Cannot open filenames with 8-bit characters  
+<br>84765:  StackOverflow in setText  
+<br>84783:  Directory dialog does not deal with non-UTF8 filenames  
+<br>84861:  Display.post(Event) not working for char key events SWT.TAB, SWT.ESC, SWT.DEL and SWT.BS  
+<br>84888:  Temporary - don't use certain websites in junit tests  
+<br>84953:  View contents are drawn over tab area  
+<br>85006:  TableColumn.pack() of column 0 wth SWT.CHECK is bad  
+<br>85119:  Use GDK_HAND2 instead of GDK_HAND1 for SWT.CURSOR_HAND  
+</blockquote>
+
+<h2> SWT Build 3.1 022 - Tuesday February 8th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>54973:  [browser] Default WindowEvent to handle normal window open case - feature request  
+<br>81463:  [launcher] Launcher and Core issues regarding -showSplash  
+<br>81969:  [launcher] Launcher should be independent of startup.jar location  
+<br>82739:  EXCEPTION_ACCESS_VIOLATION hovering over check in table with SWT.CHECK style  
+<br>83432:  iFrame does not render border when in SWT Browser  
+<br>83819:  JPopupMenu doesn't work correcty in a SWT composite  
+<br>83978:  CLabel with style SWT.CENTER kills tabbing  
+<br>84085:  XP style not support with Button with SWT.ARROW  
+<br>84201:  Label text doesn't wrap correctly  
+<br>84383:  [browser] can't navigate to eclipse bugzilla  
+<br>84404:  Disabled button stops events  
+<br>84581:  Check button size does not change when right aligned  
+<br>84600:  resizing TreeColumn leaves cheese  
+</blockquote>
+
+<h2> SWT Build 3.1 021 - Tuesday February 1st, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>4408:  Image Processing Algorithims (1PQ8RGT)  
+<br>4473:  DCR - need API to begin/end defer layout (1FMGFRP)  
+<br>4680:  DCR - tree and table does not match item when key is typed  
+<br>18699:  Buttons with images don't use the XP theme  
+<br>59514:  Need support to underline text when using TextLayout API.  
+<br>80414:  ArrmListener for MenuItem generates submenu with invisible lables  
+<br>82346:  CLabel disappears when given SWT.CENTER flag in constructor  
+<br>83251:  Javadoc warnings in latest builds  
+<br>83546:  Printing doesn't seem to work anymore in latest integration build  
+<br>83667:  Eclipse splashscreen is very rude  
+<br>83683:  Javadoc of StyleRange does not mention it supports SWT.ITALIC  
+<br>83699:  Font reset to default after screen saver  
+<br>83765:  DCR: add strikeout to TextLayout  
+<br>83769:  ImageLoader - Exception For Image Save  
+<br>83791:  Repaint problems for Combo using SWT.SIMPLE style  
+<br>83838:  different style of indeterminant progress bar requested  
+<br>84077:  Table.pack() extends last column to include scroll bar  
+</blockquote>
+
+<h2> SWT Build 3.1 020 - Tuesday January 25th, 2005 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+RowData.exclude and GridData.exclude have been added to allow applications to 
+selectively exclude widgets from a Layout operation.
+</blockquote>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>42632:  Clipboard becomes empty after shell closes  
+<br>49426:  Layouts should support laying out only a subset of a composite's children  
+<br>64923:  EC: need api to query for Tray support  
+<br>76722:  [RCP] [launcher] ability to generate executable with specific icon resources  
+<br>79944:  The Eclipse launcher should give the splash screen window a type hint  
+<br>82026:  [launcher] eclipse launcher does not connect stdout of jvm to console  
+<br>82469:  [launcher] Launcher should not hard code a reference to org.eclipse.core.launcher.Main  
+<br>82640:  Setting style bits breaks SWT embedded Swing in Milestone M4  
+<br>82657:  Help fails to open  
+<br>82693:  Simple example snippet for OpenGL  
+<br>82828:  Table's SWT.FULL_SELECTION broken for empty table items  
+<br>82837:  Embedding swing on swt _ problems with JDK1.4.1  
+<br>82905:  drawImage doesn't honor clip rect  
+<br>83262:  rxvt pastes null terminator  
+<br>83305:  Javadoc of Display.addFilter could be improved  
+<br>83424:  [browser] check if reparenting works  
+<br>83532:  [browser] HTTPS link crashes Browser with Mozilla 1.7.5  
+<br>83543:  add alpha support to GTK MenuItem TabItem TableColumn TrayItem  
+</blockquote>
+
+<h2> SWT Build 3.1 019c - Tuesday January 18th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>22646:  Cheese appears in table when using mouse wheel  
+<br>37704:  [plan item] Support GUI test tools  
+<br>53923:  Changing table font causes table gridlines to be misaligned.  
+<br>75087:  redraw errors in scrollable table when row is to height  
+<br>80608:  SWT.error does not initialize the causing exception.  
+<br>81819:  Missing scenario results for Linux GTK  
+<br>81987:  BIDI:Check box mark is inverted  
+<br>82067:  BIDI:Printing of text files is not right aligned  
+<br>82454:  BIDI:Java editor is RTL oriented  
+<br>82466:  Problem in invoking Eclipse using telnet  
+<br>82501:  Table sort/redraw problem  
+<br>82531:  Missing selectionEvent when disposing TreeItem  
+<br>82660:  Browser without scroll bars  
+</blockquote>
+
+<h2> SWT Build 3.1 019 - Tuesday January 11th, 2005 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+TreeColumn - support creating columns in a tree widget. This replaces the
+emulated TableTree and gives access to the native look and feel of the tree.
+<br>
+<br><b>New Tree API:</b>
+<br>int getGridLineWidth
+<br>int getHeaderHeight
+<br>boolean getHeaderVisible
+<br>TreeColumn getColumn (int index)
+<br>int getColumnCount
+<br>TreeColumn [] getColumns
+<br>boolean getLinesVisible
+<br>void setLinesVisible (boolean show)
+<br>void setHeaderVisible (boolean show)
+<br>void showColumn (TreeColumn column)
+<br>
+<br><b>New TreeItem API:</b>
+<br>Color getBackground (int index)
+<br>Rectangle getBounds (int index)
+<br>Font getFont (int index)
+<br>Color getForeground (int index)
+<br>Image getImage (int index)
+<br>Rectangle getImageBounds (int index)
+<br>String getText (int index)
+<br>void setBackground (int index, Color color)
+<br>void setFont (int index, Font font)
+<br>void setForeground (int index, Color color)
+<br>void setImage (Image [] images)
+<br>void setImage (int index, Image image)
+<br>void setText (String [] strings)
+<br>void setText (int index, String string)
+</blockquote>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>4591:  prop sheet - the first column seems to leave too much unused space (1G7GIC3)  
+<br>13954:  TableTree Tree icons are large  
+<br>25007:  Allow for icons in TableTreeItems in first column  
+<br>36822:  DCR - TableTree doesn't support drag and drop  
+<br>52145:  TableTree incorrectly handles Left-Arrow in subtree  
+<br>66179:  TableTree widget has weird +/- signs on Windows  
+<br>73622:  TableTree plus sign background wrong color on Solaris  
+<br>80599:  SWT gets window origin even if nobody has hooked a motion event  
+<br>80830:  implement GC.drawFocus  
+<br>81695:  [Linux GTK] SWT Text displays the wrong characters if call addModifyListener  
+<br>81893:  IllegalArgumentException from StyledText Widget  
+<br>82156:  [launcher] typo in eclipseConfig.c  
+<br>82160:  [launcher] eclipseUnicode.h needs to include ctype.h  
+<br>82282:  Control.redraw() invalidates children on Linux-GTK  
+<br>82385:  Browser widget causes crash or freeze when opening URL with Java 2 applets 
+</blockquote>
+
+<h2> SWT Build 3.1 018 - Tuesday January 4th, 2005 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+81759:  Can't select tool items when tool bar has a DragDetect listener  
+<br>78295: VM crash in org.eclipse.swt.internal.gtk.OS.gtk_file_chooser_dialog_new  
+<br>80758: ControlExample showing strange events  
+<br>81265: background of tree is incorrect when disabled  
+<br>81399: Pixel Corruption caused by Tracker on a Composite with children  
+<br>78854: Memory leak in ClipboardProxy.getFunc()  
+<br>81395: [Navigator] Cannot open context menu on Navigator that is initially empty  
+</blockquote>
+
+<h2> SWT Build 3.1 017 - Tuesday December 21st, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+41227:  [Workbench] Switching applications, there is lag displaying the menubar  
+<br>66954:  Open external JavaDoc opens on type instead of member [javadoc]  
+<br>79216:  [consistency] attaching a DragDetect listener to a sash affects the selection event  
+<br>80216:  KERN_PROTECTION_FAILURE due to EXC_BAD_ACCESS on exit  
+<br>80276:  CBannerLayout calls Control.update too often  
+<br>80519:  update platform-launcher structure to include arch  
+<br>80867:  APPSTARTING cursor has colours reversed  
+<br>80911:  SWT.SetData event not thrown in all needed cases  
+<br>80965:  ControlExample does not register correct event  
+<br>80975:  Need to update Javadoc for "public" fields  
+<br>81137:  TableEditors shifted to the right when table has image  
+<br>81175:  launcher does not show splash screen when any argument is set  
+<br>81241:  [Junit] NPE in CLabel  
+<br>81283:  [JUnit] NPE's and No more callbacks from Browser when MOZILLA_FIVE_HOME not set  
+<br>81336:  using a ini file seems to prevent eclipse from switching workspace  
+<br>81357:  TableColumn.setText("") results in screen cheese  
+
+</blockquote>
+
+<h2> SWT Build 3.1 016 - Tuesday December 14th, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+12379:  CoolBar does not behave properly with Combo as item  
+<br>69694:  linux-ia64-gtk platform launcher crashes immediately  
+<br>70318:  Support for multiple lines in CLabel  
+<br>74138:  Duplicate DLLs in win32 fragment  
+<br>76855:  [RCP] launcher should read an ini file  
+<br>79128:  SWT 3.1 does not work on ppc64  
+<br>79504:  shell not opened if previous shell was disposed when active  
+<br>80160:  Regression: Pressing Return/Esc does not close drop down list of editable combo  
+<br>80485:  get a java.lang.UnsatisfiedLinkError at launch  
+<br>80506:  [consistency] forceActive and setActive are inconsistent across platforms  
+</blockquote>
+
+<h2> SWT Build 3.1 015 - Tuesday December 7th, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+7101:  DCR ability to receive scroll events (e.g. scrollwheel) from Scrollable  
+<br>24538:  TabItem controls should use the TabFolder to paint their background when using XP visual styles.  
+<br>68212:  Mac - can't drag from SWT application to another application  
+<br>79527:  org.eclipse.swt.gtk* build.xml gather.bin.parts target needs to collect libraries from archictecture specific directories to support source builds  
+<br>79557:  Display.getShells() optimization  
+<br>79934:  Incorrect SWT.Deactivate received  
+<br>80120:  CTabFolder layout puts top right item one pixel to far to the right  
+</blockquote>
+
+<h2> SWT Build 3.1 014 - Tuesday November 29th, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16971:  LayoutExample not big enough  
+<br>20018:  CCombo missing keyboard access  
+<br>26859:  [consistency] Ensure Button.setImage(null) is consistent across all platforms  
+<br>26878:  Eclipse doesn't interact with X's "Selection Clipboard"  
+<br>44217:  Calling Clipboard on Motif no longer accepts key/mouse events  
+<br>49057:  Inconsistency in layout handling during shell.setVisible  
+<br>63481:  Clipboard getAvailableTypes runs the event loop on Motif  
+<br>65406:  [consistency] Clipboard inconsistencies across platforms  
+<br>65545:  DND can hang desktop  
+<br>65547:  [consistency]DND inconsistencies  
+<br>69304:  EC: disappearing table column headers  
+<br>72033:  [browser] support AMD64 (early access)  
+<br>73965:  [Layouts] add marginLeft, marginRight, marginTop and marginBottom to GridLayout  
+<br>78548:  [consistency] Button Selection fires before MouseUp  
+<br>78558:  [consistency] Slider fires two selection events on single click  
+<br>78559:  [consistency] Slider fires two Selection events before MouseDown  
+<br>78564:  [consistency] TabFolder tab traversals do not fill in detail field  
+<br>78565:  [consistency] TabFolder fires two MenuDetect events  
+<br>78566:  [consistency] Table fires two DefaultSelection events  
+<br>78568:  [consistency] Table fires DefaultSelection before KeyDown  
+<br>79107:  [consistency] setItems(String[]) with null elements  
+<br>79186:  [consistency] pressing Enter on Button fires MouseUp on win32 only  
+<br>79191:  [consistency] Button KeyUp-Selection differences  
+<br>79210:  [consistency] Combo does not fire some KeyDowns  
+<br>79215:  [consistency] ProgressBar does not fire some mouse events  
+<br>79221:  [consistency] TabFolder does not fire some KeyDowns  
+<br>79228:  Solaris 8 crash  
+<br>79237:  [consistency] Text does not fire MenuDetect  
+<br>79423:  [consistency] TabFolder fires Selection for all mnemonics  
+<br>79481:  Sash no longer draggable when too small  
+
+</blockquote>
+
+<h2> SWT Build 3.1 013 - Tuesday November 23rd, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Spinner - allow the user to enter and modify numeric values
+<br>GC.setLineCap - Sets the receiver's line cap style to the argument
+<br>GC.getLineCap - Returns the receiver's line cap style
+<br>GC.setlineJoin - Sets the receiver's line join style to the argument
+<br>GC.getLineJoin - Returns the receiver's join style
+</blockquote>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>4853:  GC.setLineStyle does not work if width > 1 (1GKZ18N) [portability]  
+<br>5645:  DCR: Need to be able cut and paste data on Clipboard  
+<br>11418:  DCR - Need linestyle to allow dots of 1 pixel  
+<br>14297:  Add a Spinner widget to the SWT toolkit  
+<br>34523:  Text - No context menu  
+<br>35040:  Problems with PNG transparency in Image Class  
+<br>38355:  Invalid handling transparent pixel if there is another pixel with same RGB  
+<br>38443:  Support GTK on Sparc Solaris  
+<br>43684:  Setting cursor to SWT.CURSOR_APPSTARTING doesn't seem to work  
+<br>52637:  Line Styles on GTK vary greatly from those on Windows.  
+<br>60815:  Image transparency does not work in tables, column >0  
+<br>67237:  DND copy and link are allowed with default mouse gesture  
+<br>68353:  Components in SWT_AWT are not displayed on Solaris  
+<br>70214:  [64] Eclipse does not start on AMD64, Sun J2SE 1.4.2, SuSE Linux 9.1  
+<br>70966:  No Popup on Tiger  
+<br>74744:  Eclipse 3.0.0 crashes suddenly  
+<br>75450:  SWT-mozilla issue  
+<br>76094:  request for automatic chevron support. in coolbars/coolitems  
+<br>77320:  Junit performance [JUnit]  
+<br>77535:  Control example coolbar tab uses images in drop down  
+<br>77812:  Memory leaks and performance degradation in Display  
+<br>77983:  Funny behaviour on Linux GTK with MessageBox with % character  
+<br>78150:  eclipse 3.1x crashs on startup  
+<br>78204:  Refresh problem in progress view or compare view  
+<br>78226:  [JFace] ImageCache.getImage failing to return an image for ico file (regression)  
+<br>78239:  Label does not Wrap correctly  
+<br>78301:  Can't open font chooser dialog  
+<br>78407:  Platform differences setting size while shell is maximized  
+<br>78554:  [consistency] Scale rarely fires MenuDetect  
+<br>78562:  [portability] Slider selection event fires before MouseDown  
+<br>78725:  Separator ToolItems with Controls do not wrap soon enough  
+<br>78727:  ToolItems on a wrapped ToolBar do not "unwrap" correctly  
+<br>78873:  Combo box performance problem  
+<br>79064:  Strange NullPE in Widget.sendEvent(int eventType, Event event, boolean send)  
+<br>79199:  Update SashForm to recognize SWT.SMOOTH  
+</blockquote>
+
+<h2> SWT Build 3.1 012 - Tuesday November 9th, 2004 </h2>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>4811:  d'n'd should log runtime exceptions (1GJ9PCQ)  
+<br>44008:  [browser] Browser component grabs focus when loaded.  
+<br>59783:  [Workbench] WorkbenchParts resized to (0,0) when Shell minimized  
+<br>66866:  [browser] Javadoc preview update very slow  
+<br>71107:  [browser] calling setText from within Location.changing callback fails and raises apple exception  
+<br>72244:  Posting mouse events locks up event handling  
+<br>76750:  XP scrollbars becomes temporaly visible ...  
+<br>76933:  MessageBox does not display default title when icon is specified  
+<br>77102:  [browser] crash when trying to use unsupported Mozilla GTK1.2  
+<br>77191:  broken backwards compatability? new error in plugin.xml  
+<br>77433:  under construction spinner not working on WinCE  
+<br>77490:  setting background on single TableItem always shows grid lines  
+<br>77492:  ToolBar example tab should have image+text example  
+<br>77493:  No more handles error when running the Browser demo  
+<br>77511:  buttons do not resize  
+<br>77527:  setting the background colour in one widget, sets it as the default  
+<br>77530:  Selection in open type dialog does not work  
+<br>77532:  Version number code doesn't account for double digits  
+<br>77676:  TextLayout doesn't produce proper runs when newlines present  
+<br>77867:  Setting layout on TableTree inside of a SashForm causes incorrect layout  
+<br>77926:  Cannot compile SWT for GTK from CVS sources  
+<br>77936:  Platform inconsistency: drawLine(X,Y,X,Y) does nothing on the Mac  
+<br>77948:  NullPointerException in CLabel.findMnemonic  
+</blockquote>
+
+<h2> SWT Build 3.1 011 - Tuesday November 2nd, 2004 </h2>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15239:  Coolbar - when chevron appears hide tool icon if partially displayed  
+<br>34536:  Drop-down arrows (on tree) are not centered  
+<br>47178:  Tree - Change font size and can not select items  
+<br>49722:  support mnemonics on CLabel  
+<br>57068:  [browser] Curious behaviour on target=_blank links  
+<br>69781:  max StyledText window, fire MouseMove event  
+<br>76391:  SWt.Virtual tables do not callback on getItems  
+<br>76490:  VM crash running UI test suites  
+<br>76596:  Compare editor has double scroll bar  
+<br>76635:  Browser.java uses private Mozilla interfaces when alternatives exist  
+<br>76748:  [browser] setText issue on Mozilla  
+<br>76904:  Poor Canvas scrolling performance  
+<br>76963:  [browser] Browser.java should not use nsIScriptContext  
+<br>76983:  [browser] Download.java uses wrong pointer  
+<br>76996:  corrupted display of images in SWT table (MacOS X)  
+<br>77153:  SWT shell scripts override environment variables  
+<br>77342:  getOffset () in emulated TextLayout.java wrong for proportional fonts  
+</blockquote>
+
+<h2> SWT Build 3.1 010 - Tuesday October 26th, 2004 </h2>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4593:  Need to handle RGB transparent pixel value (1G7M833)  
+<br>4616:  GC.drawLine() is really slow (1GAVSGP)  
+<br>20269:  Please add javadoc for Composite getChildren() ordering  
+<br>22964:  org.eclipse.swt.motif_2.0.1 not ready for KDE 3  
+<br>23006:  Tree Expand all "*" sends expand event regardless of current state  
+<br>31372:  setControl  
+<br>33367:  [JUNIT]List fails  
+<br>34918:  Request for platform SWT jar download  
+<br>38721:  Cant setParent() to a control in GTK  
+<br>55964:  [ViewMgmt] spacing between border and text of "classic" tab style  
+<br>63579:  Rename refactoring wizard butchers clipboard  
+<br>68732:  Remove dependancy on pangoxft library  
+<br>73100:  Crash while running a JUnit Plug-In test  
+<br>74882:  TextLayout needs toString() Method  
+<br>75218:  DirectoryDialog widget has a growing label  
+<br>75577:  Keyboard focus not given to selected element in tree  
+<br>76595:  Hang on shutdown  
+<br>76612:  [EditorMgmt] Open With > System Editor fails after setting up File Association  
+<br>76707:  GC Background and Foreground are black  
+<br>76709:  CR Key down arrives twice  
+</blockquote>
+
+<h2> SWT Build 3.1 009 - Tuesday October 19th, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+boolean Browser.execute(String script) - execute the specified javascript. e.g to modify the DOM of the current HTML document
+</blockquote>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4527:  IME mode on J box overwrites scroll bar (1G91MAP)  
+<br>4735:  DCR: Additional Region features (1GFQO4C)  
+<br>4795:  Performance: Synchronizer queue creation (1GITDM2)  
+<br>4849:  Multi Select Tree - Disposing last selected item selects "random" item (1GKX5TW) [portability]  
+<br>7718:  horizontal scroll: Deeply nested elements in an SWT Tree widget cannot be dragged anywhere  
+<br>7772:  SWT Tree inconsistency when collapsing a multi-selected node  
+<br>10766:  Combo.removeAll() behaviour does not match API documentation  
+<br>11657:  inconsistent SWT.NO_FOCUS behaviour  
+<br>12989:  Data input in tables  
+<br>35060:  Tree does not show focus selection  
+<br>53885:  Java core (access violation) expanding a tree  
+<br>54665:  [browser] No more handles when created on a second thread  
+<br>56047:  SWT Example Launcher does not run standalone apps  
+<br>58730:  utilize new GtkFileChooser widget once required gtk is 2.4.0  
+<br>63185:  [browser] Intro issues using Safari version of the browser  
+<br>68643:  [browser] characters are not always typed in in text field  
+<br>68876:  Sashes should resize interactively  
+<br>70795:  LocationListener and changed event isn't always correct  
+<br>70883:  DBCS: IME pre-edit text size looks like 12 points all the time  
+<br>72075:  Native TabFolder on Pocket PC  
+<br>72401:  Wrong TableColumn width set when font-style is bold  
+<br>73052:  Exception while calling Clipboard object  
+<br>73345:  TableTreeItem.setExpanded causes redraw which causes flickering  
+<br>73871:  [KeyBindings] NullPointerException while running UiTestSuite  
+<br>74666:  String cut off in New Java Interface wizard  
+<br>75168:  Deadlocked Eclipse  
+<br>75451:  setBackground(index, color) does not set color when tableitem is in a Table  
+<br>75675:  [browser] setText/setUrl crashes when called from location.changing  
+<br>75739:  Variant has no toString()  
+<br>75753:  SWT.NO_BACKGROUND not working on Linux GTK  
+<br>75904:  Can not create launch configurations from the dialog.  
+<br>75906:  Multiple file type filters broken in file chooser  
+<br>75947:  InputStreams not closed in SWT examples  
+<br>76034:  Excessive Flicker on resizing Frame returned by SWT_AWT  
+<br>76102:  pocket pc - change of behaviour in Shell layout since 3.0.1  
+<br>76185:  [browser] investigate ways to communicate between java code and browser content  
+<br>76195:  Synchronizer.runAsyncMessages only runs the first runnable  
+<br>76320:  running out of memory and VM crashing   
+</blockquote>
+
+<h2> SWT Build 3.1 008 - Tuesday October 5th, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+GridData.minimumWidth - minimum width for dynamically sized controls
+<br>GridData.minimumHeight - minimum height for dynamically sized controls
+<br>Combo.addVerifyListener - add verify listener
+<br>Combo.removeVerifyListener - remove verify listener
+</blockquote>
+<br>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4704:  Focus not given to project name field in wizard (1GEV88H)  
+<br>4806:  setRedraw() nesting behaviour should be documented (1GJ4ZWB)  
+<br>10505:  Implement Verify listener for Combo on Photon  
+<br>30804:  DCR - GridLayout should not treat width/height hint as minumum size when grab/fill is specified  
+<br>43396:  Combo does not fire SelectionListener  
+<br>48272:  pocket pc - gesture erases current text selection  
+<br>58185:  Eclipse fails to load oldstyle BMP files  
+<br>64770:  [browser] Lose Mouse Moves/Enter/Exits  
+<br>64801:  [browser] browser shows disabled  
+<br>66853:  CTabFolder navigation-control issues  
+<br>74025:  SWT Browser with no URL stops any mouse move event  
+<br>74275:  SWT.ON_TOP and SWT.MIN|SWT.MAX are mutually eclusive  
+<br>74736:  Please provide some way to determine the state of keys in the Tracker event loop and provide notifications when they change  
+<br>75169:  [StyledText] setStyleRanges() shows different result when StyleRanges are sorted differently  
+<br>75219:  File open dialog does not handle filters  
+<br>75268:  snippet 2  
+<br>75318:  [WorkspaceLauncher] Workspace location confirmation dialog box wont take focus  
+<br>75404:  ControlExample slider tab grabs mouse  
+<br>75521:  Eclipse 3.1M2 crashes when software update is run  
+<br>75569:  OpenGL SWT Examples compile error with setCurrent  
+</blockquote>
+
+<h2> SWT Build 3.1 007 - Tuesday September 28th, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+11915:  Redraw problem  
+<br>20968:  javadoc bashing did not extend to protected methods  
+<br>22264:  OLE web browser example for swt has compiler warnings  
+<br>24402:  OLE part have a access violation exception  
+<br>63224:  Chevron in the coolbar  
+<br>66392:  IllegalArgumentException in Table  
+<br>68267:  Drag&Drop HTMLTransfer implementation request  
+<br>68301:  Close button on Ctabfolder not drawn proprely  
+<br>72399:  Program integration with KDE  
+<br>73812:  TableColumn.getWidth() returns 0 on gtk  
+<br>74010:  Display.setSynchronizer, readAndDispatch may throw ERROR_FAILED_EXEC  
+<br>74241:  [DND] Drop Target TreeItem not selected when Font was set  
+<br>74399:  [CTabFolder] Widget Disposed SWTException when closing Application with opened Tab-Chooser  
+<br>74408:  Dialogs open at an incredibly small size  
+<br>74682:  [Preferences] Widget disposed while changing the workbench's colors and fonts  
+<br>75094:  Workaround to bring up existing application instance on Pocket PC 
+
+</blockquote>
+
+<h2> SWT Build 3.1 006 - Tuesday September 21th, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4606:  Text.computeTrim doesn't work (1G8W5RN)  
+<br>37029:  Display.getFocusControl() should answer new focus widget in focus out event  
+<br>41339:  org.eclipse.swt.layout.FormData needs toString()  
+<br>42867:  Combo - Custom PopUp not displayed properly  
+<br>52947:  Cheese with Toolbar on parent with SWT.NO_BACKGROUND  
+<br>58103:  [browser] expose chrome required for new browser  
+<br>60975:  [browser] can't download files with mozilla  
+<br>67898:  VM crash when restarting Eclipse  
+<br>68292:  [Import/Export] Import/Export dialogs confused by "Select Types..."  
+<br>68418:  SWT Inconsistencies with subclassing between platforms  
+<br>68545:  Caret blink rate is not native  
+<br>68877:  Spec for OleClientSite mentions the wrong error  
+<br>69721:  Control+backspace key combination does not work in Text widgets  
+<br>71975:  Newly open shell does not draw its content until resized (Windows gives extra resize callback)  
+<br>72217:  CTabFolder should hide tabs in LRU order  
+<br>73717:  Button.computeSize gives different results on Linux-GTK and Linux-Motif  
+<br>73725:  [Browser] SWTException when resizing CTab containing Browser  
+<br>73730:  Button.computeSize definition on Mac does not match other platforms  
+<br>73734:  Lower/right edge of Carbon Scale widget not selectable with mouse  
+<br>73757:  Empty button has different height from one with text  
+<br>74111:  enum is no longer a valid variable name  
+<br>74169:  DirectoryDialog widget does not allow resize to smaller width  
+<br>74268:  deprecated methods in SWT samples  
+
+</blockquote>
+
+<h2> SWT Build 3.1 005 - Tuesday September 14th, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+CTabFolder.setMRUVisible(boolean) - Show only the most recently selected tabs if there is not enough room to show all tabs
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+9211:  GP - VM crash in KDE.KMimeType_allMimeTypes  
+<br>9866:  GridLayout does not handle wrapped Label properly  
+<br>39207:  Cut and paste does not work correctly (on a 2 processor m...  
+<br>47184:  MS Word can not be pasted on clipboard in Windows 98  
+<br>49726:  [Workbench] Weird Java perspective icon in action bar  
+<br>57525:  [KeyBindings] keybinding for Cut doesn't work  
+<br>59205:  DBCS:Can not drop and drag DBCS name file from outside ec...  
+<br>61827:  (BBAWT) getImageData() works incorrectly on Photon  
+<br>64607:  GC.drawRoundRectangle/GC.fillRoundRectangle  
+<br>66285:  ProjectionViewer.copyToClipboard crash while Ctrl+X, Ctrl...  
+<br>70299:  Eclipse dead slow on one system, normal on other  
+<br>70780:  Table Redraw freezes the Table Headers on CE  
+<br>71146:  [Browser] Browser widget should allow to hide 3D border  
+<br>71303:  BIDI issue in Variables view  
+<br>71966:  Clarify Combo/Composite/Scrollable behavior  
+<br>72929:  TableColumn widths ignored in Table width calculation  
+<br>73046:  UnsatisfiedLinkError jawt.dll already loaded in another c...  
+<br>73432:  Textlayout does not render multiline text correctly  
+<br>73698:  Control.isVisible() returns incorrect value for child Shell  
+<br>73735:  Carbon vertical Scale widget has top/bottom reversed from...  
+</blockquote>
+
+<h2> SWT Build 3.1 004 - Tuesday August 31, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+39927:  MacOSX Quartz font smoothing not working properly for LCD...  
+<br>46268:  [browser] calling multiple times setText without running ...  
+<br>47549:  GPF in XtSetValues on M5  
+<br>48884:  Dialog (org.eclipse.swt.widgets.ColorDialog and org.eclip...  
+<br>51108:  setAppName() should update application menu title.  
+<br>51741:  Shell not becoming "active"  
+<br>57188:  Label widget can get focus.  
+<br>61384:  [browser] support mozilla 1.7  
+<br>61893:  controlMoved event fired by Control.setBounds() on Window...  
+<br>64215:  [Fonts] Cannot set fonts which have a blank in their name  
+<br>67556:  [browser] TEXTREL in libswt-mozilla-gtk-3058.so  
+<br>70077:  [typing] Copy/paste doesn't work occasionally  
+<br>71180:  Profiling launch configuration: Minimum width should be s...  
+<br>72040:  ActiveX Accessibility  
+<br>72223:  Add org.eclipse.swt.custom.ST.SELECT_ALL  
+<br>72750:  "Program.findProgram()" does not return null for an exten...  
+</blockquote>
+
+<h2> SWT Build 3.1 003 - Tuesday August 24, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>52548:  PocketPC and eSWT example problems  
+<br>63793:  [encoding] DBCS: some DBCS is displayed as dot on default...  
+<br>67061:  [Browser] Blank page when opening page with Flash  
+<br>67746:  investigate making emulated Table and Tree always post se...  
+<br>69495:  Splash screen appears green on AIX  
+<br>70779:  [browser] Mozilla 1.6 Browser problem : [Unknown mozilla ...  
+<br>70925:  Layout cells are infinetly large  
+<br>70949:  'Unsupported color depth' error on Linux  
+<br>71711:  Gtk - Checkbox/Radiobox setLocation Bug  
+<br>72123:  Patches for 3.0 launcher cross-builds  
+<br>72206:  StyledText Javadoc needs italic doc.  
+<br>72342:  MouseListener behaving incorrectly when attached to Button  
+<br>72343:  Shell doesn't maximize  
+<br>72345:  Text wider than normal in toolitem if ampersand (&) used  
+</blockquote>
+
+<h2> SWT Build 3.1 002 - Tuesday August 17, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Shell.getMinimumSize - Returns a point describing the minimum receiver's size
+<br>Shell.setMinimumSize(int, int) - Sets the receiver's minimum size
+<br>Shell.setMinimumSize(Point) - Sets the receiver's minimum size
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4479:  getFocusControl inside FocusOut event inconsistent (1FMITIE)  
+<br>4606:   Text.computeTrim doesn't work (1G8W5RN)  
+<br>5016:   Controlling shell min size during resize  
+<br>36997:  DCR: Accessibility on GTK  
+<br>39863:  TableViewer / cellModifier / ComboBoxCellEditor: new valu...  
+<br>62435:  Chinese font substitution defaults to Kai  
+<br>63571:  TextLayout: font substitution support  
+<br>64266:  accept imagedatas of depth other than 1 as a mask  
+<br>65772:  Receiving duplicate key events per non-printable key [BBAWT]  
+<br>66433:  Need keyboard support for Nested Tabfolder Traversal  
+<br>68273:  tabletree plus/minus not visible in High Contrast Mode  
+<br>69410:  TVT3.0: mnemonics doesn't work if focus is in a text widget  
+<br>69440:  Inspect32 does not show name for CCombo  
+<br>70516:  Provide snippet for converting BufferedImage <-> SWT Image  
+<br>70620:  Display.setMouseLocation() not implemented on GTK  
+<br>70630:  Font constructor fails to throw ERROR_NULL_ARGUMENT  
+<br>70707:  ImageLoader closes the byte stream after loading an image  
+<br>70854:  Regression: GridLayout misapplies horizontalSpacing when ...  
+<br>70857:  when the toolBar is wrapped only by a few pixels, removin...  
+<br>71013:  Shell.open() blocks until the window is mapped  
+<br>71019:  Setting a ToolItem's control to a Button doesn't work in ...  
+<br>71141:  SWT Snippet 145 has compile errors  
+<br>71231:  Program.isGnomeDesktop does not work for Fedora 2  
+<br>71237:  Controls placed in group composite w/ text title are inco...  
+<br>71277:  Program.execute does not work on Mac (patch available)  
+<br>71282:  Text control has been broken since 3.0  
+<br>71338:  Unsatisfied link error with Combo  
+<br>71381:  gtk build crashing on linux while opening a file  
+<br>71570:  Tooltips are not shown if shell's client area is located ...  
+<br>71757:  Cursor X/Y hotspots don't work with all constructors  
+<br>71799:  Readonly text fields aren't always readonly  
+<br>71803:  No lower border on swt combo boxes  
+<br>71828:  Listener is not notified when using the display's "addFil...  
+<br>71894:  ToolBar.getItem(Point point) always returns first item.  
+<br>71907:  The "Device#getFontList" method does not return an array ...  
+<br>71999:  StyleText displays StyleRanges incorrect depending on ord...  
+</blockquote>
+
+<h2> SWT Build 3.1 001 - Tuesday July 26, 2004 </h2>
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+CBanner.getRightMinimumSize - Returns the minimum size of the control that appears on the right of the banner
+<br>CBanner.setRightMinimumSize - Sets the minimum size of the control that appears on the right of the banner
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4770: Accessibility Problems (1GHQMR9)  
+<br>67165: [Browser] HTML not rendered w/XP style using javaw.exe.manifest comctl  
+<br>68639: platform crashes opening help (internal browser)  
+<br>68759: Confirm dialog doesn't work in the embedded Mozilla browser widget  
+<br>69239: [browser] No more handles (java.lang.UnsatisfiedLinkError:  
+<br>69609: Browser view broken on Linux (Fedora Core 2)  
+<br>70160: Image(Device, InputStream) throws incorrect/unspec'd exception  
+<br>18868: TestCase cause NPE on TabFolder (Emulated Widget)  
+<br>20217: Coolbar Buttons flash with enablement/disablement  
+<br>20841: Hover help hides Ctrl+F1 help  
+<br>24959: CoolBar with SWT.DROP_DOWN style  
+<br>31385: Redraw problems: selecting text backwards  
+<br>32855: [Coolbar] Unnecessary flash when remove/add last item  
+<br>34945: Cheese: Tracker leaves garbage  
+<br>35161: EC: cheese and GP  
+<br>37735: TreeViewer's Tree gets two selectionChanged events when it gets focus  
+<br>37980: Crash Moving throw Frames  
+<br>41051: Wizard not gaining focus after closing of dialog box from WizardPage of this Wizard.  
+<br>41204: combo event not firing on SWT.FocusIn  
+<br>41537: keyboard stops responding, cursor disappears (WindowMaker)  
+<br>43009: Bad performance on zh_CN.GB18030  
+<br>45555: can't run at freebsd!  
+<br>49598: place arbitrary controls in a table has wrong tab order  
+<br>51078: Static text doesn't display on toolbar in Linux  
+<br>68969: Buttons in disabled group are not disabled  
+<br>62690: [launcher] splash screen spans multi-monitors  
+<br>63659: SWT developers page not up to date?  
+<br>68482: JVM dump errorcode=6  
+<br>68661: Trees are eager to expand  
+<br>68667: NPE in AddressBook example  
+<br>68744: Readme mentions duplicate bug (35443)  
+<br>14856: [Editor Mgmt] Ctrl+Tab does not work in editors with multiple tabs  
+<br>52166: close button on view/editors tabs need refinement  
+<br>68296: bug with editor in Eclipse  
+<br>16171: No Maximize / First resize gets reverted  
+<br>29642: Performance problems on Mac  
+<br>30983: ACC - I20030205 - Can't switch tabs using keyboard  
+<br>66507: ToolItem.getBounds() replied {-1,-1,1,1} is shell is not visible  
+<br>68566: javaw.exe not found at launch  
+<br>68571: drawText(text, 0, 0, SWT.DRAW_DELIMITER) is now right-justified  
+<br>68855: org.eclipse.swt.tools.internal.SwtJniGen is not working properly  
+<br>37868: Setting a GridLayout on a TabFolder gives strange behavior when resizing  
+<br>59630: [Dialogs] Accessibility: [Search dialog] Cannot select Choose working set text without mouse  
+<br>68950: Bug in List.showSelection method  
+<br>69398: Table.clearAll() does not force redraw  
+<br>69509: Combobox computeSize() doesn't take the down arrow into account  
+<br>70461: Minor javadoc error in Display.map(Control,Control,Point)  
+<br>70633: Program launch and execute methods have incorrect javadoc  
+<br>70729: Plugin: Modal dialog blocks other dialogs closing  
+<br>21089: CTabFolder - close button doesn't appear when tab moves under mouse  
+<br>29772: [Editor Mgmt] Last editor tab gets cut off when unnecessary  
+<br>36220: expand Sashform API to support setBackground  
+<br>52059: SashForm right/bottom constraint is not computed correctly  
+<br>52849: Lightweight close buttons on CTabFolder are problematic  
+<br>64610: hover over chevron for Ctabfolder not big enough for large fonts  
+<br>65598: Chevron shows '0' when there are at least one items tabs not showing  
+<br>67078: Chevron and Text touching on Motif  
+<br>67489: CLabel does not save alignment in style bits  
+<br>68070: Label does not draw background correctly  
+<br>68074: Couple of bad pixels in SWT.FLAT | SWT.BORDER style  
+<br>68972: GridLayout adjusts the width of the column already adjusted  
+<br>69881: In ScrolledComposite, vertical scrollbar does not appear  
+<br>70536: if GridLayout.numColumns == 0 a StackOverflowError gets thrown  
+</blockquote>
+
+<h2> SWT Build 3.0 062 - Thursday June 24, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4410:  AWT/SWT - Applet Interop (1PQ8QG1)  
+<br>30104:  Drag & Drop not implemented on the Mac  
+<br>32434:  Javadoc typo  
+<br>65439:  CBanner/CTabFolder comments.  
+<br>66095:  Combo.setVisibleItemCount does nothing until resize/layout  
+<br>67319:  CBanner javadoc incomplete  
+<br>67979:  editor focus issue  
+<br>68096:  SWT exception docking a detached view  
+<br>68160:  Cannot use 'eclipse' command line launcher to launch eclipse app when no workspace specified on the command line  
+</blockquote>
+
+<h2> SWT Build 3.0 061c - Tuesday June 22, 2004 </h2>
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+68056: GTK64 - CCombo does not work 
+<br>67928: [Browser] Enter path to non-existing file brings NullPE 
+<br>67935: Typo in SWT_AWT.new_Frame javadoc 
+<br>68102: No mouse up when tree expansion indicator selected
+</blockquote>
+
+<h2> SWT Build 3.0 061 - Friday June 18, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+48492:  Eclipse crashes on GTK (linux) while Cell Editor in Property View loosing focus  
+<br>60768:  CBanner at top does vertical sizing based on left components
+<br>66962:  Tabbing from list in Property/Preference dialog takes you to sash instead of page  
+<br>67458:  Resize is too slow for mouse events on GTK  
+<br>67670:  cancelling Open Type dialog moves focus to Open Perspective button  
+<br>67825:  [browser] browser crashes on jdk 1.5 beta applets  
+
+</blockquote>
+
+<h2> SWT Build 3.0 060 - Thursday June 17, 2004, 8:00pm </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+66813:  Browser does not handle setText twice  
+<br>67185:  Bug in emulated TextLayout.setFont(Font)  
+<br>67195:  Possible NPE in TextLayout (motif/emulated)  
+<br>67219:  Segmentation fault in OS.gtk_main_do_event  
+<br>67301:  Dll infos are bogus  
+</blockquote>
+
+<h2> SWT Build 3.0 059 - Thursday June 17, 2004, 4:25pm </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+44399:  SWTError when trying to copy entry from Error Log View  
+<br>53920:  Slow performance updating target  
+<br>55948:  BIDI: problems in rtl-oriented CTabFolder  
+<br>58642:  [misc] caret disappears from java editor  
+<br>65053:  [KeyBindings] Key bindings stop working  
+<br>65975:  Ctrl+C broken in Java editor  
+<br>66717:  SHADOW_IN style hides Group title  
+<br>67483:  No chevron when not enough space to show all the tabs in CTabFolder  
+</blockquote>
+
+<h2> SWT Build 3.0 058d - Wednesday June 16, 2004, 8:00pm </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+66001:  package.html should not be included in binary plug-in JARs  
+<br>67132:  Styled text example loses the text style when changing any style flag  
+<br>67346:  Display.gdkEventWidgets leaks widgets  
+<br>67355:  Setting font back to its default value in a table tree widget causes an illegalArgumentException  
+</blockquote>
+
+<h2> SWT Build 3.0 058c - Wednesday June 16, 2004, 4:00pm </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+65985:  Disabled controls still get keystrokes [was [Progress] NPE in log while refactoring]  
+</blockquote>
+
+<h2> SWT Build 3.0 058b - Tuesday June 15, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+34515:  GTK: Cascade MenuItem doesn't support image  
+<br>40003:  Productize java_swt  
+<br>59344:  Inspect Popups disappear on Mac  
+<br>60657:  Default size of Shell is too big in multi-monitors  
+<br>62565:  NPE in WM_KEYDOWN  
+<br>66293:  Editor blank on startup  
+<br>66633:  [Workbench] missing toolbar items  
+<br>66653:  NPE on window close  
+<br>66941:  SWT printing snippet not working on MacOS X  
+<br>66942:  [browser] F5 blanks out the Browser widget when setText used  
+</blockquote>
+
+<h2> SWT Build 3.0 058 - Thursday June 10, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6047:  setFocus fails if setRedraw turned off  
+<br>6325:  No busy cursor for Open on Selection  
+<br>9847:  Embedded Swing hangs eclipse when editor closes  
+<br>35103:  OS X Editor has cursor problems  
+<br>38408:  Caret.drawCaret ignores image content  
+<br>42562:  Various improvements for the Os X Interface:  
+<br>50216:  NPE in org.eclipse.swt.widgets.Control.hasFocus(Control.java:934)  
+<br>51107:  ControlEditor sizing on the Macintosh  
+<br>51697:  CustomControlExample: missing event listener part on CCombo tab  
+<br>64400:  ON_TOP shell - can't setFocus to content  
+<br>65350:  StyledText leaves second caret behind  
+<br>65695:  TrayItem not coming back after an explorer crash  
+<br>65697:  CCombo does not respond to keyboard or mouse actions when it it dropped down  
+<br>66331:  exception in Members panel of java browsing perspective  
+</blockquote>
+
+<h2> SWT Build 3.0 057 - Wednesday June 9, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+35346:  Eclipse crash opening preferences of third party plugin  
+<br>64349:  SWT of the eclipse 3.0 versions crashes on start (mouse-problem)  
+<br>64429:  Progress bars use deprecated style  
+<br>65269:  [EditorMgmt] Slow redraw/relayout when maximizing/unmaximizing an editor  
+<br>65537:  [KeyBindings] Control (ctrl) key hotkeys not working eg Ctrl+F4  
+<br>65792:  Blank lines in table [WAS: Table.showItem() works wrong in Win32]  
+<br>66151:  Alt-clicking to expand a tree node doesn't work properly  
+<br>66356:  DND - move reported to drag source even though cancelled  
+</blockquote>
+
+<h2> SWT Build 3.0 056 - Tuesday June 8, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21245:  different disabled toolbar icons on GTK  
+<br>32852:  Crash when using sub-pixel rendering in Xft 2.0  
+<br>32978:  Export Javadoc: element not selected  
+<br>37163:  Crash on startup: "Cannot open font file for font Verdana 10"  
+<br>43270:  Non-Antialiased Fonts have wrong spacing  
+<br>47464:  Second unused import message missing in problem display list view after rebuild  
+<br>52276:  Blurred font rendering in editor under MacOS X  
+<br>55600:  CVS perspective has busy cursor  
+<br>56508:  Editor: some tab characters are not rendered missing in field declations  
+<br>56765:  StyledText - Fix calculating of cursor level  
+<br>57408:  DBCS: After pressing "Tab", anything can not be inputed  
+<br>58615:  Setting italic font for tree items does not work on Mac  
+<br>60659:  GP when asyncExec runs from DirectoryDialog modal loop (was Crash related to new Progress Viewer)  
+<br>62336:  UI hangs while attempting to add missing methods.  
+<br>64759:  Color buttons look bad on Mac  
+<br>64793:  One line of cheese in CTabFolder selected tab  
+<br>65387:  SWT depends on Swing (AWT not a problem)  
+<br>65599:  Shell location is not properly used  
+<br>65759:  TableItem does not redraw correctly on setText(int, String)  
+<br>65905:  Possible Memory Leaks  
+<br>65947:  SWT Carbon makefile still uses JNI 1.3.1 headers  
+<br>66039:  org.eclipse.swt.widgets.Control has funky color issues  
+</blockquote>
+
+<h2> SWT Build 3.0 055 - Thursday June 3, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+14536  StyledText - bidi - change ctrl-arrow behavior  
+<br>39493:  GTK Combo; first item is selected when Dropdown list is shown  
+<br>42480:  JOGL method popups extremely slow; likely now SWT issue  
+<br>43312:  Switching perspectives while debugging causes segfault  
+<br>44003:  MenuItem.setAcceleratorText does not work properly on MacOS X  
+<br>47972:  [KeyBindings] Incorrect drawing of accelerator text on mac os x  
+<br>56509:  Details pane in Debug perspective doesn't render it's contents properly (repeats characters)  
+<br>58176:  Screen scribbles when scrolling up in Java editor  
+<br>62119:  setCursor() doesn't work for Text objects  
+<br>63931:  [browser] setVisible(true) does not work  
+<br>63991:  hang in gtk_clipboard_wait_for_contents()  
+<br>64237:  [Menus] menu items missing on first click  
+<br>64291:  mouse unusable over regions previously covered by fastview  
+<br>64365:  Embedded AWT windows use wrong location  
+<br>64645:  java.lang.ArrayIndexOutOfBoundsException in GTK Table.java  
+<br>64705:  Expanding a Tree with left and right arrows does not trigger TreeExpanded or TreeCollapsed events.  
+<br>64709:  Tree views don't update correctly using keyboard shortcuts  
+<br>64752:  TableCurser.setSelection does not function properly after columns are disposed  
+<br>64760:  add SINGLE/MULTI radios to ControlExample - Dialog tab - File Dialog Styles  
+<br>64791:  [KeyBindings] accelerator strings displayed incorrectly.  
+<br>64938:  [browser] NPE in test case  
+<br>64980:  should use correct SIZE_ALL cursor on motifs  
+<br>65169:  [browser] URLs with space don't show up on Safari  
+<br>65214:  Regression: Tree.setRedraw(false) not reliable  
+<br>65239:  new SWT Mac properties aren't boolean  
+<br>65359:  Label.setText() causes a redraw when the string did not change  
+</blockquote>
+
+<h2> SWT Build 3.0 054 - Friday May 28, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+StyledText.getBaseline()
+<br>Combo.getVisibleItemCount()
+<br>Combo.setVisibleItemCount(int)
+<br>CCombo.getVisibleItemCount()
+<br>CCombo.setVisibleItemCount(int)
+<br>CBanner.getSimple()
+<br>CBanner.setSimple(boolean)
+<br>CTabFolder.getSimpleTab() -> CTabFolder.getSimple()
+<br>CTabFolder.setSimpleTab(boolean) -> CTabFolder.setSimple(boolean)
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+64518:  NPE in StyledText used by 'Change method signature' refactoring  
+<br>64633   NPE caused by small font support
+<br>64652   StyledText - Clicking at the end of a line place the care...
+<br>62723:  javadoc console output: hyperlink not clickable, no hand ...
+<br>53358:  GC copyArea(image, x, y) not implemented on Mac  
+<br>7845:  API needed in Combo class to specify # of items visible  
+<br>17346:  Missing busy cursor in Search dialog under GTK  
+<br>22018:  GTK: Text.setCursor() does not function.  
+<br>31023:  GP - using F3 to open new edit window  
+<br>38260:  CCombo with Dialog  
+<br>44648:  Support JDK1.1  
+<br>45574:  Panther: Run... and Properties dialogs lay out incorrectly.  
+<br>48006:  [SWT] layout problems on mac  
+<br>50183:  Vertical scrollbar is not created as expected  
+<br>54414:  [typing] Delete Next Word and others don't work quite right  
+<br>58804:  Mac OSX : TableColumn Alignment  
+<br>60452:  [Mac] Button Placed on Group does not get Dialog Font  
+<br>60816:  Deferred events will not run during mousedrag  
+<br>61728:  Need access to TextLayout styles and fonts  
+<br>62329:  CTabFolder leaves a little cheese when resizing  
+<br>62558:  Null Pointer when opening Folder in File>Open External File  
+<br>62982:  TableColumn does not fire resize event  
+<br>63003:  Ctrl+ Clicking on PackageExplorer expands items  
+<br>63070:  some menus do not show their item texts  
+<br>63701:  Display var in debugger exits eclipse JVM  
+<br>63716:  Tree items do not display their children when unfolded by keyboard  
+<br>63903:  setSimple  
+<br>64216:  TableItem.getText - wrong for first column  
+<br>64220:  Wrong cursor used for SWT.CURSOR_SIZEALL  
+<br>64294:  Title and maximisation does not work on Pocket PC  
+<br>64457:  calling CTabItem.setFont (and setImage) repeatedly with null causes repaints  
+<br>64512:  Add smallFont and noFocusBorder properties to Info.plist file  
+<br>20903:  ACC: Checkboxes not identified correctly  
+<br>26632:  Table cloumn headers not drawn in GTK2  
+<br>28990:  GTK: Paints not flushed after open()  
+<br>35753:  missing API: TableCursor.removeSelectionListener(SelectionListener)  
+<br>37956:  Crash in OS.gdk_pixbuf_scale_simple ()  
+<br>38809:  DCR - need Display.getSystemCursor()  
+<br>38828:  Eclipse Crach Closing Session  
+<br>38875:  java.lang.reflect.InvocationTargetException on startup  
+<br>40540:  Eclipse JVM crashes randomly in GTK native code.  
+<br>42422:  eclipse crashes on startup with RedHat 9.0 system  
+<br>47266:  [browser] how can we format URL links to pass on information to the SWT app  
+<br>48850:  SWT Example projects build error  
+<br>52109:  drawText() treats "\n" differently if antialiasing is on or off  
+<br>56063:  [Colors] Perspective toolbar items have wrong background  
+<br>56981:  [browser] need to support Alerts on Mozilla  
+<br>57843:  Fatal Error in SWT causing Eclipse to crash.  
+<br>58193:  [Browser] content embedded using the HTML OBJECT element doesn't show up in swt browser  
+<br>59614:  Clicking the CTabFolder chevron twice does not make the drop down go away  
+<br>59698:  [browser] investigate support for custom popup menu  
+<br>60037:  Accessibility: Junit Preference Page checkboxes in list view not readable  
+<br>60102:  Shell opened on KDE3.2.x does not paint  
+<br>60237:  [browser] BrowserExample running inside Eclipse does not get key/mouse events  
+<br>60457:  [browser] safari - does not fire location event for inner frame  
+<br>60727:  BIDI: StyledText - Wrong cursor positioning on bidi boundary  
+<br>60819:  Photon: Tree.java references java.util.Stack (not in JDK 1.1)  
+<br>61316:  SWT error occurred on Eclipse 200405060200  
+<br>62523:  launch eclipse with -DMBCS as a vmarg and copy-paste works incorrectly / ctrl f6 shows undisplayable characters  
+<br>62528:  Tracker does not keep up with mouse movement  
+<br>62761:  SWT should not grab focus on traversal events  
+<br>62790:  packing a shell has the effect of creating an unusable shell on pocketpc  
+<br>63006:  Typo in SWT doc for ON_TOP  
+<br>63102:  [Icons] It is hard to distinguish pressed/non pressed icons on Mac OS 10.3.3  
+<br>63105:  TableItem.getImageBounds() returns incorrect value for Column 0  
+<br>63143:  malformed MANIFEST.MF in gtk/motif/gtk64 fragments  
+<br>63296:  [browser] F1 crashes workbench  
+<br>63661:  VM terminates abnormally  
+</blockquote>
+
+<h2> SWT Build 3.0 052 - Tuesday May 18, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16620: 	GC.drawLine and GC.drawPolyline aren't consistent [portability]
+<br>19828: 	CTabFolder popups should not span monitors.
+<br>21574: 	Color selection for individual table cells
+<br>27331: 	CTabFolder right control request
+<br>28766: 	Printing Images does not respect transparency
+<br>36732: 	Performance problems on Mac - slow appearance of cmd-space results
+<br>39320: 	SWT.NO_BACKGROUND style does not work in Linux-GTK
+<br>39881: 	BIDI: DCR - Need to implement a Text Layout class
+<br>44915: 	Clipboard getAvailableTypes runs the event loop on GTK
+<br>45093: 	Editor tab tooltip position wrong for dual monitor setup
+<br>52458: 	[Workbench] wrong background color in tab corners
+<br>52574: 	Rendering of CBanner with only one child
+<br>52595: 	CTabFolder flashing during resize
+<br>53791: 	Implement Control.setRedraw() on platforms other than Windows
+<br>54264: 	[EditorMgmt] Editor close button
+<br>54499: 	Tree.getItem(Point) returns element even if point is over +/- area
+<br>55392: 	Critical GTK Error in gtkselection.c
+<br>55748: 	[browser] fail to launch under RH EL3
+<br>56170: 	SWT_AWT problems
+<br>56694: 	Typing slow because too much data sent over the wire (was: [Workbench] since 3.0M8 typing is terribly slow)
+<br>57777: 	[typing] Wrong behavior for append next "word" to selection action
+<br>57965: 	GTK: Control.setBackground() with same color causes OS paint event (BBAWT)
+<br>59329: 	[Browser] browser code fails if gre.conf contains a blank line before version number
+<br>59333: 	[Browser] Exception error messages are not very meaningful
+<br>59998: 	[browser] hover tooltips at wrong position
+<br>60068: 	TableCursor crashes when scrolling vertically an empty table
+<br>60662: 	version-match deprecated in SWT fragment manifests
+<br>60934: 	[interop] tab focus problem
+<br>61207: 	cannot use icons with > 8 bit color depth
+<br>61397: 	UI seems to become "disconnected" from the application
+<br>61496: 	[EditorMgmt] Editor tabs should adjust themselves on window resize
+<br>61789: 	[Browser] browser code uses a hardcoded config file name /etc/gre.conf
+<br>61818: 	Cheese in ViewForm
+<br>61970: 	NPE in TableItem class in getImageBounds (int index)
+<br>62010: 	NPE Pressing CTRL-O in java editor
+<br>62090: 	Pressing enter in combo triggers dialog traversal
+<br>62195: 	Error in SWT#SCROLL_LOCK JavaDoc
+<br>62393: 	SWT_AWT enter key misbehaves with JTextArea in a wizard
+<br>62477: 	Clicking on shell title bar causes activation events with null active shells
+</blockquote>
+
+<h2> SWT Build 3.0 051 - Tuesday May 11, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+TextLayout.getAscent() added
+<br>TextLayout.getDescent() added
+<br>TextLayout.setAscent(int) added
+<br>TextLayout.setDescent(int) added
+<br>Display.getSystemImage(int) added
+<br>Display.getSystemCursor(int) added
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+12625:  Menu items still grab accelerators when disabled  
+<br>25703:  Getting system icons for dialogs  
+<br>28858:  Cursor appears behind character although it's in front of  
+<br>40523:  [launcher] Allow launcher build using MinGW  
+<br>43921:  gradient fill does not print its color properly  
+<br>46824:  ControlExample: scrolling Canvas leaves screencheese  
+<br>47511:  Shell.setVisible runs event loop  
+<br>53034:  showItem() not working when setRedraw(false)  
+<br>55616:  [browser] SWT.Browser (Mozilla) does not like https links (img src="https://..." or href="https://...")  
+<br>57506:  Pressing TAB key creates junk in editor  
+<br>59352:  [browser] GTK crashes on attachments  
+<br>60420:  lots of crashes since M8  
+<br>60454:  [browser] Browser crashes on Jaguar  
+<br>60471:  Eclipse stops responding to mouse, NullPointerException on shutdown  
+<br>60568:  Table TreeItem selection fails with MouseEvent position  
+<br>60607:  inconsistent API in FontData  
+<br>60704:  Long menu item labels cut off  
+<br>60893:  [64] NPE on startup  
+<br>60913:  StyledText shows lines when mulitple lines are selected  
+<br>60937:  Hitting Enter when a combobox is open can invoke default button  
+<br>60969:  [browser] clicking link to PDF crashes VM  
+<br>61109:  Widget is disposed error disposing shell  
+<br>61239:  TableItem NPE  
+<br>61337:  Dialogs resize when moved on Solaris  
+</blockquote>
+
+<h2> SWT Build 3.0 050 - Tuesday May 4, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+New accessibility state and role constants ACC.STATE_LINKED and ROLE_LINK.
+<br>StyleRange now accepts SWT.ITALIC.
+<br>CTabFolder.MIN_TAB_WIDTH is deprecated and replaced by CTabFolder.setMinimumCharacters
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4587:  StyledText - support italic fonts and italic font style (1G60C4X)  
+<br>10846:  Tab titles not read by JAWS  
+<br>21771:  Accessibility for Buttons ignored in JAWS  
+<br>25629:  Need STATE_SYSTEM_LINKED mapped to one of the states in ACC.  
+<br>41887:  [browser] Mac - HTML Browser widget - investigate Safari browser  
+<br>42264:  [Outline] Show Outline popup very slow  
+<br>44008:  [browser] Browser component grabs focus when loaded.  
+<br>50524:  RCP: CTabFolder truncated tabs should appear as tooltip  
+<br>51676:  New Look CTabFolder menu does not stay open  
+<br>52087:  not showing close button makes it easy to close tabs accidentally  
+<br>52482:  [New Look] black box around view tab labels  
+<br>52489:  CTabFolder selected tab not properly rendered  
+<br>52593:  CTabFolder.setTabHeight and paint problem  
+<br>52837:  [Editor Mgmt] Closing an editor when using multi tabs does not always redraw properly  
+<br>52958:  TabFolder, new look draws dotted selected  
+<br>54575: CTabFolder: Selecting tabs should not affect whether chevron is shown (should use constant space)
+<br>54591:  CTabFolder: screen cheese  
+<br>55245:  CTabFolder does not give available space to tab early enough  
+<br>56472:  [Font/Colour] Active part foreground on white povokes nasty looking close widgets  
+<br>56535:  [Workbench] No separator between part trim and its content is difficult on the eyes  
+<br>58272:  BIDI: The C/ C++ editor doesn't preserve the keyboard language after pressing sapce bar  
+<br>58704:  CBanner computesize seems wrong when no control on the right hand side  
+<br>58843:  TableCursor example in Javadoc doesn't work on GTK!  
+<br>59524:  Evaluation pop-up keybindings are broken  
+<br>59861:  asyncExec runnables not run until drag complete in Windows  
+<br>60127:  [PropertiesView] garbage in the properties view  
+<br>60334:  Can't force focus to a shell (BBAWT)  
+<br>60492:  [browser] safari - 2 browsers on different tab items in same tab folder overlap  
+<br>60686:  Program.hashCode() throws NullPointerException under linux with gnome  
+</blockquote>
+
+<h2> SWT Build 3.0 049 - Tuesday April 27, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+32524:  CoolBar Clips 'run' icon  
+<br>37785:  ctrl+delete nukes non-alphanum chars  
+<br>43769:  Eclipse crashes when loading web page with applet in OLE Browser view  
+<br>47939:  [browser] Expose native menus in WebBrowser  
+<br>51682:  update (custom)control example to permit setting font on single item  
+<br>51727:  SWT_AWT's use of embeddedFrame does not allow required subclassing of the embedded Frame  
+<br>53506:  Program.getProgram() Does Not Get Default Command  
+<br>55625:  Compiling SWT on top of GTK 2.4.0  
+<br>55956:  [DynamicUI] Perspective deleted only after Workbench restart  
+<br>56126:  StyledText background highlighting doesn't work  
+<br>56376:  [EditorMgmt] Immortal editor tab tooltips  
+<br>57079:  [interop] SWT_AWT causes JVM crash  
+<br>57143:  Fast view animate transition bad on Linux  
+<br>57225:  [browser] SWT Browser Widget Crashes Workbench on XP when loading the Shockwave Plug-in  
+<br>57380:  Excess clipping/dirty area for Table PaintListener's paintControl(PaintEvent)  
+<br>57562:  [Workbench] DBCS: Window resizing does not work properly  
+<br>58073:  Table.java java.lang.ArrayIndexOutOfBoundsException:  
+<br>58308:  SWT_AWT - Embedded JSplitPane resizable arrows  
+<br>58575:  drawRectangles in Tracker causes missed mouse events  
+<br>58638:  Permit to have synchronous display to help debugging  
+<br>58732:  Coolbar on Linux-GTK should draw native handles  
+<br>58851:  When shell is created with SWT.NO_TRIM, windows does not show it on task bar  
+<br>59051:  fillGradientRectangle doesn't work with XORMode on Windows  
+<br>59279:  Item.setText() impl. doesn't follow JavaDoc  
+<br>59424:  BIDI: level of the first directional run is never detected  
+<br>59472:  Eclipse splash screen label is "Silenio"  
+<br>59615:  Empty space before handle in a coolbar  
+<br>59707:  StyledText is not setting the OS background  
+<br>59872:  Documentation fix for RowLayout  
+</blockquote>
+
+<h2> SWT Build 3.0 048 - Tuesday April 20, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+CoolBar now has SWT.FLAT style.
+</blockquote>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<blockquote>
+CTabItem no longer supports set/getForeground and set/getBackground.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20186:  Copyright dates still are 2001  
+<br>22589:  GTK: StyledText widget is slow  
+<br>23566:  Accessibility - toolbar not accessible by keyboard  
+<br>41090:  THAI/VIET: The behavior of text editing functions are not correct.  
+<br>49133:  SWT_AWT API class undocumented  
+<br>53107:  Slider crashes when hooking resize callback  
+<br>53814:  views are blank when detached automaticly by switching perspective  
+<br>54051:  Font baselines don't line up in Java editor  
+<br>54225:  Checkbox TableItems don't honor background color near checkbox  
+<br>54989:  [CellEditors] [regression] ComboBoxCellEditor does not fire value applied  
+<br>57003:  DBCS:Copy/Paste or input DBCS display incorrectly in project file  
+<br>57004:  DBCS:Can not copy/Paste or input DBCS data in project file  
+<br>57426:  Clipped items when setting a tree item to use a bold font  
+<br>57627:  Can't click in Content Assist window of New Class wizard  
+<br>57948:  [browser] how to distinguish between a call to setText and a hyperlink activation  
+<br>58071:  ICO images painted not correctly when smaller than 17x17 pixels  
+<br>58093:  swt-gtk: uses ~100% CPU while drawing using fillGradientRectangle()  
+<br>58243:  [browser] hover messages don't show up in mozilla  
+<br>58346:  [browser] Browser not working with default RH EL3 update 1  
+<br>58569:  Regression: StyledText does not wrap correctly  
+<br>58756:  Tables & Images refresh problem  
+<br>59106:  SWT Snippet 139 fails to compile  
+</blockquote>
+
+<h2> SWT Build 3.0 047 - Tuesday April 13, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4425:  List(SINGLE) - setSelection(int, int) doesn't deselect when start>end (1FCHJMQ)  
+<br>48849:  Keyboard events ignored in Import Plug-ins and Fragments dialog  
+<br>50657:  Can't input 2 bytes character To combo box  
+<br>56390:  EXCEPTION_ACCESS_VIOLATION  
+<br>56829:  CBanner not sized correctly after coolbar wraps  
+<br>56915:  Chinese characters not rendered in StyledText  
+<br>57099:  GTK: Text widget of style MULTI does not send mouse track events if added to realized Shell (BBAWT)  
+<br>57182:  [browser] Browser displays a blank page if character encoding is specified (Linux GTK)  
+<br>57647:  errant ON_TOP | SYSTEM_MODAL Shell behaviour if tooltiptext is set on any control  
+<br>57876:  Constructor for Font has wrong-named argument; doesn't appear to be used  
+<br>57884:  Javadoc on Text missing possible style  
+<br>58156:  Unhandled event loop exception (Widget is disposed) when using "Open Type Hierarchy"  
+</blockquote>
+
+<h2> SWT Build 3.0 046 - Tuesday April 6, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+25646:  [launcher] After rebranding, "Eclipse" shows up in Windows toolbar during launch.  
+<br>27696:  DCR - need to set font and color for a TableItem's individual cells  
+<br>37052:  Shells assuming SWT.RESIZE on GTK and Motif (BBAWT)  
+<br>40521:  [launcher] Launcher error messages cannot be rebranded  
+<br>42032:  [browser] Browser Mozilla binding - problem submitting form  
+<br>42313:  SWT.CENTER and SWT.RIGHT don't work with Text  
+<br>54341:  [browser] swt.browser.Browser; buttons in html does not work on linux/gtk  
+<br>55541:  StyledText - Bidi segments Listener is broken  
+<br>55702:  [browser] Intro page does not show images on Linux  
+<br>55806:  [64] crash on startup when using jit on AMD64  
+<br>55926:  [64] [M8] AMD64 I20040324 build cannot work (unsatisfied link errro)  
+<br>56089:  [misc] Extend selection causing horizontal scroll is slow  
+<br>56149:  coolbar does not fill vertical space  
+<br>56315:  performance bad when moving lines  
+<br>56667:  Minimization of top Shell widgets impossible (SWT.MIN & SWT.NONE) on PocketPC (BBAWT)  
+<br>56795:  NPE opening quick outline/hierarchy  
+<br>56799:  NPE in WM_KEYDOWN  
+<br>56918:  Problems disposing TrayItem  
+<br>56999:  [KeyBindings] Regression: Alt+Numpad keystrokes broken  
+<br>57165:  eclipse does not start when using lesstif, FAQ is wrong  
+<br>57296:  BidiUtil static var retains references to runnables from StyledText  
+<br>57395:  backspace in texteditors -> double backspace  
+</blockquote>
+
+<h2> SWT Build 3.0 045 - Tuesday March 30, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15025:  implement java.awt.Robot for SWT  
+<br>51719:  Need to suppress "untitled window" on GTK  
+<br>53274:  [SWT Examples] Image Analyzer crashed when tried to save images as PNGs and ICOs  
+<br>53978:  manifest.mf of org.eclipse.swt is not consistent with plugin.xml  
+<br>55522:  Display.post - support/investigate mouse button 2 and 3  
+<br>55525:  Display.post - don't send mouse down/up when doing mousemove  
+<br>55556:  MacOS 10.2.x (Jaguar) has no strcasestr function  
+<br>55561:  Display.post - hang when doing a mousedown  
+<br>55738:  next word action broken on win2000  
+<br>55756:  Double click is ignored on progress indicators  
+<br>55849:  Keyboard shortcuts don't work in old workspace  
+<br>55897:  StyledText doesn't compute preferred size properly  
+<br>55913:  Styled Text draws on top of itself  
+<br>55917:  Extra library dependency in Eclipse 2.1.2 GTK launcher  
+<br>55920:  View presentation visual problems  
+<br>55937:  Introduction page wizard not properly installing SWT examples  
+<br>55967:  SWT should be a singleton bundle  
+<br>55980:  display.post() does not handle uppercase characters  
+<br>56245:  subtitle text does not fill available horizontal space  
+<br>56366:  Tooltip for CTabFolder shows up on wrong monitor  
+</blockquote>
+
+<h2> SWT Build 3.0 044 - Tuesday March 23, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+For new API released in the last few builds, see the "New & Noteworthy" link
+on the Downloads page for 3.0M8 after March 26th, 2004.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15054:  OwnerData or "virtual" Table support  
+<br>21659:  Frames drawn in inappropriate places  
+<br>23335:  Odd lines around buttons  
+<br>30848:  API for Table#showColumn() like Table#showItem()  
+<br>40420:  Shell with style NO_TRIM should not appear in the Window Manager task bar  
+<br>40663:  Dragging views is not synchronised with mouse position  
+<br>47638:  NPE in getParentBackground.  
+<br>50359:  Problem with vertical toolbars and GTK+ 2.3.x  
+<br>51582:  Need the ability to determine "High Contrast" mode  
+<br>54231:  CTabFolder now adds margin around page controls  
+<br>54291:  new TaskTray widget does not compile on Windows CE and GTK64  
+<br>54386:  Stray pixel in SWT table  
+<br>54878:  Drop down coolbar/toolbar menus and combo boxes take too many clicks  
+<br>54990:  ALT+DOWN does not drop down CCombo list  
+<br>55113:  Hover text stuck after drag in CTabFolder  
+<br>55133:  Table.java: java.lang.ArrayIndexOutOfBoundsException with SWT.VIRTUAL  
+<br>55187:  swt v3043b does not work under gtk 2.0.6  
+<br>55300:  StyledText - single and border cause cheese when resize  
+<br>55307:  ViewForm's title area controls are off by one pixel  
+</blockquote>
+
+<h2> SWT Build 3.0 043 - Tuesday March 16, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4809:  SWT Cursor Source and mask are flip-flopped (1GJ80FZ)  
+<br>6593:  Doc: knowing the coordinate space for SWT  
+<br>25336:  CoolBar - computeSize do not respect autobreaks [Emulated]  
+<br>30834:  Minimize to system tray  
+<br>43893:  Scrolling copies wrong bits  
+<br>49778:  Images on MenuBar are not lining up with thier Hotstop  
+<br>50151:  Using SWT.RIGHT on a ToolBar leaves blank space  
+<br>52785:  Eclipse 3.0M7 doesn't run on Fedora Core 2 test1 release.  
+<br>53401:  [64] junit tests don't compile - crashes  
+<br>53837:  Workbench hangs up when hitting space key on readonly combo.  
+<br>54358:  Shells don't fire move event when not visible (BBAWT)  
+</blockquote>
+
+<h2> SWT Build 3.0 042 - Tuesday March 9, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+19654:  Coolbar - resizing window can add rows to coolbars  
+<br>32537:  Menu text and accelerator text overlapping  
+<br>42022:  Mnemonic traversal cannot be suppressed  
+<br>46369:  javadoc should be updated for behavior of selecting multiple items in a single select list  
+<br>51464:  eclipse.exe review/updates  
+<br>51537:  need a way to pass a string to the launcher  
+<br>52536:  [SWT Examples] Setting the style to SWT.FLAT has no effect on Buttons  
+<br>52935:  Emulated Coolbar does not support wrapping  
+<br>52959:  setFont() in TableTreeItem  
+<br>53014:  MessageBox opens modal but unparented  
+<br>53045:  no more handles!  
+<br>53057:  Browser widget and display of special chars  
+<br>53141:  JVM crash at eclipse exit  
+<br>53221:  [SWT Examples] ???Save As??????? Dialog of Image Analyzer does not provide the correct file path  
+<br>53236:  Setting font/color on an item when there is no change should not redraw  
+<br>53361:  [EditorMgmt] New look: editor close button (x) does nothing sometimes  
+<br>53388:  [64] Crash in g_signal_lookup  
+<br>53394:  ArrayIndexOutOfBoundsException in ColorDialog  
+<br>53419:  viewing preference page makes preferences tree unresponsive  
+<br>53430:  Additional fixes for porting SWT to 64-bit  
+<br>53487:  [browser] Suze 9 installs Mozilla into different folder than RH  
+<br>53519:  CheckboxTableViewer does not receive selection events  
+<br>53544:  [Viewers] Checkbox Table Viewer does not provide selection callbacks on a check  
+<br>53549:  remove custom code in Program Gnome  
+<br>53556:  Index out of bounds resizing preference page  
+<br>53570:  Opening the file type association dialog to the external editors view causes Eclipse to crash  
+<br>53638:  eclipse startup problem  
+<br>53723:  Problems with setFont() on TreeItem  
+<br>53832:  VM Crash releated to focus or set font  
+<br>53853:  Selection event for checkbox Table is broken  
+<br>53995:  java_swt crashes if application bundle is named .APP instead of .app  
+</blockquote>
+
+<h2> SWT Build 3.0 041 - Tuesday March 2, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Table.setItemCount(), SWT.VIRTUAL and SWT.SetData have been added and
+implemented on all platforms to support the virtual Table.  This feature
+is "under construction".  Use at your own risk.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4575:  desire exception checks for inputProc/windowCallback (1G55O7P)  
+<br>17659:  Eclipse crashes when switching Encoding to UTF-16 (little endian)  
+<br>20364:  Slider control does not take focus  
+<br>39892:  SWT error thrown when refreshing the properties page  
+<br>45845:  scrollbars on ScrollingGraphicalViewer sometimes does not work  
+<br>45945:  Drawing issues with SWT 2.1.1 under PocketPC 2002  
+<br>46156:  Eclipse crash with KERN_PROTECTION_FAILURE when customizing perspective  
+<br>49082:  Unsupported color depth does not throw an exception in Linux GTK  
+<br>52295:  Monochrome bmp and ico image data, and icon masks are not always handle correctly  
+<br>52733:  Deadlock expand of HEAD  
+<br>52862:  SPACE gets inserted into styledtext using system menu  
+<br>53063:  Changing the style of a Label from SWT.SHADOW_IN to SWT.SHADOW_NONE does not make a difference in the appearance of the Label  
+<br>53128:  Shell.setRegion() should check if region is disposed...  
+<br>53440:  critical warnings when running jnigen tool  
+</blockquote>
+
+<h2> SWT Build 3.0 040 - Tuesday February 24, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Point Menu.getSize() added
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6781:  Cannot draw unicode string  
+<br>38643:  Toolbar computeSize stop working after WM_SETFONT  
+<br>38714:  Table and table cursor buggy scrolling. It is impossible to use properly the table widget when the table cursor is involved.  
+<br>42554:  Double icon in the dock on OSX  
+<br>48341:  Cannot get height of Menu and no capabilities for work around  
+<br>50107:  SWT does not compile successfully against CLDC (i.e. j2me)  
+<br>51374:  Need MenuBar to support Images on PocketPC  
+<br>51645:  Java core when running event loop on the Sun  
+<br>51671:  Text not redrawn on new look CTabFolder  
+<br>51777:  TableItem.getBounds(int) returns the wrong values when table scrolled  
+<br>52024:  [NewLook] curvy lines have inconsistent line width  
+<br>52242:  New Look: white banding in view and editor tabs  
+<br>52255:  Found small problem in snipets code  
+<br>52335:  Snippet108.html missing code  
+<br>52337:  LZWCodec#maskTable should be a static final field  
+<br>52541:  [SWT Examples] CoolBar Buttons with a dropdown menu do not behave correctly  
+</blockquote>
+
+<h2> SWT Build 3.0 039 - Tuesday February 17, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<p>CTabFolder has been modified to display the new look for 3.0.  
+Please note that the new 3.0 API in CTabFolder has not been finalized and is subject to change.</p>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21430:  Accessibility:JAWS can not read label for multi-lines Text  
+<br>38194:  SWT performance issues with JAWS 4.5  
+<br>38564:  [Import/Export] On MacOS X SWT Buttons easily get wrong height  
+<br>43257:  org.eclipse.swt.custom.StyledText is not accessible  
+<br>44236:  Jaws doesn't read eclipse's main menus  
+<br>44946:  TableCursor always paints left-aligned text  
+<br>47264:  I-Beam displayed in wrong control (Run... dialog)  
+<br>48273:  [wm2003] pocket pc - issues with popup menu  
+<br>48327:  [WM2003] Problem with PaintListener on PocketPC WM2003  
+<br>49797:  [WM2003] GC cannot instantiate on PPC 2003  
+<br>51031:  Broken arrows on multi page  
+<br>51036:  Tree Widget opens then closes on RETURN/ENTER  
+<br>51088:  Patch(es) to fix redraw bug after ControlEditors close.  
+<br>51248:  GUI thread does not process the GUI update requests timely, causing the display to be unresponsive  
+<br>51401:  can't find java.awt.* packages using IBMs 1.4.1 VM on linux  
+<br>51472:  Error launching Browser plugin in pre-M7 build  
+<br>51492:  changing TabFolder foreground colour is not immediately reflected  
+<br>51831:  StyledText doesn't specify contents of its SelectionEvents  
+</blockquote>
+
+<h2> SWT Build 3.0 038 - Tuesday February 10, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+ACC.ROLE_TREEITEM added
+<br>ACC.ROLE_TABLECELL added
+<br>ACC.ROLE_TABLECOLUMNHEADER added
+<br>ACC.ROLE_TABLEROWHEADER added
+<br>TableItem.setFont(Font) and TableItem.setFont(int, Font) added
+<br>TableItem.getFont() and TableItem.getFont(int) added
+<br>Table.showColumn(TableColumn) added
+<br>LocationEvent.top added
+</blockquote>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<blockquote>
+ACC.ROLE_TABLECOLUMN deprecated - use ROLE_TABLECOLUMNHEADER instead.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+37742:  ACC: missing an item correspondent with ROLE_SYSTEM_OUTLINEITEM defined by MSAA  
+<br>43091:  [browser] Browser - LocationEvent behavior  
+<br>44063:  Clipboard of GTK on KDE : Eclipse crash  
+<br>44943:  TableCursor color set incorrectly  
+<br>50522:  [interop] Components in SWT_AWT don't show in Workbench.  
+<br>50907:  JPEG loader fails to load image  
+<br>51081:  Tracker flickers when using setRectangles to hold it in place  
+<br>51325:  SWT_AWT:The color depth of the display changed cause NullPointerException  
+<br>51372:  [browser] certain event strings contain an extra null char
+</blockquote>
+
+<h2> SWT Build 3.0 037 - Tuesday February 3, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+50639:  Deadlock creating image outside UI thread  
+<br>50718:  get doc title from Browser  
+<br>50130:  gtk and motif don't compile against CLDC  
+<br>50778:  Java doc problems  
+<br>50547:  MessageBox locks out application  
+<br>50520:  RCP: Need ability to set close button per item on CTabFolder  
+<br>50709:  Right Aligned Table Column Headers do not appear until after a resize  
+<br>49828:  [browser] Browser control does not always send completed progress event  
+<br>48899:  [browser] browser plugin not included into the eclipse example zip file  
+<br>50991:  [browser] mozilla - must support older version mozilla 1.4  
+<br>50777:  [browser] mozilla dependencies on unfrozen api  
+</blockquote>
+
+<h2> SWT Build 3.0 036d - Tuesday January 27, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Browser.backEnabled() added
+<br>Browser.forwardEnabled() added 
+<br>Browser.addTitleListener(TitleListener) added 
+<br>Browser.removeTitleListener(TitleListener) added 
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+46225:  3.0M4 doesn't work with gtk2.3.0  
+<br>50301:  Characters typed are displayed backwards.  
+<br>50518:  CLabel should support a vertical gradient
+<br>49971:  NPE when closing workbench  
+<br>50377:  Swt MANIFEST.MF not adjusted to repackaging of SWT_AWT.  
+<br>50256:  Text#getCaretLocation() sends erroneous Modify event  
+<br>45419:  [browser] add api to read html from memory on Photon Browser  
+<br>47936:  [browser] Back/Next event support in WebBrowser  
+<br>48809:  [browser] breaking change - rename LocationEvent.cancel to LocationEvent.doit and reverse boolean meaning  
+<br>50405:  [browser] Linux: switch to Mozilla 1.6  
+<br>50437:  [browser] send title event  
+<br>50034:  [interop] swing mouse events not received in RCP plugin  
+<br>50483:  [interop] swt SWT_AWT & ui ViewPart  
+</blockquote>
+
+<h2> SWT Build 3.0 036 - Tuesday January 20, 2004 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Display.getIconSizes() added
+<br>Display.getCursorSizes() added 
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+50153: API - Breaking change - replace Display.getCursorSize with Display.getCursorSizes  
+<br>50161: NEW API - Display.getIconSizes
+<br>49942: NPE in StyledText.getSelectionRange (line 4275)
+<br>48653: NPE in StyledText.performPaint (line 6084)
+</blockquote>
+
+<h2> SWT Build 3.0 035 - Tuesday January 13, 2004 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote> 
+46800:  Arrow button doesn't receive focus  
+<br>49154:  Combo behavior not very user-friendly   
+<br>49534:  Javadoc of 'Control' should mention 'Traverse' event  
+<br>32828:  Loss of the modal context  
+<br>49471:  M6 image leak   
+<br>47279:  OS.ExpandEnvironmentStrings crashes on zero-length string  
+<br>49502:  Snippet 90 miss class specification  
+<br>49503:  Snippet 98 missing import statements  
+<br>49723:  StyledText is leaking StyleRange objects again  
+<br>49401:  SWT M6 outdated Manifest File prevents use of SWT_AWT from within Eclipse  
+<br>49381:  SWT.RIGHT does not work in Text  
+<br>49488:  swt_awt.c and swt_awt.rc files not in source bundle  
+<br>45149:  The position of IME input field is wrong.  
+</blockquote>
+
+<h2> SWT Build 3.0 034 - Monday December 15, 2003 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+39606:  JAWS 4.5 not reading tabs    
+<br>48263: EC: gtk allows TabItem.setControl(...) value to be non-child of TabFolder.    
+<br>48343:  DCR: Provide means to get preferred cursor size
+<br>47928:  overly stringent bounds tests in Text.getText
+<br>48233:  [KeyBindings] shortcut Command+Space not working
+<br>22228:  [Workbench] program icon in ALT+TAB window looks ugly
+<br>48271:  EC: Control.setVisible doesn't do isDisposed() check
+</blockquote>
+
+<h2> SWT Build 3.0 033 - Tuesday December 9, 2003 </h2>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<blockquote>
+<code>Slider.setThumb(int), Slider.setValues(...), ScrollBar.setThumb(int)</code> and
+<code>ScrollBar.setValues(...)</code> now clamps the passed thumb value if it exceeds
+the receiver's range.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+48036:  [browser] crash on IE when using javascript to close more...
+<br>48022:  3 mouse clicks cause 4 mouseDown events
+<br>47894:  Combo layout problems
+<br>47916:  [browser] crash on IE when setting text multiple time wit...
+<br>47885:  [browser] provide a resize event
+<br>48168:  [browser] breaking change - changing names of WindowEvents
+<br>45989:  Slider/Scrollbar API doc
+<br>47898:  StyledText leaking StyleRanges
+<br>47190:  Documentation missing
+<br>48297:  [browser] investigate support for Mozilla Firebird
+</blockquote>
+
+<h2> SWT Build 3.0 032 - Tuesday December 2, 2003 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+org.eclipse.swt.awt.SWT_AWT class added for Windows, GTK and Motif - the class is not internal anymore
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+33687:  Combo widget does not size itself to handle largest entry
+<br>47170:  cheese when resize with focus ring
+<br>47557:  No images returned by Program.getImageData()
+<br>47245:  setEditable() method for Combo or CCombo
+<br>47468:  Support "full keyboard access" mode.
+<br>38149:  SHIFT + spacebar doesn't work
+<br>46810:  unexpected behavior for TableItem.setBackground() when co...
+<br>46641:  Browser widget: footprint and guidelines question
+<br>46707:  NPE when closing eclipse.
+<br>47366:  [New Look] Area not painted when tab in the background
+<br>46751:  [browser] Javascript window.close() does not work in the ...
+<br>46896:  CCombo setEnabled
+<br>47109:  Resize buttons horizontally leaves cheese
+<br>47530:  [New Look] Cheese when adding to a banner
+<br>47143:  List.add() != List.getItems() if string contains '\n'
+<br>34797:  API: Clipboard:isDisposed
+<br>47426:  [browser] breaking change - Replace NewWindowEvent with O...
+<br>29396:  Unable to get session data when using internal browser
+<br>47039:  Inconsistent shutdown
+<br>47391:  Combo.deselect(int) and deselectAll() doesn't work
+<br>44567:  Clipboard.dispose throws NPE
+</blockquote>
+
+<h2> SWT Build 3.0 031 - Tuesday November 25, 2003 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+46848:  Circumflex accent for characters does not work
+<br>46859:  Combo API doc/problems
+<br>16011:  Copy not working.
+<br>47146:  Group label should have same foreground/background as Group
+<br>47084:  No mouseUp events for the left mouse button
+<br>46068:  [browser] linux motif Browser shows up non embedded if previous instance disposed
+<br>40460:  [Key Bindings] Some shortcut keys broken
+</blockquote>
+
+<h2> SWT Build 3.0 030 - Tuesday November 18, 2003 </h2>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<blockquote>
+<ul>
+<li><code>DirectoryDialog.setMessage(String string)</code> now throws an <code>IllegalArgumentException</code> if
+<code>string</code> is <code>null</code>
+<li><code>MessageBox.setMessage(String string)</code> now throws an <code>IllegalArgumentException</code> if
+<code>string</code> is <code>null</code>
+<li><code>Text.getText(int start, int end)</code> now throws an <code>IllegalArgumentException</code> if
+<code>start</code> is negative, if <code>end</code> is equal to or greater than the length of
+the receiver's text, or if <code>start</code> is greater than <code>end</code>.
+</ul>
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+34128:  classpath incomplete  
+<br>46688:  eclipse 3.0M4 left out a char symbol behind
+<br>46722:  Crash on open of any java source  
+<br>38981:  Decorations.getMaximized() always returns false  
+<br>46582:  gtk setSelection(*) does not set focus properly  
+<br>22010:  GTK: Combo.setForeground() and Combo.setFont() dont change the drop-down list  
+<br>46702:  List.getFocusIndex() does not answer -1  
+<br>46500:  MessageBox.setMessage(null) has to be spec'd  
+<br>45787:  Panther: intitial Textfield contents only partially visible  
+<br>46419:  Text.getText(int,int) needs to spec behaviour for invalid range 
+<br>42408:  [browser] Javascript window.open() does not work in the Browser widget  
+<br>23084:  [StyledText Motif 2.0.1] Cursor disappears while moving by words (forwards/backwards)  
+<br>36010:  [View Mgmt] View menu "Move" and "Size" commands have no effect.  
+</blockquote>
+
+<h2> SWT Build 3.0 029 - Tuesday November 11, 2003 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+GC.drawPoint(int x, int y) added
+<br><code>DragDetect</code> event objects now have their <code>x</code> and <code>y</code> fields
+set to the control-relative x and y coordinates of the drag start
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+46354:  add to javadoc for List.remove(int start, int end)  
+<br>42426:  Backport BiDi Mirroring Fixes from 3.0 and 2.1.x  
+<br>46029:  bad alignment in Import plugins wizard  
+<br>32772:  Cannot hold down stepping keys on OSX  
+<br>44390:  column separator disappeares after resizing the first column to zero width  
+<br>46306:  ControlExample: multiple Select Listeners dialogs is confusing  
+<br>33637:  DCR - no printing on Mac [was Print on OSX 10.2.4]  
+<br>43251:  DragDetect event should have x and y coordinates  
+<br>28684:  Drop-Down arrows hard to hit  
+<br>21075:  Import to filesystem can only browse when empty  
+<br>45877:  many German strings are not displayed  
+<br>38521:  Mouse events delivered to wrong Control  
+<br>45946:  Need an efficient GC.setPixel( x,y ) method.  
+<br>41465:  Panther: ToolItem(DROP_DOWN) arrow has wrong background  
+<br>45453:  pocketpc - Pop-Up menus do not work on Tables  
+<br>45422:  Pull-down menu only shows up on mouse-up, rather than mouse down  
+<br>43108:  StyledText - Scrollwheel event interferes with last caret placement  
+<br>46368:  Table array exception when removing invalid lower range  
+<br>46037:  text editor - <home> positions editor in first page  
+<br>45789:  Toolbar dropdown items don't fire immediately  
+<br>45940:  Votes on closed bugs?  
+<br>46028:  [browser] IE browser still shows default popup menu  
+<br>45997:  [browser] support and require Mozilla 1.5  
+<br>46147:  [browser] SWT accelerators get overriden by IE  
+<br>44919:  [KeyBindings] dialog keyboard shortcuts gone  
+<br>45362:  [KeyBindings] French Keyboard issue with 0 key (SHIFT + ???????)  
+<br>37740:  [KeyBindings] Text tool item on the Viewpart Title takes menu's accelerator key  
+</blockquote>
+
+<h2> SWT Build 3.0 028 - Tuesday November 4, 2003 </h2>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<blockquote>
+<code>FileDialog.getFileNames()</code> now returns an empty <code>String</code> array instead of <code>null</code>
+when there are no file names to answer.
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+36083: NPE in Cursor.dispose
+<br>5096: FileDialog doesn't allow to set file name
+<br>22785: FileDialog: File paths incorrect
+<br>26771: motif test case failures
+<br>26913: All platforms should clear mouse capture when modal dialog is opened
+<br>34408: Shift Tab does not work in java editor
+<br>44878: StyledText - Arrow_Down in text editor doesn't retain column when it scrolls
+<br>45323: Error occurred using F3 to open class
+<br>45628: cannot traverse to ToolBar items
+<br>45800: Tracker (RESIZE) with multiple Rectangles losing precision
+<br>45834: FileDialog API spec problems
+<br>8507: SWTError thrown instead of SWTException
+<br>11663: unnecessary focus events on linux-motif
+<br>24319: Key events don't send to code completion dialog
+<br>25494: Mnemonic keys in editor menu don't work on gtk.
+<br>26101: Strange behaviour in VerifyListener under GTK
+<br>26170: SWT widget org.eclipse.swt.widgets.Label does not properly display its text under Linux Gtk when given a SWT.WRAP style.
+<br>35811: Resize workbench shell causes fastview z-order cheese
+<br>36153: No F1 help in Java editor
+<br>37510: Shift + F10 does not work in GEF on Linux
+<br>43683: [SWT] request function keys F13, F14, and F15 be supported
+<br>45457: [ViewMgmt] View contents rendered on top of fast view
+<br>45552: Crash when viewing MicroAnalyzer trace on Linux
+<br>21035: [Key Bindings] Ability to map keypad key events
+<br>24178: (BBAWT) Certain keys do not generate KeyEvents
+<br>43871: Ctrl+Break is interpreted as Ctrl+C Ctrl+C
+<br>45640: PENs are being leaked during painting
+<br>4622: DCR: No auto tab select on first tab created (1GCEDI4)
+<br>31107: CTabFolder and CCombo - too many sheels from tooltip shell
+<br>33934: CTabFolder's closeImage invisible in High Contrast mode
+<br>33945: CTabFolder tooltips overlap cursor
+<br>38805: Switching perspectives on Linux GTK seems to be slow due to large number of toolbar creations
+<br>42278: CTabFolder throws exception when closing a tab
+</blockquote> 
+
+<h2> SWT Build 3.0 027 - Tuesday October 28, 2003 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+45267:  BIDI: Mirrored text appears on every editor  
+<br>38585:  ControlExample - Checkbox Tree preferred size a tad too small  
+<br>35494:  ControlExample - Table preferred size does not adjust width  
+<br>22287:  Crash when calling SWT Combo.setText()  
+<br>41420:  Deleting the first column of a Table may throw an exception  
+<br>45439:  Double clicking the left upper corner of the nested Decoration closes the parent Shell  
+<br>45341:  FileDialog crashes VM on invalid drive  
+<br>34362:  GB18030-Motif: Crash when typing CN in the JavaEditor  
+<br>43500:  InvalidThreadAccess when running a subset of JUnit tests  
+<br>45306:  Mouse events lost in shell launched from secondary application modal shell  
+<br>45337:  pocketpc - can't show popup menu in Tree  
+<br>41060:  preferences dialog and editing paste functions wedged  
+<br>42367:  StyledText - StringIndexOutOfBoundsException in StyledTextRenderer  
+<br>44474:  StyledText does not handle case where printing not supported  
+<br>44050:  SWT.BORDER Text should display thin black border on PocketPC  
+</blockquote> 
+
+<h2> SWT Build 3.0 026 - Wednesday October 21, 2003 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+44896: 2 junit tests have been intermittently failing in nightly build  
+<br>43811: 3.0M3 fails startup  
+<br>42410: A way to check if SWT Browser is implemented and working is needed.  
+<br>44174: Eclipse crashes using SWT Designer plugin 
+<br>44232: ImageData constructor should thrown IllegalArgumentException for scanlinePad == 0  
+<br>44832: Opening a PRIMARY_MODAL dialog on top on another PRIMARY_MODAL dialog shoud not enable the parent of the first.  
+<br>44301: SashForm - Sashes have no borders  
+<br>45145: Second window comes to front when using first  
+<br>40873: Splash Screen Has Wrong Colors on Linux  
+<br>42947: StyledText - redraw problem on last line with word wrap   
+<br>43837: [browser] Browser - linux can't dispose a browser and open a new one  
+<br>45122: [browser] Mozilla browser forward() back() always return true  
+<br>45118: [browser] mozilla browser throws exception after reload in some cases  
+<br>39106: [DBCS] Cannot input Japanese characters into Text widget with GTK+2, kinput2 and canna  
+</blockquote> 
+
+<h2> SWT Build 3.0 025 - Wednesday October 15, 2003 </h2>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+TabFolder style bits SWT.TOP and SWT.BOTTOM added
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+44212: FocusEvents/KeyEvents from Scale not delivered  
+<br>43729: GC.drawText() does not work on large images  
+<br>44508: GC.getCharWidth JUnit test failure on Win98  
+<br>44600: gnome Program does not return icon  
+<br>44476: GP on shutdown  
+<br>44223: Group widget doesn't pass focus when pressing mnemonic  
+<br>44607: Gtk critical warning when running swt app  
+<br>44372: NPE on hitting Esc to dismiss inline table edit  
+<br>44516: Remove println's from FontData JUnit test  
+<br>43878: SWT HTML Widget / Browser embedding problem on Linux  
+<br>22983: Table.showItem() ignored before bounds are set  
+<br>44778: TableItem.getImage periodically throws ArrayOutOfBoundsException  
+<br>43281: Text field throws StackOverflowError when full  
+<br>44509: Text.setTextLimit JUnit test failure on Win98   
+</blockquote> 
+
+
+<h2> SWT Build 3.0 024 - Tuesday October 7, 2003 </h2>
+
+<h3><a NAME="Breaking Changes"></a>Breaking Changes</h3>
+
+<p>Methods <code>ImageLoader.addImageLoaderListener(ImageLoaderListener)</code> and
+<code>ImageLoader.removeImageLoaderListener(ImageLoaderListener)</code> now throw an SWT Error
+if <code>null</code> is passed as the argument.
+</p>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Region.add(int[] polygon) added
+<br>Region.subtract(int[] polygon) added
+<br>Shell.getRegion() added
+<br>Shell.setRegion(Region) added
+<br>ACC.TEXT_INSERT added
+<br>ACC.TEXT_DELETE added
+<br>Accessible.addAccessibleTextListener(AccessibleTextListener) added
+<br>Accessible.removeAccessibleTextListener(AccessibleTextListener listener) added
+<br>Accessible.selectionChange() added
+<br>Accessible.textCaretMoved(int) added
+<br>Accessible.textChanged(int,int,int) added
+<br>Accessible.textSelectionChanged() added
+<br>org.eclipse.swt.accessibility.AccessibleTextAdapter added
+<br>org.eclipse.swt.accessibility.AccessibleTextEvent added
+<br>org.eclipse.swt.accessibility.AccessibleTextListener added
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>  
+44161:  addImageLoadListener should check for null 
+<br>43971:  Double clicking no longer works  
+<br>42559:  Eclipse 3.0 M3 - can't start Eclipse from the command line  
+<br>43706:  Palette desc saying 'no items for this editor' doesnt wrap on linux  
+<br>40940:  Printing disabled in Solaris  
+<br>43918:  Some mouse clicks don't work  
+<br>44164:  update needed in javadoc for constructor Image(Device , ImageData)  
+<br>44165:  update needed in javadoc for constructors ImageData specifying colorDepth  
+</blockquote> 
+
+
+<h2> SWT Build 3.0 023 - Tuesday September 30, 2003 </h2>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>  
+43610:  'Shift+Alt+' gives 0x00 as key code and character  
+<br>43538:  Ctrl+Space gives two key down events  
+<br>42225:  Can't assign command to Ctrl+Backspace  
+<br>43597:  [SWT] Text.setText(..) can change font inappropriately on Mac OSX  
+<br>43599:  [KeyBindings] accelerators on Mac OS X 'application menu' should not always be active  
+<br>34790:  Search view doesn't reposition scrollbar  
+<br>38757:  BIDI - on a 102 keyboard, English Layer, there is a key conflict  
+<br>40085:  Cursor key scrolling in code assist table doesn't update scrollbars 
+<br>43311:  KeyReleased event is not fired when the '4' key is released on spanish keyboards  
+<br>43394:  ImageAnalyzer example failed to read PNG file.  
+<br>43576:  "Alt+Space" traversal cannot be blocked  
+<br>43613:  Integrate isComplete() work and merge with patches  
+<br>43667:  New Synch View layout  
+<br>43757:  Table answers its Header as a child  
+<br>43778:  Browser - mozilla GTK into Motif appears in top level window  
+<br>43779:  Browser - mozilla GTK into Motif gets hidden by shell proxy focus  
+<br>43780:  Implement Browser on Linux Motif  
+<br>43177:  Text.setText() triggers two ModifyEvents  
+<br>43808:  StyledText deletes too many characters in some situations  
+<br>43094:  Provide a how-to on running SWT snippets  
+</blockquote> 
+
+
+<h2> SWT Build 3.0 022 - Tuesday September 23, 2003 </h2>
+
+<h3>
+<a NAME="Breaking Changes"></a>Breaking Changes</h3>
+
+<p>The Event.keyCode field now contains the unaffected keycode value.  For example,
+when the user types Ctrl+Shift+'a', the keyCode field contains 'a'.  The character
+field is unaffected and contains the same value as before (0x01).
+</p>
+
+<h3><a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Combo.getOrientation() added
+<br>Combo.setOrientation(int) added
+<br>StyledText.getOrientation() added
+<br>StyledText.setOrientation(int) added
+<br>Text.getOrientation() added
+<br>Text.setOrientation(int) added
+</blockquote>
+
+<h3><a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>  
+38094:  [Enter] key doesn't work in text editors  
+<br>30273:  [Key Bindings] DBCS: "F1" funtion key does NOT work on Linux_GTK.  
+<br>15538:  Label requires border to draw correctly  
+<br>21555:  View menu remains open on GTK  
+<br>33198:  [Wizards] Error message in Wizard clipped  
+<br>37608:  [Bidi] StyledText - support dynamic changing of orientation  
+<br>42467:  Photon - implement the SWT browser widget  
+<br>43125:  Bidi: DCR setOrientation API for Text and Combo widget  
+<br>43262:  XmTextPaste native declares jboolean return, does not do so  
+</blockquote> 
+
+<h2> SWT Build 3.0 021 - Tuesday September 16, 2003 </h2>
+
+<h3>
+<a NAME="Breaking Changes"></a>Breaking Changes</h3>
+
+<p>Canvases now see Ctrl+Tab, Shift+Tab, Ctrl+PgUp and Ctrl+PgDn by default instead of traversing.
+This change was made for the Eclipse key binding work.  The rule that Canvases see every key was
+broken in previous versions of SWT due to a last minute accessibility work around for 2.0.
+</p>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote> 
+42897:  BIDI: CHECK style doesn't work with RTL Tree or Table  
+<br>42787:  CheckboxTableViewer does not clear selection   
+<br>42202:  JDTUI tests don't finish    
+<br>15307:  DCR - Ability to forbid SWT button (PUSH style) to become default needed  
+<br>32790:  Breakpoint hover is flaky on OS X  
+<br>37863:  Text's focus border has wrong background 
+<br>39987:  BIDI: MIRRORED bit can't be switched on in the style's bitmap of any SWT widget.  
+<br>40006:  BIDI: rtl-oriented StyledText has overlapping segments problem  
+<br>41039:  Hitting the Enter/Return key in the Find/Replace dialog doesn't do anything on Mac OS X  
+<br>42349:  Bogus implementation for GC.drawText (String string, int x, int y, int flags) on Mac  
+<br>42353:  drawString/drawText do not work properly on GTK.  
+<br>42512:  MenuBar on Decorations are not refreshed  
+<br>42724:  StyledText - selection rendered incorrectly on bidi platforms  
+<br>42818:  DirectoryDialog does not show its set message  
+<br>42882:  remove platform code throwing ClassNotFound exception  
+<br>43011:  "Alt+" key strokes not always received on "zh_CN.GB18030"  
+</blockquote>
+
+
+<h2> SWT Build 3.0 020 - Tuesday September 9, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote> 
+4776:  StyledText - GC.stringExtent returns incorrect value (1GI7ALA)  
+<br>35589:  StyledText - add getStyleRanges(start, offset) API  
+<br>35826:  GPs on exit  
+<br>38983:  StyledText - ignore WRAP when SINGLE style is specified  
+<br>40019:  BIDI: StyledText has problem with drawing of selection in both ltr and rtl orientation of this widget in the bidi locale.  
+<br>40406:  Clicking in tree does not bring window to the front.  
+<br>40693:  Text - No Verify/Modify when a modifier key is down  
+<br>40800:  org.eclipse.swt.widgets.Text, method append(), bottom focusing error  
+<br>41748:  [Keybindings] Keyboard Shortcuts not working  
+<br>41773:  underscore dissapears in editor if font is bold Courier New size 9  
+<br>41899:  Odd font names returned by getFontList on Mac  
+<br>42259:  StringIndexOutOfBoundsException in FontData.getLocale()  
+<br>42266:  NPE when opening Compiler preference page  
+<br>42275:  Device.getFontList() is inconsistent across platforms.  
+<br>42293:  Menu item too large  
+<br>42323:  Eclipse won't start after renaming Eclipse.app  
+<br>42460:  Browser - report location before it is changed  
+<br>42465:  StackOverflow on Keys preference page  
+<br>42697:  multiselect in pocket pc  
+</blockquote>
+
+
+<h2> SWT Build 3.0 019c - Tuesday September 2, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+39781:  Selection events not fired from Combo  
+<br>40560:  Label with text and image set tries to display both  
+<br>41330:  Import|filesystem Form Directory input acts strange  
+<br>41619:  SWT does not render Unicode glyphs > 255  
+<br>41707:  Exception causes Members view to become empty  
+<br>41968:  Some menu item texts appear blank on Solaris 9 x86  
+<br>41980:  GP showing Workbench - Appearance preference page  
+<br>42008:  Corrupt Tree view-model after disposing last treeItem  
+<br>42150:  Browser plugin not working on GTK  
+<br>42182:  Externalize strings wizard is broken  
+</blockquote>
+
+
+<h2> SWT Build 3.0 019 - Monday August 25, 2003 </h2>
+
+<h3>
+<a NAME="Breaking Changes"></a>Breaking Changes</h3>
+
+<p>Keydown events now run before the work is done in the Operating System.  This means, for example, 
+that if you hook a key down event in a text widget and inside the key down event, get the content of 
+the text widget (Text.getText()), the content will not contain the key that was just typed.  
+To get the content with the latest character you can use Display.asyncExec - this will run after 
+the Operating System has processed the key down.  Note: in this case you probably should 
+have been using the SWT.Modify or SWT.Verify event.</p>
+
+<p>This change was made to support key bindings in Eclipse so that they could intercept
+key events before any widget had a chance to process the character.</p>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+<blockquote>
+Region(Device) added
+<br>Region.intersect(Rectangle) added
+<br>Region.intersect(Region) added
+<br>Region.subtract(Rectangle) added
+<br>Region.subtract(Region) added
+<br>Rectangle.intersect(Rectangle) added
+<br>Rectangle.intersects(int, int, int, int) added
+<br>TableItem.setBackground(int, Color) added
+<br>TableItem.setForeground(int, Color) added
+<br>TableItem.getBackground(int) added
+<br>TableItem.getForeground(int) added
+</blockquote>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20536: SWT error during Tracker instantiation in GTK  
+<br>40529: SWT examples: setup doc bug    
+<br>41840: Windows only - Browser widget with Mozilla  
+</blockquote>
+
+
+<h2> SWT Build 3.0 018 - Wednesday August 20, 2003 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+
+<p>Browser class added for Windows and Linux GTK</p>
+<p>36952:	[Plan Item] Display HTML in a widget</p>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>    
+41201:  GTK-BIDI: RTL support in Label
+<br>41362:  GTK-BIDI: RTL support in Group
+</blockquote>    
+
+
+<h2> SWT Build 3.0 017a - Tuesday August 19, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>    
+22322: AWT Container is a SWT container does not get its background painted in JDK 1.4.0  
+<br>39752: SWT_AWT support for Java 1.4  
+<br>40828: Vertical toolbar strange behavior       
+<br>41418: FormLayout causing infinate loop.  
+<br>41424: Javadoc is bogus for GC.drawArc  
+<br>41455: TableColumn#setWidth(int width) allow width=0 but GTK doesn't like it  
+<br>41620: eclipse.exe on Mac truncates error messages longer than 255 chars  
+<br>41627: Editable Combo incorrect width  
+</blockquote>
+
+
+<h2> SWT Build 3.0 017 - Tuesday August 12, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>    
+4608: Canvas.setRedraw(true) makes widget visible (1G975VG)  
+<br>6220: Workbench is automatically brought to front in focus follows mouse mode  
+<br>38605: CTabItem cannot be created in Linux-GTK  
+<br>39173: Thread processing is extremely slow on GTK. (BBAWT)  
+<br>40102: [Viewers] ITreeViewerListener.treeExpanded() is called twice  
+<br>40156: CTabFolder's client area is off by a few pixels when there are no tabs  
+<br>40624: JVM crash caused by org.eclipse.swt.internal.motif.OS.XmImSetValues(Native Method)  
+<br>40884: Eclipse crashes with Sun jdk 1.4.2  
+<br>40899: Eclipse 2.1.1 does not come up on HP when remotely attaching from a linux box  
+<br>41067: OLE ref count problem when opening file for read  
+<br>41111: [portability] DirectEdit editor misplaced after using scroll wheel  
+<br>41188: GTK-BIDI: RTL support in Button  
+<br>41200: GTK- contents of check and radio buttons can't be aligned to center and to the trailing edge of widget.  
+<br>41233: Control added after open() doesn't get painted unless the window is resized.  
+<br>41324: Preferences->Workbench->Appearance crashes JVM [Motif]  
+<br>41347: CCombo shouldn't fire defaultSelection on mouse list selection  
+<br>41366: Widget is disposed exception while layout  
+<br>41375: FormLayout.layout takes too long for more controls  
+</blockquote>   
+
+
+<h2> SWT Build 3.0 015 - Tuesday July 29, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>    
+36927: UI does not get focus on multiscreen Suse 8.2  
+<br>37095: BIDI - When starting Eclipse from Arabic locale it is always RTL oriented  
+<br>38349: wizard description showing border and caret  
+</blockquote>   
+
+
+<h2> SWT Build 3.0 015 - Tuesday July 29, 2003 </h2>
+
+<h3>
+<a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<p>
+<b>Motif and Photon: Change of event ordering in Table and Tree</b>
+<p>
+The ordering of selection events has changed on these platforms to become consistent with that of win32:
+<ul>
+<li>The previous ordering of Selection-MouseDown-MouseUp has been changed to MouseDown-Selection-MouseUp for mouse (de)selections</li>
+<li>The previous ordering of Selection-KeyDown-KeyUp has been changed to KeyDown-Selection-KeyUp for keyboard (de)selections</li>
+</ul>
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>    
+33370:  event firing differences (win32/motif)   
+<br>37578:  TableColumn does not notify of Resize event  
+<br>38712:  'Gtk CRITICAL' error being roported by SWT in Linux-GTK. (BBAWT)  
+<br>39401:  Swing interoperability - solution proposal  
+<br>39730:  code assist popup does not take focus  
+<br>40652:  GTK Linux - Memory Leak  
+</blockquote>   
+
+
+<h2> SWT Build 3.0 014f - Tuesday July 22, 2003 </h2>
+
+<h3>
+<a NAME="Breaking Changes"></a>Breaking Changes</h3>
+<p>
+<b>Clipboard API must be called from UI Thread</b>
+<p>
+On GTK, Clipboard interactions run an event loop which must 
+be executed in the UI Thread.  As a result, on all platforms,
+invoking the Clipboard API from a non UI thread will result 
+in an SWT Exception of ERROR_THREAD_INVALID_ACCESS.
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+33355: Button with ARROW style answers getText() differently  
+<br>35761: ControlExample - Label - Image labels issue with SWT.WRAP  
+<br>35861: crash in gtk_editable_delete_selection on GTK 2.2.1/Redhat 7.1  
+<br>36611: Tracker resize events are not sent correctly  
+<br>38224: Tracker implementation on GTK incomplete  
+<br>38777: Out of bound exception in ColorDialog  
+<br>38855: Table.getImageBounds returns incorrect value  
+<br>39011: Multimonitor - add api to get monitor which 'owns' a widget  
+<br>39840: No context menu on the fast view icons and perspective icons  
+<br>39965: gtk has trouble processing events until window pop  
+<br>39987: BIDI: MIRRORED bit can't be switched on in the style's bitmap of any SWT widget.  
+<br>40130: StyledText - add accessibility support to StyledText  
+<br>40155: Font.dispose() throws NPE  
+<br>40158: Right click on a tree doesn't select the element  
+<br>40159: Combo throws exception in junit test  
+<br>40216: Right CTRL+SHIFT right justifies text and reverses scroll bars  
+<br>40242: Text being reversed while hitting Ctrl+Shift  
+</blockquote>   
+
+
+<h2> SWT Build 3.0 014 - Tuesday July 14, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+30021: Font and Color dialogs hang on JVM 1.4.1  
+<br>37030: No focus listener control in SWT combo on Linux platform  
+<br>37428: Extra pop up menu on text widget with setMenu  
+<br>39032: StyledText - exception in autoscroll in bidi  
+<br>39166: crash  
+<br>39236: Completely different behaviour for creating a shell with a parent versus calling setParent
+<br>40030: StyledText - auto scroll next in SINGLE mode does not stop  
+</blockquote>
+
+
+<h2> SWT Build 3.0 013 - Thursday July 10, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+37490: BIDI: text in the rtl-oriented Text control can't be aligned to the trailing edge of this control.  
+<br>39013: scrolling down in editor corrupts contents  
+<br>39380: TabFolder not working in QNX 6.2.1  
+</blockquote>
+
+
+<h2> SWT Build 3.0 012 - Tuesday July 8, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+39443: GTK Error calling TreeItem.getExpanded() on a tree item being disposed.  
+<br>39084: Combo.add firing unnecessary events (BBAWT)  
+<br>21212: GTK:Selecting a Checkbox from within the selection callback causes infinite loop(BBAWT)  
+<br>19614: NO_RADIO_GROUP does not work on GTK  
+<br>39119: Text.ComputeSize(0) returning 0 on GTK (BBAWT)  
+<br>34386: Traversing out of Table header can lead to warning  
+</blockquote>
+
+
+<h2> SWT Build 3.0 011 - Tuesday July 1, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>   
+38975: PropertySheetViewer gets IllegalArguementException if RootElement set before visible  
+<br>39319: Eclipse often hangs. Right clicking helps sometimes  
+<br>39105: Eclipse Crash inserting a New Project on CVS  
+<br>19153: Combo fires too many SelectionEvents in GTK2    
+<br>12220: SWT Mouse Enter comes before Mouse Exit [portability]  
+<br>38606: List constructor with SWT.SIMPLE | SWT.MULTI style parameters behaves incorrectly (BBAWT)  
+<br>39140: SWT.VERTICAL ignored in ToolBar   
+<br>20083: CCombo method redraw() does not work  
+</blockquote>
+
+
+<h2> SWT Build 3.0 010 - Tuesday June 24, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+17656: Inconsistent combo box display behaviour  
+<br>30871: [Cell Editors] Support for multiline text cell editor  
+<br>33966: CCombo is padding it's drop-down items list with blank entries  
+<br>34365: Display problem in the editor  
+<br>35852: Crash on first startup in Mandrake 9.1    
+<br>38596: ControlExample - 'return' inside text widget goes to button widget  
+<br>38626: DirectoryDialog getFilterPath() always returns null  
+<br>38627: [Contributions] Cascading menu does not show an arrow  
+<br>38914: Clicking in the wrong sequence crashes Java VM  
+<br>38987: PocketPC: MULTI Text control ES_WANTRETURN/_TAB_NEXT problem  
+<br>39049: FormLayout performance  
+<br>39078: FormData throws "Widget is disposed" when it's widget is dispose()d  
+</blockquote>
+
+
+<h2> SWT Build 3.0 009 - Tuesday June 17, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+38353:  crash in OS.gtk_main_iteration() when double-click disabled text widget  
+<br>38912:  DBCS: input special symbol breaks input method on ja_JP   
+<br>38344:  StyledText - exception when selecting lines in WRAP mode  
+<br>31195:  StyledText - SWT.WRAP display StyledText incorrectly  
+<br>38376:  SWT 3007 on Linux GTK is not handling threads properly (BBAWT)  
+<br>35183:  DBCS: Set text generates Index of Bounds exception using 2.0 NLS language pack  
+<br>38841:  NPE in Widget.filters  
+<br>37782:  Shell setMinimized(true) doesn't deactivate Shell  
+<br>38382:  DND in Packages View results in incorrect target element  
+<br>7946:  List portion of CCombo goes off the bottom of the screen  
+</blockquote>  
+
+
+<h2> SWT Build 3.0 008 - Tuesday June 10, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>  
+38385:  Japanese Input (IME) not doesn't come up  
+<br>38388:  eclipse crash on redhat 9/ ja_JP   
+<br>38213:  [Wizards] Dialogs require a resize to draw  
+<br>36541:  Printing of java program causes failure  
+<br>38331:  Inconsistent handling of Image on different platforms  
+<br>38433:  Editor titlebars are not painted  
+<br>21567:  GTK2: Text widget packing error with SWT.MULTI   
+<br>29534:  Override default behavior of 'F10' key  
+<br>35493:  OleClientSite hang  
+</blockquote>  
+
+
+<h2> SWT Build 3.0 007 - Tuesday June 3, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>  
+30810:  Umlauts  
+<br>38242:  Border width on Table incorrect - creates unwanted scrollbars  
+<br>36636:  StyledText - Printing could end pages twice  
+<br>38246:  swtexampessrc.zip is missing from distribution.  
+<br>38337:  GC.drawRoundedRectangle(...) method doesn't include the right and bottom edge  
+<br>38331:  Inconsistent handling of Image on different platforms  
+<br>36610:  Tracker behaviour wrong when resizing  
+<br>21191:  Decorations.setImage() could do a better job with masked images  
+<br>38221:  Index out of bounds from Combo.select()  
+<br>33359:  [JUNIT] Scrollbar tests fail  
+<br>33162:  [JUNIT]Slider setMinimum setmaximum and setThumb fail  
+<br>38076:  Combo doesn't calculate its size properly when only text is set.  
+<br>22222:  Eclipse not properly redrawing MDI shell titlebar text  
+<br>31839:  Flashing resize on GTK  
+<br>38077:  Junk left on the screen after closing a drawer in Logic Example  
+<br>35738:  problem with swt component bindings and XFree86-4.3.0  
+<br>35315:  Reset imageHeight on Tables while refreshing items  
+<br>17202:  inconsistent help hover placement  
+<br>23787:  [Properties dialog] Project Properties -> Info page should not use text fields  
+<br>4553:  Motif on KDE2: Things don't redraw (1GA4H7Z)  
+<br>4455:  DCR - Tree - need item positioning (1FGPVAF)  
+<br>4500:  Text widget has 3D effect although SWT.BORDER isn't specified (1FRSQXH)  
+</blockquote>
+
+
+<h2> SWT Build 3.0 006 - Tuesday May 27, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24877: Cannot get file extension from swt FileDialog  
+<br>37874: "Jumping" layout  
+<br>34634: "Select a type" hierarchy view message cut off  
+<br>37941: Coolbar setMinimumSize introduces chevrons on Linux  
+<br>38015: Eclipse crashes when using inline outline (Ctrl+O)  
+<br>37623: fillRoundRectangle doesn't completely fill  
+<br>28535: rectangles with pensize > 1 draw at wrong position  
+<br>38055: Shell Title bar displayed when only SWT.REZISE.  
+<br>37858: Some SWT Labels draw text in white  
+<br>24700: Text: Compute Size error  
+<br>37950: Unable to launch Eclipse on Sun Solaris 2.8  
+<br>33164: [JUNIT] Scale setMinimum and setMaximum fail  
+<br>33166: [JUNIT]Combo setLocation fails  
+<br>33158: [JUNIT]ProgressBar setMinimum and setMaximum fail  
+<br>33080: [JUNIT]Shell.isMinimized() returns false after shell.setMinized(true)  
+<br>33079: [JUNIT]Shell.isVisible returns false after shell.setVisible(true) called  
+<br>33088: [JUNIT]TabFolder.setLocation or TabFolder.getLocation not working  
+<br>25278: context menu click does not change selection  
+</blockquote>
+
+
+
+
+<h2> SWT Build 3.0 005 - Tuesday May 20, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+30434:  BIDI: StyledText to support RIGHT_TO_LEFT orientation  
+<br>35657:  Eclipse crashes and throws exception when starting up in Chinese locales  
+<br>37505:  GC.setXORMode() not applying to drawString/Text (BBAWT)  
+<br>36934:  Invalid thread access error on creating a font in Motif (BBAWT)  
+<br>34648:  [DND] file deleted when dropped in editor on Solaris  
+<br>37479:  BIDI: Drop-down list of CCombo doesn't inherit it's orientation from CCombo.  
+<br>37498:  BIDI: rtl-oriented TableCursor set next column instead of previos and vice versa, when it uses right and left arrow keys.  
+<br>37519:  Bug in Decorations.setPlacement method  
+<br>35804:  Cheese in Text  
+<br>37164:  Crash when opening a MessageBox on a Text focusLost event  
+<br>37497:  Creating of new Image is failed in some cases.  
+<br>28525:  DragDetect required  
+<br>4734:  drawText() does not respect setXORMode(true) (1GFQI15)  
+<br>37138:  GC.drawImage throws Exception with boundary conditions (BBAWT)  
+<br>37140:  GC.drawImage throws SWTError with boundary conditions (BBAWT)  
+<br>37198:  gtk2 im - imhangul (korean IM) work bad in Eclipse  
+<br>21384:  GTK: Random X Window System "Bad Implementation" error(BBAWT)  
+<br>37591:  ImageLoader.save for GIF saves in compress GIF format  
+<br>33496:  Multi-line text issues too many mouse track events on Photon (BBAWT)  
+<br>34185:  Native Tree: Clicking into selection doesn't reselect  
+<br>28529:  ProgressBar direction wrong + cheese  
+<br>37564:  Remove dependency on X11 in Program  
+<br>37303:  Remove X dependency  
+<br>37881:  StyledText - NPE when using RIGHT_TO_LEFT style with StyledText on Linux  
+<br>36450:  [Key Bindings] Only KeyUp event for Alt+[Shift]+<char> on Windows  
+</blockquote>
+
+
+<h2> SWT Build 3.0 004 - Tuesday May 13, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+29783:  BIDI: drop-down list of rtl-oriented CCombo is displayed in the wrong place.  
+<br>37299:  BIDI:Caret cheese when resizing RIGHT_TO_LEFT StyledText  
+<br>37293:  BIDI:GC.drawImage(0, ... draws at 1, ... when using RIGHT_TO_LEFT
+<br>37285:  Add Tiff support  
+<br>34516:  Cheese in ProgressBar  
+<br>32352:  Display of SWT tabbed panes do not redraw during changes  
+<br>36649:  Error Icons Draw Through  
+<br>33083:  JUnit View not being updated early enough  
+<br>29332:  new GC(this) produces a GC that does nothing  
+<br>31011:  Paint example does not draw correctly  
+<br>27474:  Provide a SWT Java Web Start extension  
+<br>37172:  TableColumn align style has no effect on GTK  
+<br>31783:  Text doesn't honor visibilty  
+<br>29383:  Tree and Table - no gray check boxes on GTK  
+</blockquote>
+
+
+<h2> SWT Build 3.0 003 - Tuesday April 6, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+36993:  Tracing options not displayed in Run-time Workbench run configuration  
+<br>29781:  BIDI: Lack of leading and trailig styles for alignment of widget's contents.  
+<br>25623:  can't select items in Tree widget of local history  
+<br>27777:  Combo box pixel corruptions  
+<br>37102:  Eclipse doesn't start  
+<br>37076:  Gtk CRITICAL warning gtktreeview.c  
+<br>37202:  GTK Exception on gtk_progress_bar_set_fraction  
+<br>31941:  gtk_progress_bar_set_fraction - crash when creating a class under latest Debian GTK 2.2 / Crux Theme  
+<br>37075:  I20030429: no swt-carbon-3002 in java.library.path  
+<br>18701:  image check box buttons are clipped  
+<br>16814:  J2ME SWT - 3 classes not CLDC compliant  
+<br>19824:  Needed multi-monitor methods.  
+<br>37212:  Order sependencies in setting up menus  
+<br>28589:  RedHat 8.0 - DefaultInformationControl hangs workbench  
+<br>27202:  Running ControleExample with Device.DEBUG flag on  
+<br>37065:  Spacing bug in RowLayout  
+<br>31906:  The file dialog widget does not provide a way to programmatically change the type filter.  
+</blockquote>
+
+
+<h2> SWT Build 3.0 002 - Tuesday April 28, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+36910:  Setting font before setting text on Motif causes X error (BBAWT)  
+<br>29765:  BIDI: ToolTiptext do not have Right to left Reading order  
+<br>34365:  Display problem in the editor  
+<br>35319:  TVT21: Cannot input characters in German for motif   
+<br>36433:  Allow Cursors to be created with Images that have a depth >1  
+<br>36746:  An overloaded glCallLists() would be useful    
+<br>29786:  BIDI: keyborad's left and right arrows move focus between tabs of rtl-oriented CTabFolder in the opposite direction.  
+<br>36684:  BIDI: LTR-oriented MessageBox can't be created, if it's parent has RTL orientation.  
+<br>36679:  BIDI: PopupList can't be created with explicitly assigned orientation.  
+<br>29787:  BIDI: problem with keyboard's left and right arrows, when them used to expand or to collapse rtl-oriented TableTree.  
+<br>36276:  BIDI: When UpDown control of rtl-oriented TabFolder is used for scrolling tabs, they are scrolled in the wrong direction.  
+<br>36727:  Can't use OpenGL in a plugin  
+<br>22943:  Cannot cleanly kill an swt task  
+<br>36209:  Copied text to on the clipboard is occasionally null terminated  
+<br>34982:  Custom BusyIndicator - no hourglass cursor  
+<br>36928:  Custom cursors are not working  
+<br>36386:  Eclipse crashes on exit  
+<br>7440:  Glitch on Navigation Bar on PocketPC while closing j9 running SWT app  
+<br>36915:  java.lang.OutOfMemoryError when creating org.eclipse.swt.graphics.Image  
+<br>36838:  OpenGL: GLYPHMETRICSFLOAT cannot be internal  
+<br>36955:  ScrolledComposite unused background is painted wrong.  
+<br>36562:  [CVS] commit log dialog doesn't set focus correctly  
+</blockquote>
+
+
+<h2> SWT Build 3.0 001 - Tuesday April 22, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+<br>7757 Packages view: title and tooltip should not used compress...  
+<br>9366 Workbench appears with 1st toolbar item showing hover-ove...  
+<br>19228 Try to control motif focus reassignments  
+<br>19708 widgetIsDisposed for tootip text  
+<br>20279 Division by zero when showing a zero-sized tracker  
+<br>21283 Ctrl+/ performs undo, not comment, in emacs bindings  
+<br>23847 Keyboard navigation doesn't work on Mac  
+<br>24563 DBCS Support for Motif and GTK  
+<br>28530 Cheese when moving Sash  
+<br>28537 Task view help is wrong if previous focus was editor  
+<br>28561 Can't arrow around table  
+<br>28800 Switching to a not yet activated perspective doesn't set ...  
+<br>28850 setFont() on Text control has no (visual) effect  
+<br>29784 keyboard's left and right arrows change value of rt...  
+<br>29788 rtl-oriented Tracker has wrong behavior.  
+<br>32602 After pressing Cmd-F8, clicking will kill Eclipse  
+<br>32965 Move dialog: tree doesn't have focus  
+<br>33068 [JUNIT]Label.setAlignment not implemented  
+<br>33100 [JUNIT]Table.getChildren does not return an empty array  
+<br>33316 FontDialog needs FontData[] API  
+<br>33336 Popup menus dont work on PocketPC (bbAWT)  
+<br>33492 Addition of tasks to task window is too slow  
+<br>33809 Request: add new event SWT.MenuDetect  
+<br>33903 [SWT Examples] OLE Web browser view does not open  
+<br>34122 Control Example  
+<br>34270 Single-click in popups dismisses them (was: Quick F...  
+<br>34283 Mac: No task description for progress monitor in wizards  
+<br>34445 Reverse sort for AddressBook example  
+<br>34446 [Tasks] Focus lost when switching form editor to Tasks View  
+<br>34618 Missing keyboard focus  
+<br>34996 Tab Event weirdly handled in motif  
+<br>35012 Setting the toolbar's background on RC2 doesn't work.  
+<br>35090 Outline Popup: Enter doesn't work in tree  
+<br>35210 KeyListener doesn't understand CTRL and ALT as a stateMask  
+<br>35244 [Action Sets] Hierarchy fast view causes unhandled except...  
+<br>35254 Unhandled exception caught in event loop. Reason:Widget i...  
+<br>35607 Sash missing cursor in Structure Compare of the Sync view  
+<br>35774 Unexpected Exit: Error: Object "" does not have windowed ...  
+<br>35837 [DirectoryDialog] There is no disk in the drive. Please i...  
+<br>35842 Outline view crashes on WinXP & Win2K  
+<br>36000 [StyledText] ContentWidthCache initialization  
+<br>36192 Native crash when closing tree nodes  
+<br>36270 BIDI: Some custom widgets can't be created with explicitl...  
+<br>36612 After install/update: no icon in dock - no focus  
+<br>36644 Can not set the background color for ToolBar  
+<br>36722 Mnemonic keys are not working for ToolItems  
+</blockquote>
+
+
+<h2> SWT Build 2.1 033d - Monday March 24, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+8442: NullPointerException and hang on startup in GTK Eclipse  
+<br>17359: NLS: No Group2 input  
+<br>26078: TabFolder.getClientArea() not correct
+<br>34940: Eclipse launcher crashes on Sun J2SDK 1.4.2-beta build18  
+<br>35434: [Motif] GC.getFontMetrics() causes VM to crash when font is really small
+<br>35596: Event Processing issues under Photon
+</blockquote>
+
+
+<h2> SWT Build 2.1 033 - Tuesday March 18, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+30768:  Performance - Typing in Java Editor is unacceptably slow.  
+<br>32204: Signal 11 at at org.eclipse.swt.internal.gtk.OS.gtk_progress_bar_pulse(Native Method)  
+<br>32602: After pressing Cmd-F8, clicking will kill Eclipse  
+<br>33017: VM crash when pressing enter in table cell editor  
+<br>33343: New file wizard freezes Eclipse UI  
+<br>34166: Disabling, then enabling CVS decorators produced NPE  
+<br>34183: The layout of the package explorer cannot be changed  
+<br>34248: DBCS: shown up GnomeVFS-WARNING messages  
+<br>34418: Crash when running DNDExample  
+<br>34463: confirm exit checkbox cannot be selected  
+<br>35022: Motif does not send dragFinished event on aborted drags  
+<br>26388: Package Explorer does not position on files  
+<br>30073: Graphical Editor is not refreshed properly when scrollbars disappear  
+<br>31026: Hang on Linux  
+<br>32851: Can't remove external tool builder after deleting launch config  
+<br>33099: Context menu 'Display' doesn't work  
+<br>33713: JRE popup menu in Run configuration dialog not reliable  
+<br>34093: Menu missing items  
+<br>34428: [Motif] Tree and Table views not getting proper selection  
+<br>34633: Table with CHECK flashes cheese  
+<br>34815: Cheese in CTabFolder widget  
+<br>34879: Calling ScrollBar.setVisible() when a text widget has focus causes a focus lost event on the text widget
+<br>25671: Javadoc for class swt/widgets/Dialog missing <pre>
+<br>28644: Bold font in label results in missing character  
+<br>29486: Keys need stronger filtering.  
+<br>32424: [PROGRAMS} Gnome - Program.getPrograms needs to be updated  
+<br>32947: Change method signature dialog too big  
+<br>33480: Text cut off in Mac in labels.  
+<br>33700: Running out of handles on Windows XP  
+<br>33822: Strange scrolling of native table  
+<br>34036: Native crash on dismissing help window  
+<br>34512: ComputeSize of table and tree too small  
+<br>34569: BIDI: Styled text change the characters with Large fonts  
+<br>34649: TabFolder title does not handle mnemonics properly  
+<br>34724: ControlExample  
+<br>34835: Widget "default" styles should be reflected in style bits  
+<br>34935: Missing border on toolbar  
+<br>34983: Native drag and drop doesn't work under linux  
+<br>35038: Refactoring dialog (Extract Local Variable) to big  
+</blockquote>
+
+
+<h2> SWT Build 2.1 032c - Tuesday March 11, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4434:  GPF when running SWT Tree code (1FNI25V)  
+<br>23385:  Table vertical column separators redraw incorrectly on MacOSX  
+<br>31685:  Entire Eclipse Platform loses focus and goes into the background...  
+<br>33834:  [Viewers] NPE in TreeViewer  
+<br>34181:  Ctrl-Click doesn't select underlying item before bringing up context menu  
+<br>34188:  Progress bar in dialogs doesn't show task information  
+<br>34614:  Mouse pointer does not change in table header  
+</blockquote>
+
+
+<h2> SWT Build 2.1 032 - Thursday March 06, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4592: multi select behavior for file dialog (1G7HZ2Q)  
+<br>4659: Double-clicking on fixed size column header resizes it (1GE3WN6) 
+<br>4843: EC DCR: Add keyboard support for multi-select to Tree (1GKMHS5)  
+<br>4847: Property dialog put behind workbench window (1GKRN9Z)  
+<br>7159: Missing Javadoc for Event fields  
+<br>7712: No scroll bars in Microsoft Word documents opened from the workbench  
+<br>12597: Cannot change OLE Event's VARIANT argument which has [out] directional attribute in IDL  
+<br>14329: Modal dialog doesn't disable column resizing  
+<br>16886: Address Book bug in the open a File dialog  
+<br>16901: NPE removing expression from expression view  
+<br>18059: RH7.3 clipboard problem  
+<br>18810: Extra unprintable character in copy buffer  
+<br>19896: Key up event says Ctrl is released when it's not  
+<br>19922: Menu bar items get added one at a time when editors are switched  
+<br>22416: NT4: Need context menu on window scroll bar to keep its consistency on Win2k  
+<br>23419: [OLE] Do not get scrollbars in Excel  
+<br>23841: Eclipse UI does not follow Mac L&F guidelines  
+<br>23959: Use native Table and Tree  
+<br>24393: DCR - Need to support Mac command key in SWT  
+<br>24431: Eclipse M1 Under OSX crashes when using VirtualDesktops  
+<br>25383: Variant needs a dispose method  
+<br>25604: Quick release upon start of drag hangs eclipse with pointer grab  
+<br>26051: [Workbench] Main Eclipse window activates itself very often  
+<br>28514: Character positions differ between selected and unselected text 
+<br>28982: Toolbar color problem when using the manifest in XP  
+<br>29027: Add "delete previous word" and "delete next word" actions to eclipse editor  
+<br>29330: JavaDoc does not match Windows - FIX LEFTTORIGHTdoc  
+<br>29387: no lines in Table on GTK  
+<br>29471: GP - XtDestroyApplicationContext - Closing M4 will sometimes crash the VM  
+<br>29717: [PERFORMANCE]SWT Motif exteremely slow with LANG en_US.UTF-8  
+<br>29814: GP - No core available - GPF on win2k  
+<br>29911: TableEditors not displayed while scrolling.  
+<br>30427: HANG/GP - XtDispatchEvent - Eclipse keeps locking up  
+<br>30618: ctrl-o not working  
+<br>31525: eclipse uses 100% CPU with gtk 2.2.1  
+<br>31684: Unable to drag views.  
+<br>31717: Unreproducible GP/Hang  
+<br>31834: Label and Combo don't align well  
+<br>32122: Cannot insert lines into new file code template (regression failure) 
+<br>32286: ControlExample Button Tab - changing styles resets button orientation  
+<br>32359: No Parent + SWT.APPLICATION_MODAL shell not modal  
+<br>32408: I20030220 on MacOS X has generic application icon  
+<br>32482: No F1 help on MacOS X  
+<br>32734: NPE while viewing variables from debugger  
+<br>32856: [Cell Editors] Can not see what value I am typing in the Properties 
+<br>32954: [KDE] Programs - fix library build  
+<br>33046: DBCS: Can type into read-only Text  
+<br>33057: RC1 No caret in editor  
+<br>33348: ControlExample: wider than screen, too many tabs  
+<br>33580: Scrollable.WM_MOUSEWHEEL uses wrong variable for horizontal scroll  
+<br>33590: RC1: "Application Modal" shell style behaves incorrectly  
+<br>33592: Fix specification for event.character  
+<br>33593: RC1: Toolbar foreground color changes ignored  
+<br>33747: NO_TRIM window gives no resize feedback  
+<br>33776: Resistering TraverseListenter with Shell changes tabbing behavior.  
+<br>33813: List doesn't send out selection events for arrow keys  
+<br>33855: Text Cursor Invisible in RC1  
+</blockquote>
+
+
+<h2> SWT Build 2.1 031 - Thursday February 27, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16808: Icon in Windows taskbar incorrect  
+<br>24494: Incorrect i18n char encoding in text areas  
+<br>26541: Exit the Workbench: crash after saving the workspace  
+<br>28643: Setting label's background color has no effect  
+<br>28845: Refresh tab layout incorrect for lower composite  
+<br>29198: Difficult to change character case of cached input values  
+<br>29837: [Contributions] Combo control does not show on GTK toolbar, works fine on Win and Motif  
+<br>30377: No caret in Java Editor  
+<br>30905: Add Menu.setRedraw(boolean) API  
+<br>30924: StyledText - StyleRange hashCode throws NullPointerException  
+<br>31039: Eclipse does not responde when dialog is opened.  
+<br>31187: Selection by mouse drag is out of kilter  
+<br>31382: New Folder and New File dialogs UI problem  
+<br>31833: wrong background for separator label on MacOS X  
+<br>31857: No icons in Labels  
+<br>31866: Scrolling in Readme editor is delayed  
+<br>31946: Moving CoolBarItems leaves temporary cheese  
+<br>31950: StyledText - Shift+UP broken in StyledText control  
+<br>31973: GB18030: After created a GB18030 named class, Eclipse for Motif crashed when exiting.  
+<br>32360: Embedded display not waking on new Photon events (BBAWT)  
+<br>33022: NPE in FontDialog  
+<br>33030: Arguments tab 'shows through' Main tab on OS X  
+<br>33063: [JUNIT] Caret.setFont  
+<br>33119: nullpointer dispose table column  
+</blockquote>
+
+
+<h2> SWT Build 2.1 030 - Tuesday February 18, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+17057: Outliner: focus causes select causes horizontal scroll  
+<br>21469: Accessibility - Tabbing causes a button to become the default
+<br>22767: toolbar looks very ugly with Win XP's lnf (using manifest file)
+<br>23370: CLabel needs to allow transparent background for Mac OS X  
+<br>28831: Displays ligature for fi & fl  
+<br>29100: Mouse wheel scrolling not working in editors  
+<br>29879: HANG - gtk_main_iteration - Eclipse Freezes moving between perspectives
+<br>30055: DBCS: font rendering quality issue on motif  
+<br>30570: DBCS - GB18030: Input GB18030 characters as run arguments cause eclipse for motif crash
+<br>31568: TableLayoutComposite and Table.showItem don't mix  
+<br>31686: Wrong margin correction in widgets.Text.computeSize(int, int, boolean)
+<br>31823: Clicking on partially obscured tab should scroll it into view
+<br>31855: [Editor Mgmt] Close buttons in editor get cut off  
+<br>31880: Layout bug in commit menu  
+</blockquote>
+
+
+<h2> SWT Build 2.1 029 - Thursday February 13, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6230: ImageLoader: 32-bit colour depth unsupported  
+<br>23472: Xlib: unexpected async reply (sequence 0x922d2)!  
+<br>23842: "banded" default background look shows through where it shouldn't
+<br>25446: Tree Shift-Click not working when item collapse changes selection
+<br>26381: OpenType: Key Navigation  
+<br>29456: GP - XmDSIGetChildPosition - Problem in Shutdown  
+<br>29607: [Cell Editors] usability: ComboBoxCellEditor unusable on GTK  
+<br>31009: ACC - I20030205 accelerators issues  
+<br>31017: HANG - Hang on import external plugins  
+<br>31267: Label and text box get the wrong order  
+<br>31448: BIDI - Bidi enablement for StyledText - ArrayIndexOutOfBoundsException when highlighting a blank line
+<br>31513: CTabFolder's close box highlight gets clipped at bottom  
+<br>31566: FontData "equals()" and "hashcode()" methods do not consider height of the the fontdata
+</blockquote>
+
+
+<h2> SWT Build 2.1 028 - Thursday February 6, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+23262: WebBrowser crashes when viewing Shockwave  
+<br>25736: Memory leak while using OLE automation  
+<br>29265: Control.setEnabled() not implemented properly on GTK  
+<br>29593: Contextual menu too short near bottom of menu  
+<br>29931: Mouse clicks are unreliable  
+<br>30403: CTabItem close box shifts by 2 pixels when tab selected  
+<br>30443: Menubar of SWT standalone applications is empty  
+<br>30945: Change in mouse clicking behaviour makes FastViews unusable  
+</blockquote>
+
+
+<h2> SWT Build 2.1 027 - Wednesday February 5, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20755: TVT2:  truncated text in dropdown for Dependencies tab in manifest editor
+<br>22759: Input method does not work on GTK/GTK2  
+<br>27180: Unable to copy and paste in editing java file  
+<br>27183: Mouse drag select produces crash  
+<br>28419: Crash when closing shells  
+<br>29777: DBCS: Can't drag a file into Run-time workbench  
+<br>30212: Read only text widget : can't copy selection  
+<br>30401: SWT standalone examples can't come to foreground  
+<br>30452: Mouse gets warped to upper left corner of workbench window on actions
+<br>30500: "roaming" focus  
+<br>30537: setSelection(allItems) not working on GTK  
+</blockquote>
+
+
+
+
+<h2> SWT Build 2.1 026 - Tuesday January 28, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+14814: Button mnemonics are not shown properly on Windows XP  
+<br>24333: DCR - Tree.getTopItem/setTopItem  
+<br>24489: Tab cannot get focus when child-composite has scrollbar  
+<br>24815: Cannot launch eclipse: javacore dump  
+<br>29142: Hyperlinking from stackdump locks up Eclipse  
+<br>29191: Tree - no gray check boxes on MAC (carbon2)  
+<br>29426: DBCS:Copy/Paste DBCS failed between eclipse and gedit  
+<br>29428: DBCS: Pasted string can't be shown correctly in Search dialog
+<br>29910: Checkbox not displayed until table scrolled  
+<br>29966: No more handles on startup  
+</blockquote>
+
+
+<h2> SWT Build 2.1 025 - Tuesday January 21, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+25030: (BBAWT) Image Analyzer fails to load a .png file  
+<br>25359: RuntimeExceptions thrown from OleListener.handleEvent crash VM
+<br>27099: StyledText - Change CTRL key bindings to MOD1  
+<br>27369: No more handles error  
+<br>27822: Package Explorer allways centers opened file  
+<br>28062: Text field in dialog doesn't get focus  
+<br>28743: Trying to see test hiearchy freezes eclipse [JUnit]  
+<br>28745: Esc does not cancel tracker  
+<br>28967: [Editor Mgmt] no close button on last editor when editors drop-down is active
+<br>29427: DBCS: Can't input DBCS characters in Search dialog  
+<br>29496: Cut & paste does not work in dialog text fields  
+<br>29503: DBCS:Can't sort by clicking "Description" on "Task View"  
+<br>29599: DBCS: upper bar character will be padded  
+<br>29608: DBCS: Selected DBCS Classpath can't be shown  
+<br>29611: DBCS:Can not input Hangul(Korea font)  
+<br>29612: DBCS:Browse function of "Export" doesn't work  
+<br>29614: DBCS: Unable to get "Import" contents location with "Browse" button
+<br>29664: SWT Styled Text Wrapping Doesn't Use Font Size Correctly  
+<br>29685: DBCS: Candidate Selection Window will be disappeared at DBCS composition
+<br>29730: RowLayout.computeSize provides wrong parameter to layoutVertical
+</blockquote>
+
+
+<h2> SWT Build 2.1 024 - Tuesday January 14, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21063: Can't drop views over some widgets  
+<br>21561: Keyboard navigation in tree widgets on Linux  
+<br>25619: OleControlSite event listener problem  
+<br>25843: Info pops do not work for Red Hat 8.0.
+<br>27677: [Key Bindings] ctrl-f7 not working  
+<br>28879: [Navigator] right-clicking a file doesn't allow me to open it
+<br>29208: Gtk directory dialog behaves like a file dialog  
+<br>29252: Accelerators are not disabled when the toolbars and menus are on GTK
+<br>29302: Slider and Scrollbar handle many boundary cases wrong in set* methods
+<br>29334: Make javadoc available for download  
+<br>29408: Invoking List.select(*) before open() does not select correct item
+</blockquote>
+
+
+<h2> SWT Build 2.1 023 - Tuesday January 7, 2003 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24283: Default button in the dialog get the enter when typing in japanese
+<br>25486: Eclipse fails with 'no free callback slot'  
+<br>26057: StyledText - cleanup passing around of fontdata  
+<br>26079: Use PfLoadMetrics() to speed up text extenting
+<br>27869: StyledText overuse of Font.getFontData  
+<br>28286: BBAWT: Incorrect palette/color returned on 32-bit true color display
+<br>28382: Extra separator line drawn in emulated CoolBar  
+<br>28498: Help menu is confused  
+<br>28607: Progress bar doesn't finish in PDE import wizard  
+<br>28658: No context menu in perspective bar  
+<br>28683: Ctrl-Click in TreeView loses selection  
+<br>28701: Method "assert" declared in org.eclipse.swt.tests.junit.StyledTextContentSpec
+<br>28719: Scrolling in Welcome editor is not 'live'  
+<br>28812: Mouse cursor changes to arrow after hovering a hyperlinked indentifier
+<br>28833: Eclipse no longer responds to 'Quit' AppleEvent  
+<br>28835: Cursor doesn't change to arrow shape when over text scrollbars
+<br>28991: TabFolder.computeSize is grows each time is it called  
+<br>29017: ScrolledComposite always makes it's content  bigger on resize
+</blockquote>
+
+
+<h2> SWT Build 2.1 022 - Tuesday December 17, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21409: IllegalArgumentException when editing Java source  
+<br>21993: Can't change font sizes  
+<br>22305: Launch configuration pane gets visually messed up and ref...  
+<br>23830: Out-of-box experience with the Mac.  
+<br>23843: Chevrons show up in default layout of Java perspective  
+<br>23844: Label doesn't wrap text initiallly  
+<br>23850: Missing scrollbar in List  
+<br>24437: KeyListeners don't get called  
+<br>26322: NPE in Font Dialog  
+<br>26331: Wrapped Labels - second line cut off  
+<br>26587: Navigate -> Go To Type goes to wrong shell on Mac  
+<br>27997: Color dialog crashes Eclipse  
+<br>28288: [Editor Mgmt] Editor pane out of sync with views and tabs  
+<br>28361: ToolItem leaks Images (?)  
+<br>28524: Inconsistent behaviour of tab in password fields  
+</blockquote>
+
+
+
+
+<h2> SWT Build 2.1 021 - Friday December 13, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+27526: Color selection dialog takes a long time to display in 8-bit mode
+<br>27862: Tree.setSelection() takes > 1 second  
+<br>28035: Different callback behavior on Windows and Mac with Combo widget
+</blockquote>
+
+
+<h2> SWT Build 2.1 020 - Tuesday December 10, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24112: Keyboard shortcuts defined as Ctrl-Shift-x don't work  
+<br>24436: Entering Asterisk crashes Eclipse  
+<br>26506: Importing External Plug-ins is slow  
+<br>27031: en_US.UTF-8 locale not supported on Motif  
+<br>27410: [SWT Examples] Arrow buttons won't resize for 10x10,50x50,100x100
+<br>27422: [SWT Examples] Progress bar reverts to 'black' color after Selection slider repositioning
+<br>27501: Selection not correctly updated on right click on a tree  
+<br>27524: [SWT Examples] Table item foreground color changes fail after first attempt
+<br>27644: Dismissing open type dialog with Escape crashes Eclipse  
+<br>27704: Remove csh build dependency  
+<br>27710: Entry point not found SetLayout in GDI32  
+</blockquote>
+
+
+<h2> SWT Build 2.1 019 - Tuesday December 3, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+19080: Chaff in table tree of property sheet  
+<br>20318: [StyledText] print selection prints whole page (at least in <=f2)
+<br>26563: Crash in Carbon native CopyMask  
+<br>26731: Attempting to create a view plug-in project crashes  
+<br>27181: Sleak - instrumentation not done on GTK and Motif  
+<br>27305: EC: CLabel keeps background colour after gradient is used  
+<br>27411: [SWT Examples] SWT.FLAT has no effect for buttons  
+<br>27442: Mouse click outside horizontal scroll bar does nothing  
+</blockquote>
+
+
+<h2> SWT Build 2.1 018 - Tuesday November 26, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15031: Font parsing failed  
+<br>17237: Progress monitor flickers  
+<br>18172: Sig11 from GTK  
+<br>19530: Saving locks resizing in second perspective  
+<br>19735: No space between longest item in menu and accel keys  
+<br>20953: StyledText - tilde problem with french keyboard (2000,NT,XP) on R2.0
+<br>21626: TableItem.getImageBounds fails on Motif (Emulated Widget)  
+<br>24872: Splash screen does not show at startup  
+<br>24969: JP GP: showing Java-Editor pref. page with editor open  
+<br>25053: Cannot use the pull down menu in GTK  
+<br>25335: Scrollbars too small on variable selection dialog  
+<br>25653: DCR: StyledText do not activate the default button  
+<br>26179: Can't select items in a checkbox tree without toggling checked state
+<br>26353: Infopop broken on solaris  
+<br>26362: StyledText - investigate necessary state changes between handleTextChanging and handleTextChanged
+<br>26733: Eclipse crashes when GTK theme is changed  
+<br>26804: Gtk Label widget has focus decoration drawn too big  
+<br>26935: Exception in StyledText with WRAP flag.  
+<br>26997: StyledTextRenderer: creates too many Strings  
+<br>27016: Default "Open" action not working in Navigator tree view
+</blockquote>
+
+
+<h2> SWT Build 2.1 017 - Tuesday November 19, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+21251: Crash in org.eclipse.swt.internal.gtk.OS.pango_layout_set_font_description
+<br>24835: GTK: Multiple selection and right click in tree  
+<br>25741: StyledText does not set the background and foreground color in the OS
+<br>25803: StyledText should use new Font API  
+<br>26004: Removing a Text field leaves behind crud  
+<br>26008: [StyledText] setTopPixel limits argument to logical line count
+<br>26121: Cannot launch eclipse #2: javacore dump  
+<br>26151: SWT widget org.eclipse.swt.widgets.Sash is not properly constrained when in HORIZONTAL mode
+<br>26258: Accented characters bug in editors reinvented  
+<br>26367: NPE when debugging as java application  
+<br>26414: Accelerators don't work on aix  
+<br>26419: StyledText - print pages causes walkback  
+<br>26421: List hangs on GTK  
+<br>26434: PrinterData startPage/endPage invalid when page >32767  
+</blockquote>
+
+
+<h2> SWT Build 2.1 016 - Tuesday November 12, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+23935: Text widget with Tree parent does not lose focus  
+<br>23997: Tracker moves mouse cursor  
+<br>24493: Cant type braces in java editor with italian keyboard in 2.1m1
+<br>25732: MLEAK: Resize eclipse, usually 4K allocated  
+<br>25775: Combo doesn't get restored after minimize/restore  
+<br>25781: Some change broke compare with patch  
+<br>25797: GTK: Selection Index not preserved after Combo item removal  
+<br>25986: No source for SWT plugin imported as binary  
+<br>25989: Radion buttons are not mutually exclusive in same composite  
+</blockquote>
+
+
+<h2> SWT Build 2.1 015 - Tuesday November 5, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4607: Missing API for Font(Display display, FontData fd[]) (1G93TPM)
+<br>14956: StyledText - printing should support pagination, headers, and footers
+<br>21695: Crash when starting eclipse on Solaris8 with java 1.4  
+<br>22052: Launch configuration dialog loses workspace data dir  
+<br>23049: Cannot write Swedish characters (??????????????????) in editor  
+<br>24273: GP -Tree removeAll reboot windowsXp  
+<br>24359: MenuItems with style SWT.RADIO should handle mutual exclusion on selection
+<br>24757: GTK: X pointer grab when resizing a table column  
+<br>25212: GPF synchronizing files with new Tree implementation  
+<br>25253: Preference dialog doesn't display last preference page  
+<br>25399: Drag and drop crashes Eclipse  
+<br>25545: StyledText - printing ignores end page  
+</blockquote>
+
+
+
+
+<h2> SWT Build 2.1 014 - Tuesday October 29, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+10090: Cannot see Combo-box selection in DBCS locale  
+<br>12078: SWT exception when running on debian woody on KDE using the motif build
+<br>14448: Setting the accelerator of a menu item gives highlight to tool bar entries
+<br>17361: Tree flickers on update  
+<br>17428: Internal Error (SWT) opening a new perspective by double-clicking
+<br>20075: Infopop exhibits strange behaviour under Motif  
+<br>21066: Switch editors/views/perspectives windows have scrollbars  
+<br>21121: [External Tools] Configuration default selection could be better on GTK
+<br>21375: Reproducible JVM termination when using WebDAV.  
+<br>21656: GTK: disposing all the columns in table.getColumns fails  
+<br>22038: Wrong widget scrolls in Java Browsing perspective.  
+<br>22120: Excessive redraw in debug view  
+<br>22252: Project properties - java build path screen shows artifacts  
+<br>22371: Invalid selection items in working set  
+<br>22527: Working set dialog only selects projects  
+<br>22743: Type dialog horizontal scroll too small to read contents  
+<br>23657: Problems implementing MenuItem.setText (worked around for English)
+<br>23789: GTK tree display problem  
+<br>23845: Spurious scrollbar drawn on other controls  
+<br>24150: Shift-Tab does not shift left  
+<br>24257: Native exception when trying to export preferences  
+<br>24314: FileDialog doesn't allow to navigate into packages  
+<br>24372: StyledText - StringIndexOutOfBoundsException in ControlExample
+<br>24426: StyledText - investigate replacing caretLine with simpler concept
+<br>24504: StyledText - showSelection when selection RtoL problem  
+<br>24619: DCR - State mask not set in MouseTracker.mouseHover  
+<br>25016: [Viewers] Double click not working when item already selected
+<br>25149: StyledText - WrappedContent API does not check line index range
+</blockquote>
+
+
+<h2> SWT Build 2.1 013 - Tuesday October 22, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+20377: StyledText - SWT.WRAP style and widthHint specification  
+<br>22986: SWT Controls Combo box Colors selection tool does not change foreground color
+<br>24728: StyledText Enter/Ctrl-Enter VerifyEvent inconsistencies  
+<br>24805: ComputeSize issue  
+</blockquote>
+
+
+<h2> SWT Build 2.1 012 - Tuesday October 15, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16657: [Open Modes] Search results doesn't respond to double click  
+<br>17334: Icon missing in check box tree  
+<br>17918: Tree widgets with multiple entries  
+<br>18902: PgUp key causes items to be selected in tree widget under GTK  
+<br>20258: [CVS] Esc key doesn't work on Commit Dialog  
+<br>21367: Display problem in the properties view  
+<br>21438: Java core dump in gtk_ctree_get_node_info  
+<br>24560: Ctrl+shift doesn't traverse word  
+<br>24676: StyledText - double click word select and caret placement  
+<br>24677: 32 bit image fails with a certain mask  
+<br>24702: WinCE: Image 32bits is incorrect  
+</blockquote>
+
+
+<h2> SWT Build 2.1 011 - Tuesday October 8, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4822: Group size doesn't seem to consider group name (1GJYIWB)  
+<br>10019: Right clicking in a list box should select before popping up menu 
+<br>17160: Task List: missing icon  
+<br>18842: Cheese when scrolling after deleting row in table  
+<br>19773: Coolbar icons in Windows XP with Luna theme are not vertically aligned
+<br>20094: Layout problems using StyledText with word wrap in a ScrolledComposite
+<br>23978: Horizontal scrollbars in tables and trees don't scroll page-wise
+<br>24225: DragSourceAdapter incorrect JavaDoc  
+<br>24358: Incomplete JavaDoc on MenuItem.setText  
+</blockquote>
+
+
+<h2> SWT Build 2.1 010 - Tuesday October 1, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+10459: I can't run eclipse  
+<br>19148: Tooltip pops up underneath code completion alternatives in F2
+<br>20672: Shift+F10 has wrong keyCode  
+<br>21287: Uncaught exception hanging Eclipse  
+<br>22615: [Dialogs] Native ProgressBar look does not match look of AnimatedProgress
+<br>22645: StyledText - cheese when typing in SWT.SINGLE mode  
+<br>23645: Disabled default button can still be reached pressing ENTER  
+<br>23846: Initial font height of text field is wrong  
+<br>23851: Initial text in Text control is scrolled out of visible area  
+<br>23910: CTabFolder selected tab loses synch with its contents  
+<br>23936: NPE in ControlExample  
+<br>23947: Menu implementation prevents KeybindingMenu from working correctly
+<br>23975: No keyboard shortcuts displayed in menu items  
+<br>23976: Function keys must be pressed twice  
+<br>24000: No scrollwheel support for Mac OS X  
+<br>24055: No more callback exception hang Eclipse  
+<br>24088: File chooser for OSX returns wrong path  
+<br>24106: Table Column Resizable Doesn't work if you click on Column itself
+<br>24137: Top item on popup is often invisible  
+<br>24139: Copy causes exception  
+<br>24141: Keyboard not functional in editors (mac os x)  
+</blockquote>
+
+
+<h2> SWT Build 2.1 009 - Tuesday September 24, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+7435: ArrayIndexOutBoundsException occurs when using Solaris through remote terminal
+<br>15146: Printing support under Linux?  
+<br>18483: IE6 causes conflict with SWT.APPLICATION_MODAL on Windows 98  
+<br>20461: WinCE - Wait cursor does not show up  
+<br>20958: Eclipse crashes when pasting PDF text into a Java file editor
+<br>21416: Gtk+ launcher  
+<br>22121: Eclipse crashes when pasting URL in Java-code  
+<br>23007: [Navigator] Import of workspace folder into parent  
+<br>23744: Device.getFontList() uses wrong constant name  
+<br>23745: Wrong flag used in Device.getFontList().  
+<br>23748: Input group is hardcoded as 1 in PhWindowQueryVisible()  
+<br>23753: Groups don't look like the platform  
+<br>23754: Label.setFont() needs to check "text != null"  
+<br>23766: Labels with image only have extra space on GTK  
+<br>23795: ControlExample: Image Label leaves cheese when resized  
+<br>23807: Display class needs to pick better default fonts.  
+<br>23864: CoolBar - Plus 2, Minus 2 problem  
+<br>23884: WinCE - OS.InitCommonControlsEx fails with flag DATETIMEPICK_CLASS
+<br>23898: Group.setBackground() don't work on Gtk  
+<br>23899: CTRL + Mouseclick  
+<br>23974: Use native ComboBox  
+</blockquote>
+
+
+<h2> SWT Build 2.1 008 - Tuesday September 17, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4637: TreeEditor example does not show how to use double click (1GCP6OH)
+<br>4656: Pop-up menu not showing for Composite (1GENYM0)  
+<br>4710: Remaining Javadoc problems (1GF088W)  
+<br>4730: Support for lesstif on Linux  
+<br>4733: Issues with Win32 GDI setBkMode(), and similar things in Motif (1GFPGK3)
+<br>4796: DCR: keyboard support for move/resize (accessibility issue)  
+<br>5900: CheckboxTableViewer does disable correctly  
+<br>10532: DCR: Table.setSelection(int, int) -- order matters  
+<br>12048: NPE exiting workspace  
+<br>16700: Coolbar tab order is backwards  
+<br>17494: Veronika needs to check her javadoc  
+<br>19256: SIP event  
+<br>19736: Tooltips for long entries in code assist pop behind code assist
+<br>21126: Print Dialog Is Not Modal, Resulting in Unpredictable Workbench Behavior
+<br>21620: FontData.setLocale() crashes workbench  
+<br>22189: Win32 GDI Resource Leak in WrappedContent.java  
+<br>22210: Photon:Removing item from Combo does not remove the text(BBAWT)
+<br>22364: Incorrect height of widget in TextViewer  
+<br>22490: Background color of Graphical Editors is always black.  
+<br>22534: No way to turn border off for linux text widget  
+<br>22564: Cannot draw transparent PNG files properly  
+<br>22577: List.setSelection(String[]) infinite loop  
+<br>22839: When swt window in focus palettes of other windows hosed, and vise versa
+<br>22862: StyledText - Tab does not tab out of non-editable  
+<br>22926: Clipboard copy/paste is cut/paste on Windows 98  
+</blockquote>
+
+
+<h2> SWT Build 2.1 007 - Tuesday September 10, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+10050: StyledText - Change selection color when changing background color
+<br>14637: StyledText - copy-from text edit feature  
+<br>16009: Eclipse's toolbar buttons' icon in black and upside down  
+<br>17793: Motif FileDialog often does not use reasonable default directory  
+<br>20179: Coolbar item clipped on bottom edge with SWT.BORDER style  
+<br>21185: GTK: Label positioning incorrect when style bit used and bounds set(BBAWT)
+<br>22079: StyledText - BidiUtil.isBidiPlatform returns true when not running with bidi locale
+<br>22114: * key expands TableTree but does not send SWT.Expand event  
+<br>22115: MessageDialog does not wrap message  
+<br>22158: getItem() crashes eclipse called with index 0  
+<br>22647: Variant class incorrectly marshals VT_BOOL values  
+<br>22746: Text cut off in GTK in TitleAreDialog  
+<br>22868: Eclipse hangs while creating a shell from ControlExample  
+<br>22874: 2104: Converter contains references to Converter.class  
+<br>22916: CCombo not dropping down list properly  
+<br>22918: Table.getItem(Point) throws ArrayIndexOutOfBounds  
+<br>22959: Dragging over multiple stacked trees uses invisible tree for drop target
+<br>22978: Motif FileDialog ignores SWT.MULTI bit  
+<br>23003: Xcopyplane requires 11 args but HP-UX JRE can only handle 10  
+<br>23028: EC: Tab un-indent does not work  
+<br>23061: 'Back' key does not delete character on Smartphone 2002  
+<br>23178: Eclipse Fails to Start First Time  
+<br>23285: Linux Motif has become extremely slow  
+</blockquote>
+
+
+<h2> SWT Build 2.1 006 - Tuesday August 27, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+5678: TVT: Unable to open Filter dialog on Win98 if another view is undocked (free floating)
+<br>12878: Combo setItems removes setText  
+<br>13024: Two tooltips displayed on tree  
+<br>14923: Show Text Hover toolbar item in wrong place  
+<br>16333: Accessibility - tab key in dialog boxes  
+<br>20321: Multiple opened ApplicationWindows with statuslines show incorrect display/event handling
+<br>22231: Pressing ENTER in a text field no longer performs OK in dialogs
+<br>22659: Function key events are often lost
+<br>22661: StyledText - Shift+Alt+<character> inserts character  
+<br>22721: Cannot use keyboard to toggle checkboxes  
+<br>22737: Mouse Capture on Motif causes Context Menu not to work  
+<br>22825: Consecutive vertical cursor movement commands don't retain column offset
+</blockquote>
+
+
+<h2> SWT Build 2.1 005 - Tuesday August 20, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4554: Combo selection scrolls for certain fonts (1G1AD9Y)  
+<br>4577: Ctrl+Backspace & Ctrl+del have the same key code and key event (1G54RAJ)
+<br>4685: Variables View re-positions on each step (1GETE8F)  
+<br>10091: MessageBox loses activation  
+<br>10976: Workbench windows don't reopen correctly in Dual Monitor environments
+<br>14942: Unexpected KeyDown event after pressing non existing menu mnemonic
+<br>18705: Too much flashin in Control Example  
+<br>21829: API needed to allow CCombo to display its list at the prefered width
+<br>22443: OLE - org.eclipse.swt.internal.ole.win32.CONTROLINFO has a useless field 'filler'
+<br>22457: Win32 org.eclipse.swt.widgets.Combo computeSize() is wrong  
+<br>22507: Modal dialog does not prevent adjusting of table headers in parent.
+</blockquote>
+
+
+<h2> SWT Build 2.1 004 - Tuesday August 13, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4737: Redraw problem in table (1GFW2PE)  
+<br>9075: Tooltips only partially displayed in Hoverhelp.java example  
+<br>15610: StyledText - Double-Click-Drag doesn't work, works on Text  
+<br>16990: ToolBar does not send MouseHover events  
+<br>20632: Polish national fonts  
+<br>20792: sometimes resize callback is not sent to the shell when the shell is not visible
+<br>20815: Menus not displayed on SmartPhone 2002  
+<br>21268: StyledText - Ctrl+Shift+J inserts line  
+<br>21272: StyledText does not support setting selection with caret on the left
+<br>21921: Emulated Table setTopIndex fails and causes NPE when adding an item afterwards
+<br>21933: TableColumn does not listen to ControlEvents  
+<br>22004: no keyboard shortcuts for switching between pages of MultiPageEditorPart
+<br>22188: StyledText - only first character of a line displayed  
+<br>22204: Photon: Text.selectAll() does not select all the text(BBAWT)  
+<br>22254: Command H is not mapped properly  
+<br>22365: SWT_AWT does not compile under JDK 1.4  
+</blockquote>
+
+
+<h2> SWT Build 2.1 003 - Tuesday August 6, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4521: Display.syncExec or Display.asyncExec can block processing of native events (1G03DF0)
+<br>20144: Enter key not working in packages view  
+<br>21179: Step filter in-place text editor invisible  
+<br>21243: Scroll lock inserts a character during incremental search on GTK
+<br>21338: Accents and ??????? don't work in editor using gtk  
+<br>21472: keyPressed event ignored by org.eclipse.swt.widgets.Text for ENTER key
+<br>21696: StyledText - RTF transfer codepage encoding  
+<br>21698: StyledText - RTF writer performance improvement  
+<br>21834: Coolbar - deleting items corrupting layout  
+<br>22004: No keyboard shortcuts for switching between pages of MultiPageEditorPart
+<br>22025: Motif: Unexplained termination running BBAWT JUnit tests  
+<br>22036: MOTIF: Appearance issue with Combo  
+<br>22060: StyledText - bidi - ArrayIndexOutOfBoundsException  
+</blockquote>
+
+
+<h2> SWT Build 2.1 002 - Tuesday July 30, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4578: Ctrl+J & Ctrl+Enter have the same key code (1G54RJJ)  
+<br>4816: TabItem displays & (1GJL704)  
+<br>6888: Combo sends ModifyEvent on setItems  
+<br>9025: OLE, StyledText widget and WinCE  
+<br>19632: Tracker should adjust cursor on mouse not down, not on MENU  
+<br>19985: StyledText - Bulleting proofing RTF copy function  
+<br>20691: StyledText - bidi - Win2K/XP support  
+<br>20746: Inconsistent @param in Javadoc for  TableItem.setGrayed(boolean)
+<br>21313: Combo.getItem wrong error thrown  
+<br>21423: GTK: GPF in Shell.setVisible()  
+<br>21500: GTK: SWT.Activate and SWT.Deactivate events not fired when Shell with NO_TRIM used as its style bit
+<br>21526: Shell.computeTrim does not include menu bar  
+<br>21563: Mnemonics give focus to the label on GTK  
+<br>21564: GTK: Text of Button(with style bit SWT.CHECK) does not show up correctly
+<br>21573: TableTreeItem should have get/setGrayed() methods like TableItem
+<br>21601: getLineCount() method for Text widget does not work on Motif  
+<br>21623: List.setSelection (int start, int end) fails on Motif  
+<br>21653: WinCE/SH4: Arrow keys don't generate key events  
+<br>21702: Debug Display view error msg to console on GTK  
+<br>21706: BidiUtil in win32 has Class.forName() usage  
+<br>21805: event.character = 0 for all Ctrl-<alpha> on QNX 6.2  
+<br>21937: COMObject leakage on OleControlSite  
+<br>21958: ControlExample FileDialog does not filter correctly  
+<br>21964: GTK: Adding an item to Combo changes the selection index  
+<br>21967: GTK: Setting selection index to -1 for a Combo throws an exception
+<br>21969: List.getSelectionIndex bug  
+<br>21976: GTK: Combo.getSelectionIndex() changes when an item is removed
+</blockquote>
+
+
+<h2> SWT Build 2.1 001 - Tuesday July 23, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4428: Table - Grid lines not drawn correctly (1FE4K5U)  
+<br>4451: Shell: setDefaultButton, default button cannot be reset to null (1FGLS6M)
+<br>4489: MouseUp fired for button 1 when button 1 is still pressed (1FODDP4)
+<br>4511: Pane title update flashes tool bar buttons (1FUUR7A)  
+<br>4524: CTRL sequences not handled gracefully by TextEditor (1FVSBTS)  
+<br>4544: CTRL combination not handled as accelerators when Caps are locked (1FZQDGR)
+<br>4590: VerifyEvent values ignored (1G7G5Y3)  
+<br>4626: TableTree: Two selection events generated for each checkbox selection (1GBRSLM)
+<br>4642: DirectoryDialog does not support / on windows (1GD41DZ)  
+<br>4648: MenuItem.setEnabled() always causes a redraw (1GDDCN2)  
+<br>4786: FontDialog should give access to color setting (1GIEFBD)  
+<br>4861: Key state for toolbar items (1GL54A0)  
+<br>5935: StyledText - up/down arrow behavior wrt varying line lengths  
+<br>6775: Radio button setSelection changes focus  
+<br>9859: Combo widget doesn't fire keyPressed or keyReleased for Enter key
+<br>11868: StyledText: text selection with key 'arrow down' does not include last line
+<br>11994: StyledText - replace getXAtOffset(caretOffset) with caret.getLocation().x
+<br>12178: StyledText - move StyledTextRenderer#bidiTextWidth to DisplayRenderer
+<br>12181: StyledText - mixing text width/caret position is confusing  
+<br>13944: DCR - Need cut/copy/paste routines on Combo  
+<br>14672: Combo and Scale setBackground does not refresh  
+<br>14799: Window manipulations block other threads from executing  
+<br>15088: StyledText - getTopIndex semantics undefined when no line fully visible
+<br>15554: DCR - alignment in a text widget  
+<br>15559: JAWS reads the parent window for dialog shells  
+<br>15728: Packages view selection always one too high  
+<br>16110: StyledText scroll not working with PageUp/Down keys.  
+<br>16205: StyledText - Tab does not tab out of read-only  
+<br>16402: Working set dialog: table columns have incorrect size  
+<br>16777: Busy cursor lost over progress indicator edges  
+<br>16986: JavaViewer example should remember path  
+<br>17191: SWT Error in JUnit view  
+<br>17252: Accelerator labels: Ctrl-Shift-A, Shift-Ctrl-A or Shift-Ctl-A?
+<br>17279: Extra CoolBar row created when switching perspectives.  
+<br>17370: Combo box flashes to much when resizing dialog.  
+<br>17993: Find/Replace shouldn't replace typed entry with value from history
+<br>18253: Coolbar - disposing items not honoring setRedraw = false  
+<br>18308: Ctrl+SHIFT+@ does not call the listener.  
+<br>18429: ScrolledComposite with LayoutManager is VERY slow in iPAQ  
+<br>18570: Combo flashes by resizing  
+<br>19380: Listboxes flash as preferences dialog is resized  
+<br>19434: ToolItem does not need to check for TOGGLE  
+<br>19568: {} on a german keyboard [swt-carbon]  
+<br>19615: StyledText - example Text Editor bug in copy/paste  
+<br>19630: Coolbar - odd dispose behavior  
+<br>19815: JRE crashes using error log and progress bar.  
+<br>19964: Coolbar - can "lose" items when platform widget wraps  
+<br>20159: Right-clicking on coolbar grabber causes strange behavior  
+<br>20183: Motif : Coolbar preferred size is too small width wise  
+<br>20190: CoolBar problems on Windows XP with Manifest  
+<br>20339: Hitting spacebar does not press currently focused button  
+<br>20583: Segfault when control tries to dispose of itself under Motif  
+<br>20683: [ExternalTools]  F3 (and F2) crashes the JVM when trying to cancel an external tool on linux-gtk
+<br>20690: StyledText - bidi - should force font script when keyboard language changed
+<br>20705: Cursor Keys don't work in Dialogs  
+<br>20722: GTK TableColumn#pack does not work if no header  
+<br>20788: A composite is being mysteriously disposed for no reason  
+<br>20846: WIN32: 'Combo.indexOf' always returns -1 for empty string  
+<br>20893: Bad size for Text widget when flag READ_ONLY is set (Photon)  
+<br>20904: SWT exception on LayoutExample (Photon)  
+<br>20950: GTK: F1 help does not work for menu items.  
+<br>20956: Emulated CoolItem do not respect SWT.DROP_DOWN flag  
+<br>21030: StyledText - during cut if clipboard copy fails do not delete text
+<br>21096: Properties accelerator missing ENTER  
+<br>21122: Emacs: Accelerators not shown in menus under GTK  
+<br>21154: StyledText - BIDI - Bad effect of RLO unicode character  
+<br>21192: UnsatisfiedLinkError thrown when pressing a hardware key  
+<br>21215: [Help] F1 Help does not close menu on GTK  
+<br>21223: StyledText - Cursor should stop blinking when moving  
+<br>21268: StyledText - Ctrl+Shift+J inserts line  
+<br>21368: GTK: GC.drawImage() fails when scaling an image  
+<br>21371: SWTError while using Navigator->Goto->Resource  
+<br>21378: GTK: Shell event's doit flag ignored when shellClosed() is called
+<br>21412: Paste with accelator key doesn't work  
+<br>21413: CoolBar computeSize fails on XP  
+<br>21415: Javadoc for CLabel.setBackground has typos  
+<br>21440: Unable to display Today screen when SWT app running on WinCE  
+<br>21449: GTK: Calling Text.setSelection() causes GPF  
+<br>21456: GTK: Cannot type in Text widget contained in Shell which has style bit as NO_TRIM
+<br>21484: Shift-Tab does nothing on GTK  
+<br>21523: StyledText - caret does not move when widget shell is not open
+<br>21524: StyledText - NPE when typing text and caret is null  
+<br>21596: StyledText - initial bidi caret position wrong when widget empty
+<br>21598: StyledText - setFont enables caret when it was disabled  
+</blockquote>
+
+
+<h2> SWT Build 2.0 052 - Wednesday October 30, 2002 </h2> (2.0.2 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+10459: I can't run eclipse
+<br>24693: org.eclipse.swt.graphics.GC.drawString() fails to draw euro
+<br>24869: GP - Eclipse crashed when entering invalid file name in FileDialog
+</blockquote>
+
+
+<h2> SWT Build 2.0 050 - Wednesday October 16, 2002 </h2> (2.0.2 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+24542: [DND] Crash when drag&drop on the Package Explorer
+</blockquote>
+
+
+<h2> SWT Build 2.0 049d - Monday August 26, 2002 </h2> (2.0.1 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+22729: Permissions.properties missing from the build script
+<br>22779: Eclipse linux-motif GPFs on exit on J9
+</blockquote>
+
+
+<h2> SWT Build 2.0 049b - Wednesday August 21, 2002 </h2> (2.0.1 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+22448: CoolBar - deleting first item in row does unnecessary collapse/expand of row
+<br>22561: Hover Help broken in 2.0.1 I20020815
+</blockquote>
+
+
+<h2> SWT Build 2.0 049 - Wednesday August 14, 2002 </h2> (2.0.1 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+22055: CoolBar - setWrapIndices causes rows to collapse/expand unnecessarily
+<br>22144: Coolbar - setSize not being honored after setWrapIndices API used
+<br>22320: Coolbar - delete item behavior problem
+</blockquote>
+
+
+<h2> SWT Build 2.0 048 - Tuesday August 6, 2002 </h2> (2.0.1 stream)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15559: JAWS reads the parent window for dialog shells
+<br>18253: Coolbar - disposing items not honoring setRedraw = false
+<br>19964: Coolbar - can "lose" items when platform widget wraps  
+<br>21268: StyledText - Ctrl+Shift+J inserts line
+<br>21834: Coolbar - deleting items corrupting layout
+</blockquote>
+
+
+<h2> SWT Build 2.0 047 - Monday June 17, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4772: Javadoc: Graphics constructors need to doc if device null (1GHSPUW)
+<br>14144: ScrollBars can't be made invisible on PocketPC  
+<br>20265: F3. test C3. No new updates for Eclipse on HP.  
+<br>20362: Coolbar cannot be traversed to  
+</blockquote>
+
+
+<h2> SWT Build 2.0 046 - Friday June 14, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16809: Clicking to close non-active editor doesn't have an affect  
+<br>16939: DnD: Moving the mouse while dropping behaves strangely while dragging views
+<br>17190: No cell editor support  
+<br>17563: Flat tool bar buttons  
+<br>17621: Resource Patcher wizard - widgets not properly aligned  
+<br>19089: No popup menu java editor ruler (Photon)  
+<br>19243: Eclipse launchers have hardcoded j9 args  
+<br>19244: Spacing between Table rows grows with number of rows  
+<br>20006: X Pointer grab not released  
+<br>20044: Unable to scroll license text using keyboard  
+<br>20072: Workbench bounces when swtiching perspectives  
+<br>20134: Eclipse CLOSES automatically, when i'm working in it  
+<br>20184: Color javadoc could use reference to Device.getSystemColor()  
+<br>20209: Hang due to OS locking  
+<br>20354: GP when attempt to check out SWT from repository  
+<br>20372: Tracker needs more javadoc  
+</blockquote>
+
+
+<h2> SWT Build 2.0 046 - Tuesday June 11, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+16809: Clicking to close non-active editor doesn't have an affect  
+<br>16939: DnD: Moving the mouse while dropping behaves strangely while dragging views
+<br>17190: No cell editor support  
+<br>17563: Flat tool bar buttons  
+<br>17621: Resource Patcher wizard - widgets not properly aligned  
+<br>19089: No popup menu java editor ruler (Photon)  
+<br>19243: Eclipse launchers have hardcoded j9 args  
+<br>19244: Spacing between Table rows grows with number of rows  
+<br>20006: X Pointer grab not released  
+<br>20044: Unable to scroll license text using keyboard  
+<br>20072: Workbench bounces when swtiching perspectives  
+<br>20134: Eclipse CLOSES automatically, when i'm working in it  
+<br>20184: Color javadoc could use reference to Device.getSystemColor()  
+<br>20209: Hang due to OS locking  
+<br>20354: GP when attempt to check out SWT from repository  
+<br>20372: Tracker needs more javadoc  
+</blockquote>
+
+
+<h2> SWT Build 2.0 045 - Tuesday June 11, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+15242: CoolBar - layout issues  
+<br>18517: Coolbar - delete and row layout bug  
+<br>19090: Combo doesn't size itself properly in GTK2  
+<br>19670: Regression in OLE support  
+<br>19671: Unable to expand/collapse trees in properties view  
+<br>19720: Coolbar - getPreferredSize problem (was getClientArea problem)
+<br>19787: Hover help is not removed  
+<br>19947: GTK2 sends key events with both keyCode and character equals to 0 for some keys
+</blockquote>
+
+
+<h2> SWT Build 2.0 044 - Monday June 10, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4807: Text.setEchoChar spec should say 0 <= char < 128 (1GJ6CDM)  
+<br>4837: Javadoc: Cursor constructor ERROR_NO_HANDLES is not spec'ed (1GKA7Q9)
+<br>5577: Text javadoc  
+<br>7526: No spec for Display.update()  
+<br>8513: JavaDoc for Menu.addMenuListener incorrect  
+<br>12820: Finishing preview of the refactoring code crashes Eclipse  
+<br>14463: GP opening two files at the same time  
+<br>15460: CoolBar doc unclear/insufficient  
+<br>15939: KeyEvent character is not consistent between Linux and Windows
+<br>16810: Mouse pointer not update  
+<br>16837: Keys completely lost  
+<br>16883: Variable sorting changes unexpectedly  
+<br>16895: In-place text fields are unusable  
+<br>17036: Disposing a CoolItem is triggering an activation callback.  
+<br>17146: Editor Preference page buttom list clipped  
+<br>17154: View part loses focus when opening context menu  
+<br>17289: Combo doesn't take focus by clicking on it (Photon)  
+<br>17290: Modify Method Parameters: wrong enablement of buttons  
+<br>17507: AIX FileDialog is not responsive in stand-alone example  
+<br>17613: Add from local history shows nothing in right and lower pane
+<br>17670: Cannot move through Plug-in Code Generation page list with arrow keys
+<br>17692: IAE when deleting line in Java Editor  
+<br>17752: Cannot select a non-bold font  
+<br>17788: Scale with preferred size is unusable (no range of motion)  
+<br>17848: F1 build, JVM terminated Exit code 139  
+<br>17936: Eclipse launcher must launch headless in headless environments
+<br>18439: Ctrl+F6 editor switching is unusable  
+<br>18508: Javacoredump when opening vertical ruler context menu  
+<br>18521: Coolbar layout and chevron bug  
+<br>18543: An invisible character is added when the 'Windows' key is pressed
+<br>18625: Tabbing in Java editor takes cursor  
+<br>18629: GTK: Unable to select dialog buttons with mouse  
+<br>18645: Release SWT sources & javadoc in future builds  
+<br>18733: ControlExample: List widget not being resized properly  
+<br>18804: GPF setting image to menu item (Photon)  
+<br>18838: Launch Configurations dialog creeps up  
+<br>18841: Question: What does -DMBCS do?  
+<br>18930: Wrong content displayed in tabs in the Launch Configuration Dialog
+<br>18934: Scrollbars should be disabled in ImageAnalyzer example  
+<br>19057: Problem saving java file through popup menu  
+<br>19116: Missing about.html in source directory for examples  
+<br>19169: NPE on Emulated CoolItem constructor  
+<br>19345: Task View: Not clearing priority icons  
+<br>19394: False "unsaved changes" notification from launch configs  
+<br>19503: Widget in outliner gets wrapped/cropped  
+<br>19595: StyledText - redrawRange not clearing properly when clear flag set
+<br>19660: Preference page does not expand to fit all widgets  
+<br>19769: Internet Explorer and Help, EXCEPTION_ACCESS_VIOLATION  
+</blockquote>
+
+
+<h2> SWT Build 2.0 043 - Friday May 31, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4692: Empty popup menu appears in Outline view (1GET1B1)  
+<br>8821: Opening editors has become very slow  
+<br>15565: Coolbar - minimumWidth not honored under certain conditions  
+<br>16688: Selection background on emulated widgets is wrong  
+<br>17150: Strange selection behaviour in Java Browsing Perspective  
+<br>17156: Delete key not working in package view  
+<br>17228: Weird Tree selection behaviour  
+<br>17354: Double clicking expands and collapses item  
+<br>17363: Test A4.4 cannot edit action set id in properties view  
+<br>17680: Outline doesn't expand when adding new method  
+<br>17825: ControlExample->Text beeps when I choose SWT.MULTI  
+<br>17831: Coolbar - chevron not always displayed when it should be  
+<br>18160: "Show in packages view" doesn't scroll to selection  
+<br>18229: Walkback when closing ImageAnalyzer  
+<br>18368: Get rid of all fragment.properties  
+<br>18376: No execute permissions of libraries  
+</blockquote>
+
+
+<h2> SWT Build 2.0 042 - Thursday May 30, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4533: Cheese when resizing toolbar (1FWL943)  
+<br>4841: SWT sample imageviewer nothing display at pixel data area (1GKEOUE)
+<br>6735: AWT/SWT - Swing / Swt integration : JComboBox doesn't show correctly
+<br>10972: Core dump drag and droppping from inline text  
+<br>12498: Unable to add External Jar using the Java Project Wizard  
+<br>16174: Wrong popup menu  
+<br>16553: SWT_AWT.new_Panel does not work  
+<br>16791: Can't select check boxes  
+<br>17199: Table widget - only last column header is clickable  
+<br>17375: Cheese on Java Scrapbook page ruler  
+<br>17390: JUnit testcases result for Graphics (1 error, 2 failures)  
+<br>17565: Add JRE validation not working  
+<br>17568: Error doesn't disapear when switching to source folder layout
+<br>17574: Status line contributions appear twice  
+<br>17637: Resize problem when diableing overview ruler in Editor  
+<br>17662: Incorrect status display in new Feature Wizard  
+<br>17917: Shift-Tab does not work  
+<br>18223: Text widget with SWT.MULTI has strange behavior on GTK  
+</blockquote>
+
+
+<h2> SWT Build 2.0 041 - Tuesday May 28, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4398: Visual Coordination: Borders (1FSGONG)  
+<br>4411: DCR - Support printing (1PQ8QCK)  
+<br>4426: ScrollBar - Can't query size (1FDVP23)  
+<br>4431: Folder tab does not get focus (1FIGI95)  
+<br>4437: Tree Keyboard Support (1FOLZPT)  
+<br>4452: MenuItem: setImage does not show image on menu (1FGNP8U)  
+<br>4469: Inconsistencies between single line Text and RichText widgets (1FK1RRM)
+<br>4474: Not supportting Windows Accessibility Standard? (1FM0IFS)  
+<br>4490: Fonts in examples appear too big (1FOMCWQ)  
+<br>4496: DCR - Contour mouse middle button doesn't work (1FREAS4)  
+<br>4503: FontDialog is missing fonts (1FSMRV0)  
+<br>4526: Severe - Delete key is not redirected to editor (1FVXDST)  
+<br>4529: Closing external MS Word makes in-place MS Word disappear (1FWG9AR)
+<br>4534: Flashing when computeSize called on Toolbar (1FWLD1E)  
+<br>4545: No OS.GetKeyState function on motif (1FZQOZM)  
+<br>4550: JUnit tests assumes boundary condition which is setting dependant (1G0LQKD)
+<br>4552: Adobe doesn't like ImageData... (1G0ZBE0)  
+<br>4563: Need support for *.xpm and *.png image file formats (1G3HWSA)
+<br>4636: Tooltips not working on Linux (1GCN4FK)  
+<br>4672: DCR - Include "begining / end " arrows to select files (1GEFYCG)
+<br>4679: Colour gradient of views is not gradual (16bit color depth) (1GELWSO)
+<br>4699: DCR - outstanding issue for customer- Changing cursor during drag operation (1GETC8U)
+<br>4703: WinME - Disabled icons in tabbed folder do not display properly. (1GEWXLI)
+<br>4706: StackOverflow resizing Workbench window (1GEWLSU)  
+<br>4708: FATAL X error (1GF07HN)  
+<br>4709: GP running ( Eclipse ^ 2 ) (1GEZ9UR)  
+<br>4711: Navigator messed up when midi(w/DBCS) in it -Can't create view (1GEZNVC)
+<br>4728: Windows with tab pages should allow Ctrl-Tab switching (1GFIUG5)
+<br>4785: DCR - Custom notebook scrolling not optimal (1GI97VZ)  
+<br>4839: TabFolder mnemonic problem (1GKAPKK)  
+<br>4840: Hebrew: cannot paste from external file into java editor (1GKCWVX)
+<br>4851: Print ignores print to file option (1GKXC30)  
+<br>4867: PgMemFlush() considered expensive (1GLEEJC)  
+<br>5697: *Please* make SWT use GTK+ instead of Motif  
+<br>8346: Workbench will not start  
+<br>9217: Internal error at open the package view  
+<br>9491: 1GRTRXQ: WSWB:Workbench 2.0 Problem- ArrayIndexOutOfBoundsException with MultiPageEditorPart
+<br>11204: Some ActiveX control can not accept key input.  
+<br>11436: Request for public interface to call "UIDeactivate()" of  IOleInPlaceObject
+<br>11498: StyledText does not always redraw when the line style changes
+<br>14846: Accessibility: getLocation does not position XP Magnifier  
+<br>15218: Platform does not recognize the GUI - 20020502  
+<br>15466: ImageData.blit throws ArrayIndexOutOfBounds Exception  
+<br>15548: 'X' close box on tab hidden by arrows  
+<br>15564: javaw.exe has generated errors and will be closed by windows  
+<br>15653: Tab halts on CCombo objects  
+<br>16094: Cheese on CTabFolder when resizing  
+<br>16200: Tracker leaves cheese  
+<br>16345: JVM termination when attepmting to run Update Manager  
+<br>16458: Trying to free a GdkEvent: pointer=NULL  
+<br>16549: Cannot navigate tabbed notebook with keyboard  
+<br>16557: Tab does not move cursor between text fields  
+<br>16565: Typed text is lost  
+<br>16576: ACC: Checkboxes in lists are not real checkboxes  
+<br>16828: CTabFolder flashing tooltip  
+<br>16927: External programs support on Photon  
+<br>16957: TreeItem.setForegroundColor() doesn't work  
+<br>16967: Strange scroll behavior in package dialog  
+<br>16995: HoverHelp example does not create ON_TOP Shell for tooltips  
+<br>17022: SWT Layouts example - missing window title  
+<br>17090: StyledText selects text when menu is showing  
+<br>17183: Icon in wizard banner clipped  
+<br>17208: Long operations are being modal.  
+<br>17305: Search Dialog: Java Page clipped  
+<br>17320: Search dialog freezes Eclipse  
+<br>17368: 4 Toolbar icons pushed off the toolbar way to the right  
+<br>17488: Image Support in SWT - FAQ (1G5Z1KS)  
+<br>17497: FileDialog open() returns wrong result  
+<br>17632: "Color Button" doesn't update  
+<br>17802: Moving a sash requires an extra click to take effect  
+<br>17811: Two menu bar items highlighted at the same time  
+<br>17816: Menu appears then dissapprears with click after Alt.  
+<br>17832: Vertical Scrollbar clipped  
+<br>17834: JavaDoc API bad for Image  
+<br>17835: Smalltalk code around :)  
+<br>17928: NPE on addressbook example  
+<br>17932: Emulated Coolbar do not resize when the last item on the row is removed
+<br>17933: Emulated Coolbar chevron too narrow on Photon  
+<br>18005: BusyIndicator should check args  
+</blockquote>
+
+
+<h2> SWT Build 2.0 040 - Tuesday May 21, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+3554: TP125: weird tab order in create project wizard (1G83VP8)  
+<br>4424: Table draws a stray pixel in top left corner (1FS9QBQ)  
+<br>4476: No syncExec runnables run during scrolling (1FMGG2X)  
+<br>4528: Need FocusIn event for OleClientSite (1FW2S00)  
+<br>4586: Use checkWidget() more often (1G80URQ)  
+<br>4609: FillLayout should have FillLayout(type) constructor (1G9XBPI)
+<br>4694: Editor Name is missing from tab (1GET93J)  
+<br>4726: CODE CHANGES AFTER THE FREEZE (1GF9YF0)  
+<br>4788: Feature request: styled tree items (1GIGJK4)  
+<br>4789: XP - Look and feel problems (1GIGGKM)  
+<br>4831: DND not working properly (1GJYOZC)  
+<br>4838: Can create FontData with null name string (1GKA93P)  
+<br>4941: Focus callback during OleClientSite deactivate call  
+<br>4942: Combo selection index should move when upper item removed (1GLGA41)
+<br>5910: Toolbar with all items disabled still shows up in tab order  
+<br>5936: Composite.setTabList should accept null  
+<br>6198: Focus lost in tab folder when switching pages  
+<br>6406: J IME positioning incorrect
+<br>6514: Code assist behaves differently on Linux  
+<br>6856: Default buttons different on Variable dialog  
+<br>8162: Accessibility: focus goes missing in CVS location wizard  
+<br>8791: Overaggressive focus grabbing  
+<br>9141: WorkBench->Preference dialog's buttons font is too small.  
+<br>9287: Combo.setText does not work
+<br>10491: Bold button will not bold text in SWT TextEditor Example  
+<br>11074: EventTable.sendEvent should probably use try/finally  
+<br>11349: Editor Tabs should fill to the right.  
+<br>11369: Coolbar feature requests  
+<br>11516: ViewForm should override computeTrim
+<br>11738: growing status bar
+<br>11847: OLE Editor prevents navigation without keys  
+<br>12398: Accessibility problems  
+<br>12641: Error in .classpath for Photon  
+<br>12904: Accessible resizing of Views should move/change the Display's Cursor
+<br>12972: Noticed increased number of Eclipse crashes  
+<br>13622: DCR - need ability to cancel window system shutdown
+<br>14449: [M5] error bringing up Code Formatter page  
+<br>14546: TableColumn alignment problem with Motif  
+<br>14656: Repaint of window does not wotk with IME up
+<br>14801: Mnemonic character doesn't work on TabFolder on QNX  
+<br>15124: NPE: Label Decorations preference page  
+<br>15134: Open Type dialog has wrong initial focus  
+<br>15172: focus not on text field for OpenTypeDialog  
+<br>15224: FileDialog does not return the file selected on PocketPC  
+<br>15237: Coolbar - corrupts wrap layout when items deleted  
+<br>15513: CCombo.setTooltipText() doesn't work  
+<br>15516: GP - Eclipse crashed  
+<br>15575: Tree with checkbox items are not accessible  
+<br>15613: Copy/paste inserts NULL  
+<br>15705: Editor with focus, tab text disappears sometimes
+<br>15872: Editor area frame should align with open editor's, excluding drop shadow
+<br>15989: Coolbar walkback when adding item
+<br>16069: Can't see source in imported binary SWT  
+<br>16210: Core Dump Occurred while in Open Type dialog  
+<br>16245: CTabFolder - tooltips and arrowing around
+<br>16281: Eclipse does not come up
+<br>16297: Wrong tab order in newer builds
+<br>16318: Can't activate views; losing events
+<br>16465: Stack Overflow when importing a project
+<br>16523: Unable to double-click
+<br>16525: Eclipse does not layout properly
+</blockquote>
+
+
+<h2> SWT Build 2.0 039 - Tuesday May 14, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6103: Menu mnemonics don't work when toolbar has focus  
+<br>8805: Context menus and finding references to methods  
+<br>14823: Drag&Drop: need way to set the default behvaiour of a drop o  
+<br>15055: Column Header Height in a Table or Table Tree SWT widget  
+<br>15253: Linux GTK 2 library not found  
+<br>15274: Can't add external jar in Linux-GTK version  
+<br>15603: Preference page no longer resizes to fit contents  
+<br>15634: Table not acting like list when last column deleted  
+<br>15637: Cheese in Table when setting column image  
+<br>15643: Cheese in Table when changing font  
+<br>15705: Editor with focus, tab text disappears sometimes  
+</blockquote>
+
+
+<h2> SWT Build 2.0 038 - Tuesday May 7, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6391: Display.getActiveShell() can answer wrong value  
+<br>7170: Tab space size problem  
+<br>8542: Close perspective with mouse isn't possible  
+<br>8591: Editor tabs should scroll automatically to fill available tab space
+<br>8648: StyledText - Caret can be hidden under scrollbar  
+<br>10263: Editor keeps scrolling after mouse up  
+<br>12226: Solaris - can't copy file into same directory  
+<br>12360: TraverseEvent e.doit doesn't turn off on TabFolder  
+<br>12952: Alt+{char} gets inserted as text  
+<br>13614: JFace Tables have an extra column  
+<br>13651: Printed output issues  
+<br>13725: Revert is much slower than close and re-open in java editor.  
+<br>14431: TableViewer inconsistent when clicking off of item list  
+<br>14866: Shift-selection doesn't work immediately after restart  
+<br>14880: Column resize problems/cheese  
+<br>14902: Executable launcher does not restart  
+<br>14935: EmulatedWidgetTests fail on Linux  
+<br>14937: Launch from New Office Document hangs until Eclipse exits.  
+<br>14964: StyledText - add new API for replacing style ranges  
+<br>14981: Focus not set anymore  
+<br>15057: getSystemColor(SWT.COLOR_WIDGET_FOREGROUND) always returns black
+<br>15115: removeColumn are broken in Emulated Table  
+<br>15141: Tab is caught by read only text  
+<br>15150: Progress bar behaves erraticaly
+<br>15208: StyledText - text change even mechanism poorly documented  
+<br>15348: GPF in OS.MoveMemoryW  
+</blockquote>
+
+
+<h2> SWT Build 2.0 037 - Tuesday April 30, 2002 </h2>
+
+<h3>
+<a NAME="LIBRARY LOCATION CHANGE"></a>LIBRARY LOCATION CHANGE</h3>
+
+As of this build, libraries are no longer in the org.eclipse.swt plugin.
+
+<p>Libraries can now be found in the associated windowing system fragment which to date are:
+<ul>
+<li>org.eclipse.swt.win32 
+<li>org.eclipse.swt.motif
+<li>org.eclipse.swt.photon
+<li>org.eclipse.swt.gtk
+<li>org.eclipse.swt.gtk1x
+</ul>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4641: Icon lookup fails for some windows icon paths (1GD2DEY)  
+<br>4802: StyledText - Bidi Support Open Issues (1GIZ5G3)  
+<br>4842: Can't launch external editors. (1GKEYOE)  
+<br>6098: EXCEPTION_ACCESS_VIOLATION running Eclipse  
+<br>6858: GP - Crash VM  
+<br>8826: GPF - closing a Java editor  
+<br>8837: Window position changed incorrectly in Shell.open()  
+<br>9297: Eclipse crashed  
+<br>11374: gp: Crash in swt-win32-2026.dll  
+<br>11587: BIDI:Java editor and Text editor: User Interface issues.  
+<br>12811: TableColumns don't pack properly  
+<br>13200: gp - MoveMemory error on Windows XP  
+<br>14049: gp - Crash in OS.MoveMemoryW  
+<br>14220: gp - Crash closing editor  
+<br>14245: gp - crash while debugging (NRCRASH)  
+<br>14249: Exception while stepping  
+<br>14280: Unsatisfied Link Errors running libswt-pi-gtk-2034.so on Linux/Gtk 2.0
+<br>14425: Font dialog exception  
+<br>14528: Problem with Label.computeSize.  
+<br>14538: StyledText - bidi - change backspace and delete behavior  
+<br>14813: ClassCastException creating a new Run configuration  
+<br>14872: ArrayIndexOutOfBoundsException in TableItem.insertColumn  
+</blockquote>
+
+
+<h2> SWT Build 2.0 036 - Tuesday April 23, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4834: DCR - mnemonics do not work on tabbed pages (1GK7O0N)  
+<br>7189: Method highlight in border does not match the method  
+<br>8253: Right clicking does not bring up context menu  
+<br>8306: Inconsistencies in SWT example descriptions  
+<br>8538: Mismatch between selected tab and displayed tab  
+<br>8544: Some problems with the editor-pane (repaint, focus)  
+<br>9360: Text entry in cvs comment dialog can't deal with quick typing
+<br>9794: Linux-GTK KeyEvents bad/different from the other platforms
+<br>12947: Color Preferences in Preferences->Java->Editor  
+<br>13826: Performance issue in Table.RemoveAll()  
+<br>13922: Eclipse crashes when running LayoutExample  
+<br>13999: StyledText - appending single line data doesn't update properly
+<br>14047: StyledText - inefficient redraw during text change with word wrap
+</blockquote>
+
+
+<h2> SWT Build 2.0 035 - Thursday April 18, 2002 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+<ul>
+<li>Display.setCursorLocation</li>
+<li>GridLayout(int,boolean)</li>
+</ul>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4602: GridLayout should have GridLayout(numColumns) constructor (1G9Z73D)
+<br>8549: org.eclipse.core.resources 4 Unhandled exception caught in event loop
+<br>9029: GC.setClipping(Rectangle) should handle null argument on GTK  
+<br>10590: GTK Version / Tree View blanks...  
+<br>10715: Code Assist dialog hide after press and release CTRL + SPACE  
+<br>11182: Property Sheet does not allow editing when there is only one property
+<br>11515: computeTrim and getClientArea are inconsistent in CTabFolder  
+<br>11713: Descriptions in preference pages aren't aligned  
+<br>11715: Tab doesn't switch fields on gtk  
+<br>11835: Strange behaviour of backspace in new Java Class dialog  
+<br>11935: Can't Ctrl+Tab out of PDE Editor's dependencies page  
+<br>12073: Moving shell above other shells does not work.  
+<br>12882: DCR: Set Cursor location programmatically for accessibility  
+<br>13194: Usability: editor tabs  
+<br>13384: NPE on launching  
+<br>13432: OleControlSIte doesn't propagate WM_SETFOCUS message to an ActiveX control
+<br>13639: Controls do not appear in tool items  
+<br>13800: Can not get FocusEvent from Combo  
+<br>13982: Eclipse won't start on GTK2  
+</blockquote>
+
+
+<h2> SWT Build 2.0 034 - Tuesday April 9, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6774: WinCE - items regarding Pocket PC (including 2002) integration
+<br>8806: Moving views is difficult  
+<br>9245: ToolItems in a ToolBar not displaying images on WinCE  
+<br>9616: Resize column leaves some cheese in the table  
+<br>10603: Add Breakpoint keeps prompting me  
+<br>10937: Converter problem on Solaris  
+<br>11520: ShellAdapter.shellDeactivated() never called on Linux-Motif  
+<br>11734: Focus not on "Finished" button  
+<br>11940: Down arrow does not access drop-down portion of toolbar buttons
+<br>12241: Codeassist disappear after a few seconds  
+<br>12573: Table sends selection event twice when in TabFolder
+<br>12787: Changing a menu item's text makes its icon disappear  
+<br>12885: Label as a seperator doesn't resize properly  
+<br>13006: Alt+1 with blank TabFolder results in NPE  
+<br>13014: SetToolTipText called multiple times does not resize.
+<br>13049: CTabFolder focus traversing is busted  
+</blockquote>
+
+
+<h2> SWT Build 2.0 033 - Tuesday April 2, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+12446: SWT Table Column Image Corruption  
+<br>12447: Tree.getSelection() is slow for large trees  
+</blockquote>
+
+
+<h2> SWT Build 2.0 032 - Thursday March 28, 2002 </h2>
+
+<h3>
+<a NAME="StyledText Bidi Printing"></a>StyledText Bidi Printing</h3>
+<blockquote>
+<p>Support has been added for printing the contents of a StyledText widget on
+bidirectional language Windows platforms.</p>
+<p> Note however that printing English or local language text does not work properly with some
+printer drivers when using a non-TrueType font. This has been noticed on Windows
+NT systems with the HP Laserjet 4 series printer driver. Please use a TrueType
+font if text is printed garbled .  
+<br></p>
+</blockquote>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4467: DCR - Tree missing keyboard support (1FJH5GY)  
+<br>4525: Property viewer doesn't adapt to bg color changes (1FX8XL1)  
+<br>10317: StyledText - bidi printing support  
+<br>10483: SWT ControlExample DirectoryDialog does not choose directories
+<br>11081: Java Source Editing with Greek Locale no longer works  
+<br>11549: Create project does not allow creation of folder in its project selection
+<br>12099: Accessibility : JAWS can not read TabItem's text  
+<br>12231: DND : Drag and Drop busted (mouse capture not released)  
+</blockquote>
+
+
+<h2> SWT Build 2.0 031 - Monday March 18, 2002 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+<ul>
+<li>ScrolledComposite.getOrigin</li>
+<li>ScrolledComposite.setOrigin</li>
+<li>Variant.getType</li>
+</ul>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+7500: Display.getBounds() calls from another thread give incorrect results
+<br>10273: NPEs caused by unitialized 'item' field in event
+<br>10481: View will not Size via Pull Down
+<br>10511: Add programmatic scrolling to ScrolledComposite
+<br>10942: Launcher should autodetect gtk only installation.
+<br>11051: Invalid token pasting in callback.c
+<br>11090: CLabel Javadoc says SmartLabel
+</blockquote>
+
+
+<h2> SWT Build 2.0 030 - Tuesday March 12, 2002 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+<ul>
+<li>OleControlSite.addEventListener(OleAutomation,int,OleListener)</li>
+<li>TableItem.getForeground()</li>
+<li>TableItem.getBackground()</li>
+<li>TableItem.setForeground(Color)</li>
+<li>TableItem.setBackground(Color)</li>
+<li>TreeItem.getForeground()</li>
+<li>TreeItem.getBackground()</li>
+<li>TreeItem.setForeground(Color)</li>
+<li>TreeItem.setBackground(Color)</li>
+<li>TableTreeItem.getForeground()</li>
+<li>TableTreeItem.getBackground()</li>
+<li>TableTreeItem.setForeground(Color)</li>
+<li>TableTreeItem.setBackground(Color)</li>
+</ul>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+8737:  No Selection event when DND starts
+<br>9950:  ColorDialog weird behavior
+<br>9959:  Persistent Eclipse NPE on startup
+<br>9993:  OleControlSite is not powerful enough
+<br>10420: Mouse and DND Event notification out of order
+<br>10480: Unable to open files with "System Editor"
+<br>10482: View will not Move via Pull Down
+</blockquote>
+
+
+<h2> SWT Build 2.0 029 - Tuesday March 5, 2002 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+
+<b>Note:</b> The new Accessibility API is experimental, and will likely change.
+<ul>
+<li>Control.getAccessible() added</li>
+<li>package <b>org.eclipse.swt.accessibility</b> added, containing the following classes:<ul>
+<li>Accessible</li>
+<li>ACC</li>
+<li>AccessibleListener</li>
+<li>AccessibleAdapter</li>
+<li>AccessibleEvent</li>
+<li>AccessibleControlListener</li>
+<li>AccessibleControlAdapter</li>
+<li>AccessibleControlEvent</li>
+</ul></li></ul>
+
+Here are two examples that use the accessibility API:<ul>
+<li>For a control with no child items:
+<code><pre>
+		button.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				e.result = "My Button Label";
+			}
+		});
+</pre></code></li>
+
+<li>For a control that has child items:
+<code><pre>
+		list.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+			public void getName(AccessibleEvent e) {
+				if (e.childID == ACC.CHILDID_SELF) {
+					e.result = "My List Label";
+				} else {
+					e.result = "My List Item Label: " + list.getItem(e.childID);
+				}
+			}
+		});
+</pre></code></li></ul>
+<b>Note:</b> The API involving the AccessibleControlXxx classes is more complex, and more likely to change. 
+It is unlikely that application code will need to use it. 
+It is primarily for the use of custom control implementors.
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4436: Grid Layout Problem (1FOLZZE)  
+<br>4666: DCR - Need a way for child shells to disable ESC closing (1GE8RXW)
+<br>4790: XInitThreads causes japanese input method to hang (1GIRYR6)
+<br>4775: XInitThreads causes X printing to hang (1GITBQL)
+<br>4454: DCR: Tables need to support cell editing (1FGPLPP)
+<br>10002: Detection of CDE as active WM is platform-specific  
+<br>10426: Esc traverse does not go up hierarchy  
+</blockquote>
+
+
+<h2> SWT Build 2.0 028 - Thursday February 28, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4688: J - Font Dialog does not select a font when selecting a font family (1GET5BW)
+<br>7139: FontDialog: Selected font not used  
+<br>8865: Exception when creating a ToolItem with a null image in Linux
+<br>10250: Slider with VERTICAL orientation - down arrow increments  
+</blockquote>
+
+
+<h2> SWT Build 2.0 027 - Tuesday February 26, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6409: Node selection in package view  
+<br>8389: MouseUp not reported correctly if DragDetect hooked  
+<br>9364: Exception in StyledText  
+<br>9773: Font and Color dialogs do not appear centred on parent  
+<br>9950: ColorDialog weird behavior  
+</blockquote>
+
+
+<h2> SWT Build 2.0 026 - Tuesday February 12, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+6679: Image.getImageData() not implemented  
+<br>7962: SWT.getPlatform() javadoc incorrect for return description  
+<br>8984: CTabFolder.MIN_TAB_WIDTH should not be static  
+<br>9022: Linux: Tree Viewer does not get defualt Selection  
+<br>9072: Table Tree does not pick up windows settings changes  
+<br>9091: StyledText in SINGLE mode should look more like a Text widget  
+<br>9172: SWT AddressBook Example calls undefined method
+<br>9432: The doc for Tracker widget should specify that rectangles are in screen coordinates
+</blockquote>
+
+
+<h2> SWT Build 2.0 025 - Tuesday February 5, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+2430: Sorting the Tasks List should display icon for sort key/order (1GF5TQO)
+<br>4485: DCR - Table column header decoration capability needed (1FOQQM8)
+<br>6035: Difference in tree "expanded state" between Windows and Motif
+<br>6983: Browse button in Import->Plugins not working.  
+<br>7400: Single line text fields not firing "Key Pressed" events for the Enter, Up(arrow), and Down(arrow) keys
+<br>8173: Accessibility: keyboard-invoked popup menu not usable  
+<br>8196: Accessibility: shift+F10 does not display view menu  
+<br>8273: Horizontal scorllbar does not allow scrolling when required  
+<br>8396: WINCE: Menu bar obscures control when control location is 0,0
+<br>8397: WINCE: Menu item colors don't match menu bar  
+<br>8412: WINCE: Background color of buttons looks wrong  
+<br>8640: GP: opening Synchronization perspective  
+<br>8942: Wrong text indent in a table when use image  
+</blockquote>
+
+
+<h2> SWT Build 2.0 024 - Tuesday January 29, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4654: VAJ hangs when dragging from file manager to the desktop. (1GDQFZ6)
+<br>4720: Eclipse freezes during drag & drop operation (1GF7RRH)  
+<br>4724: GP - Fatal app error - renaming resource on linux (1GF7TXO)  
+<br>4736: Fix printing (1GFW2CW)  
+<br>4817: Need JavaDoc comments for SWT Photon (1GJLEU0)  
+<br>6835: Characters ????????????? and ??????? doesn't work in Java editor on Swedish  
+<br>8255: Closing paint viewer causes internal error  
+<br>8410: Black color become transparent in ToolBar images  
+<br>8503: StyledText - cheese if resize in word wrap tries to keep partial top line
+<br>8547: Intellimouse scrolling does not work in eclipse  
+</blockquote>
+
+
+<h2> SWT Build 2.0 023a - Thursday January 24, 2002 </h2> (Eclipse Milestone 2)
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4700: NumLock and CapsLock disable accelerators (1GETDT9)  
+<br>6180: Wake mechanism broken on Motif  
+<br>6873: Decorations.setImage() throws NPE on WINCE  
+<br>7805: A new ImageData(from an InputStream) throwing NPE  
+<br>8133: When toolbar has focus, can't use mnemonics for File menus  
+<br>8213: exception: widget is disposed  
+</blockquote>
+
+
+
+
+<h2> SWT Build 2.0 023 - Tuesday January 22, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4610: StyledText - DCR - Word wrap (1GABS6C)  
+<br>4644: Mouse click on a link displayed in embedded IE5 ActiveX is not reliable (1GD7TT2)
+<br>5660: SWT default font's need to honor accesability settings  
+<br>6324: SWT.CLOSE implies rendering of Minimize and Maximize buttons  
+<br>6997: StyledText - mark new API  
+<br>7123: Shell shows the maximize button enabled when SWT.TITLE | SWT.BORDER | SWT.CLOSE style passed
+<br>7361: Add getOffsetAtLine API  
+<br>7632: Tree widget doesn't select item with focus on right-click  
+<br>7849: Labels on WINCE don't use background color of parent when color isn't set
+<br>7867: DCR: Delete checkSubclass method from Dialog  
+<br>7959: Potential problems when running on big endian machines  
+</blockquote>
+
+
+<h2> SWT Build 2.0 022 - Tuesday January 15, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4663: Fail to tab the views. (1GGYV8T)  
+<br>4718: Tool tip is openning when on dragging. (1GF5Z7Z)  
+<br>5866: Can't multiselect in Tree using keyboard  
+<br>6592: Box for checkbox table items is too large when using large fonts
+<br>6770: Only the left mouse button should select in a Table.  
+<br>6852: StyledText - verify event character invalid value  
+<br>6940: MenuShortcuts only respond to Ctrl-N  
+<br>7190: Ctrl-S does not work  
+<br>7458: WinCE - top level Shells created through Display.asyncexec can have incorrect Z-order
+<br>7459: Caret leaving garbage  
+<br>7486: Cannot use keyboard Shift Select in a Tree  
+<br>7559: ScrollBar thumb is reset when ScrollBar is hidden, then shown
+</blockquote>
+
+
+<h2> SWT Build 2.0 021 - Tuesday January 8, 2002 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4443: Layout: Exceptions when horizontalSpan > remaining columns (1FFC6XZ)
+<br>4462: ScrollBar - vbar.setMaximum does not work after hbar is hidden (and vice versa) (1FIG5CG)
+<br>4722: First editor tab missing close button (1GF7QIQ)  
+<br>4755: Rebuilding launcher from another directory (1GGNRG0)  
+<br>6315: Some perspective save confirmation messages cut off  
+<br>6352: Editor doesn't get activated when revealing first match  
+<br>6908: Menu handle leak in org.eclipse.swt.widgets.Menu.destroyItem(MenuItem)
+<br>6945: Child shells not displaying on WinCE  
+<br>6982: CheckedTables have no check boxes  
+<br>7005: Missing methods in SWT/GTK implementation  
+<br>7018: Tree does not honor SWT.CHECK style  
+<br>7068: ScrollBar.setVisible(true) does not work after changing values
+<br>7150: StyledText - bidi - partial styling of ligatures bug  
+<br>7191: Dialogs not big enough for content  
+</blockquote>
+
+
+<h2> SWT Build 2.0 020 - Tuesday December 18, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4715: First help click on a chapter is ignored (1GF5TV9)  
+<br>4784: MIF Files sometime fail (1GI7H7V)  
+<br>4797: Table does not use System fonts (1GIV4PZ)  
+<br>6635: WinCE: decorations.setMenuBar can be set only once  
+<br>6685: StyledText - on setFont caret not being positioned correctly  
+<br>6773: StyledText.computeSize uses display width to calculate number of visible lines
+<br>6790: Touching code assist scrollbar dumps javacore  
+<br>6863: Remaining issues in emulated CoolBar and CoolItem  
+<br>6933: Switching to help perspective crashes the workbench  
+<br>7014: Tree not accepting children  
+</blockquote>
+
+
+<h2> SWT Build 2.0 019 - Tuesday December 11, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4461: SWTException should overwrite printStackTrace(..) (1GLDW6P)  
+<br>4493: Check multilingual support on Windows 2000 (1FQFCBQ)  
+<br>4611: StyledText - StringIndexOutOfBounds exception inserting text in line break (1GEID8B)
+<br>4620: Workbench does not close ActiveX control's file handle (1GB76AZ)
+<br>4660: Moving  
+<br>4719: Background colour of views/editors (1GF6C8Y)  
+<br>4739: DCR: Provide auto-scrolling and expansion by default in the tree during DND (1GFW7NQ)
+<br>4767: Tab Folders can not be toggled using keys. (1GHFCZU)  
+<br>4780: YAM: Cannot read some JPEG files (1GI6ZEN)  
+<br>4783: Can't scroll to the top of the navigator (1GI7GTG)  
+<br>5071: Shift-TAB doesn't generate proper event  
+<br>5677: Hierarchy outline has empty space  
+<br>5857: Image.getImageData needs to support 15 bit color depth  
+<br>6472: Table widget has empty entries  
+<br>6572: Default background color of Lists and Combos not consistent with Win2K
+<br>6651: Text.setSelection() doesn't actually display the selection visually for SWT.SINGLE
+<br>6654: Text.getSelection() not returning correct info on WINCE  
+</blockquote>
+
+
+<h2> SWT Build 2.0 018 - Tuesday December 4, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4419: Widgets - Missing features and API on MOTIF (1FBPKCT)  
+<br>4494: ColorDialog doesn't open in VA/Java with JDK 1.2 (1FQGM6H)  
+<br>4833: Remove focus button from Table (1GK7MK4)  
+<br>4860: StyledText - StyledTextBidi, BidiUtil need doc (1GL32C8)  
+<br>6204: KeyListener on table does not work.  
+<br>6438: StyledText - bidi - isBidi test not working on XP  
+</blockquote>
+
+
+<h2> SWT Build 2.0 017 - Tuesday November 27, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4714: Label draws wrong background when image is set (1GF0IC6)  
+<br>5503: Tabbing broken  
+<br>5986: BidiUtil handling of WM_INPUTLANGCHANGE needs to be fixed
+<br>5992: Changing Java Editor font in Preference Page makes Eclipse hang or crash
+<br>6171: NullPointerException in ImageLoader save method with SWT.IMAGE_JPEG
+</blockquote>
+
+
+<h2> SWT Build 2.0 015 - Tuesday November 20, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4791: StyledText does not switch colour (1GILHIW)  
+<br>4956: StyledText - change StyledTextBidi.toString to conform with standard SWT format
+<br>5599: StyledText - redrawRange does not check range  
+<br>5722: Selecting font crashes eclipse with a javacore  
+<br>5815: StyledText - setFont refresh problem  
+<br>5846: Combo.select does not ignore an out of range index
+<br>5990: Printing single page prints entire document  
+</blockquote>
+
+
+<h2> SWT Build 2.0 014 - Thursday November 15, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4542: Menu accelerators CTRL+ / and CTRL + SHIFT + / don't work (1FYAF8V)
+<br>4754: Arrow keys not accepted as keyboard accelerators (1GGM4U3)  
+<br>5815: StyledText - setFont refresh problem  
+</blockquote>
+
+
+<h2> SWT Build 2.0 013 - Tuesday November 13, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+4846: StyledText - bidi - partial styling of ligatures (1GL3AWT)  
+<br>4859: StyledText - bidi - provide solution for bidi coloring hack (1GL2UNC)
+<br>5491: StyledText - getStyleRangeAtOffset allows offset == getCharCount
+<br>5497: StyledText - ExtendedModify event not sent on setText
+<br>5602: StyledText - page down causes IllegalArgumentException in invisible/small widget
+<br>5615: StyledText - window start does not always work  
+<br>5622: StyledText - print causes NPE when invoked on empty widget  
+<br>5626: StyledText - print does not check for null Printer argument  
+<br>5633: StyledText - replaceTextRange and setText do not check for null argument
+<br>5664: StyledText - Single line should not accept tab  
+<br>5673: StyledText - SINGLE line mode still allows some multi line cursor navigation
+<br>5722: Selecting font crashes eclipse with a javacore
+<br>5725: Please rename "Eclipse Launcher"  
+<br>5802: EC: ControlExample does not run on Solaris  
+</blockquote>
+
+
+<h2> SWT Build 2.0 012 - Monday November 5, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+<blockquote>
+5470: User is lost when trying to move views around  
+<br>5484: Tab no longer traverses between widgets!!!  
+</blockquote>
+
+
+<h2> SWT Build 2.0 011 - Thursday November 1, 2001 </h2>
+<h3>
+<a NAME="API Changes"></a>API Changes</h3>
+<code>FontData.setLocale(Locale)</code> has been changed to <code>FontData.setLocale(String)</code>.
+<ul>
+<li>
+J2SE code can simply create a <code>Locale</code> and invoke <code>toString()</code> to pass it onto the new <code>setLocale</code>.
+<li>
+CLDC code will have to form a string matching the format specified in the J2SE javadoc of <code>java.util.Locale.toString()</code>.
+</ul>
+Example:
+<blockquote><code><pre>
+Locale[] locales = {
+	Locale.US, new Locale("iw", "IL"), new Locale("ar", "SA"), new Locale("ru", "RU"),
+	Locale.GERMAN, new Locale("ja", "JP"),
+	null,
+};
+// old code: fd.setLocale(locales[i]);
+String locale = (locales[i] != null ? locales[i].toString() : null);
+fd.setLocale(locale);
+</pre></code></blockquote></p>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+4664: StyledText does not compute correct text width (1GELJXD)  
+<br>4832: German: Fonts cannot handle German characters (1GKMHHY)  
+<br>4961: Preferences dialog disappears when you click on certain pages
+<br>5180: Open Motif for Linux shared libraries are duplicated in Eclipse  
+<br>5304: StyledText - ArrayIndexOutOfBoundsException in StyledTextBidi.segmentedRangesFor
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 010 - Thursday October 25, 2001 </h2>
+
+<h3>
+<a NAME="Behaviour change"></a>Behaviour change</h3>
+<p>
+1) The Drag Under effect of scrolling and expanding items as you drag over the <code>Tree</code> or <code>Table</code> has been added.  To enable this drag under effect, in the <code>DragOver</code> event set the <code>event.feedback</code> to have a bitwise combination of <code>DND.FEEDBACK_SCROLL, DND.FEEDBACK_EXPAND</code> and (<code>DND.FEEDBACK_SELECT, DND.FEEDBACK_INSERT_BEFORE, DND.FEEDBACK_INSERT_AFTER</code>) - where the last three items are mutually exclusive.
+<blockquote><code><pre>
+target.addDropListener (new DropTargetAdapter() {
+	public void dragOver(DropTargetEvent event){
+		event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
+	}
+}
+</pre></code></blockquote></p>
+<p>
+2) On some operating systems it is preferred to move files in a drag and drop operation rather than for the drop target to make a copy of the file and the drag source to delete the original file.  The operation of moving the file is preformed by the drop target.  For these cases, the new drop type <code>DND.DROP_TARGET_MOVE</code> has been added.  The Eclipse <code>DropTarget</code> does not support this behaviour but the Eclipse <code>DragSource</code> can recognize this scenario.  If another application has chosen to move the file rather than copy/delete, the <code>DragFinished</code> event on the <code>DragSource</code> will have an <code>event.detail</code> value of <code>DND.DROP_TARGET_MOVE</code>.
+<blockquote><code><pre>
+source.addDragListener (new DragSourceAdapter () {
+	public void dragFinished(DragSourceEvent event) {
+		if (event.detail == DND.DROP_TARGET_MOVE) {
+			// clean up presentation but do not delete underlying file
+		}
+	}
+}
+</pre></code></blockquote></p>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1767: Display ASCII for values greater than 127 fails (1GLE8I5)  
+<br>4725: FontData spec should disallow null name (1GL34H3)  
+<br>4844: Tab appears narrower than space (1GL2WTY)  
+<br>4852: German: Cannot start Eclipse in Linux 7.2 (1GKYY99)  
+<br>4865: TableTreeEditor.getItem returns an item after setting it to null (1GLE0IQ)
+<br>4932: StyledTextBidi has equals but no hashCode method  
+<br>4957: StyledText - implement StyledTextBidi.isLigated  
+<br>5132: StyledText - remove hardcoded margin  
+<br>5178: Change BidiUtil calls to handle true Unicode/Windows CE changes
+</blockquote>
+
+
+<h2> SWT Build 2.0 009 - Thursday October 18, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+4444: EWT - incorrect selection feedback when the item's text is changed (1FFP3U2)
+<br>4446: DCR - GridBagLayout compatible LayoutManager (1FGCPO2)  
+<br>4762: StyledText - default lineStyler remove line background color hack (1GHBMUV)
+<br>4819: StyledText - bidi - cursor navigation (1GJLKSN)  
+<br>4820: StyledText with style SINGLE does not handle CR/LF well (1GJM2Z5)
+<br>4855: Severe: Check boxes are black (1GL0XSI)  
+<br>4909: EC: Combo.setText doesn't work on Linux  
+<br>4910: EC: Combo.select() fires a selected event on Linux only  
+<br>5045: Control.moveAbove() throws NPE if argument is null  
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 008 - Thursday October 11, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GLDQYB: SWT:WIN - Text widget with DND enabled, MouseDown but no MouseUp
+<br>1GLADBK: SWT:ALL - StyledText - getOffsetAtLocation should throw exception
+<br>1GL4ZVE: SWT:ALL - StyledText - getOffsetAtLocation(getLocationAtOffset(N)) != N
+<br>1GKO6NY: SWT:ALL - Backspacing in StyledText does not fire selection changed
+<br>1GKB1OC: ITPJUI:ALL - Error in JavaDoc hover help
+<br>1GK9API: SWT:ALL - StyledText - bidi - numbers,mixed LtoR/RtoL text and caret positioning
+<br>1GJLQ16: SWT:ALL - StyledText - bidi - backspace and delete behavior
+<br>1GIK7D4: SWT:ALL - StyledText - Selection cleared when deletion disallowed by verify listeners
+<br>1GDOMBI: SWT:WINNT - StyledText - redrawRange() doesn't checkWidget
+<br>1GDKK3R: SWT:WINNT - StyledText - setCaretOffset and line delimiters bug
+<br>1FMRQOT: SWT:ALL - No null argument checks in Dialog constructors
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 007 - Thursday October 4, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GKZH74: ITPJUI:WIN2000 - Disappearing Stop icon
+<br>1GKZ8CV: SWT:WINNT - setSelection triggers SelectionChanged event
+<br>1GKU4C5: SWT:ALL - StyledText - bidi - scrolling to show cursor should take cursor direction into account
+<br>1GKPYMK: SWT:WINNT - StyledText - bidi - caret moves when switching keyboard from Hebrew to Arabic
+<br>1GKOGQO: SWT:ALL - Javadoc: setSelection in Button and ToolItem
+<br>1GKM2O5: SWT:WINNT - StyledText - bidi - ArrayIndexOutOfBounds exception in StyledTextBidi.isRightToLeft
+<br>1GKM193: SWT:WINNT - StyledText - bidi autoscroll left does not always scroll all the way to the left
+<br>1GKKC0U: SWT:ALL - Tracker calls OS.DispatchMessage(msg) on windows but does not on Linux.
+<br>1GIVAXX: SWT:ALL - StyledText - Editors should support shift-backspace
+<br>1GELQ14: SWT:WINNT - StyledText - DefaultContent - handle weird line delimiter cases
+<br>1GE8LG0: SWT:Linux - Toolbar is not showing the separators.
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 006 - Thursday Sept 27, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GHWA19: SWT:WINNT - Problem with callbacks from CCombo
+<br>1GHFDPV: SWT:WIN2000 - Setting selection in Table does not update focus item
+<br>1GF644V: ITPUI:Linux - Unzoom is changing the active editor.
+<br>1GKM3XS: SWT:WINNT - StyledText - bidi autoscroll left: selection reset on mouse move
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 005 - Friday Sept 21, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GK09Z0: SWT:Linux - setEnabled(false) has no effect on aToolbar
+<br>1GJZZS6: SWT:Linux - File Dialog returns a directory
+<br>1GF7SMC: ITPUI:Linux - Wrong bg for close button on editor tab
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 004 - Thursday Sept 13, 2001 </h2>
+
+<h3>
+<a NAME="API Behaviour change"></a>API Behaviour change</h3>
+The behaviour of dispose for GCs has been modified such that attempting to dispose of
+a GC on a control <em>after</em> the control has been disposed will generate an
+SWTException.  This fixes an OS resource leak and potential GPF situation.
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GJUAKL: SWT:Neutrino - Control.internal_new_GC() needs !isValidWidget() check
+<br>1GJN52N: SWT:Linux - Text prints system error message for horizontal scrollbar
+<br>1GJBOAV: SWT:ALL - ScrolledComposite bugs
+<br>1GIXELI: SWT:ALL - Need Caret to allow bitmaps so bidi caret can be created
+<br>1GI5O1T: SWT:WINNT - Composite.setFocus takes focus when it should not
+<br>1GHOND7: SWT:WIN2000 - Selection problem with single-selection trees
+<br>1GHG990: SWT:ALL - Probable bug in Slider page increment setting
+<br>1GENJ60: SWT:ALL - ScrolledComposite should include example in its class comment
+<br>1GEA7K7: ITPUI:Linux - Default button not working
+</blockquote>
+
+
+
+<h2> SWT Build 2.0 003 - Friday Sept 07, 2001 </h2>
+
+<h3>
+<a NAME="New APIs"></a>New APIs</h3>
+
+<blockquote>
+FontData.setLocale(java.util.Locale) added
+<br>Caret.getImage() added
+<br>Caret.setImage(Image) added
+<br>GC.fillGradientRectangle(int, int, int, int, boolean) added
+</blockquote>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GJM7KM: SWT:Linux - Table and Tree return a different size for every second call to computeSize
+<br>1GJLKHE: SWT:SPARC - GP on "Installed JREs" preference page
+<br>1GJLK63: SWT:ALL - StyledText - bidi - keyboard switching
+<br>1GJLE36: SWT:WINNT - Alpha data redrawing improperly after occlusion
+<br>1GJA2L7: SWT:WIN - Different behavior for GC.drawString() args on Win vs. Photon
+<br>1GIZ0P6: SWT:WINNT - GC.drawImage() problem with transparent pixels
+<br>1GIXELI: SWT:ALL - Need Caret to allow bitmaps so bidi caret can be created
+<br>1GI7FQF: SWT:ALL - Can't set focus to Tasks View by Keyboard
+<br>1GI7EBL: SWT:Linux - api typo: ToolItem>>getDisabledmage()
+<br>1GI3P86: SWT:ALL - Semantic differences between emulated Table and Tree codebase on Motif and Photon
+<br>1GI1WEA: SWT:Neutrino - Text selection code not working correctly
+<br>1GHWED2: SWT:WINNT - GC.stringExtent() not correct for Windows Arial font
+<br>1GHWB7G: SWT:Linux - Linux font dialog doesn't open with given values.
+<br>1GHVRFY: SWT:Neutrino - Text#ClearSelection changes the CaretPosition in a SINGLE-line widget
+<br>1GHVLV6: SWT:Neutrino - Text#SetTopIndex and getTopIndex inconsistent
+<br>1GHOJ6T: SWT:Neutrino - Text#setSelection inconsistent between SINGLE and MULTI
+<br>1GHBLRA: SWT:Neutrino - Display.getBounds() returns incorrect info
+<br>1GH48UQ: SWT:Neutrino - Enter key does not insert new line with Text.MULTI widget
+<br>1GGT0TM: SWT:Neutrino - GC#drawArc inconsistent between NT and NTO
+<br>1GG1DBT: SWT:SPARC - Solaris loses input characters
+<br>1GG07HW: SWT:Linux - Tree.getItem() modifies its argument on Motif
+<br>1GG0069: SWT:Linux - Weird layout issues seen in Control Example
+<br>1GFZZLK: SWT:Linux - ToolItems not disabled when containing ToolBar is disabled
+<br>1GFZU3X: SWT:ALL - ImageLoader.load(String) not closing file input stream
+<br>1GFZPDP: SWT:Linux - Combo box with SWT.SIMPLE style does not respect Disabled flag (visually)
+<br>1GFW85H: SWT:ALL - Printer.getPrinterData() has stale comment
+<br>1GFW6MQ: SWT:ALL - DCR: Program class needs .equals() and .hashCode()
+<br>1GFW4YN: SWT:ALL - Help KevinH add printing to Eclipse
+<br>1GFQKDT: SWT:ALL - Image.setBackground() / getBackground() asymmetry
+<br>1GFONVW: SWT:Linux - Empty Combo should not fire Selection event
+<br>1GFL0HP: SWT:Linux - Remaining items in SWT comments to fix
+<br>1GET90D: SWT:Linux - SWTExceptions bring down Eclipse
+<br>1GESQBK: ITPJUI:WINNT - How to get access to pop-up menus of the Java editor ?
+<br>1GELX4A: ITPUI:ALL - Hover help is not visible if pane is dragged out of workbench
+<br>1GEHWAF: ITPUI:WIN2000 - Can't enter text in a Swing TextField or TextArea
+<br>1GE5ECJ: ITPUI:WIN2000 - Hover help for title bar buttons appears behind detached view
+<br>1GDX7R8: ITPUI:ALL - SWT setText() does NOT have any way to avoid making mnemonics.
+<br>1GD5UHA: SWT:WIN2000 - Double-clicking on toolbar item gives double-click event on toolbar
+<br>1GBXIEO: SWT:ALL - DCR: Include cursor pos in Tracker move event
+<br>1G4IMQ3: SWT:WINNT - Table images incorrect after rapid removal and creation
+</blockquote>
+
+
+<h2> SWT Build 2.0 002 - Wednesday July 18, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GGZ13T: SWT:Neutrino - invalid mouse state occuring in Photon
+<br>1GGRCCS: SWT:Neutrino - Label does not wrap in SWT0125
+<br>1GGAON2: SWT:ALL - Scaling image with alphas does not work correctly
+<br>1GFZQVQ: SWT:Linux - Vertical ProgressBar grows incorrectly
+<br>1GFQA18: SWT:Linux - Cheese with GC drawRoundedRectangle() on Motif
+<br>1GFPK6G: SWT:Linux - Motif fillPolygon() specifies improper hint
+</blockquote>
+
+
+<h2> SWT Build 2.0 001 - Thursday July 12, 2001 </h2>
+
+<h3>
+<a NAME="Problem reports fixed"></a>Problem reports fixed</h3>
+
+<blockquote>
+1GGET76: SWT:Neutrino - Canvas does not respond to setFocus()
+<br>1GGAS5P: SWT:Neutrino - Photon on QNX 6.1.x needs SWT native changes
+<br>1GG96RO: SWT:Neutrino - drawOval and fillOval not compatible
+<br>1GG8ZLV: SWT:WINNT - drawOval behaves differently on Windows vs. other platforms
+<br>1GFKYD9: SWT:Linux - -HANG- (Xserver) When perfoming display.wake() in a DND dragStart()
+<br>1GFKK37: SWT:Linux - FileViewer examples issues
+<br>1GFBHX6: SWT:ALL - CTabItem tool tip flashing
+<br>1GF9ZMT: SWT:SPARC - 8-bit Icons are losing colors
+<br>1GF9ZJG: SWT:SPARC - Icons are being masked incorrectly on Solaris
+<br>1GF9YHD: ITPUI:WIN2000 - SWTException: help view
+<br>1GF9Y32: SWT:SPARC - 24-bit MSB Icons are wrong color (greenish)
+<br>1GF0D05: SWT:Linux - GPFs when running JUnit TestRunner in J9 AWT
+<br>1GEUZZC: SWT:ALL - "Name" of plugin inconsistant with other plugins
+<br>1GETDP5: ITPUI:Linux - NPE while closing editor on linux
+<br>1GDVRT5: SWT:Neutrino - Alpha channel memory leak
+<br>1GDRXZR: ITPJUI:Linux - SWT: Context-Menus issue under Linux 
+<br>1GD0OSK: SWT:ALL - API - package javadoc for SWT packages missing
+<br>1GCHS75: SWT:WINNT - workbench exits during expand collapse
+<br>1GCFUS0: SWT:ALL - CTabFolder "floating" X sticks sometimes
+<br>1GAR95O: SWT:ALL - Remove Smalltalk comments from SWT code
+<br>1GAQRND: SWT:ALL - DOC: Write good Javadoc comments for all of SWT
+<br>1G97I28: SWT:Linux - Tool bar buttons do not always work
+<br>1G84AZB: ITPDUI:ALL - Rename truncates name
+<br>1G845EZ: SWT:WIN2000 - Spec for Layout.computeSize() is truncated
+<br>1G7YXLB: SWT:WIN - StyledText - NLS Support
+<br>1G7NSHR: SWT:ALL - Widget.addListener(int, Listener) vs. adding typed listeners
+<br>1G4XDJO: SWT:Linux - Tree needs to display an insert marker
+<br>1G0Y8NZ: SWT:ALL - Combo box doesn't send key and mouse events 
+<br>1FXAVLF: SWT:WINNT - Disabled toolbar icons don't adapt to appearance changes
+<br>1FV1S18: SWT:ALL - Need more WM_* messages passed to ActiveX Control
+<br>1FTWX55: SWT:ALL - Inconsistant commenting of which SWT objects need to be disposed.
+</blockquote>
+</body>
+</html>
diff --git a/eclipse/plugins/org.eclipse.swt/tasks/build.xml b/eclipse/plugins/org.eclipse.swt/tasks/build.xml
index 5d03cfe..ba8a7dd 100644
--- a/eclipse/plugins/org.eclipse.swt/tasks/build.xml
+++ b/eclipse/plugins/org.eclipse.swt/tasks/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
-    Copyright (c) 2009 IBM Corporation and others.
+    Copyright (c) 2009, 2010 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
@@ -30,14 +30,13 @@
 	 To void clean after build define a property named "clean" to empty ("").
 	 To run only clean define a property named "targets" to empty ("").
 	 
--->
+ -->
 
 <project name="swtbuild" basedir="../..">
 	<property name="tasks" value="org.eclipse.swt/tasks"/>
 	<import file="${basedir}/${tasks}/properties.xml"/>
 
 	<!-- CVS values -->
-	<property name="cvsRootAnon" value=":pserver:anonymous at dev.eclipse.org:/cvsroot/eclipse"/>
 	<property name="cvsRoot" value=":ext:fheidric at dev.eclipse.org:/cvsroot/eclipse"/>
 	<property name="TAG" value=""/>
 	<property name="builddir" value="org.eclipse.swt/bin/library"/>
@@ -55,24 +54,30 @@
 	<property name="cp_photon" value="${cp_common} 'org.eclipse.swt/Eclipse SWT PI/photon/library'"/>
 
 	<!-- Low level build tasks -->
-	<target name="init_build" if="eclipse.pdebuild.home">
+	<target name="init_build" if="eclipse.running">
 		<eclipse.refreshLocal resource="org.eclipse.swt" depth="infinite"/>
 		<eclipse.incrementalBuild project="org.eclipse.swt" kind="incr"/>
 	</target>
 
-	<target name="refresh_fragment" if="eclipse.pdebuild.home">
+	<target name="refresh_fragment" if="eclipse.running">
 		<echo>refreshing ${fragment}</echo>
 		<eclipse.refreshLocal resource="${fragment}" depth="infinite"/>
 	</target>
 
 	<target name="build_win32_x86" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="x86 install"/>
+		<property name="targets" value="x86 all install"/>
 		<exec dir="${basedir}/${builddir}" executable="${basedir}/${builddir}/build.bat" failonerror="true">
 			<env key="JAVA_HOME" value=""/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
 		</exec>
+		<exec dir="${basedir}/${builddir}" executable="${basedir}/${builddir}/build.bat" failonerror="true">
+			<env key="JAVA_HOME" value=""/>
+			<env key="BUILD_XULRUNNER" value="true"/>
+			<arg line="x86 make_xulrunner install"/>
+			<arg line="${clean}"/>
+		</exec>
 		<antcall target="refresh_fragment">
 			<param name="fragment" value="org.eclipse.swt.win32.win32.x86"/>
 		</antcall>
@@ -80,7 +85,7 @@
 
 	<target name="build_win32_x86_64" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="x86_64 install"/>
+		<property name="targets" value="x86_64 all install"/>
 		<exec dir="${basedir}/${builddir}" executable="${basedir}/${builddir}/build.bat" failonerror="true">
 			<env key="JAVA_HOME" value=""/>
 			<arg line="${targets}"/>
@@ -93,7 +98,7 @@
 
 	<target name="build_win32_ia64" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="ia64 install"/>
+		<property name="targets" value="ia64 all install"/>
 		<exec dir="${basedir}/${builddir}" executable="${basedir}/${builddir}/build.bat" failonerror="true">
 			<env key="JAVA_HOME" value=""/>
 			<arg line="${targets}"/>
@@ -130,16 +135,18 @@
 		</antcall>
 	</target>
 
-	<target name="build_gtk_linux_rh3_x86" depends="init_build">
+	<target name="build_gtk_linux_x86" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="make_mozilla install"/>
+		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
 		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
 			<arg value="build.sh"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/IBMJava2-141"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/x86/ibm-java2-i386-50"/>
 			<env key="MOZILLA_SDK" value="/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk"/>
-			<env key="GCC_VERSION" value="-gcc3"/>
+			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk"/>
 			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"/>
 			<env key="MOZILLA_LIBS" value="${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4"/>
+			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
+			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
 			<env key="PKG_CONFIG_PATH" value="/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_x86/lib/pkgconfig"/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
@@ -149,43 +156,16 @@
 		</antcall>
 	</target>
 
-	<target name="build_gtk_linux_rh4_x86" depends="init_build">
-		<property name="clean" value="clean" />
-		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit" />
-		<exec dir="${basedir}/${builddir}" executable="make" failonerror="true">
-			<arg line="-f make_linux.mak"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/IBMJava2-141" />
-			<env key="MOZILLA_SDK" value="/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk" />
-			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk" />
-			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string" />
-			<env key="MOZILLA_LIBS" value="${MOZILLA_SDK}/../lib/libembedstring.a -L${MOZILLA_SDK}/../bin -L${MOZILLA_SDK}/../lib/ -lxpcom -lnspr4 -lplds4 -lplc4" />
-			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include" />
-			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue" />
-			<arg line="${targets}" />
-		</exec>
-		<copy todir="org.eclipse.swt.gtk.linux.x86" overwrite="true">
-			<fileset dir="${basedir}/${builddir}">
-				<include name="*.so" />
-			</fileset>
-		</copy>
-		<exec dir="${basedir}/${builddir}" executable="make" failonerror="true">
-			<arg line="-f make_linux.mak"/>
-			<arg line="${clean}"/>
-		</exec>
-		<antcall target="refresh_fragment">
-			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86" />
-		</antcall>
-	</target>
 
-	<target name="build_gtk_linux_rh3_x86_64" depends="init_build">
+	<target name="build_gtk_linux_x86_64" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="make_mozilla install"/>
+		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
 		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
 			<arg value="build.sh"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/jdk1.5.0"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/x86_64/jdk1.5.0"/>
+			<env key="PKG_CONFIG_PATH" value="/usr/lib64/pkgconfig"/>
 			<env key="MOZILLA_SDK" value="/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk"/>
 			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk/"/>
-			<env key="GCC_VERSION" value="-gcc3"/>
 			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"/>
 			<env key="MOZILLA_LIBS" value="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
 			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
@@ -198,55 +178,48 @@
 			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
 		</antcall>
 	</target>
-	
-	<target name="build_gtk_linux_rh4_x86_64" depends="init_build">
+
+	<target name="build_gtk_linux_ppc" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit"/>
-		<exec dir="${basedir}/${builddir}" executable="make" failonerror="true">
-			<arg line="-f make_linux.mak"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/jdk1.5.0"/>
-			<env key="MOZILLA_SDK" value="/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk"/>
-			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/amd64/mozilla/dist/sdk/"/>
+		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
+		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
+			<arg value="build.sh"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/PPC/ibm-java2-ppc-50"/>
+			<env key="MOZILLA_SDK" value=" /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk"/>
+			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk/"/>
 			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"/>
 			<env key="MOZILLA_LIBS" value="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
 			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
 			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
-			<env key="PKG_CONFIG_PATH" value="/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_x86_64/lib/pkgconfig"/>
+			<env key="PKG_CONFIG_PATH" value="/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_ppc/lib/pkgconfig/"/>
+			<env key="MODEL" value="ppc"/>
 			<arg line="${targets}"/>
-		</exec>
-		<copy todir="org.eclipse.swt.gtk.linux.x86_64" overwrite="true">
-			<fileset dir="${basedir}/${builddir}">
-				<include name="*.so" />
-			</fileset>
-		</copy>
-		<exec dir="${basedir}/${builddir}" executable="make" failonerror="true">
-			<arg line="-f make_linux.mak"/>
 			<arg line="${clean}"/>
 		</exec>
 		<antcall target="refresh_fragment">
-			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc"/>
 		</antcall>
 	</target>
 	
-	<target name="build_gtk_linux_ppc" depends="init_build">
+	<target name="build_gtk_linux_ppc64" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
+		<property name="targets" value="make_xulrunner make_xpcominit make_mozilla install"/>
 		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
 			<arg value="build.sh"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/IBMJava2-ppc-142"/>
-			<env key="MOZILLA_SDK" value=" /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc/mozilla/dist/sdk"/>
-			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc/mozilla/dist/sdk/"/>
-			<env key="MODEL" value="ppc"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/PPC64/ibm-java2-ppc64-50"/>
+			<env key="MOZILLA_SDK" value=" /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc64/mozilla/dist/sdk"/>
+			<env key="MOZILLA_LIBS" value="-m64 -L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
 			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"/>
-			<env key="MOZILLA_LIBS" value="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
+			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.1.1/ppc64/mozilla/dist/sdk/"/>
 			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
-			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
-			<env key="PKG_CONFIG_PATH" value="/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_ppc/lib/pkgconfig/"/>
+			<env key="XULRUNNER_LIBS" value="-m64 -L${XULRUNNER_SDK}/lib -lxpcomglue"/>
+			<env key="PKG_CONFIG_PATH" value="/usr/lib64/pkgconfig/:/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_ppc64/lib/pkgconfig/:/usr/local/GNOME/lib/pkgconfig"/>
+			<env key="MODEL" value="ppc64"/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
 		</exec>
 		<antcall target="refresh_fragment">
-			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc64"/>
 		</antcall>
 	</target>
 
@@ -257,7 +230,7 @@
 			<arg value="build.sh"/>
 			<env key="CC" value="cc"/>
 			<env key="CXX" value="CC"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/IBMJava2-141"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/x86/ibm-java2-i386-50"/>
 			<env key="MOZILLA_SDK" value="/bluebird/teamswt/bog/mozilla/solaris_x86/1.7/mozilla/dist/sdk"/>
 			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/xulrunner/1.8.0.1/solaris-x86/mozilla/dist/sdk"/>
 			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/include"/>
@@ -292,13 +265,72 @@
 			<param name="fragment" value="org.eclipse.swt.gtk.solaris.sparc"/>
 		</antcall>
 	</target>
+	
+	<target name="build_gtk_linux_s390" depends="init_build">
+		<property name="clean" value="clean"/>
+		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
+		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
+			<arg value="build.sh"/>
+			<env key="JAVA_HOME" value="/home/swtbuild/java5/ibm-java2-s390-50"/>
+			<env key="MODEL" value="s390"/>
+			<env key="MOZILLA_SDK" value="/home/swtbuild/mozilla-1.7.13/mozilla/dist/sdk"/>
+			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"/>
+			<env key="MOZILLA_LIBS" value="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
+			<env key="XULRUNNER_SDK" value="/home/swtbuild/xulrunner-1.8.0.1/mozilla/dist/sdk"/>
+			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
+			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
+			<env key="PKG_CONFIG_PATH" value="/usr/local/lib/pkgconfig"/>
+			<arg line="${targets}"/>
+			<arg line="${clean}"/>
+		</exec>
+		<antcall target="refresh_fragment">
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.s390"/>
+		</antcall>
+	</target>
+	
+	<target name="build_gtk_linux_s390x" depends="init_build">
+		<property name="clean" value="clean"/>
+		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit install"/>
+		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
+			<arg value="build.sh"/>
+			<env key="JAVA_HOME" value="/home/swtbuild/java5/ibm-java2-s390x-50"/>
+			<env key="MODEL" value="s390x"/>
+			<env key="MOZILLA_SDK" value="/home/swtbuild/mozilla1.7.13/mozilla/dist/sdk"/>
+			<env key="MOZILLA_INCLUDES" value="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"/>
+			<env key="MOZILLA_LIBS" value="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"/>
+			<env key="XULRUNNER_SDK" value="/home/swtbuild/xulrunner-1.8.0.1/mozilla/dist/sdk"/>
+			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
+			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
+			<env key="PKG_CONFIG_PATH" value="/usr/local/cairo64/lib/pkgconfig"/>
+			<arg line="${targets}"/>
+			<arg line="${clean}"/>
+		</exec>
+		<antcall target="refresh_fragment">
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.s390x"/>
+		</antcall>
+	</target>
 
+	<target name="build_gtk_aix_ppc64" depends="init_build">
+		<property name="clean" value="clean"/>
+		<property name="targets" value="install"/>
+		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
+			<arg value="build.sh"/>
+			<env key="MODEL" value="ppc64"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/AIX/PPC64/j564/sdk"/>
+			<arg line="${targets}"/>
+			<arg line="${clean}"/>
+		</exec>
+		<antcall target="refresh_fragment">
+			<param name="fragment" value="org.eclipse.swt.gtk.aix.ppc64"/>
+		</antcall>
+	</target>
+		
 	<target name="build_motif_linux" depends="init_build">
 		<property name="clean" value="clean"/>
 		<property name="targets" value="make_mozilla make_xulrunner make_xpcominit make_cairo install"/>
 		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
 			<arg value="build.sh"/>
-			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/IBMJava2-141"/>
+			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/JDKs/x86/ibm-java2-i386-50"/>
 			<env key="MOTIF_HOME" value="/bluebird/teamswt/swt-builddir/motif21"/>
 			<env key="MOZILLA_SDK" value="/bluebird/teamswt/swt-builddir/mozilla/1.4/linux_gtk2/mozilla/dist/sdk"/>
 			<env key="XULRUNNER_SDK" value="/bluebird/teamswt/swt-builddir/geckoSDK/1.8.0.4/gecko-sdk"/>
@@ -307,7 +339,6 @@
 			<env key="XULRUNNER_INCLUDES" value="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"/>
 			<env key="XULRUNNER_LIBS" value="-L${XULRUNNER_SDK}/lib -lxpcomglue"/>
 			<env key="PKG_CONFIG_PATH" value="/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_x86/lib/pkgconfig"/>
-			<!--Need to add? setenv GCC_VERSION -gcc3 -->
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
 		</exec>
@@ -318,13 +349,12 @@
 
 	<target name="build_motif_aix" depends="init_build">
 		<property name="clean" value="clean"/>
-		<property name="targets" value="make_cairo install"/>
+		<property name="targets" value="install"/>
 		<exec dir="${basedir}/${builddir}" executable="sh" failonerror="true">
 			<arg value="build.sh"/>
 			<env key="JAVA_HOME" value="/bluebird/teamswt/swt-builddir/aixj9_r5"/>
 			<env key="AWT_HOME" value="/bluebird/teamswt/swt-builddir/aixj9_r5/jre/bin"/>
 			<env key="MOTIF_HOME" value="/bluebird/teamswt/swt-builddir/motif21"/>
-			<env key="PKG_CONFIG_PATH" value="/usr/local/cairo1.6.0/lib/pkgconfig/"/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
 		</exec>
@@ -369,6 +399,8 @@
 			<arg line="build32.sh"/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
+			<env key="XULRUNNER_SDK" value="/Users/Shared/xulrunner/1.8.0.1/mozilla/dist/i386/dist/sdk"/>
+			<env key="XULRUNNER_LIBS" value="$(XULRUNNER_SDK)/lib/libxpcomglue.a $(XULRUNNER_SDK)/../../../ppc/dist/sdk/lib/libxpcomglue.a"/>
 		</exec>
 		<antcall target="refresh_fragment">
 			<param name="fragment" value="org.eclipse.swt.cocoa.macosx"/>
@@ -382,6 +414,8 @@
 			<arg line="build64.sh"/>
 			<arg line="${targets}"/>
 			<arg line="${clean}"/>
+			<env key="XULRUNNER_SDK" value="/Users/Shared/xulrunner/64-bit/mozilla/dist"/>
+			<env key="XULRUNNER_LIBS" value="$(XULRUNNER_SDK)/lib/libxpcomglue.a"/>
 		</exec>
 		<antcall target="refresh_fragment">
 			<param name="fragment" value="org.eclipse.swt.cocoa.macosx.x86_64"/>
@@ -404,10 +438,267 @@
 	<target name="build_photon" depends="init_build">
 		<echo>Photon is not being built</echo>
 	</target>
+	
+	<target name="check_libraries" depends="get_version">
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="5"/>
+			<param name="fragment" value="org.eclipse.swt.win32.win32.x86"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="4"/>
+			<param name="fragment" value="org.eclipse.swt.win32.win32.x86_64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="4"/>
+			<param name="fragment" value="org.eclipse.swt.win32.win32.ia64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="1"/>
+			<param name="fragment" value="org.eclipse.swt.win32.wce_ppc.arm"/>
+		</antcall>
+		<!-- WPF is not being built
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="2"/>
+			<param name="fragment" value="org.eclipse.swt.wpf.win32.x86"/>
+		</antcall>
+		-->
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="1"/>
+			<param name="fragment" value="org.eclipse.swt.photon.qnx.x86"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="5"/>
+			<param name="fragment" value="org.eclipse.swt.carbon.macosx"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="4"/>
+			<param name="fragment" value="org.eclipse.swt.cocoa.macosx"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="4"/>
+			<param name="fragment" value="org.eclipse.swt.cocoa.macosx.x86_64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="11"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="10"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="11"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="11"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="9"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.solaris.sparc"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="8"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.solaris.x86"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="10"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.s390"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="10"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.s390x"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="5"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.aix.ppc64"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="9"/>
+			<param name="fragment" value="org.eclipse.swt.motif.linux.x86"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="4"/>
+			<param name="fragment" value="org.eclipse.swt.motif.aix.ppc"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="3"/>
+			<param name="fragment" value="org.eclipse.swt.motif.hpux.ia64_32"/>
+		</antcall>
+		<antcall target="check_fragment_libraries">
+			<param name="library_count" value="5"/>
+			<param name="fragment" value="org.eclipse.swt.motif.solaris.sparc"/>
+		</antcall>
+	</target>
+	
+	<target name="check_fragment_libraries" depends="get_version">
+		<property name="checkdir" value="~/build/check_libraries"/>
+		<!-- WPF is not being built
+		<property name="library_count" value="131"/>
+		-->
+		<property name="library_count" value="134"/>
+		<property name="fragment" value="org.eclipse.swt.win32.win32.x86 org.eclipse.swt.win32.win32.x86_64 org.eclipse.swt.win32.win32.ia64 org.eclipse.swt.win32.wce_ppc.arm org.eclipse.swt.wpf.win32.x86 org.eclipse.swt.photon.qnx.x86 org.eclipse.swt.carbon.macosx org.eclipse.swt.cocoa.macosx org.eclipse.swt.cocoa.macosx.x86_64 org.eclipse.swt.gtk.linux.ppc org.eclipse.swt.gtk.linux.ppc64 org.eclipse.swt.gtk.linux.x86 org.eclipse.swt.gtk.linux.x86_64 org.eclipse.swt.gtk.linux.s390 org.eclipse.swt.gtk.linux.s390x org.eclipse.swt.gtk.aix.ppc64 org.eclipse.swt.gtk.solaris.sparc org.eclipse.swt.gtk.solaris.x86 org.eclipse.swt.motif.linux.x86 org.eclipse.swt.motif.aix.ppc org.eclipse.swt.motif.hpux.ia64_32 org.eclipse.swt.motif.solaris.sparc"/>
+		<sshexec host="${m_linux_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="rm -rf ${checkdir}; mkdir ${checkdir}; cd ${checkdir}; export CVS_RSH=ssh; cvs -q -d ${cvsRoot} checkout ${TAG} ${fragment} | grep '[0-9][0-9][0-9][0-9].'; a=`find -name *${swt_version}* | grep -c ${swt_version}`; b=`find . -regex .*[0-9][0-9][0-9][0-9].* | grep -v -c ${swt_version}`; echo Found \"$a\" libraries with version \"${swt_version}\" and \"$b\" libraries with old versions; if [[ "$a" = "${library_count}" && "$b" = '0' ]]; then cd; rm -rf ${checkdir}; echo Success; else cd; rm -rf ${checkdir}; echo Failed. Expecting ${library_count} and 0; exit 1; fi"/>
+	</target>	
+	
+	<target name="check_machines">
+		<parallel>
+		<sshexec host="${m_linux_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_linux_x86_64}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<!-- These machines are only used for 3.5.x builds. -->
+		<!--sshexec host="${m_linux_rh3_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_linux_rh3_x86_64}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/-->
+		<sshexec host="${m_linux_ppc}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_linux_ppc64}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_solaris_sparc}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_solaris_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_aix}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_hpux}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		<sshexec host="${m_mac}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname"/>
+		</parallel>
+	</target>
+
+	<target name="check_s390_machines">
+		<sshexec host="${m_linux_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}"
+			trust="true"
+			command="hostname; ping -c 1 ${m_linux_s390};"/>
+		<sshexec host="${m_linux_x86}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+			command="hostname; ping -c 1 ${m_linux_s390x};"/>
+	</target>
+	
+	<target name="check_compilation">
+		<property name="cvsRsh" value="plink"/>
+		<property name="tmpdir" value="${tmphome}/workspace-check-compile${TAG}"/>
+		<property name="project" value="org.eclipse.swt"/>
+		<property name="projectDir" value="${tmpdir}/org.eclipse.swt"/>
+		<property name="buildDir" value="${tmpdir}/build"/>
+		
+		<!-- check out swt project -->
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" quiet="true" failonerror="true" dest="${tmpdir}">
+			<commandline>
+				<argument value="checkout"/>
+				<argument line="${TAG}"/>
+				<argument value="${project}"/>
+			</commandline>
+		</cvs>
+
+		<!-- 64 bit -->
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_win32"/>
+			<param name="is64" value="64 bit"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_gtk"/>
+			<param name="is64" value="64 bit"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_cocoa"/>
+			<param name="is64" value="64 bit"/>
+		</antcall>
+		
+		<!-- 32 bit -->
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_win32"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_gtk"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_cocoa"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_carbon"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_motif"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_photon"/>
+		</antcall>
+		<antcall target="build_classes">
+			<param name="cp" value=".classpath_wpf"/>
+		</antcall>
+	</target>
+	
+	<target name="replace64" if="is64">
+		<antcall target="replace.32.to.64">
+			<param name="replace_dir" value="${buildDir}"/>
+		</antcall>
+	</target>
+	
+	<target name="build_classes">
+		<echo>Building ${cp} ${is64}</echo>
+		<delete file="${tmpdir}/copy.xml"/>
+		<delete dir="${buildDir}"/>
+				
+		<xslt style="${projectDir}/tasks/classpath.xls" in="${projectDir}/${cp}" out="${tmpdir}/copy.xml">
+			<param name="srcDir" expression="${projectDir}"/>
+			<param name="outputDir" expression="${buildDir}"/>
+		</xslt>
+		<ant antfile="${tmpdir}/copy.xml" target="copy_files"/>
+		
+		<antcall target="replace64"></antcall>
+				
+		<javac srcdir="${buildDir}"></javac>
+	</target>
 
 	<!-- common build tasks -->
 	<target name="increment_version">
-		<property name="tmpdir" value="${tmphome}/inc"/>
+		<property name="tmpdir" value="${tmphome}/inc${TAG}"/>
 		<delete dir="${tmpdir}" quiet="true"/>
 		<mkdir dir="${tmpdir}"/>
 		<antcall target="increment_version_imp"/>
@@ -422,7 +713,7 @@
 		<property name="version_file" value="org.eclipse.swt/Eclipse SWT/common/version.txt"/>
 		
 		<!-- Download the files -->
-		<cvs cvsRoot="${cvsRootAnon}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -452,13 +743,41 @@
 				<argument value="${version_file}"/>
 			</commandline>
 		</cvs>
+	
+		<!-- See bug 201700 -->
+		<!--antcall target="update_manifest"/-->
 	</target>
 
+    <target name="update_manifest" depends="get_version">
+    	<property name="manifests" value="org.eclipse.swt.carbon.macosx/META-INF/MANIFEST.MF org.eclipse.swt.cocoa.macosx/META-INF/MANIFEST.MF org.eclipse.swt.cocoa.macosx.x86_64/META-INF/MANIFEST.MF org.eclipse.swt.gtk.linux.ppc/META-INF/MANIFEST.MF org.eclipse.swt.gtk.linux.x86/META-INF/MANIFEST.MF org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF org.eclipse.swt.gtk.solaris.sparc/META-INF/MANIFEST.MF org.eclipse.swt.gtk.solaris.x86/META-INF/MANIFEST.MF org.eclipse.swt.motif.aix.ppc/META-INF/MANIFEST.MF org.eclipse.swt.motif.hpux.ia64_32/META-INF/MANIFEST.MF org.eclipse.swt.motif.linux.x86/META-INF/MANIFEST.MF org.eclipse.swt.motif.solaris.sparc/META-INF/MANIFEST.MF org.eclipse.swt.photon.qnx.x86/META-INF/MANIFEST.MF org.eclipse.swt.win32.wce_ppc.arm/META-INF/MANIFEST.MF org.eclipse.swt.win32.win32.ia64/META-INF/MANIFEST.MF org.eclipse.swt.win32.win32.x86/META-INF/MANIFEST.MF org.eclipse.swt.win32.win32.x86_64/META-INF/MANIFEST.MF org.eclipse.swt.wpf.win32.x86/META-INF/MANIFEST.MF"/>
+    	<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+			<commandline>
+				<argument value="checkout"/>
+				<argument line="${TAG}"/>
+				<argument line="${manifests}"/>
+			</commandline>
+		</cvs>
+    	
+    	<replace dir="${tmpdir}" token="${swt_version}" value="${new_version}">
+    		<include name="**/MANIFEST.MF"/> 	
+    	</replace>
+    	
+		<!--cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+			<commandline>
+				<argument value="commit"/>
+				<argument value="-m"/>
+				<argument value="'new version v${swt_new_tag}'"/>
+				<argument line="${manifests}"/>
+			</commandline>
+		</cvs-->
+    </target>
+
 	<!-- Set swt_tag to the current tag in the swt map file -->
 	<target name="get_tag" unless="swt_tag">
 		<property name="tmpdir" value="."/>
+		<property name="cvsRsh" value="plink"/>
 		<property name="map" value="org.eclipse.releng/maps/swt.map"/>
-		<cvs cvsRoot="${cvsRootAnon}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -481,7 +800,7 @@
 		<property name="tmpdir" value="."/>
 		<property name="rlog_file" value="org.eclipse.swt/.project"/>
 		<property name="tags_file" value="${tmpdir}/tags.txt"/>
-		<cvs cvsRoot="${cvsRootAnon}" cvsrsh="${cvsRsh}" failonerror="true" output="${tags_file}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" output="${tags_file}">
 			<commandline>
 				<argument value="rlog"/>
 				<argument value="${rlog_file}"/>
@@ -518,8 +837,9 @@
 	<!-- Set swt_version, new_version, old_version (and min_ver, maj_ver, new_min_ver, old_min_ver) from the make_common.mak  -->
 	<target name="get_version" unless="swt_version">
 		<property name="tmpdir" value="."/>
+		<property name="cvsRsh" value="plink"/>
 		<property name="make_common" value="org.eclipse.swt/Eclipse SWT/common/library/make_common.mak"/>
-		<cvs cvsRoot="${cvsRootAnon}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -547,7 +867,7 @@
 	<!-- Set natives_changed if there are changes in the C code -->
 	<target name="check_natives_changed" unless="natives_changed" depends="get_tag">
 		<property name="tmpdir" value="."/>
-		<cvs cvsRoot="${cvsRootAnon}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -562,7 +882,7 @@
 		</cvs>
 	
 		<!-- Verify for changes in the native code -->
-		<cvs cvsRoot="${cvsRootAnon}" dest="${tmpdir}" output="${tmpdir}/diff.txt">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" dest="${tmpdir}" output="${tmpdir}/diff.txt">
 			<commandline>
 				<argument value="diff"/>
 				<argument value="-u"/>
@@ -596,7 +916,7 @@
 			<format property="url.to.time" pattern="yyyy-MM-dd'+'HH'%3A'mm'%3A'ss'+%2B0000'" timezone="gmt"/>
 		</tstamp>
 		<property name="build_notes" value="org.eclipse.swt/buildnotes_swt.html"/>
-		<cvs cvsRoot="${cvsRootAnon}" failonerror="true" output="${tmpdir}/rlog.txt">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" output="${tmpdir}/rlog.txt">
 			<commandline>
 				<argument value="rlog"/>
 				<argument value="-r${swt_tag}"/>
@@ -616,7 +936,7 @@
 			</filterchain>
 		</loadfile>
 		<echo> Searching bugs from "${url.from.time}" to "${url.to.time}"</echo>
-		<cvs cvsRoot="${cvsRootAnon}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -644,7 +964,9 @@
 			<fileset dir="${fragment}" includes="*${old_version}*"/>
 			<regexpmapper from="(.*)${old_version}(.*)" to="\1${swt_version}\2"/>
 		</copy>
-
+		<chmod perm="755">
+			<fileset dir="${fragment}" includes="*${swt_version}*"/>
+		</chmod>
 		<fileset id="removeid" dir="${fragment}" includes="*${old_version}*"/>
 		<property name="rfiles" refid="removeid"/>
 		<echo file="tmp">removed_files=${rfiles}</echo>
@@ -672,7 +994,7 @@
 
 	<!-- depends on 'get_new_tag' to define swt_new_tag, swt_version, maj_ver and min_ver -->
 	<target name="tag_projects">
-		<property name="tmpdir" value="${tmphome}/tag"/>
+		<property name="tmpdir" value="${tmphome}/tag${TAG}"/>
 		<delete dir="${tmpdir}" quiet="true"/>
 		<mkdir dir="${tmpdir}"/>
 		<antcall target="tag_projects_imp"/>
@@ -682,14 +1004,18 @@
 	<target name="tag_projects_imp" depends="get_new_tag">
 		<property name="cvsRsh" value="plink"/>
 
+		<!-- These two lines perform the same check. check_libraries is slower because it checks each fragment separetely  -->
+		<!--antcall target="check_libraries"/-->
+		<antcall target="check_fragment_libraries"/>
+
 		<!-- update and commit the buildnotes_swt.html file -->
 		<antcall target="update_buildnotes"/>
 
-		<!-- tags fragments and plugins listed in swt.map -->
+		<!-- download the map file -->
 		<property name="map" value="org.eclipse.releng/maps/swt.map"/>
 		<property name="map_copy" value="${tmpdir}/swt_map.txt"/>
 		<property name="map_xml" value="${tmpdir}/swt_map.xml"/>
-		<cvs cvsRoot="${cvsRootAnon}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -698,6 +1024,7 @@
 		</cvs>
 		<copy file="${tmpdir}/${map}" tofile="${map_copy}"/>
 
+		<!-- tag all files -->
 		<replace file="${map_copy}" token="=" value="" old=""/>
 		<replace file="${map_copy}" token="fragment@" value="<element project=""/>
 		<replace file="${map_copy}" token="plugin@" value="<element project=""/>
@@ -707,17 +1034,16 @@
 		<echo file="${map_xml}"><project></echo>
 		<echo file="${map_xml}" append="true">${body}</echo>
 		<echo file="${map_xml}" append="true"></project></echo>
-		<xslt style="${tasks}/swtmap.xls" in="${tmpdir}/swt_map.xml" out="${tmpdir}/tagCommand.xml">
+		<xslt style="${tasks}/swtmap.xls" in="${map_xml}" out="${tmpdir}/tagCommand.xml">
 			<param name="TAG" expression="${TAG}"/>
 			<param name="cvsRoot" expression="${cvsRoot}"/>
 			<param name="cvsRsh" expression="${cvsRsh}"/>
 			<param name="swt_new_tag" expression="v${swt_new_tag}"/>
-			<param name="map" expression="${tmpdir}/${map}"/>
 		</xslt>
 		<ant antfile="${tmpdir}/tagCommand.xml" target="tag_files"/>
 
-		<ant antfile="${tmpdir}/tagCommand.xml" target="update_map"/>
-
+		<!-- update and commit map file -->
+		<replaceregexp file="${tmpdir}/${map}" match="=v\d\d\d\d[a-z]?" replace="=v${swt_new_tag}" byline="true"/>
 		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="commit"/>
@@ -733,15 +1059,19 @@
 		<copy todir="${builddir}" flatten="true">
 			<fileset dir="org.eclipse.swt" includes="**/library/"/>
 		</copy>
-		<antcall target="${build_target}"/>
+		<condition property="real_target" value="build_s390" else="${build_target}">
+			<or>
+				<equals arg1="${build_target}" arg2="build_gtk_linux_s390"/>
+				<equals arg1="${build_target}" arg2="build_gtk_linux_s390x"/>
+			</or>
+		</condition>
+		<antcall target="${real_target}"/>
 	</target>
 
 	<!-- Params: cp, fragment, build_target -->
 	<target name="build_fragment" depends="get_tag">
-		<property name="cvsRsh" value="ssh"/>
-		
 		<!-- check out classpath, fragments, and natives -->
-		<cvs cvsRoot="${cvsRootAnon}" failonerror="true">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -757,7 +1087,7 @@
 		<condition property="diff_tag" value="-r${swt_tag}" else="-D'${last_build.time}'">
 			<length string="${TAG}" trim="true" when="greater" length="0"/>
 		</condition>
-		<cvs cvsRoot="${cvsRootAnon}" output="diff.txt">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" output="diff.txt">
 			<commandline>
 				<argument value="diff"/>
 				<argument line="${diff_tag}"/>
@@ -779,11 +1109,12 @@
 
 	<!-- Params: cp, fragment, build_target -->
 	<target name="build_local">
-		<property name="tmpdir" value="${tmphome}/${fragment}"/>
+		<property name="cvsRsh" value="plink"/>
+		<property name="tmpdir" value="${tmphome}/${fragment}${TAG}"/>
 		<property name="build_version" value=""/>
 		<delete dir="${tmpdir}" quiet="true"/>
 		<mkdir dir="${tmpdir}"/>
-		<cvs cvsRoot="${cvsRootAnon}" failonerror="true" dest="${tmpdir}">
+		<cvs cvsRoot="${cvsRoot}" cvsrsh="${cvsRsh}" failonerror="true" dest="${tmpdir}">
 			<commandline>
 				<argument value="checkout"/>
 				<argument line="${TAG}"/>
@@ -791,7 +1122,6 @@
 			</commandline>
 		</cvs>
 		<ant antfile="${tasks}/build.xml" output="${logdir}/${build_version}/${fragment}.log" dir="${tmpdir}" target="build_fragment">
-			<property name="cvsRsh" value="plink"/>
 			<property name="cp" value="${cp}"/>
 			<property name="fragment" value="${fragment}"/>
 			<property name="build_target" value="${build_target}"/>
@@ -802,40 +1132,68 @@
 	<target name="set_natives_changed" if="natives_changed">
 		<property name="extra_properties" value="-Dnatives_changed=${natives_changed}"/>
 	</target>
+	
+	<target name="build_s390">
+		<property name="zipname" value="${fragment}${TAG}"/>		
+		<property name="remotetmpdir" value="~/build/${zipname}"/>
+		<condition property="remotemachine" value="${m_linux_s390}" else="${m_linux_s390x}">
+			<or>
+				<equals arg1="${build_target}" arg2="build_gtk_linux_s390"/>
+			</or>
+		</condition>
+		<zip destfile="../${zipname}.zip" basedir=".." includes="${zipname}/**/*"/>
+		<exec executable="scp">
+		    <arg value="../${zipname}.zip"/>
+		    <arg value="swtbuild@${remotemachine}:~/build"/>
+		</exec>
+		<sshexec host="${remotemachine}" 
+			username="swtbuild" 
+			keyfile="${keyfile}" 
+			trust="true"
+ 			command="echo $PATH; cd ~/build; rm -rf ${remotetmpdir}; unzip -qq ~/build/${zipname}.zip; rm ~/build/${zipname}.zip; cd ${remotetmpdir}/${tasks}; if ant -f build.xml ${build_target}; then cd ~/build; zip -q -r ${zipname}.zip ${zipname}; rm -rf ${remotetmpdir}; else cd; rm -rf ${remotetmpdir}; exit 1; fi"/>
+		<exec executable="scp">
+		    <arg value="swtbuild@${remotemachine}:~/build/${zipname}.zip"/>
+		    <arg value=".."/>
+		</exec>
+		<unzip src="../${zipname}.zip" dest=".."/>
+	</target>
 
 	<!-- Params: machine, pre_commands, cp, fragment, build_target -->
 	<target name="build_ssh" depends="set_natives_changed">
-		<property name="tmpdir" value="~/build/${machine}_${fragment}"/>
+		<property name="tmpdir" value="~/build/${fragment}${TAG}"/>
 		<property name="pre_commands" value=""/>
+		<property name="pre_commands1" value=""/>
 		<property name="build_version" value=""/>
 		<property name="extra_properties" value=""/>
-		<property name="properties" value="-Dcp="${cp}" -Dfragment=${fragment} -Dbuild_target=${build_target} -DTAG=${TAG} ${extra_properties}"/>
+		<property name="properties" value="-Dcp="${cp}" -Dfragment=${fragment} -DcvsRsh=ssh -Dbuild_target=${build_target} -DTAG=${TAG} ${extra_properties}"/>
 		<sshexec host="${machine}" 
 			username="swtbuild" 
 			keyfile="${keyfile}" 
 			trust="true"
 			output="${logdir}/${build_version}/${fragment}.log"
-	 		command="${pre_commands} rm -rf ${tmpdir}; mkdir ${tmpdir}; cd ${tmpdir}; cvs -d ${cvsRootAnon} checkout ${TAG} ${tasks}; if ant -f ${tasks}/build.xml build_fragment ${properties}; then cd; rm -rf ${tmpdir}; else cd; rm -rf ${tmpdir}; exit 1; fi"/>
+	 		command="${pre_commands} rm -rf ${tmpdir}; mkdir ${tmpdir}; cd ${tmpdir}; export CVS_RSH=ssh; cvs -d ${cvsRoot} checkout ${TAG} ${tasks}; ${pre_commands1} if ant -f ${tasks}/build.xml build_fragment ${properties}; then cd; rm -rf ${tmpdir}; else cd; rm -rf ${tmpdir}; exit 1; fi"/>
 	</target>
 
 	<!-- Convert SWT 32 bit java and C source to 64 bit  -->
 	<target name="replace.32.to.64" depends="init_build">
-		<echo>Converting java files to 64 bit in org.eclipse.swt project</echo>
-		<replace dir="." includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
-		<replace dir="." includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/"/>
-		<replace dir="." includes="**/*.java" token="float /*double*/" value="double /*float*/"/>
-		<replace dir="." includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/"/>
-		<antcall target="init"/>
+		<property name="replace_dir" value="org.eclipse.swt"/>
+		<echo>Converting java files to 64 bit in ${replace_dir} project</echo>
+		<replace dir="${replace_dir}" includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="float /*double*/" value="double /*float*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/"/>
+		<antcall target="init_build"/>
 	</target>
 
 	<!-- Convert SWT 64 bit java and C source to 32 bit  -->
 	<target name="replace.64.to.32" depends="init_build">
-		<echo>Converting java files to 32 bit in org.eclipse.swt project</echo>
-		<replace dir="." includes="**/*.java" token="long /*int*/" value="int /*long*/"/>
-		<replace dir="." includes="**/*.java" token="long[] /*int[]*/" value="int[] /*long[]*/"/>
-		<replace dir="." includes="**/*.java" token="double /*float*/" value="float /*double*/"/>
-		<replace dir="." includes="**/*.java" token="double[] /*float[]*/" value="float[] /*double[]*/"/>
-		<antcall target="init"/>
+		<property name="replace_dir" value="org.eclipse.swt"/>
+		<echo>Converting java files to 32 bit in ${replace_dir} project</echo>
+		<replace dir="${replace_dir}" includes="**/*.java" token="long /*int*/" value="int /*long*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="long[] /*int[]*/" value="int[] /*long[]*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="double /*float*/" value="float /*double*/"/>
+		<replace dir="${replace_dir}" includes="**/*.java" token="double[] /*float[]*/" value="float[] /*double[]*/"/>
+		<antcall target="init_build"/>
 	</target>
 
 	<!-- all platforms -->
@@ -878,41 +1236,27 @@
 			<param name="build_target" value="build_wpf_x86"/>
 		</antcall>
 	</target>
-
+	
 	<target name="gtk_linux_x86">
 		<antcall target="build_ssh">
-			<param name="machine" value="${m_linux_rh3_x86}"/>
-			<param name="cp" value="${cp_gtk}"/>
-			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86"/>
-			<param name="build_target" value="build_gtk_linux_rh3_x86"/>
-			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x32/jdk1.6.0_14; export ANT_HOME=${ant_home}; export PATH=${ant_home}/bin:$PATH;"/>
-		</antcall>
-		<antcall target="build_ssh">
 			<param name="machine" value="${m_linux_x86}"/>
 			<param name="cp" value="${cp_gtk}"/>
 			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86"/>
-			<param name="build_target" value="build_gtk_linux_rh4_x86"/>
+			<param name="build_target" value="build_gtk_linux_x86"/>
 			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x32/jdk1.6.0_14; export PATH=${ant_home}/bin:$PATH; "/>
 		</antcall>
 	</target>
-	
+		
 	<target name="gtk_linux_x86_64">
 		<antcall target="build_ssh">
-			<param name="machine" value="${m_linux_rh3_x86_64}"/>
-			<param name="cp" value="${cp_gtk}"/>
-			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
-			<param name="build_target" value="build_gtk_linux_rh3_x86_64"/>
-			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x64/jdk1.6.0_14; export ANT_HOME=${ant_home}; export PATH=${ant_home}/bin:$PATH; "/>
-		</antcall>
-		<antcall target="build_ssh">
 			<param name="machine" value="${m_linux_x86_64}"/>
 			<param name="cp" value="${cp_gtk}"/>
 			<param name="fragment" value="org.eclipse.swt.gtk.linux.x86_64"/>
-			<param name="build_target" value="build_gtk_linux_rh4_x86_64"/>
+			<param name="build_target" value="build_gtk_linux_x86_64"/>
 			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x64/jdk1.6.0_14; export PATH=${ant_home}/bin:$PATH; "/>
 		</antcall>
 	</target>
-	
+
 	<target name="gtk_linux_ppc">
 		<antcall target="build_ssh">
 			<param name="machine" value="${m_linux_ppc}"/>
@@ -922,6 +1266,50 @@
 			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/PPC/ibm-java-ppc-60/; export PATH=${ant_home}/bin:$PATH; "/>
 		</antcall>
 	</target>
+	
+	<target name="gtk_linux_ppc64">
+		<antcall target="build_ssh">
+			<param name="machine" value="${m_linux_ppc64}"/>
+			<param name="cp" value="${cp_gtk}"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.linux.ppc64"/>
+			<param name="build_target" value="build_gtk_linux_ppc64"/>
+			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/PPC/ibm-java-ppc-60/; export PATH=${ant_home}/bin:$PATH; "/>
+		</antcall>
+	</target>
+	
+	<target name="gtk_linux_s390">
+		<property name="thefragment" value="org.eclipse.swt.gtk.linux.s390"/>
+		<antcall target="build_ssh">
+			<param name="machine" value="${m_linux_x86}"/>
+			<param name="cp" value="${cp_gtk}"/>
+			<param name="fragment" value="${thefragment}"/>
+			<param name="build_target" value="build_gtk_linux_s390"/>
+			<param name="pre_commands1" value="cp ~/build/fixed_tasks/* ~/build/${thefragment}${TAG}/${tasks}; "/>
+			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x32/jdk1.6.0_14; export PATH=${ant_home}/bin:$PATH; "/>
+		</antcall>
+	</target>
+
+	<target name="gtk_linux_s390x">
+		<property name="thefragment" value="org.eclipse.swt.gtk.linux.s390x"/>
+		<antcall target="build_ssh">
+			<param name="machine" value="${m_linux_x86}"/>
+			<param name="cp" value="${cp_gtk}"/>
+			<param name="fragment" value="${thefragment}"/>
+			<param name="build_target" value="build_gtk_linux_s390x"/>
+			<param name="pre_commands1" value="cp ~/build/fixed_tasks/* ~/build/${thefragment}${TAG}/${tasks}; "/>
+			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/x32/jdk1.6.0_14; export PATH=${ant_home}/bin:$PATH; "/>
+		</antcall>
+	</target>
+
+	<target name="gtk_aix_ppc64">
+		<antcall target="build_ssh">
+			<param name="machine" value="${m_aix}"/>
+			<param name="cp" value="${cp_gtk}"/>
+			<param name="fragment" value="org.eclipse.swt.gtk.aix.ppc64"/>
+			<param name="build_target" value="build_gtk_aix_ppc64"/>
+			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/AIX/sdk; export PATH=${ant_home}/bin:~/build/cvs_bin/AIX:$PATH;"/>
+		</antcall>
+	</target>
 
 	<target name="gtk_solaris_x86">
 		<antcall target="build_ssh">
@@ -939,7 +1327,7 @@
 			<param name="cp" value="${cp_gtk}"/>
 			<param name="fragment" value="org.eclipse.swt.gtk.solaris.sparc"/>
 			<param name="build_target" value="build_gtk_solaris_sparc"/>
-			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/SPARC/jdk1.6.0_14/; export PATH=/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/local/bin:${ant_home}/bin:$PATH; "/>
+			<param name="pre_commands" value="export JAVA_HOME=/usr/j2se; export PATH=/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/local/bin:${ant_home}/bin:$PATH; "/>
 		</antcall>
 	</target>
 
@@ -966,11 +1354,10 @@
 	<target name="motif_solaris">
 		<antcall target="build_ssh">
 			<param name="machine" value="${m_solaris_sparc}"/>
-			<param name="java_home" value="~/build/JRE/SPARC/jdk1.6.0_14"/>
 			<param name="cp" value="${cp_motif}"/>
 			<param name="fragment" value="org.eclipse.swt.motif.solaris.sparc"/>
 			<param name="build_target" value="build_motif_solaris"/>
-			<param name="pre_commands" value="export JAVA_HOME=~/build/JRE/SPARC/jdk1.6.0_14; export PATH=/export/home/SUNWspro/bin:/usr/ccs/bin:${ant_home}/bin:$PATH; "/>
+			<param name="pre_commands" value="export JAVA_HOME=/usr/j2se; export PATH=/export/home/SUNWspro/bin:/usr/ccs/bin:${ant_home}/bin:$PATH; "/>
 		</antcall>
 	</target>
 
diff --git a/eclipse/plugins/org.eclipse.swt/tasks/classpath.xls b/eclipse/plugins/org.eclipse.swt/tasks/classpath.xls
new file mode 100644
index 0000000..de5b223
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.swt/tasks/classpath.xls
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:param name="srcDir"/>
+<xsl:param name="outputDir"/>
+<xsl:template match="/">
+<project name="test" default="copy_files" basedir=".">
+<target name="copy_files">
+	<copy>
+	<xsl:attribute name="todir">
+	    <xsl:value-of select="$outputDir" />
+	</xsl:attribute>
+	<xsl:for-each select="classpath/classpathentry">
+	<xsl:if test="@kind = 'src'">
+		<fileset>
+		<xsl:attribute name="dir"><xsl:value-of select="$srcDir"/>/<xsl:value-of select="@path"/></xsl:attribute>
+		      <include name="**/*.java"/>
+		</fileset>
+	</xsl:if>
+	</xsl:for-each>
+	</copy>
+</target>
+</project>
+</xsl:template>
+</xsl:stylesheet>
diff --git a/eclipse/plugins/org.eclipse.swt/tasks/properties.xml b/eclipse/plugins/org.eclipse.swt/tasks/properties.xml
index 7dd9143..d0c74de 100644
--- a/eclipse/plugins/org.eclipse.swt/tasks/properties.xml
+++ b/eclipse/plugins/org.eclipse.swt/tasks/properties.xml
@@ -1,8 +1,23 @@
+<!--
+    Copyright (c) 2009, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
+        IBM Corporation - initial API and implementation
+ -->
 <project name="org.eclipse.swt.build.properties" basedir=".">
 	<!-- Machine names -->
 	<property name="m_linux_x86" value="na"/>
+	<property name="m_linux_rh3_x86" value="na"/>
 	<property name="m_linux_x86_64"  value="na"/>
+	<property name="m_linux_rh3_x86_64"  value="na"/>
 	<property name="m_linux_ppc"  value="na"/>
+	<property name="m_linux_ppc64"  value="na"/>
+	<property name="m_linux_s390"  value="na"/>
+	<property name="m_linux_s390x"  value="na"/>
 	<property name="m_solaris_sparc"  value="na"/>
 	<property name="m_solaris_x86"  value="na"/>
 	<property name="m_aix"  value="na"/>
diff --git a/eclipse/plugins/org.eclipse.swt/tasks/swtmap.xls b/eclipse/plugins/org.eclipse.swt/tasks/swtmap.xls
index 306c42e..a765ccb 100644
--- a/eclipse/plugins/org.eclipse.swt/tasks/swtmap.xls
+++ b/eclipse/plugins/org.eclipse.swt/tasks/swtmap.xls
@@ -5,7 +5,6 @@
 <xsl:param name="cvsRsh"/>
 <xsl:param name="TAG"/>
 <xsl:param name="swt_new_tag"/>
-<xsl:param name="map"/>
 <xsl:template match="/">
 <project name="test" default="tag_files" basedir=".">
 <target name="tag_files">
@@ -29,42 +28,13 @@
 				</xsl:attribute> 
 			</argument>
 	<xsl:for-each select="project/element">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.s390'">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.s390x'">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.ia64'">
-	<xsl:if test="@project != 'org.eclipse.swt.motif.hpux.PA_RISC'">
-			<argument>
-				<xsl:attribute name="value"><xsl:value-of select="@project"/></xsl:attribute>
-			</argument>
-	</xsl:if>
-	</xsl:if>
-	</xsl:if>
-	</xsl:if>
+		<argument>
+			<xsl:attribute name="value"><xsl:value-of select="@project"/></xsl:attribute>
+		</argument>
 	</xsl:for-each>
 	</commandline>
 	</cvs>
 </target>
-
-<target name="update_map">
-	<xsl:for-each select="project/element">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.s390'">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.s390x'">
-	<xsl:if test="@project != 'org.eclipse.swt.gtk.linux.ia64'">
-	<xsl:if test="@project != 'org.eclipse.swt.motif.hpux.PA_RISC'">
-		<replaceregexp byline="true"> 
-			<xsl:attribute name="file">
-				<xsl:value-of select="$map"/>
-			</xsl:attribute> 
-			<xsl:attribute name="match"><xsl:value-of select="@project"/>=v\d\d\d\d[a-z]?</xsl:attribute>
-			<xsl:attribute name="replace"><xsl:value-of select="@project"/>=<xsl:value-of select="$swt_new_tag"/></xsl:attribute>
-		</replaceregexp>
-	</xsl:if>
-	</xsl:if>
-	</xsl:if>
-	</xsl:if>
-	</xsl:for-each>
-</target>
-
 </project>
 </xsl:template>
 </xsl:stylesheet>
diff --git a/eclipse/plugins/org.eclipse.team.core/.settings/.api_filters b/eclipse/plugins/org.eclipse.team.core/.settings/.api_filters
index 8d4a32c..449216e 100644
--- a/eclipse/plugins/org.eclipse.team.core/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.team.core/.settings/.api_filters
@@ -1,10 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.team.core" version="2">
-    <resource path="src/org/eclipse/team/core/variants/ThreeWaySynchronizer.java" type="org.eclipse.team.core.variants.ThreeWaySynchronizer">
+    <resource path="src/org/eclipse/team/core/synchronize/SyncInfoSet.java" type="org.eclipse.team.core.synchronize.SyncInfoSet">
+        <filter id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoSet"/>
+                <message_argument value="getChangeEvent()"/>
+            </message_arguments>
+        </filter>
+        <filter id="338792546">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoSet"/>
+                <message_argument value="createEmptyChangeEvent()"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/team/core/synchronize/SyncInfoTree.java" type="org.eclipse.team.core.synchronize.SyncInfoTree">
         <filter id="338792546">
             <message_arguments>
-                <message_argument value="org.eclipse.team.core.variants.ThreeWaySynchronizer"/>
-                <message_argument value="flush(BatchingLock.ThreadInfo, IProgressMonitor)"/>
+                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoTree"/>
+                <message_argument value="createEmptyChangeEvent()"/>
             </message_arguments>
         </filter>
     </resource>
@@ -28,26 +42,4 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/team/core/synchronize/SyncInfoTree.java" type="org.eclipse.team.core.synchronize.SyncInfoTree">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoTree"/>
-                <message_argument value="createEmptyChangeEvent()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/team/core/synchronize/SyncInfoSet.java" type="org.eclipse.team.core.synchronize.SyncInfoSet">
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoSet"/>
-                <message_argument value="getChangeEvent()"/>
-            </message_arguments>
-        </filter>
-        <filter id="338792546">
-            <message_arguments>
-                <message_argument value="org.eclipse.team.core.synchronize.SyncInfoSet"/>
-                <message_argument value="createEmptyChangeEvent()"/>
-            </message_arguments>
-        </filter>
-    </resource>
 </component>
diff --git a/eclipse/plugins/org.eclipse.team.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.core/META-INF/MANIFEST.MF
index bba2b8a..b4ff2c5 100644
--- a/eclipse/plugins/org.eclipse.team.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.team.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.core; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.5.101.qualifier
 Bundle-Activator: org.eclipse.team.internal.core.TeamPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.team.core/buildnotes_team.html b/eclipse/plugins/org.eclipse.team.core/buildnotes_team.html
index c4edd49..15879cb 100644
--- a/eclipse/plugins/org.eclipse.team.core/buildnotes_team.html
+++ b/eclipse/plugins/org.eclipse.team.core/buildnotes_team.html
@@ -12,47 +12,401 @@
 <h1>Eclipse Platform Build Notes (3.5)<br>
 Team, Compare and CVS</h1>
 
-<p>Integration Build (January 13, 2010, 12:58 p.m.)</p>
+<p>Integration Build (lutego 03, 2011, 4:36 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297950">Bug 297950</a>. CompareEditorInputs are leaked when reusing editors (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336234">Bug 336234</a>. Plug-in versions needs to be updated for 3.6.2 (ASSIGNED)<br>
   </p>
 
-<p>Integration Build (September 30, 2009, 10:12 a.m.)</p>
+<p>Integration Build (stycznia 19, 2011, 2:17 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263702">Bug 263702</a>. Branch creation problem in CVS (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281348">Bug 281348</a>. [Net] Eclipse Galileo crashes under Japanese version of Windows XP (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281628">Bug 281628</a>. [Net] Should be impossible to edit native proxy setting by double-clicking the entry (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282032">Bug 282032</a>. Radio button group not read correctly by JAWS (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290544">Bug 290544</a>. 'Next Change' does not selected last small diff (button disabled) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332640">Bug 332640</a>. [backport] Team > Merge operation for project contains logical model always show no changes between two branches (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (stycznia 05, 2011, 12:12 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332639">Bug 332639</a>. [backport] There are no changes for models  showing in the Synchronize view with Team > Merge operation. (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 25, 2010, 12:44 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311704">Bug 311704</a>. please tag these resources/team bundles so they include source references for the 3.6 release (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316875">Bug 316875</a>. [backport] Commit, Apply Patch and Synchronize no longer take keybindings (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=318557">Bug 318557</a>. [backport] Exception when trying to commit a lot of projects (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 27, 2010, 1:46 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312596">Bug 312596</a>. Sync view does not update error decorator of resources anymore (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 26, 2010, 1:50 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309430">Bug 309430</a>. DBCS3.6: CVS can not display DBCS correctly in "Apply Patch" dialog under UTF-8. (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 18, 2010, 11:55 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311850">Bug 311850</a>. org.eclipse.compare.structureCreators extension point definition specifies wrong interface (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 13, 2010, 12:26 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305994">Bug 305994</a>. [Sync View][Apply Patch] Allow to apply patch via Paste in Synchronize view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312641">Bug 312641</a>. Change label and icon informing about capped comparison results (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 11, 2010, 1:57 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=256396">Bug 256396</a>. Duplicated code in Team's compare actions (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311597">Bug 311597</a>. [History View] CVS should keep branch numbers (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311704">Bug 311704</a>. please tag these resources/team bundles so they include source references for the 3.6 release (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312217">Bug 312217</a>. Restore CompareRevisionAction#findReusableCompareEditor(CompareEditorInput , IWorkbenchPage) (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 28, 2010, 4:52 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294747">Bug 294747</a>. StringIndexOutOfBoundsException during synchronize operation (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306641">Bug 306641</a>. BIDI3.6_BDL: Compare - Dates are displayed corrupted in National Hebrew calendar format (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 22, 2010, 10:37 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267171">Bug 267171</a>. Compare editor on local file: 'Open' action should set selection (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305993">Bug 305993</a>. [Sync View][Apply Patch] Add preference that allows Team > Apply Patch to show result in Synchronize view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306314">Bug 306314</a>. Three-way merge wrongly detects conflict to adjoining (not overlapping) changes (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307757">Bug 307757</a>. [compare][navigation] Quick Outline and hyperlinks should remove element filter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309754">Bug 309754</a>. Compile errors in N20100419-2000 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309793">Bug 309793</a>. Team UI should not require navigator.resources (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309921">Bug 309921</a>. [Sync View][Apply Patch] Move "Apply patch in Synchronize view" to Team preferences (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 20, 2010, 11:19 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284540">Bug 284540</a>. [Net] Changing nonProxiedHosts does not update the system properties (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304748">Bug 304748</a>. set IProgressConstants.SHOW_IN_TASKBAR_ICON_PROPERTY on jobs created by SubscriberParticipant for user initiated synchronizations (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305202">Bug 305202</a>. [Sync View][Apply Patch] Introduce "Ignore Leading Path Segments" option in sync view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309313">Bug 309313</a>. [proxy] setting non proxy host does not reset the system properties (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309544">Bug 309544</a>. Remove dependency on org.eclipse.update.core (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309754">Bug 309754</a>. Compile errors in N20100419-2000 (REOPENED)<br>
+  </p>
+
+<p>Integration Build (April 14, 2010, 4:19 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286219">Bug 286219</a>. [Edit][Actions] Can't do any team action from compare editors (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292831">Bug 292831</a>. Compare files claims that identical lines are different. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305207">Bug 305207</a>. [Sync View][Apply Patch] Where is "Remove from View" action? (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=308456">Bug 308456</a>. Label "Optimized algorithm used" appears in non populated commit dialog (FIXED)<br>
   </p>
 
-<p>Integration Build (August 26, 2009, 3:05 p.m.)</p>
+<p>Integration Build (March 30, 2010, 1:57 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288587">Bug 288587</a>. saved ssh password not loaded (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292831">Bug 292831</a>. Compare files claims that identical lines are different. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292994">Bug 292994</a>. Please add -I$(JAVA_HOME)/include to libgnomeproxy's Makefiles (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297268">Bug 297268</a>. CompareContentViewerSwitchingPane shows popup menu twice on Cocoa (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301012">Bug 301012</a>. [Sync View][Apply Patch] Apply Patch wizard is missing progress bar when applying patch by URL (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302705">Bug 302705</a>. Enable "Show additional compare information in the status line" by default (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305193">Bug 305193</a>. [Sync View][Apply Patch][Wizards] Stuck when navigating back and forth from Inaccessible Projects page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305316">Bug 305316</a>. [Sync View][Apply Patch] Patch Options UI polishing (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305559">Bug 305559</a>. Synchronize wizard page should select and reveal (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307173">Bug 307173</a>. ruler context menu > Show Annotation switches perspective and opens new editor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307387">Bug 307387</a>. Remove empty dispose method in CompareContentViewerSwitchingPane (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 11, 2010, 6:14 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303784">Bug 303784</a>. Keybindings for Team > Show Annotation and Show History don't work any more (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 10, 2010, 12:46 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300348">Bug 300348</a>. [Sync View][Apply Patch] Add Patch Options when sync'ing with patch (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305139">Bug 305139</a>. [Sync View][Apply Patch] Merging a file with an unmatched hunk hides the file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305144">Bug 305144</a>. increment versions of org.eclipse.team.core and jsch.ui in 3.6 stream (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305217">Bug 305217</a>. [Sync View][Apply Patch] 'Mark as Merged' doesn't work for deletions (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 05, 2010, 1:24 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199036">Bug 199036</a>. [Repo View] Copying multiple repository locations doesn't work properly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273951">Bug 273951</a>. [Edit] NPE on "Override and update" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300215">Bug 300215</a>. [Sync View][Apply Patch] Inform when project from patch is not accessible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304360">Bug 304360</a>. [Sync View][Apply Patch] Remove preview mode page from ApplyPatchSynchronizationWizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304671">Bug 304671</a>. [Sync View][Apply Patch] NPE when getting image for a Hunk (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 02, 2010, 1:14 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291213">Bug 291213</a>. [Sync View] Linking from Sync view to compare editors doesn't work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300229">Bug 300229</a>. [Sync View][Apply Patch] Make Compare editor for an element from Patch Contents model editable (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300231">Bug 300231</a>. [Sync View][Apply Patch] Remove "Overwrite" action from compare editor's context menu (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300237">Bug 300237</a>. [Sync View][Apply Patch] Copying changes from right to left results in a conflict (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301243">Bug 301243</a>. [Sync View][Apply Patch] Remove 'Schedule' action for patch synchronizations (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302163">Bug 302163</a>. [Sync View] Error message during update operation after synchronization (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303888">Bug 303888</a>. [Sync View][Apply Patch] Add "Merge" action to compare editor for 'Patch Contents' model (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304034">Bug 304034</a>. Compiler warnings in I20100225-1936 (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 23, 2010, 1:41 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300238">Bug 300238</a>. [Sync View][Apply Patch] Java structure shown only for hunks (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=303061">Bug 303061</a>. Patch to remove dead code (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 16, 2010, 12:35 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272975">Bug 272975</a>. [Preferences] 'Network Connections' preference page does not inherit dialog font (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295356">Bug 295356</a>. [Sync View] Link with Editor not working for outgoing deleted element (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298925">Bug 298925</a>. [Project Sets] NullPointerException on import psf action (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300217">Bug 300217</a>. [Sync View][Apply Patch] Add 'Open' and 'Open With' actions to elements in Patch Contents model (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300225">Bug 300225</a>. [Sync View][Apply Patch] Compare editor for an element from Patch Contents model opens empty (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300346">Bug 300346</a>. [Sync View][Apply Patch] Hunks should not have [+] widget next to them (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300347">Bug 300347</a>. [Sync View][Apply Patch] Fix hunks sorting (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302163">Bug 302163</a>. [Sync View] Error message during update operation after synchronization (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302583">Bug 302583</a>. Redundant superinterface ITypedElement for the type DiffNode, already defined by IDiffElement (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302840">Bug 302840</a>. [Tests] NPE in testNullInfoMap in N20100213-2000 (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 09, 2010, 1:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301517">Bug 301517</a>. Fix compiler warnings in compare.core (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301796">Bug 301796</a>. CVS Repositories view should keep tree stable when pending updates done (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 02, 2010, 12:24 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278094">Bug 278094</a>. NPE in SyncFileWriter.getInputStream (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299625">Bug 299625</a>. Restore from Repository dialog too small and does not remember size (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300660">Bug 300660</a>. Typo in ResourceModelTraversalCalculator.PROP_TRAVERSAL_CALCULATOR constant (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300694">Bug 300694</a>. Setting enablement for Mark as Merged and Overwrite actions in ModelCompareEditorInput is copy-pasted (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301114">Bug 301114</a>. [Sync View] appendToGroup for "Expand All" button adds it in wrong place (FIXED)<br>
+  </p>
+
+<p>Integration Build (stycze? 26, 2010, 1:52 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298923">Bug 298923</a>. [Sync View][Apply patch] Merge changes from dev branch back to HEAD (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 26, 2010, 11:19 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280729">Bug 280729</a>. Problems in SyncInfoCompareInput (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300054">Bug 300054</a>. Unexpected 'Save Resource' dialog appears when copying changes from right to left (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300772">Bug 300772</a>. Dead code in Platform Team (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 12, 2010, 12:37 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=73683">Bug 73683</a>. [Apply Patch] Add URL option Apply Patch dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272865">Bug 272865</a>. 'Ignore White Space Where Applicable' should not change caret location (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287421">Bug 287421</a>. 'Copy Current Change' should not go to next difference (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297950">Bug 297950</a>. CompareEditorInputs are leaked when reusing editors (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298034">Bug 298034</a>. Add keywords for Workbench Wizards (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298843">Bug 298843</a>. org.eclipse.jsch.core falsely depends on .core.resources, barring use in RCP (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299100">Bug 299100</a>. AFE in SynchronizeView.getViewer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299262">Bug 299262</a>. The API problem filter for: 'The method org.eclipse.compare.CompareEditorInput.setFocus() is no longer API' is no longer used (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 09, 2009, 12:32 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260920">Bug 260920</a>. Hover on History view pin toolbar needs inconsistent (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293551">Bug 293551</a>. Columns are no longer displayed in the History view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296694">Bug 296694</a>. Removing a synchronization when 'Link with Editor' is enabled throws NPE (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 07, 2009, 5:12 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296580">Bug 296580</a>. [compare] Java Compare Editor: 'Copy Current Change from Right to Left' garbles contents (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 07, 2009, 1:06 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296694">Bug 296694</a>. Removing a synchronization when 'Link with Editor' is enabled throws NPE (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296724">Bug 296724</a>. SyncInfoCompareInput uses '@noextend' which is unsupported on final classes (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 01, 2009, 12:14 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153429">Bug 153429</a>. JUnit4 in Eclipse Testing Framework (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 24, 2009, 12:11 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273253">Bug 273253</a>. [ProjectSet] Importing a Project Set not uses existing repository locations any more (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277375">Bug 277375</a>. NPE shutting down with compare editor open (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291695">Bug 291695</a>. Element compare fails to use source range (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295688">Bug 295688</a>. NPEs in ProjectSetImporterTests in N20091118-2000 (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 17, 2009, 12:22 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273072">Bug 273072</a>. [Net] Provide native proxy support on x86_64 Linux (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279111">Bug 279111</a>. ignored resources does not ignore folder patterns with path information. (WORKSFORME)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293085">Bug 293085</a>. UnixProxyProvider throwing "Too many open files" exception (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293623">Bug 293623</a>. Patches with the created with the wizard contain deselected files (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294338">Bug 294338</a>. UI string is missing a mnemonic, has wrong casing and has an unwanted dot (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295112">Bug 295112</a>. Initial focus of PatchWizardDialog should be on the default button (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 28, 2009, 11:47 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293542">Bug 293542</a>. [Sync View] Link with Editor view menu has no mnemonic (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 26, 2009, 5:16 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=260531">Bug 260531</a>. [compare] auto-indent not working as expected (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291616">Bug 291616</a>. [Wizards] Commit dialog in Change Sets mode has to many context menu actions (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292394">Bug 292394</a>. Additional dialog before Commit dialog comes up and makes the UI flickering/noisy (FIXED)<br>
+  </p>
+
+<p>Integration Build (pa?dziernik 20, 2009, 12:48 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=219570">Bug 219570</a>. [Sync View] "Link with Editor" for Synchronize view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289501">Bug 289501</a>. Bad position of "Details >>" button in "Overwrite Uncommitted Changes" dialog (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291214">Bug 291214</a>. [Sync View] "Link with Editor" doesn't show current editor's input in model sync trees (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291215">Bug 291215</a>. [Sync View] "Link with Editor" works poor for old style sync (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292539">Bug 292539</a>. [Sync View] Multiple nodes for a compilation unit in model sync (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 13, 2009, 12:26 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=124039">Bug 124039</a>. [Wizards] Show model sync in commit dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286371">Bug 286371</a>. Save changed password to secure storage immediately (CLOSED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289501">Bug 289501</a>. Bad position of "Details >>" button in "Overwrite Uncommitted Changes" dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291492">Bug 291492</a>. [Sync View] Setting an ILabelDecorator for a model sync participant has no effect (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 06, 2009, 10:39 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290505">Bug 290505</a>. [Wizards] Show content changes in CVS Commit wizard using a compare viewer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290888">Bug 290888</a>. ISynchronizeView is not intended to be implemented by clients (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 29, 2009, 11:01 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273473">Bug 273473</a>. Button for copying changes in compare editor looks weird (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289501">Bug 289501</a>. Bad position of "Details >>" button in "Overwrite Uncommitted Changes" dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289552">Bug 289552</a>. 'Next Change' does not selected last small diff (button disabled) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290123">Bug 290123</a>. [Wizards] Share Project wizard uses deprecated ParticipantPageSaveablePart (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 22, 2009, 12:41 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=210627">Bug 210627</a>. Create Patch should sort diffs by file path (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289501">Bug 289501</a>. Bad position of "Details >>" button in "Overwrite Uncommitted Changes" dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289554">Bug 289554</a>. 'Restore Defaults' on 'Compare/Patch' > 'Text Compare' broken (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289727">Bug 289727</a>. If name of a Synchronize Participant is null set it to "Unknown" (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 16, 2009, 2:02 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=87756">Bug 87756</a>. [Progress] Job name used as title of error dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=212721">Bug 212721</a>. [Change Sets] "Make changes Unassigned" visible when it shouldn't be (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=239003">Bug 239003</a>. Enable 'Apply Patch' everywhere (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263702">Bug 263702</a>. Branch creation problem in CVS (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282032">Bug 282032</a>. Radio button group not read correctly by JAWS (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287544">Bug 287544</a>. GlobalRefreshWizardSelectionPage and GlobalRefreshResourceSelectionPage use deprecated ResourceSorter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287668">Bug 287668</a>. No need remember fDialog in PatchWizard, use getContainer() instead (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 25, 2009, 11:21 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=77207">Bug 77207</a>. [Repo View] Keyboard shortcut for copying cvs repository location to clipboard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=239003">Bug 239003</a>. Enable 'Apply Patch' everywhere (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262515">Bug 262515</a>. [SSH2] An undetermined authentication failure (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287532">Bug 287532</a>. ModelElementSelectionPage uses deprecated ResourceSorter (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 03, 2009, 5:27 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277375">Bug 277375</a>. NPE shutting down with compare editor open (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (lipiec 21, 2009, 1:49 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=184684">Bug 184684</a>. [Wizards] Check Out As: Location widget should fill its display area horizontally (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=221652">Bug 221652</a>. [Patch] Widgets layout on Advanced Options page in the Create Patch wizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283997">Bug 283997</a>. Don't use deprecated ResourceSorter in CVSWizardPage (FIXED)<br>
   </p>
 
-<p>Integration Build (August 06, 2009, 1:10 p.m.)</p>
+<p>Integration Build (July 14, 2009, 1:27 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=257062">Bug 257062</a>. IConfigurationWizardExtension has TODO in its init(IWorkbench, IProject[]) method's javadoc (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275123">Bug 275123</a>. NPE when quickly closing compare editor for local revision (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276849">Bug 276849</a>. [Wizards] NPE when "Check Out into an existing project" selected (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277878">Bug 277878</a>. Use Job.getJobManager() instead of Platform.getJobManager() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279933">Bug 279933</a>. Get rid of NLS_MESSAGEFORMAT_* directives (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280009">Bug 280009</a>. [Doc] Badly formed HTML in ui_xmlcompare_ex.html (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281348">Bug 281348</a>. [Net] Eclipse Galileo crashes under Japanese version of Windows XP (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281628">Bug 281628</a>. [Net] Should be impossible to edit native proxy setting by double-clicking the entry (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283126">Bug 283126</a>. Increment the service segment for components with released fixes in 3.6M1 (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 30, 2009, 1:33 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=243546">Bug 243546</a>. [Doc] Create a package.html file for org.eclipse.compare.core API (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275545">Bug 275545</a>. [Viewers] Compare editor forgets text position on save (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276695">Bug 276695</a>. Unused editor messages in Compare properties file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277477">Bug 277477</a>. CompareEditorInput should not instantiate new Booleans (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281035">Bug 281035</a>. Javadoc warning in official build (FIXED)<br>
   </p>
 
-<p>Integration Build (May 27, 2009, 12:19 p.m.)</p>
+<p>Integration Build (maj 27, 2009, 12:19 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
   </p>
 
-<p>Integration Build (May 22, 2009, 4:10 p.m.)</p>
+<p>Integration Build (maj 22, 2009, 4:10 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268321">Bug 268321</a>. [Net] UnixProxyProvider stuck on my RHEL5 gnome system (ASSIGNED)<br>
   </p>
 
-<p>Integration Build (May 21, 2009, 11:49 p.m.)</p>
+<p>Integration Build (maj 21, 2009, 11:49 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277128">Bug 277128</a>. Help context for repository view filter dialog (FIXED)<br>
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/Team.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
index 9a6e0f9..3fc8c34 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -103,6 +103,8 @@ public final class Team {
 	
 	/**
 	 * Returns whether the given file should be ignored.
+	 * @param file file to check
+	 * @return <code>true</code> if this file should be ignored, and <code>false</code> otherwise
 	 * @deprecated use isIgnoredHint(IResource) instead
 	 */
 	public static boolean isIgnoredHint(IFile file) {
@@ -124,6 +126,8 @@ public final class Team {
 	
 	/**
 	 * Returns whether the given file should be ignored.
+	 * @param file file to check
+	 * @return <code>true</code> if this file should be ignored, and <code>false</code> otherwise
 	 * @deprecated use isIgnoredHint instead
 	 */
 	public static boolean isIgnored(IFile file) {
@@ -148,6 +152,7 @@ public final class Team {
     
 	/**
 	 * Returns the list of global ignores.
+	 * @return all ignore infos representing globally ignored patterns
 	 */
 	public synchronized static IIgnoreInfo[] getAllIgnores() {
 		// The ignores are cached and when the preferences change the
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java
index 7cf5528..8a28a5b 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IMergeContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import org.eclipse.team.core.mapping.provider.MergeContext;
 
 /**
  * Provides the context for an <code>IResourceMappingMerger</code> or a model
- * specific synchronization view that supports merging. *
+ * specific synchronization view that supports merging.
  * <p>
  * <a name="async">The diff tree associated with this context may be updated
  * asynchronously in response to calls to any method of this context (e.g. merge
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java
index 78b1bb3..f7659e3 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/IResourceMappingMerger.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,7 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
  * auto-merging. It is helpful in the cases where a file may contain multiple
  * model elements or a model element consists of multiple files. It can also be
  * used for cases where there is a one-to-one mapping between model elements and
- * files, although <code>IStreamMerger</code> can also be used in that case.
+ * files, although <code>IStorageMerger</code> can also be used in that case.
  * 
  * Clients should group resource mappings by model provider and then attempt to
  * obtain a merger from the model provider using the adaptable mechanism as
@@ -88,12 +88,12 @@ public interface IResourceMappingMerger {
      * Return the scheduling rule that is required to merge
      * all the changes that apply to this merger in the given 
      * context. When calling {@link #merge(IMergeContext, IProgressMonitor)},
-     * lients must ensure that they either have obtained
+     * clients must ensure that they either have obtained
      * a rule that covers the rule returned by this method or
      * they must not hold any rule.
      * @param context the context that contains the changes to be merged
      * @return the scheduling rule required by this merger to merge all
-     * the changes in the gibven context belonging to the merger's
+     * the changes in the given context belonging to the merger's
      * model provider.
      */
     public ISchedulingRule getMergeRule(IMergeContext context);
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java
index 62ab384..202a19b 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/ISynchronizationScopeManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@ public interface ISynchronizationScopeManager {
 	 * Method to be invoked when the scope of this
 	 * manager is no longer needed. It is typically the
 	 * responsibility of the client that creates a scope manager 
-	 * to dispose of it.
+	 * to dispose it.
 	 */
 	void dispose();
 
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
index 4027ecf..d6a4c37 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/MergeContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -288,7 +288,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
 	 * that of the remote. This method is invoked by the
 	 * {@link #merge(IDiff, boolean, IProgressMonitor)} method. By default, it
 	 * either overwrites the local contexts with the remote contents if both
-	 * exist, deletes the local if the rmeote does not exists or addes the local
+	 * exist, deletes the local if the remote does not exists or adds the local
 	 * if the local doesn't exist but the remote does. It then calls
 	 * {@link #makeInSync(IDiff, IProgressMonitor)} to give subclasses a change
 	 * to make the file associated with the diff in-sync.
@@ -296,7 +296,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
 	 * @param diff
 	 *            the diff whose local is to be replaced
 	 * @param monitor
-	 *            a progrss monitor
+	 *            a progress monitor
 	 * @throws CoreException
 	 */
     protected void performReplace(final IDiff diff, IProgressMonitor monitor) throws CoreException {
@@ -305,8 +305,7 @@ public abstract class MergeContext extends SynchronizationContext implements IMe
     	IFileRevision remote = null;
     	if (diff instanceof IResourceDiff) {
     		d = (IResourceDiff) diff;
-    		if (d != null)
-    			remote = d.getAfterState();
+   			remote = d.getAfterState();
     	} else {
     		d = (IResourceDiff)((IThreeWayDiff)diff).getRemoteChange();
     		if (d != null)
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java
index 0cd1d7e..ede9bd2 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/SynchronizationScopeManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,11 +36,11 @@ import org.eclipse.team.internal.core.mapping.*;
  * <li>Determine what model providers are interested in the targeted resources
  * <li>From those model providers, obtain the set of affected resource mappings
  * <li>If the original set is the same as the new set, we are done.
- * <li>if the set differs from the original selection, rerun the mapping
+ * <li>If the set differs from the original selection, rerun the mapping
  * process for any new mappings
  * <ul>
  * <li>Only need to query model providers for mappings for new resources
- * <li>keep repeating until no new mappings or resources are added
+ * <li>Keep repeating until no new mappings or resources are added
  * </ul>
  * </ol>
  * <p>
@@ -326,7 +326,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
 	}
 
 	/**
-	 * set whether the scope has additional mappings. This method is not
+	 * Set whether the scope has additional mappings. This method is not
 	 * intended to be overridden.
 	 * 
 	 * @param hasAdditionalMappings a boolean indicating if the scope has
@@ -338,7 +338,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
 	}
 
 	/**
-	 * set whether the scope has additional resources. This method is not
+	 * Set whether the scope has additional resources. This method is not
 	 * intended to be overridden.
 	 * 
 	 * @param hasAdditionalResources a boolean indicating if the scope has
@@ -368,7 +368,7 @@ public class SynchronizationScopeManager extends PlatformObject implements ISync
 	 * include the original resource either explicitly or implicitly as a child
 	 * of a returned resource.
 	 * <p>
-	 * Subclasses may override this method to include additional resources
+	 * Subclasses may override this method to include additional resources.
 	 * 
 	 * @param traversals the input resource traversals
 	 * @return the input resource traversals adjusted to include any additional resources
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java
index 495ef3e..514af44 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/Subscriber.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
  * <p>
  * When queried for the <code>SyncInfo</code> corresponding to a local resource using 
  * <code>getSyncInfo(IResource)</code>, the subscriber should not contact the server. 
- * Server round trips should only occur within the <code>refresh<code>
+ * Server round trips should only occur within the <code>refresh</code>
  * method of the subscriber. Consequently,
  * the implementation of a subscriber must cache enough state information for a remote resource to calculate the 
  * synchronization state without contacting the server.  During a refresh, the latest remote resource state 
@@ -50,12 +50,12 @@ import org.eclipse.team.internal.core.mapping.SyncInfoToDiffConverter;
  * resource)
  * to determine if the file represents an outgoing change so that <code>SyncInfo</code> obtained
  * after a delta will indicate that the file has an outgoing change. The subscriber must also notify listeners 
- * when roots and added 
+ * when roots are added 
  * or removed. For example, a subscriber for a repository provider would fire a root added event when a project 
  * was shared
  * with a repository. No event is required when a root is deleted as this is available through the 
  * <code>IResource</code> delta mechanism. It is up to clients to re-query the subscriber
- * when the state of a resource changes locally by listening to IResource deltas.
+ * when the state of a resource changes locally by listening to <code>IResource</code> deltas.
  * </p><p>
  * The remote and base states can also include the state for resources that do not exist locally (i.e outgoing deletions 
  * or incoming additions). When queried for the members of a local resource, the subscriber should include any children
@@ -161,6 +161,7 @@ abstract public class Subscriber {
 	 * <li>if the given resource is not supervised by this subscriber</li>
 	 * <li>if the given resource is a closed project (they are ineligible for
 	 * synchronization)</li>
+	 * </ul>
 	 * <p>
 	 * Typical synchronization operations use the statuses computed by this
 	 * method as the basis for determining what to do. It is possible for the
@@ -230,15 +231,15 @@ abstract public class Subscriber {
 	}
 	
 	/**
-	 * Adds all out-of-sync resources (getKind() != IN_SYNC) that occur
+	 * Adds all out-of-sync resources (<code>getKind() != SyncInfo.IN_SYNC</code>) that occur
 	 * under the given resources to the specified depth. The purpose of this
 	 * method is to provide subscribers a means of optimizing the determination
-	 * of all out-of-sync out-of-sync descendants of a set of resources.
+	 * of all out-of-sync descendants of a set of resources.
 	 * <p>
 	 * If any of the directly provided resources are not supervised by the subscriber, then
 	 * they should be removed from the set.
 	 * If errors occur while determining the sync info for the resources, they should
-	 * be added to the set using <code>addError</code>.
+	 * be added to the set using <code>SyncInfoSet.addError</code>.
 	 * </p>
 	 * @param resources the root of the resource subtrees from which out-of-sync sync info should be collected
 	 * @param depth the depth to which sync info should be collected
@@ -264,9 +265,9 @@ abstract public class Subscriber {
 	}
 	
 	/**
-	 * Fires a team resource change event to all registered listeners Only
+	 * Fires a team resource change event to all registered listeners. Only
 	 * listeners registered at the time this method is called are notified.
-	 * Listener notification makes use of an ISafeRunnable to ensure that
+	 * Listener notification makes use of an <code>ISafeRunnable</code> to ensure that
 	 * client exceptions do not effect the notification to other clients.
 	 */
 	protected void fireTeamResourceChange(final ISubscriberChangeEvent[] deltas) {
@@ -470,7 +471,7 @@ abstract public class Subscriber {
 	/**
 	 * Return the synchronization state of the given resource mapping.
 	 * Only return the portion of the synchronization state that matches
-	 * the provided stateMask. The synchronization state flags that are
+	 * the provided <code>stateMask</code>. The synchronization state flags that are
 	 * guaranteed to be interpreted by this method are:
 	 * <ul>
 	 * <li>The kind flags {@link IDiff#ADD}, {@link IDiff#REMOVE} and {@link IDiff#CHANGE}.
@@ -482,7 +483,7 @@ abstract public class Subscriber {
 	 * <p>
 	 * An element will only include {@link IDiff#ADD} in the returned state if all resources covered
 	 * by the traversals mappings are added. Similarly, {@link IDiff#REMOVE} will only be included
-	 * if all the resources covered by the tarversals are deleted. Otherwise {@link IDiff#CHANGE}
+	 * if all the resources covered by the traversals are deleted. Otherwise {@link IDiff#CHANGE}
 	 * will be returned. 
 	 * 
 	 * @param mapping the resource mapping whose synchronization state is to be determined
@@ -511,7 +512,7 @@ abstract public class Subscriber {
 				if (kind[0] != diffKind) {
 					kind[0] = IDiff.CHANGE;
 				}
-				// Only need to visit the childen of a change
+				// Only need to visit the children of a change
 				return diffKind == IDiff.CHANGE;
 			}
 		});
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java
index bfabe8e..00f0a3d 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,19 +28,19 @@ import org.eclipse.team.internal.core.Messages;
  * </p>
  * <p>
  * For two-way comparisons, a <code>SyncInfo</code> node has a change
- * type. This will be one of IN-SYNC, ADDITION, DELETION or CHANGE determined
- * in the following manner.
+ * type. This will be one of <code>IN-SYNC</code>, <code>ADDITION</code>, 
+ * <code>DELETION</code> or <code>CHANGE</code> determined in the following manner.
  * <ul>
- * <li>A resource is considered an ADDITION if it exists locally and there is no remote.
- * <li>A resource is considered an DELETION if it does not exists locally and there is remote.
- * <li>A resource is considered a CHANGE if both the local and remote exist but the 
+ * <li>A resource is considered an <code>ADDITION</code> if it exists locally and there is no remote.
+ * <li>A resource is considered an <code>DELETION</code> if it does not exists locally and there is remote.
+ * <li>A resource is considered a <code>CHANGE</code> if both the local and remote exist but the 
  * comparator indicates that they differ. The comparator may be comparing contents or
  * timestamps or some other resource state.
- * <li>A resource is considered IN_SYNC in all other cases.
+ * <li>A resource is considered <code>IN_SYNC</code> in all other cases.
  * </ul>
  * </p><p>
  * For three-way comparisons, the sync info node has a direction as well as a change
- * type. The direction is one of INCOMING, OUTGOING or CONFLICTING. The comparison
+ * type. The direction is one of <code>INCOMING</code>, <code>OUTGOING</code> or <code>CONFLICTING</code>. The comparison
  * of the local and remote resources with a <b>base</b> resource is used to determine
  * the direction of the change.
  * <ul>
@@ -54,6 +54,7 @@ import org.eclipse.team.internal.core.Messages;
  * <b>incoming resource</b>.
  * <li>If there are both incoming and outgoing changes, the resource 
  * is considered a <b>conflicting change</b>.
+ * </ul>
  * Again, the comparison of resources is done using the variant comparator provided
  * when the sync info was created.
  * </p>
@@ -192,7 +193,7 @@ public class SyncInfo implements IAdaptable {
 	 * of the local and remote resources.
 	 * ]
 	 * </p>
-	 * @return a remote resource handle, or <code>null</code>
+	 * @return a remote base resource handle, or <code>null</code>
 	 */
 	public IResourceVariant getBase() {
 		return base;
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
index e4ab9d0..d4823e6 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ResourceVariantTreeSubscriber.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -101,7 +101,7 @@ public abstract class ResourceVariantTreeSubscriber extends Subscriber {
 				if(!member.exists() && !getRemoteTree().hasResourceVariant(member)) {
 					// Remove deletion conflicts
 					iterator.remove();
-				} else if (!isSupervised(resource)) {
+				} else if (!isSupervised(member)) {
 					// Remove unsupervised resources
 					iterator.remove();
 				}
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java
index c616b58..0058ece 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWaySubscriber.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ import org.eclipse.team.internal.core.subscribers.ThreeWayBaseTree;
 
 /**
  * A resource variant tree subscriber whose trees use an underlying
- * <code>ThreeWaySycnrhonizer</code> to store and manage the
+ * <code>ThreeWaySynchronizer</code> to store and manage the
  * synchronization state for the local workspace. Subclasses need to
  * provide a subclass of <code>ThreeWayRemoteTree</code> and a method
  * to create resource variant handles from the bytes cached in the
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java
index 16bc6d3..d549dc1 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/ResourceVariantCacheEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,7 +80,7 @@ public class ResourceVariantCacheEntry {
 	 * the contents from the first write is used and the content from subsequent writes is ignored.
 	 * @param stream an InputStream that provides the contents to be cached
 	 * @param monitor a progress monitor
-	 * @throws TeamException if the entry is DISPOSED or an I/O error occurres
+	 * @throws TeamException if the entry is DISPOSED or an I/O error occurred
 	 */
 	public void setContents(InputStream stream, IProgressMonitor monitor) throws TeamException {
 		// Use a lock to only allow one write at a time
@@ -184,7 +184,7 @@ public class ResourceVariantCacheEntry {
 
 	/**
 	 * Registers a hit on this cache entry. This updates the last access timestamp.
-	 * Thsi method is intended to only be invokded from inside this class or the cahce itself.
+	 * This method is intended to only be invoked from inside this class or the cache itself.
 	 * Other clients should not use it.
 	 */
 	protected void registerHit() {
@@ -192,7 +192,7 @@ public class ResourceVariantCacheEntry {
 	}
 
 	public void dispose() {
-		// Use a lock to avoid changing state while another thread may be writting
+		// Use a lock to avoid changing state while another thread may be writing
 		beginOperation();
 		try {
 			state = DISPOSED;
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
index 3f96329..2ab2536 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,13 @@
 package org.eclipse.team.internal.core;
 
 
-import java.util.*;
+import java.util.Vector;
 
 /**
- * A string pattern matcher, suppporting * and ? wildcards.
+ * A string pattern matcher. Supports '*' and '?' wildcards.
  * Note: code copied from org.eclipse.jdt.internal.core.util.StringMatcher on April 3, 2001
- * (version 0.1 - 010901H18 [rename jbl]).
+ * (version 0.1 - 010901H18 [rename jbl]). Sync'ed on November 4, 2009 (revision 1.17).
+ * 
  */
 public class StringMatcher {
 	protected String fPattern;
@@ -29,7 +30,7 @@ public class StringMatcher {
 
 	/* boundary value beyond which we don't need to search in the text */
 	protected int fBound = 0;
-	private boolean pathPattern;
+	private boolean fPathPattern;
 	
 
 	protected static final char fSingleWildCard = '\u0000';
@@ -48,6 +49,43 @@ public class StringMatcher {
 			return end;
 		}
 	}
+
+	/**
+	 * StringMatcher constructor takes in a String object that is a simple 
+	 * pattern. The pattern may contain '*' for 0 and many characters and
+	 * '?' for exactly one character.  
+	 *
+	 * Literal '*' and '?' characters must be escaped in the pattern 
+	 * e.g., "\*" means literal "*", etc.
+	 *
+	 * Escaping any other character (including the escape character itself), 
+	 * just results in that character in the pattern.
+	 * e.g., "\a" means "a" and "\\" means "\"
+	 *
+	 * If invoking the StringMatcher with string literals in Java, don't forget
+	 * escape characters are represented by "\\".
+	 *
+	 * @param pattern the pattern to match text against
+	 * @param ignoreCase if true, case is ignored
+	 * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
+	 * 		  (everything is taken literally).
+	 */
+	public StringMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards) {
+		if (pattern == null)
+			throw new IllegalArgumentException();
+		fIgnoreCase = ignoreCase;
+		fIgnoreWildCards = ignoreWildCards;
+		fPattern= pattern;
+		fLength = pattern.length();
+		fPathPattern = pattern.indexOf('/') != -1;
+		
+		if (fIgnoreWildCards) {
+			parseNoWildCards();
+		} else {
+			parseWildCards();
+		}
+	}
+	
 	/**
 	 * Find the first occurrence of the pattern between <code>start</code)(inclusive) 
 	 * and <code>end</code>(exclusive).  
@@ -102,48 +140,17 @@ public class StringMatcher {
 			return null;
 		return new Position(matchStart, curPos);
 	}
+
 	/**
-	 * StringMatcher constructor takes in a String object that is a simple 
-	 * pattern which may contain  '*' for 0 and many characters and
-	 * '?' for exactly one character.  
-	 *
-	 * Literal '*' and '?' characters must be escaped in the pattern 
-	 * e.g., "\*" means literal "*", etc.
-	 *
-	 * Escaping any other character (including the escape character itself), 
-	 * just results in that character in the pattern.
-	 * e.g., "\a" means "a" and "\\" means "\"
-	 *
-	 * If invoking the StringMatcher with string literals in Java, don't forget
-	 * escape characters are represented by "\\".
-	 *
-	 * @param aPattern the pattern to match text with
-	 * @param ignoreCase if true, case is ignored
-	 * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
-	 * 		  (everything is taken literally).
+	 * match the given <code>text</code> with the pattern
+	 * @return <code>true</code> if matched otherwise <code>false</code>
+	 * @param text a String object
 	 */
-	public StringMatcher(String aPattern, boolean ignoreCase, boolean ignoreWildCards) {
-		fIgnoreCase = ignoreCase;
-		fIgnoreWildCards = ignoreWildCards;
-		fLength = aPattern.length();
-
-		pathPattern = aPattern.indexOf('/') != -1;
-		
-		/* convert case */
-		if (fIgnoreCase) {
-			fPattern = aPattern.toUpperCase();
-		} else {
-			fPattern = aPattern;
-		}
-		
-		if (fIgnoreWildCards) {
-			parseNoWildCards();
-		} else {
-			parseWildCards();
-		}
+	public boolean match(String text) {
+		return match(text, 0, text.length());
 	}
 	/**
-	 * Given the starting (inclusive) and the ending (exclusive) poisitions in the   
+	 * Given the starting (inclusive) and the ending (exclusive) positions in the
 	 * <code>text</code>, determine if the given substring matches with aPattern  
 	 * @return true if the specified portion of the text matches the pattern
 	 * @param text a String object that contains the substring to match 
@@ -219,21 +226,13 @@ public class StringMatcher {
 		}
 		return i == segCount ;
 	}
-	/**
-	 * match the given <code>text</code> with the pattern 
-	 * @return true if matched eitherwise false
-	 * @param text a String object 
-	 */
-	public boolean  match(String text) {
-		return match(text, 0, text.length());
-	}
 	
 	/**
 	 * check existence of '/' in the pattern. 
 	 * @return <b>true</b> if pattern contains '/' 
 	 */
 	public boolean isPathPattern() {
-		return pathPattern;
+		return fPathPattern;
 	}
 	
 	/**
@@ -246,8 +245,7 @@ public class StringMatcher {
 		fBound = fLength;
 	}
 	/**
-	 * This method parses the given pattern into segments seperated by wildcard '*' characters.
-	 * @param p a String object that is a simple regular expression with  '*' and/or  '?'
+	 * Parses the given pattern into segments seperated by wildcard '*' characters.
 	 */
 	private void parseWildCards() {
 		if(fPattern.startsWith("*"))//$NON-NLS-1$
@@ -372,8 +370,11 @@ public class StringMatcher {
 			if (pchar == tchar)
 				continue;
 			if (fIgnoreCase) {
-				char tc = Character.toUpperCase(tchar);
-				if (tc == pchar)
+				if (Character.toUpperCase(tchar) == Character.toUpperCase(pchar))
+					continue;
+				// comparing after converting to upper case doesn't handle all cases;
+				// also compare after converting to lower case
+				if (Character.toLowerCase(tchar) == Character.toLowerCase(pchar))
 					continue;
 			}
 			return false;
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
index 3b56151..eae4d68 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/streams/SizeConstrainedInputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public class SizeConstrainedInputStream extends FilterInputStream {
 	private long bytesRemaining;
 	
 	/**
-	 * Creates a size contrained input stream.
+	 * Creates a size constrained input stream.
 	 * @param in the underlying input stream, never actually closed by this filter
 	 * @param size the maximum number of bytes of the underlying input stream that
 	 *             can be read through this filter
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
index 82c84c0..7dd78d4 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberEventHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -381,7 +381,13 @@ public abstract class SubscriberEventHandler extends BackgroundEventHandler {
 
 	/**
 	 * Queue up the given runnable in an event to be processed by this job
-	 * @param runnable the runnable to be run by the handler
+	 *
+	 * @param runnable
+	 *            the runnable to be run by the handler
+	 * @param frontOnQueue
+	 *            the frontOnQueue flag is used to indicate that the runnable
+	 *            should be placed on the front of the queue and be processed as
+	 *            soon as possible
 	 */
 	public void run(IWorkspaceRunnable runnable, boolean frontOnQueue) {
 		queueEvent(new RunnableEvent(runnable, frontOnQueue), frontOnQueue);
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java
index eae1c98..352a92e 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberResourceCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,6 +27,7 @@ public abstract class SubscriberResourceCollector implements IResourceChangeList
     /**
      * Create the collector and register it as a listener with the workspace
      * and the subscriber.
+     * @param subscriber the subscriber to be associated with this collector
      */
     public SubscriberResourceCollector(Subscriber subscriber) {
         Assert.isNotNull(subscriber);
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java
index 9350c97..150a987 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -108,7 +108,7 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
 	}
 
 	/**
-	 * Disposes of the background job associated with this collector and deregisters
+	 * Disposes of the background job associated with this collector and de-registers
 	 * all it's listeners. This method must be called when the collector is no longer
 	 * referenced and could be garbage collected.
 	 */
@@ -157,9 +157,9 @@ public final class SubscriberSyncInfoCollector extends SubscriberResourceCollect
 	}
 	
 	/**
-	 * Return the <code>SyncInfoSet</code> that contains all the all the out-of-sync resources for the
+	 * Return the <code>SyncInfoSet</code> that contains all the out-of-sync resources for the
 	 * subscriber that are descendants of the roots of this collector. The set will contain only those resources that are children of the roots
-	 * of the collector unless the roots of the colletor has been set to <code>null</code>
+	 * of the collector unless the roots of the collector has been set to <code>null</code>
 	 * in which case all out-of-sync resources from the subscriber are collected.
 	 * @return the subscriber sync info set
 	 */
diff --git a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java
index e1773be..0468436 100644
--- a/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java
+++ b/eclipse/plugins/org.eclipse.team.core/src/org/eclipse/team/internal/core/subscribers/SubscriberSyncInfoEventHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -194,11 +194,16 @@ public class SubscriberSyncInfoEventHandler extends SubscriberEventHandler {
 	}
 	
 	/**
-	 * Initialize all resources for the subscriber associated with the set. This will basically recalculate
-	 * all synchronization information for the subscriber.
+	 * Initialize all resources for the subscriber associated with the set. This
+	 * will basically recalculate all synchronization information for the
+	 * subscriber.
 	 * <p>
-	 * This method is synchronized with the queueEvent method to ensure that the two events
-	 * queued by this method are back-to-back
+	 * This method is synchronized with the queueEvent method to ensure that the
+	 * two events queued by this method are back-to-back.
+	 * 
+	 * @param roots
+	 *            the new roots or <code>null</code> if the roots from the
+	 *            subscriber should be used.
 	 */
 	public void reset(IResource[] roots) {
 		RootResourceSynchronizationScope scope = (RootResourceSynchronizationScope)getScope();
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF
index 00e651c..b5a8a15 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.cvs.core; singleton:=true
-Bundle-Version: 3.3.200.qualifier
+Bundle-Version: 3.3.301.qualifier
 Bundle-Activator: org.eclipse.team.internal.ccvs.core.CVSProviderPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/about.html b/eclipse/plugins/org.eclipse.team.cvs.core/about.html
index 071d9d4..8ced0b8 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/about.html
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/about.html
@@ -8,7 +8,7 @@
 <body lang="EN-US">
 <h2>About This Content</h2>
  
-<p>June 7, 2007</p>	
+<p>October 9, 2009</p>	
 <h3>License</h3>
 
 <p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
@@ -31,7 +31,7 @@ did not receive this Content directly from the Eclipse Foundation, the following
 for informational purposes only, and you should look to the Redistributor’s license for 
 terms and conditions of use.</p>
 
-<h4>Ant 1.7.0</h4>
+<h4>Ant 1.7.1</h4>
 <p>The plug-in is based on software developed by The Apache Software Foundation as part of the Ant project.</p>
 
 <p>The class org.eclipse.team.internal.ccvs.core.connection.PServerConnection ("Ant-Derived Work") in the plug-in JAR is based on Ant code from the file CVSPass.java in the package org.apache.tools.ant.taskdefs.</p>
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
index ca52687..a937fff 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSubscriber.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ccvs.core;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
@@ -119,9 +117,11 @@ public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResour
 	private List roots;
 	private CVSResourceVariantTree remoteTree;
 	private MergeBaseTree baseTree;
-	
-	public CVSMergeSubscriber(IResource[] roots, CVSTag start, CVSTag end) {		
+	private boolean isModelSync;
+
+	public CVSMergeSubscriber(IResource[] roots, CVSTag start, CVSTag end, boolean isModelSync) {		
 		this(getUniqueId(), roots, start, end);
+		this.isModelSync = isModelSync;
 	}
 
 	private static QualifiedName getUniqueId() {
@@ -214,6 +214,10 @@ public class CVSMergeSubscriber extends CVSSyncTreeSubscriber implements IResour
 		return end;
 	}
 
+	boolean isModelSync() {
+		return isModelSync;
+	}
+
 	/*
 	 * What to do when a root resource for this merge changes?
 	 * Deleted, Move, Copied
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java
index 1662c2e..9b16287 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMergeSyncInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,9 +13,9 @@ package org.eclipse.team.internal.ccvs.core;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.*;
 import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.*;
-import org.eclipse.team.core.synchronize.*;
-import org.eclipse.team.core.variants.*;
+import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.synchronize.SyncInfo;
+import org.eclipse.team.core.variants.IResourceVariant;
 
 public class CVSMergeSyncInfo extends CVSSyncInfo {
 
@@ -35,15 +35,15 @@ public class CVSMergeSyncInfo extends CVSSyncInfo {
 	}
 
 	protected int calculateKind() throws TeamException {
+		int kind = super.calculateKind();
+
 		// Report merged resources as in-sync
-		if (((CVSMergeSubscriber)getSubscriber()).isMerged(getLocal())) {
+		if ((kind & DIRECTION_MASK) == INCOMING && ((CVSMergeSubscriber)getSubscriber()).isMerged(getLocal())) {
 			return IN_SYNC;
 		}
 		
-		int kind = super.calculateKind();
-		
-		// Report outgoing resources as in-sync
-		if((kind & DIRECTION_MASK) == OUTGOING) {
+		// Report outgoing resources as in-sync when models are not shown
+		if((kind & DIRECTION_MASK) == OUTGOING && !((CVSMergeSubscriber)getSubscriber()).isModelSync()) {
 			return IN_SYNC;
 		}
 		
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
index d1b370c..6602694 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,38 +119,18 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
  		IProject[] projects = asProjects(referenceStrings, infoMap);
 		
  		projects = confirmOverwrite(context, projects);
- 		if (projects == null)
- 			return new IProject[0];
+		if (projects == null || projects.length == 0 /* No projects to import */)
+			return new IProject[0];
 
- 		Map alternativeMap = isAdditionalRepositoryInformationRequired(projects, infoMap);
-		if (!alternativeMap.isEmpty()) {
-
-			// display the dialog
-			Map alternativeRespositoriesMap = promptForAdditionRepositoryInformation(alternativeMap);
-			// replace repository location from a project load info with one from the prompter
-			if (alternativeRespositoriesMap != null) {
-				for (Iterator iterator = infoMap.values().iterator(); iterator
-						.hasNext();) {
-					LoadInfo loadInfoForProject = (LoadInfo) iterator.next();
-					ICVSRepositoryLocation selectedAlternativeRepository = (ICVSRepositoryLocation) alternativeRespositoriesMap
-							.get(loadInfoForProject.repositoryLocation);
-					/*
-					 * If selectedAlternativeRepository isn't null use it by
-					 * replacing the one from loadInfoForProject. An opposite
-					 * situation, when selectedAlternativeRepository is null,
-					 * occurs when we haven't asked for any additional
-					 * information, because it's not needed - we've found a
-					 * (single) perfect match. To use it we will need to
-					 * recreate repository location with useKnown flag set to
-					 * true.
-					 */
-					// TODO: final modifier removed for LoadInfo.repositoryLocation 
-					// another solution is to create a copy (clone) of LoadInfo, and replace the whole object
-					loadInfoForProject.repositoryLocation = selectedAlternativeRepository != null ? selectedAlternativeRepository
-							: getRepositoryLocationFromString(
-									loadInfoForProject.repositoryLocation
-											.getLocation(true), true, false);
-				}
+		Map suggestedRepositoryLocations = CVSRepositoryLocationMatcher
+				.prepareSuggestedRepositoryLocations(projects, infoMap);
+ 		applySinglePerfectMatchesToInfoMap(suggestedRepositoryLocations, infoMap);
+ 		if (CVSRepositoryLocationMatcher.isPromptRequired(suggestedRepositoryLocations)) {
+			// Display the dialog
+			Map userSelectedRepositoryLocations = promptForAdditionRepositoryInformation(suggestedRepositoryLocations);
+			// Replace repository location from a project load info with one from the prompter
+			if (userSelectedRepositoryLocations != null) {
+				applyUserSelectionToInfoMap(userSelectedRepositoryLocations, infoMap);
 			} else {
 				// operation canceled
 				return new IProject[0];
@@ -159,7 +139,48 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
 		
  		// Load the projects
  		return checkout(projects, infoMap, monitor);
+	}
+
+	private void applySinglePerfectMatchesToInfoMap(
+			Map/* <IProject, List<ICVSRepositoryLocation>> */suggestedRepositoryLocations,
+			Map/* <IProject, LoadInfo> */infoMap) throws CVSException {
+		for (Iterator i = infoMap.values().iterator(); i.hasNext();) {
+			LoadInfo loadInfoForProject = (LoadInfo) i.next();
+			ICVSRepositoryLocation key = loadInfoForProject.repositoryLocation;
+			List suggestedList = (List) suggestedRepositoryLocations.get(key);
+			/*
+			 * We've found a (single) perfect match, the dialog should not
+			 * prompt for additional info in this case. To use the matched repo
+			 * we will need to recreate repository location with 'useKnown' flag
+			 * set to true.
+			 */
+			if (suggestedList != null
+					&& suggestedList.size() == 1
+					&& CVSRepositoryLocationMatcher.isMatching(
+							(ICVSRepositoryLocation) suggestedList.get(0),
+							loadInfoForProject.repositoryLocation)) {
+				loadInfoForProject.repositoryLocation = getRepositoryLocationFromString(
+						loadInfoForProject.repositoryLocation.getLocation(true),
+						true, false);
+				// Do not display in the dialog.
+				suggestedRepositoryLocations.remove(key);
+			}
+		}
+	}
 
+	private void applyUserSelectionToInfoMap(
+			Map/* <ICVSRepositoryLocation, CVSRepositoryLocation> */userSelectedRepositoryLocations,
+			Map/* <IProject, LoadInfo> */infoMap)
+			throws CVSException {
+		for (Iterator i = infoMap.values().iterator(); i.hasNext();) {
+			LoadInfo loadInfoForProject = (LoadInfo) i.next();
+			ICVSRepositoryLocation userSelectedRepository = (ICVSRepositoryLocation) userSelectedRepositoryLocations
+					.get(loadInfoForProject.repositoryLocation);
+			// TODO: final modifier removed for LoadInfo.repositoryLocation 
+			// another solution is to create a copy (clone) of LoadInfo, and replace the whole object
+			if (userSelectedRepository != null)
+				loadInfoForProject.repositoryLocation = userSelectedRepository;
+		}
 	}
 
 	/**
@@ -230,7 +251,7 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
 	 */
 	static class LoadInfo {
 		// TODO: final modifier removed in order to replace a repository location before check out
-		private ICVSRepositoryLocation repositoryLocation;
+		ICVSRepositoryLocation repositoryLocation;
 		private final String module;
 		private final IProject project;
 		private final CVSTag tag;
@@ -306,7 +327,7 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
 			ICVSRepositoryLocation[] locations = CVSProviderPlugin.getPlugin().getKnownRepositories();
 			for (int i = 0; i < locations.length; i++) {
 				ICVSRepositoryLocation location = locations[i];
-				if (isMatching(newLocation, location))
+				if (CVSRepositoryLocationMatcher.isMatching(newLocation, location))
 						return location;
 			}
 		}
@@ -616,226 +637,8 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
 		}
 	}
 	
-	private static final String EXTSSH = "extssh"; //$NON-NLS-1$
-	private static final String PSERVER = "pserver"; //$NON-NLS-1$
-	private static final String EXT = "ext"; //$NON-NLS-1$
-	
-	/**
-	 * Checks whether a dialog prompting for an addition repository location is
-	 * required.
-	 * 
-	 * @see org.eclipse.team.internal.ccvs.ui.AlternativeRepositoryDialog
-	 * @see org.eclipse.team.internal.ccvs.ui.AlternativeRepositoryTable
-	 * 
-	 * @param projects
-	 *            an array of project to check out a mapping of project to
-	 *            project load information
-	 * 
-	 * @return a mapping of project to project load information
-	 * 
-	 * 
-	 * When non-empty map is returned it will contain a mapping of a repository
-	 * location (<code>ICVSRepositoryLocation</code>) from the project set
-	 * to a list of suggested, known repositories locations (<code>ICVSRepositoryLocation</code>)
-	 * to use. The list contains at least one element - a default location (same
-	 * as in the project set). It's always on the first position in the list.
-	 * It's possible that the repository location is known, but even then we
-	 * still allow user to select a different location. So, the default location
-	 * is optionally followed by compatible locations found. Finally, the last
-	 * positions are held by the rest of known locations.
-	 * 
-	 * <p>
-	 * The order in which items are kept in a list also reflects the way a combo
-	 * box from the Alternative Repository dialog will look like.
-	 * </p>
-	 * <p>
-	 * Structure of the list:
-	 * <ul>
-	 * <li>default location form the project set</li>
-	 * <li>compatible locations (if found) - no particular order here</li>
-	 * <li>other known locations - no particular order here neither</li>
-	 * </ul>
-	 * </p>
-	 * An empty map is returned when the project set file contains all required
-	 * information.
-	 */
-	public static Map isAdditionalRepositoryInformationRequired(
-			IProject[] projects, final Map infoMap) {
-		
-		List confirmedProjectsList = Arrays.asList(projects);
-		
-		if (infoMap == null)
-			return Collections.EMPTY_MAP;
-
-		Set projectSetRepositoryLocations = new HashSet();
-		for (Iterator iterator = infoMap.keySet().iterator(); iterator
-				.hasNext();) {
-			IProject project = (IProject) iterator.next();
-			if (confirmedProjectsList.contains(project)) {
-				LoadInfo loadInfo = (LoadInfo) infoMap.get(project);
-				projectSetRepositoryLocations.add(loadInfo.repositoryLocation);
-			}
-		}
-		
-		// none of projects from project sets is confirmed to overwrite
-		if (projectSetRepositoryLocations.isEmpty()) {
-			return Collections.EMPTY_MAP;
-		}
-		
-		List knownRepositories = Arrays.asList(KnownRepositories.getInstance()
-				.getRepositories());
-		
-		Map resultMap = new HashMap();
-		
-		if (knownRepositories.isEmpty()) {
-			// there are no known repositories so use repository location from
-			// the project set
-			for (Iterator iterator = projectSetRepositoryLocations.iterator(); iterator
-					.hasNext();) {
-				ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) iterator
-						.next();
-				ArrayList alternativeList = new ArrayList(1);
-				alternativeList.add(projectSetRepositoryLocation);
-				resultMap.put(projectSetRepositoryLocation,
-						alternativeList);
-			}
-		} else if (!knownRepositories.containsAll(projectSetRepositoryLocations)) {
-			// not all repositories from the project set are known
-
-			for (Iterator iterator = projectSetRepositoryLocations.iterator(); iterator
-					.hasNext();) {
-				ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) iterator
-						.next();
-				
-				List alternativeList = new ArrayList();
-				List matchingList = new ArrayList();
-				List compatibleList = new ArrayList();
-				for (Iterator iterator2 = knownRepositories.iterator(); iterator2
-						.hasNext();) {
-					ICVSRepositoryLocation knownRepositoryLocation = (ICVSRepositoryLocation) iterator2
-							.next();
-					// there can be more than one perfect matches (i.e. two
-					// known, matching repositories with different user names)
-					if (isMatching(projectSetRepositoryLocation,
-							knownRepositoryLocation)) {
-						matchingList.add(knownRepositoryLocation);
-					} else if (isCompatible(knownRepositoryLocation,
-							projectSetRepositoryLocation, false)) {
-						compatibleList.add(knownRepositoryLocation);
-					} else {
-						alternativeList.add(knownRepositoryLocation);
-					}
-				}
-				
-				// Sort compatible repository locations starting from extssh,
-				// followed by pserver and finally ext.
-				Collections.sort(compatibleList, new Comparator() {
-					public int compare(Object o1, Object o2) {
-						if (o1 instanceof ICVSRepositoryLocation
-								&& o2 instanceof ICVSRepositoryLocation) {
-							ICVSRepositoryLocation rl1 = (ICVSRepositoryLocation) o1;
-							ICVSRepositoryLocation rl2 = (ICVSRepositoryLocation) o2;
-							String name1 = rl1.getMethod().getName();
-							String name2 = rl2.getMethod().getName();
-
-							if (!name1.equals(name2) && isCompatible(rl1, rl2, false)) {
-								if (name1.equals(EXTSSH))
-									return -1;
-								if (name2.equals(EXTSSH))
-									return 1;
-								if (name1.equals(PSERVER))
-									return -1;
-								if (name2.equals(PSERVER))
-									return 1;
-								if (name1.equals(EXT))
-									return -1;
-								if (name2.equals(EXT))
-									return 1;
-							}
-							return name1.compareTo(name2);
-						}
-						return 0;
-					}
-				});
-				
-				// add compatible repos before others
-				alternativeList.addAll(0, compatibleList);
-				
-				if (matchingList.isEmpty()) {
-					// if matching repos found add them first instead of the
-					// repository location from the project set
-					alternativeList.add(0, projectSetRepositoryLocation);
-				} else if (matchingList.size() == 1) {
-					// there is only one matching, known repository
-					// so there is no need to ask for any additional info.
-					// don't add it to the resultMap
-					continue;
-				} else {
-					// there is more than one matching, known repository
-					// ask which one we should use during the import
-					alternativeList.addAll(0, matchingList);
-				}
-
-				resultMap.put(projectSetRepositoryLocation,
-						alternativeList);
-			}
-		} // else { all repositories are known, we don't need to prompt for
-			// additional information }
-		
-		return resultMap;
-	}
-	
-	/**
-	 * Same check as in
-	 * org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage class.
-	 * 
-	 * @see org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage#isCompatible
-	 * 
-	 * @param location1
-	 *            First repository location to match
-	 * @param location2
-	 *            Second repository location to match
-	 * @param equalIsCompatible
-	 *            If equal means compatible
-	 * @return <code>true</code> if given repository location are compatible,
-	 *         otherwise <code>false</code> is returned.
-	 */
-	public static boolean isCompatible(ICVSRepositoryLocation location1,
-			ICVSRepositoryLocation location2, boolean equalIsCompatible) {
-		if (!location1.getHost().equals(location2.getHost()))
-			return false;
-		if (!location1.getRootDirectory().equals(location2.getRootDirectory()))
-			return false;
-		if (!equalIsCompatible && location1.equals(location2))
-			return false;
-		return true;
-	}
-	
-	/**
-	 * Checks whether two repository locations match (i.e. they use the same
-	 * connection method, they refer to the same host and root directory and
-	 * they use the same port)
-	 * .
-	 * @param location1
-	 *            First repository location to match
-	 * @param location2
-	 *            Second repository location to match
-	 * @return <code>true</code> if given repository location are matching
-	 *         according to the rule above, otherwise <code>false</code> is
-	 *         returned.
-	 */
-	public static boolean isMatching(ICVSRepositoryLocation location1,
-			ICVSRepositoryLocation location2) {
-		if (location2.getMethod() == location1.getMethod()
-				&& location2.getHost().equals(location1.getHost())
-				&& location2.getPort() == location1.getPort()
-				&& location2.getRootDirectory().equals(
-						location1.getRootDirectory()))
-			return true;
-		return false;
-	}
-	
-	private Map promptForAdditionRepositoryInformation(Map alternativeMap) {
+	private Map/* <ICVSRepositoryLocation, CVSRepositoryLocation> */promptForAdditionRepositoryInformation(
+			Map alternativeMap) {
 		IUserAuthenticator authenticator = CVSRepositoryLocation.getAuthenticator();
 		return authenticator.promptToConfigureRepositoryLocations(alternativeMap);
 	}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java
new file mode 100644
index 0000000..6a2e32d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRepositoryLocationMatcher.java
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.core;
+
+import java.util.*;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.team.internal.ccvs.core.CVSProjectSetCapability.LoadInfo;
+import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
+
+public class CVSRepositoryLocationMatcher {
+
+	private static final String EXTSSH = "extssh"; //$NON-NLS-1$
+	private static final String PSERVER = "pserver"; //$NON-NLS-1$
+	private static final String EXT = "ext"; //$NON-NLS-1$
+
+	private static Comparator COMPATIBLE_LOCATIONS_COMPARATOR = new Comparator() {
+		public int compare(Object o1, Object o2) {
+			if (o1 instanceof ICVSRepositoryLocation
+					&& o2 instanceof ICVSRepositoryLocation) {
+				ICVSRepositoryLocation rl1 = (ICVSRepositoryLocation) o1;
+				ICVSRepositoryLocation rl2 = (ICVSRepositoryLocation) o2;
+				String name1 = rl1.getMethod().getName();
+				String name2 = rl2.getMethod().getName();
+
+				if (!name1.equals(name2) && isCompatible(rl1, rl2, false)) {
+					if (name1.equals(EXTSSH))
+						return -1;
+					if (name2.equals(EXTSSH))
+						return 1;
+					if (name1.equals(PSERVER))
+						return -1;
+					if (name2.equals(PSERVER))
+						return 1;
+					if (name1.equals(EXT))
+						return -1;
+					if (name2.equals(EXT))
+						return 1;
+				}
+				return name1.compareTo(name2);
+			}
+			return 0;
+		}
+	};
+
+	public static Map/* <IProject, List<ICVSRepositoryLocation>> */prepareSuggestedRepositoryLocations(
+			IProject[] projects, final Map/* <IProject, LoadInfo> */infoMap) {
+		List/* <IProject> */confirmedProjectsList = Arrays.asList(projects);
+		Set/* <ICVSRepositoryLocation> */projectSetRepositoryLocations = new HashSet();
+		for (Iterator i = infoMap.keySet().iterator(); i.hasNext();) {
+			IProject project = (IProject) i.next();
+			if (confirmedProjectsList.contains(project)) {
+				LoadInfo loadInfo = (LoadInfo) infoMap.get(project);
+				projectSetRepositoryLocations.add(loadInfo.repositoryLocation);
+			}
+		}
+
+		// none of projects from project sets is confirmed to overwrite
+		if (projectSetRepositoryLocations.isEmpty()) {
+			return null;
+		}
+
+		List/* <ICVSRepositoryLocation> */knownRepositories = Arrays
+				.asList(KnownRepositories.getInstance().getRepositories());
+
+		if (knownRepositories.isEmpty()) {
+			// There are no known repositories so use repository location from
+			// the project set.
+			Map result = new HashMap();
+			for (Iterator i = projectSetRepositoryLocations.iterator(); i
+					.hasNext();) {
+				ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) i
+						.next();
+				ArrayList list = new ArrayList(1);
+				list.add(projectSetRepositoryLocation);
+				result.put(projectSetRepositoryLocation, list);
+			}
+			return result;
+		} else if (knownRepositories.containsAll(projectSetRepositoryLocations)) {
+			// All repositories are known, no need to prompt for additional
+			// information.
+			return Collections.EMPTY_MAP;
+		} else {
+			// Not all repositories from the project set are known.
+			Map result = new HashMap();
+
+			for (Iterator i = projectSetRepositoryLocations.iterator(); i
+					.hasNext();) {
+				ICVSRepositoryLocation projectSetRepositoryLocation = (ICVSRepositoryLocation) i
+						.next();
+
+				List matching = new ArrayList();
+				List compatible = new ArrayList();
+				List list = new ArrayList();
+				for (Iterator j = knownRepositories.iterator(); j.hasNext();) {
+					ICVSRepositoryLocation knownRepositoryLocation = (ICVSRepositoryLocation) j
+							.next();
+					// There can be more than one perfect match (i.e. two
+					// known, matching repositories with different user names)
+					if (CVSRepositoryLocationMatcher.isMatching(
+							projectSetRepositoryLocation,
+							knownRepositoryLocation)) {
+						matching.add(knownRepositoryLocation);
+					} else if (CVSRepositoryLocationMatcher.isCompatible(
+							knownRepositoryLocation,
+							projectSetRepositoryLocation, false)) {
+						compatible.add(knownRepositoryLocation);
+					} else {
+						list.add(knownRepositoryLocation);
+					}
+				}
+
+				// Sort compatible repository locations starting from extssh,
+				// followed by pserver and finally ext.
+				Collections.sort(compatible, COMPATIBLE_LOCATIONS_COMPARATOR);
+
+				// Add compatible repos before others
+				list.addAll(0, compatible);
+
+				if (matching.isEmpty()) {
+					// If no matching repo locations found add the one
+					// from the project set first.
+					list.add(0, projectSetRepositoryLocation);
+				} else if (matching.size() == 1) {
+					// There is only one matching, known repository
+					// so there is no need to ask for any additional info.
+					// Don't add it to the 'resultMap'
+					list.clear();
+					list.addAll(matching);
+					result.put(projectSetRepositoryLocation, list);
+					continue;
+				} else {
+					// There is more than one matching, known repository, so
+					// ask which one we should use during the import
+					list.addAll(0, matching);
+				}
+
+				result.put(projectSetRepositoryLocation, list);
+			}
+			return result;
+		}
+	}
+
+	/**
+	 * Same check as in
+	 * org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage class.
+	 * 
+	 * @see org.eclipse.team.internal.ccvs.ui.CVSProjectPropertiesPage#isCompatible
+	 * 
+	 * @param location1
+	 *            First repository location to match
+	 * @param location2
+	 *            Second repository location to match
+	 * @param equalIsCompatible
+	 *            If equal means compatible
+	 * @return <code>true</code> if given repository location are compatible,
+	 *         otherwise <code>false</code> is returned.
+	 */
+	public static boolean isCompatible(ICVSRepositoryLocation location1,
+			ICVSRepositoryLocation location2, boolean equalIsCompatible) {
+		if (!location1.getHost().equals(location2.getHost()))
+			return false;
+		if (!location1.getRootDirectory().equals(location2.getRootDirectory()))
+			return false;
+		if (!equalIsCompatible && location1.equals(location2))
+			return false;
+		return true;
+	}
+
+	/**
+	 * Checks whether two repository locations match (i.e. they are compatible,
+	 * they use the same connection method and they use the same port) .
+	 * 
+	 * @param location1
+	 *            First repository location to match
+	 * @param location2
+	 *            Second repository location to match
+	 * @return <code>true</code> if given repository location are matching
+	 *         according to the rule above, otherwise <code>false</code> is
+	 *         returned.
+	 */
+	public static boolean isMatching(ICVSRepositoryLocation location1,
+			ICVSRepositoryLocation location2) {
+		if (isCompatible(location1, location2, true)
+				&& location2.getMethod() == location1.getMethod()
+				&& location2.getPort() == location1.getPort())
+			return true;
+		return false;
+	}
+
+	static boolean isPromptRequired(Map suggestedRepositoryLocations) {
+		if (suggestedRepositoryLocations == null)
+			return false;
+		for (Iterator i = suggestedRepositoryLocations.values().iterator(); i
+				.hasNext();) {
+			List list = (List) i.next();
+			if (!list.isEmpty())
+				return true;
+		}
+		return false;
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
index 8cc60f5..94588c0 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTag.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,8 +33,9 @@ public class CVSTag implements ITag {
 	public static final CVSTag BASE = new CVSTag("BASE", VERSION); //$NON-NLS-1$
 	
 	protected String name;
+	protected String branchNumber;
 	protected int type;
-	
+
 	private static final String DATE_TAG_NAME_FORMAT = "dd MMM yyyy HH:mm:ss Z";//$NON-NLS-1$
 	private static final SimpleDateFormat tagNameFormat = new SimpleDateFormat(DATE_TAG_NAME_FORMAT, Locale.US);
 	protected static synchronized String dateToTagName(Date date){
@@ -60,6 +61,13 @@ public class CVSTag implements ITag {
 		this.name = name;
 		this.type = type;
 	}
+
+	public CVSTag(String name, String branchNumber, int type) {		
+		this.name = name;
+		this.branchNumber = branchNumber;
+		this.type = type;
+	}
+
 	//Write a date in local date tag format
 	public CVSTag(Date date) {
 		this(dateToTagName(date), DATE);
@@ -79,6 +87,10 @@ public class CVSTag implements ITag {
 		return name;
 	}
 
+	public String getBranchNumber() {
+		return branchNumber;
+	}
+
 	public int getType() {
 		// TODO: getType() will not return accurate types for Tags retrieved from the local CVS Entries file.  See Bug: 36758
 		return type;
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
index 5be340a..d6bba4f 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSTeamProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -492,12 +492,12 @@ public class CVSTeamProvider extends RepositoryProvider {
 	 * Checkout (cvs edit) the provided resources so they can be modified locally and committed.
 	 * This will make any read-only resources in the list writable and will notify the server
 	 * that the file is being edited. This notification may be done immediately or at some 
-	 * later point depending on whether contact with the server is possble at the time of 
+	 * later point depending on whether contact with the server is possible at the time of 
 	 * invocation or the value of the notify server parameter.
 	 * 
 	 * The recurse parameter is equivalent to the cvs local options -l (<code>true</code>) and 
 	 * -R (<code>false</code>). The notifyServer parameter can be used to defer server contact
-	 * until the next command. This may be approrpiate if no shell or progress monitor is available
+	 * until the next command. This may be appropriate if no shell or progress monitor is available
 	 * to the caller. The notification bit field indicates what temporary watches are to be used while
 	 * the file is being edited. The possible values that can be ORed together are ICVSFile.EDIT, 
 	 * ICVSFile.UNEDIT and ICVSFile.COMMIT. There pre-ORed convenience values ICVSFile.NO_NOTIFICATION
@@ -538,15 +538,15 @@ public class CVSTeamProvider extends RepositoryProvider {
 	}
 	
 	/**
-	 * Unedit the given resources. Any writtable resources will be reverted to their base contents
+	 * Unedit the given resources. Any writable resources will be reverted to their base contents
 	 * and made read-only and the server will be notified that the file is no longer being edited.
 	 * This notification may be done immediately or at some 
-	 * later point depending on whether contact with the server is possble at the time of 
+	 * later point depending on whether contact with the server is possible at the time of 
 	 * invocation or the value of the notify server parameter.
 	 * 
 	 * The recurse parameter is equivalent to the cvs local options -l (<code>true</code>) and 
 	 * -R (<code>false</code>). The notifyServer parameter can be used to defer server contact
-	 * until the next command. This may be approrpiate if no shell or progress monitor is available
+	 * until the next command. This may be appropriate if no shell or progress monitor is available
 	 * to the caller.
 	 * 
 	 * @param resources the resources to be unedited
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
index b4063e8..0e84908 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,9 +163,10 @@ public class LogListener extends CommandOutputListener {
     			// get the author name
     			int endOfAuthorIndex = line.indexOf(';', endOfDateIndex + 1);
     			author = internAndCopyString(line.substring(endOfDateIndex + 11, endOfAuthorIndex));
-    
+
     			// get the file state (because this revision might be "dead")
-    			fileState = internAndCopyString(line.substring(endOfAuthorIndex + 10, line.indexOf(';', endOfAuthorIndex + 1)));
+    			int endOfStateIndex = line.indexOf(';', endOfAuthorIndex + 1) < 0 ? line.length() : line.indexOf(';', endOfAuthorIndex + 1);
+    			fileState = internAndCopyString(line.substring(endOfAuthorIndex + 10, endOfStateIndex));
     			comment = new StringBuffer();
     			state = COMMENT;
     			break;
@@ -197,8 +198,9 @@ public class LogListener extends CommandOutputListener {
     			
     			if (tagRevision.equals(revision) ||
     				revision.equals(BRANCH_REVISION)) {
+    				String branchNumber = version.getBranchNumber();
     				int type = version.isBranch() ? CVSTag.BRANCH : CVSTag.VERSION;
-    				thisRevisionTags.add(new CVSTag(tagName, type));
+    				thisRevisionTags.add(new CVSTag(tagName, branchNumber, type));
     				if (revision.equals(BRANCH_REVISION)){
     					//also record the tag revision
     					revisionVersions.add(tagRevision);
@@ -268,6 +270,7 @@ public class LogListener extends CommandOutputListener {
     private static class VersionInfo {
 		private final boolean isBranch;
 		private String tagRevision;
+		private String branchNumber;
 		private final String tagName;
 		
     	public VersionInfo(String version, String tagName) {
@@ -284,10 +287,11 @@ public class LogListener extends CommandOutputListener {
 						lastDot = lastDot - 2;
 					}
 					tagRevision = version.substring(0, lastDot);
+					branchNumber = version.substring(lastDot+1);
 				}
 			}
     	}
-    	
+
 		public String getTagName() {
 			return this.tagName;
 		}
@@ -320,5 +324,9 @@ public class LogListener extends CommandOutputListener {
         	if (tagName.charAt(lastDot - 1) == '0' && tagName.charAt(lastDot - 2) == '.') return true;
         	return false;
         }
+
+		public String getBranchNumber() {
+			return branchNumber;
+		}
     }
 }
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
index ec007f7..e67fa28 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/CVSRepositoryLocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1019,9 +1019,13 @@ public class CVSRepositoryLocation extends PlatformObject implements ICVSReposit
 		try {
 			node.put(USERNAME_KEY, username, false);
 			node.put(PASSWORD_KEY, password, true);
+			node.flush();
 		} catch (StorageException e) {
 			CVSProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
 			return false;
+		} catch (IOException e) {
+			CVSProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
+			return false;
 		}
 		return true;
 	}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
index 3203305..7897e83 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderMemberFetcher.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ccvs.core.resources;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
@@ -25,7 +23,7 @@ import org.eclipse.team.internal.ccvs.core.util.Util;
 
 /**
  * Fetch the children for the given parent folder. When fetchMembers is invoked,
- * the children of the folder will be fecthced from the server and assigned to
+ * the children of the folder will be fetched from the server and assigned to
  * the children of the parent folder.
  */
 public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatusListener {
@@ -155,7 +153,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 			throw new CVSException(notExistStatus); 
 		}
 		
-		// Report any internal exceptions that occured fetching the members
+		// Report any internal exceptions that occurred fetching the members
 		if ( ! exceptions.isEmpty()) {
 			if (exceptions.size() == 1) {
 				throw (CVSException)exceptions.get(0);
@@ -237,7 +235,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 	}
 	
 	/**
-	 * This method is invoked for each child folder as the reponses are being recieved from
+	 * This method is invoked for each child folder as the responses are being received from
 	 * the server. Default behavior is to record the folder for later retrieval using <code>getChilren()</code>. 
 	 * Subclasses may override but should invoke the inherited method to ensure the folder gets recorded.
 	 * @param name the name of the child folder
@@ -253,10 +251,10 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 	}
 
 	/**
-	 * This method is invoked for each child file as the reponses are being recieved from
+	 * This method is invoked for each child file as the responses are being received from
 	 * the server. Default behavior is to record the file for later retrieval using <code>getChildren()</code>. 
 	 * Subclasses may override but should invoke the inherited method to ensure the file gets recorded.
-	 * This is important because the file revisions for any files are fetched subsequent to the fecthing
+	 * This is important because the file revisions for any files are fetched subsequent to the fetching
 	 * of the children.
 	 * @param name the name of the child folder
 	 */
@@ -273,7 +271,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 	}
 	
 	/**
-	 * This method is invoked to indicate that the parent beig queried for children
+	 * This method is invoked to indicate that the parent being queried for children
 	 * does not exist. Subclasses may override to get early notification of this but 
 	 * should still invoke the inherited method.
 	 */
@@ -283,7 +281,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 
 	/**
 	 * Update the parent folder such that it's children are the
-	 * children that have been fecthed by the reciever.
+	 * children that have been fetched by the receiver.
 	 */
 	protected void updateParentFolderChildren() {
 		parentFolder.setChildren(getFetchedChildren());
@@ -298,7 +296,7 @@ public class RemoteFolderMemberFetcher implements IUpdateMessageListener, IStatu
 	}
 	
 	/**
-	 * Return an array of all fecthed children.
+	 * Return an array of all fetched children.
 	 * @return
 	 */
 	public ICVSRemoteResource[] getFetchedChildren() {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
index 39ececc..4af0c8a 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -279,7 +279,7 @@ public class CVSResourceVariantTree extends ResourceVariantTree {
 	 * such as members that are explicitly flagged as not having a resource variant. This list
 	 * is used by the collection algorithm to flush variants for which there is no local and
 	 * no remote.
-	 * @param local the locla resource
+	 * @param local the local resource
 	 * @return the local children that have resource variant information cached
 	 * @throws TeamException
 	 */
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
index 3593507..06a3aec 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,7 +61,7 @@ public class ResourceSyncInfo {
 	private static final String LOCKEDBY_SUFFIX = "\tlocked by"; //$NON-NLS-1$
 
 	// a sync element with a revision of '0' is considered a new file that has
-	// not been comitted to the repo. Is visible so that clients can create sync infos
+	// not been committed to the repo. Is visible so that clients can create sync infos
 	// for new files.
 	public static final String ADDED_REVISION = "0"; //$NON-NLS-1$
 	
@@ -196,7 +196,7 @@ public class ResourceSyncInfo {
 	
 	/**
 	 * Answers if this sync information is for a file that is scheduled to be deleted
-	 * from the repository but the deletion has not yet been comitted.
+	 * from the repository but the deletion has not yet been committed.
 	 * 
 	 * @return <code>true</code> if the sync information is deleted or <code>false</code> if 
 	 * the sync is for an file that exists remotely.
diff --git a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
index c64b540..2748cc0 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,14 +50,14 @@ public class SyncFileWriter {
 	public static final String IGNORE_FILE = ".cvsignore"; //$NON-NLS-1$
 
 	// Some older CVS clients may of added a line to the entries file consisting
-	// of only a 'D'. It is safe to ingnore these entries.	
+	// of only a 'D'. It is safe to ignore these entries.	
 	private static final String FOLDER_TAG="D"; //$NON-NLS-1$
 	
 	// Command characters found in the Entries.log file
 	private static final String ADD_TAG="A "; //$NON-NLS-1$
 	private static final String REMOVE_TAG="R "; //$NON-NLS-1$	
 	
-	// key for saving the mod stamp for each writen meta file
+	// key for saving the mod stamp for each written meta file
 	public static final QualifiedName MODSTAMP_KEY = new QualifiedName("org.eclipse.team.cvs.core", "meta-file-modtime"); //$NON-NLS-1$ //$NON-NLS-2$
 	
 	/**
@@ -246,7 +246,7 @@ public class SyncFileWriter {
 			// write CVS/Entries.Static
 			IFile staticFile = cvsSubDir.getFile(STATIC);
 			if(info.getIsStatic()) {
-				// the existance of the file is all that matters
+				// the existence of the file is all that matters
 				if (Policy.DEBUG_METAFILE_CHANGES) {
 					System.out.println("Writing Static file for " + folder.getFullPath()); //$NON-NLS-1$
 				}
@@ -304,7 +304,7 @@ public class SyncFileWriter {
 	}	
 
 	/**
-	 * Delete folder sync is equilavent to removing the CVS subdir.
+	 * Delete folder sync is equivalent to removing the CVS subdir.
 	 */
 	public static void deleteFolderSync(IContainer folder) throws CVSException {		
 		try {
@@ -357,7 +357,7 @@ public class SyncFileWriter {
 	public static void writeAllNotifyInfo(IContainer parent, NotifyInfo[] infos) throws CVSException {
 		// get the CVS directory
 		IFolder cvsSubDir = getCVSSubdirectory(parent);
-		// write lines will throw an exception if the CVS directoru does not exist
+		// write lines will throw an exception if the CVS directory does not exist
 		
 		if (infos.length == 0) {
 			// if there are no notify entries, delete the notify file
@@ -529,10 +529,13 @@ public class SyncFileWriter {
 			}
 		}
 		
-	    File ioFile = file.getLocation().toFile();
-	    if (ioFile != null && ioFile.exists()) {
-	        return new FileInputStream(ioFile);
-	    }
+		IPath location = file.getLocation();
+		if (location != null) {
+			File ioFile = location.toFile();
+			if (ioFile != null && ioFile.exists()) {
+				return new FileInputStream(ioFile);
+			}
+		}
 
 		return null;
 	}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/.classpath b/eclipse/plugins/org.eclipse.team.cvs.ssh/.classpath
deleted file mode 100644
index ce73933..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/.options b/eclipse/plugins/org.eclipse.team.cvs.ssh/.options
deleted file mode 100644
index d90ae7c..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/.options
+++ /dev/null
@@ -1,7 +0,0 @@
-# Debugging options for the org.eclipse.team.cvs.ssh plugin.
-
-# Turn on debugging for the plugin.
-org.eclipse.team.cvs.ssh/debug=false
-
-# Shows ssh protocol messages
-org.eclipse.team.cvs.ssh/ssh_protocol=false
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/.project b/eclipse/plugins/org.eclipse.team.cvs.ssh/.project
deleted file mode 100644
index ee32c8e..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.eclipse.team.cvs.ssh</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-	</natures>
-</projectDescription>
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0003ce7..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Wed Mar 15 16:55:04 EST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index a173ae6..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Mar 15 16:55:04 EST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF
deleted file mode 100644
index 0415b1a..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.team.cvs.ssh
-Bundle-Version: 3.2.100.qualifier
-Bundle-Activator: org.eclipse.team.internal.ccvs.ssh.SSHPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.team.internal.ccvs.ssh;x-friends:="org.eclipse.team.cvs.ssh2"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.cvs.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.team.core;bundle-version="[3.2.0,4.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/about.html b/eclipse/plugins/org.eclipse.team.cvs.ssh/about.html
deleted file mode 100644
index 32d78aa..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/about.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>October 30, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>The Java (TM) Ssh Applet</h4>
-<p>The following classes:</p>
-
-<ul>
-    <li>Cipher</li>
-    <li>Client</li>
-    <li>ClientPacket</li>
-    <li>KnownHosts</li>
-    <li>Misc</li>
-    <li>Packet</li>
-    <li>Policy</li>
-    <li>ServerPacket</li>
-    <li>SSHMethod</li>
-    <li>SSHPlugin</li>
-    <li>SSHServerConnection</li>
-</ul>
-
-<p>and the following files:</p>
-
-<ul>
-    <li>messages.properties</li>
-</ul>
-
-<p>are located in the package org.eclipse.team.internal.ccvs.ssh in the plug-in JAR and are based on "The Java SSh Applet" developed by Cedric Gourio.  The Java Ssh Applet includes the following copyright notice which must be included in any redistribution:</p>
-
-<blockquote>
-    Copyright (c) 1998 Cedric Gourio<br>
-    (<a href="http://www.math.ucdavis.edu/~bill/java/ssh/">http://www.math.ucdavis.edu/~bill/java/ssh/</a>)<br>
-    (<a href="mailto:javassh at france-mail.com">javassh at france-mail.com</a>)
-
-	<p>This program is FREE FOR COMMERCIAL AND NON-COMMERCIAL USE.<br>
-	You can freely modify the code.</p>
-
-	<p>You should however include this copyright notice in any redistribution<br> 
-	and please keep in touch with the author for any feedback.</p>
-</blockquote>
-
-<h4>The Blowfish Encryption Algorithm</h4>
-<p>The following classes in the package org.eclipse.team.internal.ccvs.ssh in the plug-in JAR are based on an algorithm developed by Bruce Schneier.
-The algorithm was originally published in a paper that is located at <a href="http://www.counterpane.com/bfsverlag.html">http://www.counterpane.com/bfsverlag.html</a>.
-Your use of the Blowfish Encryption Algorithm in both source and binary code form contained in the plug-in is not subject to any
-additional terms and conditions:</p>
-
-<ul>
-    <li>Blowfish</li>
-</ul>
-
-<h3>Cryptography</h3>
-
-<h4>Export Control</h4>
-<p>The plug-in contains encryption software.  The country in which you are currently may have restrictions on the import, possession,
-and use, and/or re-export to another country, of encryption software.  BEFORE using any encryption software, please check the country's
-laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this
-is permitted.</p>
-
-<h4>Encryption Items</h4>
-
-<p>Details of the encryption software in this plug-in are provided to assist in obtaining relevant export control classification and approval.
-Cryptography in this plug-in has been deemed eligible by the U.S. Government Department of Commerce for export under License Exception Technology Software Unrestricted (TSU) for both object code and source code.</p>
-
-<p>The plug-in contains an implementation of the Secure Shell (SSH) protocol that encrypts the network traffic (program code files
-in file versioning systems) between a Concurrent Versions System (CVS) server and a CVS client.  Data is encrypted using the Blowfish algorithm
-which is a 64-bit symmetric cipher that uses a key varying in length from 32 bits to 448 bits.  The RSA PKCS #1 v1.5 key exchange algorithm is
-used to authenticate and exchange keys with a minimum modulus size of 96 bits and a maximum modulus size theoretically unlimited since the
-implementation uses the java.math.BigInteger class which has a maximum positive integer range limited only by the available memory in the computer.
-In practice, the key length is defined by the CVS server with which communication is initiated.</p>
-
-<p>The following Java classes contain encryption items (the plug-in may contain both binary and source code):</p>
-
-<ul>
-	<li>org.eclipse.team.internal.ccvs.ssh.Blowfish</li>
-	<li>org.eclipse.team.internal.ccvs.ssh.Cipher</li>
-	<li>org.eclipse.team.internal.ccvs.ssh.Client</li>
-	<li>org.eclipse.team.internal.ccvs.ssh.ClientPacket</li>
-	<li>org.eclipse.team.internal.ccvs.ssh.Misc</li>
-</ul>		
-
-<small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/build.properties b/eclipse/plugins/org.eclipse.team.cvs.ssh/build.properties
deleted file mode 100644
index 6f55f18..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-# Eclipse build contribution
-source..=src/
-src.includes=about.html
-bin.includes = about.html,\
-               plugin.properties,\
-               .,\
-               .options,\
-               META-INF/
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/plugin.properties b/eclipse/plugins/org.eclipse.team.cvs.ssh/plugin.properties
deleted file mode 100644
index 0fe9f3b..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=CVS SSH Core
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
deleted file mode 100644
index e85f305..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Blowfish.java
+++ /dev/null
@@ -1,1220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-public class Blowfish extends Cipher {
-	private int[] P = new int[18];
-	private int[][] S = new int[4][256];
-
-	private int lastEncipherXL = 0;
-	private int lastEncipherXR = 0;
-	private int lastDecipherXL = 0;
-	private int lastDecipherXR = 0;
-
-	private final static int[] INIT_DATA =
-		{
-			0x243f6a88,
-			0x85a308d3,
-			0x13198a2e,
-			0x03707344,
-			0xa4093822,
-			0x299f31d0,
-			0x082efa98,
-			0xec4e6c89,
-			0x452821e6,
-			0x38d01377,
-			0xbe5466cf,
-			0x34e90c6c,
-			0xc0ac29b7,
-			0xc97c50dd,
-			0x3f84d5b5,
-			0xb5470917,
-			0x9216d5d9,
-			0x8979fb1b,
-			0xd1310ba6,
-			0x98dfb5ac,
-			0x2ffd72db,
-			0xd01adfb7,
-			0xb8e1afed,
-			0x6a267e96,
-			0xba7c9045,
-			0xf12c7f99,
-			0x24a19947,
-			0xb3916cf7,
-			0x0801f2e2,
-			0x858efc16,
-			0x636920d8,
-			0x71574e69,
-			0xa458fea3,
-			0xf4933d7e,
-			0x0d95748f,
-			0x728eb658,
-			0x718bcd58,
-			0x82154aee,
-			0x7b54a41d,
-			0xc25a59b5,
-			0x9c30d539,
-			0x2af26013,
-			0xc5d1b023,
-			0x286085f0,
-			0xca417918,
-			0xb8db38ef,
-			0x8e79dcb0,
-			0x603a180e,
-			0x6c9e0e8b,
-			0xb01e8a3e,
-			0xd71577c1,
-			0xbd314b27,
-			0x78af2fda,
-			0x55605c60,
-			0xe65525f3,
-			0xaa55ab94,
-			0x57489862,
-			0x63e81440,
-			0x55ca396a,
-			0x2aab10b6,
-			0xb4cc5c34,
-			0x1141e8ce,
-			0xa15486af,
-			0x7c72e993,
-			0xb3ee1411,
-			0x636fbc2a,
-			0x2ba9c55d,
-			0x741831f6,
-			0xce5c3e16,
-			0x9b87931e,
-			0xafd6ba33,
-			0x6c24cf5c,
-			0x7a325381,
-			0x28958677,
-			0x3b8f4898,
-			0x6b4bb9af,
-			0xc4bfe81b,
-			0x66282193,
-			0x61d809cc,
-			0xfb21a991,
-			0x487cac60,
-			0x5dec8032,
-			0xef845d5d,
-			0xe98575b1,
-			0xdc262302,
-			0xeb651b88,
-			0x23893e81,
-			0xd396acc5,
-			0x0f6d6ff3,
-			0x83f44239,
-			0x2e0b4482,
-			0xa4842004,
-			0x69c8f04a,
-			0x9e1f9b5e,
-			0x21c66842,
-			0xf6e96c9a,
-			0x670c9c61,
-			0xabd388f0,
-			0x6a51a0d2,
-			0xd8542f68,
-			0x960fa728,
-			0xab5133a3,
-			0x6eef0b6c,
-			0x137a3be4,
-			0xba3bf050,
-			0x7efb2a98,
-			0xa1f1651d,
-			0x39af0176,
-			0x66ca593e,
-			0x82430e88,
-			0x8cee8619,
-			0x456f9fb4,
-			0x7d84a5c3,
-			0x3b8b5ebe,
-			0xe06f75d8,
-			0x85c12073,
-			0x401a449f,
-			0x56c16aa6,
-			0x4ed3aa62,
-			0x363f7706,
-			0x1bfedf72,
-			0x429b023d,
-			0x37d0d724,
-			0xd00a1248,
-			0xdb0fead3,
-			0x49f1c09b,
-			0x075372c9,
-			0x80991b7b,
-			0x25d479d8,
-			0xf6e8def7,
-			0xe3fe501a,
-			0xb6794c3b,
-			0x976ce0bd,
-			0x04c006ba,
-			0xc1a94fb6,
-			0x409f60c4,
-			0x5e5c9ec2,
-			0x196a2463,
-			0x68fb6faf,
-			0x3e6c53b5,
-			0x1339b2eb,
-			0x3b52ec6f,
-			0x6dfc511f,
-			0x9b30952c,
-			0xcc814544,
-			0xaf5ebd09,
-			0xbee3d004,
-			0xde334afd,
-			0x660f2807,
-			0x192e4bb3,
-			0xc0cba857,
-			0x45c8740f,
-			0xd20b5f39,
-			0xb9d3fbdb,
-			0x5579c0bd,
-			0x1a60320a,
-			0xd6a100c6,
-			0x402c7279,
-			0x679f25fe,
-			0xfb1fa3cc,
-			0x8ea5e9f8,
-			0xdb3222f8,
-			0x3c7516df,
-			0xfd616b15,
-			0x2f501ec8,
-			0xad0552ab,
-			0x323db5fa,
-			0xfd238760,
-			0x53317b48,
-			0x3e00df82,
-			0x9e5c57bb,
-			0xca6f8ca0,
-			0x1a87562e,
-			0xdf1769db,
-			0xd542a8f6,
-			0x287effc3,
-			0xac6732c6,
-			0x8c4f5573,
-			0x695b27b0,
-			0xbbca58c8,
-			0xe1ffa35d,
-			0xb8f011a0,
-			0x10fa3d98,
-			0xfd2183b8,
-			0x4afcb56c,
-			0x2dd1d35b,
-			0x9a53e479,
-			0xb6f84565,
-			0xd28e49bc,
-			0x4bfb9790,
-			0xe1ddf2da,
-			0xa4cb7e33,
-			0x62fb1341,
-			0xcee4c6e8,
-			0xef20cada,
-			0x36774c01,
-			0xd07e9efe,
-			0x2bf11fb4,
-			0x95dbda4d,
-			0xae909198,
-			0xeaad8e71,
-			0x6b93d5a0,
-			0xd08ed1d0,
-			0xafc725e0,
-			0x8e3c5b2f,
-			0x8e7594b7,
-			0x8ff6e2fb,
-			0xf2122b64,
-			0x8888b812,
-			0x900df01c,
-			0x4fad5ea0,
-			0x688fc31c,
-			0xd1cff191,
-			0xb3a8c1ad,
-			0x2f2f2218,
-			0xbe0e1777,
-			0xea752dfe,
-			0x8b021fa1,
-			0xe5a0cc0f,
-			0xb56f74e8,
-			0x18acf3d6,
-			0xce89e299,
-			0xb4a84fe0,
-			0xfd13e0b7,
-			0x7cc43b81,
-			0xd2ada8d9,
-			0x165fa266,
-			0x80957705,
-			0x93cc7314,
-			0x211a1477,
-			0xe6ad2065,
-			0x77b5fa86,
-			0xc75442f5,
-			0xfb9d35cf,
-			0xebcdaf0c,
-			0x7b3e89a0,
-			0xd6411bd3,
-			0xae1e7e49,
-			0x00250e2d,
-			0x2071b35e,
-			0x226800bb,
-			0x57b8e0af,
-			0x2464369b,
-			0xf009b91e,
-			0x5563911d,
-			0x59dfa6aa,
-			0x78c14389,
-			0xd95a537f,
-			0x207d5ba2,
-			0x02e5b9c5,
-			0x83260376,
-			0x6295cfa9,
-			0x11c81968,
-			0x4e734a41,
-			0xb3472dca,
-			0x7b14a94a,
-			0x1b510052,
-			0x9a532915,
-			0xd60f573f,
-			0xbc9bc6e4,
-			0x2b60a476,
-			0x81e67400,
-			0x08ba6fb5,
-			0x571be91f,
-			0xf296ec6b,
-			0x2a0dd915,
-			0xb6636521,
-			0xe7b9f9b6,
-			0xff34052e,
-			0xc5855664,
-			0x53b02d5d,
-			0xa99f8fa1,
-			0x08ba4799,
-			0x6e85076a,
-			0x4b7a70e9,
-			0xb5b32944,
-			0xdb75092e,
-			0xc4192623,
-			0xad6ea6b0,
-			0x49a7df7d,
-			0x9cee60b8,
-			0x8fedb266,
-			0xecaa8c71,
-			0x699a17ff,
-			0x5664526c,
-			0xc2b19ee1,
-			0x193602a5,
-			0x75094c29,
-			0xa0591340,
-			0xe4183a3e,
-			0x3f54989a,
-			0x5b429d65,
-			0x6b8fe4d6,
-			0x99f73fd6,
-			0xa1d29c07,
-			0xefe830f5,
-			0x4d2d38e6,
-			0xf0255dc1,
-			0x4cdd2086,
-			0x8470eb26,
-			0x6382e9c6,
-			0x021ecc5e,
-			0x09686b3f,
-			0x3ebaefc9,
-			0x3c971814,
-			0x6b6a70a1,
-			0x687f3584,
-			0x52a0e286,
-			0xb79c5305,
-			0xaa500737,
-			0x3e07841c,
-			0x7fdeae5c,
-			0x8e7d44ec,
-			0x5716f2b8,
-			0xb03ada37,
-			0xf0500c0d,
-			0xf01c1f04,
-			0x0200b3ff,
-			0xae0cf51a,
-			0x3cb574b2,
-			0x25837a58,
-			0xdc0921bd,
-			0xd19113f9,
-			0x7ca92ff6,
-			0x94324773,
-			0x22f54701,
-			0x3ae5e581,
-			0x37c2dadc,
-			0xc8b57634,
-			0x9af3dda7,
-			0xa9446146,
-			0x0fd0030e,
-			0xecc8c73e,
-			0xa4751e41,
-			0xe238cd99,
-			0x3bea0e2f,
-			0x3280bba1,
-			0x183eb331,
-			0x4e548b38,
-			0x4f6db908,
-			0x6f420d03,
-			0xf60a04bf,
-			0x2cb81290,
-			0x24977c79,
-			0x5679b072,
-			0xbcaf89af,
-			0xde9a771f,
-			0xd9930810,
-			0xb38bae12,
-			0xdccf3f2e,
-			0x5512721f,
-			0x2e6b7124,
-			0x501adde6,
-			0x9f84cd87,
-			0x7a584718,
-			0x7408da17,
-			0xbc9f9abc,
-			0xe94b7d8c,
-			0xec7aec3a,
-			0xdb851dfa,
-			0x63094366,
-			0xc464c3d2,
-			0xef1c1847,
-			0x3215d908,
-			0xdd433b37,
-			0x24c2ba16,
-			0x12a14d43,
-			0x2a65c451,
-			0x50940002,
-			0x133ae4dd,
-			0x71dff89e,
-			0x10314e55,
-			0x81ac77d6,
-			0x5f11199b,
-			0x043556f1,
-			0xd7a3c76b,
-			0x3c11183b,
-			0x5924a509,
-			0xf28fe6ed,
-			0x97f1fbfa,
-			0x9ebabf2c,
-			0x1e153c6e,
-			0x86e34570,
-			0xeae96fb1,
-			0x860e5e0a,
-			0x5a3e2ab3,
-			0x771fe71c,
-			0x4e3d06fa,
-			0x2965dcb9,
-			0x99e71d0f,
-			0x803e89d6,
-			0x5266c825,
-			0x2e4cc978,
-			0x9c10b36a,
-			0xc6150eba,
-			0x94e2ea78,
-			0xa5fc3c53,
-			0x1e0a2df4,
-			0xf2f74ea7,
-			0x361d2b3d,
-			0x1939260f,
-			0x19c27960,
-			0x5223a708,
-			0xf71312b6,
-			0xebadfe6e,
-			0xeac31f66,
-			0xe3bc4595,
-			0xa67bc883,
-			0xb17f37d1,
-			0x018cff28,
-			0xc332ddef,
-			0xbe6c5aa5,
-			0x65582185,
-			0x68ab9802,
-			0xeecea50f,
-			0xdb2f953b,
-			0x2aef7dad,
-			0x5b6e2f84,
-			0x1521b628,
-			0x29076170,
-			0xecdd4775,
-			0x619f1510,
-			0x13cca830,
-			0xeb61bd96,
-			0x0334fe1e,
-			0xaa0363cf,
-			0xb5735c90,
-			0x4c70a239,
-			0xd59e9e0b,
-			0xcbaade14,
-			0xeecc86bc,
-			0x60622ca7,
-			0x9cab5cab,
-			0xb2f3846e,
-			0x648b1eaf,
-			0x19bdf0ca,
-			0xa02369b9,
-			0x655abb50,
-			0x40685a32,
-			0x3c2ab4b3,
-			0x319ee9d5,
-			0xc021b8f7,
-			0x9b540b19,
-			0x875fa099,
-			0x95f7997e,
-			0x623d7da8,
-			0xf837889a,
-			0x97e32d77,
-			0x11ed935f,
-			0x16681281,
-			0x0e358829,
-			0xc7e61fd6,
-			0x96dedfa1,
-			0x7858ba99,
-			0x57f584a5,
-			0x1b227263,
-			0x9b83c3ff,
-			0x1ac24696,
-			0xcdb30aeb,
-			0x532e3054,
-			0x8fd948e4,
-			0x6dbc3128,
-			0x58ebf2ef,
-			0x34c6ffea,
-			0xfe28ed61,
-			0xee7c3c73,
-			0x5d4a14d9,
-			0xe864b7e3,
-			0x42105d14,
-			0x203e13e0,
-			0x45eee2b6,
-			0xa3aaabea,
-			0xdb6c4f15,
-			0xfacb4fd0,
-			0xc742f442,
-			0xef6abbb5,
-			0x654f3b1d,
-			0x41cd2105,
-			0xd81e799e,
-			0x86854dc7,
-			0xe44b476a,
-			0x3d816250,
-			0xcf62a1f2,
-			0x5b8d2646,
-			0xfc8883a0,
-			0xc1c7b6a3,
-			0x7f1524c3,
-			0x69cb7492,
-			0x47848a0b,
-			0x5692b285,
-			0x095bbf00,
-			0xad19489d,
-			0x1462b174,
-			0x23820e00,
-			0x58428d2a,
-			0x0c55f5ea,
-			0x1dadf43e,
-			0x233f7061,
-			0x3372f092,
-			0x8d937e41,
-			0xd65fecf1,
-			0x6c223bdb,
-			0x7cde3759,
-			0xcbee7460,
-			0x4085f2a7,
-			0xce77326e,
-			0xa6078084,
-			0x19f8509e,
-			0xe8efd855,
-			0x61d99735,
-			0xa969a7aa,
-			0xc50c06c2,
-			0x5a04abfc,
-			0x800bcadc,
-			0x9e447a2e,
-			0xc3453484,
-			0xfdd56705,
-			0x0e1e9ec9,
-			0xdb73dbd3,
-			0x105588cd,
-			0x675fda79,
-			0xe3674340,
-			0xc5c43465,
-			0x713e38d8,
-			0x3d28f89e,
-			0xf16dff20,
-			0x153e21e7,
-			0x8fb03d4a,
-			0xe6e39f2b,
-			0xdb83adf7,
-			0xe93d5a68,
-			0x948140f7,
-			0xf64c261c,
-			0x94692934,
-			0x411520f7,
-			0x7602d4f7,
-			0xbcf46b2e,
-			0xd4a20068,
-			0xd4082471,
-			0x3320f46a,
-			0x43b7d4b7,
-			0x500061af,
-			0x1e39f62e,
-			0x97244546,
-			0x14214f74,
-			0xbf8b8840,
-			0x4d95fc1d,
-			0x96b591af,
-			0x70f4ddd3,
-			0x66a02f45,
-			0xbfbc09ec,
-			0x03bd9785,
-			0x7fac6dd0,
-			0x31cb8504,
-			0x96eb27b3,
-			0x55fd3941,
-			0xda2547e6,
-			0xabca0a9a,
-			0x28507825,
-			0x530429f4,
-			0x0a2c86da,
-			0xe9b66dfb,
-			0x68dc1462,
-			0xd7486900,
-			0x680ec0a4,
-			0x27a18dee,
-			0x4f3ffea2,
-			0xe887ad8c,
-			0xb58ce006,
-			0x7af4d6b6,
-			0xaace1e7c,
-			0xd3375fec,
-			0xce78a399,
-			0x406b2a42,
-			0x20fe9e35,
-			0xd9f385b9,
-			0xee39d7ab,
-			0x3b124e8b,
-			0x1dc9faf7,
-			0x4b6d1856,
-			0x26a36631,
-			0xeae397b2,
-			0x3a6efa74,
-			0xdd5b4332,
-			0x6841e7f7,
-			0xca7820fb,
-			0xfb0af54e,
-			0xd8feb397,
-			0x454056ac,
-			0xba489527,
-			0x55533a3a,
-			0x20838d87,
-			0xfe6ba9b7,
-			0xd096954b,
-			0x55a867bc,
-			0xa1159a58,
-			0xcca92963,
-			0x99e1db33,
-			0xa62a4a56,
-			0x3f3125f9,
-			0x5ef47e1c,
-			0x9029317c,
-			0xfdf8e802,
-			0x04272f70,
-			0x80bb155c,
-			0x05282ce3,
-			0x95c11548,
-			0xe4c66d22,
-			0x48c1133f,
-			0xc70f86dc,
-			0x07f9c9ee,
-			0x41041f0f,
-			0x404779a4,
-			0x5d886e17,
-			0x325f51eb,
-			0xd59bc0d1,
-			0xf2bcc18f,
-			0x41113564,
-			0x257b7834,
-			0x602a9c60,
-			0xdff8e8a3,
-			0x1f636c1b,
-			0x0e12b4c2,
-			0x02e1329e,
-			0xaf664fd1,
-			0xcad18115,
-			0x6b2395e0,
-			0x333e92e1,
-			0x3b240b62,
-			0xeebeb922,
-			0x85b2a20e,
-			0xe6ba0d99,
-			0xde720c8c,
-			0x2da2f728,
-			0xd0127845,
-			0x95b794fd,
-			0x647d0862,
-			0xe7ccf5f0,
-			0x5449a36f,
-			0x877d48fa,
-			0xc39dfd27,
-			0xf33e8d1e,
-			0x0a476341,
-			0x992eff74,
-			0x3a6f6eab,
-			0xf4f8fd37,
-			0xa812dc60,
-			0xa1ebddf8,
-			0x991be14c,
-			0xdb6e6b0d,
-			0xc67b5510,
-			0x6d672c37,
-			0x2765d43b,
-			0xdcd0e804,
-			0xf1290dc7,
-			0xcc00ffa3,
-			0xb5390f92,
-			0x690fed0b,
-			0x667b9ffb,
-			0xcedb7d9c,
-			0xa091cf0b,
-			0xd9155ea3,
-			0xbb132f88,
-			0x515bad24,
-			0x7b9479bf,
-			0x763bd6eb,
-			0x37392eb3,
-			0xcc115979,
-			0x8026e297,
-			0xf42e312d,
-			0x6842ada7,
-			0xc66a2b3b,
-			0x12754ccc,
-			0x782ef11c,
-			0x6a124237,
-			0xb79251e7,
-			0x06a1bbe6,
-			0x4bfb6350,
-			0x1a6b1018,
-			0x11caedfa,
-			0x3d25bdd8,
-			0xe2e1c3c9,
-			0x44421659,
-			0x0a121386,
-			0xd90cec6e,
-			0xd5abea2a,
-			0x64af674e,
-			0xda86a85f,
-			0xbebfe988,
-			0x64e4c3fe,
-			0x9dbc8057,
-			0xf0f7c086,
-			0x60787bf8,
-			0x6003604d,
-			0xd1fd8346,
-			0xf6381fb0,
-			0x7745ae04,
-			0xd736fccc,
-			0x83426b33,
-			0xf01eab71,
-			0xb0804187,
-			0x3c005e5f,
-			0x77a057be,
-			0xbde8ae24,
-			0x55464299,
-			0xbf582e61,
-			0x4e58f48f,
-			0xf2ddfda2,
-			0xf474ef38,
-			0x8789bdc2,
-			0x5366f9c3,
-			0xc8b38e74,
-			0xb475f255,
-			0x46fcd9b9,
-			0x7aeb2661,
-			0x8b1ddf84,
-			0x846a0e79,
-			0x915f95e2,
-			0x466e598e,
-			0x20b45770,
-			0x8cd55591,
-			0xc902de4c,
-			0xb90bace1,
-			0xbb8205d0,
-			0x11a86248,
-			0x7574a99e,
-			0xb77f19b6,
-			0xe0a9dc09,
-			0x662d09a1,
-			0xc4324633,
-			0xe85a1f02,
-			0x09f0be8c,
-			0x4a99a025,
-			0x1d6efe10,
-			0x1ab93d1d,
-			0x0ba5a4df,
-			0xa186f20f,
-			0x2868f169,
-			0xdcb7da83,
-			0x573906fe,
-			0xa1e2ce9b,
-			0x4fcd7f52,
-			0x50115e01,
-			0xa70683fa,
-			0xa002b5c4,
-			0x0de6d027,
-			0x9af88c27,
-			0x773f8641,
-			0xc3604c06,
-			0x61a806b5,
-			0xf0177a28,
-			0xc0f586e0,
-			0x006058aa,
-			0x30dc7d62,
-			0x11e69ed7,
-			0x2338ea63,
-			0x53c2dd94,
-			0xc2c21634,
-			0xbbcbee56,
-			0x90bcb6de,
-			0xebfc7da1,
-			0xce591d76,
-			0x6f05e409,
-			0x4b7c0188,
-			0x39720a3d,
-			0x7c927c24,
-			0x86e3725f,
-			0x724d9db9,
-			0x1ac15bb4,
-			0xd39eb8fc,
-			0xed545578,
-			0x08fca5b5,
-			0xd83d7cd3,
-			0x4dad0fc4,
-			0x1e50ef5e,
-			0xb161e6f8,
-			0xa28514d9,
-			0x6c51133c,
-			0x6fd5c7e7,
-			0x56e14ec4,
-			0x362abfce,
-			0xddc6c837,
-			0xd79a3234,
-			0x92638212,
-			0x670efa8e,
-			0x406000e0,
-			0x3a39ce37,
-			0xd3faf5cf,
-			0xabc27737,
-			0x5ac52d1b,
-			0x5cb0679e,
-			0x4fa33742,
-			0xd3822740,
-			0x99bc9bbe,
-			0xd5118e9d,
-			0xbf0f7315,
-			0xd62d1c7e,
-			0xc700c47b,
-			0xb78c1b6b,
-			0x21a19045,
-			0xb26eb1be,
-			0x6a366eb4,
-			0x5748ab2f,
-			0xbc946e79,
-			0xc6a376d2,
-			0x6549c2c8,
-			0x530ff8ee,
-			0x468dde7d,
-			0xd5730a1d,
-			0x4cd04dc6,
-			0x2939bbdb,
-			0xa9ba4650,
-			0xac9526e8,
-			0xbe5ee304,
-			0xa1fad5f0,
-			0x6a2d519a,
-			0x63ef8ce2,
-			0x9a86ee22,
-			0xc089c2b8,
-			0x43242ef6,
-			0xa51e03aa,
-			0x9cf2d0a4,
-			0x83c061ba,
-			0x9be96a4d,
-			0x8fe51550,
-			0xba645bd6,
-			0x2826a2f9,
-			0xa73a3ae1,
-			0x4ba99586,
-			0xef5562e9,
-			0xc72fefd3,
-			0xf752f7da,
-			0x3f046f69,
-			0x77fa0a59,
-			0x80e4a915,
-			0x87b08601,
-			0x9b09e6ad,
-			0x3b3ee593,
-			0xe990fd5a,
-			0x9e34d797,
-			0x2cf0b7d9,
-			0x022b8b51,
-			0x96d5ac3a,
-			0x017da67d,
-			0xd1cf3ed6,
-			0x7c7d2d28,
-			0x1f9f25cf,
-			0xadf2b89b,
-			0x5ad6b472,
-			0x5a88f54c,
-			0xe029ac71,
-			0xe019a5e6,
-			0x47b0acfd,
-			0xed93fa9b,
-			0xe8d3c48d,
-			0x283b57cc,
-			0xf8d56629,
-			0x79132e28,
-			0x785f0191,
-			0xed756055,
-			0xf7960e44,
-			0xe3d35e8c,
-			0x15056dd4,
-			0x88f46dba,
-			0x03a16125,
-			0x0564f0bd,
-			0xc3eb9e15,
-			0x3c9057a2,
-			0x97271aec,
-			0xa93a072a,
-			0x1b3f6d9b,
-			0x1e6321f5,
-			0xf59c66fb,
-			0x26dcf319,
-			0x7533d928,
-			0xb155fdf5,
-			0x03563482,
-			0x8aba3cbb,
-			0x28517711,
-			0xc20ad9f8,
-			0xabcc5167,
-			0xccad925f,
-			0x4de81751,
-			0x3830dc8e,
-			0x379d5862,
-			0x9320f991,
-			0xea7a90c2,
-			0xfb3e7bce,
-			0x5121ce64,
-			0x774fbe32,
-			0xa8b6e37e,
-			0xc3293d46,
-			0x48de5369,
-			0x6413e680,
-			0xa2ae0810,
-			0xdd6db224,
-			0x69852dfd,
-			0x09072166,
-			0xb39a460a,
-			0x6445c0dd,
-			0x586cdecf,
-			0x1c20c8ae,
-			0x5bbef7dd,
-			0x1b588d40,
-			0xccd2017f,
-			0x6bb4e3bb,
-			0xdda26a7e,
-			0x3a59ff45,
-			0x3e350a44,
-			0xbcb4cdd5,
-			0x72eacea8,
-			0xfa6484bb,
-			0x8d6612ae,
-			0xbf3c6f47,
-			0xd29be463,
-			0x542f5d9e,
-			0xaec2771b,
-			0xf64e6370,
-			0x740e0d8d,
-			0xe75b1357,
-			0xf8721671,
-			0xaf537d5d,
-			0x4040cb08,
-			0x4eb4e2cc,
-			0x34d2466a,
-			0x0115af84,
-			0xe1b00428,
-			0x95983a1d,
-			0x06b89fb4,
-			0xce6ea048,
-			0x6f3f3b82,
-			0x3520ab82,
-			0x011a1d4b,
-			0x277227f8,
-			0x611560b1,
-			0xe7933fdc,
-			0xbb3a792b,
-			0x344525bd,
-			0xa08839e1,
-			0x51ce794b,
-			0x2f32c9b7,
-			0xa01fbac9,
-			0xe01cc87e,
-			0xbcc7d1f6,
-			0xcf0111c3,
-			0xa1e8aac7,
-			0x1a908749,
-			0xd44fbd9a,
-			0xd0dadecb,
-			0xd50ada38,
-			0x0339c32a,
-			0xc6913667,
-			0x8df9317c,
-			0xe0b12b4f,
-			0xf79e59b7,
-			0x43f5bb3a,
-			0xf2d519ff,
-			0x27d9459c,
-			0xbf97222c,
-			0x15e6fc2a,
-			0x0f91fc71,
-			0x9b941525,
-			0xfae59361,
-			0xceb69ceb,
-			0xc2a86459,
-			0x12baa8d1,
-			0xb6c1075e,
-			0xe3056a0c,
-			0x10d25065,
-			0xcb03a442,
-			0xe0ec6e0e,
-			0x1698db3b,
-			0x4c98a0be,
-			0x3278e964,
-			0x9f1f9532,
-			0xe0d392df,
-			0xd3a0342b,
-			0x8971f21e,
-			0x1b0a7441,
-			0x4ba3348c,
-			0xc5be7120,
-			0xc37632d8,
-			0xdf359f8d,
-			0x9b992f2e,
-			0xe60b6f47,
-			0x0fe3f11d,
-			0xe54cda54,
-			0x1edad891,
-			0xce6279cf,
-			0xcd3e7e6f,
-			0x1618b166,
-			0xfd2c1d05,
-			0x848fd2c5,
-			0xf6fb2299,
-			0xf523f357,
-			0xa6327623,
-			0x93a83531,
-			0x56cccd02,
-			0xacf08162,
-			0x5a75ebb5,
-			0x6e163697,
-			0x88d273cc,
-			0xde966292,
-			0x81b949d0,
-			0x4c50901b,
-			0x71c65614,
-			0xe6c6c7bd,
-			0x327a140a,
-			0x45e1d006,
-			0xc3f27b9a,
-			0xc9aa53fd,
-			0x62a80f00,
-			0xbb25bfe2,
-			0x35bdd2f6,
-			0x71126905,
-			0xb2040222,
-			0xb6cbcf7c,
-			0xcd769c2b,
-			0x53113ec0,
-			0x1640e3d3,
-			0x38abbd60,
-			0x2547adf0,
-			0xba38209c,
-			0xf746ce76,
-			0x77afa1c5,
-			0x20756060,
-			0x85cbfe4e,
-			0x8ae88dd8,
-			0x7aaaf9b0,
-			0x4cf9aa7e,
-			0x1948c25c,
-			0x02fb8a8c,
-			0x01c36ae4,
-			0xd6ebe1f9,
-			0x90d4f869,
-			0xa65cdea0,
-			0x3f09252d,
-			0xc208e69f,
-			0xb74e6132,
-			0xce77e25b,
-			0x578fdfe3,
-			0x3ac372e6 };
-public void decipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
-	int xL = lastDecipherXL;
-	int xR = lastDecipherXR;
-
-	int dataXL;
-	int dataXR;
-
-	int[] xLxR = new int[2];
-
-	for (int i = 0; i < len; i = i + 8) {
-		dataXL = (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
-		dataXR = (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
-		decipher(dataXL, dataXR, xLxR);
-
-		xL ^= xLxR[0];
-		xR ^= xLxR[1];
-
-		dst[dstOff + i] = (byte) (xL & 0xff);
-		dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
-		dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
-		dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
-		dst[dstOff + i + 4] = (byte) (xR & 0xff);
-		dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
-		dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
-		dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
-
-		xL = dataXL;
-		xR = dataXR;
-	}
-
-	lastDecipherXL = xL;
-	lastDecipherXR = xR;
-}
-private void decipher(int xL, int xR, int[] xLxR) {
-	xL ^= P[17];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[16];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[15];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[14];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[13];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[12];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[11];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[10];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[9];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[8];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[7];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[6];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[5];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[4];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[3];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[2];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[1];
-	xR ^= P[0];
-
-	xLxR[0] = xR;
-	xLxR[1] = xL;
-}
-public void encipher(byte[] src, int srcOff, byte[] dst, int dstOff, int len) {
-	int xL = lastEncipherXL;
-	int xR = lastEncipherXR;
-
-	int[] xLxR = new int[2];
-
-	for (int i = 0; i < len; i = i + 8) {
-		xL ^= (src[srcOff + i] & 0xff) | ((src[srcOff + i + 1] & 0xff) << 8) | ((src[srcOff + i + 2] & 0xff) << 16) | ((src[srcOff + i + 3] & 0xff) << 24);
-		xR ^= (src[srcOff + i + 4] & 0xff) | ((src[srcOff + i + 5] & 0xff) << 8) | ((src[srcOff + i + 6] & 0xff) << 16) | ((src[srcOff + i + 7] & 0xff) << 24);
-
-		encipher(xL, xR, xLxR);
-
-		xL = xLxR[0];
-		xR = xLxR[1];
-
-		dst[dstOff + i] = (byte) (xL & 0xff);
-		dst[dstOff + i + 1] = (byte) ((xL >> 8) & 0xff);
-		dst[dstOff + i + 2] = (byte) ((xL >> 16) & 0xff);
-		dst[dstOff + i + 3] = (byte) ((xL >> 24) & 0xff);
-		dst[dstOff + i + 4] = (byte) (xR & 0xff);
-		dst[dstOff + i + 5] = (byte) ((xR >> 8) & 0xff);
-		dst[dstOff + i + 6] = (byte) ((xR >> 16) & 0xff);
-		dst[dstOff + i + 7] = (byte) ((xR >> 24) & 0xff);
-	}
-
-	lastEncipherXL = xL;
-	lastEncipherXR = xR;
-}
-private void encipher(int xL, int xR, int[] xLxR) {
-	xL ^= P[0];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[1];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[2];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[3];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[4];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[5];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[6];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[7];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[8];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[9];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[10];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[11];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[12];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[13];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[14];
-	xR ^= (((S[0][(xL >> 24) & 0xff] + S[1][(xL >> 16) & 0xff]) ^ (S[2][(xL >> 8) & 0xff])) + (S[3][xL & 0xff])) ^ P[15];
-	xL ^= (((S[0][(xR >> 24) & 0xff] + S[1][(xR >> 16) & 0xff]) ^ (S[2][(xR >> 8) & 0xff])) + (S[3][xR & 0xff])) ^ P[16];
-	xR ^= P[17];
-
-	xLxR[0] = xR;
-	xLxR[1] = xL;
-}
-public void setKey(byte key[]) {
-	int data = 0;
-	int offset = 0;
-
-	for (int i = 0; i < P.length; ++i) {
-		P[i] = INIT_DATA[offset++];
-	}
-
-	for (int i = 0; i < S.length; ++i) {
-		for (int j = 0; j < S[i].length; ++j) {
-			S[i][j] = INIT_DATA[offset++];
-		}
-	}
-
-	offset = 0;
-	for (int i = 0; i < P.length; ++i) {
-		data = 0;
-		for (int k = 0; k < 4; ++k) {
-			data = (data << 8) | (key[offset++] & 0xff);
-			if (offset >= key.length) {
-				offset = 0;
-			}
-		}
-		P[i] = P[i] ^ data;
-	}
-
-	int[] lr = new int[] { 0, 0 };
-	for (int i = 0; i < P.length; i += 2) {
-		encipher(lr[0], lr[1], lr);
-		P[i] = lr[0];
-		P[i + 1] = lr[1];
-	}
-
-	for (int i = 0; i < S.length; ++i) {
-		for (int j = 0; j < S[i].length; j += 2) {
-			encipher(lr[0], lr[1], lr);
-			S[i][j] = lr[0];
-			S[i][j + 1] = lr[1];
-		}
-	}
-
-	lastEncipherXL = 0;
-	lastEncipherXR = 0;
-	lastDecipherXL = 0;
-	lastDecipherXR = 0;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java
deleted file mode 100644
index 43b6f35..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/CVSSSHMessages.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others. All rights reserved.   This
- * program and the accompanying materials are made available under the terms of
- * the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import org.eclipse.osgi.util.NLS;
-
-public class CVSSSHMessages extends NLS {
-	private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.ssh.messages";//$NON-NLS-1$
-
-	public static String closed;
-	public static String stream;
-
-	public static String Client_packetType;
-	public static String Client_notConnected;
-	public static String Client_cipher;
-	public static String Client_socketClosed;
-	public static String Client_authenticationFailed;
-	public static String Client_socket;
-	public static String Client_disconnectDescription;
-	public static String Client_noDisconnectDescription;
-	public static String Client_sshProtocolVersion;
-	public static String Client_hostIdChanged;
-	public static String Client_addedHostKey;
-
-	public static String ServerPacket_crc;
-
-	public static String SSHServerConnection_authenticating;
-
-	public static String Misc_missingMD5;
-
-	public static String KnownHosts_8;
-	public static String KnownHosts_9;
-	public static String KnownHosts_10;
-
-	static {
-		// load message values from bundle file
-		NLS.initializeMessages(BUNDLE_NAME, CVSSSHMessages.class);
-	}
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
deleted file mode 100644
index bc58de1..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Cipher.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-public abstract class Cipher {
-public abstract void decipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public abstract void encipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
-public static Cipher getInstance(String algorithm) {
-	try {
-		Class c = Class.forName("org.eclipse.team.internal.ccvs.ssh." + algorithm); //$NON-NLS-1$
-		return (Cipher) c.newInstance();
-	} catch (Exception e) {
-		return null;
-	}
-}
-public abstract void setKey(byte[] key);
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
deleted file mode 100644
index 05ada38..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Client.java
+++ /dev/null
@@ -1,709 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-/**
- * An SSH 1.5 client..
- */
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.math.BigInteger;
-import java.net.Socket;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-import org.eclipse.team.internal.ccvs.core.util.Util;
-import org.eclipse.team.internal.core.streams.PollingInputStream;
-import org.eclipse.team.internal.core.streams.PollingOutputStream;
-import org.eclipse.team.internal.core.streams.TimeoutOutputStream;
-
-public class Client {
-	// client identification string
-	private static final String clientId = "SSH-1.5-Java 1.2.2\n"; //$NON-NLS-1$
-
-	// server identification string
-	private static String serverId = null;
-
-	// maximum outgoing packet size
-	private static final int MAX_CLIENT_PACKET_SIZE = 1024;
-
-	// packet types
-	private static final int SSH_MSG_DISCONNECT = 1;
-	private static final int SSH_SMSG_PUBLIC_KEY = 2;
-	private static final int SSH_CMSG_SESSION_KEY = 3;
-	private static final int SSH_CMSG_USER = 4;
-	private static final int SSH_CMSG_AUTH_PASSWORD = 9;
-	private static final int SSH_CMSG_REQUEST_PTY = 10;
-	private static final int SSH_CMSG_EXEC_SHELL = 12;
-	private static final int SSH_CMSG_EXEC_CMD = 13;
-	private static final int SSH_SMSG_SUCCESS = 14;
-	private static final int SSH_SMSG_FAILURE = 15;
-	private static final int SSH_CMSG_STDIN_DATA = 16;
-	private static final int SSH_SMSG_STDOUT_DATA = 17;
-	private static final int SSH_SMSG_STDERR_DATA = 18;
-	private static final int SSH_SMSG_EXITSTATUS = 20;
-	private static final int SSH_CMSG_EXIT_CONFIRMATION = 33;
-	private static final int SSH_MSG_DEBUG = 36;
-
-	// cipher names
-	private static String[] cipherNames = { "None", "IDEA", "DES", "3DES", "TSS", "RC4", "Blowfish" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
-	// cipher types
-	private static int SSH_CIPHER_BLOWFISH = 6;
-
-	// preferred cipher types
-	private int[] preferredCipherTypes = { SSH_CIPHER_BLOWFISH };
-
-	private String host;
-	private int port;
-	private String username;
-	private String password;
-	private String command;
-
-	private Socket socket;
-	/* package */ InputStream socketIn;
-	private PollingOutputStream socketOut;
-	private InputStream is;
-	private OutputStream os;
-	private boolean connected = false;
-	private int timeout = -1;
-
-	private Cipher cipher = null;
-
-	class StandardInputStream extends InputStream {
-		private ServerPacket packet = null;
-		private InputStream buffer = null;
-		private boolean atEnd = false;
-		private boolean closed = false;
-
-		public int available() throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed); 
-			}
-
-			int available = buffer == null ? 0 : buffer.available();
-
-			if (available == 0 && socketIn.available() > 0) {
-				fill();
-				if (atEnd) {
-					return 0;
-				}
-				available = buffer.available();
-			}
-
-			return available;
-		}
-
-		public void close() throws IOException {
-			if (!closed) {
-				closed = true;
-				if (packet != null) {
-					packet.close(false);
-					buffer = null;
-					packet = null;
-				}
-			}
-		}
-
-		public int read() throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			if (atEnd) {
-				return -1;
-			}
-
-			if (buffer == null || buffer.available() == 0) {
-				fill();
-				if (atEnd) {
-					return -1;
-				}
-			}
-
-			return buffer.read();
-		}
-
-		public int read(byte b[], int off, int len) throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			if (atEnd) {
-				return -1;
-			}
-
-			if (buffer == null || buffer.available() == 0) {
-				fill();
-				if (atEnd) {
-					return -1;
-				}
-			}
-
-			return buffer.read(b, off, len);
-		}
-
-		private void fill() throws IOException {
-			if (buffer != null) {
-				buffer.close();
-			}
-
-			packet = skip_SSH_MSG_DEBUG();
-			int packetType = packet.getType();
-
-			switch (packetType) {
-				case SSH_SMSG_STDOUT_DATA :
-				case SSH_SMSG_STDERR_DATA :
-				case SSH_MSG_DEBUG :
-					buffer = packet.getInputStream();
-					Misc.readInt(buffer);
-					break;
-				case SSH_SMSG_EXITSTATUS :
-					buffer = null;
-					atEnd = true;
-					InputStream pis = packet.getInputStream();
-					Misc.readInt(pis);
-					pis.close();
-					send(SSH_CMSG_EXIT_CONFIRMATION, null);
-					break;
-				case SSH_MSG_DISCONNECT :
-					buffer = null;
-					atEnd = true;
-					handleDisconnect(packet.getInputStream());
-					break;
-				default :
-					throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-			}
-		}
-		
-		private void handleDisconnect(InputStream in) throws IOException {
-			String description = null;
-			try {
-				description = Misc.readString(in);
-			} catch (IOException e) {
-				// ignore
-			} finally {
-				in.close();
-			}
-			
-			// Log the description provided by the server
-			if (description == null) {
-				description = CVSSSHMessages.Client_noDisconnectDescription; 
-			}
-			
-			// Throw an IOException with the proper text
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_disconnectDescription, (new Object[] {description})));
-		}
-	}
-
-	class StandardOutputStream extends OutputStream {
-		private int MAX_BUFFER_SIZE = MAX_CLIENT_PACKET_SIZE;
-		private byte[] buffer = new byte[MAX_BUFFER_SIZE];
-		private int bufpos = 0;
-		private boolean closed = false;
-
-		public void close() throws IOException {
-			if (!closed) {
-				try {
-					flush();
-				} finally {
-					closed = true;
-				}
-			}
-		}
-
-		public void flush() throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			if (bufpos > 0) {
-				send(SSH_CMSG_STDIN_DATA, buffer, 0, bufpos);
-				bufpos = 0;
-			}
-		}
-
-		public void write(int b) throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			buffer[bufpos++] = (byte) b;
-
-			if (bufpos == MAX_BUFFER_SIZE) {
-				flush();
-			}
-		}
-
-		public void write(byte b[], int off, int len) throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed); 
-			}
-
-			int bytesWritten = 0;
-			int totalBytesWritten = 0;
-
-			if (bufpos > 0) {
-				bytesWritten = Math.min(MAX_BUFFER_SIZE - bufpos, len);
-				System.arraycopy(b, off, buffer, bufpos, bytesWritten);
-				bufpos += bytesWritten;
-				totalBytesWritten += bytesWritten;
-
-				if (bufpos == MAX_BUFFER_SIZE) {
-					flush();
-				}
-			}
-
-			while (len - totalBytesWritten >= MAX_BUFFER_SIZE) {
-				send(SSH_CMSG_STDIN_DATA, b, off + totalBytesWritten, MAX_BUFFER_SIZE);
-				totalBytesWritten += MAX_BUFFER_SIZE;
-			}
-
-			if (totalBytesWritten < len) {
-				bytesWritten = len - totalBytesWritten;
-				System.arraycopy(b, off + totalBytesWritten, buffer, 0, bytesWritten);
-				bufpos += bytesWritten;
-			}
-		}
-	}
-public Client(String host, int port, String username, String password) {
-	this.host = host;
-	this.port = port;
-	this.username = username;
-	this.password = password;
-}
-public Client(String host, int port, String username, String password, String command) {
-	this(host, port, username, password);
-	this.command = command;
-}
-public Client(String host, int port, String username, String password, String command, int timeout) {
-	this(host, port, username, password, command);
-	this.timeout = timeout;
-}
-/**
- * Close all streams and sockets.
- */
-private void cleanup() throws IOException {
-	try {
-		if (is != null)
-			is.close();
-	} finally {
-		try {
-			if (os != null)
-				os.close();
-		} finally {
-			try {
-				if (socketIn != null)
-					socketIn.close();
-			} finally {
-				try {
-					if (socketOut != null)
-						socketOut.close();
-				} finally {
-					try {
-						if (socket != null)
-							socket.close();
-					} finally {
-						socket = null;
-					}
-				}
-			}
-		}
-	}
-}
-/**
- * Connect to the remote server. If an exception is thrown, the caller
- * can asssume that all streams and sockets are closed.
- */
-public void connect(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
-	// If we're already connected, just ignore the invokation
-	if (connected || monitor.isCanceled())
-		return;
-		
-	// Otherwise, set up the connection
-	try {
-		PollingInputStream pollingInputStream = null;
-		// Create the socket (the socket should always be null here)
-		if (socket == null) {
-			try {
-				socket = Util.createSocket(host, port, monitor);
-				// Bug 36351: disable buffering and send bytes immediately
-				socket.setTcpNoDelay(true);
-			} catch (InterruptedIOException e) {
-				// If we get this exception, chances are the host is not responding
-				throw new InterruptedIOException(NLS.bind(CVSSSHMessages.Client_socket, (new Object[] {host})));
-
-			}
-			if (timeout >= 0) {
-				socket.setSoTimeout(1000);
-			}
-			pollingInputStream = new PollingInputStream(socket.getInputStream(),
-				timeout > 0 ? timeout : 1, monitor);
-			socketIn = new BufferedInputStream(pollingInputStream);
-			
-			socketOut = new PollingOutputStream(new TimeoutOutputStream(
-				socket.getOutputStream(), 8192 /*bufferSize*/, 1000 /*writeTimeout*/, 1000 /*closeTimeout*/),
-				timeout > 0 ? timeout : 1, monitor);
-		}
-
-		// read the ssh server id. The socket creation may of failed if the
-		// server cannot accept our connection request. We don't expect the
-		// socket to be closed at this point.
-		// Don't allow cancellation during the initial handshake and login since this
-		// can potentially cause the SSH server to think that it is being hacked and
-		// disable the account.		
-		socketOut.setIsCancellable(false /* don't allow cancellation */);
-		pollingInputStream.setIsCancellable(false);
-		StringBuffer buf = new StringBuffer();
-		int c;
-		while ((c = socketIn.read()) != '\n') {
-			if (c == -1)
-				throw new IOException(CVSSSHMessages.Client_socketClosed);
-			buf.append((char) c);
-		}
-		serverId = buf.toString();
-		
-		if (Policy.DEBUG_SSH_PROTOCOL) {
-			System.out.println("SSH > server ID: " + serverId); //$NON-NLS-1$
-			System.out.println("SSH > client ID: " + clientId); //$NON-NLS-1$
-		}
-		
-		if (!serverId.startsWith("SSH-1.")) { //$NON-NLS-1$
-			String sshVersion = (serverId.startsWith("SSH-")? serverId:""); //$NON-NLS-1$ //$NON-NLS-2$
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_sshProtocolVersion, new String[] { sshVersion }));
-		} 
-		
-		// send our id.
-		socketOut.write(clientId.getBytes());
-		socketOut.flush();
-
-		login();
-
-		socketOut.setIsCancellable(true /* allow cancellation */);
-		pollingInputStream.setIsCancellable(true);
-		
-		// start a shell and enter interactive session or start by
-		// executing the given command.
-		if( command == null ) {
-			startShell();
-		} else {
-			executeCommand();
-		}
-
-		is = new StandardInputStream();
-		os = new StandardOutputStream();
-		connected = true;
-	// If an exception occurs while connected, make sure we disconnect before passing the exception on
-	} finally {
-		if (! connected) cleanup();
-	}
-}
-/**
- * Terminate the connection to the server.
- */
-public void disconnect() throws IOException {
-	if (Policy.DEBUG_SSH_PROTOCOL) {
-		System.out.println("Disconnecting."); //$NON-NLS-1$
-	}	
-	if (connected) {
-		connected = false;
-		try {
-			send(SSH_MSG_DISCONNECT, null);
-		} finally {
-			cleanup();
-		}
-	}
-}
-public InputStream getInputStream() throws IOException {
-	if (!connected) {
-		throw new IOException(CVSSSHMessages.Client_notConnected);
-	}
-
-	return is;
-}
-public OutputStream getOutputStream() throws IOException {
-	if (!connected) {
-		throw new IOException(CVSSSHMessages.Client_notConnected);
-	}
-
-	return os;
-}
-
-private void startShell() throws IOException {
-	ServerPacket packet = null;
-	int packetType;
-
-	send_SSH_CMSG_REQUEST_PTY();
-
-	try {
-		packet = skip_SSH_MSG_DEBUG();
-		packetType = packet.getType();
-
-		if (packetType != SSH_SMSG_SUCCESS) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-		}
-	} finally {
-		if (packet != null) {
-			packet.close(true /*perform crc check*/);
-		}
-	}
-
-	send(SSH_CMSG_EXEC_SHELL, null);
-}
-
-private void executeCommand() throws IOException {	
-	send(SSH_CMSG_EXEC_CMD, command);
-}
-
-private void login() throws IOException, CVSAuthenticationException {
-	ServerPacket packet = null;
-	int packetType;
-
-	try {
-		packet = skip_SSH_MSG_DEBUG();
-		packetType = packet.getType();
-
-		if (packetType != SSH_SMSG_PUBLIC_KEY) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-		}
-
-		receive_SSH_SMSG_PUBLIC_KEY(packet);
-	} finally {
-		if (packet != null) {
-			packet.close(true);
-		}
-	}
-
-	try {
-		packet = skip_SSH_MSG_DEBUG();
-		packetType = packet.getType();
-
-		if (packetType != SSH_SMSG_SUCCESS) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-		}
-	} finally {
-		if (packet != null) {
-			packet.close(true);
-		}
-	}
-
-	send(SSH_CMSG_USER, username);
-
-	try {
-		packet = skip_SSH_MSG_DEBUG();
-		packetType = packet.getType();
-
-		if (packetType != SSH_SMSG_FAILURE) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-		}
-	} finally {
-		if (packet != null) {
-			packet.close(true);
-		}
-	}
-
-	send(SSH_CMSG_AUTH_PASSWORD, password);
-
-	try {
-		packet = skip_SSH_MSG_DEBUG();
-		packetType = packet.getType();
-
-		if (packetType == SSH_SMSG_FAILURE) {
-			throw new CVSAuthenticationException(CVSSSHMessages.Client_authenticationFailed, CVSAuthenticationException.RETRY);
-		}
-
-		if (packetType != SSH_SMSG_SUCCESS) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Client_packetType, (new Object[] {new Integer(packetType)})));
-		}
-	} finally {
-		if (packet != null) {
-			packet.close(true);
-		}
-	}
-}
-private void receive_SSH_SMSG_PUBLIC_KEY(ServerPacket packet) throws IOException, CVSAuthenticationException {
-	InputStream pis = packet.getInputStream();
-
-	byte[] anti_spoofing_cookie = new byte[8];
-	Misc.readFully(pis, anti_spoofing_cookie);
-
-	byte[] server_key_bits = new byte[4];
-	Misc.readFully(pis, server_key_bits);
-
-	byte[] server_key_public_exponent = Misc.readMpInt(pis);
-	byte[] server_key_public_modulus = Misc.readMpInt(pis);
-
-	byte[] host_key_bits = new byte[4];
-	Misc.readFully(pis, host_key_bits);
-
-	byte[] host_key_public_exponent = Misc.readMpInt(pis);
-	byte[] host_key_public_modulus = Misc.readMpInt(pis);
-
-	byte[] protocol_flags = new byte[4];
-	Misc.readFully(pis, protocol_flags);
-
-	byte[] supported_ciphers_mask = new byte[4];
-	Misc.readFully(pis, supported_ciphers_mask);
-
-	byte[] supported_authentications_mask = new byte[4];
-	Misc.readFully(pis, supported_authentications_mask);
-
-	pis.close();
-
-	send_SSH_CMSG_SESSION_KEY(anti_spoofing_cookie, host_key_bits, server_key_public_modulus, host_key_public_modulus, supported_ciphers_mask, server_key_public_exponent, host_key_public_exponent);
-}
-void send(int packetType, String s) throws IOException {
-	byte[] data = s == null ? new byte[0] : s.getBytes("UTF-8"); //$NON-NLS-1$
-	send(packetType, data, 0, data.length);
-}
-void send(int packetType, byte[] data, int off, int len) throws IOException {
-	data = data == null ? null : Misc.lengthEncode(data, off, len);
-	ClientPacket packet = new ClientPacket(packetType, data, cipher);
-	socketOut.write(packet.getBytes());
-	socketOut.flush();
-}
-private void send_SSH_CMSG_REQUEST_PTY() throws IOException {
-	byte packet_type = SSH_CMSG_REQUEST_PTY;
-
-	byte[] termType = Misc.lengthEncode("dumb".getBytes(), 0, 4);//$NON-NLS-1$
-	byte[] row = {0, 0, 0, 0};
-	byte[] col = {0, 0, 0, 0};
-	byte[] XPixels = {0, 0, 0, 0};
-	byte[] YPixels = {0, 0, 0, 0};
-	byte[] terminalModes = {0};
-
-	byte[] data = new byte[termType.length + row.length + col.length + XPixels.length + YPixels.length + terminalModes.length];
-
-	int offset = 0;
-	System.arraycopy(termType, 0, data, offset, termType.length);
-
-	offset += termType.length;
-	System.arraycopy(row, 0, data, offset, row.length);
-
-	offset += row.length;
-	System.arraycopy(col, 0, data, offset, col.length);
-
-	offset += col.length;
-	System.arraycopy(XPixels, 0, data, offset, XPixels.length);
-
-	offset += XPixels.length;
-	System.arraycopy(YPixels, 0, data, offset, YPixels.length);
-
-	offset += YPixels.length;
-	System.arraycopy(terminalModes, 0, data, offset, terminalModes.length);
-
-	ClientPacket packet = new ClientPacket(packet_type, data, cipher);
-	socketOut.write(packet.getBytes());
-	socketOut.flush();
-}
-private void send_SSH_CMSG_SESSION_KEY(byte[] anti_spoofing_cookie, byte[] host_key_bits, byte[] server_key_public_modulus, byte[] host_key_public_modulus, byte[] supported_ciphers_mask, byte[] server_key_public_exponent, byte[] host_key_public_exponent) throws IOException, CVSAuthenticationException {
-	byte packet_type = SSH_CMSG_SESSION_KEY;
-
-	// session_id
-	byte[] session_id = new byte[host_key_public_modulus.length + server_key_public_modulus.length + anti_spoofing_cookie.length];
-
-	int offset = 0;
-	System.arraycopy(host_key_public_modulus, 0, session_id, offset, host_key_public_modulus.length);
-
-	offset += host_key_public_modulus.length;
-	System.arraycopy(server_key_public_modulus, 0, session_id, offset, server_key_public_modulus.length);
-
-	offset += server_key_public_modulus.length;
-	System.arraycopy(anti_spoofing_cookie, 0, session_id, offset, anti_spoofing_cookie.length);
-
-	session_id = Misc.md5(session_id);
-
-	// cipher_type
-	byte cipher_type = 0;
-	boolean foundSupportedCipher = false;
-
-	for (int i = 0; i < preferredCipherTypes.length && !foundSupportedCipher; ++i) {
-		cipher_type = (byte) preferredCipherTypes[i];
-		foundSupportedCipher = (supported_ciphers_mask[3] & (byte) (1 << cipher_type)) != 0;
-	}
-
-	if (!foundSupportedCipher) {
-		throw new IOException(CVSSSHMessages.Client_cipher);
-	}
-
-	// session_key
-	byte[] session_key = new byte[32];
-	byte[] session_key_xored = new byte[32];
-	byte[] session_key_encrypted = null;
-
-	Misc.random(session_key, 0, session_key.length, true);
-	System.arraycopy(session_key, 0, session_key_xored, 0, session_key.length);
-	Misc.xor(session_key_xored, 0, session_id, 0, session_key_xored, 0, session_id.length);
-
-	BigInteger host_e = new BigInteger(1, host_key_public_exponent);
-	BigInteger host_n = new BigInteger(1, host_key_public_modulus);
-	if (!new KnownHosts().verifyKey(host, host_key_bits, host_e, host_n)) {
-		throw new CVSAuthenticationException(CVSSSHMessages.Client_hostIdChanged, CVSAuthenticationException.NO_RETRY); 
-	}
-	byte[] result;
-	if (new BigInteger(1,server_key_public_modulus).compareTo(host_n) == -1) {
-		result = Misc.encryptRSAPkcs1(session_key_xored, server_key_public_exponent, server_key_public_modulus);
-		result = Misc.encryptRSAPkcs1(result, host_key_public_exponent, host_key_public_modulus);
-	} else {
-		result = Misc.encryptRSAPkcs1(session_key_xored, host_key_public_exponent, host_key_public_modulus);
-		result = Misc.encryptRSAPkcs1(result, server_key_public_exponent, server_key_public_modulus);	 
-	}
-
-	session_key_encrypted = new byte[result.length + 2];
-	session_key_encrypted[1] = (byte) ((8 * result.length) & 0xff);
-	session_key_encrypted[0] = (byte) (((8 * result.length) >> 8) & 0xff);
-
-	for (int i = 0; i < result.length; i++) {
-		session_key_encrypted[i + 2] = result[i];
-	}
-
-	// protocol_flags
-	byte[] protocol_flags = {0, 0, 0, 0};
-
-	// data
-	byte[] data = new byte[1 + anti_spoofing_cookie.length + session_key_encrypted.length + protocol_flags.length];
-
-	offset = 0;
-	data[offset++] = cipher_type;
-
-	System.arraycopy(anti_spoofing_cookie, 0, data, offset, anti_spoofing_cookie.length);
-
-	offset += anti_spoofing_cookie.length;
-	System.arraycopy(session_key_encrypted, 0, data, offset, session_key_encrypted.length);
-
-	offset += session_key_encrypted.length;
-	System.arraycopy(protocol_flags, 0, data, offset, protocol_flags.length);
-
-	// cipher
-	cipher = Cipher.getInstance(cipherNames[cipher_type]);
-	cipher.setKey(session_key);
-
-	// packet
-	ClientPacket packet = new ClientPacket(packet_type, data, null);
-	socketOut.write(packet.getBytes());
-	socketOut.flush();
-}
-
-ServerPacket skip_SSH_MSG_DEBUG() throws IOException {
-	ServerPacket packet = new ServerPacket(socketIn, cipher);
-	while (packet.getType() == SSH_MSG_DEBUG) {
-		packet.close(true);
-		packet = new ServerPacket(socketIn, cipher);
-	}
-	
-	return packet;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
deleted file mode 100644
index cbeb7fe..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ClientPacket.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-class ClientPacket extends Packet {
-	byte[] packet;
-public ClientPacket(int type, byte[] data, Cipher cipher) {
-	packetLength = data == null ? 5 : data.length + 5;
-	paddingLength = 8 - (packetLength % 8);
-	packetType = type;
-	packet = new byte[4 + paddingLength + packetLength];
-
-	int packetOff = 0;
-	Misc.writeInt(packetLength, packet, packetOff);
-	packetOff += 4;
-
-	if (cipher == null) {
-		for (int i = 0; i < paddingLength; i++) {
-			packet[packetOff++] = 0;
-		}
-	} else {
-		Misc.random(packet, packetOff, paddingLength, false);
-		packetOff += paddingLength;
-	}
-
-	packet[packetOff++] = (byte) packetType;
-
-	if (data != null) {
-		for (int i = 0; i < data.length; ++i) {
-			packet[packetOff++] = data[i];
-		}
-	}
-
-	long crc = Misc.crc32(packet, 4, packet.length - 8, 0);
-	Misc.writeInt((int) crc, packet, packetOff);
-	packetOff += 4;
-
-	if (cipher != null) {
-		cipher.encipher(packet, 4, packet, 4, packet.length - 4);
-	}
-}
-public byte[] getBytes() {
-	return packet;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
deleted file mode 100644
index 3219d06..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * I represent a database of known hosts usually placed in ~/.ssh/known_hosts
- * on Unix/Linux systems.
- * Currently, only RSA keys are supported, as these are the only keys we
- * have to deal with during SSH1 key exchange.
- */
-public class KnownHosts {
-
-	private String filename;
-	
-	public KnownHosts() {
-		this.filename = KnownHosts.defaultFilename();
-	}
-	
-	static String defaultFilename() {
-		if (!Platform.getOS().equals(Platform.OS_LINUX)) return internalFilename();
-		String HOME = System.getProperty("user.home"); //$NON-NLS-1$
-		if (HOME==null) return internalFilename();
-		return HOME+"/.ssh/known_hosts"; //$NON-NLS-1$
-	}
-
-	private static String internalFilename() {
-		return SSHPlugin.getPlugin().getStateLocation().append("known_hosts").toOSString(); //$NON-NLS-1$
-	}
-	
-	/**
-	 * Verify if the public key for the specified host is known.
-	 * If the public key matches, return true.
-	 * If the key does not match, return false.
-	 * If the key is not listed in <code>known_hosts</code>, or
-	 * <code>known_hosts</code> does not exist, assume we are connecting
-	 * to the authentic server, add the key, and return true.
-	 * @param e key exponent
-	 * @param n key modulus
-	 * @return boolean whether the key is correct
-	 */
-	public boolean verifyKey(String hostname, byte[] host_key_bits, BigInteger e, BigInteger n) {
-		FileReader f;
-		BigInteger nbits = new BigInteger(1, host_key_bits);
-		try {
-			f= new FileReader(filename);
-		} catch (FileNotFoundException ex) {
-			createHostFile();
-			addHost(hostname, nbits, e, n);
-			return true;
-		}
-		BufferedReader r = new BufferedReader(f);
-		try {
-			String line;
-			while ((line = r.readLine()) != null) {
-				if (line.trim().length()==0) continue;
-				if (line.startsWith("#")) continue; //$NON-NLS-1$
-				String[] tokens=subStrings(line);
-				if (tokens.length==4 && Character.isDigit(tokens[1].charAt(0)) && tokens[0].equalsIgnoreCase(hostname)) {
-					if (nbits.equals(new BigInteger(tokens[1])) && e.equals(new BigInteger(tokens[2])) && n.equals(new BigInteger(tokens[3]))) {
-						f.close();
-						return true;
-					} else {
-						f.close();
-						return false;
-					}
-				}
-			}
-			f.close();
-			addHost(hostname, nbits, e, n);
-			return true;
-		} catch (IOException ex) {
-			SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_8, ex); 
-			return false;
-		}
-	}
-	
-	/*
-	 * Append the host key information to known_hosts.
-	 * Always assume the file exists.
-	 */
-	void addHost(String hostname, BigInteger key_bits, BigInteger e, BigInteger n) {
-		try {
-			FileWriter w = new FileWriter(defaultFilename(), true);
-			w.write(Character.LINE_SEPARATOR);
-			w.write(hostname + " " + key_bits.toString(10) + " " + e.toString(10) + " " + n.toString(10)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-			w.close();
-			String message = NLS.bind(CVSSSHMessages.Client_addedHostKey, (new String[] {hostname, defaultFilename()})); 
-			SSHPlugin.log(IStatus.INFO, message, null);
-		} catch (IOException ex) {
-			SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_9, ex); 
-		}
-	}
-	
-	/*
-	 * Create the known_hosts file in the default location.
-	 * Fail if the file can not be created (issue a warning in the log).
-	 */
-	void createHostFile() {
-		try {
-			File file = new File(defaultFilename());
-			// Ensure the parent directory exists
-			File parentDir = file.getParentFile();
-			parentDir.mkdirs();
-			// Create the file
-			file.createNewFile();
-		} catch (IOException ee) {
-			SSHPlugin.log(IStatus.ERROR, CVSSSHMessages.KnownHosts_10, ee); 
-		}
-
-	}
-	private static String[] subStrings(String s) {
-		Vector v = subStringsVector(s);
-		String[] substrings = new String[v.size()];
-		v.copyInto(substrings);
-		return substrings;
-	}
-	private static Vector subStringsVector(String s) {
-		Vector v = new Vector();
-		s = s.trim();
-		if (s.length()==0) return v;
-		int first1 = s.indexOf(' ');
-		int first2 = s.indexOf('\t');
-		int first;
-		if ((first1==-1)&&(first2==-1)) first=-1;
-		else if ((first1!=-1)&&(first2!=-1)) first = Math.min(first1, first2);
-		else if (first1!=-1) first=first1; else first=first2;
-		if (first==-1) {
-			v.add(s);
-			return v;
-		}
-		v.add(s.substring(0,first));
-		v.addAll(subStringsVector(s.substring(first+1)));
-		return v;
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
deleted file mode 100644
index 2341e3c..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Misc.java
+++ /dev/null
@@ -1,473 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-import org.eclipse.osgi.util.NLS;
-
-class Misc {
-	private static MessageDigest md5 = null;
-	private static SecureRandom random = null;
-	private static long crc32_tab[] = {
-		0x00000000L,
-		0x77073096L,
-		0xee0e612cL,
-		0x990951baL,
-		0x076dc419L,
-		0x706af48fL,
-		0xe963a535L,
-		0x9e6495a3L,
-		0x0edb8832L,
-		0x79dcb8a4L,
-		0xe0d5e91eL,
-		0x97d2d988L,
-		0x09b64c2bL,
-		0x7eb17cbdL,
-		0xe7b82d07L,
-		0x90bf1d91L,
-		0x1db71064L,
-		0x6ab020f2L,
-		0xf3b97148L,
-		0x84be41deL,
-		0x1adad47dL,
-		0x6ddde4ebL,
-		0xf4d4b551L,
-		0x83d385c7L,
-		0x136c9856L,
-		0x646ba8c0L,
-		0xfd62f97aL,
-		0x8a65c9ecL,
-		0x14015c4fL,
-		0x63066cd9L,
-		0xfa0f3d63L,
-		0x8d080df5L,
-		0x3b6e20c8L,
-		0x4c69105eL,
-		0xd56041e4L,
-		0xa2677172L,
-		0x3c03e4d1L,
-		0x4b04d447L,
-		0xd20d85fdL,
-		0xa50ab56bL,
-		0x35b5a8faL,
-		0x42b2986cL,
-		0xdbbbc9d6L,
-		0xacbcf940L,
-		0x32d86ce3L,
-		0x45df5c75L,
-		0xdcd60dcfL,
-		0xabd13d59L,
-		0x26d930acL,
-		0x51de003aL,
-		0xc8d75180L,
-		0xbfd06116L,
-		0x21b4f4b5L,
-		0x56b3c423L,
-		0xcfba9599L,
-		0xb8bda50fL,
-		0x2802b89eL,
-		0x5f058808L,
-		0xc60cd9b2L,
-		0xb10be924L,
-		0x2f6f7c87L,
-		0x58684c11L,
-		0xc1611dabL,
-		0xb6662d3dL,
-		0x76dc4190L,
-		0x01db7106L,
-		0x98d220bcL,
-		0xefd5102aL,
-		0x71b18589L,
-		0x06b6b51fL,
-		0x9fbfe4a5L,
-		0xe8b8d433L,
-		0x7807c9a2L,
-		0x0f00f934L,
-		0x9609a88eL,
-		0xe10e9818L,
-		0x7f6a0dbbL,
-		0x086d3d2dL,
-		0x91646c97L,
-		0xe6635c01L,
-		0x6b6b51f4L,
-		0x1c6c6162L,
-		0x856530d8L,
-		0xf262004eL,
-		0x6c0695edL,
-		0x1b01a57bL,
-		0x8208f4c1L,
-		0xf50fc457L,
-		0x65b0d9c6L,
-		0x12b7e950L,
-		0x8bbeb8eaL,
-		0xfcb9887cL,
-		0x62dd1ddfL,
-		0x15da2d49L,
-		0x8cd37cf3L,
-		0xfbd44c65L,
-		0x4db26158L,
-		0x3ab551ceL,
-		0xa3bc0074L,
-		0xd4bb30e2L,
-		0x4adfa541L,
-		0x3dd895d7L,
-		0xa4d1c46dL,
-		0xd3d6f4fbL,
-		0x4369e96aL,
-		0x346ed9fcL,
-		0xad678846L,
-		0xda60b8d0L,
-		0x44042d73L,
-		0x33031de5L,
-		0xaa0a4c5fL,
-		0xdd0d7cc9L,
-		0x5005713cL,
-		0x270241aaL,
-		0xbe0b1010L,
-		0xc90c2086L,
-		0x5768b525L,
-		0x206f85b3L,
-		0xb966d409L,
-		0xce61e49fL,
-		0x5edef90eL,
-		0x29d9c998L,
-		0xb0d09822L,
-		0xc7d7a8b4L,
-		0x59b33d17L,
-		0x2eb40d81L,
-		0xb7bd5c3bL,
-		0xc0ba6cadL,
-		0xedb88320L,
-		0x9abfb3b6L,
-		0x03b6e20cL,
-		0x74b1d29aL,
-		0xead54739L,
-		0x9dd277afL,
-		0x04db2615L,
-		0x73dc1683L,
-		0xe3630b12L,
-		0x94643b84L,
-		0x0d6d6a3eL,
-		0x7a6a5aa8L,
-		0xe40ecf0bL,
-		0x9309ff9dL,
-		0x0a00ae27L,
-		0x7d079eb1L,
-		0xf00f9344L,
-		0x8708a3d2L,
-		0x1e01f268L,
-		0x6906c2feL,
-		0xf762575dL,
-		0x806567cbL,
-		0x196c3671L,
-		0x6e6b06e7L,
-		0xfed41b76L,
-		0x89d32be0L,
-		0x10da7a5aL,
-		0x67dd4accL,
-		0xf9b9df6fL,
-		0x8ebeeff9L,
-		0x17b7be43L,
-		0x60b08ed5L,
-		0xd6d6a3e8L,
-		0xa1d1937eL,
-		0x38d8c2c4L,
-		0x4fdff252L,
-		0xd1bb67f1L,
-		0xa6bc5767L,
-		0x3fb506ddL,
-		0x48b2364bL,
-		0xd80d2bdaL,
-		0xaf0a1b4cL,
-		0x36034af6L,
-		0x41047a60L,
-		0xdf60efc3L,
-		0xa867df55L,
-		0x316e8eefL,
-		0x4669be79L,
-		0xcb61b38cL,
-		0xbc66831aL,
-		0x256fd2a0L,
-		0x5268e236L,
-		0xcc0c7795L,
-		0xbb0b4703L,
-		0x220216b9L,
-		0x5505262fL,
-		0xc5ba3bbeL,
-		0xb2bd0b28L,
-		0x2bb45a92L,
-		0x5cb36a04L,
-		0xc2d7ffa7L,
-		0xb5d0cf31L,
-		0x2cd99e8bL,
-		0x5bdeae1dL,
-		0x9b64c2b0L,
-		0xec63f226L,
-		0x756aa39cL,
-		0x026d930aL,
-		0x9c0906a9L,
-		0xeb0e363fL,
-		0x72076785L,
-		0x05005713L,
-		0x95bf4a82L,
-		0xe2b87a14L,
-		0x7bb12baeL,
-		0x0cb61b38L,
-		0x92d28e9bL,
-		0xe5d5be0dL,
-		0x7cdcefb7L,
-		0x0bdbdf21L,
-		0x86d3d2d4L,
-		0xf1d4e242L,
-		0x68ddb3f8L,
-		0x1fda836eL,
-		0x81be16cdL,
-		0xf6b9265bL,
-		0x6fb077e1L,
-		0x18b74777L,
-		0x88085ae6L,
-		0xff0f6a70L,
-		0x66063bcaL,
-		0x11010b5cL,
-		0x8f659effL,
-		0xf862ae69L,
-		0x616bffd3L,
-		0x166ccf45L,
-		0xa00ae278L,
-		0xd70dd2eeL,
-		0x4e048354L,
-		0x3903b3c2L,
-		0xa7672661L,
-		0xd06016f7L,
-		0x4969474dL,
-		0x3e6e77dbL,
-		0xaed16a4aL,
-		0xd9d65adcL,
-		0x40df0b66L,
-		0x37d83bf0L,
-		0xa9bcae53L,
-		0xdebb9ec5L,
-		0x47b2cf7fL,
-		0x30b5ffe9L,
-		0xbdbdf21cL,
-		0xcabac28aL,
-		0x53b39330L,
-		0x24b4a3a6L,
-		0xbad03605L,
-		0xcdd70693L,
-		0x54de5729L,
-		0x23d967bfL,
-		0xb3667a2eL,
-		0xc4614ab8L,
-		0x5d681b02L,
-		0x2a6f2b94L,
-		0xb40bbe37L,
-		0xc30c8ea1L,
-		0x5a05df1bL,
-		0x2d02ef8dL
-	};
-static public long crc32(byte[] b, int off, int len) {
-	return crc32(b, off, len, 0);
-}
-/**
- * Compute the crc	Cyclic Redundancy Check, with the polynomial 0xedb88320,
- * The polynomial is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
- *  We take it "backwards" and put the highest-order term in the lowest-order bit. 
- * The X^32 term is "implied"; the LSB is the X^31 term, etc.  
- * The X^0 term (usually shown as "+1") results in the MSB being 1.
- * so the poly is 0x04c11db7 (used for Ethernet)
- * The buf will be the Padding, Packet type, and Data fields. 
- * The crc is computed before any encryption.
- * R =X^n * M rem P		M message		P polynomial crc	R : crc calculated.
- * T(x) = x^n * M(x)  +  R(x)	property: T rem P = 0
- */
-static public long crc32(byte[] b, int off, int len, long crc32val) {
-	for (int i = 0; i < len; i++) {
-		crc32val = crc32_tab[(int) ((crc32val ^ b[off + i]) & 0xff)] ^ (crc32val >> 8);
-	}
-
-	return crc32val;
-}
-static public byte[] lengthEncode(byte[] b, int off, int len) {
-	byte[] result = new byte[len + 4];
-	writeInt(len, result, 0);
-	System.arraycopy(b, off, result, 4, len);
-	return result;
-}
-static public byte[] readMpInt(InputStream is) throws IOException {
-	int a = is.read();
-	int b = is.read();
-
-	if(a == -1 || b == -1){
-		throw new IOException(CVSSSHMessages.stream);
-	}
-
-	int bits = ((a & 0xFF) << 8) + (b & 0xFF);
-	int bytes = (bits + 7) / 8;
-
-	byte[] result = new byte[bytes];
-
-	readFully(is, result);
-
-	return result;
-}
-public static byte[] md5(byte[] b) throws IOException {
-	if (md5 == null) {
-		try {
-			md5 = MessageDigest.getInstance("MD5");//$NON-NLS-1$
-		} catch (NoSuchAlgorithmException e) {
-			throw new IOException(NLS.bind(CVSSSHMessages.Misc_missingMD5, new String[] { e.getMessage() })); 
-		}
-	}
-
-	return md5.digest(b);
-}
-public static byte[] md5(String s) throws IOException {
-	return md5(s.getBytes());
-}
-public static void readFully(InputStream is, byte[] b) throws IOException {
-	readFully(is, b, 0, b.length);
-}
-public static void readFully(InputStream is, byte[] b, int off, int len) throws IOException {
-	int bytesRead = 0;
-	int totalBytesRead = 0;
-
-	while (totalBytesRead < len) {
-		bytesRead = is.read(b, totalBytesRead + off, len - totalBytesRead);
-
-		if (bytesRead == -1) {
-			throw new IOException(CVSSSHMessages.stream);
-		}
-
-		totalBytesRead += bytesRead;
-	}
-}
-public static int readInt(byte[] arr, int off) {
-	int a = arr[off] & 0xff;
-	int b = arr[off + 1] & 0xff;
-	int c = arr[off + 2] & 0xff;
-	int d = arr[off + 3] & 0xff;
-
-	return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static int readInt(InputStream is) throws IOException {
-	int a = is.read();
-	int b = is.read();
-	int c = is.read();
-	int d = is.read();
-
-	if (a == -1 || b == -1 || c == -1 || d == -1) {
-		throw new IOException(CVSSSHMessages.stream);
-	}
-
-	return (a << 24) + (b << 16) + (c << 8) + d;
-}
-public static String readString(InputStream is) throws IOException {
-	int size = Misc.readInt(is);
-	byte[] buffer = new byte[size];
-	for (int i = 0; i < buffer.length; i++) {
-		int next = is.read();
-		if (next == -1) {
-			throw new IOException(CVSSSHMessages.stream); 
-		} else {
-			buffer[i] = (byte)next;
-		}
-	}
-	return new String(buffer);
-}
-public static void skipFully(InputStream is, long n) throws IOException {
-	while (n != 0) {
-		int b = is.read();
-
-		if (b == -1) {
-			if (n > 0) {
-				throw new IOException(CVSSSHMessages.stream);
-			}
-
-			return;
-		}
-
-		--n;
-	}
-}
-public static void writeInt(int i, byte[] b, int off) {
-	b[off] = (byte) ((i >> 24) & 0xff);
-	b[off + 1] = (byte) ((i >> 16) & 0xff);
-	b[off + 2] = (byte) ((i >> 8) & 0xff);
-	b[off + 3] = (byte) (i & 0xff);
-}
-static public void xor(byte[] src_a, int off_a, byte[] src_b, int off_b, byte[] dst, int dst_off, int len) {
-	for(int i = 0; i < len; ++i){
-		dst[i + dst_off] = (byte) (src_a[i + off_a] ^ src_b[i + off_b]);
-	}
-}
-static public void random(byte[] b, int off, int len, boolean allowZeroBytes) {
-	if (random == null) {
-		try {
-			random = SecureRandom.getInstance("SHA1PRNG");//$NON-NLS-1$
-		} catch (NoSuchAlgorithmException e) {
-			// If SHA1PRNG is not available, just use the default
-			random = new SecureRandom();
-		}
-	}
-
-	for(int i = off; i < off + len; ++i){
-		do {
-			b[i] = (byte) random.nextInt();
-		} while(!allowZeroBytes && b[i] == 0);
-	}
-}
-static public byte[] encryptRSAPkcs1(byte[] data, byte[] public_key_exponent, byte[] public_key_modulus) {
-	byte[] block;
-
-	int offset = 0;
-	block = new byte[public_key_modulus.length];
-	block[offset++] = 0;
-	block[offset++] = 2;
-
-	Misc.random(block, offset, block.length - data.length - 3, false);
-	offset += block.length - data.length - 3;
-
-	block[offset++] = 0;
-
-	for (int i = 0; i < data.length; i++){
-		block[offset++] = data[i];
-	}
-
-	BigInteger m, e, message;
-	byte[] messageByte;
-
-	m = new BigInteger(1, public_key_modulus);
-	e = new BigInteger(1, public_key_exponent);
-	message = new BigInteger(1, block);
-	message = message.modPow(e, m);
-
-	byte[] messageByteTemp = message.toByteArray();
-	messageByte = new byte[public_key_modulus.length];
-
-	int tempOffset = 0;
-	while (messageByteTemp[tempOffset] == 0){
-		tempOffset++;
-	}
-
-	for (int i = messageByte.length - messageByteTemp.length + tempOffset; i < messageByte.length; i++){
-		messageByte[i] = messageByteTemp[tempOffset++];
-	}
-
-	return messageByte;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
deleted file mode 100644
index 94d4726..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Packet.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-class Packet {
-	protected int packetLength;
-	protected int paddingLength;
-	protected int packetType;
-public int getType() {
-	return packetType;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
deleted file mode 100644
index e95a715..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/Policy.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import org.eclipse.core.runtime.Platform;
-
-public class Policy {
-	// debug constants
-	public static boolean DEBUG_SSH_PROTOCOL = false;
-
-	static {
-		// init debug options
-		if (SSHPlugin.getPlugin().isDebugging()) {
-			DEBUG_SSH_PROTOCOL = "true".equalsIgnoreCase(Platform.getDebugOption(SSHPlugin.ID + "/ssh_protocol"));//$NON-NLS-1$ //$NON-NLS-2$
-		}
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
deleted file mode 100644
index 6af5f92..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHMethod.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-
-public class SSHMethod implements IConnectionMethod {
-	/**
-	 * @see IConnectionMethod#getName
-	 */
-	public String getName() {
-		return "extssh";//$NON-NLS-1$
-	}
-	
-	/**
-	 * @see IConnectionMethod#createConnection
-	 */
-	public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) {
-		return new SSHServerConnection(repositoryRoot, password);
-	}
-
-	public void disconnect(ICVSRepositoryLocation location) {
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
deleted file mode 100644
index 1240c48..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHPlugin.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-public class SSHPlugin extends Plugin {
-	
-	public static String ID = "org.eclipse.team.cvs.ssh"; //$NON-NLS-1$
-
-	private static SSHPlugin instance;
-	
-	/**
-	 * Log the given exception along with the provided message and severity indicator
-	 */
-	public static void log(int severity, String message, Throwable e) {
-		getPlugin().getLog().log(new Status(severity, ID, 0, message, e));
-	}
-	
-	/**
-	 * Constructor for SSHPlugin
-	 */
-	public SSHPlugin() {
-		super();	
-		instance = this;
-	}
-	
-	/**
-	 * Method getPlugin.
-	 */
-	public static SSHPlugin getPlugin() {
-		return instance;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
deleted file mode 100644
index 4ea043f..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/SSHServerConnection.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
-import org.eclipse.team.internal.ccvs.core.IServerConnection;
-import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException;
-
-public class SSHServerConnection implements IServerConnection {
-	
-	// command to start remote cvs in server mode
-	private static final String INVOKE_SVR_CMD = "cvs server"; //$NON-NLS-1$
-	
-	private static final int DEFAULT_PORT = 22;
-	
-	// cvs format for the repository (e.g. :extssh:user at host:/home/cvs/repo)
-	private ICVSRepositoryLocation location;
-	
-	// password for user specified in repository location string
-	private String password;
-	
-	// incoming from remote host
-	InputStream inputStream;
-	
-	// outgoing to remote host
-	OutputStream outputStream;
-	
-	// ssh client 
-	Client client;
-
-	public SSHServerConnection(ICVSRepositoryLocation location, String password) {
-		if (password == null) {
-			password = ""; //$NON-NLS-1$
-		}
-		this.location = location;
-		this.password = password;
-	}
-
-	public void close() throws IOException {
-		client.disconnect();
-	}
-	/**
-	 * Returns the <code>InputStream</code> used to read data from the
-	 * server.
-	 */
-	public InputStream getInputStream() {
-		return inputStream;
-	}
-	/**
-	 * Returns the <code>OutputStream</code> used to send data to the
-	 * server.
-	 */
-	public OutputStream getOutputStream() {
-		return outputStream;
-	}
-
-	/**
-	 * Opens the connection and invokes cvs in server mode.
-	 *
-	 * @see Connection.open()
-	 */
-	public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException {
-		monitor.subTask(CVSSSHMessages.SSHServerConnection_authenticating); 
-		monitor.worked(1);
-		String hostname = location.getHost();
-		String username = location.getUsername();
-		int port = location.getPort();
-		if (port == ICVSRepositoryLocation.USE_DEFAULT_PORT)
-			port = DEFAULT_PORT;
-		// create the connection using host, username, and password
-		client = new Client(hostname, port, username, password, INVOKE_SVR_CMD, location.getTimeout());	
-		client.connect(monitor);
-		inputStream = client.getInputStream();
-		outputStream = client.getOutputStream();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
deleted file mode 100644
index d20f827..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/ServerPacket.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ccvs.ssh;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-class ServerPacket extends Packet {
-	private PacketInputStream pis = null;
-
-	private static class PacketInputStream extends FilterInputStream {
-		private static int MAX_BUFFER_SIZE = 1024;
-
-		private byte[] buffer = new byte[MAX_BUFFER_SIZE];
-		private int bufpos = 0;
-		private int buflen = 0;
-		private int bufrem = 0;
-
-		private long remaining = 0;
-		private Cipher cipher = null;
-
-		private long crc = 0;
-		private boolean closed = false;
-
-		public PacketInputStream(InputStream in, long length, Cipher cipher) {
-			super(in);
-
-			this.remaining = length;
-			this.cipher = cipher;
-		}
-
-		public int available() throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			return (int) Math.min(remaining - 4, Integer.MAX_VALUE);
-		}
-
-		public void close() throws IOException {
-			close(true);
-		}
-		
-		public void close(boolean doCrcCheck) throws IOException {
-			if (!closed) {
-				try {					
-					long toRead = doCrcCheck ? remaining - 4 : remaining;			
-					
-					try {
-						Misc.skipFully(this, toRead);
-					} catch(IOException e) {
-						// we tried our best, keep going
-					}
-					
-					if(doCrcCheck) {
-						if ((int) crc != Misc.readInt(buffer, bufpos)) {
-							throw new IOException(CVSSSHMessages.ServerPacket_crc);
-						}
-					}
-				} finally {
-					closed = true;
-				}
-			}
-		}
-		
-		private void fill() throws IOException {
-			if (bufrem > 0) {
-				System.arraycopy(buffer, bufpos, buffer, 0, bufrem);
-			}
-
-			int totalBytesRead = bufrem;
-			int read = 0;
-			int toRead = (int)Math.min(remaining - totalBytesRead, MAX_BUFFER_SIZE - totalBytesRead);
-
-			while (toRead > 0) {
-				read = in.read(buffer, totalBytesRead, toRead);
-
-				if (read == -1) {
-					throw new IOException(CVSSSHMessages.stream);
-				}
-
-				totalBytesRead += read;
-				toRead -= read;
-			}
-
-			bufpos = 0;
-			
-			buflen = (totalBytesRead / 8) * 8;
-			bufrem = totalBytesRead - buflen;
-
-			if (cipher != null) {
-				cipher.decipher(buffer, 0, buffer, 0, buflen);
-			}
-			
-			crc = Misc.crc32(buffer, 0, buflen == remaining ? buflen - 4 : buflen, crc);
-		}
-
-		public int read() throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			if (remaining - 4 == 0) {
-				return -1;
-			}
-
-			if (bufpos == buflen) {
-				fill();
-			}
-
-			int b = buffer[bufpos] & 0xff;
-
-			++bufpos;
-			--remaining;
-
-			return b;
-		}
-
-		public int read(byte b[], int off, int len) throws IOException {
-			if (closed) {
-				throw new IOException(CVSSSHMessages.closed);
-			}
-
-			if (remaining - 4 == 0) {
-				return -1;
-			}
-
-			if (bufpos == buflen) {
-				fill();
-			}
-
-			len = Math.min(len, (buflen == remaining + bufpos ? buflen - 4 : buflen) - bufpos);
-
-			System.arraycopy(buffer, bufpos, b, off, len);
-
-			bufpos += len;
-			remaining -= len;
-
-			return len;
-		}
-	}
-public ServerPacket(InputStream is, Cipher cipher) throws java.io.IOException {
-	packetLength = Misc.readInt(is);
-	paddingLength = 8 - (packetLength % 8);
-	pis = new PacketInputStream(is, packetLength + paddingLength, cipher);
-	Misc.skipFully(pis, paddingLength);
-	packetType = (byte) pis.read();
-}
-public void close(boolean doCrcCheck) throws IOException {
-	pis.close(doCrcCheck);
-}
-public InputStream getInputStream() {
-	return pis;
-}
-}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties b/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
deleted file mode 100644
index ea34f12..0000000
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/messages.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-# String resources for vcm.core.cvs.ssh
-###########################
-
-closed=Closed
-stream=Unexpected end of stream
-
-Client_packetType=unexpected packet type: {0}
-Client_notConnected=Not connected
-Client_cipher=Supported cipher not found
-Client_socketClosed=Connection closed by server
-Client_authenticationFailed=Invalid username, password, host or repository
-Client_socket=Cannot connect to host: {0}
-Client_disconnectDescription=SSH server disconnected: {0}
-Client_noDisconnectDescription=No reason could be obtained.
-Client_sshProtocolVersion=Unsupported SSH protocol version: {0}
-Client_hostIdChanged=The server host key does not match the key previously stored.  Either the host key has changed or there is a man-in-the-middle attack. Contact the server administrator
-Client_addedHostKey=Host key for {0} was not found in the list of known hosts stored in {1}. The key is being automatically added to the known_hosts file for you. This key, which is like a personal signature, is used by Eclipse to guarantee that the host it is communicating with is the correct one. If the Eclipse client detects a change in this key you will be notified.
-
-ServerPacket_crc=crc error
-
-SSHServerConnection_authenticating=Authenticating over extssh
-
-Misc_missingMD5=The MD5 encryption algorithm is required but not available: {0}
-
-KnownHosts_8=Error reading host key file
-KnownHosts_9=Error writing host key file
-KnownHosts_10=Error creating host key file
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF
index 75fa7c7..f5783c9 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.team.cvs.ssh2/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.cvs.ssh2; singleton:=true
-Bundle-Version: 3.2.200.qualifier
+Bundle-Version: 3.2.300.qualifier
 Bundle-Activator: org.eclipse.team.internal.ccvs.ssh2.CVSSSH2Plugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java b/eclipse/plugins/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
index c257088..59686b9 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/JSchSession.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -103,7 +103,9 @@ class JSchSession {
 	}
 
     private static Session createSession(IJSchService service, IJSchLocation location, String password, IProgressMonitor monitor) throws JSchException {
-        Session session = service.createSession(location, null);
+    	if (password != null)
+    		location.setPassword(password);
+    	Session session = service.createSession(location, null);
         session.setTimeout(getCVSTimeoutInMillis());
         if (password != null)
 			session.setPassword(password);
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/.settings/.api_filters b/eclipse/plugins/org.eclipse.team.cvs.ui/.settings/.api_filters
new file mode 100644
index 0000000..80abe89
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/.settings/.api_filters
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.team.cvs.ui" version="2">
+    <resource path="src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java" type="org.eclipse.team.internal.ccvs.ui.wizards.CommitWizardCommitPage$CommitWizardParticipantPageCompareEditorInput">
+        <filter id="640712815">
+            <message_arguments>
+                <message_argument value="CompareEditorInput"/>
+                <message_argument value="CommitWizardParticipantPageCompareEditorInput"/>
+                <message_argument value="createContentViewerSwitchingPane(Splitter, int, CompareEditorInput)"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CompareEditorInput"/>
+                <message_argument value="CommitWizardParticipantPageCompareEditorInput"/>
+                <message_argument value="createContentViewerSwitchingPane(Splitter, int, CompareEditorInput)"/>
+            </message_arguments>
+        </filter>
+    </resource>
+</component>
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
index 8bb6144..b682348 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.cvs.ui; singleton:=true
-Bundle-Version: 3.3.202.qualifier
+Bundle-Version: 3.3.302.qualifier
 Bundle-Activator: org.eclipse.team.internal.ccvs.ui.CVSUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -29,10 +29,9 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=op
  org.eclipse.team.ui;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.team.cvs.core;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.compare;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)"
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
 Import-Package: com.ibm.icu.text,
  com.ibm.icu.util
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.properties b/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.properties
index 5355d4e..4eb89af 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -249,7 +249,7 @@ IgnoredResourceForegroundColor.description=This color is used for the foreground
 IgnoredResourceBackgroundColor.label=Ignored Resource (Background)
 IgnoredResourceBackgroundColor.description=This color is used for the background color for resources that are ignored from CVS.
 CVSHistoryCategory.label=CVS History Page Categories (Foreground)
-CVSHistoryCategory.description=This color is used for the foreground color for all categories diplayed for CVS resources in the history view.
+CVSHistoryCategory.description=This color is used for the foreground color for all categories displayed for CVS resources in the history view.
 
 PreferenceKeywords.CVS=cvs team share timeout connection
 PreferenceKeywords.Annotate=cvs team annotate
@@ -260,6 +260,7 @@ PreferenceKeywords.Decorator=cvs team label decorations text icons flag
 PreferenceKeywords.Compare=cvs team compare synchronize model change set
 PreferenceKeywords.Update=cvs team update merge conflict
 PreferenceKeywords.Watch=cvs team watch editors notification
+PreferenceKeywords.Import=repository
 
 RepoPreference.Name=CVS Repositories
 RepoPreference.Description=Preferences that contain the CVS repository connection information
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.xml b/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.xml
index a11bb77..9d03bf2 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/plugin.xml
@@ -685,6 +685,7 @@
                tooltip="%CopyRepositoryNameAction.tooltip"
                class="org.eclipse.team.internal.ccvs.ui.repo.CopyRepositoryNameAction"
                menubarPath="miscGroup"
+               definitionId="org.eclipse.ui.edit.copy"
                id="org.eclipse.team.ccvs.ui.copyNames">
          </action>
          <action
@@ -850,6 +851,10 @@
     <keyword
           id="org.eclipse.team.cvs.ui.cvs.watch"
           label="%PreferenceKeywords.Watch"/>
+    <keyword
+          id="org.eclipse.team.cvs.ui.cvs.import"
+          label="%PreferenceKeywords.Import">
+    </keyword>
    </extension>   
    <extension
          point="org.eclipse.ui.preferencePages">
@@ -1233,10 +1238,11 @@
             description="%CVSActionSet.checkoutTooltip"
             id="org.eclipse.team.cvs.ui.checkout"/>
       <command
-            description="%CommitAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%CommitAction.name"
-            id="org.eclipse.team.cvs.ui.commit"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.CommitAction"
+            description="%CommitAction.tooltip"
+            id="org.eclipse.team.cvs.ui.commit"
+            name="%CommitAction.name"/>
       <command
             description="%CommitAllAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
@@ -1244,99 +1250,117 @@
             id="org.eclipse.team.cvs.ui.commitAll"/>
       <command
             categoryId="org.eclipse.team.cvs.ui.actionSet"
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRemoteAction"
             description="%ReplaceWithAction.tooltip"
-            name="%ReplaceWithAction.name"
-            id="org.eclipse.team.cvs.ui.replace"/>
+            id="org.eclipse.team.cvs.ui.replace"
+            name="%ReplaceWithAction.name"/>
       <command
-            description="%ReplaceWithTagAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%ReplaceWithTagAction.name"
-            id="org.eclipse.team.cvs.ui.replaceWithTag"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithSelectableTagAction"
+            description="%ReplaceWithTagAction.tooltip"
+            id="org.eclipse.team.cvs.ui.replaceWithTag"
+            name="%ReplaceWithTagAction.name"/>
       <command
-            description="%ReplaceWithRevisionAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%ReplaceWithRevisionAction.name"
-            id="org.eclipse.team.cvs.ui.replaceWithRevision"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ReplaceWithRevisionAction"
+            description="%ReplaceWithRevisionAction.tooltip"
+            id="org.eclipse.team.cvs.ui.replaceWithRevision"
+            name="%ReplaceWithRevisionAction.name"/>
       <command
-            description="%CompareWithRemoteAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%CompareWithRemoteAction.name"
-            id="org.eclipse.team.cvs.ui.compareWithRemote"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRemoteAction"
+            description="%CompareWithRemoteAction.tooltip"
+            id="org.eclipse.team.cvs.ui.compareWithRemote"
+            name="%CompareWithRemoteAction.name"/>
       <command
-            description="%CompareWithTagAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%CompareWithTagAction.name"
-            id="org.eclipse.team.cvs.ui.compareWithTag"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.CompareWithTagAction"
+            description="%CompareWithTagAction.tooltip"
+            id="org.eclipse.team.cvs.ui.compareWithTag"
+            name="%CompareWithTagAction.name"/>
       <command
-            description="%CompareWithRevisionAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%CompareWithRevisionAction.name"
-            id="org.eclipse.team.cvs.ui.compareWithRevision"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.CompareWithRevisionAction"
+            description="%CompareWithRevisionAction.tooltip"
+            id="org.eclipse.team.cvs.ui.compareWithRevision"
+            name="%CompareWithRevisionAction.name"/>
       <command
-            description="%UpdateAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%UpdateAction.name"
-            id="org.eclipse.team.cvs.ui.update"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.UpdateSilentAction"
+            description="%UpdateAction.tooltip"
+            id="org.eclipse.team.cvs.ui.update"
+            name="%UpdateAction.name"/>
       <command
             description="%UpdateAllAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
             id="org.eclipse.team.cvs.ui.updateAll"
             name="%UpdateAllAction.name"/>
       <command
-            description="%GenerateDiff.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%GenerateDiff.name"
-            id="org.eclipse.team.cvs.ui.GenerateDiff"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.GenerateDiffFileAction"
+            description="%GenerateDiff.tooltip"
+            id="org.eclipse.team.cvs.ui.GenerateDiff"
+            name="%GenerateDiff.name"/>
       <command
-            description="%TagAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%TagAction.name"
-            id="org.eclipse.team.cvs.ui.tag"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.TagLocalAction"
+            description="%TagAction.tooltip"
+            id="org.eclipse.team.cvs.ui.tag"
+            name="%TagAction.name"/>
       <command
-            description="%BranchAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%BranchAction.name"
-            id="org.eclipse.team.cvs.ui.branch"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.BranchAction"
+            description="%BranchAction.tooltip"
+            id="org.eclipse.team.cvs.ui.branch"
+            name="%BranchAction.name"/>
       <command
-            description="%MergeAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%MergeAction.name"
-            id="org.eclipse.team.cvs.ui.merge"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.MergeAction"
+            description="%MergeAction.tooltip"
+            id="org.eclipse.team.cvs.ui.merge"
+            name="%MergeAction.name"/>
       <command
-            description="%UpdateActionSwitch.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%UpdateActionSwitch.name"
-            id="org.eclipse.team.cvs.ui.updateSwitch"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.UpdateAction"
+            description="%UpdateActionSwitch.tooltip"
+            id="org.eclipse.team.cvs.ui.updateSwitch"
+            name="%UpdateActionSwitch.name"/>
       <command
-            description="%SetKeywordSubstitutionAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%SetKeywordSubstitutionAction.name"
-            id="org.eclipse.team.cvs.ui.setKeywordSubstitution"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.SetKeywordSubstitutionAction"
+            description="%SetKeywordSubstitutionAction.tooltip"
+            id="org.eclipse.team.cvs.ui.setKeywordSubstitution"
+            name="%SetKeywordSubstitutionAction.name"/>
       <command
             description="%ShowAnnotationAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
             name="%ShowAnnotationAction.name"
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ShowAnnotationAction"
             id="org.eclipse.team.cvs.ui.showAnnotation"/>
       <command
             description="%ShowHistoryAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
             name="%ShowHistoryAction.name"
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.ShowResourceInHistoryAction"
             id="org.eclipse.team.cvs.ui.showHistory"/>
       <command
-            description="%AddAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%AddAction.name"
-            id="org.eclipse.team.cvs.ui.add"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.AddAction"
+            description="%AddAction.tooltip"
+            id="org.eclipse.team.cvs.ui.add"
+            name="%AddAction.name"/>
       <command
-            description="%IgnoreAction.tooltip"
             categoryId="org.eclipse.team.cvs.ui.actionSet"
-            name="%IgnoreAction.name"
-            id="org.eclipse.team.cvs.ui.ignore"/>
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction"
+            description="%IgnoreAction.tooltip"
+            id="org.eclipse.team.cvs.ui.ignore"
+            name="%IgnoreAction.name"/>
       <command
             categoryId="org.eclipse.team.cvs.ui.actionSet"
+            defaultHandler="org.eclipse.team.internal.ccvs.ui.actions.SyncAction"
             description="%Synchronize.tooltip"
-            name="%Synchronize.name"
-            id="org.eclipse.team.cvs.ui.sync"/> 
+            id="org.eclipse.team.cvs.ui.sync"
+            name="%Synchronize.name"/> 
    </extension>
    
    <!-- Commented out awaiting menu support from UI
@@ -1915,6 +1939,9 @@
             <description> 
               %newProjectCheckoutWizardDescription
           </description>
+            <keywordReference
+                  id="org.eclipse.team.cvs.ui.cvs.import">
+            </keywordReference>
       </wizard>
    </extension>
    
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java
index b1d092f..72435d1 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AddToVersionControlDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
index 734894e..5bfb4b3 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryTableProvider.java
@@ -560,11 +560,14 @@ public class CVSHistoryTableProvider {
 	}
 
 	public void loadColumnLayout(TableLayout layout) {
-		layout.addColumnData(getWeightData(settings.get(COL_REVISIONID_NAME)));
-		layout.addColumnData(getWeightData(settings.get(COL_TAGS_NAME)));
-		layout.addColumnData(getWeightData(settings.get(COL_DATE_NAME)));
-		layout.addColumnData(getWeightData(settings.get(COL_AUTHOR_NAME)));
-		layout.addColumnData(getWeightData(settings.get(COL_COMMENT_NAME)));
+		int weights[] = new int[] { getSettingsInt(COL_REVISIONID_NAME),
+				getSettingsInt(COL_TAGS_NAME), getSettingsInt(COL_DATE_NAME),
+				getSettingsInt(COL_AUTHOR_NAME),
+				getSettingsInt(COL_COMMENT_NAME) };
+		ColumnLayoutData weightData[] = getWeightData(weights);
+		for (int i = 0; i < weightData.length; i++) {
+			layout.addColumnData(weightData[i]);
+		}
 
 		String sortName = settings.get(SORT_COL_NAME);
 		if (sortName == null) {
@@ -591,13 +594,34 @@ public class CVSHistoryTableProvider {
 		sorter.setReversed(sortDirection == SWT.DOWN);
 		viewer.setComparator(sorter);
 	}
- 
-	private ColumnLayoutData getWeightData(String value) {
+	
+	private int getSettingsInt(String key) {
+		String value = settings.get(key);
+		int ret = 0;
 		try {
-			return new ColumnPixelData(Integer.parseInt(value), true);
+			ret = Integer.parseInt(value);
 		} catch (NumberFormatException e) {
-			return new ColumnWeightData(20, true);
+			// Nothing to do
+		}
+		return ret;
+	}
+
+	private ColumnLayoutData[] getWeightData(int[] widths) {
+		boolean onlyZeroes = true;
+		for (int i = 0; i < widths.length; i++) {
+			if (widths[i] > 0) {
+				onlyZeroes = false;
+			}
+		}
+		ColumnLayoutData[] ret = new ColumnLayoutData[widths.length];
+		for (int i = 0; i < widths.length; i++) {
+			if (onlyZeroes) {
+				ret[i] = new ColumnWeightData(20, true);
+			} else {
+				ret[i] = new ColumnPixelData(widths[i]);
+			}
 		}
+		return ret;
 	}
 
 	public void saveColumnLayout() {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
index 0c54be7..0ae12a1 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSPerspective.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,11 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ccvs.ui;
 
-
 import org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView;
 import org.eclipse.team.ui.history.IHistoryView;
 import org.eclipse.team.ui.synchronize.ISynchronizeView;
 import org.eclipse.ui.*;
-import org.eclipse.ui.navigator.resources.ProjectExplorer;
+
 
 public class CVSPerspective implements IPerspectiveFactory {
     
@@ -30,7 +29,7 @@ public class CVSPerspective implements IPerspectiveFactory {
 	}
 
 	/**
-	 * Defines the initial actions for a page.  
+	 * Defines the initial actions for a page.
 	 */
 	public void defineActions(IPageLayout layout) {
 
@@ -40,7 +39,7 @@ public class CVSPerspective implements IPerspectiveFactory {
 		layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$
 
 		// Add "show views".
-		layout.addShowViewShortcut(ProjectExplorer.VIEW_ID);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
 		layout.addShowViewShortcut(IHistoryView.VIEW_ID);
@@ -53,7 +52,7 @@ public class CVSPerspective implements IPerspectiveFactory {
 	}
 
 	/**
-	 * Defines the initial layout for a page.  
+	 * Defines the initial layout for a page.
 	 */
 	public void defineLayout(IPageLayout layout) {
 		String editorArea = layout.getEditorArea();
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
index 27980e1..bfefb28 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectPropertiesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,11 +62,10 @@ public class CVSProjectPropertiesPage extends CVSPropertiesPage {
 	private boolean fetch;
 	private boolean watchEdit;
 
-	public static boolean isCompatible(ICVSRepositoryLocation location, ICVSRepositoryLocation oldLocation) {
-		if (!location.getHost().equals(oldLocation.getHost())) return false;
-		if (!location.getRootDirectory().equals(oldLocation.getRootDirectory())) return false;
-		if (location.equals(oldLocation)) return false;
-		return true;
+	public static boolean isCompatible(ICVSRepositoryLocation location,
+			ICVSRepositoryLocation oldLocation) {
+		return CVSRepositoryLocationMatcher.isCompatible(location, oldLocation,
+				false);
 	}
 	
 	private class RepositorySelectionDialog extends Dialog {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java
index 1620ac2..23a6af9 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommentTemplatesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 Maik Schreiber.
+ * Copyright (c) 2005, 2006 Maik Schreiber.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java
index e9a5dde..2002daa 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ConfigureRepositoryLocationsTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ import org.eclipse.swt.events.ControlAdapter;
 import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ccvs.core.CVSProjectSetCapability;
+import org.eclipse.team.internal.ccvs.core.CVSRepositoryLocationMatcher;
 import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
 import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
 import org.eclipse.team.internal.ccvs.core.util.KnownRepositories;
@@ -227,7 +227,7 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 							.isKnownRepository(
 									((ICVSRepositoryLocation) locationItem.alternativeList
 											.get(0)).getLocation(false))
-					&& CVSProjectSetCapability
+					&& CVSRepositoryLocationMatcher
 							.isCompatible(
 									locationItem.location,
 									(ICVSRepositoryLocation) locationItem.alternativeList
@@ -357,7 +357,7 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 			// consider sorting the list again
 			rli.alternativeList.add(location);
 			if (getSelection().toList().contains(element)
-					&& CVSProjectSetCapability.isCompatible(location,
+					&& CVSRepositoryLocationMatcher.isCompatible(location,
 							rli.location, false)) {
 				// at the end
 				rli.selected = getFilteredAlternativeRepositories(rli).size() - 1;
@@ -414,7 +414,7 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 				CVSRepositoryLocation repo = (CVSRepositoryLocation) alternativeList.get(i);
 				// If "Show only compatible..." option is on add only compatible
 				// locations or the location itself
-				if (!CVSProjectSetCapability.isCompatible(item.location,
+				if (!CVSRepositoryLocationMatcher.isCompatible(item.location,
 						repo, true)){
 					continue; // skip this repo location
 				}
@@ -430,7 +430,7 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 			for (int j = 0; j <= item.selected; j++) {
 				ICVSRepositoryLocation rl = (ICVSRepositoryLocation) item.alternativeList
 						.get(j);
-				if (!CVSProjectSetCapability.isCompatible(item.location,
+				if (!CVSRepositoryLocationMatcher.isCompatible(item.location,
 						rl, true)) {
 					shift++;
 				}
@@ -441,14 +441,14 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 			// one from the project set
 			ICVSRepositoryLocation selected = (ICVSRepositoryLocation) getFilteredAlternativeRepositories(
 					item).get(item.selected);
-			if (!CVSProjectSetCapability.isCompatible(item.location,
+			if (!CVSRepositoryLocationMatcher.isCompatible(item.location,
 					selected, true)) {
 				item.selected = 0; // default
 				// find compatible
 				for (int j = 0; j < item.alternativeList.size(); j++) {
 					ICVSRepositoryLocation l = (ICVSRepositoryLocation) item.alternativeList
 							.get(j);
-					if (CVSProjectSetCapability.isCompatible(l,
+					if (CVSRepositoryLocationMatcher.isCompatible(l,
 							item.location, true)) {
 						item.selected = j;
 						break;
@@ -465,7 +465,7 @@ public class ConfigureRepositoryLocationsTable implements ICellModifier,
 									item.selected)); j++) {
 				ICVSRepositoryLocation rl = (ICVSRepositoryLocation) item.alternativeList
 						.get(j);
-				if (!CVSProjectSetCapability.isCompatible(item.location, rl,
+				if (!CVSRepositoryLocationMatcher.isCompatible(item.location, rl,
 						true)) {
 					shift++;
 				}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TableViewerAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TableViewerAction.java
index ac20384..c8f3ea3 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TableViewerAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/TableViewerAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public class TableViewerAction extends Action {
 				buf.append(firstTag.getName());
 				while (selectionIter.hasNext()) {
 					String tagName = ((ITag) selectionIter.next()).getName();
-					buf.append(getLineSeparator()).append(tagName);
+					buf.append(System.getProperty("line.separator", "\n")).append(tagName); //$NON-NLS-1$ //$NON-NLS-2$
 				}
 				
 				Clipboard clipboard = new Clipboard(Display.getDefault());
@@ -69,11 +69,4 @@ public class TableViewerAction extends Action {
 			}
 		}
 	}
-	
-	private String getLineSeparator() {
-		String lineSeparator= System.getProperty("line.separator"); //$NON-NLS-1$
-		if (lineSeparator == null)
-			lineSeparator= "\r\n"; //$NON-NLS-1$
-		return lineSeparator;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
index 6e681a7..c9f0050 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/RestoreFromRepositoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,11 +85,11 @@ public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
                 	// See bug 238334
                 	CVSRepositoryLocation repo = (CVSRepositoryLocation)location;
                 	// Remove root directory
-                	String repoPath = line.substring(repo.getRootDirectory().length()); 
+                	String repoPath = line.substring(repo.getRootDirectory().length());
     				try {
     					String cmdRootRelativePath = commandRoot.getRepositoryRelativePath();
     					// Remove command root path
-						String path = repoPath.substring(repoPath.indexOf(cmdRootRelativePath)	+ cmdRootRelativePath.length()); 
+						String path = repoPath.substring(repoPath.indexOf(cmdRootRelativePath)	+ cmdRootRelativePath.length());
     					// Remove filename at the end
     					String folderPath = path.substring(0, path.indexOf(fileName));
     					// The "raw" folderPath contains CVS's 'Attic/' segment when a file has been deleted from cvs.
@@ -98,7 +98,7 @@ public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
 						}
     					// A separator means the same as "current folder"
 						if (folderPath.equals(Session.SERVER_SEPARATOR))
-							folderPath = Session.CURRENT_LOCAL_FOLDER; 
+							folderPath = Session.CURRENT_LOCAL_FOLDER;
 						ICVSFolder folder = commandRoot.getFolder(folderPath);
     					ICVSFile file = folder.getFile(fileName);
     					if (!file.exists())
@@ -146,12 +146,12 @@ public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
 		ICVSFile[] files = fetchDeletedFiles(resource);
 		if (files == null) return;
 		if (files.length == 0) {
-			MessageDialog.openInformation(getShell(), CVSUIMessages.RestoreFromRepositoryAction_noFilesTitle, NLS.bind(CVSUIMessages.RestoreFromRepositoryAction_noFilesMessage, new String[] { resource.getName() })); // 
+			MessageDialog.openInformation(getShell(), CVSUIMessages.RestoreFromRepositoryAction_noFilesTitle, NLS.bind(CVSUIMessages.RestoreFromRepositoryAction_noFilesMessage, new String[] { resource.getName() })); //
 			return;
 		}
 		RestoreFromRepositoryWizard wizard = new RestoreFromRepositoryWizard(resource, files);
 		WizardDialog dialog = new ResizableWizardDialog(getShell(), wizard);
-		dialog.setMinimumPageSize(350, 250);
+		dialog.setMinimumPageSize(1000, 250);
 		dialog.open();
 	}
 
@@ -211,7 +211,7 @@ public class RestoreFromRepositoryAction extends WorkspaceTraversalAction {
 				CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
 				IStatus status = Command.LOG.execute(
 					session,
-					Command.NO_GLOBAL_OPTIONS, 
+					Command.NO_GLOBAL_OPTIONS,
 					new LocalOption[] { Log.RCS_FILE_NAMES_ONLY },
 					new ICVSResource[] { parent }, listener,
 					Policy.subMonitorFor(monitor, 90));
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java
index 90f6d54..3558137 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowAnnotationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public class ShowAnnotationAction extends WorkspaceAction {
 	 */
 	public void execute(IAction action) throws InvocationTargetException, InterruptedException {
 	    final ICVSResource resource= getSingleSelectedCVSResource();
-	    if (resource == null) 
+	    if (resource == null)
 	        return;
 		execute(resource);
 	}
@@ -40,7 +40,7 @@ public class ShowAnnotationAction extends WorkspaceAction {
 	/**
 	 * Fetch the revision number of a CVS resource and perform a ShowAnnotationOperation
 	 * in the background.
-	 *  
+	 * 
 	 * @param cvsResource The CVS resource (must not be null)
 	 * 
 	 * @throws InvocationTargetException
@@ -73,7 +73,7 @@ public class ShowAnnotationAction extends WorkspaceAction {
         
         try {
             byte[] syncBytes = ((ICVSFile)cvsResource).getSyncBytes();
-                if (syncBytes == null) 
+                if (syncBytes == null)
                     return false;
             return ResourceSyncInfo.isBinary(syncBytes);
         } catch (CVSException e) {
@@ -144,8 +144,8 @@ public class ShowAnnotationAction extends WorkspaceAction {
         final ResourceSyncInfo info;
         try {
             info= cvsResource.getSyncInfo();
-            if (info == null) 
-                throw new CVSException(NLS.bind(CVSUIMessages.ShowAnnotationAction_noSyncInfo, new String[] { cvsResource.getName() })); 
+            if (info == null)
+                throw new CVSException(NLS.bind(CVSUIMessages.ShowAnnotationAction_noSyncInfo, new String[] { cvsResource.getName() }));
         } catch (CVSException e) {
             throw new InvocationTargetException(e);
         }
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
index e58a5b0..839b1e9 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowResourceInHistoryAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java
index ce7decc..32b7787 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/AbstractCommitAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,7 +78,7 @@ public abstract class AbstractCommitAction extends CVSModelProviderAction {
 
 	protected abstract ResourceTraversal[] getCommitTraversals(IStructuredSelection selection, IProgressMonitor monitor) throws CoreException;
 	
-    protected IResource[] getOutgoingChanges(final IResourceDiffTree tree, ResourceTraversal[] traversals, IProgressMonitor monitor) {
+    public static IResource[] getOutgoingChanges(final IResourceDiffTree tree, ResourceTraversal[] traversals, IProgressMonitor monitor) {
     	final List resources = new ArrayList();
 		IDiff[] diffs = tree.getDiffs(traversals);
 		for (int i = 0; i < diffs.length; i++) {
@@ -92,7 +92,7 @@ public abstract class AbstractCommitAction extends CVSModelProviderAction {
 		return (IResource[]) resources.toArray(new IResource[resources.size()]);
     }
     
-	private boolean hasLocalChange(IDiff diff) {
+	public static boolean hasLocalChange(IDiff diff) {
 		if (diff instanceof IThreeWayDiff) {
 			IThreeWayDiff twd = (IThreeWayDiff) diff;
 			return twd.getDirection() == IThreeWayDiff.OUTGOING 
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
index 88fb09b..cec2df0 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ApplyPatchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.team.internal.ccvs.ui.mappings;
 
 import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.patch.ApplyPatchOperation;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.*;
@@ -20,6 +19,7 @@ import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.team.core.diff.*;
 import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation;
 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 
 public class ApplyPatchAction extends CVSModelProviderAction implements
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java
index f999b80..3a1de7f 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/ChangeSetActionProvider.java
@@ -311,17 +311,6 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 		return null;
 	}
 
-	private boolean onlyUnassingedChanges(IStructuredSelection selection) {
-		IDiff[] diffArray = getLocalChanges(selection);
-		DiffChangeSet unass = getContentProvider().getUnassignedSet();
-		IResource[] resources = getResources(diffArray);
-		for (int i = 0; i < resources.length; i++) {
-			if (!unass.contains(resources[i]))
-				return false;
-		}
-		return true;
-	}
-
 	private IResource[] getResources(IDiff[] diffArray) {
 		List result = new ArrayList();
 		for (int i = 0; i < diffArray.length; i++) {
@@ -350,17 +339,16 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 					getSynchronizePageConfiguration())
 					&& containsOnlyLocalChanges(selection)) {
 
-				if (!onlyUnassingedChanges(selection)) {
-					// only local changes, but not unassigned
+				if (containsOnlyUnassignedChanges(selection)) {
+					// only local unassigned changes
 					addToChangeSet = new MenuManager(
-							TeamUIMessages.ChangeLogModelProvider_12);
+							TeamUIMessages.ChangeLogModelProvider_13);
 					appendToGroup(menu, CHANGE_SET_GROUP, addToChangeSet);
-					appendToGroup(menu, CHANGE_SET_GROUP, removeChangeSet);
-
 				} else {
 					addToChangeSet = new MenuManager(
-							TeamUIMessages.ChangeLogModelProvider_13);
+							TeamUIMessages.ChangeLogModelProvider_12);
 					appendToGroup(menu, CHANGE_SET_GROUP, addToChangeSet);
+					appendToGroup(menu, CHANGE_SET_GROUP, removeChangeSet);
 				}
 
 				addChangeSets(addToChangeSet);
@@ -470,6 +458,20 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 	private IResourceDiffTree getDiffTree(TreePath path) {
 		return getContentProvider().getDiffTree(path);
 	}
+	
+	
+	private boolean containsOnlyUnassignedChanges(IStructuredSelection selection) {
+		IDiff[] diffArray = getLocalChanges(selection);
+		ChangeSet[] activeChangeSets = getActiveChangeSetManager().getSets();
+		IResource[] resources = getResources(diffArray);
+		for (int i = 0; i < activeChangeSets.length; i++) {
+			for (int j = 0; j < resources.length; j++) {
+				if (activeChangeSets[i].contains(resources[j]))
+					return false;
+			}
+		}
+		return true;
+	}
 
 	public boolean containsOnlyLocalChanges(IStructuredSelection selection) {
 		if (selection instanceof ITreeSelection) {
@@ -477,7 +479,7 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 			TreePath[] paths = ts.getPaths();
 			for (int i = 0; i < paths.length; i++) {
 				TreePath path = paths[i];
-				if (!containsLocalChanges(path)) {
+				if (!containsOnlyLocalChanges(path)) {
 					return false;
 				}
 			}
@@ -485,10 +487,10 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 		return true;
 	}
 
-	private boolean containsLocalChanges(TreePath path) {
+	private boolean containsOnlyLocalChanges(TreePath path) {
 		IResourceDiffTree tree = getDiffTree(path);
 		ResourceTraversal[] traversals = getTraversals(path.getLastSegment());
-		return tree.hasMatchingDiffs(traversals, getVisibleLocalChangesFilter());
+		return !tree.hasMatchingDiffs(traversals, getNonLocalChangesFilter());
 	}
 
 	private ResourceTraversal[] getTraversals(Object element) {
@@ -516,17 +518,18 @@ public class ChangeSetActionProvider extends ResourceModelActionProvider {
 		}
 		return new ResourceTraversal[0];
 	}
-
-	private FastDiffFilter getVisibleLocalChangesFilter() {
+	
+	private FastDiffFilter getNonLocalChangesFilter() {
 		return new FastDiffFilter() {
 			public boolean select(IDiff diff) {
 				if (diff instanceof IThreeWayDiff && isVisible(diff)) {
 					IThreeWayDiff twd = (IThreeWayDiff) diff;
-					if (twd.getDirection() == IThreeWayDiff.OUTGOING || twd.getDirection() == IThreeWayDiff.CONFLICTING) {
-						return true;
+					if (twd.getDirection() == IThreeWayDiff.OUTGOING
+							|| twd.getDirection() == IThreeWayDiff.CONFLICTING) {
+						return false;
 					}
 				}
-				return false;
+				return true;
 			}
 		};
 	}
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index a90b496..82b8e81 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -911,8 +911,8 @@ WorkspaceModelParticipant_0=Updating all changes in {0}
 
 
 ProjectMetaFile_taskName=Looking for a remote meta file
-TagFromWorkspace_taskName=Tagging from workspace
-TagFromRepository_taskName=Tagging from repository
+TagFromWorkspace_taskName=Tagging from Workspace
+TagFromRepository_taskName=Tagging from Repository
 UpdateOnlyMergeable_taskName=Updating mergeable changes
 UpdateDialog_overwriteTitle=Overwrite Local Changes?
 UpdateMergePreferencePage_0=&Never preview and use CVS text markup to indicate conflicts
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
index 2efc165..8971259 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSModelElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,7 +85,7 @@ public abstract class CVSModelElement implements IWorkbenchAdapter, IAdaptable {
     }
     
     /**
-     * Helper methed error handler that displayes a generic dialog title and message when displaying an error to the user.
+     * Helper method error handler that displays a generic dialog title and message when displaying an error to the user.
      * @param t the exception that occurred.
      */
     protected void handle(Throwable t) {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
index eff02ff..ece23e1 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRepositoryRootElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,9 +22,12 @@ import org.eclipse.team.internal.ccvs.ui.repo.RepositoryRoot;
 /**
  * RemoteRootElement is the model element for a repository that
  * appears in the repositories view. Its children are:
- * a) HEAD
- * b) Branch tags category
- * c) Version tags category
+ * <ul>
+ * <li>HEAD
+ * <li>Branch tags category
+ * <li>Version tags category
+ * <li>Date tags category
+ * </ul>
  */
 public class CVSRepositoryRootElement extends CVSModelElement {
 	public ImageDescriptor getImageDescriptor(Object object) {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
index fda4db3..c21c3fe 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java
@@ -170,7 +170,27 @@ public abstract class DiffOperation extends SingleCommandOperation {
 	 * @return a stream for the diff output
 	 */
 	protected abstract PrintStream openStream() throws CVSException;
-
+	
+	private static Comparator COMPARATOR = new Comparator() {
+		private int compare(IResource r1, IResource r2) {
+			return r1.getFullPath().toString().compareTo(r2.getFullPath().toString());
+		}
+		public int compare(Object o1, Object o2) {
+			IResource r1 = null;
+			IResource r2 = null;
+			if (o1 instanceof ICVSResource) {
+				r1 = ((ICVSResource)o1).getIResource();
+			} else {
+				r1 = (IResource)o1;
+			}
+			if (o2 instanceof ICVSResource) {
+				r2 = ((ICVSResource)o2).getIResource();
+			} else {
+				r2 = (IResource)o2;
+			}
+			return compare(r1, r2);
+		}
+	};
 	protected void execute(CVSTeamProvider provider, IResource[] resources, boolean recurse, IProgressMonitor monitor) throws CVSException, InterruptedException {
 		
 		//add this project to the total projects encountered
@@ -207,6 +227,11 @@ public abstract class DiffOperation extends SingleCommandOperation {
 				}
 			}, recurse);
 		}
+
+		final SortedSet allFiles = new TreeSet(COMPARATOR);
+		allFiles.addAll(existingFiles);
+		allFiles.addAll(newFiles);
+
 		subMonitor.done();
 		
 		//Check options 
@@ -233,13 +258,6 @@ public abstract class DiffOperation extends SingleCommandOperation {
 				IProject project=resources[0].getProject();
 				stream.println(WorkspacePatcherUI.getWorkspacePatchProjectHeader(project));
 			}
-			try{
-				super.execute(provider, (IResource[]) existingFiles.toArray(new IResource[existingFiles.size()]), recurse, Policy.subMonitorFor(monitor, 90));
-			} catch(CVSCommunicationException ex){ // see bug 123430
-				CVSUIPlugin.openError(getShell(), null, null, ex, CVSUIPlugin.PERFORM_SYNC_EXEC | CVSUIPlugin.LOG_OTHER_EXCEPTIONS);
-			} catch (CVSException ex) {
-				handleCVSException(ex);
-			}
 		}
 
 		if (!newFiles.isEmpty() && Diff.INCLUDE_NEWFILES.isElementOf(localoptions)){
@@ -251,16 +269,38 @@ public abstract class DiffOperation extends SingleCommandOperation {
 				IProject project=resources[0].getProject();
 				stream.println(WorkspacePatcherUI.getWorkspacePatchProjectHeader(project));
 			}
-			
-			for (Iterator iter = newFiles.iterator(); iter.hasNext();) {
-				ICVSFile cvsFile = (ICVSFile) iter.next();
+		}
+		
+		List existingFilesSubList = new ArrayList();
+		for (Iterator iter = allFiles.iterator(); iter.hasNext();) {
+			Object file = iter.next();
+			if (existingFiles.contains(file)) {
+				existingFilesSubList.add(file);
+			} else if (newFiles.contains(file)){
+				addExistingFilesSubListToDiff(provider, existingFilesSubList, recurse, monitor, existingFiles.size());
+				ICVSFile cvsFile = (ICVSFile) file;
 				addFileToDiff(getNewFileRoot(cvsFile), cvsFile,stream,format);
 			}
 		}
-		
+		addExistingFilesSubListToDiff(provider, existingFilesSubList, recurse, monitor, existingFiles.size());
+
 		monitor.done();
 	}
 
+	private void addExistingFilesSubListToDiff(CVSTeamProvider provider, Collection subList, boolean recurse, IProgressMonitor monitor, int existingFilesTotal) throws InterruptedException {
+		if (!subList.isEmpty()) {
+			int ticks = 90 * subList.size() / existingFilesTotal;
+			try{
+				super.execute(provider, (IResource[]) subList.toArray(new IResource[subList.size()]), recurse, Policy.subMonitorFor(monitor, ticks));
+			} catch(CVSCommunicationException ex){ // see bug 123430
+				CVSUIPlugin.openError(getShell(), null, null, ex, CVSUIPlugin.PERFORM_SYNC_EXEC | CVSUIPlugin.LOG_OTHER_EXCEPTIONS);
+			} catch (CVSException ex) {
+				handleCVSException(ex);
+			}
+			subList.clear();
+		}
+	}
+
 	/**
 	 * Checks if the exception contain a status that has to be shown to the
 	 * user. If yes, the method shows the dialog.
@@ -321,6 +361,19 @@ public abstract class DiffOperation extends SingleCommandOperation {
 		return CVSUIMessages.DiffOperation_1;
 	}
 	
+	Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException {
+		Map providerTraversal = super.getProviderTraversalMapping(monitor);
+		SortedMap result = new TreeMap(new Comparator() {
+			public int compare(Object o1, Object o2) {
+				CVSTeamProvider p1 = (CVSTeamProvider) o1;
+				CVSTeamProvider p2 = (CVSTeamProvider) o2;
+				return COMPARATOR.compare(p1.getProject(), p2.getProject());
+			}
+		});
+		result.putAll(providerTraversal);
+		return result;
+	}
+
 	private void addFileToDiff(ICVSFolder patchRoot, ICVSFile file, PrintStream printStream, int format) throws CVSException {
 		
 		String nullFilePrefix = ""; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
index 86b4d5b..66d3ef4 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/RepositoryProviderOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,7 @@
 package org.eclipse.team.internal.ccvs.ui.operations;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -325,7 +319,7 @@ public abstract class RepositoryProviderOperation extends CVSOperation {
 	 * Helper method. Return a Map mapping provider to a list of resources
 	 * shared with that provider.
 	 */
-	private Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException {
+	Map getProviderTraversalMapping(IProgressMonitor monitor) throws CoreException {
 		Map result = new HashMap();
 		ResourceMapping[] mappings = getScope().getMappings();
         for (int j = 0; j < mappings.length; j++) {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java
index 830ddff..5afc10a 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/ShowAnnotationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -254,11 +254,9 @@ public class ShowAnnotationOperation extends CVSOperation {
 					private String fCommitter= null;
 					
 					public Object getHoverInfo() {
-						if (entry != null)
-							return entry.getAuthor() + " " + entry.getRevision() + " " + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(entry.getDate()) //$NON-NLS-1$ //$NON-NLS-2$
-							  + "\n\n" + entry.getComment(); //$NON-NLS-1$
-							
-						return block.toString().substring(0, block.toString().indexOf(" (")); //$NON-NLS-1$
+						return entry.getAuthor()
+								+ " " + entry.getRevision() + " " + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT).format(entry.getDate()) //$NON-NLS-1$ //$NON-NLS-2$
+								+ "\n\n" + entry.getComment(); //$NON-NLS-1$
 					}
 					
 					private String getCommitterId() {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
index 009d587..5dae87d 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/CopyRepositoryNameAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,10 +22,13 @@ import org.eclipse.team.internal.ccvs.ui.actions.CVSAction;
 
 public class CopyRepositoryNameAction extends CVSAction {
 	public boolean isEnabled() {
-		return true;
+		return getSelectedRepositories().length > 0;
 	}
 	public void execute(IAction action) {
 		ICVSRepositoryLocation[] locations = getSelectedRepositories();
+		if (locations.length == 0)
+			return;
+
 		StringBuffer buffer = new StringBuffer();
 		for (int i = 0; i < locations.length; i++) {
 			buffer.append(locations[i].getLocation(true));
@@ -56,7 +59,7 @@ public class CopyRepositoryNameAction extends CVSAction {
 	}
 	private void copyToClipbard(Display display, String str) {
 		Clipboard clipboard = new Clipboard(display);
-		clipboard.setContents(new String[] { str },	new Transfer[] { TextTransfer.getInstance()});			
+		clipboard.setContents(new String[] { str },	new Transfer[] { TextTransfer.getInstance()});
 		clipboard.dispose();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java
index a0ba2c7..a49594a 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/PasteConnectionStringAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@ import org.eclipse.ui.*;
 import org.eclipse.ui.actions.ActionDelegate;
 import org.eclipse.ui.actions.ActionFactory;
 
+import com.ibm.icu.util.StringTokenizer;
+
 /**
  * Try to paste a CVS connection string from clipboard as a repository location
  */
@@ -26,19 +28,23 @@ public class PasteConnectionStringAction extends ActionDelegate implements
 		IViewActionDelegate {
 
 	private IAction action;
-	
+
 	public void run(IAction action) {
 		Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench()
 				.getDisplay());
 		try {
 			Object contents = clipboard.getContents(TextTransfer.getInstance());
 			if (contents != null && contents instanceof String) {
-				String connectionString = (String) contents;
-				CVSRepositoryLocation location = CVSRepositoryLocation
-						.fromString(connectionString);
-				if (location != null) {
-					KnownRepositories.getInstance().addRepository(location,
-							true);
+				StringTokenizer st = new StringTokenizer((String) contents,
+						System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
+				while (st.hasMoreTokens()) {
+					String connectionString = st.nextToken();
+					CVSRepositoryLocation location = CVSRepositoryLocation
+							.fromString(connectionString);
+					if (location != null) {
+						KnownRepositories.getInstance().addRepository(location,
+								true);
+					}
 				}
 			}
 		} catch (Exception e) {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java
index 8850fd9..cbe6651 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryComparator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.team.internal.ccvs.core.*;
 import org.eclipse.team.internal.ccvs.ui.model.*;
+import org.eclipse.ui.progress.PendingUpdateAdapter;
 
 public class RepositoryComparator extends ViewerComparator {
 	
@@ -100,6 +101,9 @@ public class RepositoryComparator extends ViewerComparator {
 		if (element instanceof DateTagCategory){
 			return 6;
 		}
+		if (element instanceof PendingUpdateAdapter) {
+			return 10000;
+		}
 		return 0;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java
index 8b2c1c3..91b6d0f 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/RepositoryRoot.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,14 +12,7 @@ package org.eclipse.team.internal.ccvs.ui.repo;
 
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
@@ -47,7 +40,7 @@ public class RepositoryRoot extends PlatformObject {
 	// Map of String (module name) -> ICVSRemoteFolder (that is a defined module)
 	Map modulesCache;
 	Object modulesCacheLock = new Object();
-	// Lis of date tags
+	// List of date tags
 	List dateTags = new ArrayList();
 	
 	public static class TagCacheEntry {
@@ -194,7 +187,7 @@ public class RepositoryRoot extends PlatformObject {
 	 * the given version tags are added to the list of known tags for the 
 	 * remote ancestor of the resource that is a direct child of the remote root.
 	 * 
-	 * It is the reponsibility of the caller to ensure that the given remote path is valid.
+	 * It is the responsibility of the caller to ensure that the given remote path is valid.
 	 */
 	public void addTags(String remotePath, CVSTag[] tags) {	
 		addDateTags(tags);
@@ -244,7 +237,7 @@ public class RepositoryRoot extends PlatformObject {
 		}
 	}
 	/**
-	 * Return the list of date tags assocaiated with the repository.
+	 * Return the list of date tags associated with the repository.
 	 * @return the list of date tags
 	 */
 	public CVSTag[] getDateTags() {
@@ -615,7 +608,7 @@ public class RepositoryRoot extends PlatformObject {
 
     /*
      * Set the last access time of the cache entry for the given path
-     * as it was read from the persitent store.
+     * as it was read from the persistent store.
      */
     /* package */ void setLastAccessedTime(String remotePath, long lastAccessTime) {
 	    TagCacheEntry entry = (TagCacheEntry)versionAndBranchTags.get(getCachePathFor(remotePath));
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ApplyPatchAction.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ApplyPatchAction.java
index e1582bc..80fea1f 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ApplyPatchAction.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ApplyPatchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.team.internal.ccvs.ui.subscriber;
 
 import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.patch.ApplyPatchOperation;
 import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
@@ -20,6 +19,7 @@ import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.team.internal.ui.TeamUIPlugin;
 import org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation;
 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
 
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java
index c0c6ebd..d6a7da8 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SafeUpdateOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,33 +11,33 @@
 package org.eclipse.team.internal.ccvs.ui.subscriber;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.resources.mapping.ResourceMappingContext;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.MultiRule;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.AndSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.OrSyncInfoFilter;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
+import org.eclipse.team.core.mapping.provider.SynchronizationScopeManager;
+import org.eclipse.team.core.synchronize.*;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter.*;
 import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
+import org.eclipse.team.internal.ccvs.core.*;
 import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
 import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
 import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
 import org.eclipse.team.internal.ccvs.ui.*;
-import org.eclipse.team.internal.ccvs.ui.operations.UpdateOnlyMergableOperation;
+import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.ccvs.ui.operations.*;
 import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.Utils;
 import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 
 /**
@@ -64,6 +64,67 @@ public abstract class SafeUpdateOperation extends CVSSubscriberOperation {
 	public boolean shouldRun() {
 		return promptIfNeeded();
 	}
+
+	/**
+	 * Run the operation for the sync infos from the given project.
+	 * 
+	 * @param projectSyncInfos the project syncInfos
+	 * @param project the project
+	 * @param monitor a progress monitor
+	 * @throws InvocationTargetException
+	 */
+	protected void run(final Map projectSyncInfos, final IProject project,
+			IProgressMonitor monitor) throws InvocationTargetException {
+		try {
+			IResource[] resources = getIResourcesFrom(((SyncInfoSet) projectSyncInfos
+					.get(project)).getSyncInfos());
+			ResourceMapping[] selectedMappings = Utils
+					.getResourceMappings(resources);
+			ResourceMappingContext context = new SingleProjectSubscriberContext(
+					CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber(),
+					false, project);
+			SynchronizationScopeManager manager = new SingleProjectScopeManager(
+					getJobName(), selectedMappings, context, true, project);
+			manager.initialize(null);
+
+			// Pass the scheduling rule to the synchronizer so that sync change
+			// events and cache commits to disk are batched
+			EclipseSynchronizer.getInstance().run(getUpdateRule(manager),
+					new ICVSRunnable() {
+						public void run(IProgressMonitor monitor)
+								throws CVSException {
+							try {
+								runWithProjectRule(project,
+										(SyncInfoSet) projectSyncInfos
+												.get(project), monitor);
+							} catch (TeamException e) {
+								throw CVSException.wrapException(e);
+							}
+						}
+					}, Policy.subMonitorFor(monitor, 100));
+		} catch (TeamException e) {
+			throw new InvocationTargetException(e);
+		} catch (CoreException e) {
+			throw new InvocationTargetException(e);
+		}
+	}
+
+	private ISchedulingRule getUpdateRule(SynchronizationScopeManager manager) {
+		ISchedulingRule rule = null;
+		ResourceMapping[] mappings = manager.getScope().getMappings();
+		for (int i = 0; i < mappings.length; i++) {
+			ResourceMapping mapping = mappings[i];
+			IProject[] mappingProjects = mapping.getProjects();
+			for (int j = 0; j < mappingProjects.length; j++) {
+				if (rule == null) {
+					rule = mappingProjects[j];
+				} else {
+					rule = MultiRule.combine(rule, mappingProjects[j]);
+				}
+			}
+		}
+		return rule;
+	}
 	
 	/* (non-Javadoc)
 	 * @see org.eclipse.team.internal.ccvs.ui.subscriber.CVSSubscriberOperation#run(org.eclipse.core.runtime.IProgressMonitor)
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java
index bd264d4..9132fad 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/UpdateDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java
index 19fe129..78904b7 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/tags/TagSourceResourceAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,7 +56,7 @@ public class TagSourceResourceAdapter implements IAdaptable, IWorkbenchAdapter {
      * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
      */
     public ImageDescriptor getImageDescriptor(Object object) {
-        // No imgae descriptor
+        // No image descriptor
         return null;
     }
 
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
index e68201c..88ee1a9 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
 import org.eclipse.team.internal.ccvs.ui.operations.RemoteProjectFolder;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
 
 /**
  * Common superclass for CVS wizard pages. Provides convenience methods
@@ -105,9 +105,9 @@ public abstract class CVSWizardPage extends WizardPage {
 	 * Creates composite control and sets the default layout data.
 	 * @param parent  the parent of the new composite
 	 * @param numColumns  the number of columns for the new composite
-	 * @param grabExcess TODO
+	 * @param grabExcess <code>true</code> if the composite should take up the remaining horizontal and vertical space
 	 *
-	 * @return the newly-created coposite
+	 * @return the newly-created composite
 	 */
 	protected Composite createComposite(Composite parent, int numColumns, boolean grabExcess) {
 		final Composite composite = new Composite(parent, SWT.NULL);
@@ -231,7 +231,7 @@ public abstract class CVSWizardPage extends WizardPage {
 			new DecoratingLabelProvider(
 				new WorkbenchLabelProvider(), 
 				CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
-		tree.setSorter(new ResourceSorter(ResourceSorter.NAME));
+		tree.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		
 		GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
 		data.heightHint = LIST_HEIGHT_HINT;
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
index 145f31f..f708726 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsLocationSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,33 +12,20 @@
 package org.eclipse.team.internal.ccvs.ui.wizards;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.*;
 import java.util.List;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.*;
 import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
 import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
 import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
@@ -155,7 +142,7 @@ public class CheckoutAsLocationSelectionPage extends CVSWizardPage {
 	private Composite createUserSpecifiedProjectLocationGroup(Composite parent, boolean enabled) {
 	
 		// This group needs 3 columns
-		Composite projectGroup = createComposite(parent, 3, false);
+		Composite projectGroup = createComposite(parent, 3, true);
 		
 		// location label
 		locationLabel = new Label(projectGroup, SWT.NONE);
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java
index a84f310..2d63d04 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CheckoutAsMainPage.java
@@ -216,6 +216,10 @@ public class CheckoutAsMainPage extends CVSWizardPage {
 				setPageComplete(nameStatus.isOK());
 			}
 		}
+		if (intoProjectButton.getSelection()) {
+			setErrorMessage(null);
+			setPageComplete(true);
+		}
 	}
 	
 	public String getProjectName() {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
index f9f5a63..f57e201 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,21 +15,13 @@
 package org.eclipse.team.internal.ccvs.ui.wizards;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.ResourceMapping;
 import org.eclipse.core.resources.mapping.ResourceTraversal;
 import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.*;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -38,15 +30,21 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.team.core.IFileContentManager;
 import org.eclipse.team.core.Team;
-import org.eclipse.team.core.synchronize.*;
+import org.eclipse.team.core.diff.*;
+import org.eclipse.team.core.mapping.*;
+import org.eclipse.team.core.synchronize.SyncInfoSet;
 import org.eclipse.team.internal.ccvs.core.*;
 import org.eclipse.team.internal.ccvs.core.client.Command;
 import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
 import org.eclipse.team.internal.ccvs.ui.*;
+import org.eclipse.team.internal.ccvs.ui.actions.CommitAction;
+import org.eclipse.team.internal.ccvs.ui.mappings.AbstractCommitAction;
+import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceSubscriberContext;
 import org.eclipse.team.internal.ccvs.ui.operations.*;
-import org.eclipse.team.internal.core.subscribers.SubscriberSyncInfoCollector;
+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
 import org.eclipse.team.internal.ui.Policy;
-import org.eclipse.team.ui.synchronize.ResourceScope;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PlatformUI;
 
@@ -154,9 +152,8 @@ public class CommitWizard extends ResizableWizard {
     }
     
     private final IResource[] fResources;
-    private final SyncInfoSet fOutOfSyncInfos;
-    private final SyncInfoSet fUnaddedInfos;
-    private final CommitWizardParticipant fParticipant;
+    private IResource[] fUnaddedDiffs;
+    private final ModelSynchronizeParticipant fParticipant;
     
     private CommitWizardFileTypePage fFileTypePage;
     private CommitWizardCommitPage fCommitPage;
@@ -176,42 +173,59 @@ public class CommitWizard extends ResizableWizard {
         setDefaultPageImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_WIZBAN_NEW_LOCATION));
         
         fResources= resources;
-        fParticipant= new CommitWizardParticipant(new ResourceScope(fResources), this);
-        
-        SyncInfoSet infos = getAllOutOfSync();
-        fOutOfSyncInfos= new SyncInfoSet(infos.getNodes(new FastSyncInfoFilter.SyncInfoDirectionFilter(new int [] { SyncInfo.OUTGOING, SyncInfo.CONFLICTING })));
-        fUnaddedInfos= getUnaddedInfos(fOutOfSyncInfos);
+        ResourceMapping[] mappings = Utils.getResourceMappings(resources);
+        fParticipant = createWorkspaceParticipant(mappings, getShell());
+
+        getAllOutOfSync();
+        fUnaddedDiffs = getUnaddedResources(getDiffTree().getAffectedResources());
     }
 
+	private ModelSynchronizeParticipant createWorkspaceParticipant(ResourceMapping[] selectedMappings, Shell shell) {
+		ISynchronizationScopeManager manager = WorkspaceSubscriberContext.createWorkspaceScopeManager(selectedMappings, true, CommitAction.isIncludeChangeSets(shell, CVSUIMessages.SyncAction_1));
+		return new CommitWizardParticipant(WorkspaceSubscriberContext.createContext(manager, ISynchronizationContext.THREE_WAY), this);
+	}
+
 	public CommitWizard(SyncInfoSet infos, IJobChangeListener jobListener) throws CVSException {
 		this(infos);
 		this.jobListener = jobListener;
 	}
 
-	private SyncInfoSet getAllOutOfSync() throws CVSException {
-		final SubscriberSyncInfoCollector syncInfoCollector = fParticipant.getSubscriberSyncInfoCollector();
-            try {
-				PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
-				    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-				    	monitor.beginTask(CVSUIMessages.CommitWizard_4, IProgressMonitor.UNKNOWN); 
-				    	syncInfoCollector.waitForCollector(monitor);
-				    	monitor.done();
-				    }
-				});
-			} catch (InvocationTargetException e) {
-				throw CVSException.wrapException(e);
-			} catch (InterruptedException e) {
-				throw new OperationCanceledException();
-			} 
-		return fParticipant.getSyncInfoSet();
+	private void getAllOutOfSync() throws CVSException {
+		try {
+			ISynchronizationContext context = getParticipant().getContext();
+			SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) Utils
+					.getAdapter(context, SubscriberDiffTreeEventHandler.class);
+			handler.initializeIfNeeded();
+			Job.getJobManager().join(context, null);
+		} catch (InterruptedException e) {
+			throw new OperationCanceledException();
+		}
 	}
-    
+
     public boolean hasOutgoingChanges() {
-        return fOutOfSyncInfos.size() > 0;
+    	IResourceDiffTree tree = getDiffTree();
+		return tree != null && tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
+			public boolean select(IDiff diff) {
+				return AbstractCommitAction.hasLocalChange(diff);
+			}
+		});
     }
     
+    boolean hasConflicts() {
+    	IResourceDiffTree tree = getDiffTree();
+		return tree != null && tree.hasMatchingDiffs(ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() {
+			public boolean select(IDiff diff) {
+				if (diff instanceof IThreeWayDiff) {
+					IThreeWayDiff twd = (IThreeWayDiff) diff;
+					return twd.getDirection() == IThreeWayDiff.CONFLICTING;
+				}
+				return false;
+			}
+		});
+	}
+    
     public int getHighestProblemSeverity() {
-    	IResource[] resources = fOutOfSyncInfos.getResources();
+		IResource[] resources = getDiffTree().getAffectedResources();
     	int mostSeriousSeverity = -1;
     	
     	for (int i = 0; i < resources.length; i++) {
@@ -227,7 +241,11 @@ public class CommitWizard extends ResizableWizard {
     	
     	return mostSeriousSeverity;
     }
-    
+
+	IResourceDiffTree getDiffTree() {
+		return fParticipant.getContext().getDiffTree();
+	}
+
     public CommitWizardFileTypePage getFileTypePage() {
         return fFileTypePage;
     }
@@ -236,7 +254,7 @@ public class CommitWizard extends ResizableWizard {
         return fCommitPage;
     }
 
-    public CommitWizardParticipant getParticipant() {
+	public ModelSynchronizeParticipant getParticipant() {
         return fParticipant;
     }
 
@@ -253,25 +271,20 @@ public class CommitWizard extends ResizableWizard {
         if (comment == null)
             return false;
         
-        final SyncInfoSet infos= fCommitPage.getInfosToCommit();
-        if (infos.size() == 0)
-        	return true;
+        IResource[] resources = AbstractCommitAction.getOutgoingChanges(getDiffTree(), fCommitPage.getTraversalsToCommit(), null);
+        if (resources.length == 0)
+			return true;
         
-        final SyncInfoSet unadded;
+        final IResource[] unadded;
         try {
-            unadded = getUnaddedInfos(infos);
+            unadded = getUnaddedResources(resources);
         } catch (CVSException e1) {
             return false;
         }
         
-        final SyncInfoSet files;
-        try {
-            files = getFiles(infos);
-        } catch (CVSException e1) {
-            return false;
-        }
+        final IResource[] files = getFiles(resources);
         
-        final AddAndCommitOperation operation= new AddAndCommitOperation(getPart(), files.getResources(), unadded.getResources(), comment);
+        final AddAndCommitOperation operation= new AddAndCommitOperation(getPart(), files, unadded, comment);
         if (jobListener != null)
         	operation.setJobChangeListener(jobListener);
         
@@ -315,7 +328,7 @@ public class CommitWizard extends ResizableWizard {
         
         final Collection names= new HashSet();
         final Collection extensions= new HashSet();
-        getUnknownNamesAndExtension(fUnaddedInfos, names, extensions);
+        getUnknownNamesAndExtension(fUnaddedDiffs, names, extensions);
         
         if (names.size() + extensions.size() > 0) {
             fFileTypePage= new CommitWizardFileTypePage(extensions, names); 
@@ -419,50 +432,45 @@ public class CommitWizard extends ResizableWizard {
         return dialog.open();
     }
     
-    private static void getUnknownNamesAndExtension(SyncInfoSet infos, Collection names, Collection extensions) {
-        
-        final IFileContentManager manager= Team.getFileContentManager();
-        
-        for (final Iterator iter = infos.iterator(); iter.hasNext();) {
-            
-            final SyncInfo info = (SyncInfo)iter.next();
-            
-            IResource local = info.getLocal();
-            if (local instanceof IFile && manager.getType((IFile)local) == Team.UNKNOWN) {
-                final String extension= local.getFileExtension();
-                if (extension != null && !manager.isKnownExtension(extension)) {
-                    extensions.add(extension);
-                }
-                
-                final String name= local.getName();
-                if (extension == null && name != null && !manager.isKnownFilename(name))
-                    names.add(name);
-            }
-        }
-    }
-    
-    private static SyncInfoSet getUnaddedInfos(SyncInfoSet infos) throws CVSException {
-        final SyncInfoSet unadded= new SyncInfoSet();        
-        for (final Iterator iter = infos.iterator(); iter.hasNext();) {
-            final SyncInfo info = (SyncInfo) iter.next();
-            final IResource resource= info.getLocal();
-            if (!isAdded(resource))
-                unadded.add(info);
-        }
-        return unadded;
-    }
-    
-    private static SyncInfoSet getFiles(SyncInfoSet infos) throws CVSException {
-        final SyncInfoSet files= new SyncInfoSet();        
-        for (final Iterator iter = infos.iterator(); iter.hasNext();) {
-            final SyncInfo info = (SyncInfo) iter.next();
-            final IResource resource= info.getLocal();
-            if (resource.getType() == IResource.FILE)
-            	files.add(info);
-        }
-        return files;
+    private void getUnknownNamesAndExtension(IResource[] resources, Collection names, Collection extensions) {
+
+    	final IFileContentManager manager= Team.getFileContentManager();
+
+    	for (int i = 0; i < resources.length; i++) {
+
+    		IResource local = resources[i];
+    		if (local instanceof IFile && manager.getType((IFile)local) == Team.UNKNOWN) {
+    			final String extension= local.getFileExtension();
+    			if (extension != null && !manager.isKnownExtension(extension)) {
+    				extensions.add(extension);
+    			}
+
+    			final String name= local.getName();
+    			if (extension == null && name != null && !manager.isKnownFilename(name))
+    				names.add(name);
+    		}
+    	}
     }
     
+	private IResource[] getUnaddedResources(IResource[] resources) throws CVSException {
+		List/*<IResource>*/ unadded = new ArrayList/*<IResource>*/();
+		for (int i = 0; i < resources.length; i++) {
+			if (!isAdded(resources[i])) {
+				unadded.add(resources[i]);
+			}
+		}
+		return (IResource[]) unadded.toArray(new IResource[0]);
+	}
+
+	private IResource[] getFiles(IResource[] resources) {
+		final List files = new ArrayList();
+		for (int i = 0; i < resources.length; i++) {
+			if (resources[i].getType() == IResource.FILE)
+				files.add(resources[i]);
+		}
+		return (IResource[]) files.toArray(new IResource[0]);
+	}
+	
     private static boolean isAdded(IResource resource) throws CVSException {
         final ICVSResource cvsResource = CVSWorkspaceRoot.getCVSResourceFor(resource);
         if (cvsResource.isFolder()) {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
index 08e3e56..de8e8e3 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardCommitPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,8 +15,10 @@ package org.eclipse.team.internal.ccvs.ui.wizards;
 import java.util.Arrays;
 
 import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.mapping.ResourceTraversal;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.layout.GridLayoutFactory;
@@ -33,16 +35,13 @@ import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
+import org.eclipse.team.core.diff.*;
 import org.eclipse.team.internal.ccvs.ui.*;
 import org.eclipse.team.internal.ccvs.ui.IHelpContextIds;
 import org.eclipse.team.internal.ccvs.ui.mappings.ChangeSetComparator;
 import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
 import org.eclipse.team.internal.core.subscribers.ChangeSet;
 import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
 import org.eclipse.team.ui.synchronize.*;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.PageBook;
@@ -73,9 +72,9 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
 
 	private boolean fIsEmpty;
     
-    private CompareViewerSwitchingPane compareViewerPane;
 	private SashForm horizontalSash;
 	private SashForm verticalSash;
+	private Splitter placeholder;
 	private boolean showCompare;
 	
     public CommitWizardCommitPage(IResource [] resources, CommitWizard wizard) {
@@ -89,6 +88,18 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
         fCommentArea.setProposedComment(getProposedComment(resources));
         if (resources.length > 0)
             fCommentArea.setProject(resources[0].getProject());
+        fWizard.getDiffTree().addDiffChangeListener(new IDiffChangeListener() {
+			public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
+				// ignore property changes
+			}
+			public void diffsChanged(IDiffChangeEvent event, IProgressMonitor monitor) {
+				Utils.syncExec(new Runnable() {
+					public void run() {
+						updateEnablements();
+					}
+				}, CommitWizardCommitPage.this.getControl());
+			}
+		});
     }
     
     /* (non-Javadoc)
@@ -112,20 +123,12 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
         verticalSash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
 
         createCommentArea(verticalSash, converter);
-        
+
+        placeholder = new Splitter(horizontalSash, SWT.VERTICAL /*any*/);
+        placeholder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
         createChangesArea(verticalSash, converter);
 
-        compareViewerPane = new CompareViewerSwitchingPane(horizontalSash, SWT.BORDER | SWT.FLAT) {
-			protected Viewer getViewer(Viewer oldViewer, Object input) {
-				CompareConfiguration cc = new CompareConfiguration();
-				cc.setLeftEditable(false);
-				cc.setRightEditable(false);
-				
-				return CompareUI.findContentViewer(oldViewer, input, this, cc);	
-			}
-		};
-        compareViewerPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-        
         IDialogSettings section = getDialogSettings().getSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
 		showCompare = section == null ? false : section.getBoolean(SHOW_COMPARE);
 		int vWeight1 = 50;
@@ -164,10 +167,6 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
         validatePage(false);
     }
     
-    public void setCompareInput(final Object input) {
-		compareViewerPane.setInput(input);
-    }
-    
     private void createCommentArea(Composite parent, PixelConverter converter) {
         Composite c = new Composite(parent, SWT.NONE);
         c.setLayout(GridLayoutFactory.fillDefaults().margins(0, 0).create());
@@ -182,8 +181,8 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
     
     private void createChangesArea(Composite parent, PixelConverter converter) {
         
-        CommitWizardParticipant participant= fWizard.getParticipant();
-        int size = participant.getSyncInfoSet().size();
+        ISynchronizeParticipant participant= fWizard.getParticipant();
+        int size = fWizard.getDiffTree().getAffectedResources().length;
         if (size > getFileDisplayThreshold()) {
             // Create a page book to allow eventual inclusion of changes
             bottomChild = new PageBook(parent, SWT.NONE);
@@ -201,6 +200,8 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
             });
             showChanges.setLayoutData(new GridData());
             bottomChild.showPage(changeDesc);
+            // Hide compare pane
+            horizontalSash.setMaximizedControl(verticalSash);
         } else {
             final Composite composite= new Composite(parent, SWT.NONE);
             composite.setLayout(SWTUtils.createGridLayout(1, converter, SWTUtils.MARGINS_NONE));
@@ -215,17 +216,48 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
         Control c = createChangesPage(bottomChild, fWizard.getParticipant());
         bottomChild.setLayoutData(SWTUtils.createGridData(SWT.DEFAULT, SWT.DEFAULT, SWT.FILL, SWT.FILL, true, true));
         bottomChild.showPage(c);
+        // Restore compare pane. It has been hidden when file display threshold was reached.
+        if (showCompare) {
+        	horizontalSash.setMaximizedControl(null);
+        }
         Dialog.applyDialogFont(getControl());
         ((Composite)getControl()).layout();
     }
 
-    private Control createChangesPage(final Composite composite, CommitWizardParticipant participant) {
+    private Control createChangesPage(final Composite composite, ISynchronizeParticipant participant) {
         fConfiguration= participant.createPageConfiguration();
-        fPagePane= new ParticipantPagePane(getShell(), true /* modal */, fConfiguration, participant);
-        Control control = fPagePane.createPartControl(composite);
-        return control;
+		CompareConfiguration cc = new CompareConfiguration();
+		cc.setLeftEditable(false);
+		cc.setRightEditable(false);
+		ParticipantPageCompareEditorInput input = new CommitWizardParticipantPageCompareEditorInput(cc, fConfiguration, participant);
+		Control control = input.createContents(composite);
+		control.setLayoutData(new GridData(GridData.FILL_BOTH));
+		return control;
     }
+    
+	private class CommitWizardParticipantPageCompareEditorInput extends
+			ParticipantPageCompareEditorInput {
+		public CommitWizardParticipantPageCompareEditorInput(
+				CompareConfiguration cc,
+				ISynchronizePageConfiguration configuration,
+				ISynchronizeParticipant participant) {
+			super(cc, configuration, participant);
+		}
+
+		protected boolean isOfferToRememberParticipant() {
+			return false;
+		}
 
+		protected CompareViewerSwitchingPane createContentViewerSwitchingPane(
+				Splitter parent, int style, CompareEditorInput cei) {
+			return super.createContentViewerSwitchingPane(placeholder, style, cei);
+		}
+
+		protected void setPageDescription(String title) {
+			super.setPageDescription(TeamUIMessages.ParticipantPageSaveablePart_0);
+		}
+    }
+    
 	private int getFileDisplayThreshold() {
         return CVSUIPlugin.getPlugin().getPreferenceStore().getInt(ICVSUIConstants.PREF_COMMIT_FILES_DISPLAY_THRESHOLD);
     }
@@ -280,9 +312,10 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
             final Viewer viewer= fConfiguration.getPage().getViewer();
             viewer.refresh();
         }
-        fCommentArea.setFocus();
+        updateEnablements();
+        setFocus();
     }
-    
+
     protected void expand() {
         if (fConfiguration != null) {
             final Viewer viewer= fConfiguration.getPage().getViewer();
@@ -312,11 +345,10 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
         	fHasConflicts = false;
         	fIsEmpty = false;
         	
-    		SyncInfoSet set = fConfiguration.getSyncInfoSet();
-    		if (set.hasConflicts()) {
+			if (fWizard.hasConflicts()) {
     			fHasConflicts = true;
     		}
-    		if (set.isEmpty()) {
+			if (!fWizard.hasOutgoingChanges()) {
     			fIsEmpty = true;
     		}
         }
@@ -361,28 +393,11 @@ public class CommitWizardCommitPage extends WizardPage implements IPropertyChang
     protected IWizardContainer getContainer() {
         return super.getContainer();
     }
-    
-    public SyncInfoSet getInfosToCommit() {
 
-        final SyncInfoSet infos= new SyncInfoSet();
-        if (fConfiguration == null) {
-            return fWizard.getParticipant().getSyncInfoSet();
-        }
-        
-        final IDiffElement root = (ISynchronizeModelElement)fConfiguration.getProperty(SynchronizePageConfiguration.P_MODEL);
-        final IDiffElement [] elements= Utils.getDiffNodes(new IDiffElement [] { root });
-        
-        for (int i = 0; i < elements.length; i++) {
-            if (elements[i] instanceof SyncInfoModelElement) {
-                SyncInfo syncInfo = ((SyncInfoModelElement)elements[i]).getSyncInfo();
-                int direction = syncInfo.getKind() & SyncInfo.DIRECTION_MASK;
-				if (direction == SyncInfo.OUTGOING || direction == SyncInfo.CONFLICTING)
-                	infos.add(syncInfo);
-            }
-        }  
-        return infos;
+	ResourceTraversal[] getTraversalsToCommit() {
+		return fWizard.getParticipant().getContext().getScope().getTraversals();
     }
-    
+
     /* (non-Javadoc)
      * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
      */
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java
index 0509c1f..38cdc69 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CommitWizardParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,25 +16,28 @@ import java.lang.reflect.InvocationTargetException;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.*;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.internal.ccvs.ui.*;
+import org.eclipse.team.core.mapping.provider.SynchronizationContext;
+import org.eclipse.team.internal.ccvs.ui.CVSDecoration;
+import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceChangeSetCapability;
+import org.eclipse.team.internal.ccvs.ui.mappings.WorkspaceModelParticipant;
 import org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipantLabelDecorator;
-import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant;
 import org.eclipse.team.internal.ui.Utils;
-import org.eclipse.team.internal.ui.synchronize.*;
+import org.eclipse.team.internal.ui.synchronize.ChangeSetCapability;
+import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
+import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
 import org.eclipse.team.ui.synchronize.*;
 
 /**
  * A participant that uses our decorator instead of the standard one.
  */
-public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
+public class CommitWizardParticipant extends WorkspaceModelParticipant {
 	
     /**
      * The actions to be displayed in the context menu.
@@ -51,6 +54,22 @@ public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
             });
         }
     }
+    
+    private WorkspaceChangeSetCapability capability;
+    
+    public ChangeSetCapability getChangeSetCapability() {
+    	if (capability == null) {
+            capability = new WorkspaceChangeSetCapability() {
+            	public boolean supportsCheckedInChangeSets() {
+            		return false;
+            	}
+            	public boolean enableActiveChangeSetsFor(ISynchronizePageConfiguration configuration) {
+            		return false;
+            	};
+            };
+        }
+        return capability;
+    }
 
     /**
      * An extension of the standard label decorator which configures the keyword substitution 
@@ -80,32 +99,27 @@ public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
     final CommitWizard fWizard;
 	protected Action showComparePaneAction;
     
-    public CommitWizardParticipant(ISynchronizeScope scope, CommitWizard wizard) {
-        super(scope);
+    public CommitWizardParticipant(SynchronizationContext context, CommitWizard wizard) {
+        super(context);
         fWizard= wizard;
     }
     
     protected ILabelDecorator getLabelDecorator(ISynchronizePageConfiguration configuration) {
         return new Decorator(configuration, fWizard);
     }
-    
-    public ChangeSetCapability getChangeSetCapability() {
-        return null; // we don't want that button
-    }
-    
+
     /* (non-Javadoc)
      * @see org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceSynchronizeParticipant#initializeConfiguration(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
      */
-    protected void initializeConfiguration( final ISynchronizePageConfiguration configuration) {
+    protected void initializeConfiguration(final ISynchronizePageConfiguration configuration) {
         super.initializeConfiguration(configuration);
-        configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ACTION_GROUP, ISynchronizePageConfiguration.LAYOUT_GROUP});
+        configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ACTION_GROUP, ISynchronizePageConfiguration.NAVIGATE_GROUP});
         configuration.setProperty(ISynchronizePageConfiguration.P_CONTEXT_MENU, ISynchronizePageConfiguration.DEFAULT_CONTEXT_MENU);
 		configuration.addMenuGroup(
 				ISynchronizePageConfiguration.P_CONTEXT_MENU, 
 				CONTEXT_MENU_CONTRIBUTION_GROUP_3);
         configuration.addActionContribution(new ActionContribution());
-        configuration.setRunnableContext(fWizard.getContainer());
-        
+
         // Wrap the container so that we can update the enablements after the runnable
         // (i.e. the container resets the state to what it was at the beginning of the
         // run even if the state of the page changed. Remove from View changes the state)
@@ -139,27 +153,9 @@ public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
 				ISelection selection = configuration.getSite().getSelectionProvider().getSelection();
 				if(selection instanceof IStructuredSelection) {
 					final Object obj = ((IStructuredSelection) selection).getFirstElement();
-					if (obj instanceof SyncInfoModelElement) {
-						try {
-							fWizard.getContainer().run(true, true, new IRunnableWithProgress() {
-								public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-									try {
-										((SyncInfoModelElement)obj).cacheContents(monitor);
-									} catch (TeamException e) {
-										throw new InvocationTargetException(e);
-									}
-							    	fWizard.getContainer().getShell().getDisplay().syncExec(new Runnable() {
-										public void run() {
-											fWizard.getCommitPage().showComparePane(true);
-											showComparePaneAction.setChecked(true);
-											fWizard.getCommitPage().setCompareInput(obj);						
-										}
-							    	});
-								}
-							});
-						} catch (InvocationTargetException e) {
-						} catch (InterruptedException e) {
-						}
+					if (fWizard.getParticipant().hasCompareInputFor(obj)) {
+						fWizard.getCommitPage().showComparePane(true);
+						showComparePaneAction.setChecked(true);
 					}
 				}
 			}
@@ -177,4 +173,27 @@ public class CommitWizardParticipant extends WorkspaceSynchronizeParticipant {
     	IDialogSettings section = fWizard.getDialogSettings().getSection(CommitWizard.COMMIT_WIZARD_DIALOG_SETTINGS);
 		return section == null ? false : section.getBoolean(CommitWizardCommitPage.SHOW_COMPARE);
     }
+
+	protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
+		return new WorkspaceMergeActionGroup() {
+			protected void addToContextMenu(String mergeActionId, Action action, IMenuManager manager) {
+				if (mergeActionId == SynchronizationActionProvider.MERGE_ACTION_ID
+						|| mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID
+						|| mergeActionId == SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID) {
+					// skip merge actions
+					return;
+				}
+				super.addToContextMenu(mergeActionId, action, manager);
+			}
+
+			protected void appendToGroup(String menuId, String groupId,	IAction action) {
+				if (menuId == ISynchronizePageConfiguration.P_CONTEXT_MENU
+						&& groupId == WorkspaceModelParticipant.CONTEXT_MENU_COMMIT_GROUP_1) {
+					// skip commit action
+					return;
+				}
+				super.appendToGroup(menuId, groupId, action);
+			}
+		};
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
index 678a0be..b2b9d18 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/GenerateDiffFileWizard.java
@@ -1116,7 +1116,6 @@ public class GenerateDiffFileWizard extends Wizard {
 
 			Group diffTypeGroup = new Group(composite, SWT.NONE);
 			layout = new GridLayout();
-			layout.marginHeight = 0;
 			diffTypeGroup.setLayout(layout);
 			GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
 			diffTypeGroup.setLayoutData(data);
@@ -1601,7 +1600,7 @@ public class GenerateDiffFileWizard extends Wizard {
 	}
 
 	private void generateDiffToClipboard(boolean multiPatch, boolean useProjectRelativePaths) throws TeamException {
-		DiffOperation diffop = new ClipboardDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
+		DiffOperation diffop = new ClipboardDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources, IResource.DEPTH_ZERO),optionsPage.getOptions(),multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
 		try {
 			diffop.run();
 		} catch (InvocationTargetException e) {}
@@ -1611,10 +1610,10 @@ public class GenerateDiffFileWizard extends Wizard {
 	private void generateDiffToFile(File file, boolean multiPatch, boolean useProjectRelativePaths) throws TeamException {
 		DiffOperation diffop = null;
 		if (locationPage.selectedLocation == LocationPage.WORKSPACE){
-			diffop = new WorkspaceFileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
+			diffop = new WorkspaceFileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources, IResource.DEPTH_ZERO),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
 		}
 		else {
-			diffop = new FileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
+			diffop = new FileDiffOperation(part,RepositoryProviderOperation.asResourceMappers(resources, IResource.DEPTH_ZERO),optionsPage.getOptions(),file, multiPatch, useProjectRelativePaths, optionsPage.patchRoot);
 		}
 
 		try {
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java
index 7f44eeb..7f52277 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ICVSWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,29 +8,26 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-/*
- * Created on 16-Mar-2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
 package org.eclipse.team.internal.ccvs.ui.wizards;
 
 import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.IWizardPage;
 
 /**
- * Extended wizard interface that differentiates retrieving
- * the next page for display vs. for determining it's state
+ * Extended wizard interface that differentiates retrieving the next page for
+ * display vs. for determining it's state.
  */
 public interface ICVSWizard extends IWizard {
-	
+
 	/**
 	 * Get the wizard page that follows the given page. If
-	 * aboutToShow is true then the page will be shown.
-	 * Otherwise, only its state will be queried.
-	 * @param page a wizard page
-	 * @param aboutToShow true iof the page returned will be shown
+	 * <code>aboutToShow</code> is <code>true</code> then the page will be
+	 * shown. Otherwise, only its state will be queried.
+	 * 
+	 * @param page
+	 *            a wizard page
+	 * @param aboutToShow
+	 *            true if the page returned will be shown
 	 * @return the next wizard page
 	 */
 	public IWizardPage getNextPage(IWizardPage page, boolean aboutToShow);
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java
index 13bdf0d..8e8b9a0 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/MergeWizard.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,10 +11,7 @@
 package org.eclipse.team.internal.ccvs.ui.wizards;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.mapping.ResourceMapping;
@@ -76,7 +73,7 @@ public class MergeWizard extends Wizard {
 			if (isShowModelSync()) {
 				ModelMergeParticipant participant = ModelMergeParticipant.getMatchingParticipant(mappings, startTag, endTag);
 				if(participant == null) {
-			    	CVSMergeSubscriber s = new CVSMergeSubscriber(getProjects(resources), startTag, endTag);
+			    	CVSMergeSubscriber s = new CVSMergeSubscriber(getProjects(resources), startTag, endTag, true);
 			    	try {
 						new ModelMergeOperation(getPart(), mappings, s, page.isOnlyPreviewConflicts()).run();
 					} catch (InvocationTargetException e) {
@@ -97,7 +94,7 @@ public class MergeWizard extends Wizard {
 	            }
 				MergeSynchronizeParticipant participant = MergeSynchronizeParticipant.getMatchingParticipant(resources, startTag, endTag);
 				if(participant == null) {
-					CVSMergeSubscriber s = new CVSMergeSubscriber(resources, startTag, endTag);
+					CVSMergeSubscriber s = new CVSMergeSubscriber(resources, startTag, endTag, false);
 					participant = new MergeSynchronizeParticipant(s);
 					TeamUI.getSynchronizeManager().addSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
 				}
@@ -112,7 +109,7 @@ public class MergeWizard extends Wizard {
         // Only do the extra work if the model is a logical model (i.e. not IResource)
         if (!WorkspaceTraversalAction.isLogicalModel(mappings))
             return resources;
-        CVSMergeSubscriber s = new CVSMergeSubscriber(WorkspaceTraversalAction.getProjects(resources), startTag, endTag);
+        CVSMergeSubscriber s = new CVSMergeSubscriber(WorkspaceTraversalAction.getProjects(resources), startTag, endTag, false);
         IResource[] allResources = WorkspaceTraversalAction.getResourcesToCompare(mappings, s);
         s.cancel();
         return allResources;
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
index 3e6f758..02b5f91 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -144,15 +144,17 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 		revisionSelectionPane.setLayoutData(data);
 		historyTableProvider = new HistoryTableProvider();
 		revisionsTable = createRevisionSelectionTable(revisionSelectionPane, historyTableProvider);
-		revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane); 
+		revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane);
 		
 		// Bottom: File content viewer
 		fileContentPane = new CompareViewerSwitchingPane(vsplitter, SWT.BORDER | SWT.FLAT) {
 			protected Viewer getViewer(Viewer oldViewer, Object input) {
-				return CompareUI.findContentViewer(oldViewer, input, this, null);	
+				return CompareUI.findContentViewer(oldViewer, input, this, null);
 			}
 		};
-						
+
+		hsplitter.setWeights(new int[] { 40, 60 });
+
 		initializeValues();
 		updateWidgetEnablements();
         Dialog.applyDialogFont(parent);
@@ -164,7 +166,7 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 			public Object[] getElements(Object inputElement) {
 				ILogEntry[] entries = getSelectedEntries();
 				if (entries != null) return entries;
-				return new Object[0];		
+				return new Object[0];
 			}
 			public void dispose() {
 			}
@@ -205,12 +207,12 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 							ILogEntry entry = (ILogEntry)filesToRestore.get(element);
 							text = super.decorateText(input, element);
 							if (entry != null) {
-								text = NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileToRestore, new String[] { text, entry.getRevision() }); 
+								text = NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileToRestore, new String[] { text, entry.getRevision() });
 							}
 						}
 						return text;
 					}
-				}, 
+				},
 				CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
 		tree.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		tree.setInput(treeInput);
@@ -241,14 +243,14 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 			IFile file = (IFile) iter.next();
 			if (file.exists()) {
 				setPageComplete(false);
-				setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileExists, new String[] { file.getName() })); 
+				setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileExists, new String[] { file.getName() }));
 				return;
 			}
 			
 			ILogEntry entry = (ILogEntry) filesToRestore.get(file);
 			if (entry.isDeletion())  {
 				setPageComplete(false);
-				setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionIsDeletion, new String[] { entry.getRevision(), file.getName() })); 
+				setErrorMessage(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionIsDeletion, new String[] { entry.getRevision(), file.getName() }));
 				return;
 			}
 		}
@@ -309,13 +311,13 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 		if (folder == null) return;
 		
 		if (fileSelectionPane != null && !fileSelectionPane.isDisposed()) {
-			fileSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileSelectionPaneTitle, new String[] { folder.getProject().getName() })); 
+			fileSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_fileSelectionPaneTitle, new String[] { folder.getProject().getName() }));
 			fileSelectionPane.setImage(CompareUI.getImage(folder.getProject()));
 		}
 		
 		if (revisionSelectionPane != null && !revisionSelectionPane.isDisposed()) {
 			if (selectedFile == null) {
-				revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane); 
+				revisionSelectionPane.setText(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_emptyRevisionPane);
 				revisionSelectionPane.setImage(null);
 			}
 		}
@@ -355,7 +357,7 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
 			}
 		}
 		// Set the titlebar text for the revisions table
-		revisionSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionSelectionPaneTitle, new String[] { selectedFile.getName() })); 
+		revisionSelectionPane.setText(NLS.bind(CVSUIMessages.RestoreFromRepositoryFileSelectionPage_revisionSelectionPaneTitle, new String[] { selectedFile.getName() }));
 		revisionSelectionPane.setImage(CompareUI.getImage(selectedFile));
 		// Clear the file content pane
 		fileContentPane.setInput(null);
diff --git a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java
index 9963e30..a980cdc 100644
--- a/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java
+++ b/eclipse/plugins/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardSyncPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.team.internal.ccvs.ui.wizards;
 
 import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.Splitter;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.*;
@@ -23,6 +24,7 @@ import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.core.diff.*;
 import org.eclipse.team.core.mapping.IResourceDiffTree;
@@ -43,7 +45,7 @@ public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeL
 	private static final String PAGE_HEIGHT = "SyncPageHeight"; //$NON-NLS-1$
 	private static final String PAGE_WIDTH = "SyncPageWidth"; //$NON-NLS-1$
 	
-	private ParticipantPageSaveablePart input;
+	private ParticipantPageCompareEditorInput input;
 	private ISynchronizePageConfiguration configuration;
 	private IProject project;
 	
@@ -98,7 +100,13 @@ public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeL
 	private Control createSyncPage(PageBook pageBook) {
 		Composite composite = createComposite(pageBook, 1, false);
 		input = createCompareInput();
-		input.createPartControl(composite);
+		Control c = input.createContents(composite);
+		if (c instanceof Splitter) {
+			Splitter s = (Splitter) c;
+			// hide the content pane by maximizing the outline control
+			s.setMaximizedControl(s.getChildren()[0]);
+		}
+		c.setLayoutData(new GridData(GridData.FILL_BOTH));
 		getDiffTree().addDiffChangeListener(this);
 		
 		fCheckbox= new Button(composite, SWT.CHECK);
@@ -135,7 +143,7 @@ public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeL
 		});
 	}
 	
-	private ParticipantPageSaveablePart createCompareInput() {	
+	private ParticipantPageCompareEditorInput createCompareInput() {	
 		ISynchronizeParticipant participant = createParticipant();
 		configuration = participant.createPageConfiguration();
 		configuration.setProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU, new String[] {ISynchronizePageConfiguration.NAVIGATE_GROUP, SharingWizardPageActionGroup.ACTION_GROUP});
@@ -146,8 +154,11 @@ public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeL
 		CompareConfiguration cc = new CompareConfiguration();
 		cc.setLeftEditable(false);
 		cc.setRightEditable(false);
-		ParticipantPageSaveablePart part = new ParticipantPageSaveablePart(getShell(), cc, configuration, participant);
-		part.setShowContentPanes(false);
+		ParticipantPageCompareEditorInput part = new ParticipantPageCompareEditorInput(cc, configuration, participant) {
+			protected boolean isOfferToRememberParticipant() {
+				return false;
+			}
+		};
 		return part;
 	}
 
@@ -161,7 +172,6 @@ public class SharingWizardSyncPage extends CVSWizardPage implements IDiffChangeL
 	public void dispose() {
 		if (input != null) {
 			input.getParticipant().dispose();
-			input.dispose();
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.team.ui/.options b/eclipse/plugins/org.eclipse.team.ui/.options
index c1e86f7..1128797 100644
--- a/eclipse/plugins/org.eclipse.team.ui/.options
+++ b/eclipse/plugins/org.eclipse.team.ui/.options
@@ -7,4 +7,7 @@ org.eclipse.team.ui/debug=false
 org.eclipse.team.ui/syncmodels=false
 
 # Shows history debugging information
-org.eclipse.team.ui/history=false
\ No newline at end of file
+org.eclipse.team.ui/history=false
+
+# Shows DnD related debugging information
+org.eclipse.team.ui/dnd=false
diff --git a/eclipse/plugins/org.eclipse.team.ui/.settings/.api_filters b/eclipse/plugins/org.eclipse.team.ui/.settings/.api_filters
index 9cc6877..3b0ef60 100644
--- a/eclipse/plugins/org.eclipse.team.ui/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.team.ui/.settings/.api_filters
@@ -1,5 +1,33 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.team.ui" version="2">
+    <resource path="src/org/eclipse/team/ui/PageSaveablePart.java" type="org.eclipse.team.ui.PageSaveablePart">
+        <filter id="336744520">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.ui.PageSaveablePart"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java" type="org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration">
+        <filter id="403853384">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java" type="org.eclipse.team.ui.synchronize.ISynchronizeParticipant">
+        <filter id="403853384">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.ui.synchronize.ISynchronizeParticipant"/>
+            </message_arguments>
+        </filter>
+    </resource>
+    <resource path="src/org/eclipse/team/ui/synchronize/ISynchronizeView.java" type="org.eclipse.team.ui.synchronize.ISynchronizeView">
+        <filter id="403853384">
+            <message_arguments>
+                <message_argument value="org.eclipse.team.ui.synchronize.ISynchronizeView"/>
+            </message_arguments>
+        </filter>
+    </resource>
     <resource path="src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java" type="org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant">
         <filter id="388018290">
             <message_arguments>
@@ -28,11 +56,4 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java" type="org.eclipse.team.ui.synchronize.ISynchronizeParticipant">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.team.ui.synchronize.ISynchronizeParticipant"/>
-            </message_arguments>
-        </filter>
-    </resource>
 </component>
diff --git a/eclipse/plugins/org.eclipse.team.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.team.ui/META-INF/MANIFEST.MF
index 0421b63..eff5a91 100644
--- a/eclipse/plugins/org.eclipse.team.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.team.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.team.ui; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.102.qualifier
 Bundle-Activator: org.eclipse.team.internal.ui.TeamUIPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -15,6 +15,7 @@ Export-Package: org.eclipse.team.internal.ui;x-friends:="org.eclipse.team.cvs.ss
  org.eclipse.team.internal.ui.registry;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
  org.eclipse.team.internal.ui.synchronize;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
  org.eclipse.team.internal.ui.synchronize.actions;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
+ org.eclipse.team.internal.ui.synchronize.patch;x-friends:="org.eclipse.jdt.ui",
  org.eclipse.team.internal.ui.wizards;x-friends:="org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui",
  org.eclipse.team.ui,
  org.eclipse.team.ui.history,
@@ -29,9 +30,8 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=op
  org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.ui.navigator;bundle-version="[3.3.0,4.0.0)",
  org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)"
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
 Import-Package: com.ibm.icu.text,
  com.ibm.icu.util
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.compare/icons/full/obj16/hunk_obj.gif b/eclipse/plugins/org.eclipse.team.ui/icons/full/obj/hunk_obj.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.compare/icons/full/obj16/hunk_obj.gif
copy to eclipse/plugins/org.eclipse.team.ui/icons/full/obj/hunk_obj.gif
diff --git a/eclipse/plugins/org.eclipse.team.ui/plugin.properties b/eclipse/plugins/org.eclipse.team.ui/plugin.properties
index af0be47..0b8476b 100644
--- a/eclipse/plugins/org.eclipse.team.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.team.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -17,8 +17,9 @@ synchronizeParticipants=Synchronize Participants
 synchronizeWizards=Synchronize Wizards
 logicalViews=Logical Synchronize Views
 
-PreferenceKeywords.Team=team
+PreferenceKeywords.Team=team apply patch synchronize compare
 PreferenceKeywords.FileContent=team file content type
+PreferenceKeywords.ProjectSet=repository
 TeamPreferencePage.name=Team
 TextPreferencePage.name=File Content
 IgnorePreferencePage.name=Ignored Resources
@@ -78,3 +79,8 @@ CompareWithEachOtherAction.label= &Each Other
 CompareWithEachOtherAction.tooltip= Compare the Selected Resources
 
 ignoresTransferName= Team Ignored Resources Transfer
+PatchModelProvider=Patch Contents
+PatchNavigatorContent=Patch
+PatchSyncParticipant=Patch
+PatchSyncWizard=Synchronize with Patch
+PatchSyncWizard_description=Synchronize resources with patch contents.
diff --git a/eclipse/plugins/org.eclipse.team.ui/plugin.xml b/eclipse/plugins/org.eclipse.team.ui/plugin.xml
index 9ae149d..b51cd55 100644
--- a/eclipse/plugins/org.eclipse.team.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.team.ui/plugin.xml
@@ -17,6 +17,10 @@
     <keyword
             label="%PreferenceKeywords.FileContent"
             id="org.eclipse.team.ui.team.fileContent"/>
+    <keyword
+          id="org.eclipse.team.ui.team.projectSet"
+          label="%PreferenceKeywords.ProjectSet">
+    </keyword>
    </extension>   
    <extension
          point="org.eclipse.ui.preferencePages">
@@ -60,6 +64,9 @@
             <separator
                   name="group1">
             </separator>
+            <groupMarker
+                  name="applyPatchGroup">
+            </groupMarker>
             <separator
                   name="group2">
             </separator>
@@ -165,14 +172,14 @@
          </action>
       </objectContribution>
       <objectContribution
-            objectClass="org.eclipse.core.resources.IResource"
+            objectClass="org.eclipse.core.resources.mapping.ResourceMapping"
             adaptable="true"
-            id="org.eclipse.team.ui.ResourceContributions">
+            id="org.eclipse.team.ui.ResourceMappingContributions">
          <action
                label="%ApplyPatch.label"
                tooltip="%ApplyPatch.tooltip"
                class="org.eclipse.team.internal.ui.actions.ApplyPatchAction"
-               menubarPath="team.main/group1"
+               menubarPath="team.main/applyPatchGroup"
                enablesFor="*"
                definitionId="org.eclipse.team.ui.applyPatch"
                id="org.eclipse.team.ui.applyPatch">
@@ -256,6 +263,9 @@
          <selection
                class="org.eclipse.core.resources.IProject">
          </selection>
+         <keywordReference
+               id="org.eclipse.team.ui.team.projectSet">
+         </keywordReference>
       </wizard>
    </extension>
 <!-- ****************** Export Wizards ********************* -->
@@ -277,6 +287,9 @@
          <selection
                class="org.eclipse.core.resources.IProject">
          </selection>
+         <keywordReference
+               id="org.eclipse.team.ui.team.projectSet">
+         </keywordReference>
       </wizard>
    </extension>
 <!-- ***************** Perspective Extensions ********************** -->
@@ -290,6 +303,9 @@
          <showInPart
                id="org.eclipse.team.ui.GenericHistoryView">
          </showInPart>
+         <showInPart
+               id="org.eclipse.team.sync.views.SynchronizeView">
+         </showInPart>
       </perspectiveExtension>
    </extension>
 <!-- ***************** Actions ********************** -->
@@ -313,10 +329,11 @@
             id="org.eclipse.team.ui.synchronizeLast">
       </command>
       <command
-            name="%Command.applyPatch.name"
             categoryId="org.eclipse.team.ui.category.team"
+            defaultHandler="org.eclipse.team.internal.ui.actions.ApplyPatchAction"
             description="%Command.applyPatch.description"
-            id="org.eclipse.team.ui.applyPatch">
+            id="org.eclipse.team.ui.applyPatch"
+            name="%Command.applyPatch.name">
       </command>
       <command
        		name="%Synchronizing.perspective"
@@ -561,4 +578,125 @@
          </mapping>
       </transfer>
    </extension>
+   
+   <!-- ******* Apply Patch in Sync View ******** -->
+   <extension
+         point="org.eclipse.team.ui.synchronizeWizards">
+      <wizard
+            class="org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchSynchronizationWizard"
+            description="%PatchSyncWizard_description"
+            icon="icons/full/obj/hunk_obj.gif"
+            id="org.eclipse.team.ui.applyPatchWizard"
+            name="%PatchSyncWizard">
+      </wizard>
+   </extension>
+   <extension
+         point="org.eclipse.team.ui.synchronizeParticipants">
+      <participant
+            class="org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchModelSynchronizeParticipant"
+            icon="icons/full/obj/hunk_obj.gif"
+            id="org.eclipse.team.ui.applyPatchModelParticipant"
+            name="%PatchSyncParticipant"
+            persistent="false">
+      </participant>
+   </extension>
+   <extension
+         id="patchModelProvider"
+         name="%PatchModelProvider"
+         point="org.eclipse.core.resources.modelProviders">
+      <modelProvider
+            class="org.eclipse.team.internal.ui.synchronize.patch.PatchModelProvider"/>
+      <extends-model id="org.eclipse.core.resources.modelProvider"/>
+   </extension>
+      <extension
+            point="org.eclipse.ui.navigator.navigatorContent">
+         <navigatorContent
+               contentProvider="org.eclipse.team.internal.ui.synchronize.patch.PatchSyncContentProvider"
+               icon="icons/full/obj/hunk_obj.gif"
+               id="org.eclipse.team.ui.patchSyncNavigatorContent"
+               labelProvider="org.eclipse.team.internal.ui.synchronize.patch.PatchSyncLabelProvider"
+               name="%PatchNavigatorContent"
+               priority="normal">
+            <enablement>
+               <or>
+                  <instanceof
+                        value="org.eclipse.team.internal.ui.synchronize.patch.PatchWorkspace">
+                  </instanceof>
+                  <instanceof
+                        value="org.eclipse.compare.internal.patch.PatchDiffNode">
+                  </instanceof>
+                  <instanceof
+                        value="org.eclipse.team.internal.ui.synchronize.patch.PatchModelProvider">
+                  </instanceof>
+               </or>
+            </enablement>
+            <actionProvider
+                  class="org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchSynchronizationActionProvider">
+            </actionProvider>
+            <commonSorter
+                  class="org.eclipse.compare.internal.patch.DiffViewerComparator">
+               <parentExpression>
+                  <instanceof
+                        value="org.eclipse.compare.internal.patch.PatchFileDiffNode">
+                  </instanceof>
+               </parentExpression>
+            </commonSorter>
+         </navigatorContent>
+      </extension>
+      <extension
+            point="org.eclipse.core.runtime.adapters">
+         <factory
+               adaptableType="org.eclipse.compare.internal.patch.PatchProjectDiffNode"
+               class="org.eclipse.team.internal.ui.synchronize.patch.AdapterFactory">
+            <adapter
+                  type="org.eclipse.core.resources.mapping.ResourceMapping">
+            </adapter>
+            <adapter
+                  type="org.eclipse.ui.model.IWorkbenchAdapter">
+            </adapter>
+         </factory>
+         <factory
+               adaptableType="org.eclipse.compare.internal.patch.PatchFileDiffNode"
+               class="org.eclipse.team.internal.ui.synchronize.patch.AdapterFactory">
+            <adapter
+                  type="org.eclipse.core.resources.mapping.ResourceMapping">
+            </adapter>
+            <adapter
+                  type="org.eclipse.core.resources.IResource">
+            </adapter>
+            <adapter
+                  type="org.eclipse.ui.model.IWorkbenchAdapter">
+            </adapter>
+         </factory>
+         <factory
+               adaptableType="org.eclipse.compare.internal.patch.HunkDiffNode"
+               class="org.eclipse.team.internal.ui.synchronize.patch.AdapterFactory">
+            <adapter
+                  type="org.eclipse.core.resources.mapping.ResourceMapping">
+            </adapter>
+            <adapter
+                  type="org.eclipse.ui.model.IWorkbenchAdapter">
+            </adapter>
+         </factory>
+         <factory
+               adaptableType="org.eclipse.team.internal.ui.synchronize.patch.PatchWorkspace"
+               class="org.eclipse.team.internal.ui.synchronize.patch.AdapterFactory">
+            <adapter
+                  type="org.eclipse.ui.model.IWorkbenchAdapter">
+            </adapter>
+         </factory>
+         <factory
+               adaptableType="org.eclipse.team.internal.ui.synchronize.patch.PatchModelProvider"
+               class="org.eclipse.team.internal.ui.synchronize.patch.AdapterFactory">
+            <adapter type="org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter"/>
+         </factory>
+      </extension>
+      <extension
+            point="org.eclipse.team.ui.teamContentProviders">
+         <teamContentProvider
+               contentExtensionId="org.eclipse.team.ui.patchSyncNavigatorContent"
+               icon="icons/full/obj/hunk_obj.gif"
+               modelProviderId="org.eclipse.team.ui.patchModelProvider">
+         </teamContentProvider>
+      </extension>	            
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
index 0e0c501..20f1f37 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/DefaultUIFileModificationValidator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
index e3a9ff3..88e0873 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,7 +53,12 @@ public interface IPreferenceIds {
 	 * Preference to enable the import of a project set to be run in the background 
 	 */
 	public static final String RUN_IMPORT_IN_BACKGROUND= PREFIX + "run_import_in_background_"; //$NON-NLS-1$
-	
+
+	/*
+	 * Preference to enable synchronizing with a patch via Apply Patch action
+	 */
+	public static final String APPLY_PATCH_IN_SYNCHRONIZE_VIEW = PREFIX + "apply_patch_in_sychronize_view"; //$NON-NLS-1$
+
 	/*
 	 * Preference to manage the perspective used to synchronize.
 	 */
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
index cbca15c..4094518 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,11 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui;
 
-
-
 import java.util.ResourceBundle;
 
 import org.eclipse.core.runtime.*;
 
+
 /**
  * Policy implements NLS convenience methods for the plugin and
  * makes progress monitor policy decisions
@@ -24,12 +23,13 @@ public class Policy {
 	//debug constants
 	public static boolean DEBUG_SYNC_MODELS = false;
 	public static boolean DEBUG_HISTORY = false;
+	public static boolean DEBUG_DND = false;
     
     private static String ACTION_BUNDLE = "org.eclipse.team.internal.ui.actions.actions"; //$NON-NLS-1$
     private static ResourceBundle actionBundle = null;
 
     /*
-     * Returns a resource bundle, creating one if it none is available. 
+     * Returns a resource bundle, creating one if it none is available.
      */
     public static ResourceBundle getActionBundle() {
         // thread safety
@@ -44,6 +44,7 @@ public class Policy {
 		if (TeamUIPlugin.getPlugin().isDebugging()) {
 			DEBUG_SYNC_MODELS = "true".equalsIgnoreCase(Platform.getDebugOption(TeamUIPlugin.ID + "/syncmodels"));//$NON-NLS-1$ //$NON-NLS-2$
 			DEBUG_HISTORY = "true".equalsIgnoreCase(Platform.getDebugOption(TeamUIPlugin.ID + "/history"));//$NON-NLS-1$ //$NON-NLS-2$
+			DEBUG_DND = "true".equalsIgnoreCase(Platform.getDebugOption(TeamUIPlugin.ID + "/dnd"));//$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 	
@@ -57,7 +58,7 @@ public class Policy {
 		if (monitor.isCanceled()) {
 			throw new OperationCanceledException();
 		}
-	}	
+	}
 	
 	public static IProgressMonitor subMonitorFor(IProgressMonitor monitor, int ticks) {
 		if (monitor == null)
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
index c3a81ed..1a39e2a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -279,6 +279,7 @@ public class TeamUIMessages extends NLS {
 	public static String SyncViewerPreferencePage_44;
 	public static String SyncViewerPreferencePage_45;
 	public static String SyncViewerPreferencePage_46;
+	public static String SyncViewerPreferencePage_47;
 
 	public static String TeamAction_internal;
 	public static String TextPreferencePage_add;
@@ -361,6 +362,11 @@ public class TeamUIMessages extends NLS {
 	public static String SynchronizeView_14;
 	public static String SynchronizeView_16;
 	public static String SynchronizeView_statusLine;
+	public static String SynchronizeView_linkWithEditor;
+	public static String SynchronizeView_linkWithEditorDescription;
+	public static String SynchronizeView_linkWithEditorTooltip;
+	public static String SynchronizeView_fileMustNotBeNull;
+	public static String SynchronizeView_noActiveWorkbenchPage;
 
 	public static String StatisticsPanel_outgoing;
 	public static String StatisticsPanel_incoming;
@@ -535,6 +541,11 @@ public class TeamUIMessages extends NLS {
 	public static String CopyToClipboardAction_3;
 	public static String CopyToClipboardAction_4;
 
+	public static String PasteAction_1;
+	public static String PasteAction_2;
+	public static String PasteAction_3;
+	public static String PasteAction_4;
+
 	public static String FlatModelProvider_6;
 	public static String FlatModelProvider_7;
 	public static String FlatModelProvider_8;
@@ -708,7 +719,29 @@ public class TeamUIMessages extends NLS {
 	public static String SelectAncestorDialog_title;
 	public static String SelectAncestorDialog_message;
 	public static String SelectAncestorDialog_option;
+
+	public static String PatchParsedPage_title;
+	public static String PatchParsedPage_description;
+	public static String PatchParsedPage_clickFinishToGoToSynchronizeView;
+
+	public static String PatchInaccessibleProjectsPage_title;
+	public static String PatchInaccessibleProjectsPage_message;
+	public static String PatchInaccessibleProjectsPage_projectDoesNotExistInWorkspace;
+	public static String PatchInaccessibleProjectsPage_selectExisting;
+	public static String PatchInaccessibleProjectsPage_deselectAll;
+	public static String PatchInaccessibleProjectsPage_openingProjects;
 	
+	public static String IgnoreLeadingPathSegmentsDialog_title;
+	public static String IgnoreLeadingPathSegmentsDialog_message;
+	public static String IgnoreLeadingPathSegmentsDialog_notANumber;
+	public static String IgnoreLeadingPathSegmentsDialog_numberOutOfRange;
+
+	public static String FuzzFactorDialog_title;
+	public static String FuzzFactorDialog_message;
+	public static String FuzzFactorDialog_guess;
+	public static String FuzzFactorDialog_notANumber;
+	public static String FuzzFactorDialog_numberOutOfRange;
+
 	public static String NotFound;
 
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 796ce59..749746a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -146,6 +146,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
 		store.setDefault(IPreferenceIds.MAKE_FILE_WRITTABLE_IF_CONTEXT_MISSING, false);
 		store.setDefault(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR, true);
 		store.setDefault(IPreferenceIds.RUN_IMPORT_IN_BACKGROUND, false);
+		store.setDefault(IPreferenceIds.APPLY_PATCH_IN_SYNCHRONIZE_VIEW, false);
 		store.setDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS, true);
 		store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT, IPreferenceIds.COMPRESSED_LAYOUT);
 		store.setDefault(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE, TeamSynchronizingPerspective.ID);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 35ddadc..6c035f6 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.util.*;
 import java.util.List;
 
 import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.CompareEditorInput;
 import org.eclipse.compare.structuremergeviewer.IDiffContainer;
 import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.resources.*;
@@ -384,6 +385,16 @@ public class Utils {
 		}
 	}
 
+	/**
+	 * DO NOT REMOVE, used in a product.
+	 * 
+	 * @deprecated As of 3.5, replaced by
+	 *             {@link #updateLabels(SyncInfo, CompareConfiguration, IProgressMonitor)}
+	 */
+	public static void updateLabels(SyncInfo sync, CompareConfiguration config) {
+		updateLabels(sync, config, null);
+	}
+
 	private static boolean isShowAuthor() {
 		IPreferenceStore store = TeamUIPlugin.getPlugin().getPreferenceStore();
 		return store.getBoolean(IPreferenceIds.SHOW_AUTHOR_IN_COMPARE_EDITOR);
@@ -1166,4 +1177,49 @@ public class Utils {
 		return id;
 	}
 	
+	/**
+	 * Returns an editor that can be re-used. An open compare editor that has
+	 * un-saved changes cannot be re-used.
+	 * 
+	 * @param input
+	 *            the input being opened
+	 * @param page
+	 * @param editorInputClasses 
+	 * @return an EditorPart or <code>null</code> if none can be found
+	 */
+	public static IEditorPart findReusableCompareEditor(
+			CompareEditorInput input, IWorkbenchPage page,
+			Class[] editorInputClasses) {
+		IEditorReference[] editorRefs = page.getEditorReferences();
+		// first loop looking for an editor with the same input
+		for (int i = 0; i < editorRefs.length; i++) {
+			IEditorPart part = editorRefs[i].getEditor(false);
+			if (part != null && part instanceof IReusableEditor) {
+				for (int j = 0; j < editorInputClasses.length; j++) {
+					// check if the editor input type 
+					// complies with the types given by the caller
+					if (editorInputClasses[j].isInstance(part.getEditorInput())
+							&& part.getEditorInput().equals(input))
+						return part;
+				}
+			}
+		}
+		// if none found and "Reuse open compare editors" preference is on use
+		// a non-dirty editor
+		if (TeamUIPlugin.getPlugin().getPreferenceStore()
+				.getBoolean(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR)) {
+			for (int i = 0; i < editorRefs.length; i++) {
+				IEditorPart part = editorRefs[i].getEditor(false);
+				if (part != null
+						&& (part.getEditorInput() instanceof SaveableCompareEditorInput)
+						&& part instanceof IReusableEditor && !part.isDirty()) {
+					return part;
+				}
+			}
+		}
+
+		// no re-usable editor found
+		return null;
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
index 0a7debb..1d077ec 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/ApplyPatchAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.team.internal.ui.actions;
 import java.lang.reflect.InvocationTargetException;
 
 import org.eclipse.compare.CompareConfiguration;
-import org.eclipse.compare.patch.ApplyPatchOperation;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -21,6 +20,7 @@ import org.eclipse.jface.action.IAction;
 import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation;
 
 public class ApplyPatchAction extends TeamAction {
 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
index bf3cd86..e028657 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ import org.eclipse.swt.events.*;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.history.CompareFileRevisionEditorInput;
 import org.eclipse.team.internal.ui.synchronize.SaveablesCompareEditorInput;
 import org.eclipse.ui.*;
 
@@ -68,8 +70,9 @@ public class CompareAction extends TeamAction {
 		IWorkbenchPage workBenchPage = getTargetPage();
 		CompareEditorInput input = new SaveablesCompareEditorInput(ancestor,
 				left, right, workBenchPage);
-		IEditorPart editor = CompareRevisionAction.findReusableCompareEditor(
-				input, workBenchPage);
+		IEditorPart editor = Utils.findReusableCompareEditor(input,
+				workBenchPage,
+				new Class[] { CompareFileRevisionEditorInput.class });
 		if (editor != null) {
 			IEditorInput otherInput = editor.getEditorInput();
 			if (otherInput.equals(input)) {
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
index 5c7d0e2..50c2932 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/CompareRevisionAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,7 +122,9 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
 	private void openInCompare(ITypedElement left, ITypedElement right) {
 		CompareEditorInput input = createCompareEditorInput(left, right, page.getSite().getPage());
 		IWorkbenchPage workBenchPage = page.getSite().getPage();
-		IEditorPart editor = findReusableCompareEditor(input, workBenchPage);
+		IEditorPart editor = Utils.findReusableCompareEditor(input,
+				workBenchPage,
+				new Class[] { CompareFileRevisionEditorInput.class });
 		if (editor != null) {
 			IEditorInput otherInput = editor.getEditorInput();
 			if (otherInput.equals(input)) {
@@ -168,41 +170,14 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
 	}
 
 	/**
-	 * Returns an editor that can be re-used. An open compare editor that
-	 * has un-saved changes cannot be re-used.
-	 * @param input the input being opened
-	 * @param page 
-	 * @return an EditorPart or <code>null</code> if none can be found
+	 * DO NOT REMOVE, used in a product.
+	 * 
+	 * @deprecated As of 3.5, replaced by
+	 *             {@link Utils#findReusableCompareEditor(CompareEditorInput, IWorkbenchPage, Class[])}
 	 */
-	public static IEditorPart findReusableCompareEditor(
-			CompareEditorInput input, IWorkbenchPage page) {
-		IEditorReference[] editorRefs = page.getEditorReferences();
-		// first loop looking for an editor with the same input
-		for (int i = 0; i < editorRefs.length; i++) {
-			IEditorPart part = editorRefs[i].getEditor(false);
-			if (part != null
-					&& (part.getEditorInput() instanceof CompareFileRevisionEditorInput)
-					&& part instanceof IReusableEditor
-					&& part.getEditorInput().equals(input)) {
-				return part;
-			}
-		}
-
-		// if none found and "Reuse open compare editors" preference is on use
-		// a non-dirty editor
-		if (isReuseOpenEditor()) {
-			for (int i = 0; i < editorRefs.length; i++) {
-				IEditorPart part = editorRefs[i].getEditor(false);
-				if (part != null
-						&& (part.getEditorInput() instanceof SaveableCompareEditorInput)
-						&& part instanceof IReusableEditor && !part.isDirty()) {
-					return part;
-				}
-			}
-		}
-
-		// no re-usable editor found
-		return null;
+	public static IEditorPart findReusableCompareEditor(IWorkbenchPage workbenchPage) {
+		return Utils.findReusableCompareEditor(null, workbenchPage,
+				new Class[] { CompareFileRevisionEditorInput.class });
 	}
 	
 	protected boolean updateSelection(IStructuredSelection selection) {
@@ -248,8 +223,4 @@ public class CompareRevisionAction extends BaseSelectionListenerAction {
 		
 		return true;
 	}
-
-	private static boolean isReuseOpenEditor() {
-		return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index fffc674..2863370 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,8 @@ import java.util.List;
 import org.eclipse.core.commands.*;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
@@ -211,7 +212,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
 
     private Object getResourceMapping(Object object) {
         if (object instanceof ResourceMapping)
-            return (ResourceMapping)object;
+            return object;
         return Utils.getResourceMapping(object);
     }
     
@@ -548,4 +549,39 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
         run(action);
     }
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
+	 */
+	public void setEnabled(Object evaluationContext) {
+		IWorkbenchWindow activeWorkbenchWindow = (IWorkbenchWindow) HandlerUtil
+				.getVariable(evaluationContext,
+						ISources.ACTIVE_WORKBENCH_WINDOW_NAME);
+		if (activeWorkbenchWindow != null) {
+			ISelection selection = (ISelection) HandlerUtil.getVariable(
+					evaluationContext, ISources.ACTIVE_CURRENT_SELECTION_NAME);
+			if (selection == null) {
+				selection = StructuredSelection.EMPTY;
+			}
+			IWorkbenchPart part = (IWorkbenchPart) HandlerUtil.getVariable(
+					evaluationContext, ISources.ACTIVE_PART_NAME);
+			updateSelection(part, selection);
+		}
+	}
+
+	private void updateSelection(IWorkbenchPart part, ISelection selection) {
+		// If the action is run from within an editor, try and find the
+		// file for the given editor.
+		setActivePart(null, part);
+		if (part != null && part instanceof IEditorPart) {
+			IEditorInput input = ((IEditorPart) part).getEditorInput();
+			IFile file = ResourceUtil.getFile(input);
+			if (file != null) {
+				selectionChanged((IAction) null, new StructuredSelection(file));
+			}
+		} else {
+			// Fallback is to prime the action with the selection
+			selectionChanged((IAction) null, selection);
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties
index 87825a3..9acba53 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/actions.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -105,6 +105,22 @@ action.replaceAll.tooltip=Replace the local elements with the corresponding remo
 action.replaceAll.description=Replace All
 action.replaceAll.image=checkout_action.gif
 
+action.reversePatch.label=Re&verse Patch
+action.reversePatch.tooltip=Rollbacks the changes introduced by the patch
+action.reversePatch.description=Reverse Patch
+
+action.generateRejFile.label=Ge&nerate .rej File for Conflicts
+action.generateRejFile.tooltip=Generate .rej file for conflicting hunks
+action.generateRejFile.description=Generate .rej File for Conflicts
+
+action.fuzzFactor.label=&Fuzz Factor...
+action.fuzzFactor.tooltip=Fuzz factor
+action.fuzzFactor.description=Fuzz Factor
+
+action.ignoreLeadingPathSegments.label=Ign&ore Leading Path Segments...
+action.ignoreLeadingPathSegments.tooltip=Ignore leading path segments
+action.ignoreLeadingPathSegments.description=Ignore Leading Path Segments
+
 action.markAsMerged.label=Mark &as Merged
 
 action.merge.label=&Merge
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
index c199b6e..ac40978 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/DetailsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java
deleted file mode 100644
index ef4ad93..0000000
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/dialogs/MappingSelectionDialog.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.team.internal.ui.dialogs;
-
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Dialog that will display any mappings that contain resources whose 
- * sync state match the provided filter.
- */
-public abstract class MappingSelectionDialog extends DetailsDialog implements IPropertyChangeListener {
-
-    private final ResourceMapping[] mappings;
-    private ResourceMapping[] checkedMappings;
-    private ResourceMappingSelectionArea mappingArea;
-    private ResourceMappingResourceDisplayArea resourceArea;
-    private final IResourceMappingResourceFilter filter;
-
-    protected MappingSelectionDialog(Shell parentShell, String dialogTitle, ResourceMapping[] mappings, IResourceMappingResourceFilter filter) {
-        super(parentShell, dialogTitle);
-        this.mappings = mappings;
-        this.filter = filter;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createMainDialogArea(org.eclipse.swt.widgets.Composite)
-     */
-    protected void createMainDialogArea(Composite parent) {     
-        if (mappings.length == 1) {
-            // There is only one mapping so just ask for a yes/no on including it
-            createWrappingLabel(parent, getSingleMappingMessage(mappings[0]));
-        } else {
-            // Allow the user to choose which mappings to include
-            createMappingSelectionArea(parent);
-        } 
-    }
-
-    /*
-     * Create a list that allows the selection of mappings via checkbox
-     */
-    private void createMappingSelectionArea(Composite parent) {
-        Composite composite = createComposite(parent);
-        mappingArea = new ResourceMappingSelectionArea(mappings, true, true);
-        mappingArea.setDescription(getMultipleMappingsMessage());
-        mappingArea.addPropertyChangeListener(this);
-        mappingArea.createArea(composite);
-        // Create a separator between the two sets of buttons
-        Label seperator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
-        seperator.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
-        
-        checkedMappings = mappingArea.getCheckedMappings();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
-     */
-    protected Composite createDropDownDialogArea(Composite parent) {
-        if (resourceArea == null) {
-            ResourceMapping selectedMapping = getSelectedMapping();
-            resourceArea = new ResourceMappingResourceDisplayArea(selectedMapping, getResourceListMessage(selectedMapping), filter);
-        }
-        Composite c = createComposite(parent);
-        resourceArea.createArea(c);
-        return c;
-    }
-
-    private ResourceMapping getSelectedMapping() {
-        if (mappingArea != null)
-            return mappingArea.getSelectedMapping();
-        if (mappings.length == 1)
-            return mappings[0];
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#updateEnablements()
-     */
-    protected void updateEnablements() {
-        // Can always finish
-        setPageComplete(true);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeErrorMessage()
-     */
-    protected boolean includeErrorMessage() {
-        return false;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#includeOkButton()
-     */
-    protected boolean includeOkButton() {
-        return mappings.length != 1;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
-     */
-    protected void createButtonsForButtonBar(Composite parent) {
-        if (mappings.length == 1) {
-            createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true);
-            createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false);
-        }
-        super.createButtonsForButtonBar(parent);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.team.internal.ui.dialogs.DetailsDialog#buttonPressed(int)
-     */
-    protected void buttonPressed(int id) {
-        if (IDialogConstants.YES_ID == id) {
-            checkedMappings = mappings;
-            super.buttonPressed(IDialogConstants.OK_ID);
-        } else if (IDialogConstants.NO_ID == id) {
-            checkedMappings = new ResourceMapping[0];
-            super.buttonPressed(IDialogConstants.OK_ID);
-        } else {
-            super.buttonPressed(id);
-        }
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
-     */
-    public void propertyChange(PropertyChangeEvent event) {
-        if (event.getProperty().equals(ResourceMappingSelectionArea.SELECTED_MAPPING)) {
-            if (resourceArea != null) {
-                ResourceMapping selectedMapping = getSelectedMapping();
-                resourceArea.setMapping(selectedMapping, getResourceListMessage(selectedMapping));
-            }
-        } else if (event.getProperty().equals(ResourceMappingSelectionArea.CHECKED_MAPPINGS)) {
-            checkedMappings = mappingArea.getCheckedMappings();
-            updateEnablements();
-        }
-    }
-    
-    /**
-     * Provide the message that is displayed if there is only a single mapping to be selected.
-     * @param mapping the mapping
-     * @return the display string
-     */
-    protected abstract String getSingleMappingMessage(ResourceMapping mapping);
-    
-    /**
-     * Provide the message that is displayed if there are multiple nappings to choose from.
-     * @return the diusplay string
-     */
-    protected abstract String getMultipleMappingsMessage();
-    
-    /**
-     * Return the label to be used in the details area for the list that
-     * displays the resources contained in the mapping
-     * @param mapping the resource mapping
-     * @return the list label
-     */
-    protected abstract String getResourceListMessage(ResourceMapping mapping);
-
-    /**
-     * Return the <code>ResourceMappings</code> that are being displayed 
-     * by the dialog.
-     * @return the <code>ResourceMappings</code> that are being displayed 
-     * by the dialog
-     */
-    public final ResourceMapping[] getMappings() {
-        return mappings;
-    }
-    
-    /**
-     * Return the <code>ResourceMappings</code> that were checked
-     * by the user.
-     * @return the <code>ResourceMappings</code> that were checked
-     */
-    protected final ResourceMapping[] getCheckedMappings() {
-        return checkedMappings;
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
index 17a9093..e60fa48 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
+ *  Copyright (c) 2006, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import org.eclipse.compare.structuremergeviewer.ICompareInput;
 import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.osgi.util.NLS;
+import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.team.internal.core.history.LocalFileRevision;
 import org.eclipse.team.internal.ui.*;
 import org.eclipse.team.internal.ui.mapping.AbstractCompareInput;
@@ -159,7 +160,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
 			String leftLabel = getFileRevisionLabel(getLeftRevision());
 			cc.setLeftLabel(leftLabel);
 		} else if (getResource(input) != null) {
-			String label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ input.getLeft().getName() });
+			String label = NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_workspace, new Object[]{ TextProcessor.process(input.getLeft().getName())});
 			cc.setLeftLabel(label);
 		}
 		if (getRightRevision() != null) {
@@ -173,7 +174,7 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
 		if (fileObject instanceof LocalFileRevision){
 			IFileState state = ((LocalFileRevision) fileObject).getState();
 			if (state != null) {
-				return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_localRevision, new Object[]{element.getName(), element.getTimestamp()});
+				return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_localRevision, new Object[]{TextProcessor.process(element.getName()), element.getTimestamp()});
 			} 
 		} else {
 			return NLS.bind(TeamUIMessages.CompareFileRevisionEditorInput_repository, new Object[]{ element.getName(), element.getContentIdentifier(), element.getAuthor()});
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
index fc5c719..f474a39 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CommonViewerAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,8 +18,10 @@ import org.eclipse.jface.action.*;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.core.TeamException;
@@ -35,7 +37,6 @@ import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
 import org.eclipse.ui.*;
 import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.navigator.*;
-import org.eclipse.ui.navigator.resources.ResourceDragAdapterAssistant;
 import org.eclipse.ui.part.IPageSite;
 
 /**
@@ -308,6 +309,48 @@ public class CommonViewerAdvisor extends AbstractTreeViewerAdvisor implements IN
 				}
 			});
 			dlp.setDecorationContext(decorationContext);
+		} else if (provider instanceof DecoratingStyledCellLabelProvider) {
+			DecoratingStyledCellLabelProvider dsclp = (DecoratingStyledCellLabelProvider) provider;
+			ILabelDecorator decorator = ((SynchronizePageConfiguration) configuration)
+					.getLabelDecorator();
+			if (decorator != null) {
+				IStyledLabelProvider slp = dsclp.getStyledStringProvider();
+				dsclp = new DecoratingStyledCellLabelProvider(
+						new MyDecoratingStyledCellLabelProvider(slp, decorator),
+						PlatformUI.getWorkbench().getDecoratorManager()
+								.getLabelDecorator(), null);
+				viewer.setLabelProvider(dsclp);
+			}
+			DecorationContext decorationContext = new DecorationContext();
+			decorationContext.putProperty(SynchronizationStateTester.PROP_TESTER, new SynchronizationStateTester() {
+				public boolean isStateDecorationEnabled() {
+					return false;
+				}
+			});
+			dsclp.setDecorationContext(decorationContext);
+		}
+	}
+
+	private class MyDecoratingStyledCellLabelProvider extends
+			DecoratingStyledCellLabelProvider implements IStyledLabelProvider,
+			IFontProvider {
+
+		private IStyledLabelProvider slp;
+
+		public MyDecoratingStyledCellLabelProvider(IStyledLabelProvider slp,
+				ILabelDecorator decorator) {
+			super(slp, decorator, null);
+			this.slp = slp;
+		}
+
+		public StyledString getStyledText(Object element) {
+			return slp.getStyledText(element);
+		}
+
+		public Font getFont(Object element) {
+			// DelegatingStyledCellLabelProvider does not implement
+			// IFontProvider
+			return super.getFont(element);
 		}
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
index 2f39837..f0723c3 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/CompareInputChangeNotifier.java
@@ -189,7 +189,8 @@ public abstract class CompareInputChangeNotifier implements
 	 */
 	public void dispose() {
 		ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
-		eventHandler.shutdown();
+		if (eventHandler != null)
+			eventHandler.shutdown();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
index 04e675f..5fd65a3 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,7 +58,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
 		context = (ISynchronizationContext)configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
 		context.getDiffTree().addDiffChangeListener(this);
 		getConfiguration().addPropertyChangeListener(this);
-		Platform.getJobManager().addJobChangeListener(new JobChangeAdapter() {
+		Job.getJobManager().addJobChangeListener(new JobChangeAdapter() {
 			public void running(IJobChangeEvent event) {
 				if (isJobOfInterest(event.getJob())) {
 					if (context.getDiffTree().isEmpty())
@@ -433,7 +433,7 @@ public class DiffTreeChangesSection extends ForwardingChangesSection implements
 	}
 
 	private boolean isRefreshRunning() {
-		return Platform.getJobManager().find(getConfiguration().getParticipant()).length > 0;
+		return Job.getJobManager().find(getConfiguration().getParticipant()).length > 0;
 	}
 
 	private SubscriberDiffTreeEventHandler getHandler() {
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
new file mode 100644
index 0000000..9907f18
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorAction.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
+import org.eclipse.team.internal.ui.synchronize.patch.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+
+public class FuzzFactorAction extends Action {
+
+	private ISynchronizePageConfiguration configuration;
+	private ApplyPatchModelSynchronizeParticipant participant;
+	private ApplyPatchSubscriberMergeContext context;
+	private ApplyPatchSubscriber subscriber;
+
+	public FuzzFactorAction(ISynchronizePageConfiguration configuration) {
+		this.configuration = configuration;
+		participant = (ApplyPatchModelSynchronizeParticipant) configuration
+				.getParticipant();
+		context = (ApplyPatchSubscriberMergeContext) participant.getContext();
+		subscriber = (ApplyPatchSubscriber) context.getSubscriber();
+	}
+
+	public void run() {
+		FuzzFactorDialog dialog = new FuzzFactorDialog(Display.getCurrent()
+				.getActiveShell(), subscriber.getPatcher());
+		if (dialog.open() == Window.OK) {
+			int oldValue = subscriber.getPatcher().getFuzz();
+			int newValue = dialog.getFuzzFactor();
+			if (newValue != oldValue) {
+				SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
+						.getAdapter(SubscriberDiffTreeEventHandler.class);
+				handler.reset();
+				subscriber.getPatcher().setFuzz(newValue);
+				participant.refresh(configuration.getSite().getWorkbenchSite(),
+						context.getScope().getMappings());
+			}
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java
new file mode 100644
index 0000000..d3667ac
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/FuzzFactorDialog.java
@@ -0,0 +1,161 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.compare.internal.patch.WorkspacePatcher;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.ui.PlatformUI;
+
+public class FuzzFactorDialog extends Dialog {
+
+	private Text valueText;
+	private Text errorMessageText;
+
+	private WorkspacePatcher patcher;
+	private int fuzzFactor;
+
+	public FuzzFactorDialog(Shell parentShell, WorkspacePatcher patcher) {
+		super(parentShell);
+		this.patcher = patcher;
+	}
+
+	public int getFuzzFactor() {
+		return fuzzFactor;
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout(2, false);
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+		applyDialogFont(composite);
+
+		Label label = new Label(composite, SWT.WRAP);
+		label.setText(TeamUIMessages.FuzzFactorDialog_message);
+		GridData data = new GridData();
+		data.horizontalSpan = 2;
+		label.setLayoutData(data);
+		label.setFont(parent.getFont());
+
+		valueText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+		data = new GridData(GridData.GRAB_HORIZONTAL
+				| GridData.HORIZONTAL_ALIGN_FILL);
+		data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
+		valueText.setLayoutData(data);
+		valueText.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				validateInput();
+			}
+		});
+		fuzzFactor = patcher.getFuzz();
+		if (fuzzFactor >= 0)
+			valueText.setText(new Integer(fuzzFactor).toString());
+
+		Button guessButton = new Button(composite, SWT.NONE);
+		guessButton.setText(TeamUIMessages.FuzzFactorDialog_guess);
+		data = new GridData();
+        int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+        Point minSize = guessButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+        data.widthHint = Math.max(widthHint, minSize.x);
+		guessButton.setLayoutData(data);
+		guessButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				patcher.setFuzz(-1);
+				int fuzz = guessFuzzFactor();
+				if (fuzz >= 0) {
+					String value = new Integer(fuzz).toString();
+					valueText.setText(value);
+				}
+			}
+		});
+
+		errorMessageText = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
+		errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
+				| GridData.HORIZONTAL_ALIGN_FILL));
+		errorMessageText.setBackground(errorMessageText.getDisplay()
+				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+
+		validateInput();
+
+		applyDialogFont(composite);
+		return composite;
+	}
+
+	private void validateInput() {
+		String message = null;
+		String value = valueText.getText();
+		try {
+			fuzzFactor = Integer.parseInt(value);
+			if (fuzzFactor < 0)
+				message = TeamUIMessages.FuzzFactorDialog_numberOutOfRange;
+		} catch (NumberFormatException x) {
+			message = TeamUIMessages.FuzzFactorDialog_notANumber;
+		}
+		setErrorMessage(message);
+	}
+
+	private void setErrorMessage(String errorMessage) {
+		if (errorMessageText != null && !errorMessageText.isDisposed()) {
+			errorMessageText.setText(errorMessage == null ? " \n " //$NON-NLS-1$
+					: errorMessage);
+			boolean hasError = errorMessage != null
+					&& (StringConverter.removeWhiteSpaces(errorMessage))
+							.length() > 0;
+			errorMessageText.setEnabled(hasError);
+			errorMessageText.setVisible(hasError);
+			errorMessageText.getParent().update();
+			Control button = getButton(IDialogConstants.OK_ID);
+			if (button != null) {
+				button.setEnabled(errorMessage == null);
+			}
+		}
+	}
+
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		shell.setText(TeamUIMessages.FuzzFactorDialog_title);
+	}
+
+	private int guessFuzzFactor() {
+		final int[] result = new int[] { -1 };
+		try {
+			PlatformUI.getWorkbench().getProgressService().run(true, true,
+					new IRunnableWithProgress() {
+						public void run(IProgressMonitor monitor) {
+							result[0] = patcher.guessFuzzFactor(monitor);
+						}
+					});
+		} catch (InvocationTargetException ex) {
+			// NeedWork
+		} catch (InterruptedException ex) {
+			// NeedWork
+		}
+		return result[0];
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java
new file mode 100644
index 0000000..23dc6bc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.team.internal.ui.synchronize.patch.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+
+public class GererateRejFileAction extends Action {
+
+	private ApplyPatchSubscriber subscriber;
+
+	public GererateRejFileAction(ISynchronizePageConfiguration configuration) {
+		super("", AS_CHECK_BOX); //$NON-NLS-1$
+		ApplyPatchModelSynchronizeParticipant participant = (ApplyPatchModelSynchronizeParticipant) configuration
+				.getParticipant();
+		ApplyPatchSubscriberMergeContext context = (ApplyPatchSubscriberMergeContext) participant
+				.getContext();
+		subscriber = (ApplyPatchSubscriber) context.getSubscriber();
+	}
+
+	public boolean isChecked() {
+		return subscriber.getPatcher().isGenerateRejectFile();
+	}
+
+	public void run() {
+		boolean oldValue = subscriber.getPatcher().isGenerateRejectFile();
+		subscriber.getPatcher().setGenerateRejectFile(!oldValue);
+
+		firePropertyChange(CHECKED, new Boolean(oldValue), new Boolean(
+				!oldValue));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
new file mode 100644
index 0000000..cd2a125
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/IgnoreLeadingPathSegmentsAction.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.team.core.diff.provider.DiffTree;
+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.ui.synchronize.patch.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+
+public class IgnoreLeadingPathSegmentsAction extends Action {
+
+	private ISynchronizePageConfiguration configuration;
+	private ApplyPatchModelSynchronizeParticipant participant;
+	private ApplyPatchSubscriberMergeContext context;
+	private ApplyPatchSubscriber subscriber;
+	private int maxValue;
+
+	public IgnoreLeadingPathSegmentsAction(
+			ISynchronizePageConfiguration configuration) {
+		this.configuration = configuration;
+		participant = (ApplyPatchModelSynchronizeParticipant) configuration
+				.getParticipant();
+		context = (ApplyPatchSubscriberMergeContext) participant.getContext();
+		subscriber = (ApplyPatchSubscriber) context.getSubscriber();
+	}
+
+	public boolean isEnabled() {
+		return !subscriber.getPatcher().isWorkspacePatch();
+	}
+
+	public void run() {
+		int oldValue = subscriber.getPatcher().getStripPrefixSegments();
+		maxValue = subscriber.getPatcher().calculatePrefixSegmentCount() - 1;
+
+		InputDialog dlg = new InputDialog(
+				Display.getCurrent().getActiveShell(),
+				TeamUIMessages.IgnoreLeadingPathSegmentsDialog_title, NLS.bind(
+						TeamUIMessages.IgnoreLeadingPathSegmentsDialog_message,
+						new Integer(maxValue)), new Integer(oldValue)
+						.toString(), new IInputValidator() {
+					public String isValid(String input) {
+						try {
+							int i = Integer.parseInt(input);
+							if (i < 0 || i > maxValue)
+								return TeamUIMessages.IgnoreLeadingPathSegmentsDialog_numberOutOfRange;
+						} catch (NumberFormatException x) {
+							return TeamUIMessages.IgnoreLeadingPathSegmentsDialog_notANumber;
+						}
+						return null;
+					}
+				});
+
+		if (dlg.open() == Window.OK) {
+			String input = dlg.getValue();
+			int newValue = Integer.parseInt(input);
+			if (newValue != oldValue) {
+				DiffTree tree = (DiffTree)context.getDiffTree();
+				tree.clear();
+				SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
+						.getAdapter(SubscriberDiffTreeEventHandler.class);
+				handler.reset();
+				subscriber.getPatcher().setStripPrefixSegments(newValue);
+				participant.refresh(configuration.getSite().getWorkbenchSite(),
+						context.getScope().getMappings());
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
index 534d8c0..2474bf0 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelCompareEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -189,7 +189,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
 	}
 
 	protected void handleMenuAboutToShow(IMenuManager manager) {
-		StructuredSelection selection = new StructuredSelection(((ResourceDiffCompareInput)getCompareInput()).getResource());
+		StructuredSelection selection = new StructuredSelection(((IResourceProvider)getCompareInput()).getResource());
 		final ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(getSynchronizeConfiguration());
 		markAsMergedHandler.updateEnablement(selection);
 		Action markAsMergedAction = new Action(TeamUIMessages.ModelCompareEditorInput_0) {
@@ -218,7 +218,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
 			
 		};
 		Utils.initAction(mergeAction, "action.merge."); //$NON-NLS-1$
-		mergeAction.setEnabled(markAsMergedAction.isEnabled());
+		mergeAction.setEnabled(mergeAction.isEnabled());
 		
 		final ResourceMergeHandler overwriteHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), true);
 		overwriteHandler.updateEnablement(selection);
@@ -233,7 +233,7 @@ public class ModelCompareEditorInput extends SaveableCompareEditorInput implemen
 			
 		};
 		Utils.initAction(overwriteAction, "action.overwrite."); //$NON-NLS-1$
-		overwriteAction.setEnabled(markAsMergedAction.isEnabled());
+		overwriteAction.setEnabled(overwriteAction.isEnabled());
 		
 		manager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator("merge")); //$NON-NLS-1$
 		manager.insertAfter("merge", new Separator("overwrite")); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
index a850886..66ef48f 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelElementSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,7 +37,7 @@ import org.eclipse.ui.IWorkingSet;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
 import org.eclipse.ui.navigator.*;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
 
 public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage implements INavigatorContentServiceListener {
 	
@@ -103,7 +103,7 @@ public class ModelElementSelectionPage extends GlobalRefreshElementSelectionPage
 					checkWorkingSetElements();
 			}
 		});
-		fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
+		fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		return fViewer;
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
index c225f2d..d0abb4a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ModelSynchronizePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java
new file mode 100644
index 0000000..3793bec
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceDragAdapterAssistant.java
@@ -0,0 +1,128 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River Systems) - http://bugs.eclipse.org/247294
+ ******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import java.util.*;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.team.internal.ui.Policy;
+import org.eclipse.ui.navigator.CommonDragAdapterAssistant;
+import org.eclipse.ui.part.ResourceTransfer;
+
+
+/**
+ * Drag adapter assistant used for the Common Navigator based viewer for use by a
+ * {@link ModelSynchronizePage}.
+ * 
+ * @since 3.6
+ */
+public class ResourceDragAdapterAssistant extends CommonDragAdapterAssistant {
+
+	private static final Transfer[] SUPPORTED_TRANSFERS = new Transfer[] {
+			ResourceTransfer.getInstance(),
+			FileTransfer.getInstance() };
+
+	private static final Class IRESOURCE_TYPE = IResource.class;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#getSupportedTransferTypes()
+	 */
+	public Transfer[] getSupportedTransferTypes() {
+		return SUPPORTED_TRANSFERS;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent,
+	 *      org.eclipse.jface.viewers.IStructuredSelection)
+	 */
+	public boolean setDragData(DragSourceEvent anEvent,
+			IStructuredSelection aSelection) {
+
+		IResource[] resources = getSelectedResources(aSelection);
+		if (resources.length > 0) {
+			if (ResourceTransfer.getInstance().isSupportedType(anEvent.dataType)) {
+				anEvent.data = resources;
+				if (Policy.DEBUG_DND) {
+					System.out
+							.println("ResourceDragAdapterAssistant.dragSetData set ResourceTransfer"); //$NON-NLS-1$
+				}
+				return true;
+			}
+				
+			if (FileTransfer.getInstance().isSupportedType(anEvent.dataType)) {
+				// Get the path of each file and set as the drag data
+				final int length = resources.length;
+				int actualLength = 0;
+				String[] fileNames = new String[length];
+				for (int i = 0; i < length; i++) {
+					IPath location = resources[i].getLocation();
+					// location may be null. See bug 29491.
+					if (location != null) {
+						fileNames[actualLength++] = location.toOSString();
+					}
+				}
+				if (actualLength > 0) {
+					// was one or more of the locations null?
+					if (actualLength < length) {
+						String[] tempFileNames = fileNames;
+						fileNames = new String[actualLength];
+						for (int i = 0; i < actualLength; i++)
+							fileNames[i] = tempFileNames[i];
+					}
+					anEvent.data = fileNames;
+		
+					if (Policy.DEBUG_DND)
+						System.out
+								.println("ResourceDragAdapterAssistant.dragSetData set FileTransfer"); //$NON-NLS-1$
+					return true;
+				}
+			}
+		}
+		return false;
+
+	}
+
+	private IResource[] getSelectedResources(IStructuredSelection aSelection) {
+		Set resources = new LinkedHashSet();
+		IResource resource = null;
+		for (Iterator iter = aSelection.iterator(); iter.hasNext();) {
+			Object selected = iter.next();
+			resource = adaptToResource(selected);
+			if (resource != null) {
+				resources.add(resource);
+		}
+		}
+		return (IResource[]) resources.toArray(new IResource[resources.size()]);
+	}
+
+	private IResource adaptToResource(Object selected) {
+		IResource resource;
+		if (selected instanceof IResource) {
+			resource = (IResource) selected;
+		} else if (selected instanceof IAdaptable) {
+			resource = (IResource) ((IAdaptable) selected)
+					.getAdapter(IRESOURCE_TYPE);
+		} else {
+			resource = (IResource) Platform.getAdapterManager().getAdapter(
+					selected, IRESOURCE_TYPE);
+		}
+		return resource;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
index 67048bb..90b159d 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,8 +75,6 @@ public class ResourceModelContentProvider extends SynchronizationContentProvider
 		Object object = internalGetElement(elementOrPath);
 		if (object instanceof IResource) {
 			IResource resource = (IResource) object;
-			if (resource == null)
-				return false;
 			if (!resource.getProject().isAccessible())
 				return false;
 			if (scope.contains(resource))
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
index 5453660..1e37fed 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ResourceModelTraversalCalculator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 
 public class ResourceModelTraversalCalculator {
 
-	public static final String PROP_TRAVERSAL_CALCULATOR = "org.eclipse.team.ui.resourceModelraversalCalculator"; //$NON-NLS-1$
+	public static final String PROP_TRAVERSAL_CALCULATOR = "org.eclipse.team.ui.resourceModelTraversalCalculator"; //$NON-NLS-1$
 	private static ResourceModelTraversalCalculator instance;
 	private final ISynchronizePageConfiguration configuration;
 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
new file mode 100644
index 0000000..27ddc85
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.mapping;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler;
+import org.eclipse.team.internal.ui.synchronize.patch.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+
+public class ReversePatchAction extends Action {
+
+	private ISynchronizePageConfiguration configuration;
+	private ApplyPatchModelSynchronizeParticipant participant;
+	private ApplyPatchSubscriberMergeContext context;
+	private ApplyPatchSubscriber subscriber;
+
+	public ReversePatchAction(ISynchronizePageConfiguration configuration) {
+		super("", AS_CHECK_BOX); //$NON-NLS-1$
+		this.configuration = configuration;
+		participant = (ApplyPatchModelSynchronizeParticipant) configuration
+				.getParticipant();
+		context = (ApplyPatchSubscriberMergeContext) participant.getContext();
+		subscriber = (ApplyPatchSubscriber) context.getSubscriber();
+	}
+
+	public boolean isChecked() {
+		return subscriber.getPatcher().isReversed();
+	}
+
+	public void run() {
+		boolean oldValue = subscriber.getPatcher().isReversed();
+		subscriber.getPatcher().setReversed(!oldValue);
+
+		SubscriberDiffTreeEventHandler handler = (SubscriberDiffTreeEventHandler) context
+				.getAdapter(SubscriberDiffTreeEventHandler.class);
+		handler.reset();
+		participant.refresh(configuration.getSite().getWorkbenchSite(), context
+				.getScope().getMappings());
+
+		firePropertyChange(CHECKED, new Boolean(oldValue), new Boolean(
+				!oldValue));
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
index 87e3c3d..81259e8 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -162,6 +162,11 @@ SynchronizeView_13=\ items selected
 SynchronizeView_14=Error opening perspective
 SynchronizeView_16=Error opening view
 SynchronizeView_statusLine={0} [{1}]
+SynchronizeView_linkWithEditor=Lin&k with Editor
+SynchronizeView_linkWithEditorDescription=Link with active editor
+SynchronizeView_linkWithEditorTooltip=Link with Editor and Selection
+SynchronizeView_fileMustNotBeNull=File must not be null
+SynchronizeView_noActiveWorkbenchPage=No active workbench page
 
 StatisticsPanel_outgoing=Outgoing
 StatisticsPanel_conflicting=Conflicting
@@ -193,6 +198,7 @@ SyncViewerPreferencePage_43=Show the &file author in compare editors
 SyncViewerPreferencePage_44=When &editing file in non-shared projects, automatically make files writable if prompting is not possible
 SyncViewerPreferencePage_45=Re&use open compare editors when opening comparisons
 SyncViewerPreferencePage_46=Run Project Set import in the &background
+SyncViewerPreferencePage_47=&Apply patch in Synchronize view
 
 PreferencePageContainerDialog_6=Synchronize Preferences
 
@@ -267,7 +273,7 @@ OpenComparedDialog_noChangeTitle=Operation Complete
 OpenComparedDialog_noChangesMessage=No Changes Found.
 GlobalRefreshAction_4=Synchronize...
 GlobalRefreshAction_5=Synchronize {0}
-ParticipantCompareDialog_1=Remember this result by placing it in the Synchronize View.
+ParticipantCompareDialog_1=&Remember this result by placing it in the Synchronize view
 ParticipantCompareDialog_2=Confirm Save
 ParticipantCompareDialog_3=Do you want to save changes?
 SynchronizeManager_27=Confirm Open Perspective
@@ -374,6 +380,11 @@ CopyToClipboardAction_2= Copy
 CopyToClipboardAction_3=Problem Copying to Clipboard
 CopyToClipboardAction_4=There was a problem when accessing the system clipboard. Retry?
 
+PasteAction_1=&Paste patch
+PasteAction_2=Paste patch
+PasteAction_3=Cannot paste the clipboard contents.
+PasteAction_4=Clipboard does not contain a valid patch.
+
 FlatModelProvider_6=Sort &Resources By
 FlatModelProvider_7=&Name
 FlatModelProvider_8=&Path
@@ -427,7 +438,7 @@ GenericHistoryTableProvider_Revision=Revision
 GenericHistoryTableProvider_Comment=Comment
 GenericHistoryView_GenericFileHistoryFetcher=Fetching File History
 GenericHistoryView_Refresh=Refresh
-GenericHistoryView_0=Pins this history view
+GenericHistoryView_0=Pin this History View
 GenericHistoryView_1=Show {0}
 GenericHistoryView_2=Show Previous Histories
 GenericHistoryView_GetPredecessor=Get Predecessor
@@ -565,3 +576,33 @@ SaveablesCompareEditorInput_threeWayTooltip=Three-way compare of ''{1}'' and ''{
 SelectAncestorDialog_title=Select Common Ancestor
 SelectAncestorDialog_message=Which resource would you like to use as the common ancestor in the three-way compare?
 SelectAncestorDialog_option=''{0}''
+#
+# PatchParsedPage
+#
+PatchParsedPage_title=Patch Parsed
+PatchParsedPage_description=The patch has been processed.
+PatchParsedPage_clickFinishToGoToSynchronizeView=Click finish button to go to Synchronize view.
+#
+# PatchInaccessibleProjectsPage
+#
+PatchInaccessibleProjectsPage_title=Inaccessible Projects
+PatchInaccessibleProjectsPage_message=Select projects to open before applying the patch. Inaccessible projects will not appear in the Synchronize view.
+PatchInaccessibleProjectsPage_projectDoesNotExistInWorkspace={0} (Project does not exist in workspace)
+PatchInaccessibleProjectsPage_selectExisting=Select Existing
+PatchInaccessibleProjectsPage_deselectAll=Deselect All
+PatchInaccessibleProjectsPage_openingProjects=Opening projects
+#
+# IgnoreLeadingPathSegmentsDialog
+#
+IgnoreLeadingPathSegmentsDialog_title=Ignore Leading Path Segments
+IgnoreLeadingPathSegmentsDialog_message=Enter path segments to ignore (0..{0}):
+IgnoreLeadingPathSegmentsDialog_notANumber=Not a number
+IgnoreLeadingPathSegmentsDialog_numberOutOfRange=Number out of range
+#
+# FuzzFactorDialog
+#
+FuzzFactorDialog_title=Fuzz Factor
+FuzzFactorDialog_message=Enter Fuzz Factor:
+FuzzFactorDialog_guess=&Guess
+FuzzFactorDialog_notANumber=Not a number
+FuzzFactorDialog_numberOutOfRange=Number out of range
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
index 6813d2e..5c52ec8 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/SyncViewerPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,8 +94,14 @@ public class SyncViewerPreferencePage extends FieldEditorPreferencePage implemen
 				RUN_IMPORT_IN_BACKGROUND, 
 		        TeamUIMessages.SyncViewerPreferencePage_46, 
 				BooleanFieldEditor.DEFAULT, 
-				getFieldEditorParent()));		
-		
+				getFieldEditorParent()));
+
+		addField(new BooleanFieldEditor(
+				APPLY_PATCH_IN_SYNCHRONIZE_VIEW, 
+		        TeamUIMessages.SyncViewerPreferencePage_47, 
+				BooleanFieldEditor.DEFAULT, 
+				getFieldEditorParent()));
+
 		if (isIncludeDefaultLayout()) {
 		    defaultLayout = new RadioGroupFieldEditor(SYNCVIEW_DEFAULT_LAYOUT, 
 		            TeamUIMessages.SyncViewerPreferencePage_0, 3,  
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
index 43c9ac3..c9e8897 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui.synchronize;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 
 import org.eclipse.compare.structuremergeviewer.IDiffElement;
 import org.eclipse.core.resources.*;
@@ -34,7 +30,7 @@ import org.eclipse.team.internal.ui.*;
 import org.eclipse.team.ui.synchronize.*;
 
 /**
- * This class is reponsible for creating and maintaining a presentation model of
+ * This class is responsible for creating and maintaining a presentation model of
  * {@link SynchronizeModelElement} elements that can be shown in a viewer. The model
  * is based on the synchronization information contained in the provided {@link SyncInfoSet}.
  */
@@ -104,7 +100,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
     }
 
     /**
-	 * Cosntructor for creating a root model provider.
+	 * Constructor for creating a root model provider.
 	 * @param configuration the sync page configuration
 	 * @param set the sync info set from which the model is built
 	 */
@@ -285,8 +281,8 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	}
     
 	/**
-	 * Return the logical model depth used for marker propogation
-	 * @param resource the resoure
+	 * Return the logical model depth used for marker propagation
+	 * @param resource the resource
 	 * @return the depth the resources should be traversed
 	 */
 	protected int getLogicalModelDepth(IResource resource) {
@@ -538,7 +534,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	}
 
 	/**
-	 * Restore the expansion state and seleciton of the viewer.
+	 * Restore the expansion state and selection of the viewer.
 	 * This method must be invoked from within the UI thread.
 	 */
 	protected void restoreViewerState() {
@@ -665,7 +661,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	protected void propogateConflictState(ISynchronizeModelElement element, boolean clear) {
 		boolean isConflict = clear ? false : isConflicting(element);
 		boolean wasConflict = element.getProperty(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY);
-		// Only propogate and update parent labels if the state of the element has changed
+		// Only propagate and update parent labels if the state of the element has changed
 		if (isConflict != wasConflict) {
 			element.setPropertyToRoot(ISynchronizeModelElement.PROPAGATED_CONFLICT_PROPERTY, isConflict);
 			updateHandler.updateParentLabels(element);
@@ -673,7 +669,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	}
 	
 	/**
-	 * Return whether the given model element represets a conflict.
+	 * Return whether the given model element represents a conflict.
 	 * @param element the element being tested
 	 * @return whether the element is a conflict
 	 */
@@ -731,7 +727,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	 * <code>handleResourceRemovals(ISyncInfoSetChangeEvent)</code> and
 	 * <code>handleResourceAdditions(ISyncInfoSetChangeEvent)</code>.
 	 * @param event
-	 *            the event containing the changed resourcses.
+	 *            the event containing the changed resources.
 	 */
 	protected void handleChanges(ISyncInfoTreeChangeEvent event, IProgressMonitor monitor) {
 		handleResourceChanges(event);
@@ -799,13 +795,13 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	    }
 		propogateConflictState(node, false);
 		// Set the marker property on this node.
-		// There is no need to propogate this to the parents
+		// There is no need to propagate this to the parents
 		// as they will be displaying the proper marker already
 		String property = calculateProblemMarker(node);
 		if (property != null) {
 			node.setProperty(property, true);
 			// Parent resource nodes would have been properly calculated when they were added.
-			// However, non-resource nodes would not so we need to propogate the marker to them
+			// However, non-resource nodes would not so we need to propagate the marker to them
 			propogateMarkerPropertyToParent(node, property);
 		}
 		if (Utils.canUpdateViewer(getViewer())) {
@@ -815,8 +811,8 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	}
 	
 	/*
-     * Propogate the marker property to the parent if it is not already there.
-     * Only propogate warnings if the parent isn't an error already.
+     * Propagate the marker property to the parent if it is not already there.
+     * Only propagate warnings if the parent isn't an error already.
      */
     private void propogateMarkerPropertyToParent(ISynchronizeModelElement node, String property) {
         ISynchronizeModelElement parent = (ISynchronizeModelElement)node.getParent();
@@ -830,7 +826,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 
     /**
 	 * Remove any traces of the model element and any of it's descendants in the
-	 * hiearchy defined by the content provider from the content provider and
+	 * hierarchy defined by the content provider from the content provider and
 	 * the viewer it is associated with.
 	 * @param nodes the model elements to remove
 	 */
@@ -888,7 +884,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	}
 	
 	/**
-	 * Method that sublcasses can oiverride when clearing model objects.
+	 * Method that subclasses can override when clearing model objects.
      * @param node the node to be cleared recursively
      */
     protected void recursiveClearModelObjects(ISynchronizeModelElement node) {
@@ -941,7 +937,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	 * Return the provider that created and manages the given
 	 * model element. The default is to return the receiver.
 	 * Subclasses may override.
-     * @param element the synchronizew model element
+     * @param element the synchronize model element
      * @return the provider that created the element
      */
     protected ISynchronizeModelProvider getProvider(ISynchronizeModelElement element) {
@@ -1052,7 +1048,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
 	
     /**
      * Wait until the provider is done processing any events and
-     * the page conent are up-to-date.
+     * the page content are up-to-date.
      * This method is for testing purposes only.
      * @param monitor
      */
@@ -1090,7 +1086,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
     /**
      * Execute a runnable which performs an update of the model being displayed
      * by this provider. The runnable should be executed in a thread-safe manner
-     * which esults in the view being updated.
+     * which results in the view being updated.
      * @param runnable the runnable which updates the model.
      * @param preserveExpansion whether the expansion of the view should be preserver
      * @param runInUIThread
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
index 46bbcba..8ecd90a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/CompositeModelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui.synchronize;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.team.core.synchronize.*;
@@ -24,7 +20,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 /**
  * This class provides functionality for defining composite synchronize model
  * providers. A composite provider is one that breaks up the displayed
- * {@link SyncInfoSet} into subsets that may be didplayed using one
+ * {@link SyncInfoSet} into subsets that may be displayed using one
  * or more synchronize model providers.
  * 
  */
@@ -150,9 +146,9 @@ public abstract class CompositeModelProvider extends AbstractSynchronizeModelPro
     }
     
     /**
-     * The state of the sync info for a resource has changed. Propogate the
+     * The state of the sync info for a resource has changed. Propagate the
      * change to any sub-providers that contain the resource.
-     * @param info the sync info for the resource whpose sync state has changed
+     * @param info the sync info for the resource whose sync state has changed
      */
     protected void handleChange(SyncInfo info) {
         handleRemoval(info.getLocal());
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
index 7f37e3f..f22b76e 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/GlobalRefreshResourceSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui.synchronize;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IResource;
@@ -29,7 +27,7 @@ import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.model.BaseWorkbenchContentProvider;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
 
 /**
  * Page that allows the user to select a set of resources that are managed by a subscriber 
@@ -50,7 +48,7 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
 	class MyContentProvider extends BaseWorkbenchContentProvider {
 		public Object[] getChildren(Object element) {
 			if(element instanceof List) {
-				return (IResource[]) ((List)element).toArray(new IResource[((List)element).size()]);
+				return ((List)element).toArray(new IResource[((List)element).size()]);
 			}
 			return super.getChildren(element);
 		}
@@ -104,7 +102,7 @@ public class GlobalRefreshResourceSelectionPage extends GlobalRefreshElementSele
 				updateOKStatus();
 			}
 		});
-		fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
+		fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		fViewer.setInput(resources);
 		return fViewer;
 	}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
index c8e9ec5..f86ee0d 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ISynchronizeModelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
 public interface ISynchronizeModelProvider {
 	
     /**
-     * Property constant used to indicate that the veiwer sorter has changed.
+     * Property constant used to indicate that the viewer sorter has changed.
      * Property change notifications for the viewer sorter change do not include
      * the old and new viewer sorter. Instead, clients should re-obtain the sorter
      * from the provider.
@@ -47,7 +47,7 @@ public interface ISynchronizeModelProvider {
 	public ISynchronizeModelProviderDescriptor getDescriptor();
 	
 	/**
-	 * Return the <code>AbstractTreeViewer</code> asociated with this content
+	 * Return the <code>AbstractTreeViewer</code> associated with this content
 	 * provider or <code>null</code> if the viewer is not of the proper type.
 	 * @return the viewer
 	 */
@@ -55,6 +55,7 @@ public interface ISynchronizeModelProvider {
 
 	/**
 	 * Builds the viewer model based on the contents of the sync set.
+	 * @param monitor the progress monitor
 	 * @return the root element of the generated model.
 	 */
 	public abstract ISynchronizeModelElement prepareInput(IProgressMonitor monitor);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
index 5509178..0e0a735 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/LocalResourceTypedElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,7 +106,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
 			}
 		}
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.compare.ResourceNode#getContents()
 	 */
@@ -185,7 +185,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
 	}
 
 	/**
-	 * ZSave the shared document for this element. The save can only be performed
+	 * Save the shared document for this element. The save can only be performed
 	 * if the element is connected to a shared document. If the element is not
 	 * connected, <code>false</code> is returned.
 	 * @param overwrite indicates whether overwrite should be performed
@@ -212,7 +212,7 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
 		updateTimestamp();
 		return inputStream;
 	}
-	
+
 	/**
 	 * Update the cached timestamp of the resource.
 	 */
@@ -230,14 +230,14 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
 	private long getTimestamp() {
 		return timestamp;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.compare.ResourceNode#hashCode()
 	 */
 	public int hashCode() {
 		return getResource().hashCode();
 	}
-	
+
 	/*
 	 * Returns <code>true</code> if the other object is of type
 	 * <code>LocalResourceTypedElement</code> and their corresponding resources
@@ -286,14 +286,14 @@ public class LocalResourceTypedElement extends ResourceNode implements IAdaptabl
 	public boolean exists() {
 		return exists;
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.compare.BufferedContent#fireContentChanged()
 	 */
 	protected void fireContentChanged() {
 		super.fireContentChanged();
 	}
-	
+
 	/**
 	 * Discard of any buffered contents. This must be called
 	 * when the local element is no longer needed but is dirty since a
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
index be53858..580365a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/NavigationActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,11 +17,12 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.team.internal.ui.Utils;
 import org.eclipse.team.internal.ui.synchronize.actions.ExpandAllAction;
 import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup;
 import org.eclipse.ui.IActionBars;
 
 /**
- * Action group that provide expand, collapse and naviGAtion atCions.
+ * Action group that provide expand, collapse and navigation actions.
  */
 public class NavigationActionGroup extends SynchronizePageActionGroup {
 
@@ -40,7 +41,8 @@ public class NavigationActionGroup extends SynchronizePageActionGroup {
 			
 			collapseAll = new Action() {
 				public void run() {
-					if (viewer == null || viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer)) return;
+					if (viewer.getControl().isDisposed() || !(viewer instanceof AbstractTreeViewer))
+						return;
 					viewer.getControl().setRedraw(false);		
 					((AbstractTreeViewer)viewer).collapseToLevel(viewer.getInput(), AbstractTreeViewer.ALL_LEVELS);
 					viewer.getControl().setRedraw(true);
@@ -60,10 +62,10 @@ public class NavigationActionGroup extends SynchronizePageActionGroup {
 	}
 	public void fillActionBars(IActionBars actionBars) {
 		IToolBarManager manager = actionBars.getToolBarManager();
+		appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, collapseAll);
 		if (gotoNext != null)
 			appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoNext);
 		if (gotoPrevious != null)
 			appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, gotoPrevious);
-		appendToGroup(manager, ISynchronizePageConfiguration.NAVIGATE_GROUP, collapseAll);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
index 3cadf08..267130d 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshModelParticipantJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import java.util.Map;
 
 import org.eclipse.core.resources.mapping.ResourceMapping;
 import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.team.core.diff.*;
 import org.eclipse.team.core.mapping.IResourceDiffTree;
 import org.eclipse.team.core.mapping.ISynchronizationContext;
@@ -68,7 +69,7 @@ public class RefreshModelParticipantJob extends RefreshParticipantJob {
 			context.refresh(mappings, monitor);
 			// Wait for any asynchronous updating to complete
 			try {
-				Platform.getJobManager().join(context, monitor);
+				Job.getJobManager().join(context, monitor);
 			} catch (InterruptedException e) {
 				// Ignore
 			}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
index d258082..657af26 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshParticipantJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,7 +85,7 @@ public abstract class RefreshParticipantJob extends Job {
 	/*
 	 * Lock used to sequence refresh jobs
 	 */
-	private static final ILock lock = Platform.getJobManager().newLock(); 
+	private static final ILock lock = Job.getJobManager().newLock(); 
 	
 	/*
 	 * Constant used for postponement
@@ -374,7 +374,7 @@ public abstract class RefreshParticipantJob extends Job {
 	protected abstract int getOutgoingChangeCount();
     
 	private boolean isJobInFamilyRunning(Object family) {
-		Job[] jobs = Platform.getJobManager().find(family);
+		Job[] jobs = Job.getJobManager().find(family);
 		if (jobs != null && jobs.length > 0) {
 			for (int i = 0; i < jobs.length; i++) {
 				Job job = jobs[i];
@@ -432,7 +432,7 @@ public abstract class RefreshParticipantJob extends Job {
 	private void initialize(final IRefreshSubscriberListener listener) {
 		final GotoActionWrapper actionWrapper = new GotoActionWrapper();
 		
-		IProgressMonitor group = Platform.getJobManager().createProgressGroup();
+		IProgressMonitor group = Job.getJobManager().createProgressGroup();
 		group.beginTask(taskName, 100);
 		setProgressGroup(group, 80);
 		handleProgressGroupSet(group, 20);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
index 0fc5c71..34eed38 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberParticipantJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@ public class RefreshSubscriberParticipantJob extends RefreshParticipantJob {
 	
 	/**
 	 * If a collector is available then run the refresh and the background event processing 
-	 * within the same progess group.
+	 * within the same progress group.
 	 */
 	public boolean shouldRun() {
 		// Ensure that any progress shown as a result of this refresh occurs hidden in a progress group.
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
index c08fabc..01f8730 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SaveablesCompareEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,7 @@ import java.lang.reflect.InvocationTargetException;
 
 import org.eclipse.compare.*;
 import org.eclipse.compare.structuremergeviewer.*;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.*;
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -28,6 +27,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.internal.ui.*;
 import org.eclipse.team.internal.ui.history.CompareFileRevisionEditorInput;
@@ -38,8 +38,10 @@ import org.eclipse.team.ui.mapping.SaveableComparison;
 import org.eclipse.team.ui.synchronize.SaveableCompareEditorInput;
 import org.eclipse.ui.*;
 import org.eclipse.ui.actions.*;
+import org.eclipse.ui.ide.IGotoMarker;
 import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.services.IDisposable;
+import org.eclipse.ui.texteditor.ITextEditor;
 
 /**
  * A compare editor input that makes use of a {@link Saveable} to manage the
@@ -76,7 +78,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 	private static ITypedElement getFileElement(ITypedElement element,
 			CompareEditorInput editorInput) {
 		if (element instanceof LocalResourceTypedElement) {
-			return (LocalResourceTypedElement) element;
+			return element;
 		}
 		if (editorInput instanceof CompareFileRevisionEditorInput) {
 			return ((CompareFileRevisionEditorInput) editorInput)
@@ -524,8 +526,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 		if (lLeftSaveable instanceof LocalResourceSaveableComparison) {
 			pMenuManager.addMenuListener(new IMenuListener() {
 				public void menuAboutToShow(IMenuManager manager) {
-					handleMenuAboutToShow(manager, lLeftSaveable, lLeftElement,
-							pSelectionProvider);
+					handleMenuAboutToShow(manager, getContainer(), lLeftSaveable, lLeftElement, pSelectionProvider);
 				}
 			});
 		}
@@ -535,8 +536,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 		if (lRightSaveable instanceof LocalResourceSaveableComparison) {
 			pMenuManager.addMenuListener(new IMenuListener() {
 				public void menuAboutToShow(IMenuManager manager) {
-					handleMenuAboutToShow(manager, lRightSaveable,
-							lRightElement, pSelectionProvider);
+					handleMenuAboutToShow(manager, getContainer(), lRightSaveable, lRightElement, pSelectionProvider);
 				}
 			});
 		}
@@ -628,45 +628,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 		return true;
 	}
 
-	private void handleMenuAboutToShow(IMenuManager manager, Saveable saveable,
-			ITypedElement element, ISelectionProvider provider) {
-		if (provider instanceof ITextViewer) {
-			ITextViewer v = (ITextViewer) provider;
-			IDocument d = v.getDocument();
-			IDocument other = (IDocument) Utils.getAdapter(saveable,
-					IDocument.class);
-			if (d == other) {
-				if (element instanceof IResourceProvider) {
-					IResourceProvider rp = (IResourceProvider) element;
-					IResource resource = rp.getResource();
-					StructuredSelection selection = new StructuredSelection(
-							resource);
-					IWorkbenchPart workbenchPart = getContainer()
-							.getWorkbenchPart();
-					if (workbenchPart != null) {
-						IWorkbenchSite ws = workbenchPart.getSite();
-						MenuManager submenu1 = new MenuManager(
-								getShowInMenuLabel());
-						IContributionItem showInMenu = ContributionItemFactory.VIEWS_SHOW_IN
-								.create(ws.getWorkbenchWindow());
-						submenu1.add(showInMenu);
-						manager.insertAfter("file", submenu1); //$NON-NLS-1$
-						MenuManager submenu2 = new MenuManager(
-								TeamUIMessages.OpenWithActionGroup_0);
-						submenu2.add(new OpenWithMenu(ws.getPage(), resource));
-						manager.insertAfter("file", submenu2); //$NON-NLS-1$
-
-						OpenFileAction openFileAction = new OpenFileAction(ws
-								.getPage());
-						openFileAction.selectionChanged(selection);
-						manager.insertAfter("file", openFileAction); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-	}
-
-	private String getShowInMenuLabel() {
+	private static String getShowInMenuLabel() {
 		String keyBinding = null;
 
 		IBindingService bindingService = (IBindingService) PlatformUI
@@ -774,11 +736,7 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 			if (document != null) {
 				Object otherDocument = ((Saveable) obj)
 						.getAdapter(IDocument.class);
-
-				if (document == null && otherDocument == null)
-					return false;
-
-				return document != null && document.equals(otherDocument);
+				return document.equals(otherDocument);
 			}
 
 			if (obj instanceof InternalResourceSaveableComparison) {
@@ -788,4 +746,116 @@ public class SaveablesCompareEditorInput extends CompareEditorInput implements
 			return false;
 		}
 	}
+
+	public static void handleMenuAboutToShow(IMenuManager manager, ICompareContainer container, Saveable saveable, ITypedElement element, ISelectionProvider provider) {
+		if (provider instanceof ITextViewer) {
+			final ITextViewer v= (ITextViewer)provider;
+			IDocument d= v.getDocument();
+			IDocument other= (IDocument)Utils.getAdapter(saveable, IDocument.class);
+			if (d == other) {
+				if (element instanceof IResourceProvider) {
+					IResourceProvider rp= (IResourceProvider)element;
+					IResource resource= rp.getResource();
+					StructuredSelection selection= new StructuredSelection(resource);
+					IWorkbenchPart workbenchPart= container.getWorkbenchPart();
+					if (workbenchPart != null) {
+						final IWorkbenchSite ws= workbenchPart.getSite();
+
+						MenuManager submenu1= new MenuManager(getShowInMenuLabel());
+						IContributionItem showInMenu= ContributionItemFactory.VIEWS_SHOW_IN.create(ws.getWorkbenchWindow());
+						submenu1.add(showInMenu);
+						manager.insertAfter("file", submenu1); //$NON-NLS-1$
+						MenuManager submenu2= new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
+
+						// XXX: Internal reference will get fixed during 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=307026
+						submenu2.add(new OpenWithMenu(ws.getPage(), resource) {
+							/*
+							 * (non-Javadoc)
+							 * 
+							 * @see org.eclipse.ui.actions.OpenWithMenu#openEditor(org.eclipse.ui.
+							 * IEditorDescriptor, boolean)
+							 */
+							protected void openEditor(IEditorDescriptor editorDescriptor, boolean openUsingDescriptor) {
+								super.openEditor(editorDescriptor, openUsingDescriptor);
+								IEditorPart editor= ws.getPage().getActiveEditor();
+								Point selectedRange= v.getSelectedRange();
+								revealInEditor(editor, selectedRange.x, selectedRange.y);
+							}
+						});
+						manager.insertAfter("file", submenu2); //$NON-NLS-1$
+
+						// XXX: Internal reference will get fixed during 3.7, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=307026
+						OpenFileAction openFileAction= new OpenFileAction(ws.getPage()) {
+							/*
+							 * (non-Javadoc)
+							 * 
+							 * @see org.eclipse.ui.actions.OpenSystemEditorAction#run()
+							 */
+							public void run() {
+								super.run();
+								IEditorPart editor= ws.getPage().getActiveEditor();
+								Point selectedRange= v.getSelectedRange();
+								revealInEditor(editor, selectedRange.x, selectedRange.y);
+							}
+						};
+						openFileAction.selectionChanged(selection);
+						manager.insertAfter("file", openFileAction); //$NON-NLS-1$
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Selects and reveals the given offset and length in the given editor part.
+	 * 
+	 * @param editor the editor part
+	 * @param offset the offset
+	 * @param length the length
+	 * @since 3.6
+	 */
+	private static void revealInEditor(IEditorPart editor, final int offset, final int length) {
+		if (editor instanceof ITextEditor) {
+			((ITextEditor)editor).selectAndReveal(offset, length);
+			return;
+		}
+
+		// Support for non-text editor - try IGotoMarker interface
+		final IGotoMarker gotoMarkerTarget;
+		if (editor instanceof IGotoMarker)
+			gotoMarkerTarget= (IGotoMarker)editor;
+		else
+			gotoMarkerTarget= editor != null ? (IGotoMarker)editor.getAdapter(IGotoMarker.class) : null;
+		if (gotoMarkerTarget != null) {
+			final IEditorInput input= editor.getEditorInput();
+			if (input instanceof IFileEditorInput) {
+				WorkspaceModifyOperation op= new WorkspaceModifyOperation() {
+					protected void execute(IProgressMonitor monitor) throws CoreException {
+						IMarker marker= null;
+						try {
+							marker= ((IFileEditorInput)input).getFile().createMarker(IMarker.TEXT);
+							marker.setAttribute(IMarker.CHAR_START, offset);
+							marker.setAttribute(IMarker.CHAR_END, offset + length);
+
+							gotoMarkerTarget.gotoMarker(marker);
+
+						} finally {
+							if (marker != null)
+								marker.delete();
+						}
+					}
+				};
+
+				try {
+					op.run(null);
+				} catch (InvocationTargetException ex) {
+					// reveal failed
+				} catch (InterruptedException e) {
+					Assert.isTrue(false, "this operation can not be canceled"); //$NON-NLS-1$
+				}
+			}
+			return;
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
index 88ec189..e434731 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ScopableSubscriberParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,17 +13,15 @@ package org.eclipse.team.internal.ui.synchronize;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.team.core.subscribers.Subscriber;
 import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor;
-import org.eclipse.team.ui.synchronize.ISynchronizeScope;
-import org.eclipse.team.ui.synchronize.SubscriberParticipant;
+import org.eclipse.team.ui.synchronize.*;
 
 /**
- * subscriber particpant that supports filtering using scopes.
+ * Subscriber participant that supports filtering using scopes.
  */
 public abstract class ScopableSubscriberParticipant extends SubscriberParticipant {
 	
 	/**
-	 * No arg contructor used to create workspace scope and for
+	 * No arg constructor used to create workspace scope and for
 	 * creation of persisted participant after startup
 	 */
 	public ScopableSubscriberParticipant() {
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
index d9861ab..6d4dfae 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,7 +41,7 @@ import org.eclipse.ui.actions.ActionGroup;
  * steps required:
  * <ul>
  * <li>Create a viewer contribution with a <code>targetID</code> that groups
- * sets of actions that are related. A common pratice for synchronize view
+ * sets of actions that are related. A common practice for synchronize view
  * configurations is to use the participant id as the targetID.
  * 
  * <pre>
@@ -183,7 +183,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 		if(actionBars != null) {
 			IToolBarManager manager = actionBars.getToolBarManager();
 			
-			// Populate the toobar menu with the configured groups
+			// Populate the toolbar menu with the configured groups
 			Object o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_TOOLBAR_MENU);
 			if (!(o instanceof String[])) {
 				o = ISynchronizePageConfiguration.DEFAULT_TOOLBAR_MENU;
@@ -198,7 +198,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 			// view menu
 			IMenuManager menu = actionBars.getMenuManager();
 			if (menu != null) {
-				// Populate the view dropdown menu with the configured groups
+				// Populate the view drop-down menu with the configured groups
 				o = getConfiguration().getProperty(ISynchronizePageConfiguration.P_VIEW_MENU);
 				if (!(o instanceof String[])) {
 					o = ISynchronizePageConfiguration.DEFAULT_VIEW_MENU;
@@ -289,7 +289,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 	}
 
 	/**
-	 * Register the context menu with the platform if apropriate.
+	 * Register the context menu with the platform if appropriate.
 	 * @param viewer the viewer
 	 * @param menuMgr the context menu manager
 	 */
@@ -324,7 +324,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 	
 	/**
 	 * Callback that is invoked when a context menu is about to be shown in the
-	 * viewer. Subsclasses must implement to contribute menus. Also, menus can
+	 * viewer. Subclasses must implement to contribute menus. Also, menus can
 	 * contributed by creating a viewer contribution with a <code>targetID</code> 
 	 * that groups sets of actions that are related.
 	 * 
@@ -350,7 +350,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 		String[] groups = (String[])o;
 		for (int i = 0; i < groups.length; i++) {
 			String group = groups[i];
-			// There is no need to adjust the group ids in a contetx menu (see setActionBars)
+			// There is no need to adjust the group ids in a context menu (see setActionBars)
 			manager.add(new Separator(group));
 		}
 	}
@@ -370,7 +370,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
 	
 	/**
 	 * Invoked each time the selection in the view changes in order
-	 * to update the ction bars.
+	 * to update the action bars.
 	 * @param selection the selection from the viewer
 	 */
 	protected void updateActionBars(IStructuredSelection selection) {
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index 0bd08ff..c9d58fa 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,7 @@
 package org.eclipse.team.internal.ui.synchronize;
 
 import java.io.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import org.eclipse.core.runtime.*;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -132,7 +127,7 @@ public class SynchronizeManager implements ISynchronizeManager {
 			Object[] copiedListeners = fListeners.getListeners();
 			for (int i = 0; i < copiedListeners.length; i++) {
 				fListener = (ISynchronizeParticipantListener) copiedListeners[i];
-				Platform.run(this);
+				SafeRunner.run(this);
 			}
 			fChanged = null;
 			fListener = null;
@@ -140,7 +135,7 @@ public class SynchronizeManager implements ISynchronizeManager {
 	}
 
 	/**
-	 * Represents a paticipant instance and allows lazy initialization of the instance
+	 * Represents a participant instance and allows lazy initialization of the instance
 	 * only when the participant is required.
 	 */
 	private class ParticipantInstance implements ISynchronizeParticipantReference {
@@ -651,13 +646,18 @@ public class SynchronizeManager implements ISynchronizeManager {
 
 	private File getStateFile() {
 		IPath pluginStateLocation = TeamUIPlugin.getPlugin().getStateLocation();
-		return pluginStateLocation.append(FILENAME).toFile(); //	
+		return pluginStateLocation.append(FILENAME).toFile();	
 	}
 	
 	/**
 	 * Fires notification.
-	 * @param participants participants added/removed
-	 * @param type ADD or REMOVE
+	 * 
+	 * @param participants
+	 *            participants added/removed
+	 * @param type
+	 *            ADDED or REMOVED
+	 * @see SynchronizeManager#ADDED
+	 * @see SynchronizeManager#REMOVED
 	 */
 	private void fireUpdate(ISynchronizeParticipant[] participants, int type) {
 		new SynchronizeViewPageNotifier().notify(participants, type);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
index 6690615..1474583 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeModelManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui.synchronize;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -30,14 +28,14 @@ import org.eclipse.ui.IActionBars;
  * Manages the models that can be displayed by a synchronize page
  */
 public abstract class SynchronizeModelManager extends SynchronizePageActionGroup {
-	
+
 	private static final String P_LAST_PROVIDER = TeamUIPlugin.ID + ".P_LAST_MODELPROVIDER"; //$NON-NLS-1$
-	
+
 	private ISynchronizeModelProvider modelProvider;
 	private List toggleModelProviderActions;
 	private ISynchronizePageConfiguration configuration;
 	private TreeViewerAdvisor advisor;
-	
+
 	/**
 	 * Action that allows changing the model providers supported by this advisor.
 	 */
@@ -71,26 +69,27 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 			}
 		}
 	}
-	
+
 	public SynchronizeModelManager(ISynchronizePageConfiguration configuration) {
 		Assert.isNotNull(configuration, "configuration cannot be null"); //$NON-NLS-1$
 		this.configuration = configuration;
 		configuration.addActionContribution(this);
 	}
-	
+
 	/**
 	 * Initialize the model manager to be used with the provided advisor.
+	 * @param advisor the tree viewer advisor
 	 */
 	public void setViewerAdvisor(TreeViewerAdvisor advisor) {
 		this.advisor = advisor;
 	}
-	
+
 	/**
 	 * Return the list of supported model providers for this advisor.
 	 * @return the supported models
 	 */
 	protected abstract ISynchronizeModelProviderDescriptor[] getSupportedModelProviders();
-	
+
 	/**
 	 * Get the model provider that will be used to create the input
 	 * for the adviser's viewer.
@@ -105,7 +104,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 	public ISynchronizeModelProvider getActiveModelProvider() {
 		return modelProvider;
 	}
-    
+
 	protected String getDefaultProviderId() {
 		String defaultLayout = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_LAYOUT);
 		if (defaultLayout.equals(IPreferenceIds.TREE_LAYOUT)) {
@@ -115,9 +114,9 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 		    return FlatModelProvider.FlatModelProviderDescriptor.ID;
 		}
 		// Return compressed folder is the others were not a match
-        return CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID;
+		return CompressedFoldersModelProvider.CompressedFolderModelProviderDescriptor.ID;
 	}
-	
+
 	/**
 	 * Return the id of the selected provider. By default, this is the 
 	 * id of the active provider. However, subclasses that use a composite
@@ -126,18 +125,18 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 	 * @return the id of the selected provider
 	 */
 	protected String getSelectedProviderId() {
-	    ISynchronizeModelProvider provider = getActiveModelProvider();
-	    if (provider != null) {
-	        return provider.getDescriptor().getId();
-	    }
-	    return getDefaultProviderId();
+		ISynchronizeModelProvider provider = getActiveModelProvider();
+		if (provider != null) {
+			return provider.getDescriptor().getId();
+		}
+		return getDefaultProviderId();
 	}
-	
+
 	/**
 	 * Replace the active provider with a provider for the given id.
 	 * The new provider is created and initialized and assigned
 	 * as the input of the viewer.
-	 * @param id the id used to consfigure the new model provider
+	 * @param id the id used to configure the new model provider
 	 * @param monitor a progress monitor
 	 */
 	protected void setInput(String id, IProgressMonitor monitor) {
@@ -150,18 +149,18 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 		modelProvider.prepareInput(monitor);
 		setInput();
 	}
-	
+
 	/**
-     * Save the settings for the currently active provider
-     */
-    protected void saveProviderSettings(String id) {
-        IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
-		if(pageSettings != null) {
+	 * Save the settings for the currently active provider
+	 */
+	protected void saveProviderSettings(String id) {
+		IDialogSettings pageSettings = getConfiguration().getSite().getPageSettings();
+		if (pageSettings != null) {
 			pageSettings.put(P_LAST_PROVIDER, id);
 		}
-    }
+	}
 
-    /**
+	/**
 	 * Set the input of the viewer to the root model element.
 	 */
 	protected void setInput() {
@@ -178,7 +177,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 	 */
 	public ISynchronizeModelElement getModelRoot() {
 		if (modelProvider != null && modelProvider instanceof SynchronizeModelProvider) {
-		    ((SynchronizeModelProvider)modelProvider).waitUntilDone(new IProgressMonitor() {
+			((SynchronizeModelProvider)modelProvider).waitUntilDone(new IProgressMonitor() {
 				public void beginTask(String name, int totalWork) {
 				}
 				public void done() {
@@ -203,7 +202,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 			return null;
 		}
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.team.ui.synchronize.IActionContribution#initialize(org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration)
 	 */
@@ -231,7 +230,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 		    setInput();
 		}
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.team.ui.synchronize.IActionContribution#setActionBars(org.eclipse.ui.IActionBars)
 	 */
@@ -271,7 +270,7 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 		}
 		super.dispose();
 	}
-	
+
 	/**
 	 * Returns the configuration
 	 * @return the configuration.
@@ -279,12 +278,12 @@ public abstract class SynchronizeModelManager extends SynchronizePageActionGroup
 	public ISynchronizePageConfiguration getConfiguration() {
 		return configuration;
 	}
-	
+
 	/**
 	 * Return the sync info set that is contained in the configuration.
 	 * @return the sync info set that is contained in the configuration
 	 */
-    protected SyncInfoSet getSyncInfoSet() {
+	protected SyncInfoSet getSyncInfoSet() {
 		return (SyncInfoSet)getConfiguration().getProperty(ISynchronizePageConfiguration.P_SYNC_INFO_SET);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
index 56f1cc2..b63d243 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,30 +12,40 @@ package org.eclipse.team.internal.ui.synchronize;
 
 import java.util.*;
 
+import org.eclipse.compare.*;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.*;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.dialogs.*;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.IBasicPropertyConstants;
+import org.eclipse.jface.viewers.*;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.history.IFileRevision;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.internal.core.mapping.ResourceVariantFileRevision;
 import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.history.FileRevisionEditorInput;
 import org.eclipse.team.internal.ui.synchronize.actions.*;
 import org.eclipse.team.ui.TeamUI;
 import org.eclipse.team.ui.synchronize.*;
 import org.eclipse.ui.*;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.part.*;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 
 /**
  * Implements a Synchronize View that contains multiple synchronize participants. 
  */
-public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener, ISaveablesSource, ISaveablePart {
+public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener, ISaveablesSource, ISaveablePart, IShowInTarget {
 	
 	/**
 	 * Suggested maximum length of participant names when shown in certain menus and dialog.
@@ -77,11 +87,22 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 	 */
 	private RemoveSynchronizeParticipantAction fRemoveAllAction;
 	
+	private ToggleLinkingAction fToggleLinkingAction;
+
+	/**
+	 * Action to paste patch into the view, starting a new synchronization.
+	 */
+	private PasteAction fPastePatchAction;
+	private boolean fLinkingEnabled;
+	private OpenAndLinkWithEditorHelper fOpenAndLinkWithEditorHelper;
+
+
 	/**
 	 * Preference key to save
 	 */
 	private static final String KEY_LAST_ACTIVE_PARTICIPANT_ID = "lastactiveparticipant_id"; //$NON-NLS-1$
     private static final String KEY_LAST_ACTIVE_PARTICIPANT_SECONDARY_ID = "lastactiveparticipant_sec_id"; //$NON-NLS-1$
+    private static final String KEY_LINK_WITH_EDITOR = "linkWithEditor"; //$NON-NLS-1$
 	private static final String KEY_SETTINGS_SECTION= "SynchronizeViewSettings"; //$NON-NLS-1$
 
 
@@ -255,12 +276,15 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 		TeamUI.getSynchronizeManager().removeSynchronizeParticipantListener(this);
 		// Pin action is hooked up to listeners, must call dispose to un-register.
 		fPinAction.dispose();
+		fPastePatchAction.dispose();
 		// Remember the last active participant
 		if(activeParticipantRef != null) {
 			rememberCurrentParticipant();
 		}			
 		fParticipantToPart = null;
-		fPartToParticipant = null;	
+		fPartToParticipant = null;
+		// Remove 'Link with Editor' listener when closing the view
+		getSite().getPage().removePartListener(fLinkWithEditorListener);
 	}
 
     /**
@@ -328,6 +352,12 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 										return;
 									}
 									display(p);
+								} else {
+									/*
+									 * Remove 'Link with Editor' listener if
+									 * there are no more participants available.
+									 */
+									getSite().getPage().removePartListener(fLinkWithEditorListener);
 								}
 							}
 						}
@@ -356,8 +386,10 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 	protected void createActions() {
 		fPageDropDown = new SynchronizePageDropDownAction(this);
 		fPinAction = new PinParticipantAction();
+		fToggleLinkingAction = new ToggleLinkingAction(this);
 		fRemoveCurrentAction = new RemoveSynchronizeParticipantAction(this, false);
 		fRemoveAllAction = new RemoveSynchronizeParticipantAction(this, true);
+		fPastePatchAction = new PasteAction(this);
 		updateActionEnablements();
 	}
 
@@ -365,12 +397,19 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 		if (fPinAction != null) {
 			fPinAction.setParticipant(activeParticipantRef);
 		}
+		if (fToggleLinkingAction != null) {
+			fToggleLinkingAction.setEnabled(getParticipant() != null);
+		}
 		if (fRemoveAllAction != null) {
 			fRemoveAllAction.setEnabled(getParticipant() != null);
 		}
 		if (fRemoveCurrentAction != null) {
 			fRemoveCurrentAction.setEnabled(getParticipant() != null);
 		}
+		if (fPastePatchAction != null) {
+			// The action is always enabled
+			fPastePatchAction.setEnabled(true); 
+		}
 	}
 
 	/**
@@ -384,8 +423,13 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 		mgr.add(fPinAction);
 		IMenuManager menu = bars.getMenuManager();
 		menu.add(fPinAction);
+		menu.add(fToggleLinkingAction);
 		menu.add(fRemoveCurrentAction);
 		menu.add(fRemoveAllAction);
+
+		IHandlerService handlerService= (IHandlerService) this.getViewSite().getService(IHandlerService.class);
+		handlerService.activateHandler(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR, new ActionHandler(fToggleLinkingAction));
+		handlerService.activateHandler(ActionFactory.PASTE.getCommandId(), new ActionHandler(fPastePatchAction));
 	}
 
 	/* (non-Javadoc)
@@ -396,11 +440,39 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 		if (part != null) {
 			partActivated(part);
 			fPageDropDown.update();
+			createOpenAndLinkWithEditorHelper(getViewer());
             rememberCurrentParticipant();
             PlatformUI.getWorkbench().getHelpSystem().setHelp(getPageBook().getParent(), participant.getHelpContextId());
 		}
 	}
 	
+	private void createOpenAndLinkWithEditorHelper(StructuredViewer viewer) {
+		if (fOpenAndLinkWithEditorHelper != null)
+			fOpenAndLinkWithEditorHelper.dispose();
+		fOpenAndLinkWithEditorHelper= new OpenAndLinkWithEditorHelper(viewer) {
+			protected void activate(ISelection selection) {
+				try {
+					final Object selectedElement = getSingleElement(selection);
+					if (isOpenInEditor(selectedElement) != null)
+						if (selectedElement instanceof IFile)
+							openInEditor((IFile) selectedElement, true);
+				} catch (PartInitException ex) {
+					// ignore if no editor input can be found
+				}
+			}
+
+			protected void linkToEditor(ISelection selection) {
+				SynchronizeView.this.linkToEditor(selection);
+			}
+
+			protected void open(ISelection selection, boolean activate) {
+				// TODO: implement, bug 291211
+			}
+		};
+		fOpenAndLinkWithEditorHelper.setLinkWithEditor(isLinkingEnabled());
+		setLinkingEnabled(isLinkingEnabled());
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.part.PageBookView#getBootstrapPart()
 	 */
@@ -437,6 +509,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 	 */
 	public void createPartControl(Composite parent) {
 		super.createPartControl(parent);
+		restoreLinkingEnabled();
 		createActions();
 		configureToolBar(getViewSite().getActionBars());
 		updateForExistingParticipants();
@@ -683,4 +756,327 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
 							new String[] { description, syncMode }));
 		}
 	}
-}
+
+	// copy-pasted from org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart and modified
+
+	private IPartListener2 fLinkWithEditorListener= new IPartListener2() {
+		public void partVisible(IWorkbenchPartReference partRef) {}
+		public void partBroughtToTop(IWorkbenchPartReference partRef) {}
+		public void partClosed(IWorkbenchPartReference partRef) {}
+		public void partDeactivated(IWorkbenchPartReference partRef) {}
+		public void partHidden(IWorkbenchPartReference partRef) {}
+		public void partOpened(IWorkbenchPartReference partRef) {}
+		public void partInputChanged(IWorkbenchPartReference partRef) {
+			if (partRef instanceof IEditorReference) {
+				editorActivated(((IEditorReference) partRef).getEditor(true));
+			}
+		}
+
+		public void partActivated(IWorkbenchPartReference partRef) {
+			if (partRef instanceof IEditorReference) {
+				editorActivated(((IEditorReference) partRef).getEditor(true));
+			}
+		}
+
+	};
+
+	public boolean isLinkingEnabled() {
+		return fLinkingEnabled;
+	}
+
+	private static IElementComparer COMPARER = new IElementComparer() {
+		
+		private Object getContributedResourceOrResourceVariant(Object o) {
+			IResource[] resources = Utils.getContributedResources(new Object[] {o});
+			if (resources.length > 0)
+				return resources[0];
+			if (o instanceof SyncInfoModelElement) {
+				SyncInfoModelElement sime = (SyncInfoModelElement) o;
+				return sime.getSyncInfo().getRemote();
+			}
+			return null;
+		}
+		
+		public int hashCode(Object element) {
+			Object r = getContributedResourceOrResourceVariant(element);
+			if (r != null)
+				return r.hashCode();
+			return element.hashCode();
+		}
+
+		public boolean equals(Object a, Object b) {
+			// no need to check for null, CustomeHashtable cannot contain null keys
+			if (a instanceof IResource || a instanceof IResourceVariant) {
+				b = getContributedResourceOrResourceVariant(b);
+			} else if (b instanceof IResource || b instanceof IResourceVariant) {
+				a = getContributedResourceOrResourceVariant(a);
+				return b.equals(a); // a may be null
+			}
+			return a.equals(b);
+		}
+	};
+
+	public void setLinkingEnabled(boolean enabled) {
+		fLinkingEnabled= enabled;
+		IDialogSettings dialogSettings = getDialogSettings();
+		dialogSettings.put(KEY_LINK_WITH_EDITOR, fLinkingEnabled);
+
+		IWorkbenchPage page= getSite().getPage();
+		if (enabled) {
+			page.addPartListener(fLinkWithEditorListener);
+
+			IEditorPart editor = page.getActiveEditor();
+			if (editor != null)
+				editorActivated(editor);
+		} else {
+			page.removePartListener(fLinkWithEditorListener);
+		}
+		fOpenAndLinkWithEditorHelper.setLinkWithEditor(enabled);
+		
+	}
+
+	private void restoreLinkingEnabled() {
+		fLinkingEnabled = getDialogSettings().getBoolean(KEY_LINK_WITH_EDITOR);
+	}
+
+	/**
+	 * Links to editor (if option enabled)
+	 * @param selection the selection
+	 */
+	private void linkToEditor(ISelection selection) {
+		Object obj = getSingleElement(selection);
+		if (obj != null) {
+			IEditorPart part = isOpenInEditor(obj);
+			if (part != null) {
+				IWorkbenchPage page= getSite().getPage();
+				page.bringToTop(part);
+			}
+		}
+	}
+
+	/**
+	 * An editor has been activated. Set the selection in the Sync View
+	 * to be the editor's input, if linking is enabled.
+	 * @param editor the activated editor
+	 */
+	private void editorActivated(IEditorPart editor) {
+		if (!isLinkingEnabled())
+			return;
+
+		IEditorInput editorInput= editor.getEditorInput();
+		if (editorInput == null)
+			return;
+		Object input= getInputFromEditor(editorInput);
+		if (input == null)
+			return;
+		if (!inputIsSelected(editorInput))
+			showInput(input);
+		else
+			getViewer().getTree().showSelection();
+	}
+
+	boolean showInput(Object input) {
+		Object element = input;
+		if (element != null) {
+			IElementComparer previousComparer = getViewer().getComparer();
+			getViewer().setComparer(COMPARER);
+			try {
+				ISelection newSelection = new StructuredSelection(element);
+				if (getViewer().getSelection().equals(newSelection)) {
+					getViewer().reveal(element);
+				} else {
+					getViewer().setSelection(newSelection, true);
+
+					while (element != null && getViewer().getSelection().isEmpty()) {
+						// Try to select parent in case element is filtered
+						element = getParent(element);
+						if (element != null) {
+							newSelection = new StructuredSelection(element);
+							getViewer().setSelection(newSelection, true);
+						} else {
+							// Failed to find parent to select
+							return false;
+						}
+					}
+				}
+				return true;
+			} finally {
+				getViewer().setComparer(previousComparer);
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Returns the element's parent.
+	 * @param element the element
+	 *
+	 * @return the parent or <code>null</code> if there's no parent
+	 */
+	private Object getParent(Object element) {
+		if (element instanceof IResource)
+			return ((IResource)element).getParent();
+		return null;
+	}
+
+	private TreeViewer getViewer() {
+		IPage currentPage = getCurrentPage();
+		if (currentPage instanceof ISynchronizePage) {
+			return (TreeViewer) ((ISynchronizePage)currentPage).getViewer();
+		}
+		/*
+		 * We should never get here. fLinkWithEditorListener is removed when no
+		 * participants are available and the method should not be called
+		 * afterwards. See participantsRemoved method for the listener's
+		 * removal.
+		 */
+		Assert.isTrue(false);
+		return null;
+	}
+
+	private boolean inputIsSelected(IEditorInput input) {
+		IStructuredSelection selection= (IStructuredSelection) getViewer().getSelection();
+		if (selection.size() != 1)
+			return false;
+		IEditorInput selectionAsInput= getEditorInput(selection.getFirstElement());
+		return input.equals(selectionAsInput);
+	}
+
+	private static IEditorInput getEditorInput(Object input) {
+		IResource[] resources = Utils.getContributedResources(new Object[] { input });
+		if (resources.length > 0)
+			input = resources[0];
+		if (input instanceof IFile)
+			return new FileEditorInput((IFile) input);
+		return null;
+	}
+
+	private Object getInputFromEditor(IEditorInput editorInput) {
+		Object input= editorInput.getAdapter(IFile.class);
+		if (input == null && editorInput instanceof FileRevisionEditorInput) {
+			IFileRevision fileRevision = ((FileRevisionEditorInput)editorInput).getFileRevision();
+			if (fileRevision instanceof ResourceVariantFileRevision)
+				return ((ResourceVariantFileRevision) fileRevision).getVariant();
+		}
+		if (input == null && editorInput instanceof IStorageEditorInput) {
+			try {
+				input= ((IStorageEditorInput) editorInput).getStorage();
+			} catch (CoreException e) {
+				// ignore
+			}
+		}
+		return input;
+	}
+
+	// copy-pasted from org.eclipse.jdt.internal.ui.javaeditor.EditorUtility and modified
+
+	private static IEditorPart isOpenInEditor(Object inputElement) {
+		IEditorInput input = getEditorInput(inputElement);
+		if (input != null) {
+			IWorkbenchPage p = TeamUIPlugin.getActivePage();
+			if (p != null) {
+				IEditorPart editor = p.findEditor(input);
+				if (editor == null) {
+					IEditorReference[] er = p.getEditorReferences();
+					for (int i = 0; i < er.length; i++)
+						if (er[i].getId().equals(
+								"org.eclipse.compare.CompareEditor") && matches(er[i], input)) //$NON-NLS-1$
+							editor = er[i].getEditor(false);
+				}
+				return editor;
+			}
+		}
+		return null;
+	}
+
+	private static boolean matches(IEditorReference editorRef,
+			IEditorInput input) {
+		if (input instanceof FileEditorInput) {
+			IFile file = ((FileEditorInput) input).getFile();
+
+			CompareEditorInput cei = (CompareEditorInput) ((EditorPart) editorRef
+					.getPart(false)).getEditorInput();
+			Object compareResult = cei.getCompareResult();
+
+			if (compareResult instanceof IAdaptable) {
+				IResource r = (IResource) ((IAdaptable) compareResult)
+						.getAdapter(IResource.class);
+				if (r != null)
+					return file.equals(r);
+			}
+			if (compareResult instanceof ICompareInput) {
+				ICompareInput compareInput = (ICompareInput) compareResult;
+				ITypedElement left = compareInput.getLeft();
+				if (left instanceof ResourceNode)
+					if (file.equals(((ResourceNode) left).getResource()))
+						return true;
+				ITypedElement right = compareInput.getRight();
+				if (right instanceof ResourceNode)
+					if (file.equals(((ResourceNode) right).getResource()))
+						return true;
+			}
+		}
+		return false;
+	}
+
+	private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException {
+		if (file == null)
+			throwPartInitException(TeamUIMessages.SynchronizeView_fileMustNotBeNull);
+
+		IWorkbenchPage p = TeamUIPlugin.getActivePage();
+		if (p == null)
+			throwPartInitException(TeamUIMessages.SynchronizeView_noActiveWorkbenchPage);
+
+		IEditorPart editorPart = IDE.openEditor(p, file, activate);
+		return editorPart;
+	}
+
+	private static void throwPartInitException(String message) throws PartInitException {
+		IStatus status = new Status(IStatus.ERROR, TeamUIPlugin.ID, IStatus.OK, message, null);
+		throw new PartInitException(status);
+	}
+
+	// copy-pasted from org.eclipse.jdt.internal.ui.util.SelectionUtil and modified
+
+	/**
+	 * Returns the selected element if the selection consists of a single
+	 * element only.
+	 *
+	 * @param s the selection
+	 * @return the selected first element or null
+	 */
+	private static Object getSingleElement(ISelection s) {
+		if (!(s instanceof IStructuredSelection))
+			return null;
+		IStructuredSelection selection = (IStructuredSelection) s;
+		if (selection.size() != 1)
+			return null;
+
+		return selection.getFirstElement();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.part.IShowInTarget#show(org.eclipse.ui.part.ShowInContext)
+	 */
+	public boolean show(ShowInContext context) {
+		Object selection = getSingleElement(context.getSelection());
+		if (selection != null) {
+			// If can show the selection, do it.
+			// Otherwise, fall through and attempt to show the input
+			if (showInput(selection))
+				return true;
+		}
+		Object input = context.getInput();
+		if (input != null) {
+			if (input instanceof IEditorInput) {
+				return showInput(getInputFromEditor((IEditorInput) input));
+			}
+			 return showInput(input);
+		}
+		return false;
+	}
+
+	public IAction getPastePatchAction() {
+		return fPastePatchAction;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
index 83b66fa..2e208ba 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSynchronizingPerspective.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.team.internal.ui.synchronize;
 import org.eclipse.team.ui.history.IHistoryView;
 import org.eclipse.team.ui.synchronize.ISynchronizeView;
 import org.eclipse.ui.*;
-import org.eclipse.ui.navigator.resources.ProjectExplorer;
 
 public class TeamSynchronizingPerspective implements IPerspectiveFactory {
 
@@ -40,7 +39,7 @@ public class TeamSynchronizingPerspective implements IPerspectiveFactory {
 
 		// Add "show views".
 		layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);
-		layout.addShowViewShortcut(ProjectExplorer.VIEW_ID);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
 		layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
 		layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
 		layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
index e8020ff..7b27c38 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/UnchangedResourceModelElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,12 +13,11 @@ package org.eclipse.team.internal.ui.synchronize;
 import org.eclipse.compare.structuremergeviewer.IDiffContainer;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
 
 /**
  * DiffNode that represents a resource that is in sync.
  */
-public class UnchangedResourceModelElement extends SynchronizeModelElement implements IAdaptable {
+public class UnchangedResourceModelElement extends SynchronizeModelElement {
 
 	private final IResource resource;
 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
index 75e49af..8fbfdab 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/OpenInCompareAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2008 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,10 +24,13 @@ import org.eclipse.jface.util.OpenStrategy;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.Utils;
 import org.eclipse.team.internal.ui.mapping.ModelCompareEditorInput;
 import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchModelCompareEditorInput;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchSubscriberMergeContext;
 import org.eclipse.team.ui.mapping.ISynchronizationCompareInput;
+import org.eclipse.team.ui.mapping.ITeamContentProviderManager;
 import org.eclipse.team.ui.synchronize.*;
 import org.eclipse.ui.*;
 
@@ -110,12 +113,21 @@ public class OpenInCompareAction extends Action {
 			ICompareInput input = msp.asCompareInput(object);
 			IWorkbenchPage workbenchPage = getWorkbenchPage(site);
 			if (input != null && workbenchPage != null && isOkToOpen(site, participant, input)) {
-				return openCompareEditor(workbenchPage, new ModelCompareEditorInput(msp, input, workbenchPage, configuration), keepFocus, site, reuseEditorIfPossible);
+				if (isApplyPatchModelPresent(configuration))
+					return openCompareEditor(workbenchPage, new ApplyPatchModelCompareEditorInput(msp, input, workbenchPage, configuration), keepFocus, site, reuseEditorIfPossible);
+				else
+					return openCompareEditor(workbenchPage, new ModelCompareEditorInput(msp, input, workbenchPage, configuration), keepFocus, site, reuseEditorIfPossible);
 			}
 		}
 		return null;
 	}
-	
+
+	private static boolean isApplyPatchModelPresent(
+			ISynchronizePageConfiguration configuration) {
+		Object object = configuration.getProperty(ITeamContentProviderManager.P_SYNCHRONIZATION_CONTEXT);
+		return object instanceof ApplyPatchSubscriberMergeContext;
+	}
+
 	private static boolean isOkToOpen(final ISynchronizePageSite site, final ISynchronizeParticipant participant, final ICompareInput input) {
 		if (participant instanceof ModelSynchronizeParticipant && input instanceof ISynchronizationCompareInput) {
 			final ModelSynchronizeParticipant msp = (ModelSynchronizeParticipant) participant;
@@ -193,7 +205,9 @@ public class OpenInCompareAction extends Action {
     public static void openCompareEditor(CompareEditorInput input, IWorkbenchPage page, boolean reuseEditorIfPossible) {
         if (page == null || input == null) 
             return;
-        IEditorPart editor = findReusableCompareEditor(input, page);
+		IEditorPart editor = Utils.findReusableCompareEditor(input, page,
+				new Class[] { SyncInfoCompareInput.class,
+						ModelCompareEditorInput.class });
         // reuse editor only for single selection
         if(editor != null && reuseEditorIfPossible) {
         	IEditorInput otherInput = editor.getEditorInput();
@@ -209,46 +223,6 @@ public class OpenInCompareAction extends Action {
         	CompareUI.openCompareEditorOnPage(input, page);
         }
     }
-	
-	/**
-	 * Returns an editor that can be re-used. An open compare editor that has
-	 * un-saved changes cannot be re-used.
-	 * 
-	 * @param input
-	 *            the input being opened
-	 * @param page
-	 * @return an EditorPart or <code>null</code> if none can be found
-	 */
-	public static IEditorPart findReusableCompareEditor(
-			CompareEditorInput input, IWorkbenchPage page) {
-		IEditorReference[] editorRefs = page.getEditorReferences();
-		// first loop looking for an editor with the same input
-		for (int i = 0; i < editorRefs.length; i++) {
-			IEditorPart part = editorRefs[i].getEditor(false);
-			if (part != null
-					&& (part.getEditorInput() instanceof SyncInfoCompareInput || part
-							.getEditorInput() instanceof ModelCompareEditorInput)
-					&& part instanceof IReusableEditor
-					&& part.getEditorInput().equals(input)) {
-				return part;
-			}
-		}
-		// if none found and "Reuse open compare editors" preference is on use
-		// a non-dirty editor
-		if (isReuseOpenEditor()) {
-			for (int i = 0; i < editorRefs.length; i++) {
-				IEditorPart part = editorRefs[i].getEditor(false);
-				if (part != null
-						&& (part.getEditorInput() instanceof SaveableCompareEditorInput)
-						&& part instanceof IReusableEditor && !part.isDirty()) {
-					return part;
-				}
-			}
-		}
-
-		// no re-usable editor found
-		return null;
-	}
 
 	/**
 	 * Returns an editor handle if a SyncInfoCompareInput compare editor is opened on 
@@ -305,8 +279,4 @@ public class OpenInCompareAction extends Action {
 		}
 		return null;
 	}
-	
-	private static boolean isReuseOpenEditor() {
-		return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(IPreferenceIds.REUSE_OPEN_COMPARE_EDITOR);
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java
new file mode 100644
index 0000000..8f496d6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/PasteAction.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.actions;
+
+import java.io.*;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.dnd.*;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.synchronize.patch.ApplyPatchOperation;
+import org.eclipse.ui.*;
+import org.eclipse.ui.actions.SelectionListenerAction;
+
+public class PasteAction extends SelectionListenerAction {
+
+	private final static String ID = TeamUIPlugin.PLUGIN_ID
+			+ ".synchronize.action.paste"; //$NON-NLS-1$
+	private Shell fShell;
+	private Clipboard fClipboard;
+
+	public PasteAction(IWorkbenchPart part) {
+		super(TeamUIMessages.PasteAction_1);
+		
+		final ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
+		setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
+		setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+		setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
+		
+		fShell = part.getSite().getShell();
+		Assert.isNotNull(fShell);
+		fClipboard = new Clipboard(fShell.getDisplay());
+		setToolTipText(TeamUIMessages.PasteAction_2);
+		setId(ID);
+	}
+
+	public void run() {
+		IStorage patchStorage = getPatchStorage();
+		if (patchStorage != null) {
+			IResource resource = null;
+			IResource[] resources = (IResource[]) getSelectedResources()
+					.toArray(new IResource[0]);
+			if (resources.length > 0) {
+				resource = resources[0];
+			}
+			// XXX: This will be fixed in 3.7, see
+			// https://bugs.eclipse.org/309803
+			ApplyPatchOperation operation = new ApplyPatchOperation(null,
+					patchStorage, resource, new CompareConfiguration()) {
+				protected boolean isApplyPatchInSynchronizeView() {
+					// ignore the preference, apply in the sync view
+					return true;
+				};
+			};
+			operation.openWizard();
+		} else {
+			MessageDialog.openError(fShell, TeamUIMessages.PasteAction_3,
+					TeamUIMessages.PasteAction_4);
+		}
+	}
+
+	private IStorage getPatchStorage() {
+		final String text = getClipboardText();
+		if (text == null)
+			return null;
+
+		IStorage storage = new IEncodedStorage() {
+			public Object getAdapter(Class adapter) {
+				return null;
+			}
+
+			public boolean isReadOnly() {
+				return false;
+			}
+
+			public String getName() {
+				return null;
+			}
+
+			public IPath getFullPath() {
+				return null;
+			}
+
+			public InputStream getContents() throws CoreException {
+				try {
+					return new ByteArrayInputStream(text.getBytes(getCharset()));
+				} catch (UnsupportedEncodingException e) {
+					throw new CoreException(new Status(IStatus.ERROR,
+							TeamUIPlugin.ID, IStatus.ERROR, e.getMessage(), e));
+				}
+			}
+
+			public String getCharset() throws CoreException {
+				return "UTF-8"; //$NON-NLS-1$
+			}
+		};
+
+		try {
+			if (ApplyPatchOperation.isPatch(storage)) {
+				return storage;
+			}
+		} catch (CoreException e) {
+			// ignore
+		}
+		return null;
+	}
+
+	private String getClipboardText() {
+		Transfer transfer = TextTransfer.getInstance();
+		if (isAvailable(transfer, fClipboard.getAvailableTypes())) {
+			return (String) getContents(fClipboard, transfer, fShell);
+		}
+		return null;
+	}
+
+	private static boolean isAvailable(Transfer transfer,
+			TransferData[] availableDataTypes) {
+		for (int i = 0; i < availableDataTypes.length; i++) {
+			if (transfer.isSupportedType(availableDataTypes[i]))
+				return true;
+		}
+		return false;
+	}
+
+	private static Object getContents(final Clipboard clipboard,
+			final Transfer transfer, Shell shell) {
+		// see bug 33028 for explanation why we need this
+		final Object[] result = new Object[1];
+		shell.getDisplay().syncExec(new Runnable() {
+			public void run() {
+				result[0] = clipboard.getContents(transfer);
+			}
+		});
+		return result[0];
+	}
+
+	public void dispose() {
+		fClipboard.dispose();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
index 2da6a66..0c0c6d9 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RefactorActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,10 +15,12 @@ import java.util.List;
 
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.viewers.*;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
 import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
 import org.eclipse.ui.*;
 import org.eclipse.ui.actions.*;
@@ -50,6 +52,13 @@ public class RefactorActionGroup extends ActionGroup {
 
 	public void fillContextMenu(IMenuManager parentMenu, String groupId) {
 		parentMenu.appendToGroup(groupId, copyAction);
+		// the paste action has been already created in the Sync view
+		IWorkbenchPart part = site.getPart();
+		if (part instanceof SynchronizeView) {
+			SynchronizeView sv = (SynchronizeView) part;
+			IAction pasteAction = sv.getPastePatchAction();
+			parentMenu.appendToGroup(groupId, pasteAction);
+		}
 		parentMenu.appendToGroup(groupId, deleteAction);
 		parentMenu.appendToGroup(groupId, moveAction);
 		parentMenu.appendToGroup(groupId, renameAction);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
index c9a17ae..b2fa407 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/StatusLineContributionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.core.synchronize.SyncInfo;
 import org.eclipse.team.internal.ui.*;
-import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.actions.ActionGroup;
 
@@ -78,9 +78,11 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
 
 	protected void updateCounts() {
 		final int total = getChangeCount();
-		final int workspaceConflicting = countFor(SyncInfo.CONFLICTING);
-		final int workspaceOutgoing = countFor(SyncInfo.OUTGOING);
-		final int workspaceIncoming = countFor(SyncInfo.INCOMING);
+		int supportedModes = configuration.getSupportedModes();
+		// count changes only if the given mode is supported
+		final int workspaceConflicting = ((supportedModes & ISynchronizePageConfiguration.CONFLICTING_MODE) != 0) ? countFor(SyncInfo.CONFLICTING) : 0;
+		final int workspaceOutgoing = ((supportedModes & ISynchronizePageConfiguration.OUTGOING_MODE) != 0) ? countFor(SyncInfo.OUTGOING) : 0;
+		final int workspaceIncoming = ((supportedModes & ISynchronizePageConfiguration.INCOMING_MODE) != 0) ? countFor(SyncInfo.INCOMING) : 0;
 
 		TeamUIPlugin.getStandardDisplay().asyncExec(new Runnable() {
 			public void run() {
@@ -89,9 +91,9 @@ public abstract class StatusLineContributionGroup extends ActionGroup {
 					incoming.setText(new Integer(workspaceIncoming).toString()); 
 					outgoing.setText(new Integer(workspaceOutgoing).toString()); 
 
-					conflicting.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_conflicting })); // 
-					outgoing.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_outgoing })); // 
-					incoming.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_incoming })); // 
+					conflicting.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_conflicting }));
+					outgoing.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_outgoing }));
+					incoming.setTooltip(NLS.bind(TeamUIMessages.StatisticsPanel_numbersTooltip, new String[] { TeamUIMessages.StatisticsPanel_incoming })); 
 				} else {
 					if (total == 1) {
 						totalChanges.setText(NLS.bind(TeamUIMessages.StatisticsPanel_numberTotalSingular, new String[] { Integer.toString(total) })); 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ToggleLinkingAction.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ToggleLinkingAction.java
new file mode 100644
index 0000000..9227f52
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ToggleLinkingAction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.synchronize.SynchronizeView;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+
+public class ToggleLinkingAction extends Action {
+
+	private SynchronizeView view;
+
+	public ToggleLinkingAction(SynchronizeView view) {
+		super(TeamUIMessages.SynchronizeView_linkWithEditor);
+		setDescription(TeamUIMessages.SynchronizeView_linkWithEditorDescription);
+		setToolTipText(TeamUIMessages.SynchronizeView_linkWithEditorTooltip);
+		setImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_LINK_WITH));
+		setDisabledImageDescriptor(TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_LINK_WITH_DISABLED));
+		setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR);
+		this.view = view;
+		setChecked(view.isLinkingEnabled());
+	}
+
+	public void run() {
+		view.setLinkingEnabled(isChecked());
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/AdapterFactory.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/AdapterFactory.java
new file mode 100644
index 0000000..6fab0e2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/AdapterFactory.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.patch.*;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+public class AdapterFactory implements IAdapterFactory {
+
+	private IWorkbenchAdapter modelAdapter = new PatchWorkbenchAdapter();
+	private ISynchronizationCompareAdapter compareAdapter;
+
+	public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if (adapterType == ResourceMapping.class) {
+			if (adaptableObject instanceof PatchProjectDiffNode) {
+				return new DiffProjectResourceMapping(
+						((PatchProjectDiffNode) adaptableObject)
+								.getDiffProject());
+			}
+			if (adaptableObject instanceof PatchFileDiffNode) {
+				return new FilePatchResourceMapping(
+						((PatchFileDiffNode) adaptableObject).getDiffResult());
+			}
+			if (adaptableObject instanceof HunkDiffNode) {
+				return new HunkResourceMapping(((HunkDiffNode) adaptableObject)
+						.getHunkResult());
+			}
+		}
+		if (adapterType == IWorkbenchAdapter.class)
+			return modelAdapter;
+		if (adapterType == ISynchronizationCompareAdapter.class
+				&& adaptableObject instanceof PatchModelProvider) {
+			if (compareAdapter == null) {
+				compareAdapter = new PatchCompareAdapter();
+			}
+			return compareAdapter;
+		}
+		if (adapterType == IResource.class) {
+			if (adaptableObject instanceof PatchFileDiffNode) {
+				return ((PatchFileDiffNode) adaptableObject).getResource();
+			}
+		}
+		return null;
+	}
+
+	public Class[] getAdapterList() {
+		return new Class[] { ResourceMapping.class, IWorkbenchAdapter.class,
+				IResource.class };
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java
new file mode 100644
index 0000000..df0e6d2
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelCompareEditorInput.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.*;
+import org.eclipse.compare.internal.CompareEditorInputNavigator;
+import org.eclipse.compare.internal.patch.PatchFileDiffNode;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.mapping.*;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchPage;
+
+public class ApplyPatchModelCompareEditorInput extends ModelCompareEditorInput {
+
+	public ApplyPatchModelCompareEditorInput(
+			ModelSynchronizeParticipant participant, ICompareInput input,
+			IWorkbenchPage page,
+			ISynchronizePageConfiguration synchronizeConfiguration) {
+		super(participant, input, page, synchronizeConfiguration);
+	}
+
+	protected void handleMenuAboutToShow(IMenuManager manager) {
+		StructuredSelection selection = new StructuredSelection(((IResourceProvider)getCompareInput()).getResource());
+		final ResourceMarkAsMergedHandler markAsMergedHandler = new ResourceMarkAsMergedHandler(getSynchronizeConfiguration());
+		markAsMergedHandler.updateEnablement(selection);
+		Action markAsMergedAction = new Action(TeamUIMessages.ModelCompareEditorInput_0) {
+			public void run() {
+				try {
+					markAsMergedHandler.execute(new ExecutionEvent());
+				} catch (ExecutionException e) {
+					TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
+				}
+			}
+			
+		};
+		Utils.initAction(markAsMergedAction, "action.markAsMerged."); //$NON-NLS-1$
+		markAsMergedAction.setEnabled(markAsMergedAction.isEnabled());
+
+		final ResourceMergeHandler mergeHandler = new ResourceMergeHandler(getSynchronizeConfiguration(), false);
+		mergeHandler.updateEnablement(selection);
+		Action mergeAction = new Action(TeamUIMessages.ModelCompareEditorInput_1) {
+			public void run() {
+				try {
+					mergeHandler.execute(new ExecutionEvent());
+				} catch (ExecutionException e) {
+					TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
+				}
+			}
+		};
+		Utils.initAction(mergeAction, "action.merge."); //$NON-NLS-1$
+		mergeAction.setEnabled(mergeAction.isEnabled());
+
+		manager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator("merge")); //$NON-NLS-1$
+		manager.insertAfter("merge", markAsMergedAction); //$NON-NLS-1$
+		manager.insertAfter("merge", mergeAction); //$NON-NLS-1$
+	}
+
+	protected void contentsCreated() {
+		super.contentsCreated();
+		ICompareNavigator nav = getNavigator();
+		if (nav instanceof CompareEditorInputNavigator) {
+			final CompareEditorInputNavigator cein = (CompareEditorInputNavigator) nav;
+			Object pane = cein.getPanes()[0]; // the structure input pane, top left
+			if (pane instanceof CompareViewerPane) {
+				CompareViewerPane cvp = (CompareViewerPane) pane;
+				cvp.setSelection(StructuredSelection.EMPTY);
+				cvp.addSelectionChangedListener(new ISelectionChangedListener() {
+					public void selectionChanged(SelectionChangedEvent e) {
+						feed1(cein);
+					}
+				});
+				feed1(cein);
+			}
+		}
+	}
+
+	// see org.eclipse.compare.CompareEditorInput.feed1(ISelection)
+	private void feed1(CompareEditorInputNavigator cein) {
+		if (getCompareInput() instanceof PatchFileDiffNode) {
+			Object pane = cein.getPanes()[1]; // the top middle pane
+			if (pane instanceof CompareViewerPane) {
+				CompareViewerPane cvp = (CompareViewerPane) pane;
+				cvp.setInput(getCompareInput());
+			}
+			pane = cein.getPanes()[2]; // the top right pane
+			if (pane instanceof CompareViewerPane) {
+				CompareViewerPane cvp = (CompareViewerPane) pane;
+				cvp.setInput(null); // clear downstream pane
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java
new file mode 100644
index 0000000..5b1f6ff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchModelSynchronizeParticipant.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.resources.mapping.ModelProvider;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.*;
+import org.eclipse.team.core.mapping.provider.SynchronizationContext;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.internal.ui.mapping.*;
+import org.eclipse.team.internal.ui.synchronize.IRefreshable;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter;
+import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
+import org.eclipse.team.ui.synchronize.*;
+import org.eclipse.ui.IActionBars;
+
+public class ApplyPatchModelSynchronizeParticipant extends
+		ModelSynchronizeParticipant {
+
+	public static final String ID = "org.eclipse.team.ui.applyPatchModelParticipant"; //$NON-NLS-1$
+
+	public ApplyPatchModelSynchronizeParticipant(SynchronizationContext context) {
+		super(context);
+		init();
+	}
+
+	private void init() {
+		try {
+			ISynchronizeParticipantDescriptor descriptor = TeamUI
+					.getSynchronizeManager().getParticipantDescriptor(ID);
+			setInitializationData(descriptor);
+			setSecondaryId(Long.toString(System.currentTimeMillis()));
+		} catch (CoreException e) {
+			// ignore
+		}
+	}
+
+	protected void initializeConfiguration(
+			final ISynchronizePageConfiguration configuration) {
+		super.initializeConfiguration(configuration);
+		configuration
+				.setSupportedModes(ISynchronizePageConfiguration.INCOMING_MODE
+						| ISynchronizePageConfiguration.CONFLICTING_MODE);
+		configuration.setMode(ISynchronizePageConfiguration.INCOMING_MODE);
+	}
+
+	protected ModelSynchronizeParticipantActionGroup createMergeActionGroup() {
+		return new ApplyPatchModelSynchronizeParticipantActionGroup();
+	}
+
+	public class ApplyPatchModelSynchronizeParticipantActionGroup extends
+			ModelSynchronizeParticipantActionGroup {
+		protected void addToContextMenu(String mergeActionId, Action action,
+				IMenuManager manager) {
+			if (mergeActionId == SynchronizationActionProvider.OVERWRITE_ACTION_ID) {
+				// omit this action
+				return;
+			}
+			super.addToContextMenu(mergeActionId, action, manager);
+		}
+
+		public void fillActionBars(IActionBars actionBars) {
+			if (actionBars != null) {
+				IMenuManager menu = actionBars.getMenuManager();
+				ReversePatchAction reversePatchAction = new ReversePatchAction(
+						getConfiguration());
+				appendToGroup(menu,
+						ISynchronizePageConfiguration.PREFERENCES_GROUP,
+						reversePatchAction);
+				Utils.initAction(reversePatchAction, "action.reversePatch."); //$NON-NLS-1$
+				FuzzFactorAction fuzzFactor = new FuzzFactorAction(
+						getConfiguration());
+				appendToGroup(menu,
+						ISynchronizePageConfiguration.PREFERENCES_GROUP,
+						fuzzFactor);
+				Utils.initAction(fuzzFactor, "action.fuzzFactor."); //$NON-NLS-1$
+				IgnoreLeadingPathSegmentsAction ignoreAction = new IgnoreLeadingPathSegmentsAction(
+						getConfiguration());
+				appendToGroup(menu,
+						ISynchronizePageConfiguration.PREFERENCES_GROUP,
+						ignoreAction);
+				Utils.initAction(ignoreAction,
+						"action.ignoreLeadingPathSegments."); //$NON-NLS-1$
+				GererateRejFileAction generateAction = new GererateRejFileAction(
+						getConfiguration());
+				appendToGroup(menu,
+						ISynchronizePageConfiguration.PREFERENCES_GROUP,
+						generateAction);
+				Utils.initAction(generateAction, "action.generateRejFile."); //$NON-NLS-1$
+				appendToGroup(menu,
+						ISynchronizePageConfiguration.PREFERENCES_GROUP,
+						new Separator());
+			}
+			super.fillActionBars(actionBars);
+		}
+	};
+
+	public ModelProvider[] getEnabledModelProviders() {
+		ModelProvider[] enabledProviders = super.getEnabledModelProviders();
+		// add Patch model provider if it's not there
+		for (int i = 0; i < enabledProviders.length; i++) {
+			ModelProvider provider = enabledProviders[i];
+			if (provider.getId().equals(PatchModelProvider.ID))
+				return enabledProviders;
+		}
+		ModelProvider[] extended = new ModelProvider[enabledProviders.length + 1];
+		for (int i = 0; i < enabledProviders.length; i++) {
+			extended[i] = enabledProviders[i];
+		}
+		PatchModelProvider provider = PatchModelProvider.getProvider();
+		if (provider == null)
+			return enabledProviders;
+		extended[extended.length - 1] = provider;
+		return extended;
+	}
+
+	public ICompareInput asCompareInput(Object object) {
+		// consult adapter first
+		ISynchronizationCompareAdapter adapter = Utils
+				.getCompareAdapter(object);
+		if (adapter != null)
+			return adapter.asCompareInput(getContext(), object);
+		if (object instanceof ICompareInput) {
+			return (ICompareInput) object;
+		}
+		return null;
+	}
+	
+	public Object getAdapter(Class adapter) {
+		if (adapter == IRefreshable.class) {
+			return null;
+		}
+		return super.getAdapter(adapter);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java
new file mode 100644
index 0000000..f316ce9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchOperation.java
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.internal.ComparePreferencePage;
+import org.eclipse.compare.internal.CompareUIPlugin;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
+import org.eclipse.compare.internal.core.patch.PatchReader;
+import org.eclipse.compare.internal.patch.*;
+import org.eclipse.compare.patch.IFilePatch;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.team.internal.ui.IPreferenceIds;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.ide.IDE;
+
+/**
+ * An operation that provides an interface to the Apply Patch Wizard. Users specify
+ * the input in terms of an <code>IStorage</code> (note: input must be in unified diff
+ * format), an <code>IResource</code> target to apply the patch to and can provide <code>CompareConfiguration</code>
+ * elements to supply the label and images used on the preview page and hunk merge page. Finally, the
+ * user can also supply a title and image to override the default ones provided by the Apply Patch Wizard.
+ * Note that the Apply Patch Wizard does not require any particular set of inputs, and in the absence of
+ * any user supplied values, it will work in default mode.
+ * <p>
+ * This is copy of {@link org.eclipse.compare.patch.ApplyPatchOperation} which additionally honors
+ * the preference whether to show the patch in a wizard or in the Synchronize view.
+ * </p>
+ * <p>
+ * FIXME: This class will be removed with the fix for https://bugs.eclipse.org/309803
+ * </p>
+ * 
+ * @since 3.3
+ *
+ */
+public class ApplyPatchOperation implements Runnable {
+
+	private IWorkbenchPart part;
+	
+	/**
+	 * Used for the Preview Patch page.
+	 */
+	private CompareConfiguration configuration;
+	
+	/**
+	 * The patch to use as an input into the Apply Patch wizard
+	 */
+	private IStorage patch;
+	
+	/**
+	 * Specific <code>IResource</code> target to patch.
+	 */
+	private IResource target;
+	
+	/**
+	 * An optional image for the patch wizard
+	 */
+	private ImageDescriptor patchWizardImage;
+	
+	
+	/**
+	 * An optional title for the patchWizard
+	 */
+	private String patchWizardTitle;
+
+	private boolean saveAllEditors = true;
+	
+	/**
+	 * Return whether the given storage contains a patch.
+	 * @param storage the storage
+	 * @return whether the given storage contains a patch
+	 * @throws CoreException if an error occurs reading the contents from the storage
+	 */
+	public static boolean isPatch(IStorage storage) throws CoreException {
+		return internalParsePatch(storage).length > 0;
+	}
+	
+	/**
+	 * Parse the given patch and return the set of file patches that it contains.
+	 * @param storage the storage that contains the patch
+	 * @return the set of file patches that the storage contains
+	 * @throws CoreException if an error occurs reading the contents from the storage
+	 */
+	public static IFilePatch[] parsePatch(IStorage storage) throws CoreException {
+		return internalParsePatch(storage);
+	}
+	
+	/**
+	 * Creates a new ApplyPatchOperation with the supplied compare configuration, patch and target.
+	 * The behaviour of the Apply Patch wizard is controlled by the number of parameters supplied:
+	 * <ul>
+	 * <li>If a patch is supplied, the initial input page is skipped. If a patch is not supplied the wizard
+	 * will open on the input page.</li>
+	 * <li>If the patch is a workspace patch, the target selection page is skipped and the preview page is 
+	 * displayed.</li>
+	 * <li>If the patch is not a workspace patch and the target is specified, the target page is still
+	 * shown with the target selected.</li>
+	 * </ul> 
+	 * 
+	 * @param part 	an IWorkbenchPart or <code>null</code>
+	 * @param patch		an IStorage containing a patch in unified diff format or <code>null</code>
+	 * @param target	an IResource which the patch is to be applied to or <code>null</code>
+	 * @param configuration	a CompareConfiguration supplying the labels and images for the preview patch page
+	 */
+	public ApplyPatchOperation(IWorkbenchPart part, IStorage patch, IResource target, CompareConfiguration configuration) {
+		Assert.isNotNull(configuration);
+		this.part = part;
+		this.patch = patch;
+		this.target = target;
+		this.configuration = configuration;
+	}
+	
+	/**
+	 * Create an operation for the given part and resource. This method is a convenience
+	 * method that calls {@link #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration)}
+	 * with appropriate defaults for the other parameters.
+	 * @param targetPart an IResource which the patch is to be applied to or <code>null</code>
+	 * @param resource an IResource which the patch is to be applied to or <code>null</code>
+	 * @see #ApplyPatchOperation(IWorkbenchPart, IStorage, IResource, CompareConfiguration)
+	 */
+	public ApplyPatchOperation(IWorkbenchPart targetPart, IResource resource) {
+		this(targetPart, null, resource, new CompareConfiguration());
+	}
+
+	/**
+	 * Open the Apply Patch wizard using the values associated with this operation.
+	 * This method must be called from the UI thread.
+	 */
+	public void openWizard() {
+		saveAllEditors();
+
+		if (saveAllEditors) {
+			PatchWizard wizard = createPatchWizard(patch, target, configuration);
+			if (patchWizardImage != null)
+				wizard.setDefaultPageImageDescriptor(patchWizardImage);
+			if (patchWizardTitle != null)
+				wizard.setWindowTitle(patchWizardTitle);
+			wizard.setNeedsProgressMonitor(true);
+
+			if (wizard instanceof ApplyPatchSynchronizationWizard
+					&& ((ApplyPatchSynchronizationWizard) wizard).isComplete())
+				wizard.performFinish();
+			else
+				new PatchWizardDialog(getShell(), wizard).open();
+		}
+	}
+
+	private PatchWizard createPatchWizard(IStorage patch, IResource target,
+			CompareConfiguration configuration) {
+		if (isApplyPatchInSynchronizeView())
+			return new ApplyPatchSynchronizationWizard(patch, target,
+					configuration);
+		return new PatchWizard(patch, target, configuration);
+	}
+
+	protected boolean isApplyPatchInSynchronizeView() {
+		return TeamUIPlugin.getPlugin().getPreferenceStore().getBoolean(
+				IPreferenceIds.APPLY_PATCH_IN_SYNCHRONIZE_VIEW);
+	}
+	
+	/**
+	 * Return the parent shell to be used when the wizard is opened.
+	 * By default, the site of the part is used to get the shell.
+	 * Subclasses may override.
+	 * @return the parent shell to be used when the wizard is opened
+	 */
+	protected Shell getShell() {
+		if (part == null)
+			return CompareUIPlugin.getShell();
+		return part.getSite().getShell();
+	}
+	
+	/**
+	 * This method will save all dirty editors. It will prompt the user if the Compare preference to save
+	 * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own
+	 * implementation.
+	 */
+	protected void saveAllEditors(){
+		saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors());
+	}
+	
+	/**
+	 * Sets the title of the patch wizard. Needs to be set before {@link #openWizard()} is called.
+	 * @param title	a string to display in the title bar
+	 */
+	public void setPatchWizardTitle(String title){
+		this.patchWizardTitle = title;
+	}
+	
+	/**
+	 * Sets the image descriptor to use in the patch wizard. Needs to be set before  {@link #openWizard()} is called.
+	 * @param descriptor an image descriptor
+	 */
+	public void setPatchWizardImageDescriptor(ImageDescriptor descriptor){
+		this.patchWizardImage = descriptor;
+	}
+	
+	/* (non-Javadoc)
+	 * @see java.lang.Runnable#run()
+	 */
+	public void run() {
+		openWizard();
+	}
+	
+	private static IFilePatch[] internalParsePatch(IStorage storage)
+			throws CoreException {
+		BufferedReader reader = Utilities.createReader(storage);
+		try {
+			PatchReader patchReader = new PatchReader() {
+				protected FilePatch2 createFileDiff(IPath oldPath, long oldDate,
+						IPath newPath, long newDate) {
+					return new FilePatch(oldPath, oldDate, newPath,
+							newDate);
+				}
+			};
+			patchReader.parse(reader);
+			FilePatch2[] fileDiffs = patchReader.getAdjustedDiffs();
+
+			IFilePatch[] filePatch = new IFilePatch[fileDiffs.length];
+			for (int i = 0; i < fileDiffs.length; i++) {
+				filePatch[i] = (FilePatch) fileDiffs[i];
+			}
+
+			return filePatch;
+		} catch (IOException e) {
+			throw new CoreException(new Status(IStatus.ERROR,
+					CompareUIPlugin.PLUGIN_ID, 0, e.getMessage(), e));
+		} finally {
+			try {
+				reader.close();
+			} catch (IOException e) { // ignored
+			}
+		}
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java
new file mode 100644
index 0000000..765bfc8
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriber.java
@@ -0,0 +1,185 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import java.util.*;
+
+import org.eclipse.compare.internal.core.patch.*;
+import org.eclipse.compare.internal.patch.PatchProjectDiffNode;
+import org.eclipse.compare.internal.patch.WorkspacePatcher;
+import org.eclipse.compare.patch.IHunk;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.subscribers.SubscriberChangeEvent;
+import org.eclipse.team.core.synchronize.SyncInfo;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.core.variants.IResourceVariantComparator;
+import org.eclipse.team.internal.core.mapping.LocalResourceVariant;
+
+public class ApplyPatchSubscriber extends Subscriber {
+
+	private class ApplyPatchSyncInfo extends SyncInfo {
+		private ApplyPatchSyncInfo(IResource local, IResourceVariant base,
+				IResourceVariant remote, IResourceVariantComparator comparator) {
+			super(local, base, remote, comparator);
+		}
+
+		protected int calculateKind() throws TeamException {
+			// TODO: this works only for files, see bug 300214
+			if (!getPatcher().isEnabled(PatchModelProvider.getPatchObject(getLocal(), patcher)))
+				return IN_SYNC;
+
+			// same story here, one merged hunk is enough to consider the file as merged 
+			if (getRemote() != null) {
+				FilePatch2 filePatch2 = ((PatchedFileVariant)getRemote()).getDiff();
+				IHunk[] hunks = filePatch2.getHunks();
+				for (int i = 0; i < hunks.length; i++) {
+					if (patcher.isManuallyMerged((Hunk) hunks[i]))
+						return IN_SYNC;
+				}
+			} else {
+				// deletions don't have the remote variant, but still can be manually merged
+				Object patchObject = PatchModelProvider.getPatchObject(getLocal(), patcher);
+				if (patchObject instanceof FilePatch2) {
+					FilePatch2 filePatch2 = (FilePatch2) patchObject;
+					IHunk[] hunks = filePatch2.getHunks();
+					for (int i = 0; i < hunks.length; i++) {
+						if (patcher.isManuallyMerged((Hunk) hunks[i]))
+							return IN_SYNC;
+					}
+				}
+			}
+			int kind = super.calculateKind();
+			// mark diffs with problems as conflicts 
+			if (getRemote() != null 
+					&& getPatcher().getDiffResult(((PatchedFileVariant)getRemote()).getDiff()).containsProblems())
+				kind |= CONFLICTING;
+			return kind;
+		}
+	}
+
+	private WorkspacePatcher patcher;
+	private IResourceVariantComparator comparator;
+
+	public ApplyPatchSubscriber(WorkspacePatcher patcher) {
+		this.patcher = patcher;
+		this.comparator = new PatchedFileVariantComparator();
+		getPatcher().refresh();
+	}
+
+	public String getName() {
+		return "Apply Patch Subscriber"; //$NON-NLS-1$
+	}
+
+	public IResourceVariantComparator getResourceComparator() {
+		return comparator;
+	}
+
+	public SyncInfo getSyncInfo(IResource resource) throws TeamException {
+		if (!isSupervised(resource)) return null;
+		// TODO: called too many times, optimize
+		refresh(new IResource[] { resource }, IResource.DEPTH_ZERO, null);
+		try {
+			FilePatch2 diff = (FilePatch2) PatchModelProvider.getPatchObject(resource, getPatcher());
+			// use null as remote variant for deletions
+			IResourceVariant remote = null;
+			if (diff.getDiffType(patcher.isReversed()) != FilePatch2.DELETION)
+				remote =  new PatchedFileVariant(getPatcher(), diff);
+			IResourceVariant base = null;
+			if (diff.getDiffType(patcher.isReversed()) != FilePatch2.ADDITION)
+				base = new LocalResourceVariant(resource);
+			SyncInfo info = new ApplyPatchSyncInfo(resource, base, remote, getResourceComparator());
+			info.init();
+			return info;
+		} catch (CoreException e) {
+			throw TeamException.asTeamException(e);
+		}
+	}
+
+	public boolean isSupervised(IResource resource) throws TeamException {
+		return resource.getType() == IResource.FILE
+				&& PatchModelProvider.getPatchObject(resource, getPatcher()) != null;
+	}
+
+	public IResource[] members(IResource resource) throws TeamException {
+		//XXX: what if there is an addition in the patch that needs to add 3 subfolders?
+		try {
+			if(resource.getType() == IResource.FILE)
+				// file has no IResource members
+				return new IResource[0];
+			IContainer container = (IContainer) resource;
+			
+			// workspace container members
+			List existingChildren = new ArrayList();
+
+			if (container.isAccessible())
+				existingChildren.addAll(Arrays.asList(container.members()));
+
+			// patch members, subscriber location
+			FilePatch2[] diffs = getPatcher().getDiffs();
+			for (int i = 0; i < diffs.length; i++) {
+				IResource file = PatchModelProvider.getFile(diffs[i], getPatcher());
+				if (container.getFullPath().isPrefixOf(file.getFullPath())) {
+					// XXX: check segments
+					if (!container.exists(file.getProjectRelativePath())) {
+						existingChildren.add(file);
+					}
+				}
+			}
+			return (IResource[]) existingChildren.toArray(new IResource[existingChildren.size()]);
+		} catch (CoreException e) {
+			throw TeamException.asTeamException(e);
+		}
+	}
+
+	public void refresh(IResource[] resources, int depth,
+			IProgressMonitor monitor) throws TeamException {
+		Set /* <FilePatch> */diffs = new HashSet();
+		for (int i = 0; i < resources.length; i++) {
+			Object object = PatchModelProvider.getPatchObject(resources[i],
+					getPatcher());
+			if (object instanceof FilePatch2) {
+				FilePatch2 filePatch = (FilePatch2) object;
+				diffs.add(filePatch);
+			}
+		}
+		getPatcher().refresh((FilePatch2[]) diffs.toArray(new FilePatch2[0]));
+	}
+
+	public IResource[] roots() {
+		Set roots = new HashSet();
+		if (getPatcher().isWorkspacePatch()) {
+			IDiffElement[] children = PatchModelProvider.getPatchWorkspace(this).getChildren();
+			for (int i = 0; i < children.length; i++) {
+				// return array of projects from the patch
+				DiffProject diffProject = ((PatchProjectDiffNode)children[i]).getDiffProject();
+				IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(diffProject.getName());
+				if (project.isAccessible())
+					roots.add(project);
+			}
+		} else {
+			roots.add(getPatcher().getTarget());
+		}
+		return (IResource[]) roots.toArray(new IResource[0]);
+	}
+
+	public WorkspacePatcher getPatcher() {
+		return patcher;
+	}
+
+	public void merged(IResource[] resources) {
+		fireTeamResourceChange(SubscriberChangeEvent.asSyncChangedDeltas(this, resources));
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriberMergeContext.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriberMergeContext.java
new file mode 100644
index 0000000..5291d09
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSubscriberMergeContext.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.core.patch.FilePatch2;
+import org.eclipse.compare.internal.core.patch.HunkResult;
+import org.eclipse.compare.internal.patch.WorkspacePatcher;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.team.core.diff.IDiff;
+import org.eclipse.team.core.diff.IThreeWayDiff;
+import org.eclipse.team.core.mapping.ISynchronizationScopeManager;
+import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.core.subscribers.SubscriberMergeContext;
+
+public class ApplyPatchSubscriberMergeContext extends SubscriberMergeContext {
+
+	protected ApplyPatchSubscriberMergeContext(Subscriber subscriber,
+			ISynchronizationScopeManager manager) {
+		super(subscriber, manager);
+	}
+
+	public static ApplyPatchSubscriberMergeContext createContext(
+			Subscriber subscriber, ISynchronizationScopeManager manager) {
+		ApplyPatchSubscriberMergeContext mergeContext = new ApplyPatchSubscriberMergeContext(
+				subscriber, manager);
+		// Initialize using the ApplyPatchSubscriber to populate the diff tree.
+		mergeContext.initialize();
+		return mergeContext;
+	}
+
+	protected void makeInSync(IDiff diff, IProgressMonitor monitor)
+			throws CoreException {
+		markAsMerged(diff, true, monitor);
+	}
+
+	public void markAsMerged(IDiff node, boolean inSyncHint,
+			IProgressMonitor monitor) throws CoreException {
+		IResource resource = getDiffTree().getResource(node);
+		WorkspacePatcher patcher = ((ApplyPatchSubscriber) getSubscriber()).getPatcher();
+		Object object = PatchModelProvider.getPatchObject(resource, patcher);
+		if (object instanceof FilePatch2) {
+			HunkResult[] hunkResults = patcher.getDiffResult((FilePatch2) object).getHunkResults();
+			for (int i = 0; i < hunkResults.length; i++) {
+				if (inSyncHint) {
+					// clean Merge > disable hunks that have merged
+					if (hunkResults[i].isOK())
+						patcher.setEnabled(hunkResults[i].getHunk(), false);
+				} else {
+					// Mark as Merged > mark *all* hunks from the file as manually merged
+					patcher.setManuallyMerged(hunkResults[i].getHunk(), true);
+				}
+			}
+		} else {
+			patcher.setEnabled(object, false);
+			// TODO: mark as merged
+		}
+		// fire a team resource change event
+		((ApplyPatchSubscriber)getSubscriber()).merged(new IResource[] { resource});
+		// don't need to worry about the node no more... it is in sync now
+		// see ApplyPatchSubscriber.ApplyPatchSyncInfo.calculateKind()
+	}
+
+	protected IStatus performThreeWayMerge(IThreeWayDiff diff,
+			IProgressMonitor monitor) throws CoreException {
+		IStatus status = super.performThreeWayMerge(diff, monitor);
+		if (status.isOK()) {
+			// Merge with conflicts > all hunks from the diff have been marked
+			// as manually merged...
+			IResource resource = getDiffTree().getResource(diff);
+			WorkspacePatcher patcher = ((ApplyPatchSubscriber) getSubscriber()).getPatcher();
+			Object object = PatchModelProvider.getPatchObject(resource, patcher);
+			if (object instanceof FilePatch2) {
+				HunkResult[] hunkResults = patcher.getDiffResult((FilePatch2) object).getHunkResults();
+				for (int i = 0; i < hunkResults.length; i++) {
+					// ... unmark them and exclude those properly merged
+					if (patcher.isManuallyMerged(hunkResults[i].getHunk())) {
+						patcher.setManuallyMerged(hunkResults[i].getHunk(), false);
+						if (hunkResults[i].isOK()) {
+							patcher.setEnabled(hunkResults[i].getHunk(), false);
+						}
+					}
+				}
+			}
+		}
+		return status;
+	}
+
+	public void reject(IDiff diff, IProgressMonitor monitor)
+			throws CoreException {
+		// do nothing
+	}
+
+	public ISchedulingRule getMergeRule(IDiff diff) {
+		IResource resource = getDiffTree().getResource(diff);
+		IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace()
+				.getRuleFactory();
+		if (!resource.exists()) {
+			// for additions return rule for all parents that need to be created
+			IContainer parent = resource.getParent();
+			while (!parent.exists()) {
+				resource = parent;
+				parent = parent.getParent();
+			}
+			return ruleFactory.createRule(resource);
+		} else {
+			return super.getMergeRule(diff);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationActionProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationActionProvider.java
new file mode 100644
index 0000000..a8c685a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationActionProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.patch.HunkDiffNode;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.team.internal.ui.mapping.ResourceMarkAsMergedHandler;
+import org.eclipse.team.internal.ui.mapping.ResourceMergeHandler;
+import org.eclipse.team.ui.mapping.SynchronizationActionProvider;
+import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration;
+
+public class ApplyPatchSynchronizationActionProvider extends
+		SynchronizationActionProvider {
+
+	public ApplyPatchSynchronizationActionProvider() {
+		super();
+	}
+
+	protected void initialize() {
+		super.initialize();
+		final ISynchronizePageConfiguration configuration = getSynchronizePageConfiguration();
+		// Use custom handlers, disabled for hunks.
+		registerHandler(MERGE_ACTION_ID, new ResourceMergeHandler(
+				configuration, false) {
+			public void updateEnablement(IStructuredSelection selection) {
+				super.updateEnablement(selection);
+				// disable merge for hunks
+				Object[] elements = getOperation().getElements();
+				for (int i = 0; i < elements.length; i++) {
+					if (elements[i] instanceof HunkDiffNode) {
+						setEnabled(false);
+						return;
+					}
+				}
+			}
+		});
+		registerHandler(MARK_AS_MERGE_ACTION_ID,
+				new ResourceMarkAsMergedHandler(configuration) {
+			public void updateEnablement(IStructuredSelection selection) {
+				super.updateEnablement(selection);
+				// disable mark as merged for hunks
+				Object[] elements = getOperation().getElements();
+				for (int i = 0; i < elements.length; i++) {
+					if (elements[i] instanceof HunkDiffNode) {
+						setEnabled(false);
+						return;
+					}
+				}
+			}
+		});
+		// 'Overwrite' action is not shown, see
+		// ApplyPatchModelSynchronizeParticipant.ApplyPatchModelSynchronizeParticipantActionGroup.addToContextMenu(String,
+		// Action, IMenuManager)
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java
new file mode 100644
index 0000000..a44fde1
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java
@@ -0,0 +1,172 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.CompareConfiguration;
+import org.eclipse.compare.internal.core.patch.DiffProject;
+import org.eclipse.compare.internal.patch.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.team.core.subscribers.SubscriberMergeContext;
+import org.eclipse.team.core.subscribers.SubscriberScopeManager;
+import org.eclipse.team.internal.ui.*;
+import org.eclipse.team.internal.ui.wizards.PatchInaccessibleProjectsPage;
+import org.eclipse.team.ui.IConfigurationWizard;
+import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
+import org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant;
+import org.eclipse.ui.IWorkbench;
+
+public class ApplyPatchSynchronizationWizard extends PatchWizard implements
+		IConfigurationWizard {
+
+	private PatchInaccessibleProjectsPage fPatchInaccessibleProjectsPage;
+
+	public ApplyPatchSynchronizationWizard() {
+		this(null, null, new CompareConfiguration());
+	}
+
+	public ApplyPatchSynchronizationWizard(IStorage patch, IResource target,
+			CompareConfiguration configuration) {
+		super(patch, target, configuration);
+		setNeedsProgressMonitor(true);
+	}
+
+	public boolean performFinish() {
+		if (fPatchInaccessibleProjectsPage != null) {
+			IProject[] projects = fPatchInaccessibleProjectsPage
+					.getSelectedProjects();
+			if (projects != null && projects.length != 0)
+				openSelectedProjects(projects);
+		}
+
+		ApplyPatchSubscriber subscriber = new ApplyPatchSubscriber(getPatcher());
+
+		// Get ResourceMappings for root resources from the patch.
+		ResourceMapping[] inputMappings = Utils.getResourceMappings(subscriber
+				.roots());
+
+		// Take the given mappings, consult logical models and construct the
+		// complete set of resources to be operated on.
+		// Use SubscriberResourceMappingContext which uses subscriber to access
+		// to the remote state of local resources.
+		SubscriberScopeManager scopeManager = new SubscriberScopeManager(
+				subscriber.getName(), inputMappings, subscriber, true);
+
+		// Initialize the diff tree.
+		// TODO: are we going to perform head-less auto-merges? do we need to
+		// subclass MergeContext?
+		SubscriberMergeContext mergeContext = ApplyPatchSubscriberMergeContext
+				.createContext(subscriber, scopeManager);
+
+		// Create the participant and show it.
+		ModelSynchronizeParticipant participant = new ApplyPatchModelSynchronizeParticipant(
+				mergeContext);
+		TeamUI.getSynchronizeManager().addSynchronizeParticipants(
+				new ISynchronizeParticipant[] { participant });
+		// We don't know in which site to show progress because a participant
+		// could actually be shown in multiple sites.
+		participant.run(null /* no site */);
+		return true;
+	}
+
+	public void init(IWorkbench workbench, IProject project) {
+		// nothing to do here
+	}
+
+	public void addPages() {
+		if (getPatch() == null)
+			addPage(fPatchWizardPage = new InputPatchPage(this));
+		if (getPatch() == null || !getPatcher().isWorkspacePatch())
+			addPage(fPatchTargetPage = new PatchTargetPage(getPatcher()) {
+				public IWizardPage getNextPage() {
+					IWizardPage nextPage = super.getNextPage();
+					if (!isTargetingInaccessibleProjects() && nextPage != this)
+						return nextPage.getNextPage();
+					return nextPage;
+				}
+			});
+		if (getPatch() == null || isTargetingInaccessibleProjects())
+			addPage(fPatchInaccessibleProjectsPage = new PatchInaccessibleProjectsPage(
+					getPatcher()));
+		addPage(new PatchParsedPage());
+	}
+
+	public boolean isComplete() {
+		if (getPatch() == null || !getPatcher().isWorkspacePatch()
+				|| isTargetingInaccessibleProjects())
+			return false;
+		return true;
+	}
+
+	private boolean isTargetingInaccessibleProjects() {
+		DiffProject[] diffProjects = getPatcher().getDiffProjects();
+		if (diffProjects != null) {
+			for (int i = 0; i < diffProjects.length; i++) {
+				IProject project = ResourcesPlugin.getWorkspace().getRoot()
+						.getProject(diffProjects[i].getName());
+				if (!project.isAccessible())
+					return true;
+			}
+		}
+		return false;
+	}
+
+	public boolean canFinish() {
+		IWizardPage currentPage = getContainer().getCurrentPage();
+		if (currentPage.getName().equals(
+				PatchInaccessibleProjectsPage.PATCH_INACCESSIBLE_PROJECTS_NAME)) {
+			return currentPage.isPageComplete();
+		}
+		if (currentPage.getName()
+				.equals(PatchParsedPage.PATCH_PARSED_PAGE_NAME)) {
+			return currentPage.isPageComplete();
+		}
+		return super.canFinish();
+	}
+
+	public WorkspacePatcher getPatcher() {
+		// make the patcher available to other classes in the package
+		return super.getPatcher();
+	}
+
+	private void openSelectedProjects(final IProject projects[]) {
+		Job openProjectsJob = new Job(
+				TeamUIMessages.PatchInaccessibleProjectsPage_openingProjects) {
+			protected IStatus run(IProgressMonitor monitor) {
+				monitor.beginTask(
+						TeamUIMessages.PatchInaccessibleProjectsPage_openingProjects,
+						projects.length);
+				MultiStatus errorStatus = new MultiStatus(
+						TeamUIPlugin.ID,
+						IStatus.ERROR,
+						TeamUIMessages.PatchInaccessibleProjectsPage_openingProjects,
+						null);
+				for (int i = 0; i < projects.length; i++) {
+					IProject project = projects[i];
+					try {
+						project.open(new SubProgressMonitor(monitor, 1));
+					} catch (CoreException e) {
+						errorStatus.add(e.getStatus());
+					}
+				}
+				monitor.done();
+				return errorStatus;
+			}
+		};
+		openProjectsJob.setUser(true);
+		openProjectsJob.schedule();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/DiffProjectResourceMapping.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/DiffProjectResourceMapping.java
new file mode 100644
index 0000000..eab387c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/DiffProjectResourceMapping.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.core.patch.*;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public class DiffProjectResourceMapping extends ResourceMapping {
+
+	private final DiffProject object;
+
+	public DiffProjectResourceMapping(DiffProject adaptableObject) {
+		object = adaptableObject;
+	}
+
+	public Object getModelObject() {
+		return object;
+	}
+
+	public String getModelProviderId() {
+		return PatchModelProvider.ID;
+	}
+
+	public IProject[] getProjects() {
+		IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(
+				object.getName());
+		return new IProject[] { p };
+	}
+
+	public ResourceTraversal[] getTraversals(ResourceMappingContext context,
+			IProgressMonitor monitor) throws CoreException {
+		return new ResourceTraversal[] { new ResourceTraversal(
+				new IResource[] { getResource() }, IResource.DEPTH_INFINITE,
+				IResource.NONE) };
+	}
+
+	private IResource getResource() {
+		return getProjects()[0];
+	}
+
+	public boolean contains(ResourceMapping mapping) {
+		if (mapping instanceof DiffProjectResourceMapping) {
+			DiffProject diffProject = (DiffProject) mapping.getModelObject();
+			return diffProject.getName().equals(object.getName());
+		} else if (mapping instanceof FilePatchResourceMapping) {
+			FileDiffResult filePatch = (FileDiffResult) mapping
+					.getModelObject();
+			FilePatch2[] filePatches = object.getFileDiffs();
+			for (int i = 0; i < filePatches.length; i++) {
+				if (filePatches[i].getPath(false).equals(
+						filePatch.getTargetPath()))
+					return true;
+			}
+		} else if (mapping instanceof HunkResourceMapping) {
+			HunkResult hunk = (HunkResult) mapping.getModelObject();
+			DiffProject diffProject = hunk.getHunk().getParent().getProject();
+			return diffProject.getName().equals(object.getName());
+		}
+		return super.contains(mapping);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/FilePatchResourceMapping.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/FilePatchResourceMapping.java
new file mode 100644
index 0000000..f774ec6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/FilePatchResourceMapping.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.core.patch.DiffProject;
+import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.patch.WorkspaceFileDiffResult;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public class FilePatchResourceMapping extends ResourceMapping {
+
+	private final FileDiffResult object;
+
+	public FilePatchResourceMapping(FileDiffResult fileDiffResult) {
+		object = fileDiffResult;
+	}
+
+	public Object getModelObject() {
+		return object;
+	}
+
+	public String getModelProviderId() {
+		return PatchModelProvider.ID;
+	}
+
+	public IProject[] getProjects() {
+		DiffProject dp = (DiffProject) object.getDiff().getProject();
+		IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(
+				dp.getName());
+		return new IProject[] { p };
+	}
+
+	public ResourceTraversal[] getTraversals(ResourceMappingContext context,
+			IProgressMonitor monitor) throws CoreException {
+		return new ResourceTraversal[] { new ResourceTraversal(
+				new IResource[] { getResource() }, IResource.DEPTH_INFINITE,
+				IResource.NONE) };
+	}
+
+	private IResource getResource() {
+		return ((WorkspaceFileDiffResult) object).getTargetFile();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/HunkResourceMapping.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/HunkResourceMapping.java
new file mode 100644
index 0000000..0cfc760
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/HunkResourceMapping.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.core.patch.DiffProject;
+import org.eclipse.compare.internal.core.patch.HunkResult;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.core.runtime.*;
+
+public class HunkResourceMapping extends ResourceMapping {
+
+	private final HunkResult object;
+
+	public HunkResourceMapping(HunkResult hunkResult) {
+		this.object = hunkResult;
+	}
+
+	public Object getModelObject() {
+		return object;
+	}
+
+	public String getModelProviderId() {
+		return PatchModelProvider.ID;
+	}
+
+	public IProject[] getProjects() {
+		DiffProject dp = (DiffProject) object.getHunk().getParent()
+				.getProject();
+		IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(
+				dp.getName());
+		return new IProject[] { p };
+	}
+
+	private IResource getResource() {
+		IPath path = object.getHunk().getParent().getPath(false);
+		return getProjects()[0].getFile(path);
+	}
+
+	public ResourceTraversal[] getTraversals(ResourceMappingContext context,
+			IProgressMonitor monitor) throws CoreException {
+		return new ResourceTraversal[] { new ResourceTraversal(
+				new IResource[] { getResource() }, IResource.DEPTH_ZERO,
+				IResource.NONE) };
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchCompareAdapter.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchCompareAdapter.java
new file mode 100644
index 0000000..4c0a664
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchCompareAdapter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.patch.PatchFileDiffNode;
+import org.eclipse.compare.structuremergeviewer.ICompareInput;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.team.core.mapping.ISynchronizationContext;
+import org.eclipse.team.core.mapping.ISynchronizationScope;
+import org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection.ITraversalFactory;
+import org.eclipse.team.ui.mapping.SynchronizationCompareAdapter;
+import org.eclipse.ui.IMemento;
+
+public class PatchCompareAdapter extends SynchronizationCompareAdapter
+		implements ITraversalFactory {
+
+	public ICompareInput asCompareInput(ISynchronizationContext context,
+			Object o) {
+		// PatchFileDiffNode can adapt to IFile
+		if (o instanceof PatchFileDiffNode)
+			return super.asCompareInput(context, ((PatchFileDiffNode) o)
+					.getResource());
+		if (o instanceof ICompareInput)
+			return (ICompareInput) o;
+		return super.asCompareInput(context, o);
+	}
+
+	public void save(ResourceMapping[] mappings, IMemento memento) {
+		// Don't save
+	}
+
+	public ResourceMapping[] restore(IMemento memento) {
+		// Don't restore
+		return null;
+	}
+
+	public ResourceTraversal[] getTraversals(ISynchronizationScope scope) {
+		return scope.getTraversals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java
new file mode 100644
index 0000000..b6976fa
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchModelProvider.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.core.patch.DiffProject;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
+import org.eclipse.compare.internal.patch.*;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
+import org.eclipse.core.resources.*;
+import org.eclipse.core.resources.mapping.ModelProvider;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.core.subscribers.Subscriber;
+import org.eclipse.team.internal.core.TeamPlugin;
+
+public class PatchModelProvider extends ModelProvider {
+
+	public static final String ID = "org.eclipse.team.ui.patchModelProvider"; //$NON-NLS-1$
+	private static PatchModelProvider provider;
+
+	public static PatchModelProvider getProvider() {
+		if (provider == null) {
+			try {
+				provider = (PatchModelProvider) ModelProvider
+						.getModelProviderDescriptor(PatchModelProvider.ID)
+						.getModelProvider();
+			} catch (CoreException e) {
+				TeamPlugin.log(e);
+			}
+		}
+		return provider;
+	}
+
+	static ResourceMapping getResourceMapping(IDiffElement object) {
+		if (object instanceof PatchProjectDiffNode) {
+			return new DiffProjectResourceMapping(
+					((PatchProjectDiffNode) object).getDiffProject());
+		} else if (object instanceof PatchFileDiffNode) {
+			return new FilePatchResourceMapping(((PatchFileDiffNode) object)
+					.getDiffResult());
+		} else if (object instanceof HunkDiffNode) {
+			return new HunkResourceMapping(((HunkDiffNode) object)
+					.getHunkResult());
+		}
+		return null;
+	}
+	
+	/**
+	 * Returns the resource associated with the corresponding model element.
+	 *
+	 * @param element
+	 *            the model element
+	 * @return the associated resource, or <code>null</code>
+	 */
+	static IResource getResource(PatchDiffNode element) {
+		IResource resource= null;
+		if (element instanceof PatchProjectDiffNode) {
+			return ((PatchProjectDiffNode) element).getResource();
+		} else if (element instanceof PatchFileDiffNode) {
+			return ((PatchFileDiffNode) element).getResource();
+		} else if (element instanceof HunkDiffNode) {
+			return ((HunkDiffNode) element).getResource();
+		}
+		return resource;
+	}
+
+	static Object/* DiffProject or FilePatch2 */getPatchObject(
+			IResource resource, WorkspacePatcher patcher) {
+		if (resource.getType() == IResource.PROJECT) {
+			if (patcher.isWorkspacePatch()) {
+				DiffProject[] diffProjects = patcher.getDiffProjects();
+				for (int i = 0; i < diffProjects.length; i++) {
+					if (diffProjects[i].getName().equals(resource.getName()))
+						return diffProjects[i];
+				}
+			}
+		} else if (resource.getType() == IResource.FILE) {
+			FilePatch2[] diffs = patcher.getDiffs();
+			for (int i = 0; i < diffs.length; i++) {
+				if (resource.equals(getFile(diffs[i], patcher))) {
+					return diffs[i];
+				}
+			}
+		}
+		return null;
+	}
+
+	static IFile getFile(FilePatch2 diff, WorkspacePatcher patcher) {
+		IProject project = null;
+		if (patcher.isWorkspacePatch()) {
+			DiffProject diffProject = diff.getProject();
+			project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+					diffProject.getName());
+			return project.getFile(diff.getPath(patcher.isReversed()));
+		} else {
+			IResource target = patcher.getTarget();
+			if (target.getType() == IResource.PROJECT
+					|| target.getType() == IResource.FOLDER) {
+				IContainer container = (IContainer) target;
+				return container.getFile(diff.getStrippedPath(patcher
+						.getStripPrefixSegments(), patcher.isReversed()));
+			}
+			IContainer container = target.getParent();
+			return container.getFile(diff.getStrippedPath(patcher
+					.getStripPrefixSegments(), patcher.isReversed()));
+		}
+	}
+
+	public static PatchWorkspace getPatchWorkspace(Subscriber subscriber) {
+		if (subscriber instanceof ApplyPatchSubscriber) {
+			ApplyPatchSubscriber aps = (ApplyPatchSubscriber) subscriber;
+			return new PatchWorkspace(aps.getPatcher());
+		}
+		// TODO: assertion?
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchParsedPage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchParsedPage.java
new file mode 100644
index 0000000..1c4c042
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchParsedPage.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+
+public class PatchParsedPage extends WizardPage {
+
+	public final static String PATCH_PARSED_PAGE_NAME = "PatchParsedPage"; //$NON-NLS-1$
+	private Label messageLabel;
+
+	public PatchParsedPage() {
+		super(PATCH_PARSED_PAGE_NAME, TeamUIMessages.PatchParsedPage_title,
+				null);
+		setDescription(TeamUIMessages.PatchParsedPage_description);
+	}
+
+	public void createControl(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout());
+		composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
+				| GridData.HORIZONTAL_ALIGN_FILL));
+		setControl(composite);
+
+		initializeDialogUnits(parent);
+
+		messageLabel = new Label(composite, SWT.NONE);
+		messageLabel
+				.setText(TeamUIMessages.PatchParsedPage_clickFinishToGoToSynchronizeView);
+		setPageComplete(true);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncContentProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncContentProvider.java
new file mode 100644
index 0000000..0cf0e01
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncContentProvider.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.compare.internal.patch.HunkDiffNode;
+import org.eclipse.compare.internal.patch.PatchDiffNode;
+import org.eclipse.compare.structuremergeviewer.IDiffElement;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.mapping.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.team.core.mapping.ISynchronizationContext;
+import org.eclipse.team.core.mapping.ISynchronizationScope;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.mapping.SynchronizationResourceMappingContext;
+import org.eclipse.team.ui.mapping.SynchronizationContentProvider;
+import org.eclipse.ui.model.BaseWorkbenchContentProvider;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+
+public class PatchSyncContentProvider extends SynchronizationContentProvider {
+
+	private BaseWorkbenchContentProvider delegate;
+
+	public void init(ICommonContentExtensionSite site) {
+		super.init(site);
+		delegate = new BaseWorkbenchContentProvider();
+	}
+
+	public void dispose() {
+		super.dispose();
+		if (delegate != null)
+			delegate.dispose();
+	}
+
+	protected ITreeContentProvider getDelegateContentProvider() {
+		return delegate;
+	}
+
+	protected String getModelProviderId() {
+		return PatchModelProvider.ID;
+	}
+
+	protected Object getModelRoot() {
+		if (getContext() instanceof ApplyPatchSubscriberMergeContext) {
+			ApplyPatchSubscriberMergeContext context = (ApplyPatchSubscriberMergeContext) getContext();
+			return PatchModelProvider.getPatchWorkspace(context.getSubscriber());
+		}
+		// TODO: assertion?
+		return null;
+	}
+
+	/*
+	 * Copied from
+	 * org.eclipse.team.examples.model.ui.mapping.ModelSyncContentProvider
+	 * .getTraversals(ISynchronizationContext, Object)
+	 */
+	protected ResourceTraversal[] getTraversals(
+			ISynchronizationContext context, Object object) {
+		if (object instanceof IDiffElement) {
+			ResourceMapping mapping = PatchModelProvider.getResourceMapping((IDiffElement) object);
+			ResourceMappingContext rmc = new SynchronizationResourceMappingContext(
+					context);
+			try {
+				return mapping.getTraversals(rmc, new NullProgressMonitor());
+			} catch (CoreException e) {
+				TeamUIPlugin.log(e);
+			}
+		}
+		return new ResourceTraversal[0];
+	}
+
+	protected boolean isInScope(ISynchronizationScope scope, Object parent,
+			Object element) {
+		if (element instanceof PatchDiffNode) {
+			final IResource resource = PatchModelProvider
+					.getResource((PatchDiffNode) element);
+			if (resource == null)
+				return false;
+			if (scope.contains(resource))
+				return true;
+		}
+		return false;
+	}
+
+	public boolean hasChildren(final Object element) {
+		if (element instanceof HunkDiffNode)
+			return false;
+		return super.hasChildren(element);
+	}
+
+	public Object[] getChildren(Object parent) {
+		Object[] children = super.getChildren(parent);
+		List result = new ArrayList();
+		for (int i = 0; i < children.length; i++) {
+			if (children[i] instanceof PatchDiffNode) {
+				PatchDiffNode node = (PatchDiffNode) children[i];
+				if (node.isEnabled())
+					result.add(node); // hide disabled nodes
+			}
+		}
+		return result.toArray();
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncLabelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncLabelProvider.java
new file mode 100644
index 0000000..f48d612
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchSyncLabelProvider.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.internal.patch.PatchDiffNode;
+import org.eclipse.compare.structuremergeviewer.Differencer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.team.core.diff.IDiff;
+import org.eclipse.team.ui.mapping.SynchronizationLabelProvider;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+
+public class PatchSyncLabelProvider extends SynchronizationLabelProvider {
+
+	private PatchWorkbenchLabelProvider delegate;
+
+	public PatchSyncLabelProvider() {
+		super();
+	}
+
+	public void init(ICommonContentExtensionSite site) {
+		super.init(site);
+		delegate = new PatchWorkbenchLabelProvider();
+	}
+
+	public void dispose() {
+		super.dispose();
+		if (delegate != null)
+			delegate.dispose();
+	}
+
+	protected ILabelProvider getDelegateLabelProvider() {
+		return delegate;
+	}
+
+	protected IDiff getDiff(Object element) {
+		if (element instanceof PatchDiffNode) {
+			IResource resource = PatchModelProvider
+					.getResource((PatchDiffNode) element);
+			return getContext().getDiffTree().getDiff(resource);
+		}
+		return super.getDiff(element);
+	}
+
+	protected Image getCompareImage(Image base, int kind) {
+		/*
+		 * Need to swap left and right for PatchDiffNodes as done in Apply Patch
+		 * wizard. See org.eclipse.compare.structuremergeviewer.DiffTreeViewer.
+		 * DiffViewerLabelProvider.getImage(Object).
+		 */
+		switch (kind & Differencer.DIRECTION_MASK) {
+		case Differencer.LEFT:
+			kind = (kind & ~Differencer.LEFT) | Differencer.RIGHT;
+			break;
+		case Differencer.RIGHT:
+			kind = (kind & ~Differencer.RIGHT) | Differencer.LEFT;
+			break;
+		}
+		return super.getCompareImage(base, kind);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchAdapter.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchAdapter.java
new file mode 100644
index 0000000..ef1a3e4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchAdapter.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+public class PatchWorkbenchAdapter implements IWorkbenchAdapter {
+
+	public Object[] getChildren(Object o) {
+		if (o instanceof DiffNode) {
+			return ((DiffNode) o).getChildren();
+		}
+		return null;
+	}
+
+	public ImageDescriptor getImageDescriptor(Object object) {
+		if (object instanceof DiffNode) {
+			Image image = ((DiffNode) object).getImage();
+			return ImageDescriptor.createFromImage(image);
+		}
+		return null;
+	}
+
+	public String getLabel(Object o) {
+		if (o instanceof DiffNode) {
+			return ((DiffNode) o).getName();
+		}
+		return null;
+	}
+
+	public Object getParent(Object o) {
+		if (o instanceof DiffNode) {
+			return ((DiffNode) o).getParent();
+		}
+		return null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java
new file mode 100644
index 0000000..2ee1a21
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkbenchLabelProvider.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.compare.structuremergeviewer.DiffNode;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.navigator.ICommonContentExtensionSite;
+import org.eclipse.ui.navigator.ICommonLabelProvider;
+
+public class PatchWorkbenchLabelProvider extends WorkbenchLabelProvider
+		implements ICommonLabelProvider {
+
+	private ICommonContentExtensionSite extensionSite;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.navigator.ICommonLabelProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
+	 */
+	public void init(ICommonContentExtensionSite aConfig) {
+		extensionSite = aConfig;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
+	 */
+	public void restoreState(IMemento aMemento) {
+		// Nothing to do
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
+	 */
+	public void saveState(IMemento aMemento) {
+		// Nothing to do
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.navigator.IDescriptionProvider#getDescription(java.lang.Object)
+	 */
+	public String getDescription(Object anElement) {
+		if (anElement instanceof DiffNode) {
+			return ((DiffNode) anElement).getName();
+		} 
+		return null;
+	}
+
+	/**
+	 * Return the extension site for this label provider.
+	 * @return the extension site for this label provider
+	 */
+	public ICommonContentExtensionSite getExtensionSite() {
+		return extensionSite;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java
new file mode 100644
index 0000000..84ba408
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchWorkspace.java
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.compare.internal.core.patch.*;
+import org.eclipse.compare.internal.patch.*;
+import org.eclipse.compare.structuremergeviewer.*;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
+
+// TODO: extend PatchDiffNode, update navigatorContent triggerPoints when done
+public class PatchWorkspace extends DiffNode implements IAdaptable {
+
+	private WorkspacePatcher patcher;
+
+	public PatchWorkspace(WorkspacePatcher patcher) {
+		super(null, Differencer.NO_CHANGE);
+		this.patcher = patcher;
+	}
+
+	public WorkspacePatcher getPatcher() {
+		return patcher;
+	}
+
+	public IResource getResource() {
+		return ResourcesPlugin.getWorkspace().getRoot();
+	}
+
+	public String getName() {
+		return "Patch Root Workspace"; //$NON-NLS-1$
+	}
+
+	public IDiffContainer getParent() {
+		return null;
+	}
+
+	public IDiffElement[] getChildren() {
+		/*
+		 * Create a complete tree of patch model objects - elements of the
+		 * patch, but return only top-level ones: PatchProjectDiffNode(s) for a
+		 * workspace patch or FileDiffResult(s) otherwise. See
+		 * org.eclipse.compare.internal
+		 * .patch.PatchCompareEditorInput.buildTree()
+		 */
+		IDiffElement[] children;
+		if (getPatcher().isWorkspacePatch()) {
+			children = processProjects(getPatcher().getDiffProjects());
+		} else {
+			children = processDiffs(getPatcher().getDiffs());
+		}
+		return children;
+	}
+
+	// see org.eclipse.compare.internal.patch.PatchCompareEditorInput.processDiffs(FilePatch2[])
+	private IDiffElement[] processDiffs(FilePatch2[] diffs) { 
+		List result = new ArrayList();
+		for (int i = 0; i < diffs.length; i++) {
+			result.addAll(processDiff(diffs[i], this));
+		}
+		return (IDiffElement[]) result.toArray(new IDiffElement[result.size()]);
+	}
+
+	// see org.eclipse.compare.internal.patch.PatchCompareEditorInput.processProjects(DiffProject[])
+	private IDiffElement[] processProjects(DiffProject[] diffProjects) {
+		List result = new ArrayList();
+		for (int i = 0; i < diffProjects.length; i++) {
+			PatchProjectDiffNode projectNode = new PatchProjectDiffNode(this, diffProjects[i], getPatcher().getConfiguration());
+			result.add(projectNode);
+			FilePatch2[] diffs = diffProjects[i].getFileDiffs();
+			for (int j = 0; j < diffs.length; j++) {
+				FilePatch2 fileDiff = diffs[j];
+				processDiff(fileDiff, projectNode);
+			}
+		}
+		return (IDiffElement[]) result.toArray(new IDiffElement[result.size()]);
+	}
+
+	// see org.eclipse.compare.internal.patch.PatchCompareEditorInput.processDiff(FilePatch2, DiffNode)
+	private List/*<IDiffElement>*/ processDiff(FilePatch2 diff, DiffNode parent) {
+		List result = new ArrayList();
+		FileDiffResult diffResult = getPatcher().getDiffResult(diff);
+		PatchFileDiffNode node = new PatchFileDiffNode(diffResult, parent, PatchFileDiffNode.getKind(diffResult), PatchFileDiffNode.getAncestorElement(diffResult), getLeftElement(diffResult), PatchFileDiffNode.getRightElement(diffResult));
+		result.add(node);
+		HunkResult[] hunkResults = diffResult.getHunkResults();
+		for (int i = 0; i < hunkResults.length; i++) {
+			HunkResult hunkResult = hunkResults[i];
+			new HunkDiffNode(hunkResult, node, Differencer.CHANGE, HunkDiffNode.getAncestorElement(hunkResult, false), getLeftElement(hunkResult), HunkDiffNode.getRightElement(hunkResult, false));
+			// result.add(hunkDiffNode);
+		}
+		return result;
+	}
+	
+	private static ITypedElement getLeftElement(final FileDiffResult result) {
+		return new LocalResourceTypedElement(((WorkspaceFileDiffResult)result).getTargetFile()) {
+			public String getName() {
+				// as in org.eclipse.compare.internal.patch.PatchFileTypedElement
+				return result.getTargetPath().toString();
+			}
+		};
+	}
+
+	private static ITypedElement getLeftElement(final HunkResult result) {
+		return new LocalResourceTypedElement(((WorkspaceFileDiffResult)result.getDiffResult()).getTargetFile()) {
+			public String getName() {
+				// as in org.eclipse.compare.internal.patch.HunkTypedElement
+				return result.getHunk().getLabel();
+			}
+		};
+	}
+
+	// cannot extend PlatformObject (already extends DiffNode) so implement
+	// IAdaptable
+	public Object getAdapter(Class adapter) {
+		return Platform.getAdapterManager().getAdapter(this, adapter);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariant.java
new file mode 100644
index 0000000..1283f5a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariant.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import java.io.InputStream;
+
+import org.eclipse.compare.internal.core.patch.FileDiffResult;
+import org.eclipse.compare.internal.core.patch.FilePatch2;
+import org.eclipse.compare.internal.patch.WorkspacePatcher;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.*;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.variants.IResourceVariant;
+
+public class PatchedFileVariant implements IResourceVariant {
+
+	private FilePatch2 diff;
+	private WorkspacePatcher patcher;
+
+	public PatchedFileVariant(WorkspacePatcher patcher, FilePatch2 diff) {
+		this.diff = diff;
+		this.patcher = patcher;
+	}
+
+	public byte[] asBytes() {
+		// We don't persist the variant between sessions.
+		return null;
+	}
+
+	public String getContentIdentifier() {
+		return "(After Patch)"; //$NON-NLS-1$
+	}
+
+	public String getName() {
+		return diff.getPath(patcher.isReversed()).lastSegment();
+	}
+
+	public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
+		return new IStorage() {
+
+			public Object getAdapter(Class adapter) {
+				return null;
+			}
+
+			public boolean isReadOnly() {
+				return true;
+			}
+
+			public String getName() {
+				return PatchedFileVariant.this.getName();
+			}
+
+			public IPath getFullPath() {
+				return null;
+			}
+
+			public InputStream getContents() throws CoreException {
+				FileDiffResult diffResult = patcher.getDiffResult(diff);
+				return diffResult.getPatchedContents();
+			}
+		};
+	}
+
+	public boolean isContainer() {
+		return false;
+	}
+
+	FilePatch2 getDiff() {
+		return diff;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariantComparator.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariantComparator.java
new file mode 100644
index 0000000..af968be
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/PatchedFileVariantComparator.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.synchronize.patch;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.core.variants.IResourceVariantComparator;
+import org.eclipse.team.internal.core.mapping.LocalResourceVariant;
+
+public class PatchedFileVariantComparator implements IResourceVariantComparator {
+
+	public boolean compare(IResource local, IResourceVariant remote) {
+		if (remote instanceof LocalResourceVariant)
+			// return true when matching with base
+			return true;
+		return false;
+	}
+
+	public boolean compare(IResourceVariant base, IResourceVariant remote) {
+		return false;
+	}
+
+	public boolean isThreeWay() {
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
index 29e4cdd..2b4a87a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,7 @@
  *******************************************************************************/
 package org.eclipse.team.internal.ui.wizards;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.dialogs.Dialog;
@@ -31,7 +29,7 @@ import org.eclipse.team.internal.ui.synchronize.SynchronizeManager;
 import org.eclipse.team.ui.TeamUI;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.BaseWorkbenchContentProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
+import org.eclipse.ui.views.navigator.ResourceComparator;
 
 /**
  * Page that allows the user to select a set of resources that are managed
@@ -132,17 +130,16 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
 		fViewer.setContentProvider(new MyContentProvider());
 		fViewer.addDoubleClickListener(this);
 		fViewer.setLabelProvider(new MyLabelProvider());
-		fViewer.setSorter(new ResourceSorter(ResourceSorter.NAME));
+		fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
 		fViewer.setInput(TeamUI.getSynchronizeManager());
 		fViewer.addSelectionChangedListener(this);
 		
-		final SynchronizeWizardDescription selected= getDefaultSelection();
-		if (selected != null) {
-		    fViewer.setSelection(new StructuredSelection(selected)); 
-		} else {
-		    final Object object= fViewer.getElementAt(0);
-		    if (object != null)
-		        fViewer.setSelection(new StructuredSelection(object));
+		Object toSelect= getDefaultSelection();
+		if (toSelect == null) {
+		    toSelect= fViewer.getElementAt(0);
+		}
+		if (toSelect != null) {
+		    fViewer.setSelection(new StructuredSelection(toSelect), true); 
 		}
 		fViewer.getTable().setFocus();
 		Dialog.applyDialogFont(parent2);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PatchInaccessibleProjectsPage.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PatchInaccessibleProjectsPage.java
new file mode 100644
index 0000000..5132be9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/PatchInaccessibleProjectsPage.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.compare.internal.core.patch.DiffProject;
+import org.eclipse.compare.internal.patch.WorkspacePatcher;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.team.internal.ui.TeamUIMessages;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.views.navigator.ResourceComparator;
+
+public class PatchInaccessibleProjectsPage extends WizardPage {
+
+	private CheckboxTableViewer checkList;
+	private Button checkAllButton;
+	private Button uncheckAllButton;
+
+	private WorkspacePatcher fPatcher;
+
+	public final static String PATCH_INACCESSIBLE_PROJECTS_NAME = "PatchInaccessibleProjectsPage"; //$NON-NLS-1$
+
+	public PatchInaccessibleProjectsPage(WorkspacePatcher patcher) {
+		super(PATCH_INACCESSIBLE_PROJECTS_NAME,
+				TeamUIMessages.PatchInaccessibleProjectsPage_title, null);
+		setMessage(TeamUIMessages.PatchInaccessibleProjectsPage_message);
+		fPatcher = patcher;
+	}
+
+	public void createControl(Composite parent) {
+		initializeDialogUnits(parent);
+
+		Composite composite = new Composite(parent, SWT.NULL);
+		composite.setLayout(new GridLayout(3, false));
+		composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
+				| GridData.HORIZONTAL_ALIGN_FILL));
+		setControl(composite);
+		Font parentFont = composite.getFont();
+
+		checkList = CheckboxTableViewer.newCheckList(composite, SWT.H_SCROLL
+				| SWT.V_SCROLL | SWT.BORDER);
+		checkList.setContentProvider(new ArrayContentProvider());
+		checkList.setLabelProvider(new WorkbenchLabelProvider() {
+			public Color getForeground(Object element) {
+				if (element instanceof IProject
+						&& !((IProject) element).exists())
+					return Display.getCurrent().getSystemColor(
+							SWT.COLOR_WIDGET_NORMAL_SHADOW);
+				return super.getForeground(element);
+			}
+
+			protected String decorateText(String input, Object element) {
+				if (element instanceof IProject
+						&& !((IProject) element).exists())
+					return input
+							+ NLS.bind(
+									TeamUIMessages.PatchInaccessibleProjectsPage_projectDoesNotExistInWorkspace,
+									""); //$NON-NLS-1$
+				return input;
+			}
+		});
+		checkList.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				IProject project = (IProject) event.getElement();
+				if (event.getChecked() && !project.exists())
+					checkList.setChecked(project, false);
+			}
+		});
+		checkList
+				.setComparator(new ResourceComparator(ResourceComparator.NAME));
+
+		Table table = checkList.getTable();
+		GridData data = new GridData(GridData.VERTICAL_ALIGN_FILL
+				| GridData.HORIZONTAL_ALIGN_FILL);
+		data.horizontalSpan = 3;
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		table.setLayoutData(data);
+
+		checkAllButton = new Button(composite, SWT.NONE);
+		checkAllButton
+				.setText(TeamUIMessages.PatchInaccessibleProjectsPage_selectExisting);
+		checkAllButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setAllChecked(true);
+			}
+		});
+		checkAllButton.setFont(parentFont);
+		setButtonLayoutData(checkAllButton);
+
+		uncheckAllButton = new Button(composite, SWT.NONE);
+		uncheckAllButton
+				.setText(TeamUIMessages.PatchInaccessibleProjectsPage_deselectAll);
+		uncheckAllButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setAllChecked(false);
+			}
+		});
+		uncheckAllButton.setFont(parentFont);
+		setButtonLayoutData(uncheckAllButton);
+
+		updateControls();
+	}
+
+	private void updateControls() {
+		DiffProject[] diffProjects = fPatcher.getDiffProjects();
+		List projects = new ArrayList();
+		if (diffProjects != null) {
+			for (int i = 0; i < diffProjects.length; i++) {
+				IProject project = ResourcesPlugin.getWorkspace().getRoot()
+						.getProject(diffProjects[i].getName());
+				if (!project.isAccessible())
+					projects.add(project);
+			}
+		}
+		checkList.setInput(projects.toArray(new IProject[] {}));
+	}
+
+	public void setVisible(boolean visible) {
+		super.setVisible(visible);
+		if (visible)
+			updateControls();
+	}
+
+	public IWizardPage getNextPage() {
+		// Skipping the patch parsed page in case this one is displayed
+		Control control = getControl();
+		if (control != null && control.isVisible())
+			return null;
+		return super.getNextPage();
+	}
+
+	public IProject[] getSelectedProjects() {
+		Object elements[] = checkList.getCheckedElements();
+		List projects = new ArrayList();
+		for (int i = 0; i < elements.length; i++)
+			projects.add(elements[i]);
+		return (IProject[]) projects.toArray(new IProject[] {});
+	}
+
+	private void setAllChecked(boolean checked) {
+		int count = checkList.getTable().getItemCount();
+		for (int i = 0; i < count; i++) {
+			IProject project = (IProject) checkList.getElementAt(i);
+			if (project.exists())
+				checkList.setChecked(project, checked);
+		}
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
index 657f142..4a64c5d 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/IConfigurationWizardExtension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,7 +37,6 @@ public interface IConfigurationWizardExtension {
 	 * </p>
 	 *
 	 * @param workbench the current workbench 
-	 * 		TODO This parameter is useless. Should we pass the active page or part?
 	 * @param projects the selected projects
 	 */
 	void init(IWorkbench workbench, IProject[] projects);
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
index b79c7b1..34d2e23 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/PageSaveablePart.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,9 +44,9 @@ import org.eclipse.ui.progress.IProgressService;
  * Abstract class for hosting a page based structure input view for the purposes
  * of feeding compare viewers.
  * <p>
- * This class is not intended to be subclassed by clients outside of the Team framework.
  * 
  * @since 3.2
+ * @noextend This class is not intended to be subclassed by clients outside of the Team framework.
  * @deprecated Clients should use a subclass of {@link CompareEditorInput}
  *      and {@link CompareUI#openCompareDialog(org.eclipse.compare.CompareEditorInput)}
  */
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
index 6f339fb..8898ffa 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationCompareAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,9 +28,7 @@ import org.eclipse.team.ui.TeamUI;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 
 /**
- * A abstract implementation of {@link ISynchronizationCompareAdapter}. 
- * The {@link #asCompareInput(ISynchronizationContext, Object) }
- * which will convert file objects to an appropriate compare input.
+ * An abstract implementation of {@link ISynchronizationCompareAdapter}.
  * <p>
  * Clients may subclass this class.
  * 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
index 6952469..bb5cab5 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/SynchronizationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,8 @@ package org.eclipse.team.ui.mapping;
 import java.lang.reflect.InvocationTargetException;
 
 import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.jobs.*;
 import org.eclipse.team.core.diff.IDiff;
 import org.eclipse.team.core.mapping.*;
@@ -127,7 +128,7 @@ public abstract class SynchronizationOperation extends TeamOperation {
 	private void clearContextBusy(final IProgressMonitor monitor) {
 		// Add a job change listener to the job manager that will clear the busy
 		// when there are no more jobs related to the context running
-		final IJobManager jobManager = Platform.getJobManager();
+		final IJobManager jobManager = Job.getJobManager();
 		final IJobChangeListener listener = new JobChangeAdapter() {
 			public void done(IJobChangeEvent event) {
 				Job[] jobs = jobManager.find(getContext());
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
index 7d668d1..3ef827f 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,7 +119,13 @@ public abstract class AbstractSynchronizeLabelProvider implements ILabelProvider
 		return getCompareImage(base, compareKind);
 	}
 
-	private Image getCompareImage(Image base, int compareKind) {
+	/**
+	 * Returns an image showing the specified change kind applied to a given base image.
+	 * 
+	 * @nooverride This method is not intended to be re-implemented or extended by clients.
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
+	protected Image getCompareImage(Image base, int compareKind) {
 		return getImageManager().getImage(base, compareKind);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
index 8138ba5..e0ebb22 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/AbstractSynchronizeParticipant.java
@@ -217,7 +217,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
 		
 		// Title.
 		fName = config.getAttribute("name"); //$NON-NLS-1$
-		if (config == null) {
+		if (fName == null) {
 			fName = "Unknown"; //$NON-NLS-1$
 		}
 
@@ -285,7 +285,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
 	 *			TeamUIPlugin.log(e);
 	 *		}
 	 * </pre>
-	 * where <code>PARTICIPANT_ID</code> is the id of the particant as defined in the plugin manifest.
+	 * where <code>PARTICIPANT_ID</code> is the id of the participant as defined in the plugin manifest.
 	 * </p>
 	 * @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#init(String, org.eclipse.ui.IMemento)
 	 */
@@ -331,7 +331,7 @@ public abstract class AbstractSynchronizeParticipant extends PlatformObject impl
 	 * 		in a compare editor or compare dialog
 	 * @param config the compare configuration that will be used to configure the compare editor or dialog
 	 * @param monitor a progress monitor that can be used if contacting a server to prepare the element and configuration
-	 * @throws TeamException if an error occurred that shoudl rpevent the display of the compare editor containing
+	 * @throws TeamException if an error occurred that should prevent the display of the compare editor containing
 	 * the element
 	 * 
 	 * @since 3.1
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
index b818b2d..0dce3f6 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,10 +25,8 @@ import org.eclipse.ui.IWorkbenchActionConstants;
  * <li>add and configure the actions available to the user (context menu,
  * toolbar and view menu)
  * </ul>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
  * @since 3.0
+ * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface ISynchronizePageConfiguration {
 	
@@ -66,7 +64,7 @@ public interface ISynchronizePageConfiguration {
 	public static final String P_CONTEXT_MENU = TeamUIPlugin.ID + ".P_CONTEXT_MENU"; //$NON-NLS-1$
 	
 	/**
-	 * Property constant that defines the groups in the dropdown view 
+	 * Property constant that defines the groups in the drop-down view 
 	 * menu of the page. The value for this
 	 * property should be a string array. If this property is
 	 * set to <code>null</code>, the <code>DEFAULT_VIEW_MENU</code>
@@ -165,7 +163,7 @@ public interface ISynchronizePageConfiguration {
 
 	/**
 	 * The id of the preferences group that determines whether the preferences
-	 * actions appear in the view dropdown.
+	 * actions appear in the view drop-down.
 	 */
 	public static final String PREFERENCES_GROUP = "preferences"; //$NON-NLS-1$
 	
@@ -179,7 +177,7 @@ public interface ISynchronizePageConfiguration {
 	
 	/**
 	 * The id of the layout group that determines whether the layout selection
-	 * actions appear in the view dropdown or toolbar.
+	 * actions appear in the view drop-down or toolbar.
 	 */
 	public static final String LAYOUT_GROUP = "layout"; //$NON-NLS-1$
 
@@ -202,7 +200,7 @@ public interface ISynchronizePageConfiguration {
 	public static final String[] DEFAULT_TOOLBAR_MENU = new String[] { SYNCHRONIZE_GROUP, NAVIGATE_GROUP, MODE_GROUP, LAYOUT_GROUP };
 	
 	/**
-	 * These are the default groups used for the dropdown view menu of a page.
+	 * These are the default groups used for the drop-down view menu of a page.
 	 * These groups will always appear in this order in the view menu.
 	 * Clients can disable one or more of these groups by setting
 	 * the <code>P_VIEW_MENU</code> property to an array that
@@ -363,7 +361,7 @@ public interface ISynchronizePageConfiguration {
 	
 	/**
 	 * Set the P_SUPPORTED_MODES property of this configuration to the
-	 * ORed combination of one or more mode flags (<code>INCOMING_MODE</code>,
+	 * given combination of one or more mode flags (<code>INCOMING_MODE</code>,
 	 * <code>OUTGOING_MODE</code>, <code>BOTH_MODE</code>
 	 * and <code>CONFLICTING_MODE</code>).
 	 * @param modes the supported modes
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
index 1275096..1607a6a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
@@ -32,7 +32,7 @@ import org.eclipse.ui.part.IPageBookViewPage;
  * of a page {@link #createPage(ISynchronizePageConfiguration)} and
  * clients can decide where to display the page. For example, the synchronize view is an example
  * of a client that displays a participant in a view. However, you can imagine that a client may
- * also want to display this state in a wizard or dialog instead. That is possible by 
+ * also want to display this state in a wizard or dialog instead. 
  * </p><p>
  * When a participant is registered with the {@link ISynchronizeManager} it will automatically display 
  * in the <i>Synchronize View</i> and if the participant extension point
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
index f823e71..565b30a 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,11 +23,10 @@ import org.eclipse.ui.IViewPart;
  * to all participants. Instead, add participant specific actions as described
  * in {@link org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration}.
  * </p>
- * <p>
- * Clients are not intended to implement this interface.
- * </p>
  * @see ISynchronizeManager#showSynchronizeViewInActivePage()
  * @since 3.0
+ * @noimplement Clients are not intended to implement this interface.
+ * 
  */
 public interface ISynchronizeView extends IViewPart {
 	/**
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
index 84946f7..25af178 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelMergeOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -312,7 +312,7 @@ public abstract class ModelMergeOperation extends ModelOperation {
 	 * context has updated before invoking merge on another merger. The following
 	 * line of code will wait for the context to update:
 	 * <pre>
-	 * Platform.getJobManager().join(getContext(), monitor);
+	 * Job.getJobManager().join(getContext(), monitor);
 	 * </pre>
 	 * <p>
 	 * This method will throw a runtime exception
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
index 4f132b8..f0d609e 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import org.eclipse.team.ui.TeamUI;
 import org.eclipse.team.ui.mapping.*;
 import org.eclipse.ui.*;
 import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.progress.IProgressConstants2;
 
 /**
  * Synchronize participant that obtains it's synchronization state from
@@ -109,7 +110,7 @@ public class ModelSynchronizeParticipant extends
 	private SaveableComparison activeSaveable;
 	private PreferenceStore preferences = new PreferenceStore() {
 		public void save() throws IOException {
-			// Nothing to do. Preference will be saved with participant
+			// Nothing to do. Preference will be saved with participant.
 		}
 	};
 
@@ -124,7 +125,7 @@ public class ModelSynchronizeParticipant extends
 	};
 
 	/**
-	 * Create a participant for the given context
+	 * Create a participant for the given context and name
 	 * @param context the synchronization context
 	 * @param name the name of the participant
 	 * @return a participant for the given context
@@ -349,6 +350,7 @@ public class ModelSynchronizeParticipant extends
 		Job.getJobManager().cancel(this);
 		RefreshParticipantJob job = new RefreshModelParticipantJob(this, jobName, taskName, mappings, listener);
 		job.setUser(true);
+		job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
 		Utils.schedule(job, site);
 		
 		// Remember the last participant synchronized
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
index f0a4821..4b39691 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ModelSynchronizeParticipantActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActio
 
 	/**
 	 * The id of the action group that determines where the other
-	 * actions (e.g. mark-as-mered) appear in the context menu.
+	 * actions (e.g. mark-as-merged) appear in the context menu.
 	 */
 	public static final String OTHER_ACTION_GROUP = "other"; //$NON-NLS-1$
 	
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
index 3a6a30a..351aab2 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ParticipantPagePane.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ public final class ParticipantPagePane {
 	private Shell shell;
 	private boolean isModal;
 	
-	//	 SWT controls
+	// SWT controls
 	private CompareViewerPane fEditionPane;
 	private IPageBookViewPage fPage;
 	private DialogSynchronizePageSite site;
@@ -107,7 +107,7 @@ public final class ParticipantPagePane {
 		shell = parent.getShell();
 		
 		fEditionPane = new CompareViewerPane(top, SWT.BORDER | SWT.FLAT);		
-		fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0); //		
+		fEditionPane.setText(TeamUIMessages.ParticipantPageSaveablePart_0);		
 		
 		fEditionPane.setLayoutData(SWTUtils.createHVFillGridData());
 		
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
index 757aac3..debda36 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,10 +20,9 @@ import org.eclipse.core.runtime.*;
 import org.eclipse.jface.action.*;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.events.DisposeEvent;
 import org.eclipse.swt.events.DisposeListener;
@@ -31,13 +30,10 @@ import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.*;
 import org.eclipse.team.internal.ui.*;
 import org.eclipse.team.internal.ui.history.CompareFileRevisionEditorInput;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceSaveableComparison;
-import org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement;
 import org.eclipse.team.internal.ui.synchronize.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
+import org.eclipse.team.internal.ui.synchronize.*;
 import org.eclipse.team.ui.mapping.SaveableComparison;
 import org.eclipse.ui.*;
-import org.eclipse.ui.actions.*;
-import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.services.IDisposable;
 
 /**
@@ -74,7 +70,7 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
 	private static ITypedElement getFileElement(ICompareInput input,
 			CompareEditorInput editorInput) {
 		if (input.getLeft() instanceof LocalResourceTypedElement) {
-			return (LocalResourceTypedElement) input.getLeft();
+			return input.getLeft();
 		}
 		if (editorInput instanceof CompareFileRevisionEditorInput) {
 			return ((CompareFileRevisionEditorInput) editorInput).getLocalElement();
@@ -280,16 +276,27 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
 		if (isSaveNeeded() && checkForUnsavedChanges) {
 			return false;
 		} else {
+			final IWorkbenchPage page= getPage();
+			if (page == null)
+				return false;
+
 			Runnable runnable = new Runnable() {
 				public void run() {
-					IEditorPart part = getPage().findEditor(SaveableCompareEditorInput.this);
+					Shell shell= page.getWorkbenchWindow().getShell();
+					if (shell == null)
+						return;
+
+					IEditorPart part= page.findEditor(SaveableCompareEditorInput.this);
 					getPage().closeEditor(part, false);
 				}
 			};
 			if (Display.getCurrent() != null) {
 				runnable.run();
 			} else {
-				Display display = getPage().getWorkbenchWindow().getShell().getDisplay();
+				Shell shell= page.getWorkbenchWindow().getShell();
+				if (shell == null)
+					return false;
+				Display display= shell.getDisplay();
 				display.asyncExec(runnable);
 			}
 			return true;
@@ -461,59 +468,13 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
 		super.registerContextMenu(menu, selectionProvider);
 		final Saveable saveable = getSaveable();
 		if (saveable instanceof LocalResourceSaveableComparison) {
+			final ITypedElement element= getFileElement(getCompareInput(), this);
 			menu.addMenuListener(new IMenuListener() {
 				public void menuAboutToShow(IMenuManager manager) {
-					handleMenuAboutToShow(manager, saveable, selectionProvider);
+					SaveablesCompareEditorInput.handleMenuAboutToShow(manager, getContainer(), saveable, element, selectionProvider);
 				}
 			});
 		}
 	}
 	
-	/* package */ void handleMenuAboutToShow (IMenuManager manager, Saveable saveable, ISelectionProvider provider) {
-		if (provider instanceof ITextViewer) {
-			ITextViewer v = (ITextViewer) provider;
-			IDocument d = v.getDocument();
-			IDocument other = (IDocument)Utils.getAdapter(saveable, IDocument.class);
-			if (d == other) {
-				ITypedElement element = getFileElement(getCompareInput(), this);
-				if (element instanceof IResourceProvider) {
-					IResourceProvider rp = (IResourceProvider) element;
-					IResource resource = rp.getResource();
-					StructuredSelection selection = new StructuredSelection(resource);
-					IWorkbenchPart workbenchPart = getContainer().getWorkbenchPart();
-					if (workbenchPart != null) {
-						IWorkbenchSite ws = workbenchPart.getSite();
-						
-						MenuManager submenu1 =
-							new MenuManager(getShowInMenuLabel());
-						IContributionItem showInMenu = ContributionItemFactory.VIEWS_SHOW_IN.create(ws.getWorkbenchWindow());
-						submenu1.add(showInMenu);
-						manager.insertAfter("file", submenu1); //$NON-NLS-1$
-						MenuManager submenu2 =
-							new MenuManager(TeamUIMessages.OpenWithActionGroup_0);
-						submenu2.add(new OpenWithMenu(ws.getPage(), resource));
-						manager.insertAfter("file", submenu2); //$NON-NLS-1$
-						
-						OpenFileAction openFileAction = new OpenFileAction(ws.getPage());
-						openFileAction.selectionChanged(selection);
-						manager.insertAfter("file", openFileAction); //$NON-NLS-1$
-					}
-				}
-			}
-		}
-	}
-	
-	private String getShowInMenuLabel() {
-		String keyBinding= null;
-		
-		IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
-		if (bindingService != null)
-			keyBinding= bindingService.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_QUICK_MENU);
-		
-		if (keyBinding == null)
-			keyBinding= ""; //$NON-NLS-1$
-		
-		return NLS.bind(TeamUIMessages.SaveableCompareEditorInput_0, keyBinding);
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
index ee0700b..5e30879 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.team.internal.ui.synchronize.*;
 import org.eclipse.team.ui.TeamUI;
 import org.eclipse.ui.*;
 import org.eclipse.ui.part.IPageBookViewPage;
+import org.eclipse.ui.progress.IProgressConstants2;
 
 /**
  * A synchronize participant that displays synchronization information for local resources that are 
@@ -500,6 +501,7 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
 		Job.getJobManager().cancel(this);
 		RefreshParticipantJob job = new RefreshSubscriberParticipantJob(this, jobName, taskName, resources, listener);
 		job.setUser(true);
+		job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
 		Utils.schedule(job, site);
 		
 		// Remember the last participant synchronized
diff --git a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
index f5d12a4..5dcd7ec 100644
--- a/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
+++ b/eclipse/plugins/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SyncInfoCompareInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,7 +42,6 @@ import org.eclipse.ui.progress.UIJob;
  * </p>
  * @see SyncInfo
  * @since 3.0 
- * @noextend This class cannot be subclassed by clients.
  */
 public final class SyncInfoCompareInput extends SaveableCompareEditorInput implements IResourceChangeListener {
 
@@ -126,7 +125,7 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
 	 */
 	public Object getAdapter(Class adapter) {
 		if (IFile.class.equals(adapter) && resource.getType() == IResource.FILE) {
-			return (IFile)resource;
+			return resource;
 		}
 		return super.getAdapter(adapter);
 	}
@@ -210,7 +209,16 @@ public final class SyncInfoCompareInput extends SaveableCompareEditorInput imple
 		}
 		return false;
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return getSyncInfo().hashCode();
+	}
+
 	public SyncInfo getSyncInfo() {
 		return node.getSyncInfo();
 	}
diff --git a/eclipse/plugins/org.eclipse.text/projection/org/eclipse/jface/text/projection/ProjectionDocument.java b/eclipse/plugins/org.eclipse.text/projection/org/eclipse/jface/text/projection/ProjectionDocument.java
index c2341d4..0fe28d2 100644
--- a/eclipse/plugins/org.eclipse.text/projection/org/eclipse/jface/text/projection/ProjectionDocument.java
+++ b/eclipse/plugins/org.eclipse.text/projection/org/eclipse/jface/text/projection/ProjectionDocument.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer <anton.leherbauer at windriver.com> - [projection] "Backspace" key deleting something else - http://bugs.eclipse.org/301023
  *******************************************************************************/
 package org.eclipse.jface.text.projection;
 
@@ -405,8 +406,6 @@ public class ProjectionDocument extends AbstractDocument {
 			if (fragment.getOffset() == offsetInMaster) {
 				fragment.setOffset(offsetInMaster + lengthInMaster);
 				fragment.setLength(fragment.getLength() - lengthInMaster);
-			} else if (fragment.getOffset() + fragment.getLength() == offsetInMaster + lengthInMaster) {
-				fragment.setLength(fragment.getLength() - lengthInMaster);
 			} else {
 				// split fragment into three fragments, let position updater remove it
 
@@ -807,7 +806,7 @@ public class ProjectionDocument extends AbstractDocument {
 		Position[] segments= getSegments();
 		for (int i= 0; i < segments.length; i++) {
 			Segment segment= (Segment) segments[i];
-			if (segment.isDeleted() || segment.getLength() == 0) {
+			if (segment.isDeleted() || (segment.getLength() == 0 && (i < segments.length - 1 || (i > 0 && segments[i - 1].isDeleted())))) {
 				try {
 					removePosition(fSegmentsCategory, segment);
 					fMasterDocument.removePosition(fFragmentsCategory, segment.fragment);
diff --git a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
index 0d27f20..a4e5095 100644
--- a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
+++ b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/AbstractDocument.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,9 @@ import java.util.Map;
 import java.util.regex.PatternSyntaxException;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.SafeRunner;
 
 
 /**
@@ -576,10 +578,14 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 		Object[] listeners= fDocumentPartitioningListeners.getListeners();
 		for (int i= 0; i < listeners.length; i++) {
 			IDocumentPartitioningListener l= (IDocumentPartitioningListener)listeners[i];
-			if (l instanceof IDocumentPartitioningListenerExtension)
-				((IDocumentPartitioningListenerExtension) l).documentPartitioningChanged(this, region);
-			else
-				l.documentPartitioningChanged(this);
+			try {
+				if (l instanceof IDocumentPartitioningListenerExtension)
+					((IDocumentPartitioningListenerExtension)l).documentPartitioningChanged(this, region);
+				else
+					l.documentPartitioningChanged(this);
+			} catch (Exception ex) {
+				log(ex);
+			}
 		}
 	}
 
@@ -599,14 +605,18 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 		Object[] listeners= fDocumentPartitioningListeners.getListeners();
 		for (int i= 0; i < listeners.length; i++) {
 			IDocumentPartitioningListener l= (IDocumentPartitioningListener)listeners[i];
-			if (l instanceof IDocumentPartitioningListenerExtension2) {
-				IDocumentPartitioningListenerExtension2 extension2= (IDocumentPartitioningListenerExtension2) l;
-				extension2.documentPartitioningChanged(event);
-			} else if (l instanceof IDocumentPartitioningListenerExtension) {
-				IDocumentPartitioningListenerExtension extension= (IDocumentPartitioningListenerExtension) l;
-				extension.documentPartitioningChanged(this, event.getCoverage());
-			} else {
-				l.documentPartitioningChanged(this);
+			try {
+				if (l instanceof IDocumentPartitioningListenerExtension2) {
+					IDocumentPartitioningListenerExtension2 extension2= (IDocumentPartitioningListenerExtension2)l;
+					extension2.documentPartitioningChanged(event);
+				} else if (l instanceof IDocumentPartitioningListenerExtension) {
+					IDocumentPartitioningListenerExtension extension= (IDocumentPartitioningListenerExtension)l;
+					extension.documentPartitioningChanged(this, event.getCoverage());
+				} else {
+					l.documentPartitioningChanged(this);
+				}
+			} catch (Exception ex) {
+				log(ex);
 			}
 		}
 	}
@@ -632,19 +642,33 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 					if (extension.getActiveRewriteSession() != null)
 						continue;
 				}
-				p.documentAboutToBeChanged(event);
+				try {
+					p.documentAboutToBeChanged(event);
+				} catch (Exception ex) {
+					log(ex);
+				}
 			}
 		}
 
 		Object[] listeners= fPrenotifiedDocumentListeners.getListeners();
-		for (int i= 0; i < listeners.length; i++)
-			((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
+		for (int i= 0; i < listeners.length; i++) {
+			try {
+				((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
+			} catch (Exception ex) {
+				log(ex);
+			}
+		}
 
 		listeners= fDocumentListeners.getListeners();
-		for (int i= 0; i < listeners.length; i++)
-			((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
-	}
+		for (int i= 0; i < listeners.length; i++) {
+			try {
+				((IDocumentListener)listeners[i]).documentAboutToBeChanged(event);
+			} catch (Exception ex) {
+				log(ex);
+			}
+		}
 
+	}
 
 	/**
 	 * Updates document partitioning and document positions according to the
@@ -731,12 +755,22 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 			fireDocumentPartitioningChanged(p);
 
 		Object[] listeners= fPrenotifiedDocumentListeners.getListeners();
-		for (int i= 0; i < listeners.length; i++)
-			((IDocumentListener)listeners[i]).documentChanged(event);
+		for (int i= 0; i < listeners.length; i++) {
+			try {
+				((IDocumentListener)listeners[i]).documentChanged(event);
+			} catch (Exception ex) {
+				log(ex);
+			}
+		}
 
 		listeners= fDocumentListeners.getListeners();
-		for (int i= 0; i < listeners.length; i++)
-			((IDocumentListener)listeners[i]).documentChanged(event);
+		for (int i= 0; i < listeners.length; i++) {
+			try {
+				((IDocumentListener)listeners[i]).documentChanged(event);
+			} catch (Exception ex) {
+				log(ex);
+			}
+		}
 
 		// IDocumentExtension
 		++ fReentranceCount;
@@ -1520,8 +1554,12 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 			List list= new ArrayList(fDocumentRewriteSessionListeners);
 			Iterator e= list.iterator();
 			while (e.hasNext()) {
-				IDocumentRewriteSessionListener l= (IDocumentRewriteSessionListener) e.next();
-				l.documentRewriteSessionChanged(event);
+				try {
+					IDocumentRewriteSessionListener l= (IDocumentRewriteSessionListener)e.next();
+					l.documentRewriteSessionChanged(event);
+				} catch (Exception ex) {
+					log(ex);
+				}
 			}
 		}
 	}
@@ -1796,5 +1834,22 @@ public abstract class AbstractDocument implements IDocument, IDocumentExtension,
 		return positions.subList(indexStart, indexEnd);
 	}
 
+	/**
+	 * Logs the given exception by reusing the code in {@link SafeRunner}.
+	 * 
+	 * @param ex the exception
+	 * @since 3.6
+	 */
+	private static void log(final Exception ex) {
+		SafeRunner.run(new ISafeRunnable() {
+			public void run() throws Exception {
+				throw ex;
+			}
+
+			public void handleException(Throwable exception) {
+				// NOTE: Logging is done by SafeRunner
+			}
+		});
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
index 7e4aadb..7bb46ee 100644
--- a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
+++ b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,20 +30,26 @@ import org.eclipse.core.runtime.Assert;
 public class CopyOnWriteTextStore implements ITextStore {
 
 	/**
-	 * An unmodifiable String based text store. It is not possible to modify the content other than
-	 * using {@link #set}. Trying to {@link #replace} a text range will throw an
+	 * An unmodifiable String based text store. It is not possible to modify the initial content.
+	 * Trying to {@link #replace} a text range or {@link #set} new content will throw an
 	 * <code>UnsupportedOperationException</code>.
 	 */
 	private static class StringTextStore implements ITextStore {
 
+		/** Minimum text limit whether to enable String copying */
+		private static final int SMALL_TEXT_LIMIT= 1024 * 1024;
+
 		/** Represents the content of this text store. */
-		private String fText= ""; //$NON-NLS-1$
+		private final String fText;
+		
+		/** Minimum length limit below which {@link #get(int, int)} will return a String copy */
+		private final int fCopyLimit;
 
 		/**
 		 * Create an empty text store.
 		 */
 		private StringTextStore() {
-			super();
+			this(""); //$NON-NLS-1$
 		}
 
 		/**
@@ -53,7 +59,8 @@ public class CopyOnWriteTextStore implements ITextStore {
 		 */
 		private StringTextStore(String text) {
 			super();
-			set(text);
+			fText= text != null ? text : ""; //$NON-NLS-1$
+			fCopyLimit= fText.length() > SMALL_TEXT_LIMIT ? fText.length() / 2 : 0;
 		}
 
 		/*
@@ -67,6 +74,10 @@ public class CopyOnWriteTextStore implements ITextStore {
 		 * @see org.eclipse.jface.text.ITextStore#get(int, int)
 		 */
 		public String get(int offset, int length) {
+			if (length < fCopyLimit) {
+				// create a copy to avoid sharing of contained char[] - bug 292664
+				return new String(fText.substring(offset, offset + length).toCharArray());
+			}
 			return fText.substring(offset, offset + length);
 		}
 
@@ -89,7 +100,8 @@ public class CopyOnWriteTextStore implements ITextStore {
 		 * @see org.eclipse.jface.text.ITextStore#set(java.lang.String)
 		 */
 		public void set(String text) {
-			fText= text != null ? text : ""; //$NON-NLS-1$
+			// modification not supported
+			throw new UnsupportedOperationException();
 		}
 
 	}
diff --git a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
index b0fc21b..e277269 100644
--- a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
+++ b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -655,8 +655,6 @@ public class FindReplaceDocumentAdapter implements CharSequence {
 	
 		StringBuffer pattern= new StringBuffer(string.length() + 16);
 		int length= string.length();
-		if (length > 0 && string.charAt(0) == '^')
-			pattern.append('\\');
 		for (int i= 0; i < length; i++) {
 			char ch= string.charAt(i);
 			switch (ch) {
@@ -672,6 +670,8 @@ public class FindReplaceDocumentAdapter implements CharSequence {
 				case '*':
 				case '+':
 				case '|':
+				case '^':
+				case '$':
 					pattern.append('\\').append(ch);
 					break;
 	
@@ -704,8 +704,6 @@ public class FindReplaceDocumentAdapter implements CharSequence {
 					}
 			}
 		}
-		if (length > 0 && string.charAt(length - 1) == '$')
-			pattern.insert(pattern.length() - 1, '\\');
 		return pattern.toString();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
index 549d7ff..ee43234 100644
--- a/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
+++ b/eclipse/plugins/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -124,11 +124,11 @@ public class AnnotationModel implements IAnnotationModel, IAnnotationModelExtens
 			if (fCanStartBefore && fCanEndAfter)
 				return fRegion.overlapsWith(start, length);
 			else if (fCanStartBefore)
-				return fRegion.includes(start + length - 1);
+				return fRegion.includes(start + length - (length > 0 ? 1 : 0));
 			else if (fCanEndAfter)
 				return fRegion.includes(start);
 			else
-				return fRegion.includes(start) && fRegion.includes(start + length - 1);
+				return fRegion.includes(start) && fRegion.includes(start + length - (length > 0 ? 1 : 0));
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java b/eclipse/plugins/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
index b28b7d1..6f36f68 100644
--- a/eclipse/plugins/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
+++ b/eclipse/plugins/org.eclipse.text/src/org/eclipse/text/undo/DocumentUndoManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -162,7 +162,7 @@ public class DocumentUndoManager implements IDocumentUndoManager {
 					// Normal case: an undo is valid if its redo will restore
 					// document to its current modification stamp
 					boolean canUndo= docStamp == IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP
-							|| docStamp == getRedoModificationStamp();
+							|| docStamp >= getRedoModificationStamp();
 
 					/*
 					 * Special case to check if the answer is false. If the last
@@ -1028,8 +1028,8 @@ public class DocumentUndoManager implements IDocumentUndoManager {
 
 	private void processChange(int modelStart, int modelEnd,
 			String insertedText, String replacedText,
-			long beforeChangeModificationStamp,
-			long afterChangeModificationStamp) {
+			final long beforeChangeModificationStamp,
+			final long afterChangeModificationStamp) {
 
 		if (insertedText == null)
 			insertedText= ""; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.browser/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.browser/META-INF/MANIFEST.MF
index cb6adfe..657e037 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.browser/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.browser; singleton:=true
-Bundle-Version: 3.2.301.qualifier
+Bundle-Version: 3.3.1.qualifier
 Bundle-Activator: org.eclipse.ui.internal.browser.WebBrowserUIPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
@@ -10,8 +10,8 @@ Export-Package: org.eclipse.ui.browser,
  org.eclipse.ui.internal.browser;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.internal.browser.browsers;x-internal:=true,
  org.eclipse.ui.internal.browser.macosx;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)"
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ui.browser/plugin.properties b/eclipse/plugins/org.eclipse.ui.browser/plugin.properties
index 8b21ac5..c3bc328 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.browser/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
+# Copyright (c) 2005, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.browser/plugin.xml b/eclipse/plugins/org.eclipse.ui.browser/plugin.xml
index 708e377..b1f6b57 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.browser/plugin.xml
@@ -1,14 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
-         Martin Oberhuber (Wind River) - [292882] Default Browser on Solaris      
+          Martin Oberhuber (Wind River) - [292882] Default Browser on Solaris
  -->
 
 <plugin>
@@ -89,8 +90,8 @@
          executable="mozilla"
          factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
          <location>usr/bin/mozilla</location>
-         <location>usr/sfw/lib/mozilla/mozilla</location>        
          <location>usr/X11/bin/mozilla</location>
+         <location>usr/sfw/lib/mozilla/mozilla</location>
       </browser>
       <browser
          id="org.eclipse.ui.browser.netscape"
@@ -108,6 +109,9 @@
          os="linux,aix,hpux,solaris"
          executable="firefox"
          factoryclass="org.eclipse.ui.internal.browser.browsers.MozillaFactory">
+         <location>
+            usr/bin/firefox
+         </location>
       </browser>
       <browser
          id="org.eclipse.ui.browser.konqueror"
@@ -255,5 +259,4 @@
             id="org.eclipse.ui.browser.elementFactory">
       </factory>
    </extension>
-
 </plugin>
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptor.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptor.java
index 01b4ebd..7f95493 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorDialog.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorDialog.java
index d569769..0423ad7 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
index 9df5d7e..a6f4234 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserDescriptorWorkingCopy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
index d171e98..1e54882 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -96,8 +96,8 @@ public class BrowserManager extends Observable {
 			browsers = new ArrayList();
 			
 			try {
-				ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes());
-				Reader reader = new InputStreamReader(in);
+				ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes("utf-8")); //$NON-NLS-1$
+				Reader reader = new InputStreamReader(in, "utf-8"); //$NON-NLS-1$
 				IMemento memento = XMLMemento.createReadRoot(reader);
 				
 				IMemento system = memento.getChild("system"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
index a502265..d42d041 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/BrowserViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -617,7 +617,7 @@ public class BrowserViewer extends Composite {
             return true;
         }
         if (browser!=null)
-            return browser.setUrl(url);
+            return browser.setUrl(url, null, new String[] {"Cache-Control: no-cache"}); //$NON-NLS-1$
         return text.setUrl(url);
     }
  
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
index 6af87d3..5334e25 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/DefaultBrowserSupport.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
index 996ba41..f035d28 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/ExternalBrowserInstance.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptor.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptor.java
index 9d57daf..2dbe97e 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptor.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptorWorkingCopy.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptorWorkingCopy.java
index e21f991..16b4a12 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptorWorkingCopy.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserDescriptorWorkingCopy.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserViewerContainer.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserViewerContainer.java
index cb84ff2..cc900dd 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserViewerContainer.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/IBrowserViewerContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import org.eclipse.ui.IActionBars;
 public interface IBrowserViewerContainer {
     /**
      * Closes the container from the inside.
-     * @return 
+     * @return true if the container closed successfully
      */
     boolean close();
     /**
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.properties b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.properties
index 77dd456..f95b195 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/Messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -28,26 +28,26 @@ actionWebBrowserRefresh=Refresh the current page
 
 # message if a resource is deleted
 dialogResourceDeletedTitle=Web Resource Deleted
-dialogResourceDeletedMessage=The file {0} initially opened in the Web Browser has been deleted from the file system. Do you want to ignore the deletion or close the Web Browser?
+dialogResourceDeletedMessage=The file {0} initially opened in the web browser has been deleted from the file system. Do you want to ignore the deletion or close the web browser?
 dialogResourceDeletedIgnore=Ignore
 
 # --------------- Preferences ---------------
 
 # Name of the preference pages
 preferenceWebBrowserTitle=Web Browser
-preferenceWebBrowserDescription=Add, remove, or edit installed Web browsers.\nThe selected Web browser will be used by default when Web pages are opened, although some applications may always use the external browser.
+preferenceWebBrowserDescription=Add, remove, or edit installed web browsers.\nThe selected web browser will be used by default when web pages are opened, although some applications may always use the external browser.
 
 # Web Browser preferences
-prefInternalBrowser=Use &internal Web browser
-prefSystemBrowser=Default system Web browser
-prefExternalBrowser=Use e&xternal Web browser
+prefInternalBrowser=Use &internal web browser
+prefSystemBrowser=Default system web browser
+prefExternalBrowser=Use e&xternal web browser
 
 errorDialogTitle=Error
-errorCouldNotLaunchWebBrowser=Could not launch external Web Browser for {0}. Check the Web Browser preferences.
-errorNoBrowser=Could not open a Web browser because there are none configured. Check the Web Browser preferences.
-errorInvalidEditorInput=Could not open Web browser on {0}. Ensure that it is an uncompressed file.
+errorCouldNotLaunchWebBrowser=Could not launch external web browser for {0}. Check the Web Browser preferences.
+errorNoBrowser=Could not open a web browser because there are none configured. Check the Web Browser preferences.
+errorInvalidEditorInput=Could not open web browser on {0}. Ensure that it is an uncompressed file.
 
-browserList=External &Web browsers:
+browserList=External &web browsers:
 add=&New...
 edit=&Edit...
 remove=&Remove
@@ -59,11 +59,11 @@ location=&Location:
 parameters=&Parameters:
 parametersMessage=Example: -url {0}\n(Use {0} to include the URL)
 browse=&Browse...
-browseMessage=Specify the location of the Web Browser executable
-errorCouldNotLaunchInternalWebBrowser=Could not launch internal Web Browser. Please set an external browser in the Browser preferences.
-searchingTaskName=Searching for Web browsers...
+browseMessage=Specify the location of the web browser executable
+errorCouldNotLaunchInternalWebBrowser=Could not launch internal web browser. Please set an external browser in the Browser preferences.
+searchingTaskName=Searching for web browsers...
 searching=Found {0} - Searching {1}
-searchingNoneFound=No Web browsers were found.
-selectDirectory=Select a directory to search for Web browsers:
+searchingNoneFound=No web browsers were found.
+selectDirectory=Select a directory to search for web browsers:
 directoryDialogTitle=Directory Selection
 locationInvalid=The location value is not a valid path name.
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserDescriptor.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserDescriptor.java
index 4d19603..e5a8f1d 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/SystemBrowserDescriptor.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
  *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
index 6f1f689..eb2e3e9 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserEditorInput.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,7 +34,7 @@ public class WebBrowserEditorInput implements IEditorInput,
 	// public static final int SHOW_GLOBAL_TOOLBAR = 1 << 2;
 
 	// if used, the status bar will be available
-	// public static final int SHOW_STATUSBAR = 1 << 2;
+	// public static final int SHOW_STATUSBAR = 1 << 3;
 
 	// if used, the original URL will be saved and
 	// the page can reopen to the same URL after
@@ -179,8 +179,9 @@ public class WebBrowserEditorInput implements IEditorInput,
 	}
 
 	/**
-	 * Indicates whether some other object is "equal to" this one. In this case
-	 * it means that the underlying IFolders are equal.
+	 * Tests to see if two input objects are equal in the sense that they can share an
+	 * editor.
+	 * @return true if the url and browser id are equal and the style bits are compatible
 	 */
 	public boolean equals(Object obj) {
 		if (this == obj)
@@ -189,9 +190,13 @@ public class WebBrowserEditorInput implements IEditorInput,
 			return false;
 		WebBrowserEditorInput other = (WebBrowserEditorInput) obj;
 
-		if (url != null && !url.equals(obj))
-			return false;
-
+		if (url != null) {
+			if (other.url == null || !url.toExternalForm().equals(other.url.toExternalForm()))	 {
+			    return false;
+			}
+		} else if (other.url != null) {
+		    return false;
+		}
 		return canReplaceInput(other);
 	}
 
@@ -362,4 +367,15 @@ public class WebBrowserEditorInput implements IEditorInput,
 	public String toString() {
 		return "WebBrowserEditorInput[" + url + " " + style + " " + id + "]";  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 	}
+	
+	public int hashCode() {
+		int result = 0;
+		if (url != null) {
+			result = result + url.toExternalForm().hashCode();
+		}
+		if (id != null) {
+			result = result + id.hashCode();
+		}
+		return result;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
index ea4f72b..75f9727 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,14 +7,18 @@
  *
  * Contributors:
  *     IBM Corporation - Initial API and implementation
+ * Martin Oberhuber (Wind River) - [293159] cyclic link when searching browser
  *******************************************************************************/
 package org.eclipse.ui.internal.browser;
 
 import java.io.File;
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.Dialog;
@@ -417,7 +421,7 @@ public class WebBrowserPreferencePage extends PreferencePage implements
 					public void run(IProgressMonitor monitor) {
 						monitor.beginTask(Messages.searchingTaskName,
 								IProgressMonitor.UNKNOWN);
-						search(rootDir, existingPaths, foundBrowsers, monitor);
+						search(rootDir, existingPaths, foundBrowsers, new HashSet(), monitor);
 						monitor.done();
 					}
 				};
@@ -440,9 +444,6 @@ public class WebBrowserPreferencePage extends PreferencePage implements
 
 				List browsersToCreate = foundBrowsers;
 
-				if (browsersToCreate == null) // cancelled
-					return;
-
 				if (browsersToCreate.isEmpty()) { // no browsers found
 					WebBrowserUtil.openMessage(Messages.searchingNoneFound);
 					return;
@@ -532,9 +533,19 @@ public class WebBrowserPreferencePage extends PreferencePage implements
 	}
 
 	protected static void search(File directory, List existingPaths,
-			List foundBrowsers, IProgressMonitor monitor) {
+			List foundBrowsers, Set directoriesVisited, IProgressMonitor monitor) {
 		if (monitor.isCanceled())
 			return;
+		try {
+			//bug 293159: protect against recursion due to cyclic symbolic link
+			String canonicalPath = directory.getCanonicalPath();
+			if (!directoriesVisited.add(canonicalPath)) {
+				//already been here
+				return;
+			}
+		} catch(IOException ioe) {
+			/*ignore*/
+		}
 
 		monitor.subTask(NLS.bind(Messages.searching,
 				new String[] { Integer.toString(foundBrowsers.size()), directory.getAbsolutePath()}));
@@ -564,7 +575,7 @@ public class WebBrowserPreferencePage extends PreferencePage implements
 		}
 		while (!subDirs.isEmpty()) {
 			File subDir = (File) subDirs.remove(0);
-			search(subDir, existingPaths, foundBrowsers, monitor);
+			search(subDir, existingPaths, foundBrowsers, directoriesVisited, monitor);
 			if (monitor.isCanceled()) {
 				return;
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
index 7c708fb..a245af4 100644
--- a/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
+++ b/eclipse/plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java
@@ -7,6 +7,7 @@
  * 
  * Contributors:
  *     IBM Corporation - Initial API and implementation
+ * Martin Oberhuber (Wind River) - [292882] Default Browser on Solaris
  *******************************************************************************/
 package org.eclipse.ui.internal.browser;
 
@@ -15,16 +16,18 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
 /**
  * Utility class for the Web browser tools.
  */
@@ -151,9 +154,23 @@ public class WebBrowserUtil {
 	}
 
 	public static boolean canUseSystemBrowser() {
-		// Disabling system browser on Solaris due to bug 94497
-		if (Platform.OS_SOLARIS.equals(Platform.getOS()))
-			return false;
+		// Disabling system browser on Solaris < Solaris10 due to bug 94497
+		// The problem is that the SWT Program fails with the Tooltalk / DT integration on Solaris 9 or older
+		// The GTK / Gnome integration on Solaris 10 or newer does work though.
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=94497#c56
+		if (Platform.OS_SOLARIS.equals(Platform.getOS())) {
+			//No system browser on Solaris Motif
+			if (!Platform.WS_GTK.equals(Platform.getWS())) {
+				return false;
+			}
+			//No system browser on Solaris 9 or older
+			String osVersion = WebBrowserUIPlugin.getInstance().getBundle().getBundleContext().getProperty(Constants.FRAMEWORK_OS_VERSION);
+			int compareVal = new Version(osVersion).compareTo(new Version(5,10,0));
+			if (compareVal < 0) {
+				//older than Solaris 10
+				return false;
+			}
+		}
 		return Program.findProgram("html") != null; //$NON-NLS-1$
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.carbon/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.carbon/META-INF/MANIFEST.MF
index c5dce85..92cb22a 100644
--- a/eclipse/plugins/org.eclipse.ui.carbon/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.carbon/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.ui.carbon; singleton:=true
-Bundle-Version: 4.0.0.qualifier
+Bundle-Version: 4.0.100.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)"
 Bundle-Localization: fragment-carbon
diff --git a/eclipse/plugins/org.eclipse.ui.carbon/fragment-carbon.properties b/eclipse/plugins/org.eclipse.ui.carbon/fragment-carbon.properties
index cb3a1cf..b608c3e 100644
--- a/eclipse/plugins/org.eclipse.ui.carbon/fragment-carbon.properties
+++ b/eclipse/plugins/org.eclipse.ui.carbon/fragment-carbon.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,3 +11,6 @@
 
 providerName=Eclipse.org
 fragmentName=Eclipse UI MacOS X Enhancements
+
+command.closeDialog.name=Close Dialog
+command.closeDialog.desc=Closes the active Dialog
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.carbon/fragment.xml b/eclipse/plugins/org.eclipse.ui.carbon/fragment.xml
index 2a881b8..45f3f2f 100644
--- a/eclipse/plugins/org.eclipse.ui.carbon/fragment.xml
+++ b/eclipse/plugins/org.eclipse.ui.carbon/fragment.xml
@@ -8,5 +8,32 @@
             class="org.eclipse.ui.internal.carbon.CarbonUIEnhancer">
       </startup>
    </extension>
+
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            categoryId="org.eclipse.ui.category.window"
+            description="%command.closeDialog.desc"
+            id="org.eclipse.ui.carbon.closeDialog"
+            name="%command.closeDialog.name">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.ui.internal.carbon.CloseDialogHandler"
+            commandId="org.eclipse.ui.carbon.closeDialog">
+      </handler>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.eclipse.ui.carbon.closeDialog"
+            contextId="org.eclipse.ui.contexts.dialog"
+            platform="carbon"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+W">
+      </key>
+   </extension>
    
 </fragment>
diff --git a/eclipse/plugins/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java b/eclipse/plugins/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java
new file mode 100644
index 0000000..6adf911
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CloseDialogHandler.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.carbon;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * 
+ * @since 3.6 
+ *
+ */
+public class CloseDialogHandler extends AbstractHandler implements IHandler {
+
+	public Object execute(ExecutionEvent event) {
+
+		Shell activeShell = Display.getDefault().getActiveShell();
+		// perform only if shell is available & close is enabled
+		if (activeShell != null && (activeShell.getStyle() & SWT.CLOSE) != 0) {
+			activeShell.close();
+		}
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.cheatsheets/META-INF/MANIFEST.MF
index ba0c826..17fdb16 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.ui.cheatsheets; singleton:=true
-Bundle-Version: 3.3.200.qualifier
+Bundle-Version: 3.4.0.qualifier
 Bundle-Activator: org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin
 Bundle-Vendor: %PROVIDER_NAME
 Bundle-Localization: plugin
@@ -20,17 +20,16 @@ Export-Package: org.eclipse.ui.cheatsheets,
  org.eclipse.ui.internal.cheatsheets.state;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.internal.cheatsheets.views;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.internal.provisional.cheatsheets;x-friends:="org.eclipse.ua.tests"
-Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.help.base;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
- org.eclipse.help.ui;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
- org.eclipse.core.expressions;bundle-version="3.4.100"
+Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.forms;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.help;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.help.base;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
+ org.eclipse.help.ui;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
+ org.eclipse.core.expressions;bundle-version="3.4.200"
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text,
  javax.xml.parsers,
- org.apache.lucene.document,
  org.w3c.dom,
  org.xml.sax
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/plugin.xml b/eclipse/plugins/org.eclipse.ui.cheatsheets/plugin.xml
index e463e25..feb0170 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -206,7 +207,7 @@
       </triggerPoint>
     </extension>
    <extension
-         point="org.eclipse.help.base.luceneSearchParticipants">
+         point="org.eclipse.help.base.searchParticipant">
       <searchParticipant
             icon="$nl$/icons/view16/cheatsheet_view.gif"
             id="org.eclipse.ui.cheatsheets"
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.exsd b/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.exsd
index 3e7a3f6..9c09501 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.exsd
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ui.cheatsheets">
+<schema targetNamespace="org.eclipse.ui.cheatsheets" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.ui.cheatsheets" id="cheat_sheet_schema" name="Cheat Sheet Content File XML Format"/>
@@ -189,14 +189,18 @@ given item can be performed in any order. All sub-items within an item have to
 be completed or skipped before progressing to the next item. (Which means
 actions that must be performed in a required sequence should not be represented
 as sub-items.)</p>
+<p>Since version 3.4 a description has been allowed in a subitem in place of the label attribute, which allows for formatting tags to be used.</p>
          </documentation>
       </annotation>
       <complexType>
-         <choice minOccurs="0" maxOccurs="1">
-            <element ref="action"/>
-            <element ref="command"/>
-            <element ref="perform-when"/>
-         </choice>
+         <sequence>
+            <element ref="description" minOccurs="0" maxOccurs="1"/>
+            <choice minOccurs="0" maxOccurs="1">
+               <element ref="action"/>
+               <element ref="command"/>
+               <element ref="perform-when"/>
+            </choice>
+         </sequence>
          <attribute name="label" type="string" use="required">
             <annotation>
                <documentation>
@@ -208,6 +212,8 @@ as sub-items.)</p>
     variables that are unbound. The values of the variables are as of the
     beginning of the execution of the main step (when the &lt;item&gt; element
     is elaborated), rather than when the individual sub-step are run.
+    
+  A subitem may have either a label or a description element but not both. A description element may contain the formating tags such as &lt;b&gt;, &lt;/b&gt; or &lt;br/&gt;.
                </documentation>
                <appInfo>
                   <meta.attribute translatable="true"/>
@@ -641,23 +647,7 @@ demonstrates the use of commands, perform-when and conditional subitems.</p&g
       </documentation>
    </annotation>
 
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
 
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
 
    <annotation>
       <appInfo>
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.html b/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.html
index 6076275..4a19bb0 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.html
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/schema/cheatSheetContentFileSpec.html
@@ -20,7 +20,7 @@ DTD fragments (<a href="cheatSheetContentFileSpec.exsd">machine readable XML sch
 <p></p>
 <p class="code SchemaDtd"><!ELEMENT <a name="e.cheatsheet">cheatsheet</a> (<a href="#e.intro">intro</a> , <a href="#e.item">item</a>+)></p>
 <p class="code SchemaDtd"><!ATTLIST cheatsheet</p>
-<p class="code SchemaDtdAttlist">title CDATA #REQUIRED></p>
+<p class="code SchemaDtdAttlist">title CDATA #REQUIRED</p>></p>
 <p></p>
 <p class="ConfigMarkupElementDesc">
 The root element of a cheatsheet.</p>
@@ -30,7 +30,7 @@ The root element of a cheatsheet.</p>
 </ul>
 <br><p class="code SchemaDtd"><!ELEMENT <a name="e.intro">intro</a> (<a href="#e.description">description</a>)></p>
 <p class="code SchemaDtd"><!ATTLIST intro</p>
-<p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED<p class="code SchemaDtdAttlist">href      CDATA #IMPLIED></p>
+<p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">href      CDATA #IMPLIED</p>></p>
 <p></p>
 <p class="ConfigMarkupElementDesc">
 The <intro> element is used to define the introductory text to be displayed when the cheat sheet is opened.</p>
@@ -60,7 +60,7 @@ whitespace immediately before the <<b>/description</b>> tag.</p>
 <br><br>
 <p class="code SchemaDtd"><!ELEMENT <a name="e.item">item</a> (<a href="#e.description">description</a> , (<a href="#e.action">action</a> | <a href="#e.command">command</a> | <a href="#e.perform-when">perform-when</a> | (<a href="#e.subitem">subitem</a> | <a href="#e.conditional-subitem">conditional-subitem</a> | <a href="#e.repeated-subitem">repeated-subitem</a>)*) , <a href="#e.onCompletion">onCompletion</a>?)></p>
 <p class="code SchemaDtd"><!ATTLIST item</p>
-<p class="code SchemaDtdAttlist">title     CDATA #REQUIRED<p class="code SchemaDtdAttlist">dialog    (true | false) "false"<p class="code SchemaDtdAttlist">skip      (true | false) "false"<p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED<p class="code SchemaDtdAttlist">href      CDATA #IMPLIED></p>
+<p class="code SchemaDtdAttlist">title     CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">dialog    (true | false) "false"</p><p class="code SchemaDtdAttlist">skip      (true | false) "false"</p><p class="code SchemaDtdAttlist">contextId CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">href      CDATA #IMPLIED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <item> element describes one top-level step in a cheat sheet. An
@@ -95,9 +95,9 @@ based on cheat sheet variables whose value are acquired in earlier steps.</p></d
 <li><b>contextId</b> - The optional help context id of the documentation for this cheat sheet step. If supplied, context help for the given  fully-qualified context id is shown to the user (typically in a small pop-up window) when they clicks the step's help link. If this attribute is supplied, the <b>href</b> attribute should not be supplied (<b>href</b> will be ignored if both are present).</li>
 <li><b>href</b> - The optional help document describing this cheat sheet step. If supplied, this help document is shown to the user (typically in a help browser shown in a separate window) when they clicks the step's help link. If this attribute is supplied, the <b>contextId</b> attribute should not be supplied (<b>href</b> will be ignored if both are present).</li>
 </ul>
-<br><p class="code SchemaDtd"><!ELEMENT <a name="e.subitem">subitem</a> (<a href="#e.action">action</a> | <a href="#e.command">command</a> | <a href="#e.perform-when">perform-when</a>)?></p>
+<br><p class="code SchemaDtd"><!ELEMENT <a name="e.subitem">subitem</a> (<a href="#e.description">description</a>? , (<a href="#e.action">action</a> | <a href="#e.command">command</a> | <a href="#e.perform-when">perform-when</a>)?)></p>
 <p class="code SchemaDtd"><!ATTLIST subitem</p>
-<p class="code SchemaDtdAttlist">label CDATA #REQUIRED<p class="code SchemaDtdAttlist">skip  (true | false) "false"<p class="code SchemaDtdAttlist">when  CDATA #IMPLIED></p>
+<p class="code SchemaDtdAttlist">label CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">skip  (true | false) "false"</p><p class="code SchemaDtdAttlist">when  CDATA #IMPLIED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <subitem> element describes a sub-step in a cheat sheet. A <subitem>
@@ -114,7 +114,8 @@ that they have successfully completed the step.</p>
 given item can be performed in any order. All sub-items within an item have to
 be completed or skipped before progressing to the next item. (Which means
 actions that must be performed in a required sequence should not be represented
-as sub-items.)</p></div>
+as sub-items.)</p>
+<p>Since version 3.4 a description has been allowed in a subitem in place of the label attribute, which allows for formatting tags to be used.</p></div>
 <br>
 <ul class="ConfigMarkupAttlistDesc">
 <li><b>label</b> - The title of the cheat sheet sub-item. If the string
@@ -124,7 +125,9 @@ as sub-items.)</p></div>
     in the context of the execution of the cheat sheet, or the empty string for
     variables that are unbound. The values of the variables are as of the
     beginning of the execution of the main step (when the <item> element
-    is elaborated), rather than when the individual sub-step are run.</li>
+    is elaborated), rather than when the individual sub-step are run.
+    
+  A subitem may have either a label or a description element but not both. A description element may contain the formating tags such as <b>, </b> or <br/>.</li>
 <li><b>skip</b> - if "true" this sub-step can be
     skipped. The UI generally shows a button that the user can press to indicate
     that they are skipping this sub-step.</li>
@@ -135,7 +138,7 @@ as sub-items.)</p></div>
 </ul>
 <br><p class="code SchemaDtd"><!ELEMENT <a name="e.conditional-subitem">conditional-subitem</a> (<a href="#e.subitem">subitem</a>+)></p>
 <p class="code SchemaDtd"><!ATTLIST conditional-subitem</p>
-<p class="code SchemaDtdAttlist">condition CDATA #REQUIRED></p>
+<p class="code SchemaDtdAttlist">condition CDATA #REQUIRED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <conditional-subitem> element describes a single sub-step whose
@@ -171,7 +174,7 @@ equivalent to
 </ul>
 <br><p class="code SchemaDtd"><!ELEMENT <a name="e.repeated-subitem">repeated-subitem</a> (<a href="#e.subitem">subitem</a>)></p>
 <p class="code SchemaDtd"><!ATTLIST repeated-subitem</p>
-<p class="code SchemaDtdAttlist">values CDATA #REQUIRED></p>
+<p class="code SchemaDtdAttlist">values CDATA #REQUIRED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <repeated-subitem> element describes a sub-item that expands into
@@ -214,7 +217,7 @@ then the item expands to something equivalent to:
 </ul>
 <br><p class="code SchemaDtd"><!ELEMENT <a name="e.action">action</a> EMPTY></p>
 <p class="code SchemaDtd"><!ATTLIST action</p>
-<p class="code SchemaDtdAttlist">class     CDATA #REQUIRED<p class="code SchemaDtdAttlist">pluginId  CDATA #REQUIRED<p class="code SchemaDtdAttlist">paramN    CDATA #IMPLIED<p class="code SchemaDtdAttlist">confirm   (true | false) "false"<p class="code SchemaDtdAttlist">when      CDATA #IMPLIED<p class="code SchemaDtdAttlist">required  (true | false) "true"<p class="code SchemaDtdAttlist">translate CDATA #IMPLIED></p>
+<p class="code SchemaDtdAttlist">class     CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">pluginId  CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">paramN    CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">confirm   (true | false) "false"</p><p class="code SchemaDtdAttlist">when      CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">required  (true | false) "true"</p><p class="code SchemaDtdAttlist">translate CDATA #IMPLIED</p>></p>
 <p></p>
 <p class="ConfigMarkupElementDesc">
 Each <action> element describes an action in a cheat sheet.</p>
@@ -258,7 +261,7 @@ Examples:
 </ul>
 <br><p class="code SchemaDtd"><!ELEMENT <a name="e.command">command</a> EMPTY></p>
 <p class="code SchemaDtd"><!ATTLIST command</p>
-<p class="code SchemaDtdAttlist">serialization CDATA #REQUIRED<p class="code SchemaDtdAttlist">returns       CDATA #IMPLIED<p class="code SchemaDtdAttlist">confirm       (true | false) "false"<p class="code SchemaDtdAttlist">when          CDATA #IMPLIED<p class="code SchemaDtdAttlist">required      (true | false) "true"<p class="code SchemaDtdAttlist">translate     CDATA #IMPLIED></p>
+<p class="code SchemaDtdAttlist">serialization CDATA #REQUIRED</p><p class="code SchemaDtdAttlist">returns       CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">confirm       (true | false) "false"</p><p class="code SchemaDtdAttlist">when          CDATA #IMPLIED</p><p class="code SchemaDtdAttlist">required      (true | false) "true"</p><p class="code SchemaDtdAttlist">translate     CDATA #IMPLIED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <command> element describes an command in a cheat sheet.
@@ -309,7 +312,7 @@ the cheat sheet variable <i>var</i> at the time this step was completed.</p>
 <br><br>
 <p class="code SchemaDtd"><!ELEMENT <a name="e.perform-when">perform-when</a> (<a href="#e.action">action</a> | <a href="#e.command">command</a>)+></p>
 <p class="code SchemaDtd"><!ATTLIST perform-when</p>
-<p class="code SchemaDtdAttlist">condition CDATA #REQUIRED></p>
+<p class="code SchemaDtdAttlist">condition CDATA #REQUIRED</p>></p>
 <p></p>
 <div class="ConfigMarkupElementDesc">
 <p>Each <perform-when> element describes an action in a cheat sheet.
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatsheetSearchParticipant.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatsheetSearchParticipant.java
index 8ab1ae9..a1903ca 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatsheetSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/CheatsheetSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@ import java.util.Set;
 
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.Platform;
-import org.eclipse.help.search.XMLSearchParticipant;
+import org.eclipse.help.search.SearchParticipantXML;
 import org.eclipse.jface.action.Action;
 import org.eclipse.ui.cheatsheets.OpenCheatSheetAction;
 import org.eclipse.ui.internal.cheatsheets.composite.parser.ICompositeCheatsheetTags;
@@ -23,7 +23,7 @@ import org.eclipse.ui.internal.cheatsheets.data.IParserTags;
 import org.eclipse.ui.internal.cheatsheets.registry.CheatSheetRegistryReader;
 import org.xml.sax.Attributes;
 
-public class CheatsheetSearchParticipant extends XMLSearchParticipant {
+public class CheatsheetSearchParticipant extends SearchParticipantXML {
 	private static final String INTRO_DESC = "cheatsheet/intro/description"; //$NON-NLS-1$
 
 	private static final String ITEM_DESC = "cheatsheet/item/description"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
index e504a4f..88fd3d7 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2002, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2002, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.ui.internal.cheatsheets.data;
@@ -394,6 +394,19 @@ public class CheatSheetParser implements IStatusContainer {
 			throw new CheatSheetParserException(message);
 		}
 	}
+	
+	private void handleSubItemDescription(SubItem subItem, Node startNode) throws CheatSheetParserException {
+		Assert.isNotNull(subItem);
+		Assert.isNotNull(startNode);
+
+		Node descriptionNode = findNode(startNode, IParserTags.DESCRIPTION);
+		
+		if(descriptionNode != null) {
+			String text = handleMarkedUpText(descriptionNode, startNode, IParserTags.DESCRIPTION);
+			subItem.setLabel(text);
+			subItem.setFormatted(true);
+		} 
+	}
 
 	private String handleMarkedUpText(Node nodeContainingText, Node startNode, String nodeName ) {
 		NodeList nodes = nodeContainingText.getChildNodes();	
@@ -781,8 +794,6 @@ public class CheatSheetParser implements IStatusContainer {
 		Assert.isTrue(subItemNode.getNodeName().equals(IParserTags.SUBITEM));
 
 		SubItem subItem = new SubItem();
-
-		handleSubItemAttributes(subItem, subItemNode);
 		
 		IncompatibleSiblingChecker checker = new IncompatibleSiblingChecker(this, subItemNode);
 
@@ -797,6 +808,15 @@ public class CheatSheetParser implements IStatusContainer {
 				handleExecutable(subItem, node, new CheatSheetCommand());
 			} else if(node.getNodeName().equals(IParserTags.PERFORMWHEN)) {
 				handlePerformWhen(subItem, node);
+			} else if (node.getNodeName().equals(IParserTags.DESCRIPTION)) {
+				if (subItem.isFormatted()) {
+					String message = NLS.bind(
+							Messages.ERROR_PARSING_MULTIPLE_DESCRIPTION,
+							(new Object[] { node.getNodeName() }));
+					addStatus(IStatus.ERROR, message, null);
+				} else {
+					handleSubItemDescription(subItem, node);
+				}
 			} else {
 				if(node.getNodeType() != Node.TEXT_NODE && node.getNodeType() != Node.COMMENT_NODE ) {
 					String message = NLS.bind(Messages.WARNING_PARSING_UNKNOWN_ELEMENT, (new Object[] {node.getNodeName(), subItemNode.getNodeName()}));
@@ -804,6 +824,7 @@ public class CheatSheetParser implements IStatusContainer {
 				}
 			}
 		}
+		handleSubItemAttributes(subItem, subItemNode);
 		item.addSubItem(subItem);
 	}
 
@@ -811,8 +832,6 @@ public class CheatSheetParser implements IStatusContainer {
 		Assert.isNotNull(subItem);
 		Assert.isNotNull(subItemNode);
 
-		boolean label = false;
-
 		NamedNodeMap attributes = subItemNode.getAttributes();
 		if (attributes != null) {
 			for (int x = 0; x < attributes.getLength(); x++) {
@@ -822,7 +841,6 @@ public class CheatSheetParser implements IStatusContainer {
 					continue;
 
 				if (attributeName.equals(IParserTags.LABEL)) {
-					label = true;
 					subItem.setLabel(attribute.getNodeValue());
 				} else if (attributeName.equals(IParserTags.SKIP)) {
 					subItem.setSkip(attribute.getNodeValue().equals(TRUE_STRING));
@@ -835,7 +853,7 @@ public class CheatSheetParser implements IStatusContainer {
 			}
 		}
 
-		if(!label) {
+		if(subItem.getLabel() == null) {
 			String message = NLS.bind(Messages.ERROR_PARSING_NO_LABEL, (new Object[] {subItemNode.getNodeName()}));
 			throw new CheatSheetParserException(message);
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/SubItem.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/SubItem.java
index f513039..ab4fcaa 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/SubItem.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/SubItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others.
+ * Copyright (c) 2002, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,8 +13,9 @@ package org.eclipse.ui.internal.cheatsheets.data;
 public class SubItem extends AbstractSubItem implements IExecutableItem, IPerformWhenItem {
 	
 	private String label;
-	private boolean skip;
+	private boolean skip = false;
 	private String when;
+	private boolean formatted = false;
 
 	private AbstractExecutable executable;
 	private PerformWhen performWhen;
@@ -98,4 +99,12 @@ public class SubItem extends AbstractSubItem implements IExecutableItem, IPerfor
 	public void setPerformWhen(PerformWhen performWhen) {
 		this.performWhen = performWhen;
 	}
+
+	public void setFormatted(boolean formatted) {
+		this.formatted = formatted;
+	}
+
+	public boolean isFormatted() {
+		return formatted;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
index 1e9c318..2e971cd 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2002, 2008 IBM Corporation and others.
+ *  Copyright (c) 2002, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -54,12 +54,12 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.activities.ITriggerPoint;
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.cheatsheets.OpenCheatSheetAction;
+import org.eclipse.ui.forms.widgets.ScrolledFormText;
 import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin;
 import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
 import org.eclipse.ui.internal.cheatsheets.Messages;
@@ -88,7 +88,7 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
 
 	private TreeViewer treeViewer;
 
-	private Text desc;
+	private ScrolledFormText desc;
 
 	private Button showAllButton;
 	
@@ -284,8 +284,7 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
 		treeViewer.addSelectionChangedListener(this);
 		treeViewer.setInput(cheatsheetCategories);
 
-		desc = new Text(sform, SWT.MULTI | SWT.WRAP);
-		desc.setEditable(false);
+		desc = new ScrolledFormText(sform, true);
 
 		sform.setWeights(new int[] {10, 2});
 		
@@ -531,11 +530,14 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
 			currentSelection = (CheatSheetElement) obj;
 		}
 
+		String description; 
 		if (currentSelection != null) {
-			desc.setText(currentSelection.getDescription());
-		} else {
-			desc.setText(""); //$NON-NLS-1$
+			description = currentSelection.getDescription();
+		} else {	
+			description = ""; //$NON-NLS-1$
 		}
+		desc.getFormText().setText(description, false, false);
+		desc.reflow(true);
 		setOkButton();
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
index 8bea4bf..3bafaa6 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/registry/CheatSheetRegistryReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * Copyright (c) 2002, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -169,7 +169,8 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 	private final String csItemExtension = "cheatSheetItemExtension"; //$NON-NLS-1$
 	protected Map taskExplorers = new HashMap();
 	protected Map taskEditors = new HashMap();
-
+	private Map nestedCategoryIds = new HashMap();
+	
 	/**
 	 *	Create an instance of this class.
 	 */
@@ -355,6 +356,7 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 
 		// Traverse down into parent category.	
 		if (categoryPath != null) {
+			nestedCategoryIds.put(category.getId(), category);
 			for (int i = 0; i < categoryPath.length; i++) {
 				CheatSheetCollectionElement tempElement = getChildWithID(parent, categoryPath[i]);
 				if (tempElement == null) {
@@ -372,8 +374,13 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 		if (test != null)
 			return;
 
-		if (parent != null)
-			createCollectionElement(parent, category.getPluginId(), category.getId(), category.getLabel());
+		if (parent != null) {
+			CheatSheetCollectionElement collectionElement = 
+				createCollectionElement(parent, category.getPluginId(), category.getId(), category.getLabel());
+			if (categoryPath != null) {
+				nestedCategoryIds.put(category.getId(), collectionElement);
+			}
+		}
 	}
 
 	/**
@@ -386,7 +393,8 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 	 */
 	private void finishCheatSheet(CheatSheetElement element, IConfigurationElement config, CheatSheetCollectionElement result) {
 		CheatSheetCollectionElement currentResult = (CheatSheetCollectionElement) result;
-		StringTokenizer familyTokenizer = new StringTokenizer(getCategoryStringFor(config), CATEGORY_SEPARATOR);
+		String category = getCategoryStringFor(config);
+		StringTokenizer familyTokenizer = new StringTokenizer(category, CATEGORY_SEPARATOR);
 
 		// use the period-separated sections of the current CheatSheet's category
 		// to traverse through the NamedSolution "tree" that was previously created
@@ -396,17 +404,24 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 		while (familyTokenizer.hasMoreElements()) {
 			CheatSheetCollectionElement tempCollectionElement = getChildWithID(currentCollectionElement, familyTokenizer.nextToken());
 
-			if (tempCollectionElement == null) { // can't find the path; bump it to uncategorized
+			if (tempCollectionElement == null) { // can't find the path; look for a simple path
+
 				moveToOther = true;
 				break;
 			}
 			currentCollectionElement = tempCollectionElement;
 		}
 
-		if (moveToOther)
-			moveElementToUncategorizedCategory(currentResult, element);
-		else
+		if (moveToOther) {
+			if (nestedCategoryIds.containsKey(category)) {
+				currentCollectionElement = (CheatSheetCollectionElement) nestedCategoryIds.get(category);
+				currentCollectionElement.add(element);
+			} else {
+			    moveElementToUncategorizedCategory(currentResult, element);
+			}
+		} else {
 			currentCollectionElement.add(element);
+		}
 	}
 
 	/**
@@ -422,6 +437,7 @@ public class CheatSheetRegistryReader extends RegistryReader implements IRegistr
 			}
 			deferCheatSheets = null;
 		}
+		nestedCategoryIds = null;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
index bf48108..717e42a 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2002, 2008 IBM Corporation and others.
+ *  Copyright (c) 2002, 2009 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tom Hofmann, Perspectix AG - https://bugs.eclipse.org/bugs/show_bug.cgi?id=291750
  *******************************************************************************/
 package org.eclipse.ui.internal.cheatsheets.views;
 
@@ -1036,12 +1037,21 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
 		link.setCursor(busyCursor);
 		currentItem = (ViewItem) link.getData();
 		CoreItem coreItem = (CoreItem) currentItem;
+		Page page= currentPage;
 
 		if (coreItem != null) {
 			try {
 				hookDialogListener();
 				dialogReturnCode = -1;
 				IStatus status = coreItem.runExecutable(getManager());
+				if ( status.getSeverity() == IStatus.ERROR) {
+					CheatSheetPlugin.getPlugin().getLog().log(status);
+					org.eclipse.jface.dialogs.ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), null, null, status);								
+				}
+				if (page != currentPage) {
+					// action closed the cheatsheet view or changed the cheatsheet
+					return;
+				}
 				if (status.isOK() && dialogReturnCode != Window.CANCEL) {
 					coreItem.setRestartImage();
 					if (!coreItem.hasConfirm()) {
@@ -1050,10 +1060,6 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
 					    saveCurrentSheet();
 					}
 				}
-				if ( status.getSeverity() == IStatus.ERROR) {
-					CheatSheetPlugin.getPlugin().getLog().log(status);
-				    org.eclipse.jface.dialogs.ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), null, null, status);								
-				}
 			}
 			finally {
 				unhookDialogListener();
diff --git a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CoreItem.java b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CoreItem.java
index 8806634..40b56a3 100644
--- a/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CoreItem.java
+++ b/eclipse/plugins/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CoreItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2007 IBM Corporation and others.
+ * Copyright (c) 2002, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -147,13 +147,22 @@ public class CoreItem extends ViewItem {
 		} else {
 			labelText = sub.getLabel();
 		}
-		Text subitemLabel = new Text(buttonComposite, SWT.READ_ONLY + SWT.WRAP);
-		subitemLabel.setText(labelText);
+		Control subItemLabel;
+		if (sub.isFormatted()) {
+			FormText formText = page.getToolkit().createFormText(buttonComposite, false);
+			formText.setText(labelText, labelText.startsWith(IParserTags.FORM_START_TAG), false);
+			formText.setBackground(itemColor);
+			subItemLabel = formText;
+		} else { 
+			Text text = new Text(buttonComposite, SWT.READ_ONLY + SWT.WRAP);
+			text.setText(labelText);
+			text.setBackground(itemColor);
+			subItemLabel = text;
+		}
 		TableWrapData labelData = new TableWrapData();
 		labelData.indent = LABEL_MARGIN;
-		subitemLabel.setLayoutData(labelData);
-		subitemLabel.setBackground(itemColor);
-		holder.setSubitemLabel(subitemLabel);
+		subItemLabel.setLayoutData(labelData);
+		holder.setSubitemLabel(subItemLabel);
 		added++;
 		
 		// Add some space to the right of the label
diff --git a/eclipse/plugins/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
index 18bbf9a..1b13459 100644
--- a/eclipse/plugins/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.cocoa/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.ui.cocoa;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.0.2.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)"
 Bundle-Localization: fragment-cocoa
diff --git a/eclipse/plugins/org.eclipse.ui.cocoa/fragment-cocoa.properties b/eclipse/plugins/org.eclipse.ui.cocoa/fragment-cocoa.properties
index 62d5ce9..3349f7c 100644
--- a/eclipse/plugins/org.eclipse.ui.cocoa/fragment-cocoa.properties
+++ b/eclipse/plugins/org.eclipse.ui.cocoa/fragment-cocoa.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008 Adobe Systems, Inc. and others.
+# Copyright (c) 2008, 2009 Adobe Systems, Inc. and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,3 +12,6 @@
 
 providerName=Eclipse.org
 fragmentName=Eclipse UI MacOS X Enhancements
+
+command.closeDialog.name=Close Dialog
+command.closeDialog.desc=Closes the active Dialog
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.cocoa/fragment.xml b/eclipse/plugins/org.eclipse.ui.cocoa/fragment.xml
index 69babfe..dfa8a73 100644
--- a/eclipse/plugins/org.eclipse.ui.cocoa/fragment.xml
+++ b/eclipse/plugins/org.eclipse.ui.cocoa/fragment.xml
@@ -8,5 +8,31 @@
             class="org.eclipse.ui.internal.cocoa.CocoaUIEnhancer">
       </startup>
    </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            categoryId="org.eclipse.ui.category.window"
+            description="%command.closeDialog.desc"
+            id="org.eclipse.ui.cocoa.closeDialog"
+            name="%command.closeDialog.name">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.ui.internal.cocoa.CloseDialogHandler"
+            commandId="org.eclipse.ui.cocoa.closeDialog">
+      </handler>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.eclipse.ui.cocoa.closeDialog"
+            contextId="org.eclipse.ui.contexts.dialog"
+            platform="cocoa"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+W">
+      </key>
+   </extension>
    
 </fragment>
diff --git a/eclipse/plugins/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java b/eclipse/plugins/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java
new file mode 100644
index 0000000..c206a6a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.cocoa/src/org/eclipse/ui/internal/cocoa/CloseDialogHandler.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.cocoa;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * 
+ * @since 3.6 
+ *
+ */
+public class CloseDialogHandler extends AbstractHandler implements IHandler {
+
+	public Object execute(ExecutionEvent event) {
+		
+		Shell activeShell = Display.getDefault().getActiveShell();
+		// perform only if shell is available & close is enabled
+		if (activeShell != null && (activeShell.getStyle() & SWT.CLOSE) != 0) {
+			activeShell.close();
+		}
+		
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.console/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ui.console/.settings/org.eclipse.pde.prefs
index be21c5d..cc55146 100644
--- a/eclipse/plugins/org.eclipse.ui.console/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.ui.console/.settings/org.eclipse.pde.prefs
@@ -1,17 +1,29 @@
-#Tue Jan 30 11:39:21 CST 2007
+#Mon Dec 14 12:09:13 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
 compilers.p.illegal-att-value=0
+compilers.p.internal=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=1
 compilers.p.unknown-attribute=0
 compilers.p.unknown-class=1
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
 compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ui.console/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.console/META-INF/MANIFEST.MF
index dbf3349..55ce437 100644
--- a/eclipse/plugins/org.eclipse.ui.console/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.console/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.console; singleton:=true
-Bundle-Version: 3.4.0.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Activator: org.eclipse.ui.console.ConsolePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.ui.console/build.properties b/eclipse/plugins/org.eclipse.ui.console/build.properties
index 2a484ec..cad430c 100644
--- a/eclipse/plugins/org.eclipse.ui.console/build.properties
+++ b/eclipse/plugins/org.eclipse.ui.console/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -18,3 +18,4 @@ bin.includes = icons/,\
 source.. src/
 src.includes = about.html,\
                schema/
+output.. = bin/
diff --git a/eclipse/plugins/org.eclipse.ui.console/plugin.xml b/eclipse/plugins/org.eclipse.ui.console/plugin.xml
index ca30ab1..6fd8a38 100644
--- a/eclipse/plugins/org.eclipse.ui.console/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.console/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd b/eclipse/plugins/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd
index 5cb81e0..29c0ee6 100644
--- a/eclipse/plugins/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd
+++ b/eclipse/plugins/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd
@@ -104,7 +104,7 @@
          The following is an example of a console pattern match listener extension point: 
 <pre>
    <extension
-         point="org.eclipse.ui.console.consolePatternMatchListener">
+         point="org.eclipse.ui.console.consolePatternMatchListeners">
       <consolePatternMatchListener
             class="com.example.ExampleConsolePatternMatcher"
             id="com.example.ExampleConsolePatternMatcher"
diff --git a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
index 9aa4199..b9f3071 100644
--- a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
+++ b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsole.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -90,7 +90,23 @@ public class MessageConsole extends IOConsole {
      * @since 3.4
      */
 	public MessageConsole(String name, String consoleType, ImageDescriptor imageDescriptor, boolean autoLifecycle) {
-		super(name, consoleType, imageDescriptor, autoLifecycle);
+		this(name, consoleType, imageDescriptor, null, autoLifecycle);
+	}
+	
+    /**
+     * Constructs a message console with the given name, type, image, encoding, and lifecycle specification.
+     * 
+     * @param name the name to display for this console
+     * @param consoleType console type identifier or <code>null</code>
+     * @param imageDescriptor console image descriptor or <code>null</code>
+     * @param encoding the encoding that should be used to render the text, or <code>null</code>
+     * 	if the system default encoding should be used
+     * @param autoLifecycle whether lifecycle methods should be called automatically
+	 *  when added and removed from the console manager
+	 * @since 3.5
+     */
+	public MessageConsole(String name, String consoleType, ImageDescriptor imageDescriptor, String encoding, boolean autoLifecycle) {
+		super(name, consoleType, imageDescriptor, encoding, autoLifecycle);
 	}
 		
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index df883e2..aea898a 100644
--- a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,6 +43,7 @@ import org.eclipse.ui.console.IConsolePageParticipant;
 import org.eclipse.ui.console.IConsoleView;
 import org.eclipse.ui.console.IPatternMatchListener;
 import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.progress.UIJob;
 import org.eclipse.ui.progress.WorkbenchJob;
 
 /**
@@ -211,18 +212,20 @@ public class ConsoleManager implements IConsoleManager {
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.console.IConsoleManager#addConsoles(org.eclipse.ui.console.IConsole[])
 	 */
-	public synchronized void addConsoles(IConsole[] consoles) {
+	public void addConsoles(IConsole[] consoles) {
 		List added = new ArrayList(consoles.length);
-		for (int i = 0; i < consoles.length; i++) {
-		    IConsole console = consoles[i];
-		    if(console instanceof TextConsole) {
-		        TextConsole ioconsole = (TextConsole)console;
-		        createPatternMatchListeners(ioconsole);
-		    }
-			if (!fConsoles.contains(console)) {
-				fConsoles.add(console);
-				added.add(console);
-			}
+		synchronized (fConsoles) {
+			for (int i = 0; i < consoles.length; i++) {
+			    IConsole console = consoles[i];
+			    if(console instanceof TextConsole) {
+			        TextConsole ioconsole = (TextConsole)console;
+			        createPatternMatchListeners(ioconsole);
+			    }
+				if (!fConsoles.contains(console)) {
+					fConsoles.add(console);
+					added.add(console);
+				}
+			}			
 		}
 		if (!added.isEmpty()) {
 			fireUpdate((IConsole[])added.toArray(new IConsole[added.size()]), ADDED);
@@ -232,12 +235,14 @@ public class ConsoleManager implements IConsoleManager {
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.console.IConsoleManager#removeConsoles(org.eclipse.ui.console.IConsole[])
 	 */
-	public synchronized void removeConsoles(IConsole[] consoles) {
+	public void removeConsoles(IConsole[] consoles) {
 		List removed = new ArrayList(consoles.length);
-		for (int i = 0; i < consoles.length; i++) {
-			IConsole console = consoles[i];
-			if (fConsoles.remove(console)) {
-				removed.add(console);
+		synchronized (fConsoles) {
+			for (int i = 0; i < consoles.length; i++) {
+				IConsole console = consoles[i];
+				if (fConsoles.remove(console)) {
+					removed.add(console);
+				}
 			}
 		}
 		if (!removed.isEmpty()) {
@@ -248,8 +253,10 @@ public class ConsoleManager implements IConsoleManager {
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.console.IConsoleManager#getConsoles()
 	 */
-	public synchronized IConsole[] getConsoles() {
-		return (IConsole[])fConsoles.toArray(new IConsole[fConsoles.size()]);
+	public IConsole[] getConsoles() {
+		synchronized (fConsoles) {
+			return (IConsole[])fConsoles.toArray(new IConsole[fConsoles.size()]);	
+		}
 	}
 
 	/**
@@ -350,8 +357,8 @@ public class ConsoleManager implements IConsoleManager {
 	public void warnOfContentChange(final IConsole console) {
 		if (!fWarnQueued) {
 			fWarnQueued = true;
-			ConsolePlugin.getStandardDisplay().asyncExec(new Runnable(){
-				public void run() {
+			Job job = new UIJob(ConsolePlugin.getStandardDisplay(), ConsoleMessages.ConsoleManager_consoleContentChangeJob) {
+				public IStatus runInUIThread(IProgressMonitor monitor) {
 					IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
 					if (window != null) {
 						IWorkbenchPage page= window.getActivePage();
@@ -363,8 +370,11 @@ public class ConsoleManager implements IConsoleManager {
 						} 
 					}	
 					fWarnQueued = false;
-				}			
-			});
+					return Status.OK_STATUS;
+				}
+			};
+			job.setSystem(true);
+			job.schedule();
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
index eaf17b1..e6212af 100644
--- a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,6 +22,8 @@ public class ConsoleMessages extends NLS {
 
 	public static String ConsoleManager_0;
 
+	public static String ConsoleManager_consoleContentChangeJob;
+
 	public static String ConsoleView_0;
 
 	public static String PinConsoleAction_0;
diff --git a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
index 3d835a4..d873a37 100644
--- a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ ConsoleDropDownAction_0=Select Console
 ConsoleDropDownAction_1=Display Selected Console
 
 ConsoleManager_0=An exception occurred during console notification
+ConsoleManager_consoleContentChangeJob=Console content change
 
 ConsoleView_0=No consoles to display at this time.
 
diff --git a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
index 3289a1b..31c8678 100644
--- a/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
+++ b/eclipse/plugins/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -479,15 +479,17 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL
 				tb.addMouseListener(new MouseAdapter() {
 					public void mouseDown(MouseEvent e) {
 						ToolItem ti= tb.getItem(new Point(e.x, e.y));
-						if (ti.getData() instanceof ActionContributionItem) {
-							ActionContributionItem actionContributionItem= (ActionContributionItem) ti.getData();
-							IAction action= actionContributionItem.getAction();
-							if (action == fOpenConsoleAction) {
-								Event event= new Event();
-								event.widget= ti;
-								event.x= e.x;
-								event.y= e.y;
-								action.runWithEvent(event);
+						if (ti != null) {
+							if (ti.getData() instanceof ActionContributionItem) {
+								ActionContributionItem actionContributionItem= (ActionContributionItem) ti.getData();
+								IAction action= actionContributionItem.getAction();
+								if (action == fOpenConsoleAction) {
+									Event event= new Event();
+									event.widget= ti;
+									event.x= e.x;
+									event.y= e.y;
+									action.runWithEvent(event);
+								}
 							}
 						}
 					}
diff --git a/eclipse/plugins/org.eclipse.ui.editors/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.editors/META-INF/MANIFEST.MF
index 7709861..97511c1 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.editors/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.editors; singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: org.eclipse.ui.internal.editors.text.EditorsPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
@@ -19,7 +19,7 @@ Require-Bundle:
  org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.core.filebuffers;visibility:=reexport;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)"
diff --git a/eclipse/plugins/org.eclipse.ui.editors/plugin.properties b/eclipse/plugins/org.eclipse.ui.editors/plugin.properties
index db3367f..4ecdba4 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.editors/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -111,6 +111,9 @@ command.revisions.idToggle.description = Toggles the display of the revision id
 command.showChangeRulerInformation.name = Show Quick Diff Ruler Tooltip
 command.showChangeRulerInformation.description = Displays quick diff or revision information for the caret line in a focused hover
 
+command.showRulerAnnotationInformation.name = Show Ruler Annotation Tooltip
+command.showRulerAnnotationInformation.description = Displays annotation information for the caret line in a focused hover
+
 conversionActionSet.label= Convert Line Delimiters
 conversionSubMenu.label= Con&vert Line Delimiters To
 
diff --git a/eclipse/plugins/org.eclipse.ui.editors/plugin.xml b/eclipse/plugins/org.eclipse.ui.editors/plugin.xml
index 082b347..1037677 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.editors/plugin.xml
@@ -135,6 +135,12 @@
 	        categoryId="org.eclipse.ui.category.textEditor"
             id="org.eclipse.ui.edit.text.showChangeRulerInformation">
       </command>
+      <command
+            name="%command.showRulerAnnotationInformation.name"
+            description="%command.showRulerAnnotationInformation.description"
+	        categoryId="org.eclipse.ui.category.textEditor"
+            id="org.eclipse.ui.edit.text.showRulerAnnotationInformation">
+      </command>
    </extension>
    
    <extension
diff --git a/eclipse/plugins/org.eclipse.ui.editors/schema/templates.exsd b/eclipse/plugins/org.eclipse.ui.editors/schema/templates.exsd
index e5e6c92..c4b8863 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/schema/templates.exsd
+++ b/eclipse/plugins/org.eclipse.ui.editors/schema/templates.exsd
@@ -259,7 +259,16 @@
          <attribute name="file" type="string" use="required">
             <annotation>
                <documentation>
-                  the XML file to import templates from
+                  the XML file to import templates from. It defines at least one &lt;template&gt; element inside &lt;templates&gt;...&lt;/templates&gt;, with the following attributes:
+<ul>
+	<li>id - the uniqe id</li>
+	<li>name - the name</li>
+	<li>context - the context id</li>
+	<li>description - the description (optional, default: "")</li>
+	<li>autoinsert (optional, default: true)</li>
+	<li>enabled (optional, default: true)</li>
+</ul>
+See above template element for more details about those attributes.
                </documentation>
                <appInfo>
                   <meta.attribute kind="resource"/>
@@ -376,7 +385,7 @@ then the translations must go into:
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2001, 2009 IBM Corporation and others.<br>
+         Copyright (c) 2001, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
       </documentation>
    </annotation>
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationAction.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationAction.java
index a6dc509..afc28fe 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationAction.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -185,7 +185,7 @@ public class FileBufferOperationAction extends Action implements IWorkbenchWindo
 							FileBufferOperationRunner runner= new FileBufferOperationRunner(FileBuffers.getTextFileBufferManager(), getShell());
 							runner.execute(locations, fileBufferOperation, new SubProgressMonitor(monitor, ticks));
 						}
-						status= new Status(IStatus.OK, EditorsUI.PLUGIN_ID, IStatus.OK, "", null);  //$NON-NLS-1$
+						status= Status.OK_STATUS;
 					} finally {
 						monitor.done();
 					}
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationHandler.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationHandler.java
index 6b8e323..7cc261c 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationHandler.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileBufferOperationHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -207,7 +207,7 @@ public class FileBufferOperationHandler extends AbstractHandler {
 							FileBufferOperationRunner runner= new FileBufferOperationRunner(FileBuffers.getTextFileBufferManager(), getShell());
 							runner.execute(locations, fileBufferOperation, new SubProgressMonitor(monitor, ticks));
 						}
-						status= new Status(IStatus.OK, EditorsUI.PLUGIN_ID, IStatus.OK, "", null);  //$NON-NLS-1$
+						status= Status.OK_STATUS;
 					} finally {
 						monitor.done();
 					}
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
index 568fe75..934d5c9 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -409,7 +409,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
 				/*
 				 * XXX:
 				 * This is a workaround for a corresponding bug in Java readers and writer,
-				 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+				 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 				 */
 				if (removeBOM) {
 					int n= 0;
@@ -612,7 +612,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
 			/*
 			 * XXX:
 			 * This is a workaround for a corresponding bug in Java readers and writer,
-			 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+			 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 			 */
 			if (info != null && info.fBOM == IContentDescription.BOM_UTF_8 && CHARSET_UTF_8.equals(encoding))
 				stream= new SequenceInputStream(new ByteArrayInputStream(IContentDescription.BOM_UTF_8), stream);
@@ -876,7 +876,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
 	protected void handleElementMoved(IFileEditorInput fileEditorInput, IPath path) {
 		IWorkspace workspace= ResourcesPlugin.getWorkspace();
 		IFile newFile= workspace.getRoot().getFile(path);
-		fireElementMoved(fileEditorInput, newFile == null ? null : new FileEditorInput(newFile));
+		fireElementMoved(fileEditorInput, new FileEditorInput(newFile));
 	}
 
 	/**
@@ -1204,7 +1204,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
 	 * <p>
 	 * XXX:
 	 * This is a workaround for a corresponding bug in Java readers and writer,
-	 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+	 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 	 * </p>
 	 * @param file the file
 	 * @param encoding the encoding
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
index 083350c..1f49ae5 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,40 +29,48 @@ public interface ITextEditorHelpContextIds extends IAbstractTextEditorHelpContex
 	 * Id for the text editor preference page.
 	 * Value: <code>"org.eclipse.ui.text_editor_preference_page_context"</code>.
 	 */
-	public static final String TEXT_EDITOR_PREFERENCE_PAGE= PREFIX + "text_editor_preference_page_context"; //$NON-NLS-1$
+	String TEXT_EDITOR_PREFERENCE_PAGE= PREFIX + "text_editor_preference_page_context"; //$NON-NLS-1$
 
 	/**
 	 * Help context id for the Spelling preference page.
 	 * Value: <code>"org.eclipse.ui.spelling_preference_page_context"</code>.
 	 * @since 3.4
 	 */
-	public static final String SPELLING_PREFERENCE_PAGE= PREFIX + "spelling_preference_page_context"; //$NON-NLS-1$
+	String SPELLING_PREFERENCE_PAGE= PREFIX + "spelling_preference_page_context"; //$NON-NLS-1$
 
 
 	/**
 	 * Id for the text editor.
 	 * Value: <code>"org.eclipse.ui.text_editor_context"</code>.
 	 */
-	public static final String TEXT_EDITOR= PREFIX + "text_editor_context"; //$NON-NLS-1$
+	String TEXT_EDITOR= PREFIX + "text_editor_context"; //$NON-NLS-1$
 
 	/**
 	 * Help context id for the "Add Bookmark" action.
 	 * Value: <code>"org.eclipse.ui.bookmark_action_context"</code>
 	 * @since 3.0
 	 */
-	public static final String BOOKMARK_ACTION= PREFIX + IDEActionFactory.BOOKMARK.getId() + ACTION_POSTFIX;
+	String BOOKMARK_ACTION= PREFIX + IDEActionFactory.BOOKMARK.getId() + ACTION_POSTFIX;
 
 	/**
 	 * Help context id for the Add Task action.
 	 * Value: <code>"org.eclipse.ui.addTask_action_context"</code>
 	 * @since 3.0
 	 */
-	public static final String ADD_TASK_ACTION= PREFIX + IDEActionFactory.ADD_TASK.getId() + ACTION_POSTFIX;
+	String ADD_TASK_ACTION= PREFIX + IDEActionFactory.ADD_TASK.getId() + ACTION_POSTFIX;
 
 	/**
 	 * Help context id for the "Change Encoding..." action.
 	 * Value: <code>"org.eclipse.ui.ChangeEncoding_action_context"</code>
 	 * @since 3.1
 	 */
-	public static final String CHANGE_ENCODING= PREFIX + ITextEditorActionConstants.CHANGE_ENCODING  + ACTION_POSTFIX;
+	String CHANGE_ENCODING= PREFIX + ITextEditorActionConstants.CHANGE_ENCODING + ACTION_POSTFIX;
+
+	/**
+	 * Id for the text editor preference page. Value:
+	 * <code>"org.eclipse.ui.accessibility_preference_page_context"</code>.
+	 * @since 3.6
+	 */
+	String ACCESSIBILITY_PREFERENCE_PAGE= PREFIX + "accessibility_preference_page_context"; //$NON-NLS-1$
+	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
index 5b59270..a8895cb 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -30,15 +30,15 @@ import org.eclipse.ui.texteditor.spelling.SpellingService;
 
 
 /**
- * The standard text editor for file resources (<code>IFile</code>).
+ * The standard/default text editor.
  * <p>
- * This editor has id <code>"org.eclipse.ui.DefaultTextEditor"</code>.
- * The editor's context menu has id <code>#TextEditorContext</code>.
- * The editor's ruler context menu has id <code>#TextRulerContext</code>.
+ * This editor has id "{@link EditorsUI#DEFAULT_TEXT_EDITOR_ID org.eclipse.ui.DefaultTextEditor}".
+ * The editor's context menu has id <code>#TextEditorContext</code>. The editor's ruler context menu
+ * has id <code>#TextRulerContext</code>.
  * </p>
  * <p>
- * The workbench will automatically instantiate this class when the default
- * editor is needed for a workbench window.
+ * The workbench will automatically instantiate this class when the default editor is needed for a
+ * workbench window.
  * </p>
  */
 public class TextEditor extends AbstractDecoratedTextEditor {
@@ -52,10 +52,13 @@ public class TextEditor extends AbstractDecoratedTextEditor {
 
 	/**
 	 * Creates a new text editor.
+	 * 
+	 * @see #initializeEditor()
+	 * @see #initializeKeyBindingScopes()
 	 */
 	public TextEditor() {
 		if (getSourceViewerConfiguration() == null) {
-			// configuration not yet set by subclass
+			// Configuration not yet set by subclass in initializeEditor()
 			setSourceViewerConfiguration(new TextSourceViewerConfiguration(getPreferenceStore()));
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
index bcb9c9b..ced7719 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
@@ -312,7 +312,7 @@ public class TextFileDocumentProvider implements IDocumentProvider, IDocumentPro
 		public void underlyingFileMoved(IFileBuffer file, IPath newLocation) {
 			IWorkspace workspace=ResourcesPlugin.getWorkspace();
 			IFile newFile= workspace.getRoot().getFile(newLocation);
-			IEditorInput input= newFile == null ? null : new FileEditorInput(newFile);
+			IEditorInput input= new FileEditorInput(newFile);
 			List list= new ArrayList(fElementStateListeners);
 			Iterator e= list.iterator();
 			while (e.hasNext()) {
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextSourceViewerConfiguration.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextSourceViewerConfiguration.java
index 3739068..ae398b7 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextSourceViewerConfiguration.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextSourceViewerConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,8 +13,8 @@ package org.eclipse.ui.editors.text;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.StringTokenizer;
 import java.util.Map.Entry;
+import java.util.StringTokenizer;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.RGB;
@@ -275,7 +275,7 @@ public class TextSourceViewerConfiguration extends SourceViewerConfiguration {
 	 */
 	protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
 		Map targets= new HashMap();
-		targets.put("org.eclipse.ui.DefaultTextEditor", null); //$NON-NLS-1$
+		targets.put(EditorsUI.DEFAULT_TEXT_EDITOR_ID, null);
 		return targets;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
index aa79938..bc84f2a 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -415,7 +415,7 @@ public class LastSaveReferenceProvider implements IQuickDiffReferenceProvider, I
 	 * <p>
 	 * XXX:
 	 * This is a workaround for a corresponding bug in Java readers and writer,
-	 * see: http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
+	 * see http://developer.java.sun.com/developer/bugParade/bugs/4508058.html
 	 * </p>
 	 * @param encoding the encoding
 	 * @param storage the storage
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/RevertLineAction.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/RevertLineAction.java
index 17a8a9b..dbb7daa 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/RevertLineAction.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/RevertLineAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,12 +24,6 @@ import org.eclipse.ui.texteditor.ITextEditor;
  * @since 3.1
  */
 public class RevertLineAction extends QuickDiffRestoreAction {
-	/** Resource key prefix. */
-	private static final String PREFIX= "RevertLineAction."; //$NON-NLS-1$
-	/** Resource key for added lines - they will be deleted. */
-	private static final String DELETE_KEY= PREFIX + "delete.label"; //$NON-NLS-1$
-	/** Resource key for changed lines - they will be reverted. */
-	private static final String REVERT_KEY= PREFIX + "label"; //$NON-NLS-1$
 
 	/** The line to be restored. Set in <code>update()</code>. */
 	private int fLine;
@@ -41,7 +35,7 @@ public class RevertLineAction extends QuickDiffRestoreAction {
 	 * @param isRulerAction <code>true</code> if this is a ruler action
 	 */
 	public RevertLineAction(ITextEditor editor, boolean isRulerAction) {
-		super(QuickDiffMessages.getResourceBundle(), PREFIX, editor, isRulerAction);
+		super(QuickDiffMessages.getResourceBundle(), "RevertLineAction.", editor, isRulerAction); //$NON-NLS-1$
 	}
 
 	/*
@@ -62,9 +56,9 @@ public class RevertLineAction extends QuickDiffRestoreAction {
 			return false;
 
 		if (info.getChangeType() == ILineDiffInfo.ADDED)
-			setText(QuickDiffMessages.getString(DELETE_KEY));
+			setText(QuickDiffMessages.getString("RevertLineAction.delete.label")); //$NON-NLS-1$
 		else
-			setText(QuickDiffMessages.getString(REVERT_KEY));
+			setText(QuickDiffMessages.getString("RevertLineAction.label")); //$NON-NLS-1$
 		return true;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AccessibilityPreferencePage.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AccessibilityPreferencePage.java
index 37c6f50..1ccbf51 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AccessibilityPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/AccessibilityPreferencePage.java
@@ -43,6 +43,8 @@ import org.eclipse.ui.internal.editors.text.AccessibilityPreferencePage.Enumerat
 
 import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
 
+import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
+
 
 /**
  * The preference page for setting the editor options.
@@ -53,16 +55,6 @@ import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
  */
 public class AccessibilityPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
 
-	// FIXME: remove in 3.6, see https://bugs.eclipse.org/277864
-	private static final String PREFIX= "org.eclipse.ui."; //$NON-NLS-1$
-
-	// FIXME: in 3.6 move to ITextEditorHelpContextIds, see https://bugs.eclipse.org/277864
-	/**
-	 * Id for the text editor preference page. Value:
-	 * <code>"org.eclipse.ui.text_editor_preference_page_context"</code>.
-	 */
-	private static final String ACCESSIBILITY_PREFERENCE_PAGE= PREFIX + "accessibility_preference_page_context"; //$NON-NLS-1$
-
 
 	private abstract class Initializer {
 
@@ -388,7 +380,7 @@ public class AccessibilityPreferencePage extends PreferencePage implements IWork
 	 */
 	public void createControl(Composite parent) {
 		super.createControl(parent);
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ACCESSIBILITY_PREFERENCE_PAGE);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ITextEditorHelpContextIds.ACCESSIBILITY_PREFERENCE_PAGE);
 	}
 
 	private Control createAppearancePage(Composite parent) {
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
index a5cfe6a..bb2e540 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
@@ -19,6 +19,7 @@ import java.util.Map;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -34,6 +35,7 @@ import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.layout.PixelConverter;
 import org.eclipse.jface.preference.ColorSelector;
 import org.eclipse.jface.preference.PreferenceConverter;
+import org.eclipse.jface.resource.JFaceResources;
 
 import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
 import org.eclipse.ui.texteditor.AnnotationPreference;
@@ -94,6 +96,11 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 	 */
 	private Button fEnablementCheckbox;
 
+	/**
+	 * The reference provider note.
+	 * @since 3.6
+	 */
+	private Composite fQuickDiffProviderNote;
 
 	public QuickDiffConfigurationBlock(OverlayPreferenceStore store) {
 		Assert.isNotNull(store);
@@ -161,7 +168,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		Button checkBox= new Button(parent, SWT.CHECK);
 		checkBox.setText(label);
 
-		GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		GridData gd= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
 		gd.horizontalIndent= indentation;
 		gd.horizontalSpan= 2;
 		checkBox.setLayoutData(gd);
@@ -172,6 +179,33 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		return checkBox;
 	}
 
+	/*
+	 *  XXX: Copied from
+	 *  org.eclipse.jface.preference.PreferencePage.createNoteComposite(Font, Composite, String, String)
+	 * @since 3.6
+	 */
+	private Composite createNoteComposite(Font font, Composite composite, String title, String message) {
+		Composite messageComposite= new Composite(composite, SWT.NONE);
+		GridLayout messageLayout= new GridLayout();
+		messageLayout.numColumns= 2;
+		messageLayout.marginWidth= 0;
+		messageLayout.marginHeight= 0;
+		messageComposite.setLayout(messageLayout);
+		messageComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		messageComposite.setFont(font);
+
+		final Label noteLabel= new Label(messageComposite, SWT.BOLD);
+		noteLabel.setText(title);
+		noteLabel.setFont(JFaceResources.getFontRegistry().getBold(
+				JFaceResources.DIALOG_FONT));
+		noteLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
+
+		Label messageLabel= new Label(messageComposite, SWT.WRAP);
+		messageLabel.setText(message);
+		messageLabel.setFont(font);
+		return messageComposite;
+	}
+	
 	/**
 	 * Creates page for hover preferences.
 	 *
@@ -205,7 +239,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		fQuickDiffOverviewRulerCheckBox= new Button(composite, SWT.CHECK);
 		fQuickDiffOverviewRulerCheckBox.setText(label);
 
-		GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		GridData gd= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
 		gd.horizontalIndent= 0;
 		gd.horizontalSpan= 2;
 		gd.horizontalIndent= 10;
@@ -223,7 +257,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 
 		// spacer
 		Label l= new Label(composite, SWT.LEFT );
-		gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd= new GridData(SWT.FILL, SWT.CENTER, false, false);
 		gd.horizontalSpan= 2;
 		gd.horizontalIndent= 10;
 		gd.heightHint= 5;
@@ -234,7 +268,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		layout= new GridLayout();
 		layout.numColumns= 2;
 		group.setLayout(layout);
-		gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		gd= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
 		gd.horizontalSpan= 2;
 		gd.horizontalIndent= 10;
 		group.setLayoutData(gd);
@@ -247,7 +281,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 			final ColorSelector editor= new ColorSelector(group);
 			fQuickDiffColorEditors[i]= editor;
 			Button changeColorButton= editor.getButton();
-			gd= new GridData(GridData.FILL_HORIZONTAL);
+			gd= new GridData(SWT.FILL, SWT.CENTER, true, false);
 			gd.horizontalAlignment= GridData.BEGINNING;
 			changeColorButton.setLayoutData(gd);
 			final int index= i;
@@ -267,7 +301,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 
 		l= new Label(composite, SWT.LEFT);
 		l.setText(TextEditorMessages.QuickDiffConfigurationBlock_referenceProviderTitle);
-		gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		gd= new GridData(SWT.FILL, SWT.CENTER, false, false);
 		gd.horizontalSpan= 2;
 		gd.horizontalIndent= 10;
 		l.setLayoutData(gd);
@@ -278,23 +312,15 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		layout.marginHeight= 0;
 		layout.marginWidth= 0;
 		editorComposite.setLayout(layout);
-		gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
+		gd= new GridData(SWT.FILL, SWT.FILL, false, true);
 		gd.horizontalSpan= 2;
 		gd.horizontalIndent= 10;
 		editorComposite.setLayoutData(gd);
 
 		fQuickDiffProviderCombo= new Combo(editorComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
-		gd= new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL);
+		gd= new GridData(SWT.FILL, SWT.BEGINNING, true, false);
 		fQuickDiffProviderCombo.setLayoutData(gd);
 
-		Composite stylesComposite= new Composite(editorComposite, SWT.NONE);
-		layout= new GridLayout();
-		layout.marginHeight= 0;
-		layout.marginWidth= 0;
-		layout.numColumns= 2;
-		stylesComposite.setLayout(layout);
-		stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
 		fQuickDiffProviderCombo.addSelectionListener(new SelectionListener() {
 			public void widgetDefaultSelected(SelectionEvent e) {
 				// do nothing
@@ -306,6 +332,12 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 			}
 
 		});
+		
+		fQuickDiffProviderNote= createNoteComposite(parent.getFont(), editorComposite, TextEditorMessages.QuickDiffConfigurationBlock_referenceProviderNoteTitle,
+				TextEditorMessages.QuickDiffConfigurationBlock_referenceProviderNoteMessage);
+		gd= new GridData(SWT.BEGINNING, SWT.FILL, false, true);
+		gd.horizontalSpan= 2;
+		fQuickDiffProviderNote.setLayoutData(gd);
 
 		return composite;
 	}
@@ -321,7 +353,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		PixelConverter pixelConverter= new PixelConverter(composite);
 
 		Label filler= new Label(composite, SWT.LEFT );
-		GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+		GridData gd= new GridData(SWT.FILL, SWT.CENTER, false, false);
 		gd.horizontalSpan= 2;
 		gd.heightHint= pixelConverter.convertHeightInCharsToPixels(1) / 2;
 		filler.setLayoutData(gd);
@@ -333,6 +365,11 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
 		fQuickDiffProviderCombo.setEnabled(enabled);
 		for (int i= 0; i < fQuickDiffColorEditors.length; i++)
 			fQuickDiffColorEditors[i].setEnabled(enabled);
+		fQuickDiffProviderNote.setEnabled(enabled);
+		Control[] quickDiffProviderNoteChildren= fQuickDiffProviderNote.getChildren();
+		for (int i= 0; i < quickDiffProviderNoteChildren.length; i++) {
+			quickDiffProviderNoteChildren[i].setEnabled(enabled);
+		}
 	}
 
 	private void updateProviderList() {
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
index 66f03a3..18d1328 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
@@ -59,6 +59,8 @@ final class TextEditorMessages extends NLS {
 	public static String TextEditorPreferencePage_colorsAndFonts_link_tooltip;
 	public static String QuickDiffConfigurationBlock_description;
 	public static String QuickDiffConfigurationBlock_referenceProviderTitle;
+	public static String QuickDiffConfigurationBlock_referenceProviderNoteMessage;
+	public static String QuickDiffConfigurationBlock_referenceProviderNoteTitle;
 	public static String QuickDiffConfigurationBlock_characterMode;
 	public static String QuickDiffConfigurationBlock_showForNewEditors;
 	public static String QuickDiffConfigurationBlock_showInOverviewRuler;
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
index 894e8e4..030e490 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
@@ -57,6 +57,8 @@ TextEditorPreferencePage_showAffordance= S&how affordance in hover on how to mak
 
 QuickDiffConfigurationBlock_description= General Quick Diff settings.
 QuickDiffConfigurationBlock_referenceProviderTitle= &Use this reference source:
+QuickDiffConfigurationBlock_referenceProviderNoteMessage= Changing the reference source does not update open editors.
+QuickDiffConfigurationBlock_referenceProviderNoteTitle= Note:
 QuickDiffConfigurationBlock_characterMode= &Use characters to show changes in vertical ruler
 QuickDiffConfigurationBlock_showForNewEditors= &Enable quick diff
 QuickDiffConfigurationBlock_showInOverviewRuler= Show differences in &overview ruler
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/LineNumberColumn.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/LineNumberColumn.java
index fab3d4b..90e0aab 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/LineNumberColumn.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/LineNumberColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -605,7 +605,7 @@ public class LineNumberColumn extends AbstractContributedRulerColumn implements
 			((IChangeRulerColumn) column).setModel(model);
 			if (model != null) {
 				ISourceViewer viewer= fViewer;
-				if (viewer != null && viewer.getAnnotationModel() == null)
+				if (viewer != null && viewer.getAnnotationModel() == null && column.getControl() != null)
 					viewer.showAnnotations(true);
 				}
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java
index 95f55c2..5de5b32 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/internal/texteditor/SourceViewerInformationControl.java
@@ -78,6 +78,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
 	private Font fStatusTextFont;
 	/**
 	 * The color of the optional status text label or <code>null</code> if none.
+	 * 
 	 * @since 3.6
 	 */
 	private Color fStatusTextForegroundColor;
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index 17d7667..1411f39 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,14 @@
 package org.eclipse.ui.texteditor;
 
 import java.io.File;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.UnsupportedCharsetException;
 import java.util.Iterator;
 import java.util.List;
 
+import com.ibm.icu.text.BreakIterator;
 import com.ibm.icu.text.MessageFormat;
 
 import org.eclipse.swt.SWT;
@@ -60,6 +65,7 @@ import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -79,8 +85,8 @@ import org.eclipse.jface.text.Position;
 import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
 import org.eclipse.jface.text.revisions.IRevisionRulerColumn;
 import org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension;
-import org.eclipse.jface.text.revisions.RevisionInformation;
 import org.eclipse.jface.text.revisions.IRevisionRulerColumnExtension.RenderingMode;
+import org.eclipse.jface.text.revisions.RevisionInformation;
 import org.eclipse.jface.text.source.Annotation;
 import org.eclipse.jface.text.source.AnnotationRulerColumn;
 import org.eclipse.jface.text.source.ChangeRulerColumn;
@@ -126,6 +132,7 @@ import org.eclipse.ui.internal.editors.text.NLSUtility;
 import org.eclipse.ui.internal.editors.text.RefreshEditorAction;
 import org.eclipse.ui.internal.texteditor.AnnotationColumn;
 import org.eclipse.ui.internal.texteditor.BooleanPreferenceToggleAction;
+import org.eclipse.ui.internal.texteditor.FocusedInformationPresenter;
 import org.eclipse.ui.internal.texteditor.LineNumberColumn;
 import org.eclipse.ui.internal.texteditor.TextChangeHover;
 import org.eclipse.ui.keys.IBindingService;
@@ -145,8 +152,10 @@ import org.eclipse.ui.editors.text.DefaultEncodingSupport;
 import org.eclipse.ui.editors.text.EditorsUI;
 import org.eclipse.ui.editors.text.ForwardingDocumentProvider;
 import org.eclipse.ui.editors.text.IEncodingSupport;
+import org.eclipse.ui.editors.text.IStorageDocumentProvider;
 import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
 
+
 /**
  * An intermediate editor comprising functionality not present in the leaner <code>AbstractTextEditor</code>,
  * but used in many heavy weight (and especially source editing) editors, such as line numbers,
@@ -157,24 +166,6 @@ import org.eclipse.ui.editors.text.ITextEditorHelpContextIds;
 public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 
 	/**
-	 * Command ID of the command to display a sticky ruler hover for the current caret location.
-	 * Value <code>"org.eclipse.ui.edit.text.showChangeRulerInformation"</code>).
-	 * 
-	 * @since 3.5
-	 */
-	//TODO: move to ITextEditorActionDefinitionIds and make API
-	private static final String SHOW_CHANGE_RULER_INFORMATION_ID= "org.eclipse.ui.edit.text.showChangeRulerInformation"; //$NON-NLS-1$
-	
-	/**
-	 * Name of the action displaying a sticky ruler hover for the current caret location.
-	 *
-	 * Value: <code>"ShowChangeRulerInformation"</code>
-	 * @since 3.5
-	 */
-	//TODO: move to ITextEditorActionConstants and make API
-	private static final String SHOW_CHANGE_RULER_INFORMATION= "ShowChangeRulerInformation"; //$NON-NLS-1$
-	
-	/**
 	 * Preference key for showing the line number ruler.
 	 */
 	private final static String LINE_NUMBER_RULER= AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER;
@@ -207,6 +198,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 	 * @since 3.1
 	 */
 	private final static String DISABLE_OVERWRITE_MODE= AbstractDecoratedTextEditorPreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE;
+
 	/**
 	 * Menu id for the overview ruler context menu.
 	 *
@@ -224,6 +216,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		}
 	}
 
+
 	/**
 	 * The annotation preferences.
 	 */
@@ -287,6 +280,15 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 	 * @since 3.2
 	 */
 	protected boolean fIsUpdatingMarkerViews= false;
+
+	/**
+	 * Indicates whether it wants to update the marker views after a gotoMarker call.
+	 * @see #updateMarkerViews(Annotation)
+	 * @see #gotoMarker(IMarker)
+	 * @since 3.6
+	 */
+	private boolean fIsComingFromGotoMarker= false;
+	
 	/**
 	 * Tells whether editing the current derived editor input is allowed.
 	 * @since 3.3
@@ -314,6 +316,9 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 
 	/**
 	 * Creates a new text editor.
+	 * 
+	 * @see #initializeEditor()
+	 * @see #initializeKeyBindingScopes()
 	 */
 	public AbstractDecoratedTextEditor() {
 		super();
@@ -529,22 +534,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		buttonComposite.setForeground(fgColor);
 
 		encodingSupport.createStatusEncodingChangeControl(buttonComposite, status);
-//
-//		Button button= new Button(buttonComposite, SWT.PUSH | SWT.FLAT);
-//		button.setText(action.getText());
-//		button.addSelectionListener(new SelectionAdapter() {
-//			/*
-//			 * @see org.eclipse.swt.events.SelectionAdapter#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
-//			 */
-//			public void widgetSelected(SelectionEvent e) {
-//				action.run();
-//			}
-//		});
-//
-//		Label filler= new Label(buttonComposite, SWT.NONE);
-//		filler.setLayoutData(new GridData(GridData.FILL_BOTH));
-//		filler.setBackground(bgColor);
-//
+
 		return composite;
 	}
 
@@ -1016,8 +1006,10 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		}
 
 		int length= document.getLength();
-		if (end - 1 < length && start < length)
+		if (end <= length && start <= length) {
+			fIsComingFromGotoMarker= true;
 			selectAndReveal(start, end - start);
+		}
 	}
 
 	/*
@@ -1249,8 +1241,16 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 				showChangeRulerInformation();
 			}
 		};
-		action.setActionDefinitionId(SHOW_CHANGE_RULER_INFORMATION_ID);
-		setAction(SHOW_CHANGE_RULER_INFORMATION, action);
+		action.setActionDefinitionId(ITextEditorActionDefinitionIds.SHOW_CHANGE_RULER_INFORMATION_ID);
+		setAction(ITextEditorActionConstants.SHOW_CHANGE_RULER_INFORMATION, action);
+
+		action= new ResourceAction(TextEditorMessages.getBundleForConstructedKeys(), "Editor.ShowRulerAnnotationInformation.", IAction.AS_PUSH_BUTTON) { //$NON-NLS-1$
+			public void run() {
+				showRulerAnnotationInformation();
+			}
+		};
+		action.setActionDefinitionId(ITextEditorActionDefinitionIds.SHOW_RULER_ANNOTATION_INFORMATION_ID);
+		setAction(ITextEditorActionConstants.SHOW_RULER_ANNOTATION_INFORMATION, action);
 	}
 
 	/**
@@ -1264,8 +1264,8 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		if (!(ruler instanceof CompositeRuler) || fLineColumn == null)
 			return;
 		
-		CompositeRuler compositeRuler= (CompositeRuler) ruler;
-		
+		CompositeRuler compositeRuler= (CompositeRuler)ruler;
+
 		// fake a mouse move (some hovers rely on this to determine the hovered line):
 		int x= fLineColumn.getControl().getLocation().x;
 		
@@ -1278,6 +1278,34 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		compositeRuler.setLocationOfLastMouseButtonActivity(x, y);
 		
 		IAnnotationHover hover= fLineColumn.getHover();
+		showFocusedRulerHover(hover, sourceViewer, caretOffset);
+    }
+
+	/**
+	 * Opens a sticky annotation ruler hover for the caret line. Does nothing if no annotation hover
+	 * is available.
+	 * 
+	 * @since 3.6
+	 */
+	private void showRulerAnnotationInformation() {
+		ISourceViewer sourceViewer= getSourceViewer();
+		IAnnotationHover hover= getSourceViewerConfiguration().getAnnotationHover(sourceViewer);
+		int caretOffset= sourceViewer.getTextWidget().getCaretOffset();
+		
+		showFocusedRulerHover(hover, sourceViewer, caretOffset);
+	}
+
+	/**
+	 * Shows a focused hover at the specified offset.
+	 * Does nothing if <code>hover</code> is <code>null</code> or cannot be shown.
+	 * 
+	 * @param hover the hover to be shown, can be <code>null</code>
+	 * @param sourceViewer the source viewer
+	 * @param caretOffset the caret offset
+	 * 
+	 * @since 3.6
+	 */
+	private void showFocusedRulerHover(IAnnotationHover hover, ISourceViewer sourceViewer, int caretOffset) {
 		if (hover == null)
 			return;
 		
@@ -1298,7 +1326,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 		} catch (BadLocationException e) {
 			return;
 		}
-    }
+	}
 
 	/**
 	 * Creates and registers the print action.
@@ -1360,6 +1388,9 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 				return fLineNumberRulerColumn;
 		}
 
+		if (MarkerAnnotationPreferences.class.equals(adapter))
+			return EditorsPlugin.getDefault().getMarkerAnnotationPreferences();
+
 		return super.getAdapter(adapter);
 
 	}
@@ -1547,6 +1578,102 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 	}
 
 	/**
+	 * Presents an error dialog to the user when a problem happens during save.
+	 * <p>
+	 * Overrides the default behavior by showing a more advanced error dialog in case of encoding
+	 * problems.
+	 * </p>
+	 * 
+	 * @param title the dialog title
+	 * @param message the message to display
+	 * @param exception the exception to handle
+	 * @since 3.6
+	 */
+	protected void openSaveErrorDialog(String title, String message, CoreException exception) {
+		IStatus status= exception.getStatus();
+		final IDocumentProvider documentProvider= getDocumentProvider();
+		if (!(status.getCode() == IFileBufferStatusCodes.CHARSET_MAPPING_FAILED && documentProvider instanceof IStorageDocumentProvider)) {
+			super.openSaveErrorDialog(title, message, exception);
+			return;
+		}
+
+		final int saveAsUTF8ButtonId= IDialogConstants.OK_ID + IDialogConstants.CANCEL_ID + 1;
+		final int selectUnmappableCharButtonId= saveAsUTF8ButtonId + 1;
+		final Charset charset= getCharset();
+		
+		ErrorDialog errorDialog= new ErrorDialog(getSite().getShell(), title, message, status, IStatus.ERROR) {
+
+			protected void createButtonsForButtonBar(Composite parent) {
+				super.createButtonsForButtonBar(parent);
+				createButton(parent, saveAsUTF8ButtonId, TextEditorMessages.AbstractDecoratedTextEditor_save_error_Dialog_button_saveAsUTF8, false);
+				if (charset != null)
+					createButton(parent, selectUnmappableCharButtonId, TextEditorMessages.AbstractDecoratedTextEditor_save_error_Dialog_button_selectUnmappable, false);
+			}
+
+			protected void buttonPressed(int id) {
+				if (id == saveAsUTF8ButtonId || id == selectUnmappableCharButtonId) {
+					setReturnCode(id);
+					close();
+				} else
+					super.buttonPressed(id);
+			}
+
+			protected boolean shouldShowDetailsButton() {
+				return false;
+			}
+
+		};
+
+		int returnCode= errorDialog.open();
+
+		if (returnCode == saveAsUTF8ButtonId) {
+			((IStorageDocumentProvider)documentProvider).setEncoding(getEditorInput(), "UTF-8"); //$NON-NLS-1$
+			doSave(getProgressMonitor());
+		} else if (returnCode == selectUnmappableCharButtonId) {
+			CharsetEncoder encoder= charset.newEncoder();
+			IDocument document= getDocumentProvider().getDocument(getEditorInput());
+			int documentLength= document.getLength();
+			int offset= 0;
+			BreakIterator charBreakIterator= BreakIterator.getCharacterInstance();
+			charBreakIterator.setText(document.get());
+			while (offset < documentLength) {
+				try {
+					int next= charBreakIterator.next();
+					String ch= document.get(offset, next - offset);
+					if (!encoder.canEncode(ch)) {
+						selectAndReveal(offset, next - offset);
+						return;
+					}
+					offset= next;
+				} catch (BadLocationException ex) {
+					EditorsPlugin.log(ex);
+					// Skip this character. Showing yet another dialog here is overkill
+				}
+			}
+		}
+	}
+
+
+	/**
+	 * Returns the charset of the current editor input.
+	 * 
+	 * @return the charset of the current editor input or <code>null</code> if it fails
+	 * @since 3.6
+	 */
+	private Charset getCharset() {
+		IEncodingSupport encodingSupport= (IEncodingSupport)getAdapter(IEncodingSupport.class);
+		if (encodingSupport == null)
+			return null;
+		try {
+			return Charset.forName(encodingSupport.getEncoding());
+		} catch (UnsupportedCharsetException ex) {
+			return null;
+		} catch (IllegalCharsetNameException ex) {
+			return null;
+		}
+	}
+
+	/**
 	 * Checks whether there given file store points
 	 * to a file in the workspace. Only returns a
 	 * workspace file if there's a single match.
@@ -1711,8 +1838,14 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 
 			revisionMenu.add(new Separator());
 
-			revisionMenu.add(getAction(ITextEditorActionConstants.REVISION_SHOW_AUTHOR_TOGGLE));
-			revisionMenu.add(getAction(ITextEditorActionConstants.REVISION_SHOW_ID_TOGGLE));
+			IAction action= getAction(ITextEditorActionConstants.REVISION_SHOW_AUTHOR_TOGGLE);
+			if (action instanceof IUpdate)
+				((IUpdate)action).update();
+			revisionMenu.add(action);
+			action= getAction(ITextEditorActionConstants.REVISION_SHOW_ID_TOGGLE);
+			if (action instanceof IUpdate)
+				((IUpdate)action).update();
+			revisionMenu.add(action);
 		}
 
 		IAction lineNumberAction= getAction(ITextEditorActionConstants.LINENUMBERS_TOGGLE);
@@ -1939,6 +2072,11 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
 	 * @since 3.2
 	 */
 	protected void updateMarkerViews(Annotation annotation) {
+		if (fIsComingFromGotoMarker) {
+			fIsComingFromGotoMarker= false;
+			return;
+		}
+
 		IMarker marker= null;
 		if (annotation instanceof MarkerAnnotation)
 			marker= ((MarkerAnnotation)annotation).getMarker();
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChainedPreferenceStore.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChainedPreferenceStore.java
index df61b10..d08d6eb 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChainedPreferenceStore.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChainedPreferenceStore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -414,7 +414,7 @@ public class ChainedPreferenceStore implements IPreferenceStore {
 
 		/*
 		 * Assume that the property is there but has no default value (its owner relies on the default-default value)
-		 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=52827
+		 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=52827
 		 */
 		if (visibleStore == null && newValue != null)
 			visibleStore= childPreferenceStore;
@@ -473,7 +473,7 @@ public class ChainedPreferenceStore implements IPreferenceStore {
 
 				/*
 				 * The original event's new value can be non-null (removed assertion).
-				 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=69419
+				 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=69419
 				 */
 
 				newValue= getOtherValue(property, visibleStore, oldValue);
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
index 3a2e33a..c61fd20 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
@@ -117,24 +117,21 @@ public class ChangeEncodingAction extends TextEditorAction {
 			 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
 			 */
 			protected Control createDialogArea(Composite parent) {
-				Control composite= super.createDialogArea(parent);
-				if (!(composite instanceof Composite)) {
-					composite.dispose();
-					composite= new Composite(parent, SWT.NONE);
-				}
+				Composite composite= (Composite)super.createDialogArea(parent);
 
+				composite= new Composite(composite, SWT.NONE);
 				GridLayout layout= new GridLayout();
 				layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
 				layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
 				layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
 				layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
-				parent.setLayout(layout);
+				composite.setLayout(layout);
 
 				GridData data = new GridData(GridData.FILL_BOTH);
 				composite.setLayoutData(data);
 				composite.setFont(parent.getFont());
 
-				DialogPage page= new MessageDialogPage((Composite)composite) {
+				DialogPage page= new MessageDialogPage(composite) {
 					public void setErrorMessage(String newMessage) {
 						super.setErrorMessage(newMessage);
 						setButtonEnabledState(IDialogConstants.OK_ID, newMessage == null);
@@ -149,11 +146,11 @@ public class ChangeEncodingAction extends TextEditorAction {
 				};
 
 				if (resource != null) {
-					fEncodingEditor= new ResourceEncodingFieldEditor("", (Composite)composite, resource, null); //$NON-NLS-1$
+					fEncodingEditor= new ResourceEncodingFieldEditor("", composite, resource, null); //$NON-NLS-1$
 					fEncodingEditor.setPage(page);
 					fEncodingEditor.load();
 				} else {
-					fEncodingEditor= new EncodingFieldEditor(ENCODING_PREF_KEY, "", null, (Composite)composite); //$NON-NLS-1$
+					fEncodingEditor= new EncodingFieldEditor(ENCODING_PREF_KEY, "", null, composite); //$NON-NLS-1$
 					store= new PreferenceStore();
 					String defaultEncoding= encodingSupport.getDefaultEncoding();
 					store.setDefault(ENCODING_PREF_KEY, defaultEncoding);
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ConstructedTextEditorMessages.properties b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ConstructedTextEditorMessages.properties
index 034a840..6504cfa 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ConstructedTextEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ConstructedTextEditorMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -89,7 +89,7 @@ Editor.RulerPreferencesAction.description=Show ruler preferences
 Editor.RulerPreferencesAction.tooltip=Show Preferences
 Editor.RulerPreferencesAction.image=
 
-Editor.ContextPreferencesAction.label=Preferences...
+Editor.ContextPreferencesAction.label=Pre&ferences...
 Editor.ContextPreferencesAction.description=Show preferences
 Editor.ContextPreferencesAction.tooltip=Show Preferences
 Editor.ContextPreferencesAction.image=
@@ -109,3 +109,8 @@ Editor.ShowChangeRulerInformation.label= Show Quick Diff Ruler Tooltip
 Editor.ShowChangeRulerInformation.tooltip= Show Quick Diff Ruler Tooltip
 Editor.ShowChangeRulerInformation.image=
 Editor.ShowChangeRulerInformation.description= Displays change information for the caret line in a focused hover
+
+Editor.ShowRulerAnnotationInformation.label= Show Ruler Annotation Tooltip
+Editor.ShowRulerAnnotationInformation.tooltip= Show Ruler Annotation Tooltip
+Editor.ShowRulerAnnotationInformation.image=
+Editor.ShowRulerAnnotationInformation.description= Displays annotation information for the caret line in a focused hover
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
index 1485f12..7f036f5 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DefaultMarkerAnnotationAccess.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import org.eclipse.jface.text.source.IAnnotationAccessExtension;
 import org.eclipse.jface.text.source.IAnnotationAccessExtension2;
 import org.eclipse.jface.text.source.IAnnotationPresentation;
 import org.eclipse.jface.text.source.ImageUtilities;
+import org.eclipse.jface.text.source.projection.AnnotationBag;
 
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
@@ -362,6 +363,12 @@ public class DefaultMarkerAnnotationAccess implements IAnnotationAccess, IAnnota
 	 */
 	private Image getImage(Annotation annotation, AnnotationPreference preference, String annotationType) {
 
+		if (annotation instanceof AnnotationBag) {
+			AnnotationBag bag= (AnnotationBag)annotation;
+			if (!bag.isEmpty())
+				annotation= (Annotation)bag.iterator().next();
+		}
+
 		ImageRegistry registry= EditorsPlugin.getDefault().getImageRegistry();
 
 		IAnnotationImageProvider annotationImageProvider = preference.getAnnotationImageProvider();
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/FocusedInformationPresenter.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/FocusedInformationPresenter.java
deleted file mode 100644
index ed9cd6b..0000000
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/FocusedInformationPresenter.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.texteditor;
-
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.text.AbstractInformationControlManager;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DefaultInformationControl;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControl;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.jface.text.information.IInformationProviderExtension2;
-import org.eclipse.jface.text.information.InformationPresenter;
-import org.eclipse.jface.text.source.IAnnotationHover;
-import org.eclipse.jface.text.source.IAnnotationHoverExtension;
-import org.eclipse.jface.text.source.ILineRange;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
-/**
- * Information presenter used to present focused ("sticky") information shells.
- * 
- * @since 3.5
- */
-class FocusedInformationPresenter extends InformationPresenter {
-
-	/**
-	 * Information provider used to present focused information shells.
-	 */
-	public final static class InformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
-
-		private IRegion fHoverRegion;
-		private Object fHoverInfo;
-		private IInformationControlCreator fControlCreator;
-
-		public InformationProvider(IRegion hoverRegion, Object hoverInfo, IInformationControlCreator controlCreator) {
-			fHoverRegion= hoverRegion;
-			fHoverInfo= hoverInfo;
-			fControlCreator= controlCreator;
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
-		 */
-		public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
-			return fHoverRegion;
-		}
-		/**
-		 * {@inheritDoc}
-		 *
-		 * @deprecated As of 2.1, replaced by {@link IInformationProviderExtension#getInformation2(ITextViewer, IRegion)}
-		 */
-		public String getInformation(ITextViewer textViewer, IRegion subject) {
-			return fHoverInfo == null ? null : fHoverInfo.toString();
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
-		 * @since 3.2
-		 */
-		public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-			return fHoverInfo;
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
-		 */
-		public IInformationControlCreator getInformationPresenterControlCreator() {
-			return fControlCreator;
-		}
-	}
-	
-	/**
-	 * The default information control creator.
-	 */
-	private static class DefaultInformationControlCreator implements IInformationControlCreator {
-		public IInformationControl createInformationControl(Shell shell) {
-			return new DefaultInformationControl(shell, true);
-		}
-	}
-	
-	/**
-	 * The source viewer.
-	 */
-	private final ISourceViewer fSourceViewer;
-	/**
-	 * The source viewer configuration.
-	 */
-	private final SourceViewerConfiguration fSourceViewerConfiguration;
-
-	/**
-	 * Creates a new focused information presenter and installs it on the given source viewer
-	 * 
-	 * @param sourceViewer the source viewer
-	 * @param sourceViewerConfiguration the viewer configuration
-	 */
-	public FocusedInformationPresenter(ISourceViewer sourceViewer, SourceViewerConfiguration sourceViewerConfiguration) {
-		super(new DefaultInformationControlCreator());
-		fSourceViewer= sourceViewer;
-		fSourceViewerConfiguration= sourceViewerConfiguration;
-		
-		// sizes: see org.eclipse.jface.text.TextViewer.TEXT_HOVER_*_CHARS
-		setSizeConstraints(100, 12, true, true);
-		install(sourceViewer);
-		setDocumentPartitioning(sourceViewerConfiguration.getConfiguredDocumentPartitioning(sourceViewer));
-	}
-
-	/**
-	 * Tries to show a focused ("sticky") annotation hover.
-	 *
-	 * @param annotationHover the annotation hover to show
-	 * @param line the line for which to show the hover
-	 * @return <code>true</code> if successful, <code>false</code> otherwise
-	 */
-	public boolean openFocusedAnnotationHover(IAnnotationHover annotationHover, int line) {
-		
-		try {
-			// compute the hover information
-			Object hoverInfo;
-			if (annotationHover instanceof IAnnotationHoverExtension) {
-				IAnnotationHoverExtension extension= (IAnnotationHoverExtension) annotationHover;
-				ILineRange hoverLineRange= extension.getHoverLineRange(fSourceViewer, line);
-				if (hoverLineRange == null)
-					return false;
-				final int maxVisibleLines= Integer.MAX_VALUE; // allow any number of lines being displayed, as we support scrolling
-				hoverInfo= extension.getHoverInfo(fSourceViewer, hoverLineRange, maxVisibleLines);
-			} else {
-				hoverInfo= annotationHover.getHoverInfo(fSourceViewer, line);
-			}
-
-			// hover region: the beginning of the concerned line to place the control right over the line
-			IDocument document= fSourceViewer.getDocument();
-			int offset= document.getLineOffset(line);
-			String contentType= TextUtilities.getContentType(document, fSourceViewerConfiguration.getConfiguredDocumentPartitioning(fSourceViewer), offset, true);
-
-			IInformationControlCreator controlCreator= null;
-			if (annotationHover instanceof IInformationProviderExtension2) // this is undocumented, but left here for backwards compatibility
-				controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
-			else if (annotationHover instanceof IAnnotationHoverExtension)
-				controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();
-
-			IInformationProvider informationProvider= new InformationProvider(new Region(offset, 0), hoverInfo, controlCreator);
-
-			setOffset(offset);
-			setAnchor(AbstractInformationControlManager.ANCHOR_RIGHT);
-			setMargins(4, 0); // AnnotationBarHoverManager sets (5,0), minus SourceViewer.GAP_SIZE_1
-			setInformationProvider(informationProvider, contentType);
-			showInformation();
-
-			return true;
-
-		} catch (BadLocationException e) {
-			return false;
-		}
-	}
-}
-
-
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MessageRegion.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MessageRegion.java
index 0ac3616..9542333 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MessageRegion.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MessageRegion.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ import org.eclipse.jface.resource.JFaceResources;
  * show messages in the page.
  * <p>
  * XXX: Copied from org.eclipse.jface.preference.PreferencePage.MessageRegion
- * 		see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=84061
+ * 		see https://bugs.eclipse.org/bugs/show_bug.cgi?id=84061
  * </p>
  *
  * @since 3.1
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.java b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.java
index b5bd1c0..a6a57b2 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,10 @@ final class TextEditorMessages extends NLS {
 	public static String AbstractDecoratedTextEditor_warning_saveAs_deleted;
 	public static String AbstractDecoratedTextEditor_error_saveAs_title;
 	public static String AbstractDecoratedTextEditor_error_saveAs_message;
+
+	public static String AbstractDecoratedTextEditor_save_error_Dialog_button_saveAsUTF8;
+
+	public static String AbstractDecoratedTextEditor_save_error_Dialog_button_selectUnmappable;
 	public static String AbstractDecoratedTextEditor_saveAs_overwrite_title;
 	public static String AbstractDecoratedTextEditor_saveAs_overwrite_message;
 	public static String AbstractDecoratedTextEditor_warning_derived_title;
diff --git a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
index 4ea0e1a..d77dbfb 100644
--- a/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TextEditorMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -32,6 +32,8 @@ AbstractDecoratedTextEditor_revision_quickdiff_switch_rememberquestion=Remember
 AbstractDecoratedTextEditor_revision_colors_option_by_author_and_date=Combined &Coloring
 AbstractDecoratedTextEditor_error_saveAs_title=Problems During Save As...
 AbstractDecoratedTextEditor_error_saveAs_message=Save could not be completed. {0}
+AbstractDecoratedTextEditor_save_error_Dialog_button_saveAsUTF8= &Save as UTF-8
+AbstractDecoratedTextEditor_save_error_Dialog_button_selectUnmappable= Select &First Character
 AbstractDecoratedTextEditor_saveAs_overwrite_title=Save As
 AbstractDecoratedTextEditor_saveAs_overwrite_message={0} already exists.\nDo you want to replace it?
 AbstractDecoratedTextEditor_warning_saveAs_deleted=The original file ''{0}'' has been deleted or is not accessible.
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs
index 4c5630d..c1830b7 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/.settings/org.eclipse.pde.prefs
@@ -1,14 +1,29 @@
-#Wed Nov 24 22:35:50 GMT-08:00 2004
-compilers.p.unused-element-or-attribute=1
-compilers.p.unresolved-ex-points=0
+#Mon Dec 14 12:09:21 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.illegal-att-value=0
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=1
 compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=1
-compilers.p.unknown-class=1
-compilers.p.unknown-attribute=0
-compilers.p.no-required-att=0
-eclipse.preferences.version=1
+compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
-compilers.p.not-externalized-att=1
-compilers.p.illegal-att-value=0
+compilers.p.unused-element-or-attribute=1
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java
index 8c510ed..35af870 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuildTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,16 +16,15 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
-import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.window.Window;
@@ -41,7 +40,6 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.ui.dialogs.ListSelectionDialog;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsImages;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
 
 /**
@@ -311,7 +309,7 @@ public class ExternalToolsBuildTab extends AbstractLaunchConfigurationTab {
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
 	 */
 	public Image getImage() {
-		return ExternalToolsImages.getImage(IExternalToolConstants.IMG_TAB_BUILD);
+		return ExternalToolsImages.getImage(org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.IMG_TAB_BUILD);
 	}
 
 	public boolean isValid(ILaunchConfiguration launchConfig) {
@@ -330,37 +328,9 @@ public class ExternalToolsBuildTab extends AbstractLaunchConfigurationTab {
 	 * @return collection of projects referred to by configuration
 	 */
 	public static IProject[] getBuildProjects(ILaunchConfiguration configuration, String buildScopeId) {
-		String scope = null;
-		String id = buildScopeId ;
-		if (id == null) {
-			id = IExternalToolConstants.ATTR_BUILD_SCOPE ;
-		}
-		try {
-			scope = configuration.getAttribute(id, (String)null);
-		} catch (CoreException e) {
-			return null;
-		}
-		if (scope == null) {
-			return null;
-		}
-		if (scope.startsWith("${projects:")) { //$NON-NLS-1$
-			String pathString = scope.substring(11, scope.length() - 1);
-			if (pathString.length() > 1) {
-				String[] names = pathString.split(","); //$NON-NLS-1$
-				IProject[] projects = new IProject[names.length];
-				IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-				for (int i = 0; i < names.length; i++) {
-					projects[i] = root.getProject(names[i]);
-				}
-				return projects;
-			}
-		} else if (scope.equals("${project}")) { //$NON-NLS-1$
-			IResource resource = DebugUITools.getSelectedResource();
-			if (resource != null) {
-				return new IProject[]{resource.getProject()};
-			}
-		}
-		return new IProject[0];
+		return ExternalToolsCoreUtil.getBuildProjects(configuration,
+				buildScopeId);
+
 	}
 	
 	/**
@@ -372,11 +342,8 @@ public class ExternalToolsBuildTab extends AbstractLaunchConfigurationTab {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static boolean isIncludeReferencedProjects(ILaunchConfiguration configuration, String includeReferencedProjectsId) throws CoreException {
-		String id = includeReferencedProjectsId;
-		if (id == null) {
-			id = IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS ;
-		}
-		return configuration.getAttribute(id, true);
+		return ExternalToolsCoreUtil.isIncludeReferencedProjects(configuration,
+				includeReferencedProjectsId);
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java
index 38f59a9..5b0c0a4 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsBuilderTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@
 package org.eclipse.ui.externaltools.internal.launchConfigurations;
 
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IncrementalProjectBuilder;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -50,7 +52,6 @@ import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
 import org.eclipse.ui.dialogs.IWorkingSetEditWizard;
 import org.eclipse.ui.externaltools.internal.model.BuilderUtils;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.model.WorkbenchContentProvider;
@@ -358,7 +359,7 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
 	}
 	
 	protected void updateRunInBackground(ILaunchConfiguration configuration) { 
-		fLaunchInBackgroundButton.setSelection(isLaunchInBackground(configuration));
+		fLaunchInBackgroundButton.setSelection(ExternalToolsCoreUtil.isAsynchronousBuild(configuration));
 	}
     
     private void updateConsoleOutput(ILaunchConfiguration configuration) {
@@ -386,22 +387,6 @@ public class ExternalToolsBuilderTab extends AbstractLaunchConfigurationTab {
         fVariables.setEnabled(haveOutputFile);
         fAppend.setEnabled(haveOutputFile);
     }
-	
-	/**
-	 * Returns whether the given configuration should be run in the background.
-	 * 
-	 * @param configuration the configuration
-	 * @return whether the configuration is configured to run in the background
-	 */
-	public static boolean isLaunchInBackground(ILaunchConfiguration configuration) {
-		boolean launchInBackground= false;
-		try {
-			launchInBackground= configuration.getAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, false);
-		} catch (CoreException ce) {
-			ExternalToolsPlugin.getDefault().log(ce);
-		}
-		return launchInBackground;
-	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java
index f18bb25..bd7651f 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -48,10 +48,11 @@ public class ExternalToolsLaunchConfigurationMessages extends NLS {
 	public static String ExternalToolsBuildTab_8;
 	public static String ExternalToolsBuildTab_9;
 
-
+	// these messages are present for compatibility with 3.4 - see bug 301183
 	public static String ExternalToolsUtil_Location_not_specified_by__0__1;
 	public static String ExternalToolsUtil_invalidLocation__0_;
 	public static String ExternalToolsUtil_invalidDirectory__0_;
+	// end
 
 	public static String ExternalToolsBuilderTab_Run_this_builder_for__1;
 	public static String ExternalToolsBuilderTab__Full_builds_2;
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties
index 7e432a9..b4374c9 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsLaunchConfigurationMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -43,9 +43,11 @@ ExternalToolsBuildTab_7=Select &Projects:
 ExternalToolsBuildTab_8=Build
 ExternalToolsBuildTab_9=No projects specified
 
+# these messages are present for compatibility with 3.4 - see bug 301183
 ExternalToolsUtil_Location_not_specified_by__0__1=Location not specified by {0}
 ExternalToolsUtil_invalidLocation__0_ = The file does not exist for the external tool named {0}.
 ExternalToolsUtil_invalidDirectory__0_ = The working directory {0} does not exist for the external tool named {1}.
+# end 
 
 ExternalToolsBuilderTab_Run_this_builder_for__1=Run the builder:
 ExternalToolsBuilderTab__Full_builds_2=A&fter a \"Clean\"
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java
index f9784bf..d1bf2d9 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsMainTab.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,8 @@ package org.eclipse.ui.externaltools.internal.launchConfigurations;
 
 
 import java.io.File;
+
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
@@ -46,7 +48,6 @@ import org.eclipse.ui.dialogs.ContainerSelectionDialog;
 import org.eclipse.ui.dialogs.ResourceSelectionDialog;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsImages;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 
 /**
  * The external tools main tab allows the user to configure primary attributes
@@ -604,7 +605,7 @@ public abstract class ExternalToolsMainTab extends AbstractLaunchConfigurationTa
 	 * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
 	 */
 	public Image getImage() {
-		return ExternalToolsImages.getImage(IExternalToolConstants.IMG_TAB_MAIN);
+		return ExternalToolsImages.getImage(org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.IMG_TAB_MAIN);
 	}
 	
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java
index cbc7633..8f7a871 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/launchConfigurations/ExternalToolsUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,21 +13,14 @@
 package org.eclipse.ui.externaltools.internal.launchConfigurations;
 
 
-import java.io.File;
-
+import org.eclipse.core.externaltools.internal.launchConfigurations.ExternalToolsCoreUtil;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.core.variables.IStringVariableManager;
-import org.eclipse.core.variables.VariablesPlugin;
-import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
+import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
 
 /**
  * Utilities for external tool launch configurations.
@@ -47,7 +40,7 @@ public class ExternalToolsUtil {
 	 * @param code error code
 	 */
 	protected static void abort(String message, Throwable exception, int code) throws CoreException {
-		throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, code, message, exception));
+		throw new CoreException(new Status(IStatus.ERROR, ExternalToolsPlugin.PLUGIN_ID, code, message, exception));
 	}
 	
 	/**
@@ -63,26 +56,7 @@ public class ExternalToolsUtil {
 	 * system
 	 */
 	public static IPath getLocation(ILaunchConfiguration configuration) throws CoreException {
-		String location = configuration.getAttribute(IExternalToolConstants.ATTR_LOCATION, (String) null);
-		if (location == null) {
-			abort(NLS.bind(ExternalToolsLaunchConfigurationMessages.ExternalToolsUtil_Location_not_specified_by__0__1, new String[] { configuration.getName()}), null, 0);
-		} else {
-			String expandedLocation = getStringVariableManager().performStringSubstitution(location);
-			if (expandedLocation == null || expandedLocation.length() == 0) {
-				String msg = NLS.bind(ExternalToolsLaunchConfigurationMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
-				abort(msg, null, 0);
-			} else {
-				File file = new File(expandedLocation);
-				if (file.isFile()) {
-					return new Path(expandedLocation);
-				} 
-				
-				String msg = NLS.bind(ExternalToolsLaunchConfigurationMessages.ExternalToolsUtil_invalidLocation__0_, new Object[] { configuration.getName()});
-				abort(msg, null, 0);
-			}
-		}
-		// execution will not reach here
-		return null;
+		return ExternalToolsCoreUtil.getLocation(configuration);
 	}
 	
 	/**
@@ -95,7 +69,7 @@ public class ExternalToolsUtil {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static boolean getCaptureOutput(ILaunchConfiguration configuration) throws CoreException {
-	    return configuration.getAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, true);
+	    return ExternalToolsCoreUtil.getCaptureOutput(configuration);
 	}
 
 	/**
@@ -113,19 +87,7 @@ public class ExternalToolsUtil {
 	 * file system
 	 */
 	public static IPath getWorkingDirectory(ILaunchConfiguration configuration) throws CoreException {
-		String location = configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) null);
-		if (location != null) {
-			String expandedLocation = getStringVariableManager().performStringSubstitution(location);
-			if (expandedLocation.length() > 0) {
-				File path = new File(expandedLocation);
-				if (path.isDirectory()) {
-					return new Path(expandedLocation);
-				} 
-				String msg = NLS.bind(ExternalToolsLaunchConfigurationMessages.ExternalToolsUtil_invalidDirectory__0_, new Object[] { expandedLocation, configuration.getName()});
-				abort(msg, null, 0);
-			}
-		}
-		return null;
+		return ExternalToolsCoreUtil.getWorkingDirectory(configuration);
 	}
 
 	/**
@@ -139,16 +101,7 @@ public class ExternalToolsUtil {
 	 * configuration attribute, or if unable to resolve any variables
 	 */
 	public static String[] getArguments(ILaunchConfiguration configuration) throws CoreException {
-		String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
-		if (args != null) {
-			String expanded = getStringVariableManager().performStringSubstitution(args);
-			return parseStringIntoList(expanded);
-		}
-		return null;
-	}
-
-	private static IStringVariableManager getStringVariableManager() {
-		return VariablesPlugin.getDefault().getStringVariableManager();
+		return ExternalToolsCoreUtil.getArguments(configuration);
 	}
 	
 	/**
@@ -163,7 +116,7 @@ public class ExternalToolsUtil {
 	 * @throws CoreException if unable to access the associated attribute
 	 */
 	public static boolean isBuilderEnabled(ILaunchConfiguration configuration) throws CoreException {
-		return configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_ENABLED, true);
+		return ExternalToolsCoreUtil.isBuilderEnabled(configuration);
 	}
 	
 	/**
@@ -173,12 +126,7 @@ public class ExternalToolsUtil {
 	 * @throws CoreException if an exception occurs while retrieving the resources
 	 */
 	public static IResource[] getResourcesForBuildScope(ILaunchConfiguration configuration) throws CoreException {
-		String scope = configuration.getAttribute(IExternalToolConstants.ATTR_BUILDER_SCOPE, (String) null);
-		if (scope == null) {
-			return null;
-		}
-	
-		return RefreshTab.getRefreshResources(scope);
+		return ExternalToolsCoreUtil.getResourcesForBuildScope(configuration);
 	}
 	
 	/**
@@ -193,11 +141,7 @@ public class ExternalToolsUtil {
 	 * @return the array of arguments
 	 */
 	public static String[] parseStringIntoList(String arguments) {
-		if (arguments == null || arguments.length() == 0) {
-			return new String[0];
-		}
-		String[] res= DebugPlugin.parseArguments(arguments);
-		return res;		
+		return ExternalToolsCoreUtil.parseStringIntoList(arguments);
 	}	
 	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java
index 8a4a220..a5dc208 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/ExternalToolMenuDelegate.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java
index 75b10bc..dcb105f 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/menu/OpenExternalToolsConfigurations.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java
index 6e8a3a2..8211502 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/BuilderUtils.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,66 +10,32 @@
  *******************************************************************************/
 package org.eclipse.ui.externaltools.internal.model;
 
-import java.util.HashMap;
 import java.util.Map;
-import java.util.StringTokenizer;
 
+import org.eclipse.core.externaltools.internal.model.BuilderCoreUtils;
 import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationType;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.externaltools.internal.registry.ExternalToolMigration;
 
 /**
  * Utility methods for working with external tool project builders.
  */
 public class BuilderUtils {
-
-	public static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle"; //$NON-NLS-1$
-
-	/**
-	 * Constant used to find a builder using the 3.0-interim format
-	 */
-	public static final String BUILDER_FOLDER_NAME= ".externalToolBuilders"; //$NON-NLS-1$
-	/**
-	 * Constant used to represent the current project in the 3.0-final format.
-	 */
-	public static final String PROJECT_TAG= "<project>"; //$NON-NLS-1$
-	
-	public static final String VERSION_1_0= "1.0"; //$NON-NLS-1$
-	public static final String VERSION_2_1= "2.1"; //$NON-NLS-1$
-	// The format shipped up to and including Eclipse 3.0 RC1
-	public static final String VERSION_3_0_interim= "3.0.interim"; //$NON-NLS-1$
-	// The format shipped in Eclipse 3.0 final
-	public static final String VERSION_3_0_final= "3.0"; //$NON-NLS-1$
 	
 	// Extension point constants.
-	private static final String TAG_CONFIGURATION_MAP= "configurationMap"; //$NON-NLS-1$
-	private static final String TAG_SOURCE_TYPE= "sourceType"; //$NON-NLS-1$
-	private static final String TAG_BUILDER_TYPE= "builderType"; //$NON-NLS-1$
-    
-    private static final String BUILD_TYPE_SEPARATOR = ","; //$NON-NLS-1$
-    private static final int[] DEFAULT_BUILD_TYPES= new int[] {
-                                    IncrementalProjectBuilder.INCREMENTAL_BUILD,
-                                    IncrementalProjectBuilder.FULL_BUILD};
+	private static final String TAG_CONFIGURATION_MAP = "configurationMap"; //$NON-NLS-1$
+	private static final String TAG_SOURCE_TYPE = "sourceType"; //$NON-NLS-1$
+	private static final String TAG_BUILDER_TYPE = "builderType"; //$NON-NLS-1$	
 
 	/**
 	 * Returns a launch configuration from the given ICommand arguments. If the
@@ -81,42 +47,7 @@ public class BuilderUtils {
 	 * <code>null</code> if not possible.
 	 */
 	public static ILaunchConfiguration configFromBuildCommandArgs(IProject project, Map commandArgs, String[] version) {
-		String configHandle = (String) commandArgs.get(LAUNCH_CONFIG_HANDLE);
-		if (configHandle == null) {
-			// Probably an old-style (Eclipse 1.0 or 2.0) external tool. Try to migrate.
-			version[0]= VERSION_1_0;
-			return ExternalToolMigration.configFromArgumentMap(commandArgs);
-		}
-		ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
-		ILaunchConfiguration configuration= null;
-		if (configHandle.startsWith(PROJECT_TAG)) {
-			version[0]= VERSION_3_0_final;
-			IPath path= new Path(configHandle);
-			IFile file= project.getFile(path.removeFirstSegments(1));
-			if (file.exists()) {
-				configuration= manager.getLaunchConfiguration(file);
-			}
-		} else {
-		    // Try treating the handle as a file name.
-			// This is the format used in 3.0 RC1.
-			IPath path= new Path(BUILDER_FOLDER_NAME).append(configHandle);
-			IFile file= project.getFile(path);
-			if (file.exists()) {
-				version[0]= VERSION_3_0_interim;
-				configuration= manager.getLaunchConfiguration(file);
-			} else {
-				try {
-					// Treat the configHandle as a memento. This is the format
-					// used in Eclipse 2.1.
-					configuration = manager.getLaunchConfiguration(configHandle);
-				} catch (CoreException e) {
-				}
-				if (configuration != null) {
-					version[0]= VERSION_2_1;
-				}
-			}
-		}
-		return configuration;
+		return BuilderCoreUtils.configFromBuildCommandArgs(project, commandArgs, version);
 	}
 
 	/**
@@ -144,33 +75,7 @@ public class BuilderUtils {
 	}
 	
 	public static void configureTriggers(ILaunchConfiguration config, ICommand newCommand) throws CoreException {
-		newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD, false);
-		newCommand.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD, false);
-		newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
-		newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, false);
-		String buildKinds= config.getAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String)null);
-		int[] triggers= BuilderUtils.buildTypesToArray(buildKinds);
-		for (int i = 0; i < triggers.length; i++) {
-			switch (triggers[i]) {
-				case IncrementalProjectBuilder.FULL_BUILD:
-					newCommand.setBuilding(IncrementalProjectBuilder.FULL_BUILD, true);
-					break;
-				case IncrementalProjectBuilder.INCREMENTAL_BUILD:
-					newCommand.setBuilding(IncrementalProjectBuilder.INCREMENTAL_BUILD, true);
-					break;
-				case IncrementalProjectBuilder.AUTO_BUILD:
-					newCommand.setBuilding(IncrementalProjectBuilder.AUTO_BUILD, true);
-					break;
-				case IncrementalProjectBuilder.CLEAN_BUILD:
-					newCommand.setBuilding(IncrementalProjectBuilder.CLEAN_BUILD, true);
-					break;
-			}
-		}
-		if (!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false)) {
-			ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
-			copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true);
-			copy.doSave();
-		}
+		BuilderCoreUtils.configureTriggers(config, newCommand);
 	}
 
 	/**
@@ -184,7 +89,7 @@ public class BuilderUtils {
 	 * @return whether the given config represents an unmigrated builder
 	 */
 	public static boolean isUnmigratedConfig(ILaunchConfiguration config) {
-		return config.isWorkingCopy() && ((ILaunchConfigurationWorkingCopy) config).getOriginal() == null;
+		return BuilderCoreUtils.isUnmigratedConfig(config);
 	}
 
 	/**
@@ -194,37 +99,7 @@ public class BuilderUtils {
 	 * @return the configured build command
 	 */
 	public static ICommand toBuildCommand(IProject project, ILaunchConfiguration config, ICommand command) throws CoreException {
-		Map args= null;
-		if (isUnmigratedConfig(config)) {
-			// This config represents an old external tool builder that hasn't
-			// been edited. Try to find the old ICommand and reuse the arguments.
-			// The goal here is to not change the storage format of old, unedited builders.
-			ICommand[] commands= project.getDescription().getBuildSpec();
-			for (int i = 0; i < commands.length; i++) {
-				ICommand projectCommand = commands[i];
-				String name= ExternalToolMigration.getNameFromCommandArgs(projectCommand.getArguments());
-				if (name != null && name.equals(config.getName())) {
-					args= projectCommand.getArguments();
-					break;
-				}
-			}
-		} else {
-			if (config instanceof ILaunchConfigurationWorkingCopy) {
-				ILaunchConfigurationWorkingCopy workingCopy= (ILaunchConfigurationWorkingCopy) config;
-				if (workingCopy.getOriginal() != null) {
-					config= workingCopy.getOriginal();
-				}
-			}
-			args= new HashMap();
-			// Launch configuration builders are stored with a project-relative path
-			StringBuffer buffer= new StringBuffer(PROJECT_TAG);
-			// Append the project-relative path (workspace path minus first segment)
-			buffer.append('/').append(config.getFile().getFullPath().removeFirstSegments(1));
-			args.put(LAUNCH_CONFIG_HANDLE, buffer.toString());
-		}
-		command.setBuilderName(ExternalToolBuilder.ID);
-		command.setArguments(args);
-		return command;
+		return BuilderCoreUtils.toBuildCommand(project, config, command);
 	}
 	
 	/**
@@ -233,7 +108,7 @@ public class BuilderUtils {
 	 * if an extension has been specified to explicitly declare the mapping.
 	 */
 	public static ILaunchConfigurationType getConfigurationDuplicationType(ILaunchConfiguration config) throws CoreException {
-		IExtensionPoint ep= Platform.getExtensionRegistry().getExtensionPoint(IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.EXTENSION_POINT_CONFIGURATION_DUPLICATION_MAPS); 
+		IExtensionPoint ep= Platform.getExtensionRegistry().getExtensionPoint(ExternalToolsPlugin.PLUGIN_ID, IExternalToolConstants.EXTENSION_POINT_CONFIGURATION_DUPLICATION_MAPS); 
 		IConfigurationElement[] elements = ep.getConfigurationElements();
 		String sourceType= config.getType().getIdentifier();
 		String builderType= null;
@@ -258,15 +133,7 @@ public class BuilderUtils {
 	 * <code>null</code> if the folder could not be created
 	 */
 	public static IFolder getBuilderFolder(IProject project, boolean create) {
-		IFolder folder = project.getFolder(BUILDER_FOLDER_NAME);
-		if (!folder.exists() && create) {
-			try {
-				folder.create(true, true, new NullProgressMonitor());
-			} catch (CoreException e) {
-				return null;
-			}
-		}
-		return folder;
+		return BuilderCoreUtils.getBuilderFolder(project, create);
 	}
 
 	/**
@@ -278,7 +145,7 @@ public class BuilderUtils {
 	public static ILaunchConfiguration duplicateConfiguration(IProject project, ILaunchConfiguration config) throws CoreException {
 		Map attributes= config.getAttributes();
 		String newName= new StringBuffer(config.getName()).append(ExternalToolsModelMessages.BuilderUtils_7).toString();
-		newName= DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(newName);
+		newName= DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(newName);
 		ILaunchConfigurationType newType= getConfigurationDuplicationType(config);
 		ILaunchConfigurationWorkingCopy newWorkingCopy= newType.newInstance(getBuilderFolder(project, true), newName);
 		newWorkingCopy.setAttributes(attributes);
@@ -302,22 +169,9 @@ public class BuilderUtils {
 	 * new launch configuration
 	 */
 	public static ILaunchConfiguration migrateBuilderConfiguration(IProject project, ILaunchConfigurationWorkingCopy workingCopy) throws CoreException {
-		workingCopy.setContainer(getBuilderFolder(project, true));
-		// Before saving, make sure the name is valid
-		String name= workingCopy.getName();
-		name= name.replace('/', '.');
-		if (name.charAt(0) == ('.')) {
-			name = name.substring(1);
-		}
-		IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
-		if (!status.isOK()) {
-			name = "ExternalTool"; //$NON-NLS-1$
-		}
-		name = DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(name);
-		workingCopy.rename(name);
-		return workingCopy.doSave();
+		return BuilderCoreUtils.migrateBuilderConfiguration(project, workingCopy);
 	}
-
+	
     /**
      * Converts the build types string into an array of
      * build kinds.
@@ -326,61 +180,6 @@ public class BuilderUtils {
      * @return the array of build kinds.
      */
     public static int[] buildTypesToArray(String buildTypes) {
-    	if (buildTypes == null || buildTypes.length() == 0) {
-    		return DEFAULT_BUILD_TYPES;
-    	}
-    	
-    	int count = 0;
-    	boolean incremental = false;
-    	boolean full = false;
-    	boolean auto = false;
-        boolean clean= false;
-    
-    	StringTokenizer tokenizer = new StringTokenizer(buildTypes, BUILD_TYPE_SEPARATOR);
-    	while (tokenizer.hasMoreTokens()) {
-    		String token = tokenizer.nextToken();
-    		if (IExternalToolConstants.BUILD_TYPE_INCREMENTAL.equals(token)) {
-    			if (!incremental) {
-    				incremental = true;
-    				count++;
-    			}
-    		} else if (IExternalToolConstants.BUILD_TYPE_FULL.equals(token)) {
-    			if (!full) {
-    				full = true;
-    				count++;
-    			}
-    		} else if (IExternalToolConstants.BUILD_TYPE_AUTO.equals(token)) {
-    			if (!auto) {
-    				auto = true;
-    				count++;
-    			}
-    		} else if (IExternalToolConstants.BUILD_TYPE_CLEAN.equals(token)) {
-                if (!clean) {
-                    clean = true;
-                    count++;
-                }
-            }
-    	}
-    
-    	int[] results = new int[count];
-    	count = 0;
-    	if (incremental) {
-    		results[count] = IncrementalProjectBuilder.INCREMENTAL_BUILD;
-    		count++;
-    	}
-    	if (full) {
-    		results[count] = IncrementalProjectBuilder.FULL_BUILD;
-    		count++;
-    	}
-    	if (auto) {
-    		results[count] = IncrementalProjectBuilder.AUTO_BUILD;
-    		count++;
-    	}
-        if (clean) {
-            results[count] = IncrementalProjectBuilder.CLEAN_BUILD;
-            count++;
-        }
-    
-    	return results;
-    }
+    	return BuilderCoreUtils.buildTypesToArray(buildTypes);
+    }	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java
deleted file mode 100644
index ba3a220..0000000
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolBuilder.java	
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Matthew Conway  - Bug 175186
- *******************************************************************************/
-package org.eclipse.ui.externaltools.internal.model;
-
-
-import java.util.Map;
-
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.registry.ExternalToolMigration;
-import org.osgi.framework.Bundle;
-
-/**
- * This project builder implementation will run an external tool during the
- * build process. 
- */
-public final class ExternalToolBuilder extends IncrementalProjectBuilder {
-	private final class IgnoreTeamPrivateChanges implements IResourceDeltaVisitor {
-		private boolean[] fTrueChange;
-		private IgnoreTeamPrivateChanges(boolean[] trueChange) {
-			super();
-			fTrueChange= trueChange;
-		}
-		public boolean visit(IResourceDelta visitDelta) throws CoreException {
-			IResource resource= visitDelta.getResource();
-			if (resource instanceof IFile) {
-				fTrueChange[0]= true;
-				return false;
-			}
-			return true;
-		}
-	}
-
-	public static final String ID = "org.eclipse.ui.externaltools.ExternalToolBuilder"; //$NON-NLS-1$;
-
-	private static String buildType = IExternalToolConstants.BUILD_TYPE_NONE;
-	
-	private static IProject buildProject= null;
-    private static IResourceDelta buildDelta= null;
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.core.internal.events.InternalBuilder#build(int, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {		
-		if (ExternalToolsPlugin.getDefault().getBundle().getState() != Bundle.ACTIVE) {
-			return null;
-		}
-		
-		ILaunchConfiguration config= BuilderUtils.configFromBuildCommandArgs(getProject(), args, new String[1]);
-        if (config == null) {
-            throw ExternalToolsPlugin.newError(ExternalToolsModelMessages.ExternalToolBuilder_0, null);
-        }
-		IProject[] projectsWithinScope= null;
-		IResource[] resources = ExternalToolsUtil.getResourcesForBuildScope(config);
-		if (resources != null) {
-			projectsWithinScope= new IProject[resources.length];
-			for (int i = 0; i < resources.length; i++) {
-				projectsWithinScope[i]= resources[i].getProject();
-			}
-		}
-        boolean kindCompatible= commandConfiguredForKind(config, kind);
-        if (kindCompatible && configEnabled(config)) {
-            doBuildBasedOnScope(resources, kind, config, monitor);
-        }
-        
-		return projectsWithinScope;
-	}
-
-    private boolean commandConfiguredForKind(ILaunchConfiguration config, int kind) {
-        try {
-            if (!(config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
-                ICommand command= getCommand();
-                //adapt the builder command to make use of the 3.1 support for setting command build kinds
-                //this will only happen once for builder/command defined before the support existed
-                BuilderUtils.configureTriggers(config, command);
-                IProjectDescription desc= getProject().getDescription();
-                ICommand[] commands= desc.getBuildSpec();
-                int index= getBuilderCommandIndex(commands, command);
-                if (index != -1) {
-                    commands[index]= command;
-                    desc.setBuildSpec(commands);
-                    getProject().setDescription(desc, null);
-                    ILaunchConfigurationWorkingCopy copy= config.getWorkingCopy();
-                    copy.setAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, true);
-                    copy.doSave();
-                }
-                return command.isBuilding(kind);
-            }
-        } catch (CoreException e) {
-           ExternalToolsPlugin.getDefault().log(e);
-           return true;
-        }
-        return true;
-    }
-    
-    private int getBuilderCommandIndex(ICommand[] buildSpec, ICommand command) {
-        Map commandArgs= command.getArguments();
-        if (commandArgs == null) {
-            return -1;
-        }
-        String handle= (String) commandArgs.get(BuilderUtils.LAUNCH_CONFIG_HANDLE);
-        if (handle == null) {
-            return -1;
-        }
-        for (int i = 0; i < buildSpec.length; ++i) {
-            ICommand buildSpecCommand= buildSpec[i];
-            if (ID.equals(buildSpecCommand.getBuilderName())) {
-                Map buildSpecArgs= buildSpecCommand.getArguments();
-                if (buildSpecArgs != null) {
-                    String buildSpecHandle= (String) buildSpecArgs.get(BuilderUtils.LAUNCH_CONFIG_HANDLE);
-                    if (handle.equals(buildSpecHandle)) {
-                        return i;
-                    }
-                }
-            }
-        }
-        return -1;
-    }
-
-	/**
-	 * Returns whether the given builder config is enabled or not.
-	 * 
-	 * @param config the config to examine
-	 * @return whether the config is enabled
-	 */
-	private boolean configEnabled(ILaunchConfiguration config) {
-		try {
-			return ExternalToolsUtil.isBuilderEnabled(config);
-		} catch (CoreException e) {
-			ExternalToolsPlugin.getDefault().log(e);
-		}
-		return true;
-	}
-
-	private void doBuildBasedOnScope(IResource[] resources, int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
-		boolean buildForChange = true;
-		if (kind != FULL_BUILD) { //scope not applied for full builds
-			if (resources != null && resources.length > 0) {
-				buildForChange = buildScopeIndicatesBuild(resources);
-			}
-		}
-
-		if (buildForChange) {
-			launchBuild(kind, config, monitor);
-		}
-	}
-	
-	private void launchBuild(int kind, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException {
-		monitor.subTask(NLS.bind(ExternalToolsModelMessages.ExternalToolBuilder_Running__0_____1, new String[] { config.getName()}));
-		buildStarted(kind);
-		// The default value for "launch in background" is true in debug core. If
-		// the user doesn't go through the UI, the new attribute won't be set. This means
-		// that existing Ant builders will try to run in the background (and likely conflict with
-		// each other) without migration.
-		config= ExternalToolMigration.migrateRunInBackground(config);
-		config.launch(ILaunchManager.RUN_MODE, monitor);
-		buildEnded();
-	}
-
-	/**
-	 * Returns the build type being performed if the
-	 * external tool is being run as a project builder.
-	 * 
-	 * @return one of the <code>IExternalToolConstants.BUILD_TYPE_*</code> constants.
-	 */
-	public static String getBuildType() {
-		return buildType;
-	}
-	
-	/**
-	 * Returns the project that is being built and has triggered the current external
-	 * tool builder. <code>null</code> is returned if no build is currently occurring.
-	 * 
-	 * @return project being built or <code>null</code>.
-	 */
-	public static IProject getBuildProject() {
-		return buildProject;
-	}
-
-    /**
-     * Returns the <code>IResourceDelta</code> that is being built and has triggered the current external
-     * tool builder. <code>null</code> is returned if no build is currently occurring.
-     * 
-     * @return resource delta for the build or <code>null</code>
-     */
-    public static IResourceDelta getBuildDelta() {
-        return buildDelta;
-    }
-    
-	/**
-	 * Stores the currently active build kind and build project when a build begins
-	 * @param buildKind
-	 */
-	private void buildStarted(int buildKind) {
-		switch (buildKind) {
-			case IncrementalProjectBuilder.INCREMENTAL_BUILD :
-				buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
-				buildDelta = getDelta(getProject());
-				break;
-			case IncrementalProjectBuilder.FULL_BUILD :
-				buildType = IExternalToolConstants.BUILD_TYPE_FULL;
-				break;
-			case IncrementalProjectBuilder.AUTO_BUILD :
-				buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
-				buildDelta = getDelta(getProject());
-				break;
-            case IncrementalProjectBuilder.CLEAN_BUILD :
-                buildType = IExternalToolConstants.BUILD_TYPE_CLEAN;
-                break;
-			default :
-				buildType = IExternalToolConstants.BUILD_TYPE_NONE;
-				break;
-		}
-		buildProject= getProject();
-	}
-	
-	/**
-	 * Clears the current build kind, build project and build delta when a build finishes.
-	 */
-	private void buildEnded() {
-		buildType= IExternalToolConstants.BUILD_TYPE_NONE;
-		buildProject= null;
-        buildDelta= null;
-	}
-	
-	private boolean buildScopeIndicatesBuild(IResource[] resources) {
-		for (int i = 0; i < resources.length; i++) {
-			IResourceDelta delta = getDelta(resources[i].getProject());
-			if (delta == null) {
-				//project just added to the workspace..no previous build tree
-				return true;
-			} 
-			IPath path= resources[i].getProjectRelativePath();
-			IResourceDelta change= delta.findMember(path);
-			if (change != null) {
-				final boolean[] trueChange= new boolean[1];
-				trueChange[0]= false;
-				try {
-					change.accept(new IgnoreTeamPrivateChanges(trueChange));
-				} catch (CoreException e) {
-					ExternalToolsPlugin.getDefault().log("Internal error resolving changed resources during build", e); //$NON-NLS-1$
-				}
-				
-				return trueChange[0]; //filtered out team private changes
-			}
-		}
-		return false;
-	}
-    
-    protected void clean(IProgressMonitor monitor) throws CoreException {
-	    ICommand command= getCommand();
-        ILaunchConfiguration config= BuilderUtils.configFromBuildCommandArgs(getProject(), command.getArguments(), new String[1]);
-    	if (!configEnabled(config)) {
-	    	return;
-	    }
-        
-        if ((!config.getAttribute(IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED, false))) {
-            //old behavior
-            super.clean(monitor);
-            return;
-        }
-	
-		launchBuild(IncrementalProjectBuilder.CLEAN_BUILD, config, monitor);
-    }
-}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java
index c45144d..f21865e 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsImages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java
index f683964..3b66a05 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -15,8 +15,6 @@ public class ExternalToolsModelMessages extends NLS {
 	private static final String BUNDLE_NAME = "org.eclipse.ui.externaltools.internal.model.ExternalToolsModelMessages";//$NON-NLS-1$
     
 	public static String ImageDescriptorRegistry_Allocating_image_for_wrong_display_1;
-	public static String ExternalToolBuilder_Running__0_____1;
-	public static String ExternalToolBuilder_0;
 	public static String BuilderUtils_5;
 	public static String BuilderUtils_6;
 	public static String BuilderUtils_7;
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties
index 528fcb2..cb3e2a6 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsModelMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,8 +10,6 @@
 ###############################################################################
 
 ImageDescriptorRegistry_Allocating_image_for_wrong_display_1=Allocating image for wrong display
-ExternalToolBuilder_Running__0_____1=Running {0}...
-ExternalToolBuilder_0=The builder launch configuration could not be found.
 BuilderUtils_5=Command Error
 BuilderUtils_6=An error occurred while saving the build commands of the project
 BuilderUtils_7=\ [Builder]
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java
index 130c6a6..f3b82cb 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ExternalToolsPlugin.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,19 +10,29 @@
  *******************************************************************************/
 package org.eclipse.ui.externaltools.internal.model;
 
-
 import java.net.MalformedURLException;
 import java.net.URL;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchListener;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWindowListener;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.externaltools.internal.program.launchConfigurations.ExternalToolsProgramMessages;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -30,15 +40,78 @@ import org.osgi.framework.BundleContext;
 /**
  * External tools plug-in class
  */
-public final class ExternalToolsPlugin extends AbstractUIPlugin {
+public final class ExternalToolsPlugin extends AbstractUIPlugin implements
+		ILaunchListener {
+	
+	public static final String PLUGIN_ID = "org.eclipse.ui.externaltools"; //$NON-NLS-1$
+	
 	/**
 	 * Status representing no problems encountered during operation.
 	 */
-	public static final IStatus OK_STATUS = new Status(IStatus.OK, IExternalToolConstants.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
-
+	public static final IStatus OK_STATUS = new Status(IStatus.OK, PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+		
 	private static ExternalToolsPlugin plugin;
-	
-	private static final String EMPTY_STRING= ""; //$NON-NLS-1$
+
+	private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+	private static IWindowListener fWindowListener;
+
+	private static ILaunchManager launchManager;
+
+	/**
+	 * A window listener that warns the user about any running programs when the
+	 * workbench closes. Programs are killed when the VM exits.
+	 */
+	private class ProgramLaunchWindowListener implements IWindowListener {
+		public void windowActivated(IWorkbenchWindow window) {
+		}
+
+		public void windowDeactivated(IWorkbenchWindow window) {
+		}
+
+		public void windowClosed(IWorkbenchWindow window) {
+			IWorkbenchWindow windows[] = PlatformUI.getWorkbench()
+					.getWorkbenchWindows();
+			if (windows.length > 1) {
+				// There are more windows still open.
+				return;
+			}
+			ILaunchManager manager = DebugPlugin.getDefault()
+					.getLaunchManager();
+			ILaunchConfigurationType programType = manager
+					.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE);
+			if (programType == null) {
+				return;
+			}
+			ILaunch launches[] = manager.getLaunches();
+			ILaunchConfigurationType configType;
+			ILaunchConfiguration config;
+			for (int i = 0; i < launches.length; i++) {
+				try {
+					config = launches[i].getLaunchConfiguration();
+					if (config == null) {
+						continue;
+					}
+					configType = config.getType();
+				} catch (CoreException e) {
+					continue;
+				}
+				if (configType.equals(programType)) {
+					if (!launches[i].isTerminated()) {
+						MessageDialog
+								.openWarning(
+										window.getShell(),
+										ExternalToolsProgramMessages.ProgramLaunchDelegate_Workbench_Closing_1,
+										ExternalToolsProgramMessages.ProgramLaunchDelegate_The_workbench_is_exiting);
+						break;
+					}
+				}
+			}
+		}
+
+		public void windowOpened(IWorkbenchWindow window) {
+		}
+	}
 
 	/**
 	 * Create an instance of the External Tools plug-in.
@@ -63,14 +136,14 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin {
 		if (message == null) {
 			message= EMPTY_STRING; 
 		}		
-		return new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, 0, message, exception);
+		return new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception);
 	}
 
 	/**
 	 * Returns a new <code>CoreException</code> for this plug-in
 	 */
 	public static CoreException newError(String message, Throwable exception) {
-		return new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, 0, message, exception));
+		return new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, 0, message, exception));
 	}
 
 	/**
@@ -164,4 +237,52 @@ public final class ExternalToolsPlugin extends AbstractUIPlugin {
 			super.stop(context);
 		}
 	}
+
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		// Listen to launches to lazily create "launch processors"
+		launchManager = DebugPlugin.getDefault().getLaunchManager();
+		ILaunch[] launches = launchManager.getLaunches();
+		if (launches.length > 0) {
+			if (fWindowListener == null) {
+				fWindowListener = new ProgramLaunchWindowListener();
+				PlatformUI.getWorkbench().addWindowListener(fWindowListener);
+			}
+		} else {
+			// if no launches, wait for first launch to initialize processors
+			launchManager.addLaunchListener(this);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchListener#launchAdded(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchAdded(ILaunch launch) {
+		ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
+		try {
+			ILaunchConfigurationType launchConfigurationType = launchConfiguration.getType();
+			if (launchConfigurationType.getIdentifier().equals(
+							IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE)) {
+				if (fWindowListener == null) {
+					fWindowListener = new ProgramLaunchWindowListener();
+					PlatformUI.getWorkbench().addWindowListener(fWindowListener);
+					launchManager.removeLaunchListener(this);
+				}
+			}
+		} catch (CoreException e) {
+			log(e);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchListener#launchChanged(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchChanged(ILaunch launch) {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.debug.core.ILaunchListener#launchRemoved(org.eclipse.debug.core.ILaunch)
+	 */
+	public void launchRemoved(ILaunch launch) {
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java
index 31de4e3..4c8dd3c 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/IExternalToolConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,61 +32,72 @@ public interface IExternalToolConstants {
 	// ------- Refresh Variables -------
 	/**
 	 * Variable that expands to the workspace root object (value <code>workspace</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#VAR_WORKSPACE}
 	 */
-	public static final String VAR_WORKSPACE = "workspace"; //$NON-NLS-1$
+	public static final String VAR_WORKSPACE = org.eclipse.core.externaltools.internal.IExternalToolConstants.VAR_WORKSPACE;
 	/**
 	 * Variable that expands to the project resource (value <code>project</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#VAR_PROJECT}
 	 */
-	public static final String VAR_PROJECT = "project"; //$NON-NLS-1$
+	public static final String VAR_PROJECT = org.eclipse.core.externaltools.internal.IExternalToolConstants.VAR_PROJECT;
 	/**
 	 * Variable that expands to the container resource (value <code>container</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#VAR_CONTAINER}
 	 */
-	public static final String VAR_CONTAINER = "container"; //$NON-NLS-1$
+	public static final String VAR_CONTAINER = org.eclipse.core.externaltools.internal.IExternalToolConstants.VAR_CONTAINER;
 	/**
 	 * Variable that expands to a resource (value <code>resource</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#VAR_RESOURCE}
 	 */
-	public static final String VAR_RESOURCE = "resource"; //$NON-NLS-1$
+	public static final String VAR_RESOURCE = org.eclipse.core.externaltools.internal.IExternalToolConstants.VAR_RESOURCE;
 	/**
 	 * Variable that expands to the working set object (value <code>working_set</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#VAR_WORKING_SET}
 	 */
-	public static final String VAR_WORKING_SET = "working_set"; //$NON-NLS-1$
+	public static final String VAR_WORKING_SET = org.eclipse.core.externaltools.internal.IExternalToolConstants.VAR_WORKING_SET;
 	// ------- Tool Types -------
 	/**
 	 * External tool type for programs such as executables, batch files, 
 	 * shell scripts, etc (value <code>programType</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#TOOL_TYPE_PROGRAM}
 	 */
-	public static final String TOOL_TYPE_PROGRAM = "programType"; //$NON-NLS-1$;
+	public static final String TOOL_TYPE_PROGRAM = org.eclipse.core.externaltools.internal.IExternalToolConstants.TOOL_TYPE_PROGRAM;
 
 	// ------- Build Types -------
 	/**
 	 * Build type indicating an incremental project build request for
 	 * the external tool running as a builder (value <code>incremental</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#BUILD_TYPE_INCREMENTAL}
 	 */
-	public static final String BUILD_TYPE_INCREMENTAL = "incremental"; //$NON-NLS-1$
+	public static final String BUILD_TYPE_INCREMENTAL = org.eclipse.core.externaltools.internal.IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
 
 	/**
 	 * Build type indicating a full project build request for
 	 * the external tool running as a builder (value <code>full</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#BUILD_TYPE_FULL}
 	 */
-	public static final String BUILD_TYPE_FULL = "full"; //$NON-NLS-1$
+	public static final String BUILD_TYPE_FULL = org.eclipse.core.externaltools.internal.IExternalToolConstants.BUILD_TYPE_FULL;
 
 	/**
 	 * Build type indicating an automatic project build request for
 	 * the external tool running as a builder (value <code>auto</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#BUILD_TYPE_AUTO}
 	 */
-	public static final String BUILD_TYPE_AUTO = "auto"; //$NON-NLS-1$
+	public static final String BUILD_TYPE_AUTO = org.eclipse.core.externaltools.internal.IExternalToolConstants.BUILD_TYPE_AUTO;
 	
 	/**
 	 * Build type indicating a clean project build request for
 	 * the external tool running as a builder (value <code>clean</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#BUILD_TYPE_CLEAN}
 	 */
-	public static final String BUILD_TYPE_CLEAN = "clean"; //$NON-NLS-1$
+	public static final String BUILD_TYPE_CLEAN = org.eclipse.core.externaltools.internal.IExternalToolConstants.BUILD_TYPE_CLEAN;
 
 	/**
 	 * Build type indicating no project build request for
 	 * the external tool running as a builder (value <code>none</code>).
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#BUILD_TYPE_NONE}
 	 */
-	public static final String BUILD_TYPE_NONE = "none"; //$NON-NLS-1$
+	public static final String BUILD_TYPE_NONE = org.eclipse.core.externaltools.internal.IExternalToolConstants.BUILD_TYPE_NONE;
 
 	// ------- Images -------
 
@@ -103,28 +114,32 @@ public interface IExternalToolConstants {
 	// ------- Launch configuration types --------
 	/**
 	 * Program launch configuration type identifier.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE}
 	 */
-	public static final String ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"; //$NON-NLS-1$
+	public static final String ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE = org.eclipse.core.externaltools.internal.IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE;
 	
 	/**
 	 * Program builder launch configuration type identifier. Program project
 	 * builders are of this type.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE}
 	 */
-	public static final String ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"; //$NON-NLS-1$	
+	public static final String ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE = org.eclipse.core.externaltools.internal.IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE;
 	
 	// ------- Launch configuration category --------
 	/**
 	 * Identifier for external tools launch configuration category. Launch
 	 * configuration types for external tools that appear in the external tools
 	 * launch configuration dialog should belong to this category.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY}
 	 */
-	public static final String ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools"; //$NON-NLS-1$
+	public static final String ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY = org.eclipse.core.externaltools.internal.IExternalToolConstants.ID_EXTERNAL_TOOLS_LAUNCH_CATEGORY;
 	/**
 	 * Identifier for external tools launch configuration builders category.
 	 * Launch configuration types that can be added as project builders should
 	 * belong to this category.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY}
 	 */
-	public static final String ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY = "org.eclipse.ui.externaltools.builder"; //$NON-NLS-1$
+	public static final String ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY = org.eclipse.core.externaltools.internal.IExternalToolConstants.ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_CATEGORY;
 
 	// ------- Launch configuration groups --------
 	/**
@@ -149,83 +164,96 @@ public interface IExternalToolConstants {
 	/**
 	 * String attribute identifying the location of an external. Default value
 	 * is <code>null</code>. Encoding is tool specific.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_LOCATION}
 	 */
-	public static final String ATTR_LOCATION = PLUGIN_ID + ".ATTR_LOCATION"; //$NON-NLS-1$
+	public static final String ATTR_LOCATION = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_LOCATION;
 
 	/**
 	 * Boolean attribute indicating if the user should be prompted for
 	 * arguments before running a tool. Default value is <code>false</code>.
 	 * THIS ATTRIBUTE IS NOT USED.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_PROMPT_FOR_ARGUMENTS}
 	 */
-	public static final String ATTR_PROMPT_FOR_ARGUMENTS = PLUGIN_ID + ".ATTR_PROMPT_FOR_ARGUMENTS"; //$NON-NLS-1$
+	public static final String ATTR_PROMPT_FOR_ARGUMENTS = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_PROMPT_FOR_ARGUMENTS;
 	
 	/**
 	 * String attribute identifying the scope of resources that should trigger an 
 	 * external tool to run. Default value is <code>null</code>
 	 * indicating that the builder will be triggered for all changes.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_BUILDER_SCOPE}
 	 */
-	public static final String ATTR_BUILDER_SCOPE = PLUGIN_ID + ".ATTR_BUILD_SCOPE"; //$NON-NLS-1$
+	public static final String ATTR_BUILDER_SCOPE = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_BUILDER_SCOPE;
 		
 	/**
 	 * String attribute containing an array of build kinds for which an
 	 * external tool builder should be run.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_RUN_BUILD_KINDS}
 	 */
-	public static final String ATTR_RUN_BUILD_KINDS = PLUGIN_ID + ".ATTR_RUN_BUILD_KINDS"; //$NON-NLS-1$
+	public static final String ATTR_RUN_BUILD_KINDS = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_RUN_BUILD_KINDS;
 	
 	/**
 	 * Boolean attribute indicating if the console should be shown on external
 	 * tool output. Default value is <code>false</code>.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_SHOW_CONSOLE}
 	 */
-	public static final String ATTR_SHOW_CONSOLE = PLUGIN_ID + ".ATTR_SHOW_CONSOLE"; //$NON-NLS-1$
+	public static final String ATTR_SHOW_CONSOLE = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_SHOW_CONSOLE;
 
 	/**
 	 * String attribute containing the arguments that should be passed to the
 	 * tool. Default value is <code>null</code>, and encoding is tool specific.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_TOOL_ARGUMENTS}
 	 */
-	public static final String ATTR_TOOL_ARGUMENTS = PLUGIN_ID + ".ATTR_TOOL_ARGUMENTS"; //$NON-NLS-1$
+	public static final String ATTR_TOOL_ARGUMENTS = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_TOOL_ARGUMENTS;
 
 	/**
 	 * String attribute identifying the working directory of an external tool.
 	 * Default value is <code>null</code>, which indicates a default working
 	 * directory, which is tool specific.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_WORKING_DIRECTORY}
 	 */
-	public static final String ATTR_WORKING_DIRECTORY = PLUGIN_ID + ".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$
+	public static final String ATTR_WORKING_DIRECTORY = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_WORKING_DIRECTORY;
 	
 	/**
 	 * String attribute identifying whether an external tool builder configuration
 	 * is enabled. The default value is <code>true</code>, which indicates
 	 * that the configuration will be executed as appropriate by the builder.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_BUILDER_ENABLED}
 	 */
-	public static final String ATTR_BUILDER_ENABLED = PLUGIN_ID + ".ATTR_BUILDER_ENABLED"; //$NON-NLS-1$
+	public static final String ATTR_BUILDER_ENABLED = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_BUILDER_ENABLED;
 	
 	/**
 	 * Status code indicating an unexpected internal error.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ERR_INTERNAL_ERROR}
 	 */
-	public static final int ERR_INTERNAL_ERROR = 150;
+	public static final int ERR_INTERNAL_ERROR = org.eclipse.core.externaltools.internal.IExternalToolConstants.ERR_INTERNAL_ERROR;
 
 	/**
 	 * String attribute identifying a non-external tool builder launch configuration that is disabled
 	 * The value is the name of the disabled builder.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_DISABLED_BUILDER}
 	 */
-	public static final String ATTR_DISABLED_BUILDER = PLUGIN_ID + ".ATTR_DISABLED_BUILDER";		 //$NON-NLS-1$
+	public static final String ATTR_DISABLED_BUILDER = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_DISABLED_BUILDER;
 	
 	/**
 	 * boolean attribute identifying that an external tool builder has been configured for triggering
 	 * using the <code>ICommand.setBuilding(int)</code> mechanism
 	 * @since 3.1
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_TRIGGERS_CONFIGURED}
 	 */
-	public static final String ATTR_TRIGGERS_CONFIGURED = PLUGIN_ID + ".ATTR_TRIGGERS_CONFIGURED";		 //$NON-NLS-1$
+	public static final String ATTR_TRIGGERS_CONFIGURED = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_TRIGGERS_CONFIGURED;
 
 	/**
 	 * String attribute identifying the build scope for a launch configuration.
 	 * <code>null</code> indicates the default workspace build.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_BUILD_SCOPE}
 	 */
-	public static final String ATTR_BUILD_SCOPE = PLUGIN_ID + ".ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE"; //$NON-NLS-1$
+	public static final String ATTR_BUILD_SCOPE = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_BUILD_SCOPE;
 
 	/**
 	 * Attribute identifier specifying whether referenced projects should be 
 	 * considered when computing the projects to build. Default value is
 	 * <code>true</code>.
+	 * @deprecated use {@link org.eclipse.core.externaltools.internal.IExternalToolConstants#ATTR_INCLUDE_REFERENCED_PROJECTS}
 	 */
-	public static final String ATTR_INCLUDE_REFERENCED_PROJECTS = PLUGIN_ID + ".ATTR_INCLUDE_REFERENCED_PROJECTS"; //$NON-NLS-1$
+	public static final String ATTR_INCLUDE_REFERENCED_PROJECTS = org.eclipse.core.externaltools.internal.IExternalToolConstants.ATTR_INCLUDE_REFERENCED_PROJECTS;
 }
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java
index fea3816..346f60c 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java
deleted file mode 100644
index 8d41495..0000000
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/registry/ExternalToolMigration.java	
+++ /dev/null
@@ -1,411 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.externaltools.internal.registry;
-
-
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.ui.externaltools.internal.ui.ExternalToolsUIMessages;
-
-/**
- * Responsible reading an old external tool format and creating
- * and migrating it to create a new external tool.
- */
-public final class ExternalToolMigration {
-	/**
-	 * Structure to represent a variable definition within a
-	 * source string.
-	 */
-	public static final class VariableDefinition {
-		/**
-		 * Index in the source text where the variable started
-		 * or <code>-1</code> if no valid variable start tag 
-		 * identifier found.
-		 */
-		public int start = -1;
-		
-		/**
-		 * Index in the source text of the character following
-		 * the end of the variable or <code>-1</code> if no 
-		 * valid variable end tag found.
-		 */
-		public int end = -1;
-		
-		/**
-		 * The variable's name found in the source text, or
-		 * <code>null</code> if no valid variable found.
-		 */
-		public String name = null;
-		
-		/**
-		 * The variable's argument found in the source text, or
-		 * <code>null</code> if no valid variable found or if
-		 * the variable did not specify an argument
-		 */
-		public String argument = null;
-		
-		/**
-		 * Create an initialized variable definition.
-		 */
-		private VariableDefinition() {
-			super();
-		}
-	}
-	
-	/**
-	 * Variable tag indentifiers
-	 */
-	private static final String VAR_TAG_START = "${"; //$NON-NLS-1$
-	private static final String VAR_TAG_END = "}"; //$NON-NLS-1$
-	private static final String VAR_TAG_SEP = ":"; //$NON-NLS-1$	
-	
-	/**
-	 * External tool type for Ant build files (value <code>antBuildType</code>).
-	 */
-	public static final String TOOL_TYPE_ANT_BUILD = "antBuildType"; //$NON-NLS-1$;
-	/**
-	 * Ant builder launch configuration type identifier. Ant project builders
-	 * are of this type.
-	 */
-	public static final String ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE = "org.eclipse.ant.AntBuilderLaunchConfigurationType"; //$NON-NLS-1$
-		
-	public static final String RUN_TARGETS_ATTRIBUTE = TOOL_TYPE_ANT_BUILD + ".runTargets"; //$NON-NLS-1$;
-
-	/**
-	* String attribute indicating the Ant targets to execute. Default value is
-	 * <code>null</code> which indicates that the default target is to be
-	 * executed. Format is a comma separated listing of targets.
-	 * NOTE: This value is copied here from org.eclipse.ant.ui.internal.IAntLaunchConfigurationConstants.
-	 * 		Ant no longer resides in External Tools and this plug-in. This value is kept here only
-	 * 		for migration.
-	 */
-	public static final String ATTR_ANT_TARGETS = IExternalToolConstants.PLUGIN_ID + ".ATTR_ANT_TARGETS"; //$NON-NLS-1$
-	
-	/*
-	 * 2.0 External Tool Tags
-	 */
-	public static final String TAG_TOOL_TYPE = "!{tool_type}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_NAME = "!{tool_name}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_LOCATION = "!{tool_loc}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_ARGUMENTS = "!{tool_args}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_DIRECTORY = "!{tool_dir}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_REFRESH = "!{tool_refresh}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_SHOW_LOG = "!{tool_show_log}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_BUILD_TYPES = "!{tool_build_types}"; //$NON-NLS-1$
-	public static final String TAG_TOOL_BLOCK = "!{tool_block}"; //$NON-NLS-1$
-
-	// Known kind of tools
-	private static final String TOOL_TYPE_ANT = "org.eclipse.ui.externaltools.type.ant"; //$NON-NLS-1$
-	private static final String TOOL_TYPE_PROGRAM = "org.eclipse.ui.externaltools.type.program"; //$NON-NLS-1$
-
-	/*
-	 * 2.1 External Tool Keys
-	 */
-	public static final String TAG_TYPE = "type"; //$NON-NLS-1$
-	public static final String TAG_NAME = "name"; //$NON-NLS-1$
-	public static final String TAG_LOCATION = "location"; //$NON-NLS-1$
-	public static final String TAG_WORK_DIR = "workDirectory"; //$NON-NLS-1$
-	public static final String TAG_CAPTURE_OUTPUT = "captureOutput"; //$NON-NLS-1$
-	public static final String TAG_SHOW_CONSOLE = "showConsole"; //$NON-NLS-1$
-	public static final String TAG_RUN_BKGRND = "runInBackground"; //$NON-NLS-1$
-	public static final String TAG_PROMPT_ARGS = "promptForArguments"; //$NON-NLS-1$
-	public static final String TAG_ARGS = "arguments"; //$NON-NLS-1$
-	public static final String TAG_REFRESH_SCOPE = "refreshScope"; //$NON-NLS-1$
-	public static final String TAG_REFRESH_RECURSIVE = "refreshRecursive"; //$NON-NLS-1$
-	public static final String TAG_RUN_BUILD_KINDS = "runForBuildKinds"; //$NON-NLS-1$
-	public static final String TAG_EXTRA_ATTR = "extraAttribute"; //$NON-NLS-1$
-	public static final String TAG_VERSION = "version"; //$NON-NLS-1$
-
-	private static final String EXTRA_ATTR_SEPARATOR = "="; //$NON-NLS-1$
-
-	private static final String VERSION_21 = "2.1"; //$NON-NLS-1$;
-
-	private static final String TRUE = "true"; //$NON-NLS-1$
-	private static final String FALSE = "false"; //$NON-NLS-1$
-
-	/**
-	 * Allows no instances.
-	 */
-	private ExternalToolMigration() {
-		super();
-	}
-
-	/**
-	 * Returns a  launch configuration working copy from the argument map or
-	 * <code>null</code> if the given map cannot be interpreted as a 2.0 or 2.1
-	 * branch external tool. The returned working copy will be unsaved and its
-	 * location will be set to the metadata area.
-	 */
-	public static ILaunchConfigurationWorkingCopy configFromArgumentMap(Map args) {
-		String version = (String) args.get(TAG_VERSION);
-		if (VERSION_21.equals(version)) {
-			return configFrom21ArgumentMap(args);
-		}
-		return configFrom20ArgumentMap(args);
-	}
-
-	public static ILaunchConfigurationWorkingCopy configFrom21ArgumentMap(Map commandArgs) {
-		String name = (String) commandArgs.get(TAG_NAME);
-		String type = (String) commandArgs.get(TAG_TYPE);
-		
-		ILaunchConfigurationWorkingCopy config = newConfig(type, name);
-		if (config == null) {
-			return null;
-		}
-		
-		config.setAttribute(IExternalToolConstants.ATTR_LOCATION, (String) commandArgs.get(TAG_LOCATION));
-		config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) commandArgs.get(TAG_WORK_DIR));
-		config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(commandArgs.get(TAG_CAPTURE_OUTPUT)));
-		config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(commandArgs.get(TAG_SHOW_CONSOLE)));
-		config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, TRUE.equals(commandArgs.get(TAG_RUN_BKGRND)));
-		config.setAttribute(IExternalToolConstants.ATTR_PROMPT_FOR_ARGUMENTS, TRUE.equals(commandArgs.get(TAG_PROMPT_ARGS)));
-		config.setAttribute(RefreshTab.ATTR_REFRESH_SCOPE, (String) commandArgs.get(TAG_REFRESH_SCOPE));
-		config.setAttribute(RefreshTab.ATTR_REFRESH_RECURSIVE, TRUE.equals(commandArgs.get(TAG_REFRESH_RECURSIVE)));
-
-		config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, (String) commandArgs.get(TAG_RUN_BUILD_KINDS));
-		
-		String args = (String) commandArgs.get(TAG_ARGS);
-		if (args != null) {
-			config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, args);
-		}
-
-		String extraAttributes = (String) commandArgs.get(TAG_EXTRA_ATTR);
-		if (extraAttributes != null) {
-			StringTokenizer tokenizer = new StringTokenizer(extraAttributes, EXTRA_ATTR_SEPARATOR);
-			while (tokenizer.hasMoreTokens()) {
-				String key = tokenizer.nextToken();
-				if (!tokenizer.hasMoreTokens())
-					break;
-				String value = tokenizer.nextToken();
-				if (key.equals(RUN_TARGETS_ATTRIBUTE)) {
-					// 2.1 implementation only defined 1 "extra attribute"
-					config.setAttribute(ATTR_ANT_TARGETS, value);
-				}
-			}
-		}
-		return config;
-	}
-
-	/**
-	 * Creates an external tool from the map.
-	 */
-	public static ILaunchConfigurationWorkingCopy configFrom20ArgumentMap(Map args) {
-		// Update the type...
-		String type = (String) args.get(TAG_TOOL_TYPE);
-		if (TOOL_TYPE_ANT.equals(type)) {
-			type = TOOL_TYPE_ANT_BUILD;
-		} else if (TOOL_TYPE_PROGRAM.equals(type)){
-			type = IExternalToolConstants.TOOL_TYPE_PROGRAM;
-		} else {
-			return null;
-		}
-
-		String name = (String) args.get(TAG_TOOL_NAME);
-		
-		ILaunchConfigurationWorkingCopy config = newConfig(type, name);
-		if (config == null) {
-			return null;
-		}
-
-		// Update the location...
-		String location = (String) args.get(TAG_TOOL_LOCATION);
-		config.setAttribute(IExternalToolConstants.ATTR_LOCATION, location);
-
-		// Update the refresh scope...
-		String refresh = (String) args.get(TAG_TOOL_REFRESH);
-		if (refresh != null) {
-			VariableDefinition varDef = extractVariableDefinition(refresh, 0);
-			if ("none".equals(varDef.name)) { //$NON-NLS-1$
-				refresh = null;
-			}
-			config.setAttribute(RefreshTab.ATTR_REFRESH_SCOPE, refresh);
-		}
-
-		// Update the arguments
-		String arguments = (String) args.get(TAG_TOOL_ARGUMENTS);
-		if (type.equals(TOOL_TYPE_ANT_BUILD)) {
-			String targetNames = null;
-			if (arguments != null) {
-				int start = 0;
-				ArrayList targets = new ArrayList();
-				StringBuffer buffer = new StringBuffer();
-				VariableDefinition varDef = extractVariableDefinition(arguments, start);
-				while (varDef.end != -1) {
-					if ("ant_target".equals(varDef.name) && varDef.argument != null) { //$NON-NLS-1$
-						targets.add(varDef.argument);
-						buffer.append(arguments.substring(start, varDef.start));
-					} else {
-						buffer.append(arguments.substring(start, varDef.end));
-					}
-					start = varDef.end;
-					varDef = extractVariableDefinition(arguments, start);
-				}
-				buffer.append(arguments.substring(start, arguments.length()));
-				arguments = buffer.toString();
-	
-				buffer.setLength(0);
-				for (int i = 0; i < targets.size(); i++) {
-					String target = (String) targets.get(i);
-					if (target != null && target.length() > 0) {
-						buffer.append(target);
-						buffer.append(","); //$NON-NLS-1$
-					}
-				}
-				targetNames = buffer.toString();
-			}
-			if (targetNames != null && targetNames.length() > 0) {
-				config.setAttribute(ATTR_ANT_TARGETS, targetNames);
-			}
-		}
-		config.setAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, arguments);
-
-		// Collect the rest of the information
-		config.setAttribute(IExternalToolConstants.ATTR_SHOW_CONSOLE, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
-		config.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, TRUE.equals(args.get(TAG_TOOL_SHOW_LOG)));
-		config.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, FALSE.equals(args.get(TAG_TOOL_BLOCK)));
-		String buildKinds= (String) args.get(TAG_TOOL_BUILD_TYPES);
-		if (buildKinds != null) {
-			buildKinds= buildKinds.replace(';', ','); // Replace the old separator with the new
-		}
-		config.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, buildKinds);
-		config.setAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) args.get(TAG_TOOL_DIRECTORY));
-		return config;
-	}
-
-	/**
-	 * Returns a new working copy with the given external tool name and external
-	 * tool type or <code>null</code> if no config could be created.
-	 */
-	private static ILaunchConfigurationWorkingCopy newConfig(String type, String name) {
-		if (type == null || name == null) {
-			return null;
-		}
-		ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
-		ILaunchConfigurationType configType;
-		if (TOOL_TYPE_ANT_BUILD.equals(type)) {
-			configType = manager.getLaunchConfigurationType(ID_ANT_BUILDER_LAUNCH_CONFIGURATION_TYPE);
-		} else if (IExternalToolConstants.TOOL_TYPE_PROGRAM.equals(type)) {
-			configType = manager.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_BUILDER_LAUNCH_CONFIGURATION_TYPE);
-		} else {
-			return null;
-		}
-		try {
-			if (configType != null) {
-				return configType.newInstance(null, name);
-			}
-		} catch (CoreException e) {
-			ExternalToolsPlugin.getDefault().log(e);
-		}
-		return null;
-	}
-	
-	/**
-	 * Returns the tool name extracted from the given command argument map.
-	 * Extraction is attempted using 2.0 and 2.1 external tool formats.
-	 */
-	public static String getNameFromCommandArgs(Map commandArgs) {
-		String name= (String) commandArgs.get(TAG_NAME);
-		if (name == null) {
-			name= (String) commandArgs.get(TAG_TOOL_NAME);
-		}
-		return name;
-	}
-	
-	/**
-	 * Migrate the old RUN_IN_BACKGROUND launch config attribute to the new
-	 * LAUNCH_IN_BACKGROUND attribute provided by the debug ui plugin.
-	 * 
-	 * @param config the config to migrate
-	 * @return the migrated config
-	 */
-	public static ILaunchConfiguration migrateRunInBackground(ILaunchConfiguration config) {
-		String noValueFlag= "NoValue"; //$NON-NLS-1$
-		String attr= null;
-		try {
-			attr = config.getAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, noValueFlag);
-		} catch (CoreException e) {
-			// Exception will occur if the attribute is already set because the attribute is actually a boolean.
-			// No migration necessary.
-			return config;
-		}
-		if (noValueFlag.equals(attr)) {
-			//the old constant
-			String ATTR_RUN_IN_BACKGROUND= IExternalToolConstants.PLUGIN_ID + ".ATTR_RUN_IN_BACKGROUND"; //$NON-NLS-1$
-			boolean runInBackground= false;
-			try {
-				runInBackground = config.getAttribute(ATTR_RUN_IN_BACKGROUND, runInBackground);
-			} catch (CoreException e) {
-				ExternalToolsPlugin.getDefault().log(ExternalToolsUIMessages.ExternalToolMigration_37, e);
-			}
-			try {
-				ILaunchConfigurationWorkingCopy workingCopy= config.getWorkingCopy();
-				workingCopy.setAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND, runInBackground);
-				config= workingCopy.doSave();
-			} catch (CoreException e) {
-				ExternalToolsPlugin.getDefault().log(ExternalToolsUIMessages.ExternalToolMigration_38, e);
-			}
-		}
-		return config;
-	}
-	
-	/**
-	 * Extracts a variable name and argument from the given string.
-	 * 
-	 * @param text the source text to parse for a variable tag
-	 * @param start the index in the string to start the search
-	 * @return the variable definition
-	 */
-	public static VariableDefinition extractVariableDefinition(String text, int start) {
-		VariableDefinition varDef = new VariableDefinition();
-		
-		varDef.start = text.indexOf(VAR_TAG_START, start);
-		if (varDef.start < 0){
-			return varDef;
-		}
-		start = varDef.start + VAR_TAG_START.length();
-		
-		int end = text.indexOf(VAR_TAG_END, start);
-		if (end < 0) {
-			return varDef;
-		}
-		varDef.end = end + VAR_TAG_END.length();
-		if (end == start) {
-			return varDef;
-		}
-	
-		int mid = text.indexOf(VAR_TAG_SEP, start);
-		if (mid < 0 || mid > end) {
-			varDef.name = text.substring(start, end);
-		} else {
-			if (mid > start) {
-				varDef.name = text.substring(start, mid);
-			}
-			mid = mid + VAR_TAG_SEP.length();
-			if (mid < end) {
-				varDef.argument = text.substring(mid, end);
-			}
-		}
-		
-		return varDef;
-	}	
-}
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java
index 2b7fe07..3d6dc5b 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderLabelProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.externaltools.internal.ui;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.resources.ICommand;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
@@ -23,7 +24,6 @@ import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.ErrorConfig;
 
 
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
index 11dab43..3f97506 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java	
@@ -18,6 +18,9 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.model.BuilderCoreUtils;
+import org.eclipse.core.externaltools.internal.model.ExternalToolBuilder;
 import org.eclipse.core.resources.ICommand;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -78,9 +81,7 @@ import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsM
 import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
 import org.eclipse.ui.externaltools.internal.launchConfigurations.IgnoreWhiteSpaceComparator;
 import org.eclipse.ui.externaltools.internal.model.BuilderUtils;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
 import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
 import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds;
 import org.eclipse.ui.externaltools.internal.model.IPreferenceConstants;
 import org.eclipse.ui.progress.IProgressService;
@@ -210,7 +211,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
 		for (int i = 0; i < commands.length; i++) {
 			String[] version= new String[] {""}; //$NON-NLS-1$
 			ILaunchConfiguration config = BuilderUtils.configFromBuildCommandArgs(project, commands[i].getArguments(), version);
-			if (BuilderUtils.VERSION_2_1.equals(version[0])) {
+			if (BuilderCoreUtils.VERSION_2_1.equals(version[0])) {
 				// Storing the .project file of a project with 2.1 configs, will
 				// edit the file in a way that isn't backwards compatible.
 				projectNeedsMigration= true;
@@ -222,7 +223,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
                     if (shell == null) {
                         return;
                     }
-					IStatus status = new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, 0, NLS.bind(ExternalToolsUIMessages.BuilderPropertyPage_Exists, new String[]{config.getName()}), null);
+					IStatus status = new Status(IStatus.ERROR, ExternalToolsPlugin.PLUGIN_ID, 0, NLS.bind(ExternalToolsUIMessages.BuilderPropertyPage_Exists, new String[]{config.getName()}), null);
 					ErrorDialog.openError(getShell(), ExternalToolsUIMessages.BuilderPropertyPage_errorTitle,
 									NLS.bind(ExternalToolsUIMessages.BuilderPropertyPage_External_Tool_Builder__0__Not_Added_2, new String[]{config.getName()}),
 									status);
@@ -232,7 +233,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
 				}
 			} else {
 				String builderID = commands[i].getBuilderName();
-				if (builderID.equals(ExternalToolBuilder.ID) && commands[i].getArguments().get(BuilderUtils.LAUNCH_CONFIG_HANDLE) != null) {
+				if (builderID.equals(ExternalToolBuilder.ID) && commands[i].getArguments().get(BuilderCoreUtils.LAUNCH_CONFIG_HANDLE) != null) {
 					// An invalid external tool entry.
 					element= new ErrorConfig(commands[i]);
 				} else {
@@ -578,7 +579,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
 		boolean wasAutobuilding= ResourcesPlugin.getWorkspace().getDescription().isAutoBuilding();
 		try {
 			ILaunchConfigurationWorkingCopy workingCopy = null;
-			String name= DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(ExternalToolsUIMessages.BuilderPropertyPage_New_Builder_7);
+			String name= DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(ExternalToolsUIMessages.BuilderPropertyPage_New_Builder_7);
 			workingCopy = type.newInstance(BuilderUtils.getBuilderFolder(getInputProject(), true), name);		
 			
 			StringBuffer buffer= new StringBuffer(IExternalToolConstants.BUILD_TYPE_FULL);
@@ -628,7 +629,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
         if (shell == null) {
             return Window.CANCEL;
         }
-		int code= DebugUITools.openLaunchConfigurationPropertiesDialog(shell, config, IExternalToolConstants.ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_GROUP);
+		int code= DebugUITools.openLaunchConfigurationPropertiesDialog(shell, config, org.eclipse.ui.externaltools.internal.model.IExternalToolConstants.ID_EXTERNAL_TOOLS_BUILDER_LAUNCH_GROUP);
 		manager.removeLaunchConfigurationListener(configurationListener);
 		return code;
 	}
@@ -767,7 +768,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
 		if (e instanceof CoreException) {
 			status[0] = ((CoreException) e).getStatus();
 		} else {
-			status[0] = new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsUIMessages.BuilderPropertyPage_statusMessage, e);
+			status[0] = new Status(IStatus.ERROR, ExternalToolsPlugin.PLUGIN_ID, 0, ExternalToolsUIMessages.BuilderPropertyPage_statusMessage, e);
 		}
 		Display.getDefault().asyncExec(new Runnable() {
 		    public void run() {
@@ -1095,7 +1096,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
 		try {
 			ILaunchConfigurationWorkingCopy workingCopy = null;
 			String builderName = command.getBuilderName();
-			String name= DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(builderName);
+			String name= DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(builderName);
 			workingCopy = type.newInstance(BuilderUtils.getBuilderFolder(getInputProject(), true), name);		
 					
 			workingCopy.setAttribute(IExternalToolConstants.ATTR_DISABLED_BUILDER, builderName);
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java
index d07e86a..e51a011 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -55,8 +55,6 @@ public class ExternalToolsUIMessages extends NLS {
 	public static String ExternalToolsPreferencePage_Prompt_before_migrating_3;
 	public static String ExternalToolsPreferencePage_1;
 
-	public static String ExternalToolMigration_37;
-	public static String ExternalToolMigration_38;
 	public static String EditCommandDialog_0;
 	public static String EditCommandDialog_1;
 	public static String EditCommandDialog_2;
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties
index f5f0a1b..ddb921b 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/ExternalToolsUIMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -50,8 +50,6 @@ ExternalToolsPreferencePage_External_tool_project_builders_migration_2=External
 ExternalToolsPreferencePage_Prompt_before_migrating_3=&Confirm before migrating external tool project builders for edit
 ExternalToolsPreferencePage_1=C&onfirm before migrating projects to the new format
 
-ExternalToolMigration_37=An exception occurred accessing external tool\'s \"run in background\" attribute
-ExternalToolMigration_38=An exception occurred attempting to migrate external tool\'s \"run in background\" attribute
 EditCommandDialog_0=Configure Builder
 EditCommandDialog_1=Run this builder:
 EditCommandDialog_2=After a "&Clean"
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java
index 0670eda..88960d6 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildFilesResolver.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 Matthew Conway and others.
+ * Copyright (c) 2007, 2009 Matthew Conway and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,13 +13,13 @@ package org.eclipse.ui.externaltools.internal.variables;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.eclipse.core.externaltools.internal.model.ExternalToolBuilder;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceDelta;
 import org.eclipse.core.resources.IResourceDeltaVisitor;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IDynamicVariableResolver;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
 
 public class BuildFilesResolver implements IDynamicVariableResolver
 {
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java
index 793cc52..e448739 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildProjectResolver.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.ui.externaltools.internal.variables;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
+import org.eclipse.core.externaltools.internal.model.ExternalToolBuilder;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -19,8 +21,7 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IDynamicVariableResolver;
 import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
+import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
 
 
 public class BuildProjectResolver implements IDynamicVariableResolver {
@@ -48,7 +49,7 @@ public class BuildProjectResolver implements IDynamicVariableResolver {
 	 * @throws CoreException
 	 */
 	protected void abort(String message, Throwable exception) throws CoreException {
-		throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, message, exception));
+		throw new CoreException(new Status(IStatus.ERROR, ExternalToolsPlugin.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, message, exception));
 	}
 	
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java
index c370724..64f8d47 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/BuildTypeResolver.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ui.externaltools.internal.variables;
 
+import org.eclipse.core.externaltools.internal.model.ExternalToolBuilder;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IDynamicVariableResolver;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder;
 
 
 public class BuildTypeResolver implements IDynamicVariableResolver {
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java
index ddc8903..dbcfce3 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/variables/SystemPathResolver.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,13 +15,14 @@ import java.io.File;
 import java.util.Map;
 import java.util.StringTokenizer;
 
+import org.eclipse.core.externaltools.internal.IExternalToolConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.variables.IDynamicVariable;
 import org.eclipse.core.variables.IDynamicVariableResolver;
 import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
+import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
 
 public class SystemPathResolver implements IDynamicVariableResolver {
     
@@ -30,7 +31,7 @@ public class SystemPathResolver implements IDynamicVariableResolver {
 	 */
 	public String resolveValue(IDynamicVariable variable, String argument) throws CoreException {
         if (argument == null) {
-            throw new CoreException(new Status(IStatus.ERROR,  IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, VariableMessages.SystemPathResolver_0, null));
+            throw new CoreException(new Status(IStatus.ERROR,  ExternalToolsPlugin.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, VariableMessages.SystemPathResolver_0, null));
         }
         Map map= DebugPlugin.getDefault().getLaunchManager().getNativeEnvironment();
         String path= (String) map.get("PATH"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
index 5dce95f..b7213c6 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/META-INF/MANIFEST.MF
@@ -10,7 +10,6 @@ Export-Package: org.eclipse.ui.externaltools.internal.launchConfigurations;x-fri
  org.eclipse.ui.externaltools.internal.menu;x-internal:=true,
  org.eclipse.ui.externaltools.internal.model;x-friends:="org.eclipse.ant.ui",
  org.eclipse.ui.externaltools.internal.program.launchConfigurations;x-friends:="org.eclipse.ant.ui",
- org.eclipse.ui.externaltools.internal.registry;x-internal:=true,
  org.eclipse.ui.externaltools.internal.ui;x-friends:="org.eclipse.ant.ui",
  org.eclipse.ui.externaltools.internal.variables;x-internal:=true
 Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
@@ -19,6 +18,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)";resolution:=op
  org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)",
+ org.eclipse.core.externaltools;bundle-version="[1.0.0,2.0.0)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java
deleted file mode 100644
index 2d7ab0a..0000000
--- a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/BackgroundResourceRefresher.java	
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
-
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.core.DebugEvent;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IDebugEventSetListener;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.ui.externaltools.internal.model.ExternalToolsPlugin;
-
-/**
- * Refreshes resources as specified by a launch configuration, when 
- * an associated process terminates.
- */
-public class BackgroundResourceRefresher implements IDebugEventSetListener  {
-
-	private ILaunchConfiguration fConfiguration;
-	private IProcess fProcess;
-	
-	public BackgroundResourceRefresher(ILaunchConfiguration configuration, IProcess process) {
-		fConfiguration = configuration;
-		fProcess = process;
-	}
-	
-	/**
-	 * If the process has already terminated, resource refreshing is done
-	 * immediately in the current thread. Otherwise, refreshing is done when the
-	 * process terminates.
-	 */
-	public void startBackgroundRefresh() {
-		synchronized (fProcess) {
-			if (fProcess.isTerminated()) {
-				refresh();
-			} else {
-				DebugPlugin.getDefault().addDebugEventListener(this);
-			}
-		}
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.debug.core.IDebugEventSetListener#handleDebugEvents(org.eclipse.debug.core.DebugEvent[])
-	 */
-	public void handleDebugEvents(DebugEvent[] events) {
-		for (int i = 0; i < events.length; i++) {
-			DebugEvent event = events[i];
-			if (event.getSource() == fProcess && event.getKind() == DebugEvent.TERMINATE) {
-				DebugPlugin.getDefault().removeDebugEventListener(this);
-				refresh();
-				break;
-			}
-		}
-	}
-	
-	/**
-	 * Submits a job to do the refresh
-	 */
-	protected void refresh() {
-		Job job= new Job(ExternalToolsProgramMessages.BackgroundResourceRefresher_0) {
-			public IStatus run(IProgressMonitor monitor) {
-				try {
-					RefreshTab.refreshResources(fConfiguration, monitor);
-				} catch (CoreException e) {
-					ExternalToolsPlugin.getDefault().log(e);
-					return e.getStatus();
-				}	
-				return Status.OK_STATUS;
-			}
-		};
-		job.schedule();
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java
index 7e817f8..82687b4 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.java	
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved.   This
+ * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.   This
  * program and the accompanying materials are made available under the terms of
  * the Eclipse Public License v1.0 which accompanies this distribution, and is
  * available at http://www.eclipse.org/legal/epl-v10.html
@@ -18,8 +18,6 @@ public class ExternalToolsProgramMessages extends NLS {
 
 	public static String ProgramLaunchDelegate_Workbench_Closing_1;
 	public static String ProgramLaunchDelegate_The_workbench_is_exiting;
-	public static String ProgramLaunchDelegate_3;
-	public static String ProgramLaunchDelegate_4;
 
 	public static String ProgramMainTab_Select;
 
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties
index 059a026..5687b92 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties	
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ExternalToolsProgramMessages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -13,7 +13,5 @@ BackgroundResourceRefresher_0=Refreshing resources...
 
 ProgramLaunchDelegate_Workbench_Closing_1=Workbench Closing
 ProgramLaunchDelegate_The_workbench_is_exiting=The workbench is exiting and a program launched from an external tool appears to still be running. These programs will be terminated when the workbench exits. It is recommended that you exit any external programs launched from the workbench before you proceed.\n\nClick OK to continue exiting the workbench.
-ProgramLaunchDelegate_3=Running {0}...
-ProgramLaunchDelegate_4=An IProcess could not be created for the launch
 
 ProgramMainTab_Select=&Select a program:
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java b/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java
deleted file mode 100644
index bed6304..0000000
--- a/eclipse/plugins/org.eclipse.ui.externaltools/Program Tools Support/org/eclipse/ui/externaltools/internal/program/launchConfigurations/ProgramLaunchDelegate.java	
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *     Keith Seitz (keiths at redhat.com) - environment variables contribution (Bug 27243)
- *     dakshinamurthy.karra at gmail.com - bug 165371
- *******************************************************************************/
-package org.eclipse.ui.externaltools.internal.program.launchConfigurations;
-
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.model.IProcess;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.debug.ui.CommonTab;
-import org.eclipse.debug.ui.RefreshTab;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsBuildTab;
-import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
-import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-
-/**
- * Launch delegate for a program.
- */
-public class ProgramLaunchDelegate extends LaunchConfigurationDelegate {
-
-	private static IWindowListener fWindowListener;
-
-	/**
-	 * A window listener that warns the user about any running programs when
-	 * the workbench closes. Programs are killed when the VM exits.
-	 */
-	private class ProgramLaunchWindowListener implements IWindowListener {
-		public void windowActivated(IWorkbenchWindow window) {
-		}
-		public void windowDeactivated(IWorkbenchWindow window) {
-		}
-		public void windowClosed(IWorkbenchWindow window) {
-			IWorkbenchWindow windows[]= PlatformUI.getWorkbench().getWorkbenchWindows();
-			if (windows.length > 1) {
-				// There are more windows still open.
-				return;
-			}
-			ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
-			ILaunchConfigurationType programType= manager.getLaunchConfigurationType(IExternalToolConstants.ID_PROGRAM_LAUNCH_CONFIGURATION_TYPE);
-			if (programType == null) {
-				return;
-			}
-			ILaunch launches[]= manager.getLaunches();
-			ILaunchConfigurationType configType;
-			ILaunchConfiguration config;
-			for (int i = 0; i < launches.length; i++) {
-				try {
-					config= launches[i].getLaunchConfiguration();
-					if (config == null) {
-						continue;
-					}
-					configType= config.getType();
-				} catch (CoreException e) {
-					continue;
-				}
-				if (configType.equals(programType)) {
-					if (!launches[i].isTerminated()) {
-						MessageDialog.openWarning(window.getShell(), ExternalToolsProgramMessages.ProgramLaunchDelegate_Workbench_Closing_1, ExternalToolsProgramMessages.ProgramLaunchDelegate_The_workbench_is_exiting);
-						break;
-					}
-				}
-			}
-		}
-		public void windowOpened(IWorkbenchWindow window) {
-		}
-	}
-
-	/**
-	 * @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		// resolve location
-		IPath location = ExternalToolsUtil.getLocation(configuration);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}		
-		
-		// resolve working directory
-		IPath workingDirectory = ExternalToolsUtil.getWorkingDirectory(configuration);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		// resolve arguments
-		String[] arguments = ExternalToolsUtil.getArguments(configuration);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		int cmdLineLength = 1;
-		if (arguments != null) {
-			cmdLineLength += arguments.length;
-		}
-		String[] cmdLine = new String[cmdLineLength];
-		cmdLine[0] = location.toOSString();
-		if (arguments != null) {
-			System.arraycopy(arguments, 0, cmdLine, 1, arguments.length);
-		}
-		
-		File workingDir = null;
-		if (workingDirectory != null) {
-			workingDir = workingDirectory.toFile();
-		}
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		String[] envp = DebugPlugin.getDefault().getLaunchManager().getEnvironment(configuration);
-		
-		if (monitor.isCanceled()) {
-			return;
-		}
-		
-		if (fWindowListener == null) {
-			fWindowListener= new ProgramLaunchWindowListener();
-			PlatformUI.getWorkbench().addWindowListener(fWindowListener);
-		}
-		Process p = DebugPlugin.exec(cmdLine, workingDir, envp);
-		IProcess process = null;
-		
-		// add process type to process attributes
-		Map processAttributes = new HashMap();
-		String programName = location.lastSegment();
-		String extension = location.getFileExtension();
-		if (extension != null) {
-			programName = programName.substring(0, programName.length() - (extension.length() + 1));
-		}
-		programName = programName.toLowerCase();
-		processAttributes.put(IProcess.ATTR_PROCESS_TYPE, programName);
-		
-		if (p != null) {
-			monitor.beginTask(NLS.bind(ExternalToolsProgramMessages.ProgramLaunchDelegate_3, new String[] {configuration.getName()}), IProgressMonitor.UNKNOWN);
-			process = DebugPlugin.newProcess(launch, p, location.toOSString(), processAttributes);
-		}
-		if (p == null || process == null) {
-			if (p != null)
-				p.destroy();
-			throw new CoreException(new Status(IStatus.ERROR, IExternalToolConstants.PLUGIN_ID, IExternalToolConstants.ERR_INTERNAL_ERROR, ExternalToolsProgramMessages.ProgramLaunchDelegate_4, null));
-		}
-		process.setAttribute(IProcess.ATTR_CMDLINE, generateCommandLine(cmdLine));
-		
-		if (CommonTab.isLaunchInBackground(configuration)) {
-			// refresh resources after process finishes
-			if (RefreshTab.getRefreshScope(configuration) != null) {
-				BackgroundResourceRefresher refresher = new BackgroundResourceRefresher(configuration, process);
-				refresher.startBackgroundRefresh();
-			}				
-		} else {
-			// wait for process to exit
-			while (!process.isTerminated()) {
-				try {
-					if (monitor.isCanceled()) {
-						process.terminate();
-						break;
-					}
-					Thread.sleep(50);
-				} catch (InterruptedException e) {
-				}
-			}
-			
-			// refresh resources
-			RefreshTab.refreshResources(configuration, monitor);
-		}
-	}
-	
-	private String generateCommandLine(String[] commandLine) {
-		if (commandLine.length < 1)
-			return ""; //$NON-NLS-1$
-		StringBuffer buf= new StringBuffer();
-		for (int i= 0; i < commandLine.length; i++) {
-			buf.append(' ');
-			char[] characters= commandLine[i].toCharArray();
-			StringBuffer command= new StringBuffer();
-			boolean containsSpace= false;
-			for (int j = 0; j < characters.length; j++) {
-				char character= characters[j];
-				if (character == '\"') {
-					command.append('\\');
-				} else if (character == ' ') {
-					containsSpace = true;
-				}
-				command.append(character);
-			}
-			if (containsSpace) {
-				buf.append('\"');
-				buf.append(command);
-				buf.append('\"');
-			} else {
-				buf.append(command);
-			}
-		}	
-		return buf.toString();
-	}	
-	
-    /* (non-Javadoc)
-	 * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
-	 */
-	protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
-		IProject[] projects = ExternalToolsBuildTab.getBuildProjects(configuration, null);
-		if (projects == null) {
-			return null ;
-		}
-		boolean isRef = ExternalToolsBuildTab.isIncludeReferencedProjects(configuration, null);
-		if (isRef) {
-			return computeReferencedBuildOrder(projects);
-		}
-		return computeBuildOrder(projects);
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/build.properties b/eclipse/plugins/org.eclipse.ui.externaltools/build.properties
index 6f02b6f..c21f4c3 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/build.properties
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -19,3 +19,4 @@ bin.includes = icons/,\
                about.html,\
                .,\
                META-INF/
+output.. = bin/
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/plugin.properties b/eclipse/plugins/org.eclipse.ui.externaltools/plugin.properties
index b3814e7..fa9aba8 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -26,10 +26,8 @@ Action.externalTools = &External Tools
 Action.externalToolsTip = Run Last Tool
 PropertyPage.externalToolsBuilders = Builders
 
-Builder.externalTools = Integrated External Tool Builder
 PreferencePage.externalToolsPreferences = External Tools
 
-Program.externalTools = Program
 programLaunchConfigurationTabGroup.description=Run a program
 programBuilderLaunchConfigurationTabGroup.description=Create a configuration that will run a program during builds
 
diff --git a/eclipse/plugins/org.eclipse.ui.externaltools/plugin.xml b/eclipse/plugins/org.eclipse.ui.externaltools/plugin.xml
index 1efc3c0..8360fda 100644
--- a/eclipse/plugins/org.eclipse.ui.externaltools/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.externaltools/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2007 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -99,36 +100,8 @@
 		</enabledWhen>
       </page>
    </extension>
-   <extension
-         id="ExternalToolBuilder"
-         name="%Builder.externalTools"
-         point="org.eclipse.core.resources.builders">
-      <builder
-      	isConfigurable= "true">
-         <run
-               class="org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder">
-         </run>
-      </builder>
-   </extension>
 <!-- Launch Configuration Extensions -->
    <extension
-         point="org.eclipse.debug.core.launchConfigurationTypes">
-      <launchConfigurationType
-            name="%Program.externalTools"
-            delegate="org.eclipse.ui.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
-            category="org.eclipse.ui.externaltools"
-            modes="run"
-            id="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
-      </launchConfigurationType>
-      <launchConfigurationType
-            name="%Program.externalTools"
-            delegate="org.eclipse.ui.externaltools.internal.program.launchConfigurations.ProgramLaunchDelegate"
-            category="org.eclipse.ui.externaltools.builder"
-            modes="run"
-            id="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
-      </launchConfigurationType>
-   </extension>
-   <extension
          point="org.eclipse.ui.externaltools.configurationDuplicationMaps">
       <configurationMap
             sourceType="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"
diff --git a/eclipse/plugins/org.eclipse.ui.forms/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.forms/META-INF/MANIFEST.MF
index 2649a7b..00bbd4e 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.forms/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %name
 Bundle-SymbolicName: org.eclipse.ui.forms
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.2.qualifier
 Bundle-Vendor: %provider-name
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.forms,
@@ -11,9 +11,9 @@ Export-Package: org.eclipse.ui.forms,
  org.eclipse.ui.forms.widgets,
  org.eclipse.ui.internal.forms;x-internal:=true,
  org.eclipse.ui.internal.forms.widgets;x-friends:="org.eclipse.ui.tests.forms"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)";resolution:=optional
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.jface;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)";resolution:=optional
 Eclipse-LazyStart: true
 Import-Package: com.ibm.icu.text,
  javax.xml.parsers,
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java
index 60e045e..91b4f09 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -264,6 +264,12 @@ public abstract class FormEditor extends MultiPageEditorPart  {
 					IFormPage fpage = (IFormPage) page;
 					if (fpage.isDirty())
 						return true;
+
+				} else if (page instanceof IEditorPart) {
+					IEditorPart editor = (IEditorPart) page;
+					if (editor.isDirty()) {
+						return true;
+					}
 				}
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/SharedHeaderFormEditor.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/SharedHeaderFormEditor.java
index 37ac211..bd32e4f 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/SharedHeaderFormEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/SharedHeaderFormEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -166,7 +166,10 @@ public abstract class SharedHeaderFormEditor extends FormEditor {
 	 * @see org.eclipse.ui.forms.editor.FormEditor#isDirty()
 	 */
 	public boolean isDirty() {
-		return headerForm.isDirty() || super.isDirty();
+		if (headerForm != null && headerForm.isDirty()) {
+			return true;
+		}
+		return super.isDirty();
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
index 42e9375..21450d6 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ColumnLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     dinko.ivanov at sap.com - patch #70790
+ *     RasmussenJamie at comcast.net - patch for Bug 184345
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 import org.eclipse.swt.SWT;
@@ -185,7 +186,7 @@ public final class ColumnLayout extends Layout implements ILayoutExtension {
 			cwidth = Math.max(cwidth, sizes[i].x);
 			cheight += sizes[i].y;
 		}
-		int ncolumns = (carea.width - leftMargin - rightMargin - horizontalSpacing) / (cwidth + horizontalSpacing);
+		int ncolumns = (carea.width - leftMargin - rightMargin + horizontalSpacing) / (cwidth + horizontalSpacing);
 		ncolumns = Math.min(ncolumns, children.length);		
 		ncolumns = Math.max(ncolumns, minNumColumns);
 		ncolumns = Math.min(ncolumns, maxNumColumns);
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
index f0f4ea8..f7cfd6d 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Kai Nacke - Fix for Bug 202382
+ *     Bryan Hunt - Fix for Bug 245457
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 
@@ -134,6 +135,14 @@ public class ExpandableComposite extends Canvas {
 	public static final int LEFT_TEXT_CLIENT_ALIGNMENT = 1 << 13;
 
 	/**
+	 * By default, a focus box is painted around the title when it receives focus.
+	 * If this style is used, the focus box will not be painted.  This style does
+	 * not apply when FOCUS_TITLE is used.
+	 * @since 3.5
+	 */
+	public static final int NO_TITLE_FOCUS_BOX = 1 << 14;
+	
+	/**
 	 * Width of the margin that will be added around the control (default is 0).
 	 */
 	public int marginWidth = 0;
@@ -634,7 +643,7 @@ public class ExpandableComposite extends Canvas {
 							}
 							break;
 						case SWT.Paint:
-							if (toggle != null) {
+							if (toggle != null && (getExpansionStyle() & NO_TITLE_FOCUS_BOX) == 0) {
 								paintTitleFocus(e.gc);
 							}
 							break;
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
index 61f6543..9e648fe 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormText.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -646,7 +646,7 @@ public class FormText extends Canvas {
 		model.clearCache(null);
 		Font boldFont = (Font) resourceTable.get(FormTextModel.BOLD_FONT_ID);
 		if (boldFont != null) {
-			FormFonts.getInstance().markFinished(boldFont);
+			FormFonts.getInstance().markFinished(boldFont, getDisplay());
 			resourceTable.remove(FormTextModel.BOLD_FONT_ID);
 		}
 		ensureBoldFontPresent(getFont());
@@ -1306,7 +1306,10 @@ public class FormText extends Canvas {
 		event.display = this.getDisplay();
 		event.type = SWT.Selection;
 		notifyListeners(SWT.Selection, event);
-		getAccessible().selectionChanged();
+		// A listener could have caused the widget to be disposed
+		if (!isDisposed()) {
+		    getAccessible().selectionChanged();
+		}
 	}
 
 	private void handleDrag(MouseEvent e) {
@@ -1344,7 +1347,8 @@ public class FormText extends Canvas {
 			}
 		} else {
 			if (e.button == 1) {
-				endSelection(e);
+				endSelection(e);		
+				if (isDisposed()) return; 
 				IHyperlinkSegment segmentUnder = model
 						.findHyperlinkAt(e.x, e.y);
 				if (segmentUnder != null && armed == segmentUnder && selData == null) {
@@ -1672,7 +1676,7 @@ public class FormText extends Canvas {
 			Font boldFont = (Font) resourceTable
 					.get(FormTextModel.BOLD_FONT_ID);
 			if (boldFont != null) {
-				FormFonts.getInstance().markFinished(boldFont);
+				FormFonts.getInstance().markFinished(boldFont, getDisplay());
 				resourceTable.remove(FormTextModel.BOLD_FONT_ID);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
index cea7bba..44a9a37 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/FormToolkit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -208,8 +208,8 @@ public class FormToolkit {
 		}
 
 		public void dispose() {
-			if (boldFont != null) {
-				FormFonts.getInstance().markFinished(boldFont);
+			if (boldFont != null && colors.getDisplay() != null) {
+				FormFonts.getInstance().markFinished(boldFont, colors.getDisplay());
 				boldFont = null;
 			}
 		}
@@ -714,11 +714,11 @@ public class FormToolkit {
 			return;
 		}
 		isDisposed = true;
+		boldFontHolder.dispose();
 		if (colors.isShared() == false) {
 			colors.dispose();
 			colors = null;
 		}
-		boldFontHolder.dispose();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
index 4d620f1..d3dcb78 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Section.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -92,7 +92,7 @@ public class Section extends ExpandableComposite {
 				public void handleEvent(Event e) {
 					Image image = Section.super.getBackgroundImage();
 					if (image != null) {
-						FormImages.getInstance().markFinished(image);
+						FormImages.getInstance().markFinished(image, getDisplay());
 					}
 					Section.super.setBackgroundImage(null);
 				}
@@ -460,7 +460,7 @@ public class Section extends ExpandableComposite {
 
 	private void updateHeaderImage(Color bg, Rectangle bounds, int theight,
 			int realtheight) {
-		Image image = FormImages.getInstance().getGradient(getBackground(), bg, realtheight, theight, marginHeight);
+		Image image = FormImages.getInstance().getGradient(getBackground(), bg, realtheight, theight, marginHeight, getDisplay());
 		super.setBackgroundImage(image);
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
index 1ed1744..ca7b205 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SharedScrolledComposite.java
@@ -7,6 +7,8 @@
  * 
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Wojciech Galanciak - fix for Bug 294868 – [Forms] Problem with text 
+ *     wrapping in SharedScrolledComposite:
  *******************************************************************************/
 package org.eclipse.ui.forms.widgets;
 
@@ -178,7 +180,13 @@ public abstract class SharedScrolledComposite extends ScrolledComposite {
 		Rectangle clientArea = getClientArea();
 		if (c == null)
 			return;
-
+		if (clientArea.width == getSize().x) {
+			ScrollBar bar = getVerticalBar();
+			if (bar != null) {
+			    clientArea.width -= bar.getSize().x;
+			}
+		}
+			
 		contentCache.setControl(c);
 		if (flushCache) {
 			contentCache.flush();
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormFonts.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormFonts.java
index b6f6fa7..5ec5831 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormFonts.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormFonts.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import java.util.HashMap;
 
 import org.eclipse.jface.resource.DeviceResourceException;
 import org.eclipse.jface.resource.FontDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.resource.LocalResourceManager;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Device;
@@ -31,7 +30,7 @@ public class FormFonts {
 		return instance;
 	}
 	
-	private LocalResourceManager resources;
+	private ResourceManagerManger manager = new ResourceManagerManger();
 	private HashMap descriptors;
 	
 	private FormFonts() {
@@ -79,17 +78,18 @@ public class FormFonts {
 	public Font getBoldFont(Display display, Font font) {
 		checkHashMaps();
 		BoldFontDescriptor desc = new BoldFontDescriptor(font);
-		Font result = getResourceManager().createFont(desc);
+		Font result = manager.getResourceManager(display).createFont(desc);
 		descriptors.put(result, desc);
 		return result;
 	}
 	
-	public boolean markFinished(Font boldFont) {
+	public boolean markFinished(Font boldFont, Display display) {
 		checkHashMaps();
 		BoldFontDescriptor desc = (BoldFontDescriptor)descriptors.get(boldFont);
 		if (desc != null) {
-			getResourceManager().destroyFont(desc);
-			if (getResourceManager().find(desc) == null) {
+			LocalResourceManager resourceManager = manager.getResourceManager(display);
+			resourceManager.destroyFont(desc);
+			if (resourceManager.find(desc) == null) {
 				descriptors.remove(boldFont);
 				validateHashMaps();
 			}
@@ -100,12 +100,6 @@ public class FormFonts {
 		boldFont.dispose();
 		return false;
 	}
-	
-	private LocalResourceManager getResourceManager() {
-		if (resources == null)
-			resources = new LocalResourceManager(JFaceResources.getResources());
-		return resources;
-	}
 
 	private void checkHashMaps() {
 		if (descriptors == null)
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
index 5146b76..0fb14a6 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormHeading.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -576,7 +576,7 @@ public class FormHeading extends Canvas {
 		addListener(SWT.Dispose, new Listener() {
 			public void handleEvent(Event e) {
 				if (gradientImage != null) {
-					FormImages.getInstance().markFinished(gradientImage);
+					FormImages.getInstance().markFinished(gradientImage, getDisplay());
 					gradientImage = null;
 				}
 			}
@@ -713,7 +713,7 @@ public class FormHeading extends Canvas {
 			// reset
 			gradientInfo = null;
 			if (gradientImage != null) {
-				FormImages.getInstance().markFinished(gradientImage);
+				FormImages.getInstance().markFinished(gradientImage, getDisplay());
 				gradientImage = null;
 				setBackgroundImage(null);
 			}
@@ -853,12 +853,12 @@ public class FormHeading extends Canvas {
 	private void updateGradientImage() {
 		Rectangle rect = getBounds();
 		if (gradientImage != null) {
-			FormImages.getInstance().markFinished(gradientImage);
+			FormImages.getInstance().markFinished(gradientImage, getDisplay());
 			gradientImage = null;
 		}
 		if (gradientInfo != null) {
 			gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents,
-					gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG));
+					gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG), getDisplay());
 		} else if (backgroundImage != null && !isBackgroundImageTiled()) {
 			gradientImage = new Image(getDisplay(), Math.max(rect.width, 1),
 					Math.max(rect.height, 1));
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormImages.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormImages.java
index 830f7de..bf5536e 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormImages.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormImages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.util.Arrays;
 import java.util.HashMap;
 
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.resource.LocalResourceManager;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Device;
@@ -23,6 +22,7 @@ import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.ImageData;
 import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Display;
 
 public class FormImages {
 	private static FormImages instance;
@@ -33,7 +33,7 @@ public class FormImages {
 		return instance;
 	}
 
-	private LocalResourceManager resources;
+	private ResourceManagerManger manager = new ResourceManagerManger();
 	private HashMap descriptors;
 	
 	private FormImages() {
@@ -238,15 +238,15 @@ public class FormImages {
 	}
 	
 	public Image getGradient(Color color1, Color color2,
-			int realtheight, int theight, int marginHeight) {
+			int realtheight, int theight, int marginHeight, Display display) {
 		if (color1 == null || color1.isDisposed() || color2 == null || color2.isDisposed())
 			return null;
 		AbstractImageDescriptor desc = new SimpleImageDescriptor(color1, color2, realtheight, theight, marginHeight);
-		return getGradient(desc);
+		return getGradient(desc, display);
 	}
 	
 	public Image getGradient(Color[] colors, int[] percents,
-			int length, boolean vertical, Color bg) {
+			int length, boolean vertical, Color bg, Display display) {
 		if (colors.length == 0)
 			return null;
 		for (int i = 0; i < colors.length; i++)
@@ -255,22 +255,23 @@ public class FormImages {
 		if (bg != null && bg.isDisposed())
 			return null;
 		AbstractImageDescriptor desc = new ComplexImageDescriptor(colors, length, percents, vertical, bg);
-		return getGradient(desc);
+		return getGradient(desc, display);
 	}
 	
-	private synchronized Image getGradient(AbstractImageDescriptor desc) {
+	private synchronized Image getGradient(AbstractImageDescriptor desc, Display display) {
 		checkHashMaps();
-		Image result = getResourceManager().createImage(desc);
+		Image result = manager.getResourceManager(display).createImage(desc);
 		descriptors.put(result, desc);
 		return result;
 	}
 	
-	public synchronized boolean markFinished(Image image) {
+	public synchronized boolean markFinished(Image image, Display display) {
 		checkHashMaps();
 		AbstractImageDescriptor desc = (AbstractImageDescriptor)descriptors.get(image);
 		if (desc != null) {
-			getResourceManager().destroyImage(desc);
-			if (getResourceManager().find(desc) == null) {
+			LocalResourceManager resourceManager = manager.getResourceManager(display);
+			resourceManager.destroyImage(desc);
+			if (resourceManager.find(desc) == null) {
 				descriptors.remove(image);
 				validateHashMaps();
 			}
@@ -280,12 +281,6 @@ public class FormImages {
 		image.dispose();
 		return false;
 	}
-	
-	private LocalResourceManager getResourceManager() {
-		if (resources == null)
-			resources = new LocalResourceManager(JFaceResources.getResources());
-		return resources;
-	}
 
 	private void checkHashMaps() {
 		if (descriptors == null)
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormUtil.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormUtil.java
index db479e9..db3c7ed 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormUtil.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/FormUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -374,6 +374,9 @@ public class FormUtil {
 	}
 
 	public static void processKey(int keyCode, Control c) {
+		if (c.isDisposed()) {
+			return;
+		}
 		ScrolledComposite scomp = FormUtil.getScrolledComposite(c);
 		if (scomp != null) {
 			if (c instanceof Combo)
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ResourceManagerManger.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ResourceManagerManger.java
new file mode 100644
index 0000000..738d727
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/ResourceManagerManger.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.internal.forms.widgets;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Class which can get the appropriate resource manager for a Display
+ * In most applications there will be only one display but see
+ * Bug 295981 for an example where this is not the case
+ */
+
+public class ResourceManagerManger {
+	
+	private HashMap resourceManagers;
+
+	public LocalResourceManager getResourceManager(Display display) {
+		if (resourceManagers == null) {
+			resourceManagers = new HashMap();
+		}
+		LocalResourceManager resources = (LocalResourceManager)resourceManagers.get(display);
+		if (resources == null) {
+			pruneResourceManagers();
+			resources = new LocalResourceManager(JFaceResources.getResources(display));
+			resourceManagers.put(display, resources);
+		}
+		return resources;
+	}
+
+	private void pruneResourceManagers() {
+		Set displays = resourceManagers.keySet();
+		for (Iterator iter = displays.iterator(); iter.hasNext();) {
+			Display display = (Display)iter.next();
+			if (display.isDisposed()) {
+				resourceManagers.remove(display);
+				iter = displays.iterator();
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java
index c363299..697100d 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextHyperlinkSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,8 +66,8 @@ public class TextHyperlinkSegment extends TextSegment implements
 		gc.setForeground(savedFg);
 	}
 	
-	protected void drawString(GC gc, String s, int clipX, int clipY) {
-		gc.drawString(s, clipX, clipY, false);
+	protected void drawText(GC gc, String s, int clipX, int clipY) {
+		gc.drawText(s, clipX, clipY, false);
 	}
 
 	public String getTooltipText() {
diff --git a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
index 0a904ed..9738e3c 100644
--- a/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
+++ b/eclipse/plugins/org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/TextSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *      Konstantin Komissarchik  - Fix for Bug 316997
  *******************************************************************************/
 package org.eclipse.ui.internal.forms.widgets;
 
@@ -292,6 +293,7 @@ public class TextSegment extends ParagraphSegment {
 			}
 			lineExtent.x += textFragment.length;
 			lineExtent.y = Math.max(lineHeight, lineExtent.y);
+			width = Math.max (width, locator.x + lineExtent.x);
 		}
 		int lineWidth = lineExtent.x;
 		if (isSelectable())
@@ -562,7 +564,9 @@ public class TextSegment extends ParagraphSegment {
 			int lindex = sstart != -1 ? sstart : 0;
 			int rindex = sstop != -1 ? sstop : s.length();
 			String mid = s.substring(lindex, rindex);
-			selData.addSegment(mid);
+			if (mid.length() > 0 ) {
+			    selData.addSegment(mid);
+			}
 		}
 	}
 
@@ -591,15 +595,15 @@ public class TextSegment extends ParagraphSegment {
 			reverse = true;
 		if (reverse) {
 			drawUnderline(gc, swidth, clipX, clipLineY, hover, rolloverMode);
-			drawString(gc, s, clipX, clipY);
+			drawText(gc, s, clipX, clipY);
 		} else {
-			drawString(gc, s, clipX, clipY);
+			drawText(gc, s, clipX, clipY);
 			drawUnderline(gc, swidth, clipX, clipLineY, hover, rolloverMode);
 		}
 	}
 	
-	protected void drawString(GC gc, String s, int clipX, int clipY) {
-		gc.drawString(s, clipX, clipY, true);
+	protected void drawText(GC gc, String s, int clipX, int clipY) {
+		gc.drawText(s, clipX, clipY, true);
 	}
 
 	private void drawUnderline(GC gc, int swidth, int x, int y, boolean hover,
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
index b3088d6..e085a66 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/META-INF/MANIFEST.MF
@@ -2,17 +2,17 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide.application;singleton:=true
-Bundle-Version: 1.0.101.qualifier
+Bundle-Version: 1.0.201.qualifier
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
 Bundle-ClassPath: e4-ide-application.jar,
  .
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
+Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.core.filesystem;bundle-version="1.3.0"
 Export-Package: org.eclipse.ui.internal.ide.application;x-internal:=true,
  org.eclipse.ui.internal.ide.application.dialogs;x-internal:=true
 Import-Package: com.ibm.icu.text
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/plugin.properties b/eclipse/plugins/org.eclipse.ui.ide.application/plugin.properties
index 7ee1e4d..feb602a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006, 2009 IBM Corporation and others.
+# Copyright (c) 2006, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,4 +22,4 @@ actionSets.updates.label = &Find and Install...
 actionSets.configManager.label = &Manage Configuration...
 
 projectConfigure.label = Configure
-projectConfigure.mnemonic = g
\ No newline at end of file
+projectConfigure.mnemonic = g
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/DelayedEventsProcessor.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/DelayedEventsProcessor.java
new file mode 100644
index 0000000..9845c9c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/DelayedEventsProcessor.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.ide.application;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+
+/**
+ * Helper class used to process delayed events.
+ * Events currently supported:
+ * <ul>
+ * <li>SWT.OpenDocument</li>
+ * </ul>
+ * @since 3.3
+ */
+public class DelayedEventsProcessor implements Listener {
+
+	private ArrayList filesToOpen = new ArrayList(1);
+
+	/**
+	 * Constructor.
+	 * @param display display used as a source of event
+	 */
+	public DelayedEventsProcessor(Display display) {
+		display.addListener(SWT.OpenDocument, this);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+	 */
+	public void handleEvent(Event event) {
+		final String path = event.text;
+		if (path == null)
+			return;
+		// If we start supporting events that can arrive on a non-UI thread, the following
+		// line will need to be in a "synchronized" block:
+		filesToOpen.add(path);
+	}
+	
+	/**
+	 * Process delayed events.
+	 * @param display display associated with the workbench 
+	 */
+	public void catchUp(Display display) {
+		if (filesToOpen.isEmpty())
+			return;
+		
+		// If we start supporting events that can arrive on a non-UI thread, the following
+		// lines will need to be in a "synchronized" block:
+		String[] filePaths = new String[filesToOpen.size()];
+		filesToOpen.toArray(filePaths);
+		filesToOpen.clear();
+
+		for(int i = 0; i < filePaths.length; i++) {
+			openFile(display, filePaths[i]);
+		}
+	}
+
+	private void openFile(Display display, final String path) {
+		display.asyncExec(new Runnable() {
+			public void run() {
+				IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+				if (window == null)
+					return;
+				IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
+				IFileInfo fetchInfo = fileStore.fetchInfo();
+				if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
+					IWorkbenchPage page = window.getActivePage();
+					if (page == null) {
+						String msg = NLS.bind(IDEWorkbenchMessages.OpenDelayedFileAction_message_noWindow, path);
+						MessageDialog.open(MessageDialog.ERROR, window.getShell(),
+								IDEWorkbenchMessages.OpenDelayedFileAction_title,
+								msg, SWT.SHEET);
+					}
+					try {
+						IDE.openInternalEditorOnFileStore(page, fileStore);
+						Shell shell = window.getShell();
+						if (shell != null) {
+							if (shell.getMinimized())
+								shell.setMinimized(false);
+							shell.forceActive();
+						}
+					} catch (PartInitException e) {
+						String msg = NLS.bind(IDEWorkbenchMessages.OpenDelayedFileAction_message_errorOnOpen,
+										fileStore.getName());
+						CoreException eLog = new PartInitException(e.getMessage());
+						IDEWorkbenchPlugin.log(msg, new Status(IStatus.ERROR, IDEApplication.PLUGIN_ID, msg, eLog));
+						MessageDialog.open(MessageDialog.ERROR, window.getShell(),
+								IDEWorkbenchMessages.OpenDelayedFileAction_title,
+								msg, SWT.SHEET);
+					}
+				} else {
+					String msg = NLS.bind(IDEWorkbenchMessages.OpenDelayedFileAction_message_fileNotFound, path);
+					MessageDialog.open(MessageDialog.ERROR, window.getShell(),
+							IDEWorkbenchMessages.OpenDelayedFileAction_title,
+							msg, SWT.SHEET);
+				}
+			}
+		});
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
index 036bc68..cf494cf 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,6 +86,8 @@ public class IDEApplication implements IApplication, IExecutableExtension {
      */
     public Object start(IApplicationContext appContext) throws Exception {
         Display display = createDisplay();
+        // processor must be created before we start event loop
+        DelayedEventsProcessor processor = new DelayedEventsProcessor(display);
 
         try {
 
@@ -111,7 +113,7 @@ public class IDEApplication implements IApplication, IExecutableExtension {
             // the workbench globally so that all UI plug-ins can find it using
             // PlatformUI.getWorkbench() or AbstractUIPlugin.getWorkbench()
             int returnCode = PlatformUI.createAndRunWorkbench(display,
-                    new IDEWorkbenchAdvisor());
+            		new IDEWorkbenchAdvisor(processor));
 
             // the workbench doesn't support relaunch yet (bug 61809) so
             // for now restart is used, and exit data properties are checked
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
index 28edee1..81693f3 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -50,7 +50,9 @@ import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.application.IWorkbenchConfigurer;
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
@@ -143,6 +145,11 @@ public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
 	private AbstractStatusHandler ideWorkbenchErrorHandler;
 
 	/**
+	 * Helper class used to process delayed events.
+	 */
+	private DelayedEventsProcessor delayedEventsProcessor;
+
+	/**
 	 * Creates a new workbench advisor instance.
 	 */
 	public IDEWorkbenchAdvisor() {
@@ -151,6 +158,25 @@ public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
 			throw new IllegalStateException();
 		}
 		workbenchAdvisor = this;
+		
+		Listener closeListener = new Listener() {
+			public void handleEvent(Event event) {
+				boolean doExit = IDEWorkbenchWindowAdvisor.promptOnExit(null);
+				event.doit = doExit;
+				if (!doExit)
+					event.type = SWT.None;
+			}
+		};
+		Display.getDefault().addListener(SWT.Close, closeListener);
+	}
+
+	/**
+	 * Creates a new workbench advisor instance supporting delayed file open.
+	 * @param processor helper class used to process delayed events
+	 */
+	public IDEWorkbenchAdvisor(DelayedEventsProcessor processor) {
+		this();
+		this.delayedEventsProcessor = processor;
 	}
 
 	/*
@@ -377,6 +403,79 @@ public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
 		job.schedule();
 	}
 
+	private class CancelableProgressMonitorWrapper extends
+			ProgressMonitorWrapper {
+		private double total = 0;
+		private ProgressMonitorJobsDialog dialog;
+
+		CancelableProgressMonitorWrapper(IProgressMonitor monitor,
+				ProgressMonitorJobsDialog dialog) {
+			super(monitor);
+			this.dialog = dialog;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see org.eclipse.core.runtime.ProgressMonitorWrapper#internalWorked(double)
+		 */
+		public void internalWorked(double work) {
+			super.internalWorked(work);
+			total += work;
+			updateProgressDetails();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see org.eclipse.core.runtime.ProgressMonitorWrapper#worked(int)
+		 */
+		public void worked(int work) {
+			super.worked(work);
+			total += work;
+			updateProgressDetails();
+		}
+
+		public void beginTask(String name, int totalWork) {
+			super.beginTask(name, totalWork);
+			subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_preHistoryCompaction);
+		}
+
+		private void updateProgressDetails() {
+			if (!isCanceled() && Math.abs(total - 4.0) < 0.0001 /* right before history compacting */) {
+				subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_cancelHistoryPruning);
+				dialog.setCancelable(true);
+			}
+			if (Math.abs(total - 5.0) < 0.0001 /* history compacting finished */) {
+				subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_postHistoryCompaction);
+				dialog.setCancelable(false);
+			}
+		}
+	}
+
+	private class CancelableProgressMonitorJobsDialog extends
+			ProgressMonitorJobsDialog {
+
+		public CancelableProgressMonitorJobsDialog(Shell parent) {
+			super(parent);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog#createDetailsButton(org.eclipse.swt.widgets.Composite)
+		 */
+		protected void createButtonsForButtonBar(Composite parent) {
+			super.createButtonsForButtonBar(parent);
+			registerCancelButtonListener();
+		}
+
+		public void registerCancelButtonListener() {
+			cancel.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					subTaskLabel.setText(""); //$NON-NLS-1$
+				}
+			});
+		}
+	}
+
 	/**
 	 * Disconnect from the core workspace.
 	 */
@@ -386,68 +485,18 @@ public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
 				IDEWorkbenchPlugin.IDE_WORKBENCH, 1,
 				IDEWorkbenchMessages.ProblemSavingWorkbench, null);
 		try {
-			final ProgressMonitorJobsDialog p = new ProgressMonitorJobsDialog(null) {
-
-				/*
-				 * (non-Javadoc)
-				 * @see org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog#createDetailsButton(org.eclipse.swt.widgets.Composite)
-				 */
-				protected void createButtonsForButtonBar(Composite parent) {
-					super.createButtonsForButtonBar(parent);
-					registerCancelButtonListener();
-				}
+			final ProgressMonitorJobsDialog p = new CancelableProgressMonitorJobsDialog(
+					null);
 
-				public void registerCancelButtonListener() {
-					cancel.addSelectionListener(new SelectionAdapter() {
-						public void widgetSelected(SelectionEvent e) {
-							subTaskLabel.setText(""); //$NON-NLS-1$
-						}
-					});
-				}
-			};
+			final boolean applyPolicy = ResourcesPlugin.getWorkspace()
+					.getDescription().isApplyFileStatePolicy();
 
 			IRunnableWithProgress runnable = new IRunnableWithProgress() {
 				public void run(IProgressMonitor monitor) {
 					try {
-						monitor = new ProgressMonitorWrapper(monitor) {
-							private double total = 0;
-
-							/*
-							 * (non-Javadoc)
-							 * @see org.eclipse.core.runtime.ProgressMonitorWrapper#internalWorked(double)
-							 */
-							public void internalWorked(double work) {
-								super.internalWorked(work);
-								total += work;
-								updateProgressDetails();
-							}
-
-							/*
-							 * (non-Javadoc)
-							 * @see org.eclipse.core.runtime.ProgressMonitorWrapper#worked(int)
-							 */
-							public void worked(int work) {
-								super.worked(work);
-								total += work;
-								updateProgressDetails();
-							}
-
-							public void beginTask(String name, int totalWork) {
-								super.beginTask(name, totalWork);
-								subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_preHistoryCompaction);
-							}
-
-							private void updateProgressDetails() {
-								if (!isCanceled() && Math.abs(total - 4.0) < 0.0001 /* right before history compacting */){
-									subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_cancelHistoryPruning);
-									p.setCancelable(true);
-								}
-								if (Math.abs(total - 5.0) < 0.0001 /* history compacting finished */) {
-									subTask(IDEWorkbenchMessages.IDEWorkbenchAdvisor_postHistoryCompaction);
-									p.setCancelable(false);
-								}
-							}
-						};
+						if (applyPolicy)
+							monitor = new CancelableProgressMonitorWrapper(
+									monitor, p);
 
 						status.merge(((Workspace) ResourcesPlugin
 								.getWorkspace()).save(true, true, monitor));
@@ -828,4 +877,13 @@ public class IDEWorkbenchAdvisor extends WorkbenchAdvisor {
 		}
 		return ideWorkbenchErrorHandler;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.application.WorkbenchAdvisor#eventLoopIdle(org.eclipse.swt.widgets.Display)
+	 */
+	public void eventLoopIdle(Display display) {
+		if (delayedEventsProcessor != null)
+			delayedEventsProcessor.catchUp(display);
+		super.eventLoopIdle(display);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
index 70dfade..be076bf 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Markus Schorn (Wind River Systems) -  bug 284447
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.application;
 
@@ -21,12 +22,15 @@ import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+
 import org.eclipse.jface.action.ToolBarManager;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.dnd.FileTransfer;
@@ -36,6 +40,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
@@ -101,10 +106,16 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 	};
 
 	private IAdaptable lastInput;
-
 	private IWorkbenchAction openPerspectiveAction;
 
 	/**
+	 * The property change listener.
+	 * @since 3.6.1
+	 */
+	private IPropertyChangeListener propertyChangeListener;
+
+
+	/**
 	 * Crates a new IDE workbench window advisor.
 	 * 
 	 * @param wbAdvisor
@@ -148,6 +159,20 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 		}
 		// the user has asked to close the last window, while will cause the
 		// workbench to close in due course - prompt the user for confirmation
+		return promptOnExit(getWindowConfigurer().getWindow().getShell());
+	}
+
+	/**
+	 * Asks the user whether the workbench should really be closed. Only asks if
+	 * the preference is enabled.
+	 * 
+	 * @param parentShell
+	 *            the parent shell to use for the confirmation dialog
+	 * @return <code>true</code> if OK to exit, <code>false</code> if the user
+	 *         canceled
+	 * @since 3.6
+	 */
+	static boolean promptOnExit(Shell parentShell) {
 		IPreferenceStore store = IDEWorkbenchPlugin.getDefault()
 				.getPreferenceStore();
 		boolean promptOnExit = store
@@ -170,8 +195,7 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 			}
 
 			MessageDialogWithToggle dlg = MessageDialogWithToggle
-					.openOkCancelConfirm(getWindowConfigurer().getWindow()
-							.getShell(),
+					.openOkCancelConfirm(parentShell,
 							IDEWorkbenchMessages.PromptOnExitDialog_shellTitle,
 							message,
 							IDEWorkbenchMessages.PromptOnExitDialog_choice,
@@ -297,6 +321,21 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 						// do nothing
 					}
 				});
+		
+		// Listen for changes of the workspace name.
+		propertyChangeListener = new IPropertyChangeListener() {
+			public void propertyChange(PropertyChangeEvent event) {
+				if (IDEInternalPreferences.WORKSPACE_NAME.equals(event
+						.getProperty())) {
+					// Make sure the title is actually updated by
+					// setting last active page.
+					lastActivePage = null;
+					updateTitle(false);
+				}
+			}
+		};
+		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
+				.addPropertyChangeListener(propertyChangeListener);
 	}
 
 	private String computeTitle() {
@@ -332,7 +371,7 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 			if (input != null && !input.equals(wbAdvisor.getDefaultPageInput())) {
 				label = currentPage.getLabel();
 			}
-			if (label != null && !label.equals("")) { //$NON-NLS-1$ 
+			if (label != null && !label.equals("")) { //$NON-NLS-1$
 				title = NLS.bind(
 						IDEWorkbenchMessages.WorkbenchWindow_shellTitle, label,
 						title);
@@ -344,6 +383,15 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 			title = NLS.bind(IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
 					title, workspaceLocation);
 		}
+		
+		// Bug 284447: Prepend workspace name to the title
+		String workspaceName = IDEWorkbenchPlugin.getDefault()
+				.getPreferenceStore().getString(
+						IDEInternalPreferences.WORKSPACE_NAME);
+		if (workspaceName != null && workspaceName.length() > 0) {
+			title = NLS.bind(IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
+					workspaceName, title);
+		}
 
 		return title;
 	}
@@ -663,6 +711,11 @@ public class IDEWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 	 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#dispose()
 	 */
 	public void dispose() {
+		if (propertyChangeListener != null) {
+			IDEWorkbenchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(propertyChangeListener);
+			propertyChangeListener = null;
+		}
+
 		if (openPerspectiveAction!=null) {
 			openPerspectiveAction.dispose();
 			openPerspectiveAction = null;
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/ResourcePerspective.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/ResourcePerspective.java
index 237618b..7e803c9 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/ResourcePerspective.java
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/ResourcePerspective.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ package org.eclipse.ui.internal.ide.application;
 import org.eclipse.ui.IFolderLayout;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IPerspectiveFactory;
-import org.eclipse.ui.navigator.resources.ProjectExplorer;
 import org.eclipse.ui.wizards.newresource.BasicNewFileResourceWizard;
 import org.eclipse.ui.wizards.newresource.BasicNewFolderResourceWizard;
 
@@ -32,7 +31,7 @@ public class ResourcePerspective implements IPerspectiveFactory {
     }
 
     /**
-     * Defines the initial layout for a perspective.  
+     * Defines the initial layout for a perspective.
      *
      * Implementors of this method may add additional views to a
      * perspective.  The perspective already contains an editor folder
@@ -51,7 +50,7 @@ public class ResourcePerspective implements IPerspectiveFactory {
     }
 
     /**
-     * Defines the initial actions for a page.  
+     * Defines the initial actions for a page.
      * @param layout The layout we are filling
      */
     public void defineActions(IPageLayout layout) {
@@ -60,7 +59,7 @@ public class ResourcePerspective implements IPerspectiveFactory {
         layout.addNewWizardShortcut(BasicNewFileResourceWizard.WIZARD_ID);
 
         // Add "show views".
-        layout.addShowViewShortcut(ProjectExplorer.VIEW_ID);
+		layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
         layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
         layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
         layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
@@ -72,7 +71,7 @@ public class ResourcePerspective implements IPerspectiveFactory {
     }
 
     /**
-     * Defines the initial layout for a page.  
+     * Defines the initial layout for a page.
      * @param layout The layout we are filling
      */
     public void defineLayout(IPageLayout layout) {
@@ -82,7 +81,7 @@ public class ResourcePerspective implements IPerspectiveFactory {
         // Top left.
         IFolderLayout topLeft = layout.createFolder(
                 "topLeft", IPageLayout.LEFT, (float) 0.26, editorArea);//$NON-NLS-1$
-        topLeft.addView(ProjectExplorer.VIEW_ID);
+		topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
         topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);
 
         // Add a placeholder for the old navigator to maintain compatibility
diff --git a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java
index 7860a35..b4f355f 100644
--- a/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Eric Rizzo and others.
+ * Copyright (c) 2009, 2010 Eric Rizzo and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Eric Rizzo - initial API and implementation
+ *     Helena Halperin (IBM) - bug 299031 [BiDi] Incorrect file path display
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.application.dialogs;
 
@@ -16,6 +17,7 @@ import java.util.Arrays;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -142,7 +144,7 @@ public class RecentWorkspacesPreferencePage extends PreferencePage
 		for (int i = 0; i < recentWorkspaces.length; i++) {
 			String aWorkspace = recentWorkspaces[i];
 			if (aWorkspace != null) {
-				workspacesList.add(aWorkspace);
+				workspacesList.add(TextProcessor.process(aWorkspace));
 			}
 		}
 	}
@@ -174,7 +176,12 @@ public class RecentWorkspacesPreferencePage extends PreferencePage
 	public boolean performOk() {
 		int maxWorkspaces = maxWorkspacesField.getSelection();
 		String[] workspaces = new String[maxWorkspaces];
-		String[] listItems = workspacesList.getItems();
+		String[] tmpListItem = workspacesList.getItems();
+		String[] listItems = new String[tmpListItem.length];
+
+		for (int i = 0; i < tmpListItem.length; i++){
+			listItems[i] = TextProcessor.deprocess(tmpListItem[i]); 
+		}
 
 		if (maxWorkspaces < listItems.length) {
 			// TODO: maybe alert the user that the list will be truncated?
diff --git a/eclipse/plugins/org.eclipse.ui.ide/.settings/.api_filters b/eclipse/plugins/org.eclipse.ui.ide/.settings/.api_filters
deleted file mode 100644
index 2325472..0000000
--- a/eclipse/plugins/org.eclipse.ui.ide/.settings/.api_filters
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.ui.ide" version="2">
-    <resource path="extensions/org/eclipse/ui/actions/RefreshAction.java" type="org.eclipse.ui.actions.RefreshAction">
-        <filter id="438431863">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.actions.RefreshAction"/>
-                <message_argument value="refreshAll()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/views/navigator/ResourceNavigatorMessages.java" type="org.eclipse.ui.views.navigator.ResourceNavigatorMessages">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.views.navigator.ResourceNavigatorMessages"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.ui.ide/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.ide/META-INF/MANIFEST.MF
index d18407a..4ee49d0 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.ide/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.ide; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: e4-ide.jar,
  .
 Bundle-Activator: org.eclipse.ui.internal.ide.IDEWorkbenchPlugin
@@ -45,7 +45,7 @@ Export-Package: org.eclipse.ui,
  org.eclipse.ui.views.tasklist,
  org.eclipse.ui.wizards.datatransfer,
  org.eclipse.ui.wizards.newresource
-Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
+Require-Bundle: org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)";resolution:=optional,
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
@@ -53,8 +53,7 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)";resolu
  org.eclipse.ui.views;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
  org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.ui.forms;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
- org.eclipse.equinox.p2.engine;bundle-version="[1.0.100,2.0.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.equinox.p2.core;bundle-version="[1.0.100,2.0.0)"
+ org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)",
+ org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)"
 Import-Package: com.ibm.icu.text
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/eclipse/plugins/org.eclipse.ui.ide/about.html b/eclipse/plugins/org.eclipse.ui.ide/about.html
index 27d02e1..c78ec9a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/about.html
+++ b/eclipse/plugins/org.eclipse.ui.ide/about.html
@@ -28,11 +28,11 @@ and such source code may be obtained at <a href="http://www.eclipse.org">http://
 
 <p>The Content includes items that have been sourced from third parties as set out below. If you did not
 receive this Content directly from the Eclipse Foundation, the following is provided for informational
-purposes only, and you should look to the Redistributor’s license for terms and conditions of use.</p>
+purposes only, and you should look to the Redistributor’s license for terms and conditions of use.</p>
 
 <h4>C++ Standard Template Library</h4>
 <p>
-This plugin contains a Java port of the code for the STL heap sorting algprithm. The original code can
+This plugin contains a Java port of the code for the STL heap sorting algorithm. The original code can
 be found at:
 <ul>
 <a href="http://www.sgi.com/tech/stl/stl_heap.h">http://www.sgi.com/tech/stl/stl_heap.h</a> 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
index 8e735da..432e849 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/BuildAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River) -  [296800] UI build actions should not lock the workspace
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
@@ -306,8 +307,7 @@ public class BuildAction extends WorkspaceAction {
 
 	    // Save all resources prior to doing build
         BuildUtilities.saveEditors(projects);
-        runInBackground(ResourcesPlugin.getWorkspace().getRuleFactory()
-                .buildRule(), ResourcesPlugin.FAMILY_MANUAL_BUILD);
+        runInBackground(null, ResourcesPlugin.FAMILY_MANUAL_BUILD);
     }
 
     /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseResourceAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseResourceAction.java
index 20675fe..ea199f1 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseResourceAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseResourceAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -195,7 +195,7 @@ public class CloseResourceAction extends WorkspaceAction implements
      * Handles a resource changed event by updating the enablement
      * if one of the selected projects is opened or closed.
      */
-    public void resourceChanged(IResourceChangeEvent event) {
+    public synchronized void resourceChanged(IResourceChangeEvent event) {
         // Warning: code duplicated in OpenResourceAction
         List sel = getSelectedResources();
         // don't bother looking at delta if selection not applicable
@@ -217,6 +217,21 @@ public class CloseResourceAction extends WorkspaceAction implements
         }
     }
     
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedResources()
+     */
+    protected synchronized List getSelectedResources() {
+    	return super.getSelectedResources();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.actions.SelectionListenerAction#getSelectedNonResources()
+     */
+    protected synchronized List getSelectedNonResources() {
+    	return super.getSelectedNonResources();
+    }
+    
     /**
      * Returns the model provider ids that are known to the client
      * that instantiated this operation.
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java
index cf9633e..b66c575 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CloseUnrelatedProjectsAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
@@ -21,11 +22,17 @@ import org.eclipse.core.resources.IResourceChangeEvent;
 import org.eclipse.core.resources.IResourceDelta;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IDEActionFactory;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.internal.ide.misc.DisjointSet;
 
@@ -111,6 +118,53 @@ public class CloseUnrelatedProjectsAction extends CloseResourceAction {
 		super(provider, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text);
 		initAction();
 	}
+	
+	/*
+	 * (non-Javadoc)overrides method on CloseResourceAction.
+	 */
+	public void run() {
+		if(promptForConfirmation())
+				super.run();
+	}
+   
+   /**
+	 * Returns whether to close unrelated projects.
+	 * Consults the preference and prompts the user if necessary.
+	 * 
+	 * @return <code>true</code> if unrelated projects should be closed, and
+	 *         <code>false</code> otherwise.
+	 */
+	private boolean promptForConfirmation() {
+		IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+		if (store.getBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS))
+			return true;
+
+		// get first project name
+		List selection = super.getSelectedResources();
+		int selectionSize = selection.size();
+		if (selectionSize == 0)
+			return true;
+
+		String message = null;
+		if (selectionSize == 1) { // if one project is selected then print its name
+			Object firstSelected = selection.get(0);
+			String projectName = null;
+			if (firstSelected instanceof IProject)
+				projectName = ((IProject) firstSelected).getName();
+			message = NLS.bind(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_confirmMsg1, projectName);
+		} else // if more then one project is selected then print there number
+			message = NLS.bind(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_confirmMsgN,
+					new Integer(selectionSize));
+
+		MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(
+						getShell(), IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip,
+						message, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_AlwaysClose,
+						false, null, null);
+		if (dialog.getReturnCode() != IDialogConstants.OK_ID)
+			return false;
+		store.setValue(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, dialog.getToggleState());
+		return true;
+	}
 
 	/**
      * Initializes for the constructor.
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
index 8fa619a..c0eb17f 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,13 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
-import com.ibm.icu.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -22,6 +22,7 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
@@ -47,16 +48,20 @@ import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.ide.dialogs.ImportTypeDialog;
 import org.eclipse.ui.ide.undo.AbstractWorkspaceOperation;
 import org.eclipse.ui.ide.undo.CopyResourcesOperation;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.StatusUtil;
@@ -65,6 +70,9 @@ import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.wizards.datatransfer.FileStoreStructureProvider;
 import org.eclipse.ui.wizards.datatransfer.ImportOperation;
 
+import com.ibm.icu.text.MessageFormat;
+
+
 /**
  * Perform the copy of file and folder resources from the clipboard when paste
  * action is invoked.
@@ -92,6 +100,18 @@ public class CopyFilesAndFoldersOperation {
 	private boolean canceled = false;
 
 	/**
+	 * Whether or not the operation creates virtual folders and links instead of folders
+	 * and files.
+	 */
+	private boolean createVirtualFoldersAndLinks = false;
+
+	/**
+	 * Whether or not the operation creates links instead of folders and files.
+	 */
+	private boolean createLinks = false;
+
+	private String relativeVariable = null;
+	/**
 	 * Overwrite all flag.
 	 */
 	private boolean alwaysOverwrite = false;
@@ -211,7 +231,7 @@ public class CopyFilesAndFoldersOperation {
 
 		for (int i = 0; i < resources.length; i++) {
 			IResource resource = resources[i];
-			if (resource != null) {
+			if (resource != null && !resource.isVirtual()) {
 				URI location = resource.getLocationURI();
 				String message = null;
 				if (location != null) {
@@ -435,27 +455,72 @@ public class CopyFilesAndFoldersOperation {
 						copyExisting(source, existing, new SubProgressMonitor(
 								subMonitor, 1));
 					} else {
+					if (existing != null) {
 						// Copying a linked resource over unlinked or vice
 						// versa.
 						// Can't use setContents here. Fixes bug 28772.
 						delete(existing, new SubProgressMonitor(subMonitor, 0));
-						source.copy(destinationPath, IResource.SHALLOW,
-								new SubProgressMonitor(subMonitor, 1));
 					}
-				} else {
-					source.copy(destinationPath, IResource.SHALLOW,
-							new SubProgressMonitor(subMonitor, 1));
 
-				}
+					if ((createLinks || createVirtualFoldersAndLinks)
+							&& (source.isLinked() == false)
+							&& (source.isVirtual() == false)) {
+						if (source.getType() == IResource.FILE) {
+							IFile file = workspaceRoot.getFile(destinationPath);
+							file.createLink(createRelativePath(source.getLocationURI(), file), 0,
+									new SubProgressMonitor(subMonitor, 1));
+						} else {
+							IFolder folder = workspaceRoot
+									.getFolder(destinationPath);
+							if (createVirtualFoldersAndLinks) {
+									folder.create(IResource.VIRTUAL, true,
+											new SubProgressMonitor(subMonitor,
+													1));
+								IResource[] members = ((IContainer) source)
+										.members();
+								if (members.length > 0)
+									copy(members, destinationPath,
+											new SubProgressMonitor(subMonitor,
+													1));
+							} else
+								folder.createLink(createRelativePath(source.getLocationURI(), folder), 0,
+								new SubProgressMonitor(subMonitor, 1));
+						}
+					} else
+						source.copy(destinationPath, IResource.SHALLOW,
+							new SubProgressMonitor(subMonitor, 1));
+					}
 
-				if (subMonitor.isCanceled()) {
-					throw new OperationCanceledException();
+					if (subMonitor.isCanceled()) {
+						throw new OperationCanceledException();
+					}
 				}
 			}
 		}
 	}
 
 	/**
+	 * Transform an absolute path URI to a relative path one (i.e. from
+	 * "C:\foo\bar\file.txt" to "VAR\file.txt" granted that the relativeVariable
+	 * is "VAR" and points to "C:\foo\bar\").
+	 * 
+	 * @param locationURI
+	 * @return an URI that was made relative to a variable
+	 */
+	private URI createRelativePath(URI locationURI, IResource resource) {
+		if (relativeVariable == null)
+			return locationURI;
+		IPath location = URIUtil.toPath(locationURI);
+		IPath result;
+		try {
+			result = URIUtil.toPath(resource.getPathVariableManager().convertToRelative(URIUtil.toURI(location), true, relativeVariable));
+		} catch (CoreException e) {
+			return locationURI;
+		}
+		return URIUtil.toURI(result);
+	}
+
+	/**
 	 * Sets the content of the existing file to the source file content.
 	 * 
 	 * @param source
@@ -498,7 +563,7 @@ public class CopyFilesAndFoldersOperation {
 	 */
 	public IResource[] copyResources(final IResource[] resources,
 			IContainer destination) {
-		return copyResources(resources, destination, true, null);
+		return copyResources(resources, destination, true);
 	}
 
 	/**
@@ -521,7 +586,7 @@ public class CopyFilesAndFoldersOperation {
 	public IResource[] copyResourcesInCurrentThread(
 			final IResource[] resources, IContainer destination,
 			IProgressMonitor monitor) {
-		return copyResources(resources, destination, false, monitor);
+		return copyResources(resources, destination, false);
 	}
 
 	/**
@@ -534,7 +599,7 @@ public class CopyFilesAndFoldersOperation {
 	 * @return IResource[] the resulting {@link IResource}[]
 	 */
 	private IResource[] copyResources(final IResource[] resources,
-			IContainer destination, boolean fork, IProgressMonitor monitor) {
+			IContainer destination, boolean fork) {
 		final IPath destinationPath = destination.getFullPath();
 		final IResource[][] copiedResources = new IResource[1][0];
 
@@ -679,15 +744,75 @@ public class CopyFilesAndFoldersOperation {
 	}
 
 	/**
-	 * Copies the given files and folders to the destination. The current Thread
-	 * is halted while the resources are copied using a
-	 * WorkspaceModifyOperation. This method should be called from the UI
-	 * Thread.
+	 * Depending on the 'Linked Resources' preferences it copies the given files and folders to the
+	 * destination or creates links or shows a dialog that lets the user choose. The current thread
+	 * is halted while the resources are copied using a {@link WorkspaceModifyOperation}. This
+	 * method should be called from the UI Thread.
 	 * 
-	 * @param fileNames
-	 *            names of the files to copy
-	 * @param destination
-	 *            destination to which files will be copied
+	 * @param fileNames names of the files to copy
+	 * @param destination destination to which files will be copied
+	 * @param dropOperation the drop operation ({@link DND#DROP_NONE}, {@link DND#DROP_MOVE}
+	 *            {@link DND#DROP_COPY}, {@link DND#DROP_LINK}, {@link DND#DROP_DEFAULT})
+	 * @see WorkspaceModifyOperation
+	 * @see Display#getThread()
+	 * @see Thread#currentThread()
+	 * @since 3.6
+	 */
+	public void copyOrLinkFiles(final String[] fileNames, IContainer destination, int dropOperation) {
+		IPreferenceStore store= IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+		boolean targetIsVirtual= destination.isVirtual();
+		String dndPreference= store.getString(targetIsVirtual ? IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE : IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE);
+
+		int mode= ImportTypeDialog.IMPORT_NONE;
+		String variable= null;
+
+		//check if resource linking is disabled
+		if (ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING))
+			mode= ImportTypeDialog.IMPORT_COPY;
+		else {
+			if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT)) {
+				ImportTypeDialog dialog= new ImportTypeDialog(messageShell, dropOperation, fileNames, destination);
+				dialog.setResource(destination);
+				if (dialog.open() == Window.OK) {
+					mode= dialog.getSelection();
+					variable= dialog.getVariable();
+				}
+			} else if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_MOVE_COPY)) {
+				mode= ImportTypeDialog.IMPORT_COPY;
+			} else if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK)) {
+				mode= ImportTypeDialog.IMPORT_LINK;
+			} else if (dndPreference.equals(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK_AND_VIRTUAL_FOLDER)) {
+				mode= ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS;
+			}
+		}
+
+		switch (mode) {
+			case ImportTypeDialog.IMPORT_COPY:
+				copyFiles(fileNames, destination);
+				break;
+			case ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS:
+				if (variable != null)
+					setRelativeVariable(variable);
+				createVirtualFoldersAndLinks(fileNames, destination);
+				break;
+			case ImportTypeDialog.IMPORT_LINK:
+				if (variable != null)
+					setRelativeVariable(variable);
+				linkFiles(fileNames, destination);
+				break;
+			case ImportTypeDialog.IMPORT_NONE:
+				break;
+		}
+
+	}
+
+	/**
+	 * Copies the given files and folders to the destination. The current Thread is halted while the
+	 * resources are copied using a WorkspaceModifyOperation. This method should be called from the
+	 * UI Thread.
+	 * 
+	 * @param fileNames names of the files to copy
+	 * @param destination destination to which files will be copied
 	 * @see WorkspaceModifyOperation
 	 * @see Display#getThread()
 	 * @see Thread#currentThread()
@@ -1159,6 +1284,12 @@ public class CopyFilesAndFoldersOperation {
 			AbstractWorkspaceOperation op = getUndoableCopyOrMoveOperation(
 					resources, destination);
 			op.setModelProviderIds(getModelProviderIds());
+			if (op instanceof CopyResourcesOperation) {
+				CopyResourcesOperation copyMoveOp = (CopyResourcesOperation) op;
+				copyMoveOp.setCreateVirtualFolders(createVirtualFoldersAndLinks);
+				copyMoveOp.setCreateLinks(createLinks);
+				copyMoveOp.setRelativeVariable(relativeVariable);
+			}
 			PlatformUI.getWorkbench().getOperationSupport()
 					.getOperationHistory().execute(op, monitor,
 							WorkspaceUndoUtil.getUIInfoAdapter(messageShell));
@@ -1282,6 +1413,9 @@ public class CopyFilesAndFoldersOperation {
 				query, Arrays.asList(stores));
 		op.setContext(messageShell);
 		op.setCreateContainerStructure(false);
+		op.setVirtualFolders(createVirtualFoldersAndLinks);
+		op.setCreateLinks(createLinks);
+		op.setRelativeVariable(relativeVariable);
 		try {
 			op.run(monitor);
 		} catch (InterruptedException e) {
@@ -1351,6 +1485,17 @@ public class CopyFilesAndFoldersOperation {
 				return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_parentNotEqual;
 			}
 
+			// verify that if the destination is a virtual folder, the resource must be
+			// either a link or another virtual folder
+			if (destination.isVirtual()) {
+				if (!sourceResource.isLinked() && !sourceResource.isVirtual()
+						&& !createLinks && !createVirtualFoldersAndLinks) {
+					return NLS
+							.bind(
+									IDEWorkbenchMessages.CopyFilesAndFoldersOperation_sourceCannotBeCopiedIntoAVirtualFolder,
+									sourceResource.getName());
+				}
+			}
 			URI sourceLocation = sourceResource.getLocationURI();
 			if (sourceLocation == null) {
 				if (sourceResource.isLinked()) {
@@ -1367,6 +1512,7 @@ public class CopyFilesAndFoldersOperation {
 								sourceResource.getName());
 
 			}
+			if (!destination.isVirtual()) {
 			if (sourceLocation.equals(destinationLocation)) {
 				return NLS
 						.bind(
@@ -1378,6 +1524,7 @@ public class CopyFilesAndFoldersOperation {
 					destinationLocation.toString()))) {
 				return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_destinationDescendentError;
 			}
+			}
 
 			String linkedResourceMessage = validateLinkedResource(destination,
 					sourceResource);
@@ -1472,6 +1619,7 @@ public class CopyFilesAndFoldersOperation {
 		if (!isAccessible(destination))
 			return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_destinationAccessError;
 
+		if (!destination.isVirtual()) {
 		IFileStore destinationStore;
 		try {
 			destinationStore = EFS.getStore(destination.getLocationURI());
@@ -1501,7 +1649,7 @@ public class CopyFilesAndFoldersOperation {
 				if (sourceStore.isParentOf(destinationParent)) {
 					return IDEWorkbenchMessages.CopyFilesAndFoldersOperation_destinationDescendentError;
 				}
-
+				}
 			}
 		}
 		return null;
@@ -1518,7 +1666,7 @@ public class CopyFilesAndFoldersOperation {
 	 */
 	private String validateLinkedResource(IContainer destination,
 			IResource source) {
-		if (source.isLinked() == false) {
+		if ((source.isLinked() == false) || source.isVirtual()) {
 			return null;
 		}
 		IWorkspace workspace = destination.getWorkspace();
@@ -1711,6 +1859,88 @@ public class CopyFilesAndFoldersOperation {
 	}
 
 	/**
+	 * Create virtual folders and links of the given files and folders to the
+	 * destination. The current Thread is halted while the resources are copied
+	 * using a WorkspaceModifyOperation. This method should be called from the
+	 * UI Thread.
+	 * 
+	 * @param fileNames
+	 *            names of the files to copy
+	 * @param destination
+	 *            destination to which files will be copied
+	 * @see WorkspaceModifyOperation
+	 * @see Display#getThread()
+	 * @see Thread#currentThread()
+	 * @since 3.6
+	 */
+	public void createVirtualFoldersAndLinks(final String[] fileNames,
+			IContainer destination) {
+		IFileStore[] stores = buildFileStores(fileNames);
+		if (stores == null) {
+			return;
+		}
+
+		createVirtualFoldersAndLinks = true;
+		copyFileStores(destination, stores, true, null);
+	}
+
+	/**
+	 * Create links of the given files and folders to the destination. The
+	 * current Thread is halted while the resources are copied using a
+	 * WorkspaceModifyOperation. This method should be called from the UI
+	 * Thread.
+	 * 
+	 * @param fileNames
+	 *            names of the files to copy
+	 * @param destination
+	 *            destination to which files will be copied
+	 * @see WorkspaceModifyOperation
+	 * @see Display#getThread()
+	 * @see Thread#currentThread()
+	 * @since 3.6
+	 */
+	public void linkFiles(final String[] fileNames, IContainer destination) {
+		IFileStore[] stores = buildFileStores(fileNames);
+		if (stores == null) {
+			return;
+		}
+
+		createLinks = true;
+		copyFileStores(destination, stores, true, null);
+	}
+
+	/**
+	 * Set whether or not virtual folders and links will be created under the destination
+	 * container.
+	 * 
+	 * @param value
+	 * @since 3.6
+	 */
+	public void setVirtualFolders(boolean value) {
+		createVirtualFoldersAndLinks = value;
+	}
+
+	/**
+	 * Set whether or not links will be created under the destination container.
+	 * 
+	 * @param value
+	 * @since 3.6
+	 */
+	public void setCreateLinks(boolean value) {
+		createLinks = value;
+	}
+
+	/**
+	 * Set a variable relative to which the links are created
+	 * 
+	 * @param variable
+	 * @since 3.6
+	 */
+	public void setRelativeVariable(String variable) {
+		relativeVariable = variable;
+	}
+
+	/**
 	 * Returns an AbstractWorkspaceOperation suitable for performing the move or
 	 * copy operation that will move or copy the given resources to the given
 	 * destination path.
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java
index daae96c..28b5d2c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -259,7 +259,7 @@ public class CopyResourceAction extends SelectionListenerAction implements
     }
 
     /**
-     * Runs the operation created in <code>createOperaiton</code>
+     * Runs the operation created in <code>createOperation</code>
      * 
      * @param resources source resources to pass to the operation
      * @param destination destination container to pass to the operation
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
index d3d1f34..c6daa30 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/GlobalBuildAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer (Wind River) -  [296800] UI build actions should not lock the workspace
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
@@ -194,8 +195,6 @@ public class GlobalBuildAction extends Action implements
                 return ResourcesPlugin.FAMILY_MANUAL_BUILD == family;
             }
         };
-        buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory()
-                .buildRule());
         buildJob.setUser(true);
         buildJob.schedule();
     }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
index b899969..317fe1e 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenResourceAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Mohamed Tarief , IBM - Bug 139211
  *******************************************************************************/
 package org.eclipse.ui.actions;
 
@@ -19,7 +20,6 @@ import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceChangeEvent;
 import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceRuleFactory;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.CoreException;
@@ -28,9 +28,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.MultiRule;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialogWithToggle;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -38,6 +36,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.window.IShellProvider;
 import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.IDEInternalPreferences;
@@ -75,7 +74,7 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 		super(shell, IDEWorkbenchMessages.OpenResourceAction_text);
 		initAction();
 	}
-	
+
 	/**
 	 * Creates a new action.
 	 * 
@@ -83,7 +82,7 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 	 * 				the shell for any dialogs
 	 * @since 3.4
 	 */
-	public OpenResourceAction(IShellProvider provider){
+	public OpenResourceAction(IShellProvider provider) {
 		super(provider, IDEWorkbenchMessages.OpenResourceAction_text);
 		initAction();
 	}
@@ -91,11 +90,12 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 	/**
 	 * Initializes the workbench
 	 */
-	private void initAction(){
+	private void initAction() {
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IIDEHelpContextIds.OPEN_RESOURCE_ACTION);
 		setToolTipText(IDEWorkbenchMessages.OpenResourceAction_toolTip);
 		setId(ID);
 	}
+
 	/**
 	 * Returns the total number of closed projects in the workspace.
 	 */
@@ -211,19 +211,7 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 	 */
 	public void run() {
 		try {
-			if (hasOtherClosedProjects() && promptToOpenWithReferences()) {
-				runOpenWithReferences();
-			}
-			ISchedulingRule rule = null;
-			// be conservative and include all projects in the selection - projects
-			// can change state between now and when the job starts
-			IResourceRuleFactory factory = ResourcesPlugin.getWorkspace().getRuleFactory();
-			Iterator resources = getSelectedResources().iterator();
-			while (resources.hasNext()) {
-				IProject project = (IProject) resources.next();
-				rule = MultiRule.combine(rule, factory.modifyRule(project));
-			}
-			runInBackground(rule);
+			runOpenWithReferences();
 		} catch (OperationCanceledException e) {
 			//just return when canceled
 		}
@@ -235,7 +223,8 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 	private void runOpenWithReferences() {
 		final List resources = new ArrayList(getActionResources());
 		Job job = new WorkspaceJob(removeMnemonics(getText())) {
-
+			private boolean openProjectReferences = true;
+			private boolean hasPrompted = false;
 			/**
 			 * Opens a project along with all projects it references
 			 */
@@ -244,9 +233,30 @@ public class OpenResourceAction extends WorkspaceAction implements IResourceChan
 					return;
 				}
 				project.open(new SubProgressMonitor(monitor, 1000));
-				IProject[] references = project.getReferencedProjects();
-				for (int i = 0; i < references.length; i++) {
-					doOpenWithReferences(references[i], monitor);
+				final IProject[] references = project.getReferencedProjects();
+				if (!hasPrompted) {
+					openProjectReferences = false;
+					for (int i = 0; i < references.length; i++) {
+						if (references[i].exists() && !references[i].isOpen()) {
+							openProjectReferences = true;
+							break;
+						}
+					}
+					if (openProjectReferences && hasOtherClosedProjects()) {
+						Display.getDefault().syncExec(new Runnable() {
+							public void run() {
+								openProjectReferences = promptToOpenWithReferences();
+								//remember that we have prompted to avoid repeating the analysis
+								hasPrompted = true;
+							}
+						});
+					}
+				}
+
+				if (openProjectReferences) {
+					for (int i = 0; i < references.length; i++) {
+						doOpenWithReferences(references[i], monitor);
+					}
 				}
 			}
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenSystemEditorAction.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenSystemEditorAction.java
index 0d916d0..293ce3a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenSystemEditorAction.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenSystemEditorAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.part.FileEditorInput;
 
 /**
- * Standard action for opening a system editor on the currently selected file 
+ * Standard action for opening a system editor on the currently selected file
  * resource.
  * <p>
  * This class may be instantiated; it is not intended to be subclassed.
@@ -46,7 +46,7 @@ public class OpenSystemEditorAction extends SelectionListenerAction {
     private IWorkbenchPage workbenchPage;
 
     /**
-     * Creates a new action that will open system editors on the then-selected file 
+     * Creates a new action that will open system editors on the then-selected file
      * resources.
      *
      * @param page the workbench page in which to open the editor
@@ -55,11 +55,11 @@ public class OpenSystemEditorAction extends SelectionListenerAction {
         super(IDEWorkbenchMessages.OpenSystemEditorAction_text);
         setToolTipText(IDEWorkbenchMessages.OpenSystemEditorAction_toolTip);
         setId(ID);
+		if (page == null) {
+			throw new IllegalArgumentException();
+		}
         page.getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp(this,
 				IIDEHelpContextIds.OPEN_SYSTEM_EDITOR_ACTION);
-        if (page == null) {
-            throw new IllegalArgumentException();
-        }
         this.workbenchPage = page;
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
index 075be41..8b69681 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,28 +16,20 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.Hashtable;
-
-import com.ibm.icu.text.Collator;
 
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-
-import org.eclipse.jface.action.ContributionItem;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.Window;
-
 import org.eclipse.ui.IEditorDescriptor;
 import org.eclipse.ui.IEditorRegistry;
 import org.eclipse.ui.IWorkbenchPage;
@@ -51,6 +43,8 @@ import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.part.FileEditorInput;
 
+import com.ibm.icu.text.Collator;
+
 /**
  * A menu for opening files in the workbench.
  * <p>
@@ -72,8 +66,6 @@ public class OpenWithMenu extends ContributionItem {
     private IEditorRegistry registry = PlatformUI.getWorkbench()
             .getEditorRegistry();
 
-    private static Hashtable imageCache = new Hashtable(11);
-
     /**
      * The id of this action.
      */
@@ -133,12 +125,7 @@ public class OpenWithMenu extends ContributionItem {
         if (imageDesc == null) {
             return null;
         }
-        Image image = (Image) imageCache.get(imageDesc);
-        if (image == null) {
-            image = imageDesc.createImage();
-            imageCache.put(imageDesc, image);
-        }
-        return image;
+        return IDEWorkbenchPlugin.getDefault().getResourceManager().createImage(imageDesc);
     }
 
     /**
@@ -341,7 +328,7 @@ public class OpenWithMenu extends ContributionItem {
 	            String editorId = editorDescriptor == null ? IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID
 	                    : editorDescriptor.getId();
 	            
-	            ((WorkbenchPage) page).openEditor(new FileEditorInput(file), editorId, true, MATCH_BOTH);
+	            page.openEditor(new FileEditorInput(file), editorId, true, MATCH_BOTH);
 	            // only remember the default editor if the open succeeds
 	            IDE.setDefaultEditor(file, editorId);
         	}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/TextActionHandler.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/TextActionHandler.java
index caba725..65c0bb1 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/TextActionHandler.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/TextActionHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,6 +88,8 @@ public class TextActionHandler {
 
     private Text activeTextControl;
 
+	private IActionBars actionBars;
+
     private MouseAdapter mouseAdapter = new MouseAdapter() {
         public void mouseUp(MouseEvent e) {
             updateActionsEnableState();
@@ -356,18 +358,29 @@ public class TextActionHandler {
      */
     public TextActionHandler(IActionBars actionBar) {
         super();
-        actionBar.setGlobalActionHandler(ActionFactory.CUT.getId(),
+        actionBars = actionBar;
+        updateActionBars();
+    }
+
+    /**
+     * Updates the actions bars.
+     * 
+	 * @since 3.6 
+	 */
+	public void updateActionBars() {
+		actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(),
                 textCutAction);
-        actionBar.setGlobalActionHandler(ActionFactory.COPY.getId(),
+		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
                 textCopyAction);
-        actionBar.setGlobalActionHandler(ActionFactory.PASTE.getId(),
+		actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
                 textPasteAction);
-        actionBar.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
+		actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
                 textSelectAllAction);
-        actionBar.setGlobalActionHandler(ActionFactory.DELETE.getId(),
+		actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
                 textDeleteAction);
-    }
+	}
 
+    
     /**
      * Add a <code>Text</code> control to the handler
      * so that the Cut, Copy, Paste, Delete, and Select All 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
index 087354d..ab07aea 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/FilteredResourcesSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     James Blackburn (Broadcom Corp.) Bug 86973 Allow path pattern matching
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
@@ -38,18 +39,21 @@ import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.jface.viewers.ILabelProviderListener;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.LabelProviderChangedEvent;
 import org.eclipse.jface.viewers.StyledString;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -59,6 +63,7 @@ import org.eclipse.ui.ResourceWorkingSetFilter;
 import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
+import org.eclipse.ui.ide.ResourceUtil;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
@@ -97,8 +102,20 @@ public class FilteredResourcesSelectionDialog extends
 
 	private String title;
 
+	/**
+	 * The base outer-container which will be used to search for resources. This
+	 * is the root of the tree that spans the search space. Often, this is the
+	 * workspace root.
+	 */
 	private IContainer container;
 
+	/**
+	 * The container to use as starting point for relative search, or
+	 * <code>null</code> if none.
+	 * @since 3.6
+	 */
+	private IContainer searchContainer;
+
 	private int typeMask;
 
 	private boolean isDerived;
@@ -111,9 +128,11 @@ public class FilteredResourcesSelectionDialog extends
 	 * @param multi
 	 *            the multi selection flag
 	 * @param container
-	 *            the container
+	 *            the container to select resources from, e.g. the workspace root
 	 * @param typesMask
-	 *            the types mask
+	 *            a mask specifying which resource types should be shown in the dialog.
+	 *            The mask should contain one or more of the resource type bit masks
+	 *            defined in {@link IResource#getType()}
 	 */
 	public FilteredResourcesSelectionDialog(Shell shell, boolean multi,
 			IContainer container, int typesMask) {
@@ -125,6 +144,37 @@ public class FilteredResourcesSelectionDialog extends
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
 				IIDEHelpContextIds.OPEN_RESOURCE_DIALOG);
 
+		/*
+		 * Allow location of paths relative to a searchContainer, which is
+		 * initialized from the active editor or the selected element.
+		 */
+		IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+		if (ww != null) {
+			IWorkbenchPage activePage = ww.getActivePage();
+			if (activePage != null) {
+				IResource resource = null;
+				IEditorPart activeEditor = activePage.getActiveEditor();
+				if (activeEditor != null && activeEditor == activePage.getActivePart()) {
+					IEditorInput editorInput = activeEditor.getEditorInput();
+					resource = ResourceUtil.getResource(editorInput);
+				} else {
+					ISelection selection = ww.getSelectionService().getSelection();
+					if (selection instanceof IStructuredSelection) {
+						IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+						if (structuredSelection.size() == 1) {
+							resource = ResourceUtil.getResource(structuredSelection.getFirstElement());
+						}
+					}
+				}
+				if (resource != null) {
+					if (!(resource instanceof IContainer)) {
+						resource = resource.getParent();
+					}
+					searchContainer = (IContainer) resource;
+				}
+			}
+		}
+
 		this.container = container;
 		this.typeMask = typesMask;
 
@@ -377,7 +427,7 @@ public class FilteredResourcesSelectionDialog extends
 	 * @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#createFilter()
 	 */
 	protected ItemsFilter createFilter() {
-		return new ResourceFilter(container, isDerived, typeMask);
+		return new ResourceFilter(container, searchContainer, isDerived, typeMask);
 	}
 
 	/* (non-Javadoc)
@@ -407,25 +457,93 @@ public class FilteredResourcesSelectionDialog extends
 				IResource resource2 = (IResource) o2;
 				String s1 = resource1.getName();
 				String s2 = resource2.getName();
-				int comparability = collator.compare(s1, s2);
-				if (comparability == 0) {
-					IPath p1 = resource1.getFullPath();
-					IPath p2 = resource2.getFullPath();
-					int c1 = p1.segmentCount();
-					int c2 = p2.segmentCount();
-					for (int i= 0; i < c1 && i < c2; i++) {
-						comparability = collator.compare(p1.segment(i), p2.segment(i));
-						if (comparability != 0)
-							return comparability;
-					}
-					comparability = c2 - c1;
+				
+				// Compare names without extension first
+				int s1Dot = s1.lastIndexOf('.');
+				int s2Dot = s2.lastIndexOf('.');
+				String n1 = s1Dot == -1 ? s1 : s1.substring(0, s1Dot);
+				String n2 = s2Dot == -1 ? s2 : s2.substring(0, s2Dot);
+				int comparability = collator.compare(n1, n2);
+				if (comparability != 0)
+					return comparability;
+				
+				// Compare full names
+				if (s1Dot != -1 || s2Dot != -1) {
+					comparability = collator.compare(s1, s2);
+					if (comparability != 0)
+						return comparability;
+				}
+
+				// Search for resource relative paths
+				if (searchContainer != null) {
+					IContainer c1 = resource1.getParent();
+					IContainer c2 = resource2.getParent();
+					
+					// Return paths 'closer' to the searchContainer first
+					comparability = pathDistance(c1) - pathDistance(c2);
+					if (comparability != 0)
+						return comparability;
+				}
+
+				// Finally compare full path segments
+				IPath p1 = resource1.getFullPath();
+				IPath p2 = resource2.getFullPath();
+				// Don't compare file names again, so subtract 1
+				int c1 = p1.segmentCount() - 1;
+				int c2 = p2.segmentCount() - 1;
+				for (int i= 0; i < c1 && i < c2; i++) {
+					comparability = collator.compare(p1.segment(i), p2.segment(i));
+					if (comparability != 0)
+						return comparability;
 				}
+				comparability = c1 - c2;
 
 				return comparability;
 			}
 		};
 	}
 
+	/**
+	 * Return the "distance" of the item from the root of the relative search
+	 * container. Distances can be compared (smaller numbers are better).
+	 * <br>
+	 * - Closest distance is if the item is the same folder as the search container.<br>
+	 * - Next are folders inside the search container.<br>
+	 * - After all those, distance increases with decreasing matching prefix folder count.<br>
+	 * 
+	 * @param item
+	 *            parent of the resource being examined
+	 * @return the "distance" of the passed in IResource from the search
+	 *         container
+	 * @since 3.6
+	 */
+	private int pathDistance(IContainer item) {
+		// Container search path: e.g. /a/b/c
+		IPath containerPath = searchContainer.getFullPath();
+		// itemPath:          distance:
+		// /a/b/c         ==> 0
+		// /a/b/c/d/e     ==> 2
+		// /a/b           ==> Integer.MAX_VALUE/4 + 1
+		// /a/x/e/f       ==> Integer.MAX_VALUE/4 + 2
+		// /g/h           ==> Integer.MAX_VALUE/2
+		IPath itemPath = item.getFullPath();
+		if (itemPath.equals(containerPath))
+			return 0;
+		
+		int matching = containerPath.matchingFirstSegments(itemPath);
+		if (matching == 0)
+			return Integer.MAX_VALUE / 2;
+		
+		int containerSegmentCount = containerPath.segmentCount();
+		if (matching == containerSegmentCount) {
+			// inside searchContainer: 
+			return itemPath.segmentCount() - matching;
+		}
+		
+		//outside searchContainer:
+		return Integer.MAX_VALUE / 4 + containerSegmentCount - matching;
+	}
+	
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -540,6 +658,16 @@ public class FilteredResourcesSelectionDialog extends
 				str.append(" - ", StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
 				str.append(res.getParent().getFullPath().makeRelative().toString(), StyledString.QUALIFIER_STYLER);
 			}
+			
+//Debugging:
+//			int pathDistance = pathDistance(res.getParent());
+//			if (pathDistance != Integer.MAX_VALUE / 2) {
+//				if (pathDistance > Integer.MAX_VALUE / 4)
+//					str.append(" (" + (pathDistance - Integer.MAX_VALUE / 4) + " folders up from current selection)", StyledString.QUALIFIER_STYLER);
+//				else
+//					str.append(" (" + pathDistance + " folders down from current selection)", StyledString.QUALIFIER_STYLER);
+//			}
+			
 			return str;
 		}
 
@@ -752,6 +880,28 @@ public class FilteredResourcesSelectionDialog extends
 
 		private IContainer filterContainer;
 
+		/**
+		 * Container path pattern. Is <code>null</code> when only a file name pattern is used.
+		 * @since 3.6
+		 */
+		private SearchPattern containerPattern;
+		/**
+		 * Container path pattern, relative to the current searchContainer. Is <code>null</code> if there's no search container.
+		 * @since 3.6
+		 */
+		private SearchPattern relativeContainerPattern;
+		
+		/**
+		 * Camel case pattern for the name part of the file name (without extension). Is <code>null</code> if there's no extension.
+		 * @since 3.6
+		 */
+		SearchPattern namePattern;
+		/**
+		 * Camel case pattern for the file extension. Is <code>null</code> if there's no extension.
+		 * @since 3.6
+		 */
+		SearchPattern extensionPattern;
+		
 		private int filterTypeMask;
 
 		/**
@@ -772,12 +922,67 @@ public class FilteredResourcesSelectionDialog extends
 
 		/**
 		 * Creates new ResourceFilter instance
+		 * 
+		 * @param container
+		 * @param searchContainer 
+		 *            IContainer to use for performing relative search
+		 * @param showDerived
+		 *            flag which determine showing derived elements
+		 * @param typeMask
+		 * @since 3.6
+		 */
+		private ResourceFilter(IContainer container, IContainer searchContainer, boolean showDerived, int typeMask) {
+			this(container, showDerived, typeMask);
+
+			String stringPattern = getPattern();
+			String filenamePattern;
+			
+			int sep = stringPattern.lastIndexOf(IPath.SEPARATOR);
+			if (sep != -1) {
+				filenamePattern = stringPattern.substring(sep + 1, stringPattern.length());
+				if ("*".equals(filenamePattern)) //$NON-NLS-1$
+					filenamePattern= "**"; //$NON-NLS-1$
+				
+				if (sep > 0) {
+					if (filenamePattern.length() == 0) // relative patterns don't need a file name
+						filenamePattern= "**"; //$NON-NLS-1$
+						
+					String containerPattern = stringPattern.substring(0, sep);
+					
+					if (searchContainer != null) {
+						relativeContainerPattern = new SearchPattern(SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_PATTERN_MATCH);
+						relativeContainerPattern.setPattern(searchContainer.getFullPath().append(containerPattern).toString());
+					}
+					
+					if (!containerPattern.startsWith("" + IPath.SEPARATOR)) //$NON-NLS-1$
+						containerPattern = IPath.SEPARATOR + containerPattern;
+					this.containerPattern= new SearchPattern(SearchPattern.RULE_EXACT_MATCH | SearchPattern.RULE_PREFIX_MATCH | SearchPattern.RULE_PATTERN_MATCH);
+					this.containerPattern.setPattern(containerPattern);
+				}
+				patternMatcher.setPattern(filenamePattern);
+				
+			} else {
+				filenamePattern= stringPattern;
+			}
+			
+			int lastPatternDot = filenamePattern.lastIndexOf('.');
+			if (lastPatternDot != -1) {
+				char last = filenamePattern.charAt(filenamePattern.length() - 1);
+				if (last != ' ' && last != '<') {
+					namePattern = new SearchPattern();
+					namePattern.setPattern(filenamePattern.substring(0, lastPatternDot));
+					extensionPattern = new SearchPattern();
+					extensionPattern.setPattern(filenamePattern.substring(lastPatternDot + 1));
+				}
+			}
+
+		}
+
+		/**
+		 * Creates new ResourceFilter instance
 		 */
 		public ResourceFilter() {
-			super();
-			this.filterContainer = container;
-			this.showDerived = isDerived;
-			this.filterTypeMask = typeMask;
+			this(container, searchContainer, isDerived, typeMask);
 		}
 
 		/**
@@ -810,7 +1015,36 @@ public class FilteredResourcesSelectionDialog extends
 			if ((!this.showDerived && resource.isDerived())
 					|| ((this.filterTypeMask & resource.getType()) == 0))
 				return false;
-			return matches(resource.getName());
+
+			String name = resource.getName();
+			if (nameMatches(name)) {
+				if (containerPattern != null) {
+					// match full container path:
+					String containerPath = resource.getParent().getFullPath().toString();
+					if (containerPattern.matches(containerPath))
+						return true;
+					// match path relative to current selection:
+					if (relativeContainerPattern != null)
+						return relativeContainerPattern.matches(containerPath);
+					return false;
+				}
+				return true;
+			}
+			
+			return false;			
+		}
+
+		private boolean nameMatches(String name) {
+			if (namePattern != null) {
+				// fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=212565
+				int lastDot = name.lastIndexOf('.');
+				if (lastDot != -1
+						&& namePattern.matches(name.substring(0, lastDot))
+						&& extensionPattern.matches(name.substring(lastDot + 1))) {
+					return true;
+				}
+			}
+			return matches(name);
 		}
 
 		/*
@@ -821,9 +1055,18 @@ public class FilteredResourcesSelectionDialog extends
 		public boolean isSubFilter(ItemsFilter filter) {
 			if (!super.isSubFilter(filter))
 				return false;
-			if (filter instanceof ResourceFilter)
-				if (this.showDerived == ((ResourceFilter) filter).showDerived)
-					return true;
+			if (filter instanceof ResourceFilter) {
+				ResourceFilter resourceFilter = (ResourceFilter) filter;
+				if (this.showDerived == resourceFilter.showDerived) {
+					if (containerPattern == null) {
+						return resourceFilter.containerPattern == null;
+					} else if (resourceFilter.containerPattern == null) {
+						return false;
+					} else {
+						return containerPattern.equals(resourceFilter.containerPattern);
+					}
+				}
+			}
 			return false;
 		}
 
@@ -835,9 +1078,18 @@ public class FilteredResourcesSelectionDialog extends
 		public boolean equalsFilter(ItemsFilter iFilter) {
 			if (!super.equalsFilter(iFilter))
 				return false;
-			if (iFilter instanceof ResourceFilter)
-				if (this.showDerived == ((ResourceFilter) iFilter).showDerived)
-					return true;
+			if (iFilter instanceof ResourceFilter) {
+				ResourceFilter resourceFilter = (ResourceFilter) iFilter;
+				if (this.showDerived == resourceFilter.showDerived) {
+					if (containerPattern == null) {
+						return resourceFilter.containerPattern == null;
+					} else if (resourceFilter.containerPattern == null) {
+						return false;
+					} else {
+						return containerPattern.equals(resourceFilter.containerPattern);
+					}
+				}
+			}
 			return false;
 		}
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java
index 9f1e7e4..86199d4 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/NewFolderDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -183,6 +183,10 @@ public class NewFolderDialog extends SelectionStatusDialog {
 					public String getValue() {
 						return folderNameField.getText();
 					}
+
+					public IResource getResource() {
+						return container;
+					}
 				});
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
index ed93697..2d56ef1 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardExportResourcesPage.java
@@ -198,6 +198,7 @@ public abstract class WizardExportResourcesPage extends WizardDataTransferPage {
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
                 resourceGroup.setAllSelections(true);
+                updateWidgetEnablements();
             }
         };
         selectButton.addSelectionListener(listener);
@@ -210,6 +211,7 @@ public abstract class WizardExportResourcesPage extends WizardDataTransferPage {
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
                 resourceGroup.setAllSelections(false);
+                updateWidgetEnablements();
             }
         };
         deselectButton.addSelectionListener(listener);
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java
index bfd0083..94f2805 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,11 +13,17 @@
 package org.eclipse.ui.dialogs;
 
 import java.io.ByteArrayInputStream;
+import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
 import java.util.Iterator;
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IResource;
@@ -30,14 +36,18 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.jobs.ISchedulingRule;
 import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
@@ -191,6 +201,26 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 					public String getValue() {
 						return resourceGroup.getResource();
 					}
+
+					public IResource getResource() {
+						IPath path = resourceGroup.getContainerFullPath();
+						IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
+								.getRoot();
+						IResource resource = root.findMember(path);
+						if (resource != null && resource instanceof IContainer) {
+							String resourceName = resourceGroup.getResource();
+							if (resourceName.length() > 0) {
+								try {
+									return ((IContainer) resource).getFile(Path
+											.fromOSString(resourceName));
+								} catch (IllegalArgumentException e) {
+									// continue below.
+								}
+							}
+							return resource;
+						}
+						return resource;
+					}
 				});
 	}
 
@@ -350,6 +380,58 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 		final InputStream initialContents = getInitialContents();
 
 		createLinkTarget();
+		
+		if (linkTargetPath != null) {
+			URI resolvedPath = newFileHandle.getPathVariableManager().resolveURI(linkTargetPath);
+			try {
+				if (resolvedPath.getScheme() != null && resolvedPath.getSchemeSpecificPart() != null) {
+					IFileStore store = EFS.getStore(resolvedPath);
+					if (!store.fetchInfo().exists()) {
+						MessageDialog dlg = new MessageDialog(getContainer().getShell(),
+								IDEWorkbenchMessages.WizardNewFileCreationPage_createLinkLocationTitle,
+								null, 
+								NLS.bind(
+										IDEWorkbenchMessages.WizardNewFileCreationPage_createLinkLocationQuestion, linkTargetPath),
+								MessageDialog.QUESTION_WITH_CANCEL,
+								new String[] { IDialogConstants.YES_LABEL,
+					                    IDialogConstants.NO_LABEL,
+					                    IDialogConstants.CANCEL_LABEL },
+								0);
+						int result = dlg.open();
+						if (result == Window.OK) {
+							store.getParent().mkdir(0, new NullProgressMonitor());
+							OutputStream stream = store.openOutputStream(0, new NullProgressMonitor());
+							stream.close();
+						}
+						if (result == 2)
+							return null;
+					}
+				}
+			} catch (CoreException e) {
+				MessageDialog
+						.open(MessageDialog.ERROR,
+								getContainer().getShell(),
+								IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle,
+								NLS
+										.bind(
+												IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage,
+												e.getMessage()), SWT.SHEET);
+	
+				return null;
+			} catch (IOException e) {
+				MessageDialog
+						.open(MessageDialog.ERROR,
+								getContainer().getShell(),
+								IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle,
+								NLS
+										.bind(
+												IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage,
+												e.getMessage()), SWT.SHEET);
+	
+				return null;
+			}
+		}
+
 		IRunnableWithProgress op = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) {
 				CreateFileOperation op = new CreateFileOperation(newFileHandle,
@@ -538,6 +620,7 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 		} else {
 			linkedResourceComposite = linkedResourceGroup
 					.createContents(linkedResourceParent);
+			setupLinkedResourceTarget();
 			if (linkedResourceGroupHeight == -1) {
 				Point groupSize = linkedResourceComposite.computeSize(
 						SWT.DEFAULT, SWT.DEFAULT, true);
@@ -549,6 +632,41 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 		}
 	}
 
+	boolean setupLinkedResourceTargetRecursiveFlag = false;
+	private void setupLinkedResourceTarget() {
+		if (!setupLinkedResourceTargetRecursiveFlag) {
+			setupLinkedResourceTargetRecursiveFlag = true;
+			try {
+				if (isFilteredByParent()) {
+					URI existingLink = linkedResourceGroup.getLinkTargetURI();
+					boolean setDefaultLinkValue = false;
+					if (existingLink == null)
+						setDefaultLinkValue = true;
+					else {
+						IPath path = URIUtil.toPath(existingLink);
+						if (path != null)
+							setDefaultLinkValue = path.toPortableString().length() > 0;
+					}
+					
+					if (setDefaultLinkValue) {
+						IPath containerPath = resourceGroup.getContainerFullPath();
+						IPath newFilePath = containerPath.append(resourceGroup.getResource());
+						IFile newFileHandle = createFileHandle(newFilePath);
+						try {
+							URI uri= newFileHandle.getPathVariableManager().convertToRelative(newFileHandle.getLocationURI(), false, null);
+							linkedResourceGroup.setLinkTarget(URIUtil.toPath(uri).toPortableString());
+						} catch (CoreException e) {
+							// nothing
+						}
+					}
+				}
+			}
+			finally {
+				setupLinkedResourceTargetRecursiveFlag = false;
+			}
+		}
+	}
+
 	/**
 	 * The <code>WizardNewFileCreationPage</code> implementation of this
 	 * <code>Listener</code> method handles all events and enablements for
@@ -681,6 +799,7 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 		if (status.getSeverity() == IStatus.ERROR) {
 			if (firstLinkCheck) {
 				setMessage(status.getMessage());
+				setErrorMessage(null);
 			} else {
 				setErrorMessage(status.getMessage());
 			}
@@ -750,9 +869,32 @@ public class WizardNewFileCreationPage extends WizardPage implements Listener {
 				}
 			}
 		}
+		if (isFilteredByParent()) {
+			setMessage(IDEWorkbenchMessages.WizardNewFileCreationPage_resourceWillBeFilteredWarning, IMessageProvider.ERROR);
+			setupLinkedResourceTarget();
+			valid = false;
+		}
 		return valid;
 	}
 
+	private boolean isFilteredByParent() {
+		if ((linkedResourceGroup == null) || linkedResourceGroup.isEnabled())
+			return false;
+		IPath containerPath = resourceGroup.getContainerFullPath();
+		if (containerPath == null)
+			return false;
+		String resourceName = resourceGroup.getResource();
+		if (resourceName == null)
+			return false;
+		if (resourceName.length() > 0) {
+			IPath newFolderPath = containerPath.append(resourceName);
+			IFile newFileHandle = createFileHandle(newFolderPath);
+			IWorkspace workspace = newFileHandle.getWorkspace();
+			return !workspace.validateFiltered(newFileHandle).isOK();
+		}
+		return false;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java
index a35b3b6..363ff10 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardNewFolderMainPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,17 +8,24 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Leon J. Breedt - Added multiple folder creation support (in WizardNewFolderMainPage)
- *     
+ * 
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
 import java.lang.reflect.InvocationTargetException;
 import java.net.URI;
 import java.util.Iterator;
+
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceStatus;
+import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
@@ -26,18 +33,26 @@ import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Preferences;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.resource.CompositeImageDescriptor;
+import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -46,14 +61,19 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.dialogs.UIResourceFilterDescription;
 import org.eclipse.ui.ide.undo.CreateFolderOperation;
 import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 import org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGroup;
+import org.eclipse.ui.internal.ide.dialogs.ResourceFilterEditDialog;
+import org.eclipse.ui.internal.ide.misc.OverlayIcon;
 import org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
 
 /**
  * Standard main page for a wizard that creates a folder resource.
@@ -81,13 +101,21 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 	private ResourceAndContainerGroup resourceGroup;
 
 	private Button advancedButton;
-
+	private Button useDefaultLocation;
+	private Button useVirtualFolder;
+	private Button useLinkedResource;
+	
+	private Button filterButton;
+	
 	private CreateLinkedResourceGroup linkedResourceGroup;
 
-	private Composite linkedResourceParent;
-
+	private Composite advancedComposite;
+	
 	private Composite linkedResourceComposite;
+	private Composite linkedGroupComposite;
 
+	private UIResourceFilterDescription[] filterList = null;
+	
 	/**
 	 * Height of the "advanced" linked resource group. Set when the advanced
 	 * group is first made visible.
@@ -128,17 +156,18 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 				.getPluginPreferences();
 
 		if (preferences.getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING) == false) {
-			linkedResourceParent = new Composite(parent, SWT.NONE);
-			linkedResourceParent.setFont(parent.getFont());
-			linkedResourceParent.setLayoutData(new GridData(
+			advancedComposite = new Composite(parent, SWT.NONE);
+			advancedComposite.setFont(parent.getFont());
+			advancedComposite.setLayoutData(new GridData(
 					GridData.FILL_HORIZONTAL));
 			GridLayout layout = new GridLayout();
 			layout.marginHeight = 0;
 			layout.marginWidth = 0;
-			linkedResourceParent.setLayout(layout);
+			advancedComposite.setLayout(layout);
 
-			advancedButton = new Button(linkedResourceParent, SWT.PUSH);
-			advancedButton.setFont(linkedResourceParent.getFont());
+			
+			advancedButton = new Button(advancedComposite, SWT.PUSH);
+			advancedButton.setFont(advancedComposite.getFont());
 			advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
 			GridData data = setButtonLayoutData(advancedButton);
 			data.horizontalAlignment = GridData.BEGINNING;
@@ -163,9 +192,66 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 					public void setValue(String string) {
 						resourceGroup.setResource(string);
 					}
+					public IResource getResource() {
+						IPath path = resourceGroup.getContainerFullPath();
+						if (path != null) {
+							IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
+									.getRoot();
+							IResource resource = root.findMember(path);
+							if (resource != null && resource instanceof IContainer) {
+								String resourceName = resourceGroup.getResource();
+								if (resourceName.length() > 0) {
+									try {
+										return ((IContainer) resource).getFolder(Path
+												.fromOSString(resourceName));
+									} catch (IllegalArgumentException e) {
+										// continue below.
+									}
+								}
+								return resource;
+							}
+							return resource;
+						}
+						return null;
+					}
 				});
 	}
 
+	boolean setupLinkedResourceTargetRecursiveFlag = false;
+	private void setupLinkedResourceTarget() {
+		if (!setupLinkedResourceTargetRecursiveFlag) {
+			setupLinkedResourceTargetRecursiveFlag = true;
+			try {
+				if (isFilteredByParent()) {
+					URI existingLink = linkedResourceGroup.getLinkTargetURI();
+					boolean setDefaultLinkValue = false;
+					if (existingLink == null)
+						setDefaultLinkValue = true;
+					else {
+						IPath path = URIUtil.toPath(existingLink);
+						if (path != null)
+							setDefaultLinkValue = path.toPortableString().length() > 0;
+					}
+					
+					if (setDefaultLinkValue) {
+						IPath containerPath = resourceGroup.getContainerFullPath();
+						IPath newFilePath = containerPath.append(resourceGroup.getResource());
+						IFolder newFolderHandle = createFolderHandle(newFilePath);
+						try {
+							URI uri= newFolderHandle.getPathVariableManager().convertToRelative(newFolderHandle.getLocationURI(), false, null);
+							linkedResourceGroup.setLinkTarget(URIUtil.toPath(uri).toPortableString());
+						} catch (CoreException e) {
+							// nothing
+						}
+					}
+				}
+			}
+			finally {
+				setupLinkedResourceTargetRecursiveFlag = false;
+			}
+		}
+	}
+
 	/**
 	 * (non-Javadoc) Method declared on IDialogPage.
 	 */
@@ -206,8 +292,8 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 	 *                if the operation fails
 	 * @exception OperationCanceledException
 	 *                if the operation is canceled
-	 *                
-	 * @deprecated As of 3.3, use {@link #createNewFolder()} which uses the 
+	 * 
+	 * @deprecated As of 3.3, use {@link #createNewFolder()} which uses the
 	 *   undoable operation support.
 	 */
 	protected void createFolder(IFolder folderHandle, IProgressMonitor monitor)
@@ -274,6 +360,23 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 	}
 
 	/**
+	 * Creates a container resource handle for the container with the given workspace path. This
+	 * method does not create the resource.
+	 * 
+	 * @param containerPath the path of the container resource to create a handle for
+	 * @return the new container resource handle
+	 * @see #createFolder
+	 * @since 3.6
+	 */
+	protected IContainer createContainerHandle(IPath containerPath) {
+		if (containerPath.segmentCount() == 1)
+			return IDEWorkbenchPlugin.getPluginWorkspace().getRoot().getProject(
+					containerPath.segment(0));
+		return IDEWorkbenchPlugin.getPluginWorkspace().getRoot().getFolder(
+				containerPath);
+	}
+
+	/**
 	 * Creates the link target path if a link target has been specified.
 	 */
 	protected void createLinkTarget() {
@@ -312,12 +415,49 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 		IPath newFolderPath = containerPath.append(resourceGroup.getResource());
 		final IFolder newFolderHandle = createFolderHandle(newFolderPath);
 
+		final boolean createVirtualFolder = useVirtualFolder != null && useVirtualFolder.getSelection();
 		createLinkTarget();
+		if (linkTargetPath != null) {
+			URI resolvedPath = newFolderHandle.getPathVariableManager().resolveURI(linkTargetPath);
+			try {
+				IFileStore store = EFS.getStore(resolvedPath);
+				if (!store.fetchInfo().exists()) {
+					MessageDialog dlg = new MessageDialog(getContainer().getShell(),
+							IDEWorkbenchMessages.WizardNewFolderCreationPage_createLinkLocationTitle,
+							null, 
+							NLS.bind(
+									IDEWorkbenchMessages.WizardNewFolderCreationPage_createLinkLocationQuestion, linkTargetPath),
+							MessageDialog.QUESTION_WITH_CANCEL,
+							new String[] { IDialogConstants.YES_LABEL,
+				                    IDialogConstants.NO_LABEL,
+				                    IDialogConstants.CANCEL_LABEL },
+							0);
+					int result = dlg.open();
+					if (result == Window.OK) {
+						store.mkdir(0, new NullProgressMonitor());
+					}
+					if (result == 2)
+						return null;
+				}
+			} catch (CoreException e) {
+				MessageDialog
+						.open(MessageDialog.ERROR,
+								getContainer().getShell(),
+								IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorTitle,
+								NLS
+										.bind(
+												IDEWorkbenchMessages.WizardNewFileCreationPage_internalErrorMessage,
+												e.getMessage()), SWT.SHEET);
+	
+				return null;
+			} 
+		}
 		IRunnableWithProgress op = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) {
-				CreateFolderOperation op = new CreateFolderOperation(
-						newFolderHandle, linkTargetPath,
-						IDEWorkbenchMessages.WizardNewFolderCreationPage_title);
+				AbstractOperation op;
+				op = new CreateFolderOperation(
+					newFolderHandle, linkTargetPath, createVirtualFolder, filterList,
+					IDEWorkbenchMessages.WizardNewFolderCreationPage_title);
 				try {
 					// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=219901
 					// directly execute the operation so that the undo state is
@@ -398,23 +538,143 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 		if (linkedResourceComposite != null) {
 			linkedResourceComposite.dispose();
 			linkedResourceComposite = null;
+			filterButton.dispose();
+			useDefaultLocation.dispose();
+			useVirtualFolder.dispose();
+			useLinkedResource.dispose();
+			linkedGroupComposite.dispose();
+			filterButton = null;
+			useDefaultLocation = null;
+			useVirtualFolder = null;
+			useLinkedResource = null;
+			linkedGroupComposite = null;
 			composite.layout();
 			shell.setSize(shellSize.x, shellSize.y - linkedResourceGroupHeight);
 			advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
 		} else {
+			Point oldCompositeSize = advancedComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			
+			ImageDescriptor folderDescriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(
+	                ISharedImages.IMG_OBJ_FOLDER);
+
+			ImageDescriptor[][] linkedResourceOverlayMap = new ImageDescriptor[4][1];
+			linkedResourceOverlayMap[1]= new ImageDescriptor[] {AbstractUIPlugin.imageDescriptorFromPlugin(
+					IDEWorkbenchPlugin.IDE_WORKBENCH,
+			"$nl$/icons/full/ovr16/link_ovr.gif")}; //$NON-NLS-1$
+			
+			CompositeImageDescriptor linkedFolderDescriptor = new OverlayIcon(folderDescriptor, linkedResourceOverlayMap, new Point(16, 16)); 
+
+			ImageDescriptor[][] virtualFolderOverlayMap = new ImageDescriptor[4][1];
+			virtualFolderOverlayMap[1]= new ImageDescriptor[] {AbstractUIPlugin.imageDescriptorFromPlugin(
+					IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/ovr16/virt_ovr.gif")}; //$NON-NLS-1$
+
+			CompositeImageDescriptor virtualFolderDescriptor = new OverlayIcon(folderDescriptor, virtualFolderOverlayMap, new Point(16, 16)); 
+
+			Image folderImage = folderDescriptor.createImage();
+			useDefaultLocation = new Button(advancedComposite, SWT.RADIO);
+
+			int indent = useDefaultLocation.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+
+			useDefaultLocation.setFont(advancedComposite.getFont());
+			useDefaultLocation.setText(IDEWorkbenchMessages.useDefaultLocation);
+			useDefaultLocation.setImage(folderImage);
+			GridData data = setButtonLayoutData(useDefaultLocation);
+			data.horizontalAlignment = GridData.BEGINNING;
+			data.horizontalIndent = indent;
+			useDefaultLocation.setLayoutData(data);
+
+			Image virtualFolderImage = virtualFolderDescriptor.createImage();
+
+			useVirtualFolder = new Button(advancedComposite, SWT.RADIO);
+			useVirtualFolder.setFont(advancedComposite.getFont());
+			useVirtualFolder.setImage(virtualFolderImage);
+			useVirtualFolder.setText(IDEWorkbenchMessages.createVirtualFolder);
+			data = setButtonLayoutData(useVirtualFolder);
+			data.horizontalAlignment = GridData.BEGINNING;
+			data.horizontalIndent = indent;
+			useVirtualFolder.setLayoutData(data);
+
+			Image linkedFolderImage = linkedFolderDescriptor.createImage();
+
+			useLinkedResource = new Button(advancedComposite, SWT.RADIO);
+			useLinkedResource.setFont(advancedComposite.getFont());
+			useLinkedResource.setText(IDEWorkbenchMessages.createLinkedFolder);
+			useLinkedResource.setImage(linkedFolderImage);
+			data = setButtonLayoutData(useLinkedResource);
+			data.horizontalAlignment = GridData.BEGINNING;
+			data.horizontalIndent = indent;
+			useLinkedResource.setLayoutData(data);
+
+			SelectionAdapter radioListener = new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					handleRadioSelect();
+				}
+			};
+			
+			useLinkedResource.addSelectionListener(radioListener);
+			useVirtualFolder.addSelectionListener(radioListener);
+			useDefaultLocation.addSelectionListener(radioListener);
+			
+			useDefaultLocation.setSelection(true);
+			
+			linkedGroupComposite = new Composite(advancedComposite, 0);
+			data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+			data.horizontalIndent = indent;
+			linkedGroupComposite.setFont(advancedComposite.getFont());
+			linkedGroupComposite.setLayoutData(data);
+
+			GridLayout layout = new GridLayout();
+			layout.marginHeight = 0;
+			layout.marginWidth = 0;
+			linkedGroupComposite.setLayout(layout);
+
 			linkedResourceComposite = linkedResourceGroup
-					.createContents(linkedResourceParent);
+					.createTextOnlyContents(linkedGroupComposite);
 			if (linkedResourceGroupHeight == -1) {
 				Point groupSize = linkedResourceComposite.computeSize(
 						SWT.DEFAULT, SWT.DEFAULT, true);
 				linkedResourceGroupHeight = groupSize.y;
 			}
-			shell.setSize(shellSize.x, shellSize.y + linkedResourceGroupHeight);
-			composite.layout();
+			linkedResourceGroup.setEnabled(false);
+
+			filterButton = new Button(advancedComposite, SWT.PUSH);
+			filterButton.setFont(advancedComposite.getFont());
+			filterButton.setText(IDEWorkbenchMessages.editfilters);
+			data = setButtonLayoutData(filterButton);
+			data.horizontalAlignment = GridData.BEGINNING;
+			data.horizontalIndent = indent;
+			filterButton.setLayoutData(data);
+			filterButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					handleEditFilterSelect();
+				}
+			});
+
+			setupLinkedResourceTarget();
 			advancedButton.setText(IDEWorkbenchMessages.hideAdvanced);
+
+			Point newCompositeSize = advancedComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			linkedResourceGroupHeight = newCompositeSize.y - oldCompositeSize.y;
+			getShell().setSize(shellSize.x, shellSize.y + linkedResourceGroupHeight);
+			composite.layout(true);
 		}
 	}
 
+	private void handleRadioSelect() {
+		linkedResourceGroup.setEnabled(useLinkedResource.getSelection());
+	}
+
+	/**
+	 * Show the Resource Filter dialog.
+	 */
+	private void handleEditFilterSelect() {
+		ResourceFilterEditDialog dialog = new ResourceFilterEditDialog(getShell());
+		dialog.setFilters(filterList);
+		if (dialog.open() == Window.OK)
+			filterList = dialog.getFilters();
+	}
+	
 	/**
 	 * The <code>WizardNewFolderCreationPage</code> implementation of this
 	 * <code>Listener</code> method handles all events and enablements for
@@ -509,6 +769,15 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 			valid = false;
 		}
 
+		if ((useDefaultLocation == null) || useDefaultLocation.getSelection()) {
+			IPath containerPath = resourceGroup.getContainerFullPath();
+			if (containerPath != null &&
+					createContainerHandle(containerPath).isVirtual()) {
+				valid = false;
+				setErrorMessage(IDEWorkbenchMessages.CreateLinkedResourceGroup_linkRequiredUnderAGroup);
+			}
+		}
+
 		IStatus linkedResourceStatus = null;
 		if (valid) {
 			linkedResourceStatus = validateLinkedResource();
@@ -522,7 +791,34 @@ public class WizardNewFolderMainPage extends WizardPage implements Listener {
 			setMessage(null);
 			setErrorMessage(null);
 		}
+		
+		if (isFilteredByParent()) {
+			setMessage(IDEWorkbenchMessages.WizardNewFolderCreationPage_resourceWillBeFilteredWarning, IMessageProvider.ERROR);
+			setupLinkedResourceTarget();
+			valid = false;
+		}
+		
 		return valid;
 	}
-
+	
+	private boolean isFilteredByParent() {
+		boolean createVirtualFolder = useVirtualFolder != null && useVirtualFolder.getSelection();
+		if (createVirtualFolder)
+			return false;
+		if ((linkedResourceGroup == null) || linkedResourceGroup.isEnabled())
+			return false;
+		IPath containerPath = resourceGroup.getContainerFullPath();
+		if (containerPath == null)
+			return false;
+		String resourceName = resourceGroup.getResource();
+		if (resourceName == null)
+			return false;
+		if (resourceName.length() > 0) {
+			IPath newFolderPath = containerPath.append(resourceName);
+			IFolder newFolderHandle = createFolderHandle(newFolderPath);
+			IWorkspace workspace = newFolderHandle.getWorkspace();
+			return !workspace.validateFiltered(newFolderHandle).isOK();
+		}
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java
index 93eb6e9..2d25db8 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/extensions/org/eclipse/ui/part/ResourceTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,13 +25,13 @@ import org.eclipse.swt.dnd.TransferData;
 
 /**
  * The <code>ResourceTransfer</code> class is used to transfer an
- * array of <code>IResources</code>s from one part to another in a 
+ * array of <code>IResource</code>s from one part to another in a 
  * drag and drop operation or a cut, copy, paste action.
  * <p>
  * In every drag and drop operation there is a <code>DragSource</code> and 
  * a <code>DropTarget</code>.  When a drag occurs a <code>Transfer</code> is 
- * used to marshall the drag data from the source into a byte array.  If a drop 
- * occurs another <code>Transfer</code> is used to marshall the byte array into
+ * used to marshal the drag data from the source into a byte array.  If a drop 
+ * occurs another <code>Transfer</code> is used to marshal the byte array into
  * drop data for the target.  
  * </p>
  * <p>
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/etool16/newgroup_wiz.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/etool16/newgroup_wiz.gif
new file mode 100644
index 0000000..756342f
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/etool16/newgroup_wiz.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/eview16/pview.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/eview16/pview.gif
index 4aa54a6..e3af1ba 100644
Binary files a/eclipse/plugins/org.eclipse.ui.ide/icons/full/eview16/pview.gif and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/eview16/pview.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/excludeMode_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/excludeMode_filter.gif
new file mode 100644
index 0000000..e0be983
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/excludeMode_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileFolderType_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileFolderType_filter.gif
new file mode 100644
index 0000000..2a3eb91
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileFolderType_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileType_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileType_filter.gif
new file mode 100644
index 0000000..9729c42
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/fileType_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folder.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folder.gif
new file mode 100644
index 0000000..513329b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folder.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folderType_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folderType_filter.gif
new file mode 100644
index 0000000..c91b267
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/folderType_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/includeMode_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/includeMode_filter.gif
new file mode 100644
index 0000000..62dad8b
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/includeMode_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/inheritable_filter.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/inheritable_filter.gif
new file mode 100644
index 0000000..e215863
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/obj16/inheritable_filter.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/filterapplied_ovr.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/filterapplied_ovr.gif
new file mode 100644
index 0000000..0eda2ba
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/filterapplied_ovr.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/virt_ovr.gif b/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/virt_ovr.gif
new file mode 100644
index 0000000..c18d961
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/ovr16/virt_ovr.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/icons/full/wizban/newgroup_wiz.png b/eclipse/plugins/org.eclipse.ui.ide/icons/full/wizban/newgroup_wiz.png
new file mode 100644
index 0000000..d7ae318
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.ide/icons/full/wizban/newgroup_wiz.png differ
diff --git a/eclipse/plugins/org.eclipse.ui.ide/plugin.properties b/eclipse/plugins/org.eclipse.ui.ide/plugin.properties
index 868b18e..66c79b4 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -62,6 +62,7 @@ PreferencePages.Decorators = Label Decorations
 PreferencePages.NewKeys = Keys
 PreferencePages.ContentTypes = Content Types
 PropertyPages.project.reference = Project References
+PropertyPages.resource.filters = Resource Filters
 PropertyPages.info.file = Resource
 
 Views.ResourceNavigator = Navigator
@@ -92,8 +93,12 @@ openLocalFile.description= Opens a File
 GoToResourceAction.label = &Resource...
 DecoratorLinkedResource.label = Linked Resources
 DecoratorLinkedResource.description = Adds an icon decoration to linked resources.
+DecoratorVirtualResource.label = Virtual Folders
+DecoratorVirtualResource.description = Shows an icon for virtual folders. 
 DecoratorSpecificContentType.label = File Icons Based On Content Analysis
 DecoratorSpecificContentType.description = Displays an icon based on the examination of the contents of a file. This yields a more precise answer than one derived simply from the file name.
+DecoratorSpecificResourceFilterType.label = Containers with Resource Filters
+DecoratorSpecificResourceFilterType.description = Displays an icon based on the presence of resource filters on a container.
 OpenWorkspaceFileAction.label = Open Reso&urce...
 SelectWorkingSetsAction.label = &Working Sets
 SelectWorkingSetsAction.tooltip = Modify workbench working sets
@@ -200,7 +205,7 @@ KeyBindingActionSet.showKeyAssist.label = &Key Assist...
 PreferenceKeywords.Editing = editing
 PreferenceKeywords.Appearance = appearance
 PreferenceKeywords.ColorLabels = color label
-PreferenceKeywords.General = click background
+PreferenceKeywords.General = click background heap
 PreferenceKeywords.Themes = themes
 PreferenceKeywords.AppearancePage = presentation
 PreferenceKeywords.Tabs = tab
@@ -218,6 +223,11 @@ PreferenceKeywords.Restore = restore
 PreferenceKeywords.State = state
 PreferenceKeywords.Encoding = encoding
 PreferenceKeywords.RecentWorkspaces = workspaces prompt recent startup
+PreferenceKeywords.RecentlyOpened = recent opened
+PreferenceKeywords.Directory = directory
+PreferenceKeywords.Project = project
+PreferenceKeywords.Archive = zip tar
+PreferenceKeywords.Settings = settings
 
 # TODO This stuff is just to help me work on the parsing of the menus extension
 # point.  It is likely not in its final form yet.
@@ -282,4 +292,16 @@ menu.mnemonic.0 = I
 menu.showIn.label = Show In
 menu.showIn.mnemonic = I
 
+linked_resources = Linked Resources
+
+filterProvider.description = * = any string, ? = any character, \\ = escape literals: * ? \\
+filterProvider.name = String Matcher
+orFilterProvider.name =OR
+orFilterProvider.description = Allows grouping others filters with the OR logical preposition
+andFilterProvider.name =AND
+andFilterProvider.description = Allows grouping others filters with the AND logical preposition
+notFilterProvider.name =NOT
+notFilterProvider.description = Allows grouping others filters with the NOT logical preposition
 installationPage.feature.name = Features
+multiFilterProvider.name = File and Folder Attributes
+multiFilterProvider.description = Match many attributes of files and folders
diff --git a/eclipse/plugins/org.eclipse.ui.ide/plugin.xml b/eclipse/plugins/org.eclipse.ui.ide/plugin.xml
index 1b0da09..3c81979 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.ide/plugin.xml
@@ -29,6 +29,9 @@
          <description>
             %ImportWizards.PreferencesDescription
          </description>
+         <keywordReference
+               id="org.eclipse.ui.ide.settings">
+         </keywordReference>
       </wizard>
       <wizard
             name="%ImportWizards.FileSystem"
@@ -52,6 +55,9 @@
          <description>
             %ImportWizards.ExternalProjectDescription
          </description>
+         <keywordReference
+               id="org.eclipse.ui.ide.archive">
+         </keywordReference>
       </wizard>
       <wizard
             name="%ImportWizards.ZipFile"
@@ -65,6 +71,9 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference
+               id="org.eclipse.ui.ide.archive">
+         </keywordReference>
       </wizard>
    </extension>
    <extension
@@ -84,6 +93,9 @@
          <description>
             %ExportWizards.PreferencesDescription
          </description>
+         <keywordReference
+               id="org.eclipse.ui.ide.settings">
+         </keywordReference>
       </wizard>         
       <wizard
             name="%ExportWizards.FileSystem"
@@ -97,6 +109,9 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference
+               id="org.eclipse.ui.ide.project">
+         </keywordReference>
       </wizard>
       <wizard
             name="%ExportWizards.ZipFile"
@@ -110,6 +125,12 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference
+               id="org.eclipse.ui.ide.archive">
+         </keywordReference>
+         <keywordReference
+               id="org.eclipse.ui.ide.project">
+         </keywordReference>
       </wizard>
    </extension>
    <extension
@@ -163,6 +184,9 @@
          <selection
                class="org.eclipse.core.resources.IResource">
          </selection>
+         <keywordReference
+               id="org.eclipse.ui.ide.directory">
+         </keywordReference>
       </wizard>
       <wizard
             name="%NewWizards.file"
@@ -349,6 +373,23 @@
          </enablement>
       </decorator>
       <decorator
+            lightweight="true"
+            adaptable="true"
+            location="BOTTOM_RIGHT"
+            label="%DecoratorVirtualResource.label"
+            class="org.eclipse.ui.internal.ide.VirtualResourceDecorator"
+            state="true"
+            id="org.eclipse.ui.VirtualResourceDecorator">
+         <description>
+            %DecoratorVirtualResource.description
+         </description>
+         <enablement>
+            <objectClass
+                  name="org.eclipse.core.resources.IResource">
+            </objectClass>
+         </enablement>
+      </decorator>
+      <decorator
             adaptable="false"
             class="org.eclipse.ui.internal.ide.ContentTypeDecorator"
             id="org.eclipse.ui.ContentTypeDecorator"
@@ -365,6 +406,23 @@
             </objectClass>
          </enablement>
       </decorator>
+      <decorator
+            adaptable="true"
+            class="org.eclipse.ui.internal.ide.ResourceFilterDecorator"
+            id="org.eclipse.ui.ResourceFilterDecorator"
+            label="%DecoratorSpecificResourceFilterType.label"
+            lightweight="true"
+            location="BOTTOM_LEFT"
+            state="false">
+         <description>
+            %DecoratorSpecificResourceFilterType.description
+         </description>
+         <enablement>
+            <objectClass
+                  name="org.eclipse.core.resources.IContainer">
+            </objectClass>
+         </enablement>
+      </decorator>
    </extension>
    <extension
    		point="org.eclipse.ui.keywords">
@@ -434,6 +492,21 @@
     <keyword
             label="%PreferenceKeywords.Encoding"
             id="org.eclipse.ui.ide.encoding"/>
+      <keyword
+            id="org.eclipse.ui.ide.recentlyOpened"
+            label="%PreferenceKeywords.RecentlyOpened"/>
+      <keyword
+            id="org.eclipse.ui.ide.directory"
+            label="%PreferenceKeywords.Directory"/>
+      <keyword
+            id="org.eclipse.ui.ide.project"
+            label="%PreferenceKeywords.Project"/>
+      <keyword
+            id="org.eclipse.ui.ide.archive"
+            label="%PreferenceKeywords.Archive"/>
+      <keyword
+            id="org.eclipse.ui.ide.settings"
+            label="%PreferenceKeywords.Settings"/>
    </extension>      
    <extension
          point="org.eclipse.ui.preferencePages">
@@ -454,6 +527,7 @@
          <keywordReference id="org.eclipse.ui.ide.pin"/>
          <keywordReference id="org.eclipse.ui.ide.dirty"/>
          <keywordReference id="org.eclipse.ui.ide.close"/>
+         <keywordReference id="org.eclipse.ui.ide.recentlyOpened"/>
          <keywordReference
                id="org.eclipse.ui.ide.restore">
          </keywordReference>
@@ -621,6 +695,17 @@
          </enabledWhen>
       </page>
       <page
+            category="org.eclipse.ui.propertypages.info.file"
+            class="org.eclipse.ui.internal.ide.dialogs.ResourceFilterPage"
+            id="org.eclipse.ui.propertypages.resource.filters"
+            name="%PropertyPages.resource.filters">
+         <enabledWhen>
+            <adapt type="org.eclipse.core.resources.IResource">
+            	<instanceof value="org.eclipse.core.resources.IContainer"/>
+            </adapt>
+         </enabledWhen>
+      </page>
+      <page
             class="org.eclipse.ui.internal.ide.dialogs.ResourceInfoPage"
             id="org.eclipse.ui.propertypages.info.file"
             name="%PropertyPages.info.file"
@@ -639,6 +724,15 @@
             </adapt>
          </enabledWhen>
       </page>
+      <page
+            category="org.eclipse.ui.propertypages.info.file"
+            class="org.eclipse.ui.internal.ide.dialogs.ProjectLinkedResourcePage"
+            id="org.eclipse.ui.propertypages.project.linkedResourcesPage"
+            name="%linked_resources">
+         <enabledWhen>
+            <adapt type="org.eclipse.core.resources.IProject"/>
+         </enabledWhen>
+      </page>    
    </extension>
    <extension
          point="org.eclipse.ui.commands">
@@ -732,6 +826,7 @@
             name="%command.buildAll.name"
             description="%command.buildAll.description"
             categoryId="org.eclipse.ui.category.project"
+            defaultHandler="org.eclipse.ui.internal.ide.handlers.BuildAllProjectsHandler"
             id="org.eclipse.ui.project.buildAll">
       </command>
       <command
@@ -995,6 +1090,11 @@
             commandId="org.eclipse.ui.window.quickAccess"
             sequence="M1+3"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
+      <key
+            commandId="org.eclipse.ui.window.spy"
+      		contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            sequence="M2+M3+F3"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
    </extension>
 
    <extension
@@ -1679,12 +1779,16 @@
                
              </visibleWhen>
          </command>
+         <separator 
+               name="additions"
+               visible="true" >
+         </separator>
       </menuContribution>
   
     
       <menuContribution
             locationURI="menu:org.eclipse.ui.views.ProblemView">
-         <menu
+         <menu 
                id="org.eclipse.ui.ide.problems.filtersMenu"
                label="%MarkerFiltersMenu.Show">
             <dynamic
@@ -2190,6 +2294,49 @@
       </propertyTester>
    </extension>
    <extension
+         point="org.eclipse.core.resources.filterMatchers">
+      <filterMatcher
+      		id="org.eclipse.ui.ide.patternFilterMatcher"
+            argumentType="string"
+            class="org.eclipse.ui.internal.ide.misc.StringFileInfoMatcher"
+            description="%filterProvider.description"
+            name="%filterProvider.name"
+            ordering="first">
+      </filterMatcher>
+      <filterMatcher
+      		id="org.eclipse.ui.ide.orFilterMatcher"
+            argumentType="filterMatchers"
+            class="org.eclipse.ui.internal.ide.misc.OrFileInfoMatcher"
+            description="%orFilterProvider.description"
+            name="%orFilterProvider.name"
+            ordering="first">
+      </filterMatcher>
+      <filterMatcher
+      		id="org.eclipse.ui.ide.andFilterMatcher"
+            argumentType="filterMatchers"
+            class="org.eclipse.ui.internal.ide.misc.AndFileInfoMatcher"
+            description="%andFilterProvider.description"
+            name="%andFilterProvider.name"
+            ordering="first">
+      </filterMatcher>
+      <filterMatcher
+      		id="org.eclipse.ui.ide.notFilterMatcher"
+            argumentType="filterMatcher"
+            class="org.eclipse.ui.internal.ide.misc.NotFileInfoMatcher"
+            description="%notFilterProvider.description"
+            name="%notFilterProvider.name"
+            ordering="first">
+      </filterMatcher>
+      <filterMatcher
+            argumentType="string"
+            class="org.eclipse.ui.internal.ide.misc.FileInfoAttributesMatcher"
+            description="%multiFilterProvider.description"
+            id="org.eclipse.ui.ide.multiFilter"
+            name="%multiFilterProvider.name"
+            ordering="first">
+      </filterMatcher>
+   </extension>
+   <extension
          point="org.eclipse.ui.installationPages">
           <page
             name="%installationPage.feature.name"
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
index 7b8fff6..c97635f 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -756,7 +756,7 @@ public final class IDE {
 	 * as well as traditional name/extension bindings.
 	 * </p>
 	 * <ol>
-	 * <li>The file is consulted for a persistent property named
+	 * <li>The <code>IResource</code> is consulted for a persistent property named
 	 * <code>IDE.EDITOR_KEY</code> containing the preferred editor id to be
 	 * used.</li>
 	 * <li>The workbench editor registry is consulted to determine if an editor
@@ -767,6 +767,8 @@ public final class IDE {
 	 * component editor is available (e.g. OLE editor on Win32 platforms).</li>
 	 * <li>The operating system is consulted to determine if an external editor
 	 * is available.</li>
+	 * <li>The workbench editor registry is consulted to determine if the
+	 * default text editor is available.</li>
 	 * </ol>
 	 * </p>
 	 * 
@@ -791,7 +793,7 @@ public final class IDE {
 	 * <code>determineContentType</code>is <code>true</code>.
 	 * </p>
 	 * <ol>
-	 * <li>The file is consulted for a persistent property named
+	 * <li>The <code>IResource</code> is consulted for a persistent property named
 	 * <code>IDE.EDITOR_KEY</code> containing the preferred editor id to be
 	 * used.</li>
 	 * <li>The workbench editor registry is consulted to determine if an editor
@@ -802,6 +804,8 @@ public final class IDE {
 	 * component editor is available (e.g. OLE editor on Win32 platforms).</li>
 	 * <li>The operating system is consulted to determine if an external editor
 	 * is available.</li>
+	 * <li>The workbench editor registry is consulted to determine if the
+	 * default text editor is available.</li>
 	 * </ol>
 	 * </p>
 	 * 
@@ -843,6 +847,8 @@ public final class IDE {
 	 * component editor is available (e.g. OLE editor on Win32 platforms).</li>
 	 * <li>The operating system is consulted to determine if an external editor
 	 * is available.</li>
+	 * <li>The workbench editor registry is consulted to determine if the
+	 * default text editor is available.</li>
 	 * </ol>
 	 * </p>
 	 * 
@@ -888,9 +894,6 @@ public final class IDE {
 	 * method will attempt to infer content type from the file name.
 	 * </p>
 	 * <ol>
-	 * <li>The file is consulted for a persistent property named
-	 * <code>IDE.EDITOR_KEY</code> containing the preferred editor id to be
-	 * used.</li>
 	 * <li>The workbench editor registry is consulted to determine if an editor
 	 * extension has been registered for the file type. If so, an instance of
 	 * the editor extension is opened on the file. See
@@ -899,6 +902,8 @@ public final class IDE {
 	 * component editor is available (e.g. OLE editor on Win32 platforms).</li>
 	 * <li>The operating system is consulted to determine if an external editor
 	 * is available.</li>
+	 * <li>The workbench editor registry is consulted to determine if the
+	 * default text editor is available.</li>
 	 * </ol>
 	 * </p>
 	 * 
@@ -923,9 +928,6 @@ public final class IDE {
 	 * <code>inferContentType</code> is <code>true</code>.
 	 * </p>
 	 * <ol>
-	 * <li>The file is consulted for a persistent property named
-	 * <code>IDE.EDITOR_KEY</code> containing the preferred editor id to be
-	 * used.</li>
 	 * <li>The workbench editor registry is consulted to determine if an editor
 	 * extension has been registered for the file type. If so, an instance of
 	 * the editor extension is opened on the file. See
@@ -934,6 +936,8 @@ public final class IDE {
 	 * component editor is available (e.g. OLE editor on Win32 platforms).</li>
 	 * <li>The operating system is consulted to determine if an external editor
 	 * is available.</li>
+	 * <li>The workbench editor registry is consulted to determine if the
+	 * default text editor is available.</li>
 	 * </ol>
 	 * </p>
 	 * 
@@ -1105,7 +1109,7 @@ public final class IDE {
 			editor = openEditor(page, file, activate);
 		} else {
 			editor = page.openEditor(new FileEditorInput(file), editorDesc
-					.getId(), activate);
+					.getId(), activate, IWorkbenchPage.MATCH_ID | IWorkbenchPage.MATCH_INPUT);
 		}
 
 		// get the editor to update its position based on the marker
@@ -1152,6 +1156,84 @@ public final class IDE {
     }
 
 	/**
+	 * Opens an internal editor on the given IFileStore object.
+	 * <p>
+	 * Unlike the other <code>openEditor</code> methods, this one can be used to
+	 * open files that reside outside the workspace resource set.
+	 * </p>
+	 * <p>
+	 * If the page already has an editor open on the target object then that
+	 * editor is brought to front; otherwise, a new editor is opened.
+	 * </p>
+	 * 
+	 * @param page
+	 *            the page in which the editor will be opened
+	 * @param fileStore
+	 *            the IFileStore representing the file to open
+	 * @return an open editor or <code>null</code> if an external editor was
+	 *         opened
+	 * @exception PartInitException
+	 *                if no internal editor can be found or if the editor could
+	 *                not be initialized
+	 * @see org.eclipse.ui.IWorkbenchPage#openEditor(IEditorInput, String)
+	 * @since 3.6
+	 */
+	public static IEditorPart openInternalEditorOnFileStore(IWorkbenchPage page, IFileStore fileStore) throws PartInitException {
+		if (page == null)
+			throw new IllegalArgumentException();
+		if (fileStore == null)
+			throw new IllegalArgumentException();
+
+		IEditorInput input = getEditorInput(fileStore);
+		String name = fileStore.fetchInfo().getName();
+		if (name == null)
+			throw new IllegalArgumentException();
+
+		IContentType[] contentTypes = null;
+		InputStream is = null;
+		try {
+			is = fileStore.openInputStream(EFS.NONE, null);
+			contentTypes = Platform.getContentTypeManager().findContentTypesFor(is, name);
+		} catch (CoreException ex) {
+			// it's OK, ignore
+		} catch (IOException ex) {
+			// it's OK, ignore
+		} finally {
+			if (is != null) {
+				try {
+					is.close();
+				} catch (IOException e) {
+					// nothing good can be done here, ignore
+				}
+			}
+		}
+
+		IEditorRegistry editorReg = PlatformUI.getWorkbench().getEditorRegistry();
+		if (contentTypes != null) {
+			for(int i = 0 ; i < contentTypes.length; i++) {
+				IEditorDescriptor editorDesc = editorReg.getDefaultEditor(name, contentTypes[i]);
+				if ((editorDesc != null) && (editorDesc.isInternal()))
+					return page.openEditor(input, editorDesc.getId());
+			}
+		}
+
+		// no content types are available, use file name associations
+		IEditorDescriptor[] editors = editorReg.getEditors(name);
+		if (editors != null) {
+			for(int i = 0 ; i < editors.length; i++) {
+				if ((editors[i] != null) && (editors[i].isInternal()))
+					return page.openEditor(input, editors[i].getId());
+			}
+		}
+
+		// fallback to the default text editor
+		IEditorDescriptor textEditor = editorReg.findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
+		if (textEditor == null)
+			throw new PartInitException(IDEWorkbenchMessages.IDE_noFileEditorFound);
+		return page.openEditor(input, textEditor.getId());
+	}
+
+	/**
 	 * Save all dirty editors in the workbench whose editor input is a child
 	 * resource of one of the <code>IResource</code>'s provided. Opens a
 	 * dialog to prompt the user if <code>confirm</code> is true. Return true
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java
index 06e94f1..6efbb9c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEActionFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,8 @@ import org.eclipse.ui.actions.GlobalBuildAction;
 import org.eclipse.ui.actions.NewWizardDropDownAction;
 import org.eclipse.ui.actions.NewWizardMenu;
 import org.eclipse.ui.actions.RetargetAction;
+import org.eclipse.ui.internal.actions.CommandAction;
+import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.TipsAndTricksAction;
 import org.eclipse.ui.internal.ide.actions.BuildCleanAction;
@@ -45,6 +47,18 @@ import org.eclipse.ui.internal.ide.actions.ToggleAutoBuildAction;
  */
 public final class IDEActionFactory {
 
+	private static class WorkbenchCommandAction extends CommandAction implements
+			ActionFactory.IWorkbenchAction {
+		/**
+		 * @param commandIdIn
+		 * @param window
+		 */
+		public WorkbenchCommandAction(String commandIdIn,
+				IWorkbenchWindow window) {
+			super(window, commandIdIn);
+		}
+	}
+
     /**
      * Prevents instantiation.
      */
@@ -101,8 +115,17 @@ public final class IDEActionFactory {
             if (window == null) {
                 throw new IllegalArgumentException();
             }
-            return new GlobalBuildAction(window,
-                    IncrementalProjectBuilder.INCREMENTAL_BUILD);
+			WorkbenchCommandAction action = new WorkbenchCommandAction(
+					getCommandId(), window);
+            action.setId(getId());
+
+            action.setText(IDEWorkbenchMessages.GlobalBuildAction_text);
+            action.setToolTipText(IDEWorkbenchMessages.GlobalBuildAction_toolTip);
+            action.setImageDescriptor(IDEInternalWorkbenchImages
+                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC));
+            action.setDisabledImageDescriptor(IDEInternalWorkbenchImages
+                    .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_BUILD_EXEC_DISABLED));
+			return action;
         }
     };
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/ResourceSelectionUtil.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/ResourceSelectionUtil.java
new file mode 100644
index 0000000..13ecf36
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/ResourceSelectionUtil.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.ide;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+/**
+ * Provides utilities for checking the validity of selections.
+ * <p>
+ * This class provides static methods only; it is not intended to be instantiated
+ * or subclassed.
+ * @since 3.6
+ * </p>
+ */
+public class ResourceSelectionUtil {
+    /* (non-Javadoc)
+     * Private constructor to block instantiation.
+     */
+    private ResourceSelectionUtil() {
+    }
+
+    /**
+     * Returns whether the types of the resources in the given selection are among 
+     * the specified resource types.
+     * 
+     * @param selection the selection
+     * @param resourceMask resource mask formed by bitwise OR of resource type
+     *   constants (defined on <code>IResource</code>)
+     * @return <code>true</code> if all selected elements are resources of the right
+     *  type, and <code>false</code> if at least one element is either a resource
+     *  of some other type or a non-resource
+     * @see IResource#getType()
+     */
+    public static boolean allResourcesAreOfType(IStructuredSelection selection,
+            int resourceMask) {
+        Iterator resources = selection.iterator();
+        while (resources.hasNext()) {
+            Object next = resources.next();
+            if (!(next instanceof IResource)) {
+				return false;
+			}
+            if (!resourceIsType((IResource) next, resourceMask)) {
+				return false;
+			}
+        }
+        return true;
+    }
+
+    /**
+     * Returns the selection adapted to IResource. Returns null
+     * if any of the entries are not adaptable.
+     * 
+     * @param selection the selection
+     * @param resourceMask resource mask formed by bitwise OR of resource type
+     *   constants (defined on <code>IResource</code>)
+     * @return IStructuredSelection or null if any of the entries are not adaptable.
+     * @see IResource#getType()
+     */
+    public static IStructuredSelection allResources(
+            IStructuredSelection selection, int resourceMask) {
+        Iterator adaptables = selection.iterator();
+        List result = new ArrayList();
+        while (adaptables.hasNext()) {
+            Object next = adaptables.next();
+            if (next instanceof IAdaptable) {
+                Object resource = ((IAdaptable) next)
+                        .getAdapter(IResource.class);
+                if (resource == null) {
+					return null;
+				} else if (resourceIsType((IResource) resource, resourceMask)) {
+					result.add(resource);
+				}
+            } else {
+				return null;
+			}
+        }
+        return new StructuredSelection(result);
+
+    }
+
+    /**
+     * Returns whether the type of the given resource is among the specified 
+     * resource types.
+     * 
+     * @param resource the resource
+     * @param resourceMask resource mask formed by bitwise OR of resource type
+     *   constants (defined on <code>IResource</code>)
+     * @return <code>true</code> if the resources has a matching type, and 
+     *   <code>false</code> otherwise
+     * @see IResource#getType()
+     */
+    public static boolean resourceIsType(IResource resource, int resourceMask) {
+        return (resource.getType() & resourceMask) != 0;
+    }
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java
new file mode 100644
index 0000000..275d5f5
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ImportTypeDialog.java
@@ -0,0 +1,507 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.ide.dialogs;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+import org.eclipse.ui.internal.ide.dialogs.LinkedResourcesPreferencePage;
+import org.eclipse.ui.internal.ide.dialogs.RelativePathVariableGroup;
+
+
+/**
+ * Dialog to let the user customise how files and resources are created in a project
+ * hierarchy after the user drag and drop items on a workspace container.
+ * 
+ * Files and folders can be created either by copying the source objects, creating
+ * linked resources, and/or creating virtual folders.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @since 3.6
+ *
+ */
+public class ImportTypeDialog extends TrayDialog {
+
+	/**
+	 * Copy the files and folders to the destination
+	 */
+	public final static int IMPORT_COPY 			= 1;
+	/**
+	 * Import only files
+	 */
+	public final static int IMPORT_FILES_ONLY		= 16;
+	/**
+	 * Create linked resources for each file and folder
+	 */
+	public final static int IMPORT_LINK 			= 4;
+	/**
+	 * Move the files and folders to the destination
+	 */
+	public final static int IMPORT_MOVE 			= 8;
+	/**
+	 * Do not perform an import operation
+	 */
+	public final static int IMPORT_NONE 			= 0;
+	/**
+	 * Recreate the file and folder hierarchy using groups and links
+	 */
+	public final static int IMPORT_VIRTUAL_FOLDERS_AND_LINKS = 2;
+	
+	private Button copyButton = null;
+
+	private int currentSelection;
+
+	private Button linkButton = null;
+
+	private Button moveButton = null;
+
+	private int operationMask;
+	private String preferredVariable;
+	private IResource receivingResource = null;
+	private Button shadowCopyButton = null;
+	private String variable = null;
+	
+	private RelativePathVariableGroup relativePathVariableGroup;
+	
+	/**
+	 * Creates the Import Type Dialog when resources are dragged and dropped from an Eclipse
+	 * view.
+	 * 
+	 * @param shell
+	 * 			the parent Shell
+	 * @param dropOperation
+	 * 		The dropOperation that was used by the user
+	 * @param sources
+	 * 		The list of resources that were dragged
+	 * @param target
+	 * 		The target container onto which the resources were dropped
+	 */
+	public ImportTypeDialog(Shell shell, int dropOperation,
+			IResource[] sources, IContainer target) {
+		this(shell, selectAppropriateMask(dropOperation, sources, target), RelativePathVariableGroup.getPreferredVariable(sources, target));
+	}
+	
+	/**
+	 * Creates the Import Type Dialog when files are dragged and dropped from the
+	 * operating system's shell (Windows Explorer on Windows Platform, for example).
+	 * 
+	 * @param shell
+	 * 			the parent Shell
+	 * @param dropOperation
+	 * 		The dropOperation that was used by the user
+	 * @param names
+	 * 		The list of files that were dragged
+	 * @param target
+	 * 		The target container onto which the files were dropped
+	 */
+	public ImportTypeDialog(Shell shell, int dropOperation, String[] names, IContainer target) {
+		this(shell, selectAppropriateMask(dropOperation, names, target), RelativePathVariableGroup.getPreferredVariable(names, target));
+	}
+	
+	/**
+	 * @param parentShell
+	 * @param operationMask
+	 */
+	private ImportTypeDialog(Shell parentShell, int operationMask, String preferredVariable) {
+		super(parentShell);
+		
+		this.preferredVariable = preferredVariable;
+		this.operationMask = operationMask;
+		currentSelection = 0;
+		String tmp = readContextPreference(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_TYPE);
+		if (tmp.length() > 0)
+			currentSelection = Integer.parseInt(tmp);
+		currentSelection = currentSelection & operationMask;
+		if (currentSelection == 0) {
+			if (hasFlag(IMPORT_COPY))
+				currentSelection = IMPORT_COPY;
+			else
+				currentSelection = IMPORT_MOVE;
+		}
+
+		IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+		if (store.getBoolean(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_RELATIVE))
+			variable = preferredVariable;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.TrayDialog#close()
+	 */
+	public boolean close() {
+		return super.close();
+	}
+	
+	/**
+	 * Get the user selection from the dialog.
+	 * @return The current selection (one of IMPORT_COPY, IMPORT_VIRTUAL_FOLDERS_AND_LINKS, IMPORT_LINK and IMPORT_MOVE)
+	 */
+	public int getSelection() {
+		return currentSelection;
+	}
+	
+	/**
+	 * Get the selected variable if the selection is either IMPORT_VIRTUAL_FOLDERS_AND_LINKS or IMPORT_LINK
+	 * @return The currently selected variable, or AUTOMATIC or ABSOLUTE_PATH
+	 */
+	public String getVariable() {
+		return variable;
+	}
+	
+	/** Set the project that is the destination of the import operation
+	 * @param resource
+	 */
+	public void setResource(IResource resource) {
+		receivingResource = resource;
+	}
+	
+	private boolean hasFlag(int flag) {
+		return (operationMask & flag) != 0;
+	}
+
+	// the format of the context is operationMask,value:operationMask,value:operationMask,value
+	private String readContextPreference(String key) {
+		String value = IDEWorkbenchPlugin.getDefault().getPreferenceStore().getString(key);
+		String [] keyPairs = value.split(":"); //$NON-NLS-1$
+		for (int i = 0; i < keyPairs.length; i++) {
+			String [] element = keyPairs[i].split(","); //$NON-NLS-1$
+			if (element.length == 2) {
+				if (element[0].equals(Integer.toString(operationMask)))
+					return element[1];
+			}
+		}
+		return ""; //$NON-NLS-1$
+	}
+	
+	private void refreshSelection() {
+		if (copyButton != null)
+			copyButton.setSelection(currentSelection == IMPORT_COPY);
+		if (shadowCopyButton != null)
+			shadowCopyButton.setSelection(currentSelection == IMPORT_VIRTUAL_FOLDERS_AND_LINKS);
+		if (linkButton != null)
+			linkButton.setSelection(currentSelection == IMPORT_LINK);
+		if (moveButton != null)
+			moveButton.setSelection(currentSelection == IMPORT_MOVE);
+		if (relativePathVariableGroup != null) {
+			relativePathVariableGroup.setEnabled((currentSelection & (IMPORT_VIRTUAL_FOLDERS_AND_LINKS | IMPORT_LINK)) != 0);
+		}
+	}
+
+	private void writeContextPreference(String key, String value) {
+		String oldValue = IDEWorkbenchPlugin.getDefault().getPreferenceStore().getString(key);
+		StringBuffer buffer = new StringBuffer();
+		String [] keyPairs = oldValue.split(":"); //$NON-NLS-1$
+		boolean found = false;
+		for (int i = 0; i < keyPairs.length; i++) {
+			if (i > 0)
+				buffer.append(":"); //$NON-NLS-1$
+			String [] element = keyPairs[i].split(","); //$NON-NLS-1$
+			if (element.length == 2) {
+				if (element[0].equals(Integer.toString(operationMask))) {
+					buffer.append(element[0] + "," + value); //$NON-NLS-1$
+					found = true;
+				}
+				else
+					buffer.append(keyPairs[i]);
+			}
+		}
+		if (!found) {
+			if (buffer.length() > 0)
+				buffer.append(":"); //$NON-NLS-1$
+			buffer.append(Integer.toString(operationMask) + "," + value); //$NON-NLS-1$
+		}
+		String newValue = buffer.toString();
+		IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(key, newValue);
+	}
+
+	protected void buttonPressed(int buttonId) {
+		if (buttonId == IDialogConstants.OK_ID) {
+			writeContextPreference(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_TYPE, Integer.toString(currentSelection));
+
+			IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+			store.putValue(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_RELATIVE, Boolean.toString(variable != null));
+		}
+		super.buttonPressed(buttonId);
+	}
+
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		String title = (operationMask & IMPORT_FILES_ONLY) != 0 ? IDEWorkbenchMessages.ImportTypeDialog_titleFilesOnly:
+			IDEWorkbenchMessages.ImportTypeDialog_title;
+		shell.setText(title);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+				IIDEHelpContextIds.IMPORT_TYPE_DIALOG);
+	}
+
+	protected Control createDialogArea(Composite parent) {
+		boolean linkIsOnlyChoice = hasFlag(IMPORT_LINK) && !(hasFlag(IMPORT_COPY | IMPORT_MOVE) || (hasFlag(IMPORT_VIRTUAL_FOLDERS_AND_LINKS) && !hasFlag(IMPORT_FILES_ONLY)));
+
+		if (!linkIsOnlyChoice)
+			createMessageArea(parent);
+		Composite composite = new Composite(parent, 0);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ 		composite.setLayoutData(gridData);
+ 		composite.setFont(parent.getFont());
+
+		
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+
+		int indent= linkIsOnlyChoice ? 0: convertWidthInCharsToPixels(3);
+
+		layout.marginWidth += indent;
+		composite.setLayout(layout);
+		SelectionListener listener = new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				currentSelection = ((Integer) e.widget.getData()).intValue();
+				refreshSelection();
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				currentSelection = ((Integer) e.widget.getData()).intValue();
+				refreshSelection();
+			}
+		};
+		
+		if (hasFlag(IMPORT_COPY)) {
+			copyButton = new Button(composite, SWT.RADIO);
+			copyButton.setText(hasFlag(IMPORT_FILES_ONLY) ? IDEWorkbenchMessages.ImportTypeDialog_copyFiles: IDEWorkbenchMessages.ImportTypeDialog_copyFilesAndDirectories);
+			gridData = new GridData(GridData.FILL_HORIZONTAL);
+			copyButton.setLayoutData(gridData);
+			copyButton.setData(new Integer(IMPORT_COPY));
+			copyButton.addSelectionListener(listener);
+			copyButton.setFont(parent.getFont());
+		}
+		
+		if (hasFlag(IMPORT_MOVE)) {
+			moveButton = new Button(composite, SWT.RADIO);
+			moveButton.setText(hasFlag(IMPORT_FILES_ONLY) ? IDEWorkbenchMessages.ImportTypeDialog_moveFiles:IDEWorkbenchMessages.ImportTypeDialog_moveFilesAndDirectories);
+			gridData = new GridData(GridData.FILL_HORIZONTAL);
+			moveButton.setLayoutData(gridData);
+			moveButton.setData(new Integer(IMPORT_MOVE));
+			moveButton.addSelectionListener(listener);
+			moveButton.setFont(parent.getFont());
+		}
+
+		if (hasFlag(IMPORT_LINK) && !linkIsOnlyChoice) {
+			linkButton = new Button(composite, SWT.RADIO);
+			linkButton.setText(hasFlag(IMPORT_FILES_ONLY) ? IDEWorkbenchMessages.ImportTypeDialog_linkFiles:IDEWorkbenchMessages.ImportTypeDialog_createLinks);
+			gridData = new GridData(GridData.FILL_HORIZONTAL);
+			linkButton.setLayoutData(gridData);
+			linkButton.setData(new Integer(IMPORT_LINK));
+			linkButton.addSelectionListener(listener);
+			linkButton.setFont(parent.getFont());
+		}
+
+		if (hasFlag(IMPORT_VIRTUAL_FOLDERS_AND_LINKS) && !hasFlag(IMPORT_FILES_ONLY)) {
+			shadowCopyButton = new Button(composite, SWT.RADIO);
+			shadowCopyButton.setText(IDEWorkbenchMessages.ImportTypeDialog_recreateFilesAndDirectories);
+			gridData = new GridData(GridData.FILL_HORIZONTAL);
+			shadowCopyButton.setLayoutData(gridData);
+			shadowCopyButton.setData(new Integer(IMPORT_VIRTUAL_FOLDERS_AND_LINKS));
+			shadowCopyButton.addSelectionListener(listener);
+			shadowCopyButton.setFont(parent.getFont());
+		}
+
+		if (hasFlag(IMPORT_VIRTUAL_FOLDERS_AND_LINKS | IMPORT_LINK)) {
+			relativePathVariableGroup = new RelativePathVariableGroup(new RelativePathVariableGroup.IModel() {
+				public IResource getResource() {
+					return receivingResource;
+				}
+				public void setVariable(String string) {
+					variable = string;
+				}
+				public String getVariable() {
+					return variable;
+				}
+			});
+			
+			int groupIndent = 0;
+			
+			if (!linkIsOnlyChoice) {
+				Button tmp = new Button(composite, SWT.CHECK);
+				tmp.setText("."); //$NON-NLS-1$
+				groupIndent = tmp.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+				tmp.dispose();
+				
+				Label tmpLabel = new Label(composite, SWT.NONE);
+				tmpLabel.setText("."); //$NON-NLS-1$
+				groupIndent -= tmpLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+				tmpLabel.dispose();
+			}
+			
+			Composite variableGroup = new Composite(composite, 0);
+			gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+			gridData.horizontalIndent = groupIndent;
+			variableGroup.setLayoutData(gridData);
+			variableGroup.setFont(parent.getFont());
+
+			layout = new GridLayout();
+			layout.numColumns = 2;
+			layout.marginWidth= 0;
+			variableGroup.setLayout(layout);
+
+			relativePathVariableGroup.createContents(variableGroup);
+			relativePathVariableGroup.setSelection(variable != null);
+			if (variable != null)
+				relativePathVariableGroup.selectVariable(variable);
+			else
+				relativePathVariableGroup.selectVariable(preferredVariable);
+		}
+		
+		if (linkIsOnlyChoice) {
+			currentSelection = IMPORT_LINK;
+			parent.getShell().setText(IDEWorkbenchMessages.ImportTypeDialog_titleFilesLinking);
+		}
+		createLinkControl(parent);
+		refreshSelection();
+		return composite;
+	}
+
+	private Control createLinkControl(Composite composite) {
+		Link link= new Link(composite, SWT.WRAP | SWT.RIGHT);
+		link.setText(IDEWorkbenchMessages.ImportTypeDialog_configureSettings);
+		link.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				openSettingsPage();
+			}
+		});
+		GridData gridData= new GridData(GridData.FILL, GridData.CENTER, true, false);
+		gridData.horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		link.setLayoutData(gridData);
+		link.setFont(composite.getFont());
+
+		return link;
+	}
+
+	protected void openSettingsPage() {
+		String prefID = LinkedResourcesPreferencePage.PREF_ID;
+		PreferencesUtil.createPreferenceDialogOn(getShell(), prefID, new String[] {prefID}, null).open();
+	}
+
+	protected Control createMessageArea(Composite parent) {
+		Composite composite = new Composite(parent, 0);
+		GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ 		composite.setLayoutData(gridData);
+		composite.setFont(parent.getFont());
+
+		
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginTop= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		composite.setLayout(layout);
+
+		String message = (operationMask & IMPORT_FILES_ONLY) != 0 ? IDEWorkbenchMessages.ImportTypeDialog_questionFilesOnly:
+			IDEWorkbenchMessages.ImportTypeDialog_question;
+
+		// create message
+		if (message != null) {
+			Label messageLabel = new Label(composite, SWT.WRAP);
+			messageLabel.setFont(parent.getFont());
+			messageLabel.setText(message);
+			gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+			messageLabel.setLayoutData(gridData);
+		}
+		return composite;
+	}
+	
+	/**
+	 * @param resources
+	 * 		The list of items that were dragged
+	 * @return true if a set of paths are files only or a mix of files and folders, false otherwise
+	 */
+	private static boolean areOnlyFiles(IResource[] resources) {
+		for (int i = 0; i < resources.length; i++) {
+			if (resources[i].getType() != IResource.FILE)
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * @param names
+	 * 		The list of items that were dragged
+	 * @return true if a set of paths are files only or a mix of files and folders, false otherwise
+	 */
+	private static boolean areOnlyFiles(String[] names) {
+		for (int i = 0; i < names.length; i++) {
+			File file = new File(names[i]);
+			if (file.exists() && !file.isFile())
+				return false;
+		}
+		return true;
+	}
+
+	/**
+	 * Select the most appropriate mode that should be used for the dialog given
+	 * the items dropped on the container, the container type, and the drop operation.
+	 *
+	 * @param dropOperation
+	 * @param resources
+	 * 		The list of items that were dragged
+	 * @param target
+	 * 		The target container onto which the items were dropped
+	 * @return the appropriate import mask given the files dropped on the target
+	 */
+	private static int selectAppropriateMask(int dropOperation, IResource[] resources, IContainer target) {
+		int mask = ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS | ImportTypeDialog.IMPORT_LINK;
+		if (!target.isVirtual() && (dropOperation != DND.DROP_LINK))
+			mask |= ImportTypeDialog.IMPORT_COPY;
+		if (areOnlyFiles(resources))
+			mask |= ImportTypeDialog.IMPORT_FILES_ONLY;
+		return mask;
+	}
+	
+	/**
+	 * Select the most appropriate mode that should be used for the dialog given
+	 * the items dropped on the container, the container type, and the drop operation.
+	 * 
+	 * @param dropOperation
+	 * @param names
+	 * 		The list of items that were dragged
+	 * @param target
+	 * 		The target container onto which the items were dropped
+	 * @return the appropriate import mask given the files dropped on the target
+	 */
+	private static int selectAppropriateMask(int dropOperation, String[] names, IContainer target) {
+		int mask = ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS | ImportTypeDialog.IMPORT_LINK;
+		if (!target.isVirtual() && (dropOperation != DND.DROP_LINK))
+			mask |= ImportTypeDialog.IMPORT_COPY;
+		if (areOnlyFiles(names))
+			mask |= ImportTypeDialog.IMPORT_FILES_ONLY;
+		return mask;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java
index b5a0d19..05c529d 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/PathVariableSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
@@ -62,6 +63,8 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
 
     private PathVariablesGroup pathVariablesGroup;
 
+	private IResource currentResource = null;
+
     private int variableType;
 
     /**
@@ -85,6 +88,7 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
                         updateExtendButtonState();
                     }
                 });
+        pathVariablesGroup.setSaveVariablesOnChange(true);
         setShellStyle(getShellStyle() | SWT.SHEET);
     }
 
@@ -94,15 +98,25 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
      */
     protected void buttonPressed(int buttonId) {
         if (buttonId == EXTEND_ID) {
-            FileFolderSelectionDialog dialog = new FileFolderSelectionDialog(
-                    getShell(), false, variableType);
             PathVariablesGroup.PathVariableElement selection = pathVariablesGroup
                     .getSelection()[0];
-            dialog.setTitle(IDEWorkbenchMessages.PathVariableSelectionDialog_ExtensionDialog_title);
-            dialog.setMessage(NLS.bind(IDEWorkbenchMessages.PathVariableSelectionDialog_ExtensionDialog_description, selection.name));
-            //XXX This only works for variables that refer to local file system locations
+			FileFolderSelectionDialog dialog = new FileFolderSelectionDialog(
+					getShell(), false, variableType);
+			dialog
+					.setTitle(IDEWorkbenchMessages.PathVariableSelectionDialog_ExtensionDialog_title);
+			dialog
+					.setMessage(NLS
+							.bind(
+									IDEWorkbenchMessages.PathVariableSelectionDialog_ExtensionDialog_description,
+									selection.name));
+			// XXX This only works for variables that refer to local file
+			// system locations
+			IPath selectionPath = selection.path;
+			if (currentResource != null)
+				selectionPath = URIUtil.toPath(currentResource.getPathVariableManager()
+						.resolveURI(URIUtil.toURI(selectionPath)));
             try {
-				dialog.setInput(EFS.getStore(URIUtil.toURI(selection.path)));
+					dialog.setInput(EFS.getStore(URIUtil.toURI(selectionPath)));
 			} catch (CoreException e) {
 				ErrorDialog.openError(getShell(), null, null, e.getStatus());
 			}
@@ -188,12 +202,15 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
     private void setExtensionResult(
             PathVariablesGroup.PathVariableElement variable, IFileStore extensionFile) {
         IPath extensionPath = new Path(extensionFile.toString());
-        int matchCount = extensionPath.matchingFirstSegments(variable.path);
+		IPath selectionPath = variable.path;
+		if (currentResource != null)
+			selectionPath = URIUtil.toPath(currentResource.getPathVariableManager().resolveURI(URIUtil.toURI(selectionPath)));
+		int matchCount = extensionPath.matchingFirstSegments(selectionPath);
         IPath resultPath = new Path(variable.name);
 
         extensionPath = extensionPath.removeFirstSegments(matchCount);
         resultPath = resultPath.append(extensionPath);
-        setSelectionResult(new String[] { resultPath.toOSString() });
+		setSelectionResult(new String[] { resultPath.toPortableString() });
     }
 
     /**
@@ -209,8 +226,15 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
 			return;
 		}
         if (selection.length == 1) {
-            IFileInfo info = IDEResourceInfoUtils.getFileInfo(selection[0].path);
-            if (info.exists() && info.isDirectory()) {
+			IPath selectionPath = selection[0].path;
+			if (currentResource != null)
+				selectionPath = URIUtil.toPath(currentResource.getPathVariableManager().resolveURI(URIUtil.toURI(selectionPath)));
+			IFileInfo info = IDEResourceInfoUtils.getFileInfo(selectionPath);
+//			IPathVariable pathVariable = null;
+//			if (currentResource != null)
+//				pathVariable = currentResource.getPathVariableManager().getPathVariable(selection[0].name);
+			if (info.exists() && info.isDirectory()
+					/*|| (pathVariable != null && pathVariable.getExtensions() != null)*/) {
 				extendButton.setEnabled(true);
 			} else {
 				extendButton.setEnabled(false);
@@ -221,4 +245,14 @@ public final class PathVariableSelectionDialog extends SelectionDialog {
 		}
     }
 
+	/**
+	 * Sets the resource for which the path variable is being edited.
+	 * 
+	 * @param resource
+	 * @since 3.6
+	 */
+	public void setResource(IResource resource) {
+		currentResource = resource;
+		pathVariablesGroup.setResource(resource);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
index d426a98..e17e6b7 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/ResourceEncodingFieldEditor.java
@@ -266,7 +266,6 @@ public final class ResourceEncodingFieldEditor extends
 		}
 
 		String defaultCharset = getCharsetFromDescription();
-		defaultCharset = getCharsetFromDescription();
 
 		if (defaultCharset != null && defaultCharset.length() > 0) {
 			return defaultCharset;
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/UIResourceFilterDescription.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/UIResourceFilterDescription.java
new file mode 100644
index 0000000..496602d
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/dialogs/UIResourceFilterDescription.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor)- initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.ide.dialogs;
+
+import org.eclipse.core.resources.FileInfoMatcherDescription;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceFilterDescription;
+import org.eclipse.core.runtime.IPath;
+
+/**
+ * @since 3.6
+ */
+public abstract class UIResourceFilterDescription {
+	/**
+	 * @return the filter path
+	 */
+	abstract public IPath getPath();
+	/**
+	 * @return the project
+	 */
+	abstract public IProject getProject();
+	/**
+	 * @return the filter type
+	 */
+	abstract public int getType();
+	/**
+	 * @return the description
+	 */
+	abstract public FileInfoMatcherDescription getFileInfoMatcherDescription();
+	
+	/**
+	 * @param iResourceFilterDescription
+	 * @return a UIResourceFilterDescription
+	 */
+	public static UIResourceFilterDescription wrap(
+			final IResourceFilterDescription iResourceFilterDescription) {
+		return new UIResourceFilterDescription() {
+			public FileInfoMatcherDescription getFileInfoMatcherDescription() {
+				return iResourceFilterDescription.getFileInfoMatcherDescription();
+			}
+			public IPath getPath() {
+				return iResourceFilterDescription.getResource().getProjectRelativePath();
+			}
+	
+			public IProject getProject() {
+				return iResourceFilterDescription.getResource().getProject();
+			}
+	
+			public int getType() {
+				return iResourceFilterDescription.getType();
+			}
+		};
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java
index 75806e6..4c7814c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,6 +39,12 @@ abstract class AbstractCopyOrMoveResourcesOperation extends
 	// Used when all resources are going to the same container (no name changes)
 	protected IPath destination = null;
 
+	protected boolean fCreateGroups = false;
+
+	protected boolean fCreateLinks = false;
+
+	protected String fRelativeToVariable = null;
+
 	/**
 	 * Create an AbstractCopyOrMoveResourcesOperation that moves or copies all
 	 * of the specified resources to the specified paths. The destination paths
@@ -256,4 +262,16 @@ abstract class AbstractCopyOrMoveResourcesOperation extends
 		}
 		return status;
 	}
+
+	public void setCreateVirtualFolders(boolean value) {
+		fCreateGroups = value;
+	}
+
+	public void setCreateLinks(boolean value) {
+		fCreateLinks = value;
+	}
+
+	public void setRelativeVariable(String value) {
+		fRelativeToVariable = value;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java
index 813e0ef..c93407c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -325,7 +325,8 @@ abstract class AbstractResourcesOperation extends AbstractWorkspaceOperation {
 			IResource subResource = targetResources[i];
 			for (int j = 0; j < targetResources.length; j++) {
 				IResource superResource = targetResources[j];
-				if (isDescendantOf(subResource, superResource))
+				if (isDescendantOf(subResource, superResource)
+						&& !subResources.contains(subResource))
 					subResources.add(subResource);
 			}
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java
index 8e7a7fd..b13bfd5 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractWorkspaceOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,11 +45,11 @@ import org.eclipse.ui.internal.ide.undo.UndoMessages;
  * when there are possible side effects of operations, building execution
  * exceptions from core exceptions, etc. Clients may call the public API from a
  * background thread.
- * 
+ * <p>
  * This class is not intended to be subclassed by clients.
- * 
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public abstract class AbstractWorkspaceOperation extends AbstractOperation
 		implements IAdvancedUndoableOperation, IAdvancedUndoableOperation2 {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyProjectOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyProjectOperation.java
index cf863e6..2555c61 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyProjectOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyProjectOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,11 +36,13 @@ import org.eclipse.ui.internal.ide.undo.UndoMessages;
  * project, also specifying the location of its contents. Clients may call the
  * public API from a background thread.
  * 
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
+ * </p>
  * 
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class CopyProjectOperation extends AbstractCopyOrMoveResourcesOperation {
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java
index 27867dd..88e7b18 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CopyResourcesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,18 +29,22 @@ import org.eclipse.ui.internal.ide.undo.UndoMessages;
  * more resources in the workspace. Clients may call the public API from a
  * background thread.
  * 
+ * <p>
  * This operation can track any overwritten resources and restore them when the
  * copy is undone. It is up to clients to determine whether overwrites are
  * allowed. If a resource should not be overwritten, it should not be included
  * in this operation. In addition to checking for overwrites, the target
  * location for the copy is assumed to have already been validated by the
  * client. It will not be revalidated on undo and redo.
+ * </p>
  * 
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
+ * </p>
  * 
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class CopyResourcesOperation extends
 		AbstractCopyOrMoveResourcesOperation {
@@ -154,7 +158,8 @@ public class CopyResourcesOperation extends
 					new IResource[] { resources[i] }, getDestinationPath(
 							resources[i], i), resourcesAtDestination,
 					new SubProgressMonitor(monitor, 1000 / resources.length),
-					uiInfo, true);
+					uiInfo, true, fCreateGroups, fCreateLinks,
+					fRelativeToVariable);
 			// Accumulate the overwrites into the full list
 			for (int j = 0; j < overwrites.length; j++) {
 				overwrittenResources.add(overwrites[j]);
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFileOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFileOperation.java
index 78e4e2b..a35f6db 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFileOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFileOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,14 +32,15 @@ import org.eclipse.ui.internal.ide.undo.IFileContentDescription;
  * exist.  The file should not already exist, and the existence of the 
  * containment path should not be changed between the time this operation 
  * is created and the time it is executed.
- * 
+ * <p>
  * Clients may call the public API from a background thread.
- * 
+ * </p>
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
- * 
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class CreateFileOperation extends AbstractCreateResourcesOperation {
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFolderOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFolderOperation.java
index 89dc3ec..5c6368a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFolderOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateFolderOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.ui.ide.undo;
 import java.net.URI;
 
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.ui.ide.dialogs.UIResourceFilterDescription;
 import org.eclipse.ui.internal.ide.undo.ContainerDescription;
 
 /**
@@ -25,14 +26,15 @@ import org.eclipse.ui.internal.ide.undo.ContainerDescription;
  * does not exist.  The folder should not already exist, and the existence 
  * of the containment path should not be changed between the time this operation
  * is created and the time it is executed.
- * 
+ * <p>
  * Clients may call the public API from a background thread.
- * 
+ * </p>
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
- * 
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class CreateFolderOperation extends AbstractCreateResourcesOperation {
 
@@ -46,14 +48,39 @@ public class CreateFolderOperation extends AbstractCreateResourcesOperation {
 	 * @param label
 	 *            the label of the operation
 	 */
+
 	public CreateFolderOperation(IFolder folderHandle, URI linkLocation,
 			String label) {
+		this(folderHandle, linkLocation, false, null, label);
+	}
+
+	/**
+	 * Create a CreateFolderOperation
+	 * 
+	 * @param folderHandle
+	 *            the folder to be created
+	 * @param linkLocation
+	 *            the location of the folder if it is to be linked
+	 * @param virtual
+	 *            Create a virtual folder
+	 * @param filterList
+	 *            The filters to apply to the created folder
+	 * @param label
+	 *            the label of the operation
+	 * @since 3.6
+	 */
+	public CreateFolderOperation(IFolder folderHandle, URI linkLocation,
+			boolean virtual,
+			UIResourceFilterDescription[] filterList, String label) {
 		super(null, label);
-		ContainerDescription containerDescription = ContainerDescription
-				.fromContainer(folderHandle);
+		ContainerDescription containerDescription = virtual? ContainerDescription
+				.fromVirtualFolderContainer(folderHandle):
+				ContainerDescription.fromContainer(folderHandle);
 		if (linkLocation != null) {
 			containerDescription.getFirstLeafFolder().setLocation(linkLocation);
 		}
+		if (filterList != null)
+			containerDescription.getFirstLeafFolder().setFilters(filterList);
 		setResourceDescriptions(new ResourceDescription[] { containerDescription });
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateProjectOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateProjectOperation.java
index b25aaf1..1713427 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateProjectOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/CreateProjectOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,12 +18,12 @@ import org.eclipse.ui.internal.ide.undo.ProjectDescription;
  * A CreateProjectOperation represents an undoable operation for creating a
  * project in the workspace. Clients may call the public API from a background
  * thread.
- * 
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
- * 
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class CreateProjectOperation extends AbstractCreateResourcesOperation {
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java
index bd2a202..b293717 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/DeleteResourcesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,12 +26,12 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
  * A DeleteResourcesOperation represents an undoable operation for deleting one
  * or more resources in the workspace. Clients may call the public API from a
  * background thread.
- * 
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
- * 
+ * </p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
- * 
  */
 public class DeleteResourcesOperation extends AbstractResourcesOperation {
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveProjectOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveProjectOperation.java
index 03fb564..af98c0d 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveProjectOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveProjectOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,10 +31,12 @@ import org.eclipse.ui.internal.ide.undo.UndoMessages;
  * A MoveProjectOperation represents an undoable operation for moving a
  * project's content to a different location. Clients may call the public API
  * from a background thread.
- * 
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
+ * </p>
  * 
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
  * 
  */
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java
index 36a10a6..c4aa0a8 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/MoveResourcesOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,17 +28,19 @@ import org.eclipse.ui.internal.ide.undo.UndoMessages;
  * A MoveResourcesOperation represents an undoable operation for moving one or
  * more resources in the workspace. Clients may call the public API from a
  * background thread.
- * 
+ * <p>
  * This operation can track any overwritten resources and restore them when the
  * move is undone. It is up to clients to determine whether overwrites are
  * allowed. If a resource should not be overwritten, it should not be included
  * in this operation. In addition to checking for overwrites, the target
  * location for the move is assumed to have already been validated by the
  * client. It will not be revalidated on undo and redo.
- * 
+ * </p>
+ * <p>
  * This class is intended to be instantiated and used by clients. It is not
  * intended to be subclassed by clients.
- * 
+ * <p>
+ * @noextend This class is not intended to be subclassed by clients.
  * @since 3.3
  * 
  */
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/ResourceDescription.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/ResourceDescription.java
index 4c54366..b3cbc2b 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/ResourceDescription.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/ResourceDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ public abstract class ResourceDescription {
 		if (resource.getType() == IResource.PROJECT) {
 			return new ProjectDescription((IProject) resource);
 		} else if (resource.getType() == IResource.FOLDER) {
-			return new FolderDescription((IFolder) resource);
+			return new FolderDescription((IFolder) resource, resource.isVirtual());
 		} else if (resource.getType() == IResource.FILE) {
 			return new FileDescription((IFile) resource);
 		} else {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
index 557b3c6..b0e1f88 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,17 @@
 
 package org.eclipse.ui.ide.undo;
 
+import java.net.URI;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.core.commands.operations.IUndoContext;
 import org.eclipse.core.commands.operations.ObjectUndoContext;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IResourceStatus;
@@ -247,6 +251,59 @@ public class WorkspaceUndoUtil {
 	static ResourceDescription[] copy(IResource[] resources, IPath destination,
 			List resourcesAtDestination, IProgressMonitor monitor,
 			IAdaptable uiInfo, boolean pathIncludesName) throws CoreException {
+		return copy(resources, destination, resourcesAtDestination, monitor,
+				uiInfo, pathIncludesName, false, false, null);
+	}
+
+	/**
+	 * Copies the resources to the given destination. This method can be called
+	 * recursively to merge folders during folder copy.
+	 *
+	 * @param resources
+	 *            the resources to be copied
+	 * @param destination
+	 *            the destination path for the resources, relative to the
+	 *            workspace
+	 * @param resourcesAtDestination
+	 *            A list used to record the new copies.
+	 * @param monitor
+	 *            the progress monitor used to show progress
+	 * @param uiInfo
+	 *            the IAdaptable (or <code>null</code>) provided by the
+	 *            caller in order to supply UI information for prompting the
+	 *            user if necessary. When this parameter is not
+	 *            <code>null</code>, it contains an adapter for the
+	 *            org.eclipse.swt.widgets.Shell.class
+	 * @param pathIncludesName
+	 *            a boolean that indicates whether the specified path includes
+	 *            the resource's name at the destination. If this value is
+	 *            <code>true</code>, the destination will contain the desired
+	 *            name of the resource (usually only desired when only one
+	 *            resource is being copied). If this value is <code>false</code>,
+	 *            each resource's name will be appended to the destination.
+	 * @param createVirtual
+	 *            a boolean that indicates whether virtual folders should be
+	 *            created instead of folders when a hierarchy of files is
+	 *            copied.
+	 * @param createLinks
+	 *            a boolean that indicates whether linked resources should be
+	 *            created instead of files and folders (if createGroups is
+	 *            false) when copied.
+	 * @param relativeToVariable
+	 *            a String that indicates relative to which variable linked
+	 *            resources should be created, if createLinks is set to true.
+	 *            Absolute linked resources will be created if null is passed
+	 *            otherwise (and createLinks is set to true).
+	 * @return an array of ResourceDescriptions describing any resources that
+	 *         were overwritten by the copy operation
+	 * @throws CoreException
+	 *             propagates any CoreExceptions thrown from the resources API
+	 */
+	static ResourceDescription[] copy(IResource[] resources, IPath destination,
+			List resourcesAtDestination, IProgressMonitor monitor,
+			IAdaptable uiInfo, boolean pathIncludesName, boolean createVirtual,
+			boolean createLinks, String relativeToVariable)
+			throws CoreException {
 
 		monitor.beginTask("", resources.length); //$NON-NLS-1$
 		monitor
@@ -265,11 +322,15 @@ public class WorkspaceUndoUtil {
 			if (source.getType() == IResource.FOLDER && existing != null) {
 				// The resource is a folder and it exists in the destination.
 				// Copy its children to the existing destination.
-				if (source.isLinked() == existing.isLinked()) {
+				if ((source.isLinked() && existing.isLinked())
+						|| (source.isVirtual() && existing.isVirtual())
+						|| (!source.isLinked() && !existing.isLinked()
+								&& !source.isVirtual() && !existing.isVirtual())) {
 					IResource[] children = ((IContainer) source).members();
 					ResourceDescription[] overwritten = copy(children,
 							destinationPath, resourcesAtDestination,
-							new SubProgressMonitor(monitor, 1), uiInfo, false);
+							new SubProgressMonitor(monitor, 1), uiInfo, false,
+							createVirtual, createLinks, relativeToVariable);
 					// We don't record the copy since this recursive call will
 					// do so. Just record the overwrites.
 					for (int j = 0; j < overwritten.length; j++) {
@@ -281,8 +342,31 @@ public class WorkspaceUndoUtil {
 					ResourceDescription[] deleted = delete(
 							new IResource[] { existing },
 							new SubProgressMonitor(monitor, 0), uiInfo, false);
-					source.copy(destinationPath, IResource.SHALLOW,
-							new SubProgressMonitor(monitor, 1));
+					if ((createLinks || createVirtual)
+							&& (source.isLinked() == false)
+							&& (source.isVirtual() == false)) {
+						IFolder folder = workspaceRoot.getFolder(destinationPath);
+						if (createVirtual) {
+							folder.create(IResource.VIRTUAL, true,
+									new SubProgressMonitor(monitor, 1));
+							IResource[] members = ((IContainer) source)
+									.members();
+							if (members.length > 0) {
+								overwrittenResources.addAll(Arrays.asList(copy(
+										members, destinationPath,
+										resourcesAtDestination,
+										new SubProgressMonitor(monitor, 1),
+										uiInfo, false, createVirtual,
+										createLinks, relativeToVariable)));
+
+							}
+						} else
+							folder.createLink(createRelativePath(source
+									.getLocationURI(), relativeToVariable, folder), 0,
+									new SubProgressMonitor(monitor, 1));
+					} else
+						source.copy(destinationPath, IResource.SHALLOW,
+								new SubProgressMonitor(monitor, 1));
 					// Record the copy
 					resourcesAtDestination.add(getWorkspace().getRoot()
 							.findMember(destinationPath));
@@ -292,29 +376,77 @@ public class WorkspaceUndoUtil {
 				}
 			} else {
 				if (existing != null) {
-					if (source.isLinked() == existing.isLinked()) {
-						overwrittenResources.add(copyOverExistingResource(
-								source, existing, new SubProgressMonitor(
-										monitor, 1), uiInfo, false));
-						// Record the "copy"
-						resourcesAtDestination.add(existing);
-					} else {
-						// Copying a linked resource over unlinked or vice
-						// versa. Can't use setContents here. Fixes bug 28772.
+					// source is a FILE and destination EXISTS
+					if ((createLinks || createVirtual)
+							&& (source.isLinked() == false)) {
+						// we create a linked file, and overwrite the
+						// destination
 						ResourceDescription[] deleted = delete(
 								new IResource[] { existing },
 								new SubProgressMonitor(monitor, 0), uiInfo,
 								false);
-						source.copy(destinationPath, IResource.SHALLOW,
-								new SubProgressMonitor(monitor, 1));
-						// Record the copy
+						if (source.getType() == IResource.FILE) {
+							IFile file = workspaceRoot.getFile(destinationPath);
+							file.createLink(createRelativePath(
+									source.getLocationURI(), relativeToVariable, file), 0,
+									new SubProgressMonitor(monitor, 1));
+						} else {
+							IFolder folder = workspaceRoot
+									.getFolder(destinationPath);
+							if (createVirtual) {
+								folder.create(IResource.VIRTUAL, true,
+										new SubProgressMonitor(monitor, 1));
+								IResource[] members = ((IContainer) source)
+										.members();
+								if (members.length > 0) {
+									overwrittenResources.addAll(Arrays
+											.asList(copy(members,
+													destinationPath,
+													resourcesAtDestination,
+													new SubProgressMonitor(
+															monitor, 1),
+													uiInfo, false,
+													createVirtual, createLinks,
+													relativeToVariable)));
+
+								}
+							} else
+								folder.createLink(createRelativePath(
+										source.getLocationURI(), relativeToVariable, folder),
+										0, new SubProgressMonitor(monitor, 1));
+						}
 						resourcesAtDestination.add(getWorkspace().getRoot()
 								.findMember(destinationPath));
 						for (int j = 0; j < deleted.length; j++) {
 							overwrittenResources.add(deleted[j]);
 						}
+					} else {
+						if (source.isLinked() == existing.isLinked()) {
+							overwrittenResources.add(copyOverExistingResource(
+									source, existing, new SubProgressMonitor(
+											monitor, 1), uiInfo, false));
+							// Record the "copy"
+							resourcesAtDestination.add(existing);
+						} else {
+							// Copying a linked resource over unlinked or vice
+							// versa. Can't use setContents here. Fixes bug
+							// 28772.
+							ResourceDescription[] deleted = delete(
+									new IResource[] { existing },
+									new SubProgressMonitor(monitor, 0), uiInfo,
+									false);
+							source.copy(destinationPath, IResource.SHALLOW,
+									new SubProgressMonitor(monitor, 1));
+							// Record the copy
+							resourcesAtDestination.add(getWorkspace().getRoot()
+									.findMember(destinationPath));
+							for (int j = 0; j < deleted.length; j++) {
+								overwrittenResources.add(deleted[j]);
+							}
+						}
 					}
 				} else {
+					// source is a FILE or FOLDER
 					// no resources are being overwritten
 					// ensure the destination path exists
 					IPath parentPath = destination;
@@ -322,8 +454,39 @@ public class WorkspaceUndoUtil {
 						parentPath = destination.removeLastSegments(1);
 					}
 					IContainer generatedParent = generateContainers(parentPath);
-					source.copy(destinationPath, IResource.SHALLOW,
-							new SubProgressMonitor(monitor, 1));
+					if ((createLinks || createVirtual)
+							&& (source.isLinked() == false)) {
+						if (source.getType() == IResource.FILE) {
+							IFile file = workspaceRoot.getFile(destinationPath);
+							file.createLink(createRelativePath(
+									source.getLocationURI(), relativeToVariable, file), 0,
+									new SubProgressMonitor(monitor, 1));
+						} else {
+							IFolder folder = workspaceRoot
+									.getFolder(destinationPath);
+							if (createVirtual) {
+								folder.create(IResource.VIRTUAL, true,
+										new SubProgressMonitor(monitor, 1));
+								IResource[] members = ((IContainer) source).members();
+								if (members.length > 0) {
+									overwrittenResources.addAll(Arrays
+											.asList(copy(members,
+													destinationPath,
+													resourcesAtDestination,
+													new SubProgressMonitor(
+															monitor, 1),
+													uiInfo, false,
+													createVirtual, createLinks,
+													relativeToVariable)));
+
+								}
+							} else
+								folder.createLink(createRelativePath(source.getLocationURI(), relativeToVariable, folder),
+										0, new SubProgressMonitor(monitor, 1));
+						}
+					} else
+						source.copy(destinationPath, IResource.SHALLOW,
+								new SubProgressMonitor(monitor, 1));
 					// Record the copy. If we had to generate a parent
 					// folder, that should be recorded as part of the copy
 					if (generatedParent == null) {
@@ -342,7 +505,29 @@ public class WorkspaceUndoUtil {
 		monitor.done();
 		return (ResourceDescription[]) overwrittenResources
 				.toArray(new ResourceDescription[overwrittenResources.size()]);
+	}
 
+	/**
+	 * Transform an absolute path URI to a relative path one (i.e. from
+	 * "C:\foo\bar\file.txt" to "VAR\file.txt" granted that the relativeVariable
+	 * is "VAR" and points to "C:\foo\bar\").
+	 *
+	 * @param locationURI
+	 * @param pvm the IPathVariableManager to use for resolving variables
+	 * @param resource 
+	 * @return an URI that was made relative to a variable
+	 */
+	static private URI createRelativePath(URI locationURI, String relativeVariable, IResource resource) {
+		if (relativeVariable == null)
+			return locationURI;
+		IPath location = URIUtil.toPath(locationURI);
+		IPath result;
+		try {
+			result = URIUtil.toPath(resource.getPathVariableManager().convertToRelative(URIUtil.toURI(location), true, relativeVariable));
+		} catch (CoreException e) {
+			return locationURI;
+		}
+		return URIUtil.toURI(result);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
index 9c8fe2a..10b4aaf 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ContentTypeDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IDecoration;
 import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -42,10 +43,13 @@ public class ContentTypeDecorator implements ILightweightLabelDecorator {
 		ImageDescriptor image = null;
 		IContentDescription contentDescription = null;
 		try {
+			Job.getJobManager().beginRule(file, null);
 			contentDescription = file.getContentDescription();
 		} catch (CoreException e) {
 			// We already have some kind of icon for this file so it's OK to not
 			// find a better icon.
+		} finally {
+			Job.getJobManager().endRule(file);
 		}
 		if (contentDescription != null) {
 			IContentType contentType = contentDescription.getContentType();
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalPreferences.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalPreferences.java
index 8041088..479d2b5 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalPreferences.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEInternalPreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
+ *     Markus Schorn (Wind River Systems) -  bug 284447
  *******************************************************************************/
 
 package org.eclipse.ui.internal.ide;
@@ -42,6 +44,11 @@ public interface IDEInternalPreferences {
      * (String) Whether to open required projects when opening a project.
      */ 
     public static final String OPEN_REQUIRED_PROJECTS = "OPEN_REQUIRED_PROJECTS"; //$NON-NLS-1$
+    
+    /**
+     * (String) Whether to confirm closing unrelated projects.
+     */ 
+    public static final String CLOSE_UNRELATED_PROJECTS = "CLOSE_UNRELATED_PROJECTS"; //$NON-NLS-1$
 
     public static final String PSPM_PROMPT = MessageDialogWithToggle.PROMPT;
 
@@ -85,4 +92,31 @@ public interface IDEInternalPreferences {
    	//Value of marker limits
     public static final String MARKER_LIMITS_VALUE = "MARKER_LIMITS_VALUE"; //$NON-NLS-1$
 
+    // Type of import
+    public static final String IMPORT_FILES_AND_FOLDERS_TYPE = "IMPORT_FILES_AND_FOLDERS_TYPE"; //$NON-NLS-1$
+    
+    // (boolean) Using variable relative paths for the import file and folder dialog
+    public static final String IMPORT_FILES_AND_FOLDERS_RELATIVE = "IMPORT_FILES_AND_FOLDERS_RELATIVE"; //$NON-NLS-1$
+
+    // (string) Save all dirty editors before running a full or incremental build 
+    public static final String IMPORT_FILES_AND_FOLDERS_MODE = "IMPORT_FILES_AND_FOLDERS_MODE"; //$NON-NLS-1$
+
+    // (string) Save all dirty editors before running a full or incremental build 
+    public static final String IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE = "IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE"; //$NON-NLS-1$
+
+    public static final String IMPORT_FILES_AND_FOLDERS_MODE_PROMPT = MessageDialogWithToggle.PROMPT;
+
+    public static final String IMPORT_FILES_AND_FOLDERS_MODE_MOVE_COPY = "MOVE_COPY"; //$NON-NLS-1$
+
+    public static final String IMPORT_FILES_AND_FOLDERS_MODE_LINK = "LINK"; //$NON-NLS-1$
+    
+    public static final String IMPORT_FILES_AND_FOLDERS_MODE_LINK_AND_VIRTUAL_FOLDER = "LINK_AND_VIRTUAL_FOLDER"; //$NON-NLS-1$
+
+    // Always show this import window
+    public static final String IMPORT_FILES_AND_FOLDERS_SHOW_DIALOG = "IMPORT_FILES_AND_FOLDERS_SHOW_DIALOG"; //$NON-NLS-1$
+
+    /**
+     * Workspace name, will be displayed in the window title.
+     */
+	public static final String WORKSPACE_NAME = "WORKSPACE_NAME"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java
index 7719b3f..279d539 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
  *******************************************************************************/
 package org.eclipse.ui.internal.ide;
 
@@ -56,6 +57,7 @@ public class IDEPreferenceInitializer extends AbstractPreferenceInitializer {
 				IDEInternalPreferences.PSPM_PROMPT);
 		node.put(IDEInternalPreferences.OPEN_REQUIRED_PROJECTS,
 				IDEInternalPreferences.PSPM_PROMPT);
+		node.putBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, false);
 
 		// Turning some Help Menu separators on
 		node.putBoolean(getHelpSeparatorKey("group.main"), true); //$NON-NLS-1$
@@ -75,10 +77,16 @@ public class IDEPreferenceInitializer extends AbstractPreferenceInitializer {
 		node.putBoolean(IDEInternalPreferences.USE_MARKER_LIMITS, true);
 		node.putInt(IDEInternalPreferences.MARKER_LIMITS_VALUE, 100);
 		
+		node.put(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_TYPE, ""); //$NON-NLS-1$
+		node.putBoolean(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_RELATIVE, true);
+
 		//Filter migration
 		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_BOOKMARK_FILTERS, false);
 		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_TASK_FILTERS, false);
 		node.putBoolean(MarkerSupportInternalUtilities.MIGRATE_PROBLEM_FILTERS, false);
+		
+		node.put(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE, IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT);
+		node.put(IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE, IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT);
 	}
 
 	private String getHelpSeparatorKey(String groupId) {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
index b00e28d..c9ca7a8 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,9 @@
  * Benjamin Muskalla - bug 29633
  * Oakland Software Incorporated (Francis Upton) <francisu at ieee.org>
  *		- Bug 224997 [Workbench] Impossible to copy project
+ * Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
+ * Serge Beauchamp (Freescale Semiconductor) - [252996] Resource filters
+ *     Markus Schorn (Wind River Systems) -  bug 284447
  *******************************************************************************/
 package org.eclipse.ui.internal.ide;
 
@@ -23,7 +26,7 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String IDEWorkbenchAdvisor_cancelHistoryPruning;
 	public static String IDEWorkbenchAdvisor_preHistoryCompaction;
 	public static String IDEWorkbenchAdvisor_postHistoryCompaction;
-	
+
 	public static String IDE_noFileEditorFound;
 	public static String IDE_coreExceptionFileStore;
 
@@ -47,14 +50,69 @@ public class IDEWorkbenchMessages extends NLS {
 
 	public static String ResourceInfoPage_noResource;
 
-
+	public static String ResourceFilterPage_title;
+	public static String ResourceFilterPage_noResource;
+	public static String ResourceFilterPage_addButtonLabel;
+	public static String ResourceFilterPage_addGroupButtonLabel;
+	public static String ResourceFilterPage_editButtonLabel;
+	public static String ResourceFilterPage_removeButtonLabel;
+	public static String ResourceFilterPage_columnFilterMode;
+	public static String ResourceFilterPage_columnFilterDescription;
+	public static String ResourceFilterPage_columnFilterTarget;
+	public static String ResourceFilterPage_columnFilterPattern;
+	public static String ResourceFilterPage_applyRecursivelyToFolderStructure;
+	public static String ResourceFilterPage_recursive;
+	public static String ResourceFilterPage_details;
+	public static String ResourceFilterPage_caseSensitive;
+	public static String ResourceFilterPage_regularExpression;
+	public static String ResourceFilterPage_multiMatcher_Matcher;
+	public static String ResourceFilterPage_multiMatcher_FileLength;
+	public static String ResourceFilterPage_multiMatcher_TimeInterval;
+	public static String ResourceFilterPage_multiMatcher_InvalidFileLength;
+	public static String ResourceFilterPage_multiMatcher_InvalidTimeInterval;
+	public static String ResourceFilterPage_includeOnly;
+	public static String ResourceFilterPage_excludeAll;
+	public static String ResourceFilterPage_includeOnlyColumn;
+	public static String ResourceFilterPage_excludeAllColumn;
+	public static String ResourceFilterPage_filesAndFolders;
+	public static String ResourceFilterPage_files;
+	public static String ResourceFilterPage_folders;
+	public static String ResourceFilterPage_editFilterDialogTitle;
+	public static String ResourceFilterPage_newFilterDialogTitleFolder;
+	public static String ResourceFilterPage_newFilterDialogTitleProject;
+	public static String ResourceFilterPage_addSubFilterActionLabel;
+	public static String ResourceFilterPage_addSubFilterGroupActionLabel;
+	public static String ResourceFilterPage_removeFilterActionLabel;
+	public static String ResourceFilterPage_editFilterActionLabel;
+	public static String ResourceFilterPage_multiKeyName;
+	public static String ResourceFilterPage_multiKeyProjectRelativePath;
+	public static String ResourceFilterPage_multiKeyLocation;
+	public static String ResourceFilterPage_multiKeyLastModified;
+	public static String ResourceFilterPage_multiKeyCreated;
+	public static String ResourceFilterPage_multiKeyLength;
+	public static String ResourceFilterPage_multiKeyReadOnly;
+	public static String ResourceFilterPage_multiKeySymLink;
+	public static String ResourceFilterPage_multiEquals;
+	public static String ResourceFilterPage_multiMatches;
+	public static String ResourceFilterPage_multiLargerThan;
+	public static String ResourceFilterPage_multiSmallerThan;
+	public static String ResourceFilterPage_multiBefore;
+	public static String ResourceFilterPage_multiAfter;
+	public static String ResourceFilterPage_multiWithin;
+	public static String ResourceFilterPage_true;
+	public static String ResourceFilterPage_false;
+	
 	//
 	//
 	// Copies from org.eclipse.ui.workbench
 	//
 	public static String showAdvanced;
 	public static String hideAdvanced;
-
+	public static String editfilters;
+	public static String useDefaultLocation;
+	public static String createLinkedFolder;
+	public static String createVirtualFolder;
+	
 	// ==============================================================================
 	// Workbench Actions
 	// ==============================================================================
@@ -259,6 +317,10 @@ public class IDEWorkbenchMessages extends NLS {
 
 	public static String CloseUnrelatedProjectsAction_text;
 	public static String CloseUnrelatedProjectsAction_toolTip;
+	public static String CloseUnrelatedProjectsAction_confirmMsg1;
+	public static String CloseUnrelatedProjectsAction_confirmMsgN;
+	public static String CloseUnrelatedProjectsAction_AlwaysClose;
+	public static String CloseUnrelatedProjectsAction_AlwaysCloseWithoutPrompt;
 
 	public static String BuildAction_text;
 	public static String BuildAction_toolTip;
@@ -317,6 +379,7 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String CopyFilesAndFoldersOperation_CopyResourcesTask;
 	public static String CopyFilesAndFoldersOperation_parentNotEqual;
 	public static String CopyFilesAndFoldersOperation_infoNotFound;
+	public static String CopyFilesAndFoldersOperation_sourceCannotBeCopiedIntoAVirtualFolder;
 	public static String CopyFilesAndFoldersOperation_copyTitle;
 	public static String CopyFilesAndFoldersOperation_moveTitle;
 
@@ -388,8 +451,11 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String WizardNewFolderCreationPage_progress;
 	public static String WizardNewFolderCreationPage_errorTitle;
 	public static String WizardNewFolderCreationPage_internalErrorTitle;
+	public static String WizardNewFolderCreationPage_resourceWillBeFilteredWarning;
 	public static String WizardNewFolderCreationPage_title;
 	public static String WizardNewFolder_internalError;
+	public static String WizardNewFolderCreationPage_createLinkLocationTitle;
+	public static String WizardNewFolderCreationPage_createLinkLocationQuestion;
 
 	// --- New File ---
 	public static String WizardNewFileCreationPage_progress;
@@ -399,6 +465,9 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String WizardNewFileCreationPage_internalErrorTitle;
 	public static String WizardNewFileCreationPage_internalErrorMessage;
 	public static String WizardNewFileCreationPage_title;
+	public static String WizardNewFileCreationPage_resourceWillBeFilteredWarning;
+	public static String WizardNewFileCreationPage_createLinkLocationTitle;
+	public static String WizardNewFileCreationPage_createLinkLocationQuestion;
 
 
 	// --- Linked Resource ---
@@ -439,40 +508,59 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String IDEWorkspacePreference_otherLineDelim;
 	public static String IDEWorkspacePreference_relatedLink;
 	public static String IDEWorkspacePreference_openReferencedProjects;
+	public static String IDEWorkspacePreference_closeUnrelatedProjectsToolTip;
+	public static String IDEWorkspacePreference_workspaceName;
 
 	// --- Linked Resources ---
 	public static String LinkedResourcesPreference_explanation;
 	public static String LinkedResourcesPreference_enableLinkedResources;
 	public static String LinkedResourcesPreference_linkedResourcesWarningTitle;
 	public static String LinkedResourcesPreference_linkedResourcesWarningMessage;
+	public static String LinkedResourcesPreference_dragAndDropHandlingMessage;
+	public static String LinkedResourcesPreference_dragAndDropVirtualFolderHandlingMessage;
+	public static String LinkedResourcesPreference_link;
+	public static String linkedResourcesPreference_copy;
+	public static String LinkedResourcesPreference_promptVirtual;
+	public static String LinkedResourcesPreference_linkAndVirtualFolder;
+	public static String LinkedResourcesPreference_linkVirtual;
+	public static String linkedResourcesPreference_copyVirtual;
+	public static String LinkedResourcesPreference_linkAndVirtualFolderVirtual;
 
 	// The following six keys are marked as unused by the NLS search, but they are indirectly used
 	// and should be removed.
 	public static String PathVariableDialog_shellTitle_newVariable;
 	public static String PathVariableDialog_shellTitle_existingVariable;
+	public static String PathVariableDialog_shellTitle_editLocation;
 	public static String PathVariableDialog_dialogTitle_newVariable;
 	public static String PathVariableDialog_dialogTitle_existingVariable;
+	public static String PathVariableDialog_dialogTitle_editLinkLocation;
 	public static String PathVariableDialog_message_newVariable;
 	public static String PathVariableDialog_message_existingVariable;
+	public static String PathVariableDialog_message_editLocation;
 
 	public static String PathVariableDialog_variableName;
 	public static String PathVariableDialog_variableValue;
+	public static String PathVariableDialog_variableResolvedValue;
 	public static String PathVariableDialog_variableNameEmptyMessage;
 	public static String PathVariableDialog_variableValueEmptyMessage;
 	public static String PathVariableDialog_variableValueInvalidMessage;
 	public static String PathVariableDialog_file;
 	public static String PathVariableDialog_folder;
+	public static String PathVariableDialog_variable;
 	public static String PathVariableDialog_selectFileTitle;
 	public static String PathVariableDialog_selectFolderTitle;
 	public static String PathVariableDialog_selectFolderMessage;
 	public static String PathVariableDialog_variableAlreadyExistsMessage;
 	public static String PathVariableDialog_pathIsRelativeMessage;
 	public static String PathVariableDialog_pathDoesNotExistMessage;
+	public static String PathVariableDialog_variableValueIsWrongTypeFolder;
+	public static String PathVariableDialog_variableValueIsWrongTypeFile;
 
 	// --- Local History ---
 	public static String FileHistory_longevity;
 	public static String FileHistory_entries;
 	public static String FileHistory_diskSpace;
+	public static String FileHistory_applyPolicy;
 	public static String FileHistory_mustBePositive;
 	public static String FileHistory_invalid;
 	public static String FileHistory_exceptionSaving;
@@ -512,6 +600,7 @@ public class IDEWorkbenchMessages extends NLS {
 	// --- Info ---
 	public static String ResourceInfo_readOnly;
 	public static String ResourceInfo_executable;
+	public static String ResourceInfo_locked;
 	public static String ResourceInfo_archive;
 	public static String ResourceInfo_derived;
 	public static String ResourceInfo_type;
@@ -525,6 +614,7 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String ResourceInfo_project;
 	public static String ResourceInfo_linkedFile;
 	public static String ResourceInfo_linkedFolder;
+	public static String ResourceInfo_virtualFolder;
 	public static String ResourceInfo_unknown;
 	public static String ResourceInfo_notLocal;
 	public static String ResourceInfo_undefinedPathVariable;
@@ -537,10 +627,46 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String ResourceInfo_fileContainerEncodingFormat;
 	public static String ResourceInfo_containerEncodingFormat;
 	public static String ResourceInfo_exWarning;
+	public static String ResourceInfo_isVirtualFolder;
+	public static String ResourceInfo_edit;
+	public static String ResourceInfo_attributes;
+	public static String ResourceInfo_permissions;
+	public static String ResourceInfo_owner;
+	public static String ResourceInfo_group;
+	public static String ResourceInfo_other;
+	public static String ResourceInfo_read;
+	public static String ResourceInfo_write;
+	public static String ResourceInfo_execute;
 
 	// --- Project References ---
 	public static String ProjectReferencesPage_label;
 
+	// --- Project Linked Resources References ---
+	public static String ProjectLinkedResourcePage_description;
+	public static String ProjectLinkedResourcePage_pathVariableTabTitle;
+	public static String ProjectLinkedResourcePage_linkedResourcesTabTitle;
+
+	// --- Linked Resource Editor ---
+	public static String LinkedResourceEditor_editLinkedLocation;
+	public static String LinkedResourceEditor_convertToVariableLocation;
+	public static String LinkedResourceEditor_resourceName;
+	public static String LinkedResourceEditor_path;
+	public static String LinkedResourceEditor_location;
+	public static String LinkedResourceEditor_fixed;
+	public static String LinkedResourceEditor_broken;
+	public static String LinkedResourceEditor_absolute;
+	public static String LinkedResourceEditor_changedTo;
+	public static String LinkedResourceEditor_unableToSetLinkLocationForResource;
+	public static String LinkedResourceEditor_convertRelativePathLocations;
+	public static String LinkedResourceEditor_convertionResults;
+	public static String linkedResourceEditor_OK;
+	public static String LinkedResourceEditor_unableToCreateVariable;
+	public static String LinkedResourceEditor_unableToFindCommonPathSegments;
+	public static String LinkedResourceEditor_convertAbsolutePathLocations;	
+	public static String LinkedResourceEditor_descriptionBlock;
+	public static String LinkedResourceEditor_convertTitle;
+	public static String LinkedResourceEditor_convertMessage;
+	
 	// ==============================================================================
 	// Editors
 	// ==============================================================================
@@ -635,17 +761,42 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String CreateLinkedResourceGroup_linkTargetNotFolder;
 	public static String CreateLinkedResourceGroup_linkTargetNonExistent;
 	public static String CreateLinkedResourceGroup_unableToValidateLinkTarget;
+	public static String CreateLinkedResourceGroup_linkRequiredUnderAGroup;
 
 	public static String PathVariablesBlock_variablesLabel;
+	public static String PathVariablesBlock_variablesLabelForResource;
 	public static String PathVariablesBlock_addVariableButton;
 	public static String PathVariablesBlock_editVariableButton;
 	public static String PathVariablesBlock_removeVariableButton;
+	public static String PathVariablesBlock_nameColumn;
+	public static String PathVariablesBlock_valueColumn;
+
+	public static String ResourceFilterEditDialog_title;
 
 	public static String PathVariableSelectionDialog_title;
 	public static String PathVariableSelectionDialog_extendButton;
 	public static String PathVariableSelectionDialog_ExtensionDialog_title;
 	public static String PathVariableSelectionDialog_ExtensionDialog_description;
 
+	public static String ImportTypeDialog_title;
+	public static String ImportTypeDialog_titleFilesOnly;
+	public static String ImportTypeDialog_titleFilesLinking;
+	public static String ImportTypeDialog_question;
+	public static String ImportTypeDialog_questionFilesOnly;
+	public static String ImportTypeDialog_moveFilesAndDirectories;
+	public static String ImportTypeDialog_copyFilesAndDirectories;
+	public static String ImportTypeDialog_moveFiles;
+	public static String ImportTypeDialog_copyFiles;
+	public static String ImportTypeDialog_recreateFilesAndDirectories;
+	public static String ImportTypeDialog_createLinks;
+	public static String ImportTypeDialog_linkFiles;
+	public static String ImportTypeDialog_importElementsAs;
+	public static String ImportTypeDialog_importElementsAsTooltip;
+	public static String ImportTypeDialog_importElementsAsTooltipSet;
+	public static String ImportTypeDialog_editVariables;
+	public static String ImportTypeDialog_alwaysPerformThisOperation;
+	public static String ImportTypeDialog_configureSettings;
+
 	// ==============================================================================
 	// Editor Framework
 	// ==============================================================================
@@ -815,6 +966,11 @@ public class IDEWorkbenchMessages extends NLS {
 	public static String UnsupportedVM_message;
 	
 	public static String IDEWorkbenchActivityHelper_jobName;
+	
+	public static String OpenDelayedFileAction_title;
+	public static String OpenDelayedFileAction_message_errorOnOpen;
+	public static String OpenDelayedFileAction_message_fileNotFound;
+	public static String OpenDelayedFileAction_message_noWindow;
 
 	static {
 		// load message values from bundle file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
index 1a1f6c6..9dc0408 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,7 +33,6 @@ import org.eclipse.ui.internal.ide.registry.ProjectImageRegistry;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -331,26 +330,4 @@ public class IDEWorkbenchPlugin extends AbstractUIPlugin {
 		if (resourceManager != null)
 			resourceManager.dispose();
 	}
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-	 */
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		
-		// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=235179
-		// Code that depends on Platform.getBundleGroupProviders() during
-		// workbench startup must have org.eclipse.update.configurator available.
-		Bundle bundleGroupBundle = Platform
-				.getBundle("org.eclipse.update.configurator"); //$NON-NLS-1$
-		if (bundleGroupBundle != null) {
-			try {
-				bundleGroupBundle.start(Bundle.START_TRANSIENT);
-			} catch (BundleException e) {
-				// we can't start the org.eclipse.update.configurator
-				// this is not something we want to force, so we'll call this a
-				// NO-OP
-			}
-		}
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IIDEHelpContextIds.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IIDEHelpContextIds.java
index 3eb9a97..c8ff9b5 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IIDEHelpContextIds.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IIDEHelpContextIds.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,8 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] Resource filters
  *******************************************************************************/
-
 package org.eclipse.ui.internal.ide;
 
 /**
@@ -17,7 +17,6 @@ package org.eclipse.ui.internal.ide;
  * This interface contains constants only; it is not intended to be implemented
  * or extended.
  * </p>
- * 
  */
 public interface IIDEHelpContextIds {
     public static final String PREFIX = IDEWorkbenchPlugin.IDE_WORKBENCH + "."; //$NON-NLS-1$
@@ -149,6 +148,9 @@ public interface IIDEHelpContextIds {
     public static final String PATH_VARIABLE_SELECTION_DIALOG = PREFIX
             + "path_variable_selection_dialog"; //$NON-NLS-1$
 
+    public static final String IMPORT_TYPE_DIALOG = PREFIX
+    + "import_type_dialog"; //$NON-NLS-1$
+
     public static final String SAVE_AS_DIALOG = PREFIX
     + "save_as_dialog_context"; //$NON-NLS-1$
 
@@ -171,9 +173,21 @@ public interface IIDEHelpContextIds {
     public static final String PROJECT_REFERENCE_PROPERTY_PAGE = PREFIX
             + "project_reference_property_page_context"; //$NON-NLS-1$
 
+	public static final String RESOURCE_FILTER_PROPERTY_PAGE = PREFIX
+			+ "resource_filter_property_page_context"; //$NON-NLS-1$
+
+	public static final String EDIT_RESOURCE_FILTER_PROPERTY_PAGE = PREFIX
+			+ "edit_resource_filter_property_page_context"; //$NON-NLS-1$
+
+	public static final String EDIT_RESOURCE_FILTER_DIALOG = PREFIX
+			+ "edit_resource_filter_dialog_context"; //$NON-NLS-1$
+
     public static final String RESOURCE_INFO_PROPERTY_PAGE = PREFIX
             + "resource_info_property_page_context"; //$NON-NLS-1$
 
+    public static final String NEW_FILE_WIZARD_PAGE = PREFIX
+    		+ "new_file_wizard_page_context"; //$NON-NLS-1$
+    
     // Wizard pages
     public static final String NEW_PROJECT_WIZARD_PAGE = PREFIX
             + "new_project_wizard_page_context"; //$NON-NLS-1$
@@ -183,9 +197,12 @@ public interface IIDEHelpContextIds {
 
     public static final String NEW_FOLDER_WIZARD_PAGE = PREFIX
             + "new_folder_wizard_page_context"; //$NON-NLS-1$
-
-    public static final String NEW_FILE_WIZARD_PAGE = PREFIX
-            + "new_file_wizard_page_context"; //$NON-NLS-1$
+    
+    public static final String LINKED_RESOURCE_PAGE = PREFIX
+    		+ "linked_resource_page_context"; //$NON-NLS-1$
+   
+    public static final String NEW_GROUP_WIZARD_PAGE = PREFIX
+    		+ "new_group_wizard_page_context"; //$NON-NLS-1$
 
    public static final String NEW_LINK_WIZARD_PAGE = PREFIX
             + "new_link_wizard_page_context"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LinkedResourceDecorator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LinkedResourceDecorator.java
index 859983a..3894a9a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LinkedResourceDecorator.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LinkedResourceDecorator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -87,7 +87,7 @@ public class LinkedResourceDecorator implements ILightweightLabelDecorator {
 			return;
 		}
         IResource resource = (IResource) element;
-        if (resource.isLinked()) {
+        if (resource.isLinked() && !resource.isVirtual()) {
 			IFileInfo fileInfo = null;
 			URI location = resource.getLocationURI();
 			if (location != null) {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceDragAndDropEditor.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceDragAndDropEditor.java
new file mode 100644
index 0000000..7a4df72
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceDragAndDropEditor.java
@@ -0,0 +1,216 @@
+/*******************************************************************************
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+
+/**
+ * A class to handle editing of the Line delimiter preferences in core.
+ * 
+ * @since 3.1
+ */
+public class ResourceDragAndDropEditor {
+
+	class PreferenceGroup
+	{
+		Group group;
+		String preferenceKey;
+		String title;
+		String[] labels;
+		String[] values;
+		Button[] buttons;
+		
+		public PreferenceGroup(String title, String pref, String[] labels, String[] values) {
+			this.preferenceKey = pref;
+			this.title = title;
+			this.labels = labels;
+			this.values = values;
+		}
+		
+		public void createControl(Composite parent) {
+			Font font = parent.getFont();
+			group = new Group(parent, SWT.NONE);
+			GridData data = new GridData(GridData.FILL_HORIZONTAL);
+			group.setLayoutData(data);
+			GridLayout layout = new GridLayout();
+			layout.numColumns = labels.length;
+			group.setLayout(layout);
+			group.setText(title);
+			group.setFont(font);
+
+			buttons = new Button[labels.length];
+			for (int i = 0; i < labels.length; i++) {
+				buttons[i] = new Button(group, SWT.RADIO);
+				buttons[i].setText(labels[i]);
+				buttons[i].setData(values[i]);
+				buttons[i].setFont(font);
+			}
+		}
+
+		/**
+		 * 
+		 */
+		public void doLoad() {
+			String resourcePreference = getStoredValue(false);
+			updateState(resourcePreference);
+		}
+		/**
+		 * @param value
+		 */
+		private void updateState(String value) {
+			for (int i = 0; i < labels.length; i++) {
+				if (value.equals(buttons[i].getData()))
+					buttons[i].setSelection(true);
+			}
+		}
+
+		/**
+		 * 
+		 */
+		public void loadDefault() {
+			String value = getStoredValue(true);
+			updateState(value);
+		}
+		/**
+		 * Returns the value that is currently stored for the encoding.
+		 * @param useDefault 
+		 * 
+		 * @return the currently stored encoding
+		 */
+		public String getStoredValue(boolean useDefault) {
+			IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+			if (useDefault)
+				return store.getDefaultString(preferenceKey);
+			return store.getString(preferenceKey);
+		}
+
+		 /**
+		 * @return the current selection
+		 */
+		private String getSelection() {
+			for (int i = 0; i < labels.length; i++) {
+				if (buttons[i].getSelection())
+					return (String) buttons[i].getData();
+			}
+			return values[0];
+		}
+
+		/**
+		 * 
+		 */
+		public void store() {
+			IPreferenceStore store = IDEWorkbenchPlugin.getDefault().getPreferenceStore();
+			store.putValue(preferenceKey, getSelection());
+		}
+
+		/**
+		 * @param enableLinking
+		 */
+		public void setEnabled(boolean enableLinking) {
+			group.setEnabled(enableLinking);
+			for (int i = 0; i < labels.length; i++) {
+				if (buttons[i] != null && !buttons[i].isDisposed())
+					buttons[i].setEnabled(enableLinking);
+			}
+			
+		}
+	}
+	
+	PreferenceGroup folderPref;
+	PreferenceGroup virtualFolderPref;
+	/**
+	 * Creates a new drag and drop resource editor with the given preference name, label
+	 * and parent.
+	 * 
+	 * @param composite
+	 *            the parent of the field editor's control
+	 */
+	public ResourceDragAndDropEditor(Composite composite) {
+		folderPref = new PreferenceGroup(IDEWorkbenchMessages.LinkedResourcesPreference_dragAndDropHandlingMessage,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE,
+				new String[] {
+				IDEWorkbenchMessages.Prompt,
+				IDEWorkbenchMessages.linkedResourcesPreference_copy,
+				IDEWorkbenchMessages.LinkedResourcesPreference_link, 
+				IDEWorkbenchMessages.LinkedResourcesPreference_linkAndVirtualFolder },
+				new String[] {IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_MOVE_COPY,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK_AND_VIRTUAL_FOLDER});
+		virtualFolderPref = new PreferenceGroup(IDEWorkbenchMessages.LinkedResourcesPreference_dragAndDropVirtualFolderHandlingMessage,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE,
+				new String[] {
+				IDEWorkbenchMessages.LinkedResourcesPreference_promptVirtual,
+				IDEWorkbenchMessages.LinkedResourcesPreference_linkVirtual, 
+				IDEWorkbenchMessages.LinkedResourcesPreference_linkAndVirtualFolderVirtual },
+				new String[] {IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_PROMPT,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK,
+				IDEInternalPreferences.IMPORT_FILES_AND_FOLDERS_MODE_LINK_AND_VIRTUAL_FOLDER});
+		createControl(composite);
+	}
+
+	/**
+	 * Creates this field editor's main control containing all of its basic
+	 * controls.
+	 * 
+	 * @param parent
+	 *            the parent control
+	 */
+	protected void createControl(Composite parent) {
+		folderPref.createControl(parent);
+		virtualFolderPref.createControl(parent);
+	}
+
+	/**
+	 * Load the list items from core and update the state of the buttons to
+	 * match what the preference is currently set to.
+	 */
+	public void doLoad() {
+		folderPref.doLoad();
+		virtualFolderPref.doLoad();
+	}
+
+	/**
+	 * Initializes this field editor with the preference value from the
+	 * preference store.
+	 */
+	public void loadDefault() {
+		folderPref.loadDefault();
+		virtualFolderPref.loadDefault();
+	}
+
+	/**
+	 * Store the currently selected line delimiter value in the preference
+	 * store.
+	 */
+	public void store() {
+		folderPref.store();
+		virtualFolderPref.store();
+	}
+
+	/**
+     * Sets the enabled state of the group's widgets.
+     * Does nothing if called prior to calling <code>createContents</code>.
+
+	 * @param enableLinking
+	 */
+	public void setEnabled(boolean enableLinking) {
+		folderPref.setEnabled(enableLinking);
+		virtualFolderPref.setEnabled(enableLinking);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceFilterDecorator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceFilterDecorator.java
new file mode 100644
index 0000000..e081108
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ResourceFilterDecorator.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2009 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResourceFilterDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+
+/**
+ * Lightweight decorator for filtered container.
+ */
+public class ResourceFilterDecorator implements ILightweightLabelDecorator {
+
+	private static final String IMG_MARKERS_RESOURCE_FILTER_DECORATION_PATH = "ovr16/filterapplied_ovr.gif"; //$NON-NLS-1$
+	ImageDescriptor descriptorImage = null;
+
+	/**
+	 * 
+	 */
+	public ResourceFilterDecorator() {
+		descriptorImage = IDEWorkbenchPlugin
+				.getIDEImageDescriptor(IMG_MARKERS_RESOURCE_FILTER_DECORATION_PATH);
+	}
+
+	public void decorate(Object element, IDecoration decoration) {
+
+		if (element instanceof IContainer == false) {
+			return;
+		}
+		IContainer container = (IContainer) element;
+		IResourceFilterDescription[] filters = null;
+		try {
+			filters = container.getFilters();
+			if ((filters.length > 0) && (descriptorImage != null))
+				decoration
+						.addOverlay(descriptorImage, IDecoration.BOTTOM_RIGHT);
+		} catch (CoreException e) {
+		}
+	}
+
+	public void addListener(ILabelProviderListener listener) {
+	}
+
+	public void dispose() {
+	}
+
+	public boolean isLabelProperty(Object element, String property) {
+		return false;
+	}
+
+	public void removeListener(ILabelProviderListener listener) {
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/VirtualResourceDecorator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/VirtualResourceDecorator.java
new file mode 100644
index 0000000..ef4b5cb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/VirtualResourceDecorator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * A VirtualResourceDecorator replaces an element's image, if it is a virtual
+ * resource.
+ */
+public class VirtualResourceDecorator implements ILightweightLabelDecorator {
+	private static final ImageDescriptor VIRTUAL_FOLDER;
+
+	static {
+		VIRTUAL_FOLDER = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/ovr16/virt_ovr.gif"); //$NON-NLS-1$
+	}
+
+	/**
+	 * Creates a new <code>VirtualResourceDecorator</code>.
+	 */
+	public VirtualResourceDecorator() {
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(ILabelProviderListener)
+	 */
+	public void addListener(ILabelProviderListener listener) {
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+	 */
+	public void dispose() {
+		// no resources to dispose
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
+	 *      java.lang.String)
+	 */
+	public boolean isLabelProperty(Object element, String property) {
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(ILabelProviderListener)
+	 */
+	public void removeListener(ILabelProviderListener listener) {
+	}
+
+	/**
+	 * Replaces the resource image, if the given element is a virtual resource.
+	 * 
+	 * @param element
+	 *            element to decorate
+	 * @param decoration
+	 *            The decoration we are adding to
+	 * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(Object,
+	 *      IDecoration)
+	 */
+	public void decorate(Object element, IDecoration decoration) {
+		if (element instanceof IFolder && ((IResource) element).isVirtual()) {
+			decoration.addOverlay(VIRTUAL_FOLDER, IDecoration.BOTTOM_RIGHT);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
index 103aebf..75e9918 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/WorkbenchActionBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.ide;
 
+import org.eclipse.core.commands.Command;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResourceChangeEvent;
 import org.eclipse.core.resources.IResourceChangeListener;
@@ -44,12 +45,14 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.actions.BuildAction;
 import org.eclipse.ui.actions.ContributionItemFactory;
 import org.eclipse.ui.actions.NewWizardMenu;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.application.ActionBarAdvisor;
 import org.eclipse.ui.application.IActionBarConfigurer;
+import org.eclipse.ui.commands.ICommandService;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.ide.IDEActionFactory;
 import org.eclipse.ui.ide.IIDEActionConstants;
 import org.eclipse.ui.internal.IPreferenceConstants;
@@ -330,8 +333,8 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
 
     public void fillActionBars(int flags) {
         super.fillActionBars(flags);
+        updateBuildActions(true);
         if ((flags & FILL_PROXY) == 0) {
-            updateBuildActions(true);
             hookListeners();
         }
     }
@@ -359,6 +362,7 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
             fileToolBar.add(new GroupMarker(
                     IWorkbenchActionConstants.SAVE_GROUP));
             fileToolBar.add(saveAction);
+            fileToolBar.add(saveAllAction);
             fileToolBar
                     .add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
             fileToolBar.add(getPrintItem());
@@ -1173,7 +1177,7 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
         	// do the work
     		infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos();
         	boolean found = hasWelcomePage(infos);
-            prefs.setValue(quickStartKey, found);
+            prefs.setValue(quickStartKey, String.valueOf(found));
             if (found) {
                 quickStartAction = IDEActionFactory.QUICK_START.create(window);
                 register(quickStartAction);
@@ -1198,7 +1202,7 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
 	    		infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos();
 	    	}
 	    	boolean found = hasTipsAndTricks(infos);
-	    	prefs.setValue(tipsAndTricksKey, found);
+	    	prefs.setValue(tipsAndTricksKey, String.valueOf(found));
 	    	if (found) {
 	            tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS
 						.create(window);
@@ -1257,7 +1261,7 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
 				IProject[] projects = workspace.getRoot().getProjects();
 		    	boolean enabled = BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD);
 		        //update menu bar actions in project menu
-		        buildAllAction.setEnabled(enabled);
+				updateCommandEnablement(buildAllAction.getActionDefinitionId());
 		        buildProjectAction.setEnabled(enabled);
 		        toggleAutoBuildAction.setChecked(workspace.isAutoBuilding());
 		        cleanAction.setEnabled(BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.CLEAN_BUILD));
@@ -1292,6 +1296,15 @@ public final class WorkbenchActionBuilder extends ActionBarAdvisor {
 		            toolBarItem.update(ICoolBarManager.SIZE);
 		        }
             }
+
+			private void updateCommandEnablement(String commandId) {
+				IHandlerService handlerService = (IHandlerService) window.getService(IHandlerService.class);
+				ICommandService commandService = (ICommandService) window.getService(ICommandService.class);
+				if (handlerService != null && commandService != null) {
+					Command buildAllCmd = commandService.getCommand(commandId);
+					buildAllCmd.setEnabled(handlerService.getCurrentState());
+				}
+			}
         };
         if (immediately) {
         	update.run();
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
index d948eb9..122d7d3 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/BuildUtilities.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,15 +75,25 @@ public class BuildUtilities {
 		if (window == null) {
 			return new IProject[0];
 		}
-		ISelection selection = window.getSelectionService().getSelection();
+
+		IWorkbenchPage activePage= window.getActivePage();
+		if (activePage == null) {
+			return new IProject[0];
+		}
+
+		IWorkbenchPart activePart= activePage.getActivePart();
+		if (activePart == null) {
+			return new IProject[0];
+		}
+
+		ISelection selection= window.getSelectionService().getSelection(activePart.getSite().getId());
 		IProject[] selected = null;
 		if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
 			selected = extractProjects(((IStructuredSelection) selection).toArray());
 		} else {
 			//see if we can extract a selected project from the active editor
-			IWorkbenchPart part = window.getPartService().getActivePart();
-			if (part instanceof IEditorPart) {
-				IEditorPart editor = (IEditorPart) part;
+			if (activePart instanceof IEditorPart) {
+				IEditorPart editor= (IEditorPart)activePart;
 				IFile file = ResourceUtil.getFile(editor.getEditorInput());
 				if (file != null) {
 					selected = new IProject[] {file.getProject()};
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java
index 01e5ce4..28959d2 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ConfigurationLogUpdateSection.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,11 +17,11 @@ import java.util.Iterator;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
-import org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
-import org.eclipse.equinox.internal.provisional.p2.query.Collector;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.PlatformAdmin;
 import org.eclipse.osgi.service.resolver.State;
@@ -56,6 +56,8 @@ public class ConfigurationLogUpdateSection implements ISystemSummarySection {
 			if (registry == null)
 				return;
 			IProfile profile = registry.getProfile(IProfileRegistry.SELF);
+			if (profile == null)
+				return;
 
 			writer.println(IDEWorkbenchMessages.ConfigurationLogUpdateSection_installConfiguration);
 			writer.println(" " + NLS.bind(IDEWorkbenchMessages.ConfigurationLogUpdateSection_lastChangedOn, DateFormat.getDateInstance().format(new Date(profile.getTimestamp())))); //$NON-NLS-1$
@@ -66,9 +68,9 @@ public class ConfigurationLogUpdateSection implements ISystemSummarySection {
 			// Since this code is only called in the Help -> About -> Configuration Details case we
 			// won't worry too much about performance here and we will sort the query results
 			// afterwards, but before printing them out.
-			Collector collector = profile.available(InstallableUnitQuery.ANY, new Collector(), null);
+			IQueryResult result = profile.available(QueryUtil.createIUAnyQuery(), null);
 			SortedSet sorted = new TreeSet();
-			for (Iterator iter = collector.iterator(); iter.hasNext();) {
+			for (Iterator iter = result.iterator(); iter.hasNext();) {
 				IInstallableUnit unit = (IInstallableUnit) iter.next();
 				sorted.add(NLS.bind(IDEWorkbenchMessages.ConfigurationLogUpdateSection_IU, unit.getId(), unit.getVersion()));
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java
index c431a9e..ece3367 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/CreateLinkedResourceGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,12 +7,14 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 
 package org.eclipse.ui.internal.ide.dialogs;
 
 import java.net.URI;
 import java.net.URISyntaxException;
+
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.filesystem.IFileStore;
@@ -21,6 +23,7 @@ import org.eclipse.core.resources.IPathVariableManager;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
@@ -106,6 +109,13 @@ public class CreateLinkedResourceGroup {
 		 * @return the current value, or <code>null</code>
 		 */
 		String getValue();
+
+		/**
+		 * Gets the resource to which the resource will belong
+		 * 
+		 * @return the IResource object, or <code>null</code>
+		 */
+		IResource getResource();
 	}
 
 	private String lastUpdatedValue;
@@ -145,6 +155,28 @@ public class CreateLinkedResourceGroup {
 	 * @return the widget group
 	 */
 	public Composite createContents(Composite parent) {
+		return createContents(parent, true);
+	}
+
+	/**
+	 * Creates the widgets without the checkbox button
+	 * 
+	 * @param parent
+	 *            parent composite of the widget group
+	 * @return the widget group
+	 */
+	public Composite createTextOnlyContents(Composite parent) {
+		return createContents(parent, false);
+	}
+
+	/**
+	 * Creates the widgets
+	 * 
+	 * @param parent
+	 *            parent composite of the widget group
+	 * @return the widget group
+	 */
+	private Composite createContents(Composite parent, boolean createCheckbox) {
 		Font font = parent.getFont();
 		initializeDialogUnits(parent);
 		// top level group
@@ -155,38 +187,56 @@ public class CreateLinkedResourceGroup {
 				| GridData.FILL_HORIZONTAL));
 		groupComposite.setFont(font);
 
-		final Button createLinkButton = new Button(groupComposite, SWT.CHECK);
-		if (type == IResource.FILE) {
-			createLinkButton
-					.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_linkFileButton);
-		} else {
-			createLinkButton
-					.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_linkFolderButton);
-		}
-		createLinkButton.setSelection(createLink);
-		createLinkButton.setFont(font);
-		SelectionListener selectionListener = new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				createLink = createLinkButton.getSelection();
-				browseButton.setEnabled(createLink);
-				variablesButton.setEnabled(createLink);
-				// Set the required field color if the field is enabled
-				linkTargetField.setEnabled(createLink);
-				if (fileSystemSelectionArea != null)
-					fileSystemSelectionArea.setEnabled(createLink);
-
-				if (listener != null) {
-					listener.handleEvent(new Event());
-				}
+		if (createCheckbox) {
+			final Button createLinkButton = new Button(groupComposite, SWT.CHECK);
+			if (type == IResource.FILE) {
+				createLinkButton
+						.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_linkFileButton);
+			} else {
+				createLinkButton
+						.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_linkFolderButton);
 			}
-		};
-		createLinkButton.addSelectionListener(selectionListener);
+			createLinkButton.setSelection(createLink);
+			createLinkButton.setFont(font);
+			SelectionListener selectionListener = new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					setEnabled(createLinkButton.getSelection());
+				}
+			};
+			createLinkButton.addSelectionListener(selectionListener);
+		}
 
 		createLinkLocationGroup(groupComposite, createLink);
 		return groupComposite;
 	}
 
 	/**
+	 * Set the group enabled state
+	 * @param value true if enabled, false otherwise
+	 */
+	public void setEnabled(boolean value) {
+		createLink = value;
+		browseButton.setEnabled(createLink);
+		variablesButton.setEnabled(createLink);
+		// Set the required field color if the field is enabled
+		linkTargetField.setEnabled(createLink);
+		if (fileSystemSelectionArea != null)
+			fileSystemSelectionArea.setEnabled(createLink);
+
+		if (listener != null) {
+			listener.handleEvent(new Event());
+		}
+	}
+
+	/**
+	 * Return the group enabled state
+	 * @return if the group is enabled
+	 */
+	public boolean isEnabled() {
+		return createLink;
+	}
+	
+	/**
 	 * Creates the link target location widgets.
 	 * 
 	 * @param locationGroup
@@ -212,6 +262,7 @@ public class CreateLinkedResourceGroup {
 		GridData data = new GridData(GridData.FILL_HORIZONTAL);
 		data.horizontalIndent = indent;
 		linkTargetGroup.setLayoutData(data);
+		linkTargetGroup.setFont(locationGroup.getFont());
 
 		// link target location entry field
 		linkTargetField = new Text(linkTargetGroup, SWT.BORDER);
@@ -220,6 +271,7 @@ public class CreateLinkedResourceGroup {
 		data.horizontalSpan = 2;
 		linkTargetField.setLayoutData(data);
 		linkTargetField.setEnabled(enabled);
+		linkTargetField.setFont(locationGroup.getFont());
 		linkTargetField.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				linkTarget = linkTargetField.getText();
@@ -251,6 +303,7 @@ public class CreateLinkedResourceGroup {
 				handleLinkTargetBrowseButtonPressed();
 			}
 		});
+		browseButton.setFont(locationGroup.getFont());
 		browseButton.setEnabled(enabled);
 		setButtonLayoutData(browseButton);
 
@@ -263,6 +316,7 @@ public class CreateLinkedResourceGroup {
 				handleVariablesButtonPressed();
 			}
 		});
+		variablesButton.setFont(locationGroup.getFont());
 		variablesButton.setEnabled(enabled);
 		setButtonLayoutData(variablesButton);
 
@@ -290,7 +344,17 @@ public class CreateLinkedResourceGroup {
 		}
 
 		fileSystemSelectionArea = new FileSystemSelectionArea();
-		fileSystemSelectionArea.createContents(composite);
+		
+		Composite parent = new Composite(composite, SWT.NONE);
+		parent.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 4, 1));
+		GridLayout layout = new GridLayout(2, false);
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		parent.setLayout(layout);
+		parent.setFont(composite.getFont());
+
+		fileSystemSelectionArea.createContents(parent);
+		
 		fileSystemSelectionArea.setEnabled(enabled);
 	}
 
@@ -312,11 +376,13 @@ public class CreateLinkedResourceGroup {
 		data = new GridData(GridData.FILL_HORIZONTAL);
 		data.horizontalIndent = indent;
 		resolvedPathGroup.setLayoutData(data);
+		resolvedPathGroup.setFont(locationGroup.getFont());
 
 		resolvedPathLabelText = new Label(resolvedPathGroup, SWT.SINGLE);
 		resolvedPathLabelText
 				.setText(IDEWorkbenchMessages.CreateLinkedResourceGroup_resolvedPathLabel);
 		resolvedPathLabelText.setVisible(false);
+		resolvedPathLabelText.setFont(locationGroup.getFont());
 
 		resolvedPathLabelData = new Label(resolvedPathGroup, SWT.SINGLE);
 		data = new GridData(GridData.FILL_HORIZONTAL);
@@ -352,33 +418,38 @@ public class CreateLinkedResourceGroup {
 	public URI getLinkTargetURI() {
 		if (!createLink)
 			return null;
-		// resolve path variable if we have a relative path
-		if (!linkTarget.startsWith("/")) { //$NON-NLS-1$
-			IPathVariableManager pathVariableManager = ResourcesPlugin
-					.getWorkspace().getPathVariableManager();
+		// linkTarget can contain either:
+		//  1) a URI, ex: 								foo://bar/file.txt
+		//  2) A path, ex: 								c:\foo\bar\file.txt
+		//  3) A path variable relative path, ex:		VAR\foo\bar\file.txt
+		URI uri;
+		try {
+			IPath path = Path.fromOSString(linkTarget);
+			if (path != null && path.toFile().exists())
+				return URIUtil.toURI(path);
+			
+			uri = new URI(linkTarget);
+			URI resolved = getPathVariableManager().resolveURI(uri);
 			try {
-				
-				URI path = new URI(linkTarget.replace(java.io.File.separatorChar, '/'));
-				URI resolved = pathVariableManager.resolveURI(path);
-				if (path != resolved) {
-					// we know this is a path variable, but return unresolved
-					// path so resource will be created with variable intact
-					return path;
-				}
-			} catch (URISyntaxException e) {
-				// link target is not a valid URI. Fall through to handle this
-				// below
+				EFS.getStore(resolved);
+			} catch (CoreException e) {
+				return URIUtil.toURI(path);
 			}
+		}catch(URISyntaxException e) {
+			uri = convertToURI(linkTarget);
 		}
+		return uri;
+	}
 
+	private URI convertToURI(String string) {
 		FileSystemConfiguration configuration = getSelectedConfiguration();
 		if (configuration == null) {
-			return URIUtil.toURI(linkTarget);
+			return URIUtil.toURI(string);
 		}
 		// validate non-local file system location
-		return configuration.getContributor().getURI(linkTarget);
+		return configuration.getContributor().getURI(string);
 	}
-
+	
 	/**
 	 * Opens a file or directory browser depending on the link type.
 	 */
@@ -475,6 +546,9 @@ public class CreateLinkedResourceGroup {
 
 		PathVariableSelectionDialog dialog = new PathVariableSelectionDialog(
 				linkTargetField.getShell(), variableTypes);
+		if (updatableResourceName != null) {
+		dialog.setResource(updatableResourceName.getResource());
+		}
 		if (dialog.open() == IDialogConstants.OK_ID) {
 			String[] variableNames = (String[]) dialog.getResult();
 			if (variableNames != null && variableNames.length == 1) {
@@ -508,22 +582,43 @@ public class CreateLinkedResourceGroup {
 	 * the entered value is a variable.
 	 */
 	private void resolveVariable() {
-		IPathVariableManager pathVariableManager = ResourcesPlugin
-				.getWorkspace().getPathVariableManager();
-		IPath path = new Path(linkTarget);
-		IPath resolvedPath = pathVariableManager.resolvePath(path);
-
-		if (path.equals(resolvedPath)) {
+		IPathVariableManager pathVariableManager = getPathVariableManager();
+		boolean isURL = true;
+		URI uri;
+		try {
+			uri = new URI(linkTarget);
+		}catch(URISyntaxException e) {
+			isURL = false;
+			uri = convertToURI(linkTarget);
+		}
+		URI resolvedURI = pathVariableManager.resolveURI(uri);
+		String resolvedString;
+		if (isURL)
+			resolvedString = resolvedURI.toString(); 
+		else
+			resolvedString = URIUtil.toPath(resolvedURI).toOSString();
+		
+		if (linkTarget.equals(resolvedString)) {
 			resolvedPathLabelText.setVisible(false);
 			resolvedPathLabelData.setVisible(false);
 		} else {
 			resolvedPathLabelText.setVisible(true);
 			resolvedPathLabelData.setVisible(true);
 		}
-		resolvedPathLabelData.setText(resolvedPath.toOSString());
+		resolvedPathLabelData.setText(resolvedString);
 	}
 
 	/**
+	 * @return the current IPathVariableManager
+	 */
+	private IPathVariableManager getPathVariableManager() {
+		if (updatableResourceName != null
+				&& updatableResourceName.getResource() != null)
+			return updatableResourceName.getResource().getPathVariableManager();
+		return ResourcesPlugin.getWorkspace().getPathVariableManager();
+	}	
+
+	/**
 	 * Sets the <code>GridData</code> on the specified button to be one that
 	 * is spaced for the current dialog page units. The method
 	 * <code>initializeDialogUnits</code> must be called once before calling
@@ -616,9 +711,12 @@ public class CreateLinkedResourceGroup {
 			return locationStatus;
 		}
 
-		// use the resolved link target name
-		URI resolved = workspace.getPathVariableManager().resolveURI(
-				locationURI);
+		URI resolved = linkHandle.getPathVariableManager().resolveURI(locationURI);
+		if (resolved.getScheme() == null) {
+			return createStatus(
+					IStatus.WARNING,
+					IDEWorkbenchMessages.CreateLinkedResourceGroup_linkTargetNonExistent);
+		}
 		IFileInfo linkTargetFile = IDEResourceInfoUtils.getFileInfo(resolved);
 		if (linkTargetFile != null && linkTargetFile.exists()) {
 			IStatus fileTypeStatus = validateFileType(linkTargetFile);
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
index 36a0667..7b898d9 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileStatesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
-import com.ibm.icu.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
 
 import org.eclipse.core.resources.IWorkspaceDescription;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -22,6 +24,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Event;
@@ -33,6 +36,8 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
 
+import com.ibm.icu.text.MessageFormat;
+
 /**
  * The FileStatesPage is the page used to set the file states sizes for the workbench.
  */
@@ -52,6 +57,10 @@ public class FileStatesPage extends PreferencePage implements
 
     private Text maxStateSizeText;
 
+    private Button applyPolicyButton;
+
+	private ArrayList dependentControls= new ArrayList();
+
     //Choose a maximum to prevent OutOfMemoryErrors
     private int FILE_STATES_MAXIMUM = 10000;
 
@@ -63,12 +72,13 @@ public class FileStatesPage extends PreferencePage implements
      * @return org.eclipse.swt.widgets.Text
      * @param labelString java.lang.String
      * @param textValue java.lang.String
-     * @param parent Composite 
+     * @param parent Composite
      */
-    private Text addLabelAndText(String labelString, String textValue,
+	private Text addDependentLabelAndText(String labelString, String textValue,
             Composite parent) {
         Label label = new Label(parent, SWT.LEFT);
         label.setText(labelString);
+		dependentControls.add(label);
 
         Text text = new Text(parent, SWT.LEFT | SWT.BORDER);
         GridData data = new GridData();
@@ -79,21 +89,39 @@ public class FileStatesPage extends PreferencePage implements
         data.grabExcessVerticalSpace = false;
         text.setLayoutData(data);
         text.setText(textValue);
+		dependentControls.add(text);
+
         return text;
     }
 
+    private Button addCheckBox(String label, boolean selected, Composite parent) {
+    	Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
+        button.addListener(SWT.Selection, this);
+        GridData data = new GridData();
+        data.horizontalSpan = 2;
+        button.setLayoutData(data);
+        button.setText(label);
+        button.setSelection(selected);
+        return button;
+    }
+
     /**
      * Recomputes the page's error state by validating all
      * the fields.
      */
     private void checkState() {
         // Assume invalid if the controls not created yet
-        if (longevityText == null || maxStatesText == null
-                || maxStateSizeText == null) {
+        if (longevityText == null || maxStatesText == null || maxStateSizeText == null
+        		|| applyPolicyButton == null) {
             setValid(false);
             return;
         }
 
+        boolean newState= applyPolicyButton.getSelection();
+        Iterator iter= dependentControls.iterator();
+        while (iter.hasNext())
+			((Control)iter.next()).setEnabled(newState);
+
         if (validateLongTextEntry(longevityText) == FAILED_VALUE) {
             setValid(false);
             return;
@@ -113,7 +141,7 @@ public class FileStatesPage extends PreferencePage implements
         setErrorMessage(null);
     }
 
-    /* 
+    /*
      * Create the contents control for the workspace file states.
      * @returns Control
      * @param parent Composite
@@ -123,12 +151,6 @@ public class FileStatesPage extends PreferencePage implements
     	PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
                 IIDEHelpContextIds.FILE_STATES_PREFERENCE_PAGE);
 
-        // button group
-        Composite composite = new Composite(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        layout.numColumns = 2;
-        composite.setLayout(layout);
-
         IWorkspaceDescription description = getWorkspaceDescription();
 
         //Get the current value and make sure we get at least one day out of it.
@@ -142,11 +164,26 @@ public class FileStatesPage extends PreferencePage implements
 			megabytes = 1;
 		}
 
-        this.longevityText = addLabelAndText(IDEWorkbenchMessages.FileHistory_longevity, String
+		this.applyPolicyButton = addCheckBox(IDEWorkbenchMessages.FileHistory_applyPolicy, description
+						.isApplyFileStatePolicy(), parent);
+
+		// button group
+		Composite composite= new Composite(parent, SWT.NONE);
+		GridLayout layout= new GridLayout();
+		layout.numColumns= 2;
+		layout.marginLeft= 10;
+		layout.marginWidth= 0;
+		composite.setLayout(layout);
+		GridData gd= new GridData();
+		gd.horizontalIndent= 200;
+		composite.setLayoutData(gd);
+
+
+		this.longevityText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_longevity, String
                 .valueOf(days), composite);
-        this.maxStatesText = addLabelAndText(IDEWorkbenchMessages.FileHistory_entries, String
+		this.maxStatesText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_entries, String
                 .valueOf(description.getMaxFileStates()), composite);
-        this.maxStateSizeText = addLabelAndText(IDEWorkbenchMessages.FileHistory_diskSpace,
+		this.maxStateSizeText= addDependentLabelAndText(IDEWorkbenchMessages.FileHistory_diskSpace,
                 String.valueOf(megabytes), composite);
 
         checkState();
@@ -162,6 +199,7 @@ public class FileStatesPage extends PreferencePage implements
         GridData noteData = new GridData();
         noteData.horizontalSpan = 2;
         noteComposite.setLayoutData(noteData);
+		dependentControls.addAll(Arrays.asList(noteComposite.getChildren()));
 
         applyDialogFont(composite);
 
@@ -213,13 +251,15 @@ public class FileStatesPage extends PreferencePage implements
                 .getDefaultLong(ResourcesPlugin.PREF_MAX_FILE_STATE_SIZE)
                 / MEGABYTES;
         this.longevityText.setText(String.valueOf(days));
-        this.maxStatesText.setText(prefs
-                .getDefaultString(ResourcesPlugin.PREF_MAX_FILE_STATES));
-        this.maxStateSizeText.setText(String.valueOf(megabytes));
-        checkState();
+		this.maxStatesText.setText(prefs
+				.getDefaultString(ResourcesPlugin.PREF_MAX_FILE_STATES));
+		this.maxStateSizeText.setText(String.valueOf(megabytes));
+		this.applyPolicyButton.setSelection(prefs
+				.getDefaultBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY));
+		checkState();
     }
 
-    /** 
+    /**
      * Perform the result of the OK from the receiver.
      */
     public boolean performOk() {
@@ -227,6 +267,7 @@ public class FileStatesPage extends PreferencePage implements
         long longevityValue = validateLongTextEntry(longevityText);
         int maxFileStates = validateMaxFileStates();
         long maxStateSize = validateMaxFileStateSize();
+        boolean applyPolicy = applyPolicyButton.getSelection();
         if (longevityValue == FAILED_VALUE || maxFileStates == FAILED_VALUE
                 || maxStateSize == FAILED_VALUE) {
 			return false;
@@ -236,6 +277,7 @@ public class FileStatesPage extends PreferencePage implements
         description.setFileStateLongevity(longevityValue * DAY_LENGTH);
         description.setMaxFileStates(maxFileStates);
         description.setMaxFileStateSize(maxStateSize * MEGABYTES);
+        description.setApplyFileStatePolicy(applyPolicy);
 
         try {
             //As it is only a copy save it back in
@@ -252,7 +294,7 @@ public class FileStatesPage extends PreferencePage implements
 
     /**
      * Validate a text entry for an integer field. Return the result if there are
-     * no errors, otherwise return -1 and set the entry field error. 
+     * no errors, otherwise return -1 and set the entry field error.
      * @return int
      */
     private int validateIntegerTextEntry(Text text) {
@@ -279,7 +321,7 @@ public class FileStatesPage extends PreferencePage implements
 
     /**
      * Validate a text entry for a long field. Return the result if there are
-     * no errors, otherwise return -1 and set the entry field error. 
+     * no errors, otherwise return -1 and set the entry field error.
      * @return long
      */
     private long validateLongTextEntry(Text text) {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileSystemSelectionArea.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileSystemSelectionArea.java
index 4b79c33..7e1ab24 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileSystemSelectionArea.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/FileSystemSelectionArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.internal.ide.filesystem.FileSystemConfiguration;
@@ -51,12 +50,10 @@ public class FileSystemSelectionArea {
 
 		fileSystemTitle = new Label(composite, SWT.NONE);
 		fileSystemTitle.setText(FileSystemMessages.FileSystemSelection_title);
+		fileSystemTitle.setFont(composite.getFont());
 
 		fileSystems = new ComboViewer(composite, SWT.READ_ONLY);
-
-		fileSystems.getControl().setLayoutData(
-				new GridData(GridData.FILL_HORIZONTAL
-						| GridData.GRAB_HORIZONTAL));
+		fileSystems.getControl().setFont(composite.getFont());
 
 		fileSystems.setLabelProvider(new LabelProvider() {
 			/*
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java
index a0506f7..2ed2a36 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import java.util.Date;
 import org.eclipse.core.filesystem.EFS;
 import org.eclipse.core.filesystem.IFileInfo;
 import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -62,6 +63,10 @@ public class IDEResourceInfoUtils {
 
 	private static String LINKED_FOLDER_LABEL = IDEWorkbenchMessages.ResourceInfo_linkedFolder;
 
+	private static String VIRTUAL_FOLDER_LABEL = IDEWorkbenchMessages.ResourceInfo_virtualFolder;
+
+	private static String VIRTUAL_FOLDER_TEXT = IDEWorkbenchMessages.ResourceInfo_isVirtualFolder;
+
 	private static String MISSING_PATH_VARIABLE_TEXT = IDEWorkbenchMessages.ResourceInfo_undefinedPathVariable;
 
 	private static String NOT_EXIST_TEXT = IDEWorkbenchMessages.ResourceInfo_notExist;
@@ -174,6 +179,8 @@ public class IDEResourceInfoUtils {
 	 * @return String or <code>null</code>
 	 */
 	public static IFileInfo getFileInfo(URI location) {
+		if (location.getScheme() == null)
+			return null;
 		IFileStore store = getFileStore(location);
 		if (store == null) {
 			return null;
@@ -215,6 +222,8 @@ public class IDEResourceInfoUtils {
 	 * @return String the text to display the location
 	 */
 	public static String getLocationText(IResource resource) {
+		if (resource.isVirtual())
+			return VIRTUAL_FOLDER_TEXT;
 		if (!resource.isLocal(IResource.DEPTH_ZERO)) {
 			return NOT_LOCAL_TEXT;
 		}
@@ -229,6 +238,9 @@ public class IDEResourceInfoUtils {
 			return NOT_EXIST_TEXT;
 		}
 
+		if (resolvedLocation.getScheme() == null)
+			return location.toString();
+		
 		IFileStore store = getFileStore(resolvedLocation);
 		// don't access the file system for closed projects (bug 151089)
 		boolean isPathVariable = isPathVariable(resource);
@@ -244,7 +256,8 @@ public class IDEResourceInfoUtils {
 			}
 		}
 		if (isLinked && isPathVariable) {
-			return resource.getRawLocationURI().toString();
+			String tmp = URIUtil.toPath(resource.getRawLocationURI()).toOSString();
+			return resource.getPathVariableManager().convertToUserEditableFormat(tmp, true);
 		}
 		if (store != null) {
 			return store.toString();
@@ -273,6 +286,9 @@ public class IDEResourceInfoUtils {
 			return NOT_EXIST_TEXT;
 		}
 
+		if (location.getScheme() == null)
+			return UNKNOWN_LABEL;
+		
 		IFileStore store = getFileStore(location);
 		if (store == null) {
 			return UNKNOWN_LABEL;
@@ -350,6 +366,9 @@ public class IDEResourceInfoUtils {
 		}
 
 		if (resource.getType() == IResource.FOLDER) {
+			if (resource.isVirtual()) {
+				return VIRTUAL_FOLDER_LABEL;
+			}
 			if (resource.isLinked()) {
 				return LINKED_FOLDER_LABEL;
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
index be279aa..5f477ad 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkspacePreferencePage.java
@@ -1,5 +1,5 @@
  /****************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
+ *     Markus Schorn (Wind River Systems) -  bug 284447
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
@@ -62,8 +64,12 @@ public class IDEWorkspacePreferencePage extends PreferencePage
 
     private IntegerFieldEditor saveInterval;
 
+	private FieldEditor workspaceName;
+
     private Button autoRefreshButton;
     
+    private Button closeUnrelatedProjectButton;
+    
     private ResourceEncodingFieldEditor encodingEditor;
 
 	private LineDelimiterEditor lineSeparatorEditor;
@@ -73,6 +79,7 @@ public class IDEWorkspacePreferencePage extends PreferencePage
 
 	private RadioGroupFieldEditor openReferencesEditor;
 
+
     /*
      * (non-Javadoc)
      * 
@@ -98,9 +105,11 @@ public class IDEWorkspacePreferencePage extends PreferencePage
         createAutoBuildPref(composite);
         createAutoRefreshControls(composite);
         createSaveAllBeforeBuildPref(composite);
+        createCloseUnrelatedProjPrefControls(composite);
         
         createSpace(composite);
         createSaveIntervalGroup(composite);
+        createWindowTitleGroup(composite);
 		createSpace(composite);
 		
 		createOpenPrefControls(composite);
@@ -139,6 +148,16 @@ public class IDEWorkspacePreferencePage extends PreferencePage
 		openReferencesEditor.setPage(this);
 		openReferencesEditor.load();
 	}
+	/**
+     * Creates controls for the preference to close unrelated projects.
+	 * @param parent The parent control
+	 */
+	private void createCloseUnrelatedProjPrefControls(Composite parent) {
+		closeUnrelatedProjectButton = new Button(parent, SWT.CHECK);
+		closeUnrelatedProjectButton.setText(IDEWorkbenchMessages.CloseUnrelatedProjectsAction_AlwaysCloseWithoutPrompt);
+		closeUnrelatedProjectButton.setToolTipText(IDEWorkbenchMessages.IDEWorkspacePreference_closeUnrelatedProjectsToolTip);
+		closeUnrelatedProjectButton.setSelection(getIDEPreferenceStore().getBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS));
+	}
 
 	protected void createSaveAllBeforeBuildPref(Composite composite) {
         autoSaveAllButton = new Button(composite, SWT.CHECK);
@@ -203,7 +222,32 @@ public class IDEWorkspacePreferencePage extends PreferencePage
         });
 
     }
-	
+
+    /**
+     * Create a composite that contains entry fields specifying the workspace name
+     * preference.
+     * 
+     * @param composite the Composite the group is created in.
+     */
+    private void createWindowTitleGroup(Composite composite) {
+        Composite groupComposite = new Composite(composite, SWT.LEFT);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        groupComposite.setLayout(layout);
+        GridData gd = new GridData();
+        gd.horizontalAlignment = GridData.FILL;
+        gd.grabExcessHorizontalSpace = true;
+        groupComposite.setLayoutData(gd);
+
+        workspaceName = new StringFieldEditor(
+                IDEInternalPreferences.WORKSPACE_NAME, IDEWorkbenchMessages.IDEWorkspacePreference_workspaceName,
+                groupComposite);
+
+        workspaceName.setPreferenceStore(getIDEPreferenceStore());
+        workspaceName.load();
+        workspaceName.setPage(this);
+    }
+
 	/**
      * Create the Refresh controls
      * 
@@ -331,6 +375,10 @@ public class IDEWorkspacePreferencePage extends PreferencePage
                 .setSelection(store
                         .getDefaultBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD));
         saveInterval.loadDefault();
+        workspaceName.loadDefault();
+        
+        boolean closeUnrelatedProj = store.getDefaultBoolean(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS);
+        closeUnrelatedProjectButton.setSelection(closeUnrelatedProj);
 
 		
         boolean autoRefresh = ResourcesPlugin.getPlugin()
@@ -396,12 +444,18 @@ public class IDEWorkspacePreferencePage extends PreferencePage
             }
         }
         
+        workspaceName.store();
+        
         Preferences preferences = ResourcesPlugin.getPlugin()
                 .getPluginPreferences();
 
         boolean autoRefresh = autoRefreshButton.getSelection();
         preferences.setValue(ResourcesPlugin.PREF_AUTO_REFRESH, autoRefresh);
         
+        boolean closeUnrelatedProj = closeUnrelatedProjectButton.getSelection();
+        getIDEPreferenceStore().setValue(IDEInternalPreferences.CLOSE_UNRELATED_PROJECTS, closeUnrelatedProj);
+        
+        
         if (clearUserSettings) {
 			IDEEncoding.clearUserEncodings();
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java
new file mode 100644
index 0000000..be2d738
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourceEditor.java
@@ -0,0 +1,981 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.ide.dialogs;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.TreeMap;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.TreeColumnLayout;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * UI to edit the location of the linked resources contained in a project.
+ * @since 3.5
+ * 
+ */
+public class LinkedResourceEditor {
+
+	
+	private static int NAME_COLUMN = 0;
+	private static int PATH_COLUMN = -1;
+	private static int LOCATION_COLUMN = 1;
+	
+    // sizing constants
+    private static final int SIZING_SELECTION_PANE_WIDTH = 400;
+
+    // used to compute layout sizes
+    private FontMetrics fontMetrics;
+
+    /**
+	 * 
+	 */
+	public LinkedResourceEditor() {
+		absoluteImg = IDEWorkbenchPlugin.getIDEImageDescriptor(
+				"obj16/warning.gif").createImage(); //$NON-NLS-1$
+		brokenImg = IDEWorkbenchPlugin.getIDEImageDescriptor(
+				"obj16/error_tsk.gif").createImage(); //$NON-NLS-1$
+		fixedImg = IDEWorkbenchPlugin
+				.getIDEImageDescriptor("obj16/folder.gif").createImage(); //$NON-NLS-1$
+
+		FIXED = IDEWorkbenchMessages.LinkedResourceEditor_fixed;
+		BROKEN = IDEWorkbenchMessages.LinkedResourceEditor_broken;
+		ABSOLUTE = IDEWorkbenchMessages.LinkedResourceEditor_absolute;
+	}
+
+	/**
+	 * @param project
+	 */
+	public void setProject(IProject project) {
+		fProject = project;
+	}
+
+	protected void createButtons(Composite parent) {
+        Font font = parent.getFont();
+        Composite groupComponent = new Composite(parent, SWT.NULL);
+        GridLayout groupLayout = new GridLayout();
+        groupLayout.marginWidth = 0;
+        groupLayout.marginHeight = 0;
+        groupComponent.setLayout(groupLayout);
+        GridData data = new GridData();
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        groupComponent.setLayoutData(data);
+        groupComponent.setFont(font);
+
+		fEditResourceButton = createButton(groupComponent,
+				IDEWorkbenchMessages.LinkedResourceEditor_editLinkedLocation);
+		fEditResourceButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				editLocation();
+			}
+		});
+
+		fConvertAbsoluteButton = createButton(groupComponent,
+				IDEWorkbenchMessages.LinkedResourceEditor_convertToVariableLocation);
+		fConvertAbsoluteButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				convertLocation();
+			}
+		});
+		updateSelection();
+	}
+
+	/**
+	 * @param parent
+	 * @param text
+	 * @return the new button
+	 */
+	private Button createButton(Composite parent, String text) {
+		Button button = new Button(parent, SWT.PUSH);
+		button.setText(text);
+		button.setFont(parent.getFont());
+        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics,
+                IDialogConstants.BUTTON_WIDTH);
+        data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT,
+                SWT.DEFAULT, true).x);
+        button.setLayoutData(data);
+		return button;
+	}
+
+	/**
+	 * Creates the widget group. Callers must call <code>dispose</code> when the
+	 * group is no longer needed.
+	 * 
+	 * @param parent
+	 *            the widget parent
+	 * @return container of the widgets
+	 */
+	public Control createContents(Composite parent) {
+        Font font = parent.getFont();
+
+        initializeDialogUnits(parent);
+
+        // define container & its layout
+        Composite pageComponent = new Composite(parent, SWT.NULL);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        pageComponent.setLayout(layout);
+        GridData data = new GridData(GridData.FILL_BOTH);
+        data.widthHint = SIZING_SELECTION_PANE_WIDTH;
+        pageComponent.setLayoutData(data);
+        pageComponent.setFont(font);
+
+        // layout the table & its buttons
+        Label variableLabel = new Label(pageComponent, SWT.LEFT);
+        variableLabel.setText(NLS
+				.bind(IDEWorkbenchMessages.LinkedResourceEditor_descriptionBlock,
+						fProject != null? fProject.getName():new String()));
+
+        data = new GridData();
+        data.horizontalAlignment = GridData.FILL;
+        data.horizontalSpan = 2;
+        variableLabel.setLayoutData(data);
+        variableLabel.setFont(font);
+
+		Composite treeComposite = new Composite(pageComponent, SWT.NONE);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		treeComposite.setLayoutData(data);
+
+		fTree = new TreeViewer(treeComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
+
+		fTree.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				updateSelection();
+			}
+		});
+
+		data = new GridData(GridData.FILL_BOTH);
+		data.heightHint = fTree.getTree().getItemHeight() * 10;
+		data.horizontalSpan = 1;
+		fTree.getTree().setLayoutData(data);
+		fTree.getTree().setLinesVisible(true);
+
+		fTree.setContentProvider(new ContentProvider());
+		fTree.setLabelProvider(new LabelProvider());
+		fTree.setInput(this);
+
+		TreeColumn nameColumn = new TreeColumn(fTree.getTree(), SWT.LEFT, NAME_COLUMN);
+		nameColumn.setText(IDEWorkbenchMessages.LinkedResourceEditor_resourceName);
+		nameColumn.setResizable(true);
+		nameColumn.setMoveable(false);
+
+		TreeColumn locationColumn = new TreeColumn(fTree.getTree(), SWT.LEFT, LOCATION_COLUMN);
+		locationColumn.setText(IDEWorkbenchMessages.LinkedResourceEditor_location);
+		locationColumn.setResizable(true);
+		locationColumn.setMoveable(false);
+
+		TreeColumnLayout tableLayout = new TreeColumnLayout();
+		treeComposite.setLayout( tableLayout );
+
+		tableLayout.setColumnData(nameColumn, new ColumnWeightData(170));
+		tableLayout.setColumnData(locationColumn, new ColumnWeightData(260));
+
+		fTree.getTree().setFont(font);
+		fTree.getTree().setHeaderVisible(true);
+		createButtons(pageComponent);
+
+		fTree.getTree().addMouseListener(new MouseListener() {
+			public void mouseDoubleClick(MouseEvent e) {
+		        if (getSelectedResource().length == 1)
+		        	editLocation();
+			}
+			public void mouseDown(MouseEvent e) { }
+			public void mouseUp(MouseEvent e) { }
+        });
+
+        return pageComponent;
+	}
+
+    private void initializeDialogUnits(Control control) {
+        // Compute and store a font metric
+        GC gc = new GC(control);
+        gc.setFont(control.getFont());
+        fontMetrics = gc.getFontMetrics();
+        gc.dispose();
+    }
+
+    /**
+     * 
+    */
+	public void dispose() {
+		fixedImg.dispose();
+		brokenImg.dispose();
+		absoluteImg.dispose();
+	}
+
+	class LabelProvider implements ILabelProvider,
+			ITableLabelProvider {
+
+		WorkbenchLabelProvider stockProvider = new WorkbenchLabelProvider();
+		public LabelProvider() {
+			super();
+		}
+
+		public String getColumnText(Object obj, int index) {
+			if (obj instanceof IResource) {
+				IResource resource = (IResource) obj;
+				if (index == NAME_COLUMN)
+					return resource.getName();
+				else if (index == PATH_COLUMN)
+					return resource.getParent()
+							.getProjectRelativePath().toPortableString();
+				else {
+					IPath rawLocation = resource.getRawLocation();
+					if (rawLocation != null)
+				    	return resource.getPathVariableManager().convertToUserEditableFormat(rawLocation.toOSString(), true);
+				}
+			} else if ((obj instanceof String) && index == 0)
+				return (String) obj;
+			return null;
+		}
+
+		public Image getColumnImage(Object obj, int index) {
+			if (index == NAME_COLUMN) {
+				if (obj instanceof String) {
+					if (obj.equals(BROKEN))
+						return brokenImg;
+					if (obj.equals(ABSOLUTE))
+						return absoluteImg;
+					return fixedImg;
+				}
+				return stockProvider.getImage(obj);
+			}
+			return null;
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
+		 */
+		public void addListener(ILabelProviderListener listener) {
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+		 */
+		public void dispose() {
+			stockProvider.dispose();
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
+		 */
+		public boolean isLabelProperty(Object element, String property) {
+			return stockProvider.isLabelProperty(element, property);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
+		 */
+		public void removeListener(ILabelProviderListener listener) {
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
+		 */
+		public Image getImage(Object element) {
+			return getColumnImage(element, 0);
+		}
+
+		/* (non-Javadoc)
+		 * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
+		 */
+		public String getText(Object element) {
+			return getColumnText(element, 0);
+		}
+	}
+
+	class ContentProvider implements IContentProvider, ITreeContentProvider {
+
+		public void dispose() {
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement instanceof LinkedResourceEditor) {
+				ArrayList list = new ArrayList(); 
+				Object[] objs = { BROKEN, ABSOLUTE, FIXED };
+				for (int i = 0; i < objs.length; i++) {
+					Object[] children = getChildren(objs[i]);
+					if (children != null && children.length > 0)
+						list.add(objs[i]);
+				}
+				return list.toArray(new Object[0]);
+			} else if (parentElement instanceof String) {
+				if (((String) parentElement).equals(BROKEN))
+					return fBrokenResources.values().toArray();
+				if (((String) parentElement).equals(ABSOLUTE))
+					return fAbsoluteResources.values().toArray();
+				return fFixedResources.values().toArray();
+			}
+			return null;
+		}
+
+		public Object getParent(Object element) {
+			if (element instanceof IResource) {
+				String fullPath = ((IResource) element).getFullPath()
+						.toPortableString();
+				if (fBrokenResources.containsKey(fullPath))
+					return BROKEN;
+				if (fAbsoluteResources.containsKey(fullPath))
+					return ABSOLUTE;
+				return FIXED;
+			} else if (element instanceof String)
+				return this;
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			if (element instanceof LinkedResourceEditor) {
+				return true;
+			} else if (element instanceof String) {
+				if (((String) element).equals(BROKEN))
+					return !fBrokenResources.isEmpty();
+				if (((String) element).equals(ABSOLUTE))
+					return !fAbsoluteResources.isEmpty();
+				return !fFixedResources.isEmpty();
+			}
+			return false;
+		}
+
+		public Object[] getElements(Object parentElement) {
+			return getChildren(parentElement);
+		}
+	}
+
+	void refreshContent() {
+		if (fProjectFiles == null) {
+			final LinkedList/* <IResource> */resources = new LinkedList/*
+																		 * <IResource
+																		 * >
+																		 */();
+			try {
+				fProject.accept(new IResourceVisitor() {
+					/**
+					 * @throws CoreException
+					 */
+					public boolean visit(IResource resource)
+							throws CoreException {
+						if (resource.isLinked() && !resource.isVirtual())
+							resources.add(resource);
+						return true;
+					}
+				});
+			} catch (CoreException e) {
+			}
+			fProjectFiles = (IResource[]) resources.toArray(new IResource[0]);
+		}
+		fBrokenResources = new TreeMap/* <String, IResource> */();
+		fFixedResources = new TreeMap/* <String, IResource> */();
+		fAbsoluteResources = new TreeMap/* <String, IResource> */();
+		for (int i = 0; i < fProjectFiles.length; i++) {
+			IResource resource = fProjectFiles[i];
+			String fullPath = resource.getFullPath().toPortableString();
+			try {
+				if (exists(resource)) {
+					if (isAbsolute(resource))
+						fAbsoluteResources.put(fullPath, resource);
+					else
+						fFixedResources.put(fullPath, resource);
+				} else
+					fBrokenResources.put(fullPath, resource);
+			} catch (CoreException e) {
+				fBrokenResources.put(fullPath, resource);
+			}
+		}
+	}
+
+	boolean isAbsolute(IResource res) {
+		IPath path = res.getRawLocation();
+		return path != null && path.isAbsolute();
+	}
+
+	boolean areAbsolute(IResource[] res) {
+		for (int i = 0; i < res.length; i++) {
+			if (!isAbsolute(res[i]))
+				return false;
+		}
+		return true;
+	}
+
+	boolean exists(IResource res) throws CoreException {
+		URI uri = res.getLocationURI();
+		if (uri != null) {
+			IFileStore fileStore = EFS.getStore(uri);
+			return (fileStore != null) && fileStore.fetchInfo().exists();
+		}
+		return false;
+	}
+
+	void updateSelection() {
+		fEditResourceButton.setEnabled(getSelectedResource().length == 1);
+		fConvertAbsoluteButton.setEnabled((getSelectedResource().length > 0)
+				&& (areAbsolute(getSelectedResource())
+				|| areFixed(getSelectedResource())));
+	}
+
+	boolean areFixed(IResource[] res) {
+		for (int i = 0; i < res.length; i++) {
+			String fullPath = res[i].getFullPath().toPortableString();
+			if (!fFixedResources.containsKey(fullPath))
+				return false;
+		}
+		return true;
+	}
+
+	IResource[] getSelectedResource() {
+		IStructuredSelection selection = (IStructuredSelection) fTree
+				.getSelection();
+		Object[] array = selection.toArray();
+		if (array.length > 0) {
+			for (int i = 0; i < array.length; i++) {
+				if (!(array[i] instanceof IResource))
+					return new IResource[0];
+			}
+			IResource[] result = new IResource[array.length];
+			System.arraycopy(array, 0, result, 0, array.length);
+			return result;
+		}
+		return new IResource[0];
+	}
+
+	private void convertLocation() {
+		if (MessageDialog.openConfirm(fConvertAbsoluteButton.getShell(), 
+				IDEWorkbenchMessages.LinkedResourceEditor_convertTitle, 
+				IDEWorkbenchMessages.LinkedResourceEditor_convertMessage)) {
+			ArrayList/* <IResource> */resources = new ArrayList/* <IResource> */();
+			IResource[] selectedResources = getSelectedResource();
+			resources.addAll(Arrays.asList(selectedResources));
+			if (areFixed(selectedResources))
+				convertToAbsolute(resources, selectedResources);
+			else
+				convertToRelative(resources, selectedResources);
+		}
+	}
+
+	private void convertToAbsolute(ArrayList/* <IResource> */resources,
+			IResource[] selectedResources) {
+		ArrayList/* <String> */report = new ArrayList/* <String> */();
+
+		Iterator/* <IResource> */it = resources.iterator();
+		while (it.hasNext()) {
+			IResource res = (IResource) it.next();
+			IPath location = res.getLocation();
+
+			try {
+				setLinkLocation(res, location);
+				report
+						.add(NLS
+								.bind(
+										IDEWorkbenchMessages.LinkedResourceEditor_changedTo,
+										new Object[] {
+												res.getProjectRelativePath()
+														.toPortableString(),
+												res.getRawLocation()
+														.toOSString(),
+												location.toOSString() }));
+			} catch (CoreException e) {
+				report
+						.add(NLS
+								.bind(
+										IDEWorkbenchMessages.LinkedResourceEditor_unableToSetLinkLocationForResource,
+										res.getProjectRelativePath()
+												.toPortableString()));
+			}
+		}
+
+		reportResult(
+				selectedResources,
+				report,
+				IDEWorkbenchMessages.LinkedResourceEditor_convertRelativePathLocations);
+	}
+
+	/**
+	 * @param res
+	 * @param location
+	 * @throws CoreException 
+	 */
+	private void setLinkLocation(IResource res, IPath location) throws CoreException {
+		if (res.getType() == IResource.FILE)
+			((IFile)res).createLink(location, IResource.REPLACE,
+					new NullProgressMonitor());
+		if (res.getType() == IResource.FOLDER)
+			((IFolder)res).createLink(location, IResource.REPLACE,
+					new NullProgressMonitor());
+	}
+
+	/**
+	 * @param selectedResources
+	 * @param report
+	 */
+	private void reportResult(IResource[] selectedResources,
+			ArrayList/* <String> */report, String title) {
+		StringBuffer message = new StringBuffer();
+		Iterator/* <String> */stringIt = report.iterator();
+		while (stringIt.hasNext()) {
+			message.append(stringIt.next());
+			if (stringIt.hasNext())
+				message.append("\n"); //$NON-NLS-1$
+		}
+		final String resultMessage = message.toString();
+		MessageDialog dialog = new MessageDialog(fConvertAbsoluteButton
+				.getShell(), title, null,
+				IDEWorkbenchMessages.LinkedResourceEditor_convertionResults,
+				MessageDialog.INFORMATION,
+				new String[] { IDEWorkbenchMessages.linkedResourceEditor_OK },
+				0) {
+
+			/* (non-Javadoc)
+			 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+			 */
+			protected boolean isResizable() {
+				return true;
+			}
+
+			protected Control createCustomArea(Composite comp) {
+				setShellStyle(getShellStyle() | SWT.RESIZE);
+				Composite parent = new Composite(comp, 0);
+				GridLayout layout = new GridLayout();
+				layout.marginHeight = 0;
+				layout.marginWidth = 0;
+				layout.marginLeft = 2;
+				layout.numColumns = 1;
+				layout.verticalSpacing = 9;
+				parent.setLayout(layout);
+				parent.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+				Text text = new Text(parent, SWT.BORDER | SWT.MULTI
+						| SWT.V_SCROLL | SWT.H_SCROLL);
+				text.setText(resultMessage.toString());
+				GridData data = new GridData(640, 300);
+				text.setLayoutData(data);
+				return parent;
+			}
+
+		};
+		dialog.open();
+		reparent(selectedResources);
+	}
+
+	private IPath convertToProperCase(IPath path) {
+		if (Platform.getOS().equals(Platform.OS_WIN32))
+			return Path.fromPortableString(path.toPortableString()
+					.toLowerCase());
+		return path;
+	}
+
+	/**
+	 * @param resources
+	 * @param selectedResources
+	 */
+	private void convertToRelative(ArrayList/* <IResource> */resources,
+			IResource[] selectedResources) {
+		ArrayList/* <String> */report = new ArrayList/* <String> */();
+		
+		// first, try to use the automatic converter
+		ArrayList/* <IResource> */remaining = new ArrayList/* <IResource> */();
+		Iterator/* <IResource> */it = resources.iterator();
+		while (it.hasNext()) {
+			IResource res = (IResource) it.next();
+			IPath location = res.getLocation();
+			try {
+				IPath newLocation = URIUtil.toPath(res.getPathVariableManager().convertToRelative(URIUtil.toURI(location), true, null));
+				if (newLocation == null || newLocation.equals(location))
+					remaining.add(res);
+				else {
+					setLinkLocation(res, newLocation);
+					report
+							.add(NLS
+									.bind(
+											IDEWorkbenchMessages.LinkedResourceEditor_changedTo,
+											new Object[] {
+													res
+															.getProjectRelativePath()
+															.toPortableString(),
+													location.toOSString(),
+													newLocation
+															.toOSString() }));
+				}
+			} catch (CoreException e) {
+				remaining.add(res);
+			}
+		}
+		resources = remaining;
+		remaining = new ArrayList();
+		// try for each to match with an existing variable
+		String[] variables = fProject.getPathVariableManager()
+				.getPathVariableNames();
+
+		it = resources.iterator();
+		int amountLeft = 0;
+		while (it.hasNext()) {
+			IResource res = (IResource) it.next();
+			IPath location = res.getLocation();
+
+			int maxCount = 0;
+			int variable = -1;
+			for (int i = 0; i < variables.length; i++) {
+				IPath resolvePath = URIUtil.toPath(res.getPathVariableManager().resolveURI(
+						URIUtil.toURI(Path.fromOSString(variables[i]))));
+				if (resolvePath
+						.isPrefixOf(convertToProperCase(location))) {
+					int count = location
+							.matchingFirstSegments(resolvePath);
+					if (count > maxCount) {
+						maxCount = count;
+						variable = i;
+					}
+				}
+			}
+			if (variable != -1) {
+				IPath newLocation = Path.fromOSString(variables[variable])
+						.append(location.removeFirstSegments(maxCount));
+				try {
+					setLinkLocation(res, newLocation);
+					report
+							.add(NLS
+									.bind(
+											IDEWorkbenchMessages.LinkedResourceEditor_changedTo,
+											new Object[] {
+													res
+															.getProjectRelativePath()
+															.toPortableString(),
+													location.toOSString(),
+													newLocation
+															.toOSString() }));
+				} catch (CoreException e) {
+					variable = -1;
+				}
+			}
+
+			if (variable == -1) {
+				amountLeft++;
+				remaining.add(res);
+			}
+		}
+		resources = remaining;
+
+		if (amountLeft > 1) {
+			// try to generate a generic variable
+			it = resources.iterator();
+			IPath commonPath = null;
+			while (it.hasNext()) {
+				IResource res = (IResource) it.next();
+				IPath location = res.getLocation();
+
+				if (commonPath == null)
+					commonPath = location;
+				else {
+					int count = commonPath.matchingFirstSegments(location);
+					if (count < commonPath.segmentCount())
+						commonPath = commonPath.removeLastSegments(commonPath
+								.segmentCount()
+								- count);
+				}
+				if (commonPath.segmentCount() == 0)
+					break;
+			}
+			if (commonPath.segmentCount() > 1) {
+				String variableName = getSuitablePathVariable(commonPath);
+				try {
+					fProject.getPathVariableManager().setURIValue(variableName,
+							URIUtil.toURI(commonPath));
+				} catch (CoreException e) {
+					report
+							.add(NLS
+									.bind(
+											IDEWorkbenchMessages.LinkedResourceEditor_unableToCreateVariable,
+											variableName, commonPath
+													.toOSString()));
+				}
+				it = resources.iterator();
+				while (it.hasNext()) {
+					IResource res = (IResource) it.next();
+					IPath location = res.getLocation();
+					int commonCount = location
+							.matchingFirstSegments(commonPath);
+					IPath newLocation = Path.fromOSString(variableName).append(
+							location.removeFirstSegments(commonCount));
+					try {
+						setLinkLocation(res, newLocation);
+						report
+								.add(NLS
+										.bind(
+												IDEWorkbenchMessages.LinkedResourceEditor_changedTo,
+												new Object[] {
+														res
+																.getProjectRelativePath()
+																.toPortableString(),
+														location
+																.toOSString(),
+														newLocation
+																.toOSString() }));
+					} catch (CoreException e) {
+						report
+								.add(NLS
+										.bind(
+												IDEWorkbenchMessages.LinkedResourceEditor_unableToSetLinkLocationForResource,
+												res.getProjectRelativePath()
+														.toPortableString()));
+					}
+				}
+			} else {
+				report
+						.add(IDEWorkbenchMessages.LinkedResourceEditor_unableToFindCommonPathSegments);
+				it = resources.iterator();
+				while (it.hasNext()) {
+					IResource res = (IResource) it.next();
+					report.add(res.getProjectRelativePath().toPortableString());
+				}
+			}
+		} else if (!resources.isEmpty()) {
+			IResource res = (IResource) resources.get(0);
+			IPath resLocation = res.getLocation();
+			IPath commonPath = resLocation.removeLastSegments(1);
+			String variableName = getSuitablePathVariable(commonPath);
+			try {
+				fProject.getPathVariableManager().setURIValue(variableName, 
+						URIUtil.toURI(commonPath));
+			} catch (CoreException e) {
+				report
+						.add(NLS
+								.bind(
+										IDEWorkbenchMessages.LinkedResourceEditor_unableToCreateVariable,
+										variableName, commonPath
+												.toPortableString()));
+			}
+			IPath location = res.getLocation();
+			int commonCount = location.matchingFirstSegments(commonPath);
+			IPath newLocation = Path.fromOSString(variableName).append(
+					location.removeFirstSegments(commonCount));
+			try {
+				setLinkLocation(res, newLocation);
+				report
+						.add(NLS
+								.bind(
+										IDEWorkbenchMessages.LinkedResourceEditor_changedTo,
+										new Object[] {
+												res.getProjectRelativePath()
+														.toPortableString(),
+												location.toOSString(),
+												newLocation.toOSString() }));
+			} catch (CoreException e) {
+				report
+						.add(NLS
+								.bind(
+										IDEWorkbenchMessages.LinkedResourceEditor_unableToSetLinkLocationForResource,
+										res.getProjectRelativePath()
+												.toPortableString()));
+			}
+		}
+		reportResult(
+				selectedResources,
+				report,
+				IDEWorkbenchMessages.LinkedResourceEditor_convertAbsolutePathLocations);
+	}
+
+	private String getSuitablePathVariable(IPath commonPath) {
+		String variableName = commonPath.lastSegment();
+		if (variableName == null) {
+			variableName = commonPath.getDevice();
+			if (variableName == null)
+				variableName = "ROOT"; //$NON-NLS-1$
+			else
+				variableName = variableName.substring(0, variableName.length() -1); // remove the tailing ':'
+		}
+		StringBuffer buf = new StringBuffer();
+		for (int i = 0; i < variableName.length(); i++) {
+			char c = variableName.charAt(i);
+			if (Character.isLetterOrDigit(c) || (c == '_'))
+				buf.append(c);
+			else
+				buf.append('_');
+
+		}
+		variableName = buf.toString();
+		int index = 1;
+		while (fProject.getPathVariableManager().isDefined(variableName)) {
+			variableName += index;
+			index++;
+		}
+		return variableName;
+	}
+
+	void editLocation() {
+		IResource resource = getSelectedResource()[0];
+
+		IPath location = resource.getRawLocation();
+
+		PathVariableDialog dialog = new PathVariableDialog(
+				fConvertAbsoluteButton.getShell(),
+				PathVariableDialog.EDIT_LINK_LOCATION, resource.getType(),
+				resource.getPathVariableManager(), null);
+		if (location != null)
+			dialog.setLinkLocation(location);
+		dialog.setResource(resource);
+		if (dialog.open() == Window.CANCEL) {
+			return;
+		}
+		location = Path.fromOSString(dialog.getVariableValue());
+		try {
+			setLinkLocation(resource, location);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		reparent(new IResource[] { resource });
+	}
+
+	void reparent(IResource[] resources) {
+		boolean changed = false;
+
+		for (int i = 0; i < resources.length; i++) {
+			IResource resource = resources[i];
+			boolean isBroken;
+			try {
+				isBroken = !exists(resource);
+			} catch (CoreException e) {
+				isBroken = true;
+			}
+			TreeMap/* <String, IResource> */container = null;
+			if (isBroken)
+				container = fBrokenResources;
+			else {
+				if (isAbsolute(resource))
+					container = fAbsoluteResources;
+				else
+					container = fFixedResources;
+			}
+			String fullPath = resource.getFullPath().toPortableString();
+
+			if (!container.containsKey(fullPath)) {
+				fBrokenResources.remove(fullPath);
+				fAbsoluteResources.remove(fullPath);
+				fFixedResources.remove(fullPath);
+
+				container.put(fullPath, resource);
+				changed = true;
+			}
+		}
+		if (changed)
+			fTree.refresh();
+	}
+
+	IResource fProjectFiles[] = null;
+	TreeMap/* <String, IResource> */fBrokenResources = new TreeMap/*
+																	 * <String,
+																	 * IResource
+																	 * >
+																	 */();
+	TreeMap/* <String, IResource> */fAbsoluteResources = new TreeMap/*
+																	 * <String,
+																	 * IResource
+																	 * >
+																	 */();
+	TreeMap/* <String, IResource> */fFixedResources = new TreeMap/*
+																 * <String,
+																 * IResource>
+																 */();
+
+	IProject fProject;
+	TreeViewer fTree;
+	Button fEditResourceButton;
+	Button fConvertAbsoluteButton;
+
+	Image fixedImg = null;
+	Image brokenImg = null;
+	Image absoluteImg = null;
+
+	String FIXED;
+	String BROKEN;
+	String ABSOLUTE;
+
+	/**
+	 * @return true
+	 */
+	public boolean performOk() {
+		return true;
+	}
+
+	/**
+	 * @param enableLinking
+	 */
+	public void setEnabled(boolean enableLinking) {
+	}
+
+	/**
+	 * 
+	 */
+	public void reloadContent() {
+		refreshContent();
+		fTree.refresh();
+		updateSelection();
+		fTree.expandAll();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourcesPreferencePage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourcesPreferencePage.java
index 979efc9..5013c5a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourcesPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/LinkedResourcesPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,6 +31,7 @@ import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+import org.eclipse.ui.internal.ide.ResourceDragAndDropEditor;
 
 /**
  * Preference page for linked resources. 
@@ -45,8 +46,14 @@ public class LinkedResourcesPreferencePage extends PreferencePage implements
         IWorkbenchPreferencePage {
     private Label topLabel;
 
+    /**
+     */
+    public static String PREF_ID = "org.eclipse.ui.preferencePages.LinkedResources"; //$NON-NLS-1$
+    
     private PathVariablesGroup pathVariablesGroup;
 
+	private ResourceDragAndDropEditor dragAndDropHandlingEditor;
+
     /**
      * Constructs a preference page of path variables.
      * Omits "Restore Defaults"/"Apply Changes" buttons.
@@ -105,6 +112,7 @@ public class LinkedResourcesPreferencePage extends PreferencePage implements
                     }
                 });
 
+		createLineSeparatorEditorControls(pageComponent);
         createSpace(pageComponent);
 
         topLabel = new Label(pageComponent, SWT.NONE);
@@ -126,6 +134,34 @@ public class LinkedResourcesPreferencePage extends PreferencePage implements
         return pageComponent;
     }
 
+    /* (non-Javadoc)
+	 * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
+	 */
+	protected void performDefaults() {
+		dragAndDropHandlingEditor.loadDefault();
+		super.performDefaults();
+	}
+
+	/**
+     * Create a composite that contains the line delimiter controls
+     * 
+     * @param parent
+     */
+    private void createLineSeparatorEditorControls(Composite parent){
+    	Composite lineComposite = new Composite(parent,SWT.NONE);
+		final GridLayout gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		gridLayout.marginHeight = 0;
+		lineComposite.setLayout(gridLayout);
+		lineComposite.setFont(parent.getFont());
+
+		lineComposite.setLayoutData(new GridData(
+                GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
+		
+		dragAndDropHandlingEditor = new ResourceDragAndDropEditor(lineComposite);
+		dragAndDropHandlingEditor.doLoad();
+    }
+
     /**
      * Creates a tab of one horizontal spans.
      *
@@ -167,6 +203,7 @@ public class LinkedResourcesPreferencePage extends PreferencePage implements
      * @see PathVariablesGroup#performOk()
      */
     public boolean performOk() {
+		dragAndDropHandlingEditor.store();
         return pathVariablesGroup.performOk();
     }
 
@@ -178,5 +215,6 @@ public class LinkedResourcesPreferencePage extends PreferencePage implements
     protected void updateWidgetState(boolean enableLinking) {
         topLabel.setEnabled(enableLinking);
         pathVariablesGroup.setEnabled(enableLinking);
+        dragAndDropHandlingEditor.setEnabled(enableLinking);
     }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java
index 3c653a0..260c6f5 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,19 +9,28 @@
  *     IBM Corporation - initial API and implementation
  *     Sebastian Davids <sdavids at gmx.de> - 19346, 42056
  *     Remy Chi Jian Suen - bug 204879
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
+ *     Helena Halperin (IBM) - bug #299212
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
+import java.net.URI;
 import java.util.Set;
 
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IPathVariableManager;
 import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -37,6 +46,7 @@ import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.ide.dialogs.PathVariableSelectionDialog;
 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 
 /**
@@ -53,15 +63,20 @@ public class PathVariableDialog extends TitleAreaDialog {
     private Label variableNameLabel;
 
     private Label variableValueLabel;
+    
+    private Label variableResolvedValueLabel;
 
     private Text variableNameField;
 
     private Text variableValueField;
 
+    private Label variableResolvedValueField;
+
     private Button fileButton;
 
     private Button folderButton;
 
+    private Button variableButton;
     /**
      * This dialog type: <code>NEW_VARIABLE</code> or
      * <code>EXISTING_VARIABLE</code>.
@@ -94,7 +109,7 @@ public class PathVariableDialog extends TitleAreaDialog {
      * Used to select the proper message depending on the current mode
      * (new/existing variable).
      */
-    private boolean newVariable;
+    private int operationMode = 0;
 
     /**
      * Reference to the path variable manager. It is used for validating
@@ -153,6 +168,14 @@ public class PathVariableDialog extends TitleAreaDialog {
     public final static int EXISTING_VARIABLE = 2;
 
     /**
+     * Constant for defining this dialog as intended to edit an existing link
+     * location (value = 3).
+     */
+    public final static int EDIT_LINK_LOCATION = 3;
+
+    private IResource currentResource = null;
+
+    /**
      * Constructs a dialog for editing a new/existing path variable.
      * 
      * @param parentShell the parent shell
@@ -167,18 +190,19 @@ public class PathVariableDialog extends TitleAreaDialog {
             IPathVariableManager pathVariableManager, Set namesInUse) {
         super(parentShell);
         this.type = type;
-        this.newVariable = type == NEW_VARIABLE;
+        this.operationMode = type;
         this.variableName = ""; //$NON-NLS-1$
         this.variableValue = ""; //$NON-NLS-1$
         this.variableType = variableType;
         this.pathVariableManager = pathVariableManager;
         this.namesInUse = namesInUse;
 
-        if (newVariable) {
-			this.standardMessage = IDEWorkbenchMessages.PathVariableDialog_message_newVariable;
-		} else {
-			this.standardMessage = IDEWorkbenchMessages.PathVariableDialog_message_existingVariable;
-		}
+        if (operationMode == NEW_VARIABLE)
+            this.standardMessage = IDEWorkbenchMessages.PathVariableDialog_message_newVariable;
+        else if (operationMode == EXISTING_VARIABLE)
+            this.standardMessage = IDEWorkbenchMessages.PathVariableDialog_message_existingVariable;
+        else
+            this.standardMessage = IDEWorkbenchMessages.PathVariableDialog_message_editLocation;
     }
 
     /**
@@ -188,12 +212,12 @@ public class PathVariableDialog extends TitleAreaDialog {
      */
     protected void configureShell(Shell shell) {
         super.configureShell(shell);
-        if (newVariable) {
-			shell.setText(IDEWorkbenchMessages.PathVariableDialog_shellTitle_newVariable);
-		} else {
-			shell
-                    .setText(IDEWorkbenchMessages.PathVariableDialog_shellTitle_existingVariable);
-		}
+        if (operationMode == NEW_VARIABLE)
+            shell.setText(IDEWorkbenchMessages.PathVariableDialog_shellTitle_newVariable);
+        else if (operationMode == EXISTING_VARIABLE)
+            shell.setText(IDEWorkbenchMessages.PathVariableDialog_shellTitle_existingVariable);
+        else
+            shell.setText(IDEWorkbenchMessages.PathVariableDialog_shellTitle_editLocation);
     }
 
     /**
@@ -237,11 +261,12 @@ public class PathVariableDialog extends TitleAreaDialog {
         contents.setLayout(new GridLayout(3, false));
         contents.setLayoutData(new GridData(GridData.FILL_BOTH));
 
-        if (newVariable) {
-			setTitle(IDEWorkbenchMessages.PathVariableDialog_dialogTitle_newVariable);
-		} else {
-			setTitle(IDEWorkbenchMessages.PathVariableDialog_dialogTitle_existingVariable);
-		}
+        if (operationMode == NEW_VARIABLE)
+            setTitle(IDEWorkbenchMessages.PathVariableDialog_dialogTitle_newVariable);
+        else if (operationMode == EXISTING_VARIABLE)
+            setTitle(IDEWorkbenchMessages.PathVariableDialog_dialogTitle_existingVariable);
+        else
+            setTitle(IDEWorkbenchMessages.PathVariableDialog_dialogTitle_editLinkLocation);
         setMessage(standardMessage);
         return contents;
     }
@@ -254,28 +279,30 @@ public class PathVariableDialog extends TitleAreaDialog {
     private void createWidgets(Composite contents) {
         String nameLabelText = IDEWorkbenchMessages.PathVariableDialog_variableName;
         String valueLabelText = IDEWorkbenchMessages.PathVariableDialog_variableValue;
-
-        // variable name label
-        variableNameLabel = new Label(contents, SWT.LEAD);
-        variableNameLabel.setText(nameLabelText);
-     
-        // variable name field.  Attachments done after all widgets created.
-        variableNameField = new Text(contents, SWT.SINGLE | SWT.BORDER);
-        variableNameField.setText(variableName);
-        variableNameField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
-        		false));
-        variableNameField.addModifyListener(new ModifyListener() {
-            public void modifyText(ModifyEvent event) {
-                variableNameModified();
-            }
-        });
-        
-        // this is a padding control to take up space in the GridLayout
-        new Label(contents, SWT.LEAD);
+        String resolvedValueLabelText = IDEWorkbenchMessages.PathVariableDialog_variableResolvedValue;
+
+        if (operationMode != EDIT_LINK_LOCATION) {
+	        // variable name label
+	        variableNameLabel = new Label(contents, SWT.LEAD);
+	        variableNameLabel.setText(nameLabelText);
+	        variableNameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+
+	        // variable name field.  Attachments done after all widgets created.
+	        variableNameField = new Text(contents, SWT.SINGLE | SWT.BORDER);
+	        variableNameField.setText(variableName);
+	        variableNameField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+	        		false, 2, 1));
+	        variableNameField.addModifyListener(new ModifyListener() {
+	            public void modifyText(ModifyEvent event) {
+	                variableNameModified();
+	            }
+	        });
+        }
         
         // variable value label
         variableValueLabel = new Label(contents, SWT.LEAD);
         variableValueLabel.setText(valueLabelText);
+        variableValueLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
 
         // variable value field.  Attachments done after all widgets created.
         variableValueField = new Text(contents, SWT.SINGLE | SWT.BORDER);
@@ -290,43 +317,110 @@ public class PathVariableDialog extends TitleAreaDialog {
         
         Composite buttonsComposite = new Composite(contents, SWT.NONE);
         buttonsComposite.setLayoutData(new GridData(SWT.END, SWT.CENTER, false,
-        		false));
-        GridLayout layout = new GridLayout(2, true);
+        		false, 1, 1));
+        GridLayout layout = new GridLayout(0, true);
         layout.marginWidth = 0;
         layout.marginHeight = 0;
         buttonsComposite.setLayout(layout);
 
-        // select file path button
-        fileButton = new Button(buttonsComposite, SWT.PUSH);
-        fileButton.setText(IDEWorkbenchMessages.PathVariableDialog_file);
-        fileButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
-        		false));
-        if ((variableType & IResource.FILE) == 0) {
-			fileButton.setEnabled(false);
+        if ((variableType & IResource.FILE) != 0) {
+        	layout.numColumns++;
+	        // select file path button
+	        fileButton = new Button(buttonsComposite, SWT.PUSH);
+	        fileButton.setText(IDEWorkbenchMessages.PathVariableDialog_file);
+	        fileButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+	        		false));
+	
+	        fileButton.addSelectionListener(new SelectionAdapter() {
+	            public void widgetSelected(SelectionEvent e) {
+	                selectFile();
+	            }
+	        });
+	        setButtonLayoutData(fileButton);
 		}
 
-        fileButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                selectFile();
-            }
-        });
-
-        // select folder path button
-        folderButton = new Button(buttonsComposite, SWT.PUSH);
-        folderButton.setText(IDEWorkbenchMessages.PathVariableDialog_folder);
-        folderButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
-        		false));
-        if ((variableType & IResource.FOLDER) == 0) {
-			folderButton.setEnabled(false);
-		}
+        if ((variableType & IResource.FOLDER) != 0) {
+        	layout.numColumns++;
+	        // select folder path button
+	        folderButton = new Button(buttonsComposite, SWT.PUSH);
+	        folderButton.setText(IDEWorkbenchMessages.PathVariableDialog_folder);
+	        folderButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+	        		false));
+	
+	        folderButton.addSelectionListener(new SelectionAdapter() {
+	            public void widgetSelected(SelectionEvent e) {
+	                selectFolder();
+	            }
+	        });
+	        setButtonLayoutData(folderButton);
+        }
 
-        folderButton.addSelectionListener(new SelectionAdapter() {
-            public void widgetSelected(SelectionEvent e) {
-                selectFolder();
-            }
-        });
+        // the workspace path variable manager does not support variables.
+        if (currentResource != null) {
+        	layout.numColumns++;
+	    	variableButton = new Button(buttonsComposite, SWT.PUSH);
+	    	variableButton.setText(IDEWorkbenchMessages.PathVariableDialog_variable);
+	
+	 	    variableButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
+	    		false));
+	
+	        variableButton.addSelectionListener(new SelectionAdapter() {
+	            public void widgetSelected(SelectionEvent e) {
+	                selectVariable();
+	            }
+	        });
+	        setButtonLayoutData(variableButton);
+
+	        // variable value label
+	        variableResolvedValueLabel = new Label(contents, SWT.LEAD);
+	        variableResolvedValueLabel.setText(resolvedValueLabelText);
+
+	        // variable value field.  Attachments done after all widgets created.
+	        variableResolvedValueField = new Label(contents, SWT.LEAD | SWT.SINGLE | SWT.READ_ONLY);
+	        variableResolvedValueField.setText(TextProcessor.process(getVariableResolvedValue()));
+	        variableResolvedValueField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,
+	        		false, 2, 1));
+        }
     }
 
+    private IPathVariableManager getPathVariableManager() {
+    	if (currentResource != null)
+    		return currentResource.getPathVariableManager();
+    	return ResourcesPlugin.getWorkspace().getPathVariableManager();
+    }
+    
+    private String getVariableResolvedValue() {
+        if (currentResource != null) {
+        	IPathVariableManager pathVariableManager2 = currentResource.getPathVariableManager();
+			String[] variables = pathVariableManager2.getPathVariableNames();
+    		String internalFormat = pathVariableManager2.convertFromUserEditableFormat(variableValue, operationMode == EDIT_LINK_LOCATION);
+    		URI uri = URIUtil.toURI(Path.fromOSString(internalFormat));
+        	URI resolvedURI = pathVariableManager2.resolveURI(uri);
+        	String resolveValue = URIUtil.toPath(resolvedURI).toOSString();
+        	// Delete intermediate variables that might have been created as
+        	// as a side effect of converting arbitrary relative paths to an internal string. 
+        	String[] newVariables = pathVariableManager2.getPathVariableNames();
+        	for (int i = 0; i < newVariables.length; i++) {
+        		boolean found = false;
+            	for (int j = 0; j < variables.length; j++) {
+            		if (variables[j].equals(newVariables[i])) {
+            			found = true;
+            			break;
+            		}
+            	}
+            	if (!found) {
+					try {
+						pathVariableManager2.setURIValue(newVariables[i], null);
+					} catch (CoreException e) {
+						// do nothing
+					}
+            	}
+        	}
+        	return resolveValue;
+        }
+        return variableValue;
+    }
+    
     /**
      * Fires validations (variable name first) and updates enabled state for the
      * "Ok" button accordingly.
@@ -335,7 +429,7 @@ public class PathVariableDialog extends TitleAreaDialog {
         // updates and validates the variable name
         variableName = variableNameField.getText();
         validationStatus = IMessageProvider.NONE;
-        okButton.setEnabled(validateVariableName() && validateVariableValue());
+        okButton.setEnabled(validateVariableName() && validateVariableValue() && variableValue.length() != 0);
         nameEntered = true;
     }
 
@@ -349,6 +443,8 @@ public class PathVariableDialog extends TitleAreaDialog {
         validationStatus = IMessageProvider.NONE;
         okButton.setEnabled(validateVariableValue() && validateVariableName());
         locationEntered = true;
+        if (variableResolvedValueField != null)
+        	variableResolvedValueField.setText(TextProcessor.process(getVariableResolvedValue()));        
     }
 
     /**
@@ -358,7 +454,8 @@ public class PathVariableDialog extends TitleAreaDialog {
         DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.SHEET);
         dialog.setText(IDEWorkbenchMessages.PathVariableDialog_selectFolderTitle);
         dialog.setMessage(IDEWorkbenchMessages.PathVariableDialog_selectFolderMessage);
-        dialog.setFilterPath(variableValue);
+        String filterPath = getVariableResolvedValue();
+        dialog.setFilterPath(filterPath);
         String res = dialog.open();
         if (res != null) {
             variableValue = new Path(res).makeAbsolute().toOSString();
@@ -372,7 +469,8 @@ public class PathVariableDialog extends TitleAreaDialog {
     private void selectFile() {
         FileDialog dialog = new FileDialog(getShell(), SWT.SHEET);
         dialog.setText(IDEWorkbenchMessages.PathVariableDialog_selectFileTitle);
-        dialog.setFilterPath(variableValue);
+        String filterPath = getVariableResolvedValue();
+        dialog.setFilterPath(filterPath);
         String res = dialog.open();
         if (res != null) {
             variableValue = new Path(res).makeAbsolute().toOSString();
@@ -380,7 +478,32 @@ public class PathVariableDialog extends TitleAreaDialog {
         }
     }
 
-    /**
+    private void selectVariable() {
+        PathVariableSelectionDialog dialog = new PathVariableSelectionDialog(
+                getShell(), IResource.FILE | IResource.FOLDER);
+        dialog.setResource(currentResource);
+        if (dialog.open() == IDialogConstants.OK_ID) {
+            String[] variableNames = (String[]) dialog.getResult();
+            if (variableNames != null && variableNames.length == 1) {
+                String newValue = variableNames[0];
+            	IPath path = Path.fromOSString(newValue);
+                if (operationMode != EDIT_LINK_LOCATION && currentResource != null && !path.isAbsolute() && path.segmentCount() > 0) {
+                	path = buildVariableMacro(path);
+                	newValue = path.toOSString();
+                }
+                variableValue = newValue;
+                variableValueField.setText(newValue);
+            }
+        }
+    }
+
+	private IPath buildVariableMacro(IPath relativeSrcValue) {
+		String variable = relativeSrcValue.segment(0);
+		variable = "${" + variable + "}";  //$NON-NLS-1$//$NON-NLS-2$
+		return Path.fromOSString(variable).append(relativeSrcValue.removeFirstSegments(1));
+	}
+
+	/**
      * Adds buttons to this dialog's button bar.
      * 
      * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar
@@ -402,6 +525,9 @@ public class PathVariableDialog extends TitleAreaDialog {
     private boolean validateVariableName() {
         boolean allowFinish = false;
 
+        if (operationMode == EDIT_LINK_LOCATION)
+            return true;
+
         // if the current validationStatus is ERROR, no additional validation applies
         if (validationStatus == IMessageProvider.ERROR) {
 			return false;
@@ -473,6 +599,30 @@ public class PathVariableDialog extends TitleAreaDialog {
                 newValidationStatus = IMessageProvider.ERROR;
                 message = IDEWorkbenchMessages.PathVariableDialog_variableValueEmptyMessage;
             }
+        }
+        if (currentResource != null) {
+            // While editing project path variables, the variable value can
+            // contain macros such as "${foo}\etc"
+            allowFinish = true;
+            String resolvedValue = getVariableResolvedValue();
+            IPath resolvedPath = Path.fromOSString(resolvedValue);
+            if (!IDEResourceInfoUtils.exists(resolvedPath.toOSString())) {
+                // the path does not exist (warning)
+                message = IDEWorkbenchMessages.PathVariableDialog_pathDoesNotExistMessage;
+                newValidationStatus = IMessageProvider.WARNING;
+            } else {
+                IFileInfo info = IDEResourceInfoUtils.getFileInfo(resolvedPath
+                        .toOSString());
+                if ((info.isDirectory() && ((variableType & IResource.FOLDER) == 0)) ||
+                		(!info.isDirectory() && ((variableType & IResource.FILE) == 0))){
+                    allowFinish = false;
+                    newValidationStatus = IMessageProvider.ERROR;
+                    if (((variableType & IResource.FOLDER) != 0))
+                        message = IDEWorkbenchMessages.PathVariableDialog_variableValueIsWrongTypeFolder;
+                    else
+                        message = IDEWorkbenchMessages.PathVariableDialog_variableValueIsWrongTypeFile;
+                }
+            }
         } else if (!Path.EMPTY.isValidPath(variableValue)) {
             // the variable value is an invalid path
             message = IDEWorkbenchMessages.PathVariableDialog_variableValueInvalidMessage;
@@ -516,7 +666,11 @@ public class PathVariableDialog extends TitleAreaDialog {
      * @return the variable value
      */
     public String getVariableValue() {
-        return variableValue;
+    	if (currentResource != null) {
+    		String internalFormat = getPathVariableManager().convertFromUserEditableFormat(variableValue, operationMode == EDIT_LINK_LOCATION);
+    		return internalFormat;
+    	}
+    	return variableValue;
     }
 
     /**
@@ -532,12 +686,28 @@ public class PathVariableDialog extends TitleAreaDialog {
     /**
      * Sets the variable value.
      * 
-     * @param variableValue the new variable value
+     * @param variable the new variable value
      */
-    public void setVariableValue(String variableValue) {
-        this.variableValue = variableValue;
+    public void setVariableValue(String variable) {
+    	String userEditableString = getPathVariableManager().convertToUserEditableFormat(variable, operationMode == EDIT_LINK_LOCATION);
+        variableValue = userEditableString;
     }
-    
+
+    /**
+     * @param resource
+     */
+    public void setResource(IResource resource) {
+    	currentResource = resource;
+    }
+
+    /**
+     * @param location
+     */
+    public void setLinkLocation(IPath location) {
+    	String userEditableString = getPathVariableManager().convertToUserEditableFormat(location.toOSString(), operationMode == EDIT_LINK_LOCATION);
+        variableValue = userEditableString;
+    }
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.jface.dialogs.Dialog#isResizable()
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableEditDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableEditDialog.java
new file mode 100644
index 0000000..430a7f4
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariableEditDialog.java
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.dialogs;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+
+/**
+ * A dialog that allows a user to browse, edit, add, and remove path variables
+ * for a given project.
+ * 
+ * @since 3.6
+ */
+public class PathVariableEditDialog extends SelectionDialog {
+
+	private PathVariablesGroup pathVariablesGroup;
+
+	/**
+	 * Creates a path variable selection dialog.
+	 * 
+	 * @param parentShell
+	 *            the parent shell
+	 */
+	public PathVariableEditDialog(Shell parentShell) {
+		super(parentShell);
+		setTitle(IDEWorkbenchMessages.PathVariableSelectionDialog_title);
+		pathVariablesGroup = new PathVariablesGroup(false, IResource.FOLDER,
+				null);
+		setShellStyle(getShellStyle() | SWT.RESIZE);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
+	 */
+	protected void buttonPressed(int buttonId) {
+		super.buttonPressed(buttonId);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.window.Window#close()
+	 */
+	public boolean close() {
+		pathVariablesGroup.dispose();
+		return super.close();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+				IIDEHelpContextIds.PATH_VARIABLE_SELECTION_DIALOG);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse
+	 * .swt.widgets.Composite)
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+	 * .Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		// create composite
+		Composite dialogArea = (Composite) super.createDialogArea(parent);
+
+		pathVariablesGroup.createContents(dialogArea);
+		return dialogArea;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	protected void okPressed() {
+		// Sets the dialog result to the selected path variable name(s).
+		try {
+			if (pathVariablesGroup.performOk()) {
+				PathVariablesGroup.PathVariableElement[] selection = pathVariablesGroup
+						.getSelection();
+				String[] variableNames = new String[selection.length];
+
+				for (int i = 0; i < selection.length; i++) {
+					variableNames[i] = selection[i].name;
+				}
+				setSelectionResult(variableNames);
+			} else {
+				setSelectionResult(null);
+			}
+			super.okPressed();
+		} catch (Throwable t) {
+			t.printStackTrace();
+		}
+	}
+
+	/**
+	 * Sets the project for which variables are being edited
+	 * 
+	 * @param resource
+	 *            The project whose variables are being edited
+	 */
+	public void setResource(IResource resource) {
+		pathVariablesGroup.setResource(resource);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java
index 60a167a..d4ce2d9 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/PathVariablesGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,9 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Group and Project Path Variable Support
+ *     Helena Halperin (IBM) - bug #299212
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
+import java.net.URI;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
@@ -18,6 +21,7 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 
 import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IPathVariableManager;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -27,15 +31,31 @@ import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.TableColumnLayout;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.window.ToolTip;
 import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontMetrics;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -45,7 +65,6 @@ import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.ui.ISharedImages;
 import org.eclipse.ui.PlatformUI;
@@ -83,7 +102,7 @@ public class PathVariablesGroup {
 
     private Label variableLabel;
 
-    private Table variableTable;
+    private TableViewer variableTable;
 
     private Button addButton;
 
@@ -112,6 +131,9 @@ public class PathVariablesGroup {
     // reference to the workspace's path variable manager
     private IPathVariableManager pathVariableManager;
 
+    // if set to true, variables will be saved after each change
+    private boolean saveVariablesOnChange = false;
+    
     // file image
     private final Image FILE_IMG = PlatformUI.getWorkbench().getSharedImages()
             .getImage(ISharedImages.IMG_OBJ_FILE);
@@ -120,10 +142,18 @@ public class PathVariablesGroup {
     private final Image FOLDER_IMG = PlatformUI.getWorkbench()
             .getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
 
+    private final Image BUILTIN_IMG = PlatformUI.getWorkbench()
+            .getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
     // unknown (non-existent) image. created locally, dispose locally
     private Image imageUnkown;
 
-    /**
+    // current project for which the variables are being edited.
+    // If null, the workspace variables are being edited instead.
+    private IResource currentResource = null;
+
+    private final static String PARENT_VARIABLE_NAME = "PARENT"; //$NON-NLS-1$
+    
+	/**
      * Creates a new PathVariablesGroup.
      *
      * @param multiSelect create a multi select tree
@@ -167,6 +197,7 @@ public class PathVariablesGroup {
                 PathVariableDialog.NEW_VARIABLE, variableType,
                 pathVariableManager, tempPathVariables.keySet());
 
+        dialog.setResource(currentResource);
         // opens the dialog - just returns if the user cancels it
         if (dialog.open() == Window.CANCEL) {
 			return;
@@ -179,7 +210,8 @@ public class PathVariablesGroup {
         tempPathVariables.put(newVariableName, newVariableValue);
 
         // the UI must be updated
-        updateWidgetState(newVariableName);
+        updateWidgetState();
+        saveVariablesIfRequired();
     }
 
     /**
@@ -217,7 +249,13 @@ public class PathVariablesGroup {
 
         // layout the table & its buttons
         variableLabel = new Label(pageComponent, SWT.LEFT);
-        variableLabel.setText(IDEWorkbenchMessages.PathVariablesBlock_variablesLabel);
+        if (currentResource == null)
+            variableLabel.setText(IDEWorkbenchMessages.PathVariablesBlock_variablesLabel);
+        else
+            variableLabel.setText(NLS.bind(
+                                    IDEWorkbenchMessages.PathVariablesBlock_variablesLabelForResource,
+                                    currentResource.getName()));
+
         data = new GridData();
         data.horizontalAlignment = GridData.FILL;
         data.horizontalSpan = 2;
@@ -228,8 +266,15 @@ public class PathVariablesGroup {
         if (multiSelect) {
             tableStyle |= SWT.MULTI;
         }
-        variableTable = new Table(pageComponent, tableStyle);
-        variableTable.addSelectionListener(new SelectionAdapter() {
+        
+		Composite tableComposite = new Composite(pageComponent, SWT.NONE);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		tableComposite.setLayoutData(data);
+
+		variableTable = new TableViewer(tableComposite, tableStyle);
+        variableTable.getTable().addSelectionListener(new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
                 updateEnabledState();
                 if (selectionListener != null) {
@@ -237,19 +282,117 @@ public class PathVariablesGroup {
 				}
             }
         });
-        data = new GridData(GridData.FILL_BOTH);
-        data.heightHint = variableTable.getItemHeight() * 7;
-        variableTable.setLayoutData(data);
-        variableTable.setFont(font);
+        
+        variableTable.getTable().setFont(font);
+		ColumnViewerToolTipSupport.enableFor(variableTable, ToolTip.NO_RECREATE);
 
-        createButtonGroup(pageComponent);
-        // populate table with current internal state and set buttons' initial state
-        updateWidgetState(null);
+		TableViewerColumn nameColumn = new TableViewerColumn(variableTable, SWT.NONE);
+		nameColumn.setLabelProvider(new NameLabelProvider());
+		nameColumn.getColumn().setText(IDEWorkbenchMessages.PathVariablesBlock_nameColumn);
 
+        TableViewerColumn valueColumn = new TableViewerColumn(variableTable, SWT.NONE);
+        valueColumn.setLabelProvider(new ValueLabelProvider());
+        valueColumn.getColumn().setText(IDEWorkbenchMessages.PathVariablesBlock_valueColumn);
+        
+        TableColumnLayout tableLayout = new TableColumnLayout();
+		tableComposite.setLayout( tableLayout );
+
+		tableLayout.setColumnData(nameColumn.getColumn(), new ColumnWeightData(150));
+		tableLayout.setColumnData(valueColumn.getColumn(), new ColumnWeightData(280));
+
+		variableTable.getTable().setHeaderVisible(true);
+        data = new GridData(GridData.FILL_BOTH);
+        data.heightHint = variableTable.getTable().getItemHeight() * 7;
+        variableTable.getTable().setLayoutData(data);
+        variableTable.getTable().setFont(font);
+
+        variableTable.getTable().addMouseListener(new MouseListener() {
+			public void mouseDoubleClick(MouseEvent e) {
+		        int itemsSelectedCount = variableTable.getTable().getSelectionCount();
+		        if (itemsSelectedCount == 1 && canChangeSelection())
+		        	editSelectedVariable();
+			}
+			public void mouseDown(MouseEvent e) { }
+			public void mouseUp(MouseEvent e) { }
+        });
+        variableTable.getTable().addSelectionListener(new SelectionListener() {
+			public void widgetSelected(SelectionEvent e) {
+		        updateEnabledState();
+			}
+			public void widgetDefaultSelected(SelectionEvent e) {
+		        updateEnabledState();
+			}
+        });
+        
+        variableTable.getTable().setToolTipText(null);
+        variableTable.setContentProvider(new ContentProvider());
+        variableTable.setInput(this);
+        createButtonGroup(pageComponent);
         return pageComponent;
     }
 
-    /**
+    class NameLabelProvider extends CellLabelProvider
+    {
+		public String getToolTipText(Object element) {
+            return null;
+		}
+
+		public Point getToolTipShift(Object object) {
+			return new Point(5, 5);
+		}
+
+		public int getToolTipDisplayDelayTime(Object object) {
+			return 0;
+		}
+
+		public int getToolTipTimeDisplayed(Object object) {
+			return 15000;
+		}
+
+		public void update(ViewerCell cell) {
+			String varName = (String) cell.getElement();
+			cell.setText(varName);
+			IPath value = (IPath) tempPathVariables.get(varName);
+        	URI resolvedURI = pathVariableManager.resolveURI(URIUtil.toURI(value));
+        	IPath resolvedValue = URIUtil.toPath(resolvedURI);
+            IFileInfo file = IDEResourceInfoUtils.getFileInfo(resolvedValue);
+            if (!isBuiltInVariable(varName))
+            	cell.setImage(file.exists() ? (file.isDirectory() ? FOLDER_IMG : FILE_IMG) : imageUnkown);
+            else
+            	cell.setImage(BUILTIN_IMG);
+		}
+    	
+    }
+    
+    class ValueLabelProvider extends CellLabelProvider
+    {
+		public String getToolTipText(Object element) {
+            IPath value = (IPath) tempPathVariables.get(element);
+        	URI resolvedURI = pathVariableManager.resolveURI(URIUtil.toURI(value));
+        	IPath resolvedValue = URIUtil.toPath(resolvedURI);
+            return TextProcessor.process(resolvedValue.toOSString());
+		}
+
+		public Point getToolTipShift(Object object) {
+			return new Point(5, 5);
+		}
+
+		public int getToolTipDisplayDelayTime(Object object) {
+			return 0;
+		}
+
+		public int getToolTipTimeDisplayed(Object object) {
+			return 15000;
+		}
+
+		public void update(ViewerCell cell) {
+            IPath value = (IPath) tempPathVariables.get(cell.getElement());
+			cell.setText(TextProcessor.process(removeParentVariable(value.toOSString())));
+		}
+    	
+    }
+
+	/**
      * Disposes the group's resources. 
      */
     public void dispose() {
@@ -266,7 +409,7 @@ public class PathVariablesGroup {
      */
     private void editSelectedVariable() {
         // retrieves the name and value for the currently selected variable
-        TableItem item = variableTable.getItem(variableTable
+        TableItem item = variableTable.getTable().getItem(variableTable.getTable()
                 .getSelectionIndex());
         String variableName = (String) item.getData();
         IPath variableValue = (IPath) tempPathVariables.get(variableName);
@@ -277,6 +420,7 @@ public class PathVariablesGroup {
                 pathVariableManager, tempPathVariables.keySet());
         dialog.setVariableName(variableName);
         dialog.setVariableValue(variableValue.toOSString());
+        dialog.setResource(currentResource);
 
         // opens the dialog - just returns if the user cancels it
         if (dialog.open() == Window.CANCEL) {
@@ -294,8 +438,8 @@ public class PathVariablesGroup {
         tempPathVariables.put(newVariableName, newVariableValue);
 
         // now we must refresh the UI state
-        updateWidgetState(newVariableName);
-
+        updateWidgetState();
+        saveVariablesIfRequired();
     }
 
     /**
@@ -307,13 +451,28 @@ public class PathVariablesGroup {
      * 	 <code>true</code> if called prior to calling <code>createContents</code>.
      */
     public boolean getEnabled() {
-        if (variableTable != null && !variableTable.isDisposed()) {
-            return variableTable.getEnabled();
+        if (variableTable != null && !variableTable.getTable().isDisposed()) {
+            return variableTable.getTable().getEnabled();
         }
         return true;
     }
 
     /**
+     * Automatically save the path variable list when new variables
+     * are added, changed, or removed by the user. 
+     * @param value 
+     *
+     */
+    public void setSaveVariablesOnChange(boolean value) {
+    	saveVariablesOnChange = value;
+    }
+    
+    private void saveVariablesIfRequired() {
+    	if (saveVariablesOnChange) {
+    		performOk();
+    	}
+    }
+    /**
      * Returns the selected variables.
      *  
      * @return the selected variables. Returns an empty array if 
@@ -324,7 +483,7 @@ public class PathVariablesGroup {
         if (variableTable == null) {
             return new PathVariableElement[0];
         }
-        TableItem[] items = variableTable.getSelection();
+        TableItem[] items = variableTable.getTable().getSelection();
         PathVariableElement[] selection = new PathVariableElement[items.length];
 
         for (int i = 0; i < items.length; i++) {
@@ -383,6 +542,7 @@ public class PathVariablesGroup {
         });
         removeButton.setFont(font);
         setButtonLayoutData(removeButton);
+        updateEnabledState();
     }
 
     /**
@@ -411,17 +571,26 @@ public class PathVariablesGroup {
 
         tempPathVariables.clear();
         for (int i = 0; i < varNames.length; i++) {
-            IPath value = pathVariableManager.getValue(varNames[i]);
-
-            // the value may not exist any more
-            if (value != null) {
-                boolean isFile = value.toFile().isFile();
-                if ((isFile && (variableType & IResource.FILE) != 0)
-                        || (isFile == false && (variableType & IResource.FOLDER) != 0)) {
-
-                    tempPathVariables.put(varNames[i], value);
-                }
-            }
+        	// hide the PARENT variable
+        	if (varNames[i].equals(PARENT_VARIABLE_NAME))
+        		continue;
+            try {
+				URI uri = pathVariableManager.getURIValue(varNames[i]);
+				// the value may not exist any more
+				if (uri != null) {
+				    IPath value = URIUtil.toPath(uri);
+				    if (value != null) {
+				        boolean isFile = value.toFile().isFile();
+				        if ((isFile && (variableType & IResource.FILE) != 0)
+				                || (isFile == false && (variableType & IResource.FOLDER) != 0)) {
+
+				            tempPathVariables.put(varNames[i], value);
+				        }
+				    }
+				}
+			} catch (Exception e) {
+				// do not present the variable
+			}
         }
         removedVariableNames.clear();
     }
@@ -431,57 +600,36 @@ public class PathVariablesGroup {
      * variables in the table.
      */
     private void updateEnabledState() {
-        int itemsSelectedCount = variableTable.getSelectionCount();
-        editButton.setEnabled(itemsSelectedCount == 1);
-        removeButton.setEnabled(itemsSelectedCount > 0);
+        int itemsSelectedCount = variableTable.getTable().getSelectionCount();
+        editButton.setEnabled(itemsSelectedCount == 1 && canChangeSelection());
+        removeButton.setEnabled(itemsSelectedCount > 0 && canChangeSelection());
     }
 
-    /**
-     * Rebuilds table widget state with the current list of variables (reflecting
-     * any changes, additions and removals), and selects the item corresponding to
-     * the given variable name. If the variable name is <code>null</code>, the
-     * first item (if any) will be selected.
-     * 
-     * @param selectedVarName the name for the variable to be selected (may be
-     * <code>null</code>)
-     * @see IPathVariableManager#getPathVariableNames()
-     * @see IPathVariableManager#getValue(String)
-     */
-    private void updateVariableTable(String selectedVarName) {
-        variableTable.removeAll();
-        int selectedVarIndex = 0;
-        for (Iterator varNames = tempPathVariables.keySet().iterator(); varNames
-                .hasNext();) {
-            TableItem item = new TableItem(variableTable, SWT.NONE);
-            String varName = (String) varNames.next();
-            IPath value = (IPath) tempPathVariables.get(varName);
-            IFileInfo file = IDEResourceInfoUtils.getFileInfo(value);
-
-            item.setText(varName + " - " + value.toOSString()); //$NON-NLS-1$ 
-            // the corresponding variable name is stored in each table widget item
-            item.setData(varName);
-            item.setImage(file.exists() ? (file.isDirectory() ? FOLDER_IMG 
-                    : FILE_IMG ) : imageUnkown);
-            if (varName.equals(selectedVarName)) {
-				selectedVarIndex = variableTable.getItemCount() - 1;
-			}
-        }
-        if (variableTable.getItemCount() > selectedVarIndex) {
-            variableTable.setSelection(selectedVarIndex);
-            if (selectionListener != null) {
-				selectionListener.handleEvent(new Event());
-			}
-        } else if (variableTable.getItemCount() == 0
-                && selectionListener != null) {
-			selectionListener.handleEvent(new Event());
+	private class ContentProvider implements IStructuredContentProvider {
+
+		public Object[] getElements(Object inputElement) {
+			return tempPathVariables.keySet().toArray();
 		}
+		
+		public void dispose() { }
+		
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { }
+	}
+
+	/**
+     * Converts the ${PARENT-COUNT-VAR} format to "VAR/../../" format
+     * @param value
+     * @return the converted value
+     */
+    private String removeParentVariable(String value) {
+    	return pathVariableManager.convertToUserEditableFormat(value, false);
     }
-
+    
     /**
      * Commits the temporary state to the path variable manager in response to user
      * confirmation.
      * @return boolean <code>true</code> if there were no problems.
-     * @see IPathVariableManager#setValue(String, IPath)
+     * @see IPathVariableManager#setValue(String, IResource, URI)
      */
     public boolean performOk() {
         try {
@@ -491,7 +639,7 @@ public class PathVariablesGroup {
                 String removedVariableName = (String) removed.next();
                 // only removes variables that have not been added again
                 if (!tempPathVariables.containsKey(removedVariableName)) {
-					pathVariableManager.setValue(removedVariableName, null);
+					pathVariableManager.setURIValue(removedVariableName, null);
 				}
             }
 
@@ -501,7 +649,8 @@ public class PathVariablesGroup {
                 Map.Entry entry = (Map.Entry) current.next();
                 String variableName = (String) entry.getKey();
                 IPath variableValue = (IPath) entry.getValue();
-                pathVariableManager.setValue(variableName, variableValue);
+                if (!isBuiltInVariable(variableName))
+                    pathVariableManager.setURIValue(variableName, URIUtil.toURI(variableValue));
             }
             // re-initialize temporary state
             initTemporaryState();
@@ -519,14 +668,37 @@ public class PathVariablesGroup {
      */
     private void removeSelectedVariables() {
         // remove each selected element
-        int[] selectedIndices = variableTable.getSelectionIndices();
+        int[] selectedIndices = variableTable.getTable().getSelectionIndices();
         for (int i = 0; i < selectedIndices.length; i++) {
-            TableItem selectedItem = variableTable.getItem(selectedIndices[i]);
+            TableItem selectedItem = variableTable.getTable().getItem(selectedIndices[i]);
             String varName = (String) selectedItem.getData();
             removedVariableNames.add(varName);
             tempPathVariables.remove(varName);
         }
-        updateWidgetState(null);
+        updateWidgetState();
+        saveVariablesIfRequired();
+    }
+
+    private boolean canChangeSelection() {
+        int[] selectedIndices = variableTable.getTable().getSelectionIndices();
+        for (int i = 0; i < selectedIndices.length; i++) {
+            TableItem selectedItem = variableTable.getTable().getItem(selectedIndices[i]);
+            String varName = (String) selectedItem.getData();
+            if (isBuiltInVariable(varName))
+                return false;
+        }
+        return true;
+    }
+
+    /**
+     * @param varName
+     *            the variable name to test
+     */
+    private boolean isBuiltInVariable(String varName) {
+        if (currentResource != null) {
+        	return !pathVariableManager.isUserDefined(varName);
+        }
+        return false;
     }
 
     /**
@@ -555,9 +727,9 @@ public class PathVariablesGroup {
      * @param enabled the new enabled state of the group's widgets
      */
     public void setEnabled(boolean enabled) {
-        if (variableTable != null && !variableTable.isDisposed()) {
+        if (variableTable != null && !variableTable.getTable().isDisposed()) {
             variableLabel.setEnabled(enabled);
-            variableTable.setEnabled(enabled);
+            variableTable.getTable().setEnabled(enabled);
             addButton.setEnabled(enabled);
             if (enabled) {
 				updateEnabledState();
@@ -574,10 +746,35 @@ public class PathVariablesGroup {
      * (selects the first item if <code>null</code> is provided) and updates 
      * the enabled state for the Add/Remove/Edit buttons.
      * 
-     * @param selectedVarName the name of the variable to be selected (may be null)
      */
-    private void updateWidgetState(String selectedVarName) {
-        updateVariableTable(selectedVarName);
+    private void updateWidgetState() {
+    	variableTable.refresh();
         updateEnabledState();
     }
+
+    /**
+     * @param resource
+     */
+    public void setResource(IResource resource) {
+    	currentResource = resource;
+        if (resource != null)
+        	pathVariableManager = resource.getPathVariableManager();
+        else
+        	pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
+        removedVariableNames = new HashSet();
+        tempPathVariables = new TreeMap();
+        // initialize internal model
+        initTemporaryState();
+    }
+
+	/**
+	 * Reloads the path variables from the project description.
+	 */
+	public void reloadContent() {
+        removedVariableNames = new HashSet();
+        tempPathVariables = new TreeMap();
+		initTemporaryState();
+		if (variableTable != null)
+	        updateWidgetState();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectLinkedResourcePage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectLinkedResourcePage.java
new file mode 100644
index 0000000..71d111b
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ProjectLinkedResourcePage.java
@@ -0,0 +1,208 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.dialogs;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+
+/**
+ * A property page for viewing and modifying the set
+ * of path variables in a given project.
+ * @since 3.4
+ */
+public class ProjectLinkedResourcePage extends PropertyPage implements
+		IWorkbenchPropertyPage {
+
+	 private Label topLabel;
+
+	 private PathVariablesGroup pathVariablesGroup;
+	 private LinkedResourceEditor linkedResourceEditor;
+	 
+	 /**
+	 * 
+	 */
+	public ProjectLinkedResourcePage() {
+		 pathVariablesGroup = new PathVariablesGroup(true, IResource.FILE | IResource.FOLDER);
+		 linkedResourceEditor = new LinkedResourceEditor();
+		 this.noDefaultAndApplyButton();
+	 }
+
+	protected Control createContents(Composite parent) {
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
+				IIDEHelpContextIds.LINKED_RESOURCE_PAGE);
+
+		IAdaptable adaptable = getElement();
+		 if (adaptable.getAdapter(IProject.class) != null) {
+			 IProject project = (IProject) adaptable.getAdapter(IProject.class);
+			 pathVariablesGroup.setResource(project);
+			 linkedResourceEditor.setProject(project);
+		 }
+
+		 Font font = parent.getFont();
+
+        // PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IIDEHelpContextIds.LINKED_RESOURCE_PREFERENCE_PAGE);
+        // define container & its gridding
+        Composite pageComponent = new Composite(parent, SWT.NULL);
+        GridLayout layout = new GridLayout();
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        pageComponent.setLayout(layout);
+        GridData data = new GridData();
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        pageComponent.setLayoutData(data);
+        pageComponent.setFont(font);
+
+       // createSpace(pageComponent);
+
+        TabFolder tabFolder = new TabFolder(pageComponent, SWT.TOP);
+        tabFolder.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				
+			}
+			public void widgetSelected(SelectionEvent e) {
+				TabFolder source = (TabFolder) e.getSource();
+				if (source.getSelectionIndex() == 1)
+					switchToLinkedResources();
+				else
+					switchToPathVariables();
+			}
+        });
+        
+        pageComponent.setLayout(layout);
+        data = new GridData();
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+ 		data.grabExcessHorizontalSpace = true;
+ 		data.grabExcessVerticalSpace = true;
+        tabFolder.setLayoutData(data);
+        tabFolder.setFont(font);
+
+        TabItem variableItem = new TabItem(tabFolder, SWT.BORDER);
+        
+        Composite variableComposite = new Composite(tabFolder, 0);
+        variableComposite.setLayout(new GridLayout());
+        variableComposite.setFont(font);
+
+        topLabel = new Label(variableComposite, SWT.NONE);
+        topLabel.setText(IDEWorkbenchMessages.ProjectLinkedResourcePage_description);
+        data = new GridData();
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        topLabel.setLayoutData(data);
+        topLabel.setFont(font);
+
+        pathVariablesGroup.createContents(variableComposite);
+
+        variableItem.setControl(variableComposite);
+        variableItem.setText(IDEWorkbenchMessages.ProjectLinkedResourcePage_pathVariableTabTitle);
+
+        TabItem linkedResourceItem = new TabItem(tabFolder, SWT.BORDER);
+
+        Composite linkedResourceComposite = new Composite(tabFolder, 0);
+        linkedResourceComposite.setLayout(new GridLayout());
+        linkedResourceComposite.setFont(font);
+
+        linkedResourceEditor.createContents(linkedResourceComposite);
+
+        linkedResourceItem.setControl(linkedResourceComposite);
+        linkedResourceItem.setText(IDEWorkbenchMessages.ProjectLinkedResourcePage_linkedResourcesTabTitle);
+
+        updateWidgetState(true);
+        return pageComponent;
+	}
+
+	private void switchToPathVariables() {
+		pathVariablesGroup.reloadContent();
+	}
+	private void switchToLinkedResources() {
+		pathVariablesGroup.performOk();
+		linkedResourceEditor.reloadContent();
+	}
+
+    /**
+     * Creates a tab of one horizontal spans.
+     *
+     * @param parent  the parent in which the tab should be created
+     */
+    protected static void createSpace(Composite parent) {
+        Label vfiller = new Label(parent, SWT.LEFT);
+        GridData gridData = new GridData();
+        gridData = new GridData();
+        gridData.horizontalAlignment = GridData.BEGINNING;
+        gridData.grabExcessHorizontalSpace = false;
+        gridData.verticalAlignment = GridData.CENTER;
+        gridData.grabExcessVerticalSpace = false;
+        vfiller.setLayoutData(gridData);
+    }
+
+    /**
+     * Disposes the path variables group.
+     * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
+     */
+    public void dispose() {
+        pathVariablesGroup.dispose();
+        linkedResourceEditor.dispose();
+        super.dispose();
+    }
+
+    /**
+     * Empty implementation. This page does not use the workbench.
+     * @param workbench 
+     * 
+     * @see IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+     */
+    public void init(IWorkbench workbench) {
+    }
+
+    /**
+     * Commits the temporary state to the path variable manager in response to user
+     * confirmation.
+     * 
+     * @see PreferencePage#performOk()
+     * @see PathVariablesGroup#performOk()
+     */
+    public boolean performOk() {
+        return pathVariablesGroup.performOk() && linkedResourceEditor.performOk();
+    }
+
+    /**
+     * Set the widget enabled state
+     * 
+     * @param enableLinking the new widget enabled state
+     */
+    protected void updateWidgetState(boolean enableLinking) {
+        topLabel.setEnabled(enableLinking);
+        pathVariablesGroup.setEnabled(enableLinking);
+        linkedResourceEditor.setEnabled(enableLinking);
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/RelativePathVariableGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/RelativePathVariableGroup.java
new file mode 100644
index 0000000..80e695f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/RelativePathVariableGroup.java
@@ -0,0 +1,354 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.ide.dialogs;
+
+import java.net.URI;
+import java.util.ArrayList;
+
+import org.eclipse.core.filesystem.URIUtil;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IPathVariableManager;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+
+/**
+ * @since 3.4
+ *
+ */
+public class RelativePathVariableGroup {
+
+	private Button variableCheckbox = null;
+	
+	private Combo variableCombo = null;
+	
+	private Shell shell;
+	
+	private IModel content;
+	
+	private String label;
+	
+	public interface IModel {
+		/**
+		 * @return
+		 */
+		IResource getResource();
+
+		/**
+		 * @param object
+		 */
+		void setVariable(String string);
+
+		/**
+		 * @return
+		 */
+		String getVariable();
+	}
+	/**
+	 * 
+	 */
+	public RelativePathVariableGroup(IModel content) {
+		this.content = content;
+	}
+
+	public RelativePathVariableGroup(IModel content, String label) {
+		this.content = content;
+		this.label = label;
+	}
+
+	/**
+	 * @param variableGroup 
+	 * @return the control
+	 */
+	public Control createContents(Composite variableGroup) {
+		shell = variableGroup.getShell();
+
+		variableCheckbox = new Button(variableGroup, SWT.CHECK);
+		variableCheckbox.setText(label != null? label:IDEWorkbenchMessages.ImportTypeDialog_importElementsAs);
+		GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+		variableCheckbox.setFont(variableGroup.getFont());
+		variableCheckbox.setLayoutData(gridData);
+		variableCheckbox.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				selectRelativeCombo();
+			}
+			public void widgetSelected(SelectionEvent e) {
+				selectRelativeCombo();
+			}
+			private void selectRelativeCombo() {
+				if (variableCheckbox.getSelection()) {
+					variableCombo.setEnabled(true);
+					selectVariable(variableCombo.getItem(variableCombo.getSelectionIndex()));
+					variableCheckbox.setToolTipText(IDEWorkbenchMessages.ImportTypeDialog_importElementsAsTooltipSet);
+				}
+				else {
+					variableCombo.setEnabled(false);
+					content.setVariable(null);
+					variableCheckbox.setToolTipText(IDEWorkbenchMessages.ImportTypeDialog_importElementsAsTooltip);
+				}
+				setupVariableCheckboxToolTip();
+			}
+		});
+		
+		variableCombo = new Combo(variableGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
+		gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); // GridData.FILL_HORIZONTAL);
+		variableCombo.setLayoutData(gridData);
+		variableCombo.setFont(variableGroup.getFont());
+		variableCombo.addSelectionListener(new SelectionListener() {
+			public void widgetDefaultSelected(SelectionEvent e) {
+				if (variableCombo.getSelectionIndex() == (variableCombo.getItemCount() -1))
+					editVariables();
+				else
+					selectVariable(variableCombo.getItem(variableCombo.getSelectionIndex()));
+			}
+			public void widgetSelected(SelectionEvent e) {
+				if (variableCombo.getSelectionIndex() == (variableCombo.getItemCount() -1))
+					editVariables();
+				else
+					selectVariable(variableCombo.getItem(variableCombo.getSelectionIndex()));
+			}
+		});
+		setupVariableContent();
+		selectVariable("PROJECT_LOC"); //$NON-NLS-1$
+		return variableGroup;
+	}
+
+	/**
+	 * 
+	 */
+	public void setupVariableContent() {
+		IPathVariableManager pathVariableManager;
+		if (content.getResource() != null)
+			pathVariableManager = content.getResource().getPathVariableManager();
+		else
+			pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();
+		String[] variables = pathVariableManager.getPathVariableNames();
+		
+		ArrayList items = new ArrayList();
+		for (int i = 0; i < variables.length; i++) {
+			if (variables[i].equals("PARENT")) //$NON-NLS-1$
+				continue;
+			items.add(variables[i]);
+		}
+		items.add(IDEWorkbenchMessages.ImportTypeDialog_editVariables);
+		variableCombo.setItems((String[]) items.toArray(new String[0]));
+	}
+
+	private void setupVariableCheckboxToolTip() {
+		if (variableCheckbox != null) {
+			if (variableCheckbox.getSelection())
+				variableCheckbox.setToolTipText(IDEWorkbenchMessages.ImportTypeDialog_importElementsAsTooltipSet);
+			else
+				variableCheckbox.setToolTipText(IDEWorkbenchMessages.ImportTypeDialog_importElementsAsTooltip);
+		}
+	}
+
+	private void editVariables() {
+		String selectedItem = content.getVariable();
+		PathVariableEditDialog dialog = new PathVariableEditDialog(shell);
+		dialog.setResource(content.getResource());
+		if (dialog.open() == IDialogConstants.OK_ID) {
+			String[] variableNames = (String[]) dialog.getResult();
+			if (variableNames != null && variableNames.length >= 1) {
+				selectedItem = variableNames[0];
+			}
+		}
+		setupVariableContent();
+		if (selectedItem != null) {
+			selectVariable(selectedItem);
+		}
+	}
+
+	/**
+	 * @param var
+	 */
+	public void selectVariable(String var) {
+		String[] items = variableCombo.getItems();
+		for (int i = 0; i < items.length; i++) {
+			if (var.equals(items[i])) {
+				variableCombo.select(i);
+				content.setVariable(items[i]);
+				return;
+			}
+		}
+		variableCombo.select(0);
+		content.setVariable(items[0]);
+	}
+
+	/**
+	 * @param b
+	 */
+	public void setEnabled(boolean b) {
+		variableCheckbox.setEnabled(b);
+		variableCombo.setEnabled(variableCheckbox.getSelection() && variableCheckbox.isEnabled());
+		setupVariableCheckboxToolTip();
+	}
+
+	/**
+	 * @param b
+	 */
+	public void setSelection(boolean b) {
+		variableCheckbox.setSelection(b);
+		setupVariableCheckboxToolTip();
+		variableCombo.setEnabled(variableCheckbox.getSelection() && variableCheckbox.isEnabled());
+	}
+
+	/**
+	 * Find the most appropriate path variable for a set of paths.
+	 * The first thing is to find a common root for all the paths.
+	 * So for the following paths:
+	 * 		c:\foo\path\bar\dir1\file1.txt
+	 * 		c:\foo\path\bar\dir2\file2.txt
+	 * The following root will be selected:
+	 * 		c:\foo\path\bar\
+	 * Then, given all the path variable locations, the variable
+	 * who's distance (in segments) from the common root in the smallest
+	 * will be chosen.
+	 * A priority is given as to variables enclosing the root, as others
+	 * only being enclosed by the root.
+	 *
+	 * So if there's two variables, being 
+	 * 		FOO - c:\foo\
+	 * 		DIR1 - c:\foo\path\bar\dir1
+	 * And the common root is:
+	 * 		c:\foo\path\bar
+	 * FOO will be selected over DIR1, even through the distance between 
+	 * the common root and DIR1 is (1), and the distance between the 
+	 * common root and FOO is (2).  This is because selecting DIR1 would
+	 * cause the location to be relative to its parent.
+
+	 * @param paths
+	 * 		The list of items that were dragged
+	 * @param target
+	 * 		The target container onto which the items were dropped
+	 * @return the most appropriate path variable given the context
+	 */
+	public static String getPreferredVariable(IPath[] paths,
+			IContainer target) {
+		IPath commonRoot = null;
+		for (int i = 0; i < paths.length; i++) {
+			if (paths[i] != null) {
+				if (commonRoot == null)
+					commonRoot = paths[i];
+				else  {
+					int count = commonRoot.matchingFirstSegments(paths[i]);
+					int remainingSegments = commonRoot.segmentCount() - count;
+					if (remainingSegments <= 0)
+						return null;
+					commonRoot = commonRoot.removeLastSegments(remainingSegments);
+				}
+			}
+		}
+		
+		String mostAppropriate = null;
+		String mostAppropriateToParent = null;
+		int mostAppropriateCount = Integer.MAX_VALUE;
+		int mostAppropriateCountToParent = Integer.MAX_VALUE;
+		IPathVariableManager pathVariableManager = target.getPathVariableManager();
+		String [] variables = pathVariableManager.getPathVariableNames();
+		
+		for (int i = 0; i < variables.length; i++) {
+			if (isPreferred(variables[i])) {
+				URI rawValue = pathVariableManager.getURIValue(variables[i]);
+				URI value = pathVariableManager.resolveURI(rawValue);
+				if (value != null) {
+					IPath path = URIUtil.toPath(value);
+					if (path != null) {
+						int difference = path.matchingFirstSegments(commonRoot);
+						if (difference > 0) {
+							if (difference < mostAppropriateCount) {
+								mostAppropriateCount = difference;
+								mostAppropriate = variables[i];
+							}
+						}
+						else {
+							// calculate if commonRoot could be relative to the parent of path
+							difference = commonRoot.matchingFirstSegments(path);
+							if (difference > 0) {
+								if (difference < mostAppropriateCountToParent) {
+									mostAppropriateCountToParent = difference;
+									mostAppropriateToParent = variables[i];
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+		
+		if (mostAppropriate == null) {
+			if (mostAppropriateToParent == null)
+				return "PROJECT_LOC"; //$NON-NLS-1$
+			return mostAppropriateToParent;
+		}
+		return mostAppropriate;
+	}
+	
+	private static boolean isPreferred(String variableName) {
+		return !(variableName.equals("WORKSPACE_LOC") || //$NON-NLS-1$
+				variableName.equals("PARENT_LOC") || //$NON-NLS-1$
+				variableName.equals("PARENT")); //$NON-NLS-1$
+	}
+
+	/**
+	 * Return the most appropriate path variable given the context
+	 * @param sources
+	 * 		The list of resources that were dragged
+	 * @param target
+	 * 		The target container onto which the resources were dropped
+	 * @return the most appropriate path variable given the context
+	 */
+	public static String getPreferredVariable(IResource[] sources,
+			IContainer target) {
+		IPath[] paths = new IPath[sources.length];
+		for (int i = 0; i < sources.length; i++) {
+			paths[i] = sources[i].getLocation();
+		}
+		return getPreferredVariable(paths, target);
+	}
+
+	/**
+	 * Return the most appropriate path variable given the context
+	 * @param names
+	 * 		The list of files that were dragged
+	 * @param target
+	 * 		The target container onto which the files were dropped
+	 * @return the most appropriate path variable given the context
+	 */
+	public static String getPreferredVariable(String[] names,
+			IContainer target) {
+		IPath[] paths = new IPath[names.length];
+		for (int i = 0; i < names.length; i++) {
+			paths[i] = Path.fromOSString(names[i]);
+		}
+		return getPreferredVariable(paths, target);
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean getSelection() {
+		return variableCheckbox.getSelection();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterEditDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterEditDialog.java
new file mode 100644
index 0000000..84cbe44
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterEditDialog.java
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.dialogs;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResourceFilterDescription;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.SelectionDialog;
+import org.eclipse.ui.ide.dialogs.UIResourceFilterDescription;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+
+/**
+ * @since 3.6
+ */
+public class ResourceFilterEditDialog extends SelectionDialog {
+
+	private ResourceFilterGroup resourceFilterGroup;
+
+	/**
+	 * Creates a resource filter edit dialog.
+	 * 
+	 * @param parentShell
+	 *            the parent shell
+	 */
+	public ResourceFilterEditDialog(Shell parentShell) {
+		super(parentShell);
+		setTitle(IDEWorkbenchMessages.ResourceFilterEditDialog_title);
+		resourceFilterGroup = new ResourceFilterGroup();
+		setShellStyle(getShellStyle() | SWT.RESIZE);
+	}
+
+	/**
+	 * Set the container resource to be edited.
+	 * 
+	 * @param container
+	 */
+	public void setContainer(IContainer container) {
+		resourceFilterGroup.setContainer(container);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
+	 */
+	protected void buttonPressed(int buttonId) {
+		super.buttonPressed(buttonId);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
+				IIDEHelpContextIds.EDIT_RESOURCE_FILTER_DIALOG);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse
+	 * .swt.widgets.Composite)
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+	 * .Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		Composite dialogArea = (Composite) super.createDialogArea(parent);
+		resourceFilterGroup.createContents(dialogArea);
+		return dialogArea;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.window.Window#close()
+	 */
+	public boolean close() {
+		resourceFilterGroup.dispose();
+		return super.close();
+	}
+
+	/**
+	 * @return the filters that were configured on this resource
+	 */
+	public UIResourceFilterDescription[] getFilters() {
+		return resourceFilterGroup.getFilters();
+	}
+
+	/**
+	 * @param filters
+	 *            the initial filters of the dialog
+	 */
+	public void setFilters(UIResourceFilterDescription[] filters) {
+		resourceFilterGroup.setFilters(filters);
+	}
+
+	/**
+	 * @param filters
+	 *            the initial filters of the dialog
+	 */
+	public void setFilters(IResourceFilterDescription[] filters) {
+		resourceFilterGroup.setFilters(filters);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
+	 */
+	protected void okPressed() {
+		// Sets the dialog result to the selected path variable name(s).
+		try {
+			if (resourceFilterGroup.performOk())
+				super.okPressed();
+		} catch (Throwable t) {
+			t.printStackTrace();
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterGroup.java
new file mode 100644
index 0000000..e1ca01e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterGroup.java
@@ -0,0 +1,3332 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.dialogs;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.reflect.Field;
+import java.text.DateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.TreeMap;
+
+import org.eclipse.core.internal.resources.FilterDescriptor;
+import org.eclipse.core.resources.FileInfoMatcherDescription;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFilterMatcherDescriptor;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceFilterDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.jface.layout.TreeColumnLayout;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.text.FindReplaceDocumentAdapterContentProposalProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.viewers.StyledString.Styler;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.viewers.ViewerDropAdapter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.ByteArrayTransfer;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.MenuDetectEvent;
+import org.eclipse.swt.events.MenuDetectListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.TextStyle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DateTime;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.TreeColumn;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
+import org.eclipse.ui.ide.dialogs.UIResourceFilterDescription;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+import org.eclipse.ui.internal.ide.misc.FileInfoAttributesMatcher;
+import org.eclipse.ui.internal.ide.misc.StringFileInfoMatcher;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+/**
+ * A widget group that displays resource filters. Includes buttons to edit,
+ * remove existing filters and create new ones.
+ */
+public class ResourceFilterGroup {
+
+	private Button addButton = null;
+	private Button addGroupButton = null;
+	private Button removeButton = null;
+	private Button upButton = null;
+	private Button downButton = null;
+	private Button editButton = null;
+
+	private TreeViewer filterView;
+	private TreeContentProvider filterViewContentProvider;
+	private Filters filters;
+	private UIResourceFilterDescription[] initialFilters = new UIResourceFilterDescription[0];
+	private LabelProvider labelProvider;
+	private Font boldFont;
+	private Font plainFont;
+	private Image fileIcon = null;
+	private Image folderIcon = null;
+	private Image fileFolderIcon = null;
+	private Image includeIcon = null;
+	private Image excludeIcon = null;
+	private Image inheritableIcon = null;
+	private boolean tableViewCellEditorAdequatlyUsable = false;
+	private Shell shell;
+	private IContainer nonExistantResource = getNonExistantResource();
+	private IContainer resource = nonExistantResource;
+
+	/**
+	 * 
+	 */
+	public ResourceFilterGroup() {
+		ImageDescriptor fileIconDescriptor = AbstractUIPlugin
+		.imageDescriptorFromPlugin(IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/fileType_filter.gif"); //$NON-NLS-1$
+		if (fileIconDescriptor != null)
+			fileIcon = fileIconDescriptor.createImage();
+		
+		ImageDescriptor folderIconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/folderType_filter.gif"); //$NON-NLS-1$
+		if (folderIconDescriptor != null)
+			folderIcon = folderIconDescriptor.createImage();
+		
+		ImageDescriptor fileFolderIconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/fileFolderType_filter.gif"); //$NON-NLS-1$
+		if (fileFolderIconDescriptor != null)
+			fileFolderIcon = fileFolderIconDescriptor.createImage();
+		
+		ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/includeMode_filter.gif"); //$NON-NLS-1$
+		if (descriptor != null)
+			includeIcon = descriptor.createImage();
+		
+		descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/excludeMode_filter.gif"); //$NON-NLS-1$
+		if (descriptor != null)
+			excludeIcon = descriptor.createImage();
+		
+		ImageDescriptor inheritableIconDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+				IDEWorkbenchPlugin.IDE_WORKBENCH,
+				"$nl$/icons/full/obj16/inheritable_filter.gif"); //$NON-NLS-1$
+		if (inheritableIconDescriptor != null)
+			inheritableIcon = inheritableIconDescriptor.createImage();
+	}
+
+	Image getImage(String string, int i) {
+		if (string.equals(FilterTypeUtil.MODE))
+			return new Image[] { includeIcon, excludeIcon, inheritableIcon }[i];
+		if (string.equals(FilterTypeUtil.TARGET))
+			return new Image[] { fileIcon, folderIcon, fileFolderIcon }[i];
+		return null;
+	}
+
+	/**
+	 * Set the IContainer resource to edit
+	 * 
+	 * @param res
+	 *            the container resource
+	 */
+
+	public void setContainer(IContainer res) {
+		resource = res;
+	}
+
+	private IContainer getNonExistantResource() {
+		String projectName = "nonExistantProject_"; //$NON-NLS-1$
+		IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(
+				projectName);
+		int iteration = 0;
+		while (p.exists()) {
+			p = ResourcesPlugin.getWorkspace().getRoot().getProject(
+					projectName + iteration);
+			iteration++;
+		}
+		return p;
+	}
+
+	class Filters extends FilterCopy {
+		public Filters(IContainer resource) {
+			try {
+				IResourceFilterDescription[] tmp = resource.getFilters();
+				children = new LinkedList();
+				for (int i = 0; i < tmp.length; i++) {
+					FilterCopy copy = new FilterCopy(UIResourceFilterDescription.wrap(tmp[i]));
+					copy = convertLegacyMatchers(copy);
+					addChild(copy);
+				}
+			} catch (CoreException e) {
+				ErrorDialog.openError(shell, NLS.bind(
+						IDEWorkbenchMessages.InternalError, null), e
+						.getLocalizedMessage(), e.getStatus());
+			}
+		}
+
+		public Filters(IResourceFilterDescription filters[]) {
+			children = new LinkedList();
+			if (filters != null) {
+				for (int i = 0; i < filters.length; i++)
+					addChild(new FilterCopy(UIResourceFilterDescription.wrap(filters[i])));
+			}
+		}
+
+		public Filters(UIResourceFilterDescription filters[]) {
+			children = new LinkedList();
+			if (filters != null) {
+				for (int i = 0; i < filters.length; i++)
+					addChild(new FilterCopy(filters[i]));
+			}
+		}
+
+		boolean changed = false;
+		public LinkedList/* <IResourceFilterDescription> */trash = new LinkedList/*
+																	 * <IResourceFilterDescription
+																	 * >
+																	 */();
+
+		public void add(FilterCopy newFilter) {
+			super.addChild(newFilter);
+			changed = true;
+		}
+
+		public void remove(FilterCopy filter) {
+			super.removeChild(filter);
+			if (filter.original != null)
+				trash.add(filter);
+			changed = true;
+		}
+
+		public void moveUp(UIResourceFilterDescription filter) {
+			FilterCopy[] content = getChildren();
+			for (int i = 1; i < content.length; i++) {
+				if (content[i] == filter) {
+					FilterCopy tmp = content[i - 1];
+					content[i - 1] = content[i];
+					content[i] = tmp;
+				}
+			}
+			children = new LinkedList(Arrays.asList(content));
+			changed = true;
+		}
+
+		public void moveDown(UIResourceFilterDescription filter) {
+			FilterCopy[] content = getChildren();
+			for (int i = 0; i < (content.length - 1); i++) {
+				if (content[i] == filter) {
+					FilterCopy tmp = content[i + 1];
+					content[i + 1] = content[i];
+					content[i] = tmp;
+				}
+			}
+			children = new LinkedList(Arrays.asList(content));
+			changed = true;
+		}
+
+		public int getChildrenLimit() {
+			return Integer.MAX_VALUE;
+		}
+
+		protected void argumentsChanged() {
+			changed = true;
+		}
+
+		public boolean hasChanged() {
+			if (changed)
+				return true;
+			Iterator it = children.iterator();
+			while (it.hasNext()) {
+				FilterCopy filter = (FilterCopy) it.next();
+				if (filter.hasChanged())
+					return true;
+			}
+			return false;
+		}
+
+		public boolean isFirst(FilterCopy o) {
+			if (children.size() > 0)
+				return children.getFirst().equals(o);
+			return false;
+		}
+
+		public boolean isLast(FilterCopy o) {
+			if (children.size() > 0)
+				return children.getLast().equals(o);
+			return false;
+		}
+
+		public void removeAll() {
+			if (children.size() > 0) {
+				super.removeAll();
+				changed = true;
+			}
+		}
+	}
+
+	static String includeOnlyGroup = "INCLUDE_ONLY_GROUP";  //$NON-NLS-1$
+
+	static String excludeAllGroup = "EXCLUDE_ALL_GROUP";  //$NON-NLS-1$
+
+	class TreeContentProvider implements ITreeContentProvider {
+		
+		public Object[] getChildren(Object parentElement) {
+			if (parentElement == filters) {
+				if (filters.getChildren().length > 0)
+					return new Object[] {includeOnlyGroup, excludeAllGroup};
+				return new Object[0];
+			}
+			if (parentElement instanceof String) {
+				ArrayList list = new ArrayList();
+				int mask = parentElement.equals(includeOnlyGroup) ? IResourceFilterDescription.INCLUDE_ONLY:
+								IResourceFilterDescription.EXCLUDE_ALL;
+				FilterCopy[] children = filters.getChildren();
+				for (int i = 0; i < children.length; i++) {
+					if ((children[i].getType() & mask) != 0)
+						list.add(children[i]);
+				}
+				return list.toArray();
+			}
+			if (parentElement instanceof FilterCopy)
+				return ((FilterCopy) parentElement).getChildren();
+			return null;
+		}
+
+		public Object getParent(Object element) {
+			if (element instanceof String)
+				return filters;
+			if (element instanceof FilterCopy) {
+				FilterCopy filterCopy = (FilterCopy) element;
+				if (filterCopy.getParent() != null && filterCopy.getParent() != filters)
+					return filterCopy.getParent();
+				return ((filterCopy.getType() & IResourceFilterDescription.INCLUDE_ONLY) != 0) ? includeOnlyGroup: excludeAllGroup;
+			}
+			return null;
+		}
+
+		public boolean hasChildren(Object element) {
+			if (element instanceof FilterCopy || element instanceof String) {
+				Object[] children = getChildren(element);
+				return children != null && children.length > 0;
+			}
+			return false;
+		}
+
+		public Object[] getElements(Object inputElement) {
+			return getChildren(inputElement);
+		}
+
+		public void dispose() {
+		}
+
+		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		}
+	}
+
+	class LabelProvider extends StyledCellLabelProvider  {
+		private final Styler fBoldStyler;
+		private final Styler fPlainStyler;
+		FilterTypeUtil util;
+		TreeMap/*<String, ICustomFilterArgumentUI */ customfilterArgumentMap = new TreeMap();
+
+		public LabelProvider() {
+			util = new FilterTypeUtil();
+			fBoldStyler= new Styler() {
+				public void applyStyles(TextStyle textStyle) {
+					textStyle.font= boldFont;
+				}
+			};
+			fPlainStyler= new Styler() {
+				public void applyStyles(TextStyle textStyle) {
+					textStyle.font= plainFont;
+				}
+			};
+			ICustomFilterArgumentUI ui = new MultiMatcherCustomFilterArgumentUI(null, null, null);
+			customfilterArgumentMap.put(ui.getID(), ui);
+			ui = new DefaultCustomFilterArgumentUI(null, null, null);
+			customfilterArgumentMap.put(ui.getID(), ui);
+		}
+
+		ICustomFilterArgumentUI getUI(String descriptorID) {
+			ICustomFilterArgumentUI result = (ICustomFilterArgumentUI) customfilterArgumentMap.get(descriptorID);
+			if (result == null)
+				return result = (ICustomFilterArgumentUI) customfilterArgumentMap.get(new String()); // default ui
+			return result;
+		}
+
+		String getColumnID(int index) {
+			return (String) filterView.getColumnProperties()[index];
+		}
+
+		public boolean isPartialFilter(Object element) {
+			FilterCopy copy = (FilterCopy) element;
+			return copy.isUnderAGroupFilter();
+		}
+
+		public void update(ViewerCell cell) {
+			int columnIndex = cell.getColumnIndex();
+			String column = getColumnID(columnIndex);
+			FilterCopy filter = null;
+
+			Object element = cell.getElement();
+			if (element instanceof String) {
+				if (column.equals(FilterTypeUtil.MODE)) {
+					cell.setImage(getImage(FilterTypeUtil.MODE, element.equals(includeOnlyGroup) ? 0:1));
+				}
+				if (column.equals(FilterTypeUtil.MODE)) {
+					if (element.equals(includeOnlyGroup))
+						cell.setText(NLS
+								.bind(
+										IDEWorkbenchMessages.ResourceFilterPage_includeOnlyColumn,
+										null));
+					else
+						cell.setText(NLS
+							.bind(
+									IDEWorkbenchMessages.ResourceFilterPage_excludeAllColumn,
+									null));
+				}
+			}
+			else {
+				filter = (FilterCopy) element;
+	
+				if (column.equals(FilterTypeUtil.MODE)) {
+					StyledString styledString = getStyleColumnText(filter);
+					if (!isPartialFilter(filter)) {
+						Object isInheritable = FilterTypeUtil.getValue(filter, FilterTypeUtil.INHERITABLE);
+						if (((Boolean)isInheritable).booleanValue())
+							styledString.append("   " + IDEWorkbenchMessages.ResourceFilterPage_recursive); //$NON-NLS-1$
+						
+					}
+					cell.setText(styledString.toString());
+					cell.setStyleRanges(styledString.getStyleRanges());
+
+					if (!isPartialFilter(filter)) {
+						Image[] images = { fileIcon, folderIcon, fileFolderIcon };
+
+						Object index = FilterTypeUtil.getValue(filter, FilterTypeUtil.TARGET);
+						cell.setImage(images[((Integer) index).intValue()]);
+					}
+				}
+			}
+
+			super.update(cell);
+		}
+		
+		private StyledString getStyleColumnText(FilterCopy filter) {
+			if ((filter.getChildrenLimit() > 0)) {
+				String whiteSpace = " "; //$NON-NLS-1$;
+				String expression = getFilterTypeName(filter);
+				boolean isUnaryOperator = filter.getId().equals("org.eclipse.ui.ide.notFilterMatcher"); //$NON-NLS-1$
+				StyledString buffer = new StyledString();
+				if (isUnaryOperator) {
+					buffer.append("NOT ", fBoldStyler); //$NON-NLS-1$
+					expression = "OR"; //$NON-NLS-1$
+				}
+				buffer.append("(", fBoldStyler); //$NON-NLS-1$
+				Object [] children = filterViewContentProvider.getChildren(filter);
+				for (int i = 0; i < children.length; i++) {
+					buffer.append(getStyleColumnText((FilterCopy) children[i]));
+					if ((i + 1) < children.length) {
+						buffer.append(whiteSpace, fPlainStyler);
+						buffer.append(expression, fBoldStyler);
+						buffer.append(whiteSpace, fPlainStyler);
+					}
+				}
+				if (children.length < 2 && !isUnaryOperator) {
+					if (children.length == 1)
+						buffer.append(whiteSpace, fPlainStyler);
+					buffer.append(expression, fBoldStyler);
+				}
+				buffer.append(")", fBoldStyler); //$NON-NLS-1$
+				return buffer;
+			}
+			ICustomFilterArgumentUI ui = getUI(filter.getId());
+			return ui.formatStyledText(filter, fPlainStyler, fBoldStyler);
+		}
+
+		protected void measure(Event event, Object element) {
+			super.measure(event, element);
+		}
+
+		private String getFilterTypeName(FilterCopy filter) {
+			IFilterMatcherDescriptor desc = FilterTypeUtil.getDescriptor(filter
+					.getId());
+			if (desc != null)
+				return desc.getName();
+			return ""; //$NON-NLS-1$
+		}
+	}
+	
+	class CellModifier implements ICellModifier {
+		public boolean canModify(Object element, String property) {
+			FilterCopy filter = (FilterCopy) element;
+			if (property.equals(FilterTypeUtil.ARGUMENTS)
+					&& !filter.hasStringArguments())
+				return false;
+			return true;
+		}
+
+		public Object getValue(Object element, String property) {
+			FilterCopy filter = (FilterCopy) element;
+			return FilterTypeUtil.getValue(filter, property);
+		}
+
+		public void modify(Object element, String property, Object value) {
+			FilterCopy filter = (FilterCopy) ((TableItem) element).getData();
+			FilterTypeUtil.setValue(filter, property, value);
+			filterView.refresh(filter);
+		}
+	}
+
+	/**
+	 * Creates the widget group. Callers must call <code>dispose</code> when the
+	 * group is no longer needed.
+	 * 
+	 * @param parent
+	 *            the widget parent
+	 * @return container of the widgets
+	 */
+	public Control createContents(Composite parent) {
+
+        Font font = parent.getFont();
+		shell = parent.getShell();
+
+		if (resource == null) {
+			Label label = new Label(parent, SWT.NONE);
+			label.setText(NLS.bind(
+					IDEWorkbenchMessages.ResourceFilterPage_noResource, null));
+	        label.setFont(font);
+			return label;
+		}
+
+		if (resource == nonExistantResource)
+			filters = new Filters(initialFilters);
+		else
+			filters = new Filters(resource);
+
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		layout.numColumns = 2;
+		composite.setLayout(layout);
+		GridData data = new GridData(GridData.FILL_BOTH);
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		composite.setLayoutData(data);
+		composite.setFont(font);
+
+		Label label = new Label(composite, 0);
+		label.setText(NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_title,
+				null));
+		data = new GridData(GridData.FILL);
+		data.horizontalSpan = 2;
+		label.setLayoutData(data);
+		label.setFont(font);
+		
+		createViewerGroup(composite);
+		createButtonGroup(composite);
+
+		refreshEnablement();
+		return composite;
+	}
+
+	private void createViewerGroup(Composite parent) {
+		Composite tableComposite = new Composite(parent, SWT.NONE);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		tableComposite.setLayoutData(data);
+
+		filterView = new TreeViewer(tableComposite, SWT.FULL_SELECTION | SWT.BORDER
+				| SWT.H_SCROLL);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.grabExcessHorizontalSpace = true;
+		data.grabExcessVerticalSpace = true;
+		filterView.getTree().setLayoutData(data);
+		filterView.setColumnProperties(FilterTypeUtil.columnNames);
+
+		plainFont = filterView.getTree().getFont();
+		FontData[] boldFontData= getModifiedFontData(plainFont.getFontData(), SWT.BOLD);
+		boldFont = new Font(Display.getCurrent(), boldFontData);
+
+		filterView.setAutoExpandLevel(2);
+		filterViewContentProvider = new TreeContentProvider();
+		filterView.setContentProvider(filterViewContentProvider);
+		filterView.setInput(filters);
+		filterView.getTree().setFont(parent.getFont());
+
+		filterView.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				refreshEnablement();
+			}
+		});
+
+		TreeColumn modeColumn = new TreeColumn(filterView.getTree(), 0);
+		modeColumn
+				.setText(NLS
+						.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_columnFilterDescription,
+								null));
+		modeColumn.setData(FilterTypeUtil.MODE);
+		modeColumn.setResizable(true);
+		modeColumn.setMoveable(false);
+
+		filterView.getTree().setHeaderVisible(false);
+		filterView.getTree().showColumn(filterView.getTree().getColumn(0));
+		labelProvider = new LabelProvider();
+		filterView.setLabelProvider(labelProvider);
+
+		CellEditor[] editors = new CellEditor[5];
+		editors[0] = new ComboBoxCellEditor(filterView.getTree(),
+				FilterTypeUtil.getFilterNames(false), SWT.READ_ONLY);
+		editors[1] = new ComboBoxCellEditor(filterView.getTree(),
+				FilterTypeUtil.getModes(), SWT.READ_ONLY);
+		editors[2] = new ComboBoxCellEditor(filterView.getTree(),
+				FilterTypeUtil.getTargets(), SWT.READ_ONLY);
+		editors[3] = new CheckboxCellEditor(filterView.getTree());
+		editors[4] = new TextCellEditor(filterView.getTree());
+
+		if (tableViewCellEditorAdequatlyUsable) {
+			filterView.setCellEditors(editors);
+			filterView.setCellModifier(new CellModifier());
+		}
+
+		filterView.getTree().addMouseListener(new MouseListener() {
+			public void mouseDoubleClick(MouseEvent e) {
+				if (!handleEdit()) {
+					ISelection selection = filterView.getSelection();
+					if (selection instanceof IStructuredSelection) {
+						if (((IStructuredSelection) selection).size() > 0) {
+							Object firstElement = ((IStructuredSelection) selection).getFirstElement();
+							filterView.setExpandedState(firstElement, !filterView.getExpandedState(firstElement));
+						}
+					}
+				}
+			}
+
+			public void mouseDown(MouseEvent e) {
+			}
+
+			public void mouseUp(MouseEvent e) {
+			}
+		});
+		FilterCopyDrag drag = new FilterCopyDrag();
+		int ops = DND.DROP_MOVE;
+		Transfer[] transfers = new Transfer[] { filterCopyTransfer };
+		filterView.addDragSupport(ops, transfers, drag);
+		filterView.addDropSupport(ops, transfers,
+				new FilterCopyDrop(filterView));
+
+		filterView.getTree().addMenuDetectListener(new MenuDetectListener() {
+			public void menuDetected(MenuDetectEvent e) {
+				MenuManager mgr = new MenuManager();
+				mgr.add(addSubFilterAction);
+				mgr.add(addSubGroupFilterAction);
+				mgr.add(new Separator());
+				mgr.add(new EditFilterAction());
+				mgr.add(new RemoveFilterAction());
+				filterView.getControl().setMenu(
+						mgr.createContextMenu(filterView.getControl()));
+			}
+		});
+		TreeColumnLayout layout = new TreeColumnLayout();
+		tableComposite.setLayout( layout );
+
+		layout.setColumnData( modeColumn, new ColumnWeightData(100));
+		filterView.setSelection(new StructuredSelection(includeOnlyGroup));
+	}
+
+	private static FontData[] getModifiedFontData(FontData[] originalData, int additionalStyle) {
+		FontData[] styleData = new FontData[originalData.length];
+		for (int i = 0; i < styleData.length; i++) {
+			FontData base = originalData[i];
+			styleData[i] = new FontData(base.getName(), base.getHeight(), base.getStyle() | additionalStyle);
+		}
+       	return styleData;
+    }
+
+	class EditFilterAction extends Action {
+
+		public EditFilterAction() {
+			setText(NLS
+					.bind(IDEWorkbenchMessages.ResourceFilterPage_editFilterActionLabel,
+							null));
+		}
+
+		public void run() {
+			handleEdit();
+		}
+		public boolean isEnabled() {
+			ISelection selection = filterView.getSelection();
+			if (selection instanceof IStructuredSelection) {
+				if (((IStructuredSelection) selection).size() > 0) {
+					Object firstElement = ((IStructuredSelection) selection)
+					.getFirstElement();
+					return firstElement instanceof FilterCopy;
+				}
+			}
+			return false;
+		}
+	}
+
+	class RemoveFilterAction extends Action {
+
+		public RemoveFilterAction() {
+			setText(NLS
+					.bind(IDEWorkbenchMessages.ResourceFilterPage_removeFilterActionLabel,
+							null));
+		}
+
+		public void run() {
+			handleRemove();
+		}
+		public boolean isEnabled() {
+			ISelection selection = filterView.getSelection();
+			if (selection instanceof IStructuredSelection) {
+				return ((IStructuredSelection) selection).size() > 0;			}
+			return false;
+		}
+	}
+
+	Action addSubFilterAction = new AddSubFilterAction(false);
+
+	class AddSubFilterAction extends Action {
+
+		boolean createGroupOnly;
+		
+		public AddSubFilterAction(boolean createGroupOnly) {
+			this.createGroupOnly = createGroupOnly;
+			setText(NLS
+					.bind(createGroupOnly ?
+							IDEWorkbenchMessages.ResourceFilterPage_addSubFilterGroupActionLabel:
+							IDEWorkbenchMessages.ResourceFilterPage_addSubFilterActionLabel,
+							null));
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.Action#run()
+		 */
+		public void run() {
+			ISelection selection = filterView.getSelection();
+			if (selection instanceof IStructuredSelection) {
+				Object firstElement = ((IStructuredSelection) selection)
+				.getFirstElement();
+				handleAdd(firstElement, createGroupOnly);
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.action.Action#isEnabled()
+		 */
+		public boolean isEnabled() {
+			ISelection selection = filterView.getSelection();
+			if (selection instanceof IStructuredSelection) {
+				Object firstElement = ((IStructuredSelection) selection)
+						.getFirstElement();
+				return isAddEnabled(firstElement);
+			}
+			return false;
+		}
+	}
+
+	private void handleAdd(boolean createGroupOnly) {
+		Object selectedObject = null;
+		ISelection selection = filterView.getSelection();
+		if (selection instanceof IStructuredSelection) {
+			IStructuredSelection structuredSelection = ((IStructuredSelection) selection);
+			selectedObject = structuredSelection.getFirstElement();
+		}
+		handleAdd(selectedObject, createGroupOnly);
+	}
+	
+	private void handleAdd(Object selection, boolean createGroupOnly) {
+		if (selection == null) {
+			FilterCopy newFilter = new FilterCopy();
+			FilterEditDialog dialog = new FilterEditDialog(resource, ResourceFilterGroup.this, shell,
+					newFilter, createGroupOnly, true);
+			if (dialog.open() == Window.OK) {
+				addToTopLevelFilters(newFilter);
+				refreshAndSelect(newFilter);
+			}
+		}
+		else if (selection instanceof FilterCopy) {
+			FilterCopy filter = (FilterCopy) selection;
+			if (filter.getChildrenLimit() > 0) {
+				FilterCopy newFilter = new FilterCopy();
+				newFilter.setParent(filter);
+				FilterTypeUtil.setValue(newFilter, FilterTypeUtil.MODE, FilterTypeUtil.getValue(filter, FilterTypeUtil.MODE));
+				FilterEditDialog dialog = new FilterEditDialog(resource, ResourceFilterGroup.this, shell,
+						newFilter, createGroupOnly, true);
+				if (dialog.open() == Window.OK) {
+					filter.addChild(newFilter);
+					refreshAndSelect(newFilter);
+				}
+			}
+			else {
+				FilterCopy newFilter = new FilterCopy();
+				FilterEditDialog dialog = new FilterEditDialog(resource, ResourceFilterGroup.this, shell,
+						newFilter, createGroupOnly, true);
+				if (dialog.open() == Window.OK) {
+					addToTopLevelFilters(newFilter);
+					refreshAndSelect(newFilter);
+				}
+			}
+		}
+		else if (selection instanceof String) {
+			FilterCopy newFilter = new FilterCopy();
+			FilterTypeUtil.setValue(newFilter, FilterTypeUtil.MODE,
+					new Integer(selection.equals(includeOnlyGroup) ? 0:1));
+			FilterEditDialog dialog = new FilterEditDialog(resource, ResourceFilterGroup.this, shell,
+					newFilter, createGroupOnly, true);
+			if (dialog.open() == Window.OK) {
+				addToTopLevelFilters(newFilter);
+				refreshAndSelect(newFilter);
+			}
+		}
+	}
+
+	private void refreshAndSelect(FilterCopy newFilter) {
+		filterView.refresh();
+		filterView.reveal(newFilter);
+	}
+
+	private boolean isAddEnabled(Object selection) {
+		if (selection == null)
+			return true;
+		if (selection instanceof FilterCopy) {
+			FilterCopy filter = (FilterCopy) selection;
+			return filter.getChildrenLimit() > 0;
+		}
+		if (selection instanceof String)
+			return true;
+		return false;
+	}
+
+	private void addToTopLevelFilters(FilterCopy newFilter) {
+		int value = ((Integer) FilterTypeUtil.getValue(newFilter, FilterTypeUtil.MODE)).intValue();
+		Object[] existingChildren = filterViewContentProvider.getChildren(value == 0? includeOnlyGroup:excludeAllGroup);
+		filters.add(newFilter);
+		filterView.refresh();
+		if (existingChildren.length == 0)
+			filterView.setExpandedState(newFilter, true);
+	}
+
+	Action addSubGroupFilterAction = new AddSubFilterAction(true);
+
+	class FilterCopyDrop extends ViewerDropAdapter {
+		protected FilterCopyDrop(Viewer viewer) {
+			super(viewer);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ViewerDropAdapter#performDrop(java.lang
+		 * .Object)
+		 */
+		public boolean performDrop(Object data) {
+			Object target = getCurrentTarget();
+			if (target == null)
+				target = filters;
+			FilterCopy[] toDrop = (FilterCopy[]) data;
+
+			if (target instanceof FilterCopy) {
+				for (int i = 0; i < toDrop.length; i++)
+					if (toDrop[i].equals(target)
+							|| ((FilterCopy) target).hasParent(toDrop[i]))
+						return false;
+			}
+
+			for (int i = 0; i < toDrop.length; i++) {
+				if (target instanceof Filters)
+					filters.add(toDrop[i]);
+				if (target instanceof String) {
+					FilterTypeUtil.setValue(toDrop[i], FilterTypeUtil.MODE,
+							new Integer(target.equals(includeOnlyGroup) ? 0:1));
+					addToTopLevelFilters(toDrop[i]);
+				}
+				if (target instanceof FilterCopy)
+					((FilterCopy) target).addChild(toDrop[i]);
+				filterView.refresh();
+				filterView.reveal(toDrop[i]);
+			}
+			return true;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang
+		 * .Object, int, org.eclipse.swt.dnd.TransferData)
+		 */
+		public boolean validateDrop(Object target, int operation,
+				TransferData transferType) {
+			if (filterCopyTransfer.isSupportedType(transferType)) {
+				if (target instanceof FilterCopy)
+					return ((FilterCopy) target).canAcceptDrop();
+				return true;
+			}
+			return false;
+		}
+	}
+
+	class FilterCopyDrag implements DragSourceListener {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.dnd.DragSourceListener#dragFinished(org.eclipse.swt
+		 * .dnd.DragSourceEvent)
+		 */
+		public void dragFinished(DragSourceEvent event) {
+			if (event.detail == DND.DROP_MOVE) {
+				// nothing
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.dnd.DragSourceListener#dragSetData(org.eclipse.swt
+		 * .dnd.DragSourceEvent)
+		 */
+		public void dragSetData(DragSourceEvent event) {
+			if (filterCopyTransfer.isSupportedType(event.dataType)) {
+				event.data = getFilterCopySelection();
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.dnd.DragSourceListener#dragStart(org.eclipse.swt.
+		 * dnd.DragSourceEvent)
+		 */
+		public void dragStart(DragSourceEvent event) {
+			if (getFilterCopySelection().length == 0)
+				event.doit = false;
+		}
+	}
+
+	private void createButtonGroup(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		layout.numColumns = 1;
+		composite.setLayout(layout);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
+		composite.setLayoutData(data);
+		composite.setFont(parent.getFont());
+
+		addButton = new Button(composite, SWT.PUSH);
+		addButton.setText(NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_addButtonLabel, null));
+		data = new GridData(SWT.FILL, SWT.FILL, false, false);
+		addButton.setLayoutData(data);
+		setButtonDimensionHint(addButton);
+		addButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleAdd(false);
+			}
+		});
+		
+		addGroupButton = new Button(composite, SWT.PUSH);
+		addGroupButton.setText(NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_addGroupButtonLabel, null));
+		data = new GridData(SWT.FILL, SWT.FILL, false, false);
+		addGroupButton.setLayoutData(data);
+		setButtonDimensionHint(addGroupButton);
+		addGroupButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleAdd(true);
+			}
+		});
+		
+
+		editButton = new Button(composite, SWT.PUSH);
+		editButton.setText(NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_editButtonLabel, null));
+		data = new GridData(SWT.FILL, SWT.FILL, false, false);
+		editButton.setLayoutData(data);
+		setButtonDimensionHint(editButton);
+		editButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleEdit();
+			}
+		});
+
+		removeButton = new Button(composite, SWT.PUSH);
+		removeButton
+				.setText(NLS
+						.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_removeButtonLabel,
+								null));
+		data = new GridData(SWT.FILL, SWT.FILL, false, false);
+		removeButton.setLayoutData(data);
+		setButtonDimensionHint(removeButton);
+		removeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				handleRemove();
+			}
+		});
+	}
+
+	private void refreshEnablement() {
+		if (addButton != null) {
+			ISelection selection = filterView.getSelection();
+			IStructuredSelection structuredSelection = null;
+			if (selection instanceof IStructuredSelection)
+				structuredSelection = ((IStructuredSelection) selection);
+			removeButton.setEnabled(structuredSelection != null
+					&& structuredSelection.size() > 0 && !(structuredSelection.getFirstElement() instanceof String));
+			editButton.setEnabled(structuredSelection != null
+					&& structuredSelection.size() == 1
+					&& (structuredSelection.getFirstElement() instanceof FilterCopy));
+			if (upButton != null)
+				upButton.setEnabled(structuredSelection != null
+						&& (structuredSelection.size() > 0)
+						&& !isFirst(structuredSelection.getFirstElement()));
+			if (downButton != null)
+				downButton.setEnabled(structuredSelection != null
+						&& (structuredSelection.size() > 0)
+						&& !isLast(structuredSelection.getFirstElement()));
+		}
+	}
+
+	private boolean isFirst(Object o) {
+		return filters.isFirst((FilterCopy) o);
+	}
+
+	private boolean isLast(Object o) {
+		return filters.isLast((FilterCopy) o);
+	}
+
+	private boolean handleEdit() {
+		ISelection selection = filterView.getSelection();
+		if (selection instanceof IStructuredSelection) {
+			Object firstElement = ((IStructuredSelection) selection)
+					.getFirstElement();
+			if (firstElement instanceof String) {
+				handleAdd(firstElement, false);
+				return true;
+			}
+			if (firstElement instanceof FilterCopy) {
+				FilterCopy filter = (FilterCopy) firstElement;
+				FilterCopy copy = new FilterCopy(filter);
+				copy.setParent(filter.getParent());
+				boolean isGroup = filter.getChildrenLimit() > 0;
+				FilterEditDialog dialog = new FilterEditDialog(resource, this, shell, copy, isGroup, false);
+				if (dialog.open() == Window.OK) {
+					if (copy.hasChanged()) {
+						filter.copy(copy);
+						filterView.refresh();
+					}
+				}
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private FilterCopy[] getFilterCopySelection() {
+		ISelection selection = filterView.getSelection();
+		IStructuredSelection structuredSelection = null;
+		if (selection instanceof IStructuredSelection) {
+			structuredSelection = ((IStructuredSelection) selection);
+			FilterCopy[] tmp = new FilterCopy[structuredSelection.size()];
+			System.arraycopy(structuredSelection.toArray(), 0, tmp, 0,
+					tmp.length);
+			return tmp;
+		}
+		return new FilterCopy[0];
+	}
+
+	private void handleRemove() {
+		ISelection selection = filterView.getSelection();
+		IStructuredSelection structuredSelection = null;
+		if (selection instanceof IStructuredSelection) {
+			structuredSelection = ((IStructuredSelection) selection);
+			Iterator it = structuredSelection.iterator();
+			while (it.hasNext()) {
+				Object element = it.next();
+				if (element instanceof FilterCopy) {
+					FilterCopy filter = (FilterCopy) element;
+					filter.getParent().removeChild(filter);
+				}
+				else {
+					int mask = element.equals(includeOnlyGroup) ? IResourceFilterDescription.INCLUDE_ONLY:
+						IResourceFilterDescription.EXCLUDE_ALL;
+					FilterCopy[] children = filters.getChildren();
+					for (int i = 0; i < children.length; i++) {
+						if ((children[i].getType() & mask) != 0)
+							filters.removeChild(children[i]);
+					}
+				}
+			}
+			filterView.refresh();
+		}
+	}
+
+	private static void setButtonDimensionHint(Button button) {
+		Assert.isNotNull(button);
+		Object gd = button.getLayoutData();
+		if (gd instanceof GridData) {
+			((GridData) gd).widthHint = getButtonWidthHint(button);
+			((GridData) gd).horizontalAlignment = GridData.FILL;
+		}
+	}
+
+	private static int getButtonWidthHint(Button button) {
+		button.setFont(JFaceResources.getDialogFont());
+		FontMetrics fontMetrics;
+		GC gc = new GC(button);
+		try {
+			gc.setFont(button.getFont());
+			fontMetrics = gc.getFontMetrics();
+		} finally {
+			gc.dispose();
+		}
+		int widthHint = Dialog.convertHorizontalDLUsToPixels(fontMetrics,
+				IDialogConstants.BUTTON_WIDTH);
+		return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT,
+				true).x);
+	}
+
+	/**
+	 * Apply the default state of the resource.
+	 */
+	public void performDefaults() {
+		if (resource == null)
+			return;
+		filters = new Filters(resource);
+		filters.removeAll();
+		filterView.setInput(filters);
+		filterView.refresh();
+	}
+
+	/**
+	 * @return the filters that were configured on this resource
+	 */
+	public UIResourceFilterDescription[] getFilters() {
+		FilterCopy[] newFilters = filters.getChildren();
+		UIResourceFilterDescription[] result = new UIResourceFilterDescription[newFilters.length];
+		for (int i = 0; i < newFilters.length; i++) {
+			result[i] = newFilters[i];
+		}
+		return result;
+	}
+
+	/**
+	 * @param filters
+	 */
+	public void setFilters(IResourceFilterDescription[] filters) {
+		initialFilters = new UIResourceFilterDescription[filters.length];
+		for (int i = 0; i < filters.length; i++)
+			initialFilters[i] = UIResourceFilterDescription.wrap(filters[i]);
+	}
+
+	/**
+	 * @param filters
+	 */
+	public void setFilters(UIResourceFilterDescription[] filters) {
+		initialFilters = filters;
+	}
+
+	/**
+	 * Apply the read only state and the encoding to the resource.
+	 * 
+	 * @return true if the filters changed
+	 */
+	public boolean performOk() {
+
+		if (filters.hasChanged()) {
+			if (resource == null)
+				return true;
+
+			try {
+				if (resource != nonExistantResource) {
+					IResourceFilterDescription[] oldFilters = resource.getFilters();
+					for (int i = 0; i < oldFilters.length; i++) {
+						oldFilters[i].delete(IResource.BACKGROUND_REFRESH,
+								new NullProgressMonitor());
+					}
+					FilterCopy[] newFilters = filters.getChildren();
+					for (int i = 0; i < newFilters.length; i++) {
+						resource.createFilter(newFilters[i].getType(),
+								newFilters[i].getFileInfoMatcherDescription(),
+								IResource.BACKGROUND_REFRESH,
+								new NullProgressMonitor());
+					}
+				}
+			} catch (CoreException e) {
+				ErrorDialog.openError(shell, NLS.bind(
+						IDEWorkbenchMessages.InternalError, null), e
+						.getLocalizedMessage(), e.getStatus());
+			}
+		}
+		return true;
+	}
+
+	/**
+	 * Disposes the group's resources.
+	 */
+	public void dispose() {
+		disposeIcons();
+	}
+
+	private void disposeIcons() {
+		Field[] fields = getClass().getDeclaredFields();
+		for (int i = 0; i < fields.length; i++) {
+			Class cls = fields[i].getType();
+			if (cls.equals(Image.class)) {
+				Image img;
+				try {
+					img = (Image) fields[i].get(this);
+					if (img != null) {
+						img.dispose();
+						fields[i].set(this, null);
+					}
+				} catch (IllegalArgumentException e) {
+					e.printStackTrace();
+				} catch (IllegalAccessException e) {
+					e.printStackTrace();
+				}
+			}
+		}
+	}
+
+	private FilterCopyTransfer filterCopyTransfer = new FilterCopyTransfer();
+
+	class FilterCopyTransfer extends ByteArrayTransfer {
+
+		private FilterCopyTransfer() {
+		}
+
+		public void javaToNative(Object object, TransferData transferData) {
+			if (object == null || !(object instanceof FilterCopy[]))
+				return;
+			if (isSupportedType(transferData)) {
+				FilterCopy[] myTypes = (FilterCopy[]) object;
+				try {
+					ByteArrayOutputStream out = new ByteArrayOutputStream();
+					DataOutputStream writeOut = new DataOutputStream(out);
+					writeOut.writeInt(myTypes.length);
+					for (int i = 0; i < myTypes.length; i++)
+						writeOut.writeInt(myTypes[i].getSerialNumber());
+					byte[] buffer = out.toByteArray();
+					writeOut.close();
+					super.javaToNative(buffer, transferData);
+				} catch (IOException e) {
+				}
+			}
+		}
+
+		public Object nativeToJava(TransferData transferData) {
+			if (isSupportedType(transferData)) {
+				byte[] buffer = (byte[]) super.nativeToJava(transferData);
+				if (buffer == null)
+					return null;
+				FilterCopy[] myData = new FilterCopy[0];
+				try {
+					ByteArrayInputStream in = new ByteArrayInputStream(buffer);
+					DataInputStream readIn = new DataInputStream(in);
+					int size = readIn.readInt();
+
+					LinkedList droppedFilters = new LinkedList();
+					for (int i = 0; i < size; i++) {
+						int serialNumber = readIn.readInt();
+						FilterCopy tmp = filters
+								.findBySerialNumber(serialNumber);
+						if (tmp != null)
+							droppedFilters.add(tmp);
+					}
+					myData = (FilterCopy[]) droppedFilters
+							.toArray(new FilterCopy[0]);
+					readIn.close();
+				} catch (IOException ex) {
+					return null;
+				}
+				return myData;
+			}
+
+			return null;
+		}
+
+		private final String MYTYPENAME = "org.eclipse.ui.ide.internal.filterCopy"; //$NON-NLS-1$
+		private final int MYTYPEID = registerType(MYTYPENAME);
+
+		protected String[] getTypeNames() {
+			return new String[] { MYTYPENAME };
+		}
+
+		protected int[] getTypeIds() {
+			return new int[] { MYTYPEID };
+		}
+	}
+}
+
+class FilterTypeUtil {
+	static String ID = "id"; //$NON-NLS-1$
+	static String TARGET = "target"; //$NON-NLS-1$
+	static String MODE = "mode"; //$NON-NLS-1$
+	static String ARGUMENTS = "arguments"; //$NON-NLS-1$
+	static String INHERITABLE = "inheritable"; //$NON-NLS-1$
+
+	static String[] columnNames = new String[] { MODE, TARGET, INHERITABLE };
+
+	static String[] getModes() {
+		return new String[] {
+				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_includeOnly,
+						null),
+				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_excludeAll,
+						null) };
+	}
+
+	public static void setValue(FilterCopy filter, String property, Object value) {
+		if (property.equals(FilterTypeUtil.ID)) {
+			IFilterMatcherDescriptor descriptor;
+			if (value instanceof Integer) {
+				int selection = ((Integer) value).intValue();
+				descriptor = FilterTypeUtil.getDescriptorFromIndex(selection);
+			} else
+				descriptor = FilterTypeUtil.getDescriptorByName((String) value);
+			if (descriptor != null)
+				filter.setId(descriptor.getId());
+		}
+		if (property.equals(FilterTypeUtil.MODE)) {
+			int selection = ((Integer) value).intValue();
+			int type = filter.getType()
+					& ~(IResourceFilterDescription.INCLUDE_ONLY | IResourceFilterDescription.EXCLUDE_ALL);
+			if (selection == 0)
+				filter.setType(type | IResourceFilterDescription.INCLUDE_ONLY);
+			else
+				filter.setType(type | IResourceFilterDescription.EXCLUDE_ALL);
+		}
+		if (property.equals(FilterTypeUtil.TARGET)) {
+			int selection = ((Integer) value).intValue();
+			int type = filter.getType()
+					& ~(IResourceFilterDescription.FILES | IResourceFilterDescription.FOLDERS);
+			if (selection == 0)
+				filter.setType(type | IResourceFilterDescription.FILES);
+			if (selection == 1)
+				filter.setType(type | IResourceFilterDescription.FOLDERS);
+			if (selection == 2)
+				filter.setType(type | IResourceFilterDescription.FILES
+						| IResourceFilterDescription.FOLDERS);
+		}
+		if (property.equals(FilterTypeUtil.INHERITABLE)) {
+			int type = filter.getType() & ~IResourceFilterDescription.INHERITABLE;
+			if (((Boolean) value).booleanValue())
+				filter.setType(type | IResourceFilterDescription.INHERITABLE);
+			else
+				filter.setType(type);
+		}
+		if (property.equals(FilterTypeUtil.ARGUMENTS)) {
+			filter.setArguments(value.equals("") ? null : value); //$NON-NLS-1$
+		}
+	}
+
+	static IFilterMatcherDescriptor getDescriptor(String id) {
+		IFilterMatcherDescriptor[] descriptors = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		for (int i = 0; i < descriptors.length; i++) {
+			if (descriptors[i].getId().equals(id))
+				return descriptors[i];
+		}
+		return null;
+	}
+
+	static int getDescriptorIndex(String id) {
+		IFilterMatcherDescriptor descriptors[] = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		for (int i = 0; i < descriptors.length; i++) {
+			if (descriptors[i].getId().equals(id))
+				return i;
+		}
+		return -1;
+	}
+
+	static Object getValue(UIResourceFilterDescription filter, String property) {
+		if (property.equals(ID)) {
+			String id = filter.getFileInfoMatcherDescription().getId();
+			int index = getDescriptorIndex(id);
+			return new Integer(index);
+		}
+		if (property.equals(MODE)) {
+			if ((filter.getType() & IResourceFilterDescription.INCLUDE_ONLY) != 0)
+				return new Integer(0);
+			return new Integer(1);
+		}
+		if (property.equals(TARGET)) {
+			boolean includeFiles = (filter.getType() & IResourceFilterDescription.FILES) != 0;
+			boolean includeFolders = (filter.getType() & IResourceFilterDescription.FOLDERS) != 0;
+			if (includeFiles && includeFolders)
+				return new Integer(2);
+			if (includeFiles)
+				return new Integer(0);
+			if (includeFolders)
+				return new Integer(1);
+		}
+		if (property.equals(INHERITABLE))
+			return new Boolean(
+					(filter.getType() & IResourceFilterDescription.INHERITABLE) != 0);
+
+		if (property.equals(ARGUMENTS))
+			return filter.getFileInfoMatcherDescription().getArguments() != null ? filter.getFileInfoMatcherDescription().getArguments() : ""; //$NON-NLS-1$
+		return null;
+	}
+
+	static String[] getTargets() {
+		return new String[] {
+				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_files, null),
+				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_folders, null),
+				NLS
+						.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_filesAndFolders,
+								null) };
+	}
+
+	static String[] getFilterNames(boolean groupOnly) {
+		IFilterMatcherDescriptor[] descriptors = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		sortDescriptors(descriptors);
+		LinkedList names = new LinkedList();
+		for (int i = 0; i < descriptors.length; i++) {
+			// remove legacy filters
+			if (descriptors[i].getId().equals(DefaultCustomFilterArgumentUI.REGEX_FILTER_ID))
+				continue;
+			if (descriptors[i].getId().equals(StringFileInfoMatcher.ID))
+				continue;
+			boolean isGroup = descriptors[i].getArgumentType().equals(
+					IFilterMatcherDescriptor.ARGUMENT_TYPE_FILTER_MATCHER)
+					|| descriptors[i].getArgumentType().equals(
+							IFilterMatcherDescriptor.ARGUMENT_TYPE_FILTER_MATCHERS);
+			if (isGroup == groupOnly)
+				names.add(descriptors[i].getName());
+		}
+		return (String[]) names.toArray(new String[0]);
+	}
+
+	/**
+	 * @param descriptors
+	 */
+	private static void sortDescriptors(IFilterMatcherDescriptor[] descriptors) {
+		Arrays.sort(descriptors, new Comparator() {
+			public int compare(Object arg0, Object arg1) {
+				if (((IFilterMatcherDescriptor) arg0).getId().equals(FileInfoAttributesMatcher.ID))
+					return -1;
+				if (((IFilterMatcherDescriptor) arg1).getId().equals(FileInfoAttributesMatcher.ID))
+					return 1;
+				return ((IFilterMatcherDescriptor) arg0).getId().compareTo(((IFilterMatcherDescriptor) arg1).getId());
+			}
+		});
+	}
+
+	static String getDefaultFilterID() {
+		IFilterMatcherDescriptor descriptors[] = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		sortDescriptors(descriptors);
+		for (int i = 0; i < descriptors.length; i++) {
+			if (descriptors[i].getArgumentType().equals(
+					IFilterMatcherDescriptor.ARGUMENT_TYPE_STRING))
+				return descriptors[i].getId();
+		}
+		return descriptors[0].getId();
+	}
+
+	static IFilterMatcherDescriptor getDescriptorFromIndex(int index) {
+		IFilterMatcherDescriptor descriptors[] = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		return descriptors[index];
+	}
+
+	static IFilterMatcherDescriptor getDescriptorByName(String name) {
+		IFilterMatcherDescriptor[] descriptors = ResourcesPlugin.getWorkspace()
+				.getFilterMatcherDescriptors();
+		for (int i = 0; i < descriptors.length; i++) {
+			if (descriptors[i].getName().equals(name))
+				return descriptors[i];
+		}
+		return null;
+	}
+	FilterTypeUtil() {}
+}
+
+class FilterCopy extends UIResourceFilterDescription {
+	Object arguments = null;
+	String id = null;
+	IPath path = null;
+	IProject project = null;
+	int type = 0;
+	FilterCopy parent = null;
+	LinkedList children = null;
+	UIResourceFilterDescription original = null;
+	int serialNumber = ++lastSerialNumber;
+	static private int lastSerialNumber = 0;
+
+	public FilterCopy(UIResourceFilterDescription filter) {
+		internalCopy(filter);
+		original = filter;
+	}
+
+	protected FilterCopy convertLegacyMatchers(FilterCopy copy) {
+		if (copy.getId().equals(DefaultCustomFilterArgumentUI.REGEX_FILTER_ID) ||
+				copy.getId().equals(StringFileInfoMatcher.ID)) {
+			String pattern = (String) copy.getArguments();
+			FileInfoAttributesMatcher.Argument argument = new FileInfoAttributesMatcher.Argument();
+			argument.key = FileInfoAttributesMatcher.KEY_NAME;
+			argument.operator = FileInfoAttributesMatcher.OPERATOR_MATCHES;
+			argument.pattern = pattern;
+			argument.regularExpression = copy.getId().equals(DefaultCustomFilterArgumentUI.REGEX_FILTER_ID);
+			String encodedArgument = FileInfoAttributesMatcher.encodeArguments(argument);
+			FilterTypeUtil.setValue(copy, FilterTypeUtil.ID, FileInfoAttributesMatcher.ID);
+			FilterTypeUtil.setValue(copy, FilterTypeUtil.ARGUMENTS, encodedArgument);
+		}
+		return copy;
+	}
+
+	public void removeAll() {
+		initializeChildren();
+		Iterator it = children.iterator();
+		while (it.hasNext()) {
+			FilterCopy child = (FilterCopy) it.next();
+			if (child.parent == this)
+				child.parent = null;
+		}
+		children.clear();
+		serializeChildren();
+	}
+
+	public void setParent(FilterCopy parent) {
+		this.parent = parent;
+	}
+
+	public boolean canAcceptDrop() {
+		int limit = getChildrenLimit();
+		if (limit > 0) {
+			FilterCopy[] tmp = getChildren();
+			return (tmp == null) || (tmp.length < limit);
+		}
+		return false;
+	}
+
+	public boolean hasParent(FilterCopy filterCopy) {
+		FilterCopy filter = this;
+		do {
+			if (filter.equals(filterCopy))
+				return true;
+			filter = filter.getParent();
+		} while (filter != null);
+		return false;
+	}
+
+	public FilterCopy getParent() {
+		return parent;
+	}
+
+	public void copy(UIResourceFilterDescription filter) {
+		internalCopy(filter);
+		argumentsChanged();
+	}
+
+	private void internalCopy(UIResourceFilterDescription filter) {
+		children = null;
+		id = filter.getFileInfoMatcherDescription().getId();
+		path = filter.getPath();
+		project = filter.getProject();
+		type = filter.getType();
+		arguments = filter.getFileInfoMatcherDescription().getArguments();
+		if (arguments instanceof FileInfoMatcherDescription[]) {
+			FileInfoMatcherDescription[] descs = (FileInfoMatcherDescription[]) arguments;
+			FilterCopy [] tmp = new FilterCopy[descs.length];
+			for (int i = 0; i < tmp.length; i++)
+				tmp[i] = new FilterCopy(this, descs[i]);
+			arguments = tmp;
+		}
+	}
+
+	public boolean hasChanged() {
+		if (original != null) {
+			return !((arguments == null ? (original.getFileInfoMatcherDescription().getArguments() == null)
+					: arguments.equals(original.getFileInfoMatcherDescription().getArguments()))
+					&& id.equals(original.getFileInfoMatcherDescription().getId()) && type == original
+					.getType());
+		}
+		return true;
+	}
+
+	public FilterCopy() {
+		path = null;
+		project = null;
+		type = IResourceFilterDescription.FILES | IResourceFilterDescription.INCLUDE_ONLY;
+		id = FilterTypeUtil.getDefaultFilterID();
+	}
+
+	/**
+	 * @param parent
+	 * @param description
+	 */
+	public FilterCopy(FilterCopy parent, FileInfoMatcherDescription description) {
+		children = null;
+		id = description.getId();
+		path = parent.getPath();
+		project = parent.getProject();
+		type = parent.getType();
+		arguments = description.getArguments();
+		if (arguments instanceof FileInfoMatcherDescription[]) {
+			FileInfoMatcherDescription[] descs = (FileInfoMatcherDescription[]) arguments;
+			FilterCopy [] tmp = new FilterCopy[descs.length];
+			for (int i = 0; i < tmp.length; i++)
+				tmp[i] = new FilterCopy(parent, descs[i]);
+			arguments = tmp;
+		}
+	}
+
+	public Object getArguments() {
+		return arguments;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public IPath getPath() {
+		return path;
+	}
+
+	public IProject getProject() {
+		return project;
+	}
+
+	public int getType() {
+		return type;
+	}
+
+	public void setArguments(Object arguments) {
+		this.arguments = arguments;
+		argumentsChanged();
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public void setPath(IPath path) {
+		this.path = path;
+	}
+
+	public void setProject(IProject project) {
+		this.project = project;
+	}
+
+	public void setType(int type) {
+		this.type = type;
+	}
+
+	public boolean hasStringArguments() {
+		IFilterMatcherDescriptor descriptor = FilterTypeUtil.getDescriptor(id);
+		if (descriptor != null)
+			return descriptor.getArgumentType().equals(
+					IFilterMatcherDescriptor.ARGUMENT_TYPE_STRING);
+		return false;
+	}
+
+	public int getChildrenLimit() {
+		IFilterMatcherDescriptor descriptor = FilterTypeUtil.getDescriptor(id);
+		if (descriptor != null) {
+			if (descriptor.getArgumentType().equals(
+					IFilterMatcherDescriptor.ARGUMENT_TYPE_FILTER_MATCHER))
+				return 1;
+			if (descriptor.getArgumentType().equals(
+					IFilterMatcherDescriptor.ARGUMENT_TYPE_FILTER_MATCHERS))
+				return Integer.MAX_VALUE;
+		}
+		return 0;
+	}
+
+	public boolean equals(Object o) {
+		if (!(o instanceof FilterCopy))
+			return false;
+		FilterCopy filter = (FilterCopy) o;
+		return serialNumber == filter.serialNumber;
+	}
+
+	public int getSerialNumber() {
+		return serialNumber;
+	}
+
+	public FilterCopy findBySerialNumber(int number) {
+		LinkedList pending = new LinkedList();
+		pending.add(this);
+		while (!pending.isEmpty()) {
+			FilterCopy filter = (FilterCopy) pending.getFirst();
+			pending.removeFirst();
+			if (filter.serialNumber == number)
+				return filter;
+			FilterCopy[] tmp = filter.getChildren();
+			if (tmp != null)
+				pending.addAll(Arrays.asList(tmp));
+		}
+		return null;
+	}
+
+	public FilterCopy[] getChildren() {
+		if (getChildrenLimit() > 0) {
+			initializeChildren();
+			return (FilterCopy[]) children.toArray(new FilterCopy[0]);
+		}
+		return null;
+	}
+
+	protected void initializeChildren() {
+		if (children == null) {
+			if (getChildrenLimit() > 0) {
+				children = new LinkedList();
+				Object arguments = getArguments();
+				if (arguments instanceof IResourceFilterDescription[]) {
+					IResourceFilterDescription[] filters = (IResourceFilterDescription[]) arguments;
+					if (filters != null)
+						for (int i = 0; i < filters.length; i++) {
+							FilterCopy child = new FilterCopy(UIResourceFilterDescription.wrap(filters[i]));
+							child.parent = this;
+							children.add(child);
+						}
+				}
+				if (arguments instanceof FilterCopy[]) {
+					FilterCopy[] filters = (FilterCopy[]) arguments;
+					if (filters != null)
+						for (int i = 0; i < filters.length; i++) {
+							FilterCopy child = filters[i];
+							child.parent = this;
+							children.add(child);
+						}
+				}
+			}
+		}
+	}
+
+	protected void addChild(FilterCopy child) {
+		initializeChildren();
+		if (child.getParent() != null)
+			child.getParent().removeChild(child);
+		children.add(child);
+		child.parent = this;
+		serializeChildren();
+	}
+
+	protected void removeChild(FilterCopy child) {
+		initializeChildren();
+		children.remove(child);
+		if (child.parent == this)
+			child.parent = null;
+		serializeChildren();
+	}
+
+	protected void serializeChildren() {
+		initializeChildren();
+		argumentsChanged();
+	}
+
+	protected void argumentsChanged() {
+		initializeChildren();
+		if (children != null)
+			arguments = children.toArray(new FilterCopy[0]);
+		FilterCopy up = parent;
+		while (up != null) {
+			up.serializeChildren();
+			up = up.parent;
+		}
+	}
+
+	public boolean isUnderAGroupFilter() {
+		// a partial filter is a filter that is located under a group, but not
+		// the root group
+		if (parent != null) {
+			if ((parent.getChildrenLimit() > 0) && (parent.getParent() != null))
+				return true;
+		}
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IResourceFilterDescription#getFileInfoMatcherDescription()
+	 */
+	public FileInfoMatcherDescription getFileInfoMatcherDescription() {
+		
+		
+		Object arg = FilterCopy.this.getArguments();
+		if (arg instanceof FilterCopy []) {
+			FilterCopy [] filterCopies = (FilterCopy []) arg;
+			FileInfoMatcherDescription[] descriptions = new FileInfoMatcherDescription[filterCopies.length];
+			for (int i = 0; i < descriptions.length; i++)
+				descriptions[i] = filterCopies[i].getFileInfoMatcherDescription();
+			arg = descriptions;
+		}
+		
+		FileInfoMatcherDescription desc = new FileInfoMatcherDescription(getId(), arg);
+		return desc;
+	}
+}
+
+class FilterEditDialog extends TrayDialog {
+
+	private FilterCopy filter;
+
+	protected Button filesButton;
+	protected Button foldersButton;
+	protected Button filesAndFoldersButton;
+	protected Combo idCombo;
+	protected Composite idComposite;
+	protected Button includeButton;
+	protected Button excludeButton;
+	protected Composite argumentComposite;
+	protected Button inherited;
+	protected FilterTypeUtil util;
+	protected boolean createGroupOnly;
+	protected boolean creatingNewFilter;
+	protected ResourceFilterGroup filterGroup;
+	protected IResource resource;
+
+	TreeMap/*<String, ICustomFilterArgumentUI */ customfilterArgumentMap = new TreeMap();
+	ICustomFilterArgumentUI currentCustomFilterArgumentUI = new ICustomFilterArgumentUI() {
+		public Object getID() {return "dummy";} //$NON-NLS-1$
+		public void create(Composite argumentComposite, Font font) {}
+		public void dispose() {}
+		public void selectionChanged() {}
+		public String validate() {return null;}
+		public StyledString formatStyledText(FilterCopy filter,
+				Styler fPlainStyler, Styler fBoldStyler) {return null;}
+	};
+
+	/**
+	 * Constructor for FilterEditDialog.
+	 * @param resource
+	 * @param filterGroup
+	 * @param parentShell
+	 * @param filter
+	 * @param createGroupOnly
+	 * @param creatingNewFilter
+	 */
+	public FilterEditDialog(IResource resource, ResourceFilterGroup filterGroup, Shell parentShell, FilterCopy filter, boolean createGroupOnly, boolean creatingNewFilter) {
+		super(parentShell);
+		this.resource = resource;
+		this.creatingNewFilter = creatingNewFilter;
+		this.filterGroup = filterGroup;
+		this.filter = filter;
+		this.createGroupOnly = createGroupOnly;
+		util = new FilterTypeUtil();
+		ICustomFilterArgumentUI ui = new MultiMatcherCustomFilterArgumentUI(this, parentShell, filter);
+		customfilterArgumentMap.put(ui.getID(), ui);
+		ui = new DefaultCustomFilterArgumentUI(this, parentShell, filter);
+		customfilterArgumentMap.put(ui.getID(), ui);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+	 * .Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		parent.setLayoutData(data);
+
+		Font font = parent.getFont();
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginHeight = 0;
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		composite.setLayout(layout);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		composite.setLayoutData(data);
+		composite.setFont(font);
+
+		Dialog.applyDialogFont(composite);
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(),
+				IIDEHelpContextIds.EDIT_RESOURCE_FILTER_PROPERTY_PAGE);
+
+		if (!filter.isUnderAGroupFilter()) {
+			Composite topComposite = new Composite(composite, SWT.NONE);
+			layout = new GridLayout();
+			layout.numColumns = 1;
+			layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+			layout.marginWidth = 0;
+			layout.marginBottom = 0;
+			layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+			layout.horizontalSpacing = 0; // convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+			topComposite.setLayout(layout);
+			data = new GridData(SWT.FILL, SWT.FILL, true, false);
+			topComposite.setLayoutData(data);
+			topComposite.setFont(font);
+
+			createModeArea(font, topComposite);
+
+			createTargetArea(font, topComposite);
+			
+			createIdArea(font, topComposite);
+		}
+		else {
+			layout.marginHeight = convertHorizontalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+			createIdArea(font, composite);
+		}
+		return composite;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.TrayDialog#createButtonBar(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createButtonBar(Composite parent) {
+		Label label = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
+		label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+
+		Composite composite = new Composite(parent, SWT.NONE);
+    	GridLayout layout = new GridLayout();
+    	layout.marginWidth = 0;
+    	layout.marginHeight = 0;
+    	layout.horizontalSpacing = 0;
+    	composite.setLayout(layout);
+    	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+    	composite.setFont(parent.getFont());
+
+		// create help control if needed
+        if (isHelpAvailable()) {
+        	Control helpControl = createHelpControl(composite);
+        	((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		}
+       
+        Control buttonSection = dialogCreateButtonBar(composite);
+        ((GridData) buttonSection.getLayoutData()).grabExcessHorizontalSpace = true;
+        return composite;
+	}
+
+	private Control dialogCreateButtonBar(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		// create a layout with spacing and margins appropriate for the font
+		// size.
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 0; // this is incremented by createButton
+		layout.makeColumnsEqualWidth = true;
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+		layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+		composite.setLayout(layout);
+		GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END
+				| GridData.VERTICAL_ALIGN_CENTER);
+		composite.setLayoutData(data);
+		composite.setFont(parent.getFont());
+		
+		// Add the buttons to the button bar.
+		createButtonsForButtonBar(composite);
+		return composite;
+	}
+
+	/**
+	 * @param font
+	 * @param composite
+	 */
+	private void createInheritableArea(Font font, Composite composite) {
+		Composite inheritableComposite = createGroup(font, composite, NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_columnFilterMode,
+				null), false, false, 1);
+		GridLayout layout = (GridLayout) inheritableComposite.getLayout();
+		layout.marginBottom = 0;
+		layout.marginTop = 0;
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		layout.verticalSpacing = 0;
+		layout.marginLeft = 0;
+		inheritableComposite.setLayout(layout);
+
+		GridData data;
+		inherited = new Button(inheritableComposite, SWT.CHECK);
+		String label;
+		label = IDEWorkbenchMessages.ResourceFilterPage_applyRecursivelyToFolderStructure;
+		
+		inherited
+				.setText(NLS
+						.bind(
+								label,
+								resource.getName()));
+		data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		data.horizontalSpan = 1;
+		inherited.setLayoutData(data);
+		inherited.setFont(font);
+		inherited.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.INHERITABLE,
+						new Boolean(inherited.getSelection()));
+			}
+		});
+		inherited.setSelection((((Boolean) FilterTypeUtil.getValue(filter,
+				FilterTypeUtil.INHERITABLE)).booleanValue()));
+	}
+
+	private void createModeArea(Font font, Composite composite) {
+		GridData data;
+		Composite modeComposite = createGroup(font, composite, NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_columnFilterMode,
+				null), true, true, 1);
+		String[] modes = FilterTypeUtil.getModes();
+		includeButton = new Button(modeComposite, SWT.RADIO);
+		includeButton.setText(modes[0]);
+		data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		includeButton.setLayoutData(data);
+		includeButton.setFont(font);
+		includeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.MODE,
+						new Integer(0));
+			}
+		});
+		includeButton.setSelection(((Integer) FilterTypeUtil.getValue(
+				filter, FilterTypeUtil.MODE)).intValue() == 0);
+		excludeButton = new Button(modeComposite, SWT.RADIO);
+		excludeButton.setText(modes[1]);
+		data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		excludeButton.setLayoutData(data);
+		excludeButton.setFont(font);
+		excludeButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.MODE,
+						new Integer(1));
+			}
+		});
+		excludeButton.setSelection(((Integer) FilterTypeUtil.getValue(
+				filter, FilterTypeUtil.MODE)).intValue() == 1);
+	}
+
+	private void createIdArea(Font font, Composite composite) {
+		if (createGroupOnly) {
+			idComposite = createGroup(font, composite, new String(),
+					true, true, 1);
+			createMatcherCombo(idComposite, font);
+			GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+			idCombo.setLayoutData(data);
+		}
+		else {
+			String [] matchers = FilterTypeUtil.getFilterNames(createGroupOnly);
+			boolean hasMoreThanOneMatcher = matchers.length > 1;
+
+			if (hasMoreThanOneMatcher) {
+				createMatcherCombo(composite, font);
+				GridData data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+				idCombo.setLayoutData(data);
+			}
+
+			idComposite = createGroup(font, composite,
+					hasMoreThanOneMatcher ? IDEWorkbenchMessages.ResourceFilterPage_details: matchers[0],
+					true, true, 1);
+
+			GridLayout layout = (GridLayout) idComposite.getLayout();
+			layout.marginBottom = 0;
+			layout.marginTop = 0;
+			layout.marginWidth = 0;
+			layout.marginHeight = 0;
+			layout.verticalSpacing = 0;
+			idComposite.setLayout(layout);
+		}
+		argumentComposite = new Composite(idComposite, SWT.NONE);
+		setupPatternLine();
+	}
+
+	private void createMatcherCombo(Composite composite, Font font) {
+		GridData data;
+		idCombo = new Combo(composite, SWT.READ_ONLY);
+		idCombo.setItems(FilterTypeUtil.getFilterNames(createGroupOnly));
+		data = new GridData(SWT.LEFT, SWT.CENTER, true, false);
+		idCombo.setLayoutData(data);
+		idCombo.setFont(font);
+		idCombo.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.ID, idCombo
+						.getItem(idCombo.getSelectionIndex()));
+				if (filter.hasStringArguments())
+					filter.setArguments(new String());
+				setupPatternLine();
+				currentCustomFilterArgumentUI.selectionChanged();
+				getShell().layout(true);
+				Point size = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+				Point shellSize = getShell().getSize();
+				size.x = Math.max(size.x, shellSize.x);
+				size.y = Math.max(size.y, shellSize.y);
+				getShell().setSize(size);
+				getShell().redraw();
+			}
+		});
+		idCombo.select(0);
+		selectComboItem(filter.getId());
+		FilterTypeUtil.setValue(filter, FilterTypeUtil.ID, idCombo
+				.getItem(idCombo.getSelectionIndex()));
+	}
+	
+
+	ICustomFilterArgumentUI getUI(String descriptorID) {
+		ICustomFilterArgumentUI result = (ICustomFilterArgumentUI) customfilterArgumentMap.get(descriptorID);
+		if (result == null)
+			return result = (ICustomFilterArgumentUI) customfilterArgumentMap.get(new String()); // default ui
+		return result;
+	}
+	
+	private void setupPatternLine() {
+		IFilterMatcherDescriptor descriptor;
+		if (createGroupOnly) {
+			String item = idCombo.getItem(idCombo.getSelectionIndex());
+			descriptor = FilterTypeUtil.getDescriptorByName(item);
+		}
+		else
+			descriptor = FilterTypeUtil.getDescriptor(filter.getId());
+		Font font = idComposite.getFont();
+		ICustomFilterArgumentUI customFilterArgumentUI = getUI(descriptor.getId());
+		if (!currentCustomFilterArgumentUI.getID().equals(customFilterArgumentUI.getID())) {
+			currentCustomFilterArgumentUI.dispose();
+			currentCustomFilterArgumentUI = customFilterArgumentUI;
+			currentCustomFilterArgumentUI.create(argumentComposite, font);
+		}
+	}
+
+	/**
+	 * 
+	 */
+	private void selectComboItem(String filterID) {
+		IFilterMatcherDescriptor descriptor = ResourcesPlugin.getWorkspace()
+		.getFilterMatcherDescriptor(filterID);
+		if (descriptor != null) {
+			String [] items = idCombo.getItems();
+			for (int i = 0; i < items.length; i++) {
+				if (items[i].equals(descriptor.getName())) {
+					idCombo.select(i);
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * @param font
+	 * @param composite
+	 * @return the group
+	 */
+	private Composite createGroup(Font font, Composite composite, String text,
+			boolean grabExcessVerticalSpace, boolean group, int columnCounts) {
+		GridLayout layout;
+		GridData data;
+		Composite modeComposite;
+		if (group) {
+			Group modeGroup = new Group(composite, SWT.NONE);
+			modeGroup.setText(text);
+			modeComposite = modeGroup;
+		} else {
+			modeComposite = new Composite(composite, SWT.NONE);
+		}
+		layout = new GridLayout();
+		layout.verticalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.marginLeft = 2;
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.numColumns = columnCounts;
+		modeComposite.setLayout(layout);
+		data = new GridData(SWT.FILL, SWT.FILL, true, grabExcessVerticalSpace);
+		modeComposite.setLayoutData(data);
+		modeComposite.setFont(font);
+		return modeComposite;
+	}
+
+	/**
+	 * @param font
+	 * @param composite
+	 */
+	private void createTargetArea(Font font, Composite composite) {
+		GridData data;
+		Composite targetComposite = createGroup(font, composite,
+				NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_columnFilterTarget, null), false, true, 1);
+		
+		String[] targets = FilterTypeUtil.getTargets();
+		filesButton = new Button(targetComposite, SWT.RADIO);
+		filesButton.setText(targets[0]);
+		data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+		filesButton.setLayoutData(data);
+		filesButton.setFont(font);
+
+		foldersButton = new Button(targetComposite, SWT.RADIO);
+		foldersButton.setText(targets[1]);
+		data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+		foldersButton.setLayoutData(data);
+		foldersButton.setFont(font);
+
+		filesAndFoldersButton = new Button(targetComposite, SWT.RADIO);
+		filesAndFoldersButton.setText(targets[2]);
+		data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+		filesAndFoldersButton.setLayoutData(data);
+		filesAndFoldersButton.setFont(font);
+
+		filesButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.TARGET,
+						new Integer(0));
+			}
+		});
+		foldersButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.TARGET,
+						new Integer(1));
+			}
+		});
+		filesAndFoldersButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.TARGET,
+						new Integer(2));
+			}
+		});
+		filesButton.setSelection(((Integer) FilterTypeUtil.getValue(filter,
+				FilterTypeUtil.TARGET)).intValue() == 0);
+		foldersButton.setSelection(((Integer) FilterTypeUtil.getValue(filter,
+				FilterTypeUtil.TARGET)).intValue() == 1);
+		filesAndFoldersButton.setSelection(((Integer) FilterTypeUtil.getValue(
+				filter, FilterTypeUtil.TARGET)).intValue() == 2);
+		createInheritableArea(font, targetComposite);
+	}
+
+	protected Control createContents(Composite parent) {
+		Control control = super.createContents(parent);
+		initialize();
+		update();
+		return control;
+	}
+
+	public void updateFinishControls() {
+		if (getButton(OK) != null) {
+			if (currentCustomFilterArgumentUI != null)
+				getButton(OK).setEnabled(currentCustomFilterArgumentUI.validate() == null);
+			else
+				getButton(OK).setEnabled(true);
+		}
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+	 */
+	protected boolean isResizable() {
+		return true;
+	}
+
+	protected void configureShell(Shell newShell) {
+		String title = null;
+		if (creatingNewFilter) {
+			if (resource.getType() == IResource.PROJECT)
+				title = NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_newFilterDialogTitleProject, resource.getName());
+			else
+				title = NLS.bind(IDEWorkbenchMessages.ResourceFilterPage_newFilterDialogTitleFolder, resource.getName());
+		}
+		else
+			title = IDEWorkbenchMessages.ResourceFilterPage_editFilterDialogTitle;
+		newShell.setText(title);
+		super.configureShell(newShell);
+	}
+
+	private void initialize() {
+	}
+
+	protected void update() {
+	}
+
+	protected void okPressed() {
+		// see if the initialize causes an exception
+		if (filter.hasStringArguments()) {
+			IFilterMatcherDescriptor desc = resource.getWorkspace().getFilterMatcherDescriptor(filter.getId());
+			if (desc != null) {
+				try {
+					currentCustomFilterArgumentUI.validate();
+					AbstractFileInfoMatcher matcher = ((FilterDescriptor) desc).createFilter();
+					matcher.initialize(resource.getProject(), filter.getArguments());
+				} catch (CoreException e) {
+					IWorkbenchWindow window = PlatformUI.getWorkbench()
+					.getActiveWorkbenchWindow();
+					if (window != null) {
+						ErrorDialog.openError(window.getShell(), IDEWorkbenchMessages.ResourceFilterPage_editFilterDialogTitle,
+								e.getMessage(), e.getStatus());
+					}
+					return;
+				}
+			}
+		}
+
+		super.okPressed();
+	}
+
+	public int getVerticalDLUsToPixel(int flag) {
+		return convertVerticalDLUsToPixels(flag);
+	}
+
+	public IResource getResource() {
+		return resource;
+	}
+
+	public int getHorizontalDLUsToPixel(int flag) {
+		return convertHorizontalDLUsToPixels(flag);
+	}
+}
+
+interface ICustomFilterArgumentUI {
+
+	/**
+	 * @return the descriptor ID
+	 */
+	Object getID();
+
+	/**
+	 * @param filter
+	 * @param fPlainStyler
+	 * @param fBoldStyler
+	 * @return the formatted StyledText
+	 */
+	StyledString formatStyledText(FilterCopy filter, Styler fPlainStyler,
+			Styler fBoldStyler);
+
+	/**
+	 * @return null if there's no issue
+	 * 
+	 */
+	String validate();
+
+	/**
+	 * 
+	 */
+	void selectionChanged();
+
+	/**
+	 * @param argumentComposite
+	 * @param font
+	 */
+	void create(Composite argumentComposite, Font font);
+
+	/**
+	 * 
+	 */
+	void dispose();
+	
+}
+
+class MultiMatcherCustomFilterArgumentUI implements ICustomFilterArgumentUI {
+
+	Shell shell;
+	FilterCopy filter;
+	protected Button argumentsCaseSensitive;
+	protected Button argumentsRegularExpresion;
+	protected Text arguments;
+	protected DateTime argumentsDate;
+	protected Combo argumentsBoolean;
+	protected Label argumentsLabel;
+	protected Label description;
+	protected ContentAssistCommandAdapter fContentAssistField;
+	protected Combo multiKey;
+	protected Combo multiOperator;
+	protected Composite multiArgumentComposite;
+	protected Composite conditionComposite;
+	protected Composite descriptionComposite;
+	protected Composite stringArgumentComposite;
+	protected Composite stringTextArgumentComposite;
+	protected Composite attributeStringArgumentComposite;
+	protected Class intiantiatedKeyOperatorType = null;
+	protected TreeMap/* <String, String>*/ valueCache = new TreeMap();
+	protected boolean initializationComplete = false;
+	protected FilterEditDialog dialog;
+	protected Label dummyLabel1;
+	protected Label dummyLabel2;
+	
+	/**
+	 * @param dialog
+	 * @param parentShell
+	 * @param filter
+	 */
+	public MultiMatcherCustomFilterArgumentUI(FilterEditDialog dialog, Shell parentShell,
+			FilterCopy filter) {
+		this.shell = parentShell;
+		this.dialog = dialog;
+		this.filter = filter;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#getID()
+	 */
+	public Object getID() {
+		return FileInfoAttributesMatcher.ID;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#dispose()
+	 */
+	public void dispose() {
+		Widget list[] = new Widget[] {multiKey, multiOperator, multiArgumentComposite, stringArgumentComposite, stringTextArgumentComposite, arguments, argumentsLabel, argumentsCaseSensitive, argumentsRegularExpresion, attributeStringArgumentComposite, description, conditionComposite, descriptionComposite, dummyLabel1, dummyLabel2};
+		for (int i = 0; i < list.length; i++) {
+			if (list[i] != null) {
+				list[i].dispose();
+			}
+		}
+		multiKey = null;
+		multiOperator = null;
+		multiArgumentComposite = null;
+		arguments = null;
+		argumentsLabel = null;
+		fContentAssistField = null;
+		intiantiatedKeyOperatorType = null;
+		stringArgumentComposite = null;
+		stringTextArgumentComposite = null;
+		argumentsCaseSensitive = null;
+		argumentsRegularExpresion = null;
+		attributeStringArgumentComposite = null;
+		description = null;
+		conditionComposite = null;
+		descriptionComposite = null;
+		dummyLabel1 = null;
+		dummyLabel2 = null;
+		initializationComplete = false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#create(org.eclipse.swt.widgets.Composite, org.eclipse.swt.graphics.Font)
+	 */
+	public void create(Composite argumentComposite, Font font) {
+		shell = argumentComposite.getShell();
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		layout.horizontalSpacing = 0;
+		layout.verticalSpacing = 0;
+		argumentComposite.setLayout(layout);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		argumentComposite.setLayoutData(data);
+		argumentComposite.setFont(font);
+		
+		conditionComposite = new Composite(argumentComposite, SWT.NONE);
+		layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		layout.horizontalSpacing = 0;
+		conditionComposite.setLayout(layout);
+		conditionComposite.setFont(font);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		conditionComposite.setLayoutData(data);
+
+		createCustomArgumentsArea(font, conditionComposite);
+		
+		descriptionComposite = new Composite(argumentComposite, SWT.NONE);
+		layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginWidth = dialog.getHorizontalDLUsToPixel(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.marginHeight = dialog.getVerticalDLUsToPixel(IDialogConstants.VERTICAL_SPACING);
+		layout.horizontalSpacing = 0;
+		descriptionComposite.setLayout(layout);
+		descriptionComposite.setFont(font);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		descriptionComposite.setLayoutData(data);
+		
+		createDescriptionArea(font, descriptionComposite);
+		initializationComplete = true;
+	}
+	
+	/**
+	 * @param font
+	 * @param composite
+	 */
+	private void createDescriptionArea(Font font, Composite composite) {
+		GridData data;
+		description = new Label(composite, SWT.LEFT | SWT.WRAP);
+		data = new GridData(SWT.FILL, SWT.BEGINNING, true, true);
+		data.horizontalSpan = 3;
+		description.setLayoutData(data);
+		description.setFont(font);
+		setupDescriptionText(null);
+	}
+
+	private void setupDescriptionText(String errorString) {
+		if (description != null) {
+			if (errorString != null) {
+				// take only the first line of the error string
+				BufferedReader reader = new BufferedReader(new StringReader(errorString));
+				try {
+					String tmp = reader.readLine();
+					if (tmp != null)
+						errorString = tmp;
+				} catch (IOException e) {
+				}
+
+				description.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_RED));
+				description.setText(errorString);
+			} else {
+				description.setForeground(shell.getDisplay().getSystemColor(SWT.COLOR_BLACK));
+				String selectedKey = MultiMatcherLocalization.getMultiMatcherKey(multiKey.getText());
+				String selectedOperator = MultiMatcherLocalization.getMultiMatcherKey(multiOperator.getText());
+				Class selectedKeyOperatorType = FileInfoAttributesMatcher.getTypeForKey(selectedKey, selectedOperator);
+				description.setText(new String());
+				if (selectedKeyOperatorType.equals(String.class)) {
+					if (!argumentsRegularExpresion.getSelection())
+						description.setText(NLS.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_multiMatcher_Matcher, null));
+				}
+				if (selectedKeyOperatorType.equals(Integer.class)) {
+					if (selectedKey.equals(FileInfoAttributesMatcher.KEY_LAST_MODIFIED) || selectedKey.equals(FileInfoAttributesMatcher.KEY_CREATED))
+						description.setText(NLS.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_multiMatcher_TimeInterval, null));
+					else
+					description.setText(NLS.bind(
+							IDEWorkbenchMessages.ResourceFilterPage_multiMatcher_FileLength, null));
+				}
+			}
+			shell.layout(true, true);
+		}
+	}
+	
+	private void createCustomArgumentsArea(Font font, Composite composite) {
+		GridData data;
+
+		multiArgumentComposite = new Composite(composite, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 3;
+		layout.marginWidth = dialog.getHorizontalDLUsToPixel(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.horizontalSpacing = dialog.getHorizontalDLUsToPixel(IDialogConstants.HORIZONTAL_SPACING);
+		layout.marginTop = dialog.getVerticalDLUsToPixel(IDialogConstants.VERTICAL_SPACING);
+		layout.marginHeight = 0;
+		multiArgumentComposite.setLayout(layout);
+		multiArgumentComposite.setFont(font);
+		data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		multiArgumentComposite.setLayoutData(data);
+		
+		multiKey = new Combo(multiArgumentComposite, SWT.READ_ONLY);
+		multiKey.setItems(getMultiMatcherKeys());
+		data = new GridData(SWT.LEFT, SWT.TOP, false, false);
+		multiKey.setLayoutData(data);
+		multiKey.setFont(font);
+		multiKey.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setupMultiOperatorAndField(true);
+				storeMultiSelection();
+			}
+		});
+		
+		// calculate max combo width
+		ArrayList allOperators = new ArrayList();
+		String[] keys = getMultiMatcherKeys();
+		for (int i = 0; i < keys.length; i++) {
+			allOperators.addAll(Arrays.asList(getLocalOperatorsForKey(MultiMatcherLocalization.getMultiMatcherKey(keys[i]))));
+		}
+		Combo tmp = new Combo(multiArgumentComposite, SWT.READ_ONLY);
+		tmp.setItems((String []) allOperators.toArray(new String[0]));
+		int maxWidth = tmp.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+		tmp.dispose();
+
+		multiOperator = new Combo(multiArgumentComposite, SWT.READ_ONLY);
+		data = new GridData(SWT.LEFT, SWT.TOP, false, false);
+		data.widthHint = maxWidth;
+		multiOperator.setLayoutData(data);
+		multiOperator.setFont(font);
+		multiOperator.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				setupMultiOperatorAndField(false);
+				storeMultiSelection();
+			}
+		});
+		
+		FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+		String local = MultiMatcherLocalization.getLocalMultiMatcherKey(argument.key);
+		int index = multiKey.indexOf(local);
+		if (index != -1)
+			multiKey.select(index);
+		else
+			multiKey.select(0);
+		
+		setupMultiOperatorAndField(true);
+	}
+
+	private void setupMultiOperatorAndField(boolean updateOperator) {
+		boolean isUsingRegularExpression = false;
+		String selectedKey = MultiMatcherLocalization.getMultiMatcherKey(multiKey.getText());
+		if (updateOperator) {
+			String[] operators = getLocalOperatorsForKey(selectedKey);
+			multiOperator.setItems(operators);
+			FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+			String local = MultiMatcherLocalization.getLocalMultiMatcherKey(argument.operator);
+			int index = multiOperator.indexOf(local);
+			if (index != -1)
+				multiOperator.select(index);
+			else
+				multiOperator.select(0);
+		}
+		String selectedOperator = MultiMatcherLocalization.getMultiMatcherKey(multiOperator.getText());
+		
+		Class selectedKeyOperatorType = FileInfoAttributesMatcher.getTypeForKey(selectedKey, selectedOperator);
+		
+		if (intiantiatedKeyOperatorType != null) {
+			if (intiantiatedKeyOperatorType.equals(selectedKeyOperatorType))
+				return;
+			if (arguments != null) {
+				arguments.dispose();
+				arguments = null;
+			}
+			if (attributeStringArgumentComposite != null) {
+				attributeStringArgumentComposite.dispose();
+				attributeStringArgumentComposite = null;
+			}
+			if (stringArgumentComposite != null) {
+				stringArgumentComposite.dispose();
+				stringArgumentComposite = null;
+			}
+			if (argumentsBoolean != null) {
+				argumentsBoolean.dispose();
+				argumentsBoolean = null;
+			}
+			if (argumentsDate != null) {
+				argumentsDate.dispose();
+				argumentsDate = null;
+			}
+			if (argumentsRegularExpresion != null) {
+				argumentsRegularExpresion.dispose();
+				argumentsRegularExpresion = null;
+			}
+			if (argumentsCaseSensitive != null) {
+				argumentsCaseSensitive.dispose();
+				argumentsCaseSensitive = null;
+			}
+			if (dummyLabel1 != null) {
+				dummyLabel1.dispose();
+				dummyLabel1 = null;
+			}
+			if (dummyLabel2 != null) {
+				dummyLabel2.dispose();
+				dummyLabel2 = null;
+			}
+			fContentAssistField = null;
+			FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+			valueCache.put(intiantiatedKeyOperatorType.getName(), argument.pattern);
+			argument.pattern = (String) valueCache.get(selectedKeyOperatorType.getName());
+			if (argument.pattern == null)
+				argument.pattern = new String();
+			filter.setArguments(FileInfoAttributesMatcher.encodeArguments(argument));
+		}
+
+		if (selectedKeyOperatorType.equals(String.class)) {
+	
+			arguments = new Text(multiArgumentComposite, SWT.SINGLE | SWT.BORDER);
+			GridData data= new GridData(SWT.FILL, SWT.FILL, true, false);
+			data.widthHint = 150;
+			arguments.setLayoutData(data);
+			arguments.setFont(multiArgumentComposite.getFont());
+			arguments.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					validateInputText();
+				}
+			});
+
+			dummyLabel1 = new Label(multiArgumentComposite, SWT.NONE);
+			data = new GridData(SWT.LEFT, SWT.CENTER, true, true);
+			dummyLabel1.setText(new String());
+			data.horizontalSpan = 1;
+			dummyLabel1.setLayoutData(data);
+
+			dummyLabel2 = new Label(multiArgumentComposite, SWT.NONE);
+			data = new GridData(SWT.LEFT, SWT.CENTER, true, true);
+			dummyLabel2.setText(new String());
+			data.horizontalSpan = 1;
+			dummyLabel2.setLayoutData(data);
+
+			stringArgumentComposite = new Composite(multiArgumentComposite, SWT.NONE);
+			
+			GridLayout layout = new GridLayout();
+			layout.numColumns = 2;
+			layout.marginWidth = 0;
+			layout.marginTop = dialog.getVerticalDLUsToPixel(IDialogConstants.VERTICAL_SPACING) / 2;
+			layout.marginHeight = 0;
+			layout.marginBottom = 0;
+			stringArgumentComposite.setLayout(layout);
+			data = new GridData(SWT.FILL, SWT.CENTER, true, true);
+			data.horizontalSpan = 1;
+			stringArgumentComposite.setLayoutData(data);
+			stringArgumentComposite.setFont(multiArgumentComposite.getFont());
+
+			argumentsCaseSensitive = new Button(stringArgumentComposite, SWT.CHECK);
+			argumentsCaseSensitive.setText(NLS.bind(
+					IDEWorkbenchMessages.ResourceFilterPage_caseSensitive, null));
+			data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+			argumentsCaseSensitive.setLayoutData(data);
+			argumentsCaseSensitive.setFont(multiArgumentComposite.getFont());
+
+			argumentsRegularExpresion = new Button(stringArgumentComposite, SWT.CHECK);
+			argumentsRegularExpresion.setText(NLS.bind(
+					IDEWorkbenchMessages.ResourceFilterPage_regularExpression, null));
+			data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+			data.minimumWidth = 100;
+			argumentsRegularExpresion.setLayoutData(data);
+			argumentsRegularExpresion.setFont(multiArgumentComposite.getFont());
+
+			if (filter.hasStringArguments()) {
+				FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+				arguments.setText(argument.pattern);
+				isUsingRegularExpression = argument.regularExpression;
+				argumentsCaseSensitive.setSelection(argument.caseSensitive);
+				argumentsRegularExpresion.setSelection(argument.regularExpression);
+			}
+
+			arguments.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					storeMultiSelection();
+				}
+			});
+			argumentsRegularExpresion.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					setupDescriptionText(null);
+					storeMultiSelection();
+					if (fContentAssistField != null)
+						fContentAssistField.setEnabled(argumentsRegularExpresion.getSelection());
+				}
+			});
+			argumentsCaseSensitive.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					storeMultiSelection();
+				}
+			});
+
+			TextContentAdapter contentAdapter= new TextContentAdapter();
+			FindReplaceDocumentAdapterContentProposalProvider findProposer= new FindReplaceDocumentAdapterContentProposalProvider(true);
+			fContentAssistField= new ContentAssistCommandAdapter(
+					arguments,
+					contentAdapter,
+					findProposer,
+					null,
+					new char[] {'\\', '[', '('},
+					true);
+		}
+		if (selectedKeyOperatorType.equals(Integer.class)) {
+			GridData data;
+			arguments = new Text(multiArgumentComposite, SWT.SINGLE | SWT.BORDER);
+			data= new GridData(SWT.FILL, SWT.FILL, true, false);
+			data.widthHint = 150;
+			arguments.setLayoutData(data);
+			arguments.setFont(multiArgumentComposite.getFont());
+			arguments.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					validateInputText();
+				}
+			});
+
+			if (filter.hasStringArguments()) {
+				FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+				if (selectedKey.equals(FileInfoAttributesMatcher.KEY_LAST_MODIFIED) || selectedKey.equals(FileInfoAttributesMatcher.KEY_CREATED))
+					arguments.setText(convertToEditableTimeInterval(argument.pattern));
+				else
+					arguments.setText(convertToEditableLength(argument.pattern));
+			}
+			
+			arguments.addModifyListener(new ModifyListener() {
+				public void modifyText(ModifyEvent e) {
+					storeMultiSelection();
+				}
+			});
+		}
+		if (selectedKeyOperatorType.equals(Date.class)) {
+			GridData data;
+			argumentsDate = new DateTime(multiArgumentComposite, SWT.DATE | SWT.MEDIUM | SWT.BORDER);
+			data= new GridData(SWT.FILL, SWT.FILL, true, false);
+			argumentsDate.setLayoutData(data);
+			argumentsDate.setFont(multiArgumentComposite.getFont());
+			argumentsDate.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					storeMultiSelection();
+				}
+			});
+			if (filter.hasStringArguments()) {
+				FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+				Date date;
+				Calendar calendar = Calendar.getInstance();
+				try {
+					date = new Date(Long.parseLong(argument.pattern));
+					calendar.setTime(date);
+				} catch (NumberFormatException e1) {
+					date = new Date();
+					calendar.setTime(date);
+					argument.pattern = Long.toString(calendar.getTimeInMillis());
+				}
+				argumentsDate.setDay(calendar.get(Calendar.DAY_OF_MONTH));
+				argumentsDate.setMonth(calendar.get(Calendar.MONTH));
+				argumentsDate.setYear(calendar.get(Calendar.YEAR));
+			}
+		}
+		if (selectedKeyOperatorType.equals(Boolean.class)) {
+			GridData data;
+			argumentsBoolean = new Combo(multiArgumentComposite, SWT.READ_ONLY);
+			data = new GridData(SWT.FILL, SWT.TOP, true, false);
+			argumentsBoolean.setLayoutData(data);
+			argumentsBoolean.setFont(multiArgumentComposite.getFont());
+			argumentsBoolean.setItems(new String[] {MultiMatcherLocalization.getLocalMultiMatcherKey(Boolean.TRUE.toString()), MultiMatcherLocalization.getLocalMultiMatcherKey(Boolean.FALSE.toString())});
+			argumentsBoolean.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					storeMultiSelection();
+				}
+			});
+			if (filter.hasStringArguments()) {
+				FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments((String) filter.getArguments());
+				if (argument.pattern.length() == 0)
+					argumentsBoolean.select(0);
+				else
+					argumentsBoolean.select(Boolean.valueOf(argument.pattern).booleanValue() ? 0:1);
+			}
+		}
+		intiantiatedKeyOperatorType = selectedKeyOperatorType;
+		
+		if (fContentAssistField != null)
+			fContentAssistField.setEnabled(isUsingRegularExpression);
+
+		shell.layout(true, true);
+		if (initializationComplete) {
+			Point size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+			Point shellSize = shell.getSize();
+			size.x = Math.max(size.x, shellSize.x);
+			size.y = Math.max(size.y, shellSize.y);
+			if ((size.x > shellSize.x) || (size.y > shellSize.y))
+				shell.setSize(size);
+		}
+		shell.redraw();
+		setupDescriptionText(null);
+	}
+
+	private String[] timeIntervalPrefixes = {"s", "m", "h", "d"};    //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
+	private double[] timeIntervalScale = {60, 60, 24};
+
+	private String convertToEditableTimeInterval(String string) {
+		if (string.length() == 0)
+			return string;
+		long value;
+		try {
+			value = Long.parseLong(string);
+		} catch (NumberFormatException e) {
+			value = 0;
+		}
+		if (value == 0)
+			return Long.toString(0);
+		for (int i = 0; i < timeIntervalPrefixes.length - 1; i++) {
+			if (value % timeIntervalScale[i] != 0)
+				return Long.toString(value) + timeIntervalPrefixes[i];
+			value /= timeIntervalScale[i];
+		}
+		return Long.toString(value) + timeIntervalPrefixes[timeIntervalPrefixes.length - 1];
+	}
+
+	private String convertFromEditableTimeInterval(String string) {
+		if (string.length() == 0)
+			return string;
+		for (int i = 1; i < timeIntervalPrefixes.length; i++) {
+			if (string.endsWith(timeIntervalPrefixes[i])) {
+				long value = Long.parseLong(string.substring(0, string.length() - 1));
+				for (int j = 0; j < i; j++)
+					value *= timeIntervalScale[j];
+				return Long.toString(value);
+			}
+		}
+		// seems equivalent to "return string", but it throws an exception if the string doesn't contain a valid number
+		return Long.toString(Long.parseLong(string));
+	}
+
+
+	private String[] lengthPrefixes = {new String(), "k", "m", "g"};    //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+	// converts "32768" to "32k"
+	private String convertToEditableLength(String string) {
+		if (string.length() == 0)
+			return string;
+		long value;
+		try {
+			value = Long.parseLong(string);
+		} catch (NumberFormatException e) {
+			value = 0;
+		}
+		if (value == 0)
+			return Long.toString(0);
+		for (int i = 0; i < lengthPrefixes.length; i++) {
+			if (value % 1024 != 0)
+				return Long.toString(value) + lengthPrefixes[i];
+			if ((i + 1) < lengthPrefixes.length)
+				value /= 1024;
+		}
+		return Long.toString(value) + lengthPrefixes[lengthPrefixes.length - 1];
+	}
+	
+	// converts "32k" to "32768"
+	private String convertFromEditableLength(String string) throws NumberFormatException {
+		if (string.length() == 0)
+			return string;
+		for (int i = 1; i < lengthPrefixes.length; i++) {
+			if (string.endsWith(lengthPrefixes[i])) {
+				long value = Long.parseLong(string.substring(0, string.length() - 1));
+				value *= Math.pow(1024, i);
+				return Long.toString(value);
+			}
+		}
+		// seems equivalent to "return string", but it throws an exception if the string doesn't contain a valid number
+		return Long.toString(Long.parseLong(string));
+	}
+	
+	private void storeMultiSelection() {
+		if (intiantiatedKeyOperatorType != null) {
+			String selectedKey = MultiMatcherLocalization.getMultiMatcherKey(multiKey.getText());
+			String selectedOperator = MultiMatcherLocalization.getMultiMatcherKey(multiOperator.getText());
+	
+			FileInfoAttributesMatcher.Argument argument = new FileInfoAttributesMatcher.Argument();
+			argument.key = selectedKey;
+			argument.operator = selectedOperator;
+			
+			if (intiantiatedKeyOperatorType.equals(Date.class) && argumentsDate != null) {
+				Calendar calendar = Calendar.getInstance();
+				calendar.set(argumentsDate.getYear(), argumentsDate.getMonth(), argumentsDate.getDay());
+				argument.pattern = Long.toString(calendar.getTimeInMillis());
+			}
+			if (intiantiatedKeyOperatorType.equals(String.class) && arguments != null) {
+				argument.pattern = arguments.getText();
+				if (argumentsRegularExpresion != null)
+					argument.regularExpression = argumentsRegularExpresion.getSelection();
+				if (argumentsCaseSensitive != null)
+					argument.caseSensitive = argumentsCaseSensitive.getSelection();
+			}
+			if (intiantiatedKeyOperatorType.equals(Integer.class) && arguments != null) {
+				try {
+					if (selectedKey.equals(FileInfoAttributesMatcher.KEY_LAST_MODIFIED) || selectedKey.equals(FileInfoAttributesMatcher.KEY_CREATED))
+						argument.pattern = convertFromEditableTimeInterval(arguments.getText());
+					else
+						argument.pattern = convertFromEditableLength(arguments.getText());
+				} catch (NumberFormatException e) {
+					argument.pattern = arguments.getText();
+				}
+			}
+			if (intiantiatedKeyOperatorType.equals(Boolean.class) && argumentsBoolean != null)
+				argument.pattern = MultiMatcherLocalization.getMultiMatcherKey(argumentsBoolean.getText());
+			String encodedArgument = FileInfoAttributesMatcher.encodeArguments(argument);
+			FilterTypeUtil.setValue(filter, FilterTypeUtil.ARGUMENTS, encodedArgument);
+		}
+	}
+
+	private String[] getLocalOperatorsForKey(String key) {
+		String [] operators = FileInfoAttributesMatcher.getOperatorsForKey(key);
+		String[] result = new String[operators.length];
+		for (int i = 0; i < operators.length; i++)
+			result[i] = MultiMatcherLocalization.getLocalMultiMatcherKey(operators[i]);
+		return result;
+	}
+
+	private String[] getMultiMatcherKeys() {
+		ArrayList list = new ArrayList();
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_NAME));
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_PROPJECT_RELATIVE_PATH));
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_LOCATION));
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_LAST_MODIFIED));
+		if (FileInfoAttributesMatcher.supportCreatedKey())
+			list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_CREATED));
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_LENGTH));
+		list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_IS_READONLY));
+		if (!Platform.getOS().equals(Platform.OS_WIN32))
+			list.add(MultiMatcherLocalization.getLocalMultiMatcherKey(FileInfoAttributesMatcher.KEY_IS_SYMLINK));
+		return (String []) list.toArray(new String[0]);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#selectionChanged()
+	 */
+	public void selectionChanged() {
+	}
+
+	void validateInputText() {
+		setupDescriptionText(validate());
+		dialog.updateFinishControls();
+	}
+
+	public String validate() {
+		String message = null;
+		if (intiantiatedKeyOperatorType != null) {
+			String selectedKey = MultiMatcherLocalization.getMultiMatcherKey(multiKey.getText());
+			String selectedOperator = MultiMatcherLocalization.getMultiMatcherKey(multiOperator.getText());
+	
+			FileInfoAttributesMatcher.Argument argument = new FileInfoAttributesMatcher.Argument();
+			argument.key = selectedKey;
+			argument.operator = selectedOperator;
+			
+			if (intiantiatedKeyOperatorType.equals(Date.class) && argumentsDate != null) {
+			}
+			if (intiantiatedKeyOperatorType.equals(String.class) && arguments != null) {
+				argument.pattern = arguments.getText();
+				if (argumentsRegularExpresion != null)
+					argument.regularExpression = argumentsRegularExpresion.getSelection();
+				if (argumentsCaseSensitive != null)
+					argument.caseSensitive = argumentsCaseSensitive.getSelection();
+				String encodedArgument = FileInfoAttributesMatcher.encodeArguments(argument);
+				FilterCopy copy = new FilterCopy(filter);
+				FilterTypeUtil.setValue(copy, FilterTypeUtil.ARGUMENTS, encodedArgument);
+
+				IFilterMatcherDescriptor desc = dialog.getResource().getWorkspace().getFilterMatcherDescriptor(copy.getId());
+				if (desc != null) {
+					try {
+						AbstractFileInfoMatcher matcher = ((FilterDescriptor) desc).createFilter();
+						matcher.initialize(dialog.getResource().getProject(), copy.getArguments());
+					} catch (CoreException e) {
+							message = e.getMessage();
+					}
+				}
+			}
+			if (intiantiatedKeyOperatorType.equals(Integer.class) && arguments != null) {
+				if (selectedKey.equals(FileInfoAttributesMatcher.KEY_LAST_MODIFIED) || selectedKey.equals(FileInfoAttributesMatcher.KEY_CREATED)) {
+					try {
+						convertFromEditableTimeInterval(arguments.getText());
+					} catch (NumberFormatException e) {
+						message = NLS.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_multiMatcher_InvalidTimeInterval, arguments.getText());
+					}
+				}
+				else {
+					try {
+						convertFromEditableLength(arguments.getText());
+					} catch (NumberFormatException e) {
+						message = NLS.bind(
+								IDEWorkbenchMessages.ResourceFilterPage_multiMatcher_InvalidFileLength, arguments.getText());
+					}
+				}
+			}
+			if (intiantiatedKeyOperatorType.equals(Boolean.class) && argumentsBoolean != null) {
+				
+			}
+		}
+		return message;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#formatStyledText(org.eclipse.ui.internal.ide.dialogs.FilterCopy, org.eclipse.jface.viewers.StyledString.Styler, org.eclipse.jface.viewers.StyledString.Styler)
+	 */
+	public StyledString formatStyledText(FilterCopy filter,
+			Styler fPlainStyler, Styler fBoldStyler) {
+		return new StyledString(formatMultiMatcherArgument(filter), fPlainStyler);
+	}
+
+	private String formatMultiMatcherArgument(FilterCopy filter) {
+		String argumentString = (String) filter.getArguments();
+		FileInfoAttributesMatcher.Argument argument = FileInfoAttributesMatcher.decodeArguments(argumentString);
+		
+		StringBuffer builder = new StringBuffer();
+		builder.append(MultiMatcherLocalization.getLocalMultiMatcherKey(argument.key));
+		builder.append(' ');
+		builder.append(MultiMatcherLocalization.getLocalMultiMatcherKey(argument.operator));
+		builder.append(' ');
+		Class type = FileInfoAttributesMatcher.getTypeForKey(argument.key, argument.operator);
+		if (type.equals(String.class))
+			builder.append(argument.pattern);
+		if (type.equals(Boolean.class))
+			builder.append(MultiMatcherLocalization.getLocalMultiMatcherKey(argument.pattern));
+		if (type.equals(Integer.class)) {
+			if (argument.key.equals(FileInfoAttributesMatcher.KEY_LAST_MODIFIED) || argument.key.equals(FileInfoAttributesMatcher.KEY_CREATED))
+				builder.append(convertToEditableTimeInterval(argument.pattern));
+			else
+				builder.append(convertToEditableLength(argument.pattern));
+		}
+		if (type.equals(Date.class))
+			builder.append(DateFormat.getDateInstance().format(new Date(Long.parseLong(argument.pattern))));
+		
+		return builder.toString();
+	}
+}
+
+class DefaultCustomFilterArgumentUI implements ICustomFilterArgumentUI {
+
+	protected Shell shell;
+	protected FilterCopy filter;
+	protected Text arguments;
+	protected Label argumentsLabel;
+	protected Label description;
+	protected ContentAssistCommandAdapter fContentAssistField;
+	protected FilterEditDialog dialog;
+
+	public static final String REGEX_FILTER_ID = "org.eclipse.core.resources.regexFilterMatcher"; //$NON-NLS-1$
+
+	/**
+	 * @param dialog
+	 * @param parentShell
+	 * @param filter
+	 */
+	public DefaultCustomFilterArgumentUI(FilterEditDialog dialog, Shell parentShell, FilterCopy filter) {
+		this.shell = parentShell;
+		this.dialog = dialog;
+		this.filter = filter;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#getID()
+	 */
+	public Object getID() {
+		return new String();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#dispose()
+	 */
+	public void dispose() {
+		Widget list[] = new Widget[] {arguments, argumentsLabel, description};
+		for (int i = 0; i < list.length; i++) {
+			if (list[i] != null) {
+				list[i].dispose();
+			}
+		}
+		arguments = null;
+		argumentsLabel = null;
+		fContentAssistField = null;
+		description = null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#create(org.eclipse.swt.widgets.Composite, org.eclipse.swt.graphics.Font)
+	 */
+	public void create(Composite argumentComposite, Font font) {
+		shell = argumentComposite.getShell();
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginWidth = dialog.getVerticalDLUsToPixel(IDialogConstants.HORIZONTAL_MARGIN);
+		argumentComposite.setLayout(layout);
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		argumentComposite.setLayoutData(data);
+		argumentComposite.setFont(font);
+		if (filter.hasStringArguments())
+			createArgumentsArea(font, argumentComposite);
+
+		createDescriptionArea(font, argumentComposite);
+
+		if (fContentAssistField != null)
+			fContentAssistField.setEnabled(filter.getId().equals(REGEX_FILTER_ID));
+		argumentComposite.layout(true);
+	}
+	
+	private void createArgumentsArea(Font font, Composite composite) {
+		GridData data;
+		argumentsLabel = addLabel(composite, NLS.bind(
+				IDEWorkbenchMessages.ResourceFilterPage_columnFilterPattern,
+				null));
+		arguments = new Text(composite, SWT.SINGLE | SWT.BORDER);
+		data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+		arguments.setLayoutData(data);
+		arguments.setFont(font);
+		arguments.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				FilterTypeUtil.setValue(filter, FilterTypeUtil.ARGUMENTS,
+						arguments.getText());
+			}
+		});
+		if (filter.hasStringArguments())
+			arguments.setText((String) FilterTypeUtil.getValue(filter,
+					FilterTypeUtil.ARGUMENTS));
+		arguments.setEnabled(filter.hasStringArguments());
+		setArgumentLabelEnabled();
+
+		TextContentAdapter contentAdapter= new TextContentAdapter();
+		FindReplaceDocumentAdapterContentProposalProvider findProposer= new FindReplaceDocumentAdapterContentProposalProvider(true);
+		fContentAssistField= new ContentAssistCommandAdapter(
+				arguments,
+				contentAdapter,
+				findProposer,
+				null,
+				new char[] {'\\', '[', '('},
+				true);
+	}
+
+	private void setArgumentLabelEnabled() {
+		if (argumentsLabel != null) {
+			Color color = argumentsLabel.getDisplay().getSystemColor(
+					filter.hasStringArguments() ? SWT.COLOR_BLACK : SWT.COLOR_GRAY);
+			argumentsLabel.setForeground(color);
+		}
+	}
+
+	Label addLabel(Composite composite, String text) {
+		String delimiter = ":"; //$NON-NLS-1$
+
+		Font font = composite.getFont();
+		Label label = new Label(composite, SWT.LEFT);
+		label.setText(text + delimiter);
+		GridData data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+		label.setLayoutData(data);
+		label.setFont(font);
+		return label;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#selectionChanged()
+	 */
+	public void selectionChanged() {
+		if (arguments != null)
+			arguments.setEnabled(filter.hasStringArguments());
+		setArgumentLabelEnabled();
+		if (fContentAssistField != null)
+			fContentAssistField.setEnabled(filter.getId().equals(REGEX_FILTER_ID));
+		description.setText(FilterTypeUtil
+				.getDescriptor(filter.getId()).getDescription());
+	}
+
+	/**
+	 * @param font
+	 * @param composite
+	 */
+	private void createDescriptionArea(Font font, Composite composite) {
+		GridData data;
+		description = new Label(composite, SWT.LEFT | SWT.WRAP);
+		description.setText(FilterTypeUtil.getDescriptor(filter.getId())
+				.getDescription());
+		data = new GridData(SWT.FILL, SWT.BEGINNING, true, true);
+		data.widthHint = 300;
+		data.heightHint = 40;
+		data.horizontalSpan = 2;
+		description.setLayoutData(data);
+		description.setFont(font);
+	}
+
+	public String validate(){
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.ide.dialogs.ICustomFilterArgumentUI#formatStyledText(org.eclipse.ui.internal.ide.dialogs.FilterCopy, org.eclipse.jface.viewers.StyledString.Styler, org.eclipse.jface.viewers.StyledString.Styler)
+	 */
+	public StyledString formatStyledText(FilterCopy filter,
+			Styler fPlainStyler, Styler fBoldStyler) {
+		return new StyledString(filter.getArguments() != null ? filter
+					.getArguments().toString() : new String(), fPlainStyler);
+	}
+}
+
+class MultiMatcherLocalization {
+	
+	static String[][] multiMatcherKey = {
+			{FileInfoAttributesMatcher.KEY_NAME, IDEWorkbenchMessages.ResourceFilterPage_multiKeyName},
+			{FileInfoAttributesMatcher.KEY_PROPJECT_RELATIVE_PATH, IDEWorkbenchMessages.ResourceFilterPage_multiKeyProjectRelativePath},
+			{FileInfoAttributesMatcher.KEY_LOCATION, IDEWorkbenchMessages.ResourceFilterPage_multiKeyLocation},
+			{FileInfoAttributesMatcher.KEY_LAST_MODIFIED, IDEWorkbenchMessages.ResourceFilterPage_multiKeyLastModified},
+			{FileInfoAttributesMatcher.KEY_CREATED, IDEWorkbenchMessages.ResourceFilterPage_multiKeyCreated},
+			{FileInfoAttributesMatcher.KEY_LENGTH, IDEWorkbenchMessages.ResourceFilterPage_multiKeyLength},
+			{FileInfoAttributesMatcher.KEY_IS_READONLY, IDEWorkbenchMessages.ResourceFilterPage_multiKeyReadOnly},
+			{FileInfoAttributesMatcher.KEY_IS_SYMLINK, IDEWorkbenchMessages.ResourceFilterPage_multiKeySymLink},
+			{FileInfoAttributesMatcher.OPERATOR_AFTER, IDEWorkbenchMessages.ResourceFilterPage_multiAfter},
+			{FileInfoAttributesMatcher.OPERATOR_BEFORE, IDEWorkbenchMessages.ResourceFilterPage_multiBefore},
+			{FileInfoAttributesMatcher.OPERATOR_EQUALS, IDEWorkbenchMessages.ResourceFilterPage_multiEquals},
+			{FileInfoAttributesMatcher.OPERATOR_MATCHES, IDEWorkbenchMessages.ResourceFilterPage_multiMatches},
+			{FileInfoAttributesMatcher.OPERATOR_LARGER_THAN, IDEWorkbenchMessages.ResourceFilterPage_multiLargerThan},
+			{FileInfoAttributesMatcher.OPERATOR_SMALLER_THAN, IDEWorkbenchMessages.ResourceFilterPage_multiSmallerThan},
+			{FileInfoAttributesMatcher.OPERATOR_WITHIN, IDEWorkbenchMessages.ResourceFilterPage_multiWithin},
+			{Boolean.TRUE.toString(), IDEWorkbenchMessages.ResourceFilterPage_true},
+			{Boolean.FALSE.toString(), IDEWorkbenchMessages.ResourceFilterPage_false}
+	};
+	
+	static public String getLocalMultiMatcherKey(String key) {
+		for (int i = 0; i < multiMatcherKey.length; i++) {
+			if (multiMatcherKey[i][0].equals(key))
+				return multiMatcherKey[i][1];
+		}
+		return null;
+	}
+	
+	static public String getMultiMatcherKey(String local) {
+		for (int i = 0; i < multiMatcherKey.length; i++) {
+			if (multiMatcherKey[i][1].equals(local))
+				return multiMatcherKey[i][0];
+		}
+		return null;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterPage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterPage.java
new file mode 100644
index 0000000..d196fed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceFilterPage.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.dialogs;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+
+/**
+ * The ResourceInfoPage is the page that shows the basic info about the
+ * resource.
+ */
+public class ResourceFilterPage extends PropertyPage {
+
+	ResourceFilterGroup groupWidget;
+
+	/**
+	 * 
+	 */
+	public ResourceFilterPage() {
+		groupWidget = new ResourceFilterGroup();
+	}
+
+	protected Control createContents(Composite parent) {
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
+				IIDEHelpContextIds.RESOURCE_FILTER_PROPERTY_PAGE);
+
+		IResource resource = (IResource) getElement().getAdapter(
+				IResource.class);
+		IContainer container = resource instanceof IContainer ? (IContainer) resource
+				: null;
+		groupWidget.setContainer(container);
+
+		return groupWidget.createContents(parent);
+	}
+
+	protected void performDefaults() {
+		groupWidget.performDefaults();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.DialogPage#dispose()
+	 */
+	public void dispose() {
+		groupWidget.dispose();
+		super.dispose();
+	}
+
+	/**
+	 * Apply the read only state and the encoding to the resource.
+	 */
+	public boolean performOk() {
+		return groupWidget.performOk();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
index 6e57b1f..5931721 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,28 +8,41 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Remy Chi Jian Suen <remy.suen at gmail.com> - Bug 175069 [Preferences] ResourceInfoPage is not setting dialog font on all widgets
+ *     Serge Beauchamp (Freescale Semiconductor) - [229633] Project Path Variable Support
  *******************************************************************************/
 package org.eclipse.ui.internal.ide.dialogs;
 
 import java.net.URI;
 
 import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
 import org.eclipse.core.filesystem.IFileSystem;
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourceAttributes;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.content.IContentDescription;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.preference.FieldEditor;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TableEditor;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -37,6 +50,9 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.PropertyPage;
@@ -59,6 +75,10 @@ public class ResourceInfoPage extends PropertyPage {
 
 	private Button derivedBox;
 
+	private Button immutableBox;
+
+	private Button permissionBoxes[];
+
 	private boolean previousReadOnlyValue;
 
 	private boolean previousExecutableValue;
@@ -67,6 +87,8 @@ public class ResourceInfoPage extends PropertyPage {
 
 	private boolean previousDerivedValue;
 
+	private int previousPermissionsValue;
+
 	private IContentDescription cachedContentDescription;
 
 	private ResourceEncodingFieldEditor encodingEditor;
@@ -77,6 +99,8 @@ public class ResourceInfoPage extends PropertyPage {
 
 	private static String EXECUTABLE = IDEWorkbenchMessages.ResourceInfo_executable;
 
+	private static String LOCKED = IDEWorkbenchMessages.ResourceInfo_locked;
+
 	private static String ARCHIVE = IDEWorkbenchMessages.ResourceInfo_archive;
 
 	private static String DERIVED = IDEWorkbenchMessages.ResourceInfo_derived;
@@ -97,6 +121,13 @@ public class ResourceInfoPage extends PropertyPage {
 
 	private static String CONTAINER_ENCODING_TITLE = IDEWorkbenchMessages.ResourceInfo_fileEncodingTitle;
 
+	private static String EDIT_TITLE = IDEWorkbenchMessages.ResourceInfo_edit;
+
+	private Text resolvedLocationValue = null;
+	private Text locationValue = null;
+	private Text sizeValue = null;
+	private IPath newResourceLocation = null;
+
 	// Max value width in characters before wrapping
 	private static final int MAX_VALUE_WIDTH = 80;
 
@@ -110,6 +141,8 @@ public class ResourceInfoPage extends PropertyPage {
 	 * @return the composite for the group
 	 */
 	private Composite createBasicInfoGroup(Composite parent, IResource resource) {
+		initializeDialogUnits(parent);
+		
 		Composite basicInfoComposite = new Composite(parent, SWT.NULL);
 		GridLayout layout = new GridLayout();
 		layout.numColumns = 2;
@@ -152,27 +185,62 @@ public class ResourceInfoPage extends PropertyPage {
 		typeValue.setBackground(typeValue.getDisplay().getSystemColor(
 				SWT.COLOR_WIDGET_BACKGROUND));
 
-		// The group for location
-		Label locationTitle = new Label(basicInfoComposite, SWT.LEFT);
-		locationTitle.setText(LOCATION_TITLE);
-		gd = new GridData();
-		gd.verticalAlignment = SWT.TOP;
-		locationTitle.setLayoutData(gd);
+		if (resource.isLinked() && !resource.isVirtual()) {
+			// The group for location
+			Label locationTitle = new Label(basicInfoComposite, SWT.LEFT);
+			locationTitle.setText(LOCATION_TITLE);
+			gd = new GridData();
+			gd.verticalAlignment = SWT.TOP;
+			locationTitle.setLayoutData(gd);
+
+			Composite locationComposite = new Composite(basicInfoComposite,
+					SWT.NULL);
+			layout = new GridLayout();
+			layout.numColumns = 2;
+			layout.marginWidth = 0;
+			layout.marginHeight = 0;
+			locationComposite.setLayout(layout);
+			gd = new GridData();
+			gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH);
+			gd.grabExcessHorizontalSpace = true;
+			gd.verticalAlignment = SWT.TOP;
+			gd.horizontalAlignment = GridData.FILL;
+			locationComposite.setLayoutData(gd);
 
-		Text locationValue = new Text(basicInfoComposite, SWT.WRAP
-				| SWT.READ_ONLY);
-		String locationStr = TextProcessor.process(IDEResourceInfoUtils
-				.getLocationText(resource));
-		locationValue.setText(locationStr);
-		gd = new GridData();
-		gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH);
-		gd.grabExcessHorizontalSpace = true;
-		gd.horizontalAlignment = GridData.FILL;
-		locationValue.setLayoutData(gd);
-		locationValue.setBackground(locationValue.getDisplay().getSystemColor(
-				SWT.COLOR_WIDGET_BACKGROUND));
+			locationValue = new Text(locationComposite, SWT.WRAP
+					| SWT.READ_ONLY);
+			String locationStr = TextProcessor.process(IDEResourceInfoUtils
+					.getLocationText(resource));
+			locationValue.setText(locationStr);
+			gd = new GridData();
+			gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH);
+			gd.grabExcessHorizontalSpace = true;
+			gd.verticalAlignment = SWT.TOP;
+			gd.horizontalAlignment = GridData.FILL;
+			locationValue.setLayoutData(gd);
+			locationValue.setBackground(locationValue.getDisplay().getSystemColor(
+					SWT.COLOR_WIDGET_BACKGROUND));
+
+			Button editButton = new Button(locationComposite, SWT.PUSH);
+			editButton.setText(EDIT_TITLE);
+			setButtonLayoutData(editButton);
+			((GridData) editButton.getLayoutData()).verticalAlignment = SWT.TOP;
+			int locationValueHeight = locationValue.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
+			int editButtonHeight = editButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y;
+			int verticalIndent = (editButtonHeight - locationValueHeight) / 2 ;
+			((GridData) locationTitle.getLayoutData()).verticalIndent = verticalIndent;
+			((GridData) locationValue.getLayoutData()).verticalIndent = verticalIndent;
+			editButton.addSelectionListener(new SelectionListener() {
+				public void widgetDefaultSelected(SelectionEvent e) {
+					editLinkLocation();
+				}
+
+				public void widgetSelected(SelectionEvent e) {
+					editLinkLocation();
+				}
+			});
 
-		if (isPathVariable(resource)) {
+			// displayed in all cases since the link can be changed to a path variable any time by the user in this dialog
 			Label resolvedLocationTitle = new Label(basicInfoComposite,
 					SWT.LEFT);
 			resolvedLocationTitle.setText(RESOLVED_LOCATION_TITLE);
@@ -180,7 +248,7 @@ public class ResourceInfoPage extends PropertyPage {
 			gd.verticalAlignment = SWT.TOP;
 			resolvedLocationTitle.setLayoutData(gd);
 
-			Text resolvedLocationValue = new Text(basicInfoComposite, SWT.WRAP
+			resolvedLocationValue = new Text(basicInfoComposite, SWT.WRAP
 					| SWT.READ_ONLY);
 			resolvedLocationValue.setText(IDEResourceInfoUtils
 					.getResolvedLocationText(resource));
@@ -191,6 +259,28 @@ public class ResourceInfoPage extends PropertyPage {
 			resolvedLocationValue.setLayoutData(gd);
 			resolvedLocationValue.setBackground(resolvedLocationValue
 					.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+		} else {
+			if (!resource.isVirtual()) {
+				// The group for location
+				Label locationTitle = new Label(basicInfoComposite, SWT.LEFT);
+				locationTitle.setText(LOCATION_TITLE);
+				gd = new GridData();
+				gd.verticalAlignment = SWT.TOP;
+				locationTitle.setLayoutData(gd);
+
+				Text locationValue = new Text(basicInfoComposite, SWT.WRAP
+						| SWT.READ_ONLY);
+				String locationStr = TextProcessor.process(IDEResourceInfoUtils
+						.getLocationText(resource));
+				locationValue.setText(locationStr);
+				gd = new GridData();
+				gd.widthHint = convertWidthInCharsToPixels(MAX_VALUE_WIDTH);
+				gd.grabExcessHorizontalSpace = true;
+				gd.horizontalAlignment = GridData.FILL;
+				locationValue.setLayoutData(gd);
+				locationValue.setBackground(locationValue.getDisplay()
+						.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+			}
 		}
 		if (resource.getType() == IResource.FILE) {
 			// The group for size
@@ -209,9 +299,72 @@ public class ResourceInfoPage extends PropertyPage {
 					SWT.COLOR_WIDGET_BACKGROUND));
 		}
 
+		Label timeStampLabel = new Label(basicInfoComposite, SWT.NONE);
+		timeStampLabel.setText(TIMESTAMP_TITLE);
+
+		// timeStamp value label
+		Text timeStampValue = new Text(basicInfoComposite, SWT.READ_ONLY);
+		timeStampValue.setText(IDEResourceInfoUtils
+				.getDateStringValue(resource));
+		timeStampValue.setBackground(timeStampValue.getDisplay()
+				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+		timeStampValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
+				| GridData.GRAB_HORIZONTAL));
+
 		return basicInfoComposite;
 	}
 
+	protected void editLinkLocation() {
+		IResource resource = (IResource) getElement().getAdapter(
+				IResource.class);
+		String locationFormat = resource.getPathVariableManager().convertFromUserEditableFormat(locationValue.getText(), true);
+		IPath location = Path.fromOSString(locationFormat);
+
+		PathVariableDialog dialog = new PathVariableDialog(getShell(),
+				PathVariableDialog.EDIT_LINK_LOCATION, resource.getType(),
+				resource.getPathVariableManager(), null);
+		dialog.setLinkLocation(location);
+		dialog.setResource(resource);
+		// opens the dialog - just returns if the user cancels it
+		if (dialog.open() == Window.CANCEL) {
+			return;
+		}
+		location = Path.fromOSString(dialog.getVariableValue());
+		newResourceLocation = location;
+		refreshLinkLocation();
+	}
+
+	private void refreshLinkLocation() {
+		IResource resource = (IResource) getElement().getAdapter(
+				IResource.class);
+
+		String userEditableFormat = resource.getPathVariableManager().convertToUserEditableFormat(newResourceLocation.toOSString(), true);
+		locationValue.setText(userEditableFormat);
+
+		URI resolvedURI = resource.getPathVariableManager()
+				.resolveURI(URIUtil.toURI(newResourceLocation));
+		IPath resolved = URIUtil.toPath(resolvedURI);
+		if (!IDEResourceInfoUtils.exists(resolved.toOSString())) {
+			resolvedLocationValue
+					.setText(IDEWorkbenchMessages.ResourceInfo_undefinedPathVariable);
+			if (sizeValue != null)
+				sizeValue.setText(IDEWorkbenchMessages.ResourceInfo_notExist);
+		} else {
+			resolvedLocationValue.setText(resolved.toPortableString());
+			if (sizeValue != null) {
+				IFileInfo info = IDEResourceInfoUtils.getFileInfo(resolved
+						.toPortableString());
+				if (info != null)
+					sizeValue.setText(NLS.bind(
+							IDEWorkbenchMessages.ResourceInfo_bytes, Long
+									.toString(info.getLength())));
+				else
+					sizeValue
+							.setText(IDEWorkbenchMessages.ResourceInfo_unknown);
+			}
+		}
+	}
+
 	protected Control createContents(Composite parent) {
 
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
@@ -250,9 +403,19 @@ public class ResourceInfoPage extends PropertyPage {
 		composite.setLayoutData(data);
 
 		createBasicInfoGroup(composite, resource);
-		createSeparator(composite);
-		createStateGroup(composite, resource);
-		new Label(composite, SWT.NONE); // a vertical spacer
+		// Attributes are not relevant to projects
+		if (resource.getType() != IResource.PROJECT) {
+			createSeparator(composite);
+			int fsAttributes = getFileSystemAttributes(resource);
+			if (isPermissionsSupport(fsAttributes))
+				previousPermissionsValue = fetchPermissions(resource);
+			createStateGroup(composite, resource, fsAttributes);
+			if (isPermissionsSupport(fsAttributes)) {
+				createSeparator(composite);
+				createPermissionsGroup(composite);
+				setPermissionsSelection(previousPermissionsValue);
+			}
+		}
 		encodingEditor = new ResourceEncodingFieldEditor(
 				getFieldEditorLabel(resource), composite, resource);
 		encodingEditor.setPage(this);
@@ -290,6 +453,108 @@ public class ResourceInfoPage extends PropertyPage {
 		return composite;
 	}
 
+	private int fetchPermissions(IResource resource) {
+		IFileStore store = null;
+		try {
+			store = EFS.getStore(resource.getLocationURI());
+		} catch (CoreException e) {
+			return 0;
+		}
+		IFileInfo info = store.fetchInfo();
+		int permissions = 0;
+		if (info.exists()) {
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OWNER_READ) ? EFS.ATTRIBUTE_OWNER_READ
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OWNER_WRITE) ? EFS.ATTRIBUTE_OWNER_WRITE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE) ? EFS.ATTRIBUTE_OWNER_EXECUTE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_GROUP_READ) ? EFS.ATTRIBUTE_GROUP_READ
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE) ? EFS.ATTRIBUTE_GROUP_WRITE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE) ? EFS.ATTRIBUTE_GROUP_EXECUTE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OTHER_READ) ? EFS.ATTRIBUTE_OTHER_READ
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE) ? EFS.ATTRIBUTE_OTHER_WRITE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE) ? EFS.ATTRIBUTE_OTHER_EXECUTE
+					: 0;
+			permissions |= info.getAttribute(EFS.ATTRIBUTE_IMMUTABLE) ? EFS.ATTRIBUTE_IMMUTABLE
+					: 0;
+		}
+		return permissions;
+	}
+
+	private int getDefaulPermissions(boolean folder) {
+		int permissions = EFS.ATTRIBUTE_OWNER_READ | EFS.ATTRIBUTE_OWNER_WRITE
+				| EFS.ATTRIBUTE_GROUP_READ | EFS.ATTRIBUTE_GROUP_WRITE
+				| EFS.ATTRIBUTE_OTHER_READ;
+		if (folder)
+			permissions |= EFS.ATTRIBUTE_OWNER_EXECUTE
+					| EFS.ATTRIBUTE_GROUP_EXECUTE | EFS.ATTRIBUTE_OTHER_EXECUTE;
+		return permissions;
+	}
+
+	private void setPermissionsSelection(int permissions) {
+		permissionBoxes[0].setSelection((permissions & EFS.ATTRIBUTE_OWNER_READ) != 0);
+		permissionBoxes[1].setSelection((permissions & EFS.ATTRIBUTE_OWNER_WRITE) != 0);
+		permissionBoxes[2].setSelection((permissions & EFS.ATTRIBUTE_OWNER_EXECUTE) != 0);
+		permissionBoxes[3].setSelection((permissions & EFS.ATTRIBUTE_GROUP_READ) != 0);
+		permissionBoxes[4].setSelection((permissions & EFS.ATTRIBUTE_GROUP_WRITE) != 0);
+		permissionBoxes[5].setSelection((permissions & EFS.ATTRIBUTE_GROUP_EXECUTE) != 0);
+		permissionBoxes[6].setSelection((permissions & EFS.ATTRIBUTE_OTHER_READ) != 0);
+		permissionBoxes[7].setSelection((permissions & EFS.ATTRIBUTE_OTHER_WRITE) != 0);
+		permissionBoxes[8].setSelection((permissions & EFS.ATTRIBUTE_OTHER_EXECUTE) != 0);
+		if (immutableBox != null)
+			immutableBox.setSelection((permissions & EFS.ATTRIBUTE_IMMUTABLE) != 0);
+	}
+
+	private int getPermissionsSelection() {
+		int permissions = 0;
+		permissions |= permissionBoxes[0].getSelection() ? EFS.ATTRIBUTE_OWNER_READ : 0;
+		permissions |= permissionBoxes[1].getSelection() ? EFS.ATTRIBUTE_OWNER_WRITE : 0;
+		permissions |= permissionBoxes[2].getSelection() ? EFS.ATTRIBUTE_OWNER_EXECUTE : 0;
+		permissions |= permissionBoxes[3].getSelection() ? EFS.ATTRIBUTE_GROUP_READ : 0;
+		permissions |= permissionBoxes[4].getSelection() ? EFS.ATTRIBUTE_GROUP_WRITE : 0;
+		permissions |= permissionBoxes[5].getSelection() ? EFS.ATTRIBUTE_GROUP_EXECUTE : 0;
+		permissions |= permissionBoxes[6].getSelection() ? EFS.ATTRIBUTE_OTHER_READ : 0;
+		permissions |= permissionBoxes[7].getSelection() ? EFS.ATTRIBUTE_OTHER_WRITE : 0;
+		permissions |= permissionBoxes[8].getSelection() ? EFS.ATTRIBUTE_OTHER_EXECUTE : 0;
+		if (immutableBox != null)
+			permissions |= immutableBox.getSelection() ? EFS.ATTRIBUTE_IMMUTABLE : 0;
+		return permissions;
+	}
+
+	private boolean putPermissions(IResource resource, int permissions) {
+		IFileStore store = null;
+		try {
+			store = EFS.getStore(resource.getLocationURI());
+		} catch (CoreException e) {
+			return false;
+		}
+		IFileInfo fileInfo = store.fetchInfo();
+		if (!fileInfo.exists())
+			return false;
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OWNER_READ, (permissions & EFS.ATTRIBUTE_OWNER_READ) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OWNER_WRITE, (permissions & EFS.ATTRIBUTE_OWNER_WRITE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OWNER_EXECUTE, (permissions & EFS.ATTRIBUTE_OWNER_EXECUTE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_READ, (permissions & EFS.ATTRIBUTE_GROUP_READ) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_WRITE, (permissions & EFS.ATTRIBUTE_GROUP_WRITE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE, (permissions & EFS.ATTRIBUTE_GROUP_EXECUTE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_READ, (permissions & EFS.ATTRIBUTE_OTHER_READ) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_WRITE, (permissions & EFS.ATTRIBUTE_OTHER_WRITE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE, (permissions & EFS.ATTRIBUTE_OTHER_EXECUTE) != 0);
+		fileInfo.setAttribute(EFS.ATTRIBUTE_IMMUTABLE, (permissions & EFS.ATTRIBUTE_IMMUTABLE) != 0);
+		try {
+			store.putInfo(fileInfo, EFS.SET_ATTRIBUTES, null);
+		} catch (CoreException e) {
+			return false;
+		}
+		return true;
+	}
+
 	/**
 	 * Return the label for the encoding field editor for the resource.
 	 * 
@@ -318,9 +583,6 @@ public class ResourceInfoPage extends PropertyPage {
 		this.editableBox.setAlignment(SWT.LEFT);
 		this.editableBox.setText(READ_ONLY);
 		this.editableBox.setSelection(this.previousReadOnlyValue);
-		GridData data = new GridData();
-		data.horizontalSpan = 2;
-		this.editableBox.setLayoutData(data);
 	}
 
 	/**
@@ -337,9 +599,21 @@ public class ResourceInfoPage extends PropertyPage {
 		this.executableBox.setAlignment(SWT.LEFT);
 		this.executableBox.setText(EXECUTABLE);
 		this.executableBox.setSelection(this.previousExecutableValue);
-		GridData data = new GridData();
-		data.horizontalSpan = 2;
-		this.executableBox.setLayoutData(data);
+	}
+
+	/**
+	 * Create the isLocked button and it's associated label as a child of
+	 * parent using the editableValue of the receiver. The Composite will be the
+	 * parent of the button.
+	 * 
+	 * @param composite
+	 *            the parent of the button
+	 */
+	private void createImmutableButton(Composite composite) {
+		this.immutableBox = new Button(composite, SWT.CHECK | SWT.RIGHT);
+		this.immutableBox.setAlignment(SWT.LEFT);
+		this.immutableBox.setText(LOCKED);
+		this.immutableBox.setSelection((this.previousPermissionsValue & EFS.ATTRIBUTE_IMMUTABLE) != 0);
 	}
 
 	/**
@@ -356,9 +630,6 @@ public class ResourceInfoPage extends PropertyPage {
 		this.archiveBox.setAlignment(SWT.LEFT);
 		this.archiveBox.setText(ARCHIVE);
 		this.archiveBox.setSelection(this.previousArchiveValue);
-		GridData data = new GridData();
-		data.horizontalSpan = 2;
-		this.archiveBox.setLayoutData(data);
 	}
 
 	/**
@@ -375,9 +646,6 @@ public class ResourceInfoPage extends PropertyPage {
 		this.derivedBox.setAlignment(SWT.LEFT);
 		this.derivedBox.setText(DERIVED);
 		this.derivedBox.setSelection(this.previousDerivedValue);
-		GridData data = new GridData();
-		data.horizontalSpan = 2;
-		this.derivedBox.setLayoutData(data);
 	}
 
 	/**
@@ -403,64 +671,148 @@ public class ResourceInfoPage extends PropertyPage {
 	 * @param resource
 	 *            the resource the information is being taken from.
 	 */
-	private void createStateGroup(Composite parent, IResource resource) {
+	private void createStateGroup(Composite parent, IResource resource, int fsAttributes) {
+		Font font = parent.getFont();
+
+		Composite composite = new Composite(parent, SWT.NULL);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		composite.setLayout(layout);
+		GridData data = new GridData();
+		data.horizontalAlignment = GridData.FILL;
+		composite.setLayoutData(data);
+
+		Label attributesLabel = new Label(composite, SWT.LEFT);
+		attributesLabel.setText(IDEWorkbenchMessages.ResourceInfo_attributes);
+
+		if (!resource.isVirtual()) {
+			if ((fsAttributes & EFS.ATTRIBUTE_READ_ONLY) != 0
+					&& !isPermissionsSupport(fsAttributes))
+				createEditableButton(composite);
+			if ((fsAttributes & EFS.ATTRIBUTE_EXECUTABLE) != 0
+					&& !isPermissionsSupport(fsAttributes))
+				createExecutableButton(composite);
+			if ((fsAttributes & EFS.ATTRIBUTE_ARCHIVE) != 0)
+				createArchiveButton(composite);
+			if ((fsAttributes & EFS.ATTRIBUTE_IMMUTABLE) != 0)
+				createImmutableButton(composite);
+		}
+		createDerivedButton(composite);
+		// create warning for executable flag
+		if (executableBox != null && resource.getType() == IResource.FOLDER)
+			createExecutableWarning(composite, font);
+	}
 
+	private void createPermissionsGroup(Composite parent) {
 		Font font = parent.getFont();
 
+		permissionBoxes = new Button[9];
 		Composite composite = new Composite(parent, SWT.NULL);
 		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
+		layout.numColumns = 1;
 		layout.marginWidth = 0;
 		layout.marginHeight = 0;
 		composite.setLayout(layout);
 		GridData data = new GridData();
 		data.horizontalAlignment = GridData.FILL;
+		data.grabExcessHorizontalSpace = true;
 		composite.setLayoutData(data);
 
-		Label timeStampLabel = new Label(composite, SWT.NONE);
-		timeStampLabel.setText(TIMESTAMP_TITLE);
+		Label permissionsLabel = new Label(composite, SWT.NONE);
+		permissionsLabel.setText(IDEWorkbenchMessages.ResourceInfo_permissions);
 
-		// timeStamp value label
-		Text timeStampValue = new Text(composite, SWT.READ_ONLY);
-		timeStampValue.setText(IDEResourceInfoUtils
-				.getDateStringValue(resource));
-		timeStampValue.setBackground(timeStampValue.getDisplay()
-				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
-		timeStampValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL
-				| GridData.GRAB_HORIZONTAL));
+		Table table = new Table(composite, SWT.BORDER);
+		table.setHeaderVisible(true);
+		table.setLinesVisible(true);
+		for (int i = 0; i < 4; i++) {
+			new TableColumn(table, SWT.NONE).setResizable(false);
+		}
+		table.getColumn(1).setText(IDEWorkbenchMessages.ResourceInfo_read);
+		table.getColumn(2).setText(IDEWorkbenchMessages.ResourceInfo_write);
+		table.getColumn(3).setText(IDEWorkbenchMessages.ResourceInfo_execute);
+
+		table.getColumn(3).pack();
+		int columnWidth = table.getColumn(3).getWidth();
+		table.getColumn(0).setWidth(columnWidth);
+		table.getColumn(1).setWidth(columnWidth);
+		table.getColumn(2).setWidth(columnWidth);
+
+		TableItem ownerItem = new TableItem(table, SWT.NONE);
+		ownerItem.setText(IDEWorkbenchMessages.ResourceInfo_owner);
+		permissionBoxes[0] = createPermissionEditor(table, ownerItem, 1);
+		permissionBoxes[1] = createPermissionEditor(table, ownerItem, 2);
+		permissionBoxes[2] = createPermissionEditor(table, ownerItem, 3);
+
+		TableItem groupItem = new TableItem(table, SWT.NONE);
+		groupItem.setText(IDEWorkbenchMessages.ResourceInfo_group);
+		permissionBoxes[3] = createPermissionEditor(table, groupItem, 1);
+		permissionBoxes[4] = createPermissionEditor(table, groupItem, 2);
+		permissionBoxes[5] = createPermissionEditor(table, groupItem, 3);
+
+		TableItem otherItem = new TableItem(table, SWT.NONE);
+		otherItem.setText(IDEWorkbenchMessages.ResourceInfo_other);
+		permissionBoxes[6] = createPermissionEditor(table, otherItem, 1);
+		permissionBoxes[7] = createPermissionEditor(table, otherItem, 2);
+		permissionBoxes[8] = createPermissionEditor(table, otherItem, 3);
+
+		GridData tableData = new GridData();
+		tableData.heightHint = table.getHeaderHeight() + 3 * table.getItemHeight();
+		table.setLayoutData(tableData);
+		if (Platform.WS_GTK.equals(Platform.getWS()))
+			// Removes gray padding around buttons embedded in the table on
+			// GTK, see bug 312240
+			table.setBackgroundMode(SWT.INHERIT_FORCE);
+		createExecutableWarning(composite, font);
+	}
 
-		// Not relevant to projects
-		if (resource.getType() != IResource.PROJECT) {
-			URI location = resource.getLocationURI();
-			if (location != null && location.getScheme() != null) {
-				try {
-					IFileSystem fs = EFS.getFileSystem(location.getScheme());
-					int attributes = fs.attributes();
-					if ((attributes & EFS.ATTRIBUTE_READ_ONLY) != 0) {
-						createEditableButton(composite);
-					}
-					if ((attributes & EFS.ATTRIBUTE_EXECUTABLE) != 0) {
-						createExecutableButton(composite);
-					}
-					if ((attributes & EFS.ATTRIBUTE_ARCHIVE) != 0) {
-						createArchiveButton(composite);
-					}
-				} catch (CoreException e) {
-					// ignore if we can't access the file system for this
-					// resource
-				}
-			}
-			createDerivedButton(composite);
-			// create warning for executable flag
-			if (executableBox != null && resource.getType() == IResource.FOLDER) {
-				Composite noteComposite = createNoteComposite(font, composite,
-						IDEWorkbenchMessages.Preference_note,
-						IDEWorkbenchMessages.ResourceInfo_exWarning);
-				GridData noteData = new GridData();
-				noteData.horizontalSpan = 2;
-				noteComposite.setLayoutData(noteData);
-			}
+	private Button createPermissionEditor(Table table, TableItem item, int index) {
+		Button button = new Button(table, SWT.CHECK);
+		button.pack();
+		TableEditor editor = new TableEditor(table);
+		editor.grabVertical = true;
+		editor.verticalAlignment = SWT.CENTER;
+		editor.minimumWidth = button.getSize().x;
+		editor.setEditor(button, item, index);
+		editor.getEditor();
+		return button;
+	}
+
+	private Composite createExecutableWarning(Composite composite, Font font) {
+		Composite noteComposite = createNoteComposite(font, composite,
+				IDEWorkbenchMessages.Preference_note,
+				IDEWorkbenchMessages.ResourceInfo_exWarning);
+		GridData data = new GridData();
+		data.widthHint = convertWidthInCharsToPixels(IDEWorkbenchMessages.ResourceInfo_exWarning.length());
+		data.grabExcessHorizontalSpace = true;
+		data.horizontalAlignment = GridData.FILL;
+		noteComposite.setLayoutData(data);
+		return noteComposite;
+	}
+
+	private int getFileSystemAttributes(IResource resource) {
+		URI location = resource.getLocationURI();
+		if (location == null || location.getScheme() == null)
+			return 0;
+		IFileSystem fs;
+		try {
+			fs = EFS.getFileSystem(location.getScheme());
+		} catch (CoreException e) {
+			return 0;
 		}
+		return fs.attributes();
+	}
+
+	private boolean isPermissionsSupport(int fsAttributes) {
+		int unixPermissions = EFS.ATTRIBUTE_OWNER_READ
+				| EFS.ATTRIBUTE_OWNER_WRITE | EFS.ATTRIBUTE_OWNER_EXECUTE
+				| EFS.ATTRIBUTE_GROUP_READ | EFS.ATTRIBUTE_GROUP_WRITE
+				| EFS.ATTRIBUTE_GROUP_EXECUTE | EFS.ATTRIBUTE_OTHER_READ
+				| EFS.ATTRIBUTE_OTHER_WRITE | EFS.ATTRIBUTE_OTHER_EXECUTE;
+		if ((fsAttributes & unixPermissions) == unixPermissions)
+			return true;
+		return false;
 	}
 
 	private IContentDescription getContentDescription(IResource resource) {
@@ -490,24 +842,18 @@ public class ResourceInfoPage extends PropertyPage {
 	 *         resource is either not a linked resource or it is not using a
 	 *         path variable.
 	 */
-	private boolean isPathVariable(IResource resource) {
-		if (!resource.isLinked()) {
-			return false;
-		}
-
-		IPath resolvedLocation = resource.getLocation();
-		if (resolvedLocation == null) {
-			// missing path variable
-			return true;
-		}
-		IPath rawLocation = resource.getRawLocation();
-		if (resolvedLocation.equals(rawLocation)) {
-			return false;
-		}
-
-		return true;
-	}
-
+	/*
+	 * Now shows the same widgets for all linked files. private boolean
+	 * isPathVariable(IResource resource) { if (!resource.isLinked()) { return
+	 * false; }
+	 * 
+	 * IPath resolvedLocation = resource.getLocation(); if (resolvedLocation ==
+	 * null) { // missing path variable return true; } IPath rawLocation =
+	 * resource.getRawLocation(); if (resolvedLocation.equals(rawLocation)) {
+	 * return false; }
+	 * 
+	 * return true; }
+	 */
 	/**
 	 * Reset the editableBox to the false.
 	 */
@@ -519,6 +865,20 @@ public class ResourceInfoPage extends PropertyPage {
 		if (resource == null)
 			return;
 
+		if (newResourceLocation != null) {
+			newResourceLocation = null;
+
+			resolvedLocationValue.setText(IDEResourceInfoUtils
+					.getResolvedLocationText(resource));
+
+			String locationStr = TextProcessor.process(IDEResourceInfoUtils
+					.getLocationText(resource));
+			locationValue.setText(locationStr);
+
+			if (sizeValue != null)
+				sizeValue.setText(IDEResourceInfoUtils.getSizeString(resource));
+		}
+
 		// Nothing to update if we never made the box
 		if (this.editableBox != null) {
 			this.editableBox.setSelection(false);
@@ -530,10 +890,20 @@ public class ResourceInfoPage extends PropertyPage {
 		}
 
 		// Nothing to update if we never made the box
+		if (this.immutableBox != null) {
+			this.immutableBox.setSelection(false);
+		}
+
+		// Nothing to update if we never made the box
 		if (this.derivedBox != null) {
 			this.derivedBox.setSelection(false);
 		}
 
+		if (permissionBoxes != null) {
+			int defaultPermissionValues = getDefaulPermissions(resource.getType() == IResource.FOLDER);
+			setPermissionsSelection(defaultPermissionValues);
+		}
+
 		encodingEditor.loadDefault();
 
 		if (lineDelimiterEditor != null) {
@@ -560,6 +930,15 @@ public class ResourceInfoPage extends PropertyPage {
 		}
 
 		try {
+			if (newResourceLocation != null) {
+				if (resource.getType() == IResource.FILE)
+					((IFile)resource).createLink(newResourceLocation, IResource.REPLACE,
+							new NullProgressMonitor());
+				if (resource.getType() == IResource.FOLDER)
+					((IFolder)resource).createLink(newResourceLocation, IResource.REPLACE,
+							new NullProgressMonitor());
+			}
+
 			ResourceAttributes attrs = resource.getResourceAttributes();
 			if (attrs != null) {
 				boolean hasChange = false;
@@ -599,11 +978,23 @@ public class ResourceInfoPage extends PropertyPage {
 				}
 			}
 
+			if (permissionBoxes != null) {
+				int permissionValues = getPermissionsSelection();
+				if (previousPermissionsValue != permissionValues) {
+					putPermissions(resource, permissionValues);
+					previousPermissionsValue = fetchPermissions(resource);
+					if (previousPermissionsValue != permissionValues) {
+						// We failed to set some of the permissions
+						setPermissionsSelection(previousPermissionsValue);
+					}
+				}
+			}
+
 			// Nothing to update if we never made the box
 			if (this.derivedBox != null) {
 				boolean localDerivedValue = derivedBox.getSelection();
 				if (previousDerivedValue != localDerivedValue) {
-					resource.setDerived(localDerivedValue);
+					resource.setDerived(localDerivedValue, null);
 					boolean isDerived = resource.isDerived();
 					previousDerivedValue = isDerived;
 					derivedBox.setSelection(isDerived);
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
index 1af2026..85fec84 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceTreeAndListGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,7 +62,7 @@ public class ResourceTreeAndListGroup extends EventManager implements
 
     private Map checkedStateStore = new HashMap(9);
 
-    private Collection whiteCheckedTreeItems = new HashSet();
+    private HashSet whiteCheckedTreeItems = new HashSet();
 
     private ITreeContentProvider treeContentProvider;
 
@@ -389,7 +389,7 @@ public class ResourceTreeAndListGroup extends EventManager implements
     /**
      * Add all of the selected children of nextEntry to result recursively.
      * This does not set any values in the checked state.
-     * @param The treeElement being queried
+     * @param treeElement The tree elements being queried
      * @param addAll a boolean to indicate if the checked state store needs to be queried
      * @param filter IElementFilter - the filter being used on the data
      * @param monitor IProgressMonitor or null that the cancel is polled for 
@@ -484,7 +484,52 @@ public class ResourceTreeAndListGroup extends EventManager implements
         }
     }
 
-    /**
+    /** Returns whether all items in the list are checked.
+     * This method is required, because this widget will keep items grey
+     * checked even though all children are selected (see grayUpdateHierarchy()).
+     * @return true if all items in the list are checked - false if not
+     */
+    public boolean isEveryItemChecked() {
+        //Iterate through the children of the root as the root is not in the store
+    	Object[] children = treeContentProvider.getChildren(root);
+        for (int i = 0; i < children.length; ++i) {
+        	if (!whiteCheckedTreeItems.contains(children[i])) {
+                if (!treeViewer.getGrayed(children[i]))
+                	return false;
+        		if (!isEveryChildrenChecked(children[i]))
+        			return false;
+        	}
+        }
+        return true;
+    }
+
+	/**Verifies of all list items of the tree element are checked, and 
+	 * if all children are white checked.  If not, verify their children
+	 * so that if an element is not white checked, but all its children
+	 * are while checked, then, all items are considered checked.
+	 * @param treeElement the treeElement which status to verify
+	 * @return true if all items are checked, false otherwise.
+	 */
+	private boolean isEveryChildrenChecked(Object treeElement) {
+        List checked = (List) checkedStateStore.get(treeElement);
+        if (checked != null && (!checked.isEmpty())) {
+            Object[] listItems = listContentProvider.getElements(treeElement);
+        	if (listItems.length != checked.size())
+        		return false;
+		}
+    	Object[] children = treeContentProvider.getChildren(treeElement);
+        for (int i = 0; i < children.length; ++i) {
+        	if (!whiteCheckedTreeItems.contains(children[i])) {
+                if (!treeViewer.getGrayed(children[i]))
+                	return false;
+        		if (!isEveryChildrenChecked(children[i]))
+        			return false;
+        	}
+        }
+		return true;
+	}
+
+	/**
      *	Returns a flat list of all of the leaf elements which are checked.
      *
      *	@return all of the leaf elements which are checked. This API does not
@@ -519,6 +564,43 @@ public class ResourceTreeAndListGroup extends EventManager implements
     }
 
     /**
+     *	Returns a flat list of all of the leaf elements.
+     *
+     *	@return all of the leaf elements.
+     */
+    public List getAllListItems() {
+
+        final ArrayList returnValue = new ArrayList();
+
+        IElementFilter passThroughFilter = new IElementFilter() {
+
+            public void filterElements(Collection elements,
+                    IProgressMonitor monitor) {
+                returnValue.addAll(elements);
+            }
+
+            public void filterElements(Object[] elements,
+                    IProgressMonitor monitor) {
+                for (int i = 0; i < elements.length; i++) {
+                    returnValue.add(elements[i]);
+                }
+            }
+        };
+
+        try {
+            Object[] children = treeContentProvider.getChildren(root);
+            for (int i = 0; i < children.length; ++i) {
+                findAllSelectedListElements(children[i], null, true, passThroughFilter,
+                        null);
+            }
+        } catch (InterruptedException exception) {
+            return new ArrayList();
+        }
+        return returnValue;
+
+    }
+
+    /**
      *	Returns a list of all of the items that are white checked.
      * 	Any folders that are white checked are added and then any files
      *  from white checked folders are added. 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java
index a89dfdd..f2fa93a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceWorkingSetPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemStructureProvider.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemStructureProvider.java
index f30fe66..fb8f112 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemStructureProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/FileSystemStructureProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,10 +16,11 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.ui.internal.ide.filesystem.PrefixPool;
 import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
 
 /**
@@ -30,15 +31,7 @@ import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
  */
 public class FileSystemStructureProvider implements IImportStructureProvider {
 
-    private PrefixPool pathPrefixHistory;
-    private PrefixPool rootPathHistory; 
-
-    /**
-     * Creates an instance of <code>FileSystemStructureProvider</code>.
-     */
-    public FileSystemStructureProvider() {
-        super();
-    }
+	private Set visitedDirs;
 
     /* (non-Javadoc)
      * Method declared on IImportStructureProvider
@@ -51,7 +44,7 @@ public class FileSystemStructureProvider implements IImportStructureProvider {
 
         for (int i = 0; i < childrenLength; i++) {
         	File file = new File(folder, children[i]);
-        	if(file.isDirectory() && isRecursiveLink(folder, file))
+        	if(isRecursiveLink(file))
         		continue;
         	result.add(file);
 		}
@@ -59,49 +52,24 @@ public class FileSystemStructureProvider implements IImportStructureProvider {
         return result;
     }
 
-    private void initLinkHistoriesIfNeeded(){
-    	if(pathPrefixHistory == null){
-    		pathPrefixHistory = new PrefixPool(20);
-    		rootPathHistory = new PrefixPool(20);
+    private void initVisitedDirs(){
+    	if(visitedDirs == null){
+    		visitedDirs = new HashSet();
     	}
     }
     
-	private boolean isRecursiveLink(File parentFile, File childFile) {
-
-		boolean isRecursive = false;
-		try {
+	private boolean isRecursiveLink(File childFile) {
 
-			//Need canonical paths to check all other possibilities
-			String parentPath = parentFile.getCanonicalPath() + '/';
-			String childPath = childFile.getCanonicalPath() + '/';
-			
-			//get or instantiate the prefix and root path histories.
-			//Might be done earlier - for now, do it on demand.
-			
-			initLinkHistoriesIfNeeded();
-			
-			//insert the parent for checking loops
-			pathPrefixHistory.insertLonger(parentPath);
-			if (pathPrefixHistory.containsAsPrefix(childPath)) {
-				//found a potential loop: is it spanning up a new tree?
-				if (!rootPathHistory.insertShorter(childPath)) {
-					//not spanning up a new tree, so it is a real loop.
-					isRecursive = true;
-				}
-			} else if (rootPathHistory.hasPrefixOf(childPath)) {
-				//child points into a different portion of the tree that we visited already before, or will certainly visit.
-				//This does not introduce a loop yet, but introduces duplicate resources.
-				//TODO Ideally, such duplicates should be modelled as linked resources. See bug 105534
-				isRecursive = false;
-			} else {
-				//child neither introduces a loop nor points to a known tree.
-				//It probably spans up a new tree of potential prefixes.
-				rootPathHistory.insertShorter(childPath);
+		if (childFile.isDirectory()) {
+			try {
+				String canonicalPath = childFile.getCanonicalPath();
+				initVisitedDirs();
+				return !visitedDirs.add(canonicalPath);
+			} catch (IOException e) {
+				IDEWorkbenchPlugin.log(e.getMessage(), e);
 			}
-		} catch (IOException e) {
-			//ignore
 		}
-		return isRecursive;
+		return false;
 	}
 
 	/* (non-Javadoc)
@@ -143,4 +111,12 @@ public class FileSystemStructureProvider implements IImportStructureProvider {
     public boolean isFolder(Object element) {
         return ((File) element).isDirectory();
     }
+    
+    /**
+     * Clears the visited dir information
+     */
+    public void clearVisitedDirs() {
+    	if(visitedDirs!=null)
+    		visitedDirs.clear();
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/PrefixPool.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/PrefixPool.java
deleted file mode 100644
index c4804cd..0000000
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/filesystem/PrefixPool.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution, and is available at 
- * http://www.eclipse.org/legal/epl-v10.html 
- * 
- * Contributors: 
- * Martin Oberhuber (Wind River) - initial API and implementation for [105554] 
- *******************************************************************************/
-
-package org.eclipse.ui.internal.ide.filesystem;
-
-import java.util.Arrays;
-
-/**
- * A pool of Strings for doing prefix checks against multiple
- * candidates.
- * <p>
- * Allows to enter a list of Strings, and then perform the
- * following checks:
- * <ul>
- *   <li>{@link #containsAsPrefix(String)} - check whether a given
- *       String s is a prefix of any String in the pool.</li>
- *   <li>{@link #hasPrefixOf(String)} - check whether any String
- *       in the pool is a prefix of the given String s. 
- * </ul>
- * The prefix pool is always kept normalized, i.e. no element of
- * the pool is a prefix of any other element in the pool. In order
- * to maintain this constraint, there are two methods for adding
- * Strings to the pool:
- * <ul>
- *   <li>{@link #insertLonger(String)} - add a String s to the pool,
- *       and remove any existing prefix of s from the pool.</li>
- *   <li>{@link #insertShorter(String)} - add a String s to the pool,
- *       and remove any existing Strings sx from the pool which 
- *       contain s as prefix.</li>
- * </ul>
- * The PrefixPool grows as needed when adding Strings. Typically,
- * it is used for prefix checks on absolute paths of a tree.
- * </p><p> 
- * This class is not thread-safe: no two threads may add or
- * check items at the same time.
- * 
- * @since 3.5.1
- * 
- * Class copied from org.eclipse.core.internal.localstore.PrefixPool
- * 
- */
-public class PrefixPool {
-	private String[] pool;
-	private int size;
-
-	/**
-	 * Constructor.
-	 * @param initialCapacity the initial size of the 
-	 *     internal array holding the String pool. Must
-	 *     be greater than 0.
-	 */
-	public PrefixPool(int initialCapacity) {
-		if (initialCapacity <= 0)
-			throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity); //$NON-NLS-1$
-		pool = new String[initialCapacity];
-		size = 0;
-	}
-
-	/**
-	 * Clears the prefix pool, allowing all items to be
-	 * garbage collected. Does not change the capacity
-	 * of the pool.
-	 */
-	public/*synchronized*/void clear() {
-		Arrays.fill(pool, 0, size, null);
-		size = 0;
-	}
-
-	/**
-	 * Return the current size of prefix pool.
-	 * @return the number of elements in the pool. 
-	 */
-	public/*synchronized*/int size() {
-		return size;
-	}
-
-	/**
-	 * Ensure that there is room for at least one more element.
-	 */
-	private void checkCapacity() {
-		if (size + 1 >= pool.length) {
-			String[] newprefixList = new String[2 * pool.length];
-			System.arraycopy(pool, 0, newprefixList, 0, pool.length);
-			Arrays.fill(pool, null); //help the garbage collector
-			pool = newprefixList;
-		}
-	}
-
-	/**
-	 * Insert a String s into the pool of known prefixes, removing
-	 * any existing prefix of it.
-	 * <p>
-	 * If any existing prefix of this String is found in the pool,
-	 * it is replaced by the new longer one in order to maintain
-	 * the constraint of keeping the pool normalized.
-	 * </p><p>
-	 * If it turns out that s is actually a prefix or equal to
-	 * an existing element in the pool (so it is essentially
-	 * shorter), this method returns with no operation in order
-	 * to maintain the constraint that the pool remains normalized.
-	 * </p>
-	 * @param s the String to insert.
-	 */
-	public/*synchronized*/void insertLonger(String s) {
-		//check in reverse order since we expect some locality
-		for (int i = size - 1; i >= 0; i--) {
-			if (pool[i].startsWith(s)) {
-				//prefix of an existing String --> no-op
-				return;
-			} else if (s.startsWith(pool[i])) {
-				//replace, since a longer s has more prefixes than a short one
-				pool[i] = s;
-				return;
-			}
-		}
-		checkCapacity();
-		pool[size] = s;
-		size++;
-	}
-
-	/**
-	 * Insert a String s into the pool of known prefixes, removing
-	 * any Strings that have s as prefix.
-	 * <p>
-	 * If this String is a prefix of any existing String in the pool,
-	 * all elements that contain the new String as prefix are removed
-	 * and return value <code>true</code> is returned.
-	 * </p><p>
-	 * Otherwise, the new String is added to the pool unless an 
-	 * equal String or e prefix of it exists there already (so
-	 * it is essentially equal or longer than an existing prefix).
-	 * In all these cases, <code>false</code> is returned since
-	 * no prefixes were replaced.
-	 * </p>
-	 * @param s the String to insert.
-	 * @return <code>true</code>if any longer elements have been
-	 *     removed.
-	 */
-	public/*synchronized*/boolean insertShorter(String s) {
-		boolean replaced = false;
-		//check in reverse order since we expect some locality
-		for (int i = size - 1; i >= 0; i--) {
-			if (s.startsWith(pool[i])) {
-				//longer or equal to an existing prefix - nothing to do
-				return false;
-			} else if (pool[i].startsWith(s)) {
-				if (replaced) {
-					//replaced before, so shrink the array.
-					//Safe since we are iterating in reverse order.
-					System.arraycopy(pool, i + 1, pool, i, size - i - 1);
-					size--;
-					pool[size] = null;
-				} else {
-					//replace, since this is a shorter s
-					pool[i] = s;
-					replaced = true;
-				}
-			}
-		}
-		if (!replaced) {
-			//append at the end
-			checkCapacity();
-			pool[size] = s;
-			size++;
-		}
-		return replaced;
-	}
-
-	/**
-	 * Check if the given String s is a prefix of any of Strings
-	 * in the pool.
-	 * @param s a s to check for being a prefix
-	 * @return <code>true</code> if the passed s is a prefix
-	 *     of any of the Strings contained in the pool.
-	 */
-	public/*synchronized*/boolean containsAsPrefix(String s) {
-		//check in reverse order since we expect some locality
-		for (int i = size - 1; i >= 0; i--) {
-			if (pool[i].startsWith(s)) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Test if the String pool contains any one that is a prefix
-	 * of the given String s. 
-	 * @param s the String to test
-	 * @return <code>true</code> if the String pool contains a
-	 *     prefix of the given String.
-	 */
-	public/*synchronized*/boolean hasPrefixOf(String s) {
-		for (int i = size - 1; i >= 0; i--) {
-			if (s.startsWith(pool[i])) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/BuildAllProjectsHandler.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/BuildAllProjectsHandler.java
new file mode 100644
index 0000000..ce1056a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/handlers/BuildAllProjectsHandler.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.actions.GlobalBuildAction;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.ide.actions.BuildUtilities;
+
+/**
+ * Default handler for 'Build All' command.
+ * 
+ * @since 3.6
+ */
+public class BuildAllProjectsHandler extends AbstractHandler {
+	
+	/**
+	 * @throws ExecutionException  
+	 */
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+    	if (isEnabled()) {
+			IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
+			if (window != null) {
+				GlobalBuildAction globalBuildAction = new GlobalBuildAction(window, IncrementalProjectBuilder.INCREMENTAL_BUILD);
+				try {
+					globalBuildAction.run();
+				} finally {
+					globalBuildAction.dispose();
+				}
+			}
+    	}
+		return null;
+	}
+	
+	/*
+	 * @see org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
+	 */
+	public void setEnabled(Object evaluationContext) {
+    	IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		IProject[] projects = workspace.getRoot().getProjects();
+    	boolean enabled = BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD);
+		setBaseEnabled(enabled);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
index 7cdc945..5b64168 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,6 +12,10 @@
 # 		- Fix for Bug 186823 [Wizards] New Project Wizard has colliding mnemonics
 #	  Oakland Software Incorporated (Francis Upton) <francisu at ieee.org>
 #		- Bug 224997 [Workbench] Impossible to copy project
+#     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 269844
+#     Serge Beauchamp (Freescale Semiconductor) - [252996] Resource filters
+#     Serge Beauchamp (Freescale Semiconductor) - [229633] Group Support
+#     Markus Schorn (Wind River Systems) -  bug 284447
 ###############################################################################
 
 # package: org.eclipse.ui.ide
@@ -49,6 +53,10 @@ IDEIdleHelper_backgroundGC = Collecting garbage
 ############################################################
 showAdvanced = &Advanced >>
 hideAdvanced = << &Advanced
+editfilters = Resource &Filters...
+useDefaultLocation=Use &default location
+createLinkedFolder=Link to alternate location (&Linked Folder)
+createVirtualFolder=Folder is not located in the file system (Vi&rtual Folder)
 
 # ==============================================================================
 # Workbench Actions
@@ -263,6 +271,10 @@ CloseResourceAction_operationMessage = Closing project...
 
 CloseUnrelatedProjectsAction_text = Close &Unrelated Projects
 CloseUnrelatedProjectsAction_toolTip = Close Unrelated Projects
+CloseUnrelatedProjectsAction_AlwaysClose= &Always close without prompt
+CloseUnrelatedProjectsAction_AlwaysCloseWithoutPrompt= Always &close unrelated projects without prompt
+CloseUnrelatedProjectsAction_confirmMsg1 = Are you sure you want to close all projects that are not related to ''{0}''?
+CloseUnrelatedProjectsAction_confirmMsgN = Are you sure you want to close all projects that are not related to these {0} projects?
 
 BuildAction_text = &Build Project
 BuildAction_toolTip = Incremental Build of Selected Projects
@@ -329,6 +341,7 @@ CopyFilesAndFoldersOperation_missingLinkTarget = The link target for linked reso
 CopyFilesAndFoldersOperation_CopyResourcesTask=Copying Resources
 CopyFilesAndFoldersOperation_parentNotEqual = The resources must have the same parent.
 CopyFilesAndFoldersOperation_infoNotFound = Information for {0} could not be read. Please check the .log file for details.
+CopyFilesAndFoldersOperation_sourceCannotBeCopiedIntoAVirtualFolder = The resource ''{0}'' cannot be copied into a virtual folder.
 CopyFilesAndFoldersOperation_copyTitle= Copy Resources
 CopyFilesAndFoldersOperation_moveTitle= Move Resources
 
@@ -412,8 +425,11 @@ WizardNewFolderMainPage_description = Create a new folder resource.
 WizardNewFolderCreationPage_progress = Creating
 WizardNewFolderCreationPage_errorTitle = Creation Problems
 WizardNewFolderCreationPage_internalErrorTitle = Creation problems
+WizardNewFolderCreationPage_resourceWillBeFilteredWarning=This folder is hidden in the workspace due to resource filters.  To override existing resource filters, a linked folder can be created instead.
 WizardNewFolderCreationPage_title = New Folder
 WizardNewFolder_internalError = Internal error: {0}
+WizardNewFolderCreationPage_createLinkLocationTitle=Create new link folder
+WizardNewFolderCreationPage_createLinkLocationQuestion=The link target does not exist on the file system.  Do you want to create a new folder?
 
 # --- New File ---
 WizardNewFileCreationPage_progress = Creating
@@ -423,6 +439,9 @@ WizardNewFileCreationPage_file = file
 WizardNewFileCreationPage_internalErrorTitle = Creation problems
 WizardNewFileCreationPage_internalErrorMessage = Internal error: {0}
 WizardNewFileCreationPage_title = New File
+WizardNewFileCreationPage_resourceWillBeFilteredWarning=This file is hidden in the workspace due to resource filters.  To override existing resource filters, a linked file can be created instead.
+WizardNewFileCreationPage_createLinkLocationTitle=Create new link file
+WizardNewFileCreationPage_createLinkLocationQuestion=The link target does not exist on the file system.  Do you want to create an empty file?
 
 # --- Linked Resource ---
 WizardNewLinkPage_linkFileButton = &Link to file on the file system
@@ -463,40 +482,59 @@ IDEWorkspacePreference_defaultLineDelimProj=Inh&erited from container
 IDEWorkspacePreference_otherLineDelim= Ot&her:
 IDEWorkspacePreference_relatedLink = See <a>''{0}''</a> for workspace startup and shutdown preferences.
 IDEWorkspacePreference_openReferencedProjects = Open referenced projects when a project is opened
+IDEWorkspacePreference_closeUnrelatedProjectsToolTip = Close unrelated projects without prompt
+IDEWorkspacePreference_workspaceName=Wor&kspace name (shown in window title):
 
 # --- Linked Resources ---
 LinkedResourcesPreference_explanation = Path variables specify locations in the file system. The locations of linked resources\nmay be specified relative to these path variables.
 LinkedResourcesPreference_enableLinkedResources = &Enable linked resources
 LinkedResourcesPreference_linkedResourcesWarningTitle = Enabled Linked Resources
 LinkedResourcesPreference_linkedResourcesWarningMessage = You have enabled a feature which may give rise to incompatibilities if projects are shared by users of different versions of the workbench.  Please consult the documentation for further details.
+LinkedResourcesPreference_dragAndDropHandlingMessage = Drag and drop items on a folder or project
+LinkedResourcesPreference_dragAndDropVirtualFolderHandlingMessage = Drag and drop items on a virtual folder
+LinkedResourcesPreference_link=&Link
+linkedResourcesPreference_copy=&Copy
+LinkedResourcesPreference_linkAndVirtualFolder=Link and create &virtual folders
+LinkedResourcesPreference_promptVirtual=Pr&ompt
+LinkedResourcesPreference_linkVirtual=Lin&k
+linkedResourcesPreference_copyVirtual=Co&py
+LinkedResourcesPreference_linkAndVirtualFolderVirtual=Link and create v&irtual folders
 
 # The following six keys are marked as unused by the NLS search, but they are indirectly used
 # and should be removed.
 PathVariableDialog_shellTitle_newVariable = New Variable
 PathVariableDialog_shellTitle_existingVariable = Edit Variable
+PathVariableDialog_shellTitle_editLocation = Edit Link Location
 PathVariableDialog_dialogTitle_newVariable = Define a New Path Variable
 PathVariableDialog_dialogTitle_existingVariable = Edit an Existing Path Variable
+PathVariableDialog_dialogTitle_editLinkLocation = Edit a Link Location
 PathVariableDialog_message_newVariable = Enter a new variable name and its associated location.
 PathVariableDialog_message_existingVariable = Edit variable's name and path value.
+PathVariableDialog_message_editLocation = Edit link location.
 
 PathVariableDialog_variableName = &Name:
 PathVariableDialog_variableValue = &Location:
+PathVariableDialog_variableResolvedValue = Resolved Location:
 PathVariableDialog_variableNameEmptyMessage = You must provide a variable name.
 PathVariableDialog_variableValueEmptyMessage = You must provide a file or folder path as variable value.
 PathVariableDialog_variableValueInvalidMessage = The provided value is not a valid path.
 PathVariableDialog_file = &File...
 PathVariableDialog_folder = F&older...
+PathVariableDialog_variable = &Variable...
 PathVariableDialog_selectFileTitle = File selection
 PathVariableDialog_selectFolderTitle = Folder selection
 PathVariableDialog_selectFolderMessage = Specify the folder to be represented by the variable.
 PathVariableDialog_variableAlreadyExistsMessage = This variable name is already in use.
 PathVariableDialog_pathIsRelativeMessage = Path must be absolute.
 PathVariableDialog_pathDoesNotExistMessage = Path does not exist.
+PathVariableDialog_variableValueIsWrongTypeFolder = Path target is of wrong type.  The path must point to a folder.
+PathVariableDialog_variableValueIsWrongTypeFile = Path target is of wrong type.  The path must point to a file.
 
 # --- Local History ---
 FileHistory_longevity = Days to &keep files:
 FileHistory_entries = Maximum &entries per file:
 FileHistory_diskSpace = &Maximum file size (MB):
+FileHistory_applyPolicy = &Limit history size
 FileHistory_mustBePositive = Values must be positive
 FileHistory_invalid = Invalid value: {0}
 FileHistory_exceptionSaving = Internal error saving local history
@@ -529,22 +567,76 @@ StartupPreferencePage_exitPromptButton = &Confirm exit when closing last window
 # --- Info ---
 ResourceInfo_readOnly = &Read only
 ResourceInfo_executable = E&xecutable
+ResourceInfo_locked = L&ocked
 ResourceInfo_archive = Ar&chive
 ResourceInfo_derived = Deri&ved
 ResourceInfo_type = &Type:
 ResourceInfo_location = &Location:
-ResourceInfo_resolvedLocation = Resolved location:
+ResourceInfo_resolvedLocation = Resolved locatio&n:
 ResourceInfo_size = &Size:
 ResourceInfo_bytes = {0}  bytes
 ResourceInfo_file = File
 ResourceInfo_fileTypeFormat = File  ({0})
 ResourceInfoPage_noResource=Resource information is not available for the current selection.
+ResourceFilterPage_title=A file system object will be added to the workspace tree during the refresh operation\nif it matches any of the include filters and doesn't match any of the exclude filters. 
+ResourceFilterPage_noResource=Resource information is not available for the current selection.
+ResourceFilterPage_addButtonLabel=&Add...
+ResourceFilterPage_addGroupButtonLabel=Add &Group...
+ResourceFilterPage_editButtonLabel=&Edit...
+ResourceFilterPage_removeButtonLabel=&Remove
+ResourceFilterPage_columnFilterMode=Filter type
+ResourceFilterPage_columnFilterDescription=Description
+ResourceFilterPage_columnFilterTarget=Applies to
+ResourceFilterPage_columnFilterPattern=&Pattern
+ResourceFilterPage_applyRecursivelyToFolderStructure=All children (recursi&ve)
+ResourceFilterPage_recursive=(recursive)
+ResourceFilterPage_details=Filter Details
+ResourceFilterPage_caseSensitive=&Case sensitive
+ResourceFilterPage_regularExpression=Re&gular expression
+ResourceFilterPage_multiMatcher_Matcher=(* = any string, ? = any character, \\ = escape for literals: * ? \\)
+ResourceFilterPage_multiMatcher_FileLength=(* = bytes, *k = kilobytes, *m = megabytes, *g = gigabytes)
+ResourceFilterPage_multiMatcher_TimeInterval= (*s = seconds, *m = minutes, *h = hours, *d = days)
+ResourceFilterPage_multiMatcher_InvalidFileLength=Invalid file length syntax: {0}
+ResourceFilterPage_multiMatcher_InvalidTimeInterval=Invalid time interval syntax: {0}
+ResourceFilterPage_includeOnly=&Include only
+ResourceFilterPage_excludeAll=&Exclude all
+ResourceFilterPage_includeOnlyColumn=Include only:
+ResourceFilterPage_excludeAllColumn=Exclude all:
+ResourceFilterPage_filesAndFolders=Files &and folders
+ResourceFilterPage_files=&Files
+ResourceFilterPage_folders=F&olders
+ResourceFilterPage_editFilterDialogTitle=Edit Resource Filter
+ResourceFilterPage_newFilterDialogTitleProject=Add Resource Filter for project {0}
+ResourceFilterPage_newFilterDialogTitleFolder=Add Resource Filter for folder {0}
+ResourceFilterPage_addSubFilterActionLabel=&Add...
+ResourceFilterPage_addSubFilterGroupActionLabel=Add &Group...
+ResourceFilterPage_removeFilterActionLabel=&Remove
+ResourceFilterPage_editFilterActionLabel=&Edit
+ResourceFilterPage_multiKeyName=Name
+ResourceFilterPage_multiKeyProjectRelativePath=Project Relative Path
+ResourceFilterPage_multiKeyLocation=Location
+ResourceFilterPage_multiKeyLastModified=Last Modified
+ResourceFilterPage_multiKeyCreated=Date Created
+ResourceFilterPage_multiKeyLength=File Length
+ResourceFilterPage_multiKeyReadOnly=Read Only
+ResourceFilterPage_multiKeySymLink=Symbolic Link
+ResourceFilterPage_multiEquals=equals
+ResourceFilterPage_multiMatches=matches
+ResourceFilterPage_multiLargerThan=is larger than
+ResourceFilterPage_multiSmallerThan=is smaller than
+ResourceFilterPage_multiBefore=is before
+ResourceFilterPage_multiAfter=is after
+ResourceFilterPage_multiWithin=is within
+ResourceFilterPage_true=true
+ResourceFilterPage_false=false
 ResourceInfo_folder = Folder
 ResourceInfo_project = Project
 ResourceInfo_linkedFile = Linked File
 ResourceInfo_linkedFolder = Linked Folder
+ResourceInfo_virtualFolder = Virtual Folder
 ResourceInfo_unknown = Unknown
 ResourceInfo_notLocal = <file contents not local>
+ResourceInfo_isVirtualFolder = <virtual folder>
 ResourceInfo_undefinedPathVariable = <undefined path variable>
 ResourceInfo_notExist = <resource does not exist>
 ResourceInfo_fileNotExist = {0} - (does not exist)
@@ -554,11 +646,46 @@ ResourceInfo_fileEncodingTitle = Default encoding for &text files
 ResourceInfo_fileContentEncodingFormat = &Default (determined from content: {0})
 ResourceInfo_fileContainerEncodingFormat = Default (&inherited from container: {0})
 ResourceInfo_containerEncodingFormat = &Inherited from container ({0})
-ResourceInfo_exWarning= Removing the executable flag on a directory will cause its children to become unreadable.
+ResourceInfo_exWarning= Removing the executable flag on a folder will cause its children to become unreadable.
+ResourceInfo_edit=&Edit...
+ResourceInfo_attributes=Attributes:
+ResourceInfo_permissions=Pe&rmissions:
+ResourceInfo_owner=Owner
+ResourceInfo_group=Group
+ResourceInfo_other=Other
+ResourceInfo_read=Read
+ResourceInfo_write=Write
+ResourceInfo_execute=Execute
 
 # --- Project References ---
 ProjectReferencesPage_label = Projects may refer to other projects in the workspace.\nUse this page to specify what other projects are referenced by the project.\n\n&Project references for ''{0}'':
 
+# --- Project Linked Resources References ---
+ProjectLinkedResourcePage_description=Path variables specify locations in the file system, including other path variables with the syntax "${VAR}".\nThe locations of linked resources may be specified relative to these path variables.
+ProjectLinkedResourcePage_pathVariableTabTitle=Path Variables
+ProjectLinkedResourcePage_linkedResourcesTabTitle=Linked Resources
+
+# --- Linked Resource Editor ---
+LinkedResourceEditor_editLinkedLocation=&Edit...
+LinkedResourceEditor_convertToVariableLocation=&Convert...
+LinkedResourceEditor_resourceName=Resource Name
+LinkedResourceEditor_path=Path
+LinkedResourceEditor_location=Location
+LinkedResourceEditor_fixed=Variable Relative Location
+LinkedResourceEditor_broken=Invalid Location
+LinkedResourceEditor_absolute=Absolute Path Location
+LinkedResourceEditor_changedTo=Changed ''{0}'' from ''{1}'' to ''{2}''.
+LinkedResourceEditor_unableToSetLinkLocationForResource=Unable to create variable ''{0}'' for location ''{1}''.
+LinkedResourceEditor_convertRelativePathLocations=Convert Variable Relative to Absolute Path Locations
+LinkedResourceEditor_convertionResults=Conversion Results
+linkedResourceEditor_OK=OK
+LinkedResourceEditor_unableToCreateVariable=Unable to create variable ''{0}'' for location ''{1}''.
+LinkedResourceEditor_unableToFindCommonPathSegments=Unable to find common path segments for the following resources:
+LinkedResourceEditor_convertAbsolutePathLocations=Convert Absolute Path Locations to Variable Relative
+LinkedResourceEditor_descriptionBlock=Linked resources in project ''{0}'':
+LinkedResourceEditor_convertTitle = Convert linked resource locations
+LinkedResourceEditor_convertMessage = Are you sure you want to convert the linked resource location(s) between absolute and variable relative paths?  This operation cannot be undone.  
+
 # ==============================================================================
 # Editors
 # ==============================================================================
@@ -655,17 +782,41 @@ CreateLinkedResourceGroup_linkTargetNotFile = Link target must be a file.
 CreateLinkedResourceGroup_linkTargetNotFolder = Link target must be a folder.
 CreateLinkedResourceGroup_linkTargetNonExistent = Link target does not exist.
 CreateLinkedResourceGroup_unableToValidateLinkTarget = Unable to validate link target.
+CreateLinkedResourceGroup_linkRequiredUnderAGroup= Only linked resources and other virtual folders can be created under a virtual folder.
 
 PathVariablesBlock_variablesLabel = &Defined path variables:
+PathVariablesBlock_variablesLabelForResource = &Defined path variables for resource ''{0}'':
 PathVariablesBlock_addVariableButton = &New...
 PathVariablesBlock_editVariableButton = Edi&t...
 PathVariablesBlock_removeVariableButton = &Remove
+PathVariablesBlock_nameColumn=Name
+PathVariablesBlock_valueColumn=Value
+
+ResourceFilterEditDialog_title=Edit Resource Filters
 
 PathVariableSelectionDialog_title = Select Path Variable
 PathVariableSelectionDialog_extendButton = &Extend...
 PathVariableSelectionDialog_ExtensionDialog_title = Variable Extension
 PathVariableSelectionDialog_ExtensionDialog_description = Choose extension to {0}
 
+ImportTypeDialog_title=File and Folder Operation
+ImportTypeDialog_titleFilesOnly= File Operation
+ImportTypeDialog_titleFilesLinking= Link Files
+ImportTypeDialog_question=Select how files and folders should be imported into the project:
+ImportTypeDialog_questionFilesOnly=Select how files should be imported into the project:
+ImportTypeDialog_moveFilesAndDirectories=&Move files and folders
+ImportTypeDialog_copyFilesAndDirectories=&Copy files and folders 
+ImportTypeDialog_moveFiles=&Move files
+ImportTypeDialog_copyFiles=&Copy files
+ImportTypeDialog_recreateFilesAndDirectories=Link to files and recreate folder structure with &virtual folders
+ImportTypeDialog_createLinks=&Link to files and folders
+ImportTypeDialog_linkFiles=&Link to files
+ImportTypeDialog_importElementsAs=Create link locations &relative to:
+ImportTypeDialog_importElementsAsTooltip=Link locations will be absolute path locations, rather than relative to a path variable
+ImportTypeDialog_importElementsAsTooltipSet=Link locations will be relative to a path variable, rather than absolute path locations
+ImportTypeDialog_editVariables=Edit Variables...
+ImportTypeDialog_alwaysPerformThisOperation=&Always perform the selected operation
+ImportTypeDialog_configureSettings=<a>Configure Drag and Drop Settings...</a>
 # ==============================================================================
 # Editor Framework
 # ==============================================================================
@@ -826,4 +977,10 @@ SystemSettingsChange_yes = Yes
 SystemSettingsChange_no = No
 
 UnsupportedVM_message=GCJ has been detected as the current Java virtual machine.  Use of GCJ is untested and unsupported.  Please consult the documentation for more information.
-IDEWorkbenchActivityHelper_jobName=Update Capability Enablement for Natures
\ No newline at end of file
+IDEWorkbenchActivityHelper_jobName=Update Capability Enablement for Natures
+
+OpenDelayedFileAction_title = Open File
+OpenDelayedFileAction_message_errorOnOpen = The file ''{0}'' could not be opened.\nSee log for details.
+OpenDelayedFileAction_message_fileNotFound= The file ''{0}'' could not be found.
+OpenDelayedFileAction_message_noWindow= The file ''{0}'' could not be opened.\nPlease make sure there is at least one open perspective.
+
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndFileInfoMatcher.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndFileInfoMatcher.java
new file mode 100644
index 0000000..2256e48
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndFileInfoMatcher.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.misc;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.filtermatchers.CompoundFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * A Resource Filter Type Factory for supporting the AND logical preposition
+ */
+public class AndFileInfoMatcher extends CompoundFileInfoMatcher {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#matches(org.eclipse.core.filesystem.IFileInfo)
+	 */
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		for (int i = 0; i < matchers.length; i++) {
+			if (!matchers[i].matches(parent, fileInfo))
+				return false;
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndResourceFilter.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndResourceFilter.java
new file mode 100644
index 0000000..fc27d77
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/AndResourceFilter.java
@@ -0,0 +1,10 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/FileInfoAttributesMatcher.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/FileInfoAttributesMatcher.java
new file mode 100644
index 0000000..dd71534
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/FileInfoAttributesMatcher.java
@@ -0,0 +1,420 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.misc;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.ide.StringMatcher;
+
+/**
+ * A file info filter that matches different file and folder attributes.
+ */
+public class FileInfoAttributesMatcher extends AbstractFileInfoMatcher {
+
+	public static String ID = "org.eclipse.ui.ide.multiFilter"; //$NON-NLS-1$
+
+	public static String KEY_NAME 					= "name"; //$NON-NLS-1$
+	public static String KEY_PROPJECT_RELATIVE_PATH = "projectRelativePath"; //$NON-NLS-1$
+	public static String KEY_LOCATION 				= "location"; //$NON-NLS-1$
+	public static String KEY_LAST_MODIFIED 			= "lastModified"; //$NON-NLS-1$
+	public static String KEY_LENGTH 				= "length"; //$NON-NLS-1$
+	public static String KEY_CREATED 				= "created"; //$NON-NLS-1$
+	public static String KEY_IS_SYMLINK				= "isSymLink"; //$NON-NLS-1$
+	public static String KEY_IS_READONLY			= "isReadOnly"; //$NON-NLS-1$
+
+	public static String OPERATOR_NONE			= "none"; //$NON-NLS-1$
+	public static String OPERATOR_LARGER_THAN	= "largerThan"; //$NON-NLS-1$
+	public static String OPERATOR_SMALLER_THAN	= "smallerThan"; //$NON-NLS-1$
+	public static String OPERATOR_EQUALS		= "equals"; //$NON-NLS-1$
+	public static String OPERATOR_BEFORE		= "before"; //$NON-NLS-1$
+	public static String OPERATOR_AFTER			= "after"; //$NON-NLS-1$
+	public static String OPERATOR_WITHIN		= "within"; //$NON-NLS-1$
+	public static String OPERATOR_MATCHES		= "matches"; //$NON-NLS-1$
+	
+
+	/**
+	 * @param key
+	 * @return
+	 */
+	public static String[] getOperatorsForKey(String key) {
+		if (key.equals(KEY_NAME) || key.equals(KEY_PROPJECT_RELATIVE_PATH) || key.equals(KEY_LOCATION))
+				return new String[] {OPERATOR_MATCHES};
+		if (key.equals(KEY_IS_SYMLINK) || key.equals(KEY_IS_READONLY))
+			return new String[] {OPERATOR_EQUALS};
+		if (key.equals(KEY_LAST_MODIFIED) || key.equals(KEY_CREATED))
+			return new String[] {OPERATOR_EQUALS, OPERATOR_BEFORE, OPERATOR_AFTER, OPERATOR_WITHIN};
+		if (key.equals(KEY_LENGTH))
+			return new String[] {OPERATOR_EQUALS, OPERATOR_LARGER_THAN, OPERATOR_SMALLER_THAN};
+		
+		return new String[] {OPERATOR_NONE};
+	}
+	
+	/**
+	 * @param key
+	 * @param operator
+	 * @return
+	 */
+	public static  Class getTypeForKey(String key, String operator) {
+		if (key.equals(KEY_NAME) || key.equals(KEY_PROPJECT_RELATIVE_PATH) || key.equals(KEY_LOCATION))
+			return String.class;
+		if (key.equals(KEY_IS_SYMLINK) || key.equals(KEY_IS_READONLY))
+			return Boolean.class;
+		if (key.equals(KEY_LAST_MODIFIED) || key.equals(KEY_CREATED)) {
+			if (operator.equals(OPERATOR_WITHIN))
+				return Integer.class;
+			return Date.class;
+		}
+		if (key.equals(KEY_LENGTH))
+			return Integer.class;
+		return String.class;
+	}
+	
+	/**
+	 * @return
+	 */
+	public static boolean supportCreatedKey() {
+		if (Platform.getOS().equals(Platform.OS_WIN32) || Platform.getOS().equals(Platform.OS_MACOSX)) {
+			String system = System.getProperty("java.version"); //$NON-NLS-1$
+			double versionNumber = 0.0;
+			int index = system.indexOf('.');
+			if (index != -1) {
+				versionNumber = Integer.decode(system.substring(0, index)).doubleValue();
+				system = system.substring(index + 1);
+				index = system.indexOf('.');
+				if (index != -1) {
+					versionNumber += Double.parseDouble(system.substring(0, index)) / 10.0;
+				}
+			}
+			return versionNumber >= 1.7;
+		}
+		return false;
+	}
+	
+	/**
+	 * @since 3.6
+	 *
+	 */
+	public static class Argument {
+		public String key = KEY_NAME;
+		public String pattern = new String();
+		public String operator = OPERATOR_EQUALS;
+		public boolean caseSensitive = false; 
+		public boolean regularExpression = false;
+	}
+	
+	/**
+	 * @param argument
+	 * @return
+	 */
+	public static String encodeArguments(Argument argument)  {
+		return VERSION_IMPLEMENTATION + DELIMITER + 
+				argument.key + DELIMITER + 
+				argument.operator + DELIMITER + 
+				Boolean.toString(argument.caseSensitive) + DELIMITER + 
+				Boolean.toString(argument.regularExpression) + DELIMITER + 
+				argument.pattern;
+				
+	}
+
+	/**
+	 * @param argument
+	 * @return
+	 */
+	public static Argument decodeArguments(String argument)  {
+		Argument result = new Argument();
+		if (argument == null)
+			return result;
+		
+		int index = argument.indexOf(DELIMITER);
+		if (index == -1)
+			return result;
+		
+		String version = argument.substring(0, index);
+		argument = argument.substring(index + 1);
+		
+		if (!version.equals(VERSION_IMPLEMENTATION))
+			return result;
+		
+		index = argument.indexOf(DELIMITER);
+		if (index == -1)
+			return result;
+
+		result.key = argument.substring(0, index);
+		argument = argument.substring(index + 1);
+
+		index = argument.indexOf(DELIMITER);
+		if (index == -1)
+			return result;
+
+		result.operator = argument.substring(0, index);
+		argument = argument.substring(index + 1);
+
+		index = argument.indexOf(DELIMITER);
+		if (index == -1)
+			return result;
+
+		result.caseSensitive = Boolean.valueOf(argument.substring(0, index)).booleanValue();
+		argument = argument.substring(index + 1);
+		
+		index = argument.indexOf(DELIMITER);
+		if (index == -1)
+			return result;
+
+		result.regularExpression = Boolean.valueOf(argument.substring(0, index)).booleanValue();
+		result.pattern = argument.substring(index + 1);
+
+		return result;
+	}
+
+
+	static private String DELIMITER = "-"; //$NON-NLS-1$
+	static private String VERSION_IMPLEMENTATION = "1.0"; //$NON-NLS-1$
+
+	/*
+	 * return value in milliseconds since epoch(1970-01-01T00:00:00Z)
+	 */
+	private static long getFileCreationTime(String fullPath) {
+		/*
+		java.nio.file.FileSystem fs = java.nio.file.FileSystems.getDefault();
+		java.nio.file.FileRef fileRef = fs.getPath(file);
+		java.nio.file.attribute.BasicFileAttributes attributes = java.nio.file.attribute.Attributes.readBasicFileAttributes(fileRef, new java.nio.file.LinkOption[0]);
+		return attributes.creationTime();
+        */
+
+		try {
+			Class fileSystems = Class.forName("java.nio.file.FileSystems"); //$NON-NLS-1$
+			Method getDefault = fileSystems.getMethod("getDefault", null); //$NON-NLS-1$
+			Object fs = getDefault.invoke(null, null);
+	
+			Class fileRef = Class.forName("java.nio.file.FileRef"); //$NON-NLS-1$
+
+			Class fileSystem = Class.forName("java.nio.file.FileSystem"); //$NON-NLS-1$
+			Method getPath = fileSystem.getMethod("getPath", new Class[] {String.class}); //$NON-NLS-1$
+			Object fileRefObj = getPath.invoke(fs, new Object[] {fullPath});
+			
+			Class attributes = Class.forName("java.nio.file.attribute.Attributes"); //$NON-NLS-1$
+			Class linkOptions = Class.forName("java.nio.file.LinkOption"); //$NON-NLS-1$
+			Object linkOptionsEmptyArray = Array.newInstance(linkOptions, 0);
+			Method readBasicFileAttributes = attributes.getMethod("readBasicFileAttributes", new Class[] {fileRef, linkOptionsEmptyArray.getClass()}); //$NON-NLS-1$
+			Object attributesObj = readBasicFileAttributes.invoke(null, new Object[] {fileRefObj, linkOptionsEmptyArray});
+	
+			Class basicAttributes = Class.forName("java.nio.file.attribute.BasicFileAttributes"); //$NON-NLS-1$
+			Method creationTime = basicAttributes.getMethod("creationTime", null); //$NON-NLS-1$
+			Object time = creationTime.invoke(attributesObj, null);
+	
+			Class fileTime = Class.forName("java.nio.file.attribute.FileTime"); //$NON-NLS-1$
+			Method toMillis = fileTime.getMethod("toMillis", null); //$NON-NLS-1$
+			Object result = toMillis.invoke(time, null);
+			
+			if (result instanceof Long)
+				return ((Long) result).longValue();
+		} catch (ClassNotFoundException e) {
+			e.printStackTrace();
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			e.printStackTrace();
+		} catch (SecurityException e) {
+			e.printStackTrace();
+		} catch (NoSuchMethodException e) {
+			e.printStackTrace();
+		} 
+		return 0;
+	}
+	
+	MatcherCache matcher = null;
+	private boolean fSupportsCreatedKey;
+
+	class MatcherCache {
+		public MatcherCache(String arguments) {
+			argument = decodeArguments(arguments);
+			type = getTypeForKey(argument.key, argument.operator);
+			if (type.equals(String.class)) {
+				if (argument.regularExpression == false)
+					stringMatcher = new StringMatcher(argument.pattern, argument.caseSensitive == false, false);
+				else
+					regExPattern = Pattern.compile(argument.pattern, argument.caseSensitive ? 0:Pattern.CASE_INSENSITIVE);
+			}
+		}
+		
+
+		Argument argument;
+		Class type;
+		StringMatcher stringMatcher = null;
+		Pattern regExPattern = null;
+
+		public boolean match(IContainer parent, IFileInfo fileInfo) {
+			if (type.equals(String.class)) {
+				String value = new String();
+				if (argument.key.equals(KEY_NAME))
+					value = fileInfo.getName();
+				if (argument.key.equals(KEY_PROPJECT_RELATIVE_PATH))
+					value = parent.getProjectRelativePath().append(fileInfo.getName()).toPortableString();
+				if (argument.key.equals(KEY_LOCATION))
+					value = parent.getLocation().append(fileInfo.getName()).toOSString();
+				
+				if (stringMatcher != null)
+					return stringMatcher.match(value);
+				if (regExPattern != null) {
+					Matcher m = regExPattern.matcher(value);
+					return m.matches();
+				}
+			}
+			if (type.equals(Integer.class)) {
+				int amount;
+				try {
+					amount = Integer.parseInt(argument.pattern);
+				} catch (NumberFormatException e) {
+					amount = 0;
+				}
+				if (argument.key.equals(KEY_LAST_MODIFIED) || argument.key.equals(KEY_CREATED)) {
+					// OPERATOR_WITHIN
+					long time = 0;
+					if (argument.key.equals(KEY_LAST_MODIFIED)) {
+						IFileInfo info = fetchInfo(parent, fileInfo);
+						if (!info.exists())
+							return false;
+						time = info.getLastModified();
+					}
+					if (argument.key.equals(KEY_CREATED)) {
+						if (!fSupportsCreatedKey)
+							return false;
+						time = getFileCreationTime(parent.getLocation().append(fileInfo.getName()).toOSString());
+					}
+					GregorianCalendar gc = new GregorianCalendar();
+					gc.add(Calendar.SECOND,-amount);
+					Date when = gc.getTime();
+					Date then = new Date(time);
+					return then.after(when);
+				}
+				if (argument.key.equals(KEY_LENGTH)) {
+					IFileInfo info = fetchInfo(parent, fileInfo);
+					if (!info.exists())
+						return false;
+					if (argument.operator.equals(OPERATOR_EQUALS))
+						return info.getLength() == amount;
+					if (argument.operator.equals(OPERATOR_LARGER_THAN))
+						return info.getLength() > amount;
+					if (argument.operator.equals(OPERATOR_SMALLER_THAN))
+						return info.getLength() < amount;
+				}
+			}
+			if (type.equals(Date.class)) {
+				long parameter = Long.parseLong(argument.pattern);
+				if (argument.key.equals(KEY_LAST_MODIFIED) || argument.key.equals(KEY_CREATED)) {
+					long time = 0;
+					if (argument.key.equals(KEY_LAST_MODIFIED)) {
+						IFileInfo info = fetchInfo(parent, fileInfo);
+						if (!info.exists())
+							return false;
+						time = info.getLastModified();
+					}
+					if (argument.key.equals(KEY_CREATED)) {
+						if (!fSupportsCreatedKey)
+							return false;
+						time = getFileCreationTime(parent.getLocation().append(fileInfo.getName()).toOSString());
+					}
+					Date when = new Date(parameter);
+					Date then = new Date(time);
+					if (argument.operator.equals(OPERATOR_EQUALS))
+						return roundToOneDay(time) == roundToOneDay(parameter); 
+					if (argument.operator.equals(OPERATOR_BEFORE))
+						return then.before(when);
+					if (argument.operator.equals(OPERATOR_AFTER))
+						return then.after(when);
+				}
+			}
+			if (type.equals(Boolean.class)) {
+				boolean parameter = Boolean.valueOf(argument.pattern).booleanValue();
+				if (argument.key.equals(KEY_IS_READONLY)) {
+					IFileInfo info = fetchInfo(parent, fileInfo);
+					if (!info.exists())
+						return false;
+					return info.getAttribute(EFS.ATTRIBUTE_READ_ONLY) == parameter;
+				}
+				if (argument.key.equals(KEY_IS_SYMLINK)) {
+					IFileInfo info = fetchInfo(parent, fileInfo);
+					if (!info.exists())
+						return false;
+					return info.getAttribute(EFS.ATTRIBUTE_SYMLINK) == parameter;
+				}
+			}
+			return false;
+		}
+
+		private long roundToOneDay(long parameter) {
+			return parameter / (1000 * 60 * 60 * 24); // 1000 ms in 1 sec, 60 sec in 1 min, 60 min in 1 hour, 24 hours in 1 day 
+		}
+
+		private IFileInfo fetchInfo(IContainer parent, IFileInfo fileInfo) {
+			IFileStore fileStore;
+			try {
+				fileStore = EFS.getStore(parent.getLocationURI());
+			} catch (CoreException e) {
+				return fileInfo;
+			}
+			IFileStore store = fileStore.getChild(fileInfo.getName());
+			return store.fetchInfo();
+		}
+	}
+	/**
+	 * Creates a new factory for this filter type.
+	 */
+	public FileInfoAttributesMatcher() {
+		fSupportsCreatedKey = supportCreatedKey();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#initialize(org.eclipse.core.resources.IProject, java.lang.Object)
+	 */
+	public void initialize(IProject project, Object arguments) throws CoreException {
+		try {
+			if ((arguments instanceof String) && ((String) arguments).length() > 0)
+				matcher = new MatcherCache((String) arguments);
+		} catch (PatternSyntaxException e) {
+			throw new CoreException(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, Platform.PLUGIN_ERROR, e.getMessage(), e));
+		} catch (NumberFormatException e) {
+			throw new CoreException(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, Platform.PLUGIN_ERROR, e.getMessage(), e));
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#matches(org.eclipse.core.filesystem.IFileInfo)
+	 */
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		if (matcher != null) {
+			return matcher.match(parent, fileInfo);
+		}
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/NotFileInfoMatcher.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/NotFileInfoMatcher.java
new file mode 100644
index 0000000..0cb04f7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/NotFileInfoMatcher.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.misc;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.filtermatchers.CompoundFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * A Resource Filter Type Factory for supporting the NOT logical preposition
+ */
+public class NotFileInfoMatcher extends CompoundFileInfoMatcher  {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#matches(org.eclipse.core.filesystem.IFileInfo)
+	 */
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		for (int i = 0; i < matchers.length; i++) {
+			if (matchers[i].matches(parent, fileInfo))
+				return false;
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/OrFileInfoMatcher.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/OrFileInfoMatcher.java
new file mode 100644
index 0000000..6d70cce
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/OrFileInfoMatcher.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.misc;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.filtermatchers.CompoundFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+
+/**
+ * A Resource Filter Type Factory for supporting the OR logical preposition
+ */
+public class OrFileInfoMatcher extends CompoundFileInfoMatcher {
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#matches(org.eclipse.core.filesystem.IFileInfo)
+	 */
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		if (matchers.length > 0) {
+			for (int i = 0; i < matchers.length; i++) {
+				if (matchers[i].matches(parent, fileInfo))
+					return true;
+			}
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/StringFileInfoMatcher.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/StringFileInfoMatcher.java
new file mode 100644
index 0000000..58b3a3a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/StringFileInfoMatcher.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 Freescale Semiconductor and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Serge Beauchamp (Freescale Semiconductor) - [252996] initial API and implementation
+ *     IBM Corporation - ongoing implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.ide.misc;
+
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.filtermatchers.AbstractFileInfoMatcher;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.internal.ide.StringMatcher;
+
+/**
+ * A file info filter that uses a simple string matcher to match on file name.
+ */
+public class StringFileInfoMatcher extends AbstractFileInfoMatcher {
+
+	/**
+	 */
+	public static String ID = "org.eclipse.ui.ide.patternFilterMatcher"; //$NON-NLS-1$
+	
+	StringMatcher matcher = null;
+	/**
+	 * Creates a new factory for this filter type.
+	 */
+	public StringFileInfoMatcher() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#initialize(org.eclipse.core.resources.IProject, java.lang.Object)
+	 */
+	public void initialize(IProject project, Object arguments) throws CoreException {
+		if ((arguments instanceof String) && ((String) arguments).length() > 0)
+			matcher = new StringMatcher((String) arguments, true, false);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.AbstractFileInfoMatcher#matches(org.eclipse.core.filesystem.IFileInfo)
+	 */
+	public boolean matches(IContainer parent, IFileInfo fileInfo) throws CoreException {
+		if (matcher != null)
+			return matcher.match(fileInfo.getName());
+		return false;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ContainerDescription.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ContainerDescription.java
index e47b976..c788297 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ContainerDescription.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/ContainerDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.ui.ide.dialogs.UIResourceFilterDescription;
 import org.eclipse.ui.ide.undo.ResourceDescription;
 
 /**
@@ -42,6 +43,8 @@ public abstract class ContainerDescription extends AbstractResourceDescription {
 
 	URI location;
 
+	UIResourceFilterDescription[] filters;
+	
 	String defaultCharSet;
 
 	AbstractResourceDescription[] members;
@@ -59,6 +62,26 @@ public abstract class ContainerDescription extends AbstractResourceDescription {
 	 */
 
 	public static ContainerDescription fromContainer(IContainer container) {
+		return fromContainer(container, false);
+	}
+	
+	/**
+	 * Create a group container description from the specified container handle that
+	 * can be used to create the container. The returned ContainerDescription
+	 * should represent any non-existing parents in addition to the specified
+	 * container.
+	 * 
+	 * @param container
+	 *            the handle of the container to be described
+	 * @return a container description describing the container and any
+	 *         non-existing parents.
+	 */
+
+	public static ContainerDescription fromVirtualFolderContainer(IContainer container) {
+		return fromContainer(container, true);
+	}
+	
+	protected static ContainerDescription fromContainer(IContainer container, boolean usingVirtualFolder) {
 		IPath fullPath = container.getFullPath();
 		ContainerDescription firstCreatedParent = null;
 		ContainerDescription currentContainerDescription = null;
@@ -90,8 +113,8 @@ public abstract class ContainerDescription extends AbstractResourceDescription {
 				} else {
 					IFolder folderHandle = currentContainer.getFolder(new Path(
 							currentSegment));
-					ContainerDescription currentFolder = new FolderDescription(
-							folderHandle);
+					ContainerDescription currentFolder;
+					currentFolder = new FolderDescription(folderHandle, usingVirtualFolder);
 					currentContainer = folderHandle;
 					if (currentContainerDescription != null) {
 						currentContainerDescription.addMember(currentFolder);
@@ -196,7 +219,7 @@ public abstract class ContainerDescription extends AbstractResourceDescription {
 							.getFolder(path);
 					members[i].recordStateFromHistory(folderHandle,
 							new SubProgressMonitor(monitor, 100 / members.length));
-				}
+				} 
 			}
 		}
 		monitor.done();
@@ -276,6 +299,16 @@ public abstract class ContainerDescription extends AbstractResourceDescription {
 		this.location = location;
 	}
 
+	/**
+	 * Set the filters to which should be created on this container.
+	 * 
+	 * @param filters
+	 *            the filters
+	 */
+	public void setFilters(UIResourceFilterDescription[] filters) {
+		this.filters = filters;
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FolderDescription.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FolderDescription.java
index f6d04b7..f570490 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FolderDescription.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/FolderDescription.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,6 +34,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
  */
 public class FolderDescription extends ContainerDescription {
 
+	private boolean virtual = false;
 	/**
 	 * Create a FolderDescription from the specified folder handle. Typically
 	 * used when the folder handle represents a resource that actually exists,
@@ -41,9 +42,12 @@ public class FolderDescription extends ContainerDescription {
 	 * 
 	 * @param folder
 	 *            the folder to be described
+	 * @param virtual
+	 *            the folder is a virtual folder
 	 */
-	public FolderDescription(IFolder folder) {
+	public FolderDescription(IFolder folder, boolean virtual) {
 		super(folder);
+		this.virtual = virtual;
 	}
 
 	/**
@@ -94,12 +98,18 @@ public class FolderDescription extends ContainerDescription {
 			if (monitor.isCanceled()) {
 				throw new OperationCanceledException();
 			}
+			if (filters != null) {
+				for (int i = 0; i < filters.length; i++) {
+					folderHandle.createFilter(filters[i].getType(), filters[i].getFileInfoMatcherDescription(), 0, new SubProgressMonitor(
+							monitor, 100));
+				}
+			}
 			if (location != null) {
 				folderHandle.createLink(location,
 						IResource.ALLOW_MISSING_LOCAL, new SubProgressMonitor(
 								monitor, 100));
 			} else {
-				folderHandle.create(false, true, new SubProgressMonitor(
+				folderHandle.create(virtual ? IResource.VIRTUAL:0, true, new SubProgressMonitor(
 						monitor, 100));
 			}
 			if (monitor.isCanceled()) {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/UndoMessages.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/UndoMessages.java
index efe4c05..49e77b3 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/UndoMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/UndoMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,6 +60,7 @@ public class UndoMessages extends NLS {
 	
 	public static String ProjectDescription_NewProjectProgress;
 	public static String FileDescription_NewFileProgress;
+	public static String GroupDescription_NewGroupProgress;
 	public static String FileDescription_SavingUndoInfoProgress;
 	public static String FileDescription_ContentsCouldNotBeRestored;
 	public static String FolderDescription_NewFolderProgress;
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/messages.properties b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/messages.properties
index 9500291..dc3ab03 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/undo/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
+# Copyright (c) 2006, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -42,6 +42,7 @@ CopyResourcesOperation_NotAllowedDueToDataLoss=The original resources that were
 
 ProjectDescription_NewProjectProgress=Creating new project...
 FileDescription_NewFileProgress=Creating new file...
+GroupDescription_NewGroupProgress=Creating new virtual folder...
 FileDescription_ContentsCouldNotBeRestored=Unexpected error.  File contents could not be restored from local history during undo/redo.
 FileDescription_SavingUndoInfoProgress=Saving file info...
 FolderDescription_NewFolderProgress=Creating new folder...
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
index 1f2747f..d746c61 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/BookmarksView.java
@@ -11,7 +11,6 @@
 
 package org.eclipse.ui.internal.views.markers;
 
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.views.markers.MarkerSupportView;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
@@ -29,12 +28,4 @@ public class BookmarksView extends MarkerSupportView {
 		super(MarkerSupportRegistry.BOOKMARKS_GENERATOR);
 		
 	}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getStaticContextId()
-	 */
-	String getStaticContextId() {
-		return PlatformUI.PLUGIN_ID + ".bookmark_view_context"; //$NON-NLS-1$
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java
index 3a31488..c2f9f32 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CachedMarkerBuilder.java
@@ -10,62 +10,25 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.views.markers;
 
-import java.io.IOException;
-import java.io.StringReader;
-import java.io.StringWriter;
 import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Hashtable;
 import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
 
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
-import org.eclipse.core.resources.mapping.ResourceMappingContext;
-import org.eclipse.core.resources.mapping.ResourceTraversal;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-import org.eclipse.ui.internal.ide.IDEInternalPreferences;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.ui.internal.ide.Policy;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.StatusUtil;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
 import org.eclipse.ui.statushandlers.StatusManager;
-import org.eclipse.ui.views.markers.FilterConfigurationArea;
 import org.eclipse.ui.views.markers.MarkerField;
-import org.eclipse.ui.views.markers.MarkerItem;
 import org.eclipse.ui.views.markers.internal.MarkerGroup;
-import org.eclipse.ui.views.markers.internal.MarkerGroupingEntry;
-import org.eclipse.ui.views.markers.internal.MarkerMessages;
-import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
-import org.eclipse.ui.views.markers.internal.MarkerType;
-import org.eclipse.ui.views.markers.internal.ProblemFilter;
-import org.eclipse.ui.views.markers.internal.Util;
-import org.osgi.framework.Bundle;
 
 /**
  * The CachedMarkerBuilder is the object that generates the list of markers from
@@ -76,320 +39,106 @@ import org.osgi.framework.Bundle;
  */
 public class CachedMarkerBuilder {
 
-	private static final MarkerCategory[] EMPTY_CATEGORY_ARRAY = new MarkerCategory[0];
-	private static final MarkerEntry[] EMPTY_ENTRY_ARRAY = new MarkerEntry[0];
-
-	private static final int SHORT_DELAY = 100;// The 100 ms short delay for
-	// scheduling
-
-	private static final int TIME_OUT = 30000;// The 30s long delay to run
-
-	private static final String TAG_FILTERS_SECTION = "filterGroups"; //$NON-NLS-1$
-	private static final String TAG_GROUP_ENTRY = "filterGroup"; //$NON-NLS-1$
-	private static final String TAG_AND = "andFilters"; //$NON-NLS-1$
 	private static final String TAG_CATEGORY_GROUP = "categoryGroup"; //$NON-NLS-1$
-	private static final String TAG_COLUMN_VISIBILITY = "visible"; //$NON-NLS-1$
 	private static final String VALUE_NONE = "none"; //$NON-NLS-1$
-	private static final String TAG_LEGACY_FILTER_ENTRY = "filter"; //$NON-NLS-1$
-	private static final Integer[] EMPTY_MARKER_COUNTS = { new Integer(0),
-			new Integer(0), new Integer(0) };
-
-	private boolean building = true;// Start with nothing until we have
-	// something
-
-	private MarkerCategory[] categories;
-	private MarkerMap currentMap = null;
-
-	private MarkerContentGenerator generator; // The MarkerContentGenerator we
-	// are
-	// building for
-
-	private Job markerProcessJob;
 
+	// The MarkerContentGenerator we are using for building
+	private MarkerContentGenerator generator; 
+	private MarkerUpdateJob updateJob;
+	private MarkersChangeListener markerListener;
+	private MarkerUpdateScheduler scheduler;
+	
+	private Markers markers;
+	private Markers markersClone;
+	
+	final Object MARKER_INCREMENTAL_UPDATE_FAMILY =new Object();
+	final Object CACHE_UPDATE_FAMILY = new Object();
+	final Object MARKERSVIEW_UPDATE_JOB_FAMILY;
+	
 	private IWorkbenchSiteProgressService progressService;
 
-	private Job updateJob;
-
 	private MarkerGroup categoryGroup;
-
-	private Collection enabledFilters;
-	private Collection filters;
-	private IResource[] focusResources = MarkerSupportInternalUtilities.EMPTY_RESOURCE_ARRAY;
-	private MarkerField[] visibleFields;
-
-	private boolean andFilters = false;
+	
 	private MarkerComparator comparator;
-	private IMemento memento;
-	private String viewId;
+	
+	private boolean[] changeFlags;
 
-	// The time the build started. A -1 indicates no build in progress.
-	private long preBuildTime = -1;
-	private IResourceChangeListener resourceListener;
-	private IPropertyChangeListener preferenceListener;
+	private IPropertyChangeListener workingSetListener;
 
-	// without a builder update
+	private boolean active;
+	
+	private boolean building;
+	
+	private IMemento memento;
+	
 
 	/**
 	 * Create a new instance of the receiver. Update using the updateJob.
-	 * 
-	 * @param contentGenerator
-	 * @param id
-	 *            id of the view we are building for
-	 * @param memento
-	 *            the memento to restore from
-	 */
-	public CachedMarkerBuilder(MarkerContentGenerator contentGenerator,
-			String id, IMemento memento) {
-		this.generator = contentGenerator;
-		this.viewId = id;
-		initialiseVisibleFields(memento);
-		initializePreferenceListener();
-
-		this.memento = memento;
+	 * @param view 
+	 */
+	public CachedMarkerBuilder(ExtendedMarkersView view) {
+		active = false;
+		changeFlags = new boolean[] { true, false, false };
+		MARKERSVIEW_UPDATE_JOB_FAMILY = view.MARKERSVIEW_UPDATE_JOB_FAMILY;
+		markers = new Markers(this);
+		markerListener = new MarkersChangeListener(view, this);
+		scheduler = new MarkerUpdateScheduler(view, this);
+	}
+	
+	void restoreState(IMemento memento) {
 		if (memento == null)
-			setDefaultCategoryGroup(contentGenerator);
+			setDefaultCategoryGroup(getGenerator());
 		else {
 			// Set up the category group if it has been set or set a default.
 			String categoryGroupID = memento.getString(TAG_CATEGORY_GROUP);
 			if (categoryGroupID == null)
-				setDefaultCategoryGroup(contentGenerator);
+				setDefaultCategoryGroup(getGenerator());
 			else {
 				if (categoryGroupID.equals(VALUE_NONE))
 					this.categoryGroup = null;
 				else {
-					MarkerGroup newGroup = contentGenerator
-							.getMarkerGroup(categoryGroupID);
+					MarkerGroup newGroup = getGenerator().getMarkerGroup(
+							categoryGroupID);
 					if (newGroup == null)
-						setDefaultCategoryGroup(contentGenerator);
+						setDefaultCategoryGroup(getGenerator());
 					else
 						this.categoryGroup = newGroup;
 				}
 			}
 		}
-
-		createMarkerProcessJob();
-		resourceListener = getUpdateListener();
-		// Hook up to the resource changes after all widget have been created
-		ResourcesPlugin.getWorkspace().addResourceChangeListener(
-				resourceListener,
-				IResourceChangeEvent.POST_CHANGE
-						| IResourceChangeEvent.PRE_BUILD
-						| IResourceChangeEvent.POST_BUILD);
-
-	}
-
-	/**
-	 * Add the resources in resourceMapping to the resourceCollection
-	 * 
-	 * @param resourceCollection
-	 * @param resourceMapping
-	 */
-	private void addResources(Collection resourceCollection,
-			ResourceMapping resourceMapping) {
-
-		try {
-			ResourceTraversal[] traversals = resourceMapping.getTraversals(
-					ResourceMappingContext.LOCAL_CONTEXT,
-					new NullProgressMonitor());
-			for (int i = 0; i < traversals.length; i++) {
-				ResourceTraversal traversal = traversals[i];
-				IResource[] result = traversal.getResources();
-				for (int j = 0; j < result.length; j++) {
-					resourceCollection.add(result[j]);
-				}
-			}
-		} catch (CoreException e) {
-			Policy.handle(e);
-		}
-
-	}
-
-	/**
-	 * Return whether the filters are being ANDed or ORed.
-	 * 
-	 * @return boolean
-	 */
-	boolean andFilters() {
-		return andFilters;
-	}
-
-	/**
-	 * Build all of the markers in the receiver.
-	 * 
-	 * @param monitor
-	 */
-	void buildAllMarkers(IProgressMonitor monitor) {
-		building = true;
-		MarkerMap newMarkers;
-		try {
-
-			monitor.beginTask(MarkerMessages.MarkerView_19, 60);
-
-			monitor.subTask(MarkerMessages.MarkerView_waiting_on_changes);
-
-			if (monitor.isCanceled())
-				return;
-
-			monitor.subTask(MarkerMessages.MarkerView_searching_for_markers);
-			SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 10);
-			newMarkers = generator.generateFilteredMarkers(subMonitor,
-					andFilters(), focusResources, getEnabledFilters());
-
-			if (monitor.isCanceled())
-				return;
-
-			sortAndMakeCategories(new SubProgressMonitor(monitor, 30),
-					newMarkers);
-			monitor.done();
-		} finally {
-			building = false;
-		}
-
+		this.memento=memento;
 	}
-
 	/**
-	 * Cancel the pending jobs in the receiver.
-	 */
-	private void cancelJobs() {
-		markerProcessJob.cancel();
-		updateJob.cancel();
-	}
-
-	/**
-	 * Return a collection of all of the configuration fields for this generator
 	 * 
-	 * @return Collection of {@link FilterConfigurationArea}
 	 */
-	Collection createFilterConfigurationFields() {
-		Collection result = new ArrayList();
-		for (int i = 0; i < visibleFields.length; i++) {
-			FilterConfigurationArea area = MarkerSupportInternalUtilities
-					.generateFilterArea(visibleFields[i]);
-			if (area != null)
-				result.add(area);
-
-		}
-		return result;
-	}
-
-	/**
-	 * Create the job for updating the markers.
-	 */
-	private void createMarkerProcessJob() {
-		markerProcessJob = new Job(MarkerMessages.MarkerView_processUpdates) {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
-			 */
-			public boolean belongsTo(Object family) {
-				return MarkerContentGenerator.CACHE_UPDATE_FAMILY == family;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
-			 */
-			protected IStatus run(IProgressMonitor monitor) {
-				updateJob.cancel();
-				buildAllMarkers(monitor);
-				updateJob.schedule();
-				return Status.OK_STATUS;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.ui.progress.WorkbenchJob#shouldRun()
-			 */
-			public boolean shouldRun() {
-
-				// Hold off while everything is active
-				if (preBuildTime > 0
-						&& System.currentTimeMillis() - preBuildTime < TIME_OUT)
-					return false;
-
-				// Clear it if we are past the time out.
-				preBuildTime = -1;
-				// Do not run if the change came in before there is a viewer
-				return IDEWorkbenchPlugin.getDefault().getBundle().getState() == Bundle.ACTIVE;
-			}
-		};
-		markerProcessJob.setSystem(true);
-
-	}
-
-	/**
-	 * Disable all of the filters in the receiver.
-	 */
-	void disableAllFilters() {
-		Collection allFilters = getEnabledFilters();
-		Iterator enabled = allFilters.iterator();
-		while (enabled.hasNext()) {
-			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) enabled
-					.next();
-			group.setEnabled(false);
-		}
-		allFilters.clear();
-		writeFiltersPreference();
-		scheduleMarkerUpdate();
-
+	void start() {
+		active = true;
+		registerTypesToListener();
+		PlatformUI.getWorkbench().getWorkingSetManager()
+				.addPropertyChangeListener(getWorkingSetListener());
+		
+		markerListener.start();
+		scheduleUpdate();
 	}
 
 	/**
 	 * Dispose any listeners in the receiver.
 	 */
 	void dispose() {
-		ResourcesPlugin.getWorkspace().removeResourceChangeListener(
-				resourceListener);
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.removePropertyChangeListener(preferenceListener);
-
-	}
-
-	/**
-	 * Return all of the filters for the receiver.
-	 * 
-	 * @return Collection of MarkerFieldFilterGroup
-	 */
-	Collection getAllFilters() {
-		if (filters == null) {
-			filters = new ArrayList();
-			IConfigurationElement[] filterReferences = generator
-					.getFilterReferences();
-			for (int i = 0; i < filterReferences.length; i++) {
-				filters.add(new MarkerFieldFilterGroup(filterReferences[i],
-						this));
-			}
-
-			// Honour the deprecated problemFilters
-			if (viewId.equals(IPageLayout.ID_PROBLEM_VIEW)) {
-				Iterator problemFilters = MarkerSupportRegistry.getInstance()
-						.getRegisteredFilters().iterator();
-				while (problemFilters.hasNext())
-					filters.add(new CompatibilityMarkerFieldFilterGroup(
-							(ProblemFilter) problemFilters.next(), this));
-			}
-
-			// Apply the last settings
-			loadFiltersPreference();
-
+		markerListener.stop();
+		active=false;
+		Job.getJobManager().cancel(MARKERSVIEW_UPDATE_JOB_FAMILY);
+		
+		if(workingSetListener!=null){
+			PlatformUI.getWorkbench().getWorkingSetManager()
+			.removePropertyChangeListener(getWorkingSetListener());
 		}
-		return filters;
-	}
-
-	/**
-	 * Return the categories for the receiver.
-	 * 
-	 * @return MarkerCategory[] or <code>null</code> if there are no
-	 *         categories.
-	 */
-	public MarkerCategory[] getCategories() {
-		if (building) {
-			return null;
+		
+		if (isIncremental()) {
+			if(incrementJob!=null){
+				incrementJob.clearEntries();
+			}
 		}
-		return categories;
 	}
 
 	/**
@@ -398,7 +147,6 @@ public class CachedMarkerBuilder {
 	 * @return MarkerGroup or <code>null</code>.
 	 */
 	MarkerGroup getCategoryGroup() {
-
 		return categoryGroup;
 	}
 
@@ -408,50 +156,16 @@ public class CachedMarkerBuilder {
 	 * @return MarkerComparator
 	 */
 	MarkerComparator getComparator() {
-
-		if (comparator == null) {
+		if(comparator==null){
 			MarkerField field = null;
 			if (getCategoryGroup() != null)
 				field = getCategoryGroup().getMarkerField();
 			comparator = new MarkerComparator(field, generator.getAllFields());
-			comparator.restore(this.memento);
-		}
-		return comparator;
-	}
-
-	/**
-	 * Return the elements in the adapter.
-	 * 
-	 * @return MarkerSupportItem[]
-	 */
-	MarkerSupportItem[] getElements() {
-
-		if (refreshingMarkers()) {
-			return MarkerSupportInternalUtilities.EMPTY_MARKER_ITEM_ARRAY;
-		}
-		if (isShowingHierarchy() && categories != null) {
-			return categories;
-		}
-		return currentMap.toArray();
-	}
-
-	/**
-	 * Return the currently enabled filters.
-	 * 
-	 * @return Collection of MarkerFieldFilterGroup
-	 */
-	Collection getEnabledFilters() {
-		if (enabledFilters == null) {
-			enabledFilters = new HashSet();
-			Iterator filtersIterator = getAllFilters().iterator();
-			while (filtersIterator.hasNext()) {
-				MarkerFieldFilterGroup next = (MarkerFieldFilterGroup) filtersIterator
-						.next();
-				if (next.isEnabled())
-					enabledFilters.add(next);
+			if (memento != null) {
+				comparator.restore(memento);
 			}
 		}
-		return enabledFilters;
+		return comparator;
 	}
 
 	/**
@@ -464,84 +178,6 @@ public class CachedMarkerBuilder {
 	}
 
 	/**
-	 * Return the fields not being shown currently.
-	 * 
-	 * @return Object[]
-	 */
-	Object[] getHiddenFields() {
-		MarkerField[] all = getGenerator().getAllFields();
-		MarkerField[] visible = getVisibleFields();
-
-		Collection hidden = new HashSet();
-		for (int i = 0; i < all.length; i++) {
-			hidden.add(all[i]);
-		}
-		for (int i = 0; i < visible.length; i++) {
-			hidden.remove(visible[i]);
-		}
-		return hidden.toArray();
-	}
-
-	/**
-	 * Get the name of the filters preference for the receiver,
-	 * 
-	 * @return String
-	 */
-	private String getLegacyFiltersPreferenceName() {
-
-		if (viewId.equals(IPageLayout.ID_BOOKMARKS))
-			return IDEInternalPreferences.BOOKMARKS_FILTERS;
-		if (viewId.equals(IPageLayout.ID_TASK_LIST))
-			return IDEInternalPreferences.TASKS_FILTERS;
-		return IDEInternalPreferences.PROBLEMS_FILTERS;
-
-	}
-
-	/**
-	 * Get the counts of errors,warnings,infos and others in that order.
-	 * 
-	 * @return Integer[]
-	 */
-	Integer[] getMarkerCounts() {
-		if (currentMap == null)
-			return EMPTY_MARKER_COUNTS;
-		return currentMap.getMarkerCounts();
-	}
-
-	/**
-	 * Get the raw list of marker entries.
-	 * 
-	 * @return list of MarkerEntry
-	 */
-	MarkerEntry[] getMarkerEntries() {
-		if (refreshingMarkers())
-			return EMPTY_ENTRY_ARRAY;
-
-		return currentMap.toArray();
-	}
-
-	/**
-	 * Get the MarkerItem that matches marker.
-	 * 
-	 * @param marker
-	 * @return MarkerItem or <code>null<code> if it cannot be found
-	 */
-	MarkerItem getMarkerItem(IMarker marker) {
-		if (refreshingMarkers())
-			return null;
-		return currentMap.getMarkerItem(marker);
-	}
-
-	/**
-	 * Get the name for the preferences for the receiver.
-	 * 
-	 * @return String
-	 */
-	private String getMementoPreferenceName() {
-		return getClass().getName() + viewId;
-	}
-
-	/**
 	 * Return the primary sort field
 	 * 
 	 * @return MarkerField
@@ -569,7 +205,16 @@ public class CachedMarkerBuilder {
 	 * @return int
 	 */
 	int getTotalMarkerCount() {
-		MarkerSupportItem[] elements = getElements();
+		return getTotalMarkerCount(getMarkers());
+	}
+
+	/**
+	 * Return the total number of markers.
+	 * 
+	 * @return int
+	 */
+	int getTotalMarkerCount(Markers markers) {
+		MarkerSupportItem[] elements = markers.getElements();
 		if (elements.length == 0 || elements[0].isConcrete())
 			return elements.length;
 		int length = 0;
@@ -581,160 +226,23 @@ public class CachedMarkerBuilder {
 	}
 
 	/**
-	 * Return the resource listener for the builder
-	 * 
-	 * @return IResourceChangeListener
-	 */
-	private IResourceChangeListener getUpdateListener() {
-		return new IResourceChangeListener() {
-
-			/**
-			 * Returns whether or not the given even contains marker deltas for
-			 * this view.
-			 * 
-			 * @param event
-			 *            the resource change event
-			 * @return <code>true</code> if the event contains at least one
-			 *         relevant marker delta
-			 * @since 3.3
-			 */
-			private boolean hasMarkerDelta(IResourceChangeEvent event) {
-				Iterator markerTypes = generator.getMarkerTypes().iterator();
-				while (markerTypes.hasNext()) {
-					MarkerType type = (MarkerType) markerTypes.next();
-
-					if (event.findMarkerDeltas(type.getId(), true).length > 0)
-						return true;
-
-				}
-				return false;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
-			 */
-			public void resourceChanged(IResourceChangeEvent event) {
-				if (!hasMarkerDelta(event))
-					return;
-
-				if (event.getType() == IResourceChangeEvent.PRE_BUILD) {
-					preBuild();
-					return;
-				}
-
-				if (event.getType() == IResourceChangeEvent.POST_BUILD) {
-					postBuild();
-					scheduleMarkerUpdate();
-					return;
-				}
-
-				// After 30 seconds do updates anyways
-				if (progressService == null)
-					markerProcessJob.schedule(TIME_OUT);
-				else
-					progressService.schedule(markerProcessJob, TIME_OUT);
-
-			}
-
-		};
-	}
-
-	/**
-	 * Get the fields that this content generator is displaying.
-	 * 
-	 * @return {@link MarkerField}[]
-	 */
-	MarkerField[] getVisibleFields() {
-		return visibleFields;
-	}
-
-	/**
-	 * Return whether or not the receiver has markers without scheduling
-	 * anything if it doesn't.
-	 * 
-	 * @return boolean <code>true</code> if the markers have not been
-	 *         calculated.
-	 */
-	boolean hasNoMarkers() {
-		return currentMap == null;
-	}
-
-	/**
-	 * Initialize the visible fields based on the initial settings or the
-	 * contents of the {@link IMemento}
+	 * Return whether or not the receiver is building.
 	 * 
-	 * @param memento
-	 *            IMemento
-	 */
-	private void initialiseVisibleFields(IMemento memento) {
-
-		if (memento == null
-				|| memento.getChildren(TAG_COLUMN_VISIBILITY).length == 0) {
-			MarkerField[] initialFields = getGenerator().getInitialVisible();
-
-			visibleFields = new MarkerField[initialFields.length];
-			System.arraycopy(initialFields, 0, visibleFields, 0,
-					initialFields.length);
-			return;
-		}
-
-		IMemento[] visible = memento.getChildren(TAG_COLUMN_VISIBILITY);
-		Collection newVisible = new ArrayList();
-
-		MarkerField[] all = getGenerator().getAllFields();
-		Hashtable allTable = new Hashtable();
-
-		for (int i = 0; i < all.length; i++) {
-			allTable.put(all[i].getConfigurationElement().getAttribute(
-					MarkerSupportInternalUtilities.ATTRIBUTE_ID), all[i]);
-		}
-
-		for (int i = 0; i < visible.length; i++) {
-			String key = visible[i].getID();
-			if (allTable.containsKey(key)) {
-				newVisible.add(allTable.get(key));
-			}
-		}
-
-		visibleFields = new MarkerField[newVisible.size()];
-		newVisible.toArray(visibleFields);
-	}
-
-	/**
-	 * Create a preference listener for any preference updates.
+	 * @return boolean
 	 */
-	private void initializePreferenceListener() {
-		preferenceListener = new IPropertyChangeListener() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
-			 */
-			public void propertyChange(PropertyChangeEvent event) {
-				if (event.getProperty().equals(getMementoPreferenceName())) {
-					rebuildFilters();
-				}
-
-			}
-		};
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.addPropertyChangeListener(preferenceListener);
-
+	boolean isBuilding() {
+		return building|| markerListener.isReceivingChange();
 	}
 
 	/**
-	 * Return whether or not the receiver is building.
-	 * 
-	 * @return boolean
+	 * Update the flag that indicates if the markers are building/changing
 	 */
-	public boolean isBuilding() {
-		return building;
+	void setBuilding(boolean building) {
+		this.building =building;
 	}
-
+	
 	/**
-	 * Return whether or not we are showing a hierarchy,.
+	 * Return whether or not we are showing a hierarchy.
 	 * 
 	 * @return <code>true</code> if a hierarchy is being shown.
 	 */
@@ -743,187 +251,15 @@ public class CachedMarkerBuilder {
 	}
 
 	/**
-	 * Load the settings from the memento.
-	 * 
-	 * @param memento
-	 */
-	private void loadFilterSettings(IMemento memento) {
-
-		if (memento == null)
-			return;
-
-		Boolean andValue = memento.getBoolean(TAG_AND);
-		if (andValue != null)
-			setAndFilters(andValue.booleanValue());
-		IMemento children[] = memento.getChildren(TAG_GROUP_ENTRY);
-
-		for (int i = 0; i < children.length; i++) {
-			IMemento child = children[i];
-			String id = child.getString(IMemento.TAG_ID);
-			if (id == null)
-				continue;
-			if (!loadGroupWithID(child, id))
-
-				// Did not find a match must have been added by the user
-				loadUserFilter(child);
-		}
-
-	}
-
-	/**
-	 * Load the filters defined in memento string.
-	 * 
-	 * @param mementoString
-	 */
-	private void loadFiltersFrom(String mementoString) {
-		if (mementoString.equals(IPreferenceStore.STRING_DEFAULT_DEFAULT))
-			return;
-
-		try {
-			loadFilterSettings(XMLMemento.createReadRoot(new StringReader(
-					mementoString)));
-		} catch (WorkbenchException e) {
-			StatusManager.getManager().handle(e.getStatus());
-		}
-	}
-
-	/**
-	 * Load the filters preference.
-	 */
-	private void loadFiltersPreference() {
-
-		loadFiltersFrom(IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.getString(getMementoPreferenceName()));
-
-		String legacyFilters = getLegacyFiltersPreferenceName();
-		String migrationPreference = legacyFilters
-				+ MarkerSupportInternalUtilities.MIGRATE_PREFERENCE_CONSTANT;
-
-		if (IDEWorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(
-				migrationPreference))
-			return;// Already migrated
-
-		// Load any defined in a pre 3.4 workbench
-		loadLegacyFiltersFrom(IDEWorkbenchPlugin.getDefault()
-				.getPreferenceStore().getString(legacyFilters));
-
-		// Mark as migrated
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
-				migrationPreference, true);
-	}
-
-	/**
-	 * Load the group with id from the child if there is a matching system group
-	 * registered.
-	 * 
-	 * @param child
-	 * @param id
-	 * @return <code>true</code> if a matching group was found
-	 */
-	private boolean loadGroupWithID(IMemento child, String id) {
-		Iterator groups = getAllFilters().iterator();
-
-		while (groups.hasNext()) {
-			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
-					.next();
-			if (id.equals(group.getID())) {
-				group.loadSettings(child);
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Load the legacy filter into the system.
-	 * 
-	 * @param child
-	 */
-	private void loadLegacyFilter(IMemento child) {
-		MarkerFieldFilterGroup newGroup = new MarkerFieldFilterGroup(null, this);
-		newGroup.legacyLoadSettings(child);
-		getAllFilters().add(newGroup);
-
-	}
-
-	/**
-	 * Load the pre-3.4 filters.
-	 * 
-	 * @param mementoString
-	 */
-	private void loadLegacyFiltersFrom(String mementoString) {
-
-		if (mementoString.equals(IPreferenceStore.STRING_DEFAULT_DEFAULT))
-			return;
-		IMemento memento;
-		try {
-			memento = XMLMemento
-					.createReadRoot(new StringReader(mementoString));
-			restoreLegacyFilters(memento);
-		} catch (WorkbenchException e) {
-			StatusManager.getManager().handle(e.getStatus());
-			return;
-		}
-
-	}
-
-	/**
-	 * Load the user supplied filter
-	 * 
-	 * @param child
-	 */
-	private void loadUserFilter(IMemento child) {
-		MarkerFieldFilterGroup newGroup = new MarkerFieldFilterGroup(null, this);
-		newGroup.loadSettings(child);
-		getAllFilters().add(newGroup);
-	}
-
-	/**
-	 * Post build has happened. Let it all run.
-	 */
-	protected void postBuild() {
-		preBuildTime = -1;
-
-	}
-
-	/**
-	 * We are in a pre build state. Do not update until the post build happens.
-	 */
-	protected void preBuild() {
-		preBuildTime = System.currentTimeMillis();
-
-	}
-
-	/**
-	 * Rebuild the list of filters
-	 */
-	protected void rebuildFilters() {
-		filters = null;
-		enabledFilters = null;
-		scheduleMarkerUpdate();
-
-	}
-
-	/**
 	 * Refresh the sort order and categories of the receiver.
 	 * 
-	 * @param service
-	 *            The service to run the operation in.
 	 */
 	void refreshContents(IWorkbenchSiteProgressService service) {
 		try {
 			service.busyCursorWhile(new IRunnableWithProgress() {
-				/*
-				 * (non-Javadoc)
-				 * 
-				 * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
-				 */
 				public void run(IProgressMonitor monitor) {
-
-					// Let the build finish before trying to sort
-					if (refreshingMarkers())
-						return;
-					sortAndMakeCategories(monitor, currentMap);
+					SortingJob job=new SortingJob(CachedMarkerBuilder.this);
+					job.run(monitor);
 				}
 			});
 		} catch (InvocationTargetException e) {
@@ -935,91 +271,77 @@ public class CachedMarkerBuilder {
 					StatusUtil.newStatus(IStatus.ERROR,
 							e.getLocalizedMessage(), e));
 		}
-
-	}
-
-	/**
-	 * Check if the markers are still being built. If so schedule an update.
-	 * 
-	 * @return <code>true</code> if the map is empty.
-	 */
-	private boolean refreshingMarkers() {
-		if (currentMap == null) {// First time?
-			scheduleMarkerUpdate();
-			return true;
-		}
-		return building;
 	}
-
 	/**
-	 * Restore the pre-3.4 filters.
+	 * Refresh the sort order and categories of the receiver.
 	 * 
-	 * @param memento
 	 */
-	private void restoreLegacyFilters(IMemento memento) {
-
-		IMemento[] sections = null;
-		if (memento != null)
-			sections = memento.getChildren(TAG_LEGACY_FILTER_ENTRY);
-
-		for (int i = 0; i < sections.length; i++) {
-			IMemento child = sections[i];
-			String id = child.getString(IMemento.TAG_ID);
-			if (id == null)
-				continue;
-			loadLegacyFilter(child);
+	void refreshContents() {
+		SortingJob job=new SortingJob(CachedMarkerBuilder.this);
+		job.setPriority(Job.INTERACTIVE);
+		job.setSystem(true);
+		if (progressService != null) {
+			progressService.schedule(job, MarkerUpdateScheduler.SHORT_DELAY);
+		} else {
+			job.schedule(MarkerUpdateScheduler.SHORT_DELAY);
 		}
-
 	}
-
+	
+	
 	/**
 	 * Save the state of the receiver to memento
 	 * 
 	 * @param memento
-	 * @param displayedFields -
-	 *            the currently displayed fields in order
 	 */
-	void saveState(IMemento memento, MarkerField[] displayedFields) {
+	void saveState(IMemento memento) {
 		getComparator().saveState(memento);
-
 		if (categoryGroup == null)
 			memento.putString(TAG_CATEGORY_GROUP, VALUE_NONE);
 		else
 			memento.putString(TAG_CATEGORY_GROUP, getCategoryGroup().getId());
+	}
 
-		for (int i = 0; i < displayedFields.length; i++) {
-
-			memento.createChild(TAG_COLUMN_VISIBILITY, displayedFields[i]
-					.getConfigurationElement().getAttribute(
-							MarkerSupportInternalUtilities.ATTRIBUTE_ID));
+	/**
+	 * Schedule an update of the markers with a delay.
+	 * 
+	 */
+	void scheduleUpdate() {
+		if (active) {
+			scheduler.scheduleUpdate(MarkerUpdateScheduler.SHORT_DELAY,true);
 		}
 	}
-
+	
 	/**
 	 * Schedule an update of the markers with a delay.
 	 * 
 	 */
-	public void scheduleMarkerUpdate() {
-		cancelJobs();
-		currentMap = null;
-		building = true;
-		if (progressService != null) {
-			progressService.schedule(markerProcessJob, SHORT_DELAY);
-		} else {
-			markerProcessJob.schedule(SHORT_DELAY);
+	void scheduleUpdate(long delay) {
+		if (active) {
+			scheduler.scheduleUpdate(delay,true);
 		}
 	}
 
 	/**
-	 * Set whether the filters are being ANDed or ORed.
-	 * 
-	 * @param and
+	 * Returns true if updates have been scheduled and not finished,else false.
 	 */
-	void setAndFilters(boolean and) {
-		andFilters = and;
+	boolean updatesPending() {
+		if (active) {
+			return scheduler.updatesPending();
+		}
+		return false;
 	}
 
 	/**
+	 * Schedule pending updates to happen quickly.
+	 * 
+	 */
+	void speedUpPendingUpdates() {
+		if (active) {
+			scheduler.speedUpPendingUpdates();
+		}
+	}
+	
+	/**
 	 * Set the category group.
 	 * 
 	 * @param group
@@ -1031,7 +353,7 @@ public class CachedMarkerBuilder {
 			getComparator().setCategory(null);
 		else
 			getComparator().setCategory(group.getMarkerField());
-		scheduleMarkerUpdate();
+		scheduleUpdate();
 
 	}
 
@@ -1053,11 +375,15 @@ public class CachedMarkerBuilder {
 	/**
 	 * Set the generator and update the contents.
 	 * 
-	 * @param generator
+	 * @param newGenerator
 	 */
-	void setGenerator(MarkerContentGenerator generator) {
-		this.generator = generator;
-		scheduleMarkerUpdate();
+	void setGenerator(MarkerContentGenerator newGenerator) {
+		generator = newGenerator;
+		if (generator.getBuilder() != this) {
+			generator.setBuilder(this);
+		}
+		setDefaultCategoryGroup(generator);
+		scheduleUpdate();
 	}
 
 	/**
@@ -1071,6 +397,9 @@ public class CachedMarkerBuilder {
 
 	}
 
+	MarkerUpdateScheduler getUpdateScheduler(){
+		return scheduler;
+	}
 	/**
 	 * Set the progress service for the receiver.
 	 * 
@@ -1079,324 +408,317 @@ public class CachedMarkerBuilder {
 	void setProgressService(IWorkbenchSiteProgressService service) {
 		progressService = service;
 		if (service != null) {
-			service.showBusyForFamily(ResourcesPlugin.FAMILY_MANUAL_BUILD);
-			service.showBusyForFamily(ResourcesPlugin.FAMILY_AUTO_BUILD);
 			service
-					.showBusyForFamily(MarkerContentGenerator.CACHE_UPDATE_FAMILY);
+					.showBusyForFamily(ResourcesPlugin.FAMILY_MANUAL_BUILD);
+			service
+					.showBusyForFamily(ResourcesPlugin.FAMILY_AUTO_BUILD);
+			service
+					.showBusyForFamily(CACHE_UPDATE_FAMILY);
+			service
+					.showBusyForFamily(MARKERSVIEW_UPDATE_JOB_FAMILY);
 		}
-
 	}
-
 	/**
-	 * Set the updateJob for the receiver.
+	 * @return Returns the progressService.
+	 */
+	IWorkbenchSiteProgressService getProgressService() {
+		return progressService;
+	}
+	
+	/**
+	 * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
 	 * 
-	 * @param job
+	 * schedules marker update job
 	 */
-	public void setUpdateJob(Job job) {
-		updateJob = job;
-
+	MarkerUpdateJob scheduleUpdateJob(long delay) {
+		return scheduleUpdateJob(delay, false, new boolean[] { true, false,
+				false });
 	}
-
 	/**
-	 * Sort the newMarkers and build categories if required.
+	 * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
 	 * 
-	 * @param monitor
-	 * @param newMarkers
+	 * schedules marker update job
 	 */
-	void sortAndMakeCategories(IProgressMonitor monitor, MarkerMap newMarkers) {
-
-		if (newMarkers.getSize() == 0) {
-			categories = EMPTY_CATEGORY_ARRAY;
-			currentMap = newMarkers;
-			monitor.done();
-			return;
-		}
-		// Sort by Category first
-		if (isShowingHierarchy()) {
-			MarkerCategory[] markerCategories = groupIntoCategories(monitor,
-					newMarkers);
-			
-			categories=markerCategories;
-		}
+	 MarkerUpdateJob scheduleUpdateJob(long delay, boolean clean) {
+		return scheduleUpdateJob(delay, clean,new boolean[] { true, false,
+				false });
+	}
 
+	 /**
+	  * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
+	 * 
+	 * schedules marker update job
+	 */
+	MarkerUpdateJob scheduleUpdateJob(long delay, boolean clean,
+			boolean[] changeFlags) {
 		
-		monitor.worked(50);
-
-		monitor.subTask(MarkerMessages.MarkerView_queueing_updates);
-
-		if (monitor.isCanceled())
-			return;
-
-		int limit = MarkerSupportInternalUtilities.getMarkerLimit();
-		MarkerEntry[] entries=newMarkers.toArray();
-		Comparator comparator=getComparator().getFieldsComparator();
+		setBuilding(true);
+		updateChangeFlags(changeFlags);
 		
-		if (isShowingHierarchy()) {
-			for (int i = 0; i < categories.length; i++) {
-				// sort various categories
-				MarkerCategory category = categories[i];
-				int effLimit = limit;
-				int avaliable = category.end - category.start + 1;
-				if (avaliable < effLimit || limit == -1) {
-					effLimit = avaliable;
-				}
-				MarkerSortUtil.sortStartingKElement(entries, comparator,
-						category.start, category.end, effLimit);
+		synchronized (getUpdateScheduler().getSchedulingLock()) {
+			if (generator == null || !active) {
+				return null;
 			}
-		} else {
-			int effLimit = limit;
-			if (entries.length - 1 < effLimit || limit == -1) {
-				// sort all as we'll display all
-				effLimit = entries.length - 1;
+			if (updateJob != null) {
+				// ensure cancellation before calling the method
+				// updateJob.cancel();
+			} else {
+				/*
+				 * updateJob = isIncremental() ? new IncrementUpdateJob(this):
+				 * new MarkerUpdateJob(this);
+				 */
+				updateJob = new MarkerUpdateJob(this);
+				updateJob.setPriority(Job.LONG);
+				updateJob.setSystem(true);
+			}
+			if (clean) {
+				updateJob.setClean();
 			}
-			MarkerSortUtil.sortStartingKElement(entries, getComparator(),
-					effLimit);
+			if (progressService != null) {
+				progressService.schedule(updateJob, delay);
+			} else {
+				updateJob.schedule(delay);
+			}
+			return updateJob;
 		}
-
-		monitor.worked(50);
-		newMarkers.clearAttributeCaches();
-		currentMap = newMarkers;
 	}
-
+	
 	/**
-	 * SortMarkers according to groups, and Group them into categories
+	 * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
 	 * 
-	 * @param monitor
-	 * @param newMarkers
-	 * @return MarkerCategory
+	 * Cancel a scheduled update
 	 */
-  MarkerCategory[] groupIntoCategories(IProgressMonitor monitor,
-			MarkerMap newMarkers) {
-		Map boundaryInfoMap = groupMarkerEntries(newMarkers
-				.toArray(), getCategoryGroup(), newMarkers.getSize() - 1);
-		Iterator iterator = boundaryInfoMap.keySet().iterator();
-		int start = 0;
-		MarkerCategory[] markerCategories = new MarkerCategory[boundaryInfoMap
-				.size()];
-		int i = 0;
-		int end = 0;
-		while (iterator.hasNext()) {
-			Object key = iterator.next();
-			end = ((Integer) boundaryInfoMap.get(key)).intValue();
-			markerCategories[i++] = new MarkerCategory(this, start, end,
-					getCategoryGroup().getMarkerField().getValue(
-							newMarkers.elementAt(start)));
-			start = end + 1;
+	void cancelUpdate() {
+		synchronized (getUpdateScheduler().getSchedulingLock()) {
+			if (updateJob != null) {
+				updateJob.cancel();
+			}
 		}
-		return markerCategories;
 	}
-  
 	/**
-	 * Sorts/groups the markers in O(N) comparisons and returns the boundary
-	 * indices in the map. The O(N) complexity requires the use of a few data
-	 * structures. But the speed benefit is tremendous at a very small price of
-	 * few extra references.
-	 * 
-	 * @param entries
-	 * @param group
-	 * @param k
-	 * @return {@link Map}
-	 * 
+	 * @return Returns the {@link MarkersChangeListener} for the builder
 	 */
-	Map groupMarkerEntries(MarkerEntry[] entries,
-			MarkerGroup group, int k) {
-		TreeMap map = new TreeMap(group.getEntriesComparator());
-		for (int i = 0; i <= k; i++) {
-			IMarker marker = entries[i].getMarker();
-			if(marker == null || !marker.exists()) {
-				continue;//skip stale markers
-			}
-			try {
-				MarkerGroupingEntry groupingEntry = group.findGroupValue(marker
-						.getType(), marker);
-				List list = (List) map.get(groupingEntry);
-				if (list == null) {
-					list = new ArrayList();
-					map.put(groupingEntry, list);
-				}
-				list.add(entries[i]);
-			} catch (CoreException e) {
-				e.printStackTrace();
-			}
-		}
-		Iterator keys = map.keySet().iterator();
-		int i = 0;
-		while (keys.hasNext()) {
-			Object key = keys.next();
-			List list = (List) map.get(key);
-			Iterator iterator = list.iterator();
-			while (iterator.hasNext()) {
-				MarkerEntry entry = (MarkerEntry) iterator.next();
-				entries[i++] = entry;
-			}
-			map.put(key, new Integer(i - 1));
-		}
-		return map;
+	MarkersChangeListener getMarkerListener() {
+		return markerListener;
 	}
-
+	
 	/**
-	 * Add group to the enabled filters.
-	 * 
-	 * @param group
+	 * @param markerListener The {@link MarkersChangeListener} to set.
 	 */
-	void toggleFilter(MarkerFieldFilterGroup group) {
-		Collection enabled = getEnabledFilters();
-		if (enabled.remove(group)) // true if it was present
-			group.setEnabled(false);
-
-		else {
-			group.setEnabled(true);
-			enabled.add(group);
-		}
-		writeFiltersPreference();
-		scheduleMarkerUpdate();
+	void setMarkerListener(MarkersChangeListener markerListener) {
+		this.markerListener = markerListener;
 	}
 
 	/**
-	 * Update the focus resources from list. If there is an update required
-	 * return <code>true</code>. This method assumes that there are filters
-	 * on resources enabled.
-	 * 
-	 * @param elements
+	 * While gathering/building markers should we include sub-types
 	 */
-	void updateFocusElements(Object[] elements) {
-		Collection resourceCollection = new ArrayList();
-		for (int i = 0; i < elements.length; i++) {
-			if (elements[i] instanceof IResource) {
-				resourceCollection.add(elements[i]);
-			} else {
-				addResources(resourceCollection,
-						((ResourceMapping) elements[i]));
-			}
+	boolean includeMarkerSubTypes(){
+		/*
+		 * TODO: sub-types included (hard-code?): generator(actually 
+		 * {@link ContentGeneratorDescriptor#getMarkerTypes()}) would 
+		 * need changes if this is to become a variable.
+		 */
+		return true;
+	}
+	
+	/**
+	 * Lets reset the types for listen at every update, fetching them during
+	 * every delta is wasteful.
+	 */
+	void registerTypesToListener() {
+		MarkerContentGenerator generator =getGenerator();
+		if (generator == null) {
+			return;
 		}
-
-		focusResources = new IResource[resourceCollection.size()];
-		resourceCollection.toArray(focusResources);
+		getMarkerListener().listenToTypes(generator.getTypes(),
+				includeMarkerSubTypes());
+	}
+	
+	/**
+	 * @return Returns the markers.
+	 */
+	Markers getMarkers() {
+		return markers;
 	}
-
 	/**
-	 * Update the receiver for a change in selection.
+	 * Create a listener for working set changes.
 	 * 
-	 * @param newElements
+	 * @return IPropertyChangeListener
 	 */
-	void updateForNewSelection(Object[] newElements) {
-		if (updateNeeded(newElements)) {
-			updateFocusElements(newElements);
-			scheduleMarkerUpdate();
+	private IPropertyChangeListener getWorkingSetListener() {
+		if (workingSetListener == null) {
+			workingSetListener = new WorkingSetListener();
 		}
-
+		return workingSetListener;
 	}
-
+	
+	
+	
 	/**
-	 * Update the receiver from the dialog.
+	 * Get the name for the preferences for the receiver.
 	 * 
-	 * @param dialog
+	 * @return String
 	 */
-	void updateFrom(FiltersConfigurationDialog dialog) {
-		setAndFilters(dialog.andFilters());
-		filters = dialog.getFilters();
-		enabledFilters = null;
-
-		writeFiltersPreference();
-		scheduleMarkerUpdate();
+	static String getMementoPreferenceName(String viewId) {
+		return CachedMarkerBuilder.class.getName() + viewId;
+	}
 
+	/**
+	 * @return Returns true if active.
+	 */
+	boolean isActive() {
+		return active;
 	}
 
 	/**
-	 * Return whether or not the list contains a resource that will require
-	 * regeneration.
+	 * @return lastUpdateTime
 	 * 
-	 * @return boolean <code>true</code> if regeneration is required.
 	 */
-	boolean updateNeeded(Object[] newElements) {
-
-		Iterator filters = getEnabledFilters().iterator();
-
-		while (filters.hasNext()) {
-			MarkerFieldFilterGroup filter = (MarkerFieldFilterGroup) filters
-					.next();
-
-			int scope = filter.getScope();
-			if (scope == MarkerFieldFilterGroup.ON_ANY
-					|| scope == MarkerFieldFilterGroup.ON_WORKING_SET)
-				continue;
-
-			if (newElements == null || newElements.length < 1)
-				continue;
-
-			if (focusResources.length == 0)
-				return true; // We had nothing now we have something
-
-			if (Arrays.equals(focusResources, newElements))
-				continue;
-
-			if (scope == MarkerFieldFilterGroup.ON_ANY_IN_SAME_CONTAINER) {
-				Collection oldProjects = MarkerFieldFilterGroup
-						.getProjectsAsCollection(focusResources);
-				Collection newProjects = MarkerFieldFilterGroup
-						.getProjectsAsCollection(newElements);
-
-				if (oldProjects.size() == newProjects.size()
-						&& newProjects.containsAll(oldProjects))
-					continue;
-				return true;// Something must be different
-			}
-			return true;
+	long getLastUpdateTime() {
+		if (updateJob != null) {
+			return updateJob.getLastUpdateTime();
 		}
-
-		return false;
+		return -1;
 	}
 
 	/**
-	 * 
+	 * Always work with a clone where thread safety is concerned
+	 * @return the active clone of markers
 	 */
-	private void writeFiltersPreference() {
-		XMLMemento memento = XMLMemento.createWriteRoot(TAG_FILTERS_SECTION);
-
-		writeFiltersSettings(memento);
-
-		StringWriter writer = new StringWriter();
-		try {
-			memento.save(writer);
-		} catch (IOException e) {
-			IDEWorkbenchPlugin.getDefault().getLog().log(Util.errorStatus(e));
+	Markers getClonedMarkers() {
+		if(markersClone==null){
+			//this should not happen ideally,
+			//lets ensure safety anyways
+			markersClone=markers.getClone();
 		}
-
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore().putValue(
-				getMementoPreferenceName(), writer.toString());
-		IDEWorkbenchPlugin.getDefault().savePluginPreferences();
+		return markersClone;
 	}
 
 	/**
-	 * Write the settings for the filters to the memento.
+	 * Create a new clone of Markers
+	 * Returns null if markers are changing/building
+	 * @see CachedMarkerBuilder#getClonedMarkers()
+	 * and {@link #getMarkers()}
+	 */
+	 Markers createMarkersClone() {
+		 if(markers.isInChange()){
+			 return null;
+		 }
+		markersClone =markers.getClone();
+		return markersClone;
+	}
+	 
+///////	<Incremental update code>///////
+		private IncrementUpdateJob incrementJob;
+	/**
+	 * Checks whether the builder should perform incrementally Note : Incremental
+	 * updating method is NOT used and tested yet but left out for further
+	 * investigation(*).
 	 * 
-	 * @param memento
+	 * @return Returns true if we should collect markers incrementally.
 	 */
-	private void writeFiltersSettings(XMLMemento memento) {
-
-		memento.putBoolean(TAG_AND, andFilters);
-
-		Iterator groups = getAllFilters().iterator();
-		while (groups.hasNext()) {
-			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
-					.next();
-			IMemento child = memento
-					.createChild(TAG_GROUP_ENTRY, group.getID());
-			group.saveFilterSettings(child);
+	boolean isIncremental() {
+		/*
+		 * We do not update incrementally. We have 
+		 * code for further investigation(*) for this anyway.
+		 */
+		return false;
+	}
+	
+	/**
+	 * @return Returns the changeFlags {added,removed,changed}.
+	 */
+	boolean[] readChangeFlags() {
+		boolean [] changes=new boolean[changeFlags.length];
+		for (int i = 0; i < changes.length; i++) {
+			changes[i]=changeFlags[i];
+			changeFlags[i]=false;
 		}
-
+		return changes;
 	}
 
 	/**
-	 * Set the visible fields.
+	 * @param changeFlags
 	 * 
-	 * @param visible
 	 */
-	void setVisibleFields(Collection visible) {
-
-		MarkerField[] newFields = new MarkerField[visible.size()];
-		visible.toArray(newFields);
-		visibleFields = newFields;
+	void updateChangeFlags(boolean[] changeFlags) {
+		for (int i = 0; i < changeFlags.length; i++) {
+			this.changeFlags[i]=this.changeFlags[i]|changeFlags[i];
+		}
+	}
 
+	/**
+	 * Handles an incremental update
+	 * @param update
+	 */
+	void incrementalUpdate(MarkerUpdate update) {
+		synchronized (getUpdateScheduler().getSchedulingLock()) {
+			if (incrementJob == null) {
+				scheduleUpdateJob(MarkerUpdateScheduler.SHORT_DELAY, true);
+			}
+		}
+		incrementJob.addUpdate(update);
+	}
+///////	</Incremental update code>///////
+	
+///helpers//
+	
+	/**
+	 * The WorkingSet listener, since marker filters can be scoped to
+	 * workingsets; listen for changes to them.
+	 *
+	 */
+	private class WorkingSetListener implements IPropertyChangeListener{
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.util.IPropertyChangeListener#propertyChange
+		 * (org.eclipse.jface.util.PropertyChangeEvent)
+		 */
+		public void propertyChange(PropertyChangeEvent event) {
+			boolean needsUpdate=false;
+			if (event
+					.getProperty()
+					.equals(
+							IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE)) {
+				Iterator iterator = generator.getEnabledFilters()
+						.iterator();
+				while (iterator.hasNext()) {
+					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) iterator
+							.next();
+					if (group.getScope() == MarkerFieldFilterGroup.ON_WORKING_SET) {
+						IWorkingSet wSet = group.getWorkingSet();
+						if (wSet!=null&&wSet.equals(event.getNewValue())) {
+							group.refresh();
+							needsUpdate=true;
+						}
+					}
+				}
+			}
+			if (event.getProperty().equals(
+					IWorkingSetManager.CHANGE_WORKING_SET_REMOVE)) {
+				Iterator iterator = generator.getAllFilters().iterator();
+				while (iterator.hasNext()) {
+					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) iterator
+							.next();
+					if (group.getScope() == MarkerFieldFilterGroup.ON_WORKING_SET) {
+						IWorkingSet wSet = group.getWorkingSet();
+						if (wSet!=null && wSet.equals(event.getOldValue())) {
+							group.setWorkingSet(null);// working set
+							group.refresh();
+							needsUpdate=true;
+						}
+					}
+				}
+			}
+			if (needsUpdate) {
+				scheduleUpdate();
+			}
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CompatibilityMarkerFieldFilterGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CompatibilityMarkerFieldFilterGroup.java
index 4909731..8ed3eaa 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CompatibilityMarkerFieldFilterGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/CompatibilityMarkerFieldFilterGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ public class CompatibilityMarkerFieldFilterGroup extends MarkerFieldFilterGroup
 	 * @param cachedMarkerBuilder
 	 */
 	public CompatibilityMarkerFieldFilterGroup(ProblemFilter filter,
-			CachedMarkerBuilder cachedMarkerBuilder) {
-		super(null, cachedMarkerBuilder);
+			MarkerContentGenerator generator) {
+		super(null, generator);
 		problemFilter = filter;
 		setEnabled(filter.isEnabled());
 		setScope(filter.getOnResource());
@@ -73,7 +73,7 @@ public class CompatibilityMarkerFieldFilterGroup extends MarkerFieldFilterGroup
 	MarkerFieldFilterGroup makeWorkingCopy() {
 
 		CompatibilityMarkerFieldFilterGroup clone = new CompatibilityMarkerFieldFilterGroup(
-				this.problemFilter, this.builder);
+				this.problemFilter, this.generator);
 		if (populateClone(clone))
 			return clone;
 		return null;
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeltaMarkerEntry.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeltaMarkerEntry.java
new file mode 100644
index 0000000..9cc5dbd
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/DeltaMarkerEntry.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.views.markers.MarkerViewUtil;
+import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
+
+import com.ibm.icu.text.CollationKey;
+
+/**
+ * The DeltaMarkerEntry is the class that wraps an {@link IMarkerDelta} for testing.
+
+ * 
+ * @since 3.6
+ * 
+ */
+class DeltaMarkerEntry extends MarkerEntry {
+
+	private IMarkerDelta markerDelta;
+
+	/**
+	 * Create a new instance of the receiver.
+	 * @param markerDelta 
+	 * 
+	 */
+	public DeltaMarkerEntry(IMarkerDelta markerDelta) {
+		super(markerDelta.getMarker());
+		this.markerDelta=markerDelta;
+	}
+
+	Object getAttributeValue(String attribute) {
+		Object value = getCache().get(attribute);
+		if(value == null) {
+			value = markerDelta.getAttribute(attribute);
+			if(value != null) {
+				getCache().put(attribute, value);
+			}
+		}
+		if (value instanceof CollationKey)
+			return ((CollationKey) value).getSourceString();
+		return value;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getCreationTime()
+	 */
+	long getCreationTime() {
+			//return markerDelta.getCreationTime();
+			return super.getCreationTime();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getID()
+	 */
+	long getID() {
+		return markerDelta.getId();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getMarkerTypeName()
+	 */
+	String getMarkerTypeName() {
+		return MarkerTypesModel.getInstance().getType(markerDelta.getType())
+				.getLabel();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.views.markers.MarkerItem#getPath()
+	 */
+	public String getPath() {
+		String folder = getAttributeValue(MarkerViewUtil.PATH_ATTRIBUTE, null);
+		if (folder != null) {
+			return folder;
+		}
+		IPath path = markerDelta.getResource().getFullPath();
+		int n = path.segmentCount() - 1; // n is the number of segments
+		// in container, not path
+		if (n <= 0) {
+			return super.getPath();
+		}
+		folder = path.removeLastSegments(1).removeTrailingSeparator()
+				.toString();
+		getCache().put(MarkerViewUtil.PATH_ATTRIBUTE, folder);
+		return folder;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
index 9d13edb..f302bc6 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,36 +19,26 @@ import java.util.List;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.mapping.ResourceMapping;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.help.IContext;
 import org.eclipse.help.IContextProvider;
 import org.eclipse.jface.action.ContributionManager;
 import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.OpenStrategy;
-import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ColumnPixelData;
 import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILazyTreeContentProvider;
 import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ITreeViewerListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TreeExpansionEvent;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.TreeViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.SameShellProvider;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
@@ -72,8 +62,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.ScrollBar;
-import org.eclipse.swt.widgets.Scrollable;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeColumn;
 import org.eclipse.ui.IEditorInput;
@@ -91,22 +79,19 @@ import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.ide.ResourceUtil;
-import org.eclipse.ui.internal.ide.IDEInternalPreferences;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.StatusUtil;
 import org.eclipse.ui.menus.IMenuService;
 import org.eclipse.ui.part.MarkerTransfer;
 import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.progress.WorkbenchJob;
 import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.views.markers.MarkerField;
 import org.eclipse.ui.views.markers.MarkerItem;
+import org.eclipse.ui.views.markers.internal.ContentGeneratorDescriptor;
 import org.eclipse.ui.views.markers.internal.MarkerGroup;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
-import org.eclipse.ui.views.tasklist.ITaskListResourceAdapter;
-import org.osgi.framework.Bundle;
 
 import com.ibm.icu.text.MessageFormat;
 
@@ -128,50 +113,14 @@ import com.ibm.icu.text.MessageFormat;
 public class ExtendedMarkersView extends ViewPart {
 
 	/**
-	 * MarkerSelectionEntry is a cache of the values for a marker entry.
-	 * 
-	 * @since 3.4
-	 * 
+	 * The Markers View Update Job Family
+	 * @since 3.6
 	 */
-	final class MarkerSelectionEntry {
-
-		Object[] cachedValues;
-
-		MarkerSelectionEntry(MarkerItem item) {
-			MarkerField[] fields = builder.getVisibleFields();
-			cachedValues = new Object[fields.length];
-			for (int i = 0; i < fields.length; i++) {
-				cachedValues[i] = fields[i].getValue(item);
-			}
-		}
-
-		/**
-		 * Return whether or not the entry is equivalent to the cached state.
-		 * 
-		 * @param item
-		 * @return boolean <code>true</code> if they are equivalent
-		 */
-		boolean isEquivalentTo(MarkerItem item) {
-			MarkerField[] fields = builder.getVisibleFields();
-
-			if (cachedValues.length != fields.length)
-				return false;
-
-			for (int i = 0; i < fields.length; i++) {
-				if (cachedValues[i] == fields[i].getValue(item))
-					continue;
-				return false;
-			}
-			return true;
-		}
-
-	}
+	public final Object MARKERSVIEW_UPDATE_JOB_FAMILY = new Object();
 
 	private static int instanceCount = 1;
-
 	private static final String TAG_GENERATOR = "markerContentGenerator"; //$NON-NLS-1$
-	private static final String TAG_HORIZONTAL_POSITION = "horizontalPosition"; //$NON-NLS-1$
-	private static final String TAG_VERTICAL_POSITION = "verticalPosition"; //$NON-NLS-1$
+
 	private static final String MARKER_FIELD = "MARKER_FIELD"; //$NON-NLS-1$
 
 	private static final String TAG_EXPANDED = "expanded"; //$NON-NLS-1$
@@ -181,118 +130,22 @@ public class ExtendedMarkersView extends ViewPart {
 	private static final String TAG_PART_NAME = "partName"; //$NON-NLS-1$
 
 	private static final String TAG_COLUMN_WIDTHS = "columnWidths"; //$NON-NLS-1$
-	static {
-		Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang
-			 * .Object, java.lang.Class)
-			 */
-			public Object getAdapter(Object adaptableObject, Class adapterType) {
-				if (adapterType == IMarker.class
-						&& adaptableObject instanceof MarkerEntry)
-					return ((MarkerEntry) adaptableObject).getMarker();
-
-				return null;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
-			 */
-			public Class[] getAdapterList() {
-				return new Class[] { IMarker.class };
-			}
-		}, MarkerEntry.class);
-	}
-
-	/**
-	 * Return the next secondary id that has not been opened for a primary id of
-	 * a part.
-	 * 
-	 * @return part
-	 */
-	static String newSecondaryID(IViewPart part) {
-		while (part.getSite().getPage().findViewReference(
-				part.getSite().getId(), String.valueOf(instanceCount)) != null) {
-			instanceCount++;
-		}
-
-		return String.valueOf(instanceCount);
-	}
-
-	/**
-	 * Open the supplied marker in an editor in page
-	 * 
-	 * @param marker
-	 * @param page
-	 */
-	public static void openMarkerInEditor(IMarker marker, IWorkbenchPage page) {
-		// optimization: if the active editor has the same input as
-		// the
-		// selected marker then
-		// RevealMarkerAction would have been run and we only need
-		// to
-		// activate the editor
-		IEditorPart editor = page.getActiveEditor();
-		if (editor != null) {
-			IEditorInput input = editor.getEditorInput();
-			IFile file = ResourceUtil.getFile(input);
-			if (file != null) {
-				if (marker.getResource().equals(file) && OpenStrategy.activateOnOpen()) {
-					page.activate(editor);
-				}
-			}
-		}
-
-		if (marker != null && marker.getResource() instanceof IFile) {
-			try {
-				IDE.openEditor(page, marker, OpenStrategy.activateOnOpen());
-			} catch (PartInitException e) {
-
-				// Check for a nested CoreException
-				IStatus status = e.getStatus();
-				if (status != null
-						&& status.getException() instanceof CoreException) {
-					status = ((CoreException) status.getException())
-							.getStatus();
-				}
-
-				if (status == null)
-					StatusManager.getManager().handle(
-							StatusUtil.newStatus(IStatus.ERROR, e.getMessage(),
-									e), StatusManager.SHOW);
-
-				else
-					StatusManager.getManager().handle(status,
-							StatusManager.SHOW);
-
-			}
-		}
-	}
 
+	private MarkerContentGenerator generator;
 	private CachedMarkerBuilder builder;
-	Collection categoriesToExpand;
-
-	private Clipboard clipboard;
-
-	Collection preservedSelection = new ArrayList();
-
-	private Job updateJob;
+	private Collection categoriesToExpand;
 
+	private UIUpdateJob uiUpdateJob;
+	
 	private MarkersTreeViewer viewer;
-	private IPropertyChangeListener preferenceListener;
 	private ISelectionListener pageSelectionListener;
 	private IPartListener2 partListener;
-	private IMemento memento;
+	private Clipboard clipboard;
 
-	private String[] defaultGeneratorIds = new String[0];
+	// private IPropertyChangeListener preferenceListener;
 
-	private IPropertyChangeListener workingSetListener;
+	private IMemento memento;
+	private String[] defaultGeneratorIds = new String[0];
 
 	/**
 	 * Return a new instance of the receiver.
@@ -303,30 +156,31 @@ public class ExtendedMarkersView extends ViewPart {
 	public ExtendedMarkersView(String contentGeneratorId) {
 		super();
 		defaultGeneratorIds = new String[] { contentGeneratorId };
-		preferenceListener = new IPropertyChangeListener() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.util.IPropertyChangeListener#propertyChange
-			 * (org.eclipse.jface.util.PropertyChangeEvent)
-			 */
-			public void propertyChange(PropertyChangeEvent event) {
-				String propertyName = event.getProperty();
-				if (propertyName
-						.equals(IDEInternalPreferences.USE_MARKER_LIMITS)
-						|| propertyName
-								.equals(IDEInternalPreferences.MARKER_LIMITS_VALUE)) {
-					viewer.refresh();
-					updateTitle();
-				}
-			}
-		};
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.addPropertyChangeListener(preferenceListener);
 	}
 
 	/**
+	 * Create a preference listener for any preference updates.
+	 */ 
+	// TODO: this is not needed as the preference dialog will refresh anyway
+//	private void initializePreferenceListener() {
+//		preferenceListener = new IPropertyChangeListener() {
+//			public void propertyChange(PropertyChangeEvent event) {
+//				String propertyName = event.getProperty();
+//				if (propertyName
+//						.equals(IDEInternalPreferences.USE_MARKER_LIMITS)
+//						|| propertyName
+//								.equals(IDEInternalPreferences.MARKER_LIMITS_VALUE)) {
+//					viewer.refresh();
+//					updateTitle();
+//				}
+//			}
+//		};
+//		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
+//				.addPropertyChangeListener(preferenceListener);
+//	}
+	
+
+	/**
 	 * Add all concrete {@link MarkerSupportItem} elements associated with the
 	 * receiver to allMarkers.
 	 * 
@@ -378,6 +232,22 @@ public class ExtendedMarkersView extends ViewPart {
 	/**
 	 * Create the columns for the receiver.
 	 * 
+	 * @param parent
+	 */
+	private void createViewer(Composite parent) {
+		parent.setLayout(new FillLayout());
+
+		viewer = new MarkersTreeViewer(new Tree(parent, SWT.H_SCROLL
+				/*| SWT.VIRTUAL */| SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION));
+		viewer.getTree().setLinesVisible(true);
+		viewer.setUseHashlookup(true);
+		createColumns(new TreeColumn[0]);
+		viewer.setContentProvider(getContentProvider());
+	}
+
+	/**
+	 * Create the columns for the receiver.
+	 * 
 	 * @param currentColumns
 	 *            the columns to refresh
 	 */
@@ -386,7 +256,7 @@ public class ExtendedMarkersView extends ViewPart {
 		Tree tree = viewer.getTree();
 		TableLayout layout = new TableLayout();
 
-		MarkerField[] fields = builder.getVisibleFields();
+		MarkerField[] fields = generator.getVisibleFields();
 
 		IMemento columnWidths = null;
 		if (memento != null)
@@ -474,51 +344,50 @@ public class ExtendedMarkersView extends ViewPart {
 	 * .Composite)
 	 */
 	public void createPartControl(Composite parent) {
-		parent.setLayout(new FillLayout());
 
-		viewer = new MarkersTreeViewer(new Tree(parent, SWT.H_SCROLL
-				| SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION));
-		viewer.getTree().setLinesVisible(true);
-		viewer.setUseHashlookup(true);
+		createViewer(parent);
 
-		//clear the caches for performance reasons.
-		viewer.addTreeListener(new ITreeViewerListener(){
-			public void treeCollapsed(TreeExpansionEvent event) {
-				
-			}
-			public void treeExpanded(TreeExpansionEvent event) {
-				/*
-				 * This is a good opportunity to clear caches 
-				 * that might have been created in updating UI.
-				 */
-				MarkerSupportItem item=(MarkerSupportItem) event.getElement();
-				item.clearCache();
-		}});
-		
-		createColumns(new TreeColumn[0]);
+		addPageAndPartSelectionListener();
+
+		addLinkWithEditorSupport();
+
+		addExpansionListener();
+
+		addHelpListener();
+
+		addSelectionListener();
+
+		registerContextMenu();
+
+		initDragAndDrop();
 
-		viewer.setContentProvider(getContentProvider());
 		getSite().setSelectionProvider(viewer);
 
-		viewer.setInput(builder);
-		if (memento != null) {
-			Scrollable scrollable = (Scrollable) viewer.getControl();
-			ScrollBar bar = scrollable.getVerticalBar();
-			if (bar != null) {
-				Integer position = memento.getInteger(TAG_VERTICAL_POSITION);
-				if (position != null)
-					bar.setSelection(position.intValue());
-			}
-			bar = scrollable.getHorizontalBar();
-			if (bar != null) {
-				Integer position = memento.getInteger(TAG_HORIZONTAL_POSITION);
-				if (position != null)
-					bar.setSelection(position.intValue());
-			}
+		startView();
+
+	}
+
+	/**
+	 * 
+	 */
+	private void startView() {
+		viewer.setInput(builder.getMarkers());
+		//always use a clone for Thread safety
+		IContentProvider contentProvider = viewer.getContentProvider();
+		Markers clone = createViewerInputClone();
+		if (clone == null) {
+			clone = builder.getMarkers().getClone();
 		}
+		contentProvider.inputChanged(viewer, getViewerInput(), clone);
+		builder.start();
+	}
 
+	/**
+	 * 
+	 */
+	private void addPageAndPartSelectionListener() {
 		// Initialise any selection based filtering
-		pageSelectionListener = getPageSelectionListener();
+		pageSelectionListener = new ViewerPageSelectionListener(this);
 		getSite().getPage().addPostSelectionListener(pageSelectionListener);
 
 		partListener = getPartListener();
@@ -526,49 +395,52 @@ public class ExtendedMarkersView extends ViewPart {
 
 		pageSelectionListener.selectionChanged(getSite().getPage()
 				.getActivePart(), getSite().getPage().getSelection());
+	}
 
-
-		new OpenAndLinkWithEditorHelper(viewer) {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#activate(org.eclipse.jface.viewers.ISelection
-			 * )
-			 */
-			protected void activate(ISelection selection) {
-				final int currentMode = OpenStrategy.getOpenMethod();
-				try {
-					OpenStrategy.setOpenMethod(OpenStrategy.DOUBLE_CLICK);
-					openSelectedMarkers();
-				} finally {
-					OpenStrategy.setOpenMethod(currentMode);
+	/**
+	 * 
+	 */
+	private void addSelectionListener() {
+		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				ISelection selection = event.getSelection();
+				if (selection instanceof IStructuredSelection){
+					updateStatusLine((IStructuredSelection)selection);
 				}
 			}
+		});
+	}
 
+	/**
+	 * 
+	 */
+	private void addHelpListener() {
+		// Set help on the view itself
+		viewer.getControl().addHelpListener(new HelpListener() {
 			/*
 			 * (non-Javadoc)
 			 * 
 			 * @see
-			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#linkToEditor(org.eclipse.jface.viewers
-			 * .ISelection)
+			 * org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse
+			 * .swt.events.HelpEvent)
 			 */
-			protected void linkToEditor(ISelection selection) {
-				// Not supported by this part
-			}
+			public void helpRequested(HelpEvent e) {
+				Object provider = getAdapter(IContextProvider.class);
+				if (provider == null)
+					return;
 
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#open(org.eclipse.jface.viewers.ISelection,
-			 * boolean)
-			 */
-			protected void open(ISelection selection, boolean activate) {
-				openSelectedMarkers();
+				IContext context = ((IContextProvider) provider)
+						.getContext(viewer.getControl());
+				PlatformUI.getWorkbench().getHelpSystem().displayHelp(context);
 			}
-		};
 
+		});
+	}
+
+	/**
+	 * 
+	 */
+	private void addExpansionListener() {
 		viewer.getTree().addTreeListener(new TreeAdapter() {
 			/*
 			 * (non-Javadoc)
@@ -592,58 +464,59 @@ public class ExtendedMarkersView extends ViewPart {
 				addExpandedCategory((MarkerCategory) e.item.getData());
 			}
 		});
+	}
 
-		// Set help on the view itself
-		viewer.getControl().addHelpListener(new HelpListener() {
+	/**
+	 * 
+	 */
+	private void addLinkWithEditorSupport() {
+		new OpenAndLinkWithEditorHelper(viewer) {
 			/*
 			 * (non-Javadoc)
 			 * 
 			 * @see
-			 * org.eclipse.swt.events.HelpListener#helpRequested(org.eclipse
-			 * .swt.events.HelpEvent)
+			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#activate(org.eclipse
+			 * .jface.viewers.ISelection )
 			 */
-			public void helpRequested(HelpEvent e) {
-				Object provider = getAdapter(IContextProvider.class);
-				if (provider == null)
-					return;
-
-				IContext context = ((IContextProvider) provider)
-						.getContext(viewer.getControl());
-				PlatformUI.getWorkbench().getHelpSystem().displayHelp(context);
+			protected void activate(ISelection selection) {
+				final int currentMode = OpenStrategy.getOpenMethod();
+				try {
+					OpenStrategy.setOpenMethod(OpenStrategy.DOUBLE_CLICK);
+					openSelectedMarkers();
+				} finally {
+					OpenStrategy.setOpenMethod(currentMode);
+				}
 			}
 
-		});
-
-		viewer.getTree().addSelectionListener(new SelectionAdapter() {
 			/*
 			 * (non-Javadoc)
 			 * 
 			 * @see
-			 * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
-			 * .swt.events.SelectionEvent)
+			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#linkToEditor(org.eclipse
+			 * .jface.viewers .ISelection)
 			 */
-			public void widgetSelected(SelectionEvent e) {
-				ISelection selection = viewer.getSelection();
-				if (selection instanceof IStructuredSelection)
-					updateStatusLine((IStructuredSelection) viewer
-							.getSelection());
+			protected void linkToEditor(ISelection selection) {
+				// Not supported by this part
 			}
-		});
-
-		PlatformUI.getWorkbench().getWorkingSetManager()
-				.addPropertyChangeListener(getWorkingSetListener());
-
-		registerContextMenu();
-		initDragAndDrop();
 
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.OpenAndLinkWithEditorHelper#open(org.eclipse.jface
+			 * .viewers.ISelection, boolean)
+			 */
+			protected void open(ISelection selection, boolean activate) {
+				openSelectedMarkers();
+			}
+		};
 	}
 
 	/**
 	 * Turn off all filters in the builder.
 	 */
 	void disableAllFilters() {
-		builder.disableAllFilters();
-
+		generator.disableAllFilters();
 	}
 
 	/*
@@ -652,18 +525,24 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @see org.eclipse.ui.part.WorkbenchPart#dispose()
 	 */
 	public void dispose() {
-		super.dispose();
+		builder.cancelUpdate();
+		cancelQueuedUpdates();
+		
 		builder.dispose();
-		updateJob.cancel();
-		instanceCount--;
+		generator.dispose();
+		if (instanceCount > 1)
+			instanceCount--;
 		if (clipboard != null)
 			clipboard.dispose();
-		IDEWorkbenchPlugin.getDefault().getPreferenceStore()
-				.removePropertyChangeListener(preferenceListener);
+
+		/*
+		 * IDEWorkbenchPlugin.getDefault().getPreferenceStore()
+		 * .removePropertyChangeListener(preferenceListener);
+		 */
+
 		getSite().getPage().removePostSelectionListener(pageSelectionListener);
 		getSite().getPage().removePartListener(partListener);
-		PlatformUI.getWorkbench().getWorkingSetManager()
-				.removePropertyChangeListener(workingSetListener);
+		super.dispose();
 	}
 
 	/**
@@ -673,7 +552,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	MarkerSupportItem[] getAllConcreteItems() {
 
-		MarkerSupportItem[] elements = builder.getElements();
+		MarkerSupportItem[] elements =getActiveViewerInputClone().getElements();
 		Collection allMarkers = new ArrayList();
 		for (int i = 0; i < elements.length; i++) {
 			addAllConcreteItems(elements[i], allMarkers);
@@ -690,7 +569,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return Collection of {@link MarkerFieldFilterGroup}
 	 */
 	Collection getAllFilters() {
-		return builder.getAllFilters();
+		return generator.getAllFilters();
 	}
 
 	/**
@@ -700,7 +579,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	IMarker[] getAllMarkers() {
 
-		MarkerSupportItem[] elements = builder.getElements();
+		MarkerSupportItem[] elements =getActiveViewerInputClone().getElements();
 		Collection allMarkers = new ArrayList();
 		for (int i = 0; i < elements.length; i++) {
 			addMarkers(elements[i], allMarkers);
@@ -726,7 +605,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 * 
 	 * @return Collection of MarkerCategory.
 	 */
-	private Collection getCategoriesToExpand() {
+	Collection getCategoriesToExpand() {
 		if (categoriesToExpand == null) {
 			categoriesToExpand = new HashSet();
 			if (this.memento != null) {
@@ -734,7 +613,7 @@ public class ExtendedMarkersView extends ViewPart {
 				if (expanded != null) {
 					IMemento[] mementoCategories = expanded
 							.getChildren(TAG_CATEGORY);
-					MarkerCategory[] markerCategories = builder.getCategories();
+					MarkerCategory[] markerCategories =getActiveViewerInputClone().getCategories();
 					if (markerCategories != null) {
 						for (int i = 0; i < markerCategories.length; i++) {
 							for (int j = 0; j < mementoCategories.length; j++) {
@@ -777,150 +656,8 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return ITreeContentProvider
 	 * 
 	 */
-	private ITreeContentProvider getContentProvider() {
-		return new ITreeContentProvider() {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-			 */
-			public void dispose() {
-
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ILazyTreeContentProvider#updateChildCount
-			 * (java.lang.Object, int)
-			 */
-			// public void updateChildCount(Object element, int
-			// currentChildCount) {
-			//
-			// int length;
-			// if (element instanceof MarkerItem)
-			// length = ((MarkerItem) element).getChildren().length;
-			// else
-			// // If it is not a MarkerItem it is the root
-			// length = ((CachedMarkerBuilder) element).getElements().length;
-			//
-			// int markerLimit = MarkerSupportInternalUtilities
-			// .getMarkerLimit();
-			// length = markerLimit > 0 ? Math.min(length, markerLimit)
-			// : length;
-			// if (currentChildCount == length)
-			// return;
-			// viewer.setChildCount(element, length);
-			//
-			// }
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ILazyTreeContentProvider#updateElement
-			 * (java.lang.Object, int)
-			 */
-			// public void updateElement(Object parent, int index) {
-			// MarkerItem newItem;
-			//
-			// if (parent instanceof MarkerItem)
-			// newItem = ((MarkerItem) parent).getChildren()[index];
-			// else
-			// newItem = ((CachedMarkerBuilder) parent).getElements()[index];
-			//
-			// viewer.replace(parent, index, newItem);
-			// updateChildCount(newItem, -1);
-			//
-			// if (!newItem.isConcrete()
-			// && categoriesToExpand
-			// .contains(((MarkerCategory) newItem).getName())) {
-			// viewer.expandToLevel(newItem, 1);
-			// categoriesToExpand.remove(newItem);
-			// }
-			//
-			// }
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java
-			 * .lang.Object)
-			 */
-			public Object[] getChildren(Object parentElement) {
-				MarkerSupportItem[] children = ((MarkerSupportItem) parentElement)
-						.getChildren();
-
-				return getLimitedChildren(children);
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements
-			 * (java.lang.Object)
-			 */
-			public Object[] getElements(Object inputElement) {
-
-				return getLimitedChildren(((CachedMarkerBuilder) inputElement)
-						.getElements());
-			}
-
-			/**
-			 * Get the children limited by the marker limits.
-			 * 
-			 * @param children
-			 * @return Object[]
-			 */
-			private Object[] getLimitedChildren(Object[] children) {
-				int newLength = MarkerSupportInternalUtilities.getMarkerLimit();
-				if (newLength > 0 && newLength < children.length) {
-					Object[] newChildren = new Object[newLength];
-					System.arraycopy(children, 0, newChildren, 0, newLength);
-					return newChildren;
-				}
-				return children;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ILazyTreeContentProvider#getParent(
-			 * java.lang.Object)
-			 */
-			public Object getParent(Object element) {
-				Object parent = ((MarkerSupportItem) element).getParent();
-				if (parent == null)
-					return builder;
-				return parent;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java
-			 * .lang.Object)
-			 */
-			public boolean hasChildren(Object element) {
-				return ((MarkerSupportItem) element).getChildren().length > 0;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse
-			 * .jface.viewers.Viewer, java.lang.Object, java.lang.Object)
-			 */
-			public void inputChanged(Viewer viewer, Object oldInput,
-					Object newInput) {
-
-			}
-		};
+	private IContentProvider getContentProvider() {
+		return new MarkerViewerContentProvider();
 	}
 
 	/**
@@ -968,110 +705,6 @@ public class ExtendedMarkersView extends ViewPart {
 	}
 
 	/**
-	 * Return the selection listener for the page selection change.
-	 * 
-	 * @return ISelectionListener
-	 */
-	private ISelectionListener getPageSelectionListener() {
-		return new ISelectionListener() {
-			/**
-			 * Get an ITaskListResourceAdapter for use by the default/
-			 * 
-			 * @return ITaskListResourceAdapter
-			 */
-			private ITaskListResourceAdapter getDefaultTaskListAdapter() {
-				return new ITaskListResourceAdapter() {
-
-					/*
-					 * (non-Javadoc)
-					 * 
-					 * @see
-					 * org.eclipse.ui.views.tasklist.ITaskListResourceAdapter
-					 * #getAffectedResource(org.eclipse.core.runtime.IAdaptable)
-					 */
-					public IResource getAffectedResource(IAdaptable adaptable) {
-						Object resource = adaptable.getAdapter(IResource.class);
-						if (resource == null)
-							resource = adaptable.getAdapter(IFile.class);
-						if (resource == null)
-							return null;
-						return (IResource) resource;
-
-					}
-
-				};
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse
-			 * .ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection)
-			 */
-			public void selectionChanged(IWorkbenchPart part,
-					ISelection selection) {
-
-				// Do not respond to our own selections or if we are not
-				// visible
-				if (part == ExtendedMarkersView.this
-						|| !(getSite().getPage().isPartVisible(part)))
-					return;
-
-				List selectedElements = new ArrayList();
-				if (part instanceof IEditorPart) {
-					IEditorPart editor = (IEditorPart) part;
-					IFile file = ResourceUtil.getFile(editor.getEditorInput());
-					if (file == null) {
-						IEditorInput editorInput = editor.getEditorInput();
-						if (editorInput != null) {
-							Object mapping = editorInput
-									.getAdapter(ResourceMapping.class);
-							if (mapping != null) {
-								selectedElements.add(mapping);
-							}
-						}
-					} else {
-						selectedElements.add(file);
-					}
-				} else {
-					if (selection instanceof IStructuredSelection) {
-						for (Iterator iterator = ((IStructuredSelection) selection)
-								.iterator(); iterator.hasNext();) {
-							Object object = iterator.next();
-							if (object instanceof IAdaptable) {
-								ITaskListResourceAdapter taskListResourceAdapter;
-								Object adapter = ((IAdaptable) object)
-										.getAdapter(ITaskListResourceAdapter.class);
-								if (adapter != null
-										&& adapter instanceof ITaskListResourceAdapter) {
-									taskListResourceAdapter = (ITaskListResourceAdapter) adapter;
-								} else {
-									taskListResourceAdapter = getDefaultTaskListAdapter();
-								}
-
-								IResource resource = taskListResourceAdapter
-										.getAffectedResource((IAdaptable) object);
-								if (resource == null) {
-									Object mapping = ((IAdaptable) object)
-											.getAdapter(ResourceMapping.class);
-									if (mapping != null) {
-										selectedElements.add(mapping);
-									}
-								} else {
-									selectedElements.add(resource);
-								}
-							}
-						}
-					}
-				}
-				builder.updateForNewSelection(selectedElements.toArray());
-			}
-
-		};
-	}
-
-	/**
 	 * Return a part listener for the receiver.
 	 * 
 	 * @return IPartListener2
@@ -1087,7 +720,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partActivated(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1099,7 +731,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partBroughtToTop(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1110,7 +741,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partClosed(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1122,7 +752,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partDeactivated(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1133,7 +762,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partHidden(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1145,7 +773,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partInputChanged(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1156,7 +783,6 @@ public class ExtendedMarkersView extends ViewPart {
 			 */
 			public void partOpened(IWorkbenchPartReference partRef) {
 				// Do nothing by default
-
 			}
 
 			/*
@@ -1175,19 +801,9 @@ public class ExtendedMarkersView extends ViewPart {
 
 			}
 
-		};
-	}
-
-	/**
-	 * Return the help context for the view
-	 * 
-	 * @return contextId of the view
-	 */
-	
-	String getStaticContextId() {
-		return PlatformUI.PLUGIN_ID + ".markers_view_context";//$NON-NLS-1$
+		};
 	}
-	
+
 	/**
 	 * Return all of the markers in the current selection
 	 * 
@@ -1229,11 +845,11 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return String
 	 */
 	private String getStatusMessage() {
-
+		Markers markers=getActiveViewerInputClone();
 		String status = MarkerSupportInternalUtilities.EMPTY_STRING;
-		int totalCount = builder.getTotalMarkerCount();
+		int totalCount = builder.getTotalMarkerCount(markers);
 		int filteredCount = 0;
-		MarkerSupportItem[] categories = builder.getCategories();
+		MarkerSupportItem[] categories = markers.getCategories();
 		// Categories might be null if building is still happening
 		if (categories != null && builder.isShowingHierarchy()) {
 			int markerLimit = MarkerSupportInternalUtilities.getMarkerLimit();
@@ -1247,7 +863,7 @@ public class ExtendedMarkersView extends ViewPart {
 			filteredCount = MarkerSupportInternalUtilities.getMarkerLimit();
 		}
 
-		Integer[] counts = builder.getMarkerCounts();
+		Integer[] counts = markers.getMarkerCounts();
 
 		// Any errors or warnings? If not then send the filtering message
 		if (counts[0].intValue() == 0 && counts[1].intValue() == 0) {
@@ -1261,7 +877,7 @@ public class ExtendedMarkersView extends ViewPart {
 			return status;
 		}
 		// combine counts for infos and others
-		counts = new Integer[] { counts[0], counts[1], 
+		counts = new Integer[] { counts[0], counts[1],
 				new Integer(counts[2].intValue() + counts[3].intValue()) };
 		if (filteredCount < 0 || filteredCount >= totalCount)
 			return MessageFormat.format(
@@ -1279,164 +895,43 @@ public class ExtendedMarkersView extends ViewPart {
 	}
 
 	/**
-	 * Return a job for updating the receiver.
+	 * Return the Markers that is the input to the viewer.
 	 * 
-	 * @return Job
+	 * @return Object
 	 */
-	private Job getUpdateJob(final CachedMarkerBuilder builder) {
-		updateJob = new WorkbenchJob(MarkerMessages.MarkerView_queueing_updates) {
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
-			 */
-			public boolean belongsTo(Object family) {
-				return family == MarkerContentGenerator.CACHE_UPDATE_FAMILY;
-			}
-
-			/**
-			 * Return the viewer that is being updated.
-			 * 
-			 * @return TreeViewer
-			 */
-			private TreeViewer getViewer() {
-
-				return viewer;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.
-			 * runtime.IProgressMonitor)
-			 */
-			public IStatus runInUIThread(IProgressMonitor monitor) {
-
-				if (viewer.getControl().isDisposed()) {
-					return Status.CANCEL_STATUS;
-				}
-
-				if (monitor.isCanceled())
-					return Status.CANCEL_STATUS;
-
-				// If there is only one category and the user has no saved state
-				// show it
-				if (builder.isShowingHierarchy()
-						&& getCategoriesToExpand().isEmpty()) {
-					MarkerCategory[] categories = builder.getCategories();
-					if (categories != null && categories.length == 1)
-						getCategoriesToExpand().add(
-								categories[0].getDescription());
-				}
-				// See Bug#252309 and Bug#222973
-				Tree tree = getViewer().getTree();
-				try {
-					tree.setRedraw(false);
-					getViewer().refresh(true);
-					updateTitle();
-
-					if (preservedSelection.size() > 0) {
-
-						Collection newSelection = new ArrayList();
-						MarkerItem[] markerEntries = builder.getMarkerEntries();
-
-						for (int i = 0; i < markerEntries.length; i++) {
-							Iterator preserved = preservedSelection.iterator();
-							while (preserved.hasNext()) {
-								MarkerSelectionEntry next = (MarkerSelectionEntry) preserved
-										.next();
-								if (next.isEquivalentTo(markerEntries[i])) {
-									newSelection.add(markerEntries[i]);
-									continue;
-								}
-							}
-						}
-
-						getViewer()
-								.setSelection(
-										new StructuredSelection(newSelection
-												.toArray()), true);
-						preservedSelection.clear();
-					}
-					if (getViewer().getTree().getItemCount() > 0)
-						getViewer().getTree().setTopItem(
-								getViewer().getTree().getItem(0));
-
-					reexpandCategories(builder);
-				} finally {
-					tree.setRedraw(true);
-				}
-				/*
-				 * For performance reasons clear caches that might have been
-				 * created in updating UI.
-				 */
-				MarkerEntry[] entries=builder.getMarkerEntries();
-				for (int i = 0; i < entries.length; i++) {
-					entries[i].clearCache();
-				}
-				
-				return Status.OK_STATUS;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.ui.progress.WorkbenchJob#shouldRun()
-			 */
-			public boolean shouldRun() {
-				return !builder.isBuilding()
-						&& IDEWorkbenchPlugin.getDefault().getBundle()
-								.getState() == Bundle.ACTIVE;
-			}
-
-		};
-
-		updateJob.setSystem(true);
-		return updateJob;
+	Markers getViewerInput() {
+		return (Markers) viewer.getInput();
 	}
-
 	/**
-	 * Return the object that is the input to the viewer.
+	 * Return the active clone currently in use by UI.
 	 * 
 	 * @return Object
 	 */
-	Object getViewerInput() {
-		return viewer.getInput();
+	Markers getActiveViewerInputClone() {
+		/*The ideal place to hold the reference for the
+		 clone is the view,as it is a for-ui-only clone*/
+		return builder.getClonedMarkers();
 	}
 
 	/**
-	 * Get all of the fields visible in the receiver.
+	 * Return a new clone to use in UI.Can return
+	 * null if markers are changing or building.
+	 * @see CachedMarkerBuilder#createMarkersClone()
 	 * 
-	 * @return MarkerField[]
+	 * 
+	 * @return Object
 	 */
-	MarkerField[] getVisibleFields() {
-		return builder.getVisibleFields();
+	Markers createViewerInputClone() {
+		return builder.createMarkersClone();
 	}
 
 	/**
-	 * Create a listener for working set changes.
+	 * Get all of the fields visible in the receiver.
 	 * 
-	 * @return IPropertyChangeListener
+	 * @return MarkerField[]
 	 */
-	private IPropertyChangeListener getWorkingSetListener() {
-		workingSetListener = new IPropertyChangeListener() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see
-			 * org.eclipse.jface.util.IPropertyChangeListener#propertyChange
-			 * (org.eclipse.jface.util.PropertyChangeEvent)
-			 */
-			public void propertyChange(PropertyChangeEvent event) {
-				builder.scheduleMarkerUpdate();
-
-			}
-
-		};
-		return workingSetListener;
+	MarkerField[] getVisibleFields() {
+		return generator.getVisibleFields();
 	}
 
 	/*
@@ -1447,23 +942,27 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	public void init(IViewSite site, IMemento memento) throws PartInitException {
 		super.init(site, memento);
-		MarkerContentGenerator generator = null;
-
+		ContentGeneratorDescriptor generatorDescriptor = null;
 		if (memento != null) {
-			generator = MarkerSupportRegistry.getInstance().getGenerator(
-					memento.getString(TAG_GENERATOR));
+			generatorDescriptor = MarkerSupportRegistry.getInstance()
+					.getContentGenDescriptor(memento.getString(TAG_GENERATOR));
 		}
 
-		if (generator == null && defaultGeneratorIds.length > 0) {
-			generator = MarkerSupportRegistry.getInstance().getGenerator(
-					defaultGeneratorIds[0]);
-			if (generator == null)
+		if (generatorDescriptor == null && defaultGeneratorIds.length > 0) {
+			generatorDescriptor = MarkerSupportRegistry.getInstance()
+					.getContentGenDescriptor(defaultGeneratorIds[0]);
+			if (generatorDescriptor == null)
 				logInvalidGenerator(defaultGeneratorIds[0]);
 		}
 
-		if (generator == null)
-			generator = MarkerSupportRegistry.getInstance()
-					.getDefaultGenerator();
+		if (generatorDescriptor == null)
+			generatorDescriptor = MarkerSupportRegistry.getInstance()
+					.getDefaultContentGenDescriptor();
+
+		builder = new CachedMarkerBuilder(this);
+		generator = new MarkerContentGenerator(generatorDescriptor, builder,
+				getViewsEffectiveId());
+		generator.restoreState(memento);
 
 		// Add in the entries common to all markers views
 		IMenuService menuService = (IMenuService) site
@@ -1478,13 +977,8 @@ public class ExtendedMarkersView extends ViewPart {
 				.getActionBars().getToolBarManager(),
 				"toolbar:" + MarkerSupportRegistry.MARKERS_ID); //$NON-NLS-1$
 
-		String viewId = site.getId();
-		if (site.getSecondaryId() != null) {
-			viewId = viewId + site.getSecondaryId();
-		}
-		builder = new CachedMarkerBuilder(generator, viewId, memento);
+		builder.restoreState(memento);
 
-		builder.setUpdateJob(getUpdateJob(builder));
 		Object service = site.getAdapter(IWorkbenchSiteProgressService.class);
 		if (service != null)
 			builder.setProgressService((IWorkbenchSiteProgressService) service);
@@ -1497,6 +991,37 @@ public class ExtendedMarkersView extends ViewPart {
 	}
 
 	/**
+	 * @return viewId
+	 * 
+	 */
+	String getViewsEffectiveId() {
+		IViewSite site = (IViewSite) getSite();
+		String viewId = site.getId();
+		if (site.getSecondaryId() != null) {
+			viewId = viewId + site.getSecondaryId();
+		}
+		return viewId;
+	}
+
+	/**
+	 * @return viewsPrimaryId
+	 * 
+	 */
+	String getViewsPrimaryId() {
+		IViewSite site = (IViewSite) getSite();
+		return site.getId();
+	}
+	
+	/**
+	 * @return viewsSecondaryId
+	 * 
+	 */
+	String getViewsSecondaryId() {
+		IViewSite site = (IViewSite) getSite();
+		return site.getSecondaryId();
+	}
+
+	/**
 	 * Initialize the title based on the name
 	 * 
 	 * @param name
@@ -1513,7 +1038,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return boolean
 	 */
 	boolean isEnabled(MarkerFieldFilterGroup group) {
-		return builder.getEnabledFilters().contains(group);
+		return generator.getEnabledFilters().contains(group);
 	}
 
 	/**
@@ -1532,7 +1057,23 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return boolean
 	 */
 	boolean isShowing(MarkerContentGenerator generator) {
-		return this.builder.getGenerator().equals(generator);
+		return generator != null ? generator.equals(generator) : false;
+	}
+
+	/**
+	 * Set the generator for the view.
+	 * 
+	 * @param generator
+	 */
+	void internalSetGenerator(MarkerContentGenerator generator) {
+		this.generator=generator;
+	}
+
+	/**
+	 * @return Returns the generator.
+	 */
+	MarkerContentGenerator getGenerator() {
+		return generator;
 	}
 
 	/**
@@ -1552,10 +1093,9 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	void openFiltersDialog() {
 		FiltersConfigurationDialog dialog = new FiltersConfigurationDialog(
-				new SameShellProvider(getSite().getWorkbenchWindow().getShell()),
-				builder);
+				getSite().getWorkbenchWindow().getShell(), generator);
 		if (dialog.open() == Window.OK) {
-			builder.updateFrom(dialog);
+			generator.updateFilters(dialog.getFilters(), dialog.andFilters());
 		}
 
 	}
@@ -1576,16 +1116,24 @@ public class ExtendedMarkersView extends ViewPart {
 	/**
 	 * Restore the expanded categories.
 	 * 
-	 * @param builder
 	 */
-	void reexpandCategories(final CachedMarkerBuilder builder) {
+	void reexpandCategories() {
 		if (!getCategoriesToExpand().isEmpty() && builder.isShowingHierarchy()) {
-			MarkerItem[] items = builder.getElements();
+			MarkerItem[] items =getActiveViewerInputClone().getElements();
+			IContentProvider provider = viewer.getContentProvider();
 			for (int i = 0; i < items.length; i++) {
 				String name = ((MarkerCategory) items[i]).getName();
-				if (getCategoriesToExpand().contains(name))
-					viewer.expandToLevel(items[i], 2);
-
+				if (getCategoriesToExpand().contains(name)) {
+					if (provider instanceof ILazyTreeContentProvider) {
+						((ILazyTreeContentProvider) provider).updateElement(
+								builder.getMarkers(), i);
+						viewer.setExpandedState(items[i], true);
+					} else {
+						if (!viewer.getExpandedState(items[i])) {
+							viewer.expandToLevel(items[i], 2);
+						}
+					}
+				}
 			}
 		}
 	}
@@ -1599,12 +1147,12 @@ public class ExtendedMarkersView extends ViewPart {
 		contextMenu.setRemoveAllWhenShown(true);
 		getSite().registerContextMenu(contextMenu, viewer);
 		// Add in the entries for all markers views if this has a different if
-		if (!getSite().getId().equals(MarkerSupportRegistry.MARKERS_ID))
+		if (!getSite().getId().equals(MarkerSupportRegistry.MARKERS_ID)) {
 			getSite().registerContextMenu(MarkerSupportRegistry.MARKERS_ID,
 					contextMenu, viewer);
+		}
 		Control control = viewer.getControl();
 		Menu menu = contextMenu.createContextMenu(control);
-
 		control.setMenu(menu);
 	}
 
@@ -1618,28 +1166,6 @@ public class ExtendedMarkersView extends ViewPart {
 
 	}
 
-	/**
-	 * Preserve the selection for re-selection after the next update.
-	 * 
-	 * @param selection
-	 */
-	void saveSelection(ISelection selection) {
-		preservedSelection.clear();
-		if (selection instanceof IStructuredSelection) {
-			IStructuredSelection structured = (IStructuredSelection) selection;
-			Iterator iterator = structured.iterator();
-			while (iterator.hasNext()) {
-				MarkerSupportItem next = (MarkerSupportItem) iterator.next();
-				if (next.isConcrete()) {
-					preservedSelection.add(new MarkerSelectionEntry(next));
-					getCategoriesToExpand().add(next.getParent());
-				} else
-					getCategoriesToExpand().add(next);
-			}
-		}
-
-	}
-
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -1647,8 +1173,10 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	public void saveState(IMemento memento) {
 		super.saveState(memento);
-		memento.putString(TAG_GENERATOR, builder.getGenerator().getId());
 		memento.putString(TAG_PART_NAME, getPartName());
+		if (generator != null) {
+			memento.putString(TAG_GENERATOR, builder.getGenerator().getId());
+		}
 
 		if (!getCategoriesToExpand().isEmpty()) {
 			IMemento expanded = memento.createChild(TAG_EXPANDED);
@@ -1657,20 +1185,19 @@ public class ExtendedMarkersView extends ViewPart {
 				expanded.createChild(TAG_CATEGORY, (String) categories.next());
 			}
 		}
-
 		IMemento columnEntry = memento.createChild(TAG_COLUMN_WIDTHS);
-
 		MarkerField[] fields = new MarkerField[viewer.getTree()
 				.getColumnCount()];
 		int[] positions = viewer.getTree().getColumnOrder();
-
 		for (int i = 0; i < fields.length; i++) {
 			TreeColumn column = viewer.getTree().getColumn(i);
 			columnEntry.putInteger(getFieldId(column), column.getWidth());
 			fields[positions[i]] = (MarkerField) column.getData(MARKER_FIELD);
 		}
-
-		builder.saveState(memento, fields);
+		if (generator != null) {
+			generator.saveSate(memento, fields);
+		}
+		builder.saveState(memento);
 	}
 
 	/**
@@ -1678,7 +1205,6 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	void selectAll() {
 		viewer.getTree().selectAll();
-
 	}
 
 	/**
@@ -1692,16 +1218,16 @@ public class ExtendedMarkersView extends ViewPart {
 	}
 
 	/**
-	 * Set the content generator for the receiver.
+	 * Set the content generator for the receiver and update.
 	 * 
 	 * @param generator
 	 */
 	void setContentGenerator(MarkerContentGenerator generator) {
 		viewer.setSelection(new StructuredSelection());
 		viewer.removeAndClearAll();
-		builder.setGenerator(generator);
+		internalSetGenerator(generator);
 		createColumns(viewer.getTree().getColumns());
-
+		builder.setGenerator(generator);
 	}
 
 	/*
@@ -1711,7 +1237,6 @@ public class ExtendedMarkersView extends ViewPart {
 	 */
 	public void setFocus() {
 		viewer.getControl().setFocus();
-
 	}
 
 	/**
@@ -1731,7 +1256,7 @@ public class ExtendedMarkersView extends ViewPart {
 		StatusManager.getManager().handle(
 				StatusUtil.newStatus(IStatus.WARNING,
 						"Sorting by non visible field " //$NON-NLS-1$
-								+ field.getColumnHeaderText(), null));
+								+ field.getName(), null));
 	}
 
 	/**
@@ -1747,16 +1272,6 @@ public class ExtendedMarkersView extends ViewPart {
 				.getAdapter(IWorkbenchSiteProgressService.class);
 		builder.refreshContents(service);
 		updateDirectionIndicator(column, field);
-		viewer.refresh();
-		reexpandCategories(builder);
-		/*
-		 * For performance reasons clear caches that might have been created in
-		 * updating UI.
-		 */
-		MarkerEntry[] entries=builder.getMarkerEntries();
-		for (int i = 0; i < entries.length; i++) {
-			entries[i].clearCache();
-		}
 	}
 
 	/**
@@ -1766,24 +1281,20 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @param reveal
 	 */
 	void setSelection(StructuredSelection structuredSelection, boolean reveal) {
-
 		List newSelection = new ArrayList(structuredSelection.size());
-
 		for (Iterator i = structuredSelection.iterator(); i.hasNext();) {
 			Object next = i.next();
 			if (next instanceof IMarker) {
-				MarkerItem marker = builder.getMarkerItem((IMarker) next);
+				MarkerItem marker = builder.getMarkers().getMarkerItem(
+						(IMarker) next);
 				if (marker != null) {
 					newSelection.add(marker);
 				}
 			}
 		}
-
 		IStructuredSelection structured = new StructuredSelection(newSelection);
-
 		viewer.setSelection(structured, reveal);
 		updateStatusLine(structured);
-
 	}
 
 	/**
@@ -1792,8 +1303,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @param group
 	 */
 	void toggleFilter(MarkerFieldFilterGroup group) {
-		builder.toggleFilter(group);
-
+		generator.toggleFilter(group);
 	}
 
 	/**
@@ -1823,7 +1333,7 @@ public class ExtendedMarkersView extends ViewPart {
 	 * 
 	 * @param newSelection
 	 */
-	private void updateStatusLine(IStructuredSelection newSelection) {
+	void updateStatusLine(IStructuredSelection newSelection) {
 		String message;
 
 		if (newSelection == null || newSelection.size() == 0) {
@@ -1843,9 +1353,8 @@ public class ExtendedMarkersView extends ViewPart {
 			}
 			MarkerEntry[] entries = new MarkerEntry[result.size()];
 			result.toArray(entries);
-			MarkerMap markers=new MarkerMap(entries);
 			// Show stats on only those items in the selection
-			message =getStatusSummary(markers) ;
+			message = getStatusSummary(entries);
 		}
 		getViewSite().getActionBars().getStatusLineManager()
 				.setMessage(message);
@@ -1853,10 +1362,11 @@ public class ExtendedMarkersView extends ViewPart {
 
 	/**
 	 * Get the status line summary of markers.
-	 * @param markers 
+	 * 
+	 * @param entries
 	 */
-	private String getStatusSummary(MarkerMap markers) {
-		Integer[] counts = markers.getMarkerCounts();
+	private String getStatusSummary(MarkerEntry[] entries) {
+		Integer[] counts = Markers.getMarkerCounts(entries);
 		// combine counts for infos and others
 		counts = new Integer[] { counts[0], counts[1],
 				new Integer(counts[2].intValue() + counts[3].intValue()) };
@@ -1865,16 +1375,19 @@ public class ExtendedMarkersView extends ViewPart {
 			// count
 			return MessageFormat.format(
 					MarkerMessages.marker_statusSelectedCount,
-					new Object[] { new Integer(markers.getSize()) });
+					new Object[] { new Integer(entries.length) });
 		}
-		return MessageFormat.format(
+		return MessageFormat
+				.format(
 						MarkerMessages.marker_statusSummarySelected,
 						new Object[] {
-								new Integer(markers.getSize()),
-								MessageFormat.format(
+								new Integer(entries.length),
+								MessageFormat
+										.format(
 												MarkerMessages.errorsAndWarningsSummaryBreakdown,
 												counts) });
 	}
+
 	/**
 	 * Update the title of the view.
 	 */
@@ -1939,19 +1452,69 @@ public class ExtendedMarkersView extends ViewPart {
 	 * @return Object[]
 	 */
 	Object[] getHiddenFields() {
-		return builder.getHiddenFields();
+		return generator.getHiddenFields();
 	}
 
 	/**
 	 * @param visible
 	 */
 	void setVisibleFields(Collection visible) {
-		builder.setVisibleFields(visible);
-		viewer.setSelection(new StructuredSelection());
-		viewer.removeAndClearAll();
+		generator.setVisibleFields(visible);
+		//viewer.setSelection(new StructuredSelection());
+		//viewer.removeAndClearAll();
 		createColumns(viewer.getTree().getColumns());
-		viewer.refresh();
-	}
+		scheduleUpdate(0L);
+	}
+
+	//See Bug 294303
+	//void indicateUpdating(final String message, final boolean updateLabels) {
+	//	Display display = getSite().getShell().getDisplay();
+	//	if (Display.getCurrent() == display) {
+	//		setContentDescription(message != null ? message
+	//				: getStatusMessage());
+	//		if (updateLabels) {
+	//			updateCategoryLabels();
+	//		}
+	//		return;
+	//	}
+	//	WorkbenchJob job = new WorkbenchJob(display,
+	//			MarkerMessages.MarkerView_queueing_updates) {
+	//		public IStatus runInUIThread(IProgressMonitor monitor) {
+	//				setContentDescription(message != null ? message
+	//						: getStatusMessage());
+	//				if (updateLabels) {
+	//					updateCategoryLabels();
+	//				}
+	//				return Status.OK_STATUS;
+	//		}
+	//	};
+	//	job.setPriority(Job.INTERACTIVE);
+	//	job.schedule();
+	//  //see Bug 293305
+	//	//	if (block) {
+	//	//		try {
+	//	//			if (display.getSyncThread() != Thread.currentThread()) {
+	//	//				job.join();
+	//	//			}
+	//	//		} catch (InterruptedException e) {
+	//	//		}
+	//	//	}
+	//}
+	//
+	//void updateCategoryLabels() {
+	//	if (builder.isShowingHierarchy()) {
+	//		MarkerCategory[] categories =getActiveViewerInputClone().getCategories();
+	//		boolean refreshing = builder.isBuilding()
+	//				|| builder.getMarkerListener().isUpdating() 
+	//				|| builder.getMarkerListener().workspaceBuilding();
+	//		for (int i = 0; i < categories.length; i++) {
+	//			categories[i].refreshing = refreshing;
+	//		}
+	//		if (categories != null && categories.length > 1) {
+	//			viewer.update(categories, null);
+	//		}
+	//	}
+	//}
 
 	/**
 	 * @return the viewer
@@ -1960,4 +1523,179 @@ public class ExtendedMarkersView extends ViewPart {
 		return viewer;
 	}
 
+	/**
+	 * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
+	 * 
+	 * Cancel a scheduled delay
+	 */
+	void cancelQueuedUpdates() {
+		synchronized (builder.getUpdateScheduler().getSchedulingLock()) {
+			if (uiUpdateJob != null) {
+				uiUpdateJob.cancel();
+			}
+		}
+	}
+
+	/**
+	 * The method should not be called directly, see
+	 * {@link MarkerUpdateScheduler}
+	 * 
+	 * @param delay
+	 * @return UIUpdateJob
+	 */
+	UIUpdateJob scheduleUpdate(long delay) {
+		synchronized (builder.getUpdateScheduler().getSchedulingLock()) {
+			if (uiUpdateJob != null) {
+				// ensure cancellation before calling the method
+				// uiUpdateJob.cancel();
+			} else {
+				uiUpdateJob = new UIUpdateJob(this);
+				// uiUpdateJob.setPriority(Job.SHORT);
+				uiUpdateJob.setSystem(true);
+			}
+			IWorkbenchSiteProgressService progressService = builder
+					.getProgressService();
+			if (progressService != null) {
+				progressService.schedule(uiUpdateJob, delay);
+			} else {
+				uiUpdateJob.schedule(delay);
+			}
+			return uiUpdateJob;
+		}
+	}
+
+	/**
+	 * @return lastUiRefreshTime
+	 * 
+	 */
+	long getLastUIRefreshTime() {
+		if (uiUpdateJob != null) {
+			return uiUpdateJob.getLastUpdateTime();
+		}
+		return -1;
+	}
+	/**
+	 * @return true if the UI isUpdating
+	 * 
+	 */
+	boolean isUIUpdating() {
+		return uiUpdateJob!=null?uiUpdateJob.isUpdating():false;
+	}
+
+	/**
+	 * Return the next secondary id that has not been opened for a primary id of
+	 * a part.
+	 * 
+	 * @return part
+	 */
+	static String newSecondaryID(IViewPart part) {
+		while (part.getSite().getPage().findViewReference(
+				part.getSite().getId(), String.valueOf(instanceCount)) != null) {
+			instanceCount++;
+		}
+
+		return String.valueOf(instanceCount);
+	}
+
+	/**
+	 * Open the supplied marker in an editor in page
+	 * 
+	 * @param marker
+	 * @param page
+	 */
+	public static void openMarkerInEditor(IMarker marker, IWorkbenchPage page) {
+		// optimization: if the active editor has the same input as
+		// the
+		// selected marker then
+		// RevealMarkerAction would have been run and we only need
+		// to
+		// activate the editor
+		IEditorPart editor = page.getActiveEditor();
+		if (editor != null) {
+			IEditorInput input = editor.getEditorInput();
+			IFile file = ResourceUtil.getFile(input);
+			if (file != null) {
+				if (marker.getResource().equals(file)
+						&& OpenStrategy.activateOnOpen()) {
+					page.activate(editor);
+				}
+			}
+		}
+
+		if (marker != null && marker.getResource() instanceof IFile) {
+			try {
+				IDE.openEditor(page, marker, OpenStrategy.activateOnOpen());
+			} catch (PartInitException e) {
+
+				// Check for a nested CoreException
+				IStatus status = e.getStatus();
+				if (status != null
+						&& status.getException() instanceof CoreException) {
+					status = ((CoreException) status.getException())
+							.getStatus();
+				}
+
+				if (status == null)
+					StatusManager.getManager().handle(
+							StatusUtil.newStatus(IStatus.ERROR, e.getMessage(),
+									e), StatusManager.SHOW);
+
+				else
+					StatusManager.getManager().handle(status,
+							StatusManager.SHOW);
+
+			}
+		}
+	}
+
+	/**
+	 * Return The selection listener for the page selection change.
+	 * 
+	 */
+	private class ViewerPageSelectionListener implements ISelectionListener {
+		private ExtendedMarkersView view;
+
+		ViewerPageSelectionListener(ExtendedMarkersView view) {
+			this.view = view;
+		}
+
+		public void selectionChanged(IWorkbenchPart part, ISelection selection) {
+
+			// Do not respond to our own selections or if we are not
+			// visible
+			if (part == ExtendedMarkersView.this
+					|| !(getSite().getPage().isPartVisible(part)))
+				return;
+
+			// get Objects to adapt
+			List objectsToAdapt = new ArrayList();
+			if (part instanceof IEditorPart) {
+				IEditorPart editor = (IEditorPart) part;
+				objectsToAdapt.add(editor.getEditorInput());
+			} else {
+				if (selection instanceof IStructuredSelection) {
+					for (Iterator iterator = ((IStructuredSelection) selection)
+							.iterator(); iterator.hasNext();) {
+						Object object = iterator.next();
+						objectsToAdapt.add(object);
+					}
+				}
+			}
+			// try to adapt them in resources and add it to the
+			// selectedElements
+			List selectedElements = new ArrayList();
+			for (Iterator iterator = objectsToAdapt.iterator(); iterator
+					.hasNext();) {
+				Object object = iterator.next();
+				Object resElement = MarkerResourceUtil.adapt2ResourceElement(object);
+				if (resElement != null) {
+					selectedElements.add(resElement);
+				}
+			}
+			MarkerContentGenerator generator = view.getGenerator();
+			generator.updateSelectedResource(selectedElements.toArray());
+		}
+		
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
index 8f992a0..fd59a6d 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/FiltersConfigurationDialog.java
@@ -17,12 +17,14 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -31,7 +33,6 @@ import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.IShellProvider;
 import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
@@ -45,12 +46,14 @@ import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.forms.events.ExpansionEvent;
 import org.eclipse.ui.forms.events.IExpansionListener;
 import org.eclipse.ui.forms.widgets.ExpandableComposite;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.ScrolledForm;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.preferences.ViewSettingsDialog;
 import org.eclipse.ui.views.markers.FilterConfigurationArea;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
 
@@ -60,7 +63,7 @@ import org.eclipse.ui.views.markers.internal.MarkerMessages;
  * @since 3.3
  * 
  */
-public class FiltersConfigurationDialog extends Dialog {
+public class FiltersConfigurationDialog extends ViewSettingsDialog {
 
 	private static final String SELECTED_FILTER_GROUP = "SELECTED_FILTER_GROUP"; //$NON-NLS-1$
 
@@ -74,7 +77,7 @@ public class FiltersConfigurationDialog extends Dialog {
 
 	private ScrolledForm form;
 
-	private CachedMarkerBuilder builder;
+	private MarkerContentGenerator generator;
 
 	private Collection filterAreas;
 
@@ -82,21 +85,28 @@ public class FiltersConfigurationDialog extends Dialog {
 
 	private Button removeButton;
 
+	private Button renameButton;
+	
 	private Button cloneButton;
 
+	private Button andButton;
+
+	private Button orButton;
+
+	private Label andOrLabel;
+
 	/**
 	 * Create a new instance of the receiver on builder.
 	 * 
 	 * @param parentShell
-	 * @param builder
-	 *            The {@link CachedMarkerBuilder} to apply this to
+	 * @param generator 
 	 */
-	public FiltersConfigurationDialog(IShellProvider parentShell,
-			CachedMarkerBuilder builder) {
+	public FiltersConfigurationDialog(Shell parentShell,
+			MarkerContentGenerator generator) {
 		super(parentShell);
-		filterGroups = makeWorkingCopy(builder.getAllFilters());
-		this.builder = builder;
-		andFilters = builder.andFilters();
+		filterGroups = makeWorkingCopy(generator.getAllFilters());
+		this.generator = generator;
+		andFilters = generator.andFilters();
 	}
 
 	/**
@@ -132,12 +142,15 @@ public class FiltersConfigurationDialog extends Dialog {
 		initializeDialogUnits(top);
 
 		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
+		layout.numColumns = 3;
 		layout.makeColumnsEqualWidth = false;
 		top.setLayout(layout);
 
 		createFilterSelectionArea(top);
-
+		
+		Label seprator=new Label(top, SWT.SEPARATOR|SWT.VERTICAL);
+		seprator.setLayoutData(new GridData(SWT.NONE, SWT.FILL, false, true));
+		
 		final FormToolkit toolkit = new FormToolkit(top.getDisplay());
 		parent.addDisposeListener(new DisposeListener() {
 
@@ -153,7 +166,7 @@ public class FiltersConfigurationDialog extends Dialog {
 		form.setLayoutData(data);
 		form.getBody().setLayout(new GridLayout());
 
-		filterAreas = builder.createFilterConfigurationFields();
+		filterAreas = generator.createFilterConfigurationFields();
 
 		createFieldArea(toolkit, form, scopeArea, true);
 		Iterator areas = filterAreas.iterator();
@@ -242,6 +255,7 @@ public class FiltersConfigurationDialog extends Dialog {
 
 		filtersList = CheckboxTableViewer.newCheckList(filtersComposite,
 				SWT.BORDER);
+		
 		filtersList.setContentProvider(new IStructuredContentProvider() {
 			/*
 			 * (non-Javadoc)
@@ -299,7 +313,6 @@ public class FiltersConfigurationDialog extends Dialog {
 					public void selectionChanged(SelectionChangedEvent event) {
 						setSelectedFilter((MarkerFieldFilterGroup) ((IStructuredSelection) event
 								.getSelection()).getFirstElement());
-
 					}
 				});
 
@@ -350,11 +363,29 @@ public class FiltersConfigurationDialog extends Dialog {
 			}
 		});
 		setButtonLayoutData(removeButton);
-
-		Button andButton = new Button(filtersComposite, SWT.RADIO);
+		
+		renameButton = new Button(buttons, SWT.PUSH);
+		renameButton.setText(MarkerMessages.MarkerFilter_renameName);
+		renameButton.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				MarkerFieldFilterGroup filterGroup = (MarkerFieldFilterGroup) ((IStructuredSelection) filtersList
+						.getSelection()).getFirstElement();
+				renameFilter(filterGroup);
+			}
+		});
+		setButtonLayoutData(renameButton);
+		
+		andOrLabel = new Label(filtersComposite, SWT.NONE);
+		GridData labelData = new GridData();
+		labelData.horizontalSpan = 2;
+		andOrLabel.setLayoutData(labelData);
+		andOrLabel.setText(MarkerMessages.AND_OR_Label);
+		
+		andButton = new Button(filtersComposite, SWT.RADIO);
 		GridData data = new GridData(GridData.FILL_HORIZONTAL, SWT.NONE, true,
 				false);
 		data.horizontalSpan = 2;
+		data.horizontalIndent = IDialogConstants.INDENT;
 		andButton.setLayoutData(data);
 		andButton.setText(MarkerMessages.AND_Title);
 		andButton.setSelection(andFilters);
@@ -370,9 +401,10 @@ public class FiltersConfigurationDialog extends Dialog {
 			}
 		});
 
-		Button orButton = new Button(filtersComposite, SWT.RADIO);
+		orButton = new Button(filtersComposite, SWT.RADIO);
 		data = new GridData(GridData.FILL_HORIZONTAL, SWT.NONE, true, false);
 		data.horizontalSpan = 2;
+		data.horizontalIndent = IDialogConstants.INDENT;
 		orButton.setLayoutData(data);
 		orButton.setText(MarkerMessages.OR_Title);
 		orButton.setSelection(!andFilters);
@@ -387,6 +419,11 @@ public class FiltersConfigurationDialog extends Dialog {
 				andFilters = false;
 			}
 		});
+		filtersList.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				updateAndOrEnblement();				
+			}
+		});
 	}
 
 	/**
@@ -396,34 +433,62 @@ public class FiltersConfigurationDialog extends Dialog {
 	 * 				
 	 */
 	private void addNewFilter(boolean cloneSelected) {
+		String newName =getNewFilterName(getCurrentFilterNames(),null);
+		if (newName != null) {
+			createNewFilter(newName,cloneSelected);
+		}
+	}
+	/**
+	 * Opens Input Dialog for a new filter name
+	 * @param avoidNames filter names to avoid
+	 * @param initialName initial name of the filter
+	 * @return new filter name or null if canceled
+	 * 				
+	 */
+	private String getNewFilterName(final Collection avoidNames,String initialName){
 		InputDialog newDialog = new InputDialog(getShell(),
 				MarkerMessages.MarkerFilterDialog_title,
 				MarkerMessages.MarkerFilterDialog_message,
-				MarkerMessages.MarkerFilter_newFilterName,
-				new IInputValidator() {
-					public String isValid(String newText) {
-						if (newText.length() == 0)
-							return MarkerMessages.MarkerFilterDialog_emptyMessage;
-						Iterator filterIterator = filterGroups
-								.iterator();
-						while (filterIterator.hasNext()) {
-							if (((MarkerFieldFilterGroup) filterIterator
-									.next()).getName().equals(newText))
-								return NLS
-										.bind(
-												MarkerMessages.filtersDialog_conflictingName,
-												newText);
-						}
-
-						return null;
-					}
-				});
+				initialName != null ? initialName
+						: MarkerMessages.MarkerFilter_newFilterName,
+				getNameValidator(avoidNames));
 		if (Window.OK == newDialog.open()) {
-			String newName = newDialog.getValue();
-			if (newName != null) {
-				createNewFilter(newName,cloneSelected);
+			return newDialog.getValue();
+		}
+		return null;
+	}
+
+	/**
+	 * Get IInputValidator for checking if the new name is valid
+	 * @param avoidNames
+	 * @return IInputValidator
+	 */
+	private IInputValidator getNameValidator(final Collection avoidNames) {
+		return new IInputValidator() {
+			public String isValid(String value) {
+				String newText=value.trim();
+				if (newText.length() == 0)
+					return MarkerMessages.MarkerFilterDialog_emptyMessage;
+				if (avoidNames.contains(newText))
+					return NLS.bind(
+							MarkerMessages.filtersDialog_conflictingName,
+							newText);
+				return null;
 			}
+		};
+	}
+	
+	/**
+	 * Get a collection of names of the filters currently in the list
+	 * @return Collection
+	 */
+	private Collection getCurrentFilterNames() {
+		Collection names = new ArrayList();
+		Iterator filterIterator = filterGroups.iterator();
+		while (filterIterator.hasNext()) {
+			names.add(((MarkerFieldFilterGroup) filterIterator.next()).getName());
 		}
+		return names;
 	}
 	/**
 	 * Create a new filterGroup, and adds it to the filterGroups 
@@ -431,7 +496,7 @@ public class FiltersConfigurationDialog extends Dialog {
 	 * @param newName name of new filterGroup
 	 */
 	private void createNewFilter(String newName,boolean cloneSelected) {
-		MarkerFieldFilterGroup group = new MarkerFieldFilterGroup(null, builder);
+		MarkerFieldFilterGroup group = new MarkerFieldFilterGroup(null, generator);
 		if(cloneSelected&&selectedFilterGroup!=null){
 			captureStateInto(group); //copy current values from UI
 		}
@@ -440,9 +505,41 @@ public class FiltersConfigurationDialog extends Dialog {
 		filtersList.refresh();
 		filtersList.setSelection(new StructuredSelection(group));
 		filtersList.setChecked(group, true);
+		updateAndOrEnblement();
 	}
 
 	/**
+	 * Renames the supplied MarkerFieldFilterGroup
+	 * @param filterGroup
+	 */
+	private void renameFilter(MarkerFieldFilterGroup filterGroup) {
+		if (filterGroup != null) {
+			Collection names = getCurrentFilterNames();
+			String initial = null;
+			initial = filterGroup.getName();
+			names.remove(initial);
+			String newName=getNewFilterName(names, initial);
+			if(newName!=null){
+				filterGroup.setName(newName);
+				filtersList.update(filterGroup, null);
+			}
+		}
+	}
+	/**
+	 * Enable/disable 'and', 'or' buttons
+	 */
+	private void updateAndOrEnblement() {
+		if(filtersList.getCheckedElements().length==0){
+			andOrLabel.setEnabled(false);
+			andButton.setEnabled(false);
+			orButton.setEnabled(false);
+		}else{
+			andOrLabel.setEnabled(true);
+			andButton.setEnabled(true);
+			orButton.setEnabled(true);
+		}
+	}
+	/**
 	 * Return the dialog settings for the receiver.
 	 * 
 	 * @return IDialogSettings
@@ -566,6 +663,22 @@ public class FiltersConfigurationDialog extends Dialog {
 			}
 		}
 	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.eclipse.ui.preferences.ViewSettingsDialog#performDefaults()
+	 */
+	protected void performDefaults() {
+		filterGroups.clear();
+		filterGroups.addAll(generator.getDeclaredFilters());
+		filtersList.refresh();
+		filtersList.setSelection(new StructuredSelection(
+				filterGroups.size() > 1 ? filterGroups.iterator().next()
+						: new Object[0]));
+		andFilters=false;
+		andButton.setSelection(andFilters);
+		orButton.setSelection(!andFilters);
+	}
 
 	/**
 	 * Return whether or not deselected elements should have been selected.
@@ -591,6 +704,7 @@ public class FiltersConfigurationDialog extends Dialog {
 		filterGroups.remove(((IStructuredSelection) selection)
 				.getFirstElement());
 		filtersList.refresh();
+		updateAndOrEnblement();
 	}
 
 	/**
@@ -633,10 +747,15 @@ public class FiltersConfigurationDialog extends Dialog {
 	 * @param markerFieldFilterGroup
 	 */
 	private void setSelectedFilter(MarkerFieldFilterGroup markerFieldFilterGroup) {
-
+		if(selectedFilterGroup==markerFieldFilterGroup){
+			return;
+		}
 		removeButton
 				.setEnabled(!(markerFieldFilterGroup == null || markerFieldFilterGroup
 						.isSystem()));
+		renameButton
+				.setEnabled(!(markerFieldFilterGroup == null || markerFieldFilterGroup
+						.isSystem()));
 		cloneButton.setEnabled(markerFieldFilterGroup != null);
 		
 		MarkerFieldFilterGroup old = selectedFilterGroup;
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
index afb2312..93d23dd 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/GroupsContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -81,7 +81,7 @@ public class GroupsContribution extends MarkersContribution {
 			public void fill(Menu menu, int index) {
 				MenuItem item = new MenuItem(menu, SWT.RADIO);
 				item.setText(group == null ? MarkerMessages.ProblemView_None
-						: group.getMarkerField().getColumnHeaderText());
+						: group.getMarkerField().getName());
 				ExtendedMarkersView view = getView();
 				item.addListener(SWT.Selection,
 						getMenuItemListener(group, view));
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/IncrementUpdateJob.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/IncrementUpdateJob.java
new file mode 100644
index 0000000..171f43f
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/IncrementUpdateJob.java
@@ -0,0 +1,305 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
+
+/**
+ * The job that performs incremental update. Once the processing is complete it
+ * schedules an UI update. If it'll be possible and beneficial switch to
+ * incremental updatation, this has been left out for further investigation(*).
+ * only, and not used currently.
+ * 
+ * @since 3.6
+ * 
+ */
+class IncrementUpdateJob extends MarkerUpdateJob {
+
+	private LinkedList incrementEntryList;
+	private LinkedList updateQueue;
+
+	/**
+	 * @param builder
+	 */
+	public IncrementUpdateJob(CachedMarkerBuilder builder) {
+		super(builder);
+		incrementEntryList = new LinkedList();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.
+	 * IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		monitor.beginTask(MarkerMessages.MarkerView_processUpdates,
+				IProgressMonitor.UNKNOWN);
+		boolean clean= isClean();
+		if (clean) {
+			clearEntries();
+		}
+		Collection markerEntries = incrementalEntries();
+		if (clean) {
+			/*
+			 * Unfortunately we cannot lock marker operations between gathering
+			 * and updation. We have this code in place only for further
+			 * investigation
+			 */
+			clean = !clean(markerEntries, monitor);
+			LinkedList queue = getUpdatesQueue();
+			synchronized (queue) {
+				queue.clear();
+			}
+		}
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		if (!clean) {
+			builder.registerTypesToListener();
+			if (!processUpdates(monitor)) {
+				return Status.CANCEL_STATUS;
+			}
+		}
+		if (!processMarkerEntries(markerEntries, monitor)) {
+			return Status.CANCEL_STATUS;
+		}
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		// update with sorted entries
+		updateIncrementalList(markerEntries);
+
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		builder.getUpdateScheduler().scheduleUIUpdate(
+				MarkerUpdateScheduler.SHORT_DELAY);
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		builder.setBuilding(false);
+		updateDone();
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * Update the list
+	 * 
+	 * @param markerEntries
+	 */
+	private boolean updateIncrementalList(Collection markerEntries) {
+		markerEntries.clear();
+		Markers clone = builder.getMarkers();
+		synchronized (clone) {
+			clone = clone.getClone();
+		}
+		MarkerEntry[] entries = clone.getMarkerEntryArray();
+		for (int i = 0; i < entries.length; i++) {
+			markerEntries.add(entries[i]);
+		}
+		return true;
+	}
+
+	/**
+	 * Process the incremental updates
+	 * 
+	 * @param monitor
+	 */
+	private boolean processUpdates(IProgressMonitor monitor) {
+		Collection markerEntries = incrementalEntries();
+		int addCount = 0, removedCount = 0, changedCount = 0, size = 0, newSize = 0;
+		LinkedList queue = getUpdatesQueue();
+		MarkerUpdate next = null;
+		do {
+			synchronized (queue) {
+				if (!queue.isEmpty()) {
+					next = (MarkerUpdate) queue.removeFirst();
+				} else {
+					next = null;
+				}
+			}
+			if (monitor.isCanceled() || next == null) {
+				break;
+			}
+			/**
+			 * The following performs incremental updation of the markers that
+			 * were gathered intially, and keeps them synched at any point with
+			 * the markers of interest in Workspace
+			 */
+			// unfortunately marker operations cannot be locked
+			// so locking between gathering of markers and
+			// marker deltas is not possible
+			size = markerEntries.size();
+			handleRemovedEntries(markerEntries, next.removed, monitor);
+			newSize = markerEntries.size();
+			removedCount += size - newSize;
+
+			handleChangedEntries(markerEntries, next.changed, monitor);
+			changedCount += next.changed.size();
+
+			size = newSize;
+			handleAddedEntries(markerEntries, next.added, monitor);
+			newSize = markerEntries.size();
+			removedCount += newSize - size;
+		} while (next != null);
+		boolean[] changeFlags = new boolean[] { addCount > 0, removedCount > 0,
+				changedCount > 0 };
+		for (int i = 0; i < changeFlags.length; i++) {
+			if (changeFlags[i]) {
+				builder.updateChangeFlags(changeFlags);
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @param added
+	 * @param monitor
+	 */
+	private void handleAddedEntries(Collection markerEntries, Collection added,
+			IProgressMonitor monitor) {
+		MarkerContentGenerator generator = builder.getGenerator();
+		Iterator iterator = added.iterator();
+		while (iterator.hasNext()) {
+			MarkerEntry entry = (MarkerEntry) iterator.next();
+			if (generator.select(entry)) {
+				markerEntries.add(entry);
+			}
+		}
+	}
+
+	/**
+	 * @param changed
+	 * @param monitor
+	 */
+	private void handleChangedEntries(Collection markerEntries,
+			Collection changed, IProgressMonitor monitor) {
+		MarkerContentGenerator generator = builder.getGenerator();
+		Iterator iterator = changed.iterator();
+		while (iterator.hasNext()) {
+			MarkerEntry entry = (MarkerEntry) iterator.next();
+			Iterator iterator2 = markerEntries.iterator();
+			while (iterator2.hasNext()) {
+				MarkerEntry oldEntry = (MarkerEntry) iterator2.next();
+				if (oldEntry.getMarker().equals(entry.getMarker())) {
+					iterator2.remove();
+				}
+			}
+			if (!generator.select(entry)) {
+				iterator.remove();
+			}
+		}
+		markerEntries.addAll(changed);
+	}
+
+	/**
+	 * @param removed
+	 * @param monitor
+	 */
+	private void handleRemovedEntries(Collection markerEntries,
+			Collection removed, IProgressMonitor monitor) {
+		boolean found = false;
+		Iterator iterator = markerEntries.iterator();
+		while (iterator.hasNext()) {
+			MarkerEntry entry = (MarkerEntry) iterator.next();
+			found = entry.getStaleState();
+			if (found) {
+				iterator.remove();
+			}
+			if (removed.isEmpty()) {
+				continue;
+			}
+			Iterator iterator2 = removed.iterator();
+			while (iterator2.hasNext()) {
+				MarkerEntry stale = (MarkerEntry) iterator2.next();
+				if (stale.getMarker().equals(entry.getMarker())) {
+					iterator2.remove();
+					if (!found) {
+						iterator.remove();
+					}
+					break;
+				}
+			}
+		}
+		if (removed.isEmpty()) {
+			// TODO: do we check for residuals?
+			return;
+		}
+		// TODO: do we check for residuals?
+		iterator = markerEntries.iterator();
+		while (iterator.hasNext()) {
+			MarkerEntry entry = (MarkerEntry) iterator.next();
+			if (entry.getMarker() != null && !entry.getMarker().exists()) {
+				iterator.remove();
+			}
+		}
+	}
+
+	/**
+	 * Clean
+	 */
+	void clearEntries() {
+		incrementEntryList = new LinkedList();
+	}
+
+	/**
+	 * @return Returns the incrementEntryies.
+	 */
+	Collection incrementalEntries() {
+		return incrementEntryList;
+	}
+
+	/**
+	 * @return the updateQueue that holds the updates and maintains ordering
+	 */
+	LinkedList getUpdatesQueue() {
+		synchronized (builder.MARKER_INCREMENTAL_UPDATE_FAMILY) {
+			if (updateQueue == null) {
+				updateQueue = new LinkedList();
+			}
+			return updateQueue;
+		}
+	}
+
+	/**
+	 * Add update to the list
+	 * 
+	 * @param update
+	 */
+	void addUpdate(MarkerUpdate update) {
+		LinkedList updateList = getUpdatesQueue();
+		synchronized (updateList) {
+			updateList.addLast(update);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+	 */
+	public boolean belongsTo(Object family) {
+		if (family.equals(builder.MARKER_INCREMENTAL_UPDATE_FAMILY)) {
+			return true;
+		}
+		return super.belongsTo(family);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
index fc58f57..d63005c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCategory.java
@@ -17,89 +17,91 @@ import org.eclipse.ui.views.markers.MarkerItem;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
 
 class MarkerCategory extends MarkerSupportItem {
-
+	
+	boolean refreshing;
+	
 	int start;
 
 	int end;
 
-	private MarkerEntry[] children;
+	MarkerEntry[] children;
 
 	private String name;
 
-	private CachedMarkerBuilder cachedMarkerBuilder;
-
 	private int severity = -1;
 
+	private Markers markers;
+
 	/**
 	 * Create a new instance of the receiver that has the markers between
 	 * startIndex and endIndex showing.
 	 * 
-	 * @param cachedMarkerBuilder
+	 * @param markers
 	 * @param startIndex
 	 * @param endIndex
 	 *            the builder used to generate the children lazily.
 	 */
-	MarkerCategory(CachedMarkerBuilder cachedMarkerBuilder, int startIndex,
+	MarkerCategory(Markers markers, int startIndex,
 			int endIndex, String categoryName) {
-		this.cachedMarkerBuilder = cachedMarkerBuilder;
+		this.markers = markers;
 		start = startIndex;
 		end = endIndex;
+		refreshing=false;
 		name = categoryName;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getChildren()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.MarkerSupportItem#getChildren()
 	 */
 	MarkerSupportItem[] getChildren() {
-
 		if (children == null) {
-
-			// Return nothing while a build is going on as this could be
-			// stale
-			if (this.cachedMarkerBuilder.isBuilding()) {
-				return MarkerSupportInternalUtilities.EMPTY_MARKER_ITEM_ARRAY;
-			}
-
-			MarkerItem[] allMarkers = cachedMarkerBuilder.getMarkerEntries();
-
+			MarkerItem[] allMarkers = markers.getMarkerEntryArray();
 			int totalSize = getChildrenCount();
 			children = new MarkerEntry[totalSize];
-
 			System.arraycopy(allMarkers, start, children, 0, totalSize);
-
 			for (int i = 0; i < children.length; i++) {
 				children[i].setCategory(this);
 			}
 		}
 		return children;
-
 	}
 
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getChildrenCount()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.MarkerSupportItem#getChildrenCount
+	 * ()
 	 */
 	int getChildrenCount() {
 		return end - start + 1;
 	}
 
-	
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getDescription()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.MarkerSupportItem#getDescription()
 	 */
 	String getDescription() {
-
+		//see Bug 294959
+		//if(refreshing){
+		//	//see Bug 294959
+		//	return NLS.bind(MarkerMessages.Category_building,
+		//			new Object[] { getName() });
+		//}
 		int size = getChildrenCount();
 		int limit = MarkerSupportInternalUtilities.getMarkerLimit();
 
 		if (limit > 0 && size > limit) {
-			return NLS.bind(MarkerMessages.Category_Limit_Label,
-					new Object[] {
-							name,
-							String.valueOf(MarkerSupportInternalUtilities
-									.getMarkerLimit()),
-							String.valueOf(getChildrenCount()) });
-
+			return NLS.bind(MarkerMessages.Category_Limit_Label, new Object[] {
+					name,
+					String.valueOf(MarkerSupportInternalUtilities
+							.getMarkerLimit()),
+					String.valueOf(getChildrenCount()) });
 		}
 		if (size == 1)
 			return NLS.bind(MarkerMessages.Category_One_Item_Label,
@@ -110,23 +112,25 @@ class MarkerCategory extends MarkerSupportItem {
 
 	}
 
-	 /**
+	/**
 	 * Get the highest severity in the receiver.
+	 * 
 	 * @return int
 	 */
 	int getHighestSeverity() {
-		if(severity  >= 0)
+		if (severity >= 0)
 			return severity;
-		severity = 0;//Reset to info
+		severity = 0;// Reset to info
 		MarkerSupportItem[] contents = getChildren();
 		for (int i = 0; i < contents.length; i++) {
-			if(contents[i].isConcrete()){
-				int elementSeverity = contents[i].getAttributeValue(IMarker.SEVERITY, -1);
-				if(elementSeverity > severity)
+			if (contents[i].isConcrete()) {
+				int elementSeverity = contents[i].getAttributeValue(
+						IMarker.SEVERITY, -1);
+				if (elementSeverity > severity)
 					severity = elementSeverity;
-				if(severity == IMarker.SEVERITY_ERROR)//As bad as it gets
+				if (severity == IMarker.SEVERITY_ERROR)// As bad as it gets
 					return severity;
-			}			
+			}
 		}
 		return severity;
 	}
@@ -140,26 +144,68 @@ class MarkerCategory extends MarkerSupportItem {
 		return name;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getParent()
 	 */
 	MarkerSupportItem getParent() {
 		return null;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#isConcrete()
 	 */
 	boolean isConcrete() {
 		return false;
 	}
+
 	/**
 	 * Clear the cached values for performance reasons.
 	 */
 	void clearCache() {
-		MarkerSupportItem[] entries=getChildren();
+		MarkerSupportItem[] entries = getChildren();
 		for (int i = 0; i < entries.length; i++) {
 			entries[i].clearCache();
 		}
 	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((markers == null) ? 0 : markers.hashCode());
+		result = prime * result + ((name == null) ? 0 : name.hashCode());
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		MarkerCategory other = (MarkerCategory) obj;
+		if (markers == null) {
+			if (other.markers != null)
+				return false;
+		} else if (!markers.equals(other.markers))
+			return false;
+		if (name == null) {
+			if (other.name != null)
+				return false;
+		} else if (!name.equals(other.name))
+			return false;
+		return true;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCompletionField.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCompletionField.java
index c65f825..b518044 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCompletionField.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerCompletionField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,7 +23,6 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.internal.ide.Policy;
 import org.eclipse.ui.views.markers.MarkerField;
 import org.eclipse.ui.views.markers.MarkerItem;
-import org.eclipse.ui.views.markers.internal.MarkerMessages;
 
 /**
  * MarkerCompletionField is the class that specifies the completion entry.
@@ -138,7 +137,7 @@ public class MarkerCompletionField extends MarkerField {
 	 * @see org.eclipse.ui.internal.provisional.views.markers.api.MarkerField#getColumnTooltipText()
 	 */
 	public String getColumnTooltipText() {
-		return MarkerMessages.completion_description;
+		return getName();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
index 5e0c94a..90876f1 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,32 +11,44 @@
 
 package org.eclipse.ui.internal.views.markers;
 
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.HashSet;
+import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.mapping.ResourceMapping;
 import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.internal.AggregateWorkingSet;
-import org.eclipse.ui.internal.ide.Policy;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.views.markers.FilterConfigurationArea;
 import org.eclipse.ui.views.markers.MarkerField;
+import org.eclipse.ui.views.markers.internal.ContentGeneratorDescriptor;
 import org.eclipse.ui.views.markers.internal.MarkerGroup;
-import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 import org.eclipse.ui.views.markers.internal.MarkerType;
 import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
+import org.eclipse.ui.views.markers.internal.ProblemFilter;
+import org.eclipse.ui.views.markers.internal.Util;
 
 /**
  * MarkerContentGenerator is the representation of the markerContentGenerator
@@ -47,417 +59,595 @@ import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
  */
 public class MarkerContentGenerator {
 
-	private static final String ATTRIBUTE_DEFAULT_MARKER_GROUPING = "defaultMarkerGrouping"; //$NON-NLS-1$
-	private static final String ATTRIBUTE_VISIBLE = "visible"; //$NON-NLS-1$
+	/**
+	 * The IMemeto Tags
+	 */
+	private static final String TAG_COLUMN_VISIBILITY = "visible"; //$NON-NLS-1$
+	private static final String TAG_FILTERS_SECTION = "filterGroups"; //$NON-NLS-1$
+	private static final String TAG_GROUP_ENTRY = "filterGroup"; //$NON-NLS-1$
+	private static final String TAG_AND = "andFilters"; //$NON-NLS-1$
+	private static final String TAG_LEGACY_FILTER_ENTRY = "filter"; //$NON-NLS-1$
+	
+	/*Use this to indicate filter change rather than a null*/
+	private final Collection FILTERS_CHANGED = Collections.EMPTY_SET;
+
+	//Carries the description for the generator, as coded in the given extension point
+	private ContentGeneratorDescriptor generatorDescriptor;
+
+	// fields
+	private MarkerField[] visibleFields;
+
+	// filters
+	private Collection enabledFilters;
+	private Collection filters;
+	private boolean andFilters = false;
 
 	/**
-	 * The job family for content updates
+	 * focusResources
+	 * 
 	 */
-	public static final Object CACHE_UPDATE_FAMILY = new Object();
-	private static final String ELEMENT_MARKER_FIELD_CONFIGURATION = "markerFieldConfiguration"; //$NON-NLS-1$;
-	private static final IResource[] EMPTY_RESOURCE_ARRAY = new IResource[0];
-	private static final String MARKER_FIELD_REFERENCE = "markerFieldReference"; //$NON-NLS-1$
+	private IResource[] selectedResources = MarkerSupportInternalUtilities.EMPTY_RESOURCE_ARRAY;
+	
+	private Collection currentResources = Collections.EMPTY_SET;
 
-	private MarkerField[] allFields;
-	private IConfigurationElement configurationElement;
-	private Collection markerTypes;
-	private MarkerField[] initialVisible;
-	private Collection groups;
-	private Collection generatorExtensions = new ArrayList();
-	private Map allTypesTable;
+	private CachedMarkerBuilder builder;
+	private String viewId;
 
+	private IPropertyChangeListener filterPreferenceListener;
+	
 	/**
 	 * Create a new MarkerContentGenerator
 	 * 
-	 * @param element
+	 * @param generatorDescriptor
+	 * @param builder
+	 * @param viewId
+	 * 				needed for backward compatibility
 	 */
-	public MarkerContentGenerator(IConfigurationElement element) {
-		configurationElement = element;
+	public MarkerContentGenerator(
+			ContentGeneratorDescriptor generatorDescriptor,
+			CachedMarkerBuilder builder, String viewId) {
+		this.generatorDescriptor = generatorDescriptor;
+		this.viewId = viewId;
+		setBuilder(builder);
 	}
 
 	/**
-	 * Add the groups defined in the receiver to the collection of groups.
+	 * Attach the generator to a builder
 	 * 
-	 * @param groups
+	 * @param builder
 	 */
-	private void addDefinedGroups(Collection groups) {
-		// Add the ones in the receiver.
-		addGroupsFrom(configurationElement, groups);
-		// Add the extensions
-		Iterator extensions = generatorExtensions.iterator();
-		while (extensions.hasNext()) {
-			addGroupsFrom((IConfigurationElement) extensions.next(), groups);
-		}
+	void setBuilder(CachedMarkerBuilder builder) {
+		this.builder = builder;
+		initializePreferenceListener();
+		this.builder.setGenerator(this);
 	}
 
 	/**
-	 * Add the extensions to the receiver.
-	 * 
-	 * @param extensions
-	 *            Collection of {@link IConfigurationElement}
+	 * @return Returns the builder this attached to.
 	 */
-	public void addExtensions(Collection extensions) {
-		generatorExtensions = extensions;
-
+	CachedMarkerBuilder getBuilder() {
+		return builder;
 	}
 
 	/**
-	 * Add all of the markerGroups defined in element.
-	 * 
-	 * @param groups
+	 * If attached to a builder, request marker update.
 	 */
-	private void addGroupsFrom(IConfigurationElement element, Collection groups) {
-		IConfigurationElement[] groupings = element
-				.getChildren(MarkerSupportRegistry.MARKER_GROUPING);
-
-		for (int i = 0; i < groupings.length; i++) {
-
-			groups.add(MarkerGroup.createMarkerGroup(groupings[i]));
+	void requestMarkerUpdate() {
+		if (builder != null) {
+			builder.scheduleUpdate(0L);
 		}
 	}
 
 	/**
-	 * Return whether or not all of {@link MarkerTypesModel} arein
-	 * the selectedTypes.
+	 * Return whether or not all of {@link MarkerTypesModel} arein the
+	 * selectedTypes.
+	 * 
 	 * @param selectedTypes
 	 * @return boolean
 	 */
 	boolean allTypesSelected(Collection selectedTypes) {
-		return selectedTypes.containsAll(markerTypes);
+		return generatorDescriptor.allTypesSelected(selectedTypes);
 	}
 
 	/**
-	 * Compute all of the markers for the receiver's type.
+	 * Get the all of the fields that this content generator is using.
 	 * 
-	 * @param subMonitor
-	 * @return MarkerEntry
+	 * @return {@link MarkerField}[]
 	 */
-	private Collection computeAllMarkers(SubProgressMonitor subMonitor) {
-		Collection allMarkers = new HashSet();
-		findMarkers(allMarkers, new IResource[] { ResourcesPlugin
-				.getWorkspace().getRoot() }, null, IResource.DEPTH_INFINITE,
-				subMonitor);
-		return allMarkers;
+	MarkerField[] getAllFields() {
+		return generatorDescriptor.getAllFields();
 	}
 
 	/**
-	 * Compute the marker for the supplied filter and add to return markers.
+	 * Get the fields that this content generator is displaying.
 	 * 
-	 * @param returnMarkers
-	 *            {@link Collection} of {@link IMarker}
-	 * @param subMonitor
-	 * @param filterGroup
-	 * @param focusResources
-	 *            the resource currently selected
+	 * @return {@link MarkerField}[]
 	 */
-	private void computeMarkers(Collection returnMarkers,
-			SubProgressMonitor subMonitor, MarkerFieldFilterGroup filterGroup,
-			IResource[] focusResources) {
+	MarkerField[] getVisibleFields() {
+		return visibleFields;
+	}
 
-		int filterType = filterGroup.getScope();
-		
-		filterGroup.refresh(); 
-		
-		switch (filterType) {
-		case MarkerFieldFilterGroup.ON_ANY: {
-			findMarkers(returnMarkers, new IResource[] { ResourcesPlugin
-					.getWorkspace().getRoot() }, filterGroup,
-					IResource.DEPTH_INFINITE, subMonitor);
-			break;
+	/**
+	 * Set the visible fields.
+	 * 
+	 * @param visible
+	 */
+	void setVisibleFields(Collection visible) {
+
+		MarkerField[] newFields = new MarkerField[visible.size()];
+		visible.toArray(newFields);
+		visibleFields = newFields;
+
+	}
+
+	/**
+	 * Return the fields not being shown currently.
+	 * 
+	 * @return Object[]
+	 */
+	Object[] getHiddenFields() {
+		MarkerField[] all = getAllFields();
+		MarkerField[] visible = getVisibleFields();
+
+		Collection hidden = new HashSet();
+		for (int i = 0; i < all.length; i++) {
+			hidden.add(all[i]);
 		}
-		case MarkerFieldFilterGroup.ON_SELECTED_ONLY: {
-			findMarkers(returnMarkers, focusResources, filterGroup,
-					IResource.DEPTH_ZERO, subMonitor);
-			break;
+		for (int i = 0; i < visible.length; i++) {
+			hidden.remove(visible[i]);
 		}
-		case MarkerFieldFilterGroup.ON_SELECTED_AND_CHILDREN: {
-			findMarkers(returnMarkers, focusResources, filterGroup,
-					IResource.DEPTH_INFINITE, subMonitor);
-			break;
+		return hidden.toArray();
+	}
+
+	void initialise(IMemento memento) {
+		initialiseVisibleFields(memento);
+	}
+
+	void saveSate(IMemento memento, MarkerField[] displayedFields) {
+		for (int i = 0; i < displayedFields.length; i++) {
+			memento.createChild(TAG_COLUMN_VISIBILITY, displayedFields[i]
+					.getConfigurationElement().getAttribute(
+							MarkerSupportInternalUtilities.ATTRIBUTE_ID));
+		}
+	}
+
+	void restoreState(IMemento memento) {
+		initialiseVisibleFields(memento);
+	}
+
+	/**
+	 * Initialize the visible fields based on the initial settings or the
+	 * contents of the {@link IMemento}
+	 * 
+	 * @param memento
+	 *            IMemento
+	 */
+	private void initialiseVisibleFields(IMemento memento) {
+
+		if (memento == null
+				|| memento.getChildren(TAG_COLUMN_VISIBILITY).length == 0) {
+			MarkerField[] initialFields = getInitialVisible();
+
+			visibleFields = new MarkerField[initialFields.length];
+			System.arraycopy(initialFields, 0, visibleFields, 0,
+					initialFields.length);
+			return;
 		}
-		case MarkerFieldFilterGroup.ON_ANY_IN_SAME_CONTAINER: {
-			findMarkers(returnMarkers, getProjects(focusResources),
-					filterGroup, IResource.DEPTH_INFINITE, subMonitor);
-			break;
+
+		IMemento[] visible = memento.getChildren(TAG_COLUMN_VISIBILITY);
+		Collection newVisible = new ArrayList();
+
+		MarkerField[] all = getAllFields();
+		Hashtable allTable = new Hashtable();
+
+		for (int i = 0; i < all.length; i++) {
+			allTable.put(all[i].getConfigurationElement().getAttribute(
+					MarkerSupportInternalUtilities.ATTRIBUTE_ID), all[i]);
 		}
-		case MarkerFieldFilterGroup.ON_WORKING_SET: {
-			findMarkers(returnMarkers, getResourcesInWorkingSet(filterGroup
-					.getWorkingSet()), filterGroup, IResource.DEPTH_INFINITE,
-					subMonitor);
+
+		for (int i = 0; i < visible.length; i++) {
+			String key = visible[i].getID();
+			if (allTable.containsKey(key)) {
+				newVisible.add(allTable.get(key));
+			}
 		}
+
+		visibleFields = new MarkerField[newVisible.size()];
+		newVisible.toArray(visibleFields);
+	}
+
+	/**
+	 * Return a collection of all of the configuration fields for this generator
+	 * 
+	 * @return Collection of {@link FilterConfigurationArea}
+	 */
+	Collection createFilterConfigurationFields() {
+		Collection result = new ArrayList();
+		for (int i = 0; i < visibleFields.length; i++) {
+			FilterConfigurationArea area = MarkerSupportInternalUtilities
+					.generateFilterArea(visibleFields[i]);
+			if (area != null)
+				result.add(area);
+
 		}
+		return result;
+	}
+
+	/**
+	 * Get the category name from the receiver.
+	 */
+	String getCategoryName() {
+		return generatorDescriptor.getCategoryName();
 
 	}
 
 	/**
-	 * Add all of the markers that pass the filters to results.
+	 * Return all of the filters for the receiver.
 	 * 
-	 * @param results
-	 *            Collection of {@link IMarker}
-	 * @param group
-	 * @param markers
+	 * @return Collection of MarkerFieldFilterGroup
 	 */
-	private void filterMarkers(Collection results,
-			MarkerFieldFilterGroup group, IMarker[] markers) {
-		for (int idx = 0; idx < markers.length; idx++) {
-			IMarker marker = markers[idx];
-			if (group == null || group.select(marker))
-				results.add(marker);
+	Collection getAllFilters() {
+		if (filters == null || filters == FILTERS_CHANGED) {
+			filters = getDeclaredFilters();
+			// Apply the last settings
+			loadFiltersPreference();
+
 		}
+		return filters;
 	}
 
 	/**
-	 * Iterate through the return markers. If they do not exist in matching
-	 * remove them.
+	 * Return the currently enabled filters.
 	 * 
-	 * @param matching
-	 * @param returnMarkers
+	 * @return Collection of MarkerFieldFilterGroup
 	 */
-	private void findIntersection(Collection matching, Collection returnMarkers) {
-		HashSet removeMarkers = new HashSet();
-		Iterator existing = returnMarkers.iterator();
-		while (existing.hasNext()) {
-			Object next = existing.next();
-			if (matching.contains(next))
-				continue;
-			removeMarkers.add(next);
+	Collection getEnabledFilters() {
+		if (enabledFilters == null || enabledFilters == FILTERS_CHANGED) {
+			Collection enabled = new HashSet();
+			Iterator filtersIterator = getAllFilters().iterator();
+			while (filtersIterator.hasNext()) {
+				MarkerFieldFilterGroup next = (MarkerFieldFilterGroup) filtersIterator
+						.next();
+				if (next.isEnabled())
+					enabled.add(next);
+			}
+			enabledFilters = enabled;
 		}
-		returnMarkers.removeAll(removeMarkers);
+		return enabledFilters;
+	}
 
+	/**
+	 * Rebuild the list of filters
+	 */
+	protected void rebuildFilters() {
+		filters = FILTERS_CHANGED;
+		enabledFilters = FILTERS_CHANGED;
+		requestMarkerUpdate();
 	}
 
 	/**
-	 * Adds all markers in the given set of resources to the given list
+	 * Disable all of the filters in the receiver.
+	 */
+	void disableAllFilters() {
+		Collection allFilters = getEnabledFilters();
+		Iterator enabled = allFilters.iterator();
+		while (enabled.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) enabled
+					.next();
+			group.setEnabled(false);
+		}
+		allFilters.clear();
+		writeFiltersPreference();
+		requestMarkerUpdate();
+	}
+
+	/**
+	 * Add group to the enabled filters.
 	 * 
-	 * @param results
-	 *            The Collection to add new entries to
-	 * @param resources
 	 * @param group
-	 *            the group to filter on. May be <code>null</code>.
-	 * @param depth
-	 * @param monitor
 	 */
-	private void findMarkers(Collection results, IResource[] resources,
-			MarkerFieldFilterGroup group, int depth, IProgressMonitor monitor) {
-		if (resources == null) {
-			return;
+	void toggleFilter(MarkerFieldFilterGroup group) {
+		Collection enabled = getEnabledFilters();
+		if (enabled.remove(group)) // true if it was present
+			group.setEnabled(false);
+
+		else {
+			group.setEnabled(true);
+			enabled.add(group);
 		}
-	
-		// Optimisation: if a type appears in the selectedTypes list along with
-		// all of its sub-types, then combine these in a single search.
-	
-		Collection selectedTypes = getMarkerTypes();
-	
-		// List of types that haven't been replaced by one of their super-types
-		HashSet typesToSearch = new HashSet(selectedTypes.size());
-	
-		// List of types that appeared in selectedTypes along with all of their
-		// sub-types
-		HashSet includeAllSubtypes = new HashSet(selectedTypes.size());
-	
-		typesToSearch.addAll(selectedTypes);
-	
-		Iterator iter = selectedTypes.iterator();
-	
-		while (iter.hasNext()) {
-			MarkerType type = (MarkerType) iter.next();
-	
-			Collection subtypes = Arrays.asList(type.getAllSubTypes());
-	
-			if (selectedTypes.containsAll(subtypes)) {
-				typesToSearch.removeAll(subtypes);
-	
-				includeAllSubtypes.add(type);
-			}
+		writeFiltersPreference();
+		requestMarkerUpdate();
+	}
+
+	/**
+	 * Update the filters.
+	 * 
+	 * @param filters
+	 * @param andFilters
+	 */
+	void updateFilters(Collection filters, boolean andFilters) {
+		setAndFilters(andFilters);
+		this.filters = filters;
+		enabledFilters = FILTERS_CHANGED;
+		writeFiltersPreference();
+		requestMarkerUpdate();
+	}
+
+	/**
+	 * Set whether the filters are being ANDed or ORed.
+	 * 
+	 * @param and
+	 */
+	void setAndFilters(boolean and) {
+		andFilters = and;
+	}
+
+	/**
+	 * Return whether the filters are being ANDed or ORed.
+	 * 
+	 * @return boolean
+	 */
+	boolean andFilters() {
+		return andFilters;
+	}
+
+	/**
+	 * @return Collection of declared MarkerFieldFilterGroup(s)
+	 */
+	Collection getDeclaredFilters() {
+		List filters = new ArrayList();
+		IConfigurationElement[] filterReferences = generatorDescriptor.getFilterReferences();
+		for (int i = 0; i < filterReferences.length; i++) {
+			filters.add(new MarkerFieldFilterGroup(filterReferences[i], this));
 		}
-	
-		monitor.beginTask(MarkerMessages.MarkerFilter_searching, typesToSearch
-				.size()
-				* resources.length);
-	
-		// Use this hash set to determine if there are any resources in the
-		// list that appear along with their parent.
-		HashSet resourcesToSearch = new HashSet();
-	
-		// Insert all the resources into the Set
-		for (int idx = 0; idx < resources.length; idx++) {
-			IResource next = resources[idx];
-	
-			if (!next.exists())
-				continue;
-	
-			if (resourcesToSearch.contains(next))
-				monitor.worked(typesToSearch.size());
-			else
-				resourcesToSearch.add(next);
+
+		// Honour the deprecated problemFilters
+		if (viewId != null && viewId.equals(IPageLayout.ID_PROBLEM_VIEW)) {
+			Iterator problemFilters = MarkerSupportRegistry.getInstance()
+					.getRegisteredFilters().iterator();
+			while (problemFilters.hasNext())
+				filters.add(new CompatibilityMarkerFieldFilterGroup(
+						(ProblemFilter) problemFilters.next(), this));
 		}
-	
-		// Iterate through all the selected resources
-		for (int resourceIdx = 0; resourceIdx < resources.length; resourceIdx++) {
-			iter = typesToSearch.iterator();
-	
-			IResource resource = resources[resourceIdx];
-	
-			// Skip resources that don't exist
-			if (!resource.isAccessible()) {
+		return filters;
+	}
+
+	/**
+	 * Get the name of the filters preference for the receiver,
+	 * 
+	 * @return String
+	 */
+	private String getLegacyFiltersPreferenceName() {
+		if (viewId != null && viewId.equals(IPageLayout.ID_BOOKMARKS))
+			return IDEInternalPreferences.BOOKMARKS_FILTERS;
+		if (viewId != null && viewId.equals(IPageLayout.ID_TASK_LIST))
+			return IDEInternalPreferences.TASKS_FILTERS;
+		return IDEInternalPreferences.PROBLEMS_FILTERS;
+
+	}
+
+	/**
+	 * Load the settings from the memento.
+	 * 
+	 * @param memento
+	 */
+	private void loadFilterSettings(IMemento memento) {
+
+		if (memento == null)
+			return;
+
+		Boolean andValue = memento.getBoolean(TAG_AND);
+		if (andValue != null)
+			setAndFilters(andValue.booleanValue());
+		IMemento children[] = memento.getChildren(TAG_GROUP_ENTRY);
+
+		for (int i = 0; i < children.length; i++) {
+			IMemento child = children[i];
+			String id = child.getString(IMemento.TAG_ID);
+			if (id == null)
 				continue;
-			}
-	
-			if (depth == IResource.DEPTH_INFINITE) {
-				// Determine if any parent of this resource is also in our
-				// filter
-				IResource parent = resource.getParent();
-				boolean found = false;
-				while (parent != null) {
-					if (resourcesToSearch.contains(parent)) {
-						found = true;
-					}
-	
-					parent = parent.getParent();
-				}
-	
-				// If a parent of this resource is also in the filter, we can
-				// skip it
-				// because we'll pick up its markers when we search the parent.
-				if (found) {
-					continue;
-				}
-			}
-	
-			// Iterate through all the marker types
-			while (iter.hasNext()) {
-				MarkerType markerType = (MarkerType) iter.next();
-				try {
-					// Only search for sub-types of the marker if we found all
-					// of
-					// its sub-types in the filter criteria.
-					IMarker[] markers = resource.findMarkers(
-							markerType.getId(), includeAllSubtypes
-									.contains(markerType), depth);
-	
-					monitor.worked(1);
-	
-					filterMarkers(results, group, markers);
-	
-				} catch (CoreException e) {
-					Policy.handle(e);
-				}
-			}
+			if (!loadGroupWithID(child, id))
+
+				// Did not find a match must have been added by the user
+				loadUserFilter(child);
 		}
-	
-		monitor.done();
+
 	}
 
 	/**
-	 * Re-generate all of the markers and filter them based on the enabled
-	 * filters.
+	 * Load the filters defined in memento string.
 	 * 
-	 * @param subMonitor
-	 * @param andFilters
-	 *            if <code>true</code> return the intersection of the filters
-	 * @param focusResources
-	 *            the current selected resources
-	 * @param enabledFilters
-	 *            the enabled {@link MarkerFieldFilterGroup}s to apply
-	 * @return MarkerMap
-	 */
-	MarkerMap generateFilteredMarkers(SubProgressMonitor subMonitor,
-			boolean andFilters, IResource[] focusResources,
-			Collection enabledFilters) {
-
-		Collection returnMarkers = null;
-		if (enabledFilters.size() > 0) {
-			Iterator filtersIterator = enabledFilters.iterator();
-			if (andFilters) {
-				Collection matching = new HashSet();
-				while (filtersIterator.hasNext()) {
+	 * @param mementoString
+	 */
+	private void loadFiltersFrom(String mementoString) {
+		if (mementoString.equals(IPreferenceStore.STRING_DEFAULT_DEFAULT))
+			return;
 
-					computeMarkers(matching, subMonitor,
-							(MarkerFieldFilterGroup) filtersIterator.next(),
-							focusResources);
-					if (returnMarkers == null)
-						returnMarkers = new HashSet(matching);
-					else
-						findIntersection(matching, returnMarkers);
-					matching.clear();
-				}
+		try {
+			loadFilterSettings(XMLMemento.createReadRoot(new StringReader(
+					mementoString)));
+		} catch (WorkbenchException e) {
+			StatusManager.getManager().handle(e.getStatus());
+		}
+	}
 
-			} else {
-				returnMarkers = new HashSet();
-				while (filtersIterator.hasNext()) {
-					computeMarkers(returnMarkers, subMonitor,
-							(MarkerFieldFilterGroup) filtersIterator.next(),
-							focusResources);
-				}
+	/**
+	 * Load the filters preference.
+	 */
+	private void loadFiltersPreference() {
+
+		loadFiltersFrom(IDEWorkbenchPlugin.getDefault().getPreferenceStore()
+				.getString(getMementoPreferenceName()));
+
+		String legacyFilters = getLegacyFiltersPreferenceName();
+		String migrationPreference = legacyFilters
+				+ MarkerSupportInternalUtilities.MIGRATE_PREFERENCE_CONSTANT;
+
+		if (IDEWorkbenchPlugin.getDefault().getPreferenceStore().getBoolean(
+				migrationPreference))
+			return;// Already migrated
+
+		// Load any defined in a pre 3.4 workbench
+		loadLegacyFiltersFrom(IDEWorkbenchPlugin.getDefault()
+				.getPreferenceStore().getString(legacyFilters));
+
+		// Mark as migrated
+		IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
+				migrationPreference, true);
+	}
+
+	/**
+	 * @return preferenceName
+	 */
+	private String getMementoPreferenceName() {
+		return CachedMarkerBuilder.getMementoPreferenceName(viewId);
+	}
+
+	/**
+	 * Load the group with id from the child if there is a matching system group
+	 * registered.
+	 * 
+	 * @param child
+	 * @param id
+	 * @return <code>true</code> if a matching group was found
+	 */
+	private boolean loadGroupWithID(IMemento child, String id) {
+		Iterator groups = getAllFilters().iterator();
+
+		while (groups.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
+					.next();
+			if (id.equals(group.getID())) {
+				group.loadSettings(child);
+				return true;
 			}
+		}
+		return false;
+	}
 
-		} else
-			returnMarkers = computeAllMarkers(subMonitor);
-		MarkerEntry[] entries = new MarkerEntry[returnMarkers.size()];
-		Iterator markers = returnMarkers.iterator();
-		int index = 0;
-		// Convert to entries
-		while (markers.hasNext()) {
-			entries[index] = new MarkerEntry((IMarker) markers.next());
-			index++;
+	/**
+	 * Load the legacy filter into the system.
+	 * 
+	 * @param child
+	 */
+	private void loadLegacyFilter(IMemento child) {
+		MarkerFieldFilterGroup newGroup = new MarkerFieldFilterGroup(null, this);
+		newGroup.legacyLoadSettings(child);
+		getAllFilters().add(newGroup);
+
+	}
+
+	/**
+	 * Load the pre-3.4 filters.
+	 * 
+	 * @param mementoString
+	 */
+	private void loadLegacyFiltersFrom(String mementoString) {
+
+		if (mementoString.equals(IPreferenceStore.STRING_DEFAULT_DEFAULT))
+			return;
+		IMemento memento;
+		try {
+			memento = XMLMemento
+					.createReadRoot(new StringReader(mementoString));
+			restoreLegacyFilters(memento);
+		} catch (WorkbenchException e) {
+			StatusManager.getManager().handle(e.getStatus());
+			return;
 		}
 
-		return new MarkerMap(entries);
 	}
 
 	/**
-	 * Get the all of the fields that this content generator is using.
+	 * Load the user supplied filter
 	 * 
-	 * @return {@link MarkerField}[]
+	 * @param child
 	 */
-	MarkerField[] getAllFields() {
-		return allFields;
+	private void loadUserFilter(IMemento child) {
+		MarkerFieldFilterGroup newGroup = new MarkerFieldFilterGroup(null, this);
+		newGroup.loadSettings(child);
+		getAllFilters().add(newGroup);
 	}
 
 	/**
-	 * Get the category name from the receiver.
+	 * Restore the pre-3.4 filters.
+	 * 
+	 * @param memento
 	 */
-	String getCategoryName() {
-		return configurationElement
-				.getAttribute(ATTRIBUTE_DEFAULT_MARKER_GROUPING);
+	private void restoreLegacyFilters(IMemento memento) {
+
+		IMemento[] sections = null;
+		if (memento != null)
+			sections = memento.getChildren(TAG_LEGACY_FILTER_ENTRY);
+
+		for (int i = 0; i < sections.length; i++) {
+			IMemento child = sections[i];
+			String id = child.getString(IMemento.TAG_ID);
+			if (id == null)
+				continue;
+			loadLegacyFilter(child);
+		}
 
 	}
 
 	/**
-	 * Return the configuration elements for the receiver.
 	 * 
-	 * @return IConfigurationElement[]
 	 */
-	IConfigurationElement[] getFilterReferences() {
-		IConfigurationElement[] filterGroups = configurationElement
-				.getChildren(ELEMENT_MARKER_FIELD_CONFIGURATION);
-		if (generatorExtensions.isEmpty())
-			return filterGroups;
-		Iterator extensions = generatorExtensions.iterator();
-		Collection extendedElements = new ArrayList();
-		while (extensions.hasNext()) {
-			IConfigurationElement extension = (IConfigurationElement) extensions
-					.next();
-			IConfigurationElement[] extensionFilters = extension
-					.getChildren(ELEMENT_MARKER_FIELD_CONFIGURATION);
-			for (int i = 0; i < extensionFilters.length; i++) {
-				extendedElements.add(extensionFilters[i]);
-			}
+	private void writeFiltersPreference() {
+		XMLMemento memento = XMLMemento.createWriteRoot(TAG_FILTERS_SECTION);
+
+		writeFiltersSettings(memento);
+
+		StringWriter writer = new StringWriter();
+		try {
+			memento.save(writer);
+		} catch (IOException e) {
+			IDEWorkbenchPlugin.getDefault().getLog().log(Util.errorStatus(e));
 		}
-		if (extendedElements.size() > 0) {
-			IConfigurationElement[] allGroups = new IConfigurationElement[filterGroups.length
-					+ extendedElements.size()];
-			System
-					.arraycopy(filterGroups, 0, allGroups, 0,
-							filterGroups.length);
-			Iterator extras = extendedElements.iterator();
-			int index = filterGroups.length;
-			while (extras.hasNext()) {
-				allGroups[index] = (IConfigurationElement) extras.next();
-			}
-			return allGroups;
+		// TODO: We need to migrate this the current class
+		IDEWorkbenchPlugin.getDefault().getPreferenceStore().putValue(
+				getMementoPreferenceName(),
+				writer.toString());
+		IDEWorkbenchPlugin.getDefault().savePluginPreferences();
+	}
+
+	/**
+	 * Create a preference listener for any preference updates.
+	 */
+	private void initializePreferenceListener() {
+		if (filterPreferenceListener == null) {
+			filterPreferenceListener = new IPropertyChangeListener() {
+
+				public void propertyChange(PropertyChangeEvent event) {
+					if (event.getProperty().equals(getMementoPreferenceName())) {
+						rebuildFilters();
+					}
+
+				}
+			};
+			IDEWorkbenchPlugin.getDefault().getPreferenceStore()
+					.addPropertyChangeListener(filterPreferenceListener);
+		}
+	}
+
+	/**
+	 * Write the settings for the filters to the memento.
+	 * 
+	 * @param memento
+	 */
+	private void writeFiltersSettings(XMLMemento memento) {
+
+		memento.putBoolean(TAG_AND, andFilters());
+
+		Iterator groups = getAllFilters().iterator();
+		while (groups.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) groups
+					.next();
+			IMemento child = memento
+					.createChild(TAG_GROUP_ENTRY, group.getID());
+			group.saveFilterSettings(child);
 		}
-		return filterGroups;
+
 	}
 
 	/**
@@ -466,8 +656,22 @@ public class MarkerContentGenerator {
 	 * @return String
 	 */
 	public String getId() {
-		return configurationElement
-				.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID);
+		return generatorDescriptor.getId();
+	}
+
+	/**
+	 * @param viewId
+	 *            if attached to a view
+	 */
+	void setViewID(String viewId) {
+		this.viewId = viewId;
+	}
+
+	/**
+	 * @return Returns the viewId of view it is attached to or null otherwise.
+	 */
+	public Object getViewId() {
+		return viewId;
 	}
 
 	/**
@@ -476,7 +680,7 @@ public class MarkerContentGenerator {
 	 * @return {@link MarkerField}[]
 	 */
 	MarkerField[] getInitialVisible() {
-		return initialVisible;
+		return generatorDescriptor.getInitialVisible();
 	}
 
 	/**
@@ -501,21 +705,7 @@ public class MarkerContentGenerator {
 	 * @return Collection of {@link MarkerGroup}
 	 */
 	Collection getMarkerGroups() {
-
-		if (groups == null) {
-			groups = new HashSet();
-
-			// Add the groups defined in the receiver
-			addDefinedGroups(groups);
-
-			if (getId().equals(MarkerSupportRegistry.PROBLEMS_GENERATOR)) {
-				// Add the groups that reference the receiver.
-				groups.addAll(MarkerSupportRegistry.getInstance()
-						.getMarkerGroups());
-
-			}
-		}
-		return groups;
+		return generatorDescriptor.getMarkerGroups();
 	}
 
 	/**
@@ -524,31 +714,23 @@ public class MarkerContentGenerator {
 	 * @return Collection of {@link MarkerType}
 	 */
 	public Collection getMarkerTypes() {
-		if (markerTypes == null) {
-			markerTypes = new HashSet();
-			IConfigurationElement[] markerTypeElements = configurationElement
-					.getChildren(MarkerSupportRegistry.MARKER_TYPE_REFERENCE);
-			for (int i = 0; i < markerTypeElements.length; i++) {
-				IConfigurationElement configurationElement = markerTypeElements[i];
-				String elementName = configurationElement
-						.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID);
-				MarkerType[] types = MarkerTypesModel.getInstance().getType(
-						elementName).getAllSubTypes();
-				for (int j = 0; j < types.length; j++) {
-					markerTypes.add(types[j]);
-				}
-				markerTypes.add(MarkerTypesModel.getInstance().getType(
-						elementName));
-			}
-			if (markerTypes.isEmpty()) {
-				MarkerType[] types = MarkerTypesModel.getInstance().getType(
-						IMarker.PROBLEM).getAllSubTypes();
-				for (int i = 0; i < types.length; i++) {
-					markerTypes.add(types[i]);
-				}
-			}
+		return generatorDescriptor.getMarkerTypes();
+	}
+
+	/**
+	 * Return the markerTypes for the receiver.
+	 * 
+	 * @return Array of type Ids
+	 */
+	public String[] getTypes() {
+		Collection types = getMarkerTypes();
+		String[] ids = new String[types.size()];
+		Iterator iterator = types.iterator();
+		int i = 0;
+		while (iterator.hasNext()) {
+			ids[i++] = ((MarkerType) iterator.next()).getId();
 		}
-		return markerTypes;
+		return ids;
 	}
 
 	/**
@@ -557,136 +739,354 @@ public class MarkerContentGenerator {
 	 * @return String
 	 */
 	String getName() {
-		return configurationElement
-				.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_NAME);
+		return generatorDescriptor.getName();
 	}
 
 	/**
-	 * Return all of the projects being shown.
+	 * Return the type for typeId.
 	 * 
-	 * @param focusResources
-	 * @return IResource[]
+	 * @param typeId
+	 * @return {@link MarkerType} or <code>null</code> if it is not found.
 	 */
-	private IResource[] getProjects(IResource[] focusResources) {
+	MarkerType getType(String typeId) {
+		return generatorDescriptor.getType(typeId);
+	}
 
-		if (focusResources.length == 0)
-			return EMPTY_RESOURCE_ARRAY;
-		HashSet projects = new HashSet();
+	/**
+	 * Select the given MarkerEntry
+	 * 	@return <code>true</code> if it matches all enabled filters
+	 */
+	boolean select(MarkerEntry entry) {
+		try {
+			Collection enabledFilters = getEnabledFilters();
+			IResource[] resources = getSelectedResources();
+			boolean andFilters = andFilters();
+			if (enabledFilters.size() > 0) {
+				Iterator filtersIterator = enabledFilters.iterator();
+				if (andFilters) {
+					while (filtersIterator.hasNext()) {
+						MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+								.next();
+						if (!group.selectByScope(entry, resources)
+								|| !group.selectByFilters(entry)) {
+							return false;
+						}
+					}
+					return true;
+				}
 
-		for (int idx = 0; idx < focusResources.length; idx++) {
-			projects.add(focusResources[idx].getProject());
+				while (filtersIterator.hasNext()) {
+					MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+							.next();
+					if (group.selectByScope(entry, resources)
+							&& group.selectByFilters(entry)) {
+						return true;
+					}
+				}
+				return false;
+			}
+			return true;
+		} finally {
+			entry.clearCache();
 		}
-		if (projects.isEmpty())
-			return EMPTY_RESOURCE_ARRAY;
-		return (IResource[]) projects.toArray(new IResource[projects.size()]);
+	}
 
+	/**
+	 * Update the focus resources from list. If there is an update required
+	 * return <code>true</code>. This method assumes that there are filters on
+	 * resources enabled.
+	 * 
+	 * @param elements
+	 */
+	void internalUpdateSelectedElements(Object[] elements) {
+		Collection resourceCollection = new ArrayList();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i] instanceof IResource) {
+				resourceCollection.add(elements[i]);
+			} else {
+				MarkerResourceUtil.addResources(resourceCollection,
+						((ResourceMapping) elements[i]));
+			}
+		}
+		IResource[] newSelection = new IResource[resourceCollection.size()];
+		resourceCollection.toArray(newSelection);
+		selectedResources = newSelection;
 	}
 
 	/**
-	 * Get the resources in working set.
+	 * Update the receiver for a change in selection.
 	 * 
-	 * @param workingSet
-	 * @return IResource[]
+	 * @param newElements
 	 */
-	private IResource[] getResourcesInWorkingSet(IWorkingSet workingSet) {
+	void updateSelectedResource(Object[] newElements) {
+		if (updateNeededForSelection(newElements)) {
+			internalUpdateSelectedElements(newElements);
+			// See comments below and Bug 296695
+			// if (contentChanged()) {
+			requestMarkerUpdate();
+			// }
+		}
+	}
 
-		if (workingSet == null)
-			return new IResource[0];
+	/**
+	 * Return whether or not the list contains a resource that will require
+	 * update.
+	 * 
+	 * @return boolean <code>true</code> if update is required.
+	 */
+	boolean updateNeededForSelection(Object[] newElements) {
 
-		//Return workspace root for aggregates with no containing workingsets,ex. window working set
-		if (workingSet.isAggregateWorkingSet()&&workingSet.isEmpty()){
-			if(((AggregateWorkingSet) workingSet).getComponents().length==0)
-				return new IResource[] { ResourcesPlugin.getWorkspace().getRoot()};
-		}
-			
+		Iterator filters = getEnabledFilters().iterator();
 
-		IAdaptable[] elements = workingSet.getElements();
-		List result = new ArrayList(elements.length);
+		while (filters.hasNext()) {
+			MarkerFieldFilterGroup filter = (MarkerFieldFilterGroup) filters
+					.next();
 
-		for (int idx = 0; idx < elements.length; idx++) {
-			IResource next = (IResource) elements[idx]
-					.getAdapter(IResource.class);
+			int scope = filter.getScope();
+			if (scope == MarkerFieldFilterGroup.ON_ANY
+					|| scope == MarkerFieldFilterGroup.ON_WORKING_SET)
+				continue;
+
+			if (newElements == null || newElements.length < 1)
+				continue;
 
-			if (next != null) {
-				result.add(next);
+			if (selectedResources.length == 0)
+				return true; // We had nothing now we have something
+
+			if (Arrays.equals(selectedResources, newElements))
+				continue;
+
+			if (scope == MarkerFieldFilterGroup.ON_ANY_IN_SAME_CONTAINER) {
+				Collection oldProjects = MarkerResourceUtil
+						.getProjectsAsCollection(selectedResources);
+				Collection newProjects = MarkerResourceUtil
+						.getProjectsAsCollection(newElements);
+
+				if (oldProjects.size() == newProjects.size()
+						&& newProjects.containsAll(oldProjects))
+					continue;
+				return true;// Something must be different
 			}
+			return true;
 		}
 
-		return (IResource[]) result.toArray(new IResource[result.size()]);
-
+		return false;
 	}
 
 	/**
-	 * Return the type for typeId.
-	 * @param typeId
-	 * @return {@link MarkerType} or <code>null</code> if
-	 * it is not found.
+	 * @return list of selected resources
 	 */
-	MarkerType getType(String typeId) {
-		Map all = getTypesTable();
-		if(all.containsKey(typeId))
-			return (MarkerType) all.get(typeId);
-		return null;
+	IResource[] getSelectedResources() {
+		IResource[] selected=selectedResources;
+		IResource[] resources = new IResource[selected.length];
+		System.arraycopy(selected, 0, resources, 0,
+				selected.length);
+		return resources;
 	}
 
 	/**
-	 * Get the table that maps type ids to markerTypes.
-	 * @return Map of {@link String} to {@link MarkerType}
+	 * Note:As opposed to the previous scheme, the reason we gather markers only
+	 * for the "effective"(ored/anded) resource collection is because collecting
+	 * for individual filters and then adding them to a Set to remove duplicates
+	 * is a lot more time-consuming than collecting only once,filtering once and
+	 * adding to a list once.As a pre-filtering step, the
+	 * MarkerFieldFilterGroup#selectByScope uses IPath comparison for selection,
+	 * which happens real quickly.Also when filters are Anded we get a chance to
+	 * gather only on resources that actually matter.And we get a tool to check
+	 * at various places.
+	 * 
+	 * @return list of resource we want to collect markers for taking various
+	 *         enabled filters into account.
+	 * 
 	 */
-	private Map getTypesTable() {
-		if (allTypesTable == null) {
-			allTypesTable = new HashMap();
-			
-			Iterator allIterator = markerTypes.iterator();
-			while (allIterator.hasNext()) {
-				MarkerType next = (MarkerType) allIterator.next();
-				allTypesTable.put(next.getId(), next);
-			}
-		}
-		return allTypesTable;
+	Collection getResourcesForBuild() {
+		currentResources = MarkerResourceUtil.computeResources(
+				getSelectedResources(), getEnabledFilters(), andFilters());
+		return currentResources;
 	}
+	
+	/*
+	 * See Bug 296695: This method is trickier than it may seem/appears to be.If
+	 * it is ever desired to use this, it would need to be *RE-IMPLEMENTED* and
+	 * would need a good amount of testing with various combination of filters
+	 * and scopes. The key here is to understand and getting it right how filter
+	 * scope and our trimmed, optimized resources and selected resource elements
+	 * interact.
+	 * Another possible way to check if content has changed is by
+	 * comparing the markers gathered freshly with the previously gathered
+	 * markers(cache them when an update is not canceled), whether this up to a
+	 * visible limit, or completely, or selected filters we have to see. I am
+	 * assuming that this takes little time to do. If this is done prior to
+	 * sorting a good amount of time can be saved; we still save the UI time if
+	 * checked after sorting. In the sorted case we can use a Binary search as
+	 * well.Anyhow if this does take up time, we should skip this method.
+	 */
+//	/**
+//	 * Change in markers itself is taken care of by the IResourceChangeListener,
+//	 * We can think about change in the resource content when filters have
+//	 * changed or selections have changed and the particular update we perform
+//	 * manually is not required at all since nothing had changed.This is
+//	 * particularly useful when a filter is set to 'On Selected element scope'.A
+//	 * change in a filter is a combination of both its scope and other settings.
+//	 *
+//	 *
+//	 * @return true if the resource-content has changed due to change in filter
+//	 *         settings or selection. false if content has not change or an
+//	 *         update has cleared the changes.
+//	 */
+//	boolean contentChanged() {
+//		if (enabledFilters == null || enabledFilters == FILTERS_CHANGED) {
+//			/*
+//			 * TODO:Find a more narrowing way to check if active filters have
+//			 * actually changed.Right now the update filter method set the
+//			 * enabled filters to null. TODO: We should use a preference
+//			 * listener for this We can 'optimally' use it for filter change
+//			 * only on fixing the above.
+//			 */
+//			return true;
+//		}
+//		Collection current = MarkerResourceUtil.computeResources(
+//				getSelectedResources(), getEnabledFilters(), andFilters());
+//		Collection activeResources = currentResources;
+//		if (current.size() != activeResources.size()) {
+//			// changed
+//			return true;
+//		}
+//		Iterator iterator = activeResources.iterator();
+//		boolean needsUpdate = false;
+//		while (!needsUpdate && iterator.hasNext()) {
+//			Object object = iterator.next();
+//			if (!current.contains(object)) {
+//				needsUpdate = true;
+//			}
+//		}
+//		return needsUpdate;
+//	}
 
 	/**
-	 * Initialise the receiver from the configuration element. This is done as a
-	 * post processing step.
+	 * Refresh gathered markers entries
 	 * 
-	 * @param registry
-	 *            the MarkerSupportRegistry being used to initialise the
-	 *            receiver.
+	 * @param monitor
 	 */
-	public void initializeFromConfigurationElement(
-			MarkerSupportRegistry registry) {
-
-		IConfigurationElement[] elements = configurationElement
-				.getChildren(MARKER_FIELD_REFERENCE);
-		Collection allFieldList = new ArrayList();
-		Collection initialVisibleList = new ArrayList();
-		for (int i = 0; i < elements.length; i++) {
-			MarkerField field = registry.getField(elements[i]
-					.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID));
-			if (field == null)
-				continue;
-			allFieldList.add(field);
-			if (!MarkerSupportInternalUtilities.VALUE_FALSE.equals(elements[i]
-					.getAttribute(ATTRIBUTE_VISIBLE)))
-				initialVisibleList.add(field);
+	Collection generateMarkerEntries(IProgressMonitor monitor) {
+		List result = new LinkedList();
+		String[] typeIds = getTypes();
+		boolean includeSubTypes = builder.includeMarkerSubTypes();
+		boolean cancelled = gatherMarkers(typeIds, includeSubTypes, result,
+				monitor);
+		if (cancelled) {
+			result.clear();
 		}
+		return result;
+	}
 
-		allFields = new MarkerField[allFieldList.size()];
-		allFieldList.toArray(allFields);
-
-		initialVisible = new MarkerField[initialVisibleList.size()];
-		initialVisibleList.toArray(initialVisible);
+	/**
+	 * Refresh gathered markers entries
+	 * @param result
+	 * @param monitor
+	 */
+	boolean generateMarkerEntries(Collection result,IProgressMonitor monitor) {
+		String[] typeIds = getTypes();
+		boolean includeSubTypes = builder.includeMarkerSubTypes();
+		return gatherMarkers(typeIds, includeSubTypes, result, monitor);
+	}
 
+	/**
+	 * Gather markers into result.
+	 * @param typeIds
+	 * @param includeSubTypes
+	 * @param result
+	 * @param monitor
+	 */
+	boolean gatherMarkers(String[] typeIds, boolean includeSubTypes,
+			Collection result, IProgressMonitor monitor) {
+		try {
+			Collection resources = getResourcesForBuild();
+			if (includeSubTypes) {
+				// Optimize and calculate super types
+				String[] superTypes = MarkerResourceUtil
+						.getMutuallyExclusiveSupersIds(typeIds);
+				if (monitor.isCanceled()) {
+					return false;
+				}
+				for (int i = 0; i < superTypes.length; i++) {
+					boolean success = internalGatherMarkers(resources,superTypes[i],
+							includeSubTypes, result, monitor);
+					if (!success || monitor.isCanceled()) {
+						return false;
+					}
+				}
+			} else {
+				for (int i = 0; i < typeIds.length; i++) {
+					boolean success = internalGatherMarkers(resources,typeIds[i],
+							includeSubTypes, result, monitor);
+					if (!success || monitor.isCanceled()) {
+						return false;
+					}
+				}
+			}
+		} catch (Exception e) {
+			//do not propagate but do show the error
+			MarkerSupportInternalUtilities.showViewError(e);
+			return false;
+		} finally {
+		}
+		return true;
 	}
 
 	/**
-	 * Remove the element from the generator extensions
+	 * A helper to the
+	 * {@link #gatherMarkers(String[], boolean, Collection, IProgressMonitor)}
 	 * 
-	 * @param element
+	 * @param resources
+	 * @param typeId
+	 * @param includeSubTypes
+	 * @param result
+	 * @param monitor
 	 */
-	public void removeExtension(IConfigurationElement element) {
-		generatorExtensions.remove(element);
+	private boolean internalGatherMarkers(Collection resources, String typeId,
+			boolean includeSubTypes, Collection result, IProgressMonitor monitor) {
+		if (monitor.isCanceled()) {
+			return false;
+		}
+		Iterator iterator = resources.iterator();
+		while (iterator.hasNext()) {
+			IMarker[] markers = null;
+			try {
+				IResource resource = (IResource) iterator.next();
+				if (!resource.isAccessible()) {
+					continue;
+				}
+				markers = resource.findMarkers(typeId, includeSubTypes,
+						IResource.DEPTH_INFINITE);
+			} catch (CoreException e) {
+				MarkerSupportInternalUtilities.logViewError(e);
+			}
+			if (markers == null) {
+				continue;
+			}
+			if (monitor.isCanceled()) {
+				return false;
+			}
+			for (int i = 0; i < markers.length; i++) {
+				MarkerEntry entry = new MarkerEntry(markers[i]);
+				if (select(entry)) {
+					result.add(entry);
+				}
+				if (i % 500 == 0) {
+					if (monitor.isCanceled()) {
+						return false;
+					}
+				}
+			}
+		}
+		return true;
+	}
 
+	void dispose() {
+		if (filterPreferenceListener != null) {
+			IDEWorkbenchPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(filterPreferenceListener);
+			filterPreferenceListener = null;
+		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerDescriptionField.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerDescriptionField.java
index 2169acd..618bafa 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerDescriptionField.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerDescriptionField.java
@@ -1,7 +1,5 @@
-package org.eclipse.ui.internal.views.markers;
-
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +8,7 @@ package org.eclipse.ui.internal.views.markers;
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
+package org.eclipse.ui.internal.views.markers;
 
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
@@ -142,7 +141,7 @@ public class MarkerDescriptionField extends MarkerField {
 	private CollationKey getDescriptionKey(Object element) {
 		if (element instanceof MarkerEntry)
 			return ((MarkerEntry) element).getCollationKey(IMarker.MESSAGE,
-					MarkerSupportInternalUtilities.EMPTY_STRING);
+					MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING);
 		return MarkerSupportInternalUtilities.EMPTY_COLLATION_KEY;
 	}
 
@@ -153,7 +152,7 @@ public class MarkerDescriptionField extends MarkerField {
 	 */
 	public String getValue(MarkerItem item) {
 		return item.getAttributeValue(IMarker.MESSAGE,
-				MarkerSupportInternalUtilities.EMPTY_STRING);
+				MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerEntry.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerEntry.java
index 2c38da6..049b609 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerEntry.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerEntry.java
@@ -17,7 +17,9 @@ import java.util.Map;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IAdapterFactory;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.internal.ide.Policy;
 import org.eclipse.ui.views.markers.MarkerViewUtil;
@@ -35,12 +37,50 @@ import com.ibm.icu.text.Collator;
  * 
  */
 class MarkerEntry extends MarkerSupportItem implements IAdaptable {
+	static {
+		Platform.getAdapterManager().registerAdapters(new IAdapterFactory() {
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang
+			 * .Object, java.lang.Class)
+			 */
+			public Object getAdapter(Object adaptableObject, Class adapterType) {
+				if (adapterType == IMarker.class
+						&& adaptableObject instanceof MarkerEntry)
+					return ((MarkerEntry) adaptableObject).getMarker();
+
+				return null;
+			}
 
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
+			 */
+			public Class[] getAdapterList() {
+				return new Class[] { IMarker.class };
+			}
+		}, MarkerEntry.class);
+	}
 	// The key for the string we built for display
 	private static final Object LOCATION_STRING = "LOCATION_STRING"; //$NON-NLS-1$
 	private MarkerCategory category;
-	IMarker marker;
-	Map cache = null;
+	private Map cache = null;
+	
+	/**
+	 * Set the MarkerEntry to be stale, if discovered at any point of time
+	 * of its use.This will greatly speed up a lot of parts of the view.
+	 * @since 3.6
+	 */
+	private boolean stale;
+	/**
+	 * Important:
+	 * access to these fields must be via methods, they must be in sync and their
+	 * values should reflect correctly the state of the other
+	 */
+	private IMarker marker;
 
 	/**
 	 * Create a new instance of the receiver.
@@ -49,6 +89,7 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 */
 	public MarkerEntry(IMarker marker) {
 		this.marker = marker;
+		stale = false;
 	}
 
 	/*
@@ -97,12 +138,16 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 * @param attribute
 	 * @return Object or <code>null</code>
 	 */
-	private Object getAttributeValue(String attribute) {
+	Object getAttributeValue(String attribute) {
 		Object value = getCache().get(attribute);
 		if(value == null) {
+			if(stale){
+				return value;
+			}
 			try {
 				value = marker.getAttribute(attribute);
 			} catch (CoreException e) {
+				checkIfMarkerStale() ;
 				value = null;
 			}
 			if(value != null) {
@@ -184,9 +229,13 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getCreationTime()
 	 */
 	long getCreationTime() {
+		if(stale){
+			return -1;
+		}
 		try {
 			return marker.getCreationTime();
 		} catch (CoreException e) {
+			checkIfMarkerStale();
 			Policy.handle(e);
 			return -1;
 		}
@@ -199,7 +248,7 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 */
 	String getDescription() {
 		return getAttributeValue(IMarker.MESSAGE,
-				MarkerSupportInternalUtilities.EMPTY_STRING);
+				MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING);
 	}
 
 	/*
@@ -217,6 +266,9 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 * @see org.eclipse.ui.views.markers.MarkerItem#getLocation()
 	 */
 	public String getLocation() {
+		if(stale||checkIfMarkerStale()){
+			return MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING;
+		}
 		if (getCache().containsKey(LOCATION_STRING)) {
 			Object value = getCache().get(LOCATION_STRING);
 			if (value instanceof CollationKey)
@@ -262,10 +314,29 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 * @see org.eclipse.ui.internal.views.markers.MarkerSupportItem#getMarkerTypeName()
 	 */
 	String getMarkerTypeName() {
+		if(stale){
+			return NLS.bind(MarkerMessages.FieldMessage_WrongType, marker
+					.toString());
+		}
 		try {
 			return MarkerTypesModel.getInstance().getType(marker.getType())
 					.getLabel();
 		} catch (CoreException e) {
+			checkIfMarkerStale() ;
+			Policy.handle(e);
+			return NLS.bind(MarkerMessages.FieldMessage_WrongType, marker
+					.toString());
+		}
+	}
+	String getMarkerTypeId() {
+		if(stale){
+			return NLS.bind(MarkerMessages.FieldMessage_WrongType, marker
+					.toString());
+		}
+		try {
+			return marker.getType();
+		} catch (CoreException e) {
+			checkIfMarkerStale();
 			Policy.handle(e);
 			return NLS.bind(MarkerMessages.FieldMessage_WrongType, marker
 					.toString());
@@ -291,8 +362,8 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 		if (folder != null) {
 			return folder;
 		}
-		if (!marker.exists()) {
-			return super.getPath();
+		if (stale||checkIfMarkerStale()) {
+			return MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING;
 		}
 		IPath path = marker.getResource().getFullPath();
 		int n = path.segmentCount() - 1; // n is the number of segments
@@ -333,6 +404,8 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 */
 	void setMarker(IMarker marker) {
 		this.marker = marker;
+		// reset stale
+		stale = false;
 		clearCache();
 	}
 
@@ -341,7 +414,7 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	 * 
 	 * @return {@link HashMap}
 	 */
-	private Map getCache() {
+	Map getCache() {
 		if (cache == null)
 			cache = new HashMap(2);
 		return cache;
@@ -353,5 +426,63 @@ class MarkerEntry extends MarkerSupportItem implements IAdaptable {
 	void clearCache() {
 		cache = null;		
 	}
+
+	/**
+	 * @return true if the marker does not exist
+	 * 		   else false
+	 */
+	boolean checkIfMarkerStale() {
+		if (stale) {
+			return true;
+		}
+		if (marker == null || !marker.exists()) {
+			stale = true;
+		}
+		return stale;
+	}
+
+	/**
+	 * 
+	 * @return true if the {@link MarkerEntry} is stale,i.e. the marker does not
+	 *         exist. A false value can mean that marker's state of existence was
+	 *         never captured or that it exists.#checkIfMarkerExists() will
+	 *         accurately indicate its state.
+	 */
+	boolean getStaleState() {
+		return stale;
+	}
 	
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((marker == null) ? 0 : marker.hashCode());
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (!(obj instanceof MarkerEntry)) {
+			return false;
+		}
+		MarkerEntry other = (MarkerEntry) obj;
+		if (marker == null) {
+			if (other.marker != null) {
+				return false;
+			}
+		} else if (!marker.equals(other.marker)) {
+			return false;
+		}
+		return true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
index 7fc6788..89ce7da 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerFieldFilterGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Broadcom Corp. - James Blackburn -  Fix for Bug 305529 -  
+ *     					[Markers] NPE in MarkerFieldEditor if MarkerFieldConfiguration scope is unset
  *******************************************************************************/
 
 package org.eclipse.ui.internal.views.markers;
@@ -14,7 +16,6 @@ package org.eclipse.ui.internal.views.markers;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 
@@ -22,10 +23,10 @@ import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.mapping.ResourceMapping;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchPage;
@@ -66,7 +67,6 @@ class MarkerFieldFilterGroup {
 
 	private static final String ATTRIBUTE_VALUES = "values"; //$NON-NLS-1$
 
-	private static final IProject[] EMPTY_PROJECT_ARRAY = new IProject[0];
 
 	/**
 	 * Constant for any element.
@@ -90,6 +90,7 @@ class MarkerFieldFilterGroup {
 	 * Constant for on working set.
 	 */
 	static final int ON_WORKING_SET = 4;
+	
 	static final String TAG_ENABLED = "enabled"; //$NON-NLS-1$
 	private static final String TAG_SCOPE = "scope"; //$NON-NLS-1$
 	private static final String TAG_FIELD_FILTER_ENTRY = "fieldFilter"; //$NON-NLS-1$
@@ -97,48 +98,7 @@ class MarkerFieldFilterGroup {
 	// The identifier for user filters
 	private static String USER = "USER"; //$NON-NLS-1$
 
-	/**
-	 * Returns the set of projects that contain the given set of resources.
-	 * 
-	 * @param resources
-	 * @return IProject[]
-	 */
-	static IProject[] getProjects(IResource[] resources) {
-		if (resources == null)
-			return EMPTY_PROJECT_ARRAY;
-
-		Collection projects = getProjectsAsCollection(resources);
-
-		return (IProject[]) projects.toArray(new IProject[projects.size()]);
-	}
-
-	/**
-	 * Return the projects for the elements.
-	 * 
-	 * @param elements
-	 *            collection of IResource or IResourceMapping
-	 * @return Collection of IProject
-	 */
-	static Collection getProjectsAsCollection(Object[] elements) {
-		HashSet projects = new HashSet();
-
-		for (int idx = 0; idx < elements.length; idx++) {
-			if (elements[idx] instanceof IResource) {
-				projects.add(((IResource) elements[idx]).getProject());
-			} else {
-				IProject[] mappingProjects = (((ResourceMapping) elements[idx])
-						.getProjects());
-				for (int i = 0; i < mappingProjects.length; i++) {
-					projects.add(mappingProjects[i]);
-				}
-			}
-
-		}
-
-		return projects;
-	}
-
-	protected CachedMarkerBuilder builder;
+	protected MarkerContentGenerator generator;
 
 	private IConfigurationElement element;
 
@@ -163,9 +123,9 @@ class MarkerFieldFilterGroup {
 	 * @param markerBuilder
 	 */
 	public MarkerFieldFilterGroup(IConfigurationElement configurationElement,
-			CachedMarkerBuilder markerBuilder) {
+			MarkerContentGenerator markerBuilder) {
 		element = configurationElement;
-		builder = markerBuilder;
+		generator = markerBuilder;
 		initializeWorkingSet();
 		scope = processScope();
 
@@ -184,7 +144,7 @@ class MarkerFieldFilterGroup {
 	 * @return Collection of {@link MarkerType}
 	 */
 	Collection getAllTypes() {
-		return builder.getGenerator().getMarkerTypes();
+		return generator.getMarkerTypes();
 	}
 
 	/**
@@ -205,7 +165,7 @@ class MarkerFieldFilterGroup {
 	protected void calculateFilters() {
 		Map values = getValues();
 		Collection filters = new ArrayList();
-		MarkerField[] fields = builder.getVisibleFields();
+		MarkerField[] fields = generator.getVisibleFields();
 		for (int i = 0; i < fields.length; i++) {
 			MarkerFieldFilter fieldFilter = MarkerSupportInternalUtilities
 					.generateFilter(fields[i]);
@@ -216,13 +176,14 @@ class MarkerFieldFilterGroup {
 				if (fieldFilter instanceof MarkerTypeFieldFilter)
 					// Show everything by default
 					((MarkerTypeFieldFilter) fieldFilter)
-							.setContentGenerator(builder.getGenerator());
+							.setContentGenerator(generator);
 				if (values != null)
 					fieldFilter.initialize(values);
 			}
 		}
-		fieldFilters = new MarkerFieldFilter[filters.size()];
-		filters.toArray(fieldFilters);
+		MarkerFieldFilter[] newFilters = new MarkerFieldFilter[filters.size()];
+		filters.toArray(newFilters);
+		fieldFilters = newFilters;
 	}
 
 	/**
@@ -363,6 +324,9 @@ class MarkerFieldFilterGroup {
 			 * Or we may do this once before the markers are filtered.		 
 			 */
 			wSetResources=getResourcesInWorkingSet();
+		}else{			
+			wSetResources = new IResource[] { ResourcesPlugin.getWorkspace()
+					.getRoot() };
 		}
 	}
 
@@ -456,7 +420,7 @@ class MarkerFieldFilterGroup {
 		for (int i = 0; i < filters.length; i++) {
 			if (filters[i] instanceof CompatibilityFieldFilter)
 				((CompatibilityFieldFilter) filters[i]).loadLegacySettings(
-						memento, builder.getGenerator());
+						memento, generator);
 		}
 
 	}
@@ -497,7 +461,7 @@ class MarkerFieldFilterGroup {
 						.get(id);
 				if (filter instanceof MarkerTypeFieldFilter) {
 					((MarkerTypeFieldFilter) filter)
-							.setContentGenerator(builder.getGenerator());
+							.setContentGenerator(generator);
 				}
 				filter.loadSettings(childMemento);
 			}
@@ -524,7 +488,7 @@ class MarkerFieldFilterGroup {
 	 */
 	MarkerFieldFilterGroup makeWorkingCopy() {
 		MarkerFieldFilterGroup clone = new MarkerFieldFilterGroup(this.element,
-				this.builder);
+				this.generator);
 		if (populateClone(clone))
 			return clone;
 		return null;
@@ -576,13 +540,13 @@ class MarkerFieldFilterGroup {
 
 		String scopeValue = element.getAttribute(ATTRIBUTE_SCOPE);
 
-		if (scopeValue.equals(ATTRIBUTE_ON_SELECTED_ONLY))
+		if (ATTRIBUTE_ON_SELECTED_ONLY.equals(scopeValue))
 			return ON_SELECTED_ONLY;
 
-		if (scopeValue.equals(ATTRIBUTE_ON_SELECTED_AND_CHILDREN))
+		if (ATTRIBUTE_ON_SELECTED_AND_CHILDREN.equals(scopeValue))
 			return ON_SELECTED_AND_CHILDREN;
 
-		if (scopeValue.equals(ATTRIBUTE_ON_ANY_IN_SAME_CONTAINER))
+		if (ATTRIBUTE_ON_ANY_IN_SAME_CONTAINER.equals(scopeValue))
 			return ON_ANY_IN_SAME_CONTAINER;
 
 		return ON_ANY;
@@ -626,19 +590,27 @@ class MarkerFieldFilterGroup {
 	 * @return <code>true</code> if it is being shown
 	 */	
 	public boolean select(IMarker marker) {
-		MarkerFieldFilter[] filters = getFieldFilters();
 		testEntry.setMarker(marker);
-		
-		
+		return select(testEntry);
+	}
+
+	/**
+	 * Return whether or not this MarkerEntry can be shown.
+	 * @param testEntry 
+	 * 
+	 * @return <code>true</code> if it can be shown
+	 */	
+	public boolean select(MarkerEntry testEntry) {
+		MarkerFieldFilter[] filters = getFieldFilters();
 		if (scope == ON_WORKING_SET && workingSet != null) {
 			if (!workingSet.isAggregateWorkingSet()){
-					if(!isInWorkingSet(marker.getResource())){
+					if(!isInWorkingSet(testEntry.getMarker().getResource())){
 						return false;
 					}
 			}
 			//skip this for aggregates with no containing workingsets, ex. window working set
 			else if(((AggregateWorkingSet) workingSet).getComponents().length!=0){
-					if(!isInWorkingSet(marker.getResource())){
+					if(!isInWorkingSet(testEntry.getMarker().getResource())){
 						return false;
 					}
 			}
@@ -694,6 +666,53 @@ class MarkerFieldFilterGroup {
 	 * Refresh the MarkerFieldFilterGroup .
 	 */	
 	void refresh() {
-		 computeWorkingSetResources();
+		if (getScope() == ON_WORKING_SET) {
+			computeWorkingSetResources();
+		}
+	}
+	
+	public boolean selectByFilters(MarkerEntry entry) {
+		return select(entry);
+	}
+	
+	public boolean selectByScope(MarkerEntry entry, IResource[] resources) {
+		int scopeVal = getScope();
+		switch (scopeVal) {
+		case MarkerFieldFilterGroup.ON_ANY: {
+			return true;
+		}
+		case MarkerFieldFilterGroup.ON_SELECTED_ONLY: {
+			IPath  markerPath=entry.getMarker().getResource().getFullPath();
+			for (int i = 0; i < resources.length; i++) {
+				if(markerPath.equals(resources[i].getFullPath())){
+					return true;
+				}
+			}
+			return false;
+		}
+		case MarkerFieldFilterGroup.ON_SELECTED_AND_CHILDREN: {
+			IPath  markerPath=entry.getMarker().getResource().getFullPath();
+			for (int i = 0; i < resources.length; i++) {
+				if(resources[i].getFullPath().isPrefixOf(markerPath)){
+					return true;
+				}
+			}
+			return false;
+		}
+		case MarkerFieldFilterGroup.ON_ANY_IN_SAME_CONTAINER: {
+			IPath  markerProjectPath=entry.getMarker().getResource().getFullPath();
+			IProject[] projects=MarkerResourceUtil.getProjects(resources);
+			for (int i = 0; i < projects.length; i++) {
+				if(projects[i].getFullPath().isPrefixOf(markerProjectPath)){
+					return true;
+				}
+			}
+			return false;
+		}
+		case MarkerFieldFilterGroup.ON_WORKING_SET: {
+			return isInWorkingSet(entry.getMarker().getResource());
+		}
+		}
+		return true;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerHelpAdapterFactory.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerHelpAdapterFactory.java
index aa47199..ec24b55 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerHelpAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerHelpAdapterFactory.java
@@ -47,12 +47,10 @@ public class MarkerHelpAdapterFactory implements IAdapterFactory {
 					contextId = IDE.getMarkerHelpRegistry().getHelp(
 							markers[0]);
 				}
-				if(contextId==null){
-					contextId=view.getStaticContextId();
-				}
+
 				//TODO this needs to be migrated to the ide plug-in
 				if (contextId == null) 
-					contextId = PlatformUI.PLUGIN_ID + ".markers_view_context";//$NON-NLS-1$
+					contextId = PlatformUI.PLUGIN_ID + ".problem_view_context";//$NON-NLS-1$
 				
 				return HelpSystem.getContext(contextId);
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerMap.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerMap.java
deleted file mode 100644
index 1ab7c78..0000000
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerMap.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal.views.markers;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.ui.views.markers.MarkerItem;
-
-/**
- * The MarkerMap is a helper class that manages the mapping between a set of
- * {@link IMarker} and thier {@link MarkerEntry} wrappers.
- * 
- * @since 3.4
- * 
- */
-class MarkerMap {
-
-	static final MarkerMap EMPTY_MAP = new MarkerMap();
-	private MarkerEntry[] markers;
-
-	// markerToEntryMap is a lazily created map from the markers to thier
-	// corresponding entry
-	private Map markerToEntryMap = null;
-	private Integer[] markerCounts;
-
-	/**
-	 * Creates an initially empty marker map
-	 */
-	public MarkerMap() {
-		this(new MarkerEntry[0]);
-	}
-
-	/**
-	 * Create an instance of the receiver from markers.
-	 * 
-	 * @param markers
-	 */
-
-	public MarkerMap(MarkerEntry[] markers) {
-		this.markers = markers;
-	}
-
-	/**
-	 * Return the entry at index
-	 * 
-	 * @param index
-	 * @return MarkerEntry
-	 */
-	public MarkerEntry elementAt(int index) {
-		return markers[index];
-	}
-
-	/**
-	 * Returns an array of marker counts where getMarkerCounts()[severity] is
-	 * the number of markers in the list with the given severity.
-	 * 
-	 * @return an array of {@link Integer} where index indicates
-	 *         [errors,warnings,infos,others]
-	 */
-	Integer[] getMarkerCounts() {
-		if (markerCounts == null) {
-			int[] ints = new int[] { 0, 0, 0, 0 };
-
-			for (int idx = 0; idx < markers.length; idx++) {
-				MarkerEntry marker = markers[idx];
-				int severity = marker.getMarker().getAttribute(IMarker.SEVERITY, -1);
-				if (severity >= IMarker.SEVERITY_INFO) {
-					ints[severity]++;
-				}else{
-					ints[3]++;
-				}
-			}
-
-			markerCounts = new Integer[] { new Integer(ints[2]),
-					new Integer(ints[1]), new Integer(ints[0]), new Integer(ints[3]) };
-
-		}
-
-		return markerCounts;
-	}
-
-	/**
-	 * Return the {@link MarkerItem} that maps to marker.
-	 * 
-	 * @param marker
-	 * @return {@link MarkerItem}
-	 */
-	public MarkerItem getMarkerItem(IMarker marker) {
-		if (markerToEntryMap == null) {
-			markerToEntryMap = new HashMap();
-			for (int i = 0; i < markers.length; i++) {
-				IMarker nextMarker = markers[i].getMarker();
-				if (nextMarker != null)
-					markerToEntryMap.put(nextMarker, markers[i]);
-			}
-		}
-
-		if (markerToEntryMap.containsKey(marker))
-			return (MarkerItem) markerToEntryMap.get(marker);
-
-		return null;
-	}
-
-	/**
-	 * Get the size of the entries
-	 * 
-	 * @return int
-	 */
-	public int getSize() {
-		return markers.length;
-	}
-
-	/**
-	 * Return the entries as an array.
-	 * 
-	 * @return MarkerEntry[]
-	 */
-	public MarkerEntry[] toArray() {
-		return markers;
-	}
-
-	/**
-	 * Clear the caches for the markers.
-	 */
-	void clearAttributeCaches() {
-		for (int i = 0; i < markers.length; i++) {
-			markers[i].clearCache();
-		}
-		
-	}
-}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java
index e7c2007..a4cf2ea 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPreferencesDialog.java
@@ -344,6 +344,9 @@ public class MarkerPreferencesDialog extends ViewSettingsDialog {
 				visible.removeAll(selection);
 				visibleViewer.refresh();
 				nonVisibleViewer.refresh();
+				setValid(
+						visible.size() > 0,
+						MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
 			}
 		});
 
@@ -375,6 +378,9 @@ public class MarkerPreferencesDialog extends ViewSettingsDialog {
 				visible.addAll(selection);
 				visibleViewer.refresh();
 				nonVisibleViewer.refresh();
+				setValid(
+						visible.size() > 0,
+						MarkerMessages.MarkerPreferences_AtLeastOneVisibleColumn);
 			}
 		});
 
@@ -392,7 +398,7 @@ public class MarkerPreferencesDialog extends ViewSettingsDialog {
 			 * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
 			 */
 			public String getText(Object element) {
-				return ((MarkerField) element).getColumnHeaderText();
+				return ((MarkerField) element).getName();
 			}
 		};
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPriorityField.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPriorityField.java
index 70acd29..5ae8cad 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPriorityField.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerPriorityField.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -142,7 +142,7 @@ public class MarkerPriorityField extends MarkerField {
 	 * @see org.eclipse.ui.internal.provisional.views.markers.api.MarkerField#getColumnTooltipText()
 	 */
 	public String getColumnTooltipText() {
-		return MarkerMessages.priority_description;
+		return getName();
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerResourceUtil.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerResourceUtil.java
new file mode 100644
index 0000000..ac4cc37
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerResourceUtil.java
@@ -0,0 +1,466 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.mapping.ResourceMapping;
+import org.eclipse.core.resources.mapping.ResourceMappingContext;
+import org.eclipse.core.resources.mapping.ResourceTraversal;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ui.internal.ide.Policy;
+import org.eclipse.ui.internal.util.Util;
+import org.eclipse.ui.views.markers.internal.MarkerType;
+import org.eclipse.ui.views.markers.internal.MarkerTypesModel;
+import org.eclipse.ui.views.tasklist.ITaskListResourceAdapter;
+
+/**
+ * A Resource helper class for the markers view code.
+ * 
+ * @author hitesh soliwal
+ * @since 3.6
+ * 
+ */
+class MarkerResourceUtil {
+
+	static final IProject[] EMPTY_PROJECT_ARRAY = new IProject[0];
+
+	/**
+	 * Optimally gets the resources applicable to the current state of filters,
+	 * the smaller the resources and more specific they are the less the
+	 * filtering we have to do during processing.
+	 * 
+	 * @return collection of resource we want to collect markers for, taking
+	 *         various enabled filters into account.
+	 */
+	static Set computeResources(IResource[] selectedResources,
+			Collection enabledFilters, boolean andFilters) {
+		IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+
+		if (enabledFilters==null||enabledFilters.size() == 0) {
+			HashSet set = new HashSet(1);
+			set.add(root);
+			return set;
+		}
+		Set resourceSet = andFilters ? getResourcesFiltersAnded(enabledFilters,
+				selectedResources, root) : getResourcesFiltersOred(
+				enabledFilters, selectedResources, root);
+		
+		//remove duplicates
+		return trim2ParentResources(root, resourceSet);
+	}
+
+	/**
+	 * (optimization as side-effect): Compute common parents, if any. Remove further
+	 * duplicates. We collect markers with a flag of DEPTH_INFINITE; so,
+	 * effectively the children of a resource are also its duplicates.
+	 * 
+	 * @param root
+	 * @param resourceSet
+	 * @return set
+	 */
+	static Set trim2ParentResources(IWorkspaceRoot root, Set resourceSet) {
+		if (resourceSet.isEmpty() || resourceSet.size() == 1) {
+			return resourceSet;
+		}
+		if (resourceSet.contains(root)) {
+			resourceSet.clear();
+			resourceSet.add(root);
+			return resourceSet;
+		}
+		Object[] clones = resourceSet.toArray();
+		for (int i = 0; i < clones.length; i++) {
+			IResource resource = (IResource) clones[i];
+			Iterator iterator = resourceSet.iterator();
+			while (iterator.hasNext()) {
+				IResource resToRemove = (IResource) iterator.next();
+				if (resToRemove.equals(root)) {
+					resourceSet.clear();
+					resourceSet.add(root);
+					return resourceSet;
+				}
+				if (resource.equals(resToRemove)) {
+					continue;
+				}
+				if (resource.getFullPath()
+						.isPrefixOf(resToRemove.getFullPath())) {
+					iterator.remove();
+				}
+			}
+		}
+		return resourceSet;
+	}
+
+	/**
+	 * Since every filter provides it's on set of resources, instead of
+	 * computing markers on filters individually and then ORing the markers; we
+	 * would save a good amount of system-resources if we ORed them before
+	 * gathering phase,removing duplicates.
+	 * 
+	 * @param enabledFilters
+	 * @param root
+	 * @return set
+	 */
+	static Set getResourcesFiltersOred(Collection enabledFilters,
+			IResource[] selectedResources, IWorkspaceRoot root) {
+		if (enabledFilters==null||enabledFilters.size() == 0) {
+			HashSet set = new HashSet(1);
+			set.add(root);
+			return set;
+		}
+		Set resourceSet = new HashSet();
+		Iterator filtersIterator = enabledFilters.iterator();
+		while (filtersIterator.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+					.next();
+			Set set = getResourcesForFilter(group, selectedResources, root);
+			resourceSet.addAll(set);
+			if (resourceSet.contains(root)) {
+				set = new HashSet(1);
+				set.add(root);
+				return set;
+			}
+		}
+		return resourceSet;
+	}
+
+	/**
+	 * The method may look long and a little time-consuming, but it actually
+	 * performs a short-circuit AND operation on the resources, and therefore
+	 * quick.
+	 * 
+	 * Note: This is an optimization; we could have ORed the resources instead.
+	 * Let us say, for example, we had a filter of workspace-scope(ANY), and
+	 * others of scope on Selected element and maybe others.Now, if we computed
+	 * markers by ORing the resources, then we would compute markers for the
+	 * entire Workspace. The filters would anyways keep only the markers that
+	 * are an intersection of all resources (filter by scope) .In other words,
+	 * we spend more system-resources in both gathering and filtering.If we
+	 * ANDed the scopes(resources) we'd, save a good amount of system-resources
+	 * in both phases.
+	 * 
+	 * @param enabledFilters
+	 * @param selectedResources
+	 * @param root
+	 * @return set
+	 */
+	static Set getResourcesFiltersAnded(Collection enabledFilters,
+			IResource[] selectedResources, IWorkspaceRoot root) {
+		if (enabledFilters==null||enabledFilters.size() == 0) {
+			HashSet set = new HashSet(1);
+			set.add(root);
+			return set;
+		}
+		Set resourceSet = new HashSet();
+		
+		Iterator filtersIterator = enabledFilters.iterator();
+		Set removeMain = new HashSet();
+		while (filtersIterator.hasNext()) {
+			MarkerFieldFilterGroup group = (MarkerFieldFilterGroup) filtersIterator
+					.next();
+			Set set = getResourcesForFilter(group, selectedResources, root);
+			if (resourceSet.isEmpty()) {
+				// first time
+				resourceSet.addAll(set);
+			} else {
+				Iterator resIterator = resourceSet.iterator();
+				while (resIterator.hasNext()) {
+					boolean remove = true;
+					IResource mainRes = (IResource) resIterator.next();
+					Iterator iterator = set.iterator();
+					while (iterator.hasNext() && remove) {
+						IResource grpRes = (IResource) iterator.next();
+						remove = !grpRes.equals(mainRes);
+						if (remove
+								&& grpRes.getFullPath().isPrefixOf(
+										mainRes.getFullPath())) {
+							remove = false;
+						} else if (remove
+								&& mainRes.getFullPath().isPrefixOf(
+										grpRes.getFullPath())) {
+							remove = false;
+							removeMain.add(mainRes);
+						}
+					}
+					if (remove) {
+						resIterator.remove();
+					}
+				}
+				Iterator iterator = set.iterator();
+				while (iterator.hasNext()) {
+					boolean remove = true;
+					IResource grpRes = (IResource) iterator.next();
+					resIterator = resourceSet.iterator();
+					while (resIterator.hasNext()&&remove) {
+						IResource mainRes = (IResource) resIterator.next();
+						remove = !grpRes.equals(mainRes);
+						if (remove
+								&& mainRes.getFullPath().isPrefixOf(
+										grpRes.getFullPath())) {
+							remove = false;
+						}
+					}
+					if (remove) {
+						iterator.remove();
+					}
+				}
+				resourceSet.addAll(set);
+				resourceSet.removeAll(removeMain);
+				removeMain.clear();
+				if (resourceSet.isEmpty()) {
+					// if the And between two is empty
+					// then its empty for all
+					return resourceSet;
+				}
+			}
+		}
+		return resourceSet;
+	}
+
+	/**
+	 * Get the resources indicated by the filter's scope.
+	 *  
+	 * @param group
+	 * @param selectedResources
+	 * @param root
+	 */
+	static Set getResourcesForFilter(MarkerFieldFilterGroup group,
+			IResource[] selectedResources, IWorkspaceRoot root) {
+		HashSet resourceSet = new HashSet();
+		switch (group.getScope()) {
+		case MarkerFieldFilterGroup.ON_ANY: {
+			resourceSet.add(root);
+			break;
+		}
+		case MarkerFieldFilterGroup.ON_SELECTED_ONLY:
+		case MarkerFieldFilterGroup.ON_SELECTED_AND_CHILDREN: {
+			for (int i = 0; i < selectedResources.length; i++) {
+				resourceSet.add(selectedResources[i]);
+			}
+			break;
+		}
+		case MarkerFieldFilterGroup.ON_ANY_IN_SAME_CONTAINER: {
+			IResource[] resources = getProjects(selectedResources);
+			for (int i = 0; i < resources.length; i++) {
+				resourceSet.add(resources[i]);
+			}
+			break;
+		}
+		case MarkerFieldFilterGroup.ON_WORKING_SET: {
+			group.refresh();
+			IResource[] resources = group.getResourcesInWorkingSet();
+			for (int i = 0; i < resources.length; i++) {
+				resourceSet.add(resources[i]);
+			}
+			break;
+		}
+		}
+		return resourceSet;
+	}
+
+	/**
+	 * Returns the set of projects that contain the given set of resources.
+	 * 
+	 * @param resources
+	 * @return IProject[]
+	 */
+	static IProject[] getProjects(IResource[] resources) {
+		if (resources == null)
+			return EMPTY_PROJECT_ARRAY;
+
+		Collection projects = getProjectsAsCollection(resources);
+
+		return (IProject[]) projects.toArray(new IProject[projects.size()]);
+	}
+
+	/**
+	 * Return the projects for the elements.
+	 * 
+	 * @param elements
+	 *            collection of IResource or IResourceMapping
+	 * @return Collection of IProject
+	 */
+	static Collection getProjectsAsCollection(Object[] elements) {
+		HashSet projects = new HashSet();
+
+		for (int idx = 0; idx < elements.length; idx++) {
+			if (elements[idx] instanceof IResource) {
+				projects.add(((IResource) elements[idx]).getProject());
+			} else {
+				IProject[] mappingProjects = (((ResourceMapping) elements[idx])
+						.getProjects());
+				for (int i = 0; i < mappingProjects.length; i++) {
+					projects.add(mappingProjects[i]);
+				}
+			}
+
+		}
+
+		return projects;
+	}
+
+	/**
+	 * Add the resources in resourceMapping to the resourceCollection
+	 * 
+	 * @param resourceCollection
+	 * @param resourceMapping
+	 */
+	static void addResources(Collection resourceCollection,
+			ResourceMapping resourceMapping) {
+
+		try {
+			ResourceTraversal[] traversals = resourceMapping.getTraversals(
+					ResourceMappingContext.LOCAL_CONTEXT,
+					new NullProgressMonitor());
+			for (int i = 0; i < traversals.length; i++) {
+				ResourceTraversal traversal = traversals[i];
+				IResource[] result = traversal.getResources();
+				for (int j = 0; j < result.length; j++) {
+					resourceCollection.add(result[j]);
+				}
+			}
+		} catch (CoreException e) {
+			Policy.handle(e);
+		}
+	}
+	
+	/**
+	 * Adapts an object to a resource or resource mapping;
+	 * If the object cannot be adapted,it return null.
+	 * The method uses {@link Util#getAdapter(Object, Class)}
+	 * The scheme for adapting follows the sequence
+	 * 		If instance of {@link IAdaptable}, query ITaskListResourceAdapter
+	 * 			if available for the object.
+	 * 		Try to adapt to an IResource
+	 * 		Try to adapt to an IFile
+	 * 		Finally try adapting to a ResourceMapping
+	 * 
+	 * @param object
+	 */
+	static Object adapt2ResourceElement(Object object) {
+		IResource resource = null;
+		if (object instanceof IAdaptable) {
+			Object adapter = Util.getAdapter(object,
+					ITaskListResourceAdapter.class);
+			if (adapter != null) {
+				resource = ((ITaskListResourceAdapter) adapter)
+						.getAffectedResource((IAdaptable) object);
+			}
+		}
+		if (resource == null) {
+			resource = (IResource) Util.getAdapter(object, IResource.class);
+		}
+		if (resource == null) {
+			resource = (IResource) Util.getAdapter(object, IFile.class);
+		}
+		if (resource == null) {
+			Object mapping = Util.getAdapter(object, ResourceMapping.class);
+			if (mapping != null) {
+				return mapping;
+			}
+		} else {
+			return resource;
+		}
+		return null;
+	}
+
+	/**
+	 * Gets all sub-type id(s) including self, for the list of marker typeIds
+	 * 
+	 * @param typeIds
+	 */
+	static String[] getAllSubTypesIds(String[] typeIds) {
+		HashSet set = getAllSubTypes(typeIds);
+		return toTypeStrings(set);
+	}
+
+	/**
+	 * Gets all sub-types {@link MarkerType} including self for the list of
+	 * marker typeIds
+	 * 
+	 * @param typeIds
+	 */
+	static HashSet getAllSubTypes(String[] typeIds) {
+		HashSet set = new HashSet();
+		MarkerTypesModel typesModel = MarkerTypesModel.getInstance();
+		for (int i = 0; i < typeIds.length; i++) {
+			MarkerType type = typesModel.getType(typeIds[i]);
+			set.add(type);
+			MarkerType[] subs = type.getAllSubTypes();
+			for (int j = 0; j < subs.length; j++) {
+				set.add(subs[j]);
+			}
+		}
+		return set;
+	}
+
+	/**
+	 * Gets mutually exclusive super-types ids for the list of
+	 * marker typeIds
+	 * 
+	 * @param typeIds
+	 */
+	static String[] getMutuallyExclusiveSupersIds(String[] typeIds) {
+		HashSet set = getMutuallyExclusiveSupers(typeIds);
+		return toTypeStrings(set);
+	}
+
+	/**
+	 * Gets mutually exclusive super-types {@link MarkerType} for the list of
+	 * marker typeIds
+	 * 
+	 * @param typeIds
+	 */
+	static HashSet getMutuallyExclusiveSupers(String[] typeIds) {
+		HashSet set = new HashSet();
+		MarkerTypesModel typesModel = MarkerTypesModel.getInstance();
+		for (int i = 0; i < typeIds.length; i++) {
+			MarkerType type = typesModel.getType(typeIds[i]);
+			set.add(type);
+		}
+		for (int i = 0; i < typeIds.length; i++) {
+			MarkerType type = typesModel.getType(typeIds[i]);
+			MarkerType[] subs = type.getAllSubTypes();
+			HashSet subsOnly = new HashSet(Arrays.asList(subs));
+			subsOnly.remove(type);
+			set.removeAll(subsOnly);
+		}
+		return set;
+	}
+
+	/**
+	 * Converts a collection of {@link MarkerType} into an array of marker
+	 * typeIds
+	 * 
+	 * @param collection
+	 */
+	private static String[] toTypeStrings(Collection collection) {
+		HashSet ids = new HashSet();
+		Iterator iterator = collection.iterator();
+		while (iterator.hasNext()) {
+			MarkerType type = (MarkerType) iterator.next();
+			ids.add(type.getId());
+		}
+		return (String[]) ids.toArray(new String[ids.size()]);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSortUtil.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSortUtil.java
index b4456f4..57cc09b 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSortUtil.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSortUtil.java
@@ -1,6 +1,6 @@
 /*
  *
- * Copyright (c) 1994
+ * Copyright (c) 1994, 2009
  * Hewlett-Packard Company
  *
  * Permission to use, copy, modify, distribute and sell this software
@@ -23,7 +23,7 @@
  * purpose.  It is provided "as is" without express or implied warranty.
  * 
  * Contributions:
- * 		IBM - Ported the code to Java
+ *              IBM - Ported the code to Java
  */
 
 package org.eclipse.ui.internal.views.markers;
@@ -31,6 +31,9 @@ package org.eclipse.ui.internal.views.markers;
 import java.util.Arrays;
 import java.util.Comparator;
 
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
 /**
  * @since 3.5
  * 
@@ -302,9 +305,10 @@ public class MarkerSortUtil {
 	 * @param from
 	 * @param to
 	 * @param k
+	 * @param monitor 
 	 */
 	public static void sortStartingKElement(MarkerEntry[] entries,
-			Comparator comparator, int from, int to, int k) {
+			Comparator comparator, int from, int to, int k,IProgressMonitor monitor) {
 		// check range valid
 		int last = from + k-1;
 		if (entries.length == 0 || from < 0 || from >= to || last < from
@@ -312,7 +316,7 @@ public class MarkerSortUtil {
 			return;
 		int n=to-from+1;
 		if (n <= BATCH_SIZE && (((float) n / k) <= MERGE_OR_HEAP_SWITCH)
-				|| ((float) n / k) <= MERGE_OR_HEAP_SWITCH) {
+				/*|| ((float) n / k) <= MERGE_OR_HEAP_SWITCH*/) { 
 			// use arrays sort
 			Arrays.sort(entries, from, to + 1, comparator);
 			// clear cache for first to middle since we are done with sort
@@ -325,24 +329,47 @@ public class MarkerSortUtil {
 		// do it in blocks of BATCH_SIZE so we get a chance
 		// of clearing caches to keep memory usage to a minimum
 
-		int totalBatches = k / BATCH_SIZE;
+		//we choose k-1 so that last batch includes last element 
+		//in case k is a multiple of  BATCH_SIZE
+		int totalBatches = (k-1) / BATCH_SIZE; 
 		int batchCount = 0;
 		while (totalBatches > 0) {
+			if(monitor.isCanceled()){
+				return;
+			}
 			int fromTemp = from + batchCount * BATCH_SIZE;
 			int toTemp = from + (batchCount + 1) * BATCH_SIZE;
 			partiallySort(entries, fromTemp, toTemp, to, comparator);
 			batchCount++;
 			totalBatches--;
 		}
-
-		if (last > from + batchCount * BATCH_SIZE) {
-			//the last remaining enteries
-			partiallySort(entries, from + batchCount * BATCH_SIZE, last+1, to,
-					comparator);
+		if(monitor.isCanceled()){
+			return;
+		}
+		if (last >= from + batchCount * BATCH_SIZE) {
+			// the last remaining enteries
+			if (last == to) {
+				partiallySort(entries, from + batchCount * BATCH_SIZE, last,
+						to, comparator);
+			} else {
+				partiallySort(entries, from + batchCount * BATCH_SIZE, last+1,
+						to, comparator);
+			}
 		}
 	}
 
 	/**
+	 * @param fArray1
+	 * @param comparator
+	 * @param from
+	 * @param k
+	 * @param limit
+	 */
+	public static void sortStartingKElement(MockMarkerEntry[] fArray1,
+			Comparator comparator, int from, int k, int limit) {
+		sortStartingKElement(fArray1, comparator, from, k, limit,new NullProgressMonitor());		
+	}
+	/**
 	 * Sorts [0,k-1] in the array of [0,entries.length-1] using a variant of
 	 * modified heapsort, such that
 	 * array[0]<array[1]<...<array[k-1] and
@@ -354,10 +381,11 @@ public class MarkerSortUtil {
 	 * @param entries
 	 * @param comparator
 	 * @param k
+	 * @param monitor 
 	 */
 	public static void sortStartingKElement(MarkerEntry[] entries,
-			Comparator comparator, int k) {
-		sortStartingKElement(entries, comparator, 0, entries.length - 1, k);
+			Comparator comparator, int k,IProgressMonitor monitor) {
+		sortStartingKElement(entries, comparator, 0, entries.length - 1, k,monitor);
 	}
 
 	/**
@@ -374,9 +402,11 @@ public class MarkerSortUtil {
 	 * @param comparator
 	 * @param from
 	 * @param k
+	 * @param monitor 
 	 */
 	public static void sortStartingKElement(MarkerEntry[] entries,
-			Comparator comparator, int from, int k) {
-		sortStartingKElement(entries, comparator, from, entries.length - 1, k);
+			Comparator comparator, int from, int k, IProgressMonitor monitor) {
+		sortStartingKElement(entries, comparator, from, entries.length - 1, k,monitor);
 	}
+	
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
index a9d762c..48b92c9 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSupportInternalUtilities.java
@@ -34,12 +34,14 @@ import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.Policy;
 import org.eclipse.ui.internal.util.BundleUtility;
 import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.views.markers.FilterConfigurationArea;
 import org.eclipse.ui.views.markers.MarkerField;
 import org.eclipse.ui.views.markers.MarkerFieldFilter;
 import org.eclipse.ui.views.markers.MarkerItem;
 import org.eclipse.ui.views.markers.internal.MarkerGroup;
 import org.eclipse.ui.views.markers.internal.MarkerGroupingEntry;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
 
 import com.ibm.icu.text.CollationKey;
 import com.ibm.icu.text.Collator;
@@ -89,6 +91,8 @@ public class MarkerSupportInternalUtilities {
 	 * A reusable empty {@link String}
 	 */
 	public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+	
+	public static final String UNKNOWN_ATRRIBTE_VALUE_STRING = MarkerMessages.Unknown;
 
 	/**
 	 * The configuration element constant for false
@@ -384,4 +388,36 @@ public class MarkerSupportInternalUtilities {
 
 	}
 
+	/**
+	 * Log an exception from a markers view.
+	 * 
+	 * @param exception
+	 */
+	public static void logViewError(Exception exception) {
+		if (exception instanceof CoreException) {
+			StatusManager.getManager().handle(
+					((CoreException) exception).getStatus(),StatusManager.LOG);
+			return;
+		}
+		StatusManager.getManager().handle(
+				new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
+						exception.getLocalizedMessage(), exception),
+				StatusManager.LOG);
+	}
+	/**
+	 * Show an exception from a markers view.
+	 * 
+	 * @param exception
+	 */
+	public static void showViewError(Exception exception) {
+		if (exception instanceof CoreException) {
+			StatusManager.getManager().handle(
+					((CoreException) exception).getStatus(),StatusManager.LOG|StatusManager.SHOW);
+			return;
+		}
+		StatusManager.getManager().handle(
+				new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH,
+						exception.getLocalizedMessage(), exception),
+				StatusManager.LOG|StatusManager.SHOW);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerUpdateJob.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerUpdateJob.java
new file mode 100644
index 0000000..806ccc9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerUpdateJob.java
@@ -0,0 +1,220 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
+import org.osgi.framework.Bundle;
+
+/**
+ * The MarkerUpdateJob processes marker updates.
+ * Once the processing is complete it schedules an UI
+ * update.
+ * 
+ * @since 3.6
+ * 
+ */
+class MarkerUpdateJob extends Job {
+
+	CachedMarkerBuilder builder;
+	private boolean clean;
+	private long lastUpdateTime=-1;
+
+	/**
+	 * @param builder
+	 */
+	MarkerUpdateJob(CachedMarkerBuilder builder) {
+		super(MarkerMessages.MarkerView_searching_for_markers);
+		this.builder = builder;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.
+	 * IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		monitor.beginTask(MarkerMessages.MarkerView_searching_for_markers,
+				IProgressMonitor.UNKNOWN);
+		buildMarkers(monitor);
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * gather all markers needed by the view.
+	 * 
+	 * @param monitor
+	 */
+	void buildMarkers(IProgressMonitor monitor) {
+		//check for cancellation before we start
+		if (monitor.isCanceled()) {
+			return;
+		}
+		// builder.getUpdateScheduler().cancelQueuedUIUpdates();
+		// builder.getUpdateScheduler().indicateStatus(
+		// MarkerMessages.MarkerView_searching_for_markers, false);
+
+		Collection markerEntries = new LinkedList();
+		//this is not incremental clean every time
+		clean = !clean(markerEntries, monitor);
+		if (monitor.isCanceled()) {
+			return;
+		}
+		// builder.getUpdateScheduler().indicateStatus(
+		// MarkerMessages.MarkerView_processUpdates, false);
+		
+		monitor.setTaskName(MarkerMessages.MarkerView_processUpdates);
+		if (!processMarkerEntries(markerEntries, monitor)) {
+			return;
+		}
+		if (monitor.isCanceled()) {
+			return;
+		}
+		builder.getUpdateScheduler().scheduleUIUpdate(
+				MarkerUpdateScheduler.SHORT_DELAY);
+		if (monitor.isCanceled()) {
+			return;
+		}
+		builder.setBuilding(false);
+		updateDone();
+	}
+
+	/**
+	 * Capture the current time into as lastupdate time
+	 */
+	void updateDone() {
+		lastUpdateTime = System.currentTimeMillis();
+	}
+
+	/**
+	 * Collect the markers starting clean, all over again.
+	 * @param markerEntries 
+	 */
+	boolean clean(Collection markerEntries, IProgressMonitor monitor) {
+		MarkerContentGenerator generator = builder.getGenerator();
+		if (monitor.isCanceled() || generator == null) {
+			return false;
+		}
+		builder.registerTypesToListener();
+		return generator.generateMarkerEntries(markerEntries, monitor);
+	}
+
+	/**
+	 * Process,sort and group the new marker entries in markerEntryList and
+	 * update the Markers object
+	 * 
+	 * @param markerEntries
+	 *            the collection of new MarkerEntry(s)
+	 */
+	boolean processMarkerEntries(Collection markerEntries,
+			IProgressMonitor monitor) {
+		Markers markers = builder.getMarkers();
+		if (monitor.isCanceled()) {
+			return false;
+		}
+		return markers.updateWithNewMarkers(markerEntries, true, monitor);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
+	 */
+	public boolean shouldRun() {
+		if (!PlatformUI.isWorkbenchRunning()) {
+			return false;
+		}
+		// Do not run if the change came in before there is a viewer
+		return (IDEWorkbenchPlugin.getDefault().getBundle().getState() == Bundle.ACTIVE)
+				&& builder.isActive();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+	 */
+	public boolean belongsTo(Object family) {
+		if (family.equals(builder.CACHE_UPDATE_FAMILY)) {
+			return true;
+		}
+		if (family.equals(builder.MARKERSVIEW_UPDATE_JOB_FAMILY)) {
+			return true;
+		}
+		return super.belongsTo(family);
+	}
+
+	/**
+	 * @return Returns if the a clean is requested.
+	 */
+	boolean isClean() {
+		return clean;
+	}
+
+	/**
+	 * Request a clean
+	 */
+	void setClean() {
+		this.clean = true;
+	}
+
+	/**
+	 * @return last update time
+	 */
+	 long getLastUpdateTime() {
+		return lastUpdateTime;
+	}
+}
+
+/**
+ * The SortingJob is used to resort the existing markers. Once the sorting is
+ * complete it schedules the an UI update
+ * 
+ * @since 3.6
+ * 
+ */
+class SortingJob extends MarkerUpdateJob {
+	public SortingJob(CachedMarkerBuilder builder) {
+		super(builder);
+		this.builder = builder;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.views.markers.MarkerUpdateJob#run(org.eclipse
+	 * .core.runtime.IProgressMonitor)
+	 */
+	protected IStatus run(IProgressMonitor monitor) {
+		monitor.beginTask(MarkerMessages.MarkerView_19,
+				IProgressMonitor.UNKNOWN);
+		builder.getUpdateScheduler().cancelQueuedUIUpdates();
+		// builder.getUpdateScheduler().indicateStatus(
+		// MarkerMessages.MarkerView_19, false);
+		builder.getMarkers().sortMarkerEntries(monitor);
+		builder.getUpdateScheduler().scheduleUIUpdate(0L);
+		if (monitor.isCanceled()) {
+			return Status.CANCEL_STATUS;
+		}
+		return Status.OK_STATUS;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java
new file mode 100644
index 0000000..f4d9852
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerViewerContentProvider.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * The ContentProvider to the TreeViewer used in Markers View.
+ * 
+ * @since 3.6
+ * 
+ */
+class MarkerViewerContentProvider implements ITreeContentProvider {
+
+	// private MarkersTreeViewer viewer;
+	private Object input;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse
+	 * .jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+		// this.viewer = (MarkersTreeViewer) viewer;
+		this.input = newInput;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+	 */
+	public void dispose() {
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java
+	 * .lang.Object)
+	 */
+	public Object[] getChildren(Object parentElement) {
+		MarkerSupportItem[] children = ((MarkerSupportItem) parentElement)
+				.getChildren();
+
+		return getLimitedChildren(children);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements
+	 * (java.lang.Object)
+	 */
+	public Object[] getElements(Object inputElement) {
+		//use clone 
+		return getLimitedChildren(((Markers) input).getElements());
+	}
+
+	/**
+	 * Get the children limited by the marker limits.
+	 * 
+	 * @param children
+	 * @return Object[]
+	 */
+	private Object[] getLimitedChildren(Object[] children) {
+		int newLength = MarkerSupportInternalUtilities.getMarkerLimit();
+		if (newLength > 0 && newLength < children.length) {
+			Object[] newChildren = new Object[newLength];
+			System.arraycopy(children, 0, newChildren, 0, newLength);
+			return newChildren;
+		}
+		return children;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ILazyTreeContentProvider#getParent(
+	 * java.lang.Object)
+	 */
+	public Object getParent(Object element) {
+		Object parent = ((MarkerSupportItem) element).getParent();
+		if (parent == null)
+			return input;
+		return parent;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java
+	 * .lang.Object)
+	 */
+	public boolean hasChildren(Object element) {
+		return ((MarkerSupportItem) element).getChildren().length > 0;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java
new file mode 100644
index 0000000..439f119
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/Markers.java
@@ -0,0 +1,435 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.ui.views.markers.MarkerItem;
+import org.eclipse.ui.views.markers.internal.MarkerGroup;
+import org.eclipse.ui.views.markers.internal.MarkerGroupingEntry;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
+
+/**
+ * The Markers object contains the MarkerEntry(s) collected and updated by the system,
+ * also  maintains the categories that markers are grouped into.
+ * @since 3.6
+ * 
+ */
+class Markers {
+
+	static final MarkerCategory[] EMPTY_CATEGORY_ARRAY = new MarkerCategory[0];
+	static final MarkerEntry[] EMPTY_ENTRY_ARRAY = new MarkerEntry[0];
+
+	 //the marker entries
+	private MarkerEntry[] markerEntryArray = EMPTY_ENTRY_ARRAY;
+	//the categories
+	private MarkerCategory[] categories = EMPTY_CATEGORY_ARRAY;
+
+	
+	private CachedMarkerBuilder builder;
+	
+	private boolean inChange=false;
+
+	// markerToEntryMap is a lazily created map from the markers to thier
+	// corresponding entry
+	private Map markerToEntryMap = null;
+	private Integer[] markerCounts;
+
+
+	Markers(CachedMarkerBuilder builder) {
+		this.builder = builder;
+		inChange=false;
+	}
+
+	/**
+	 * Update with newly collected markers
+	 * 
+	 * @param markerEntries
+	 * 						the new marker entries 
+	 * @param sortAndGroup
+	 * 			true 	sort and group them
+	 * @param monitor
+	 */
+	synchronized boolean updateWithNewMarkers(Collection markerEntries,
+			boolean sortAndGroup, IProgressMonitor monitor) {
+		boolean initialVal=inChange;
+		try {
+			inChange=true;
+			if (markerToEntryMap != null) {
+				markerToEntryMap.clear();
+				markerToEntryMap = null;
+			}
+			markerCounts = null;
+			if (markerEntries.size() == 0) {
+				categories = EMPTY_CATEGORY_ARRAY;
+				markerEntryArray = EMPTY_ENTRY_ARRAY;
+				return true;
+			}
+			if (monitor.isCanceled()) {
+				return false;
+			}
+			markerEntryArray = new MarkerEntry[markerEntries.size()];
+			markerEntries.toArray(markerEntryArray);
+			if (sortAndGroup) {
+				if (monitor.isCanceled()) {
+					return false;
+				}
+				sortAndMakeCategories(monitor);
+
+				if (monitor.isCanceled()) {
+					return false;
+				}
+			} else {
+				categories = EMPTY_CATEGORY_ARRAY;
+			}
+			return true;
+		} finally {
+			inChange=initialVal;
+		}
+	}
+
+	/**
+	 * Sort the contained marker entries and build categories if required.
+	 * 
+	 * @param monitor
+	 */
+	synchronized boolean sortAndMakeCategories(IProgressMonitor monitor) {
+		boolean initialVal=inChange;
+		try {
+			inChange=true;
+			// Sort by Category first
+			if (builder.isShowingHierarchy()) {
+				MarkerCategory[] markerCategories = groupIntoCategories(
+						monitor, markerEntryArray);
+				categories = markerCategories;
+			} else {
+				categories = EMPTY_CATEGORY_ARRAY;
+			}
+
+			if (monitor.isCanceled()) {
+				return false;
+			}
+			monitor.subTask(MarkerMessages.MarkerView_processUpdates);
+
+			return sortMarkerEntries(monitor);
+		} finally {
+			inChange=initialVal;
+		}
+	}
+
+	/**
+	 * @param monitor
+	 */
+	synchronized boolean sortMarkerEntries(IProgressMonitor monitor) {
+		if (monitor.isCanceled()) {
+			return false;
+		}
+		boolean initialVal=inChange;
+		try {
+			inChange=true;
+			if (builder.isShowingHierarchy()) {
+				Comparator comparator = builder.getComparator()
+						.getFieldsComparator();
+				for (int i = 0; i < categories.length; i++) {
+					if (monitor.isCanceled()) {
+						return false;
+					}
+					// sort various categories
+					MarkerCategory category = categories[i];
+					category.children = null; // reset cached children
+					int avaliable = category.end - category.start + 1;
+					int effLimit = getShowingLimit(avaliable);
+					MarkerSortUtil.sortStartingKElement(markerEntryArray,
+							comparator, category.start, category.end, effLimit,
+							monitor);
+				}
+			} else {
+				if (monitor.isCanceled()) {
+					return false;
+				}
+				int avaialble = markerEntryArray.length - 1;
+				int effLimit = getShowingLimit(avaialble);
+				MarkerSortUtil.sortStartingKElement(markerEntryArray, builder
+						.getComparator(), effLimit, monitor);
+			}
+			if (monitor.isCanceled()) {
+				return false;
+			}
+			monitor.worked(50);
+			return true;
+		} finally {
+			inChange=initialVal;
+		}
+	}
+
+	/**
+	 * get marker limit to show, if any.
+	 * @param avaliable
+	 */
+	private int getShowingLimit(int avaliable) {
+		int limit = MarkerSupportInternalUtilities.getMarkerLimit();
+		int effLimit = limit;
+		if (avaliable < effLimit || limit == -1) {
+			effLimit = avaliable;
+		}
+		return effLimit;
+	}
+
+	/**
+	 * Sort Markers according to groups, and Group them into categories
+	 * 
+	 * @param monitor
+	 * @param newMarkers
+	 * @return MarkerCategory
+	 */
+	MarkerCategory[] groupIntoCategories(IProgressMonitor monitor,
+			MarkerEntry[] newMarkers) {
+		Map boundaryInfoMap = groupMarkerEntries(newMarkers, builder
+				.getCategoryGroup(), newMarkers.length - 1, monitor);
+		Iterator iterator = boundaryInfoMap.keySet().iterator();
+		int start = 0;
+		MarkerCategory[] markerCategories = new MarkerCategory[boundaryInfoMap
+				.size()];
+		int i = 0;
+		int end = 0;
+		while (iterator.hasNext()) {
+			Object key = iterator.next();
+			end = ((Integer) boundaryInfoMap.get(key)).intValue();
+			markerCategories[i++] = new MarkerCategory(this, start, end,
+					builder.getCategoryGroup().getMarkerField().getValue(
+							newMarkers[start]));
+			start = end + 1;
+		}
+		return markerCategories;
+	}
+
+	/**
+	 * Sorts/groups the markers in O(N) comparisons and returns the boundary
+	 * indices in the map. The O(N) complexity requires the use of a few data
+	 * structures. But the speed benefit is tremendous at a very small price of
+	 * few extra references.
+	 * 
+	 * @param entries
+	 * @param group
+	 * @param k
+	 * @return {@link Map}
+	 * 
+	 */
+	private Map groupMarkerEntries(MarkerEntry[] entries, MarkerGroup group, int k,
+			IProgressMonitor monitor) {
+		TreeMap map = new TreeMap(group.getEntriesComparator());
+		for (int i = 0; i <= k; i++) {
+			IMarker marker = entries[i].getMarker();
+			if (marker == null) {
+				continue;// skip stale markers
+			}
+			if(monitor.isCanceled()){
+				map.clear();
+				return map;
+			}
+			try {
+				MarkerGroupingEntry groupingEntry = group.findGroupValue(marker
+						.getType(), marker);
+				List list = (List) map.get(groupingEntry);
+				if (list == null) {
+					list = new ArrayList();
+					map.put(groupingEntry, list);
+				}
+				list.add(entries[i]);
+			} catch (CoreException e) {
+				entries[i].checkIfMarkerStale();
+			}
+		}
+		Iterator keys = map.keySet().iterator();
+		int i = 0;
+		while (keys.hasNext()) {
+			if(monitor.isCanceled()){
+				map.clear();
+				return map;
+			}
+			Object key = keys.next();
+			List list = (List) map.get(key);
+			Iterator iterator = list.iterator();
+			while (iterator.hasNext()) {
+				MarkerEntry entry = (MarkerEntry) iterator.next();
+				entries[i++] = entry;
+			}
+			map.put(key, new Integer(i - 1));
+		}
+		return map;
+	}
+
+	/**
+	 * Returns an array of marker counts where getMarkerCounts()[severity] is
+	 * the number of markers in the list with the given severity.
+	 * 
+	 * @return an array of {@link Integer} where index indicates
+	 *         [errors,warnings,infos,others]
+	 */
+	Integer[] getMarkerCounts() {
+		if (markerCounts == null) {
+			markerCounts=getMarkerCounts(markerEntryArray);
+
+		}
+		return markerCounts;
+	}
+
+	/**
+	 * Returns an array of marker counts for the given MarkerEntry array
+	 * , where getMarkerCounts()[severity] is the number of markers in 
+	 * the list with the given severity.
+	 * 
+	 * @return an array of {@link Integer} where index indicates
+	 *         [errors,warnings,infos,others]
+	 */
+	static Integer[] getMarkerCounts(MarkerEntry[] entries) {
+		int[] ints = new int[] { 0, 0, 0, 0 };
+		for (int idx = 0; idx < entries.length; idx++) {
+			IMarker marker = entries[idx].getMarker();
+			int severity = -1;
+			Object value = null;
+			try {
+				value = marker.getAttribute(IMarker.SEVERITY);
+			} catch (CoreException e) {
+				entries[idx].checkIfMarkerStale();
+			}
+			if (value instanceof Integer) {
+				severity = ((Integer) value).intValue();
+			}
+			if (severity >= IMarker.SEVERITY_INFO) {
+				ints[severity]++;
+			} else {
+				ints[3]++;
+			}
+		}
+
+		return new Integer[] { new Integer(ints[2]), new Integer(ints[1]),
+				new Integer(ints[0]), new Integer(ints[3]) };
+	}
+
+	/**
+	 * Return the {@link MarkerItem} that maps to marker.
+	 * 
+	 * @param marker
+	 * @return {@link MarkerItem}
+	 */
+	public MarkerItem getMarkerItem(IMarker marker) {
+		if (markerToEntryMap == null) {
+			markerToEntryMap = new HashMap();
+			for (int i = 0; i < markerEntryArray.length; i++) {
+				IMarker nextMarker = markerEntryArray[i].getMarker();
+				if (nextMarker != null)
+					markerToEntryMap.put(nextMarker, markerEntryArray[i]);
+			}
+		}
+
+		if (markerToEntryMap.containsKey(marker))
+			return (MarkerItem) markerToEntryMap.get(marker);
+
+		return null;
+	}
+
+	/**
+	 * @return Returns the markerEntryArray.
+	 */
+	MarkerEntry[] getMarkerEntryArray() {
+		return markerEntryArray;
+	}
+
+	/**
+	 * @return Returns the categories.
+	 */
+	MarkerCategory[] getCategories() {
+		return categories;
+	}
+
+	/**
+	 * @return MarkerSupportItem[]
+	 */
+	public MarkerSupportItem[] getElements() {
+		if(builder.isShowingHierarchy()){
+			return categories;
+		}
+		return markerEntryArray;
+	}
+
+	/**
+	 * @return Returns the builder.
+	 */
+	CachedMarkerBuilder getBuilder() {
+		return builder;
+	}
+	
+	/**
+	 * Use clone where thread safety is concerned.
+	 * The method is non-blocking.
+	 */
+	Markers getClone() {
+		Markers markers = new Markers(builder);
+		if (!inChange) {
+			markers.markerEntryArray = markerEntryArray;
+			markers.categories = categories;
+		}
+		return markers;
+	}
+
+	/**
+	 * @return Returns true if markers are changing.
+	 */
+	boolean isInChange() {
+		return inChange;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((builder == null) ? 0 : builder.hashCode());
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object obj) {
+		if (this == obj) {
+			return true;
+		}
+		if (obj == null) {
+			return false;
+		}
+		if (!(obj instanceof Markers)) {
+			return false;
+		}
+		Markers other = (Markers) obj;
+		if (builder == null) {
+			if (other.builder != null) {
+				return false;
+			}
+		} else if (!builder.equals(other.builder)) {
+			return false;
+		}
+		return true;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersChangeListener.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersChangeListener.java
new file mode 100644
index 0000000..da1b8cf
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersChangeListener.java
@@ -0,0 +1,814 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IMarkerDelta;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * The MarkersChangeListener is IResourceChangeListener that waits for any
+ * change in the markers in workspace that are of the view's interest. Schedules
+ * an update if we have a change that affects the view.
+ * 
+ * @since 3.6
+ */
+class MarkersChangeListener implements IResourceChangeListener {
+
+	private ExtendedMarkersView view;
+	private CachedMarkerBuilder builder;
+
+	private String[] listeningTypes;
+	private boolean receiving;
+
+	//private static final int UPDATE_TEST_CHECK_LIMIT = 1500;
+	
+	// The time the build started. A -1 indicates no build in progress.
+	private long preBuildTime;
+	
+	/**
+	 * 
+	 * @param view
+	 *            the marker view the listener is listening for
+	 * @param builder
+	 *            the builder for the view
+	 */
+	MarkersChangeListener(ExtendedMarkersView view, CachedMarkerBuilder builder) {
+		this.view = view;
+		this.builder = builder;
+		listeningTypes = new String[0];
+	}
+
+	/**
+	 * Start listening for changes.
+	 */
+	synchronized void start() {
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(
+				this,
+				IResourceChangeEvent.POST_CHANGE
+						| IResourceChangeEvent.PRE_BUILD
+						| IResourceChangeEvent.POST_BUILD);
+	}
+
+	/**
+	 * Stop listening for changes.
+	 */
+	synchronized void stop() {
+		if (listeningTypes != null) {
+			listeningTypes = new String[0];
+		}
+		ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
+	}
+
+	/**
+	 * Checks if the workspace is building
+	 * 
+	 */
+	boolean workspaceBuilding() {
+			return preBuildTime > 0;
+	}
+	
+	/**
+	 * Tells the listener to become responsive to changes for the specified
+	 * types of markers.
+	 * 
+	 * @param typeIds
+	 *            the ids of the IMarker types
+	 * @param includeSubTypes
+	 *            true to include the sub-marker-types
+	 */
+	void listenToTypes(String[] typeIds, boolean includeSubTypes) {
+		try {
+			// register marker types being gathering
+			if (includeSubTypes) {
+				listeningTypes = MarkerResourceUtil.getAllSubTypesIds(typeIds);
+			} else {
+				// register marker types being gathering
+				listeningTypes = typeIds;
+			}
+		} catch (Exception e) {
+			MarkerSupportInternalUtilities.logViewError(e);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org
+	 * .eclipse.core.resources.IResourceChangeEvent)
+	 */
+	public synchronized void resourceChanged(IResourceChangeEvent event) {
+		/* We can now consider removing synchronized for
+		 * this method.Only the start and stop need to be
+		 * synchronize on the listener
+		 */
+		setReceivingChange(true);
+		try {
+			if (event.getType() == IResourceChangeEvent.PRE_BUILD) {
+				preBuild();
+				return;
+			}
+			if (event.getType() == IResourceChangeEvent.POST_BUILD) {
+				postBuild();
+				// clear any pending updates
+				builder.getUpdateScheduler().speedUpPendingUpdates();
+				return;
+			}
+			if(!hasApplicableTypes(event)){
+				return;
+			}
+			// if (!needsUpdate(event)) {
+			// return;
+			// }
+			
+			if (!builder.isIncremental()) {
+				handleMarkerChange(event);
+				return;
+			}
+			handleIncrementalChange(event);
+		} finally {
+			setReceivingChange(false);
+		}
+	}
+
+	/**
+	 * @return the receiving
+	 */
+	boolean isReceivingChange() {
+		return receiving;
+	}
+
+	/**
+	 * @param receiving
+	 *            the receiving to set
+	 */
+	void setReceivingChange(boolean receiving) {
+		this.receiving = receiving;
+	}
+
+	/**
+	 * Handle marker change event
+	 * @param event
+	 */
+	private void handleMarkerChange(IResourceChangeEvent event) {
+		builder.getUpdateScheduler().scheduleUpdate();
+	}
+	
+	/**
+	 * Markers have not changed
+	 */
+	private void handleNoMarkerChange() {
+		//view.indicateUpdating(null, true, false);
+	}
+
+	/**
+	 * Handle changes incrementally. 
+	 * The following performs incremental updation
+	 * of the markers that were gathered initially, and keeps them synched at
+	 * any point with the markers of interest in Workspace. Unfortunately marker
+	 * operations cannot be locked so locking between gathering of markers and
+	 * marker deltas is not possible.
+	 * 
+	 * Note : this method of updating is NOT used and tested yet and has holes
+	 * but left out SOLELY for further investigation(*).
+	 * 
+	 * @param event
+	 */
+	private void handleIncrementalChange(IResourceChangeEvent event) {
+		IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true);
+		if (markerDeltas.length == 0) {
+			return;
+		}
+		Collection removed = new LinkedList(), added = new LinkedList(), changed = new LinkedList();
+		String[] types = listeningTypes;
+		for (int i = 0; i < markerDeltas.length; i++) {
+			try {
+				String typeId = markerDeltas[i].getType();
+				if (!isApplicableType(types, typeId)) {
+					continue;
+				}
+				IMarker marker = markerDeltas[i].getMarker();
+				MarkerEntry markerEntry = new MarkerEntry(marker);
+				switch (markerDeltas[i].getKind()) {
+				case IResourceDelta.REMOVED: {
+					removed.add(markerEntry);
+					break;
+				}
+				case IResourceDelta.ADDED: {
+					added.add(markerEntry);
+					break;
+				}
+				case IResourceDelta.CHANGED: {
+					changed.add(markerEntry);
+					break;
+				}
+				default:{
+					break;
+				}
+				}
+			} catch (Exception e) {
+				// log exception
+				MarkerSupportInternalUtilities.logViewError(e);
+			}
+		}
+		if (removed.size() > 0 || added.size() > 0 || changed.size() > 0) {
+			MarkerUpdate update = new MarkerUpdate(added, removed, changed);
+			builder.incrementalUpdate(update);
+			builder.getUpdateScheduler().scheduleUpdate();
+		} else {
+			handleNoMarkerChange();
+		}
+		return;
+	}
+
+	/**
+	 * @param event
+	 * @return true if the marker delta has a change in an applicable marker
+	 *         type else false.
+	 */
+	private boolean hasApplicableTypes(IResourceChangeEvent event) {
+		IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true);
+		String[] types = listeningTypes;
+		if (types.length == 0) {
+			return false;
+		}
+		for (int i = 0; i < markerDeltas.length; i++) {
+			if (isApplicableType(types, markerDeltas[i].getType())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Helper to {@link #hasApplicableTypes(IResourceChangeEvent)}
+	 * 
+	 * @param types
+	 * @param typeId
+	 */
+	private boolean isApplicableType(String[] types, String typeId) {
+		for (int i = 0; i < types.length; i++) {
+			if (types[i].equals(typeId)) {
+				return true;
+			}
+		}
+		return false;
+	}
+	
+//	/**
+//	 * Note: This has been left commented out for further
+//	 * investigation(*),instead we we use the above for just checking types.
+//	 * This may invoke contributed code; as a field filter can be contributed.
+//	 * But again in such a case, the view would be a contributed as well.And, it
+//	 * is the responsibility of the field filter code to ensure the select
+//	 * method of filter remains fast.
+//	 * 
+//	 */
+//	private boolean needsUpdate(IResourceChangeEvent event) {
+//		IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true);
+//		MarkerEntry[] presentEntries = builder.getClonedMarkers().getClone()
+//				.getMarkerEntryArray();
+//		int deltaCount = markerDeltas.length;
+//		if (deltaCount == 0) {
+//			return false;
+//		}
+//		String[] types = listeningTypes;
+//		if (hasMarkerRemoval(presentEntries, null)) {
+//			return true;
+//		}
+//		int maxTestCount = deltaCount > UPDATE_TEST_CHECK_LIMIT ? UPDATE_TEST_CHECK_LIMIT
+//				: deltaCount;
+//
+//		for (int i = 0; i < markerDeltas.length; i++) {
+//			String typeId = markerDeltas[i].getType();
+//			if (!hasApplicableTypes(types, typeId)) {
+//				continue;
+//			}
+//			if (presentEntries == null || presentEntries.length == 0) {
+//				return true;
+//			}
+//			int kind = markerDeltas[i].getKind();
+//			IMarker marker = markerDeltas[i].getMarker();
+//			MarkerEntry markerEntry = new MarkerEntry(marker);
+//			if (affectsCurrentState(presentEntries, markerEntry, kind)) {
+//				return true;
+//			}
+//			if (i >= maxTestCount - 1) {
+//				return true;
+//			}
+//		}
+//		return false;
+//	}
+//
+//	/**
+//	 * Check if a marker change, removal, or addition is of interest to the
+//	 * view.
+//	 * 
+//	 * <ul>
+//	 * <li>Set the MarkerEntry to be stale, if discovered at any point of time
+//	 * of its use.This will greatly speed up lot of parts of the view.</li>
+//	 * <li>Instead of testing all marker changes, test only upto a maximum limit
+//	 * beyond which we schedule an update anyway.</li>
+//	 * 
+//	 * </ul>
+//	 * 
+//	 * @param marker
+//	 * @param kind
+//	 */
+//	private boolean affectsCurrentState(MarkerEntry[] presentEntries,
+//			MarkerEntry marker, int kind) {
+//		switch (kind) {
+//		case IResourceDelta.REMOVED: {
+//			return hasMarkerRemoval(presentEntries, marker);
+//		}
+//		case IResourceDelta.ADDED: {
+//			return hasMarkerAdditionsofInterest(presentEntries, marker);
+//		}
+//		case IResourceDelta.CHANGED: {
+//			return hasMarkerChanges(presentEntries, marker);
+//		}
+//		default: {
+//			return false;
+//		}
+//		}
+//	}
+//
+//	/**
+//	 * Returns whether or not the given marker addition is of interest to the
+//	 * view.
+//	 * 
+//	 * @param presentEntries
+//	 *            current marker entries
+//	 * @param marker
+//	 *            the marker entry
+//	 * @return <code>true</code> if build is needed <code>false</code> if no
+//	 *         update needed
+//	 */
+//	private boolean hasMarkerAdditionsofInterest(MarkerEntry[] presentEntries,
+//			MarkerEntry marker) {
+//		MarkerContentGenerator generator = builder.getGenerator();
+//		if (generator.select(marker)) {
+//			return true;
+//		}
+//		return false;
+//	}
+//
+//	/**
+//	 * Returns whether or not markers were removed from the view.
+//	 * 
+//	 * @param presentEntriest
+//	 *            current marker entries
+//	 * @param marker
+//	 *            the marker entry
+//	 * @return <code>true</code> if build is needed <code>false</code> if no
+//	 *         update needed
+//	 */
+//	private boolean hasMarkerRemoval(MarkerEntry[] presentEntriest,
+//			MarkerEntry marker) {
+//		for (int i = 0; i < presentEntriest.length; i++) {
+//			if (presentEntriest[i].getStaleState()
+//					|| presentEntriest[i].getMarker() == null) {
+//				return true;
+//			}
+//			if (marker != null) {
+//				if (presentEntriest[i].getMarker().equals(marker.getMarker())) {
+//					return false;
+//				}
+//			}
+//		}
+//		return false;
+//	}
+//
+//	/**
+//	 * Returns whether or not markers were removed from the view.
+//	 * 
+//	 * @param presentEntriest
+//	 *            current marker entries
+//	 * @param marker
+//	 *            the marker entry
+//	 * @return <code>true</code> if build is needed <code>false</code> if no
+//	 *         update needed
+//	 */
+//	private boolean hasMarkerChanges(MarkerEntry[] presentEntriest,
+//			MarkerEntry marker) {
+//		MarkerContentGenerator generator = builder.getGenerator();
+//		if (generator.select(marker)) {
+//			return true;
+//		}
+//		for (int i = 0; i < presentEntriest.length; i++) {
+//			if (presentEntriest[i].getMarker().equals(marker.getMarker())) {
+//				return true;
+//			}
+//
+//		}
+//		return false;
+//	}
+
+	/**
+	 * We are in a pre-build state.
+	 */
+	private void preBuild() {
+		preBuildTime = System.currentTimeMillis();
+	}
+	
+	/**
+	 * Post-build has happened.
+	 */
+	private void postBuild() {
+		preBuildTime = -1;
+	}
+	
+	/**
+	 * @return Returns the view.
+	 */
+	ExtendedMarkersView getView() {
+		return view;
+	}
+
+	/**
+	 * @return Returns the builder.
+	 */
+	CachedMarkerBuilder getBuilder() {
+		return builder;
+	}
+}
+
+///////////helpers/////////////
+
+/**
+ * For Incremental updating
+ * @since 3.6
+ */
+class MarkerUpdate {
+	Collection added;
+	Collection removed;
+	Collection changed;
+
+	MarkerUpdate(Collection added, Collection removed, Collection changed) {
+		this.added = added;
+		this.removed = removed;
+		this.changed = changed;
+	}
+}
+
+/**
+ * Manages scheduling of marker updates and the view ,also various other methods
+ * related to scheduling updates.This class should be used for update
+ * scheduling to avoid confusion.
+ * 
+ * Note: the reason for keeping this class is because the update scheduling is
+ * so closely related to Marker change events.
+ * 
+ * @since 3.6
+ */
+class MarkerUpdateScheduler {
+	
+	static final int SHORT_DELAY = 150;
+	static final int LONG_DELAY = 10000;
+	static final long TIME_OUT = 30000;
+
+	private CachedMarkerBuilder builder;
+	private ExtendedMarkersView view;
+	
+	private MarkerUpdateJob updateJob;
+	private UIUpdateJob uiUpdateJob;
+	
+	private final Object schedulingLock;
+	
+	private MarkerUpdateTimer updateTimer;
+
+	/**
+	 * @param view 
+	 * @param builder 
+	 */
+	public MarkerUpdateScheduler(ExtendedMarkersView view,
+			CachedMarkerBuilder builder) {
+		this.view = view;
+		this.builder = builder;
+		schedulingLock = new Object();
+		updateTimer = new MarkerUpdateTimer();
+	}
+	
+	/**
+	 * Always use this to schedule update job
+	 * @return Returns the schedulingLock.
+	 */
+	Object getSchedulingLock() {
+		return schedulingLock;
+	}
+
+	/**
+	 * Schedule marker update.
+	 */
+	void scheduleUpdate(long delay, boolean cancelPrevious,
+			boolean[] changeFlags) {
+		//we do not need to make this atomic (?)
+		builder.setBuilding(true);
+		if (cancelPrevious) {
+			cancelQueuedUIUpdates();
+			cancelUpdate();
+		}
+		// indicateStatus(MarkerMessages.MarkerView_queueing_updates, true);
+		updateJob = builder.scheduleUpdateJob(delay, true, changeFlags);
+		// updateTimer.reset();
+	}
+
+	/**
+	 * Schedule marker update.
+	 */
+	void scheduleUpdate(long delay, boolean cancelPrevious) {
+		//we do not need to make this atomic (?)
+		builder.setBuilding(true);
+		if (cancelPrevious) {
+			cancelQueuedUIUpdates();
+			cancelUpdate();
+		}
+		// indicateStatus(MarkerMessages.MarkerView_queueing_updates, true);
+		updateJob = builder.scheduleUpdateJob(delay, true);
+		// updateTimer.reset();
+	}
+
+	/**
+	 * Schedule marker update.
+	 */
+	void scheduleUpdate(long delay, boolean[] changeFlags) {
+		scheduleUpdate(delay, true, changeFlags);
+	}
+
+	/**
+	 * Schedule marker update.
+	 */
+	void scheduleUpdate(boolean[] changeFlags) {
+		synchronized (updateTimer) {
+			builder.updateChangeFlags(changeFlags);
+			updateTimer.update();
+		}
+	}
+
+	/**
+	 * Schedule marker update.
+	 */
+
+	void scheduleUpdate() {
+		synchronized (updateTimer) {
+			updateTimer.update();
+		}
+	}
+
+	/**
+	 * Schedule pending updates to happen quickly.
+	 */
+	void speedUpPendingUpdates() {
+		synchronized (updateTimer) {
+			updateTimer.speedUpPendingUpdates();
+		}
+	}
+
+	/**
+	 * Returns true if updates have been scheduled and not finished,else false.
+	 */
+	boolean updatesPending() {
+		synchronized (updateTimer) {
+			if (builder.isBuilding()) {
+				return true;
+			}
+			boolean pending = false;
+			if (updateJob != null) {
+				pending = updateJob.getState() != Job.NONE;
+			}
+			if (!pending) {
+				if (uiUpdateJob != null) {
+					pending = uiUpdateJob.getState() != Job.NONE;
+				}
+			}
+			if (!pending) {
+				// No need to come till here
+				pending = updateTimer.updatesPending();
+			}
+			return pending;
+		}
+	}
+
+	/**
+	 * Schedule only an UI update
+	 * 
+	 * @param delay
+	 * 
+	 */
+	void scheduleUIUpdate(long delay) {
+		uiUpdateJob = view.scheduleUpdate(delay);
+	}
+
+	/**
+	 * Cancel any marker update if pending.
+	 * 
+	 */
+	void cancelUpdate() {
+		builder.cancelUpdate();
+	}
+
+	/**
+	 * Cancel any UI update if pending.
+	 * 
+	 */
+	void cancelQueuedUIUpdates() {
+		view.cancelQueuedUpdates();
+	}
+	
+	///**
+	// * Indicate the status message on UI.
+	// * 
+	// * @param messsage
+	// *            the status to display
+	// */
+	//void indicateStatus(String messsage) {
+	//	indicateStatus(messsage, false);
+	//}
+	////See Bug 294303
+	///**
+	// * Indicate the status message on UI.
+	// * 
+	// * @param messsage
+	// *            the status to display
+	// * @param updateUI
+	// *            <code>true</code> update label to show changing status
+	// */
+	//void indicateStatus(String messsage, boolean updateUI) {
+	// //See Bug 294303
+	//	view.indicateUpdating(messsage != null ? messsage
+	//			: MarkerMessages.MarkerView_queueing_updates, updateUI);
+	//}
+	
+
+	/**
+	 * //Fix for Bug 294959.There is another patch(more exhaustive in terms
+	 * of possibilities to cover) on the bug in which we keep scheduling
+	 * updates with CANCEL_MARGIN_DELAY after a Post-Build event until we
+	 * have actually finished an update. In case the current way has
+	 * problems on a machine It would be worth looking at that.An
+	 * optimization to ensure we do not update too often, yet be responsive
+	 * and not miss any change.
+	 * 
+	 * Note that we re-schedule the update every time.This is to ensure we
+	 * do not miss out an update even if another update was externally(UI)
+	 * scheduled, and finished much earlier(The changes before that have
+	 * been taken care of by the that update).Also we mandate updating once
+	 * in TIME-OUT.To change behaviour, changes in the DELAY parameters will
+	 * suffice. For example, setting TIME_OUT much larger value, and so on.
+	 * 
+	 * @since 3.6
+	 */
+	class MarkerUpdateTimer {
+		
+		/**
+		 * This is to allow batching together any changes that may arrive in
+		 * after a post-build, in a short interval.This controls how we
+		 * update when we are receiving post-build events and change-events
+		 * continuously over a short gap of time.
+		 */
+		private final long CANCEL_MARGIN_DELAY = (SHORT_DELAY * 3);
+		private final long NO_CANCEL_TIME_OUT = (LONG_DELAY * 3);
+		//this to account for an ordinary change that may come in
+		//after post build
+		private static final long AFTER_MARGIN = 2;
+		
+		private long timeB4Update;
+
+		private long timerValidStart;
+
+		void update() {
+			long startTime = view.getLastUIRefreshTime();
+			long currentTime = System.currentTimeMillis();
+			long updateTimeGap = currentTime - startTime;
+			// check if we can cancel a scheduled or a running update
+			boolean cancelable = !(updateTimeGap > TIME_OUT);
+			updateTimeGap = updateTimeGap % TIME_OUT;
+			if (!cancelable) {
+				cancelable = !isValidTimeOut(startTime, currentTime, TIME_OUT);
+				if (timeB4Update != -1 && cancelable) {
+					if (updateTimeGap < CANCEL_MARGIN_DELAY) {
+						updateTimeGap = CANCEL_MARGIN_DELAY;
+					}
+				}
+			}
+
+			if (timeB4Update == -1) {
+				/*
+				 * This is an optimization and may be removed.But, it is
+				 * desirable that we schedule soon after a post-build.
+				 */
+				// a Special Update request
+				go(CANCEL_MARGIN_DELAY, cancelable);
+				return;
+			}
+
+			long delay = TIME_OUT - updateTimeGap;
+			if ((delay + updateTimeGap) > NO_CANCEL_TIME_OUT) {
+				if (delay > NO_CANCEL_TIME_OUT) {
+					// rectify the delay
+					delay = LONG_DELAY;
+				}
+				if (isValidTimeOut(startTime, currentTime, NO_CANCEL_TIME_OUT)) {
+					cancelable = false;
+				}
+			}
+			if (!builder.getMarkerListener().workspaceBuilding()) {
+				if (updateTimeGap + LONG_DELAY > TIME_OUT) {
+					if (updateTimeGap + (CANCEL_MARGIN_DELAY) >= TIME_OUT) {
+						go(delay, false);
+					} else {
+						go(delay, cancelable);
+					}
+				} else {
+					//long diff =timeB4Update-currentTime;
+					//if (diff <= AFTER_MARGIN && diff >= 0) {
+					//	go(0L, false);
+					//} else {
+					//	go(LONG_DELAY, cancelable);
+					//}
+					go(LONG_DELAY, cancelable);
+				}
+			} else {
+				// we are in build again
+				go(delay, cancelable);
+			}
+		}
+
+		/**
+		 * Schedules quickly if any update is pending, Or prepares for quick
+		 * scheduling on next change
+		 */
+		void speedUpPendingUpdates() {
+			/*
+			 * if we have a distant pending update schedule it with
+			 * CANCEL_MARGIN_DELAY
+			 */
+			if (updatesPending()) {
+				timeB4Update = -1;
+				update();
+			}
+			/*
+			 * Else wait for next change(Post-Change?), it will be scheduled
+			 * with CANCEL_MARGIN_DELAY
+			 */
+			timeB4Update = -1;
+		}
+
+		/**
+		 * Checks if we have a pending update
+		 */
+		boolean updatesPending() {
+			long diff = timeB4Update - System.currentTimeMillis();
+			return diff > CANCEL_MARGIN_DELAY;
+		}
+
+		/**
+		 * Checks if a time-out is valid,or if its just a period of
+		 * inactivity. NOTE:This is PURELY an optimization and can be
+		 * omitted.
+		 */
+		private boolean isValidTimeOut(long startTime, long currentTime, long timeOut) {
+			// long updateTimeGap = currentTime - startTime;
+			if (timeB4Update != -1 && startTime > timeB4Update) {
+				/*
+				 * The last scheduled update finished.This is not an actual
+				 * TIME_OUT.Possible that we have not updated for a long
+				 * interval.Lets make this update cancelable anyway.Reset
+				 * timer.
+				 */
+				timerValidStart = currentTime;
+				return false;
+			} else if ((currentTime - timerValidStart) < timeOut ) {
+				return false;
+			} else {
+				/*
+				 * Do not update internal value we only use this for
+				 * checking valid TIME_OUTs
+				 */
+				return true;
+			}
+		}
+
+		private void go(long delay, boolean cancelPrevious) {
+			timeB4Update = System.currentTimeMillis() + delay;
+			scheduleUpdate(delay + AFTER_MARGIN, cancelPrevious);
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
index 199c38d..f124dfc 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,6 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchPropertyPage;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.PropertyPage;
 import org.eclipse.ui.ide.undo.UpdateMarkersOperation;
@@ -49,8 +48,7 @@ import org.eclipse.ui.views.markers.internal.Util;
  * @since 3.4
  * 
  */
-public class MarkersPropertyPage extends PropertyPage implements
-		IWorkbenchPropertyPage {
+public class MarkersPropertyPage extends PropertyPage {
 
 	private Text descriptionText;
 	private IMarker marker;
@@ -58,7 +56,7 @@ public class MarkersPropertyPage extends PropertyPage implements
 	Button completedCheckbox;
 
 	/**
-	 * Create a new instance of the reciever.
+	 * Create a new instance of the receiver.
 	 */
 	public MarkersPropertyPage() {
 		super();
@@ -106,7 +104,7 @@ public class MarkersPropertyPage extends PropertyPage implements
 	}
 
 	/**
-	 * Creates a seperator.
+	 * Creates a separator.
 	 */
 	protected void createSeperator(Composite parent) {
 		Label seperator = new Label(parent, SWT.NULL);
@@ -134,9 +132,13 @@ public class MarkersPropertyPage extends PropertyPage implements
 	private void createDescriptionArea(Composite parent) {
 		Label label = new Label(parent, SWT.NONE);
 		label.setText(MarkerMessages.propertiesDialog_description_text);
-		descriptionText = new Text(parent, (SWT.SINGLE | SWT.BORDER));
+		GridData labelGridData= new GridData(SWT.LEFT, SWT.TOP, false, false);
+		label.setLayoutData(labelGridData);
+		descriptionText = new Text(parent, (SWT.MULTI|SWT.WRAP|SWT.V_SCROLL|SWT.BORDER));
+		labelGridData.verticalIndent= -descriptionText.computeTrim(0, 0, 0, 0).y;
 		GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-		gridData.widthHint = convertHorizontalDLUsToPixels(400);
+		gridData.widthHint = convertHorizontalDLUsToPixels(250);
+		gridData.heightHint = convertHeightInCharsToPixels(3);
 		descriptionText.setLayoutData(gridData);
 		descriptionText.setText(Util.getProperty(IMarker.MESSAGE, marker));
 		descriptionText.selectAll();
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersTreeViewer.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersTreeViewer.java
index 1002deb..693df86 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersTreeViewer.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkersTreeViewer.java
@@ -15,8 +15,6 @@ import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Item;
 import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.swt.widgets.Widget;
 
 /**
  * The MarkersTreeViewer is a viewer that optimizes the expandToLevel method.
@@ -25,8 +23,6 @@ import org.eclipse.swt.widgets.Widget;
  * 
  */
 
-// TODO Delete this class if Bug 201135 is fixed.
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=201135
 public class MarkersTreeViewer extends TreeViewer {
 
 	/**
@@ -58,29 +54,12 @@ public class MarkersTreeViewer extends TreeViewer {
 		super(tree);
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#expandToLevel(java.lang.Object,
-	 *      int)
-	 */
-	public void expandToLevel(Object elementOrTreePath, int level) {
-		if (level == 1) {
-			Widget widget = findItem(elementOrTreePath);
-			if (widget != null && widget instanceof TreeItem) {
-				((TreeItem) widget).setExpanded(true);
-				return;
-			}
-		}
-		super.expandToLevel(elementOrTreePath, level);
-	}
-
 	/**
 	 * Remove all of the entries and unmap all of the elements.
 	 */
 	public void removeAndClearAll() {
 		removeAll(getControl());
-		unmapAllElements();		
+		unmapAllElements();
 	}
 
 	/*
@@ -95,8 +74,9 @@ public class MarkersTreeViewer extends TreeViewer {
 		/*
 		 * For performance reasons clear cache of the item used in updating UI.
 		 */
-		MarkerSupportItem cellItem=(MarkerSupportItem) element;
-		if(cellItem.isConcrete())cellItem.clearCache();
+		MarkerSupportItem cellItem = (MarkerSupportItem) element;
+		if (cellItem.isConcrete())
+			cellItem.clearCache();
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MockMarkerEntry.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MockMarkerEntry.java
index ff1d51f..74991ed 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MockMarkerEntry.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MockMarkerEntry.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.ui.internal.views.markers;
 /**
  * @since 3.4
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
index 2e8723a..53e9cca 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ProblemsView.java
@@ -11,7 +11,6 @@
 
 package org.eclipse.ui.internal.views.markers;
 
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.views.markers.MarkerSupportView;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
@@ -31,10 +30,4 @@ public class ProblemsView extends MarkerSupportView {
 		
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getStaticContextId()
-	 */
-	String getStaticContextId() {
-		return PlatformUI.PLUGIN_ID + ".problem_view_context";//$NON-NLS-1$;
-	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
index 49c0d32..e302957 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/QuickFixHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,8 +20,7 @@ import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableContext;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -34,11 +33,7 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IMarkerResolution;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
-import org.eclipse.ui.statushandlers.StatusAdapter;
-import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.views.markers.MarkerViewHandler;
 import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
@@ -141,17 +136,12 @@ public class QuickFixHandler extends MarkerViewHandler {
 		String markerDescription = selected.getAttribute(IMarker.MESSAGE,
 				MarkerSupportInternalUtilities.EMPTY_STRING);
 		if (resolutions.isEmpty()) {
-			Status newStatus = new Status(
-					IStatus.INFO,
-					IDEWorkbenchPlugin.IDE_WORKBENCH,
-					NLS
-							.bind(
-									MarkerMessages.MarkerResolutionDialog_NoResolutionsFound,
-									new Object[] { markerDescription }));
-			StatusAdapter adapter = new StatusAdapter(newStatus);
-			adapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY,
-					MarkerMessages.MarkerResolutionDialog_CannotFixTitle);
-			StatusManager.getManager().handle(adapter, StatusManager.SHOW);
+			MessageDialog
+					.openInformation(
+							view.getSite().getShell(),
+							MarkerMessages.resolveMarkerAction_dialogTitle,
+							NLS	.bind(MarkerMessages.MarkerResolutionDialog_NoResolutionsFound,
+									  new Object[] { markerDescription }));
 		} else {
 
 			String description = NLS.bind(
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ScopeArea.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ScopeArea.java
index a68fac2..c0e81c3 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ScopeArea.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ScopeArea.java
@@ -146,6 +146,18 @@ class ScopeArea extends GroupFilterConfigurationArea {
 		 *            set filter should be used
 		 */
 		void setSelection(boolean selected) {
+			if (selected || (button.getSelection() && !selected)) {
+				for (int i = 0; i < buttons.length; i++) {
+					buttons[i].setSelection(false);
+				}
+				if (selected) {
+					setScope(MarkerFieldFilterGroup.ON_WORKING_SET);
+				}
+			}
+			if ((button.getSelection() && !selected)) {
+				buttons[MarkerFieldFilterGroup.ON_ANY].setSelection(true);
+				setScope(MarkerFieldFilterGroup.ON_ANY);
+			}
 			button.setSelection(selected);
 		}
 
@@ -247,6 +259,13 @@ class ScopeArea extends GroupFilterConfigurationArea {
 		return button;
 	}
 
+	/**
+	 * Set the scope
+	 * @param value
+	 */
+	private void setScope(int value){
+		scope = value;
+	}
 	/*
 	 * (non-Javadoc)
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
index 86c323c..cff6aa8 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/SortFieldContribution.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,9 +125,7 @@ public class SortFieldContribution extends MarkersContribution {
 			 */
 			public void fill(Menu menu, int index) {
 				MenuItem item = new MenuItem(menu, SWT.RADIO);
-				String title = field.getColumnHeaderText();
-				if (title.length() == 0)
-					title = field.getColumnTooltipText();
+				String title = field.getName();
 				item.setText(title);
 				ExtendedMarkersView view = getView();
 				item.addListener(SWT.Selection,
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
index 149a722..9e47707 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TasksView.java
@@ -11,7 +11,6 @@
 
 package org.eclipse.ui.internal.views.markers;
 
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.views.markers.MarkerSupportView;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
 
@@ -29,13 +28,4 @@ public class TasksView extends MarkerSupportView {
 		super(MarkerSupportRegistry.TASKS_GENERATOR);
 		
 	}
-	
-	/*
-	 * (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.markers.ExtendedMarkersView#getStaticContextId()
-	 */
-	String getStaticContextId() {
-		return PlatformUI.PLUGIN_ID + ".task_list_view_context"; //$NON-NLS-1$
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
index 619e13f..3a6bd52 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/TypesConfigurationArea.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,16 +18,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
@@ -36,7 +26,16 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+
 import org.eclipse.ui.views.markers.MarkerFieldFilter;
 import org.eclipse.ui.views.markers.internal.MarkerMessages;
 import org.eclipse.ui.views.markers.internal.MarkerSupportRegistry;
@@ -278,7 +277,7 @@ public class TypesConfigurationArea extends GroupFilterConfigurationArea {
 				.getInput();
 
 		((MarkerTypeFieldFilter) filter).setSelectedTypes(selectedTypes,
-				group.builder.getGenerator());
+				group.generator);
 
 	}
 
@@ -308,10 +307,6 @@ public class TypesConfigurationArea extends GroupFilterConfigurationArea {
 				| SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER);
 		tree.setLinesVisible(true);
 		tree.setHeaderVisible(false);
-		TableLayout tableLayout = new TableLayout();
-		tree.setLayout(tableLayout);
-		tableLayout.addColumnData(new ColumnWeightData(100, true));
-		new TreeColumn(tree, SWT.NONE, 0);
 
 		typesViewer = new CheckboxTreeViewer(tree);
 		initializeFontMetrics(tree);
@@ -351,6 +346,7 @@ public class TypesConfigurationArea extends GroupFilterConfigurationArea {
 			public void checkStateChanged(CheckStateChangedEvent event) {
 				Object element = event.getElement();
 				boolean checked = event.getChecked();
+				typesViewer.setGrayed(element, false);
 				setChildrenChecked(element, checked);
 				setParentCheckState(element, checked);
 			}
@@ -394,6 +390,7 @@ public class TypesConfigurationArea extends GroupFilterConfigurationArea {
 						return;
 					}
 				}
+				typesViewer.setGrayed(parent, false);
 				// All are the same - update the parent
 				typesViewer.setChecked(parent, checked);
 
@@ -626,6 +623,7 @@ public class TypesConfigurationArea extends GroupFilterConfigurationArea {
 		Collection checked = new HashSet();
 		Collection greyed = new HashSet();
 		findTypeEntries(group, checked, greyed);
+		checked.addAll(greyed);
 		typesViewer.setCheckedElements(checked.toArray());
 		typesViewer.setGrayedElements(greyed.toArray());
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/UIUpdateJob.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/UIUpdateJob.java
new file mode 100644
index 0000000..3ebacff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/UIUpdateJob.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.views.markers;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.WorkbenchJob;
+import org.eclipse.ui.views.markers.internal.MarkerMessages;
+
+/**
+ * The UIUpdateJob runs in the UI thread and is responsible updating the Markers
+ * view UI with newly updated markers.
+ * 
+ * @since 3.6
+ * 
+ */
+class UIUpdateJob extends WorkbenchJob {
+	
+	private ExtendedMarkersView view;
+
+	private boolean updating;
+
+	private long lastUpdateTime=-1;
+
+	/**
+	 * @param view
+	 *            the markers view base class
+	 */
+	public UIUpdateJob(ExtendedMarkersView view) {
+		super(view.getSite().getShell().getDisplay(),
+				MarkerMessages.MarkerView_19);
+		this.view = view;
+		updating = false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.
+	 * IProgressMonitor)
+	 */
+	public IStatus runInUIThread(IProgressMonitor monitor) {
+		if(monitor.isCanceled()){
+			return Status.CANCEL_STATUS;
+		}
+		TreeViewer viewer = view.getViewer();
+		if (viewer.getControl().isDisposed()) {
+			return Status.CANCEL_STATUS;
+		}
+		
+		Markers clone = view.getActiveViewerInputClone();
+		try {
+			updating = true;
+			monitor.beginTask(MarkerMessages.MarkerView_19,
+					IProgressMonitor.UNKNOWN);
+
+			if (monitor.isCanceled()) {
+				return Status.CANCEL_STATUS;
+			}
+			
+			//view.indicateUpdating(MarkerMessages.MarkerView_19,
+			//		true);
+
+			// If there is only one category and the user has no saved state
+			// show it
+			if (view.getBuilder().isShowingHierarchy()
+					&& view.getCategoriesToExpand().isEmpty()) {
+				MarkerCategory[] categories = clone.getCategories();
+				if (categories != null && categories.length == 1)
+					view.getCategoriesToExpand().add(
+							categories[0].getDescription());
+			}
+
+			if (monitor.isCanceled())
+				return Status.CANCEL_STATUS;
+			/* 
+			 * always use a clone for Thread safety. We avoid setting the clone
+			 * as new input as we would offset the benefits of optimization in
+			 * TreeViewer.
+			 */
+			clone = view.createViewerInputClone();
+			if (clone == null) {
+				// do not update yet,we are changing
+				return Status.CANCEL_STATUS;
+			}
+			/*
+			 * we prefer not to check for cancellation beyond this since we
+			 * have to show correct marker counts on UI, not an updating message.
+			 */
+			IContentProvider contentProvider = viewer.getContentProvider();
+			contentProvider.inputChanged(viewer, view.getViewerInput(), clone);
+			viewer.getTree().setRedraw(false);
+			viewer.refresh(true);
+			if (!monitor.isCanceled()) {
+				//do not expand if canceled
+				view.reexpandCategories();
+			}
+			if (view.getBuilder().readChangeFlags()[0]) {
+				// indicate changes
+			}
+			//show new counts
+			view.updateTitle();
+
+			lastUpdateTime = System.currentTimeMillis();
+		} finally {
+			viewer.getTree().setRedraw(true);
+			view.updateStatusLine((IStructuredSelection) viewer.getSelection());
+			//view.updateCategoryLabels();
+			updating = false;
+		}
+		monitor.done();
+		return Status.OK_STATUS;
+	}
+
+	/**
+	 * @return Returns true if updating.
+	 */
+	boolean isUpdating() {
+		return updating;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
+	 */
+	public boolean shouldRun() {
+		if (!PlatformUI.isWorkbenchRunning()) {
+			return false;
+		}
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
+	 */
+	public boolean belongsTo(Object family) {
+		if (family.equals(view.MARKERSVIEW_UPDATE_JOB_FAMILY)) {
+			return true;
+		}
+		return super.belongsTo(family);
+	}
+
+	/**
+	 * @return Returns the lastUpdateTime.
+	 */
+	long getLastUpdateTime() {
+		return lastUpdateTime;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
index 1c3736e..53710ec 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ArchiveFileExportOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
index 0d98f34..e99c29f 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/DataTransferMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,7 +53,14 @@ public class DataTransferMessages extends NLS {
 	public static String FileImport_overwriteExisting;
 	public static String FileImport_createComplete;
 	public static String FileImport_createSelectedFolders;
+	public static String FileImport_createVirtualFolders;
+	public static String FileImport_importElementsAs;
+	public static String FileImport_createVirtualFoldersTooltip;
+	public static String FileImport_createLinksInWorkspace;
+	public static String FileImport_advanced;
 	public static String FileImport_noneSelected;
+	public static String FileImport_cannotImportFilesUnderAVirtualFolder;
+	public static String FileImport_haveToCreateLinksUnderAVirtualFolder;
 	public static String FileImport_invalidSource;
 	public static String FileImport_sourceEmpty;
 	public static String FileImport_importProblems;
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IFileExporter.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IFileExporter.java
index 14ec986..6518587 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IFileExporter.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/IFileExporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.ui.internal.wizards.datatransfer;
 
 import java.io.IOException;
 
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 
@@ -32,6 +33,16 @@ public interface IFileExporter {
 	public void finished() throws IOException;
 	
 	/**
+	 * Write the entry for the folder's name into the current archive.
+	 * 
+	 * @param container the container to write
+	 * @param destinationPath the path that will be used in the archive
+	 * @throws IOException if an IO error occurs while writing the folder entry
+	 */
+    public void write(IContainer container, String destinationPath)
+    	throws IOException;
+	
+	/**
 	 * Write the passed resource to the current archive
 	 * 
 	 * @param resource
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/MinimizedFileSystemElement.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/MinimizedFileSystemElement.java
index 35ece1e..cfeb762 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/MinimizedFileSystemElement.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/MinimizedFileSystemElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.wizards.datatransfer;
 
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
@@ -23,79 +22,76 @@ import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
  * if it has been populated or not.
  */
 public class MinimizedFileSystemElement extends FileSystemElement {
-    private boolean populated = false;
+	private boolean populated = false;
 
-    /**
-     * Create a <code>MinimizedFileSystemElement</code> with the supplied name and parent.
-     * @param name the name of the file element this represents
-     * @param parent the containing parent
-     * @param isDirectory indicated if this could have children or not
-     */
-    public MinimizedFileSystemElement(String name, FileSystemElement parent,
-            boolean isDirectory) {
-        super(name, parent, isDirectory);
-    }
+	/**
+	 * Create a <code>MinimizedFileSystemElement</code> with the supplied name and parent.
+	 * @param name the name of the file element this represents
+	 * @param parent the containing parent
+	 * @param isDirectory indicated if this could have children or not
+	 */
+	public MinimizedFileSystemElement(String name, FileSystemElement parent, boolean isDirectory) {
+		super(name, parent, isDirectory);
+	}
 
-    /**
-     * Returns a list of the files that are immediate children. Use the supplied provider
-     * if it needs to be populated.
-     * of this folder.
-     */
-    public AdaptableList getFiles(IImportStructureProvider provider) {
-        if (!populated) {
-            populate(provider);
-        }
-        return super.getFiles();
-    }
+	/**
+	 * Returns a list of the files that are immediate children. Use the supplied provider
+	 * if it needs to be populated.
+	 * of this folder.
+	 */
+	public AdaptableList getFiles(IImportStructureProvider provider) {
+		if (!populated) {
+			populate(provider);
+		}
+		return super.getFiles();
+	}
 
-    /**
-     * Returns a list of the folders that are immediate children. Use the supplied provider
-     * if it needs to be populated.
-     * of this folder.
-     */
-    public AdaptableList getFolders(IImportStructureProvider provider) {
-        if (!populated) {
-            populate(provider);
-        }
-        return super.getFolders();
-    }
+	/**
+	 * Returns a list of the folders that are immediate children. Use the supplied provider
+	 * if it needs to be populated.
+	 * of this folder.
+	 */
+	public AdaptableList getFolders(IImportStructureProvider provider) {
+		if (!populated) {
+			populate(provider);
+		}
+		return super.getFolders();
+	}
 
-    /**
-     * Return whether or not population has happened for the receiver.
-     */
-    boolean isPopulated() {
-        return this.populated;
-    }
+	/**
+	 * Return whether or not population has happened for the receiver.
+	 */
+	boolean isPopulated() {
+		return this.populated;
+	}
 
-    /**
-     * Populate the files and folders of the receiver using the suppliec structure provider.
-     * @param provider org.eclipse.ui.wizards.datatransfer.IImportStructureProvider
-     */
-    private void populate(IImportStructureProvider provider) {
+	/**
+	 * Populate the files and folders of the receiver using the supplied structure provider.
+	 * @param provider org.eclipse.ui.wizards.datatransfer.IImportStructureProvider
+	 */
+	private void populate(IImportStructureProvider provider) {
 
-        Object fileSystemObject = getFileSystemObject();
+		Object fileSystemObject = getFileSystemObject();
 
-        List children = provider.getChildren(fileSystemObject);
-        if (children == null) {
-            children = new ArrayList(1);
-        }
-        Iterator childrenEnum = children.iterator();
-        while (childrenEnum.hasNext()) {
-            Object child = childrenEnum.next();
+		List children = provider.getChildren(fileSystemObject);
+		if (children != null) {
+			Iterator childrenEnum = children.iterator();
+			while (childrenEnum.hasNext()) {
+				Object child = childrenEnum.next();
 
-            String elementLabel = provider.getLabel(child);
-            //Create one level below
-            MinimizedFileSystemElement result = new MinimizedFileSystemElement(
-                    elementLabel, this, provider.isFolder(child));
-            result.setFileSystemObject(child);
-        }
-        setPopulated();
-    }
+				String elementLabel = provider.getLabel(child);
+				//Create one level below
+				MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, this, provider.isFolder(child));
+				result.setFileSystemObject(child);
+			}
+		}
+		setPopulated();
+	}
 
-    /**
-     * Set whether or not population has happened for the receiver to true.
-     */
-   public void setPopulated() {
-        this.populated = true;
-    }
+	/**
+	 * Set whether or not population has happened for the receiver to true.
+	 */
+	public void setPopulated() {
+		this.populated = true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFileExporter.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFileExporter.java
index 055a0e8..2712942 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFileExporter.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarFileExporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.net.URI;
 import java.util.zip.GZIPOutputStream;
 
 import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourceAttributes;
@@ -95,6 +96,23 @@ public class TarFileExporter implements IFileExporter {
     	outputStream.closeEntry();    	
     }
 
+    public void write(IContainer container, String destinationPath)
+            throws IOException {
+        TarEntry newEntry = new TarEntry(destinationPath);
+        if(container.getLocalTimeStamp() != IResource.NULL_STAMP) {
+        	newEntry.setTime(container.getLocalTimeStamp() / 1000);
+        }
+        ResourceAttributes attributes = container.getResourceAttributes();
+        if (attributes != null && attributes.isExecutable()) {
+        	newEntry.setMode(newEntry.getMode() | 0111);
+        }
+        if (attributes != null && attributes.isReadOnly()) {
+        	newEntry.setMode(newEntry.getMode() & ~0222);
+        }
+        newEntry.setFileType(TarEntry.DIRECTORY);
+        outputStream.putNextEntry(newEntry);
+    }
+    
     /**
      *  Write the passed resource to the current archive.
      *
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceImportPage1.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceImportPage1.java
index c2a657e..5851db4 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceImportPage1.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardArchiveFileResourceImportPage1.java
@@ -19,16 +19,14 @@ import java.util.List;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Listener;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.AdaptableList;
@@ -149,6 +147,7 @@ public class WizardArchiveFileResourceImportPage1 extends
     private boolean ensureZipSourceIsValid() {
         ZipFile specifiedFile = getSpecifiedZipSourceFile();
         if (specifiedFile == null) {
+			setErrorMessage(DataTransferMessages.ZipImport_badFormat);
             return false;
         }
         return ArchiveFileManipulations.closeZipFile(specifiedFile, getShell());
@@ -157,6 +156,7 @@ public class WizardArchiveFileResourceImportPage1 extends
     private boolean ensureTarSourceIsValid() {
     	TarFile specifiedFile = getSpecifiedTarSourceFile();
     	if( specifiedFile == null ) {
+			setErrorMessage(DataTransferMessages.TarImport_badFormat);
     		return false;
     	}
     	return ArchiveFileManipulations.closeTarFile(specifiedFile, getShell());
@@ -300,9 +300,9 @@ public class WizardArchiveFileResourceImportPage1 extends
         try {
             return new ZipFile(fileName);
         } catch (ZipException e) {
-            displayErrorDialog(DataTransferMessages.ZipImport_badFormat);
+			// ignore
         } catch (IOException e) {
-            displayErrorDialog(DataTransferMessages.ZipImport_couldNotRead);
+			// ignore
         }
 
         sourceNameField.setFocus();
@@ -329,9 +329,9 @@ public class WizardArchiveFileResourceImportPage1 extends
         try {
             return new TarFile(fileName);
         } catch (TarException e) {
-        	displayErrorDialog(DataTransferMessages.TarImport_badFormat);
+			// ignore
         } catch (IOException e) {
-            displayErrorDialog(DataTransferMessages.ZipImport_couldNotRead);
+			// ignore
         }
 
         sourceNameField.setFocus();
@@ -489,7 +489,7 @@ public class WizardArchiveFileResourceImportPage1 extends
             enableButtonGroup(false);
             return false;
         }
-        
+
         List resourcesToExport = selectionGroup.getAllWhiteCheckedItems();
         if (resourcesToExport.size() == 0){
         	setErrorMessage(DataTransferMessages.FileImport_noneSelected);
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
index 8d91493..126cf8e 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.ui.internal.wizards.datatransfer;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -20,6 +21,8 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -41,6 +44,7 @@ import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -56,13 +60,16 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dialogs.FileSystemElement;
 import org.eclipse.ui.dialogs.WizardResourceImportPage;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
 import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
+import org.eclipse.ui.internal.ide.dialogs.RelativePathVariableGroup;
 import org.eclipse.ui.internal.ide.filesystem.FileSystemStructureProvider;
 import org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog;
 import org.eclipse.ui.model.WorkbenchContentProvider;
 import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
 import org.eclipse.ui.wizards.datatransfer.ImportOperation;
 
+
 /**
  *	Page 1 of the base resource import-from-file-system Wizard
  */
@@ -73,10 +80,18 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
 
     protected Button overwriteExistingResourcesCheckbox;
 
-    protected Button createContainerStructureButton;
+    protected Button createTopLevelFolderCheckbox;
+
+    protected Button createVirtualFoldersButton;
 
-    protected Button createOnlySelectedButton;
+    protected Button createLinksInWorkspaceButton;
+    
+	protected Button advancedButton;
 
+    protected RelativePathVariableGroup relativePathVariableGroup;
+    
+    protected String pathVariable;
+    
     protected Button sourceBrowseButton;
 
     protected Button selectTypesButton;
@@ -97,6 +112,14 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
 
     private final static String STORE_CREATE_CONTAINER_STRUCTURE_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID";//$NON-NLS-1$
 
+    private final static String STORE_CREATE_VIRTUAL_FOLDERS_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_VIRTUAL_FOLDERS_ID";//$NON-NLS-1$
+
+    private final static String STORE_CREATE_LINKS_IN_WORKSPACE_ID = "WizardFileSystemResourceImportPage1.STORE_CREATE_LINKS_IN_WORKSPACE_ID";//$NON-NLS-1$
+
+    private final static String STORE_PATH_VARIABLE_SELECTED_ID = "WizardFileSystemResourceImportPage1.STORE_PATH_VARIABLE_SELECTED_ID";//$NON-NLS-1$
+
+    private final static String STORE_PATH_VARIABLE_NAME_ID = "WizardFileSystemResourceImportPage1.STORE_PATH_VARIABLE_NAME_ID";//$NON-NLS-1$
+
     private static final String SELECT_TYPES_TITLE = DataTransferMessages.DataTransfer_selectTypes;
 
     private static final String SELECT_ALL_TITLE = DataTransferMessages.DataTransfer_selectAll;
@@ -109,6 +132,17 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
 
     protected static final String SOURCE_EMPTY_MESSAGE = DataTransferMessages.FileImport_sourceEmpty;
 
+	private Composite linkedResourceComposite;
+
+	/**
+	 * Height of the "advanced" linked resource group. Set when the advanced group is first made
+	 * visible.
+	 */
+	private int linkedResourceGroupHeight= -1;
+
+	private Composite linkedResourceParent;
+
+
     /**
      *	Creates an instance of this class
      */
@@ -138,14 +172,14 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
      * including button presses and registers
      * default buttons with its shell.
      * The button id is stored as the buttons client data.
-     * Note that the parent's layout is assumed to be a GridLayout and 
+     * Note that the parent's layout is assumed to be a GridLayout and
      * the number of columns in this layout is incremented.
      * Subclasses may override.
      * </p>
      *
      * @param parent the parent composite
      * @param id the id of the button (see
-     *  <code>IDialogConstants.*_ID</code> constants 
+     *  <code>IDialogConstants.*_ID</code> constants
      *  for standard dialog button ids)
      * @param label the label from the button
      * @param defaultButton <code>true</code> if the button is to be the
@@ -189,9 +223,7 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         layout.makeColumnsEqualWidth = true;
         buttonComposite.setLayout(layout);
         buttonComposite.setFont(parent.getFont());
-        GridData buttonData = new GridData(GridData.VERTICAL_ALIGN_FILL
-                | GridData.HORIZONTAL_ALIGN_FILL);
-        buttonData.horizontalSpan = 2;
+        GridData buttonData = new GridData(SWT.FILL, SWT.FILL, true, false);
         buttonComposite.setLayoutData(buttonData);
 
         // types edit button
@@ -252,20 +284,151 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         overwriteExistingResourcesCheckbox.setFont(optionsGroup.getFont());
         overwriteExistingResourcesCheckbox.setText(DataTransferMessages.FileImport_overwriteExisting);
 
-        // create containers radio
-        createContainerStructureButton = new Button(optionsGroup, SWT.RADIO);
-        createContainerStructureButton.setFont(optionsGroup.getFont());
-        createContainerStructureButton.setText(DataTransferMessages.FileImport_createComplete);
-        createContainerStructureButton.setSelection(false);
+        // create top-level folder check box
+        createTopLevelFolderCheckbox= new Button(optionsGroup, SWT.CHECK);
+        createTopLevelFolderCheckbox.setFont(optionsGroup.getFont());
+        createTopLevelFolderCheckbox.setText(DataTransferMessages.FileImport_createComplete);
+        createTopLevelFolderCheckbox.setSelection(false);
+        createTopLevelFolderCheckbox.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		updateWidgetEnablements();
+        	}
+        });
 
-        // create selection only radio
-        createOnlySelectedButton = new Button(optionsGroup, SWT.RADIO);
-        createOnlySelectedButton.setFont(optionsGroup.getFont());
-        createOnlySelectedButton.setText(DataTransferMessages.FileImport_createSelectedFolders);
-        createOnlySelectedButton.setSelection(true);
+        linkedResourceParent= optionsGroup;
+        if (!ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) {
+			advancedButton= new Button(optionsGroup, SWT.PUSH);
+			advancedButton.setFont(optionsGroup.getFont());
+			advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
+			GridData data= setButtonLayoutData(advancedButton);
+			data.horizontalAlignment= GridData.BEGINNING;
+			advancedButton.setLayoutData(data);
+			advancedButton.addSelectionListener(new SelectionAdapter() {
+				public void widgetSelected(SelectionEvent e) {
+					handleAdvancedButtonSelect();
+				}
+			});
+        }
+		updateWidgetEnablements();
+	}
+
+	private Composite createAdvancedSection(Composite parent) {
+		Composite linkedResourceComposite= new Composite(parent, SWT.NONE);
+		linkedResourceComposite.setFont(parent.getFont());
+		linkedResourceComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		GridLayout layout= new GridLayout();
+		layout.marginHeight= 0;
+		layout.marginWidth= 0;
+		linkedResourceComposite.setLayout(layout);
+
+
+        // create linked resource check
+		createLinksInWorkspaceButton= new Button(linkedResourceComposite, SWT.CHECK);
+		createLinksInWorkspaceButton.setFont(parent.getFont());
+        createLinksInWorkspaceButton.setText(DataTransferMessages.FileImport_createLinksInWorkspace);
+        createLinksInWorkspaceButton.setSelection(false);
+        
+        createLinksInWorkspaceButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		updateWidgetEnablements();
+        	}
+        });
+
+		Button tmp= new Button(linkedResourceComposite, SWT.CHECK);
+        int indent = tmp.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+        tmp.dispose();
+        
+        // create virtual folders check
+		createVirtualFoldersButton= new Button(linkedResourceComposite, SWT.CHECK);
+		createVirtualFoldersButton.setFont(parent.getFont());
+        createVirtualFoldersButton.setText(DataTransferMessages.FileImport_createVirtualFolders);
+        createVirtualFoldersButton.setToolTipText(DataTransferMessages.FileImport_createVirtualFoldersTooltip);
+        createVirtualFoldersButton.setSelection(false);
+
+        createVirtualFoldersButton.addSelectionListener(new SelectionAdapter() {
+        	public void widgetSelected(SelectionEvent e) {
+        		updateWidgetEnablements();
+        	}
+        });
+		GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true);
+		gridData.horizontalSpan = 2;
+		gridData.horizontalIndent = indent;
+		createVirtualFoldersButton.setLayoutData(gridData);
+
+		Composite relativeGroup= new Composite(linkedResourceComposite, 0);
+		gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		gridData.horizontalIndent = indent;
+		relativeGroup.setFont(parent.getFont());
+		relativeGroup.setLayoutData(gridData);
+
+		layout= new GridLayout();
+		layout.numColumns = 2;
+		layout.marginWidth= 0;
+		layout.marginHeight= 0;
+		layout.marginLeft= 0;
+		layout.marginRight= 0;
+		layout.marginTop= 0;
+		layout.marginBottom= 0;
+		layout.verticalSpacing = 0;
+		layout.horizontalSpacing = 0;
+		relativeGroup.setLayout(layout);
+
+        relativePathVariableGroup = new RelativePathVariableGroup(new RelativePathVariableGroup.IModel() {
+			public IResource getResource() {
+				IPath path = getContainerFullPath();
+				if (path != null)
+					return ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+				return null;
+			}
+			public void setVariable(String string) {
+				pathVariable = string;
+			}
+			public String getVariable() {
+				return pathVariable;
+			}
+        }, DataTransferMessages.FileImport_importElementsAs
+        );
+        relativePathVariableGroup.createContents(relativeGroup);
+        
+        
+        updateWidgetEnablements();
+		relativePathVariableGroup.setSelection(true);
+
+		return linkedResourceComposite;
 
     }
 
+	/**
+	 * Shows/hides the advanced option widgets.
+	 * 
+	 * @since 3.6
+	 */
+	private void handleAdvancedButtonSelect() {
+		Shell shell= getShell();
+		Point shellSize= shell.getSize();
+		Composite composite= (Composite)getControl();
+
+		if (linkedResourceComposite != null) {
+			linkedResourceComposite.dispose();
+			linkedResourceComposite= null;
+			createLinksInWorkspaceButton = null;
+			createVirtualFoldersButton = null;
+			relativePathVariableGroup = null;
+			composite.layout();
+			shell.setSize(shellSize.x, shellSize.y - linkedResourceGroupHeight);
+			advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
+		} else {
+			linkedResourceComposite= createAdvancedSection(linkedResourceParent);
+			if (linkedResourceGroupHeight == -1) {
+				Point groupSize= linkedResourceComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+				linkedResourceGroupHeight= groupSize.y;
+			}
+			shell.setSize(shellSize.x, shellSize.y + linkedResourceGroupHeight);
+			composite.layout();
+			advancedButton.setText(IDEWorkbenchMessages.hideAdvanced);
+		}
+	}
+
     /**
      *	Create the group for creating the root directory
      */
@@ -303,6 +466,10 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
             public void keyPressed(KeyEvent e) {
                 //If there has been a key pressed then mark as dirty
                 entryChanged = true;
+				if (e.character == SWT.CR) {
+					entryChanged = false;
+					updateFromSourceField();
+				}
             }
 
             /*
@@ -352,6 +519,7 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         setSourceName(sourceNameField.getText());
         //Update enablements when this is selected
         updateWidgetEnablements();
+        fileSystemStructureProvider.clearVisitedDirs();
     }
 
     /**
@@ -471,7 +639,7 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
     }
 
     /**
-     * Returns a content provider for <code>FileSystemElement</code>s that returns 
+     * Returns a content provider for <code>FileSystemElement</code>s that returns
      * only files as children.
      */
     protected ITreeContentProvider getFileProvider() {
@@ -505,7 +673,7 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
     }
 
     /**
-     * Returns a content provider for <code>FileSystemElement</code>s that returns 
+     * Returns a content provider for <code>FileSystemElement</code>s that returns
      * only folders as children.
      */
     protected ITreeContentProvider getFolderProvider() {
@@ -645,22 +813,60 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
      *  Import the resources with extensions as specified by the user
      */
     protected boolean importResources(List fileSystemObjects) {
-        ImportOperation operation = new ImportOperation(getContainerFullPath(),
-                getSourceDirectory(), fileSystemStructureProvider,
+        ImportOperation operation;
+        
+        boolean shouldImportTopLevelFoldersRecursively = selectionGroup.isEveryItemChecked() &&
+        											!createTopLevelFolderCheckbox.getSelection() &&
+        											(createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) &&
+        											(createVirtualFoldersButton != null && createVirtualFoldersButton.getSelection() == false);
+		
+		File sourceDirectory = getSourceDirectory();
+		if (createTopLevelFolderCheckbox.getSelection() && sourceDirectory.getParentFile() != null)
+        	sourceDirectory = sourceDirectory.getParentFile();
+        
+        if (shouldImportTopLevelFoldersRecursively)
+            operation = new ImportOperation(getContainerFullPath(),
+                    sourceDirectory, fileSystemStructureProvider,
+                    this, Arrays.asList(new File[] {getSourceDirectory()}));
+        else
+        	operation = new ImportOperation(getContainerFullPath(),
+                sourceDirectory, fileSystemStructureProvider,
                 this, fileSystemObjects);
 
         operation.setContext(getShell());
         return executeImportOperation(operation);
     }
 
-    /**
+    protected void handleContainerBrowseButtonPressed() {
+    	super.handleContainerBrowseButtonPressed();
+    	IPath path = getContainerFullPath();
+    	if (path != null && relativePathVariableGroup != null) {
+			IResource target = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+			File file = getSourceDirectory();
+			if (file != null && target != null) {
+				relativePathVariableGroup.setupVariableContent();
+				String preferedVariable = RelativePathVariableGroup.getPreferredVariable(new IPath[] {Path.fromOSString(file.getAbsolutePath())}, (IContainer) target);
+				if (preferedVariable != null)
+					relativePathVariableGroup.selectVariable(preferedVariable);
+			}
+    	}
+    	updateWidgetEnablements();
+    }
+
+   	/**
      * Initializes the specified operation appropriately.
      */
     protected void initializeOperation(ImportOperation op) {
-        op.setCreateContainerStructure(createContainerStructureButton
-                .getSelection());
+        op.setCreateContainerStructure(false);
         op.setOverwriteResources(overwriteExistingResourcesCheckbox
                 .getSelection());
+        if (createLinksInWorkspaceButton != null && createLinksInWorkspaceButton.getSelection()) {
+        	op.setCreateLinks(true);
+	        op.setVirtualFolders(createVirtualFoldersButton
+	                .getSelection());
+	        if (relativePathVariableGroup.getSelection())
+	        	op.setRelativeVariable(pathVariable);
+        }
     }
 
     /**
@@ -668,7 +874,7 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
      * has been specified for export by the user.
      *
      * @param extension the resource name
-     * @return <code>true</code> if the resource name is suitable for export based 
+     * @return <code>true</code> if the resource name is suitable for export based
      *   upon its extension
      */
     protected boolean isExportableExtension(String extension) {
@@ -694,6 +900,19 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         MinimizedFileSystemElement currentRoot = getFileSystemTree();
         this.selectionGroup.setRoot(currentRoot);
 
+        File sourceDirectory = getSourceDirectory();
+        if (sourceDirectory != null) {
+			IPath path = getContainerFullPath();
+	    	if (path != null && relativePathVariableGroup != null) {
+				IResource target = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+				if (target != null) {
+			        String variable = RelativePathVariableGroup.getPreferredVariable(new IPath[] {Path.fromOSString(sourceDirectory.getAbsolutePath())}, (IContainer) target);
+			        if (variable != null)
+			        	relativePathVariableGroup.selectVariable(variable);
+				}
+	    	}
+        }
+
     }
 
     /**
@@ -713,15 +932,32 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
 				sourceNameField.add(sourceNames[i]);
 			}
 
-            // radio buttons and checkboxes	
+            // radio buttons and checkboxes
             overwriteExistingResourcesCheckbox.setSelection(settings
                     .getBoolean(STORE_OVERWRITE_EXISTING_RESOURCES_ID));
 
             boolean createStructure = settings
                     .getBoolean(STORE_CREATE_CONTAINER_STRUCTURE_ID);
-            createContainerStructureButton.setSelection(createStructure);
-            createOnlySelectedButton.setSelection(!createStructure);
-
+            createTopLevelFolderCheckbox.setSelection(createStructure);
+
+            if (createVirtualFoldersButton != null) {
+	            boolean createVirtualFolders = settings
+	            		.getBoolean(STORE_CREATE_VIRTUAL_FOLDERS_ID);
+	            createVirtualFoldersButton.setSelection(createVirtualFolders);
+	
+	            boolean createLinkedResources = settings
+	    				.getBoolean(STORE_CREATE_LINKS_IN_WORKSPACE_ID);
+	            createLinksInWorkspaceButton.setSelection(createLinkedResources);
+	
+	            boolean pathVariableSelected = settings
+						.getBoolean(STORE_PATH_VARIABLE_SELECTED_ID);
+	            relativePathVariableGroup.setSelection(pathVariableSelected);
+	
+	            pathVariable = settings.get(STORE_PATH_VARIABLE_NAME_ID);
+	            if (pathVariable != null)
+	            	relativePathVariableGroup.selectVariable(pathVariable);
+            }
+        	updateWidgetEnablements();
         }
     }
 
@@ -741,13 +977,26 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
             sourceNames = addToHistory(sourceNames, getSourceDirectoryName());
             settings.put(STORE_SOURCE_NAMES_ID, sourceNames);
 
-            // radio buttons and checkboxes	
+            // radio buttons and checkboxes
             settings.put(STORE_OVERWRITE_EXISTING_RESOURCES_ID,
                     overwriteExistingResourcesCheckbox.getSelection());
 
             settings.put(STORE_CREATE_CONTAINER_STRUCTURE_ID,
-                    createContainerStructureButton.getSelection());
-
+                    createTopLevelFolderCheckbox.getSelection());
+
+            if (createVirtualFoldersButton != null) {
+	            settings.put(STORE_CREATE_VIRTUAL_FOLDERS_ID,
+	            		createVirtualFoldersButton.getSelection());
+	
+	            settings.put(STORE_CREATE_LINKS_IN_WORKSPACE_ID,
+	            		createLinksInWorkspaceButton.getSelection());
+	
+	            settings.put(STORE_PATH_VARIABLE_SELECTED_ID,
+	            		relativePathVariableGroup.getSelection());
+	
+	            settings.put(STORE_PATH_VARIABLE_NAME_ID,
+	            		pathVariable);
+            }
         }
     }
 
@@ -885,13 +1134,13 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
             //Got interrupted. Do nothing.
             return;
         }
-        // make sure that all paint operations caused by closing the progress 
-        // dialog get flushed, otherwise extra pixels will remain on the screen until 
+        // make sure that all paint operations caused by closing the progress
+        // dialog get flushed, otherwise extra pixels will remain on the screen until
         // updateSelections is completed
         getShell().update();
         // The updateSelections method accesses SWT widgets so cannot be executed
         // as part of the above progress dialog operation since the operation forks
-        // a new process.	
+        // a new process.
         if (selectionMap != null) {
             updateSelections(selectionMap);
         }
@@ -924,6 +1173,22 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
     protected void updateWidgetEnablements() {
         super.updateWidgetEnablements();
         enableButtonGroup(ensureSourceIsValid());
+
+    	if (createLinksInWorkspaceButton != null) {
+			IPath path = getContainerFullPath();
+	    	if (path != null && relativePathVariableGroup != null) {
+				IResource target = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+				if (target != null && target.isVirtual())
+					createVirtualFoldersButton.setSelection(true);
+	    	}
+			relativePathVariableGroup.setEnabled(createLinksInWorkspaceButton.getSelection());
+			createVirtualFoldersButton.setEnabled(createLinksInWorkspaceButton.getSelection());
+	
+			if (!selectionGroup.isEveryItemChecked() ||
+				(createTopLevelFolderCheckbox.getSelection())) {
+	        	createVirtualFoldersButton.setSelection(true);
+			}
+    	}
     }
 
     /**
@@ -951,6 +1216,20 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         	setErrorMessage(DataTransferMessages.FileImport_noneSelected);
         	return false;
         }
+        IContainer container = getSpecifiedContainer();
+        if (container != null && container.isVirtual()) {
+        	if (ResourcesPlugin.getPlugin().getPluginPreferences().getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING)) {
+	        	setMessage(null);
+	        	setErrorMessage(DataTransferMessages.FileImport_cannotImportFilesUnderAVirtualFolder);
+				return false;
+        	}
+        	if (createLinksInWorkspaceButton == null || createLinksInWorkspaceButton.getSelection() == false) {
+	        	setMessage(null);
+	        	setErrorMessage(DataTransferMessages.FileImport_haveToCreateLinksUnderAVirtualFolder);
+				return false;
+        		
+        	}
+		}
         
 		enableButtonGroup(true);
 		setErrorMessage(null);
@@ -976,8 +1255,8 @@ public class WizardFileSystemResourceImportPage1 extends WizardResourceImportPag
         if (destinationLocation != null) {
             return destinationLocation.isPrefixOf(sourcePath);
         }
-        // null destination location is handled in 
-        // WizardResourceImportPage 
+        // null destination location is handled in
+        // WizardResourceImportPage
         return false;
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipFileExporter.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipFileExporter.java
index 49a5eeb..6ce950b 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipFileExporter.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/ZipFileExporter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import java.util.zip.CRC32;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
@@ -105,6 +106,12 @@ public class ZipFileExporter implements IFileExporter {
         outputStream.closeEntry();
     }
 
+    public void write(IContainer container, String destinationPath)
+            throws IOException {
+        ZipEntry newEntry = new ZipEntry(destinationPath);
+        outputStream.putNextEntry(newEntry);
+    }
+
     /**
      *  Write the passed resource to the current archive.
      *
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
index c189ea6..e69980c 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -51,7 +51,14 @@ FileImport_importFileSystem = Import resources from the local file system.
 FileImport_overwriteExisting = &Overwrite existing resources without warning
 FileImport_createComplete = &Create complete folder structure
 FileImport_createSelectedFolders = Create s&elected folders only
+FileImport_createVirtualFolders = Create &virtual folders
+FileImport_importElementsAs=Create l&ink locations relative to:
+FileImport_createVirtualFoldersTooltip = This option needs to be set when a partial hierarchy is selected.
+FileImport_createLinksInWorkspace= Create lin&ks in workspace
+FileImport_advanced=Advance&d
 FileImport_noneSelected = There are no resources currently selected for import.
+FileImport_cannotImportFilesUnderAVirtualFolder=Cannot import files into a virtual folder when linked resources support is disabled on the 'Linked Resources' preference page.
+FileImport_haveToCreateLinksUnderAVirtualFolder=The 'Create links in workspace' option in the 'Advanced' section has to be set when the destination is a virtual folder.
 FileImport_invalidSource = Source directory is not valid or has not been specified.
 FileImport_sourceEmpty = Source must not be empty.
 FileImport_importProblems = Import Problems
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/ResourceMessages.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/ResourceMessages.java
index 2c2cabe..b6adf65 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/ResourceMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/ResourceMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/messages.properties b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/messages.properties
index ca5ae8c..6627068 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/newresource/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/FilterConfigurationArea.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/FilterConfigurationArea.java
index 137f0c0..01a22d5 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/FilterConfigurationArea.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/FilterConfigurationArea.java
@@ -65,7 +65,7 @@ public abstract class FilterConfigurationArea {
 	 * @return String
 	 */
 	public String getTitle() {
-		return field.getColumnHeaderText();
+		return field.getName();
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
index e2d1469..b504ebf 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java
@@ -81,7 +81,7 @@ public abstract class MarkerField {
 			
 					}else{
 						descriptors[IDecoration.BOTTOM_RIGHT] =
-							getIDEImageDescriptor(MarkerSupportInternalUtilities.IMG_MARKERS_QUICK_FIX_DECORATION_PATH);;
+							getIDEImageDescriptor(MarkerSupportInternalUtilities.IMG_MARKERS_QUICK_FIX_DECORATION_PATH);
 					}
 				}
 
@@ -153,6 +153,16 @@ public abstract class MarkerField {
 	 * @see #getColumnTooltipText() this is the default column tooltip text
 	 */
 	public String getColumnHeaderText() {
+		return getName();
+	}
+	
+	/**
+	 * Return the name of this field.
+	 * 
+	 * @return String
+	 * @since 3.6
+	 */
+	public String getName() {
 		return configurationElement
 				.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_NAME);
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ContentGeneratorDescriptor.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ContentGeneratorDescriptor.java
new file mode 100644
index 0000000..48cf9cb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/ContentGeneratorDescriptor.java
@@ -0,0 +1,325 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.views.markers.internal;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.ui.internal.views.markers.MarkerSupportInternalUtilities;
+import org.eclipse.ui.views.markers.MarkerField;
+
+/**
+ * ContentGeneratorDescriptor is the direct representation of the markerContentGenerator
+ * extension point.
+ * 
+ * @since 3.6
+ * 
+ */
+public class ContentGeneratorDescriptor {
+
+	private static final String ATTRIBUTE_DEFAULT_MARKER_GROUPING = "defaultMarkerGrouping"; //$NON-NLS-1$
+	private static final String ATTRIBUTE_VISIBLE = "visible"; //$NON-NLS-1$
+	private static final String ELEMENT_MARKER_FIELD_CONFIGURATION = "markerFieldConfiguration"; //$NON-NLS-1$;
+	private static final String MARKER_FIELD_REFERENCE = "markerFieldReference"; //$NON-NLS-1$
+
+	private IConfigurationElement configurationElement;
+	private MarkerField[] allFields;
+	private Collection markerTypes;
+	private MarkerField[] initialVisible;
+	private Collection groups;
+	private Collection generatorExtensions = new ArrayList();
+	private Map allTypesTable;
+
+	/**
+	 * Create a new ContentGeneratorDescriptor
+	 * 
+	 * @param element
+	 */
+	public ContentGeneratorDescriptor(IConfigurationElement element) {
+		configurationElement = element;
+	}
+
+	/**
+	 * Add the groups defined in the receiver to the collection of groups.
+	 * 
+	 * @param groups
+	 */
+	private void addDefinedGroups(Collection groups) {
+		// Add the ones in the receiver.
+		addGroupsFrom(configurationElement, groups);
+		// Add the extensions
+		Iterator extensions = generatorExtensions.iterator();
+		while (extensions.hasNext()) {
+			addGroupsFrom((IConfigurationElement) extensions.next(), groups);
+		}
+	}
+
+	/**
+	 * Add the extensions to the receiver.
+	 * 
+	 * @param extensions
+	 *            Collection of {@link IConfigurationElement}
+	 */
+	public void addExtensions(Collection extensions) {
+		generatorExtensions = extensions;
+
+	}
+
+	/**
+	 * Add all of the markerGroups defined in element.
+	 * 
+	 * @param groups
+	 */
+	private void addGroupsFrom(IConfigurationElement element, Collection groups) {
+		IConfigurationElement[] groupings = element
+				.getChildren(MarkerSupportRegistry.MARKER_GROUPING);
+
+		for (int i = 0; i < groupings.length; i++) {
+
+			groups.add(MarkerGroup.createMarkerGroup(groupings[i]));
+		}
+	}
+
+	/**
+	 * Return whether or not all of {@link MarkerTypesModel} arein the
+	 * selectedTypes.
+	 * 
+	 * @param selectedTypes
+	 * @return boolean
+	 */
+	public boolean allTypesSelected(Collection selectedTypes) {
+		return selectedTypes.containsAll(markerTypes);
+	}
+
+	/**
+	 * Get the all of the fields that this content generator is using.
+	 * 
+	 * @return {@link MarkerField}[]
+	 */
+	public MarkerField[] getAllFields() {
+		return allFields;
+	}
+
+	/**
+	 * Get the category name from the receiver.
+	 * 
+	 * @return categoryName
+	 */
+	public String getCategoryName() {
+		return configurationElement
+				.getAttribute(ATTRIBUTE_DEFAULT_MARKER_GROUPING);
+
+	}
+
+	/**
+	 * Return the configuration elements for the receiver.
+	 * 
+	 * @return IConfigurationElement[]
+	 */
+	public IConfigurationElement[] getFilterReferences() {
+		IConfigurationElement[] filterGroups = configurationElement
+				.getChildren(ELEMENT_MARKER_FIELD_CONFIGURATION);
+		if (generatorExtensions.isEmpty())
+			return filterGroups;
+		Iterator extensions = generatorExtensions.iterator();
+		Collection extendedElements = new ArrayList();
+		while (extensions.hasNext()) {
+			IConfigurationElement extension = (IConfigurationElement) extensions
+					.next();
+			IConfigurationElement[] extensionFilters = extension
+					.getChildren(ELEMENT_MARKER_FIELD_CONFIGURATION);
+			for (int i = 0; i < extensionFilters.length; i++) {
+				extendedElements.add(extensionFilters[i]);
+			}
+		}
+		if (extendedElements.size() > 0) {
+			IConfigurationElement[] allGroups = new IConfigurationElement[filterGroups.length
+					+ extendedElements.size()];
+			System
+					.arraycopy(filterGroups, 0, allGroups, 0,
+							filterGroups.length);
+			Iterator extras = extendedElements.iterator();
+			int index = filterGroups.length;
+			while (extras.hasNext()) {
+				allGroups[index] = (IConfigurationElement) extras.next();
+			}
+			return allGroups;
+		}
+		return filterGroups;
+	}
+
+	/**
+	 * Return the id of the receiver.
+	 * 
+	 * @return String
+	 */
+	public String getId() {
+		return configurationElement
+				.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID);
+	}
+
+	/**
+	 * Get the list of initially visible fields
+	 * 
+	 * @return {@link MarkerField}[]
+	 */
+	public MarkerField[] getInitialVisible() {
+		return initialVisible;
+	}
+
+	/**
+	 * Get the markerGroups associated with the receiver.
+	 * 
+	 * @return Collection of {@link MarkerGroup}
+	 */
+	public Collection getMarkerGroups() {
+
+		if (groups == null) {
+			groups = new HashSet();
+
+			// Add the groups defined in the receiver
+			addDefinedGroups(groups);
+
+			if (getId().equals(MarkerSupportRegistry.PROBLEMS_GENERATOR)) {
+				// Add the groups that reference the receiver.
+				groups.addAll(MarkerSupportRegistry.getInstance()
+						.getMarkerGroups());
+
+			}
+		}
+		return groups;
+	}
+
+	/**
+	 * Return the markerTypes for the receiver.
+	 * 
+	 * @return Collection of {@link MarkerType}
+	 */
+	public Collection getMarkerTypes() {
+		if (markerTypes == null) {
+			markerTypes = new HashSet();
+			IConfigurationElement[] markerTypeElements = configurationElement
+					.getChildren(MarkerSupportRegistry.MARKER_TYPE_REFERENCE);
+			for (int i = 0; i < markerTypeElements.length; i++) {
+				IConfigurationElement configurationElement = markerTypeElements[i];
+				String elementName = configurationElement
+						.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID);
+				MarkerType[] types = MarkerTypesModel.getInstance().getType(
+						elementName).getAllSubTypes();
+				for (int j = 0; j < types.length; j++) {
+					markerTypes.add(types[j]);
+				}
+				markerTypes.add(MarkerTypesModel.getInstance().getType(
+						elementName));
+			}
+			if (markerTypes.isEmpty()) {
+				MarkerType[] types = MarkerTypesModel.getInstance().getType(
+						IMarker.PROBLEM).getAllSubTypes();
+				for (int i = 0; i < types.length; i++) {
+					markerTypes.add(types[i]);
+				}
+			}
+		}
+		return markerTypes;
+	}
+
+	/**
+	 * Return the name for the receiver.
+	 * 
+	 * @return String
+	 */
+	public String getName() {
+		return configurationElement
+				.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_NAME);
+	}
+
+	/**
+	 * Return the type for typeId.
+	 * 
+	 * @param typeId
+	 * @return {@link MarkerType} or <code>null</code> if it is not found.
+	 */
+	public MarkerType getType(String typeId) {
+		Map all = getTypesTable();
+		if (all.containsKey(typeId))
+			return (MarkerType) all.get(typeId);
+		return null;
+	}
+
+	/**
+	 * Get the table that maps type ids to markerTypes.
+	 * 
+	 * @return Map of {@link String} to {@link MarkerType}
+	 */
+	public Map getTypesTable() {
+		if (allTypesTable == null) {
+			allTypesTable = new HashMap();
+
+			Iterator allIterator = markerTypes.iterator();
+			while (allIterator.hasNext()) {
+				MarkerType next = (MarkerType) allIterator.next();
+				allTypesTable.put(next.getId(), next);
+			}
+		}
+		return allTypesTable;
+	}
+
+	/**
+	 * Initialise the receiver from the configuration element. This is done as a
+	 * post processing step.
+	 * 
+	 * @param registry
+	 *            the MarkerSupportRegistry being used to initialise the
+	 *            receiver.
+	 */
+	public void initializeFromConfigurationElement(
+			MarkerSupportRegistry registry) {
+
+		IConfigurationElement[] elements = configurationElement
+				.getChildren(MARKER_FIELD_REFERENCE);
+		Collection allFieldList = new ArrayList();
+		Collection initialVisibleList = new ArrayList();
+		for (int i = 0; i < elements.length; i++) {
+			MarkerField field = registry.getField(elements[i]
+					.getAttribute(MarkerSupportInternalUtilities.ATTRIBUTE_ID));
+			if (field == null)
+				continue;
+			allFieldList.add(field);
+			if (!MarkerSupportInternalUtilities.VALUE_FALSE.equals(elements[i]
+					.getAttribute(ATTRIBUTE_VISIBLE)))
+				initialVisibleList.add(field);
+		}
+
+		allFields = new MarkerField[allFieldList.size()];
+		allFieldList.toArray(allFields);
+
+		initialVisible = new MarkerField[initialVisibleList.size()];
+		initialVisibleList.toArray(initialVisible);
+
+	}
+
+	/**
+	 * Remove the element from the generator extensions
+	 * 
+	 * @param element
+	 */
+	public void removeExtension(IConfigurationElement element) {
+		generatorExtensions.remove(element);
+
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerGroup.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerGroup.java
index a51ecd0..97b4020 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerGroup.java
@@ -324,9 +324,9 @@ public class MarkerGroup {
 		/*
 		 * (non-Javadoc)
 		 * 
-		 * @see org.eclipse.ui.internal.provisional.views.markers.api.MarkerField#getColumnHeaderText()
+		 * @see org.eclipse.ui.internal.provisional.views.markers.api.MarkerField#getName()
 		 */
-		public String getColumnHeaderText() {
+		public String getName() {
 			return MarkerGroup.this.getTitle();
 		}
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
index 61160c6..cf32d8a 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerMessages.java
@@ -199,6 +199,7 @@ public class MarkerMessages extends NLS {
 	public static String MarkerFilter_addFilterName;
 	public static String MarkerFilter_cloneFilterName;
 	public static String MarkerFilter_deleteSelectedName;
+	public static String MarkerFilter_renameName;
 	public static String MarkerFilter_showAllCommand_title;
 	public static String MarkerFilter_ConfigureContentsCommand_title;
 
@@ -217,6 +218,7 @@ public class MarkerMessages extends NLS {
 	public static String MarkerPreferences_ColumnGroupTitle;
 	public static String MarkerPreferences_VisibleColumnsTitle;
 	public static String MarkerPreferences_HiddenColumnsTitle;
+	public static String MarkerPreferences_AtLeastOneVisibleColumn;
 
 	public static String ProblemFilterDialog_System_Filters_Title;
 	public static String ProblemFilterDialog_All_Problems;
@@ -240,6 +242,7 @@ public class MarkerMessages extends NLS {
 	public static String Category_Label;
 	public static String Category_Limit_Label;
 	public static String Category_One_Item_Label;
+	public static String Category_building;
 
 	public static String MarkerResolutionDialog_Fixing;
 	public static String MarkerResolutionDialog_Description;
@@ -282,6 +285,7 @@ public class MarkerMessages extends NLS {
 
 	public static String PasteHandler_title;
 
+	public static String AND_OR_Label;
 	public static String AND_Title;
 	public static String OR_Title;
 
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
index 93e9310..dea9094 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerSupportRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -34,7 +34,6 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
 import org.eclipse.ui.internal.ide.Policy;
-import org.eclipse.ui.internal.views.markers.MarkerContentGenerator;
 import org.eclipse.ui.internal.views.markers.MarkerSupportInternalUtilities;
 import org.eclipse.ui.views.markers.MarkerField;
 
@@ -339,12 +338,12 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 
 			if (element.getName().equals(MARKER_CONTENT_GENERATOR)) {
 
-				MarkerContentGenerator generator = new MarkerContentGenerator(
+				ContentGeneratorDescriptor generatorDesc = new ContentGeneratorDescriptor(
 						element);
 
-				generators.put(generator.getId(), generator);
+				generators.put(generatorDesc.getId(), generatorDesc);
 
-				tracker.registerObject(extension, generator,
+				tracker.registerObject(extension, generatorDesc,
 						IExtensionTracker.REF_STRONG);
 				continue;
 			}
@@ -392,7 +391,7 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 	 * @param attributeMappings
 	 *            the markerAttributeGroupings found
 	 * @param generatorExtensions
-	 *            map of generator id to generator
+	 *            map of generator id to generator descriptors
 	 */
 	private void postProcessExtensions(Map groupIDsToEntries,
 			Map entryIDsToEntries, Collection attributeMappings,
@@ -411,12 +410,12 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 	private void postProcessContentGenerators(Map generatorExtensions) {
 		Iterator generatorIterator = generators.values().iterator();
 		while (generatorIterator.hasNext()) {
-			MarkerContentGenerator generator = (MarkerContentGenerator) generatorIterator
+			ContentGeneratorDescriptor generatorDesc = (ContentGeneratorDescriptor) generatorIterator
 					.next();
-			generator.initializeFromConfigurationElement(this);
-			if (generatorExtensions.containsKey(generator.getId()))
-				generator.addExtensions((Collection) generatorExtensions
-						.get(generator.getId()));
+			generatorDesc.initializeFromConfigurationElement(this);
+			if (generatorExtensions.containsKey(generatorDesc.getId()))
+				generatorDesc.addExtensions((Collection) generatorExtensions
+						.get(generatorDesc.getId()));
 		}
 
 	}
@@ -722,17 +721,17 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 				continue;
 			}
 
-			if (objects[i] instanceof MarkerContentGenerator) {
+			if (objects[i] instanceof ContentGeneratorDescriptor) {
 				generators
-						.remove(((MarkerContentGenerator) objects[i]).getId());
+						.remove(((ContentGeneratorDescriptor) objects[i]).getId());
 				continue;
 			}
 
 			if (objects[i] instanceof IConfigurationElement) {
 				IConfigurationElement element = (IConfigurationElement) objects[i];
-				MarkerContentGenerator generator = (MarkerContentGenerator) generators
+				ContentGeneratorDescriptor generatorDesc = (ContentGeneratorDescriptor) generators
 						.get(element.getAttribute(ATTRIBUTE_GENERATOR_ID));
-				generator.removeExtension(element);
+				generatorDesc.removeExtension(element);
 				continue;
 			}
 
@@ -886,24 +885,24 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 	}
 
 	/**
-	 * Get the generator for id
+	 * Get the generator descriptor for id
 	 * 
 	 * @param id
-	 * @return MarkerContentGenerator or <code>null</code>.
+	 * @return ContentGeneratorDescriptor or <code>null</code>.
 	 */
-	public MarkerContentGenerator getGenerator(String id) {
+	public ContentGeneratorDescriptor getContentGenDescriptor (String id) {
 		if (id != null && generators.containsKey(id))
-			return (MarkerContentGenerator) generators.get(id);
+			return (ContentGeneratorDescriptor) generators.get(id);
 		return null;
 	}
 
 	/**
-	 * Return the default content generator.
+	 * Return the default content generator descriptor.
 	 * 
-	 * @return MarkerContentGenerator
+	 * @return ContentGeneratorDescriptor
 	 */
-	public MarkerContentGenerator getDefaultGenerator() {
-		return (MarkerContentGenerator) generators.get(PROBLEMS_GENERATOR);
+	public ContentGeneratorDescriptor getDefaultContentGenDescriptor () {
+		return (ContentGeneratorDescriptor) generators.get(PROBLEMS_GENERATOR);
 	}
 
 	/**
@@ -930,16 +929,4 @@ public class MarkerSupportRegistry implements IExtensionChangeHandler {
 		return null;
 	}
 
-	/**
-	 * Return an array of MarkerContentGenerator for the receiver.
-	 * 
-	 * @return MarkerContentGenerator[]
-	 */
-	public MarkerContentGenerator[] getGenerators() {
-		MarkerContentGenerator[] generatorArray = new MarkerContentGenerator[generators
-				.size()];
-		generators.values().toArray(generatorArray);
-		return generatorArray;
-	}
-
 }
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
index cc38dd6..9cd27fa 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -104,7 +104,7 @@ configureFiltersCommand_title = &Configure Contents...
 configureFiltersDialog_title = Configure Contents
 
 propertiesDialog_creationTime_text = Creation &time: 
-propertiesDialog_description_text = &Description 
+propertiesDialog_description_text = &Description: 
 propertiesDialog_folder_text = In &folder: 
 propertiesDialog_location_text = &Location: 
 propertiesDialog_resource_text = On &element: 
@@ -180,14 +180,16 @@ MarkerFilter_filtersTitle=User f&ilters:
 MarkerFilter_addFilterName=&New...
 MarkerFilter_cloneFilterName=D&uplicate...
 MarkerFilter_deleteSelectedName = Remo&ve
+MarkerFilter_renameName = &Rename
 MarkerFilter_showAllCommand_title = &Show All
 MarkerFilter_ConfigureContentsCommand_title = &Configure Contents...
 
-MarkerFilterDialog_title=Add New Filter
-MarkerFilterDialog_message=Select Filter Name
+MarkerFilterDialog_title=Filter Name
+MarkerFilterDialog_message=Select a filter name
 MarkerFilterDialog_emptyMessage=Name must not be empty
-AND_Title = Match a&ll configurations
-OR_Title = Match &any configuration
+AND_OR_Label=Show results matching: 
+AND_Title = A&ll enabled filters
+OR_Title = &Any enabled filter
 
 MarkerFilterDialog_errorTitle = An error has occurred
 MarkerFilterDialog_failedFilterMessage = Could not create filter {0}. 
@@ -200,6 +202,7 @@ MarkerPreferences_MoveRight = >>
 MarkerPreferences_ColumnGroupTitle = Hide/Show Columns
 MarkerPreferences_VisibleColumnsTitle = &Show
 MarkerPreferences_HiddenColumnsTitle = &Hide
+MarkerPreferences_AtLeastOneVisibleColumn = There must be at least one visible column.
 
 ProblemFilterDialog_System_Filters_Title = System filte&rs:
 ProblemFilterDialog_All_Problems = Enabled for all problems
@@ -224,6 +227,7 @@ FieldCategory_Uncategorized = Other
 Category_Label = {0} ({1} items)
 Category_One_Item_Label = {0} (1 item)
 Category_Limit_Label = {0} ({1} of {2} items)
+Category_building = {0} (...)
 
 MarkerResolutionDialog_Fixing = Fixing
 MarkerResolutionDialog_Description = Select the fix for ''{0}''.
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
index e0e66f4..7c0cd95 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.window.Window;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTargetEvent;
@@ -37,10 +38,12 @@ import org.eclipse.ui.actions.CopyFilesAndFoldersOperation;
 import org.eclipse.ui.actions.MoveFilesAndFoldersOperation;
 import org.eclipse.ui.actions.ReadOnlyStateChecker;
 import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.ide.dialogs.ImportTypeDialog;
 import org.eclipse.ui.internal.views.navigator.ResourceNavigatorMessages;
 import org.eclipse.ui.part.PluginDropAdapter;
 import org.eclipse.ui.part.ResourceTransfer;
 
+
 /**
  * Implements drop behaviour for drag and drop operations
  * that land on the resource navigator.
@@ -48,8 +51,7 @@ import org.eclipse.ui.part.ResourceTransfer;
  * @since 2.0
  * @deprecated as of 3.5, use the Common Navigator Framework classes instead
  */
-public class NavigatorDropAdapter extends PluginDropAdapter implements
-        IOverwriteQuery {
+public class NavigatorDropAdapter extends PluginDropAdapter implements IOverwriteQuery {
 
     /**
      * A flag indicating that overwrites should always occur.
@@ -77,11 +79,19 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
         if (FileTransfer.getInstance().isSupportedType(event.currentDataType)
                 && event.detail == DND.DROP_DEFAULT) {
             // default to copy when dragging from outside Eclipse. Fixes bug 16308.
-            event.detail = DND.DROP_COPY;
-        }
+       		event.detail = DND.DROP_COPY;
+          }
         super.dragEnter(event);
     }
 
+
+    /* (non-Javadoc)
+	 * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragOperationChanged(org.eclipse.swt.dnd.DropTargetEvent)
+	 */
+	public void dragOperationChanged(DropTargetEvent event) {
+		super.dragOperationChanged(event);
+	}
+
     /**
      * Returns an error status with the given info.
      */
@@ -99,7 +109,7 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
 
     /**
      * Returns the actual target of the drop, given the resource
-     * under the mouse.  If the mouse target is a file, then the drop actually 
+     * under the mouse.  If the mouse target is a file, then the drop actually
      * occurs in its parent.  If the drop location is before or after the
      * mouse target and feedback is enabled, the target is also the parent.
      */
@@ -263,23 +273,22 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
         mergeStatus(problems, validateTarget(getCurrentTarget(),
                 getCurrentTransfer()));
 
+		final int currentOperation= getCurrentOperation();
         final IContainer target = getActualTarget((IResource) getCurrentTarget());
         final String[] names = (String[]) data;
-        // Run the import operation asynchronously. 
-        // Otherwise the drag source (e.g., Windows Explorer) will be blocked 
+        // Run the import operation asynchronously.
+        // Otherwise the drag source (e.g., Windows Explorer) will be blocked
         // while the operation executes. Fixes bug 16478.
         Display.getCurrent().asyncExec(new Runnable() {
             public void run() {
                 getShell().forceActive();
-                CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
-                        getShell());
-                operation.copyFiles(names, target);
+				new CopyFilesAndFoldersOperation(getShell()).copyOrLinkFiles(names, target, currentOperation);
             }
         });
         return problems;
     }
 
-    /**
+	/**
      * Performs a resource copy
      */
     private IStatus performResourceCopy(Shell shell, IResource[] sources) {
@@ -289,9 +298,53 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
                 getCurrentTransfer()));
 
         IContainer target = getActualTarget((IResource) getCurrentTarget());
-        CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
+
+        boolean shouldLinkAutomatically = false;
+		if (target.isVirtual()) {
+			shouldLinkAutomatically = true;
+			for (int i = 0; i < sources.length; i++) {
+				if (sources[0].getType() != IResource.FILE) {
+					shouldLinkAutomatically = false;
+					break;
+				}
+			}
+		}
+
+		CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
                 shell);
-        operation.copyResources(sources, target);
+
+		// if the target is a group and all sources are files, then automatically create links
+		if (shouldLinkAutomatically) {
+			operation.setCreateLinks(true);
+			operation.copyResources(sources, target);
+		}
+		else {
+			boolean allSourceAreLinksOrGroups = true;
+			for (int i = 0; i < sources.length; i++) {
+				if (!sources[0].isVirtual() && !sources[0].isLinked()) {
+					allSourceAreLinksOrGroups = false;
+					break;
+				}
+			}
+			// if all sources are either links or groups, copy then normally, don't show the dialog
+			if (!allSourceAreLinksOrGroups) {
+				ImportTypeDialog dialog = new ImportTypeDialog(getShell(), getCurrentOperation(), sources, target);
+				dialog.setResource(target);
+				if (dialog.open() == Window.OK) {
+					if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
+						operation.setVirtualFolders(true);
+					if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
+						operation.setCreateLinks(true);
+					if (dialog.getVariable() != null)
+						operation.setRelativeVariable(dialog.getVariable());
+					operation.copyResources(sources, target);
+				}
+				else
+					return problems;
+			}
+			else
+				operation.copyResources(sources, target);
+		}
 
         return problems;
     }
@@ -306,14 +359,34 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
                 getCurrentTransfer()));
 
         IContainer target = getActualTarget((IResource) getCurrentTarget());
-        ReadOnlyStateChecker checker = new ReadOnlyStateChecker(
-                getShell(),
-                ResourceNavigatorMessages.MoveResourceAction_title,
-                ResourceNavigatorMessages.MoveResourceAction_checkMoveMessage);
-        sources = checker.checkReadOnlyResources(sources);
-        MoveFilesAndFoldersOperation operation = new MoveFilesAndFoldersOperation(
-                getShell());
-        operation.copyResources(sources, target);
+        
+        boolean shouldLinkAutomatically = false;
+		if (target.isVirtual()) {
+			shouldLinkAutomatically = true;
+			for (int i = 0; i < sources.length; i++) {
+				if (sources[0].isVirtual() || sources[0].isLinked()) {
+					shouldLinkAutomatically = false;
+					break;
+				}
+			}
+		}
+		
+		if (shouldLinkAutomatically) {
+			CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
+	                getShell());
+			operation.setCreateLinks(true);
+	        operation.copyResources(sources, target);
+		}
+		else {
+			ReadOnlyStateChecker checker = new ReadOnlyStateChecker(
+	                getShell(),
+	                ResourceNavigatorMessages.MoveResourceAction_title,
+	                ResourceNavigatorMessages.MoveResourceAction_checkMoveMessage);
+	        sources = checker.checkReadOnlyResources(sources);
+	        MoveFilesAndFoldersOperation operation = new MoveFilesAndFoldersOperation(
+	                getShell());
+	        operation.copyResources(sources, target);
+		}
 
         return problems;
     }
@@ -359,8 +432,7 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
             lastValidOperation = dragOperation;
         }
         if (FileTransfer.getInstance().isSupportedType(transferType)
-                && lastValidOperation != DND.DROP_COPY) {
-            // only allow copying when dragging from outside Eclipse
+                && (lastValidOperation != DND.DROP_COPY)) {
             return false;
         }
         if (super.validateDrop(target, dragOperation, transferType)) {
@@ -395,11 +467,19 @@ public class NavigatorDropAdapter extends PluginDropAdapter implements
                 CopyFilesAndFoldersOperation operation;
                 if (lastValidOperation == DND.DROP_COPY) {
                     operation = new CopyFilesAndFoldersOperation(getShell());
+					if (operation.validateDestination(destination, selectedResources) != null) {
+						operation.setVirtualFolders(true);
+						message = operation.validateDestination(destination, selectedResources);
+					}
                 } else {
                     operation = new MoveFilesAndFoldersOperation(getShell());
+                	if (operation.validateDestination(destination, selectedResources) != null) {
+						operation.setVirtualFolders(true);
+						message = operation.validateDestination(destination, selectedResources);
+						if (message == null)
+							lastValidOperation = DND.DROP_COPY;
+					}
                 }
-                message = operation.validateDestination(destination,
-                        selectedResources);
             }
         } // file import?
         else if (FileTransfer.getInstance().isSupportedType(transferType)) {
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
index 0455be5..ec84836 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
@@ -864,7 +864,7 @@ public class ResourceNavigator extends ViewPart implements ISetSelectionTarget,
      * @since 2.0
      */
     protected void initDragAndDrop() {
-        int ops = DND.DROP_COPY | DND.DROP_MOVE;
+        int ops = DND.DROP_COPY | DND.DROP_MOVE  | DND.DROP_LINK;
         Transfer[] transfers = new Transfer[] {
                 LocalSelectionTransfer.getInstance(),
                 ResourceTransfer.getInstance(), FileTransfer.getInstance(),
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSelectionUtil.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSelectionUtil.java
index 73d4fad..a260cdf 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSelectionUtil.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceSelectionUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ import org.eclipse.jface.viewers.StructuredSelection;
  * </p>
  * @noinstantiate This class is not intended to be instantiated by clients.
  * @noextend This class is not intended to be subclassed by clients.
- * @deprecated as of 3.5, use the Common Navigator Framework classes instead
+ * @deprecated as of 3.5, use {@link org.eclipse.ui.ide.ResourceSelectionUtil} instead.
  */
 public class ResourceSelectionUtil {
     /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java
index 90c088e..6d588f6 100644
--- a/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java
@@ -20,9 +20,11 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.zip.ZipEntry;
 
+import org.eclipse.core.filesystem.URIUtil;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IPathVariableManager;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.IWorkspaceRoot;
@@ -83,6 +85,14 @@ public class ImportOperation extends WorkspaceModifyOperation {
 
     private List errorTable = new ArrayList();
 
+    private boolean createVirtualFolder = false;
+
+    private boolean createLinks = false;
+    
+    private boolean createLinkFilesOnly = false;
+
+    private String relativeVariable = null;
+
     private boolean createContainerStructure = true;
 
     //The constants for the overwrite 3 state
@@ -94,7 +104,9 @@ public class ImportOperation extends WorkspaceModifyOperation {
 
     private int overwriteState = OVERWRITE_NOT_SET;
 
-    /**
+	private static final String ABSOLUTE_PATH = "<Absolute Path>"; //$NON-NLS-1$
+
+	/**
      * Creates a new operation that recursively imports the entire contents of the
      * specified root file system object.
      * <p>
@@ -305,8 +317,15 @@ public class ImportOperation extends WorkspaceModifyOperation {
         for (int i = 0; i < segmentCount; i++) {
             currentFolder = currentFolder.getFolder(new Path(path.segment(i)));
             if (!currentFolder.exists()) {
-				((IFolder) currentFolder).create(false, true, null);
-			}
+                if (createVirtualFolder)
+					((IFolder) currentFolder).create(IResource.VIRTUAL, true,
+							null);
+                else if (createLinks)
+                    ((IFolder) currentFolder).createLink(createRelativePath(
+                            path, currentFolder), 0, null);
+                else
+                    ((IFolder) currentFolder).create(false, true, null);
+            }
         }
 
         return currentFolder;
@@ -552,11 +571,23 @@ public class ImportOperation extends WorkspaceModifyOperation {
             if (targetResource.exists()) {
 				targetResource.setContents(contentStream,
                         IResource.KEEP_HISTORY, null);
-			} else {
-				targetResource.create(contentStream, false, null);
-			}
-            setResourceAttributes(targetResource,fileObject);
-            
+            } else {
+                if (createVirtualFolder || createLinks || createLinkFilesOnly)
+                    targetResource.createLink(createRelativePath(
+                            new Path(provider
+                                    .getFullPath(fileObject)), targetResource), 0, null);
+                else
+                    targetResource.create(contentStream, false, null);
+            }
+            setResourceAttributes(targetResource, fileObject);
+
+            if (provider instanceof TarLeveledStructureProvider) {
+            	try {
+            		targetResource.setResourceAttributes(((TarLeveledStructureProvider) provider).getResourceAttributes(fileObject));
+            	} catch (CoreException e) {
+            		errorTable.add(e.getStatus());
+            	}
+            }
         } catch (CoreException e) {
             errorTable.add(e.getStatus());
         } finally {
@@ -618,9 +649,10 @@ public class ImportOperation extends WorkspaceModifyOperation {
      *
      * @param filesToImport the list of file system objects to import
      *   (element type: <code>Object</code>)
+	 * @throws CoreException 
      * @exception OperationCanceledException if canceled
      */
-    void importFileSystemObjects(List filesToImport) {
+    void importFileSystemObjects(List filesToImport) throws CoreException {
         Iterator filesEnum = filesToImport.iterator();
         while (filesEnum.hasNext()) {
             Object fileSystemObject = filesEnum.next();
@@ -651,8 +683,9 @@ public class ImportOperation extends WorkspaceModifyOperation {
      * @param folderObject the file system container object to be imported
      * @param policy determines how the folder object and children are imported
      * @return the policy to use to import the folder's children
+     * @throws CoreException 
      */
-    int importFolder(Object folderObject, int policy) {
+    int importFolder(Object folderObject, int policy) throws CoreException {
         IContainer containerResource;
         try {
             containerResource = getDestinationContainerFor(folderObject);
@@ -682,12 +715,25 @@ public class ImportOperation extends WorkspaceModifyOperation {
 				return POLICY_SKIP_CHILDREN;
 			}
 
-            return POLICY_FORCE_OVERWRITE;
+            IFolder folder = workspace.getRoot().getFolder(resourcePath);
+            if (createVirtualFolder || createLinks || folder.isVirtual() || folder.isLinked()) {
+                folder.delete(true, null);
+            } else
+                return POLICY_FORCE_OVERWRITE;
         }
 
         try {
-            workspace.getRoot().getFolder(resourcePath).create(false, true,
-                    null);
+            if (createVirtualFolder)
+				workspace.getRoot().getFolder(resourcePath).create(
+						IResource.VIRTUAL, true, null);
+            else if (createLinks) {
+            	IFolder newFolder = workspace.getRoot().getFolder(resourcePath);
+            	newFolder.createLink(
+                        createRelativePath(new Path(provider.getFullPath(folderObject)), newFolder),
+                        0, null);
+                policy = POLICY_SKIP_CHILDREN;
+            } else
+                workspace.getRoot().getFolder(resourcePath).create(false, true, null);
         } catch (CoreException e) {
             errorTable.add(e.getStatus());
         }
@@ -696,15 +742,38 @@ public class ImportOperation extends WorkspaceModifyOperation {
     }
 
     /**
+     * Transform an absolute path URI to a relative path one (i.e. from
+     * "C:\foo\bar\file.txt" to "VAR\file.txt" granted that the relativeVariable
+     * is "VAR" and points to "C:\foo\bar\").
+     * 
+     * @param location
+     * @param resource 
+     * @return an URI that was made relative to a variable
+     */
+    private IPath createRelativePath(IPath location, IResource resource) {
+		if (relativeVariable == null)
+			return location;
+		if (relativeVariable.equals(ABSOLUTE_PATH))
+			return location;
+		IPathVariableManager pathVariableManager = resource.getPathVariableManager();
+		try {
+			return URIUtil.toPath(pathVariableManager.convertToRelative(URIUtil.toURI(location), true, relativeVariable));
+		} catch (CoreException e) {
+			return location;
+		}
+	}
+
+	/**
      * Imports the specified file system object recursively into the workspace.
      * If the import fails, adds a status object to the list to be returned by
      * <code>getStatus</code>.
      *
      * @param fileSystemObject the file system object to be imported
      * @param policy determines how the file system object and children are imported
+	 * @throws CoreException 
      * @exception OperationCanceledException if canceled
      */
-    void importRecursivelyFrom(Object fileSystemObject, int policy) {
+    void importRecursivelyFrom(Object fileSystemObject, int policy) throws CoreException {
         if (monitor.isCanceled()) {
 			throw new OperationCanceledException();
 		}
@@ -877,4 +946,34 @@ public class ImportOperation extends WorkspaceModifyOperation {
         rejectedFiles = validateEdit(overwriteReadonly);
         rejectedFiles.addAll(noOverwrite);
     }
+
+    /**
+     * Set Whether groups and links will be created instead of files and folders
+     * 
+     * @param virtualFolders
+     * @since 3.6
+     */
+    public void setVirtualFolders(boolean virtualFolders) {
+        createVirtualFolder = virtualFolders;
+    }
+
+    /**
+     * Set Whether links will be created instead of files and folders
+     * 
+     * @param links
+     * @since 3.6
+     */
+    public void setCreateLinks(boolean links) {
+        createLinks = links;
+    }
+
+    /**
+     * Set a variable relative to which the links are created
+     * 
+     * @param variable
+     * @since 3.6
+     */
+    public void setRelativeVariable(String variable) {
+        relativeVariable = variable;
+    }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.intro.universal/META-INF/MANIFEST.MF
index db34f06..3db2000 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/META-INF/MANIFEST.MF
@@ -2,17 +2,17 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin_name
 Bundle-SymbolicName: org.eclipse.ui.intro.universal;singleton:=true
-Bundle-Version: 3.2.300.qualifier
+Bundle-Version: 3.2.402.qualifier
 Bundle-Vendor: %provider_name
 Bundle-Localization: plugin
 Export-Package: org.eclipse.ui.internal.intro.universal;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.internal.intro.universal.contentdetect;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.internal.intro.universal.util;x-internal:=true,
  org.eclipse.ui.intro.universal
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.intro;bundle-version="[3.3.0,4.0.0)"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.help;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.intro;bundle-version="[3.4.0,4.0.0)"
 Eclipse-LazyStart: true; exceptions="org.eclipse.ui.internal.intro.universal.contentdetect"
 Bundle-Activator: org.eclipse.ui.internal.intro.universal.UniversalIntroPlugin
 Bundle-ClassPath: universal.jar
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/build.properties b/eclipse/plugins/org.eclipse.ui.intro.universal/build.properties
index 328ce4d..a45f903 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/build.properties
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
+# Copyright (c) 2005, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -17,8 +17,7 @@ bin.includes = plugin.xml,\
                .options,\
                about.html,\
                universal.jar
-src.includes = about.html,\
-               .options
+src.includes = about.html
 jars.compile.order = universal.jar
 source.universal.jar = src/
 output.universal.jar = bin/
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/introContent.xml b/eclipse/plugins/org.eclipse.ui.intro.universal/introContent.xml
index b219f87..77066b7 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/introContent.xml
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/introContent.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8" ?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/plugin.xml b/eclipse/plugins/org.eclipse.ui.intro.universal/plugin.xml
index 0ee7764..e9f8e1d 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2009 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -61,7 +62,6 @@
    <extension
          point="org.eclipse.ui.intro.configExtension">
       <theme
-            default="true"
             id="org.eclipse.ui.intro.universal.circles"
             name="%theme.name.circles"
             path="$nl$/themes/circles"
@@ -182,6 +182,7 @@
             		  value="$theme$graphics/icons/etool/wb48.gif"/>       
       </theme> 
       <theme
+            default="true"
             id="org.eclipse.ui.intro.universal.slate"
             name="%theme.name.slate"
             path="$nl$/themes/slate"
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
index c957ff5..b6d7463 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/IUniversalIntroConstants.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2007 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.ui.internal.intro.universal;
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.java b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.java
index b0b6f38..41ed0b1 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.java
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2004, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.ui.internal.intro.universal;
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.properties b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.properties
index b9126fb..738fae6 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/internal/intro/universal/Messages.properties
@@ -1,11 +1,11 @@
 ###############################################################################
-#  Copyright (c) 2000, 2008 IBM Corporation and others.
-#  All rights reserved. This program and the accompanying materials
-#  are made available under the terms of the Eclipse Public License v1.0
-#  which accompanies this distribution, and is available at
-#  http://www.eclipse.org/legal/epl-v10.html
-# 
-#  Contributors:
+# Copyright (c) 2000, 2009 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
 #     IBM Corporation - initial API and implementation
 ###############################################################################
 
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
index 35804ae..c58f8a4 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/src/org/eclipse/ui/intro/universal/ExtensionFactory.java
@@ -1,11 +1,11 @@
 /*******************************************************************************
- *  Copyright (c) 2006, 2008 IBM Corporation and others.
- *  All rights reserved. This program and the accompanying materials
- *  are made available under the terms of the Eclipse Public License v1.0
- *  which accompanies this distribution, and is available at
- *  http://www.eclipse.org/legal/epl-v10.html
- * 
- *  Contributors:
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
  *      IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.ui.intro.universal;
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow_rtl.gif b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/arrow_rtl.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow_rtl.gif
copy to eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/graphics/icons/ctool/arrow_rtl.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/font-relative.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/font-relative.css
index de4dd0e..af2383e 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/font-relative.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/font-relative.css
@@ -73,7 +73,7 @@ p .group-description {
 	font-size: 8pt; 
 }
 
-.topicList {
+.topicList, .rss-feed-link {
 	font-size:90%; 
 }
 
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/rtl.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/rtl.css
index c3de355..d7e4ce0 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/rtl.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/rtl.css
@@ -67,7 +67,7 @@ div div#rss-news {
    margin-right : 30px;
 }
 
-div ul#eclipse-news {
+div ul.news-list {
 	list-style-image: url("../graphics/icons/ctool/arrow_rtl.gif");
 	margin-left: 0px;
 	padding-right: 10px;
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/shared.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
index 09dad1e..fbaf550 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/circles/html/shared.css
@@ -622,6 +622,11 @@ h1, p { margin-left : 10px; } /* required in mozilla so the page description is
 	color: #69c;
 }
 
+.rss-feed-link a {
+	font-family: Verdana, Arial, Helvetica; 
+	color: #00507C;
+}
+
 /*
  * This part is for hosting embedded document inside
  * the content area.
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/purpleMesh/html/rtl.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/purpleMesh/html/rtl.css
index c3de355..45b1814 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/purpleMesh/html/rtl.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/purpleMesh/html/rtl.css
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -84,3 +84,26 @@ div ul#eclipse-news {
 	background-image : url(../graphics/icons/ctool/widget_closed_hov_rtl.gif);
 }
 
+#standby #links-background {
+    text-align:right;
+}
+
+#standby #page-links a {
+	text-align : right; 
+}
+
+#standby #page-links a .link-label {
+    left:auto;
+    right : 60px;
+}
+
+#standby #page-links p {
+    right : 60px;
+}  
+
+#standby #page-links a p .text {
+    margin-right:auto;
+    left:auto;
+    right : 60px;
+}
+
diff --git a/eclipse/plugins/org.eclipse.platform/images/topiclabel/arrow.gif b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.platform/images/topiclabel/arrow.gif
copy to eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/html/shared.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/html/shared.css
index a4879e9..062a630 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/html/shared.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/html/shared.css
@@ -148,4 +148,9 @@ body #migrate .importance-medium {
 .importance-callout {
 	background-color: #eeeeee;
 	background-image: url("../graphics/contentpage/grey_callout.gif");
-}
\ No newline at end of file
+}
+
+ul.news-list {
+	list-style-image: url("../graphics/icons/ctool/arrow.gif");
+}
+ 
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/banner_extension.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/banner_extension.jpg
new file mode 100644
index 0000000..4f885f5
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/banner_extension.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/fs_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/fs_banner.jpg
index 429411e..bed56b4 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/fs_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/fs_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/mi_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/mi_banner.jpg
index 9772a07..12e6e20 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/mi_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/mi_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/ov_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/ov_banner.jpg
index 63b29e9..53cfcd1 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/ov_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/ov_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/sa_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/sa_banner.jpg
index a0e279b..61d0937 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/sa_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/sa_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/tu_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/tu_banner.jpg
index 4545587..276c1a8 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/tu_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/tu_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wn_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wn_banner.jpg
index b39121f..91445fe 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wn_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wn_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wr_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wr_banner.jpg
index 643d6fe..0626d13 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wr_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/contentpage/wr_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow_rtl.gif b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/icons/ctool/arrow_rtl.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ui.intro.universal/themes/shared/graphics/icons/ctool/arrow_rtl.gif
copy to eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/icons/ctool/arrow_rtl.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/rootpage/root_banner.jpg b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/rootpage/root_banner.jpg
index 3fd90b0..a6ab1b1 100644
Binary files a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/rootpage/root_banner.jpg and b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/graphics/rootpage/root_banner.jpg differ
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/font-relative.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/font-relative.css
index 9bd16f7..240a626 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/font-relative.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/font-relative.css
@@ -1,5 +1,5 @@
 L/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,10 @@ H4 .div-label {
     font-size : 8pt;
 }
 
+#standby #page-links {
+    font-size : 100%;
+}
+
 /* Floating link labels for navigation links */
 #navigation-links a .link-label {
 	font-size : 8pt;
@@ -72,7 +76,7 @@ p .group-description {
 	font-size: 8pt; 
 }
 
-.topicList {
+.topicList, .rss-feed-link {
 	font-size:90%; 
 }
 
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/root.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/root.css
index 35babd5..071b69f 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/root.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/root.css
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,6 +49,7 @@ html, body {
 #root {
     background-image : url("../graphics/rootpage/root_banner.jpg");
 	background-position : top left;
+	background-repeat : repeat-x;
 }
 
 #branding {
@@ -156,11 +157,6 @@ html, body {
 #page-links a#webresources:active .content-img,
 #page-links a#webresources:focus .content-img { background-image : url("../graphics/rootpage/webresources48_hov.png"); }
 
-#page-links a#workbench .content-img { background-image : url("../graphics/rootpage/workbench48.png"); }
-#page-links a#workbench:hover .content-img,
-#page-links a#workbench:active .content-img,
-#page-links a#workbench:focus .content-img { background-image : url("../graphics/rootpage/workbench48_hov.png"); }
-
 /* Hack for IE6, which cannot display png files with alpha channel transparency */
 
 * html #page-links a#overview .content-img { background-image : url("../graphics/rootpage/overview48.gif"); }
@@ -198,10 +194,6 @@ html, body {
 * html #page-links a#webresources:active .content-img,
 * html #page-links a#webresources:focus .content-img { background-image : url("../graphics/rootpage/webresources48_hov.gif"); }
 
-* html #page-links a#workbench .content-img { background-image : url("../graphics/rootpage/workbench48.gif"); }
-* html #page-links a#workbench:hover .content-img,
-* html #page-links a#workbench:active .content-img,
-* html #page-links a#workbench:focus .content-img { background-image : url("../graphics/rootpage/workbench48_hov.gif"); }
 /* End hack for IE6 */
 
 /*
@@ -209,4 +201,71 @@ html, body {
  */
 #action-links {
 	display: none;
+}
+
+/*
+* Workbench
+*/
+
+#page-links a#workbench:hover .link-label
+{
+    color : #FFEC89;
+    text-decoration : none;
+}
+
+#workbench p span {
+    display : none;
+}
+
+* html #page-links a#workbench .content-img {
+    background-image:url(../graphics/icons/ctool/wb_nav_32.gif);
+}
+
+#page-links a#workbench .content-img {
+    background-image:url(../graphics/icons/ctool/wb_nav_32.gif);
+    display:block;
+    color : white;
+    height:32px;
+    margin:5px auto 0;
+    width:32px;
+    background-repeat:no-repeat;
+    border-width:0;
+}
+
+#page-links a#workbench .link-label {
+   position : static;
+   margin-right : 0px;
+   font-weight : bold;	
+   color : white;
+   font-family:Arial,sans-serif;
+}
+
+#page-links a#workbench .text {
+   display : none;
+}
+
+#page-links a#workbench {
+    position : absolute;
+    right : 20px;
+    top : 0px;
+    width : auto;
+    text-align:center;
+    margin-bottom : 0px;
+}
+
+#page-links a#workbench img {
+    padding : 0px;
+}
+
+#page-links a#workbench span {
+    margin-top : 0px;
+    line-height : normal;
+}
+
+#page-links a#workbench .link-label {
+    font-size:8pt;
+    color:white;
+    font-weight:bold;
+    text-align:center;
+    margin-left: 0;
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/rtl.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/rtl.css
index aea7e5c..a3774eb 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/rtl.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/rtl.css
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,12 @@ table {
     top:0px;
 }
 
+#page-content * a p {
+    margin-bottom:0px;
+    position:static;
+    top:0px;
+}
+
 .content-group {
 	text-align: right;
 }
@@ -68,6 +74,18 @@ table {
     padding-right : 45px;
 }
 
+#navigation-links a {
+  float:right;
+  margin-left:auto;
+  margin-left : 10px;
+}
+
+#action-links a {
+    float:left;
+    margin-left:20px;
+    margin-right : auto;
+}
+
 div div#rss-news {  
    position:static;
    margin-left:0px;
@@ -77,7 +95,7 @@ div div#rss-news {
    margin-right : 30px;
 }
 
-div ul#eclipse-news {
+div ul.news-list {
 	list-style-image: url("../graphics/icons/ctool/arrow_rtl.gif");
 	margin-left: 0px;
 	padding-right: 10px;
@@ -94,3 +112,26 @@ div ul#eclipse-news {
 	background-image : url(../graphics/icons/ctool/widget_closed_hov_rtl.gif);
 }
 
+#standby #links-background {
+    text-align:right;
+}
+
+#standby #page-links a {
+	text-align : right; 
+}
+
+#standby #page-links a .link-label {
+    left:auto;
+    right : 60px;
+}
+
+#standby #page-links p {
+    right : 60px;
+}  
+
+#standby #page-links a p .text {
+    margin-right:auto;
+    left:auto;
+    right : 60px;
+}
+
diff --git a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/shared.css b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/shared.css
index f109153..309d565 100644
--- a/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/shared.css
+++ b/eclipse/plugins/org.eclipse.ui.intro.universal/themes/slate/html/shared.css
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,6 +16,10 @@ body { font-family : Arial, sans-serif; }
 
 H1, H2, H3, H4, p, a { color : #4D4D4D; }
 
+ body {
+	background-color : #FFFFFF;
+}
+
 /* The label part of the folding section */
 .section-title-link .section-title {
 	display : inline;
@@ -61,6 +65,8 @@ HR {
 	float : none;
 	clear : both;
 	margin-left: 70px;
+	position : relative;
+	top : -25px;
 }
 
 a {
@@ -186,9 +192,9 @@ html>body { overflow: visible; }
  * settings primarily apply to the content pages
  */
 body {
-	background-color : #FFFFFF;
-	background-repeat : no-repeat;
-	background-position : bottom right;
+    background-image: url(../graphics/contentpage/banner_extension.jpg);	
+    background-repeat: repeat-x;
+    background-position: top left;
 }
 
 /*
@@ -211,8 +217,7 @@ body, .page {
 }
 
 .page {
-	background-image : url(../graphics/contentpage/background.jpg);
-	background-repeat : repeat-x;
+	background-repeat : no-repeat;
 	background-position : top left;
 	
 	min-width : 770px;
@@ -237,11 +242,6 @@ body, .page {
 	top : 0px;
 	padding-left: 12px;
 	height : 118px;
-	width : 100%;
-}
-
-.page > #navigation-links {
-	width: 98.1%;
 }
 
 #navigation-links a {
@@ -421,11 +421,16 @@ h1, p { margin-left : 10px; } /* required in mozilla so the page description is
 
 #page-content * a > .link-label { left: 65px; }
 
-#page-content * a p .text {
+#page-content * a p  {
 	display : block;
 	position : relative;
 	top : -45px;
 	margin-bottom: -25px;
+}
+
+#page-content * a p .text {
+	display : block;
+	position : relative;
 	left : 53px;
 	margin-right: 53px;
 }
@@ -491,6 +496,12 @@ h1, p { margin-left : 10px; } /* required in mozilla so the page description is
 	color: #69c;
 }
 
+
+.rss-feed-link a {
+	font-family: Verdana, Arial, Helvetica; 
+	color: #00507C;
+}
+
 /*
  * This part is for hosting embedded document inside
  * the content area.
diff --git a/eclipse/plugins/org.eclipse.ui.intro/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.intro/META-INF/MANIFEST.MF
index c075892..b4213bf 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.intro/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin_name
 Bundle-SymbolicName: org.eclipse.ui.intro; singleton:=true
-Bundle-Version: 3.3.2.qualifier
+Bundle-Version: 3.4.0.qualifier
 Bundle-Activator: org.eclipse.ui.internal.intro.impl.IntroPlugin
 Bundle-Vendor: %provider_name
 Bundle-Localization: plugin
@@ -19,12 +19,12 @@ Export-Package: org.eclipse.ui.internal.intro.impl;x-friends:="org.eclipse.ui.in
  org.eclipse.ui.internal.intro.impl.util;x-friends:="org.eclipse.ua.tests",
  org.eclipse.ui.intro.config,
  org.eclipse.ui.intro.contentproviders
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.help.base;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="3.4.100"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.help;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.help.base;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.forms;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="3.4.200"
 Eclipse-LazyStart: true
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Import-Package: javax.xml.parsers,
diff --git a/eclipse/plugins/org.eclipse.ui.intro/build.properties b/eclipse/plugins/org.eclipse.ui.intro/build.properties
index 5063bd4..e5b7d88 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/build.properties
+++ b/eclipse/plugins/org.eclipse.ui.intro/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2008 IBM Corporation and others.
+# Copyright (c) 2003, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -21,5 +21,4 @@ bin.includes = plugin.xml,\
                javascript/
 
 src.includes = schema/,\
-               about.html,\
-               .options
+               about.html
diff --git a/eclipse/plugins/org.eclipse.platform/images/topiclabel/arrow.gif b/eclipse/plugins/org.eclipse.ui.intro/icons/arrow.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.platform/images/topiclabel/arrow.gif
copy to eclipse/plugins/org.eclipse.ui.intro/icons/arrow.gif
diff --git a/eclipse/plugins/org.eclipse.ui.intro/plugin.xml b/eclipse/plugins/org.eclipse.ui.intro/plugin.xml
index 9c2d6ef..409dc88 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.intro/plugin.xml
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
-     All rights reserved. This program and the accompanying materials
-     are made available under the terms of the Eclipse Public License v1.0
-     which accompanies this distribution, and is available at
-     http://www.eclipse.org/legal/epl-v10.html
-    
-     Contributors:
+<?eclipse version="3.0"?>
+<!--
+    Copyright (c) 2005, 2010 IBM Corporation and others.
+    All rights reserved. This program and the accompanying materials
+    are made available under the terms of the Eclipse Public License v1.0
+    which accompanies this distribution, and is available at
+    http://www.eclipse.org/legal/epl-v10.html
+   
+    Contributors:
          IBM Corporation - initial API and implementation
  -->
 
@@ -36,7 +37,7 @@
       </standbyContentPart> 
    </extension>
    <extension
-         point="org.eclipse.help.base.luceneSearchParticipants">
+         point="org.eclipse.help.base.searchParticipant">
       <searchParticipant
             icon="$nl$/icons/welcome16.gif"
             id="org.eclipse.ui.intro"
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
index 2e22e68..e359b44 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.intro.impl;
 
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.intro.impl.model.IntroModelRoot;
@@ -27,6 +29,12 @@ import org.osgi.framework.BundleContext;
 public class IntroPlugin extends AbstractUIPlugin {
 	public static final String PLUGIN_ID = "org.eclipse.ui.intro"; //$NON-NLS-1$
 
+	// Debug control variables
+	public static boolean LOG_WARN = 
+		"true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID+"/debug/warn")); //$NON-NLS-1$ //$NON-NLS-2$
+	public static boolean LOG_INFO = 
+		"true".equalsIgnoreCase(Platform.getDebugOption(PLUGIN_ID+"/debug/info")); //$NON-NLS-1$ //$NON-NLS-2$
+	
     // The static shared instance.
     private static IntroPlugin inst;
 
@@ -194,5 +202,69 @@ public class IntroPlugin extends AbstractUIPlugin {
         this.uiCreationStartTime = uiCreationStartTime;
     }
 
+    /**
+	 * Logs an Error message.  To print errors to console,
+	 * run eclipse with the -console -consolelog arguments
+	 */
+	public static synchronized void logError(String message) {
+		logError(message,null);
+	}		
+	
+	/**
+	 * Logs an Error message with an exception.  To print errors to console,
+	 * run eclipse with the -console -consolelog arguments
+	 */
+	public static synchronized void logError(String message, Throwable ex) {
+		if (message == null){
+			message = ""; //$NON-NLS-1$
+		}
+		Status errorStatus = new Status(IStatus.ERROR, PLUGIN_ID, message, ex);
+		IntroPlugin.getDefault().getLog().log(errorStatus);
+	}	
+	
+	
+	/**
+	 * Logs a Warning message with an exception.  To print warnings to console,
+	 * run eclipse with the -console -consolelog arguments
+	 * 
+	 * Only logs if the following conditions are true:
+	 * 	-debug switch is enabled at the command line
+	 *  .options file is placed at the eclipse work directory with the contents:
+	 *      com.ibm.ccl.welcome.bits/debug=true
+	 *      com.ibm.ccl.welcome.bits/debug/warn=true
+	 */
+	public static synchronized void logWarning(String message) {
+		logWarning(message,null);
+	}
+	
+
+	public static synchronized void logWarning(String message,Throwable ex) {
+		if (IntroPlugin.getDefault().isDebugging() && LOG_WARN) {
+			if (message == null)
+				message = ""; //$NON-NLS-1$
+			Status warningStatus = new Status(IStatus.WARNING, PLUGIN_ID,
+					IStatus.OK, message, ex);
+			getDefault().getLog().log(warningStatus);
+		}
+	}
+	
+	/**
+	 * Logs a debug message.  To print messages to console,
+	 * run eclipse with the -console -consolelog arguments
+	 * 
+	 * Only logs if the following conditions are true:
+	 * 	-debug switch is enabled at the command line
+	 *  .options file is placed at the eclipse work directory with the contents:
+	 *      com.ibm.ccl.welcome.bits/debug=true
+	 *      com.ibm.ccl.welcome.bits/debug/info=true
+	 */
+	public static synchronized void logDebug(String message) {
+		if (IntroPlugin.getDefault().isDebugging() && LOG_INFO) {
+			if (message == null)
+				message = ""; //$NON-NLS-1$
+			Status status = new Status(IStatus.INFO, PLUGIN_ID,message);
+			getDefault().getLog().log(status);
+		}
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.java b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.java
index 700a654..f6d8bc1 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.java
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.java
@@ -58,4 +58,12 @@ public class Messages extends NLS {
     //Always Welcome Checkbox
 	public static String AlwaysWelcomeCheckbox_Text;
 
+	//Eclipse RSS Viewer
+	public static String RSS_Subscribe;
+	public static String RSS_Loading;
+	public static String RSS_No_news_please_visit;
+	public static String RSS_Reading;
+	public static String RSS_No_news;
+	public static String RSS_Malformed_feed;
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.properties b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.properties
index c827ee6..969253c 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/Messages.properties
@@ -58,3 +58,11 @@ IntroPart_openExternal_tooltip = Open External Browser
 
 #Always welcome checkbox
 AlwaysWelcomeCheckbox_Text=Always show Welcome at start up
+
+#Eclipse RSS Viewer
+RSS_Subscribe=Subscribe
+RSS_Loading=Loading the news....
+RSS_No_news_please_visit=No news. Please visit: 
+RSS_Reading=Reading the news....
+RSS_No_news=No news at this time.
+RSS_Malformed_feed=An RSS feed "{0}" is malformed. News from this site is temporarily unavailable.
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
index 787a808..f4b8eb1 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/AbstractIntroContainer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -205,9 +205,7 @@ public abstract class AbstractIntroContainer extends AbstractBaseIntroElement {
             src = new AbstractIntroElement[size];
             break;
         }
-        if (src == null)
-            return new Object[0];
-
+        
         vector.copyInto(src);
         return src;
 
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
index 8ea83f3..52e68d2 100644
--- a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/model/IntroSearchParticipant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,20 +10,18 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.intro.impl.model;
 
-import java.io.StringReader;
 import java.net.URL;
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.help.search.ISearchIndex;
-import org.eclipse.help.search.LuceneSearchParticipant;
+import org.eclipse.help.search.IHelpSearchIndex;
+import org.eclipse.help.search.ISearchDocument;
+import org.eclipse.help.search.SearchParticipant;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.intro.impl.IntroPlugin;
 import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
@@ -34,12 +32,12 @@ import org.eclipse.ui.intro.config.IntroURLFactory;
 import org.osgi.framework.Bundle;
 
 /**
- * An implementation of the Lucene search participant that adds Welcome content into the local help
+ * An implementation of SearchParticipant that adds Welcome content into the local help
  * index so that it can be searched.
  * 
  */
 
-public class IntroSearchParticipant extends LuceneSearchParticipant {
+public class IntroSearchParticipant extends SearchParticipant {
 
 	private IntroModelRoot model;
 	
@@ -128,16 +126,18 @@ public class IntroSearchParticipant extends LuceneSearchParticipant {
 		IntroPage[] pages = model.getPages();
 		for (int i = 0; i < pages.length; i++) {
 			IntroPage page = pages[i];
-			Bundle bundle = page.getBundle();
-			String bundleId = bundle.getSymbolicName();
-			String content = page.getRawContent();
-			String pageId = page.getId();
-			String href;
-			if (content != null)
-				href = resolveVariables(bundleId, content, locale);
-			else
-				href = pageId;
-			set.add("/" + bundleId + "/" + href + "?id=" + pageId); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			if (page.isDynamic()) {
+				Bundle bundle = page.getBundle();
+				String bundleId = bundle.getSymbolicName();
+				String content = page.getRawContent();
+				String pageId = page.getId();
+				String href;
+				if (content != null)
+					href = resolveVariables(bundleId, content, locale);
+				else
+					href = pageId;
+				set.add("/" + bundleId + "/" + href + "?id=" + pageId); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			}
 		}
 	}
 
@@ -148,8 +148,9 @@ public class IntroSearchParticipant extends LuceneSearchParticipant {
 	 *      java.lang.String, java.net.URL, java.lang.String, java.lang.String,
 	 *      org.apache.lucene.document.Document)
 	 */
-	public IStatus addDocument(ISearchIndex index, String pluginId, String name, URL url, String id,
-			Document doc) {
+
+	public IStatus addDocument(IHelpSearchIndex index, String pluginId, String name, URL url, String id,
+			ISearchDocument doc) {
 		if (model == null)
 			return Status.CANCEL_STATUS;
 		IntroPage page = getPage(id);
@@ -167,8 +168,8 @@ public class IntroSearchParticipant extends LuceneSearchParticipant {
 		return null;
 	}
 
-	private IStatus addPage(ISearchIndex index, String pluginId, String name, URL url, IntroPage page,
-			Document doc) {
+	private IStatus addPage(IHelpSearchIndex index, String pluginId, String name, URL url, IntroPage page,
+			ISearchDocument doc) {
 		AbstractIntroElement[] children = page.getChildren();
 		if (children.length > 0) {
 			StringBuffer buf = new StringBuffer();
@@ -179,22 +180,24 @@ public class IntroSearchParticipant extends LuceneSearchParticipant {
 			     addTitle(titleSummary.title, doc);
             }
             if (titleSummary.summary != null) {
-            	doc.add(new Field("summary", titleSummary.summary, Field.Store.YES, Field.Index.NO)); //$NON-NLS-1$				
+            	doc.setSummary(titleSummary.summary); 
             }
-			doc.add(new Field("contents", new StringReader(contents))); //$NON-NLS-1$
-			doc.add(new Field("exact_contents", new StringReader(contents))); //$NON-NLS-1$
+            doc.addContents(contents);
 			return Status.OK_STATUS;
 		}
 		// delegate to the help system
-		return index.addDocument(pluginId, name, url, page.getId(), doc);
+		return index.addSearchableDocument(pluginId, name, url, page.getId(), doc);
 	}
 
-	private void addChildren(AbstractIntroElement[] children, StringBuffer buf, Document doc, TitleAndSummary titleSummary) {
+	private void addChildren(AbstractIntroElement[] children, StringBuffer buf, ISearchDocument doc, TitleAndSummary titleSummary) {
 		for (int i = 0; i < children.length; i++) {
 			AbstractIntroElement child = children[i];
 			if (child instanceof IntroLink) {
 				String text = ((IntroLink)child).getLabel();
 				appendNewText(buf, text);
+			} else if (child instanceof IntroGroup) {
+				String text = ((IntroGroup)child).getLabel();
+				appendNewText(buf, text);
 			} else if (child instanceof IntroText) {
 				IntroText childIntroText = (IntroText) child;
 				appendNewText(buf, childIntroText.getText());
@@ -252,4 +255,5 @@ public class IntroSearchParticipant extends LuceneSearchParticipant {
 		IIntroURL url = IntroURLFactory.createIntroURL("http://org.eclipse.ui.intro/showPage?id=" + id); //$NON-NLS-1$
 		return url.execute();
 	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java
new file mode 100644
index 0000000..e7da293
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.intro/src/org/eclipse/ui/intro/contentproviders/EclipseRSSViewer.java
@@ -0,0 +1,550 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.intro.contentproviders;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Stack;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.ui.forms.events.HyperlinkAdapter;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.widgets.FormText;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.internal.intro.impl.IntroPlugin;
+import org.eclipse.ui.internal.intro.impl.Messages;
+import org.eclipse.ui.intro.config.IIntroContentProvider;
+import org.eclipse.ui.intro.config.IIntroContentProviderSite;
+import org.eclipse.ui.intro.config.IIntroURL;
+import org.eclipse.ui.intro.config.IntroURLFactory;
+import org.osgi.framework.Bundle;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * A content provider which allows a news reader to be included in dynamic intro content.
+ * <p>
+ * The id for the contentProvider tag must consist of the following attributes. Each of these attributes must be separated by '##'.
+ * <ul>
+ * <TABLE CELLPADDING=6 FRAME=BOX>
+ * 
+ * <THEAD>
+ * <TR> <TH>Attribute</TH>     <TH>Description</TH>                         </TR>
+ * </THEAD>
+ * 
+ * <TBODY>
+ * <TR> <TD>url</TD>           <TD>RSS news feed url</TD>                   </TR>
+ * <TR> <TD>welcome_items</TD> <TD>Number of news feed to be displayed</TD> </TR>
+ * <TR> <TD>no_news_url</TD>   <TD>Alternative url for news feed</TD>       </TR>
+ * <TR> <TD>no_news_text</TD>  <TD>Text for the alternative url</TD>        </TR>
+ * </TBODY>
+ * 
+ * </TABLE>
+ * </ul>
+ * For example:
+ * <p>
+ * <contentProvider <br>
+ * <ul>
+ * id="url=http://www.eclipse.org/home/eclipsenews.rss##welcome_items=5##no_news_url=http://www.eclipse.org/community/##no_news_text=Welcome to the Eclipse Community Page" <br>
+ * pluginId="org.eclipse.ui.intro" <br>
+ * class="org.eclipse.ui.intro.contentproviders.EclipseRSSViewer"> <br>
+ * </ul>
+ * </contentProvider>
+ * </p>
+ * 
+ * @since 3.4
+ */
+
+public class EclipseRSSViewer implements IIntroContentProvider {
+
+	private final int SOCKET_TIMEOUT = 6000; //milliseconds
+
+	private static final String INTRO_SHOW_IN_BROWSER = "http://org.eclipse.ui.intro/openBrowser?url="; //$NON-NLS-1$
+
+	private static final String HREF_BULLET = "bullet"; //$NON-NLS-1$
+
+	private HashMap params;
+
+	private IIntroContentProviderSite site;
+
+	private boolean disposed;
+
+	private String id;
+
+	private List items;
+
+	private Composite parent;
+
+	private FormToolkit toolkit;
+
+	private FormText formText;
+
+	private Image bulletImage;
+
+	private boolean threadRunning = false;
+
+	/**
+	 * Initialize the content provider
+	 * @param site an object which allows rcontainer reflows to be requested
+	 */ 
+	public void init(IIntroContentProviderSite site) {
+		this.site = site;
+		refresh();
+	}
+
+	/**
+	 * Create the html content for this newsreader
+	 * @param id
+	 * @param out a writer where the html will be written
+	 */
+	public void createContent(String id, PrintWriter out) {	
+		if (disposed)
+			return;
+		this.id = id;
+		params = setParams(id);
+
+		
+		if (items==null)
+			createNewsItems();
+		
+		if (items == null || threadRunning) {
+			out.print("<p class=\"status-text\">"); //$NON-NLS-1$
+			out.print(Messages.RSS_Loading);
+			out.println("</p>"); //$NON-NLS-1$
+		} else {
+			if (items.size() > 0) {
+				out.println("<ul id=\"news-feed\" class=\"news-list\">"); //$NON-NLS-1$
+				for (int i = 0; i < items.size(); i++) {
+					NewsItem item = (NewsItem) items.get(i);
+					out.print("<li>"); //$NON-NLS-1$
+					out.print("<a class=\"topicList\" href=\""); //$NON-NLS-1$
+					out.print(createExternalURL(item.url));
+
+					out.print("\">"); //$NON-NLS-1$
+					out.print(item.label);
+					out.print("</a>"); //$NON-NLS-1$
+					out.print("</li>\n"); //$NON-NLS-1$
+				}
+				out.println("</ul>"); //$NON-NLS-1$
+			} else {
+				out.print("<p class=\"status-text\">"); //$NON-NLS-1$
+				out.print(Messages.RSS_No_news_please_visit);
+				out.print(" <a href=\""); //$NON-NLS-1$
+				out.print(createExternalURL(getParameter("no_news_url"))); //$NON-NLS-1$
+				out.print("\">"); //$NON-NLS-1$
+				out.print(getParameter("no_news_text")); //$NON-NLS-1$
+				out.print("</a>"); //$NON-NLS-1$
+				out.println("</p>"); //$NON-NLS-1$
+			}
+			URL url = null;
+			try {
+				url = new URL(getParameter("url")); //$NON-NLS-1$
+			} catch (MalformedURLException e) {
+				IntroPlugin.logError("Bad URL: "+url, e); //$NON-NLS-1$
+			}
+			if (url != null) {
+				out.println("<p><span class=\"rss-feed-link\">"); //$NON-NLS-1$
+				out.println("<a href=\""); //$NON-NLS-1$
+				out.println(createExternalURL(url.toString()));
+				out.println("\">"); //$NON-NLS-1$
+				out.println(Messages.RSS_Subscribe);
+				out.println("</a>"); //$NON-NLS-1$
+				out.println("</span></p>"); //$NON-NLS-1$
+			}
+		}
+	}
+
+	/**
+	 * Create widgets to display the newsreader when using the SWT presentation
+	 */
+	public void createContent(String id, Composite parent, FormToolkit toolkit) {
+		if (disposed)
+			return;
+		this.id = id;
+		params = setParams(id);
+		
+		if (formText == null) {
+			// a one-time pass
+			formText = toolkit.createFormText(parent, true);
+			formText.addHyperlinkListener(new HyperlinkAdapter() {
+				public void linkActivated(HyperlinkEvent e) {
+					doNavigate((String) e.getHref());
+				}
+			});
+			bulletImage = createImage(new Path("icons/arrow.gif")); //$NON-NLS-1$
+			if (bulletImage != null)
+				formText.setImage(HREF_BULLET, bulletImage);
+			this.parent = parent;
+			this.toolkit = toolkit;
+			this.id = id;
+			params = setParams(id);
+
+		}
+
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("<form>"); //$NON-NLS-1$
+		
+		
+		if (items==null)
+			createNewsItems();
+		
+		if (items == null || threadRunning) {
+			buffer.append("<p>"); //$NON-NLS-1$
+			buffer.append(Messages.RSS_Loading);
+			buffer.append("</p>"); //$NON-NLS-1$
+		} else {
+			if (items.size() > 0) {
+				for (int i = 0; i < items.size(); i++) {
+					NewsItem item = (NewsItem) items.get(i);
+					buffer.append("<li style=\"image\" value=\""); //$NON-NLS-1$
+					buffer.append(HREF_BULLET);
+					buffer.append("\">"); //$NON-NLS-1$
+					buffer.append("<a href=\""); //$NON-NLS-1$
+					buffer.append(createExternalURL(item.url));
+					buffer.append("\">"); //$NON-NLS-1$
+					buffer.append(item.label);
+					buffer.append("</a>"); //$NON-NLS-1$
+					buffer.append("</li>"); //$NON-NLS-1$
+
+				}
+			} else {
+
+				buffer.append("<p>"); //$NON-NLS-1$
+				buffer.append(Messages.RSS_No_news);
+				buffer.append("</p>"); //$NON-NLS-1$
+			}
+		}
+
+		buffer.append("</form>"); //$NON-NLS-1$
+		
+		String text = buffer.toString();
+		text = text.replaceAll("&{1}", "&"); //$NON-NLS-1$ //$NON-NLS-2$
+		formText.setText(text, true, false);
+	}
+
+	
+	private String createExternalURL(String url) {
+		try {
+			return INTRO_SHOW_IN_BROWSER + URLEncoder.encode(url, "UTF-8"); //$NON-NLS-1$
+		} catch (UnsupportedEncodingException e) {
+			return INTRO_SHOW_IN_BROWSER + url;
+		} 
+	}
+
+	public void dispose() {
+		if (bulletImage != null) {
+			bulletImage.dispose();
+			bulletImage = null;
+		}
+		disposed = true;
+	}
+
+	/**
+	 * Method is responsible for gathering RSS data.
+	 * 
+	 * Kicks off 2 threads:
+	 * 
+	 * 	The first (ContentThread) is to actually query the feeds URL to find RSS entries.
+	 *  When it finishes, it calls a refresh to display the entires it found (if any).
+	 * 
+	 *  [Esc RATLC00319786]
+	 *  The second (TimeoutThread) waits for SOCKET_TIMEOUT ms to see if the content thread
+	 *  has finished reading RSS.  If it has finished, nothing further happens.  If it has
+	 *  not finished, the TimeoutThread sets the threadRunning boolean to false and refreshes
+	 *  the page (basically telling the UI that no content could be found, and removes
+	 *  the 'Loading...' text).
+	 * 
+	 */
+	private void createNewsItems() {
+		
+		ContentThread contentThread = new ContentThread();
+		contentThread.start();
+		TimeoutThread timeThread = new TimeoutThread();
+		timeThread.start();
+	}
+	
+	/**
+	 * Reflows the page using an UI thread.
+	 */
+	private void refresh()
+	{
+		Thread newsWorker = new Thread(new NewsFeed());
+		newsWorker.start();
+	}
+
+	private Image createImage(IPath path) {
+		Bundle bundle = Platform.getBundle(IntroPlugin.PLUGIN_ID); 
+		URL url = FileLocator.find(bundle, path, null);
+		try {
+			url = FileLocator.toFileURL(url);
+			ImageDescriptor desc = ImageDescriptor.createFromURL(url);
+			return desc.createImage();
+		} catch (IOException e) {
+			return null;
+		}
+	}
+
+	private void doNavigate(final String url) {
+		BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(),
+				new Runnable() {
+					public void run() {
+						IIntroURL introUrl = IntroURLFactory
+								.createIntroURL(url);
+						if (introUrl != null) {
+							// execute the action embedded in the IntroURL
+							introUrl.execute();
+							return;
+						}
+						// delegate to the browser support
+						openBrowser(url);
+					}
+				});
+	}
+
+	private void openBrowser(String href) {
+		try {
+			URL url = new URL(href);
+			IWorkbenchBrowserSupport support = PlatformUI.getWorkbench()
+					.getBrowserSupport();
+			support.getExternalBrowser().openURL(url);
+		} catch (PartInitException e) {
+		} catch (MalformedURLException e) {
+		}
+	}
+
+	static class NewsItem {
+		String label;
+
+		String url;
+
+		void setLabel(String label) {
+			this.label = label;
+		}
+
+		void setUrl(String url) {
+			this.url = url;
+		}
+	}
+
+	class NewsFeed implements Runnable {
+		public void run() {
+			// important: don't do the work if the
+			// part gets disposed in the process
+			if (disposed)
+				return;
+
+			PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+				public void run() {
+					if (parent != null) {
+						// we must recreate the content
+						// for SWT because we will use
+						// a gentle incremental reflow.
+						// HTML reflow will simply reload the page.
+						createContent(id, parent, toolkit);
+//						reflow(formText);
+					}
+					site.reflow(EclipseRSSViewer.this, true);
+				}
+			});
+		}
+	}
+
+	/**
+	 * Handles RSS XML and populates the items list with at most
+	 * MAX_NEWS_ITEMS items.
+	 */
+	private class RSSHandler extends DefaultHandler {
+
+		private static final String ELEMENT_RSS = "rss"; //$NON-NLS-1$
+		private static final String ELEMENT_CHANNEL = "channel"; //$NON-NLS-1$
+		private static final String ELEMENT_ITEM = "item"; //$NON-NLS-1$
+		private static final String ELEMENT_TITLE = "title"; //$NON-NLS-1$
+		private static final String ELEMENT_LINK = "link"; //$NON-NLS-1$
+
+		private Stack stack = new Stack();
+		private StringBuffer buf;
+		private NewsItem item;
+
+		public void startElement(String uri, String localName, String qName,
+				Attributes attributes) throws SAXException {
+			stack.push(qName);
+			// it's a title/link in an item
+			if ((ELEMENT_TITLE.equals(qName) || ELEMENT_LINK.equals(qName))
+					&& (item != null)) {
+				// prepare the buffer; we're expecting chars
+				buf = new StringBuffer();
+			}
+			// it's an item in a channel in rss
+			else if (ELEMENT_ITEM.equals(qName)
+					&& (ELEMENT_CHANNEL.equals(stack.get(1)))
+					&& (ELEMENT_RSS.equals(stack.get(0)))
+					&& (stack.size() == 3)
+					&& (items.size() < Integer
+							.parseInt(getParameter("welcome_items")))) { //$NON-NLS-1$
+
+				// prepare the item
+				item = new NewsItem();
+			}
+		}
+
+		public void endElement(String uri, String localName, String qName)
+				throws SAXException {
+			stack.pop();
+			if (item != null) {
+				if (buf != null) {
+					if (ELEMENT_TITLE.equals(qName)) {
+						item.setLabel(buf.toString().trim());
+						buf = null;
+					} else if (ELEMENT_LINK.equals(qName)) {
+						item.setUrl(buf.toString().trim());
+						buf = null;
+					}
+				} else {
+					if (ELEMENT_ITEM.equals(qName)) {
+						// ensure we have a valid item
+						if (item.label != null && item.label.length() > 0
+								&& item.url != null && item.url.length() > 0) {
+							items.add(item);
+						}
+						item = null;
+					}
+				}
+			}
+		}
+
+		public void characters(char[] ch, int start, int length)
+				throws SAXException {
+			// were we expecting chars?
+			if (buf != null) {
+				buf.append(new String(ch, start, length));
+			}
+		}
+	}
+
+	private HashMap setParams(String query) {
+		HashMap _params = new HashMap();
+		//String[] t = _query.split("?");
+		//String query = t[1];
+		if (query != null && query.length() > 1) {
+			//String qs = query.substring(1);
+			String[] kvPairs = query.split("##"); //$NON-NLS-1$
+			for (int i = 0; i < kvPairs.length; i++) {
+				String[] kv = kvPairs[i].split("=", 2); //$NON-NLS-1$
+				if (kv.length > 1) {
+					_params.put(kv[0], kv[1]);
+				} else {
+					_params.put(kv[0], ""); //$NON-NLS-1$
+				}
+			}
+		}
+		return _params;
+	}
+
+	private String getParameter(String name) {
+		return (String) params.get(name);
+	}
+	
+	private class ContentThread extends Thread{
+
+		public void run()
+		{
+			threadRunning = true;
+			items = Collections.synchronizedList(new ArrayList());
+
+			InputStream in = null;
+
+			try {
+				IntroPlugin.logDebug("Open Connection: "+getParameter("url")); //$NON-NLS-1$ //$NON-NLS-2$
+				URL url = new URL(getParameter("url")); //$NON-NLS-1$
+				URLConnection conn = url.openConnection();
+
+				// set connection timeout to 6 seconds
+				setTimeout(conn, SOCKET_TIMEOUT); // Connection timeout to 6 seconds
+				conn.connect();
+				in = url.openStream();
+				SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
+				parser.parse(in, new RSSHandler());
+				refresh();
+				
+			} catch (Exception e) {
+				IntroPlugin.logError(
+						NLS.bind(
+								Messages.RSS_Malformed_feed, 
+								getParameter("url"))); //$NON-NLS-1$
+				refresh();
+			} finally {
+				try {
+					if (in != null) {
+						in.close();
+					}
+				} catch (IOException e) {
+				}
+				threadRunning = false;
+			}
+
+		}
+
+		private void setTimeout(URLConnection conn, int milliseconds) {
+			Class conClass = conn.getClass();
+			try {
+				Method timeoutMethod = conClass.getMethod(
+						"setConnectTimeout", new Class[]{ int.class } ); //$NON-NLS-1$
+				timeoutMethod.invoke(conn, new Object[] { new Integer(milliseconds)} );
+			} catch (Exception e) {
+			     // If running on a 1.4 JRE an exception is expected, fall through
+			} 
+		}
+	}
+	
+	private class TimeoutThread extends Thread
+	{
+		public void run()
+		{
+			try{
+				Thread.sleep(SOCKET_TIMEOUT);
+			}catch(Exception ex){
+				IntroPlugin.logError("Timeout failed.", ex); //$NON-NLS-1$
+			}
+			if (threadRunning)
+			{
+				threadRunning = false;
+				refresh();
+			}
+		}
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/.settings/.api_filters b/eclipse/plugins/org.eclipse.ui.navigator.resources/.settings/.api_filters
index bcfb5f8..813ebc0 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/.settings/.api_filters
@@ -1,38 +1,33 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <component id="org.eclipse.ui.navigator.resources" version="2">
-    <resource path="src/org/eclipse/ui/navigator/resources/ProjectExplorer.java" type="org.eclipse.ui.navigator.resources.ProjectExplorer">
-        <filter id="642777099">
+    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider">
+        <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
+                <message_argument value="WorkingSetActionProvider"/>
                 <message_argument value="setWorkingSetLabel(String)"/>
             </message_arguments>
         </filter>
-        <filter id="642777099">
-            <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="getWorkingSetLabel()"/>
-            </message_arguments>
-        </filter>
-        <filter id="642777099">
+        <filter id="640712815">
             <message_arguments>
-                <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="getRootMode()"/>
+                <message_argument value="CommonViewer"/>
+                <message_argument value="WorkingSetActionProvider"/>
+                <message_argument value="getFrameList()"/>
             </message_arguments>
         </filter>
-        <filter id="642777099">
+    </resource>
+    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$WorkingSetManagerListener">
+        <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonNavigator"/>
-                <message_argument value="ProjectExplorer"/>
-                <message_argument value="setRootMode(int)"/>
+                <message_argument value="WorkingSetManagerListener"/>
+                <message_argument value="setWorkingSetLabel(String)"/>
             </message_arguments>
         </filter>
         <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonViewer"/>
-                <message_argument value="ProjectExplorer"/>
+                <message_argument value="WorkingSetManagerListener"/>
                 <message_argument value="getFrameList()"/>
             </message_arguments>
         </filter>
@@ -61,36 +56,49 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java" type="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$WorkingSetManagerListener">
+    <resource path="src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java" type="org.eclipse.ui.navigator.resources.GoIntoActionProvider">
         <filter id="640712815">
             <message_arguments>
                 <message_argument value="CommonViewer"/>
-                <message_argument value="WorkingSetManagerListener"/>
+                <message_argument value="GoIntoActionProvider"/>
                 <message_argument value="getFrameList()"/>
             </message_arguments>
         </filter>
+    </resource>
+    <resource path="src/org/eclipse/ui/navigator/resources/ProjectExplorer.java" type="org.eclipse.ui.navigator.resources.ProjectExplorer">
         <filter id="640712815">
             <message_arguments>
+                <message_argument value="CommonViewer"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getFrameList()"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
+            <message_arguments>
                 <message_argument value="CommonNavigator"/>
-                <message_argument value="WorkingSetManagerListener"/>
-                <message_argument value="setWorkingSetLabel(String)"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getRootMode()"/>
             </message_arguments>
         </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java" type="org.eclipse.ui.internal.navigator.resources.actions.TextActionHandler">
-        <filter id="571473929">
+        <filter id="642777099">
+            <message_arguments>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="getWorkingSetLabel()"/>
+            </message_arguments>
+        </filter>
+        <filter id="642777099">
             <message_arguments>
-                <message_argument value="TextActionHandler"/>
-                <message_argument value="TextActionHandler"/>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="setRootMode(int)"/>
             </message_arguments>
         </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java" type="org.eclipse.ui.navigator.resources.GoIntoActionProvider">
-        <filter id="640712815">
+        <filter id="642777099">
             <message_arguments>
-                <message_argument value="CommonViewer"/>
-                <message_argument value="GoIntoActionProvider"/>
-                <message_argument value="getFrameList()"/>
+                <message_argument value="CommonNavigator"/>
+                <message_argument value="ProjectExplorer"/>
+                <message_argument value="setWorkingSetLabel(String)"/>
             </message_arguments>
         </filter>
     </resource>
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
index 0ad3c6a..d6ba6e7 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.navigator.resources; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.4.202.qualifier
 Bundle-Activator: org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
@@ -12,13 +12,15 @@ Export-Package: org.eclipse.ui.internal.navigator.resources;x-internal:=true,
  org.eclipse.ui.internal.navigator.resources.workbench;x-internal:=true,
  org.eclipse.ui.internal.navigator.workingsets;x-internal:=true,
  org.eclipse.ui.navigator.resources
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.navigator;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
+Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.jface;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.navigator;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.ui.views.properties.tabbed;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)"
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
+ org.eclipse.ltk.ui.refactoring;bundle-version="[3.5.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.properties b/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.properties
index aaf4430..7bfc3e3 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2003, 2009 IBM Corporation and others.
+# Copyright (c) 2003, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -22,5 +22,7 @@ filters.endsWithClass.name=*.class resources
 filters.endsWithClass.description=Hides resources that end with ".class"
 filters.closedProject.name=Closed projects
 filters.closedProject.description=Hides closed projects
+filters.workingSet.name=Working sets [not visible in UI]
+filters.workingSet.description=Hides unselected working sets [not visible in UI]
 
 Resource=Resource
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.xml b/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.xml
index 37043e0..f7789cb 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/plugin.xml
@@ -16,6 +16,7 @@
    <extension
          point="org.eclipse.ui.navigator.viewer">
        <viewer
+             helpContext="org.eclipse.ui.project_explorer_context"
              viewerId="org.eclipse.ui.navigator.ProjectExplorer">
           <popupMenu
                 allowsPlatformContributions="true"
@@ -48,6 +49,12 @@
                    separator="true"/>
              
           </popupMenu>
+          <options>
+             <property
+                   name="org.eclipse.ui.navigator.customizeViewDialogHelpContext"
+                   value="org.eclipse.ui.project_explorer_customization_dialog">
+             </property>
+          </options>
        </viewer>
        <viewerContentBinding 
              viewerId="org.eclipse.ui.navigator.ProjectExplorer">
@@ -83,7 +90,6 @@
             id="org.eclipse.ui.navigator.resourceContent">         
          <enablement>
 		         <or>         
-		            <adapt type="org.eclipse.core.resources.IProject" /> 
 		            <instanceof 
 		                  	value="org.eclipse.core.resources.IResource" /> 
 		         </or>
@@ -283,6 +289,15 @@
 	        </and>
          </filterExpression>
       </commonFilter>
+      <commonFilter
+            id="org.eclipse.ui.navigator.resources.filters.workingSet"
+            name="%filters.workingSet.name"
+            description="%filters.workingSet.description" 
+            class="org.eclipse.ui.ResourceWorkingSetFilter" 
+            activeByDefault="false"
+            visibleInUI="false"
+           >
+      </commonFilter>
       <actionProvider
             class="org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider"
             id="org.eclipse.ui.navigator.resources.WorkingSetActions">
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
index e237446..7216f96 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,8 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionGroup;
 import org.eclipse.ui.actions.DeleteResourceAction;
+import org.eclipse.ui.actions.TextActionHandler;
+import org.eclipse.ui.ide.ResourceSelectionUtil;
 import org.eclipse.ui.navigator.ICommonMenuConstants;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
index 3561746..ad83bcf 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     mark.melvin at onsemi.com - bug 288997 [CommonNavigator] Double-clicking an adapted resource in 
+ *        Common Navigator does not open underlying IFile
  *******************************************************************************/
 package org.eclipse.ui.internal.navigator.resources.actions;
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
index f25a5c1..c00a61f 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,6 +25,7 @@ import org.eclipse.ui.actions.ActionFactory;
 import org.eclipse.ui.actions.ActionGroup;
 import org.eclipse.ui.actions.MoveResourceAction;
 import org.eclipse.ui.actions.RenameResourceAction;
+import org.eclipse.ui.ide.ResourceSelectionUtil;
 import org.eclipse.ui.navigator.ICommonMenuConstants;
 
 /**
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java
deleted file mode 100644
index d708ad6..0000000
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.navigator.resources.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-/**
- * Provides utilities for checking the validity of selections.
- * <p>
- * This class provides static methods only; it is not intended to be instantiated
- * or subclassed.
- * @since 2.0
- * </p>
- */
-public class ResourceSelectionUtil {
-    /* (non-Javadoc)
-     * Private constructor to block instantiation.
-     */
-    private ResourceSelectionUtil() {
-    }
-
-    /**
-     * Returns whether the types of the resources in the given selection are among 
-     * the specified resource types.
-     * 
-     * @param selection the selection
-     * @param resourceMask resource mask formed by bitwise OR of resource type
-     *   constants (defined on <code>IResource</code>)
-     * @return <code>true</code> if all selected elements are resources of the right
-     *  type, and <code>false</code> if at least one element is either a resource
-     *  of some other type or a non-resource
-     * @see IResource#getType()
-     */
-    public static boolean allResourcesAreOfType(IStructuredSelection selection,
-            int resourceMask) {
-        Iterator resources = selection.iterator();
-        while (resources.hasNext()) {
-            Object next = resources.next();
-            if (!(next instanceof IResource)) {
-				return false;
-			}
-            if (!resourceIsType((IResource) next, resourceMask)) {
-				return false;
-			}
-        }
-        return true;
-    }
-
-    /**
-     * Returns the selection adapted to IResource. Returns null
-     * if any of the entries are not adaptable.
-     * 
-     * @param selection the selection
-     * @param resourceMask resource mask formed by bitwise OR of resource type
-     *   constants (defined on <code>IResource</code>)
-     * @return IStructuredSelection or null if any of the entries are not adaptable.
-     * @see IResource#getType()
-     */
-    public static IStructuredSelection allResources(
-            IStructuredSelection selection, int resourceMask) {
-        Iterator adaptables = selection.iterator();
-        List result = new ArrayList();
-        while (adaptables.hasNext()) {
-            Object next = adaptables.next();
-            if (next instanceof IAdaptable) {
-                Object resource = ((IAdaptable) next)
-                        .getAdapter(IResource.class);
-                if (resource == null) {
-					return null;
-				} else if (resourceIsType((IResource) resource, resourceMask)) {
-					result.add(resource);
-				}
-            } else {
-				return null;
-			}
-        }
-        return new StructuredSelection(result);
-
-    }
-
-    /**
-     * Returns whether the type of the given resource is among the specified 
-     * resource types.
-     * 
-     * @param resource the resource
-     * @param resourceMask resource mask formed by bitwise OR of resource type
-     *   constants (defined on <code>IResource</code>)
-     * @return <code>true</code> if the resources has a matching type, and 
-     *   <code>false</code> otherwise
-     * @see IResource#getType()
-     */
-    public static boolean resourceIsType(IResource resource, int resourceMask) {
-        return (resource.getType() & resourceMask) != 0;
-    }
-
-}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java
deleted file mode 100644
index 33b194f..0000000
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/TextActionHandler.java
+++ /dev/null
@@ -1,565 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.ui.internal.navigator.resources.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.MouseAdapter;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-
-/**
- * Handles the redirection of the global Cut, Copy, Paste, and
- * Select All actions to either the current inline text control
- * or the part's supplied action handler.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p><p>
- * Example usage:
- * <pre>
- * textActionHandler = new TextActionHandler(this.getViewSite().getActionBars());
- * textActionHandler.addText((Text)textCellEditor1.getControl());
- * textActionHandler.addText((Text)textCellEditor2.getControl());
- * textActionHandler.setSelectAllAction(selectAllAction);
- * </pre>
- * </p>
- */
-public class TextActionHandler extends org.eclipse.ui.actions.TextActionHandler {
-    private DeleteActionHandler textDeleteAction = new DeleteActionHandler();
-
-    private CutActionHandler textCutAction = new CutActionHandler();
-
-    private CopyActionHandler textCopyAction = new CopyActionHandler();
-
-    private PasteActionHandler textPasteAction = new PasteActionHandler();
-
-    private SelectAllActionHandler textSelectAllAction = new SelectAllActionHandler();
-
-    private IAction deleteAction;
-
-    private IAction cutAction;
-
-    private IAction copyAction;
-
-    private IAction pasteAction;
-
-    private IAction selectAllAction;
-
-    private IPropertyChangeListener deleteActionListener = new PropertyChangeListener(
-            textDeleteAction);
-
-    private IPropertyChangeListener cutActionListener = new PropertyChangeListener(
-            textCutAction);
-
-    private IPropertyChangeListener copyActionListener = new PropertyChangeListener(
-            textCopyAction);
-
-    private IPropertyChangeListener pasteActionListener = new PropertyChangeListener(
-            textPasteAction);
-
-    private IPropertyChangeListener selectAllActionListener = new PropertyChangeListener(
-            textSelectAllAction);
-
-    private Listener textControlListener = new TextControlListener();
-
-    private Text activeTextControl;
-
-    private MouseAdapter mouseAdapter = new MouseAdapter() {
-        public void mouseUp(MouseEvent e) {
-            updateActionsEnableState();
-        }
-    };
-
-    private KeyAdapter keyAdapter = new KeyAdapter() {
-        public void keyReleased(KeyEvent e) {
-            updateActionsEnableState();
-        }
-    };
-
-	private IActionBars actionBars;
-
-    private class TextControlListener implements Listener {
-        public void handleEvent(Event event) {
-            switch (event.type) {
-            case SWT.Activate:
-                activeTextControl = (Text) event.widget;
-                updateActionsEnableState();
-                break;
-            case SWT.Deactivate:
-                activeTextControl = null;
-                updateActionsEnableState();
-                break;
-            default:
-                break;
-            }
-        }
-    }
-
-    private class PropertyChangeListener implements IPropertyChangeListener {
-        private IAction actionHandler;
-
-        protected PropertyChangeListener(IAction actionHandler) {
-            super();
-            this.actionHandler = actionHandler;
-        }
-
-        public void propertyChange(PropertyChangeEvent event) {
-            if (activeTextControl != null) {
-				return;
-			}
-            if (event.getProperty().equals(IAction.ENABLED)) {
-                Boolean bool = (Boolean) event.getNewValue();
-                actionHandler.setEnabled(bool.booleanValue());
-            }
-        }
-    }
-
-    private class DeleteActionHandler extends Action {
-        protected DeleteActionHandler() {
-            super("Delete"); // TODO IDEWorkbenchMessages.Delete); //$NON-NLS-1$
-            setId("TextDeleteActionHandler");//$NON-NLS-1$
-            setEnabled(false);
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "DeleteHelpId"); //$NON-NLS-1$
-					// TODO IIDEHelpContextIds.TEXT_DELETE_ACTION);
-        }
-
-        public void runWithEvent(Event event) {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-				String text = activeTextControl.getText();
-				Point selection = activeTextControl.getSelection();
-				if (selection.y == selection.x) {
-					++selection.y;
-				}
-				if (selection.y > text.length()) {
-					return;
-				}
-				StringBuffer buf = new StringBuffer(text.substring(0,
-						selection.x));
-				buf.append(text.substring(selection.y));
-				activeTextControl.setText(buf.toString());
-				activeTextControl.setSelection(selection.x, selection.x);
-				updateActionsEnableState();
-				return;
-			}
-            if (deleteAction != null) {
-                deleteAction.runWithEvent(event);
-                return;
-            }
-        }
-
-        /**
-         * Update state.
-         */
-        public void updateEnabledState() {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                setEnabled(activeTextControl.getSelectionCount() > 0
-                        || activeTextControl.getCaretPosition() < activeTextControl
-                                .getCharCount());
-                return;
-            }
-            if (deleteAction != null) {
-                setEnabled(deleteAction.isEnabled());
-                return;
-            }
-            setEnabled(false);
-        }
-    }
-
-    private class CutActionHandler extends Action {
-        protected CutActionHandler() {
-            super("Cut"); // TODO IDEWorkbenchMessages.Cut); //$NON-NLS-1$
-            setId("TextCutActionHandler");//$NON-NLS-1$
-            setEnabled(false);
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "CutHelpId"); //$NON-NLS-1$
-					// TODO IIDEHelpContextIds.TEXT_CUT_ACTION);
-        }
-
-        public void runWithEvent(Event event) {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                activeTextControl.cut();
-                updateActionsEnableState();
-                return;
-            }
-            if (cutAction != null) {
-                cutAction.runWithEvent(event);
-                return;
-            }
-        }
-
-        /**
-         * Update state.
-         */
-        public void updateEnabledState() {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                setEnabled(activeTextControl.getSelectionCount() > 0);
-                return;
-            }
-            if (cutAction != null) {
-                setEnabled(cutAction.isEnabled());
-                return;
-            }
-            setEnabled(false);
-        }
-    }
-
-    private class CopyActionHandler extends Action {
-        protected CopyActionHandler() {
-            super("Copy"); // TODO IDEWorkbenchMessages.Copy); //$NON-NLS-1$
-            setId("TextCopyActionHandler");//$NON-NLS-1$
-            setEnabled(false);
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "CopyHelpId"); //$NON-NLS-1$
-					// TODO IIDEHelpContextIds.TEXT_COPY_ACTION);
-        }
-
-        public void runWithEvent(Event event) {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                activeTextControl.copy();
-                updateActionsEnableState();
-                return;
-            }
-            if (copyAction != null) {
-                copyAction.runWithEvent(event);
-                return;
-            }
-        }
-
-        /**
-         * Update the state.
-         */
-        public void updateEnabledState() {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                setEnabled(activeTextControl.getSelectionCount() > 0);
-                return;
-            }
-            if (copyAction != null) {
-                setEnabled(copyAction.isEnabled());
-                return;
-            }
-            setEnabled(false);
-        }
-    }
-
-    private class PasteActionHandler extends Action {
-        protected PasteActionHandler() {
-            super("Paste"); // TODO IDEWorkbenchMessages.Paste); //$NON-NLS-1$
-            setId("TextPasteActionHandler");//$NON-NLS-1$
-            setEnabled(false);
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "PasteHelpId"); //$NON-NLS-1$
-					// TODO IIDEHelpContextIds.TEXT_PASTE_ACTION);
-        }
-
-        public void runWithEvent(Event event) {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                activeTextControl.paste();
-                updateActionsEnableState();
-                return;
-            }
-            if (pasteAction != null) {
-                pasteAction.runWithEvent(event);
-                return;
-            }
-        }
-
-        /**
-         * Update the state
-         */
-        public void updateEnabledState() {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                setEnabled(true);
-                return;
-            }
-            if (pasteAction != null) {
-                setEnabled(pasteAction.isEnabled());
-                return;
-            }
-            setEnabled(false);
-        }
-    }
-
-    private class SelectAllActionHandler extends Action {
-        protected SelectAllActionHandler() {
-            super("Select All"); // TODO IDEWorkbenchMessages.TextAction_selectAll); //$NON-NLS-1$
-            setId("TextSelectAllActionHandler");//$NON-NLS-1$
-            setEnabled(false);
-            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, "SelectAllHelpId"); //$NON-NLS-1$
-					// TODO IIDEHelpContextIds.TEXT_SELECT_ALL_ACTION);
-        }
-
-        public void runWithEvent(Event event) {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                activeTextControl.selectAll();
-                updateActionsEnableState();
-                return;
-            }
-            if (selectAllAction != null) {
-                selectAllAction.runWithEvent(event);
-                return;
-            }
-        }
-
-        /**
-         * Update the state.
-         */
-        public void updateEnabledState() {
-            if (activeTextControl != null && !activeTextControl.isDisposed()) {
-                setEnabled(true);
-                return;
-            }
-            if (selectAllAction != null) {
-                setEnabled(selectAllAction.isEnabled());
-                return;
-            }
-            setEnabled(false);
-        }
-    }
-
-    /**
-     * Creates a <code>Text</code> control action handler
-     * for the global Cut, Copy, Paste, Delete, and Select All 
-     * of the action bar.
-     *
-     * @param theActionBars the action bar to register global
-     *    action handlers for Cut, Copy, Paste, Delete, 
-     * 	  and Select All
-     */
-    public TextActionHandler(IActionBars theActionBars) {
-        super(theActionBars);
-        actionBars = theActionBars;
-        updateActionBars();
-    }
-
-    /**
-	 * 
-	 */
-	public void updateActionBars() {
-		actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(),
-                textCutAction);
-		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
-                textCopyAction);
-		actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
-                textPasteAction);
-		actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
-                textSelectAllAction);
-		actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
-                textDeleteAction);
-	}
-
-	/**
-     * Add a <code>Text</code> control to the handler
-     * so that the Cut, Copy, Paste, Delete, and Select All 
-     * actions are redirected to it when active.
-     *
-     * @param textControl the inline <code>Text</code> control
-     */
-    public void addText(Text textControl) {
-        if (textControl == null) {
-			return;
-		}
-
-        activeTextControl = textControl;
-        textControl.addListener(SWT.Activate, textControlListener);
-        textControl.addListener(SWT.Deactivate, textControlListener);
-
-        // We really want a selection listener but it is not supported so we
-        // use a key listener and a mouse listener to know when selection changes
-        // may have occured
-        textControl.addKeyListener(keyAdapter);
-        textControl.addMouseListener(mouseAdapter);
-
-    }
-
-    /**
-     * Dispose of this action handler
-     */
-    public void dispose() {
-        setCutAction(null);
-        setCopyAction(null);
-        setPasteAction(null);
-        setSelectAllAction(null);
-        setDeleteAction(null);
-    }
-
-    /**
-     * Removes a <code>Text</code> control from the handler
-     * so that the Cut, Copy, Paste, Delete, and Select All 
-     * actions are no longer redirected to it when active.
-     *
-     * @param textControl the inline <code>Text</code> control
-     */
-    public void removeText(Text textControl) {
-        if (textControl == null) {
-			return;
-		}
-
-        textControl.removeListener(SWT.Activate, textControlListener);
-        textControl.removeListener(SWT.Deactivate, textControlListener);
-
-        textControl.removeMouseListener(mouseAdapter);
-        textControl.removeKeyListener(keyAdapter);
-
-        activeTextControl = null;
-        updateActionsEnableState();
-    }
-
-    /**
-     * Set the default <code>IAction</code> handler for the Copy
-     * action. This <code>IAction</code> is run only if no active
-     * inline text control.
-     *
-     * @param action the <code>IAction</code> to run for the
-     *    Copy action, or <code>null</code> if not interested.
-     */
-    public void setCopyAction(IAction action) {
-        if (copyAction == action) {
-			return;
-		}
-
-        if (copyAction != null) {
-			copyAction.removePropertyChangeListener(copyActionListener);
-		}
-
-        copyAction = action;
-
-        if (copyAction != null) {
-			copyAction.addPropertyChangeListener(copyActionListener);
-		}
-
-        textCopyAction.updateEnabledState();
-    }
-
-    /**
-     * Set the default <code>IAction</code> handler for the Cut
-     * action. This <code>IAction</code> is run only if no active
-     * inline text control.
-     *
-     * @param action the <code>IAction</code> to run for the
-     *    Cut action, or <code>null</code> if not interested.
-     */
-    public void setCutAction(IAction action) {
-        if (cutAction == action) {
-			return;
-		}
-
-        if (cutAction != null) {
-			cutAction.removePropertyChangeListener(cutActionListener);
-		}
-
-        cutAction = action;
-
-        if (cutAction != null) {
-			cutAction.addPropertyChangeListener(cutActionListener);
-		}
-
-        textCutAction.updateEnabledState();
-    }
-
-    /**
-     * Set the default <code>IAction</code> handler for the Paste
-     * action. This <code>IAction</code> is run only if no active
-     * inline text control.
-     *
-     * @param action the <code>IAction</code> to run for the
-     *    Paste action, or <code>null</code> if not interested.
-     */
-    public void setPasteAction(IAction action) {
-        if (pasteAction == action) {
-			return;
-		}
-
-        if (pasteAction != null) {
-			pasteAction.removePropertyChangeListener(pasteActionListener);
-		}
-
-        pasteAction = action;
-
-        if (pasteAction != null) {
-			pasteAction.addPropertyChangeListener(pasteActionListener);
-		}
-
-        textPasteAction.updateEnabledState();
-    }
-
-    /**
-     * Set the default <code>IAction</code> handler for the Select All
-     * action. This <code>IAction</code> is run only if no active
-     * inline text control.
-     *
-     * @param action the <code>IAction</code> to run for the
-     *    Select All action, or <code>null</code> if not interested.
-     */
-    public void setSelectAllAction(IAction action) {
-        if (selectAllAction == action) {
-			return;
-		}
-
-        if (selectAllAction != null) {
-			selectAllAction
-                    .removePropertyChangeListener(selectAllActionListener);
-		}
-
-        selectAllAction = action;
-
-        if (selectAllAction != null) {
-			selectAllAction.addPropertyChangeListener(selectAllActionListener);
-		}
-
-        textSelectAllAction.updateEnabledState();
-    }
-
-    /**
-     * Set the default <code>IAction</code> handler for the Delete
-     * action. This <code>IAction</code> is run only if no active
-     * inline text control.
-     *
-     * @param action the <code>IAction</code> to run for the
-     *    Delete action, or <code>null</code> if not interested.
-     */
-    public void setDeleteAction(IAction action) {
-        if (deleteAction == action) {
-			return;
-		}
-
-        if (deleteAction != null) {
-			deleteAction.removePropertyChangeListener(deleteActionListener);
-		}
-
-        deleteAction = action;
-
-        if (deleteAction != null) {
-			deleteAction.addPropertyChangeListener(deleteActionListener);
-		}
-
-        textDeleteAction.updateEnabledState();
-    }
-
-    /**
-     * Update the enable state of the Cut, Copy,
-     * Paste, Delete, and Select All action handlers
-     */
-    private void updateActionsEnableState() {
-        textCutAction.updateEnabledState();
-        textCopyAction.updateEnabledState();
-        textPasteAction.updateEnabledState();
-        textSelectAllAction.updateEnabledState();
-        textDeleteAction.updateEnabledState();
-    }
-}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
index 9b20547..27604b9 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,11 @@
 package org.eclipse.ui.internal.navigator.resources.actions;
 
 import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.ui.IActionBars;
 import org.eclipse.ui.IAggregateWorkingSet;
 import org.eclipse.ui.IMemento;
@@ -25,7 +28,9 @@ import org.eclipse.ui.IWorkingSetManager;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ResourceWorkingSetFilter;
 import org.eclipse.ui.actions.WorkingSetFilterActionGroup;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
 import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMessages;
+import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin;
 import org.eclipse.ui.internal.navigator.workingsets.WorkingSetsContentProvider;
 import org.eclipse.ui.navigator.CommonActionProvider;
 import org.eclipse.ui.navigator.CommonViewer;
@@ -42,12 +47,16 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 	private static final String TAG_CURRENT_WORKING_SET_NAME = "currentWorkingSetName"; //$NON-NLS-1$
 
+	private static final String WORKING_SET_FILTER_ID = "org.eclipse.ui.navigator.resources.filters.workingSet"; //$NON-NLS-1$
+	
 	private boolean contributedToViewMenu = false;
 
 	private CommonViewer viewer;
 
 	private INavigatorContentService contentService;
 
+	private NavigatorFilterService filterService;
+	
 	private WorkingSetFilterActionGroup workingSetActionGroup;
 	private WorkingSetRootModeActionGroup workingSetRootModeActionGroup;
 
@@ -55,13 +64,12 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 	private IExtensionStateModel extensionStateModel;
 
-	private final ResourceWorkingSetFilter workingSetFilter = new ResourceWorkingSetFilter();
-	private boolean filterAdded;
-
 	private boolean emptyWorkingSet;
 	private IWorkingSet workingSet;
 
 	private IPropertyChangeListener topLevelModeListener;
+	
+	private boolean ignoreFilterChangeEvents;
 
 	/**
 	 * Provides a smart listener to monitor changes to the Working Set Manager.
@@ -71,13 +79,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 		private boolean listening = false;
 
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org
-		 * .eclipse.jface.util.PropertyChangeEvent)
-		 */
 		public void propertyChange(PropertyChangeEvent event) {
 			String property = event.getProperty();
 			Object newValue = event.getNewValue();
@@ -94,7 +95,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 					// act as if the working set has been made null
 					if (!emptyWorkingSet) {
 						emptyWorkingSet = true;
-						workingSetFilter.setWorkingSet(null);
+						setWorkingSetFilter(null);
 						newLabel = null;
 					}
 				} else {
@@ -102,7 +103,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 					// Restore it.
 					if (emptyWorkingSet) {
 						emptyWorkingSet = false;
-						workingSetFilter.setWorkingSet(workingSet);
+						setWorkingSetFilter(workingSet);
 						newLabel = workingSet.getLabel();
 					}
 				}
@@ -138,6 +139,10 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 	private IPropertyChangeListener filterChangeListener = new IPropertyChangeListener() {
 		public void propertyChange(PropertyChangeEvent event) {
+			
+			if (ignoreFilterChangeEvents)
+				return;
+			
 			IWorkingSet newWorkingSet = (IWorkingSet) event.getNewValue();
 
 			setWorkingSet(newWorkingSet);
@@ -185,7 +190,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 						if (savedWorkingSet != null) {
 							setWorkingSet(savedWorkingSet);
-							workingSetActionGroup.setWorkingSet(savedWorkingSet);
 						}
 						managerChangeListener.listen();
 
@@ -194,7 +198,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 						setWorkingSet(null);
 						viewer.getCommonNavigator().setWorkingSetLabel(null);
 						managerChangeListener.ignore();
-						workingSetActionGroup.setWorkingSet(null);
 						workingSetRootModeActionGroup.setShowTopLevelWorkingSets(false);
 						extensionStateModel.removePropertyChangeListener(topLevelModeListener);
 
@@ -205,16 +208,10 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 	};
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator
-	 * .ICommonActionExtensionSite)
-	 */
 	public void init(ICommonActionExtensionSite aSite) {
 		viewer = (CommonViewer) aSite.getStructuredViewer();
 		contentService = aSite.getContentService();
+		filterService = (NavigatorFilterService) contentService.getFilterService();
 
 		extensionStateModel = contentService.findStateModel(WorkingSetsContentProvider.EXTENSION_ID);
 
@@ -234,7 +231,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 		}
 
 		contentService.getActivationService().addExtensionActivationListener(activationListener);
-
 	}
 
 	/**
@@ -253,10 +249,38 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 		}
 
 		if (workingSet != null) {
-			workingSetFilter.setWorkingSet(workingSet);
-			internalSetWorkingSet(workingSet);
-			workingSetActionGroup.setWorkingSet(workingSet);
+			setWorkingSet(workingSet);
+		}
+	}
+
+	private void setWorkingSetFilter(IWorkingSet workingSet) {
+		setWorkingSetFilter(workingSet, FIRST_TIME);
+	}
+	
+	private static final boolean FIRST_TIME = true;
+	
+	private void setWorkingSetFilter(IWorkingSet workingSet, boolean firstTime) {
+		ResourceWorkingSetFilter workingSetFilter = null;
+		ViewerFilter[] filters = viewer.getFilters();
+		for (int i = 0; i < filters.length; i++) {
+			if (filters[i] instanceof ResourceWorkingSetFilter) {
+				workingSetFilter = (ResourceWorkingSetFilter) filters[i];
+				break;
+			}
+		}
+		if (workingSetFilter == null) {
+			if (firstTime) {
+				filterService.addActiveFilterIds(new String[] { WORKING_SET_FILTER_ID });
+				filterService.updateViewer();
+				setWorkingSetFilter(workingSet, !FIRST_TIME);
+				return;
+			}
+			WorkbenchNavigatorPlugin.log("Required filter " + WORKING_SET_FILTER_ID +  //$NON-NLS-1$
+					" is not present. Working set support will not function correctly.",   //$NON-NLS-1$
+				new Status(IStatus.ERROR, WorkbenchNavigatorPlugin.PLUGIN_ID, ""));  //$NON-NLS-1$
+			return;
 		}
+		workingSetFilter.setWorkingSet(emptyWorkingSet ? null : workingSet);
 	}
 
 	/**
@@ -266,25 +290,26 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 	 *            working set to be activated, may be <code>null</code>
 	 */
 	protected void setWorkingSet(IWorkingSet workingSet) {
-		internalSetWorkingSet(workingSet);
-
-		workingSetFilter.setWorkingSet(emptyWorkingSet ? null : workingSet);
+		this.workingSet = workingSet;
+		emptyWorkingSet = workingSet != null && workingSet.isAggregateWorkingSet() && workingSet.isEmpty();
 
+        ignoreFilterChangeEvents = true;
+        try {
+        	workingSetActionGroup.setWorkingSet(workingSet);
+        } finally {
+        	ignoreFilterChangeEvents = false;
+       	}		
+		
 		if (viewer != null) {
+			setWorkingSetFilter(workingSet);
 			if (workingSet == null || emptyWorkingSet
 					|| !extensionStateModel.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS)) {
 				if (viewer.getInput() != originalViewerInput) {
 					viewer.setInput(originalViewerInput);
-				}
-				if (!filterAdded) {
-					viewer.addFilter(workingSetFilter);
-					filterAdded = true;
 				} else {
 					viewer.refresh();
 				}
 			} else {
-				viewer.removeFilter(workingSetFilter);
-				filterAdded = false;
 				if (!workingSet.isAggregateWorkingSet()) {
 					IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
 					viewer.setInput(workingSetManager.createAggregateWorkingSet(
@@ -296,47 +321,34 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 		}
 	}
 
-	private void internalSetWorkingSet(IWorkingSet workingSet) {
-		this.workingSet = workingSet;
-		emptyWorkingSet = workingSet != null && workingSet.isAggregateWorkingSet() && workingSet.isEmpty();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ui.navigator.CommonActionProvider#restoreState(org.eclipse
-	 * .ui.IMemento)
-	 */
-	public void restoreState(IMemento aMemento) {
+	public void restoreState(final IMemento aMemento) {
 		super.restoreState(aMemento);
 
-		boolean showWorkingSets = true;
-		if (aMemento != null) {
-			Integer showWorkingSetsInt = aMemento.getInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS);
-			showWorkingSets = showWorkingSetsInt == null || showWorkingSetsInt.intValue() == 1;
-			extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
-					showWorkingSets);
-			workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
-
-			String lastWorkingSetName = aMemento.getString(TAG_CURRENT_WORKING_SET_NAME);
-			initWorkingSetFilter(lastWorkingSetName);
-		} else {
-			showWorkingSets = false;
-
-			extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
-					showWorkingSets);
-			workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
-		}
+		// Need to run this async to avoid being reentered when processing a selection change
+		viewer.getControl().getShell().getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				boolean showWorkingSets = true;
+				if (aMemento != null) {
+					Integer showWorkingSetsInt = aMemento
+							.getInteger(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS);
+					showWorkingSets = showWorkingSetsInt == null || showWorkingSetsInt.intValue() == 1;
+					extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
+							showWorkingSets);
+					workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
+
+					String lastWorkingSetName = aMemento.getString(TAG_CURRENT_WORKING_SET_NAME);
+					initWorkingSetFilter(lastWorkingSetName);
+				} else {
+					showWorkingSets = false;
+
+					extensionStateModel.setBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
+							showWorkingSets);
+					workingSetRootModeActionGroup.setShowTopLevelWorkingSets(showWorkingSets);
+				}
+			}
+		});
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ui.navigator.CommonActionProvider#saveState(org.eclipse.ui
-	 * .IMemento)
-	 */
 	public void saveState(IMemento aMemento) {
 		super.saveState(aMemento);
 
@@ -352,13 +364,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars
-	 * )
-	 */
 	public void fillActionBars(IActionBars actionBars) {
 		if (!contributedToViewMenu) {
 			try {
@@ -373,11 +378,6 @@ public class WorkingSetActionProvider extends CommonActionProvider {
 		}
 	}
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.ui.actions.ActionGroup#dispose()
-	 */
 	public void dispose() {
 		super.dispose();
 		workingSetActionGroup.dispose();
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
index 35dfac6..ef8ec33 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,31 +113,21 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
 	 * @see ActionGroup#fillActionBars(IActionBars)
 	 */
 	public void fillActionBars(IActionBars actionBars) {
-		// Can happen if called here before we get the first call 
-		// to setShowTopLevelWorkingSets().  See bug 275197.
-		if (actions == null)
+		if (hasContributedToViewMenu)
 			return;
-		synchronized (this) {
-			if (!hasContributedToViewMenu) {
-				contributeToViewMenu(actionBars.getMenuManager()); 
-				hasContributedToViewMenu = true;
-			}
-		}
-	}
-
-	private void contributeToViewMenu(IMenuManager viewMenu) {
-
 		IMenuManager topLevelSubMenu = new MenuManager(
 				WorkbenchNavigatorMessages.WorkingSetRootModeActionGroup_Top_Level_Element_);
 		addActions(topLevelSubMenu);
-		viewMenu.insertBefore(IWorkbenchActionConstants.MB_ADDITIONS,
-				topLevelSubMenu);
+		actionBars.getMenuManager().insertBefore(IWorkbenchActionConstants.MB_ADDITIONS, topLevelSubMenu);
+		hasContributedToViewMenu = true;
 	}
 
 	/**
 	 * Adds the actions to the given menu manager.
 	 */
 	protected void addActions(IMenuManager viewMenu) {
+		if (actions == null)
+			actions = createActions();
 
 		viewMenu.add(new Separator());
 		items = new MenuItem[actions.length];
@@ -211,14 +201,10 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
 	 * @param showTopLevelWorkingSets
 	 */
 	public void setShowTopLevelWorkingSets(boolean showTopLevelWorkingSets) {
-		if (actions == null) {
+		if (actions == null) 
 			actions = createActions();
-			setActions(actions, showTopLevelWorkingSets ? 1 /*
-															 * Show Top Level
-															 * Working Sets
-															 */
-					: 0);
-		}
+
+		currentSelection = showTopLevelWorkingSets ? 1 : 0;
 		workingSetsAction.setChecked(showTopLevelWorkingSets);
 		projectsAction.setChecked(!showTopLevelWorkingSets);
 
@@ -233,21 +219,6 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
 					WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS,
 					showTopLevelWorkingSets);
 		}
-
-	}
-
-	/**
-	 * Configure the actions that are displayed in the menu by this ActionGroup.
-	 * 
-	 * @param theActions
-	 *            An array of possible actions.
-	 * @param selected
-	 *            The index of the "enabled" action.
-	 */
-	private void setActions(IAction[] theActions, int selected) {
-		actions = theActions;
-		currentSelection = selected;
-
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
index baac984..4ea9453 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,10 +32,7 @@ public class TabbedPropertySheetAdapterFactory
      *      java.lang.Class)
      */
     public Object getAdapter(Object adaptableObject, Class adapterType) {
-
-        if (adaptableObject instanceof CommonNavigator) {
-        	if (!((CommonNavigator)adaptableObject).getViewSite().getId().equals(ProjectExplorer.VIEW_ID))
-        		return null;
+        if (adaptableObject instanceof ProjectExplorer) {
         	if (IPropertySheetPage.class == adapterType)
                 return new TabbedPropertySheetPage(
                     new TabbedPropertySheetProjectExplorerContributor(
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
index 2dc235c..eacb7de 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
@@ -106,7 +106,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
 	public Object[] getChildren(Object parentElement) {
 		if (parentElement instanceof IWorkingSet) {
 			IWorkingSet workingSet = (IWorkingSet) parentElement;
-			if (workingSet.isAggregateWorkingSet()) {
+			if (workingSet.isAggregateWorkingSet() && projectExplorer != null) {
 				switch (projectExplorer.getRootMode()) {
 					case ProjectExplorer.WORKING_SETS :
 						return ((IAggregateWorkingSet) workingSet).getComponents();
@@ -156,6 +156,9 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
 	}
  
 	private void updateRootMode() {
+		if (projectExplorer == null) {
+			return;
+		}
 		if( extensionStateModel.getBooleanProperty(SHOW_TOP_LEVEL_WORKING_SETS) )
 			projectExplorer.setRootMode(ProjectExplorer.WORKING_SETS);
 		else
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
index 6490107..0b4abbd 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -214,4 +214,5 @@ public final class ProjectExplorer extends CommonNavigator {
 		return workingSetLabel;
 	}
 
+	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
index 7737392..b6dda8d 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,34 +8,47 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.navigator.resources;
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Iterator;
 
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.core.runtime.Status;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
+import org.eclipse.jface.window.Window;
+
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.CopyFilesAndFoldersOperation;
 import org.eclipse.ui.actions.MoveFilesAndFoldersOperation;
 import org.eclipse.ui.actions.ReadOnlyStateChecker;
+import org.eclipse.ui.ide.dialogs.ImportTypeDialog;
 import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMessages;
 import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorPlugin;
@@ -43,8 +56,18 @@ import org.eclipse.ui.navigator.CommonDropAdapter;
 import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
 import org.eclipse.ui.part.ResourceTransfer;
 
+import org.eclipse.ltk.core.refactoring.CheckConditionsOperation;
+import org.eclipse.ltk.core.refactoring.PerformRefactoringOperation;
+import org.eclipse.ltk.core.refactoring.Refactoring;
+import org.eclipse.ltk.core.refactoring.RefactoringContribution;
+import org.eclipse.ltk.core.refactoring.RefactoringCore;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.resource.MoveResourcesDescriptor;
+import org.eclipse.ltk.ui.refactoring.RefactoringUI;
+
+
 /**
- *  
+ * 
  * Clients may reference this class in the <b>dropAssistant</b> element of a
  * <b>org.eclipse.ui.navigator.navigatorContent</b> extension point.
  * 
@@ -55,11 +78,14 @@ import org.eclipse.ui.part.ResourceTransfer;
  * 
  * @since 3.2
  * 
- */ 
+ */
 public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 
 	private static final IResource[] NO_RESOURCES = new IResource[0];
 
+	private RefactoringStatus refactoringStatus;
+	private IStatus returnStatus;
+	
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -138,8 +164,10 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 						}
 						operation = new MoveFilesAndFoldersOperation(getShell());
 					}
-					message = operation.validateDestination(destination,
-							selectedResources);
+					if (operation.validateDestination(destination, selectedResources) != null) {
+						operation.setVirtualFolders(true);
+						message = operation.validateDestination(destination, selectedResources);
+					}
 				}
 			}
 		} // file import?
@@ -178,8 +206,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 		}
 
 		// alwaysOverwrite = false;
-		if (aDropAdapter.getCurrentTarget() == null
-				|| aDropTargetEvent.data == null) {
+		if (aTarget == null || aDropTargetEvent.data == null) {
 			return Status.CANCEL_STATUS;
 		}
 		IStatus status = null;
@@ -197,7 +224,8 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 		if (FileTransfer.getInstance().isSupportedType(currentTransfer)) {
 			status = performFileDrop(aDropAdapter, aDropTargetEvent.data);
 		} else if (resources != null && resources.length > 0) {
-			if (aDropAdapter.getCurrentOperation() == DND.DROP_COPY) {
+			if ((aDropAdapter.getCurrentOperation() == DND.DROP_COPY)
+					|| (aDropAdapter.getCurrentOperation() == DND.DROP_LINK)) {
 				if (Policy.DEBUG_DND) {
 					System.out
 							.println("ResourceDropAdapterAssistant.handleDrop executing COPY."); //$NON-NLS-1$
@@ -214,8 +242,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 			}
 		}
 		openError(status);
-		IContainer target = getActualTarget((IResource) aDropAdapter
-				.getCurrentTarget());
+		IContainer target = getActualTarget((IResource) aTarget);
 		if (target != null && target.isAccessible()) {
 			try {
 				target.refreshLocal(IResource.DEPTH_ONE, null);
@@ -324,7 +351,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 				.getSelection();
 		if (selection instanceof IStructuredSelection) {
 			return getSelectedResources((IStructuredSelection)selection);
-		} 
+		}
 		return NO_RESOURCES;
 	}
 
@@ -359,15 +386,57 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 			Shell shell, IResource[] sources) {
 		MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1,
 				WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null);
-		mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(),
-				dropAdapter.getCurrentTransfer(), dropAdapter
-						.getCurrentOperation()));
+		mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAdapter.getCurrentTransfer(),
+				dropAdapter.getCurrentOperation()));
+
+		IContainer target = getActualTarget((IResource) dropAdapter.getCurrentTarget());
+
+		boolean shouldLinkAutomatically = false;
+		if (target.isVirtual()) {
+			shouldLinkAutomatically = true;
+			for (int i = 0; i < sources.length; i++) {
+				if ((sources[i].getType() != IResource.FILE) && (sources[i].getLocation() != null)) {
+					// If the source is a folder, but the location is null (a
+					// broken link, for example),
+					// we still generate a link automatically (the best option).
+					shouldLinkAutomatically = false;
+					break;
+				}
+			}
+		}
 
-		IContainer target = getActualTarget((IResource) dropAdapter
-				.getCurrentTarget());
-		CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
-				shell);
-		operation.copyResources(sources, target);
+		CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(shell);
+		// if the target is a virtual folder and all sources are files, then
+		// automatically create links
+		if (shouldLinkAutomatically) {
+			operation.setCreateLinks(true);
+			operation.copyResources(sources, target);
+		} else {
+			boolean allSourceAreLinksOrVirtualFolders = true;
+			for (int i = 0; i < sources.length; i++) {
+				if (!sources[i].isVirtual() && !sources[i].isLinked()) {
+					allSourceAreLinksOrVirtualFolders = false;
+					break;
+				}
+			}
+			// if all sources are either links or groups, copy then normally,
+			// don't show the dialog
+			if (!allSourceAreLinksOrVirtualFolders) {
+				ImportTypeDialog dialog = new ImportTypeDialog(getShell(), dropAdapter.getCurrentOperation(), sources, target);
+				dialog.setResource(target);
+				if (dialog.open() == Window.OK) {
+					if (dialog.getSelection() == ImportTypeDialog.IMPORT_VIRTUAL_FOLDERS_AND_LINKS)
+						operation.setVirtualFolders(true);
+					if (dialog.getSelection() == ImportTypeDialog.IMPORT_LINK)
+						operation.setCreateLinks(true);
+					if (dialog.getVariable() != null)
+						operation.setRelativeVariable(dialog.getVariable());
+					operation.copyResources(sources, target);
+				} else
+					return problems;
+			} else
+				operation.copyResources(sources, target);
+		}
 
 		return problems;
 	}
@@ -379,19 +448,105 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 			IResource[] sources) {
 		MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1,
 				WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null);
-		mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(),
-				dropAdapter.getCurrentTransfer(), dropAdapter
-						.getCurrentOperation()));
+		mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAdapter.getCurrentTransfer(),
+				dropAdapter.getCurrentOperation()));
+
+		IContainer target = getActualTarget((IResource) dropAdapter.getCurrentTarget());
+
+		boolean shouldLinkAutomatically = false;
+		if (target.isVirtual()) {
+			shouldLinkAutomatically = true;
+			for (int i = 0; i < sources.length; i++) {
+				if (sources[i].isVirtual() || sources[i].isLinked()) {
+					shouldLinkAutomatically = false;
+					break;
+				}
+			}
+		}
 
-		IContainer target = getActualTarget((IResource) dropAdapter
-				.getCurrentTarget());
-		ReadOnlyStateChecker checker = new ReadOnlyStateChecker(getShell(),
-				WorkbenchNavigatorMessages.MoveResourceAction_title,
-				WorkbenchNavigatorMessages.MoveResourceAction_checkMoveMessage);
-		sources = checker.checkReadOnlyResources(sources);
-		MoveFilesAndFoldersOperation operation = new MoveFilesAndFoldersOperation(
-				getShell());
-		operation.copyResources(sources, target);
+		if (shouldLinkAutomatically) {
+			CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(getShell());
+			operation.setCreateLinks(true);
+			operation.copyResources(sources, target);
+		} else {
+			ReadOnlyStateChecker checker = new ReadOnlyStateChecker(getShell(),
+					WorkbenchNavigatorMessages.MoveResourceAction_title,
+					WorkbenchNavigatorMessages.MoveResourceAction_checkMoveMessage);
+			sources = checker.checkReadOnlyResources(sources);
+
+			try {
+				RefactoringContribution contribution = RefactoringCore
+						.getRefactoringContribution(MoveResourcesDescriptor.ID);
+				MoveResourcesDescriptor descriptor = (MoveResourcesDescriptor) contribution.createDescriptor();
+				descriptor.setResourcesToMove(sources);
+				descriptor.setDestination(target);
+				refactoringStatus = new RefactoringStatus();
+				final Refactoring refactoring = descriptor.createRefactoring(refactoringStatus);
+				
+				returnStatus = null;
+				IRunnableWithProgress checkOp = new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						try {
+						refactoringStatus = refactoring.checkAllConditions(monitor);
+					} catch (CoreException ex) {
+						returnStatus = WorkbenchNavigatorPlugin.createErrorStatus(0, ex.getLocalizedMessage(), ex);
+					}}
+				};
+				
+				if (returnStatus != null)
+					return returnStatus;
+
+				try {
+					PlatformUI.getWorkbench().getProgressService().run(false, false, checkOp);
+				} catch (InterruptedException e) {
+					return Status.CANCEL_STATUS;
+				} catch (InvocationTargetException e) {
+					return WorkbenchNavigatorPlugin.createErrorStatus(0, e.getLocalizedMessage(), e);
+				}
+				
+				if (refactoringStatus.hasEntries()) {
+					Dialog dialog= RefactoringUI.createLightWeightStatusDialog(refactoringStatus, getShell(), WorkbenchNavigatorMessages.MoveResourceAction_title);
+					int result = dialog.open();
+					if (result != IStatus.OK)
+						return Status.CANCEL_STATUS;
+				}
+				
+				final PerformRefactoringOperation op = new PerformRefactoringOperation(refactoring,
+						CheckConditionsOperation.ALL_CONDITIONS);
+
+				final IWorkspaceRunnable r = new IWorkspaceRunnable() {
+					public void run(IProgressMonitor monitor) throws CoreException {
+						op.run(monitor);
+					}
+				};
+
+				returnStatus = null;
+				IRunnableWithProgress refactorOp = new IRunnableWithProgress() {
+					public void run(IProgressMonitor monitor) {
+						try {
+							ResourcesPlugin.getWorkspace().run(r, ResourcesPlugin.getWorkspace().getRoot(), IWorkspace.AVOID_UPDATE, monitor);
+						} catch (CoreException ex) {
+							returnStatus = WorkbenchNavigatorPlugin.createErrorStatus(0, ex.getLocalizedMessage(), ex);
+						}
+					}
+				};
+				
+				if (returnStatus != null)
+					return returnStatus;
+				
+				try {
+					PlatformUI.getWorkbench().getProgressService().run(false, false, refactorOp);
+				} catch (InterruptedException e) {
+					return Status.CANCEL_STATUS;
+				} catch (InvocationTargetException e) {
+					return WorkbenchNavigatorPlugin.createErrorStatus(0, e.getLocalizedMessage(), e);
+				}
+
+			} catch (CoreException ex) {
+				return WorkbenchNavigatorPlugin.createErrorStatus(0, ex.getLocalizedMessage(), ex);
+			} catch (OperationCanceledException e) {
+			}
+		}
 
 		return problems;
 	}
@@ -399,12 +554,13 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 	/**
 	 * Performs a drop using the FileTransfer transfer type.
 	 */
-	private IStatus performFileDrop(CommonDropAdapter anAdapter, Object data) {
+	private IStatus performFileDrop(final CommonDropAdapter anAdapter, Object data) {
+		final int currentOperation = anAdapter.getCurrentOperation();
 		MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 0,
 				WorkbenchNavigatorMessages.DropAdapter_problemImporting, null);
 		mergeStatus(problems,
 				validateTarget(anAdapter.getCurrentTarget(), anAdapter
-						.getCurrentTransfer(), anAdapter.getCurrentOperation()));
+						.getCurrentTransfer(), currentOperation));
 
 		final IContainer target = getActualTarget((IResource) anAdapter
 				.getCurrentTarget());
@@ -415,9 +571,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 		Display.getCurrent().asyncExec(new Runnable() {
 			public void run() {
 				getShell().forceActive();
-				CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation(
-						getShell());
-				operation.copyFiles(names, target);
+				new CopyFilesAndFoldersOperation(getShell()).copyOrLinkFiles(names, target, currentOperation);
 			}
 		});
 		return problems;
@@ -451,13 +605,19 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
 				message = WorkbenchNavigatorMessages.DropAdapter_dropOperationErrorOther;
 			} else {
 				CopyFilesAndFoldersOperation operation;
-				if (dropOperation == DND.DROP_COPY) {
+				if ((dropOperation == DND.DROP_COPY) || (dropOperation == DND.DROP_LINK)) {
 					operation = new CopyFilesAndFoldersOperation(getShell());
+					if (operation.validateDestination(destination, selectedResources) != null) {
+						operation.setVirtualFolders(true);
+						message = operation.validateDestination(destination, selectedResources);
+					}
 				} else {
 					operation = new MoveFilesAndFoldersOperation(getShell());
+					if (operation.validateDestination(destination, selectedResources) != null) {
+						operation.setVirtualFolders(true);
+						message = operation.validateDestination(destination, selectedResources);
+					}
 				}
-				message = operation.validateDestination(destination,
-						selectedResources);
 			}
 		} // file import?
 		else if (FileTransfer.getInstance().isSupportedType(transferType)) {
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/.settings/.api_filters b/eclipse/plugins/org.eclipse.ui.navigator/.settings/.api_filters
index 6b6bf9f..4a684a0 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/.settings/.api_filters
+++ b/eclipse/plugins/org.eclipse.ui.navigator/.settings/.api_filters
@@ -23,15 +23,6 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/ui/navigator/CommonNavigator.java" type="org.eclipse.ui.navigator.CommonNavigator">
-        <filter id="388194388">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.CommonNavigator"/>
-                <message_argument value="IS_LINKING_ENABLED_PROPERTY"/>
-                <message_argument value="1"/>
-            </message_arguments>
-        </filter>
-    </resource>
     <resource path="src/org/eclipse/ui/navigator/CommonViewer.java" type="org.eclipse.ui.navigator.CommonViewer">
         <filter id="571473929">
             <message_arguments>
@@ -40,124 +31,4 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonActionConstants.java" type="org.eclipse.ui.navigator.ICommonActionConstants">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonActionConstants"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonActionExtensionSite.java" type="org.eclipse.ui.navigator.ICommonActionExtensionSite">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonActionExtensionSite"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonContentExtensionSite.java" type="org.eclipse.ui.navigator.ICommonContentExtensionSite">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonContentExtensionSite"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonFilterDescriptor.java" type="org.eclipse.ui.navigator.ICommonFilterDescriptor">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonFilterDescriptor"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonMenuConstants.java" type="org.eclipse.ui.navigator.ICommonMenuConstants">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonMenuConstants"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonViewerSite.java" type="org.eclipse.ui.navigator.ICommonViewerSite">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonViewerSite"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/ICommonViewerWorkbenchSite.java" type="org.eclipse.ui.navigator.ICommonViewerWorkbenchSite">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.ICommonViewerWorkbenchSite"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/IExtensionStateModel.java" type="org.eclipse.ui.navigator.IExtensionStateModel">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.IExtensionStateModel"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java" type="org.eclipse.ui.navigator.INavigatorContentDescriptor">
-        <filter id="405901410">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorContentDescriptor"/>
-                <message_argument value="getOverridePolicy()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorContentExtension.java" type="org.eclipse.ui.navigator.INavigatorContentExtension">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorContentExtension"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorContentService.java" type="org.eclipse.ui.navigator.INavigatorContentService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorContentService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorDnDService.java" type="org.eclipse.ui.navigator.INavigatorDnDService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorDnDService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorFilterService.java" type="org.eclipse.ui.navigator.INavigatorFilterService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorFilterService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorPipelineService.java" type="org.eclipse.ui.navigator.INavigatorPipelineService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorPipelineService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorSaveablesService.java" type="org.eclipse.ui.navigator.INavigatorSaveablesService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorSaveablesService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorSorterService.java" type="org.eclipse.ui.navigator.INavigatorSorterService">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorSorterService"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java" type="org.eclipse.ui.navigator.INavigatorViewerDescriptor">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.navigator.INavigatorViewerDescriptor"/>
-            </message_arguments>
-        </filter>
-    </resource>
 </component>
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.core.prefs
index eb33a80..1124f06 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Thu Jan 22 12:21:29 PST 2009
+#Sun Jan 10 12:25:18 PST 2010
 eclipse.preferences.version=1
 org.eclipse.jdt.core.builder.cleanOutputFolder=clean
 org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -336,11 +336,13 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_
 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
 org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
 org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.lineSplit=100
 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.ui.prefs
index 14405e0..49350ea 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.ui.navigator/.settings/org.eclipse.jdt.ui.prefs
@@ -1,6 +1,6 @@
-#Wed Jan 14 16:52:51 PST 2009
+#Sun Jan 10 12:25:18 PST 2010
 eclipse.preferences.version=1
-formatter_profile=_CNF
+formatter_profile=_UI 100 Character Wrap
 formatter_settings_version=11
 internal.default.compliance=user
 org.eclipse.jdt.ui.javadoc=true
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
index 8dc7ec6..28a210a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.navigator; singleton:=true
-Bundle-Version: 3.4.2.qualifier
+Bundle-Version: 3.5.0.qualifier
 Bundle-Activator: org.eclipse.ui.internal.navigator.NavigatorPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
@@ -16,8 +16,8 @@ Export-Package: org.eclipse.ui.internal.navigator;x-friends:="org.eclipse.ui.nav
  org.eclipse.ui.internal.navigator.wizards;x-internal:=true,
  org.eclipse.ui.navigator
 Require-Bundle: 
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/schema/navigatorContent.exsd b/eclipse/plugins/org.eclipse.ui.navigator/schema/navigatorContent.exsd
index cc769ba..7d7a26d 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/schema/navigatorContent.exsd
+++ b/eclipse/plugins/org.eclipse.ui.navigator/schema/navigatorContent.exsd
@@ -79,7 +79,7 @@ When an extension is deactivated by the user, the content and label providers ar
       </annotation>
       <complexType>
          <sequence>
-            <choice>
+            <choice minOccurs="0" maxOccurs="1">
                <element ref="enablement"/>
                <sequence>
                   <element ref="triggerPoints"/>
@@ -91,6 +91,7 @@ When an extension is deactivated by the user, the content and label providers ar
             <element ref="override" minOccurs="0" maxOccurs="1"/>
             <element ref="dropAssistant" minOccurs="0" maxOccurs="unbounded"/>
             <element ref="commonWizard" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="initialActivation" minOccurs="0" maxOccurs="1"/>
          </sequence>
          <attribute name="id" type="string" use="required">
             <annotation>
@@ -134,6 +135,18 @@ When an extension is deactivated by the user, the content and label providers ar
                </restriction>
             </simpleType>
          </attribute>
+         <attribute name="appearsBefore" type="string">
+            <annotation>
+               <documentation>
+                  Specifies the ID of the navigator content that this navigator content appears before.  This navigator content will be processed before the specified navigator content is processed.
+<br><br>
+The overall order in which the navigator content extensions are processed is calculated by first sorting all of the NCEs by priority, and then rearranging them according to the <b>appearsBefore</b> relationship. Once the overall order is determined, a unique sequence number is assigned to each navigator content descriptior which is available through the API.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.ui.navigator.navigatorContent/navigatorContent/@id"/>
+               </appInfo>
+            </annotation>
+         </attribute>
          <attribute name="contentProvider" type="string">
             <annotation>
                <documentation>
@@ -151,6 +164,20 @@ are associated with this navigatorContent extension for the purposes of determin
                </appInfo>
             </annotation>
          </attribute>
+         <attribute name="labelProvider" type="string">
+            <annotation>
+               <documentation>
+                  Supplies the name of a class which implements <code>org.eclipse.jface.viewers.ILabelProvider</code> or for more advanced functionality, the <code>org.eclipse.ui.navigator.ICommonLabelProvider</code>.
+<br><br>
+Clients may also implement <code>org.eclipse.ui.navigator.IDescriptionProvider</code> in order to add text to the status bar at the bottom of the Eclipse workbench based on the selection in the viewer.
+<br><br>
+Since 3.4, clients may also implement <code>org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider</code> to provide styled text labels. Note that the empty styled string signals that the label provider does not wish to render the label.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ILabelProvider"/>
+               </appInfo>
+            </annotation>
+         </attribute>
          <attribute name="icon" type="string">
             <annotation>
                <documentation>
@@ -175,18 +202,13 @@ are associated with this navigatorContent extension for the purposes of determin
                </documentation>
             </annotation>
          </attribute>
-         <attribute name="labelProvider" type="string">
+         <attribute name="sortOnly" type="boolean">
             <annotation>
                <documentation>
-                  Supplies the name of a class which implements <code>org.eclipse.jface.viewers.ILabelProvider</code> or for more advanced functionality, the <code>org.eclipse.ui.navigator.ICommonLabelProvider</code>.
+                  Used when this navigtorContent extension is used only to specifiy <b>commonSorter</b> elements for the purpose of specifying sorting independent of which NCE contributed an object. If this is true the only children of this element can be <b>commonSorter</b> elements.
 <br><br>
-Clients may also implement <code>org.eclipse.ui.navigator.IDescriptionProvider</code> in order to add text to the status bar at the bottom of the Eclipse workbench based on the selection in the viewer.
-<br><br>
-Since 3.4, clients may also implement <code>org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider</code> to provide styled text labels. Note that the empty styled string signals that the label provider does not wish to render the label.
+The rules associated with the <b>priority</b> and <b>appearsBefore</b> are respected. When calculating the sort for a given object, the first NCE that satisfies the <b>commonSorter</b>'s <b>parentExpression</b> will do the calculation.
                </documentation>
-               <appInfo>
-                  <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ILabelProvider"/>
-               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -477,6 +499,13 @@ That is, if the content extension is bound to a Common Navigator (see <b>o
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="visibleInUI" type="boolean">
+            <annotation>
+               <documentation>
+                  True if the filter is to be shown in the Common Navigator UI to allow a client to disable or enable it.  False if it is hidden from the UI. By default this is true.
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -664,6 +693,31 @@ An extension may have multiple drop adapters with mutually exclusive <b>po
       </complexType>
    </element>
 
+   <element name="initialActivation">
+      <annotation>
+         <documentation>
+            A core expression which is checked with the navigator starts to determine of this navigator content extension is to be activated. Only meaningful if <b>activeByDefault</b> is set to false.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence minOccurs="0" maxOccurs="unbounded">
+            <element ref="not"/>
+            <element ref="and"/>
+            <element ref="or"/>
+            <element ref="instanceof"/>
+            <element ref="test"/>
+            <element ref="systemTest"/>
+            <element ref="equals"/>
+            <element ref="count"/>
+            <element ref="with"/>
+            <element ref="resolve"/>
+            <element ref="adapt"/>
+            <element ref="iterate"/>
+            <element ref="reference"/>
+         </sequence>
+      </complexType>
+   </element>
+
    <annotation>
       <appInfo>
          <meta.section type="since"/>
@@ -909,7 +963,7 @@ using this feature.
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2002, 2009 IBM Corporation and others.<br>
+         Copyright (c) 2002, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at <a 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java
index ba86135..ad06273 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,7 +32,7 @@ public class CommonNavigatorMessages extends NLS {
 	public static String Link_With_Editor_Job_;
 
 	/** */
-	public static String Could_not_provide_children_for_element;
+	public static String Exception_Invoking_Extension;
 
 	/** */
 	public static String NavigatorViewerDescriptor_Popup_Menu_Overridden;
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ContributorTrackingSet.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ContributorTrackingSet.java
index 6de867b..53c83ec 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ContributorTrackingSet.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/ContributorTrackingSet.java
@@ -11,6 +11,7 @@
 
 package org.eclipse.ui.internal.navigator;
 
+import java.util.Iterator;
 import java.util.LinkedHashSet;
 
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
@@ -19,7 +20,7 @@ import org.eclipse.ui.navigator.INavigatorContentDescriptor;
  * Used to associate the NavigatorContentDescriptor (NCD) with an object that it contributes.
  * 
  * The NCD/object association is tracked using the NavigatorContentService.rememberContribution().
- * 
+ *
  * @since 3.2
  *
  */
@@ -55,9 +56,6 @@ public class ContributorTrackingSet extends LinkedHashSet {
 		contentService = aContentService;
 	}
 	
-	/* (non-Javadoc)
-	 * @see java.util.HashSet#add(java.lang.Object)
-	 */
 	public boolean add(Object o) { 
 		if (contributor != null) {
 			contentService.rememberContribution(contributor, firstClassContributor, o);
@@ -65,14 +63,19 @@ public class ContributorTrackingSet extends LinkedHashSet {
 		return super.add(o);
 	}
 	
-	/* (non-Javadoc)
-	 * @see java.util.HashSet#remove(java.lang.Object)
-	 */
 	public boolean remove(Object o) { 
 		contentService.forgetContribution(o);
 		return super.remove(o);
 	}
 
+	
+	public void clear() { 
+		Iterator it = iterator();
+		while (it.hasNext())
+			contentService.forgetContribution(it.next());
+		super.clear();
+	}
+
 	/**
 	 * 
 	 * @return The current contributor.
@@ -109,4 +112,27 @@ public class ContributorTrackingSet extends LinkedHashSet {
 				add(contents[i]); 
 		
 	}
+	
+	public Iterator iterator() {
+		return new Iterator() {
+
+			Iterator delegateIterator = ContributorTrackingSet.super.iterator();
+			Object current;
+
+			public boolean hasNext() {
+				return delegateIterator.hasNext();
+			}
+
+			public Object next() {
+				current = delegateIterator.next();
+				return current;
+			}
+
+			public void remove() {
+				delegateIterator.remove();
+				contentService.forgetContribution(current);
+			}
+		};
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CustomAndExpression.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CustomAndExpression.java
index 07f1373..89240bf 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CustomAndExpression.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CustomAndExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,9 +20,8 @@ import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.ExpressionConverter;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SafeRunner;
 
 /**
  * Create an AND-type core expression from an IConfigurationElement of arbitrary
@@ -44,30 +43,33 @@ public class CustomAndExpression extends Expression {
 	public CustomAndExpression(IConfigurationElement element) {
 		Assert.isNotNull(element);
 
-		IConfigurationElement[] children = element.getChildren();
-
-		if (children.length > 0) {
-			fExpressions = new ArrayList();
-		}
-		for (int i = 0; i < children.length; i++) {
-			try {
-				fExpressions.add(ElementHandler.getDefault().create(
-						ExpressionConverter.getDefault(), children[i]));
-			} catch (CoreException ce) {
-				NavigatorPlugin.log(IStatus.ERROR, 0, ce.getMessage(), ce);
+		final IConfigurationElement[] children = element.getChildren();
+		if (children.length == 0)
+			return;
+		SafeRunner.run(new NavigatorSafeRunnable() {
+			public void run() throws Exception {
+				fExpressions = new ArrayList();
+				for (int i = 0; i < children.length; i++) {
+					fExpressions.add(ElementHandler.getDefault().create(
+							ExpressionConverter.getDefault(), children[i]));
+				}
 			}
-		}
+		});
+
 	}
 
-	public EvaluationResult evaluate(IEvaluationContext scope)
-			throws CoreException {
+	public EvaluationResult evaluate(IEvaluationContext scope) {
 		if (fExpressions == null) {
 			return EvaluationResult.TRUE;
 		}
+		NavigatorPlugin.Evaluator evaluator = new NavigatorPlugin.Evaluator();
 		EvaluationResult result = EvaluationResult.TRUE;
 		for (Iterator iter = fExpressions.iterator(); iter.hasNext();) {
 			Expression expression = (Expression) iter.next();
-			result = result.and(expression.evaluate(scope));
+			evaluator.expression = expression;
+			evaluator.scope = scope;
+			SafeRunner.run(evaluator);
+			result = result.and(evaluator.result);
 			// keep iterating even if we have a not loaded found. It can be
 			// that we find a false which will result in a better result.
 			if (result == EvaluationResult.FALSE) {
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java
index b62c2b2..ae4aed4 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorActivationService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,12 +54,12 @@ public final class NavigatorActivationService implements
 	private static final char EQUALS = '=';  
 
 	/*
-	 * Set of ids of activated extensions.
-	 */
-	//private final Set activatedExtensions = new HashSet();
-
-	/*
-	 * Set of ids of activated extensions.
+	 * Map of ids of activated extensions. Note this is only synchronized when
+	 * modifying it structurally (that is adding or deleting entries in it). For
+	 * changing of the activated extension state, no synchronization is
+	 * necessary.  Though this is semantically functioning as a Set, it's implemented
+	 * as a Map to avoid the synchronization during the frequent checking of
+	 * extension status.
 	 */
 	private final Map/*<String, Boolean>*/ activatedExtensionsMap = new HashMap();
 
@@ -105,7 +105,6 @@ public final class NavigatorActivationService implements
 				activatedExtensionsMap.put(aNavigatorExtensionId, Boolean.FALSE);
 			return descriptor.isActiveByDefault();
 		}
-		//return activatedExtensions.contains(aNavigatorExtensionId);
 	}
 
 	/**
@@ -142,10 +141,8 @@ public final class NavigatorActivationService implements
 		}
 
 		if (toEnable) {
-			//activatedExtensions.add(aNavigatorExtensionId);
 			activatedExtensionsMap.put(aNavigatorExtensionId, Boolean.TRUE);
 		} else {
-			//activatedExtensions.remove(aNavigatorExtensionId);
 			activatedExtensionsMap.put(aNavigatorExtensionId, Boolean.FALSE);
 		}
 		notifyListeners(new String[] { aNavigatorExtensionId }, toEnable);
@@ -177,12 +174,10 @@ public final class NavigatorActivationService implements
 
 		if (toEnable) {
 			for (int i = 0; i < aNavigatorExtensionIds.length; i++) {
-				//activatedExtensions.add(aNavigatorExtensionIds[i]);
 				activatedExtensionsMap.put(aNavigatorExtensionIds[i], Boolean.TRUE);
 			}
 		} else {
 			for (int i = 0; i < aNavigatorExtensionIds.length; i++) {
-				//activatedExtensions.remove(aNavigatorExtensionIds[i]);
 				activatedExtensionsMap.put(aNavigatorExtensionIds[i], Boolean.FALSE);
 			}
 		}
@@ -197,9 +192,7 @@ public final class NavigatorActivationService implements
 	public void persistExtensionActivations() {
 		IEclipsePreferences prefs = NavigatorContentService.getPreferencesRoot();
 		
-		//synchronized (activatedExtensions) {
 		synchronized (activatedExtensionsMap) {
-			//Iterator activatedExtensionsIterator = activatedExtensions.iterator();
 			Iterator activatedExtensionsIterator = activatedExtensionsMap.keySet().iterator();
 			
 			/* ensure that the preference will be non-empty */
@@ -276,7 +269,6 @@ public final class NavigatorActivationService implements
 			String booleanString = null;
 			int indx=0;
 			for (int i = 0; i < contentExtensionIds.length; i++) {
-				//activatedExtensions.add(contentExtensionIds[i]);
 				if( (indx = contentExtensionIds[i].indexOf(EQUALS)) > -1) {
 					// up to but not including the equals
 					id = contentExtensionIds[i].substring(0, indx);
@@ -301,7 +293,6 @@ public final class NavigatorActivationService implements
 					.getAllContentDescriptors();
 			for (int i = 0; i < contentDescriptors.length; i++) {
 				if (contentDescriptors[i].isActiveByDefault()) {					
-					//activatedExtensions.add(contentDescriptors[i].getId());
 					activatedExtensionsMap.put(contentDescriptors[i].getId(), Boolean.TRUE);
 				}
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java
index e3f50c1..f88527f 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentService.java
@@ -29,7 +29,6 @@ import org.osgi.service.prefs.BackingStoreException;
 
 import org.eclipse.swt.widgets.Shell;
 
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.SafeRunner;
@@ -44,7 +43,7 @@ import org.eclipse.jface.viewers.Viewer;
 
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.internal.navigator.dnd.NavigatorDnDService;
-import org.eclipse.ui.internal.navigator.extensions.ExtensionPriorityComparator;
+import org.eclipse.ui.internal.navigator.extensions.ExtensionSequenceNumberComparator;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension;
@@ -134,7 +133,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 
 	private NavigatorFilterService navigatorFilterService;
 
-	private INavigatorSorterService navigatorSorterService;
+	private NavigatorSorterService navigatorSorterService;
 
 	private INavigatorPipelineService navigatorPipelineService;
 
@@ -347,6 +346,9 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		if (navigatorSaveablesService != null) {
 			assistant.removeListener(navigatorSaveablesService);
 		}
+		if (navigatorSorterService != null) {
+			assistant.removeListener(navigatorSorterService);
+		}
 		synchronized (this) {
 			for (Iterator contentItr = contentExtensions.values().iterator(); contentItr
 					.hasNext();) {
@@ -382,7 +384,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 						.next();
 				if (ext.isLoaded()) {
 					structuredViewerManager
-							.initialize(ext.getContentProvider());
+							.initialize(ext.internalGetContentProvider());
 				}
 			}
 
@@ -451,23 +453,25 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		LinkedHashSet contributors = new LinkedHashSet();
 		INavigatorContentDescriptor sourceDescriptor = getSourceOfContribution(anElement);
 		
-		if (sourceDescriptor != null) {
-			findOverridingLabelExtensions(anElement, sourceDescriptor, contributors);
-		}
-		
 		// This is a TreeSet sorted ascending
 		Set possibleChildDescriptors = findDescriptorsWithPossibleChild(anElement, false);
+
+		// Add the source so that it gets sorted into the right place
+		if (sourceDescriptor != null) {
+			possibleChildDescriptors.add(sourceDescriptor);
+		}
+
 		for (Iterator iter = possibleChildDescriptors.iterator(); iter.hasNext();) {
 			NavigatorContentDescriptor ncd = (NavigatorContentDescriptor) iter.next();
 			findOverridingLabelExtensions(anElement, ncd, contributors);
 		}
-
+		
 		return contributors;
 	}
 
 	private void findOverridingLabelExtensions(Object anElement,
 			INavigatorContentDescriptor descriptor, LinkedHashSet contributors) {
-		ListIterator iter = ((NavigatorContentDescriptor) descriptor).getOverriddingExtensionsListIterator(false);
+		ListIterator iter = ((NavigatorContentDescriptor) descriptor).getOverridingExtensionsListIterator(false);
 		while (iter.hasPrevious()) {
 			INavigatorContentDescriptor child = (INavigatorContentDescriptor) iter.previous();
 			if (assistant.isVisibleAndActive(child) && child.isPossibleChild(anElement)) {
@@ -538,9 +542,9 @@ public class NavigatorContentService implements IExtensionActivationListener,
 			boolean toRespectViewerRoots) {
 
 		SortedSet rootExtensions = new TreeSet(
-				ExtensionPriorityComparator.INSTANCE);
+				ExtensionSequenceNumberComparator.INSTANCE);
 		if (toRespectViewerRoots
-				&& viewerDescriptor.hasOverriddenRootExtensions()) {
+				/*&& viewerDescriptor.hasOverriddenRootExtensions()*/) {
 
 			NavigatorContentDescriptor[] descriptors = CONTENT_DESCRIPTOR_REGISTRY
 					.getAllContentDescriptors();
@@ -564,31 +568,6 @@ public class NavigatorContentService implements IExtensionActivationListener,
 
 	/**
 	 * Search for extensions that declare the given element in their
-	 * <b>triggerPoint</b> expression.
-	 * 
-	 * @param anElement
-	 *            The element to use in the query
-	 * @return The set of {@link INavigatorContentExtension}s that are
-	 *         <i>visible</i> and <i>active</i> for this content service and
-	 *         have a <b>triggerPoint</b> expression that is <i>enabled</i>
-	 *         for the given element.
-	 */
-	public Set findOverrideableContentExtensionsByTriggerPoint(Object anElement) {
-		Set overrideableExtensions = new TreeSet(
-				ExtensionPriorityComparator.INSTANCE);
-		Set descriptors = findDescriptorsByTriggerPoint(anElement, !CONSIDER_OVERRIDES);
-		for (Iterator iter = descriptors.iterator(); iter.hasNext();) {
-			INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) iter
-					.next();
-			if (descriptor.hasOverridingExtensions()) {
-				overrideableExtensions.add(getExtension(descriptor));
-			}
-		}
-		return overrideableExtensions;
-	}
-
-	/**
-	 * Search for extensions that declare the given element in their
 	 * <b>possibleChildren</b> expression.
 	 * 
 	 * @param anElement
@@ -601,7 +580,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	public Set findOverrideableContentExtensionsForPossibleChild(
 			Object anElement) {
 		Set overrideableExtensions = new TreeSet(
-				ExtensionPriorityComparator.INSTANCE);
+				ExtensionSequenceNumberComparator.INSTANCE);
 		Set descriptors = findDescriptorsWithPossibleChild(anElement, false);
 		for (Iterator iter = descriptors.iterator(); iter.hasNext();) {
 			INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) iter
@@ -712,34 +691,33 @@ public class NavigatorContentService implements IExtensionActivationListener,
 
 	/**
 	 * 
-	 */
-	public void resetContributionMemory() {
-		contributionMemory.clear();
-		contributionMemoryFirstClass.clear();
-	}
-	
-	/**
-	 * 
 	 * 
 	 * @param firstClassSource
 	 * @param source
 	 * @param element
 	 */
-	public void rememberContribution(INavigatorContentDescriptor source, INavigatorContentDescriptor firstClassSource, Object element) {
+	public void rememberContribution(INavigatorContentDescriptor source,
+			INavigatorContentDescriptor firstClassSource, Object element) {
 		/*
-		 * We want to write to (overwrite) the contributionMemory only if we have never heard of the element before, or if the 
-		 * element is coming from the same first class NCE, which means that the subsequent NCE is an override.  The override will
-		 * take precedence over the originally contributing NCE.  However in the case of different first class NCEs, the first one 
-		 * wins, so we don't update the contribution memory. 
+		 * We want to write to (overwrite) the contributionMemory only if we
+		 * have never heard of the element before, or if the element is coming
+		 * from the same first class NCE, which means that the subsequent NCE is
+		 * an override. The override will take precedence over the originally
+		 * contributing NCE. However in the case of different first class NCEs,
+		 * the first one wins, so we don't update the contribution memory.
 		 */
-		if (contributionMemory.get(element) == null || contributionMemoryFirstClass.get(element) == firstClassSource) {
-			if (Policy.DEBUG_RESOLUTION)
-				System.out.println("rememberContribution: " + Policy.getObjectString(element) + " source: " + source);  //$NON-NLS-1$//$NON-NLS-2$
-			contributionMemory.put(element, source);
-			contributionMemoryFirstClass.put(element, firstClassSource);
+		synchronized (this) {
+			if (contributionMemory.get(element) == null
+					|| contributionMemoryFirstClass.get(element) == firstClassSource) {
+				if (Policy.DEBUG_RESOLUTION)
+					System.out
+							.println("rememberContribution: " + Policy.getObjectString(element) + " source: " + source); //$NON-NLS-1$//$NON-NLS-2$
+				contributionMemory.put(element, source);
+				contributionMemoryFirstClass.put(element, firstClassSource);
+			}
 		}
 	}
-	
+
 	/**
 	 * Forget about the specified element
 	 * 
@@ -747,21 +725,36 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	 *            The element to forget.
 	 */
 	public void forgetContribution(Object element) {
-		contributionMemory.remove(element);
-		contributionMemoryFirstClass.remove(element);
+		synchronized (this) {
+			contributionMemory.remove(element);
+			contributionMemoryFirstClass.remove(element);
+		}
 	}
-	
+
 	/**
 	 * @param element
 	 * @return the remembered NavigatorContentDescriptor
 	 */
 	public NavigatorContentDescriptor getContribution(Object element)
 	{
-		NavigatorContentDescriptor desc = (NavigatorContentDescriptor) contributionMemory.get(element);
+		NavigatorContentDescriptor desc;
+		synchronized (this) {
+			desc = (NavigatorContentDescriptor) contributionMemory.get(element);
+		}
 		return desc;
 	}
 	
 	/**
+	 * Used only for the tests
+	 * @return the size of the contribution memory
+	 */
+	public int getContributionMemorySize() {
+		synchronized (this) {
+			return contributionMemory.size();
+		}
+	}
+	
+	/**
 	 * 
 	 * @param element
 	 *            The element contributed by the descriptor to be returned
@@ -774,7 +767,10 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		if (structuredViewerManager == null)
 			return null;
 		// Try here first because it might not yet be in the tree
-		NavigatorContentDescriptor src = (NavigatorContentDescriptor) contributionMemory.get(element);
+		NavigatorContentDescriptor src;
+		synchronized (this) {
+			src = (NavigatorContentDescriptor) contributionMemory.get(element);
+		}
 		if (src != null)
 			return src;
 		return (NavigatorContentDescriptor) structuredViewerManager.getData(element);
@@ -801,7 +797,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		// Here we use the cache, since objects are inserted into the
 		// cache in response to the trigger point
 		NavigatorContentDescriptor descriptor = getSourceOfContribution(anElement);
-		Set result = new TreeSet(ExtensionPriorityComparator.INSTANCE);
+		Set result = new TreeSet(ExtensionSequenceNumberComparator.INSTANCE);
 		if (descriptor != null) {
 			result.add(descriptor);
 		}
@@ -841,7 +837,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	public Set findDescriptorsWithPossibleChild(Object anElement,
 			boolean toComputeOverrides) {
 		// Don't use the cache which is only used for triggerPoints
-		Set result = new TreeSet(ExtensionPriorityComparator.INSTANCE);
+		Set result = new TreeSet(ExtensionSequenceNumberComparator.INSTANCE);
 		result.addAll(CONTENT_DESCRIPTOR_REGISTRY
 				.findDescriptorsForPossibleChild(anElement, assistant,
 						toComputeOverrides));
@@ -857,25 +853,23 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	public void onExtensionActivation(String aViewerId,
 			String[] aNavigatorExtensionId, boolean toEnable) {
 		synchronized (this) {
-			try {
-				NavigatorContentDescriptor key;
-				NavigatorContentExtension extension;
-				for (Iterator iter = contentExtensions.keySet().iterator(); iter
-						.hasNext();) {
-					key = (NavigatorContentDescriptor) iter.next();
-					INavigatorActivationService activation = getActivationService();
-					if (!activation.isNavigatorExtensionActive(key.getId())) {
-						extension = (NavigatorContentExtension) contentExtensions
-								.get(key);
-						iter.remove();
-						extension.dispose();
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				public void run() throws Exception {
+					NavigatorContentDescriptor key;
+					NavigatorContentExtension extension;
+					for (Iterator iter = contentExtensions.keySet().iterator(); iter
+							.hasNext();) {
+						key = (NavigatorContentDescriptor) iter.next();
+						INavigatorActivationService activation = getActivationService();
+						if (!activation.isNavigatorExtensionActive(key.getId())) {
+							extension = (NavigatorContentExtension) contentExtensions
+									.get(key);
+							iter.remove();
+							extension.dispose();
+						}
 					}
 				}
-			} catch (RuntimeException e) {
-				String msg = e.getMessage() != null ? e.getMessage() : e
-						.toString();
-				NavigatorPlugin.logError(0, msg, e);
-			}
+			});
 		}
 		if (structuredViewerManager != null) {
 			structuredViewerManager.resetViewerData();
@@ -906,6 +900,19 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	}
 
 	/**
+	 * Returns the remembered data (the NavigatorContentDescriptor) associated with
+	 * an object in the viewer. This can be used to test an object's presence in the viewer.
+	 * @param element
+	 * @return the object stored as data in the viewer
+	 */
+	public Object getViewerElementData(Object element) {
+		if (structuredViewerManager != null) {
+			return structuredViewerManager.getData(element);
+		}
+		return null;
+	}
+	
+	/**
 	 * 
 	 * @param aDescriptorKey
 	 *            A descriptor
@@ -972,30 +979,15 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	 */
 	public void restoreState(final IMemento aMemento) {
 		synchronized (this) {
-			List runnables = new ArrayList();
-			for (Iterator extensionItr = getExtensions().iterator(); extensionItr
-					.hasNext();) {
+			for (Iterator extensionItr = getExtensions().iterator(); extensionItr.hasNext();) {
 				final NavigatorContentExtension element = (NavigatorContentExtension) extensionItr
 						.next();
-				ISafeRunnable runnable = new ISafeRunnable() {
+				SafeRunner.run(new NavigatorSafeRunnable(((NavigatorContentDescriptor) element
+						.getDescriptor()).getConfigElement()) {
 					public void run() throws Exception {
 						element.restoreState(aMemento);
-
-					}
-
-					public void handleException(Throwable exception) {
-						NavigatorPlugin.logError(0,
-								"Could not restore state for Common Navigator content extension" //$NON-NLS-1$
-										+ element.getId(), exception);
-
 					}
-				};
-				runnables.add(runnable);
-			}
-			for (Iterator iterator = runnables.iterator(); iterator.hasNext();) {
-				ISafeRunnable runnable = (ISafeRunnable) iterator.next();
-				SafeRunner.run(runnable);
-
+				});
 			}
 		}
 	}
@@ -1007,13 +999,17 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	 * org.eclipse.ui.internal.navigator.INavigatorContentService#saveState(
 	 * org.eclipse.ui.IMemento)
 	 */
-	public void saveState(IMemento aMemento) {
+	public void saveState(final IMemento aMemento) {
 		synchronized (this) {
-			for (Iterator extensionItr = getExtensions().iterator(); extensionItr
-					.hasNext();) {
-				NavigatorContentExtension element = (NavigatorContentExtension) extensionItr
+			for (Iterator extensionItr = getExtensions().iterator(); extensionItr.hasNext();) {
+				final NavigatorContentExtension element = (NavigatorContentExtension) extensionItr
 						.next();
-				element.saveState(aMemento);
+				SafeRunner.run(new NavigatorSafeRunnable(((NavigatorContentDescriptor) element
+						.getDescriptor()).getConfigElement()) {
+					public void run() throws Exception {
+						element.saveState(aMemento);
+					}
+				});
 			}
 		}
 	}
@@ -1065,6 +1061,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 	public INavigatorSorterService getSorterService() {
 		if (navigatorSorterService == null) {
 			navigatorSorterService = new NavigatorSorterService(this);
+			assistant.addListener(navigatorSorterService);
 		}
 		return navigatorSorterService;
 	}
@@ -1177,29 +1174,33 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		return "ContentService[" + viewerDescriptor.getViewerId() + "]"; //$NON-NLS-1$//$NON-NLS-2$
 	}
 
-	private void notifyListeners(NavigatorContentExtension aDescriptorInstance) {
+	private void notifyListeners(final NavigatorContentExtension aDescriptorInstance) {
 
 		if (listeners.size() == 0) {
 			return;
 		}
-		INavigatorContentServiceListener listener = null;
-		List failedListeners = null;
-		for (Iterator listenersItr = listeners.iterator(); listenersItr
-				.hasNext();) {
-			try {
-				listener = (INavigatorContentServiceListener) listenersItr
-						.next();
-				listener.onLoad(aDescriptorInstance);
-			} catch (RuntimeException re) {
-				if (failedListeners == null) {
-					failedListeners = new ArrayList();
+
+		final List failedListeners = new ArrayList();
+
+		for (Iterator listenersItr = listeners.iterator(); listenersItr.hasNext();) {
+			final INavigatorContentServiceListener listener = (INavigatorContentServiceListener) listenersItr
+					.next();
+			SafeRunner.run(new NavigatorSafeRunnable() {
+
+				public void run() throws Exception {
+					listener.onLoad(aDescriptorInstance);
 				}
-				failedListeners.add(listener);
-			}
+
+				public void handleException(Throwable e) {
+					super.handleException(e);
+					failedListeners.add(listener);
+				}
+			});
 		}
-		if (failedListeners != null) {
+
+		if (failedListeners.size() > 0) {
 			listeners.removeAll(failedListeners);
-		}
+		}		
 	}
 
 	private ITreeContentProvider[] extractContentProviders(
@@ -1221,7 +1222,7 @@ public class NavigatorContentService implements IExtensionActivationListener,
 		if (theDescriptors.size() == 0) {
 			return Collections.EMPTY_SET;
 		}
-		Set resultInstances = new TreeSet(ExtensionPriorityComparator.INSTANCE);
+		Set resultInstances = new TreeSet(ExtensionSequenceNumberComparator.INSTANCE);
 		for (Iterator descriptorIter = theDescriptors.iterator(); descriptorIter
 				.hasNext();) {
 			NavigatorContentExtension extension = getExtension(
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
index 907a504..b25b1d2 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,8 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Anton Leherbauer, Wind River
+ *       bug 261031 [CommonNavigator] IPipelinedContentProvider getParent() returning the suggested parent is not ignored
  *******************************************************************************/
 package org.eclipse.ui.internal.navigator;
 
@@ -18,6 +20,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.ITreePathContentProvider;
 import org.eclipse.jface.viewers.TreePath;
@@ -26,6 +29,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorViewerDescriptor;
+import org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider;
 import org.eclipse.ui.navigator.CommonViewer;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
 import org.eclipse.ui.navigator.INavigatorViewerDescriptor;
@@ -35,13 +39,13 @@ import org.eclipse.ui.navigator.OverridePolicy;
 /**
  * <p>
  * Provides relevant content based on the associated
- * {@link org.eclipse.ui.internal.navigator.NavigatorContentService}  for
- * a TreeViewer .
+ * {@link org.eclipse.ui.internal.navigator.NavigatorContentService}  for a
+ * TreeViewer .
  * </p>
  * <p>
  * Except for the dependency on
- * {@link org.eclipse.ui.internal.navigator.NavigatorContentService}, this
- * class has no dependencies on the rest of the Common Navigator framework. Tree
+ * {@link org.eclipse.ui.internal.navigator.NavigatorContentService}, this class
+ * has no dependencies on the rest of the Common Navigator framework. Tree
  * viewers that would like to use the extensions defined by the Common
  * Navigator, without using the actual view part or other pieces of
  * functionality (filters, sorting, etc) may choose to use this class, in effect
@@ -54,15 +58,14 @@ import org.eclipse.ui.navigator.OverridePolicy;
  * @since 3.2
  * 
  */
-public class NavigatorContentServiceContentProvider implements
-		ITreeContentProvider, ITreePathContentProvider {
+public class NavigatorContentServiceContentProvider implements ITreeContentProvider, ITreePathContentProvider {
 
 	private static final Object[] NO_CHILDREN = new Object[0];
 
 	private final NavigatorContentService contentService;
 
-	private final boolean isContentServiceSelfManaged;
-	
+	private boolean disposeContentService;
+
 	private final boolean enforceHasChildren;
 
 	private Viewer viewer;
@@ -79,11 +82,8 @@ public class NavigatorContentServiceContentProvider implements
 	 *            for
 	 */
 	public NavigatorContentServiceContentProvider(String aViewerId) {
-		super();
-		contentService = new NavigatorContentService(aViewerId);
-		INavigatorViewerDescriptor vDesc = contentService.getViewerDescriptor();
-		enforceHasChildren = vDesc.getBooleanConfigProperty(NavigatorViewerDescriptor.PROP_ENFORCE_HAS_CHILDREN);
-		isContentServiceSelfManaged = true;
+		this(new NavigatorContentService(aViewerId));
+		disposeContentService = true;
 	}
 
 	/**
@@ -95,250 +95,123 @@ public class NavigatorContentServiceContentProvider implements
 	 *            The associated NavigatorContentService that should be used to
 	 *            acquire information.
 	 */
-	public NavigatorContentServiceContentProvider(
-			NavigatorContentService aContentService) {
+	public NavigatorContentServiceContentProvider(NavigatorContentService aContentService) {
 		super();
 		contentService = aContentService;
-		isContentServiceSelfManaged = false;
 		INavigatorViewerDescriptor vDesc = contentService.getViewerDescriptor();
 		enforceHasChildren = vDesc.getBooleanConfigProperty(NavigatorViewerDescriptor.PROP_ENFORCE_HAS_CHILDREN);
 	}
 
-	/**
-	 * 
-	 * <p>
-	 * Return the root objects for the supplied anInputElement. anInputElement
-	 * is the root thing that the viewer visualizes.
-	 * </p>
-	 * <p>
-	 * This method will call out to its {@link NavigatorContentService} for
-	 * extensions that are enabled on the supplied anInputElement or enabled on
-	 * the viewerId supplied when the {@link NavigatorContentService}  was
-	 * created (either by this class or its client). The extensions will then be
-	 * queried for relevant content. The children returned from each extension
-	 * will be aggregated and returned as is -- there is no additional sorting
-	 * or filtering at this level.
-	 * </p>
-	 * <p>
-	 * The results of this method will be displayed in the root of the
-	 * TreeViewer.
-	 * </p>
-	 * {@inheritDoc}
-	 * 
-	 * @param anInputElement
-	 *            The relevant element that a client would like children for -
-	 *            the input element of the TreeViewer
-	 * @return A non-null array of objects that are logical children of
-	 *         anInputElement
-	 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-	 */
-	public synchronized Object[] getElements(Object anInputElement) {
-		contentService.resetContributionMemory();
-		Set rootContentExtensions = contentService
-				.findRootContentExtensions(anInputElement);
-		if (rootContentExtensions.size() == 0) {
-			return NO_CHILDREN;
-		}
-		ContributorTrackingSet finalElementsSet = new ContributorTrackingSet(contentService);
-		ContributorTrackingSet localSet = new ContributorTrackingSet(contentService);		
+	public void inputChanged(Viewer aViewer, Object anOldInput, Object aNewInput) {
+		viewer = aViewer;
+		contentService.updateService(aViewer, anOldInput, aNewInput);
+	}
 
-		Object[] contributedChildren = null;
-		NavigatorContentExtension foundExtension;
-		NavigatorContentExtension[] overridingExtensions;
-		for (Iterator itr = rootContentExtensions.iterator(); itr.hasNext();) {
-			foundExtension = (NavigatorContentExtension) itr.next();
-			try {
-
-				if (!isOverridingExtensionInSet(foundExtension.getDescriptor(),
-						rootContentExtensions)) {
-
-					contributedChildren = foundExtension.internalGetContentProvider()
-							.getElements(anInputElement);
-					
-					INavigatorContentDescriptor foundDescriptor = foundExtension.getDescriptor();
-					localSet.setContributor(foundDescriptor, foundDescriptor);
-					localSet.setContents(contributedChildren);
-
-					overridingExtensions = foundExtension
-							.getOverridingExtensionsForTriggerPoint(anInputElement);
-
-					if (overridingExtensions.length > 0) { 
-						localSet = pipelineChildren(anInputElement,
-								overridingExtensions, foundDescriptor, localSet, ELEMENTS);						
-					}
-					finalElementsSet.addAll(localSet);
-				}
-			} catch (RuntimeException re) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), re);
-			} catch (Error e) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), e);
+	public Object[] getElements(Object anInputElement) {
+		Set rootContentExtensions = contentService.findRootContentExtensions(anInputElement);
+		return internalGetChildren(anInputElement, anInputElement, rootContentExtensions, ELEMENTS);
+	}
 
-			}
-		}
-		return finalElementsSet.toArray();
+	public Object[] getChildren(Object aParentElement) {
+		Set enabledExtensions = contentService.findContentExtensionsByTriggerPoint(aParentElement);
+		return internalGetChildren(aParentElement, aParentElement, enabledExtensions, !ELEMENTS);
 	}
 
-	/**
-	 * <p>
-	 * Return the children of the supplied aParentElement
-	 * </p>
-	 * 
-	 * <p>
-	 * This method will call out to its {@link NavigatorContentService} for
-	 * extensions that are enabled on the supplied aParentElement. The
-	 * extensions will then be queried for children for aParentElement. The
-	 * children returned from each extension will be aggregated and returned as
-	 * is -- there is no additional sorting or filtering at this level.
-	 * </p>
-	 * <p>
-	 * The results of this method will be displayed as children of the supplied
-	 * element in the TreeViewer.
-	 * </p>
-	 * {@inheritDoc}
-	 * 
-	 * @param aParentElement
-	 *            An element that requires children content in the viewer (e.g.
-	 *            an end-user expanded a node)
-	 * @return A non-null array of objects that are logical children of
-	 *         aParentElement
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
-	 */
-	public synchronized Object[] getChildren(Object aParentElement) {	
-		return internalGetChildren(aParentElement);
+	public Object[] getChildren(TreePath parentPath) {
+		Object aParentElement = internalAsElement(parentPath);
+		Set enabledExtensions = contentService.findContentExtensionsByTriggerPoint(aParentElement);
+		return internalGetChildren(aParentElement, parentPath, enabledExtensions, !ELEMENTS);
 	}
+	
+	private static final boolean ELEMENTS = true;
 
-	private Object[] internalGetChildren(Object aParentElementOrPath) {
-		contentService.resetContributionMemory();
-		Object aParentElement = internalAsElement(aParentElementOrPath);
-		Set enabledExtensions = contentService
-				.findContentExtensionsByTriggerPoint(aParentElement);
+	private Object[] internalGetChildren(final Object aParentElement,
+			final Object aParentElementOrPath, final Set enabledExtensions, final boolean elements) {
 		if (enabledExtensions.size() == 0) {
 			return NO_CHILDREN;
 		}
-		ContributorTrackingSet finalChildrenSet = new ContributorTrackingSet(contentService);
-		ContributorTrackingSet localSet = new ContributorTrackingSet(contentService);
-
-		Object[] contributedChildren = null;
-		NavigatorContentExtension foundExtension;
-		NavigatorContentExtension[] overridingExtensions;
-		for (Iterator itr = enabledExtensions.iterator(); itr.hasNext();) {
-			foundExtension = (NavigatorContentExtension) itr.next();
-			try {
-
-				if (!isOverridingExtensionInSet(foundExtension.getDescriptor(),
-						enabledExtensions)) {
-
-					contributedChildren = foundExtension.internalGetContentProvider()
-							.getChildren(aParentElementOrPath);
-
-					overridingExtensions = foundExtension
-							.getOverridingExtensionsForTriggerPoint(aParentElement);
-					
-					INavigatorContentDescriptor foundDescriptor = foundExtension.getDescriptor();
-					localSet.setContributor(foundDescriptor, foundDescriptor);
-					localSet.setContents(contributedChildren);
-
-					if (overridingExtensions.length > 0) {
-						// TODO: could pass tree path through pipeline						
-						localSet = pipelineChildren(aParentElement,
-								overridingExtensions, foundDescriptor, localSet, !ELEMENTS);
+		final Set finalSet = new LinkedHashSet();
+		final ContributorTrackingSet localSet = new ContributorTrackingSet(contentService);
+
+		for (final Iterator itr = enabledExtensions.iterator(); itr.hasNext();) {
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				NavigatorContentExtension foundExtension = (NavigatorContentExtension) itr.next();
+				Object[] contributedChildren = null;
+				NavigatorContentExtension[] overridingExtensions;
+
+				public void run() throws Exception {
+					if (!isOverridingExtensionInSet(foundExtension.getDescriptor(),
+							enabledExtensions)) {
+						if (elements)
+							contributedChildren = foundExtension.internalGetContentProvider()
+									.getElements(aParentElementOrPath);
+						else
+							contributedChildren = foundExtension.internalGetContentProvider()
+									.getChildren(aParentElementOrPath);
+						overridingExtensions = foundExtension
+								.getOverridingExtensionsForTriggerPoint(aParentElement);
+						INavigatorContentDescriptor foundDescriptor = foundExtension
+								.getDescriptor();
+						localSet.setContributor(foundDescriptor, foundDescriptor);
+						localSet.setContents(contributedChildren);
+
+						if (overridingExtensions.length > 0) {
+							pipelineChildren(aParentElement, overridingExtensions, foundDescriptor,
+									localSet, elements);
+						}
+						finalSet.addAll(localSet);
 					}
-					finalChildrenSet.addAll(localSet);
 				}
-			} catch (RuntimeException re) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), re);
-			} catch (Error e) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), e);
 
-			}
-		}
-		return finalChildrenSet.toArray();
+				public void handleException(Throwable e) {
+					NavigatorPlugin.logError(0, NLS.bind(
+							CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+									foundExtension.getDescriptor().getId(), aParentElement }), e);
+				}
+			});
+		}		
+
+		return finalSet.toArray();
 	}
 
-	private static final boolean ELEMENTS = true;
-	
 	/**
-	 * Query each of <code>theOverridingExtensions</code> for children, and
-	 * then pipe them through the Pipeline content provider.
+	 * Query each of <code>theOverridingExtensions</code> for children, and then
+	 * pipe them through the Pipeline content provider.
 	 * 
-	 * @param aParentOrPath
+	 * @param aParent
 	 *            The parent element in the tree
 	 * @param theOverridingExtensions
 	 *            The set of overriding extensions that should participate in
 	 *            the pipeline chain
-	 * @param theCurrentChildren
+	 * @param pipelinedChildren
 	 *            The current children to return to the viewer (should be
 	 *            modifiable)
-	 * @return The set of children to return to the viewer
 	 */
-	private ContributorTrackingSet pipelineChildren(Object aParentOrPath,
-			NavigatorContentExtension[] theOverridingExtensions, INavigatorContentDescriptor firstClassDescriptor,
-			ContributorTrackingSet theCurrentChildren, boolean elements) {
+	private void pipelineChildren(Object aParent, NavigatorContentExtension[] theOverridingExtensions,
+			INavigatorContentDescriptor firstClassDescriptor, ContributorTrackingSet pipelinedChildren, boolean elements) {
 		IPipelinedTreeContentProvider pipelinedContentProvider;
 		NavigatorContentExtension[] overridingExtensions;
-		ContributorTrackingSet pipelinedChildren = theCurrentChildren;
 		for (int i = 0; i < theOverridingExtensions.length; i++) {
 
-						
-			if (theOverridingExtensions[i].getContentProvider() instanceof IPipelinedTreeContentProvider) {
+			if (theOverridingExtensions[i].internalGetContentProvider().isPipelined()) {
 				pipelinedContentProvider = (IPipelinedTreeContentProvider) theOverridingExtensions[i]
-						.getContentProvider();
-				pipelinedChildren.setContributor((NavigatorContentDescriptor) theOverridingExtensions[i].getDescriptor(), firstClassDescriptor);	
+						.internalGetContentProvider();
+				pipelinedChildren.setContributor(theOverridingExtensions[i]
+						.getDescriptor(), firstClassDescriptor);
 				if (elements) {
-					pipelinedContentProvider.getPipelinedElements(aParentOrPath,
-							pipelinedChildren);
+					pipelinedContentProvider.getPipelinedElements(aParent, pipelinedChildren);
 				} else {
-					pipelinedContentProvider.getPipelinedChildren(aParentOrPath,
-							pipelinedChildren);
+					pipelinedContentProvider.getPipelinedChildren(aParent, pipelinedChildren);
 				}
-				
-				pipelinedChildren.setContributor(null, null);
-				
-				overridingExtensions = theOverridingExtensions[i]
-						.getOverridingExtensionsForTriggerPoint(aParentOrPath);
+				overridingExtensions = theOverridingExtensions[i].getOverridingExtensionsForTriggerPoint(aParent);
 				if (overridingExtensions.length > 0) {
-					pipelinedChildren = pipelineChildren(aParentOrPath,
-							overridingExtensions, firstClassDescriptor, pipelinedChildren, elements);
+					pipelineChildren(aParent, overridingExtensions, firstClassDescriptor, pipelinedChildren, elements);
 				}
 			}
 		}
-
-		return pipelinedChildren;
-
 	}
 
+	
 	/**
 	 * Currently this method only checks one level deep. If the suppressed
 	 * extension of the given descriptor is contained lower in the tree, then
@@ -351,8 +224,7 @@ public class NavigatorContentServiceContentProvider implements
 	 * @return True if the results should be pipelined through the downstream
 	 *         extensions.
 	 */
-	private boolean isOverridingExtensionInSet(
-			INavigatorContentDescriptor aDescriptor, Set theEnabledExtensions) {
+	private boolean isOverridingExtensionInSet(INavigatorContentDescriptor aDescriptor, Set theEnabledExtensions) {
 
 		if (aDescriptor.getSuppressedExtensionId() != null /*
 															 * The descriptor is
@@ -365,14 +237,13 @@ public class NavigatorContentServiceContentProvider implements
 			 * invoked twice; once as a first class extension, and once an
 			 * overriding extension.
 			 */
-			if (theEnabledExtensions.contains(contentService
-					.getExtension(aDescriptor.getOverriddenDescriptor()))) {
+			if (theEnabledExtensions.contains(contentService.getExtension(aDescriptor.getOverriddenDescriptor()))) {
 				return true;
 			}
 		}
 		return false;
 	}
-	
+
 	/**
 	 * Currently this method only checks one level deep. If the suppressed
 	 * extension of the given descriptor is contained lower in the tree, then
@@ -385,8 +256,7 @@ public class NavigatorContentServiceContentProvider implements
 	 * @return True if the results should be pipelined through the downstream
 	 *         extensions.
 	 */
-	private boolean isOverridingDescriptorInSet(
-			INavigatorContentDescriptor aDescriptor, Set theEnabledDescriptors) {
+	private boolean isOverridingDescriptorInSet(INavigatorContentDescriptor aDescriptor, Set theEnabledDescriptors) {
 
 		if (aDescriptor.getSuppressedExtensionId() != null /*
 															 * The descriptor is
@@ -405,87 +275,57 @@ public class NavigatorContentServiceContentProvider implements
 		}
 		return false;
 	}
-	
-	
 
-	/**
-	 * <p>
-	 * Returns the logical parent of anElement.
-	 * </p>
-	 * <p>
-	 * This method requires that any extension that would like an opportunity to
-	 * supply a parent for anElement expressly indicate that in the action
-	 * expression <enables> statement of the
-	 * <b>org.eclipse.ui.navigator.navigatorContent </b> extension point.
-	 * </p>
-	 * {@inheritDoc}
-	 * 
-	 * @param anElement
-	 *            An element that requires its logical parent - generally as a
-	 *            result of setSelection(expand=true) on the viewer
-	 * @return The logical parent if available or null if the parent cannot be
-	 *         determined
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
-	 */
-	public synchronized Object getParent(Object anElement) {
-		Set extensions = contentService
-				.findContentExtensionsWithPossibleChild(anElement);
+	public Object getParent(final Object anElement) {
+		final Set extensions = contentService.findContentExtensionsWithPossibleChild(anElement);
+		final Object[] parent = new Object[1];
 
-		Object parent;
-		NavigatorContentExtension foundExtension;
-		NavigatorContentExtension[] overridingExtensions;
 		for (Iterator itr = extensions.iterator(); itr.hasNext();) {
-			foundExtension = (NavigatorContentExtension) itr.next();
-			try {
+			final NavigatorContentExtension foundExtension = (NavigatorContentExtension) itr.next();
 
-				if (!isOverridingExtensionInSet(foundExtension.getDescriptor(),
-						extensions)) {
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				NavigatorContentExtension[] overridingExtensions;
 
-					parent = foundExtension.internalGetContentProvider().getParent(
-							anElement);
-
-					overridingExtensions = foundExtension
-							.getOverridingExtensionsForPossibleChild(anElement);
+				public void run() throws Exception {
+					if (!isOverridingExtensionInSet(foundExtension.getDescriptor(), extensions)) {
+						parent[0] = foundExtension.internalGetContentProvider()
+								.getParent(anElement);
+						overridingExtensions = foundExtension
+								.getOverridingExtensionsForPossibleChild(anElement);
+						if (overridingExtensions.length > 0) {
+							parent[0] = pipelineParent(anElement, overridingExtensions, parent);
+						}
 
-					if (overridingExtensions.length > 0) {
-						parent = pipelineParent(anElement,
-								overridingExtensions, parent);
+						if (parent[0] != null) {
+							return;
+						}
 					}
+				}
 
-					if (parent != null) {
-						return parent;
-					}
+				public void handleException(Throwable e) {
+					NavigatorPlugin.logError(0, NLS.bind(
+							CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+									foundExtension.getDescriptor().getId(), anElement }), e);
 				}
-			} catch (RuntimeException re) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), re);
-			} catch (Error e) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), e);
+			});
+		}
+		return parent[0];
+	}
 
-			}
+	public TreePath[] getParents(Object anElement) {
+		List paths = new ArrayList();
+		TreePathCompiler compiler = new TreePathCompiler(anElement);
+		Set compilers = findPaths(compiler);
+		for (Iterator iter = compilers.iterator(); iter.hasNext();) {
+			TreePathCompiler c = (TreePathCompiler) iter.next();
+			paths.add(c.createParentPath());
 		}
+		return (TreePath[]) paths.toArray(new TreePath[paths.size()]);
 
-		return null;
 	}
-
 	/**
-	 * Query each of <code>theOverridingExtensions</code> for elements, and
-	 * then pipe them through the Pipeline content provider.
+	 * Query each of <code>theOverridingExtensions</code> for elements, and then
+	 * pipe them through the Pipeline content provider.
 	 * 
 	 * @param anInputElement
 	 *            The input element in the tree
@@ -497,26 +337,23 @@ public class NavigatorContentServiceContentProvider implements
 	 *            modifiable)
 	 * @return The set of elements to return to the viewer
 	 */
-	private Object pipelineParent(Object anInputElement,
-			NavigatorContentExtension[] theOverridingExtensions,
+	private Object pipelineParent(Object anInputElement, NavigatorContentExtension[] theOverridingExtensions,
 			Object theCurrentParent) {
 		IPipelinedTreeContentProvider pipelinedContentProvider;
 		NavigatorContentExtension[] overridingExtensions;
 		Object aSuggestedParent = null;
 		for (int i = 0; i < theOverridingExtensions.length; i++) {
 
-			if (theOverridingExtensions[i].getContentProvider() instanceof IPipelinedTreeContentProvider) {
+			if (theOverridingExtensions[i].internalGetContentProvider().isPipelined()) {
 				pipelinedContentProvider = (IPipelinedTreeContentProvider) theOverridingExtensions[i]
-						.getContentProvider();
+						.internalGetContentProvider();
 
-				aSuggestedParent = pipelinedContentProvider.getPipelinedParent(
-						anInputElement, aSuggestedParent);
+				aSuggestedParent = pipelinedContentProvider.getPipelinedParent(anInputElement, aSuggestedParent);
 
 				overridingExtensions = theOverridingExtensions[i]
 						.getOverridingExtensionsForTriggerPoint(anInputElement);
 				if (overridingExtensions.length > 0) {
-					aSuggestedParent = pipelineParent(anInputElement,
-							overridingExtensions, aSuggestedParent);
+					aSuggestedParent = pipelineParent(anInputElement, overridingExtensions, aSuggestedParent);
 				}
 			}
 		}
@@ -524,34 +361,95 @@ public class NavigatorContentServiceContentProvider implements
 	}
 
 	/**
-	 * <p>
-	 * Used to determine of anElement should be displayed with a '+' or not.
-	 * </p>
-	 * {@inheritDoc}
+	 * Calculate hasChildren for both an element or a path.
 	 * 
-	 * @param anElement
-	 *            The element in question
-	 * @return True if anElement has logical children as returned by this
-	 *         content provider.
-	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+	 *  If any of the first class NCEs don't implement the IPipelinedTreeContentProviderHasChildren 
+	 *  and they return true, then we have to use that as the value, as we are obliged to take
+	 *  the union of the non-pipelined calls. This may result in a false positive hasChildren
+	 *  indication if the pipeline mechanism does not actually contribute children later.
+	 *  For pipelined calls, we simply ask the pipelined content provider about the children
+	 *  and they can override this as they would in the case where they are providing the objects.
 	 */
-	public synchronized boolean hasChildren(Object anElement) {
-		Set resultInstances = contentService
-				.findContentExtensionsByTriggerPoint(anElement);
-
-		NavigatorContentExtension ext;
-		for (Iterator itr = resultInstances.iterator(); itr.hasNext();) {
-			ext = (NavigatorContentExtension) itr.next();
-			if (!ext.isLoaded() && !enforceHasChildren) {
-				return true;
-			} else if (ext.internalGetContentProvider().hasChildren(anElement)) {
-				return true;
-			}
+	public boolean hasChildren(final Object anElementOrPath) {
+		final Object anElement = internalAsElement(anElementOrPath);
+		final Set enabledExtensions = contentService.findContentExtensionsByTriggerPoint(anElement);
+		final boolean suggestedHasChildren[] = new boolean[1];
+
+		for (final Iterator itr = enabledExtensions.iterator(); itr.hasNext();) {
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				NavigatorContentExtension ext;
+
+				public void run() throws Exception {
+					ext = (NavigatorContentExtension) itr.next();
+
+					if (!ext.isLoaded() && !enforceHasChildren) {
+						suggestedHasChildren[0] = true;
+						return;
+					}
+
+					NavigatorContentExtension[] overridingExtensions;
+					if (!isOverridingExtensionInSet(ext.getDescriptor(), enabledExtensions)) {
+						SafeDelegateTreeContentProvider cp = ext.internalGetContentProvider();
+						suggestedHasChildren[0] |= callNormalHasChildren(anElementOrPath,
+								anElement, cp);
+						overridingExtensions = ext
+								.getOverridingExtensionsForTriggerPoint(anElement);
+
+						if (overridingExtensions.length > 0) {
+							suggestedHasChildren[0] = pipelineHasChildren(anElementOrPath,
+									anElement, overridingExtensions, suggestedHasChildren[0]);
+						}
+						if (suggestedHasChildren[0]) {
+							return;
+
+						}
+					}
+				}
+
+				public void handleException(Throwable e) {
+					NavigatorPlugin.logError(0, NLS.bind(
+							CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+									ext.getDescriptor().getId(), anElementOrPath }), e);
+				}
+			});
 		}
+		return suggestedHasChildren[0];
+	}
 
-		return false;
+	public boolean hasChildren(TreePath path) {
+		return hasChildren((Object)path);
+	}
+
+	private boolean callNormalHasChildren(Object anElementOrPath, Object anElement, SafeDelegateTreeContentProvider cp) {
+		if (cp.isTreePath() && anElementOrPath instanceof TreePath) {
+			ITreePathContentProvider tpcp = (ITreePathContentProvider) cp;
+			return tpcp.hasChildren((TreePath) anElementOrPath);
+		}
+		return ((ITreeContentProvider) cp).hasChildren(anElement);
 	}
 
+	private boolean pipelineHasChildren(Object anElementOrPath, Object anElement,
+			NavigatorContentExtension[] theOverridingExtensions, boolean suggestedHasChildren) {
+		NavigatorContentExtension[] overridingExtensions;
+		for (int i = 0; i < theOverridingExtensions.length; i++) {
+
+			SafeDelegateTreeContentProvider cp = theOverridingExtensions[i].internalGetContentProvider();
+			if (cp.isPipelinedHasChildren()) {
+				suggestedHasChildren = cp.hasPipelinedChildren(
+						anElement, suggestedHasChildren);
+				overridingExtensions = theOverridingExtensions[i]
+						.getOverridingExtensionsForTriggerPoint(anElement);
+				if (overridingExtensions.length > 0) {
+					suggestedHasChildren = pipelineHasChildren(anElementOrPath, anElement,
+							overridingExtensions, suggestedHasChildren);
+				}
+			} else  {
+				suggestedHasChildren |= callNormalHasChildren(anElementOrPath, anElement, cp);
+			}
+		}
+		return suggestedHasChildren;
+	}		
+
 	/**
 	 * <p>
 	 * Handles any necessary clean up of the {@link NavigatorContentService}
@@ -565,95 +463,17 @@ public class NavigatorContentServiceContentProvider implements
 	 * 
 	 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
 	 */
-	public synchronized void dispose() {
-		if (isContentServiceSelfManaged) {
+	public void dispose() {
+		if (disposeContentService) {
 			contentService.dispose();
 		}
 	}
 
 	/**
-	 * <p>
-	 * Indicates that the current content provider is now representing a
-	 * different input element. The input element is the root thing that the
-	 * viewer displays.
-	 * </p>
-	 * <p>
-	 * This method should handle any cleanup associated with the old input
-	 * element and any initialization associated with the new input element.
-	 * </p>
-	 * {@inheritDoc}
-	 * 
-	 * @param aViewer
-	 *            The viewer that the current content provider is associated
-	 *            with
-	 * @param anOldInput
-	 *            The original input element that the viewer was visualizing
-	 * @param aNewInput
-	 *            The new input element that the viewer will visualize.
-	 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-	 *      java.lang.Object, java.lang.Object)
-	 * 
-	 */
-	public synchronized void inputChanged(Viewer aViewer, Object anOldInput,
-			Object aNewInput) {
-		viewer = aViewer;
-		contentService.updateService(aViewer, anOldInput, aNewInput);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreePathContentProvider#getChildren(org.eclipse.jface.viewers.TreePath)
-	 */
-	public Object[] getChildren(TreePath parentPath) {
-		return internalGetChildren(parentPath);
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreePathContentProvider#hasChildren(org.eclipse.jface.viewers.TreePath)
-	 */
-	public boolean hasChildren(TreePath path) {
-		Object anElement = internalAsElement(path);
-		Set resultInstances = contentService
-				.findContentExtensionsByTriggerPoint(anElement);
-
-		NavigatorContentExtension ext;
-		for (Iterator itr = resultInstances.iterator(); itr.hasNext();) {
-			ext = (NavigatorContentExtension) itr.next();
-			if (!ext.isLoaded() && !enforceHasChildren)
-				return true;
-			ITreeContentProvider cp = ext.internalGetContentProvider();
-			if (cp instanceof ITreePathContentProvider) {
-				ITreePathContentProvider tpcp = (ITreePathContentProvider) cp;
-				if (tpcp.hasChildren(path)) {
-					return true;
-				}
-			} else if (cp.hasChildren(anElement))
-				return true;
-		}
-
-		return false;
-	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.jface.viewers.ITreePathContentProvider#getParents(java.lang.Object)
-	 */
-	public TreePath[] getParents(Object anElement) {
-		
-		List paths = new ArrayList();
-		TreePathCompiler compiler = new TreePathCompiler(anElement); 
-		Set compilers = findPaths(compiler);
-		for (Iterator iter = compilers.iterator(); iter.hasNext();) {
-			TreePathCompiler c = (TreePathCompiler) iter.next();
-			paths.add(c.createParentPath());
-			
-		}
-		return (TreePath[]) paths.toArray(new TreePath[paths.size()]);
-		 
-	}
-  
-
-	/**
 	 * Get the element from an element or tree path argument.
-	 * @param parentElementOrPath the element or tree path
+	 * 
+	 * @param parentElementOrPath
+	 *            the element or tree path
 	 * @return the element
 	 */
 	private Object internalAsElement(Object parentElementOrPath) {
@@ -667,7 +487,6 @@ public class NavigatorContentServiceContentProvider implements
 		}
 		return parentElementOrPath;
 	}
-	
 
 	class CyclicPathException extends Exception {
 
@@ -675,14 +494,13 @@ public class NavigatorContentServiceContentProvider implements
 
 		protected CyclicPathException(TreePathCompiler compiler, Object invalidSegment, boolean asChild) {
 			super("Cannot add " + invalidSegment + //$NON-NLS-1$ 
-					" to the list of segments in " + compiler +  //$NON-NLS-1$ 
-					(asChild ? " as a child." : " as a parent.") ); //$NON-NLS-1$ //$NON-NLS-2$
+					" to the list of segments in " + compiler + //$NON-NLS-1$ 
+					(asChild ? " as a child." : " as a parent.")); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
 
 	class TreePathCompiler {
 
-
 		private final LinkedList segments = new LinkedList();
 
 		protected TreePathCompiler(Object segment) {
@@ -700,14 +518,14 @@ public class NavigatorContentServiceContentProvider implements
 		}
 
 		protected void addParent(Object segment) throws CyclicPathException {
-			if(segments.contains(segment)) {
+			if (segments.contains(segment)) {
 				throw new CyclicPathException(this, segment, false);
 			}
 			segments.addFirst(segment);
 		}
 
 		protected void addChild(Object segment) throws CyclicPathException {
-			if(segments.contains(segment)) {
+			if (segments.contains(segment)) {
 				throw new CyclicPathException(this, segment, false);
 			}
 			segments.addLast(segment);
@@ -732,20 +550,22 @@ public class NavigatorContentServiceContentProvider implements
 			parentSegments.removeLast();
 			return new TreePath(parentSegments.toArray());
 		}
-		
+
 		public Object getLastSegment() {
 			return segments.getLast();
 		}
-		
+
 		public Object getFirstSegment() {
 			return segments.getFirst();
 		}
-		
-		/* (non-Javadoc)
+
+		/*
+		 * (non-Javadoc)
+		 * 
 		 * @see java.lang.Object#toString()
 		 */
 		public String toString() {
-		
+
 			StringBuffer buffer = new StringBuffer();
 			for (Iterator iter = segments.iterator(); iter.hasNext();) {
 				Object segment = iter.next();
@@ -758,17 +578,17 @@ public class NavigatorContentServiceContentProvider implements
 
 	private Set findPaths(TreePathCompiler aPathCompiler) {
 
-		Set/* <Object> */ parents = findParents(aPathCompiler.getFirstSegment());
-		Set/* <TreePathCompiler> */ parentPaths = new LinkedHashSet();
-		Set/* <TreePathCompiler> */ foundPaths = Collections.EMPTY_SET;
+		Set/* <Object> */parents = findParents(aPathCompiler.getFirstSegment());
+		Set/* <TreePathCompiler> */parentPaths = new LinkedHashSet();
+		Set/* <TreePathCompiler> */foundPaths = Collections.EMPTY_SET;
 		if (parents.size() > 0) {
 			for (Iterator parentIter = parents.iterator(); parentIter.hasNext();) {
 				Object parent = (Object) parentIter.next();
 				TreePathCompiler c = new TreePathCompiler(aPathCompiler);
 				try {
-					c.addParent(parent); 
+					c.addParent(parent);
 					foundPaths = findPaths(c);
-				} catch(CyclicPathException cpe) {
+				} catch (CyclicPathException cpe) {
 					String msg = cpe.getMessage() != null ? cpe.getMessage() : cpe.toString();
 					NavigatorPlugin.logError(0, msg, cpe);
 				}
@@ -782,100 +602,75 @@ public class NavigatorContentServiceContentProvider implements
 
 	}
 
-	private Set findParents(Object anElement) {
-
-		Set descriptors = contentService.findDescriptorsWithPossibleChild(
-				anElement, false);
-		Set parents = new LinkedHashSet();
-		NavigatorContentDescriptor foundDescriptor;
-		NavigatorContentExtension foundExtension;
-		Object parent = null;
-		for (Iterator itr = descriptors.iterator(); itr.hasNext();) {
-			foundDescriptor = (NavigatorContentDescriptor) itr.next();
-			foundExtension = contentService.getExtension(foundDescriptor);
-			try {
-
-				if (!isOverridingDescriptorInSet(
-						foundExtension.getDescriptor(), descriptors)) {
-
-					/* internalGetContentProvider returns the real delegate */
-					if (foundExtension.getContentProvider() instanceof ITreePathContentProvider) {
-						/*
-						 * but we use the safe version to automatically handle
-						 * errors
-						 */
-						TreePath[] parentTreePaths = ((ITreePathContentProvider) foundExtension
-								.internalGetContentProvider())
-								.getParents(anElement);
-
-						for (int i = 0; i < parentTreePaths.length; i++) {
-
-							parent = parentTreePaths[i].getLastSegment();
-							if ((parent = findParent(foundExtension, anElement,
-									parent)) != null)
-								parents.add(parent);
-						}
+	private Set findParents(final Object anElement) {
+		final Set descriptors = contentService.findDescriptorsWithPossibleChild(anElement, false);
+		final Set parents = new LinkedHashSet();
 
-					} else {
+		for (final Iterator itr = descriptors.iterator(); itr.hasNext();) {
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				NavigatorContentDescriptor foundDescriptor;
+				NavigatorContentExtension foundExtension;
+				Object parent = null;
 
-						parent = foundExtension.internalGetContentProvider()
-								.getParent(anElement);
-						if ((parent = findParent(foundExtension, anElement,
-								parent)) != null)
-							parents.add(parent);
+				public void run() throws Exception {
+					foundDescriptor = (NavigatorContentDescriptor) itr.next();
+					foundExtension = contentService.getExtension(foundDescriptor);
+
+					if (!isOverridingDescriptorInSet(foundExtension.getDescriptor(), descriptors)) {
+						if (foundExtension.internalGetContentProvider().isTreePath()) {
+							TreePath[] parentTreePaths = ((ITreePathContentProvider) foundExtension
+									.internalGetContentProvider()).getParents(anElement);
+
+							for (int i = 0; i < parentTreePaths.length; i++) {
+
+								parent = parentTreePaths[i].getLastSegment();
+								if ((parent = findParent(foundExtension, anElement, parent)) != null)
+									parents.add(parent);
+							}
+
+						} else {
+							parent = foundExtension.internalGetContentProvider().getParent(
+									anElement);
+							if ((parent = findParent(foundExtension, anElement, parent)) != null)
+								parents.add(parent);
+						}
 					}
 				}
 
-			} catch (RuntimeException re) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), re);
-			} catch (Error e) {
-				NavigatorPlugin
-						.logError(
-								0,
-								NLS
-										.bind(
-												CommonNavigatorMessages.Could_not_provide_children_for_element,
-												new Object[] { foundExtension
-														.getDescriptor()
-														.getId() }), e);
-		
-			} 
+				public void handleException(Throwable e) {
+					NavigatorPlugin.logError(0, NLS.bind(
+							CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+									foundExtension.getDescriptor().getId(), anElement }), e);
+				}
+			});
 		}
-		
+
 		return parents;
-		
+
 	}
-	 
-	
+
 	private Object findParent(NavigatorContentExtension anExtension, Object anElement, Object aSuggestedParent) {
-		
+
 		/* the last valid (non-null) parent for the anElement */
 		Object lastValidParent = aSuggestedParent;
 		/* used to keep track of new suggestions */
 		Object suggestedOverriddenParent = null;
-		IPipelinedTreeContentProvider piplineContentProvider; 
-		NavigatorContentExtension[] overridingExtensions = anExtension.getOverridingExtensionsForPossibleChild(anElement); 
+		IPipelinedTreeContentProvider piplineContentProvider;
+		NavigatorContentExtension[] overridingExtensions = anExtension
+				.getOverridingExtensionsForPossibleChild(anElement);
 		for (int i = 0; i < overridingExtensions.length; i++) {
-			if(overridingExtensions[i].getContentProvider() instanceof IPipelinedTreeContentProvider) {
-				piplineContentProvider = (IPipelinedTreeContentProvider) overridingExtensions[i].getContentProvider(); 
+			if (overridingExtensions[i].internalGetContentProvider().isPipelined()) {
+				piplineContentProvider = (IPipelinedTreeContentProvider) overridingExtensions[i].internalGetContentProvider();
 				suggestedOverriddenParent = piplineContentProvider.getPipelinedParent(anElement, lastValidParent);
-				
-				if(suggestedOverriddenParent != null)
-					lastValidParent = suggestedOverriddenParent; 
-				
-				// should never return null 
+
+				if (suggestedOverriddenParent != null && !suggestedOverriddenParent.equals(aSuggestedParent))
+					lastValidParent = suggestedOverriddenParent;
+
+				// should never return null
 				lastValidParent = findParent(overridingExtensions[i], anElement, lastValidParent);
 			}
-				
-		} 
+
+		}
 		return lastValidParent;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceLabelProvider.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceLabelProvider.java
index fc2d93a..62c03c4 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceLabelProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorContentServiceLabelProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorFilterService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorFilterService.java
index 40acd8f..e31f101 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorFilterService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorFilterService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,10 @@ import java.util.Map;
 import java.util.Set;
 
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.ui.internal.navigator.filters.CommonFilterDescriptor;
 import org.eclipse.ui.internal.navigator.filters.CommonFilterDescriptorManager;
@@ -62,32 +65,28 @@ public class NavigatorFilterService implements INavigatorFilterService {
 	}
 
 	private synchronized void restoreFilterActivation() {
+		SafeRunner.run(new NavigatorSafeRunnable() {
+			public void run() throws Exception {
+				IEclipsePreferences prefs = NavigatorContentService.getPreferencesRoot();
+
+				if (prefs.get(getFilterActivationPreferenceKey(), null) != null) {
+					String activatedFiltersPreferenceValue = prefs.get(
+							getFilterActivationPreferenceKey(), null);
+					String[] activeFilterIds = activatedFiltersPreferenceValue.split(DELIM);
+					for (int i = 0; i < activeFilterIds.length; i++) {
+						activeFilters.add(activeFilterIds[i]);
+					}
 
-		try {
-			IEclipsePreferences prefs = NavigatorContentService.getPreferencesRoot();
-
-			if (prefs.get(getFilterActivationPreferenceKey(), null) != null) {
-				String activatedFiltersPreferenceValue = prefs
-						.get(getFilterActivationPreferenceKey(), null);
-				String[] activeFilterIds = activatedFiltersPreferenceValue
-						.split(DELIM);
-				for (int i = 0; i < activeFilterIds.length; i++) {
-					activeFilters.add(activeFilterIds[i]);
-				}
-
-			} else {
-				ICommonFilterDescriptor[] visibleFilterDescriptors = getVisibleFilterDescriptors();
-				for (int i = 0; i < visibleFilterDescriptors.length; i++) {
-					if (visibleFilterDescriptors[i].isActiveByDefault()) {
-						activeFilters.add(visibleFilterDescriptors[i].getId());
+				} else {
+					ICommonFilterDescriptor[] visibleFilterDescriptors = getVisibleFilterDescriptors();
+					for (int i = 0; i < visibleFilterDescriptors.length; i++) {
+						if (visibleFilterDescriptors[i].isActiveByDefault()) {
+							activeFilters.add(visibleFilterDescriptors[i].getId());
+						}
 					}
 				}
 			}
-
-		} catch (RuntimeException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
-
+		});
 	}
 
 	/*
@@ -98,6 +97,8 @@ public class NavigatorFilterService implements INavigatorFilterService {
 	public void persistFilterActivationState() {
 
 		synchronized (activeFilters) {
+			CommonFilterDescriptorManager dm = CommonFilterDescriptorManager
+			.getInstance();
 
 			/*
 			 * by creating a StringBuffer with DELIM, we ensure the string is
@@ -106,14 +107,16 @@ public class NavigatorFilterService implements INavigatorFilterService {
 			StringBuffer activatedFiltersPreferenceValue = new StringBuffer(DELIM);
 
 			for (Iterator activeItr = activeFilters.iterator(); activeItr.hasNext();) {
-				activatedFiltersPreferenceValue.append(activeItr.next().toString()).append(DELIM);
+				String id = activeItr.next().toString();
+				if (!dm.getFilterById(id).isVisibleInUi())
+					continue;
+				activatedFiltersPreferenceValue.append(id).append(DELIM);
 			}
 
 			IEclipsePreferences prefs = NavigatorContentService.getPreferencesRoot();
 			prefs.put(getFilterActivationPreferenceKey(), activatedFiltersPreferenceValue.toString());
 			NavigatorContentService.flushPreferences(prefs);
 		}
-
 	}
 	
 	/**
@@ -193,6 +196,14 @@ public class NavigatorFilterService implements INavigatorFilterService {
 				contentService);
 	}
 
+	/**
+	 * @return the visible filter descriptors for the UI
+	 */
+	public ICommonFilterDescriptor[] getVisibleFilterDescriptorsForUI() {
+		return CommonFilterDescriptorManager.getInstance().findVisibleFilters(
+				contentService, CommonFilterDescriptorManager.FOR_UI);
+	}
+
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -216,7 +227,66 @@ public class NavigatorFilterService implements INavigatorFilterService {
 			activeFilters.addAll(Arrays.asList(theFilterIds));
 		}
 	}
+	
+	public void activateFilterIdsAndUpdateViewer(String[] filterIdsToActivate) {
+		boolean updateFilterActivation = false;
+
+		// we sort the array in order to use Array.binarySearch();
+		Arrays.sort(filterIdsToActivate);
+		CommonFilterDescriptor[] visibleFilterDescriptors = (CommonFilterDescriptor[]) getVisibleFilterDescriptors();
+
+		int indexofFilterIdToBeActivated;
+
+		List nonUiVisible = null;
+		
+		/* is there a delta? */
+		for (int i = 0; i < visibleFilterDescriptors.length; i++) {
+			indexofFilterIdToBeActivated = Arrays.binarySearch(filterIdsToActivate,
+					visibleFilterDescriptors[i].getId());
+			/*
+			 * Either we have a filter that should be active that isn't XOR a
+			 * filter that shouldn't be active that is currently
+			 */
+			if (indexofFilterIdToBeActivated >= 0 ^ isActive(visibleFilterDescriptors[i].getId())) {
+				updateFilterActivation = true;
+			}
+			
+			// We don't turn of non-UI visible filters here, they have to be manipulated explicitly
+			if (!visibleFilterDescriptors[i].isVisibleInUi()) {
+				if (nonUiVisible == null)
+					nonUiVisible = new ArrayList();
+				nonUiVisible.add(visibleFilterDescriptors[i].getId());
+			}
+		}
+
+		/* If so, update */
+		if (updateFilterActivation) {
+			if (nonUiVisible != null) {
+				for (int i = 0; i < filterIdsToActivate.length; i++)
+					nonUiVisible.add(filterIdsToActivate[i]);
+				filterIdsToActivate = (String[]) nonUiVisible.toArray(new String[]{});
+			}
+			
+			setActiveFilterIds(filterIdsToActivate);
+			persistFilterActivationState();
+			updateViewer();
+			// the action providers may no longer be enabled, so we
+			// reset the selection.
+			StructuredViewer commonViewer = (StructuredViewer) contentService.getViewer();
+			commonViewer.setSelection(StructuredSelection.EMPTY);
+		}
+	}
+
+	/**
+	 * Updates the viewer filters to match the active filters.
+	 */
+	public void updateViewer() {
+		StructuredViewer commonViewer = (StructuredViewer) contentService.getViewer();
 
+		ViewerFilter[] visibleFilters =	getVisibleFilters(true);
+		commonViewer.setFilters(visibleFilters);
+	}		
+		
 	/**
 	 * Activate the given array without disabling all other filters.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java
index 66618eb..8e2431a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPipelineService.java
@@ -16,7 +16,11 @@ import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Set;
 
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.osgi.util.NLS;
+
+import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
 import org.eclipse.ui.navigator.INavigatorPipelineService;
@@ -42,31 +46,6 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 		contentService = aContentService;
 	}
 
-	/**
-	 * Intercept attempts to add elements directly to the viewer.
-	 * 
-	 * <p>
-	 * For content extensions that reshape the structure of children in a
-	 * viewer, their overridden extensions may sometimes use optimized refreshes
-	 * to add elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
-	 * Clients may add, remove, or modify elements in the given set of added
-	 * children. Clients should return a set for downstream extensions to
-	 * massage further.
-	 * </p>
-	 * <p>
-	 * <b>Clients should not call any of the add, remove, refresh, or update
-	 * methods on the viewer from this method or any code invoked by the
-	 * implementation of this method.</b>
-	 * </p>
-	 * 
-	 * @param anAddModification
-	 *            The shape modification which contains the current suggested
-	 *            parent and children. Clients may modify this parameter
-	 *            directly and return it as the new shape modification.
-	 * @return The new shape modification to use. Clients should <b>never</b>
-	 *         return <b>null</b> from this method.
-	 */
 	public PipelinedShapeModification interceptAdd(
 			PipelinedShapeModification anAddModification) {
 		
@@ -77,129 +56,103 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 		
 		for (Iterator descriptorsItr = contentDescriptors.iterator(); descriptorsItr.hasNext();) {
 			INavigatorContentDescriptor descriptor = (INavigatorContentDescriptor) descriptorsItr.next();
-			pipelineInterceptAdd(anAddModification, trackedSet, descriptor); 
-		}		 
-
+			pipelineInterceptAdd(anAddModification, trackedSet, descriptor);
+		}
 		return anAddModification;
-
 	}
  
-	private void pipelineInterceptAdd(PipelinedShapeModification anAddModification, ContributorTrackingSet trackedSet, INavigatorContentDescriptor descriptor) {
-		if(descriptor.hasOverridingExtensions()) {
+	private void pipelineInterceptAdd(final PipelinedShapeModification anAddModification,
+			final ContributorTrackingSet trackedSet, final INavigatorContentDescriptor descriptor) {
+		if (descriptor.hasOverridingExtensions()) {
 			Set overridingDescriptors = descriptor.getOverriddingExtensions();
 			for (Iterator overridingDescriptorsItr = overridingDescriptors.iterator(); overridingDescriptorsItr
 					.hasNext();) {
-				INavigatorContentDescriptor overridingDescriptor = (INavigatorContentDescriptor) overridingDescriptorsItr.next();
-				if(contentService.isVisible(overridingDescriptor.getId()) && contentService.isActive(overridingDescriptor.getId())) {
-					trackedSet.setContributor(overridingDescriptor, descriptor);
-					NavigatorContentExtension extension = contentService.getExtension(overridingDescriptor);
-					((IPipelinedTreeContentProvider) extension.internalGetContentProvider()).interceptAdd(anAddModification);					
+				INavigatorContentDescriptor overridingDescriptor = (INavigatorContentDescriptor) overridingDescriptorsItr
+						.next();
+				if (contentService.isVisible(overridingDescriptor.getId())
+						&& contentService.isActive(overridingDescriptor.getId())) {
+					trackedSet.setContributor((NavigatorContentDescriptor) overridingDescriptor,
+							(NavigatorContentDescriptor) descriptor);
+					final NavigatorContentExtension extension = contentService
+							.getExtension(overridingDescriptor);
+					if (extension.internalGetContentProvider().isPipelined()) {
+						SafeRunner.run(new NavigatorSafeRunnable() {
+							public void run() throws Exception {
+								((IPipelinedTreeContentProvider) extension
+										.internalGetContentProvider())
+										.interceptAdd(anAddModification);
+							}
+
+							public void handleException(Throwable e) {
+								NavigatorPlugin.logError(0, NLS.bind(
+										CommonNavigatorMessages.Exception_Invoking_Extension,
+										new Object[] { extension.getDescriptor().getId(), null }),
+										e);
+							}
+						});
+					}
 					trackedSet.setContributor(null, null);
 					pipelineInterceptAdd(anAddModification, trackedSet, overridingDescriptor);
 				}
-			}		
-		}  
-	} 
-	 
+			}
+		}
+	}
 
-	/**
-	 * Intercept attempts to remove elements directly from the viewer.
-	 * 
-	 * <p>
-	 * For content extensions that reshape the structure of children in a
-	 * viewer, their overridden extensions may sometimes use optimized refreshes
-	 * to remove elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
-	 * Clients may add, remove, or modify elements in the given set of removed
-	 * children. Clients should return a set for downstream extensions to
-	 * massage further.
-	 * </p>
-	 * <p>
-	 * <b>Clients should not call any of the add, remove, refresh, or update
-	 * methods on the viewer from this method or any code invoked by the
-	 * implementation of this method.</b>
-	 * </p>
-	 * 
-	 * @param aRemoveModification
-	 *            The shape modification which contains the current suggested
-	 *            parent and children. Clients may modify this parameter
-	 *            directly and return it as the new shape modification.
-	 * @return The new shape modification to use. Clients should <b>never</b>
-	 *         return <b>null</b> from this method.
-	 */
 	public PipelinedShapeModification interceptRemove(
 			PipelinedShapeModification aRemoveModification) {
 		
-		ContributorTrackingSet trackedSet =(ContributorTrackingSet) aRemoveModification.getChildren(); 
+		ContributorTrackingSet trackedSet =(ContributorTrackingSet) aRemoveModification.getChildren();
 
-		Set interestedExtensions = new LinkedHashSet(); 	
+		Set interestedExtensions = new LinkedHashSet();
 		for (Iterator iter = trackedSet.iterator(); iter.hasNext();) {
 			Object element = (Object) iter.next();
 			if(element instanceof TreePath) {
 				interestedExtensions.addAll(contentService.findOverrideableContentExtensionsForPossibleChild(((TreePath)element).getLastSegment()));
-			} else { 
+			} else {
 				interestedExtensions = contentService.findOverrideableContentExtensionsForPossibleChild(element);
 				
-			} 
+			}
 		}
-		for (Iterator overridingExtensionsIter = interestedExtensions.iterator(); overridingExtensionsIter.hasNext();)  
+		for (Iterator overridingExtensionsIter = interestedExtensions.iterator(); overridingExtensionsIter.hasNext();)
 			pipelineInterceptRemove(aRemoveModification, trackedSet, (NavigatorContentExtension) overridingExtensionsIter.next());
 		return aRemoveModification;
 	}
 	
+	private void pipelineInterceptRemove(final PipelinedShapeModification aRemoveModification,
+			final ContributorTrackingSet trackedSet,
+			final NavigatorContentExtension overrideableExtension) {
 
-	private void pipelineInterceptRemove(PipelinedShapeModification aRemoveModification, ContributorTrackingSet trackedSet, NavigatorContentExtension overrideableExtension) {
-		
-		
-		try {
-			NavigatorContentExtension overridingExtension = null;
-			Set overridingExtensions = new LinkedHashSet();
-			for (Iterator iter = trackedSet.iterator(); iter.hasNext();) {
-				Object element = (Object) iter.next();
-				if(element instanceof TreePath) {
-					overridingExtensions.addAll(Arrays.asList(overrideableExtension.getOverridingExtensionsForPossibleChild(((TreePath)element).getLastSegment())));
-				} else { 
-					overridingExtensions.addAll(Arrays.asList(overrideableExtension.getOverridingExtensionsForPossibleChild(element)));				
-				} 
+		final Set overridingExtensions = new LinkedHashSet();
+		overridingExtensions.addAll(Arrays.asList(overrideableExtension
+				.getOverridingExtensions()));
+
+		for (Iterator extensionsItr = overridingExtensions.iterator(); extensionsItr
+				.hasNext();) {
+			final NavigatorContentExtension overridingExtension = (NavigatorContentExtension) extensionsItr
+					.next();
+			trackedSet.setContributor((NavigatorContentDescriptor) overridingExtension
+					.getDescriptor(), null);
+			if (overridingExtension.internalGetContentProvider().isPipelined()) {
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						((IPipelinedTreeContentProvider) overridingExtension
+								.internalGetContentProvider()).interceptRemove(aRemoveModification);
+					}
+
+					public void handleException(Throwable e) {
+						NavigatorPlugin.logError(0, NLS.bind(
+								CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+										overridingExtension.getDescriptor().getId(), null }), e);
+					}
+				});
 			}
-			 
-			for (Iterator extensionsItr = overridingExtensions.iterator(); extensionsItr.hasNext();) {
-				overridingExtension = (NavigatorContentExtension) extensionsItr.next();
-				trackedSet.setContributor(overridingExtension.getDescriptor(), null);
-				if (overridingExtension.getContentProvider() instanceof IPipelinedTreeContentProvider) {
-					((IPipelinedTreeContentProvider) overridingExtension.getContentProvider()).interceptRemove(aRemoveModification);
-				}
-				trackedSet.setContributor(null, null);
-				if(overridingExtension.getDescriptor().hasOverridingExtensions())
-					pipelineInterceptRemove(aRemoveModification, trackedSet, overridingExtension);
-												
-			} 	
-			
-		} catch (Throwable e) {
-			String msg = e.getMessage() != null ? e.getMessage()  : e.toString();
-			NavigatorPlugin.logError(0, msg, e);
-		}  
+			trackedSet.setContributor(null, null);
+			if (overridingExtension.getDescriptor().hasOverridingExtensions())
+				pipelineInterceptRemove(aRemoveModification, trackedSet, overridingExtension);
+		}
+
 	}
 
-	/**
-	 * Intercept calls to viewer <code>refresh()</code> methods.
-	 * 
-	 * <p>
-	 * Clients may modify the given update to add or remove the elements to be
-	 * refreshed. Clients may return the same instance that was passed in for
-	 * the next downstream extension.
-	 * </p>
-	 * 
-	 * <p>
-	 * <b>Clients should not call any of the add, remove, refresh, or update
-	 * methods on the viewer from this method or any code invoked by the
-	 * implementation of this method.</b>
-	 * </p>
-	 * 
-	 * @param aRefreshSynchronization
-	 *            The (current) refresh update to execute against the viewer.
-	 * @return The (potentially reshaped) refresh to execute against the viewer.
-	 */
 	public boolean interceptRefresh(
 			PipelinedViewerUpdate aRefreshSynchronization) {
  
@@ -210,7 +163,7 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 			refreshable = iter.next();
 			overrideableExtensions.addAll(contentService.findOverrideableContentExtensionsForPossibleChild(refreshable));
 		}
-		for (Iterator overrideableExtensionItr = overrideableExtensions.iterator(); overrideableExtensionItr.hasNext();) { 
+		for (Iterator overrideableExtensionItr = overrideableExtensions.iterator(); overrideableExtensionItr.hasNext();) {
 			pipelined |= pipelineInterceptRefresh((NavigatorContentExtension) overrideableExtensionItr.next(), aRefreshSynchronization, refreshable);
 		}
 
@@ -218,56 +171,41 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 		
 	}
 
-	private boolean pipelineInterceptRefresh(NavigatorContentExtension overrideableExtension,
-			PipelinedViewerUpdate aRefreshSynchronization, Object refreshable) {
+	private boolean pipelineInterceptRefresh(final NavigatorContentExtension overrideableExtension,
+			final PipelinedViewerUpdate aRefreshSynchronization, final Object refreshable) {
 
-		boolean intercepted = false;
-		
-		NavigatorContentExtension[] overridingExtensionsForPossibleChild = overrideableExtension.getOverridingExtensionsForPossibleChild(refreshable);
-		for (int i=0; i<overridingExtensionsForPossibleChild.length; i++) { 
-			try {
-				if (overridingExtensionsForPossibleChild[i].getContentProvider() instanceof IPipelinedTreeContentProvider) {
-
-					intercepted |= ((IPipelinedTreeContentProvider) overridingExtensionsForPossibleChild[i]
-							.getContentProvider())
-							.interceptRefresh(aRefreshSynchronization);
-					
-					if (overridingExtensionsForPossibleChild[i].getDescriptor().hasOverridingExtensions())  
-						intercepted |= pipelineInterceptRefresh(overridingExtensionsForPossibleChild[i], aRefreshSynchronization, refreshable);					
-				}
-			} catch (Throwable e) {
-				String msg = e.getMessage() != null ? e.getMessage()  : e.toString();
-				NavigatorPlugin.logError(0, msg, e);
-			}  
-		}
+		final boolean[] intercepted = new boolean[1];
 
-		return intercepted;
-	}
-	
+		final NavigatorContentExtension[] overridingExtensions = overrideableExtension
+				.getOverridingExtensions();
+		for (int i = 0; i < overridingExtensions.length; i++) {
+			final NavigatorContentExtension nceLocal = overridingExtensions[i];
+			if (nceLocal.internalGetContentProvider().isPipelined()) {
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						intercepted[0] |= ((IPipelinedTreeContentProvider) nceLocal
+								.internalGetContentProvider())
+								.interceptRefresh(aRefreshSynchronization);
 
+						if (nceLocal.getDescriptor().hasOverridingExtensions())
+							intercepted[0] |= pipelineInterceptRefresh(nceLocal,
+									aRefreshSynchronization, refreshable);
+					}
+
+					public void handleException(Throwable e) {
+						NavigatorPlugin.logError(0, NLS.bind(
+								CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+										nceLocal.getDescriptor().getId(), refreshable }), e);
+					}
+				});
+			}
+		}
+
+		return intercepted[0];
+	}	
 
-	/**
-	 * Intercept calls to viewer <code>update()</code> methods.
-	 * 
-	 * <p>
-	 * Clients may modify the given update to add or remove the elements to be
-	 * updated. Clients may also add or remove properties for the given targets
-	 * to optimize the refresh. Clients may return the same instance that was
-	 * passed in for the next downstream extension.
-	 * </p>
-	 * 
-	 * <p>
-	 * <b>Clients should not call any of the add, remove, refresh, or update
-	 * methods on the viewer from this method or any code invoked by the
-	 * implementation of this method.</b>
-	 * </p>
-	 * 
-	 * @param anUpdateSynchronization
-	 *            The (current) update to execute against the viewer.
-	 * @return The (potentially reshaped) update to execute against the viewer.
-	 */
 	public boolean interceptUpdate(
-			PipelinedViewerUpdate anUpdateSynchronization) { 
+			PipelinedViewerUpdate anUpdateSynchronization) {
 		 
 		boolean pipelined = false;
 		Object refreshable = null;
@@ -277,7 +215,7 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 			refreshable = iter.next();
 			overrideableExtensions.addAll(contentService.findOverrideableContentExtensionsForPossibleChild(refreshable));
 		}
-		for (Iterator overrideableExtensionItr = overrideableExtensions.iterator(); overrideableExtensionItr.hasNext();) { 
+		for (Iterator overrideableExtensionItr = overrideableExtensions.iterator(); overrideableExtensionItr.hasNext();) {
 			pipelined |= pipelineInterceptUpdate((NavigatorContentExtension) overrideableExtensionItr.next(), anUpdateSynchronization, refreshable);
 		}
 
@@ -285,29 +223,37 @@ public class NavigatorPipelineService implements INavigatorPipelineService {
 		
 	}
 
-	private boolean pipelineInterceptUpdate(NavigatorContentExtension overrideableExtension,
-					PipelinedViewerUpdate anUpdateSynchronization, Object refreshable) {
-
-		boolean intercepted = false; 
-		NavigatorContentExtension[] overridingExtensionsForPossibleChild = overrideableExtension.getOverridingExtensionsForPossibleChild(refreshable);
-		for (int i=0; i<overridingExtensionsForPossibleChild.length; i++) { 
-			try {
-				if (overridingExtensionsForPossibleChild[i].getContentProvider() instanceof IPipelinedTreeContentProvider) {
-
-					intercepted |= ((IPipelinedTreeContentProvider) overridingExtensionsForPossibleChild[i]
-							.getContentProvider())
-							.interceptUpdate(anUpdateSynchronization);
-					
-					if (overridingExtensionsForPossibleChild[i].getDescriptor().hasOverridingExtensions())  
-						intercepted |= pipelineInterceptUpdate(overridingExtensionsForPossibleChild[i], anUpdateSynchronization, refreshable);					
-				}
-			} catch (Throwable e) {
-				String msg = e.getMessage() != null ? e.getMessage()  : e.toString();
-				NavigatorPlugin.logError(0, msg, e);
-			}  
+	private boolean pipelineInterceptUpdate(final NavigatorContentExtension overrideableExtension,
+			final PipelinedViewerUpdate anUpdateSynchronization, final Object refreshable) {
+
+		final boolean[] intercepted = new boolean[1];
+		final NavigatorContentExtension[] overridingExtensions = overrideableExtension
+				.getOverridingExtensions();
+		for (int i = 0; i < overridingExtensions.length; i++) {
+			if (overridingExtensions[i].internalGetContentProvider().isPipelined()) {
+				final NavigatorContentExtension nceLocal = overridingExtensions[i];
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						intercepted[0] |= ((IPipelinedTreeContentProvider) nceLocal
+								.internalGetContentProvider())
+								.interceptUpdate(anUpdateSynchronization);
+
+						if (nceLocal.getDescriptor().hasOverridingExtensions())
+							intercepted[0] |= pipelineInterceptUpdate(nceLocal,
+									anUpdateSynchronization, refreshable);
+					}
+
+					public void handleException(Throwable e) {
+						NavigatorPlugin.logError(0, NLS.bind(
+								CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+										nceLocal.getDescriptor().getId(), refreshable }), e);
+					}
+				});
+
+			}
 		}
 
-		return intercepted;
-	} 
+		return intercepted[0];
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPlugin.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPlugin.java
index 278056f..e02c14a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPlugin.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,11 +13,15 @@ package org.eclipse.ui.internal.navigator;
 import java.util.Collections;
 
 import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.ILog;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -40,6 +44,18 @@ public class NavigatorPlugin extends AbstractUIPlugin {
 	
 	private static final int LOG_DELAY = 100;
 	
+	/**
+	 * The delay before updating the action bars. Must be shorter than the
+	 * LINK_HELPER_DELAY to make sure the linking works after the boot.
+	 */
+	public static final int ACTION_BAR_DELAY = 100;
+
+	/**
+	 * The delay before responding to a selection/activation event in processing
+	 * for linking with the editor.
+	 */
+	public static final int LINK_HELPER_DELAY = ACTION_BAR_DELAY + 20;
+
 	private static class LogJob extends Job { 		
 		
 		
@@ -212,6 +228,39 @@ public class NavigatorPlugin extends AbstractUIPlugin {
 		return c;
 	}
 	
+	
+	/**
+	 * Helper class to evaluate an expression.
+	 */
+	public static class Evaluator implements ISafeRunnable {
+		EvaluationResult result;
+		Expression expression;
+		IEvaluationContext scope;
+
+		public void handleException(Throwable exception) {
+			result = EvaluationResult.FALSE;
+		}
+
+		public void run() throws Exception {
+			result = expression.evaluate(scope);
+		}
+	}
+
+	/**
+	 * Safely evaluation an expression, logging appropriately on error
+	 * 
+	 * @param expression
+	 * @param scope
+	 * @return the EvaluationResult
+	 */
+	public static EvaluationResult safeEvaluate(Expression expression, IEvaluationContext scope) {
+		Evaluator evaluator = new Evaluator();
+		evaluator.expression = expression;
+		evaluator.scope = scope;
+		SafeRunner.run(evaluator);
+		return evaluator.result;
+	}
+	
 	/**
 	 * Create a status associated with this plugin.
 	 *  
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSafeRunnable.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSafeRunnable.java
new file mode 100644
index 0000000..aa8bf08
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSafeRunnable.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.navigator;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 3.5
+ * 
+ */
+public abstract class NavigatorSafeRunnable extends SafeRunnable {
+
+	protected String _message;
+	protected IConfigurationElement _element;
+	protected Object _object;
+
+	/**
+	 * 
+	 */
+	public NavigatorSafeRunnable() {
+		super();
+	}
+
+	/**
+	 * @param message
+	 */
+	public NavigatorSafeRunnable(String message) {
+		_message = message;
+	}
+
+	/**
+	 * @param element
+	 */
+	public NavigatorSafeRunnable(IConfigurationElement element) {
+		_element = element;
+	}
+
+	/**
+	 * @param element
+	 * @param object
+	 *            an object to provide additional context
+	 */
+	public NavigatorSafeRunnable(IConfigurationElement element, Object object) {
+		_element = element;
+		_object = object;
+	}
+
+	public abstract void run() throws Exception;
+
+	public void handleException(Throwable e) {
+		String msg = _message;
+		if (msg == null)
+			msg = e.getMessage() != null ? e.getMessage() : e.toString();
+		if (_element != null) {
+			msg += ": " + //$NON-NLS-1$
+					NLS.bind(CommonNavigatorMessages.Exception_Invoking_Extension, new Object[] {
+							_element.getAttribute("id") + ": " + _element.getName(), _object }); //$NON-NLS-1$ //$NON-NLS-2$
+		}
+		NavigatorPlugin.log(IStatus.ERROR, 0, msg, e);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java
index 3641497..fd248e9 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/NavigatorSaveablesService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,7 +36,7 @@ import org.eclipse.ui.ISaveablesSource;
 import org.eclipse.ui.Saveable;
 import org.eclipse.ui.SaveablesLifecycleEvent;
 import org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener;
-import org.eclipse.ui.internal.navigator.extensions.ExtensionPriorityComparator;
+import org.eclipse.ui.internal.navigator.extensions.ExtensionSequenceNumberComparator;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptor;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentExtension;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
@@ -436,7 +436,7 @@ public class NavigatorSaveablesService implements INavigatorSaveablesService, Vi
 		// TODO optimize this
 		if (saveablesProviders == null) {
 			inactivePluginsWithSaveablesProviders = new HashMap();
-			saveablesProviderMap = new TreeMap(ExtensionPriorityComparator.INSTANCE);
+			saveablesProviderMap = new TreeMap(ExtensionSequenceNumberComparator.INSTANCE);
 			INavigatorContentDescriptor[] descriptors = contentService
 					.getActiveDescriptorsWithSaveables();
 			List result = new ArrayList();
@@ -475,6 +475,8 @@ public class NavigatorSaveablesService implements INavigatorSaveablesService, Vi
 	private SaveablesProvider createSaveablesProvider(NavigatorContentDescriptor descriptor) {
 		NavigatorContentExtension extension = contentService
 				.getExtension(descriptor, true);
+		// Use getContentProvider to get the client objects, this is important
+		// for the adaptation below. See bug 306545
 		ITreeContentProvider contentProvider = extension
 				.getContentProvider();
         
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java
index 0141280..7744986 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/CommonActionProviderDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,10 +26,11 @@ import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.extensions.INavigatorContentExtPtConstants;
 import org.eclipse.ui.internal.navigator.extensions.SkeletonActionProvider;
 import org.eclipse.ui.navigator.CommonActionProvider;
@@ -128,9 +129,7 @@ public class CommonActionProviderDescriptor implements
 	}
 
 	private void init() {
-
 		try {
-
 			definedId = configurationElement.getAttribute(ATT_ID);
 
 			// if there was no id attribute, use the default id.
@@ -191,22 +190,18 @@ public class CommonActionProviderDescriptor implements
 		if (hasLoadingFailed) {
 			return SkeletonActionProvider.INSTANCE;
 		}
-		CommonActionProvider provider = null;
-		try {
-			provider = (CommonActionProvider) configurationElement
-					.createExecutableExtension(ATT_CLASS);
-		} catch (CoreException exception) {
-			NavigatorPlugin.log(exception.getStatus());
-			hasLoadingFailed = true;
-			provider = SkeletonActionProvider.INSTANCE;
-		} catch (Exception e) {
-			NavigatorPlugin.log(new Status(IStatus.ERROR,
-					NavigatorPlugin.PLUGIN_ID, 0, e.getMessage(), e));
-			hasLoadingFailed = true;
-			provider = SkeletonActionProvider.INSTANCE;
-		}
+		final CommonActionProvider[] provider = new CommonActionProvider[1];
+		SafeRunner.run(new NavigatorSafeRunnable(configurationElement) {
+			public void run() throws Exception {
+				provider[0] = (CommonActionProvider) configurationElement
+						.createExecutableExtension(ATT_CLASS);
+			}
+		});
 
-		return provider;
+		if (provider[0] != null)
+			return provider[0];
+		hasLoadingFailed = true;
+		return SkeletonActionProvider.INSTANCE;
 	}
 
 	/**
@@ -227,28 +222,17 @@ public class CommonActionProviderDescriptor implements
 		if(aStructuredSelection.isEmpty()) {
 			IEvaluationContext context = null; 
 			context = NavigatorPlugin.getEmptyEvalContext();
-			try { 
-				if (enablement.evaluate(context) != EvaluationResult.TRUE) {
-					return false;
-				}
-			} catch (CoreException e) {
-				NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
+			if (NavigatorPlugin.safeEvaluate(enablement, context) != EvaluationResult.TRUE) {
 				return false;
-			} 
+			}
 		} else {
-
 			IEvaluationContext context = null;
 			IEvaluationContext parentContext = NavigatorPlugin.getApplicationContext();
 			Iterator elements = aStructuredSelection.iterator();
 			while (elements.hasNext()) {
 				context = new EvaluationContext(parentContext, elements.next());
 				context.setAllowPluginActivation(true);
-				try { 
-					if (enablement.evaluate(context) != EvaluationResult.TRUE) {
-						return false;
-					}
-				} catch (CoreException e) {
-					NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
+				if (NavigatorPlugin.safeEvaluate(enablement, context) != EvaluationResult.TRUE) {
 					return false;
 				}
 			}
@@ -268,13 +252,8 @@ public class CommonActionProviderDescriptor implements
 			return false;
 		}
 
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
-			return (enablement.evaluate(context) == EvaluationResult.TRUE);
-		} catch (CoreException e) {
-			NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
-		}
-		return false;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
+		return NavigatorPlugin.safeEvaluate(enablement, context) == EvaluationResult.TRUE;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/LinkEditorAction.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/LinkEditorAction.java
index 99ddbd2..eba451d 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/LinkEditorAction.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/actions/LinkEditorAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.ui.internal.navigator.actions;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
@@ -31,6 +30,7 @@ import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.navigator.CommonNavigator;
 import org.eclipse.ui.navigator.CommonViewer;
 import org.eclipse.ui.navigator.ILinkHelper;
@@ -47,8 +47,6 @@ import org.eclipse.ui.progress.UIJob;
 public class LinkEditorAction extends Action implements
 		ISelectionChangedListener, IPropertyListener {
 
-	private static final long BRIEF_DELAY = 100;
-
 	private IPartListener partListener;
 
 	private final CommonNavigator commonNavigator;
@@ -57,6 +55,9 @@ public class LinkEditorAction extends Action implements
 
 	private final LinkHelperService linkService;
 
+	private boolean ignoreSelectionChanged;
+	private boolean ignoreEditorActivation;
+	
 	private UIJob activateEditorJob = new UIJob(
 			CommonNavigatorMessages.Link_With_Editor_Job_) {
 		public IStatus runInUIThread(IProgressMonitor monitor) {
@@ -66,13 +67,19 @@ public class LinkEditorAction extends Action implements
 				if (selection != null && !selection.isEmpty()
 						&& selection instanceof IStructuredSelection) {
 
-					IStructuredSelection sSelection = (IStructuredSelection) selection;
+					final IStructuredSelection sSelection = (IStructuredSelection) selection;
 					if (sSelection.size() == 1) {
-						ILinkHelper[] helpers = linkService
+						final ILinkHelper[] helpers = linkService
 								.getLinkHelpersFor(sSelection.getFirstElement());
 						if (helpers.length > 0) {
-							helpers[0].activateEditor(commonNavigator.getSite()
-									.getPage(), sSelection);
+							ignoreEditorActivation = true;
+							SafeRunner.run(new NavigatorSafeRunnable() {
+								public void run() throws Exception {
+									helpers[0].activateEditor(commonNavigator.getSite()
+											.getPage(), sSelection);
+								}
+							});
+							ignoreEditorActivation = false;
 						}
 					}
 				}
@@ -86,8 +93,7 @@ public class LinkEditorAction extends Action implements
 		public IStatus runInUIThread(IProgressMonitor monitor) {
 
 			if (!commonNavigator.getCommonViewer().getControl().isDisposed()) {
-				SafeRunner.run(new ISafeRunnable() {
-
+				SafeRunner.run(new NavigatorSafeRunnable() {
 					public void run() throws Exception {
 						IWorkbenchPage page = commonNavigator.getSite()
 								.getPage();
@@ -98,19 +104,14 @@ public class LinkEditorAction extends Action implements
 								IStructuredSelection newSelection = linkService
 										.getSelectionFor(input);
 								if (!newSelection.isEmpty()) {
+									ignoreSelectionChanged = true;
 									commonNavigator.selectReveal(newSelection);
+									ignoreSelectionChanged = false;
 								}
 							}
 						}
 					}
-
-					public void handleException(Throwable e) {
-						String msg = e.getMessage() != null ? e.getMessage()
-								: e.toString();
-						NavigatorPlugin.logError(0, msg, e);
-					}
 				});
-
 			}
 
 			return Status.OK_STATUS;
@@ -146,14 +147,14 @@ public class LinkEditorAction extends Action implements
 		partListener = new IPartListener() {
 
 			public void partActivated(IWorkbenchPart part) {
-				if (part instanceof IEditorPart) {
-					updateSelectionJob.schedule(BRIEF_DELAY);
+				if (part instanceof IEditorPart && !ignoreEditorActivation) {
+					updateSelectionJob.schedule(NavigatorPlugin.LINK_HELPER_DELAY);
 				}
 			}
 
 			public void partBroughtToTop(IWorkbenchPart part) {
-				if (part instanceof IEditorPart) {
-					updateSelectionJob.schedule(BRIEF_DELAY);
+				if (part instanceof IEditorPart && !ignoreEditorActivation) {
+					updateSelectionJob.schedule(NavigatorPlugin.LINK_HELPER_DELAY);
 				}
 			}
 
@@ -202,7 +203,7 @@ public class LinkEditorAction extends Action implements
 	 * @see org.eclipse.jface.viewers.ISelectionChangedList
 	 */
 	public void selectionChanged(SelectionChangedEvent event) {
-		if (commonNavigator.isLinkingEnabled() && commonNavigator == commonNavigator.getSite().getPage().getActivePart()) {
+		if (commonNavigator.isLinkingEnabled() && !ignoreSelectionChanged) {
 			activateEditor();
 		}
 	}
@@ -218,7 +219,7 @@ public class LinkEditorAction extends Action implements
 			 * Create and schedule a UI Job to activate the editor in a valid
 			 * Display thread
 			 */
-			activateEditorJob.schedule(BRIEF_DELAY);
+			activateEditorJob.schedule(NavigatorPlugin.LINK_HELPER_DELAY);
 		}
 	}
 
@@ -243,7 +244,7 @@ public class LinkEditorAction extends Action implements
 
 		if (toEnableLinking) {
 
-			updateSelectionJob.schedule(BRIEF_DELAY);
+			updateSelectionJob.schedule(NavigatorPlugin.LINK_HELPER_DELAY);
 
 			commonViewer.addPostSelectionChangedListener(this);
 			commonNavigator.getSite().getPage().addPartListener(partListener);
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropAdapterDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropAdapterDescriptor.java
index c141016..98d8a58 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropAdapterDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropAdapterDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,12 @@ package org.eclipse.ui.internal.navigator.dnd;
 import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.extensions.INavigatorContentExtPtConstants;
 import org.eclipse.ui.navigator.CommonDropAdapterAssistant;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
@@ -85,13 +86,8 @@ public final class CommonDropAdapterDescriptor implements
 	 */
 	public boolean isDropElementSupported(Object anElement) {
 		if (dropExpr != null && anElement != null) {
-			try {
-				IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
-				return dropExpr
-						.evaluate(context) == EvaluationResult.TRUE;
-			} catch (CoreException e) {
-				NavigatorPlugin.logError(0, e.getMessage(), e);
-			}
+			IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
+			return NavigatorPlugin.safeEvaluate(dropExpr, context) == EvaluationResult.TRUE;
 		}
 		return false;
 	}
@@ -102,15 +98,15 @@ public final class CommonDropAdapterDescriptor implements
 	 *         descriptor or {@link SkeletonCommonDropAssistant}.
 	 */
 	public CommonDropAdapterAssistant createDropAssistant() {
-
-		try {
-			return (CommonDropAdapterAssistant) element
-					.createExecutableExtension(ATT_CLASS);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		} catch (RuntimeException re) {
-			NavigatorPlugin.logError(0, re.getMessage(), re);
-		}
+		final CommonDropAdapterAssistant[] retValue = new CommonDropAdapterAssistant[1];
+		SafeRunner.run(new NavigatorSafeRunnable(element) {
+			public void run() throws Exception {
+				retValue[0] = (CommonDropAdapterAssistant) element
+						.createExecutableExtension(ATT_CLASS);
+			}
+		});
+		if (retValue[0] != null)
+			return retValue[0];
 		return SkeletonCommonDropAssistant.INSTANCE;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropDescriptorManager.java
index 162abc4..157f564 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/CommonDropDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,7 @@ import java.util.Set;
 import java.util.TreeMap;
 
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.ui.internal.navigator.extensions.ExtensionPriorityComparator;
+import org.eclipse.ui.internal.navigator.extensions.ExtensionSequenceNumberComparator;
 import org.eclipse.ui.internal.navigator.extensions.INavigatorContentExtPtConstants;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentRegistryReader;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
@@ -40,7 +40,7 @@ public class CommonDropDescriptorManager {
 	 * A map of (INavigatorContentDescriptor,
 	 * CommonDropAdapterDescriptor)-pairs.
 	 */
-	private final Map dropDescriptors = new TreeMap(ExtensionPriorityComparator.INSTANCE);
+	private final Map dropDescriptors = new TreeMap(ExtensionSequenceNumberComparator.INSTANCE);
 
 	/**
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java
index dc13fe3..b139885 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/dnd/NavigatorDnDService.java
@@ -11,6 +11,8 @@
 
 package org.eclipse.ui.internal.navigator.dnd;
 
+import java.util.Arrays;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -147,8 +149,8 @@ public class NavigatorDnDService implements INavigatorDnDService {
 				assistants.add(asst);
 			}
 		}
-		return (CommonDropAdapterAssistant[]) assistants
-				.toArray(new CommonDropAdapterAssistant[assistants.size()]);
+		return sortAssistants((CommonDropAdapterAssistant[]) assistants
+				.toArray(new CommonDropAdapterAssistant[assistants.size()]));
 
 	}
 
@@ -163,10 +165,28 @@ public class NavigatorDnDService implements INavigatorDnDService {
 			}
 		}  
 
-		return (CommonDropAdapterAssistant[]) assistants
-				.toArray(new CommonDropAdapterAssistant[assistants.size()]);
+		return sortAssistants((CommonDropAdapterAssistant[]) assistants
+				.toArray(new CommonDropAdapterAssistant[assistants.size()]));
 	}
 
+	private CommonDropAdapterAssistant[] sortAssistants(CommonDropAdapterAssistant[] array) {
+		Arrays.sort(array, new Comparator() {
+			public int compare(Object arg0, Object arg1) {
+				CommonDropAdapterAssistant a = (CommonDropAdapterAssistant) arg0;
+				CommonDropAdapterAssistant b = (CommonDropAdapterAssistant) arg1;
+				// This is to ensure that the navigator resources drop assistant will
+				// always be first on the list of drop assistant, if a conflict ever 
+				// occurs.
+				String id = "org.eclipse.ui.navigator.resources."; //$NON-NLS-1$
+				if (a.getClass().getName().startsWith(id))
+					return -1;
+				if (b.getClass().getName().startsWith(id))
+					return 1;
+				return a.getClass().getName().compareTo(b.getClass().getName());
+			}
+		});
+		return array;
+	}
 	private CommonDropAdapterAssistant getAssistant(
 			CommonDropAdapterDescriptor descriptor) {
 		CommonDropAdapterAssistant asst = (CommonDropAdapterAssistant) dropAssistants
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
index 5b2a12d..ec34b6f 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -207,4 +207,11 @@ class Binding {
 		}
 
 	}
+	
+	void addBinding(Binding otherBinding) {
+		includePatterns.addAll(otherBinding.includePatterns);
+		excludePatterns.addAll(otherBinding.excludePatterns);
+		rootPatterns.addAll(otherBinding.rootPatterns);
+	}
+	
 }
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonDragAssistantDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonDragAssistantDescriptor.java
index c13d51c..e660022 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonDragAssistantDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/CommonDragAssistantDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,9 +11,9 @@
 
 package org.eclipse.ui.internal.navigator.extensions;
 
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.navigator.CommonDragAdapterAssistant;
 
 /**
@@ -43,14 +43,15 @@ public final class CommonDragAssistantDescriptor implements IViewerExtPtConstant
 	 */
 	public CommonDragAdapterAssistant createDragAssistant() {
 
-		try {
-			return (CommonDragAdapterAssistant) element
-					.createExecutableExtension(ATT_CLASS);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		} catch (RuntimeException re) {
-			NavigatorPlugin.logError(0, re.getMessage(), re);
-		}
+		final CommonDragAdapterAssistant[] da = new CommonDragAdapterAssistant[1];
+
+		SafeRunner.run(new NavigatorSafeRunnable(element) {
+			public void run() throws Exception {
+				da[0] = (CommonDragAdapterAssistant) element.createExecutableExtension(ATT_CLASS);
+			}
+		});
+		if (da[0] != null)
+			return da[0];
 		return SkeletonCommonDragAssistant.INSTANCE;
 
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionPriorityComparator.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionPriorityComparator.java
deleted file mode 100644
index e201e26..0000000
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionPriorityComparator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.ui.internal.navigator.extensions;
-
-import java.util.Comparator;
-
-import org.eclipse.ui.navigator.INavigatorContentDescriptor;
-import org.eclipse.ui.navigator.INavigatorContentExtension;
-
-/**
- * @since 3.2
- * 
- */
-public class ExtensionPriorityComparator implements Comparator {
-
-	/**
-	 * The initialized singleton instance.
-	 */
-	public static final ExtensionPriorityComparator INSTANCE = new ExtensionPriorityComparator(true);
-
-	/**
-	 * The initialized singleton instance.
-	 */
-	public static final ExtensionPriorityComparator DESCENDING = new ExtensionPriorityComparator(false);
-	
-	private final int sortAscending;
-	
-	/**
-	 * Creates an instance that sorts according to the given boolean flag.
-	 * 
-	 * @param toSortAscending
-	 *            <code>true</code> for ascending sort order or
-	 *            <code>false</code> for descending sort order.
-	 */
-	public ExtensionPriorityComparator(boolean toSortAscending) {
-		sortAscending = toSortAscending ? 1 : -1; 
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-	 */
-	public int compare(Object o1, Object o2) {
-
-		INavigatorContentDescriptor lvalue = null;
-		INavigatorContentDescriptor rvalue = null;
-
-		if (o1 instanceof INavigatorContentDescriptor) {
-			lvalue = (INavigatorContentDescriptor) o1;
-		} else if (o1 instanceof INavigatorContentExtension) {
-			lvalue = ((INavigatorContentExtension) o1).getDescriptor();
-		}
-
-		if (o2 instanceof INavigatorContentDescriptor) {
-			rvalue = (INavigatorContentDescriptor) o2;
-		} else if (o2 instanceof INavigatorContentExtension) {
-			rvalue = ((INavigatorContentExtension) o2).getDescriptor();
-		}
-
-		if (lvalue == null || rvalue == null) {
-			return  -1 * sortAscending;
-		}
-
-		int c = lvalue.getPriority() - rvalue.getPriority();
-		if (c != 0) {
-			return c * sortAscending;
-		}
-		return lvalue.getId().compareTo(rvalue.getId()) * sortAscending;
-
-	}
-
-}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionSequenceNumberComparator.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionSequenceNumberComparator.java
new file mode 100644
index 0000000..1efe40e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/ExtensionSequenceNumberComparator.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.internal.navigator.extensions;
+
+import java.util.Comparator;
+
+import org.eclipse.ui.navigator.INavigatorContentDescriptor;
+import org.eclipse.ui.navigator.INavigatorContentExtension;
+
+/**
+ * @since 3.2
+ * 
+ */
+public class ExtensionSequenceNumberComparator implements Comparator {
+
+	/**
+	 * The initialized singleton instance.
+	 */
+	public static final ExtensionSequenceNumberComparator INSTANCE = new ExtensionSequenceNumberComparator(true);
+
+	/**
+	 * The initialized singleton instance.
+	 */
+	public static final ExtensionSequenceNumberComparator DESCENDING = new ExtensionSequenceNumberComparator(false);
+	
+	private final int sortAscending;
+	
+	/**
+	 * Creates an instance that sorts according to the given boolean flag.
+	 * 
+	 * @param toSortAscending
+	 *            <code>true</code> for ascending sort order or
+	 *            <code>false</code> for descending sort order.
+	 */
+	public ExtensionSequenceNumberComparator(boolean toSortAscending) {
+		sortAscending = toSortAscending ? 1 : -1; 
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
+	 */
+	public int compare(Object o1, Object o2) {
+
+		INavigatorContentDescriptor lvalue = null;
+		INavigatorContentDescriptor rvalue = null;
+
+		if (o1 instanceof INavigatorContentDescriptor) {
+			lvalue = (INavigatorContentDescriptor) o1;
+		} else if (o1 instanceof NavigatorContentExtension) {
+			lvalue = ((NavigatorContentExtension) o1).getDescriptor();
+		}
+
+		if (o2 instanceof INavigatorContentDescriptor) {
+			rvalue = (INavigatorContentDescriptor) o2;
+		} else if (o2 instanceof INavigatorContentExtension) {
+			rvalue = ((NavigatorContentExtension) o2).getDescriptor();
+		}
+
+		if (lvalue == null || rvalue == null) {
+			return  -1 * sortAscending;
+		}
+
+		int c = lvalue.getSequenceNumber() - rvalue.getSequenceNumber();
+		if (c != 0) {
+			return c * sortAscending;
+		}
+		return 0;
+
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorContentExtPtConstants.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorContentExtPtConstants.java
index d0da374..1b6b818 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorContentExtPtConstants.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/INavigatorContentExtPtConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -53,6 +53,9 @@ public interface INavigatorContentExtPtConstants {
 	String TAG_OVERRIDE = "override"; //$NON-NLS-1$	
 
 	/** */
+	String TAG_INITIAL_ACTIVATION = "initialActivation"; //$NON-NLS-1$	
+
+	/** */
 	String TAG_FILTER_EXPRESSION = "filterExpression"; //$NON-NLS-1$
 
 	/** */
@@ -89,6 +92,12 @@ public interface INavigatorContentExtPtConstants {
 	String ATT_ACTIVE_BY_DEFAULT = "activeByDefault"; //$NON-NLS-1$
 
 	/** */
+	String ATT_VISIBLE_IN_UI = "visibleInUI"; //$NON-NLS-1$
+
+	/** */
+	String ATT_SORT_ONLY = "sortOnly"; //$NON-NLS-1$
+
+	/** */
 	String ATT_PROVIDES_SAVEABLES = "providesSaveables"; //$NON-NLS-1$
 	
 	/** */
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperDescriptor.java
index a144411..94c84d0 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,12 +15,12 @@ import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.navigator.ILinkHelper;
 
 /**
@@ -94,13 +94,15 @@ public class LinkHelperDescriptor implements ILinkHelperExtPtConstants {
 	public ILinkHelper createLinkHelper() {
 		if (hasLinkHelperFailedCreation)
 			return SkeletonLinkHelper.INSTANCE;
-		try {
-			return (ILinkHelper) configElement
-					.createExecutableExtension(ATT_CLASS);
-		} catch (Throwable t) {
-			hasLinkHelperFailedCreation = true;
-			NavigatorPlugin.logError(0, t.getMessage(), t);
-		}
+		final ILinkHelper[] helper = new ILinkHelper[1];
+		SafeRunner.run(new NavigatorSafeRunnable(configElement) {
+			public void run() throws Exception {
+				helper[0] = (ILinkHelper) configElement.createExecutableExtension(ATT_CLASS);
+			}
+		});
+		if (helper[0] != null)
+			return helper[0];
+		hasLinkHelperFailedCreation = true;
 		return SkeletonLinkHelper.INSTANCE;
 	}
 
@@ -112,18 +114,11 @@ public class LinkHelperDescriptor implements ILinkHelperExtPtConstants {
 	 *         the editor input.
 	 */
 	public boolean isEnabledFor(IEditorInput anInput) {
-
 		if (editorInputEnablement == null || anInput == null) {
 			return false;
 		}
-
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(anInput);
-			return (editorInputEnablement.evaluate(context) == EvaluationResult.TRUE);
-		} catch (CoreException e) {
-			NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
-		}
-		return false;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(anInput);
+		return NavigatorPlugin.safeEvaluate(editorInputEnablement, context) == EvaluationResult.TRUE;
 	}
 
 	/**
@@ -136,16 +131,7 @@ public class LinkHelperDescriptor implements ILinkHelperExtPtConstants {
 		if (selectionEnablement == null) {
 			return false;
 		}
-
 		IEvaluationContext context = NavigatorPlugin.getEvalContext(anObject);
-		try {
-			if (selectionEnablement.evaluate(context) != EvaluationResult.TRUE) {
-				return false;
-			}
-		} catch (CoreException e) {
-			NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
-			return false;
-		}
-		return true;
+		return NavigatorPlugin.safeEvaluate(selectionEnablement, context) == EvaluationResult.TRUE;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperManager.java
index e27b838..d503f8d 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/LinkHelperManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,18 +16,13 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.navigator.INavigatorContentService;
 
 /**
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is a guarantee neither that this API will
- * work nor that it will remain the same. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- * 
  * @since 3.2
  * 
  */
@@ -131,15 +126,16 @@ public class LinkHelperManager {
 			super(NavigatorPlugin.PLUGIN_ID, LINK_HELPER);
 		}
 
-		public boolean readElement(IConfigurationElement element) {
+		public boolean readElement(final IConfigurationElement element) {
 			if (LINK_HELPER.equals(element.getName())) {
-				try {
-					getDescriptors().add(new LinkHelperDescriptor(element));
-				} catch (Throwable e) {
-					String msg = e.getMessage() != null ? e.getMessage() : e.toString();
-					NavigatorPlugin.logError(0, msg, e);
-				}
-				return true;
+				final boolean retValue[] = new boolean[1];
+				SafeRunner.run(new NavigatorSafeRunnable(element) {
+					public void run() throws Exception {
+						getDescriptors().add(new LinkHelperDescriptor(element));
+						retValue[0] = true;
+					}
+				});
+				return retValue[0];
 			}
 			return false;
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java
index 00bf7bb..ec112f3 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,10 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.navigator.extensions;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.LinkedList;
+import java.util.List;
 import java.util.ListIterator;
 import java.util.Set;
 import java.util.TreeSet;
@@ -38,6 +39,7 @@ import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.navigator.ICommonContentProvider;
 import org.eclipse.ui.navigator.ICommonLabelProvider;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
@@ -62,18 +64,30 @@ public final class NavigatorContentDescriptor implements
 
 	private int priority = Priority.NORMAL_PRIORITY_VALUE;
 
+	/**
+	 * This is calculated based on the priority and appearsBeforeId when all of the descriptors
+	 * are first loaded. This is what's used to sort on after that.
+	 */
+	private int sequenceNumber;
+	
+	private String appearsBeforeId;
+
 	private Expression enablement;
 
 	private Expression possibleChildren;
 
+	private Expression initialActivation;
+	
 	private String icon;
 
 	private boolean activeByDefault;
 
 	private IPluginContribution contribution;
 
+	private boolean sortOnly;
+	
 	private Set overridingExtensions;
-	private LinkedList overridingExtensionsReverseOrder2; // FIXME: will replace 'overridingExtensions' in 3.6
+	private List overridingExtensionsList; // FIXME: will replace 'overridingExtensions' in 3.6
 
 	private OverridePolicy overridePolicy;
 
@@ -134,6 +148,30 @@ public final class NavigatorContentDescriptor implements
 	}
 
 	/**
+	 * @return the sequence number
+	 */
+	public int getSequenceNumber() {
+		return sequenceNumber;
+	}
+
+	void setSequenceNumber(int num) {
+		sequenceNumber = num;
+	}
+	
+	/**
+	 * 
+	 * @return The value specified by the <i>appearsBefore</i> attribute of the
+	 *         <navigatorContent/> element.
+	 */
+	public String getAppearsBeforeId() {
+		return appearsBeforeId;
+	}
+
+	public boolean isSortOnly() {
+		return sortOnly;
+	}
+	
+	/**
 	 * Parses the configuration element.
 	 * 
 	 * @throws WorkbenchException
@@ -153,8 +191,7 @@ public final class NavigatorContentDescriptor implements
 		String activeByDefaultString = configElement
 				.getAttribute(ATT_ACTIVE_BY_DEFAULT);
 		activeByDefault = (activeByDefaultString != null && activeByDefaultString
-				.length() > 0) ? Boolean.valueOf(
-				configElement.getAttribute(ATT_ACTIVE_BY_DEFAULT))
+				.length() > 0) ? Boolean.valueOf(activeByDefaultString)
 				.booleanValue() : true;
 
 		String providesSaveablesString = configElement
@@ -162,6 +199,7 @@ public final class NavigatorContentDescriptor implements
 		providesSaveables = (providesSaveablesString != null && providesSaveablesString
 				.length() > 0) ? Boolean.valueOf(providesSaveablesString)
 						.booleanValue() : false;
+		appearsBeforeId = configElement.getAttribute(ATT_APPEARS_BEFORE);
 
 		if (priorityString != null) {
 			try {
@@ -172,6 +210,15 @@ public final class NavigatorContentDescriptor implements
 				priority = Priority.NORMAL_PRIORITY_VALUE;
 			}
 		}
+		
+		// We start with this because the sort ExtensionPriorityComparator works 
+		// from the sequenceNumber
+		sequenceNumber = priority;
+
+		String sortOnlyString = configElement.getAttribute(ATT_SORT_ONLY);
+		sortOnly = (sortOnlyString != null && sortOnlyString.length() > 0) ? Boolean.valueOf(
+				sortOnlyString).booleanValue() : false;
+		
 		if (id == null) {
 			throw new WorkbenchException(NLS.bind(
 					CommonNavigatorMessages.Attribute_Missing_Warning,
@@ -182,8 +229,36 @@ public final class NavigatorContentDescriptor implements
 									.getNamespaceIdentifier() }));
 		}
 
-		IConfigurationElement[] children = configElement
-				.getChildren(TAG_ENABLEMENT);
+		contribution = new IPluginContribution() {
+
+			public String getLocalId() {
+				return getId();
+			}
+
+			public String getPluginId() {
+				return configElement.getDeclaringExtension().getNamespaceIdentifier();
+			}
+
+		};
+
+		IConfigurationElement[] children;
+		
+		children = configElement.getChildren(TAG_INITIAL_ACTIVATION);
+		if (children.length > 0) {
+			if (children.length == 1) {
+				initialActivation = new CustomAndExpression(children[0]);
+			} else {
+				throw new WorkbenchException(NLS.bind(
+						CommonNavigatorMessages.Attribute_Missing_Warning, new Object[] {
+								TAG_INITIAL_ACTIVATION, id,
+								configElement.getDeclaringExtension().getNamespaceIdentifier() }));
+			}
+		}
+
+		if (sortOnly)
+			return;
+
+		children = configElement.getChildren(TAG_ENABLEMENT);
 		if (children.length == 0) {
 
 			children = configElement.getChildren(TAG_TRIGGER_POINTS);
@@ -228,18 +303,6 @@ public final class NavigatorContentDescriptor implements
 									.getNamespaceIdentifier() }));
 		}
 
-		contribution = new IPluginContribution() {
-
-			public String getLocalId() {
-				return getId();
-			}
-
-			public String getPluginId() {
-				return configElement.getDeclaringExtension().getNamespaceIdentifier();
-			}
-
-		};
-
 		children = configElement.getChildren(TAG_OVERRIDE);
 		if (children.length == 0) {
 			overridePolicy = OverridePolicy.get(OverridePolicy.InvokeAlwaysRegardlessOfSuppressedExt_LITERAL);
@@ -256,6 +319,7 @@ public final class NavigatorContentDescriptor implements
 							id,configElement.getDeclaringExtension()
 							.getNamespaceIdentifier() }));
 		}
+
 	}
 
 	/**
@@ -288,6 +352,13 @@ public final class NavigatorContentDescriptor implements
 	}
 
 	/**
+	 * @return the configuration element
+	 */
+	public IConfigurationElement getConfigElement() {
+		return configElement;
+	}
+	
+	/**
 	 * The content provider could be an instance of
 	 * {@link ICommonContentProvider}, but only {@link ITreeContentProvider} is
 	 * required.
@@ -300,6 +371,8 @@ public final class NavigatorContentDescriptor implements
 	 * 
 	 */
 	public ITreeContentProvider createContentProvider() throws CoreException {
+		if (Policy.DEBUG_EXTENSION_SETUP)
+			System.out.println("createContentProvider: " + this); //$NON-NLS-1$
 		return (ITreeContentProvider) configElement
 				.createExecutableExtension(ATT_CONTENT_PROVIDER);
 	}
@@ -315,6 +388,8 @@ public final class NavigatorContentDescriptor implements
 	 *             created for any reason
 	 */
 	public ILabelProvider createLabelProvider() throws CoreException {
+		if (Policy.DEBUG_EXTENSION_SETUP)
+			System.out.println("createLabelProvider: " + this); //$NON-NLS-1$
 		return (ILabelProvider) configElement
 				.createExecutableExtension(ATT_LABEL_PROVIDER);
 	}
@@ -322,10 +397,15 @@ public final class NavigatorContentDescriptor implements
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.ui.internal.navigator.extensions.INavigatorContentDescriptor#isEnabledByDefault()
+	 * @see org.eclipse.ui.internal.navigator.extensions.INavigatorContentDescriptor#isActiveByDefault()
 	 */
 	public boolean isActiveByDefault() {
-		return activeByDefault;
+		if (activeByDefault)
+			return true;
+		if (initialActivation == null)
+			return false;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(new Object());
+		return NavigatorPlugin.safeEvaluate(initialActivation, context) == EvaluationResult.TRUE;
 	}
 
 	/**
@@ -342,13 +422,8 @@ public final class NavigatorContentDescriptor implements
 			return false;
 		}
 
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
-			return (enablement.evaluate(context) == EvaluationResult.TRUE);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
-		return false;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
+		return NavigatorPlugin.safeEvaluate(enablement, context) == EvaluationResult.TRUE;
 	}
 
 	/**
@@ -374,15 +449,11 @@ public final class NavigatorContentDescriptor implements
 			return arePossibleChildren((IStructuredSelection) anElement);
 		}
 
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
-			if (possibleChildren != null) {
-				return (possibleChildren.evaluate(context) == EvaluationResult.TRUE);
-			} else if (enablement != null) {
-				return (enablement.evaluate(context) == EvaluationResult.TRUE);
-			}
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
+		if (possibleChildren != null) {
+			return NavigatorPlugin.safeEvaluate(possibleChildren, context) == EvaluationResult.TRUE;
+		} else if (enablement != null) {
+			return NavigatorPlugin.safeEvaluate(enablement, context) == EvaluationResult.TRUE;
 		}
 		return false;
 	}
@@ -410,7 +481,7 @@ public final class NavigatorContentDescriptor implements
 	 * 
 	 * Does not force the creation of the set of overriding extensions.
 	 * 
-	 * @return True if this extension has overridding extensions.
+	 * @return True if this extension has overriding extensions.
 	 */
 	public boolean hasOverridingExtensions() {
 		return overridingExtensions != null && overridingExtensions.size() > 0;
@@ -422,30 +493,28 @@ public final class NavigatorContentDescriptor implements
 	 */
 	public Set getOverriddingExtensions() {
 		if (overridingExtensions == null) {
-			overridingExtensions = new TreeSet(ExtensionPriorityComparator.DESCENDING);
+			overridingExtensions = new TreeSet(ExtensionSequenceNumberComparator.DESCENDING);
 		}
 		return overridingExtensions;
 	}
 
 	/**
+	 *  Returns a list iterator over the overriding extensions.
+	 * 
 	 * @param fromStart
 	 *            <code>true</code> if list iterator starts at the beginning and
 	 *            <code>false</code> if it starts at the end of the list
 	 * @return a list iterator over the overriding extensions which are ordered
 	 *         by ExtensionPriorityComparator.DESCENDING
-	 * @since 3.5.1
 	 */
-	public ListIterator getOverriddingExtensionsListIterator(boolean fromStart) {
+	public ListIterator getOverridingExtensionsListIterator(boolean fromStart) {
 		if (overridingExtensions == null)
 			return Collections.EMPTY_LIST.listIterator();
 
-		if (overridingExtensionsReverseOrder2 == null) {
-			overridingExtensionsReverseOrder2 = new LinkedList();
-			Iterator iter = overridingExtensions.iterator();
-			while (iter.hasNext())
-				overridingExtensionsReverseOrder2.addLast(iter.next());
-		}
-		return overridingExtensionsReverseOrder2.listIterator(fromStart ? 0 : overridingExtensionsReverseOrder2.size());
+		if (overridingExtensionsList == null)
+			overridingExtensionsList = new ArrayList(overridingExtensions);
+
+		return overridingExtensionsList.listIterator(fromStart ? 0 : overridingExtensionsList.size());
 	}
 
 	/*
@@ -454,7 +523,7 @@ public final class NavigatorContentDescriptor implements
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-		return "Content[" + id + ", \"" + name + "\"]"; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
+		return "Content[" + id  + "(" + sequenceNumber + ") " + ", \"" + name + "\"]"; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 	}
 	
 	/* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java
index 010bfc9..c226021 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,17 +15,20 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.WeakHashMap;
 
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.WorkbenchException;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.internal.navigator.VisibilityAssistant;
 import org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener;
@@ -112,6 +115,8 @@ public class NavigatorContentDescriptorManager {
 
 	private final Set saveablesProviderDescriptors = new HashSet();
 
+	private final Set sortOnlyDescriptors = new HashSet();
+
 	private final Set firstClassDescriptorsSet = new HashSet();
 
 	/**
@@ -133,7 +138,7 @@ public class NavigatorContentDescriptorManager {
 		NavigatorContentDescriptor[] finalDescriptors = new NavigatorContentDescriptor[allDescriptors
 				.size()];
 		finalDescriptors = (NavigatorContentDescriptor[]) allDescriptors.values().toArray(finalDescriptors);
-		Arrays.sort(finalDescriptors, ExtensionPriorityComparator.INSTANCE);
+		Arrays.sort(finalDescriptors, ExtensionSequenceNumberComparator.INSTANCE);
 		return finalDescriptors;
 	}
 
@@ -145,7 +150,19 @@ public class NavigatorContentDescriptorManager {
 		NavigatorContentDescriptor[] finalDescriptors = new NavigatorContentDescriptor[saveablesProviderDescriptors
 				.size()];
 		saveablesProviderDescriptors.toArray(finalDescriptors);
-		Arrays.sort(finalDescriptors, ExtensionPriorityComparator.INSTANCE);
+		Arrays.sort(finalDescriptors, ExtensionSequenceNumberComparator.INSTANCE);
+		return finalDescriptors;
+	}
+
+	/**
+	 * 
+	 * @return Returns all content descriptors that are sort only
+	 */
+	public NavigatorContentDescriptor[] getSortOnlyContentDescriptors() {
+		NavigatorContentDescriptor[] finalDescriptors = new NavigatorContentDescriptor[sortOnlyDescriptors
+				.size()];
+		sortOnlyDescriptors.toArray(finalDescriptors);
+		Arrays.sort(finalDescriptors, ExtensionSequenceNumberComparator.INSTANCE);
 		return finalDescriptors;
 	}
 
@@ -195,7 +212,7 @@ public class NavigatorContentDescriptorManager {
 		EvaluationCache cache = getEvaluationCache(
 				cachedEvaluations, aVisibilityAssistant);
 
-		Set descriptors = new TreeSet(ExtensionPriorityComparator.INSTANCE);
+		Set descriptors = new TreeSet(ExtensionSequenceNumberComparator.INSTANCE);
 		NavigatorContentDescriptor[] cachedDescriptors = null;
 		if ((cachedDescriptors = cache.getDescriptors(anElement)) != null) {
 			descriptors.addAll(Arrays.asList(cachedDescriptors));
@@ -256,7 +273,7 @@ public class NavigatorContentDescriptorManager {
 
 				boolean isOverridden;
 
-				Set overridingDescriptors = new TreeSet(ExtensionPriorityComparator.INSTANCE);
+				Set overridingDescriptors = new TreeSet(ExtensionSequenceNumberComparator.INSTANCE);
 				isOverridden = addDescriptorsConsideringOverrides(anElement, descriptor.getOverriddingExtensions(),
 						aVisibilityAssistant, overridingDescriptors, possibleChild);
 
@@ -368,6 +385,12 @@ public class NavigatorContentDescriptorManager {
 						System.out.println("Saveables provider descriptor: " + desc); //$NON-NLS-1$
 					}
 				}
+				if (desc.isSortOnly()) {
+					sortOnlyDescriptors.add(desc);
+					if (Policy.DEBUG_EXTENSION_SETUP) {
+						System.out.println("SortOnly descriptor: " + desc); //$NON-NLS-1$
+					}
+				}
 			}
 		}
 	}
@@ -411,18 +434,63 @@ public class NavigatorContentDescriptorManager {
 					}
 
 				} else {
-					NavigatorPlugin.logError(0,
-							"Invalid suppressedExtensionId (\"" //$NON-NLS-1$
+					String message = 
+							"Invalid suppressedExtensionId \"" //$NON-NLS-1$
 									+ descriptor.getSuppressedExtensionId()
-									+ "\" specified from " //$NON-NLS-1$
-									+ descriptor.getContribution()
+									+ "\" specified from \"" //$NON-NLS-1$
+									+ descriptor.getId() + "\" in \"" + descriptor.getContribution() //$NON-NLS-1$
 											.getPluginId()
-									+ ". No extension with matching id found.", //$NON-NLS-1$
-							null);
+									+ "\". No extension with matching id found."; //$NON-NLS-1$
+					if (Policy.DEBUG_EXTENSION_SETUP) {
+						System.out.println("Error: " + message); //$NON-NLS-1$
+					}
+					NavigatorPlugin.logError(0, message, null);
 				}
 			}
 		}
 	}
+	
+	private int findId(List list, String id) {
+		for (int i = 0, len = list.size(); i < len; i++) {
+			NavigatorContentDescriptor desc = (NavigatorContentDescriptor) list.get(i);
+			if (desc.getId().equals(id))
+				return i;
+		}
+		throw new RuntimeException("Can't find id: " + id); //$NON-NLS-1$
+	}
+	
+	private void computeSequenceNumbers() {
+		NavigatorContentDescriptor[] descs = getAllContentDescriptors();
+
+		LinkedList list = new LinkedList();
+		for (int i = 0; i < descs.length; i++) {
+			list.add(descs[i]);
+		}
+		
+		boolean changed = true;
+		while (changed) {
+			changed = false;
+			for (int i = 0, len = list.size(); i < len; i++) {
+				NavigatorContentDescriptor desc = (NavigatorContentDescriptor) list.get(i);
+				if (desc.getAppearsBeforeId() != null) {
+					int beforeInd = findId(list, desc.getAppearsBeforeId());
+					if (beforeInd < i) {
+						list.add(beforeInd, desc);
+						list.remove(i + 1);
+						changed = true;
+					}
+				}
+			}
+		}
+		
+		for (int i = 0, len = list.size(); i < len; i++) {
+			NavigatorContentDescriptor desc = (NavigatorContentDescriptor) list.get(i);
+			desc.setSequenceNumber(i);
+			if (Policy.DEBUG_EXTENSION_SETUP) {
+				System.out.println("Descriptors by sequence: " + desc); //$NON-NLS-1$
+			}
+		}
+	}
 
 	private ImageRegistry getImageRegistry() {
 		if (imageRegistry == null) {
@@ -441,19 +509,17 @@ public class NavigatorContentDescriptorManager {
 		 */
 		public void readRegistry() {
 			super.readRegistry();
+			computeSequenceNumbers();
 			computeOverrides();
 		}
 
-		protected boolean readElement(IConfigurationElement anElement) {
+		protected boolean readElement(final IConfigurationElement anElement) {
 			if (TAG_NAVIGATOR_CONTENT.equals(anElement.getName())) {
-				try {
-					addNavigatorContentDescriptor(new NavigatorContentDescriptor(
-							anElement));
-
-				} catch (WorkbenchException e) {
-					// log an error since its not safe to open a dialog here
-					NavigatorPlugin.log(e.getStatus());
-				}
+				SafeRunner.run(new NavigatorSafeRunnable(anElement) {
+					public void run() throws Exception {
+						addNavigatorContentDescriptor(new NavigatorContentDescriptor(anElement));
+					}
+				});
 			}
 			return super.readElement(anElement);
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java
index 4634336..71efdea 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorContentExtension.java
@@ -15,17 +15,16 @@ import java.util.LinkedHashSet;
 import java.util.Set;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.SafeRunner;
+
 import org.eclipse.jface.viewers.ILabelProvider;
 import org.eclipse.jface.viewers.ILabelProviderListener;
 import org.eclipse.jface.viewers.ITreeContentProvider;
+
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.internal.navigator.NavigatorContentService;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.Policy;
-import org.eclipse.ui.navigator.ICommonContentProvider;
 import org.eclipse.ui.navigator.ICommonLabelProvider;
 import org.eclipse.ui.navigator.IExtensionStateModel;
 import org.eclipse.ui.navigator.IMementoAware;
@@ -45,7 +44,7 @@ public class NavigatorContentExtension implements IMementoAware,
 
 	private NavigatorContentDescriptor descriptor;
 
-	private ICommonContentProvider contentProvider;
+	private SafeDelegateTreeContentProvider contentProvider;
 
 	private ICommonLabelProvider labelProvider;
 
@@ -111,47 +110,45 @@ public class NavigatorContentExtension implements IMementoAware,
 	 * org.eclipse.ui.navigator.INavigatorContentExtension#getContentProvider()
 	 */
 	public ITreeContentProvider getContentProvider() {
-
-		ITreeContentProvider provider = internalGetContentProvider();
-		if (provider != SkeletonTreeContentProvider.INSTANCE) {
-			return ((SafeDelegateTreeContentProvider) provider)
-					.getDelegateContentProvider();
-		}
-		return provider;
+		return internalGetContentProvider().getDelegateContentProvider();
 	}
 
 	/**
 	 * 
 	 * @return The internal content provider that is wrapped by this extension.
 	 */
-	public ITreeContentProvider internalGetContentProvider() {
+	public SafeDelegateTreeContentProvider internalGetContentProvider() {
 		if (contentProvider != null || contentProviderInitializationFailed) {
 			return contentProvider;
 		}
 		synchronized (this) {
-			try {
-				if (contentProvider == null) {
-					ITreeContentProvider treeContentProvider = descriptor
-							.createContentProvider();
-					if (treeContentProvider != null) {
-						contentProvider = new SafeDelegateTreeContentProvider(
-								treeContentProvider);
-						contentProvider.init(new CommonContentExtensionSite(
-								getId(), contentService, appliedMemento));
-						viewerManager.initialize(contentProvider);
-					} else {
-						contentProvider = SkeletonTreeContentProvider.INSTANCE;
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				public void run() throws Exception {
+					if (contentProvider == null) {
+						ITreeContentProvider treeContentProvider = descriptor
+								.createContentProvider();
+						if (treeContentProvider != null) {
+							contentProvider = new SafeDelegateTreeContentProvider(
+									treeContentProvider);
+							contentProvider.init(new CommonContentExtensionSite(getId(),
+									contentService, appliedMemento));
+							viewerManager.initialize(contentProvider);
+						} else {
+							contentProvider = new SafeDelegateTreeContentProvider(
+									SkeletonTreeContentProvider.INSTANCE);
+						}
 					}
 				}
-			} catch (CoreException e) {
-				contentProviderInitializationFailed = true;
-				e.printStackTrace();
-			} catch (RuntimeException e) {
-				contentProviderInitializationFailed = true;
-				e.printStackTrace();
-			}
+
+				public void handleException(Throwable e) {
+					super.handleException(e);
+					contentProviderInitializationFailed = true;
+				}
+			});
+
 			if (contentProviderInitializationFailed) {
-				contentProvider = SkeletonTreeContentProvider.INSTANCE;
+				contentProvider = new SafeDelegateTreeContentProvider(
+						SkeletonTreeContentProvider.INSTANCE);
 			}
 		}
 		return contentProvider;
@@ -169,33 +166,29 @@ public class NavigatorContentExtension implements IMementoAware,
 			return labelProvider;
 		}
 		synchronized (this) {
-			try {
-
-				if (labelProvider == null) {
-					ILabelProvider tempLabelProvider = descriptor
-							.createLabelProvider();
-
-					if (tempLabelProvider instanceof ICommonLabelProvider) {
-						labelProvider = (ICommonLabelProvider) tempLabelProvider;
-						labelProvider.init(new CommonContentExtensionSite(
-								getId(), contentService, appliedMemento));
-					} else {
-						labelProvider = new SafeDelegateCommonLabelProvider(
-								tempLabelProvider);
-					}
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				public void run() throws Exception {
+					if (labelProvider == null) {
+						ILabelProvider tempLabelProvider = descriptor.createLabelProvider();
+
+						if (tempLabelProvider instanceof ICommonLabelProvider) {
+							labelProvider = (ICommonLabelProvider) tempLabelProvider;
+							labelProvider.init(new CommonContentExtensionSite(getId(),
+									contentService, appliedMemento));
+						} else {
+							labelProvider = new SafeDelegateCommonLabelProvider(tempLabelProvider);
+						}
 
-					labelProvider
-							.addListener((ILabelProviderListener) contentService
-									.createCommonLabelProvider());
+						labelProvider.addListener((ILabelProviderListener) contentService
+								.createCommonLabelProvider());
+					}
 				}
-			} catch (CoreException e) {
-				labelProviderInitializationFailed = true;
-				e.printStackTrace();
-			} catch (RuntimeException e) {
-				labelProviderInitializationFailed = true;
-				e.printStackTrace();
-			}
 
+				public void handleException(Throwable e) {
+					super.handleException(e);
+					labelProviderInitializationFailed = true;
+				}
+			});
 			if (labelProviderInitializationFailed) {
 				labelProvider = SkeletonLabelProvider.INSTANCE;
 			}
@@ -211,33 +204,16 @@ public class NavigatorContentExtension implements IMementoAware,
 		try {
 			synchronized (this) {
 
-				SafeRunner.run(new ISafeRunnable() {
-
-					public void handleException(Throwable exception) {
-						String msg = exception.getMessage() != null ? exception
-								.getMessage() : exception.toString();
-						NavigatorPlugin.logError(0, msg, exception);
-
-					}
-
+				SafeRunner.run(new NavigatorSafeRunnable() {
 					public void run() throws Exception {
 						if (contentProvider != null) {
 							contentProvider.dispose();
 						}
 
 					}
-
 				});
 
-				SafeRunner.run(new ISafeRunnable() {
-
-					public void handleException(Throwable exception) {
-						String msg = exception.getMessage() != null ? exception
-								.getMessage() : exception.toString();
-						NavigatorPlugin.logError(0, msg, exception);
-
-					}
-
+				SafeRunner.run(new NavigatorSafeRunnable() {
 					public void run() throws Exception {
 						if (labelProvider != null) {
 							labelProvider
@@ -245,9 +221,7 @@ public class NavigatorContentExtension implements IMementoAware,
 											.createCommonLabelProvider());
 							labelProvider.dispose();
 						}
-
 					}
-
 				});
 
 			}
@@ -358,35 +332,7 @@ public class NavigatorContentExtension implements IMementoAware,
 	 */
 	public NavigatorContentExtension[] getOverridingExtensionsForTriggerPoint(
 			Object anElement) {
-		if (!descriptor.hasOverridingExtensions()) {
-			return NO_EXTENSIONS;
-		}
-
-		NavigatorContentDescriptor overriddingDescriptor;
-		Set overridingExtensions = new LinkedHashSet();
-		for (Iterator contentDescriptorsItr = descriptor
-				.getOverriddingExtensions().iterator(); contentDescriptorsItr
-				.hasNext();) {
-			overriddingDescriptor = (NavigatorContentDescriptor) contentDescriptorsItr
-					.next();
-
-			if (contentService.isActive(overriddingDescriptor.getId())
-					&& contentService.isVisible(overriddingDescriptor.getId())
-					&& overriddingDescriptor.isTriggerPoint(anElement)) {
-				overridingExtensions.add(contentService
-						.getExtension(overriddingDescriptor));
-			}
-		}
-		if (overridingExtensions.size() == 0) {
-			return NO_EXTENSIONS;
-		}
-		if (Policy.DEBUG_EXTENSION_SETUP) {
-			System.out.println(this +  " overriding: "+//$NON-NLS-1$
-					"(trigger pt: " + anElement + "): " + overridingExtensions); //$NON-NLS-1$//$NON-NLS-2$
-		}
-		return (NavigatorContentExtension[]) overridingExtensions
-				.toArray(new NavigatorContentExtension[overridingExtensions
-						.size()]);
+		return getOverridingExtensions(anElement, TRIGGER_POINT);
 	}
 
 	/**
@@ -397,35 +343,55 @@ public class NavigatorContentExtension implements IMementoAware,
 	 */
 	public NavigatorContentExtension[] getOverridingExtensionsForPossibleChild(
 			Object anElement) {
+		return getOverridingExtensions(anElement, !TRIGGER_POINT);
+	}
+
+	/**
+	 * 
+	 * @return Returns the overridingExtensions.
+	 */
+	public NavigatorContentExtension[] getOverridingExtensions() {
+		return getOverridingExtensions(null, !TRIGGER_POINT);
+	}
+
+	private static final boolean TRIGGER_POINT = true;
+	
+	/**
+	 * @param anElement
+	 *            The element for the query.
+	 * @return Returns the overridingExtensions.
+	 */
+	private NavigatorContentExtension[] getOverridingExtensions(Object anElement,
+			boolean triggerPoint) {
 		if (!descriptor.hasOverridingExtensions()) {
 			return NO_EXTENSIONS;
 		}
 
-		NavigatorContentDescriptor overriddingDescriptor;
+		NavigatorContentDescriptor overridingDescriptor;
 		Set overridingExtensions = new LinkedHashSet();
-		for (Iterator contentDescriptorsItr = descriptor
-				.getOverriddingExtensions().iterator(); contentDescriptorsItr
+		for (Iterator contentDescriptorsItr = descriptor.getOverriddingExtensions().iterator(); contentDescriptorsItr
 				.hasNext();) {
-			overriddingDescriptor = (NavigatorContentDescriptor) contentDescriptorsItr
-					.next();
-
-			if (contentService.isActive(overriddingDescriptor.getId())
-					&& contentService.isVisible(overriddingDescriptor.getId())
-					&& overriddingDescriptor.isPossibleChild(anElement)) {
-				overridingExtensions.add(contentService
-						.getExtension(overriddingDescriptor));
+			overridingDescriptor = (NavigatorContentDescriptor) contentDescriptorsItr.next();
+
+			if (contentService.isActive(overridingDescriptor.getId())
+					&& contentService.isVisible(overridingDescriptor.getId())
+					&& (anElement == null || (triggerPoint ? overridingDescriptor
+							.isTriggerPoint(anElement) : overridingDescriptor
+							.isPossibleChild(anElement)))) {
+				overridingExtensions.add(contentService.getExtension(overridingDescriptor));
 			}
 		}
 		if (overridingExtensions.size() == 0) {
 			return NO_EXTENSIONS;
 		}
 		if (Policy.DEBUG_EXTENSION_SETUP) {
-			System.out.println(this +  " overriding: "+//$NON-NLS-1$
-					"(poss child: " + anElement + "): " + overridingExtensions); //$NON-NLS-1$//$NON-NLS-2$
+			System.out
+					.println(this
+							+ " overriding: " + //$NON-NLS-1$
+							(triggerPoint ? "(trigger pt: " : "(poss child: ") + anElement + "): " + overridingExtensions); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 		}
 		return (NavigatorContentExtension[]) overridingExtensions
-				.toArray(new NavigatorContentExtension[overridingExtensions
-						.size()]);
+				.toArray(new NavigatorContentExtension[overridingExtensions.size()]);
 	}
 
 	/*
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptor.java
index 85991e1..3a833a9 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -370,5 +370,11 @@ public final class NavigatorViewerDescriptor implements
 					null);
 		}
 	}
+	
+	void updateFromParent(NavigatorViewerDescriptor parent) {
+		getActionBinding().addBinding(parent.getActionBinding());
+		getContentBinding().addBinding(parent.getContentBinding());
+		getDragAssistants().addAll(parent.getDragAssistants());
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptorManager.java
index 7afdb1f..722e950 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/NavigatorViewerDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,9 +46,7 @@ public class NavigatorViewerDescriptorManager {
 			NavigatorViewerDescriptor desc = (NavigatorViewerDescriptor) it.next();
 			NavigatorViewerDescriptor parentDesc = (NavigatorViewerDescriptor) viewerDescriptors.get(desc.getInheritBindingsFromViewer());
 			if (parentDesc != null) {
-				desc.setActionBinding(parentDesc.getActionBinding());
-				desc.setContentBinding(parentDesc.getContentBinding());
-				desc.setDragAssistants(parentDesc.getDragAssistants());
+				desc.updateFromParent(parentDesc);
 			}
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java
index c4d2ace..411be95 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/SafeDelegateTreeContentProvider.java
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.navigator.extensions;
 import java.util.ArrayList;
 import java.util.Set;
 
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.ITreeContentProvider;
 import org.eclipse.jface.viewers.ITreePathContentProvider;
@@ -21,11 +20,12 @@ import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.jface.viewers.TreePath;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.navigator.ICommonContentExtensionSite;
 import org.eclipse.ui.navigator.ICommonContentProvider;
 import org.eclipse.ui.navigator.IMementoAware;
 import org.eclipse.ui.navigator.IPipelinedTreeContentProvider;
+import org.eclipse.ui.navigator.IPipelinedTreeContentProvider2;
 import org.eclipse.ui.navigator.PipelinedShapeModification;
 import org.eclipse.ui.navigator.PipelinedViewerUpdate;
 
@@ -33,7 +33,7 @@ import org.eclipse.ui.navigator.PipelinedViewerUpdate;
  * @since 3.2
  */
 public class SafeDelegateTreeContentProvider implements
-		IPipelinedTreeContentProvider, ITreePathContentProvider {
+		IPipelinedTreeContentProvider2, ITreePathContentProvider {
 
 	private static final TreePath[] NO_PATHS = new TreePath[0];
 
@@ -45,23 +45,36 @@ public class SafeDelegateTreeContentProvider implements
 		super();
 		contentProvider = aContentProvider;
 	}
+	
+	/**
+	 * @return true if the underlying content provider implements IPipelinedTreeContentProvider
+	 */
+	public boolean isPipelined() {
+		return contentProvider instanceof IPipelinedTreeContentProvider;
+	}
 
 	/**
-	 * 
+	 * @return true if the underlying content provider implements IPipelinedTreeContentProviderHasChildren
 	 */
-	public void dispose() {
-		SafeRunner.run(new ISafeRunnable() {
+	public boolean isPipelinedHasChildren() {
+		return contentProvider instanceof IPipelinedTreeContentProvider2;
+	}
 
-			public void handleException(Throwable exception) { 
-				String msg = exception.getMessage() != null ? exception.getMessage() : exception.toString() ;
-				NavigatorPlugin.logError(0, msg, exception);
-				
-			}
+	/**
+	 * @return true if the underlying content provider implements ITreePathContentProvider
+	 */
+	public boolean isTreePath() {
+		return contentProvider instanceof ITreePathContentProvider;
+	}
 
+	/**
+	 * 
+	 */
+	public void dispose() {
+		SafeRunner.run(new NavigatorSafeRunnable() {
 			public void run() throws Exception {
 				contentProvider.dispose(); 
 			}
-			
 		});
 		
 	}
@@ -109,18 +122,10 @@ public class SafeDelegateTreeContentProvider implements
 	public void inputChanged(final Viewer aViewer, final Object anOldInput, final Object aNewInput) {
 		viewer = (StructuredViewer) aViewer;
 		
-		SafeRunner.run(new ISafeRunnable() {
-
-			public void handleException(Throwable exception) { 
-				String msg = exception.getMessage() != null ? exception.getMessage() : exception.toString() ;
-				NavigatorPlugin.logError(0, msg, exception);
-				
-			}
-
+		SafeRunner.run(new NavigatorSafeRunnable() {
 			public void run() throws Exception {
 				contentProvider.inputChanged(aViewer, anOldInput, aNewInput);
 			}
-			
 		});
 	}
 
@@ -303,4 +308,15 @@ public class SafeDelegateTreeContentProvider implements
 		return NO_PATHS;
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.navigator.IPipelinedTreeContentProviderHasChildren#hasPipelinedChildren(java.lang.Object, boolean)
+	 */
+	public boolean hasPipelinedChildren(Object anInput, boolean currentHasChildren) {
+		if (contentProvider instanceof IPipelinedTreeContentProvider2) {
+			return ((IPipelinedTreeContentProvider2) contentProvider)
+					.hasPipelinedChildren(anInput, currentHasChildren);
+		}
+		return currentHasChildren;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java
index a5497af..a86d323 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/StructuredViewerManager.java
@@ -13,6 +13,7 @@ package org.eclipse.ui.internal.navigator.extensions;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.StructuredViewerInternals;
 import org.eclipse.jface.viewers.Viewer;
@@ -20,7 +21,7 @@ import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Item;
 import org.eclipse.ui.internal.navigator.NavigatorContentService;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.Policy;
 
 /**
@@ -94,6 +95,15 @@ public class StructuredViewerManager {
 					viewerDataMap.remove(item.getData());
 				}
 			}
+
+			public void filteredOut(Object element) {
+				contentService.forgetContribution(element);
+				synchronized (viewerDataMap) {
+					if (Policy.DEBUG_VIEWER_MAP)
+						System.out.println("filteredOut: object: " + element); //$NON-NLS-1$
+					viewerDataMap.remove(element);
+				}
+			}
 		}
 		protected static void hookAssociateListener(StructuredViewer v, Map viewerDataMap, NavigatorContentService contentService) {
 			StructuredViewerInternals.setAssociateListener(v, new Listener(contentService, viewerDataMap));
@@ -115,6 +125,8 @@ public class StructuredViewerManager {
 	 */
 	public void resetViewerData() {
 		synchronized (viewerDataMap) {
+			if (Policy.DEBUG_VIEWER_MAP)
+				System.out.println("viewer map RESET"); //$NON-NLS-1$
 			viewerDataMap.clear();
 		}
 	}
@@ -166,18 +178,17 @@ public class StructuredViewerManager {
 	 * @param aContentProvider
 	 * @return True if all is well.
 	 */
-	public boolean initialize(IStructuredContentProvider aContentProvider) {
-		boolean result = true;
-		try {
-			if (aContentProvider != null) {
-				aContentProvider.inputChanged(viewer, cachedOldInput,
-						cachedNewInput);
+	public boolean initialize(final IStructuredContentProvider aContentProvider) {
+		final boolean[] result = new boolean[1];
+		SafeRunner.run(new NavigatorSafeRunnable() {
+			public void run() throws Exception {
+				if (aContentProvider != null) {
+					aContentProvider.inputChanged(viewer, cachedOldInput, cachedNewInput);
+				}
+				result[0] = true;
 			}
-		} catch (RuntimeException e) {
-			NavigatorPlugin.logError(0, e.toString(), e);
-			result = false;
-		}
-		return result;
+		});
+		return result[0];
 	}
 
 	/**
@@ -196,15 +207,13 @@ public class StructuredViewerManager {
 			public void run() {
 				if (localViewer.getControl().isDisposed())
 					return;
-				try {
-					localViewer.getControl().setRedraw(false);
-					localViewer.refresh();
-				} catch (RuntimeException e) {
-					NavigatorPlugin.logError(0, e.toString(), e);
-				} finally {
-					localViewer.getControl().setRedraw(true);
-				}
-
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						localViewer.getControl().setRedraw(false);
+						localViewer.refresh();
+					}
+				});
+				localViewer.getControl().setRedraw(true);
 			}
 		});
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterContentProvider.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterContentProvider.java
index 62469b6..22ee935 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterContentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,8 +13,8 @@ package org.eclipse.ui.internal.navigator.filters;
 
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.internal.navigator.NavigatorFilterService;
 import org.eclipse.ui.navigator.INavigatorContentService;
-import org.eclipse.ui.navigator.INavigatorFilterService;
 
 /**
  * 
@@ -46,8 +46,8 @@ public class CommonFilterContentProvider implements IStructuredContentProvider {
 	 */
 	public Object[] getElements(Object inputElement) {
 		if(contentService != null) {
-			INavigatorFilterService filterService = contentService.getFilterService();
-			return filterService.getVisibleFilterDescriptors();
+			NavigatorFilterService filterService = (NavigatorFilterService) contentService.getFilterService();
+			return filterService.getVisibleFilterDescriptorsForUI();
 		}
 		return NO_ELEMENTS ;
 		
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptor.java
index 661262c..89e6ec9 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,12 +12,13 @@
 package org.eclipse.ui.internal.navigator.filters;
 
 import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.extensions.INavigatorContentExtPtConstants;
 import org.eclipse.ui.navigator.ICommonFilterDescriptor;
 
@@ -37,7 +38,7 @@ public class CommonFilterDescriptor implements ICommonFilterDescriptor,
 	private Expression filterExpression;
 
 	private String id;
-
+	
 	protected CommonFilterDescriptor(IConfigurationElement anElement) {
 
 		element = anElement;
@@ -93,37 +94,49 @@ public class CommonFilterDescriptor implements ICommonFilterDescriptor,
 
 	/**
 	 * 
+	 * @return Indicates the filter should be shown in the UI.
+	 */
+	public boolean isVisibleInUi() {
+		String attr = element.getAttribute(ATT_VISIBLE_IN_UI);
+		if (attr == null)
+			return true;
+		return Boolean.valueOf(attr).booleanValue();
+	}
+
+	/**
+	 * 
 	 * @return An instance of the ViewerFilter defined by the extension. Callers
 	 *         of this method are responsible for managing the instantiated
 	 *         filter.
 	 */
 	public ViewerFilter createFilter() {
-		try {
-
-			if (filterExpression != null) {
-
-				if (element.getAttribute(ATT_CLASS) != null) {
-					NavigatorPlugin
-							.log(
-									IStatus.WARNING,
-									0,
-									"A \"commonFilter\" was specified in " + //$NON-NLS-1$
-											element.getDeclaringExtension().getNamespaceIdentifier()
-											+ " which specifies a \"class\" attribute and an Core Expression.\n" + //$NON-NLS-1$
-											"Only the Core Expression will be respected.", //$NON-NLS-1$
-									null);
-				} 
-
-				return new CoreExpressionFilter(filterExpression);
+		final ViewerFilter[] filter = new ViewerFilter[1];
+
+		SafeRunner.run(new NavigatorSafeRunnable() {
+			public void run() throws Exception {
+				if (filterExpression != null) {
+					if (element.getAttribute(ATT_CLASS) != null) {
+						NavigatorPlugin
+								.log(
+										IStatus.WARNING,
+										0,
+										"A \"commonFilter\" was specified in " + //$NON-NLS-1$
+												element.getDeclaringExtension()
+														.getNamespaceIdentifier()
+												+ " which specifies a \"class\" attribute and an Core Expression.\n" + //$NON-NLS-1$
+												"Only the Core Expression will be respected.", //$NON-NLS-1$
+										null);
+					}
+
+					filter[0] = new CoreExpressionFilter(filterExpression);
+					return;
+				}
+				filter[0] = (ViewerFilter) element.createExecutableExtension(ATT_CLASS);
 			}
+		});
 
-			return (ViewerFilter) element.createExecutableExtension(ATT_CLASS);
-		} catch (RuntimeException re) {
-			NavigatorPlugin.logError(0, re.getMessage(), re);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
-
+		if (filter[0] != null)
+			return filter[0];
 		return SkeletonViewerFilter.INSTANCE;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptorManager.java
index c0478d5..5352c90 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,10 @@
 package org.eclipse.ui.internal.navigator.filters;
 
 import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
+import java.util.Map;
 
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentRegistryReader;
@@ -31,7 +31,8 @@ public class CommonFilterDescriptorManager {
 
 	private static final CommonFilterDescriptor[] NO_FILTER_DESCRIPTORS = new CommonFilterDescriptor[0];
 
-	private final Set filters = new HashSet();
+	// K(ID) V(CommonFilterDescriptor)
+	private final Map filters = new HashMap();
 
 	/**
 	 * 
@@ -48,17 +49,36 @@ public class CommonFilterDescriptorManager {
 
 	/**
 	 * 
+	 */
+	public static final boolean FOR_UI = true;
+	
+	/**
+	 * 
 	 * @param contentService
 	 *            A content service to filter the visible filters.
 	 * @return The set of filters that are 'visible' to the given viewer
 	 *         descriptor.
 	 */
 	public CommonFilterDescriptor[] findVisibleFilters(INavigatorContentService contentService) {
+		return findVisibleFilters(contentService, !FOR_UI);
+	}
+
+	/**
+	 * 
+	 * @param contentService
+	 *            A content service to filter the visible filters.
+	 * @param forUI true if only filters visible to the UI are desired
+	 * @return The set of filters that are 'visible' to the given viewer
+	 *         descriptor.
+	 */
+	public CommonFilterDescriptor[] findVisibleFilters(INavigatorContentService contentService, boolean forUI) {
 
 		List visibleFilters = new ArrayList();
 		CommonFilterDescriptor descriptor;
-		for (Iterator filtersItr = filters.iterator(); filtersItr.hasNext();) {
-			descriptor = (CommonFilterDescriptor) filtersItr.next();
+		for (Iterator filtersItr = filters.entrySet().iterator(); filtersItr.hasNext();) {
+			descriptor = (CommonFilterDescriptor) ((Map.Entry)filtersItr.next()).getValue();
+			if (forUI && !descriptor.isVisibleInUi())
+				continue;
 			if (contentService.isVisible(descriptor.getId())) {
 				visibleFilters.add(descriptor);
 			}
@@ -71,11 +91,19 @@ public class CommonFilterDescriptorManager {
 	}
 
 	/**
+	 * @param id
+	 * @return the CommonFilterDescriptor, if found
+	 */
+	public CommonFilterDescriptor getFilterById(String id) {
+		return (CommonFilterDescriptor) filters.get(id);
+	}
+	
+	/**
 	 * @param aDescriptor
 	 *            A non-null descriptor
 	 */
 	private void addCommonFilter(CommonFilterDescriptor aDescriptor) {
-		filters.add(aDescriptor);
+		filters.put(aDescriptor.getId(), aDescriptor);
 	}
 
 	private class CommonFilterDescriptorRegistry extends
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java
index db9cd5d..0417ce6 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.jface.resource.ColorRegistry;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
 import org.eclipse.ui.navigator.CommonViewer;
@@ -48,7 +49,7 @@ import org.eclipse.ui.navigator.INavigatorViewerDescriptor;
  * @since 3.2
  * 
  */
-public class CommonFilterSelectionDialog extends Dialog {
+public class CommonFilterSelectionDialog extends TrayDialog {
    
 	private static final String FILTER_ICON = "icons/full/elcl16/filter_ps.gif"; //$NON-NLS-1$
 	private static final String CONTENT_ICON = "icons/full/elcl16/content.gif"; //$NON-NLS-1$
@@ -71,6 +72,8 @@ public class CommonFilterSelectionDialog extends Dialog {
 
 	private ISelectionChangedListener updateDescriptionSelectionListener; 
 
+	private String helpContext;
+	
 	/**
 	 * Public only for tests.
 	 * 
@@ -81,8 +84,21 @@ public class CommonFilterSelectionDialog extends Dialog {
 		setShellStyle(SWT.RESIZE | getShellStyle());
 
 		commonViewer = aCommonViewer;
-		contentService = commonViewer.getNavigatorContentService(); 
-	} 
+		contentService = commonViewer.getNavigatorContentService();
+
+		INavigatorViewerDescriptor viewerDescriptor = contentService.getViewerDescriptor();
+		helpContext = viewerDescriptor
+				.getStringConfigProperty(INavigatorViewerDescriptor.PROP_CUSTOMIZE_VIEW_DIALOG_HELP_CONTEXT);
+
+		if (helpContext != null) {
+			PlatformUI.getWorkbench().getHelpSystem().setHelp(
+					aCommonViewer.getControl().getShell(), helpContext);
+		}
+	}
+
+	public boolean isHelpAvailable() {
+		return helpContext != null;
+	}
 
 	/*
 	 * (non-Javadoc)
@@ -245,7 +261,7 @@ public class CommonFilterSelectionDialog extends Dialog {
 
 			} 
 			UpdateActiveFiltersOperation updateFilters = new UpdateActiveFiltersOperation(
-					commonViewer, filterIdsToActivate, true);
+					commonViewer, filterIdsToActivate);
 			updateFilters.execute(null, null);
 		}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CoreExpressionFilter.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CoreExpressionFilter.java
index 5321c41..703cb05 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CoreExpressionFilter.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CoreExpressionFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.ui.internal.navigator.filters;
 import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
@@ -46,13 +45,8 @@ public class CoreExpressionFilter extends ViewerFilter {
 	 */
 	public boolean select(Viewer viewer, Object parentElement, Object element) {
 
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(element);
-			return (filterExpression.evaluate(context) != EvaluationResult.TRUE);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
-		return true;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(element);
+		return NavigatorPlugin.safeEvaluate(filterExpression, context) != EvaluationResult.TRUE;
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveFiltersOperation.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveFiltersOperation.java
index d8fd68f..fa8ad57 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveFiltersOperation.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/UpdateActiveFiltersOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,22 +11,15 @@
 
 package org.eclipse.ui.internal.navigator.filters;
 
-import java.util.Arrays;
-
 import org.eclipse.core.commands.operations.AbstractOperation;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
-import org.eclipse.ui.internal.navigator.NavigatorFilterService;
 import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.ICommonFilterDescriptor;
 import org.eclipse.ui.navigator.INavigatorContentService;
-import org.eclipse.ui.navigator.INavigatorFilterService;
 
 /**
  * Ensures that a given set of filters is <i>active</i> and the complement of
@@ -48,8 +41,6 @@ public class UpdateActiveFiltersOperation extends AbstractOperation {
 
 	private final INavigatorContentService contentService;
 
-	private boolean disableTheComplement;
-
 	/**
 	 * Create an operation to activate extensions and refresh the viewer.
 	 * 
@@ -61,10 +52,9 @@ public class UpdateActiveFiltersOperation extends AbstractOperation {
 	 *            in the <i>active</i> state after this operation executes. The
 	 *            complement of this set will likewise be in the <i>inactive</i>
 	 *            state after this operation executes.
-	 *            @param toDisableTheComplement True indicates that all filters not in the set should be made inactive.
 	 */
 	public UpdateActiveFiltersOperation(CommonViewer aCommonViewer,
-			String[] theActiveFilterIds, boolean toDisableTheComplement) {
+			String[] theActiveFilterIds) {
 		super(
 				CommonNavigatorMessages.UpdateFiltersOperation_Update_CommonViewer_Filter_);
 		Assert.isNotNull(theActiveFilterIds);
@@ -72,7 +62,6 @@ public class UpdateActiveFiltersOperation extends AbstractOperation {
 		commonViewer = aCommonViewer;
 		contentService = commonViewer.getNavigatorContentService();
 		filterIdsToActivate = theActiveFilterIds;
-		disableTheComplement = toDisableTheComplement;
 
 	}
 
@@ -83,84 +72,7 @@ public class UpdateActiveFiltersOperation extends AbstractOperation {
 	 *      org.eclipse.core.runtime.IAdaptable)
 	 */
 	public IStatus execute(IProgressMonitor monitor, IAdaptable info) {
-
-		boolean updateFilterActivation = false;
-		
-		// we sort the array in order to use Array.binarySearch();
-		Arrays.sort(filterIdsToActivate);
-		
-
-		try {
-			commonViewer.getControl().setRedraw(false);
-
-			INavigatorFilterService filterService = contentService
-					.getFilterService();
-
-			if(disableTheComplement) {
-			
-				ICommonFilterDescriptor[] visibleFilterDescriptors = filterService
-						.getVisibleFilterDescriptors();
-
-				int indexofFilterIdToBeActivated;
-
-				/* is there a delta? */
-				for (int i = 0; i < visibleFilterDescriptors.length
-						&& !updateFilterActivation; i++) {
-					indexofFilterIdToBeActivated = Arrays.binarySearch(
-							filterIdsToActivate, visibleFilterDescriptors[i]
-									.getId());
-
-					/*
-					 * Either we have a filter that should be active that isn't
-					 * XOR a filter that shouldn't be active that is currently
-					 */
-					if (indexofFilterIdToBeActivated >= 0
-							^ filterService
-									.isActive(visibleFilterDescriptors[i]
-											.getId())) {
-						updateFilterActivation = true;
-					}
-				}
-
-				/* If so, update */
-				if (updateFilterActivation) {
-
-					filterService.setActiveFilterIds(filterIdsToActivate);
-					filterService.persistFilterActivationState();
-
-					commonViewer.resetFilters();
-
-					ViewerFilter[] visibleFilters = filterService
-							.getVisibleFilters(true);
-					for (int i = 0; i < visibleFilters.length; i++) {
-						commonViewer.addFilter(visibleFilters[i]);
-					}
-
-					// the action providers may no longer be enabled, so we
-					// reset the selection.
-					commonViewer.setSelection(StructuredSelection.EMPTY);
-				}
-			} else {
-				NavigatorFilterService internalFilterService = (NavigatorFilterService)filterService;
-				
-				internalFilterService.addActiveFilterIds(filterIdsToActivate);
-
-				ICommonFilterDescriptor[] visibleDescriptors = filterService
-						.getVisibleFilterDescriptors();
-				for (int i = 0; i < visibleDescriptors.length; i++) {
-					if(Arrays.binarySearch(filterIdsToActivate, visibleDescriptors[i].getId()) >= 0 ) {
-						commonViewer.addFilter(internalFilterService.getViewerFilter(visibleDescriptors[i]));
-					}
-				}
-
-				// the action providers may no longer be enabled, so we
-				// reset the selection.
-				commonViewer.setSelection(StructuredSelection.EMPTY);
-			}
-
-		} finally {
-			commonViewer.getControl().setRedraw(true);
-		}
+		contentService.getFilterService().activateFilterIdsAndUpdateViewer(filterIdsToActivate);
 		return Status.OK_STATUS;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties
index 115e2f0..fcf5eed 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2005, 2009 IBM Corporation and others.
+# Copyright (c) 2005, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ CommonFilterSelectionDialog_Available_customization_=Available Customizations
 CommonSorterDescriptorManager_A_navigatorContent_extension_does_n_=A navigatorContent extension does not exist with id\: {0} in plugin {1}
 
 Delete=Delete
-Could_not_provide_children_for_element=Could not acquire children from extension\: {0}
+Exception_Invoking_Extension=An exception occurred invoking extension\: {0} for object {1}
 NewProjectWizard_errorTitle=New Project Problems
 Link_With_Editor_Job_=Linking viewer selection with current editor   
 Navigator_statusLineMultiSelect={0} items selected
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptor.java
index a7febf4..29e02f2 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,12 @@ package org.eclipse.ui.internal.navigator.sorters;
 import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.viewers.ViewerSorter;
 import org.eclipse.ui.internal.navigator.CustomAndExpression;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.extensions.INavigatorContentExtPtConstants;
 
 /**
@@ -76,11 +77,7 @@ public class CommonSorterDescriptor implements INavigatorContentExtPtConstants {
 
 		if (parentExpression != null) {
 			IEvaluationContext context = NavigatorPlugin.getEvalContext(aParent);
-			try {
-				return parentExpression.evaluate(context) == EvaluationResult.TRUE;
-			} catch (CoreException e) {
-				NavigatorPlugin.logError(0, e.getMessage(), e);
-			}
+			return NavigatorPlugin.safeEvaluate(parentExpression, context) == EvaluationResult.TRUE;
 		}
 		return true;
 	}
@@ -92,13 +89,15 @@ public class CommonSorterDescriptor implements INavigatorContentExtPtConstants {
 	 *         filter.
 	 */
 	public ViewerSorter createSorter() {
-		try {
-			return (ViewerSorter) element.createExecutableExtension(ATT_CLASS);
-		} catch (RuntimeException re) {
-			NavigatorPlugin.logError(0, re.getMessage(), re);
-		} catch (CoreException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
+		final ViewerSorter[] sorter = new ViewerSorter[1];
+
+		SafeRunner.run(new NavigatorSafeRunnable(element) {
+			public void run() throws Exception {
+				sorter[0] = (ViewerSorter) element.createExecutableExtension(ATT_CLASS);
+			}
+		});
+		if (sorter[0] != null)
+			return sorter[0];
 		return SkeletonViewerSorter.INSTANCE;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptorManager.java
index 0d04d38..ab6d13a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/CommonSorterDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -39,7 +39,7 @@ public class CommonSorterDescriptorManager {
 	private static final CommonSorterDescriptor[] NO_SORTER_DESCRIPTORS = new CommonSorterDescriptor[0];
 
 	private final Map sortersMap = new HashMap();
-
+	
 	/**
 	 * 
 	 * @return An initialized singleton instance of the
@@ -65,26 +65,9 @@ public class CommonSorterDescriptorManager {
 	public CommonSorterDescriptor[] findApplicableSorters(
 			NavigatorContentService contentService, Object aParent) {
 
-		// FIXME - this could end up being null if the object
-		// was removed from the cache
 		INavigatorContentDescriptor sourceOfContribution = contentService
 				.getSourceOfContribution(aParent);
-
-		List applicableSorters = new ArrayList();
-
-		CommonSorterDescriptor descriptor;
-		Set sorters = getCommonSorters(sourceOfContribution);
-		for (Iterator sortersItr = sorters.iterator(); sortersItr.hasNext();) {
-			descriptor = (CommonSorterDescriptor) sortersItr.next();
-			if (descriptor.isEnabledForParent(aParent)) {
-				applicableSorters.add(descriptor);
-			}
-		}
-		if (applicableSorters.size() == 0) {
-			return NO_SORTER_DESCRIPTORS;
-		}
-		return (CommonSorterDescriptor[]) applicableSorters
-				.toArray(new CommonSorterDescriptor[applicableSorters.size()]);
+		return findApplicableSorters(contentService, sourceOfContribution, aParent);
 	}
 
 	/**
@@ -95,17 +78,12 @@ public class CommonSorterDescriptorManager {
 	 *            The source of each *value.
 	 * @param aParent
 	 *            The parent used to search for a sorter.
-	 * @param anLvalue
-	 *            The left operand to compare.
-	 * @param anRvalue
-	 *            The right operand to compare.
 	 * @return The set of filters that are 'visible' to the given viewer
 	 *         descriptor.
 	 */
 	public CommonSorterDescriptor[] findApplicableSorters(
 			NavigatorContentService aContentService,
-			INavigatorContentDescriptor theSource, Object aParent,
-			Object anLvalue, Object anRvalue) {
+			INavigatorContentDescriptor theSource, Object aParent) {
 
 		List applicableSorters = new ArrayList();
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/NavigatorSorterService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/NavigatorSorterService.java
index 835b217..ef00ed3 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/NavigatorSorterService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/sorters/NavigatorSorterService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,11 +11,15 @@
 
 package org.eclipse.ui.internal.navigator.sorters;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.eclipse.jface.viewers.ViewerSorter;
 import org.eclipse.ui.internal.navigator.NavigatorContentService;
+import org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener;
+import org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager;
 import org.eclipse.ui.navigator.INavigatorContentDescriptor;
 import org.eclipse.ui.navigator.INavigatorSorterService;
 
@@ -26,13 +30,15 @@ import org.eclipse.ui.navigator.INavigatorSorterService;
  * @since 3.2
  * 
  */
-public class NavigatorSorterService implements INavigatorSorterService {
+public class NavigatorSorterService implements INavigatorSorterService, VisibilityListener  {
 
 	private final NavigatorContentService contentService;
 
 	/* A map of (CommonSorterDescriptor, ViewerSorter)-pairs */
 	private final Map sorters = new HashMap();
 
+	private INavigatorContentDescriptor[] sortOnlyDescriptors;
+
 	/**
 	 * Create a sorter service attached to the given content service.
 	 * 
@@ -42,8 +48,23 @@ public class NavigatorSorterService implements INavigatorSorterService {
 	 */
 	public NavigatorSorterService(NavigatorContentService aContentService) {
 		contentService = aContentService;
+		computeSortOnlyDescriptors();
 	}
 
+	private synchronized void computeSortOnlyDescriptors() {
+		INavigatorContentDescriptor[] allDescriptors;
+		allDescriptors = NavigatorContentDescriptorManager.getInstance().getSortOnlyContentDescriptors();
+		
+		List sortOnlyList = new ArrayList();
+		for (int i = 0; i < allDescriptors.length; i++) {
+			if (contentService.isActive(allDescriptors[i].getId())) {
+				sortOnlyList.add(allDescriptors[i]);
+			}
+		}
+		
+		sortOnlyDescriptors = (INavigatorContentDescriptor[]) sortOnlyList.toArray(new INavigatorContentDescriptor[]{});
+	}
+	
 	/*
 	 * (non-Javadoc)
 	 * 
@@ -76,14 +97,33 @@ public class NavigatorSorterService implements INavigatorSorterService {
 	 * @see org.eclipse.ui.navigator.INavigatorSorterService#findSorterForParent(org.eclipse.ui.navigator.INavigatorContentDescriptor,
 	 *      java.lang.Object, java.lang.Object, java.lang.Object)
 	 */
-	public ViewerSorter findSorter(INavigatorContentDescriptor source, 
+	public synchronized ViewerSorter findSorter(INavigatorContentDescriptor source, 
 			Object parent, Object lvalue, Object rvalue) { 
-
-		CommonSorterDescriptor[] descriptors = CommonSorterDescriptorManager
-				.getInstance().findApplicableSorters(contentService, source, parent, lvalue, rvalue);
-		if(descriptors.length > 0) {
-			return getSorter(descriptors[0]);
-		} 
+		
+		CommonSorterDescriptorManager dm = CommonSorterDescriptorManager 
+				.getInstance();
+		CommonSorterDescriptor[] descriptors;
+		
+		INavigatorContentDescriptor lookupDesc;
+		for (int i = 0; i < sortOnlyDescriptors.length; i++) {
+			lookupDesc = sortOnlyDescriptors[i];
+			if (source!= null && source.getSequenceNumber() < lookupDesc.getSequenceNumber()) {
+				lookupDesc = source;
+				source = null;
+				i--;
+			}
+			descriptors = dm. findApplicableSorters(contentService, lookupDesc, parent);
+			if (descriptors.length > 0) {
+				return getSorter(descriptors[0]);
+			}
+		}
+		
+		if (source != null) {
+			descriptors = dm. findApplicableSorters(contentService, source, parent);
+			if (descriptors.length > 0) {
+				return getSorter(descriptors[0]);
+			}
+		}
 		return null;
 	}
 
@@ -104,6 +144,14 @@ public class NavigatorSorterService implements INavigatorSorterService {
 		}
 		return sorters;
 	} 
-	 
+
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.navigator.VisibilityAssistant.VisibilityListener#onVisibilityOrActivationChange()
+	 */
+	public void onVisibilityOrActivationChange() {
+		computeSortOnlyDescriptors();
+	}
+	
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptor.java
index 5ae385f..9eb0f3a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -115,12 +115,7 @@ public class CommonWizardDescriptor implements INavigatorContentExtPtConstants,
 		while (elements.hasNext()) {
 			context = new EvaluationContext(parentContext, elements.next());
 			context.setAllowPluginActivation(true);
-			try {
-				if (enablement.evaluate(context) == EvaluationResult.FALSE) {
-					return false;
-				}
-			} catch (CoreException e) {
-				NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
+			if (NavigatorPlugin.safeEvaluate(enablement, context) == EvaluationResult.FALSE) {
 				return false;
 			}
 		}
@@ -135,18 +130,12 @@ public class CommonWizardDescriptor implements INavigatorContentExtPtConstants,
 	 * @return True if and only if the extension is enabled for the element.
 	 */
 	public boolean isEnabledFor(Object anElement) {
-
 		if (enablement == null) {
 			return false;
 		}
 
-		try {
-			IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
-			return (enablement.evaluate(context) == EvaluationResult.TRUE);
-		} catch (CoreException e) {
-			NavigatorPlugin.log(IStatus.ERROR, 0, e.getMessage(), e);
-		}
-		return false;
+		IEvaluationContext context = NavigatorPlugin.getEvalContext(anElement);
+		return (NavigatorPlugin.safeEvaluate(enablement, context) == EvaluationResult.TRUE);
 	}
 
 	void init() throws WorkbenchException { 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptorManager.java
index 8882fcd..def27cc 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/wizards/CommonWizardDescriptorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,20 +19,14 @@ import java.util.Map;
 import java.util.Set;
 
 import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.ui.WorkbenchException;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.extensions.NavigatorContentRegistryReader;
 import org.eclipse.ui.navigator.INavigatorContentService;
 
 /**
- * <p>
- * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
- * part of a work in progress. There is a guarantee neither that this API will
- * work nor that it will remain the same. Please do not use this API without
- * consulting with the Platform/UI team.
- * </p>
- * 
  * @since 3.2
  */
 public class CommonWizardDescriptorManager {
@@ -180,40 +174,42 @@ public class CommonWizardDescriptorManager {
 	}
   
 	private class CommonWizardRegistry extends NavigatorContentRegistryReader {
- 
 
-		protected boolean readElement(IConfigurationElement anElement) {
+		protected boolean readElement(final IConfigurationElement anElement) {
+			final boolean[] retValue = new boolean[1];
+
 			if (TAG_COMMON_WIZARD.equals(anElement.getName())) {
-				try {
-					addCommonWizardDescriptor(new CommonWizardDescriptor(
-							anElement));
-				} catch (WorkbenchException e) {
-					// log an error since its not safe to open a dialog here
-					NavigatorPlugin
-							.logError(0, e.getMessage(), e);
-					return false;
-				}
-				return true;
-			} if(TAG_NAVIGATOR_CONTENT.equals(anElement.getName())) {
-				
+				SafeRunner.run(new NavigatorSafeRunnable(anElement) {
+					public void run() throws Exception {
+						addCommonWizardDescriptor(new CommonWizardDescriptor(anElement));
+						retValue[0] = true;
+					}
+				});
+				return retValue[0];
+			}
+			if (TAG_NAVIGATOR_CONTENT.equals(anElement.getName())) {
 				IConfigurationElement[] commonWizards = anElement.getChildren(TAG_COMMON_WIZARD);
-				
-				String contentExtensionId = anElement.getAttribute(ATT_ID);
+				final String contentExtensionId = anElement.getAttribute(ATT_ID);
+				// In case there are none
+				retValue[0] = true;
 				for (int i = 0; i < commonWizards.length; i++) {
-					try {
-						addCommonWizardDescriptor(new CommonWizardDescriptor(
-									commonWizards[i], contentExtensionId));
-					} catch (WorkbenchException e) {
-						// log an error since its not safe to open a dialog here
-						NavigatorPlugin
-								.logError(0, e.getMessage(), e);
-						return false;
-					}					
+					final IConfigurationElement element = commonWizards[i];
+					// Assume it did not work
+					retValue[0] = false;
+					SafeRunner.run(new NavigatorSafeRunnable(element) {
+						public void run() throws Exception {
+							addCommonWizardDescriptor(new CommonWizardDescriptor(element,
+									contentExtensionId));
+							retValue[0] = true;
+						}
+					});
+					if (!retValue[0])
+						break;
 				}
-				return true;
+				return retValue[0];
 			}
 			return super.readElement(anElement);
 		}
 	}
-	 
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapter.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapter.java
index 28f2cc7..bcea090 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapter.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDragAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
@@ -24,7 +25,7 @@ import org.eclipse.swt.dnd.DragSourceAdapter;
 import org.eclipse.swt.dnd.DragSourceEvent;
 import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.internal.navigator.dnd.NavigatorPluginDropAction;
 import org.eclipse.ui.part.PluginTransfer;
@@ -113,59 +114,60 @@ public final class CommonDragAdapter extends DragSourceAdapter {
 	 * 
 	 * @see org.eclipse.swt.dnd.DragSourceAdapter#dragStart(org.eclipse.swt.dnd.DragSourceEvent)
 	 */
-	public void dragStart(DragSourceEvent event) {
+	public void dragStart(final DragSourceEvent event) {
 		if (Policy.DEBUG_DND) {
 			System.out.println("CommonDragAdapter.dragStart (begin): " + event); //$NON-NLS-1$
 		}
-		try {
-			// Workaround for 1GEUS9V
-			DragSource dragSource = (DragSource) event.widget;
-			if (Policy.DEBUG_DND) {
-				System.out.println("CommonDragAdapter.dragStart source: " + dragSource); //$NON-NLS-1$
-			}
-			Control control = dragSource.getControl();
-			if (control == control.getDisplay().getFocusControl()) {
-				ISelection selection = provider.getSelection();
-				assistantsToUse.clear();
-				
-				if (!selection.isEmpty()) {
-					LocalSelectionTransfer.getTransfer().setSelection(selection);
+		SafeRunner.run(new NavigatorSafeRunnable() {
+			public void run() throws Exception {
+				DragSource dragSource = (DragSource) event.widget;
+				if (Policy.DEBUG_DND) {
+					System.out.println("CommonDragAdapter.dragStart source: " + dragSource); //$NON-NLS-1$
+				}
+				Control control = dragSource.getControl();
+				if (control == control.getDisplay().getFocusControl()) {
+					ISelection selection = provider.getSelection();
+					assistantsToUse.clear();
 
-					boolean doIt = false;
-					INavigatorDnDService dndService = contentService.getDnDService();
-					CommonDragAdapterAssistant[] assistants = dndService.getCommonDragAssistants();
-					if (assistants.length == 0)
-						doIt = true;
-					for (int i = 0; i < assistants.length; i++) {
-						if (Policy.DEBUG_DND) {
-							System.out.println("CommonDragAdapter.dragStart assistant: " + assistants[i]); //$NON-NLS-1$
-						}
-						event.doit = true;
-						assistants[i].dragStart(event, (IStructuredSelection) selection);
-						doIt |= event.doit;
-						if (event.doit) {
+					if (!selection.isEmpty()) {
+						LocalSelectionTransfer.getTransfer().setSelection(selection);
+
+						boolean doIt = false;
+						INavigatorDnDService dndService = contentService.getDnDService();
+						CommonDragAdapterAssistant[] assistants = dndService
+								.getCommonDragAssistants();
+						if (assistants.length == 0)
+							doIt = true;
+						for (int i = 0; i < assistants.length; i++) {
 							if (Policy.DEBUG_DND) {
-								System.out.println("CommonDragAdapter.dragStart assistant - event.doit == true"); //$NON-NLS-1$
+								System.out
+										.println("CommonDragAdapter.dragStart assistant: " + assistants[i]); //$NON-NLS-1$
+							}
+							event.doit = true;
+							assistants[i].dragStart(event, (IStructuredSelection) selection);
+							doIt |= event.doit;
+							if (event.doit) {
+								if (Policy.DEBUG_DND) {
+									System.out
+											.println("CommonDragAdapter.dragStart assistant - event.doit == true"); //$NON-NLS-1$
+								}
+								assistantsToUse.add(assistants[i]);
 							}
-							assistantsToUse.add(assistants[i]);
 						}
+
+						event.doit = doIt;
+					} else {
+						event.doit = false;
 					}
-					
-					event.doit = doIt;
 				} else {
 					event.doit = false;
 				}
-			} else {
-				event.doit = false;
 			}
-		} catch (RuntimeException e) {
-			NavigatorPlugin.logError(0, e.getMessage(), e);
-		}
+		});
 
 		if (Policy.DEBUG_DND) {
-			System.out
-					.println("CommonDragAdapter.dragStart (end): doit=" + event.doit); //$NON-NLS-1$
-	}
+			System.out.println("CommonDragAdapter.dragStart (end): doit=" + event.doit); //$NON-NLS-1$
+		}
 	}
 
 	/*
@@ -173,9 +175,9 @@ public final class CommonDragAdapter extends DragSourceAdapter {
 	 * 
 	 * @see org.eclipse.swt.dnd.DragSourceAdapter#dragSetData(org.eclipse.swt.dnd.DragSourceEvent)
 	 */
-	public void dragSetData(DragSourceEvent event) {
+	public void dragSetData(final DragSourceEvent event) {
 
-		ISelection selection = LocalSelectionTransfer.getTransfer()
+		final ISelection selection = LocalSelectionTransfer.getTransfer()
 				.getSelection();
 
 		if (Policy.DEBUG_DND) {
@@ -205,7 +207,7 @@ public final class CommonDragAdapter extends DragSourceAdapter {
 			}
 
 			for (int i = 0, len = assistantsToUse.size(); i < len; i++) {
-				CommonDragAdapterAssistant assistant = (CommonDragAdapterAssistant) assistantsToUse.get(i); 
+				final CommonDragAdapterAssistant assistant = (CommonDragAdapterAssistant) assistantsToUse.get(i); 
 				if (Policy.DEBUG_DND) {
 					System.out
 							.println("CommonDragAdapter.dragSetData assistant: " + assistant); //$NON-NLS-1$
@@ -213,28 +215,28 @@ public final class CommonDragAdapter extends DragSourceAdapter {
 
 				Transfer[] supportedTransferTypes = assistant
 						.getSupportedTransferTypes();
+				final boolean[] getOut = new boolean[1];
 				for (int j = 0; j < supportedTransferTypes.length; j++) {
-					if (supportedTransferTypes[j]
-							.isSupportedType(event.dataType)) {
-						try {
-							if (Policy.DEBUG_DND) {
-								System.out
-										.println("CommonDragAdapter.dragSetData supported xfer type"); //$NON-NLS-1$
-							}
-							if(assistant.setDragData(event,
-									(IStructuredSelection) selection)) {
+					if (supportedTransferTypes[j].isSupportedType(event.dataType)) {
+						SafeRunner.run(new NavigatorSafeRunnable() {
+							public void run() throws Exception {
 								if (Policy.DEBUG_DND) {
 									System.out
-											.println("CommonDragAdapter.dragSetData set data " + event.data); //$NON-NLS-1$
+											.println("CommonDragAdapter.dragSetData supported xfer type"); //$NON-NLS-1$
+								}
+								if (assistant.setDragData(event, (IStructuredSelection) selection)) {
+									if (Policy.DEBUG_DND) {
+										System.out
+												.println("CommonDragAdapter.dragSetData set data " + event.data); //$NON-NLS-1$
+									}
+									setDataAssistant = assistant;
+									getOut[0] = true;
 								}
-								setDataAssistant = assistant;
-								return;
 							}
-						} catch (RuntimeException re) {
-							NavigatorPlugin.logError(0, re.getMessage(), re);
-						}
+						});
+						if (getOut[0])
+							return;
 					}
-
 				}
 			}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapter.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapter.java
index e5fd723..e9f1d9a 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapter.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonDropAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 package org.eclipse.ui.navigator;
 
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.util.LocalSelectionTransfer;
 import org.eclipse.jface.viewers.StructuredViewer;
 import org.eclipse.swt.dnd.DND;
@@ -21,7 +22,7 @@ import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.dnd.TransferData;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.widgets.Item;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.Policy;
 import org.eclipse.ui.internal.navigator.dnd.NavigatorPluginDropAction;
 import org.eclipse.ui.part.PluginDropAdapter;
@@ -154,11 +155,11 @@ public final class CommonDropAdapter extends PluginDropAdapter {
 	}
 
 	public boolean performDrop(Object data) {
-		DropTargetEvent event = getCurrentEvent();
+		final DropTargetEvent event = getCurrentEvent();
 		if (Policy.DEBUG_DND) {
 			System.out.println("CommonDropAdapter.drop (begin): " + event); //$NON-NLS-1$
 		}
-		Object target = getCurrentTarget() != null ? 
+		final Object target = getCurrentTarget() != null ? 
 				getCurrentTarget() : getViewer().getInput();
 
 		// Must validate the drop here because on some platforms (Linux, Mac) the event 
@@ -174,26 +175,29 @@ public final class CommonDropAdapter extends PluginDropAdapter {
 		if (Policy.DEBUG_DND) {
 			System.out.println("CommonDropAdapter.drop target: " + target + " op: " + getCurrentOperation()); //$NON-NLS-1$ //$NON-NLS-2$
 		}
-		CommonDropAdapterAssistant[] assistants = dndService.findCommonDropAdapterAssistants(target,
+		final CommonDropAdapterAssistant[] assistants = dndService.findCommonDropAdapterAssistants(target,
 				getCurrentTransfer());
 
-		IStatus valid = null;
+		final boolean[] retValue = new boolean[1];
 		for (int i = 0; i < assistants.length; i++) {
-			try {
-
-				assistants[i].setCurrentEvent(event);
-				valid = assistants[i].validateDrop(target, getCurrentOperation(), getCurrentTransfer());
-				if (valid != null && valid.isOK()) {
-					if (Policy.DEBUG_DND) {
-						System.out
-								.println("CommonDropAdapter.drop assistant selected: " + assistants[i] + " op: " + event.detail); //$NON-NLS-1$ //$NON-NLS-2$
+			final CommonDropAdapterAssistant localAssistant = assistants[i];
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				public void run() throws Exception {
+					localAssistant.setCurrentEvent(event);
+					IStatus valid = localAssistant.validateDrop(target, getCurrentOperation(),
+							getCurrentTransfer());
+					if (valid != null && valid.isOK()) {
+						if (Policy.DEBUG_DND) {
+							System.out
+									.println("CommonDropAdapter.drop assistant selected: " + localAssistant + " op: " + event.detail); //$NON-NLS-1$ //$NON-NLS-2$
+						}
+						localAssistant.handleDrop(CommonDropAdapter.this, event, target);
+						retValue[0] = true;
 					}
-					assistants[i].handleDrop(this, event, target);
-					return true;
 				}
-			} catch (Throwable t) {
-				NavigatorPlugin.logError(0, t.getMessage(), t);
-			}
+			});
+			if (retValue[0])
+				return true;
 		}
 
 		return false;
@@ -205,67 +209,64 @@ public final class CommonDropAdapter extends PluginDropAdapter {
 	 * @see org.eclipse.jface.viewers.ViewerDropAdapter#validateDrop(java.lang.Object,
 	 *      int, org.eclipse.swt.dnd.TransferData)
 	 */
-	public boolean validateDrop(Object aDropTarget, int theDropOperation,
-			TransferData theTransferData) {
+	public boolean validateDrop(final Object aDropTarget, final int theDropOperation,
+			final TransferData theTransferData) {
 
 		if (Policy.DEBUG_DND) {
-			System.out.println("CommonDropAdapter.validateDrop (begin) operation: " + theDropOperation + " target: " + aDropTarget + " transferType: " + theTransferData.type); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+			System.out.println("CommonDropAdapter.validateDrop (begin) operation: " + theDropOperation + " target: " + aDropTarget /*+ " transferType: " + theTransferData.type*/); //$NON-NLS-1$ //$NON-NLS-2$
 			//new Exception().printStackTrace(System.out);
 		}
 
 		boolean result = false;
-
-		IStatus valid = null;
+		final IStatus[] valid = new IStatus[1];
 
 		if (super.validateDrop(aDropTarget, theDropOperation, theTransferData)) {
-			result = true; 
+			result = true;
 			if (Policy.DEBUG_DND) {
-				System.out
-						.println("CommonDropAdapter.validateDrop valid for plugin transfer"); //$NON-NLS-1$
+				System.out.println("CommonDropAdapter.validateDrop valid for plugin transfer"); //$NON-NLS-1$
 			}
 		} else {
-			Object target = aDropTarget != null ? aDropTarget : getViewer().getInput();
-			if (Policy.DEBUG_DND) { 
+			final Object target = aDropTarget != null ? aDropTarget : getViewer().getInput();
+			if (Policy.DEBUG_DND) {
 				System.out.println("CommonDropAdapter.validateDrop target: " + target); //$NON-NLS-1$
 				System.out.println("CommonDropAdapter.validateDrop local selection: " + //$NON-NLS-1$
 						LocalSelectionTransfer.getTransfer().getSelection());
 			}
-			CommonDropAdapterAssistant[] assistants = dndService
-					.findCommonDropAdapterAssistants(target,
-							theTransferData);
+			CommonDropAdapterAssistant[] assistants = dndService.findCommonDropAdapterAssistants(
+					target, theTransferData);
 			for (int i = 0; i < assistants.length; i++) {
-				if (Policy.DEBUG_DND) { 
+				if (Policy.DEBUG_DND) {
 					System.out
-							.println("CommonDropAdapter.validateDrop checking assistant: \""+assistants[i]); //$NON-NLS-1$
-				}					
-				try { 
-					assistants[i].setCurrentEvent(getCurrentEvent());
-					valid = assistants[i].validateDrop(target,
-							theDropOperation, theTransferData); 
-				} catch (Throwable t) {
-					NavigatorPlugin.logError(0, t.getMessage(), t);
+							.println("CommonDropAdapter.validateDrop checking assistant: \"" + assistants[i]); //$NON-NLS-1$
 				}
-				if (valid != null && valid.isOK()) {
+				final CommonDropAdapterAssistant assistantLocal = assistants[i];
+
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						assistantLocal.setCurrentEvent(getCurrentEvent());
+						valid[0] = assistantLocal.validateDrop(target, theDropOperation,
+								theTransferData);
+					}
+				});
+				if (valid[0] != null && valid[0].isOK()) {
 					result = true;
-					if (Policy.DEBUG_DND) { 
-						System.out
-								.println("CommonDropAdapter.validateDrop VALID"); //$NON-NLS-1$
-					}					
+					if (Policy.DEBUG_DND) {
+						System.out.println("CommonDropAdapter.validateDrop VALID"); //$NON-NLS-1$
+					}
 					break;
 				}
-				if (Policy.DEBUG_DND) { 
+				if (Policy.DEBUG_DND) {
 					System.out
-							.println("CommonDropAdapter.validateDrop NOT valid: " + (valid != null ? (valid.getSeverity() + ": " + valid.getMessage()) : "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
-				}					
+							.println("CommonDropAdapter.validateDrop NOT valid: " + (valid[0] != null ? (valid[0].getSeverity() + ": " + valid[0].getMessage()) : "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
+				}
 			}
 		}
 
 		if (Policy.DEBUG_DND) {
 			System.out
-					.println("CommonDropAdapter.validateDrop (returning " + (valid != null ? valid.getSeverity() + ": " + valid.getMessage() : "" + result) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+					.println("CommonDropAdapter.validateDrop (returning " + (valid[0] != null ? valid[0].getSeverity() + ": " + valid[0].getMessage() : "" + result) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 		}
 
-
 		setScrollExpandEnabled(true);
 		return result;
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
index fe03642..dc57c9c 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ package org.eclipse.ui.navigator;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.PerformanceStats;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -41,6 +42,7 @@ import org.eclipse.ui.actions.ActionGroup;
 import org.eclipse.ui.internal.navigator.CommonNavigatorActionGroup;
 import org.eclipse.ui.internal.navigator.NavigatorContentService;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.part.ISetSelectionTarget;
 import org.eclipse.ui.part.IShowInSource;
 import org.eclipse.ui.part.IShowInTarget;
@@ -63,9 +65,9 @@ import org.eclipse.ui.part.ViewPart;
  * </li>
  * <li>
  * <p>
- * {@link org.eclipse.ui.navigator.NavigatorActionService}: Manages instances
- * of {@link org.eclipse.ui.navigator.CommonActionProvider}s provided by
- * individual extensions and content extensions.
+ * {@link org.eclipse.ui.navigator.NavigatorActionService}: Manages instances of
+ * {@link org.eclipse.ui.navigator.CommonActionProvider}s provided by individual
+ * extensions and content extensions.
  * </p>
  * </li>
  * <li>
@@ -76,13 +78,14 @@ import org.eclipse.ui.part.ViewPart;
  * </p>
  * </li>
  * </ul>
+ * 
  * <p>
- * Clients are not expected to subclass CommonNavigator. Clients that wish to
- * define their own custom extensible navigator view need to specify an instance
- * of the <b>org.eclipse.ui.views</b> extension point:
+ * Clients that wish to define their own custom extensible navigator view using
+ * CommonNavigator need to specify an instance of the
+ * <b>org.eclipse.ui.views</b> extension point:
  * 
  * <pre>
- *   
+ * 
  *          <extension
  *          		point="org.eclipse.ui.views">
  *          	<view
@@ -92,19 +95,37 @@ import org.eclipse.ui.part.ViewPart;
  *          		class="org.eclipse.ui.navigator.CommonNavigator"
  *          		id="org.acme.MyCustomNavigatorID">
  *          	</view>
- *          </extension> 
- *    
+ *          </extension>
+ * 
  * </pre>
  * 
- * </p> 
+ * </p>
+ * 
+ * <p>
+ * CommonNavigator gets its initial input (during initialization) from the
+ * Workbench by calling getSite().getPage().getInput(). This is done in
+ * {@link #getInitialInput()}. Clients may create a subclass of CommonNavigator
+ * to provide their own means of getting the initial input. Or they may access
+ * the {@link CommonViewer} and set its input directly after startup.
+ * </p>
+ * 
+ * <p>
+ * In the IDE scenario, the default page input is IWorkspaceRoot, in the RCP
+ * scenario it is null and can be configured in the WorkbenchAdvisor.
+ * </p>
+ * 
+ * <p>
  * Clients that wish to extend the view menu provided via the
- * <b>org.eclipse.ui.popupMenu</b>s extension may specify the the <i>popupMenuId</i>
- * specified by <b>org.eclipse.ui.navigator.viewer</b> (or a nested <b>popupMenu</b> element) of their target viewer
- * as their target menu id.
+ * <b>org.eclipse.ui.popupMenu</b>s extension may specify the the
+ * <i>popupMenuId</i> specified by <b>org.eclipse.ui.navigator.viewer</b> (or a
+ * nested <b>popupMenu</b> element) of their target viewer as their target menu
+ * id.
+ * </p>
  * 
  * <p>
  * This class may be instantiated or subclassed
  * </p>
+ * 
  * @since 3.2
  */
 public class CommonNavigator extends ViewPart implements ISetSelectionTarget, ISaveablePart, ISaveablesSource, IShowInTarget {
@@ -496,13 +517,12 @@ public class CommonNavigator extends ViewPart implements ISetSelectionTarget, IS
 	protected void initListeners(TreeViewer viewer) {
 
 		viewer.addDoubleClickListener(new IDoubleClickListener() {
-
-			public void doubleClick(DoubleClickEvent event) {
-				try {
-					handleDoubleClick(event);
-				} catch (RuntimeException re) {
-					re.printStackTrace();
-				}
+			public void doubleClick(final DoubleClickEvent event) {
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						handleDoubleClick(event);
+					}
+				});
 			}
 		});
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorManager.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorManager.java
index 12f7f69..623e00b 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorManager.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonNavigatorManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Menu;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
@@ -40,6 +39,7 @@ import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.actions.RetargetAction;
 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
 import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.progress.UIJob;
 
 /**
@@ -54,9 +54,6 @@ import org.eclipse.ui.progress.UIJob;
  */
 public final class CommonNavigatorManager implements ISelectionChangedListener {
 
-	// delay for updating the action bars (in ms)
-	private static final long DELAY = 200;
-
 	private final CommonNavigator commonNavigator;
 
 	private final INavigatorContentService contentService;
@@ -87,13 +84,7 @@ public final class CommonNavigatorManager implements ISelectionChangedListener {
 		}
 		  
 		public IStatus runInUIThread(IProgressMonitor monitor) {
-
-			SafeRunner.run(new ISafeRunnable() {
-				/*
-				 * (non-Javadoc)
-				 * 
-				 * @see org.eclipse.core.runtime.ISafeRunnable#run()
-				 */
+			SafeRunner.run(new NavigatorSafeRunnable() {
 				public void run() throws Exception {
 					if(commonNavigator.getCommonViewer().getInput() != null) {
 						IStructuredSelection selection = new StructuredSelection(commonNavigator.getCommonViewer().getInput());
@@ -101,14 +92,6 @@ public final class CommonNavigatorManager implements ISelectionChangedListener {
 						actionService.fillActionBars(commonNavigator.getViewSite().getActionBars());
 					}
 				}
-				/*
-				 * (non-Javadoc)
-				 * 
-				 * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
-				 */
-				public void handleException(Throwable exception) {
-					NavigatorPlugin.logError(0, exception.getMessage(), exception);
-				}
 			});
 			return Status.OK_STATUS;
 		}
@@ -309,7 +292,7 @@ public final class CommonNavigatorManager implements ISelectionChangedListener {
 		viewMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS
 				+ "-end"));//$NON-NLS-1$
 		
-		updateActionBars.schedule(DELAY);
+		updateActionBars.schedule(NavigatorPlugin.ACTION_BAR_DELAY);
 		
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java
index e0e1cad..9ddc7cd 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -288,8 +288,6 @@ public class CommonViewer extends TreeViewer {
 	 *      java.lang.Object[])
 	 */
 	public void add(Object parentElement, Object[] childElements) {
-		// TODO Intercept ADD for the pipeline service.
-
 		NavigatorPipelineService pipeDream = (NavigatorPipelineService) contentService
 				.getPipelineService();
 
@@ -314,9 +312,6 @@ public class CommonViewer extends TreeViewer {
 	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object[])
 	 */
 	public void remove(Object[] elements) {
-
-		// TODO Intercept REMOVE for the pipeline service.
-
 		NavigatorPipelineService pipeDream = (NavigatorPipelineService) contentService
 				.getPipelineService();
 
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSorter.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSorter.java
index b6a11cc..7c7071d 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSorter.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewerSorter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -74,7 +74,7 @@ public final class CommonViewerSorter extends TreePathViewerSorter {
 			return 0;
 
 		INavigatorContentDescriptor source = getSource(element);
-		return source != null ? source.getPriority() : Priority.NORMAL_PRIORITY_VALUE;
+		return source != null ? source.getSequenceNumber() : Priority.NORMAL_PRIORITY_VALUE;
 	}
 
 	private void logMissingExtension(Object parent, Object object) {
@@ -104,43 +104,38 @@ public final class CommonViewerSorter extends TreePathViewerSorter {
 			return -1;
 		}
 
-		// shortcut if contributed by same source
-		if(sourceOfLvalue == sourceOfRvalue) {
-			ViewerSorter sorter = sorterService.findSorter(sourceOfLvalue, parent, e1, e2);
-			if (sorter != null) {
-				return sorter.compare(viewer, e1, e2);
-			}
-		} 
+		ViewerSorter sorter = null;
 
-		boolean flags[] = new boolean[4];
-		flags[0] = sourceOfLvalue.isTriggerPoint(e1);
-		flags[1] = sourceOfLvalue.isTriggerPoint(e2);
-		flags[2] = sourceOfRvalue.isTriggerPoint(e1);
-		flags[3] = sourceOfRvalue.isTriggerPoint(e2);
-		
-		int whoknows  = 0;		 
-		whoknows  = whoknows  | (flags[0] & flags[1] ? LEFT_UNDERSTANDS : 0); 
-		whoknows  = whoknows  | (flags[2] & flags[3] ? RIGHT_UNDERSTANDS : 0); 
-		
+		// shortcut if contributed by same source
+		if (sourceOfLvalue == sourceOfRvalue) {
+			sorter = sorterService.findSorter(sourceOfLvalue, parent, e1, e2);
+		} else {
 
-		ViewerSorter sorter = null;
-		
-		switch(whoknows) {
-			case BOTH_UNDERSTAND: 
-				sorter = sourceOfLvalue.getPriority() > sourceOfRvalue.getPriority() ? 
-						sorterService.findSorter(sourceOfLvalue, parent, e1, e2) : 
-						sorterService.findSorter(sourceOfRvalue, parent, e1, e2);
+			boolean flags[] = new boolean[4];
+			flags[0] = sourceOfLvalue.isTriggerPoint(e1);
+			flags[1] = sourceOfLvalue.isTriggerPoint(e2);
+			flags[2] = sourceOfRvalue.isTriggerPoint(e1);
+			flags[3] = sourceOfRvalue.isTriggerPoint(e2);
+
+			int whoknows = 0;
+			whoknows = whoknows | (flags[0] & flags[1] ? LEFT_UNDERSTANDS : 0);
+			whoknows = whoknows | (flags[2] & flags[3] ? RIGHT_UNDERSTANDS : 0);
+
+			switch (whoknows) {
+			case BOTH_UNDERSTAND:
+				sorter = sourceOfLvalue.getSequenceNumber() > sourceOfRvalue.getSequenceNumber() ? sorterService
+						.findSorter(sourceOfLvalue, parent, e1, e2)
+						: sorterService.findSorter(sourceOfRvalue, parent, e1, e2);
+				break;
+			case LEFT_UNDERSTANDS:
+				sorter = sorterService.findSorter(sourceOfLvalue, parent, e1, e2);
 				break;
-			case LEFT_UNDERSTANDS: 
-				sorter =  sorterService.findSorter(sourceOfLvalue,
-					parent, e1, e2) ;
-					break;
-			case RIGHT_UNDERSTANDS: 
-				sorter =  sorterService.findSorter(sourceOfRvalue,
-					parent, e1, e2) ;
-					break;
+			case RIGHT_UNDERSTANDS:
+				sorter = sorterService.findSorter(sourceOfRvalue, parent, e1, e2);
+				break;
+			}
 		}
-		 
+		
 		if (sorter != null) {
 			return sorter.compare(viewer, e1, e2);
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java
index 3f33eea..5c8191f 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorContentDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,17 +56,50 @@ public interface INavigatorContentDescriptor {
 	 *         if no priority was specified.
 	 */
 	int getPriority();
-
+	
+	/**
+	 * Returns the extension that this extension must appear before.
+	 * 
+	 * @return The value specified by the <i>appearsBefore</i> attribute of the
+	 *         <navigatorContent/> element.
+	 *         
+	 * @since 3.5        
+	 */
+	public String getAppearsBeforeId();
+	
+	/**
+	 * Returns the unique sequence number of this extension.  This is calculated based on
+	 * the priority and the appears before and represents the order the extension will appear
+	 * relative to the other extensions
+	 * 
+	 * @return The sequence number of the extension
+	 *         
+	 * @since 3.5        
+	 */
+	public int getSequenceNumber();
+	
 	/**
 	 * The enabledByDefault attribute specifies whether an extension should be
 	 * activated in the context of a viewer automatically. Users may override
-	 * this setting through the "Types of Content" dialog.
+	 * this setting through the "Types of Content" dialog. This will be true
+	 * if either the activeByDefault attribute of the navigatorContent element 
+	 * is true, or if an initialActivationExpression is specified which resolves
+	 * to true.
 	 * 
 	 * @return true if the extension is enabled by default.
 	 */
 	boolean isActiveByDefault();
 
 	/**
+	 * True if this content extension is used only to specify a commonSorter 
+	 * in order to provide only sorting.
+	 * @return true if sort only
+	 * 
+	 * @since 3.5
+	 */
+	boolean isSortOnly();
+	
+	/**
 	 * Determine if this content extension is enabled for the given element.
 	 * 
 	 * @param anElement
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java
index 2baaaf6..cbc4fe5 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorFilterService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,6 +80,21 @@ public interface INavigatorFilterService {
 	boolean isActive(String aFilterId);
 
 	/**
+	 * Cause the specified set of filters to be activated, and any filters not
+	 * specified to be deactivated. Updates the viewer filters for the
+	 * associated viewer. This is a higher level operation that handles the
+	 * filter activation completely, in contrast to
+	 * {@link #setActiveFilterIds(String[])} which does not set the viewer
+	 * filter state. This is probably the one you want if you are changing
+	 * filters.
+	 * 
+	 * @param theFilterIds
+	 *            An array of filter ids to activate.
+	 * @since 3.5
+	 */
+	public void activateFilterIdsAndUpdateViewer(String[] theFilterIds);
+
+	/**
 	 * Activate the set of given filters. An <i>active</i> filter will always be
 	 * returned from {@link #getVisibleFilters(boolean)}. An <i>inactive</i> filter will
 	 * only be returned from {@link #getVisibleFilters(boolean)} when it is
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorPipelineService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorPipelineService.java
index 22493a5..5eacdb4 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorPipelineService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorPipelineService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,6 @@ package org.eclipse.ui.navigator;
  * @since 3.2
  */
 public interface INavigatorPipelineService {
-	
 
 	/**
 	 * Intercept attempts to add elements directly to the viewer.
@@ -35,7 +34,7 @@ public interface INavigatorPipelineService {
 	 * For content extensions that reshape the structure of children in a
 	 * viewer, their overridden extensions may sometimes use optimized refreshes
 	 * to add elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
+	 * mapped to the correct set of model elements in the overriding extension.
 	 * Clients may add, remove, or modify elements in the given set of added
 	 * children. Clients should return a set for downstream extensions to
 	 * massage further.
@@ -55,7 +54,7 @@ public interface INavigatorPipelineService {
 	 */
 	public PipelinedShapeModification interceptAdd(
 			PipelinedShapeModification anAddModification);
-	
+
 	/**
 	 * Intercept attempts to remove elements directly from the viewer.
 	 * 
@@ -63,7 +62,7 @@ public interface INavigatorPipelineService {
 	 * For content extensions that reshape the structure of children in a
 	 * viewer, their overridden extensions may sometimes use optimized refreshes
 	 * to remove elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
+	 * mapped to the correct set of model elements in the overriding extension.
 	 * Clients may add, remove, or modify elements in the given set of removed
 	 * children. Clients should return a set for downstream extensions to
 	 * massage further.
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java
index 7e49369..9c85978 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/INavigatorViewerDescriptor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -54,6 +54,13 @@ public interface INavigatorViewerDescriptor {
 	String PROP_HIDE_LINK_WITH_EDITOR_ACTION = "org.eclipse.ui.navigator.hideLinkWithEditorAction"; //$NON-NLS-1$
 
 	/**
+	 * {@value} (string): The help context id to be used for the customize view dialog, if not specified
+	 * help will not be available.
+	 * @since 3.5
+	 */
+	String PROP_CUSTOMIZE_VIEW_DIALOG_HELP_CONTEXT = "org.eclipse.ui.navigator.customizeViewDialogHelpContext"; //$NON-NLS-1$
+
+	/**
 	 * Returns the id of the viewer targeted by this extension.
 	 * 
 	 * @return the id of the viewer targeted by this extension.
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider.java
index c1de4c1..e03ed74 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,38 +13,19 @@ package org.eclipse.ui.navigator;
 
 import java.util.Set;
 
-import org.eclipse.jface.viewers.ITreeContentProvider;
-
 /**
  * 
- * A pipelined content provider allows an extension to reshape the contributions
- * of an upstream content extension.
- * 
- * <p>
- * An "upstream" extension is either:
- * <ul>
- * <li> the extension overridden by this extension using the
- * <b>org.eclipse.ui.navigatorContent/navigatorContent/override</b> element, or
- * </li>
- * <li>another extension that overrides the same extension this extension
- * overrides, but with higher priority than this extension. </li>
- * </ul>
- * </p>
- * <p>
- * Overridden extensions form a tree where the nodes of the tree represent the
- * content extensions, children represent overridding extensions, and the
- * children are sorted by priority. Pipeline contributions traverse the tree,
- * allowing children to override the contributions of their parent, giving
- * precedence to the children of highest priority.
- * </p> 
+ * To correctly implement pipelining you should implement
+ * {@link IPipelinedTreeContentProvider2} which provides the
+ * additional
+ * {@link IPipelinedTreeContentProvider2#hasChildren(Object)} method.
+ * This allows the calculation of hasChildren to match what will be provided in
+ * calculating the children. If you don't implement the hasChildren, you may get
+ * "false positive" hasChildrens which will result in a "+" indication in the
+ * tree in the event that the pipelined children calculation.
  * 
- * <p>
- * {@link ITreeContentProvider} is respected by the Common
- * Navigator.
- * </p>
+ * The only reason these are two separate interfaces is historical.
  * 
- * @see INavigatorPipelineService
- * @see INavigatorContentService#getPipelineService()
  * @since 3.2
  * 
  */
@@ -56,7 +37,6 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * should be modified to contain the correct children to return to the
 	 * viewer.
 	 * 
-	 * 
 	 * @param aParent
 	 *            A parent from the viewer
 	 * @param theCurrentChildren
@@ -86,7 +66,9 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 *            The object being queried for a parent.
 	 * @param aSuggestedParent
 	 *            The parent already suggested from upstream extensions.
-	 * @return The intended parent from this pipelined content provider.
+	 * @return The intended parent from this pipelined content provider. If you
+	 *         wish to not influence the parent, then return the
+	 *         aSuggestedParent value.
 	 */
 	Object getPipelinedParent(Object anObject, Object aSuggestedParent);
 
@@ -97,19 +79,19 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * For content extensions that reshape the structure of children in a
 	 * viewer, their overridden extensions may sometimes use optimized refreshes
 	 * to add elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
+	 * mapped to the correct set of model elements in the overriding extension.
 	 * Clients may add, remove, or modify elements in the given set of added
 	 * children. Clients should return a set for downstream extensions to
-	 * massage further. 
+	 * massage further.
 	 * </p>
 	 * <p>
 	 * Clients may change what parent the reshaped elements are added to, so
 	 * long as that parent is not the root of the viewer.
 	 * </p>
 	 * <p>
-	 * Clients should never create their own pipeline shape
-	 * modifications, but instead return the shape modification that was passed
-	 * in with appropriate changes.
+	 * Clients should never create their own pipeline shape modifications, but
+	 * instead return the shape modification that was passed in with appropriate
+	 * changes.
 	 * </p>
 	 * <p>
 	 * <b>Clients should not call any of the add, remove, refresh, or update
@@ -124,8 +106,7 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * @return The new shape modification to use. Clients should <b>never</b>
 	 *         return <b>null</b> from this method.
 	 */
-	PipelinedShapeModification interceptAdd(
-			PipelinedShapeModification anAddModification);
+	PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification);
 
 	/**
 	 * Intercept attempts to remove elements directly from the viewer.
@@ -134,7 +115,7 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * For content extensions that reshape the structure of children in a
 	 * viewer, their overridden extensions may sometimes use optimized refreshes
 	 * to remove elements to the tree. These attempts must be intercepted and
-	 * mapped to the correct set of model elements in the overridding extension.
+	 * mapped to the correct set of model elements in the overriding extension.
 	 * Clients may add, remove, or modify elements in the given set of removed
 	 * children. Clients should return a set for downstream extensions to
 	 * massage further.
@@ -142,9 +123,9 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * <p>
 	 * The parent will be <b>null</b> for remove modifications.
 	 * <p>
-	 * Clients should never create their own pipeline shape
-	 * modifications, but instead return the shape modification that was passed
-	 * in with appropriate changes.
+	 * Clients should never create their own pipeline shape modifications, but
+	 * instead return the shape modification that was passed in with appropriate
+	 * changes.
 	 * </p>
 	 * <p>
 	 * <b>Clients should not call any of the add, remove, refresh, or update
@@ -159,8 +140,7 @@ public interface IPipelinedTreeContentProvider extends ICommonContentProvider {
 	 * @return The new shape modification to use. Clients should <b>never</b>
 	 *         return <b>null</b> from this method.
 	 */
-	PipelinedShapeModification interceptRemove(
-			PipelinedShapeModification aRemoveModification);
+	PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification);
 
 	/**
 	 * Intercept calls to viewer <code>refresh()</code> methods.
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider2.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider2.java
new file mode 100644
index 0000000..b6a121a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/IPipelinedTreeContentProvider2.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Oakland Software Incorporated and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Oakland Software Incorporated - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.navigator;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+
+/**
+ * 
+ * A pipelined content provider allows an extension to reshape the contributions
+ * of an upstream content extension.
+ * 
+ * An "upstream" extension is either:
+ * <ul>
+ * <li>the extension overridden by this extension using the
+ * <b>org.eclipse.ui.navigatorContent/navigatorContent/override</b> element, or</li>
+ * <li>another extension that overrides the same extension this extension
+ * overrides, but with higher priority than this extension.</li>
+ * </ul>
+ * 
+ * Overridden extensions form a tree where the nodes of the tree represent the
+ * content extensions, children represent overriding extensions, and the
+ * children are sorted by priority. Pipeline contributions traverse the tree,
+ * allowing children to override the contributions of their parent, giving
+ * precedence to the children of highest priority.
+ * 
+ * {@link ITreeContentProvider} is respected by the Common Navigator.
+ * 
+ * Note: this should be used instead of {@link IPipelinedTreeContentProvider} so
+ * that the hasChildren indication reflects the actual pipelined children that
+ * will be presented.
+ * 
+ * @see INavigatorPipelineService
+ * @see INavigatorContentService#getPipelineService()
+ * @since 3.5
+ * 
+ */
+public interface IPipelinedTreeContentProvider2 extends IPipelinedTreeContentProvider {
+
+	/**
+	 * Intercept the fact of having children and optionally modify this. This
+	 * calculation should match whether children will be actually provided.
+	 * 
+	 * @param anInput
+	 *            An input from the viewer
+	 * @param currentHasChildren
+	 *            The current proposed setting of hasChildren thus far from the
+	 *            upstream content providers.
+	 * @return The new value for hasChildren
+	 */
+	boolean hasPipelinedChildren(Object anInput, boolean currentHasChildren);
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java
index fc0c4bd..0839457 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/NavigatorActionService.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.jface.action.GroupMarker;
 import org.eclipse.jface.action.IContributionItem;
@@ -34,7 +33,7 @@ import org.eclipse.ui.actions.ActionContext;
 import org.eclipse.ui.actions.ActionGroup;
 import org.eclipse.ui.activities.WorkbenchActivityHelper;
 import org.eclipse.ui.internal.navigator.NavigatorContentService;
-import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+import org.eclipse.ui.internal.navigator.NavigatorSafeRunnable;
 import org.eclipse.ui.internal.navigator.actions.CommonActionDescriptorManager;
 import org.eclipse.ui.internal.navigator.actions.CommonActionProviderDescriptor;
 import org.eclipse.ui.internal.navigator.extensions.CommonActionExtensionSite;
@@ -208,20 +207,21 @@ public final class NavigatorActionService extends ActionGroup implements IMement
 	/**
 	 * @param aMenu
 	 */
-	private void addCommonActionProviderMenu(IMenuManager aMenu) {
-
-		CommonActionProviderDescriptor[] providerDescriptors = CommonActionDescriptorManager.getInstance().findRelevantActionDescriptors(contentService, getContext());
+	private void addCommonActionProviderMenu(final IMenuManager aMenu) {
+		final CommonActionProviderDescriptor[] providerDescriptors = CommonActionDescriptorManager
+				.getInstance().findRelevantActionDescriptors(contentService, getContext());
 		if (providerDescriptors.length > 0) {
 			for (int i = 0; i < providerDescriptors.length; i++) {
-				try {
-					if (!filterActionProvider(providerDescriptors[i])) {
-						CommonActionProvider provider = getActionProviderInstance(providerDescriptors[i]);
-						provider.setContext(getContext());
-						provider.fillContextMenu(aMenu);
+				final CommonActionProviderDescriptor providerDescriptorLocal = providerDescriptors[i];
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						if (!filterActionProvider(providerDescriptorLocal)) {
+							CommonActionProvider provider = getActionProviderInstance(providerDescriptorLocal);
+							provider.setContext(getContext());
+							provider.fillContextMenu(aMenu);
+						}
 					}
-				} catch (Throwable t) {
-					NavigatorPlugin.logError(0, t.getMessage(), t);
-				}
+				});
 			}
 		}
 	}
@@ -235,7 +235,7 @@ public final class NavigatorActionService extends ActionGroup implements IMement
 	 *            The action bars in use by the current view site.
 	 * @see ActionGroup#fillActionBars(IActionBars)
 	 */
-	public void fillActionBars(IActionBars theActionBars) {
+	public void fillActionBars(final IActionBars theActionBars) {
 		Assert.isTrue(!disposed);
 
 		theActionBars.clearGlobalActionHandlers();
@@ -244,21 +244,23 @@ public final class NavigatorActionService extends ActionGroup implements IMement
 			context = new ActionContext(StructuredSelection.EMPTY);
 		}
 
-		CommonActionProviderDescriptor[] providerDescriptors = CommonActionDescriptorManager.getInstance().findRelevantActionDescriptors(contentService, context);
+		final CommonActionProviderDescriptor[] providerDescriptors = CommonActionDescriptorManager
+				.getInstance().findRelevantActionDescriptors(contentService, context);
 		if (providerDescriptors.length > 0) {
-			CommonActionProvider provider = null;
 			for (int i = 0; i < providerDescriptors.length; i++) {
-				try {
-					if (!filterActionProvider(providerDescriptors[i])) {
-						provider = getActionProviderInstance(providerDescriptors[i]);
-						provider.setContext(context);
-						provider.fillActionBars(theActionBars);
-						provider.updateActionBars();
+				final CommonActionProviderDescriptor providerDesciptorLocal = providerDescriptors[i];
+				final ActionContext actionContextLocal = context;
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						if (!filterActionProvider(providerDesciptorLocal)) {
+							CommonActionProvider provider = null;
+							provider = getActionProviderInstance(providerDesciptorLocal);
+							provider.setContext(actionContextLocal);
+							provider.fillActionBars(theActionBars);
+							provider.updateActionBars();
+						}
 					}
-
-				} catch (RuntimeException e) {
-					NavigatorPlugin.logError(0, e.getMessage(), e);
-				}
+				});
 			}
 		}
 		theActionBars.updateActionBars();
@@ -293,20 +295,15 @@ public final class NavigatorActionService extends ActionGroup implements IMement
 		memento = aMemento;
 
 		synchronized (actionProviderInstances) {
-			for (Iterator actionProviderIterator = actionProviderInstances.values().iterator(); actionProviderIterator.hasNext();) {
-				final CommonActionProvider provider = (CommonActionProvider) actionProviderIterator.next();
-				ISafeRunnable runnable = new ISafeRunnable() {
+			for (Iterator actionProviderIterator = actionProviderInstances.values().iterator(); actionProviderIterator
+					.hasNext();) {
+				final CommonActionProvider provider = (CommonActionProvider) actionProviderIterator
+						.next();
+				SafeRunner.run(new NavigatorSafeRunnable() {
 					public void run() throws Exception {
 						provider.restoreState(memento);
 					}
-
-					public void handleException(Throwable exception) {
-						NavigatorPlugin.logError(0, "Could not restore state for action provider " + provider.getClass(), exception); //$NON-NLS-1$
-
-					}
-				};
-				SafeRunner.run(runnable);
-
+				});
 			}
 		}
 	}
@@ -337,40 +334,47 @@ public final class NavigatorActionService extends ActionGroup implements IMement
 	 * @noreference This method is not intended to be referenced by clients.
 	 */
 	public CommonActionProvider getActionProviderInstance(
-			CommonActionProviderDescriptor aProviderDescriptor) {
+			final CommonActionProviderDescriptor aProviderDescriptor) {
 		CommonActionProvider provider = null;
-		try {
-			provider = (CommonActionProvider) actionProviderInstances
-					.get(aProviderDescriptor);
-			if (provider != null) {
-				return provider;
-			}
-			synchronized (actionProviderInstances) {
-				provider = (CommonActionProvider) actionProviderInstances
-						.get(aProviderDescriptor);
-				if (provider == null) {
-					provider = aProviderDescriptor.createActionProvider();
-					if (provider != null) {
-						actionProviderInstances.put(aProviderDescriptor, provider);
-						initialize(aProviderDescriptor.getId(), aProviderDescriptor.getPluginId(), provider);
-					} else {
-						actionProviderInstances.put(aProviderDescriptor,
-								(provider = SkeletonActionProvider.INSTANCE));
+		provider = (CommonActionProvider) actionProviderInstances.get(aProviderDescriptor);
+		if (provider != null) {
+			return provider;
+		}
+		synchronized (actionProviderInstances) {
+			provider = (CommonActionProvider) actionProviderInstances.get(aProviderDescriptor);
+			if (provider == null) {
+				final CommonActionProvider[] retProvider = new CommonActionProvider[1];
+				SafeRunner.run(new NavigatorSafeRunnable() {
+					public void run() throws Exception {
+						retProvider[0] = aProviderDescriptor.createActionProvider();
+						if (retProvider[0] != null) {
+							initialize(aProviderDescriptor.getId(), aProviderDescriptor
+									.getPluginId(), retProvider[0]);
+						}
 					}
-				}
+				});
+				// This could happen in the exception case
+				if (retProvider[0] == null)
+					retProvider[0] = SkeletonActionProvider.INSTANCE;
+				actionProviderInstances.put(aProviderDescriptor, retProvider[0]);
+				provider = retProvider[0];
 			}
-		} catch(Throwable t) {
-			NavigatorPlugin.logError(0, t.getMessage(), t);
 		}
 		return provider;
 	}
 
-	private void initialize(String id, String pluginId, CommonActionProvider anActionProvider) {
+	private void initialize(final String id, final String pluginId,
+			final CommonActionProvider anActionProvider) {
 		if (anActionProvider != null && anActionProvider != SkeletonActionProvider.INSTANCE) {
-			ICommonActionExtensionSite configuration = new CommonActionExtensionSite(id, pluginId, commonViewerSite, contentService, structuredViewer);
-			anActionProvider.init(configuration);
-			anActionProvider.restoreState(memento);
-			anActionProvider.setContext(new ActionContext(StructuredSelection.EMPTY));
+			SafeRunner.run(new NavigatorSafeRunnable() {
+				public void run() throws Exception {
+					ICommonActionExtensionSite configuration = new CommonActionExtensionSite(id,
+							pluginId, commonViewerSite, contentService, structuredViewer);
+					anActionProvider.init(configuration);
+					anActionProvider.restoreState(memento);
+					anActionProvider.setContext(new ActionContext(StructuredSelection.EMPTY));
+				}
+			});
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedShapeModification.java b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedShapeModification.java
index 61afd34..15559c9 100644
--- a/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedShapeModification.java
+++ b/eclipse/plugins/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/PipelinedShapeModification.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,14 +20,14 @@ import java.util.Set;
  * type from intercept methods on {@link IPipelinedTreeContentProvider}.
  * 
  * <p>
- * Overridding extensions should use these to map attempts to directly modify
- * the tree down to the overridden model. A shape modification can either be an
- * <i>add</i> or <i>remove</i> shape modification, and the type is determined
- * by the context of its use. If supplied to an <code>interceptRemove</code>
+ * Overriding extensions should use these to map attempts to directly modify the
+ * tree down to the overridden model. A shape modification can either be an
+ * <i>add</i> or <i>remove</i> shape modification, and the type is determined by
+ * the context of its use. If supplied to an <code>interceptRemove</code>
  * method, then it is a remove shape modification, otherwise if supplied to an
  * <code>interceptAdd</code> method, then it is an add shape modification.
  * </p>
- *  
+ * 
  * 
  * @since 3.2
  * 
diff --git a/eclipse/plugins/org.eclipse.ui.net/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.net/META-INF/MANIFEST.MF
index 34e93ab..a23905a 100644
--- a/eclipse/plugins/org.eclipse.ui.net/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.net/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %PLUGIN_NAME
 Bundle-SymbolicName: org.eclipse.ui.net; singleton:=true
-Bundle-Version: 1.2.1.qualifier
+Bundle-Version: 1.2.100.qualifier
 Bundle-Activator: org.eclipse.ui.internal.net.Activator
 Bundle-Vendor: %PLUGIN_PROVIDER
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java b/eclipse/plugins/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java
index 7b48405..0a79927 100644
--- a/eclipse/plugins/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.net/src/org/eclipse/ui/internal/net/ProxyPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,7 +58,9 @@ public class ProxyPreferencePage extends PreferencePage implements
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
 				PROXY_PREFERENCE_PAGE_CONTEXT_ID);
 
+		applyDialogFont(composite);
 		initializeValues();
+
 		return composite;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.presentations.r21/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.presentations.r21/META-INF/MANIFEST.MF
index b744e77..fffc6f7 100644
--- a/eclipse/plugins/org.eclipse.ui.presentations.r21/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.presentations.r21/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.presentations.r21; singleton:=true
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.ui.internal.presentations.r21.R21PresentationPlugin
 Bundle-Vendor: %providerName
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/.settings/org.eclipse.pde.prefs b/eclipse/plugins/org.eclipse.ui.views.log/.settings/org.eclipse.pde.prefs
index 8d3361f..c9c76e6 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/.settings/org.eclipse.pde.prefs
+++ b/eclipse/plugins/org.eclipse.ui.views.log/.settings/org.eclipse.pde.prefs
@@ -1,16 +1,28 @@
-#Sun Dec 23 21:53:15 CST 2007
+#Mon Dec 14 12:09:28 CST 2009
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
 compilers.incompatible-environment=1
 compilers.p.build=1
+compilers.p.build.missing.output=1
 compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
 compilers.p.missing-bundle-classpath-entries=1
 compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
 compilers.p.no-required-att=0
 compilers.p.not-externalized-att=0
 compilers.p.unknown-attribute=1
 compilers.p.unknown-class=0
 compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
 compilers.p.unknown-resource=0
 compilers.p.unresolved-ex-points=0
 compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
 compilers.use-project=true
 eclipse.preferences.version=1
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
index 9631840..69ec5cc 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,9 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.views.log;
 
+import com.ibm.icu.text.DateFormat;
 import java.io.*;
-import java.text.*;
+import java.text.Collator;
 import java.util.*;
 import java.util.List;
 import org.eclipse.core.runtime.IAdaptable;
@@ -85,7 +86,7 @@ public class EventDetailsDialog extends TrayDialog {
 	private Point dialogSize;
 	private int[] sashWeights;
 
-	private DateFormat dateFormat = new SimpleDateFormat();
+	private DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
 
 	/**
 	 * 
@@ -358,9 +359,11 @@ public class EventDetailsDialog extends TrayDialog {
 				stackTraceText.setText(Messages.EventDetailsDialog_noStack);
 			}
 
-			String session = logEntry.getSession().getSessionData();
-			if (session != null) {
-				sessionDataText.setText(session);
+			if (logEntry.getSession() != null) {
+				String session = logEntry.getSession().getSessionData();
+				if (session != null) {
+					sessionDataText.setText(session);
+				}
 			}
 
 		} else {
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
index fd3764b..e072432 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -114,6 +114,13 @@ public class FilterDialog extends TrayDialog {
 		});
 
 		limitText = new Text(comp, SWT.BORDER);
+		limitText.addVerifyListener(new VerifyListener() {
+			public void verifyText(VerifyEvent e) {
+				if (Character.isLetter(e.character)) {
+					e.doit = false;
+				}
+			}
+		});
 		limitText.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				try {
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
index c8098db..d9c42ec 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
+++ b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,20 +11,23 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.views.log;
 
+import com.ibm.icu.text.DateFormat;
 import com.ibm.icu.text.SimpleDateFormat;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.text.ParseException;
-import java.util.Date;
-import java.util.StringTokenizer;
+import java.util.*;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.model.IWorkbenchAdapter;
 
+/**
+ * Represents a given entry in the Error view
+ */
 public class LogEntry extends AbstractEntry {
 
+	public static final String SPACE = " "; //$NON-NLS-1$
 	public static final String F_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$
-	private static final SimpleDateFormat F_SDF = new SimpleDateFormat(F_DATE_FORMAT);
+	private static final DateFormat GREGORIAN_SDF = new SimpleDateFormat(F_DATE_FORMAT, Locale.ENGLISH);
+	private static final DateFormat LOCAL_SDF = new SimpleDateFormat(F_DATE_FORMAT);
 
 	private String pluginId;
 	private int severity;
@@ -35,226 +38,307 @@ public class LogEntry extends AbstractEntry {
 	private String stack;
 	private LogSession session;
 
-	public LogEntry() { // do nothing
+	/**
+	 * Constructor
+	 */
+	public LogEntry() {
+		//do nothing
+	}
+
+	/**
+	 * Constructor - creates a new entry from the given status
+	 * @param status an existing status to create a new entry from
+	 */
+	public LogEntry(IStatus status) {
+		processStatus(status);
 	}
 
+	/**
+	 * Returns the {@link LogSession} for this entry or the parent {@link LogSession}
+	 * iff:
+	 * <ul>
+	 * <li>The session is <code>null</code> for this entry</li>
+	 * <li>The parent of this entry is not <code>null</code> and is a {@link LogEntry}</li>
+	 * </ul>
+	 * @return the {@link LogSession} for this entry
+	 */
 	public LogSession getSession() {
-		if ((session == null) && (parent != null) && (parent instanceof LogEntry))
+		if ((session == null) && (parent != null) && (parent instanceof LogEntry)) {
 			return ((LogEntry) parent).getSession();
-
+		}
 		return session;
 	}
 
+	/**
+	 * Sets the {@link LogSession} for this entry. No validation is done on the new session.
+	 * @param session the session to set.
+	 */
 	void setSession(LogSession session) {
 		this.session = session;
 	}
 
-	public LogEntry(IStatus status) {
-		processStatus(status);
-	}
-
+	/**
+	 * Returns the severity of this entry.
+	 * @return the severity
+	 * @see IStatus#OK
+	 * @see IStatus#WARNING
+	 * @see IStatus#INFO
+	 * @see IStatus#ERROR
+	 */
 	public int getSeverity() {
 		return severity;
 	}
 
+	/**
+	 * Returns if the severity of this entry is {@link IStatus#OK}
+	 * @return if the entry is OK or not
+	 */
 	public boolean isOK() {
 		return severity == IStatus.OK;
 	}
 
+	/**
+	 * Returns the code for this entry
+	 * @return the code for this entry
+	 */
 	public int getCode() {
 		return code;
 	}
 
+	/**
+	 * Returns the id of the plugin that generated this entry
+	 * @return the plugin id of this entry
+	 */
 	public String getPluginId() {
 		return pluginId;
 	}
 
+	/**
+	 * Returns the message for this entry or <code>null</code> if there is no message
+	 * @return the message or <code>null</code>
+	 */
 	public String getMessage() {
 		return message;
 	}
 
+	/**
+	 * Returns the stack trace for this entry or <code>null</code> if there is no stack trace
+	 * @return the stack trace or <code>null</code>
+	 */
 	public String getStack() {
 		return stack;
 	}
 
+	/**
+	 * Returns a pretty-print formatting for the date for this entry
+	 * @return the formatted date for this entry
+	 */
 	public String getFormattedDate() {
-		if (fDateString == null)
-			fDateString = F_SDF.format(getDate());
+		if (fDateString == null) {
+			fDateString = LOCAL_SDF.format(getDate());
+		}
 		return fDateString;
 	}
 
+	/**
+	 * Returns the date for this entry or the epoch if the current date value is <code>null</code>
+	 * @return the entry date or the epoch if there is no date entry
+	 */
 	public Date getDate() {
-		if (fDate == null)
+		if (fDate == null) {
 			fDate = new Date(0); // unknown date - return epoch
+		}
 		return fDate;
 	}
 
+	/**
+	 * Returns the human-readable text representation of the integer
+	 * severity value or '<code>?</code>' if the severity is unknown.
+	 * @return the text representation of the severity
+	 */
 	public String getSeverityText() {
-		return getSeverityText(severity);
+		switch (severity) {
+			case IStatus.ERROR : {
+				return Messages.LogView_severity_error;
+			}
+			case IStatus.WARNING : {
+				return Messages.LogView_severity_warning;
+			}
+			case IStatus.INFO : {
+				return Messages.LogView_severity_info;
+			}
+			case IStatus.OK : {
+				return Messages.LogView_severity_ok;
+			}
+		}
+		return "?"; //$NON-NLS-1$
 	}
 
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
 	public String toString() {
 		return getSeverityText();
 	}
 
-	/**
-	 * @see IWorkbenchAdapter#getImageDescriptor(Object)
-	 */
-	public ImageDescriptor getImageDescriptor(Object arg0) {
-		return null;
-	}
-
-	/**
-	 * @see IWorkbenchAdapter#getLabel(Object)
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.log.AbstractEntry#getLabel(java.lang.Object)
 	 */
 	public String getLabel(Object obj) {
 		return getSeverityText();
 	}
 
-	private String getSeverityText(int severity) {
-		switch (severity) {
-			case IStatus.ERROR :
-				return Messages.LogView_severity_error;
-			case IStatus.WARNING :
-				return Messages.LogView_severity_warning;
-			case IStatus.INFO :
-				return Messages.LogView_severity_info;
-			case IStatus.OK :
-				return Messages.LogView_severity_ok;
-		}
-		return "?"; //$NON-NLS-1$
-	}
-
-	void processEntry(String line) {
+	/**
+	 * Processes a given line from the log file
+	 * @param line
+	 * @throws ParseException
+	 */
+	public void processEntry(String line) throws ParseException {
 		//!ENTRY <pluginID> <severity> <code> <date>
 		//!ENTRY <pluginID> <date> if logged by the framework!!!
-		StringTokenizer stok = new StringTokenizer(line, " "); //$NON-NLS-1$
-		int tokenCount = stok.countTokens();
-		boolean noSeverity = stok.countTokens() < 5;
-
-		// no severity means it should be represented as OK
-		if (noSeverity) {
-			severity = 0;
-			code = 0;
-		}
+		StringTokenizer stok = new StringTokenizer(line, SPACE);
+		severity = 0;
+		code = 0;
 		StringBuffer dateBuffer = new StringBuffer();
-		for (int i = 0; i < tokenCount; i++) {
-			String token = stok.nextToken();
+		int tokens = stok.countTokens();
+		String token = null;
+		for (int i = 0; i < tokens; i++) {
+			token = stok.nextToken();
 			switch (i) {
-				case 0 :
+				case 0 : {
 					break;
-				case 1 :
+				}
+				case 1 : {
 					pluginId = token;
 					break;
-				case 2 :
-					if (noSeverity) {
-						if (dateBuffer.length() > 0)
-							dateBuffer.append(" "); //$NON-NLS-1$
-						dateBuffer.append(token);
-					} else {
-						severity = parseInteger(token);
+				}
+				case 2 : {
+					try {
+						severity = Integer.parseInt(token);
+					} catch (NumberFormatException nfe) {
+						appendToken(dateBuffer, token);
 					}
 					break;
-				case 3 :
-					if (noSeverity) {
-						if (dateBuffer.length() > 0)
-							dateBuffer.append(" "); //$NON-NLS-1$
-						dateBuffer.append(token);
-					} else
-						code = parseInteger(token);
+				}
+				case 3 : {
+					try {
+						code = Integer.parseInt(token);
+					} catch (NumberFormatException nfe) {
+						appendToken(dateBuffer, token);
+					}
 					break;
-				default :
-					if (dateBuffer.length() > 0)
-						dateBuffer.append(" "); //$NON-NLS-1$
-					dateBuffer.append(token);
+				}
+				default : {
+					appendToken(dateBuffer, token);
+				}
 			}
 		}
-		try {
-			Date date = F_SDF.parse(dateBuffer.toString());
-			if (date != null) {
-				fDate = date;
-				fDateString = F_SDF.format(fDate);
-			}
-		} catch (ParseException e) { // do nothing
+		Date date = GREGORIAN_SDF.parse(dateBuffer.toString());
+		if (date != null) {
+			fDate = date;
+			fDateString = LOCAL_SDF.format(fDate);
 		}
 	}
 
-	int processSubEntry(String line) {
+	/**
+	 * Adds the given token to the given buffer, adding a space as needed
+	 * @param buffer
+	 * @param token
+	 * 
+	 * @since 3.6
+	 */
+	void appendToken(StringBuffer buffer, String token) {
+		if (buffer.length() > 0) {
+			buffer.append(SPACE);
+		}
+		buffer.append(token);
+	}
+
+	/**
+	 * Processes the given sub-entry from the log
+	 * @param line
+	 * @return the depth of the sub-entry
+	 * @throws ParseException
+	 */
+	public int processSubEntry(String line) throws ParseException {
 		//!SUBENTRY <depth> <pluginID> <severity> <code> <date>
 		//!SUBENTRY  <depth> <pluginID> <date>if logged by the framework!!!
-		StringTokenizer stok = new StringTokenizer(line, " "); //$NON-NLS-1$
-		int tokenCount = stok.countTokens();
-		boolean byFrameWork = stok.countTokens() < 5;
-
+		StringTokenizer stok = new StringTokenizer(line, SPACE);
 		StringBuffer dateBuffer = new StringBuffer();
 		int depth = 0;
-		for (int i = 0; i < tokenCount; i++) {
-			String token = stok.nextToken();
+		String token = null;
+		int tokens = stok.countTokens();
+		for (int i = 0; i < tokens; i++) {
+			token = stok.nextToken();
 			switch (i) {
-				case 0 :
+				case 0 : {
 					break;
-				case 1 :
-					depth = parseInteger(token);
+				}
+				case 1 : {
+					depth = Integer.parseInt(token);
 					break;
-				case 2 :
+				}
+				case 2 : {
 					pluginId = token;
 					break;
-				case 3 :
-					if (byFrameWork) {
-						if (dateBuffer.length() > 0)
-							dateBuffer.append(" "); //$NON-NLS-1$
-						dateBuffer.append(token);
-					} else {
-						severity = parseInteger(token);
+				}
+				case 3 : {
+					try {
+						severity = Integer.parseInt(token);
+					} catch (NumberFormatException nfe) {
+						appendToken(dateBuffer, token);
 					}
 					break;
-				case 4 :
-					if (byFrameWork) {
-						if (dateBuffer.length() > 0)
-							dateBuffer.append(" "); //$NON-NLS-1$
-						dateBuffer.append(token);
-					} else
-						code = parseInteger(token);
+				}
+				case 4 : {
+					try {
+						code = Integer.parseInt(token);
+					} catch (NumberFormatException nfe) {
+						appendToken(dateBuffer, token);
+					}
 					break;
-				default :
-					if (dateBuffer.length() > 0)
-						dateBuffer.append(" "); //$NON-NLS-1$
-					dateBuffer.append(token);
+				}
+				default : {
+					appendToken(dateBuffer, token);
+				}
 			}
 		}
-		try {
-			Date date = F_SDF.parse(dateBuffer.toString());
-			if (date != null) {
-				fDate = date;
-				fDateString = F_SDF.format(fDate);
-			}
-		} catch (ParseException e) { // do nothing
+		Date date = GREGORIAN_SDF.parse(dateBuffer.toString());
+		if (date != null) {
+			fDate = date;
+			fDateString = LOCAL_SDF.format(fDate);
 		}
 		return depth;
 	}
 
-	private int parseInteger(String token) {
-		try {
-			return Integer.parseInt(token);
-		} catch (NumberFormatException e) {
-			return 0;
-		}
-	}
-
+	/**
+	 * Sets the stack to the given stack value. 
+	 * No validation is performed on the new value.
+	 * @param stack
+	 */
 	void setStack(String stack) {
 		this.stack = stack;
 	}
 
+	/**
+	 * Sets the message to the given message value.
+	 * No validation is performed on the new value
+	 * @param message
+	 */
 	void setMessage(String message) {
 		this.message = message;
 	}
 
+	/**
+	 * Process the given status and sub-statuses to fill this entry
+	 * @param status
+	 */
 	private void processStatus(IStatus status) {
 		pluginId = status.getPlugin();
 		severity = status.getSeverity();
 		code = status.getCode();
 		fDate = new Date();
-		fDateString = F_SDF.format(fDate);
+		fDateString = LOCAL_SDF.format(fDate);
 		message = status.getMessage();
 		Throwable throwable = status.getException();
 		if (throwable != null) {
@@ -268,22 +352,25 @@ public class LogEntry extends AbstractEntry {
 		IStatus[] schildren = status.getChildren();
 		if (schildren.length > 0) {
 			for (int i = 0; i < schildren.length; i++) {
-				LogEntry child = new LogEntry(schildren[i]);
-				addChild(child);
+				addChild(new LogEntry(schildren[i]));
 			}
 		}
 	}
 
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.internal.views.log.AbstractEntry#write(java.io.PrintWriter)
+	 */
 	public void write(PrintWriter writer) {
-		if (session != null)
+		if (session != null) {
 			writer.println(session.getSessionData());
+		}
 		writer.println(getSeverityText());
-		if (fDate != null)
+		if (fDate != null) {
 			writer.println(getDate());
-
-		if (message != null)
+		}
+		if (message != null) {
 			writer.println(getMessage());
-
+		}
 		if (stack != null) {
 			writer.println();
 			writer.println(stack);
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
index 8fb36fb..1abcad7 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
+++ b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@
 package org.eclipse.ui.internal.views.log;
 
 import java.io.*;
+import java.text.ParseException;
 import java.util.*;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.ui.IMemento;
@@ -99,21 +100,29 @@ class LogReader {
 					if (currentSession == null) { // create fake session if there was no any
 						currentSession = new LogSession();
 					}
-					LogEntry entry = new LogEntry();
-					entry.setSession(currentSession);
-					entry.processEntry(line);
-					setNewParent(parents, entry, 0);
-					current = entry;
-					addEntry(current, entries, memento);
-				} else if (state == SUBENTRY_STATE) {
-					if (parents.size() > 0) {
+					try {
 						LogEntry entry = new LogEntry();
-						entry.setSession(session);
-						int depth = entry.processSubEntry(line);
-						setNewParent(parents, entry, depth);
+						entry.setSession(currentSession);
+						entry.processEntry(line);
+						setNewParent(parents, entry, 0);
 						current = entry;
-						LogEntry parent = (LogEntry) parents.get(depth - 1);
-						parent.addChild(entry);
+						addEntry(current, entries, memento);
+					} catch (ParseException pe) {
+						//do nothing, just toss the entry
+					}
+				} else if (state == SUBENTRY_STATE) {
+					if (parents.size() > 0) {
+						try {
+							LogEntry entry = new LogEntry();
+							entry.setSession(session);
+							int depth = entry.processSubEntry(line);
+							setNewParent(parents, entry, depth);
+							current = entry;
+							LogEntry parent = (LogEntry) parents.get(depth - 1);
+							parent.addChild(entry);
+						} catch (ParseException pe) {
+							//do nothing, just toss the bad entry
+						}
 					}
 				} else if (state == MESSAGE_STATE) {
 					swriter = new StringWriter();
diff --git a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
index 32b0675..f83cf07 100644
--- a/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
+++ b/eclipse/plugins/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *     Jacek Pospychala <jacek.pospychala at pl.ibm.com> - bugs 202583, 202584, 207344
  *     													bugs 207323, 207931, 207101
  *     													bugs 172658, 216341, 216657
- *     Michael Rennie <Michael_Rennie at ca.ibm.com> - bug 208637
  *     Benjamin Cabe <benjamin.cabe at anyware-tech.com> - bug 218648 
  *     Tuukka Lehtonen <tuukka.lehtonen at semantum.fi>  - bug 247907
  *******************************************************************************/
@@ -498,12 +497,14 @@ public class LogView extends ViewPart implements ILogListener {
 					LogEntry logEntry = (LogEntry) element;
 					String message = logEntry.getMessage();
 					String plugin = logEntry.getPluginId();
-					String date = logEntry.getFormattedDate();
+					DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
+					String date = dateFormat.format(logEntry.getDate());
 					return wordMatches(message) || wordMatches(plugin) || wordMatches(date);
 				}
 				return false;
 			}
 		};
+		filter.setIncludeLeadingWildcard(true);
 		fFilteredTree = new FilteredTree(parent, SWT.FULL_SELECTION, filter, true);
 		// need to give filter Textbox some space from the border
 		if (fFilteredTree.getFilterControl() != null) {
@@ -786,6 +787,9 @@ public class LogView extends ViewPart implements ILogListener {
 		});
 	}
 
+	/**
+	 * Reloads the log
+	 */
 	protected void reloadLog() {
 		IRunnableWithProgress op = new IRunnableWithProgress() {
 			public void run(IProgressMonitor monitor) {
@@ -806,7 +810,10 @@ public class LogView extends ViewPart implements ILogListener {
 		}
 	}
 
-	private void readLogFile() {
+	/**
+	 * Reads the chosen backing log file
+	 */
+	void readLogFile() {
 		elements.clear();
 		groups.clear();
 
@@ -1199,14 +1206,28 @@ public class LogView extends ViewPart implements ILogListener {
 	public void saveState(IMemento memento) {
 		if (this.fMemento == null || memento == null)
 			return;
-		this.fMemento.putInteger(P_COLUMN_1, fColumn1.getWidth());
-		this.fMemento.putInteger(P_COLUMN_2, fColumn2.getWidth());
-		this.fMemento.putInteger(P_COLUMN_3, fColumn3.getWidth());
+		//store some sane values to prevent the view from being broken
+		this.fMemento.putInteger(P_COLUMN_1, getColumnWidth(fColumn1, 300));
+		this.fMemento.putInteger(P_COLUMN_2, getColumnWidth(fColumn2, 150));
+		this.fMemento.putInteger(P_COLUMN_3, getColumnWidth(fColumn3, 150));
 		this.fMemento.putString(P_ACTIVATE, fActivateViewAction.isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
 		memento.putMemento(this.fMemento);
 		writeSettings();
 	}
 
+	/**
+	 * Returns the width of the column or the default value if the column has been resized to be not visible
+	 * @param column the column to get the width from
+	 * @param defaultwidth the width to return if the column has been resized to not be visible
+	 * @return the width of the column or the default value
+	 * 
+	 * @since 3.6
+	 */
+	int getColumnWidth(TreeColumn column, int defaultwidth) {
+		int width = column.getWidth();
+		return width < 1 ? defaultwidth : width;
+	}
+
 	private void addMouseListeners() {
 		Listener tableListener = new Listener() {
 			public void handleEvent(Event e) {
@@ -1530,6 +1551,9 @@ public class LogView extends ViewPart implements ILogListener {
 		return (new InstanceScope()).getNode(Activator.PLUGIN_ID);
 	}
 
+	/**
+	 * Loads any saved {@link IDialogSettings} into the backing view memento
+	 */
 	private void readSettings() {
 		IDialogSettings s = getLogSettings();
 		if (s == null) {
@@ -1549,9 +1573,9 @@ public class LogView extends ViewPart implements ILogListener {
 		}
 
 		Preferences p = getLogPreferences(); // never returns null
-		fMemento.putInteger(P_COLUMN_1, p.getInt(P_COLUMN_1, 300));
-		fMemento.putInteger(P_COLUMN_2, p.getInt(P_COLUMN_2, 150));
-		fMemento.putInteger(P_COLUMN_3, p.getInt(P_COLUMN_3, 150));
+		fMemento.putInteger(P_COLUMN_1, getColumnWidthPreference(p, P_COLUMN_1, 300));
+		fMemento.putInteger(P_COLUMN_2, getColumnWidthPreference(p, P_COLUMN_2, 150));
+		fMemento.putInteger(P_COLUMN_3, getColumnWidthPreference(p, P_COLUMN_3, 150));
 		fMemento.putBoolean(P_ACTIVATE, p.getBoolean(P_ACTIVATE, true));
 		fMemento.putInteger(P_ORDER_VALUE, p.getInt(P_ORDER_VALUE, DESCENDING));
 		fMemento.putInteger(P_ORDER_TYPE, p.getInt(P_ORDER_TYPE, LogView.DATE));
@@ -1559,6 +1583,25 @@ public class LogView extends ViewPart implements ILogListener {
 		fMemento.putInteger(P_GROUP_BY, p.getInt(P_GROUP_BY, LogView.GROUP_BY_NONE));
 	}
 
+	/**
+	 * Returns the width to use for the column represented by the given key. The default width
+	 * is returned iff:
+	 * <ul>
+	 * <li>There is no preference for the given key</li>
+	 * <li>The returned preference value is too small, making the columns invisible by width.</li>
+	 * </ul>
+	 * @param preferences
+	 * @param key
+	 * @param defaultwidth
+	 * @return the stored width for the a column described by the given key or the default width
+	 * 
+	 * @since 3.6
+	 */
+	int getColumnWidthPreference(Preferences preferences, String key, int defaultwidth) {
+		int width = preferences.getInt(key, defaultwidth);
+		return width < 1 ? defaultwidth : width;
+	}
+
 	private void writeSettings() {
 		writeViewSettings();
 		writeFilterSettings();
diff --git a/eclipse/plugins/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
index d6657a7..9c74b53 100644
--- a/eclipse/plugins/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.views.properties.tabbed/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui.views.properties.tabbed;singleton:=true
-Bundle-Version: 3.5.0.qualifier
+Bundle-Version: 3.5.100.qualifier
 Bundle-Activator: org.eclipse.ui.internal.views.properties.tabbed.TabbedPropertyViewPlugin
 Bundle-Vendor: %Plugin.providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.ui.views/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.views/META-INF/MANIFEST.MF
index e8451bf..00ebf9c 100644
--- a/eclipse/plugins/org.eclipse.ui.views/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.views/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.views; singleton:=true
-Bundle-Version: 3.4.1.qualifier
+Bundle-Version: 3.5.1.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.ui.internal.views.ViewsPlugin
 Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PinPropertySheetAction.java b/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PinPropertySheetAction.java
index 4d2d8df..9ad53d0 100644
--- a/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PinPropertySheetAction.java
+++ b/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PinPropertySheetAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 Versant Corp. and others.
+ * Copyright (c) 2008, 2010 Versant Corp. and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.ui.views.properties;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
+
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
@@ -25,6 +26,9 @@ import org.eclipse.ui.internal.views.properties.PropertiesMessages;
  */
 public class PinPropertySheetAction extends Action {
 
+	/**
+	 * Creates a new <code>PinPropertySheetAction</code>.
+	 */
 	public PinPropertySheetAction() {
 		super(PropertiesMessages.Pin_text, IAction.AS_CHECK_BOX);
 
diff --git a/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java b/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
index d35ef3b..bf5a83b 100644
--- a/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
+++ b/eclipse/plugins/org.eclipse.ui.views/src/org/eclipse/ui/views/properties/PropertySheet.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,9 +8,23 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Markus Alexander Kuppe (Versant Corp.) - https://bugs.eclipse.org/248103
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 272564
  *******************************************************************************/
 package org.eclipse.ui.views.properties;
 
+import java.util.HashSet;
+
+import org.eclipse.osgi.util.NLS;
+
+import org.eclipse.swt.widgets.Composite;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IRegistryEventListener;
+import org.eclipse.core.runtime.RegistryFactory;
+
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
@@ -18,8 +32,7 @@ import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
+
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.ISaveablePart;
 import org.eclipse.ui.ISelectionListener;
@@ -53,14 +66,14 @@ import org.eclipse.ui.part.ShowInContext;
  * <p>
  * Property sheet pages are discovered by the property sheet view automatically
  * when a part is first activated. The property sheet view asks the active part
- * for its property sheet page; this is done by invoking 
- * <code>getAdapter(IPropertySheetPage.class)</code> on the part. If the part 
+ * for its property sheet page; this is done by invoking
+ * <code>getAdapter(IPropertySheetPage.class)</code> on the part. If the part
  * returns a page, the property sheet view then creates the controls for that
- * property sheet page (using <code>createControl</code>), and adds the page to 
+ * property sheet page (using <code>createControl</code>), and adds the page to
  * the property sheet view. Whenever this part becomes active, its corresponding
  * property sheet page is shown in the property sheet view (which may or may not
  * be visible at the time). A part's property sheet page is discarded when the
- * part closes. The property sheet view has a default page (an instance of 
+ * part closes. The property sheet view has a default page (an instance of
  * <code>PropertySheetPage</code>) which services all parts without a property
  * sheet page of their own.
  * </p>
@@ -75,13 +88,18 @@ import org.eclipse.ui.part.ShowInContext;
  * @noinstantiate This class is not intended to be instantiated by clients.
  * @noextend This class is not intended to be subclassed by clients.
  */
-public class PropertySheet extends PageBookView implements ISelectionListener, IShowInTarget, IShowInSource {
+public class PropertySheet extends PageBookView implements ISelectionListener, IShowInTarget, IShowInSource, IRegistryEventListener {
     /**
      * No longer used but preserved to avoid api change
      */
     public static final String HELP_CONTEXT_PROPERTY_SHEET_VIEW = IPropertiesHelpContextIds.PROPERTY_SHEET_VIEW;
 
     /**
+     * Extension point used to modify behavior of the view
+     */
+    private static final String EXT_POINT = "org.eclipse.ui.propertiesView"; //$NON-NLS-1$
+    
+    /**
      * The initial selection when the property sheet opens
      */
     private ISelection bootstrapSelection;
@@ -97,9 +115,14 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
 	private IWorkbenchPart currentPart;
 
 	/**
-	 * Whether this property sheet instance is pinned or not 
+	 * Whether this property sheet instance is pinned or not
 	 */
 	private IAction pinPropertySheetAction;
+
+	/**
+	 * Set of workbench parts, which should not be used as a source for PropertySheet
+	 */
+	private HashSet ignoredViews;
 	
     /**
      * Creates a property sheet view.
@@ -107,6 +130,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
     public PropertySheet() {
         super();
         pinPropertySheetAction = new PinPropertySheetAction();
+        RegistryFactory.getRegistry().addListener(this, EXT_POINT);
     }
 
     /* (non-Javadoc)
@@ -160,8 +184,9 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
         // run super.
         super.dispose();
 
-        // remove ourselves as a selection listener
-        getSite().getPage().removeSelectionListener(this);
+        // remove ourselves as a selection and registry listener
+        getSite().getPage().removePostSelectionListener(this);
+        RegistryFactory.getRegistry().removeListener(this);
         
         currentPart = null;
         currentSelection = null;
@@ -188,7 +213,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
             return new PageRec(part, page);
         }
 
-        // Use the default page		
+        // Use the default page
         return null;
     }
 
@@ -203,7 +228,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
 
     /* (non-Javadoc)
      * Method declared on PageBookView.
-     * Returns the active part on the same workbench page as this property 
+     * Returns the active part on the same workbench page as this property
      * sheet view.
      */
     protected IWorkbenchPart getBootstrapPart() {
@@ -211,7 +236,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
         if (page != null) {
             bootstrapSelection = page.getSelection();
             return page.getActivePart();
-        } 
+        }
         return null;
     }
 
@@ -219,7 +244,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
      * Method declared on IViewPart.
      */
     public void init(IViewSite site) throws PartInitException {
-   		site.getPage().addSelectionListener(this);
+   		site.getPage().addPostSelectionListener(this);
    		super.init(site);
     }
 
@@ -242,14 +267,10 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
      * The property sheet may show properties for any view other than this view.
      */
     protected boolean isImportant(IWorkbenchPart part) {
-		// See Bug 252887...explicitly exclude the Help view as a
-		// participant
-		boolean isHelpView = "org.eclipse.help.ui.HelpView".equals(part.getSite().getId()); //$NON-NLS-1$
-		
 		// Don't interfere with other property views
-		boolean isPropertyView = getSite().getId().equals(part.getSite().getId());
-		
-		return !isPinned() && !isPropertyView && !isHelpView;
+    	String partID = part.getSite().getId();
+		boolean isPropertyView = getSite().getId().equals(partID);
+		return !isPinned() && !isPropertyView && !isViewIgnored(partID);
     }
 
     /* (non-Javadoc)
@@ -280,9 +301,9 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
         // our target part is hidden, we should still show whatever content we
         // have been pinned on
         if (!isPinned()) {
-            super.partHidden(part);     
+            super.partHidden(part);
         }
-    }	
+    }
     
 	/**
      * The <code>PropertySheet</code> implementation of this <code>IPartListener</code>
@@ -310,7 +331,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
         	currentSelection = null;
         }
         
-        // When the view is first opened, pass the selection to the page		
+        // When the view is first opened, pass the selection to the page
         if (bootstrapSelection != null) {
             IPropertySheetPage page = (IPropertySheetPage) getCurrentPage();
             if (page != null) {
@@ -338,7 +359,7 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
         currentPart = part;
         currentSelection = sel;
         
-        // pass the selection to the page		
+        // pass the selection to the page
         IPropertySheetPage page = (IPropertySheetPage) getCurrentPage();
         if (page != null) {
 			page.selectionChanged(currentPart, currentSelection);
@@ -426,4 +447,63 @@ public class PropertySheet extends PageBookView implements ISelectionListener, I
 		pinPropertySheetAction.setChecked(pinned);
 		updateContentDescription();
 	}
+	
+	private HashSet getIgnoredViews() {
+		if (ignoredViews == null) {
+			ignoredViews = new HashSet();
+	        IExtensionRegistry registry = RegistryFactory.getRegistry();
+	        IExtensionPoint ep = registry.getExtensionPoint(EXT_POINT);
+			if (ep != null) {
+				IExtension[] extensions = ep.getExtensions();
+				for (int i = 0; i < extensions.length; i++) {
+					IConfigurationElement[] elements = extensions[i].getConfigurationElements();
+					for (int j = 0; j < elements.length; j++) {
+						if ("excludeSources".equalsIgnoreCase(elements[j].getName())) { //$NON-NLS-1$
+							String id = elements[j].getAttribute("id"); //$NON-NLS-1$
+							if (id != null)
+								ignoredViews.add(id);
+						}
+					}
+				}
+			}
+		}
+		return ignoredViews;
+	}
+
+	private boolean isViewIgnored(String partID) {
+		return getIgnoredViews().contains(partID);
+	}
+	
+	/**
+	 * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtension[])
+	 * @since 3.5
+	 */
+	public void added(IExtension[] extensions) {
+		ignoredViews = null;
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IRegistryEventListener#added(org.eclipse.core.runtime.IExtensionPoint[])
+	 * @since 3.5
+	 */
+	public void added(IExtensionPoint[] extensionPoints) {
+		ignoredViews = null;
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtension[])
+	 * @since 3.5
+	 */
+	public void removed(IExtension[] extensions) {
+		ignoredViews = null;
+	}
+
+	/**
+	 * @see org.eclipse.core.runtime.IRegistryEventListener#removed(org.eclipse.core.runtime.IExtensionPoint[])
+	 * @since 3.5
+	 */
+	public void removed(IExtensionPoint[] extensionPoints) {
+		ignoredViews = null;
+	}
+	
 }
diff --git a/eclipse/plugins/org.eclipse.ui.win32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.win32/META-INF/MANIFEST.MF
index fc72144..5466bee 100644
--- a/eclipse/plugins/org.eclipse.ui.win32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.ui.win32
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-ClassPath: .
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)"
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.compatibility/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.workbench.compatibility/META-INF/MANIFEST.MF
index 539ec02..ee254d5 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.compatibility/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.workbench.compatibility/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.ui.workbench.compatibility
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.ui.workbench;bundle-version="[3.0.0,4.0.0)"
 Bundle-Localization: fragment-compatibility
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
index 2152805..031b16b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/META-INF/MANIFEST.MF
@@ -2,14 +2,14 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.workbench.texteditor; singleton:=true
-Bundle-Version: 3.5.1.qualifier
+Bundle-Version: 3.6.1.qualifier
 Bundle-Activator: org.eclipse.ui.internal.texteditor.TextEditorPlugin
 Bundle-ActivationPolicy: lazy
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
 Export-Package: 
  org.eclipse.ui.contentassist,
- org.eclipse.ui.internal.texteditor;x-internal:=true; texteditor="split"; mandatory:="texteditor",
+ org.eclipse.ui.internal.texteditor; texteditor="split"; mandatory:="texteditor"; x-friends:="org.eclipse.ui.editors",
  org.eclipse.ui.internal.texteditor.quickdiff;x-internal:=true,
  org.eclipse.ui.internal.texteditor.quickdiff.compare.equivalence;x-internal:=true,
  org.eclipse.ui.internal.texteditor.rulers;x-internal:=true,
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/FocusedInformationPresenter.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/FocusedInformationPresenter.java
new file mode 100644
index 0000000..83e49b7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/FocusedInformationPresenter.java
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.texteditor;
+
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.jface.text.AbstractInformationControlManager;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DefaultInformationControl;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IInformationControl;
+import org.eclipse.jface.text.IInformationControlCreator;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.information.IInformationProvider;
+import org.eclipse.jface.text.information.IInformationProviderExtension;
+import org.eclipse.jface.text.information.IInformationProviderExtension2;
+import org.eclipse.jface.text.information.InformationPresenter;
+import org.eclipse.jface.text.source.IAnnotationHover;
+import org.eclipse.jface.text.source.IAnnotationHoverExtension;
+import org.eclipse.jface.text.source.ILineRange;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+
+/**
+ * Information presenter used to present focused ("sticky") information shells.
+ * 
+ * @since 3.5
+ */
+public class FocusedInformationPresenter extends InformationPresenter {
+
+	/**
+	 * Information provider used to present focused information shells.
+	 */
+	public final static class InformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
+
+		private IRegion fHoverRegion;
+		private Object fHoverInfo;
+		private IInformationControlCreator fControlCreator;
+
+		public InformationProvider(IRegion hoverRegion, Object hoverInfo, IInformationControlCreator controlCreator) {
+			fHoverRegion= hoverRegion;
+			fHoverInfo= hoverInfo;
+			fControlCreator= controlCreator;
+		}
+		/*
+		 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
+		 */
+		public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
+			return fHoverRegion;
+		}
+		/**
+		 * {@inheritDoc}
+		 *
+		 * @deprecated As of 2.1, replaced by {@link IInformationProviderExtension#getInformation2(ITextViewer, IRegion)}
+		 */
+		public String getInformation(ITextViewer textViewer, IRegion subject) {
+			return fHoverInfo == null ? null : fHoverInfo.toString();
+		}
+		/*
+		 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
+		 * @since 3.2
+		 */
+		public Object getInformation2(ITextViewer textViewer, IRegion subject) {
+			return fHoverInfo;
+		}
+		/*
+		 * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
+		 */
+		public IInformationControlCreator getInformationPresenterControlCreator() {
+			return fControlCreator;
+		}
+	}
+	
+	/**
+	 * The default information control creator.
+	 */
+	private static class DefaultInformationControlCreator implements IInformationControlCreator {
+		public IInformationControl createInformationControl(Shell shell) {
+			return new DefaultInformationControl(shell, true);
+		}
+	}
+	
+	
+	private final ISourceViewer fSourceViewer;
+	private final SourceViewerConfiguration fSourceViewerConfiguration;
+
+	/**
+	 * Creates a focused information presenter and installs it on the source viewer.
+	 * 
+	 * @param sourceViewer the source viewer
+	 * @param sourceViewerConfiguration the configuration
+	 */
+	public FocusedInformationPresenter(ISourceViewer sourceViewer, SourceViewerConfiguration sourceViewerConfiguration) {
+		super(new DefaultInformationControlCreator());
+		fSourceViewer= sourceViewer;
+		fSourceViewerConfiguration= sourceViewerConfiguration;
+		
+		// sizes: see org.eclipse.jface.text.TextViewer.TEXT_HOVER_*_CHARS
+		setSizeConstraints(100, 12, true, true);
+		install(sourceViewer);
+		setDocumentPartitioning(sourceViewerConfiguration.getConfiguredDocumentPartitioning(sourceViewer));
+	}
+
+	/**
+	 * Tries show a focused ("sticky") annotation hover.
+	 *
+	 * @param annotationHover the annotation hover to show
+	 * @param line the line for which to show the hover
+	 * @return <code>true</code> if successful, <code>false</code> otherwise
+	 */
+	public boolean openFocusedAnnotationHover(IAnnotationHover annotationHover, int line) {
+		
+		try {
+			// compute the hover information
+			Object hoverInfo;
+			if (annotationHover instanceof IAnnotationHoverExtension) {
+				IAnnotationHoverExtension extension= (IAnnotationHoverExtension) annotationHover;
+				ILineRange hoverLineRange= extension.getHoverLineRange(fSourceViewer, line);
+				if (hoverLineRange == null)
+					return false;
+				final int maxVisibleLines= Integer.MAX_VALUE; // allow any number of lines being displayed, as we support scrolling
+				hoverInfo= extension.getHoverInfo(fSourceViewer, hoverLineRange, maxVisibleLines);
+			} else {
+				hoverInfo= annotationHover.getHoverInfo(fSourceViewer, line);
+			}
+
+			// hover region: the beginning of the concerned line to place the control right over the line
+			IDocument document= fSourceViewer.getDocument();
+			int offset= document.getLineOffset(line);
+			String contentType= TextUtilities.getContentType(document, fSourceViewerConfiguration.getConfiguredDocumentPartitioning(fSourceViewer), offset, true);
+
+			IInformationControlCreator controlCreator= null;
+			if (annotationHover instanceof IInformationProviderExtension2) // this is undocumented, but left here for backwards compatibility
+				controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
+			else if (annotationHover instanceof IAnnotationHoverExtension)
+				controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();
+
+			IInformationProvider informationProvider= new InformationProvider(new Region(offset, 0), hoverInfo, controlCreator);
+
+			setOffset(offset);
+			setAnchor(AbstractInformationControlManager.ANCHOR_RIGHT);
+			setMargins(4, 0); // AnnotationBarHoverManager sets (5,0), minus SourceViewer.GAP_SIZE_1
+			setInformationProvider(informationProvider, contentType);
+			showInformation();
+
+			return true;
+
+		} catch (BadLocationException e) {
+			return false;
+		}
+	}
+}
+
+
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
index fd9c00c..fee2bbb 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,22 +7,35 @@
  *
  * Contributors:
  *     Genady Beryozkin, me at genady.org - initial API and implementation
+ *     Fabio Zadrozny <fabiofz at gmail dot com> - [typing] HippieCompleteAction is slow  ( Alt+/ ) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=270385
  *******************************************************************************/
 package org.eclipse.ui.internal.texteditor;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.FindReplaceDocumentAdapter;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IRegion;
 
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IWorkbenchWindow;
+
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+
 /**
  * This class contains the hippie completion engine methods that actually
  * compute the possible completions.
@@ -138,56 +151,9 @@ public final class HippieCompletionEngine {
 	public List getCompletionsForward(IDocument document, CharSequence prefix,
 			int firstPosition, boolean currentWordLast) throws BadLocationException {
 		ArrayList res= new ArrayList();
-		String currentWordCompletion= null; // fix bug 132533
-
-        if (firstPosition == document.getLength()) {
-            return res;
-        }
-
-		FindReplaceDocumentAdapter searcher= new FindReplaceDocumentAdapter(document);
-
-		// search only at word boundaries
-		String searchPattern;
-
-		// unless we are at the beginning of the document, the completion boundary
-		// matches one character. It is enough to move just one character backwards
-		// because the boundary pattern has the (....)+ form.
-		// see HippieCompletionTest#testForwardSearch().
-		if (firstPosition > 0) {
-			firstPosition--;
-			// empty spacing is not permitted now.
-			searchPattern= NON_EMPTY_COMPLETION_BOUNDARY + asRegPattern(prefix);
-		} else {
-			searchPattern= COMPLETION_BOUNDARY + asRegPattern(prefix);
-		}
-
-		IRegion reg= searcher.find(firstPosition, searchPattern, true, CASE_SENSITIVE, false, true);
-		while (reg != null) {
-			// since the boundary may be of nonzero length
-			int wordSearchPos= reg.getOffset() + reg.getLength() - prefix.length();
-			// try to complete to a word. case is irrelevant here.
-			IRegion word= searcher.find(wordSearchPos, COMPLETION_WORD_REGEX, true, true, false, true);
-			if (word.getLength() > prefix.length() ) { // empty suggestion will be added later
-				String wholeWord= document.get(word.getOffset(), word.getLength());
-				String completion= wholeWord.substring(prefix.length());
-				if (currentWordLast && reg.getOffset() == firstPosition) { // we got the word at caret as completion
-					currentWordCompletion= completion; // add it as the last word.
-				} else {
-					res.add(completion);
-				}
-			}
-			int nextPos= word.getOffset() + word.getLength();
-			if (nextPos >= document.getLength() ) {
-				break;
-			}
-			reg= searcher.find(nextPos, searchPattern, true, CASE_SENSITIVE, false, true);
+		for (Iterator it= getForwardIterator(document, prefix, firstPosition, currentWordLast); it.hasNext();) {
+			res.add(it.next());
 		}
-
-		// the word at caret position goes last (bug 132533).
-		if (currentWordCompletion != null) {
-			res.add(currentWordCompletion);
-		}
-
 		return res;
 	}
 
@@ -206,39 +172,9 @@ public final class HippieCompletionEngine {
 	 */
 	public List getCompletionsBackwards(IDocument document, CharSequence prefix, int firstPosition) throws BadLocationException {
 		ArrayList res= new ArrayList();
-
-        // FindReplaceDocumentAdapter expects the start offset to be before the
-        // actual caret position, probably for compatibility with forward search.
-        if (firstPosition == 0) {
-            return res;
-        }
-
-		FindReplaceDocumentAdapter searcher= new FindReplaceDocumentAdapter(document);
-
-		// search only at word boundaries
-		String searchPattern= COMPLETION_BOUNDARY + asRegPattern(prefix);
-
-		IRegion reg= searcher.find(0, searchPattern, true, CASE_SENSITIVE, false, true);
-		while (reg != null) {
-			// since the boundary may be of nonzero length
-			int wordSearchPos= reg.getOffset() + reg.getLength() - prefix.length();
-			// try to complete to a word. case is of no matter here
-			IRegion word= searcher.find(wordSearchPos, COMPLETION_WORD_REGEX, true, true, false, true);
-            if (word.getOffset() + word.getLength() > firstPosition) {
-                break;
-            }
-			if (word.getLength() > prefix.length() ) { // empty suggestion will be added later
-				String found= document.get(word.getOffset(), word.getLength());
-				res.add(found.substring(prefix.length()));
-			}
-            int nextPos= word.getOffset() + word.getLength();
-            if (nextPos >= firstPosition ) { // for efficiency only
-                break;
-            }
-			reg= searcher.find(nextPos, searchPattern, true, CASE_SENSITIVE, false, true);
+		for (Iterator it= getBackwardIterator(document, prefix, firstPosition); it.hasNext();) {
+			res.add(it.next());
 		}
-        Collections.reverse(res);
-
 		return res;
 	}
 
@@ -287,4 +223,622 @@ public final class HippieCompletionEngine {
 		}
 		return uniqueSuggestions;
 	}
+	
+	
+
+	/**
+	 * Calculates the documents to be searched. Note that the first returned document is always from
+	 * the current editor and if we have no current editor, an empty list is returned even if there
+	 * are other documents available.
+	 * 
+	 * @param currentTextEditor this is the currently opened text editor.
+	 * @return A List of IDocument with the opened documents so that the first document in that list
+	 *         is always the current document.
+	 * @since 3.6
+	 */
+	public static List computeDocuments(ITextEditor currentTextEditor) {
+		ArrayList documentsForSearch= new ArrayList();
+		if (currentTextEditor == null) {
+			return documentsForSearch;
+		}
+
+		IDocumentProvider provider= currentTextEditor.getDocumentProvider();
+		if (provider == null) {
+			return documentsForSearch;
+		}
+
+		IDocument currentDocument= provider.getDocument(currentTextEditor.getEditorInput());
+		if(currentDocument == null){
+			return documentsForSearch;
+		}
+
+		List computedDocuments= new ArrayList();
+		IWorkbenchWindow window= currentTextEditor.getSite().getWorkbenchWindow();
+		IEditorReference editorsArray[]= window.getActivePage().getEditorReferences();
+
+		for (int i= 0; i < editorsArray.length; i++) {
+			IEditorPart realEditor= editorsArray[i].getEditor(false);
+			if (realEditor instanceof ITextEditor && !realEditor.equals(currentTextEditor)) {
+				ITextEditor textEditor= (ITextEditor)realEditor;
+				provider= textEditor.getDocumentProvider();
+				if (provider == null) {
+					continue;
+				}
+				IDocument doc= provider.getDocument(textEditor.getEditorInput());
+				if (doc == null) {
+					continue;
+				}
+				computedDocuments.add(doc);
+			}
+		}
+		
+		//The first is always the one related to the passed currentTextEditor.
+		computedDocuments.add(0, currentDocument);
+		return computedDocuments;
+	}
+
+
+	/**
+	 * Provides an iterator that will get the completions that start with the passed prefix after
+	 * the passed position (forward until the end of the document).
+	 * 
+	 * @param document the document to be scanned
+	 * @param prefix the prefix to search for
+	 * @param firstPosition the initial position in the document that the search will start from. In
+	 *            order to search from the beginning of the document use
+	 *            <code>firstPosition=0</code>.
+	 * @param currentWordLast if <code>true</code> the word at caret position should be that last
+	 *            completion. <code>true</code> is good for searching in the currently open document
+	 *            and <code>false</code> is good for searching in other documents.
+	 * @return Iterator (for Strings) that will get the completions forward from the passed
+	 *         position.
+	 * 
+	 * @since 3.6
+	 */
+	public Iterator getForwardIterator(IDocument document, CharSequence prefix, int firstPosition, boolean currentWordLast) {
+		return new HippieCompletionForwardIterator(document, prefix, firstPosition, currentWordLast);
+	}
+
+	/**
+	 * Provides an iterator that will get the completions that start with the passed prefix before
+	 * the passed position (backwards until the start of the document).
+	 * 
+	 * @param document the document to be scanned
+	 * @param prefix the prefix to search for
+	 * @param firstPosition the initial position in the document that the search will start from. In
+	 *            order to search from the end of the document use
+	 *            <code>firstPosition=document.getLength()</code>.
+	 * @return Iterator that will get the completions backward from the passed position.
+	 * 
+	 * @since 3.6
+	 */
+	public Iterator getBackwardIterator(IDocument document, CharSequence prefix, int firstPosition) {
+		return new HippieCompletionBackwardIterator(document, prefix, firstPosition);
+	}
+
+	/**
+	 * Provides an iterator that will get the completions for all the documents received, starting
+	 * at the "document" passed (first going backward and then forward from the position passed) and
+	 * later going forward through each of the "otherDocuments".
+	 * 
+	 * @param document the document to be scanned
+	 * @param otherDocuments the additional documents to be scanned
+	 * @param prefix the prefix to search for
+	 * @param firstPosition the initial position in the document that the search will start from.
+	 * @return Iterator that will first get the completions backward from the document passed, then
+	 *         forward in that same document and when that is finished it will get it forward for
+	 *         the other documents (in the same sequence the documents are available).
+	 * 
+	 * @since 3.6
+	 */
+	public Iterator getMultipleDocumentsIterator(IDocument document, List otherDocuments, CharSequence prefix, int firstPosition) {
+		return new MultipleDocumentsIterator(document, otherDocuments, prefix, firstPosition);
+	}
+
+
+
+	/**
+	 * Class that keeps the state while iterating the suggestions
+	 * 
+	 * @since 3.6
+	 */
+	private final class MultipleDocumentsIterator implements Iterator {
+
+		/**
+		 * This is the next token to be returned (when null, no more tokens should be returned)
+		 */
+		private String fNext;
+
+		/**
+		 * -1 means that we still haven't checked the current do completions Any other number means
+		 * that we'll get the completions for some other editor.
+		 */
+		private int fCurrLocation= -1;
+
+		/** These are the suggestions which we already loaded. */
+		private final List fSuggestions;
+
+		/** This marks the current suggestion to be returned */
+		private int fCurrSuggestion= 0;
+
+		/** This is the prefix that should be searched */
+		private final CharSequence fPrefix;
+
+		/** The list of IDocuments that we should search */
+		private final List fOtherDocuments;
+
+		/**
+		 * The document that's currently opened (that's the 1st we should look and we should 1st
+		 * search backwards from the current offset and later forwards)
+		 */
+		private final IDocument fOpenDocument;
+
+		/** The current offset in the opened document */
+		private final int fSelectionOffset;
+
+		/** Indicates whether we already added the empty completion. */
+		private boolean fAddedEmpty= false;
+
+		/** The 'current' forward iterator. */
+		private Iterator fCompletionsForwardIterator;
+
+		/** The 'current' backward iterator. */
+		private Iterator fCompletionsBackwardIterator;
+
+		/*
+		 * (non-Javadoc)
+		 * @see HippieCompletionEngine#getMultipleDocumentsIterator(IDocument, List, CharSequence, int)
+		 */
+		private MultipleDocumentsIterator(IDocument openDocument, List otherDocuments,
+				CharSequence prefix, int selectionOffset) {
+			this.fPrefix= prefix;
+			this.fSuggestions= new ArrayList();
+			this.fOtherDocuments= otherDocuments;
+			this.fSelectionOffset= selectionOffset;
+			this.fOpenDocument= openDocument;
+			calculateNext();
+		}
+
+
+		/**
+		 * This method calculates the next token to be returned (so, after creating the class or
+		 * after calling next(), this function must be called).
+		 * 
+		 * It'll check which document should be used and will get the completions on that document
+		 * until some completion is found.
+		 * 
+		 * An empty completion is always added at the end.
+		 * 
+		 * After the empty completion, the next is set to null.
+		 */
+		private void calculateNext() {
+			if (fCurrLocation == -1) {
+				fCompletionsBackwardIterator= getBackwardIterator(
+						fOpenDocument, fPrefix, fSelectionOffset);
+
+				fCompletionsForwardIterator= getForwardIterator(
+						fOpenDocument, fPrefix, (fSelectionOffset - fPrefix.length()), true);
+				fCurrLocation++;
+			}
+			if (checkNext()) {
+				return;
+			}
+
+
+			while (fCurrLocation < this.fOtherDocuments.size()) {
+				fCompletionsForwardIterator= getForwardIterator(
+						((IDocument)this.fOtherDocuments.get(fCurrLocation)), fPrefix, 0, false);
+				fCurrLocation++;
+				if (checkNext()) {
+					return;
+				}
+			}
+
+			// add the empty suggestion (last one)
+			if (!fAddedEmpty) {
+				fSuggestions.add(""); //$NON-NLS-1$
+				fAddedEmpty= true;
+			}
+			checkNext();
+		}
+
+		/**
+		 * @return true if a completion was found and false if it couldn't be found -- in which case
+		 *         the next is set to null.
+		 */
+		private boolean checkNext() {
+			if (fCompletionsBackwardIterator != null) {
+				if (fCompletionsBackwardIterator.hasNext()) {
+					fSuggestions.add(fCompletionsBackwardIterator.next());
+				} else {
+					fCompletionsBackwardIterator= null;
+				}
+			}
+			if (fCompletionsBackwardIterator == null) {
+				//only get if backward completions are consumed
+				if (fCompletionsForwardIterator != null && fCompletionsForwardIterator.hasNext()) {
+					fSuggestions.add(fCompletionsForwardIterator.next());
+				}
+			}
+
+			if (fSuggestions.size() > fCurrSuggestion) {
+				fNext= (String)fSuggestions.get(fCurrSuggestion);
+				fCurrSuggestion++;
+				return true;
+			}
+			fNext= null;
+			return false;
+		}
+
+		/**
+		 * We always calculate the next to see if it's available...
+		 * 
+		 * @return true if the next token to be returned is not null (we always pre-calculate
+		 *         things)
+		 */
+		public boolean hasNext() {
+			return fNext != null;
+		}
+
+
+		/**
+		 * @return the next suggestion
+		 */
+		public Object next() {
+			if (fNext == null) {
+				throw new NoSuchElementException("No more elements to iterate"); //$NON-NLS-1$
+			}
+			Object ret= fNext;
+			calculateNext();
+			return ret;
+		}
+
+		/**
+		 * Not supported!
+		 * 
+		 * @throws UnsupportedOperationException always.
+		 */
+		public void remove() {
+			throw new UnsupportedOperationException("Not supported"); //$NON-NLS-1$
+
+		}
+
+	}
+
+	/**
+	 * Base class for Iterator that gets the word completions in a document, and returns them one by
+	 * one (lazily gotten).
+	 * 
+	 * @since 3.6
+	 */
+	private abstract class HippieCompletionIterator implements Iterator {
+
+		/** The document to be scanned */
+		protected IDocument fDocument;
+
+		/** The prefix to search for */
+		protected CharSequence fPrefix;
+
+		/**
+		 * The initial position in the document that the search will start from. In order to search
+		 * from the beginning of the document use <code>firstPosition=0</code>.
+		 */
+		protected int fFirstPosition;
+
+		/** Determines if we have a next element to be returned. */
+		protected boolean fHasNext;
+
+		/** The next element to be returned */
+		protected String fNext;
+
+		/** The current state for the iterator */
+		protected int fCurrentState= 0;
+
+		/** The class that'll do the search */
+		protected FindReplaceDocumentAdapter fSearcher;
+
+		/** Pattern to be used -- search only at word boundaries */
+		protected String fSearchPattern;
+
+		/** The next place to search for */
+		protected int fNextPos;
+
+
+		/**
+		 * Constructor
+		 * 
+		 * @param document the document to be scanned
+		 * @param prefix the prefix to search for
+		 * @param firstPosition the initial position in the document that the search will start
+		 *            from. In order to search from the beginning of the document use
+		 *            <code>firstPosition=0</code>.
+		 */
+		public HippieCompletionIterator(IDocument document, CharSequence prefix, int firstPosition) {
+			this.fDocument= document;
+			this.fPrefix= prefix;
+			this.fFirstPosition= firstPosition;
+		}
+
+		/**
+		 * Must be called to calculate the first completion (subclasses must explicitly call it when
+		 * properly initialized).
+		 */
+		protected void calculateFirst() {
+			try {
+				calculateNext();
+			} catch (BadLocationException e) {
+				log(e);
+				fHasNext= false;
+				fNext= null;
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see java.util.Iterator#hasNext()
+		 */
+		public boolean hasNext() {
+			return fHasNext;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see java.util.Iterator#next()
+		 */
+		public Object next() {
+			if (!fHasNext) {
+				throw new NoSuchElementException();
+			}
+			String ret= fNext;
+			try {
+				calculateNext();
+			} catch (BadLocationException e) {
+				log(e);
+				fHasNext= false;
+				fNext= null;
+			}
+			return ret;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see java.util.Iterator#remove()
+		 */
+		public void remove() {
+			throw new UnsupportedOperationException();
+		}
+
+		/**
+		 * Subclasses must override to calculates whether we have a next element to be returned and
+		 * which element it is (set fHasNext and fNext).
+		 * 
+		 * @throws BadLocationException if we're at an invalid position in the document.
+		 */
+		protected abstract void calculateNext() throws BadLocationException;
+	}
+
+
+
+	/**
+	 * Iterator that gets the word completions in a document, and returns them one by one (lazily
+	 * gotten) from the current position.
+	 * 
+	 * @since 3.6
+	 */
+	private class HippieCompletionForwardIterator extends HippieCompletionIterator {
+
+		/**
+		 * If <code>true</code> the word at caret position should be that last completion.
+		 * <code>true</code> is good for searching in the currently open document and
+		 * <code>false</code> is good for searching in other documents.
+		 */
+		private boolean fCurrentWordLast;
+
+
+		/** The completion for the current word -- fix bug 132533 */
+		private String fCurrentWordCompletion= null;
+
+
+		/*
+		 * (non-Javadoc)
+		 * @see HippieCompletionEngine#getForwardIterator(IDocument, CharSequence, int, boolean)
+		 */
+		private HippieCompletionForwardIterator(IDocument document, CharSequence prefix, int firstPosition, boolean currentWordLast) {
+			super(document, prefix, firstPosition);
+			this.fCurrentWordLast= currentWordLast;
+			calculateFirst();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see HippieCompletionIterator#calculateNext()
+		 */
+		protected void calculateNext() throws BadLocationException {
+			if (fCurrentState == 0) {
+				if (fFirstPosition == fDocument.getLength()) {
+					this.fHasNext= false;
+					return;
+				}
+				fSearcher= new FindReplaceDocumentAdapter(fDocument);
+
+				// unless we are at the beginning of the document, the completion boundary
+				// matches one character. It is enough to move just one character backwards
+				// because the boundary pattern has the (....)+ form.
+				// see HippieCompletionTest#testForwardSearch().
+				if (fFirstPosition > 0) {
+					fFirstPosition--;
+					// empty spacing is not permitted now.
+					fSearchPattern= NON_EMPTY_COMPLETION_BOUNDARY + asRegPattern(fPrefix);
+				} else {
+					fSearchPattern= COMPLETION_BOUNDARY + asRegPattern(fPrefix);
+				}
+
+				fNextPos= fFirstPosition;
+				fCurrentState= 1;
+			}
+
+			if (fCurrentState == 1) {
+				fHasNext= false;
+				IRegion reg= fSearcher.find(fNextPos, fSearchPattern, true, CASE_SENSITIVE, false, true);
+				while (reg != null) {
+					IRegion word= checkRegion(reg);
+					fNextPos= word.getOffset() + word.getLength();
+					if (fNextPos >= fDocument.getLength()) {
+						fCurrentState= 2;
+						if (fHasNext) {
+							return;
+						}
+						break;
+					} else {
+						if (fHasNext) {
+							return;
+						}
+						reg= fSearcher.find(fNextPos, fSearchPattern, true, CASE_SENSITIVE, false, true);
+					}
+				}
+				fCurrentState= 2;
+			}
+
+			if (fCurrentState == 2) {
+				fCurrentState= 3;
+				// the word at caret position goes last (bug 132533).
+				if (fCurrentWordCompletion != null) {
+					fNext= fCurrentWordCompletion;
+					fHasNext= true;
+					return;
+				}
+			}
+
+			fNext= null;
+			fHasNext= false;
+			return;
+		}
+
+		/**
+		 * Checks the given region for a word to be returned in this iterator.
+		 * 
+		 * @param reg the region to check
+		 * @return the word region.
+		 * @throws BadLocationException if we're at an invalid position in the document.
+		 */
+		private IRegion checkRegion(IRegion reg) throws BadLocationException {
+			// since the boundary may be of nonzero length
+			int wordSearchPos= reg.getOffset() + reg.getLength() - fPrefix.length();
+			// try to complete to a word. case is irrelevant here.
+			IRegion word= fSearcher.find(wordSearchPos, COMPLETION_WORD_REGEX, true, true, false, true);
+			if (word.getLength() > fPrefix.length()) { // empty suggestion will be added later
+				String wholeWord= fDocument.get(word.getOffset(), word.getLength());
+				String completion= wholeWord.substring(fPrefix.length());
+				if (fCurrentWordLast && reg.getOffset() == fFirstPosition) { // we got the word at caret as completion
+					if (fCurrentWordCompletion == null) {
+						fCurrentWordCompletion= completion; // add it as the last word.
+					}
+				} else {
+					fNext= completion;
+					fHasNext= true;
+				}
+			}
+			return word;
+		}
+	}
+
+
+
+	/**
+	 * Iterator that gets the word completions in a document, and returns them one by one (lazily
+	 * gotten) backward from the current position.
+	 * 
+	 * @since 3.6
+	 */
+	private class HippieCompletionBackwardIterator extends HippieCompletionIterator {
+
+		/** Last position searched **/
+		private int fLastSearchPos= -1;
+
+		/*
+		 * (non-Javadoc)
+		 * @see HippieCompletionEngine#getBackwardIterator(IDocument, CharSequence, int)
+		 */
+		private HippieCompletionBackwardIterator(IDocument document, CharSequence prefix, int firstPosition) {
+			super(document, prefix, firstPosition);
+			calculateFirst();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * @see HippieCompletionIterator#calculateNext()
+		 */
+		protected void calculateNext() throws BadLocationException {
+			if (fCurrentState == 0) {
+				fCurrentState= 1;
+				// FindReplaceDocumentAdapter expects the start offset to be before the
+				// actual caret position, probably for compatibility with forward search.
+				if (fFirstPosition <= 1) {
+					this.fNext= null;
+					this.fHasNext= false;
+					return;
+				}
+				fSearcher= new FindReplaceDocumentAdapter(fDocument);
+
+				// search only at word boundaries
+				fSearchPattern= COMPLETION_BOUNDARY + asRegPattern(fPrefix);
+
+				int length= fDocument.getLength();
+				fNextPos= fFirstPosition;
+				if (fNextPos >= length) {
+					fNextPos= length - 1;
+				}
+			}
+			while (true) {
+				if (fNextPos <= 0) {
+					this.fNext= null;
+					this.fHasNext= false;
+					return;
+				}
+
+				Assert.isTrue(fLastSearchPos != fNextPos, "Position did not change in loop (this would lead to recursion -- and should never happen)."); //$NON-NLS-1$
+
+				fLastSearchPos= fNextPos;
+				IRegion reg= fSearcher.find(fNextPos, fSearchPattern, false, CASE_SENSITIVE, false, true);
+				if (reg == null) {
+					this.fNext= null;
+					this.fHasNext= false;
+					return;
+				}
+
+				// since the boundary may be of nonzero length
+				int wordSearchPos= reg.getOffset() + reg.getLength() - fPrefix.length();
+				// try to complete to a word. case is of no matter here
+				IRegion word= fSearcher.find(wordSearchPos, COMPLETION_WORD_REGEX, true, true, false, true);
+				fNextPos= word.getOffset() - 1;
+				if (word.getOffset() + word.getLength() > fFirstPosition) {
+					continue;
+				}
+				if (word.getLength() > fPrefix.length()) { // empty suggestion will be added later
+					String found= fDocument.get(word.getOffset(), word.getLength());
+					this.fHasNext= true;
+					this.fNext= found.substring(fPrefix.length());
+					return;
+				}
+			}
+
+			//Note: unreachable section
+		}
+
+	}
+
+	/**
+	 * Logs the exception.
+	 * 
+	 * @param e the exception
+	 * 
+	 * @since 3.6
+	 */
+	private void log(BadLocationException e) {
+		String msg= e.getLocalizedMessage();
+		if (msg == null)
+			msg= "unable to access the document"; //$NON-NLS-1$
+		TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e));
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/spelling/SpellingEngineRegistry.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/spelling/SpellingEngineRegistry.java
index 6127e2c..7ef9e66 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/spelling/SpellingEngineRegistry.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/spelling/SpellingEngineRegistry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -104,6 +104,8 @@ public class SpellingEngineRegistry {
 		}
 		fDescriptors= (SpellingEngineDescriptor[]) descriptors.toArray(new SpellingEngineDescriptor[descriptors.size()]);
 		fLoaded= true;
+		if (fDefaultDescriptor == null && fDescriptors.length > 0)
+			fDefaultDescriptor= fDescriptors[0];
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
index 02e64f4..3647752 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -178,7 +178,9 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
 
 	/**
 	 * Constant for representing the OK status. This is considered a value object.
+	 * 
 	 * @since 2.0
+	 * @deprecated As of 3.6, replaced by {@link Status#OK_STATUS}
 	 */
 	static final protected IStatus STATUS_OK= new Status(IStatus.OK, TextEditorPlugin.PLUGIN_ID, IStatus.OK, EditorMessages.AbstractDocumentProvider_ok, null);
 
@@ -963,7 +965,7 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
 		if (info != null) {
 			if (info.fStatus != null)
 				return info.fStatus;
-			return (info.fDocument == null ? STATUS_ERROR : STATUS_OK);
+			return (info.fDocument == null ? STATUS_ERROR : Status.OK_STATUS);
 		}
 
 		return STATUS_ERROR;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index 0fecd76..459384f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -16,7 +16,6 @@
  *******************************************************************************/
 package org.eclipse.ui.texteditor;
 
-
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -60,6 +59,8 @@ import org.eclipse.swt.widgets.Caret;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Shell;
 
@@ -110,14 +111,12 @@ import org.eclipse.jface.window.IShellProvider;
 
 import org.eclipse.jface.text.AbstractInformationControlManager;
 import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DefaultInformationControl;
 import org.eclipse.jface.text.DefaultLineTracker;
 import org.eclipse.jface.text.DocumentEvent;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.IDocumentListener;
 import org.eclipse.jface.text.IFindReplaceTarget;
 import org.eclipse.jface.text.IFindReplaceTargetExtension;
-import org.eclipse.jface.text.IInformationControl;
 import org.eclipse.jface.text.IInformationControlCreator;
 import org.eclipse.jface.text.IMarkRegionTarget;
 import org.eclipse.jface.text.IRegion;
@@ -136,6 +135,7 @@ import org.eclipse.jface.text.ITextViewerExtension5;
 import org.eclipse.jface.text.ITextViewerExtension6;
 import org.eclipse.jface.text.ITextViewerExtension7;
 import org.eclipse.jface.text.ITextViewerExtension8;
+import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode;
 import org.eclipse.jface.text.IUndoManager;
 import org.eclipse.jface.text.IUndoManagerExtension;
 import org.eclipse.jface.text.Position;
@@ -144,12 +144,9 @@ import org.eclipse.jface.text.TabsToSpacesConverter;
 import org.eclipse.jface.text.TextEvent;
 import org.eclipse.jface.text.TextSelection;
 import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode;
 import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
 import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
 import org.eclipse.jface.text.information.IInformationProviderExtension2;
-import org.eclipse.jface.text.information.InformationPresenter;
 import org.eclipse.jface.text.link.LinkedModeModel;
 import org.eclipse.jface.text.link.LinkedPosition;
 import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
@@ -157,9 +154,7 @@ import org.eclipse.jface.text.revisions.RevisionInformation;
 import org.eclipse.jface.text.source.Annotation;
 import org.eclipse.jface.text.source.CompositeRuler;
 import org.eclipse.jface.text.source.IAnnotationHover;
-import org.eclipse.jface.text.source.IAnnotationHoverExtension;
 import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.jface.text.source.ILineRange;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.ISourceViewerExtension3;
 import org.eclipse.jface.text.source.ISourceViewerExtension4;
@@ -197,11 +192,13 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.Saveable;
 import org.eclipse.ui.SaveablesLifecycleEvent;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
 import org.eclipse.ui.actions.CommandNotMappedException;
 import org.eclipse.ui.actions.ContributedAction;
 import org.eclipse.ui.dialogs.PropertyDialogAction;
 import org.eclipse.ui.dnd.IDragAndDropService;
 import org.eclipse.ui.internal.texteditor.EditPosition;
+import org.eclipse.ui.internal.texteditor.FocusedInformationPresenter;
 import org.eclipse.ui.internal.texteditor.NLSUtility;
 import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
 import org.eclipse.ui.internal.texteditor.rulers.StringSetSerializer;
@@ -218,6 +215,7 @@ import org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor;
 import org.eclipse.ui.texteditor.rulers.RulerColumnPreferenceAdapter;
 import org.eclipse.ui.texteditor.rulers.RulerColumnRegistry;
 
+
 /**
  * Abstract base implementation of a text editor.
  * <p>
@@ -281,28 +279,24 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 
 	/**
 	 * Tag used in the {@link IMemento} when saving and restoring the editor's top pixel value.
-	 * <p>
-	 * XXX: will become API in 3.6, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274822
-	 * </p>
 	 * 
 	 * @see #saveState(IMemento)
 	 * @see #restoreState(IMemento)
 	 * @see #doRestoreState(IMemento)
+	 * @since 3.6
 	 */
-	private static final String TAG_SELECTION_TOP_PIXEL= "selectionTopPixel"; //$NON-NLS-1$
+	protected static final String TAG_SELECTION_TOP_PIXEL= "selectionTopPixel"; //$NON-NLS-1$
 
 	/**
 	 * Tag used in the {@link IMemento} when saving and restoring the editor's horizontal pixel
 	 * value.
-	 * <p>
-	 * XXX: will become API in 3.6, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274822
-	 * </p>
 	 * 
 	 * @see #saveState(IMemento)
 	 * @see #restoreState(IMemento)
 	 * @see #doRestoreState(IMemento)
+	 * @since 3.6
 	 */
-	private static final String TAG_SELECTION_HORIZONTAL_PIXEL= "selectionHorizontalPixel"; //$NON-NLS-1$
+	protected static final String TAG_SELECTION_HORIZONTAL_PIXEL= "selectionHorizontalPixel"; //$NON-NLS-1$
 
 
 	/**
@@ -988,9 +982,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 					safelySanityCheckState(getEditorInput());
 				} finally {
 					fIsHandlingActivation= false;
+					fHasBeenActivated= true;
 				}
 			}
-			fHasBeenActivated= true;
 		}
 
 		/*
@@ -1845,51 +1839,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 
 
 	/**
-	 * Information provider used to present focusable information shells.
-	 *
-	 * @since 3.3
-	 */
-	private static final class InformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 {
-
-		private IRegion fHoverRegion;
-		private Object fHoverInfo;
-		private IInformationControlCreator fControlCreator;
-
-		InformationProvider(IRegion hoverRegion, Object hoverInfo, IInformationControlCreator controlCreator) {
-			fHoverRegion= hoverRegion;
-			fHoverInfo= hoverInfo;
-			fControlCreator= controlCreator;
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProvider#getSubject(org.eclipse.jface.text.ITextViewer, int)
-		 */
-		public IRegion getSubject(ITextViewer textViewer, int invocationOffset) {
-			return fHoverRegion;
-		}
-		/**
-		 * {@inheritDoc}
-		 *
-		 * @deprecated As of 2.1, replaced by {@link IInformationProviderExtension#getInformation2(ITextViewer, IRegion)}
-		 */
-		public String getInformation(ITextViewer textViewer, IRegion subject) {
-			return fHoverInfo == null ? null : fHoverInfo.toString();
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion)
-		 * @since 3.2
-		 */
-		public Object getInformation2(ITextViewer textViewer, IRegion subject) {
-			return fHoverInfo;
-		}
-		/*
-		 * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
-		 */
-		public IInformationControlCreator getInformationPresenterControlCreator() {
-			return fControlCreator;
-		}
-	}
-
-	/**
 	 * This action behaves in two different ways: If there is no current text
 	 * hover, the javadoc is displayed using information presenter. If there is
 	 * a current text hover, it is converted into a information presenter in
@@ -1944,7 +1893,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 			if (sourceViewer instanceof ISourceViewerExtension3) {
 				// does an annotation hover exist?
 				IAnnotationHover annotationHover= ((ISourceViewerExtension3) sourceViewer).getCurrentAnnotationHover();
-				if (annotationHover != null && makeAnnotationHoverFocusable(sourceViewer, annotationHover))
+				if (annotationHover != null && makeAnnotationHoverFocusable(annotationHover))
 					return;
 			}
 
@@ -1977,14 +1926,15 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 				if (textHover instanceof IInformationProviderExtension2) // this is conceptually wrong, but left here for backwards compatibility
 					controlCreator= ((IInformationProviderExtension2)textHover).getInformationPresenterControlCreator();
 
-				IInformationProvider informationProvider= new InformationProvider(hoverRegion, hoverInfo, controlCreator);
+				IInformationProvider informationProvider= new FocusedInformationPresenter.InformationProvider(hoverRegion, hoverInfo, controlCreator);
 
-				fInformationPresenter.setOffset(offset);
-				fInformationPresenter.setAnchor(AbstractInformationControlManager.ANCHOR_BOTTOM);
-				fInformationPresenter.setMargins(6, 6); // default values from AbstractInformationControlManager
+				FocusedInformationPresenter informationPresenter= getInformationPresenter();
+				informationPresenter.setOffset(offset);
+				informationPresenter.setAnchor(AbstractInformationControlManager.ANCHOR_BOTTOM);
+				informationPresenter.setMargins(6, 6); // default values from AbstractInformationControlManager
 				String contentType= TextUtilities.getContentType(sourceViewer.getDocument(), getSourceViewerConfiguration().getConfiguredDocumentPartitioning(getSourceViewer()), offset, true);
-				fInformationPresenter.setInformationProvider(informationProvider, contentType);
-				fInformationPresenter.showInformation();
+				informationPresenter.setInformationProvider(informationProvider, contentType);
+				informationPresenter.showInformation();
 
 				return true;
 
@@ -1996,56 +1946,30 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		/**
 		 * Tries to make an annotation hover focusable (or "sticky").
 		 *
-		 * @param sourceViewer the source viewer to display the hover over
 		 * @param annotationHover the hover to make focusable
 		 * @return <code>true</code> if successful, <code>false</code> otherwise
 		 */
-		private boolean makeAnnotationHoverFocusable(ISourceViewer sourceViewer, IAnnotationHover annotationHover) {
+		private boolean makeAnnotationHoverFocusable(IAnnotationHover annotationHover) {
 			IVerticalRulerInfo info= getVerticalRuler();
 			int line= info.getLineOfLastMouseButtonActivity();
 			if (line == -1)
 				return false;
 
-			try {
-
-				// compute the hover information
-				Object hoverInfo;
-				if (annotationHover instanceof IAnnotationHoverExtension) {
-					IAnnotationHoverExtension extension= (IAnnotationHoverExtension) annotationHover;
-					ILineRange hoverLineRange= extension.getHoverLineRange(sourceViewer, line);
-					if (hoverLineRange == null)
-						return false;
-					final int maxVisibleLines= Integer.MAX_VALUE; // allow any number of lines being displayed, as we support scrolling
-					hoverInfo= extension.getHoverInfo(sourceViewer, hoverLineRange, maxVisibleLines);
-				} else {
-					hoverInfo= annotationHover.getHoverInfo(sourceViewer, line);
-				}
-
-				// hover region: the beginning of the concerned line to place the control right over the line
-				IDocument document= sourceViewer.getDocument();
-				int offset= document.getLineOffset(line);
-				String contentType= TextUtilities.getContentType(document, getSourceViewerConfiguration().getConfiguredDocumentPartitioning(getSourceViewer()), offset, true);
-
-				IInformationControlCreator controlCreator= null;
-				if (annotationHover instanceof IInformationProviderExtension2) // this is undocumented, but left here for backwards compatibility
-					controlCreator= ((IInformationProviderExtension2) annotationHover).getInformationPresenterControlCreator();
-				else if (annotationHover instanceof IAnnotationHoverExtension)
-					controlCreator= ((IAnnotationHoverExtension) annotationHover).getHoverControlCreator();
-
-				IInformationProvider informationProvider= new InformationProvider(new Region(offset, 0), hoverInfo, controlCreator);
-
-				fInformationPresenter.setOffset(offset);
-				fInformationPresenter.setAnchor(AbstractInformationControlManager.ANCHOR_RIGHT);
-				fInformationPresenter.setMargins(4, 0); // AnnotationBarHoverManager sets (5,0), minus SourceViewer.GAP_SIZE_1
-				fInformationPresenter.setInformationProvider(informationProvider, contentType);
-				fInformationPresenter.showInformation();
-
-				return true;
-
-			} catch (BadLocationException e) {
-				return false;
-			}
+			return getInformationPresenter().openFocusedAnnotationHover(annotationHover, line);
         }
+		
+		/**
+		 * Returns the information presenter (creates it if necessary).
+		 * 
+		 * @return the information presenter
+		 * @since 3.6
+		 */
+		private FocusedInformationPresenter getInformationPresenter() {
+			if (fInformationPresenter == null) {
+				fInformationPresenter= new FocusedInformationPresenter(getSourceViewer(), getSourceViewerConfiguration());
+			}
+			return fInformationPresenter;
+		}
 
 		// modified version from TextViewer
 		private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
@@ -2071,7 +1995,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 			} catch (IllegalArgumentException e) {
 				return -1;
 			}
-
 		}
 	}
 
@@ -2588,10 +2511,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 	 */
 	private Object fTextDragAndDropToken;
 	/**
-	 * The information presenter.
+	 * The information presenter, may be <code>null</code>.
 	 * @since 3.3
 	 */
-	private InformationPresenter fInformationPresenter;
+	private FocusedInformationPresenter fInformationPresenter;
 
 	/**
 	 * Tells whether this editor has been activated at least once.
@@ -2606,11 +2529,16 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 
 	/**
 	 * Key binding support for the quick assist assistant.
-	 *
 	 * @since 3.5
 	 */
 	private KeyBindingSupportForAssistant fKeyBindingSupportForContentAssistant;
 
+	/**
+	 * The save action.
+	 * @since 3.6.1
+	 */
+	private IWorkbenchAction fSaveAction;
+
 
 	/**
 	 * Creates a new text editor. If not explicitly set, this editor uses
@@ -2969,7 +2897,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 			fMouseListener= new MouseListener() {
 
 				private boolean fDoubleClicked= false;
-				private final int fDoubleClickTime= Display.getDefault().getDoubleClickTime();
+				private final int fDoubleClickTime= getSite().getShell().getDisplay().getDoubleClickTime();
 				private long fMouseUpDelta= 0;
 
 				private void triggerAction(String actionID) {
@@ -2997,7 +2925,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 					if (delay <= 0)
 						runnable.run();
 					else
-						Display.getDefault().timerExec(delay, runnable);
+						e.widget.getDisplay().timerExec(delay, runnable);
 				}
 
 				public void mouseDoubleClick(MouseEvent e) {
@@ -3010,11 +2938,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 				public void mouseDown(MouseEvent e) {
 					fMouseUpDelta= System.currentTimeMillis();
 					fDoubleClicked= false;
-					StyledText text= fSourceViewer.getTextWidget();
-					if (text != null && !text.isDisposed()) {
-							Display display= text.getDisplay();
-							Point location= display.getCursorLocation();
-							fRulerContextMenu.setLocation(location.x, location.y);
+					if (fRulerContextMenu != null && !fRulerContextMenu.isDisposed()) {
+						Display display= fRulerContextMenu.getDisplay();
+						Point location= display.getCursorLocation();
+						fRulerContextMenu.setLocation(location.x, location.y);
 					}
 				}
 			};
@@ -3395,6 +3322,13 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		styledText.addMouseListener(getCursorListener());
 		styledText.addKeyListener(getCursorListener());
 
+		// Disable orientation switching until we fully support it.
+		styledText.addListener(SWT.OrientationChange, new Listener() {
+			public void handleEvent(Event event) {
+				event.doit= false;
+			}
+		});
+
 		if (getHelpContextId() != null)
 			PlatformUI.getWorkbench().getHelpSystem().setHelp(styledText, getHelpContextId());
 
@@ -3477,19 +3411,6 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		IVerticalRuler ruler= getVerticalRuler();
 		if (ruler instanceof CompositeRuler)
 			updateContributedRulerColumns((CompositeRuler) ruler);
-
-		IInformationControlCreator informationControlCreator= new IInformationControlCreator() {
-			public IInformationControl createInformationControl(Shell shell) {
-				return new DefaultInformationControl(shell, true);
-			}
-		};
-
-		fInformationPresenter= new InformationPresenter(informationControlCreator);
-		// sizes: see org.eclipse.jface.text.TextViewer.TEXT_HOVER_*_CHARS
-		fInformationPresenter.setSizeConstraints(100, 12, true, true);
-		fInformationPresenter.install(getSourceViewer());
-		fInformationPresenter.setDocumentPartitioning(getSourceViewerConfiguration().getConfiguredDocumentPartitioning(getSourceViewer()));
-
 	}
 
 	/**
@@ -4346,6 +4267,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		}
 
 		if (fActions != null) {
+			registerUndoRedoAction(ITextEditorActionConstants.UNDO, null);
+			registerUndoRedoAction(ITextEditorActionConstants.REDO, null);
 			fActions.clear();
 			fActions= null;
 		}
@@ -4408,6 +4331,16 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 			fKeyBindingSupportForQuickAssistant.dispose();
 			fKeyBindingSupportForQuickAssistant= null;
 		}
+		
+		if (fInformationPresenter != null) {
+			fInformationPresenter.uninstall();
+			fInformationPresenter= null;
+		}
+
+		if (fSaveAction != null) {
+			fSaveAction.dispose();
+			fSaveAction= null;
+		}
 
 		super.dispose();
 	}
@@ -5540,13 +5473,12 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 	}
 
 	/**
-	 * Registers the given undo/redo action under the given ID and
-	 * ensures that previously installed actions get disposed. It
-	 * also takes care of re-registering the new action with the
-	 * global action handler.
-	 *
-	 * @param actionId	the action id under which to register the action
-	 * @param action	the action to register
+	 * Registers the given undo/redo action under the given ID and ensures that previously installed
+	 * actions get disposed. It also takes care of re-registering the new action with the global
+	 * action handler.
+	 * 
+	 * @param actionId the action id under which to register the action
+	 * @param action the action to register or <code>null</code> to dispose them
 	 * @since 3.1
 	 */
 	private void registerUndoRedoAction(String actionId, OperationHistoryActionHandler action) {
@@ -5554,6 +5486,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		if (oldAction instanceof OperationHistoryActionHandler)
 			((OperationHistoryActionHandler)oldAction).dispose();
 
+		if (action == null)
+			return;
+
 		setAction(actionId, action);
 
 		IActionBars actionBars= getEditorSite().getActionBars();
@@ -5586,7 +5521,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 	 */
 	protected void createActions() {
 
-        ResourceAction action;
+		ResourceAction action;
 
 		action= new TextOperationAction(EditorMessages.getBundleForConstructedKeys(), "Editor.Cut.", this, ITextOperationTarget.CUT); //$NON-NLS-1$
 		action.setHelpContextId(IAbstractTextEditorHelpContextIds.CUT_ACTION);
@@ -5710,7 +5645,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
 		action.setActionDefinitionId(IWorkbenchActionDefinitionIds.FIND_INCREMENTAL_REVERSE);
 		setAction(ITextEditorActionConstants.FIND_INCREMENTAL_REVERSE, action);
 
-		setAction(ITextEditorActionConstants.SAVE, ActionFactory.SAVE.create(getSite().getWorkbenchWindow()));
+		fSaveAction= ActionFactory.SAVE.create(getSite().getWorkbenchWindow());
+		setAction(ITextEditorActionConstants.SAVE, fSaveAction);
 
 		action= new RevertToSavedAction(EditorMessages.getBundleForConstructedKeys(), "Editor.Revert.", this); //$NON-NLS-1$
 		action.setHelpContextId(IAbstractTextEditorHelpContextIds.REVERT_TO_SAVED_ACTION);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
index 7c248d9..faac4e9 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import java.util.ResourceBundle;
 
 import org.eclipse.osgi.util.NLS;
 
+
 /**
  * Helper class to get NLSed messages.
  */
@@ -112,6 +113,7 @@ final class EditorMessages extends NLS {
 	public static String FindReplace_Status_noMatch_label;
 	public static String FindReplace_Status_replacement_label;
 	public static String FindReplace_Status_replacements_label;
+	public static String FindReplace_Status_wrapped_label;
 	public static String FindNext_Status_noMatch_label;
 	public static String AbstractDocumentProvider_ok;
 	public static String AbstractDocumentProvider_error;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
index 31d5be1..682acf8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/EditorMessages.properties
@@ -108,6 +108,7 @@ FindReplace_CloseButton_label=Close
 FindReplace_Status_noMatch_label=String Not Found
 FindReplace_Status_replacement_label=1 Match replaced
 FindReplace_Status_replacements_label={0} matches replaced
+FindReplace_Status_wrapped_label=Wrapped search
 
 FindNext_Status_noMatch_label=String Not Found
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
index d508766..0e4147c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -348,7 +348,7 @@ public class FindNextAction extends ResourceAction implements IUpdate {
 	private void readConfiguration() {
 		IDialogSettings s= getDialogSettings();
 
-		fWrapInit= s.getBoolean("wrap"); //$NON-NLS-1$
+		fWrapInit= s.get("wrap") == null || s.getBoolean("wrap"); //$NON-NLS-1$ //$NON-NLS-2$
 		fCaseInit= s.getBoolean("casesensitive"); //$NON-NLS-1$
 		fWholeWordInit= s.getBoolean("wholeword"); //$NON-NLS-1$
 		fRegExSearch= s.getBoolean("isRegEx"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java
index abe1a90..ae90a34 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindReplaceDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -592,7 +592,7 @@ class FindReplaceDialog extends Dialog {
 				contentAdapter,
 				findProposer,
 				ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
-				new char[] {'\\', '[', '('},
+				new char[0],
 				true);
 		setGridData(fFindField, SWT.FILL, true, SWT.CENTER, false);
 		addDecorationMargin(fFindField);
@@ -609,7 +609,7 @@ class FindReplaceDialog extends Dialog {
 				fReplaceField,
 				contentAdapter, replaceProposer,
 				ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
-				new char[] {'$', '\\'},
+				new char[0],
 				true);
 		setGridData(fReplaceField, SWT.FILL, true, SWT.CENTER, false);
 		addDecorationMargin(fReplaceField);
@@ -752,31 +752,34 @@ class FindReplaceDialog extends Dialog {
 	// ------- action invocation ---------------------------------------
 
 	/**
-	 * Returns the position of the specified search string, or <code>-1</code> if the string can
-	 * not be found when searching using the given options.
-	 *
+	 * Returns the position of the specified search string, or <code>-1</code> if the string can not
+	 * be found when searching using the given options.
+	 * 
 	 * @param findString the string to search for
 	 * @param startPosition the position at which to start the search
 	 * @param forwardSearch the direction of the search
-	 * @param caseSensitive	should the search be case sensitive
-	 * @param wrapSearch	should the search wrap to the start/end if arrived at the end/start
+	 * @param caseSensitive should the search be case sensitive
+	 * @param wrapSearch should the search wrap to the start/end if arrived at the end/start
 	 * @param wholeWord does the search string represent a complete word
 	 * @param regExSearch if <code>true</code> findString represents a regular expression
-	 * @param beepOnWrap if <code>true</code> beeps when search needs to wrap
-	 * @return the occurrence of the find string following the options or <code>-1</code> if nothing found
+	 * @param beep if <code>true</code> beeps when search does not find a match or needs to wrap
+	 * @return the occurrence of the find string following the options or <code>-1</code> if nothing
+	 *         found
 	 * @since 3.0
 	 */
-	private int findIndex(String findString, int startPosition, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean regExSearch, boolean beepOnWrap) {
+	private int findIndex(String findString, int startPosition, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean regExSearch, boolean beep) {
 
 		if (forwardSearch) {
 			int index= findAndSelect(startPosition, findString, true, caseSensitive, wholeWord, regExSearch);
 			if (index == -1) {
-				if (beepOnWrap && okToUse(getShell()))
+
+				if (beep && okToUse(getShell()))
 					getShell().getDisplay().beep();
 
-				if (wrapSearch)
+				if (wrapSearch) {
+					statusMessage(EditorMessages.FindReplace_Status_wrapped_label);
 					index= findAndSelect(-1, findString, true, caseSensitive, wholeWord, regExSearch);
-
+				}
 			}
 			return index;
 		}
@@ -784,11 +787,14 @@ class FindReplaceDialog extends Dialog {
 		// backward
 		int index= startPosition == 0 ? -1 : findAndSelect(startPosition - 1, findString, false, caseSensitive, wholeWord, regExSearch);
 		if (index == -1) {
-			if (beepOnWrap && okToUse(getShell()))
+
+			if (beep && okToUse(getShell()))
 				getShell().getDisplay().beep();
 
-			if (wrapSearch)
+			if (wrapSearch) {
+				statusMessage(EditorMessages.FindReplace_Status_wrapped_label);
 				index= findAndSelect(-1, findString, false, caseSensitive, wholeWord, regExSearch);
+			}
 		}
 		return index;
 	}
@@ -838,20 +844,20 @@ class FindReplaceDialog extends Dialog {
 
 	/**
 	 * Returns whether the specified search string can be found using the given options.
-	 *
+	 * 
 	 * @param findString the string to search for
 	 * @param forwardSearch the direction of the search
-	 * @param caseSensitive	should the search be case sensitive
-	 * @param wrapSearch	should the search wrap to the start/end if arrived at the end/start
+	 * @param caseSensitive should the search be case sensitive
+	 * @param wrapSearch should the search wrap to the start/end if arrived at the end/start
 	 * @param wholeWord does the search string represent a complete word
 	 * @param incremental is this an incremental search
 	 * @param regExSearch if <code>true</code> findString represents a regular expression
-	 * @param beepOnWrap if <code>true</code> beeps when search needs to wrap
+	 * @param beep if <code>true</code> beeps when search does not find a match or needs to wrap
 	 * @return <code>true</code> if the search string can be found using the given options
-	 *
+	 * 
 	 * @since 3.0
 	 */
-	private boolean findNext(String findString, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean incremental, boolean regExSearch, boolean beepOnWrap) {
+	private boolean findNext(String findString, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean incremental, boolean regExSearch, boolean beep) {
 
 		if (fTarget == null)
 			return false;
@@ -868,12 +874,17 @@ class FindReplaceDialog extends Dialog {
 
 		fNeedsInitialFindBeforeReplace= false;
 
-		int index= findIndex(findString, findReplacePosition, forwardSearch, caseSensitive, wrapSearch, wholeWord, regExSearch, beepOnWrap);
+		int index= findIndex(findString, findReplacePosition, forwardSearch, caseSensitive, wrapSearch, wholeWord, regExSearch, beep);
 
-		if (index != -1)
-			return true;
+		if (index == -1) {
+			statusMessage(EditorMessages.FindReplace_Status_noMatch_label);
+			return false;
+		}
+
+		if (forwardSearch && index >= findReplacePosition || !forwardSearch && index <= findReplacePosition)
+			statusMessage(""); //$NON-NLS-1$
 
-		return false;
+		return true;
 	}
 
 	/**
@@ -1254,7 +1265,7 @@ class FindReplaceDialog extends Dialog {
 			class ReplaceAllRunnable implements Runnable {
 				public int numberOfOccurrences;
 				public void run() {
-					numberOfOccurrences= replaceAll(findString, replaceString == null ? "" : replaceString, isForwardSearch(), isCaseSensitiveSearch(), isWrapSearch(), isWholeWordSearch(), isRegExSearchAvailableAndChecked());	//$NON-NLS-1$
+					numberOfOccurrences= replaceAll(findString, replaceString == null ? "" : replaceString, isForwardSearch(), isCaseSensitiveSearch(), isWholeWordSearch(), isRegExSearchAvailableAndChecked());	//$NON-NLS-1$
 				}
 			}
 
@@ -1342,12 +1353,12 @@ class FindReplaceDialog extends Dialog {
 
 	/**
 	 * Locates the user's findString in the text of the target.
-	 *
+	 * 
 	 * @param mustInitIncrementalBaseLocation <code>true</code> if base location must be initialized
-	 * @param beepOnWrap if <code>true</code> beeps when search needs to wrap
+	 * @param beep if <code>true</code> beeps when search does not find a match or needs to wrap
 	 * @since 3.0
 	 */
-	private void performSearch(boolean mustInitIncrementalBaseLocation, boolean beepOnWrap) {
+	private void performSearch(boolean mustInitIncrementalBaseLocation, boolean beep) {
 
 		if (mustInitIncrementalBaseLocation)
 			initIncrementalBaseLocation();
@@ -1358,12 +1369,7 @@ class FindReplaceDialog extends Dialog {
 		if (findString != null && findString.length() > 0) {
 
 			try {
-				somethingFound= findNext(findString, isForwardSearch(), isCaseSensitiveSearch(), isWrapSearch(), isWholeWordSearch(), isIncrementalSearch() && !isRegExSearchAvailableAndChecked(), isRegExSearchAvailableAndChecked(), beepOnWrap);
-				if (somethingFound) {
-					statusMessage(""); //$NON-NLS-1$
-				} else {
-					statusMessage(EditorMessages.FindReplace_Status_noMatch_label);
-				}
+				somethingFound= findNext(findString, isForwardSearch(), isCaseSensitiveSearch(), isWrapSearch(), isWholeWordSearch(), isIncrementalSearch() && !isRegExSearchAvailableAndChecked(), isRegExSearchAvailableAndChecked(), beep);
 			} catch (PatternSyntaxException ex) {
 				statusError(ex.getLocalizedMessage());
 			} catch (IllegalStateException ex) {
@@ -1383,26 +1389,19 @@ class FindReplaceDialog extends Dialog {
 	 * @param replaceString the replacement string
 	 * @param forwardSearch	the search direction
 	 * @param caseSensitive should the search be case sensitive
-	 * @param wrapSearch	should search wrap to start/end if end/start is reached
 	 * @param wholeWord does the search string represent a complete word
 	 * @param regExSearch if <code>true</code> findString represents a regular expression
 	 * @return the number of occurrences
 	 *
 	 * @since 3.0
 	 */
-	private int replaceAll(String findString, String replaceString, boolean forwardSearch, boolean caseSensitive, boolean wrapSearch, boolean wholeWord, boolean regExSearch) {
+	private int replaceAll(String findString, String replaceString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) {
 
 		int replaceCount= 0;
 		int findReplacePosition= 0;
 
-		if (wrapSearch) { // search the whole text
-			findReplacePosition= 0;
-			forwardSearch= true;
-		} else {
-			// the cursor is set to the end or beginning of the selected text
-			Point selection= fTarget.getSelection();
-			findReplacePosition= selection.x;
-		}
+		findReplacePosition= 0;
+		forwardSearch= true;
 
 		if (!validateTargetState())
 			return replaceCount;
@@ -1706,7 +1705,7 @@ class FindReplaceDialog extends Dialog {
 	private void readConfiguration() {
 		IDialogSettings s= getDialogSettings();
 
-		fWrapInit= s.getBoolean("wrap"); //$NON-NLS-1$
+		fWrapInit= s.get("wrap") == null || s.getBoolean("wrap"); //$NON-NLS-1$ //$NON-NLS-2$
 		fCaseInit= s.getBoolean("casesensitive"); //$NON-NLS-1$
 		fWholeWordInit= s.getBoolean("wholeword"); //$NON-NLS-1$
 		fIncrementalInit= s.getBoolean("incremental"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/GotoLineAction.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/GotoLineAction.java
index bb3943d..a2ed256 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/GotoLineAction.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/GotoLineAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,21 +8,26 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.texteditor;
 
-
 import java.util.ResourceBundle;
 
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.window.Window;
 
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextSelection;
 
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.internal.texteditor.NLSUtility;
@@ -30,30 +35,30 @@ import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
 
 
 /**
- * Action for jumping to a particular line in the editor's text viewer.
- * The user is requested to enter the line number into an input dialog.
- * The action is initially associated with a text editor via the constructor,
- * but that can be subsequently changed using <code>setEditor</code>.
+ * Action for jumping to a particular line in the editor's text viewer. The user is requested to
+ * enter the line number into an input dialog. The action is initially associated with a text editor
+ * via the constructor, but that can be subsequently changed using <code>setEditor</code>.
  * <p>
- * The following keys, prepended by the given option prefix,
- * are used for retrieving resources from the given bundle:
+ * The following keys, prepended by the given option prefix, are used for retrieving resources from
+ * the given bundle:
  * <ul>
- *   <li><code>"dialog.invalid_range"</code> - to indicate an invalid line number</li>
- *   <li><code>"dialog.invalid_input"</code> - to indicate an invalid line number format</li>
- *   <li><code>"dialog.title"</code> - the input dialog's title</li>
- *   <li><code>"dialog.message"</code> - the input dialog's message</li>
- * </ul></p>
+ * <li><code>"dialog.invalid_range"</code> - to indicate an invalid line number</li>
+ * <li><code>"dialog.invalid_input"</code> - to indicate an invalid line number format</li>
+ * <li><code>"dialog.title"</code> - the input dialog's title</li>
+ * <li><code>"dialog.message"</code> - the input dialog's message</li>
+ * </ul>
+ * </p>
  * <p>
  * This class may be instantiated; it is not intended to be subclassed.
  * </p>
+ * 
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class GotoLineAction extends TextEditorAction {
 
 	/**
-	 * Validates whether the text found in the input field of the
-	 * dialog forms a valid line number. A number is valid if it is
-	 * one to which can be jumped.
+	 * Validates whether the text found in the input field of the dialog forms a valid line number.
+	 * A number is valid if it is one to which can be jumped.
 	 */
 	class NumberValidator implements IInputValidator {
 
@@ -79,9 +84,8 @@ public class GotoLineAction extends TextEditorAction {
 	}
 
 	/**
-	 * Standard input dialog with custom dialog bounds
-	 * strategy and settings.
-	 *
+	 * Standard input dialog with custom dialog bounds strategy and settings.
+	 * 
 	 * @since 2.0
 	 */
 	static class GotoLineDialog extends InputDialog {
@@ -117,20 +121,21 @@ public class GotoLineAction extends TextEditorAction {
 
 	/** The biggest valid line number of the presented document */
 	private int fLastLine;
+
 	/** This action's resource bundle */
 	private ResourceBundle fBundle;
+
 	/** This action's prefix used for accessing the resource bundle */
 	private String fPrefix;
 
 
 	/**
-	 * Creates a new action for the given text editor. The action configures its
-	 * visual representation from the given resource bundle.
-	 *
+	 * Creates a new action for the given text editor. The action configures its visual
+	 * representation from the given resource bundle.
+	 * 
 	 * @param bundle the resource bundle
-	 * @param prefix a prefix to be prepended to the various resource keys
-	 *   (described in <code>ResourceAction</code> constructor), or
-	 *   <code>null</code> if none
+	 * @param prefix a prefix to be prepended to the various resource keys (described in
+	 *            <code>ResourceAction</code> constructor), or <code>null</code> if none
 	 * @param editor the text editor
 	 * @see TextEditorAction#TextEditorAction(ResourceBundle, String, ITextEditor)
 	 */
@@ -156,7 +161,7 @@ public class GotoLineAction extends TextEditorAction {
 
 	/**
 	 * Jumps to the given line.
-	 *
+	 * 
 	 * @param line the line to jump to
 	 */
 	private void gotoLine(int line) {
@@ -182,36 +187,60 @@ public class GotoLineAction extends TextEditorAction {
 	 * @see Action#run()
 	 */
 	public void run() {
-		try {
-
-			ITextEditor editor= getTextEditor();
+		ITextEditor editor= getTextEditor();
 
-			if (editor == null)
-				return;
+		if (editor == null)
+			return;
 
-			IDocumentProvider docProvider= editor.getDocumentProvider();
-			if (docProvider == null)
-				return;
+		IDocumentProvider docProvider= editor.getDocumentProvider();
+		if (docProvider == null)
+			return;
 
-			IDocument document= docProvider.getDocument(editor.getEditorInput());
-			if (document == null)
-				return;
+		IDocument document= docProvider.getDocument(editor.getEditorInput());
+		if (document == null)
+			return;
 
+		try {
 			fLastLine= document.getLineOfOffset(document.getLength()) + 1;
+		} catch (BadLocationException ex) {
+			IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Go to Line failed", ex); //$NON-NLS-1$
+			TextEditorPlugin.getDefault().getLog().log(status);
+			return;
+		}
 
-			String title= fBundle.getString(fPrefix + "dialog.title"); //$NON-NLS-1$
-			String message= NLSUtility.format(fBundle.getString(fPrefix + "dialog.message"), new Integer(fLastLine)); //$NON-NLS-1$
-
-			GotoLineDialog d= new GotoLineDialog(editor.getSite().getShell(), title, message, "", new NumberValidator()); //$NON-NLS-1$
-			if (d.open() == Window.OK) {
+		String title= fBundle.getString(fPrefix + "dialog.title"); //$NON-NLS-1$
+		String message= NLSUtility.format(fBundle.getString(fPrefix + "dialog.message"), new Integer(fLastLine)); //$NON-NLS-1$
+
+		String currentLineStr= ""; //$NON-NLS-1$
+		ISelection selection= editor.getSelectionProvider().getSelection();
+		if (selection instanceof ITextSelection) {
+			ITextSelection textSelection= (ITextSelection)selection;
+			Control textWidget= (Control)editor.getAdapter(Control.class);
+			boolean caretAtStartOfSelection= false;
+			if (textWidget instanceof StyledText)
+				caretAtStartOfSelection= ((StyledText)textWidget).getSelection().x == ((StyledText)textWidget).getCaretOffset();
+			int currentLine;
+			if (caretAtStartOfSelection)
+				currentLine= textSelection.getStartLine();
+			else {
+				int endOffset= textSelection.getOffset() + textSelection.getLength();
 				try {
-					int line= Integer.parseInt(d.getValue());
-					gotoLine(line - 1);
-				} catch (NumberFormatException x) {
+					currentLine= document.getLineOfOffset(endOffset);
+				} catch (BadLocationException ex) {
+					currentLine= -1;
 				}
 			}
+			if (currentLine > -1)
+				currentLineStr= Integer.toString(currentLine + 1);
+		}
 
-		} catch (BadLocationException x) {
+		GotoLineDialog d= new GotoLineDialog(editor.getSite().getShell(), title, message, currentLineStr, new NumberValidator());
+		if (d.open() == Window.OK) {
+			try {
+				int line= Integer.parseInt(d.getValue());
+				gotoLine(line - 1);
+			} catch (NumberFormatException x) {
+			}
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HippieCompleteAction.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HippieCompleteAction.java
index 9b2cf67..84faf19 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HippieCompleteAction.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/HippieCompleteAction.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,13 @@
  *
  * Contributors:
  *     Genady Beryozkin, me at genady.org - initial API and implementation
- *     IBM Corporation - fixes and cleaning
+ *     Fabio Zadrozny <fabiofz at gmail dot com> - [typing] HippieCompleteAction is slow  ( Alt+/ ) - https://bugs.eclipse.org/bugs/show_bug.cgi?id=270385
  *******************************************************************************/
 package org.eclipse.ui.texteditor;
 
 import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
 
@@ -25,15 +27,12 @@ import org.eclipse.jface.text.IRewriteTarget;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.source.ISourceViewer;
 
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.internal.texteditor.CompoundEditExitStrategy;
 import org.eclipse.ui.internal.texteditor.HippieCompletionEngine;
 import org.eclipse.ui.internal.texteditor.ICompoundEditListener;
 import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
 
+
 /**
  * This class implements the emacs style completion action. Completion action is
  * a stateful action, as the user may invoke it several times in a row in order
@@ -43,7 +42,6 @@ import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
  * TODO: Provide history option
  *
  * @since 3.1
- * @author Genady Beryozkin, me at genady.org
  */
 final class HippieCompleteAction extends TextEditorAction {
 
@@ -65,31 +63,119 @@ final class HippieCompleteAction extends TextEditorAction {
 		final int startOffset;
 
 		/**
-		 * The list of suggestions that was computed when the completion action
-		 * was first invoked
+		 * Iterator of Strings with suggestions computed when the completion action is invoked
+		 * 
+		 * @since 3.6
+		 */
+		private final Iterator suggestions;
+
+		/**
+		 * List of Strings with the suggestions that are already consumed from the iterator
+		 * 
+		 * @since 3.6
+		 */
+		private final List consumedSuggestions;
+
+		/**
+		 * Do we have only 1 (empty) completion available?
+		 * 
+		 * @since 3.6
 		 */
-		final String[] suggestions;
+		private final boolean hasOnly1EmptySuggestion;
+
+		/**
+		 * Set with the String completions found so that we can make them unique
+		 * 
+		 * @since 3.6
+		 */
+		private final HashSet alreadyFound;
 
 		/**
 		 * Create a new completion state object
-		 *
-		 * @param suggestions the array of possible completions
-		 * @param startOffset the position in the parent document at which the
-		 *        completions will be inserted.
+		 * 
+		 * @param suggestions the iterator of Strings with possible completions
+		 * @param startOffset the position in the parent document at which the completions will be
+		 *            inserted.
 		 */
-		CompletionState(String[] suggestions, int startOffset) {
+		CompletionState(Iterator suggestions, int startOffset) {
 			this.suggestions= suggestions;
+			this.consumedSuggestions= new ArrayList();
+			this.alreadyFound= new HashSet();
 			this.startOffset= startOffset;
-			length= 0;
-			nextSuggestion= 0;
+			this.length= 0;
+			this.nextSuggestion= 0;
+
+
+			//Let's see if only 1 is available.
+			if (this.suggestions.hasNext()) {
+				addNewToken((String)this.suggestions.next());
+
+				boolean hasOnly1Temp= true;
+				while (this.suggestions.hasNext()) {
+					Object next= this.suggestions.next();
+					if (consumedSuggestions.contains(next)) {
+						continue;
+					}
+					addNewToken((String)next);
+					hasOnly1Temp= false;
+					break;
+				}
+				this.hasOnly1EmptySuggestion= hasOnly1Temp;
+			} else {
+				throw new AssertionError("At least the empty completion must be available in the iterator!"); //$NON-NLS-1$
+			}
+		}
+
+		/**
+		 * Advances the completion state to represent the next completion (starts cycling when it
+		 * gets to the end).
+		 * 
+		 * @return The next suggestion to be shown to the user.
+		 * @since 3.6
+		 */
+		public String next() {
+			String ret= null;
+			if (this.consumedSuggestions.size() > nextSuggestion) {
+				//We already consumed one that we didn't return
+				ret= (String)this.consumedSuggestions.get(nextSuggestion);
+				nextSuggestion++;
+
+			}
+
+			while (ret == null &&
+					this.consumedSuggestions.size() == nextSuggestion &&
+					this.suggestions.hasNext()) {
+				//we're just in the place to get a new one from the iterator
+				String temp= (String)this.suggestions.next();
+				if (this.alreadyFound.contains(temp)) {
+					continue;//go to next iteration
+				}
+				addNewToken(temp);
+				ret= temp;
+				nextSuggestion++;
+
+			}
+
+			if (ret == null) {
+				//we consumed all in the iterator, so, just start cycling.
+				ret= (String)this.consumedSuggestions.get(0);
+				nextSuggestion= 1; //we just got the 0, so, we can already skip to 1.
+			}
+
+
+			length= ret.length();
+			return ret;
 		}
 
 		/**
-		 * Advances the completion state to represent the next completion.
+		 * Adds a new suggestion to the found and consumed suggestions
+		 * 
+		 * @param suggestion the suggestion to be added
+		 * @since 3.6
 		 */
-		public void advance() {
-			length= suggestions[nextSuggestion].length();
-			nextSuggestion= (nextSuggestion + 1) % suggestions.length;
+		private void addNewToken(String suggestion) {
+			this.alreadyFound.add(suggestion);
+			this.consumedSuggestions.add(suggestion);
 		}
 	}
 
@@ -155,7 +241,7 @@ final class HippieCompleteAction extends TextEditorAction {
 	 */
 	private void completeNext() {
 		try {
-			fDocument.replace(fLastCompletion.startOffset, fLastCompletion.length, fLastCompletion.suggestions[fLastCompletion.nextSuggestion]);
+			fDocument.replace(fLastCompletion.startOffset, fLastCompletion.length, fLastCompletion.next()); //next() will already advance
 		} catch (BadLocationException e) {
 			// we should never get here. different from other places to notify the user.
 			log(e);
@@ -163,9 +249,6 @@ final class HippieCompleteAction extends TextEditorAction {
 			return;
 		}
 
-		// advance the suggestion state
-		fLastCompletion.advance();
-
 		// move the caret to the insertion point
 		ISourceViewer sourceViewer= ((AbstractTextEditor) getTextEditor()).getSourceViewer();
 		sourceViewer.setSelectedRange(fLastCompletion.startOffset + fLastCompletion.length, 0);
@@ -175,24 +258,6 @@ final class HippieCompleteAction extends TextEditorAction {
 	}
 
 	/**
-	 * Return the list of suggestions from the current document. First the
-	 * document is searched backwards from the caret position and then forwards.
-	 *
-	 * @param prefix the completion prefix
-	 * @return all possible completions that were found in the current document
-	 * @throws BadLocationException if accessing the document fails
-	 */
-	private ArrayList createSuggestionsFromOpenDocument(String prefix) throws BadLocationException {
-		int selectionOffset= getSelectionOffset();
-
-		ArrayList completions= new ArrayList();
-		completions.addAll(fEngine.getCompletionsBackwards(fDocument, prefix, selectionOffset));
-		completions.addAll(fEngine.getCompletionsForward(fDocument, prefix, selectionOffset - prefix.length(), true));
-
-		return completions;
-	}
-
-	/**
 	 * Returns the document currently displayed in the editor, or
 	 * <code>null</code>
 	 *
@@ -237,42 +302,6 @@ final class HippieCompleteAction extends TextEditorAction {
 	}
 
 	/**
-	 * Create the array of suggestions. It scans all open text editors and
-	 * prefers suggestions from the currently open editor. It also adds the
-	 * empty suggestion at the end.
-	 *
-	 * @param prefix the prefix to search for
-	 * @return the list of all possible suggestions in the currently open
-	 *         editors
-	 * @throws BadLocationException if accessing the current document fails
-	 */
-	private String[] getSuggestions(String prefix) throws BadLocationException {
-
-		ArrayList suggestions= createSuggestionsFromOpenDocument(prefix);
-
-		IWorkbenchWindow window= getTextEditor().getSite().getWorkbenchWindow();
-		IEditorReference editorsArray[]= window.getActivePage().getEditorReferences();
-
-		for (int i= 0; i < editorsArray.length; i++) {
-			IEditorPart realEditor= editorsArray[i].getEditor(false);
-			if (realEditor instanceof ITextEditor &&
-					!realEditor.equals(getTextEditor())) { // realEditor != null
-				ITextEditor textEditor= (ITextEditor)realEditor;
-				IEditorInput input= textEditor.getEditorInput();
-				IDocument doc= textEditor.getDocumentProvider().getDocument(input);
-
-				suggestions.addAll(fEngine.getCompletionsForward(doc, prefix, 0, false));
-			}
-		}
-		// add the empty suggestion
-		suggestions.add(""); //$NON-NLS-1$
-
-		List uniqueSuggestions= fEngine.makeUnique(suggestions);
-
-		return (String[]) uniqueSuggestions.toArray(new String[0]);
-	}
-
-	/**
 	 * Returns <code>true</code> if the current completion state is still
 	 * valid given the current document and selection.
 	 *
@@ -335,34 +364,39 @@ final class HippieCompleteAction extends TextEditorAction {
 
 		clearState();
 
-		IDocument document= getCurrentDocument();
-		if (document != null) {
-			fDocument= document;
+		List documents= HippieCompletionEngine.computeDocuments(getTextEditor());
+
+		if (documents.size() > 0) {
+			fDocument= (IDocument)documents.remove(0);
 
-			String[] suggestions;
+			Iterator suggestions;
 			try {
 				String prefix= getCurrentPrefix();
 				if (prefix == null) {
 					notifyUser();
 					return;
 				}
-				suggestions= getSuggestions(prefix);
+				suggestions= fEngine.getMultipleDocumentsIterator(
+						fDocument, documents, prefix, getSelectionOffset());
 			} catch (BadLocationException e) {
 				log(e);
 				return;
 			}
 
+			CompletionState completionState= new CompletionState(
+					suggestions, getSelectionOffset());
+
 			// if it is single empty suggestion
-			if (suggestions.length == 1) {
+			if (completionState.hasOnly1EmptySuggestion) {
 				notifyUser();
 				return;
 			}
 
-			IRewriteTarget target= (IRewriteTarget) getTextEditor().getAdapter(IRewriteTarget.class);
+			IRewriteTarget target= (IRewriteTarget)getTextEditor().getAdapter(IRewriteTarget.class);
 			if (target != null)
 				target.beginCompoundChange();
 
-			fLastCompletion= new CompletionState(suggestions, getSelectionOffset());
+			fLastCompletion= completionState;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
index 6ff73d2..b7dd0a9 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -157,12 +157,12 @@ public interface ITextEditor extends IEditorPart {
 
 	/**
 	 * Sets the highlighted range of this text editor to the specified region.
-	 *
+	 * 
 	 * @param offset the offset of the highlighted range
 	 * @param length the length of the highlighted range
-	 * @param moveCursor <code>true</code> if the cursor should be moved to
-	 *   the start of the highlighted range, and <code>false</code> to leave
-	 *   the cursor unaffected
+	 * @param moveCursor <code>true</code> if the cursor should be moved to the start of the
+	 *            highlighted range, and <code>false</code> to leave the cursor unaffected - has no
+	 *            effect if the range to highlight is already the highlighted one
 	 * @see #getHighlightRange()
 	 */
 	void setHighlightRange(int offset, int length, boolean moveCursor);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
index 61ddac3..b366277 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -672,4 +672,20 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
 	 * @since 3.5
 	 */
 	String BLOCK_SELECTION_MODE= "BlockSelectionMode"; //$NON-NLS-1$
+
+	/**
+	 * Name of the action displaying a sticky ruler hover for the current caret location.
+	 *
+	 * Value: <code>"ShowChangeRulerInformation"</code>
+	 * @since 3.6
+	 */
+	public static final String SHOW_CHANGE_RULER_INFORMATION= "ShowChangeRulerInformation"; //$NON-NLS-1$
+
+	/**
+	 * Name of the action displaying a sticky ruler annotation hover for the current caret location.
+	 * 
+	 * Value: <code>"ShowRulerAnnotationInformation"</code>
+	 * @since 3.6
+	 */
+	public static final String SHOW_RULER_ANNOTATION_INFORMATION= "ShowRulerAnnotationInformation"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
index 07ee3bd..e25d1f3 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -577,4 +577,20 @@ public interface ITextEditorActionDefinitionIds extends IWorkbenchActionDefiniti
 	 * @since 3.5
 	 */
 	String BLOCK_SELECTION_MODE= "org.eclipse.ui.edit.text.toggleBlockSelectionMode"; //$NON-NLS-1$
+
+	/**
+	 * Command ID of the command to display a sticky ruler hover for the current caret location.
+	 * Value <code>"org.eclipse.ui.edit.text.showChangeRulerInformation"</code>.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String SHOW_CHANGE_RULER_INFORMATION_ID= "org.eclipse.ui.edit.text.showChangeRulerInformation"; //$NON-NLS-1$
+
+	/**
+	 * Command ID of the command to display a sticky ruler annotation hover for the current caret
+	 * location. Value <code>"org.eclipse.ui.edit.text.showRulerAnnotationInformation"</code>.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String SHOW_RULER_ANNOTATION_INFORMATION_ID= "org.eclipse.ui.edit.text.showRulerAnnotationInformation"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
index 4106605..75f3a2d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@ import org.eclipse.core.commands.NotHandledException;
 import org.eclipse.core.runtime.Assert;
 
 import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.util.Util;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
@@ -45,6 +46,7 @@ import org.eclipse.jface.text.ITextListener;
 import org.eclipse.jface.text.ITextSelection;
 import org.eclipse.jface.text.ITextViewer;
 import org.eclipse.jface.text.ITextViewerExtension;
+import org.eclipse.jface.text.ITextViewerExtension5;
 import org.eclipse.jface.text.TextEvent;
 
 import org.eclipse.ui.PlatformUI;
@@ -301,8 +303,14 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
 		install();
 
 		// Set the mark
-		if (fTextViewer instanceof ITextViewerExtension)
-			((ITextViewerExtension) fTextViewer).setMark(fCurrentIndex);
+		if (fTextViewer instanceof ITextViewerExtension) {
+			int modelOffset;
+			if (fTextViewer instanceof ITextViewerExtension5)
+				modelOffset= fCurrentIndex == -1 ? -1 : ((ITextViewerExtension5)fTextViewer).widgetOffset2ModelOffset(fCurrentIndex);
+			else
+				modelOffset= fCurrentIndex;
+			((ITextViewerExtension)fTextViewer).setMark(modelOffset);
+		}
 
 		updateStatus();
 
@@ -493,7 +501,11 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
 				break;
 
 			default:
-				if (event.stateMask == 0 || event.stateMask == SWT.SHIFT || event.stateMask == (SWT.ALT | SWT.CTRL)) { // SWT.ALT | SWT.CTRL covers AltGr (see bug 43049)
+				int stateMask= event.stateMask;
+				if (stateMask == 0
+						|| stateMask == SWT.SHIFT
+						|| !Util.isMac() && stateMask == (SWT.ALT | SWT.CTRL) // AltGr (see bug 43049)
+						|| Util.isMac() && (stateMask == (SWT.ALT | SWT.SHIFT) || stateMask == SWT.ALT) ) { // special chars on Mac (bug 272994)
 					saveState();
 					addCharSearch(event.character);
 					event.doit= false;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/KeyBindingSupportForAssistant.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/KeyBindingSupportForAssistant.java
index d7cb8f0..c79c27c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/KeyBindingSupportForAssistant.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/KeyBindingSupportForAssistant.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -62,8 +62,14 @@ public final class KeyBindingSupportForAssistant implements ICompletionListener
 		}
 
 		void activate() {
-			if (handler != null)
-				command.setHandler(handler);
+			if (handler != null) {
+				/*
+				 *  Next check ensures that we don't overwrite newly activated editor contributions.
+				 *  For details see https://bugs.eclipse.org/bugs/show_bug.cgi?id=297834.
+				 */
+				if (!handler.getClass().isInstance(command.getHandler()))
+					command.setHandler(handler);
+			}
 		}
 
 		private void replaceWith(IHandler newHandler) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
index 66eecdb..d386c05 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -812,7 +812,7 @@ public class SourceViewerDecorationSupport {
 		/*
 		 * XXX:
 		 * Could provide an extension point for drawing strategies,
-		 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=51498
+		 * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=51498
 		 */
 		painter.addDrawingStrategy(AnnotationPreference.STYLE_NONE, fgNullStrategy);
 		painter.addDrawingStrategy(AnnotationPreference.STYLE_IBEAM, fgIBeamStrategy);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusLineContributionItem.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusLineContributionItem.java
index b09480e..8753891 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusLineContributionItem.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusLineContributionItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.swt.widgets.Label;
 
 import org.eclipse.jface.action.ContributionItem;
 import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.action.StatusLineLayoutData;
 import org.eclipse.jface.resource.JFaceColors;
 
@@ -261,24 +262,26 @@ public class StatusLineContributionItem extends ContributionItem implements ISta
 		if (fLabel != null && !fLabel.isDisposed()) {
 			Display display= fLabel.getDisplay();
 			if ((fErrorText != null && fErrorText.length() > 0) || fErrorImage != null) {
+				String escapedErrorText= escape(fErrorText);
 				fLabel.setForeground(JFaceColors.getErrorText(display));
-				fLabel.setText(escape(fErrorText));
+				fLabel.setText(escapedErrorText);
 				fLabel.setImage(fErrorImage);
 				if (fToolTipText != null)
 					fLabel.setToolTipText(escape(fToolTipText));
 				else if (fErrorText.length() > fWidthInChars)
-					fLabel.setToolTipText(escape(fErrorText));
+					fLabel.setToolTipText(escapedErrorText);
 				else
 					fLabel.setToolTipText(null);
-			}
-			else {
+				
+			} else {
+				String escapedText= escape(fText);
 				fLabel.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
-				fLabel.setText(escape(fText));
+				fLabel.setText(escapedText);
 				fLabel.setImage(fImage);
 				if (fToolTipText != null)
 					fLabel.setToolTipText(escape(fToolTipText));
 				else if (fText != null && fText.length() > fWidthInChars)
-					fLabel.setToolTipText(escape(fText));
+					fLabel.setToolTipText(escapedText);
 				else
 					fLabel.setToolTipText(null);
 			}
@@ -288,14 +291,14 @@ public class StatusLineContributionItem extends ContributionItem implements ISta
 	/**
 	 * Escapes '&' with '&' in the given text.
 	 *
-	 * @param text the text to escape
-	 * @return the escaped string
+	 * @param text the text to escape, can be <code>null</code>
+	 * @return the escaped string or <code>null</code> if text was <code>null</code>
 	 * @since 3.4
 	 */
 	private String escape(String text) {
-		if (text == null || text.indexOf('&') == -1)
+		if (text == null)
 			return text;
-		return text.replaceAll("&", "&&"); //$NON-NLS-1$//$NON-NLS-2$
+		return LegacyActionTools.escapeMnemonics(text);
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
index 44ebe69..d26d289 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/StatusTextEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -88,6 +88,20 @@ public class StatusTextEditor extends AbstractTextEditor {
 			updateStatusFields();
 		}
 	}
+	
+	/*
+	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#setFocus()
+	 * @since 3.6
+	 */
+	public void setFocus() {
+		if (fStatusControl != null && !fStatusControl.isDisposed()) {
+			/* even if the control does not really take focus, we still have to set it
+			 * to fulfill the contract and to make e.g. Ctrl+PageUp/Down work. */
+			fStatusControl.setFocus();
+		} else {
+			super.setFocus();
+		}
+	}
 
 	/*
 	 * @see org.eclipse.ui.texteditor.AbstractTextEditor#validateEditorInputState()
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextViewerDeleteLineTarget.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextViewerDeleteLineTarget.java
index 7afe682..d6ce61a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextViewerDeleteLineTarget.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextViewerDeleteLineTarget.java
@@ -379,7 +379,7 @@ public class TextViewerDeleteLineTarget implements IDeleteLineTarget {
 			}
 
 			fClipboard.setDeleting(true);
-			document.replace(deleteOffset, deleteLength, null);
+			document.replace(deleteOffset, deleteLength, ""); //$NON-NLS-1$
 			fClipboard.setDeleting(false);
 
 			fClipboard.saveState();
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/spelling/SpellingCorrectionProcessor.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/spelling/SpellingCorrectionProcessor.java
index 70946c0..1bf8c71 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/spelling/SpellingCorrectionProcessor.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/spelling/SpellingCorrectionProcessor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -46,7 +46,7 @@ public final class SpellingCorrectionProcessor implements IQuickAssistProcessor
 		ISourceViewer viewer= quickAssistContext.getSourceViewer();
 		int documentOffset= quickAssistContext.getOffset();
 
-		int length= viewer != null ? viewer.getSelectedRange().y : 0;
+		int length= viewer != null ? viewer.getSelectedRange().y : -1;
 		TextInvocationContext context= new TextInvocationContext(viewer, documentOffset, length);
 
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
index 3f9efb0..571ec97 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/AbstractTemplatesPage.java
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Dakshinamurthy Karra (Jalian Systems) - Templates View - https://bugs.eclipse.org/bugs/show_bug.cgi?id=69581
+ *     Piotr Maj <pm at jcake.com> - no access to template store and current selection - https://bugs.eclipse.org/bugs/show_bug.cgi?id=296439
  *******************************************************************************/
 package org.eclipse.ui.texteditor.templates;
 
@@ -125,7 +126,7 @@ import org.eclipse.ui.texteditor.templates.TemplatePreferencePage.EditTemplateDi
  *
  * @since 3.4
  */
-public abstract class AbstractTemplatesPage extends Page implements ITemplatesPage {
+public abstract class AbstractTemplatesPage extends Page implements ITemplatesPage, ITemplatesPageExtension {
 
 	/**
 	 * Sashform size
@@ -685,10 +686,11 @@ public abstract class AbstractTemplatesPage extends Page implements ITemplatesPa
 
 	/**
 	 * Returns the template store used in this page.
-	 *
+	 * 
 	 * @return the template store
+	 * @since 3.6 public, before it was protected
 	 */
-	abstract protected TemplateStore getTemplateStore();
+	abstract public TemplateStore getTemplateStore();
 
 	/**
 	 * Returns the preference store used to create the template store returned by
@@ -1230,10 +1232,11 @@ public abstract class AbstractTemplatesPage extends Page implements ITemplatesPa
 
 	/**
 	 * Returns the currently selected templates
-	 *
+	 * 
 	 * @return selected templates
+	 * @since 3.6 public, before it was private
 	 */
-	private TemplatePersistenceData[] getSelectedTemplates() {
+	public TemplatePersistenceData[] getSelectedTemplates() {
 		return fSelectedTemplates;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
index 0b5b32c..506c878 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ColumnLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ final class ColumnLayout extends Layout {
 	 * <p>
 	 * XXX: Should either switch to use
 	 * {@link org.eclipse.jface.layout.TableColumnLayout} or get API from JFace
-	 * or SWT, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=218483
+	 * or SWT, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=218483
 	 * </p>
 	 *
 	 * @since 3.1
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPage.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPage.java
index d9e784a..bc8df35 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPage.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 Dakshinamurthy Karra, IBM Corporation and others.
+ * Copyright (c) 2007, 2009 Dakshinamurthy Karra, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,21 @@ import org.eclipse.ui.part.IPageBookViewPage;
 
 
 /**
- * Interface for a templates page. This interface defines the minimum requirement
- * for a page within the {@link TemplatesView}.
+ * Interface for a templates page. This interface defines the minimum requirement for a page within
+ * the {@link TemplatesView}.
  * <p>
- * Clients can either implement this interface directly or subclass the {@link AbstractTemplatesPage}.
- *
+ * In order to provided backward compatibility for clients of <code>ITemplatesPage</code>, extension
+ * interfaces are used to provide a means of evolution. The following extension interfaces exist:
+ * <ul>
+ * <li>{@link org.eclipse.ui.texteditor.templates.ITemplatesPageExtension} since version 3.6
+ * introducing access to the currently selected items and the template store of the page.</li>
+ * </ul>
+ * </p>
+ * <p>
+ * Clients can either implement this interface directly or subclass the
+ * {@link AbstractTemplatesPage}.
+ * 
+ * @see org.eclipse.ui.texteditor.templates.ITemplatesPageExtension
  * @see TemplatesView
  * @since 3.4
  */
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPageExtension.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPageExtension.java
new file mode 100644
index 0000000..9b5b0c3
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/ITemplatesPageExtension.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Piotr Maj <pm at jcake.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.texteditor.templates;
+
+import org.eclipse.jface.text.templates.persistence.TemplatePersistenceData;
+import org.eclipse.jface.text.templates.persistence.TemplateStore;
+
+
+/**
+ * Extension interface for {@link org.eclipse.ui.texteditor.templates.ITemplatesPage}.
+ * Adds the following functions:
+ * <ul>
+ * 	<li>access to currently selected items on page</li>
+ *  <li>access to template store which drives this page</li>
+ * </ul>
+ * <p>
+ * 	This interface may be implemented by clients.
+ * </p>
+ * @since 3.6
+ */
+public interface ITemplatesPageExtension {
+
+	/**
+	 * Returns template store associated with this page.
+	 * 
+	 * @return template store
+	 */
+	TemplateStore getTemplateStore();
+
+	/**
+	 * Returns currently selected templates.
+	 *
+	 * @return an array with the currently selected templates
+	 */
+	TemplatePersistenceData[] getSelectedTemplates();
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
index 8bea4a3..fbb8900 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,9 @@ import org.eclipse.swt.widgets.Widget;
 
 import org.eclipse.core.expressions.Expression;
 
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.GroupMarker;
 import org.eclipse.jface.action.IAction;
@@ -645,15 +648,39 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 			boolean valid= fNameText == null || fNameText.getText().trim().length() != 0;
 			if (!valid) {
 				status = new StatusInfo();
-				if (!fSuppressError) {
+				if (!fSuppressError)
 					status.setError(TemplatesMessages.EditTemplateDialog_error_noname);
-				}
+			} else if (!isValidPattern(fPatternEditor.getDocument().get())) {
+				status = new StatusInfo();
+				if (!fSuppressError)
+					status.setError(TemplatesMessages.EditTemplateDialog_error_invalidPattern);
 	 		} else {
 	 			status= fValidationStatus;
 	 		}
 			updateStatus(status);
 		}
 
+		/**
+		 * Validates the pattern.
+		 * <p>
+		 * The default implementation rejects invalid XML characters.
+		 * </p>
+		 * <p>
+		 * XXX: Make protected in 3.7
+		 * 
+		 * @param pattern the pattern to verify
+		 * @return <code>true</code> if the pattern is valid
+		 * @since 3.6
+		 */
+		private boolean isValidPattern(String pattern) {
+			for (int i= 0; i < pattern.length(); i++) {
+				char ch= pattern.charAt(i);
+				if (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))
+					return false;
+			}
+			return true;
+		}
+
 		/*
 		 * @since 3.1
 		 */
@@ -1083,7 +1110,9 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 		viewer.setEditable(false);
 		Cursor arrowCursor= viewer.getTextWidget().getDisplay().getSystemCursor(SWT.CURSOR_ARROW);
 		viewer.getTextWidget().setCursor(arrowCursor);
-		viewer.getTextWidget().setCaret(null);
+
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263
+//		viewer.getTextWidget().setCaret(null);
 
 		Control control= viewer.getControl();
 		data= new GridData(GridData.FILL_BOTH);
@@ -1287,9 +1316,9 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 			fTableViewer.setCheckedElements(getEnabledTemplates());
 
 		} catch (FileNotFoundException e) {
-			openReadErrorDialog();
+			openReadErrorDialog(e);
 		} catch (IOException e) {
-			openReadErrorDialog();
+			openReadErrorDialog(e);
 		}
 	}
 
@@ -1337,7 +1366,7 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 				TemplateReaderWriter writer= new TemplateReaderWriter();
 				writer.save(templates, output);
 			} catch (IOException e) {
-				openWriteErrorDialog();
+				openWriteErrorDialog(e);
 			} finally {
 				if (output != null) {
 					try {
@@ -1427,7 +1456,7 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 		try {
 			fTemplateStore.save();
 		} catch (IOException e) {
-			openWriteErrorDialog();
+			openWriteErrorDialog(e);
 		}
 
 		return super.performOk();
@@ -1449,7 +1478,7 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 		try {
 			fTemplateStore.load();
 		} catch (IOException e) {
-			openReadErrorDialog();
+			openReadErrorDialog(e);
 			return false;
 		}
 		return super.performCancel();
@@ -1458,7 +1487,9 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 	/*
 	 * @since 3.2
 	 */
-	private void openReadErrorDialog() {
+	private void openReadErrorDialog(IOException ex) {
+		IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to read templates.", ex); //$NON-NLS-1$
+		TextEditorPlugin.getDefault().getLog().log(status);
 		String title= TemplatesMessages.TemplatePreferencePage_error_read_title;
 		String message= TemplatesMessages.TemplatePreferencePage_error_read_message;
 		MessageDialog.openError(getShell(), title, message);
@@ -1467,7 +1498,9 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
 	/*
 	 * @since 3.2
 	 */
-	private void openWriteErrorDialog() {
+	private void openWriteErrorDialog(IOException ex) {
+		IStatus status= new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, "Failed to write templates.", ex); //$NON-NLS-1$
+		TextEditorPlugin.getDefault().getLog().log(status);
 		String title= TemplatesMessages.TemplatePreferencePage_error_write_title;
 		String message= TemplatesMessages.TemplatePreferencePage_error_write_message;
 		MessageDialog.openError(getShell(), title, message);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.java
index fd2fc60..ed80bff 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,8 +27,6 @@ final class TemplatesMessages extends NLS {
 		// Do not instantiate
 	}
 
-	public static String TemplatePreferencePage_error_import;
-	public static String TemplatePreferencePage_error_export;
 	public static String TemplatePreferencePage_error_read_title;
 	public static String TemplatePreferencePage_error_write_title;
 	public static String TemplatePreferencePage_message;
@@ -38,6 +36,7 @@ final class TemplatesMessages extends NLS {
 	public static String TemplatePreferencePage_import;
 	public static String TemplatePreferencePage_export;
 	public static String TemplatePreferencePage_remove;
+
 	public static String TemplatePreferencePage_editor;
 	public static String TemplatePreferencePage_revert;
 	public static String TemplatePreferencePage_restore;
@@ -65,6 +64,7 @@ final class TemplatesMessages extends NLS {
 	public static String TemplatePreferencePage_preview;
 	public static String EditTemplateDialog_error_noname;
 	public static String EditTemplateDialog_error_adjacent_variables;
+	public static String EditTemplateDialog_error_invalidPattern;
 	public static String EditTemplateDialog_title_new;
 	public static String EditTemplateDialog_title_edit;
 	public static String EditTemplateDialog_name;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.properties b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.properties
index 25550c8..2c82d4e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.properties
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2008 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,10 +11,8 @@
 ###############################################################################
 
 # preference page
-TemplatePreferencePage_error_import=Failed to import templates.
-TemplatePreferencePage_error_export=Failed to export templates.
 TemplatePreferencePage_error_read_title=Reading Templates
-TemplatePreferencePage_error_write_title=Reading Templates
+TemplatePreferencePage_error_write_title=Writing Templates
 TemplatePreferencePage_message=&Create, edit or remove templates:
 TemplatePreferencePage_title=Templates
 
@@ -37,24 +35,24 @@ TemplatePreferencePage_on=on
 
 TemplatePreferencePage_use_code_formatter=Use code &formatter
 
-TemplatePreferencePage_import_title=Importing Templates
+TemplatePreferencePage_import_title=Import Templates
 TemplatePreferencePage_import_extension=*.xml
 
 TemplatePreferencePage_export_title=Export Templates
 TemplatePreferencePage_export_filename=templates.xml
 TemplatePreferencePage_export_extension=*.xml
 
-TemplatePreferencePage_export_exists_title= Exporting Templates
+TemplatePreferencePage_export_exists_title= Export Templates
 TemplatePreferencePage_export_exists_message= {0} already exists.\nDo you want to replace it?
 
-TemplatePreferencePage_export_error_title= Exporting Templates
+TemplatePreferencePage_export_error_title= Export Templates
 TemplatePreferencePage_export_error_hidden= Export failed.\n{0} is a hidden file.
 TemplatePreferencePage_export_error_canNotWrite= Export failed.\n{0} cannot be modified.
 TemplatePreferencePage_export_error_fileNotFound= Export failed:\n{0}
 
 TemplatePreferencePage_error_parse_message= Failed to parse templates:\n{0}
-TemplatePreferencePage_error_read_message= Failed to read templates.
-TemplatePreferencePage_error_write_message= Failed to write templates.
+TemplatePreferencePage_error_read_message= Failed to read templates. See the error log for details.
+TemplatePreferencePage_error_write_message= Failed to write templates. See the error log for details.
 
 TemplatePreferencePage_question_create_new_title= Edit Template
 TemplatePreferencePage_question_create_new_message= The name of the template has been changed. Click 'Yes' to create an additional template with the new name or 'No' to rename the existing one.
@@ -64,6 +62,7 @@ TemplatePreferencePage_preview=Previe&w:
 # edit template dialog
 EditTemplateDialog_error_noname=Template name cannot be empty.
 EditTemplateDialog_error_adjacent_variables=Template pattern has adjacent variables.
+EditTemplateDialog_error_invalidPattern=Template pattern contains invalid characters.
 EditTemplateDialog_title_new=New Template
 EditTemplateDialog_title_edit=Edit Template
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
index 622be25..231cb80 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
+++ b/eclipse/plugins/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 Dakshinamurthy Karra, IBM Corporation and others.
+ * Copyright (c) 2007, 2009 Dakshinamurthy Karra, IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     Dakshinamurthy Karra (Jalian Systems) - Templates View - https://bugs.eclipse.org/bugs/show_bug.cgi?id=69581
+ *     Piotr Maj <pm at jcake.com> - no access to template store and current selection - https://bugs.eclipse.org/bugs/show_bug.cgi?id=296439
  *******************************************************************************/
 package org.eclipse.ui.texteditor.templates;
 
@@ -15,6 +16,9 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.Platform;
 
+import org.eclipse.jface.text.templates.persistence.TemplatePersistenceData;
+import org.eclipse.jface.text.templates.persistence.TemplateStore;
+
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
@@ -171,4 +175,32 @@ public final class TemplatesView extends PageBookView {
 		partActivated(part);
 	}
 
-}
+	/**
+	 * Returns the template store of the current page.
+	 * 
+	 * @return the template store, or <code>null</code> if the current page does not provide that
+	 *         information
+	 * @since 3.6
+	 */
+	public TemplateStore getTemplateStore() {
+		IPage currentPage= getCurrentPage();
+		if (currentPage instanceof ITemplatesPageExtension)
+			return ((ITemplatesPageExtension)currentPage).getTemplateStore();
+		return null;
+	}
+
+	/**
+	 * Returns the currently selected templates.
+	 * 
+	 * @return array of selected templates, or <code>null</code> if the current page does not
+	 *         provide that information
+	 * @since 3.6
+	 */
+	public TemplatePersistenceData[] getSelectedTemplates() {
+		IPage currentPage= getCurrentPage();
+		if (currentPage instanceof ITemplatesPageExtension)
+			return ((ITemplatesPageExtension)currentPage).getSelectedTemplates();
+		return null;
+	}
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/.settings/.api_filters b/eclipse/plugins/org.eclipse.ui.workbench/.settings/.api_filters
deleted file mode 100644
index eb22b66..0000000
--- a/eclipse/plugins/org.eclipse.ui.workbench/.settings/.api_filters
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component id="org.eclipse.ui.workbench" version="2">
-    <resource path="Eclipse UI/org/eclipse/ui/services/IEvaluationReference.java" type="org.eclipse.ui.services.IEvaluationReference">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.services.IEvaluationReference"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java" type="org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager">
-        <filter id="336744520">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java" type="org.eclipse.ui.part.MultiPageEditorPart">
-        <filter id="420630660">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.part.MultiPageEditorPart"/>
-                <message_argument value="getActivePage()"/>
-            </message_arguments>
-        </filter>
-        <filter id="421679236">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.part.MultiPageEditorPart"/>
-                <message_argument value="getActiveEditor()"/>
-            </message_arguments>
-        </filter>
-        <filter id="421679236">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.part.MultiPageEditorPart"/>
-                <message_argument value="getActivePage()"/>
-            </message_arguments>
-        </filter>
-        <filter id="420630660">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.part.MultiPageEditorPart"/>
-                <message_argument value="getActiveEditor()"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/branding/IBundleGroupConstants.java" type="org.eclipse.ui.branding.IBundleGroupConstants">
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.branding.IBundleGroupConstants"/>
-                <message_argument value="BRANDING_BUNDLE_ID"/>
-            </message_arguments>
-        </filter>
-        <filter id="403767336">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.branding.IBundleGroupConstants"/>
-                <message_argument value="BRANDING_BUNDLE_VERSION"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/menus/CommandContributionItemParameter.java" type="org.eclipse.ui.menus.CommandContributionItemParameter">
-        <filter id="338948223">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.menus.CommandContributionItemParameter"/>
-                <message_argument value="CommandContributionItemParameter(IServiceLocator, String, String, Map, ImageDescriptor, ImageDescriptor, ImageDescriptor, String, String, String, int, String, boolean)"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="Eclipse UI/org/eclipse/ui/services/IServiceScopes.java" type="org.eclipse.ui.services.IServiceScopes">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.ui.services.IServiceScopes"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.core.prefs b/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.core.prefs
index 8c55119..eb168ca 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.core.prefs
+++ b/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.core.prefs
@@ -325,7 +325,7 @@ org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.lineSplit=100
 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs b/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
index f43046b..3732137 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
+++ b/eclipse/plugins/org.eclipse.ui.workbench/.settings/org.eclipse.jdt.ui.prefs
@@ -1,14 +1,18 @@
-#Wed Apr 01 08:33:52 EDT 2009
+#Tue Jun 16 11:12:09 EDT 2009
 eclipse.preferences.version=1
 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_profile=_Platform UI
 formatter_settings_version=11
 internal.default.compliance=user
 org.eclipse.jdt.ui.exception.name=e
 org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
 org.eclipse.jdt.ui.javadoc=true
 org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
 org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return Returns the ${bare_field_name}.\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} The ${bare_field_name} to set.\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) ${year} IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n *     IBM Corporation - initial API and implementation\n ******************************************************************************/\n</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @since 3.5\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template></templates>
 sp_cleanup.add_default_serial_version_id=true
 sp_cleanup.add_generated_serial_version_id=false
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionBarContributor.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionBarContributor.java
index ff56a3f..b245351 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionBarContributor.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorActionBarContributor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,26 +11,26 @@
 package org.eclipse.ui;
 
 /**
- * A editor action bar contributor defines the actions for
- * one or more editors.  
+ * A editor action bar contributor defines the actions for one or more editors.
  * <p>
  * Within the workbench there may be more than one open editor of a particular
- * type.  For instance, there may be 1 or more open Java Editors.  To avoid the 
- * creation of duplicate actions and action images the editor concept has been 
- * split into two.  An action contributor is responsable for the creation of 
- * actions.  The editor is responsible for action implementation.  Furthermore,
- * the contributor is shared by each open editor.  As a result of this design
+ * type. For instance, there may be 1 or more open Java Editors. To avoid the
+ * creation of duplicate actions and action images the editor concept has been
+ * split into two. An action contributor is responsible for the creation of
+ * actions. The editor is responsible for action implementation. Furthermore,
+ * the contributor is shared by each open editor. As a result of this design
  * there is only 1 set of actions for 1 or more open editors.
- * </p><p>
- * The relationship between editor and contributor is defined by
- * the <code>org.eclipse.ui.editors</code> extension point in the plugin registry.  
- * For each extension an editor class and a contributor class must be defined. 
- * </p><p>
- * This interface should not be implemented directly. An implementation of this 
- * interface has been created in <code>EditorActionBarContributor</code>.  
+ * </p>
+ * <p>
+ * The relationship between editor and contributor is defined by the
+ * <code>org.eclipse.ui.editors</code> extension point in the plugin registry.
+ * </p>
+ * <p>
+ * This interface should not be implemented directly. An implementation of this
+ * interface has been created in <code>EditorActionBarContributor</code>.
  * Implementors should subclass this and specialize as required.
  * </p>
- *
+ * 
  * @see IEditorActionBarContributor
  */
 public interface IEditorActionBarContributor {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorReference.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorReference.java
index 1bddc17..462538b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorReference.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IEditorReference.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,13 +12,13 @@
 package org.eclipse.ui;
 
 /**
- * Implements a reference to a editor.
- * The IEditorPart will not be instanciated until
- * the editor becomes visible or the API getEditor
- * is sent with true;
+ * Implements a reference to an editor. The IEditorPart will not be instantiated
+ * until the editor becomes visible or the API {@link #getEditor(boolean)} is
+ * called with true.
  * <p>
  * This interface is not intended to be implemented by clients.
  * </p>
+ * 
  * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface IEditorReference extends IWorkbenchPartReference {
@@ -29,11 +29,10 @@ public interface IEditorReference extends IWorkbenchPartReference {
      */
     public String getFactoryId();
 
-    /**
-     * Returns the editor input name. May return null is the
-     * name is not available or if the editor failed to be 
-     * restored.
-     */
+	/**
+	 * Returns the editor input's name. May return null if the name is not
+	 * available or if the editor failed to be restored.
+	 */
     public String getName();
 
     /**
@@ -44,9 +43,9 @@ public interface IEditorReference extends IWorkbenchPartReference {
      */
     public IEditorPart getEditor(boolean restore);
 
-    /**
-     * Returns true if the editor is pinned otherwise returns false.
-     */
+	/**
+	 * Returns true if the editor is pinned, otherwise returns false.
+	 */
     public boolean isPinned();
 
     /**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java
index d73d9cb..1f0f45f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IMemento.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,32 +11,34 @@
 package org.eclipse.ui;
 
 /**
- * Interface to a memento used for saving the important state of an object
- * in a form that can be persisted in the file system.
+ * Interface to a memento used for saving the important state of an object in a
+ * form that can be persisted in the file system.
  * <p>
  * Mementos were designed with the following requirements in mind:
  * <ol>
- *  <li>Certain objects need to be saved and restored across platform sessions.
- *    </li>
- *  <li>When an object is restored, an appropriate class for an object might not
- *    be available. It must be possible to skip an object in this case.</li>
- *  <li>When an object is restored, the appropriate class for the object may be
- *    different from the one when the object was originally saved. If so, the
- *    new class should still be able to read the old form of the data.</li>
+ * <li>Certain objects need to be saved and restored across platform sessions.</li>
+ * <li>When an object is restored, an appropriate class for an object might not
+ * be available. It must be possible to skip an object in this case.</li>
+ * <li>When an object is restored, the appropriate class for the object may be
+ * different from the one when the object was originally saved. If so, the new
+ * class should still be able to read the old form of the data.</li>
  * </ol>
  * </p>
  * <p>
- * Mementos meet these requirements by providing support for storing a
- * mapping of arbitrary string keys to primitive values, and by allowing
- * mementos to have other mementos as children (arranged into a tree).
- * A robust external storage format based on XML is used.
- * </p><p>
- * The key for an attribute may be any alpha numeric value.  However, the
- * value of <code>TAG_ID</code> is reserved for internal use.
- * </p><p>
+ * Mementos meet these requirements by providing support for storing a mapping
+ * of arbitrary string keys to primitive values, and by allowing mementos to
+ * have other mementos as children (arranged into a tree). A robust external
+ * storage format based on XML is used.
+ * </p>
+ * <p>
+ * The key for an attribute may be any alpha numeric value that doesn't start
+ * with a number. eg: [A-Za-z][A-Za-z0-9]* Using '.' is unsupported. However,
+ * the value of <code>TAG_ID</code> is reserved for internal use.
+ * </p>
+ * <p>
  * This interface is not intended to be implemented or extended by clients.
  * </p>
- *
+ * 
  * @see IPersistableElement
  * @see IElementFactory
  * @noimplement This interface is not intended to be implemented by clients.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageLayout.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageLayout.java
index 8de5a15..498c2c7 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageLayout.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IPageLayout.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -275,15 +275,25 @@ public interface IPageLayout {
     public void addPlaceholder(String viewId, int relationship, float ratio,
             String refId);
 
-    /**
-     * Adds an item to the Show In prompter.
-     * The id must name a view contributed to the workbench's view extension point 
-     * (named <code>"org.eclipse.ui.views"</code>).
-     *
-     * @param id the view id
-     * 
-     * @since 2.1
-     */
+	/**
+	 * Adds an item to the 'Show In' menu.
+	 * <p>
+	 * The id must name a view contributed to the workbench's view extension
+	 * point (named <code>"org.eclipse.ui.views"</code>).
+	 * </p>
+	 * <strong>NOTE:</strong> This method should not be used because it only
+	 * works the first time a perspective is created. On restart this
+	 * information gets lost. Instead add your items using the
+	 * 'org.eclipse.ui.perspectiveExtensions' extension point.
+	 * 
+	 * @param id
+	 *            the view id
+	 * @deprecated As of 3.6, replaced by the corresponding perspective
+	 *             extension in the 'org.eclipse.ui.perspectiveExtensions'
+	 *             extension point
+	 * 
+	 * @since 2.1
+	 */
     public void addShowInPart(String id);
 
     /**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISizeProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISizeProvider.java
index d16a0f7..3ba8bee 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISizeProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/ISizeProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ package org.eclipse.ui;
  * a preferred size
  * 
  * @since 3.1
- * @noimplement This interface is not intended to be implemented by clients.
  */
 public interface ISizeProvider {
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewSite.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewSite.java
index 9c89b50..b832416 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewSite.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IViewSite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,12 +28,14 @@ public interface IViewSite extends IWorkbenchPartSite {
      */
     public IActionBars getActionBars();
 
-    /**
-     * Returns the secondary id for this part site's part,
-     * or <code>null</code> if it has none.
-     * 
-     * @see IWorkbenchPage#showView(String, String, int)
-     * @since 3.0
-     */
+	/**
+	 * Returns the secondary id for this part site's part, or <code>null</code>
+	 * if it has none.
+	 * 
+	 * @return the secondary id for this part site's part or <code>null</code>
+	 *         if it has none
+	 * @see IWorkbenchPage#showView(String, String, int)
+	 * @since 3.0
+	 */
     public String getSecondaryId();
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java
index ecdda29..207ac77 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbench.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -626,4 +626,17 @@ public interface IWorkbench extends IAdaptable, IServiceLocator {
 	public boolean saveAll(IShellProvider shellProvider,
 			IRunnableContext runnableContext, ISaveableFilter filter,
 			boolean confirm);
+
+	/**
+	 * Return a shell provider that can be used to get the best parenting
+	 * possible for a modal dialog. If modal shells are already created, use the
+	 * topmost modal shell as the parent to avoid two modal dialogs. If there
+	 * are no modal shells, use the shell of the active workbench window.
+	 * 
+	 * @return a shell provider that provides the best parenting possible for a
+	 *         modal dialog.
+	 * 
+	 * @since 3.6
+	 */
+	public IShellProvider getModalDialogShellProvider();
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java
index 1134a62..1c3a5db 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchCommandConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009-2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,10 +28,18 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String FILE_NEW = "org.eclipse.ui.newWizard"; //$NON-NLS-1$
 
-    /**
-     * Id for command "Close" in category "File"
-     * (value is <code>"org.eclipse.ui.file.close"</code>).
-     */
+	/**
+	 * Id for parameter "New Wizard" in command "New" in category "File" (value
+	 * is <code>"newWizardId"</code>). Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String FILE_NEW_PARM_WIZARDID = "newWizardId"; //$NON-NLS-1$
+
+	/**
+	 * Id for command "Close" in category "File" (value is
+	 * <code>"org.eclipse.ui.file.close"</code>).
+	 */
     public static final String FILE_CLOSE = "org.eclipse.ui.file.close"; //$NON-NLS-1$
 
     /**
@@ -46,12 +54,28 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String FILE_IMPORT = "org.eclipse.ui.file.import"; //$NON-NLS-1$
 
-    /**
-     * Id for command "Export" in category "File"
-     * (value is <code>"org.eclipse.ui.file.export"</code>).
-     */
+	/**
+	 * Id for parameter "Import Wizard" in command "Import" in category "File"
+	 * (value is <code>"importWizardId"</code>). Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String FILE_IMPORT_PARM_WIZARDID = "importWizardId"; //$NON-NLS-1$
+
+	/**
+	 * Id for command "Export" in category "File" (value is
+	 * <code>"org.eclipse.ui.file.export"</code>).
+	 */
     public static final String FILE_EXPORT = "org.eclipse.ui.file.export"; //$NON-NLS-1$
 
+	/**
+	 * Id for parameter "Export Wizard" in command "Export" in category "File"
+	 * (value is <code>"exportWizardId"</code>). Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String FILE_EXPORT_PARM_WIZARDID = "exportWizardId"; //$NON-NLS-1$
+
     /**
      * Id for command "Save" in category "File"
      * (value is <code>"org.eclipse.ui.file.save"</code>).
@@ -272,16 +296,33 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String NAVIGATE_COLLAPSE_ALL = "org.eclipse.ui.navigate.collapseAll"; //$NON-NLS-1$
 
+	/**
+	 * Id for command "Expand All" in category "Navigate" (value is
+	 * <code>"org.eclipse.ui.navigate.expandAll"</code>).
+	 * 
+	 * @since 3.6
+	 */
+	public static final String NAVIGATE_EXPAND_ALL = "org.eclipse.ui.navigate.expandAll"; //$NON-NLS-1$
+
     /**
      * Id for command "Show In" in category "Navigate"
      * (value is <code>"org.eclipse.ui.navigate.showIn"</code>).
      */
     public static final String NAVIGATE_SHOW_IN = "org.eclipse.ui.navigate.showIn"; //$NON-NLS-1$
 
-    /**
-     * Id for command "Show In" in category "Navigate"
-     * (value is <code>"org.eclipse.ui.navigate.showInQuickMenu"</code>).
-     */
+	/**
+	 * Id for parameter "Target Id" in command "Show In" in category "Navigate"
+	 * (value is <code>"org.eclipse.ui.navigate.showIn.targetId"</code>).
+	 * Required.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String NAVIGATE_SHOW_IN_PARM_TARGET = "org.eclipse.ui.navigate.showIn.targetId"; //$NON-NLS-1$
+
+	/**
+	 * Id for command "Show In" in category "Navigate" (value is
+	 * <code>"org.eclipse.ui.navigate.showInQuickMenu"</code>).
+	 */
     public static final String NAVIGATE_SHOW_IN_QUICK_MENU = "org.eclipse.ui.navigate.showInQuickMenu"; //$NON-NLS-1$
 
     // project category
@@ -402,10 +443,20 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String WINDOW_CLOSE_PERSPECTIVE = "org.eclipse.ui.window.closePerspective"; //$NON-NLS-1$
 
-    /**
-     * Id for command "Close Part" in category "Window"
-     * (value is <code>"org.eclipse.ui.file.closePart"</code>).
-     */
+	/**
+	 * Id for parameter "Perspective Id" in command "Close Perspective" in
+	 * category "Window" (value is
+	 * <code>"org.eclipse.ui.window.closePerspective.perspectiveId"</code>).
+	 * Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String WINDOW_CLOSE_PERSPECTIVE_PARM_ID = "org.eclipse.ui.window.closePerspective.perspectiveId"; //$NON-NLS-1$
+
+	/**
+	 * Id for command "Close Part" in category "Window" (value is
+	 * <code>"org.eclipse.ui.file.closePart"</code>).
+	 */
     public static final String WINDOW_CLOSE_PART = "org.eclipse.ui.file.closePart"; //$NON-NLS-1$
 
     /**
@@ -426,10 +477,18 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String WINDOW_PREFERENCES = "org.eclipse.ui.window.preferences"; //$NON-NLS-1$
 
-    /**
-     * Id for command "Reset Perspective" in category "Window"
-     * (value is <code>"org.eclipse.ui.window.resetPerspective"</code>).
-     */
+	/**
+	 * Id for parameter "Preference Page Id" in command "Preferences" in
+	 * category "Window" (value is <code>"preferencePageId"</code>). Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String WINDOW_PREFERENCES_PARM_PAGEID = "preferencePageId"; //$NON-NLS-1$
+
+	/**
+	 * Id for command "Reset Perspective" in category "Window" (value is
+	 * <code>"org.eclipse.ui.window.resetPerspective"</code>).
+	 */
     public static final String WINDOW_RESET_PERSPECTIVE = "org.eclipse.ui.window.resetPerspective"; //$NON-NLS-1$
 
     /**
@@ -490,6 +549,23 @@ public interface IWorkbenchCommandConstants {
      */
     public static final String VIEWS_SHOW_VIEW = "org.eclipse.ui.views.showView"; //$NON-NLS-1$
 
+	/**
+	 * Id for parameter "View Id" in command "Show View" in category "Views"
+	 * (value is <code>"org.eclipse.ui.views.showView.viewId"</code>).
+	 * 
+	 * @since 3.6
+	 */
+	public static final String VIEWS_SHOW_VIEW_PARM_ID = "org.eclipse.ui.views.showView.viewId"; //$NON-NLS-1$
+
+	/**
+	 * Id for parameter "As Fastview" in command "Show View" in category "Views"
+	 * (value is <code>"org.eclipse.ui.views.showView.makeFast"</code>).
+	 * Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String VIEWS_SHOW_VIEW_PARM_FASTVIEW = "org.eclipse.ui.views.showView.makeFast"; //$NON-NLS-1$
+
     // Perspectives Category:
 
     /**
@@ -497,5 +573,25 @@ public interface IWorkbenchCommandConstants {
      * (value is <code>"org.eclipse.ui.perspectives.showPerspective"</code>).
      */
     public static final String PERSPECTIVES_SHOW_PERSPECTIVE = "org.eclipse.ui.perspectives.showPerspective"; //$NON-NLS-1$
-	
+
+	/**
+	 * Id for parameter "Perspective Id" in command "Show Perspective" in
+	 * category "Perspectives" (value is
+	 * <code>"org.eclipse.ui.perspectives.showPerspective.perspectiveId"</code>
+	 * ).
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID = "org.eclipse.ui.perspectives.showPerspective.perspectiveId"; //$NON-NLS-1$
+
+	/**
+	 * Id for parameter "In New Window" in command "Show Perspective" in
+	 * category "Perspectives" (value is
+	 * <code>"org.eclipse.ui.perspectives.showPerspective.newWindow"</code>).
+	 * Optional.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PERSPECTIVES_SHOW_PERSPECTIVE_PARM_NEWWINDOW = "org.eclipse.ui.perspectives.showPerspective.newWindow"; //$NON-NLS-1$
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPage.java
index 9c54cd0..e5f02a5 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPage.java	
@@ -28,7 +28,7 @@ import org.eclipse.ui.presentations.IStackPresentationSite;
  * The number of views and editors within a page is restricted to simplify part
  * management for the user. In particular:
  * <ul>
- * <li>Unless a view explicitly allows for multiple instances in its plugin
+ * <li>Unless a view explicitly allows for multiple instances in its plug-in
  * declaration there will be only one instance in a given workbench page.</li>
  * <li>Only one editor can exist for each editor input within a page.
  * <li>
@@ -420,7 +420,10 @@ public interface IWorkbenchPage extends IPartService, ISelectionService,
 	 * 
 	 * @return a list of open editors
 	 * 
-	 * @deprecated use #getEditorReferences() instead
+	 * @deprecated Clients are encouraged to use {@link #getEditorReferences()}
+	 *             instead. Calling this method has the side effect of restoring
+	 *             all the editors in the page which can cause plug-in
+	 *             activation.
 	 */
 	public IEditorPart[] getEditors();
 
@@ -487,7 +490,9 @@ public interface IWorkbenchPage extends IPartService, ISelectionService,
 	 * 
 	 * @return a list of visible views
 	 * 
-	 * @deprecated use #getViewReferences() instead.
+	 * @deprecated Clients are encouraged to use {@link #getViewReferences()}
+	 *             instead. Calling this method has the side effect of restoring
+	 *             all the views in the page which can cause plug-in activation.
 	 */
 	public IViewPart[] getViews();
 
@@ -818,10 +823,10 @@ public interface IWorkbenchPage extends IPartService, ISelectionService,
 	/**
 	 * Shows a view in this page with the given id and secondary id. The
 	 * behaviour of this method varies based on the supplied mode. If
-	 * <code>VIEW_ACTIVATE</code> is supplied, the view is focus. If
+	 * <code>VIEW_ACTIVATE</code> is supplied, the view is given focus. If
 	 * <code>VIEW_VISIBLE</code> is supplied, then it is made visible but not
-	 * given focus. Finally, if <code>VIEW_CREATE</code> is supplied the view
-	 * is created and will only be made visible if it is not created in a folder
+	 * given focus. Finally, if <code>VIEW_CREATE</code> is supplied the view is
+	 * created and will only be made visible if it is not created in a folder
 	 * that already contains visible views.
 	 * <p>
 	 * This allows multiple instances of a particular view to be created. They
@@ -833,8 +838,8 @@ public interface IWorkbenchPage extends IPartService, ISelectionService,
 	 * @param viewId
 	 *            the id of the view extension to use
 	 * @param secondaryId
-	 *            the secondary id to use, or <code>null</code> for no
-	 *            secondary id
+	 *            the secondary id to use, or <code>null</code> for no secondary
+	 *            id
 	 * @param mode
 	 *            the activation mode. Must be {@link #VIEW_ACTIVATE},
 	 *            {@link #VIEW_VISIBLE} or {@link #VIEW_CREATE}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java
index ff701b4..7d83fcc 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPart.java	
@@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Composite;
  *  <li>When a part becomes visible in the workbench:
  * 	  <ul> 
  *		<li>add part to presentation by calling 
- *        <code>part.createControl(parent)</code> to create actual widgets</li>
+ *        <code>part.createPartControl(parent)</code> to create actual widgets</li>
  *		<li>fire <code>partOpened</code> event to all listeners</li>
  *	  </ul>
  *   </li>
@@ -79,7 +79,7 @@ import org.eclipse.swt.widgets.Composite;
  * </p>
  * <p>
  * An important point to note about this lifecycle is that following 
- * a call to init, createControl may never be called. Thus in the dispose
+ * a call to init, createPartControl may never be called. Thus in the dispose
  * method, implementors must not assume controls were created.
  * </p>
  * <p>
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java
index c38ceb8..e0779b8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/IWorkbenchPreferenceConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -481,9 +481,8 @@ public interface IWorkbenchPreferenceConstants {
 	/**
 	 * Stores whether or not the workbench prompts for saving when a dirty
 	 * editor or view is closed, but the Saveable objects are still open in
-	 * other parts. If
-	 * <code>true<code> (default), the user will be prompted. If <code>false</code>, there will be
-	 * no prompt.
+	 * other parts. If <code>true</code> (default), the user will be prompted.
+	 * If <code>false</code>, there will be no prompt.
 	 * 
 	 * @see Saveable
 	 * @since 3.2
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java
index 284af9c..ad99331 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/XMLMemento.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,7 +8,6 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui;
 
 import java.io.IOException;
@@ -16,11 +15,9 @@ import java.io.PrintWriter;
 import java.io.Reader;
 import java.io.Writer;
 import java.util.ArrayList;
-
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
-
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.w3c.dom.Attr;
@@ -30,8 +27,11 @@ import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
+import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
 
 /**
  * This class represents the default implementation of the
@@ -91,6 +91,27 @@ public final class XMLMemento implements IMemento {
             if (baseDir != null) {
 				source.setSystemId(baseDir);
 			}
+
+			parser.setErrorHandler(new ErrorHandler() {
+				/**
+				 * @throws SAXException
+				 */
+				public void warning(SAXParseException exception) throws SAXException {
+					// ignore
+				}
+
+				/**
+				 * @throws SAXException
+				 */
+				public void error(SAXParseException exception) throws SAXException {
+					// ignore
+				}
+
+				public void fatalError(SAXParseException exception) throws SAXException {
+					throw exception;
+				}
+			});
+
             Document document = parser.parse(source);
             NodeList list = document.getChildNodes();
             for (int i = 0; i < list.getLength(); i++) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CompoundContributionItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CompoundContributionItem.java
index 227969d..b8cc8e0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CompoundContributionItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/CompoundContributionItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -91,16 +91,20 @@ public abstract class CompoundContributionItem extends ContributionItem {
     protected abstract IContributionItem[] getContributionItems();
     
     private IContributionItem[] getContributionItemsToFill() {
-        if (oldItems != null) {
+		disposeOldItems();
+		oldItems = getContributionItems();
+		return oldItems;
+	}
+
+	private void disposeOldItems() {
+		if (oldItems != null) {
             for (int i = 0; i < oldItems.length; i++) {
                 IContributionItem oldItem = oldItems[i];
                 oldItem.dispose();
             }
             oldItems = null;
         }
-        oldItems = getContributionItems();
-        return oldItems;
-    }
+	}
     
     /* (non-Javadoc)
      * @see org.eclipse.jface.action.ContributionItem#isDirty()
@@ -116,6 +120,15 @@ public abstract class CompoundContributionItem extends ContributionItem {
         return true;
     }
     
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#dispose()
+	 */
+	public void dispose() {
+		disposeOldItems();
+		super.dispose();
+	}
     
     /* (non-Javadoc)
      * @see org.eclipse.jface.action.ContributionItem#setParent(org.eclipse.jface.action.IContributionManager)
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java
index bea66b9..a77a9ad 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ContributionItemFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,6 +154,7 @@ public abstract class ContributionItemFactory {
 					WorkbenchPlugin.getDefault().getPreferenceStore()
 							.removePropertyChangeListener(perfs[0]);
 					window.getPartService().removePartListener(partListener);
+					super.dispose();
 				}
 			};
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java
index 37eb59b..761858f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -67,6 +67,12 @@ public class NewWizardAction extends Action implements
      */
     private String categoryId = null;
 
+	/**
+	 * The title of the wizard window or <code>null</code> to use the default
+	 * wizard window title.
+	 */
+	private String windowTitle = null;
+
     /**
      * The workbench window; or <code>null</code> if this
      * action has been <code>dispose</code>d.
@@ -128,6 +134,26 @@ public class NewWizardAction extends Action implements
         categoryId = id;
     }
 
+	/**
+	 * <p>
+	 * Sets the title of the wizard window
+	 * <p>
+	 * 
+	 * <p>
+	 * If the title of the wizard window is <code>null</code>, the default
+	 * wizard window title will be used.
+	 * </p>
+	 * 
+	 * @param windowTitle
+	 *            The title of the wizard window, otherwise <code>null</code>
+	 *            (default wizard window title).
+	 * 
+	 * @since 3.6
+	 */
+	public void setWizardWindowTitle(String windowTitle) {
+		this.windowTitle = windowTitle;
+	}
+
     /* (non-Javadoc)
      * Method declared on IAction.
      */
@@ -138,6 +164,7 @@ public class NewWizardAction extends Action implements
         }
         NewWizard wizard = new NewWizard();
         wizard.setCategoryId(categoryId);
+		wizard.setWindowTitle(windowTitle);
 
         ISelection selection = workbenchWindow.getSelectionService()
                 .getSelection();
@@ -162,6 +189,7 @@ public class NewWizardAction extends Action implements
         }
 
         wizard.init(workbenchWindow.getWorkbench(), selectionToPass);
+
         IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault()
                 .getDialogSettings();
         IDialogSettings wizardSettings = workbenchSettings
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardDropDownAction.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardDropDownAction.java
index 86a6533..3a4e75d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardDropDownAction.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/NewWizardDropDownAction.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -98,6 +98,14 @@ public class NewWizardDropDownAction extends Action implements
          */
         public void dispose() {
             if (dropDownMenuMgr != null) {
+				// remove the wizard menu before disposing the menu manager, the
+				// wizard menu is a workbench action and it should only be
+				// disposed when the workbench window itself is disposed,
+				// IMenuCreators will be disposed when the action is disposed,
+            	// we do not want this, the menu's disposal will be handled when
+				// the owning action (NewWizardDropDownAction) is disposed, see
+				// bug 309716
+				dropDownMenuMgr.remove(newWizardMenu);
                 dropDownMenuMgr.dispose();
                 dropDownMenuMgr = null;
             }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/WorkingSetFilterActionGroup.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/WorkingSetFilterActionGroup.java
index 57d3316..a665732 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/WorkingSetFilterActionGroup.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/WorkingSetFilterActionGroup.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.IMenuManager;
@@ -68,8 +67,6 @@ public class WorkingSetFilterActionGroup extends ActionGroup {
 
     private IPropertyChangeListener workingSetUpdater;
 
-    private IMenuManager menuManager;
-
 	private IWorkbenchWindow workbenchWindow;
 
 	private IWorkbenchPage page;
@@ -140,7 +137,7 @@ public class WorkingSetFilterActionGroup extends ActionGroup {
      * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
      */
     public void fillActionBars(IActionBars actionBars) {
-        menuManager = actionBars.getMenuManager();
+		IMenuManager menuManager = actionBars.getMenuManager();
         
         if(menuManager.find(IWorkbenchActionConstants.MB_ADDITIONS) != null)
         	menuManager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator(WORKING_SET_ACTION_GROUP));
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchAdvisor.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchAdvisor.java
index 0e639f0..344c404 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchAdvisor.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/application/WorkbenchAdvisor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -232,7 +232,7 @@ public abstract class WorkbenchAdvisor {
 
 	/**
 	 * Performs arbitrary actions just before the first workbench window is
-	 * opened (or restored).
+	 * opened (or restored), and before the main event loop is run.
 	 * <p>
 	 * This method is called after the workbench has been initialized and just
 	 * before the first window is about to be opened. Clients must not call this
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java
index 2b5b754..f5014ad 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/EditorSelectionDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,15 +9,22 @@
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla -	Bug 29633 [EditorMgmt] "Open" menu should
  *     						have Open With-->Other
+ *     Helena Halperin - Bug 298747 [EditorMgmt] Bidi Incorrect file type direction in mirrored "Editor Selection" dialog
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
 import java.util.ArrayList;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
 import org.eclipse.jface.util.Util;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.osgi.util.TextProcessor;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.graphics.Font;
@@ -72,14 +79,14 @@ public final class EditorSelectionDialog extends Dialog {
 
 	private IEditorDescriptor[] internalEditors;
 
-	private Image[] externalEditorImages;
-
-	private Image[] internalEditorImages;
-
 	private IEditorDescriptor[] editorsToFilter;
 
 	private DialogListener listener = new DialogListener();
 
+	private ResourceManager resourceManager;
+
+	private TableViewer editorTableViewer;
+
 	private static final String[] Executable_Filters;
 
 	private static final int TABLE_WIDTH = 200;
@@ -99,6 +106,8 @@ public final class EditorSelectionDialog extends Dialog {
 	 */
 	public EditorSelectionDialog(Shell parentShell) {
 		super(parentShell);
+		resourceManager = new LocalResourceManager(JFaceResources.getResources(parentShell
+				.getDisplay()));
 	}
 
 	/**
@@ -115,19 +124,10 @@ public final class EditorSelectionDialog extends Dialog {
 	 * Close the window.
 	 */
 	public boolean close() {
-		if (internalEditorImages != null) {
-			for (int i = 0; i < internalEditorImages.length; i++) {
-				internalEditorImages[i].dispose();
-			}
-			internalEditorImages = null;
-		}
-		if (externalEditorImages != null) {
-			for (int i = 0; i < externalEditorImages.length; i++) {
-				externalEditorImages[i].dispose();
-			}
-			externalEditorImages = null;
-		}
-		return super.close();
+		boolean result = super.close();
+		resourceManager.dispose();
+		resourceManager = null;
+		return result;
 	}
 
 	/*
@@ -181,9 +181,6 @@ public final class EditorSelectionDialog extends Dialog {
 		externalButton.setFont(font);
 
 		editorTable = new Table(contents, SWT.SINGLE | SWT.BORDER);
-		editorTable.addListener(SWT.Selection, listener);
-		editorTable.addListener(SWT.DefaultSelection, listener);
-		editorTable.addListener(SWT.MouseDoubleClick, listener);
 		data = new GridData();
 		data.widthHint = convertHorizontalDLUsToPixels(TABLE_WIDTH);
 		data.horizontalAlignment = GridData.FILL;
@@ -194,6 +191,22 @@ public final class EditorSelectionDialog extends Dialog {
 		editorTable.setLayoutData(data);
 		editorTable.setFont(font);
 		data.heightHint = editorTable.getItemHeight() * 12;
+		editorTableViewer = new TableViewer(editorTable);
+		editorTableViewer.setContentProvider(ArrayContentProvider.getInstance());
+		editorTableViewer.setLabelProvider(new LabelProvider() {
+			public String getText(Object element) {
+				IEditorDescriptor d = (IEditorDescriptor) element;
+				return TextProcessor.process(d.getLabel(), "."); //$NON-NLS-1$
+			}
+
+			public Image getImage(Object element) {
+				IEditorDescriptor d = (IEditorDescriptor) element;
+				return (Image) resourceManager.get(d.getImageDescriptor());
+			}
+		});
+		editorTable.addListener(SWT.Selection, listener);
+		editorTable.addListener(SWT.DefaultSelection, listener);
+		editorTable.addListener(SWT.MouseDoubleClick, listener);
 
 		browseExternalEditorsButton = new Button(contents, SWT.PUSH);
 		browseExternalEditorsButton
@@ -216,27 +229,11 @@ public final class EditorSelectionDialog extends Dialog {
 	}
 
 	protected void fillEditorTable() {
-		editorTable.removeAll();
-		editorTable.update();
-		IEditorDescriptor[] editors;
-		Image[] images;
 		if (internalButton.getSelection()) {
-			editors = getInternalEditors();
-			images = internalEditorImages;
+			editorTableViewer.setInput(getInternalEditors());
 		} else {
-			editors = getExternalEditors();
-			images = externalEditorImages;
-		}
-
-		// 1FWHIEX: ITPUI:WINNT - Need to call setRedraw
-		editorTable.setRedraw(false);
-		for (int i = 0; i < editors.length; i++) {
-			TableItem item = new TableItem(editorTable, SWT.NULL);
-			item.setData(editors[i]);
-			item.setText(editors[i].getLabel());
-			item.setImage(images[i]);
+			editorTableViewer.setInput(getExternalEditors());
 		}
-		editorTable.setRedraw(true);
 	}
 
 	/**
@@ -276,7 +273,6 @@ public final class EditorSelectionDialog extends Dialog {
 					.getEditorRegistry();
 			externalEditors = reg.getSortedEditorsFromOS();
 			externalEditors = filterEditors(externalEditors);
-			externalEditorImages = getImages(externalEditors);
 			// Clean up
 			shell.setCursor(null);
 			busy.dispose();
@@ -319,17 +315,6 @@ public final class EditorSelectionDialog extends Dialog {
 	}
 
 	/**
-	 * Returns an array of images for the given array of editors
-	 */
-	protected Image[] getImages(IEditorDescriptor[] editors) {
-		Image[] images = new Image[editors.length];
-		for (int i = 0; i < editors.length; i++) {
-			images[i] = editors[i].getImageDescriptor().createImage();
-		}
-		return images;
-	}
-
-	/**
 	 * Returns the internal editors
 	 */
 	protected IEditorDescriptor[] getInternalEditors() {
@@ -338,7 +323,6 @@ public final class EditorSelectionDialog extends Dialog {
 					.getEditorRegistry();
 			internalEditors = reg.getSortedEditorsFromPlugins();
 			internalEditors = filterEditors(internalEditors);
-			internalEditorImages = getImages(internalEditors);
 		}
 		return internalEditors;
 	}
@@ -382,12 +366,6 @@ public final class EditorSelectionDialog extends Dialog {
 					externalEditors.length);
 			newEditors[newEditors.length - 1] = editor;
 			externalEditors = newEditors;
-
-			Image[] newImages = new Image[externalEditorImages.length + 1];
-			System.arraycopy(externalEditorImages, 0, newImages, 0,
-					externalEditorImages.length);
-			newImages[newImages.length - 1] = image;
-			externalEditorImages = newImages;
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java
index 5c7d0f7..a1686f8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredItemsSelectionDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
  *     - Fix for bug 196553 - [Dialogs] Support IColorProvider/IFontProvider in FilteredItemsSelectionDialog
  *  Peter Friese <peter.friese at gentleware.com>
  *     - Fix for bug 208602 - [Dialogs] Open Type dialog needs accessible labels
+ *  Simon Muschel <smuschel at gmx.de> - bug 258493
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
@@ -27,7 +28,6 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.IHandler;
@@ -50,6 +50,7 @@ import org.eclipse.jface.action.LegacyActionTools;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.viewers.ContentViewer;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IColorProvider;
 import org.eclipse.jface.viewers.IContentProvider;
@@ -72,7 +73,6 @@ import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerCell;
 import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.ACC;
@@ -179,6 +179,8 @@ public abstract class FilteredItemsSelectionDialog extends
 
 	private MenuManager menuManager;
 
+	private MenuManager contextMenuManager;
+
 	private boolean multi;
 
 	private ToolBar toolBar;
@@ -411,6 +413,10 @@ public abstract class FilteredItemsSelectionDialog extends
 			showViewHandler.getHandler().dispose();
 			showViewHandler = null;
 		}
+		if (menuManager != null)
+			menuManager.dispose();
+		if (contextMenuManager != null)
+			contextMenuManager.dispose();
 		storeDialog(getDialogSettings());
 		return super.close();
 	}
@@ -612,16 +618,16 @@ public abstract class FilteredItemsSelectionDialog extends
 		removeHistoryActionContributionItem = new ActionContributionItem(
 				removeHistoryItemAction);
 
-		MenuManager manager = new MenuManager();
-		manager.setRemoveAllWhenShown(true);
-		manager.addMenuListener(new IMenuListener() {
+		contextMenuManager = new MenuManager();
+		contextMenuManager.setRemoveAllWhenShown(true);
+		contextMenuManager.addMenuListener(new IMenuListener() {
 			public void menuAboutToShow(IMenuManager manager) {
 				fillContextMenu(manager);
 			}
 		});
 
 		final Table table = list.getTable();
-		Menu menu= manager.createContextMenu(table);
+		Menu menu= contextMenuManager.createContextMenu(table);
 		table.setMenu(menu);
 	}
 
@@ -3229,6 +3235,9 @@ public abstract class FilteredItemsSelectionDialog extends
 		 *            the new image
 		 */
 		private void doRefresh(String text, Image image) {
+			if ( text != null ) {
+				text = LegacyActionTools.escapeMnemonics(text);
+			}
 			label.setText(text);
 			label.setImage(image);
 		}
@@ -3264,50 +3273,10 @@ public abstract class FilteredItemsSelectionDialog extends
 	}
 
 	/**
-	 * Compares items using camel case method.
-	 */
-	private class CamelCaseComparator implements Comparator {
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
-		 */
-		public int compare(Object o1, Object o2) {
-
-			int leftCategory = getCamelCaseCategory(o1);
-			int rightCategory = getCamelCaseCategory(o2);
-			if (leftCategory < rightCategory)
-				return -1;
-			if (leftCategory > rightCategory)
-				return +1;
-
-			return getItemsComparator().compare(o1, o2);
-		}
-
-		private int getCamelCaseCategory(Object item) {
-			if (filter == null)
-				return 0;
-			if (!filter.isCamelCasePattern())
-				return 0;
-			return filter.matchesRawNamePattern(item) ? 0 : 1;
-		}
-	}
-
-	/**
 	 * Compares items according to the history.
 	 */
 	private class HistoryComparator implements Comparator {
 
-		private CamelCaseComparator camelCaseComparator;
-
-		/**
-		 * 
-		 */
-		public HistoryComparator() {
-			this.camelCaseComparator = new CamelCaseComparator();
-		}
-
 		/*
 		 * (non-Javadoc)
 		 * 
@@ -3316,7 +3285,7 @@ public abstract class FilteredItemsSelectionDialog extends
 		public int compare(Object o1, Object o2) {
 			if ((isHistoryElement(o1) && isHistoryElement(o2))
 					|| (!isHistoryElement(o1) && !isHistoryElement(o2)))
-				return this.camelCaseComparator.compare(o1, o2);
+				return getItemsComparator().compare(o1, o2);
 
 			if (isHistoryElement(o1))
 				return -2;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredTree.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredTree.java
index 3312204..19cd6fc 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredTree.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/FilteredTree.java	
@@ -8,11 +8,23 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jacek Pospychala - bug 187762
+ *     Mohamed Tarief - tarief at eg.ibm.com - IBM - Bug 174481
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.osgi.util.NLS;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.accessibility.ACC;
 import org.eclipse.swt.accessibility.AccessibleAdapter;
@@ -46,22 +58,8 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.IContentProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreeViewer;
-
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.WorkbenchMessages;
@@ -764,11 +762,14 @@ public class FilteredTree extends Composite {
 								filterText.getText().trim());
 						if (hasFocus && textChanged
 								&& filterText.getText().trim().length() > 0) {
-							TreeItem item = getFirstMatchingItem(getViewer()
-									.getTree().getItems());
+							Tree tree = getViewer().getTree();
+							TreeItem item;
+							if (tree.getSelectionCount() > 0)
+								item = getFirstMatchingItem(tree.getSelection());
+							else
+								item = getFirstMatchingItem(tree.getItems());
 							if (item != null) {
-								getViewer().getTree().setSelection(
-										new TreeItem[] { item });
+								tree.setSelection(new TreeItem[] { item });
 								ISelection sel = getViewer().getSelection();
 								getViewer().setSelection(sel, true);
 							}
@@ -841,6 +842,8 @@ public class FilteredTree extends Composite {
 	 */
 	protected void textChanged() {
 		narrowingDown = previousFilterText == null
+				|| previousFilterText
+						.equals(WorkbenchMessages.FilteredTree_FilterMessage)
 				|| getFilterString().startsWith(previousFilterText);
 		previousFilterText = getFilterString();
 		// cancel currently running job first, to prevent unnecessary redraw
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferencesUtil.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferencesUtil.java
index c0d2d65..ce6a2b0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferencesUtil.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/PreferencesUtil.java	
@@ -12,7 +12,6 @@ package org.eclipse.ui.dialogs;
 
 import java.util.Collection;
 import java.util.List;
-
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.jface.preference.IPreferenceNode;
 import org.eclipse.jface.preference.IPreferencePage;
@@ -39,7 +38,7 @@ public final class PreferencesUtil {
 	 * @since 3.5
 	 */
 	public final static int OPTION_NONE = 0;
-	
+
 	/**
 	 * Constant for configuring a preferences or properties dialog in which the
 	 * user cannot "unfilter" to show a larger set of pages than was passed to
@@ -215,7 +214,7 @@ public final class PreferencesUtil {
 	 *            IAdaptable An adaptable element to open the dialog on.
 	 * @param displayedIds
 	 *            The ids of the other pages to be displayed using the same
-	 *            filtering criterea as search. If this is <code>null</code>,
+	 *            filtering criteria as search. If this is <code>null</code>,
 	 *            then the all preference pages are shown.
 	 * @param data
 	 *            Data that will be passed to all of the preference pages to be
@@ -244,7 +243,49 @@ public final class PreferencesUtil {
 		return dialog;
 		
 	}
-	
+
+	/**
+	 * Creates a workbench preference dialog to a particular preference page.
+	 * Show the other pages as filtered results using whatever filtering
+	 * criteria the search uses. It is the responsibility of the caller to then
+	 * call <code>open()</code>. The call to <code>open()</code> will not return
+	 * until the dialog closes, so this is the last chance to manipulate the
+	 * dialog.
+	 * 
+	 * @param shell
+	 *            The shell to use to parent the dialog if required.
+	 * @param propertyPageId
+	 *            The identifier of the preference page to open; may be
+	 *            <code>null</code>. If it is <code>null</code>, then the dialog
+	 *            is opened with no selected page.
+	 * @param element
+	 *            An element to open the dialog on.
+	 * @param displayedIds
+	 *            The IDs of the other pages to be displayed using the same
+	 *            filtering criteria as search. If this is <code>null</code>,
+	 *            then the all preference pages are shown.
+	 * @param data
+	 *            Data that will be passed to all of the preference pages to be
+	 *            applied as specified within the page as they are created. If
+	 *            the data is <code>null</code> nothing will be called.
+	 * @param options
+	 *            a bitwise OR of option constants
+	 * 
+	 * @return A preference dialog showing properties for the selection or
+	 *         <code>null</code> if it could not be created.
+	 * @since 3.6
+	 */
+	public static final PreferenceDialog createPropertyDialogOn(Shell shell,
+			final Object element, String propertyPageId, String[] displayedIds,
+			Object data, int options) {
+		FilteredPreferenceDialog dialog = PropertyDialog.createDialogOn(shell,
+				propertyPageId, element);
+		if (dialog == null)
+			return null;
+		applyOptions(data, displayedIds, dialog, options);
+		return dialog;
+	}
+
 	/**
 	 * Indicates whether the specified element has at least one property page
 	 * contributor.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java
index e768f8f..d057620 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/SearchPattern.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,6 @@
  *******************************************************************************/
 package org.eclipse.ui.dialogs;
 
-import org.eclipse.jface.util.Util;
 import org.eclipse.ui.internal.misc.StringMatcher;
 
 /**
@@ -497,10 +496,16 @@ public class SearchPattern {
 					continue;
 				}
 
-				if (!isNameCharAllowed(nameChar)) {
+				if (Character.isDigit(nameChar)) {
+					// nameChar is digit => break if the digit is current
+					// pattern character, otherwise consume it
+					if (patternChar == nameChar)
+						break;
+					iName++;
+				} else if (!isNameCharAllowed(nameChar)) {
 					// nameChar is lowercase
 					iName++;
-					// nameChar is uppercase...
+				// nameChar is uppercase...
 				} else if (patternChar != nameChar) {
 					// .. and it does not match patternChar, so it's not a match
 					return false;
@@ -523,8 +528,8 @@ public class SearchPattern {
 	 * @return true if patternChar is in set of allowed characters for pattern
 	 */
 	protected boolean isPatternCharAllowed(char patternChar) {
-		return Character.isUpperCase(patternChar) || patternChar == END_SYMBOL
-				|| patternChar == BLANK;
+		return patternChar == END_SYMBOL || patternChar == BLANK
+			|| Character.isUpperCase(patternChar) || Character.isDigit(patternChar);
 	}
 
 	/**
@@ -677,8 +682,24 @@ public class SearchPattern {
 	 *            string to be trimmed
 	 * @return trimmed pattern
 	 */
-	private String trimWildcardCharacters(String pattern) {
-		return Util.replaceAll(pattern, "\\*+", "\\*"); //$NON-NLS-1$ //$NON-NLS-2$		}
+	private static String trimWildcardCharacters(String pattern) {
+		// 1.3-compatible replacement for:
+		// return Util.replaceAll(pattern, "\\*+", "\\*");
+		int i = pattern.indexOf("**"); //$NON-NLS-1$
+		if (i == -1)
+			return pattern;
+
+		StringBuffer buf = new StringBuffer(pattern.length());
+		int prevAsterisk = 0;
+		do {
+			if (prevAsterisk == 0 || prevAsterisk != i) {
+				buf.append(pattern.substring(prevAsterisk, i + 1));
+			}
+			prevAsterisk = i + 1;
+			i = pattern.indexOf('*', prevAsterisk);
+		} while (i != -1);
+		buf.append(pattern.substring(prevAsterisk));
+		return buf.toString();
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java
index 613a365..4af08aa 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/fieldassist/ContentAssistCommandAdapter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,32 +11,31 @@
 
 package org.eclipse.ui.fieldassist;
 
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.widgets.Control;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.IHandler;
-
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionInfo;
+import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.ControlDecoration;
 import org.eclipse.jface.fieldassist.FieldDecoration;
 import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
 import org.eclipse.jface.fieldassist.IContentProposalProvider;
 import org.eclipse.jface.fieldassist.IControlContentAdapter;
-
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.ISources;
 import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.IHandlerActivation;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.swt.IFocusService;
 
 /**
  * ContentAssistCommandAdapter extends {@link ContentProposalAdapter} to invoke
@@ -55,7 +54,23 @@ import org.eclipse.ui.keys.IBindingService;
  */
 public class ContentAssistCommandAdapter extends ContentProposalAdapter {
 
+	private class ContentAssistHandler extends AbstractHandler {
+		public Object execute(ExecutionEvent event) {
+			openProposalPopup();
+			return null;
+		}
+
+		void setEnabled(boolean enabled) {
+			this.setBaseEnabled(enabled);
+		}
+	}
+
+	// ID used in the decoration registry.
 	private static final String CONTENT_ASSIST_DECORATION_ID = "org.eclipse.ui.fieldAssist.ContentAssistField"; //$NON-NLS-1$
+
+	// ID prefix used when registering our control with the focus service. 
+	private static final String CONTROL_ID_PREFIX = "org.eclipse.ui.fieldAssist.ContentAssistField.ControlID"; //$NON-NLS-1$
+
 	private String commandId;
 
 	/**
@@ -71,17 +86,7 @@ public class ContentAssistCommandAdapter extends ContentProposalAdapter {
 	// a platform UI preference.
 	private static final int DEFAULT_AUTO_ACTIVATION_DELAY = 500;
 
-	private IHandlerService handlerService;
-
-	private IHandlerActivation activeHandler;
-
-	private IHandler proposalHandler = new AbstractHandler() {
-		public Object execute(ExecutionEvent event) {
-			openProposalPopup();
-			return null;
-		}
-
-	};
+	private ContentAssistHandler proposalHandler = new ContentAssistHandler();
 	private ControlDecoration decoration;
 
 	/**
@@ -172,12 +177,9 @@ public class ContentAssistCommandAdapter extends ContentProposalAdapter {
 		// Set a default autoactivation delay.
 		setAutoActivationDelay(DEFAULT_AUTO_ACTIVATION_DELAY);
 
-		// Add listeners to the control to manage activation of the handler
-		addListeners(control);
+		// Activate the handler
+		activateHandler(control);
 
-		// Cache the handler service so we don't have to retrieve it each time
-		this.handlerService = (IHandlerService) PlatformUI.getWorkbench()
-				.getService(IHandlerService.class);
 		if (installDecoration) {
 			// Note top left is used for compatibility with 3.2, although
 			// this may change to center alignment in the future.
@@ -190,44 +192,6 @@ public class ContentAssistCommandAdapter extends ContentProposalAdapter {
 
 	}
 
-	/*
-	 * Add the listeners needed in order to activate the content assist command
-	 * on the control.
-	 */
-	private void addListeners(Control control) {
-		control.addFocusListener(new FocusListener() {
-			public void focusLost(FocusEvent e) {
-				if (activeHandler != null) {
-					handlerService.deactivateHandler(activeHandler);
-					activeHandler = null;
-				}
-			}
-
-			public void focusGained(FocusEvent e) {
-				if (isEnabled()) {
-					if (activeHandler == null) {
-						activeHandler = handlerService.activateHandler(
-								commandId, proposalHandler);
-					}
-				} else {
-					if (activeHandler != null) {
-						handlerService.deactivateHandler(activeHandler);
-					}
-					activeHandler = null;
-				}
-			}
-		});
-		control.addDisposeListener(new DisposeListener() {
-			public void widgetDisposed(DisposeEvent e) {
-				if (activeHandler != null) {
-					handlerService.deactivateHandler(activeHandler);
-					activeHandler = null;
-				}
-
-			}
-		});
-	}
-
 	/**
 	 * Return the string command ID of the command used to invoke content
 	 * assist.
@@ -288,13 +252,40 @@ public class ContentAssistCommandAdapter extends ContentProposalAdapter {
 	 */
 	public void setEnabled(boolean enabled) {
 		super.setEnabled(enabled);
-		if (decoration == null) {
-			return;
+		if (decoration != null) {
+			if (enabled) {
+				decoration.show();
+			} else {
+				decoration.hide();
+			}
 		}
-		if (enabled) {
-			decoration.show();
-		} else {
-			decoration.hide();
+		proposalHandler.setEnabled(enabled);
+	}
+
+	private void activateHandler(final Control control) {
+		IFocusService fs = (IFocusService) PlatformUI.getWorkbench()
+				.getService(IFocusService.class);
+		final IHandlerService hs = (IHandlerService) PlatformUI.getWorkbench().getService(
+				IHandlerService.class);
+		if (fs != null && hs != null) {
+			fs.addFocusTracker(control, CONTROL_ID_PREFIX + hashCode());
+			final IHandlerActivation handlerActivation = hs.activateHandler(commandId,
+					proposalHandler, new Expression() {
+						public EvaluationResult evaluate(IEvaluationContext context) {
+							return context.getVariable(ISources.ACTIVE_FOCUS_CONTROL_NAME) == control ? EvaluationResult.TRUE
+									: EvaluationResult.FALSE;
+						}
+
+						public void collectExpressionInfo(final ExpressionInfo info) {
+							info.addVariableNameAccess(ISources.ACTIVE_FOCUS_CONTROL_NAME);
+						}
+
+				});
+			control.addDisposeListener(new DisposeListener() {
+				public void widgetDisposed(DisposeEvent e) {
+					hs.deactivateHandler(handlerActivation);
+				}
+			});
 		}
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java
new file mode 100644
index 0000000..7d9b29a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ExpandAllHandler.java	
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ *     @author Prakash G. R. 
+ ******************************************************************************/
+
+package org.eclipse.ui.handlers;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
+import org.eclipse.ui.IWorkbenchCommandConstants;
+
+/**
+ * Expand a tree viewer.
+ * <p>
+ * It can be used in a part's createPartControl(Composite) method:
+ * 
+ * <pre>
+ * IHandlerService handlerService = (IHandlerService) getSite().getService(
+ * 		IHandlerService.class);
+ * expandHandler = new ExpandAllHandler(myViewer);
+ * handlerService.activateHandler(ExpandAllHandler.COMMAND_ID, expandHandler);
+ * </pre>
+ * 
+ * The part should dispose the handler in its own dispose() method. The part can
+ * provide its own expand all handler if desired, or if it needs to delegate to
+ * multiple tree viewers.
+ * </p>
+ * <p>
+ * <b>Note</b>: This class can be instantiated. It should not be subclasses.
+ * </p>
+ * 
+ * @since 3.6
+ */
+public class ExpandAllHandler extends AbstractHandler {
+	/**
+	 * The command id for collapse all.
+	 */
+	public static final String COMMAND_ID = IWorkbenchCommandConstants.NAVIGATE_EXPAND_ALL;
+
+	private AbstractTreeViewer treeViewer;
+
+	/**
+	 * Create the handler for this tree viewer.
+	 * 
+	 * @param viewer
+	 *            The viewer to expand. Must not be <code>null</code>.
+	 */
+	public ExpandAllHandler(AbstractTreeViewer viewer) {
+		Assert.isNotNull(viewer);
+		treeViewer = viewer;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 */
+	public Object execute(ExecutionEvent event) {
+		treeViewer.expandAll();
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.commands.AbstractHandler#dispose()
+	 */
+	public void dispose() {
+		treeViewer = null;
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowPerspectiveHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowPerspectiveHandler.java
index c78c051..a71aebf 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowPerspectiveHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowPerspectiveHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.window.Window;
 import org.eclipse.ui.IPerspectiveDescriptor;
 import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
@@ -39,15 +40,6 @@ import org.eclipse.ui.internal.dialogs.SelectPerspectiveDialog;
  */
 public final class ShowPerspectiveHandler extends AbstractHandler {
 
-	/**
-	 * The name of the parameter providing the perspective identifier.
-	 */
-	private static final String PARAMETER_NAME_VIEW_ID = "org.eclipse.ui.perspectives.showPerspective.perspectiveId"; //$NON-NLS-1$
-
-	/**
-	 * True/false value to open the perspective in a new window.
-	 */
-	private static final String PARAMETER_NEW_WINDOW = "org.eclipse.ui.perspectives.showPerspective.newWindow"; //$NON-NLS-1$
 
 	public final Object execute(final ExecutionEvent event)
 			throws ExecutionException {
@@ -56,8 +48,10 @@ public final class ShowPerspectiveHandler extends AbstractHandler {
 
 		// Get the view identifier, if any.
 		final Map parameters = event.getParameters();
-		final Object value = parameters.get(PARAMETER_NAME_VIEW_ID);
-		final String newWindow = (String) parameters.get(PARAMETER_NEW_WINDOW);
+		final Object value = parameters
+				.get(IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID);
+		final String newWindow = (String) parameters
+				.get(IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_NEWWINDOW);
 
 		if (value == null) {
 			openOther(window);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java
index 62558e7..d1fa612 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/handlers/ShowViewHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.jface.window.Window;
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
@@ -39,12 +40,7 @@ import org.eclipse.ui.views.IViewDescriptor;
  */
 public final class ShowViewHandler extends AbstractHandler {
 
-	/**
-	 * The name of the parameter providing the view identifier.
-	 */
-	private static final String PARAMETER_NAME_VIEW_ID = "org.eclipse.ui.views.showView.viewId"; //$NON-NLS-1$
     private boolean makeFast = false;
-	private static final String PARAMETER_MAKE_FAST = "org.eclipse.ui.views.showView.makeFast"; //$NON-NLS-1$
   
     /**
      * Creates a new ShowViewHandler that will open the view in its default location.
@@ -70,8 +66,9 @@ public final class ShowViewHandler extends AbstractHandler {
 				.getActiveWorkbenchWindowChecked(event);
 		// Get the view identifier, if any.
 		final Map parameters = event.getParameters();
-		final Object value = parameters.get(PARAMETER_NAME_VIEW_ID);
-		makeFast = "true".equals(parameters.get(PARAMETER_MAKE_FAST)); //$NON-NLS-1$
+		final Object value = parameters
+				.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID);
+		makeFast = "true".equals(parameters.get(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_FASTVIEW)); //$NON-NLS-1$
 		
 		if (value == null) {
 			openOther(window);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorHandler.java
index b6d4eb7..bf9991e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ActivateEditorHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -55,7 +55,6 @@ public class ActivateEditorHandler extends AbstractEvaluationHandler {
 			IEditorPart part = HandlerUtil.getActiveEditor(event);
 			if (part != null) {
 				page.activate(part);
-				part.setFocus();
 			} else {
 				IWorkbenchPartReference ref = page.getActivePartReference();
 				if (ref instanceof IViewReference) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ChangeToPerspectiveMenu.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ChangeToPerspectiveMenu.java
index a76e642..1e6475c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ChangeToPerspectiveMenu.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ChangeToPerspectiveMenu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -76,7 +76,8 @@ public class ChangeToPerspectiveMenu extends PerspectiveMenu {
 		Map parameters = new HashMap();
 		parameters
 				.put(
-						"org.eclipse.ui.perspectives.showPerspective.perspectiveId", desc.getId()); //$NON-NLS-1$
+						IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID,
+						desc.getId());
 
 		// Only open a new window if user preference is set and the window
 		// has an active perspective.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java
index c369249..1766873 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CycleBaseHandler.java	
@@ -7,19 +7,23 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Dina Sayed, dsayed at eg.ibm.com, IBM -  bug 276324
  ******************************************************************************/
 
 package org.eclipse.ui.internal;
 
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.ParameterizedCommand;
-
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExecutableExtension;
+import org.eclipse.jface.bindings.Trigger;
+import org.eclipse.jface.bindings.TriggerSequence;
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.bindings.keys.SWTKeySupport;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
@@ -36,13 +40,6 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TableItem;
-
-import org.eclipse.jface.bindings.Trigger;
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.jface.bindings.keys.KeyStroke;
-import org.eclipse.jface.bindings.keys.SWTKeySupport;
-import org.eclipse.jface.preference.IPreferenceStore;
-
 import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IPerspectiveDescriptor;
 import org.eclipse.ui.IWorkbenchPage;
@@ -127,9 +124,11 @@ public abstract class CycleBaseHandler extends AbstractHandler implements
 	 */
 	protected void openDialog(WorkbenchPage page, IWorkbenchPart activePart) {
 		final int MAX_ITEMS = 22;
-
+		Shell shell = null;
 		selection = null;
-		Shell shell = activePart.getSite().getShell();
+
+		if (activePart != null)
+			shell = activePart.getSite().getShell();
 		if (shell == null)
 			shell = window.getShell();
 		final Shell dialog = new Shell(shell, SWT.MODELESS);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultAnimationFeedback.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultAnimationFeedback.java
new file mode 100644
index 0000000..b962aed
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DefaultAnimationFeedback.java	
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ui.internal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.util.Geometry;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.graphics.Region;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * @since 3.3
+ *
+ */
+public class DefaultAnimationFeedback {
+	private static final int LINE_WIDTH = 1;
+	
+	private Display display;
+	private Shell theShell;
+	private Region shellRegion;
+	
+	private List startRects = new ArrayList();
+	private List endRects = new ArrayList();
+	
+	public DefaultAnimationFeedback() {}
+
+    /**
+	 * @param parentShell
+	 */
+	public void initialize(Shell parentShell, Rectangle startRect, Rectangle endRect) {
+		addStartRect(startRect);
+		addEndRect(endRect);
+
+		theShell = new Shell(parentShell, SWT.NO_TRIM | SWT.ON_TOP);
+		display = theShell.getDisplay();
+        Color color = display.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND);
+        theShell.setBackground(color);
+
+        // Ensure that the background won't show on the initial display
+        shellRegion = new Region(display);
+        theShell.setRegion(shellRegion);
+	}
+	
+	public void addStartRect(Rectangle rect) {
+		if (rect != null) {
+			startRects.add(rect);
+		}
+	}
+	
+	public void addEndRect(Rectangle rect) {
+		if (rect != null) {
+			endRects.add(rect);
+		}
+	}
+	
+	public List getStartRects() {
+		return startRects;
+	}
+	
+	public List getEndRects() {
+		return endRects;
+	}
+	
+	public void renderStep(double amount) {
+		if (shellRegion != null) {
+        	shellRegion.dispose();
+        	shellRegion = new Region(display);
+        }
+
+		// Iterate across the set of start/end rects
+        Iterator startIter = startRects.iterator();
+        Iterator endIter = endRects.iterator();
+        while (startIter.hasNext()) {
+            Rectangle start = (Rectangle) startIter.next();
+            Rectangle end = (Rectangle) endIter.next();
+            
+			// Get the bounds of the interpolated rect
+			Rectangle curRect = RectangleAnimation.interpolate(start, end, amount);
+			
+	        Rectangle rect = Geometry.toControl(theShell, curRect);
+	        shellRegion.add(rect);
+	        rect.x += LINE_WIDTH;
+	        rect.y += LINE_WIDTH;
+	        rect.width = Math.max(0, rect.width - 2 * LINE_WIDTH);
+	        rect.height = Math.max(0, rect.height - 2 * LINE_WIDTH);
+	
+	        shellRegion.subtract(rect);
+        }
+
+        theShell.setRegion(shellRegion);
+        
+        display.update();
+	}
+
+	/**
+	 * 
+	 */
+	public void dispose() {
+		theShell.setVisible(false);
+		theShell.dispose();
+		shellRegion.dispose();
+	}
+
+	/**
+	 * Perform any initialization you want to have happen -before- the
+	 * amination starts
+	 */
+	public void jobInit() {
+    	// Compute the shell's bounds
+        Rectangle shellBounds = Geometry.copy((Rectangle) startRects.get(0));
+        Iterator startIter = startRects.iterator();
+        Iterator endIter = endRects.iterator();
+        while (startIter.hasNext()) {
+            shellBounds.add((Rectangle) startIter.next());
+            shellBounds.add((Rectangle) endIter.next());
+        }
+        theShell.setBounds(shellBounds);
+        
+    	// Making the shell visible will be slow on old video cards, so only start
+    	// the timer once it is visible.
+    	theShell.setVisible(true);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragCursors.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragCursors.java
index 436f650..bd3db76 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragCursors.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/DragCursors.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -169,8 +169,11 @@ public class DragCursors {
      */
     public static void dispose() {
         for (int idx = 0; idx < cursors.length; idx++) {
-            cursors[idx].dispose();
-            cursors[idx] = null;
+			Cursor cursor = cursors[idx];
+			if (cursor != null) {
+				cursor.dispose();
+				cursors[idx] = null;
+			}
         }
     }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java
index 3db4bc0..6024b36 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@ import org.eclipse.jface.action.ICoolBarManager;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.SubContributionManager;
+import org.eclipse.jface.action.SubCoolBarManager;
 import org.eclipse.jface.action.SubMenuManager;
 import org.eclipse.jface.action.SubStatusLineManager;
 import org.eclipse.jface.action.SubToolBarManager;
@@ -478,6 +479,9 @@ public class EditorActionBars extends SubActionBars2 {
 			if (toolBarContributionItem != null) {
 				toolBarContributionItem.setVisible(visible || !forceVisibility);
 			}
+			if (getCoolBarManager() != null) {
+				((SubCoolBarManager) getCoolBarManager()).setVisible(visible || !forceVisibility);
+			}
 		}
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaTrimToolBar.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaTrimToolBar.java
index 20fb933..3d802c6 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaTrimToolBar.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorAreaTrimToolBar.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,18 +22,16 @@ import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.ui.IPageLayout;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.internal.layout.TrimToolBarBase;
+import org.eclipse.ui.presentations.IStackPresentationSite;
 
 public class EditorAreaTrimToolBar extends TrimToolBarBase {
-	private LayoutPart editorArea;
 	private boolean restoreOnUnzoom = false;
 	
 	// The orientation of the fast view pane when showing a view
 	private int paneOrientation;
 
-	public EditorAreaTrimToolBar(WorkbenchWindow wbw, LayoutPart editorArea) {
+	public EditorAreaTrimToolBar(WorkbenchWindow wbw) {
 		super(IPageLayout.ID_EDITOR_AREA, SWT.TOP, wbw);
-		
-		this.editorArea = editorArea;		
 		dock(SWT.TOP);
 	}
 	
@@ -41,9 +39,8 @@ public class EditorAreaTrimToolBar extends TrimToolBarBase {
 	 * Put the stack back into the presentation
 	 */
 	protected void restoreToPresentation() {
-		EditorSashContainer esc = (EditorSashContainer)editorArea;
-		EditorStack curStack = esc.getUpperRightEditorStack(esc.getChildren());
-		curStack.setMinimized(false);
+		Perspective persp = wbw.getActiveWorkbenchPage().getActivePerspective();
+		persp.setEditorAreaState(IStackPresentationSite.STATE_RESTORED);
 	}
 
 	public void initToolBarManager(final ToolBarManager mgr) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistory.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistory.java
index 5588a71..ed38172 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistory.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.ui.IEditorDescriptor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PlatformUI;
 
 /**
  * This class is used to record "open editor" actions as they
@@ -134,7 +133,7 @@ public class EditorHistory {
                 add(item, fifoList.size());
             }
         }
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 
     /**
@@ -152,6 +151,6 @@ public class EditorHistory {
                 item.saveState(itemMemento);
             }
         }
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistoryItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistoryItem.java
index 94f7c61..9c0c049 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistoryItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorHistoryItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -153,8 +153,7 @@ public class EditorHistoryItem {
     public IStatus restoreState() {
         Assert.isTrue(!isRestored());
 
-        Status result = new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0,
-                "", null); //$NON-NLS-1$
+        IStatus result = Status.OK_STATUS;
         IMemento memento = this.memento;
         this.memento = null;
 
@@ -235,7 +234,7 @@ public class EditorHistoryItem {
                         .getToolTipText());
             }
         }
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java
index a4be46b..95d0456 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1045,6 +1045,18 @@ public class EditorManager implements IExtensionChangeHandler {
 				boolean addNonPartSources, final IRunnableContext runnableContext, final IShellProvider shellProvider) {
 		// clone the input list
 		dirtyParts = new ArrayList(dirtyParts);
+
+		if (closing) {
+			// if the parts are going to be closed, then we only save those that
+			// need to be saved when closed, see bug 272070
+			for (Iterator it = dirtyParts.iterator(); it.hasNext();) {
+				ISaveablePart saveablePart = (ISaveablePart) it.next();
+				if (!saveablePart.isSaveOnCloseNeeded()) {
+					it.remove();
+				}
+			}
+		}
+
     	List modelsToSave;
 		if (confirm) {
 			boolean saveable2Processed = false;
@@ -1216,7 +1228,7 @@ public class EditorManager implements IExtensionChangeHandler {
 			public void run(IProgressMonitor monitor) {
 				IProgressMonitor monitorWrap = new EventLoopProgressMonitor(
 						monitor);
-				monitorWrap.beginTask("", finalModels.size()); //$NON-NLS-1$
+				monitorWrap.beginTask(WorkbenchMessages.Saving_Modifications, finalModels.size());
 				for (Iterator i = finalModels.iterator(); i.hasNext();) {
 					Saveable model = (Saveable) i.next();
 					// handle case where this model got saved as a result of saving another
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java
index 15e4ecb..662e95e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
+import org.eclipse.ui.internal.testing.ContributionInfoMessages;
+
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
@@ -52,6 +54,7 @@ import org.eclipse.ui.part.IWorkbenchPartOrientation;
 import org.eclipse.ui.part.MultiEditor;
 import org.eclipse.ui.part.MultiEditorInput;
 import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.testing.ContributionInfo;
 
 public class EditorReference extends WorkbenchPartReference implements
         IEditorReference {
@@ -653,6 +656,11 @@ public class EditorReference extends WorkbenchPartReference implements
             actionBars = (EditorActionBars) site.getActionBars();
             
             Composite parent = (Composite)pane.getControl();
+			EditorDescriptor descriptor = getDescriptor();
+			if (descriptor != null && descriptor.getPluginId() != null) {
+				parent.setData(new ContributionInfo(descriptor.getPluginId(),
+						ContributionInfoMessages.ContributionInfo_Editor, null));
+			}
             content = new Composite(parent, style);
     
             content.setLayout(new FillLayout());
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSashContainer.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSashContainer.java
index 9b7df34..cfdf0db 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSashContainer.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSashContainer.java	
@@ -633,6 +633,6 @@ public class EditorSashContainer extends PartSashContainer {
 				}});
            
         }
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSiteDragAndDropServiceImpl.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSiteDragAndDropServiceImpl.java
index 4dd9b4a..24265fb 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSiteDragAndDropServiceImpl.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorSiteDragAndDropServiceImpl.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,17 +13,16 @@
 package org.eclipse.ui.internal;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DropTarget;
 import org.eclipse.swt.dnd.DropTargetEvent;
 import org.eclipse.swt.dnd.DropTargetListener;
 import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
 import org.eclipse.swt.widgets.Control;
-
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.dnd.IDragAndDropService;
 import org.eclipse.ui.services.IDisposable;
@@ -46,6 +45,9 @@ import org.eclipse.ui.services.IDisposable;
  *
  */
 public class EditorSiteDragAndDropServiceImpl implements IDragAndDropService, IDisposable {
+	// Key used to store/retrieve the MergedDropTarget instance from the real DropTarget
+	private static String MDT_KEY = "MDT"; //$NON-NLS-1$
+	
 	/**
 	 * Implementation of a DropTarget wrapper that will either delegate to the
 	 * <code>primaryListener</code> if the event's <code>currentDataType</code>
@@ -72,6 +74,7 @@ public class EditorSiteDragAndDropServiceImpl implements IDragAndDropService, ID
 				int priOps, Transfer[] priTransfers, DropTargetListener priListener,
 				int secOps, Transfer[] secTransfers, DropTargetListener secListener) {
 			realDropTarget = new DropTarget(control, priOps | secOps);
+			realDropTarget.setData(MDT_KEY, this);
 			
 			// Cache the editor's transfers and listener
 			primaryTransfers = priTransfers;
@@ -142,12 +145,6 @@ public class EditorSiteDragAndDropServiceImpl implements IDragAndDropService, ID
 		private boolean isSupportedOperation(int dropOps, int eventDetail) {
 				return ((dropOps | DND.DROP_DEFAULT) & eventDetail) != 0;
 		}
-
-		/**
-		 * Clean up...
-		 */
-		public void dispose() {
-		}
 	}
 	
 	// Cache any listeners for cleanup
@@ -174,6 +171,13 @@ public class EditorSiteDragAndDropServiceImpl implements IDragAndDropService, ID
 		MergedDropTarget newTarget = new MergedDropTarget(control, ops, transfers, listener,
 				editorSiteOps, editorSiteTransfers, editorSiteListener);
 		addedListeners.add(newTarget);
+
+		newTarget.realDropTarget.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				Object mdt = e.widget.getData(MDT_KEY);
+				addedListeners.remove(mdt);
+			}
+		});
 	}
 
 	/**
@@ -206,11 +210,6 @@ public class EditorSiteDragAndDropServiceImpl implements IDragAndDropService, ID
 	 * @see org.eclipse.ui.services.IDisposable#dispose()
 	 */
 	public void dispose() {
-		// Clean up the listeners
-		for (Iterator iterator = addedListeners.iterator(); iterator.hasNext();) {
-			MergedDropTarget target = (MergedDropTarget) iterator.next();
-			target.dispose();
-		}
 		addedListeners.clear();
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java
index 71e96a5..33f0244 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/FastViewManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
  *     IBM Corporation - initial API and implementation
  *     Carlos Devoto carlos.devoto at compuware.com Bug 213645
  *     Markus Alexander Kuppe, Versant Corporation - bug #215797
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
  *******************************************************************************/
 
 package org.eclipse.ui.internal;
@@ -18,7 +19,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.MultiStatus;
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.SWT;
@@ -144,7 +144,7 @@ public class FastViewManager {
 			return;
 
 		if (changeId.equals(IWorkbenchPage.CHANGE_VIEW_HIDE)) {
-			if (partRef instanceof IViewReference) {
+			if (partRef instanceof ViewReference) {
 				ViewReference ref = (ViewReference) partRef;
 				if (ref.getPane().getContainer() instanceof ViewStack) {
 					int viewCount = 0;
@@ -303,7 +303,7 @@ public class FastViewManager {
 	 * @param id
 	 *            The id of the {@link IWindowTrim} to update
 	 */
-	private void updateTrim(String id) {
+	public void updateTrim(String id) {
 		// Get the trim part from the trim manager
 		IWindowTrim trim = tbm.getTrim(id);
 
@@ -313,8 +313,10 @@ public class FastViewManager {
 
 		// If there are no fast views for the bar then hide it
 		List fvs = (List) idToFastViewsMap.get(id);
-		if (fvs != null && fvs.size() == 0
-				&& !FastViewBar.FASTVIEWBAR_ID.equals(id)) {
+		boolean hideEmptyFVB = WorkbenchPlugin.getDefault()
+				.getPreferenceStore().getBoolean(IPreferenceConstants.FVB_HIDE);
+		if ((fvs == null || fvs.size() == 0)
+				&& (!FastViewBar.FASTVIEWBAR_ID.equals(id) || hideEmptyFVB)) {
 			if (trim.getControl().getVisible()) {
 				tbm.setTrimVisible(trim, false);
 				tbm.forceLayout();
@@ -622,7 +624,14 @@ public class FastViewManager {
 			secondaryId = idParts[1];
 		
 		List fvs = getFastViews(id);
-		if (fvs.isEmpty()) {
+
+		// Check for 'durable' folders
+		boolean isDurable = false;
+		if (perspective.getDesc() != null) {
+			isDurable = page.window.getWindowAdvisor().isDurableFolder(
+				perspective.getDesc().getId(), id);
+		}
+		if (fvs.isEmpty() && isDurable) {
 			// We are dealing with a durable view stack that is currently empty, so execute special logic to restore it from the minimized state
             LayoutPart part = perspective.getPresentation().findPart(id, null);	
             if (part instanceof ContainerPlaceholder) {
@@ -986,17 +995,11 @@ public class FastViewManager {
 	 *  false when ending the operation
 	 */
 	public void deferUpdates(boolean defer) {
-		if (defer && !deferringUpdates) {
-			deferringUpdates = defer;
-			
-			deferAnimations(true);
-			
+		if (defer == deferringUpdates)
 			return;
-		}
-		
-		// 'false': reset and run any necessary updates
-		deferringUpdates = false;
-		deferAnimations(false);
+
+		deferringUpdates = defer;
+		deferAnimations(deferringUpdates);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java
index 1e468eb..b23d975 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IPreferenceConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
  *******************************************************************************/
 
 package org.eclipse.ui.internal;
@@ -61,6 +62,9 @@ public interface IPreferenceConstants {
 
     public static final int OVM_FLOAT = 2;
 
+	// Boolean: true = hide fast view bar, when it is empty
+	public static final String FVB_HIDE = "FVB_HIDE"; //$NON-NLS-1$
+
     // (int) Mode for opening a new perspective
     public static final String OPEN_PERSP_MODE = "OPEN_PERSPECTIVE_MODE"; //$NON-NLS-1$
 
@@ -202,6 +206,20 @@ public interface IPreferenceConstants {
      */
     public static final String SHOULD_PROMPT_FOR_ENABLEMENT = "shouldPromptForEnablement"; //$NON-NLS-1$
 
+	/**
+	 * Preference to show/hide the CoolBar.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String COOLBAR_VISIBLE = "coolBarVisible"; //$NON-NLS-1$
+
+	/**
+	 * Preference to show/hide the PerspectiveBar.
+	 * 
+	 * @since 3.6
+	 */
+	public static final String PERSPECTIVEBAR_VISIBLE = "perspectiveBarVisible"; //$NON-NLS-1$
+
     /**
 	 * Preference that restores the 3.2 startup threading behavior. This
 	 * essentially means that there will be no restrictions on what runnables
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchConstants.java
index f393db2..822134b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,11 +8,11 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.internal;
 
 import org.eclipse.ui.PlatformUI;
 
+
 /**
  * General constants used by the workbench.
  */
@@ -190,6 +190,8 @@ public interface IWorkbenchConstants {
 
     public static final String TAG_SHOW_VIEW_ACTION = "show_view_action"; //$NON-NLS-1$
 
+	public static final String TAG_SHOW_IN_PART = "show_in_part"; //$NON-NLS-1$
+
     public static final String TAG_SHOW_IN_TIME = "show_in_time"; //$NON-NLS-1$
 
     public static final String TAG_TIME = "time"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchHelpContextIds.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchHelpContextIds.java
index 7770303..009e15b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchHelpContextIds.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/IWorkbenchHelpContextIds.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -314,6 +314,12 @@ public interface IWorkbenchHelpContextIds {
 	public static final String WORKING_SET_TYPE_PAGE = PREFIX
 			+ "working_set_type_page"; //$NON-NLS-1$	
 
+	public static final String PREFERENCES_EXPORT_WIZARD_PAGE = PREFIX
+			+ "preferences_export_wizard_page"; //$NON-NLS-1$
+
+	public static final String PREFERENCES_IMPORT_WIZARD_PAGE = PREFIX
+			+ "preferences_import_wizard_page"; //$NON-NLS-1$
+
 	// Wizards
 	public static final String NEW_WIZARD = PREFIX + "new_wizard_context"; //$NON-NLS-1$
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java
index dcf93cd..6c6c15d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/JFaceUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,16 +14,17 @@ package org.eclipse.ui.internal;
 import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
 import org.eclipse.jface.internal.InternalPolicy;
 import org.eclipse.jface.preference.JFacePreferences;
-import org.eclipse.jface.util.StatusHandler;
 import org.eclipse.jface.util.ILogger;
 import org.eclipse.jface.util.ISafeRunnableRunner;
 import org.eclipse.jface.util.Policy;
 import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.util.StatusHandler;
 import org.eclipse.ui.statushandlers.StatusAdapter;
 import org.eclipse.ui.statushandlers.StatusManager;
 
@@ -42,10 +43,10 @@ final class JFaceUtil {
 	 * Initializes JFace for use by Eclipse.
 	 */
 	public static void initializeJFace() {
-		// Set the Platform to run all SafeRunnables
+		// Set the SafeRunner to run all SafeRunnables
 		SafeRunnable.setRunner(new ISafeRunnableRunner() {
 			public void run(ISafeRunnable code) {
-				Platform.run(code);
+				SafeRunner.run(code);
 			}
 		});
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java
index 593a18b..76fbb84 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartStack.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
@@ -42,7 +41,6 @@ import org.eclipse.ui.IPropertyListener;
 import org.eclipse.ui.IWorkbenchPartReference;
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.XMLMemento;
 import org.eclipse.ui.internal.StartupThreading.StartupRunnable;
 import org.eclipse.ui.internal.dnd.AbstractDropTarget;
@@ -1024,7 +1022,7 @@ public abstract class PartStack extends LayoutPart implements ILayoutContainer {
         }
                 
         
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 
     /* (non-Javadoc)
@@ -1158,7 +1156,7 @@ public abstract class PartStack extends LayoutPart implements ILayoutContainer {
         }
         
 
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 
     protected WorkbenchPage getPage() {
@@ -1461,12 +1459,12 @@ public abstract class PartStack extends LayoutPart implements ILayoutContainer {
 		boolean useNewMinMax = Perspective.useNewMinMax(page.getActivePerspective());
 
 		// we have to fiddle with the zoom behavior to satisfy Intro req's
-		// by usning the old zoom behavior for its stack
+		// by using the old zoom behavior for its stack
 		if (newState == IStackPresentationSite.STATE_MAXIMIZED)
 			useNewMinMax = useNewMinMax && !isIntroInStack();
 		else if (newState == IStackPresentationSite.STATE_RESTORED) {
 			PartStack maxStack = page.getActivePerspective().getPresentation().getMaximizedStack();
-			useNewMinMax = useNewMinMax && maxStack == this;
+			useNewMinMax = useNewMinMax && (maxStack == this || maxStack instanceof EditorStack);
 		}
 
 		if (useNewMinMax) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java
index 506f3ae..2dc6adc 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Perspective.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
@@ -592,7 +591,7 @@ public class Perspective {
             if (activeFastView == ref) {
 				setActiveFastView(null);
 			}
-            if (pane != null) {
+			if (pane != null && pane.getControl() != null) {
 				pane.getControl().setEnabled(true);
 			}
             
@@ -933,6 +932,10 @@ public class Perspective {
      * activate.
      */
 	protected void onActivate() {
+		// Trim Stack Support
+        boolean useNewMinMax = Perspective.useNewMinMax(this);
+		boolean hideEditorArea = shouldHideEditorsOnActivate || (editorHidden && editorHolder == null);
+		
 		// Update editor area state.
 		if (editorArea.getControl() != null) {
 			boolean visible = isEditorAreaVisible();
@@ -942,6 +945,13 @@ public class Perspective {
 			// editor if it's supposed to be hidden because the intro is maximized. Note that
 			// 'childObscuredByZoom' will only respond 'true' when using the old behaviour.
 			boolean introMaxed = getPresentation().getLayout().childObscuredByZoom(editorArea);
+
+			// We have to set the editor area's stack state -before-
+			// activating the presentation since it's used there to determine
+			// size of the resulting stack
+			if (useNewMinMax && !hideEditorArea && !introMaxed) {
+				refreshEditorAreaVisibility();
+			}
 			
 			editorArea.setVisible(visible && !inTrim && !introMaxed);
 		}
@@ -967,17 +977,6 @@ public class Perspective {
 		// Set the visibility of all fast view pins
 		setAllPinsVisible(true);
 
-		// Trim Stack Support
-        boolean useNewMinMax = Perspective.useNewMinMax(this);
-		boolean hideEditorArea = shouldHideEditorsOnActivate || (editorHidden && editorHolder == null);
-		
-        // We have to set the editor area's stack state -before-
-        // activating the presentation since it's used there to determine
-        // size of the resulting stack
-        if (useNewMinMax && !hideEditorArea) {
-			refreshEditorAreaVisibility();
-        }
-
 		// Show the layout
 		presentation.activate(getClientComposite());
 
@@ -1098,13 +1097,16 @@ public class Perspective {
 		IPerspectiveDescriptor regDesc = reg.findPerspectiveWithId(descriptor
 				.getId());
 		if (regDesc == null) {
-			String msg = "Perspective " + descriptor.getLabel() + " has beed made into a local copy"; //$NON-NLS-1$//$NON-NLS-2$
+			String msg = "Perspective " + descriptor.getLabel() + " has been made into a local copy"; //$NON-NLS-1$//$NON-NLS-2$
 			IStatus status = StatusUtil.newStatus(IStatus.WARNING, msg, null);
 			StatusManager.getManager().handle(status, StatusManager.LOG);
 
-			String newDescId = '<' + descriptor.getLabel() + '>';
-			while (reg.findPerspectiveWithId(newDescId) != null)
-				newDescId = '<' + newDescId + '>';
+			String newDescId = NLS.bind(
+					WorkbenchMessages.Perspective_localCopyLabel, descriptor
+							.getLabel());
+			while (reg.findPerspectiveWithId(newDescId) != null) {
+				newDescId = NLS.bind(WorkbenchMessages.Perspective_localCopyLabel, newDescId);
+			}
 			PerspectiveDescriptor newDesc = reg.createPerspective(newDescId, descriptor);
 			page.savePerspectiveAs(newDesc);
 		}
@@ -1114,8 +1116,8 @@ public class Perspective {
      * deactivate.
      */
 	protected void onDeactivate() {
-		presentation.deactivate();
 		setActiveFastView(null);
+		presentation.deactivate();
 		setAllPinsVisible(false);
 
 		// Update fast views.
@@ -1262,7 +1264,7 @@ public class Perspective {
      */
     public IStatus restoreState() {
         if (this.memento == null) {
-			return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+			return Status.OK_STATUS;
 		}
 
         MultiStatus result = new MultiStatus(
@@ -1926,7 +1928,7 @@ public class Perspective {
             ViewPane pane = getPane(activeFastView);
             if (pane != null) {
                 if (pane.isZoomed()) {
-                    presentation.zoomOut();
+					pane.setZoomed(false);
                 }
                 hideFastView(activeFastView, steps);
             }
@@ -2067,7 +2069,7 @@ public class Perspective {
 			IWindowTrim beforeMe = ((TrimLayout)tbm).getPreferredLocation(IPageLayout.ID_EDITOR_AREA);
 			
     		// Gain access to the trim manager
-			editorAreaTrim = new EditorAreaTrimToolBar(wbw, editorArea);
+			editorAreaTrim = new EditorAreaTrimToolBar(wbw);
 			editorAreaTrim.dock(suggestedSide);
 			tbm.addTrim(suggestedSide, editorAreaTrim, beforeMe);
     	}
@@ -2107,9 +2109,23 @@ public class Perspective {
 		if (editorStack == null)
 			return;
 		
+		// Make sure that the other editor stack all match *this* presentation
+		// state
+		LayoutPart[] stacks = ((EditorSashContainer) editorArea).getChildren();
+		for (int i = 0; i < stacks.length; i++) {
+			if (stacks[i] instanceof EditorStack && stacks[i] != editorStack) {
+				EditorStack es = (EditorStack) stacks[i];
+				es.setPresentationState(editorAreaState);
+			}
+		}
+
 		// Whatever we're doing, make the current editor stack match it
 		editorStack.setStateLocal(editorAreaState);
-		
+
+		// Override the visibility of the EA's min.max buttons based on the
+		// 'fixed' state
+		editorStack.showMinMax(!isFixedLayout());
+
 		// If it's minimized then it's in the trim
 		if (editorAreaState == IStackPresentationSite.STATE_MINIMIZED) {
 			// Hide the editor area and show its trim 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java
index 5201929..38c1291 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PerspectiveSwitcher.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,17 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.StringTokenizer;
 
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CBanner;
 import org.eclipse.swt.events.ControlAdapter;
@@ -41,21 +52,6 @@ import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
-
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.NotEnabledException;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.commands.ParameterizedCommand;
-import org.eclipse.core.commands.common.NotDefinedException;
-
-import org.eclipse.core.runtime.Assert;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IPageListener;
 import org.eclipse.ui.IPerspectiveDescriptor;
@@ -947,7 +943,6 @@ public class PerspectiveSwitcher implements IWindowTrim {
         window.getWorkbench().getHelpSystem().setHelp(menuItem,
         		IWorkbenchHelpContextIds.CLOSE_PAGE_ACTION);
         menuItem.addSelectionListener(new SelectionAdapter() {
-			private static final String PARAMETER_CLOSE_PERSP_ID = "org.eclipse.ui.window.closePerspective.perspectiveId"; //$NON-NLS-1$
 
 			public void widgetSelected(SelectionEvent e) {
                 ToolItem perspectiveToolItem = (ToolItem) popupMenu
@@ -963,7 +958,10 @@ public class PerspectiveSwitcher implements IWindowTrim {
 					Command command = commandService.getCommand(IWorkbenchCommandConstants.WINDOW_CLOSE_PERSPECTIVE);
 					
 					HashMap parameters = new HashMap();
-					parameters.put(PARAMETER_CLOSE_PERSP_ID, persp.getId());
+					parameters
+							.put(
+									IWorkbenchCommandConstants.WINDOW_CLOSE_PERSPECTIVE_PARM_ID,
+									persp.getId());
 					
 					ParameterizedCommand pCommand = ParameterizedCommand.generateCommand(command, parameters);
 					
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java
index e318107..1999d64 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PlatformUIPreferenceListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *      Wojciech Galanciak <wojciech.galanciak at pl.ibm.com> - Bug 236104 [EditorMgmt] File association default needs to be set twice to take effect
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
@@ -20,6 +21,7 @@ import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChange
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.IEditorDescriptor;
 import org.eclipse.ui.IEditorRegistry;
+import org.eclipse.ui.IFileEditorMapping;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -145,6 +147,16 @@ public class PlatformUIPreferenceListener implements
 							IEditorDescriptor descriptor = descriptors[i];
 							editorMap.put(descriptor.getId(), descriptor);
 						}
+						// Get default editors which are not OS or internal
+						// editors
+						IFileEditorMapping[] maps = editorRegistry.getFileEditorMappings();
+						for (int j = 0; j < maps.length; j++) {
+							IFileEditorMapping fileEditorMapping = maps[j];
+							IEditorDescriptor descriptor = fileEditorMapping.getDefaultEditor();
+							if (descriptor != null && !editorMap.containsKey(descriptor.getId())) {
+								editorMap.put(descriptor.getId(), descriptor);
+							}
+						}
 						// Update the file to editor(s) mappings
 						editorRegistry.readResources(editorMap, reader);
 					}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSet.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSet.java
index 2480d7b..3ec39d4 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSet.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSet.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java
index c6ccfbf..04175e4 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PluginActionSetBuilder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductInfo.java
index 00a00e2..fa3d64d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,10 @@
 package org.eclipse.ui.internal;
 
 import org.eclipse.core.runtime.IProduct;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
 
 /**
  * Stores information about the product.  This class replaces the old AboutInfo.
@@ -26,6 +29,8 @@ public class ProductInfo {
 
     private String appName;
 
+	private Version appVersion;
+
     private ImageDescriptor[] windowImages;
 
     private ImageDescriptor aboutImage;
@@ -68,6 +73,32 @@ public class ProductInfo {
         return appName;
     }
 
+	/**
+	 * Return the application version, as defined by the product.
+	 * 
+	 * @return the application version, or the empty version.
+	 * @see org.eclipse.swt.widgets.Display#setAppVersion
+	 * @see Version#emptyVersion
+	 * @since 3.6
+	 */
+	public String getAppVersion() {
+		if (appVersion == null) {
+			if (product != null) {
+				Bundle bundle = product.getDefiningBundle();
+				if (bundle != null) {
+					appVersion = bundle.getVersion();
+				}
+			}
+			if (appVersion == null) {
+				// if we can't find a useful product bundle, try and return
+				// the org.eclipse.ui version (approx of the workbench)
+				Bundle bundle = Platform.getBundle("org.eclipse.ui"); //$NON-NLS-1$
+				appVersion = bundle == null ? Version.emptyVersion : bundle.getVersion();
+			}
+		}
+		return appVersion.toString();
+	}
+
     /**
      * Returns the descriptor for an image which can be shown in an "about" dialog 
      * for this product. Products designed to run "headless" typically would not 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java
index f728401..c326e10 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ProductProperties.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
+import com.ibm.icu.text.MessageFormat;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
@@ -17,7 +18,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.MissingResourceException;
 import java.util.PropertyResourceBundle;
-
 import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Platform;
@@ -25,8 +25,6 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.branding.IProductConstants;
 import org.osgi.framework.Bundle;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * A class that converts the strings returned by
  * <code>org.eclipse.core.runtime.IProduct.getProperty</code> to the
@@ -264,12 +262,19 @@ public class ProductProperties extends BrandingProperties implements
         if (property.indexOf('{') == -1) {
 			return property;
 		}
-        String[] tempMappings = getMappings(product.getDefiningBundle());
-                /*
-    	 * Check if the mapping value is a system property, specified
-    	 * by '$' at the beginning and end of the string.  If so, update
-    	 * the mappings array with the system property value.  
-    	 */
+
+		/*
+		 * Check if the mapping value is a system property, specified by '$' at
+		 * the beginning and end of the string. If so, update the temp mappings
+		 * array with the system property value. Note that we use a clone (copy)
+		 * of the mappings so that the cached system property value is not
+		 * stored in the per-bundle mappings for this class. This allows changes
+		 * in system property values to be reflected each time this method is
+		 * called. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=302184
+		 */
+
+		String[] tempMappings = (String[]) getMappings(product.getDefiningBundle()).clone();
+
         for (int i=0; i<tempMappings.length; i++) {
         	String nextString = tempMappings[i];
         	int length = nextString.length();
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java
new file mode 100644
index 0000000..e063e77
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/RectangleAnimation.java	
@@ -0,0 +1,257 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.Geometry;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPreferenceConstants;
+import org.eclipse.ui.internal.util.PrefUtil;
+
+/**
+ * This job creates an animated rectangle that moves from a source rectangle to
+ * a target in a fixed amount of time. To begin the animation, instantiate this
+ * object then call schedule().
+ *  
+ * @since 3.0
+ */
+public class RectangleAnimation extends Job {
+	private static class AnimationFeedbackFactory {
+		public static DefaultAnimationFeedback createAnimationRenderer(Shell parentShell) {
+			return new DefaultAnimationFeedback();
+		}
+	}
+	
+	// Constants
+	public static final int TICK_TIMER = 1;
+	public static final int FRAME_COUNT = 2;
+
+	// Animation Parameters
+	private Display display;
+	
+	private boolean enableAnimations;
+    private int timingStyle = TICK_TIMER;
+    private int duration;
+    
+    // Control State
+    private DefaultAnimationFeedback feedbackRenderer;
+    private long stepCount;
+    private long frameCount;
+    private long startTime;
+    private long curTime;
+    private long prevTime;
+    
+    // Macros
+    private boolean done() { return amount() >= 1.0; }
+
+    public static Rectangle interpolate(Rectangle start, Rectangle end,
+            double amount) {
+        double initialWeight = 1.0 - amount;
+
+        Rectangle result = new Rectangle((int) (start.x * initialWeight + end.x
+                * amount), (int) (start.y * initialWeight + end.y * amount),
+                (int) (start.width * initialWeight + end.width * amount),
+                (int) (start.height * initialWeight + end.height * amount));
+
+        return result;
+    }
+    
+    // Animation Step
+    private Runnable animationStep = new Runnable() {
+
+		public void run() {
+            // Capture time
+            prevTime = curTime;
+            curTime = System.currentTimeMillis();
+
+            // Has the system timer 'ticked'?
+            if (curTime != prevTime) {
+            	clockTick();
+            }
+            
+            if (isUpdateStep()) {
+	            updateDisplay();
+	            frameCount++;
+            }
+            
+            stepCount++;
+        }
+
+    };
+    
+	/**
+     * Creates an animation that will morph the start rectangle to the end rectangle in the
+     * given number of milliseconds. The animation will take the given number of milliseconds to
+     * complete.
+     * 
+     * Note that this is a Job, so you must invoke schedule() before the animation will begin 
+     * 
+     * @param whereToDraw specifies the composite where the animation will be drawn. Note that
+     * although the start and end rectangles can accept any value in display coordinates, the
+     * actual animation will be clipped to the boundaries of this composite. For this reason,
+     * it is good to select a composite that encloses both the start and end rectangles.
+     * @param start initial rectangle (display coordinates)
+     * @param end final rectangle (display coordinates)
+     * @param duration number of milliseconds over which the animation will run 
+     */
+    public RectangleAnimation(Shell parentShell, Rectangle start,
+            Rectangle end, int duration) {
+        super(WorkbenchMessages.RectangleAnimation_Animating_Rectangle);
+
+        // if animations aren't on this is a NO-OP
+        IPreferenceStore preferenceStore = PrefUtil.getAPIPreferenceStore();
+        enableAnimations = preferenceStore.getBoolean(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS);
+        
+        if (!enableAnimations) {
+        	return;
+        }
+
+        // Capture paraeters
+        display = parentShell.getDisplay();
+        this.duration = duration;
+
+        // Don't show the job in monitors
+        setSystem(true);
+        
+        // Pick the renderer (could be a preference...)
+        feedbackRenderer = AnimationFeedbackFactory.createAnimationRenderer(parentShell);
+        
+        // Set it up
+        feedbackRenderer.initialize(parentShell, start, end);
+        
+        // Set the animation's initial state
+        stepCount = 0;
+        //long totalFrames = (long) ((duration / 1000.0) * framesPerSec);       
+        curTime = startTime = System.currentTimeMillis();
+    }
+
+    public RectangleAnimation(Shell parentShell, Rectangle start, Rectangle end) {
+        this(parentShell, start, end, 400);
+    }
+    
+    public void addStartRect(Rectangle rect) {
+    	if (feedbackRenderer != null)
+    		feedbackRenderer.addStartRect(rect);
+    }
+    
+    public void addEndRect(Rectangle rect) {
+    	if (feedbackRenderer != null)
+    	    feedbackRenderer.addEndRect(rect);
+    }
+
+    public void addStartRect(Control ctrl) {
+    	Rectangle ctrlBounds = ctrl.getBounds();
+    	Rectangle startRect = Geometry.toDisplay(ctrl.getParent(), ctrlBounds);
+    	addStartRect(startRect);
+    }
+
+    public void addEndRect(Control ctrl) {
+    	Rectangle ctrlBounds = ctrl.getBounds();
+    	Rectangle endRect = Geometry.toDisplay(ctrl.getParent(), ctrlBounds);
+    	addEndRect(endRect);
+    }
+
+    /**
+	 * 
+	 */
+	protected void clockTick() {
+	}
+    
+    /**
+	 * @return
+	 */
+	protected boolean isUpdateStep() {
+		switch (timingStyle) {
+			case TICK_TIMER:
+				return prevTime != curTime;
+	
+			case FRAME_COUNT:
+				return true;
+		}
+		
+		return false;
+	}
+
+	private double amount() {
+		double amount = 0.0;
+		
+		switch (timingStyle) {
+			case TICK_TIMER:
+				amount = (double) (curTime - startTime) / (double) duration;
+				break;
+	
+			case FRAME_COUNT:
+				amount = (double)frameCount / (double)duration;
+		}
+		
+		if (amount > 1.0)
+			amount = 1.0;
+		
+		return amount;
+    }
+
+    /**
+	 * 
+	 */
+	protected void updateDisplay() {
+		feedbackRenderer.renderStep(amount());
+	}
+
+	/* (non-Javadoc)
+     * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    protected IStatus run(IProgressMonitor monitor) {
+    	
+        // We use preference value to indicate that the animation should be skipped on this platform.
+        if (!enableAnimations || feedbackRenderer == null) {
+            return Status.OK_STATUS;
+        }
+
+        // Do we have anything to animate ?
+    	boolean isEmpty = feedbackRenderer.getStartRects().size() == 0;
+        if (isEmpty) {
+            return Status.OK_STATUS;
+        }
+    	
+        // We're starting, initialize
+        display.syncExec(new Runnable() {
+            public void run() {
+                feedbackRenderer.jobInit();
+            }
+        });
+        
+        // Only start the animation timer -after- we've initialized
+        curTime = startTime = System.currentTimeMillis();
+        
+        while (!done()) {
+            display.syncExec(animationStep);
+            // Don't pin the CPU
+            Thread.yield();
+        }
+
+        //System.out.println("Done: " + (curTime-startTime) + " steps: " + stepCount + " frames:" + frameCount);   //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+        // We're done, clean up
+        display.syncExec(new Runnable() {
+            public void run() {
+                feedbackRenderer.dispose();
+            }
+        });
+    
+        return Status.OK_STATUS;
+    }
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java
index 410359b..c164a02 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveableHelper.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -183,20 +183,23 @@ public class SaveableHelper {
 			public void run(IProgressMonitor monitor) {
 				IProgressMonitor monitorWrap = new EventLoopProgressMonitor(monitor);
 				monitorWrap.beginTask(WorkbenchMessages.Save, dirtyModels.size());
-				for (Iterator i = dirtyModels.iterator(); i.hasNext();) {
-					Saveable model = (Saveable) i.next();
-					// handle case where this model got saved as a result of saving another
-					if (!model.isDirty()) {
-						monitor.worked(1);
-						continue;
-					}
-					doSaveModel(model, new SubProgressMonitor(monitorWrap, 1),
-							window, confirm);
-					if (monitor.isCanceled()) {
-						break;
+				try {
+					for (Iterator i = dirtyModels.iterator(); i.hasNext();) {
+						Saveable model = (Saveable) i.next();
+						// handle case where this model got saved as a result of
+						// saving another
+						if (!model.isDirty()) {
+							monitor.worked(1);
+							continue;
+						}
+						doSaveModel(model, new SubProgressMonitor(monitorWrap, 1), window, confirm);
+						if (monitor.isCanceled()) {
+							break;
+						}
 					}
+				} finally {
+					monitorWrap.done();
 				}
-				monitorWrap.done();
 			}
 		};
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java
index c8735db..4a95828 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/SaveablesList.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -598,7 +598,7 @@ public class SaveablesList implements ISaveablesLifecycleListener {
 			public void run(IProgressMonitor monitor) {
 				IProgressMonitor monitorWrap = new EventLoopProgressMonitor(
 						monitor);
-				monitorWrap.beginTask("", finalModels.size()); //$NON-NLS-1$
+				monitorWrap.beginTask(WorkbenchMessages.Saving_Modifications, finalModels.size());
 				for (Iterator i = finalModels.iterator(); i.hasNext();) {
 					Saveable model = (Saveable) i.next();
 					// handle case where this model got saved as a result of
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInHandler.java
index 669d1fb..47ebd48 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,12 +16,11 @@ import java.util.Map;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
-
 import org.eclipse.jface.viewers.ISelection;
-
 import org.eclipse.ui.ISourceProvider;
 import org.eclipse.ui.ISources;
 import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
@@ -43,7 +42,6 @@ import org.eclipse.ui.views.IViewRegistry;
  * @since 3.4
  */
 public class ShowInHandler extends AbstractHandler implements IElementUpdater {
-	static final String TARGET_ID = "org.eclipse.ui.navigate.showIn.targetId"; //$NON-NLS-1$
 
 	/*
 	 * (non-Javadoc)
@@ -51,7 +49,8 @@ public class ShowInHandler extends AbstractHandler implements IElementUpdater {
 	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
 	 */
 	public Object execute(ExecutionEvent event) throws ExecutionException {
-		String targetId = event.getParameter(TARGET_ID);
+		String targetId = event
+				.getParameter(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_PARM_TARGET);
 		if (targetId == null) {
 			throw new ExecutionException("No targetId specified"); //$NON-NLS-1$
 		}
@@ -124,7 +123,8 @@ public class ShowInHandler extends AbstractHandler implements IElementUpdater {
 	 *      java.util.Map)
 	 */
 	public void updateElement(UIElement element, Map parameters) {
-		String targetId = (String) parameters.get(TARGET_ID);
+		String targetId = (String) parameters
+				.get(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_PARM_TARGET);
 		if (targetId == null || targetId.length() == 0) {
 			return;
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java
index 1223936..ef79269 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,11 +15,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MenuItem;
-
 import org.eclipse.jface.action.ContributionItem;
 import org.eclipse.jface.action.ContributionManager;
 import org.eclipse.jface.action.IContributionItem;
@@ -28,7 +23,9 @@ import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionProvider;
-
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.ISourceProvider;
 import org.eclipse.ui.ISources;
@@ -61,8 +58,6 @@ import org.eclipse.ui.views.IViewRegistry;
 public class ShowInMenu extends ContributionItem implements
 		IWorkbenchContribution {
 
-	private static final String SHOW_IN_PARM_ID = "org.eclipse.ui.navigate.showIn.targetId"; //$NON-NLS-1$
-
 	private static final String NO_TARGETS_MSG = WorkbenchMessages.Workbench_showInNoTargets;
 
 	private IWorkbenchWindow window;
@@ -196,9 +191,13 @@ public class ShowInMenu extends ContributionItem implements
 				locator, viewDescriptor.getId(), IWorkbenchCommandConstants.NAVIGATE_SHOW_IN,
 				CommandContributionItem.STYLE_PUSH);
 		HashMap targetId = new HashMap();
-		targetId.put(SHOW_IN_PARM_ID, viewDescriptor.getId());
+		targetId.put(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_PARM_TARGET,
+				viewDescriptor.getId());
 		parm.parameters = targetId;
 		parm.label = viewDescriptor.getLabel();
+		if (parm.label.length() > 0) {
+			parm.mnemonic = parm.label.substring(0, 1);
+		}
 		parm.icon = viewDescriptor.getImageDescriptor();
 		return new CommandContributionItem(parm);
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java
index bd83ebf..ddd01ab 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ShowViewMenu.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -65,8 +65,11 @@ public class ShowViewMenu extends ContributionItem {
 	 * @deprecated As of 3.5, replaced by {@link IWorkbenchCommandConstants#VIEWS_SHOW_VIEW}
 	 */
 	public static final String SHOW_VIEW_ID= IWorkbenchCommandConstants.VIEWS_SHOW_VIEW;
-	public static final String VIEW_ID_PARM = "org.eclipse.ui.views.showView.viewId"; //$NON-NLS-1$
-	private static final String PARAMETER_MAKE_FAST = "org.eclipse.ui.views.showView.makeFast"; //$NON-NLS-1$
+	/**
+	 * @deprecated As of 3.6, replaced by
+	 *             {@link IWorkbenchCommandConstants#VIEWS_SHOW_VIEW_PARM_ID}
+	 */
+	public static final String VIEW_ID_PARM = IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_ID;
 
 	private IWorkbenchWindow window;
 
@@ -280,7 +283,9 @@ public class ShowViewMenu extends ContributionItem {
 
 		parms.parameters.put(VIEW_ID_PARM, viewId);
 		if (makeFast) {
-			parms.parameters.put(PARAMETER_MAKE_FAST, "true"); //$NON-NLS-1$
+			parms.parameters.put(
+					IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_FASTVIEW,
+					"true"); //$NON-NLS-1$
 		}
 		return parms;
 	}
@@ -352,7 +357,8 @@ public class ShowViewMenu extends ContributionItem {
 		Parameterization[] parms = null;
 		if (makeFast) {
 			try {
-				IParameter parmDef = c.getParameter(PARAMETER_MAKE_FAST);
+				IParameter parmDef = c
+						.getParameter(IWorkbenchCommandConstants.VIEWS_SHOW_VIEW_PARM_FASTVIEW);
 				parms = new Parameterization[] { new Parameterization(parmDef,
 						"true") //$NON-NLS-1$
 				};
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StickyViewManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StickyViewManager.java
index e961b1e..8fe8fd6 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StickyViewManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/StickyViewManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.PartInitException;
@@ -108,19 +109,40 @@ public class StickyViewManager implements IStickyViewManager {
 		}
 		IViewRegistry viewReg = WorkbenchPlugin.getDefault().getViewRegistry();
 		IStickyViewDescriptor[] stickyDescs = viewReg.getStickyViews();
+		IViewReference[] oldPerspectiveViewReferences = oldPersp
+				.getViewReferences();
+		IViewReference[] newPerspectiveViewReferences = newPersp
+				.getViewReferences();
 		for (int i = 0; i < stickyDescs.length; i++) {
 			final String viewId = stickyDescs[i].getId();
 			try {
-				// show a sticky view if it was in the last perspective and
-				// hasn't already been activated in this one
-				if (oldPersp.findView(viewId) != null) {
-					page.showView(viewId, null, IWorkbenchPage.VIEW_CREATE);
+				for (int j = 0; j < oldPerspectiveViewReferences.length; j++) {
+					String oldViewId = oldPerspectiveViewReferences[j].getId();
+					// check to see if a sticky view was shown in the previous
+					// perspective
+					if (viewId.equals(oldViewId)) {
+						String oldViewSecondaryId = oldPerspectiveViewReferences[j]
+								.getSecondaryId();
+						// materialize the same one in the new perspective
+						page.showView(viewId, oldViewSecondaryId,
+								IWorkbenchPage.VIEW_CREATE);
+					}
 				}
-				// remove a view if it's sticky and its not visible in the old
-				// perspective
-				else if (newPersp.findView(viewId) != null
-						&& oldPersp.findView(viewId) == null) {
-					page.hideView(newPersp.findView(viewId));
+
+				for (int j = 0; j < newPerspectiveViewReferences.length; j++) {
+					String newViewId = newPerspectiveViewReferences[j].getId();
+					// check if a sticky view is being shown in the new
+					// perspective
+					if (viewId.equals(newViewId)) {
+						String newViewSecondaryId = newPerspectiveViewReferences[j]
+								.getSecondaryId();
+						// if the original perspective didn't have it, that
+						// means this sticky view has been hidden, hide it in
+						// the new perspective also
+						if (oldPersp.findView(newViewId, newViewSecondaryId) == null) {
+							page.hideView(newPerspectiveViewReferences[j]);
+						}
+					}
 				}
 			} catch (PartInitException e) {
 				WorkbenchPlugin
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UILockListener.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UILockListener.java
index b8cdf0e..1d8456a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UILockListener.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/UILockListener.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -137,6 +137,15 @@ public class UILockListener extends LockListener {
         pendingWork.add(work);
     }
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.jobs.LockListener#canBlock()
+	 */
+	public boolean canBlock() {
+		return !isUI();
+	}
+
     /**
      * Should always be called from the UI thread.
      */
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java
index fe9b3c2..b55a4e5 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -270,7 +270,7 @@ public class ViewFactory implements IExtensionChangeHandler {
             //for dynamic UI - add the next line to replace subsequent code that is commented out
             restoreViewState(mem[i]);
         }
-        return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+        return Status.OK_STATUS;
     }
 
     /**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java
index fa8c9a8..f3bc5c0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewIntroAdapterPart.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.IWorkbenchPartSite;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.internal.intro.IntroMessages;
+import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.intro.IIntroPart;
 import org.eclipse.ui.intro.IIntroSite;
 import org.eclipse.ui.part.ViewPart;
@@ -188,12 +189,21 @@ public final class ViewIntroAdapterPart extends ViewPart {
 		WorkbenchWindow window = (WorkbenchWindow) getSite()
 				.getWorkbenchWindow();
 		
-		final boolean layout = (visible != window.getCoolBarVisible())
-				|| (visible != window.getPerspectiveBarVisible()); // don't layout unless things have actually changed
+		boolean layout = false; // don't layout unless things have actually changed
 		if (visible) {
-			window.setCoolBarVisible(true);
-			window.setPerspectiveBarVisible(true);
+			// Restore the last 'saved' state
+			boolean coolbarVisible = PrefUtil
+					.getInternalPreferenceStore().getBoolean(
+							IPreferenceConstants.COOLBAR_VISIBLE);
+			boolean persBarVisible = PrefUtil
+					.getInternalPreferenceStore().getBoolean(
+							IPreferenceConstants.PERSPECTIVEBAR_VISIBLE);
+			layout = (coolbarVisible != window.getCoolBarVisible())
+				|| (persBarVisible != window.getPerspectiveBarVisible());
+			window.setCoolBarVisible(coolbarVisible);
+			window.setPerspectiveBarVisible(persBarVisible);
 		} else {
+			layout = window.getCoolBarVisible() || window.getPerspectiveBarVisible();
 			window.setCoolBarVisible(false);
 			window.setPerspectiveBarVisible(false);
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java
index b343631..99e662b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewReference.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,8 @@
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
+import org.eclipse.ui.internal.testing.ContributionInfoMessages;
+
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
@@ -37,6 +39,7 @@ import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.menus.IMenuService;
 import org.eclipse.ui.part.IWorkbenchPartOrientation;
 import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.testing.ContributionInfo;
 import org.eclipse.ui.views.IViewDescriptor;
 import org.eclipse.ui.views.IViewRegistry;
 
@@ -359,6 +362,11 @@ class ViewReference extends WorkbenchPartReference implements IViewReference {
 			// Create the top-level composite
 			{
 				Composite parent = (Composite) pane.getControl();
+				ViewDescriptor descriptor = (ViewDescriptor) this.factory.viewReg.find(getId());
+				if (descriptor != null && descriptor.getPluginId() != null) {
+					parent.setData(new ContributionInfo(descriptor.getPluginId(),
+							ContributionInfoMessages.ContributionInfo_View, null));
+				}
 				content = new Composite(parent, style);
 				content.setLayout(new FillLayout());
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java
index 7e3c930..98a495f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WWinPartService.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,9 +72,12 @@ public class WWinPartService implements IPartService {
     }
     private IPartListener2 partListner = new WWinListener();
 
-    /**
-     * Creates a new part service for a workbench window.
-     */
+	/**
+	 * Creates a new part service for a workbench window.
+	 * 
+	 * @param window
+	 *            the workbench window
+	 */
     public WWinPartService(IWorkbenchWindow window) {
         selectionService = new WindowSelectionService(window);
     }
@@ -128,7 +131,7 @@ public class WWinPartService implements IPartService {
             activeRef = activePage.getActivePartReference();
         }
         
-        partService.setActivePart(activeRef);
+		partService.setActivePart(activeRef);
         selectionService.setActivePart(activePart);
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index eb7fa1e..d81199e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -9,10 +9,13 @@
  *     IBM Corporation - initial API and implementation
  *     Francis Upton - <francisu at ieee.org> - 
  *     		Fix for Bug 217777 [Workbench] Workbench event loop does not terminate if Display is closed
+ *     Tasktop Technologies -  Bug 304716 -  [UX] [Progress] Show Eclipse startup progress in the Eclipse icon on the Windows 7 Task Bar
+ *     Tom Schindl -  Bug 310153 -  Allow people to use CSS in 3.x plugins
  *******************************************************************************/
 
 package org.eclipse.ui.internal;
 
+import com.ibm.icu.util.ULocale;
 import java.io.BufferedInputStream;
 import java.io.BufferedReader;
 import java.io.File;
@@ -22,6 +25,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
+import java.lang.reflect.Constructor;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Dictionary;
@@ -29,7 +33,6 @@ import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.List;
 import java.util.Set;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.CommandManager;
 import org.eclipse.core.commands.common.EventManager;
@@ -46,6 +49,7 @@ import org.eclipse.core.runtime.IProduct;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IRegistryChangeEvent;
 import org.eclipse.core.runtime.IRegistryChangeListener;
+import org.eclipse.core.runtime.ISafeRunnable;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.MultiStatus;
@@ -56,11 +60,11 @@ import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.ExternalActionManager;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.ExternalActionManager.CommandCallback;
 import org.eclipse.jface.action.ExternalActionManager.IActiveChecker;
 import org.eclipse.jface.action.ExternalActionManager.IExecuteApplicable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.bindings.BindingManager;
 import org.eclipse.jface.bindings.BindingManagerEvent;
 import org.eclipse.jface.bindings.IBindingManagerListener;
@@ -92,6 +96,8 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TaskBar;
+import org.eclipse.swt.widgets.TaskItem;
 import org.eclipse.ui.IDecoratorManager;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorRegistry;
@@ -152,6 +158,7 @@ import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.internal.misc.UIStats;
 import org.eclipse.ui.internal.model.ContributionService;
 import org.eclipse.ui.internal.progress.ProgressManager;
+import org.eclipse.ui.internal.progress.ProgressManagerUtil;
 import org.eclipse.ui.internal.registry.IActionSetDescriptor;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
 import org.eclipse.ui.internal.registry.UIExtensionTracker;
@@ -164,8 +171,10 @@ import org.eclipse.ui.internal.services.ServiceLocator;
 import org.eclipse.ui.internal.services.ServiceLocatorCreator;
 import org.eclipse.ui.internal.services.SourceProviderService;
 import org.eclipse.ui.internal.services.WorkbenchLocationService;
+import org.eclipse.ui.internal.services.WorkbenchServiceRegistry;
 import org.eclipse.ui.internal.splash.EclipseSplashHandler;
 import org.eclipse.ui.internal.splash.SplashHandlerFactory;
+import org.eclipse.ui.internal.testing.ContributionInfoMessages;
 import org.eclipse.ui.internal.testing.WorkbenchTestable;
 import org.eclipse.ui.internal.themes.ColorDefinition;
 import org.eclipse.ui.internal.themes.FontDefinition;
@@ -174,6 +183,7 @@ import org.eclipse.ui.internal.themes.WorkbenchThemeManager;
 import org.eclipse.ui.internal.tweaklets.GrabFocus;
 import org.eclipse.ui.internal.tweaklets.Tweaklets;
 import org.eclipse.ui.internal.tweaklets.WorkbenchImplementation;
+import org.eclipse.ui.internal.util.BundleUtility;
 import org.eclipse.ui.internal.util.PrefUtil;
 import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.intro.IIntroManager;
@@ -189,17 +199,17 @@ import org.eclipse.ui.services.ISourceProviderService;
 import org.eclipse.ui.splash.AbstractSplashHandler;
 import org.eclipse.ui.statushandlers.StatusManager;
 import org.eclipse.ui.swt.IFocusService;
+import org.eclipse.ui.testing.ContributionInfo;
 import org.eclipse.ui.themes.IThemeManager;
 import org.eclipse.ui.views.IViewRegistry;
 import org.eclipse.ui.wizards.IWizardRegistry;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.framework.SynchronousBundleListener;
 
-import com.ibm.icu.util.ULocale;
-
 /**
  * The workbench class represents the top of the Eclipse user interface. Its
  * primary responsability is the management of workbench windows, dialogs,
@@ -216,6 +226,165 @@ import com.ibm.icu.util.ULocale;
  */
 public final class Workbench extends EventManager implements IWorkbench {
 
+	private final class TaskBarDelegatingProgressMontior implements IProgressMonitor {
+		private final Shell shell;
+		private IProgressMonitor progessMonitor;
+		private TaskItem systemTaskItem;
+		private int totalWork;
+		private int totalWorked;
+
+		public TaskBarDelegatingProgressMontior(IProgressMonitor progressMonitor, Shell shell) {
+			Assert.isNotNull(progressMonitor);
+			this.shell = shell;
+			this.progessMonitor = progressMonitor;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String,
+		 * int)
+		 */
+		public void beginTask(String name, int totalWork) {
+			progessMonitor.beginTask(name, totalWork);
+			if (this.totalWork == 0) {
+				this.totalWork = totalWork;
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.IProgressMonitor#worked(int)
+		 */
+		public void worked(int work) {
+			progessMonitor.worked(work);
+			totalWorked += work;
+			if (Display.getCurrent() != null) {
+				handleTaskBarProgressUpdated();
+			} else if (getDisplay() != null && !getDisplay().isDisposed()) {
+				getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						handleTaskBarProgressUpdated();
+					}
+				});
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.IProgressMonitor#done()
+		 */
+		public void done() {
+			progessMonitor.done();
+
+			if (Display.getCurrent() != null) {
+				handleTaskBarProgressDone();
+			} else if (getDisplay() != null && !getDisplay().isDisposed()) {
+				getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						handleTaskBarProgressDone();
+					}
+				});
+			}
+		}
+
+		private TaskItem getTaskItem(Shell shell) {
+			if (Display.getCurrent() == null) {
+				return null;
+			}
+			if (systemTaskItem == null) {
+				if (getDisplay() != null && shell != null && !shell.isDisposed()) {
+					TaskBar systemTaskBar = getDisplay().getSystemTaskBar();
+					if (systemTaskBar != null) {
+						systemTaskItem = systemTaskBar.getItem(shell);
+						if (systemTaskItem == null) {
+							// fall back to the application TaskItem if there
+							// isn't one for the shell
+							systemTaskItem = systemTaskBar.getItem(null);
+						}
+					}
+				}
+			}
+			return systemTaskItem;
+		}
+
+		private void handleTaskBarProgressUpdated() {
+			if (systemTaskItem == null) {
+				systemTaskItem = getTaskItem(shell);
+			}
+			if (systemTaskItem != null && !systemTaskItem.isDisposed()) {
+				if (systemTaskItem.getProgressState() != SWT.NORMAL) {
+					systemTaskItem.setProgressState(SWT.NORMAL);
+				}
+				float percentComplete = ((float) totalWorked / (float) totalWork) * 100f;
+				systemTaskItem.setProgress(Math.round(percentComplete));
+			}
+		}
+
+		private void handleTaskBarProgressDone() {
+			if (systemTaskItem == null) {
+				systemTaskItem = getTaskItem(shell);
+			}
+			if (systemTaskItem != null && !systemTaskItem.isDisposed()) {
+				if (systemTaskItem.getProgressState() != SWT.DEFAULT) {
+					systemTaskItem.setProgressState(SWT.DEFAULT);
+				}
+			}
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double)
+		 */
+		public void internalWorked(double work) {
+			progessMonitor.internalWorked(work);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled()
+		 */
+		public boolean isCanceled() {
+			return progessMonitor.isCanceled();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean)
+		 */
+		public void setCanceled(boolean value) {
+			progessMonitor.setCanceled(value);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String
+		 * )
+		 */
+		public void setTaskName(String name) {
+			progessMonitor.setTaskName(name);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String)
+		 */
+		public void subTask(String name) {
+			progessMonitor.subTask(name);
+		}
+
+	}
+
 	private final class StartupProgressBundleListener implements
 			SynchronousBundleListener {
 
@@ -390,6 +559,8 @@ public final class Workbench extends EventManager implements IWorkbench {
 	private ListenerList workbenchListeners = new ListenerList(
 			ListenerList.IDENTITY);
 
+	private ServiceRegistration workbenchService;
+
 	/**
 	 * Creates a new workbench.
 	 * 
@@ -516,6 +687,11 @@ public final class Workbench extends EventManager implements IWorkbench {
 			Display.setAppName(applicationName);
 		}
 
+		String appVersion = WorkbenchPlugin.getDefault().getAppVersion();
+		if (appVersion != null) {
+			Display.setAppVersion(appVersion);
+		}
+
 		// create the display
 		Display newDisplay = Display.getCurrent();
 		if(newDisplay == null) {
@@ -1371,6 +1547,13 @@ public final class Workbench extends EventManager implements IWorkbench {
 		});
 		
 
+		StartupThreading.runWithoutExceptions(new StartupRunnable() {
+
+			public void runWithException() {
+				startSourceProviders();
+			}
+		});
+
 		// attempt to restore a previous workbench state
 		try {
 			UIStats.start(UIStats.RESTORE_WORKBENCH, "Workbench"); //$NON-NLS-1$
@@ -1558,8 +1741,6 @@ public final class Workbench extends EventManager implements IWorkbench {
 		// TODO Correctly order service initialization
 		// there needs to be some serious consideration given to
 		// the services, and hooking them up in the correct order
-		final IEvaluationService evaluationService = 
-			(IEvaluationService) serviceLocator.getService(IEvaluationService.class);
 		
 		
 
@@ -1645,48 +1826,17 @@ public final class Workbench extends EventManager implements IWorkbench {
 				menuService.readRegistry();
 			}});
 
-		/*
-		 * Phase 2 of the initialization of commands. The source providers that
-		 * the workbench provides are creating and registered with the above
-		 * services. These source providers notify the services when particular
-		 * pieces of workbench state change.
-		 */
-		final SourceProviderService sourceProviderService = new SourceProviderService(serviceLocator);
-		serviceLocator.registerService(ISourceProviderService.class,
-				sourceProviderService);
-		StartupThreading.runWithoutExceptions(new StartupRunnable() {
 
-			public void runWithException() {
-				// this currently instantiates all players ... sigh
-				sourceProviderService.readRegistry();
-				ISourceProvider[] sp = sourceProviderService.getSourceProviders();
-				for (int i = 0; i < sp.length; i++) {
-					evaluationService.addSourceProvider(sp[i]);
-					if (!(sp[i] instanceof ActiveContextSourceProvider)) {
-						contextService.addSourceProvider(sp[i]);
-					}
-				}
-			}});
-						
+		// the source providers are now initialized in phase 3, but source
+		// priorities have to be set before handler initialization
 		StartupThreading.runWithoutExceptions(new StartupRunnable() {
-
 			public void runWithException() {
-				// these guys are need to provide the variables they say
-				// they source
-				actionSetSourceProvider = (ActionSetSourceProvider) sourceProviderService
-						.getSourceProvider(ISources.ACTIVE_ACTION_SETS_NAME);
-
-				FocusControlSourceProvider focusControl = (FocusControlSourceProvider) sourceProviderService
-						.getSourceProvider(ISources.ACTIVE_FOCUS_CONTROL_ID_NAME);
-				serviceLocator.registerService(IFocusService.class,
-						focusControl);
-
-				menuSourceProvider = (MenuSourceProvider) sourceProviderService
-						.getSourceProvider(ISources.ACTIVE_MENU_NAME);
-			}});
+				initializeSourcePriorities();
+			}
+		});
 		
 		/*
-		 * Phase 3 of the initialization of commands. This handles the creation
+		 * Phase 2 of the initialization of commands. This handles the creation
 		 * of wrappers for legacy APIs. By the time this phase completes, any
 		 * code trying to access commands through legacy APIs should work.
 		 */
@@ -1819,6 +1969,11 @@ public final class Workbench extends EventManager implements IWorkbench {
 			// fall back to starting without showing progress.
 			runnable.run();
 		} else {
+			Shell shell = null;
+			if (handler != null) {
+				shell = handler.getSplash();
+			}
+			progressMonitor = new TaskBarDelegatingProgressMontior(progressMonitor, shell);
 			progressMonitor.beginTask("", expectedProgressCount); //$NON-NLS-1$
 			SynchronousBundleListener bundleListener = new StartupProgressBundleListener(
 					progressMonitor, (int) (expectedProgressCount * cutoff));
@@ -1885,8 +2040,7 @@ public final class Workbench extends EventManager implements IWorkbench {
 					IWorkbenchConfigurer.RESTORE_CODE_RESET, msg, null);
 		}
 
-		final IStatus result[] = { new Status(IStatus.OK,
-				WorkbenchPlugin.PI_WORKBENCH, IStatus.OK, "", null) }; //$NON-NLS-1$
+		final IStatus result[] = { Status.OK_STATUS };
 		SafeRunner.run(new SafeRunnable(WorkbenchMessages.ErrorReadingState) {
 			public void run() throws Exception {
 				FileInputStream input = new FileInputStream(stateFile);
@@ -2122,15 +2276,14 @@ public final class Workbench extends EventManager implements IWorkbench {
 	}
 
 	/**
-	 * Returns the ids of all plug-ins that extend the
+	 * Returns contribution infos for all plug-ins that extend the
 	 * <code>org.eclipse.ui.startup</code> extension point.
 	 * 
 	 * @return the ids of all plug-ins containing 1 or more startup extensions
 	 */
-	public String[] getEarlyActivatedPlugins() {
-		IExtensionPoint point = Platform.getExtensionRegistry()
-				.getExtensionPoint(PlatformUI.PLUGIN_ID,
-						IWorkbenchRegistryConstants.PL_STARTUP);
+	public ContributionInfo[] getEarlyActivatedPlugins() {
+		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
+				PlatformUI.PLUGIN_ID, IWorkbenchRegistryConstants.PL_STARTUP);
 		IExtension[] extensions = point.getExtensions();
 		ArrayList pluginIds = new ArrayList(extensions.length);
 		for (int i = 0; i < extensions.length; i++) {
@@ -2139,7 +2292,13 @@ public final class Workbench extends EventManager implements IWorkbench {
 				pluginIds.add(id);
 			}
 		}
-		return (String[]) pluginIds.toArray(new String[pluginIds.size()]);
+		ContributionInfo[] result = new ContributionInfo[pluginIds.size()];
+		for (int i = 0; i < result.length; i++) {
+			result[i] = new ContributionInfo((String) pluginIds.get(i),
+					ContributionInfoMessages.ContributionInfo_EarlyStartupPlugin, null);
+
+		}
+		return result;
 	}
 
 	/**
@@ -2155,6 +2314,64 @@ public final class Workbench extends EventManager implements IWorkbench {
 		return Util.getArrayFromList(pref, ";"); //$NON-NLS-1$
 	}
 
+	private void initializeSourcePriorities() {
+		WorkbenchServiceRegistry.getRegistry().initializeSourcePriorities();
+	}
+
+	private void startSourceProviders() {
+		/*
+		 * Phase 3 of the initialization of commands. The source providers that
+		 * the workbench provides are creating and registered with the above
+		 * services. These source providers notify the services when particular
+		 * pieces of workbench state change.
+		 */
+		final IEvaluationService evaluationService = (IEvaluationService) serviceLocator
+				.getService(IEvaluationService.class);
+		final IContextService contextService = (IContextService) serviceLocator
+				.getService(IContextService.class);
+
+		final SourceProviderService sourceProviderService = new SourceProviderService(
+				serviceLocator);
+		serviceLocator.registerService(ISourceProviderService.class, sourceProviderService);
+		SafeRunner.run(new ISafeRunnable() {
+			public void run() throws Exception {
+				// this currently instantiates all players ... sigh
+				sourceProviderService.readRegistry();
+				ISourceProvider[] sp = sourceProviderService.getSourceProviders();
+				for (int i = 0; i < sp.length; i++) {
+					evaluationService.addSourceProvider(sp[i]);
+					if (!(sp[i] instanceof ActiveContextSourceProvider)) {
+						contextService.addSourceProvider(sp[i]);
+					}
+				}
+			}
+
+			public void handleException(Throwable exception) {
+				WorkbenchPlugin.log("Failed to initialize a source provider", exception); //$NON-NLS-1$
+			}
+		});
+
+		SafeRunner.run(new ISafeRunnable() {
+			public void run() throws Exception {
+				// these guys are need to provide the variables they say
+				// they source
+				actionSetSourceProvider = (ActionSetSourceProvider) sourceProviderService
+						.getSourceProvider(ISources.ACTIVE_ACTION_SETS_NAME);
+
+				FocusControlSourceProvider focusControl = (FocusControlSourceProvider) sourceProviderService
+						.getSourceProvider(ISources.ACTIVE_FOCUS_CONTROL_ID_NAME);
+				serviceLocator.registerService(IFocusService.class, focusControl);
+
+				menuSourceProvider = (MenuSourceProvider) sourceProviderService
+						.getSourceProvider(ISources.ACTIVE_MENU_NAME);
+			}
+
+			public void handleException(Throwable exception) {
+				WorkbenchPlugin.log("Failed to initialize a source provider", exception); //$NON-NLS-1$
+			}
+		});
+	}
+
 	/*
 	 * Starts all plugins that extend the <code> org.eclipse.ui.startup </code>
 	 * extension point, and that the user has not disabled via the preference
@@ -2249,6 +2466,21 @@ public final class Workbench extends EventManager implements IWorkbench {
 		if (createSplash)
 			createSplashWrapper();
 
+		// activate styling if available
+		Bundle stylingBundle = Platform.getBundle("org.eclipse.e4.ui.css.swt.theme"); //$NON-NLS-1$
+		if (BundleUtility.isReady(stylingBundle)) {
+			try {
+				Class c = stylingBundle
+						.loadClass("org.eclipse.e4.ui.css.swt.internal.theme.BootstrapTheme3x"); //$NON-NLS-1$
+				Constructor constructor = c.getConstructor(new Class[] { Display.class });
+				constructor.newInstance(new Object[] { display });
+			} catch (Exception ex) {
+				WorkbenchPlugin.log(StatusUtil.newStatus(IStatus.WARNING,
+						"Could not start styling support.", //$NON-NLS-1$
+						ex));
+			}
+		}
+
 		// ModalContext should not spin the event loop (there is no UI yet to
 		// block)
 		ModalContext.setAllowReadAndDispatch(false);
@@ -2344,6 +2576,9 @@ public final class Workbench extends EventManager implements IWorkbench {
 			}
 
 			if (initOK[0] && runEventLoop) {
+				workbenchService = WorkbenchPlugin.getDefault()
+						.getBundleContext().registerService(
+								IWorkbench.class.getName(), this, null);
 				// start eager plug-ins
 				startPlugins();
 				addStartupRegistryListener();
@@ -2742,6 +2977,8 @@ public final class Workbench extends EventManager implements IWorkbench {
 		workbenchListeners.clear();
 
 		cancelEarlyStartup();
+		if (workbenchService != null)
+			workbenchService.unregister();
 
 		// for dynamic UI
 		Platform.getExtensionRegistry().removeRegistryChangeListener(
@@ -3000,8 +3237,9 @@ public final class Workbench extends EventManager implements IWorkbench {
 
 	private void updateActiveWorkbenchWindowMenuManager(boolean textOnly) {
 		if (activeWorkbenchWindow != null) {
-			activeWorkbenchWindow
-					.removeActionSetsListener(actionSetSourceProvider);
+			if (actionSetSourceProvider != null) {
+				activeWorkbenchWindow.removeActionSetsListener(actionSetSourceProvider);
+			}
 			activeWorkbenchWindow = null;
 		}
 		boolean actionSetsUpdated = false;
@@ -3018,17 +3256,14 @@ public final class Workbench extends EventManager implements IWorkbench {
 			final Shell windowShell = activeWorkbenchWindow.getShell();
 			final Shell activeShell = getDisplay().getActiveShell();
 			final IContextService service = (IContextService) getService(IContextService.class);
-			if (Util.equals(windowShell, activeShell)
-					|| service.getShellType(activeShell) == IContextService.TYPE_WINDOW) {
-				activeWorkbenchWindow
-						.addActionSetsListener(actionSetSourceProvider);
-				final WorkbenchPage page = activeWorkbenchWindow
-						.getActiveWorkbenchPage();
+			if ((Util.equals(windowShell, activeShell) || service.getShellType(activeShell) == IContextService.TYPE_WINDOW)
+					&& actionSetSourceProvider != null) {
+				activeWorkbenchWindow.addActionSetsListener(actionSetSourceProvider);
+				final WorkbenchPage page = activeWorkbenchWindow.getActiveWorkbenchPage();
 				final IActionSetDescriptor[] newActionSets;
 				if (page != null) {
 					newActionSets = page.getActionSets();
-					final ActionSetsEvent event = new ActionSetsEvent(
-							newActionSets);
+					final ActionSetsEvent event = new ActionSetsEvent(newActionSets);
 					actionSetSourceProvider.actionSetsChanged(event);
 					actionSetsUpdated = true;
 				}
@@ -3044,7 +3279,7 @@ public final class Workbench extends EventManager implements IWorkbench {
 			}
 		}
 
-		if (!actionSetsUpdated) {
+		if (!actionSetsUpdated && actionSetSourceProvider != null) {
 			final ActionSetsEvent event = new ActionSetsEvent(null);
 			actionSetSourceProvider.actionSetsChanged(event);
 		}
@@ -3568,4 +3803,17 @@ public final class Workbench extends EventManager implements IWorkbench {
 		return serviceLocator;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IWorkbench#getModalDialogShellProvider()
+	 */
+	public IShellProvider getModalDialogShellProvider() {
+		return new IShellProvider() {
+			public Shell getShell() {
+				return ProgressManagerUtil.getDefaultParent();
+			}
+		};
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java
index ebb8cbf..ba04d78 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchImages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ImageRegistry;
@@ -84,18 +83,19 @@ public/*final*/class WorkbenchImages {
 
     private final static String PATH_EVIEW = ICONS_PATH + "eview16/"; //View icons//$NON-NLS-1$
 
-    //private final static String PATH_PROD = ICONS_PATH+"prod/";	//Product images
+	private final static String PATH_OVERLAY = ICONS_PATH + "ovr16/"; //$NON-NLS-1$
+
     private final static String PATH_OBJECT = ICONS_PATH + "obj16/"; //Model object icons//$NON-NLS-1$
 
     private final static String PATH_POINTER = ICONS_PATH + "pointer/"; //Pointer icons//$NON-NLS-1$
 
     private final static String PATH_WIZBAN = ICONS_PATH + "wizban/"; //Wizard icons//$NON-NLS-1$
 	
+	// private final static String PATH_PROD = ICONS_PATH+"prod/"; //Product
+	// images
+	// private final static String PATH_STAT = ICONS_PATH+"stat/";
+	// private final static String PATH_MISC = ICONS_PATH+"misc/";
 
-    //private final static String PATH_STAT = ICONS_PATH+"stat/";
-    //private final static String PATH_MISC = ICONS_PATH+"misc/";
-    //private final static String PATH_OVERLAY = ICONS_PATH+"ovr16/";
-    
     /**
      * Declares a workbench image given the path of the image file (relative to
      * the workbench plug-in). This is a helper method that creates the image
@@ -141,8 +141,11 @@ public/*final*/class WorkbenchImages {
      * internal ones.
      */
     private final static void declareImages() {
-		
-    	
+		// Overlays
+		declareImage(ISharedImages.IMG_DEC_FIELD_ERROR, PATH_OVERLAY + "error_ovr.gif", true); //$NON-NLS-1$
+		declareImage(ISharedImages.IMG_DEC_FIELD_WARNING, PATH_OVERLAY + "warning_ovr.gif", true); //$NON-NLS-1$
+
+		// Pinning
 	    declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR,
                 PATH_ETOOL + "pin_editor.gif", false); //$NON-NLS-1$
         declareImage(IWorkbenchGraphicConstants.IMG_ETOOL_PIN_EDITOR_DISABLED,
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchIntroManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchIntroManager.java
index 3b20802..b62dc40 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchIntroManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchIntroManager.java	
@@ -222,7 +222,7 @@ public class WorkbenchIntroManager implements IIntroManager {
 				.getPage();
 		IViewReference reference = page
 				.findViewReference(IIntroConstants.INTRO_VIEW_ID);
-		if (reference != null && page.isFastView(reference))
+		if (page.isFastView(reference))
 			return true;
 
         return !((PartSite) viewIntroAdapterPart.getSite()).getPane()
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
index 1849c48..1c3e947 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  * Contributors:
  * IBM - Initial API and implementation
  * Sebastian Davids - bug 128529
+ * Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
@@ -335,6 +336,12 @@ public class WorkbenchMessages extends NLS {
 	public static String AboutSystemDialog_noLogTitle;
 	public static String AboutSystemDialog_noLogMessage;
 
+
+	public static String AboutSystemPage_FetchJobTitle;
+
+
+	public static String AboutSystemPage_RetrievingSystemInfo;
+
 	// --- Shortcutbar ---
 	public static String PerspectiveBarContributionItem_toolTip;
 	public static String PerspectiveBarNewContributionItem_toolTip;
@@ -499,10 +506,13 @@ public class WorkbenchMessages extends NLS {
 	public static String OpenPerspectiveMode_sameWindow;
 	public static String OpenPerspectiveMode_newWindow;
 
+	public static String FastViewsGroup_title;
 	public static String OpenViewMode_title;
 	public static String OpenViewMode_embed;
 	public static String OpenViewMode_fast;
 
+	public static String FastViewBar_hide;
+
 	public static String PerspectivesPreference_MakeDefault;
 	public static String PerspectivesPreference_MakeDefaultTip;
 	public static String PerspectivesPreference_Reset;
@@ -618,6 +628,7 @@ public class WorkbenchMessages extends NLS {
 	public static String ExternalEditor_errorMessage;
 	public static String Save;
 	public static String Save_Resource;
+	public static String Saving_Modifications;
 	public static String Save_All;
 
 
@@ -638,6 +649,7 @@ public class WorkbenchMessages extends NLS {
 
 	public static String Perspective_problemRestoringTitle;
 	public static String Perspective_errorReadingState;
+	public static String Perspective_localCopyLabel;
 	public static String Perspective_problemLoadingTitle;
 	public static String WorkbenchPage_problemRestoringTitle;
 	public static String WorkbenchPage_errorReadingState;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index beec7bb..f649781 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java	
@@ -22,7 +22,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.StringTokenizer;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -587,6 +586,10 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
      *            the part to activate
      */
     public void activate(IWorkbenchPart part) {
+		internalActivate(part, false);
+	}
+
+	private void internalActivate(IWorkbenchPart part, boolean force) {
         // Sanity check.
         if (!certifyPart(part)) {
 			return;
@@ -611,7 +614,7 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
         //if (window.getActivePage() == this) {
         IWorkbenchPartReference ref = getReference(part);
         internalBringToTop(ref);
-        setActivePart(part);
+		setActivePart(part, force);
     }
 
     /**
@@ -839,7 +842,8 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
             
             if (newPartContainer == activePartContainer) {
                 makeActive(ref);
-            } else if (newPartContainer == activeEditorContainer) {
+			} else if (newPartContainer != null
+					&& newPartContainer == activeEditorContainer) {
                 if (ref instanceof IEditorReference) {
                 	if (part!=null) {
                     	IWorkbenchPartSite site = part.getSite();
@@ -1237,11 +1241,11 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
      */
     private void makeActive(IWorkbenchPartReference ref) {
         if (ref == null) {
-            setActivePart(null);
+			setActivePart(null, false);
         } else {
             IWorkbenchPart newActive = ref.getPart(true);
             if (newActive == null) {
-                setActivePart(null);
+				setActivePart(null, false);
             } else {
                 activate(newActive);
             }
@@ -1611,7 +1615,9 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
 		}
 
         if(saveEditors) {
-        	if (!saveAllEditors(true)) {
+        	// directly call to the editor manager that we're saving and closing
+        	// parts, see bug 272070
+			if (!getEditorManager().saveAll(true, true, false)) {
         		return;
         	}
         }
@@ -3068,7 +3074,7 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
         }
 
         // Real work.
-        setActivePart(part);
+		setActivePart(part, false);
     }
 
     /**
@@ -3470,9 +3476,9 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
     /**
      * Sets the active part.
      */
-    private void setActivePart(IWorkbenchPart newPart) {
+	private void setActivePart(IWorkbenchPart newPart, boolean force) {
         // Optimize it.
-        if (getActivePart() == newPart) {
+		if (!force && (getActivePart() == newPart)) {
             return;
         }
         
@@ -3872,9 +3878,9 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
                 IEditorPart activeEditor = getActiveEditor();
                 if (activeEditor != null
                         && previouslyActive instanceof IEditorPart) {
-					setActivePart(activeEditor);
+					setActivePart(activeEditor, false);
 				} else {
-					setActivePart(previouslyActive);
+					setActivePart(previouslyActive, false);
 				}
             }
         }
@@ -4692,6 +4698,11 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
      * <li>currently applies only to views</li>
      * <li>has no effect when view is zoomed</li>
      * </ul> 
+	 * <p>
+	 * <b>Note:</b> At the time of the writing of this note, this method does
+	 * not appear to be used anywhere in the workbench. Please refer to bug
+	 * 126622.
+	 * </p>
      */
     public void resizeView(IViewPart part, int width, int height) {
         SashInfo sashInfo = new SashInfo();
@@ -5103,6 +5114,29 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
 									continue;
 								activationList.bringToTop(results[i]);
 							}
+
+							// The first request for activation done above is
+							// required to properly position editor tabs.
+							// However, when it is done the updates are deferred
+							// and container of the editor is not visible.
+							// As a result the focus is not set.
+							// Therefore, find the first created editor and
+							// activate it again:
+							for (int i = 0; i < results.length; i++) {
+								if (results[i] == null)
+									continue;
+								IEditorPart editorPart = results[i]
+										.getEditor(true);
+								if (editorPart == null)
+									continue;
+								if (editorPart instanceof AbstractMultiEditor)
+									internalActivate(
+											((AbstractMultiEditor) editorPart)
+													.getActiveEditor(), true);
+								else
+									internalActivate(editorPart, true);
+								break;
+							}
 						} finally {
 							workbench.largeUpdateEnd();
 						}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java
index 4121767..6085404 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPlugin.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,13 +11,13 @@
 
 package org.eclipse.ui.internal;
 
+import com.ibm.icu.text.MessageFormat;
 import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Locale;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -76,8 +76,7 @@ import org.osgi.framework.BundleListener;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.SynchronousBundleListener;
-
-import com.ibm.icu.text.MessageFormat;
+import org.osgi.framework.Version;
 
 /**
  * This class represents the TOP of the workbench UI world
@@ -202,7 +201,7 @@ public class WorkbenchPlugin extends AbstractUIPlugin {
         editorRegistry = null;
 
         if (decoratorManager != null) {
-            decoratorManager.dispose();
+			decoratorManager.shutdown();
             decoratorManager = null;
         }
 
@@ -234,6 +233,7 @@ public class WorkbenchPlugin extends AbstractUIPlugin {
         	operationSupport.dispose();
         	operationSupport = null;
         }
+		DragCursors.dispose();
 
         DEBUG = false;
          
@@ -1057,6 +1057,18 @@ public class WorkbenchPlugin extends AbstractUIPlugin {
         return getProductInfo().getAppName();
     }
 
+	/**
+	 * Return the application version, as defined by the product.
+	 * 
+	 * @return the application version, or the empty version.
+	 * @see org.eclipse.swt.widgets.Display#setAppVersion
+	 * @see Version#emptyVersion
+	 * @since 3.6
+	 */
+	public String getAppVersion() {
+		return getProductInfo().getAppVersion();
+	}
+
     /**
      * Returns the name of the product.
      * 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java
index 8510e9e..e0c7521 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPreferenceInitializer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
  *******************************************************************************/
 package org.eclipse.ui.internal;
 
@@ -61,10 +62,14 @@ public class WorkbenchPreferenceInitializer extends
 		node.putBoolean(IWorkbenchPreferenceConstants.DISABLE_OPEN_EDITOR_IN_PLACE, false);
 		
 		node.putBoolean(IPreferenceConstants.USE_IPERSISTABLE_EDITORS, true);
+		
+		node.putBoolean(IPreferenceConstants.COOLBAR_VISIBLE, true);
+		node.putBoolean(IPreferenceConstants.PERSPECTIVEBAR_VISIBLE, true);
 
 		node.putInt(IPreferenceConstants.EDITOR_TAB_WIDTH, 3); // high
 		node.putInt(IPreferenceConstants.OPEN_VIEW_MODE,
 				IPreferenceConstants.OVM_EMBED);
+		node.putBoolean(IPreferenceConstants.FVB_HIDE, false);
 		node.putInt(IPreferenceConstants.OPEN_PERSP_MODE,
 				IPreferenceConstants.OPM_ACTIVE_PAGE);
 		node.put(IPreferenceConstants.ENABLED_DECORATORS, ""); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index 5d02a30..115bbde 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - Bug 302529 [UX] [Progress] Show Eclipse IDE progress in the Eclipse icon on the Windows 7 Task Bar
  *******************************************************************************/
 
 package org.eclipse.ui.internal;
@@ -19,7 +20,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
@@ -53,6 +53,7 @@ import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
 import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
 import org.eclipse.jface.internal.provisional.action.IToolBarManager2;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.jface.window.ApplicationWindow;
@@ -78,6 +79,8 @@ import org.eclipse.swt.widgets.Layout;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TaskBar;
+import org.eclipse.swt.widgets.TaskItem;
 import org.eclipse.ui.ActiveShellExpression;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IElementFactory;
@@ -127,6 +130,7 @@ import org.eclipse.ui.internal.misc.UIListenerLogging;
 import org.eclipse.ui.internal.misc.UIStats;
 import org.eclipse.ui.internal.presentations.DefaultActionBarPresentationFactory;
 import org.eclipse.ui.internal.progress.ProgressRegion;
+import org.eclipse.ui.internal.progress.TaskBarProgressManager;
 import org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2;
 import org.eclipse.ui.internal.provisional.presentations.IActionBarPresentationFactory;
 import org.eclipse.ui.internal.registry.ActionSetRegistry;
@@ -367,6 +371,12 @@ public class WorkbenchWindow extends ApplicationWindow implements
 		super(null);
 		this.number = number;
 
+		// Initialize a previous 'saved' state if applicable.
+		this.coolBarVisible = PrefUtil.getInternalPreferenceStore().getBoolean(
+				IPreferenceConstants.COOLBAR_VISIBLE);
+		this.perspectiveBarVisible = PrefUtil.getInternalPreferenceStore().getBoolean(
+				IPreferenceConstants.PERSPECTIVEBAR_VISIBLE);
+
 		// Make sure there is a workbench. This call will throw
 		// an exception if workbench not created yet.
 		final IWorkbench workbench = PlatformUI.getWorkbench();
@@ -801,6 +811,12 @@ public class WorkbenchWindow extends ApplicationWindow implements
 		if (!super.canHandleShellCloseEvent()) {
 			return false;
 		}
+
+		// Ensure that any pending 'Close' event are flushed
+		// before opening any dialogs
+		while (Display.getCurrent().readAndDispatch())
+			;
+
 		// let the advisor or other interested parties
 		// veto the user's explicit request to close the window
 		return fireWindowShellClosing();
@@ -1645,7 +1661,13 @@ public class WorkbenchWindow extends ApplicationWindow implements
 			return WorkbenchMessages.WorkbenchWindow_NavigateToolbar;
 		}
 
-		return null;
+		return (String) toolbarLabelContributions.get(actionSetId);
+	}
+
+	private Map toolbarLabelContributions = new HashMap();
+
+	public void putToolbarLabel(String id, String label) {
+		toolbarLabelContributions.put(id, label);
 	}
 
 	/**
@@ -1655,6 +1677,11 @@ public class WorkbenchWindow extends ApplicationWindow implements
 	private boolean hardClose() {
 		boolean result;
 		try {
+			// clear some lables
+			if (toolbarLabelContributions != null) {
+				toolbarLabelContributions.clear();
+				toolbarLabelContributions = null;
+			}
 			// Remove the handler submissions. Bug 64024.
 			final IWorkbench workbench = getWorkbench();
 			final IHandlerService handlerService = (IHandlerService) workbench.getService(IHandlerService.class);
@@ -2451,11 +2478,11 @@ public class WorkbenchWindow extends ApplicationWindow implements
 
 	/**
 	 * Helper method used for restoring an old cool bar layout. This method
-	 * reads the memento and populatates the item id's and wrap indicies.
+	 * reads the memento and populates the item id's and wrap indices.
 	 */
 	private boolean readLayout(IMemento memento, ArrayList itemIds,
 			ArrayList wrapIndicies) {
-		// Get the Wrap indicies
+		// Get the Wrap indices
 		IMemento[] wraps = memento
 				.getChildren(IWorkbenchConstants.TAG_ITEM_WRAP_INDEX);
 		if (wraps == null) {
@@ -2555,7 +2582,7 @@ public class WorkbenchWindow extends ApplicationWindow implements
 		boolean perspectiveBarWasEnabled = perspectiveBarControl == null ? false
 				: perspectiveBarControl.getEnabled();
 
-		// Cache for any diabled trim controls
+		// Cache for any disabled trim controls
 		List disabledControls = null;
 		
 		try {
@@ -3301,7 +3328,31 @@ public class WorkbenchWindow extends ApplicationWindow implements
 			progressRegion = new ProgressRegion();
 			progressRegion.createContents(shell, this);
 		}
+		if (shell.getDisplay() != null && shell.getDisplay().getSystemTaskBar() != null) {
+			// only create the TaskBarProgressManager if there is a TaskBar that
+			// the progress can be displayed on
+			TaskItem taskItem = null;
+			TaskBar systemTaskBar = shell.getDisplay().getSystemTaskBar();
+			taskItem = systemTaskBar.getItem(shell);
+			if (taskItem == null) {
+				// try to get the application TaskItem
+				taskItem = systemTaskBar.getItem(null);
+			}
 
+			if (taskItem != null) {
+				// If there is a TaskItem, see if there is
+				// TaskBarProgressManager already associated with it to make
+				// sure that we don't duplicate the progress information
+				String taskBarProgressManagerKey = TaskBarProgressManager.class.getName()
+						+ ".instance"; //$NON-NLS-1$
+				Object data = taskItem.getData(taskBarProgressManagerKey);
+				if (data == null || !(data instanceof TaskBarProgressManager)) {
+					taskItem.setData(taskBarProgressManagerKey,
+							new TaskBarProgressManager(taskItem));
+				}
+			}
+			
+		}
 	}
 
 	class PageList {
@@ -3597,7 +3648,7 @@ public class WorkbenchWindow extends ApplicationWindow implements
 	 * @since 3.0
 	 */
 	public boolean getCoolBarVisible() {
-		return coolBarVisible;
+		return getWindowConfigurer().getShowCoolBar() && coolBarVisible;
 	}
 
 	/**
@@ -3625,7 +3676,7 @@ public class WorkbenchWindow extends ApplicationWindow implements
 	 * @since 3.0
 	 */
 	public boolean getPerspectiveBarVisible() {
-		return perspectiveBarVisible;
+		return getWindowConfigurer().getShowPerspectiveBar() && perspectiveBarVisible;
 	}
 	
 	/**
@@ -4059,13 +4110,17 @@ public class WorkbenchWindow extends ApplicationWindow implements
 	public void toggleToolbarVisibility() {
 		boolean coolbarVisible = getCoolBarVisible();
 		boolean perspectivebarVisible = getPerspectiveBarVisible();
+		IPreferenceStore prefs = PrefUtil.getInternalPreferenceStore();
+
 		// only toggle the visibility of the components that
 		// were on initially
 		if (getWindowConfigurer().getShowCoolBar()) {
 			setCoolBarVisible(!coolbarVisible);
+			prefs.setValue(IPreferenceConstants.COOLBAR_VISIBLE, !coolbarVisible);
 		}
 		if (getWindowConfigurer().getShowPerspectiveBar()) {
 			setPerspectiveBarVisible(!perspectivebarVisible);
+			prefs.setValue(IPreferenceConstants.PERSPECTIVEBAR_VISIBLE, !perspectivebarVisible);
 		}
 		getShell().layout();
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java
index 9ed33c4..c3b801e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -365,7 +365,6 @@ public final class WorkbenchWindowConfigurer implements
      */
     public void setShowCoolBar(boolean show) {
         showToolBar = show;
-        window.setCoolBarVisible(show);
         // @issue need to be able to reconfigure after window's controls created
     }
 
@@ -397,7 +396,6 @@ public final class WorkbenchWindowConfigurer implements
      */
     public void setShowPerspectiveBar(boolean show) {
         showPerspectiveBar = show;
-        window.setPerspectiveBarVisible(show);
         // @issue need to be able to reconfigure after window's controls created
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java
index bfe2f3c..6886913 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkingSetManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -167,7 +167,6 @@ public class WorkingSetManager extends AbstractWorkingSetManager implements
 				message, exp);
 		StatusAdapter sa = new StatusAdapter(status);
 		sa.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, title);
-		StatusManager.getManager().handle(sa,
-				StatusManager.SHOW | StatusManager.LOG);
+		StatusManager.getManager().handle(sa, StatusManager.LOG);
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleData.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleData.java
index 55db469..1229094 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleData.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutBundleData.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.ui.internal.about;
 
 import java.io.IOException;
 import java.security.GeneralSecurityException;
-
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.osgi.signedcontent.SignedContent;
 import org.eclipse.osgi.signedcontent.SignedContentFactory;
@@ -105,17 +104,17 @@ public class AboutBundleData extends AboutData {
 		SignedContentFactory contentFactory = (SignedContentFactory) bundleContext
 				.getService(factoryRef);
 		try {
+			isSignedDetermined = true;
 			SignedContent signedContent = contentFactory.getSignedContent(bundle);
 			isSigned = signedContent != null && signedContent.isSigned();
-			isSignedDetermined = true;
-			return isSigned;
 		} catch (IOException e) {
-			throw (IllegalStateException) new IllegalStateException().initCause(e);
+			isSigned = false;
 		} catch (GeneralSecurityException e){
-			throw (IllegalStateException) new IllegalStateException().initCause(e);
+			isSigned = false;
 		} finally {
 			bundleContext.ungetService(factoryRef);
 		}
+		return isSigned;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutFeaturesPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutFeaturesPage.java
index 72e0084..138be88 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutFeaturesPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutFeaturesPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IBundleGroup;
 import org.eclipse.core.runtime.IBundleGroupProvider;
 import org.eclipse.core.runtime.Platform;
@@ -209,7 +208,8 @@ public class AboutFeaturesPage extends ProductInfoPage {
 		infoArea = new Composite(parent, SWT.BORDER);
 		infoArea.setBackground(infoArea.getDisplay().getSystemColor(
 				SWT.COLOR_LIST_BACKGROUND));
-		GridData data = new GridData(GridData.FILL, GridData.FILL, true, true);
+		infoArea.setBackgroundMode(SWT.INHERIT_FORCE);
+		GridData data = new GridData(GridData.FILL, GridData.FILL, true, false);
 		// need to provide space for arbitrary feature infos, not just the
 		// one selected by default
 		data.heightHint = convertVerticalDLUsToPixels(INFO_HEIGHT);
@@ -228,7 +228,10 @@ public class AboutFeaturesPage extends ProductInfoPage {
 
 		// text on the right
 		text = new StyledText(infoArea, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
-		text.setCaret(null);
+		
+		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263.
+//		text.setCaret(null);
+
 		text.setFont(parent.getFont());
 		data = new GridData(GridData.FILL, GridData.FILL, true, true);
 		text.setLayoutData(data);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutPluginsPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutPluginsPage.java
index 779a73c..a050666 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutPluginsPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutPluginsPage.java	
@@ -19,7 +19,6 @@ import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -526,26 +525,27 @@ public class AboutPluginsPage extends ProductInfoPage {
 	}
 
 	/**
-     * Check if the currently selected plugin has additional information to
-     * show.
-     * @param bundleInfo 
-     * 
-     * @return true if the selected plugin has additional info available to
-     *         display
-     */
-    private boolean selectionHasInfo(AboutBundleData bundleInfo) {
-        
-        URL infoURL = getMoreInfoURL(bundleInfo, false);
-
-        // only report ini problems if the -debug command line argument is used
-        if (infoURL == null && WorkbenchPlugin.DEBUG) {
-        	WorkbenchPlugin.log("Problem reading plugin info for: " //$NON-NLS-1$
+	 * Check if the currently selected plugin has additional information to
+	 * show.
+	 * 
+	 * @param bundleInfo
+	 * 
+	 * @return true if the selected plugin has additional info available to
+	 *         display
+	 */
+	private boolean selectionHasInfo(AboutBundleData bundleInfo) {
+
+		URL infoURL = getMoreInfoURL(bundleInfo, false);
+
+		// only report ini problems if the -debug command line argument is used
+		if (infoURL == null && WorkbenchPlugin.DEBUG) {
+			WorkbenchPlugin.log("Problem reading plugin info for: " //$NON-NLS-1$
 					+ bundleInfo.getName());
 		}
 
-        return infoURL != null;
-    }
-    
+		return infoURL != null;
+	}
+
 	/**
 	 * The More Info button was pressed. Open a browser showing the license
 	 * information for the selected bundle or an error dialog if the browser
@@ -584,7 +584,9 @@ public class AboutPluginsPage extends ProductInfoPage {
 class TableComparator extends ViewerComparator {
 
 	private int sortColumn = 0;
+	private int lastSortColumn = 0;
 	private boolean ascending = true;
+	private boolean lastAscending = true;
 
 	/*
 	 * (non-Javadoc)
@@ -599,7 +601,26 @@ class TableComparator extends ViewerComparator {
 			AboutBundleData d1 = (AboutBundleData) e1;
 			AboutBundleData d2 = (AboutBundleData) e2;
 			int diff = getSignedSortValue(d1) - getSignedSortValue(d2);
-			return ascending ? diff : -diff;
+			// If values are different, or there is no secondary column defined,
+			// we are done
+			if (diff != 0 || lastSortColumn == 0)
+				return ascending ? diff : -diff;
+			// try a secondary sort
+			if (viewer instanceof TableViewer) {
+				TableViewer tableViewer = (TableViewer) viewer;
+				IBaseLabelProvider baseLabel = tableViewer.getLabelProvider();
+				if (baseLabel instanceof ITableLabelProvider) {
+					ITableLabelProvider tableProvider = (ITableLabelProvider) baseLabel;
+					String e1p = tableProvider
+							.getColumnText(e1, lastSortColumn);
+					String e2p = tableProvider
+							.getColumnText(e2, lastSortColumn);
+					int result = getComparator().compare(e1p, e2p);
+					return lastAscending ? result : (-1) * result;
+				}
+			}
+			// we couldn't determine a secondary sort, call it equal
+			return 0;
 		}
 		if (viewer instanceof TableViewer) {
 			TableViewer tableViewer = (TableViewer) viewer;
@@ -609,6 +630,24 @@ class TableComparator extends ViewerComparator {
 				String e1p = tableProvider.getColumnText(e1, sortColumn);
 				String e2p = tableProvider.getColumnText(e2, sortColumn);
 				int result = getComparator().compare(e1p, e2p);
+				// Secondary column sort
+				if (result == 0) {
+					if (lastSortColumn != 0) {
+						e1p = tableProvider.getColumnText(e1, lastSortColumn);
+						e2p = tableProvider.getColumnText(e2, lastSortColumn);
+						result = getComparator().compare(e1p, e2p);
+						return lastAscending ? result : (-1) * result;
+					} // secondary sort is by column 0
+					if (e1 instanceof AboutBundleData
+							&& e2 instanceof AboutBundleData) {
+						AboutBundleData d1 = (AboutBundleData) e1;
+						AboutBundleData d2 = (AboutBundleData) e2;
+						int diff = getSignedSortValue(d1)
+								- getSignedSortValue(d2);
+						return lastAscending ? diff : -diff;
+					}
+				}
+				// primary column sort
 				return ascending ? result : (-1) * result;
 			}
 		}
@@ -642,7 +681,11 @@ class TableComparator extends ViewerComparator {
 	 *            The sortColumn to set.
 	 */
 	public void setSortColumn(int sortColumn) {
-		this.sortColumn = sortColumn;
+		if (this.sortColumn != sortColumn) {
+			lastSortColumn = this.sortColumn;
+			lastAscending = this.ascending;
+			this.sortColumn = sortColumn;
+		}
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutSystemPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutSystemPage.java
index 1577134..6c299b2 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutSystemPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/AboutSystemPage.java	
@@ -11,12 +11,13 @@
 package org.eclipse.ui.internal.about;
 
 import java.io.File;
-
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.TextTransfer;
 import org.eclipse.swt.dnd.Transfer;
@@ -28,6 +29,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.ConfigurationInfo;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.progress.WorkbenchJob;
 
 /**
  * Displays system information about the eclipse application. The content of
@@ -62,12 +64,8 @@ public final class AboutSystemPage extends ProductInfoPage {
 		gridData.heightHint = convertVerticalDLUsToPixels(300);
 		gridData.widthHint = convertHorizontalDLUsToPixels(400);
 		text.setLayoutData(gridData);
-		BusyIndicator.showWhile(text.getDisplay(), new Runnable() {
-			public void run() {
-				text.setText(ConfigurationInfo.getSystemSummary());
-			}		
-		});
 		text.setFont(JFaceResources.getTextFont());
+		fetchConfigurationInfo(text);
 		setControl(outer);
 	}
 
@@ -147,4 +145,18 @@ public final class AboutSystemPage extends ProductInfoPage {
 			}
 		}
 	}
+
+	private void fetchConfigurationInfo(final Text text) {
+		text.setText(WorkbenchMessages.AboutSystemPage_RetrievingSystemInfo);
+		WorkbenchJob job = new WorkbenchJob(
+				WorkbenchMessages.AboutSystemPage_FetchJobTitle) {
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				String info = ConfigurationInfo.getSystemSummary();
+				if (!text.isDisposed())
+					text.setText(info);
+				return Status.OK_STATUS;
+			}
+		};
+		job.schedule();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/BundleSigningInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/BundleSigningInfo.java
index 049977a..fbbef18 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/BundleSigningInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/BundleSigningInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,10 +21,9 @@ import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.StringTokenizer;
-import java.util.Map.Entry;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.OperationCanceledException;
@@ -161,6 +160,9 @@ public class BundleSigningInfo {
 				myData.getId())) {
 
 			protected IStatus run(IProgressMonitor monitor) {
+				final String[] signingInfo = new String[] {
+						WorkbenchMessages.BundleSigningTray_Unsigned,
+						WorkbenchMessages.BundleSigningTray_Unsigned };
 				try {
 					if (myData != data)
 						return Status.OK_STATUS;
@@ -169,18 +171,14 @@ public class BundleSigningInfo {
 					if (myData != data)
 						return Status.OK_STATUS;
 					SignerInfo[] signers = signedContent.getSignerInfos();
-					final String signerText, dateText;
 					if (!isOpen() && BundleSigningInfo.this.data == myData)
 						return Status.OK_STATUS;
 
-					if (signers.length == 0) {
-						signerText = WorkbenchMessages.BundleSigningTray_Unsigned;
-						dateText = WorkbenchMessages.BundleSigningTray_Unsigned;
-					} else {
+					if (signers.length > 0) {
 						Properties[] certs = parseCerts(signers[0]
 								.getCertificateChain());
 						if (certs.length == 0)
-							signerText = WorkbenchMessages.BundleSigningTray_Unknown;
+							signingInfo[0] = WorkbenchMessages.BundleSigningTray_Unknown;
 						else {
 							StringBuffer buffer = new StringBuffer();
 							for (Iterator i = certs[0].entrySet().iterator(); i
@@ -192,39 +190,40 @@ public class BundleSigningInfo {
 								if (i.hasNext())
 									buffer.append('\n');
 							}
-							signerText = buffer.toString();
+							signingInfo[0] = buffer.toString();
 						}
 
 						Date signDate = signedContent
 								.getSigningTime(signers[0]);
 						if (signDate != null)
-							dateText = DateFormat.getDateTimeInstance().format(
+							signingInfo[1] = DateFormat.getDateTimeInstance().format(
 									signDate);
 						else
-							dateText = WorkbenchMessages.BundleSigningTray_Unknown;
+							signingInfo[1] = WorkbenchMessages.BundleSigningTray_Unknown;
 					}
-
-					PlatformUI.getWorkbench().getDisplay().asyncExec(
-							new Runnable() {
-								public void run() {
-									// check to see if the tray is still visible
-									// and if
-									// we're still looking at the same item
-									if (!isOpen()
-											&& BundleSigningInfo.this.data != myData)
-										return;
-									certificate.setText(signerText);
-									date.setText(dateText);
-								}
-							});
-
 				} catch (IOException e) {
-					return new Status(IStatus.ERROR,
-							WorkbenchPlugin.PI_WORKBENCH, e.getMessage(), e);
+					// default "unsigned info" is ok for the user, but log the
+					// problem.
+					StatusManager.getManager().handle(
+							new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, e.getMessage(),
+									e), StatusManager.LOG);
 				} catch (GeneralSecurityException e) {
-					return new Status(IStatus.ERROR,
-							WorkbenchPlugin.PI_WORKBENCH, e.getMessage(), e);
+					// default "unsigned info is ok, but log the problem.
+					StatusManager.getManager().handle(
+							new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, e.getMessage(),
+									e), StatusManager.LOG);
 				}
+				PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+					public void run() {
+						// check to see if the tray is still visible
+						// and if we're still looking at the same item
+						if (!isOpen() && BundleSigningInfo.this.data != myData)
+							return;
+						certificate.setText(signingInfo[0]);
+						date.setText(signingInfo[1]);
+					}
+				});
+
 				return Status.OK_STATUS;
 			}
 		};
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/InstallationDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/InstallationDialog.java
index b397e3c..90159be 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/InstallationDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/about/InstallationDialog.java	
@@ -15,7 +15,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -25,6 +24,7 @@ import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.TrayDialog;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
@@ -55,7 +55,7 @@ import org.eclipse.ui.services.IServiceLocator;
  * @since 3.5
  * 
  */
-public class InstallationDialog extends Dialog implements
+public class InstallationDialog extends TrayDialog implements
 		IInstallationPageContainer {
 	class ButtonManager {
 
@@ -244,6 +244,9 @@ public class InstallationDialog extends Dialog implements
 			if (!selected)
 				tabSelected(folder.getItem(0));
 		}
+		// need to reapply the dialog font now that we've created new
+		// tab items
+		Dialog.applyDialogFont(folder);
 		return control;
 	}
 
@@ -269,6 +272,9 @@ public class InstallationDialog extends Dialog implements
 				final InstallationPage page = (InstallationPage) element
 						.createExecutableExtension(IWorkbenchRegistryConstants.ATT_CLASS);
 				page.createControl(pageComposite);
+				// new controls created since the dialog font was applied, so
+				// apply again.
+				Dialog.applyDialogFont(pageComposite);
 				page.setPageContainer(this);
 				// Must be done before creating the buttons because the control
 				// button creation methods
@@ -300,17 +306,17 @@ public class InstallationDialog extends Dialog implements
 		GridData gd = (GridData) button.getLayoutData();
 		gd.horizontalAlignment = SWT.BEGINNING;
 		gd.horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH) / 2;
-		// Layout the button manager again now that the OK button is there.
-		// Must do this before we layout the button bar or else the button
-		// manager will not know about the OK button
-		buttonManager.getParent().layout();
-		// Now we layout the button bar itself so it will accommodate the
-		// button manager's buttons
-		getButtonBar().getParent().layout();
+		// Layout the button bar's parent and all of its children.  We must
+		// cascade through all children because the buttons have changed and
+		// because tray dialog inserts an extra composite in the button bar
+		// hierarchy.
+		getButtonBar().getParent().layout(true, true);
+
 	}
 
 	protected void createButtons(InstallationPage page) {
 		page.createPageButtons(buttonManager.getParent());
+		Dialog.applyDialogFont(buttonManager.getParent());
 	}
 
 	private void rememberSelectedTab(String pageId) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java
index 03e9cdb..d2ee997 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/ExtensionActivityRegistry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,12 +11,10 @@
 
 package org.eclipse.ui.internal.activities;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.ExpressionConverter;
 import org.eclipse.core.runtime.CoreException;
@@ -24,6 +22,7 @@ import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionDelta;
 import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IRegistryChangeEvent;
 import org.eclipse.core.runtime.IRegistryChangeListener;
 import org.eclipse.core.runtime.IStatus;
@@ -32,6 +31,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
 import org.eclipse.ui.internal.util.ConfigurationElementMemento;
+import org.eclipse.ui.progress.WorkbenchJob;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 final class ExtensionActivityRegistry extends AbstractActivityRegistry {
@@ -49,35 +49,33 @@ final class ExtensionActivityRegistry extends AbstractActivityRegistry {
 
     private IExtensionRegistry extensionRegistry;
 
-    ExtensionActivityRegistry(IExtensionRegistry extensionRegistry) {
-        if (extensionRegistry == null) {
+	ExtensionActivityRegistry(IExtensionRegistry extensionRegistry) {
+		if (extensionRegistry == null) {
 			throw new NullPointerException();
 		}
 
-        this.extensionRegistry = extensionRegistry;
-
-        this.extensionRegistry
-                .addRegistryChangeListener(new IRegistryChangeListener() {
-                    public void registryChanged(
-                            IRegistryChangeEvent registryChangeEvent) {
-                        IExtensionDelta[] extensionDeltas = registryChangeEvent
-                                .getExtensionDeltas(Persistence.PACKAGE_PREFIX,
-                                        Persistence.PACKAGE_BASE);
-
-                        if (extensionDeltas.length != 0) {
-							try {
-                                load();
-                            } catch (IOException eIO) {
-                            }
+		this.extensionRegistry = extensionRegistry;
+
+		this.extensionRegistry.addRegistryChangeListener(new IRegistryChangeListener() {
+			public void registryChanged(IRegistryChangeEvent registryChangeEvent) {
+				IExtensionDelta[] extensionDeltas = registryChangeEvent.getExtensionDeltas(
+						Persistence.PACKAGE_PREFIX, Persistence.PACKAGE_BASE);
+
+				if (extensionDeltas.length != 0) {
+					WorkbenchJob job = new WorkbenchJob("Reloading Activity Registry") { //$NON-NLS-1$
+						public IStatus runInUIThread(IProgressMonitor monitor) {
+							load();
+							return Status.OK_STATUS;
 						}
-                    }
-                });
+					};
+					job.setSystem(true);
+					job.schedule();
+				}
+			}
+		});
+		load();
 
-        try {
-            load();
-        } catch (IOException eIO) {
-        }
-    }
+	}
 
     private String getNamespace(IConfigurationElement configurationElement) {
         String namespace = null;
@@ -111,7 +109,7 @@ final class ExtensionActivityRegistry extends AbstractActivityRegistry {
 		return null;
 	}
 
-    private void load() throws IOException {
+    private void load()  {
         if (activityRequirementBindingDefinitions == null) {
 			activityRequirementBindingDefinitions = new ArrayList();
 		} else {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java
index bf92ebc..3728443 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/activities/MutableActivityManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -32,6 +31,7 @@ import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.activities.ActivityEvent;
 import org.eclipse.ui.activities.ActivityManagerEvent;
@@ -45,9 +45,12 @@ import org.eclipse.ui.activities.IIdentifier;
 import org.eclipse.ui.activities.IMutableActivityManager;
 import org.eclipse.ui.activities.ITriggerPointAdvisor;
 import org.eclipse.ui.activities.IdentifierEvent;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.misc.Policy;
 import org.eclipse.ui.progress.UIJob;
 import org.eclipse.ui.services.IEvaluationReference;
 import org.eclipse.ui.services.IEvaluationService;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * An activity registry that may be altered.
@@ -56,7 +59,11 @@ import org.eclipse.ui.services.IEvaluationService;
  */
 public final class MutableActivityManager extends AbstractActivityManager
         implements IMutableActivityManager, Cloneable {
+	private static final boolean DEBUG = Policy.DEBUG_UI_GLOBAL;
 
+	private static final int MAX_ERRORS = 5;
+	private static int reportErrors = 0;
+	
     private Map activitiesById = new HashMap();
 
     private Map activityRequirementBindingsByActivityId = new HashMap();
@@ -134,6 +141,7 @@ public final class MutableActivityManager extends AbstractActivityManager
     }
 
     public IActivity getActivity(String activityId) {
+		checkThread();
         if (activityId == null) {
 			throw new NullPointerException();
 		}
@@ -150,6 +158,7 @@ public final class MutableActivityManager extends AbstractActivityManager
     }
 
     public ICategory getCategory(String categoryId) {
+		checkThread();
         if (categoryId == null) {
 			throw new NullPointerException();
 		}
@@ -166,18 +175,22 @@ public final class MutableActivityManager extends AbstractActivityManager
     }
 
     public Set getDefinedActivityIds() {
+		checkThread();
         return Collections.unmodifiableSet(definedActivityIds);
     }
 
     public Set getDefinedCategoryIds() {
+		checkThread();
         return Collections.unmodifiableSet(definedCategoryIds);
     }
 
     public Set getEnabledActivityIds() {
+		checkThread();
         return Collections.unmodifiableSet(enabledActivityIds);
     }
 
     public IIdentifier getIdentifier(String identifierId) {
+		checkThread();
         if (identifierId == null) {
 			throw new NullPointerException();
 		}
@@ -524,6 +537,7 @@ public final class MutableActivityManager extends AbstractActivityManager
 	}
 
 	public void setEnabledActivityIds(Set enabledActivityIds) {
+		checkThread();
         enabledActivityIds = new HashSet(enabledActivityIds);
         Set requiredActivityIds = new HashSet(enabledActivityIds);
         getRequiredActivityIds(enabledActivityIds, requiredActivityIds);
@@ -907,6 +921,7 @@ public final class MutableActivityManager extends AbstractActivityManager
      * @see java.lang.Object#clone()
      */
     public Object clone() {
+		checkThread();
         MutableActivityManager clone = new MutableActivityManager(advisor, activityRegistry);
         clone.setEnabledActivityIds(getEnabledActivityIds());
         return clone;
@@ -966,4 +981,24 @@ public final class MutableActivityManager extends AbstractActivityManager
         return deferredIdentifierJob;
     }
     
+	private static final String ERR_MSG = "Invalid Thread Access to Activity Manager"; //$NON-NLS-1$
+
+	private void checkThread() {
+		if (!DEBUG) {
+			return;
+		}
+		if (reportErrors >= MAX_ERRORS) {
+			return;
+		}
+		if (PlatformUI.getWorkbench().isStarting()) {
+			return;
+		}
+		boolean nonUiThread = (null == Display.getCurrent());
+		if (nonUiThread) {
+			reportErrors++;
+			StatusManager.getManager().handle(
+					new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, ERR_MSG, new Exception(
+							ERR_MSG)), StatusManager.LOG);
+		}
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java
index 79f812d..0aaf61a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/browser/DefaultWorkbenchBrowserSupport.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,11 +60,12 @@ public class DefaultWorkbenchBrowserSupport extends
 	 */
 	public IWebBrowser createBrowser(int style, String browserId, String name,
 			String tooltip) throws PartInitException {
-		IWebBrowser browser = findBrowser(browserId == null? getDefaultId():browserId);
+		String id = browserId == null? getDefaultId():browserId;
+		IWebBrowser browser = findBrowser(id);
 		if (browser != null) {
 			return browser;
 		}
-		browser = doCreateBrowser(style, browserId, name, tooltip);
+		browser = doCreateBrowser(style, id, name, tooltip);
 		registerBrowser(browser);
 		return browser;
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java
index 077aafe..ab92826 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorDefinition.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.jface.viewers.IBaseLabelProvider;
 import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.ui.IPluginContribution;
 import org.eclipse.ui.internal.ActionExpression;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.registry.RegistryReader;
@@ -24,7 +25,7 @@ import org.eclipse.ui.internal.registry.RegistryReader;
  * class a decorator definition applies to,
  */
 
-public abstract class DecoratorDefinition {
+public abstract class DecoratorDefinition implements IPluginContribution {
 	
     private static final String ATT_LABEL = "label"; //$NON-NLS-1$
     
@@ -285,4 +286,12 @@ public abstract class DecoratorDefinition {
     	return false;
        
     }
+
+	public String getPluginId() {
+		return getConfigurationElement().getContributor().getName();
+	}
+
+	public String getLocalId() {
+		return getId();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java
index d2ac8dc..ae99836 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/decorators/DecoratorManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 import java.util.StringTokenizer;
-
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
 import org.eclipse.core.runtime.IExtensionPoint;
@@ -985,7 +985,15 @@ public class DecoratorManager implements ILabelProviderListener,
 
 		// Do not return for a disabled decorator
 		if (definition != null && definition.isEnabled()) {
-			return definition.getDecorator();
+			ILabelDecorator result = definition.getDecorator();
+			if (result == null) {
+				try {
+					result = definition.internalGetDecorator();
+				} catch (CoreException e) {
+					WorkbenchPlugin.log(e);
+				}
+			}
+			return result;
 		}
 		return null;
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java
index 781aefe..5fed814 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/AboutDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.ui.internal.dialogs;
 
 import java.util.ArrayList;
 import java.util.LinkedList;
-
 import org.eclipse.core.runtime.IBundleGroup;
 import org.eclipse.core.runtime.IBundleGroupProvider;
 import org.eclipse.core.runtime.IProduct;
@@ -254,18 +253,15 @@ public class AboutDialog extends TrayDialog {
         topContainer.setLayout(layout);
         
 
+		// Calculate a good height for the text
         GC gc = new GC(parent);
-        // arbitrary default
+		int lineHeight = gc.getFontMetrics().getHeight();
+		gc.dispose();
+
         int topContainerHeightHint = 100;
-        try {
-			// default height enough for 6 lines of text
-			topContainerHeightHint = Math.max(topContainerHeightHint, gc
-					.getFontMetrics().getHeight() * 6);
-        }
-        finally {
-        	gc.dispose();
-        }
         
+		topContainerHeightHint = Math.max(topContainerHeightHint, lineHeight * 6);
+
         //image on left side of dialog
         if (aboutImage != null) {
             Label imageLabel = new Label(topContainer, SWT.NONE);
@@ -290,12 +286,17 @@ public class AboutDialog extends TrayDialog {
         topContainer.setLayoutData(data);
         
         if (item != null) {
-			final int minWidth = 400; // This value should really be calculated
+			final int minWidth = 432;
+			// This value should really be calculated
         	// from the computeSize(SWT.DEFAULT,
         	// SWT.DEFAULT) of all the
         	// children in infoArea excluding the
         	// wrapped styled text
         	// There is no easy way to do this.
+
+			// A scrolled composite is used instead of a vertical scroll bar on
+			// the styled text, because styled text does not automatically
+			// remove the vertical bar when not needed.
         	final ScrolledComposite scroller = new ScrolledComposite(topContainer,
     				SWT.V_SCROLL | SWT.H_SCROLL);
         	data = new GridData(GridData.FILL_BOTH);
@@ -309,7 +310,10 @@ public class AboutDialog extends TrayDialog {
     		textComposite.setLayout(layout);
 
     		text = new StyledText(textComposite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
-    		text.setCaret(null);
+
+    		// Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263.
+//    		text.setCaret(null);
+
             text.setFont(parent.getFont());
             text.setText(item.getText());
             text.setCursor(null);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java
index a995d9e..58ac7e8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/CustomizePerspectiveDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,7 +22,6 @@ import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.runtime.CoreException;
@@ -174,9 +173,6 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 	private static final String SHORTCUT_CONTRIBUTION_ITEM_ID_OPEN_PERSPECTIVE = "openPerspective"; //$NON-NLS-1$
 	private static final String SHORTCUT_CONTRIBUTION_ITEM_ID_SHOW_VIEW = "showView"; //$NON-NLS-1$
 
-	private static final String SHORTCUT_COMMAND_PARAM_ID_NEW_WIZARD = "newWizardId"; //$NON-NLS-1$
-	private static final String SHORTCUT_COMMAND_PARAM_ID_SHOW_PERSPECTIVE = "org.eclipse.ui.perspectives.showPerspective.perspectiveId"; //$NON-NLS-1$
-
 	private static final String KEYS_PREFERENCE_PAGE_ID = "org.eclipse.ui.preferencePages.Keys"; //$NON-NLS-1$
 
 	private static final String NEW_LINE = System.getProperty("line.separator"); //$NON-NLS-1$
@@ -1018,12 +1014,12 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 						if (item instanceof ShortcutItem) {
 							if (isNewWizard(item)) {
 								parameters.put(
-										SHORTCUT_COMMAND_PARAM_ID_NEW_WIZARD,
+												IWorkbenchCommandConstants.FILE_NEW_PARM_WIZARDID,
 										getParamID(item));
 							} else if (isShowPerspective(item)) {
 								parameters
 										.put(
-												SHORTCUT_COMMAND_PARAM_ID_SHOW_PERSPECTIVE,
+												IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID,
 												getParamID(item));
 							} else if (isShowView(item)) {
 								parameters.put(
@@ -1482,20 +1478,17 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 		TabItem tab = new TabItem(tabFolder, SWT.NONE);
 		tab.setText(WorkbenchMessages.HideToolBarItems_toolBarItemsTab);
 		tab.setControl(createToolBarVisibilityPage(tabFolder));
-		applyDialogFont(tabFolder);
 
 		// Menu Item Hiding Page
 		tab = new TabItem(tabFolder, SWT.NONE);
 		tab.setControl(createMenuVisibilityPage(tabFolder));
 		tab.setText(WorkbenchMessages.HideMenuItems_menuItemsTab);
-		applyDialogFont(tabFolder);
 
 		// Action Set Availability Page
 		actionSetTab = new TabItem(tabFolder, SWT.NONE);
 		actionSetTab
 				.setText(WorkbenchMessages.ActionSetSelection_actionSetsTab);
 		actionSetTab.setControl(createActionSetAvailabilityPage(tabFolder));
-		applyDialogFont(tabFolder);
 
 		// Shortcuts Page
 		if (showShortcutTab()) {
@@ -1504,6 +1497,8 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 			item1.setControl(createShortCutsPage(tabFolder));
 		}
 
+		applyDialogFont(tabFolder);
+
 		return composite;
 	}
 
@@ -2368,11 +2363,11 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 					Map m = binding.getParameterizedCommand().getParameterMap();
 					String key = null;
 					if (isNewWizard(item)) {
-						key = SHORTCUT_COMMAND_PARAM_ID_NEW_WIZARD;
+						key = IWorkbenchCommandConstants.FILE_NEW_PARM_WIZARDID;
 					} else if (isShowView(item)) {
 						key = ShowViewMenu.VIEW_ID_PARM;
 					} else if (isShowPerspective(item)) {
-						key = SHORTCUT_COMMAND_PARAM_ID_SHOW_PERSPECTIVE;
+						key = IWorkbenchCommandConstants.PERSPECTIVES_SHOW_PERSPECTIVE_PARM_ID;
 					}
 
 					if (key != null) {
@@ -3075,6 +3070,10 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 		for (int i = 0; i < toolitems.length; i++) {
 			IContributionItem contributionItem = (IContributionItem) toolitems[i]
 					.getData();
+			if (contributionItem.isGroupMarker()
+					|| contributionItem.isSeparator()) {
+				continue;
+			}
 			DisplayItem toolBarEntry = new DisplayItem(toolitems[i]
 					.getToolTipText(), contributionItem);
 			Image image = toolitems[i].getImage();
@@ -3105,6 +3104,9 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 	}
 
 	private ArrayList getVisibleIDs(TreeItem root) {
+		if (root == null) {
+			return new ArrayList();
+		}
 		ArrayList ids = new ArrayList(root.getChildren().size());
 		for (Iterator i = root.getChildren().iterator(); i.hasNext();) {
 			DisplayItem object = (DisplayItem) i.next();
@@ -3120,16 +3122,17 @@ public class CustomizePerspectiveDialog extends TrayDialog {
 			return;
 
 		if (item == wizards || item == perspectives || item == views) {
-			//Shortcuts (i.e. wizards, perspectives, views) need special
-			//handling. Shortcuts themselves are not involved in calculating
-			//whether menus are visible, therefore we must record whether the
-			//menu containing them is visible, and omit reading the shortcuts
-			//themselves in this part of the logic.
-			if (!item.getState()) {
+			// We always want the top-level wizard/perspective/view shortcuts to
+			// be visible, see bug 293448
+			return;
+		} else if (item.getChildren().size() > 0) {
+			if (item.isChangedByUser()) {
 				String id = getCommandID(item);
-				invisible.add(id);
+				if (item.getState())
+					visible.add(id);
+				else
+					invisible.add(id);
 			}
-		} else if (item.getChildren().size() > 0) {
 			for (Iterator i = item.getChildren().iterator(); i.hasNext();) {
 				getChangedIds((DisplayItem) i.next(), invisible, visible);
 			}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java
index b0fb6a7..4139071 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,34 +14,7 @@ package org.eclipse.ui.internal.dialogs;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
-
-import org.osgi.service.prefs.BackingStoreException;
-
-import org.eclipse.osgi.util.NLS;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.FocusAdapter;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Sash;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
 import org.eclipse.core.runtime.jobs.Job;
-
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.ToolBarManager;
@@ -62,7 +35,27 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.ViewerFilter;
-
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Sash;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.ActiveShellExpression;
 import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.PlatformUI;
@@ -80,6 +73,7 @@ import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
 import org.eclipse.ui.preferences.IWorkingCopyManager;
 import org.eclipse.ui.preferences.WorkingCopyManager;
 import org.eclipse.ui.statushandlers.StatusManager;
+import org.osgi.service.prefs.BackingStoreException;
 
 
 /**
@@ -579,6 +573,7 @@ public abstract class FilteredPreferenceDialog extends PreferenceDialog
 				menu.setVisible(true);
 			}
 		};
+		popupMenuAction.setToolTipText(WorkbenchMessages.FilteredItemsSelectionDialog_menu);
 		historyManager.add(popupMenuAction);
 		IHandlerService service = (IHandlerService) PlatformUI.getWorkbench()
 				.getService(IHandlerService.class);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportPage.java
index 61c3a0e..23cb700 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ImportExportPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.eclipse.ui.internal.dialogs;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
@@ -115,7 +114,7 @@ public abstract class ImportExportPage extends WorkbenchWizardSelectionPage{
 	        filteredTree.setFont(parent.getFont());
 
 	        viewer.setContentProvider(new WizardContentProvider());
-	        viewer.setLabelProvider(new WorkbenchLabelProvider());
+			viewer.setLabelProvider(new WorkbenchLabelProvider());
 	        viewer.setComparator(DataTransferWizardCollectionComparator.INSTANCE);
 	        
 	        ArrayList inputArray = new ArrayList();
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizard.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizard.java
index 81dd421..412a698 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizard.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.ui.internal.dialogs;
 
 import java.util.StringTokenizer;
-
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.IWizard;
 import org.eclipse.jface.wizard.Wizard;
@@ -105,11 +104,14 @@ public class NewWizard extends Wizard {
         this.workbench = aWorkbench;
         this.selection = currentSelection;
 
-        if (projectsOnly) {
-			setWindowTitle(WorkbenchMessages.NewProject_title);
-		} else {
-			setWindowTitle(WorkbenchMessages.NewWizard_title);
-		} 
+		if (getWindowTitle() == null) {
+			// No title supplied. Set the default title
+			if (projectsOnly) {
+				setWindowTitle(WorkbenchMessages.NewProject_title);
+			} else {
+				setWindowTitle(WorkbenchMessages.NewWizard_title);
+			}
+		}
         setDefaultPageImageDescriptor(WorkbenchImages
                 .getImageDescriptor(IWorkbenchGraphicConstants.IMG_WIZBAN_NEW_WIZ));
         setNeedsProgressMonitor(true);
@@ -167,4 +169,5 @@ public class NewWizard extends Wizard {
 	    	}
 	    	return super.canFinish();
     }
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java
index 1312435..f744929 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.dialogs.Dialog;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java
index 308e622..eae0e1b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PerspectivesPreferencePage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
  *******************************************************************************/
 
 package org.eclipse.ui.internal.dialogs;
@@ -15,7 +16,6 @@ import com.ibm.icu.text.Collator;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
-
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -44,11 +44,14 @@ import org.eclipse.ui.IWorkbenchPreferenceConstants;
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.FastViewBar;
+import org.eclipse.ui.internal.FastViewManager;
 import org.eclipse.ui.internal.IPreferenceConstants;
 import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.WorkbenchWindow;
 import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
 import org.eclipse.ui.internal.registry.PerspectiveRegistry;
 import org.eclipse.ui.internal.util.Descriptors;
@@ -81,6 +84,8 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 	private Button setDefaultButton;
 
 	// widgets for open perspective mode;
+	private Label openViewModeLabel;
+
 	private Button openSameWindowButton;
 
 	private Button openNewWindowButton;
@@ -93,14 +98,22 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 	private Button openEmbedButton;
 
 	private Button openFastButton;
+
+	private Button fvbHideButton;
+	
+	private boolean isFVBConfigured;
     
 	// labels
+	private final String FVG_TITLE = WorkbenchMessages.FastViewsGroup_title;
+
 	private final String OVM_TITLE = WorkbenchMessages.OpenViewMode_title;
 
 	private final String OVM_EMBED = WorkbenchMessages.OpenViewMode_embed;
 
 	private final String OVM_FAST = WorkbenchMessages.OpenViewMode_fast; 
 
+	private final String FVB_HIDE = WorkbenchMessages.FastViewBar_hide;
+
 	private final String OPM_TITLE = WorkbenchMessages.OpenPerspectiveMode_optionsTitle; 
 
 	private final String OPM_SAME_WINDOW = WorkbenchMessages.OpenPerspectiveMode_sameWindow; 
@@ -213,13 +226,20 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 		Font font = composite.getFont();
 
 		Group buttonComposite = new Group(composite, SWT.LEFT);
-		buttonComposite.setText(OVM_TITLE);
+		buttonComposite.setText(FVG_TITLE);
 		buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		buttonComposite.setFont(composite.getFont());
 		GridLayout layout = new GridLayout();
 		layout.numColumns = 2;
 		buttonComposite.setLayout(layout);
 
+		openViewModeLabel = new Label(buttonComposite, SWT.NONE);
+		openViewModeLabel.setText(OVM_TITLE);
+		GridData data = new GridData();
+		data.horizontalSpan = 2;
+		openViewModeLabel.setLayoutData(data);
+		openViewModeLabel.setFont(font);
+
 		openEmbedButton = new Button(buttonComposite, SWT.RADIO);
 		openEmbedButton.setText(OVM_EMBED);
 		openEmbedButton
@@ -247,6 +267,23 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 		});
 		openFastButton.setFont(font);
 
+		createFVBHideButton(buttonComposite);
+	}
+
+	protected void createFVBHideButton(Composite composite) {
+		if (!isFVBConfigured)
+			return;
+		Font font = composite.getFont();
+		fvbHideButton = new Button(composite, SWT.CHECK);
+		GridData data = new GridData();
+		// data.horizontalIndent = 10;
+		data.horizontalSpan = 2;
+		fvbHideButton.setLayoutData(data);
+		fvbHideButton.setText(FVB_HIDE);
+
+		fvbHideButton.setSelection(this.getPreferenceStore().getBoolean(
+				IPreferenceConstants.FVB_HIDE));
+		fvbHideButton.setFont(font);
 	}
 
 	/**
@@ -413,6 +450,9 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 
 		openViewMode = store.getInt(IPreferenceConstants.OPEN_VIEW_MODE);
 		openPerspMode = store.getInt(IPreferenceConstants.OPEN_PERSP_MODE);
+		isFVBConfigured = ((WorkbenchWindow) workbench
+				.getActiveWorkbenchWindow()).getShowFastViewBars();
+
 	}
 
 	/**
@@ -433,6 +473,10 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 		openFastButton
 				.setSelection(openViewMode == IPreferenceConstants.OVM_FAST);
 
+		if (isFVBConfigured)
+			fvbHideButton.setSelection(store
+					.getDefaultBoolean(IPreferenceConstants.FVB_HIDE));
+
 		openPerspMode = store
 				.getDefaultInt(IPreferenceConstants.OPEN_PERSP_MODE);
 		openSameWindowButton
@@ -553,6 +597,17 @@ public class PerspectivesPreferencePage extends PreferencePage implements
 		// store the open view mode setting
 		store.setValue(IPreferenceConstants.OPEN_VIEW_MODE, openViewMode);
 
+		if (isFVBConfigured) {
+			store.setValue(IPreferenceConstants.FVB_HIDE, fvbHideButton
+					.getSelection());
+			WorkbenchPage page = (WorkbenchPage) workbench
+					.getActiveWorkbenchWindow().getActivePage();
+			FastViewManager fvm = page.getActivePerspective()
+					.getFastViewManager();
+			if (fvm != null)
+				fvm.updateTrim(FastViewBar.FASTVIEWBAR_ID);
+		}
+
 		// store the open perspective mode setting
 		store.setValue(IPreferenceConstants.OPEN_PERSP_MODE, openPerspMode);
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceBoldLabelProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceBoldLabelProvider.java
index d0282dd..908d1a2 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceBoldLabelProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/PreferenceBoldLabelProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,11 +10,9 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.dialogs;
 
-import org.eclipse.swt.graphics.Font;
-
 import org.eclipse.jface.preference.PreferenceLabelProvider;
 import org.eclipse.jface.viewers.IFontProvider;
-
+import org.eclipse.swt.graphics.Font;
 import org.eclipse.ui.dialogs.FilteredTree;
 import org.eclipse.ui.dialogs.PatternFilter;
 
@@ -22,8 +20,7 @@ import org.eclipse.ui.dialogs.PatternFilter;
  * This PreferenceBoldLabelProvider will bold those elements which really match
  * the search contents
  */
-public class PreferenceBoldLabelProvider extends PreferenceLabelProvider
-		implements IFontProvider {
+public class PreferenceBoldLabelProvider extends PreferenceLabelProvider implements IFontProvider {
 
 	private FilteredTree filterTree;
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java
index 79dbb78..cb47089 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/SelectPerspectiveDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -180,7 +180,7 @@ public class SelectPerspectiveDialog extends Dialog implements
         list = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL
                 | SWT.BORDER);
         list.getTable().setFont(parent.getFont());
-        list.setLabelProvider(new PerspectiveLabelProvider());
+		list.setLabelProvider(new PerspectiveLabelProvider());
         list.setContentProvider(new PerspContentProvider());
         list.addFilter(activityViewerFilter);
         list.setComparator(new ViewerComparator());
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java
index d514d87..921a378 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ShowViewDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.dialogs;
 
 import java.util.ArrayList;
 import java.util.Iterator;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
@@ -87,6 +86,8 @@ public class ShowViewDialog extends Dialog implements
 
 	private Color dimmedForeground;
 
+	private Label descriptionHint;
+
     /**
      * Constructs a new ShowViewDialog.
      * 
@@ -164,9 +165,10 @@ public class ShowViewDialog extends Dialog implements
         layoutTopControl(filteredTree);
         
         // Use F2... label
-        Label label = new Label(composite, SWT.WRAP);
-        label.setText(WorkbenchMessages.ShowView_selectViewHelp);
-        label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		descriptionHint = new Label(composite, SWT.WRAP);
+		descriptionHint.setText(WorkbenchMessages.ShowView_selectViewHelp);
+		descriptionHint.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		descriptionHint.setVisible(false);
 
         // Restore the last state
         restoreWidgetValues();
@@ -388,7 +390,9 @@ public class ShowViewDialog extends Dialog implements
     public void selectionChanged(SelectionChangedEvent event) {
         updateSelection(event);
         updateButtons();
-    }
+		descriptionHint.setVisible(viewDescs.length == 1
+				&& viewDescs[0].getDescription().length() > 0);
+	}
 
     /**
      * Update the button enablement state.
@@ -411,6 +415,7 @@ public class ShowViewDialog extends Dialog implements
                 descs.add(o);
             }
         }
+        
         viewDescs = new IViewDescriptor[descs.size()];
         descs.toArray(viewDescs);
     }
@@ -425,8 +430,10 @@ public class ShowViewDialog extends Dialog implements
         return getDialogSettings();
 	}
     void handleTreeViewerKeyPressed(KeyEvent event) {
+
 		// popup the description for the selected view
-		if (event.keyCode == SWT.F2 && event.stateMask == 0) {
+		if (descriptionHint.isVisible() && event.keyCode == SWT.F2
+				&& event.stateMask == 0) {
 			ITreeSelection selection = (ITreeSelection) filteredTree
 					.getViewer().getSelection();
 			// only show description if one view is selected
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java
index 0f096c6..730914e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/StartupPreferencePage.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,12 @@ package org.eclipse.ui.internal.dialogs;
 
 import java.util.Arrays;
 import java.util.HashSet;
-
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -32,6 +34,7 @@ import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.Workbench;
 import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.util.PrefUtil;
+import org.eclipse.ui.testing.ContributionInfo;
 import org.osgi.framework.Constants;
 
 /**
@@ -82,18 +85,24 @@ public class StartupPreferencePage extends PreferencePage implements
         data = new GridData(GridData.FILL_BOTH);
         pluginsList.setFont(parent.getFont());
         pluginsList.setLayoutData(data);
-        populatePluginsList();
+		TableViewer viewer = new TableViewer(pluginsList);
+		viewer.setLabelProvider(new LabelProvider() {
+			public String getText(Object element) {
+				return (String) Platform.getBundle(((ContributionInfo) element).getBundleId())
+						.getHeaders().get(
+						Constants.BUNDLE_NAME);
+			}
+		});
+		viewer.setContentProvider(ArrayContentProvider.getInstance());
+		viewer.setInput(workbench.getEarlyActivatedPlugins());
+		updateCheckState();
     }
 
-    private void populatePluginsList() {
-        String pluginIds[] = workbench.getEarlyActivatedPlugins();
+	private void updateCheckState() {
         HashSet disabledPlugins = new HashSet(Arrays.asList(workbench.getDisabledEarlyActivatedPlugins()));
-        for (int i = 0; i < pluginIds.length; i++) {
-            String pluginId = pluginIds[i];
-            TableItem item = new TableItem(pluginsList, SWT.NONE);
-            item.setText((String) Platform.getBundle(pluginId).getHeaders().get(
-                    Constants.BUNDLE_NAME));
-            item.setData(pluginId);
+		for (int i = 0; i < pluginsList.getItemCount(); i++) {
+			TableItem item = pluginsList.getItem(i);
+			String pluginId = ((ContributionInfo) item.getData()).getBundleId();
             item.setChecked(!disabledPlugins.contains(pluginId));
         }
     }
@@ -123,7 +132,7 @@ public class StartupPreferencePage extends PreferencePage implements
         TableItem items[] = pluginsList.getItems();
         for (int i = 0; i < items.length; i++) {
             if (!items[i].getChecked()) {
-                preference.append((String) items[i].getData());
+				preference.append(((ContributionInfo) items[i].getData()).getBundleId());
                 preference.append(IPreferenceConstants.SEPARATOR);
             }
         }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewLabelProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewLabelProvider.java
index 8576e82..022184c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewLabelProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewLabelProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,10 +13,10 @@ package org.eclipse.ui.internal.dialogs;
 
 import java.util.HashMap;
 import java.util.Iterator;
-
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IColorProvider;
-import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ColumnViewer;
+import org.eclipse.jface.viewers.ViewerColumn;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.ui.ISharedImages;
@@ -30,7 +30,7 @@ import org.eclipse.ui.views.IViewDescriptor;
 /**
  * Provides labels for view children.
  */
-public class ViewLabelProvider extends LabelProvider implements IColorProvider {
+public class ViewLabelProvider extends ColumnLabelProvider {
     private HashMap images;
 	private final IWorkbenchWindow window;
 	private final Color dimmedForeground;
@@ -43,6 +43,10 @@ public class ViewLabelProvider extends LabelProvider implements IColorProvider {
 		this.window = window;
 		this.dimmedForeground = dimmedForeground;
 	}
+	
+	protected void initialize(ColumnViewer viewer, ViewerColumn column) {
+		super.initialize(viewer, column);
+	}
 
 	Image cacheImage(ImageDescriptor desc) {
         if (images == null) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardPatternFilter.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardPatternFilter.java
index 194609c..ba94c9d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardPatternFilter.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WizardPatternFilter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,11 @@ import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.ui.dialogs.PatternFilter;
 
 /**
- * A class that handles filtering wizard node items based on a supplied
- * matching string.
- *  
+ * A class that handles filtering wizard node items based on a supplied matching
+ * string and keywords
+ * 
  * @since 3.2
- *
+ * 
  */
 public class WizardPatternFilter extends PatternFilter {
 
@@ -53,6 +53,12 @@ public class WizardPatternFilter extends PatternFilter {
 			if (wordMatches(text)) {
 				return true;
 			}
+
+			String[] keywordLabels = desc.getKeywordLabels();
+			for (int i = 0; i < keywordLabels.length; i++) {
+				if (wordMatches(keywordLabels[i]))
+					return true;
+			}
 		}
 		return false;
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java
index 677fad0..5d0ea1f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchEditorsDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,12 +113,15 @@ public class WorkbenchEditorsDialog extends SelectionDialog {
 
     private SelectionListener headerListener = new SelectionAdapter() {
         public void widgetSelected(SelectionEvent e) {
-            int index = editorsTable.indexOf((TableColumn) e.widget);
+			TableColumn column = (TableColumn) e.widget;
+			int index = editorsTable.indexOf(column);
             if (index == sortColumn) {
 				reverse = !reverse;
 			} else {
 				sortColumn = index;
 			}
+			editorsTable.setSortDirection(reverse ? SWT.DOWN : SWT.UP);
+			editorsTable.setSortColumn(column);
             updateItems();
         }
     };
@@ -526,6 +529,14 @@ public class WorkbenchEditorsDialog extends SelectionDialog {
      * Updates all items in the table
      */
     private void updateItems() {
+    	// record what the user has selected
+		TableItem[] selectedItems = editorsTable.getSelection();
+		Adapter[] selectedAdapters = new Adapter[selectedItems.length];
+		for (int i = 0; i < selectedItems.length; i++) {
+			selectedAdapters[i] = (Adapter) selectedItems[i].getData();
+		}
+		
+		// remove all the items
         editorsTable.removeAll();
         elements = new ArrayList();
         if (showAllPersp) {
@@ -540,19 +551,27 @@ public class WorkbenchEditorsDialog extends SelectionDialog {
                 updateEditors(new IWorkbenchPage[] { page });
             }
         }
+
+        // sort the items
         sort();
-        Object selection = null;
-        if (window.getActivePage() != null) {
-			selection = window.getActivePage().getActiveEditor();
-		}
+
+		List selection = new ArrayList(selectedItems.length);
         for (Iterator iterator = elements.iterator(); iterator.hasNext();) {
             Adapter e = (Adapter) iterator.next();
             TableItem item = new TableItem(editorsTable, SWT.NULL);
             updateItem(item, e);
-            if ((selection != null) && (selection == e.editorRef)) {
-				editorsTable.setSelection(new TableItem[] { item });
+
+            // try to match this item's editor to one that was previously selected
+			for (int i = 0; i < selectedAdapters.length; i++) {
+				if (selectedAdapters[i].editorRef == e.editorRef) {
+					selection.add(item);
+				}
 			}
         }
+
+        // set the selection back to the table
+		editorsTable.setSelection((TableItem[]) selection.toArray(new TableItem[selection.size()]));
+
         // update the buttons, because the selection may have changed
         updateButtons();
     }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java
index c2be14b..c9d882e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkbenchWizardElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.eclipse.ui.SelectionEnabler;
 import org.eclipse.ui.internal.ISelectionConversionService;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
+import org.eclipse.ui.internal.registry.KeywordRegistry;
 import org.eclipse.ui.internal.registry.RegistryReader;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 import org.eclipse.ui.model.IWorkbenchAdapter2;
@@ -58,6 +59,8 @@ public class WorkbenchWizardElement extends WorkbenchAdapter implements
 
 	private static final String [] PROJECT_TAGS = new String[] {TAG_PROJECT};
 
+	private String[] keywordLabels;
+
     
     /**
      * Create a new instance of this class
@@ -340,4 +343,20 @@ public class WorkbenchWizardElement extends WorkbenchAdapter implements
 		}
 		return Boolean.valueOf(hasPagesString).booleanValue();
 	}
+
+	public String[] getKeywordLabels() {
+		if (keywordLabels == null) {
+
+			IConfigurationElement[] children = configurationElement
+					.getChildren(IWorkbenchRegistryConstants.TAG_KEYWORD_REFERENCE);
+			keywordLabels = new String[children.length];
+			KeywordRegistry registry = KeywordRegistry.getInstance();
+			for (int i = 0; i < children.length; i++) {
+				String id = children[i]
+						.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
+				keywordLabels[i] = registry.getKeywordLabel(id);
+			}
+		}
+		return keywordLabels;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java
index 546403d..f2b55d2 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetSelectionDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -16,7 +16,6 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -334,60 +333,55 @@ public class WorkingSetSelectionDialog extends AbstractWorkingSetDialog {
      * 
      * @see org.eclipse.jface.dialogs.Dialog#okPressed()
      */
-    protected void okPressed() {
-    		if (buttonWindowSet.getSelection()) {
-    			IWorkingSet [] windowSet = new IWorkingSet[] {workbenchWindow.getActivePage().getAggregateWorkingSet()};
-    			setSelection(windowSet);
-    			setResult(Arrays.asList(getSelection()));
-    		}
-    		else if (buttonNoSet.getSelection()) {
+	protected void okPressed() {
+		if (buttonWindowSet.getSelection()) {
+			IWorkingSet[] windowSet = new IWorkingSet[] { workbenchWindow.getActivePage()
+					.getAggregateWorkingSet() };
+			setSelection(windowSet);
+			setResult(Arrays.asList(getSelection()));
+		} else if (buttonNoSet.getSelection()) {
 			setSelection(new IWorkingSet[0]);
 			setResult(Arrays.asList(getSelection()));
-    		}
-    		else if (buttonSelectedSets.getSelection()) {
+		} else if (buttonSelectedSets.getSelection()) {
 			Object[] untypedResult = listViewer.getCheckedElements();
 			IWorkingSet[] typedResult = new IWorkingSet[untypedResult.length];
-			System.arraycopy(untypedResult, 0, typedResult, 0,
-					untypedResult.length);
-			// if multiselect is allowed or there was only one selected then dont create 
+			System.arraycopy(untypedResult, 0, typedResult, 0, untypedResult.length);
+			// if multiselect is allowed or there was only one selected then
+			// dont create
 			// an aggregate
 			if (multiSelect || typedResult.length <= 1) {
 				setSelection(typedResult);
 				setResult(Arrays.asList(typedResult));
-			}
-			else {
+			} else {
 				String setId = getAggregateIdForSets(typedResult);
-				IWorkingSetManager workingSetManager = workbenchWindow
-						.getWorkbench().getWorkingSetManager();
-				IWorkingSet aggregate = workingSetManager
-						.getWorkingSet(setId);
+				IWorkingSetManager workingSetManager = workbenchWindow.getWorkbench()
+						.getWorkingSetManager();
+				IWorkingSet aggregate = workingSetManager.getWorkingSet(setId);
 				if (aggregate == null) {
-					aggregate = workingSetManager
-							.createAggregateWorkingSet(
-									setId,
-									WorkbenchMessages.WorkbenchPage_workingSet_multi_label,
-									typedResult);
+					aggregate = workingSetManager.createAggregateWorkingSet(setId,
+							WorkbenchMessages.WorkbenchPage_workingSet_multi_label, typedResult);
 					workingSetManager.addWorkingSet(aggregate);
 				}
-				setSelection(new IWorkingSet[] {aggregate});
+				setSelection(new IWorkingSet[] { aggregate });
 				setResult(Collections.singletonList(aggregate));
 			}
-    		}
-        
-        super.okPressed();
-    }
+		}
 
-    /**
+		super.okPressed();
+	}
+
+	/**
 	 * Create a string that represents the name of the aggregate set composed of
 	 * the supplied working sets. It's very long and not printworthy.
 	 * 
-	 * @param typedResult the sets 
+	 * @param typedResult
+	 *            the sets
 	 * @return the name
 	 */
-    private String getAggregateIdForSets(IWorkingSet[] typedResult) {
-    		StringBuffer buffer = new StringBuffer();
-    		buffer.append("Aggregate:"); //$NON-NLS-1$
-    		for (int i = 0; i < typedResult.length; i++) {
+	private String getAggregateIdForSets(IWorkingSet[] typedResult) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append("Aggregate:"); //$NON-NLS-1$
+		for (int i = 0; i < typedResult.length; i++) {
 			buffer.append(typedResult[i].getName()).append(':');
 		}
 		return buffer.toString();
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ClosePerspectiveHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ClosePerspectiveHandler.java
index 1e17b34..758e00c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ClosePerspectiveHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ClosePerspectiveHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,6 +17,7 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.handlers.HandlerUtil;
 import org.eclipse.ui.internal.Perspective;
@@ -24,10 +25,6 @@ import org.eclipse.ui.internal.WorkbenchPage;
 
 public class ClosePerspectiveHandler extends AbstractHandler {
 
-	/**
-	 * The name of the parameter providing the perspective id.
-	 */
-	private static final String PARAMETER_NAME_PERSPECTIVE_ID = "org.eclipse.ui.window.closePerspective.perspectiveId"; //$NON-NLS-1$
 
 	public Object execute(ExecutionEvent event) throws ExecutionException {
 		IWorkbenchWindow activeWorkbenchWindow = HandlerUtil
@@ -38,7 +35,7 @@ public class ClosePerspectiveHandler extends AbstractHandler {
 			if (page != null) {
 				Map parameters = event.getParameters();
 				String value = (String) parameters
-						.get(PARAMETER_NAME_PERSPECTIVE_ID);
+						.get(IWorkbenchCommandConstants.WINDOW_CLOSE_PERSPECTIVE_PARM_ID);
 				if (value == null) {
 					page.closePerspective(page.getPerspective(), true, true);
 				} else {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerProxy.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerProxy.java
index 4c0b18c..8246a05 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerProxy.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerProxy.java	
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.handlers;
 
 import java.util.HashMap;
 import java.util.Map;
-
 import org.eclipse.core.commands.AbstractHandlerWithState;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -494,4 +493,11 @@ public final class HandlerProxy extends AbstractHandlerWithState implements
 	public String getAttributeName() {
 		return handlerAttributeName;
 	}
+
+	/**
+	 * @return Returns the handler.
+	 */
+	public IHandler getHandler() {
+		return handler;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowPreferencePageHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowPreferencePageHandler.java
index e679d50..d7d314e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowPreferencePageHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ShowPreferencePageHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.jface.preference.PreferenceDialog;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ui.handlers.HandlerUtil;
@@ -34,14 +35,10 @@ import org.eclipse.ui.handlers.HandlerUtil;
  */
 public final class ShowPreferencePageHandler extends AbstractHandler {
 
-	/**
-	 * The name of the parameter providing the view identifier.
-	 */
-	private static final String PARAMETER_ID_PREFERENCE_PAGE_ID = "preferencePageId"; //$NON-NLS-1$
 
 	public final Object execute(final ExecutionEvent event) {
 		final String preferencePageId = event
-				.getParameter(PARAMETER_ID_PREFERENCE_PAGE_ID);
+				.getParameter(IWorkbenchCommandConstants.WINDOW_PREFERENCES_PARM_PAGEID);
 		final IWorkbenchWindow activeWorkbenchWindow = HandlerUtil
 				.getActiveWorkbenchWindow(event);
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SpyHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SpyHandler.java
new file mode 100644
index 0000000..1d929b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SpyHandler.java	
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import org.eclipse.ui.internal.testing.ContributionInfoMessages;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.window.ToolTip;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.util.Util;
+import org.eclipse.ui.testing.ContributionInfo;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * @since 3.6
+ * 
+ */
+public class SpyHandler extends AbstractHandler {
+
+	public Object execute(ExecutionEvent event) {
+		Shell shell = HandlerUtil.getActiveShell(event);
+		if (shell != null) {
+			Control control = shell.getDisplay().getFocusControl();
+			if (control != null) {
+				showTooltip(control);
+			}
+		}
+		return null;
+	}
+
+	protected void showTooltip(Control control) {
+		ContributionInfo contributionInfo = null;
+		Point offset = new Point(0, 0);
+		while (control != null) {
+			if (control instanceof Table) {
+				Table table = (Table) control;
+				if (table.getSelectionCount() == 1) {
+					TableItem tableItem = table.getSelection()[0];
+					contributionInfo = getContributionInfo(tableItem.getData(),
+							ContributionInfoMessages.ContributionInfo_TableItem);
+					if (contributionInfo != null) {
+						Rectangle bounds = tableItem.getBounds();
+						offset = new Point(bounds.x, bounds.y);
+						break;
+					}
+				}
+			} else if (control instanceof Tree) {
+				Tree tree = (Tree) control;
+				if (tree.getSelectionCount() == 1) {
+					TreeItem treeItem = tree.getSelection()[0];
+					contributionInfo = getContributionInfo(treeItem.getData(),
+							ContributionInfoMessages.ContributionInfo_TreeItem);
+					if (contributionInfo != null) {
+						Rectangle bounds = treeItem.getBounds();
+						offset = new Point(bounds.x, bounds.y);
+						break;
+					}
+				}
+			}
+			String optionalElementType;
+
+			// "force" a contribution info if we are at a shell
+			if (control instanceof Shell)
+				optionalElementType = ContributionInfoMessages.ContributionInfo_Window;
+			else
+				optionalElementType = null;
+
+			contributionInfo = getContributionInfo(control.getData(), optionalElementType);
+
+			if (contributionInfo != null) {
+				break;
+			}
+			control = control.getParent();
+		}
+		if (contributionInfo == null) {
+			return;
+		}
+		doShowTooltip(control, offset, contributionInfo);
+	}
+
+	/**
+	 * @param control
+	 * @param offset
+	 * @param contributionInfo
+	 */
+	protected void doShowTooltip(Control control, Point offset,
+			final ContributionInfo contributionInfo) {
+		ToolTip toolTip = new ToolTip(control, ToolTip.NO_RECREATE, true) {
+
+			protected Composite createToolTipContentArea(Event event, Composite parent) {
+				// Create the content area
+				Composite composite = new Composite(parent, SWT.NONE);
+				composite.setBackground(parent.getDisplay().getSystemColor(
+						SWT.COLOR_INFO_BACKGROUND));
+				Text text = new Text(composite, SWT.READ_ONLY);
+				text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
+				String info = NLS.bind(ContributionInfoMessages.ContributionInfo_ContributedBy,
+						contributionInfo.getElementType(), contributionInfo.getBundleId());
+				text.setText(info);
+				GridLayoutFactory.fillDefaults().margins(2, 2).generateLayout(composite);
+				return composite;
+			}
+		};
+		toolTip.setHideOnMouseDown(false);
+		toolTip.setHideDelay(3000);
+		toolTip.show(offset);
+	}
+
+	/**
+	 * Returns a ContributionInfo for the given data object (typically, a data
+	 * object associated with a widget). If the data object is a
+	 * ContributionInfo, return it. If it can be adapted to ContributionInfo,
+	 * return the result of the adaptation. Otherwise, if a non-null
+	 * 'optionalElementType' string is given, return a contribution info based
+	 * on it and the bundle that contains the given object's class.
+	 */
+	ContributionInfo getContributionInfo(Object data, String optionalElementType) {
+		if (data instanceof ContributionInfo) {
+			return (ContributionInfo) data;
+		}
+		ContributionInfo result = (ContributionInfo) Util.getAdapter(data, ContributionInfo.class);
+		if (optionalElementType != null && result == null && data != null) {
+			Bundle bundle = FrameworkUtil.getBundle(data.getClass());
+			if (bundle != null) {
+				result = new ContributionInfo(bundle.getSymbolicName(),
+						optionalElementType != null ? optionalElementType
+								: ContributionInfoMessages.ContributionInfo_Unknown, null);
+			}
+		}
+		return result;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/TraversePageHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/TraversePageHandler.java
new file mode 100644
index 0000000..d8c195a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/TraversePageHandler.java	
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.handlers;
+
+import java.lang.reflect.Method;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+
+/**
+ * This handler is an adaptation of the widget method handler that implements
+ * page traversal via {@link SWT#TRAVERSE_PAGE_NEXT} and
+ * {@link SWT#TRAVERSE_PAGE_PREVIOUS} events.
+ * 
+ * @since 3.5
+ */
+public class TraversePageHandler extends WidgetMethodHandler {
+
+	/**
+	 * The parameters for traverse(int).
+	 */
+	private static final Class[] METHOD_PARAMETERS = { int.class };
+
+	public final Object execute(final ExecutionEvent event) {
+		Control focusControl = Display.getCurrent().getFocusControl();
+		if (focusControl != null) {
+			int traversal= "next".equals(methodName) ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS; //$NON-NLS-1$
+			focusControl.traverse(traversal, new Event());
+		}
+
+		return null;
+	}
+
+	/**
+	 * Looks up the traverse(int) method on the given focus control.
+	 * 
+	 * @return The method on the focus control; <code>null</code> if none.
+	 */
+	protected Method getMethodToExecute() {
+		final Control focusControl = Display.getCurrent().getFocusControl();
+		if (focusControl != null) {
+			try {
+				return focusControl.getClass().getMethod("traverse", //$NON-NLS-1$
+						METHOD_PARAMETERS);
+			} catch (NoSuchMethodException e) {
+				// Do nothing.
+			}
+		}
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WidgetMethodHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WidgetMethodHandler.java
index 816bd38..80efa86 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WidgetMethodHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WidgetMethodHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.handlers;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -61,6 +60,16 @@ public class WidgetMethodHandler extends AbstractHandler implements
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.core.commands.AbstractHandler#setEnabled(java.lang.Object)
+	 */
+	public void setEnabled(Object evaluationContext) {
+		updateEnablement();
+	}
+
 	/**
 	 * The name of the method to be invoked by this handler. This value should
 	 * never be <code>null</code>.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java
index 4041619..85a921a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/WizardHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchCommandConstants;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.IWorkbenchWizard;
@@ -56,7 +57,7 @@ public abstract class WizardHandler extends AbstractHandler {
 	    private static final int SIZING_WIZARD_HEIGHT = 550;
 
 		protected String getWizardIdParameterId() {
-			return "exportWizardId"; //$NON-NLS-1$
+			return IWorkbenchCommandConstants.FILE_EXPORT_PARM_WIZARDID;
 		}
 
 		protected IWizardRegistry getWizardRegistry() {
@@ -107,7 +108,7 @@ public abstract class WizardHandler extends AbstractHandler {
 	    private static final int SIZING_WIZARD_HEIGHT = 550;
 
 		protected String getWizardIdParameterId() {
-			return "importWizardId"; //$NON-NLS-1$
+			return IWorkbenchCommandConstants.FILE_IMPORT_PARM_WIZARDID;
 		}
 
 		protected IWizardRegistry getWizardRegistry() {
@@ -170,7 +171,7 @@ public abstract class WizardHandler extends AbstractHandler {
 	    private String categoryId = null;
 
 		protected String getWizardIdParameterId() {
-			return "newWizardId"; //$NON-NLS-1$
+			return IWorkbenchCommandConstants.FILE_NEW_PARM_WIZARDID;
 		}
 
 		protected IWizardRegistry getWizardRegistry() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java
index 20bc74a..1870d6b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/help/WorkbenchHelpSystem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,11 +7,12 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Chris Austin (IBM) - Fix for bug 296042
  *******************************************************************************/
 package org.eclipse.ui.internal.help;
 
 import java.net.URL;
-
+import java.util.Hashtable;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -160,6 +161,13 @@ public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
 	private String desiredHelpSystemId;
 
 	/**
+	 * Table for tracing registered context ids. This is used only for debugging
+	 * purposes.
+	 * 
+	 */
+	private Hashtable registeredIDTable;
+
+	/**
 	 * Handles dynamic removal of the help system.
 	 * 
 	 * @since 3.1
@@ -959,6 +967,8 @@ public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
 	 *      java.lang.String)
 	 */
 	public void setHelp(final IAction action, final String contextId) {
+		if (WorkbenchPlugin.DEBUG)
+			setHelpTrace(contextId);
 		action.setHelpListener(new HelpListener() {
 			public void helpRequested(HelpEvent event) {
 				if (getHelpUI() != null) {
@@ -981,6 +991,8 @@ public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
 	 *      java.lang.String)
 	 */
 	public void setHelp(Control control, String contextId) {
+		if (WorkbenchPlugin.DEBUG)
+			setHelpTrace(contextId);
 		control.setData(HELP_KEY, contextId);
 		// ensure that the listener is only registered once
 		control.removeHelpListener(getHelpListener());
@@ -994,6 +1006,8 @@ public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
 	 *      java.lang.String)
 	 */
 	public void setHelp(Menu menu, String contextId) {
+		if (WorkbenchPlugin.DEBUG)
+			setHelpTrace(contextId);
 		menu.setData(HELP_KEY, contextId);
 		// ensure that the listener is only registered once
 		menu.removeHelpListener(getHelpListener());
@@ -1007,12 +1021,51 @@ public final class WorkbenchHelpSystem implements IWorkbenchHelpSystem {
 	 *      java.lang.String)
 	 */
 	public void setHelp(MenuItem item, String contextId) {
+
+		if (WorkbenchPlugin.DEBUG)
+			setHelpTrace(contextId);
+
 		item.setData(HELP_KEY, contextId);
 		// ensure that the listener is only registered once
 		item.removeHelpListener(getHelpListener());
 		item.addHelpListener(getHelpListener());
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * Traces all calls to the setHelp method in an attempt to find and report
+	 * duplicated context IDs.
+	 */
+	private void setHelpTrace(String contextId) {
+		// Create an unthrown exception to capture the stack trace
+		RuntimeException e = new RuntimeException();
+		StackTraceElement[] stackTrace = e.getStackTrace();
+		StackTraceElement currentElement = null;
+		for (int s = 0; s < stackTrace.length; s++) {
+			if (stackTrace[s].getMethodName().equals("setHelp") && s + 1 < stackTrace.length) //$NON-NLS-1$
+			{
+				currentElement = stackTrace[s + 1];
+				break;
+			}
+		}
+
+		if (registeredIDTable == null)
+			registeredIDTable = new Hashtable();
+
+		if (!registeredIDTable.containsKey(contextId))
+			registeredIDTable.put(contextId, currentElement);
+		else if (!registeredIDTable.get(contextId).equals(currentElement)) {
+			StackTraceElement initialElement = (StackTraceElement) registeredIDTable
+					.get(contextId);
+			String error = "UI Duplicate Context ID found: '" + contextId + "'\n" + //$NON-NLS-1$ //$NON-NLS-2$
+					" 1 at " + initialElement + '\n' + //$NON-NLS-1$
+					" 2 at " + currentElement; //$NON-NLS-1$
+
+			System.out.println(error);
+		}
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.ui.help.IWorkbenchHelpSystem#hasHelpUI()
 	 */
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.properties b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.properties
index f5d216c..ceb2aec 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.properties	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/AbstractKeyFormatter.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
+# Copyright (c) 2000, 2009 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,15 @@ F1=F1
 F10=F10
 F11=F11
 F12=F12
+F13=F13
+F14=F14
+F15=F15
+F16=F16
+F17=F17
+F18=F18
+F19=F19
 F2=F2
+F20=F20
 F3=F3
 F4=F4
 F5=F5
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java
index 8fadd0a..a8cf0db 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java	
@@ -174,6 +174,22 @@ public final class BindingPersistence extends PreferencePersistence {
 				.formalKeyLookupInteger(IKeyLookup.F11_NAME));
 		r2_1KeysByName.put(IKeyLookup.F12_NAME, lookup
 				.formalKeyLookupInteger(IKeyLookup.F12_NAME));
+		r2_1KeysByName.put(IKeyLookup.F13_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F13_NAME));
+		r2_1KeysByName.put(IKeyLookup.F14_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F14_NAME));
+		r2_1KeysByName.put(IKeyLookup.F15_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F15_NAME));
+		r2_1KeysByName.put(IKeyLookup.F16_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F16_NAME));
+		r2_1KeysByName.put(IKeyLookup.F17_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F17_NAME));
+		r2_1KeysByName.put(IKeyLookup.F18_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F18_NAME));
+		r2_1KeysByName.put(IKeyLookup.F19_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F19_NAME));
+		r2_1KeysByName.put(IKeyLookup.F20_NAME, lookup
+				.formalKeyLookupInteger(IKeyLookup.F20_NAME));
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java
index 14c4369..5181d1f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/KeyAssistDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.CommandException;
@@ -504,6 +503,9 @@ final class KeyAssistDialog extends PopupDialog {
 			columnKeySequence.setWidth(previousWidth);
 		}
 		columnCommandName.pack();
+		if (completionsTable.getItems().length > 0) {
+			completionsTable.setSelection(0);
+		}
 
 		/*
 		 * If you double-click on the table, it should execute the selected
@@ -545,6 +547,7 @@ final class KeyAssistDialog extends PopupDialog {
 		if (selectionIndex >= 0) {
 			final Binding binding = (Binding) bindings.get(selectionIndex);
 			try {
+				workbenchKeyboard.updateShellKludge(null);
 				workbenchKeyboard.executeCommand(binding, trigger);
 			} catch (final CommandException e) {
 				workbenchKeyboard.logException(e, binding
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.java
index d732c6a..560c907 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/MacKeyFormatter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,7 +61,6 @@ public final class MacKeyFormatter extends AbstractKeyFormatter {
         KEY_LOOKUP
                 .put(CharacterKey.CR.toString(), "\u21A9");  //$NON-NLS-1$
         KEY_LOOKUP.put(CharacterKey.DEL.toString(), "\u2326");  //$NON-NLS-1$
-        KEY_LOOKUP.put(CharacterKey.SPACE.toString(), "\u2423");  //$NON-NLS-1$
         KEY_LOOKUP
                 .put(ModifierKey.ALT.toString(), "\u2325");  //$NON-NLS-1$
         KEY_LOOKUP.put(ModifierKey.COMMAND.toString(), "\u2318");  //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java
index 6c83fc7..a300841 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/NativeKeyFormatter.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,7 +68,6 @@ public class NativeKeyFormatter extends AbstractKeyFormatter {
         CARBON_KEY_LOOK_UP.put(CharacterKey.BS.toString(), "\u232B");  //$NON-NLS-1$
         CARBON_KEY_LOOK_UP.put(CharacterKey.CR.toString(), "\u21A9");  //$NON-NLS-1$
         CARBON_KEY_LOOK_UP.put(CharacterKey.DEL.toString(), "\u2326");  //$NON-NLS-1$
-        CARBON_KEY_LOOK_UP.put(CharacterKey.SPACE.toString(), "\u2423");  //$NON-NLS-1$
         CARBON_KEY_LOOK_UP.put(ModifierKey.ALT.toString(), "\u2325");  //$NON-NLS-1$
         CARBON_KEY_LOOK_UP.put(ModifierKey.COMMAND.toString(), "\u2318");  //$NON-NLS-1$
         CARBON_KEY_LOOK_UP.put(ModifierKey.CTRL.toString(), "\u2303");  //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java
index 30e785c..5ade509 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,12 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.keys;
 
+import com.ibm.icu.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.NotEnabledException;
 import org.eclipse.core.commands.NotHandledException;
@@ -55,8 +55,6 @@ import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.statushandlers.StatusManager;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * <p>
  * Controls the keyboard input into the workbench key binding architecture. This
@@ -766,45 +764,9 @@ public final class WorkbenchKeyboard {
 					"WorkbenchKeyboard.press(potentialKeyStrokes = " //$NON-NLS-1$
 							+ potentialKeyStrokes + ')');
 		}
+		final Widget widget = event.widget;
 
-		/*
-		 * KLUDGE. This works around a couple of specific problems in how GTK+
-		 * works. The first problem is the ordering of key press events with
-		 * respect to shell activation events. If on the event thread a dialog
-		 * is about to open, and the user presses a key, the key press event
-		 * will arrive before the shell activation event. From the perspective
-		 * of Eclipse, this means that things like two "Open Type" dialogs can
-		 * appear if "Ctrl+Shift+T" is pressed twice rapidly. For more
-		 * information, please see Bug 95792. The second problem is simply a bug
-		 * in GTK+, for which an incomplete workaround currently exists in SWT.
-		 * This makes shell activation events unreliable. Please see Bug 56231
-		 * and Bug 95222 for more information.
-		 */
-		if (org.eclipse.jface.util.Util.isGtk()) {
-			final Widget widget = event.widget;
-
-			// Update the contexts.
-			final ContextService contextService = (ContextService) workbench
-					.getService(IContextService.class);
-			if ((widget instanceof Control) && (!widget.isDisposed())) {
-				final Shell shell = ((Control) widget).getShell();
-				contextService.updateShellKludge(shell);
-			} else {
-				contextService.updateShellKludge();
-			}
-
-			// Update the handlers.
-			Object hs = workbench.getService(IHandlerService.class);
-			if (hs instanceof HandlerService) {
-				final HandlerService handlerService = (HandlerService) hs;
-				if ((widget instanceof Control) && (!widget.isDisposed())) {
-					final Shell shell = ((Control) widget).getShell();
-					handlerService.updateShellKludge(shell);
-				} else {
-					handlerService.updateShellKludge();
-				}
-			}
-		}
+		updateShellKludge(widget);
 
 		KeySequence errorSequence = null;
 		Collection errorMatch = null;
@@ -856,15 +818,58 @@ public final class WorkbenchKeyboard {
 	}
 
 	/**
+	 * KLUDGE. This works around a couple of specific problems in how GTK+
+	 * works. The first problem is the ordering of key press events with respect
+	 * to shell activation events. If on the event thread a dialog is about to
+	 * open, and the user presses a key, the key press event will arrive before
+	 * the shell activation event. From the perspective of Eclipse, this means
+	 * that things like two "Open Type" dialogs can appear if "Ctrl+Shift+T" is
+	 * pressed twice rapidly. For more information, please see Bug 95792. The
+	 * second problem is simply a bug in GTK+, for which an incomplete
+	 * workaround currently exists in SWT. This makes shell activation events
+	 * unreliable. Please see Bug 56231 and Bug 95222 for more information.
+	 * 
+	 * @param widget
+	 *            the widget that has focus in the main window. May be
+	 *            <code>null</code>
+	 */
+	void updateShellKludge(final Widget widget) {
+		if (org.eclipse.jface.util.Util.isGtk()) {
+
+			// Update the contexts.
+			final ContextService contextService = (ContextService) workbench
+					.getService(IContextService.class);
+			if ((widget instanceof Control) && (!widget.isDisposed())) {
+				final Shell shell = ((Control) widget).getShell();
+				contextService.updateShellKludge(shell);
+			} else {
+				contextService.updateShellKludge();
+			}
+
+			// Update the handlers.
+			Object hs = workbench.getService(IHandlerService.class);
+			if (hs instanceof HandlerService) {
+				final HandlerService handlerService = (HandlerService) hs;
+				if ((widget instanceof Control) && (!widget.isDisposed())) {
+					final Shell shell = ((Control) widget).getShell();
+					handlerService.updateShellKludge(shell);
+				} else {
+					handlerService.updateShellKludge();
+				}
+			}
+		}
+	}
+
+	/**
 	 * <p>
 	 * Actually performs the processing of the key event by interacting with the
-	 * <code>ICommandManager</code>. If work is carried out, then the event
-	 * is stopped here (i.e., <code>event.doit = false</code>). It does not
-	 * do any processing if there are no matching key strokes.
+	 * <code>ICommandManager</code>. If work is carried out, then the event is
+	 * stopped here (i.e., <code>event.doit = false</code>). It does not do any
+	 * processing if there are no matching key strokes.
 	 * </p>
 	 * <p>
-	 * If the active <code>Shell</code> is not the same as the one to which
-	 * the state is associated, then a reset occurs.
+	 * If the active <code>Shell</code> is not the same as the one to which the
+	 * state is associated, then a reset occurs.
 	 * </p>
 	 * 
 	 * @param keyStrokes
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java
index b97af1b..f582148 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/model/KeyController.java	
@@ -12,12 +12,12 @@
 package org.eclipse.ui.internal.keys.model;
 
 import java.io.BufferedWriter;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.util.Map;
 import java.util.ResourceBundle;
-
 import org.eclipse.core.commands.CommandManager;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
@@ -516,7 +516,8 @@ public class KeyController {
 			public final void run() throws IOException {
 				Writer fileWriter = null;
 				try {
-					fileWriter = new BufferedWriter(new FileWriter(filePath));
+					fileWriter = new BufferedWriter(new OutputStreamWriter(
+							new FileOutputStream(filePath), "UTF-8")); //$NON-NLS-1$
 					final Object[] bindingElements = bindingModel.getBindings()
 							.toArray();
 					for (int i = 0; i < bindingElements.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java
new file mode 100644
index 0000000..cac3a91
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/DynamicToolBarContributionItem.java	
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.menus;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.CoolBar;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
+import org.eclipse.ui.internal.util.Util;
+import org.eclipse.ui.menus.IWorkbenchContribution;
+import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
+import org.eclipse.ui.services.IServiceLocator;
+
+/**
+ * A contribution item which proxies a dynamic tool contribution.
+ * <p>
+ * It currently supports placement in menus.
+ * </p>
+ * <p>
+ * 
+ * @author Prakash G.R.
+ * 
+ * @since 3.6
+ * 
+ */
+public class DynamicToolBarContributionItem extends WorkbenchWindowControlContribution {
+
+	private final IConfigurationElement dynamicAddition;
+	private final IServiceLocator locator;
+	private boolean alreadyFailed;
+	private WorkbenchWindowControlContribution loadedDynamicContribution;
+
+	/**
+	 * Creates a DynamicToolBarContributionItem
+	 * 
+	 * @param id
+	 *            - Id of the menu item
+	 * @param locator
+	 *            - The Service Locator
+	 * @param dynamicAddition
+	 *            - The Configuration Element defined in the plugin.xml
+	 * 
+	 */
+	public DynamicToolBarContributionItem(String id, IServiceLocator locator,
+			IConfigurationElement dynamicAddition) {
+		super(id);
+
+		this.locator = locator;
+		this.dynamicAddition = dynamicAddition;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isDynamic()
+	 */
+	public boolean isDynamic() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isDynamic();
+		}
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#isDirty()
+	 */
+	public boolean isDirty() {
+		if (loadedDynamicContribution != null) {
+			return loadedDynamicContribution.isDirty();
+		}
+		return super.isDirty();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets
+	 * .CoolBar, int)
+	 */
+	public void fill(CoolBar parent, int index) {
+		IContributionItem contributionItem = getContributionItem();
+		if (contributionItem != null)
+			contributionItem.fill(parent, index);
+	}
+
+	private WorkbenchWindowControlContribution getContributionItem() {
+		if (loadedDynamicContribution == null && !alreadyFailed)
+			createContributionItem();
+		return loadedDynamicContribution;
+	}
+
+	private void createContributionItem() {
+
+		loadedDynamicContribution = (WorkbenchWindowControlContribution) Util
+				.safeLoadExecutableExtension(dynamicAddition,
+						IWorkbenchRegistryConstants.ATT_CLASS,
+						WorkbenchWindowControlContribution.class);
+
+		if (loadedDynamicContribution == null) {
+			alreadyFailed = true;
+			return;
+		}
+
+		loadedDynamicContribution.setId(getId());
+		loadedDynamicContribution.setParent(getParent());
+		loadedDynamicContribution.setWorkbenchWindow(getWorkbenchWindow());
+		loadedDynamicContribution.setCurSide(getCurSide());
+		if (loadedDynamicContribution instanceof IWorkbenchContribution) {
+			((IWorkbenchContribution) loadedDynamicContribution)
+					.initialize(locator);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#dispose()
+	 */
+	public void dispose() {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.dispose();
+			loadedDynamicContribution = null;
+		}
+		super.dispose();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.action.ContributionItem#update()
+	 */
+	public void update() {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.update();
+		}
+	}
+
+	public void update(String id) {
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.update(id);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.action.ContributionItem#setParent(org.eclipse.jface
+	 * .action.IContributionManager)
+	 */
+	public void setParent(IContributionManager parent) {
+		super.setParent(parent);
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.setParent(parent);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.menus.InternalControlContribution#setWorkbenchWindow
+	 * (org.eclipse.ui.IWorkbenchWindow)
+	 */
+	public void setWorkbenchWindow(IWorkbenchWindow wbw) {
+		super.setWorkbenchWindow(wbw);
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.setWorkbenchWindow(wbw);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.menus.InternalControlContribution#setCurSide(int)
+	 */
+	public void setCurSide(int curSide) {
+		super.setCurSide(curSide);
+		if (loadedDynamicContribution != null) {
+			loadedDynamicContribution.setCurSide(curSide);
+		}
+	}
+	/* 
+	 * (non-Javadoc)
+	 * @see org.eclipse.jface.action.ControlContribution#createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public Control createControl(Composite parent) {
+		
+		WorkbenchWindowControlContribution contributionItem = getContributionItem();
+		if (contributionItem != null)
+			return contributionItem.delegateCreateControl(parent);
+		return null;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/InternalControlContribution.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/InternalControlContribution.java
index f528105..b3fcaa4 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/InternalControlContribution.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/InternalControlContribution.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public abstract class InternalControlContribution extends ControlContribution {
 	/**
 	 * @param wbw The wbw to set.
 	 */
-	/*package*/ void setWorkbenchWindow(IWorkbenchWindow wbw) {
+	public void setWorkbenchWindow(IWorkbenchWindow wbw) {
 		this.wbw = wbw;
 	}
 
@@ -63,7 +63,7 @@ public abstract class InternalControlContribution extends ControlContribution {
 	/**
 	 * @param curSide The curSide to set.
 	 */
-	/*package*/ void setCurSide(int curSide) {
+	public void setCurSide(int curSide) {
 		this.curSide = curSide;
 	}
 	
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java
index d8aeb0b..804d1ee 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/LegacyActionPersistence.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,7 +18,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.commands.Category;
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.CommandEvent;
@@ -26,7 +25,12 @@ import org.eclipse.core.commands.ICommandListener;
 import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.State;
+import org.eclipse.core.expressions.EvaluationResult;
 import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionInfo;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdapterManager;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.IRegistryChangeEvent;
@@ -44,6 +48,7 @@ import org.eclipse.jface.commands.RadioState;
 import org.eclipse.jface.commands.ToggleState;
 import org.eclipse.jface.contexts.IContextIds;
 import org.eclipse.jface.menus.IMenuStateIds;
+import org.eclipse.ui.ISources;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.SelectionEnabler;
@@ -930,18 +935,18 @@ public final class LegacyActionPersistence extends RegistryPersistence {
 			// ATT_NAME_FILTER);
 
 			// TODO Read the object class. This influences the visibility.
-			// final boolean adaptable = readBoolean(element,
-			// ATT_ADAPTABLE,
-			// false);
-
+			final boolean adaptable = readBoolean(element, ATT_ADAPTABLE, false);
 
 			// TODO Read the filter elements.
 			// TODO Read the enablement elements.
 
 			// TODO Figure out an appropriate visibility expression.
 			// Read the visibility element, if any.
-			final Expression visibleWhenExpression = readVisibility(element,
+			Expression visibleWhenExpression = readVisibility(element,
 					id, warningsToLog);
+			if (visibleWhenExpression == null) {
+				visibleWhenExpression = new ObjectClassExpression(objectClass, adaptable);
+			}
 
 			// Read all of the child elements from the registry.
 			readActionsAndMenus(element, id, warningsToLog,
@@ -953,6 +958,59 @@ public final class LegacyActionPersistence extends RegistryPersistence {
 				"Warnings while parsing the object contributions from the 'org.eclipse.ui.popupMenus' extension point"); //$NON-NLS-1$
 	}
 
+	private static class ObjectClassExpression extends Expression {
+		String objectClass;
+		boolean adapt = false;
+
+		public ObjectClassExpression(String objectClass, boolean adapt) {
+			this.objectClass = objectClass;
+			this.adapt = adapt;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.core.expressions.Expression#collectExpressionInfo(org
+		 * .eclipse.core.expressions.ExpressionInfo)
+		 */
+		public void collectExpressionInfo(ExpressionInfo info) {
+			info.addVariableNameAccess(ISources.ACTIVE_MENU_SELECTION_NAME);
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.core.expressions.Expression#evaluate(org.eclipse.core
+		 * .expressions.IEvaluationContext)
+		 */
+		public EvaluationResult evaluate(IEvaluationContext context) throws CoreException {
+			Object s = context.getVariable(ISources.ACTIVE_MENU_SELECTION_NAME);
+			if (s == null || s == IEvaluationContext.UNDEFINED_VARIABLE) {
+				return EvaluationResult.FALSE;
+			}
+			if (adapt) {
+				int status = Platform.getAdapterManager().queryAdapter(s, objectClass);
+				switch (status) {
+				case IAdapterManager.LOADED:
+					return EvaluationResult.TRUE;
+				case IAdapterManager.NOT_LOADED:
+					return EvaluationResult.NOT_LOADED;
+
+				default:
+					break;
+				}
+			} else {
+				if (objectClass.equals(s.getClass().getName())) {
+					return EvaluationResult.TRUE;
+				}
+			}
+			return EvaluationResult.FALSE;
+		}
+
+	}
+
 	/**
 	 * Reads the deprecated view contributions from an array of elements from
 	 * the view actions extension point.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java
index 4ca3fa3..e02953a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,11 +14,8 @@ package org.eclipse.ui.internal.menus;
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.ExpressionConverter;
 import org.eclipse.core.runtime.CoreException;
@@ -37,13 +34,10 @@ import org.eclipse.ui.internal.WorkbenchWindow;
 import org.eclipse.ui.internal.provisional.presentations.IActionBarPresentationFactory;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
 import org.eclipse.ui.internal.services.IWorkbenchLocationService;
-import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.menus.CommandContributionItem;
 import org.eclipse.ui.menus.CommandContributionItemParameter;
 import org.eclipse.ui.menus.IContributionRoot;
 import org.eclipse.ui.menus.IMenuService;
-import org.eclipse.ui.menus.IWorkbenchContribution;
-import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.ui.services.IServiceLocator;
 
@@ -53,16 +47,6 @@ import org.eclipse.ui.services.IServiceLocator;
  */
 public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 	
-	// Caches
-	
-	/**
-	 * If an {@link IConfigurationElement} is in the Set then we have already
-	 * tried (and failed) to load the associated ExecutableExtension.
-	 * 
-	 * This is used to prevent multiple retries which would spam the Log.
-	 */
-	Set failedLoads = new HashSet();
-
 	/**
 	 * Maps an IConfigurationElement to its parsed Expression
 	 */
@@ -81,6 +65,8 @@ public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 
 	private boolean hasAdditions = false;
 
+	private Boolean contributeToAllPopups = null;
+
 	public MenuAdditionCacheEntry(IMenuService menuService,
 			IConfigurationElement element, String location, String namespace) {
 		super(location, namespace, element);
@@ -188,7 +174,7 @@ public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 			} else if (IWorkbenchRegistryConstants.TAG_MENU.equals(itemType)) {
 				newItem = createMenuAdditionContribution(items[i]);
 			} else if (IWorkbenchRegistryConstants.TAG_TOOLBAR.equals(itemType)) {
-				newItem = createToolBarAdditionContribution(
+				newItem = createToolBarAdditionContribution(window,
 						actionBarPresentationFactory, items[i]);
 			}
 			
@@ -206,22 +192,28 @@ public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 	}
 
 	/**
+	 * @param window
 	 * @param configurationElement
 	 * @return the toolbar contribution item
 	 */
-	private IContributionItem createToolBarAdditionContribution(
+	private IContributionItem createToolBarAdditionContribution(WorkbenchWindow window,
 			IActionBarPresentationFactory actionBarPresentationFactory,
 			IConfigurationElement configurationElement) {
 		if (!inToolbar()) {
 			return null;
 		}
+		String id = getId(configurationElement);
+		String label = getLabel(configurationElement);
+		if (label != null && label.length() > 0) {
+			window.putToolbarLabel(id, label);
+		}
 		if (actionBarPresentationFactory != null) {
 			return actionBarPresentationFactory.createToolBarContributionItem(
 					actionBarPresentationFactory.createToolBarManager(),
-					getId(configurationElement));
+					id);
 		}
 		return new ToolBarContributionItem(new ToolBarManager(),
-				getId(configurationElement));
+				id);
 	}
 
 	/**
@@ -284,33 +276,13 @@ public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 	private IContributionItem createControlAdditionContribution(
 			final IServiceLocator locator,
 			final IConfigurationElement widgetAddition) {
-		if (!inToolbar()) {
-			return null;
-		}
-		// If we've already tried (and failed) to load the
-		// executable extension then skip this addirion.
-		if (failedLoads.contains(widgetAddition))
-			return null;
 
-		// Attempt to load the addition's EE (creates a new instance)
-		final WorkbenchWindowControlContribution loadedWidget = (WorkbenchWindowControlContribution) Util
-				.safeLoadExecutableExtension(widgetAddition,
-						IWorkbenchRegistryConstants.ATT_CLASS,
-						WorkbenchWindowControlContribution.class);
-
-		// Cache failures
-		if (loadedWidget == null) {
-			failedLoads.add(widgetAddition);
-			return null;
-		}
-
-		// explicitly set the id
-		loadedWidget.setId(getId(widgetAddition));
-		if (loadedWidget instanceof IWorkbenchContribution) {
-			((IWorkbenchContribution)loadedWidget).initialize(locator);
+		if (inToolbar()) {
+			return new DynamicToolBarContributionItem(getId(widgetAddition), locator, widgetAddition);
 		}
-
-		return loadedWidget;
+		
+		return null;
+		
 	}
 
 	private IContributionItem createCommandAdditionContribution(
@@ -524,4 +496,23 @@ public class MenuAdditionCacheEntry extends AbstractMenuAdditionCacheEntry {
 	public boolean hasAdditions() {
 		return hasAdditions;
 	}
+
+	/**
+	 * 
+	 * Returns the value of the allPopups attribute
+	 * 
+	 * @return <code>true</code> if specified and the value equals to true,
+	 *         <code>false</code> otherwise
+	 * 
+	 */
+	public boolean contributeToAllPopups() {
+		if (contributeToAllPopups == null) {
+			String allPopups = getConfigElement().getAttribute("allPopups"); //$NON-NLS-1$
+			if (allPopups == null || Boolean.valueOf(allPopups).booleanValue())
+				contributeToAllPopups = Boolean.TRUE;
+			else
+				contributeToAllPopups = Boolean.FALSE;
+		}
+		return contributeToAllPopups.booleanValue();
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimContributionManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimContributionManager.java
index 8e8245a..dd4ba56 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimContributionManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/TrimContributionManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.action.ContributionManager;
@@ -29,6 +28,7 @@ import org.eclipse.ui.internal.WorkbenchWindow;
 import org.eclipse.ui.internal.layout.IWindowTrim;
 import org.eclipse.ui.internal.layout.TrimLayout;
 import org.eclipse.ui.internal.misc.StatusUtil;
+import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.menus.AbstractContributionFactory;
 import org.eclipse.ui.menus.IMenuService;
 import org.eclipse.ui.menus.MenuUtil;
@@ -222,6 +222,39 @@ public class TrimContributionManager extends ContributionManager {
 				ContributionRoot ciList = new ContributionRoot(menuService,
 						restrictionExpression, this, cache);
 				cache.createContributionItems(wbWindow, ciList);
+
+				// Where should we put this?
+				IWindowTrim insertBefore = null;
+				MenuLocationURI uri = new MenuLocationURI(cache.getLocation());
+				String query = uri.getQuery();
+				String[] args = Util.split(query, '=');
+				if (args.length == 2) {
+					String relative = args[0];
+					String relId = args[1];
+					insertBefore = layout.getTrim(relId);
+					if (MenuUtil.QUERY_AFTER.equals(relative)
+							&& insertBefore != null) {
+						// Get the trim -after- the id'd one
+						List areaTrim = layout.getAreaTrim(swtSides[i]);
+						for (Iterator iterator = areaTrim.iterator(); iterator
+								.hasNext();) {
+							IWindowTrim trimElement = (IWindowTrim) iterator
+									.next();
+							if (insertBefore == trimElement) {
+								insertBefore = (IWindowTrim) (iterator
+										.hasNext() ? iterator.next() : null);
+							}
+						}
+					}
+				}
+
+				// If we're adding to the 'command1' area then we're -before-
+				// the CoolBar
+				if (insertBefore == null && i == 0) {
+					insertBefore = layout
+							.getTrim("org.eclipse.ui.internal.WorkbenchWindow.topBar"); //$NON-NLS-1$
+				}
+
 				// save the list for later cleanup of any visibility expressions that were added.
 				contributedLists.add(ciList);
 				for (Iterator ciIter = ciList.getItems().iterator(); ciIter.hasNext();) {
@@ -231,11 +264,6 @@ public class TrimContributionManager extends ContributionManager {
 						ToolBarTrimProxy tbProxy = new ToolBarTrimProxy(ci.getId(), wbWindow);
 						tbProxy.dock(swtSides[i]);
 						
-						// If we're adding to the 'command1' area then we're -before- the CoolBar
-						IWindowTrim insertBefore = null;
-						if (i == 0) {
-							insertBefore = layout.getTrim("org.eclipse.ui.internal.WorkbenchWindow.topBar"); //$NON-NLS-1$
-						}
 						layout.addTrim(swtSides[i], tbProxy, insertBefore);						
 						contributedTrim.add(tbProxy);
 					}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java
index 696939e..fce2c43 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/WorkbenchMenuService.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.expressions.Expression;
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -48,6 +47,8 @@ import org.eclipse.jface.util.PropertyChangeEvent;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.ISourceProvider;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.activities.ActivityManagerEvent;
@@ -73,6 +74,7 @@ import org.eclipse.ui.internal.services.IWorkbenchLocationService;
 import org.eclipse.ui.internal.util.Util;
 import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.menus.AbstractContributionFactory;
+import org.eclipse.ui.menus.MenuUtil;
 import org.eclipse.ui.services.IEvaluationReference;
 import org.eclipse.ui.services.IEvaluationService;
 import org.eclipse.ui.services.IServiceLocator;
@@ -91,6 +93,8 @@ import org.eclipse.ui.statushandlers.StatusManager;
  */
 public final class WorkbenchMenuService extends InternalMenuService {
 
+	private static final String INDEX_AFTER_ADDITIONS = "after=additions"; //$NON-NLS-1$
+
 	/**
 	 * A combined property and activity listener that updates the visibility of
 	 * contribution items in the new menu system.
@@ -187,18 +191,21 @@ public final class WorkbenchMenuService extends InternalMenuService {
 		public void addFactoryContribution(AbstractContributionFactory factory, ContributionRoot ciList) {
 			// Remove any existing cache info for this factory
 			removeFactoryContribution(factory);
-			
 			// save the new info
 			factoryToItems.put(factory, ciList);
 		}
 		
-		public void removeFactoryContribution(AbstractContributionFactory factory) {			
+		public void removeFactoryContribution(AbstractContributionFactory factory) {
 			ContributionRoot items =(ContributionRoot)factoryToItems.remove(factory);
 			if (items != null) {
 				WorkbenchMenuService.this.releaseContributions(items);
 			}
 		}
 		
+		public ContributionRoot getContributions(AbstractContributionFactory factory) {
+			return (ContributionRoot) factoryToItems.get(factory);
+		}
+
 		/**
 		 * Delegates back to the workbench to remove -all- the contributions
 		 * associated with this contribution manager
@@ -388,6 +395,16 @@ public final class WorkbenchMenuService extends InternalMenuService {
 			evaluationService.removeServiceListener(serviceListener);
 			serviceListener = null;
 		}
+
+		if (activityManagerListener != null) {
+			IWorkbenchLocationService wls = (IWorkbenchLocationService) serviceLocator
+					.getService(IWorkbenchLocationService.class);
+			IWorkbench workbench = wls.getWorkbench();
+			if (workbench != null) {
+				workbench.getActivitySupport().getActivityManager()
+						.removeActivityManagerListener(activityManagerListener);
+			}
+		}
 	}
 
 	public final void readRegistry() {
@@ -446,7 +463,9 @@ public final class WorkbenchMenuService extends InternalMenuService {
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.ui.internal.menus.IMenuService#addCacheForURI(org.eclipse.ui.internal.menus.MenuCacheEntry)
+	 * @see
+	 * org.eclipse.ui.menus.IMenuService#addContributionFactory(org.eclipse.
+	 * ui.menus.AbstractContributionFactory)
 	 */
 	public void addContributionFactory(AbstractContributionFactory factory) {
 		if (factory == null || factory.getLocation() == null)
@@ -541,6 +560,10 @@ public final class WorkbenchMenuService extends InternalMenuService {
 	private boolean processAdditions(final IServiceLocator serviceLocatorToUse,
 			Set restriction, final ContributionManager mgr,
 			final AbstractContributionFactory cache, final Set itemsAdded) {
+
+		if (!processFactory(mgr, cache))
+			return true;
+
 		final int idx = getInsertionIndex(mgr, cache.getLocation());
 		if (idx == -1)
 			return false; // can't process (yet)
@@ -564,6 +587,17 @@ public final class WorkbenchMenuService extends InternalMenuService {
 				if (ciList.getItems().size() > 0) {
 					// Cache the items for future cleanup
 					ManagerPopulationRecord mpr = (ManagerPopulationRecord) populatedManagers.get(mgr);
+					ContributionRoot contributions = mpr.getContributions(cache);
+					if (contributions != null) {
+						// Existing contributions in the mgr will be released.
+						// Adjust the insertionIndex
+						for (Iterator i = contributions.getItems().iterator(); i.hasNext();) {
+							IContributionItem item = (IContributionItem) i.next();
+							if (item.equals(mgr.find(item.getId())))
+								insertionIndex--;
+						}
+					}
+
 					mpr.addFactoryContribution(cache, ciList);
 					
 					for (Iterator ciIter = ciList.getItems().iterator(); ciIter
@@ -625,6 +659,33 @@ public final class WorkbenchMenuService extends InternalMenuService {
 	}
 
 	/**
+	 * Determines whether the factory should be processed for this manager.
+	 * 
+	 * @param factory
+	 *            The factory to be added
+	 * @param mgr
+	 *            The contribution manager
+	 * @return <code>true</code> if the factory to be processed,
+	 *         <code>false</code> otherwise
+	 */
+	private boolean processFactory(ContributionManager mgr, AbstractContributionFactory factory) {
+
+		MenuLocationURI uri = new MenuLocationURI(factory.getLocation());
+		if (MenuUtil.ANY_POPUP.equals(uri.getScheme() + ':' + uri.getPath())) {
+			// its any popup. check whether manager has additions
+			if (mgr.indexOf(IWorkbenchActionConstants.MB_ADDITIONS) == -1) {
+				// menu has no additions. Add only if allPopups = true
+				if (factory instanceof MenuAdditionCacheEntry) {
+					MenuAdditionCacheEntry menuEntry = (MenuAdditionCacheEntry) factory;
+					return menuEntry.contributeToAllPopups();
+				}
+			}
+		}
+
+		return true;
+	}
+
+	/**
 	 * Removes all cached info for the given manager/factory tuple. This
 	 * includes unregistering expressions...
 	 * 
@@ -736,11 +797,6 @@ public final class WorkbenchMenuService extends InternalMenuService {
 		}
 	}
 
-	/**
-	 * @param mgr
-	 * @param uri
-	 * @return
-	 */
 	private int getInsertionIndex(ContributionManager mgr, String location) {
 		MenuLocationURI uri = new MenuLocationURI(location);
 		String query = uri.getQuery();
@@ -749,19 +805,36 @@ public final class WorkbenchMenuService extends InternalMenuService {
 
 		// No Query means 'after=additions' (if ther) or
 		// the end of the menu
-		if (query.length() == 0 || query.equals("after=additions")) { //$NON-NLS-1$
-			additionsIndex = mgr.indexOf("additions"); //$NON-NLS-1$
+		if (query.length() == 0 || query.equals(INDEX_AFTER_ADDITIONS)) {
+			additionsIndex = mgr
+					.indexOf(IWorkbenchActionConstants.MB_ADDITIONS);
 			if (additionsIndex == -1)
 				additionsIndex = mgr.getItems().length;
 			else
 				++additionsIndex;
 		} else {
-			// Should be in the form "[before|after]=id"
+			// Should be in the form "[before|after|endof]=id"
 			String[] queryParts = Util.split(query, '=');
 			if (queryParts.length>1 && queryParts[1].length() > 0) {
-				additionsIndex = mgr.indexOf(queryParts[1]);
-				if (additionsIndex != -1 && queryParts[0].equals("after")) //$NON-NLS-1$
+				String modifier = queryParts[0];
+				String id = queryParts[1];
+				additionsIndex = mgr.indexOf(id);
+				if (additionsIndex != -1) {
+					if (MenuUtil.QUERY_BEFORE.equals(modifier)) {
+						// this is OK, the additionsIndex will either be correct
+						// or -1 (which is a no-op)
+					} else if (MenuUtil.QUERY_AFTER.equals(modifier)) {
 					additionsIndex++;
+					} else if (MenuUtil.QUERY_ENDOF.equals(modifier)) {
+						// OK, this one is exciting
+						IContributionItem[] items = mgr.getItems();
+						for (additionsIndex++; additionsIndex < items.length; additionsIndex++) {
+							if (items[additionsIndex].isGroupMarker()) {
+								break;
+							}
+						}
+					}
+				}
 			}
 		}
 
@@ -863,6 +936,9 @@ public final class WorkbenchMenuService extends InternalMenuService {
 	 * @see org.eclipse.ui.internal.menus.IMenuService#releaseMenu(org.eclipse.jface.action.ContributionManager)
 	 */
 	public void releaseContributions(ContributionManager mgr) {
+
+		if (mgr == null)
+			return;
 		// Recursive remove any contributions from sub-menus
 		IContributionItem[] items = mgr.getItems();
 		for (int i = 0; i < items.length; i++) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
index 8c97ffd..be5099f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties	
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 #        - Fix for Bug 57087
 #        - Fix for Bug 138034 [Preferences] Label decorations page - extra space
 #        - Fix for Bug 128529
+#     Semion Chichelnitsky (semion at il.ibm.com) - bug 278064
 ###############################################################################
 
 # package: org.eclipse.ui
@@ -286,6 +287,8 @@ AboutSystemDialog_browseErrorLogName = &View Error Log
 AboutSystemDialog_copyToClipboardName = Copy &to Clipboard
 AboutSystemDialog_noLogTitle = Error Log Not Found
 AboutSystemDialog_noLogMessage = The error log was not found at {0}.  No errors have been reported in this workspace.
+AboutSystemPage_FetchJobTitle=Configuration Fetch Job
+AboutSystemPage_RetrievingSystemInfo=Retrieving system information...
 
 # --- Shortcutbar ---
 PerspectiveBarContributionItem_toolTip = {0} perspective
@@ -455,10 +458,13 @@ OpenPerspectiveMode_optionsTitle = Open a new perspective
 OpenPerspectiveMode_sameWindow = In the &same window
 OpenPerspectiveMode_newWindow = In a &new window
 
-OpenViewMode_title = Open a new view
+FastViewsGroup_title = Fast Views
+OpenViewMode_title = Open a new view:
 OpenViewMode_embed = &Within the perspective
 OpenViewMode_fast = As &fast view
 
+FastViewBar_hide = &Hide empty fast view bar 
+
 PerspectivesPreference_MakeDefault = Ma&ke Default
 PerspectivesPreference_MakeDefaultTip = Make the Current Selection the Default Perspective
 PerspectivesPreference_Reset = &Reset
@@ -581,6 +587,7 @@ EditorPane_pinEditor=&Pin Editor
 ExternalEditor_errorMessage = Error opening external editor ({0}).
 Save = Save
 Save_Resource = Save Resource
+Saving_Modifications = Saving modifications
 Save_All = Save All
 
 
@@ -601,6 +608,7 @@ Perspective_multipleErrors = Errors have occurred while saving the workbench: Se
 
 Perspective_problemRestoringTitle = Restoring Problems
 Perspective_errorReadingState = Unable to read workbench state.
+Perspective_localCopyLabel = <{0}>
 Perspective_problemLoadingTitle = Loading Problems
 Perspective_couldNotBeFound= Description of ''{0}'' perspective could not be found.
 WorkbenchPage_problemRestoringTitle = Restoring Problems
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalEditor.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalEditor.java
index a0144e8..238b556 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalEditor.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/ExternalEditor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.util.Util;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.program.Program;
 import org.eclipse.ui.internal.WorkbenchMessages;
@@ -126,7 +127,13 @@ public class ExternalEditor {
         // thrown, it was not caught in time, and no feedback was given to user
 
         try {
-            Runtime.getRuntime().exec(new String[] { programFileName, path });
+			if (Util.isMac()) {
+				Runtime.getRuntime().exec(
+						new String[] { "open", "-a", programFileName, path }); //$NON-NLS-1$ //$NON-NLS-2$
+			} else {
+				Runtime.getRuntime().exec(
+						new String[] { programFileName, path });
+			}
         } catch (Exception e) {
             throw new CoreException(
                     new Status(
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java
index 7bc745b..022f598 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc/Policy.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,6 +24,8 @@ import org.eclipse.ui.PlatformUI;
 public class Policy {
     public static boolean DEFAULT = false;
 
+	public static boolean DEBUG_UI_GLOBAL = DEFAULT;
+
     public static boolean DEBUG_SWT_GRAPHICS = DEFAULT;
 
     public static boolean DEBUG_SWT_DEBUG = DEFAULT;
@@ -161,6 +163,7 @@ public class Policy {
 
     static {
         if (getDebugOption("/debug")) { //$NON-NLS-1$
+			DEBUG_UI_GLOBAL = true;
             DEBUG_SWT_GRAPHICS = getDebugOption("/trace/graphics"); //$NON-NLS-1$
             DEBUG_SWT_DEBUG = getDebugOption("/debug/swtdebug"); //$NON-NLS-1$
             DEBUG_SWT_DEBUG_GLOBAL = getDebugOption("/debug/swtdebugglobal"); //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferElement.java
index 8983ef2..0bf52af 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/PreferenceTransferElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,10 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.preferences;
 
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
-
+import java.util.Set;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.preferences.IPreferenceFilter;
@@ -29,132 +31,171 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
  * @since 3.1
  */
 public class PreferenceTransferElement extends WorkbenchAdapter implements
-        IPluginContribution {
-    private String id;
-    
-    private ImageDescriptor imageDescriptor;
-
-    private IConfigurationElement configurationElement;
-
-    private IPreferenceFilter filter;
-
-    /**
-     * Create a new instance of this class
-     * 
-     * @param configurationElement
-     *              
-     */
-    public PreferenceTransferElement(IConfigurationElement configurationElement) {
-        this.configurationElement = configurationElement;
-        id = configurationElement.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
-    }
-
-    /**
-     * @return IConfigurationElement
-     */
-    public IConfigurationElement getConfigurationElement() {
-        return configurationElement;
-    }
-
-    /**
-     * Answer the preference filter of this element
-     * If the class attribute is specified it will be used, if not then look to the 
-     * 
-     * @return java.lang.String
-     * @throws CoreException 
-     */
-    public IPreferenceFilter getFilter() throws CoreException {
-        //TODO: can the CoreException be removed?
-        if (filter == null) {
-            IConfigurationElement[] mappings = PreferenceTransferRegistryReader.getMappings(configurationElement);
-            PreferenceFilter prefFilter = new PreferenceFilter();
-            prefFilter.scopes = new String[mappings.length];
-            prefFilter.maps = new Map[mappings.length];
-            for (int i = 0; i < mappings.length; i++) {
-                prefFilter.scopes[i] = PreferenceTransferRegistryReader.getScope(mappings[i]);
-                prefFilter.maps[i] = PreferenceTransferRegistryReader.getEntry(mappings[i]);
-            } 
-            filter = prefFilter;
-        }
-        return filter;
-    }
-
-    /**
-     * Answer the description parameter of this element
-     * 
-     * @return java.lang.String
-     */
-    public String getDescription() {
-        return RegistryReader.getDescription(configurationElement);
-    }
-    
-    /**
-     * Answer the id as specified in the extension.
-     * 
-     * @return java.lang.String
-     */
-    public String getID() {
-        return id;
-    }
-
-    /**
-     * Answer the icon of this element.
-     * 
-     * @return an image descriptor
-     */
-    public ImageDescriptor getImageDescriptor() {
-    	if (imageDescriptor == null) {
-    		String iconName = configurationElement.getAttribute(IWorkbenchRegistryConstants.ATT_ICON);
-	        if (iconName == null) {
+		IPluginContribution {
+	private String id;
+
+	private ImageDescriptor imageDescriptor;
+
+	private IConfigurationElement configurationElement;
+
+	private IPreferenceFilter filter;
+
+	/**
+	 * Create a new instance of this class
+	 * 
+	 * @param configurationElement
+	 * 
+	 */
+	public PreferenceTransferElement(IConfigurationElement configurationElement) {
+		this.configurationElement = configurationElement;
+		id = configurationElement
+				.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
+	}
+
+	/**
+	 * @return IConfigurationElement
+	 */
+	public IConfigurationElement getConfigurationElement() {
+		return configurationElement;
+	}
+
+	/**
+	 * Answer the preference filter of this element.
+	 * 
+	 * @return a preference filter
+	 * @throws CoreException
+	 */
+	public IPreferenceFilter getFilter() throws CoreException {
+		if (filter == null) {
+			IConfigurationElement[] mappingConfigurations = PreferenceTransferRegistryReader
+					.getMappings(configurationElement);
+			int size = mappingConfigurations.length;
+			Set scopes = new HashSet(size);
+			Map mappingsMap = new HashMap(size);
+			for (int i = 0; i < size; i++) {
+				String scope = PreferenceTransferRegistryReader
+						.getScope(mappingConfigurations[i]);
+				scopes.add(scope);
+
+				Map mappings;
+				if (!mappingsMap.containsKey(scope)) {
+					mappings = new HashMap(size);
+					mappingsMap.put(scope, mappings);
+				} else {
+					mappings = (Map) mappingsMap.get(scope);
+					if (mappings == null) {
+						continue;
+					}
+				}
+
+				Map entries = PreferenceTransferRegistryReader
+						.getEntry(mappingConfigurations[i]);
+				if (entries == null) {
+					mappingsMap.put(scope, null);
+				} else {
+					mappings.putAll(entries);
+				}
+			}
+			filter = new PreferenceFilter((String[]) scopes
+					.toArray(new String[scopes.size()]), mappingsMap);
+		}
+		return filter;
+	}
+
+	/**
+	 * Answer the description parameter of this element
+	 * 
+	 * @return java.lang.String
+	 */
+	public String getDescription() {
+		return RegistryReader.getDescription(configurationElement);
+	}
+
+	/**
+	 * Answer the id as specified in the extension.
+	 * 
+	 * @return java.lang.String
+	 */
+	public String getID() {
+		return id;
+	}
+
+	/**
+	 * Returns the name of this preference transfer element.
+	 * 
+	 * @return the name of the element
+	 */
+	public String getName() {
+		return configurationElement
+				.getAttribute(IWorkbenchRegistryConstants.ATT_NAME);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IPluginContribution#getLocalId()
+	 */
+	public String getLocalId() {
+		return getID();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.IPluginContribution#getPluginId()
+	 */
+	public String getPluginId() {
+		return (configurationElement != null) ? configurationElement
+				.getContributor().getName() : null;
+	}
+
+	class PreferenceFilter implements IPreferenceFilter {
+
+		private String[] scopes;
+		private Map mappings;
+
+		public PreferenceFilter(String[] scopes, Map mappings) {
+			this.scopes = scopes;
+			this.mappings = mappings;
+		}
+
+		public String[] getScopes() {
+			return scopes;
+		}
+
+		public Map getMapping(String scope) {
+			return (Map) mappings.get(scope);
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.model.WorkbenchAdapter#getLabel(java.lang.Object)
+	 */
+	public String getLabel(Object object) {
+		return getName();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.model.WorkbenchAdapter#getImageDescriptor(java.lang.Object
+	 * )
+	 */
+	public ImageDescriptor getImageDescriptor(Object object) {
+		if (imageDescriptor == null) {
+			String iconName = configurationElement
+					.getAttribute(IWorkbenchRegistryConstants.ATT_ICON);
+			if (iconName == null) {
 				return null;
 			}
-            imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
-                    configurationElement.getNamespace(), iconName);    
-    	}
-        return imageDescriptor;
-    }
-    
-    /**
-     * Returns the name of this preference transfer element.
-     * @return the name of the element
-     */
-    public String getName() {
-        return configurationElement.getAttribute(IWorkbenchRegistryConstants.ATT_NAME);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPluginContribution#getLocalId()
-     */
-    public String getLocalId() {
-        return getID();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IPluginContribution#getPluginId()
-     */
-    public String getPluginId() {
-        return (configurationElement != null) ? configurationElement
-                .getNamespace() : null;
-    }
-
-    class PreferenceFilter implements IPreferenceFilter {
-
-        protected String[] scopes;
-        protected Map[] maps;
-        
-        public String[] getScopes() {
-            return scopes;
-        }
-
-        public Map getMapping(String scope) {
-            for (int i = 0; i < scopes.length; i++) {
-                String item = scopes[i];
-                if (item.equals(scope)) {
-					return maps[i];
-				}                
-            }
-            return null;
-        }
-        
-    }
+			imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
+					getPluginId(), iconName);
+		}
+		return imageDescriptor;
+
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java
index 1a25679..00032c7 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/preferences/WorkbenchPreferenceExtensionNode.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,7 +19,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.graphics.Image;
@@ -37,8 +36,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
 public abstract class WorkbenchPreferenceExtensionNode extends WorkbenchPreferenceExpressionNode 
     implements IComparableContribution {
 	
-	private static final String TAG_KEYWORD_REFERENCE = "keywordReference"; //$NON-NLS-1$
-
 	private Collection keywordReferences;
 	
 	private IConfigurationElement configurationElement;
@@ -73,7 +70,7 @@ public abstract class WorkbenchPreferenceExtensionNode extends WorkbenchPreferen
 	public Collection getKeywordReferences() {
 		if (keywordReferences == null) {
 			IConfigurationElement[] references = getConfigurationElement()
-					.getChildren(TAG_KEYWORD_REFERENCE);
+					.getChildren(IWorkbenchRegistryConstants.TAG_KEYWORD_REFERENCE);
 			HashSet list = new HashSet(references.length);
 			for (int i = 0; i < references.length; i++) {
 				IConfigurationElement page = references[i];
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java
index cc7a5ed..99f64d6 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/AbstractTableInformationControl.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -217,13 +217,30 @@ public abstract class AbstractTableInformationControl {
         final Table table = fTableViewer.getTable();
         table.addKeyListener(new KeyListener() {
             public void keyPressed(KeyEvent e) {
-                if (e.character == SWT.ESC) {
+				switch (e.keyCode) {
+				case SWT.ESC:
 					dispose();
-				} else if (e.character == SWT.DEL) {
-                    removeSelectedItems();
-                    e.character = SWT.NONE;
-                    e.doit = false;
-                }
+					break;
+				case SWT.DEL:
+					removeSelectedItems();
+					e.character = SWT.NONE;
+					e.doit = false;
+					break;
+				case SWT.ARROW_UP:
+					if (table.getSelectionIndex() == 0) {
+						// on the first item, going up should grant focus to
+						// text field
+						fFilterText.setFocus();
+					}
+					break;
+				case SWT.ARROW_DOWN:
+					if (table.getSelectionIndex() == table.getItemCount() - 1) {
+						// on the last item, going down should grant focus to
+						// the text field
+						fFilterText.setFocus();
+					}
+					break;
+				}
             }
 
             public void keyReleased(KeyEvent e) {
@@ -410,20 +427,23 @@ public abstract class AbstractTableInformationControl {
 
         fFilterText.addKeyListener(new KeyListener() {
             public void keyPressed(KeyEvent e) {
-                if (e.keyCode == 0x0D) {
+				switch (e.keyCode) {
+				case SWT.CR:
+				case SWT.KEYPAD_CR:
 					gotoSelectedElement();
-				}
-                if (e.keyCode == SWT.ARROW_DOWN) {
-                    fTableViewer.getTable().setFocus();
-                    fTableViewer.getTable().setSelection(0);
-                }
-                if (e.keyCode == SWT.ARROW_UP) {
-                    fTableViewer.getTable().setFocus();
-                    fTableViewer.getTable().setSelection(
-                            fTableViewer.getTable().getItemCount() - 1);
-                }
-                if (e.character == 0x1B) {
+					break;
+				case SWT.ARROW_DOWN:
+					fTableViewer.getTable().setFocus();
+					fTableViewer.getTable().setSelection(0);
+					break;
+				case SWT.ARROW_UP:
+					fTableViewer.getTable().setFocus();
+					fTableViewer.getTable()
+							.setSelection(fTableViewer.getTable().getItemCount() - 1);
+					break;
+				case SWT.ESC:
 					dispose();
+					break;
 				}
             }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativeStackPresentation.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativeStackPresentation.java
index 4830c43..ae8591f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativeStackPresentation.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/NativeStackPresentation.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
 package org.eclipse.ui.internal.presentations;
 
 import java.util.ArrayList;
-
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.util.Geometry;
@@ -44,446 +43,506 @@ import org.eclipse.ui.presentations.StackPresentation;
  * A stack presentation using native widgets.
  * <p>
  * EXPERIMENTAL
- * </p> 
+ * </p>
  * 
  * @since 3.0
  */
 public class NativeStackPresentation extends StackPresentation {
 
-    private TabFolder tabFolder;
+	private TabFolder tabFolder;
 
-    private Listener dragListener;
+	private Listener dragListener;
 
-    private IPresentablePart current;
+	private IPresentablePart current;
 
-    private MenuManager systemMenuManager = new MenuManager();
+	private MenuManager systemMenuManager = new MenuManager();
 
-   	// don't reset this dynamically, so just keep the information static.
+	// don't reset this dynamically, so just keep the information static.
 	// see bug:
-	//   75422 [Presentations] Switching presentation to R21 switches immediately, but only partially
-    private static int tabPos = PlatformUI.getPreferenceStore().getInt(IWorkbenchPreferenceConstants.VIEW_TAB_POSITION);
-  
-    private final static String TAB_DATA = NativeStackPresentation.class
-            .getName()
-            + ".partId"; //$NON-NLS-1$
-
-    private MouseListener mouseListener = new MouseAdapter() {
-        public void mouseDown(MouseEvent e) {
-            //			// PR#1GDEZ25 - If selection will change in mouse up ignore mouse down.
-            //			// Else, set focus.
-            //			TabItem newItem = tabFolder.getItem(new Point(e.x, e.y));
-            //			if (newItem != null) {
-            //				TabItem oldItem = tabFolder.getSelection();
-            //				if (newItem != oldItem)
-            //					return;
-            //			}
-            if (current != null) {
-                current.setFocus();
-            }
-        }
-    };
-
-    private Listener menuListener = new Listener() {
-        /* (non-Javadoc)
-         * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
-         */
-        public void handleEvent(Event event) {
-            Point pos = new Point(event.x, event.y);
-            //			TabItem item = tabFolder.getItem(pos);
-            TabItem item = null;
-            IPresentablePart part = null;
-            if (item != null) {
-                part = getPartForTab(item);
-            }
-            showPaneMenu(part, pos);
-        }
-    };
-
-    private Listener selectionListener = new Listener() {
-        public void handleEvent(Event e) {
-            IPresentablePart item = getPartForTab((TabItem) e.item);
-            if (item != null) {
-                getSite().selectPart(item);
-                //				item.setFocus();
-            }
-        }
-    };
-
-    private Listener resizeListener = new Listener() {
-        public void handleEvent(Event e) {
-            setControlSize();
-        }
-    };
-
-    private IPropertyListener childPropertyChangeListener = new IPropertyListener() {
-        public void propertyChanged(Object source, int property) {
-
-            if (isDisposed()) {
+	// 75422 [Presentations] Switching presentation to R21 switches immediately,
+	// but only partially
+	private static int tabPos = PlatformUI.getPreferenceStore().getInt(
+			IWorkbenchPreferenceConstants.VIEW_TAB_POSITION);
+
+	private final static String TAB_DATA = NativeStackPresentation.class.getName() + ".partId"; //$NON-NLS-1$
+
+	private MouseListener mouseListener = new MouseAdapter() {
+		public void mouseDown(MouseEvent e) {
+			// // PR#1GDEZ25 - If selection will change in mouse up ignore mouse
+			// down.
+			// // Else, set focus.
+			// TabItem newItem = tabFolder.getItem(new Point(e.x, e.y));
+			// if (newItem != null) {
+			// TabItem oldItem = tabFolder.getSelection();
+			// if (newItem != oldItem)
+			// return;
+			// }
+			if (current != null) {
+				current.setFocus();
+			}
+		}
+	};
+
+	private Listener menuListener = new Listener() {
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets
+		 * .Event)
+		 */
+		public void handleEvent(Event event) {
+			Point pos = new Point(event.x, event.y);
+			// FIXME: this method needs work
+			
+			IPresentablePart part = null;
+			// TabItem item = tabFolder.getItem(pos);
+			// if (item != null) {
+			// part = getPartForTab(item);
+			// }
+			
+			showPaneMenu(part, pos);
+		}
+	};
+
+	private Listener selectionListener = new Listener() {
+		public void handleEvent(Event e) {
+			IPresentablePart item = getPartForTab((TabItem) e.item);
+			if (item != null) {
+				getSite().selectPart(item);
+				// item.setFocus();
+			}
+		}
+	};
+
+	private Listener resizeListener = new Listener() {
+		public void handleEvent(Event e) {
+			setControlSize();
+		}
+	};
+
+	private IPropertyListener childPropertyChangeListener = new IPropertyListener() {
+		public void propertyChanged(Object source, int property) {
+
+			if (isDisposed()) {
 				return;
 			}
 
-            if (source instanceof IPresentablePart) {
-                IPresentablePart part = (IPresentablePart) source;
-                childPropertyChanged(part, property);
-            }
-        }
-    };
-
-    private DisposeListener tabDisposeListener = new DisposeListener() {
-        public void widgetDisposed(DisposeEvent e) {
-            if (e.widget instanceof TabItem) {
-                TabItem item = (TabItem) e.widget;
-                IPresentablePart part = getPartForTab(item);
-                part.removePropertyListener(childPropertyChangeListener);
-            }
-        }
-    };
-
-    public NativeStackPresentation(Composite parent,
-            IStackPresentationSite stackSite) {
-        super(stackSite);
-
-        tabFolder = new TabFolder(parent, tabPos);
-
-        // listener to switch between visible tabItems
-        tabFolder.addListener(SWT.Selection, selectionListener);
-
-        // listener to resize visible components
-        tabFolder.addListener(SWT.Resize, resizeListener);
-
-        // listen for mouse down on tab to set focus.
-        tabFolder.addMouseListener(mouseListener);
-
-        tabFolder.addListener(SWT.MenuDetect, menuListener);
-
-        dragListener = new Listener() {
-            public void handleEvent(Event event) {
-                Point localPos = new Point(event.x, event.y);
-                //				TabItem tabUnderPointer = tabFolder.getItem(localPos);
-                TabItem tabUnderPointer = null;
-
-                if (tabUnderPointer == null) {
-                    return;
-                }
-
-                IPresentablePart part = getPartForTab(tabUnderPointer);
-
-                if (getSite().isPartMoveable(part)) {
-                    getSite().dragStart(part, tabFolder.toDisplay(localPos),
-                            false);
-                }
-            }
-        };
-
-        PresentationUtil.addDragListener(tabFolder, dragListener);
-
-    }
-
-    /**
-     * Returns the index of the tab for the given part, or returns tabFolder.getItemCount()
-     * if there is no such tab.
-     * 
-     * @param part part being searched for
-     * @return the index of the tab for the given part, or the number of tabs
-     * if there is no such tab
-     */
-    private final int indexOf(IPresentablePart part) {
-        if (part == null) {
-            return tabFolder.getItemCount();
-        }
-
-        TabItem[] items = tabFolder.getItems();
-
-        for (int idx = 0; idx < items.length; idx++) {
-            IPresentablePart tabPart = getPartForTab(items[idx]);
-
-            if (part == tabPart) {
-                return idx;
-            }
-        }
-
-        return items.length;
-    }
-
-    /**
-     * Returns the tab for the given part, or null if there is no such tab
-     * 
-     * @param part the part being searched for
-     * @return the tab for the given part, or null if there is no such tab
-     */
-    protected final TabItem getTab(IPresentablePart part) {
-        TabItem[] items = tabFolder.getItems();
-
-        int idx = indexOf(part);
-
-        if (idx < items.length) {
-            return items[idx];
-        }
-
-        return null;
-    }
-
-    /**
-     * @param part
-     * @param property
-     */
-    protected void childPropertyChanged(IPresentablePart part, int property) {
-        TabItem tab = getTab(part);
-        initTab(tab, part);
-    }
-
-    protected final IPresentablePart getPartForTab(TabItem item) {
-        IPresentablePart part = (IPresentablePart) item.getData(TAB_DATA);
-        return part;
-    }
-
-    protected TabFolder getTabFolder() {
-        return tabFolder;
-    }
-
-    public boolean isDisposed() {
-        return tabFolder == null || tabFolder.isDisposed();
-    }
-
-    /**
-     * Set the size of a page in the folder.
-     */
-    private void setControlSize() {
-        if (current == null || tabFolder == null) {
+			if (source instanceof IPresentablePart) {
+				IPresentablePart part = (IPresentablePart) source;
+				childPropertyChanged(part, property);
+			}
+		}
+	};
+
+	private DisposeListener tabDisposeListener = new DisposeListener() {
+		public void widgetDisposed(DisposeEvent e) {
+			if (e.widget instanceof TabItem) {
+				TabItem item = (TabItem) e.widget;
+				IPresentablePart part = getPartForTab(item);
+				part.removePropertyListener(childPropertyChangeListener);
+			}
+		}
+	};
+
+	public NativeStackPresentation(Composite parent, IStackPresentationSite stackSite) {
+		super(stackSite);
+
+		tabFolder = new TabFolder(parent, tabPos);
+
+		// listener to switch between visible tabItems
+		tabFolder.addListener(SWT.Selection, selectionListener);
+
+		// listener to resize visible components
+		tabFolder.addListener(SWT.Resize, resizeListener);
+
+		// listen for mouse down on tab to set focus.
+		tabFolder.addMouseListener(mouseListener);
+
+		tabFolder.addListener(SWT.MenuDetect, menuListener);
+
+		dragListener = new Listener() {
+			public void handleEvent(Event event) {
+				// FIXME: this method needs work
+				
+				// Point localPos = new Point(event.x, event.y);
+				// TabItem tabUnderPointer = tabFolder.getItem(localPos);
+				// TabItem tabUnderPointer = null;
+				//
+				// if (tabUnderPointer == null) {
+				// return;
+				// }
+				//
+				// IPresentablePart part = getPartForTab(tabUnderPointer);
+				//
+				// if (getSite().isPartMoveable(part)) {
+				// getSite().dragStart(part, tabFolder.toDisplay(localPos),
+				// false);
+				// }
+			}
+		};
+
+		PresentationUtil.addDragListener(tabFolder, dragListener);
+
+	}
+
+	/**
+	 * Returns the index of the tab for the given part, or returns
+	 * tabFolder.getItemCount() if there is no such tab.
+	 * 
+	 * @param part
+	 *            part being searched for
+	 * @return the index of the tab for the given part, or the number of tabs if
+	 *         there is no such tab
+	 */
+	private final int indexOf(IPresentablePart part) {
+		if (part == null) {
+			return tabFolder.getItemCount();
+		}
+
+		TabItem[] items = tabFolder.getItems();
+
+		for (int idx = 0; idx < items.length; idx++) {
+			IPresentablePart tabPart = getPartForTab(items[idx]);
+
+			if (part == tabPart) {
+				return idx;
+			}
+		}
+
+		return items.length;
+	}
+
+	/**
+	 * Returns the tab for the given part, or null if there is no such tab
+	 * 
+	 * @param part
+	 *            the part being searched for
+	 * @return the tab for the given part, or null if there is no such tab
+	 */
+	protected final TabItem getTab(IPresentablePart part) {
+		TabItem[] items = tabFolder.getItems();
+
+		int idx = indexOf(part);
+
+		if (idx < items.length) {
+			return items[idx];
+		}
+
+		return null;
+	}
+
+	/**
+	 * @param part
+	 * @param property
+	 */
+	protected void childPropertyChanged(IPresentablePart part, int property) {
+		TabItem tab = getTab(part);
+		initTab(tab, part);
+	}
+
+	protected final IPresentablePart getPartForTab(TabItem item) {
+		IPresentablePart part = (IPresentablePart) item.getData(TAB_DATA);
+		return part;
+	}
+
+	protected TabFolder getTabFolder() {
+		return tabFolder;
+	}
+
+	public boolean isDisposed() {
+		return tabFolder == null || tabFolder.isDisposed();
+	}
+
+	/**
+	 * Set the size of a page in the folder.
+	 */
+	private void setControlSize() {
+		if (current == null || tabFolder == null) {
 			return;
 		}
-        //		Rectangle bounds;
-        // @issue as above, the mere presence of a theme should not change the behaviour
-        //		if ((mapTabToPart.size() > 1)
-        //			|| ((tabThemeDescriptor != null) && (mapTabToPart.size() >= 1)))
-        //			bounds = calculatePageBounds(tabFolder);
-        //		else
-        //			bounds = tabFolder.getBounds();
-        current.setBounds(calculatePageBounds(tabFolder));
-        //current.moveAbove(tabFolder);
-    }
-
-    public static Rectangle calculatePageBounds(TabFolder folder) {
-        if (folder == null) {
+		// Rectangle bounds;
+		// @issue as above, the mere presence of a theme should not change the
+		// behaviour
+		// if ((mapTabToPart.size() > 1)
+		// || ((tabThemeDescriptor != null) && (mapTabToPart.size() >= 1)))
+		// bounds = calculatePageBounds(tabFolder);
+		// else
+		// bounds = tabFolder.getBounds();
+		current.setBounds(calculatePageBounds(tabFolder));
+		// current.moveAbove(tabFolder);
+	}
+
+	public static Rectangle calculatePageBounds(TabFolder folder) {
+		if (folder == null) {
 			return new Rectangle(0, 0, 0, 0);
 		}
-        Rectangle bounds = folder.getBounds();
-        Rectangle offset = folder.getClientArea();
-        bounds.x += offset.x;
-        bounds.y += offset.y;
-        bounds.width = offset.width;
-        bounds.height = offset.height;
-        return bounds;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#dispose()
-     */
-    public void dispose() {
-        if (isDisposed()) {
-            return;
-        }
-        PresentationUtil.removeDragListener(tabFolder, dragListener);
-
-        //systemMenuManager.dispose();
-
-        tabFolder.dispose();
-        tabFolder = null;
-    }
-
-    private TabItem createPartTab(IPresentablePart part, int tabIndex) {
-        TabItem tabItem = new TabItem(tabFolder, SWT.NONE, tabIndex);
-        tabItem.setData(TAB_DATA, part);
-        part.addPropertyListener(childPropertyChangeListener);
-        tabItem.addDisposeListener(tabDisposeListener);
-        initTab(tabItem, part);
-        return tabItem;
-    }
-
-    /**
-     * Initializes a tab for the given part. Sets the text, icon, tool tip,
-     * etc. This will also be called whenever a relevant property changes
-     * in the part to reflect those changes in the tab. Subclasses may override
-     * to change the appearance of tabs for a particular part.
-     * 
-     * @param tabItem tab for the part
-     * @param part the part being displayed
-     */
-    protected void initTab(TabItem tabItem, IPresentablePart part) {
-        tabItem.setText(part.getName());
-        tabItem.setToolTipText(part.getTitleToolTip());
-
-        Image tabImage = part.getTitleImage();
-        if (tabImage != tabItem.getImage()) {
-            tabItem.setImage(tabImage);
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.StackPresentation#addPart(org.eclipse.ui.internal.skins.IPresentablePart, org.eclipse.ui.internal.skins.IPresentablePart)
-     */
-    public void addPart(IPresentablePart newPart, Object cookie) {
-        createPartTab(newPart, tabFolder.getItemCount());
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.StackPresentation#removePart(org.eclipse.ui.internal.skins.IPresentablePart)
-     */
-    public void removePart(IPresentablePart oldPart) {
-        TabItem item = getTab(oldPart);
-        if (item == null) {
-            return;
-        }
-        oldPart.setVisible(false);
-
-        item.dispose();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.StackPresentation#selectPart(org.eclipse.ui.internal.skins.IPresentablePart)
-     */
-    public void selectPart(IPresentablePart toSelect) {
-        if (toSelect == current) {
-            return;
-        }
-
-        if (current != null) {
-            current.setVisible(false);
-        }
-
-        current = toSelect;
-
-        if (current != null) {
-            tabFolder.setSelection(indexOf(current));
-            current.setVisible(true);
-            setControlSize();
-        }
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#setBounds(org.eclipse.swt.graphics.Rectangle)
-     */
-    public void setBounds(Rectangle bounds) {
-        tabFolder.setBounds(bounds);
-        setControlSize();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#computeMinimumSize()
-     */
-    public Point computeMinimumSize() {
-        return Geometry.getSize(tabFolder.computeTrim(0, 0, 0, 0));
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#setVisible(boolean)
-     */
-    public void setVisible(boolean isVisible) {
-        if (current != null) {
-            current.setVisible(isVisible);
-        }
-        tabFolder.setVisible(isVisible);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#setState(int)
-     */
-    public void setState(int state) {
-        //		tabFolder.setMinimized(state == IPresentationSite.STATE_MINIMIZED);
-        //		tabFolder.setMaximized(state == IPresentationSite.STATE_MAXIMIZED);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#getSystemMenuManager()
-     */
-    public IMenuManager getSystemMenuManager() {
-        return systemMenuManager;
-    }
-
-    /**
-     * @param part
-     * @param point
-     */
-    protected void showPaneMenu(IPresentablePart part, Point point) {
-        systemMenuManager.update(false);
-        Menu aMenu = systemMenuManager.createContextMenu(tabFolder.getParent());
-        aMenu.setLocation(point.x, point.y);
-        aMenu.setVisible(true);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.Presentation#getControl()
-     */
-    public Control getControl() {
-        return tabFolder;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.skins.StackPresentation#dragOver(org.eclipse.swt.widgets.Control, org.eclipse.swt.graphics.Point)
-     */
-    public StackDropResult dragOver(Control currentControl, Point location) {
-
-        // Determine which tab we're currently dragging over
-        //		Point localPos = tabFolder.toControl(location);
-        //		final TabItem tabUnderPointer = tabFolder.getItem(localPos);
-        final TabItem tabUnderPointer = null;
-
-        // This drop target only deals with tabs... if we're not dragging over
-        // a tab, exit.
-        if (tabUnderPointer == null) {
-            return null;
-        }
-
-        //		return new StackDropResult(Geometry.toDisplay(tabFolder, tabUnderPointer.getBounds()),
-        //			tabFolder.indexOf(tabUnderPointer));
-        return null;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.presentations.StackPresentation#showSystemMenu()
-     */
-    public void showSystemMenu() {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.presentations.StackPresentation#showPaneMenu()
-     */
-    public void showPaneMenu() {
-        // TODO Auto-generated method stub
-
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.presentations.StackPresentation#getTabList(IPresentablePart)
-     */
-    public Control[] getTabList(IPresentablePart part) {
-        ArrayList list = new ArrayList();
-        if (getControl() != null) {
+		Rectangle bounds = folder.getBounds();
+		Rectangle offset = folder.getClientArea();
+		bounds.x += offset.x;
+		bounds.y += offset.y;
+		bounds.width = offset.width;
+		bounds.height = offset.height;
+		return bounds;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#dispose()
+	 */
+	public void dispose() {
+		if (isDisposed()) {
+			return;
+		}
+		PresentationUtil.removeDragListener(tabFolder, dragListener);
+
+		// systemMenuManager.dispose();
+
+		tabFolder.dispose();
+		tabFolder = null;
+	}
+
+	private TabItem createPartTab(IPresentablePart part, int tabIndex) {
+		TabItem tabItem = new TabItem(tabFolder, SWT.NONE, tabIndex);
+		tabItem.setData(TAB_DATA, part);
+		part.addPropertyListener(childPropertyChangeListener);
+		tabItem.addDisposeListener(tabDisposeListener);
+		initTab(tabItem, part);
+		return tabItem;
+	}
+
+	/**
+	 * Initializes a tab for the given part. Sets the text, icon, tool tip, etc.
+	 * This will also be called whenever a relevant property changes in the part
+	 * to reflect those changes in the tab. Subclasses may override to change
+	 * the appearance of tabs for a particular part.
+	 * 
+	 * @param tabItem
+	 *            tab for the part
+	 * @param part
+	 *            the part being displayed
+	 */
+	protected void initTab(TabItem tabItem, IPresentablePart part) {
+		tabItem.setText(part.getName());
+		tabItem.setToolTipText(part.getTitleToolTip());
+
+		Image tabImage = part.getTitleImage();
+		if (tabImage != tabItem.getImage()) {
+			tabItem.setImage(tabImage);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.skins.StackPresentation#addPart(org.eclipse.ui
+	 * .internal.skins.IPresentablePart,
+	 * org.eclipse.ui.internal.skins.IPresentablePart)
+	 */
+	public void addPart(IPresentablePart newPart, Object cookie) {
+		createPartTab(newPart, tabFolder.getItemCount());
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.skins.StackPresentation#removePart(org.eclipse
+	 * .ui.internal.skins.IPresentablePart)
+	 */
+	public void removePart(IPresentablePart oldPart) {
+		TabItem item = getTab(oldPart);
+		if (item == null) {
+			return;
+		}
+		oldPart.setVisible(false);
+
+		item.dispose();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.skins.StackPresentation#selectPart(org.eclipse
+	 * .ui.internal.skins.IPresentablePart)
+	 */
+	public void selectPart(IPresentablePart toSelect) {
+		if (toSelect == current) {
+			return;
+		}
+
+		if (current != null) {
+			current.setVisible(false);
+		}
+
+		current = toSelect;
+
+		if (current != null) {
+			tabFolder.setSelection(indexOf(current));
+			current.setVisible(true);
+			setControlSize();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.skins.Presentation#setBounds(org.eclipse.swt.
+	 * graphics.Rectangle)
+	 */
+	public void setBounds(Rectangle bounds) {
+		tabFolder.setBounds(bounds);
+		setControlSize();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#computeMinimumSize()
+	 */
+	public Point computeMinimumSize() {
+		return Geometry.getSize(tabFolder.computeTrim(0, 0, 0, 0));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#setVisible(boolean)
+	 */
+	public void setVisible(boolean isVisible) {
+		if (current != null) {
+			current.setVisible(isVisible);
+		}
+		tabFolder.setVisible(isVisible);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#setState(int)
+	 */
+	public void setState(int state) {
+		// tabFolder.setMinimized(state == IPresentationSite.STATE_MINIMIZED);
+		// tabFolder.setMaximized(state == IPresentationSite.STATE_MAXIMIZED);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#getSystemMenuManager()
+	 */
+	public IMenuManager getSystemMenuManager() {
+		return systemMenuManager;
+	}
+
+	/**
+	 * @param part
+	 * @param point
+	 */
+	protected void showPaneMenu(IPresentablePart part, Point point) {
+		systemMenuManager.update(false);
+		Menu aMenu = systemMenuManager.createContextMenu(tabFolder.getParent());
+		aMenu.setLocation(point.x, point.y);
+		aMenu.setVisible(true);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.skins.Presentation#getControl()
+	 */
+	public Control getControl() {
+		return tabFolder;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.skins.StackPresentation#dragOver(org.eclipse.
+	 * swt.widgets.Control, org.eclipse.swt.graphics.Point)
+	 */
+	public StackDropResult dragOver(Control currentControl, Point location) {
+		// FIXME: this method needs work
+
+		// Determine which tab we're currently dragging over
+		// Point localPos = tabFolder.toControl(location);
+		// final TabItem tabUnderPointer = tabFolder.getItem(localPos);
+		// final TabItem tabUnderPointer = null;
+
+		// This drop target only deals with tabs... if we're not dragging over
+		// a tab, exit.
+		// if (tabUnderPointer == null) {
+		// return null;
+		// }
+
+		// return new StackDropResult(Geometry.toDisplay(tabFolder,
+		// tabUnderPointer.getBounds()),
+		// tabFolder.indexOf(tabUnderPointer));
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.presentations.StackPresentation#showSystemMenu()
+	 */
+	public void showSystemMenu() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.presentations.StackPresentation#showPaneMenu()
+	 */
+	public void showPaneMenu() {
+		// TODO Auto-generated method stub
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.presentations.StackPresentation#getTabList(IPresentablePart
+	 * )
+	 */
+	public Control[] getTabList(IPresentablePart part) {
+		ArrayList list = new ArrayList();
+		if (getControl() != null) {
 			list.add(getControl());
 		}
-        if (part.getToolBar() != null) {
+		if (part.getToolBar() != null) {
 			list.add(part.getToolBar());
 		}
-        if (part.getControl() != null) {
+		if (part.getControl() != null) {
 			list.add(part.getControl());
 		}
-        return (Control[]) list.toArray(new Control[list.size()]);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.presentations.StackPresentation#getCurrentPart()
-     */
-    public IPresentablePart getCurrentPart() {
-        return current;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.presentations.StackPresentation#setActive(int)
-     */
-    public void setActive(int newState) {
-
-    }
+		return (Control[]) list.toArray(new Control[list.size()]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.presentations.StackPresentation#getCurrentPart()
+	 */
+	public IPresentablePart getCurrentPart() {
+		return current;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.presentations.StackPresentation#setActive(int)
+	 */
+	public void setActive(int newState) {
+
+	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolder.java
index 33525b1..4eea653 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/PaneFolder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,13 +7,13 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 66889
  *******************************************************************************/
 package org.eclipse.ui.internal.presentations;
 
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.CTabFolder;
@@ -329,7 +329,12 @@ public final class PaneFolder {
         topCenterCache.flush();
         viewForm.changed(new Control[] {viewFormTopCenterProxy.getControl()});
     }
-    
+
+	public void flushTopLeftSize() {
+		topLeftCache.flush();
+		viewForm.changed(new Control[] { viewFormTopLeftProxy.getControl() });
+	}
+
     /**
      * Sets the top-center control (usually a toolbar), or null if none. Note
      * that the control can have any parent.
@@ -727,6 +732,10 @@ public final class PaneFolder {
         tabFolder.setSelection(selection);
     }
 
+	public void showItem(int selection) {
+		tabFolder.showItem(tabFolder.getItem(selection));
+	}
+
     /**
      * @param i
      * @param j
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java
index 4fefef4..1ea14e8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabFolder.java	
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Remy Chi Jian Suen <remy.suen at gmail.com> - Bug 145557 [WorkbenchParts] Content description label needs a hover 
+ *     Semion Chichelnitsky <semion at il.ibm.com> - Bug 66889 [ViewMgmt] Package explorer message clipped
  *******************************************************************************/
 package org.eclipse.ui.internal.presentations.defaultpresentation;
 
@@ -255,6 +256,20 @@ public class DefaultTabFolder extends AbstractTabFolder {
         paneFolder.setSelection(indexOf(toSelect));
     }
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#showItem
+	 * (org.eclipse.ui.internal.presentations.util.AbstractTabItem)
+	 */
+	public void showItem(AbstractTabItem toSelect) {
+		// overrides default
+		int index = indexOf(toSelect);
+		if (index != -1)
+			paneFolder.showItem(index);
+	}
+
     /* (non-Javadoc)
      * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getToolbarParent()
      */
@@ -298,25 +313,31 @@ public class DefaultTabFolder extends AbstractTabFolder {
         }
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelectedInfo(org.eclipse.ui.internal.presentations.util.PartInfo)
-     */
-    public void setSelectedInfo(PartInfo info) {
-        String newTitle = DefaultTabItem.escapeAmpersands(info.contentDescription);
-        
-        if (!Util.equals(titleLabel.getText(), newTitle)) {
-            titleLabel.setText(newTitle);
-            titleLabel.setToolTipText(newTitle);
-        }
-    	
-        if (!info.contentDescription.equals(Util.ZERO_LENGTH_STRING)) {
-            paneFolder.setTopLeft(titleLabel);
-            titleLabel.setVisible(true);
-        } else {
-            paneFolder.setTopLeft(null);
-            titleLabel.setVisible(false);
-        }
-    }
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelectedInfo
+	 * (org.eclipse.ui.internal.presentations.util.PartInfo)
+	 */
+	public void setSelectedInfo(PartInfo info) {
+		String newTitle = DefaultTabItem
+				.escapeAmpersands(info.contentDescription);
+
+		if (!Util.equals(titleLabel.getText(), newTitle)) {
+			titleLabel.setText(newTitle);
+			titleLabel.setToolTipText(newTitle);
+		}
+
+		if (!info.contentDescription.equals(Util.ZERO_LENGTH_STRING)) {
+			paneFolder.flushTopLeftSize();
+			paneFolder.setTopLeft(titleLabel);
+			titleLabel.setVisible(true);
+		} else {
+			paneFolder.setTopLeft(null);
+			titleLabel.setVisible(false);
+		}
+	}
 
     /* (non-Javadoc)
      * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getPaneMenuLocation()
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java
index b866d9a..3de777e 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/DefaultTabItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.presentations.defaultpresentation;
 
+import com.ibm.icu.text.MessageFormat;
 import org.eclipse.jface.resource.FontRegistry;
 import org.eclipse.jface.util.Geometry;
 import org.eclipse.swt.custom.CTabFolder;
@@ -23,8 +24,6 @@ import org.eclipse.ui.internal.presentations.util.PartInfo;
 import org.eclipse.ui.internal.presentations.util.WidgetTabItem;
 import org.eclipse.ui.internal.util.Util;
 
-import com.ibm.icu.text.MessageFormat;
-
 /**
  * @since 3.1
  */
@@ -96,11 +95,14 @@ public class DefaultTabItem extends WidgetTabItem {
 		}
 
 		String toolTipText = info.toolTip;
+
 		if (toolTipText.equals(Util.ZERO_LENGTH_STRING)) {
 			toolTipText = null;
 		}
 
 		if (!Util.equals(toolTipText, tabItem.getToolTipText())) {
+			if (toolTipText != null)
+				toolTipText = escapeAmpersands(toolTipText);
 			tabItem.setToolTipText(toolTipText);
 		}
 	}
@@ -121,9 +123,10 @@ public class DefaultTabItem extends WidgetTabItem {
 	 * Escapes all the ampersands in the given string such that they can be
 	 * displayed verbatim in an SWT label rather than treated as accelerators.
 	 * 
-	 * @since 3.1
-	 * 
+	 * @param input
+	 *            the string for which to escape the ampersands
 	 * @return a string where all ampersands are escaped
+	 * @since 3.1
 	 */
 	public static String escapeAmpersands(String input) {
 		StringBuffer title = new StringBuffer(input.length());
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabFolder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabFolder.java
index 64c73c1..cabc30b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabFolder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/defaultpresentation/NativeTabFolder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,279 +40,326 @@ import org.eclipse.ui.internal.util.Util;
  */
 public class NativeTabFolder extends AbstractTabFolder {
 
-    private TabFolder control;
-    private ViewForm viewForm;
-    private StandardSystemToolbar systemToolbar;
-    private CLabel title;
-    private ProxyControl topCenter;
-    private SizeCache topCenterCache;
-    
-    private Listener selectionListener = new Listener() {
-        public void handleEvent(Event e) {
-            fireEvent(TabFolderEvent.EVENT_TAB_SELECTED, getTab(e.item));
-        }
-    };
-    
-    private IPropertyListener systemToolbarListener = new IPropertyListener() {
-
-        public void propertyChanged(Object source, int propId) {
-            Point location;
-            
-            if (propId == TabFolderEvent.EVENT_PANE_MENU) {
-                location = getPaneMenuLocation();
-            } else {
-                location = new Point(0,0);
-            }
-            
-            fireEvent(propId, getSelection(), location);
-        }
-        
-    };
-    
-    public NativeTabFolder(Composite parent) {
-        control = new TabFolder(parent, SWT.BOTTOM);
-        control.addListener(SWT.Selection, selectionListener);
-        attachListeners(control, false);
-        
-        viewForm = new ViewForm(control, SWT.FLAT);
-        attachListeners(viewForm, false);
-        systemToolbar = new StandardSystemToolbar(viewForm, true, false, true, true, true);
-        systemToolbar.addListener(systemToolbarListener);
-        viewForm.setTopRight(systemToolbar.getControl());
-        
-        topCenter = new ProxyControl(viewForm);
-        topCenterCache = new SizeCache();
-        
-        title = new CLabel(viewForm, SWT.LEFT);
-        attachListeners(title, false);
-        viewForm.setTopLeft(title);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#computeSize(int, int)
-     */
-    public Point computeSize(int widthHint, int heightHint) {
-        return new Point(50, 50);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#add(int)
-     */
-    public AbstractTabItem add(int index, int flags) {
-        NativeTabItem item = new NativeTabItem(this, index);
-        item.getWidget().setData(item);
-        
-        return item;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#layout(boolean)
-     */
-    public void layout(boolean flushCache) {
-        super.layout(flushCache);
-        
-        Rectangle oldBounds = viewForm.getBounds();
-        Rectangle newBounds = control.getClientArea();
-        
-        viewForm.setBounds(newBounds);
-        
-        if (Util.equals(oldBounds, newBounds)) {
-            viewForm.layout(flushCache);
-        }
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getPaneMenuLocation()
-     */
-    public Point getPaneMenuLocation() {
-        return systemToolbar.getPaneMenuLocation();
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setState(int)
-     */
-    public void setState(int state) {
-        super.setState(state);
-        
-        systemToolbar.setState(state);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getClientArea()
-     */
-    public Rectangle getClientArea() {
-        Control content = viewForm.getContent();
-        
-        if (content == null) {
-            return new Rectangle(0,0,0,0);
-        }
-        
-        return Geometry.toControl(control, DragUtil.getDisplayBounds(content));
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getItems()
-     */
-    public AbstractTabItem[] getItems() {
-        TabItem[] items = control.getItems();
-        
-        AbstractTabItem[] result = new AbstractTabItem[items.length];
-        
-        for (int i = 0; i < result.length; i++) {
-            result[i] = getTab(items[i]);
-        }
-        
-        return result;
-    }
-    
-    /**
-     * @param item
-     * @return
-     * @since 3.1
-     */
-    private AbstractTabItem getTab(Widget item) {
-        return (AbstractTabItem)item.getData();
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelection(org.eclipse.ui.internal.presentations.util.Widget)
-     */
-    public void setSelection(AbstractTabItem toSelect) {
-        if (toSelect == null) {
-            return;
-        }
-        
-        NativeTabItem tab = (NativeTabItem) toSelect;
-        control.setSelection(new TabItem[] {(TabItem)tab.getWidget()});
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelectedInfo(org.eclipse.ui.internal.presentations.util.PartInfo)
-     */
-    public void setSelectedInfo(PartInfo info) {
-        if (!Util.equals(title.getText(), info.title)) {
-            title.setText(info.title);
-        }
-        if (title.getImage() != info.image) {
-            title.setImage(info.image);
-        }
-    }
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getToolbarParent()
-     */
-    public Composite getToolbarParent() {
-        return viewForm;
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getTabArea()
-     */
-    public Rectangle getTabArea() {
-
-        Rectangle bounds = control.getBounds();
-        
-        Rectangle clientArea = control.getClientArea();
-        
-        bounds.x = 0;
-        bounds.y = 0;
-        Geometry.expand(bounds, 0, 0, - (clientArea.height + clientArea.y), 0);
-        
-        return Geometry.toDisplay(control.getParent(), bounds);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setToolbar(org.eclipse.swt.widgets.Control)
-     */
-    public void setToolbar(Control toolbarControl) {
-        
-        if (toolbarControl != null) { 
-            topCenterCache.setControl(toolbarControl);
-            topCenter.setTarget(topCenterCache);
-            viewForm.setTopCenter(topCenter.getControl());
-        } else {
-            topCenterCache.setControl(null);
-            topCenter.setTarget(null);
-            viewForm.setTopCenter(null);
-        }
-        
-        super.setToolbar(toolbarControl);
-    }
-    
-    public Control getControl() {
-        return control;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#isOnBorder(org.eclipse.swt.graphics.Point)
-     */
-    public boolean isOnBorder(Point globalPos) {
-        Point localPos = getControl().toControl(globalPos);
-        
-        Rectangle clientArea = getClientArea();
-        return localPos.y > clientArea.y && localPos.y < clientArea.y + clientArea.height; 
-    }
-    
-    public AbstractTabItem getSelection() {
-        TabItem[] sel = control.getSelection();
-        
-        if (sel.length == 0) {
-            return null;
-        }
-
-        return getTab(sel[0]);
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getContentParent()
-     */
-    public Composite getContentParent() {
-        return viewForm;
-    }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setContent(org.eclipse.swt.widgets.Control)
-     */
-    public void setContent(Control newContent) {
-        viewForm.setContent(newContent);
-    }
-    
-    /**
-     * @return
-     * @since 3.1
-     */
-    public TabFolder getTabFolder() {
-        return control;
-    }
-
-    /**
-     * @param item
-     * @param newTitle
-     * @since 3.1
-     */
-    /* protected */ void setSelectedTitle(String newTitle) {
-        title.setText(newTitle);
-    }
-
-    /**
-     * @param image
-     * @since 3.1
-     */
-    /* protected */ void setSelectedImage(Image image) {
-        title.setImage(image);
-    }
-
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getItem(org.eclipse.swt.graphics.Point)
-     */
-    public AbstractTabItem getItem(Point toFind) {
-        return getSelection();
-    }
-    
-    /**
-     * @param enabled
-     * @since 3.1
-     */
-    public void enablePaneMenu(boolean enabled) {
-        systemToolbar.enablePaneMenu(enabled);
-    }
+	private TabFolder control;
+	private ViewForm viewForm;
+	private StandardSystemToolbar systemToolbar;
+	private CLabel title;
+	private ProxyControl topCenter;
+	private SizeCache topCenterCache;
+
+	private Listener selectionListener = new Listener() {
+		public void handleEvent(Event e) {
+			fireEvent(TabFolderEvent.EVENT_TAB_SELECTED, getTab(e.item));
+		}
+	};
+
+	private IPropertyListener systemToolbarListener = new IPropertyListener() {
+
+		public void propertyChanged(Object source, int propId) {
+			Point location;
+
+			if (propId == TabFolderEvent.EVENT_PANE_MENU) {
+				location = getPaneMenuLocation();
+			} else {
+				location = new Point(0, 0);
+			}
+
+			fireEvent(propId, getSelection(), location);
+		}
+
+	};
+
+	public NativeTabFolder(Composite parent) {
+		control = new TabFolder(parent, SWT.BOTTOM);
+		control.addListener(SWT.Selection, selectionListener);
+		attachListeners(control, false);
+
+		viewForm = new ViewForm(control, SWT.FLAT);
+		attachListeners(viewForm, false);
+		systemToolbar = new StandardSystemToolbar(viewForm, true, false, true, true, true);
+		systemToolbar.addListener(systemToolbarListener);
+		viewForm.setTopRight(systemToolbar.getControl());
+
+		topCenter = new ProxyControl(viewForm);
+		topCenterCache = new SizeCache();
+
+		title = new CLabel(viewForm, SWT.LEFT);
+		attachListeners(title, false);
+		viewForm.setTopLeft(title);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#computeSize
+	 * (int, int)
+	 */
+	public Point computeSize(int widthHint, int heightHint) {
+		return new Point(50, 50);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#add(int)
+	 */
+	public AbstractTabItem add(int index, int flags) {
+		NativeTabItem item = new NativeTabItem(this, index);
+		item.getWidget().setData(item);
+
+		return item;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#layout(boolean
+	 * )
+	 */
+	public void layout(boolean flushCache) {
+		super.layout(flushCache);
+
+		Rectangle oldBounds = viewForm.getBounds();
+		Rectangle newBounds = control.getClientArea();
+
+		viewForm.setBounds(newBounds);
+
+		if (Util.equals(oldBounds, newBounds)) {
+			viewForm.layout(flushCache);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.presentations.util.AbstractTabFolder#
+	 * getPaneMenuLocation()
+	 */
+	public Point getPaneMenuLocation() {
+		return systemToolbar.getPaneMenuLocation();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setState
+	 * (int)
+	 */
+	public void setState(int state) {
+		super.setState(state);
+
+		systemToolbar.setState(state);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getClientArea
+	 * ()
+	 */
+	public Rectangle getClientArea() {
+		Control content = viewForm.getContent();
+
+		if (content == null) {
+			return new Rectangle(0, 0, 0, 0);
+		}
+
+		return Geometry.toControl(control, DragUtil.getDisplayBounds(content));
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getItems()
+	 */
+	public AbstractTabItem[] getItems() {
+		TabItem[] items = control.getItems();
+
+		AbstractTabItem[] result = new AbstractTabItem[items.length];
+
+		for (int i = 0; i < result.length; i++) {
+			result[i] = getTab(items[i]);
+		}
+
+		return result;
+	}
+
+	private AbstractTabItem getTab(Widget item) {
+		return (AbstractTabItem) item.getData();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelection
+	 * (org.eclipse.ui.internal.presentations.util.Widget)
+	 */
+	public void setSelection(AbstractTabItem toSelect) {
+		if (toSelect == null) {
+			return;
+		}
+
+		NativeTabItem tab = (NativeTabItem) toSelect;
+		control.setSelection(new TabItem[] { (TabItem) tab.getWidget() });
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setSelectedInfo
+	 * (org.eclipse.ui.internal.presentations.util.PartInfo)
+	 */
+	public void setSelectedInfo(PartInfo info) {
+		if (!Util.equals(title.getText(), info.title)) {
+			title.setText(info.title);
+		}
+		if (title.getImage() != info.image) {
+			title.setImage(info.image);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getToolbarParent
+	 * ()
+	 */
+	public Composite getToolbarParent() {
+		return viewForm;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getTabArea()
+	 */
+	public Rectangle getTabArea() {
+
+		Rectangle bounds = control.getBounds();
+
+		Rectangle clientArea = control.getClientArea();
+
+		bounds.x = 0;
+		bounds.y = 0;
+		Geometry.expand(bounds, 0, 0, -(clientArea.height + clientArea.y), 0);
+
+		return Geometry.toDisplay(control.getParent(), bounds);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setToolbar
+	 * (org.eclipse.swt.widgets.Control)
+	 */
+	public void setToolbar(Control toolbarControl) {
+
+		if (toolbarControl != null) {
+			topCenterCache.setControl(toolbarControl);
+			topCenter.setTarget(topCenterCache);
+			viewForm.setTopCenter(topCenter.getControl());
+		} else {
+			topCenterCache.setControl(null);
+			topCenter.setTarget(null);
+			viewForm.setTopCenter(null);
+		}
+
+		super.setToolbar(toolbarControl);
+	}
+
+	public Control getControl() {
+		return control;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#isOnBorder
+	 * (org.eclipse.swt.graphics.Point)
+	 */
+	public boolean isOnBorder(Point globalPos) {
+		Point localPos = getControl().toControl(globalPos);
+
+		Rectangle clientArea = getClientArea();
+		return localPos.y > clientArea.y && localPos.y < clientArea.y + clientArea.height;
+	}
+
+	public AbstractTabItem getSelection() {
+		TabItem[] sel = control.getSelection();
+
+		if (sel.length == 0) {
+			return null;
+		}
+
+		return getTab(sel[0]);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getContentParent
+	 * ()
+	 */
+	public Composite getContentParent() {
+		return viewForm;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#setContent
+	 * (org.eclipse.swt.widgets.Control)
+	 */
+	public void setContent(Control newContent) {
+		viewForm.setContent(newContent);
+	}
+
+	public TabFolder getTabFolder() {
+		return control;
+	}
+
+	void setSelectedTitle(String newTitle) {
+		title.setText(newTitle);
+	}
+
+	/**
+	 * @param image
+	 * @since 3.1
+	 */
+	/* protected */void setSelectedImage(Image image) {
+		title.setImage(image);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.internal.presentations.util.AbstractTabFolder#getItem(
+	 * org.eclipse.swt.graphics.Point)
+	 */
+	public AbstractTabItem getItem(Point toFind) {
+		return getSelection();
+	}
+
+	/**
+	 * @param enabled
+	 * @since 3.1
+	 */
+	public void enablePaneMenu(boolean enabled) {
+		systemToolbar.enablePaneMenu(enabled);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabFolder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabFolder.java
index 3f93a8b..4b11901 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabFolder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/AbstractTabFolder.java	
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.presentations.util;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
@@ -402,4 +401,9 @@ public abstract class AbstractTabFolder {
 	 */
 	public void showMinMax(boolean show) {
 	}
+
+	public void showItem(AbstractTabItem toSelect) {
+		setSelection(toSelect);
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PartInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PartInfo.java
index 3d644f6..cae2ca1 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PartInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PartInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java
index 89ee45d..22b34d0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/presentations/util/PresentablePartFolder.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -189,7 +189,7 @@ public final class PresentablePartFolder implements IPresentablePartList {
         }
         
         item = folder.add(idx, style);
-
+		folder.showItem(item);
         item.setData(part);
 
         initTab(item, part);
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java
index bf19fc7..f6efd90 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -169,4 +169,11 @@ public abstract class AnimationItem {
     void setAnimationContainer(IAnimationContainer container) {
         this.animationContainer = container;
     }
+
+	/**
+	 * @return Returns the window.
+	 */
+	public WorkbenchWindow getWindow() {
+		return window;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java
index 5f02482..f13909c 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/BlockedJobsDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -109,15 +109,6 @@ public class BlockedJobsDialog extends IconAndMessageDialog {
 		/*
 		 * (non-Javadoc)
 		 * 
-		 * @see org.eclipse.ui.internal.progress.JobTreeElement#getParent()
-		 */
-		Object getParent() {
-			return null;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
 		 * @see org.eclipse.ui.internal.progress.JobTreeElement#hasChildren()
 		 */
 		boolean hasChildren() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
index c057420..52646e3 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.ViewerComparator;
@@ -519,4 +518,11 @@ public class DetailedProgressViewer extends AbstractProgressViewer {
 		}
 	}
 
+	public ProgressInfoItem[] getProgressInfoItems() {
+		Control[] children = control.getChildren();
+		ProgressInfoItem[] progressInfoItems = new ProgressInfoItem[children.length];
+		System.arraycopy(children, 0, progressInfoItems, 0, children.length);
+		return progressInfoItems;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java
index 401d207..99eb6f0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ErrorInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,16 +10,14 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.progress;
 
+import com.ibm.icu.text.DateFormat;
 import java.util.Date;
-
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Image;
 
-import com.ibm.icu.text.DateFormat;
-
 /**
  * ErrorInfo is the info that displays errors.
  */
@@ -47,15 +45,6 @@ public class ErrorInfo extends JobTreeElement {
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.ui.internal.progress.JobTreeElement#getParent()
-	 */
-	Object getParent() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see org.eclipse.ui.internal.progress.JobTreeElement#hasChildren()
 	 */
 	boolean hasChildren() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java
index 8d29dbe..d2d2f24 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/GroupInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ package org.eclipse.ui.internal.progress;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.osgi.util.NLS;
@@ -41,15 +40,6 @@ class GroupInfo extends JobTreeElement implements IProgressMonitor {
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.ui.internal.progress.JobTreeElement#getParent()
-	 */
-	Object getParent() {
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see org.eclipse.ui.internal.progress.JobTreeElement#hasChildren()
 	 */
 	boolean hasChildren() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java
index a56caea..4c114d0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobInfo.java	
@@ -14,7 +14,6 @@ package org.eclipse.ui.internal.progress;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.jobs.Job;
@@ -26,7 +25,7 @@ import org.eclipse.swt.graphics.Image;
  * JobInfo is the class that keeps track of the tree structure for objects that
  * display job status in a tree.
  */
-class JobInfo extends JobTreeElement {
+public class JobInfo extends JobTreeElement {
 
     private IStatus blockedStatus;
 
@@ -316,7 +315,7 @@ class JobInfo extends JobTreeElement {
      * 
      * @return Job
      */
-    Job getJob() {
+	public Job getJob() {
         return job;
     }
 
@@ -325,7 +324,7 @@ class JobInfo extends JobTreeElement {
      * 
      * @see org.eclipse.ui.internal.progress.JobTreeElement#getParent()
      */
-    Object getParent() {
+	public Object getParent() {
         return parent;
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobTreeElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobTreeElement.java
index 5809108..3f2ceb5 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobTreeElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/JobTreeElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,19 +10,22 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.progress;
 
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.graphics.Image;
 
 /**
  * The JobTreeElement is the abstract superclass of items displayed in the tree.
  */
-abstract class JobTreeElement implements Comparable {
+public abstract class JobTreeElement implements Comparable {
 
 	/**
 	 * Return the parent of this object.
 	 * 
 	 * @return Object
 	 */
-	abstract Object getParent();
+	public Object getParent() {
+		return null;
+	}
 
 	/**
 	 * Return whether or not the receiver has children.
@@ -57,12 +60,12 @@ abstract class JobTreeElement implements Comparable {
 	}
 
 	/**
-	 * Get the image for the reciever. By default there is no image.
+	 * Get the image for the reciever.
 	 * 
 	 * @return Image or <code>null</code>.
 	 */
 	public Image getDisplayImage() {
-		return null;
+		return JFaceResources.getImage(ProgressInfoItem.DEFAULT_JOB_KEY);
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java
index 5a3cabf..6e1b98b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressAnimationItem.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,13 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.progress;
 
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.util.Util;
@@ -35,9 +41,11 @@ import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.ProgressBar;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchImages;
-import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.progress.IProgressConstants2;
 import org.eclipse.ui.statushandlers.StatusAdapter;
 import org.eclipse.ui.statushandlers.StatusManager;
 
@@ -109,30 +117,10 @@ public class ProgressAnimationItem extends AnimationItem implements
 						StatusManager.getManager().handle(statusAdapter,
 								StatusManager.SHOW);
 
-						JobTreeElement topElement = (JobTreeElement) ji
-								.getParent();
-						if (topElement == null) {
-							topElement = ji;
-						}
-						FinishedJobs.getInstance().remove(topElement);
+						removeTopElement(ji);
 					}
 
-					IAction action = null;
-					Object property = job
-							.getProperty(IProgressConstants.ACTION_PROPERTY);
-					if (property instanceof IAction) {
-						action = (IAction) property;
-					}
-					if (action != null && action.isEnabled()) {
-						action.run();
-						JobTreeElement topElement = (JobTreeElement) ji
-								.getParent();
-						if (topElement == null) {
-							topElement = ji;
-						}
-						FinishedJobs.getInstance().remove(topElement);
-						return;
-					}
+					execute(ji, job);
 				}
 			}
 		}
@@ -141,8 +129,62 @@ public class ProgressAnimationItem extends AnimationItem implements
 		refresh();
 	}
 
+	/**
+	 * @param ji
+	 * @param job
+	 */
+	private void execute(JobInfo ji, Job job) {
+
+		Object prop = job.getProperty(IProgressConstants2.ACTION_PROPERTY);
+		if (prop instanceof IAction && ((IAction) prop).isEnabled()) {
+			IAction action = (IAction) prop;
+			action.run();
+			removeTopElement(ji);
+		}
+
+		prop = job.getProperty(IProgressConstants2.COMMAND_PROPERTY);
+		if (prop instanceof ParameterizedCommand) {
+			ParameterizedCommand command = (ParameterizedCommand) prop;
+			IWorkbenchWindow window = getWindow();
+			IHandlerService service = (IHandlerService) window
+					.getService(IHandlerService.class);
+			Exception exception = null;
+			try {
+				service.executeCommand(command, null);
+				removeTopElement(ji);
+			} catch (ExecutionException e) {
+				exception = e;
+			} catch (NotDefinedException e) {
+				exception = e;
+			} catch (NotEnabledException e) {
+				exception = e;
+			} catch (NotHandledException e) {
+				exception = e;
+			}
+
+			if (exception != null) {
+				Status status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID,
+						exception.getMessage(), exception);
+				StatusManager.getManager().handle(status,
+						StatusManager.LOG | StatusManager.SHOW);
+			}
+
+		}
+	}
+
+	/**
+	 * @param ji
+	 */
+	private void removeTopElement(JobInfo ji) {
+		JobTreeElement topElement = (JobTreeElement) ji.getParent();
+		if (topElement == null) {
+			topElement = ji;
+		}
+		FinishedJobs.getInstance().remove(topElement);
+	}
+
 	private IAction getAction(Job job) {
-		Object property = job.getProperty(IProgressConstants.ACTION_PROPERTY);
+		Object property = job.getProperty(IProgressConstants2.ACTION_PROPERTY);
 		if (property instanceof IAction) {
 			return (IAction) property;
 		}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
index e85389c..8a7a121 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java	
@@ -1,7 +1,5 @@
-package org.eclipse.ui.internal.progress;
-
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,15 +8,22 @@ package org.eclipse.ui.internal.progress;
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-import java.net.URL;
+package org.eclipse.ui.internal.progress;
+
 import com.ibm.icu.text.DateFormat;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
-
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.ParameterizedCommand;
+import org.eclipse.core.commands.common.NotDefinedException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.dialogs.Dialog;
@@ -34,7 +39,9 @@ import org.eclipse.swt.events.MouseAdapter;
 import org.eclipse.swt.events.MouseEvent;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormLayout;
@@ -48,9 +55,13 @@ import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.ProgressBar;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.progress.IProgressConstants2;
+import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
  * ProgressInfoItem is the item used to show jobs.
@@ -58,7 +69,7 @@ import org.eclipse.ui.progress.IProgressConstants;
  * @since 3.1
  * 
  */
-class ProgressInfoItem extends Composite {
+public class ProgressInfoItem extends Composite {
 
 	static String STOP_IMAGE_KEY = "org.eclipse.ui.internal.progress.PROGRESS_STOP"; //$NON-NLS-1$
 
@@ -92,7 +103,7 @@ class ProgressInfoItem extends Composite {
 
 	private static final String TEXT_KEY = "Text"; //$NON-NLS-1$
 
-	private static final String ACTION_KEY = "Action";//$NON-NLS-1$
+	private static final String TRIGGER_KEY = "Trigger";//$NON-NLS-1$
 
 	interface IndexListener {
 		/**
@@ -123,6 +134,8 @@ class ProgressInfoItem extends Composite {
 
 	private ResourceManager resourceManager;
 
+	private Link link;
+
 	static {
 		JFaceResources
 				.getImageRegistry()
@@ -193,19 +206,24 @@ class ProgressInfoItem extends Composite {
 	/**
 	 * Create the child widgets of the receiver.
 	 */
-	/**
-	 * 
-	 */
 	protected void createChildren() {
 
 		FormLayout layout = new FormLayout();
 		setLayout(layout);
 
 		jobImageLabel = new Label(this, SWT.NONE);
-		jobImageLabel.setImage(getInfoImage());
+		Image infoImage = getInfoImage();
+		jobImageLabel.setImage(infoImage);
 		FormData imageData = new FormData();
-		imageData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING);
-		imageData.left = new FormAttachment(
+		if (infoImage != null) {
+			// position it in the center
+			imageData.top = new FormAttachment(50,
+					-infoImage.getBounds().height / 2);
+		} else {
+			imageData.top = new FormAttachment(0,
+					IDialogConstants.VERTICAL_SPACING);
+		}
+		imageData.left = new FormAttachment(0,
 				IDialogConstants.HORIZONTAL_SPACING / 2);
 		jobImageLabel.setLayoutData(imageData);
 
@@ -213,14 +231,10 @@ class ProgressInfoItem extends Composite {
 		setMainText();
 
 		actionBar = new ToolBar(this, SWT.FLAT);
-		actionBar.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); // set
-		// cursor
-		// to
-		// overwrite
-		// any
-		// busy
-
-		// cursor we might have
+		actionBar.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
+
+		// set cursor to overwrite any busy cursor we might have
+
 		actionButton = new ToolItem(actionBar, SWT.NONE);
 		actionButton
 				.setToolTipText(ProgressMessages.NewProgressView_CancelJobToolTip);
@@ -229,7 +243,6 @@ class ProgressInfoItem extends Composite {
 				actionButton.setEnabled(false);
 				cancelOrRemove();
 			}
-
 		});
 		actionBar.addListener(SWT.Traverse, new Listener() {
 			/*
@@ -254,11 +267,12 @@ class ProgressInfoItem extends Composite {
 		updateToolBarValues();
 
 		FormData progressData = new FormData();
-		progressData.top = new FormAttachment(IDialogConstants.VERTICAL_SPACING);
+		progressData.top = new FormAttachment(0,
+				IDialogConstants.VERTICAL_SPACING);
 		progressData.left = new FormAttachment(jobImageLabel,
 				IDialogConstants.HORIZONTAL_SPACING / 2);
 		progressData.right = new FormAttachment(actionBar,
-				IDialogConstants.HORIZONTAL_SPACING);
+				IDialogConstants.HORIZONTAL_SPACING * -1);
 		progressLabel.setLayoutData(progressData);
 
 		mouseListener = new MouseAdapter() {
@@ -394,9 +408,11 @@ class ProgressInfoItem extends Composite {
 	/**
 	 * Get the name and status for a jobInfo
 	 * 
+	 * @param jobInfo
+	 * 
 	 * @return String
 	 */
-	protected String getJobNameAndStatus(JobInfo jobInfo) {
+	public String getJobNameAndStatus(JobInfo jobInfo) {
 
 		Job job = jobInfo.getJob();
 
@@ -520,9 +536,11 @@ class ProgressInfoItem extends Composite {
 
 		for (int i = 0; i < infos.length; i++) {
 			JobInfo jobInfo = infos[i];
-			if (jobInfo.hasTaskInfo()) {
+			TaskInfo taskInfo = jobInfo.getTaskInfo();
+
+			if (taskInfo != null) {
 
-				String taskString = jobInfo.getTaskInfo().getTaskName();
+				String taskString = taskInfo.getTaskName();
 				String subTaskString = null;
 				Object[] jobChildren = jobInfo.getChildren();
 				if (jobChildren.length > 0) {
@@ -596,7 +614,7 @@ class ProgressInfoItem extends Composite {
 	 * 
 	 * @return JobInfo[]
 	 */
-	private JobInfo[] getJobInfos() {
+	public JobInfo[] getJobInfos() {
 		if (info.isJobInfo()) {
 			return new JobInfo[] { (JobInfo) info };
 		}
@@ -706,7 +724,7 @@ class ProgressInfoItem extends Composite {
 			FormData linkData = new FormData();
 			linkData.top = new FormAttachment(progressBar,
 					IDialogConstants.VERTICAL_SPACING);
-			linkData.left = new FormAttachment(
+			linkData.left = new FormAttachment(0,
 					IDialogConstants.HORIZONTAL_SPACING);
 			linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
 			// Give an initial value so as to constrain the link shortening
@@ -723,7 +741,6 @@ class ProgressInfoItem extends Composite {
 	 */
 	void setLinkText(Job linkJob, String taskString, int index) {
 
-		Link link;
 		if (index >= taskEntries.size()) {// Is it new?
 			link = new Link(this, SWT.NONE);
 
@@ -751,8 +768,6 @@ class ProgressInfoItem extends Composite {
 
 			link.setLayoutData(linkData);
 
-			final Link finalLink = link;
-
 			link.addSelectionListener(new SelectionAdapter() {
 				/*
 				 * (non-Javadoc)
@@ -760,18 +775,7 @@ class ProgressInfoItem extends Composite {
 				 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
 				 */
 				public void widgetSelected(SelectionEvent e) {
-
-					IAction action = (IAction) finalLink.getData(ACTION_KEY);
-					action.run();
-
-					updateAction(action, finalLink);
-
-					Object text = finalLink.getData(TEXT_KEY);
-					if (text == null)
-						return;
-
-					// Refresh the text as enablement might have changed
-					updateText((String) text, finalLink);
+					executeTrigger();
 				}
 			});
 
@@ -783,11 +787,11 @@ class ProgressInfoItem extends Composite {
 				 */
 				public void handleEvent(Event event) {
 
-					Object text = finalLink.getData(TEXT_KEY);
+					Object text = link.getData(TEXT_KEY);
 					if (text == null)
 						return;
 
-					updateText((String) text, finalLink);
+					updateText((String) text, link);
 
 				}
 			});
@@ -800,28 +804,87 @@ class ProgressInfoItem extends Composite {
 		link.setData(TEXT_KEY, taskString);
 
 		// check for action property
-		Object property = linkJob
-				.getProperty(IProgressConstants.ACTION_PROPERTY);
-		updateAction(property, link);
+		Object actionProperty = linkJob
+.getProperty(IProgressConstants.ACTION_PROPERTY);
+		Object commandProperty = linkJob
+.getProperty(IProgressConstants2.COMMAND_PROPERTY);
+
+		if (actionProperty != null && commandProperty != null) {
+			// if both are specified, then use neither
+			updateTrigger(null, link);
+		} else {
+			Object property = actionProperty != null ? actionProperty
+					: commandProperty;
+			updateTrigger(property, link);
+		}
 
 		updateText(taskString, link);
 
 	}
 
+	public void executeTrigger() {
+
+		Object data = link.getData(TRIGGER_KEY);
+		if (data instanceof IAction) {
+			IAction action = (IAction) data;
+			if (action.isEnabled())
+				action.run();
+			updateTrigger(action, link);
+		} else if (data instanceof ParameterizedCommand) {
+			IWorkbench workbench = PlatformUI
+					.getWorkbench();
+			IHandlerService handlerService = (IHandlerService) workbench
+					.getService(
+							IHandlerService.class);
+			IStatus status = Status.OK_STATUS;
+			try {
+				handlerService
+						.executeCommand((ParameterizedCommand) data, null);
+			} catch (ExecutionException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} catch (NotDefinedException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} catch (NotEnabledException e) {
+				status = new Status(IStatus.WARNING, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} catch (NotHandledException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			}
+
+			if (!status.isOK()) {
+				StatusManager.getManager().handle(status,
+						StatusManager.LOG | StatusManager.SHOW);
+			}
+		}
+
+		Object text = link.getData(TEXT_KEY);
+		if (text == null)
+			return;
+
+		// Refresh the text as enablement might have changed
+		updateText((String) text, link);
+	}
+
 	/**
-	 * Update the action key if action is enabled or remove it if not
+	 * Update the trigger key if either action is available and enabled or
+	 * command is available
 	 * 
-	 * @param action
+	 * @param trigger
 	 *            {@link Object} or <code>null</code>
 	 * @param link
 	 */
-	private void updateAction(Object action, Link link) {
+	private void updateTrigger(Object trigger, Link link) {
 
-		if (action != null && action instanceof IAction
-				&& ((IAction) action).isEnabled())
-			link.setData(ACTION_KEY, action);
-		else
-			link.setData(ACTION_KEY, null);
+		if (trigger instanceof IAction && ((IAction) trigger).isEnabled()) {
+			link.setData(TRIGGER_KEY, trigger);
+		} else if (trigger instanceof ParameterizedCommand) {
+			link.setData(TRIGGER_KEY, trigger);
+		} else {
+			link.setData(TRIGGER_KEY, null);
+		}
 
 	}
 
@@ -835,7 +898,7 @@ class ProgressInfoItem extends Composite {
 		taskString = Dialog.shortenText(taskString, link);
 
 		// Put in a hyperlink if there is an action
-		link.setText(link.getData(ACTION_KEY) == null ? taskString : NLS.bind(
+		link.setText(link.getData(TRIGGER_KEY) == null ? taskString : NLS.bind(
 				"<a>{0}</a>", taskString));//$NON-NLS-1$
 	}
 
@@ -975,4 +1038,11 @@ class ProgressInfoItem extends Composite {
 		if(resourceManager != null)
 			resourceManager.dispose();
 	}
+
+	/**
+	 * @return Returns the info.
+	 */
+	public JobTreeElement getInfo() {
+		return info;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java
index 4659429..a1b2eeb 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManager.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,6 @@ import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IProgressMonitorWithBlocking;
 import org.eclipse.core.runtime.IStatus;
@@ -96,12 +95,10 @@ public class ProgressManager extends ProgressProvider implements
 	final private Map familyListeners = Collections
 			.synchronizedMap(new HashMap());
 
-	final Object familyKey = new Object();
-
 	//	list of IJobProgressManagerListener
 	private ListenerList listeners = new ListenerList();
 	
-	IJobChangeListener changeListener;
+	final IJobChangeListener changeListener;
 
 	static final String PROGRESS_VIEW_NAME = "org.eclipse.ui.views.ProgressView"; //$NON-NLS-1$
 
@@ -130,10 +127,6 @@ public class ProgressManager extends ProgressProvider implements
 
 	final Map runnableMonitors = Collections.synchronizedMap(new HashMap());
 
-	final Object monitorKey = new Object();
-
-	FinishedJobs finishedJobs;
-
 	// A table that maps families to keys in the Jface image
 	// table
 	private Hashtable imageKeyTable = new Hashtable();
@@ -142,7 +135,7 @@ public class ProgressManager extends ProgressProvider implements
 	 * A listener that allows for removing error jobs & indicators when errors
 	 * are handled.
 	 */
-	private INotificationListener notificationListener;
+	private final INotificationListener notificationListener;
 
 	private static final String IMAGE_KEY = "org.eclipse.ui.progress.images"; //$NON-NLS-1$
 
@@ -364,22 +357,39 @@ public class ProgressManager extends ProgressProvider implements
 	 * Create a new instance of the receiver.
 	 */
 	ProgressManager() {
-		Job.getJobManager().setProgressProvider(this);
+
 		Dialog.setBlockedHandler(new WorkbenchDialogBlockedHandler());
-		createChangeListener();
+
+		setUpImages();
+
+		changeListener = createChangeListener();
+
+		notificationListener = createNotificationListener();
+
+		Job.getJobManager().setProgressProvider(this);
 		Job.getJobManager().addJobChangeListener(this.changeListener);
+		StatusManager.getManager().addListener(notificationListener);
+	}
+
+	private void setUpImages() {
 		URL iconsRoot = ProgressManagerUtil.getIconsRoot();
 		try {
 			setUpImage(iconsRoot, SLEEPING_JOB, SLEEPING_JOB_KEY);
 			setUpImage(iconsRoot, WAITING_JOB, WAITING_JOB_KEY);
 			setUpImage(iconsRoot, BLOCKED_JOB, BLOCKED_JOB_KEY);
 
-			// Let the error manager set up its own icons
-			setUpImages(iconsRoot);
+			ImageDescriptor errorImage = ImageDescriptor
+					.createFromURL(new URL(iconsRoot, ERROR_JOB));
+			JFaceResources.getImageRegistry().put(ERROR_JOB_KEY, errorImage);
+
 		} catch (MalformedURLException e) {
 			ProgressManagerUtil.logException(e);
 		}
-		this.notificationListener = new StatusManager.INotificationListener(){
+	}
+
+	private INotificationListener createNotificationListener() {
+
+		return new StatusManager.INotificationListener(){
 
 			public void statusManagerNotified(int type, StatusAdapter[] adapters) {
 				if(type == INotificationTypes.HANDLED){
@@ -389,27 +399,15 @@ public class ProgressManager extends ProgressProvider implements
 			}
 			
 		};
-		StatusManager.getManager().addListener(notificationListener);
 	}
 
 	/**
-	 * Set up any images the error management needs.
+	 * Create and return the IJobChangeListener registered with the Job manager.
 	 * 
-	 * @param iconsRoot
-	 * @throws MalformedURLException
-	 */
-	void setUpImages(URL iconsRoot) throws MalformedURLException {
-		// TODO see ErrorNotificationManager - this method isn't currently used
-		// In the ErrorNotificationManager it is invoked by ProgressManager
-		JFaceResources.getImageRegistry().put(ERROR_JOB_KEY,
-				ImageDescriptor.createFromURL(new URL(iconsRoot, ERROR_JOB)));
-	}
-
-	/**
-	 * Create the IJobChangeListener registered with the Job manager.
+	 * @return the created IJobChangeListener
 	 */
-	private void createChangeListener() {
-		changeListener = new JobChangeAdapter() {
+	private IJobChangeListener createChangeListener() {
+		return new JobChangeAdapter() {
 
 			/*
 			 * (non-Javadoc)
@@ -466,8 +464,7 @@ public class ProgressManager extends ProgressProvider implements
 								info, statusAdapter);
 					}
 
-					StatusManager.getManager().handle(statusAdapter,
-							StatusManager.SHOW);
+					StatusManager.getManager().handle(statusAdapter, StatusManager.SHOW);
 				}
 			}
 
@@ -640,12 +637,13 @@ public class ProgressManager extends ProgressProvider implements
 	 */
 	public JobMonitor progressFor(Job job) {
 
-		synchronized (monitorKey) {
-			if (runnableMonitors.containsKey(job)) {
-				return (JobMonitor) runnableMonitors.get(job);
+		synchronized (runnableMonitors) {
+			JobMonitor monitor = (JobMonitor) runnableMonitors.get(job);
+			if (monitor == null) {
+				monitor = new JobMonitor(job);
+				runnableMonitors.put(job, monitor);
 			}
-			JobMonitor monitor = new JobMonitor(job);
-			runnableMonitors.put(job, monitor);
+			
 			return monitor;
 		}
 
@@ -753,11 +751,7 @@ public class ProgressManager extends ProgressProvider implements
 
 		Job job = info.getJob();
 		jobs.remove(job);
-		synchronized (monitorKey) {
-			if (runnableMonitors.containsKey(job)) {
-				runnableMonitors.remove(job);
-			}
-		}
+		runnableMonitors.remove(job);
 
 		Object[] listenersArray = listeners.getListeners();
 		for (int i = 0; i < listenersArray.length; i++) {
@@ -1074,15 +1068,13 @@ public class ProgressManager extends ProgressProvider implements
 	 * @param listener
 	 */
 	void addListenerToFamily(Object family, IJobBusyListener listener) {
-		synchronized (familyKey) {
-			Collection currentListeners;
-			if (familyListeners.containsKey(family)) {
-				currentListeners = (Collection) familyListeners.get(family);
-			} else {
+		synchronized (familyListeners) {
+			Collection currentListeners = (Collection) familyListeners.get(family);
+			if (currentListeners == null) {
 				currentListeners = new HashSet();
+				familyListeners.put(family, currentListeners);
 			}
 			currentListeners.add(listener);
-			familyListeners.put(family, currentListeners);
 		}
 	}
 
@@ -1092,27 +1084,19 @@ public class ProgressManager extends ProgressProvider implements
 	 * @param listener
 	 */
 	void removeListener(IJobBusyListener listener) {
-		synchronized (familyKey) {
-			Collection keysToRemove = new HashSet();
+		synchronized (familyListeners) {
 			Iterator families = familyListeners.keySet().iterator();
 			while (families.hasNext()) {
 				Object next = families.next();
 				Collection currentListeners = (Collection) familyListeners
 						.get(next);
-				if (currentListeners.contains(listener)) {
-					currentListeners.remove(listener);
-				}
+				currentListeners.remove(listener);
+
+				// Remove any empty listeners
 				if (currentListeners.isEmpty()) {
-					keysToRemove.add(next);
-				} else {
-					familyListeners.put(next, currentListeners);
+					families.remove();
 				}
 			}
-			// Remove any empty listeners
-			Iterator keysIterator = keysToRemove.iterator();
-			while (keysIterator.hasNext()) {
-				familyListeners.remove(keysIterator.next());
-			}
 		}
 	}
 
@@ -1126,14 +1110,14 @@ public class ProgressManager extends ProgressProvider implements
 		if (job.isSystem()) {
 			return Collections.EMPTY_LIST;
 		}
-		synchronized (familyKey) {
+		synchronized (familyListeners) {
 
 			if (familyListeners.isEmpty()) {
 				return Collections.EMPTY_LIST;
 			}
 
 			Iterator families = familyListeners.keySet().iterator();
-			Collection returnValue = new ArrayList();
+			Collection returnValue = new HashSet();
 			while (families.hasNext()) {
 				Object next = families.next();
 				if (job.belongsTo(next)) {
@@ -1191,56 +1175,26 @@ public class ProgressManager extends ProgressProvider implements
 	public void runInUI(final IRunnableContext context,
 			final IRunnableWithProgress runnable, final ISchedulingRule rule)
 			throws InvocationTargetException, InterruptedException {
-		final IJobManager manager = Job.getJobManager();
-		final InvocationTargetException[] exception = new InvocationTargetException[1];
-		final InterruptedException[] canceled = new InterruptedException[1];
-		BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
+		final RunnableWithStatus runnableWithStatus = new RunnableWithStatus(
+				context,
+				runnable, rule);
+		final Display display = Display.getDefault();
+		display.syncExec(new Runnable() {
 			public void run() {
-				try {
-					manager.beginRule(rule, PlatformUI.getWorkbench().isStarting() 
-							? new NullProgressMonitor()
-							: getEventLoopMonitor());
-					context.run(false, false, runnable);
-				} catch (InvocationTargetException e) {
-					exception[0] = e;
-				} catch (InterruptedException e) {
-					canceled[0] = e;
-				} catch (OperationCanceledException e) {
-					canceled[0] = new InterruptedException(e.getMessage());
-				} finally {
-					manager.endRule(rule);
-				}
+				BusyIndicator.showWhile(display, runnableWithStatus);
 			}
 
-			/**
-			 * Get a progress monitor that forwards to an event loop monitor.
-			 * Override #setBlocked() so that we always open the blocked dialog.
-			 * 
-			 * @return the monitor on the event loop
-			 */
-			private IProgressMonitor getEventLoopMonitor() {
-				return new EventLoopProgressMonitor(new NullProgressMonitor()) {
-					/*
-					 * (non-Javadoc)
-					 * 
-					 * @see org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor#setBlocked(org.eclipse.core.runtime.IStatus)
-					 */
-					public void setBlocked(IStatus reason) {
-
-						// Set a shell to open with as we want to create this
-						// even if there is a modal shell.
-						Dialog.getBlockedHandler().showBlocked(
-								ProgressManagerUtil.getDefaultParent(), this,
-								reason, getTaskName());
-					}
-				};
-			}
 		});
-		if (exception[0] != null) {
-			throw exception[0];
-		}
-		if (canceled[0] != null) {
-			throw canceled[0];
+
+		IStatus status = runnableWithStatus.getStatus();
+		if (!status.isOK()) {
+			Throwable exception = status.getException();
+			if (exception instanceof InvocationTargetException)
+				throw (InvocationTargetException) exception;
+			else if (exception instanceof InterruptedException)
+				throw (InterruptedException) exception;
+			else // should be OperationCanceledException
+				throw new InterruptedException(exception.getMessage());
 		}
 	}
 
@@ -1370,4 +1324,67 @@ public class ProgressManager extends ProgressProvider implements
 		updater.refreshAll();
 
 	}
+
+	private class RunnableWithStatus implements Runnable {
+
+		IStatus status = Status.OK_STATUS;
+		private final IRunnableContext context;
+		private final IRunnableWithProgress runnable;
+		private final ISchedulingRule rule;
+
+		public RunnableWithStatus(IRunnableContext context,
+				IRunnableWithProgress runnable, ISchedulingRule rule) {
+			this.context = context;
+			this.runnable = runnable;
+			this.rule = rule;
+		}
+
+		public void run() {
+			IJobManager manager = Job.getJobManager();
+			try {
+				manager.beginRule(rule, getEventLoopMonitor());
+				context.run(false, false, runnable);
+			} catch (InvocationTargetException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} catch (InterruptedException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} catch (OperationCanceledException e) {
+				status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e
+						.getMessage(), e);
+			} finally {
+				manager.endRule(rule);
+			}
+		}
+
+		/**
+		 * Get a progress monitor that forwards to an event loop monitor.
+		 * Override #setBlocked() so that we always open the blocked dialog.
+		 * 
+		 * @return the monitor on the event loop
+		 */
+		private IProgressMonitor getEventLoopMonitor() {
+
+			if (PlatformUI.getWorkbench().isStarting())
+				return new NullProgressMonitor();
+
+			return new EventLoopProgressMonitor(new NullProgressMonitor()) {
+
+				public void setBlocked(IStatus reason) {
+
+					// Set a shell to open with as we want to create
+					// this
+					// even if there is a modal shell.
+					Dialog.getBlockedHandler().showBlocked(
+							ProgressManagerUtil.getDefaultParent(), this,
+							reason, getTaskName());
+				}
+			};
+		}
+		public IStatus getStatus() {
+			return status;
+		}
+
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java
index c088b06..f168ee7 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -217,4 +217,11 @@ public class ProgressView extends ViewPart implements IViewPart {
 		}
 	}
 
+	/**
+	 * @return Returns the viewer.
+	 */
+	public DetailedProgressViewer getViewer() {
+		return viewer;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java
index 836314b..9205d79 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/SubTaskInfo.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -84,7 +84,7 @@ class SubTaskInfo extends JobTreeElement {
 	 * 
 	 * @see org.eclipse.ui.internal.progress.JobTreeElement#getParent()
 	 */
-	Object getParent() {
+	public Object getParent() {
 		return jobInfo;
 	}
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java
new file mode 100644
index 0000000..c90bf9a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/TaskBarProgressManager.java	
@@ -0,0 +1,290 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Tasktop Technologies - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.progress;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.TaskItem;
+import org.eclipse.ui.progress.IProgressConstants2;
+import org.eclipse.ui.progress.WorkbenchJob;
+
+/**
+ * The TaskBarProgressManager is the class that displays progress in the
+ * application TaskBar if the job specifies that it should show progress (@see
+ * {@link IProgressConstants2#SHOW_IN_TASKBAR_ICON_PROPERTY}
+ * 
+ * @since 3.6
+ */
+public class TaskBarProgressManager {
+
+	private IJobProgressManagerListener listener;
+
+	private WorkbenchJob animationUpdateJob;
+
+	private boolean isAnimated = false;
+
+	private List jobs = Collections.synchronizedList(new ArrayList());
+
+	private Map jobInfoMap = Collections.synchronizedMap(new HashMap());
+
+	private final TaskItem taskItem;
+
+	public TaskBarProgressManager(TaskItem taskItem) {
+		Assert.isNotNull(taskItem);
+		this.taskItem = taskItem;
+		animationUpdateJob = getAnimationUpdateJob();
+		animationUpdateJob.setSystem(true);
+		listener = getProgressListener();
+
+		// Register the IJobProgressManagerListener so we can display progress
+		// on the application TaskBar
+		ProgressManager.getInstance().addListener(listener);
+
+		taskItem.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				dispose();
+			}
+		});
+	}
+
+	/**
+	 * Remove the listener and stop the animation
+	 */
+	public void dispose() {
+		ProgressManager.getInstance().removeListener(listener);
+		setAnimated(false);
+	}
+
+	private WorkbenchJob getAnimationUpdateJob() {
+		return new WorkbenchJob(ProgressMessages.AnimationManager_AnimationStart) {
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.
+			 * runtime .IProgressMonitor)
+			 */
+			public IStatus runInUIThread(IProgressMonitor monitor) {
+				if (isAnimated) {
+					if (!taskItem.isDisposed() && !jobs.isEmpty()) {
+						Job job = (Job) jobs.get(0);
+						JobInfo jobInfo = (JobInfo) jobInfoMap.get(job);
+						if (job != null && jobInfo != null) {
+							int percentDone = getPercentDone(jobInfo);
+							if (percentDone == IProgressMonitor.UNKNOWN
+									|| (jobInfo.hasTaskInfo() && jobInfo.getTaskInfo().totalWork == IProgressMonitor.UNKNOWN)) {
+								setProgressState(SWT.INDETERMINATE);
+							} else {
+								setProgressState(SWT.NORMAL);
+								if (!taskItem.isDisposed()) {
+									taskItem.setProgress(percentDone);
+								}
+							}
+						} else {
+							setProgressState(SWT.DEFAULT);
+						}
+					}
+				} else {
+					setProgressState(SWT.DEFAULT);
+				}
+
+				if (isAnimated && taskItem != null && !taskItem.isDisposed()) {
+					schedule(400);
+				}
+				return Status.OK_STATUS;
+			}
+
+			private void setProgressState(int state) {
+				if (!taskItem.isDisposed() && taskItem.getProgressState() != state) {
+					taskItem.setProgressState(SWT.DEFAULT);
+					taskItem.setProgressState(state);
+				}
+			}
+
+			private int getPercentDone(JobTreeElement info) {
+				if (info.isJobInfo()) {
+					return ((JobInfo) info).getPercentDone();
+				}
+
+				if (info.hasChildren()) {
+					Object[] roots = ((GroupInfo) info).getChildren();
+					if (roots.length == 1 && roots[0] instanceof JobTreeElement) {
+						TaskInfo ti = ((JobInfo) roots[0]).getTaskInfo();
+						if (ti != null) {
+							return ti.getPercentDone();
+						}
+					}
+					return ((GroupInfo) info).getPercentDone();
+				}
+				return 0;
+			}
+		};
+	}
+
+	private IJobProgressManagerListener getProgressListener() {
+		return new IJobProgressManagerListener() {
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * addJob(org.eclipse.ui.internal.progress.JobInfo)
+			 */
+			public void addJob(JobInfo info) {
+				// Don't count the animate job itself
+				if (isNotTracked(info)) {
+					return;
+				}
+				if (jobs.isEmpty()) {
+					setAnimated(true);
+				}
+				if (!jobs.contains(info.getJob())) {
+					jobs.add(info.getJob());
+				}
+				jobInfoMap.put(info.getJob(), info);
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * refreshJobInfo(org.eclipse.ui.internal.progress.JobInfo)
+			 */
+			public void refreshJobInfo(JobInfo info) {
+				int state = info.getJob().getState();
+				if (state == Job.RUNNING) {
+					addJob(info);
+				} else {
+					removeJob(info);
+				}
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * refreshAll()
+			 */
+			public void refreshAll() {
+				ProgressManager manager = ProgressManager.getInstance();
+				jobs.clear();
+				jobInfoMap.clear();
+				setAnimated(false);
+				JobInfo[] currentInfos = manager.getJobInfos(showsDebug());
+				for (int i = 0; i < currentInfos.length; i++) {
+					addJob(currentInfos[i]);
+				}
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * remove(org.eclipse.ui.internal.progress.JobInfo)
+			 */
+			public void removeJob(JobInfo info) {
+				jobs.remove(info.getJob());
+				jobInfoMap.remove(info.getJob());
+				if (jobs.isEmpty()) {
+					setAnimated(false);
+				}
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * showsDebug()
+			 */
+			public boolean showsDebug() {
+				return false;
+			}
+
+			/**
+			 * If the job isn't running or doesn't specify the
+			 * IProgressConstants#SHOW_IN_TASKBAR_ICON_PROPERTY property, don't
+			 * bother tracking it.
+			 */
+			private boolean isNotTracked(JobInfo info) {
+				Job job = info.getJob();
+				return job.getState() != Job.RUNNING || !shouldShowSystemProgress(info);
+			}
+
+			private boolean shouldShowSystemProgress(JobInfo info) {
+				Boolean showInTaskBarIcon = Boolean.FALSE;
+				Object property = info.getJob().getProperty(
+						IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY);
+
+				if (property instanceof Boolean) {
+					showInTaskBarIcon = (Boolean) property;
+				}
+				return showInTaskBarIcon.booleanValue();
+
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * addGroup(org.eclipse.ui.internal.progress.GroupInfo)
+			 */
+			public void addGroup(GroupInfo info) {
+				// Don't care about groups
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * removeGroup(org.eclipse.ui.internal.progress.GroupInfo)
+			 */
+			public void removeGroup(GroupInfo group) {
+				// Don't care about groups
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.ui.internal.progress.IJobProgressManagerListener#
+			 * refreshGroup(org.eclipse.ui.internal.progress.GroupInfo)
+			 */
+			public void refreshGroup(GroupInfo info) {
+				// Don't care about groups
+			}
+		};
+	}
+
+	private synchronized void setAnimated(boolean animated) {
+		isAnimated = animated;
+		animationUpdateJob.schedule();
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java
index 3e5f601..551d5da 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/WorkbenchSiteProgressService.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,10 +12,8 @@
 package org.eclipse.ui.internal.progress;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-
+import java.util.HashMap;
+import java.util.Map;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -52,7 +50,15 @@ public class WorkbenchSiteProgressService implements
         IWorkbenchSiteProgressService, IJobBusyListener {
     PartSite site;
 
-    private Collection busyJobs = Collections.synchronizedSet(new HashSet());
+	/**
+	 * Map from Job to Boolean (non-null). Interpretation of the value:
+	 * <ul>
+	 * <li>{@link Boolean#TRUE}: The half busy cursor has been requested.</li>
+	 * <li>{@link Boolean#FALSE}: The half busy cursor has not (yet) been
+	 * requested.</li>
+	 * </ul>
+	 */
+	private Map busyJobs = new HashMap();
 
     private Object busyLock = new Object();
 
@@ -66,9 +72,10 @@ public class WorkbenchSiteProgressService implements
     
     private SiteUpdateJob updateJob;
 
-    /**
-     * Flag that keeps state from calls to {@link #showBusy(boolean)}
-     */
+	/**
+	 * Flag that keeps state from calls to {@link #incrementBusy()} and
+	 * {@link #decrementBusy()}.
+	 */
 	private int busyCount = 0;
 
     public class SiteUpdateJob extends WorkbenchJob {
@@ -221,7 +228,6 @@ public class WorkbenchSiteProgressService implements
     /**
      * Get the job change listener for this site.
      * 
-     * @param job
      * @param useHalfBusyCursor
      * @return IJobChangeListener
      */
@@ -236,12 +242,7 @@ public class WorkbenchSiteProgressService implements
 			 * .eclipse.core.runtime.jobs.IJobChangeEvent)
 			 */
 			public void aboutToRun(IJobChangeEvent event) {
-				if (useHalfBusyCursor) {
-					synchronized (waitCursorLock) {
-						waitCursorJobCount++;
-					}
-				}
-				incrementBusy(event.getJob());
+				incrementBusy(event.getJob(), useHalfBusyCursor);
 			}
 
 			/*
@@ -252,12 +253,6 @@ public class WorkbenchSiteProgressService implements
 			 * .core.runtime.jobs.IJobChangeEvent)
 			 */
 			public void done(IJobChangeEvent event) {
-				if (useHalfBusyCursor) {
-					synchronized (waitCursorLock) {
-						waitCursorJobCount--;
-					}
-				}
-
 				Job job = event.getJob();
 				decrementBusy(job);
 				job.removeJobChangeListener(this);
@@ -271,11 +266,17 @@ public class WorkbenchSiteProgressService implements
      * @see org.eclipse.ui.internal.progress.IJobBusyListener#decrementBusy(org.eclipse.core.runtime.jobs.Job)
      */
     public void decrementBusy(Job job) {
+		Object halfBusyCursorState;
         synchronized (busyLock) {
-            if (!busyJobs.contains(job)) {
+			halfBusyCursorState = busyJobs.remove(job);
+			if (halfBusyCursorState == null) {
 				return;
 			}
-            busyJobs.remove(job);
+		}
+		if (halfBusyCursorState == Boolean.TRUE) {
+			synchronized (waitCursorLock) {
+				waitCursorJobCount--;
+			}
         }
         try {
         	decrementBusy();
@@ -291,12 +292,37 @@ public class WorkbenchSiteProgressService implements
      * @see org.eclipse.ui.internal.progress.IJobBusyListener#incrementBusy(org.eclipse.core.runtime.jobs.Job)
      */
     public void incrementBusy(Job job) {
+		incrementBusy(job, false);
+	}
+
+	private void incrementBusy(Job job, boolean useHalfBusyCursor) {
+		Object halfBusyCursorState;
         synchronized (busyLock) {
-            if (busyJobs.contains(job)) {
-				return;
-			}
-            busyJobs.add(job);
+			halfBusyCursorState = busyJobs.get(job);
+			if (useHalfBusyCursor || halfBusyCursorState != Boolean.TRUE)
+				busyJobs.put(job, Boolean.valueOf(useHalfBusyCursor));
         }
+		if (useHalfBusyCursor && halfBusyCursorState != Boolean.TRUE) {
+			// want to set busy cursor and it has not been set before
+			synchronized (waitCursorLock) {
+				waitCursorJobCount++;
+			}
+		}
+		if (halfBusyCursorState != null) {
+			// incrementBusy(Job, boolean) has been called before
+			if (useHalfBusyCursor && halfBusyCursorState == Boolean.FALSE) {
+				// need to update cursor without changing busy count:
+				synchronized (busyLock) {
+					updateJob.setBusy(true);
+				}
+				if (PlatformUI.isWorkbenchRunning()) {
+					updateJob.schedule(100);
+				} else {
+					updateJob.cancel();
+				}
+			}
+			return;
+		}
         incrementBusy();
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ActionElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ActionElement.java
index ab938e5..c97b0d1 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ActionElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ActionElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -22,8 +22,6 @@ import org.eclipse.jface.resource.ImageDescriptor;
  */
 public class ActionElement extends QuickAccessElement {
 
-	private static final String separator = " - "; //$NON-NLS-1$
-
 	private ActionContributionItem item;
 
 	/* package */ActionElement(ActionContributionItem item, ActionProvider actionProvider) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/CommandElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/CommandElement.java
index 76e04a9..41f6725 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/CommandElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/CommandElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     ARTAL Technologies <simon.chemouil at artal.fr> - Bug 293044 added keybindings display 
  *******************************************************************************/
 
 package org.eclipse.ui.internal.quickaccess;
@@ -14,11 +15,16 @@ package org.eclipse.ui.internal.quickaccess;
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.ParameterizedCommand;
 import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.jface.bindings.TriggerSequence;
 import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.internal.keys.BindingService;
+import org.eclipse.ui.internal.menus.CommandMessages;
 import org.eclipse.ui.internal.misc.StatusUtil;
+import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -27,8 +33,6 @@ import org.eclipse.ui.statushandlers.StatusManager;
  */
 public class CommandElement extends QuickAccessElement {
 
-	private static final String separator = " - "; //$NON-NLS-1$
-
 	private ParameterizedCommand command;
 
 	private String id;
@@ -79,18 +83,55 @@ public class CommandElement extends QuickAccessElement {
 		return null;
 	}
 
-	public String getLabel() {
+	/**
+	 * Returns a formatted string describes this command.
+	 * 
+	 * @return a description of the command of this element
+	 * @since 3.6
+	 */
+	public String getCommand() {
+		final StringBuffer label = new StringBuffer();
+
 		try {
 			Command nestedCommand = command.getCommand();
+			label.append(command.getName());
 			if (nestedCommand != null && nestedCommand.getDescription() != null
 					&& nestedCommand.getDescription().length() != 0) {
-				return command.getName() + separator
-						+ nestedCommand.getDescription();
+				label.append(separator).append(nestedCommand.getDescription());
 			}
-			return command.getName();
 		} catch (NotDefinedException e) {
-			return command.toString();
+			label.append(command.toString());
+		}
+
+		return label.toString();
+	}
+
+	public String getLabel() {
+		String command = getCommand();
+		String binding = getBinding();
+		if (binding != null) {
+			return NLS.bind(CommandMessages.Tooltip_Accelerator, command, binding);
+		}
+		return command;
+	}
+
+	/**
+	 * Returns a formatted string that can be used to invoke this element's
+	 * command. <code>null</code> may be returned if a binding cannot be found.
+	 * 
+	 * @return the string keybinding for invoking this element's command, may be
+	 *         <code>null</code>
+	 * @since 3.6
+	 */
+	public String getBinding() {
+		BindingService service = (BindingService) PlatformUI.getWorkbench().getService(
+				IBindingService.class);
+		TriggerSequence[] triggerSeq = service.getBindingManager()
+				.getActiveBindingsDisregardingContextFor(command);
+		if (triggerSeq != null && triggerSeq.length > 0) {
+			return triggerSeq[0].format();
 		}
+		return null;
 	}
 
 	public int hashCode() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/EditorElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/EditorElement.java
index 8cc2f64..a108cde 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/EditorElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/EditorElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -25,8 +25,6 @@ public class EditorElement extends QuickAccessElement {
 
 	private static final String DIRTY_MARK = "*"; //$NON-NLS-1$
 
-	private static final String separator = " - "; //$NON-NLS-1$
-
 	private IEditorReference editorReference;
 
 	/* package */EditorElement(IEditorReference editorReference, EditorProvider editorProvider) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceElement.java
index 9483212..0cc8943 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/PreferenceElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -24,8 +24,6 @@ import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
  */
 public class PreferenceElement extends QuickAccessElement {
 
-	private static final String separator = " - "; //$NON-NLS-1$
-
 	private IPreferenceNode preferenceNode;
 
 	private String prefix;
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java
index 347b171..372a614 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessDialog.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -173,23 +173,29 @@ public class QuickAccessDialog extends PopupDialog {
 		filterText.addKeyListener(getKeyAdapter());
 		filterText.addKeyListener(new KeyListener() {
 			public void keyPressed(KeyEvent e) {
-				if (e.keyCode == 0x0D) {
+				switch (e.keyCode) {
+				case SWT.CR:
+				case SWT.KEYPAD_CR:
 					handleSelection();
-					return;
-				} else if (e.keyCode == SWT.ARROW_DOWN) {
+					break;
+				case SWT.ARROW_DOWN:
 					int index = table.getSelectionIndex();
 					if (index != -1 && table.getItemCount() > index + 1) {
 						table.setSelection(index + 1);
 					}
 					table.setFocus();
-				} else if (e.keyCode == SWT.ARROW_UP) {
-					int index = table.getSelectionIndex();
+					break;
+				case SWT.ARROW_UP:
+					index = table.getSelectionIndex();
 					if (index != -1 && index >= 1) {
 						table.setSelection(index - 1);
 						table.setFocus();
 					}
-				} else if (e.character == 0x1B) // ESC
+					break;
+				case SWT.ESC:
 					close();
+					break;
+				}
 			}
 
 			public void keyReleased(KeyEvent e) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessElement.java
index e1929d1..8a028d3 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,6 +20,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
  */
 public abstract class QuickAccessElement {
 
+	static final String separator = " - "; //$NON-NLS-1$
+
 	private static final int[][] EMPTY_INDICES = new int[0][0];
 	private QuickAccessProvider provider;
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessEntry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessEntry.java
index e848609..50562ad 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessEntry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/QuickAccessEntry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 package org.eclipse.ui.internal.quickaccess;
 
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyleRange;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.graphics.Rectangle;
@@ -24,6 +25,8 @@ import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.jface.resource.DeviceResourceException;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
 
 import org.eclipse.ui.internal.IWorkbenchGraphicConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
@@ -135,9 +138,24 @@ class QuickAccessEntry {
 			}
 			break;
 		case 1:
+			String label = element.getLabel();
+			if (element instanceof CommandElement) {
+				CommandElement commandElement = (CommandElement) element;
+				String binding = commandElement.getBinding();
+				if (binding != null) {
+					StyledString styledString = StyledCellLabelProvider.styleDecoratedString(label,
+							StyledString.QUALIFIER_STYLER, new StyledString(commandElement
+									.getCommand()));
+					StyleRange[] styleRanges = styledString.getStyleRanges();
+					for (int i = 0; i < styleRanges.length; i++) {
+						textLayout.setStyle(styleRanges[i], styleRanges[i].start,
+								styleRanges[i].start + styleRanges[i].length);
+					}
+				}
+			}
 			Image image = getImage(element, resourceManager);
 			event.gc.drawImage(image, event.x + 1, event.y + 1);
-			textLayout.setText(element.getLabel());
+			textLayout.setText(label);
 			if (boldStyle != null) {
 				for (int i = 0; i < elementMatchRegions.length; i++) {
 					int[] matchRegion = elementMatchRegions[i];
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java
index 59a689a..a0e322f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.IViewCategory;
 import org.eclipse.ui.views.IViewDescriptor;
 
 /**
@@ -25,9 +26,22 @@ public class ViewElement extends QuickAccessElement {
 
 	private final IViewDescriptor viewDescriptor;
 
+	private String category;
+
 	/* package */ViewElement(IViewDescriptor viewDescriptor, ViewProvider viewProvider) {
 		super(viewProvider);
 		this.viewDescriptor = viewDescriptor;
+
+		IViewCategory[] categories = PlatformUI.getWorkbench().getViewRegistry().getCategories();
+		for (int i = 0; i < categories.length; i++) {
+			IViewDescriptor[] views = categories[i].getViews();
+			for (int j = 0; j < views.length; j++) {
+				if (views[j] == viewDescriptor) {
+					category = categories[i].getLabel();
+					return;
+				}
+			}
+		}
 	}
 
 	public void execute() {
@@ -50,7 +64,10 @@ public class ViewElement extends QuickAccessElement {
 	}
 
 	public String getLabel() {
-		return viewDescriptor.getLabel();
+		if (category == null) {
+			return viewDescriptor.getLabel();
+		}
+		return viewDescriptor.getLabel() + separator + category;
 	}
 
 	public int hashCode() {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardElement.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardElement.java
index a64964d..ff82f14 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardElement.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/WizardElement.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,8 +23,6 @@ import org.eclipse.ui.wizards.IWizardDescriptor;
  */
 public class WizardElement extends QuickAccessElement {
 
-	private static final String separator = " - "; //$NON-NLS-1$
-
 	private IWizardDescriptor wizardDescriptor;
 
 	/* package */WizardElement(IWizardDescriptor wizardDescriptor, WizardProvider wizardProvider) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java
index f23eeac..ed0db10 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/EditorRegistry.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
-import com.ibm.icu.text.Collator;
 import java.io.BufferedReader;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -32,6 +31,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.Map.Entry;
+
 import org.eclipse.core.commands.common.EventManager;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
@@ -70,6 +70,8 @@ import org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor;
 import org.eclipse.ui.internal.misc.ProgramImageDescriptor;
 import org.eclipse.ui.internal.util.Util;
 
+import com.ibm.icu.text.Collator;
+
 /**
  * Provides access to the collection of defined editors for resource types.
  */
@@ -1264,26 +1266,25 @@ public class EditorRegistry extends EventManager implements IEditorRegistry,
      * @param desc
      *            the descriptor value to remove
      */
-	private void removeEditorFromMapping(HashMap map, IEditorDescriptor desc) {
-		Iterator iter = map.entrySet().iterator();
-		while (iter.hasNext()) {
-			Map.Entry entry = (Entry) iter.next();
-			FileEditorMapping mapping = (FileEditorMapping) entry.getValue();
-			IEditorDescriptor[] editors = mapping.getUnfilteredEditors();
-
-			boolean removedEditor = false;
-			for (int i = 0; i < editors.length; i++) {
+    private void removeEditorFromMapping(HashMap map, IEditorDescriptor desc) {
+        Iterator iter = map.values().iterator();
+        FileEditorMapping mapping;
+        IEditorDescriptor[] editors;
+        while (iter.hasNext()) {
+            mapping = (FileEditorMapping) iter.next();
+            editors = mapping.getUnfilteredEditors();
+            for (int i = 0; i < editors.length; i++) {
 				if (editors[i] == desc) {
-					mapping.removeEditor((EditorDescriptor) editors[i]);
-					removedEditor = true;
-					break;
-				}
-			}
-			if (removedEditor && mapping.getUnfilteredEditors().length == 0) {
-				iter.remove();
+                    mapping.removeEditor((EditorDescriptor) editors[i]);
+                    break;
+                }
 			}
-		}
-	}
+            if (editors.length <= 0) {
+                map.remove(mapping);
+                break;
+            }
+        }
+    }
 
 	
     /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/FileEditorMapping.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/FileEditorMapping.java
index 60f356d..4502db7 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/FileEditorMapping.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/FileEditorMapping.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,6 +93,8 @@ public class FileEditorMapping extends Object implements IFileEditorMapping,
         try {
             FileEditorMapping clone = (FileEditorMapping) super.clone();
             clone.editors = (List) ((ArrayList) editors).clone();
+			clone.deletedEditors = (List) ((ArrayList) deletedEditors).clone();
+			clone.declaredDefaultEditors = (List) ((ArrayList) declaredDefaultEditors).clone();
             return clone;
         } catch (CloneNotSupportedException e) {
             return null;
@@ -120,6 +122,9 @@ public class FileEditorMapping extends Object implements IFileEditorMapping,
         if (!compareList(this.editors, mapping.editors)) {
 			return false;
 		}
+		if (!compareList(this.declaredDefaultEditors, mapping.declaredDefaultEditors)) {
+			return false;
+		}
         return compareList(this.deletedEditors, mapping.deletedEditors);
     }
 
@@ -143,6 +148,18 @@ public class FileEditorMapping extends Object implements IFileEditorMapping,
         }
         return true;
     }
+	
+    public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((declaredDefaultEditors == null) ? 0 : declaredDefaultEditors.hashCode());
+		result = prime * result + ((deletedEditors == null) ? 0 : deletedEditors.hashCode());
+		result = prime * result + ((editors == null) ? 0 : editors.hashCode());
+		result = prime * result + ((extension == null) ? 0 : extension.hashCode());
+		result = prime * result + ((name == null) ? 0 : name.hashCode());
+		return result;
+	}
 
     /* (non-Javadoc)
      * Method declared on IFileEditorMapping.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IWorkbenchRegistryConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IWorkbenchRegistryConstants.java
index d8e6155..90123e0 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IWorkbenchRegistryConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/IWorkbenchRegistryConstants.java	
@@ -10,6 +10,7 @@
  *     Dan Rubel <dan_rubel at instantiations.com>
  *     - Fix for bug 11490 - define hidden view (placeholder for view) in plugin.xml    
  *     Markus Alexander Kuppe, Versant Corporation - bug #215797
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 208564
  *******************************************************************************/
 package org.eclipse.ui.internal.registry;
 
@@ -328,6 +329,11 @@ public interface IWorkbenchRegistryConstants {
 	public static String ATT_NAME = "name"; //$NON-NLS-1$
 
 	/**
+	 * Match type attribute. Value <code>match</code>.
+	 */
+	public static String ATT_MATCH_TYPE = "match"; //$NON-NLS-1$
+
+	/**
 	 * Name filter attribute. Value <code>nameFilter</code>.
 	 */
 	public static String ATT_NAME_FILTER = "nameFilter"; //$NON-NLS-1$
@@ -1340,4 +1346,6 @@ public interface IWorkbenchRegistryConstants {
 	public static final String ATT_REPLACE = "replace"; //$NON-NLS-1$
 
 	public static final String ATT_FIND = "find"; //$NON-NLS-1$
+
+	public static final String TAG_KEYWORD_REFERENCE = "keywordReference"; //$NON-NLS-1$
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java
index 1c5d67a..0639f1a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveDescriptor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import org.eclipse.ui.IPerspectiveDescriptor;
 import org.eclipse.ui.IPerspectiveFactory;
 import org.eclipse.ui.IPluginContribution;
 import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.internal.IWorkbenchConstants;
 import org.eclipse.ui.internal.WorkbenchImages;
 import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -337,7 +336,7 @@ public class PerspectiveDescriptor implements IPerspectiveDescriptor,
 				image = descriptor.getImageDescriptor();
 			}
 		}
-		return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
@@ -370,7 +369,7 @@ public class PerspectiveDescriptor implements IPerspectiveDescriptor,
 		if (singleton) {
 			childMem.putInteger(IWorkbenchConstants.TAG_SINGLETON, 1);
 		}
-		return new Status(IStatus.OK, PlatformUI.PLUGIN_ID, 0, "", null); //$NON-NLS-1$
+		return Status.OK_STATUS;
 	}
 
 	/**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java
index 605f84b..39cc3cf 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveRegistry.java	
@@ -56,8 +56,9 @@ import org.eclipse.ui.internal.WorkbenchMessages;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.handlers.ClosePerspectiveHandler;
-import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.internal.util.PrefUtil;
+import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
+import org.eclipse.ui.statushandlers.StatusAdapter;
 import org.eclipse.ui.statushandlers.StatusManager;
 
 /**
@@ -527,8 +528,9 @@ public class PerspectiveRegistry implements IPerspectiveRegistry,
 			StatusManager.getManager().handle(errStatus,
 					StatusManager.SHOW | StatusManager.LOG);
 		} else {
-			IStatus errStatus = StatusUtil.newStatus(status, msg);
-			StatusManager.getManager().handle(errStatus,
+			StatusAdapter adapter = new StatusAdapter(status);
+			adapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, msg);
+			StatusManager.getManager().handle(adapter,
 					StatusManager.SHOW | StatusManager.LOG);
 		}
 	}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java
index b728c71..7ca8223 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/PreferenceTransferRegistryReader.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Semion Chichelnitsky (semion at il.ibm.com) - bug 208564     
  *******************************************************************************/
 
 package org.eclipse.ui.internal.registry;
@@ -18,7 +19,6 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtensionRegistry;
 import org.eclipse.core.runtime.Platform;
@@ -28,7 +28,7 @@ import org.eclipse.ui.internal.preferences.PreferenceTransferElement;
 
 /**
  * Preference Transfer registry reader to read extenders of the
- * preferenceTranser schema.
+ * preferenceTransfer schema.
  * 
  * @since 3.1
  */
@@ -47,24 +47,24 @@ public class PreferenceTransferRegistryReader extends RegistryReader {
 		pluginPoint = pluginPointId;
 	}
 
-
-
 	/**
 	 * Returns a new PreferenceTransferElement configured according to the
-	 * parameters contained in the passed Registry.
+	 * parameters contained in the passed element.
 	 * 
-	 * May answer null if there was not enough information in the Extension to
-	 * create an adequate wizard
+	 * @param element
+	 *            the configuration element
+	 * @return the preference transfer element or <code>null</code> if there was
+	 *         not enough information in the element
 	 */
 	protected PreferenceTransferElement createPreferenceTransferElement(
 			IConfigurationElement element) {
-		// PreferenceTransfers must have a name and class attribute
+		// PreferenceTransfers must have a class attribute
 		if (element.getAttribute(IWorkbenchRegistryConstants.ATT_NAME) == null) {
 			logMissingAttribute(element, IWorkbenchRegistryConstants.ATT_NAME);
 			return null;
 		}
 
-		// must specifiy a mapping
+		// must specify a mapping
 		if (element.getChildren(IWorkbenchRegistryConstants.TAG_MAPPING) == null) {
 			logMissingElement(element, IWorkbenchRegistryConstants.TAG_MAPPING);
 			return null;
@@ -136,7 +136,7 @@ public class PreferenceTransferRegistryReader extends RegistryReader {
 		if (children.length < 1) {
 			logMissingElement(configElement,
 					IWorkbenchRegistryConstants.TAG_MAPPING);
-			return null;
+			return new IConfigurationElement[0];
 		}
 		return children;
 	}
@@ -151,7 +151,9 @@ public class PreferenceTransferRegistryReader extends RegistryReader {
 
 	/**
 	 * @param element
-	 * @return the maps mapping nodes to keys for this element
+	 *            the configuration element
+	 * @return a map that maps nodes to keys for this element or
+	 *         <code>null</code> for all nodes
 	 */
 	public static Map getEntry(IConfigurationElement element) {
 		IConfigurationElement[] entries = element
@@ -170,7 +172,9 @@ public class PreferenceTransferRegistryReader extends RegistryReader {
 				for (int j = 0; j < keys.length; j++) {
 					IConfigurationElement keyElement = keys[j];
 					prefFilters[j] = new PreferenceFilterEntry(keyElement
-							.getAttribute(IWorkbenchRegistryConstants.ATT_NAME));
+									.getAttribute(IWorkbenchRegistryConstants.ATT_NAME),
+							keyElement
+									.getAttribute(IWorkbenchRegistryConstants.ATT_MATCH_TYPE));
 				}
 			}
 			map.put(entry.getAttribute(IWorkbenchRegistryConstants.ATT_NODE),
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java
index 5154f71..6bf7569 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/UIExtensionTracker.java	
@@ -39,7 +39,10 @@ public class UIExtensionTracker extends ExtensionTracker {
 	}
 
 	protected void applyRemove(final IExtensionChangeHandler handler, final IExtension removedExtension, final Object[] objects) {
-        display.syncExec(new Runnable() {
+		if (display.isDisposed())
+			return;
+
+		display.syncExec(new Runnable() {
 
             public void run() {
                 try {
@@ -52,6 +55,9 @@ public class UIExtensionTracker extends ExtensionTracker {
     }
 
     protected void applyAdd(final IExtensionChangeHandler handler, final IExtension addedExtension) {
+		if (display.isDisposed())
+			return;
+
         display.syncExec(new Runnable() {
             public void run() {
                 try {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourcePriorityNameMapping.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourcePriorityNameMapping.java
index 4fe87fb..6055a5b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourcePriorityNameMapping.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/SourcePriorityNameMapping.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java
index 0aa0143..25cd1c1 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchServiceRegistry.java	
@@ -19,7 +19,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.WeakHashMap;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExtension;
@@ -185,8 +184,6 @@ public class WorkbenchServiceRegistry implements IExtensionChangeHandler {
 						continue;
 					}
 					providers.add(sourceProvider);
-					processVariables(elements[i]
-							.getChildren(IWorkbenchRegistryConstants.TAG_VARIABLE));
 				} catch (CoreException e) {
 					StatusManager.getManager().handle(e.getStatus());
 				}
@@ -196,6 +193,16 @@ public class WorkbenchServiceRegistry implements IExtensionChangeHandler {
 				.toArray(new AbstractSourceProvider[providers.size()]);
 	}
 
+	public void initializeSourcePriorities() {
+		IExtensionPoint ep = getExtensionPoint();
+		IConfigurationElement[] elements = ep.getConfigurationElements();
+		for (int i = 0; i < elements.length; i++) {
+			if (elements[i].getName().equals(IWorkbenchRegistryConstants.TAG_SOURCE_PROVIDER)) {
+				processVariables(elements[i].getChildren(IWorkbenchRegistryConstants.TAG_VARIABLE));
+			}
+		}
+	}
+
 	private static final String[] supportedLevels = { ISources.ACTIVE_CONTEXT_NAME,
 			ISources.ACTIVE_SHELL_NAME, 
 			ISources.ACTIVE_WORKBENCH_WINDOW_NAME, 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java
index ee6203f..88c3ff9 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/WorkbenchSourceProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.internal.services;
 
 import java.util.HashMap;
 import java.util.Map;
-
 import org.eclipse.core.expressions.IEvaluationContext;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
@@ -229,7 +228,6 @@ public class WorkbenchSourceProvider extends AbstractSourceProvider implements
 	private IWorkbenchPartSite lastActivePartSite = null;
 
 	private Object lastShowInInput = null;
-	private ISelection lastShowInSelection = null;
 
 	private final IPartListener partListener = new IPartListener() {
 
@@ -344,17 +342,8 @@ public class WorkbenchSourceProvider extends AbstractSourceProvider implements
 			sources |= ISources.ACTIVE_SITE;
 			lastShowInInput = newShowInInput;
 		}
-		if (updateShowInSelection) {
-			final Object newShowInSelection = currentState
-					.get(ISources.SHOW_IN_SELECTION);
-			if (!Util.equals(newShowInSelection, lastShowInSelection)) {
-				sources |= ISources.ACTIVE_SITE;
-				if (newShowInSelection != IEvaluationContext.UNDEFINED_VARIABLE) {
-					lastShowInSelection = (ISelection) newShowInSelection;
-				} else {
-					lastShowInSelection = null;
-				}
-			}
+		if (currentState.get(ISources.SHOW_IN_SELECTION) != IEvaluationContext.UNDEFINED_VARIABLE) {
+			sources |= ISources.ACTIVE_SITE;
 		}
 		Object newActiveEditor = currentState.get(ISources.ACTIVE_EDITOR_NAME);
 		if (!Util.equals(newActiveEditor, lastActiveEditor)) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java
index 0d42c11..872025d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DefaultDetailsArea.java	
@@ -11,9 +11,11 @@
 
 package org.eclipse.ui.internal.statushandlers;
 
+import com.ibm.icu.text.DateFormat;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Date;
-
+import java.util.Map;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.bindings.TriggerSequence;
@@ -23,6 +25,7 @@ import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StyledText;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.DND;
 import org.eclipse.swt.dnd.DragSource;
@@ -38,7 +41,6 @@ import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.List;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
 import org.eclipse.ui.PlatformUI;
@@ -48,44 +50,51 @@ import org.eclipse.ui.keys.IBindingService;
 import org.eclipse.ui.statushandlers.AbstractStatusAreaProvider;
 import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
 import org.eclipse.ui.statushandlers.StatusAdapter;
-import org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager;
-
-import com.ibm.icu.text.DateFormat;
 
 /**
  * The default details area displaying a tree of statuses.
- * 
- * @since 3.4
  */
 public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 
-	private WorkbenchStatusDialogManager workbenchStatusDialog;
+	private static final int MINIMUM_HEIGHT = 100;
 
-	public DefaultDetailsArea(WorkbenchStatusDialogManager wsd){
-		this.workbenchStatusDialog = wsd;
-	}
-	
 	/*
 	 * All statuses should be displayed.
 	 */
-	protected static final int MASK = IStatus.CANCEL | IStatus.ERROR
-			| IStatus.INFO | IStatus.WARNING;
+	private int mask;
 
 	/*
-	 * New child entry in the list will be shifted by two spaces.
+	 * New child entry in the list will be shifted by a number of pixels
 	 */
-	private static final Object NESTING_INDENT = "  "; //$NON-NLS-1$
+	private static final int NESTING_INDENT = 15;
 
 	/*
 	 * Displays statuses.
 	 */
-	private List list;
+	private StyledText text;
+
+	private boolean handleOkStatuses;
+
+	private Map dialogState;
+
+	/**
+	 * @param dialogState
+	 */
+	public DefaultDetailsArea(Map dialogState) {
+		this.dialogState = dialogState;
+		handleOkStatuses = ((Boolean) dialogState
+				.get(IStatusDialogConstants.HANDLE_OK_STATUSES)).booleanValue();
+		mask = ((Integer) dialogState.get(IStatusDialogConstants.MASK))
+				.intValue();
+	}
 
 	/*
 	 * (non-Javadoc)
 	 * 
-	 * @see org.eclipse.ui.statushandlers.AbstractStatusAreaProvider#createSupportArea(org.eclipse.swt.widgets.Composite,
-	 *      org.eclipse.ui.statushandlers.StatusAdapter)
+	 * @see
+	 * org.eclipse.ui.statushandlers.AbstractStatusAreaProvider#createSupportArea
+	 * (org.eclipse.swt.widgets.Composite,
+	 * org.eclipse.ui.statushandlers.StatusAdapter)
 	 */
 	public Control createSupportArea(Composite parent,
 			StatusAdapter statusAdapter) {
@@ -98,23 +107,24 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 		parent = new Composite(parent, SWT.NONE);
 		parent.setLayout(new GridLayout());
 		parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-		list = new List(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI
-				| SWT.BORDER);
+		text = new StyledText(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI
+				| SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
+		text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
 		GridData gd = new GridData(GridData.FILL_BOTH);
 		gd.grabExcessHorizontalSpace = true;
 		gd.grabExcessVerticalSpace = true;
 		gd.widthHint = 250;
-		gd.heightHint = 100;
-		list.setLayoutData(gd);
+		gd.minimumHeight = MINIMUM_HEIGHT;
+		text.setLayoutData(gd);
 		// There is no support for triggering commands in the dialogs. I am
 		// trying to emulate the workbench behavior as exactly as possible.
 		IBindingService binding = (IBindingService) PlatformUI.getWorkbench()
 				.getService(IBindingService.class);
-		//find bindings for copy action
+		// find bindings for copy action
 		final TriggerSequence ts[] = binding
 				.getActiveBindingsFor(ActionFactory.COPY.getCommandId());
-		list.addKeyListener(new KeyListener() {
-			
+		text.addKeyListener(new KeyListener() {
+
 			ArrayList keyList = new ArrayList();
 
 			public void keyPressed(KeyEvent e) {
@@ -126,7 +136,7 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 					character += 0x40;
 				}
 				// do not process modifier keys
-				if((e.keyCode & (~SWT.MODIFIER_MASK)) == 0){
+				if ((e.keyCode & (~SWT.MODIFIER_MASK)) == 0) {
 					return;
 				}
 				// if there is a character, use it. if no character available,
@@ -157,7 +167,7 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 			}
 
 			public void keyReleased(KeyEvent e) {
-				//no op
+				// no op
 			}
 		});
 		createDNDSource();
@@ -166,10 +176,9 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 		return parent;
 	}
 
-	protected void setStatusAdapter(StatusAdapter adapter) {
-		list.removeAll();
-		populateList(list, adapter.getStatus(), 0);
-		if (workbenchStatusDialog.getStatusAdapters().size() == 1) {
+	private void setStatusAdapter(StatusAdapter adapter) {
+		populateList(text, adapter.getStatus(), 0, new int[] { 0 });
+		if (!isMulti()) {
 			Long timestamp = (Long) adapter
 					.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY);
 
@@ -177,17 +186,46 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 				String date = DateFormat.getDateTimeInstance(DateFormat.LONG,
 						DateFormat.LONG)
 						.format(new Date(timestamp.longValue()));
-				list.add(NLS.bind(ProgressMessages.JobInfo_Error,
+				text.append(NLS.bind(ProgressMessages.JobInfo_Error,
 						(new Object[] { "", date }))); //$NON-NLS-1$
 			}
 		}
+		int delimiterLength = getLineSeparator().length();
+		text.replaceTextRange(text.getText().length() - delimiterLength,
+				delimiterLength, ""); //$NON-NLS-1$
+		adjustHeight(text);
+	}
+
+	private void adjustHeight(StyledText text) {
+		int lineCount = text.getLineCount();
+		int lineHeight = text.getLineHeight();
+		int startPos = text.getLocation().y;
+		Composite c = text.getParent();
+		while (c != null) {
+			startPos += c.getLocation().y;
+			c = c.getParent();
+		}
+		// the text is not positioned yet, we assume that it will appear
+		// on the bottom of the dialog
+		startPos += text.getShell().getBounds().height;
+		int screenHeight = text.getShell().getMonitor().getBounds().height;
+		int availableScreenForText = screenHeight - startPos;
+		if (availableScreenForText <= MINIMUM_HEIGHT) {
+			// should not happen. But in that case nothing can improve user
+			// experience.
+			return;
+		}
+		int desiredHeight = lineCount * lineHeight;
+		if (desiredHeight > availableScreenForText * 0.75) {
+			((GridData) text.getLayoutData()).heightHint = (int) (availableScreenForText * 0.75);
+		}
 	}
 
 	/**
 	 * Creates DND source for the list
 	 */
 	private void createDNDSource() {
-		DragSource ds = new DragSource(list, DND.DROP_COPY);
+		DragSource ds = new DragSource(text, DND.DROP_COPY);
 		ds.setTransfer(new Transfer[] { TextTransfer.getInstance() });
 		ds.addDragListener(new DragSourceListener() {
 			public void dragFinished(DragSourceEvent event) {
@@ -198,9 +236,8 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 					event.data = prepareCopyString();
 				}
 			}
-			
+
 			public void dragStart(DragSourceEvent event) {
-				list.selectAll();
 			}
 		});
 	}
@@ -214,7 +251,9 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 			/*
 			 * (non-Javadoc)
 			 * 
-			 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+			 * @see
+			 * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
+			 * .swt.events.SelectionEvent)
 			 */
 			public void widgetSelected(SelectionEvent e) {
 				copyToClipboard();
@@ -222,71 +261,62 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 			}
 
 		});
-		list.setMenu(menu);
+		text.setMenu(menu);
 	}
 
 	private String prepareCopyString() {
-		if (list == null || list.isDisposed()) {
+		if (text == null || text.isDisposed()) {
 			return ""; //$NON-NLS-1$
 		}
-		StringBuffer sb = new StringBuffer();
-		String newLine = System.getProperty("line.separator"); //$NON-NLS-1$
-		String selection[] = list.getSelection();
-		for (int i = 0; i < selection.length; i++) {
-			sb.append(selection[i]);
-			sb.append(newLine);
-		}
-		return sb.toString();
+		return text.getSelectionText();
 	}
 
-	private void populateList(List list, IStatus status, int nesting) {
-		if (!status.matches(MASK)
-				&& !(isDialogHandlingOKStatuses() && status.isOK())) {
+	private void populateList(StyledText text, IStatus status, int nesting,
+			int[] lineNumber) {
+		if (!status.matches(mask) && !(handleOkStatuses && status.isOK())) {
 			return;
 		}
-		StringBuffer buffer = new StringBuffer();
-		for (int i = 0; i < nesting; i++) {
-			buffer.append(NESTING_INDENT);
-		}
-		buffer.append(status.getMessage());
-		list.add(buffer.toString());
+		appendNewLine(text, status.getMessage(), nesting, lineNumber[0]++);
 
 		// Look for a nested core exception
 		Throwable t = status.getException();
 		if (t instanceof CoreException) {
 			CoreException ce = (CoreException) t;
-			populateList(list, ce.getStatus(), nesting + 1);
+			populateList(text, ce.getStatus(), nesting + 1, lineNumber);
 		} else if (t != null) {
 			// Include low-level exception message
-			buffer = new StringBuffer();
-			for (int i = 0; i < nesting; i++) {
-				buffer.append(NESTING_INDENT);
-			}
 			String message = t.getLocalizedMessage();
 			if (message == null) {
 				message = t.toString();
 			}
-			buffer.append(message);
-			list.add(buffer.toString());
+			appendNewLine(text, message, nesting, lineNumber[0]++);
 		}
 
 		IStatus[] children = status.getChildren();
 		for (int i = 0; i < children.length; i++) {
-			populateList(list, children[i], nesting + 1);
+			populateList(text, children[i], nesting + 1, lineNumber);
 		}
 	}
 
-	/**
-	 * @return Returns the list.
-	 */
-	public List getList() {
-		return list;
+	private String getLineSeparator() {
+		return System.getProperty("line.separator"); //$NON-NLS-1$
 	}
-	
+
+	private void appendNewLine(StyledText text, String line, int indentLevel,
+			int lineNumber) {
+		text.append(line + getLineSeparator());
+		int pixelIndent = indentLevel * NESTING_INDENT;
+		if (lineNumber != 0) {
+			pixelIndent += NESTING_INDENT / 2;
+		}
+		text.setLineIndent(lineNumber, 1, pixelIndent);
+		text.setLineWrapIndent(lineNumber, 1, indentLevel * NESTING_INDENT);
+	}
+
 	private void copyToClipboard() {
 		Clipboard clipboard = null;
 		try {
-			clipboard = new Clipboard(list.getDisplay());
+			clipboard = new Clipboard(text.getDisplay());
 			clipboard.setContents(new Object[] { prepareCopyString() },
 					new Transfer[] { TextTransfer.getInstance() });
 		} finally {
@@ -296,9 +326,13 @@ public class DefaultDetailsArea extends AbstractStatusAreaProvider {
 		}
 	}
 
-	private boolean isDialogHandlingOKStatuses() {
-		return ((Boolean) workbenchStatusDialog
-				.getProperty(IStatusDialogConstants.HANDLE_OK_STATUSES))
-				.booleanValue();
+	/**
+	 * This method checks if status dialog holds more than one status.
+	 * 
+	 * @return true if the dialog has one more than one status.
+	 */
+	private boolean isMulti() {
+		return ((Collection) dialogState
+				.get(IStatusDialogConstants.STATUS_ADAPTERS)).size() != 1;
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DetailsAreaManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DetailsAreaManager.java
new file mode 100644
index 0000000..db9d895
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/DetailsAreaManager.java	
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.statushandlers;
+
+import java.util.Map;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.statushandlers.AbstractStatusAreaProvider;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+
+
+/**
+ * This class is responsible for managing details area.
+ */
+public class DetailsAreaManager {
+
+	private Map dialogState;
+	private Control control = null;
+
+	/**
+	 * @param dialogState
+	 */
+	public DetailsAreaManager(Map dialogState) {
+		this.dialogState = dialogState;
+	}
+
+	/**
+	 * Closes the details area
+	 */
+	public void close() {
+		if (control != null && !control.isDisposed()) {
+			control.dispose();
+		}
+	}
+
+	/**
+	 * This method is responsible for creating details area on the specified
+	 * Composite and displaying specified StatusAdapter
+	 * 
+	 * @param parent
+	 *            A composite on which should be the details area created.
+	 * @param statusAdapter
+	 *            StatusAdapter for which should be the details area
+	 *            created.
+	 */
+	public void createDetailsArea(Composite parent,
+			StatusAdapter statusAdapter) {
+		Composite container = new Composite(parent, SWT.NONE);
+		container.setLayout(GridLayoutFactory.fillDefaults().create());
+		container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+		getProvider().createSupportArea(container, statusAdapter);
+		control = container;
+	}
+
+	/**
+	 * Returns current detail area provider.
+	 * 
+	 * @return current detail area provider.
+	 */
+	public AbstractStatusAreaProvider getProvider() {
+		AbstractStatusAreaProvider provider = (AbstractStatusAreaProvider) dialogState
+				.get(IStatusDialogConstants.CUSTOM_DETAILS_PROVIDER);
+		if (provider == null) {
+			provider = new DefaultDetailsArea(dialogState);
+		}
+		return provider;
+	}
+
+	/**
+	 * This method allows to check if the details area is open (physically
+	 * constructed).
+	 * 
+	 * @return true if the area is open, false otherwise
+	 */
+	public boolean isOpen() {
+		if (control == null || control.isDisposed()) {
+			return false;
+		}
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/IStatusDialogConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/IStatusDialogConstants.java
index cc4d7b9..ba4a1fd 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/IStatusDialogConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/IStatusDialogConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,15 +11,21 @@
 
 package org.eclipse.ui.internal.statushandlers;
 
+import java.util.Collection;
+import java.util.Map;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ILabelDecorator;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.statushandlers.AbstractStatusAreaProvider;
+import org.eclipse.ui.statushandlers.StatusAdapter;
 import org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager;
 
 /**
  * This class contains constant necessary to read/write the
  * {@link WorkbenchStatusDialogManager} properties. Some properties may be
- * promoted to the API.
+ * promoted to the API. Some of those properties are used to configure the
+ * dialog, while others are used to describe the state of the dialgo.
  * 
  */
 public interface IStatusDialogConstants {
@@ -55,4 +61,119 @@ public interface IStatusDialogConstants {
 	 * {@link Boolean#FALSE} means that they will be silently ignored.
 	 */
 	public static final Object HANDLE_OK_STATUSES = new Object();
+
+	/**
+	 * This property indicates how the dialog should be named. The default value
+	 * comes from jface resources. It may be {@link String} or <code>null</code>
+	 * .
+	 */
+	public static final Object TITLE = new Object();
+
+	/**
+	 * This property indicates which status severities should be handled. The
+	 * value must be of {@link Integer} type.
+	 */
+	public static final Object MASK = new Object();
+
+	/**
+	 * This flag indicates if the details area was opened before switching the
+	 * modality or not. It must be of {@link Boolean} type.
+	 */
+	public static final Object DETAILS_OPENED = new Object();
+
+	/**
+	 * This flag indicates if the support area was opened before switching the
+	 * modality or not. It must be of {@link Boolean} type.
+	 */
+	public static final Object TRAY_OPENED = new Object();
+
+	/**
+	 * This flag controls if the support area is opened automatically when the
+	 * dialog is opened. It must be of {@link Boolean} type or <code>null</code>
+	 * .
+	 */
+	public static final Object ENABLE_DEFAULT_SUPPORT_AREA = new Object();
+
+	/**
+	 * This flag controls if there should be a control allowing for support
+	 * opening. It must be of {@link Boolean} type or <code>null</code>.
+	 */
+	public static final Object HIDE_SUPPORT_BUTTON = new Object();
+
+	/**
+	 * This property holds custom support provider which will be used do display
+	 * support area for currently selected {@link StatusAdapter}. It must be of
+	 * {@link AbstractStatusAreaProvider} or <code>null</code>.
+	 */
+	public static final Object CUSTOM_SUPPORT_PROVIDER = new Object();
+
+	/**
+	 * This property holds custom details provider which will be used do display
+	 * details for currently selected {@link StatusAdapter}. It must be of
+	 * {@link AbstractStatusAreaProvider} or <code>null</code>.
+	 */
+	public static final Object CUSTOM_DETAILS_PROVIDER = new Object();
+
+	/**
+	 * Currently selected status adapter. It must be of {@link StatusAdapter}
+	 * type.
+	 */
+	public static final Object CURRENT_STATUS_ADAPTER = new Object();
+
+	/**
+	 * This property allows for retrieving the list of {@link StatusAdapter}
+	 * currently kept by the dialog. The corresponding object must be of
+	 * {@link Collection} type.
+	 */
+	public static final Object STATUS_ADAPTERS = new Object();
+
+	/**
+	 * Stores "modal" flags describing {@link StatusAdapter}. It is a
+	 * {@link Map} of {@link StatusAdapter}s and {@link Boolean}s.
+	 */
+	public static final Object STATUS_MODALS = new Object();
+
+	/**
+	 * This fields holds the information about dialog position and size when
+	 * switching the modality.
+	 */
+	public static final Object SHELL_BOUNDS = new Object();
+
+	/**
+	 * This property stores internal {@link LabelProviderWrapper} which is
+	 * responsible for providing all the text and images. This property should
+	 * be never changed.
+	 */
+	public static final Object LABEL_PROVIDER = new Object();
+
+	/**
+	 * This property stores custom label provider. LABEL_PROVIDER uses
+	 * CUSTOM_LABEL_PROVIDER or default label provider to deliver images and
+	 * text to the dialog. Since the custom label provider is not able to
+	 * deliver all necessary images, this field should not be used. It is kept
+	 * only for backward compatibility.
+	 */
+	public static final Object CUSTOM_LABEL_PROVIDER = new Object();
+
+	/**
+	 * If it is necessary to modify each message, this property may be used. It
+	 * should be of {@link ILabelDecorator} type. This decorator will be invoked
+	 * for each text that will be later passed to the dialog.
+	 */
+	public static final Object DECORATOR = new Object();
+
+	/**
+	 * This flag indicates if the dialog is during modality switch state. It
+	 * must be of {@link Boolean} type.
+	 */
+	public static final Object MODALITY_SWITCH = new Object();
+
+	/**
+	 * This flag controls animations. It is for testing purposes only. If it set
+	 * to false, animations will not be created. Animation means shell
+	 * closing/opening animation.
+	 */
+	public static final Object ANIMATION = new Object();
+
+	public static final Object MANAGER_IMPL = WorkbenchStatusDialogManagerImpl.class;
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/InternalDialog.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/InternalDialog.java
new file mode 100644
index 0000000..7967e3c
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/InternalDialog.java	
@@ -0,0 +1,1088 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.statushandlers;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.DialogTray;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.Workbench;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.progress.ProgressManagerUtil;
+import org.eclipse.ui.internal.progress.ProgressMessages;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.views.IViewDescriptor;
+
+
+/**
+ * Parent window actually does not use its Shell to build dialog on. The
+ * window passes the shell to the InternalDialog, and it can do switching
+ * modality and recreate the window silently.
+ * 
+ * @since 3.4
+ */
+public class InternalDialog extends TrayDialog {
+
+	/**
+	 * The id of the goto action button
+	 */
+	static final int GOTO_ACTION_ID = IDialogConstants.CLIENT_ID + 1;
+
+	static final String LOG_VIEW_ID = "org.eclipse.pde.runtime.LogView"; //$NON-NLS-1$
+
+	/**
+	 * Preference used to indicate whether the user should be prompted to
+	 * confirm the execution of the job's goto action
+	 */
+	static final String PREF_SKIP_GOTO_ACTION_PROMPT = "pref_skip_goto_action_prompt"; //$NON-NLS-1$
+
+	/**
+	 * This composite holds all components of the dialog.
+	 */
+	private Composite dialogArea;
+	/**
+	 * This composite is initially scrolled to the 0 x 0 size. When more
+	 * than one status arrives, listArea is resized and a list is created on
+	 * it to present statuses to the user.
+	 */
+	private Composite listArea;
+	/**
+	 * On this composite are presented additional elements for displaying
+	 * single status. Currently it is the second label that displays the
+	 * second most important message to the user.
+	 */
+	private Composite singleStatusDisplayArea;
+	/**
+	 * This label is used to display the second most important message to
+	 * the user. It is placed on singleStatusDisplayArea.
+	 */
+	private Label singleStatusLabel;
+	/**
+	 * A list from which the user selects statuses. The list is placed on
+	 * listArea.
+	 */
+	private TableViewer statusListViewer;
+	/**
+	 * Composite on the left bottom corner. Allows for opening support tray
+	 * & Error Log.
+	 */
+	private Composite linkComposite;
+	/**
+	 * This item is used to launch support tray
+	 */
+	private Link launchTrayLink;
+	/**
+	 * This fields contains indicator if link to ErrorLog view should be
+	 * present.
+	 */
+	private Link showErrorLogLink;
+	/**
+	 * Main dialog image holder.
+	 */
+	private Label titleImageLabel;
+	/**
+	 * Message in the header.
+	 */
+	private Label mainMessageLabel;
+	/**
+	 * Header area.
+	 */
+	private Composite titleArea;
+
+	/**
+	 * In this support tray status support providers are displayed.
+	 */
+	private SupportTray supportTray;
+
+	private DetailsAreaManager detailsManager;
+
+	private Map dialogState;
+
+	/**
+	 * @param dialogState
+	 * @param modal
+	 */
+	public InternalDialog(final Map dialogState, boolean modal) {
+		super(ProgressManagerUtil.getDefaultParent());
+		this.dialogState = dialogState;
+		supportTray = new SupportTray(dialogState, new Listener() {
+			public void handleEvent(Event event) {
+				dialogState.put(IStatusDialogConstants.TRAY_OPENED,
+						Boolean.FALSE);
+				// close the tray
+				closeTray();
+				// set focus back to shell
+				getShell().setFocus();
+			}
+		});
+		detailsManager = new DetailsAreaManager(dialogState);
+		setShellStyle(SWT.RESIZE | SWT.MAX | SWT.MIN | getShellStyle());
+		setBlockOnOpen(false);
+
+		if (!modal) {
+			setShellStyle(~SWT.APPLICATION_MODAL & getShellStyle());
+		}
+	}
+
+	protected void buttonPressed(int id) {
+		if (id == GOTO_ACTION_ID) {
+			IAction gotoAction = getGotoAction();
+			if (gotoAction != null) {
+				if (isPromptToClose()) {
+					okPressed(); // close the dialog
+					gotoAction.run(); // run the goto action
+				}
+			}
+		}
+		if (id == IDialogConstants.DETAILS_ID) {
+			// was the details button pressed?
+			dialogState.put(IStatusDialogConstants.DETAILS_OPENED, new Boolean(
+					toggleDetailsArea()));
+		} else {
+			super.buttonPressed(id);
+		}
+	}
+
+	/*
+	 * (non-Javadoc) Method declared in Window.
+	 */
+	final protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		shell.setText(getString(IStatusDialogConstants.TITLE));
+	}
+	
+	/**
+	 * Status dialog button should be aligned SWT.END. 
+	 */
+	protected void setButtonLayoutData(Button button) {
+		GridData data = new GridData(SWT.END, SWT.CENTER, false, false);
+		int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+		Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+		data.widthHint = Math.max(widthHint, minSize.x);
+		button.setLayoutData(data);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createDialogArea(Composite parent) {
+		createTitleArea(parent);
+		createListArea(parent);
+		dialogArea = parent;
+		Dialog.applyDialogFont(dialogArea);
+		return parent;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+	 */
+	protected boolean isResizable() {
+		return true;
+	}
+
+	/**
+	 * Creates title area.
+	 * 
+	 * @param parent
+	 *            A composite on which the title area should be created.
+	 */
+	private void createTitleArea(Composite parent) {
+		titleArea = new Composite(parent, SWT.NONE);
+		titleArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+				false));
+
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.horizontalSpacing = 10;
+		layout.marginLeft = 10;
+		layout.marginTop = 10;
+		layout.marginBottom = 0;
+		titleArea.setLayout(layout);
+
+		titleImageLabel = new Label(titleArea, SWT.NONE);
+		titleImageLabel.setImage(getLabelProviderWrapper()
+				.getImage(getCurrentStatusAdapter()));
+		GridData layoutData = new GridData();
+		layoutData.verticalSpan = 2;
+		layoutData.verticalAlignment = SWT.TOP;
+		titleImageLabel.setLayoutData(layoutData);
+
+		GridData messageData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		messageData.widthHint = convertWidthInCharsToPixels(50);
+		mainMessageLabel = new Label(titleArea, SWT.WRAP);
+		mainMessageLabel.setLayoutData(messageData);
+		// main message set up early, to address bug 222391
+		mainMessageLabel.setText(getLabelProviderWrapper()
+				.getMainMessage(getCurrentStatusAdapter()));
+		if (!isMulti()) {
+			singleStatusDisplayArea = createSingleStatusDisplayArea(titleArea);
+		}
+	}
+
+	/**
+	 * Create an area which allows the user to view the status if only one
+	 * is created or to select one of reported statuses when there are many.
+	 * 
+	 * @param parent
+	 *            the parent composite on which all components should be
+	 *            placed.
+	 */
+	private void createListArea(Composite parent) {
+		listArea = new Composite(parent, SWT.NONE);
+		GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		layoutData.heightHint = 0;
+		layoutData.widthHint = 0;
+		listArea.setLayoutData(layoutData);
+		GridLayout layout = new GridLayout();
+		listArea.setLayout(layout);
+		if (isMulti()) {
+			fillListArea(listArea);
+		}
+	}
+
+	/**
+	 * This function checks if the dialog is modal.
+	 * 
+	 * @return true if the dialog is modal, false otherwise
+	 * 
+	 */
+	public boolean isModal() {
+		return ((getShellStyle() & SWT.APPLICATION_MODAL) == SWT.APPLICATION_MODAL);
+	}
+
+	/**
+	 * @return Returns the supportTray.
+	 */
+	public SupportTray getSupportTray() {
+		return supportTray;
+	}
+
+	/**
+	 * @param supportTray
+	 *            The supportTray to set.
+	 */
+	public void setSupportTray(SupportTray supportTray) {
+		this.supportTray = supportTray;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.window.Window#open()
+	 */
+	public int open() {
+		boolean modalitySwitch = getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH);
+		int result = super.open();
+		if (modalitySwitch) {
+			if (getBooleanValue(IStatusDialogConstants.DETAILS_OPENED)) {
+				showDetailsArea();
+			}
+			if (getBooleanValue(IStatusDialogConstants.TRAY_OPENED)) {
+				openTray();
+			}
+		} else {
+			if (getBooleanValue(IStatusDialogConstants.ANIMATION)) {
+				Rectangle shellPosition = getShell().getBounds();
+				ProgressManagerUtil.animateUp(shellPosition);
+			}
+		}
+		return result;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jface.dialogs.TrayDialog#closeTray()
+	 */
+	public void closeTray() throws IllegalStateException {
+		if (getTray() != null) {
+			super.closeTray();
+		}
+		//preserve state during modality switch
+		if (!getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH)) {
+			dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.FALSE);
+		}
+		if (launchTrayLink != null && !launchTrayLink.isDisposed()) {
+			launchTrayLink.setEnabled(providesSupport()
+					&& !getBooleanValue(IStatusDialogConstants.TRAY_OPENED));
+		}
+	}
+	
+	/**
+	 * Method which should be invoked when new errors become available for
+	 * display.
+	 */
+	void refresh() {
+		if (dialogArea == null || dialogArea.isDisposed()) {
+			return;
+		}
+		updateTitleArea();
+		updateListArea();
+		updateEnablements();
+		// adjust width if necessary
+		Point currentSize = getShell().getSize();
+		Point desiredSize = getShell()
+				.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		if (currentSize.x < desiredSize.x) {
+			getShell().setSize(desiredSize.x, currentSize.y);
+		} else {
+			getShell().layout();
+		}
+	}
+
+	void refreshDialogSize() {
+		Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		getShell().setSize(newSize);
+	}
+
+	/**
+	 * Show the details portion of the dialog if it is not already visible.
+	 * This method will only work when it is invoked after the control of
+	 * the dialog has been set. In other words, after the
+	 * <code>createContents</code> method has been invoked and has returned
+	 * the control for the content area of the dialog. Invoking the method
+	 * before the content area has been set or after the dialog has been
+	 * disposed will have no effect.
+	 */
+	private void showDetailsArea() {
+		if (dialogArea != null && !dialogArea.isDisposed()) {
+			if (detailsManager.isOpen()) {
+				detailsManager.close();
+				detailsManager.createDetailsArea(dialogArea,
+						getCurrentStatusAdapter());
+				dialogState.put(IStatusDialogConstants.DETAILS_OPENED,
+						Boolean.TRUE);
+			} else {
+				toggleDetailsArea();
+				dialogState.put(IStatusDialogConstants.DETAILS_OPENED,
+						Boolean.TRUE);
+			}
+			dialogArea.layout();
+		}
+	}
+
+	/**
+	 * Toggles the unfolding of the details area. This is triggered by the
+	 * user pressing the details button.
+	 * 
+	 */
+	private boolean toggleDetailsArea() {
+		boolean opened = false;
+		Point windowSize = getShell().getSize();
+		if (detailsManager.isOpen()) {
+			detailsManager.close();
+			getButton(IDialogConstants.DETAILS_ID).setText(
+					IDialogConstants.SHOW_DETAILS_LABEL);
+			opened = false;
+		} else {
+			detailsManager.createDetailsArea(dialogArea,
+					getCurrentStatusAdapter());
+			getButton(IDialogConstants.DETAILS_ID).setText(
+					IDialogConstants.HIDE_DETAILS_LABEL);
+			opened = true;
+		}
+
+		GridData listAreaGridData = (GridData) listArea.getLayoutData();
+		// if there is only one status to display,
+		// make sure that the list area is as small as possible
+		if (!isMulti()) {
+			listAreaGridData.heightHint = 0;
+		}
+		// allow listArea to grab space depending if details
+		// are opened or not
+		if (opened) {
+			listAreaGridData.grabExcessVerticalSpace = false;
+		} else {
+			listAreaGridData.grabExcessVerticalSpace = true;
+		}
+		listArea.setLayoutData(listAreaGridData);
+
+		Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
+		int diffY = newSize.y - windowSize.y;
+		// increase the dialog height if details were opened and such
+		// increase is necessary
+		// decrease the dialog height if details were closed and empty space
+		// appeared
+		if ((opened && diffY > 0) || (!opened && diffY < 0)) {
+			getShell().setSize(
+					new Point(windowSize.x, windowSize.y + (diffY)));
+		}
+		dialogArea.layout();
+		return opened;
+	}
+
+	/**
+	 * This method should initialize the dialog bounds.
+	 */
+	protected void initializeBounds() {
+		super.initializeBounds();
+		refreshDialogSize();
+		boolean modalitySwitch = getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH);
+		if (modalitySwitch) {
+			getShell().setBounds(getShellBounds());
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#getInitialLocation(org.eclipse.swt.graphics
+	 * .Point)
+	 */
+	public Point getInitialLocation(Point initialSize) {
+		// TODO Auto-generated method stub
+		return super.getInitialLocation(initialSize);
+	}
+
+	/**
+	 * The selection in the multiple job list has changed. Update widget
+	 * enablements, repopulate the list and show details.
+	 */
+	private void handleSelectionChange() {
+		StatusAdapter newSelection = getSingleSelection();
+		if (newSelection != null) {
+			dialogState.put(IStatusDialogConstants.CURRENT_STATUS_ADAPTER,
+					newSelection);
+			showDetailsArea();
+			refresh();
+		}
+	}
+
+	/**
+	 * This method creates display area for {@link StatusAdapter}s when more
+	 * is available.
+	 * 
+	 * @param parent
+	 *            A parent composite on which all components should be
+	 *            placed.
+	 */
+	private void fillListArea(Composite parent) {
+		// it is necessary to make list parent composite taller
+		GridData listAreaGD = (GridData) parent.getLayoutData();
+		listAreaGD.grabExcessHorizontalSpace = true;
+		if (!detailsManager.isOpen()) {
+			listAreaGD.grabExcessVerticalSpace = true;
+		}
+		listAreaGD.heightHint = SWT.DEFAULT;
+
+		// create list viewer
+		statusListViewer = new TableViewer(parent, SWT.SINGLE
+				| SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+		statusListViewer.setComparator(getLabelProviderWrapper());
+		Control control = statusListViewer.getControl();
+		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+		data.heightHint = convertHeightInCharsToPixels(5);
+		control.setLayoutData(data);
+		initContentProvider();
+		initLabelProvider();
+		statusListViewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
+			public void selectionChanged(SelectionChangedEvent event) {
+				handleSelectionChange();
+				if ((getTray() == null) && getBooleanValue(IStatusDialogConstants.TRAY_OPENED)
+						&& providesSupport()) {
+					silentTrayOpen();
+					return;
+				}
+				if ((getTray() != null) && !providesSupport()) {
+					silentTrayClose();
+					return;
+				}
+				supportTray.selectionChanged(event);
+			}
+		});
+		Dialog.applyDialogFont(parent);
+	}
+
+	/**
+	 * closes the tray without changing any flag
+	 */
+	private void silentTrayClose() {
+		super.closeTray();
+	}
+
+	/** opens the tray without changing any flag */
+	private void silentTrayOpen() {
+		if (getTray() == null)
+			super.openTray(supportTray);
+	}
+	/**
+	 * This methods switches StatusAdapters presentation depending if there
+	 * is one status or more.
+	 */
+	private void updateListArea() {
+		// take care about list area if there is more than one status
+		if (isMulti()) {
+			if (singleStatusDisplayArea != null) {
+				singleStatusDisplayArea.dispose();
+			}
+			if (statusListViewer == null
+					|| statusListViewer.getControl().isDisposed()) {
+				fillListArea(listArea);
+				listArea.layout();
+				listArea.getParent().layout();
+				getShell().setSize(
+						getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT));
+			}
+			refreshStatusListArea();
+		}
+	}
+
+	/**
+	 * Updated title area. Adjust title, title message and title image
+	 * according to selected {@link StatusAdapter}.
+	 */
+	private void updateTitleArea() {
+		Image image = getLabelProviderWrapper().getImage(
+				getCurrentStatusAdapter());
+		titleImageLabel.setImage(image);
+		if (getCurrentStatusAdapter() != null) {
+			mainMessageLabel.setText(getLabelProviderWrapper()
+					.getMainMessage(getCurrentStatusAdapter()));
+		}
+		if (singleStatusDisplayArea != null) {
+			if (isMulti()) {
+				singleStatusDisplayArea.dispose();
+			} else {
+				refreshSingleStatusArea();
+			}
+		}
+		titleArea.layout();
+	}
+
+	/**
+	 * This method creates button bar that is available on the bottom of the
+	 * dialog.
+	 */
+	protected Control createButtonBar(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+		layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,
+				false));
+
+		linkComposite = createLinkComposite(composite);
+
+		// Add the buttons to the button bar.
+		createButtonsForButtonBar(composite);
+
+		composite.layout();
+		return composite;
+	}
+
+	/**
+	 * This method creates buttons that are placed on button bar.
+	 */
+	protected void createButtonsForButtonBar(Composite parent) {
+		IAction gotoAction = getGotoAction();
+		String text = null;
+		if (gotoAction != null) {
+			text = gotoAction.getText();
+		}
+		Button button = createButton(parent, GOTO_ACTION_ID,
+				text == null ? "" : text, //$NON-NLS-1$
+				false);
+		if (text == null)
+			hideButton(button, true);
+
+		createButton(parent, IDialogConstants.OK_ID,
+				IDialogConstants.OK_LABEL, true);
+
+		createButton(parent, IDialogConstants.DETAILS_ID,
+				IDialogConstants.SHOW_DETAILS_LABEL, false);
+	}
+
+	/**
+	 * This method creates additional display area for {@link StatusAdapter}
+	 * when only one is available.
+	 * 
+	 * It creates one label on a composite currently for secondary message.
+	 * 
+	 * @param parent
+	 *            A parent composite on which all components should be
+	 *            placed.
+	 * @return composite the composite on which are all components for
+	 *         displaying status when only one is available.
+	 */
+	private Composite createSingleStatusDisplayArea(Composite parent) {
+		// secondary message is displayed on separate composite with no
+		// margins
+		Composite singleStatusParent = new Composite(parent, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.marginWidth = 0;
+		singleStatusParent.setLayout(gridLayout);
+		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
+		singleStatusParent.setLayoutData(gd);
+
+		// label that wraps
+		singleStatusLabel = new Label(singleStatusParent, SWT.WRAP);
+		GridData labelLayoutData = new GridData(SWT.FILL, SWT.FILL, true,
+				true);
+		labelLayoutData.widthHint = convertWidthInCharsToPixels(50);
+		singleStatusLabel.setLayoutData(labelLayoutData);
+		// main message set up early, to address bug 222391
+		singleStatusLabel.setText(getLabelProviderWrapper()
+				.getColumnText(getCurrentStatusAdapter(), 0));
+
+		singleStatusLabel.addMouseListener(new MouseListener() {
+			public void mouseDoubleClick(MouseEvent e) {
+			}
+
+			public void mouseDown(MouseEvent e) {
+				showDetailsArea();
+			}
+
+			public void mouseUp(MouseEvent e) {
+			}
+		});
+		return singleStatusParent;
+	}
+
+	/**
+	 * This method closes the dialog.
+	 */
+	public boolean close() {
+		boolean modalitySwitch = getBooleanValue(IStatusDialogConstants.MODALITY_SWITCH);
+		if (detailsManager.isOpen()) {
+			dialogState.put(IStatusDialogConstants.DETAILS_OPENED, Boolean.TRUE);
+			toggleDetailsArea();
+		}
+		if (getBooleanValue(IStatusDialogConstants.TRAY_OPENED)) {
+			closeTray();
+			if (modalitySwitch) {
+				dialogState.put(IStatusDialogConstants.DETAILS_OPENED, Boolean.TRUE);
+			}
+		}
+		dialogState.put(IStatusDialogConstants.SHELL_BOUNDS, getShell().getBounds());
+		statusListViewer = null;
+		boolean result = super.close();
+		if (!modalitySwitch && getBooleanValue(IStatusDialogConstants.ANIMATION)) {
+			ProgressManagerUtil.animateDown(getShellBounds());
+		}
+		return result;
+	}
+
+	/**
+	 * Hide the button if hide is <code>true</code>.
+	 * 
+	 * @param button
+	 * @param hide
+	 */
+	private void hideButton(Button button, boolean hide) {
+		((GridData) button.getLayoutData()).exclude = hide;
+		button.setVisible(!hide);
+		button.setEnabled(!hide);
+	}
+
+	/**
+	 * Update the button enablements
+	 */
+	private void updateEnablements() {
+		Button details = getButton(IDialogConstants.DETAILS_ID);
+		if (details != null) {
+			details.setEnabled(true);
+		}
+		Button gotoButton = getButton(GOTO_ACTION_ID);
+		if (gotoButton != null) {
+			IAction gotoAction = getGotoAction();
+			boolean hasValidGotoAction = (gotoAction != null)
+					&& (gotoAction.getText() != null);
+			if (hasValidGotoAction) {
+				hideButton(gotoButton, false);
+				gotoButton.setText(gotoAction.getText());
+
+				((GridData) gotoButton.getLayoutData()).widthHint = gotoButton
+						.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
+				gotoButton.getParent().layout();
+			} else
+				hideButton(gotoButton, true);
+		}
+		// and tray enablement button
+		if (providesSupport() && !getBooleanValue(IStatusDialogConstants.HIDE_SUPPORT_BUTTON)) {
+			if (launchTrayLink == null || launchTrayLink.isDisposed()) {
+				launchTrayLink = createGetSupportLink();
+			}
+			launchTrayLink
+					.setEnabled(!getBooleanValue(IStatusDialogConstants.TRAY_OPENED));
+		} else {
+			if (launchTrayLink != null && !launchTrayLink.isDisposed()) {
+				launchTrayLink.dispose();
+				launchTrayLink = null;
+			}
+		}
+		IViewDescriptor descriptor = shouldDisplayLinkToErrorLog();
+		if (descriptor != null) {
+			if (showErrorLogLink == null || showErrorLogLink.isDisposed()) {
+				showErrorLogLink = createShowErrorLogLink();
+			}
+		} else {
+			if (showErrorLogLink != null && !showErrorLogLink.isDisposed()) {
+				showErrorLogLink.dispose();
+			}
+		}
+		linkComposite.getParent().layout();
+	}
+
+	private IViewDescriptor shouldDisplayLinkToErrorLog() {
+		/* no support for error log */
+		if (!getBooleanValue(IStatusDialogConstants.ERRORLOG_LINK)) {
+			return null;
+		}
+		/* check handling hint and display link if it is expected */
+		boolean shouldDisplay = false;
+		Iterator it = ((Collection) dialogState
+				.get(IStatusDialogConstants.STATUS_ADAPTERS)).iterator();
+		while (it.hasNext()) {
+			StatusAdapter adapter = (StatusAdapter) it.next();
+			Integer hint = (Integer) adapter.getProperty(WorkbenchStatusDialogManagerImpl.HINT);
+			if (hint != null
+					&& ((hint.intValue() & StatusManager.LOG) != 0)) {
+				shouldDisplay |= true;
+				break;
+			}
+		}
+		if (!shouldDisplay) {
+			return null;
+		}
+		/* view description */
+		return Workbench.getInstance().getViewRegistry().find(LOG_VIEW_ID);
+	}
+
+	/**
+	 * Opens the dialog tray (support area at the right side of the dialog)
+	 */
+	public void openTray(DialogTray tray) throws IllegalStateException,
+			UnsupportedOperationException {
+		if (launchTrayLink != null && !launchTrayLink.isDisposed()) {
+			launchTrayLink.setEnabled(false);
+		}
+		if (providesSupport()) {
+			super.openTray(tray);
+		}
+		dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.TRUE);
+	}
+
+	/**
+	 * Refreshes the single status area. Is called only when there is one
+	 * and only one error.
+	 */
+	private void refreshSingleStatusArea() {
+		String description = getLabelProviderWrapper()
+				.getColumnText(getCurrentStatusAdapter(), 0);
+		if (description.equals(singleStatusLabel.getText()))
+			singleStatusLabel.setText(" "); //$NON-NLS-1$
+		singleStatusLabel.setText(description);
+		singleStatusDisplayArea.layout();
+		getShell().setText(getString(IStatusDialogConstants.TITLE));
+	}
+
+	/**
+	 * Refresh the contents of the viewer.
+	 */
+	private void refreshStatusListArea() {
+		if (statusListViewer != null
+				&& !statusListViewer.getControl().isDisposed()) {
+			statusListViewer.refresh();
+			if (statusListViewer.getTable().getItemCount() > 1) {
+				getShell()
+						.setText(
+								WorkbenchMessages.WorkbenchStatusDialog_MultipleProblemsHaveOccured);
+			} else {
+				getShell().setText(
+						getString(IStatusDialogConstants.TITLE));
+			}
+		}
+	}
+
+	/**
+	 * Sets the content provider for the viewer.
+	 */
+	private void initContentProvider() {
+		IContentProvider provider = new IStructuredContentProvider() {
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+			 */
+			public void dispose() {
+				// Nothing of interest here
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.jface.viewers.IStructuredContentProvider#getElements
+			 * (java.lang.Object)
+			 */
+			public Object[] getElements(Object inputElement) {
+				return ((Collection) dialogState
+						.get(IStatusDialogConstants.STATUS_ADAPTERS)).toArray();
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see
+			 * org.eclipse.jface.viewers.IContentProvider#inputChanged(org
+			 * .eclipse.jface.viewers.Viewer, java.lang.Object,
+			 * java.lang.Object)
+			 */
+			public void inputChanged(Viewer viewer, Object oldInput,
+					Object newInput) {
+				if (newInput != null) {
+					refreshStatusListArea();
+				}
+			}
+		};
+		statusListViewer.setContentProvider(provider);
+		statusListViewer.setInput(this);
+		statusListViewer.setSelection(new StructuredSelection(
+				getCurrentStatusAdapter()));
+	}
+
+	/**
+	 * Creates a new control that provides access to support providers.
+	 * <p>
+	 * The <code>WorkbenchStatusDialog</code> implementation of this method
+	 * creates the control, registers it for selection events including
+	 * selection, Note that the parent's layout is assumed to be a
+	 * <code>GridLayout</code> and the number of columns in this layout is
+	 * incremented. Subclasses may override.
+	 * </p>
+	 * 
+	 * @param parent
+	 *            A parent composite on which all components should be
+	 *            placed.
+	 * @return the report control
+	 */
+	private Composite createLinkComposite(Composite parent) {
+		Composite linkArea = new Composite(parent, SWT.NONE) {
+
+			// the composite should be as small as possible when there is no
+			// additional controls on it
+			public Point computeSize(int wHint, int hHint, boolean changed) {
+				Point newSize = super.computeSize(wHint, hHint, changed);
+				if (getChildren().length == 0) {
+					newSize.x = 0;
+					newSize.y = 0;
+				}
+				return newSize;
+			}
+
+		};
+		GridLayout layout = new GridLayout();
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		layout.verticalSpacing = 0;
+		linkArea.setLayout(layout);
+
+		((GridLayout) parent.getLayout()).numColumns++;
+
+		GridData layoutData = new GridData(SWT.BEGINNING, SWT.CENTER, true,
+				false);
+		linkArea.setLayoutData(layoutData);
+		return linkArea;
+	}
+
+	/**
+	 * Creates a button with a report image. This is only used if there is
+	 * an image available.
+	 */
+	private Link createGetSupportLink() {
+		// no support
+		if (!providesSupport() || getBooleanValue(IStatusDialogConstants.HIDE_SUPPORT_BUTTON)) {
+			return null;
+		}
+
+		Link link = new Link(linkComposite, SWT.NONE);
+		link
+				.setText(WorkbenchMessages.WorkbenchStatusDialog_SupportHyperlink);
+		link
+				.setToolTipText(WorkbenchMessages.WorkbenchStatusDialog_SupportTooltip);
+		link.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				openTray();
+			}
+		});
+		Dialog.applyDialogFont(link);
+		return link;
+	}
+
+	private Link createShowErrorLogLink() {
+		Link link = new Link(linkComposite, SWT.NONE);
+		link.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				try {
+					Workbench.getInstance().getActiveWorkbenchWindow()
+							.getActivePage().showView(LOG_VIEW_ID);
+				} catch (CoreException ce) {
+					StatusManager.getManager().handle(ce,
+							WorkbenchPlugin.PI_WORKBENCH);
+				}
+			}
+		});
+		link.setText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogHyperlink);
+		link
+				.setToolTipText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogTooltip);
+		Dialog.applyDialogFont(link);
+		return link;
+	}
+
+	/**
+	 * Sets initial label provider.
+	 */
+	private void initLabelProvider() {
+		statusListViewer.setLabelProvider(getLabelProviderWrapper());
+	}
+
+	/**
+	 * Returns {@link IAction} associated with selected StatusAdapter.
+	 * 
+	 * @return {@link IAction} that is set as {@link StatusAdapter} property
+	 *         with Job.class key.
+	 */
+	private IAction getGotoAction() {
+		Object property = null;
+
+		Job job = (Job) (getCurrentStatusAdapter().getAdapter(Job.class));
+		if (job != null) {
+			property = job.getProperty(IProgressConstants.ACTION_PROPERTY);
+		}
+
+		if (property instanceof IAction) {
+			return (IAction) property;
+		}
+		return null;
+	}
+
+	/**
+	 * Get the single selection. Return null if the selection is not just
+	 * one element.
+	 * 
+	 * @return StatusAdapter or <code>null</code>.
+	 */
+	private StatusAdapter getSingleSelection() {
+		ISelection rawSelection = statusListViewer.getSelection();
+		if (rawSelection != null
+				&& rawSelection instanceof IStructuredSelection) {
+			IStructuredSelection selection = (IStructuredSelection) rawSelection;
+			if (selection.size() == 1) {
+				return (StatusAdapter) selection.getFirstElement();
+			}
+		}
+		return null;
+	}
+
+	/*
+	 * Prompt to inform the user that the dialog will close and the errors
+	 * cleared.
+	 */
+	private boolean isPromptToClose() {
+		IPreferenceStore store = WorkbenchPlugin.getDefault()
+				.getPreferenceStore();
+		if (!store.contains(PREF_SKIP_GOTO_ACTION_PROMPT)
+				|| !store.getString(PREF_SKIP_GOTO_ACTION_PROMPT).equals(
+						MessageDialogWithToggle.ALWAYS)) {
+			MessageDialogWithToggle dialog = MessageDialogWithToggle.open(
+					MessageDialog.CONFIRM, getShell(),
+					ProgressMessages.JobErrorDialog_CloseDialogTitle,
+					ProgressMessages.JobErrorDialog_CloseDialogMessage,
+					ProgressMessages.JobErrorDialog_DoNotShowAgainMessage,
+					false, store, PREF_SKIP_GOTO_ACTION_PROMPT, SWT.SHEET);
+			return dialog.getReturnCode() == Window.OK;
+		}
+		return true;
+	}
+
+	public void openTray() {
+		openTray(supportTray);
+	}
+
+	public boolean providesSupport() {
+		return supportTray.providesSupport(getCurrentStatusAdapter()) != null;
+	}
+
+	private String getString(Object key) {
+		return (String) dialogState.get(key);
+	}
+
+	private StatusAdapter getCurrentStatusAdapter() {
+		return (StatusAdapter) dialogState
+				.get(IStatusDialogConstants.CURRENT_STATUS_ADAPTER);
+	}
+
+	private boolean getBooleanValue(Object key) {
+		Boolean b = (Boolean) dialogState.get(key);
+		if (b == null) {
+			return false;
+		}
+		return b.booleanValue();
+	}
+
+	private Rectangle getShellBounds() {
+		return (Rectangle) dialogState.get(IStatusDialogConstants.SHELL_BOUNDS);
+	}
+
+	private LabelProviderWrapper getLabelProviderWrapper() {
+		return (LabelProviderWrapper) dialogState
+				.get(IStatusDialogConstants.LABEL_PROVIDER);
+	}
+
+	private boolean isMulti() {
+		return ((Collection) dialogState
+				.get(IStatusDialogConstants.STATUS_ADAPTERS)).size() > 1;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/LabelProviderWrapper.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/LabelProviderWrapper.java
new file mode 100644
index 0000000..b7a4b57
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/LabelProviderWrapper.java	
@@ -0,0 +1,542 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.statushandlers;
+
+import com.ibm.icu.text.DateFormat;
+import java.net.URL;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Map;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.internal.WorkbenchMessages;
+import org.eclipse.ui.internal.progress.ProgressManager;
+import org.eclipse.ui.internal.progress.ProgressMessages;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+
+
+/**
+ * This is an utility class which is responsible for text and icon decorators in
+ * the StatusDialog.
+ * 
+ * @since 3.6
+ */
+public class LabelProviderWrapper extends ViewerComparator implements
+		ITableLabelProvider {
+	/**
+	 * The default status label provider.
+	 */
+	private class DefaultLabelProvider implements ITableLabelProvider {
+		ResourceManager manager = new LocalResourceManager(JFaceResources
+				.getResources());
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse
+		 * .jface.viewers.ILabelProviderListener)
+		 */
+		public void addListener(ILabelProviderListener listener) {
+			// Do nothing
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+		 */
+		public void dispose() {
+			manager.dispose();
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java
+		 * .lang.Object, int)
+		 */
+		public Image getColumnImage(Object element, int columnIndex) {
+			Image result = null;
+			if (element != null) {
+				StatusAdapter statusAdapter = ((StatusAdapter) element);
+				Job job = (Job) (statusAdapter.getAdapter(Job.class));
+				if (job != null) {
+					result = getIcon(job);
+				}
+			}
+			// if somehow disposed image was received (should not happen)
+			if (result != null && result.isDisposed()) {
+				result = null;
+			}
+			return result;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.
+		 * lang.Object, int)
+		 */
+		public String getColumnText(Object element, int columnIndex) {
+			StatusAdapter statusAdapter = (StatusAdapter) element;
+			String text = WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
+			if (!isMulti()) {
+				Job job = (Job) (statusAdapter.getAdapter(Job.class));
+				if (job != null) {
+					text = getPrimaryMessage(statusAdapter);
+				} else {
+					text = getSecondaryMessage(statusAdapter);
+				}
+			} else {
+				Job job = (Job) (statusAdapter.getAdapter(Job.class));
+				if (job != null) {
+					text = job.getName();
+				} else {
+					text = getPrimaryMessage(statusAdapter);
+				}
+			}
+			Long timestamp = (Long) statusAdapter
+					.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY);
+
+			if (timestamp != null && isMulti()) {
+				String date = DateFormat.getDateTimeInstance(DateFormat.LONG,
+						DateFormat.LONG)
+						.format(new Date(timestamp.longValue()));
+				return NLS.bind(ProgressMessages.JobInfo_Error, (new Object[] {
+						text, date }));
+			}
+			return text;
+		}
+
+		/*
+		 * Get the icon for the job.
+		 */
+		private Image getIcon(Job job) {
+			if (job != null) {
+				Object property = job
+						.getProperty(IProgressConstants.ICON_PROPERTY);
+
+				// Create an image from the job's icon property or family
+				if (property instanceof ImageDescriptor) {
+					return manager.createImage((ImageDescriptor) property);
+				} else if (property instanceof URL) {
+					return manager.createImage(ImageDescriptor
+							.createFromURL((URL) property));
+				} else {
+					// Let the progress manager handle the resource management
+					return ProgressManager.getInstance().getIconFor(job);
+				}
+			}
+			return null;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java
+		 * .lang.Object, java.lang.String)
+		 */
+		public boolean isLabelProperty(Object element, String property) {
+			return false;
+		}
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse
+		 * .jface.viewers.ILabelProviderListener)
+		 */
+		public void removeListener(ILabelProviderListener listener) {
+			// Do nothing
+		}
+	}
+
+	private ITableLabelProvider labelProvider;
+
+	/**
+	 * This field stores the decorator which can override various texts produced
+	 * by this class.
+	 */
+	private ILabelDecorator messageDecorator;
+
+	private Map dialogState;
+
+	/**
+	 * @param dialogState
+	 */
+	public LabelProviderWrapper(Map dialogState) {
+		this.dialogState = dialogState;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang
+	 * .Object, int)
+	 */
+	public Image getColumnImage(Object element, int columnIndex) {
+		return labelProvider.getColumnImage(element, columnIndex);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang
+	 * .Object, int)
+	 */
+	public String getColumnText(Object element, int columnIndex) {
+		return getLabelProvider().getColumnText(element, columnIndex);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.
+	 * jface.viewers.ILabelProviderListener)
+	 */
+	public void addListener(ILabelProviderListener listener) {
+		getLabelProvider().addListener(listener);
+	}
+
+	/**
+	 * This method disposes the label provider if and only if the dialog is not
+	 * changing its state.
+	 * 
+	 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
+	 */
+	public void dispose() {
+		boolean modalitySwitch = ((Boolean) dialogState.get(IStatusDialogConstants.MODALITY_SWITCH))
+				.booleanValue();
+		if (!modalitySwitch) {
+			getLabelProvider().dispose();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang
+	 * .Object, java.lang.String)
+	 */
+	public boolean isLabelProperty(Object element, String property) {
+		return getLabelProvider().isLabelProperty(element, property);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse
+	 * .jface.viewers.ILabelProviderListener)
+	 */
+	public void removeListener(ILabelProviderListener listener) {
+		getLabelProvider().removeListener(listener);
+	}
+
+	/**
+	 * Gets {@link Image} associated with current {@link StatusAdapter}
+	 * severity.
+	 * 
+	 * @param statusAdapter
+	 * 
+	 * @return {@link Image} associated with current {@link StatusAdapter}
+	 *         severity.
+	 */
+	public Image getImage(StatusAdapter statusAdapter) {
+		if (statusAdapter != null) {
+			int severity = statusAdapter.getStatus().getSeverity();
+			switch (severity) {
+			case IStatus.OK:
+			case IStatus.INFO:
+			case IStatus.CANCEL:
+				return getSWTImage(SWT.ICON_INFORMATION);
+			case IStatus.WARNING:
+				return getSWTImage(SWT.ICON_WARNING);
+			default: /* IStatus.ERROR */
+				return getSWTImage(SWT.ICON_ERROR);
+			}
+		}
+		// should not never happen but if we do not know what is going on, then
+		// return error image.
+		return getSWTImage(SWT.ICON_ERROR);
+	}
+
+	/**
+	 * Get an <code>Image</code> from the provide SWT image constant.
+	 * 
+	 * @param imageID
+	 *            the SWT image constant
+	 * @return image the image
+	 */
+	public Image getSWTImage(final int imageID) {
+		return Display.getCurrent().getSystemImage(imageID);
+	}
+
+	/**
+	 * This method computes the dialog main message.
+	 * 
+	 * If there is only one reported status adapter, main message should be:
+	 * <ul>
+	 * <li>information about job that reported an error.</li>
+	 * <li>primary message, if the statusAdapter was not reported by job</li>
+	 * </ul>
+	 * 
+	 * If there is more reported statusAdapters, main message should be:
+	 * <ul>
+	 * <li>primary message for job reported statusAdapters</li>
+	 * <li>secondary message for statuses not reported by jobs</li>
+	 * </ul>
+	 * 
+	 * If nothing can be found, some general information should be displayed.
+	 * 
+	 * @param statusAdapter
+	 *            A status adapter which is used as the base for computation.
+	 * @return main message of the dialog.
+	 * 
+	 * @see #getPrimaryMessage(StatusAdapter)
+	 * @see #getSecondaryMessage(StatusAdapter)
+	 */
+	public String getMainMessage(StatusAdapter statusAdapter) {
+		if (!isMulti()) {
+			Job job = (Job) (statusAdapter.getAdapter(Job.class));
+			// job
+			if (job != null) {
+				return NLS
+						.bind(
+								WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurredInJob,
+								job.getName());
+			}
+			// we are not handling job
+			return getPrimaryMessage(statusAdapter);
+		}
+		// we have a list. primary message or job name or on the list name (both
+		// with timestamp if available).
+		// we display secondary message or status
+		if (isMulti()) {
+			Job job = (Job) (statusAdapter.getAdapter(Job.class));
+			// job
+			if (job != null) {
+				return getPrimaryMessage(statusAdapter);
+			}
+
+			// plain status
+			return getSecondaryMessage(statusAdapter);
+		}
+		return WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
+	}
+
+	/**
+	 * Retrieves primary message from passed statusAdapter. Primary message
+	 * should be (from the most important):
+	 * <ul>
+	 * <li>statusAdapter title</li>
+	 * <li>IStatus message</li>
+	 * <li>pointing to child statuses if IStatus has them.</li>
+	 * <li>exception message</li>
+	 * <li>exception class</li>
+	 * <li>general message informing about error (no details at all)</li>
+	 * </ul>
+	 * 
+	 * @param statusAdapter
+	 *            an status adapter to retrieve primary message from
+	 * @return String containing primary message
+	 * 
+	 * @see #getMainMessage(StatusAdapter)
+	 * @see #getSecondaryMessage(StatusAdapter)
+	 */
+	public String getPrimaryMessage(StatusAdapter statusAdapter) {
+		// if there was nonempty title set, display the title
+		Object property = statusAdapter
+				.getProperty(IStatusAdapterConstants.TITLE_PROPERTY);
+		if (property instanceof String) {
+			String header = (String) property;
+			if (header.trim().length() > 0) {
+				return decorate(header, statusAdapter);
+			}
+		}
+		// if there was message set in the status
+		IStatus status = statusAdapter.getStatus();
+		if (status.getMessage() != null
+				&& status.getMessage().trim().length() > 0) {
+			return decorate(status.getMessage(), statusAdapter);
+		}
+
+		// if status has children
+		if (status.getChildren().length > 0) {
+			return WorkbenchMessages.WorkbenchStatusDialog_StatusWithChildren;
+		}
+
+		// check the exception
+		Throwable t = status.getException();
+		if (t != null) {
+			if (t.getMessage() != null && t.getMessage().trim().length() > 0) {
+				return decorate(t.getMessage(), statusAdapter);
+			}
+			return t.getClass().getName();
+		}
+		return WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
+	}
+
+	/**
+	 * Retrieves secondary message from the passed statusAdapter. Secondary
+	 * message is one level lower than primary. Secondary message should be
+	 * (from the most important):
+	 * <ul>
+	 * <li>IStatus message</li>
+	 * <li>pointing to child statuses if IStatus has them.</li>
+	 * <li>exception message</li>
+	 * <li>exception class</li>
+	 * </ul>
+	 * Secondary message should not be the same as primary one. If no secondary
+	 * message can be extracted, details should be pointed.
+	 * 
+	 * @param statusAdapter
+	 *            an status adapter to retrieve secondary message from
+	 * @return String containing secondary message
+	 * 
+	 * @see #getMainMessage(StatusAdapter)
+	 * @see #getPrimaryMessage(StatusAdapter)
+	 */
+	public String getSecondaryMessage(StatusAdapter statusAdapter) {
+		String primary = getPrimaryMessage(statusAdapter);
+		// we can skip the title, it is always displayed as primary message
+
+		// if there was message set in the status
+		IStatus status = statusAdapter.getStatus();
+		String message = status.getMessage();
+		String decoratedMessage = message == null ? null : decorate(message,
+				statusAdapter);
+		if (message != null && message.trim().length() > 0
+				&& !primary.equals(decoratedMessage)) {
+			/* we have not displayed it yet */
+			return decoratedMessage;
+		}
+		// if status has children
+		if (status.getChildren().length > 0
+				&& !primary.equals(decoratedMessage)) {
+			return WorkbenchMessages.WorkbenchStatusDialog_StatusWithChildren;
+		}
+
+		// check the exception
+		Throwable t = status.getException();
+		if (t != null) {
+			if (t.getMessage() != null) {
+				String decoratedThrowable = decorate(t.getMessage(),
+						statusAdapter);
+				if (t.getMessage().trim().length() > 0
+						&& !primary.equals(decoratedThrowable)) {
+					return decoratedThrowable;
+				}
+			}
+			String throwableName = t.getClass().getName();
+			if (!primary.equals(throwableName)) {
+				return throwableName;
+			}
+		}
+		return WorkbenchMessages.WorkbenchStatusDialog_SeeDetails;
+	}
+
+	private String decorate(String string, StatusAdapter adapter) {
+		messageDecorator = (ILabelDecorator) dialogState
+				.get(IStatusDialogConstants.DECORATOR);
+		if (messageDecorator != null) {
+			string = messageDecorator.decorateText(string, adapter);
+		}
+		return string;
+	}
+
+	private int compare(StatusAdapter s1, StatusAdapter s2) {
+		Long timestamp1 = ((Long) s1
+				.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY));
+		Long timestamp2 = ((Long) s2
+				.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY));
+		if (timestamp1 == null || timestamp2 == null
+				|| (timestamp1.equals(timestamp2))) {
+			String text1 = getColumnText(s1, 0);
+			String text2 = getColumnText(s2, 0);
+			return text1.compareTo(text2);
+		}
+
+		if (timestamp1.longValue() < timestamp2.longValue()) {
+			return -1;
+		}
+		if (timestamp1.longValue() > timestamp2.longValue()) {
+			return 1;
+		}
+		// should be never called
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.
+	 * viewers.Viewer, java.lang.Object, java.lang.Object)
+	 */
+	public int compare(Viewer testViewer, Object o1, Object o2) {
+		if (o1 instanceof StatusAdapter && o2 instanceof StatusAdapter) {
+			return compare((StatusAdapter) o1, (StatusAdapter) o2);
+		}
+		// should not happen
+		if (o1.hashCode() < o2.hashCode()) {
+			return -1;
+		}
+		if (o2.hashCode() > o2.hashCode()) {
+			return 1;
+		}
+		return 0;
+	}
+
+	private boolean isMulti() {
+		return ((Collection) dialogState
+				.get(IStatusDialogConstants.STATUS_ADAPTERS)).size() > 1;
+	}
+
+	/**
+	 * @return Returns the labelProvider.
+	 */
+	public ITableLabelProvider getLabelProvider() {
+		ITableLabelProvider temp = (ITableLabelProvider) dialogState
+				.get(IStatusDialogConstants.CUSTOM_LABEL_PROVIDER);
+		if (temp != null) {
+			labelProvider = temp;
+		}
+		if (labelProvider == null) {
+			labelProvider = new DefaultLabelProvider();
+		}
+		return labelProvider;
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StackTraceSupportArea.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StackTraceSupportArea.java
index 374c919..5a38f5b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StackTraceSupportArea.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/StackTraceSupportArea.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -178,4 +178,9 @@ public class StackTraceSupportArea extends AbstractStatusAreaProvider {
 	public List getList() {
 		return list;
 	}
+
+	public boolean validFor(StatusAdapter statusAdapter) {
+		return statusAdapter.getStatus().getException() != null;
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/SupportTray.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/SupportTray.java
new file mode 100644
index 0000000..f14f7ff
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/SupportTray.java	
@@ -0,0 +1,349 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.statushandlers;
+
+import java.util.Map;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.DialogTray;
+import org.eclipse.jface.dialogs.ErrorSupportProvider;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.util.Policy;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.statushandlers.AbstractStatusAreaProvider;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+
+
+/**
+ * This class is responsible for displaying the support area on the right
+ * side of the status dialog.
+ */
+public class SupportTray extends DialogTray implements
+		ISelectionChangedListener {
+
+	private Map dialogState;
+
+
+	/**
+	 * @param dialogState
+	 * @param listener
+	 */
+	public SupportTray(Map dialogState, Listener listener) {
+		this.closeListener = listener;
+		this.dialogState = dialogState;
+		this.hideSupportButtons = getBooleanValue(IStatusDialogConstants.HIDE_SUPPORT_BUTTON);
+		this.lastSelectedStatus = getCurrentStatusAdapter();
+	}
+
+	private IContributionItem closeAction;
+	private Listener closeListener;
+	private boolean hideSupportButtons;
+	private Image normal;
+	private Image hover;
+
+	/**
+	 * This composite occupies the whole space that is available to the support
+	 * tray. It has hardcoded layout behavior to protect the dialog.
+	 */
+	private Composite supportArea;
+	private Composite supportAreaContent;
+
+	private StatusAdapter lastSelectedStatus;
+
+	private AbstractStatusAreaProvider userSupportProvider;
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.DialogTray#createContents(org.eclipse.swt.widgets.Composite)
+	 */
+	protected Control createContents(Composite parent) {
+		Composite container = new Composite(parent, SWT.NONE);
+
+		// nothing to display. Should never happen, cause button is disabled
+		// when nothing to display.
+
+		if (providesSupport(getCurrentStatusAdapter()) == null
+				&& getBooleanValue(IStatusDialogConstants.TRAY_OPENED)) {
+
+		}
+
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = layout.marginHeight = 0;
+		layout.verticalSpacing = 0;
+		container.setLayout(layout);
+		GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		container.setLayoutData(layoutData);
+
+		container.addListener(SWT.Dispose, new Listener() {
+			public void handleEvent(Event event) {
+				destroyImages();
+			}
+		});
+
+		if (!hideSupportButtons) {
+			ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
+			toolBarManager.createControl(container);
+			GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+			gd.grabExcessHorizontalSpace = true;
+			toolBarManager.getControl().setLayoutData(gd);
+			Label separator = new Label(container, SWT.SEPARATOR
+					| SWT.HORIZONTAL);
+			gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+			gd.heightHint = 1;
+			separator.setLayoutData(gd);
+
+			createActions();
+			toolBarManager.add(closeAction);
+
+			toolBarManager.update(true);
+		}
+
+		supportArea = new Composite(container, SWT.NONE);
+		layout = new GridLayout();
+		layout.marginWidth = layout.marginHeight = 0;
+		layout.verticalSpacing = 0;
+		supportArea.setLayout(layout);
+		GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+				| GridData.VERTICAL_ALIGN_FILL);
+		gd.horizontalSpan = 1;
+		gd.grabExcessHorizontalSpace = true;
+		gd.grabExcessVerticalSpace = true;
+		supportArea.setLayoutData(gd);
+
+		if (lastSelectedStatus != null)
+			createSupportArea(supportArea, lastSelectedStatus);
+
+		Point shellSize = supportArea.getShell().getSize();
+		Point desiredSize = supportArea.getShell().computeSize(SWT.DEFAULT,
+				SWT.DEFAULT);
+		
+		if(desiredSize.y > shellSize.y){
+			supportArea.getShell().setSize(shellSize.x,
+					Math.min(desiredSize.y, 500));
+		}
+
+		return container;
+	}
+
+	/**
+	 * Creates any custom needed by the tray, such as the close button.
+	 */
+	private void createImages() {
+		Display display = Display.getCurrent();
+		int[] shape = new int[] { 3, 3, 5, 3, 7, 5, 8, 5, 10, 3, 12, 3, 12,
+				5, 10, 7, 10, 8, 12, 10, 12, 12, 10, 12, 8, 10, 7, 10, 5,
+				12, 3, 12, 3, 10, 5, 8, 5, 7, 3, 5 };
+
+		/*
+		 * Use magenta as transparency color since it is used infrequently.
+		 */
+		Color border = display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW);
+		Color background = display
+				.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+		Color backgroundHot = new Color(display, new RGB(252, 160, 160));
+		Color transparent = display.getSystemColor(SWT.COLOR_MAGENTA);
+
+		PaletteData palette = new PaletteData(new RGB[] {
+				transparent.getRGB(), border.getRGB(), background.getRGB(),
+				backgroundHot.getRGB() });
+		ImageData data = new ImageData(16, 16, 8, palette);
+		data.transparentPixel = 0;
+
+		normal = new Image(display, data);
+		normal.setBackground(transparent);
+		GC gc = new GC(normal);
+		gc.setBackground(background);
+		gc.fillPolygon(shape);
+		gc.setForeground(border);
+		gc.drawPolygon(shape);
+		gc.dispose();
+
+		hover = new Image(display, data);
+		hover.setBackground(transparent);
+		gc = new GC(hover);
+		gc.setBackground(backgroundHot);
+		gc.fillPolygon(shape);
+		gc.setForeground(border);
+		gc.drawPolygon(shape);
+		gc.dispose();
+
+		backgroundHot.dispose();
+	}
+	
+	/**
+	 * Creates any actions needed by the tray.
+	 */
+	private void createActions() {
+		createImages();
+		closeAction = new ContributionItem() {
+			public void fill(ToolBar parent, int index) {
+				final ToolItem item = new ToolItem(parent, SWT.PUSH);
+				item.setImage(normal);
+				item.setHotImage(hover);
+				item.setToolTipText(JFaceResources.getString("close")); //$NON-NLS-1$
+				item.addListener(SWT.Selection, closeListener);
+			}
+		};
+	}
+
+	private void destroyImages() {
+		if (normal != null) normal.dispose();
+		if (hover != null) hover.dispose();
+	}
+
+	/**
+	 * Create the area for extra error support information.
+	 * 
+	 * @param parent
+	 *            A composite on which should be the support area created.
+	 * @param statusAdapter
+	 *            StatusAdapter for which should be the support area
+	 *            created.
+	 */
+	private void createSupportArea(Composite parent,
+			StatusAdapter statusAdapter) {
+
+		ErrorSupportProvider provider = getSupportProvider();
+
+		// default support area was disabled
+		if (provider == null)
+			return;
+
+		if (supportAreaContent != null)
+			supportAreaContent.dispose();
+
+		supportAreaContent = new Composite(parent, SWT.FILL);
+
+		GridData supportData = new GridData(SWT.FILL, SWT.FILL, true, true);
+		supportAreaContent.setLayoutData(supportData);
+		if (supportAreaContent.getLayout() == null) {
+			GridLayout layout = new GridLayout();
+			layout.marginWidth = 0;
+			layout.marginHeight = 0;
+			supportAreaContent.setLayout(layout); // Give it a default
+			// layout
+		}
+
+		if (provider instanceof AbstractStatusAreaProvider) {
+			((AbstractStatusAreaProvider) provider).createSupportArea(
+					supportAreaContent, statusAdapter);
+		} else {
+			provider.createSupportArea(supportAreaContent, statusAdapter
+					.getStatus());
+		}
+	}
+
+	public ErrorSupportProvider getSupportProvider() {
+		ErrorSupportProvider provider = Policy.getErrorSupportProvider();
+
+		if (userSupportProvider != null) {
+			provider = userSupportProvider;
+		}
+
+		if (getBooleanValue(IStatusDialogConstants.ENABLE_DEFAULT_SUPPORT_AREA) && provider == null) {
+			provider = new StackTraceSupportArea();
+		}
+		return provider;
+	}
+
+	private StatusAdapter getStatusAdapterFromEvent(
+			SelectionChangedEvent event) {
+
+		ISelection selection = event.getSelection();
+
+		if (selection instanceof StructuredSelection) {
+			StructuredSelection structuredSelection = (StructuredSelection) selection;
+			Object element = structuredSelection.getFirstElement();
+			if (element instanceof StatusAdapter) {
+				return (StatusAdapter) element;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Checks if the support dialog has any support areas.
+	 * 
+	 * @param adapter
+	 *            - a parameter for which we area checking the status adapter
+	 * @return true if support dialog has any support areas to display, false
+	 *         otherwise
+	 */
+	public ErrorSupportProvider providesSupport(StatusAdapter adapter) {
+		ErrorSupportProvider provider = getSupportProvider();
+		if (provider instanceof AbstractStatusAreaProvider) {
+			AbstractStatusAreaProvider areaProvider = (AbstractStatusAreaProvider) provider;
+			if (areaProvider.validFor(adapter)) {
+				return areaProvider;
+			}
+			return null;
+		}
+		return provider;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
+	 */
+	public void selectionChanged(SelectionChangedEvent event) {
+		lastSelectedStatus = getStatusAdapterFromEvent(event);
+		if (supportArea != null && !supportArea.isDisposed()) {
+			if (lastSelectedStatus != null) {
+				createSupportArea(supportArea, lastSelectedStatus);
+				supportArea.layout(true);
+			}
+		}
+	}
+
+	/**
+	 * @return Returns the supportArea.
+	 */
+	public Composite getSupportArea() {
+		return supportArea;
+	}
+
+	private boolean getBooleanValue(Object key) {
+		Boolean b = (Boolean) dialogState.get(key);
+		if (b == null) {
+			return false;
+		}
+		return b.booleanValue();
+	}
+
+	private StatusAdapter getCurrentStatusAdapter() {
+		return (StatusAdapter) dialogState
+				.get(IStatusDialogConstants.CURRENT_STATUS_ADAPTER);
+	}
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/WorkbenchStatusDialogManagerImpl.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/WorkbenchStatusDialogManagerImpl.java
new file mode 100644
index 0000000..0f6bdb7
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/statushandlers/WorkbenchStatusDialogManagerImpl.java	
@@ -0,0 +1,540 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.statushandlers;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.progress.IProgressConstants;
+import org.eclipse.ui.statushandlers.IStatusAdapterConstants;
+import org.eclipse.ui.statushandlers.StatusAdapter;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.ui.statushandlers.StatusManager.INotificationTypes;
+
+/**
+ * <p>
+ * This class is the actual dialog manager. Status dialog is a very bad thing to
+ * manage, because it can switch its modality. As you know this is not possible,
+ * so dialog is closed and then reopened. This approach makes impossible to keep
+ * dialog data inside dialog class, because the dialog will be disposed.
+ * </p>
+ * <p>
+ * To overcome this issue, a {@link Map} dialogState is introduced, which holds
+ * the actual state (and configuration) of the dialog. This map is passed to all
+ * dialog subcomponents.
+ * </p>
+ * <p>
+ * Dialog state variables are defined in {@link IStatusDialogConstants}.
+ * </p>
+ * 
+ * @since 3.6
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class WorkbenchStatusDialogManagerImpl {
+
+	static final QualifiedName HINT = new QualifiedName(
+			IStatusAdapterConstants.PROPERTY_PREFIX, "hint"); //$NON-NLS-1$
+
+	private final class StatusDialogDisposeListener implements DisposeListener {
+
+		public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) {
+			cleanUp();
+		}
+	}
+
+	private DisposeListener disposeListener = new StatusDialogDisposeListener();
+
+	/**
+	 * This field stores the real dialog that appears to the user.
+	 */
+	private InternalDialog dialog;
+
+	/**
+	 * This variable holds the real state of the dialog.
+	 */
+	private Map dialogState = new HashMap();
+
+	/**
+	 * Returns whether the given StatusAdapter object should be displayed.
+	 * 
+	 * @param statusAdapter
+	 *            a status object
+	 * @return <code>true</code> if the given status should be displayed, and
+	 *         <code>false</code> otherwise
+	 * @see org.eclipse.core.runtime.IStatus#matches(int)
+	 */
+	public boolean shouldAccept(StatusAdapter statusAdapter) {
+		IStatus status = statusAdapter.getStatus();
+		IStatus[] children = status.getChildren();
+		int mask = ((Integer) dialogState.get(IStatusDialogConstants.MASK))
+				.intValue();
+		boolean handleOKStatuses = ((Boolean) dialogState
+				.get(IStatusDialogConstants.HANDLE_OK_STATUSES)).booleanValue();
+		if (children == null || children.length == 0) {
+			return status.matches(mask) || (handleOKStatuses && status.isOK());
+		}
+		for (int i = 0; i < children.length; i++) {
+			if (children[i].matches(mask)) {
+				return true;
+			}
+		}
+		if (handleOKStatuses && status.isOK()) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * Creates workbench status dialog.
+	 * 
+	 * @param displayMask
+	 *            the mask used to filter the handled <code>StatusAdapter</code>
+	 *            objects, the mask is a logical sum of status severities
+	 * @param dialogTitle
+	 *            the title of the dialog. If null, than default will be used.
+	 */
+	public WorkbenchStatusDialogManagerImpl(int displayMask, String dialogTitle) {
+
+		Assert
+				.isNotNull(Display.getCurrent(),
+						"WorkbenchStatusDialogManager must be instantiated in UI thread"); //$NON-NLS-1$
+
+		dialogState = initDialogState(dialogState, displayMask, dialogTitle);
+	}
+
+	/**
+	 * This method creates the initial state of the dialog.
+	 * 
+	 * @param dialogState
+	 *            - the map to fill in.
+	 * @param displayMask
+	 *            - the mask suggesting which statuses should be displayed
+	 * @param dialogTitle
+	 *            - the dialog title.
+	 * @return populated dialogState
+	 */
+	public Map initDialogState(Map dialogState, int displayMask, String dialogTitle) {
+		dialogState.put(IStatusDialogConstants.MASK, new Integer(displayMask));
+		dialogState.put(IStatusDialogConstants.TITLE,
+				dialogTitle == null ? JFaceResources
+						.getString("Problem_Occurred") : //$NON-NLS-1$
+						dialogTitle);
+		dialogState.put(IStatusDialogConstants.HANDLE_OK_STATUSES,
+				Boolean.FALSE);
+
+		dialogState.put(IStatusDialogConstants.SHOW_SUPPORT, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.ENABLE_DEFAULT_SUPPORT_AREA,
+				Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.DETAILS_OPENED, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.HIDE_SUPPORT_BUTTON,
+				Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.STATUS_ADAPTERS, Collections
+				.synchronizedSet(new HashSet()));
+		dialogState.put(IStatusDialogConstants.STATUS_MODALS, new HashMap());
+		dialogState.put(IStatusDialogConstants.LABEL_PROVIDER, new LabelProviderWrapper(
+				dialogState));
+		dialogState.put(IStatusDialogConstants.MODALITY_SWITCH, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.ANIMATION, Boolean.TRUE);
+		return dialogState;
+	}
+
+	/**
+	 * <p>
+	 * Adds a new {@link StatusAdapter} to the status adapters list in the
+	 * dialog.
+	 * </p>
+	 * <p>
+	 * If the dialog is already visible, the status adapter will be shown
+	 * immediately. Otherwise, the dialog with the added status adapter will
+	 * show up, if all conditions below are false.
+	 * <ul>
+	 * <li>the status adapter has
+	 * {@link IProgressConstants#NO_IMMEDIATE_ERROR_PROMPT_PROPERTY} set to true</li>
+	 * </ul>
+	 * </p>
+	 * <p>
+	 * All not shown status adapters will be displayed as soon as the dialog
+	 * shows up.
+	 * </p>
+	 * 
+	 * @param modal
+	 *            <code>true</code> if the dialog should be modal,
+	 *            <code>false</code> otherwise
+	 * @param statusAdapter
+	 *            the status adapter
+	 */
+	public void addStatusAdapter(final StatusAdapter statusAdapter,
+			final boolean modal) {
+		if (ErrorDialog.AUTOMATED_MODE == true) {
+			return;
+		}
+		try {
+			doAddStatusAdapter(statusAdapter, modal);
+		} catch (Exception e) {
+			// if dialog is open, dispose it (and all child controls)
+			if (!isDialogClosed()) {
+				dialog.getShell().dispose();
+			}
+			// reset the state
+			cleanUp();
+			// log original problem
+			// TODO: check if is it possible to discover duplicates
+			WorkbenchPlugin.log(statusAdapter.getStatus());
+			// log the problem with status handling
+			WorkbenchPlugin.log(e);
+			e.printStackTrace();
+		}
+	}
+
+	private boolean isDialogClosed() {
+		return dialog == null || dialog.getShell() == null
+				|| dialog.getShell().isDisposed();
+	}
+
+	private void cleanUp() {
+		dialog = null;
+		getErrors().clear();
+		getModals().clear();
+		dialogState.put(IStatusDialogConstants.DETAILS_OPENED, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.TRAY_OPENED, Boolean.FALSE);
+		dialogState.put(IStatusDialogConstants.MODALITY_SWITCH, Boolean.FALSE);
+	}
+
+	private void doAddStatusAdapter(final StatusAdapter statusAdapter,
+			final boolean modal) {
+
+		if (!PlatformUI.isWorkbenchRunning()) {
+			// we are shutting down, so just log
+			WorkbenchPlugin.log(statusAdapter.getStatus());
+			return;
+		}
+		
+		// if statusAdapter does not match the mask, ignore it
+		if (!shouldAccept(statusAdapter)) {
+			return;
+		}
+
+		// Add the error in the UI thread to ensure thread safety in the
+		// dialog
+		if (isDialogClosed()) {
+
+			getErrors().add(statusAdapter);
+			getModals().put(statusAdapter, new Boolean(modal));
+			// Delay prompting if the status adapter property is set
+			if (shouldPrompt(statusAdapter)) {
+				// notify all interested parties that status adapters will be
+				// handled
+				StatusManager.getManager().fireNotification(
+						INotificationTypes.HANDLED,
+						(StatusAdapter[]) getErrors()
+								.toArray(new StatusAdapter[] {}));
+				
+				if (dialog == null) {
+					setSelectedStatusAdapter(statusAdapter);
+					dialog = new InternalDialog(dialogState, shouldBeModal());
+					dialog.create();
+					dialog.getShell().addDisposeListener(disposeListener);
+					boolean showSupport = ((Boolean) dialogState
+							.get(IStatusDialogConstants.SHOW_SUPPORT))
+							.booleanValue();
+					if (showSupport) {
+						dialog.openTray();
+						dialog.getShell().setLocation(
+								dialog.getInitialLocation(dialog.getShell().getSize()));
+					}
+					dialog.open();
+				}
+				dialog.refresh();
+				dialog.refreshDialogSize();
+			}
+
+		} else {
+			StatusManager.getManager().fireNotification(
+					INotificationTypes.HANDLED,
+					new StatusAdapter[] { statusAdapter });
+			if (statusAdapter
+					.getProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY) != null) {
+				statusAdapter.setProperty(
+						IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY,
+						Boolean.FALSE);
+			}
+			openStatusDialog(modal, statusAdapter);
+		}
+	}
+
+	/**
+	 * Gets a collection of status adapters that were passed to the dialog.
+	 * 
+	 * @return collection of {@link StatusAdapter} objects
+	 */
+	public Collection getStatusAdapters() {
+		return Collections.unmodifiableCollection(getErrors());
+	}
+
+	/**
+	 * Opens status dialog with particular statusAdapter selected.
+	 * 
+	 * @param modal
+	 *            decides if window is modal or not.
+	 * @param statusAdapter
+	 *            status adapter to be selected.
+	 */
+	private void openStatusDialog(final boolean modal,
+			final StatusAdapter statusAdapter) {
+		getErrors().add(statusAdapter);
+		getModals().put(statusAdapter, new Boolean(modal));
+		boolean shouldBeModal = shouldBeModal();
+		if (shouldBeModal ^ dialog.isModal()) {
+			dialog.getShell().removeDisposeListener(disposeListener);
+			dialogState.put(IStatusDialogConstants.MODALITY_SWITCH, Boolean.TRUE);
+			dialog.close();
+			dialog = new InternalDialog(dialogState, modal);
+			dialog.open();
+			dialog.getShell().addDisposeListener(disposeListener);
+			dialogState.put(IStatusDialogConstants.MODALITY_SWITCH, Boolean.FALSE);
+		}
+		dialog.refresh();
+	}
+
+	/**
+	 * Sets current status adapter.
+	 * 
+	 * @param statusAdapter
+	 *            The statusAdapter to set.
+	 */
+	public void setSelectedStatusAdapter(StatusAdapter statusAdapter) {
+		dialogState.put(IStatusDialogConstants.CURRENT_STATUS_ADAPTER,
+				statusAdapter);
+	}
+
+	/**
+	 * Sets new label provider for the status list. This label provider is used
+	 * also to display the second message on the dialog if only one status is
+	 * available.
+	 * 
+	 * <p>
+	 * This method is no longer recommended to use as it is impossible to
+	 * achieve consistent behavior after changing only one label provider.
+	 * </p>
+	 * 
+	 * @deprecated As of 3.5 {@link #setMessageDecorator} is recommended. 
+	 * 
+	 * @param labelProvider
+	 *            a label provider to be used when displaying status adapters.
+	 */
+	public void setStatusListLabelProvider(ITableLabelProvider labelProvider) {
+		Assert.isLegal(labelProvider != null, "Label Provider cannot be null"); //$NON-NLS-1$
+		dialogState.put(IStatusDialogConstants.CUSTOM_LABEL_PROVIDER,
+				labelProvider);
+	}
+
+	/**
+	 * Decides if dialog should be modal. Dialog will be modal if any of the
+	 * statuses contained by StatusAdapters had been reported with
+	 * {@link StatusManager#BLOCK} flag.
+	 * 
+	 * @return true if any StatusHandler should be displayed in modal window
+	 */
+	public boolean shouldBeModal() {
+		Map modals = (Map) dialogState
+				.get(IStatusDialogConstants.STATUS_MODALS);
+		for (Iterator it = modals.keySet().iterator(); it.hasNext();) {
+			Object o = it.next();
+			Object value = modals.get(o);
+			if (value instanceof Boolean) {
+				Boolean b = (Boolean) value;
+				if (b.booleanValue()) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Checks if the user should be prompted immediately about
+	 * {@link StatusAdapter}
+	 * 
+	 * @param statusAdapter
+	 *            to be checked.
+	 * @return true if the statusAdapter should be prompted, false otherwise.
+	 */
+	public boolean shouldPrompt(final StatusAdapter statusAdapter) {
+		Object noPromptProperty = statusAdapter
+				.getProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY);
+
+		boolean prompt = true;
+		if (noPromptProperty instanceof Boolean) {
+			prompt = !((Boolean) noPromptProperty).booleanValue();
+		}
+		return prompt;
+	}
+
+	/**
+	 * Gets the shell of the managed dialog.
+	 * 
+	 * @return Shell or null
+	 * 
+	 */
+	public Shell getShell() {
+		if (this.dialog == null)
+			return null;
+		return this.dialog.getShell();
+	}
+
+	/**
+	 * <p>
+	 * This methods sets up the decorator, which is used to modify displayed
+	 * strings extracted from StatusAdapter. The decorator should be used to
+	 * remove technical codes from the dialog, f.e. following message
+	 * "<i>ERR2008 Invalid password</i>" can be translated into
+	 * "<i>Invalid password</i>".
+	 * </p>
+	 * <p>
+	 * The decorator will be applied only to messages extracted from
+	 * StatusAdapter (predefined messages like
+	 * "This status has children statuses. See 'Details' for more information."
+	 * are not affected.
+	 * </p>
+	 * <p>
+	 * This method should not be used together with
+	 * {@link #setStatusListLabelProvider(ITableLabelProvider)}.
+	 * </p>
+	 * 
+	 * @param decorator
+	 *            - the decorator to be set. Only
+	 *            {@link ILabelDecorator#decorateText(String, Object)} method
+	 *            will be used. This method should return <code>null</code> if
+	 *            and only if the first argument is null. StatusAdapter is
+	 *            passed as second parameter. Other methods should have default
+	 *            behavior as they may be used in future versions of the dialog.
+	 * @since 3.5
+	 */
+	public void setMessageDecorator(ILabelDecorator decorator){
+		dialogState.put(IStatusDialogConstants.DECORATOR, decorator);
+	}
+
+
+	/**
+	 * This method sets various properties on the manager.
+	 * 
+	 * @param key
+	 *            a key of the property to be set.
+	 * @param value
+	 *            a value of the property to be set. The value must be of type
+	 *            specified by the property key. <code>null</code> should never
+	 *            be passed unless the property key javadoc allows for that.
+	 * @since 3.5
+	 */
+	public void setProperty(Object key, Object value) {
+		dialogState.put(key, value);
+	}
+
+	/**
+	 * This method gets various dialog properties.
+	 * 
+	 * @param key
+	 *            a key of the property to be get.
+	 * @return a value of the property. The value will be of type specified by
+	 *         the property key. <code>null</code> can be returned.
+	 * @since 3.5
+	 */
+	public Object getProperty(Object key){
+		if(key == IStatusDialogConstants.SHELL){
+			return getShell();
+		}
+		if (key == IStatusDialogConstants.MANAGER_IMPL) {
+			return this;
+		}
+		return dialogState.get(key);
+	}
+
+	/**
+	 * This method makes the dialog to be similar to the JFace ErrorDialog. The
+	 * dialog handles {@link StatusAdapter}s wrapping {@link IStatus} with
+	 * severity {@link IStatus#OK}, does not display the link to the error log,
+	 * does not display the link to the support area but always opens it.
+	 * 
+	 * @see ErrorDialog
+	 * @since 3.6
+	 */
+	public void enableErrorDialogCompatibility(){
+		setProperty(IStatusDialogConstants.ERRORLOG_LINK, Boolean.FALSE);
+		setProperty(IStatusDialogConstants.HANDLE_OK_STATUSES, Boolean.TRUE);
+		setProperty(IStatusDialogConstants.SHOW_SUPPORT, Boolean.TRUE);
+		setProperty(IStatusDialogConstants.HIDE_SUPPORT_BUTTON, Boolean.TRUE);
+	}
+
+	/**
+	 * This method is public for testing purposes only.
+	 * 
+	 * @return Returns the dialog.
+	 */
+	public InternalDialog getDialog() {
+		return dialog;
+	}
+
+	/**
+	 * This method is public for testing purposes only.
+	 * 
+	 * @param dialog
+	 *            The dialog to set.
+	 */
+	public void setDialog(InternalDialog dialog) {
+		this.dialog = dialog;
+	}
+
+	/**
+	 * This method is public for testing purposes only.
+	 * 
+	 * @return dialog state.
+	 */
+	public Map getDialogState() {
+		return dialogState;
+	}
+
+	/**
+	 * Utility method to access StatusAdapters
+	 * 
+	 * @return Collection of StatusAdapters
+	 */
+	private Collection getErrors() {
+		return (Collection) dialogState
+				.get(IStatusDialogConstants.STATUS_ADAPTERS);
+	}
+
+	/**
+	 * Utility method to access StatusAdapter modal flag.
+	 * 
+	 * @return Collection of StatusAdapter modal flag.
+	 */
+	private Map getModals() {
+		return (Map) dialogState
+				.get(IStatusDialogConstants.STATUS_MODALS);
+	}
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/ContributionInfoMessages.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/ContributionInfoMessages.java
new file mode 100644
index 0000000..fd2f3b9
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/ContributionInfoMessages.java	
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.testing;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 3.6
+ * 
+ */
+public class ContributionInfoMessages extends NLS {
+	private static final String BUNDLE_NAME = "org.eclipse.ui.internal.testing.messages";//$NON-NLS-1$
+
+
+	public static String ContributionInfo_Editor;
+	public static String ContributionInfo_View;
+	public static String ContributionInfo_ActionSet;
+	public static String ContributionInfo_Category;
+	public static String ContributionInfo_ColorDefinition;
+	public static String ContributionInfo_Wizard;
+	public static String ContributionInfo_Perspective;
+	public static String ContributionInfo_Page;
+	public static String ContributionInfo_EarlyStartupPlugin;
+	public static String ContributionInfo_Unknown;
+	public static String ContributionInfo_Job;
+	public static String ContributionInfo_TableItem;
+	public static String ContributionInfo_TreeItem;
+	public static String ContributionInfo_Window;
+	public static String ContributionInfo_LabelDecoration;
+	public static String ContributionInfo_ViewContent;
+
+	public static String ContributionInfo_ContributedBy;
+
+	static {
+		// load message values from bundle file
+		NLS.initializeMessages(BUNDLE_NAME, ContributionInfoMessages.class);
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/PluginContributionAdapterFactory.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/PluginContributionAdapterFactory.java
new file mode 100644
index 0000000..a96ab1a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/PluginContributionAdapterFactory.java	
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.internal.testing;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.ui.IPluginContribution;
+import org.eclipse.ui.internal.decorators.DecoratorDefinition;
+import org.eclipse.ui.internal.dialogs.WizardCollectionElement;
+import org.eclipse.ui.internal.dialogs.WorkbenchWizardElement;
+import org.eclipse.ui.internal.preferences.WorkbenchPreferenceExpressionNode;
+import org.eclipse.ui.internal.progress.JobInfo;
+import org.eclipse.ui.internal.registry.ActionSetDescriptor;
+import org.eclipse.ui.internal.registry.Category;
+import org.eclipse.ui.internal.registry.EditorDescriptor;
+import org.eclipse.ui.internal.registry.PerspectiveDescriptor;
+import org.eclipse.ui.internal.registry.ViewDescriptor;
+import org.eclipse.ui.internal.themes.ColorDefinition;
+import org.eclipse.ui.internal.themes.ThemeElementCategory;
+import org.eclipse.ui.testing.ContributionInfo;
+import org.eclipse.ui.views.IViewCategory;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * @since 3.6
+ * 
+ */
+public class PluginContributionAdapterFactory implements IAdapterFactory {
+
+	public Object getAdapter(Object adaptableObject, Class adapterType) {
+		if (adapterType != ContributionInfo.class) {
+			return null;
+		}
+		if (adaptableObject instanceof IPluginContribution) {
+			IPluginContribution contribution = (IPluginContribution) adaptableObject;
+
+			String elementType;
+
+			if (contribution instanceof EditorDescriptor) {
+				elementType = ContributionInfoMessages.ContributionInfo_Editor;
+			} else if (contribution instanceof ViewDescriptor) {
+				elementType = ContributionInfoMessages.ContributionInfo_View;
+			} else if (contribution instanceof ActionSetDescriptor) {
+				elementType = ContributionInfoMessages.ContributionInfo_ActionSet;
+			} else if (contribution instanceof Category) {
+				elementType = ContributionInfoMessages.ContributionInfo_Category;
+			} else if (contribution instanceof IViewCategory) {
+				elementType = ContributionInfoMessages.ContributionInfo_Category;
+			} else if (contribution instanceof ThemeElementCategory) {
+				elementType = ContributionInfoMessages.ContributionInfo_Category;
+			} else if (contribution instanceof WizardCollectionElement) {
+				elementType = ContributionInfoMessages.ContributionInfo_Category;
+			} else if (contribution instanceof ColorDefinition) {
+				elementType = ContributionInfoMessages.ContributionInfo_ColorDefinition;
+			} else if (contribution instanceof WorkbenchWizardElement) {
+				elementType = ContributionInfoMessages.ContributionInfo_Wizard;
+			} else if (contribution instanceof PerspectiveDescriptor) {
+				elementType = ContributionInfoMessages.ContributionInfo_Perspective;
+			} else if (contribution instanceof WorkbenchPreferenceExpressionNode) {
+				elementType = ContributionInfoMessages.ContributionInfo_Page;
+			} else if (contribution instanceof DecoratorDefinition) {
+				elementType = ContributionInfoMessages.ContributionInfo_LabelDecoration;
+			} else {
+				elementType = ContributionInfoMessages.ContributionInfo_Unknown;
+			}
+
+			return new ContributionInfo(contribution.getPluginId(), elementType, null);
+		}
+		if (adaptableObject instanceof JobInfo) {
+			JobInfo jobInfo = (JobInfo) adaptableObject;
+			Job job = jobInfo.getJob();
+			if (job != null) {
+				Bundle bundle = FrameworkUtil.getBundle(job.getClass());
+				if (bundle != null) {
+					return new ContributionInfo(bundle.getSymbolicName(),
+							ContributionInfoMessages.ContributionInfo_Job, null);
+				}
+			}
+		}
+		return null;
+	}
+
+	public Class[] getAdapterList() {
+		return new Class[] { ContributionInfo.class };
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/messages.properties b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/messages.properties
new file mode 100644
index 0000000..778c53a
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/testing/messages.properties	
@@ -0,0 +1,29 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+ContributionInfo_Unknown=unknown contribution
+ContributionInfo_Editor=editor
+ContributionInfo_View=view
+ContributionInfo_ActionSet=command group
+ContributionInfo_Category=category
+ContributionInfo_ColorDefinition=color definition
+ContributionInfo_Wizard=wizard
+ContributionInfo_Perspective=perspective
+ContributionInfo_Page=page
+ContributionInfo_EarlyStartupPlugin=early startup plug-in
+ContributionInfo_Job=job
+ContributionInfo_TableItem=table item
+ContributionInfo_TreeItem=tree item
+ContributionInfo_Window=window
+ContributionInfo_LabelDecoration=label decoration
+ContributionInfo_ViewContent=view content
+
+ContributionInfo_ContributedBy=This {0} has been contributed by: {1} 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java
index 0b02168..c4b1e5f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/util/Util.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,6 @@ import java.util.SortedSet;
 import java.util.StringTokenizer;
 import java.util.TreeMap;
 import java.util.TreeSet;
-
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
@@ -836,12 +835,19 @@ public final class Util {
 	}
 	
 	/**
-	 * Foundation replacement for String.replaceAll(*).
+	 * Foundation replacement for <code>String#replaceAll(String,
+	 * String)</code>, but <strong>without support for regular
+	 * expressions</strong>.
 	 * 
-	 * @param src the starting string.
-	 * @param find the string to find.
-	 * @param replacement the string to replace.
-	 * @return The new string.
+	 * @param src
+	 *            the original string
+	 * @param find
+	 *            the string to find
+	 * @param replacement
+	 *            the replacement string
+	 * @return the new string, with all occurrences of <code>find</code>
+	 *         replaced by <code>replacement</code> (not using regular
+	 *         expressions)
 	 * @since 3.3
 	 */
 	public static String replaceAll(String src, String find, String replacement) {
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesContentProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesContentProvider.java
new file mode 100644
index 0000000..7c020c0
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/PreferencesContentProvider.java	
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.ui.internal.wizards.preferences;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.ui.internal.preferences.PreferenceTransferElement;
+
+/**
+ * 
+ * @since 3.6
+ * @author Prakash G.R.
+ */
+public class PreferencesContentProvider implements ITreeContentProvider {
+
+	public Object[] getChildren(Object parentElement) {
+		return null;
+	}
+
+	public Object getParent(Object element) {
+		return null;
+	}
+
+	public boolean hasChildren(Object element) {
+		return false;
+	}
+
+	public Object[] getElements(Object inputElement) {
+		if (inputElement instanceof PreferenceTransferElement[])
+			return (PreferenceTransferElement[]) inputElement;
+		return null;
+	}
+
+	public void dispose() {
+
+	}
+
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+
+	}
+	
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesExportPage1.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesExportPage1.java
index e4889af..fa43c46 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesExportPage1.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesExportPage1.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
@@ -23,6 +22,8 @@ import org.eclipse.core.runtime.preferences.IPreferencesService;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.preferences.PreferenceTransferElement;
 
@@ -104,6 +105,19 @@ public class WizardPreferencesExportPage1 extends WizardPreferencesPage  {
 		createOptionsGroup(composite);
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.wizards.preferences.WizardPreferencesPage#
+	 * createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		PlatformUI.getWorkbench().getHelpSystem()
+				.setHelp(getControl(), IWorkbenchHelpContextIds.PREFERENCES_EXPORT_WIZARD_PAGE);
+
+	}
+
 	/**
 	 * Answer the string to display in self as the destination type
 	 * 
@@ -206,4 +220,14 @@ public class WizardPreferencesExportPage1 extends WizardPreferencesPage  {
 	protected String getInvalidDestinationMessage() {
 		return PreferencesMessages.WizardPreferencesExportPage1_noPrefFile;
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ui.internal.wizards.preferences.WizardPreferencesPage#
+	 * shouldSaveTransferAll()
+	 */
+	protected boolean shouldSaveTransferAll() {
+		return true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesImportPage1.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesImportPage1.java
index 14d19dc..08a27be 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesImportPage1.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesImportPage1.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.preferences.IExportedPreferences;
@@ -24,6 +23,8 @@ import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.preferences.PreferenceTransferElement;
 
@@ -52,6 +53,19 @@ public class WizardPreferencesImportPage1 extends WizardPreferencesPage {
         this("preferencesImportPage1");//$NON-NLS-1$
     }
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.ui.internal.wizards.preferences.WizardPreferencesPage#
+	 * createControl(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createControl(Composite parent) {
+		super.createControl(parent);
+		PlatformUI.getWorkbench().getHelpSystem()
+				.setHelp(getControl(), IWorkbenchHelpContextIds.PREFERENCES_IMPORT_WIZARD_PAGE);
+
+	}
+
     /* (non-Javadoc)
      * @see org.eclipse.ui.internal.wizards.preferences.WizardPreferencesPage#getAllButtonText()
      */
@@ -134,10 +148,12 @@ public class WizardPreferencesImportPage1 extends WizardPreferencesPage {
     protected void setPreferenceTransfers() {
     	super.setPreferenceTransfers();	
     	
-		if(validFromFile() && (transfersTable.getItemCount() == 0)) {
-			text.setText(PreferencesMessages.WizardPreferences_noSpecificPreferenceDescription);
+		if (validFromFile()
+				&& (transfersTree.getViewer().getTree().getItemCount() == 0)) {
+			descText
+					.setText(PreferencesMessages.WizardPreferences_noSpecificPreferenceDescription);
 		} else {
-			text.setText(""); //$NON-NLS-1$
+			descText.setText(""); //$NON-NLS-1$
 		}
 	}
   
@@ -246,4 +262,14 @@ public class WizardPreferencesImportPage1 extends WizardPreferencesPage {
 	protected String getInvalidDestinationMessage() {
 		return PreferencesMessages.WizardPreferencesImportPage1_invalidPrefFile;
 	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seeorg.eclipse.ui.internal.wizards.preferences.WizardPreferencesPage#
+	 * shouldSaveTransferAll()
+	 */
+	protected boolean shouldSaveTransferAll() {
+		return false;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java
index c401b15..aa9ea05 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/wizards/preferences/WizardPreferencesPage.java	
@@ -11,13 +11,9 @@
 package org.eclipse.ui.internal.wizards.preferences;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.preferences.ConfigurationScope;
@@ -27,7 +23,14 @@ import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
@@ -47,14 +50,15 @@ import org.eclipse.swt.widgets.Group;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.dialogs.FilteredTree;
 import org.eclipse.ui.dialogs.IOverwriteQuery;
+import org.eclipse.ui.dialogs.PatternFilter;
 import org.eclipse.ui.internal.WorkbenchPlugin;
 import org.eclipse.ui.internal.preferences.PreferenceTransferElement;
 import org.eclipse.ui.internal.preferences.PreferenceTransferManager;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
 
 /**
  * Base class for preference export/import pages.
@@ -67,23 +71,26 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	// widgets
 	protected Combo destinationNameField;
 
-	// constants
 	private Button destinationBrowseButton;
 
 	private Button overwriteExistingFilesCheckbox;
 
-	protected Table transfersTable;
+	protected FilteredTree transfersTree;
 	
-	protected Text text;
+	protected Text descText;
 
 	private Composite buttonComposite;
 
-	private Button allButton;
-
-	protected Button chooseImportsButton;
+	private Button transferAllButton;
 
 	private Group group;
 
+	private CheckboxTreeViewer viewer;
+
+	private Button selectAllButton;
+
+	private Button deselectAllButton;
+
 	// dialog store id constants
 	private static final String STORE_DESTINATION_NAMES_ID = "WizardPreferencesExportPage1.STORE_DESTINATION_NAMES_ID";//$NON-NLS-1$
 
@@ -91,7 +98,7 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 
 	private static final String TRANSFER_ALL_PREFERENCES_ID = "WizardPreferencesExportPage1.EXPORT_ALL_PREFERENCES_ID"; //$NON-NLS-1$
 
-	private Hashtable imageTable;
+	private static final String TRANSFER_PREFERENCES_NAMES_ID = "WizardPreferencesExportPage1.TRANSFER_PREFERENCES_NAMES_ID"; //$NON-NLS-1$
 
 	private PreferenceTransferElement[] transfers;
 
@@ -99,7 +106,8 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 
 	private static final String STORE_DESTINATION_ID = null;
 
-    protected static final int COMBO_HISTORY_LENGTH = 5;
+	protected static final int COMBO_HISTORY_LENGTH = 5;
+
     
 	/**
 	 * @param pageName
@@ -138,8 +146,7 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 		Button button = new Button(parent, SWT.PUSH);
 		button.setFont(parent.getFont());
 
-		GridData buttonData = new GridData(GridData.FILL_HORIZONTAL);
-		button.setLayoutData(buttonData);
+		setButtonLayoutData(button);
 
 		button.setData(new Integer(id));
 		button.setText(label);
@@ -176,6 +183,7 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 		
 
 		createTransferArea(composite);
+		setPreferenceTransfers();
 
 		restoreWidgetValues();
 		// updateWidgetEnablements();
@@ -186,7 +194,6 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 			setPageComplete(false);
 		}
 
-		setPreferenceTransfers();
 		setControl(composite);
 
 		giveFocusToDestination();
@@ -227,16 +234,9 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 		return !(file.getPath().length() <= 0 || file.isDirectory());
 	}
 
-	/**
-	 * 
-	 */
 	protected void setPreferenceTransfers() {
 		PreferenceTransferElement[] transfers = getTransfers();
-		transfersTable.removeAll();
-		for (int i = 0; i < transfers.length; i++) {
-			PreferenceTransferElement element = transfers[i];
-			createItem(element, transfersTable);
-		}
+		viewer.setInput(transfers);
 	}
 
 	/*
@@ -250,110 +250,98 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	}
 
 	/**
-	 * @param element
-	 * @param table
-	 */
-	private void createItem(PreferenceTransferElement element, Table table) {
-		TableItem item = new TableItem(table, SWT.CHECK);
-		item.setText(element.getName());
-		item.setData(element);
-		ImageDescriptor descriptor = element.getImageDescriptor();
-		Image image = null;
-		if (descriptor != null) {
-			Hashtable images = getImageTable();
-			image = (Image) images.get(descriptor);
-			if (image == null) {
-				image = descriptor.createImage();
-				images.put(descriptor, image);
-			}
-			item.setImage(image);
-		}
-
-	}
-
-	/**
-	 * @return <code>Hashtable</code> the table of images
-	 */
-	private Hashtable getImageTable() {
-		if (imageTable == null) {
-			imageTable = new Hashtable(10);
-		}
-		return imageTable;
-	}
-
-	/**
 	 * @param composite
 	 */
 	protected void createTransfersList(Composite composite) {
 
-		allButton = new Button(composite, SWT.RADIO);
-		allButton.setText(getAllButtonText());
-		
-		chooseImportsButton = new Button(composite, SWT.RADIO);
-		chooseImportsButton.setText(getChooseButtonText());
+		transferAllButton = new Button(composite, SWT.CHECK);
+		transferAllButton.setText(getAllButtonText());
 		
 		group = new Group(composite, SWT.NONE);
-		group.setText(PreferencesMessages.WizardPreferencesExportPage1_preferences);
-		GridData data = new GridData(GridData.FILL_BOTH);
-		data.horizontalSpan = 2;
-		group.setLayoutData(data);
+		GridData groupData = new GridData(GridData.FILL_BOTH);
+		groupData.horizontalSpan = 2;
+		groupData.horizontalIndent = IDialogConstants.INDENT;
+		Object compositeLayout = composite.getLayout();
+		if (compositeLayout instanceof GridLayout) {
+			groupData.horizontalIndent -= ((GridLayout) compositeLayout).marginWidth;
+			groupData.horizontalIndent -= ((GridLayout) compositeLayout).marginLeft;
+		}
+		group.setLayoutData(groupData);
 
 		GridLayout layout = new GridLayout();
 		group.setLayout(layout);
 		
-		transfersTable = new Table(group, SWT.CHECK | SWT.BORDER);
-		transfersTable.setLayoutData(new GridData(GridData.FILL_BOTH));
-		
+		transfersTree = createFilteredTree(group);
+
+		transfersTree.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+		viewer = (CheckboxTreeViewer) transfersTree.getViewer();
+		viewer.setContentProvider(new PreferencesContentProvider());
+		viewer.setLabelProvider(new WorkbenchLabelProvider());
+
 		Label description = new Label(group, SWT.NONE);
 		description.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		description.setText(PreferencesMessages.WizardPreferences_description);
 		
-		text = new Text(group, SWT.V_SCROLL | SWT.READ_ONLY
+		descText = new Text(group, SWT.V_SCROLL | SWT.READ_ONLY
 				| SWT.BORDER | SWT.WRAP);
-		text.setLayoutData(new GridData(GridData.FILL_BOTH));
+		GridData descriptionData = new GridData(GridData.FILL_BOTH);
+		descriptionData.heightHint = convertHeightInCharsToPixels(3);
+		descText.setLayoutData(descriptionData);
 		
-		SelectionListener selection = new SelectionListener() {
-
+		transferAllButton.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				// Selecting an item in the list forces 
-				// the radio buttons to get selected 
-				if (e.widget == transfersTable) {
-					updateState(e);
-					updateDescription();
+				if (transferAllButton.getSelection()) {
+					viewer.setAllChecked(false);
 				}
+				updateEnablement();
 				updatePageCompletion();
 			}
+		});
 
-			private void updateState(SelectionEvent e) {
-				if (((TableItem)e.item).getChecked()) {
-					allButton.setSelection(false);
-					chooseImportsButton.setSelection(true);
-				}
-			}
+		viewer.addSelectionChangedListener(new ISelectionChangedListener() {
 
-			public void widgetDefaultSelected(SelectionEvent e) {
-				widgetSelected(e);
+			public void selectionChanged(SelectionChangedEvent event) {
+				updateDescription();
 			}
+		});
 
-			private void updateDescription() {
-				if (transfersTable.getSelectionCount() > 0) {
-					TableItem item = transfersTable.getSelection()[0];
-					text.setText(((PreferenceTransferElement) item.getData())
-							.getDescription());
-				} else {
-					text.setText(""); //$NON-NLS-1$
-				}
+		viewer.addCheckStateListener(new ICheckStateListener() {
+			public void checkStateChanged(CheckStateChangedEvent event) {
+				transferAllButton.setSelection(false);
+				updateEnablement();
+				updatePageCompletion();
 			}
-		};
+		});
 
-		transfersTable.addSelectionListener(selection);
-		chooseImportsButton.addSelectionListener(selection);
-		allButton.addSelectionListener(selection);
-		
 		addSelectionButtons(group);
 
 	}
 
+	protected void updateDescription() {
+		ISelection selection = viewer.getSelection();
+		String desc = ""; //$NON-NLS-1$
+		if (!selection.isEmpty()) {
+			Object element = ((IStructuredSelection) selection)
+					.getFirstElement();
+			if ((element instanceof PreferenceTransferElement)) {
+				desc = ((PreferenceTransferElement) element).getDescription();
+			}
+		}
+		descText.setText(desc);
+	}
+
+	private FilteredTree createFilteredTree(Group group) {
+		int style = SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
+		FilteredTree transfersTree = new FilteredTree(group, style,
+				new PatternFilter(), true) {
+			protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
+				return new CheckboxTreeViewer(parent, style);
+			}
+		};
+		return transfersTree;
+	}
+
 	protected abstract String getChooseButtonText();
 
 	protected abstract String getAllButtonText();
@@ -375,42 +363,38 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 		buttonComposite.setLayoutData(data);
 		buttonComposite.setFont(parentFont);
 		
-		Button selectButton = createButton(buttonComposite,
+		selectAllButton = createButton(buttonComposite,
 				IDialogConstants.SELECT_ALL_ID,
 				PreferencesMessages.SelectionDialog_selectLabel, false);
 
 		SelectionListener listener = new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				setAllChecked(true);
+				viewer.setAllChecked(true);
 				updatePageCompletion();
 			}
 		};
-		selectButton.addSelectionListener(listener);
-		selectButton.setFont(parentFont);
+		selectAllButton.addSelectionListener(listener);
+		selectAllButton.setFont(parentFont);
 		
-		Button deselectButton = createButton(buttonComposite,
+		deselectAllButton = createButton(buttonComposite,
 				IDialogConstants.DESELECT_ALL_ID,
 				PreferencesMessages.SelectionDialog_deselectLabel, false);
 
 		listener = new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
-				setAllChecked(false);
+				viewer.setAllChecked(false);
 				updatePageCompletion();
 			}
 		};
-		deselectButton.addSelectionListener(listener);
-		deselectButton.setFont(parentFont);
+		deselectAllButton.addSelectionListener(listener);
+		deselectAllButton.setFont(parentFont);
 	}
 
 	/**
 	 * @param bool
 	 */
 	protected void setAllChecked(boolean bool) {
-		TableItem[] items = transfersTable.getItems();
-		for (int i = 0; i < items.length; i++) {
-			TableItem item = items[i];
-			item.setChecked(bool);
-		}
+		transferAllButton.setSelection(false);
 	}
 
 	/**
@@ -445,8 +429,7 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 				SWT.PUSH);
 		destinationBrowseButton
 				.setText(PreferencesMessages.PreferencesExport_browse);
-		destinationBrowseButton.setLayoutData(new GridData(
-				GridData.HORIZONTAL_ALIGN_FILL));
+		setButtonLayoutData(destinationBrowseButton);
 		destinationBrowseButton.addListener(SWT.Selection, this);
 		
 		new Label(parent, SWT.NONE); // vertical spacer
@@ -560,8 +543,43 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	 * @see org.eclipse.ui.dialogs.WizardDataTransferPage#saveWidgetValues()
 	 */
 	protected void saveWidgetValues() {
-		// allow subclasses to save values
-		internalSaveWidgetValues();
+
+		IDialogSettings settings = getDialogSettings();
+		if (settings != null) {
+			String[] directoryNames = settings
+					.getArray(STORE_DESTINATION_NAMES_ID);
+			if (directoryNames == null) {
+				directoryNames = new String[0];
+			}
+		
+			directoryNames = addToHistory(directoryNames, getDestinationValue());
+			settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);
+			String current = getDestinationValue();
+			if (current != null && !current.equals("")) { //$NON-NLS-1$
+				settings.put(STORE_DESTINATION_ID, current);
+			}
+			// options
+			if (overwriteExistingFilesCheckbox != null) {
+				settings.put(STORE_OVERWRITE_EXISTING_FILES_ID,
+						overwriteExistingFilesCheckbox.getSelection());
+			}
+
+			if (shouldSaveTransferAll()) {
+
+				boolean transferAll = getTransferAll();
+				settings.put(TRANSFER_ALL_PREFERENCES_ID, transferAll);
+				if (!transferAll) {
+					Object[] elements = viewer.getCheckedElements();
+					String[] preferenceIds = new String[elements.length];
+					for (int i = 0; i < elements.length; i++) {
+						PreferenceTransferElement element = (PreferenceTransferElement) elements[i];
+						preferenceIds[i] = element.getID();
+					}
+					settings.put(TRANSFER_PREFERENCES_NAMES_ID, preferenceIds);
+				}
+			}
+		
+		}
 	}
 
 	/**
@@ -635,22 +653,10 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	 * @return the list of transfer elements
 	 */
 	protected PreferenceTransferElement[] getPreferenceTransferElements() {
-		PreferenceTransferElement[] transferElements;
-		// export selected transfer types
-		TableItem[] items = transfersTable.getItems();
-		List transferList = new ArrayList();
-		for (int i = 0; i < items.length; i++) {
-			TableItem item = items[i];
-			if (item.getChecked()) {
-				transferList.add(item.getData());
-			}
-		}
-		transferElements = new PreferenceTransferElement[transferList.size()];
-		int i = 0;
-		for (Iterator iter = transferList.iterator(); iter.hasNext();) {
-			transferElements[i] = (PreferenceTransferElement) iter.next();
-			i++;
-		}
+		Object[] checkedElements = viewer.getCheckedElements();
+		PreferenceTransferElement[] transferElements = new PreferenceTransferElement[checkedElements.length];
+		System.arraycopy(checkedElements, 0, transferElements, 0,
+				checkedElements.length);
 		return transferElements;
 	}
 
@@ -717,18 +723,15 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	 *         options group
 	 */
 	protected boolean validateOptionsGroup() {
-		if (chooseImportsButton.getSelection()) {
-			TableItem[] items = transfersTable.getItems();
-			for (int i = 0; i < items.length; i++) {
-				TableItem item = items[i];
-				if (item.getChecked()) {
-					return true;
-				}
+		boolean isValid = true;
+		if (!getTransferAll()) {
+			Object[] checkedElements = viewer.getCheckedElements();
+			if (checkedElements == null || checkedElements.length == 0) {
+				currentMessage = getNoOptionsMessage();
+				isValid = false;
 			}
-			currentMessage = getNoOptionsMessage();
-			return false;
 		}
-		return true;
+		return isValid;
 	}
 
 	/**
@@ -819,36 +822,6 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	}
 
 	/**
-	 * Hook method for saving widget values for restoration by the next instance
-	 * of this class.
-	 */
-	protected void internalSaveWidgetValues() {
-		// update directory names history
-		IDialogSettings settings = getDialogSettings();
-		if (settings != null) {
-			String[] directoryNames = settings
-					.getArray(STORE_DESTINATION_NAMES_ID);
-			if (directoryNames == null) {
-				directoryNames = new String[0];
-			}
-
-			directoryNames = addToHistory(directoryNames, getDestinationValue());
-			settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);
-			String current = getDestinationValue();
-			if (current != null && !current.equals("")) { //$NON-NLS-1$
-				settings.put(STORE_DESTINATION_ID, current);
-			}
-			// options
-			if (overwriteExistingFilesCheckbox != null) {
-				settings.put(STORE_OVERWRITE_EXISTING_FILES_ID,
-						overwriteExistingFilesCheckbox.getSelection());
-			}
-			settings.put(TRANSFER_ALL_PREFERENCES_ID, allButton.getSelection());
-
-		}
-	}
-
-	  /**
      * Adds an entry to a history, while taking care of duplicate history items
      * and excessively long histories.  The assumption is made that all histories
      * should be of length <code>WizardDataTransferPage.COMBO_HISTORY_LENGTH</code>.
@@ -888,8 +861,37 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	 * time this wizard was used to completion.
 	 */
 	protected void restoreWidgetValues() {
+
 		IDialogSettings settings = getDialogSettings();
-		boolean all = true;
+		if (shouldSaveTransferAll() && settings != null) {
+
+			boolean transferAll;
+			if (settings.get(TRANSFER_ALL_PREFERENCES_ID) == null)
+				transferAll = true;
+			else
+				transferAll = settings
+					.getBoolean(TRANSFER_ALL_PREFERENCES_ID);
+			transferAllButton.setSelection(transferAll);
+			if (!transferAll) {
+				String[] preferenceIds = settings
+						.getArray(TRANSFER_PREFERENCES_NAMES_ID);
+				if (preferenceIds != null) {
+					PreferenceTransferElement[] transfers = getTransfers();
+					for (int i = 0; i < transfers.length; i++) {
+						for (int j = 0; j < preferenceIds.length; j++) {
+							if (transfers[i].getID().equals(preferenceIds[j])) {
+								viewer.setChecked(transfers[i], true);
+								break;
+							}
+						}
+					}
+				}
+			}
+		} else {
+			transferAllButton.setSelection(true);
+		}
+		updateEnablement();
+
 		if (settings != null) {
 			String[] directoryNames = settings
 					.getArray(STORE_DESTINATION_NAMES_ID);
@@ -909,23 +911,18 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 					overwriteExistingFilesCheckbox.setSelection(settings
 							.getBoolean(STORE_OVERWRITE_EXISTING_FILES_ID));
 				}
-				all = settings.getBoolean(TRANSFER_ALL_PREFERENCES_ID);
 			}
 		}
-		if (all) {
-			allButton.setSelection(true);
-		} else {
-			chooseImportsButton.setSelection(true);
-		}
-
 	}
 
+	protected abstract boolean shouldSaveTransferAll();
+
 	private boolean getOverwriteExisting() {
 		return overwriteExistingFilesCheckbox.getSelection();
 	}
 
 	private boolean getTransferAll() {
-		return allButton.getSelection();
+		return transferAllButton.getSelection();
 	}
 
 	/**
@@ -946,14 +943,6 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 	 */
 	public void dispose() {
 		super.dispose();
-		if (imageTable == null) {
-			return;
-		}
-
-		for (Iterator i = imageTable.values().iterator(); i.hasNext();) {
-			((Image) i.next()).dispose();
-		}
-		imageTable = null;
 		transfers = null;
 	}
 
@@ -1017,4 +1006,10 @@ public abstract class WizardPreferencesPage extends WizardPage implements
 		return dialog.getReturnCode() < 0 ? CANCEL : response[dialog
 				.getReturnCode()];
 	}
+
+	private void updateEnablement() {
+		boolean transferAll = getTransferAll();
+		selectAllButton.setEnabled(!transferAll);
+		deselectAllButton.setEnabled(!transferAll);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
index e15c79b..30a201a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java	
@@ -11,11 +11,11 @@
 package org.eclipse.ui.menus;
 
 import java.util.Map;
-
 import org.eclipse.core.commands.Command;
 import org.eclipse.core.commands.CommandEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.ICommandListener;
+import org.eclipse.core.commands.IHandler;
 import org.eclipse.core.commands.NotEnabledException;
 import org.eclipse.core.commands.NotHandledException;
 import org.eclipse.core.commands.ParameterizedCommand;
@@ -53,9 +53,11 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.commands.ICommandImageService;
 import org.eclipse.ui.commands.ICommandService;
 import org.eclipse.ui.commands.IElementReference;
+import org.eclipse.ui.commands.IElementUpdater;
 import org.eclipse.ui.handlers.IHandlerService;
 import org.eclipse.ui.help.IWorkbenchHelpSystem;
 import org.eclipse.ui.internal.WorkbenchPlugin;
+import org.eclipse.ui.internal.handlers.HandlerProxy;
 import org.eclipse.ui.internal.menus.CommandMessages;
 import org.eclipse.ui.internal.misc.StatusUtil;
 import org.eclipse.ui.internal.services.IWorkbenchLocationService;
@@ -159,6 +161,15 @@ public class CommandContributionItem extends ContributionItem {
 
 	private Display display;
 
+	// items contributed
+	private String contributedLabel;
+
+	private ImageDescriptor contributedIcon;
+
+	private ImageDescriptor contributedDisabledIcon;
+
+	private ImageDescriptor contributedHoverIcon;
+
 	/**
 	 * Create a CommandContributionItem to place in a ContributionManager.
 	 * 
@@ -170,6 +181,11 @@ public class CommandContributionItem extends ContributionItem {
 			CommandContributionItemParameter contributionParameters) {
 		super(contributionParameters.id);
 
+		contributedLabel = contributionParameters.label;
+		contributedIcon = contributionParameters.icon;
+		contributedDisabledIcon = contributionParameters.disabledIcon;
+		contributedHoverIcon = contributionParameters.hoverIcon;
+
 		this.icon = contributionParameters.icon;
 		this.disabledIcon = contributionParameters.disabledIcon;
 		this.hoverIcon = contributionParameters.hoverIcon;
@@ -316,6 +332,13 @@ public class CommandContributionItem extends ContributionItem {
 					ICommandImageService.TYPE_DISABLED, iconStyle);
 			hoverIcon = service.getImageDescriptor(command.getId(),
 					ICommandImageService.TYPE_HOVER, iconStyle);
+
+			if (contributedIcon == null)
+				contributedIcon = icon;
+			if (contributedDisabledIcon == null)
+				contributedDisabledIcon = disabledIcon;
+			if (contributedHoverIcon == null)
+				contributedHoverIcon = hoverIcon;
 		}
 	}
 
@@ -348,6 +371,13 @@ public class CommandContributionItem extends ContributionItem {
 							parent.update(true);
 						}
 					}
+					IHandler handler = commandEvent.getCommand().getHandler();
+					if (shouldRestoreAppearance(handler)) {
+						label = contributedLabel;
+						icon = contributedIcon;
+						disabledIcon = contributedDisabledIcon;
+						hoverIcon = contributedHoverIcon;
+					}
 				}
 				if (commandEvent.getCommand().isDefined()) {
 					update(null);
@@ -361,13 +391,33 @@ public class CommandContributionItem extends ContributionItem {
 		}
 	}
 
+	private boolean shouldRestoreAppearance(IHandler handler) {
+
+		// if no handler or handler doesn't implement IElementUpdater,
+		// restore the contributed elements
+		if (handler == null)
+			return true;
+
+		if (!(handler instanceof IElementUpdater))
+			return true;
+
+		// special case, if its HandlerProxy, then check the actual handler
+		if (handler instanceof HandlerProxy) {
+			HandlerProxy handlerProxy = (HandlerProxy) handler;
+			IHandler actualHandler = handlerProxy.getHandler();
+			return shouldRestoreAppearance(actualHandler);
+		}
+		return false;
+	}
+
 	/**
 	 * Returns the ParameterizedCommand for this contribution.
 	 * <p>
-	 * <strong>NOTE:</strong> The returned object should be treated
-	 * as 'read-only', do <b>not</b> execute this instance or attempt
-	 * to modify its state.
+	 * <strong>NOTE:</strong> The returned object should be treated as
+	 * 'read-only', do <b>not</b> execute this instance or attempt to modify its
+	 * state.
 	 * </p>
+	 * 
 	 * @return The parameterized command for this contribution.
 	 * 
 	 * @since 3.5
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/ExtensionContributionFactory.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/ExtensionContributionFactory.java
index 24e724a..44b2170 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/ExtensionContributionFactory.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/ExtensionContributionFactory.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 
 package org.eclipse.ui.menus;
 
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IExecutableExtension;
 import org.eclipse.ui.internal.registry.IWorkbenchRegistryConstants;
@@ -69,9 +70,12 @@ public abstract class ExtensionContributionFactory extends
 	 * Clients who wish to implement their own {@link IExecutableExtension}
 	 * behaviour <strong>must</strong> invoke this method prior to any
 	 * customization they perform.
+	 * 
+	 * @throws CoreException
+	 *             so that a subclass may throw this
 	 */
 	public void setInitializationData(IConfigurationElement config,
-			String propertyName, Object data) {
+			String propertyName, Object data) throws CoreException {
 		locationURI = config
 				.getAttribute(IWorkbenchRegistryConstants.TAG_LOCATION_URI);
 		namespace = config.getNamespaceIdentifier();
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java
index 1c17de8..bd9d9a7 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/MenuUtil.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2008 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,8 @@ package org.eclipse.ui.menus;
  * Provides utilities and constants for use with the new menus API.
  * 
  * @since 3.3
- * 
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
  */
 public class MenuUtil {
 	/** Main Menu */
@@ -38,6 +39,33 @@ public class MenuUtil {
 	public final static String TRIM_STATUS = "toolbar:org.eclipse.ui.trim.status"; //$NON-NLS-1$
 
 	/**
+	 * Valid query attribute. Usage <b>menu:menu.id?before=contribution.id</b>.
+	 * 
+	 * @since 3.6
+	 */
+	public final static String QUERY_BEFORE = "before"; //$NON-NLS-1$
+
+	/**
+	 * Valid query attribute. Usage <b>menu:menu.id?after=contribution.id</b>.
+	 * 
+	 * @since 3.6
+	 */
+	public final static String QUERY_AFTER = "after"; //$NON-NLS-1$
+
+	/**
+	 * Valid query attribute. Usage <b>menu:menu.id?endof=contribution.id</b>.
+	 * <p>
+	 * This menu contribution will be placed at the end of the group defined by
+	 * <b>contribution.id</b> (usually right in front of the next group marker
+	 * or separator). Further contribution processing can still place other
+	 * contributions after this one.
+	 * </p>
+	 * 
+	 * @since 3.6
+	 */
+	public final static String QUERY_ENDOF = "endof"; //$NON-NLS-1$
+
+	/**
 	 * Contributions of targets to this location will be included with the show
 	 * in menu.
 	 * 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/WorkbenchWindowControlContribution.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/WorkbenchWindowControlContribution.java
index ca71217..c804d0f 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/WorkbenchWindowControlContribution.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/WorkbenchWindowControlContribution.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007 - 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,8 @@ package org.eclipse.ui.menus;
 
 import org.eclipse.jface.action.ControlContribution;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.internal.menus.InternalControlContribution;
 
@@ -82,4 +84,21 @@ public abstract class WorkbenchWindowControlContribution extends InternalControl
 		
 		return SWT.HORIZONTAL;
 	}
+
+	/**
+	 * Important: This method is *NOT* to be used/extended by clients. This is
+	 * for the internal use inside Workbench
+	 * 
+	 * @param parent
+	 *            the parent composite
+	 * @return newly created Control
+	 * @since 3.6
+	 * 
+	 * @noreference This method is not intended to be referenced by clients.
+	 * @nooverride This method is not intended to be re-implemented or extended
+	 *             by clients.
+	 */
+	public Control delegateCreateControl(Composite parent) {
+		return createControl(parent);
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/AbstractMultiEditor.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/AbstractMultiEditor.java
index 9e719a6..1d4ec6b 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/AbstractMultiEditor.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/AbstractMultiEditor.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.IPartListener2;
+import org.eclipse.ui.IPropertyListener;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartReference;
 import org.eclipse.ui.PartInitException;
@@ -42,13 +43,33 @@ public abstract class AbstractMultiEditor extends EditorPart {
 
 	private IPartListener2 propagationListener;
 
-    /**
-     * Constructor for TileEditor.
-     */
+	/**
+	 * Constructs an editor to contain other editors.
+	 */
     public AbstractMultiEditor() {
         super();
     }
 
+	/**
+	 * Handles a property change notification from a nested editor. The default
+	 * implementation simply forwards the change to listeners on this multi
+	 * editor by calling <code>firePropertyChange</code> with the same property
+	 * id. For example, if the dirty state of a nested editor changes (property
+	 * id <code>ISaveablePart.PROP_DIRTY</code>), this method handles it by
+	 * firing a property change event for <code>ISaveablePart.PROP_DIRTY</code>
+	 * to property listeners on this multi editor.
+	 * <p>
+	 * Subclasses may extend or reimplement this method.
+	 * </p>
+	 * 
+	 * @param propId
+	 *            the id of the property that changed
+	 * @since 3.6
+	 */
+	protected void handlePropertyChange(int propId) {
+		firePropertyChange(propId);
+	}
+
     /*
      * @see IEditorPart#doSave(IProgressMonitor)
      */
@@ -133,16 +154,27 @@ public abstract class AbstractMultiEditor extends EditorPart {
         return innerEditors;
     }
 
-    /**
-     * Set the inner editors.
-     * 
-     * Should not be called by clients.
-     * 
-     * @param children 
-     */
+	/**
+	 * Set the inner editors.
+	 * 
+	 * Should not be called by clients.
+	 * 
+	 * @param children
+	 *            the inner editors of this multi editor
+	 * @noreference This method is not intended to be referenced by clients.
+	 */
     public final void setChildren(IEditorPart[] children) {
         innerEditors = children;
         activeEditorIndex = 0;
+
+		for (int i = 0; i < children.length; i++) {
+			children[i].addPropertyListener( new IPropertyListener() {
+				public void propertyChanged(Object source, int propId) {
+					handlePropertyChange(propId);
+				}
+			});
+		}
+
         innerEditorsCreated();
     }
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java
index ea93d00..6548c7a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/EditorPart.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.ui.part;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
+
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorSite;
@@ -143,9 +144,8 @@ public abstract class EditorPart extends WorkbenchPart implements IEditorPart {
     public String getTitleToolTip() {
         if (editorInput == null) {
 			return super.getTitleToolTip();
-		} else {
-			return editorInput.getToolTipText();
 		}
+		return editorInput.getToolTipText();
     }
 
     /* (non-Javadoc)
@@ -221,6 +221,7 @@ public abstract class EditorPart extends WorkbenchPart implements IEditorPart {
      * @see #setInputWithNotify(IEditorInput)
      */
     protected void setInput(IEditorInput input) {
+    	Assert.isLegal(input != null);
         editorInput = input;
     }
     
@@ -238,10 +239,9 @@ public abstract class EditorPart extends WorkbenchPart implements IEditorPart {
      * @param input the editor input
      */
     protected void setInputWithNotify(IEditorInput input) {
-        if (input != editorInput) {
-            editorInput = input;
-            firePropertyChange(PROP_INPUT);
-        }
+		Assert.isLegal(input != null);
+        editorInput = input;
+        firePropertyChange(PROP_INPUT);
     }
 
     /* (non-Javadoc)
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInSource.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInSource.java
index d0eefc0..04f9e7d 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInSource.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInSource.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,15 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.part;
 
 /**
- * Parts which need to provide a particular context to a Show In...
- * target can provide this interface.
- * The part can either directly implement this interface, or provide it
- * via <code>IAdaptable.getAdapter(IShowInSource.class)</code>.
+ * Parts which need to provide a particular context to a 'Show In' target can
+ * provide this interface.
+ * <p>
+ * The part can either directly implement this interface, or provide it via
+ * <code>IAdaptable.getAdapter(IShowInSource.class)</code>.
+ * </p
  * 
  * @see IShowInTarget
  * 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTarget.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTarget.java
index 912dcab..774bac2 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTarget.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTarget.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,15 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.part;
 
 /**
- * This interface must be provided by Show In targets (parts listed
- * in the Show In prompter).
- * The part can either directly implement this interface, or provide it
- * via <code>IAdaptable.getAdapter(IShowInTarget.class)</code>.
+ * This interface must be provided by Show In targets (views listed in the 'Show In'
+ * menu).
+ * <p>
+ * The view can either directly implement this interface, or provide it via
+ * <code>IAdaptable.getAdapter(IShowInTarget.class)</code>.
+ * </p>
  * 
  * @see org.eclipse.ui.IPageLayout#addShowInPart
  * 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTargetList.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTargetList.java
index b5238a4..5f967e6 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTargetList.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/IShowInTargetList.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,14 +8,15 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
-
 package org.eclipse.ui.part;
 
 /**
- * Show In sources which need to provide additional entries to the Show In list of targets
- * can provide this interface.
- * The part can either directly implement this interface, or provide it
- * via <code>IAdaptable.getAdapter(IShowInTargetList)</code>.
+ * This interface can be provided by a 'Show In' source that needs to add
+ * additional entries to the 'Show In' menu.
+ * <p>
+ * The part can either directly implement this interface, or provide it via
+ * <code>IAdaptable.getAdapter(IShowInTargetList)</code>.
+ * </p>
  * 
  * @see IShowInSource
  * @see IShowInTarget
@@ -24,13 +25,13 @@ package org.eclipse.ui.part;
  */
 public interface IShowInTargetList {
 
-    /**
-     * Returns the identifiers for the target parts to show.
-     * The target parts must be Show In targets.
-     * 
-     * @return the identifiers for the target parts to show
-     * 
-     * @see IShowInTarget
-     */
+	/**
+	 * Returns the identifiers for the target part to show. The target views
+	 * must be Show In targets.
+	 * 
+	 * @return the identifiers for the target views to show
+	 * 
+	 * @see IShowInTarget
+	 */
     public String[] getShowInTargetIds();
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java
index b2d4f5b..3d71aeb 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorPart.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@ package org.eclipse.ui.part;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
-
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
@@ -41,8 +40,8 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Item;
-import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorActionBarContributor;
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorPart;
@@ -301,15 +300,7 @@ public abstract class MultiPageEditorPart extends EditorPart implements IPageCha
 						e.doit = true;
 						e.detail = SWT.TRAVERSE_NONE;
 						Control control = newContainer.getParent();
-						do {
-							if (control.traverse(detail))
-								return;
-							if (control.getListeners(SWT.Traverse).length != 0)
-								return;
-							if (control instanceof Shell)
-								return;
-							control = control.getParent();
-						} while (control != null);
+						control.traverse(detail, new Event());
 				}
 			}
 		});
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java
index 010460a..d3811ce 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/MultiPageEditorSite.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java
index 4444d6d..562ab56 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part/PageBookView.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -15,7 +15,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
-
 import org.eclipse.core.commands.common.EventManager;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.action.IAction;
@@ -963,6 +962,8 @@ public abstract class PageBookView extends ViewPart implements IPartListener {
 				if (provider instanceof IPostSelectionProvider) {
 					((IPostSelectionProvider) provider)
 							.removePostSelectionChangedListener(postSelectionListener);
+				} else {
+					provider.removeSelectionChangedListener(postSelectionListener);
 				}
 			}
 		}
@@ -989,6 +990,8 @@ public abstract class PageBookView extends ViewPart implements IPartListener {
 				if (provider instanceof IPostSelectionProvider) {
 					((IPostSelectionProvider) provider)
 							.addPostSelectionChangedListener(postSelectionListener);
+				} else {
+					provider.addSelectionChangedListener(postSelectionListener);
 				}
 			}
 			// Update action bars.
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java
index e98acf3..d705ead 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/plugin/AbstractUIPlugin.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.MalformedURLException;
 import java.net.URL;
-
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IPluginDescriptor;
@@ -41,6 +40,7 @@ import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.BundleListener;
+import org.osgi.framework.SynchronousBundleListener;
 
 /**
  * Abstract base class for plug-ins that integrate with the Eclipse platform UI.
@@ -591,7 +591,7 @@ public abstract class AbstractUIPlugin extends Plugin {
         // Also, if the start throws an exception, the bundle will be shut down.  
         // We don't want to have created any delegates if this happens.
         // See bug 63324 for more details.
-        bundleListener = new BundleListener() {
+		bundleListener = new SynchronousBundleListener() {
             public void bundleChanged(BundleEvent event) {
                 if (event.getBundle() == getBundle()) {
                     if (event.getType() == BundleEvent.STARTED) {
@@ -688,9 +688,6 @@ public abstract class AbstractUIPlugin extends Plugin {
             }
         }
 
-        if (fullPathString == null) {
-			return null;
-		}
         return ImageDescriptor.createFromURL(fullPathString);
     }
     
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/DeferredTreeContentManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/DeferredTreeContentManager.java
index 3be24d9..2f8240a 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/DeferredTreeContentManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/DeferredTreeContentManager.java	
@@ -13,6 +13,7 @@ package org.eclipse.ui.progress;
 import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ListenerList;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.IJobChangeEvent;
 import org.eclipse.core.runtime.jobs.IJobChangeListener;
@@ -50,7 +51,7 @@ public class DeferredTreeContentManager {
 
 	IWorkbenchSiteProgressService progressService;
 
-	private IJobChangeListener updateCompleteListener;
+	private ListenerList updateCompleteListenerList;
 
 	/**
 	 * The DeferredContentFamily is a class used to keep track of a
@@ -404,8 +405,13 @@ public class DeferredTreeContentManager {
 		};
 		clearJob.setSystem(true);
 		
-		if(updateCompleteListener != null)
-			clearJob.addJobChangeListener(updateCompleteListener);
+		if (updateCompleteListenerList != null) {
+			Object[] listeners = updateCompleteListenerList.getListeners();
+			for (int i = 0; i < listeners.length; i++) {
+				clearJob
+						.addJobChangeListener((IJobChangeListener) listeners[i]);
+			}
+		}
 		clearJob.schedule();
 	}
 
@@ -466,14 +472,59 @@ public class DeferredTreeContentManager {
 			}
 		};
 	}
-	
+
 	/**
-	 * Add a listener to the job that updates the content after all
-	 * has been loaded by clearing the Pending entry etc.
+	 * Add a listener to list of update complete listeners. These listeners are
+	 * attached to the job that updates the viewer content (clears the pending
+	 * entry, etc.) after all deferred content has been retrieved.
+	 * 
+	 * This method has no effect if the listener has already been added to the
+	 * list of listeners.
+	 * 
+	 * Since 3.6, this listener is added to a list of listeners rather than
+	 * replacing the previously added listener. For backward compatibility,
+	 * adding a null listener will be interpreted as removal of a listener if
+	 * only one listener has been registered.
+	 * 
 	 * @param listener
+	 *            the listener to add to the list of update listeners
 	 * @since 3.4
 	 */
 	public void addUpdateCompleteListener(IJobChangeListener listener){
-		updateCompleteListener = listener;
+		// Maintain backward compatibility.
+		// Earlier only one listener was supported, so it can be removed by
+		// passing null
+		if (listener == null && updateCompleteListenerList != null) {
+			Object[] listeners = updateCompleteListenerList.getListeners();
+			if (listeners.length == 1) {
+				removeUpdateCompleteListener((IJobChangeListener) listeners[0]);
+			}
+		} else {
+			if (updateCompleteListenerList == null) {
+				updateCompleteListenerList = new ListenerList();
+			}
+			updateCompleteListenerList.add(listener);
+		}
 	}
+
+	/**
+	 * Removes the listener from the list of update listeners that are attached
+	 * to the job that updates the viewer content (clears the pending entry,
+	 * etc.) after all deferred content has been retrieved. If the listener is
+	 * already attached to a running job, it is not removed, but it will not be
+	 * added to any subsequent jobs that are run.
+	 * 
+	 * This method has no effect if the listener was not previously added to the
+	 * listener list.
+	 * 
+	 * @param listener
+	 *            the listener to be removed
+	 * @since 3.6
+	 */
+	public void removeUpdateCompleteListener(IJobChangeListener listener) {
+		if (updateCompleteListenerList != null) {
+			updateCompleteListenerList.remove(listener);
+		}
+	}
+
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java
index 48a9379..06c4715 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - Bug 302529 [UX] [Progress] Show Eclipse IDE progress in the Eclipse icon on the Windows 7 Task Bar
  *******************************************************************************/
 package org.eclipse.ui.progress;
 
@@ -16,10 +17,15 @@ import org.eclipse.ui.PlatformUI;
 /**
  * Constants relating to progress UI functionality of the workbench plug-in.
  * <p>
- * The four constants define property keys that are used to associate
- * UI related information with Jobs (<code>org.eclipse.core.runtime.jobs.Job</code>).
+ * The constants define property keys that are used to associate UI related
+ * information with Jobs (<code>org.eclipse.core.runtime.jobs.Job</code>).
+ * <p>
+ * In release 3.6, additional constants have been defined in
+ * {@link IProgressConstants2}. Clients are encouraged to use the newer class in
+ * order to get access to all of the available constants.
  * 
  * @see org.eclipse.core.runtime.jobs.Job#setProperty
+ * @see IProgressConstants2
  * @since 3.0
  */
 public interface IProgressConstants {
@@ -63,22 +69,28 @@ public interface IProgressConstants {
     public static final QualifiedName KEEPONE_PROPERTY = new QualifiedName(
             PROPERTY_PREFIX, "keepone"); //$NON-NLS-1$
 
-    /**
-     * This property is used to associate an <code>IAction</code> with a Job.
-     * If the Job is shown in the UI, the action might be represented as a button or
-     * hyper link to allow the user to trigger a job specific action, like showing
-     * the Job's results.
-     * <p>
-     * The progress UI will track the enabled state of the action and its tooltip text.
-     * </p>
-     * <p>
-     * If the action implements <code>ActionFactory.IWorkbenchAction</code>, its
-     * <code>dispose</code> method will be called as soon as the Job is finally
-     * removed from the set of kept jobs.
-     * </p>
-     * @see org.eclipse.jface.action.IAction
-     * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction
-     **/
+	/**
+	 * This property is used to associate an <code>IAction</code> with a Job. If
+	 * the Job is shown in the UI, the action might be represented as a button
+	 * or hyper link to allow the user to trigger a job specific action, like
+	 * showing the Job's results.
+	 * <p>
+	 * The progress UI will track the enabled state of the action and its
+	 * tooltip text.
+	 * </p>
+	 * <p>
+	 * If the action implements <code>ActionFactory.IWorkbenchAction</code>, its
+	 * <code>dispose</code> method will be called as soon as the Job is finally
+	 * removed from the set of kept jobs.
+	 * </p>
+	 * <p>
+	 * Note: Only one of <code>ACTION_PROPERTY</code> or
+	 * <code>IProgressConstants2.COMMAND_PROPERTY</code> should be used
+	 * </p>
+	 * 
+	 * @see org.eclipse.jface.action.IAction
+	 * @see org.eclipse.ui.actions.ActionFactory.IWorkbenchAction
+	 **/
     public static final QualifiedName ACTION_PROPERTY = new QualifiedName(
             PROPERTY_PREFIX, "action"); //$NON-NLS-1$
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants2.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants2.java
new file mode 100644
index 0000000..86352fc
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IProgressConstants2.java	
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Tasktop Technologies - Bug 302529 [UX] [Progress] Show Eclipse IDE progress in the Eclipse icon on the Windows 7 Task Bar
+ *******************************************************************************/
+package org.eclipse.ui.progress;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Constants relating to progress UI functionality of the workbench plug-in.
+ * <p>
+ * The constants define property keys that are used to associate UI related
+ * information with Jobs (<code>org.eclipse.core.runtime.jobs.Job</code>). This
+ * class is a superset of all previously defined progress constants.
+ * 
+ * @see org.eclipse.core.runtime.jobs.Job#setProperty
+ * @see IProgressConstants
+ * @since 3.6
+ * 
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface IProgressConstants2 extends IProgressConstants {
+
+    /**
+     * Common prefix for properties defined in this interface.
+     */
+    static final String PROPERTY_PREFIX = PlatformUI.PLUGIN_ID
+            + ".workbench.progress"; //$NON-NLS-1$
+
+	/**
+	 * This property is used to associate a <code>ParameterizedCommand</code>
+	 * with a Job. If the Job is shown in the UI, the command might be
+	 * represented as a button or hyper link to allow the user to trigger a job
+	 * specific action, like showing the Job's results.
+	 * <p>
+	 * Note: Only one of <code>ACTION_PROPERTY</code> or
+	 * <code>COMMAND_PROPERTY</code> should be used
+	 * </p>
+	 * 
+	 * @see org.eclipse.core.commands.ParameterizedCommand
+	 **/
+	public static final QualifiedName COMMAND_PROPERTY = new QualifiedName(
+			PROPERTY_PREFIX, "command"); //$NON-NLS-1$
+
+	/**
+	 * This property provides a hint to the progress UI to show the progress of
+	 * the job in the application TaskBar
+	 * <p>
+	 * The property must be of type <code>Boolean</code> and the hint is used if
+	 * its value is <code>true</code>.
+	 * </p>
+	 */
+	public static final QualifiedName SHOW_IN_TASKBAR_ICON_PROPERTY = new QualifiedName(
+			PROPERTY_PREFIX, "inTaskBarIcon"); //$NON-NLS-1$
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IWorkbenchSiteProgressService.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IWorkbenchSiteProgressService.java
index c67266b..deb4c93 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IWorkbenchSiteProgressService.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/progress/IWorkbenchSiteProgressService.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,18 +18,24 @@ import org.eclipse.ui.presentations.IPresentablePart;
  * IWorkbenchPartProgressService is an IProgressService that adds API for jobs
  * that change the state in a IWorkbenchPartSite while they are being run.
  * <p>
- * This service can be acquired from your service locator:
+ * This service can be acquired from your service locator (IWorkbenchPartSite):
+ * 
  * <pre>
+ * <code>
  * 	IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
+ * </code>
  * </pre>
+ * 
  * <ul>
  * <li>This service is not available globally, only at the part site level.</li>
  * </ul>
  * </p>
  * <p>
  * WorkbenchParts may access an instance of IWorkbenchSiteProgressService by
- * calling <code>getSite.getAdapter(IWorkbenchSiteProgressService.class);</code>,
- * although getService(IWorkbenchSiteProgressService.class) is preferred.
+ * calling
+ * <code>getSite().getAdapter(IWorkbenchSiteProgressService.class);</code> ,
+ * although getSite().getService(IWorkbenchSiteProgressService.class) is
+ * preferred.
  * </p>
  * 
  * @see IWorkbenchPartSite#getAdapter(Class)
@@ -45,40 +51,49 @@ public interface IWorkbenchSiteProgressService extends IProgressService {
      */
     public static final String BUSY_PROPERTY = "SITE_BUSY"; //$NON-NLS-1$
 
-    /**
-     * Jobs scheduled with this method will cause the part's presentation 
-     * to be changed to indicate that the part is busy and in a transient 
-     * state until the job completes. Parts can also add customized busy 
-     * indication by overriding <code>WorkbenchPart.setBusy()</code>.
-     * If useHalfBusyCursor is true then the cursor will change to
-     * the half busy cursor for the duration of the job.
-     * @param job The job to schedule
-     * @param delay The delay in scheduling.
-     * @param useHalfBusyCursor A boolean to indicate if the half busy
-     * 		cursor should be used while this job is running.
-     * @see Job#schedule(long)
-     */
+	/**
+	 * Jobs scheduled with this method will cause the part's presentation to be
+	 * changed to indicate that the part is busy and in a transient state until
+	 * the job completes. Parts can also add customized busy indication by
+	 * overriding <code>WorkbenchPart.showBusy()</code>. If useHalfBusyCursor is
+	 * true then the cursor will change to the half busy cursor for the duration
+	 * of the job.
+	 * 
+	 * @param job
+	 *            The job to schedule
+	 * @param delay
+	 *            The delay in scheduling.
+	 * @param useHalfBusyCursor
+	 *            A boolean to indicate if the half busy cursor should be used
+	 *            while this job is running.
+	 * @see Job#schedule(long)
+	 */
     public void schedule(Job job, long delay, boolean useHalfBusyCursor);
 
-    /**
-     * Jobs scheduled with this method will cause the part's presentation 
-     * to be changed to indicate that the part is busy and in a transient 
-     * state until the job completes. Parts can also add customized busy 
-     * indication by overriding <code>WorkbenchPart.setBusy</code>.
-     * @param job The job to schedule
-     * @param delay The delay in scheduling.
-     * @see Job#schedule(long)
-     */
+	/**
+	 * Jobs scheduled with this method will cause the part's presentation to be
+	 * changed to indicate that the part is busy and in a transient state until
+	 * the job completes. Parts can also add customized busy indication by
+	 * overriding <code>WorkbenchPart.showBusy</code>.
+	 * 
+	 * @param job
+	 *            The job to schedule
+	 * @param delay
+	 *            The delay in scheduling.
+	 * @see Job#schedule(long)
+	 */
     public void schedule(Job job, long delay);
 
-    /**
-     * Jobs scheduled with this method will cause the part's presentation 
-     * to be changed to indicate that the part is busy and in a transient 
-     * state until the job completes. Parts can also add customized busy 
-     * indication by overriding <code>WorkbenchPart.setBusy</code>.
-     * @param job The job to schedule
-     * @see Job#schedule()
-     */
+	/**
+	 * Jobs scheduled with this method will cause the part's presentation to be
+	 * changed to indicate that the part is busy and in a transient state until
+	 * the job completes. Parts can also add customized busy indication by
+	 * overriding <code>WorkbenchPart.showBusy</code>.
+	 * 
+	 * @param job
+	 *            The job to schedule
+	 * @see Job#schedule()
+	 */
     public void schedule(Job job);
 
     /**
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/AbstractSplashHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/AbstractSplashHandler.java
index 2bf2fa5..efa5569 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/AbstractSplashHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/splash/AbstractSplashHandler.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,9 +19,9 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.application.WorkbenchAdvisor;
 
 /**
- * Baseclass for splash implementations. Please note that methods on this class
+ * Base class for splash implementations. Please note that methods on this class
  * will be invoked while the Workbench is being instantiated. As such, any
- * resource provided by the workbench plug-in cannot be guarenteed to be
+ * resource provided by the workbench plug-in cannot be guaranteed to be
  * available to this class while executing. No attempt should be made to access
  * {@link IWorkbench} or any subordinate interfaces or resources.
  * 
@@ -80,7 +80,7 @@ public abstract class AbstractSplashHandler {
 	 * <code>true</code>. Because this property defaults to <code>false</code>
 	 * RCP developers must set this property via a
 	 * <code>plugin_customization.ini</code> file or by setting the preference
-	 * on the Platform UI perference store in the
+	 * on the Platform UI preference store in the
 	 * {@link WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer)}
 	 * method if they wish to have progress reported on startup.
 	 * </p>
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java
index 49d8da7..90f89f1 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/AbstractStatusAreaProvider.java	
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -56,4 +56,25 @@ public abstract class AbstractStatusAreaProvider extends ErrorSupportProvider {
 	public final Control createSupportArea(Composite parent, IStatus status) {
 		return createSupportArea(parent, new StatusAdapter(status));
 	}
+
+	/**
+	 * This method is called before
+	 * {@link #createSupportArea(Composite, StatusAdapter)} to check if it will
+	 * display any significant implementation.
+	 * <p>
+	 * <b>Important</b>: This API is a part of work in progress and therefore is
+	 * suitable only for support area providers (which are presented in the
+	 * status dialog tray).
+	 * </p>
+	 * 
+	 * @param statusAdapter
+	 *            - {@link StatusAdapter} for which status are will be
+	 *            requested.
+	 * @return true if provider is able to process particular
+	 *         {@link StatusAdapter}
+	 * @since 3.6
+	 */
+	public boolean validFor(StatusAdapter statusAdapter) {
+		return true;
+	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java
index 83c9f38..35cdd79 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchErrorHandler.java	
@@ -46,6 +46,8 @@ public class WorkbenchErrorHandler extends AbstractStatusHandler {
 	 *      int)
 	 */
 	public void handle(final StatusAdapter statusAdapter, int style) {
+		statusAdapter.setProperty(WorkbenchStatusDialogManager.HINT,
+				new Integer(style));
 		if (((style & StatusManager.SHOW) == StatusManager.SHOW)
 				|| ((style & StatusManager.BLOCK) == StatusManager.BLOCK)) {
 
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java
index 46fac4b..21ceee8 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/statushandlers/WorkbenchStatusDialogManager.java	
@@ -11,94 +11,19 @@
 
 package org.eclipse.ui.statushandlers;
 
-import java.net.URL;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
+import org.eclipse.ui.internal.statushandlers.IStatusDialogConstants;
 
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
+import java.util.Collection;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.ContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.DialogTray;
+import org.eclipse.core.runtime.QualifiedName;
 import org.eclipse.jface.dialogs.ErrorDialog;
 import org.eclipse.jface.dialogs.ErrorSupportProvider;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.dialogs.TrayDialog;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.resource.LocalResourceManager;
-import org.eclipse.jface.resource.ResourceManager;
 import org.eclipse.jface.util.Policy;
-import org.eclipse.jface.viewers.IContentProvider;
 import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.progress.ProgressManager;
-import org.eclipse.ui.internal.progress.ProgressManagerUtil;
-import org.eclipse.ui.internal.progress.ProgressMessages;
-import org.eclipse.ui.internal.statushandlers.DefaultDetailsArea;
-import org.eclipse.ui.internal.statushandlers.IStatusDialogConstants;
-import org.eclipse.ui.internal.statushandlers.StackTraceSupportArea;
+import org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl;
 import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.statushandlers.StatusManager.INotificationTypes;
-import org.eclipse.ui.views.IViewDescriptor;
-
-import com.ibm.icu.text.DateFormat;
 
 /**
  * <p>
@@ -139,997 +64,10 @@ import com.ibm.icu.text.DateFormat;
  */
 public class WorkbenchStatusDialogManager {
 	
-	private static final String LOG_VIEW_ID = "org.eclipse.pde.runtime.LogView"; //$NON-NLS-1$
-	
-	/**
-	 * The default status label provider.
-	 */
-	private class DefaultLabelProvider implements ITableLabelProvider {
-		ResourceManager manager = new LocalResourceManager(JFaceResources
-				.getResources());
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse
-		 * .jface.viewers.ILabelProviderListener)
-		 */
-		public void addListener(ILabelProviderListener listener) {
-			// Do nothing
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
-		 */
-		public void dispose() {
-			manager.dispose();
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java
-		 * .lang.Object, int)
-		 */
-		public Image getColumnImage(Object element, int columnIndex) {
-			Image result = null;
-			if (element != null) {
-				StatusAdapter statusAdapter = ((StatusAdapter) element);
-				Job job = (Job) (statusAdapter.getAdapter(Job.class));
-				if (job != null) {
-					result = getIcon(job);
-				}
-			}
-			// if somehow disposed image was received (should not happen)
-			if (result != null && result.isDisposed()) {
-				result = null;
-			}
-			return result;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.
-		 * lang.Object, int)
-		 */
-		public String getColumnText(Object element, int columnIndex) {
-			StatusAdapter statusAdapter = (StatusAdapter) element;
-			String text = WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
-			if (getStatusAdapters().size() == 1) {
-				Job job = (Job) (statusAdapter.getAdapter(Job.class));
-				if (job != null) {
-					text = getPrimaryMessage(statusAdapter);
-				} else {
-					text = getSecondaryMessage(statusAdapter);
-				}
-			} else {
-				Job job = (Job) (statusAdapter.getAdapter(Job.class));
-				if (job != null) {
-					text = job.getName();
-				} else {
-					text = getPrimaryMessage(statusAdapter);
-				}
-			}
-			Long timestamp = (Long) statusAdapter
-					.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY);
-
-			if (timestamp != null && getStatusAdapters().size() > 1) {
-				String date = DateFormat.getDateTimeInstance(DateFormat.LONG,
-						DateFormat.LONG)
-						.format(new Date(timestamp.longValue()));
-				return NLS.bind(ProgressMessages.JobInfo_Error, (new Object[] {
-						text, date }));
-			}
-			return text;
-		}
-
-		/*
-		 * Get the icon for the job.
-		 */
-		private Image getIcon(Job job) {
-			if (job != null) {
-				Object property = job
-						.getProperty(IProgressConstants.ICON_PROPERTY);
-
-				// Create an image from the job's icon property or family
-				if (property instanceof ImageDescriptor) {
-					return manager.createImage((ImageDescriptor) property);
-				} else if (property instanceof URL) {
-					return manager.createImage(ImageDescriptor
-							.createFromURL((URL) property));
-				} else {
-					// Let the progress manager handle the resource management
-					return ProgressManager.getInstance().getIconFor(job);
-				}
-			}
-			return null;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java
-		 * .lang.Object, java.lang.String)
-		 */
-		public boolean isLabelProperty(Object element, String property) {
-			return false;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse
-		 * .jface.viewers.ILabelProviderListener)
-		 */
-		public void removeListener(ILabelProviderListener listener) {
-			// Do nothing
-		}
-	}
-
-	/**
-	 * A wrapper for the status label provider that prevents the label provider
-	 * from being disposed when modality is switched.
-	 */
-	private class LabelProviderWrapper implements ITableLabelProvider {
-
-		private ITableLabelProvider labelProvider = new DefaultLabelProvider();
-
-		public void setLabelProvider(ITableLabelProvider provider) {
-			this.labelProvider = provider;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java
-		 * .lang.Object, int)
-		 */
-		public Image getColumnImage(Object element, int columnIndex) {
-			return labelProvider.getColumnImage(element, columnIndex);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.
-		 * lang.Object, int)
-		 */
-		public String getColumnText(Object element, int columnIndex) {
-			return labelProvider.getColumnText(element, columnIndex);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse
-		 * .jface.viewers.ILabelProviderListener)
-		 */
-		public void addListener(ILabelProviderListener listener) {
-			labelProvider.addListener(listener);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
-		 */
-		public void dispose() {
-			if (!modalitySwitch) {
-				labelProvider.dispose();
-			}
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java
-		 * .lang.Object, java.lang.String)
-		 */
-		public boolean isLabelProperty(Object element, String property) {
-			return labelProvider.isLabelProperty(element, property);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see
-		 * org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse
-		 * .jface.viewers.ILabelProviderListener)
-		 */
-		public void removeListener(ILabelProviderListener listener) {
-			labelProvider.removeListener(listener);
-		}
-
-	}
-
-	/**
-	 * This class is responsible for managing details area.
-	 * 
-	 * @since 3.4
-	 */
-	private final class DetailsAreaManager {
-		private AbstractStatusAreaProvider provider = null;
-		private Control control = null;
-
-		/**
-		 * Closes the details area
-		 */
-		public void close() {
-			if (control != null && !control.isDisposed()) {
-				control.dispose();
-			}
-		}
-
-		/**
-		 * This method is responsible for creating details area on the specified
-		 * Composite and displaying specified StatusAdapter
-		 * 
-		 * @param parent
-		 *            A composite on which should be the details area created.
-		 * @param statusAdapter
-		 *            StatusAdapter for which should be the details area
-		 *            created.
-		 */
-		public void createDetailsArea(Composite parent,
-				StatusAdapter statusAdapter) {
-			Composite container = new Composite(parent, SWT.NONE);
-			container.setLayout(GridLayoutFactory.fillDefaults().create());
-			container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-			getProvider().createSupportArea(container, statusAdapter);
-			control = container;
-		}
-
-		/**
-		 * Returns current detail area provider.
-		 * 
-		 * @return current detail area provider.
-		 */
-		private AbstractStatusAreaProvider getProvider() {
-			if (provider == null) {
-				provider = new DefaultDetailsArea(
-						WorkbenchStatusDialogManager.this);
-			}
-			return provider;
-		}
-
-		/**
-		 * This method allows to check if the details area is open (physically
-		 * constructed).
-		 * 
-		 * @return true if the area is open, false otherwise
-		 */
-		public boolean isOpen() {
-			if (control == null || control.isDisposed()) {
-				return false;
-			}
-			return true;
-		}
-
-		/**
-		 * This method sets the details area provider. If null is set, the
-		 * default area provider (status tree) will be used.
-		 * 
-		 * @param provider
-		 *            A provider that will create contents for details area.
-		 */
-		public void setDetailsAreaProvider(AbstractStatusAreaProvider provider) {
-			this.provider = provider;
-		}
-	}
-
-	/**
-	 * Parent window actually does not use its Shell to build dialog on. The
-	 * window passes the shell to the InternalDialog, and it can do switching
-	 * modality and recreate the window silently.
-	 * 
-	 * @since 3.4
-	 */
-	private class InternalDialog extends TrayDialog {
-
-		private WorkbenchStatusDialogManager statusDialog;
-
-		/**
-		 * Instantiates the internal dialog on the given shell. Created dialog
-		 * uses statusDialog methods to create its contents.
-		 * 
-		 * @param parentShell -
-		 *            a parent shell for the dialog
-		 * @param statusDialog -
-		 *            a dialog from which methods should be used to create
-		 *            contents
-		 * @param modal -
-		 *            true if created dialog should be modal, false otherwise.
-		 */
-		public InternalDialog(Shell parentShell,
-				WorkbenchStatusDialogManager statusDialog, boolean modal) {
-			super(parentShell);
-
-			this.statusDialog = statusDialog;
-			setShellStyle(SWT.RESIZE | SWT.MAX | SWT.MIN | getShellStyle());
-			setBlockOnOpen(false);
-
-			if (!modal) {
-				setShellStyle(~SWT.APPLICATION_MODAL & getShellStyle());
-			}
-		}
-
-		protected void buttonPressed(int id) {
-			if (id == GOTO_ACTION_ID) {
-				IAction gotoAction = getGotoAction();
-				if (gotoAction != null) {
-					if (isPromptToClose()) {
-						okPressed(); // close the dialog
-						gotoAction.run(); // run the goto action
-					}
-				}
-			}
-			if (id == IDialogConstants.DETAILS_ID) {
-				// was the details button pressed?
-				detailsOpened = toggleDetailsArea();
-			} else {
-				super.buttonPressed(id);
-			}
-		}
-
-		/*
-		 * (non-Javadoc) Method declared in Window.
-		 */
-		final protected void configureShell(Shell shell) {
-			super.configureShell(shell);
-			if (title != null) {
-				shell.setText(title);
-			}
-		}
-
-		public int convertHeightInCharsToPixels(int chars) {
-			return super.convertHeightInCharsToPixels(chars);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#convertHorizontalDLUsToPixels(int)
-		 */
-		public int convertHorizontalDLUsToPixels(int dlus) {
-			return super.convertHorizontalDLUsToPixels(dlus);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#convertVerticalDLUsToPixels(int)
-		 */
-		public int convertVerticalDLUsToPixels(int dlus) {
-			return super.convertVerticalDLUsToPixels(dlus);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#convertWidthInCharsToPixels(int)
-		 */
-		public int convertWidthInCharsToPixels(int chars) {
-			return super.convertWidthInCharsToPixels(chars);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#createButton(org.eclipse.swt.widgets.Composite,
-		 *      int, java.lang.String, boolean)
-		 */
-		public Button createButton(Composite parent, int id, String label,
-				boolean defaultButton) {
-			return super.createButton(parent, id, label, defaultButton);
-		}
-		
-		/**
-		 * Status dialog button should be aligned SWT.END. 
-		 */
-		protected void setButtonLayoutData(Button button) {
-			GridData data = new GridData(SWT.END, SWT.CENTER, false, false);
-			int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
-			Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
-			data.widthHint = Math.max(widthHint, minSize.x);
-			button.setLayoutData(data);
-		}
-
-		protected Control createButtonBar(Composite parent) {
-			return statusDialog.createButtonBar(parent);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
-		 */
-		protected Control createDialogArea(Composite parent) {
-			return statusDialog.createDialogArea(parent);
-		}
-
-		public Button getButton(int id) {
-			return super.getButton(id);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#initializeBounds()
-		 */
-		protected void initializeBounds() {
-			super.initializeBounds();
-			this.statusDialog.initializeBounds();
-		}
-
-		/**
-		 * This function checks if the dialog is modal.
-		 * 
-		 * @return true if the dialog is modal, false otherwise
-		 * 
-		 */
-		public boolean isModal() {
-			return ((getShellStyle() & SWT.APPLICATION_MODAL) == SWT.APPLICATION_MODAL);
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.Dialog#isResizable()
-		 */
-		protected boolean isResizable() {
-			return true;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.window.Window#open()
-		 */
-		public int open() {
-			int result = super.open();
-			if (modalitySwitch) {
-				if (detailsOpened) {
-					showDetailsArea();
-				}
-				if (trayOpened) {
-					openTray(supportTray);
-				}
-			}
-			return result;
-		}
-
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.dialogs.TrayDialog#closeTray()
-		 */
-		public void closeTray() throws IllegalStateException {
-			super.closeTray();
-			//preserve state during modality switch
-			if(!modalitySwitch){
-				trayOpened = false;
-			}
-			if (launchTrayLink != null && !launchTrayLink.isDisposed()) {
-				launchTrayLink.setEnabled(supportTray.providesSupport() && !trayOpened);
-			}
-		}
-		
-	}
-
-	/**
-	 * This class is responsible for disposing dialog elements when the dialog
-	 * is closed.
-	 * 
-	 * @since 3.4
-	 * 
-	 */
-	private final class StatusDialogDisposeListener implements DisposeListener {
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
-		 */
-		public void widgetDisposed(org.eclipse.swt.events.DisposeEvent e) {
-			dialog = null;
-			statusListViewer = null;
-			statusAdapter = null;
-			errors.clear();
-			modals.clear();
-		}
-	}
-
-	/**
-	 * This class is responsible for displaying the support area on the right
-	 * side of the status dialog.
-	 * 
-	 * @since 3.4
-	 * 
-	 */
-	private class SupportTray extends DialogTray implements
-			ISelectionChangedListener {
-
-		private IContributionItem closeAction;
-		private Image normal;
-		private Image hover;
-
-		private Composite supportArea;
-		private Composite supportAreaContent;
-
-		private StatusAdapter lastSelectedStatus;
-		private boolean defaultSupportAreaEnabled;
-
-		/**
-		 * Creates any actions needed by the tray.
-		 */
-		private void createActions() {
-			createImages();
-			closeAction = new ContributionItem() {
-				public void fill(ToolBar parent, int index) {
-					final ToolItem item = new ToolItem(parent, SWT.PUSH);
-					item.setImage(normal);
-					item.setHotImage(hover);
-					item.setToolTipText(JFaceResources.getString("close")); //$NON-NLS-1$
-					item.addListener(SWT.Selection, new Listener() {
-						public void handleEvent(Event event) {
-							trayOpened = false;
-
-							// close the tray
-							closeTray();
-
-							// set focus back to shell
-							getShell().setFocus();
-						}
-					});
-				}
-			};
-
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.dialogs.DialogTray#createContents(org.eclipse.swt.widgets.Composite)
-		 */
-		protected Control createContents(Composite parent) {
-			Composite container = new Composite(parent, SWT.NONE);
-
-			// nothing to display. Should never happen, cause button is disabled
-			// when nothing to display.
-
-			if (!providesSupport()) {
-				return container;
-			}
-
-			GridLayout layout = new GridLayout();
-			layout.marginWidth = layout.marginHeight = 0;
-			layout.verticalSpacing = 0;
-			container.setLayout(layout);
-			GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
-			container.setLayoutData(layoutData);
-
-			container.addListener(SWT.Dispose, new Listener() {
-				public void handleEvent(Event event) {
-					destroyImages();
-				}
-			});
-
-			if(!hideSupportButton){
-				ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
-				toolBarManager.createControl(container);
-				GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
-				gd.grabExcessHorizontalSpace = true;
-				toolBarManager.getControl().setLayoutData(gd);
-				Label separator = new Label(container, SWT.SEPARATOR
-						| SWT.HORIZONTAL);
-				gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-				gd.heightHint = 1;
-				separator.setLayoutData(gd);
-
-				createActions();
-				toolBarManager.add(closeAction);
-
-				toolBarManager.update(true);
-			}
-
-			supportArea = new Composite(container, SWT.NONE);
-			layout = new GridLayout();
-			layout.marginWidth = layout.marginHeight = 0;
-			layout.verticalSpacing = 0;
-			supportArea.setLayout(layout);
-			GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL
-					| GridData.VERTICAL_ALIGN_FILL);
-			gd.horizontalSpan = 1;
-			gd.grabExcessHorizontalSpace = true;
-			gd.grabExcessVerticalSpace = true;
-			supportArea.setLayoutData(gd);
-			
-			// if only one status adapter is displayed,
-			// selection listener does not work, so it is necessary to
-			// set the last selected status manually
-			if (getStatusAdapters().size() == 1) {
-				lastSelectedStatus = statusAdapter;
-			}
-
-			if (lastSelectedStatus != null)
-				createSupportArea(supportArea, lastSelectedStatus);
-
-			Point shellSize = getShell().getSize();
-			Point desiredSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-			
-			if(desiredSize.y > shellSize.y){
-				getShell().setSize(shellSize.x, Math.min(desiredSize.y,500));
-			}
-
-			return container;
-		}
-
-		/**
-		 * Creates any custom needed by the tray, such as the close button.
-		 */
-		private void createImages() {
-			Display display = Display.getCurrent();
-			int[] shape = new int[] { 3, 3, 5, 3, 7, 5, 8, 5, 10, 3, 12, 3, 12,
-					5, 10, 7, 10, 8, 12, 10, 12, 12, 10, 12, 8, 10, 7, 10, 5,
-					12, 3, 12, 3, 10, 5, 8, 5, 7, 3, 5 };
-
-			/*
-			 * Use magenta as transparency color since it is used infrequently.
-			 */
-			Color border = display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW);
-			Color background = display
-					.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-			Color backgroundHot = new Color(display, new RGB(252, 160, 160));
-			Color transparent = display.getSystemColor(SWT.COLOR_MAGENTA);
-
-			PaletteData palette = new PaletteData(new RGB[] {
-					transparent.getRGB(), border.getRGB(), background.getRGB(),
-					backgroundHot.getRGB() });
-			ImageData data = new ImageData(16, 16, 8, palette);
-			data.transparentPixel = 0;
-
-			normal = new Image(display, data);
-			normal.setBackground(transparent);
-			GC gc = new GC(normal);
-			gc.setBackground(background);
-			gc.fillPolygon(shape);
-			gc.setForeground(border);
-			gc.drawPolygon(shape);
-			gc.dispose();
-
-			hover = new Image(display, data);
-			hover.setBackground(transparent);
-			gc = new GC(hover);
-			gc.setBackground(backgroundHot);
-			gc.fillPolygon(shape);
-			gc.setForeground(border);
-			gc.drawPolygon(shape);
-			gc.dispose();
-
-			backgroundHot.dispose();
-		}
-		
-		private void destroyImages() {
-			if (normal != null) normal.dispose();
-			if (hover != null) hover.dispose();
-		}
-
-		/**
-		 * Create the area for extra error support information.
-		 * 
-		 * @param parent
-		 *            A composite on which should be the support area created.
-		 * @param statusAdapter
-		 *            StatusAdapter for which should be the support area
-		 *            created.
-		 */
-		private void createSupportArea(Composite parent,
-				StatusAdapter statusAdapter) {
-
-			ErrorSupportProvider provider = Policy.getErrorSupportProvider();
-
-			if (userSupportProvider != null) {
-				provider = userSupportProvider;
-			}
-
-			if (defaultSupportAreaEnabled && provider == null) {
-				provider = new StackTraceSupportArea();
-			}
-
-			// default support area was disabled
-			if (provider == null)
-				return;
-
-			if (supportAreaContent != null)
-				supportAreaContent.dispose();
-
-			supportAreaContent = new Composite(parent, SWT.FILL);
-
-			GridData supportData = new GridData(SWT.FILL, SWT.FILL, true, true);
-			supportAreaContent.setLayoutData(supportData);
-			if (supportAreaContent.getLayout() == null) {
-				GridLayout layout = new GridLayout();
-				layout.marginWidth = 0;
-				layout.marginHeight = 0;
-				supportAreaContent.setLayout(layout); // Give it a default
-				// layout
-			}
-
-			if (provider instanceof AbstractStatusAreaProvider) {
-				((AbstractStatusAreaProvider) provider).createSupportArea(
-						supportAreaContent, statusAdapter);
-			} else {
-				provider.createSupportArea(supportAreaContent, statusAdapter
-						.getStatus());
-			}
-		}
-
-		/**
-		 * This method manages the enablement of the default support area.
-		 * 
-		 * @param enable
-		 *            true enables, false disables.
-		 */
-		public void enableDefaultSupportArea(boolean enable) {
-			this.defaultSupportAreaEnabled = enable;
-			Policy.setErrorSupportProvider(new StackTraceSupportArea());
-		}
-
-		private StatusAdapter getStatusAdapterFromEvent(
-				SelectionChangedEvent event) {
-
-			ISelection selection = event.getSelection();
-
-			if (selection instanceof StructuredSelection) {
-				StructuredSelection structuredSelection = (StructuredSelection) selection;
-				Object element = structuredSelection.getFirstElement();
-				if (element instanceof StatusAdapter) {
-					return (StatusAdapter) element;
-				}
-			}
-			return null;
-		}
-
-		/**
-		 * Checks if the support dialog has any support areas.
-		 * 
-		 * @return true if support dialog has any support areas to display,
-		 *         false otherwise
-		 * 
-		 */
-		private boolean providesSupport() {
-			if (Policy.getErrorSupportProvider() != null) {
-				return true;
-			}
-			if (userSupportProvider != null) {
-				return true;
-			}
-			return defaultSupportAreaEnabled;
-		}
-
-		/*
-		 * (non-Javadoc)
-		 * 
-		 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-		 */
-		public void selectionChanged(SelectionChangedEvent event) {
-			lastSelectedStatus = getStatusAdapterFromEvent(event);
-			if (supportArea != null && !supportArea.isDisposed()) {
-				if (lastSelectedStatus != null) {
-					createSupportArea(supportArea, lastSelectedStatus);
-					supportArea.layout(true);
-				}
-			}
-		}
-	}
-
-	/**
-	 * Preference used to indicate whether the user should be prompted to
-	 * confirm the execution of the job's goto action
-	 */
-	private static final String PREF_SKIP_GOTO_ACTION_PROMPT = "pref_skip_goto_action_prompt"; //$NON-NLS-1$
-
-	/**
-	 * The id of the goto action button
-	 */
-	private static final int GOTO_ACTION_ID = IDialogConstants.CLIENT_ID + 1;
-
-	/**
-	 * Returns whether the given StatusAdapter object should be displayed.
-	 * 
-	 * @param statusAdapter
-	 *            a status object
-	 * @param mask
-	 *            a mask as per <code>IStatus.matches</code>
-	 * @return <code>true</code> if the given status should be displayed, and
-	 *         <code>false</code> otherwise
-	 * @see org.eclipse.core.runtime.IStatus#matches(int)
-	 */
-	private boolean shouldAccept(StatusAdapter statusAdapter, int mask) {
-		IStatus status = statusAdapter.getStatus();
-		IStatus[] children = status.getChildren();
-		if (children == null || children.length == 0) {
-			return status.matches(mask) || (handleOKStatuses && status.isOK());
-		}
-		for (int i = 0; i < children.length; i++) {
-			if (children[i].matches(mask)) {
-				return true;
-			}
-		}
-		if (handleOKStatuses && status.isOK()) {
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Stores statuses.
-	 */
-	private Collection errors = Collections.synchronizedSet(new HashSet());
-
-	/**
-	 * Stores information, which statuses should be displayed in modal window.
-	 */
-	private HashMap modals = new HashMap();
-
-	/**
-	 * This field stores the real dialog that appears to the user.
-	 */
-	private InternalDialog dialog;
-
-	/**
-	 * This composite holds all components of the dialog.
-	 */
-	private Composite dialogArea;
-
-	/**
-	 * This composite is initially scrolled to the 0 x 0 size. When more than
-	 * one status arrives, listArea is resized and a list is created on it to
-	 * present statuses to the user.
-	 */
-	private Composite listArea;
-
-	/**
-	 * On this composite are presented additional elements for displaying single
-	 * status. Currently it is the second label that displays the second most
-	 * important message to the user.
-	 */
-	private Composite singleStatusDisplayArea;
-
-	/**
-	 * This label is used to display the second most important message to the
-	 * user. It is placed on singleStatusDisplayArea.
-	 */
-	private Label singleStatusLabel;
-
-	/**
-	 * A list from which the user selects statuses. The list is placed on
-	 * listArea.
-	 */
-	private TableViewer statusListViewer;
-
-	/**
-	 * A list label provider
-	 */
-	private LabelProviderWrapper labelProviderWrapper = new LabelProviderWrapper();
-
-	/**
-	 * This variable holds current details area provider.
-	 */
-	private DetailsAreaManager detailsManager = new DetailsAreaManager();
-
-	private DisposeListener disposeListener = new StatusDialogDisposeListener();
-
-	/**
-	 * The title of the dialog.
-	 */
-	private String title;
-
-	/**
-	 * Filter mask for determining which status items to display. Default allows
-	 * for displaying all statuses.
-	 */
-	private int displayMask = 0xFFFF;
-
-	/**
-	 * Currently selected status adapter.
-	 */
-	private StatusAdapter statusAdapter;
-
-	/**
-	 * In this support tray status support providers are displayed.
-	 */
-	private SupportTray supportTray = new WorkbenchStatusDialogManager.SupportTray();
-
-	/**
-	 * Composite on the left bottom corner. Allows for opening support tray &
-	 * Error Log.
-	 */
-	private Composite linkComposite;
-	
-	/**
-	 * 
-	 */
-	private boolean showSupport = false;
-	
-	/**
-	 * This item is used to launch support tray
-	 */
-	private Link launchTrayLink;
-	
-	/**
-	 * This fields contains indicator if link to ErrorLog view should be
-	 * present.
-	 */
-	private Link showErrorLogLink;
-
-	/**
-	 * This flag indicates if the dialog is switching modality. For now it is
-	 * possible only to change from non-modal to modal.
-	 */
-	private boolean modalitySwitch = false;
-
-	/**
-	 * This fields holds the information about dialog position and size when
-	 * switching the modality.
-	 */
-	private Rectangle shellBounds;
-
-	/**
-	 * This flag indicates if the details area was opened before switching the
-	 * modality or not.
-	 */
-	private boolean detailsOpened = false;
-
-	/**
-	 * This flag indicates if the support area was opened before switching the
-	 * modality or not.
-	 */
-	private boolean trayOpened = false;
+	static final QualifiedName HINT = new QualifiedName(
+			IStatusAdapterConstants.PROPERTY_PREFIX, "hint"); //$NON-NLS-1$
 
-	/**
-	 * This field contains the support provider set by the user.
-	 */
-	private AbstractStatusAreaProvider userSupportProvider;
-
-	/**
-	 * Main dialog image holder.
-	 */
-	private Label titleImageLabel;
-
-	/**
-	 * Message in the header.
-	 */
-	private Label mainMessageLabel;
-
-	/**
-	 * Header area.
-	 */
-	private Composite titleArea;
-	
-	/**
-	 * The decorator that is used to modify a message extracted from the
-	 * StatusAdapter.
-	 */
-	private ILabelDecorator messageDecorator;
-
-	/**
-	 * This fields indicates if OK statuses should be handled or ignored.
-	 */
-	private boolean handleOKStatuses = false;
-
-	private boolean supportForErrorLog = false;
-
-	private boolean hideSupportButton = false;
+	private WorkbenchStatusDialogManagerImpl manager;
 
 	/**
 	 * Creates workbench status dialog.
@@ -1142,14 +80,7 @@ public class WorkbenchStatusDialogManager {
 	 */
 	
 	public WorkbenchStatusDialogManager(int displayMask, String dialogTitle) {
-		
-		Assert.isNotNull(Display.getCurrent(),
-						"WorkbenchStatusDialogManager must be instantiated in UI thread"); //$NON-NLS-1$
-
-		this.displayMask = displayMask;
-		this.title = dialogTitle == null ? JFaceResources
-				.getString("Problem_Occurred") : //$NON-NLS-1$
-				dialogTitle;
+		manager = new WorkbenchStatusDialogManagerImpl(displayMask, dialogTitle);
 	}
 	
 	/**
@@ -1167,7 +98,6 @@ public class WorkbenchStatusDialogManager {
 	 */
 	public WorkbenchStatusDialogManager(Shell parentShell, int displayMask,
 			String dialogTitle) {
-
 		this(displayMask, dialogTitle);
 	}
 
@@ -1223,334 +153,7 @@ public class WorkbenchStatusDialogManager {
 	 */
 	public void addStatusAdapter(final StatusAdapter statusAdapter,
 			final boolean modal) {
-
-		if (ErrorDialog.AUTOMATED_MODE == true) {
-			return;
-		}
-		
-		Assert.isNotNull(Display.getCurrent(),
-						"WorkbenchStatusDialogManager#addStatusAdapter must be called from UI thread"); //$NON-NLS-1$
-
-		if (!PlatformUI.isWorkbenchRunning()) {
-			// we are shutting down, so just log
-			WorkbenchPlugin.log(statusAdapter.getStatus());
-			return;
-		}
-		
-		// if statusAdapter does not match the mask, ignore it
-		if (!shouldAccept(statusAdapter, displayMask)) {
-			return;
-		}
-
-		// Add the error in the UI thread to ensure thread safety in the
-		// dialog
-		if (dialog == null || dialog.getShell().isDisposed()) {
-
-			errors.add(statusAdapter);
-			modals.put(statusAdapter, new Boolean(modal));
-			// Delay prompting if the status adapter property is set
-			if (shouldPrompt(statusAdapter)) {
-				// notify all interested parties that status adapters will be
-				// handled
-				StatusManager.getManager().fireNotification(
-						INotificationTypes.HANDLED,
-						(StatusAdapter[]) errors
-								.toArray(new StatusAdapter[] {}));
-				
-				if (dialog == null) {
-					dialog = new InternalDialog(getParentShell(),
-							WorkbenchStatusDialogManager.this, shouldBeModal());
-					setSelectedStatusAdapter(statusAdapter);
-					dialog.open();
-					dialog.getShell().addDisposeListener(disposeListener);
-				}
-				refresh();
-				refreshDialogSize();
-				if(supportTray.providesSupport() && showSupport){
-					openTray(supportTray);
-				}
-			}
-
-		} else {
-			StatusManager.getManager().fireNotification(
-					INotificationTypes.HANDLED,
-					new StatusAdapter[] { statusAdapter });
-			if (statusAdapter
-					.getProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY) != null) {
-				statusAdapter.setProperty(
-						IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY,
-						Boolean.FALSE);
-			}
-			openStatusDialog(modal, statusAdapter);
-		}
-	}
-
-	/**
-	 * This method closes the dialog.
-	 */
-	private boolean close() {
-		if (detailsOpened) {
-			toggleDetailsArea();
-		}
-		if (trayOpened) {
-			closeTray();
-		}
-		shellBounds = getShell().getBounds();
-		statusListViewer = null;
-		boolean result = this.dialog.close();
-		if (!modalitySwitch) {
-			ProgressManagerUtil.animateDown(shellBounds);
-		}
-		return result;
-	}
-
-	/**
-	 * Closes the dialog tray (it is support area at the right side of the
-	 * dialog)
-	 * 
-	 * @throws IllegalStateException
-	 */
-	private void closeTray() throws IllegalStateException {
-		this.dialog.closeTray();
-	}
-
-	/**
-	 * This method creates button bar that is available on the bottom of the
-	 * dialog.
-	 */
-	private Control createButtonBar(Composite parent) {
-		Composite composite = new Composite(parent, SWT.NONE);
-		GridLayout layout = new GridLayout();
-		layout.marginWidth = dialog
-				.convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
-		layout.marginHeight = dialog
-				.convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
-		composite.setLayout(layout);
-		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
-		linkComposite = createLinkComposite(composite);
-
-		// Add the buttons to the button bar.
-		createButtonsForButtonBar(composite);
-
-		composite.layout();
-		return composite;
-	}
-
-	/**
-	 * This method creates buttons that are placed on button bar.
-	 */
-	private void createButtonsForButtonBar(Composite parent) {
-		IAction gotoAction = getGotoAction();
-		String text = null;
-		if (gotoAction != null) {
-			text = gotoAction.getText();
-		}
-		Button button = dialog.createButton(parent, GOTO_ACTION_ID,
-				text == null ? "" : text, //$NON-NLS-1$
-				false);
-		if (text == null)
-			hideButton(button, true);
-
-		dialog.createButton(parent, IDialogConstants.OK_ID,
-				IDialogConstants.OK_LABEL, true);
-
-		dialog.createButton(parent, IDialogConstants.DETAILS_ID,
-				IDialogConstants.SHOW_DETAILS_LABEL, false);
-	}
-
-	/**
-	 * This method creates dialog area.
-	 */
-	private Control createDialogArea(Composite parent) {
-		createTitleArea(parent);
-		createListArea(parent);
-		dialogArea = parent;
-		Dialog.applyDialogFont(dialogArea);
-		return parent;
-	}
-
-	/**
-	 * Create an area which allows the user to view the status if only one is
-	 * created or to select one of reported statuses when there are many.
-	 * 
-	 * @param parent
-	 *            the parent composite on which all components should be placed.
-	 */
-	private void createListArea(Composite parent) {
-		listArea = new Composite(parent, SWT.NONE);
-		GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
-		layoutData.heightHint = 0;
-		layoutData.widthHint = 0;
-		listArea.setLayoutData(layoutData);
-		GridLayout layout = new GridLayout();
-		listArea.setLayout(layout);
-		if(getStatusAdapters().size() > 1){
-			fillListArea(listArea);
-		}
-	}
-
-	/**
-	 * This method creates additional display area for {@link StatusAdapter}
-	 * when only one is available.
-	 * 
-	 * It creates one label on a composite currently for secondary message.
-	 * 
-	 * @param parent
-	 *            A parent composite on which all components should be placed.
-	 * @return composite the composite on which are all components for
-	 *         displaying status when only one is available.
-	 */
-	private Composite createSingleStatusDisplayArea(Composite parent) {
-		// secondary message is displayed on separate composite with no margins
-		Composite singleStatusParent = new Composite(parent, SWT.NONE);
-		GridLayout gridLayout = new GridLayout();
-		gridLayout.marginWidth = 0;
-		singleStatusParent.setLayout(gridLayout);
-		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
-		singleStatusParent.setLayoutData(gd);
-
-		// label that wraps
-		singleStatusLabel = new Label(singleStatusParent, SWT.WRAP);
-		GridData labelLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
-		labelLayoutData.widthHint = dialog.convertWidthInCharsToPixels(50);
-		singleStatusLabel.setLayoutData(labelLayoutData);
-		// main message set up early, to address bug 222391
-		singleStatusLabel.setText(labelProviderWrapper.getColumnText(
-				statusAdapter, 0));
-
-		singleStatusLabel.addMouseListener(new MouseListener() {	
-			public void mouseDoubleClick(MouseEvent e) {
-			}
-
-			public void mouseDown(MouseEvent e) {
-				showDetailsArea();
-			}
-
-			public void mouseUp(MouseEvent e) {
-			}
-		});
-		return singleStatusParent;
-	}
-
-	/**
-	 * Creates a new control that provides access to support providers.
-	 * <p>
-	 * The <code>WorkbenchStatusDialog</code> implementation of this method
-	 * creates the control, registers it for selection events including
-	 * selection, Note that the parent's layout is assumed to be a
-	 * <code>GridLayout</code> and the number of columns in this layout is
-	 * incremented. Subclasses may override.
-	 * </p>
-	 * 
-	 * @param parent
-	 *            A parent composite on which all components should be placed.
-	 * @return the report control
-	 */
-	private Composite createLinkComposite(Composite parent) {
-		Composite linkArea = new Composite(parent, SWT.NONE) {
-
-			// the composite should be as small as possible when there is no
-			// additional controls on it
-			public Point computeSize(int wHint, int hHint, boolean changed) {
-				Point newSize = super.computeSize(wHint, hHint, changed); 
-				if (getChildren().length == 0) {
-					newSize.x = 0;
-					newSize.y = 0;
-				}
-				return newSize;
-			}
-
-		};
-		GridLayout layout = new GridLayout();
-		layout.marginHeight = 0;
-		layout.marginWidth = 0;
-		layout.verticalSpacing = 0;
-		linkArea.setLayout(layout);
-
-		((GridLayout) parent.getLayout()).numColumns++;
-
-		GridData layoutData = new GridData(SWT.BEGINNING, SWT.CENTER, true,
-				false);
-		linkArea.setLayoutData(layoutData);
-		return linkArea;
-	}
-
-	/**
-	 * Creates a button with a report image. This is only used if there is an
-	 * image available.
-	 */
-	private Link createGetSupportLink() {
-		// no support
-		if (!supportTray.providesSupport() || hideSupportButton) {
-			return null;
-		}
-
-		Link link = new Link(linkComposite, SWT.NONE);
-		link.setText(WorkbenchMessages.WorkbenchStatusDialog_SupportHyperlink);
-		link.setToolTipText(WorkbenchMessages.WorkbenchStatusDialog_SupportTooltip);
-		link.addSelectionListener(new SelectionAdapter() {
-			public void widgetSelected(SelectionEvent e) {
-				openTray(supportTray);
-			}
-		});
-		Dialog.applyDialogFont(link);
-		return link;
-	}
-
-	private Link createShowErrorLogLink() {
-		Link link = new Link(linkComposite, SWT.NONE);
-		link.addSelectionListener(new SelectionAdapter(){
-			public void widgetSelected(SelectionEvent e) {
-				try {
-					Workbench.getInstance().getActiveWorkbenchWindow()
-							.getActivePage().showView(LOG_VIEW_ID);
-				} catch (CoreException ce) {
-					StatusManager.getManager().handle(ce,
-							WorkbenchPlugin.PI_WORKBENCH);
-				}
-			}
-		});
-		link.setText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogHyperlink);
-		link.setToolTipText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogTooltip);
-		Dialog.applyDialogFont(link);
-		return link;
-	}
-
-	/**
-	 * Creates title area.
-	 * 
-	 * @param parent
-	 *            A composite on which the title area should be created.
-	 */
-	private void createTitleArea(Composite parent) {
-		titleArea = new Composite(parent, SWT.NONE);
-		titleArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
-		GridLayout layout = new GridLayout();
-		layout.numColumns = 2;
-		layout.horizontalSpacing = 10;
-		layout.marginLeft = 10;
-		layout.marginTop = 10;
-		layout.marginBottom = 0;
-		titleArea.setLayout(layout);
-
-		titleImageLabel = new Label(titleArea, SWT.NONE);
-		titleImageLabel.setImage(getImage());
-		GridData layoutData = new GridData();
-		layoutData.verticalSpan = 2;
-		layoutData.verticalAlignment = SWT.TOP;
-		titleImageLabel.setLayoutData(layoutData);
-
-		GridData messageData = new GridData(SWT.FILL, SWT.FILL, true, true);
-		messageData.widthHint = dialog.convertWidthInCharsToPixels(50);
-		mainMessageLabel = new Label(titleArea, SWT.WRAP);
-		mainMessageLabel.setLayoutData(messageData);
-		// main message set up early, to address bug 222391
-		mainMessageLabel.setText(getMainMessage(statusAdapter));
-		if (getStatusAdapters().size() == 1) {
-			singleStatusDisplayArea = createSingleStatusDisplayArea(titleArea);
-		}
+		manager.addStatusAdapter(statusAdapter, modal);
 	}
 
 	/**
@@ -1561,290 +164,9 @@ public class WorkbenchStatusDialogManager {
 	 *            true enables, false disables default support
 	 */
 	public void enableDefaultSupportArea(boolean enable) {
-		supportTray.enableDefaultSupportArea(enable);
-	}
-
-	/**
-	 * This method creates display area for {@link StatusAdapter}s when more is
-	 * available.
-	 * 
-	 * @param parent
-	 *            A parent composite on which all components should be placed.
-	 */
-	private void fillListArea(Composite parent) {
-		// it is necessary to make list parent composite taller
-		GridData listAreaGD = (GridData) parent.getLayoutData();
-		listAreaGD.grabExcessHorizontalSpace = true;
-		listAreaGD.grabExcessVerticalSpace = true;
-		listAreaGD.heightHint = SWT.DEFAULT;
-
-		// create list viewer
-		statusListViewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL
-				| SWT.V_SCROLL | SWT.BORDER);
-		statusListViewer.setComparator(getViewerComparator());
-		Control control = statusListViewer.getControl();
-		GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
-		data.heightHint = dialog.convertHeightInCharsToPixels(5);
-		statusListViewer.addSelectionChangedListener(supportTray);
-		control.setLayoutData(data);
-		initContentProvider();
-		initLabelProvider();
-		statusListViewer
-				.addSelectionChangedListener(new ISelectionChangedListener() {
-					public void selectionChanged(SelectionChangedEvent event) {
-						handleSelectionChange();
-					}
-				});
-		Dialog.applyDialogFont(parent);
-	}
-
-	/**
-	 * Returns {@link IAction} associated with selected StatusAdapter.
-	 * 
-	 * @return {@link IAction} that is set as {@link StatusAdapter} property
-	 *         with Job.class key.
-	 */
-	private IAction getGotoAction() {
-		Object property = null;
-
-		Job job = (Job) (statusAdapter.getAdapter(Job.class));
-		if (job != null) {
-			property = job.getProperty(IProgressConstants.ACTION_PROPERTY);
-		}
-
-		if (property instanceof IAction) {
-			return (IAction) property;
-		}
-		return null;
-	}
-
-	/**
-	 * Gets {@link Image} associated with current {@link StatusAdapter}
-	 * severity.
-	 * 
-	 * @return {@link Image} associated with current {@link StatusAdapter}
-	 *         severity.
-	 */
-	private Image getImage() {
-		if (statusAdapter != null) {
-			int severity = statusAdapter.getStatus().getSeverity();
-			switch (severity) {
-			case IStatus.OK:
-			case IStatus.INFO:
-			case IStatus.CANCEL:
-				return getSWTImage(SWT.ICON_INFORMATION);
-			case IStatus.WARNING:
-				return getSWTImage(SWT.ICON_WARNING);
-			default: /* IStatus.ERROR */
-				return getSWTImage(SWT.ICON_ERROR);
-			}
-		}
-		// should not never happen but if we do not know what is going on, then
-		// return error image.
-		return getSWTImage(SWT.ICON_ERROR);
-	}
-
-	/**
-	 * Get an <code>Image</code> from the provide SWT image constant.
-	 * 
-	 * @param imageID
-	 *            the SWT image constant
-	 * @return image the image
-	 */
-	private Image getSWTImage(final int imageID) {
-		return getShell().getDisplay().getSystemImage(imageID);
-	}
-
-	/**
-	 * This method computes the dialog main message.
-	 * 
-	 * If there is only one reported status adapter, main message should be:
-	 * <ul>
-	 * <li>information about job that reported an error.</li>
-	 * <li>primary message, if the statusAdapter was not reported by job</li>
-	 * </ul>
-	 * 
-	 * If there is more reported statusAdapters, main message should be:
-	 * <ul>
-	 * <li>primary message for job reported statusAdapters</li>
-	 * <li>secondary message for statuses not reported by jobs</li>
-	 * </ul>
-	 * 
-	 * If nothing can be found, some general information should be displayed.
-	 * 
-	 * @param statusAdapter
-	 *            A status adapter which is used as the base for computation.
-	 * @return main message of the dialog.
-	 * 
-	 * @see WorkbenchStatusDialogManager#getPrimaryMessage(StatusAdapter)
-	 * @see WorkbenchStatusDialogManager#getSecondaryMessage(StatusAdapter)
-	 * @see WorkbenchStatusDialogManager#setStatusListLabelProvider(ITableLabelProvider)
-	 */
-	private String getMainMessage(StatusAdapter statusAdapter) {
-		if (errors.size() == 1) {
-			Job job = (Job) (statusAdapter.getAdapter(Job.class));
-			// job
-			if (job != null) {
-				return NLS
-						.bind(
-								WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurredInJob,
-								job.getName());
-			}
-			// we are not handling job
-			return getPrimaryMessage(statusAdapter);
-		}
-		// we have a list. primary message or job name or on the list name (both
-		// with timestamp if available).
-		// we display secondary message or status
-		if (errors.size() > 1) {
-			Job job = (Job) (statusAdapter.getAdapter(Job.class));
-			// job
-			if (job != null) {
-				return getPrimaryMessage(statusAdapter);
-			}
-
-			// plain status
-			return getSecondaryMessage(statusAdapter);
-		}
-		return WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
-	}
-
-	/**
-	 * Return the parent shell.
-	 * 
-	 * @return the parent shell of the dialog.
-	 */
-	private Shell getParentShell() {
-		return ProgressManagerUtil.getDefaultParent();
-	}
-
-	/**
-	 * Retrieves primary message from passed statusAdapter. Primary message
-	 * should be (from the most important):
-	 * <ul>
-	 * <li>statusAdapter title</li>
-	 * <li>IStatus message</li>
-	 * <li>pointing to child statuses if IStatus has them.</li>
-	 * <li>exception message</li>
-	 * <li>exception class</li>
-	 * <li>general message informing about error (no details at all)</li>
-	 * </ul>
-	 * 
-	 * @param statusAdapter
-	 *            an status adapter to retrieve primary message from
-	 * @return String containing primary message
-	 * 
-	 * @see WorkbenchStatusDialogManager#getMainMessage(StatusAdapter)
-	 * @see WorkbenchStatusDialogManager#getSecondaryMessage(StatusAdapter)
-	 */
-	private String getPrimaryMessage(StatusAdapter statusAdapter) {
-		// if there was nonempty title set, display the title
-		Object property = statusAdapter
-				.getProperty(IStatusAdapterConstants.TITLE_PROPERTY);
-		if (property instanceof String) {
-			String header = (String) property;
-			if (header.trim().length() > 0) {
-				return decorate(header, statusAdapter);
-			}
-		}
-		// if there was message set in the status
-		IStatus status = statusAdapter.getStatus();
-		if (status.getMessage() != null
-				&& status.getMessage().trim().length() > 0) {
-			return decorate(status.getMessage(), statusAdapter);
-		}
-
-		// if status has children
-		if (status.getChildren().length > 0) {
-			return WorkbenchMessages.WorkbenchStatusDialog_StatusWithChildren;
-		}
-
-		// check the exception
-		Throwable t = status.getException();
-		if (t != null) {
-			if (t.getMessage() != null && t.getMessage().trim().length() > 0) {
-				return decorate(t.getMessage(), statusAdapter);
-			}
-			return t.getClass().getName();
-		}
-		return WorkbenchMessages.WorkbenchStatusDialog_ProblemOccurred;
-	}
-
-	/**
-	 * Retrieves secondary message from the passed statusAdapter. Secondary
-	 * message is one level lower than primary. Secondary message should be
-	 * (from the most important):
-	 * <ul>
-	 * <li>IStatus message</li>
-	 * <li>pointing to child statuses if IStatus has them.</li>
-	 * <li>exception message</li>
-	 * <li>exception class</li>
-	 * </ul>
-	 * Secondary message should not be the same as primary one. If no secondary
-	 * message can be extracted, details should be pointed.
-	 * 
-	 * @param statusAdapter
-	 *            an status adapter to retrieve secondary message from
-	 * @return String containing secondary message
-	 * 
-	 * @see WorkbenchStatusDialogManager#getMainMessage(StatusAdapter)
-	 * @see WorkbenchStatusDialogManager#getPrimaryMessage(StatusAdapter)
-	 */
-	private String getSecondaryMessage(StatusAdapter statusAdapter) {
-		String primary = getPrimaryMessage(statusAdapter);
-		// we can skip the title, it is always displayed as primary message
-
-		// if there was message set in the status
-		IStatus status = statusAdapter.getStatus();
-		String message = status.getMessage();
-		String decoratedMessage = message == null ? null : decorate(message,
-				statusAdapter);
-		if (message != null && message.trim().length() > 0
-				&& !primary.equals(decoratedMessage)) { 
-			/* we have not displayed it yet */
-			return decoratedMessage;
-		}
-		// if status has children
-		if (status.getChildren().length > 0
-				&& !primary.equals(decoratedMessage)) {
-			return WorkbenchMessages.WorkbenchStatusDialog_StatusWithChildren;
-		}
-
-		// check the exception
-		Throwable t = status.getException();
-		if (t != null) {
-			if (t.getMessage() != null) {
-				String decoratedThrowable = decorate(t.getMessage(),
-						statusAdapter);
-				if (t.getMessage().trim().length() > 0
-						&& !primary.equals(decoratedThrowable)) {
-					return decoratedThrowable;
-				}
-			}
-			String throwableName = t.getClass().getName();
-			if (!primary.equals(throwableName)) {
-				return throwableName;
-			}
-		}
-		return WorkbenchMessages.WorkbenchStatusDialog_SeeDetails;
-	}
-
-	/**
-	 * Get the single selection. Return null if the selection is not just one
-	 * element.
-	 * 
-	 * @return StatusAdapter or <code>null</code>.
-	 */
-	private StatusAdapter getSingleSelection() {
-		ISelection rawSelection = statusListViewer.getSelection();
-		if (rawSelection != null
-				&& rawSelection instanceof IStructuredSelection) {
-			IStructuredSelection selection = (IStructuredSelection) rawSelection;
-			if (selection.size() == 1) {
-				return (StatusAdapter) selection.getFirstElement();
-			}
-		}
-		return null;
+		manager.getDialogState().put(
+				IStatusDialogConstants.ENABLE_DEFAULT_SUPPORT_AREA,
+				Boolean.valueOf(enable));
 	}
 
 	/**
@@ -1853,250 +175,7 @@ public class WorkbenchStatusDialogManager {
 	 * @return collection of {@link StatusAdapter} objects
 	 */
 	public Collection getStatusAdapters() {
-		return Collections.unmodifiableCollection(errors);
-	}
-
-	/**
-	 * Return a viewer sorter for looking at the jobs.
-	 * 
-	 * @return ViewerSorter
-	 */
-	private ViewerComparator getViewerComparator() {
-		return new ViewerComparator() {
-			private int compare(StatusAdapter s1, StatusAdapter s2) {
-				Long timestamp1 = ((Long) s1
-						.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY));
-				Long timestamp2 = ((Long) s2
-						.getProperty(IStatusAdapterConstants.TIMESTAMP_PROPERTY));
-				if (timestamp1 == null || timestamp2 == null
-						|| (timestamp1.equals(timestamp2))) {
-					String text1 = labelProviderWrapper.getColumnText(s1, 0);
-					String text2 = labelProviderWrapper.getColumnText(s2, 0);
-					return text1.compareTo(text2);
-				}
-
-				if (timestamp1.longValue() < timestamp2.longValue()) {
-					return -1;
-				}
-				if (timestamp1.longValue() > timestamp2.longValue()) {
-					return 1;
-				}
-				// should be never called
-				return 0;
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer,
-			 *      java.lang.Object, java.lang.Object)
-			 */
-			public int compare(Viewer testViewer, Object o1, Object o2) {
-				if (o1 instanceof StatusAdapter && o2 instanceof StatusAdapter) {
-					return compare((StatusAdapter) o1, (StatusAdapter) o2);
-				}
-				// should not happen
-				if (o1.hashCode() < o2.hashCode()) {
-					return -1;
-				}
-				if (o2.hashCode() > o2.hashCode()) {
-					return 1;
-				}
-				return 0;
-			}
-		};
-	}
-
-	/**
-	 * The selection in the multiple job list has changed. Update widget
-	 * enablements, repopulate the list and show details.
-	 */
-	private void handleSelectionChange() {
-		StatusAdapter newSelection = getSingleSelection();
-		if (newSelection != null) {
-			setSelectedStatusAdapter(newSelection);
-			showDetailsArea();
-			refresh();
-		}
-	}
-
-	/**
-	 * Sets the content provider for the viewer.
-	 */
-	private void initContentProvider() {
-		IContentProvider provider = new IStructuredContentProvider() {
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
-			 */
-			public void dispose() {
-				// Nothing of interest here
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
-			 */
-			public Object[] getElements(Object inputElement) {
-				return getStatusAdapters().toArray();
-			}
-
-			/*
-			 * (non-Javadoc)
-			 * 
-			 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
-			 *      java.lang.Object, java.lang.Object)
-			 */
-			public void inputChanged(Viewer viewer, Object oldInput,
-					Object newInput) {
-				if (newInput != null) {
-					refreshStatusListArea();
-				}
-			}
-		};
-		statusListViewer.setContentProvider(provider);
-		statusListViewer.setInput(this);
-		statusListViewer.setSelection(new StructuredSelection(statusAdapter));
-	}
-
-	/**
-	 * This method should initialize the dialog bounds.
-	 */
-	private void initializeBounds() {
-		refreshDialogSize();
-		if (!modalitySwitch) {
-			Rectangle shellPosition = getShell().getBounds();
-			ProgressManagerUtil.animateUp(shellPosition);
-		} else {
-			getShell().setBounds(shellBounds);
-		}
-	}
-
-	/**
-	 * Sets initial label provider.
-	 */
-	private void initLabelProvider() {
-		statusListViewer.setLabelProvider(labelProviderWrapper);
-	}
-
-	/*
-	 * Prompt to inform the user that the dialog will close and the errors
-	 * cleared.
-	 */
-	private boolean isPromptToClose() {
-		IPreferenceStore store = WorkbenchPlugin.getDefault()
-				.getPreferenceStore();
-		if (!store.contains(PREF_SKIP_GOTO_ACTION_PROMPT)
-				|| !store.getString(PREF_SKIP_GOTO_ACTION_PROMPT).equals(
-						MessageDialogWithToggle.ALWAYS)) {
-			MessageDialogWithToggle dialog = MessageDialogWithToggle.open(
-					MessageDialog.CONFIRM, getShell(),
-					ProgressMessages.JobErrorDialog_CloseDialogTitle,
-					ProgressMessages.JobErrorDialog_CloseDialogMessage,
-					ProgressMessages.JobErrorDialog_DoNotShowAgainMessage,
-					false, store, PREF_SKIP_GOTO_ACTION_PROMPT, SWT.SHEET);
-			return dialog.getReturnCode() == Window.OK;
-		}
-		return true;
-	}
-
-	/**
-	 * Opens status dialog with particular statusAdapter selected.
-	 * 
-	 * @param modal
-	 *            decides if window is modal or not.
-	 * @param statusAdapter
-	 *            status adapter to be selected.
-	 */
-	private void openStatusDialog(final boolean modal,
-			final StatusAdapter statusAdapter) {
-		errors.add(statusAdapter);
-		modals.put(statusAdapter, new Boolean(modal));
-		boolean shouldBeModal = shouldBeModal();
-		if (shouldBeModal ^ dialog.isModal()) {
-			dialog.getShell().removeDisposeListener(disposeListener);
-			modalitySwitch = true;
-			close();
-			dialog = new InternalDialog(getParentShell(), this, modal);
-			dialog.open();
-			dialog.getShell().addDisposeListener(disposeListener);
-			modalitySwitch = false;
-		}
-		refresh();
-	}
-
-	/**
-	 * Opens the dialog tray (support area at the right side of the dialog)
-	 */
-	private void openTray(DialogTray tray) throws IllegalStateException,
-			UnsupportedOperationException {
-		if (launchTrayLink != null) {
-			launchTrayLink.setEnabled(false);
-		}
-		this.dialog.openTray(tray);
-		trayOpened = true;
-	}
-
-	/**
-	 * Method which should be invoked when new errors become available for
-	 * display.
-	 */
-	private void refresh() {
-		if (dialog == null) {
-			return;
-		}
-		if (dialogArea == null || dialogArea.isDisposed()) {
-			return;
-		}
-		updateTitleArea();
-		updateListArea();
-		updateEnablements();
-		// adjust width if necessary
-		Point currentSize = getShell().getSize();
-		Point desiredSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		if(currentSize.x < desiredSize.x){
-			getShell().setSize(desiredSize.x, currentSize.y);
-		} else {
-			getShell().layout();
-		}
-	}
-
-	private void refreshDialogSize() {
-		Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		getShell().setSize(newSize);
-	}
-
-	/**
-	 * Refreshes the single status area. Is called only when there is one and
-	 * only one error.
-	 */
-	private void refreshSingleStatusArea() {
-		String description = labelProviderWrapper.getColumnText(
-				statusAdapter, 0);
-		if (description.equals(singleStatusLabel.getText()))
-			singleStatusLabel.setText(" "); //$NON-NLS-1$
-		singleStatusLabel.setText(description);
-		singleStatusDisplayArea.layout();
-		getShell().setText(title);
-	}
-
-	/**
-	 * Refresh the contents of the viewer.
-	 */
-	private void refreshStatusListArea() {
-		if (statusListViewer != null
-				&& !statusListViewer.getControl().isDisposed()) {
-			statusListViewer.refresh();
-			if (statusListViewer.getTable().getItemCount() > 1) {
-				getShell()
-						.setText(
-								WorkbenchMessages.WorkbenchStatusDialog_MultipleProblemsHaveOccured);
-			} else {
-				getShell().setText(this.title);
-			}
-		}
+		return manager.getStatusAdapters();
 	}
 
 	/**
@@ -2107,19 +186,8 @@ public class WorkbenchStatusDialogManager {
 	 *            A details area provider to be set.
 	 */
 	public void setDetailsAreaProvider(AbstractStatusAreaProvider provider) {
-		this.detailsManager.setDetailsAreaProvider(provider);
-	}
-
-	/**
-	 * Sets current status adapter.
-	 * 
-	 * @param statusAdapter
-	 *            The statusAdapter to set.
-	 */
-	private void setSelectedStatusAdapter(StatusAdapter statusAdapter) {
-		if (this.statusAdapter != statusAdapter) {
-			this.statusAdapter = statusAdapter;
-		}
+		manager.setProperty(IStatusDialogConstants.CUSTOM_DETAILS_PROVIDER,
+				provider);
 	}
 
 	/**
@@ -2138,8 +206,7 @@ public class WorkbenchStatusDialogManager {
 	 *            a label provider to be used when displaying status adapters.
 	 */
 	public void setStatusListLabelProvider(ITableLabelProvider labelProvider) {
-		Assert.isLegal(labelProvider != null, "Label Provider cannot be null"); //$NON-NLS-1$
-		labelProviderWrapper.setLabelProvider(labelProvider);
+		manager.setStatusListLabelProvider(labelProvider);
 	}
 
 	/**
@@ -2156,228 +223,8 @@ public class WorkbenchStatusDialogManager {
 	 *            Support provider to be set.
 	 */
 	public void setSupportAreaProvider(AbstractStatusAreaProvider provider) {
-		userSupportProvider = provider;
-	}
-
-	/**
-	 * Decides if dialog should be modal. Dialog will be modal if any of the
-	 * statuses contained by StatusAdapters had been reported with
-	 * {@link StatusManager#BLOCK} flag.
-	 * 
-	 * @return true if any StatusHandler should be displayed in modal window
-	 */
-	private boolean shouldBeModal() {
-		for (Iterator it = modals.keySet().iterator(); it.hasNext();) {
-			Object o = it.next();
-			Object value = modals.get(o);
-			if (value instanceof Boolean) {
-				Boolean b = (Boolean) value;
-				if (b.booleanValue()) {
-					return true;
-				}
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Checks if the user should be prompted immediately about
-	 * {@link StatusAdapter}
-	 * 
-	 * @param statusAdapter
-	 *            to be checked.
-	 * @return true if the statusAdapter should be prompted, false otherwise.
-	 */
-	private boolean shouldPrompt(final StatusAdapter statusAdapter) {
-		Object noPromptProperty = statusAdapter
-				.getProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY);
-
-		boolean prompt = true;
-		if (noPromptProperty instanceof Boolean) {
-			prompt = !((Boolean) noPromptProperty).booleanValue();
-		}
-		return prompt;
-	}
-
-	/**
-	 * Show the details portion of the dialog if it is not already visible. This
-	 * method will only work when it is invoked after the control of the dialog
-	 * has been set. In other words, after the <code>createContents</code>
-	 * method has been invoked and has returned the control for the content area
-	 * of the dialog. Invoking the method before the content area has been set
-	 * or after the dialog has been disposed will have no effect.
-	 */
-	private void showDetailsArea() {
-		if (dialogArea != null && !dialogArea.isDisposed()) {
-			if (detailsManager.isOpen()) {
-				detailsManager.close();
-				detailsManager.createDetailsArea(dialogArea, statusAdapter);
-			} else {
-				toggleDetailsArea();
-				detailsOpened = true;
-			}
-			dialogArea.layout();
-		}
-	}
-
-	/**
-	 * Toggles the unfolding of the details area. This is triggered by the user
-	 * pressing the details button.
-	 * 
-	 */
-	private boolean toggleDetailsArea() {
-		boolean opened = false;
-		Point windowSize = getShell().getSize();
-		if (detailsManager.isOpen()) {
-			detailsManager.close();
-			dialog.getButton(IDialogConstants.DETAILS_ID).setText(
-					IDialogConstants.SHOW_DETAILS_LABEL);
-			opened = false;
-		} else {
-			detailsManager.createDetailsArea(dialogArea, statusAdapter);
-			dialog.getButton(IDialogConstants.DETAILS_ID).setText(
-					IDialogConstants.HIDE_DETAILS_LABEL);
-			opened = true;
-		}
-		if(getStatusAdapters().size() == 1){
-			GridData gd = (GridData) listArea.getLayoutData();
-			if(opened){
-				gd.heightHint = 0;
-				gd.grabExcessVerticalSpace = false;
-			} else {
-				gd.grabExcessVerticalSpace = true;
-			}
-			listArea.setLayoutData(gd);
-		}
-		Point newSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		int diffY = newSize.y - windowSize.y;
-		// increase the dialog height if details were opened and such increase is necessary
-		// decrease the dialog height if details were closed and empty space appeared
-		if ((opened && diffY > 0) || (!opened && diffY < 0)) {
-			getShell().setSize(new Point(windowSize.x, windowSize.y + (diffY)));
-		}
-		dialogArea.layout();
-		return opened;
-	}
-
-	/**
-	 * Update the button enablements
-	 */
-	private void updateEnablements() {
-		Button details = dialog.getButton(IDialogConstants.DETAILS_ID);
-		if (details != null) {
-			details.setEnabled(true);
-		}
-		Button gotoButton = dialog.getButton(GOTO_ACTION_ID);
-		if (gotoButton != null) {
-			IAction gotoAction = getGotoAction();
-			boolean hasValidGotoAction = (gotoAction != null)
-					&& (gotoAction.getText() != null);
-			if (hasValidGotoAction) {
-				hideButton(gotoButton, false);
-				gotoButton.setText(gotoAction.getText());
-
-				((GridData) gotoButton.getLayoutData()).widthHint = gotoButton
-						.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
-				gotoButton.getParent().layout();
-			} else
-				hideButton(gotoButton, true);
-		}
-		// and tray enablement button
-		if (supportTray.providesSupport() && !hideSupportButton) {
-			if(launchTrayLink == null || launchTrayLink.isDisposed()){
-				launchTrayLink = createGetSupportLink();
-			}
-			launchTrayLink.setEnabled(!trayOpened);
-		} else {
-			if(launchTrayLink != null && !launchTrayLink.isDisposed()){
-				launchTrayLink.dispose();
-				launchTrayLink = null;
-			}
-		}
-		IViewDescriptor descriptor = shouldDisplayLinkToErrorLog();
-		if (descriptor != null) {
-			if (showErrorLogLink == null || showErrorLogLink.isDisposed()) {
-				showErrorLogLink = createShowErrorLogLink();
-			}
-		} else {
-			if (showErrorLogLink != null && !showErrorLogLink.isDisposed()) {
-				showErrorLogLink.dispose();
-			}
-		}
-		linkComposite.getParent().layout();
-	}
-
-	private IViewDescriptor shouldDisplayLinkToErrorLog(){
-		/* no support for error log */
-		if(!supportForErrorLog) {
-			return null;
-		}
-		/* view description */
-		return Workbench.getInstance().getViewRegistry().find(LOG_VIEW_ID);
-	}
-
-	/**
-	 * Hide the button if hide is <code>true</code>.
-	 * 
-	 * @param button
-	 * @param hide
-	 */
-	private void hideButton(Button button, boolean hide) {
-		((GridData) button.getLayoutData()).exclude = hide;
-		button.setVisible(!hide);
-		button.setEnabled(!hide);
-	}
-
-	/**
-	 * This methods switches StatusAdapters presentation depending if there is
-	 * one status or more.
-	 */
-	private void updateListArea() {
-		// take care about list area if there is more than one status
-		if (errors.size() > 1) {
-			if (singleStatusDisplayArea != null) {
-				singleStatusDisplayArea.dispose();
-			}
-			if (statusListViewer == null
-					|| statusListViewer.getControl().isDisposed()) {
-				fillListArea(listArea);
-				getShell().setSize(
-						getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT));
-			}
-			refreshStatusListArea();
-		}
-	}
-
-	/**
-	 * Updated title area. Adjust title, title message and title image according
-	 * to selected {@link StatusAdapter}.
-	 */
-	private void updateTitleArea() {
-		Image image = getImage();
-		titleImageLabel.setImage(image);
-		if (statusAdapter != null) {
-			mainMessageLabel.setText(getMainMessage(statusAdapter));
-		}
-		if (singleStatusDisplayArea != null) {
-			if (getStatusAdapters().size() > 1) {
-				singleStatusDisplayArea.dispose();
-			} else {
-				refreshSingleStatusArea();
-			}
-		}
-		titleArea.layout();
-	}
-
-	/**
-	 * Gets the shell of the managed dialog.
-	 * 
-	 * @see org.eclipse.jface.window.IShellProvider#getShell()
-	 */
-	private Shell getShell() {
-		if (this.dialog == null)
-			return null;
-		return this.dialog.getShell();
+		manager.setProperty(IStatusDialogConstants.CUSTOM_SUPPORT_PROVIDER,
+				provider);
 	}
 
 	/**
@@ -2409,16 +256,9 @@ public class WorkbenchStatusDialogManager {
 	 * @since 3.5
 	 */
 	public void setMessageDecorator(ILabelDecorator decorator){
-		this.messageDecorator = decorator;
+		manager.setMessageDecorator(decorator);
 	}
 	
-	private String decorate(String string, StatusAdapter adapter) {
-		if(messageDecorator != null){
-			string = messageDecorator.decorateText(string, adapter);
-		}
-		return string;
-	}
-
 	/**
 	 * This method sets various properties on the manager.
 	 * 
@@ -2431,15 +271,7 @@ public class WorkbenchStatusDialogManager {
 	 * @since 3.5
 	 */
 	public void setProperty(Object key, Object value){
-		if(key == IStatusDialogConstants.SHOW_SUPPORT){
-			showSupport = ((Boolean)value).booleanValue();
-		}
-		if(key == IStatusDialogConstants.ERRORLOG_LINK){
-			supportForErrorLog = ((Boolean)value).booleanValue();
-		}
-		if(key == IStatusDialogConstants.HANDLE_OK_STATUSES){
-			handleOKStatuses   = ((Boolean)value).booleanValue();
-		}
+		manager.setProperty(key, value);
 	}
 
 	/**
@@ -2452,19 +284,7 @@ public class WorkbenchStatusDialogManager {
 	 * @since 3.5
 	 */
 	public Object getProperty(Object key){
-		if(key == IStatusDialogConstants.SHELL){
-			return getShell();
-		}
-		if(key == IStatusDialogConstants.SHOW_SUPPORT){
-			return Boolean.valueOf(showSupport);
-		}
-		if(key == IStatusDialogConstants.ERRORLOG_LINK){
-			return Boolean.valueOf(supportForErrorLog);
-		}
-		if(key == IStatusDialogConstants.HANDLE_OK_STATUSES){
-			return Boolean.valueOf(handleOKStatuses);
-		}
-		return null;
+		return manager.getProperty(key);
 	}
 	
 	
@@ -2478,14 +298,6 @@ public class WorkbenchStatusDialogManager {
 	 * @since 3.5
 	 */
 	public void enableErrorDialogCompatibility(){
-		setProperty(IStatusDialogConstants.ERRORLOG_LINK, Boolean.FALSE);
-		setProperty(IStatusDialogConstants.HANDLE_OK_STATUSES, Boolean.TRUE);
-		setProperty(IStatusDialogConstants.SHOW_SUPPORT, Boolean.TRUE);
-		setHideShowSupportButton(true);
-	}
-	
-	private void setHideShowSupportButton(boolean enabled) {
-		this.hideSupportButton  = enabled;
-		
+		manager.enableErrorDialogCompatibility();
 	}
 }
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/ContributionInfo.java b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/ContributionInfo.java
new file mode 100644
index 0000000..64db48e
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/ContributionInfo.java	
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.ui.testing;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+
+/**
+ * Instances of this class describe a contribution of an element of a certain
+ * type to the UI.
+ * 
+ * @since 3.6
+ */
+public class ContributionInfo {
+
+	private String bundleId;
+	private String elementType;
+	private IConfigurationElement configurationElement;
+
+	/**
+	 * Creates a new instance.
+	 * 
+	 * @param bundleId
+	 * @param elementType
+	 *            a localized string describing the contribution (e.g., 'view',
+	 *            'editor', 'preference page')
+	 * @param configurationElement
+	 *            an optional configuration element, or <code>null</code>.
+	 */
+	public ContributionInfo(String bundleId, String elementType,
+			IConfigurationElement configurationElement) {
+		super();
+		this.bundleId = bundleId;
+		this.elementType = elementType;
+		this.configurationElement = configurationElement;
+	}
+
+	/**
+	 * @return Returns the bundleId.
+	 */
+	public String getBundleId() {
+		return bundleId;
+	}
+
+	/**
+	 * @return Returns the elementType, a localized string describing the
+	 *         contribution (e.g., 'view', 'editor', 'preference page').
+	 */
+	public String getElementType() {
+		return elementType;
+	}
+	
+	/**
+	 * @return Returns the configurationElement or <code>null</code> if no
+	 *         configuration element is available.
+	 */
+	public IConfigurationElement getConfigurationElement() {
+		return configurationElement;
+	}
+
+}
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/package.html b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/package.html
index ff89871..d05b854 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/package.html	
+++ b/eclipse/plugins/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/testing/package.html	
@@ -11,7 +11,7 @@
 <h2>
 Package Specification</h2>
 <p>
-This package has some test support objects.
+This package contains classes and interfaces to support testing and introspection.
 </p>
 
 </body>
diff --git a/eclipse/plugins/org.eclipse.ui.workbench/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
index 2021c54..24576cf 100644
--- a/eclipse/plugins/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: e4-workbench.jar,
  compatibility.jar,
  .
@@ -31,7 +31,7 @@ Export-Package: org.eclipse.ui;ui.workbench=split;mandatory:="ui.workbench",
    org.eclipse.ui.ide,
    org.eclipse.ui.presentations.r21",
  org.eclipse.ui.internal.about;x-friends:="org.eclipse.ui",
- org.eclipse.ui.internal.actions;x-internal:=true,
+ org.eclipse.ui.internal.actions;x-friends:="org.eclipse.ui.ide",
  org.eclipse.ui.internal.activities;x-friends:="org.eclipse.ui",
  org.eclipse.ui.internal.activities.ws;x-internal:=true,
  org.eclipse.ui.internal.application;x-internal:=true,
@@ -43,7 +43,7 @@ Export-Package: org.eclipse.ui;ui.workbench=split;mandatory:="ui.workbench",
  org.eclipse.ui.internal.dnd;x-friends:="org.eclipse.ui.intro,org.eclipse.ui.presentations.r21",
  org.eclipse.ui.internal.editorsupport;x-internal:=true,
  org.eclipse.ui.internal.expressions;x-internal:=true,
- org.eclipse.ui.internal.handlers;x-friends:="org.eclipse.ui",
+ org.eclipse.ui.internal.handlers;x-friends:="org.eclipse.ui,org.eclipse.ui.ide",
  org.eclipse.ui.internal.help;x-internal:=true,
  org.eclipse.ui.internal.intro;x-internal:=true,
  org.eclipse.ui.internal.keys;x-internal:=true,
@@ -91,7 +91,7 @@ Export-Package: org.eclipse.ui;ui.workbench=split;mandatory:="ui.workbench",
  org.eclipse.ui.themes,
  org.eclipse.ui.views,
  org.eclipse.ui.wizards
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
+Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.help;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.jface;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.swt;bundle-version="[3.5.0,4.0.0)",
diff --git a/eclipse/plugins/org.eclipse.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.ui/META-INF/MANIFEST.MF
index 5544b7c..06e4e68 100644
--- a/eclipse/plugins/org.eclipse.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %Plugin.name
 Bundle-SymbolicName: org.eclipse.ui; singleton:=true
-Bundle-Version: 3.5.2.qualifier
+Bundle-Version: 3.6.2.qualifier
 Bundle-ClassPath: .
 Bundle-Activator: org.eclipse.ui.internal.UIPlugin
 Bundle-ActivationPolicy: lazy
diff --git a/eclipse/plugins/org.eclipse.ui/buildnotes_workbench.html b/eclipse/plugins/org.eclipse.ui/buildnotes_workbench.html
index 869559d..2947b5f 100644
--- a/eclipse/plugins/org.eclipse.ui/buildnotes_workbench.html
+++ b/eclipse/plugins/org.eclipse.ui/buildnotes_workbench.html
@@ -12,142 +12,843 @@
 <h1>Eclipse Platform Build Notes (3.5)<br>
 JFace and Workbench</h1>
 
-<p>Integration Build (January 19, 2010, 8:01 p.m.)</p>
+<p>Integration Build (February 03, 2011, 10:58 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=336110">Bug 336110</a>. Plug-in version of org.eclipse.jface needs to be 3.6.2 (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 01, 2011, 7:49 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162079">Bug 162079</a>. [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332041">Bug 332041</a>. Backport bug 162079: [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333898">Bug 333898</a>. [Preferences] [accessibility] Preferences Dialog menu button needs a tooltip (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 11, 2011, 3:26 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=162079">Bug 162079</a>. [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302184">Bug 302184</a>. [About] About dialog text - needs to not cache system property values (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319337">Bug 319337</a>. [Win32] WindowXP command "Close Group" can not close all the Eclipse window that in one group (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=332041">Bug 332041</a>. Backport bug 162079: [PropertiesView] Properties view should be a post selection listener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=333898">Bug 333898</a>. [Preferences] [accessibility] Preferences Dialog menu button needs a tooltip (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 30, 2010, 3:27 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=111525">Bug 111525</a>. [Import/Export]  Import file system doesn't include the top folder you select (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309746">Bug 309746</a>. [CommonNavigator] intermittent test failure in org.eclipse.ui.tests.navigator.SorterTest.testSorterContentOverride (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331303">Bug 331303</a>. [backport] Regression: Convert line delimiter action enablement is broken (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 23, 2010, 3:12 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=327138">Bug 327138</a>. [Import/Export] WizardExportResourcesPage's Finish button isn't sensitive to Select/Deselect All (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329129">Bug 329129</a>. [Mac] Unhandled event loop exception when closing Error Log Event Details (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330549">Bug 330549</a>. [Wizards] cancelable parameter does not disable Wizard progress bar cancel button (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 16, 2010, 4:26 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329333">Bug 329333</a>. [Backport] Concurrent access to file while decorating (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=329838">Bug 329838</a>. [KeyBindings] Exporting key preferences to CSV does not allow context being null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=330285">Bug 330285</a>. [Commands] Stackoverflow in BindingSystem (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 02, 2010, 3:48 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=321155">Bug 321155</a>. [DynamicGUI] UIExtensionTracker calling Display.syncExec() on disposed Display (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 26, 2010, 1:46 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244757">Bug 244757</a>. [ActivityMgmt] ConcurrentModificationException when activities added dynamically (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 25, 2010, 3:47 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=244757">Bug 244757</a>. [ActivityMgmt] ConcurrentModificationException when activities added dynamically (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284269">Bug 284269</a>. [KeyBindings] Reduce memory footprint of BindingManager (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316701">Bug 316701</a>. [Contributions] Service initialization wrong! Sources must be initialized before Handlers (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=319852">Bug 319852</a>. [Dialogs] Open Resource now interprets "." as "*.", unlike 3.5 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=322887">Bug 322887</a>. [Mac] [Commands] Command from 'org.eclipse.ui.cocoa' fragment references category defined in 'org.eclipse.ui.cheatsheets' (FIXED)<br>
+  </p>
+
+<p>Integration Build (August 17, 2010, 3:27 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201391">Bug 201391</a>. [MPE] notifaction when active page of a MultiPageEditorPart changes (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=225601">Bug 225601</a>. Adopt API tooling for UI bundles (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231119">Bug 231119</a>. [GlobalActions] RefreshAction markes as @noextend but should be (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=239421">Bug 239421</a>. [EditorMgmt] MultiEditor: does not support propagate events (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246162">Bug 246162</a>. [Commands] [Services] Make IWorkbenchLocationService public (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=250651">Bug 250651</a>. [Contributions] CommandContributionItemParameter's constructor javadoc needs correction (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255136">Bug 255136</a>. [Commands] [Services] IEvaluationReference needs to remove its provisional API claim (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=256158">Bug 256158</a>. [Metadata] Constants in ISharedImages cause API tooling errors (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264030">Bug 264030</a>. [IDE] Platform UI refrences update.configurator (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=265812">Bug 265812</a>. [StatusHandling] Add @noextend to the WSDM (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=267470">Bug 267470</a>. [Navigator] Deprecate the ResourceNavigator (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270472">Bug 270472</a>. [JFace] Orca cannot read Eclipse status line (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283676">Bug 283676</a>. [FieldAssist] ControlDecoration should add @noextend API tooling tag (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284330">Bug 284330</a>. [JFace] Add isVisible API to ControlDecoration (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287454">Bug 287454</a>. [KeyBindings] F16-F19 unusable as shortcut keys in General -> Keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292762">Bug 292762</a>. [Contributions] MenuUtil provides constants and static methods ... it should be marked noextend (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297271">Bug 297271</a>. [Undo] AbstractWorkspaceOperation and its subclasses don't have @noextend API tags (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302529">Bug 302529</a>. [UX] [Progress] Show Eclipse IDE progress in the Eclipse icon on the Windows 7 Task Bar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315620">Bug 315620</a>. [Progress] WorkbenchWindow is leaked (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 13, 2010, 2:55 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (July 06, 2010, 3:17 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315620">Bug 315620</a>. [Progress] WorkbenchWindow is leaked (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=318862">Bug 318862</a>. [Viewers] [Provider] ClassCastException happened at jface when selecting tree with using picture-capture software. (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 24, 2010, 7:07 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315839">Bug 315839</a>. [CommonNavigator] NPE in WorkingSetsContentProvider (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 03, 2010, 10:58 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315532">Bug 315532</a>. [Workbench] ClassCastException: org.eclipse.ui.testing.ContributionInfo cannot be cast to org.eclipse.gef.EditPart (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 02, 2010, 10:48 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314102">Bug 314102</a>. Incorrect summary and missing links on Import/Export Preferences page (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 01, 2010, 11:48 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314864">Bug 314864</a>. [Wizards] chkpii in org_eclipse_ui_keywords.html in I20100527-1200 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=315281">Bug 315281</a>. update copyrights for 3.6 (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 27, 2010, 2:45 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312698">Bug 312698</a>. [Wizards] org.eclipse.ui.keywords extension point description should mention wizards (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 26, 2010, 12:34 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314302">Bug 314302</a>. [Workbench] javadoc for WorkbenchAdvisor.preStartup() should mention that event loop is not running yet (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314320">Bug 314320</a>. [CommonNavigator] Infinite loop in WorkingSetActionProvider.setWorkingSetFilter if misconfigured (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=314475">Bug 314475</a>. Advanced button not working again (FIXED)<br>
+  </p>
+
+<p>Integration Build (Mai 20, 2010, 1:24 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312966">Bug 312966</a>. [hovering] Some text in Javadoc hover/view not visible using Ubuntu 10.04 (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 20, 2010, 2:14 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122341">Bug 122341</a>. [Model] IMemento rejects keys that begin with # (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298770">Bug 298770</a>. [GTK2.18] Clicking in hover help eats left clicks for entire X session (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300545">Bug 300545</a>. [Viewers] New column scrolling breaks on first cell selection if you have scrolled the table (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309746">Bug 309746</a>. [CommonNavigator] intermittent test failure in org.eclipse.ui.tests.navigator.SorterTest.testSorterContentOverride (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310446">Bug 310446</a>. [LinkedResources] "Preferences > Linked Resources > New..." should not show "Variable..." (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311599">Bug 311599</a>. [LinkedResources] TVT36:TCT115: FRA - Advanced button not working (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311853">Bug 311853</a>. [Perspectives] [Min/Max] Maximize and Minimizing views causes nullpointer exception (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312343">Bug 312343</a>. [Wizards] TVT36:TCT220: FRA - Truncated drop down box for Select File System (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312888">Bug 312888</a>. Problems when entering the linked folder location (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313066">Bug 313066</a>. [Workbench] Workbench.createDisplay() needs to call Display.setAppVersion() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313106">Bug 313106</a>. [CommonNavigator] Regression: Show In > Project Explorer removes selection after setting it (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313138">Bug 313138</a>. [LinkedResources] Conflicting mnemonic in 'Linked Resources' preference page (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 17, 2010, 3:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312339">Bug 312339</a>. [IDE] TVT36:TCT216: CHS: Duplicate Mnemonic 'a' on 'Workspace' page (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 17, 2010, 3:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312339">Bug 312339</a>. [IDE] TVT36:TCT216: CHS: Duplicate Mnemonic 'a' on 'Workspace' page (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 13, 2010, 7:41 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309407">Bug 309407</a>. [Viewers] [viewers] #expandToLevel(Object, level) retrieves all children when virtual (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 13, 2010, 7:24 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309407">Bug 309407</a>. [Viewers] [viewers] #expandToLevel(Object, level) retrieves all children when virtual (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 13, 2010, 7:21 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309407">Bug 309407</a>. [Viewers] [viewers] #expandToLevel(Object, level) retrieves all children when virtual (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 12, 2010, 12:58 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=312686">Bug 312686</a>. [CommonNavigator] double click on a tree item causes File to open in the editor (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 12, 2010, 3:13 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297402">Bug 297402</a>. [IDE] [Wizards] Improvements to the advanced section of new folder wizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300114">Bug 300114</a>. [CommonNavigator] PipelineShapeModification does not handle all set operations correctly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309746">Bug 309746</a>. [CommonNavigator] intermittent test failure in org.eclipse.ui.tests.navigator.SorterTest.testSorterContentOverride (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310277">Bug 310277</a>. Revert the Navigator support of DROP_LINK (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310461">Bug 310461</a>. [Commands] [actions] 'Show In'  action works only once for IStructuredSelection (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310494">Bug 310494</a>. [LinkedResources] Preference "Link and create virtual folders" does not work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310671">Bug 310671</a>. [LinkedResources] "New > Folder" wizard: Bad dialog resizing when clicking "Advanced" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310878">Bug 310878</a>. [LinkedResources] Exception while importing resources in a virtual folder (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311515">Bug 311515</a>. Wrong dialog title (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311778">Bug 311778</a>. [CommonNavigator] Project Explorer selects File object instead of the requested object in the Explorer tree (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 11, 2010, 5:22 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170956">Bug 170956</a>. [Progress] Would like ability to change icon on the Jobs progress bar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=302694">Bug 302694</a>. [PropertiesDialog] UI polish for file system attributes on Resource properties page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305529">Bug 305529</a>. [Markers] NPE in MarkerFieldEditor if MarkerFieldConfiguration scope is unset (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309684">Bug 309684</a>. Chkpii errors in N20100418-2000 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310444">Bug 310444</a>. [LinkedResources] Drag and Drop dialogs not disabled when Linked Resources turned off (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310499">Bug 310499</a>. [LinkedResources] Import > File System > Advanced: "Copy into workspace" should be "Create links in workspace" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310908">Bug 310908</a>. [Markers] NPE thrown by markers job (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311194">Bug 311194</a>. [Dialogs] FilteredResourcesSelectionDialog's constructor doesn't specify what to put in the 'typesMask' parameter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311438">Bug 311438</a>. please tag these ui bundles so they include source references for the 3.6 release (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311584">Bug 311584</a>. [build path] "Extend" path variable button does nothing (FIXED)<br>
+  </p>
+
+<p>Integration Build (May 08, 2010, 10:33 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=9262">Bug 9262</a>. [Viewers] Recursion with multiple equal elements in IStructuredContentProvider/ITreeContentProvider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170956">Bug 170956</a>. [Progress] Would like ability to change icon on the Jobs progress bar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284558">Bug 284558</a>. [Perspectives] NPE: CustomizePerspectiveDialog in method getVisibleIDs (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293263">Bug 293263</a>. [Accessibility] Read-only text boxes not accessible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=306736">Bug 306736</a>. [Workbench] Contributed sourceProvider can cause troubles on start (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=309716">Bug 309716</a>. [Perspectives] Resetting a perspective removes all shortcuts from the New toolbar button (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310601">Bug 310601</a>. [FieldAssist] ContentAssistCommandAdapter enablement not toggled when field has focus (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=311438">Bug 311438</a>. please tag these ui bundles so they include source references for the 3.6 release (FIXED)<br>
+  </p>
+
+<p>Integration Build (April 25, 2010, 10:27 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310394">Bug 310394</a>. [CommonNavigator] CommonViewer refresh never turns on redraw sometimes - Breaks Team sync view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=310408">Bug 310408</a>. [CommonNavigator] Scary looking error messages incorrectly appear in log (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 11, 2010, 11:14 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305142">Bug 305142</a>. [Metadata] increment version of org.eclipse.ui.presentations.r21 in 3.6 stream (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 10, 2010, 12:17 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (March 09, 2010, 7:06 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=53654">Bug 53654</a>. Infinite loop in animation of making a fastview (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=55564">Bug 55564</a>. [FastViews Animate transition for views from restored->zoomed state (and vice versa) (WONTFIX)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=57143">Bug 57143</a>. Fast view animate transition bad on Linux (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=61628">Bug 61628</a>. [Workbench] Animating close rectangle is barely visible on the MAC (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=105816">Bug 105816</a>. Extraneous NLS tag incorrectly found in comments (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=130182">Bug 130182</a>. [CommonNavigator][Help] missing help in Customize View dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=153957">Bug 153957</a>. [FastViews] Create Multiple FVB's (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=158658">Bug 158658</a>. Eclipse 3.3 presentation: Minimize too slow on Windows (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178743">Bug 178743</a>. [Trim] IndexOutOfBoundsException restoring View (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=178989">Bug 178989</a>. [Min/Max] Handle 'non-standard' stack/view types (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251193">Bug 251193</a>. closing the WorkbenchWindow causes the RectangleAnimation to fail (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280964">Bug 280964</a>. [CommonNavigator] Confusing javadocs in CommonNavigator (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300198">Bug 300198</a>. [CommonNavigator] LabelProviderTest.testChangeActivation() fails (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301748">Bug 301748</a>. [DataBinding] The model is not updated when overriding ObservableValueEditingSupport.createBinding (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305036">Bug 305036</a>. [Path Variables] Minor API changes in Dynamic Path Variables area (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305114">Bug 305114</a>. [CommonNavigator] ResourceSelectionUtil has been deprecated without public replacement (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305141">Bug 305141</a>. chkpii error in I20100308-1300 wrt org_eclipse_ui_navigator_navigatorContent.html (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305156">Bug 305156</a>. NPE when trying to use Search dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305161">Bug 305161</a>. Dynamic Path Variable ui.ide API review (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305192">Bug 305192</a>. Put RectangleAnimation back into org.eclipse.ui.workbench (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 08, 2010, 12:45 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=305004">Bug 305004</a>. The PathVariableSelectionDialog should not use 'Extend' to build path variable arguments (FIXED)<br>
+  </p>
+
+<p>Integration Build (March 07, 2010, 5:16 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=141724">Bug 141724</a>. [CommonNavigator] Allow sorting to be overridden (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270008">Bug 270008</a>. [CommonNavigator] Ability to extend bindings beyond "inheritsBindingsFrom" tag (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287139">Bug 287139</a>. [CommonNavigator] Add core expression to determine initial activation for NCE (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292813">Bug 292813</a>. [CommonNavigator] Please provide an API for enabling and disabling common navigator filters programmatically (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=304929">Bug 304929</a>. [CommonNavigator] Unused method in NavigatorContentService (FIXED)<br>
+  </p>
+
+<p>Integration Build (February 08, 2010, 4:02 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122772">Bug 122772</a>. [Wizards] NewWizardAction would be able to customize the title and description of the opened wizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=161693">Bug 161693</a>. [Contributions] Cannot show the items defined in "contributeToCoolBar" function of the ActionBarContributor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=205747">Bug 205747</a>. [Contributions] Adding top-level menus using IMenuService does not work (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=243742">Bug 243742</a>. [Contributions] Registering a PRIVATE popup menu (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283449">Bug 283449</a>. [Jobs] Add ability to temporarily yield a Job so that blocked jobs are given a chance to execute. (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297054">Bug 297054</a>. [Contributions] extension of org.eclipse.jface.action.StatusLineContributionItem that should not "guess" contribution width (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298671">Bug 298671</a>. Implement enough compatibility to bring up a simple view (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299385">Bug 299385</a>. [UI] clean up errors in compatibility workbench (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299426">Bug 299426</a>. provide tweaklet in o.e.ui.tests to allow e4 compat to run the tests (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300502">Bug 300502</a>. Add UI for finer grained file permissions (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300758">Bug 300758</a>. Bring Eclipse window to the front when opening file from command line (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300846">Bug 300846</a>. Add "Resolve Values" switch to Path Variables property page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300862">Bug 300862</a>. Change buttons order in PathVariableDialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301133">Bug 301133</a>. Unhide the linked resources locations tab in the Linked Resources property page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301370">Bug 301370</a>. [DataBinding] MapSimpleValueObservableMapTest.put() returns wrong replaced value (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301410">Bug 301410</a>. [DataBinding] NPE in ListSimpleValueObservableList on dispose (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301442">Bug 301442</a>. [LinkedResources] [IDE] New resource-related project properties pages should be children of Resource (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=301834">Bug 301834</a>. Show heap status option in General preferences does not have a filter keyword (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 27, 2010, 5:37 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201301">Bug 201301</a>. [Workbench] Users should be able to find out who contributed a view/editor/toolbar item/job/preference page/... (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300899">Bug 300899</a>. Endless OpenDoc events (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 26, 2010, 4:35 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262795">Bug 262795</a>. [Min/Max] Unmaximize editor area unreliable when editor area is split (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298835">Bug 298835</a>. Merge e4 Project Path Variable back into the 3.6 stream (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 25, 2010, 1:55 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=4922">Bug 4922</a>. [EditorMgmt] Need ability to open a file in eclipse from the command line (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201301">Bug 201301</a>. [Workbench] Users should be able to find out who contributed a view/editor/toolbar item/job/preference page/... (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270494">Bug 270494</a>. [DataBinding] Add support for IPostSelectionProvider (FIXED)<br>
+  </p>
+
+<p>Integration Build (January 21, 2010, 5:06 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=94796">Bug 94796</a>. [EditorMgmt] 'Save All Modified Resources' job is unnamed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193361">Bug 193361</a>. [EditorMgmt] Unexpected behaviour opening sample XML editor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=205043">Bug 205043</a>. [Commands] Dynamically loading plugin causes command framework error (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=236104">Bug 236104</a>. [EditorMgmt] File association default needs to be set twice to take effect (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255556">Bug 255556</a>. [Contributions] Extension point org.eclipse.ui.popupMenus has a typo: java.lang.object (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262795">Bug 262795</a>. [Min/Max] Unmaximize editor area unreliable when editor area is split (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288624">Bug 288624</a>. [EditorMgmt] Mac: Error when browsing to external editor and then launching (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291069">Bug 291069</a>. [Commands] IWorkbenchCommandConstants should also define command parameter ids (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295803">Bug 295803</a>. [CommonNavigator] Source of Contribution set to lowest priority NCE, not the NCE providing the children (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296042">Bug 296042</a>. [Help] Add warnings for duplicate Context Sensitive Help ids on UI elements when debug is enabled (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296466">Bug 296466</a>. [GlobalActions] Can't remove 'Build All' from toolbar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296566">Bug 296566</a>. Use "subtle" icon decorators for Virtual Folders (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296691">Bug 296691</a>. Change new Groups API to Virtual Resource API (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296728">Bug 296728</a>. [CommonNavigator] Problem with enablement on navigatorContent extension point (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296748">Bug 296748</a>. [FieldAssist] remove the deprecated SimpleContentProposal (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297271">Bug 297271</a>. [Undo] AbstractWorkspaceOperation and its subclasses don't have @noextend API tags (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298747">Bug 298747</a>. [EditorMgmt] Bidi Incorrect file type direction in mirrored "Editor Selection" dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299335">Bug 299335</a>. [Progress] Finished Tasks Still Show In Progress View (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299438">Bug 299438</a>. [CommonNavigator] CNF viewer state non properly reset when NCEs are activated or deactivated (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299706">Bug 299706</a>. [CommonNavigator] org.eclipse.ui.navigator bundle needs to be incremented in 3.5.2 stream (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299661">Bug 299661</a>. [CommonNavigator] Overridden hasChildren() broken. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299954">Bug 299954</a>. [Dialogs] FilteredItemsSelectionDialog prefix matches are sorted before camel case matches (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300012">Bug 300012</a>. [CommonNavigator] CNF test improvements (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300032">Bug 300032</a>. [Markers] NPE in MarkerFieldFilterGroup.selectByScope (CLOSED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300198">Bug 300198</a>. [CommonNavigator] LabelProviderTest.testChangeActivation() fails (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300212">Bug 300212</a>. [CommonNavigator] Popup menu items cannot be created in Project Explorer using the Command Framework (WORKSFORME)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=300220">Bug 300220</a>. [Undo] TriggeredOperations should implement IAdvancedUndoableOperation2 (FIXED)<br>
   </p>
 
-<p>Integration Build (January 13, 2010, 2:10 a.m.)</p>
+<p>Integration Build (January 18, 2010, 10:55 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285095">Bug 285095</a>. [Viewers] New column scrolling breaks on first cell selection if you have scrolled the table (NEW)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289090">Bug 289090</a>. [CommonNavigator] labels are missing (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293235">Bug 293235</a>. [backport][Import/Export] Timestamps updated on archive export and on project import (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295557">Bug 295557</a>. [KeyBindings] Exporting key preferences to CSV does not allow context being null (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296253">Bug 296253</a>. [CommonNavigator] An empty label is not properly shown when it is the only contributed label (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299246">Bug 299246</a>. [CommonNavigator] Add model objects for new CNF tests (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299249">Bug 299249</a>. [CommonNavigator] Add ResourceWrapperContent/Label provider for new CNF tests (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299251">Bug 299251</a>. [CommonNavigator] Model label and content providers for additional pipeline CNF tests (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299255">Bug 299255</a>. [CommonNavigator] Hook new CNF tests to plugin.xml (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299304">Bug 299304</a>. [CommonNavigator] Test contribution for CNF (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298153">Bug 298153</a>. [Workbench] API use problems in o.e.ui.workbench (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298671">Bug 298671</a>. Implement enough compatibility to bring up a simple view (NEW)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299322">Bug 299322</a>. [CommonNavigator] Test contribution for CNF (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299324">Bug 299324</a>. [CommonNavigator] Add new test Pipeline content provider (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299325">Bug 299325</a>. [CommonNavigator] Add plugin.xml configuration for new pipeline tests (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299326">Bug 299326</a>. [CommonNavigator] Add new test for CNF pipelining (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299331">Bug 299331</a>. [CommonNavigator] Compile errors in new CNF tests (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299340">Bug 299340</a>. [CommonNavigator] Enable new CNF tests (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299345">Bug 299345</a>. [CommonNavigator] Move expanded HEAD CNF tests to 3.5.2 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299385">Bug 299385</a>. [UI] clean up errors in compatibility workbench (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299426">Bug 299426</a>. provide tweaklet in o.e.ui.tests to allow e4 compat to run the tests (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299619">Bug 299619</a>. [DataBinding] SetSimpleValueObservableMap and MapSimpleValueObservableMap have wrong key/value types (FIXED)<br>
   </p>
 
-<p>Integration Build (January 07, 2010, 11:21 a.m.)</p>
+<p>Integration Build (January 15, 2010, 9:57 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296142">Bug 296142</a>. [KeyBindings] Set extension point "org.eclipse.ui.bindings" 's element 'sequenceModifier' becomes disabled key bindings. (FIXED)<br>
   </p>
 
-<p>Integration Build (January 07, 2010, 9:31 a.m.)</p>
+<p>Integration Build (January 11, 2010, 6:03 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296142">Bug 296142</a>. [KeyBindings] Set extension point "org.eclipse.ui.bindings" 's element 'sequenceModifier' becomes disabled key bindings. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296159">Bug 296159</a>. [Progress] WorkbenchSiteProgressService keeps showing CURSOR_APPSTARTING when Job canceled before it is started (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296253">Bug 296253</a>. [CommonNavigator] An empty label is not properly shown when it is the only contributed label (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297508">Bug 297508</a>. [IDE] [Dialogs] Resource filters dialog doesn't honor dialog font (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298671">Bug 298671</a>. Implement enough compatibility to bring up a simple view (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299207">Bug 299207</a>. [CommonNavigator] Refactor NavigatorContentServiceContentProvider (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299208">Bug 299208</a>. [CommonNavigator] More helpful error message when an invalid suppressedExtensionId is referenced (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299209">Bug 299209</a>. [CommonNavigator] Clean up error reporting for pipelined extensions (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299210">Bug 299210</a>. [CommonNavigator] Test improvements (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299246">Bug 299246</a>. [CommonNavigator] Add model objects for new CNF tests (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299249">Bug 299249</a>. [CommonNavigator] Add ResourceWrapperContent/Label provider for new CNF tests (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299251">Bug 299251</a>. [CommonNavigator] Model label and content providers for additional pipeline CNF tests (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299255">Bug 299255</a>. [CommonNavigator] Hook new CNF tests to plugin.xml (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=299304">Bug 299304</a>. [CommonNavigator] Test contribution for CNF (FIXED)<br>
   </p>
 
-<p>Integration Build (January 07, 2010, 1:09 a.m.)</p>
+<p>Integration Build (January 05, 2010, 3:32 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296142">Bug 296142</a>. [KeyBindings] Set extension point "org.eclipse.ui.bindings" 's element 'sequenceModifier' becomes disabled key bindings. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=158642">Bug 158642</a>. [Workbench] Hide toolbar not persisted (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=243381">Bug 243381</a>. [Markers] Problems list needs a tooltip for descripton field (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255629">Bug 255629</a>. [StatusHandling]WorkbenchStatusDialog needs refactoring (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=259955">Bug 259955</a>. [Commands] Can't add "Save All" command to main toolbar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273806">Bug 273806</a>. [GlobalActions] [KeyBindings] Shortcut key for properties should be changed to Cmd+I on Mac? (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279235">Bug 279235</a>. [JFace] MessageDialog#getButton(int) breaks contract of Dialog#getButton(int) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296159">Bug 296159</a>. [Progress] WorkbenchSiteProgressService keeps showing CURSOR_APPSTARTING when Job canceled before it is started (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296599">Bug 296599</a>. Add ability to run e4 based tests using PDE's JUnit Plug-in Test (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296801">Bug 296801</a>. [Wizards] Add keywords for Workbench Wizards (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297728">Bug 297728</a>. [Filters] IFileInfoMatcherDescription and FileInfoMatcherDescription cleanup (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298748">Bug 298748</a>. [ErrorHandling] Support tray should be visible only if there is something to display (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=298850">Bug 298850</a>. [ErrorHandling] 1 error/9 failures in StatusHandlingTestSuite (FIXED)<br>
   </p>
 
-<p>Integration Build (November 17, 2009, 4:52 p.m.)</p>
+<p>Integration Build (December 09, 2009, 2:29 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283283">Bug 283283</a>. [WorkingSets] WorkingSetManager hides exception message (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296565">Bug 296565</a>. Make group creation an advanced option in the folder (NEW)<br>
+  </p>
+
+<p>Integration Build (December 09, 2009, 3:40 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278939">Bug 278939</a>. [Perspectives] Grammar mistake in message. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296646">Bug 296646</a>. Creating regular file under group gives wrong warning in wizard (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=297338">Bug 297338</a>. [LinkedResources] Group icon should have transparent background (FIXED)<br>
+  </p>
+
+<p>Integration Build (December 07, 2009, 4:09 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296573">Bug 296573</a>. [Viewers] TreeViewer.remove() fails to remove a visible element at index 0 before it is materialized (NEW)<br>
+  </p>
+
+<p>Integration Build (December 07, 2009, 12:32 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273806">Bug 273806</a>. [GlobalActions] [KeyBindings] Shortcut key for properties should be changed to Cmd+I on Mac? (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289176">Bug 289176</a>. [KeyBindings] Wrong keybinding for Redo in Mac (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296566">Bug 296566</a>. Use "subtle" icon decorators for Virtual Folders (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (December 04, 2009, 3:31 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=258729">Bug 258729</a>. [Metadata] Platform/UI plug-ins needs more project-specific settings (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273806">Bug 273806</a>. [GlobalActions] [KeyBindings] Shortcut key for properties should be changed to Cmd+I on Mac? (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289176">Bug 289176</a>. [KeyBindings] Wrong keybinding for Redo in Mac (REOPENED)<br>
+  </p>
+
+<p>Integration Build (December 03, 2009, 3:46 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=254422">Bug 254422</a>. [FieldAssist] Provide a default API implementation of IContentProposal (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275393">Bug 275393</a>. [FieldAssist] Automate the manual test cases (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284265">Bug 284265</a>. [JFace] DialogSettings.save() silently ignores IOException (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292354">Bug 292354</a>. Merge Groups UI from the e4 branch to HEAD (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293658">Bug 293658</a>. [About] About dialog's installation details does not honour dialog font settings (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294462">Bug 294462</a>. [FieldAssist] ControlDecoration#showHoverText doesn't check if the widget is visible (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294702">Bug 294702</a>. Backport of bug 283283 into 3.5.x is required (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294810">Bug 294810</a>. [DataBinding] WidgetProperties.focused() does not update properly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295386">Bug 295386</a>. [FieldAssist] ControlDecoration#showHoverText doesn't check if the widget is visible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296473">Bug 296473</a>. [Filters] Replace #getProject and #getPath with #getResource in IResourceFilterDescription (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296477">Bug 296477</a>. [EditorMgmt] IWorkbenchPage#openEditors(IEditorInput[], ..) does not set keyboard focus (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296566">Bug 296566</a>. Use "subtle" icon decorators for Virtual Folders (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296640">Bug 296640</a>. Add keywords to help find MRU length preference (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296695">Bug 296695</a>. [Markers] Problems view does not update on selection change (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296822">Bug 296822</a>. NullProgressMonitor is not thread safe for expected usage (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 30, 2009, 3:54 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=58474">Bug 58474</a>. [EditorMgmt] typo in IEditorReference.getName (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=60574">Bug 60574</a>. [Javadoc][EditorMgmt] IWorkbenchPage.getEditors() and .getViews() need explaining (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126622">Bug 126622</a>. [ViewMgmt] WorkbenchPage.resizeView is marked as experimental (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=126705">Bug 126705</a>. [Preferences] FileFieldEditor does not call doCheckState (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=253232">Bug 253232</a>. [Trim] locationURI "before" and "after" don't work for status trim (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=257185">Bug 257185</a>. [Contributions] Some submenus are still visible (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=270092">Bug 270092</a>. [CellEditors] [cell editors] TextCellEditor should not specify minimum size (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272070">Bug 272070</a>. [EditorMgmt] [Perspectives] Close Perspective is not honoring isSaveOnCloseNeeded behavior. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272884">Bug 272884</a>. [EditorMgmt] IWorkbenchPage#openEditors(IEditorInput[], ..) should add editors at front of MRU list (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278939">Bug 278939</a>. [Perspectives] Grammar mistake in message. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282631">Bug 282631</a>. [Intro] introProductBinding elements attributes should allow to select / validate available products and intro IDs (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283449">Bug 283449</a>. [Jobs] Add ability to temporarily yield a Job so that blocked jobs are given a chance to execute. (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283898">Bug 283898</a>. [DnD] EditorSiteDragAndDropServiceImpl should remove MergedDropTarget as listener when control gets disposed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286000">Bug 286000</a>. [FastView] NPE in FastViewPane$2.setState (was: File Search doesn't work in 3.5.0) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292091">Bug 292091</a>. [KeyBindings] Set extension point "org.eclipse.ui.bindings" 's element 'sequenceModifier' becomes disabled key bindings. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292322">Bug 292322</a>. [Viewers] Tree view is removing + indicator when one of multiple children is removed. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292525">Bug 292525</a>. [Markers] Code clean up in markers view. (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293433">Bug 293433</a>. [Contributions] CoolBarManager needs to dispose the items' controls in dispose(CoolItem) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293512">Bug 293512</a>. [Workbench] Make IWorkbench into an OSGi service (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294210">Bug 294210</a>. [Contributions] 'Customize Perspective > Tool Bar Visibility' breaks with Separator (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294303">Bug 294303</a>. [Markers] 'Queuing Viewer Updates' in Problems view (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294790">Bug 294790</a>. [KeyBindings] LegacyActionTools should support SWT.F13 - F20 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294796">Bug 294796</a>. [Contributions] API request: LegacyActionTools#escapeMnemonics(String) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294959">Bug 294959</a>. [Markers] Problems view shows outdated content (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=296056">Bug 296056</a>. Deadlock between syncExec and IJobManager.beginRule (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 23, 2009, 3:59 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283449">Bug 283449</a>. [Jobs] Add ability to temporarily yield a Job so that blocked jobs are given a chance to execute. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286107">Bug 286107</a>. [ViewMgmt] [GlobalActions] Closing project ignores Saveables (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292354">Bug 292354</a>. Merge Groups UI from the e4 branch to HEAD (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292869">Bug 292869</a>. The Resource Filter dialogs and decorator should use icons made by UI designer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293130">Bug 293130</a>. Polishing the Filter extension point (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294118">Bug 294118</a>. [Contributions] toolbar control setWorkbenchWindow is not called (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294959">Bug 294959</a>. [Markers] Problems view shows outdated content (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=295359">Bug 295359</a>. Filter Id should be required and specified per filter element (FIXED)<br>
+  </p>
+
+<p>Integration Build (November 16, 2009, 4:46 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=159176">Bug 159176</a>. [Presentations] Editor minimize/maximize buttons visible on startup even though perspective is fixed (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=245675">Bug 245675</a>. [Viewers] Code snippet that attaches content assist to a CellEditor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287765">Bug 287765</a>. [Viewers] getExpandedTreePaths in AbstractTreeViewer can fail when there are items with dummy children (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288642">Bug 288642</a>. [DataBinding] SWTObservables.observeSingleSelectionIndex should support empty selections (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289409">Bug 289409</a>. [Viewers] ILazyTreePathContentProvider documentation request (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290918">Bug 290918</a>. Preferences Import/Export wizard should allow to filter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=291798">Bug 291798</a>. [DataBinding] Bean/PojoProperties.value(String, Class) ignores specified value type (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292247">Bug 292247</a>. [Viewers] StructuredViewer.findItems(Object) javadoc is not precise (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292869">Bug 292869</a>. The Resource Filter dialogs and decorator should use icons made by UI designer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294738">Bug 294738</a>. [Viewers] (JFace) Assertion for missing LabelProvider in ViewerColumn (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294959">Bug 294959</a>. [Markers] Problems view shows outdated content (NEW)<br>
+  </p>
+
+<p>Integration Build (November 09, 2009, 4:02 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288767">Bug 288767</a>. [statushandling]no option to wrap error text (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=294307">Bug 294307</a>. [ErrorHandling] StatusDialogManagerTest failure in N20091104-2000 (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (November 02, 2009, 4:08 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (October 30, 2009, 11:36 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293787">Bug 293787</a>. Markers view not filtering by workingsets (NEW)<br>
   </p>
 
-<p>Integration Build (November 10, 2009, 3:56 p.m.)</p>
+<p>Integration Build (October 29, 2009, 10:53 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293600">Bug 293600</a>. Failure in StatusDialogManagerTest.testBug288765 (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 28, 2009, 12:52 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274554">Bug 274554</a>. [Contributions] StatusLineManager: NullPointerException in setCanceled(...) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286000">Bug 286000</a>. [FastView] NPE in FastViewPane$2.setState (was: File Search doesn't work in 3.5.0) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289988">Bug 289988</a>. Use IResource#setDerived(boolean, IProgressMonitor) instead of IResource#setDerived(boolean) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293553">Bug 293553</a>. Resource Filter UI needs mnemonic clean up (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293555">Bug 293555</a>. Disable Resource Filter decorator by default until new icon is available (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 26, 2009, 8:23 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293305">Bug 293305</a>. [Markers] stack trace from stalled  ui tests on windows in I20091025-2000 (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 26, 2009, 12:35 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293132">Bug 293132</a>. [Import/Export] New filtered preference group is to far on the right (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293303">Bug 293303</a>. NPE when adding a Regular Expression with no matching string (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293305">Bug 293305</a>. [Markers] stack trace from stalled  ui tests on windows in I20091025-2000 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=293310">Bug 293310</a>. NPE when adding a String Matcher with no matching string (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 23, 2009, 3:29 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=190288">Bug 190288</a>. [About] Allow sorting by secondary column in plug-in details dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288766">Bug 288766</a>. [statushandling] initial size is small, could be a ratio of error content (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 22, 2009, 8:31 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=193600">Bug 193600</a>. [Commands] org.eclipse.ui.menus/menuContribution locationURI query placement "endof=..." not implemented? (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=250604">Bug 250604</a>. [FieldAssist]  API - ContentProposalAdapter needs isShowing() method (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279758">Bug 279758</a>. [JFace] JFace font properties files should indicate that they must not be translated (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280799">Bug 280799</a>. [Commands] ActivateEditorHandler unnecessarily calls setFocus() (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292517">Bug 292517</a>. Resource Filter UI needs polish (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292759">Bug 292759</a>. The "Edit Resource Filter" dialog doesn't populate the "Type" field (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292762">Bug 292762</a>. [Contributions] MenuUtil provides constants and static methods ... it should be marked noextend (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292901">Bug 292901</a>. Confusing "Target" group for children filters (NEW)<br>
+  </p>
+
+<p>Integration Build (October 19, 2009, 3:13 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199127">Bug 199127</a>. [Commands] ContentAssistCommandAdapter#setEnabled(..) does not update handler activation (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=254422">Bug 254422</a>. [FieldAssist] Provide a default API implementation of IContentProposal (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=256651">Bug 256651</a>. [FieldAssist]  Wrong location calculation of proposal popup shell if content control is near bottom in the screen (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=262022">Bug 262022</a>. [FieldAssist] ContentProposalAdapter.recomputeProposals might throw a NPE (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274554">Bug 274554</a>. [Contributions] StatusLineManager: NullPointerException in setCanceled(...) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275393">Bug 275393</a>. [FieldAssist] Automate the manual test cases (REOPENED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276164">Bug 276164</a>. [KeyBindings] Mac: Exporting keyboard preferences to CSV writes question marks instead of modifiers such as "Ctrl" and special keys like "Up" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277886">Bug 277886</a>. [IDE] Remove manual start of org.eclipse.update.configurator (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279553">Bug 279553</a>. [FieldAssist] ControlDecoration strange behavior when description text is empty string (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280984">Bug 280984</a>. [Commands] org.eclipse.ui.commands extension point tells user to implement a subclass (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282653">Bug 282653</a>. [Markers] [ErrorHandling] Problems view: strange dialog if no quick fix is found (CLOSED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284330">Bug 284330</a>. [JFace] Add isVisible API to ControlDecoration (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287454">Bug 287454</a>. [KeyBindings] F16-F19 unusable as shortcut keys in General -> Keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288804">Bug 288804</a>. [FieldAssist] [JFace] ContentProposalAdapter needs new setFocus() method (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290834">Bug 290834</a>. [JFace] Unnecessary call in every saferunner invocation (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292396">Bug 292396</a>. Dependent options on 'Local History' preference page not indented (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292517">Bug 292517</a>. Resource Filter UI needs polish (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=292525">Bug 292525</a>. [Markers] Code clean up in markers view. (NEW)<br>
+  </p>
+
+<p>Integration Build (October 13, 2009, 10:25 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+  </p>
+
+<p>Integration Build (October 13, 2009, 8:29 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=259357">Bug 259357</a>. [StatusHandling] Perspective registry hides message from WorkbenchException's status (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=274262">Bug 274262</a>. [History] Allow to never prune history (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275477">Bug 275477</a>. [Markers] TasksView: Scope settings selects two (!) radio buttons (CLOSED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282535">Bug 282535</a>. [Markers] The Problem view does not update the status line (CLOSED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288769">Bug 288769</a>. [statushandling] can't deselect text (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288770">Bug 288770</a>. [statushandling] with multiple errors, top pane get space when resizing (bottom should get all the space) (FIXED)<br>
+  </p>
+
+<p>Integration Build (October 06, 2009, 8:04 a.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=64830">Bug 64830</a>. [Workbench] Creating OK statuses (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=66889">Bug 66889</a>. [ViewMgmt] Package explorer message clipped (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=129917">Bug 129917</a>. [Import/Export]  Import Preferences UI issues (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=170731">Bug 170731</a>. [About] Improve layout behavior "About Eclipse SDK Features" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=174481">Bug 174481</a>. [ViewMgmt] Show View dialog selects wrong entry on Enter (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=201650">Bug 201650</a>. [Actions] Build Project is disabled when going from problems view to an editor (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=208564">Bug 208564</a>. [Preferences] preferenceTransfer: Allow wildcards on keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=211664">Bug 211664</a>. [ErrorHandling] ErrorDialog should not display 'Details' button when the children status don't have message (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=249915">Bug 249915</a>. [Dialogs] TitleAreaDialog does not short circuit if message is null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=266545">Bug 266545</a>. [About] Content of the configuration tab should be populated in the background (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277381">Bug 277381</a>. [About] Installation Details dialog does not have a help tray (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282779">Bug 282779</a>. [About] Features Dialog - icon is not transparent on white background (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283551">Bug 283551</a>. [FieldAssist] ContentProposalAdapter Class-JavaDoc and Method-JavaDoc contradict each other (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289599">Bug 289599</a>. [Preferences] PreferenceStore.setToDefault fires redundant PropertyChangeEvents (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290819">Bug 290819</a>. IEditorActionBarContributor Javadoc incorrect (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290846">Bug 290846</a>. org.eclipse.ui.IWorkbenchPart javadoc incorrect (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290909">Bug 290909</a>. ISizeProvider client contract unclear (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290930">Bug 290930</a>. preferenceTransfer does not work for more than one mapping with same scope (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 28, 2009, 3:51 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=208564">Bug 208564</a>. [Preferences] preferenceTransfer: Allow wildcards on keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=263305">Bug 263305</a>. [Import/Export] Timestamps updated on archive export and on project import (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283120">Bug 283120</a>. [About] NPE on Configuration tab in Installation dialog when in a self-hosted Eclipse (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283555">Bug 283555</a>. [Markers] Configure Contents dialog: Types section should not have columns (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286542">Bug 286542</a>. Unnecessary line of code in ResourceEncodingFieldEditor (FIXED)<br>
+  </p>
+
+<p>Integration Build (September 16, 2009, 2:40 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286107">Bug 286107</a>. [ViewMgmt] [GlobalActions] Closing project ignores Saveables (FIXED)<br>
   </p>
 
-<p>Integration Build (September 02, 2009, 8:41 a.m.)</p>
+<p>Integration Build (September 16, 2009, 2:02 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288251">Bug 288251</a>. [CommonNavigator] Typo "overridding" used instead of "overriding" (FIXED)<br>
   </p>
 
-<p>Integration Build (September 02, 2009, 4:26 a.m.)</p>
+<p>Integration Build (September 14, 2009, 8:31 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287103">Bug 287103</a>. [CommonNavigator] contentServiceLabelProvider doesn't properly implement overrides (ASSIGNED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287601">Bug 287601</a>. [DataBinding][Regression] NullpointerException if observables are disposed while masterdetail running (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287623">Bug 287623</a>. [CommonNavigator] Improve junit tests for label providers (DUPLICATE)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=86248">Bug 86248</a>. [Commands] request: ctrl+pageup/down action doesn't have item in preferences/keys (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=89606">Bug 89606</a>. [Viewers] Remove protected API added to support prototype of grouping by working sets (WONTFIX)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=226336">Bug 226336</a>. [progress] DeferredTreeContentManager update listener misleading (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=229294">Bug 229294</a>. [Progress] Layout problems for items in DetailedProgressViewer (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=231619">Bug 231619</a>. [PropertiesDialog] Open up the API for org.eclipse.ui.internal.dialogs.PropertyDialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251317">Bug 251317</a>. [Markers] [tasks view] Preferences page do not show names both of  "Completed" and "Priority" colums in the table (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272474">Bug 272474</a>. [Markers] Problem view's Hide/Show columns preferences dont work correctly (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=272564">Bug 272564</a>. [PropertiesView] need a mechanism for views to 'opt out' of interactions with the property view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275018">Bug 275018</a>. [Markers] Problems View / Configure Contents dialog should support rename (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287103">Bug 287103</a>. [CommonNavigator] contentServiceLabelProvider doesn't properly implement overrides (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288154">Bug 288154</a>. [perfs] Comments applied for performance tests may be obsolete (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288352">Bug 288352</a>. [Contributions] WorkbenchMenuService calling Display.syncExec() on disposed Display (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288364">Bug 288364</a>. [KeyBindings] Exporting key preferences to CSV does not warn of overwriting file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288388">Bug 288388</a>. [ActivityMgmt] WorkbenchActivityHelper restrictArray is returning NULL for objects failing the test "restrictUseOf(Object)" (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288390">Bug 288390</a>. [Workbench] FileNotFoundException in test log makes it particularly unreadable (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288394">Bug 288394</a>. [MPE] MultiPageEditorSite does not remove properly its KeyBindingService (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288428">Bug 288428</a>. [DataBinding] Test failures in M20090902-0900 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=289090">Bug 289090</a>. [CommonNavigator] labels are missing (FIXED)<br>
   </p>
 
-<p>Integration Build (August 26, 2009, 1:42 a.m.)</p>
+<p>Integration Build (September 01, 2009, 4:22 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279514">Bug 279514</a>. [Metadata] UI bundles should depend on SWT 3.5, not 3.4 (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283162">Bug 283162</a>. [DataBinding] 3.4 org.eclipse.jface.tests.databinding bundle has a higher version than 3.5 (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285804">Bug 285804</a>. [Import/Export] File -> Import filesystem w/cyclical symbolic folder links causes OOME (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=258493">Bug 258493</a>. [Dialogs] Ampersand in path not rendered in Open Resource dialog (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=269844">Bug 269844</a>. [GlobalActions] "Close Unrelated Projects" is dangerous and needs confirmation (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275867">Bug 275867</a>. [ErrorHandling] StatusManager#handle() produces a dialog that is not centered well (ASSIGNED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276371">Bug 276371</a>. [ErrorHandling] Need to clean up dialog field after failure in status handling (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278965">Bug 278965</a>. [ErrorHandling] Error status dialog shows 'Show Error Log' link even though nothing got logged (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280656">Bug 280656</a>. [ViewMgmt] Sticky views are not working when view has a secondary ID (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286013">Bug 286013</a>. [Trim] NPE in IWorkbenchPage.setPartState(IWorkbenchPartReference, IWorkbenchPage.STATE_RESTORED); (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286144">Bug 286144</a>. [Commands] Command is not invoked when focus changes. (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286485">Bug 286485</a>. [Commands] ACTIVE_EDITOR_INPUT_NAME does not contribute to source priority (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287211">Bug 287211</a>. [Import/Export] Eclipse not responsive when export to archive a lot of projects (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287517">Bug 287517</a>. [DataBinding] Race condition in WidgetObservableThreadTest (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287601">Bug 287601</a>. [DataBinding][Regression] NullpointerException if observables are disposed while masterdetail running (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287621">Bug 287621</a>. [CommonNavigator] Add more tracing (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288202">Bug 288202</a>. [Metadata] UI bundles should depend on SWT 3.5, not 3.4 (FIXED)<br>
   </p>
 
-<p>Integration Build (August 20, 2009, 10:59 p.m.)</p>
+<p>Integration Build (August 24, 2009, 11:26 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=269869">Bug 269869</a>. [Markers] No "Restore Defaults" button in filter dialog for ProblemsView (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=275039">Bug 275039</a>. [Markers] Configure contents "Match all/any configuration" wording ambiguous (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278064">Bug 278064</a>. [FastView] Ability to hide fast view toolbar (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283162">Bug 283162</a>. [DataBinding] 3.4 org.eclipse.jface.tests.databinding bundle has a higher version than 3.5 (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283283">Bug 283283</a>. [WorkingSets] WorkingSetManager hides exception message (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284650">Bug 284650</a>. [CommonNavigator] Misleading JavaDoc of the INavigatorContentService (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286600">Bug 286600</a>. [Markers] DVT35:TCT580: CHT: Descriptions the same as for Problem view (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286121">Bug 286121</a>. [DataBinding] API error in ObservableTracker (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287138">Bug 287138</a>. [CommonNavigator] Add tests simulating CDT/JDT to CNF (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=287471">Bug 287471</a>. [ActionSets] Actionsets leak when opening/closing perspectives (FIXED)<br>
   </p>
 
-<p>Integration Build (August 18, 2009, 11:44 p.m.)</p>
+<p>Integration Build (August 18, 2009, 12:12 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=269172">Bug 269172</a>. [Contributions] WorkbenchMenuService calling Display.syncExec() on disposed Display (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273112">Bug 273112</a>. [Markers] Use 'bottom up' heap sort to optimize the Markers view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273495">Bug 273495</a>. [ActionSets] Actionsets leak when opening/closing perspectives (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276162">Bug 276162</a>. [KeyBindings] Exporting key preferences to CSV does not warn of overwriting file (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=139211">Bug 139211</a>. "Open Referenced Projects" dialog pops up even when there are no referenced projects (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224546">Bug 224546</a>. [ViewMgmt] Remove F2 from ShowViewDialog (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278550">Bug 278550</a>. [Databinding] ObservablesManager, ObservableTracker and MapSimpleValueObservableMap lead to exception (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278734">Bug 278734</a>. [ActivityMgmt] WorkbenchActivityHelper restrictArray is returning NULL for objects failing the test "restrictUseOf(Object)" (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281723">Bug 281723</a>. [Databinding] SWTException: Invalid thread access when binding in non-UI thread (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282046">Bug 282046</a>. [MPE] MultiPageEditorSite does not remove properly its KeyBindingService (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282690">Bug 282690</a>. [DataBinding] problems with disposed observables (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283351">Bug 283351</a>. [DataBinding] Document ObservableListTreeContentProvider ObservableCollectionTreeContentProvider constructor realm restriction (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283428">Bug 283428</a>. [DataBinding] ViewerSupport.bind() cannot be called multiple times (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284366">Bug 284366</a>. [DataBinding] ObservableValueEditingSupport sets model value 1st time even if not changed (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285045">Bug 285045</a>. [IDE] TVT35:TCT330: CHS: Duplicate Mnemonic Keys  on workspace pref page (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284556">Bug 284556</a>. [DataBinding] IDisposeListener.handleDispose parameter has wrong name (staleEvent) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286160">Bug 286160</a>. [Markers] Use 'bottom up' heap sort to optimize the Markers view (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286533">Bug 286533</a>. [DataBinding] Test failure in build N20090812-2000 (FIXED)<br>
   </p>
 
-<p>Integration Build (August 12, 2009, 1:12 a.m.)</p>
+<p>Integration Build (August 11, 2009, 12:10 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=209333">Bug 209333</a>. [Trim] [Trim] NPE in IWorkbenchPage.setPartState(IWorkbenchPartReference, IWorkbenchPage.STATE_RESTORED); (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=224546">Bug 224546</a>. [ViewMgmt] Remove F2 from ShowViewDialog (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=273112">Bug 273112</a>. [Markers] Use 'bottom up' heap sort to optimize the Markers view (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277926">Bug 277926</a>. [Commands] Command is not invoked when focus changes. (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278933">Bug 278933</a>. [Workbench] FileNotFoundException in test log makes it particularly unreadable (FIXED)<br>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281623">Bug 281623</a>. [FastView] NPE in FastViewPane$2.setState (was: File Search doesn't work in 3.5.0) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=276324">Bug 276324</a>. [ViewMgmt] CycleBaseHandler throws NPE if no workbench parts available (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=285555">Bug 285555</a>. Write tests for the ProgressView (NEW)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=286160">Bug 286160</a>. [Markers] Use 'bottom up' heap sort to optimize the Markers view (ASSIGNED)<br>
+  </p>
+
+<p>Integration Build (July 28, 2009, 3:54 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082">Bug 107082</a>. [Dialogs] npe in IconAndMessageDialog.getSWTImage(..) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284349">Bug 284349</a>. org.eclipse.ui.menus.ExtensionContributionFactory setInitializationData must declare "throws CoreException" (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 28, 2009, 3:51 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082">Bug 107082</a>. [Dialogs] npe in IconAndMessageDialog.getSWTImage(..) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284349">Bug 284349</a>. org.eclipse.ui.menus.ExtensionContributionFactory setInitializationData must declare "throws CoreException" (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 28, 2009, 3:47 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082">Bug 107082</a>. [Dialogs] npe in IconAndMessageDialog.getSWTImage(..) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284349">Bug 284349</a>. org.eclipse.ui.menus.ExtensionContributionFactory setInitializationData must declare "throws CoreException" (FIXED)<br>
+  </p>
+
+<p>Integration Build (July 28, 2009, 3:42 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082">Bug 107082</a>. [Dialogs] npe in IconAndMessageDialog.getSWTImage(..) (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=284349">Bug 284349</a>. org.eclipse.ui.menus.ExtensionContributionFactory setInitializationData must declare "throws CoreException" (FIXED)<br>
   </p>
 
-<p>Integration Build (July 21, 2009, 12:19 p.m.)</p>
+<p>Integration Build (July 21, 2009, 11:00 a.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=279152">Bug 279152</a>. Workbench title shows mnemonic chars, while tooltip does not (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281933">Bug 281933</a>. [Dialogs] Show Views Dialog and Windows Preference Dialog fail to open if SHOW_FILTERED_TEXTS is set to false (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=282874">Bug 282874</a>. [ViewMgmt] [ActivityMgmt] NullpointerException during saving state of view registry with disabled xp based activities (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=283204">Bug 283204</a>. [DataBinding] CheckableCheckedElementsObservableSet#clear can cause ConcurrentModificationException (FIXED)<br>
   </p>
 
-<p>Integration Build (July 08, 2009, 6:39 p.m.)</p>
+<p>Integration Build (July 07, 2009, 5:19 p.m.)</p>
+  <p>Problem reports updated</p>
+  <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280618">Bug 280618</a>. [CommonNavigator] org.eclipse.ui.navigator has errors (FIXED)<br>
+  </p>
+
+<p>Integration Build (June 29, 2009, 11:37 p.m.)</p>
   <p>Problem reports updated</p>
   <p>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=81514">Bug 81514</a>. [EditorMgmt] setInput should defend against null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251424">Bug 251424</a>. [DataBinding] Introduce ObservableTracker.setIgnored (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=277120">Bug 277120</a>. [common navigator] Project explorer does not reveal elements when linked to editor (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278311">Bug 278311</a>. [DataBinding]  INativePropertyListener methods should document that source may be null (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=278314">Bug 278314</a>. [DataBinding] JFaceProperty.Listener should extend NativePropertyListener (FIXED)<br>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=280341">Bug 280341</a>. [DataBinding] Glitch in ListBinding: Referencing Update*Value*Strategy.POLICY_UPDATE (FIXED)<br>
 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=281727">Bug 281727</a>. [DataBinding] observing delegating value property of observable list/set/map returns null if master element's hash code has changed (FIXED)<br>
   </p>
 
diff --git a/eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/expandall.gif b/eclipse/plugins/org.eclipse.ui/icons/full/elcl16/expandall.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.debug.ui/icons/full/elcl16/expandall.gif
copy to eclipse/plugins/org.eclipse.ui/icons/full/elcl16/expandall.gif
diff --git a/eclipse/plugins/org.eclipse.ant.ui/icons/full/ovr16/error_co.gif b/eclipse/plugins/org.eclipse.ui/icons/full/ovr16/error_ovr.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.ant.ui/icons/full/ovr16/error_co.gif
copy to eclipse/plugins/org.eclipse.ui/icons/full/ovr16/error_ovr.gif
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/ovr16/running_ovr.gif b/eclipse/plugins/org.eclipse.ui/icons/full/ovr16/running_ovr.gif
new file mode 100644
index 0000000..edb42cb
Binary files /dev/null and b/eclipse/plugins/org.eclipse.ui/icons/full/ovr16/running_ovr.gif differ
diff --git a/eclipse/plugins/org.eclipse.pde.api.tools.ui/icons/full/ovr16/warning_ovr.gif b/eclipse/plugins/org.eclipse.ui/icons/full/ovr16/warning_ovr.gif
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.api.tools.ui/icons/full/ovr16/warning_ovr.gif
copy to eclipse/plugins/org.eclipse.ui/icons/full/ovr16/warning_ovr.gif
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_error.gif b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_error.gif
index 553252c..d374e5f 100644
Binary files a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_error.gif and b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_error.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_none.gif b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_none.gif
index 4aa54a6..9cb9332 100644
Binary files a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_none.gif and b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_none.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_ok.gif b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_ok.gif
index 0fc45ba..ac5f321 100644
Binary files a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_ok.gif and b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_ok.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_task.gif b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_task.gif
index 09d5848..fa92f81 100644
Binary files a/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_task.gif and b/eclipse/plugins/org.eclipse.ui/icons/full/progress/progress_task.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui/icons/full/progress/pview.gif b/eclipse/plugins/org.eclipse.ui/icons/full/progress/pview.gif
index 4aa54a6..e3af1ba 100644
Binary files a/eclipse/plugins/org.eclipse.ui/icons/full/progress/pview.gif and b/eclipse/plugins/org.eclipse.ui/icons/full/progress/pview.gif differ
diff --git a/eclipse/plugins/org.eclipse.ui/plugin.properties b/eclipse/plugins/org.eclipse.ui/plugin.properties
index 366d18e..0c95fc0 100644
--- a/eclipse/plugins/org.eclipse.ui/plugin.properties
+++ b/eclipse/plugins/org.eclipse.ui/plugin.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2009 IBM Corporation and others.
+# Copyright (c) 2000, 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -57,6 +57,7 @@ ExtPoint.browserSupport = Browser Support
 ExtPoint.statusHandlers = Status Handlers
 ExtPoint.installationPages = Installation Pages
 ExtPoint.tweaklets = Tweaklets (internal/experimental)
+ExtPoint.propertiesView = Properties view
 
 Views.Category.Basic = General
 Views.IntroAdapter = Welcome
@@ -188,6 +189,8 @@ command.nextPerspective.description = Switch to the next perspective
 command.nextPerspective.name = Next Perspective
 command.nextSubTab.name = Next Sub-Tab
 command.nextSubTab.description = Switch to the next sub-tab
+command.nextTab.name = Next Tab
+command.nextTab.description = Switch to the next tab
 command.nextView.description = Switch to the next view
 command.nextView.name = Next View
 command.openEditorDropDown.description = Open the editor drop down list
@@ -209,6 +212,8 @@ command.previousPerspective.description = Switch to the previous perspective
 command.previousPerspective.name = Previous Perspective
 command.previousSubTab.name = Previous Sub-Tab
 command.previousSubTab.description = Switch to the previous sub-tab
+command.previousTab.name = Previous Tab
+command.previousTab.description = Switch to the previous tab
 command.previousView.description = Switch to the previous view
 command.previousView.name = Previous View
 command.print.description = Print
@@ -217,6 +222,8 @@ command.properties.description = Display the properties of the selected item
 command.properties.name = Properties
 command.quickAccess.description = Quickly access UI elements
 command.quickAccess.name = Quick Access
+command.spy.description = Shows contribution information for the currently selected element
+command.spy.name = Show Contributing Plug-in
 command.quickStart.description = Show help for beginning users
 command.quickStart.name = Welcome
 command.redo.description = Redo the last operation
@@ -331,6 +338,8 @@ PropertyPage.workingSets.name = Working Set Contents
 
 command.collapseAll.description = Collapse the current tree
 command.collapseAll.name = Collapse All
+command.expandAll.description = Expand the current tree
+command.expandAll.name = Expand All
 command.quickMenu.name = Open Quick Menu
 command.quickMenu.uri.name = Location URI
 command.showIn.name = Show In
diff --git a/eclipse/plugins/org.eclipse.ui/plugin.xml b/eclipse/plugins/org.eclipse.ui/plugin.xml
index 07579c7..13b3e7c 100644
--- a/eclipse/plugins/org.eclipse.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.ui/plugin.xml
@@ -50,6 +50,7 @@
    <extension-point id="browserSupport" name="%ExtPoint.browserSupport" schema="schema/browserSupport.exsd"/>
    <extension-point id="internalTweaklets" name="%ExtPoint.tweaklets" schema="schema/internalTweaklets.exsd"/>
    <extension-point id="installationPages" name="%ExtPoint.installationPages" schema="schema/installationPages.exsd"/>
+   <extension-point id="propertiesView" name="%ExtPoint.propertiesView" schema="schema/propertiesView.exsd"/>
    
    <extension
          point="org.eclipse.ui.contexts">
@@ -137,6 +138,16 @@
             sequence="M3+CR"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
       <key
+            commandId="org.eclipse.ui.file.properties"
+            platform="cocoa"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+I"/>
+      <key
+            commandId="org.eclipse.ui.file.properties"
+            platform="carbon"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+I"/>
+      <key
             commandId="org.eclipse.ui.file.refresh"
             sequence="F5"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
@@ -151,6 +162,17 @@
             sequence="M1+Y"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
       <key
+      		platform="carbon"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            sequence="M1+Y"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" />
+      <key
+            commandId="org.eclipse.ui.edit.redo"
+            contextId="org.eclipse.ui.contexts.dialogAndWindow"
+            sequence="M1+M2+Z"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" 
+            platform="carbon"/>
+      <key
             commandId="org.eclipse.ui.edit.cut"
             contextId="org.eclipse.ui.contexts.dialogAndWindow"
             sequence="M1+X"
@@ -635,6 +657,12 @@
             sequence="M1+M2+NUMPAD_DIVIDE">
       </key>
       <key
+            commandId="org.eclipse.ui.navigate.expandAll"
+            contextId="org.eclipse.ui.contexts.window"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M2+NUMPAD_MULTIPLY">
+      </key>
+      <key
             commandId="org.eclipse.ui.navigate.nextSubTab"
             contextId="org.eclipse.ui.contexts.dialogAndWindow"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
@@ -958,6 +986,12 @@
             name="%command.quickAccess.name"/>
       <command
             categoryId="org.eclipse.ui.category.window"
+            defaultHandler="org.eclipse.ui.internal.handlers.SpyHandler"
+            description="%command.spy.description"
+            id="org.eclipse.ui.window.spy"
+            name="%command.spy.name"/>
+      <command
+            categoryId="org.eclipse.ui.category.window"
             defaultHandler="org.eclipse.ui.internal.WorkbenchEditorsHandler"
             description="%command.switchToEditor.description"
             id="org.eclipse.ui.window.switchToEditor"
@@ -1156,6 +1190,20 @@
             name="%command.previousPage.name">
       </command>
       <command
+            description="%command.nextTab.description"
+            id="org.eclipse.ui.navigate.nextTab"
+            categoryId="org.eclipse.ui.category.navigate"
+            name="%command.nextTab.name"
+            defaultHandler="org.eclipse.ui.internal.handlers.TraversePageHandler:next">
+      </command>
+      <command
+            description="%command.previousTab.description"
+            id="org.eclipse.ui.navigate.previousTab"
+            categoryId="org.eclipse.ui.category.navigate"
+            name="%command.previousTab.name"
+            defaultHandler="org.eclipse.ui.internal.handlers.TraversePageHandler:previous">
+      </command>
+      <command
             description="%command.nextSubTab.description"
             id="org.eclipse.ui.navigate.nextSubTab"
             categoryId="org.eclipse.ui.category.navigate"
@@ -1190,6 +1238,12 @@
                values="org.eclipse.ui.internal.registry.ViewParameterValues">
          </commandParameter>
       </command>
+      <command
+            categoryId="org.eclipse.ui.category.navigate"
+            description="%command.expandAll.description"
+            id="org.eclipse.ui.navigate.expandAll"
+            name="%command.expandAll.name">
+      </command>
    </extension>
    
    <extension
@@ -1254,6 +1308,10 @@
             icon="$nl$/icons/full/elcl16/collapseall.gif">
       </image>
       <image
+            commandId="org.eclipse.ui.navigate.expandAll"
+            icon="$nl$/icons/full/elcl16/expandall.gif">
+      </image>
+      <image
             commandId="org.eclipse.ui.newWizard"
             disabledIcon="$nl$/icons/full/dtool16/new_wiz.gif"
             icon="$nl$/icons/full/etool16/new_wiz.gif">
@@ -2084,6 +2142,20 @@
                type="org.eclipse.core.expressions.ICountable">
          </adapter>
       </factory>
+      <factory
+            adaptableType="org.eclipse.ui.IPluginContribution"
+            class="org.eclipse.ui.internal.testing.PluginContributionAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.testing.ContributionInfo">
+         </adapter>
+      </factory>
+      <factory
+            adaptableType="org.eclipse.ui.internal.progress.JobInfo"
+            class="org.eclipse.ui.internal.testing.PluginContributionAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.testing.ContributionInfo">
+         </adapter>
+      </factory>
    </extension>
    <extension
          point="org.eclipse.ui.propertyPages">
diff --git a/eclipse/plugins/org.eclipse.ui/schema/commands.exsd b/eclipse/plugins/org.eclipse.ui/schema/commands.exsd
index 8b94699..157ce95 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/commands.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/commands.exsd
@@ -403,10 +403,10 @@ State information shared between all handlers, and potentially persisted between
          <attribute name="class" type="string">
             <annotation>
                <documentation>
-                  The class that can be loaded to store the state of this command.  State is shared amongst handlers, and can be persisted between sessions.  This class must implement <code>org.eclipse.core.commands.State</code>.  Please see API Information.
+                  The class that can be loaded to store the state of this command.  State is shared amongst handlers, and can be persisted between sessions.  This class must subclass <code>org.eclipse.core.commands.State</code>.  Please see API Information.
                </documentation>
                <appinfo>
-                  <meta.attribute kind="java"/>
+                  <meta.attribute kind="java" basedOn="org.eclipse.core.commands.State"/>
                </appinfo>
             </annotation>
          </attribute>
diff --git a/eclipse/plugins/org.eclipse.ui/schema/exportWizards.exsd b/eclipse/plugins/org.eclipse.ui/schema/exportWizards.exsd
index 233fc5d..5d74a2d 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/exportWizards.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/exportWizards.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="exportWizards" name="Export Wizards"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to register export wizard extensions. Export wizards appear as choices within the "Export Dialog", and are used to export resources from the workbench. 
 <p>
@@ -15,9 +15,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <choice minOccurs="0" maxOccurs="unbounded">
@@ -43,9 +43,29 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="keywordReference">
+      <annotation>
+         <documentation>
+            A reference by an Export Wizard to a keyword. See the keywords extension point.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the keyword being referred to.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.ui.keywords/keyword/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -53,9 +73,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="category">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name"/>
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <attribute name="id" type="string" use="required">
@@ -70,9 +90,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name of the category that will be used in the dialog box
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="parentCategory" type="string">
@@ -80,9 +100,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a path to another category if this category should be added as a child
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.exportWizards/category/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -90,9 +110,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="wizard">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name" icon="icon"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             an element that will be used to create export wizard
          </documentation>
@@ -101,6 +121,7 @@ Wizards may optionally specify a description subelement whose body should contai
          <sequence>
             <element ref="description" minOccurs="0" maxOccurs="1"/>
             <element ref="selection" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="keywordReference" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
          <attribute name="id" type="string" use="required">
             <annotation>
@@ -114,9 +135,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name that will be used in the dialog box to represent this wizard
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="category" type="string">
@@ -135,9 +156,9 @@ added to the "Other" category.
                   a fully qualified name of the class that implements <tt>org.eclipse.ui.IExportWizard</tt>
 interface
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.Wizard:org.eclipse.ui.IExportWizard"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="icon" type="string">
@@ -146,9 +167,9 @@ interface
                   a relative name of the icon that will be used 
 alongside the wizard name in the export engine listing.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -156,9 +177,9 @@ alongside the wizard name in the export engine listing.
 
    <element name="description" type="string">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element translatable="true"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             an optional subelement whose body should represent a short description
 of the export engine functionality.
@@ -186,18 +207,18 @@ when the wizard is invoked.
                <documentation>
                   a fully qualified class name.  If each object in the workbench selection implements this interface the selection will be passed to the wizard.  Otherwise, an empty selection is passed.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of an export extension definition:
 <p>
@@ -221,9 +242,9 @@ when the wizard is invoked.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the <samp>class</samp> attribute 
 must be a name of the class that implements 
@@ -233,9 +254,9 @@ must be a name of the class that implements
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The workbench comes preloaded with basic export engines 
 for files and directories.
@@ -243,9 +264,9 @@ for files and directories.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2002, 2005 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
diff --git a/eclipse/plugins/org.eclipse.ui/schema/importWizards.exsd b/eclipse/plugins/org.eclipse.ui/schema/importWizards.exsd
index 3c51fb3..fcf28fe 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/importWizards.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/importWizards.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="importWizards" name="Import Wizards"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to register import wizard extensions. Import wizards appear as choices within the "Import Dialog" and are used to import resources into the workbench. 
 <p>
@@ -15,9 +15,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <choice minOccurs="0" maxOccurs="unbounded">
@@ -43,9 +43,29 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="keywordReference">
+      <annotation>
+         <documentation>
+            A reference by an Import Wizard to a keyword. See the keywords extension point.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the keyword being referred to.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.ui.keywords/keyword/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -53,9 +73,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="category">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name"/>
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <attribute name="id" type="string" use="required">
@@ -70,9 +90,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name of the category that will be used in the dialog box
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="parentCategory" type="string">
@@ -80,9 +100,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a path to another category if this category should be added as a child
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.importWizards/category/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -90,9 +110,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="wizard">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element labelAttribute="name" icon="icon"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             an element that will be used to create import wizard
          </documentation>
@@ -101,6 +121,7 @@ Wizards may optionally specify a description subelement whose body should contai
          <sequence>
             <element ref="description" minOccurs="0" maxOccurs="1"/>
             <element ref="selection" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="keywordReference" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
          <attribute name="id" type="string" use="required">
             <annotation>
@@ -114,9 +135,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name that will be used in the dialog box to represent this wizard
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="category" type="string">
@@ -134,9 +155,9 @@ added to the "Other" category.
                <documentation>
                   a fully qualified name of the class that implements <samp>org.eclipse.ui.IImportWizard</samp> interface
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.Wizard:org.eclipse.ui.IImportWizard"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="icon" type="string">
@@ -144,9 +165,9 @@ added to the "Other" category.
                <documentation>
                   a relative name of the icon that will be used alongside the wizard name in the import engine listing.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -154,9 +175,9 @@ added to the "Other" category.
 
    <element name="description" type="string">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element translatable="true"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             an optional subelement whose body should represent a short description of the import engine functionality.
          </documentation>
@@ -182,18 +203,18 @@ added to the "Other" category.
                <documentation>
                   fully qualified class name.  If each object in the workbench selection implements this interface the selection will be passed to the wizard.  Otherwise, an empty selection is passed.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The following is an example of an import extension definition: 
 <p>
@@ -217,9 +238,9 @@ added to the "Other" category.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the <samp>class</samp> attribute must represent a name of the class that implements 
  <samp>org.eclipse.ui.IImportWizard</samp>.
@@ -228,18 +249,18 @@ added to the "Other" category.
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The workbench comes preloaded with the basic import engines for files and directories.
       </documentation>
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2002, 2005 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
diff --git a/eclipse/plugins/org.eclipse.ui/schema/intro.exsd b/eclipse/plugins/org.eclipse.ui/schema/intro.exsd
index 29ffa19..e042577 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/intro.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/intro.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ui">
+<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="intro" name="Intro Part"/>
@@ -24,6 +24,11 @@ The life cycle is as follows:
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="intro" minOccurs="0" maxOccurs="unbounded"/>
@@ -128,6 +133,9 @@ Since 3.2
                <documentation>
                   unique id of a product
                </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.core.runtime.products/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="introId" type="string" use="required">
@@ -135,6 +143,9 @@ Since 3.2
                <documentation>
                   unique id of an introduction
                </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.ui.intro/intro/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -193,7 +204,7 @@ Since 3.2
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2004, 2007 IBM Corporation and others.<br>
+         Copyright (c) 2004, 2009 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at <a 
diff --git a/eclipse/plugins/org.eclipse.ui/schema/keywords.exsd b/eclipse/plugins/org.eclipse.ui/schema/keywords.exsd
index f1dde3a..4f2d146 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/keywords.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/keywords.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ui">
+<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="keywords" name="Keywords"/>
@@ -8,14 +8,15 @@
       <documentation>
          The keywords extension point defines keywords and a unique id for reference by other schemas.
 
-See propertyPages and preferencePages.
+See propertyPages, newWizards, importWizards, exportWizards and preferencePages.
       </documentation>
    </annotation>
 
    <element name="extension">
       <annotation>
-         <documentation>
-         </documentation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
       </annotation>
       <complexType>
          <choice>
@@ -49,10 +50,6 @@ See propertyPages and preferencePages.
    </element>
 
    <element name="keyword">
-      <annotation>
-         <documentation>
-         </documentation>
-      </annotation>
       <complexType>
          <attribute name="id" type="string" use="required">
             <annotation>
@@ -116,7 +113,7 @@ See propertyPages and preferencePages.
          <meta.section type="implementation"/>
       </appInfo>
       <documentation>
-         Keywords are used only with preference and property pages.  See the <samp>keywordReference</samp> element of the org.eclipse.ui.propertyPages and org.eclipse.ui.preferencePages extension points.
+         Keywords are used with workbench wizards (new, import &amp; export), preference and property pages.  See the <samp>keywordReference</samp> element of the org.eclipse.ui.propertyPages and org.eclipse.ui.preferencePages extension points.
       </documentation>
    </annotation>
 
@@ -125,7 +122,7 @@ See propertyPages and preferencePages.
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2005,2006 IBM Corporation and others.<br>
+         Copyright (c) 2005, 2010 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at <a 
diff --git a/eclipse/plugins/org.eclipse.ui/schema/menus.exsd b/eclipse/plugins/org.eclipse.ui/schema/menus.exsd
index 31f6d84..038a366 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/menus.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/menus.exsd
@@ -37,7 +37,7 @@ The general strategy for this mechanism is to separate the 'location'
 <ul>
 <li><b>Scheme</b> - The 'type' of the UI component into which the contributions will be added. It may be either "menu", "popup" or "toolbar". While 'popup' is indeed a form of menu it is provided to allow a distinction between a view's 'chevron' menu (for which we use the "menu" scheme) and its default context menu which, by convention, should be registered using the "popup" scheme.</li>
 <li><b>ID</b> - This is the id of menu or toolbar into which the contributions should be added. By convention views should use their view id as the id of the root of their chevron and default popup menu. Note that there is no explicit distinction between contributions supporting editors and 'normal' contributions into the Menu Menu or Toolbar; both global contributions and editor contributions would use the "org.eclipse.ui.main.menu" id or "org.eclipse.ui.main.toolbar". A special id used with popup:, "org.eclipse.ui.popup.any", is reserved to handle contributions which are candidates to appear on any (top level) context menu. Note that these contributions are expected to implement a 'visibleWhen' expression sufficient to limit their visibility to appropriate menus</li>
-<li><b>Query</b> - This field allows fine-grained definition of the specific location <i>within</i> a given menu. It has the form "[placement]=[id]" where placement is one of "before" or "after" and the id is expected to be the id of some IContributionItem in the menu.</li>
+<li><b>Query</b> - This field allows fine-grained definition of the specific location <i>within</i> a given menu. It has the form "[placement]=[id]" where placement is one of "before", "after", or "endof" and the id is expected to be the id of some IContributionItem in the menu.</li>
 </ul> 
 <p>
 This will define the location at which the contributions will appear in the eclipse UI. Once the insertion point has been defined the rest of the contributions describe the UI elements that will be added at that location. Each element supports a 'visibleWhen' expression that determines at run time whether a particular item should appear in the menu based on the system's current state (selection, active view/editor, context...).  See <code>org.eclipse.ui.ISources</code> for a list of currently
@@ -531,8 +531,8 @@ The format for the URI is comprised of three basic parts:
 Scheme: One of "menu", "popup" or "toolbar. Indicates the type of the manager used to handle the contributions
 Id: This is either the id of an existing menu, a view id or the id of the editor 'type'
 Query: The query format is &lt;placement&gt;=&lt;id&gt; where:
- &lt;placement&gt; is either "before" or "after" and
- &lt;id&gt; is the id of an existing menu item
+ &lt;placement&gt; is either "before", "after", or "endof" and
+ &lt;id&gt; is the id of an existing menu item.  The placement modifier is executed when this contribution is processed.  Following contributions may change the final shape of the menu when they are processed.
                </documentation>
             </annotation>
          </attribute>
@@ -546,6 +546,13 @@ Query: The query format is &lt;placement&gt;=&lt;id&gt; where:
                </appInfo>
             </annotation>
          </attribute>
+         <attribute name="allPopups" type="boolean" use="default" value="false">
+            <annotation>
+               <documentation>
+                  By default popup contributions are not contributed to context menus that do not include an <b>additions</b> marker.
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -790,7 +797,7 @@ If omitted and the action appears in the toolbar, the Workbench will use a place
                <documentation>
                   The 'id' of this contribution. If defined then it can be  used as a reference in the Query part of the location defining whether the additions are to go before or after this element (or at the end of the logical group containing this element using the 'endof' value).
 <p>
-Separator contributions that have an id define the start of a logical group so the result of using the 'endof' value for placement is to search forward in the current menu to locate the next id'd separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu.
+Separator contributions that have an id define the start of a logical group so the result of using the 'endof' value for placement is to search forward in the current menu to locate the next separator and to place the inserted elements before that element. If no trailing separator is found then the items are placed at the end of the menu.
 </p>
                </documentation>
             </annotation>
@@ -828,6 +835,16 @@ Separator contributions that have an id define the start of a logical group so t
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="label" type="string">
+            <annotation>
+               <documentation>
+                  The label to be displayed for this element when it is displayed in the customize perspective dialog. This value should be translatable.
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -902,6 +919,22 @@ If defined then it can be  used as a reference in the Query part of the location
 
    <annotation>
       <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         <p>
+It is preferred that menu contributions be added in the <code>plugin.xml</code>.  Plugins can
+programmatically add their own menu contributions using <code>org.eclipse.ui.menus.IMenuService</code> and <code>org.eclipse.ui.menus.AbstractContributionFactory</code>, but should be sure to remove them if the plugin is unloaded.  The <code>IMenuService</code> can be retrieved through any of the <code>IServiceLocators</code>, the workbench, the workbench window, or the part site.
+</p>
+<p>
+See <a href="org_eclipse_ui_commands.html">org.eclipse.ui.commands</a> to define a command and <a href="org_eclipse_ui_handlers.html">org.eclipse.ui.handlers</a> to define an implementation for the command.
+</p>
+<p>To register a context menu, use the <code>IWorkbenchPartSite.registerContextMenu</code> methods.</p>
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
          <meta.section type="since"/>
       </appInfo>
       <documentation>
@@ -939,22 +972,6 @@ This is the simplest example; adding a command contribution after an existing me
       </documentation>
    </annotation>
 
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         <p>
-It is preferred that menu contributions be added in the <code>plugin.xml</code>.  Plugins can
-programmatically add their own menu contributions using <code>org.eclipse.ui.menus.IMenuService</code> and <code>org.eclipse.ui.menus.AbstractContributionFactory</code>, but should be sure to remove them if the plugin is unloaded.  The <code>IMenuService</code> can be retrieved through any of the <code>IServiceLocators</code>, the workbench, the workbench window, or the part site.
-</p>
-<p>
-See <a href="org_eclipse_ui_commands.html">org.eclipse.ui.commands</a> to define a command and <a href="org_eclipse_ui_handlers.html">org.eclipse.ui.handlers</a> to define an implementation for the command.
-</p>
-<p>To register a context menu, use the <code>IWorkbenchPartSite.registerContextMenu</code> methods.</p>
-      </documentation>
-   </annotation>
-
 
    <annotation>
       <appInfo>
diff --git a/eclipse/plugins/org.eclipse.ui/schema/newWizards.exsd b/eclipse/plugins/org.eclipse.ui/schema/newWizards.exsd
index 1344b4b..fbb3987 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/newWizards.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/newWizards.exsd
@@ -2,9 +2,9 @@
 <!-- Schema file written by PDE -->
 <schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
-      <appinfo>
+      <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="newWizards" name="Creation Wizards"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          This extension point is used to register resource creation wizard extensions. Creation wizards appear as choices within the "New Dialog", and are typically used to create folders and files. 
 <p>
@@ -19,9 +19,9 @@ Wizards may optionally specify a description subelement whose body should contai
 
    <element name="extension">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element />
-         </appinfo>
+         </appInfo>
       </annotation>
       <complexType>
          <choice minOccurs="0" maxOccurs="unbounded">
@@ -48,9 +48,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   an optional name of the extension instance
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -70,9 +70,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name of the category that will be used in the dialog box
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="parentCategory" type="string">
@@ -80,9 +80,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a path to another category if this category should be added as a child
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.newWizards/category/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
@@ -93,6 +93,7 @@ Wizards may optionally specify a description subelement whose body should contai
          <sequence>
             <element ref="description" minOccurs="0" maxOccurs="1"/>
             <element ref="selection" minOccurs="0" maxOccurs="unbounded"/>
+            <element ref="keywordReference" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
          <attribute name="id" type="string" use="required">
             <annotation>
@@ -106,9 +107,9 @@ Wizards may optionally specify a description subelement whose body should contai
                <documentation>
                   a translatable name of the wizard that will be used in the dialog box
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute translatable="true"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="icon" type="string">
@@ -117,9 +118,9 @@ Wizards may optionally specify a description subelement whose body should contai
                   a relative path of an icon that will be used together with the name to represent the wizard 
 as one of the choices in the creation dialog box.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="category" type="string">
@@ -137,9 +138,9 @@ added to the "Other" category.
                <documentation>
                   a fully qualified name of the Java class implementing <samp>org.eclipse.ui.INewWizard</samp>.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java" basedOn="org.eclipse.jface.wizard.Wizard:org.eclipse.ui.INewWizard"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="project" type="boolean">
@@ -155,9 +156,9 @@ Also causes the wizard to appear as a choice within the "New Project Dialog
                <documentation>
                   an optional attribute which identifies a perspective to activate when IProject resource creation is finished.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.perspectives/perspective/@id"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="preferredPerspectives" type="string">
@@ -185,9 +186,9 @@ Since 3.0
 Since 3.0
 </p>
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="resource"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="canFinishEarly" type="boolean">
@@ -209,9 +210,9 @@ Since 3.0
 
    <element name="description" type="string">
       <annotation>
-         <appinfo>
+         <appInfo>
             <meta.element translatable="true"/>
-         </appinfo>
+         </appInfo>
          <documentation>
             an optional subelement whose body contains a short text describing what the wizard will do when started
          </documentation>
@@ -225,9 +226,9 @@ Since 3.0
                <documentation>
                   a fully qualified class name.  If each object in the workbench selection implements this interface the selection will be passed to the wizard.  Otherwise, an empty selection is passed
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="java"/>
-               </appinfo>
+               </appInfo>
             </annotation>
          </attribute>
          <attribute name="name" type="string">
@@ -252,18 +253,38 @@ Since 3.0
                <documentation>
                   the id of a wizard that should be made primary.
                </documentation>
-               <appinfo>
+               <appInfo>
                   <meta.attribute kind="identifier" basedOn="org.eclipse.ui.newWizards/wizard/@id"/>
-               </appinfo>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="keywordReference">
+      <annotation>
+         <documentation>
+            A reference by a New Wizard to a keyword. See the keywords extension point.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The id of the keyword being referred to.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier" basedOn="org.eclipse.ui.keywords/keyword/@id"/>
+               </appInfo>
             </annotation>
          </attribute>
       </complexType>
    </element>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="examples"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Following is an example of creation wizard configuration: 
 <p>
@@ -296,9 +317,9 @@ Since 3.0
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="apiInfo"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The value of the class attribute must represent a class 
 that implements <samp>org.eclipse.ui.INewWizard</samp>. 
@@ -312,9 +333,9 @@ appear standalone as a separate dialog box.
 
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="implementation"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          The workbench comes with wizards for creating empty 
 resources of the following types: 
@@ -326,9 +347,9 @@ particular platform installation.
    </annotation>
 
    <annotation>
-      <appinfo>
+      <appInfo>
          <meta.section type="copyright"/>
-      </appinfo>
+      </appInfo>
       <documentation>
          Copyright (c) 2002, 2005 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
diff --git a/eclipse/plugins/org.eclipse.ui/schema/popupMenus.exsd b/eclipse/plugins/org.eclipse.ui/schema/popupMenus.exsd
index 2158c8b..6089503 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/popupMenus.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/popupMenus.exsd
@@ -6,7 +6,7 @@
          <meta.schema plugin="org.eclipse.ui" id="popupMenus" name="Pop-up Menus"/>
       </appInfo>
       <documentation>
-         This extension point is used to add new actions to context menus owned by other plug-ins.  Action contributions may be made against a specific object type (<samp>objectContribution</samp>) or against a specific context menu of a view or editor part (<samp>viewerContribution</samp>). When using <samp>objectContribution</samp>, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using <samp>viewerContribution</samp>, the contribution will only appear in the specified view or editor part context menu, regardless of the selection.
+         This extension point is used to add new actions to context menus owned by other plug-ins.  Action contributions may be made against a specific object type (<samp>objectContribution</samp>) or against a specific context menu of a view or editor part (<samp>viewerContribution</samp>). When using <samp>objectContribution</samp>, the contribution will appear in all view or editor part context menus where objects of the specified type are selected. In contrast, using <samp>viewerContribution</samp>, the contribution will only appear in the specified context menu of a view or editor, regardless of the selection.
 <p>
 You can now use <a href="org_eclipse_ui_menus.html">org.eclipse.ui.menus</a> to place commands editor or view contexts menus as well.
 </p>
@@ -95,7 +95,7 @@ The <code>objectContribution</code> element uses the core expression
 selection must subclass or implement.
                </documentation>
                <appInfo>
-                  <meta.attribute kind="java" basedOn="java.lang.object"/>
+                  <meta.attribute kind="java" basedOn="java.lang.Object"/>
                </appInfo>
             </annotation>
          </attribute>
@@ -138,7 +138,7 @@ selection must subclass or implement.
          <attribute name="targetID" type="string" use="required">
             <annotation>
                <documentation>
-                  the unique identifier of a context menu inside a view or editor part.
+                  the unique identifier of a context menu inside a view or editor part.  The ID is defined in the call to <code>getSite().registerContextMenu(*)</code>.  If not specified when registered, it defaults to the view or editor ID.
                </documentation>
             </annotation>
          </attribute>
@@ -417,6 +417,101 @@ within its <samp>selectionChanged</samp> method.
       </complexType>
    </element>
 
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiInfo"/>
+      </appInfo>
+      <documentation>
+         The value of the action attribute <samp>class</samp>
+must be a fully qualified class name of a Java class 
+that implements <samp>org.eclipse.ui.IObjectActionDelegate</samp>
+in the case of object contributions, 
+<samp>org.eclipse.ui.IViewActionDelegate</samp>
+for contributions to context menus that belong to views, 
+or <samp>org.eclipse.ui.IEditorActionDelegate</samp>
+for contributions to context menus that belong to editors.  
+In all cases, the implementing class is loaded as late 
+as possible to avoid loading the entire plug-in before 
+it is really needed. 
+<p>
+Note: For backwards compatibility, 
+<samp>org.eclipse.ui.IActionDelegate</samp> may be 
+implemented for object contributions. 
+<p>
+Conext menu extension within a part is only possible 
+when the target part publishes a menu for extension.  
+This is strongly encouraged, as it improves the 
+extensibility of the product. To accomplish this 
+each part should publish any context menus which are 
+defined by calling 
+<samp>IWorkbenchPartSite.registerContextMenu</samp>.  
+Once this has been done the workbench will 
+automatically insert any action extensions which exist. 
+<p>
+A menu id must be provided for each registered menu.  
+For consistency across parts the following strategy 
+should be adopted by all part implementors. 
+<p>
+<ul>
+<li>
+If the target part has only one context menu it 
+should be registered with id == part id.  This can be 
+done easily by calling 
+<samp>registerContextMenu(MenuManager, ISelectionProvider)</samp>.  
+Extenders may use the part id itself as the targetID for 
+the action extension. </li>
+<li>
+If the target part has more than one context menu a 
+unique id should be defined for each.  Prefix each id 
+with the part id and publish these id's within 
+the javadoc for the target part.  Register each 
+menu at runtime by calling 
+<samp>registerContextMenu(String, MenuManager, ISelectionProvider)</samp>. 
+Extenders will use the unique menu id as the targetID 
+for the action extension. </li></ul>
+<p>
+Any context menu which is registered with the workbench 
+also should contain a standard insertion point with id 
+<samp>IWorkbenchActionConstants.MB_ADDITIONS</samp>.  
+Other plug-ins will use this value as a reference 
+point for insertion.  The insertion point may be 
+defined by adding a GroupMarker to the menu at an 
+appropriate location for insertion. 
+<p>
+An object in the workbench which is the selection 
+in a context menu may define an 
+<samp>org.eclipse.ui.IActionFilter</samp>.  This is a 
+filtering strategy which can perform type specific 
+filtering.  The workbench will retrieve the filter 
+for the selection by testing to see if it implements 
+<samp>IActionFilter</samp>.  If that fails, the 
+workbench will ask for a filter through the 
+<samp>IAdaptable</samp> mechanism.
+<p>
+Action and menu labels may contain special characters that encode mnemonics which are specified using the ampersand ('&amp;') character in front of a selected character in the translated text. Since ampersand is not allowed in XML strings, use <samp>&amp;amp;</samp> character entity. 
+<p>
+If two or more actions are contributed to a menu by a single extension the actions will appear in the reverse order of how they are listed in the plugin.xml file. This behavior is admittedly unintuitive.  However, it was discovered after the  Eclipse Platform API was frozen.  Changing the behavior now would break every plug-in which relies upon the existing behavior.
+<p>
+The <samp>selection</samp> and <samp>enablement</samp> elements are mutually exclusive. The <samp>enablement</samp> element can replace the <samp>selection</samp> element using the sub-elements <samp>objectClass</samp> and <samp>objectState</samp>. For example, the following:
+<pre>
+ <selection
+  class="org.eclipse.core.resources.IFile"
+  name="*.java">
+ </selection>
+</pre>
+can be expressed using:
+<pre>
+ <enablement>
+  <and>
+   <objectClass name="org.eclipse.core.resources.IFile"/>
+   <objectState name="extension" value="java"/>
+  </and>
+ </enablement>
+</pre>
+      </documentation>
+   </annotation>
+
    <annotation>
       <appInfo>
          <meta.section type="examples"/>
@@ -519,101 +614,6 @@ In the example above, the specified action will appear as a menu item in the Tas
 
    <annotation>
       <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         The value of the action attribute <samp>class</samp>
-must be a fully qualified class name of a Java class 
-that implements <samp>org.eclipse.ui.IObjectActionDelegate</samp>
-in the case of object contributions, 
-<samp>org.eclipse.ui.IViewActionDelegate</samp>
-for contributions to context menus that belong to views, 
-or <samp>org.eclipse.ui.IEditorActionDelegate</samp>
-for contributions to context menus that belong to editors.  
-In all cases, the implementing class is loaded as late 
-as possible to avoid loading the entire plug-in before 
-it is really needed. 
-<p>
-Note: For backwards compatibility, 
-<samp>org.eclipse.ui.IActionDelegate</samp> may be 
-implemented for object contributions. 
-<p>
-Conext menu extension within a part is only possible 
-when the target part publishes a menu for extension.  
-This is strongly encouraged, as it improves the 
-extensibility of the product. To accomplish this 
-each part should publish any context menus which are 
-defined by calling 
-<samp>IWorkbenchPartSite.registerContextMenu</samp>.  
-Once this has been done the workbench will 
-automatically insert any action extensions which exist. 
-<p>
-A menu id must be provided for each registered menu.  
-For consistency across parts the following strategy 
-should be adopted by all part implementors. 
-<p>
-<ul>
-<li>
-If the target part has only one context menu it 
-should be registered with id == part id.  This can be 
-done easily by calling 
-<samp>registerContextMenu(MenuManager, ISelectionProvider)</samp>.  
-Extenders may use the part id itself as the targetID for 
-the action extension. </li>
-<li>
-If the target part has more than one context menu a 
-unique id should be defined for each.  Prefix each id 
-with the part id and publish these id's within 
-the javadoc for the target part.  Register each 
-menu at runtime by calling 
-<samp>registerContextMenu(String, MenuManager, ISelectionProvider)</samp>. 
-Extenders will use the unique menu id as the targetID 
-for the action extension. </li></ul>
-<p>
-Any context menu which is registered with the workbench 
-also should contain a standard insertion point with id 
-<samp>IWorkbenchActionConstants.MB_ADDITIONS</samp>.  
-Other plug-ins will use this value as a reference 
-point for insertion.  The insertion point may be 
-defined by adding a GroupMarker to the menu at an 
-appropriate location for insertion. 
-<p>
-An object in the workbench which is the selection 
-in a context menu may define an 
-<samp>org.eclipse.ui.IActionFilter</samp>.  This is a 
-filtering strategy which can perform type specific 
-filtering.  The workbench will retrieve the filter 
-for the selection by testing to see if it implements 
-<samp>IActionFilter</samp>.  If that fails, the 
-workbench will ask for a filter through the 
-<samp>IAdaptable</samp> mechanism.
-<p>
-Action and menu labels may contain special characters that encode mnemonics which are specified using the ampersand ('&amp;') character in front of a selected character in the translated text. Since ampersand is not allowed in XML strings, use <samp>&amp;amp;</samp> character entity. 
-<p>
-If two or more actions are contributed to a menu by a single extension the actions will appear in the reverse order of how they are listed in the plugin.xml file. This behavior is admittedly unintuitive.  However, it was discovered after the  Eclipse Platform API was frozen.  Changing the behavior now would break every plug-in which relies upon the existing behavior.
-<p>
-The <samp>selection</samp> and <samp>enablement</samp> elements are mutually exclusive. The <samp>enablement</samp> element can replace the <samp>selection</samp> element using the sub-elements <samp>objectClass</samp> and <samp>objectState</samp>. For example, the following:
-<pre>
- <selection
-  class="org.eclipse.core.resources.IFile"
-  name="*.java">
- </selection>
-</pre>
-can be expressed using:
-<pre>
- <enablement>
-  <and>
-   <objectClass name="org.eclipse.core.resources.IFile"/>
-   <objectState name="extension" value="java"/>
-  </and>
- </enablement>
-</pre>
-      </documentation>
-   </annotation>
-
-
-   <annotation>
-      <appInfo>
          <meta.section type="implementation"/>
       </appInfo>
       <documentation>
diff --git a/eclipse/plugins/org.eclipse.ui/schema/preferenceTransfer.exsd b/eclipse/plugins/org.eclipse.ui/schema/preferenceTransfer.exsd
index e58faa3..5761b26 100644
--- a/eclipse/plugins/org.eclipse.ui/schema/preferenceTransfer.exsd
+++ b/eclipse/plugins/org.eclipse.ui/schema/preferenceTransfer.exsd
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.ui">
+<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
 <annotation>
       <appInfo>
          <meta.schema plugin="org.eclipse.ui" id="preferenceTransfer" name="Preference Transfer"/>
@@ -14,6 +14,11 @@ Typically this is used for operations such as Import and Export.
    </annotation>
 
    <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
       <complexType>
          <sequence>
             <element ref="transfer" minOccurs="0" maxOccurs="unbounded"/>
@@ -148,10 +153,23 @@ default (org.eclipse.core.resources.ProjectScope.SCOPE)
          <attribute name="name" type="string" use="required">
             <annotation>
                <documentation>
-                  an attribute specifing a comma separated list of preference keys within the given node to be transferred, specifying the key attribute without specifying a matching node will result in a runtime error.
+                  Specifies the preference key to be transferred. Specifying the key attribute without specifying a matching node will result in a runtime error.
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="match">
+            <annotation>
+               <documentation>
+                  If match is set to "prefix", all keys on the preference node that start with the specified name will be transferred. If the match type is not specified, only keys equal to the name will be included. Added in 3.6.
+               </documentation>
+            </annotation>
+            <simpleType>
+               <restriction base="string">
+                  <enumeration value="prefix">
+                  </enumeration>
+               </restriction>
+            </simpleType>
+         </attribute>
       </complexType>
    </element>
 
@@ -265,10 +283,11 @@ default (org.eclipse.core.resources.ProjectScope.SCOPE)
             id="org.eclipse.ui.tests.all">
             <mapping scope="instance">
                 <entry node="org.eclipse.ui">
-                   <key name="showIntro,DOCK_PERSPECTIVE_BAR"/>
+                   <key name="DOCK_PERSPECTIVE_BAR"/>
                 </entry>
                 <entry node="org.eclipse.ui.workbench">
-                   <key name="bogus,RUN_IN_BACKGROUND"/>
+                   <key name="RUN_IN_BACKGROUND"/>
+                   <key name="OPEN_" match="prefix"/>
                 </entry>   
                 <entry node="org.eclipse.ui.ide"/>
                 <entry node="org.eclipse.core.resources"/>
@@ -284,30 +303,14 @@ default (org.eclipse.core.resources.ProjectScope.SCOPE)
       </documentation>
    </annotation>
 
-   <annotation>
-      <appInfo>
-         <meta.section type="apiInfo"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
 
-   <annotation>
-      <appInfo>
-         <meta.section type="implementation"/>
-      </appInfo>
-      <documentation>
-         
-      </documentation>
-   </annotation>
 
    <annotation>
       <appInfo>
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2005, 2006 IBM Corporation and others.<br>
+         Copyright (c) 2005, 2009 IBM Corporation and others.<br>
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0 which accompanies
 this distribution, and is available at <a 
diff --git a/eclipse/plugins/org.eclipse.ui/schema/propertiesView.exsd b/eclipse/plugins/org.eclipse.ui/schema/propertiesView.exsd
new file mode 100644
index 0000000..2d00bdb
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.ui/schema/propertiesView.exsd
@@ -0,0 +1,111 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.eclipse.ui" id="propertiesView" name="Properties view"/>
+      </appInfo>
+      <documentation>
+         This extension point is used to modify behavior of the Properties view.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="excludeSources" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="excludeSources">
+      <annotation>
+         <documentation>
+            Use this element to exclude a workbench part from participating in the Properties view.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  The unique id of the excluded workbench part.
+               </documentation>
+               <appInfo>
+                  <meta.attribute kind="identifier"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         3.6
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         The following example demonstrates how to exclude a view:
+<p>
+<pre>
+   <extension point="org.eclipse.ui.propertiesView">
+     <excludeSource id="org.eclipse.help.ui.HelpView"/>
+   </extension>
+</pre>
+</p>
+The same code pattern can be used to exclude editors.
+      </documentation>
+   </annotation>
+
+
+
+   <annotation>
+      <appInfo>
+         <meta.section type="copyright"/>
+      </appInfo>
+      <documentation>
+         Copyright (c) 2009 IBM Corporation and others.<br>
+All rights reserved. This program and the accompanying materials are made
+available under the terms of the Eclipse Public License v1.0 which accompanies
+this distribution, and is available at <a 
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
+      </documentation>
+   </annotation>
+
+</schema>
diff --git a/eclipse/plugins/org.eclipse.update.configurator/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.configurator/META-INF/MANIFEST.MF
index 3c7681b..d93cc5d 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.configurator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.update.configurator; singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.3.100.qualifier
 Bundle-Activator: org.eclipse.update.internal.configurator.ConfigurationActivator
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/ConfiguratorUtils.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/ConfiguratorUtils.java
index cbe2cc0..6afed3a 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/ConfiguratorUtils.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/ConfiguratorUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2003, 2009 IBM Corporation and others.
+ *  Copyright (c) 2003, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.osgi.framework.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ConfiguratorUtils {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfiguration.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfiguration.java
index 58a5a02..63b95ac 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfiguration.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import java.net.URL;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IPlatformConfiguration {
 
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfigurationFactory.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfigurationFactory.java
index bc0f044..bd41b89 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfigurationFactory.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/configurator/IPlatformConfigurationFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ import java.net.URL;
  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
  * (repeatedly) as the API evolves.
  * </p>
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IPlatformConfigurationFactory {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java
index eef0902..8dd577a 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,12 @@ import org.eclipse.core.runtime.IBundleGroupProvider;
 public class BundleGroupComponent implements IBundleGroupProvider {
 
 	public IBundleGroup[] getBundleGroups() {
-		return ConfigurationActivator.getConfigurator().getBundleGroups();
+		ConfigurationActivator activator = ConfigurationActivator.getConfigurator();
+		if (activator.bundleGroupProviderSR != null)
+			// we manually registered the group in the activator; return no groups
+			// the manually registered service will handle the groups we know about
+			return new IBundleGroup[0];
+		return activator.getBundleGroups();
 	}
 
 	public String getName() {
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
index c16f331..2a32318 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,7 +42,7 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv
 
 	private static BundleContext context;
 	private ServiceRegistration configurationFactorySR;
-	private ServiceRegistration bundleGroupProviderSR;
+	ServiceRegistration bundleGroupProviderSR;
 	private PlatformConfiguration configuration;
 
 	// Location of the configuration data
@@ -65,7 +65,13 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv
 		context = ctx;
 		loadOptions();
 		acquireFrameworkLogService();
-		initialize();
+		try {
+			initialize();
+		} catch (Exception e) {
+			//we failed to start, so make sure Utils closes its service trackers
+			Utils.shutdown();
+			throw e;
+		}
 
 		//Short cut, if the configuration has not changed
 		if (canRunWithCachedData()) {
@@ -76,11 +82,19 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv
 
 		Utils.debug("Starting update configurator..."); //$NON-NLS-1$
 
-		String reconcile = ctx.getProperty("org.eclipse.update.reconcile"); //$NON-NLS-1$
-		if (reconcile == null || reconcile.equalsIgnoreCase("true")) //$NON-NLS-1$
+		if (isReconciling())
 			installBundles();
 		registerBundleGroupProvider();
 	}
+	
+	/**
+	 * Returns whether the update configurator should be doing its own reconciling work
+	 */
+	public static boolean isReconciling() {
+		String reconcile = context.getProperty("org.eclipse.update.reconcile"); //$NON-NLS-1$
+		return reconcile == null || reconcile.equalsIgnoreCase("true"); //$NON-NLS-1$
+		
+	}
 
 	private void registerBundleGroupProvider() {
 		final String serviceName = IBundleGroupProvider.class.getName();
@@ -253,7 +267,7 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv
 			if (activationPolicy != null) {
 				ManifestElement[] elements = ManifestElement.parseHeader(Constants.BUNDLE_ACTIVATIONPOLICY, activationPolicy);
 				if (elements != null && elements.length > 0) {
-					// if the value is "lazy" then it has a lazy activation poliyc
+					// if the value is "lazy" then it has a lazy activation policy
 					if (Constants.ACTIVATION_LAZY.equals(elements[0].getValue()))
 						return true;
 				}
@@ -517,7 +531,7 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv
 		return configurator;
 	}
 
-	private void acquireFrameworkLogService() throws Exception {
+	private void acquireFrameworkLogService() {
 		ServiceReference logServiceReference = context.getServiceReference(FrameworkLog.class.getName());
 		if (logServiceReference == null)
 			return;
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
index db64d2a..10e2d39 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ public class ConfigurationParser extends DefaultHandler implements IConfiguratio
 			configURL = url;
 			this.installLocation = installLocation;
 			if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
-				File inputFile = new File(url.getFile());
+				File inputFile = URIUtil.toFile(URIUtil.toURI(url));
 				if (!inputFile.exists() || !inputFile.canRead())
 					return null;
 				lastModified = inputFile.lastModified();
@@ -311,7 +311,7 @@ public class ConfigurationParser extends DefaultHandler implements IConfiguratio
 				ConfigurationParser parser = new ConfigurationParser();
 				Configuration sharedConfig = parser.parse(sharedURL, installLocation);
 				if (sharedConfig == null)
-					throw new Exception();
+					throw new Exception("Failed to parse shared configuration: " + sharedURL);
 				config.setLinkedConfig(sharedConfig);
 			}
 		} catch (Exception e) {
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
index 691dfbe..e8548fe 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -60,7 +60,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 
 	private static PlatformConfiguration currentPlatformConfiguration = null;
 	//private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
-//	private static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
+	//	private static final TransformerFactory transformerFactory = TransformerFactory.newInstance();
 	private static final String XML_ENCODING = "UTF-8"; //$NON-NLS-1$
 
 	private Configuration config;
@@ -86,7 +86,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	private static final String CONFIG_FILE_LOCK_SUFFIX = ".lock"; //$NON-NLS-1$
 	private static final String CONFIG_FILE_TEMP_SUFFIX = ".tmp"; //$NON-NLS-1$
 	private static final String LINKS = "links"; //$NON-NLS-1$
-	private static final String[] BOOTSTRAP_PLUGINS = {}; 
+	private static final String[] BOOTSTRAP_PLUGINS = {};
 
 	private static final String DEFAULT_FEATURE_APPLICATION = "org.eclipse.ui.ide.workbench"; //$NON-NLS-1$
 
@@ -94,44 +94,45 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	private static final String LINK_READ = "r"; //$NON-NLS-1$
 	private static final String LINK_READ_WRITE = "rw"; //$NON-NLS-1$
 	private static URL installURL;
-	
+
 	private PlatformConfiguration(Location platformConfigLocation) throws CoreException, IOException {
 
 		this.externalLinkSites = new HashMap();
 		this.config = null;
-		
+
 		// initialize configuration
 		initializeCurrent(platformConfigLocation);
-		if(config != null)
+		if (config != null)
 			setDefaultPolicy();
 
 		// Detect external links. These are "soft link" to additional sites. The link
 		// files are usually provided by external installation programs. They are located
 		// relative to this configuration URL.
-		// Note: don't do it for self hosting
-		if (!isTransient())
-			configureExternalLinks();
-
-		// Validate sites in the configuration. Causes any sites that do not exist to
-		// be removed from the configuration
-		validateSites();
+		// Note: don't do it for self hosting or if update reconciler is disabled
+		if (ConfigurationActivator.isReconciling()) {
+			if (!isTransient())
+				configureExternalLinks();
+
+			// Validate sites in the configuration. Causes any sites that do not exist to
+			// be removed from the configuration
+			validateSites();
+		}
 
 		// compute differences between configuration and actual content of the sites
 		// (base sites and link sites)
 		// Note: when the config is transient (generated by PDE, etc.) we don't reconcile
 		if (isTransient())
 			return;
-		
+
 		// for 'osgi.clean' or osgi.checkConfiguration', force a refresh
 		boolean osgiClean = "true".equals(ConfigurationActivator.getBundleContext().getProperty("osgi.clean")); //$NON-NLS-1$ //$NON-NLS-2$
 		boolean osgiCheckConfiguration = "true".equals(ConfigurationActivator.getBundleContext().getProperty("osgi.checkConfiguration")); //$NON-NLS-1$ //$NON-NLS-2$
-		
+
 		if (osgiClean || osgiCheckConfiguration) {
 			// We have to call refresh() for features to be rescanned correctly
 			refresh();
 			reconcile();
-		}
-		else {
+		} else {
 			changeStamp = computeChangeStamp();
 			if (changeStamp > config.getDate().getTime())
 				reconcile();
@@ -148,11 +149,11 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 					installLocation = new Path(url.getPath()).removeLastSegments(3).toFile().toURL();
 			}
 		} catch (Exception e) {
-		//
+			//
 		}
-		initialize(url, installLocation);		
+		initialize(url, installLocation);
 	}
-		
+
 	public PlatformConfiguration(URL url, URL installLocation) throws Exception {
 		this.externalLinkSites = new HashMap();
 		initialize(url, installLocation);
@@ -163,15 +164,15 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		// has a MANAGED_ONLY policy, then all sites should have default policy 
 		// of MANAGED_ONLY.  
 		ISiteEntry[] sentries = getConfiguredSites();
-		if(sentries != null && sentries.length >0){
+		if (sentries != null && sentries.length > 0) {
 			int policyType = sentries[0].getSitePolicy().getType();
-			if(policyType == ISitePolicy.MANAGED_ONLY){
+			if (policyType == ISitePolicy.MANAGED_ONLY) {
 				defaultPolicy = policyType;
 			}
 		}
 	}
 
-	public static int getDefaultPolicy(){
+	public static int getDefaultPolicy() {
 		return defaultPolicy;
 	}
 
@@ -218,7 +219,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 
 		if (entry == null)
 			return;
-	
+
 		URL url = entry.getURL();
 		if (url == null)
 			return;
@@ -226,9 +227,9 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		String key = url.toExternalForm();
 		if (config.getSiteEntry(key) != null && !replace)
 			return;
-	
+
 		if (entry instanceof SiteEntry)
-			config.addSiteEntry(key, (SiteEntry)entry);
+			config.addSiteEntry(key, (SiteEntry) entry);
 	}
 
 	/*
@@ -241,8 +242,8 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		URL url = entry.getURL();
 		if (url == null)
 			return;
-		
-		String key = url.toExternalForm();	
+
+		String key = url.toExternalForm();
 		if (entry instanceof SiteEntry)
 			config.removeSiteEntry(key);
 	}
@@ -253,14 +254,14 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	public ISiteEntry[] getConfiguredSites() {
 		if (config == null)
 			return new ISiteEntry[0];
-		
+
 		SiteEntry[] sites = config.getSites();
 		ArrayList enabledSites = new ArrayList(sites.length);
-		for (int i=0; i<sites.length; i++) {
+		for (int i = 0; i < sites.length; i++) {
 			if (sites[i].isEnabled())
 				enabledSites.add(sites[i]);
 		}
-		return (ISiteEntry[])enabledSites.toArray(new ISiteEntry[enabledSites.size()]);
+		return (ISiteEntry[]) enabledSites.toArray(new ISiteEntry[enabledSites.size()]);
 	}
 
 	/*
@@ -269,7 +270,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	public ISiteEntry findConfiguredSite(URL url) {
 		return findConfiguredSite(url, true);
 	}
-	
+
 	/**
 	 * 
 	 * @param url site url
@@ -281,7 +282,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			return null;
 		String key = url.toExternalForm();
 
-		SiteEntry result = config.getSiteEntry(key);	
+		SiteEntry result = config.getSiteEntry(key);
 		if (result == null) { // retry with decoded URL string
 			try {
 				//PAL foundation
@@ -292,7 +293,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			}
 			result = config.getSiteEntry(key);
 		}
-			
+
 		if (result == null && checkPlatformURL) {
 			try {
 				result = findConfiguredSite(config.asPlatformURL(url), false);
@@ -320,17 +321,17 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			config = new Configuration();
 
 		SiteEntry[] sites = config.getSites();
-		for (int i=0; i<sites.length; i++) {
+		for (int i = 0; i < sites.length; i++) {
 			// find out what site contains the feature and configure it
 			try {
-				URL url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier()+ "_" + entry.getFeatureVersion() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+				URL url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier() + "_" + entry.getFeatureVersion() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 				try {
 					url = resolvePlatformURL(url, getBasePathLocation(url, config.getInstallURL(), config.getURL()));
 				} catch (IOException e) {
 				}
 				if (new File(url.getFile()).exists())
 					sites[i].addFeatureEntry(entry);
-				else  {
+				else {
 					url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier() + "/"); //$NON-NLS-1$ //$NON-NLS-2$
 					if (new File(url.getFile()).exists())
 						sites[i].addFeatureEntry(entry);
@@ -360,12 +361,12 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	public IFeatureEntry[] getConfiguredFeatureEntries() {
 		ArrayList configFeatures = new ArrayList();
 		SiteEntry[] sites = config.getSites();
-		for (int i=0; i<sites.length; i++) {
+		for (int i = 0; i < sites.length; i++) {
 			FeatureEntry[] features = sites[i].getFeatureEntries();
-			for (int j=0; j<features.length; j++)
+			for (int j = 0; j < features.length; j++)
 				configFeatures.add(features[j]);
 		}
-		return (IFeatureEntry[])configFeatures.toArray(new FeatureEntry[configFeatures.size()]);
+		return (IFeatureEntry[]) configFeatures.toArray(new FeatureEntry[configFeatures.size()]);
 	}
 
 	/*
@@ -376,7 +377,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			return null;
 
 		SiteEntry[] sites = config.getSites();
-		for (int i=0; i<sites.length; i++) {
+		for (int i = 0; i < sites.length; i++) {
 			FeatureEntry f = sites[i].getFeatureEntry(id);
 			if (f != null)
 				return f;
@@ -416,7 +417,6 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		return 0;
 	}
 
-
 	public String getApplicationIdentifier() {
 		// Return the app if defined in system properties
 		String application = ConfigurationActivator.getBundleContext().getProperty(ECLIPSE_APPLICATION);
@@ -478,22 +478,21 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 		return (URL[]) path.toArray(new URL[0]);
 	}
-	
+
 	public Set getPluginPaths() {
-		
+
 		HashSet paths = new HashSet();
 		ISiteEntry[] sites = getConfiguredSites();
 
 		for (int i = 0; i < sites.length; i++) {
 			String[] plugins = sites[i].getPlugins();
 			for (int j = 0; j < plugins.length; j++) {
-					paths.add(plugins[j]);
+				paths.add(plugins[j]);
 			}
 		}
-		
+
 		return paths;
 	}
-	
 
 	/*
 	 * A variation of the getPluginPath, but it returns the actual plugin entries
@@ -508,7 +507,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				Utils.debug("Site " + sites[i].getURL() + " is not a SiteEntry"); //$NON-NLS-1$ //$NON-NLS-2$
 				continue;
 			}
-			PluginEntry[] plugins = ((SiteEntry)sites[i]).getPluginEntries();
+			PluginEntry[] plugins = ((SiteEntry) sites[i]).getPluginEntries();
 			for (int j = 0; j < plugins.length; j++) {
 				allPlugins.add(plugins[j]);
 				Utils.debug("   " + plugins[j].getURL()); //$NON-NLS-1$
@@ -516,7 +515,6 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 		return (PluginEntry[]) allPlugins.toArray(new PluginEntry[0]);
 	}
-	
 
 	/*
 	 * @see IPlatformConfiguration#getBootstrapPluginIdentifiers()
@@ -581,7 +579,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	 */
 	public synchronized void save(URL url) throws IOException {
 		if (url == null)
-			throw new IOException(Messages.cfig_unableToSave_noURL); 
+			throw new IOException(Messages.cfig_unableToSave_noURL);
 
 		OutputStream os = null;
 		if (!url.getProtocol().equals("file")) { //$NON-NLS-1$
@@ -595,7 +593,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			} catch (CoreException e) {
 				Utils.log(e.getMessage());
 				Utils.log(e.getStatus());
-				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] { url.toExternalForm() })));
+				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] {url.toExternalForm()})));
 			} finally {
 				os.close();
 			}
@@ -604,7 +602,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			File cfigFile = new File(url.getFile().replace('/', File.separatorChar));
 			if (!cfigFile.getName().equals(PLATFORM_XML)) {
 				if (cfigFile.exists() && cfigFile.isFile()) {
-					Utils.log(Messages.PlatformConfiguration_expectingPlatformXMLorDirectory + cfigFile.getName()); 
+					Utils.log(Messages.PlatformConfiguration_expectingPlatformXMLorDirectory + cfigFile.getName());
 					cfigFile = cfigFile.getParentFile();
 				}
 				cfigFile = new File(cfigFile, CONFIG_NAME);
@@ -619,35 +617,35 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			//    - rename the temp file to platform.xml
 			File cfigFileOriginal = new File(cfigFile.getAbsolutePath());
 			File cfigTmp = new File(cfigFile.getAbsolutePath() + CONFIG_FILE_TEMP_SUFFIX);
-			
+
 			// Backup old file
-			if (cfigFile.exists()){
+			if (cfigFile.exists()) {
 				File backupDir = new File(workingDir, CONFIG_HISTORY);
 				if (!backupDir.exists())
 					backupDir.mkdir();
 				long timestamp = cfigFile.lastModified();
-				File preservedFile = new File(backupDir, String.valueOf(timestamp)+".xml"); //$NON-NLS-1$
+				File preservedFile = new File(backupDir, String.valueOf(timestamp) + ".xml"); //$NON-NLS-1$
 				// If the target file exists, increment the timestamp. Try at most 100 times.
 				long increment = 1;
-				while (preservedFile.exists() && increment < 100){
-					preservedFile = new File(backupDir, String.valueOf(timestamp+increment++)+".xml"); //$NON-NLS-1$
+				while (preservedFile.exists() && increment < 100) {
+					preservedFile = new File(backupDir, String.valueOf(timestamp + increment++) + ".xml"); //$NON-NLS-1$
 				}
 				if (!preservedFile.exists()) {
 					// try renaming current config to backup copy
 					if (!cfigFile.renameTo(preservedFile))
-						Utils.log(Messages.PlatformConfiguration_cannotBackupConfig); 
+						Utils.log(Messages.PlatformConfiguration_cannotBackupConfig);
 				}
 			}
 
 			// first save the file as temp
 			os = new FileOutputStream(cfigTmp);
-			
+
 			try {
 				saveAsXML(os);
 				// Try flushing any internal buffers, and synchronize with the disk
 				try {
 					os.flush();
-					((FileOutputStream)os).getFD().sync();
+					((FileOutputStream) os).getFD().sync();
 				} catch (SyncFailedException e2) {
 					Utils.log(e2.getMessage());
 				} catch (IOException e2) {
@@ -657,7 +655,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 					os.close();
 					os = null;
 				} catch (IOException e1) {
-					Utils.log(Messages.PlatformConfiguration_cannotCloseStream + cfigTmp); 
+					Utils.log(Messages.PlatformConfiguration_cannotCloseStream + cfigTmp);
 					Utils.log(e1.getMessage());
 				}
 				// set file time stamp to match that of the config element
@@ -668,13 +666,13 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				changeStamp = config.getDate().getTime();
 				config.setDirty(false);
 			} catch (CoreException e) {
-				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] { cfigTmp.getAbsolutePath() })));
+				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] {cfigTmp.getAbsolutePath()})));
 			} finally {
 				if (os != null)
 					try {
 						os.close();
 					} catch (IOException e1) {
-						Utils.log(Messages.PlatformConfiguration_cannotCloseTempFile + cfigTmp); 
+						Utils.log(Messages.PlatformConfiguration_cannotCloseTempFile + cfigTmp);
 					}
 			}
 
@@ -687,14 +685,13 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				// with "tmp" (latest), then "bak" (the previous). We can also end up
 				// here if we failed to rename the current config to "bak". In that
 				// case we will restart with the previous state.
-				Utils.log(Messages.PlatformConfiguration_cannotRenameTempFile); 
-				
-				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] { cfigTmp.getAbsolutePath() })));
+				Utils.log(Messages.PlatformConfiguration_cannotRenameTempFile);
+
+				throw new IOException(NLS.bind(Messages.cfig_unableToSave, (new String[] {cfigTmp.getAbsolutePath()})));
 			}
 		}
 	}
 
-
 	public static PlatformConfiguration getCurrent() {
 		return currentPlatformConfiguration;
 	}
@@ -704,12 +701,12 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 	 */
 	public static synchronized void startup(URL installURL, Location platformConfigLocation) throws Exception {
 		PlatformConfiguration.installURL = installURL;
-	
+
 		// create current configuration
 		if (currentPlatformConfiguration == null) {
 			currentPlatformConfiguration = new PlatformConfiguration(platformConfigLocation);
 			if (currentPlatformConfiguration.config == null)
-				throw new Exception(Messages.PlatformConfiguration_cannotLoadConfig + platformConfigLocation.getURL()); 
+				throw new Exception(Messages.PlatformConfiguration_cannotLoadConfig + platformConfigLocation.getURL());
 			if (currentPlatformConfiguration.config.isDirty())
 				// If this is a transient config (generated by PDE),do nothing
 				// otherwise, save the configuration with proper date
@@ -735,7 +732,6 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 	}
 
-
 	private synchronized void initializeCurrent(Location platformConfigLocation) throws IOException {
 
 		// Configuration URL was is specified by the OSGi layer. 
@@ -747,7 +743,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		// configuration is written into the specified configuration area.
 
 		URL configFileURL = new URL(platformConfigLocation.getURL(), CONFIG_NAME);
-		try {	
+		try {
 			// check concurrent use lock
 			getConfigurationLock(platformConfigLocation.getURL());
 
@@ -761,10 +757,10 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 					Location parentLocation = platformConfigLocation.getParentLocation();
 					if (parentLocation == null)
 						throw new IOException(); // no platform.xml found, need to create default site
-					
+
 					URL sharedConfigFileURL = new URL(parentLocation.getURL(), CONFIG_NAME);
 					config = loadConfig(sharedConfigFileURL, installURL);
-					
+
 					// pre-initialized config loaded OK ... copy any remaining update metadata
 					// Only copy if the default config location is not the install location
 					if (!sharedConfigFileURL.equals(configFileURL)) {
@@ -781,26 +777,25 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				// if config == null an unhandled exception has been thrown and we allow it to propagate
 				if (config != null) {
 					configLocation = configFileURL;
-					 if (config.getURL() == null)
+					if (config.getURL() == null)
 						config.setURL(configFileURL);
-					 verifyPath(configLocation, config.getInstallURL());
+					verifyPath(configLocation, config.getInstallURL());
 					Utils.debug("Creating configuration " + configFileURL.toString()); //$NON-NLS-1$
 				}
 			}
-		} finally {			
+		} finally {
 			// releaes concurrent use lock
 			clearConfigurationLock();
 		}
 	}
 
-	
 	private synchronized void initialize(URL url, URL installLocation) throws Exception {
 		if (url != null) {
-			config = loadConfig(url, installLocation);	
+			config = loadConfig(url, installLocation);
 			Utils.debug("Using configuration " + url.toString()); //$NON-NLS-1$
 		}
 		if (config == null) {
-			config = new Configuration();		
+			config = new Configuration();
 			Utils.debug("Creating empty configuration object"); //$NON-NLS-1$
 		}
 		config.setURL(url);
@@ -808,21 +803,22 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		configLocation = url;
 	}
 
-	private void createDefaultConfiguration(URL url, URL installLocation)throws IOException{
+	private void createDefaultConfiguration(URL url, URL installLocation) throws IOException {
 		// we are creating new configuration
 		config = new Configuration();
 		config.setURL(url);
 		config.setInstallLocation(installLocation);
-		SiteEntry defaultSite = (SiteEntry)getRootSite();
+		SiteEntry defaultSite = (SiteEntry) getRootSite();
 		configureSite(defaultSite);
 		try {
 			// parse the site directory to discover features
 			defaultSite.loadFromDisk(0);
 		} catch (CoreException e1) {
-			Utils.log(Messages.PlatformConfiguration_cannotLoadDefaultSite + defaultSite.getResolvedURL()); 
+			Utils.log(Messages.PlatformConfiguration_cannotLoadDefaultSite + defaultSite.getResolvedURL());
 			return;
 		}
 	}
+
 	private ISiteEntry getRootSite() {
 		// create default site entry for the root
 		ISitePolicy defaultPolicy = createSitePolicy(getDefaultPolicy(), DEFAULT_POLICY_LIST);
@@ -835,7 +831,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		ISiteEntry defaultSite = createSiteEntry(siteURL, defaultPolicy);
 		return defaultSite;
 	}
-	
+
 	/**
 	 * Gets the configuration lock
 	 * @param url configuration directory
@@ -844,24 +840,24 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		if (!url.getProtocol().equals("file")) //$NON-NLS-1$
 			return;
 
-		File lockFile = new File(url.getFile(), ConfigurationActivator.NAME_SPACE+ File.separator+CONFIG_FILE_LOCK_SUFFIX);
+		File lockFile = new File(url.getFile(), ConfigurationActivator.NAME_SPACE + File.separator + CONFIG_FILE_LOCK_SUFFIX);
 		verifyPath(url, config == null ? null : config.getInstallURL());
 		// PAL nio optional
-		lock = createLocker(lockFile); 
+		lock = createLocker(lockFile);
 		try {
 			lock.lock();
 		} catch (IOException ioe) {
 			lock = null;
-		}	
+		}
 	}
-	
+
 	private void clearConfigurationLock() {
 		// PAL nio optional
 		if (lock != null) {
 			lock.release();
 		}
 	}
-	
+
 	/**
 	 * Create a locker using java new I/O or regular I/O
 	 * depending whether we run in J2SE or cdcFoundation
@@ -871,23 +867,23 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		if (!checkNio) {
 			useNio = true;
 			try {
-				 Class.forName("java.nio.channels.FileLock"); //$NON-NLS-1$
+				Class.forName("java.nio.channels.FileLock"); //$NON-NLS-1$
 			} catch (ClassNotFoundException e) {
 				useNio = false;
 			}
 		}
 		if (useNio)
 			return new Locker_JavaNio(lock);
-		
+
 		return new Locker_JavaIo(lock);
 	}
-	
+
 	private long computeChangeStamp() {
 		featuresChangeStamp = computeFeaturesChangeStamp();
 		pluginsChangeStamp = computePluginsChangeStamp();
 		changeStamp = Math.max(featuresChangeStamp, pluginsChangeStamp);
 		// round off to seconds
-		changeStamp = (changeStamp/1000)*1000;
+		changeStamp = (changeStamp / 1000) * 1000;
 		return changeStamp;
 	}
 
@@ -999,7 +995,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			Utils.debug("  bad URL " + e); //$NON-NLS-1$
 			return;
 		}
-		
+
 		// process the link
 		SiteEntry linkSite = (SiteEntry) externalLinkSites.get(siteURL);
 		if (linkSite == null) {
@@ -1033,7 +1029,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				unconfigureSite(list[i]);
 				Utils.debug("Site " + siteURL + " does not exist ... removing from configuration"); //$NON-NLS-1$ //$NON-NLS-2$
 			}
-			
+
 			// If multiple paths are defined in the same link file
 			// or if the path changes, the old site will still be kept.
 			// A better algorithm could be implemented by keeping track 
@@ -1042,7 +1038,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			String linkName = list[i].getLinkFileName();
 			if (linkName != null) {
 				File linkFile = new File(linkName);
-				if (!linkFile.exists())  {
+				if (!linkFile.exists()) {
 					unconfigureSite(list[i]);
 					config.setDirty(true);
 					Utils.debug("Site " + siteURL + " is no longer linked ... removing from configuration"); //$NON-NLS-1$ //$NON-NLS-2$	
@@ -1050,7 +1046,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			}
 		}
 	}
-	
+
 	private void linkInitializedState(Configuration sharedConfig, Location sharedConfigLocation, Location newConfigLocation) {
 		try {
 			URL newConfigIniURL = new URL(newConfigLocation.getURL(), CONFIG_INI);
@@ -1063,7 +1059,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			String externalForm = Utils.makeRelative(config.getInstallURL(), sharedConfigLocation.getURL()).toExternalForm();
 			props.put("osgi.sharedConfiguration.area", externalForm); //$NON-NLS-1$
 			props.store(new FileOutputStream(configIni), "Linked configuration"); //$NON-NLS-1$
-			
+
 			config = new Configuration(new Date());
 			config.setURL(new URL(newConfigLocation.getURL(), CONFIG_NAME));
 			config.setLinkedConfig(sharedConfig);
@@ -1074,31 +1070,31 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			System.out.println(e);
 		}
 	}
-	
+
 	private Configuration loadConfig(URL url, URL installLocation) throws Exception {
 		if (url == null)
-			throw new IOException(Messages.cfig_unableToLoad_noURL); 
+			throw new IOException(Messages.cfig_unableToLoad_noURL);
 
 		// try to load saved configuration file (watch for failed prior save())
 		ConfigurationParser parser = null;
 		try {
 			parser = new ConfigurationParser();
 		} catch (InvocationTargetException e) {
-			throw (Exception)e.getTargetException();
+			throw (Exception) e.getTargetException();
 		}
-		
+
 		config = null;
 		Exception originalException = null;
 		try {
 			config = parser.parse(url, installLocation);
 			if (config == null)
-				throw new Exception(Messages.PlatformConfiguration_cannotFindConfigFile); 
+				throw new Exception(Messages.PlatformConfiguration_cannotFindConfigFile);
 		} catch (Exception e1) {
 			// check for save failures, so open temp and backup configurations
 			originalException = e1;
 			try {
-				URL tempURL = new URL(url.toExternalForm()+CONFIG_FILE_TEMP_SUFFIX);
-				config = parser.parse(tempURL, installLocation);  
+				URL tempURL = new URL(url.toExternalForm() + CONFIG_FILE_TEMP_SUFFIX);
+				config = parser.parse(tempURL, installLocation);
 				if (config == null)
 					throw new Exception();
 				config.setDirty(true); // force saving to platform.xml
@@ -1109,12 +1105,13 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 						File cfigFile = new File(url.getFile().replace('/', File.separatorChar));
 						File workingDir = cfigFile.getParentFile();
 						if (workingDir != null && workingDir.exists()) {
-							File[] backups = workingDir.listFiles(new FileFilter(){
+							File[] backups = workingDir.listFiles(new FileFilter() {
 								public boolean accept(File pathname) {
 									return pathname.isFile() && pathname.getName().endsWith(".xml"); //$NON-NLS-1$
-								}});
+								}
+							});
 							if (backups != null && backups.length > 0) {
-								URL backupUrl = backups[backups.length-1].toURL();
+								URL backupUrl = backups[backups.length - 1].toURL();
 								config = parser.parse(backupUrl, installLocation);
 							}
 						}
@@ -1170,8 +1167,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 	}
 
-	public static URL resolvePlatformURL(URL url, URL base_path_Location)
-			throws IOException {
+	public static URL resolvePlatformURL(URL url, URL base_path_Location) throws IOException {
 		if (url.getProtocol().equals("platform")) { //$NON-NLS-1$
 			if (base_path_Location == null) {
 				url = FileLocator.toFileURL(url);
@@ -1181,27 +1177,24 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 				final String BASE = "platform:/base/";
 				final String CONFIG = "platform:/config/";
 				String toResolve = url.toExternalForm();
-				if (toResolve.startsWith(BASE)) 
-					url = new URL(base_path_Location, toResolve.substring(BASE
-							.length()));
+				if (toResolve.startsWith(BASE))
+					url = new URL(base_path_Location, toResolve.substring(BASE.length()));
 				else if (toResolve.startsWith(CONFIG)) {
-					url = new URL(base_path_Location, toResolve.substring(CONFIG
-							.length()));
-				}
-				else
+					url = new URL(base_path_Location, toResolve.substring(CONFIG.length()));
+				} else
 					url = base_path_Location;
 			}
 		}
 		return url;
 	}
-	
-	private URL getBasePathLocation(URL  url, URL installLocation, URL configLocation) {
+
+	private URL getBasePathLocation(URL url, URL installLocation, URL configLocation) {
 		final String BASE = "platform:/base/";
 		final String CONFIG = "platform:/config/";
 		String toResolve = url.toExternalForm();
-		if(toResolve.startsWith(BASE)) {
+		if (toResolve.startsWith(BASE)) {
 			return installLocation;
-		}else if(toResolve.startsWith(CONFIG)){
+		} else if (toResolve.startsWith(CONFIG)) {
 			URL config_loc;
 			try {
 				config_loc = new URL(configLocation, "..");
@@ -1212,13 +1205,13 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 		return url;
 	}
-	
+
 	public static URL getInstallURL() {
 		return installURL;
 	}
-	
-	private void saveAsXML(OutputStream stream) throws CoreException,IOException {			
-		BufferedWriter xmlWriter = new BufferedWriter(new OutputStreamWriter(stream,XML_ENCODING));
+
+	private void saveAsXML(OutputStream stream) throws CoreException, IOException {
+		BufferedWriter xmlWriter = new BufferedWriter(new OutputStreamWriter(stream, XML_ENCODING));
 		try {
 			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 			factory.setExpandEntityReferences(false);
@@ -1226,18 +1219,18 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			factory.setIgnoringComments(true);
 			DocumentBuilder docBuilder = factory.newDocumentBuilder();
 			Document doc = docBuilder.newDocument();
-			
+
 			if (config == null)
-				throw Utils.newCoreException(Messages.PlatformConfiguration_cannotSaveNonExistingConfig,null); 
-			
+				throw Utils.newCoreException(Messages.PlatformConfiguration_cannotSaveNonExistingConfig, null);
+
 			config.setDate(new Date());
 			Element configElement = config.toXML(doc);
 			doc.appendChild(configElement);
-			
+
 			// This is not DBCS friendly... PAL
 			//XMLPrintHandler.printComment(xmlWriter,"Created on " + config.getDate().toString());
-			XMLPrintHandler.printNode(xmlWriter,doc,XML_ENCODING);
-			
+			XMLPrintHandler.printNode(xmlWriter, doc, XML_ENCODING);
+
 		} catch (Exception e) {
 			throw Utils.newCoreException("", e); //$NON-NLS-1$
 		} finally {
@@ -1245,8 +1238,8 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 			// will close the stream in the caller	
 			//xmlWriter.close();
 		}
-	} 
-	
+	}
+
 	private void reconcile() throws CoreException {
 		long lastChange = config.getDate().getTime();
 		SiteEntry[] sites = config.getSites();
@@ -1259,7 +1252,7 @@ public class PlatformConfiguration implements IPlatformConfiguration, IConfigura
 		}
 		config.setDirty(true);
 	}
-	
+
 	public Configuration getConfiguration() {
 		return config;
 	}
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Utils.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Utils.java
index cb932b4..7aacd63 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Utils.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2008 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -138,7 +138,7 @@ public class Utils {
 	 */
 	public static boolean isRunning() {
 		Bundle bundle = getBundle(PI_OSGI);
-		return  bundle == null ? false : bundle.getState() == Bundle.ACTIVE;
+		return  bundle == null ? false : (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING)) != 0;
 	}
 
 	/**
@@ -320,7 +320,7 @@ public class Utils {
 	 * corresponding to the key is not found in the resource bundle
 	 * the key value, or any default text following the key in the
 	 * argument value is returned as the resource string.
-	 * A key is identified as a string begining with the "%" character.
+	 * A key is identified as a string beginning with the "%" character.
 	 * Note that the "%" character is stripped off prior to lookup
 	 * in the resource bundle.
 	 * <p>
diff --git a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
index 3463c4e..0e2d4bd 100644
--- a/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
+++ b/eclipse/plugins/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -277,7 +277,11 @@ public class IniFileReader {
 		if (result.indexOf('{') != -1) {
 			// We test for the curly braces since due to NL issues we do not
 			// want to use MessageFormat unless we have to.
-			result = MessageFormat.format(result, mappings);
+			try {
+				result = MessageFormat.format(result, mappings);
+			} catch (IllegalArgumentException e) {
+				//ignore and return string without bound parameters
+			}
 		}
 		
 		return result;	
diff --git a/eclipse/plugins/org.eclipse.update.core.linux/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.core.linux/META-INF/MANIFEST.MF
index da92e5f..4df0396 100644
--- a/eclipse/plugins/org.eclipse.update.core.linux/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.core.linux/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentNameLinux
 Bundle-SymbolicName: org.eclipse.update.core.linux
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.update.core;bundle-version="[3.0.0,4.0.0)"
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.core.linux/src/update.c b/eclipse/plugins/org.eclipse.update.core.linux/src/update.c
index b2acc26..6fc0e0f 100644
--- a/eclipse/plugins/org.eclipse.update.core.linux/src/update.c
+++ b/eclipse/plugins/org.eclipse.update.core.linux/src/update.c
@@ -1,5 +1,5 @@
 /**********************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -112,7 +112,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_update_configuration_LocalSystemInfo_nat
 
 	int result;
 	
-	// Linux implemantation
+	// Linux implementation
 
 	result = org_eclipse_update_configuration_LocalSystemInfo_VOLUME_INVALID_PATH;
 	return result;
diff --git a/eclipse/plugins/org.eclipse.update.core.win32/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.core.win32/META-INF/MANIFEST.MF
index 9091590..69038c3 100644
--- a/eclipse/plugins/org.eclipse.update.core.win32/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.core.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentNameWin
 Bundle-SymbolicName: org.eclipse.update.core.win32
-Bundle-Version: 3.2.100.qualifier
+Bundle-Version: 3.2.200.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.update.core;bundle-version="[3.0.0,4.0.0)"
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.core.win32/src/make_ia64.bat b/eclipse/plugins/org.eclipse.update.core.win32/src/make_ia64.bat
index 0099dab..035a5b5 100644
--- a/eclipse/plugins/org.eclipse.update.core.win32/src/make_ia64.bat
+++ b/eclipse/plugins/org.eclipse.update.core.win32/src/make_ia64.bat
@@ -1,5 +1,5 @@
 rem *******************************************************************************
-rem  Copyright (c) 2005, 2006 IBM Corporation and others.
+rem  Copyright (c) 2005, 2008 IBM Corporation and others.
 rem  All rights reserved. This program and the accompanying materials
 rem  are made available under the terms of the Eclipse Public License v1.0
 rem  which accompanies this distribution, and is available at
diff --git a/eclipse/plugins/org.eclipse.update.core/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.core/META-INF/MANIFEST.MF
index 054efc0..ec24223 100644
--- a/eclipse/plugins/org.eclipse.update.core/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.update.core; singleton:=true
-Bundle-Version: 3.2.300.qualifier
+Bundle-Version: 3.2.402.qualifier
 Bundle-Activator: org.eclipse.update.internal.core.UpdateCore
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.core/plugin.xml b/eclipse/plugins/org.eclipse.update.core/plugin.xml
index 7d24227..db0d7fd 100644
--- a/eclipse/plugins/org.eclipse.update.core/plugin.xml
+++ b/eclipse/plugins/org.eclipse.update.core/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2006 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -9,7 +10,7 @@
      Contributors:
          IBM Corporation - initial API and implementation
  -->
-
+
 <plugin>
 
    <extension-point id="featureTypes" name="%featureTypes.name" schema="schema/featureTypes.exsd"/>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IActivity.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IActivity.java
index 47b7d45..6c18192 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IActivity.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IActivity.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import org.eclipse.core.runtime.*;
  * </p>
  * @see org.eclipse.update.configuration.IInstallConfiguration
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IActivity extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSite.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSite.java
index 58d3249..8c5aaf8 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSite.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.update.core.IVerificationListener;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IConfiguredSite extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSiteChangedListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSiteChangedListener.java
index 44de641..7266208 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSiteChangedListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IConfiguredSiteChangedListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ import org.eclipse.update.core.IFeature;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IConfiguredSiteChangedListener {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
index eb78cff..473b970 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfiguration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallConfiguration extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfigurationChangedListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfigurationChangedListener.java
index 1183177..d6f02c2 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfigurationChangedListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallConfigurationChangedListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@ package org.eclipse.update.configuration;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallConfigurationChangedListener {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallDeltaHandler.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallDeltaHandler.java
index d3348ad..71e92e2 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallDeltaHandler.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IInstallDeltaHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -20,7 +20,8 @@ package org.eclipse.update.configuration;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated Do not use this interface. The extension point deltaHandler has been deprecated.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallDeltaHandler{
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSite.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSite.java
index d4e8279..bcc03e9 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSite.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import org.eclipse.update.core.IFeature;
  * (repeatedly) as the API evolves.
  * </p> 
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ILocalSite extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSiteChangedListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSiteChangedListener.java
index 51b0d66..98cc3ea 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSiteChangedListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSiteChangedListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@ package org.eclipse.update.configuration;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ILocalSiteChangedListener {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSystemInfoListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSystemInfoListener.java
index ae52dd8..a2f3987 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSystemInfoListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ILocalSystemInfoListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ package org.eclipse.update.configuration;
  * @see LocalSystemInfo#removeInfoListener(ILocalSystemInfoListener)
  * @see LocalSystemInfo#fireSystemInfoChanged(IVolume,int)
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ILocalSystemInfoListener {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IProblemHandler.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IProblemHandler.java
index 46ca5b8..037d672 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IProblemHandler.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IProblemHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ package org.eclipse.update.configuration;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IProblemHandler {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ISessionDelta.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ISessionDelta.java
index 29b0790..1d843a5 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ISessionDelta.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/ISessionDelta.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ import org.eclipse.update.core.*;
  * </p>
  * @since 2.0
  * @deprecated Do not use this interface
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISessionDelta extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IVolume.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IVolume.java
index 7612622..c120efc 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IVolume.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/IVolume.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * </p>
  * @see org.eclipse.update.configuration.LocalSystemInfo
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IVolume extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
index 7cf2076..038cb4f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.internal.core.Volume;
  * </p>
  * @see ILocalSystemInfoListener
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class LocalSystemInfo {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/package.html
index 3cf1e8e..a35e812 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/configuration/package.html
@@ -16,10 +16,8 @@ system installation and configuration information. In general, users extending
 the update support  by writing additional feature and site implementation
 do not need to make use of interfaces defined in this package.
 <p>
-<b>Note:</b> This package is part of an interim API that is still under development and expected to
-change significantly before reaching stability. It is being made available at this early stage to solicit feedback
-from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ArchiveReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ArchiveReference.java
index d5ced7b..0ee0248 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ArchiveReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ArchiveReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ import org.eclipse.update.core.model.ArchiveReferenceModel;
  * @see org.eclipse.update.core.IArchiveReference
  * @see org.eclipse.update.core.model.ArchiveReferenceModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ArchiveReference
 	extends ArchiveReferenceModel
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseFeatureFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseFeatureFactory.java
index f37279a..79fe2df 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseFeatureFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseFeatureFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -42,8 +42,8 @@ import org.eclipse.update.core.model.URLEntryModel;
  * @see org.eclipse.update.core.IFeatureFactory
  * @see org.eclipse.update.core.model.FeatureModelFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class BaseFeatureFactory extends FeatureModelFactory implements IFeatureFactory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseInstallHandler.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseInstallHandler.java
index 82cc097..a3f5f11 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseInstallHandler.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseInstallHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.core.runtime.CoreException;
  * </p> 
  * @see org.eclipse.update.core.IInstallHandler
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class BaseInstallHandler implements IInstallHandler {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseSiteFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseSiteFactory.java
index 5e7225c..650bd1d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseSiteFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/BaseSiteFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -52,8 +52,8 @@ import org.eclipse.update.internal.core.connection.IResponse;
  * @see org.eclipse.update.core.ISiteFactory
  * @see org.eclipse.update.core.model.SiteModelFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class BaseSiteFactory extends SiteModelFactory implements ISiteFactory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Category.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Category.java
index c87d33b..73d1d56 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Category.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Category.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ import org.eclipse.update.core.model.CategoryModel;
  * @see org.eclipse.update.core.ICategory
  * @see org.eclipse.update.core.model.CategoryModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class Category extends CategoryModel implements ICategory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
index 2055915..632e409 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -43,8 +43,8 @@ import org.eclipse.update.internal.core.connection.IResponse;
  * @see org.eclipse.update.core.JarContentReference
  * @see org.eclipse.update.core.JarEntryContentReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ContentReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
index afc6f6a..329ef57 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
@@ -54,8 +54,8 @@ import org.eclipse.update.internal.core.UpdateSiteIncludedFeatureReference;
  * @see org.eclipse.update.core.IFeature
  * @see org.eclipse.update.core.model.FeatureModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class Feature extends FeatureModel implements IFeature {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureContentProvider.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureContentProvider.java
index e131244..0ceea5a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureContentProvider.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -58,8 +58,8 @@ import org.eclipse.update.internal.core.UpdateManagerUtils;
  * </p>
  * @see org.eclipse.update.core.IFeatureContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class FeatureContentProvider implements IFeatureContentProvider {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
index 615c31e..520081c 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -36,8 +36,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * @see org.eclipse.update.core.IFeatureReference
  * @see org.eclipse.update.core.model.FeatureReferenceModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class FeatureReference extends FeatureReferenceModel implements IFeatureReference, IPlatformEnvironment {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IArchiveReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IArchiveReference.java
index c56589a..776226c 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IArchiveReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IArchiveReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * </p>
  * @see org.eclipse.update.core.ArchiveReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IArchiveReference extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ICategory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ICategory.java
index acca787..c3ac959 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ICategory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ICategory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * </p>
  * @see org.eclipse.update.core.Category
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ICategory  extends IAdaptable{
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IContentConsumer.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IContentConsumer.java
index 19ece44..74fc952 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IContentConsumer.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IContentConsumer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * </p>
  * @see org.eclipse.update.core.IFeatureContentConsumer
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IContentConsumer {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeature.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeature.java
index c4bb09f..8af1af9 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeature.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeature.java
@@ -42,8 +42,8 @@ import org.eclipse.update.core.model.InstallAbortedException;
  * </p>
  * @see org.eclipse.update.core.Feature
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeature extends IAdaptable, IPlatformEnvironment {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentConsumer.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentConsumer.java
index a08af85..116d3dd 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentConsumer.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentConsumer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -39,8 +39,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * </p>
  * @see org.eclipse.update.core.IContentConsumer
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeatureContentConsumer {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentProvider.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentProvider.java
index d0657e5..d09f6f1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentProvider.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -46,8 +46,8 @@ import org.eclipse.core.runtime.CoreException;
  * </p>
  * @see org.eclipse.update.core.FeatureContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeatureContentProvider {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureFactory.java
index 35d8b40..7e0736d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * </p>
  * @see org.eclipse.update.core.BaseFeatureFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeatureFactory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
index e4624f3..e8bd3a3 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IFeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * </p>
  * @see org.eclipse.update.core.FeatureReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeatureReference extends IAdaptable,IPlatformEnvironment {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IImport.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IImport.java
index 30051dd..4dc6c70 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IImport.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IImport.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * </p>
  * @see org.eclipse.update.core.Import
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IImport extends IAdaptable, IUpdateConstants, IPlatformEnvironment {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IIncludedFeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IIncludedFeatureReference.java
index 4a344bf..7511a62 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IIncludedFeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IIncludedFeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.update.configuration.IConfiguredSite;
  * </p>
  * @see org.eclipse.update.core.FeatureReference
  * @since 2.0.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IIncludedFeatureReference extends IFeatureReference, IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandler.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandler.java
index fac1223..a18790a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandler.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandler.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
  * </p>
  * @see org.eclipse.update.core.BaseInstallHandler
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallHandler {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerEntry.java
index a7a39b9..206cece 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * @see org.eclipse.update.core.InstallHandlerEntry
  * @see org.eclipse.update.core.IInstallHandler
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallHandlerEntry extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerWithFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerWithFilter.java
index cf5c056..30ae8ea 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerWithFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IInstallHandlerWithFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -12,8 +12,8 @@ package org.eclipse.update.core;
 
 /**
  * Custom install handler.
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallHandlerWithFilter extends IInstallHandler{
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/INonPluginEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/INonPluginEntry.java
index e00a8d8..7bd158d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/INonPluginEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/INonPluginEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -35,8 +35,8 @@ import org.eclipse.core.runtime.IAdaptable;
  * @see org.eclipse.update.core.NonPluginEntry
  * @see org.eclipse.update.core.FeatureContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface INonPluginEntry extends IPlatformEnvironment, IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPlatformEnvironment.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPlatformEnvironment.java
index 025cabd..bad0bfb 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPlatformEnvironment.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPlatformEnvironment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.*;
  * @see org.eclipse.update.core.PluginEntry
  * @see org.eclipse.update.core.FeatureContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IPlatformEnvironment extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPluginEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPluginEntry.java
index 788595c..d3c2eb0 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPluginEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IPluginEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.*;
  * @see org.eclipse.update.core.PluginEntry
  * @see org.eclipse.update.core.FeatureContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IPluginEntry extends IPlatformEnvironment,IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISite.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISite.java
index d8a3ea8..663bf80 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISite.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.update.core.model.*;
  * </p>
  * @see org.eclipse.update.core.Site
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISite extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteContentProvider.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteContentProvider.java
index 0dc0457..be7c97b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteContentProvider.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.core.runtime.*;
  * </p>
  * @see org.eclipse.update.core.SiteContentProvider
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISiteContentProvider {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactory.java
index cf493d8..9d908eb 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.update.core.model.*;
  * </p>
  * @see org.eclipse.update.core.BaseSiteFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISiteFactory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactoryExtension.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactoryExtension.java
index 27e4039..b0422b6 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactoryExtension.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFactoryExtension.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -35,8 +35,8 @@ import org.eclipse.update.core.model.*;
  * </p>
  * @see org.eclipse.update.core.BaseSiteFactory
  * @since 2.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISiteFactoryExtension {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFeatureReference.java
index 925197b..0ba2c01 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteFeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.core.runtime.*;
  * </p>
  * @see org.eclipse.update.core.SiteFeatureReference
  * @since 2.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISiteFeatureReference extends IFeatureReference, IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteWithMirrors.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteWithMirrors.java
index 31b5c95..7a0ec9c 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteWithMirrors.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/ISiteWithMirrors.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -14,11 +14,11 @@ import org.eclipse.core.runtime.*;
 
 /**
  * An extension of ISite that supports mirrors.
- * The regular update site contains features (optionally groupped by categories), while
+ * The regular update site contains features (optionally grouped by categories), while
  * a mirrored site can define zero or more updates sites (mirrors) with the same content.
  * This allows users to pick their own update site, for performance purposes.
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface ISiteWithMirrors extends ISite {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IURLEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IURLEntry.java
index 3538178..93ebf0f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IURLEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IURLEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.core.runtime.*;
  * </p>
  * @see org.eclipse.update.core.URLEntry
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IURLEntry extends IAdaptable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IUpdateConstants.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IUpdateConstants.java
index 5f3c550..c4a1381 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IUpdateConstants.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IUpdateConstants.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ package org.eclipse.update.core;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0.2
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateConstants {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationListener.java
index e041f53..16ac847 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ package org.eclipse.update.core;
  * @see org.eclipse.update.core.IVerificationResult
  * @see org.eclipse.update.core.IVerifier
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IVerificationListener {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationResult.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationResult.java
index d400cc0..8ceacc5 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationResult.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerificationResult.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ package org.eclipse.update.core;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IVerificationResult {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerifier.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerifier.java
index 5b7bfee..61d835a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerifier.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IVerifier.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.core.runtime.*;
  * @see org.eclipse.update.core.IVerificationResult
  * @see org.eclipse.update.core.IFeatureContentProvider#getVerifier()
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IVerifier {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Import.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
index 5504b3f..156b006 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.internal.core.UpdateManagerUtils;
  * @see org.eclipse.update.core.IImport
  * @see org.eclipse.update.core.model.ImportModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class Import extends ImportModel implements IImport {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IncludedFeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IncludedFeatureReference.java
index 16a869d..7b8ee28 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IncludedFeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/IncludedFeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -35,8 +35,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * </p>
  * @see org.eclipse.update.core.VersionedIdentifier
  * @since 2.0.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class IncludedFeatureReference
 	extends IncludedFeatureReferenceModel
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallHandlerEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallHandlerEntry.java
index bffb6fa..900254b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallHandlerEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallHandlerEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.core.model.InstallHandlerEntryModel;
  * @see org.eclipse.update.core.model.InstallHandlerEntryModel
  * @see org.eclipse.update.core.IInstallHandler
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InstallHandlerEntry
 	extends InstallHandlerEntryModel
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallMonitor.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallMonitor.java
index 8df5d85..b722575 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallMonitor.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/InstallMonitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.internal.core.Messages;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InstallMonitor implements IProgressMonitor {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
index 2d8d1a5..1ea7f3a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -34,8 +34,8 @@ import org.eclipse.update.internal.core.*;
  * @see org.eclipse.update.core.ContentReference
  * @see org.eclipse.update.core.JarEntryContentReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class JarContentReference extends ContentReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarEntryContentReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarEntryContentReference.java
index 08ce0b1..336532c 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarEntryContentReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/JarEntryContentReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import java.util.jar.*;
  * @see org.eclipse.update.core.ContentReference
  * @see org.eclipse.update.core.JarContentReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class JarEntryContentReference extends ContentReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/NonPluginEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/NonPluginEntry.java
index ab5d24b..f854de1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/NonPluginEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/NonPluginEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ import org.eclipse.update.core.model.*;
  * @see org.eclipse.update.core.INonPluginEntry
  * @see org.eclipse.update.core.model.NonPluginEntryModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class NonPluginEntry
 	extends NonPluginEntryModel
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
index 08eb298..3a92eb9 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.internal.core.*;
  * @see org.eclipse.update.core.IPluginEntry
  * @see org.eclipse.update.core.model.PluginEntryModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class PluginEntry extends PluginEntryModel implements IPluginEntry {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Site.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
index 97ddff2..2c6b211 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -40,8 +40,8 @@ import org.eclipse.update.internal.core.*;
  * @see org.eclipse.update.core.ISite
  * @see org.eclipse.update.core.model.SiteModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class Site extends SiteModel implements ISiteWithMirrors {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteContentProvider.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteContentProvider.java
index df40967..8f38779 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteContentProvider.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteContentProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,8 +25,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
  * (repeatedly) as the API evolves.
  * </p>
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class SiteContentProvider implements ISiteContentProvider {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
index 137a3e2..7876b03 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -32,8 +32,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * @see org.eclipse.update.core.ISiteFeatureReference
  * @see org.eclipse.update.core.SiteFeatureReferenceModel 
  * @since 2.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SiteFeatureReference extends SiteFeatureReferenceModel implements ISiteFeatureReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReferenceModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReferenceModel.java
index 6cf716b..671c69e 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReferenceModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReferenceModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import java.util.List;
  * </p>
  * @see org.eclipse.update.core.FeatureReference
  * @since 2.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SiteFeatureReferenceModel extends FeatureReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
index 8171165..8aeebcf 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -36,8 +36,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * @see org.eclipse.update.configuration.ILocalSite
  * @see org.eclipse.update.configuration.IConfiguredSite
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SiteManager {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/URLEntry.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/URLEntry.java
index d3a3082..21342b7 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/URLEntry.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/URLEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.internal.core.*;
  * @see org.eclipse.update.core.IURLEntry
  * @see org.eclipse.update.core.model.URLEntryModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class URLEntry extends URLEntryModel implements IURLEntry {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Utilities.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Utilities.java
index 2b55523..ccde29f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Utilities.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Utilities.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.internal.core.*;
  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
  * (repeatedly) as the API evolves.
  * </p>
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class Utilities {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Verifier.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Verifier.java
index 52095bd..3692132 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Verifier.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/Verifier.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,8 +25,8 @@ import org.eclipse.core.runtime.*;
  * </p>
  * @see org.eclipse.update.core.IVerifier
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class Verifier implements IVerifier {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/VersionedIdentifier.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/VersionedIdentifier.java
index 2947363..a578772 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/VersionedIdentifier.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/VersionedIdentifier.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.internal.core.*;
  * </p>
  * @see org.eclipse.core.runtime.PluginVersionIdentifier
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class VersionedIdentifier {
 	private String id;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ArchiveReferenceModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ArchiveReferenceModel.java
index f0a0f4d..7359dec 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ArchiveReferenceModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ArchiveReferenceModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import java.net.URL;
  * </p>
  * @see org.eclipse.update.core.ArchiveReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ArchiveReferenceModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/CategoryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/CategoryModel.java
index 8e7a2ea..a99d88b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/CategoryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/CategoryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.update.core.Site;
  * </p>
  * @see org.eclipse.update.core.Category
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class CategoryModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ContentEntryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ContentEntryModel.java
index c972caa..cf71f8d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ContentEntryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ContentEntryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ package org.eclipse.update.core.model;
  * @see org.eclipse.update.core.model.PluginEntryModel
  * @see org.eclipse.update.core.model.NonPluginEntryModel
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class ContentEntryModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
index 3c6348a..89f9738 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -38,8 +38,8 @@ import org.xml.sax.helpers.DefaultHandler;
  * </ul>
  * 
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class DefaultFeatureParser extends DefaultHandler {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
index afccb07..e60d979 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -63,8 +63,8 @@ import org.xml.sax.helpers.DefaultHandler;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class DefaultSiteParser extends DefaultHandler {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
index 947faf2..6535672 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
@@ -40,8 +40,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * </p>
  * @see org.eclipse.update.core.Feature
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class FeatureModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModelFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModelFactory.java
index 1d54f19..4af40a5 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModelFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModelFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -34,8 +34,8 @@ import org.xml.sax.SAXException;
  * </p>
  * @see org.eclipse.update.core.BaseFeatureFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class FeatureModelFactory {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
index b4c816b..3536dc0 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -33,8 +33,8 @@ import org.eclipse.update.internal.core.UpdateManagerUtils;
  * </p>
  * @see org.eclipse.update.core.FeatureReference
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class FeatureReferenceModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ImportModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ImportModel.java
index 32da688..29dada1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ImportModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ImportModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,8 +25,8 @@ package org.eclipse.update.core.model;
  * </p>
  * @see org.eclipse.update.core.Import
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ImportModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/IncludedFeatureReferenceModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/IncludedFeatureReferenceModel.java
index aaa9ea5..a2cce0a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/IncludedFeatureReferenceModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/IncludedFeatureReferenceModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.update.core.IUpdateConstants;
  * </p>
  * @see org.eclipse.update.core.IncludedFeatureReference
  * @since 2.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class IncludedFeatureReferenceModel extends FeatureReference {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
index a732f8c..544a934 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.core.runtime.Status;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InstallAbortedException extends CoreException {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallHandlerEntryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallHandlerEntryModel.java
index da6f7e4..ea22ec7 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallHandlerEntryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallHandlerEntryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import java.net.URL;
  * </p>
  * @see org.eclipse.update.core.InstallHandlerEntry
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InstallHandlerEntryModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InvalidSiteTypeException.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InvalidSiteTypeException.java
index 7ad18ee..50c9214 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InvalidSiteTypeException.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/InvalidSiteTypeException.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ package org.eclipse.update.core.model;
  * </p>
  * @see org.eclipse.update.core.model.SiteModelFactory#canParseSiteType(String)
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InvalidSiteTypeException extends Exception {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
index bdcc399..9b55b02 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -44,8 +44,8 @@ import org.eclipse.update.internal.core.UpdateManagerUtils;
  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
  * (repeatedly) as the API evolves.
  * </p>
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class ModelObject extends PlatformObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/NonPluginEntryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/NonPluginEntryModel.java
index 7ae2bd3..44ec8f5 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/NonPluginEntryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/NonPluginEntryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,15 +25,15 @@ package org.eclipse.update.core.model;
  * </p>
  * @see org.eclipse.update.core.NonPluginEntry
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class NonPluginEntryModel extends ContentEntryModel {
 
 	private String id = null;
 
 	/**
-	 * Creates a uninitialized non-plug-in entry model object.
+	 * Creates a uninitialised non-plug-in entry model object.
 	 * 
 	 * @since 2.0
 	 */
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
index 02259d3..b78c1dc 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -26,8 +26,8 @@ package org.eclipse.update.core.model;
  * </p>
  * @see org.eclipse.update.core.PluginEntry
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class PluginEntryModel extends ContentEntryModel {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModel.java
index d124825..bd8f17c 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -40,8 +40,8 @@ import org.eclipse.update.internal.model.ConfiguredSiteModel;
  * </p>
  * @see org.eclipse.update.core.Site
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SiteModel extends ModelObject {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModelFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModelFactory.java
index cdc5411..097884f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModelFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/SiteModelFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -35,8 +35,8 @@ import org.xml.sax.SAXException;
  * </p>
  * @see org.eclipse.update.core.BaseSiteFactory
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SiteModelFactory {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
index 1ef1b91..2d4f866 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.update.internal.core.UpdateCore;
  * </p>
  * @see org.eclipse.update.core.URLEntry
  * @since 2.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class URLEntryModel extends ModelObject {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/package.html
index 414eb5b..03886d3 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/model/package.html
@@ -19,5 +19,9 @@ they can use the corresponding derived implementation classes contained
 in package <b>org.eclipse.update.core</b>.
 <p>Classes in this package would typically only be used directly when writing
 and alternate set of model objects for a feature and type implementation.
+<p>
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
+</p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/package.html
index 05da6c8..693e7b1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/core/package.html
@@ -21,5 +21,9 @@ of the API based on a model (<tt>IFooModel</tt> in the pattern) contained
 in package <b>org.eclipse.update.core.model</b>. In general, developers
 should extend the convenience classes rather than completely reimplementing
 the specified interfaces.
+<p>
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
+</p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalFeatureParser.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalFeatureParser.java
index 00a734f..dd71997 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalFeatureParser.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalFeatureParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -98,6 +98,10 @@ public class InternalFeatureParser extends DefaultHandler {
 	private static final String IMPORT = "import"; //$NON-NLS-1$
 	private static final String PLUGIN = "plugin"; //$NON-NLS-1$
 	private static final String DATA = "data"; //$NON-NLS-1$
+	
+	//debug message
+	private static final String UNSUPPORTED_FILTER_MSG = "Unsupported \"filter\" attribute, ignoring {0}, with id {1}, version {2}";
+	
 	// Current State Information
 	Stack stateStack = new Stack();
 
@@ -107,6 +111,7 @@ public class InternalFeatureParser extends DefaultHandler {
 
 	private int currentState;
     private String location;
+    private boolean ignoredElement = false;
 	
 	private final static SAXParserFactory parserFactory =
 		SAXParserFactory.newInstance();
@@ -451,10 +456,13 @@ public class InternalFeatureParser extends DefaultHandler {
 			case STATE_REQUIRES :
 				stateStack.pop();
 				if (objectStack.peek() instanceof FeatureModel) {
+					boolean foundIgnored = ignoredElement;
+					ignoredElement = false;
 					featureModel = (FeatureModel) objectStack.peek();
 					ImportModel[] importModels = featureModel.getImportModels();
 					if (importModels.length == 0) {
-						internalError(Messages.DefaultFeatureParser_RequireStateWithoutImportElement); 
+						if (!foundIgnored) //don't report error if we ignored something
+							internalError(Messages.DefaultFeatureParser_RequireStateWithoutImportElement);
 					} else {
 						boolean patchMode = false;
 						for (int i = 0; i < importModels.length; i++) {
@@ -838,6 +846,14 @@ public class InternalFeatureParser extends DefaultHandler {
 			internalError(NLS.bind(Messages.DefaultFeatureParser_IdOrVersionInvalid, (new String[] { id, ver, getState(currentState)})));
 		}
 
+		String filter = attributes.getValue("filter");
+		if (filter != null) {
+			//unsupported, ignore this element
+			if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_PARSING) 
+				debug(NLS.bind(UNSUPPORTED_FILTER_MSG, new String [] {INCLUDES, id, ver}));
+			return;
+		}
+		
 		IncludedFeatureReferenceModel includedFeature = factory.createIncludedFeatureReferenceModel();
 		includedFeature.setFeatureIdentifier(id);
 		includedFeature.setFeatureVersion(ver);
@@ -933,10 +949,19 @@ public class InternalFeatureParser extends DefaultHandler {
 		if (id == null || id.trim().equals("")) //$NON-NLS-1$
 			internalError(NLS.bind(Messages.DefaultFeatureParser_MissingId, (new String[] { getState(currentState) })));
 		else {
-			ImportModel imp = factory.createImportModel();
+			String filter = attributes.getValue("filter");
 			String ver = attributes.getValue("version"); //$NON-NLS-1$
 			String match = attributes.getValue("match"); //$NON-NLS-1$
 			String patch = attributes.getValue("patch"); //$NON-NLS-1$
+			
+			if (filter != null) {
+				//unsupported, ignore this element
+				if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_PARSING) 
+					debug(NLS.bind(UNSUPPORTED_FILTER_MSG, new String [] {IMPORT + ' ' + (pluginID != null ? PLUGIN : FEATURE), id, ver}));
+				ignoredElement = true;
+				return;
+			}
+			ImportModel imp = factory.createImportModel();
 
 			imp.setPatch(patch != null && patch.equalsIgnoreCase("true")); //$NON-NLS-1$
 
@@ -1006,6 +1031,14 @@ public class InternalFeatureParser extends DefaultHandler {
 		|| ver == null || ver.trim().equals("")) { //$NON-NLS-1$
 			internalError(NLS.bind(Messages.DefaultFeatureParser_IdOrVersionInvalid, (new String[] { id, ver, getState(currentState)})));
 		} else {
+			String filter = attributes.getValue("filter");
+			if (filter != null) {
+				//unsupported, ignore this element
+				if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_PARSING) 
+					debug(NLS.bind(UNSUPPORTED_FILTER_MSG, new String [] {PLUGIN, id, ver}));
+				return;
+			}
+			
 			PluginEntryModel pluginEntry = factory.createPluginEntryModel();
 			pluginEntry.setPluginIdentifier(id);
 			pluginEntry.setPluginVersion(ver);
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
index b7e3d54..fcdbb1d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,7 @@ public class SiteStatusAnalyzer {
 	private static final String ID = "org.eclipse.update.core"; //$NON-NLS-1$
 	private static List allConfiguredFeatures; /*VersionedIdentifier */
 	private LocalSite siteLocal;
-	
+
 	// A list of versionedIdentifiers for source bundles; initialized on demand.
 	private List sourceBundles = null;
 
@@ -73,7 +73,7 @@ public class SiteStatusAnalyzer {
 		if (featureSite == null) {
 			if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
 				UpdateCore.debug("Cannot determine status of feature:" + feature.getLabel() + ". Site is NULL."); //$NON-NLS-1$ //$NON-NLS-2$
-			String msg = NLS.bind(Messages.SiteLocal_UnableToDetermineFeatureStatusSiteNull, (new Object[] { feature.getURL()}));
+			String msg = NLS.bind(Messages.SiteLocal_UnableToDetermineFeatureStatusSiteNull, (new Object[] {feature.getURL()}));
 			return createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null);
 		}
 
@@ -82,7 +82,7 @@ public class SiteStatusAnalyzer {
 		if (cSite == null) {
 			if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
 				UpdateCore.warn("Cannot determine status of feature: " + feature.getLabel() + ". Configured Site is NULL."); //$NON-NLS-1$ //$NON-NLS-2$
-			String msg = NLS.bind(Messages.SiteLocal_UnableToDetermineFeatureStatusConfiguredSiteNull, (new Object[] { feature.getURL()}));
+			String msg = NLS.bind(Messages.SiteLocal_UnableToDetermineFeatureStatusConfiguredSiteNull, (new Object[] {feature.getURL()}));
 			return createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null);
 		}
 
@@ -106,7 +106,7 @@ public class SiteStatusAnalyzer {
 
 		// check ambiguous against registry [17015]
 		IPluginEntry[] featuresEntries = feature.getPluginEntries();
-		return status( feature, featuresEntries);
+		return status(feature, featuresEntries);
 	}
 
 	/*
@@ -125,7 +125,7 @@ public class SiteStatusAnalyzer {
 
 		// consider disable
 		// check the current feature
-		String msg = Messages.SiteLocal_FeatureDisable; 
+		String msg = Messages.SiteLocal_FeatureDisable;
 		int code = IFeature.STATUS_DISABLED;
 		IStatus featureStatus = getStatus(feature);
 		MultiStatus multiTemp = new MultiStatus(featureStatus.getPlugin(), code, msg, null);
@@ -147,7 +147,7 @@ public class SiteStatusAnalyzer {
 					try {
 						childFeature = children[i].getFeature(null);
 					} catch (CoreException e) {
-                        childFeature = null;
+						childFeature = null;
 						if (!UpdateManagerUtils.isOptional(children[i]))
 							UpdateCore.warn("Error retrieving feature:" + children[i]); //$NON-NLS-1$
 					}
@@ -157,7 +157,7 @@ public class SiteStatusAnalyzer {
 						// Unable to find children feature, broken
 						Object featureAsPrintableObject = children[i].getURL();
 						featureAsPrintableObject = children[i].getVersionedIdentifier();
-						String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureUnavailable, (new Object[] { featureAsPrintableObject }));
+						String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureUnavailable, (new Object[] {featureAsPrintableObject}));
 						multiTemp.add(createStatus(IStatus.ERROR, IFeature.STATUS_UNHAPPY, msg1, null));
 						if (IFeature.STATUS_UNHAPPY > code)
 							code = IFeature.STATUS_UNHAPPY;
@@ -168,7 +168,7 @@ public class SiteStatusAnalyzer {
 						if (childStatus.getCode() == IFeature.STATUS_DISABLED) {
 							VersionedIdentifier versionID = childFeature.getVersionedIdentifier();
 							String featureVer = (versionID == null) ? "" : versionID.getVersion().toString(); //$NON-NLS-1$
-							String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureDisable, (new String[] { childFeature.getLabel(), featureVer }));
+							String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureDisable, (new String[] {childFeature.getLabel(), featureVer}));
 							multiTemp.add(createStatus(IStatus.ERROR, childStatus.getCode(), msg1, null));
 							if (IFeature.STATUS_UNHAPPY > code)
 								code = IFeature.STATUS_UNHAPPY;
@@ -176,7 +176,7 @@ public class SiteStatusAnalyzer {
 						if (childStatus.getSeverity() != IStatus.OK) {
 							VersionedIdentifier versionID = childFeature.getVersionedIdentifier();
 							String featureVer = (versionID == null) ? "" : versionID.getVersion().toString(); //$NON-NLS-1$
-							String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureUnHappy, (new String[] { childFeature.getLabel(), featureVer }));
+							String msg1 = NLS.bind(Messages.SiteLocal_NestedFeatureUnHappy, (new String[] {childFeature.getLabel(), featureVer}));
 							multiTemp.add(createStatus(IStatus.ERROR, childStatus.getCode(), msg1, null));
 							if (childStatus.getCode() > code)
 								code = childStatus.getCode();
@@ -189,19 +189,19 @@ public class SiteStatusAnalyzer {
 		// set message
 		switch (code) {
 			case IFeature.STATUS_HAPPY :
-				msg = Messages.SiteLocal_FeatureHappy; 
+				msg = Messages.SiteLocal_FeatureHappy;
 				break;
 			case IFeature.STATUS_UNHAPPY :
-				msg = Messages.SiteLocal_FeatureUnHappy; 
+				msg = Messages.SiteLocal_FeatureUnHappy;
 				break;
 			case IFeature.STATUS_AMBIGUOUS :
-				msg = Messages.SiteLocal_FeatureAmbiguous; 
+				msg = Messages.SiteLocal_FeatureAmbiguous;
 				break;
 			case IFeature.STATUS_DISABLED :
-				msg = Messages.SiteLocal_FeatureDisable; 
+				msg = Messages.SiteLocal_FeatureDisable;
 				break;
 			default :
-				msg = Messages.SiteLocal_FeatureStatusUnknown; 
+				msg = Messages.SiteLocal_FeatureStatusUnknown;
 				break;
 		}
 		MultiStatus multi = new MultiStatus(featureStatus.getPlugin(), code, msg, null);
@@ -215,58 +215,52 @@ public class SiteStatusAnalyzer {
 	private IStatus status(IFeature pluginsOriginatorFeature, IPluginEntry[] featurePlugins) {
 		VersionedIdentifier featurePluginID;
 
-		String happyMSG = Messages.SiteLocal_FeatureHappy; 
-		String ambiguousMSG = Messages.SiteLocal_FeatureAmbiguous; 
+		String happyMSG = Messages.SiteLocal_FeatureHappy;
+		String ambiguousMSG = Messages.SiteLocal_FeatureAmbiguous;
 		IStatus featureStatus = createStatus(IStatus.OK, IFeature.STATUS_HAPPY, "", null); //$NON-NLS-1$
 		MultiStatus multi = new MultiStatus(featureStatus.getPlugin(), IFeature.STATUS_AMBIGUOUS, ambiguousMSG, null);
 		PackageAdmin pkgAdmin = UpdateCore.getPlugin().getPackageAdmin();
-		
+
 		// is Ambigous if we find a plugin from the feature
 		// with a different version and not the one we are looking
 		for (int i = 0; i < featurePlugins.length; i++) {
 			MultiStatus tempmulti = new MultiStatus(featureStatus.getPlugin(), IFeature.STATUS_AMBIGUOUS, ambiguousMSG, null);
 			featurePluginID = featurePlugins[i].getVersionedIdentifier();
 			boolean found = false;
-			
+
 			String singleVersionRange = '[' + featurePluginID.getVersion().toString() + ',' + featurePluginID.getVersion().toString() + ']';
 			Bundle[] bundles = pkgAdmin.getBundles(featurePluginID.getIdentifier(), singleVersionRange);
 			if (bundles != null && bundles.length == 1) {
 				found = true;
 				continue;
 			}
-			
+
 			// Check if there is another feature with this plugin (but different version)
 			// log it
 			bundles = pkgAdmin.getBundles(featurePluginID.getIdentifier(), null);
-			for (int j = 0; bundles != null && j < bundles.length && !found; j++ ) {
-				String bundleVersion = (String)bundles[j].getHeaders().get(Constants.BUNDLE_VERSION);
-				IFeature feature = getFeatureForId(new VersionedIdentifier(bundles[j].getSymbolicName(), bundleVersion ));
+			for (int j = 0; bundles != null && j < bundles.length && !found; j++) {
+				String bundleVersion = (String) bundles[j].getHeaders().get(Constants.BUNDLE_VERSION);
+				IFeature feature = getFeatureForId(new VersionedIdentifier(bundles[j].getSymbolicName(), bundleVersion));
 				if ((feature != null) && (!isFeaturePatchOfThisFeature(pluginsOriginatorFeature, feature))) {
 					String msg = null;
-					if (feature == null) {
-						Object[] values = new Object[] {bundles[j].getSymbolicName(), featurePluginID.getVersion(), bundleVersion};
-						msg = NLS.bind(Messages.SiteLocal_TwoVersionSamePlugin1, values);
-					} else {
-						String label = feature.getLabel();
-						String featureVersion = feature.getVersionedIdentifier().getVersion().toString();
-						Object[] values = new Object[] { bundles[j].getSymbolicName(), featurePluginID.getVersion(), bundleVersion, label, featureVersion };
-						msg = NLS.bind(Messages.SiteLocal_TwoVersionSamePlugin2, values);
-					}
-	
+					String label = feature.getLabel();
+					String featureVersion = feature.getVersionedIdentifier().getVersion().toString();
+					Object[] values = new Object[] {bundles[j].getSymbolicName(), featurePluginID.getVersion(), bundleVersion, label, featureVersion};
+					msg = NLS.bind(Messages.SiteLocal_TwoVersionSamePlugin2, values);
 					UpdateCore.warn("Found another version of the same plugin on the path:" + bundles[j].getSymbolicName() + " " + bundleVersion); //$NON-NLS-1$ //$NON-NLS-2$
 					tempmulti.add(createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null));
 				} else {
 					found = true;
 				}
-			
+
 			}
-	
+
 			// check whether the plugin is a source bundle
 			// that has not been configured into the runtime
 			if (!found) {
 				loadSourceBundlesList();
 				for (Iterator iter = sourceBundles.iterator(); iter.hasNext();) {
-					VersionedIdentifier nextId = (VersionedIdentifier)iter.next();
+					VersionedIdentifier nextId = (VersionedIdentifier) iter.next();
 					if (featurePluginID.equals(nextId)) {
 						found = true;
 						break;
@@ -282,12 +276,12 @@ public class SiteStatusAnalyzer {
 					multi.addAll(tempmulti);
 				} else {
 					if (multi.getCode() != IFeature.STATUS_UNHAPPY) {
-						String unhappyMSG = Messages.SiteLocal_FeatureUnHappy; 
+						String unhappyMSG = Messages.SiteLocal_FeatureUnHappy;
 						MultiStatus newMulti = new MultiStatus(featureStatus.getPlugin(), IFeature.STATUS_UNHAPPY, unhappyMSG, null);
 						newMulti.addAll(multi);
 						multi = newMulti;
 					}
-					String msg = NLS.bind(Messages.SiteLocal_NoPluginVersion, (new String[] { featurePluginID.getIdentifier() }));
+					String msg = NLS.bind(Messages.SiteLocal_NoPluginVersion, (new String[] {featurePluginID.getIdentifier()}));
 					multi.add(createStatus(IStatus.ERROR, IFeature.STATUS_UNHAPPY, msg, null));
 				}
 			}
@@ -299,7 +293,7 @@ public class SiteStatusAnalyzer {
 		// we return happy as we consider the isBroken verification has been done
 		return createStatus(IStatus.OK, IFeature.STATUS_HAPPY, happyMSG, null);
 	}
-	
+
 	public static File toFile(URL url) {
 		try {
 			if (!"file".equalsIgnoreCase(url.getProtocol())) //$NON-NLS-1$
@@ -318,7 +312,7 @@ public class SiteStatusAnalyzer {
 	private void loadSourceBundlesList() {
 		if (sourceBundles != null)
 			return;
-		
+
 		sourceBundles = new ArrayList(32);
 		IPlatformConfiguration config = ConfiguratorUtils.getCurrentPlatformConfiguration();
 		URL configLocation = config.getConfigurationLocation();
@@ -344,7 +338,7 @@ public class SiteStatusAnalyzer {
 					line = line.trim();// symbolicName,version,other ignored stuff
 					if (line.length() == 0)
 						continue;
-					
+
 					StringTokenizer tok = new StringTokenizer(line, ",", true);
 					String symbolicName = tok.nextToken();
 					if (symbolicName.equals(","))
@@ -376,17 +370,17 @@ public class SiteStatusAnalyzer {
 	}
 
 	private boolean isFeaturePatchOfThisFeature(IFeature pluginsOriginatorFeature, IFeature feature) {
-		
+
 		if (!feature.isPatch())
 			return false;
-		
+
 		IImport[] featureImports = feature.getImports();
 
 		if (featureImports == null) {
 			return false;
 		}
-		
-		for(int i = 0; i < featureImports.length; i++) {
+
+		for (int i = 0; i < featureImports.length; i++) {
 			if (featureImports[i].isPatch() && featureImports[i].getVersionedIdentifier().equals(pluginsOriginatorFeature.getVersionedIdentifier())) {
 				return true;
 			}
@@ -411,7 +405,6 @@ public class SiteStatusAnalyzer {
 		return new Status(statusSeverity, id, statusCode, completeString.toString(), e);
 	}
 
-
 	/*
 	 * returns all the configured fetaures
 	 */
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
index 0707949..f083f14 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,6 +40,7 @@ public class UpdateCore extends Plugin {
 	public static boolean DEBUG_SHOW_WEB;
 	public static boolean DEBUG_SHOW_IHANDLER;
 	public static boolean DEBUG_SHOW_RECONCILER;
+	public static boolean DEBUG_VERIFIER;
 		
 	private static final String PREFIX = "org.eclipse.update.core"; //$NON-NLS-1$
 	public static final String P_HISTORY_SIZE = PREFIX + ".historySize"; //$NON-NLS-1$
@@ -239,6 +240,7 @@ public class UpdateCore extends Plugin {
 			DEBUG_SHOW_WEB = getBooleanDebugOption("org.eclipse.update.core/debug/web", false); //$NON-NLS-1$
 			DEBUG_SHOW_IHANDLER = getBooleanDebugOption("org.eclipse.update.core/debug/installhandler", false); //$NON-NLS-1$
 			DEBUG_SHOW_RECONCILER = getBooleanDebugOption("org.eclipse.update.core/debug/reconciler", false); //$NON-NLS-1$
+			DEBUG_VERIFIER = getBooleanDebugOption("org.eclipse.equinox.p2.core/debug/verifier", false); // $NON-NLS-1$
 		}
 		
 		//
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
index 03af25b..77d0ba1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,12 +10,7 @@
  *******************************************************************************/
 package org.eclipse.update.internal.operations;
 
-//import java.io.*;
-//import java.net.*;
-//import java.nio.channels.*;
-import org.eclipse.update.core.IUpdateConstants;
-
-import org.eclipse.osgi.service.resolver.PlatformAdmin;
+import org.osgi.framework.BundleContext;
 
 import java.io.File;
 import java.io.IOException;
@@ -32,6 +27,7 @@ import org.eclipse.update.core.*;
 import org.eclipse.update.internal.configurator.PlatformConfiguration;
 import org.eclipse.update.internal.core.Messages;
 import org.eclipse.update.internal.core.UpdateCore;
+import org.eclipse.update.internal.verifier.PlanVerifier;
 import org.eclipse.update.operations.IInstallFeatureOperation;
 import org.eclipse.update.operations.IOperationValidator;
 import org.osgi.framework.*;
@@ -40,6 +36,9 @@ import org.osgi.framework.*;
  *  
  */
 public class OperationValidator implements IOperationValidator {
+
+	private static ServiceReference verifierServiceReference = null;
+
 	/**
 	 * Checks if the platform configuration has been modified outside this program.
 	 * @return the error status, or null if no errors
@@ -47,22 +46,20 @@ public class OperationValidator implements IOperationValidator {
 	public IStatus validatePlatformConfigValid() {
 		ArrayList status = new ArrayList(1);
 		checkPlatformWasModified(status);
-		
+
 		// report status
 		if (status.size() > 0)
 			return createMultiStatus(Messages.ActivityConstraints_rootMessage, status, IStatus.ERROR);
 		return null;
 	}
-	
+
 	/*
 	 * Called by UI before performing operation. Returns null if no errors, a
 	 * status with IStatus.WARNING code when the initial configuration is
 	 * broken, or a status with IStatus.ERROR when there the operation
 	 * introduces new errors
 	 */
-	public IStatus validatePendingInstall(
-		IFeature oldFeature,
-		IFeature newFeature) {
+	public IStatus validatePendingInstall(IFeature oldFeature, IFeature newFeature) {
 		// check initial state
 		ArrayList beforeStatus = new ArrayList();
 		validateInitialState(beforeStatus);
@@ -113,9 +110,7 @@ public class OperationValidator implements IOperationValidator {
 	/**
 	 * Called before performing operation.
 	 */
-	public IStatus validatePendingReplaceVersion(
-		IFeature feature,
-		IFeature anotherFeature) {
+	public IStatus validatePendingReplaceVersion(IFeature feature, IFeature anotherFeature) {
 		// check initial state
 		ArrayList beforeStatus = new ArrayList();
 		validateInitialState(beforeStatus);
@@ -129,7 +124,6 @@ public class OperationValidator implements IOperationValidator {
 		return createCombinedReportStatus(beforeStatus, status);
 	}
 
-
 	/*
 	 * Called by the UI before doing a revert/ restore operation
 	 */
@@ -164,13 +158,13 @@ public class OperationValidator implements IOperationValidator {
 		// report status
 		return createCombinedReportStatus(beforeStatus, status);
 	}
-	
+
 	/*
 	 * Called by the UI before doing a batched processing of several pending
 	 * changes.
 	 */
 	public RequiredFeaturesResult getRequiredFeatures(IInstallFeatureOperation[] jobs) {
-		
+
 		RequiredFeaturesResult requiredFeaturesResult = new RequiredFeaturesResult();
 		// check initial state
 		ArrayList beforeStatus = new ArrayList();
@@ -220,11 +214,9 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * handle unconfigure
 	 */
-	private static void validateUnconfigure(
-		IFeature feature,
-		ArrayList status) {
+	private static void validateUnconfigure(IFeature feature, ArrayList status) {
 		try {
-			checkSiteReadOnly(feature,status);
+			checkSiteReadOnly(feature, status);
 			ArrayList features = computeFeatures();
 			features = computeFeaturesAfterOperation(features, null, feature);
 			checkConstraints(features, status);
@@ -233,13 +225,12 @@ public class OperationValidator implements IOperationValidator {
 		}
 	}
 
-
 	/*
 	 * handle configure
 	 */
 	private static void validateConfigure(IFeature feature, ArrayList status) {
 		try {
-			checkSiteReadOnly(feature,status);
+			checkSiteReadOnly(feature, status);
 			ArrayList features = computeFeatures();
 			checkOptionalChildConfiguring(feature, status);
 			checkForCycles(feature, null, features);
@@ -254,19 +245,12 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * handle replace version
 	 */
-	private static void validateReplaceVersion(
-		IFeature feature,
-		IFeature anotherFeature,
-		ArrayList status) {
+	private static void validateReplaceVersion(IFeature feature, IFeature anotherFeature, ArrayList status) {
 		try {
-			checkSiteReadOnly(feature,status);
+			checkSiteReadOnly(feature, status);
 			ArrayList features = computeFeatures();
 			checkForCycles(feature, null, features);
-			features =
-				computeFeaturesAfterOperation(
-					features,
-					anotherFeature,
-					feature);
+			features = computeFeaturesAfterOperation(features, anotherFeature, feature);
 			checkConstraints(features, status);
 		} catch (CoreException e) {
 			status.add(e.getStatus());
@@ -276,16 +260,12 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * handle install and update
 	 */
-	private static void validateInstall(
-		IFeature oldFeature,
-		IFeature newFeature,
-		ArrayList status) {
+	private static void validateInstall(IFeature oldFeature, IFeature newFeature, ArrayList status) {
 		try {
-			checkSiteReadOnly(oldFeature,status);
+			checkSiteReadOnly(oldFeature, status);
 			ArrayList features = computeFeatures();
 			checkForCycles(newFeature, null, features);
-			features =
-				computeFeaturesAfterOperation(features, newFeature, oldFeature);
+			features = computeFeaturesAfterOperation(features, newFeature, oldFeature);
 			checkConstraints(features, status);
 			checkLicense(newFeature, status);
 		} catch (CoreException e) {
@@ -296,14 +276,12 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * handle revert and restore
 	 */
-	private static void validateRevert(
-		IInstallConfiguration config,
-		ArrayList status) {
+	private static void validateRevert(IInstallConfiguration config, ArrayList status) {
 		try {
-//			// check the timeline and don't bother
-//			// to check anything else if negative
-//			if (!checkTimeline(config, status))
-//				return;
+			//			// check the timeline and don't bother
+			//			// to check anything else if negative
+			//			if (!checkTimeline(config, status))
+			//				return;
 			ArrayList features = computeFeaturesAfterRevert(config);
 			checkConstraints(features, status);
 			checkRevertConstraints(features, status);
@@ -313,17 +291,14 @@ public class OperationValidator implements IOperationValidator {
 		}
 	}
 
-
 	/*
 	 * Handle one-click changes as a batch
 	 */
-	private static Set validatePendingChanges(
-		IInstallFeatureOperation[] jobs,
-		ArrayList status,
-		ArrayList beforeStatus) {
+	private static Set validatePendingChanges(IInstallFeatureOperation[] jobs, ArrayList status, ArrayList beforeStatus) {
 		try {
 			ArrayList features = computeFeatures();
-			ArrayList savedFeatures = features;
+			ArrayList savedFeatures = (ArrayList) features.clone();
+
 			int nexclusives = 0;
 
 			// pass 1: see if we can process the entire "batch"
@@ -336,19 +311,13 @@ public class OperationValidator implements IOperationValidator {
 				checkLicense(newFeature, status);
 				if (jobs.length > 1 && newFeature.isExclusive()) {
 					nexclusives++;
-					status.add(
-						createStatus(
-							newFeature,
-							FeatureStatus.CODE_EXCLUSIVE,
-							Messages.ActivityConstraints_exclusive));
+					status.add(createStatus(newFeature, FeatureStatus.CODE_EXCLUSIVE, Messages.ActivityConstraints_exclusive));
 					continue;
 				}
 				checkForCycles(newFeature, null, features);
-				features =
-					computeFeaturesAfterOperation(
-						features,
-						newFeature,
-						oldFeature);
+				features = computeFeaturesAfterOperation(features, newFeature, oldFeature);
+				// give clients the opportunity to veto the plan
+				verifyPlan(job, savedFeatures, features, status);
 			}
 			if (nexclusives > 0)
 				return Collections.EMPTY_SET;
@@ -357,48 +326,111 @@ public class OperationValidator implements IOperationValidator {
 				return Collections.EMPTY_SET;
 
 			// pass 2: we have conflicts
-			features = savedFeatures;
+			features = (ArrayList) savedFeatures.clone();
 			for (int i = 0; i < jobs.length; i++) {
 				IInstallFeatureOperation job = jobs[i];
 				IFeature newFeature = job.getFeature();
 				IFeature oldFeature = job.getOldFeature();
 
-				features =
-					computeFeaturesAfterOperation(
-						features,
-						newFeature,
-						oldFeature);
+				features = computeFeaturesAfterOperation(features, newFeature, oldFeature);
 
 				Set result = checkConstraints(features, status);
-				if (status.size() > 0
-					&& !isBetterStatus(beforeStatus, status)) {
-// bug 75613
-//					IStatus conflict =
-//						createStatus(
-//							newFeature,
-//							FeatureStatus.CODE_OTHER,
-//							Policy.bind(KEY_CONFLICT));
-//					status.add(0, conflict);
+
+				// give clients the opportunity to veto the plan
+				verifyPlan(job, savedFeatures, features, status);
+
+				if (status.size() > 0 && !isBetterStatus(beforeStatus, status)) {
+					// bug 75613
+					//					IStatus conflict =
+					//						createStatus(
+					//							newFeature,
+					//							FeatureStatus.CODE_OTHER,
+					//							Policy.bind(KEY_CONFLICT));
+					//					status.add(0, conflict);
 					return result;
 				}
 			}
 		} catch (CoreException e) {
 			status.add(e.getStatus());
+		} finally {
+			if (verifierServiceReference != null) {
+				BundleContext context = UpdateCore.getPlugin().getBundleContext();
+				if (context != null)
+					context.ungetService(verifierServiceReference);
+			}
 		}
-		
+
 		return Collections.EMPTY_SET;
 	}
-	
+
+	/*
+	 * Load and return the plan verifier if there is one registered and we don't have verification disabled.
+	 */
+	private static ServiceReference loadVerifier() {
+		final BundleContext context = UpdateCore.getPlugin().getBundleContext();
+		if (context == null)
+			return null;
+		String value = context.getProperty("eclipse.p2.verifyPlan"); //$NON-NLS-1$
+		if ("false".equalsIgnoreCase(value)) { //$NON-NLS-1$
+			if (UpdateCore.DEBUG_VERIFIER)
+				UpdateCore.debug("Plan verification disabled by user."); //$NON-NLS-1$
+			return null;
+		}
+		verifierServiceReference = context.getServiceReference(PlanVerifier.class.getName());
+		return verifierServiceReference;
+	}
+
+	/*
+	 * Give clients the opportunity to veto install/update changes. 
+	 */
+	private static void verifyPlan(final IInstallFeatureOperation installOperation, final ArrayList currentFeatures, final ArrayList featuresAfterOperation, final ArrayList status) {
+		ServiceReference ref = loadVerifier();
+		BundleContext context = UpdateCore.getPlugin().getBundleContext();
+		final PlanVerifier verifier;
+		if (context == null || ref == null)
+			verifier = null;
+		else
+			verifier = (PlanVerifier) context.getService(ref);
+		if (verifier == null) {
+			if (UpdateCore.DEBUG_VERIFIER)
+				UpdateCore.debug("No plan verifier available. Skipping plan verification."); //$NON-NLS-1$
+			return;
+		}
+		ISafeRunnable job = new ISafeRunnable() {
+			public void handleException(Throwable exception) {
+				if (UpdateCore.DEBUG_VERIFIER)
+					UpdateCore.debug("Exception while running verifier. Check log for details."); //$NON-NLS-1$
+				// log the exception 
+				UpdateCore.log("Exception while running plan verifier.", exception); //$NON-NLS-1$
+				// don't let a bad verifier prevent the operation. fall through and return OK so execution of the plan continues
+			}
+
+			public void run() throws Exception {
+				if (UpdateCore.DEBUG_VERIFIER)
+					UpdateCore.debug("Running plan verifier."); //$NON-NLS-1$
+				long start = System.currentTimeMillis();
+				verifier.verify(installOperation, currentFeatures, featuresAfterOperation, status);
+				if (UpdateCore.DEBUG_VERIFIER)
+					UpdateCore.debug("Verification complete in " + (System.currentTimeMillis() - start) + "ms."); //$NON-NLS-1$ //$NON-NLS-2$
+			}
+		};
+		try {
+			SafeRunner.run(job);
+		} finally {
+			context.ungetService(ref);
+		}
+	}
+
 	private static void checkPlatformWasModified(ArrayList status) {
 		try {
 			// checks if the platform has been modified outside this eclipse instance
 			IPlatformConfiguration platformConfig = ConfiguratorUtils.getCurrentPlatformConfiguration();
-			
+
 			long currentTimeStamp = platformConfig.getChangeStamp();
 			// get the last modified value for this config, from this process point of view
-			if (platformConfig instanceof PlatformConfiguration) 
-				currentTimeStamp = ((PlatformConfiguration)platformConfig).getConfiguration().lastModified();
-				
+			if (platformConfig instanceof PlatformConfiguration)
+				currentTimeStamp = ((PlatformConfiguration) platformConfig).getConfiguration().lastModified();
+
 			// get the real last modified value
 			URL platformXML = platformConfig.getConfigurationLocation();
 			long actualTimeStamp = currentTimeStamp;
@@ -409,23 +441,19 @@ public class OperationValidator implements IOperationValidator {
 				actualTimeStamp = connection.getLastModified();
 			}
 			if (currentTimeStamp != actualTimeStamp)
-				status.add(createStatus(
-								null,
-								FeatureStatus.CODE_OTHER,
-								Messages.ActivityConstraints_platformModified)); 
+				status.add(createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_platformModified));
 		} catch (IOException e) {
 			// ignore
 		}
 	}
-	
+
 	private static void checkSiteReadOnly(IFeature feature, ArrayList status) {
-		if(feature == null){
+		if (feature == null) {
 			return;
 		}
 		IConfiguredSite csite = feature.getSite().getCurrentConfiguredSite();
 		if (csite != null && !csite.isUpdatable())
-			status.add(createStatus(feature, FeatureStatus.CODE_OTHER,
-					NLS.bind(Messages.ActivityConstraints_readOnly, (new String[] { csite.getSite().getURL().toExternalForm() }))));
+			status.add(createStatus(feature, FeatureStatus.CODE_OTHER, NLS.bind(Messages.ActivityConstraints_readOnly, (new String[] {csite.getSite().getURL().toExternalForm()}))));
 	}
 
 	/*
@@ -434,11 +462,11 @@ public class OperationValidator implements IOperationValidator {
 	private static ArrayList computeFeatures() throws CoreException {
 		return computeFeatures(true);
 	}
+
 	/*
 	 * Compute a list of configured features
 	 */
-	private static ArrayList computeFeatures(boolean configuredOnly)
-		throws CoreException {
+	private static ArrayList computeFeatures(boolean configuredOnly) throws CoreException {
 		ArrayList features = new ArrayList();
 		ILocalSite localSite = SiteManager.getLocalSite();
 		IInstallConfiguration config = localSite.getCurrentConfiguration();
@@ -467,14 +495,7 @@ public class OperationValidator implements IOperationValidator {
 	 * Compute the nested feature subtree starting at the specified base
 	 * feature
 	 */
-	public static ArrayList computeFeatureSubtree(
-			IFeature top,
-			IFeature feature,
-			ArrayList features,
-			boolean tolerateMissingChildren,
-			ArrayList configuredFeatures,
-			ArrayList visitedFeatures)
-	throws CoreException {
+	public static ArrayList computeFeatureSubtree(IFeature top, IFeature feature, ArrayList features, boolean tolerateMissingChildren, ArrayList configuredFeatures, ArrayList visitedFeatures) throws CoreException {
 
 		// check arguments
 		if (top == null)
@@ -488,8 +509,7 @@ public class OperationValidator implements IOperationValidator {
 
 		// check for <includes> cycle
 		if (visitedFeatures.contains(feature)) {
-			IStatus status =
-			createStatus(top, FeatureStatus.CODE_CYCLE, Messages.ActivityConstraints_cycle);
+			IStatus status = createStatus(top, FeatureStatus.CODE_CYCLE, Messages.ActivityConstraints_cycle);
 			throw new CoreException(status);
 		} else {
 			// keep track of visited features so we can detect cycles
@@ -499,19 +519,11 @@ public class OperationValidator implements IOperationValidator {
 		// return specified base feature and all its children
 		if (!features.contains(feature))
 			features.add(feature);
-		IIncludedFeatureReference[] children =
-		feature.getIncludedFeatureReferences();
+		IIncludedFeatureReference[] children = feature.getIncludedFeatureReferences();
 		for (int i = 0; i < children.length; i++) {
 			try {
 				IFeature child = UpdateUtils.getIncludedFeature(feature, children[i]);
-				features =
-				computeFeatureSubtree(
-						top,
-						child,
-						features,
-						tolerateMissingChildren,
-						null,
-						visitedFeatures);
+				features = computeFeatureSubtree(top, child, features, tolerateMissingChildren, null, visitedFeatures);
 			} catch (CoreException e) {
 				if (!children[i].isOptional() && !tolerateMissingChildren)
 					throw e;
@@ -529,31 +541,18 @@ public class OperationValidator implements IOperationValidator {
 			if (license != null && license.trim().length() > 0)
 				return;
 		}
-		status.add(
-			createStatus(feature, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_noLicense));
+		status.add(createStatus(feature, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_noLicense));
 	}
 
 	/*
 	 * Compute a list of features that will be configured after the operation
 	 */
-	private static ArrayList computeFeaturesAfterOperation(
-		ArrayList features,
-		IFeature add,
-		IFeature remove)
-		throws CoreException {
+	private static ArrayList computeFeaturesAfterOperation(ArrayList features, IFeature add, IFeature remove) throws CoreException {
 
 		ArrayList addTree = computeFeatureSubtree(add, null, null, false,
 		/* do not tolerate missing children */
 		features, null);
-		ArrayList removeTree =
-			computeFeatureSubtree(
-				remove,
-				null,
-				null,
-				true /* tolerate missing children */,
-				null,
-				null
-		);
+		ArrayList removeTree = computeFeatureSubtree(remove, null, null, true /* tolerate missing children */, null, null);
 		if (remove != null) {
 			// Patches to features are removed together with
 			// those features. Include them in the list.
@@ -569,11 +568,7 @@ public class OperationValidator implements IOperationValidator {
 		return features;
 	}
 
-	private static void contributePatchesFor(
-		ArrayList removeTree,
-		ArrayList features,
-		ArrayList result)
-		throws CoreException {
+	private static void contributePatchesFor(ArrayList removeTree, ArrayList features, ArrayList result) throws CoreException {
 
 		for (int i = 0; i < removeTree.size(); i++) {
 			IFeature feature = (IFeature) removeTree.get(i);
@@ -581,16 +576,11 @@ public class OperationValidator implements IOperationValidator {
 		}
 	}
 
-	private static void contributePatchesFor(
-		IFeature feature,
-		ArrayList features,
-		ArrayList result)
-		throws CoreException {
+	private static void contributePatchesFor(IFeature feature, ArrayList features, ArrayList result) throws CoreException {
 		for (int i = 0; i < features.size(); i++) {
 			IFeature candidate = (IFeature) features.get(i);
 			if (UpdateUtils.isPatch(feature, candidate)) {
-				ArrayList removeTree =
-					computeFeatureSubtree(candidate, null, null, true,null,null);
+				ArrayList removeTree = computeFeatureSubtree(candidate, null, null, true, null, null);
 				result.addAll(removeTree);
 			}
 		}
@@ -600,8 +590,7 @@ public class OperationValidator implements IOperationValidator {
 	 * Compute a list of features that will be configured after performing the
 	 * revert
 	 */
-	private static ArrayList computeFeaturesAfterRevert(IInstallConfiguration config)
-		throws CoreException {
+	private static ArrayList computeFeaturesAfterRevert(IInstallConfiguration config) throws CoreException {
 
 		ArrayList list = new ArrayList();
 		IConfiguredSite[] csites = config.getConfiguredSites();
@@ -615,13 +604,10 @@ public class OperationValidator implements IOperationValidator {
 		return list;
 	}
 
-
-
 	/*
 	 * Compute a list of plugin entries for the specified features.
 	 */
-	private static ArrayList computePluginsForFeatures(ArrayList features)
-		throws CoreException {
+	private static ArrayList computePluginsForFeatures(ArrayList features) throws CoreException {
 		if (features == null)
 			return new ArrayList();
 
@@ -639,7 +625,6 @@ public class OperationValidator implements IOperationValidator {
 		return result;
 	}
 
-
 	/**
 	 * Check for feature cycles:
 	 * - visit feature
@@ -647,11 +632,7 @@ public class OperationValidator implements IOperationValidator {
 	 * - DFS children 
 	 * - when return from DFS remove the feature from the candidates list
 	 */
-	private static void checkForCycles(
-			IFeature feature,
-			ArrayList candidates,
-			ArrayList configuredFeatures)
-	throws CoreException {
+	private static void checkForCycles(IFeature feature, ArrayList candidates, ArrayList configuredFeatures) throws CoreException {
 
 		// check arguments
 		if (feature == null)
@@ -660,21 +641,19 @@ public class OperationValidator implements IOperationValidator {
 			configuredFeatures = new ArrayList();
 		if (candidates == null)
 			candidates = new ArrayList();
-		
+
 		// check for <includes> cycle
 		if (candidates.contains(feature)) {
-			String msg = NLS.bind(Messages.ActivityConstraints_cycle, (new String[] {feature.getLabel(), 
-            feature.getVersionedIdentifier().toString()}));
+			String msg = NLS.bind(Messages.ActivityConstraints_cycle, (new String[] {feature.getLabel(), feature.getVersionedIdentifier().toString()}));
 			IStatus status = createStatus(feature, FeatureStatus.CODE_CYCLE, msg);
 			throw new CoreException(status);
 		}
 
 		// potential candidate
 		candidates.add(feature);
-		
+
 		// recursively, check cycles with children
-		IIncludedFeatureReference[] children =
-		feature.getIncludedFeatureReferences();
+		IIncludedFeatureReference[] children = feature.getIncludedFeatureReferences();
 		for (int i = 0; i < children.length; i++) {
 			try {
 				IFeature child = UpdateUtils.getIncludedFeature(feature, children[i]);
@@ -687,12 +666,11 @@ public class OperationValidator implements IOperationValidator {
 		// no longer a candidate, because no cycles with children
 		candidates.remove(feature);
 	}
-	
+
 	/*
 	 * validate constraints
 	 */
-	private static Set  checkConstraints(ArrayList features, ArrayList status)
-		throws CoreException {
+	private static Set checkConstraints(ArrayList features, ArrayList status) throws CoreException {
 		if (features == null)
 			return Collections.EMPTY_SET;
 
@@ -708,9 +686,7 @@ public class OperationValidator implements IOperationValidator {
 	 * Verify all features are either portable, or match the current
 	 * environment
 	 */
-	private static void checkEnvironment(
-		ArrayList features,
-		ArrayList status) {
+	private static void checkEnvironment(ArrayList features, ArrayList status) {
 
 		String os = Platform.getOS();
 		String ws = Platform.getWS();
@@ -724,8 +700,7 @@ public class OperationValidator implements IOperationValidator {
 
 			if (fos.size() > 0) {
 				if (!fos.contains(os)) {
-					IStatus s =
-						createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_os);
+					IStatus s = createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_os);
 					if (!status.contains(s))
 						status.add(s);
 					continue;
@@ -734,8 +709,7 @@ public class OperationValidator implements IOperationValidator {
 
 			if (fws.size() > 0) {
 				if (!fws.contains(ws)) {
-					IStatus s =
-						createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_ws);
+					IStatus s = createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_ws);
 					if (!status.contains(s))
 						status.add(s);
 					continue;
@@ -744,8 +718,7 @@ public class OperationValidator implements IOperationValidator {
 
 			if (farch.size() > 0) {
 				if (!farch.contains(arch)) {
-					IStatus s =
-						createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_arch);
+					IStatus s = createStatus(feature, FeatureStatus.CODE_ENVIRONMENT, Messages.ActivityConstraints_arch);
 					if (!status.contains(s))
 						status.add(s);
 					continue;
@@ -757,10 +730,7 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * Verify we end up with a version of platform configured
 	 */
-	private static void checkPlatformFeature(
-		ArrayList features,
-		ArrayList plugins,
-		ArrayList status) {
+	private static void checkPlatformFeature(ArrayList features, ArrayList plugins, ArrayList status) {
 
 		// find the plugin that defines the product
 		IProduct product = Platform.getProduct();
@@ -776,10 +746,9 @@ public class OperationValidator implements IOperationValidator {
 				break;
 			}
 		}
-		
+
 		if (!found) {
-			IStatus s =
-				createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_platform);
+			IStatus s = createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_platform);
 			if (!status.contains(s))
 				status.add(s);
 		}
@@ -788,25 +757,18 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * Verify we end up with a version of primary feature configured
 	 */
-	private static void checkPrimaryFeature(
-		ArrayList features,
-		ArrayList plugins,
-		ArrayList status) {
-
-		String featureId =
-			ConfiguratorUtils
-				.getCurrentPlatformConfiguration()
-				.getPrimaryFeatureIdentifier();
-		
+	private static void checkPrimaryFeature(ArrayList features, ArrayList plugins, ArrayList status) {
+
+		String featureId = ConfiguratorUtils.getCurrentPlatformConfiguration().getPrimaryFeatureIdentifier();
+
 		if (featureId != null) {
 			// primary feature is defined
 			for (int i = 0; i < features.size(); i++) {
 				IFeature feature = (IFeature) features.get(i);
-				if (featureId
-					.equals(feature.getVersionedIdentifier().getIdentifier()))
+				if (featureId.equals(feature.getVersionedIdentifier().getIdentifier()))
 					return;
 			}
-	
+
 			IStatus s = createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_primary);
 			if (!status.contains(s))
 				status.add(s);
@@ -825,8 +787,7 @@ public class OperationValidator implements IOperationValidator {
 					return; // product found
 				}
 			}
-			IStatus s =
-				createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_primary);
+			IStatus s = createStatus(null, FeatureStatus.CODE_OTHER, Messages.ActivityConstraints_primary);
 			if (!status.contains(s))
 				status.add(s);
 		}
@@ -835,11 +796,8 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * Verify we do not break prereqs
 	 */
-	private static Set checkPrereqs(
-		ArrayList features,
-		ArrayList plugins,
-		ArrayList status) {
-		
+	private static Set checkPrereqs(ArrayList features, ArrayList plugins, ArrayList status) {
+
 		HashSet result = new HashSet();
 
 		for (int i = 0; i < features.size(); i++) {
@@ -853,12 +811,8 @@ public class OperationValidator implements IOperationValidator {
 				VersionedIdentifier iid = iimport.getVersionedIdentifier();
 				String id = iid.getIdentifier();
 				PluginVersionIdentifier version = iid.getVersion();
-				boolean featurePrereq =
-					iimport.getKind() == IImport.KIND_FEATURE;
-				boolean ignoreVersion =
-					version.getMajorComponent() == 0
-						&& version.getMinorComponent() == 0
-						&& version.getServiceComponent() == 0;
+				boolean featurePrereq = iimport.getKind() == IImport.KIND_FEATURE;
+				boolean ignoreVersion = version.getMajorComponent() == 0 && version.getMinorComponent() == 0 && version.getServiceComponent() == 0;
 				int rule = iimport.getRule();
 				if (rule == IUpdateConstants.RULE_NONE)
 					rule = IUpdateConstants.RULE_COMPATIBLE;
@@ -890,27 +844,19 @@ public class OperationValidator implements IOperationValidator {
 						// have a candidate
 						if (ignoreVersion)
 							found = true;
-						else if (
-							rule == IUpdateConstants.RULE_PERFECT
-								&& cversion.isPerfect(version))
+						else if (rule == IUpdateConstants.RULE_PERFECT && cversion.isPerfect(version))
 							found = true;
-						else if (
-							rule == IUpdateConstants.RULE_EQUIVALENT
-								&& cversion.isEquivalentTo(version))
+						else if (rule == IUpdateConstants.RULE_EQUIVALENT && cversion.isEquivalentTo(version))
 							found = true;
-						else if (
-							rule == IUpdateConstants.RULE_COMPATIBLE
-								&& cversion.isCompatibleWith(version))
+						else if (rule == IUpdateConstants.RULE_COMPATIBLE && cversion.isCompatibleWith(version))
 							found = true;
-						else if (
-							rule == IUpdateConstants.RULE_GREATER_OR_EQUAL
-								&& cversion.isGreaterOrEqualTo(version))
+						else if (rule == IUpdateConstants.RULE_GREATER_OR_EQUAL && cversion.isGreaterOrEqualTo(version))
 							found = true;
 					}
 					if (found)
 						break;
 				}
-				
+
 				// perhaps the bundle that we are looking for was installed
 				// but isn't a part of a feature
 				if (!found && !featurePrereq)
@@ -918,41 +864,19 @@ public class OperationValidator implements IOperationValidator {
 
 				if (!found) {
 					// report status
-					String target =
-						featurePrereq
-							? Messages.ActivityConstaints_prereq_feature
-							: Messages.ActivityConstaints_prereq_plugin;
-					int errorCode = featurePrereq
-							? FeatureStatus.CODE_PREREQ_FEATURE
-							: FeatureStatus.CODE_PREREQ_PLUGIN;
-					String msg =
-						NLS.bind(Messages.ActivityConstraints_prereq, (new String[] { target, id }));
+					String target = featurePrereq ? Messages.ActivityConstaints_prereq_feature : Messages.ActivityConstaints_prereq_plugin;
+					int errorCode = featurePrereq ? FeatureStatus.CODE_PREREQ_FEATURE : FeatureStatus.CODE_PREREQ_PLUGIN;
+					String msg = NLS.bind(Messages.ActivityConstraints_prereq, (new String[] {target, id}));
 
 					if (!ignoreVersion) {
 						if (rule == IUpdateConstants.RULE_PERFECT)
-							msg =
-								NLS.bind(Messages.ActivityConstraints_prereqPerfect, (new String[] {
-                                target,
-                                id,
-                                version.toString()}));
+							msg = NLS.bind(Messages.ActivityConstraints_prereqPerfect, (new String[] {target, id, version.toString()}));
 						else if (rule == IUpdateConstants.RULE_EQUIVALENT)
-							msg =
-								NLS.bind(Messages.ActivityConstraints_prereqEquivalent, (new String[] {
-                                target,
-                                id,
-                                version.toString()}));
+							msg = NLS.bind(Messages.ActivityConstraints_prereqEquivalent, (new String[] {target, id, version.toString()}));
 						else if (rule == IUpdateConstants.RULE_COMPATIBLE)
-							msg =
-								NLS.bind(Messages.ActivityConstraints_prereqCompatible, (new String[] {
-                                target,
-                                id,
-                                version.toString()}));
+							msg = NLS.bind(Messages.ActivityConstraints_prereqCompatible, (new String[] {target, id, version.toString()}));
 						else if (rule == IUpdateConstants.RULE_GREATER_OR_EQUAL)
-							msg =
-								NLS.bind(Messages.ActivityConstraints_prereqGreaterOrEqual, (new String[] {
-                                target,
-                                id,
-                                version.toString()}));
+							msg = NLS.bind(Messages.ActivityConstraints_prereqGreaterOrEqual, (new String[] {target, id, version.toString()}));
 					}
 					IStatus s = createStatus(feature, errorCode, msg);
 					result.add(new InternalImport(iimport));
@@ -961,10 +885,10 @@ public class OperationValidator implements IOperationValidator {
 				}
 			}
 		}
-		
+
 		return result;
 	}
-	
+
 	/*
 	 * Return a boolean value indicating whether or not the bundle with the given id and version
 	 * is installed in the system.
@@ -984,7 +908,7 @@ public class OperationValidator implements IOperationValidator {
 			BundleDescription[] bundles = state.getBundles(id);
 			if (bundles == null || bundles.length == 0)
 				return false;
-			for (int i=0; i<bundles.length; i++) {
+			for (int i = 0; i < bundles.length; i++) {
 				BundleDescription bundle = bundles[i];
 				PluginVersionIdentifier cversion = new PluginVersionIdentifier(bundle.getVersion().toString());
 				// have a candidate
@@ -1008,21 +932,12 @@ public class OperationValidator implements IOperationValidator {
 	/*
 	 * Verify we end up with valid nested features after revert
 	 */
-	private static void checkRevertConstraints(
-		ArrayList features,
-		ArrayList status) {
+	private static void checkRevertConstraints(ArrayList features, ArrayList status) {
 
 		for (int i = 0; i < features.size(); i++) {
 			IFeature feature = (IFeature) features.get(i);
 			try {
-				computeFeatureSubtree(
-					feature,
-					null,
-					null,
-					false /* do not tolerate missing children */,
-					null,
-					null
-				);
+				computeFeatureSubtree(feature, null, null, false /* do not tolerate missing children */, null, null);
 			} catch (CoreException e) {
 				status.add(e.getStatus());
 			}
@@ -1034,10 +949,7 @@ public class OperationValidator implements IOperationValidator {
 	 * the child to be configured as well
 	 */
 
-	private static void checkOptionalChildConfiguring(
-		IFeature feature,
-		ArrayList status)
-		throws CoreException {
+	private static void checkOptionalChildConfiguring(IFeature feature, ArrayList status) throws CoreException {
 		ILocalSite localSite = SiteManager.getLocalSite();
 		IInstallConfiguration config = localSite.getCurrentConfiguration();
 		IConfiguredSite[] csites = config.getConfiguredSites();
@@ -1045,8 +957,7 @@ public class OperationValidator implements IOperationValidator {
 		boolean included = false;
 		for (int i = 0; i < csites.length; i++) {
 			IConfiguredSite csite = csites[i];
-			ISiteFeatureReference[] crefs =
-				csite.getSite().getFeatureReferences();
+			ISiteFeatureReference[] crefs = csite.getSite().getFeatureReferences();
 			for (int j = 0; j < crefs.length; j++) {
 				IFeatureReference cref = crefs[j];
 				IFeature cfeature = null;
@@ -1081,68 +992,64 @@ public class OperationValidator implements IOperationValidator {
 			//feature is root - can be configured
 		}
 	}
-//
-//	/**
-//	 * Checks if the configuration is locked by other instances
-//	 * 
-//	 * @param status
-//	 */
-//	private static void checkConfigurationLock(ArrayList status) {
-//		IPlatformConfiguration config =
-//			BootLoader.getCurrentPlatformConfiguration();
-//		URL configURL = config.getConfigurationLocation();
-//		if (!"file".equals(configURL.getProtocol())) {
-//			status.add(
-//				createStatus(
-//					null,
-//					"Configuration location is not writable:" + configURL));
-//			return;
-//		}
-//		String locationString = configURL.getFile();
-//		File configDir = new File(locationString);
-//		if (!configDir.isDirectory())
-//			configDir = configDir.getParentFile();
-//		if (!configDir.exists()) {
-//			status.add(
-//				createStatus(null, "Configuration location does not exist"));
-//			return;
-//		}
-//		File locksDir = new File(configDir, "locks");
-//		// check all the possible lock files
-//		File[] lockFiles = locksDir.listFiles();
-//		File configLock = BootLoader.getCurrentPlatformConfiguration().getLockFile();
-//		for (int i = 0; i < lockFiles.length; i++) {
-//			if (lockFiles[i].equals(configLock))
-//				continue;
-//			try {
-//				RandomAccessFile raf = new RandomAccessFile(lockFiles[i], "rw");
-//				FileChannel channel = raf.getChannel();
-//				System.out.println(channel.isOpen());
-//				FileLock lock = channel.tryLock();
-//				if (lock == null){
-//					// there is another eclipse instance running
-//					raf.close();
-//					status.add(
-//						createStatus(
-//							null,
-//							"Another instance is running, please close it before performing any configuration operations"));
-//					return;
-//				}
-//
-//			} catch (Exception e) {
-//				status.add(createStatus(null, "Failed to create lock:"+lockFiles[i]));
-//				return;
-//			} 
-//		}
-//	}
-
-	private static boolean isParent(
-		IFeature candidate,
-		IFeature feature,
-		boolean optionalOnly)
-		throws CoreException {
-		IIncludedFeatureReference[] refs =
-			candidate.getIncludedFeatureReferences();
+
+	//
+	//	/**
+	//	 * Checks if the configuration is locked by other instances
+	//	 * 
+	//	 * @param status
+	//	 */
+	//	private static void checkConfigurationLock(ArrayList status) {
+	//		IPlatformConfiguration config =
+	//			BootLoader.getCurrentPlatformConfiguration();
+	//		URL configURL = config.getConfigurationLocation();
+	//		if (!"file".equals(configURL.getProtocol())) {
+	//			status.add(
+	//				createStatus(
+	//					null,
+	//					"Configuration location is not writable:" + configURL));
+	//			return;
+	//		}
+	//		String locationString = configURL.getFile();
+	//		File configDir = new File(locationString);
+	//		if (!configDir.isDirectory())
+	//			configDir = configDir.getParentFile();
+	//		if (!configDir.exists()) {
+	//			status.add(
+	//				createStatus(null, "Configuration location does not exist"));
+	//			return;
+	//		}
+	//		File locksDir = new File(configDir, "locks");
+	//		// check all the possible lock files
+	//		File[] lockFiles = locksDir.listFiles();
+	//		File configLock = BootLoader.getCurrentPlatformConfiguration().getLockFile();
+	//		for (int i = 0; i < lockFiles.length; i++) {
+	//			if (lockFiles[i].equals(configLock))
+	//				continue;
+	//			try {
+	//				RandomAccessFile raf = new RandomAccessFile(lockFiles[i], "rw");
+	//				FileChannel channel = raf.getChannel();
+	//				System.out.println(channel.isOpen());
+	//				FileLock lock = channel.tryLock();
+	//				if (lock == null){
+	//					// there is another eclipse instance running
+	//					raf.close();
+	//					status.add(
+	//						createStatus(
+	//							null,
+	//							"Another instance is running, please close it before performing any configuration operations"));
+	//					return;
+	//				}
+	//
+	//			} catch (Exception e) {
+	//				status.add(createStatus(null, "Failed to create lock:"+lockFiles[i]));
+	//				return;
+	//			} 
+	//		}
+	//	}
+
+	private static boolean isParent(IFeature candidate, IFeature feature, boolean optionalOnly) throws CoreException {
+		IIncludedFeatureReference[] refs = candidate.getIncludedFeatureReferences();
 		for (int i = 0; i < refs.length; i++) {
 			IIncludedFeatureReference child = refs[i];
 			VersionedIdentifier fvid = feature.getVersionedIdentifier();
@@ -1163,39 +1070,30 @@ public class OperationValidator implements IOperationValidator {
 		return false;
 	}
 
-//	private static boolean checkTimeline(
-//		IInstallConfiguration config,
-//		ArrayList status) {
-//		try {
-//			ILocalSite lsite = SiteManager.getLocalSite();
-//			IInstallConfiguration cconfig = lsite.getCurrentConfiguration();
-//			if (cconfig.getTimeline() != config.getTimeline()) {
-//				// Not the same timeline - cannot revert
-//				String msg =
-//					UpdateUtils.getFormattedMessage(
-//						KEY_WRONG_TIMELINE,
-//						config.getLabel());
-//				status.add(createStatus(null, FeatureStatus.CODE_OTHER, msg));
-//				return false;
-//			}
-//		} catch (CoreException e) {
-//			status.add(e.getStatus());
-//		}
-//		return true;
-//	}
-
-	private static IStatus createMultiStatus(
-		String message,
-		ArrayList children,
-		int code) {
-		IStatus[] carray =
-			(IStatus[]) children.toArray(new IStatus[children.size()]);
-		return new MultiStatus(
-			UpdateCore.getPlugin().getBundle().getSymbolicName(),
-			code,
-			carray,
-			message,
-			null);
+	//	private static boolean checkTimeline(
+	//		IInstallConfiguration config,
+	//		ArrayList status) {
+	//		try {
+	//			ILocalSite lsite = SiteManager.getLocalSite();
+	//			IInstallConfiguration cconfig = lsite.getCurrentConfiguration();
+	//			if (cconfig.getTimeline() != config.getTimeline()) {
+	//				// Not the same timeline - cannot revert
+	//				String msg =
+	//					UpdateUtils.getFormattedMessage(
+	//						KEY_WRONG_TIMELINE,
+	//						config.getLabel());
+	//				status.add(createStatus(null, FeatureStatus.CODE_OTHER, msg));
+	//				return false;
+	//			}
+	//		} catch (CoreException e) {
+	//			status.add(e.getStatus());
+	//		}
+	//		return true;
+	//	}
+
+	private static IStatus createMultiStatus(String message, ArrayList children, int code) {
+		IStatus[] carray = (IStatus[]) children.toArray(new IStatus[children.size()]);
+		return new MultiStatus(UpdateCore.getPlugin().getBundle().getSymbolicName(), code, carray, message, null);
 	}
 
 	private static IStatus createStatus(IFeature feature, int errorCode, String message) {
@@ -1204,22 +1102,11 @@ public class OperationValidator implements IOperationValidator {
 		if (feature == null)
 			fullMessage = message;
 		else {
-			PluginVersionIdentifier version =
-				feature.getVersionedIdentifier().getVersion();
-			fullMessage =
-				NLS.bind(Messages.ActivityConstraints_childMessage, (new String[] {
-                feature.getLabel(),
-                version.toString(),
-                message }));
+			PluginVersionIdentifier version = feature.getVersionedIdentifier().getVersion();
+			fullMessage = NLS.bind(Messages.ActivityConstraints_childMessage, (new String[] {feature.getLabel(), version.toString(), message}));
 		}
 
-		return new FeatureStatus(
-			feature,
-			IStatus.ERROR,
-			UpdateCore.getPlugin().getBundle().getSymbolicName(),
-			errorCode,
-			fullMessage,
-			null);
+		return new FeatureStatus(feature, IStatus.ERROR, UpdateCore.getPlugin().getBundle().getSymbolicName(), errorCode, fullMessage, null);
 	}
 
 	//	private static IStatus createReportStatus(ArrayList beforeStatus,
@@ -1235,16 +1122,12 @@ public class OperationValidator implements IOperationValidator {
 	//		return null;
 	//	}
 
-	private static IStatus createCombinedReportStatus(
-		ArrayList beforeStatus,
-		ArrayList status) {
+	private static IStatus createCombinedReportStatus(ArrayList beforeStatus, ArrayList status) {
 		if (beforeStatus.size() == 0) { // good initial config
 			if (status.size() == 0) {
 				return null; // all fine
 			} else {
-				return createMultiStatus(Messages.ActivityConstraints_rootMessage,
-					status,
-					IStatus.ERROR);
+				return createMultiStatus(Messages.ActivityConstraints_rootMessage, status, IStatus.ERROR);
 				// error after operation
 			}
 		} else { // beforeStatus.size() > 0 : initial config errors
@@ -1252,27 +1135,13 @@ public class OperationValidator implements IOperationValidator {
 				return null; // errors will be fixed
 			} else {
 				if (isBetterStatus(beforeStatus, status)) {
-					return createMultiStatus(
-						Messages.ActivityConstraints_warning,
-						beforeStatus,
-						IStatus.WARNING);
+					return createMultiStatus(Messages.ActivityConstraints_warning, beforeStatus, IStatus.WARNING);
 					// errors may be fixed
 				} else {
 					ArrayList combined = new ArrayList();
-					combined.add(
-						createMultiStatus(
-							Messages.ActivityConstraints_beforeMessage,
-							beforeStatus,
-							IStatus.ERROR));
-					combined.add(
-						createMultiStatus(
-							Messages.ActivityConstraints_afterMessage,
-							status,
-							IStatus.ERROR));
-					return createMultiStatus(
-						Messages.ActivityConstraints_rootMessageInitial,
-						combined,
-						IStatus.ERROR);
+					combined.add(createMultiStatus(Messages.ActivityConstraints_beforeMessage, beforeStatus, IStatus.ERROR));
+					combined.add(createMultiStatus(Messages.ActivityConstraints_afterMessage, status, IStatus.ERROR));
+					return createMultiStatus(Messages.ActivityConstraints_rootMessageInitial, combined, IStatus.ERROR);
 				}
 			}
 		}
@@ -1281,8 +1150,7 @@ public class OperationValidator implements IOperationValidator {
 	private static ArrayList createList(String commaSeparatedList) {
 		ArrayList list = new ArrayList();
 		if (commaSeparatedList != null) {
-			StringTokenizer t =
-				new StringTokenizer(commaSeparatedList.trim(), ","); //$NON-NLS-1$
+			StringTokenizer t = new StringTokenizer(commaSeparatedList.trim(), ","); //$NON-NLS-1$
 			while (t.hasMoreTokens()) {
 				String token = t.nextToken().trim();
 				if (!token.equals("")) //$NON-NLS-1$
@@ -1299,9 +1167,7 @@ public class OperationValidator implements IOperationValidator {
 	 * @param status
 	 * @return
 	 */
-	private static boolean isBetterStatus(
-		ArrayList beforeStatus,
-		ArrayList status) {
+	private static boolean isBetterStatus(ArrayList beforeStatus, ArrayList status) {
 		// if no status at all, then it's a subset
 		if (status == null || status.size() == 0)
 			return true;
@@ -1332,42 +1198,45 @@ public class OperationValidator implements IOperationValidator {
 		}
 		return true;
 	}
-	
+
 	public class RequiredFeaturesResult {
-		
+
 		private IStatus status;
 		private Set requiredFeatures;
-		
+
 		public Set getRequiredFeatures() {
 			return requiredFeatures;
 		}
+
 		public void setRequiredFeatures(Set requiredFeatures) {
 			this.requiredFeatures = requiredFeatures;
 		}
+
 		public void addRequiredFeatures(Set requiredFeatures) {
 			if (requiredFeatures == null) {
 				requiredFeatures = new HashSet();
 			}
 			this.requiredFeatures.addAll(requiredFeatures);
 		}
+
 		public IStatus getStatus() {
 			return status;
 		}
+
 		public void setStatus(IStatus status) {
 			this.status = status;
 		}
-		
-		
+
 	}
-	
+
 	public static class InternalImport {
-		
+
 		private IImport iimport;
 
 		public InternalImport(IImport iimport) {
 			this.iimport = iimport;
 		}
-		
+
 		public IImport getImport() {
 			return iimport;
 		}
@@ -1375,23 +1244,23 @@ public class OperationValidator implements IOperationValidator {
 		public void setImport(IImport iimport) {
 			this.iimport = iimport;
 		}
-		
+
 		public boolean equals(Object object) {
 
-			if ( ( object == null) || !(object instanceof InternalImport))
+			if ((object == null) || !(object instanceof InternalImport))
 				return false;
-			
-			if ( object == this)
+
+			if (object == this)
 				return true;
-			
-			return iimport.getVersionedIdentifier().equals( ((InternalImport)object).getImport().getVersionedIdentifier()) && (getImport().getRule() == ((InternalImport)object).getImport().getRule());
+
+			return iimport.getVersionedIdentifier().equals(((InternalImport) object).getImport().getVersionedIdentifier()) && (getImport().getRule() == ((InternalImport) object).getImport().getRule());
 
 		}
 
 		public int hashCode() {
 			return iimport.getVersionedIdentifier().hashCode() * iimport.getRule();
 		}
-		
+
 	}
 
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/verifier/PlanVerifier.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/verifier/PlanVerifier.java
new file mode 100644
index 0000000..8e381c6
--- /dev/null
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/internal/verifier/PlanVerifier.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.update.internal.verifier;
+
+import java.util.ArrayList;
+
+import org.eclipse.update.operations.IInstallFeatureOperation;
+
+/**
+ * Verifier is responsible for checking plan sanity
+ */
+public abstract class PlanVerifier {
+	/**
+	 * Verifies provisioning operation of Classic Updater. Checks if feature can
+	 * be installed in an updateable site. Checks if version of already
+	 * installed plug-in is planned to downgraded or if update is safe.
+	 */
+	public abstract void verify(IInstallFeatureOperation installOperation,
+			ArrayList currentFeatures, ArrayList featuresAfterOperation,
+			ArrayList status);
+
+}
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IBatchOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IBatchOperation.java
index 04eb2ca..db561f2 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IBatchOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IBatchOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IBatchOperation  extends IOperation {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IConfigFeatureOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IConfigFeatureOperation.java
index 5b2376b..4b5fcb2 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IConfigFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IConfigFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,8 +20,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
-  * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
 */
 public interface IConfigFeatureOperation extends IFeatureOperation {
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IFeatureOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IFeatureOperation.java
index 55336fd..69ab740 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IFeatureOperation extends IOperation {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IInstallFeatureOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IInstallFeatureOperation.java
index 7cbf0fa..c946349 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IInstallFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IInstallFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IInstallFeatureOperation extends IFeatureOperation {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperation.java
index 10ab50a..161518a 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ import org.eclipse.core.runtime.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IOperation {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationFactory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationFactory.java
index 7b2c811..88d416f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationFactory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IOperationFactory {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationListener.java
index 755996b..8d15625 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IOperationListener {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationValidator.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationValidator.java
index a6139a8..31cf00b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationValidator.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IOperationValidator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IOperationValidator {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IReplaceFeatureVersionOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IReplaceFeatureVersionOperation.java
index d9a9dd2..d52e5c4 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IReplaceFeatureVersionOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IReplaceFeatureVersionOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -20,8 +20,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IReplaceFeatureVersionOperation extends IFeatureOperation {
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IRevertConfigurationOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IRevertConfigurationOperation.java
index 1bece29..90fabc9 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IRevertConfigurationOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IRevertConfigurationOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IRevertConfigurationOperation extends IOperation {
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IToggleSiteOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IToggleSiteOperation.java
index 35a971b..f85833b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IToggleSiteOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IToggleSiteOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -19,8 +19,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IToggleSiteOperation extends IOperation {
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUnconfigFeatureOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUnconfigFeatureOperation.java
index 828a325..53b88e3 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUnconfigFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUnconfigFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUnconfigFeatureOperation  extends IFeatureOperation {
 }
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
index aba6598..f5c7080 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,8 +21,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUninstallFeatureOperation extends IFeatureOperation {
 	public final static String UNINSTALL = "uninstall"; //$NON-NLS-1$
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUpdateModelChangedListener.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUpdateModelChangedListener.java
index 9176b37..b9dbe91 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUpdateModelChangedListener.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/IUpdateModelChangedListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ package org.eclipse.update.operations;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateModelChangedListener {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/OperationsManager.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/OperationsManager.java
index 71d15d1..50cff42 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/OperationsManager.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/OperationsManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.internal.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class OperationsManager {
 	private static IOperationValidator validator;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/package.html
index 277f616..0588f6e 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/operations/package.html
@@ -13,10 +13,8 @@ Package Specification</h2>
 This package contains interfaces for performing update/install operations 
 without using the Update Manager user interface. 
 <p>
-<b>Note:</b> This package is part of an interim API that is still under development and expected to
-change significantly before reaching stability. It is being made available at this early stage to solicit feedback
-from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BackLevelFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BackLevelFilter.java
index 6f0baa4..b5c3dc0 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BackLevelFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BackLevelFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.internal.operations.*;
  * @see UpdateSearchRequest
  * @see IUpdateSearchFilter
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class BackLevelFilter extends BaseFilter {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BaseFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BaseFilter.java
index c364f57..1d374e1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BaseFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/BaseFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ import org.eclipse.update.core.*;
  * @see UpdateSearchRequest
  * @see IUpdateSearchFilter
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class BaseFilter implements IUpdateSearchFilter {
     /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/EnvironmentFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/EnvironmentFilter.java
index e77e014..f9aa1f6 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/EnvironmentFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/EnvironmentFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.internal.core.*;
  * @see UpdateSearchRequest
  * @see IUpdateSearchFilter
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class EnvironmentFilter extends BaseFilter {
 	
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IQueryUpdateSiteAdapter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IQueryUpdateSiteAdapter.java
index b76d1a5..c96ffa1 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IQueryUpdateSiteAdapter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IQueryUpdateSiteAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ package org.eclipse.update.search;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IQueryUpdateSiteAdapter extends IUpdateSiteAdapter {
 /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchCategory.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchCategory.java
index b206666..f0a52e3 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchCategory.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchCategory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ package org.eclipse.update.search;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchCategory {
 /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchFilter.java
index f6b0724..68df1d5 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchFilter {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchQuery.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchQuery.java
index ebd6025..23023e8 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchQuery.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchQuery.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -22,8 +22,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchQuery {
 /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollector.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollector.java
index 7d31f42..329c5cf 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollector.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollector.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,8 +25,8 @@ import org.eclipse.update.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchResultCollector {
 /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollectorFromMirror.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollectorFromMirror.java
index fea4134..a69c790 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollectorFromMirror.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchResultCollectorFromMirror.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.core.IURLEntry;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.1
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchResultCollectorFromMirror extends
 		IUpdateSearchResultCollector {
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchSite.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchSite.java
index 9cda395..e4b7fb7 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchSite.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSearchSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ package org.eclipse.update.search;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSearchSite extends IUpdateSiteAdapter {
 /**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSiteAdapter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSiteAdapter.java
index 2e456c2..d1539a8 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSiteAdapter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/IUpdateSiteAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import java.net.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public interface IUpdateSiteAdapter {
 	/**
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchRequest.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchRequest.java
index c658f59..d5a7481 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchRequest.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchRequest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -59,8 +59,8 @@ import org.eclipse.update.internal.search.UpdatesSearchCategory;
  * @see UpdateSearchScope
  * @see IUpdateSearchCategory
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UpdateSearchRequest {
 	private IUpdateSearchCategory category;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchScope.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchScope.java
index e7a797a..13f56f2 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchScope.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/UpdateSearchScope.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import org.eclipse.update.internal.search.*;
  * </p>
  * @see UpdateSearchRequest
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UpdateSearchScope {
 	private Vector sites;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/VersionedIdentifiersFilter.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/VersionedIdentifiersFilter.java
index cd87938..996bd02 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/VersionedIdentifiersFilter.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/VersionedIdentifiersFilter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,8 +29,8 @@ import org.eclipse.update.core.*;
  * @see UpdateSearchRequest
  * @see IUpdateSearchFilter
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class VersionedIdentifiersFilter extends BaseFilter {
 	private ArrayList vids;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/package.html
index 62e8f20..350db90 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/search/package.html
@@ -10,12 +10,9 @@ Provides support for performing searches and filtering of features.
 <h2>
 Package Specification</h2>
 This package contains interfaces and helper classes for creating and executing search operations. 
-
 <p>
-<b>Note:</b> This package is part of an interim API that is still under development and expected to
-change significantly before reaching stability. It is being made available at this early stage to solicit feedback
-from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/AddSiteCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/AddSiteCommand.java
index 01a7f8d..8af4b11 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/AddSiteCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/AddSiteCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class AddSiteCommand extends ScriptedCommand {
 	private ISite site;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/CmdLineArgs.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/CmdLineArgs.java
index f1aebc6..7ca7891 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/CmdLineArgs.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/CmdLineArgs.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.internal.mirror.MirrorCommand;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class CmdLineArgs {
 	private HashMap options = new HashMap();
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/DisableCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/DisableCommand.java
index eb941d3..856ad73 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/DisableCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/DisableCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class DisableCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/EnableCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/EnableCommand.java
index a5fa684..7fdf105 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/EnableCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/EnableCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class EnableCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/InstallCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/InstallCommand.java
index 2cb134e..4dbc525 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/InstallCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/InstallCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -53,8 +53,8 @@ import org.eclipse.update.search.VersionedIdentifiersFilter;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class InstallCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ListFeaturesCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ListFeaturesCommand.java
index c34b9d2..8ac038b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ListFeaturesCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ListFeaturesCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.internal.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class ListFeaturesCommand extends ScriptedCommand {
 	private IConfiguredSite[] sites = getConfiguration().getConfiguredSites();
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/RemoveSiteCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/RemoveSiteCommand.java
index b920762..bbfece4 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/RemoveSiteCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/RemoveSiteCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -27,8 +27,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class RemoveSiteCommand extends ScriptedCommand {
 	private IConfiguredSite csite;
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ScriptedCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ScriptedCommand.java
index 839347b..eead53b 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ScriptedCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/ScriptedCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -25,8 +25,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public abstract class ScriptedCommand implements IOperationListener {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/SearchCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/SearchCommand.java
index 272cfc7..a6c989d 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/SearchCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/SearchCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -28,8 +28,8 @@ import org.eclipse.update.search.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class SearchCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/StandaloneUpdateApplication.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/StandaloneUpdateApplication.java
index 5b712d0..f27932f 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/StandaloneUpdateApplication.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/StandaloneUpdateApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,8 +23,8 @@ import org.eclipse.update.internal.core.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class StandaloneUpdateApplication implements IPlatformRunnable {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UninstallCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UninstallCommand.java
index ae3d826..b360535 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UninstallCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UninstallCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ import org.eclipse.update.operations.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UninstallCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UpdateCommand.java b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UpdateCommand.java
index 1f64c55..8312c5e 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UpdateCommand.java
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/UpdateCommand.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -31,8 +31,8 @@ import org.eclipse.update.search.*;
  * (repeatedly) as the API evolves.
  * </p>
  * @since 3.0
- * @deprecated The org.eclipse.update component has been replaced by Equinox p2. This
- * provisional API was never promoted to stable API, and may be removed from a future release of the platform.
+ * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UpdateCommand extends ScriptedCommand {
 
diff --git a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/package.html b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/package.html
index 7aa8db2..7044920 100644
--- a/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/package.html
+++ b/eclipse/plugins/org.eclipse.update.core/src/org/eclipse/update/standalone/package.html
@@ -14,10 +14,8 @@ This package contains interfaces for performing update/install operations
 without using the Update Manager user interface. In general, it is best to use these
 classes for command line invocation, but it is possible to also use them programmatically.
 <p>
-<b>Note:</b> This package is part of an interim API that is still under development and expected to
-change significantly before reaching stability. It is being made available at this early stage to solicit feedback
-from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
-(repeatedly) as the API evolves.
+<b>Note:</b> This package has been deprecated and will be deleted in a future
+release.  See bug 311590 for details.
 </p>
 </body>
 </html>
diff --git a/eclipse/plugins/org.eclipse.update.scheduler/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.scheduler/META-INF/MANIFEST.MF
index f7e3bf0..7003ff4 100644
--- a/eclipse/plugins/org.eclipse.update.scheduler/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.scheduler/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.update.scheduler; singleton:=true
-Bundle-Version: 3.2.200.qualifier
+Bundle-Version: 3.2.300.qualifier
 Bundle-Activator: org.eclipse.update.internal.scheduler.UpdateSchedulerPlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.ui/META-INF/MANIFEST.MF b/eclipse/plugins/org.eclipse.update.ui/META-INF/MANIFEST.MF
index 5c64856..f00fdc9 100644
--- a/eclipse/plugins/org.eclipse.update.ui/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.eclipse.update.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.update.ui; singleton:=true
-Bundle-Version: 3.2.201.qualifier
+Bundle-Version: 3.2.300.qualifier
 Bundle-Activator: org.eclipse.update.internal.ui.UpdateUI
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/eclipse/plugins/org.eclipse.update.ui/plugin.xml b/eclipse/plugins/org.eclipse.update.ui/plugin.xml
index 4e05f6c..5a460a0 100644
--- a/eclipse/plugins/org.eclipse.update.ui/plugin.xml
+++ b/eclipse/plugins/org.eclipse.update.ui/plugin.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
<!--
-     Copyright (c) 2005, 2008 IBM Corporation and others.
+<?eclipse version="3.0"?>
+<!--
+     Copyright (c) 2005, 2010 IBM Corporation and others.
      All rights reserved. This program and the accompanying materials
      are made available under the terms of the Eclipse Public License v1.0
      which accompanies this distribution, and is available at
@@ -9,7 +10,7 @@
      Contributors:
          IBM Corporation - initial API and implementation
  -->
-
+
 <plugin>
 
      <extension
diff --git a/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateJob.java b/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateJob.java
index dfe423d..6b33838 100644
--- a/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateJob.java
+++ b/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateJob.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -42,6 +42,7 @@ import org.eclipse.update.search.UpdateSearchRequest;
  * 
  * @since 3.1
  * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UpdateJob extends Job {
 
diff --git a/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java b/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
index 0146193..0d8fb64 100644
--- a/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
+++ b/eclipse/plugins/org.eclipse.update.ui/src/org/eclipse/update/ui/UpdateManagerUI.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2000, 2009 IBM Corporation and others.
+ *  Copyright (c) 2000, 2010 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ import org.eclipse.update.search.*;
  * Clients can use this class to launch the configuration manager window or the install wizard.
  * @since 3.0
  * @deprecated The org.eclipse.update component has been replaced by Equinox p2.
+ * This API will be deleted in a future release. See bug 311590 for details.
  */
 public class UpdateManagerUI {
 
diff --git a/eclipse/plugins/org.junit4/.classpath b/eclipse/plugins/org.junit4/.classpath
index bb5bc27..2e3bd07 100644
--- a/eclipse/plugins/org.junit4/.classpath
+++ b/eclipse/plugins/org.junit4/.classpath
@@ -2,6 +2,5 @@
 <classpath>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry exported="true" kind="lib" path="junit.jar" sourcepath="junitsrc.zip"/>
 	<classpathentry kind="output" path=""/>
 </classpath>
diff --git a/eclipse/plugins/org.junit4/META-INF/MANIFEST.MF b/eclipse/plugins/org.junit4/META-INF/MANIFEST.MF
index f595fe0..5739663 100644
--- a/eclipse/plugins/org.junit4/META-INF/MANIFEST.MF
+++ b/eclipse/plugins/org.junit4/META-INF/MANIFEST.MF
@@ -2,32 +2,9 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.junit4
-Bundle-Version: 4.5.0.qualifier
+Bundle-Version: 4.8.1.qualifier
 Bundle-Localization: plugin
-Bundle-ClassPath: junit.jar
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-Vendor: %providerName
-Export-Package: junit.extensions;version="4.5.0",
- junit.framework;version="4.5.0",
- junit.runner;version="4.5.0",
- junit.textui;version="4.5.0",
- org.junit;version="4.5.0",
- org.junit.experimental.results;version="4.5.0",
- org.junit.experimental.runners;version="4.5.0",
- org.junit.experimental.theories;version="4.5.0",
- org.junit.experimental.theories.internal;version="4.5.0";x-internal:=true,
- org.junit.experimental.theories.suppliers;version="4.5.0",
- org.junit.internal;version="4.5.0";x-internal:=true,
- org.junit.internal.builders;version="4.5.0";x-internal:=true,
- org.junit.internal.matchers;version="4.5.0";x-internal:=true,
- org.junit.internal.requests;version="4.5.0";x-internal:=true,
- org.junit.internal.runners;version="4.5.0";x-internal:=true,
- org.junit.internal.runners.model;version="4.5.0";x-internal:=true,
- org.junit.internal.runners.statements;version="4.5.0";x-internal:=true,
- org.junit.matchers;version="4.5.0",
- org.junit.runner;version="4.5.0",
- org.junit.runner.manipulation;version="4.5.0",
- org.junit.runner.notification;version="4.5.0",
- org.junit.runners;version="4.5.0",
- org.junit.runners.model;version="4.5.0"
-Require-Bundle: org.hamcrest.core;bundle-version="1.1.0";visibility:=reexport
+Require-Bundle: org.hamcrest.core;bundle-version="1.1.0";visibility:=reexport,
+ org.junit;bundle-version="4.8.1";visibility:=reexport
diff --git a/eclipse/plugins/org.junit4/about.html b/eclipse/plugins/org.junit4/about.html
index f6c8b29..d3184c8 100644
--- a/eclipse/plugins/org.junit4/about.html
+++ b/eclipse/plugins/org.junit4/about.html
@@ -8,7 +8,7 @@
 <body lang="EN-US">
 <h2>About This Content</h2>
  
-<p>August 24, 2009</p>	
+<p>November 26 2009</p>	
 <h3>License</h3>
 
 <p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
@@ -24,60 +24,5 @@ provided with the Content.  If no such license exists, contact the Redistributor
 indicated below, the terms and conditions of the EPL still apply to any source code in the Content
 and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
 
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<p>The Content includes items that have been sourced from third parties as follows:</p>
-
-<h4>JUnit 4.5</h4>
-
-<p>The plug-in is accompanied by software developed by JUnit.org.  The JUnit 4.5 code included with the plug-in includes no modifications.
-Your use of JUnit 4.5 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the 
-Common Public License Version 1.0 ("CPL").  A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-The binary code is located in junit.jar and the source code is located in junitsrc.zip.</p>
-
-<h4>Hamcrest Library 1.1</h4>
-
-<p>The plug-in is accompanied by software developed by Hamcrest (<a href="http://code.google.com/p/hamcrest/">http://code.google.com/p/hamcrest/</a>).
-The hamcrest-library 1.1 code included within the JUnit 4.5 Jar includes no modifications.
-Your use of hamcrest-library 1.1 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the 
-New BSD License.
-The binary code is located in junit.jar/org/junit/internal/matchers and the source code is located in junitsrc.zip/org/junit/internal/matchers.</p>
-
-<p>The Hamcrest New BSD License:</p>
-<pre>
-BSD License
-
-Copyright (c) 2000-2006, www.hamcrest.org
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of
-conditions and the following disclaimer. Redistributions in binary form must reproduce
-the above copyright notice, this list of conditions and the following disclaimer in
-the documentation and/or other materials provided with the distribution.
-
-Neither the name of Hamcrest nor the names of its contributors may be used to endorse
-or promote products derived from this software without specific prior written
-permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
-SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
-WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-</pre>
-
 </body>
 </html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.junit4/build.properties b/eclipse/plugins/org.junit4/build.properties
index 8baba46..834f2bd 100644
--- a/eclipse/plugins/org.junit4/build.properties
+++ b/eclipse/plugins/org.junit4/build.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2006 IBM Corporation and others.
+# Copyright (c) 2010 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Common Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,11 +10,6 @@
 ###############################################################################
 bin.includes = about.html,\
                plugin.properties,\
-               junit.jar,\
                META-INF/
-
-src.includes = about.html,\
-               junitsrc.zip
-
-src.additionalRoots=junitsrc
-customBuildCallbacks=customBuildCallbacks.xml
+src.includes = about.html
+generateSourceBundle=false
diff --git a/eclipse/plugins/org.junit4/customBuildCallbacks.xml b/eclipse/plugins/org.junit4/customBuildCallbacks.xml
deleted file mode 100644
index 50b251d..0000000
--- a/eclipse/plugins/org.junit4/customBuildCallbacks.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Custom targets called from a project's generated build.xml            -->
-<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
-<!-- ===================================================================== -->
-<project name="Build specific targets and properties" default="noDefault">
-
-	<!-- ===================================================================== -->
-	<!-- Default target                                                        -->
-	<!-- ===================================================================== -->
-	<target name="noDefault">
-		<echo message="This file must be called with explicit targets" />
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target build.jars                              -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder to contain the build results           -->
-	<!-- ===================================================================== -->
-	<target name="pre.build.jars">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target build.jars                               -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder to contain the build results           -->
-	<!-- ===================================================================== -->
-	<target name="post.build.jars">
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target build.sources                           -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder to contain the build results           -->
-	<!-- ===================================================================== -->
-	<target name="pre.build.sources">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target build.sources                            -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder to contain the build results           -->
-	<!-- ===================================================================== -->
-	<target name="post.build.sources">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the compilation target <name>                      -->
-	<!-- Substitute "name" with the name of the compilation target, eg @dot    -->
-	<!-- Available parameters :                                                -->
-	<!--   source.foldern : n = 1 ... N, the source folders                    -->
-	<!--   target.folder  : where the results of the compilation go            -->
-	<!--   <name>.classpath : name = name of the compilation target. A         -->
-	<!--                      reference to the classpath structure.            -->
-	<!-- ===================================================================== -->
-	<target name="pre.name">
-	</target>
-
-	<target name="pre. at dot">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do during the compilation target <name>, after the compile   -->
-	<!-- but before jaring.  Substitute "name" with the name of the compilation-->
-	<!-- target, eg @dot                                                       -->
-	<!-- Available parameters :                                                -->
-	<!--   source.foldern : n = 1 ... N, the source folders                    -->
-	<!--   target.folder  : where the results of the compilation go            -->
-	<!--   <name>.classpath : name = name of the compilation target. A         -->
-	<!--                      reference to the classpath structure.            -->
-	<!-- ===================================================================== -->
-	<target name="post.compile.name">
-	</target>
-
-	<target name="post.compile. at dot">
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the compilation target <name>                       -->
-	<!-- Substitute "name" with the name of the compilation target, eg @dot    -->
-	<!-- Available parameters :                                                -->
-	<!--   jar.location - the location of the compilation results              -->
-	<!--   <name>.classpath : name = name of the compilation target. A         -->
-	<!--                      reference to the classpath structure.            -->
-	<!-- ===================================================================== -->
-	<target name="post.name">
-	</target>
-
-	<target name="post. at dot">
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target gather.bin.parts                         -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder containing the build results           -->
-	<!--   target.folder - destination folder                                  -->
-	<!-- ===================================================================== -->
-	<target name="pre.gather.bin.parts">
-	</target>
-		
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target gather.bin.parts                         -->
-	<!-- Available parameters :                                                -->
-	<!--   build.result.folder - folder containing the build results           -->
-	<!--   target.folder - destination folder                                  -->
-	<!-- ===================================================================== -->
-	<target name="post.gather.bin.parts">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target gather.sources                          -->
-	<!-- Available parameters :                                                -->
-	<!--   destination.temp.folder - destination folder                        -->
-	<!-- ===================================================================== -->
-	<target name="pre.gather.sources">
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target gather.sources                           -->
-	<!-- Available parameters :                                                -->
-	<!--   destination.temp.folder - destination folder                        -->
-	<!-- ===================================================================== -->
-	<target name="post.gather.sources" >
-		<mkdir dir="${target.folder}/junitsrc"/>
-		<unzip src="${target.folder}/junitsrc.zip" dest="${target.folder}/junitsrc" overwrite="false"/>
-		<delete file="${destination.temp.folder}/junitsrc.zip" />		
-	</target>
-	
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target gather.logs                             -->
-	<!-- Available parameters :                                                -->
-	<!--   destination.temp.folder - destination folder                        -->
-	<!-- ===================================================================== -->
-	<target name="pre.gather.logs">        
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target gather.logs                              -->
-	<!-- Available parameters :                                                -->
-	<!--   destination.temp.folder - destination folder                        -->
-	<!-- ===================================================================== -->
-	<target name="post.gather.logs">       
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do before the target clean                                   -->
-	<!-- Available parameters :                                                -->
-	<!--   destination.temp.folder - destination folder                        -->
-	<!-- ===================================================================== -->
-	<target name="pre.clean">              
-	</target>
-
-	<!-- ===================================================================== -->
-	<!-- Steps to do after the target clean                                    -->
-	<!-- Available parameters :                                                -->
-	<!--   plugin.destination - final destination of the build                 -->
-	<!--   build.result.folder - results of the compilation                    -->
-	<!--   temp.folder - temporary folder                                      -->
-	<!-- ===================================================================== -->
-	<target name="post.clean">             
-	</target>
-</project>
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.RSA b/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.RSA
deleted file mode 100644
index 558670e..0000000
Binary files a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.RSA and /dev/null differ
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.SF b/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.SF
deleted file mode 100644
index bfeaa89..0000000
--- a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/ECLIPSEF.SF
+++ /dev/null
@@ -1,20 +0,0 @@
-Signature-Version: 1.0
-SHA1-Digest-Manifest: XH/OvLPNs/CaNYVojDApukgC7L4=
-Created-By: 1.6.0 (IBM Corporation)
-SHA1-Digest-Manifest-Main-Attributes: 7z1AYCA2GipycLQZpj8d+bU1e2c=
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: Z+e4UrhAmTCBR1UpP/RqMf9OX00=
-
-Name: junit.jar
-SHA1-Digest: 0EWOCYs5OmWpQltX4OIHYoTIQNs=
-
-Name: about.html
-SHA1-Digest: OB4tUYTIdwsIAbpHUAzVaDJ+OHQ=
-
-Name: about_files/cpl-v10.html
-SHA1-Digest: YZUV+BFnw6XLRdU0eCv1FYdy8cQ=
-
-Name: plugin.properties
-SHA1-Digest: 5XC7EdM8EOCa1VASp4M/bgut2mk=
-
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF b/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF
deleted file mode 100644
index 36ddb43..0000000
--- a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ClassPath: junit.jar
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.3
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.junit
-Export-Package: junit.awtui;version="3.8.2",junit.extensions;version="
- 3.8.2",junit.framework;version="3.8.2",junit.runner;version="3.8.2",j
- unit.swingui;version="3.8.2",junit.swingui.icons;version="3.8.2",juni
- t.textui;version="3.8.2"
-Bundle-Version: 3.8.2.v20090203-1005
-Bundle-ManifestVersion: 2
-
-Name: META-INF/eclipse.inf
-SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
-
-Name: junit.jar
-SHA1-Digest: m8XJuGtgGg2Sglwt9Z6WdDeQRG4=
-
-Name: about_files/cpl-v10.html
-SHA1-Digest: o0b19ceZ+HQHVX0Ops751AQVdwM=
-
-Name: about.html
-SHA1-Digest: UFe6k4Ad9XpZmuWF46WW3vk9dVA=
-
-Name: plugin.properties
-SHA1-Digest: mL9yvXBmAAJi7G1tls7akuyPG+A=
-
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/plugin.properties b/eclipse/plugins/org.junit_3.8.2.v20090203-1005/plugin.properties
deleted file mode 100644
index f588160..0000000
--- a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName=JUnit Testing Framework
-providerName=Eclipse.org
diff --git a/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.RSA b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.RSA
new file mode 100644
index 0000000..5b022db
Binary files /dev/null and b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.RSA differ
diff --git a/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.SF b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.SF
new file mode 100644
index 0000000..d6981b2
--- /dev/null
+++ b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/ECLIPSEF.SF
@@ -0,0 +1,20 @@
+Signature-Version: 1.0
+SHA1-Digest-Manifest: yZRBsd82su+9g+NVIe7TDI6hI6I=
+Created-By: 1.6.0 (IBM Corporation)
+SHA1-Digest-Manifest-Main-Attributes: aF40eMCnlmmT3YC6fdijAlyveCQ=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: Z+e4UrhAmTCBR1UpP/RqMf9OX00=
+
+Name: junit.jar
+SHA1-Digest: JmCYuFYsOR7AT5JiGmszoPUAFRY=
+
+Name: about.html
+SHA1-Digest: OB4tUYTIdwsIAbpHUAzVaDJ+OHQ=
+
+Name: about_files/cpl-v10.html
+SHA1-Digest: YZUV+BFnw6XLRdU0eCv1FYdy8cQ=
+
+Name: plugin.properties
+SHA1-Digest: 9r0GiUvSCEu/hSKDiIxBDU+lQRc=
+
diff --git a/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/MANIFEST.MF b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..8d18823
--- /dev/null
+++ b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ClassPath: junit.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.3
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.junit
+Export-Package: junit.awtui;version="3.8.2",junit.extensions;version="
+ 3.8.2",junit.framework;version="3.8.2",junit.runner;version="3.8.2",j
+ unit.swingui;version="3.8.2",junit.swingui.icons;version="3.8.2",juni
+ t.textui;version="3.8.2"
+Bundle-Version: 3.8.2.v3_8_2_v20100427-1100
+Bundle-ManifestVersion: 2
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
+
+Name: junit.jar
+SHA1-Digest: YGbHcevShHSz1CGxtuZmi4xgtl0=
+
+Name: about_files/cpl-v10.html
+SHA1-Digest: o0b19ceZ+HQHVX0Ops751AQVdwM=
+
+Name: about.html
+SHA1-Digest: UFe6k4Ad9XpZmuWF46WW3vk9dVA=
+
+Name: plugin.properties
+SHA1-Digest: Czd59izsFwoMYKizyqPC7C25hzQ=
+
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/eclipse.inf b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/eclipse.inf
similarity index 100%
rename from eclipse/plugins/org.junit_3.8.2.v20090203-1005/META-INF/eclipse.inf
rename to eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/about.html b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/about.html
similarity index 100%
rename from eclipse/plugins/org.junit_3.8.2.v20090203-1005/about.html
rename to eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/about.html
diff --git a/eclipse/plugins/org.junit_3.8.2.v20090203-1005/about_files/cpl-v10.html b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/about_files/cpl-v10.html
similarity index 100%
rename from eclipse/plugins/org.junit_3.8.2.v20090203-1005/about_files/cpl-v10.html
rename to eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/about_files/cpl-v10.html
diff --git a/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/plugin.properties b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/plugin.properties
new file mode 100644
index 0000000..a495ea8
--- /dev/null
+++ b/eclipse/plugins/org.junit_3.8.2.v3_8_2_v20100427-1100/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2000, 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=JUnit Testing Framework
+providerName=Eclipse Orbit
diff --git a/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.RSA b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.RSA
new file mode 100644
index 0000000..05bf3d8
Binary files /dev/null and b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.RSA differ
diff --git a/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.SF b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.SF
new file mode 100644
index 0000000..ac50b6b
--- /dev/null
+++ b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/ECLIPSEF.SF
@@ -0,0 +1,20 @@
+Signature-Version: 1.0
+SHA1-Digest-Manifest: r/COsuwQgJvh0v56+4Oa9oKJ9yQ=
+Created-By: 1.6.0 (IBM Corporation)
+SHA1-Digest-Manifest-Main-Attributes: +9QXoDk9nmtLRlSF4mBR1u3j0NU=
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: Z+e4UrhAmTCBR1UpP/RqMf9OX00=
+
+Name: junit.jar
+SHA1-Digest: 3nIr0cIEq1xGZ8kGEKRtO5ptt9I=
+
+Name: about.html
+SHA1-Digest: NrCxtJrQLeggavKie0H5Jf2NgVg=
+
+Name: about_files/cpl-v10.html
+SHA1-Digest: MIzNDpOYPvPiuf1zBtCLIJle7hg=
+
+Name: plugin.properties
+SHA1-Digest: y6pZhnJCqH6f8fjcHiGi3l3i5l4=
+
diff --git a/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/MANIFEST.MF b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..9fd116c
--- /dev/null
+++ b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/MANIFEST.MF
@@ -0,0 +1,46 @@
+Manifest-Version: 1.0
+Bundle-ClassPath: junit.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.junit
+Require-Bundle: org.hamcrest.core;bundle-version="1.1.0";visibility:=r
+ eexport
+Export-Package: junit.extensions;version="4.8.1",junit.framework;versi
+ on="4.8.1",junit.runner;version="4.8.1",junit.textui;version="4.8.1",
+ org.junit;version="4.8.1",org.junit.experimental;version="4.8.1",org.
+ junit.experimental.categories;version="4.8.1",org.junit.experimental.
+ max;version="4.8.1",org.junit.experimental.results;version="4.8.1",or
+ g.junit.experimental.runners;version="4.8.1",org.junit.experimental.t
+ heories;version="4.8.1",org.junit.experimental.theories.internal;vers
+ ion="4.8.1";x-internal:=true,org.junit.experimental.theories.supplier
+ s;version="4.8.1",org.junit.internal;version="4.8.1";x-internal:=true
+ ,org.junit.internal.builders;version="4.8.1";x-internal:=true,org.jun
+ it.internal.matchers;version="4.8.1";x-internal:=true,org.junit.inter
+ nal.requests;version="4.8.1";x-internal:=true,org.junit.internal.runn
+ ers;version="4.8.1";x-internal:=true,org.junit.internal.runners.model
+ ;version="4.8.1";x-internal:=true,org.junit.internal.runners.statemen
+ ts;version="4.8.1";x-internal:=true,org.junit.matchers;version="4.8.1
+ ",org.junit.rules;version="4.8.1",org.junit.runner;version="4.8.1",or
+ g.junit.runner.manipulation;version="4.8.1",org.junit.runner.notifica
+ tion;version="4.8.1",org.junit.runners;version="4.8.1",org.junit.runn
+ ers.model;version="4.8.1"
+Bundle-Version: 4.8.1.v4_8_1_v20100427-1100
+Bundle-ManifestVersion: 2
+
+Name: META-INF/eclipse.inf
+SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
+
+Name: junit.jar
+SHA1-Digest: zPmrTAyba4ZMLFgf8QAHILhgZ9o=
+
+Name: about_files/cpl-v10.html
+SHA1-Digest: REygXYi+T14Sj1v8XnnKycNjpN4=
+
+Name: about.html
+SHA1-Digest: w3lIEWRkSmgtAui4qxGRJmqgDw4=
+
+Name: plugin.properties
+SHA1-Digest: f1fR+Wdi2X4qLQSIBEgwenAuk2c=
+
diff --git a/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/eclipse.inf b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/eclipse.inf
similarity index 100%
rename from eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/META-INF/eclipse.inf
rename to eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/eclipse.inf
diff --git a/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/about.html b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/about.html
new file mode 100644
index 0000000..7859fe0
--- /dev/null
+++ b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/about.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>January 8, 2010</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+
+<h3>Third Party Content</h3>
+<p>The Content includes items that have been sourced from third parties as set out below. If you 
+did not receive this Content directly from the Eclipse Foundation, the following is provided 
+for informational purposes only, and you should look to the Redistributor's license for 
+terms and conditions of use.</p>
+<div style="font-style: italic">
+
+<p>The Content includes items that have been sourced from third parties as follows:</p>
+
+<h4>JUnit 4.8.1</h4>
+
+<p>The plug-in is accompanied by software developed by <a href="http://www.junit.org/">JUnit.org</a>.  The JUnit 4.8.1 code included with the plug-in includes no modifications.
+Your use of JUnit 4.8.1 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the 
+Common Public License Version 1.0 ("CPL").  A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
+The binary code is located in junit.jar and the source code is located in source-bundle or in the org.junit.source bundle.
+<br/>The original source and binaries are available from <a href="http://sourceforge.net/projects/junit/files/">http://sourceforge.net/projects/junit/files/</a>, namely:
+<br/><a href="http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-4.8.1-src.jar/download">http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-4.8.1-src.jar/download</a>
+<br/><a href="http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-dep-4.8.1.jar/download">http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-dep-4.8.1.jar/download</a>
+</p>
+
+
+<h4>Hamcrest Library 1.1</h4>
+
+<p>The plug-in is accompanied by software developed by Hamcrest (<a href="http://code.google.com/p/hamcrest/">http://code.google.com/p/hamcrest/</a>).
+The hamcrest-library 1.1 code included within the JUnit 4.8.1 Jar includes no modifications.
+Your use of hamcrest-library 1.1 in both source and binary code form contained in the plug-in is subject to the terms and conditions of the 
+New BSD License.
+The binary code is located in junit.jar/org/junit/internal/matchers and the source code is located in source-bundle/org/junit/internal/matchers.</p>
+
+<p>The Hamcrest New BSD License:</p>
+<pre>
+BSD License
+
+Copyright (c) 2000-2006, www.hamcrest.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of Hamcrest nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+</pre>
+
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/eclipse/plugins/org.eclipse.pde.build/feature/cpl-v10.html b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/about_files/cpl-v10.html
similarity index 100%
copy from eclipse/plugins/org.eclipse.pde.build/feature/cpl-v10.html
copy to eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/about_files/cpl-v10.html
diff --git a/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/plugin.properties b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/plugin.properties
new file mode 100644
index 0000000..bcf0c26
--- /dev/null
+++ b/eclipse/plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/plugin.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2010 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+pluginName=JUnit Testing Framework
+providerName=Eclipse Orbit
diff --git a/eclipse/sourceReferences.properties b/eclipse/sourceReferences.properties
new file mode 100644
index 0000000..ab03411
--- /dev/null
+++ b/eclipse/sourceReferences.properties
@@ -0,0 +1,301 @@
+#Tue Mar 08 14:12:31 EST 2011
+org.eclipse.help.appserver,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.help.appserver;tag\=v20100427
+org.eclipse.ui.forms,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.forms;tag\=r36_v20100702
+org.eclipse.swt.gtk.linux.s390x,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.s390x;tag\=v3659b
+org.eclipse.jdt.debug.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.debug.ui;tag\=v20100928a_r362
+org.eclipse.jdt.launching.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.launching.macosx;tag\=v20100505
+org.eclipse.equinox.jmx.server.xmlrpc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.xmlrpc;tag\=v20100503
+org.eclipse.equinox.launcher.motif.solaris.sparc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.solaris.sparc;tag\=R36x_v20101019_1345
+org.eclipse.equinox.launcher.gtk.aix.ppc64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.aix.ppc64;tag\=R36x_v20101102
+org.eclipse.core.boot,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.boot;tag\=v20100505
+org.eclipse.ui.net,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.net;tag\=I20100505-1245
+org.eclipse.equinox.launcher.gtk.solaris.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.solaris.x86;tag\=R36x_v20101019_1345
+org.eclipse.jdt.apt.pluggable.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.apt.pluggable.core;tag\=R36_v20100727-0110
+org.eclipse.swt.examples.paint,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.paint;tag\=v3659b
+org.eclipse.core.net.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86;tag\=I20100511-0800
+org.eclipse.core.filesystem.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.macosx;tag\=v20100505
+org.eclipse.equinox.launcher.motif.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.linux.x86;tag\=R36x_v20101019_1345
+org.eclipse.ui.navigator.resources,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.navigator.resources;tag\=M20101124-0800
+org.eclipse.equinox.p2.metadata.repository,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository;tag\=v20100513
+org.eclipse.swt,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt;tag\=v3659c
+org.eclipse.swt.win32.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.win32.win32.x86;tag\=v3659c
+org.eclipse.update.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.ui;tag\=v20100512
+org.eclipse.core.filesystem,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem;tag\=R36x_v20100727-0745
+org.eclipse.core.externaltools,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.externaltools;tag\=v20100831_r361
+org.eclipse.equinox.registry.jmx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.registry.jmx;tag\=v20100503
+org.eclipse.equinox.io,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.io;tag\=v20100503
+org.eclipse.equinox.simpleconfigurator.manipulator,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator;tag\=v20100503
+org.eclipse.pde.api.tools.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ui;tag\=v20100820_r361
+org.eclipse.jdt.debug,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.debug;tag\=v20100715_r361
+org.eclipse.sdk.examples,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.sdk.examples;tag\=v20100527
+org.eclipse.pde,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde;tag\=v20100625_r361
+org.eclipse.compare.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.compare/plugins/org.eclipse.compare.core;tag\=R36x_v20100929-0800
+org.eclipse.equinox.p2.engine,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine;tag\=R36x_v20110201
+org.eclipse.equinox.launcher.motif.hpux.ia64_32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.hpux.ia64_32;tag\=R36x_v20101019_1345
+org.eclipse.equinox.http,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http;tag\=v20100503
+org.eclipse.swt.gtk.linux.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.x86_64;tag\=v3659b
+org.eclipse.swt.photon.qnx.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.photon.qnx.x86;tag\=v3659b
+org.eclipse.equinox.p2.ui.admin,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin;tag\=v20100503
+org.eclipse.equinox.weaving.caching.j9,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching.j9;tag\=v20100503
+org.eclipse.equinox.transforms.xslt,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.xslt;tag\=v20100503
+org.eclipse.jface.databinding,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jface.databinding;tag\=I20100601-0800
+org.eclipse.equinox.p2.touchpoint.eclipse,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse;tag\=R36x_v20101202
+org.eclipse.help.base,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.help.base;tag\=r36_20101123
+org.eclipse.ui.presentations.r21,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.presentations.r21;tag\=I20100517-1500
+org.eclipse.equinox.frameworkadmin,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin;tag\=v20100503
+org.eclipse.pde.launching,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.launching;tag\=v20100601
+org.eclipse.ui.intro,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.intro;tag\=v20100427
+org.eclipse.ltk.ui.refactoring,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ltk.ui.refactoring;tag\=v20100526-0800
+org.eclipse.swt.examples.ole.win32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.ole.win32;tag\=v3659b
+org.eclipse.ui.workbench.texteditor,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.workbench.texteditor;tag\=r361_v20100714-0800
+org.eclipse.ui.examples.multipageeditor,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.multipageeditor;tag\=I20100509-0800
+org.eclipse.core.filesystem.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.linux.x86;tag\=v20100505-1235
+org.eclipse.equinox.p2.ui.discovery,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery;tag\=v20100519
+org.eclipse.ui.examples.javaeditor,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.javaeditor;tag\=v20100520-0800
+org.eclipse.ant.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ant.core;tag\=v20110203_r362
+org.eclipse.equinox.p2.ui.admin.rcp,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp;tag\=R36x_v20100823
+org.eclipse.equinox.p2.updatechecker,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker;tag\=R36x_v20100823
+org.eclipse.debug.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.debug.core;tag\=v20100519
+org.eclipse.ui.examples.views.properties.tabbed.article,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.views.properties.tabbed/org.eclipse.ui.examples.views.properties.tabbed.article;tag\=I20100517-1500
+org.eclipse.core.databinding,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.databinding;tag\=I20100601-0800
+org.eclipse.equinox.transforms.hook,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/components/bundles/org.eclipse.equinox.transforms.hook;tag\=v20100503
+org.eclipse.ui.carbon,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.carbon;tag\=M20101124-0800
+org.eclipse.core.contenttype,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.contenttype;tag\=v20100505-1235
+org.eclipse.text,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.text;tag\=v20100601-1300
+org.eclipse.help.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.help.ui;tag\=r36_20101116
+org.eclipse.equinox.servletbridge,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge;tag\=v20100503
+org.eclipse.jdt.apt.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.apt.core;tag\=R36_v20110120-1000
+org.eclipse.swt.win32.win32.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.win32.win32.x86_64;tag\=v3659c
+org.eclipse.equinox.metatype,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.metatype;tag\=v20100503
+org.eclipse.pde.ua.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ua/org.eclipse.pde.ua.ui;tag\=v20100504
+org.eclipse.equinox.initializer,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/framework/bundles/org.eclipse.equinox.initializer;tag\=v20100503
+org.eclipse.jsch.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jsch.core;tag\=I20100505-1245
+org.eclipse.equinox.frameworkadmin.equinox,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox;tag\=v20100505
+org.eclipse.osgi.util,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.util;tag\=v20100503
+org.eclipse.search,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.search;tag\=v20100520-0800
+org.eclipse.ui.views,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.views;tag\=M20110202-0800
+org.eclipse.equinox.simpleconfigurator,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator;tag\=v20100503
+org.eclipse.team.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.ui;tag\=R36x_v20110203-1036
+org.eclipse.equinox.p2.metadata,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata;tag\=R36x_v20101202
+org.eclipse.swt.cocoa.macosx.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.cocoa.macosx.x86_64;tag\=v3659b
+org.eclipse.swt.gtk.linux.ppc64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.ppc64;tag\=v3659b
+org.eclipse.jdt.compiler.tool,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.compiler.tool;tag\=v_A76_R36x
+org.eclipse.platform,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.platform;tag\=r362_v20110120
+org.eclipse.core.databinding.observable,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.databinding.observable;tag\=I20100601-0800
+org.eclipse.equinox.weaving.aspectj,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.aspectj;tag\=v20100503
+org.eclipse.team.examples.filesystem,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.examples.filesystem;tag\=I20100526-0800
+org.eclipse.pde.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.core;tag\=v20110210_r362
+org.eclipse.ui.workbench,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.workbench;tag\=M20110210-1200
+org.eclipse.core.runtime,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.runtime;tag\=v20100505
+org.eclipse.core.resources.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.resources.win32.x86;tag\=v20100505-1345
+org.eclipse.equinox.launcher.gtk.linux.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86_64;tag\=R36x_v20101019_1345
+org.eclipse.help,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.help;tag\=v20100524
+org.eclipse.pde.api.tools.ee.j2se15,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.j2se15;tag\=v20100506-0900
+org.junit4,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.junit4;tag\=v20100525
+org.eclipse.update.scheduler,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.scheduler;tag\=v20100512
+org.eclipse.equinox.launcher.gtk.linux.s390,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390;tag\=R36x_v20110125
+org.eclipse.pde.junit.runtime,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.junit.runtime;tag\=v20100601
+org.eclipse.osgi.services,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.osgi.services;tag\=v20100503
+org.eclipse.swt.examples.layouts,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.layouts;tag\=v3659b
+org.eclipse.jface,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jface;tag\=M20110210-1200
+org.eclipse.equinox.p2.discovery,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery;tag\=v20100503
+org.eclipse.pde.api.tools.ee.osgiminimum10,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum10;tag\=v20100506-0900
+org.eclipse.equinox.jmx.server,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server;tag\=v20100503
+org.eclipse.equinox.jmx.server.rmi,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.server.rmi;tag\=v20100503
+org.eclipse.jdt.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.ui;tag\=r362_v20110203
+org.eclipse.equinox.security,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/security/bundles/org.eclipse.equinox.security;tag\=v20100503
+org.eclipse.equinox.launcher,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher;tag\=R36x_v20101122_1400
+org.eclipse.core.runtime.compatibility.registry,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.runtime.compatibility.registry;tag\=v20100520
+org.eclipse.jdt.junit.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.junit.core;tag\=r361_v20100825-0800
+org.eclipse.equinox.http.jetty,2.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6;project\="org.eclipse.equinox.http.jetty";tag\=v20100503
+org.eclipse.jdt.launching,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.launching;tag\=v20110105_r362
+org.eclipse.equinox.p2.ql,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql;tag\=v20100503a
+org.eclipse.ui.console,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.console;tag\=v20100526
+org.eclipse.equinox.weaving.caching,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.caching;tag\=v20100503
+org.eclipse.swt.gtk.linux.s390,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.s390;tag\=v3659b
+org.eclipse.jdt.apt.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.apt.ui;tag\=v20100513-0845
+org.eclipse.equinox.p2.discovery.compatibility,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility;tag\=v20110204-1323
+org.eclipse.ui.examples.fieldassist,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.fieldassist;tag\=I20100601-0800
+org.eclipse.ui.ide.application,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.ide.application;tag\=M20100707-0800
+org.eclipse.equinox.launcher.gtk.linux.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc;tag\=R36x_v20101019_1345
+org.eclipse.equinox.launcher.carbon.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.carbon.macosx;tag\=R36x_v20101019_1345
+org.eclipse.jdt.junit,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.junit;tag\=r361_v20100825-0800
+org.eclipse.pde.api.tools,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools;tag\=v20100820_r361
+org.eclipse.core.runtime.compatibility,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.runtime.compatibility;tag\=v20100505
+org.eclipse.equinox.p2.directorywatcher,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher;tag\=R36x_v20101220
+org.eclipse.equinox.launcher.gtk.solaris.sparc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.solaris.sparc;tag\=R36x_v20101019_1345
+org.eclipse.core.filesystem.hpux.ia64_32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.hpux.ia64_32;tag\=v20100505
+org.eclipse.swt.motif.aix.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.motif.aix.ppc;tag\=v3659b
+org.eclipse.ui.examples.undo,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.undo;tag\=I20100509-0800
+org.eclipse.ui.cocoa,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.cocoa;tag\=M20101124-0800
+org.eclipse.equinox.http.registry,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.registry;tag\=R36x_v20101103
+org.eclipse.pde.api.tools.ee.jre11,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.jre11;tag\=v20100506-0900
+org.eclipse.core.net.linux.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86_64;tag\=I20100505-1245
+org.eclipse.equinox.jsp.jasper,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper;tag\=R36x_v20101103
+org.eclipse.pde.api.tools.ee.j2se14,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.j2se14;tag\=v20100506-0900
+org.eclipse.equinox.p2.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui;tag\=v20100518
+org.eclipse.jdt.launching.ui.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.launching.ui.macosx;tag\=v20100505
+org.eclipse.equinox.p2.ui.sdk,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk;tag\=v20100513
+org.eclipse.compare.examples,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.compare.examples;tag\=I20100505-1245
+org.eclipse.pde.ua.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ua/org.eclipse.pde.ua.core;tag\=v20100504
+org.eclipse.platform.doc.isv,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.platform.doc.isv;tag\=r362_v20110111
+org.eclipse.ant.launching,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ant.launching;tag\=v20101020_r362
+org.eclipse.equinox.p2.operations,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations;tag\=v20100510
+org.eclipse.compare,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.compare/plugins/org.eclipse.compare;tag\=R36x_v20100929-0800
+org.eclipse.equinox.http.servletbridge,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.http.servletbridge;tag\=v20100503
+org.eclipse.jdt.compiler.apt,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.compiler.apt;tag\=v20100513-0845
+org.eclipse.help.webapp,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.help.webapp;tag\=r36_20101130
+org.eclipse.pde.ui.templates,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.ui.templates;tag\=v20100601
+org.eclipse.equinox.p2.repository,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository;tag\=R36x_v20110111-1500
+org.eclipse.equinox.p2.metadata.generator,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator;tag\=R36x_v20101208-1400
+org.eclipse.equinox.p2.director.app,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app;tag\=R36x_v20100823
+org.eclipse.equinox.launcher.motif.aix.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.motif.aix.ppc;tag\=R36x_v20101019_1345
+org.eclipse.equinox.app,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.app;tag\=R36x_v20100803
+org.eclipse.swt.motif.hpux.ia64_32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.motif.hpux.ia64_32;tag\=v3659b
+org.eclipse.swt.gtk.solaris.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.solaris.x86;tag\=v3659b
+org.eclipse.pde.ds.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ds/org.eclipse.pde.ds.ui;tag\=v20100601
+org.eclipse.core.net.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.net/fragments/org.eclipse.core.net.linux.x86;tag\=R36x_v20100825-0800
+org.eclipse.equinox.p2.console,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console;tag\=v20100601
+org.eclipse.equinox.http.jetty,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6;project\="org.eclipse.equinox.http.jetty";tag\=v20100503
+org.eclipse.swt.examples.browser.demos,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.browser.demos;tag\=v3659b
+org.eclipse.equinox.launcher.cocoa.macosx.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx.x86_64;tag\=R36x_v20101019_1345
+org.eclipse.releng.tools,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.releng.tools;tag\=v20100531
+org.eclipse.pde.doc.user,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/doc/org.eclipse.pde.doc.user;tag\=v20101118_r362
+org.eclipse.swt.motif.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.motif.linux.x86;tag\=v3659b
+org.eclipse.jface.examples.databinding,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jface.examples.databinding;tag\=I20100601-0800
+org.eclipse.equinox.jmx.client.rmi,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.rmi;tag\=v20100503
+org.eclipse.equinox.weaving.hook,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/weaving/bundles/org.eclipse.equinox.weaving.hook;tag\=v20100503
+org.eclipse.debug.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.debug.ui;tag\=v20101201_r362
+org.eclipse.core.net,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.net;tag\=I20100511-0800
+org.eclipse.core.filesystem.solaris.sparc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.solaris.sparc;tag\=v20100505-1235
+org.eclipse.equinox.p2.touchpoint.natives,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives;tag\=R36x_v20110111
+org.eclipse.pde.api.tools.ee.cdcfoundation11,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation11;tag\=v20100506-0900
+org.eclipse.equinox.launcher.win32.win32.ia64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.ia64;tag\=R36x_v20101222
+org.eclipse.swt.examples.browser,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.browser;tag\=v3659b
+org.eclipse.core.filesystem.linux.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.linux.x86_64;tag\=v20100505-1235
+org.eclipse.equinox.event,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.event;tag\=v20100503
+org.eclipse.ui.ide,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.ide;tag\=M20101201-0800
+org.eclipse.ui.views.log,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.ui.views.log;tag\=v20110210_r362
+org.eclipse.equinox.p2.jarprocessor,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor;tag\=v20100503a
+org.eclipse.ui.browser,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.browser;tag\=r36_20101216
+org.eclipse.core.expressions,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.expressions;tag\=v20100505
+org.eclipse.core.databinding.beans,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.databinding.beans;tag\=I20100601-0800
+org.eclipse.equinox.ds,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ds;tag\=R36x_v20100803
+org.eclipse.equinox.launcher.win32.win32.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86_64;tag\=R36x_v20101222
+org.eclipse.equinox.launcher.gtk.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.x86;tag\=R36x_v20101019_1345
+org.eclipse.update.core.linux,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.core.linux;tag\=v20100512
+org.eclipse.core.databinding.property,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.databinding.property;tag\=I20100601-0800
+org.eclipse.ui.examples.propertysheet,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.propertysheet;tag\=I20100509-0800
+org.eclipse.core.jobs,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.jobs;tag\=R36x_v20100824
+org.eclipse.swt.gtk.linux.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.ppc;tag\=v3659b
+org.eclipse.swt.carbon.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.carbon.macosx;tag\=v3659b
+org.eclipse.pde.runtime,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.runtime;tag\=v20100601
+org.eclipse.pde.build,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/build/org.eclipse.pde.build;tag\=R36x_20110203
+org.eclipse.equinox.p2.reconciler.dropins,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins;tag\=R36x_v20110114
+org.eclipse.equinox.device,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.device;tag\=v20100503
+org.eclipse.core.commands,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.commands;tag\=I20100512-1500
+org.eclipse.equinox.p2.repository.tools,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools;tag\=R36x_v20100823
+org.eclipse.equinox.launcher.gtk.linux.s390x,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/contributed/org.eclipse.equinox.launcher.gtk.linux.s390x;tag\=R36x_v20110125
+org.eclipse.update.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.core;tag\=R36x_v20100629
+org.eclipse.team.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.core;tag\=R36x_v20110203-1036
+org.eclipse.debug.examples.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.debug.examples.ui;tag\=v20100526
+org.eclipse.pde.api.tools.ee.javase16,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.javase16;tag\=v20100506-0900
+org.eclipse.compare.win32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.compare/plugins/org.eclipse.compare.win32;tag\=R36x_v20101103-0618
+org.eclipse.equinox.p2.installer,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer;tag\=v20100503a
+org.eclipse.debug.examples.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.debug.examples.core;tag\=v20100505
+org.eclipse.rcp,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.sdk-feature/plugins/org.eclipse.rcp;tag\=v20100527-0800
+org.eclipse.pde.ds.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ds/org.eclipse.pde.ds.core;tag\=v20100601
+org.eclipse.equinox.registry,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/components/bundles/org.eclipse.equinox.registry;tag\=v20100503
+org.eclipse.ui.examples.readmetool,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.readmetool;tag\=I20100509-0800
+org.eclipse.jdt.core.manipulation,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.core.manipulation;tag\=v20100520-0800
+org.eclipse.equinox.http.servlet,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet;tag\=v20100503
+org.eclipse.equinox.launcher.win32.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.win32.win32.x86;tag\=R36x_v20101222
+org.eclipse.jdt.junit.runtime,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.junit.runtime;tag\=v20100526-0800
+org.eclipse.swt.examples.controls,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.controls;tag\=v3659b
+org.eclipse.core.filesystem.linux.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.linux.ppc;tag\=v20100505-1235
+org.eclipse.osgi.jmx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.osgi.jmx;tag\=v20100503
+org.eclipse.ui.workbench.compatibility,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.workbench.compatibility;tag\=I20100511-0800
+org.eclipse.core.filesystem.aix.ppc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem/fragments/org.eclipse.core.filesystem.aix.ppc;tag\=v20100505-1235
+org.eclipse.swt.cocoa.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.cocoa.macosx;tag\=v3659b
+org.eclipse.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui;tag\=M20110203-1100
+org.eclipse.equinox.jmx.client.xmlrpc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client.xmlrpc;tag\=v20100503
+org.eclipse.swt.win32.wce_ppc.arm,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.win32.wce_ppc.arm;tag\=v3659c
+org.eclipse.compare.examples.xml,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.compare.examples.xml;tag\=I20100505-1245
+org.eclipse.equinox.jsp.jasper.registry,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.jsp.jasper.registry;tag\=v20100503
+org.eclipse.core.resources,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.resources;tag\=R36x_v20110131-1630
+org.eclipse.team.cvs.ssh2,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.cvs.ssh2;tag\=I20100526-0800
+org.eclipse.equinox.wireadmin,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.wireadmin;tag\=v20100503
+org.eclipse.ant.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ant.ui;tag\=v20100427
+org.eclipse.swt.gtk.solaris.sparc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.solaris.sparc;tag\=v3659b
+org.eclipse.core.net.win32.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.net/fragments/org.eclipse.core.net.win32.x86_64;tag\=I20100505-1245
+org.eclipse.swt.examples.launcher,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples.launcher;tag\=v3659b
+org.eclipse.equinox.preferences.jmx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.preferences.jmx;tag\=v20100503
+org.eclipse.equinox.p2.garbagecollector,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector;tag\=v20100503
+org.eclipse.equinox.cm,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.cm;tag\=v20100520
+org.eclipse.equinox.common,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/components/bundles/org.eclipse.equinox.common;tag\=v20100503
+org.eclipse.equinox.p2.director,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director;tag\=R36x_v20101117-1018
+org.eclipse.equinox.p2.publisher,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher;tag\=v20100824-2220
+org.eclipse.jdt.doc.isv,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.doc.isv;tag\=r362_v20101117-0800
+org.eclipse.ltk.core.refactoring,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ltk.core.refactoring;tag\=r362_v20101117-0800
+org.eclipse.jdt.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.core;tag\=v_A76_R36x
+org.eclipse.equinox.p2.updatesite,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite;tag\=R36x_v20100823
+org.eclipse.update.configurator,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.configurator;tag\=v20100512
+org.eclipse.core.filesystem.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.win32.x86;tag\=R36x_v20100727-0745
+org.eclipse.equinox.p2.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core;tag\=R36x_v20110111
+org.eclipse.swt.examples,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.examples;tag\=v3659b
+org.eclipse.cvs,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.sdk-feature/plugins/org.eclipse.cvs;tag\=v20100414
+org.eclipse.swt.gtk.linux.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.linux.x86;tag\=v3659b
+org.eclipse.equinox.log,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.log;tag\=v20100503
+org.eclipse.equinox.jmx.client,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.client;tag\=v20100503
+org.eclipse.ui.win32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.win32;tag\=I20100509-0800
+org.eclipse.ui.views.properties.tabbed,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.views.properties.tabbed;tag\=I20100509-0800
+org.eclipse.equinox.security.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.ui;tag\=v20100503
+org.eclipse.pde.api.tools.ee.j2se13,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.j2se13;tag\=v20100506-0900
+org.eclipse.swt.motif.solaris.sparc,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.motif.solaris.sparc;tag\=v3659b
+org.eclipse.equinox.util,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.util;tag\=v20100503
+org.eclipse.equinox.p2.extensionlocation,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation;tag\=v20100518
+org.eclipse.pde.api.tools.ee.osgiminimum12,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum12;tag\=v20100506-0900
+org.eclipse.equinox.concurrent,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent;tag\=v20100503
+org.eclipse.platform.doc.user,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.platform.doc.user;tag\=r362_v20101117-0800
+org.eclipse.equinox.security.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.macosx;tag\=v20100503
+org.eclipse.equinox.supplement,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.osgi/supplement;project\="org.eclipse.equinox.supplement";tag\=R36x_v20101021
+org.eclipse.sdk,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.sdk;tag\=r362_v20110202
+org.eclipse.equinox.launcher.gtk.linux.ppc64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.gtk.linux.ppc64;tag\=R36x_v20101019_1345
+org.eclipse.jsch.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jsch.ui;tag\=I20100505-1245
+org.eclipse.core.filesystem.win32.x86_64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filesystem.win32.x86_64;tag\=R36x_v20100727-0745
+org.eclipse.equinox.security.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/security/bundles/org.eclipse.equinox.security.win32.x86;tag\=v20100503
+org.eclipse.core.variables,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.variables;tag\=v20100505
+org.eclipse.pde.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/ui/org.eclipse.pde.ui;tag\=v20110210_r362
+org.eclipse.equinox.p2.artifact.repository,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository;tag\=R36x_v20100901
+org.eclipse.core.runtime.compatibility.auth,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.runtime.compatibility.auth;tag\=v20100517
+org.eclipse.osgi,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.osgi;tag\=R36x_v20110210
+org.eclipse.ui.intro.universal,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.intro.universal;tag\=r36_v20100702
+org.eclipse.swt.jmx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.swt.jmx;tag\=v20100503
+org.eclipse.equinox.launcher.cocoa.macosx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.cocoa.macosx;tag\=R36x_v20101019_1345
+org.eclipse.ui.examples.contributions,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.examples.contributions;tag\=I20100509-0800
+org.eclipse.team.cvs.ui,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.cvs.ui;tag\=R36x_v20110203-1036
+org.eclipse.ui.cheatsheets,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.cheatsheets;tag\=v20100427
+org.eclipse.jdt.doc.user,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.doc.user;tag\=r361_v20100721-0800
+org.eclipse.equinox.useradmin,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.useradmin;tag\=v20100503
+org.eclipse.jface.text,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jface.text;tag\=r361_v20100825-0800
+org.eclipse.core.resources.jmx,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.core.resources.jmx;tag\=v20100503
+org.eclipse.update.core.win32,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.update.core.win32;tag\=v20100512
+org.eclipse.ui.externaltools,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.externaltools;tag\=v20100427
+org.eclipse.jdt.junit4.runtime,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt.junit4.runtime;tag\=v20100526-0800
+org.eclipse.pde.api.tools.ee.j2se12,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.j2se12;tag\=v20100506-0900
+org.eclipse.equinox.http.jetty,1.1.100=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty5;project\="org.eclipse.equinox.http.jetty";tag\=v20100519
+org.eclipse.pde.api.tools.ee.osgiminimum11,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.osgiminimum11;tag\=v20100506-0900
+org.eclipse.ui.navigator,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.navigator;tag\=I20100601-0800
+org.eclipse.team.cvs.core,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.team.cvs.core;tag\=R36x_v20110119-0815
+org.eclipse.pde.api.tools.ee.cdcfoundation10,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:pde/apitools/org.eclipse.pde.api.tools.ee.cdcfoundation10;tag\=v20100506-0900
+org.eclipse.equinox.launcher.wpf.win32.x86,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/framework/bundles/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.wpf.win32.x86;tag\=R36x_v20101222
+org.eclipse.equinox.preferences,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.preferences;tag\=v20100503
+org.eclipse.equinox.jmx.common,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.common;tag\=v20100503
+org.eclipse.equinox.p2.ui.sdk.scheduler,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler;tag\=v20100507-1815
+org.eclipse.equinox.jmx.vm,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/incubator/monitoring/bundles/org.eclipse.equinox.jmx.vm;tag\=v20100503
+org.eclipse.swt.gtk.aix.ppc64,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.swt.gtk.aix.ppc64;tag\=v3659b
+org.eclipse.ui.editors,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.ui.editors;tag\=r361_v20100825-0800
+org.eclipse.equinox.servletbridge.extensionbundle,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/server-side/bundles/org.eclipse.equinox.servletbridge.extensionbundle;tag\=v20100503
+org.eclipse.core.filebuffers,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.core.filebuffers;tag\=v20100520-0800
+org.eclipse.equinox.ip,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/rt\:org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.ip;tag\=v20100503
+org.eclipse.jdt,0.0.0=scm\:cvs\:pserver\:dev.eclipse.org\:/cvsroot/eclipse\:org.eclipse.jdt;tag\=r361_v20100714-0800
diff --git a/extract_patterns.txt b/extract_patterns.txt
new file mode 100644
index 0000000..8e0dff8
--- /dev/null
+++ b/extract_patterns.txt
@@ -0,0 +1 @@
+.* = *.so
\ No newline at end of file
diff --git a/jdtdependencies.properties b/jdtdependencies.properties
new file mode 100644
index 0000000..22a74d2
--- /dev/null
+++ b/jdtdependencies.properties
@@ -0,0 +1 @@
+org.hamcrest.core_1.1.0.v20090501071000.jar=/usr/share/java/hamcrest/core.jar:/usr/share/java/hamcrest-core.jar
diff --git a/jdtnonosgidependencies.properties b/jdtnonosgidependencies.properties
new file mode 100644
index 0000000..1c99651
--- /dev/null
+++ b/jdtnonosgidependencies.properties
@@ -0,0 +1,3 @@
+org.junit_3.8.2.v3_8_2_v20100427-1100/junit.jar=/usr/share/java/junit.jar
+org.junit4/junit.jar=/usr/share/java/junit4.jar
+org.junit_4.8.1.v4_8_1_v20100427-1100/junit.jar=/usr/share/java/junit4.jar
diff --git a/junitHelper.xml b/junitHelper.xml
index cd3b92f..28c4815 100644
--- a/junitHelper.xml
+++ b/junitHelper.xml
@@ -7,6 +7,10 @@
 	<condition property="eclipseHomeSet">
 		<isset property="eclipse-home"/>
 	</condition>
+	
+	<condition property="testframeworkSet">
+		<isset property="testframework"/>
+	</condition>
 
 	<property name="htmlDir" value="${results}/html"/>
 	<property name="xmlDir" value="${results}/xml"/>
@@ -16,8 +20,10 @@
 	      unless="resultsDefined"/>
 		<fail message="Eclipse installation directory not set"
 	      unless="eclipseHomeSet"/>
+		<fail message="Test framework directory not set"
+	      unless="testframeworkSet"/>
 		<echo message="Generating results in ${htmlDir}"/>
-		<xslt style="${eclipse-home}/plugins/org.eclipse.test_3.2.0/JUNIT.XSL" basedir="${xmlDir}" destdir="${htmlDir}" />
+		<xslt style="${eclipse-home}/plugins/${testframework}/JUNIT.XSL" basedir="${xmlDir}" destdir="${htmlDir}" />
 	</target>
 
 </project>
diff --git a/nonosgidependencies.properties b/nonosgidependencies.properties
index 9ae7ec5..5aab7b2 100644
--- a/nonosgidependencies.properties
+++ b/nonosgidependencies.properties
@@ -1,23 +1,18 @@
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-antlr.jar=/usr/share/java/ant/ant-antlr.jar:/usr/share/java/ant-antlr.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-bcel.jar=/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ant-apache-bcel.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-bsf.jar=/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/ant-apache-bsf.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-log4j.jar=/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/ant-apache-log4j.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-oro.jar=/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/ant-apache-oro.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-regexp.jar=/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/ant-apache-regexp.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-apache-resolver.jar=/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/ant-apache-resolver.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-commons-logging.jar=/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/ant-commons-logging.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-commons-net.jar=/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant-commons-net.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar=/usr/share/java/ant.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-javamail.jar=/usr/share/java/ant/ant-javamail.jar:/usr/share/java/ant-javamail.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-jdepend.jar=/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant-jdepend.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-jsch.jar=/usr/share/java/ant/ant-jsch.jar:/usr/share/java/ant-jsch.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-junit.jar=/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant-junit.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-launcher.jar=/usr/share/java/ant-launcher.jar:/usr/share/java/ant-launcher.jar
-org.apache.ant_1.7.1.v20090120-1145/lib/ant-swing.jar=/usr/share/java/ant/ant-swing.jar:/usr/share/java/ant-swing.jar
-org.junit_3.8.2.v20090203-1005/junit.jar=/usr/share/java/junit.jar
-org.junit4/junit.jar=/usr/share/java/junit4.jar
-org.apache.ant_1.7.1.v20090120-1145/bin/ant=/usr/share/ant/bin/ant
-org.apache.ant_1.7.1.v20090120-1145/bin/antRun=/usr/share/ant/bin/antRun
-org.apache.ant_1.7.1.v20090120-1145/bin/antRun.pl=/usr/share/ant/bin/antRun.pl
-org.apache.ant_1.7.1.v20090120-1145/bin/complete-ant-cmd.pl=/usr/share/ant/bin/complete-ant-cmd.pl
-org.apache.ant_1.7.1.v20090120-1145/bin/runant.pl=/usr/share/ant/bin/runant.pl
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-antlr.jar=/usr/share/java/ant/ant-antlr.jar:/usr/share/java/ant-antlr.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bcel.jar=/usr/share/java/ant/ant-apache-bcel.jar:/usr/share/java/ant-apache-bcel.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-bsf.jar=/usr/share/java/ant/ant-apache-bsf.jar:/usr/share/java/ant-apache-bsf.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-log4j.jar=/usr/share/java/ant/ant-apache-log4j.jar:/usr/share/java/ant-apache-log4j.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-oro.jar=/usr/share/java/ant/ant-apache-oro.jar:/usr/share/java/ant-apache-oro.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-regexp.jar=/usr/share/java/ant/ant-apache-regexp.jar:/usr/share/java/ant-apache-regexp.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-apache-resolver.jar=/usr/share/java/ant/ant-apache-resolver.jar:/usr/share/java/ant-apache-resolver.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-commons-logging.jar=/usr/share/java/ant/ant-commons-logging.jar:/usr/share/java/ant-commons-logging.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-commons-net.jar=/usr/share/java/ant/ant-commons-net.jar:/usr/share/java/ant-commons-net.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar=/usr/share/java/ant.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-javamail.jar=/usr/share/java/ant/ant-javamail.jar:/usr/share/java/ant-javamail.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-jdepend.jar=/usr/share/java/ant/ant-jdepend.jar:/usr/share/java/ant-jdepend.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-jsch.jar=/usr/share/java/ant/ant-jsch.jar:/usr/share/java/ant-jsch.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-junit.jar=/usr/share/java/ant/ant-junit.jar:/usr/share/java/ant-junit.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-launcher.jar=/usr/share/java/ant-launcher.jar:/usr/share/java/ant-launcher.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-nodeps.jar=/usr/share/java/ant/ant-nodeps.jar:/usr/share/java/ant-nodeps.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-swing.jar=/usr/share/java/ant/ant-swing.jar:/usr/share/java/ant-swing.jar
+org.apache.ant_1.7.1.v20100518-1145/lib/ant-trax.jar=/usr/share/java/ant/ant-trax.jar:/usr/share/java/ant-trax.jar
diff --git a/patches/bz318912.patch b/patches/bz318912.patch
new file mode 100644
index 0000000..1d344c9
--- /dev/null
+++ b/patches/bz318912.patch
@@ -0,0 +1,20 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.help.base
+Index: META-INF/MANIFEST.MF
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.help.base/META-INF/MANIFEST.MF,v
+retrieving revision 1.45
+diff -u -r1.45 MANIFEST.MF
+--- plugins/org.eclipse.help.base/META-INF/MANIFEST.MF	24 Jun 2010 18:38:49 -0000	1.45
++++ plugins/org.eclipse.help.baseMETA-INF/MANIFEST.MF	7 Jul 2010 23:16:48 -0000
+@@ -39,8 +39,8 @@
+  org.eclipse.help.search,
+  org.eclipse.help.server,
+  org.eclipse.help.standalone
+-Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
+- org.apache.lucene.analysis;bundle-version="[1.9.1,2.0.0)";visibility:=reexport,
++Require-Bundle: org.apache.lucene;bundle-version="[1.9.1,3.0.0)";visibility:=reexport,
++ org.apache.lucene.analysis;bundle-version="[1.9.1,3.0.0)";visibility:=reexport,
+  org.eclipse.ant.core;bundle-version="3.2.200";resolution:=optional,
+  org.eclipse.core.runtime;bundle-version="3.6.0",
+  org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
diff --git a/patches/bz319476-compile-jar-in-jar-loader.patch b/patches/bz319476-compile-jar-in-jar-loader.patch
new file mode 100644
index 0000000..25fccef
--- /dev/null
+++ b/patches/bz319476-compile-jar-in-jar-loader.patch
@@ -0,0 +1,197 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.jdt.ui
+Index: build.properties
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/build.properties,v
+retrieving revision 1.39
+diff -u -r1.39 build.properties
+--- build.properties	14 Jan 2010 16:57:59 -0000	1.39
++++ build.properties	20 Oct 2010 19:00:04 -0000
+@@ -31,3 +31,4 @@
+                core extension/,\
+                internal compatibility/
+ jars.compile.order = .
++customBuildCallbacks = customBuildCallbacks.xml
+Index: customBuildCallbacks.xml
+===================================================================
+RCS file: customBuildCallbacks.xml
+diff -N customBuildCallbacks.xml
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ customBuildCallbacks.xml	1 Jan 1970 00:00:00 -0000
+@@ -0,0 +1,176 @@
++<!-- ===================================================================== -->
++<!-- Custom targets called from a project's generated build.xml            -->
++<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
++<!-- ===================================================================== -->
++<project name="Build specific targets and properties" default="noDefault">
++
++		<available file="${basedir}/jar-in-jar-loader.zip" property="jijl-zip" />
++	
++	<!-- ===================================================================== -->
++	<!-- Default target                                                        -->
++	<!-- ===================================================================== -->
++	<target name="noDefault">
++		<echo message="This file must be called with explicit targets" />
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target build.jars                              -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder to contain the build results           -->
++	<!-- ===================================================================== -->
++	<target name="pre.build.jars">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target build.jars                               -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder to contain the build results           -->
++	<!-- ===================================================================== -->
++	<target name="post.build.jars">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target build.sources                           -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder to contain the build results           -->
++	<!-- ===================================================================== -->
++	<target name="pre.build.sources">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target build.sources                            -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder to contain the build results           -->
++	<!-- ===================================================================== -->
++	<target name="post.build.sources">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the compilation target <name>                      -->
++	<!-- Substitute "name" with the name of the compilation target, eg @dot    -->
++	<!-- Available parameters :                                                -->
++	<!--   source.foldern : n = 1 ... N, the source folders                    -->
++	<!--   target.folder  : where the results of the compilation go            -->
++	<!--   <name>.classpath : name = name of the compilation target. A         -->
++	<!--                      reference to the classpath structure.            -->
++	<!-- ===================================================================== -->
++	<target name="pre.name">
++	</target>
++
++	<target name="pre. at dot" depends="compile-jar-in-jar-loader">
++	</target>
++
++	<target name="compile-jar-in-jar-loader" unless="jijl-zip" >
++		<mkdir dir="${basedir}/temp/" />
++		<javac destdir="${basedir}/temp"
++			srcdir="jar in jar loader/"
++			source="1.3"
++			target="1.1"
++			debug="true"
++			optimize="true"
++			fork="true" />
++		<zip destfile="${basedir}/jar-in-jar-loader.zip"
++			basedir="${basedir}/temp/" />
++
++		<delete dir="${basedir}/temp/" />
++
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do during the compilation target <name>, after the compile   -->
++	<!-- but before jaring.  Substitute "name" with the name of the compilation-->
++	<!-- target, eg @dot                                                       -->
++	<!-- Available parameters :                                                -->
++	<!--   source.foldern : n = 1 ... N, the source folders                    -->
++	<!--   target.folder  : where the results of the compilation go            -->
++	<!--   <name>.classpath : name = name of the compilation target. A         -->
++	<!--                      reference to the classpath structure.            -->
++	<!-- ===================================================================== -->
++	<target name="post.compile.name">
++	</target>
++
++	<target name="post.compile. at dot">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the compilation target <name>                       -->
++	<!-- Substitute "name" with the name of the compilation target, eg @dot    -->
++	<!-- Available parameters :                                                -->
++	<!--   jar.Location - the location of the compilation results              -->
++	<!--   <name>.classpath : name = name of the compilation target. A         -->
++	<!--                      reference to the classpath structure.            -->
++	<!-- ===================================================================== -->
++	<target name="post.name">
++	</target>
++
++	<target name="post. at dot">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target gather.bin.parts                         -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder containing the build results           -->
++	<!--   target.folder - destination folder                                  -->
++	<!-- ===================================================================== -->
++	<target name="pre.gather.bin.parts">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target gather.bin.parts                         -->
++	<!-- Available parameters :                                                -->
++	<!--   build.result.folder - folder containing the build results           -->
++	<!--   target.folder - destination folder                                  -->
++	<!-- ===================================================================== -->
++	<target name="post.gather.bin.parts">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target gather.sources                          -->
++	<!-- Available parameters :                                                -->
++	<!--   destination.temp.folder - destination folder                        -->
++	<!-- ===================================================================== -->
++	<target name="pre.gather.sources">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target gather.sources                           -->
++	<!-- Available parameters :                                                -->
++	<!--   destination.temp.folder - destination folder                        -->
++	<!-- ===================================================================== -->
++	<target name="post.gather.sources">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target gather.logs                             -->
++	<!-- Available parameters :                                                -->
++	<!--   destination.temp.folder - destination folder                        -->
++	<!-- ===================================================================== -->
++	<target name="pre.gather.logs">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target gather.logs                              -->
++	<!-- Available parameters :                                                -->
++	<!--   destination.temp.folder - destination folder                        -->
++	<!-- ===================================================================== -->
++	<target name="post.gather.logs">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do before the target clean                                   -->
++	<!-- Available parameters :                                                -->
++	<!--   destination.temp.folder - destination folder                        -->
++	<!-- ===================================================================== -->
++	<target name="pre.clean">
++	</target>
++
++	<!-- ===================================================================== -->
++	<!-- Steps to do after the target clean                                    -->
++	<!-- Available parameters :                                                -->
++	<!--   plugin.destination - final destination of the build                 -->
++	<!--   build.result.folder - results of the compilation                    -->
++	<!--   temp.folder - temporary folder                                      -->
++	<!-- ===================================================================== -->
++	<target name="post.clean">
++	</target>
++</project>
diff --git a/patches/donotsetjavahomeandoptimizeliblocalfile.patch b/patches/donotsetjavahomeandoptimizeliblocalfile.patch
index 1f0a362..3ba3b5d 100644
--- a/patches/donotsetjavahomeandoptimizeliblocalfile.patch
+++ b/patches/donotsetjavahomeandoptimizeliblocalfile.patch
@@ -1,30 +1,15 @@
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/features/org.eclipse.equinox.executable/library/gtk/build.sh debian.git.new/build/eclipse-I20090611-1540-fetched-src/features/org.eclipse.equinox.executable/library/gtk/build.sh
---- debian.git/build/eclipse-I20090611-1540-fetched-src/features/org.eclipse.equinox.executable/library/gtk/build.sh	2009-04-23 23:04:23.000000000 +0200
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/features/org.eclipse.equinox.executable/library/gtk/build.sh	2009-08-26 23:12:52.882192442 +0200
-@@ -153,7 +153,7 @@ PROGRAM_OUTPUT="$programOutput"
- DEFAULT_OS="$defaultOS"
- DEFAULT_OS_ARCH="$defaultOSArch"
- DEFAULT_WS="$defaultWS"
--JAVA_HOME=$javaHome
-+
- DEFAULT_JAVA=$defaultJava
- 
- LIBRARY_DIR="../../../org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.$defaultWS.$defaultOS.$defaultOSArch"
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
---- debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile	2007-12-06 20:30:00.000000000 +0100
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile	2009-08-26 23:12:41.594611729 +0200
-@@ -17,12 +17,12 @@ LIB_NAME_FULL = liblocalfile_1_0_0.so
+--- a/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
++++ b/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile
+@@ -20,10 +20,10 @@
  OS_TYPE = linux
  
  #Set this to be the location of your JRE
--JAVA_HOME = ~/vm/sun142
-+#JAVA_HOME = ~/vm/sun142
+-JAVA_HOME = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.9/
++#JAVA_HOME = /usr/lib/jvm/java-1.5.0-ibm-1.5.0.9/
  
  JDK_INCLUDE = -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS_TYPE}
- COMMON_INCLUDE = -I include
- #OPT_FLAGS=-g
 -OPT_FLAGS=-O -s -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 +OPT_FLAGS=-O2 -g -s -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  
- core :
- 	gcc $(OPT_FLAGS) -fPIC -c $(JDK_INCLUDE) $(COMMON_INCLUDE) -o $(CORE.O) $(CORE.C)
+ core:
+ 	gcc $(OPT_FLAGS) -fPIC -c $(JDK_INCLUDE) -o $(CORE.O) $(CORE.C)
diff --git a/patches/donotstorebuildlogsinfiles.patch b/patches/donotstorebuildlogsinfiles.patch
index e31784f..d1cdd71 100644
--- a/patches/donotstorebuildlogsinfiles.patch
+++ b/patches/donotstorebuildlogsinfiles.patch
@@ -1,7 +1,6 @@
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
---- debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml	2009-04-28 18:53:02.000000000 +0200
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml	2009-08-26 23:13:02.158691612 +0200
-@@ -63,7 +63,7 @@
+--- a/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
++++ b/plugins/org.eclipse.jdt.core/scripts/ikvm_script.xml
+@@ -64,7 +64,7 @@
  	</target>
  
  	<target name="ecj">
@@ -10,10 +9,9 @@ diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclip
  			<arg line="-out:ecj.exe -main:org.eclipse.jdt.internal.compiler.batch.Main -recurse:./*.class -recurse:./*.properties -recurse:./*.rsc"/>
  		</exec>
  		<copy file="${ikvm_home}/bin/IKVM.Runtime.dll" todir="${dest}" />
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
---- debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml	2007-11-29 15:16:54.000000000 +0100
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml	2009-08-26 23:13:03.342691628 +0200
-@@ -74,7 +74,7 @@
+--- a/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
++++ b/plugins/org.eclipse.jdt.doc.isv/buildDoc.xml
+@@ -65,7 +65,7 @@
  		<delete dir="reference/api"/>
  		<mkdir dir="reference/api"/>
  
@@ -21,8 +19,8 @@ diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclip
 +		<exec dir="." executable="${javadoc}" >
  			<arg line="@${basedir}/${optionsFile} -J-Xmx500M" />
  		</exec>
- 		<antcall target="generateJdtAptJavadoc" />
-@@ -100,7 +100,7 @@
+ 		
+@@ -98,7 +98,7 @@
  		<delete dir="reference/apt" />
  		<mkdir dir="reference/apt" />
  
@@ -30,11 +28,10 @@ diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclip
 +		<exec dir="." executable="${javadoc15}" >
  			<arg line="@${basedir}/${jdtaptoptionsFile} -J-Xmx500M" />
  		</exec>
- 	</target>
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.pde.doc.user/buildDoc.xml debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.pde.doc.user/buildDoc.xml
---- debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.pde.doc.user/buildDoc.xml	2009-06-05 16:48:40.000000000 +0200
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.pde.doc.user/buildDoc.xml	2009-08-26 23:13:02.194691701 +0200
-@@ -63,7 +63,7 @@
+ 		
+--- a/plugins/org.eclipse.pde.doc.user/buildDoc.xml
++++ b/plugins/org.eclipse.pde.doc.user/buildDoc.xml
+@@ -65,7 +65,7 @@
  		<delete dir="reference/api"/>
  		<mkdir dir="reference/api"/>
  
@@ -42,16 +39,26 @@ diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclip
 +		<exec dir="." executable="${javadoc}" >
  			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
  		</exec>
- 	</target>
-diff -pruN debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.platform.doc.isv/buildDoc.xml debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
---- debian.git/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.platform.doc.isv/buildDoc.xml	2009-01-26 18:12:18.000000000 +0100
-+++ debian.git.new/build/eclipse-I20090611-1540-fetched-src/plugins/org.eclipse.platform.doc.isv/buildDoc.xml	2009-08-26 23:13:02.698691170 +0200
-@@ -118,7 +118,7 @@
+ 		
+--- a/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
++++ b/plugins/org.eclipse.platform.doc.isv/buildDoc.xml
+@@ -119,7 +119,7 @@
  		<delete dir="reference/api"/>
  		<mkdir dir="reference/api"/>
  
--		<exec dir="." executable="${javadoc}" output="doc.bin.log">
-+		<exec dir="." executable="${javadoc}" >
+-		<exec dir="." executable="${javadoc15}" output="doc.bin.log">
++		<exec dir="." executable="${javadoc15}" >
  			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
  		</exec>
  		
+--- a/plugins/org.eclipse.swt/tasks/build.xml	2010-08-06 19:35:21.199817105 +0200
++++ b/plugins/org.eclipse.swt/tasks/build.xml	2010-08-06 19:36:32.704372712 +0200
+@@ -1121,7 +1121,7 @@
+ 				<argument value="${tasks}"/>
+ 			</commandline>
+ 		</cvs>
+-		<ant antfile="${tasks}/build.xml" output="${logdir}/${build_version}/${fragment}.log" dir="${tmpdir}" target="build_fragment">
++		<ant antfile="${tasks}/build.xml" dir="${tmpdir}" target="build_fragment">
+ 			<property name="cp" value="${cp}"/>
+ 			<property name="fragment" value="${fragment}"/>
+ 			<property name="build_target" value="${build_target}"/>
diff --git a/patches/droppluginversions.patch b/patches/droppluginversions.patch
deleted file mode 100644
index 66f5128..0000000
--- a/patches/droppluginversions.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- pluginVersions.properties.sav	2010-03-18 13:10:05.000000000 +0200
-+++ pluginVersions.properties	2010-03-18 13:14:44.477528467 +0200
-@@ -27,7 +27,7 @@ org.eclipse.equinox.simpleconfigurator.m
- org.eclipse.pde.api.tools.ui,0.0.0=v20090820
- org.eclipse.jdt.debug,0.0.0=v20090526
- org.eclipse.sdk.examples,0.0.0=v20080612
--org.eclipse.pde,0.0.0=v20090527
-+org.eclipse.pde,0.0.0=v201002111343
- org.eclipse.compare.core,0.0.0=I20090430-0408
- org.eclipse.equinox.p2.engine,0.0.0=R35x_v20091117
- org.eclipse.equinox.launcher.motif.hpux.ia64_32,0.0.0=v20090519
-@@ -38,7 +38,7 @@ org.eclipse.equinox.p2.ui.admin,0.0.0=v2
- org.eclipse.equinox.transforms.xslt,0.0.0=R35x_v20100209
- org.eclipse.jface.databinding,0.0.0=M20090826-0800
- org.eclipse.equinox.p2.touchpoint.eclipse,0.0.0=R35x_20090820-1821
--org.eclipse.help.base,0.0.0=v20090526
-+org.eclipse.help.base,0.0.0=v201002111343
- org.eclipse.ui.presentations.r21,0.0.0=M20091015-0930
- org.eclipse.equinox.frameworkadmin,0.0.0=v20090520-1905
- org.eclipse.ui.intro,0.0.0=v20100111_35x
-@@ -76,7 +76,7 @@ org.eclipse.team.ui,0.0.0=I20090430-0408
- org.eclipse.equinox.p2.metadata,0.0.0=R35x_v20100112
- org.eclipse.swt.cocoa.macosx.x86_64,0.0.0=v3557f
- org.eclipse.jdt.compiler.tool,0.0.0=v_981_R35x
--org.eclipse.platform,0.0.0=R35x_v20100121
-+org.eclipse.platform,0.0.0=v201002111343
- org.eclipse.core.databinding.observable,0.0.0=M20090902-0800
- org.eclipse.team.examples.filesystem,0.0.0=I20090210-0800
- org.eclipse.pde.core,0.0.0=v20100104
-@@ -191,7 +191,7 @@ org.eclipse.pde.api.tools.ee.javase16,0.
- org.eclipse.compare.win32,0.0.0=I20090430-0408
- org.eclipse.equinox.p2.installer,0.0.0=R35x_v20090717
- org.eclipse.debug.examples.core,0.0.0=v20090504
--org.eclipse.rcp,0.0.0=R35x_v20100119
-+org.eclipse.rcp,0.0.0=v201002111343
- org.eclipse.pde.ds.core,0.0.0=v20100118
- org.eclipse.equinox.registry,0.0.0=v20090520-1800
- org.eclipse.ui.examples.readmetool,0.0.0=I20090526-2000
-@@ -233,7 +233,7 @@ org.eclipse.update.configurator,0.0.0=v2
- org.eclipse.core.filesystem.win32.x86,0.0.0=v20080604-1400
- org.eclipse.equinox.p2.core,0.0.0=R35x_v20090819
- org.eclipse.swt.examples,0.0.0=v3557f
--org.eclipse.cvs,0.0.0=R35x_v20100119
-+org.eclipse.cvs,0.0.0=v201002111343
- org.eclipse.swt.gtk.linux.x86,0.0.0=v3557f
- org.eclipse.equinox.log,0.0.0=v20090520-1800
- org.eclipse.equinox.jmx.client,0.0.0=v20070515
-@@ -250,7 +250,7 @@ org.eclipse.platform.doc.user,0.0.0=r352
- org.eclipse.equinox.security.macosx,0.0.0=v20090520-1800
- org.eclipse.equinox.supplement,0.0.0=v20090518
- org.eclipse.team.cvs.ssh,0.0.0=I20090508-2000
--org.eclipse.sdk,0.0.0=R35x_v20100204
-+org.eclipse.sdk,0.0.0=v201002111343
- org.eclipse.jsch.ui,0.0.0=r35x_20100210-1114
- org.eclipse.core.filesystem.win32.x86_64,0.0.0=v20090316-0910
- org.eclipse.equinox.security.win32.x86,0.0.0=v20090520-1800
-@@ -289,7 +289,7 @@ org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.ui.editors,0.0.0=v20090527-2000
- org.eclipse.core.filebuffers,0.0.0=v20090526-2000
- org.eclipse.equinox.ip,0.0.0=R35x_v20090803
--org.eclipse.jdt,0.0.0=r352_v20100106-0800
-+org.eclipse.jdt,0.0.0=v201002111343
- org.eclipse.ecf,0.0.0=v20090831-1906
- org.eclipse.ecf.filetransfer,0.0.0=v20090831-1906
- org.eclipse.ecf.identity,0.0.0=v20090831-1906
diff --git a/patches/eclipse-add-archs-executable.patch b/patches/eclipse-add-archs-executable.patch
index 1238a52..10b2c99 100644
--- a/patches/eclipse-add-archs-executable.patch
+++ b/patches/eclipse-add-archs-executable.patch
@@ -1,18 +1,9 @@
-### Eclipse Workspace Patch 1.0
-#P org.eclipse.equinox.executable
-Index: target.build.properties
-===================================================================
-RCS file: /cvsroot/rt/org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable/target.build.properties,v
-retrieving revision 1.16
-diff -u -r1.16 target.build.properties
---- target.build.properties	7 May 2009 15:02:06 -0000	1.16
-+++ target.build.properties	11 Feb 2010 21:05:52 -0000
-@@ -19,12 +19,48 @@
- root.win32.win32.ia64=file:contributed/win32/win32/ia64/launcher.exe
- root.win32.wpf.x86=file:bin/wpf/win32/x86/launcher.exe
+--- a/features/org.eclipse.equinox.executable/target.build.properties
++++ b/features/org.eclipse.equinox.executable/target.build.properties
+@@ -22,10 +22,47 @@
+ root.linux.gtk.x86=bin/gtk/linux/x86,gtk_root
+ root.linux.gtk.x86.permissions.755=libcairo-swt.so
  
--root.linux.gtk.x86=bin/gtk/linux/x86,gtk_root
--root.linux.gtk.x86.permissions.755=libcairo-swt.so
 +root.linux.gtk.alpha=bin/gtk/linux/alpha,gtk_root
 +root.linux.gtk.alpha.permissions.755=libcairo-swt.so
 +
@@ -30,11 +21,11 @@ diff -u -r1.16 target.build.properties
 +
 +root.linux.gtk.PA_RISC=bin/gtk/linux/PA_RISC,gtk_root
 +root.linux.gtk.PA_RISC.permissions.755=libcairo-swt.so
- 
++
  root.linux.gtk.ppc=bin/gtk/linux/ppc,gtk_root
  root.linux.gtk.ppc.permissions.755=libcairo-swt.so
  
-+root.linux.gtk.ppc64=bin/gtk/linux/ppc64,gtk_root
+ root.linux.gtk.ppc64=bin/gtk/linux/ppc64,gtk_root
 +root.linux.gtk.ppc64.permissions.755=libcairo-swt.so
 +
 +root.linux.gtk.s390=bin/gtk/linux/s390,gtk_root
@@ -54,24 +45,11 @@ diff -u -r1.16 target.build.properties
 +
 +root.linux.gtk.x86_64=bin/gtk/linux/x86_64,gtk_root
 +root.linux.gtk.x86_64.permissions.755=libcairo-swt.so
-+
+ 
  root.macosx.carbon.ppc=bin/carbon/macosx/ppc
  root.macosx.carbon.ppc.permissions.755=${launcherName}.app/Contents/MacOS/${launcherName}
- 
-@@ -55,4 +91,4 @@
- root.qnx.photon.x86=bin/photon/qnx/x86
- 
- root.linux.motif.x86=bin/motif/linux/x86,motif_root
--root.linux.motif.x86.permissions.755=libXm.so.2,libcairo-swt.so
-\ No newline at end of file
-+root.linux.motif.x86.permissions.755=libXm.so.2,libcairo-swt.so
-Index: feature.xml
-===================================================================
-RCS file: /cvsroot/rt/org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable/feature.xml,v
-retrieving revision 1.15.2.1
-diff -u -r1.15.2.1 feature.xml
---- feature.xml	29 Sep 2009 20:06:31 -0000	1.15.2.1
-+++ feature.xml	11 Feb 2010 21:05:52 -0000
+--- a/features/org.eclipse.equinox.executable/feature.xml
++++ b/features/org.eclipse.equinox.executable/feature.xml
 @@ -88,6 +88,66 @@
           version="0.0.0"
           fragment="true"/>
@@ -194,9 +172,9 @@ diff -u -r1.15.2.1 feature.xml
 +         fragment="true"/>
 +
     <plugin
-          id="org.eclipse.equinox.launcher.gtk.linux.x86"
+          id="org.eclipse.equinox.launcher.gtk.linux.ppc64"
           os="linux"
-@@ -198,24 +308,4 @@
+@@ -208,25 +318,4 @@
           version="0.0.0"
           fragment="true"/>
  
@@ -220,4 +198,5 @@ diff -u -r1.15.2.1 feature.xml
 -         version="0.0.0"
 -         fragment="true"/>
 -
+-
  </feature>
diff --git a/patches/eclipse-add-archs-filesystem.patch b/patches/eclipse-add-archs-filesystem.patch
index 5c831f9..bdc4708 100644
--- a/patches/eclipse-add-archs-filesystem.patch
+++ b/patches/eclipse-add-archs-filesystem.patch
@@ -1,8 +1,8 @@
---- ./features/org.eclipse.platform/feature.xml.orig	2009-10-29 20:07:20.000000000 +0100
-+++ ./features/org.eclipse.platform/feature.xml	2009-10-29 20:16:08.000000000 +0100
-@@ -432,6 +432,66 @@
+--- a/features/org.eclipse.platform/feature.xml
++++ b/features/org.eclipse.platform/feature.xml
+@@ -441,6 +441,66 @@
           unpack="false"/>
- 
+  
     <plugin
 +         id="org.eclipse.core.filesystem.linux.alpha"
 +         os="linux"
@@ -67,7 +67,7 @@
           id="org.eclipse.core.filesystem.linux.ppc"
           os="linux"
           arch="ppc"
-@@ -440,6 +500,56 @@
+@@ -449,6 +509,56 @@
           version="0.0.0"
           fragment="true"
           unpack="false"/>
diff --git a/patches/eclipse-add-archs-swt.patch b/patches/eclipse-add-archs-swt.patch
index 315f614..93f3afb 100644
--- a/patches/eclipse-add-archs-swt.patch
+++ b/patches/eclipse-add-archs-swt.patch
@@ -1,6 +1,6 @@
---- ./features/org.eclipse.rcp/feature.xml.orig	2009-10-25 09:34:48.000000000 +0100
-+++ ./features/org.eclipse.rcp/feature.xml	2009-10-29 20:13:44.000000000 +0100
-@@ -217,10 +217,87 @@
+--- a/features/org.eclipse.rcp/feature.xml
++++ b/features/org.eclipse.rcp/feature.xml
+@@ -205,10 +205,87 @@
           unpack="false"/>
  
     <plugin
@@ -90,7 +90,7 @@
           download-size="0"
           install-size="0"
           version="0.0.0"
-@@ -250,8 +327,8 @@
+@@ -238,8 +315,8 @@
           unpack="false"/>
  
     <plugin
@@ -101,7 +101,7 @@
           ws="gtk"
           arch="sparc"
           download-size="0"
-@@ -259,12 +336,12 @@
+@@ -247,12 +324,12 @@
           version="0.0.0"
           fragment="true"
           unpack="false"/>
@@ -118,7 +118,7 @@
           download-size="0"
           install-size="0"
           version="0.0.0"
-@@ -272,10 +349,10 @@
+@@ -260,10 +337,10 @@
           unpack="false"/>
  
     <plugin
@@ -131,7 +131,7 @@
           download-size="0"
           install-size="0"
           version="0.0.0"
-@@ -294,6 +371,28 @@
+@@ -293,6 +370,28 @@
           unpack="false"/>
  
     <plugin
diff --git a/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch b/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch
index 9ffd6b0..9da34b5 100644
--- a/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch
+++ b/patches/eclipse-add-ppc64-sparc64-s390-s390x.patch
@@ -1,5 +1,5 @@
---- ./plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java.orig	2009-10-25 09:34:49.000000000 +0100
-+++ ./plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java	2009-10-29 20:24:58.000000000 +0100
+--- a/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
++++ b/plugins/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/InternalPlatform.java
 @@ -48,6 +48,14 @@
  			Platform.ARCH_X86, //
  			Platform.ARCH_AMD64, // 
@@ -15,8 +15,8 @@
  			Platform.ARCH_IA64_32};
  
  	// debug support:  set in loadOptions()
---- ./plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java.orig	2009-10-25 09:34:49.000000000 +0100
-+++ ./plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java	2009-10-29 20:25:41.000000000 +0100
+--- a/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
++++ b/plugins/org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java
 @@ -349,6 +349,15 @@
  	 * @since 3.1
  	 */
@@ -33,9 +33,9 @@
  
  	/**
  	 * Constant string (value "win32") indicating the platform is running on a
---- ./plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java.orig	2009-10-25 09:34:54.000000000 +0100
-+++ ./plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java	2009-10-29 20:23:01.000000000 +0100
-@@ -64,7 +64,7 @@
+--- a/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java
++++ b/plugins/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/internal/adaptor/PluginConverterImpl.java
+@@ -63,7 +63,7 @@
  	private static final String MANIFEST_VERSION = "Manifest-Version"; //$NON-NLS-1$
  	private static final String PLUGIN_PROPERTIES_FILENAME = "plugin"; //$NON-NLS-1$
  	private static PluginConverterImpl instance;
@@ -44,13 +44,12 @@
  	static public final String FRAGMENT_MANIFEST = "fragment.xml"; //$NON-NLS-1$
  	static public final String GENERATED_FROM = "Generated-from"; //$NON-NLS-1$
  	static public final String MANIFEST_TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
---- ./plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java.orig	2009-10-25 09:34:54.000000000 +0100
-+++ ./plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java	2009-10-29 20:24:10.000000000 +0100
-@@ -153,6 +153,15 @@
+--- a/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java
++++ b/plugins/org.eclipse.osgi/supplement/src/org/eclipse/osgi/service/environment/Constants.java
+@@ -160,6 +160,14 @@
  	 */
  	public static final String ARCH_IA64_32 = "ia64_32";//$NON-NLS-1$
  
-+	public static final String ARCH_PPC64 = "ppc64";//$NON-NLS-1$
 +	public static final String ARCH_SPARC64 = "sparc64";//$NON-NLS-1$
 +	public static final String ARCH_S390 = "s390";//$NON-NLS-1$
 +	public static final String ARCH_S390X = "s390x";//$NON-NLS-1$
diff --git a/patches/eclipse-addArchesAnd64bitSWT.patch b/patches/eclipse-addArchesAnd64bitSWT.patch
index a740c25..f9506b9 100644
--- a/patches/eclipse-addArchesAnd64bitSWT.patch
+++ b/patches/eclipse-addArchesAnd64bitSWT.patch
@@ -1,13 +1,6 @@
---- ./plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh~	2009-10-25 09:34:55.000000000 +0100
-+++ ./plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	2009-10-29 20:40:31.000000000 +0100
-@@ -55,11 +55,24 @@
- if [ "${MODEL}" = "" ]; then
- 	if uname -i > /dev/null 2>&1; then
- 		MODEL=`uname -i`
--	else
-+	fi
-+	if [ "${MODEL}" = "unknown" ]; then
- 		MODEL=`uname -m`
+--- a/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh.orig	2009-12-08 09:00:12.000000000 +0200
++++ b/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	2010-04-13 17:24:11.418047380 +0300
+@@ -73,6 +73,18 @@ if [ "${MODEL}" = "" ]; then
  	fi
  fi
  case $MODEL in
@@ -26,13 +19,4 @@
  	"x86_64")
  		SWT_ARCH=x86_64
  		AWT_ARCH=amd64
-@@ -75,7 +86,7 @@
- esac
- 
- # For 64-bit CPUs, we have a switch
--if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' ]; then
-+if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'alpha' ]; then
- 	SWT_PTR_CFLAGS=-DJNI64
- 	export SWT_PTR_CFLAGS
- 	if [ -d /lib64 ]; then
 
diff --git a/patches/eclipse-buildswtnatives.patch b/patches/eclipse-buildswtnatives.patch
index 3ad13f0..19a4fdf 100644
--- a/patches/eclipse-buildswtnatives.patch
+++ b/patches/eclipse-buildswtnatives.patch
@@ -1,8 +1,8 @@
---- ./plugins/org.eclipse.swt.gtk.linux.ppc/build.xml.orig	2009-03-24 18:54:28.000000000 +0100
-+++ ./plugins/org.eclipse.swt.gtk.linux.ppc/build.xml	2009-03-25 10:06:41.000000000 +0100
-@@ -139,6 +139,29 @@
- 		<jar jarfile="${build.result.folder}/${jar.filename}" basedir="${temp.folder}/@dot.bin" />
- 		<delete dir="${temp.folder}/@dot.bin" />
+--- a/plugins/org.eclipse.swt/buildFragment.xml
++++ b/plugins/org.eclipse.swt/buildFragment.xml
+@@ -560,4 +560,28 @@
+ 			extraManifests="${extraManifests}"
+ 			extraSourceLocations="${extraSourceLocations}"/>
  	</target>
 +	
 +	<target name="build.cfiles" depends="init">
@@ -17,6 +17,7 @@
 +			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library"/>
 +			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library"/>
 +			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library"/>
++			<fileset dir="${plugindir}/Eclipse SWT WebKit/gtk/library"/>
 +		</copy>
 +	</target>
 +
@@ -27,78 +28,4 @@
 +			<arg line="install"/>
 +		</exec>
 +	</target>
- 
- 	<target name="build.jars" depends="init">
- 		<available property="@dot" file="${build.result.folder}/@dot" />
---- ./plugins/org.eclipse.swt.gtk.linux.s390x/build.xml.orig	2009-03-24 18:54:29.000000000 +0100
-+++ ./plugins/org.eclipse.swt.gtk.linux.s390x/build.xml	2009-03-25 10:08:51.000000000 +0100
-@@ -276,6 +276,11 @@
- 	</target>
- 
- 	<target name="build.cfiles" depends="build.jars">
-+		<!-- delete swttools.jar so that it will be compiled in the build.jars target -->
-+		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="clean"/>
-+		<!--compile swtools.jar in org.eclipse.swt.tools-->
-+		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="build.jars" />
-+
- 		<!-- generate the C code from the (64 bit) SWT PI java classes -->
- 		<!-- assumes the swt.jar has already been built  -->
- 		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar">
-@@ -330,6 +335,7 @@
- 			<fileset dir="${basedir}/src/Eclipse SWT Mozilla/common/library" />
- 			<fileset dir="${basedir}/src/Eclipse SWT OpenGL/glx/library" />
- 			<fileset dir="${basedir}/src/Eclipse SWT PI/cairo/library" />
-+			<fileset dir="${basedir}/src/Eclipse SWT PI/common/library"/>
- 			<fileset dir="${basedir}/src/Eclipse SWT PI/gtk/library" />
- 			<fileset dir="${basedir}/src/Eclipse SWT Program/cde/library" />
- 			<fileset dir="${basedir}/src/Eclipse SWT Program/gnome/library" />
---- ./plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml.orig	2009-03-24 18:54:29.000000000 +0100
-+++ ./plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml	2009-03-25 10:11:05.000000000 +0100
-@@ -175,6 +175,29 @@
- 		<replace dir="${plugindir}" includes="**/*.java" token="long /*int*/" value="int /*long*/" />
- 		<antcall target="refresh" />
- 	</target>
-+	
-+	<target name="build.cfiles" depends="init">
-+		<mkdir dir="${build.result.folder}/library"/>
-+		<copy todir="${build.result.folder}/library">
-+			<fileset dir="${plugindir}/Eclipse SWT/common/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT AWT/gtk/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT PI/common/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library"/>
-+			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library"/>
-+		</copy>
-+	</target>
-+
-+	<target name="build.nativeLibraries" depends="build.cfiles">
-+		<exec dir="${build.result.folder}/library" executable="sh">
-+			<env key="OUTPUT_DIR" value="${build.result.folder}"/>
-+			<arg line="${build.result.folder}/library/build.sh"/>
-+			<arg line="install"/>
-+		</exec>
-+	</target>
- 
- 	<target name="src.zip" depends="init" unless="src.zip">
- 		<mkdir dir="${build.result.folder}/" />
---- ./plugins/org.eclipse.swt.gtk.linux.x86/build.xml.orig	2009-03-24 18:54:28.000000000 +0100
-+++ ./plugins/org.eclipse.swt.gtk.linux.x86/build.xml	2009-03-25 10:13:29.000000000 +0100
-@@ -153,13 +153,14 @@
- 			<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/library" />
- 			<fileset dir="${plugindir}/Eclipse SWT OpenGL/glx/library" />
- 			<fileset dir="${plugindir}/Eclipse SWT PI/cairo/library" />
-+			<fileset dir="${plugindir}/Eclipse SWT PI/common/library"/>
- 			<fileset dir="${plugindir}/Eclipse SWT PI/gtk/library" />
- 			<fileset dir="${plugindir}/Eclipse SWT Program/cde/library" />
- 			<fileset dir="${plugindir}/Eclipse SWT Program/gnome/library" />
- 		</copy>
- 	</target>
- 
--	<target name="build.jnilibs" depends="build.cfiles">
-+	<target name="build.nativeLibraries" depends="build.cfiles">
- 		<exec dir="${build.result.folder}/library" executable="sh">
- 			<env key="OUTPUT_DIR" value="${build.result.folder}" />
- 			<arg line="${build.result.folder}/library/build.sh" />
+ </project>
diff --git a/patches/eclipse-no-jetty5.patch b/patches/eclipse-no-jetty5.patch
index 3957512..8ecc402 100644
--- a/patches/eclipse-no-jetty5.patch
+++ b/patches/eclipse-no-jetty5.patch
@@ -1,5 +1,3 @@
-diff --git a/eclipse/features/master-equinox/feature.xml b/eclipse/features/master-equinox/feature.xml
-index ff7ccf1..d89663d 100644
 --- a/features/master-equinox/feature.xml
 +++ b/features/master-equinox/feature.xml
 @@ -39,14 +39,14 @@
@@ -19,8 +17,6 @@ index ff7ccf1..d89663d 100644
      <plugin
           id="org.eclipse.equinox.http.jetty"
           download-size="0"
-diff --git a/eclipse/features/master-jetty/feature.xml b/eclipse/features/master-jetty/feature.xml
-index a23c475..d33099e 100644
 --- a/features/master-jetty/feature.xml
 +++ b/features/master-jetty/feature.xml
 @@ -17,14 +17,14 @@
diff --git a/patches/eclipse-nosourcebundlesfordependencies.patch b/patches/eclipse-nosourcebundlesfordependencies.patch
index 4a79c0c..eb31625 100644
--- a/patches/eclipse-nosourcebundlesfordependencies.patch
+++ b/patches/eclipse-nosourcebundlesfordependencies.patch
@@ -1,16 +1,15 @@
-diff -up ./features/org.eclipse.platform/sourceTemplateFeature/build.properties.nosourcebundlesfordependencies ./features/org.eclipse.platform/sourceTemplateFeature/build.properties
---- ./features/org.eclipse.platform/sourceTemplateFeature/build.properties.nosourcebundlesfordependencies	2010-02-26 13:45:43.000000000 -0500
-+++ ./features/org.eclipse.platform/sourceTemplateFeature/build.properties	2010-02-26 13:46:34.000000000 -0500
-@@ -15,7 +15,7 @@ feature.xml,\
+--- a/features/org.eclipse.platform/sourceTemplateFeature/build.properties
++++ b/features/org.eclipse.platform/sourceTemplateFeature/build.properties
+@@ -15,7 +15,7 @@
  feature.properties,\
  license.html
  
--generate.feature at org.eclipse.rcp.source=org.eclipse.rcp,plugin at com.ibm.icu.source;version=4.0.1.qualifier;unpack="false"
+-generate.feature at org.eclipse.rcp.source=org.eclipse.rcp,plugin at com.ibm.icu.source;version=4.2.1.qualifier;unpack="false"
 +generate.feature at org.eclipse.rcp.source=org.eclipse.rcp
  generate.feature at org.eclipse.equinox.p2.user.ui.source=org.eclipse.equinox.p2.user.ui,\
  	   plugin at org.eclipse.ecf.source;version=3.0.0.qualifier;unpack="false",\
  	   plugin at org.eclipse.ecf.ssl.source;version=1.0.0.qualifier;unpack="false",\
-@@ -24,9 +24,7 @@ generate.feature at org.eclipse.equinox.p2.
+@@ -24,9 +24,7 @@
  	   plugin at org.eclipse.ecf.provider.filetransfer.source;version=3.0.0.qualifier;unpack="false",\
  	   plugin at org.eclipse.ecf.provider.filetransfer.ssl.source;version=1.0.0.qualifier;unpack="false",\
  	   plugin at org.eclipse.ecf.provider.filetransfer.httpclient.source;version=3.0.0.qualifier;unpack="false",\
@@ -21,17 +20,9 @@ diff -up ./features/org.eclipse.platform/sourceTemplateFeature/build.properties.
     
  
  
-@@ -35,4 +33,4 @@ generate.feature at org.eclipse.equinox.p2.
- 
- 
- 
--   
-\ No newline at end of file
-+   
-diff -up ./features/org.eclipse.sdk/build.properties.nosourcebundlesfordependencies ./features/org.eclipse.sdk/build.properties
---- ./features/org.eclipse.sdk/build.properties.nosourcebundlesfordependencies	2010-02-26 13:45:53.000000000 -0500
-+++ ./features/org.eclipse.sdk/build.properties	2010-02-26 13:47:39.000000000 -0500
-@@ -11,26 +11,14 @@
+--- a/features/org.eclipse.sdk/build.properties
++++ b/features/org.eclipse.sdk/build.properties
+@@ -11,27 +11,14 @@
  bin.includes=epl-v10.html,eclipse_update_120.jpg,feature.xml,feature.properties,license.html
  
  generate.feature at org.eclipse.platform.source=org.eclipse.platform,feature at org.eclipse.rcp.source,feature at org.eclipse.equinox.p2.user.ui.source;optional="true",plugin at org.eclipse.platform.doc.isv;unpack="false",\
@@ -41,9 +32,10 @@ diff -up ./features/org.eclipse.sdk/build.properties.nosourcebundlesfordependenc
     
  generate.feature at org.eclipse.jdt.source=org.eclipse.jdt, plugin at org.eclipse.jdt.doc.isv;unpack="false",\
 -plugin at org.junit.source;version=3.8.2.qualifier;unpack="false",\
+-plugin at org.junit.source;version=4.8.1.qualifier;unpack="false",\
 -plugin at org.hamcrest.core.source;version=1.1.0.qualifier;unpack="false",\
 -exclude at org.eclipse.jdt.doc.user
--generate.feature at org.eclipse.pde.source=org.eclipse.pde,plugin at org.objectweb.asm.source;version=3.1.0.qualifier;unpack="false",\exclude at org.eclipse.pde.doc.user
+-generate.feature at org.eclipse.pde.source=org.eclipse.pde,plugin at org.objectweb.asm.source;version=3.2.0.qualifier;unpack="false",\exclude at org.eclipse.pde.doc.user
 +exclude at org.eclipse.jdt.doc.user,\
 +exclude at org.junit4
 +generate.feature at org.eclipse.pde.source=org.eclipse.pde,exclude at org.eclipse.pde.doc.user
@@ -57,10 +49,9 @@ diff -up ./features/org.eclipse.sdk/build.properties.nosourcebundlesfordependenc
 -  plugin at org.apache.commons.logging.source;version=1.0.4.qualifier;unpack="false",\
 -  plugin at org.apache.lucene.source;version=1.9.1.qualifier;unpack="false",\
 -  plugin at org.apache.lucene.analysis.source;version=1.9.1.qualifier;unpack="false",\
--  plugin at org.mortbay.jetty.util.source;version=6.1.15.qualifier;unpack="false",\
--  plugin at org.mortbay.jetty.server.source;version=6.1.15.qualifier;unpack="false"
+-  plugin at org.mortbay.jetty.util.source;version=6.1.23.qualifier;unpack="false",\
+-  plugin at org.mortbay.jetty.server.source;version=6.1.23.qualifier;unpack="false"
 +generate.feature at org.eclipse.help.source=org.eclipse.help
  
--generatedVersionLength=45
+ generatedVersionLength=45
 \ No newline at end of file
-+generatedVersionLength=45
diff --git a/patches/eclipse-pde.build-add-package-build.patch b/patches/eclipse-pde.build-add-package-build.patch
index 9565aa9..b374ccc 100644
--- a/patches/eclipse-pde.build-add-package-build.patch
+++ b/patches/eclipse-pde.build-add-package-build.patch
@@ -1,11 +1,7 @@
 ### Eclipse Workspace Patch 1.0
 #P org.eclipse.pde.build
-Index: templates/package-build/prepare-build-dir.sh
-===================================================================
-RCS file: templates/package-build/prepare-build-dir.sh
-diff -N templates/package-build/prepare-build-dir.sh
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ templates/package-build/prepare-build-dir.sh	1 Jan 1970 00:00:00 -0000
+--- /dev/null
++++ b/plugins/org.eclipse.pde.build/templates/package-build/prepare-build-dir.sh
 @@ -0,0 +1,105 @@
 +#!/bin/sh
 +
@@ -66,7 +62,7 @@ diff -N templates/package-build/prepare-build-dir.sh
 +    fi
 +
 +    if [ "x$ERROR" != "xyes" ]; then
-+      if [ $TESTING != true ] || echo $PROJECTNAME | grep "org.eclipse" >/dev/null 2>&1 ; then
++      if [ $TESTING != true ] || `echo "$PROJECTNAME" | grep "org.eclipse"`; then
 +        echo "  making symlink: $BUILDDIR/features/$PROJECTNAME -> $PROJECTDIR"
 +        ln -sfT "$PROJECTDIR" $BUILDDIR/features/"$PROJECTNAME"
 +      fi
@@ -100,7 +96,7 @@ diff -N templates/package-build/prepare-build-dir.sh
 +    fi
 +
 +    if [ "x$ERROR" != "xyes" ]; then
-+      if [ $TESTING != true ] || echo $PROJECTNAME | grep "org.eclipse" >/dev/null 2>&1 ; then
++      if [ $TESTING != true ] || `echo "$PROJECTNAME" | grep "org.eclipse"`; then
 +        echo "  making symlink: $BUILDDIR/plugins/$PROJECTNAME -> $dir"
 +        ln -sfT "$dir" $BUILDDIR/plugins/"$PROJECTNAME"
 +      fi
@@ -112,12 +108,8 @@ diff -N templates/package-build/prepare-build-dir.sh
 +
 +rm -rf $BUILDDIR/tmp
 +echo done
-Index: templates/package-build/customTargets-assemble-target.xml
-===================================================================
-RCS file: templates/package-build/customTargets-assemble-target.xml
-diff -N templates/package-build/customTargets-assemble-target.xml
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ templates/package-build/customTargets-assemble-target.xml	1 Jan 1970 00:00:00 -0000
+--- /dev/null
++++ b/plugins/org.eclipse.pde.build/templates/package-build/customTargets-assemble-target.xml
 @@ -0,0 +1,15 @@
 +<project>
 +	<!-- ===================================================================== -->
@@ -134,12 +126,8 @@ diff -N templates/package-build/customTargets-assemble-target.xml
 +		<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
 +	</target>
 +</project>
-Index: templates/package-build/customTargets.xml
-===================================================================
-RCS file: templates/package-build/customTargets.xml
-diff -N templates/package-build/customTargets.xml
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ templates/package-build/customTargets.xml	1 Jan 1970 00:00:00 -0000
+--- /dev/null
++++ b/plugins/org.eclipse.pde.build/templates/package-build/customTargets.xml
 @@ -0,0 +1,154 @@
 +<project name="Build specific targets and properties" default="noDefault">
 +
@@ -295,12 +283,8 @@ diff -N templates/package-build/customTargets.xml
 +	</target>
 +
 +</project>
-Index: templates/package-build/build.properties
-===================================================================
-RCS file: templates/package-build/build.properties
-diff -N templates/package-build/build.properties
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ templates/package-build/build.properties	1 Jan 1970 00:00:00 -0000
+--- /dev/null
++++ b/plugins/org.eclipse.pde.build/templates/package-build/build.properties
 @@ -0,0 +1,12 @@
 +buildDirectory=${sourceDirectory}/build
 +buildLabel=rpmBuild
diff --git a/patches/eclipse-removeSkipMapsCheck.patch b/patches/eclipse-removeSkipMapsCheck.patch
new file mode 100644
index 0000000..c715481
--- /dev/null
+++ b/patches/eclipse-removeSkipMapsCheck.patch
@@ -0,0 +1,16 @@
+Index: eclipse/buildConfigs/master/customTargets.xml
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/master/customTargets.xml,v
+retrieving revision 1.49.4.1
+diff -u -p -r1.49.4.1 customTargets.xml
+--- eclipse/buildConfigs/master/customTargets.xml	28 Jun 2010 19:37:08 -0000	1.49.4.1
++++ eclipse/buildConfigs/master/customTargets.xml	30 Sep 2010 21:09:23 -0000
+@@ -34,7 +34,7 @@
+ 	<!-- Replace values for mapsCheckoutTag as desired. -->
+ 	<!-- ===================================================================== -->
+ 
+-	<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
++	<target name="getMapFiles" depends="checkLocalMaps">
+ 		<property name="mapsCheckoutTag" value="${mapVersionTag}" />
+ 		<cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+ 	</target>
diff --git a/patches/eclipse-swt-buildagainstxulrunner.patch b/patches/eclipse-swt-buildagainstxulrunner.patch
index 64e2f19..b519883 100644
--- a/patches/eclipse-swt-buildagainstxulrunner.patch
+++ b/patches/eclipse-swt-buildagainstxulrunner.patch
@@ -5,9 +5,9 @@ Index: Eclipse SWT PI/gtk/library/build.sh
 RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh,v
 retrieving revision 1.54
 diff -u -r1.54 build.sh
---- Eclipse SWT PI/gtk/library/build.sh	29 May 2009 21:30:14 -0000	1.54
-+++ Eclipse SWT PI/gtk/library/build.sh	1 Jun 2009 18:44:43 -0000
-@@ -106,19 +106,19 @@
+--- a/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	29 May 2009 21:30:14 -0000	1.54
++++ b/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	1 Jun 2009 18:44:43 -0000
+@@ -153,19 +153,19 @@
  		MOZILLA_LIBS=`pkg-config --libs mozilla-xpcom`
  		export MOZILLA_INCLUDES
  		export MOZILLA_LIBS
@@ -23,8 +23,8 @@ diff -u -r1.54 build.sh
  	elif [ x`pkg-config --exists libxul && echo YES` = "xYES" ]; then
 -		XULRUNNER_INCLUDES=`pkg-config --cflags libxul`
 -		XULRUNNER_LIBS=`pkg-config --libs libxul`
-+		XULRUNNER_INCLUDES=`pkg-config --cflags libxul`
-+		XULRUNNER_LIBS="`pkg-config --libs libxul` -lxpcomglue"
++		XULRUNNER_INCLUDES=`pkg-config --cflags libxul-unstable`
++		XULRUNNER_LIBS="`pkg-config --libs libxul-unstable` -lxpcomglue"
  		export XULRUNNER_INCLUDES
  		export XULRUNNER_LIBS
 -		MAKE_MOZILLA=make_xulrunner
diff --git a/patches/eclipse-swt-compile-xpt.patch b/patches/eclipse-swt-compile-xpt.patch
deleted file mode 100644
index 3e0d348..0000000
--- a/patches/eclipse-swt-compile-xpt.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Description: Build .xpt file if it does not exit
-Author: Benjamin Drung
-Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=305569
-
---- a/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
-+++ b/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh	
-@@ -24,6 +24,24 @@ if [ "${CC}" = "" ]; then
- 	export CC
- fi
- 
-+COMPONENTS_DIR=$(pwd)/../../org.eclipse.swt/components
-+# Check if we have to compile external.xpt from external.idl
-+if test ! -f ${COMPONENTS_DIR}/external.xpt; then
-+	if test ! -f ${COMPONENTS_DIR}/external.idl; then
-+		echo "Can't find ${COMPONENTS_DIR}/external.idl"
-+		exit 1
-+	fi
-+
-+	IDLDIR=$(pkg-config --variable=idldir libxul | sed 's@/stable$@@')/unstable
-+	if test ! -d ${IDLDIR}; then
-+		IDLDIR=$(pkg-config --variable=idldir libxul)
-+	fi
-+	XPIDL=$(pkg-config --variable=sdkdir libxul)/bin/xpidl
-+
-+	echo "${XPIDL} -m typelib -I ${IDLDIR} -e ${COMPONENTS_DIR}/external.xpt ${COMPONENTS_DIR}/external.idl"
-+	${XPIDL} -m typelib -I ${IDLDIR} -e ${COMPONENTS_DIR}/external.xpt ${COMPONENTS_DIR}/external.idl
-+fi
-+
- # Determine which OS we are on
- if [ "${OS}" = "" ]; then
- 	OS=`uname -s`
diff --git a/patches/eclipse-use-newer-commons-codec.patch b/patches/eclipse-use-newer-commons-codec.patch
index 340b35a..1ab7b33 100644
--- a/patches/eclipse-use-newer-commons-codec.patch
+++ b/patches/eclipse-use-newer-commons-codec.patch
@@ -1,6 +1,6 @@
---- features/org.eclipse.equinox.p2.user.ui/feature.xml.old	2009-11-06 21:52:00.000000000 +0200
-+++ features/org.eclipse.equinox.p2.user.ui/feature.xml	2010-02-26 12:25:20.754557749 +0200
-@@ -305,7 +305,7 @@
+--- a/features/org.eclipse.equinox.p2.user.ui/feature.xml
++++ b/features/org.eclipse.equinox.p2.user.ui/feature.xml
+@@ -298,21 +298,21 @@
           id="org.apache.commons.codec"
           download-size="0"
           install-size="0"
@@ -9,3 +9,19 @@
           unpack="false"/>
  
     <plugin
+          id="org.apache.commons.httpclient"
+          download-size="0"
+          install-size="0"
+-         version="3.1.0.qualifier"
++         version="0.0.0"
+          unpack="false"/>
+ 
+    <plugin
+          id="org.apache.commons.logging"
+          download-size="0"
+          install-size="0"
+-         version="1.0.4.qualifier"
++         version="0.0.0"
+          unpack="false"/>
+ 
+ 
diff --git a/patches/gnomeproxy-makefile.patch b/patches/gnomeproxy-makefile.patch
index 326e732..ce2ff4b 100644
--- a/patches/gnomeproxy-makefile.patch
+++ b/patches/gnomeproxy-makefile.patch
@@ -1,14 +1,12 @@
-Index: plugins/org.eclipse.core.net/natives/unix/linux/makefile
-===================================================================
---- a/plugins/org.eclipse.core.net/natives/unix/linux/makefile	2009-10-12 22:36:19.965754808 +0200
-+++ b/plugins/org.eclipse.core.net/natives/unix/linux/makefile	2009-10-12 23:01:39.375006881 +0200
-@@ -18,7 +18,8 @@
- LIB_NAME = gnomeproxy.so
- LIB_NAME_FULL = libgnomeproxy-1.0.0.so
+--- a/plugins/org.eclipse.core.net/natives/unix/linux/makefile
++++ b/plugins/org.eclipse.core.net/natives/unix/linux/makefile
+@@ -20,7 +20,8 @@
  
+ OS_TYPE = linux
+ JDK_INCLUDE = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/${OS_TYPE}
 -INCLUDE = -I/usr/include/gconf/2/ -I/usr/include/orbit-2.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/
 +INCLUDE = -I/usr/include/gconf/2/ -I/usr/include/orbit-2.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include/ \
 +	  -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
- COMPILER_FLAGS= -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32
+ COMPILER_FLAGS = -O0 -fPIC -g3 -Wall -c -fmessage-length=0 -m32
  
  LIBS := -lgconf-2 -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0
diff --git a/patches/java-home.patch b/patches/java-home.patch
new file mode 100644
index 0000000..a9abc1e
--- /dev/null
+++ b/patches/java-home.patch
@@ -0,0 +1,15 @@
+Description: Do not overwrite exported JAVA_HOME variable
+Author: Benjamin Drung <bdrung at ubuntu.com>
+Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=317634
+
+--- eclipse-3.6.0.orig/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh
++++ eclipse-3.6.0/eclipse/features/org.eclipse.equinox.executable/library/gtk/build.sh
+@@ -161,7 +161,7 @@ DEFAULT_OS_ARCH="$defaultOSArch"
+ DEFAULT_WS="$defaultWS"
+ DEFAULT_JAVA=$defaultJava
+ 
+-if [ -n  $javaHome ]; then
++if [ -z "$JAVA_HOME" -a -n  $javaHome ]; then
+ 	JAVA_HOME=$javaHome
+ 	export JAVA_HOME
+ fi
diff --git a/patches/junit4-nochecksum.patch b/patches/junit4-nochecksum.patch
new file mode 100644
index 0000000..76c8753
--- /dev/null
+++ b/patches/junit4-nochecksum.patch
@@ -0,0 +1,22 @@
+--- plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/MANIFEST.MF.orig	2010-05-20 01:33:28.000000000 +0300
++++ plugins/org.junit_4.8.1.v4_8_1_v20100427-1100/META-INF/MANIFEST.MF	2010-07-07 13:23:16.258708324 +0300
+@@ -29,18 +29,4 @@ Export-Package: junit.extensions;version
+ Bundle-Version: 4.8.1.v4_8_1_v20100427-1100
+ Bundle-ManifestVersion: 2
+ 
+-Name: META-INF/eclipse.inf
+-SHA1-Digest: u+F8j/GAE8tzrDry9+wT3Cvg81Y=
+-
+-Name: junit.jar
+-SHA1-Digest: zPmrTAyba4ZMLFgf8QAHILhgZ9o=
+-
+-Name: about_files/cpl-v10.html
+-SHA1-Digest: REygXYi+T14Sj1v8XnnKycNjpN4=
+-
+-Name: about.html
+-SHA1-Digest: w3lIEWRkSmgtAui4qxGRJmqgDw4=
+-
+-Name: plugin.properties
+-SHA1-Digest: f1fR+Wdi2X4qLQSIBEgwenAuk2c=
+-
++
diff --git a/patches/no-gnome-vfs.patch b/patches/no-gnome-vfs.patch
new file mode 100644
index 0000000..4d0517d
--- /dev/null
+++ b/patches/no-gnome-vfs.patch
@@ -0,0 +1,96 @@
+--- plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java	2 Nov 2010 21:53:56 -0000	1.81.2.1
++++ plugins/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java	25 Mar 2011 14:53:53 -0000
+@@ -94,34 +94,21 @@
+ 	 * The workaround is to simply check that the window manager is a 
+ 	 * compliant one (property _NET_SUPPORTING_WM_CHECK) and to attempt to load 
+ 	 * our native library that depends on gnome-vfs.
++	 * 
++	 * Note: GIO is used when available instead of gnome-vfs.
+ 	 */
+ 	if (desktop == DESKTOP_UNKNOWN) {
+ 		byte[] gnomeName = Converter.wcsToMbcs(null, "_NET_SUPPORTING_WM_CHECK", true);
+ 		int /*long*/ gnome = OS.XInternAtom(xDisplay, gnomeName, true);
+-		if (gnome != OS.None && (OS.GTK_VERSION >= OS.VERSION (2, 2, 0)) && gnome_init()) {
+-			desktop = DESKTOP_GNOME;
+-			int /*long*/ icon_theme = GNOME.gnome_icon_theme_new();
+-			display.setData(ICON_THEME_DATA, new LONG(icon_theme));
+-			display.addListener(SWT.Dispose, new Listener() {
+-				public void handleEvent(Event event) {
+-					LONG gnomeIconTheme = (LONG)display.getData(ICON_THEME_DATA);
+-					if (gnomeIconTheme == null) return;
+-					display.setData(ICON_THEME_DATA, null);
+-					/* 
+-					 * Note.  gnome_icon_theme_new uses g_object_new to allocate the
+-					 * data it returns. Use g_object_unref to free the pointer it returns.
+-					 */
+-					if (gnomeIconTheme.value != 0) OS.g_object_unref(gnomeIconTheme.value);
+-				}
+-			});
+-			/* Check for the existence of libgio libraries */
+-			byte[] buffer ;
++		if (gnome != OS.None) {
++			/* Check for the existence of libgio libraries first */
++			byte[] buffer;
+ 			int flags = OS.RTLD_LAZY;
+ 			if (OS.IsAIX) {
+-				 buffer = Converter.wcsToMbcs(null, "libgio-2.0.a(libgio-2.0.so.0)", true);
+-				 flags |= OS.RTLD_MEMBER;
++				buffer = Converter.wcsToMbcs(null, "libgio-2.0.a(libgio-2.0.so.0)", true);
++				flags |= OS.RTLD_MEMBER;
+ 			} else  if (OS.IsHPUX) {
+-				 buffer = Converter.wcsToMbcs(null, "libgio-2.0.so", true);
++				buffer = Converter.wcsToMbcs(null, "libgio-2.0.so", true);
+ 			} else {
+ 				buffer =  Converter.wcsToMbcs(null, "libgio-2.0.so.0", true);
+ 			}
+@@ -133,7 +120,24 @@
+ 					desktop = DESKTOP_GIO;
+ 				}
+ 				OS.dlclose(libgio);
+-			} else {
++			}
++			
++			if (desktop == DESKTOP_UNKNOWN && (OS.GTK_VERSION >= OS.VERSION (2, 2, 0)) && gnome_init()) {
++				desktop = DESKTOP_GNOME;
++				int /*long*/ icon_theme = GNOME.gnome_icon_theme_new();
++				display.setData(ICON_THEME_DATA, new LONG(icon_theme));
++				display.addListener(SWT.Dispose, new Listener() {
++					public void handleEvent(Event event) {
++						LONG gnomeIconTheme = (LONG)display.getData(ICON_THEME_DATA);
++						if (gnomeIconTheme == null) return;
++						display.setData(ICON_THEME_DATA, null);
++						/* 
++						 * Note.  gnome_icon_theme_new uses g_object_new to allocate the
++						 * data it returns. Use g_object_unref to free the pointer it returns.
++						 */
++						if (gnomeIconTheme.value != 0) OS.g_object_unref(gnomeIconTheme.value);
++					}
++				});
+ 				/* Check for libgnomevfs-2 version 2.4 */
+ 				buffer = Converter.wcsToMbcs(null, "libgnomevfs-2.so.0", true);
+ 				int /*long*/ libgnomevfs = OS.dlopen(buffer, OS.RTLD_LAZY);
+@@ -974,14 +978,17 @@
+ 	if (application != 0) {
+ 		byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true);
+ 		int /*long*/ file = 0;
+-		if (OS.g_app_info_supports_uris (application)) {
+-			file = OS.g_file_new_for_uri (fileNameBuffer);
+-		} else {
+-			file = OS.g_file_new_for_path (fileNameBuffer);
++		if (fileName.length() > 0) {
++			if (OS.g_app_info_supports_uris (application)) {
++				file = OS.g_file_new_for_uri (fileNameBuffer);
++			} else {
++				file = OS.g_file_new_for_path (fileNameBuffer);
++			}
+ 		}
+-		if (file != 0) {
+-			int /*long*/ list = OS.g_list_append (0, file);
+-			result = OS.g_app_info_launch (application, list, 0, 0);
++		int /*long*/ list = 0;
++		if (file != 0) list = OS.g_list_append (0, file);
++		result = OS.g_app_info_launch (application, list, 0, 0);
++		if (list != 0) {
+ 			OS.g_list_free (list);
+ 			OS.g_object_unref (file);
+ 		}
diff --git a/patches/osgi-services-build.patch b/patches/osgi-services-build.patch
deleted file mode 100644
index 03cc43b..0000000
--- a/patches/osgi-services-build.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff --git a/eclipse/plugins/org.eclipse.osgi.services/build.properties b/eclipse/plugins/org.eclipse.osgi.services/build.properties
-index 7962dc5..ca55afb 100644
---- a/plugins/org.eclipse.osgi.services/build.properties
-+++ b/plugins/org.eclipse.osgi.services/build.properties
-@@ -11,11 +11,11 @@
- bin.includes = plugin.properties,\
-                about.html,\
-                META-INF/,\
--               org/,\
-+               bin/,\
-+               about_files/,\
-+               .
-+src.includes = about.html,\
-                about_files/
--src.includes = src.zip,\
--               about.html,\
--               about_files/
--source.. = .
-+source.. = src/
- output.. = .
- customBuildCallbacks=customBuildCallbacks.xml
-diff --git a/eclipse/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml b/eclipse/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-index 9187112..dbd6075 100644
---- a/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-+++ b/plugins/org.eclipse.osgi.services/customBuildCallbacks.xml
-@@ -104,6 +104,7 @@
- 	<!--   target.folder - destination folder                                  -->
- 	<!-- ===================================================================== -->
- 	<target name="post.gather.bin.parts">
-+	  <delete dir="${target.folder}/javax" />
- 	</target>
- 
- 	<!-- ===================================================================== -->
-@@ -120,8 +121,7 @@
- 	<!--   destination.temp.folder - destination folder                        -->
- 	<!-- ===================================================================== -->
- 	<target name="post.gather.sources">
--		<unzip src="${target.folder}/src.zip" dest="${target.folder}" overwrite="false"/>
--		<delete file="${destination.temp.folder}/src.zip" />	
-+	  <delete dir="${destination.temp.folder}/javax" />
- 	</target>
- 
- 	<!-- ===================================================================== -->
-@@ -146,7 +146,6 @@
- 	<!--   destination.temp.folder - destination folder                        -->
- 	<!-- ===================================================================== -->
- 	<target name="pre.clean">  
--		<move  file="src.zip" tofile="services_src.zip"/>
- 	</target>
- 
- 	<!-- ===================================================================== -->
-@@ -157,6 +156,5 @@
- 	<!--   temp.folder - temporary folder                                      -->
- 	<!-- ===================================================================== -->
- 	<target name="post.clean">
--		<move file="services_src.zip" tofile="src.zip"/>
- 	</target>
- </project>
diff --git a/patches/osgi-util.patch b/patches/osgi-util.patch
deleted file mode 100644
index c75d6be..0000000
--- a/patches/osgi-util.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/eclipse/plugins/org.eclipse.osgi.util/build.properties b/eclipse/plugins/org.eclipse.osgi.util/build.properties
-index 2a015f5..270afcd 100644
---- a/plugins/org.eclipse.osgi.util/build.properties
-+++ b/plugins/org.eclipse.osgi.util/build.properties
-@@ -12,10 +12,10 @@ bin.includes = plugin.properties,\
-                org/,\
-                about.html,\
-                META-INF/,\
-+               about_files/,\
-+               .
-+src.includes = about.html,\
-                about_files/
--src.includes = src.zip,\
--               about.html,\
--               about_files/
--source.. = .
-+source.. = src/
- output.. = .
--customBuildCallbacks=customBuildCallbacks.xml
-+#customBuildCallbacks=customBuildCallbacks.xml
diff --git a/patches/tests-nop2discoverytests.patch b/patches/tests-nop2discoverytests.patch
new file mode 100644
index 0000000..4df2658
--- /dev/null
+++ b/patches/tests-nop2discoverytests.patch
@@ -0,0 +1,25 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.sdk.tests-feature
+Index: feature.xml
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.sdk.tests-feature/features/org.eclipse.sdk.tests/feature.xml,v
+retrieving revision 1.67
+diff -u -r1.67 feature.xml
+--- feature.xml	22 Apr 2010 21:18:14 -0000	1.67
++++ feature.xml	28 Jul 2010 13:22:07 -0000
+@@ -375,12 +375,14 @@
+          download-size="0"
+          install-size="0"
+          version="0.0.0"/>
+-         
++
++<!--     
+    <plugin
+          id="org.eclipse.equinox.p2.tests.discovery"
+          download-size="0"
+          install-size="0"
+          version="0.0.0"/>
++-->
+ 
+    <plugin
+          id="org.eclipse.equinox.p2.tests.ui"
diff --git a/patches/tests-org.eclipse.ant.tests.core.patch b/patches/tests-org.eclipse.ant.tests.core.patch
new file mode 100644
index 0000000..3b7ef24
--- /dev/null
+++ b/patches/tests-org.eclipse.ant.tests.core.patch
@@ -0,0 +1,27 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.ant.tests.core
+Index: tests/org/eclipse/ant/tests/core/tests/OptionTests.java
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.ant.tests.core/tests/org/eclipse/ant/tests/core/tests/OptionTests.java,v
+retrieving revision 1.67.2.2
+diff -u -r1.67.2.2 OptionTests.java
+--- tests/org/eclipse/ant/tests/core/tests/OptionTests.java	9 Nov 2009 17:22:09 -0000	1.67.2.2
++++ tests/org/eclipse/ant/tests/core/tests/OptionTests.java	23 Apr 2010 12:42:41 -0000
+@@ -27,7 +27,7 @@
+ 	
+ 	protected static final String UNKNOWN_ARG= "Unknown argument: ";
+ 	protected static final String START_OF_HELP= "ant [options] [target [target2 [target3] ...]]";
+-	protected static final String VERSION= "Apache Ant version 1.7.1 compiled on June 27 2008";
++	protected static final String VERSION= "Apache Ant version 1.7.1";
+ 	protected static final String PLUGIN_VERSION= "org.apache.ant_1.7.1";
+ 	 
+ 	public OptionTests(String name) {
+@@ -58,7 +58,7 @@
+ 	public void testVersion() throws CoreException {
+ 		run("TestForEcho.xml", new String[]{"-version"});
+ 		assertTrue("One message should have been logged", AntTestChecker.getDefault().getMessagesLoggedCount() == 1);
+-		assertTrue("Version is incorrect", VERSION.equals(getLastMessageLogged()));
++		assertTrue("Version is incorrect", getLastMessageLogged().startsWith(VERSION));
+ 	}
+ 	
+ 	/**
diff --git a/patches/tests-org.eclipse.ant.tests.ui.patch b/patches/tests-org.eclipse.ant.tests.ui.patch
new file mode 100644
index 0000000..9799083
--- /dev/null
+++ b/patches/tests-org.eclipse.ant.tests.ui.patch
@@ -0,0 +1,51 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.ant.tests.ui
+Index: Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.ant.tests.ui/Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java,v
+retrieving revision 1.12
+diff -u -r1.12 PropertyTests.java
+--- Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java	13 Aug 2008 15:32:16 -0000	1.12
++++ Ant Debug Tests/org/eclipse/ant/tests/ui/debug/PropertyTests.java	23 Apr 2010 17:22:56 -0000
+@@ -24,7 +24,7 @@
+ 
+ public class PropertyTests extends AbstractAntDebugTest {
+ 	
+-	private static final String ANT_VERSION = "Apache Ant version 1.7.1 compiled on June 27 2008";
++	private static final String ANT_VERSION = "Apache Ant version 1.7.1";
+ 
+     public PropertyTests(String name) {
+ 		super(name);
+@@ -91,7 +91,7 @@
+ 			AntProperty property= frame.findProperty("ant.home");
+ 			assertNotNull(property);
+ 			
+-			assertProperty(thread, "ant.version", ANT_VERSION);
++			assertProperty(thread, "ant.version", ANT_VERSION, false);
+ 			assertProperty(thread, "ant.project.name", "debugEcho");
+ 		} finally {
+ 			terminateAndRemove(thread);
+@@ -140,13 +140,20 @@
+ 			removeAllBreakpoints();
+ 		}
+ 	}
+-
++	
+ 	private AntStackFrame assertProperty(AntThread thread, String propertyName, String propertyValue) throws DebugException {
++		return assertProperty(thread, propertyName, propertyValue, true);
++	}
++	
++	private AntStackFrame assertProperty(AntThread thread, String propertyName, String propertyValue, boolean checkFullProperty) throws DebugException {
+ 		AntStackFrame frame = (AntStackFrame)thread.getTopStackFrame();
+ 		AntProperty property= frame.findProperty(propertyName);
+ 		assertNotNull("Did not find property: " + propertyName, property);
+ 		AntValue value= (AntValue) property.getValue();
+-		assertTrue("Value of property" + propertyName + " incorrect: " + value.getValueString(), propertyValue.equals(value.getValueString()));
++		if (checkFullProperty)
++			assertTrue("Value of property" + propertyName + " incorrect: " + value.getValueString(), propertyValue.equals(value.getValueString()));
++		else
++			assertTrue("Value of property" + propertyName + " incorrect: " + value.getValueString(), value.getValueString().startsWith(propertyValue));
+ 		return frame;
+ 	}
+ }
+\ No newline at end of file
diff --git a/patches/tests-org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch b/patches/tests-org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch
new file mode 100644
index 0000000..2abe319
--- /dev/null
+++ b/patches/tests-org.eclipse.pde.ui.tests-LocalTargetDefinitionTests.patch
@@ -0,0 +1,21 @@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.pde.ui.tests
+Index: src/org/eclipse/pde/ui/tests/target/LocalTargetDefinitionTests.java
+===================================================================
+RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/target/LocalTargetDefinitionTests.java,v
+retrieving revision 1.24
+diff -u -r1.24 LocalTargetDefinitionTests.java
+--- src/org/eclipse/pde/ui/tests/target/LocalTargetDefinitionTests.java	12 May 2010 21:14:39 -0000	1.24
++++ src/org/eclipse/pde/ui/tests/target/LocalTargetDefinitionTests.java	28 Jul 2010 14:13:04 -0000
+@@ -679,8 +679,9 @@
+ 		expected.add("org.eclipse.jdt.source");
+ 		expected.add("org.eclipse.jdt.launching.source");
+ 		// There are two versions of junit available, each with source
+-		expected.add("org.junit.source");
+-		expected.add("org.junit.source");
++		// Most distros don't have .source bundles for 3rd party components
++		//expected.add("org.junit.source");
++		//expected.add("org.junit.source");
+ 		if (Platform.getOS().equals(Platform.OS_MACOSX)) {
+ 			expected.add("org.eclipse.jdt.launching.macosx.source");
+ 		}
diff --git a/patches/tooltip-color.patch b/patches/tooltip-color.patch
deleted file mode 100644
index 3edcbd4..0000000
--- a/patches/tooltip-color.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -u -r1.25 ToolTip.java
---- a/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	2 Dec 2009 15:52:39 -0000
-+++ b/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java	13 May 2010 15:59:10 -0000
-@@ -48,6 +48,7 @@
- 	TrayItem item;
- 	int x, y, timerId;
- 	int /*long*/ layoutText = 0, layoutMessage = 0;
-+	Color layoutTextColor, layoutMessageColor;
- 	int [] borderPolygon;
- 	boolean spikeAbove, autohide;
- 	
-@@ -498,6 +499,9 @@
- 			x += IMAGE_SIZE;
- 		}
- 		x += INSET;
-+		if (layoutTextColor != null) {
-+			OS.gdk_gc_set_foreground(gdkGC, layoutTextColor.handle);
-+		}
- 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutText);
- 		int [] w = new int [1], h = new int [1];
- 		OS.pango_layout_get_size (layoutText, w, h);
-@@ -505,6 +509,9 @@
- 	}
- 	if (layoutMessage != 0) {
- 		x = BORDER + PADDING + INSET;
-+		if (layoutMessageColor != null) {
-+			OS.gdk_gc_set_foreground(gdkGC, layoutMessageColor.handle);
-+		}
- 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutMessage);
- 	}
- 	OS.g_object_unref (gdkGC);
-@@ -708,6 +715,7 @@
- 	if (layoutMessage != 0) OS.g_object_unref (layoutMessage);
- 	layoutMessage = 0;
- 	if (message.length () != 0) {
-+		layoutMessageColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
- 		byte [] buffer = Converter.wcsToMbcs (null, message, true);
- 		layoutMessage = OS.gtk_widget_create_pango_layout (handle, buffer);
- 		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
-@@ -739,6 +747,7 @@
- 	if (layoutText != 0) OS.g_object_unref (layoutText);
- 	layoutText = 0;
- 	if (text.length () != 0) {
-+		layoutTextColor = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
- 		byte [] buffer = Converter.wcsToMbcs (null, text, true);
- 		layoutText = OS.gtk_widget_create_pango_layout (handle, buffer);
- 		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
diff --git a/patches/webkitgtk.patch b/patches/webkitgtk.patch
new file mode 100644
index 0000000..460ad0c
--- /dev/null
+++ b/patches/webkitgtk.patch
@@ -0,0 +1,11 @@
+--- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak.sav	2011-03-07 23:32:06.523294166 +0200
++++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak	2011-03-07 23:32:41.850888713 +0200
+@@ -92,7 +92,7 @@ MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdo
+ XULRUNNEREXCLUDES = -DNO__1NS_1InitXPCOM2
+ 
+ WEBKITCFLAGS = `pkg-config --cflags gtk+-2.0` -I/usr/include/webkit-1.0 -I/usr/include/libsoup-2.4
+-WEBKITLIBS = -lwebkit-1.0
++WEBKITLIBS = `pkg-config --libs webkit-1.0`
+ 
+ SWT_OBJECTS = swt.o c.o c_stats.o callback.o
+ CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o
diff --git a/pdebuild.properties b/pdebuild.properties
index 7943d93..b6d8fd7 100644
--- a/pdebuild.properties
+++ b/pdebuild.properties
@@ -2,10 +2,10 @@ buildArch=x86
 ws=gtk
 os=linux
 
-buildId=M20100211-1343
-buildTag=vM20100211-1343
-label=3.5.2
-bootclasspath=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
+buildId=M20110210-1200
+buildTag=M20110210-1200
+label=3.6.2
+bootclasspath=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
 #build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
 
 javacFailOnError=true
@@ -29,21 +29,21 @@ CDC-1.0/PersonalJava-1.0=${bootclasspath}
 CDC-1.1/PersonalBasis-1.1=${bootclasspath}
 CDC-1.1/PersonalJava-1.1=${bootclasspath}
 # Somehow bootclasspath isn't expanded when used by antRunner
-JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/Foundation-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/Foundation-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-OSGi/Minimum-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-JRE-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.3=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.4=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-J2SE-1.5=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-PersonalJava-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/PersonalBasis-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.0/PersonalJava-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/PersonalBasis-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
-CDC-1.1/PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar
\ No newline at end of file
+JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/Foundation-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/Foundation-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+OSGi/Minimum-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+JRE-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.3=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.4=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+J2SE-1.5=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+JavaSE-1.6=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+PersonalJava-1.2=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/PersonalBasis-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.0/PersonalJava-1.0=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/PersonalBasis-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
+CDC-1.1/PersonalJava-1.1=/usr/lib/jvm/java/jre/lib/rt.jar:/usr/lib/jvm/java/jre/lib/jce.jar:/usr/lib/jvm/default-java/jre/lib/rt.jar:/usr/lib/jvm/default-java/jre/lib/jce.jar:/usr/lib64/jvm/java/jre/lib/rt.jar:/usr/lib64/jvm/java/jre/lib/jce.jar
diff --git a/pdebuild.xml b/pdebuild.xml
index 99cc7c4..87f0584 100644
--- a/pdebuild.xml
+++ b/pdebuild.xml
@@ -30,8 +30,6 @@
 		<file name="org.eclipse.equinox.preferences" />
 		<file name="org.eclipse.core.runtime.compatibility.auth" />
 		<file name="org.eclipse.core.contenttype" />
-		<file name="org.eclipse.equinox.transforms.hook" />
-		<file name="org.eclipse.osgi.services" />
 		<file name="org.eclipse.equinox.app" />
 		<file name="org.eclipse.core.runtime" />
 		<file name="org.eclipse.core.variables" />
@@ -55,9 +53,9 @@
 		<file name="org.eclipse.equinox.p2.repository" />
 		<file name="org.eclipse.equinox.p2.artifact.repository" />
 		<file name="org.eclipse.equinox.p2.metadata.repository" />
-		<file name="org.eclipse.equinox.p2.publisher" />
 		<file name="org.eclipse.equinox.simpleconfigurator" />
 		<file name="org.eclipse.equinox.simpleconfigurator.manipulator" />
+		<file name="org.eclipse.equinox.p2.publisher" />
 		<file name="org.eclipse.update.configurator" />
 		<file name="org.eclipse.core.runtime.compatibility" />
 		<file name="org.eclipse.equinox.p2.engine" />
@@ -66,11 +64,11 @@
 		<file name="org.eclipse.equinox.p2.updatesite" />
 		<file name="org.eclipse.pde.build" />
 		<file name="org.eclipse.equinox.launcher" />
+		<file name="org.eclipse.osgi.services" />
 		<file name="org.eclipse.equinox.p2.console" />
 		<file name="org.eclipse.equinox.p2.director.app" />
 		<file name="org.eclipse.update.core" />
 		<file name="org.eclipse.equinox.p2.garbagecollector" />
-		<file name="org.eclipse.equinox.p2.exemplarysetup" />
 		<file name="org.eclipse.core.expressions" />
 		<file name="org.eclipse.equinox.http.servlet" />
 		<file name="org.eclipse.equinox.p2.touchpoint.eclipse" />
@@ -102,6 +100,9 @@
 		<file name="org.eclipse.jdt.launching" />
 		<file name="org.eclipse.pde.core" />
 		<file name="org.eclipse.pde.api.tools" />
+		<file name="org.eclipse.equinox.event" />
+		<file name="org.eclipse.equinox.util" />
+		<file name="org.eclipse.equinox.ds" />
 	</filelist>
 	<fileset dir="${sdkSource}/plugins" id="orbitDeps">
 		<include name="org.junit_*/" />
@@ -109,6 +110,7 @@
 		<include name="org.apache.ant_*/**" />
 		<include name="org.mortbay.jetty*" />
 		<include name="org.apache.lucene*" />
+		<include name="org.apache.commons*" />
 		<include name="org.sat4j*" />
 		<include name="org.hamcrest.core*" />
 		<include name="javax.servlet*" />
@@ -234,6 +236,9 @@
 		<copy todir="bootstrap/plugins" flatten="true">
 			<fileset refid="depsZips" />
 		</copy>
+		<copy todir="bootstrap/plugins/org.eclipse.swt">
+			<fileset dir="${sdkSource}/plugins/org.eclipse.swt" />
+		</copy>
 		<unzip dest="bootstrap/plugins">
 			<fileset dir="bootstrap/plugins">
 				<include name="**/*.zip" />
@@ -346,9 +351,9 @@
 		</delete>
 		<!-- osgi can only be found if _ is in name -->
 		<symlink action="delete"
-		         link="bootstrap/plugins/org.eclipse.osgi_3.5.0.jar"
+		         link="bootstrap/plugins/org.eclipse.osgi_${label}.jar"
 		         failonerror="false" />
-		<symlink link="bootstrap/plugins/org.eclipse.osgi_3.5.0.jar"
+		<symlink link="bootstrap/plugins/org.eclipse.osgi_${label}.jar"
 		         resource="org.eclipse.osgi.jar"
 		         overwrite="true" />
 	</target>
diff --git a/pdebuild/eclipse-copy-platform.sh b/pdebuild/eclipse-copy-platform.sh
old mode 100644
new mode 100755
diff --git a/pdebuild/eclipse-pdebuild.sh b/pdebuild/eclipse-pdebuild.sh
index 0d528c3..71cc3be 100755
--- a/pdebuild/eclipse-pdebuild.sh
+++ b/pdebuild/eclipse-pdebuild.sh
@@ -27,19 +27,19 @@ function copyPlatform {
     # counting as arguments to copy-platform -- overholt, 2008-03
     if [ -z "$dependencies" ]; then
         if [ $verbose -eq 1 ]; then
-            echo "/bin/sh -x @COPY_PLATFORM@ $SDK $datadir/eclipse"
-            /bin/sh -x @COPY_PLATFORM@ $SDK $datadir/eclipse
+            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
+            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
         else
-            echo "/bin/sh @COPY_PLATFORM@ $SDK $datadir/eclipse"
-            /bin/sh @COPY_PLATFORM@ $SDK $datadir/eclipse
+            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse"
+            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse
         fi
     else
         if [ $verbose -eq 1 ]; then
-            echo "/bin/sh -x @COPY_PLATFORM@ $SDK $datadir/eclipse $dependencies"
-            /bin/sh -x @COPY_PLATFORM@ $SDK $datadir/eclipse $dependencies
+            echo "/bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
+            /bin/sh -x $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
         else
-            echo "/bin/sh @COPY_PLATFORM@ $SDK $datadir/eclipse $dependencies"
-            /bin/sh @COPY_PLATFORM@ $SDK $datadir/eclipse $dependencies
+            echo "/bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies"
+            /bin/sh $datadir/eclipse/buildscripts/copy-platform $SDK $datadir/eclipse $dependencies
         fi
     fi
 }
@@ -123,9 +123,8 @@ sourceDir=$PWD
 buildDir=$PWD/build
 SDK=$buildDir/SDK
 homeDir=$buildDir/home
-workspaceDir=$homeDir/workspace
-datadir=/usr/lib
-pdeBuildDir=$datadir/eclipse/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@
+datadir=`rpm --eval "%{_libdir}"`
+pdeBuildDir=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@
 
 featureId=
 dependencies=
@@ -196,11 +195,6 @@ if [ $dryRun -ne 1 ]; then
     mkdir -p $homeDir
 fi
 
-echo "mkdir -p $workspaceDir"
-if [ $dryRun -ne 1 ]; then
-    mkdir -p $workspaceDir
-fi
-
 if [ -z $featureId ]; then
     findFeatureId
 fi
@@ -271,10 +265,7 @@ echo "Starting build:"
 
 if [ $testing != true ]; then
   java -cp $SDK/startup.jar \
-    -Duser.home=$homeDir \
-    $vmArgs \
     org.eclipse.core.launcher.Main \
-    -data $workspaceDir \
     -application org.eclipse.ant.core.antRunner \
     $debugPlatformArgs \
     -Dtype=feature \
@@ -282,19 +273,19 @@ if [ $testing != true ]; then
     -DbaseLocation=$SDK \
     -DsourceDirectory=$sourceDir \
     -DbuildDirectory=$buildDir \
-    -Dbuilder=$datadir/eclipse/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
+    -Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
     $orbitDeps \
     -Dtesting="$testing" \
     $additionalArgs \
     -f $pdeBuildDir/scripts/build.xml \
+    -vmargs \
+    -Duser.home=$homeDir \
+    $vmArgs
 
 else
   echo "\
   java -cp $SDK/startup.jar \
-    -Duser.home=$homeDir \
-    $vmArgs \
     org.eclipse.core.launcher.Main \
-    -data $workspaceDir \
     -application org.eclipse.ant.core.antRunner \
     $debugPlatformArgs \
     -Dtype=feature \
@@ -302,11 +293,14 @@ else
     -DbaseLocation=$SDK \
     -DsourceDirectory=$sourceDir \
     -DbuildDirectory=$buildDir \
-    -Dbuilder=$datadir/eclipse/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
+    -Dbuilder=$datadir/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_ at PDEBUILDVERSION@/templates/package-build \
     $orbitDeps \
     -Dtesting="$testing" \
     $additionalArgs \
     -f $pdeBuildDir/scripts/build.xml \
+    -vmargs \
+    -Duser.home=$homeDir \
+    $vmArgs
   "
 fi
 
diff --git a/publishProduct.xml b/publishProduct.xml
index fb036d2..9acb6b4 100644
--- a/publishProduct.xml
+++ b/publishProduct.xml
@@ -1,7 +1,6 @@
 <project name="Eclipse SDK build" default="publish" basedir=".">
 	<target name="publish">
-	        <echo message="Calling p2.publish.product with repository=${reposource} and productFile=${productFiles}/sdk/sdk.product"/>
-		<p2.publish.product flavor="tooling" repository="file:${reposource}" productFile="${productFiles}/sdk/sdk.product" compress="true">
+		<p2.publish.product flavor="tooling" repository="file:${reposource}" productFile="${productFile}" compress="true">
 			<config os="linux" ws="gtk" arch="${buildArch}" />
 			<advice kind="featureVersions" file="${buildDirectory}/finalFeaturesVersions.properties" />
 			<advice kind="pluginVersions" file="${buildDirectory}/finalPluginsVersions.properties" />
diff --git a/regenerateBootstrapFiles.sh b/regenerateBootstrapFiles.sh
old mode 100644
new mode 100755
index d46018b..f815330
--- a/regenerateBootstrapFiles.sh
+++ b/regenerateBootstrapFiles.sh
@@ -1,24 +1,22 @@
-#!/bin/bash
+#!/bin/sh
+set -e 
 
-baseDir=$(pwd)
-workDirectory=
-buildID=R3_5_2
-baseBuilder=
-eclipseBuilder=
-baseBuilderTag="R3_5"
-eclipseBuilderTag="R3_5_2"
-fetchTests="no"
-orbitRepoZip=orbitRepo-R20090825191606.zip
-ecfBundlesZip=ecf-R3_5_2.zip
-ecfTag="v20090604-1131"
+usage='usage: $0 <launcherDir>'
+
+launcherDir=$1
+
+if [ "x$launcherDir"x = 'xx' ]; then
+   echo >&2 "$usage"
+   exit 1
+fi
 
 java -jar \
-/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+$launcherDir/org.eclipse.equinox.launcher_*.jar \
 -consolelog \
--data build/eclipse-vM20100210-0800-fetched-src \
+-data build/eclipse-3.6.0-src \
 -application org.eclipse.ant.core.antRunner \
 -f pdebuild.xml generateScripts \
--DbuildDirectory=build/eclipse-3.5.2-src \
+-DbuildDirectory=build/eclipse-3.6.0-src \
 -DskipBase=true \
--DsdkSource=build/eclipse-3.5.2-src \
+-DsdkSource=build/eclipse-3.6.0-src \
 2>&1 | tee ./generatePdeBuildScripts.log
diff --git a/runtests.sh b/runtests.sh
old mode 100644
new mode 100755
index ba2280d..b77f785
--- a/runtests.sh
+++ b/runtests.sh
@@ -12,8 +12,11 @@ Run Eclipse SDK tests
 Optional arguments:
    -h      Show this help message
    -g      Don't run the tests headless
-   -d      Allow remote connection to test runs' JVM
+   -d      Debug tests (allow remote connection to test runs' JVM)
+   -b      Tests build directory
+   -p      Clean installation directory to copy for running test suites
    -t      Timestamp string with which to tag the results
+   -v      Make test runs output to the console
 _EOF_
 }
 
@@ -70,25 +73,32 @@ function init() {
 	#	org.eclipse.jdt.compiler.tool.tests \
 
 	# Defaults
-	debugTests=0
-	headless=1
-	testFramework=org.eclipse.test_3.2.0
-	if [ -z ${timestamp} ]; then
-		timestamp=$(date "+%Y%m%d%H%M%S")
+	if [ -z ${verbose} ]; then
+		verbose=0
 	fi
+	if [ -z ${debugTests} ]; then
+		debugTests=0
+	fi
+	if [ -z ${headless} ]; then
+		headless=1
+	fi
+
 	label=$(grep label build.properties | sed s/label=//)
-	testsRepo=$(pwd)/testsBuild/eclipse-sdktests-${label}-src/buildRepo/
+	testframework=$(grep ^testframework build.properties | sed s/testframework=//)
+	
+	# Make directories absolute
+	testsBuildDirectory=$(readlink -f ${testsBuildDirectory})
+	provisionDir=$(readlink -f ${provisionDir})
+	
+	testsRepo=${testsBuildDirectory}/buildRepo/
 
 	testsParent=$(pwd)/tests_${timestamp}
-        mkdir -p ${testsParent}
-        cp -rp $(pwd)/build/eclipse-${label}-src/installation ${testsParent}/testsinstallation.clean
-	cleanInstall=${testsParent}/testsinstallation.clean
-        workspace=${testsParent}/workspace
-
-	eclipseHome=${cleanInstall}
-        installTestFramework
+    mkdir -p ${testsParent}
+    cp -rp ${provisionDir} ${testsParent}/installationWithTests.clean
+	cleanInstall=${testsParent}/installationWithTests.clean
+    workspace=${testsParent}/workspace
 
-	eclipseHome=${testsParent}/installation
+	eclipseHome=${provisionDir}
 
 	results=${testsParent}/results
 	datadir=${testsParent}/testDataDir
@@ -98,6 +108,19 @@ function init() {
 	rm -rf $datadir $homedir $testhome
 	mkdir -p $datadir $homedir $testhome $results/{xml,logs,html}
 
+	# improves test cases (but not required) for org.eclipse.pde.build.tests
+	echo "${testPluginsToRun}" | grep -q 'org.eclipse.pde.build.tests'
+	if [ $? -eq 0 ]; then
+		deltapackZip=$(pwd)/eclipse-${label}-delta-pack.zip
+		mkdir -p ${testsParent}/deltapack
+		if [ -e ${deltapackZip} ]; then
+			unzip -d ${testsParent}/deltapack ${deltapackZip}
+		else
+			echo "eclipse-${label}-delta-pack was not found at ${deltapackZip}."
+			echo "Some failures should be expected in org.eclipse.pde.build.tests."
+		fi
+	fi
+
 	properties=$(pwd)/sdk-tests.properties
 	rm -f $properties
 	echo "data-dir=$datadir" >> $properties
@@ -171,23 +194,44 @@ function setArch() {
 }
 
 function runTestSuite() {
-	libraryXml=${eclipseHome}/plugins/${testFramework}/library.xml
-
-	${eclipseHome}/eclipse \
-	-application org.eclipse.ant.core.antRunner \
-	-file $testDriver \
-	-Declipse-home=${eclipseHome} \
-	-Dos=linux \
-	-Dws=gtk \
-	-Darch=${arch} \
-	-Dlibrary-file=$libraryXml \
-	-propertyfile $properties \
-	-logger org.apache.tools.ant.DefaultLogger \
-	-vmargs \
-	-Duser.home=${homedir} \
-	-Dosgi.os=linux \
-	-Dosgi.ws=gtk \
-	-Dosgi.arch=${arch}
+	libraryXml=${eclipseHome}/plugins/${testframework}/library.xml
+
+	if [ $verbose -eq 1 ]; then
+		${eclipseHome}/eclipse \
+		-debug -consolelog \
+		-data ${datadir} \
+		-application org.eclipse.ant.core.antRunner \
+		-file $testDriver \
+		-Declipse-home=${eclipseHome} \
+		-Dos=linux \
+		-Dws=gtk \
+		-Darch=${arch} \
+		-Dlibrary-file=$libraryXml \
+		-propertyfile $properties \
+		-logger org.apache.tools.ant.DefaultLogger \
+		-vmargs \
+		-Duser.home=${homedir} \
+		-Dosgi.os=linux \
+		-Dosgi.ws=gtk \
+		-Dosgi.arch=${arch}
+	else
+		${eclipseHome}/eclipse \
+		-data ${datadir} \
+		-application org.eclipse.ant.core.antRunner \
+		-file $testDriver \
+		-Declipse-home=${eclipseHome} \
+		-Dos=linux \
+		-Dws=gtk \
+		-Darch=${arch} \
+		-Dlibrary-file=$libraryXml \
+		-propertyfile $properties \
+		-logger org.apache.tools.ant.DefaultLogger \
+		-vmargs \
+		-Duser.home=${homedir} \
+		-Dosgi.os=linux \
+		-Dosgi.ws=gtk \
+		-Dosgi.arch=${arch}
+	fi
 }
 
 function cleanAfterTestSuite() {
@@ -235,6 +279,19 @@ function cleanAndSetup() {
 
   cp -rp ${cleanInstall} ${eclipseHome}
   workspace=${testsParent}/workspace
+  
+  # improves test cases (but not required) for org.eclipse.pde.ui.tests
+  if [ ${plugin} = 'org.eclipse.pde.ui.tests' ]; then
+      junitSourceLoc=$(pwd)/org.junit.source_*
+      if [ -e ${junitSourceLoc} ]; then
+	      ln -s ${junitSourceLoc} ${eclipseHome}/plugins
+      else
+          echo "org.junit.source was not found at ${junitSourceLoc}."
+          echo "Some failures should be expected in org.eclipse.pde.ui.tests."
+      fi
+      # these 2 plugins are not being recognized as bundles
+      rm -rf ${eclipseHome}/plugins/org.junit4 ${eclipseHome}/plugins/junit4.jar
+  fi
 }
 
 function installTestPlugin() {
@@ -284,11 +341,11 @@ function runTestPlugin() {
 }
 
 function genHtml() {
-	ant -Declipse-home=${eclipseHome} -Dresults=${results} -DxmlDir=${xmlDir} -f junitHelper.xml
+	ant -Declipse-home=${eclipseHome} -Dresults=${results} -DxmlDir=${xmlDir} -Dtestframework=${testframework} -f junitHelper.xml
 }
 
 # Command-line arguments
-while getopts "de:gt:h" OPTION
+while getopts "vde:gb:p:t:h" OPTION
 do
      case $OPTION in
          d)
@@ -300,13 +357,34 @@ do
          t)
              timestamp=$OPTARG
              ;;
+         b)
+             testsBuildDirectory=$OPTARG
+             ;;
+         p)
+             provisionDir=$OPTARG
+             ;;
          h)
              usage
              exit 1
              ;;
+         v)
+             verbose=1
+             ;;
      esac
 done
 
+if [ -z ${timestamp} ]; then
+	timestamp=$(date "+%Y%m%d%H%M%S")
+fi
+if [ -z ${testsBuildDirectory} ]; then
+	echo "Tests build directory must be specified (-b)";
+	exit 1;
+fi
+if [ -z ${provisionDir} ]; then
+    echo "Directory containing clean provisioned SDK must be specified (-p)";
+	exit 1;
+fi
+
 init
 findXvncAndSetDisplay
 setArch
diff --git a/sdkdependencies.properties b/sdkdependencies.properties
new file mode 100644
index 0000000..04a33b2
--- /dev/null
+++ b/sdkdependencies.properties
@@ -0,0 +1 @@
+org.objectweb.asm_3.2.0.v200909071300.jar=/usr/share/java/objectweb-asm/asm-all.jar:/usr/share/java/asm3-all.jar
diff --git a/stubs/org/eclipse/core/runtime/CoreException.java b/stubs/org/eclipse/core/runtime/CoreException.java
deleted file mode 100644
index ff18293..0000000
--- a/stubs/org/eclipse/core/runtime/CoreException.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.eclipse.core.runtime;
-public class CoreException extends Exception {
-    private static final long serialVersionUID = 1L;
-}
diff --git a/stubs/org/eclipse/core/runtime/IExtension.java b/stubs/org/eclipse/core/runtime/IExtension.java
deleted file mode 100644
index 499a7a4..0000000
--- a/stubs/org/eclipse/core/runtime/IExtension.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public interface IExtension{}
diff --git a/stubs/org/eclipse/core/runtime/IExtensionPoint.java b/stubs/org/eclipse/core/runtime/IExtensionPoint.java
deleted file mode 100644
index bbcc421..0000000
--- a/stubs/org/eclipse/core/runtime/IExtensionPoint.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public interface IExtensionPoint{}
diff --git a/stubs/org/eclipse/core/runtime/ILibrary.java b/stubs/org/eclipse/core/runtime/ILibrary.java
deleted file mode 100644
index f6662d6..0000000
--- a/stubs/org/eclipse/core/runtime/ILibrary.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public interface ILibrary{}
diff --git a/stubs/org/eclipse/core/runtime/IPath.java b/stubs/org/eclipse/core/runtime/IPath.java
deleted file mode 100644
index 80ede8b..0000000
--- a/stubs/org/eclipse/core/runtime/IPath.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public interface IPath extends Cloneable{};
diff --git a/stubs/org/eclipse/core/runtime/IPluginPrerequisite.java b/stubs/org/eclipse/core/runtime/IPluginPrerequisite.java
deleted file mode 100644
index d857663..0000000
--- a/stubs/org/eclipse/core/runtime/IPluginPrerequisite.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public interface IPluginPrerequisite {}
diff --git a/stubs/org/eclipse/core/runtime/Plugin.java b/stubs/org/eclipse/core/runtime/Plugin.java
deleted file mode 100644
index 60936c1..0000000
--- a/stubs/org/eclipse/core/runtime/Plugin.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public abstract class Plugin {}
diff --git a/stubs/org/eclipse/core/runtime/PluginVersionIdentifier.java b/stubs/org/eclipse/core/runtime/PluginVersionIdentifier.java
deleted file mode 100644
index 7f91189..0000000
--- a/stubs/org/eclipse/core/runtime/PluginVersionIdentifier.java
+++ /dev/null
@@ -1,2 +0,0 @@
-package org.eclipse.core.runtime;
-public final class PluginVersionIdentifier {}


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list